@ceed/ads 1.16.0-next.1 → 1.16.0-next.10
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/FilterMenu/components/FilterableCheckboxGroup.d.ts +11 -0
- package/dist/components/FilterMenu/types.d.ts +10 -2
- package/dist/components/FilterableCheckboxGroup/FilterableCheckboxGroup.d.ts +2 -0
- package/dist/components/Pagination/Pagination.d.ts +1 -0
- package/dist/components/inputs/FilterMenu.md +20 -0
- package/dist/components/inputs/FilterableCheckboxGroup.md +26 -0
- package/dist/components/navigation/Pagination.md +11 -2
- package/dist/index.cjs +379 -209
- package/dist/index.js +339 -169
- package/framer/index.js +40 -40
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -3527,8 +3527,10 @@ TableBody.displayName = "TableBody";
|
|
|
3527
3527
|
|
|
3528
3528
|
// src/components/Pagination/Pagination.tsx
|
|
3529
3529
|
var import_react27 = __toESM(require("react"));
|
|
3530
|
-
var
|
|
3531
|
-
var
|
|
3530
|
+
var import_ChevronLeftRounded = __toESM(require("@mui/icons-material/ChevronLeftRounded"));
|
|
3531
|
+
var import_ChevronRightRounded = __toESM(require("@mui/icons-material/ChevronRightRounded"));
|
|
3532
|
+
var import_FirstPageRounded = __toESM(require("@mui/icons-material/FirstPageRounded"));
|
|
3533
|
+
var import_LastPageRounded = __toESM(require("@mui/icons-material/LastPageRounded"));
|
|
3532
3534
|
var import_joy35 = require("@mui/joy");
|
|
3533
3535
|
var PaginationButton = (0, import_joy35.styled)(Button_default, {
|
|
3534
3536
|
name: "Pagination",
|
|
@@ -3587,6 +3589,7 @@ function Pagination(props) {
|
|
|
3587
3589
|
onPageChange,
|
|
3588
3590
|
rowCount,
|
|
3589
3591
|
size = "md",
|
|
3592
|
+
variant = "standard",
|
|
3590
3593
|
...innerProps
|
|
3591
3594
|
} = props;
|
|
3592
3595
|
const [paginationModel, setPaginationModel] = useControlledState(
|
|
@@ -3613,6 +3616,87 @@ function Pagination(props) {
|
|
|
3613
3616
|
setPaginationModel({ ...paginationModel, page: lastPage });
|
|
3614
3617
|
}
|
|
3615
3618
|
}, [rowCount, paginationModel, lastPage, setPaginationModel]);
|
|
3619
|
+
const pageOptions = Array.from({ length: lastPage }, (_, i) => ({
|
|
3620
|
+
label: `${i + 1}`,
|
|
3621
|
+
value: `${i + 1}`
|
|
3622
|
+
}));
|
|
3623
|
+
if (variant === "compact") {
|
|
3624
|
+
return /* @__PURE__ */ import_react27.default.createElement(PaginationRoot, { ...innerProps }, /* @__PURE__ */ import_react27.default.createElement(PaginationContainer, { direction: "row", size, alignItems: "center" }, /* @__PURE__ */ import_react27.default.createElement(Stack_default, { direction: "row" }, /* @__PURE__ */ import_react27.default.createElement(
|
|
3625
|
+
PaginationIconButton,
|
|
3626
|
+
{
|
|
3627
|
+
size,
|
|
3628
|
+
variant: "plain",
|
|
3629
|
+
color: "neutral",
|
|
3630
|
+
onClick: () => handlePageChange(firstPage),
|
|
3631
|
+
disabled: paginationModel.page === firstPage,
|
|
3632
|
+
"aria-label": "First page"
|
|
3633
|
+
},
|
|
3634
|
+
/* @__PURE__ */ import_react27.default.createElement(import_FirstPageRounded.default, null)
|
|
3635
|
+
), /* @__PURE__ */ import_react27.default.createElement(
|
|
3636
|
+
PaginationIconButton,
|
|
3637
|
+
{
|
|
3638
|
+
size,
|
|
3639
|
+
variant: "plain",
|
|
3640
|
+
color: "neutral",
|
|
3641
|
+
onClick: () => handlePageChange(paginationModel.page - 1),
|
|
3642
|
+
disabled: paginationModel.page === firstPage,
|
|
3643
|
+
"aria-label": "Previous page"
|
|
3644
|
+
},
|
|
3645
|
+
/* @__PURE__ */ import_react27.default.createElement(import_ChevronLeftRounded.default, null)
|
|
3646
|
+
)), /* @__PURE__ */ import_react27.default.createElement(
|
|
3647
|
+
Autocomplete_default,
|
|
3648
|
+
{
|
|
3649
|
+
size,
|
|
3650
|
+
value: `${paginationModel.page}`,
|
|
3651
|
+
onChange: (event) => {
|
|
3652
|
+
if (event.target.value) {
|
|
3653
|
+
handlePageChange(parseInt(event.target.value, 10));
|
|
3654
|
+
}
|
|
3655
|
+
},
|
|
3656
|
+
options: pageOptions,
|
|
3657
|
+
sx: {
|
|
3658
|
+
width: {
|
|
3659
|
+
sm: "80px",
|
|
3660
|
+
md: "100px",
|
|
3661
|
+
lg: "120px"
|
|
3662
|
+
}[size]
|
|
3663
|
+
}
|
|
3664
|
+
}
|
|
3665
|
+
), /* @__PURE__ */ import_react27.default.createElement(
|
|
3666
|
+
Typography_default,
|
|
3667
|
+
{
|
|
3668
|
+
level: `body-${size}`,
|
|
3669
|
+
sx: (theme) => ({
|
|
3670
|
+
color: theme.palette.text.secondary,
|
|
3671
|
+
fontWeight: 500
|
|
3672
|
+
})
|
|
3673
|
+
},
|
|
3674
|
+
"/ ",
|
|
3675
|
+
lastPage
|
|
3676
|
+
), /* @__PURE__ */ import_react27.default.createElement(Stack_default, { direction: "row" }, /* @__PURE__ */ import_react27.default.createElement(
|
|
3677
|
+
PaginationIconButton,
|
|
3678
|
+
{
|
|
3679
|
+
size,
|
|
3680
|
+
variant: "plain",
|
|
3681
|
+
color: "neutral",
|
|
3682
|
+
onClick: () => handlePageChange(paginationModel.page + 1),
|
|
3683
|
+
disabled: paginationModel.page === lastPage,
|
|
3684
|
+
"aria-label": "Next page"
|
|
3685
|
+
},
|
|
3686
|
+
/* @__PURE__ */ import_react27.default.createElement(import_ChevronRightRounded.default, null)
|
|
3687
|
+
), /* @__PURE__ */ import_react27.default.createElement(
|
|
3688
|
+
PaginationIconButton,
|
|
3689
|
+
{
|
|
3690
|
+
size,
|
|
3691
|
+
variant: "plain",
|
|
3692
|
+
color: "neutral",
|
|
3693
|
+
onClick: () => handlePageChange(lastPage),
|
|
3694
|
+
disabled: paginationModel.page === lastPage,
|
|
3695
|
+
"aria-label": "Last page"
|
|
3696
|
+
},
|
|
3697
|
+
/* @__PURE__ */ import_react27.default.createElement(import_LastPageRounded.default, null)
|
|
3698
|
+
))));
|
|
3699
|
+
}
|
|
3616
3700
|
return /* @__PURE__ */ import_react27.default.createElement(PaginationRoot, { ...innerProps }, /* @__PURE__ */ import_react27.default.createElement(PaginationContainer, { direction: "row", size, alignItems: "center" }, /* @__PURE__ */ import_react27.default.createElement(
|
|
3617
3701
|
PaginationIconButton,
|
|
3618
3702
|
{
|
|
@@ -3623,7 +3707,7 @@ function Pagination(props) {
|
|
|
3623
3707
|
disabled: paginationModel.page === firstPage,
|
|
3624
3708
|
"aria-label": "Previous page"
|
|
3625
3709
|
},
|
|
3626
|
-
/* @__PURE__ */ import_react27.default.createElement(
|
|
3710
|
+
/* @__PURE__ */ import_react27.default.createElement(import_ChevronLeftRounded.default, null)
|
|
3627
3711
|
), paginationModel.page !== firstPage && /* @__PURE__ */ import_react27.default.createElement(PaginationButton, { size, variant: "plain", color: "neutral", onClick: () => handlePageChange(firstPage) }, firstPage), isMoreBeforePages && /* @__PURE__ */ import_react27.default.createElement(
|
|
3628
3712
|
PaginationButton,
|
|
3629
3713
|
{
|
|
@@ -3654,7 +3738,7 @@ function Pagination(props) {
|
|
|
3654
3738
|
disabled: paginationModel.page === lastPage,
|
|
3655
3739
|
"aria-label": "Next page"
|
|
3656
3740
|
},
|
|
3657
|
-
/* @__PURE__ */ import_react27.default.createElement(
|
|
3741
|
+
/* @__PURE__ */ import_react27.default.createElement(import_ChevronRightRounded.default, null)
|
|
3658
3742
|
)));
|
|
3659
3743
|
}
|
|
3660
3744
|
Pagination.displayName = "Pagination";
|
|
@@ -4476,11 +4560,52 @@ var InsetDrawer = (0, import_joy42.styled)(import_joy42.Drawer)(({ theme }) => (
|
|
|
4476
4560
|
|
|
4477
4561
|
// src/components/FilterableCheckboxGroup/FilterableCheckboxGroup.tsx
|
|
4478
4562
|
var import_react33 = __toESM(require("react"));
|
|
4479
|
-
var import_joy43 = require("@mui/joy");
|
|
4480
4563
|
var import_Search = __toESM(require("@mui/icons-material/Search"));
|
|
4481
4564
|
var import_react_virtual3 = require("@tanstack/react-virtual");
|
|
4565
|
+
function LabelWithTooltip(props) {
|
|
4566
|
+
const { label, size } = props;
|
|
4567
|
+
const labelContentRef = (0, import_react33.useRef)(null);
|
|
4568
|
+
const [isOverflowing, setIsOverflowing] = (0, import_react33.useState)(false);
|
|
4569
|
+
const labelContent = /* @__PURE__ */ import_react33.default.createElement(
|
|
4570
|
+
"span",
|
|
4571
|
+
{
|
|
4572
|
+
ref: labelContentRef,
|
|
4573
|
+
style: {
|
|
4574
|
+
textOverflow: "ellipsis",
|
|
4575
|
+
overflow: "hidden",
|
|
4576
|
+
whiteSpace: "nowrap",
|
|
4577
|
+
display: "block",
|
|
4578
|
+
position: "relative",
|
|
4579
|
+
zIndex: 1,
|
|
4580
|
+
cursor: "pointer"
|
|
4581
|
+
}
|
|
4582
|
+
},
|
|
4583
|
+
label
|
|
4584
|
+
);
|
|
4585
|
+
(0, import_react33.useEffect)(() => {
|
|
4586
|
+
const element = labelContentRef.current;
|
|
4587
|
+
if (element) {
|
|
4588
|
+
setIsOverflowing(element.scrollWidth > element.clientWidth);
|
|
4589
|
+
}
|
|
4590
|
+
}, [label]);
|
|
4591
|
+
if (isOverflowing) {
|
|
4592
|
+
return /* @__PURE__ */ import_react33.default.createElement(Tooltip_default, { variant: "solid", size, title: label, placement: "bottom-start" }, labelContent);
|
|
4593
|
+
}
|
|
4594
|
+
return labelContent;
|
|
4595
|
+
}
|
|
4482
4596
|
function FilterableCheckboxGroup(props) {
|
|
4483
|
-
const {
|
|
4597
|
+
const {
|
|
4598
|
+
value,
|
|
4599
|
+
options,
|
|
4600
|
+
label,
|
|
4601
|
+
placeholder,
|
|
4602
|
+
helperText,
|
|
4603
|
+
size = "md",
|
|
4604
|
+
required,
|
|
4605
|
+
onChange,
|
|
4606
|
+
maxHeight = 300,
|
|
4607
|
+
disabled
|
|
4608
|
+
} = props;
|
|
4484
4609
|
const [searchTerm, setSearchTerm] = (0, import_react33.useState)("");
|
|
4485
4610
|
const [sortedOptions, setSortedOptions] = (0, import_react33.useState)(options);
|
|
4486
4611
|
const [internalValue, setInternalValue] = useControlledState(
|
|
@@ -4558,37 +4683,47 @@ function FilterableCheckboxGroup(props) {
|
|
|
4558
4683
|
const handleSelectAll = (0, import_react33.useCallback)(
|
|
4559
4684
|
(event) => {
|
|
4560
4685
|
const checked = event.target.checked;
|
|
4686
|
+
const enabledOptions = filteredOptions.filter((option) => !option.disabled);
|
|
4687
|
+
const disabledSelectedValues = internalValue.filter(
|
|
4688
|
+
(v) => filteredOptions.some((opt) => opt.value === v && opt.disabled)
|
|
4689
|
+
);
|
|
4561
4690
|
if (checked) {
|
|
4562
|
-
|
|
4691
|
+
const enabledValues = enabledOptions.map((option) => option.value);
|
|
4692
|
+
setInternalValue([...disabledSelectedValues, ...enabledValues]);
|
|
4563
4693
|
} else {
|
|
4564
|
-
setInternalValue(
|
|
4694
|
+
setInternalValue(disabledSelectedValues);
|
|
4565
4695
|
}
|
|
4566
4696
|
},
|
|
4567
|
-
[filteredOptions, setInternalValue]
|
|
4697
|
+
[filteredOptions, internalValue, setInternalValue]
|
|
4568
4698
|
);
|
|
4569
|
-
const
|
|
4570
|
-
const
|
|
4571
|
-
|
|
4572
|
-
|
|
4699
|
+
const enabledFilteredOptions = (0, import_react33.useMemo)(() => filteredOptions.filter((option) => !option.disabled), [filteredOptions]);
|
|
4700
|
+
const isAllSelected = enabledFilteredOptions.length > 0 && enabledFilteredOptions.every((option) => internalValue.includes(option.value));
|
|
4701
|
+
const isIndeterminate = !isAllSelected && enabledFilteredOptions.some((option) => internalValue.includes(option.value));
|
|
4702
|
+
return /* @__PURE__ */ import_react33.default.createElement("div", { style: { width: "100%" } }, /* @__PURE__ */ import_react33.default.createElement(
|
|
4703
|
+
Input_default,
|
|
4573
4704
|
{
|
|
4705
|
+
label,
|
|
4706
|
+
helperText,
|
|
4707
|
+
required,
|
|
4574
4708
|
variant: "outlined",
|
|
4575
4709
|
color: "neutral",
|
|
4576
4710
|
placeholder,
|
|
4577
4711
|
value: searchTerm,
|
|
4578
4712
|
onChange: handleSearchChange,
|
|
4579
4713
|
size,
|
|
4714
|
+
disabled,
|
|
4580
4715
|
endDecorator: /* @__PURE__ */ import_react33.default.createElement(import_Search.default, null)
|
|
4581
4716
|
}
|
|
4582
|
-
),
|
|
4583
|
-
|
|
4717
|
+
), filteredOptions.length === 0 ? /* @__PURE__ */ import_react33.default.createElement(
|
|
4718
|
+
Stack_default,
|
|
4584
4719
|
{
|
|
4585
|
-
sx: {
|
|
4720
|
+
sx: (theme) => ({
|
|
4586
4721
|
padding: "20px 12px",
|
|
4587
4722
|
justifyContent: "center",
|
|
4588
4723
|
alignItems: "center",
|
|
4589
4724
|
fontSize: noOptionsFontSize,
|
|
4590
|
-
color:
|
|
4591
|
-
}
|
|
4725
|
+
color: theme.palette.neutral.softDisabledColor
|
|
4726
|
+
})
|
|
4592
4727
|
},
|
|
4593
4728
|
"No options found."
|
|
4594
4729
|
) : /* @__PURE__ */ import_react33.default.createElement(
|
|
@@ -4610,6 +4745,7 @@ function FilterableCheckboxGroup(props) {
|
|
|
4610
4745
|
indeterminate: isIndeterminate,
|
|
4611
4746
|
onChange: handleSelectAll,
|
|
4612
4747
|
size,
|
|
4748
|
+
disabled,
|
|
4613
4749
|
slotProps: {
|
|
4614
4750
|
action: {
|
|
4615
4751
|
sx: { top: 0, left: 0, bottom: 0, right: 0 }
|
|
@@ -4619,7 +4755,7 @@ function FilterableCheckboxGroup(props) {
|
|
|
4619
4755
|
}
|
|
4620
4756
|
),
|
|
4621
4757
|
/* @__PURE__ */ import_react33.default.createElement(
|
|
4622
|
-
|
|
4758
|
+
Stack_default,
|
|
4623
4759
|
{
|
|
4624
4760
|
sx: {
|
|
4625
4761
|
height: `${virtualizer.getTotalSize()}px`,
|
|
@@ -4632,13 +4768,15 @@ function FilterableCheckboxGroup(props) {
|
|
|
4632
4768
|
Checkbox_default,
|
|
4633
4769
|
{
|
|
4634
4770
|
key: virtualRow.key,
|
|
4635
|
-
label: option.label,
|
|
4771
|
+
label: /* @__PURE__ */ import_react33.default.createElement(LabelWithTooltip, { label: option.label, size }),
|
|
4636
4772
|
checked: internalValue.includes(option.value),
|
|
4637
4773
|
onChange: handleCheckboxChange(option.value),
|
|
4638
4774
|
size,
|
|
4775
|
+
disabled: disabled || option.disabled,
|
|
4639
4776
|
slotProps: {
|
|
4640
4777
|
action: {
|
|
4641
4778
|
sx: { top: 0, left: 0, bottom: 0, right: 0 }
|
|
4779
|
+
// NOTE: 불필요한 좌우 스크롤 방지
|
|
4642
4780
|
}
|
|
4643
4781
|
},
|
|
4644
4782
|
sx: {
|
|
@@ -4658,12 +4796,12 @@ function FilterableCheckboxGroup(props) {
|
|
|
4658
4796
|
FilterableCheckboxGroup.displayName = "FilterableCheckboxGroup";
|
|
4659
4797
|
|
|
4660
4798
|
// src/components/FilterMenu/FilterMenu.tsx
|
|
4661
|
-
var
|
|
4799
|
+
var import_react44 = __toESM(require("react"));
|
|
4662
4800
|
var import_joy54 = require("@mui/joy");
|
|
4663
4801
|
|
|
4664
4802
|
// src/components/FilterMenu/components/CheckboxGroup.tsx
|
|
4665
4803
|
var import_react34 = __toESM(require("react"));
|
|
4666
|
-
var
|
|
4804
|
+
var import_joy43 = require("@mui/joy");
|
|
4667
4805
|
function CheckboxGroup(props) {
|
|
4668
4806
|
const { id, label, options, value, onChange, hidden } = props;
|
|
4669
4807
|
const [internalValue, setInternalValue] = useControlledState(value, [], onChange);
|
|
@@ -4683,7 +4821,7 @@ function CheckboxGroup(props) {
|
|
|
4683
4821
|
if (hidden) {
|
|
4684
4822
|
return null;
|
|
4685
4823
|
}
|
|
4686
|
-
return /* @__PURE__ */ import_react34.default.createElement(
|
|
4824
|
+
return /* @__PURE__ */ import_react34.default.createElement(import_joy43.Stack, { spacing: 3, role: "group", "aria-labelledby": id }, !!label && /* @__PURE__ */ import_react34.default.createElement(Typography_default, { id, level: "title-sm", component: "label", textColor: "text.tertiary" }, label), options.map((option) => /* @__PURE__ */ import_react34.default.createElement(
|
|
4687
4825
|
Checkbox_default,
|
|
4688
4826
|
{
|
|
4689
4827
|
key: `${id}-${option.value}`,
|
|
@@ -4695,8 +4833,37 @@ function CheckboxGroup(props) {
|
|
|
4695
4833
|
}
|
|
4696
4834
|
CheckboxGroup.displayName = "CheckboxGroup";
|
|
4697
4835
|
|
|
4698
|
-
// src/components/FilterMenu/components/
|
|
4836
|
+
// src/components/FilterMenu/components/FilterableCheckboxGroup.tsx
|
|
4699
4837
|
var import_react35 = __toESM(require("react"));
|
|
4838
|
+
var import_joy44 = require("@mui/joy");
|
|
4839
|
+
function FilterableCheckboxGroup2(props) {
|
|
4840
|
+
const { id, label, options, value, onChange, hidden, placeholder, maxHeight } = props;
|
|
4841
|
+
const [internalValue, setInternalValue] = useControlledState(value, [], onChange);
|
|
4842
|
+
const handleChange = (0, import_react35.useCallback)(
|
|
4843
|
+
(newValue) => {
|
|
4844
|
+
setInternalValue(newValue);
|
|
4845
|
+
},
|
|
4846
|
+
[setInternalValue]
|
|
4847
|
+
);
|
|
4848
|
+
if (hidden) {
|
|
4849
|
+
return null;
|
|
4850
|
+
}
|
|
4851
|
+
return /* @__PURE__ */ import_react35.default.createElement(import_joy44.Stack, { spacing: 3, role: "group", "aria-labelledby": id }, !!label && /* @__PURE__ */ import_react35.default.createElement(Typography_default, { id, level: "title-sm", component: "label", textColor: "text.tertiary" }, label), /* @__PURE__ */ import_react35.default.createElement(
|
|
4852
|
+
FilterableCheckboxGroup,
|
|
4853
|
+
{
|
|
4854
|
+
value: internalValue ?? [],
|
|
4855
|
+
onChange: handleChange,
|
|
4856
|
+
options,
|
|
4857
|
+
placeholder,
|
|
4858
|
+
maxHeight,
|
|
4859
|
+
size: "sm"
|
|
4860
|
+
}
|
|
4861
|
+
));
|
|
4862
|
+
}
|
|
4863
|
+
FilterableCheckboxGroup2.displayName = "FilterableCheckboxGroup";
|
|
4864
|
+
|
|
4865
|
+
// src/components/FilterMenu/components/RadioGroup.tsx
|
|
4866
|
+
var import_react36 = __toESM(require("react"));
|
|
4700
4867
|
|
|
4701
4868
|
// src/components/Radio/Radio.tsx
|
|
4702
4869
|
var import_joy45 = require("@mui/joy");
|
|
@@ -4713,7 +4880,7 @@ var import_joy46 = require("@mui/joy");
|
|
|
4713
4880
|
function RadioGroup2(props) {
|
|
4714
4881
|
const { id, label, options, value, onChange, hidden } = props;
|
|
4715
4882
|
const [internalValue, setInternalValue] = useControlledState(value, value ?? "", onChange);
|
|
4716
|
-
const handleRadioChange = (0,
|
|
4883
|
+
const handleRadioChange = (0, import_react36.useCallback)(
|
|
4717
4884
|
(event) => {
|
|
4718
4885
|
const newValue = event.target.value;
|
|
4719
4886
|
const option = options.find((opt) => opt.value.toString() === newValue);
|
|
@@ -4725,12 +4892,12 @@ function RadioGroup2(props) {
|
|
|
4725
4892
|
if (hidden) {
|
|
4726
4893
|
return null;
|
|
4727
4894
|
}
|
|
4728
|
-
return /* @__PURE__ */
|
|
4895
|
+
return /* @__PURE__ */ import_react36.default.createElement(import_joy46.Stack, { spacing: 3, role: "group", "aria-labelledby": id }, !!label && /* @__PURE__ */ import_react36.default.createElement(import_joy46.Stack, { spacing: 1 }, /* @__PURE__ */ import_react36.default.createElement(Typography_default, { id, level: "title-sm", component: "label", textColor: "text.tertiary" }, label)), /* @__PURE__ */ import_react36.default.createElement(RadioGroup, { name: id, value: internalValue?.toString(), onChange: handleRadioChange }, options.map((option) => /* @__PURE__ */ import_react36.default.createElement(Radio, { key: `${id}-${option.value}`, value: option.value.toString(), label: option.label }))));
|
|
4729
4896
|
}
|
|
4730
4897
|
RadioGroup2.displayName = "RadioGroup";
|
|
4731
4898
|
|
|
4732
4899
|
// src/components/FilterMenu/components/DateRange.tsx
|
|
4733
|
-
var
|
|
4900
|
+
var import_react37 = __toESM(require("react"));
|
|
4734
4901
|
var import_joy47 = require("@mui/joy");
|
|
4735
4902
|
function DateRange(props) {
|
|
4736
4903
|
const {
|
|
@@ -4743,14 +4910,13 @@ function DateRange(props) {
|
|
|
4743
4910
|
maxDate,
|
|
4744
4911
|
disableFuture,
|
|
4745
4912
|
disablePast,
|
|
4746
|
-
format = "YYYY/MM/DD",
|
|
4747
4913
|
displayFormat,
|
|
4748
4914
|
inputReadOnly,
|
|
4749
4915
|
hideClearButton
|
|
4750
4916
|
} = props;
|
|
4751
4917
|
const [internalValue, setInternalValue] = useControlledState(value, null, onChange);
|
|
4752
|
-
const [selectedOption, setSelectedOption] = (0,
|
|
4753
|
-
const dateRangeOptions = (0,
|
|
4918
|
+
const [selectedOption, setSelectedOption] = (0, import_react37.useState)("all-time");
|
|
4919
|
+
const dateRangeOptions = (0, import_react37.useMemo)(
|
|
4754
4920
|
() => [
|
|
4755
4921
|
{ label: "All Time", value: "all-time" },
|
|
4756
4922
|
{ label: "This Month", value: "this-month" },
|
|
@@ -4760,7 +4926,7 @@ function DateRange(props) {
|
|
|
4760
4926
|
],
|
|
4761
4927
|
[]
|
|
4762
4928
|
);
|
|
4763
|
-
const getDateRangeForOption = (0,
|
|
4929
|
+
const getDateRangeForOption = (0, import_react37.useCallback)(
|
|
4764
4930
|
(option) => {
|
|
4765
4931
|
const now = /* @__PURE__ */ new Date();
|
|
4766
4932
|
const currentYear = now.getFullYear();
|
|
@@ -4799,7 +4965,7 @@ function DateRange(props) {
|
|
|
4799
4965
|
},
|
|
4800
4966
|
[internalValue]
|
|
4801
4967
|
);
|
|
4802
|
-
const determineOptionFromValue = (0,
|
|
4968
|
+
const determineOptionFromValue = (0, import_react37.useCallback)(
|
|
4803
4969
|
(value2) => {
|
|
4804
4970
|
if (!value2) {
|
|
4805
4971
|
return "all-time";
|
|
@@ -4815,17 +4981,17 @@ function DateRange(props) {
|
|
|
4815
4981
|
},
|
|
4816
4982
|
[getDateRangeForOption]
|
|
4817
4983
|
);
|
|
4818
|
-
const customDateRangeValue = (0,
|
|
4984
|
+
const customDateRangeValue = (0, import_react37.useMemo)(() => {
|
|
4819
4985
|
if (selectedOption === "custom" && internalValue) {
|
|
4820
4986
|
return `${internalValue[0]} - ${internalValue[1]}`;
|
|
4821
4987
|
}
|
|
4822
4988
|
return "";
|
|
4823
4989
|
}, [selectedOption, internalValue]);
|
|
4824
|
-
(0,
|
|
4990
|
+
(0, import_react37.useEffect)(() => {
|
|
4825
4991
|
const newOption = determineOptionFromValue(internalValue);
|
|
4826
4992
|
setSelectedOption(newOption);
|
|
4827
4993
|
}, [internalValue, determineOptionFromValue]);
|
|
4828
|
-
const handleOptionChange = (0,
|
|
4994
|
+
const handleOptionChange = (0, import_react37.useCallback)(
|
|
4829
4995
|
(event) => {
|
|
4830
4996
|
const newOption = event.target.value;
|
|
4831
4997
|
setSelectedOption(newOption);
|
|
@@ -4834,25 +5000,28 @@ function DateRange(props) {
|
|
|
4834
5000
|
},
|
|
4835
5001
|
[getDateRangeForOption, setInternalValue]
|
|
4836
5002
|
);
|
|
4837
|
-
const handleCustomDateChange = (0,
|
|
5003
|
+
const handleCustomDateChange = (0, import_react37.useCallback)(
|
|
4838
5004
|
(event) => {
|
|
4839
5005
|
const dateRangeString = event.target.value;
|
|
4840
5006
|
if (dateRangeString && dateRangeString.includes(" - ")) {
|
|
4841
5007
|
const [startDate, endDate] = dateRangeString.split(" - ");
|
|
4842
5008
|
if (startDate && endDate) {
|
|
4843
5009
|
const newValue = [startDate, endDate];
|
|
4844
|
-
|
|
5010
|
+
const hasChanged = !internalValue || internalValue[0] !== startDate || internalValue[1] !== endDate;
|
|
5011
|
+
if (hasChanged) {
|
|
5012
|
+
setInternalValue(newValue);
|
|
5013
|
+
}
|
|
4845
5014
|
}
|
|
4846
5015
|
} else if (!dateRangeString) {
|
|
4847
5016
|
setInternalValue(null);
|
|
4848
5017
|
}
|
|
4849
5018
|
},
|
|
4850
|
-
[setInternalValue]
|
|
5019
|
+
[setInternalValue, internalValue]
|
|
4851
5020
|
);
|
|
4852
5021
|
if (hidden) {
|
|
4853
5022
|
return null;
|
|
4854
5023
|
}
|
|
4855
|
-
return /* @__PURE__ */
|
|
5024
|
+
return /* @__PURE__ */ import_react37.default.createElement(import_joy47.Stack, { spacing: 3, role: "group", "aria-labelledby": id }, !!label && /* @__PURE__ */ import_react37.default.createElement(Typography_default, { id, level: "title-sm", component: "label", textColor: "text.tertiary" }, label), /* @__PURE__ */ import_react37.default.createElement(RadioGroup, { name: `${id}-options`, value: selectedOption, onChange: handleOptionChange }, dateRangeOptions.map((option) => /* @__PURE__ */ import_react37.default.createElement(Radio, { key: `${id}-${option.value}`, value: option.value, label: option.label }))), selectedOption === "custom" && /* @__PURE__ */ import_react37.default.createElement(
|
|
4856
5025
|
DateRangePicker,
|
|
4857
5026
|
{
|
|
4858
5027
|
value: customDateRangeValue,
|
|
@@ -4861,7 +5030,7 @@ function DateRange(props) {
|
|
|
4861
5030
|
maxDate,
|
|
4862
5031
|
disableFuture,
|
|
4863
5032
|
disablePast,
|
|
4864
|
-
format,
|
|
5033
|
+
format: "YYYY-MM-DD",
|
|
4865
5034
|
displayFormat,
|
|
4866
5035
|
inputReadOnly,
|
|
4867
5036
|
hideClearButton
|
|
@@ -4871,12 +5040,12 @@ function DateRange(props) {
|
|
|
4871
5040
|
DateRange.displayName = "DateRange";
|
|
4872
5041
|
|
|
4873
5042
|
// src/components/FilterMenu/components/CurrencyInput.tsx
|
|
4874
|
-
var
|
|
5043
|
+
var import_react38 = __toESM(require("react"));
|
|
4875
5044
|
var import_joy48 = require("@mui/joy");
|
|
4876
5045
|
function CurrencyInput3(props) {
|
|
4877
5046
|
const { id, label, value, onChange, hidden, max, placeholder, useMinorUnit, currency = "USD" } = props;
|
|
4878
5047
|
const [internalValue, setInternalValue] = useControlledState(value, value, onChange);
|
|
4879
|
-
const handleCurrencyChange = (0,
|
|
5048
|
+
const handleCurrencyChange = (0, import_react38.useCallback)(
|
|
4880
5049
|
(event) => {
|
|
4881
5050
|
const newValue = event.target.value;
|
|
4882
5051
|
setInternalValue(newValue);
|
|
@@ -4886,7 +5055,7 @@ function CurrencyInput3(props) {
|
|
|
4886
5055
|
if (hidden) {
|
|
4887
5056
|
return null;
|
|
4888
5057
|
}
|
|
4889
|
-
return /* @__PURE__ */
|
|
5058
|
+
return /* @__PURE__ */ import_react38.default.createElement(import_joy48.Stack, { spacing: 3, role: "group", "aria-labelledby": id }, !!label && /* @__PURE__ */ import_react38.default.createElement(Typography_default, { id, level: "title-sm", component: "label", textColor: "text.tertiary" }, label), /* @__PURE__ */ import_react38.default.createElement(
|
|
4890
5059
|
CurrencyInput,
|
|
4891
5060
|
{
|
|
4892
5061
|
value: internalValue,
|
|
@@ -4902,14 +5071,14 @@ function CurrencyInput3(props) {
|
|
|
4902
5071
|
CurrencyInput3.displayName = "CurrencyInput";
|
|
4903
5072
|
|
|
4904
5073
|
// src/components/FilterMenu/components/CurrencyRange.tsx
|
|
4905
|
-
var
|
|
5074
|
+
var import_react39 = __toESM(require("react"));
|
|
4906
5075
|
var import_joy49 = require("@mui/joy");
|
|
4907
5076
|
function CurrencyRange(props) {
|
|
4908
5077
|
const { id, label, value, onChange, hidden, max, placeholder, useMinorUnit, currency = "USD" } = props;
|
|
4909
5078
|
const [internalValue, setInternalValue] = useControlledState(value, null, onChange);
|
|
4910
5079
|
const minValue = internalValue?.[0];
|
|
4911
5080
|
const maxValue = internalValue?.[1];
|
|
4912
|
-
const handleMinChange = (0,
|
|
5081
|
+
const handleMinChange = (0, import_react39.useCallback)(
|
|
4913
5082
|
(event) => {
|
|
4914
5083
|
const newMinValue = event.target.value;
|
|
4915
5084
|
const currentMaxValue = maxValue;
|
|
@@ -4923,7 +5092,7 @@ function CurrencyRange(props) {
|
|
|
4923
5092
|
},
|
|
4924
5093
|
[maxValue, setInternalValue]
|
|
4925
5094
|
);
|
|
4926
|
-
const handleMaxChange = (0,
|
|
5095
|
+
const handleMaxChange = (0, import_react39.useCallback)(
|
|
4927
5096
|
(event) => {
|
|
4928
5097
|
const newMaxValue = event.target.value;
|
|
4929
5098
|
const currentMinValue = minValue;
|
|
@@ -4940,7 +5109,7 @@ function CurrencyRange(props) {
|
|
|
4940
5109
|
if (hidden) {
|
|
4941
5110
|
return null;
|
|
4942
5111
|
}
|
|
4943
|
-
return /* @__PURE__ */
|
|
5112
|
+
return /* @__PURE__ */ import_react39.default.createElement(import_joy49.Stack, { spacing: 3, role: "group", "aria-labelledby": id }, !!label && /* @__PURE__ */ import_react39.default.createElement(Typography_default, { id, level: "title-sm", component: "label", textColor: "text.tertiary" }, label), /* @__PURE__ */ import_react39.default.createElement(import_joy49.Stack, { direction: "row", spacing: 2, alignItems: "flex-end" }, /* @__PURE__ */ import_react39.default.createElement(
|
|
4944
5113
|
CurrencyInput,
|
|
4945
5114
|
{
|
|
4946
5115
|
label: "Minimum",
|
|
@@ -4953,7 +5122,7 @@ function CurrencyRange(props) {
|
|
|
4953
5122
|
"aria-labelledby": label ? id : void 0,
|
|
4954
5123
|
"aria-label": "Minimum amount"
|
|
4955
5124
|
}
|
|
4956
|
-
), /* @__PURE__ */
|
|
5125
|
+
), /* @__PURE__ */ import_react39.default.createElement(
|
|
4957
5126
|
CurrencyInput,
|
|
4958
5127
|
{
|
|
4959
5128
|
label: "Maximum",
|
|
@@ -4971,20 +5140,20 @@ function CurrencyRange(props) {
|
|
|
4971
5140
|
CurrencyRange.displayName = "CurrencyRange";
|
|
4972
5141
|
|
|
4973
5142
|
// src/components/FilterMenu/components/PercentageInput.tsx
|
|
4974
|
-
var
|
|
5143
|
+
var import_react41 = __toESM(require("react"));
|
|
4975
5144
|
var import_joy51 = require("@mui/joy");
|
|
4976
5145
|
|
|
4977
5146
|
// src/components/PercentageInput/PercentageInput.tsx
|
|
4978
|
-
var
|
|
5147
|
+
var import_react40 = __toESM(require("react"));
|
|
4979
5148
|
var import_react_number_format2 = require("react-number-format");
|
|
4980
5149
|
var import_joy50 = require("@mui/joy");
|
|
4981
5150
|
var padDecimal = (value, decimalScale) => {
|
|
4982
5151
|
const [integer, decimal = ""] = `${value}`.split(".");
|
|
4983
5152
|
return Number(`${integer}${decimal.padEnd(decimalScale, "0")}`);
|
|
4984
5153
|
};
|
|
4985
|
-
var TextMaskAdapter7 =
|
|
5154
|
+
var TextMaskAdapter7 = import_react40.default.forwardRef(function TextMaskAdapter8(props, ref) {
|
|
4986
5155
|
const { onChange, min, max, ...innerProps } = props;
|
|
4987
|
-
return /* @__PURE__ */
|
|
5156
|
+
return /* @__PURE__ */ import_react40.default.createElement(
|
|
4988
5157
|
import_react_number_format2.NumericFormat,
|
|
4989
5158
|
{
|
|
4990
5159
|
...innerProps,
|
|
@@ -5009,7 +5178,7 @@ var PercentageInputRoot = (0, import_joy50.styled)(Input_default, {
|
|
|
5009
5178
|
slot: "Root",
|
|
5010
5179
|
overridesResolver: (props, styles) => styles.root
|
|
5011
5180
|
})({});
|
|
5012
|
-
var PercentageInput =
|
|
5181
|
+
var PercentageInput = import_react40.default.forwardRef(
|
|
5013
5182
|
function PercentageInput2(inProps, ref) {
|
|
5014
5183
|
const props = (0, import_joy50.useThemeProps)({ props: inProps, name: "PercentageInput" });
|
|
5015
5184
|
const {
|
|
@@ -5032,18 +5201,18 @@ var PercentageInput = import_react39.default.forwardRef(
|
|
|
5032
5201
|
const [_value, setValue] = useControlledState(
|
|
5033
5202
|
props.value,
|
|
5034
5203
|
props.defaultValue,
|
|
5035
|
-
(0,
|
|
5204
|
+
(0, import_react40.useCallback)((value2) => onChange?.({ target: { name, value: value2 } }), [onChange, name])
|
|
5036
5205
|
);
|
|
5037
|
-
const [internalError, setInternalError] = (0,
|
|
5206
|
+
const [internalError, setInternalError] = (0, import_react40.useState)(
|
|
5038
5207
|
max && _value && _value > max || min && _value && _value < min
|
|
5039
5208
|
);
|
|
5040
|
-
const value = (0,
|
|
5209
|
+
const value = (0, import_react40.useMemo)(() => {
|
|
5041
5210
|
if (_value && useMinorUnit) {
|
|
5042
5211
|
return _value / Math.pow(10, maxDecimalScale);
|
|
5043
5212
|
}
|
|
5044
5213
|
return _value;
|
|
5045
5214
|
}, [_value, useMinorUnit, maxDecimalScale]);
|
|
5046
|
-
const handleChange = (0,
|
|
5215
|
+
const handleChange = (0, import_react40.useCallback)(
|
|
5047
5216
|
(event) => {
|
|
5048
5217
|
if (event.target.value === "") {
|
|
5049
5218
|
setValue(void 0);
|
|
@@ -5060,7 +5229,7 @@ var PercentageInput = import_react39.default.forwardRef(
|
|
|
5060
5229
|
},
|
|
5061
5230
|
[setValue, useMinorUnit, maxDecimalScale, min, max]
|
|
5062
5231
|
);
|
|
5063
|
-
return /* @__PURE__ */
|
|
5232
|
+
return /* @__PURE__ */ import_react40.default.createElement(
|
|
5064
5233
|
PercentageInputRoot,
|
|
5065
5234
|
{
|
|
5066
5235
|
...innerProps,
|
|
@@ -5107,7 +5276,7 @@ var PercentageInput3 = ({
|
|
|
5107
5276
|
if (hidden) {
|
|
5108
5277
|
return null;
|
|
5109
5278
|
}
|
|
5110
|
-
return /* @__PURE__ */
|
|
5279
|
+
return /* @__PURE__ */ import_react41.default.createElement(import_joy51.Stack, { spacing: 3, role: "group", "aria-labelledby": id }, !!label && /* @__PURE__ */ import_react41.default.createElement(import_joy51.Typography, { id, level: "title-sm", component: "label", textColor: "text.tertiary" }, label), /* @__PURE__ */ import_react41.default.createElement(
|
|
5111
5280
|
PercentageInput,
|
|
5112
5281
|
{
|
|
5113
5282
|
value: _value,
|
|
@@ -5122,7 +5291,7 @@ var PercentageInput3 = ({
|
|
|
5122
5291
|
};
|
|
5123
5292
|
|
|
5124
5293
|
// src/components/FilterMenu/components/PercentageRange.tsx
|
|
5125
|
-
var
|
|
5294
|
+
var import_react42 = __toESM(require("react"));
|
|
5126
5295
|
var import_joy52 = require("@mui/joy");
|
|
5127
5296
|
function PercentageRange(props) {
|
|
5128
5297
|
const { id, label, value, onChange, hidden, useMinorUnit, maxDecimalScale, min, max } = props;
|
|
@@ -5133,7 +5302,7 @@ function PercentageRange(props) {
|
|
|
5133
5302
|
);
|
|
5134
5303
|
const minValue = internalValue?.[0];
|
|
5135
5304
|
const maxValue = internalValue?.[1];
|
|
5136
|
-
const handleMinChange = (0,
|
|
5305
|
+
const handleMinChange = (0, import_react42.useCallback)(
|
|
5137
5306
|
(event) => {
|
|
5138
5307
|
const newMinValue = event.target.value;
|
|
5139
5308
|
const currentMaxValue = maxValue;
|
|
@@ -5145,7 +5314,7 @@ function PercentageRange(props) {
|
|
|
5145
5314
|
},
|
|
5146
5315
|
[maxValue, setInternalValue]
|
|
5147
5316
|
);
|
|
5148
|
-
const handleMaxChange = (0,
|
|
5317
|
+
const handleMaxChange = (0, import_react42.useCallback)(
|
|
5149
5318
|
(event) => {
|
|
5150
5319
|
const newMaxValue = event.target.value;
|
|
5151
5320
|
const currentMinValue = minValue;
|
|
@@ -5160,7 +5329,7 @@ function PercentageRange(props) {
|
|
|
5160
5329
|
if (hidden) {
|
|
5161
5330
|
return null;
|
|
5162
5331
|
}
|
|
5163
|
-
return /* @__PURE__ */
|
|
5332
|
+
return /* @__PURE__ */ import_react42.default.createElement(import_joy52.Stack, { spacing: 3, role: "group", "aria-labelledby": id }, !!label && /* @__PURE__ */ import_react42.default.createElement(Typography_default, { id, level: "title-sm", component: "label", textColor: "text.tertiary" }, label), /* @__PURE__ */ import_react42.default.createElement(import_joy52.Stack, { direction: "row", spacing: 2, alignItems: "flex-end" }, /* @__PURE__ */ import_react42.default.createElement(
|
|
5164
5333
|
PercentageInput,
|
|
5165
5334
|
{
|
|
5166
5335
|
label: "Minimum",
|
|
@@ -5174,7 +5343,7 @@ function PercentageRange(props) {
|
|
|
5174
5343
|
"aria-label": "Minimum percentage",
|
|
5175
5344
|
placeholder: "0%"
|
|
5176
5345
|
}
|
|
5177
|
-
), /* @__PURE__ */
|
|
5346
|
+
), /* @__PURE__ */ import_react42.default.createElement(
|
|
5178
5347
|
PercentageInput,
|
|
5179
5348
|
{
|
|
5180
5349
|
label: "Maximum",
|
|
@@ -5193,13 +5362,13 @@ function PercentageRange(props) {
|
|
|
5193
5362
|
PercentageRange.displayName = "PercentageRange";
|
|
5194
5363
|
|
|
5195
5364
|
// src/components/FilterMenu/components/Autocomplete.tsx
|
|
5196
|
-
var
|
|
5365
|
+
var import_react43 = __toESM(require("react"));
|
|
5197
5366
|
var import_joy53 = require("@mui/joy");
|
|
5198
5367
|
function Autocomplete2(props) {
|
|
5199
5368
|
const { id, label, value, onChange, options, multiple, hidden, placeholder } = props;
|
|
5200
5369
|
const [internalValue, setInternalValue] = useControlledState(value, void 0, onChange);
|
|
5201
5370
|
const autocompleteValue = typeof internalValue === "string" || typeof internalValue === "number" ? String(internalValue) : void 0;
|
|
5202
|
-
const handleChange = (0,
|
|
5371
|
+
const handleChange = (0, import_react43.useCallback)(
|
|
5203
5372
|
(event) => {
|
|
5204
5373
|
const val = event.target.value;
|
|
5205
5374
|
if (val) {
|
|
@@ -5214,7 +5383,7 @@ function Autocomplete2(props) {
|
|
|
5214
5383
|
if (hidden) {
|
|
5215
5384
|
return null;
|
|
5216
5385
|
}
|
|
5217
|
-
return /* @__PURE__ */
|
|
5386
|
+
return /* @__PURE__ */ import_react43.default.createElement(import_joy53.Stack, { spacing: 3, role: "group", "aria-labelledby": id }, !!label && /* @__PURE__ */ import_react43.default.createElement(Typography_default, { id, level: "title-sm", component: "label", textColor: "text.tertiary" }, label), /* @__PURE__ */ import_react43.default.createElement(
|
|
5218
5387
|
Autocomplete,
|
|
5219
5388
|
{
|
|
5220
5389
|
value: autocompleteValue,
|
|
@@ -5231,6 +5400,7 @@ Autocomplete2.displayName = "Autocomplete";
|
|
|
5231
5400
|
// src/components/FilterMenu/FilterMenu.tsx
|
|
5232
5401
|
var componentMap = {
|
|
5233
5402
|
"checkbox-group": CheckboxGroup,
|
|
5403
|
+
"filterable-checkbox-group": FilterableCheckboxGroup2,
|
|
5234
5404
|
"radio-group": RadioGroup2,
|
|
5235
5405
|
"date-range": DateRange,
|
|
5236
5406
|
"currency-input": CurrencyInput3,
|
|
@@ -5247,7 +5417,7 @@ function FilterMenu(props) {
|
|
|
5247
5417
|
void 0
|
|
5248
5418
|
// onChange는 Apply 버튼에서만 호출
|
|
5249
5419
|
);
|
|
5250
|
-
const handleFilterChange = (0,
|
|
5420
|
+
const handleFilterChange = (0, import_react44.useCallback)(
|
|
5251
5421
|
(filterId, value) => {
|
|
5252
5422
|
setInternalValues((prev) => ({
|
|
5253
5423
|
...prev,
|
|
@@ -5256,17 +5426,17 @@ function FilterMenu(props) {
|
|
|
5256
5426
|
},
|
|
5257
5427
|
[setInternalValues]
|
|
5258
5428
|
);
|
|
5259
|
-
const handleApply = (0,
|
|
5429
|
+
const handleApply = (0, import_react44.useCallback)(() => {
|
|
5260
5430
|
onChange?.(internalValues);
|
|
5261
5431
|
onClose?.();
|
|
5262
5432
|
}, [onChange, onClose, internalValues]);
|
|
5263
|
-
const handleClear = (0,
|
|
5433
|
+
const handleClear = (0, import_react44.useCallback)(() => {
|
|
5264
5434
|
const clearedValues = resetValues || {};
|
|
5265
5435
|
setInternalValues(clearedValues);
|
|
5266
5436
|
onChange?.(clearedValues);
|
|
5267
5437
|
onClose?.();
|
|
5268
5438
|
}, [resetValues, setInternalValues, onChange, onClose]);
|
|
5269
|
-
return /* @__PURE__ */
|
|
5439
|
+
return /* @__PURE__ */ import_react44.default.createElement(
|
|
5270
5440
|
ModalDialog,
|
|
5271
5441
|
{
|
|
5272
5442
|
sx: {
|
|
@@ -5276,9 +5446,9 @@ function FilterMenu(props) {
|
|
|
5276
5446
|
top: "initial"
|
|
5277
5447
|
}
|
|
5278
5448
|
},
|
|
5279
|
-
/* @__PURE__ */
|
|
5449
|
+
/* @__PURE__ */ import_react44.default.createElement(DialogContent, { sx: { paddingTop: 5 } }, /* @__PURE__ */ import_react44.default.createElement(import_joy54.Stack, { spacing: 6 }, filters?.map((filter) => {
|
|
5280
5450
|
const FilterComponent = componentMap[filter.type];
|
|
5281
|
-
return FilterComponent ? /* @__PURE__ */
|
|
5451
|
+
return FilterComponent ? /* @__PURE__ */ import_react44.default.createElement(
|
|
5282
5452
|
FilterComponent,
|
|
5283
5453
|
{
|
|
5284
5454
|
key: filter.id,
|
|
@@ -5290,13 +5460,13 @@ function FilterMenu(props) {
|
|
|
5290
5460
|
}
|
|
5291
5461
|
) : null;
|
|
5292
5462
|
}))),
|
|
5293
|
-
/* @__PURE__ */
|
|
5463
|
+
/* @__PURE__ */ import_react44.default.createElement(DialogActions, { sx: { justifyContent: "space-between" } }, useClear && filters?.length === 1 && /* @__PURE__ */ import_react44.default.createElement(import_joy54.Button, { variant: "plain", color: "neutral", size: "md", onClick: handleClear }, "Clear"), useReset && !useClear && /* @__PURE__ */ import_react44.default.createElement(import_joy54.Button, { variant: "plain", color: "neutral", size: "md", onClick: handleClear }, "Reset"), /* @__PURE__ */ import_react44.default.createElement(import_joy54.Button, { variant: "solid", color: "primary", size: "md", onClick: handleApply }, "Apply"))
|
|
5294
5464
|
);
|
|
5295
5465
|
}
|
|
5296
5466
|
FilterMenu.displayName = "FilterMenu";
|
|
5297
5467
|
|
|
5298
5468
|
// src/components/Uploader/Uploader.tsx
|
|
5299
|
-
var
|
|
5469
|
+
var import_react45 = __toESM(require("react"));
|
|
5300
5470
|
var import_joy55 = require("@mui/joy");
|
|
5301
5471
|
var import_CloudUploadRounded = __toESM(require("@mui/icons-material/CloudUploadRounded"));
|
|
5302
5472
|
var import_UploadFileRounded = __toESM(require("@mui/icons-material/UploadFileRounded"));
|
|
@@ -5373,7 +5543,7 @@ var getFileSize = (n) => {
|
|
|
5373
5543
|
};
|
|
5374
5544
|
var Preview = (props) => {
|
|
5375
5545
|
const { files, uploaded, onDelete } = props;
|
|
5376
|
-
return /* @__PURE__ */
|
|
5546
|
+
return /* @__PURE__ */ import_react45.default.createElement(PreviewRoot, { gap: 1 }, [...uploaded, ...files].map((file) => /* @__PURE__ */ import_react45.default.createElement(UploadCard, { key: file.name, size: "sm", color: "neutral" }, /* @__PURE__ */ import_react45.default.createElement(Stack_default, { direction: "row", alignItems: "center", gap: 2 }, /* @__PURE__ */ import_react45.default.createElement(UploadFileIcon, null), /* @__PURE__ */ import_react45.default.createElement(Stack_default, { flex: "1", sx: { overflow: "hidden" } }, /* @__PURE__ */ import_react45.default.createElement(
|
|
5377
5547
|
Typography_default,
|
|
5378
5548
|
{
|
|
5379
5549
|
level: "body-sm",
|
|
@@ -5385,7 +5555,7 @@ var Preview = (props) => {
|
|
|
5385
5555
|
}
|
|
5386
5556
|
},
|
|
5387
5557
|
file.name
|
|
5388
|
-
), !!file.size && /* @__PURE__ */
|
|
5558
|
+
), !!file.size && /* @__PURE__ */ import_react45.default.createElement(Typography_default, { level: "body-xs", fontWeight: "300", lineHeight: "1.33", textColor: "text.tertiary" }, getFileSize(file.size))), /* @__PURE__ */ import_react45.default.createElement(IconButton_default, { onClick: () => onDelete?.(file) }, /* @__PURE__ */ import_react45.default.createElement(ClearIcon2, null))))));
|
|
5389
5559
|
};
|
|
5390
5560
|
var UploaderRoot = (0, import_joy55.styled)(Stack_default, {
|
|
5391
5561
|
name: "Uploader",
|
|
@@ -5428,7 +5598,7 @@ var UploaderIcon = (0, import_joy55.styled)(import_CloudUploadRounded.default, {
|
|
|
5428
5598
|
}
|
|
5429
5599
|
})
|
|
5430
5600
|
);
|
|
5431
|
-
var Uploader =
|
|
5601
|
+
var Uploader = import_react45.default.memo(
|
|
5432
5602
|
(props) => {
|
|
5433
5603
|
const {
|
|
5434
5604
|
accept,
|
|
@@ -5445,14 +5615,14 @@ var Uploader = import_react44.default.memo(
|
|
|
5445
5615
|
error: errorProp,
|
|
5446
5616
|
helperText: helperTextProp
|
|
5447
5617
|
} = props;
|
|
5448
|
-
const dropZoneRef = (0,
|
|
5449
|
-
const inputRef = (0,
|
|
5450
|
-
const [errorText, setErrorText] = (0,
|
|
5451
|
-
const [files, setFiles] = (0,
|
|
5452
|
-
const [uploaded, setUploaded] = (0,
|
|
5453
|
-
const [previewState, setPreviewState] = (0,
|
|
5454
|
-
const accepts = (0,
|
|
5455
|
-
const parsedAccepts = (0,
|
|
5618
|
+
const dropZoneRef = (0, import_react45.useRef)(null);
|
|
5619
|
+
const inputRef = (0, import_react45.useRef)(null);
|
|
5620
|
+
const [errorText, setErrorText] = (0, import_react45.useState)();
|
|
5621
|
+
const [files, setFiles] = (0, import_react45.useState)([]);
|
|
5622
|
+
const [uploaded, setUploaded] = (0, import_react45.useState)(props.uploaded || []);
|
|
5623
|
+
const [previewState, setPreviewState] = (0, import_react45.useState)("idle");
|
|
5624
|
+
const accepts = (0, import_react45.useMemo)(() => accept.split(",").map((accept2) => accept2.trim()), [accept]);
|
|
5625
|
+
const parsedAccepts = (0, import_react45.useMemo)(
|
|
5456
5626
|
() => accepts.flatMap((type) => {
|
|
5457
5627
|
if (["image/*", "video/*", "audio/*"].includes(type)) {
|
|
5458
5628
|
return ALL_EXTENSIONS_BY_TYPE[type];
|
|
@@ -5461,7 +5631,7 @@ var Uploader = import_react44.default.memo(
|
|
|
5461
5631
|
}),
|
|
5462
5632
|
[accepts]
|
|
5463
5633
|
);
|
|
5464
|
-
const helperText = (0,
|
|
5634
|
+
const helperText = (0, import_react45.useMemo)(() => {
|
|
5465
5635
|
if (helperTextProp) {
|
|
5466
5636
|
return helperTextProp;
|
|
5467
5637
|
}
|
|
@@ -5491,12 +5661,12 @@ var Uploader = import_react44.default.memo(
|
|
|
5491
5661
|
}
|
|
5492
5662
|
return helperTexts.join(", ");
|
|
5493
5663
|
}, [accepts, maxFileTotalSize, maxCount, helperTextProp]);
|
|
5494
|
-
const error = (0,
|
|
5495
|
-
const showDropZone = (0,
|
|
5664
|
+
const error = (0, import_react45.useMemo)(() => !!errorText || errorProp, [errorProp, errorText]);
|
|
5665
|
+
const showDropZone = (0, import_react45.useMemo)(
|
|
5496
5666
|
() => !maxCount || maxCount && [...uploaded, ...files].length !== maxCount,
|
|
5497
5667
|
[files, maxCount, uploaded]
|
|
5498
5668
|
);
|
|
5499
|
-
const addFiles = (0,
|
|
5669
|
+
const addFiles = (0, import_react45.useCallback)(
|
|
5500
5670
|
(uploads) => {
|
|
5501
5671
|
try {
|
|
5502
5672
|
const types = parsedAccepts.map((type) => type.replace(".", "")) || [];
|
|
@@ -5541,7 +5711,7 @@ var Uploader = import_react44.default.memo(
|
|
|
5541
5711
|
},
|
|
5542
5712
|
[files, uploaded, maxCount, parsedAccepts, maxFileSize, maxFileTotalSize, name, onChange]
|
|
5543
5713
|
);
|
|
5544
|
-
(0,
|
|
5714
|
+
(0, import_react45.useEffect)(() => {
|
|
5545
5715
|
if (!dropZoneRef.current || disabled) {
|
|
5546
5716
|
return;
|
|
5547
5717
|
}
|
|
@@ -5579,7 +5749,7 @@ var Uploader = import_react44.default.memo(
|
|
|
5579
5749
|
);
|
|
5580
5750
|
return () => cleanup?.();
|
|
5581
5751
|
}, [disabled, addFiles]);
|
|
5582
|
-
(0,
|
|
5752
|
+
(0, import_react45.useEffect)(() => {
|
|
5583
5753
|
if (inputRef.current && minCount) {
|
|
5584
5754
|
if (files.length < minCount) {
|
|
5585
5755
|
inputRef.current.setCustomValidity(`At least ${minCount} files are required.`);
|
|
@@ -5588,14 +5758,14 @@ var Uploader = import_react44.default.memo(
|
|
|
5588
5758
|
}
|
|
5589
5759
|
}
|
|
5590
5760
|
}, [inputRef, files, minCount]);
|
|
5591
|
-
const handleFileChanged = (0,
|
|
5761
|
+
const handleFileChanged = (0, import_react45.useCallback)(
|
|
5592
5762
|
(event) => {
|
|
5593
5763
|
const files2 = Array.from(event.target.files || []);
|
|
5594
5764
|
addFiles(files2);
|
|
5595
5765
|
},
|
|
5596
5766
|
[addFiles]
|
|
5597
5767
|
);
|
|
5598
|
-
const handleDeleteFile = (0,
|
|
5768
|
+
const handleDeleteFile = (0, import_react45.useCallback)(
|
|
5599
5769
|
(deletedFile) => {
|
|
5600
5770
|
if (deletedFile instanceof File) {
|
|
5601
5771
|
setFiles((current) => {
|
|
@@ -5615,10 +5785,10 @@ var Uploader = import_react44.default.memo(
|
|
|
5615
5785
|
},
|
|
5616
5786
|
[name, onChange, onDelete]
|
|
5617
5787
|
);
|
|
5618
|
-
const handleUploaderButtonClick = (0,
|
|
5788
|
+
const handleUploaderButtonClick = (0, import_react45.useCallback)(() => {
|
|
5619
5789
|
inputRef.current?.click();
|
|
5620
5790
|
}, []);
|
|
5621
|
-
const uploader = /* @__PURE__ */
|
|
5791
|
+
const uploader = /* @__PURE__ */ import_react45.default.createElement(
|
|
5622
5792
|
FileDropZone,
|
|
5623
5793
|
{
|
|
5624
5794
|
state: previewState,
|
|
@@ -5627,8 +5797,8 @@ var Uploader = import_react44.default.memo(
|
|
|
5627
5797
|
ref: dropZoneRef,
|
|
5628
5798
|
onClick: handleUploaderButtonClick
|
|
5629
5799
|
},
|
|
5630
|
-
/* @__PURE__ */
|
|
5631
|
-
/* @__PURE__ */
|
|
5800
|
+
/* @__PURE__ */ import_react45.default.createElement(Stack_default, { alignItems: "center", gap: 1 }, /* @__PURE__ */ import_react45.default.createElement(UploaderIcon, { state: previewState, error: !!(error || errorText), disabled })),
|
|
5801
|
+
/* @__PURE__ */ import_react45.default.createElement(
|
|
5632
5802
|
VisuallyHiddenInput,
|
|
5633
5803
|
{
|
|
5634
5804
|
disabled,
|
|
@@ -5651,7 +5821,7 @@ var Uploader = import_react44.default.memo(
|
|
|
5651
5821
|
}
|
|
5652
5822
|
)
|
|
5653
5823
|
);
|
|
5654
|
-
return /* @__PURE__ */
|
|
5824
|
+
return /* @__PURE__ */ import_react45.default.createElement(UploaderRoot, null, showDropZone && /* @__PURE__ */ import_react45.default.createElement(FormControl_default, { size, error: !!(error || errorText), disabled, required: !!minCount }, label && /* @__PURE__ */ import_react45.default.createElement(FormLabel_default, null, label), uploader, /* @__PURE__ */ import_react45.default.createElement(FormHelperText_default, null, /* @__PURE__ */ import_react45.default.createElement(Stack_default, null, errorText && /* @__PURE__ */ import_react45.default.createElement("div", null, errorText), /* @__PURE__ */ import_react45.default.createElement("div", null, helperText)))), [...uploaded, ...files].length > 0 && /* @__PURE__ */ import_react45.default.createElement(Preview, { files, uploaded, onDelete: handleDeleteFile }));
|
|
5655
5825
|
}
|
|
5656
5826
|
);
|
|
5657
5827
|
Uploader.displayName = "Uploader";
|
|
@@ -5660,7 +5830,7 @@ Uploader.displayName = "Uploader";
|
|
|
5660
5830
|
var import_joy56 = require("@mui/joy");
|
|
5661
5831
|
|
|
5662
5832
|
// src/components/IconMenuButton/IconMenuButton.tsx
|
|
5663
|
-
var
|
|
5833
|
+
var import_react46 = __toESM(require("react"));
|
|
5664
5834
|
var import_joy57 = require("@mui/joy");
|
|
5665
5835
|
function IconMenuButton(props) {
|
|
5666
5836
|
const {
|
|
@@ -5674,7 +5844,7 @@ function IconMenuButton(props) {
|
|
|
5674
5844
|
placement = "bottom"
|
|
5675
5845
|
} = props;
|
|
5676
5846
|
if (!items.length) {
|
|
5677
|
-
return /* @__PURE__ */
|
|
5847
|
+
return /* @__PURE__ */ import_react46.default.createElement(
|
|
5678
5848
|
import_joy57.IconButton,
|
|
5679
5849
|
{
|
|
5680
5850
|
component: props.buttonComponent ?? "button",
|
|
@@ -5688,7 +5858,7 @@ function IconMenuButton(props) {
|
|
|
5688
5858
|
icon
|
|
5689
5859
|
);
|
|
5690
5860
|
}
|
|
5691
|
-
return /* @__PURE__ */
|
|
5861
|
+
return /* @__PURE__ */ import_react46.default.createElement(Dropdown_default, null, /* @__PURE__ */ import_react46.default.createElement(
|
|
5692
5862
|
import_joy57.MenuButton,
|
|
5693
5863
|
{
|
|
5694
5864
|
slots: { root: import_joy57.IconButton },
|
|
@@ -5705,19 +5875,19 @@ function IconMenuButton(props) {
|
|
|
5705
5875
|
}
|
|
5706
5876
|
},
|
|
5707
5877
|
icon
|
|
5708
|
-
), /* @__PURE__ */
|
|
5878
|
+
), /* @__PURE__ */ import_react46.default.createElement(Menu, { placement, size }, items.map((i) => /* @__PURE__ */ import_react46.default.createElement(MenuItem, { key: i.text, component: i.component, ...i.componentProps ?? {} }, i.text))));
|
|
5709
5879
|
}
|
|
5710
5880
|
IconMenuButton.displayName = "IconMenuButton";
|
|
5711
5881
|
|
|
5712
5882
|
// src/components/Markdown/Markdown.tsx
|
|
5713
|
-
var
|
|
5883
|
+
var import_react47 = __toESM(require("react"));
|
|
5714
5884
|
var import_joy58 = require("@mui/joy");
|
|
5715
5885
|
var import_joy59 = require("@mui/joy");
|
|
5716
5886
|
var import_remark_gfm = __toESM(require("remark-gfm"));
|
|
5717
|
-
var LazyReactMarkdown = (0,
|
|
5887
|
+
var LazyReactMarkdown = (0, import_react47.lazy)(() => import("react-markdown"));
|
|
5718
5888
|
var Markdown = (props) => {
|
|
5719
|
-
const [rehypeAccent2, setRehypeAccent] = (0,
|
|
5720
|
-
(0,
|
|
5889
|
+
const [rehypeAccent2, setRehypeAccent] = (0, import_react47.useState)(null);
|
|
5890
|
+
(0, import_react47.useEffect)(() => {
|
|
5721
5891
|
const loadRehypeAccent = async () => {
|
|
5722
5892
|
const module2 = await Promise.resolve().then(() => (init_rehype_accent(), rehype_accent_exports));
|
|
5723
5893
|
setRehypeAccent(() => module2.rehypeAccent);
|
|
@@ -5739,12 +5909,12 @@ var Markdown = (props) => {
|
|
|
5739
5909
|
if (!rehypeAccent2) {
|
|
5740
5910
|
return null;
|
|
5741
5911
|
}
|
|
5742
|
-
return /* @__PURE__ */
|
|
5743
|
-
|
|
5912
|
+
return /* @__PURE__ */ import_react47.default.createElement(Typography, { component: "div", color, textColor, level: defaultLevel, ...innerProps }, /* @__PURE__ */ import_react47.default.createElement(
|
|
5913
|
+
import_react47.Suspense,
|
|
5744
5914
|
{
|
|
5745
|
-
fallback: fallback || /* @__PURE__ */
|
|
5915
|
+
fallback: fallback || /* @__PURE__ */ import_react47.default.createElement(Typography, null, /* @__PURE__ */ import_react47.default.createElement(import_joy58.Skeleton, null, content || ""))
|
|
5746
5916
|
},
|
|
5747
|
-
/* @__PURE__ */
|
|
5917
|
+
/* @__PURE__ */ import_react47.default.createElement(
|
|
5748
5918
|
LazyReactMarkdown,
|
|
5749
5919
|
{
|
|
5750
5920
|
...markdownOptions,
|
|
@@ -5752,15 +5922,15 @@ var Markdown = (props) => {
|
|
|
5752
5922
|
rehypePlugins: [[rehypeAccent2, { accentColor }]],
|
|
5753
5923
|
remarkPlugins: [import_remark_gfm.default],
|
|
5754
5924
|
components: {
|
|
5755
|
-
h1: ({ children }) => /* @__PURE__ */
|
|
5756
|
-
h2: ({ children }) => /* @__PURE__ */
|
|
5757
|
-
h3: ({ children }) => /* @__PURE__ */
|
|
5758
|
-
h4: ({ children }) => /* @__PURE__ */
|
|
5759
|
-
p: ({ children, node }) => /* @__PURE__ */
|
|
5760
|
-
a: ({ children, href }) => /* @__PURE__ */
|
|
5761
|
-
hr: () => /* @__PURE__ */
|
|
5762
|
-
b: ({ children }) => /* @__PURE__ */
|
|
5763
|
-
strong: ({ children }) => /* @__PURE__ */
|
|
5925
|
+
h1: ({ children }) => /* @__PURE__ */ import_react47.default.createElement(Typography, { color, textColor, level: "h1" }, children),
|
|
5926
|
+
h2: ({ children }) => /* @__PURE__ */ import_react47.default.createElement(Typography, { color, textColor, level: "h2" }, children),
|
|
5927
|
+
h3: ({ children }) => /* @__PURE__ */ import_react47.default.createElement(Typography, { color, textColor, level: "h3" }, children),
|
|
5928
|
+
h4: ({ children }) => /* @__PURE__ */ import_react47.default.createElement(Typography, { color, textColor, level: "h4" }, children),
|
|
5929
|
+
p: ({ children, node }) => /* @__PURE__ */ import_react47.default.createElement(Typography, { color, textColor, level: defaultLevel, ...node?.properties }, children),
|
|
5930
|
+
a: ({ children, href }) => /* @__PURE__ */ import_react47.default.createElement(import_joy59.Link, { href, target: defaultLinkAction }, children),
|
|
5931
|
+
hr: () => /* @__PURE__ */ import_react47.default.createElement(Divider, null),
|
|
5932
|
+
b: ({ children }) => /* @__PURE__ */ import_react47.default.createElement(Typography, { fontWeight: boldFontWeight }, children),
|
|
5933
|
+
strong: ({ children }) => /* @__PURE__ */ import_react47.default.createElement(Typography, { fontWeight: boldFontWeight }, children),
|
|
5764
5934
|
...markdownOptions?.components
|
|
5765
5935
|
}
|
|
5766
5936
|
}
|
|
@@ -5770,7 +5940,7 @@ var Markdown = (props) => {
|
|
|
5770
5940
|
Markdown.displayName = "Markdown";
|
|
5771
5941
|
|
|
5772
5942
|
// src/components/MenuButton/MenuButton.tsx
|
|
5773
|
-
var
|
|
5943
|
+
var import_react48 = __toESM(require("react"));
|
|
5774
5944
|
var import_joy60 = require("@mui/joy");
|
|
5775
5945
|
var import_ExpandMore = __toESM(require("@mui/icons-material/ExpandMore"));
|
|
5776
5946
|
function MenuButton(props) {
|
|
@@ -5788,7 +5958,7 @@ function MenuButton(props) {
|
|
|
5788
5958
|
placement = "bottom"
|
|
5789
5959
|
} = props;
|
|
5790
5960
|
if (!items.length) {
|
|
5791
|
-
return /* @__PURE__ */
|
|
5961
|
+
return /* @__PURE__ */ import_react48.default.createElement(
|
|
5792
5962
|
import_joy60.Button,
|
|
5793
5963
|
{
|
|
5794
5964
|
component: props.buttonComponent ?? "button",
|
|
@@ -5799,12 +5969,12 @@ function MenuButton(props) {
|
|
|
5799
5969
|
loading,
|
|
5800
5970
|
startDecorator,
|
|
5801
5971
|
...props.buttonComponentProps ?? {},
|
|
5802
|
-
endDecorator: showIcon ? /* @__PURE__ */
|
|
5972
|
+
endDecorator: showIcon ? /* @__PURE__ */ import_react48.default.createElement(import_react48.default.Fragment, null, endDecorator, /* @__PURE__ */ import_react48.default.createElement(import_ExpandMore.default, null)) : /* @__PURE__ */ import_react48.default.createElement(import_react48.default.Fragment, null, endDecorator)
|
|
5803
5973
|
},
|
|
5804
5974
|
buttonText
|
|
5805
5975
|
);
|
|
5806
5976
|
}
|
|
5807
|
-
return /* @__PURE__ */
|
|
5977
|
+
return /* @__PURE__ */ import_react48.default.createElement(Dropdown_default, null, /* @__PURE__ */ import_react48.default.createElement(
|
|
5808
5978
|
import_joy60.MenuButton,
|
|
5809
5979
|
{
|
|
5810
5980
|
component: props.buttonComponent ?? "button",
|
|
@@ -5815,15 +5985,15 @@ function MenuButton(props) {
|
|
|
5815
5985
|
loading,
|
|
5816
5986
|
startDecorator,
|
|
5817
5987
|
...props.buttonComponentProps ?? {},
|
|
5818
|
-
endDecorator: showIcon ? /* @__PURE__ */
|
|
5988
|
+
endDecorator: showIcon ? /* @__PURE__ */ import_react48.default.createElement(import_react48.default.Fragment, null, endDecorator, /* @__PURE__ */ import_react48.default.createElement(import_ExpandMore.default, null)) : /* @__PURE__ */ import_react48.default.createElement(import_react48.default.Fragment, null, endDecorator)
|
|
5819
5989
|
},
|
|
5820
5990
|
buttonText
|
|
5821
|
-
), /* @__PURE__ */
|
|
5991
|
+
), /* @__PURE__ */ import_react48.default.createElement(Menu, { placement, size }, items.map((i) => /* @__PURE__ */ import_react48.default.createElement(MenuItem, { key: i.text, component: i.component, ...i.componentProps ?? {} }, i.text))));
|
|
5822
5992
|
}
|
|
5823
5993
|
MenuButton.displayName = "MenuButton";
|
|
5824
5994
|
|
|
5825
5995
|
// src/components/MonthPicker/MonthPicker.tsx
|
|
5826
|
-
var
|
|
5996
|
+
var import_react49 = __toESM(require("react"));
|
|
5827
5997
|
var import_CalendarToday3 = __toESM(require("@mui/icons-material/CalendarToday"));
|
|
5828
5998
|
var import_joy61 = require("@mui/joy");
|
|
5829
5999
|
var import_base4 = require("@mui/base");
|
|
@@ -5878,7 +6048,7 @@ function parseDate3(dateString, format) {
|
|
|
5878
6048
|
const result = new Date(year, month, day);
|
|
5879
6049
|
return result;
|
|
5880
6050
|
}
|
|
5881
|
-
var MonthPicker = (0,
|
|
6051
|
+
var MonthPicker = (0, import_react49.forwardRef)((inProps, ref) => {
|
|
5882
6052
|
const props = (0, import_joy61.useThemeProps)({ props: inProps, name: "MonthPicker" });
|
|
5883
6053
|
const {
|
|
5884
6054
|
onChange,
|
|
@@ -5905,14 +6075,14 @@ var MonthPicker = (0, import_react48.forwardRef)((inProps, ref) => {
|
|
|
5905
6075
|
locale,
|
|
5906
6076
|
...innerProps
|
|
5907
6077
|
} = props;
|
|
5908
|
-
const innerRef = (0,
|
|
5909
|
-
const buttonRef = (0,
|
|
6078
|
+
const innerRef = (0, import_react49.useRef)(null);
|
|
6079
|
+
const buttonRef = (0, import_react49.useRef)(null);
|
|
5910
6080
|
const [value, setValue, isControlled] = useControlledState(
|
|
5911
6081
|
props.value,
|
|
5912
6082
|
props.defaultValue || "",
|
|
5913
|
-
(0,
|
|
6083
|
+
(0, import_react49.useCallback)((value2) => onChange?.({ target: { name: props.name, value: value2 } }), [props.name, onChange])
|
|
5914
6084
|
);
|
|
5915
|
-
const getFormattedDisplayValue = (0,
|
|
6085
|
+
const getFormattedDisplayValue = (0, import_react49.useCallback)(
|
|
5916
6086
|
(inputValue) => {
|
|
5917
6087
|
if (!inputValue) return "";
|
|
5918
6088
|
try {
|
|
@@ -5923,19 +6093,19 @@ var MonthPicker = (0, import_react48.forwardRef)((inProps, ref) => {
|
|
|
5923
6093
|
},
|
|
5924
6094
|
[format, displayFormat, locale]
|
|
5925
6095
|
);
|
|
5926
|
-
const [displayValue, setDisplayValue] = (0,
|
|
5927
|
-
const [anchorEl, setAnchorEl] = (0,
|
|
6096
|
+
const [displayValue, setDisplayValue] = (0, import_react49.useState)(() => getFormattedDisplayValue(value));
|
|
6097
|
+
const [anchorEl, setAnchorEl] = (0, import_react49.useState)(null);
|
|
5928
6098
|
const open = Boolean(anchorEl);
|
|
5929
|
-
(0,
|
|
6099
|
+
(0, import_react49.useEffect)(() => {
|
|
5930
6100
|
if (!anchorEl) {
|
|
5931
6101
|
innerRef.current?.blur();
|
|
5932
6102
|
}
|
|
5933
6103
|
}, [anchorEl, innerRef]);
|
|
5934
|
-
(0,
|
|
5935
|
-
(0,
|
|
6104
|
+
(0, import_react49.useImperativeHandle)(ref, () => innerRef.current, [innerRef]);
|
|
6105
|
+
(0, import_react49.useEffect)(() => {
|
|
5936
6106
|
setDisplayValue(getFormattedDisplayValue(value));
|
|
5937
6107
|
}, [value, getFormattedDisplayValue]);
|
|
5938
|
-
const handleChange = (0,
|
|
6108
|
+
const handleChange = (0, import_react49.useCallback)(
|
|
5939
6109
|
(event) => {
|
|
5940
6110
|
const newValue = event.target.value;
|
|
5941
6111
|
setValue(newValue);
|
|
@@ -5945,21 +6115,21 @@ var MonthPicker = (0, import_react48.forwardRef)((inProps, ref) => {
|
|
|
5945
6115
|
},
|
|
5946
6116
|
[setValue, getFormattedDisplayValue, isControlled]
|
|
5947
6117
|
);
|
|
5948
|
-
const handleCalendarToggle = (0,
|
|
6118
|
+
const handleCalendarToggle = (0, import_react49.useCallback)(
|
|
5949
6119
|
(event) => {
|
|
5950
6120
|
setAnchorEl(anchorEl ? null : event.currentTarget);
|
|
5951
6121
|
innerRef.current?.focus();
|
|
5952
6122
|
},
|
|
5953
6123
|
[anchorEl, setAnchorEl, innerRef]
|
|
5954
6124
|
);
|
|
5955
|
-
const handleInputMouseDown = (0,
|
|
6125
|
+
const handleInputMouseDown = (0, import_react49.useCallback)(
|
|
5956
6126
|
(event) => {
|
|
5957
6127
|
event.preventDefault();
|
|
5958
6128
|
buttonRef.current?.focus();
|
|
5959
6129
|
},
|
|
5960
6130
|
[buttonRef]
|
|
5961
6131
|
);
|
|
5962
|
-
return /* @__PURE__ */
|
|
6132
|
+
return /* @__PURE__ */ import_react49.default.createElement(MonthPickerRoot, null, /* @__PURE__ */ import_react49.default.createElement(import_base4.FocusTrap, { open: true }, /* @__PURE__ */ import_react49.default.createElement(import_react49.default.Fragment, null, /* @__PURE__ */ import_react49.default.createElement(
|
|
5963
6133
|
Input_default,
|
|
5964
6134
|
{
|
|
5965
6135
|
...innerProps,
|
|
@@ -5989,7 +6159,7 @@ var MonthPicker = (0, import_react48.forwardRef)((inProps, ref) => {
|
|
|
5989
6159
|
// NOTE: placeholder char 를 텍스트로 표시하므로 동일한 너비를 가지는 mono font 를 사용해야 이질감이 없다.
|
|
5990
6160
|
fontFamily: "monospace"
|
|
5991
6161
|
},
|
|
5992
|
-
endDecorator: /* @__PURE__ */
|
|
6162
|
+
endDecorator: /* @__PURE__ */ import_react49.default.createElement(
|
|
5993
6163
|
IconButton_default,
|
|
5994
6164
|
{
|
|
5995
6165
|
ref: buttonRef,
|
|
@@ -6001,12 +6171,12 @@ var MonthPicker = (0, import_react48.forwardRef)((inProps, ref) => {
|
|
|
6001
6171
|
"aria-expanded": open,
|
|
6002
6172
|
disabled
|
|
6003
6173
|
},
|
|
6004
|
-
/* @__PURE__ */
|
|
6174
|
+
/* @__PURE__ */ import_react49.default.createElement(import_CalendarToday3.default, null)
|
|
6005
6175
|
),
|
|
6006
6176
|
label,
|
|
6007
6177
|
helperText
|
|
6008
6178
|
}
|
|
6009
|
-
), open && /* @__PURE__ */
|
|
6179
|
+
), open && /* @__PURE__ */ import_react49.default.createElement(import_base4.ClickAwayListener, { onClickAway: () => setAnchorEl(null) }, /* @__PURE__ */ import_react49.default.createElement(
|
|
6010
6180
|
StyledPopper3,
|
|
6011
6181
|
{
|
|
6012
6182
|
id: "month-picker-popper",
|
|
@@ -6025,7 +6195,7 @@ var MonthPicker = (0, import_react48.forwardRef)((inProps, ref) => {
|
|
|
6025
6195
|
"aria-label": "Calendar Tooltip",
|
|
6026
6196
|
"aria-expanded": open
|
|
6027
6197
|
},
|
|
6028
|
-
/* @__PURE__ */
|
|
6198
|
+
/* @__PURE__ */ import_react49.default.createElement(CalendarSheet3, { tabIndex: -1, role: "presentation" }, /* @__PURE__ */ import_react49.default.createElement(
|
|
6029
6199
|
Calendar_default,
|
|
6030
6200
|
{
|
|
6031
6201
|
view: "month",
|
|
@@ -6046,14 +6216,14 @@ var MonthPicker = (0, import_react48.forwardRef)((inProps, ref) => {
|
|
|
6046
6216
|
disablePast,
|
|
6047
6217
|
locale
|
|
6048
6218
|
}
|
|
6049
|
-
), /* @__PURE__ */
|
|
6219
|
+
), /* @__PURE__ */ import_react49.default.createElement(
|
|
6050
6220
|
DialogActions_default,
|
|
6051
6221
|
{
|
|
6052
6222
|
sx: {
|
|
6053
6223
|
p: 1
|
|
6054
6224
|
}
|
|
6055
6225
|
},
|
|
6056
|
-
/* @__PURE__ */
|
|
6226
|
+
/* @__PURE__ */ import_react49.default.createElement(
|
|
6057
6227
|
Button_default,
|
|
6058
6228
|
{
|
|
6059
6229
|
size,
|
|
@@ -6076,7 +6246,7 @@ var MonthPicker = (0, import_react48.forwardRef)((inProps, ref) => {
|
|
|
6076
6246
|
});
|
|
6077
6247
|
|
|
6078
6248
|
// src/components/MonthRangePicker/MonthRangePicker.tsx
|
|
6079
|
-
var
|
|
6249
|
+
var import_react50 = __toESM(require("react"));
|
|
6080
6250
|
var import_react_imask3 = require("react-imask");
|
|
6081
6251
|
var import_CalendarToday4 = __toESM(require("@mui/icons-material/CalendarToday"));
|
|
6082
6252
|
var import_joy62 = require("@mui/joy");
|
|
@@ -6134,9 +6304,9 @@ var parseDates2 = (str) => {
|
|
|
6134
6304
|
var formatToPattern3 = (format) => {
|
|
6135
6305
|
return `${format} - ${format}`.replace(/YYYY/g, "Y").replace(/MM/g, "m").replace(/[^YMm\s]/g, (match) => `${match}\``);
|
|
6136
6306
|
};
|
|
6137
|
-
var TextMaskAdapter9 =
|
|
6307
|
+
var TextMaskAdapter9 = import_react50.default.forwardRef(function TextMaskAdapter10(props, ref) {
|
|
6138
6308
|
const { onChange, format, ...other } = props;
|
|
6139
|
-
return /* @__PURE__ */
|
|
6309
|
+
return /* @__PURE__ */ import_react50.default.createElement(
|
|
6140
6310
|
import_react_imask3.IMaskInput,
|
|
6141
6311
|
{
|
|
6142
6312
|
...other,
|
|
@@ -6164,7 +6334,7 @@ var TextMaskAdapter9 = import_react49.default.forwardRef(function TextMaskAdapte
|
|
|
6164
6334
|
}
|
|
6165
6335
|
);
|
|
6166
6336
|
});
|
|
6167
|
-
var MonthRangePicker = (0,
|
|
6337
|
+
var MonthRangePicker = (0, import_react50.forwardRef)((inProps, ref) => {
|
|
6168
6338
|
const props = (0, import_joy62.useThemeProps)({ props: inProps, name: "MonthRangePicker" });
|
|
6169
6339
|
const {
|
|
6170
6340
|
onChange,
|
|
@@ -6184,35 +6354,35 @@ var MonthRangePicker = (0, import_react49.forwardRef)((inProps, ref) => {
|
|
|
6184
6354
|
size,
|
|
6185
6355
|
...innerProps
|
|
6186
6356
|
} = props;
|
|
6187
|
-
const innerRef = (0,
|
|
6357
|
+
const innerRef = (0, import_react50.useRef)(null);
|
|
6188
6358
|
const [value, setValue] = useControlledState(
|
|
6189
6359
|
props.value,
|
|
6190
6360
|
props.defaultValue || "",
|
|
6191
|
-
(0,
|
|
6361
|
+
(0, import_react50.useCallback)((value2) => onChange?.({ target: { name: props.name, value: value2 } }), [props.name, onChange])
|
|
6192
6362
|
);
|
|
6193
|
-
const [anchorEl, setAnchorEl] = (0,
|
|
6363
|
+
const [anchorEl, setAnchorEl] = (0, import_react50.useState)(null);
|
|
6194
6364
|
const open = Boolean(anchorEl);
|
|
6195
|
-
const calendarValue = (0,
|
|
6196
|
-
(0,
|
|
6365
|
+
const calendarValue = (0, import_react50.useMemo)(() => value ? parseDates2(value) : void 0, [value]);
|
|
6366
|
+
(0, import_react50.useEffect)(() => {
|
|
6197
6367
|
if (!anchorEl) {
|
|
6198
6368
|
innerRef.current?.blur();
|
|
6199
6369
|
}
|
|
6200
6370
|
}, [anchorEl, innerRef]);
|
|
6201
|
-
(0,
|
|
6202
|
-
const handleChange = (0,
|
|
6371
|
+
(0, import_react50.useImperativeHandle)(ref, () => innerRef.current, [innerRef]);
|
|
6372
|
+
const handleChange = (0, import_react50.useCallback)(
|
|
6203
6373
|
(event) => {
|
|
6204
6374
|
setValue(event.target.value);
|
|
6205
6375
|
},
|
|
6206
6376
|
[setValue]
|
|
6207
6377
|
);
|
|
6208
|
-
const handleCalendarToggle = (0,
|
|
6378
|
+
const handleCalendarToggle = (0, import_react50.useCallback)(
|
|
6209
6379
|
(event) => {
|
|
6210
6380
|
setAnchorEl(anchorEl ? null : event.currentTarget);
|
|
6211
6381
|
innerRef.current?.focus();
|
|
6212
6382
|
},
|
|
6213
6383
|
[anchorEl, setAnchorEl, innerRef]
|
|
6214
6384
|
);
|
|
6215
|
-
const handleCalendarChange = (0,
|
|
6385
|
+
const handleCalendarChange = (0, import_react50.useCallback)(
|
|
6216
6386
|
([date1, date2]) => {
|
|
6217
6387
|
if (!date1 || !date2) return;
|
|
6218
6388
|
setValue(formatValueString4([date1, date2], format));
|
|
@@ -6220,7 +6390,7 @@ var MonthRangePicker = (0, import_react49.forwardRef)((inProps, ref) => {
|
|
|
6220
6390
|
},
|
|
6221
6391
|
[setValue, setAnchorEl, format]
|
|
6222
6392
|
);
|
|
6223
|
-
return /* @__PURE__ */
|
|
6393
|
+
return /* @__PURE__ */ import_react50.default.createElement(MonthRangePickerRoot, null, /* @__PURE__ */ import_react50.default.createElement(import_base5.FocusTrap, { open: true }, /* @__PURE__ */ import_react50.default.createElement(import_react50.default.Fragment, null, /* @__PURE__ */ import_react50.default.createElement(
|
|
6224
6394
|
Input_default,
|
|
6225
6395
|
{
|
|
6226
6396
|
...innerProps,
|
|
@@ -6242,7 +6412,7 @@ var MonthRangePicker = (0, import_react49.forwardRef)((inProps, ref) => {
|
|
|
6242
6412
|
// NOTE: placeholder char 를 텍스트로 표시하므로 동일한 너비를 가지는 mono font 를 사용해야 이질감이 없다.
|
|
6243
6413
|
fontFamily: "monospace"
|
|
6244
6414
|
},
|
|
6245
|
-
endDecorator: /* @__PURE__ */
|
|
6415
|
+
endDecorator: /* @__PURE__ */ import_react50.default.createElement(
|
|
6246
6416
|
IconButton_default,
|
|
6247
6417
|
{
|
|
6248
6418
|
variant: "plain",
|
|
@@ -6252,12 +6422,12 @@ var MonthRangePicker = (0, import_react49.forwardRef)((inProps, ref) => {
|
|
|
6252
6422
|
"aria-haspopup": "dialog",
|
|
6253
6423
|
"aria-expanded": open
|
|
6254
6424
|
},
|
|
6255
|
-
/* @__PURE__ */
|
|
6425
|
+
/* @__PURE__ */ import_react50.default.createElement(import_CalendarToday4.default, null)
|
|
6256
6426
|
),
|
|
6257
6427
|
label,
|
|
6258
6428
|
helperText
|
|
6259
6429
|
}
|
|
6260
|
-
), open && /* @__PURE__ */
|
|
6430
|
+
), open && /* @__PURE__ */ import_react50.default.createElement(import_base5.ClickAwayListener, { onClickAway: () => setAnchorEl(null) }, /* @__PURE__ */ import_react50.default.createElement(
|
|
6261
6431
|
StyledPopper4,
|
|
6262
6432
|
{
|
|
6263
6433
|
id: "month-range-picker-popper",
|
|
@@ -6276,7 +6446,7 @@ var MonthRangePicker = (0, import_react49.forwardRef)((inProps, ref) => {
|
|
|
6276
6446
|
"aria-label": "Calendar Tooltip",
|
|
6277
6447
|
"aria-expanded": open
|
|
6278
6448
|
},
|
|
6279
|
-
/* @__PURE__ */
|
|
6449
|
+
/* @__PURE__ */ import_react50.default.createElement(CalendarSheet4, { tabIndex: -1, role: "presentation" }, /* @__PURE__ */ import_react50.default.createElement(
|
|
6280
6450
|
Calendar_default,
|
|
6281
6451
|
{
|
|
6282
6452
|
view: "month",
|
|
@@ -6289,14 +6459,14 @@ var MonthRangePicker = (0, import_react49.forwardRef)((inProps, ref) => {
|
|
|
6289
6459
|
disableFuture,
|
|
6290
6460
|
disablePast
|
|
6291
6461
|
}
|
|
6292
|
-
), /* @__PURE__ */
|
|
6462
|
+
), /* @__PURE__ */ import_react50.default.createElement(
|
|
6293
6463
|
DialogActions_default,
|
|
6294
6464
|
{
|
|
6295
6465
|
sx: {
|
|
6296
6466
|
p: 1
|
|
6297
6467
|
}
|
|
6298
6468
|
},
|
|
6299
|
-
/* @__PURE__ */
|
|
6469
|
+
/* @__PURE__ */ import_react50.default.createElement(
|
|
6300
6470
|
Button_default,
|
|
6301
6471
|
{
|
|
6302
6472
|
size,
|
|
@@ -6315,7 +6485,7 @@ var MonthRangePicker = (0, import_react49.forwardRef)((inProps, ref) => {
|
|
|
6315
6485
|
MonthRangePicker.displayName = "MonthRangePicker";
|
|
6316
6486
|
|
|
6317
6487
|
// src/components/NavigationGroup/NavigationGroup.tsx
|
|
6318
|
-
var
|
|
6488
|
+
var import_react51 = __toESM(require("react"));
|
|
6319
6489
|
var import_joy63 = require("@mui/joy");
|
|
6320
6490
|
var AccordionSummary2 = (0, import_joy63.styled)(import_joy63.AccordionSummary, {
|
|
6321
6491
|
name: "NavigationGroup",
|
|
@@ -6339,11 +6509,11 @@ var AccordionDetails2 = (0, import_joy63.styled)(import_joy63.AccordionDetails,
|
|
|
6339
6509
|
}));
|
|
6340
6510
|
function NavigationGroup(props) {
|
|
6341
6511
|
const { title, children, startDecorator, level, ...rest } = props;
|
|
6342
|
-
return /* @__PURE__ */
|
|
6512
|
+
return /* @__PURE__ */ import_react51.default.createElement(import_joy63.Accordion, { ...rest }, /* @__PURE__ */ import_react51.default.createElement(AccordionSummary2, { useIcon: !!startDecorator, level }, /* @__PURE__ */ import_react51.default.createElement(import_joy63.Stack, { direction: "row", gap: 4 }, startDecorator, title)), /* @__PURE__ */ import_react51.default.createElement(AccordionDetails2, null, children));
|
|
6343
6513
|
}
|
|
6344
6514
|
|
|
6345
6515
|
// src/components/NavigationItem/NavigationItem.tsx
|
|
6346
|
-
var
|
|
6516
|
+
var import_react52 = __toESM(require("react"));
|
|
6347
6517
|
var import_joy64 = require("@mui/joy");
|
|
6348
6518
|
var ListItemButton = (0, import_joy64.styled)(import_joy64.ListItemButton, {
|
|
6349
6519
|
name: "NavigationItem",
|
|
@@ -6372,7 +6542,7 @@ function NavigationItem(props) {
|
|
|
6372
6542
|
const handleClick = () => {
|
|
6373
6543
|
onClick?.(id);
|
|
6374
6544
|
};
|
|
6375
|
-
return /* @__PURE__ */
|
|
6545
|
+
return /* @__PURE__ */ import_react52.default.createElement(import_joy64.ListItem, { ...rest }, /* @__PURE__ */ import_react52.default.createElement(
|
|
6376
6546
|
ListItemButton,
|
|
6377
6547
|
{
|
|
6378
6548
|
level,
|
|
@@ -6381,21 +6551,21 @@ function NavigationItem(props) {
|
|
|
6381
6551
|
"aria-current": selected,
|
|
6382
6552
|
onClick: handleClick
|
|
6383
6553
|
},
|
|
6384
|
-
startDecorator && /* @__PURE__ */
|
|
6554
|
+
startDecorator && /* @__PURE__ */ import_react52.default.createElement(import_joy64.ListItemDecorator, null, startDecorator),
|
|
6385
6555
|
children
|
|
6386
6556
|
));
|
|
6387
6557
|
}
|
|
6388
6558
|
|
|
6389
6559
|
// src/components/Navigator/Navigator.tsx
|
|
6390
|
-
var
|
|
6560
|
+
var import_react53 = __toESM(require("react"));
|
|
6391
6561
|
function Navigator(props) {
|
|
6392
6562
|
const { items, level = 0, onSelect } = props;
|
|
6393
6563
|
const handleItemClick = (id) => {
|
|
6394
6564
|
onSelect?.(id);
|
|
6395
6565
|
};
|
|
6396
|
-
return /* @__PURE__ */
|
|
6566
|
+
return /* @__PURE__ */ import_react53.default.createElement("div", null, items.map((item, index) => {
|
|
6397
6567
|
if (item.type === "item") {
|
|
6398
|
-
return /* @__PURE__ */
|
|
6568
|
+
return /* @__PURE__ */ import_react53.default.createElement(
|
|
6399
6569
|
NavigationItem,
|
|
6400
6570
|
{
|
|
6401
6571
|
key: item.id,
|
|
@@ -6408,7 +6578,7 @@ function Navigator(props) {
|
|
|
6408
6578
|
item.title
|
|
6409
6579
|
);
|
|
6410
6580
|
} else if (item.type === "group") {
|
|
6411
|
-
return /* @__PURE__ */
|
|
6581
|
+
return /* @__PURE__ */ import_react53.default.createElement(
|
|
6412
6582
|
NavigationGroup,
|
|
6413
6583
|
{
|
|
6414
6584
|
key: `${item.title}-${index}`,
|
|
@@ -6426,7 +6596,7 @@ function Navigator(props) {
|
|
|
6426
6596
|
Navigator.displayName = "Navigator";
|
|
6427
6597
|
|
|
6428
6598
|
// src/components/ProfileMenu/ProfileMenu.tsx
|
|
6429
|
-
var
|
|
6599
|
+
var import_react54 = __toESM(require("react"));
|
|
6430
6600
|
var import_joy65 = require("@mui/joy");
|
|
6431
6601
|
var import_base6 = require("@mui/base");
|
|
6432
6602
|
var import_ArrowDropDown = __toESM(require("@mui/icons-material/ArrowDropDown"));
|
|
@@ -6436,9 +6606,9 @@ var StyledProfileCard = (0, import_joy65.styled)(import_joy3.Stack, {
|
|
|
6436
6606
|
})({});
|
|
6437
6607
|
function ProfileCard(props) {
|
|
6438
6608
|
const { children, chip, caption, size } = props;
|
|
6439
|
-
const captionLevel = (0,
|
|
6440
|
-
const nameLevel = (0,
|
|
6441
|
-
return /* @__PURE__ */
|
|
6609
|
+
const captionLevel = (0, import_react54.useMemo)(() => size === "sm" ? "body-xs" : "body-sm", [size]);
|
|
6610
|
+
const nameLevel = (0, import_react54.useMemo)(() => size === "sm" ? "body-sm" : "body-md", [size]);
|
|
6611
|
+
return /* @__PURE__ */ import_react54.default.createElement(StyledProfileCard, { px: 4, py: 2 }, /* @__PURE__ */ import_react54.default.createElement(import_joy3.Stack, { direction: "row", gap: 2 }, /* @__PURE__ */ import_react54.default.createElement(Typography, { level: nameLevel, fontWeight: "bold", textColor: "text.primary" }, children), chip && /* @__PURE__ */ import_react54.default.createElement(Chip, { size, color: "neutral", variant: "outlined" }, chip)), caption && /* @__PURE__ */ import_react54.default.createElement(Typography, { level: captionLevel, textColor: "text.tertiary" }, caption));
|
|
6442
6612
|
}
|
|
6443
6613
|
ProfileCard.displayName = "ProfileCard";
|
|
6444
6614
|
var StyledProfileMenuButton = (0, import_joy65.styled)(import_joy65.MenuButton, {
|
|
@@ -6450,16 +6620,16 @@ var StyledProfileMenuButton = (0, import_joy65.styled)(import_joy65.MenuButton,
|
|
|
6450
6620
|
}));
|
|
6451
6621
|
function ProfileMenuButton(props) {
|
|
6452
6622
|
const { size = "md", src, alt, children, getInitial, ...innerProps } = props;
|
|
6453
|
-
return /* @__PURE__ */
|
|
6623
|
+
return /* @__PURE__ */ import_react54.default.createElement(
|
|
6454
6624
|
StyledProfileMenuButton,
|
|
6455
6625
|
{
|
|
6456
6626
|
variant: "plain",
|
|
6457
6627
|
color: "neutral",
|
|
6458
6628
|
size,
|
|
6459
|
-
endDecorator: /* @__PURE__ */
|
|
6629
|
+
endDecorator: /* @__PURE__ */ import_react54.default.createElement(import_ArrowDropDown.default, null),
|
|
6460
6630
|
...innerProps
|
|
6461
6631
|
},
|
|
6462
|
-
/* @__PURE__ */
|
|
6632
|
+
/* @__PURE__ */ import_react54.default.createElement(Avatar, { variant: "soft", color: "primary", size, src, alt, getInitial }, children)
|
|
6463
6633
|
);
|
|
6464
6634
|
}
|
|
6465
6635
|
ProfileMenuButton.displayName = "ProfileMenuButton";
|
|
@@ -6478,9 +6648,9 @@ function ProfileMenu(props) {
|
|
|
6478
6648
|
const [open, setOpen] = useControlledState(
|
|
6479
6649
|
_open,
|
|
6480
6650
|
defaultOpen ?? false,
|
|
6481
|
-
(0,
|
|
6651
|
+
(0, import_react54.useCallback)((value) => onOpenChange?.(value), [onOpenChange])
|
|
6482
6652
|
);
|
|
6483
|
-
return /* @__PURE__ */
|
|
6653
|
+
return /* @__PURE__ */ import_react54.default.createElement(import_base6.ClickAwayListener, { onClickAway: () => setOpen(false) }, /* @__PURE__ */ import_react54.default.createElement("div", null, /* @__PURE__ */ import_react54.default.createElement(import_joy65.Dropdown, { open }, /* @__PURE__ */ import_react54.default.createElement(
|
|
6484
6654
|
ProfileMenuButton,
|
|
6485
6655
|
{
|
|
6486
6656
|
size,
|
|
@@ -6490,7 +6660,7 @@ function ProfileMenu(props) {
|
|
|
6490
6660
|
getInitial
|
|
6491
6661
|
},
|
|
6492
6662
|
profile.name
|
|
6493
|
-
), /* @__PURE__ */
|
|
6663
|
+
), /* @__PURE__ */ import_react54.default.createElement(ProfileMenuRoot, { size, placement: "bottom-end", ...innerProps, onClose: () => setOpen(false) }, /* @__PURE__ */ import_react54.default.createElement(ProfileCard, { size, caption: profile.caption, chip: profile.chip }, profile.name), !!menuItems.length && /* @__PURE__ */ import_react54.default.createElement(import_joy65.ListDivider, null), menuItems.map(({ label, ...menuProps }) => /* @__PURE__ */ import_react54.default.createElement(
|
|
6494
6664
|
MenuItem,
|
|
6495
6665
|
{
|
|
6496
6666
|
key: label,
|
|
@@ -6506,7 +6676,7 @@ function ProfileMenu(props) {
|
|
|
6506
6676
|
ProfileMenu.displayName = "ProfileMenu";
|
|
6507
6677
|
|
|
6508
6678
|
// src/components/RadioTileGroup/RadioTileGroup.tsx
|
|
6509
|
-
var
|
|
6679
|
+
var import_react55 = __toESM(require("react"));
|
|
6510
6680
|
var import_joy66 = require("@mui/joy");
|
|
6511
6681
|
var RadioTileGroupRoot = (0, import_joy66.styled)(RadioGroup, {
|
|
6512
6682
|
name: "RadioTileGroup",
|
|
@@ -6594,7 +6764,7 @@ function RadioTileGroup(props) {
|
|
|
6594
6764
|
error,
|
|
6595
6765
|
required
|
|
6596
6766
|
} = props;
|
|
6597
|
-
const radioGroup = /* @__PURE__ */
|
|
6767
|
+
const radioGroup = /* @__PURE__ */ import_react55.default.createElement(
|
|
6598
6768
|
RadioTileGroupRoot,
|
|
6599
6769
|
{
|
|
6600
6770
|
overlay: true,
|
|
@@ -6605,7 +6775,7 @@ function RadioTileGroup(props) {
|
|
|
6605
6775
|
flex,
|
|
6606
6776
|
columns
|
|
6607
6777
|
},
|
|
6608
|
-
options.map((option) => /* @__PURE__ */
|
|
6778
|
+
options.map((option) => /* @__PURE__ */ import_react55.default.createElement(
|
|
6609
6779
|
RadioTileSheet,
|
|
6610
6780
|
{
|
|
6611
6781
|
key: option.value,
|
|
@@ -6615,7 +6785,7 @@ function RadioTileGroup(props) {
|
|
|
6615
6785
|
flex,
|
|
6616
6786
|
textAlign
|
|
6617
6787
|
},
|
|
6618
|
-
/* @__PURE__ */
|
|
6788
|
+
/* @__PURE__ */ import_react55.default.createElement(
|
|
6619
6789
|
Radio,
|
|
6620
6790
|
{
|
|
6621
6791
|
id: `${option.value}`,
|
|
@@ -6643,7 +6813,7 @@ function RadioTileGroup(props) {
|
|
|
6643
6813
|
}
|
|
6644
6814
|
}
|
|
6645
6815
|
),
|
|
6646
|
-
option.startDecorator && /* @__PURE__ */
|
|
6816
|
+
option.startDecorator && /* @__PURE__ */ import_react55.default.createElement(
|
|
6647
6817
|
Box_default,
|
|
6648
6818
|
{
|
|
6649
6819
|
sx: {
|
|
@@ -6664,20 +6834,20 @@ function RadioTileGroup(props) {
|
|
|
6664
6834
|
)
|
|
6665
6835
|
))
|
|
6666
6836
|
);
|
|
6667
|
-
return /* @__PURE__ */
|
|
6837
|
+
return /* @__PURE__ */ import_react55.default.createElement(FormControl_default, { required, disabled: allDisabled, error, size, sx, className }, label && /* @__PURE__ */ import_react55.default.createElement(FormLabel_default, null, label), radioGroup, helperText && /* @__PURE__ */ import_react55.default.createElement(FormHelperText_default, null, helperText));
|
|
6668
6838
|
}
|
|
6669
6839
|
RadioTileGroup.displayName = "RadioTileGroup";
|
|
6670
6840
|
|
|
6671
6841
|
// src/components/RadioList/RadioList.tsx
|
|
6672
|
-
var
|
|
6842
|
+
var import_react56 = __toESM(require("react"));
|
|
6673
6843
|
function RadioList(props) {
|
|
6674
6844
|
const { items, ...innerProps } = props;
|
|
6675
|
-
return /* @__PURE__ */
|
|
6845
|
+
return /* @__PURE__ */ import_react56.default.createElement(RadioGroup, { ...innerProps }, items.map((item) => /* @__PURE__ */ import_react56.default.createElement(Radio, { key: `${item.value}`, value: item.value, label: item.label })));
|
|
6676
6846
|
}
|
|
6677
6847
|
RadioList.displayName = "RadioList";
|
|
6678
6848
|
|
|
6679
6849
|
// src/components/Stepper/Stepper.tsx
|
|
6680
|
-
var
|
|
6850
|
+
var import_react57 = __toESM(require("react"));
|
|
6681
6851
|
var import_joy67 = require("@mui/joy");
|
|
6682
6852
|
var import_Check = __toESM(require("@mui/icons-material/Check"));
|
|
6683
6853
|
var import_framer_motion27 = require("framer-motion");
|
|
@@ -6706,7 +6876,7 @@ function Stepper(props) {
|
|
|
6706
6876
|
stepOrientation = "horizontal"
|
|
6707
6877
|
} = props;
|
|
6708
6878
|
const effectiveStepOrientation = orientation === "vertical" ? "horizontal" : stepOrientation;
|
|
6709
|
-
return /* @__PURE__ */
|
|
6879
|
+
return /* @__PURE__ */ import_react57.default.createElement(
|
|
6710
6880
|
MotionStepper,
|
|
6711
6881
|
{
|
|
6712
6882
|
orientation,
|
|
@@ -6745,23 +6915,23 @@ function Stepper(props) {
|
|
|
6745
6915
|
const completed = activeStep > i + 1;
|
|
6746
6916
|
const disabled = activeStep < i + 1;
|
|
6747
6917
|
const hasContent = step.label || step.extraContent;
|
|
6748
|
-
return /* @__PURE__ */
|
|
6918
|
+
return /* @__PURE__ */ import_react57.default.createElement(
|
|
6749
6919
|
Step,
|
|
6750
6920
|
{
|
|
6751
6921
|
key: `step-${i}`,
|
|
6752
|
-
indicator: /* @__PURE__ */
|
|
6922
|
+
indicator: /* @__PURE__ */ import_react57.default.createElement(StepIndicator, { variant: disabled ? "outlined" : "solid", color: disabled ? "neutral" : "primary" }, completed ? /* @__PURE__ */ import_react57.default.createElement(import_Check.default, null) : step.indicatorContent),
|
|
6753
6923
|
active,
|
|
6754
6924
|
completed,
|
|
6755
6925
|
disabled,
|
|
6756
6926
|
orientation: effectiveStepOrientation
|
|
6757
6927
|
},
|
|
6758
|
-
hasContent && /* @__PURE__ */
|
|
6928
|
+
hasContent && /* @__PURE__ */ import_react57.default.createElement(
|
|
6759
6929
|
Stack_default,
|
|
6760
6930
|
{
|
|
6761
6931
|
sx: orientation === "horizontal" && effectiveStepOrientation === "vertical" ? { alignItems: "center" } : {}
|
|
6762
6932
|
},
|
|
6763
|
-
step.label && /* @__PURE__ */
|
|
6764
|
-
step.extraContent && /* @__PURE__ */
|
|
6933
|
+
step.label && /* @__PURE__ */ import_react57.default.createElement(Typography_default, { level: "title-sm" }, step.label),
|
|
6934
|
+
step.extraContent && /* @__PURE__ */ import_react57.default.createElement(Typography_default, { level: "body-xs" }, step.extraContent)
|
|
6765
6935
|
)
|
|
6766
6936
|
);
|
|
6767
6937
|
})
|
|
@@ -6770,7 +6940,7 @@ function Stepper(props) {
|
|
|
6770
6940
|
Stepper.displayName = "Stepper";
|
|
6771
6941
|
|
|
6772
6942
|
// src/components/Switch/Switch.tsx
|
|
6773
|
-
var
|
|
6943
|
+
var import_react58 = __toESM(require("react"));
|
|
6774
6944
|
var import_joy68 = require("@mui/joy");
|
|
6775
6945
|
var import_framer_motion28 = require("framer-motion");
|
|
6776
6946
|
var MotionSwitch = (0, import_framer_motion28.motion)(import_joy68.Switch);
|
|
@@ -6792,14 +6962,14 @@ var StyledThumb = (0, import_joy68.styled)(import_framer_motion28.motion.div)({
|
|
|
6792
6962
|
right: "var(--Switch-thumbOffset)"
|
|
6793
6963
|
}
|
|
6794
6964
|
});
|
|
6795
|
-
var Thumb = (props) => /* @__PURE__ */
|
|
6965
|
+
var Thumb = (props) => /* @__PURE__ */ import_react58.default.createElement(StyledThumb, { ...props, layout: true, transition: spring });
|
|
6796
6966
|
var spring = {
|
|
6797
6967
|
type: "spring",
|
|
6798
6968
|
stiffness: 700,
|
|
6799
6969
|
damping: 30
|
|
6800
6970
|
};
|
|
6801
6971
|
var Switch = (props) => {
|
|
6802
|
-
return /* @__PURE__ */
|
|
6972
|
+
return /* @__PURE__ */ import_react58.default.createElement(
|
|
6803
6973
|
MotionSwitch,
|
|
6804
6974
|
{
|
|
6805
6975
|
...props,
|
|
@@ -6813,7 +6983,7 @@ var Switch = (props) => {
|
|
|
6813
6983
|
Switch.displayName = "Switch";
|
|
6814
6984
|
|
|
6815
6985
|
// src/components/Tabs/Tabs.tsx
|
|
6816
|
-
var
|
|
6986
|
+
var import_react59 = __toESM(require("react"));
|
|
6817
6987
|
var import_joy69 = require("@mui/joy");
|
|
6818
6988
|
var StyledTabs = (0, import_joy69.styled)(import_joy69.Tabs)(({ theme }) => ({
|
|
6819
6989
|
backgroundColor: theme.palette.background.body
|
|
@@ -6829,15 +6999,15 @@ var StyledTab = (0, import_joy69.styled)(import_joy69.Tab)(({ theme }) => ({
|
|
|
6829
6999
|
backgroundColor: theme.palette.background.body
|
|
6830
7000
|
}
|
|
6831
7001
|
}));
|
|
6832
|
-
var Tab = (0,
|
|
6833
|
-
return /* @__PURE__ */
|
|
7002
|
+
var Tab = (0, import_react59.forwardRef)(function Tab2({ startDecorator, endDecorator, children, ...props }, ref) {
|
|
7003
|
+
return /* @__PURE__ */ import_react59.default.createElement(StyledTab, { ...props, ref }, startDecorator, children, endDecorator);
|
|
6834
7004
|
});
|
|
6835
7005
|
Tab.displayName = "Tab";
|
|
6836
7006
|
var TabList = import_joy69.TabList;
|
|
6837
7007
|
var TabPanel = import_joy69.TabPanel;
|
|
6838
7008
|
|
|
6839
7009
|
// src/components/ThemeProvider/ThemeProvider.tsx
|
|
6840
|
-
var
|
|
7010
|
+
var import_react60 = __toESM(require("react"));
|
|
6841
7011
|
var import_joy70 = require("@mui/joy");
|
|
6842
7012
|
var colorScheme = {
|
|
6843
7013
|
palette: {
|
|
@@ -7116,6 +7286,6 @@ var defaultTheme = (0, import_joy70.extendTheme)({
|
|
|
7116
7286
|
});
|
|
7117
7287
|
function ThemeProvider(props) {
|
|
7118
7288
|
const theme = props.theme || defaultTheme;
|
|
7119
|
-
return /* @__PURE__ */
|
|
7289
|
+
return /* @__PURE__ */ import_react60.default.createElement(import_react60.default.Fragment, null, /* @__PURE__ */ import_react60.default.createElement(import_joy70.CssVarsProvider, { theme }, /* @__PURE__ */ import_react60.default.createElement(import_joy70.CssBaseline, null), props.children));
|
|
7120
7290
|
}
|
|
7121
7291
|
ThemeProvider.displayName = "ThemeProvider";
|