@ceed/ads 1.15.0 → 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 +23 -0
- package/dist/components/FilterableCheckboxGroup/index.d.ts +3 -0
- package/dist/components/Pagination/Pagination.d.ts +1 -0
- package/dist/components/ProfileMenu/ProfileMenu.d.ts +1 -1
- package/dist/components/index.d.ts +1 -0
- package/dist/components/inputs/FilterMenu.md +20 -0
- package/dist/components/inputs/FilterableCheckboxGroup.md +205 -0
- package/dist/components/inputs/llms.txt +1 -0
- package/dist/components/navigation/Pagination.md +11 -2
- package/dist/index.cjs +741 -387
- package/dist/index.d.ts +1 -1
- package/dist/index.js +548 -194
- package/dist/llms.txt +1 -0
- package/framer/index.js +43 -43
- package/package.json +4 -3
package/dist/index.js
CHANGED
|
@@ -3456,8 +3456,10 @@ TableBody.displayName = "TableBody";
|
|
|
3456
3456
|
|
|
3457
3457
|
// src/components/Pagination/Pagination.tsx
|
|
3458
3458
|
import React24, { useCallback as useCallback10, useEffect as useEffect6 } from "react";
|
|
3459
|
-
import PreviousIcon from "@mui/icons-material/
|
|
3460
|
-
import NextIcon from "@mui/icons-material/
|
|
3459
|
+
import PreviousIcon from "@mui/icons-material/ChevronLeftRounded";
|
|
3460
|
+
import NextIcon from "@mui/icons-material/ChevronRightRounded";
|
|
3461
|
+
import FirstPageIcon from "@mui/icons-material/FirstPageRounded";
|
|
3462
|
+
import LastPageIcon from "@mui/icons-material/LastPageRounded";
|
|
3461
3463
|
import { styled as styled13 } from "@mui/joy";
|
|
3462
3464
|
var PaginationButton = styled13(Button_default, {
|
|
3463
3465
|
name: "Pagination",
|
|
@@ -3516,6 +3518,7 @@ function Pagination(props) {
|
|
|
3516
3518
|
onPageChange,
|
|
3517
3519
|
rowCount,
|
|
3518
3520
|
size = "md",
|
|
3521
|
+
variant = "standard",
|
|
3519
3522
|
...innerProps
|
|
3520
3523
|
} = props;
|
|
3521
3524
|
const [paginationModel, setPaginationModel] = useControlledState(
|
|
@@ -3542,6 +3545,87 @@ function Pagination(props) {
|
|
|
3542
3545
|
setPaginationModel({ ...paginationModel, page: lastPage });
|
|
3543
3546
|
}
|
|
3544
3547
|
}, [rowCount, paginationModel, lastPage, setPaginationModel]);
|
|
3548
|
+
const pageOptions = Array.from({ length: lastPage }, (_, i) => ({
|
|
3549
|
+
label: `${i + 1}`,
|
|
3550
|
+
value: `${i + 1}`
|
|
3551
|
+
}));
|
|
3552
|
+
if (variant === "compact") {
|
|
3553
|
+
return /* @__PURE__ */ React24.createElement(PaginationRoot, { ...innerProps }, /* @__PURE__ */ React24.createElement(PaginationContainer, { direction: "row", size, alignItems: "center" }, /* @__PURE__ */ React24.createElement(Stack_default, { direction: "row" }, /* @__PURE__ */ React24.createElement(
|
|
3554
|
+
PaginationIconButton,
|
|
3555
|
+
{
|
|
3556
|
+
size,
|
|
3557
|
+
variant: "plain",
|
|
3558
|
+
color: "neutral",
|
|
3559
|
+
onClick: () => handlePageChange(firstPage),
|
|
3560
|
+
disabled: paginationModel.page === firstPage,
|
|
3561
|
+
"aria-label": "First page"
|
|
3562
|
+
},
|
|
3563
|
+
/* @__PURE__ */ React24.createElement(FirstPageIcon, null)
|
|
3564
|
+
), /* @__PURE__ */ React24.createElement(
|
|
3565
|
+
PaginationIconButton,
|
|
3566
|
+
{
|
|
3567
|
+
size,
|
|
3568
|
+
variant: "plain",
|
|
3569
|
+
color: "neutral",
|
|
3570
|
+
onClick: () => handlePageChange(paginationModel.page - 1),
|
|
3571
|
+
disabled: paginationModel.page === firstPage,
|
|
3572
|
+
"aria-label": "Previous page"
|
|
3573
|
+
},
|
|
3574
|
+
/* @__PURE__ */ React24.createElement(PreviousIcon, null)
|
|
3575
|
+
)), /* @__PURE__ */ React24.createElement(
|
|
3576
|
+
Autocomplete_default,
|
|
3577
|
+
{
|
|
3578
|
+
size,
|
|
3579
|
+
value: `${paginationModel.page}`,
|
|
3580
|
+
onChange: (event) => {
|
|
3581
|
+
if (event.target.value) {
|
|
3582
|
+
handlePageChange(parseInt(event.target.value, 10));
|
|
3583
|
+
}
|
|
3584
|
+
},
|
|
3585
|
+
options: pageOptions,
|
|
3586
|
+
sx: {
|
|
3587
|
+
width: {
|
|
3588
|
+
sm: "80px",
|
|
3589
|
+
md: "100px",
|
|
3590
|
+
lg: "120px"
|
|
3591
|
+
}[size]
|
|
3592
|
+
}
|
|
3593
|
+
}
|
|
3594
|
+
), /* @__PURE__ */ React24.createElement(
|
|
3595
|
+
Typography_default,
|
|
3596
|
+
{
|
|
3597
|
+
level: `body-${size}`,
|
|
3598
|
+
sx: (theme) => ({
|
|
3599
|
+
color: theme.palette.text.secondary,
|
|
3600
|
+
fontWeight: 500
|
|
3601
|
+
})
|
|
3602
|
+
},
|
|
3603
|
+
"/ ",
|
|
3604
|
+
lastPage
|
|
3605
|
+
), /* @__PURE__ */ React24.createElement(Stack_default, { direction: "row" }, /* @__PURE__ */ React24.createElement(
|
|
3606
|
+
PaginationIconButton,
|
|
3607
|
+
{
|
|
3608
|
+
size,
|
|
3609
|
+
variant: "plain",
|
|
3610
|
+
color: "neutral",
|
|
3611
|
+
onClick: () => handlePageChange(paginationModel.page + 1),
|
|
3612
|
+
disabled: paginationModel.page === lastPage,
|
|
3613
|
+
"aria-label": "Next page"
|
|
3614
|
+
},
|
|
3615
|
+
/* @__PURE__ */ React24.createElement(NextIcon, null)
|
|
3616
|
+
), /* @__PURE__ */ React24.createElement(
|
|
3617
|
+
PaginationIconButton,
|
|
3618
|
+
{
|
|
3619
|
+
size,
|
|
3620
|
+
variant: "plain",
|
|
3621
|
+
color: "neutral",
|
|
3622
|
+
onClick: () => handlePageChange(lastPage),
|
|
3623
|
+
disabled: paginationModel.page === lastPage,
|
|
3624
|
+
"aria-label": "Last page"
|
|
3625
|
+
},
|
|
3626
|
+
/* @__PURE__ */ React24.createElement(LastPageIcon, null)
|
|
3627
|
+
))));
|
|
3628
|
+
}
|
|
3545
3629
|
return /* @__PURE__ */ React24.createElement(PaginationRoot, { ...innerProps }, /* @__PURE__ */ React24.createElement(PaginationContainer, { direction: "row", size, alignItems: "center" }, /* @__PURE__ */ React24.createElement(
|
|
3546
3630
|
PaginationIconButton,
|
|
3547
3631
|
{
|
|
@@ -4409,17 +4493,254 @@ var InsetDrawer = styled19(JoyDrawer)(({ theme }) => ({
|
|
|
4409
4493
|
}
|
|
4410
4494
|
}));
|
|
4411
4495
|
|
|
4496
|
+
// src/components/FilterableCheckboxGroup/FilterableCheckboxGroup.tsx
|
|
4497
|
+
import React30, { useCallback as useCallback13, useEffect as useEffect8, useMemo as useMemo12, useRef as useRef8, useState as useState10 } from "react";
|
|
4498
|
+
import SearchIcon from "@mui/icons-material/Search";
|
|
4499
|
+
import { useVirtualizer as useVirtualizer3 } from "@tanstack/react-virtual";
|
|
4500
|
+
function LabelWithTooltip(props) {
|
|
4501
|
+
const { label, size } = props;
|
|
4502
|
+
const labelContentRef = useRef8(null);
|
|
4503
|
+
const [isOverflowing, setIsOverflowing] = useState10(false);
|
|
4504
|
+
const labelContent = /* @__PURE__ */ React30.createElement(
|
|
4505
|
+
"span",
|
|
4506
|
+
{
|
|
4507
|
+
ref: labelContentRef,
|
|
4508
|
+
style: {
|
|
4509
|
+
textOverflow: "ellipsis",
|
|
4510
|
+
overflow: "hidden",
|
|
4511
|
+
whiteSpace: "nowrap",
|
|
4512
|
+
display: "block",
|
|
4513
|
+
position: "relative",
|
|
4514
|
+
zIndex: 1,
|
|
4515
|
+
cursor: "pointer"
|
|
4516
|
+
}
|
|
4517
|
+
},
|
|
4518
|
+
label
|
|
4519
|
+
);
|
|
4520
|
+
useEffect8(() => {
|
|
4521
|
+
const element = labelContentRef.current;
|
|
4522
|
+
if (element) {
|
|
4523
|
+
setIsOverflowing(element.scrollWidth > element.clientWidth);
|
|
4524
|
+
}
|
|
4525
|
+
}, [label]);
|
|
4526
|
+
if (isOverflowing) {
|
|
4527
|
+
return /* @__PURE__ */ React30.createElement(Tooltip_default, { variant: "solid", size, title: label, placement: "bottom-start" }, labelContent);
|
|
4528
|
+
}
|
|
4529
|
+
return labelContent;
|
|
4530
|
+
}
|
|
4531
|
+
function FilterableCheckboxGroup(props) {
|
|
4532
|
+
const {
|
|
4533
|
+
value,
|
|
4534
|
+
options,
|
|
4535
|
+
label,
|
|
4536
|
+
placeholder,
|
|
4537
|
+
helperText,
|
|
4538
|
+
size = "md",
|
|
4539
|
+
required,
|
|
4540
|
+
onChange,
|
|
4541
|
+
maxHeight = 300,
|
|
4542
|
+
disabled
|
|
4543
|
+
} = props;
|
|
4544
|
+
const [searchTerm, setSearchTerm] = useState10("");
|
|
4545
|
+
const [sortedOptions, setSortedOptions] = useState10(options);
|
|
4546
|
+
const [internalValue, setInternalValue] = useControlledState(
|
|
4547
|
+
value,
|
|
4548
|
+
value ?? [],
|
|
4549
|
+
useCallback13((newValue) => onChange?.(newValue), [onChange])
|
|
4550
|
+
);
|
|
4551
|
+
const parentRef = useRef8(null);
|
|
4552
|
+
const isInitialSortRef = useRef8(false);
|
|
4553
|
+
const filteredOptions = useMemo12(() => {
|
|
4554
|
+
if (!searchTerm) return sortedOptions;
|
|
4555
|
+
return sortedOptions.filter((option) => option.label.toLowerCase().includes(searchTerm.toLowerCase()));
|
|
4556
|
+
}, [sortedOptions, searchTerm]);
|
|
4557
|
+
const itemSize = useMemo12(() => {
|
|
4558
|
+
switch (size) {
|
|
4559
|
+
case "sm":
|
|
4560
|
+
return 28;
|
|
4561
|
+
case "md":
|
|
4562
|
+
return 32;
|
|
4563
|
+
case "lg":
|
|
4564
|
+
return 36;
|
|
4565
|
+
}
|
|
4566
|
+
}, [size]);
|
|
4567
|
+
const noOptionsFontSize = useMemo12(() => {
|
|
4568
|
+
switch (size) {
|
|
4569
|
+
case "sm":
|
|
4570
|
+
return "14px";
|
|
4571
|
+
case "md":
|
|
4572
|
+
return "16px";
|
|
4573
|
+
case "lg":
|
|
4574
|
+
return "18px";
|
|
4575
|
+
}
|
|
4576
|
+
}, [size]);
|
|
4577
|
+
const virtualizer = useVirtualizer3({
|
|
4578
|
+
count: filteredOptions.length,
|
|
4579
|
+
estimateSize: () => itemSize,
|
|
4580
|
+
measureElement: (element) => element.clientHeight,
|
|
4581
|
+
getScrollElement: () => parentRef.current,
|
|
4582
|
+
overscan: 5
|
|
4583
|
+
});
|
|
4584
|
+
const items = virtualizer.getVirtualItems();
|
|
4585
|
+
useEffect8(() => {
|
|
4586
|
+
if (isInitialSortRef.current) return;
|
|
4587
|
+
const initialValue = value ?? [];
|
|
4588
|
+
const sorted = [...options].sort((a, b) => {
|
|
4589
|
+
const aSelected = initialValue.includes(a.value);
|
|
4590
|
+
const bSelected = initialValue.includes(b.value);
|
|
4591
|
+
if (aSelected !== bSelected) {
|
|
4592
|
+
return aSelected ? -1 : 1;
|
|
4593
|
+
}
|
|
4594
|
+
const aIsAlpha = /^[a-zA-Z]/.test(a.label);
|
|
4595
|
+
const bIsAlpha = /^[a-zA-Z]/.test(b.label);
|
|
4596
|
+
if (aIsAlpha !== bIsAlpha) {
|
|
4597
|
+
return aIsAlpha ? -1 : 1;
|
|
4598
|
+
}
|
|
4599
|
+
return a.label.localeCompare(b.label);
|
|
4600
|
+
});
|
|
4601
|
+
setSortedOptions(sorted);
|
|
4602
|
+
isInitialSortRef.current = true;
|
|
4603
|
+
}, [options, value]);
|
|
4604
|
+
useEffect8(() => {
|
|
4605
|
+
virtualizer.measure();
|
|
4606
|
+
}, [virtualizer, filteredOptions]);
|
|
4607
|
+
const handleSearchChange = useCallback13((event) => {
|
|
4608
|
+
setSearchTerm(event.target.value);
|
|
4609
|
+
}, []);
|
|
4610
|
+
const handleCheckboxChange = useCallback13(
|
|
4611
|
+
(optionValue) => (event) => {
|
|
4612
|
+
const checked = event.target.checked;
|
|
4613
|
+
const newValue = checked ? [...internalValue, optionValue] : internalValue.filter((v) => v !== optionValue);
|
|
4614
|
+
setInternalValue(newValue);
|
|
4615
|
+
},
|
|
4616
|
+
[internalValue, setInternalValue]
|
|
4617
|
+
);
|
|
4618
|
+
const handleSelectAll = useCallback13(
|
|
4619
|
+
(event) => {
|
|
4620
|
+
const checked = event.target.checked;
|
|
4621
|
+
const enabledOptions = filteredOptions.filter((option) => !option.disabled);
|
|
4622
|
+
const disabledSelectedValues = internalValue.filter(
|
|
4623
|
+
(v) => filteredOptions.some((opt) => opt.value === v && opt.disabled)
|
|
4624
|
+
);
|
|
4625
|
+
if (checked) {
|
|
4626
|
+
const enabledValues = enabledOptions.map((option) => option.value);
|
|
4627
|
+
setInternalValue([...disabledSelectedValues, ...enabledValues]);
|
|
4628
|
+
} else {
|
|
4629
|
+
setInternalValue(disabledSelectedValues);
|
|
4630
|
+
}
|
|
4631
|
+
},
|
|
4632
|
+
[filteredOptions, internalValue, setInternalValue]
|
|
4633
|
+
);
|
|
4634
|
+
const enabledFilteredOptions = useMemo12(() => filteredOptions.filter((option) => !option.disabled), [filteredOptions]);
|
|
4635
|
+
const isAllSelected = enabledFilteredOptions.length > 0 && enabledFilteredOptions.every((option) => internalValue.includes(option.value));
|
|
4636
|
+
const isIndeterminate = !isAllSelected && enabledFilteredOptions.some((option) => internalValue.includes(option.value));
|
|
4637
|
+
return /* @__PURE__ */ React30.createElement("div", { style: { width: "100%" } }, /* @__PURE__ */ React30.createElement(
|
|
4638
|
+
Input_default,
|
|
4639
|
+
{
|
|
4640
|
+
label,
|
|
4641
|
+
helperText,
|
|
4642
|
+
required,
|
|
4643
|
+
variant: "outlined",
|
|
4644
|
+
color: "neutral",
|
|
4645
|
+
placeholder,
|
|
4646
|
+
value: searchTerm,
|
|
4647
|
+
onChange: handleSearchChange,
|
|
4648
|
+
size,
|
|
4649
|
+
disabled,
|
|
4650
|
+
endDecorator: /* @__PURE__ */ React30.createElement(SearchIcon, null)
|
|
4651
|
+
}
|
|
4652
|
+
), filteredOptions.length === 0 ? /* @__PURE__ */ React30.createElement(
|
|
4653
|
+
Stack_default,
|
|
4654
|
+
{
|
|
4655
|
+
sx: (theme) => ({
|
|
4656
|
+
padding: "20px 12px",
|
|
4657
|
+
justifyContent: "center",
|
|
4658
|
+
alignItems: "center",
|
|
4659
|
+
fontSize: noOptionsFontSize,
|
|
4660
|
+
color: theme.palette.neutral.softDisabledColor
|
|
4661
|
+
})
|
|
4662
|
+
},
|
|
4663
|
+
"No options found."
|
|
4664
|
+
) : /* @__PURE__ */ React30.createElement(
|
|
4665
|
+
"div",
|
|
4666
|
+
{
|
|
4667
|
+
ref: parentRef,
|
|
4668
|
+
style: {
|
|
4669
|
+
overflow: "auto",
|
|
4670
|
+
maxHeight: typeof maxHeight === "number" ? `${maxHeight}px` : maxHeight,
|
|
4671
|
+
padding: "8px 0px",
|
|
4672
|
+
marginTop: "8px"
|
|
4673
|
+
}
|
|
4674
|
+
},
|
|
4675
|
+
!searchTerm && /* @__PURE__ */ React30.createElement(
|
|
4676
|
+
Checkbox_default,
|
|
4677
|
+
{
|
|
4678
|
+
label: "Select all",
|
|
4679
|
+
checked: isAllSelected,
|
|
4680
|
+
indeterminate: isIndeterminate,
|
|
4681
|
+
onChange: handleSelectAll,
|
|
4682
|
+
size,
|
|
4683
|
+
disabled,
|
|
4684
|
+
slotProps: {
|
|
4685
|
+
action: {
|
|
4686
|
+
sx: { top: 0, left: 0, bottom: 0, right: 0 }
|
|
4687
|
+
}
|
|
4688
|
+
},
|
|
4689
|
+
sx: { width: "100%", height: itemSize }
|
|
4690
|
+
}
|
|
4691
|
+
),
|
|
4692
|
+
/* @__PURE__ */ React30.createElement(
|
|
4693
|
+
Stack_default,
|
|
4694
|
+
{
|
|
4695
|
+
sx: {
|
|
4696
|
+
height: `${virtualizer.getTotalSize()}px`,
|
|
4697
|
+
position: "relative"
|
|
4698
|
+
}
|
|
4699
|
+
},
|
|
4700
|
+
items.map((virtualRow) => {
|
|
4701
|
+
const option = filteredOptions[virtualRow.index];
|
|
4702
|
+
return /* @__PURE__ */ React30.createElement(
|
|
4703
|
+
Checkbox_default,
|
|
4704
|
+
{
|
|
4705
|
+
key: virtualRow.key,
|
|
4706
|
+
label: /* @__PURE__ */ React30.createElement(LabelWithTooltip, { label: option.label, size }),
|
|
4707
|
+
checked: internalValue.includes(option.value),
|
|
4708
|
+
onChange: handleCheckboxChange(option.value),
|
|
4709
|
+
size,
|
|
4710
|
+
disabled: disabled || option.disabled,
|
|
4711
|
+
slotProps: {
|
|
4712
|
+
action: {
|
|
4713
|
+
sx: { top: 0, left: 0, bottom: 0, right: 0 }
|
|
4714
|
+
// NOTE: 불필요한 좌우 스크롤 방지
|
|
4715
|
+
}
|
|
4716
|
+
},
|
|
4717
|
+
sx: {
|
|
4718
|
+
position: "absolute",
|
|
4719
|
+
top: 0,
|
|
4720
|
+
left: 0,
|
|
4721
|
+
width: "100%",
|
|
4722
|
+
height: `${virtualRow.size}px`,
|
|
4723
|
+
transform: `translateY(${virtualRow.start}px)`
|
|
4724
|
+
}
|
|
4725
|
+
}
|
|
4726
|
+
);
|
|
4727
|
+
})
|
|
4728
|
+
)
|
|
4729
|
+
));
|
|
4730
|
+
}
|
|
4731
|
+
FilterableCheckboxGroup.displayName = "FilterableCheckboxGroup";
|
|
4732
|
+
|
|
4412
4733
|
// src/components/FilterMenu/FilterMenu.tsx
|
|
4413
|
-
import
|
|
4414
|
-
import { Button as Button2, Stack as
|
|
4734
|
+
import React41, { useCallback as useCallback23 } from "react";
|
|
4735
|
+
import { Button as Button2, Stack as Stack11 } from "@mui/joy";
|
|
4415
4736
|
|
|
4416
4737
|
// src/components/FilterMenu/components/CheckboxGroup.tsx
|
|
4417
|
-
import
|
|
4738
|
+
import React31, { useCallback as useCallback14 } from "react";
|
|
4418
4739
|
import { Stack as Stack2 } from "@mui/joy";
|
|
4419
4740
|
function CheckboxGroup(props) {
|
|
4420
4741
|
const { id, label, options, value, onChange, hidden } = props;
|
|
4421
4742
|
const [internalValue, setInternalValue] = useControlledState(value, [], onChange);
|
|
4422
|
-
const handleCheckboxChange =
|
|
4743
|
+
const handleCheckboxChange = useCallback14(
|
|
4423
4744
|
(optionValue) => (event) => {
|
|
4424
4745
|
const checked = event.target.checked;
|
|
4425
4746
|
let newValue;
|
|
@@ -4435,7 +4756,7 @@ function CheckboxGroup(props) {
|
|
|
4435
4756
|
if (hidden) {
|
|
4436
4757
|
return null;
|
|
4437
4758
|
}
|
|
4438
|
-
return /* @__PURE__ */
|
|
4759
|
+
return /* @__PURE__ */ React31.createElement(Stack2, { spacing: 3, role: "group", "aria-labelledby": id }, !!label && /* @__PURE__ */ React31.createElement(Typography_default, { id, level: "title-sm", component: "label", textColor: "text.tertiary" }, label), options.map((option) => /* @__PURE__ */ React31.createElement(
|
|
4439
4760
|
Checkbox_default,
|
|
4440
4761
|
{
|
|
4441
4762
|
key: `${id}-${option.value}`,
|
|
@@ -4447,8 +4768,37 @@ function CheckboxGroup(props) {
|
|
|
4447
4768
|
}
|
|
4448
4769
|
CheckboxGroup.displayName = "CheckboxGroup";
|
|
4449
4770
|
|
|
4771
|
+
// src/components/FilterMenu/components/FilterableCheckboxGroup.tsx
|
|
4772
|
+
import React32, { useCallback as useCallback15 } from "react";
|
|
4773
|
+
import { Stack as Stack3 } from "@mui/joy";
|
|
4774
|
+
function FilterableCheckboxGroup2(props) {
|
|
4775
|
+
const { id, label, options, value, onChange, hidden, placeholder, maxHeight } = props;
|
|
4776
|
+
const [internalValue, setInternalValue] = useControlledState(value, [], onChange);
|
|
4777
|
+
const handleChange = useCallback15(
|
|
4778
|
+
(newValue) => {
|
|
4779
|
+
setInternalValue(newValue);
|
|
4780
|
+
},
|
|
4781
|
+
[setInternalValue]
|
|
4782
|
+
);
|
|
4783
|
+
if (hidden) {
|
|
4784
|
+
return null;
|
|
4785
|
+
}
|
|
4786
|
+
return /* @__PURE__ */ React32.createElement(Stack3, { spacing: 3, role: "group", "aria-labelledby": id }, !!label && /* @__PURE__ */ React32.createElement(Typography_default, { id, level: "title-sm", component: "label", textColor: "text.tertiary" }, label), /* @__PURE__ */ React32.createElement(
|
|
4787
|
+
FilterableCheckboxGroup,
|
|
4788
|
+
{
|
|
4789
|
+
value: internalValue ?? [],
|
|
4790
|
+
onChange: handleChange,
|
|
4791
|
+
options,
|
|
4792
|
+
placeholder,
|
|
4793
|
+
maxHeight,
|
|
4794
|
+
size: "sm"
|
|
4795
|
+
}
|
|
4796
|
+
));
|
|
4797
|
+
}
|
|
4798
|
+
FilterableCheckboxGroup2.displayName = "FilterableCheckboxGroup";
|
|
4799
|
+
|
|
4450
4800
|
// src/components/FilterMenu/components/RadioGroup.tsx
|
|
4451
|
-
import
|
|
4801
|
+
import React33, { useCallback as useCallback16 } from "react";
|
|
4452
4802
|
|
|
4453
4803
|
// src/components/Radio/Radio.tsx
|
|
4454
4804
|
import { Radio as JoyRadio, RadioGroup as JoyRadioGroup } from "@mui/joy";
|
|
@@ -4461,11 +4811,11 @@ var RadioGroup = MotionRadioGroup;
|
|
|
4461
4811
|
RadioGroup.displayName = "RadioGroup";
|
|
4462
4812
|
|
|
4463
4813
|
// src/components/FilterMenu/components/RadioGroup.tsx
|
|
4464
|
-
import { Stack as
|
|
4814
|
+
import { Stack as Stack4 } from "@mui/joy";
|
|
4465
4815
|
function RadioGroup2(props) {
|
|
4466
4816
|
const { id, label, options, value, onChange, hidden } = props;
|
|
4467
4817
|
const [internalValue, setInternalValue] = useControlledState(value, value ?? "", onChange);
|
|
4468
|
-
const handleRadioChange =
|
|
4818
|
+
const handleRadioChange = useCallback16(
|
|
4469
4819
|
(event) => {
|
|
4470
4820
|
const newValue = event.target.value;
|
|
4471
4821
|
const option = options.find((opt) => opt.value.toString() === newValue);
|
|
@@ -4477,13 +4827,13 @@ function RadioGroup2(props) {
|
|
|
4477
4827
|
if (hidden) {
|
|
4478
4828
|
return null;
|
|
4479
4829
|
}
|
|
4480
|
-
return /* @__PURE__ */
|
|
4830
|
+
return /* @__PURE__ */ React33.createElement(Stack4, { spacing: 3, role: "group", "aria-labelledby": id }, !!label && /* @__PURE__ */ React33.createElement(Stack4, { spacing: 1 }, /* @__PURE__ */ React33.createElement(Typography_default, { id, level: "title-sm", component: "label", textColor: "text.tertiary" }, label)), /* @__PURE__ */ React33.createElement(RadioGroup, { name: id, value: internalValue?.toString(), onChange: handleRadioChange }, options.map((option) => /* @__PURE__ */ React33.createElement(Radio, { key: `${id}-${option.value}`, value: option.value.toString(), label: option.label }))));
|
|
4481
4831
|
}
|
|
4482
4832
|
RadioGroup2.displayName = "RadioGroup";
|
|
4483
4833
|
|
|
4484
4834
|
// src/components/FilterMenu/components/DateRange.tsx
|
|
4485
|
-
import
|
|
4486
|
-
import { Stack as
|
|
4835
|
+
import React34, { useCallback as useCallback17, useMemo as useMemo13, useState as useState11, useEffect as useEffect9 } from "react";
|
|
4836
|
+
import { Stack as Stack5 } from "@mui/joy";
|
|
4487
4837
|
function DateRange(props) {
|
|
4488
4838
|
const {
|
|
4489
4839
|
id,
|
|
@@ -4495,14 +4845,13 @@ function DateRange(props) {
|
|
|
4495
4845
|
maxDate,
|
|
4496
4846
|
disableFuture,
|
|
4497
4847
|
disablePast,
|
|
4498
|
-
format = "YYYY/MM/DD",
|
|
4499
4848
|
displayFormat,
|
|
4500
4849
|
inputReadOnly,
|
|
4501
4850
|
hideClearButton
|
|
4502
4851
|
} = props;
|
|
4503
4852
|
const [internalValue, setInternalValue] = useControlledState(value, null, onChange);
|
|
4504
|
-
const [selectedOption, setSelectedOption] =
|
|
4505
|
-
const dateRangeOptions =
|
|
4853
|
+
const [selectedOption, setSelectedOption] = useState11("all-time");
|
|
4854
|
+
const dateRangeOptions = useMemo13(
|
|
4506
4855
|
() => [
|
|
4507
4856
|
{ label: "All Time", value: "all-time" },
|
|
4508
4857
|
{ label: "This Month", value: "this-month" },
|
|
@@ -4512,7 +4861,7 @@ function DateRange(props) {
|
|
|
4512
4861
|
],
|
|
4513
4862
|
[]
|
|
4514
4863
|
);
|
|
4515
|
-
const getDateRangeForOption =
|
|
4864
|
+
const getDateRangeForOption = useCallback17(
|
|
4516
4865
|
(option) => {
|
|
4517
4866
|
const now = /* @__PURE__ */ new Date();
|
|
4518
4867
|
const currentYear = now.getFullYear();
|
|
@@ -4551,7 +4900,7 @@ function DateRange(props) {
|
|
|
4551
4900
|
},
|
|
4552
4901
|
[internalValue]
|
|
4553
4902
|
);
|
|
4554
|
-
const determineOptionFromValue =
|
|
4903
|
+
const determineOptionFromValue = useCallback17(
|
|
4555
4904
|
(value2) => {
|
|
4556
4905
|
if (!value2) {
|
|
4557
4906
|
return "all-time";
|
|
@@ -4567,17 +4916,17 @@ function DateRange(props) {
|
|
|
4567
4916
|
},
|
|
4568
4917
|
[getDateRangeForOption]
|
|
4569
4918
|
);
|
|
4570
|
-
const customDateRangeValue =
|
|
4919
|
+
const customDateRangeValue = useMemo13(() => {
|
|
4571
4920
|
if (selectedOption === "custom" && internalValue) {
|
|
4572
4921
|
return `${internalValue[0]} - ${internalValue[1]}`;
|
|
4573
4922
|
}
|
|
4574
4923
|
return "";
|
|
4575
4924
|
}, [selectedOption, internalValue]);
|
|
4576
|
-
|
|
4925
|
+
useEffect9(() => {
|
|
4577
4926
|
const newOption = determineOptionFromValue(internalValue);
|
|
4578
4927
|
setSelectedOption(newOption);
|
|
4579
4928
|
}, [internalValue, determineOptionFromValue]);
|
|
4580
|
-
const handleOptionChange =
|
|
4929
|
+
const handleOptionChange = useCallback17(
|
|
4581
4930
|
(event) => {
|
|
4582
4931
|
const newOption = event.target.value;
|
|
4583
4932
|
setSelectedOption(newOption);
|
|
@@ -4586,25 +4935,28 @@ function DateRange(props) {
|
|
|
4586
4935
|
},
|
|
4587
4936
|
[getDateRangeForOption, setInternalValue]
|
|
4588
4937
|
);
|
|
4589
|
-
const handleCustomDateChange =
|
|
4938
|
+
const handleCustomDateChange = useCallback17(
|
|
4590
4939
|
(event) => {
|
|
4591
4940
|
const dateRangeString = event.target.value;
|
|
4592
4941
|
if (dateRangeString && dateRangeString.includes(" - ")) {
|
|
4593
4942
|
const [startDate, endDate] = dateRangeString.split(" - ");
|
|
4594
4943
|
if (startDate && endDate) {
|
|
4595
4944
|
const newValue = [startDate, endDate];
|
|
4596
|
-
|
|
4945
|
+
const hasChanged = !internalValue || internalValue[0] !== startDate || internalValue[1] !== endDate;
|
|
4946
|
+
if (hasChanged) {
|
|
4947
|
+
setInternalValue(newValue);
|
|
4948
|
+
}
|
|
4597
4949
|
}
|
|
4598
4950
|
} else if (!dateRangeString) {
|
|
4599
4951
|
setInternalValue(null);
|
|
4600
4952
|
}
|
|
4601
4953
|
},
|
|
4602
|
-
[setInternalValue]
|
|
4954
|
+
[setInternalValue, internalValue]
|
|
4603
4955
|
);
|
|
4604
4956
|
if (hidden) {
|
|
4605
4957
|
return null;
|
|
4606
4958
|
}
|
|
4607
|
-
return /* @__PURE__ */
|
|
4959
|
+
return /* @__PURE__ */ React34.createElement(Stack5, { spacing: 3, role: "group", "aria-labelledby": id }, !!label && /* @__PURE__ */ React34.createElement(Typography_default, { id, level: "title-sm", component: "label", textColor: "text.tertiary" }, label), /* @__PURE__ */ React34.createElement(RadioGroup, { name: `${id}-options`, value: selectedOption, onChange: handleOptionChange }, dateRangeOptions.map((option) => /* @__PURE__ */ React34.createElement(Radio, { key: `${id}-${option.value}`, value: option.value, label: option.label }))), selectedOption === "custom" && /* @__PURE__ */ React34.createElement(
|
|
4608
4960
|
DateRangePicker,
|
|
4609
4961
|
{
|
|
4610
4962
|
value: customDateRangeValue,
|
|
@@ -4613,7 +4965,7 @@ function DateRange(props) {
|
|
|
4613
4965
|
maxDate,
|
|
4614
4966
|
disableFuture,
|
|
4615
4967
|
disablePast,
|
|
4616
|
-
format,
|
|
4968
|
+
format: "YYYY-MM-DD",
|
|
4617
4969
|
displayFormat,
|
|
4618
4970
|
inputReadOnly,
|
|
4619
4971
|
hideClearButton
|
|
@@ -4623,12 +4975,12 @@ function DateRange(props) {
|
|
|
4623
4975
|
DateRange.displayName = "DateRange";
|
|
4624
4976
|
|
|
4625
4977
|
// src/components/FilterMenu/components/CurrencyInput.tsx
|
|
4626
|
-
import
|
|
4627
|
-
import { Stack as
|
|
4978
|
+
import React35, { useCallback as useCallback18 } from "react";
|
|
4979
|
+
import { Stack as Stack6 } from "@mui/joy";
|
|
4628
4980
|
function CurrencyInput3(props) {
|
|
4629
4981
|
const { id, label, value, onChange, hidden, max, placeholder, useMinorUnit, currency = "USD" } = props;
|
|
4630
4982
|
const [internalValue, setInternalValue] = useControlledState(value, value, onChange);
|
|
4631
|
-
const handleCurrencyChange =
|
|
4983
|
+
const handleCurrencyChange = useCallback18(
|
|
4632
4984
|
(event) => {
|
|
4633
4985
|
const newValue = event.target.value;
|
|
4634
4986
|
setInternalValue(newValue);
|
|
@@ -4638,7 +4990,7 @@ function CurrencyInput3(props) {
|
|
|
4638
4990
|
if (hidden) {
|
|
4639
4991
|
return null;
|
|
4640
4992
|
}
|
|
4641
|
-
return /* @__PURE__ */
|
|
4993
|
+
return /* @__PURE__ */ React35.createElement(Stack6, { spacing: 3, role: "group", "aria-labelledby": id }, !!label && /* @__PURE__ */ React35.createElement(Typography_default, { id, level: "title-sm", component: "label", textColor: "text.tertiary" }, label), /* @__PURE__ */ React35.createElement(
|
|
4642
4994
|
CurrencyInput,
|
|
4643
4995
|
{
|
|
4644
4996
|
value: internalValue,
|
|
@@ -4654,14 +5006,14 @@ function CurrencyInput3(props) {
|
|
|
4654
5006
|
CurrencyInput3.displayName = "CurrencyInput";
|
|
4655
5007
|
|
|
4656
5008
|
// src/components/FilterMenu/components/CurrencyRange.tsx
|
|
4657
|
-
import
|
|
4658
|
-
import { Stack as
|
|
5009
|
+
import React36, { useCallback as useCallback19 } from "react";
|
|
5010
|
+
import { Stack as Stack7 } from "@mui/joy";
|
|
4659
5011
|
function CurrencyRange(props) {
|
|
4660
5012
|
const { id, label, value, onChange, hidden, max, placeholder, useMinorUnit, currency = "USD" } = props;
|
|
4661
5013
|
const [internalValue, setInternalValue] = useControlledState(value, null, onChange);
|
|
4662
5014
|
const minValue = internalValue?.[0];
|
|
4663
5015
|
const maxValue = internalValue?.[1];
|
|
4664
|
-
const handleMinChange =
|
|
5016
|
+
const handleMinChange = useCallback19(
|
|
4665
5017
|
(event) => {
|
|
4666
5018
|
const newMinValue = event.target.value;
|
|
4667
5019
|
const currentMaxValue = maxValue;
|
|
@@ -4675,7 +5027,7 @@ function CurrencyRange(props) {
|
|
|
4675
5027
|
},
|
|
4676
5028
|
[maxValue, setInternalValue]
|
|
4677
5029
|
);
|
|
4678
|
-
const handleMaxChange =
|
|
5030
|
+
const handleMaxChange = useCallback19(
|
|
4679
5031
|
(event) => {
|
|
4680
5032
|
const newMaxValue = event.target.value;
|
|
4681
5033
|
const currentMinValue = minValue;
|
|
@@ -4692,7 +5044,7 @@ function CurrencyRange(props) {
|
|
|
4692
5044
|
if (hidden) {
|
|
4693
5045
|
return null;
|
|
4694
5046
|
}
|
|
4695
|
-
return /* @__PURE__ */
|
|
5047
|
+
return /* @__PURE__ */ React36.createElement(Stack7, { spacing: 3, role: "group", "aria-labelledby": id }, !!label && /* @__PURE__ */ React36.createElement(Typography_default, { id, level: "title-sm", component: "label", textColor: "text.tertiary" }, label), /* @__PURE__ */ React36.createElement(Stack7, { direction: "row", spacing: 2, alignItems: "flex-end" }, /* @__PURE__ */ React36.createElement(
|
|
4696
5048
|
CurrencyInput,
|
|
4697
5049
|
{
|
|
4698
5050
|
label: "Minimum",
|
|
@@ -4705,7 +5057,7 @@ function CurrencyRange(props) {
|
|
|
4705
5057
|
"aria-labelledby": label ? id : void 0,
|
|
4706
5058
|
"aria-label": "Minimum amount"
|
|
4707
5059
|
}
|
|
4708
|
-
), /* @__PURE__ */
|
|
5060
|
+
), /* @__PURE__ */ React36.createElement(
|
|
4709
5061
|
CurrencyInput,
|
|
4710
5062
|
{
|
|
4711
5063
|
label: "Maximum",
|
|
@@ -4723,20 +5075,20 @@ function CurrencyRange(props) {
|
|
|
4723
5075
|
CurrencyRange.displayName = "CurrencyRange";
|
|
4724
5076
|
|
|
4725
5077
|
// src/components/FilterMenu/components/PercentageInput.tsx
|
|
4726
|
-
import
|
|
4727
|
-
import { Stack as
|
|
5078
|
+
import React38 from "react";
|
|
5079
|
+
import { Stack as Stack8, Typography as Typography2 } from "@mui/joy";
|
|
4728
5080
|
|
|
4729
5081
|
// src/components/PercentageInput/PercentageInput.tsx
|
|
4730
|
-
import
|
|
5082
|
+
import React37, { useCallback as useCallback20, useMemo as useMemo14, useState as useState12 } from "react";
|
|
4731
5083
|
import { NumericFormat as NumericFormat2 } from "react-number-format";
|
|
4732
5084
|
import { styled as styled20, useThemeProps as useThemeProps6 } from "@mui/joy";
|
|
4733
5085
|
var padDecimal = (value, decimalScale) => {
|
|
4734
5086
|
const [integer, decimal = ""] = `${value}`.split(".");
|
|
4735
5087
|
return Number(`${integer}${decimal.padEnd(decimalScale, "0")}`);
|
|
4736
5088
|
};
|
|
4737
|
-
var TextMaskAdapter7 =
|
|
5089
|
+
var TextMaskAdapter7 = React37.forwardRef(function TextMaskAdapter8(props, ref) {
|
|
4738
5090
|
const { onChange, min, max, ...innerProps } = props;
|
|
4739
|
-
return /* @__PURE__ */
|
|
5091
|
+
return /* @__PURE__ */ React37.createElement(
|
|
4740
5092
|
NumericFormat2,
|
|
4741
5093
|
{
|
|
4742
5094
|
...innerProps,
|
|
@@ -4761,7 +5113,7 @@ var PercentageInputRoot = styled20(Input_default, {
|
|
|
4761
5113
|
slot: "Root",
|
|
4762
5114
|
overridesResolver: (props, styles) => styles.root
|
|
4763
5115
|
})({});
|
|
4764
|
-
var PercentageInput =
|
|
5116
|
+
var PercentageInput = React37.forwardRef(
|
|
4765
5117
|
function PercentageInput2(inProps, ref) {
|
|
4766
5118
|
const props = useThemeProps6({ props: inProps, name: "PercentageInput" });
|
|
4767
5119
|
const {
|
|
@@ -4784,18 +5136,18 @@ var PercentageInput = React35.forwardRef(
|
|
|
4784
5136
|
const [_value, setValue] = useControlledState(
|
|
4785
5137
|
props.value,
|
|
4786
5138
|
props.defaultValue,
|
|
4787
|
-
|
|
5139
|
+
useCallback20((value2) => onChange?.({ target: { name, value: value2 } }), [onChange, name])
|
|
4788
5140
|
);
|
|
4789
|
-
const [internalError, setInternalError] =
|
|
5141
|
+
const [internalError, setInternalError] = useState12(
|
|
4790
5142
|
max && _value && _value > max || min && _value && _value < min
|
|
4791
5143
|
);
|
|
4792
|
-
const value =
|
|
5144
|
+
const value = useMemo14(() => {
|
|
4793
5145
|
if (_value && useMinorUnit) {
|
|
4794
5146
|
return _value / Math.pow(10, maxDecimalScale);
|
|
4795
5147
|
}
|
|
4796
5148
|
return _value;
|
|
4797
5149
|
}, [_value, useMinorUnit, maxDecimalScale]);
|
|
4798
|
-
const handleChange =
|
|
5150
|
+
const handleChange = useCallback20(
|
|
4799
5151
|
(event) => {
|
|
4800
5152
|
if (event.target.value === "") {
|
|
4801
5153
|
setValue(void 0);
|
|
@@ -4812,7 +5164,7 @@ var PercentageInput = React35.forwardRef(
|
|
|
4812
5164
|
},
|
|
4813
5165
|
[setValue, useMinorUnit, maxDecimalScale, min, max]
|
|
4814
5166
|
);
|
|
4815
|
-
return /* @__PURE__ */
|
|
5167
|
+
return /* @__PURE__ */ React37.createElement(
|
|
4816
5168
|
PercentageInputRoot,
|
|
4817
5169
|
{
|
|
4818
5170
|
...innerProps,
|
|
@@ -4859,7 +5211,7 @@ var PercentageInput3 = ({
|
|
|
4859
5211
|
if (hidden) {
|
|
4860
5212
|
return null;
|
|
4861
5213
|
}
|
|
4862
|
-
return /* @__PURE__ */
|
|
5214
|
+
return /* @__PURE__ */ React38.createElement(Stack8, { spacing: 3, role: "group", "aria-labelledby": id }, !!label && /* @__PURE__ */ React38.createElement(Typography2, { id, level: "title-sm", component: "label", textColor: "text.tertiary" }, label), /* @__PURE__ */ React38.createElement(
|
|
4863
5215
|
PercentageInput,
|
|
4864
5216
|
{
|
|
4865
5217
|
value: _value,
|
|
@@ -4874,8 +5226,8 @@ var PercentageInput3 = ({
|
|
|
4874
5226
|
};
|
|
4875
5227
|
|
|
4876
5228
|
// src/components/FilterMenu/components/PercentageRange.tsx
|
|
4877
|
-
import
|
|
4878
|
-
import { Stack as
|
|
5229
|
+
import React39, { useCallback as useCallback21 } from "react";
|
|
5230
|
+
import { Stack as Stack9 } from "@mui/joy";
|
|
4879
5231
|
function PercentageRange(props) {
|
|
4880
5232
|
const { id, label, value, onChange, hidden, useMinorUnit, maxDecimalScale, min, max } = props;
|
|
4881
5233
|
const [internalValue, setInternalValue] = useControlledState(
|
|
@@ -4885,7 +5237,7 @@ function PercentageRange(props) {
|
|
|
4885
5237
|
);
|
|
4886
5238
|
const minValue = internalValue?.[0];
|
|
4887
5239
|
const maxValue = internalValue?.[1];
|
|
4888
|
-
const handleMinChange =
|
|
5240
|
+
const handleMinChange = useCallback21(
|
|
4889
5241
|
(event) => {
|
|
4890
5242
|
const newMinValue = event.target.value;
|
|
4891
5243
|
const currentMaxValue = maxValue;
|
|
@@ -4897,7 +5249,7 @@ function PercentageRange(props) {
|
|
|
4897
5249
|
},
|
|
4898
5250
|
[maxValue, setInternalValue]
|
|
4899
5251
|
);
|
|
4900
|
-
const handleMaxChange =
|
|
5252
|
+
const handleMaxChange = useCallback21(
|
|
4901
5253
|
(event) => {
|
|
4902
5254
|
const newMaxValue = event.target.value;
|
|
4903
5255
|
const currentMinValue = minValue;
|
|
@@ -4912,7 +5264,7 @@ function PercentageRange(props) {
|
|
|
4912
5264
|
if (hidden) {
|
|
4913
5265
|
return null;
|
|
4914
5266
|
}
|
|
4915
|
-
return /* @__PURE__ */
|
|
5267
|
+
return /* @__PURE__ */ React39.createElement(Stack9, { spacing: 3, role: "group", "aria-labelledby": id }, !!label && /* @__PURE__ */ React39.createElement(Typography_default, { id, level: "title-sm", component: "label", textColor: "text.tertiary" }, label), /* @__PURE__ */ React39.createElement(Stack9, { direction: "row", spacing: 2, alignItems: "flex-end" }, /* @__PURE__ */ React39.createElement(
|
|
4916
5268
|
PercentageInput,
|
|
4917
5269
|
{
|
|
4918
5270
|
label: "Minimum",
|
|
@@ -4926,7 +5278,7 @@ function PercentageRange(props) {
|
|
|
4926
5278
|
"aria-label": "Minimum percentage",
|
|
4927
5279
|
placeholder: "0%"
|
|
4928
5280
|
}
|
|
4929
|
-
), /* @__PURE__ */
|
|
5281
|
+
), /* @__PURE__ */ React39.createElement(
|
|
4930
5282
|
PercentageInput,
|
|
4931
5283
|
{
|
|
4932
5284
|
label: "Maximum",
|
|
@@ -4945,13 +5297,13 @@ function PercentageRange(props) {
|
|
|
4945
5297
|
PercentageRange.displayName = "PercentageRange";
|
|
4946
5298
|
|
|
4947
5299
|
// src/components/FilterMenu/components/Autocomplete.tsx
|
|
4948
|
-
import
|
|
4949
|
-
import { Stack as
|
|
5300
|
+
import React40, { useCallback as useCallback22 } from "react";
|
|
5301
|
+
import { Stack as Stack10 } from "@mui/joy";
|
|
4950
5302
|
function Autocomplete2(props) {
|
|
4951
5303
|
const { id, label, value, onChange, options, multiple, hidden, placeholder } = props;
|
|
4952
5304
|
const [internalValue, setInternalValue] = useControlledState(value, void 0, onChange);
|
|
4953
5305
|
const autocompleteValue = typeof internalValue === "string" || typeof internalValue === "number" ? String(internalValue) : void 0;
|
|
4954
|
-
const handleChange =
|
|
5306
|
+
const handleChange = useCallback22(
|
|
4955
5307
|
(event) => {
|
|
4956
5308
|
const val = event.target.value;
|
|
4957
5309
|
if (val) {
|
|
@@ -4966,7 +5318,7 @@ function Autocomplete2(props) {
|
|
|
4966
5318
|
if (hidden) {
|
|
4967
5319
|
return null;
|
|
4968
5320
|
}
|
|
4969
|
-
return /* @__PURE__ */
|
|
5321
|
+
return /* @__PURE__ */ React40.createElement(Stack10, { spacing: 3, role: "group", "aria-labelledby": id }, !!label && /* @__PURE__ */ React40.createElement(Typography_default, { id, level: "title-sm", component: "label", textColor: "text.tertiary" }, label), /* @__PURE__ */ React40.createElement(
|
|
4970
5322
|
Autocomplete,
|
|
4971
5323
|
{
|
|
4972
5324
|
value: autocompleteValue,
|
|
@@ -4983,6 +5335,7 @@ Autocomplete2.displayName = "Autocomplete";
|
|
|
4983
5335
|
// src/components/FilterMenu/FilterMenu.tsx
|
|
4984
5336
|
var componentMap = {
|
|
4985
5337
|
"checkbox-group": CheckboxGroup,
|
|
5338
|
+
"filterable-checkbox-group": FilterableCheckboxGroup2,
|
|
4986
5339
|
"radio-group": RadioGroup2,
|
|
4987
5340
|
"date-range": DateRange,
|
|
4988
5341
|
"currency-input": CurrencyInput3,
|
|
@@ -4999,7 +5352,7 @@ function FilterMenu(props) {
|
|
|
4999
5352
|
void 0
|
|
5000
5353
|
// onChange는 Apply 버튼에서만 호출
|
|
5001
5354
|
);
|
|
5002
|
-
const handleFilterChange =
|
|
5355
|
+
const handleFilterChange = useCallback23(
|
|
5003
5356
|
(filterId, value) => {
|
|
5004
5357
|
setInternalValues((prev) => ({
|
|
5005
5358
|
...prev,
|
|
@@ -5008,17 +5361,17 @@ function FilterMenu(props) {
|
|
|
5008
5361
|
},
|
|
5009
5362
|
[setInternalValues]
|
|
5010
5363
|
);
|
|
5011
|
-
const handleApply =
|
|
5364
|
+
const handleApply = useCallback23(() => {
|
|
5012
5365
|
onChange?.(internalValues);
|
|
5013
5366
|
onClose?.();
|
|
5014
5367
|
}, [onChange, onClose, internalValues]);
|
|
5015
|
-
const handleClear =
|
|
5368
|
+
const handleClear = useCallback23(() => {
|
|
5016
5369
|
const clearedValues = resetValues || {};
|
|
5017
5370
|
setInternalValues(clearedValues);
|
|
5018
5371
|
onChange?.(clearedValues);
|
|
5019
5372
|
onClose?.();
|
|
5020
5373
|
}, [resetValues, setInternalValues, onChange, onClose]);
|
|
5021
|
-
return /* @__PURE__ */
|
|
5374
|
+
return /* @__PURE__ */ React41.createElement(
|
|
5022
5375
|
ModalDialog,
|
|
5023
5376
|
{
|
|
5024
5377
|
sx: {
|
|
@@ -5028,9 +5381,9 @@ function FilterMenu(props) {
|
|
|
5028
5381
|
top: "initial"
|
|
5029
5382
|
}
|
|
5030
5383
|
},
|
|
5031
|
-
/* @__PURE__ */
|
|
5384
|
+
/* @__PURE__ */ React41.createElement(DialogContent, { sx: { paddingTop: 5 } }, /* @__PURE__ */ React41.createElement(Stack11, { spacing: 6 }, filters?.map((filter) => {
|
|
5032
5385
|
const FilterComponent = componentMap[filter.type];
|
|
5033
|
-
return FilterComponent ? /* @__PURE__ */
|
|
5386
|
+
return FilterComponent ? /* @__PURE__ */ React41.createElement(
|
|
5034
5387
|
FilterComponent,
|
|
5035
5388
|
{
|
|
5036
5389
|
key: filter.id,
|
|
@@ -5042,13 +5395,13 @@ function FilterMenu(props) {
|
|
|
5042
5395
|
}
|
|
5043
5396
|
) : null;
|
|
5044
5397
|
}))),
|
|
5045
|
-
/* @__PURE__ */
|
|
5398
|
+
/* @__PURE__ */ React41.createElement(DialogActions, { sx: { justifyContent: "space-between" } }, useClear && filters?.length === 1 && /* @__PURE__ */ React41.createElement(Button2, { variant: "plain", color: "neutral", size: "md", onClick: handleClear }, "Clear"), useReset && !useClear && /* @__PURE__ */ React41.createElement(Button2, { variant: "plain", color: "neutral", size: "md", onClick: handleClear }, "Reset"), /* @__PURE__ */ React41.createElement(Button2, { variant: "solid", color: "primary", size: "md", onClick: handleApply }, "Apply"))
|
|
5046
5399
|
);
|
|
5047
5400
|
}
|
|
5048
5401
|
FilterMenu.displayName = "FilterMenu";
|
|
5049
5402
|
|
|
5050
5403
|
// src/components/Uploader/Uploader.tsx
|
|
5051
|
-
import
|
|
5404
|
+
import React42, { useCallback as useCallback24, useEffect as useEffect10, useMemo as useMemo15, useRef as useRef9, useState as useState13 } from "react";
|
|
5052
5405
|
import { styled as styled21, Input as Input2 } from "@mui/joy";
|
|
5053
5406
|
import MuiFileUploadIcon from "@mui/icons-material/CloudUploadRounded";
|
|
5054
5407
|
import MuiUploadFileIcon from "@mui/icons-material/UploadFileRounded";
|
|
@@ -5125,7 +5478,7 @@ var getFileSize = (n) => {
|
|
|
5125
5478
|
};
|
|
5126
5479
|
var Preview = (props) => {
|
|
5127
5480
|
const { files, uploaded, onDelete } = props;
|
|
5128
|
-
return /* @__PURE__ */
|
|
5481
|
+
return /* @__PURE__ */ React42.createElement(PreviewRoot, { gap: 1 }, [...uploaded, ...files].map((file) => /* @__PURE__ */ React42.createElement(UploadCard, { key: file.name, size: "sm", color: "neutral" }, /* @__PURE__ */ React42.createElement(Stack_default, { direction: "row", alignItems: "center", gap: 2 }, /* @__PURE__ */ React42.createElement(UploadFileIcon, null), /* @__PURE__ */ React42.createElement(Stack_default, { flex: "1", sx: { overflow: "hidden" } }, /* @__PURE__ */ React42.createElement(
|
|
5129
5482
|
Typography_default,
|
|
5130
5483
|
{
|
|
5131
5484
|
level: "body-sm",
|
|
@@ -5137,7 +5490,7 @@ var Preview = (props) => {
|
|
|
5137
5490
|
}
|
|
5138
5491
|
},
|
|
5139
5492
|
file.name
|
|
5140
|
-
), !!file.size && /* @__PURE__ */
|
|
5493
|
+
), !!file.size && /* @__PURE__ */ React42.createElement(Typography_default, { level: "body-xs", fontWeight: "300", lineHeight: "1.33", textColor: "text.tertiary" }, getFileSize(file.size))), /* @__PURE__ */ React42.createElement(IconButton_default, { onClick: () => onDelete?.(file) }, /* @__PURE__ */ React42.createElement(ClearIcon2, null))))));
|
|
5141
5494
|
};
|
|
5142
5495
|
var UploaderRoot = styled21(Stack_default, {
|
|
5143
5496
|
name: "Uploader",
|
|
@@ -5180,7 +5533,7 @@ var UploaderIcon = styled21(MuiFileUploadIcon, {
|
|
|
5180
5533
|
}
|
|
5181
5534
|
})
|
|
5182
5535
|
);
|
|
5183
|
-
var Uploader =
|
|
5536
|
+
var Uploader = React42.memo(
|
|
5184
5537
|
(props) => {
|
|
5185
5538
|
const {
|
|
5186
5539
|
accept,
|
|
@@ -5197,14 +5550,14 @@ var Uploader = React40.memo(
|
|
|
5197
5550
|
error: errorProp,
|
|
5198
5551
|
helperText: helperTextProp
|
|
5199
5552
|
} = props;
|
|
5200
|
-
const dropZoneRef =
|
|
5201
|
-
const inputRef =
|
|
5202
|
-
const [errorText, setErrorText] =
|
|
5203
|
-
const [files, setFiles] =
|
|
5204
|
-
const [uploaded, setUploaded] =
|
|
5205
|
-
const [previewState, setPreviewState] =
|
|
5206
|
-
const accepts =
|
|
5207
|
-
const parsedAccepts =
|
|
5553
|
+
const dropZoneRef = useRef9(null);
|
|
5554
|
+
const inputRef = useRef9(null);
|
|
5555
|
+
const [errorText, setErrorText] = useState13();
|
|
5556
|
+
const [files, setFiles] = useState13([]);
|
|
5557
|
+
const [uploaded, setUploaded] = useState13(props.uploaded || []);
|
|
5558
|
+
const [previewState, setPreviewState] = useState13("idle");
|
|
5559
|
+
const accepts = useMemo15(() => accept.split(",").map((accept2) => accept2.trim()), [accept]);
|
|
5560
|
+
const parsedAccepts = useMemo15(
|
|
5208
5561
|
() => accepts.flatMap((type) => {
|
|
5209
5562
|
if (["image/*", "video/*", "audio/*"].includes(type)) {
|
|
5210
5563
|
return ALL_EXTENSIONS_BY_TYPE[type];
|
|
@@ -5213,7 +5566,7 @@ var Uploader = React40.memo(
|
|
|
5213
5566
|
}),
|
|
5214
5567
|
[accepts]
|
|
5215
5568
|
);
|
|
5216
|
-
const helperText =
|
|
5569
|
+
const helperText = useMemo15(() => {
|
|
5217
5570
|
if (helperTextProp) {
|
|
5218
5571
|
return helperTextProp;
|
|
5219
5572
|
}
|
|
@@ -5243,12 +5596,12 @@ var Uploader = React40.memo(
|
|
|
5243
5596
|
}
|
|
5244
5597
|
return helperTexts.join(", ");
|
|
5245
5598
|
}, [accepts, maxFileTotalSize, maxCount, helperTextProp]);
|
|
5246
|
-
const error =
|
|
5247
|
-
const showDropZone =
|
|
5599
|
+
const error = useMemo15(() => !!errorText || errorProp, [errorProp, errorText]);
|
|
5600
|
+
const showDropZone = useMemo15(
|
|
5248
5601
|
() => !maxCount || maxCount && [...uploaded, ...files].length !== maxCount,
|
|
5249
5602
|
[files, maxCount, uploaded]
|
|
5250
5603
|
);
|
|
5251
|
-
const addFiles =
|
|
5604
|
+
const addFiles = useCallback24(
|
|
5252
5605
|
(uploads) => {
|
|
5253
5606
|
try {
|
|
5254
5607
|
const types = parsedAccepts.map((type) => type.replace(".", "")) || [];
|
|
@@ -5293,7 +5646,7 @@ var Uploader = React40.memo(
|
|
|
5293
5646
|
},
|
|
5294
5647
|
[files, uploaded, maxCount, parsedAccepts, maxFileSize, maxFileTotalSize, name, onChange]
|
|
5295
5648
|
);
|
|
5296
|
-
|
|
5649
|
+
useEffect10(() => {
|
|
5297
5650
|
if (!dropZoneRef.current || disabled) {
|
|
5298
5651
|
return;
|
|
5299
5652
|
}
|
|
@@ -5331,7 +5684,7 @@ var Uploader = React40.memo(
|
|
|
5331
5684
|
);
|
|
5332
5685
|
return () => cleanup?.();
|
|
5333
5686
|
}, [disabled, addFiles]);
|
|
5334
|
-
|
|
5687
|
+
useEffect10(() => {
|
|
5335
5688
|
if (inputRef.current && minCount) {
|
|
5336
5689
|
if (files.length < minCount) {
|
|
5337
5690
|
inputRef.current.setCustomValidity(`At least ${minCount} files are required.`);
|
|
@@ -5340,14 +5693,14 @@ var Uploader = React40.memo(
|
|
|
5340
5693
|
}
|
|
5341
5694
|
}
|
|
5342
5695
|
}, [inputRef, files, minCount]);
|
|
5343
|
-
const handleFileChanged =
|
|
5696
|
+
const handleFileChanged = useCallback24(
|
|
5344
5697
|
(event) => {
|
|
5345
5698
|
const files2 = Array.from(event.target.files || []);
|
|
5346
5699
|
addFiles(files2);
|
|
5347
5700
|
},
|
|
5348
5701
|
[addFiles]
|
|
5349
5702
|
);
|
|
5350
|
-
const handleDeleteFile =
|
|
5703
|
+
const handleDeleteFile = useCallback24(
|
|
5351
5704
|
(deletedFile) => {
|
|
5352
5705
|
if (deletedFile instanceof File) {
|
|
5353
5706
|
setFiles((current) => {
|
|
@@ -5367,10 +5720,10 @@ var Uploader = React40.memo(
|
|
|
5367
5720
|
},
|
|
5368
5721
|
[name, onChange, onDelete]
|
|
5369
5722
|
);
|
|
5370
|
-
const handleUploaderButtonClick =
|
|
5723
|
+
const handleUploaderButtonClick = useCallback24(() => {
|
|
5371
5724
|
inputRef.current?.click();
|
|
5372
5725
|
}, []);
|
|
5373
|
-
const uploader = /* @__PURE__ */
|
|
5726
|
+
const uploader = /* @__PURE__ */ React42.createElement(
|
|
5374
5727
|
FileDropZone,
|
|
5375
5728
|
{
|
|
5376
5729
|
state: previewState,
|
|
@@ -5379,8 +5732,8 @@ var Uploader = React40.memo(
|
|
|
5379
5732
|
ref: dropZoneRef,
|
|
5380
5733
|
onClick: handleUploaderButtonClick
|
|
5381
5734
|
},
|
|
5382
|
-
/* @__PURE__ */
|
|
5383
|
-
/* @__PURE__ */
|
|
5735
|
+
/* @__PURE__ */ React42.createElement(Stack_default, { alignItems: "center", gap: 1 }, /* @__PURE__ */ React42.createElement(UploaderIcon, { state: previewState, error: !!(error || errorText), disabled })),
|
|
5736
|
+
/* @__PURE__ */ React42.createElement(
|
|
5384
5737
|
VisuallyHiddenInput,
|
|
5385
5738
|
{
|
|
5386
5739
|
disabled,
|
|
@@ -5403,7 +5756,7 @@ var Uploader = React40.memo(
|
|
|
5403
5756
|
}
|
|
5404
5757
|
)
|
|
5405
5758
|
);
|
|
5406
|
-
return /* @__PURE__ */
|
|
5759
|
+
return /* @__PURE__ */ React42.createElement(UploaderRoot, null, showDropZone && /* @__PURE__ */ React42.createElement(FormControl_default, { size, error: !!(error || errorText), disabled, required: !!minCount }, label && /* @__PURE__ */ React42.createElement(FormLabel_default, null, label), uploader, /* @__PURE__ */ React42.createElement(FormHelperText_default, null, /* @__PURE__ */ React42.createElement(Stack_default, null, errorText && /* @__PURE__ */ React42.createElement("div", null, errorText), /* @__PURE__ */ React42.createElement("div", null, helperText)))), [...uploaded, ...files].length > 0 && /* @__PURE__ */ React42.createElement(Preview, { files, uploaded, onDelete: handleDeleteFile }));
|
|
5407
5760
|
}
|
|
5408
5761
|
);
|
|
5409
5762
|
Uploader.displayName = "Uploader";
|
|
@@ -5412,7 +5765,7 @@ Uploader.displayName = "Uploader";
|
|
|
5412
5765
|
import { Grid } from "@mui/joy";
|
|
5413
5766
|
|
|
5414
5767
|
// src/components/IconMenuButton/IconMenuButton.tsx
|
|
5415
|
-
import
|
|
5768
|
+
import React43 from "react";
|
|
5416
5769
|
import { MenuButton as JoyMenuButton2, IconButton as JoyIconButton2 } from "@mui/joy";
|
|
5417
5770
|
function IconMenuButton(props) {
|
|
5418
5771
|
const {
|
|
@@ -5426,7 +5779,7 @@ function IconMenuButton(props) {
|
|
|
5426
5779
|
placement = "bottom"
|
|
5427
5780
|
} = props;
|
|
5428
5781
|
if (!items.length) {
|
|
5429
|
-
return /* @__PURE__ */
|
|
5782
|
+
return /* @__PURE__ */ React43.createElement(
|
|
5430
5783
|
JoyIconButton2,
|
|
5431
5784
|
{
|
|
5432
5785
|
component: props.buttonComponent ?? "button",
|
|
@@ -5440,7 +5793,7 @@ function IconMenuButton(props) {
|
|
|
5440
5793
|
icon
|
|
5441
5794
|
);
|
|
5442
5795
|
}
|
|
5443
|
-
return /* @__PURE__ */
|
|
5796
|
+
return /* @__PURE__ */ React43.createElement(Dropdown_default, null, /* @__PURE__ */ React43.createElement(
|
|
5444
5797
|
JoyMenuButton2,
|
|
5445
5798
|
{
|
|
5446
5799
|
slots: { root: JoyIconButton2 },
|
|
@@ -5457,19 +5810,19 @@ function IconMenuButton(props) {
|
|
|
5457
5810
|
}
|
|
5458
5811
|
},
|
|
5459
5812
|
icon
|
|
5460
|
-
), /* @__PURE__ */
|
|
5813
|
+
), /* @__PURE__ */ React43.createElement(Menu, { placement, size }, items.map((i) => /* @__PURE__ */ React43.createElement(MenuItem, { key: i.text, component: i.component, ...i.componentProps ?? {} }, i.text))));
|
|
5461
5814
|
}
|
|
5462
5815
|
IconMenuButton.displayName = "IconMenuButton";
|
|
5463
5816
|
|
|
5464
5817
|
// src/components/Markdown/Markdown.tsx
|
|
5465
|
-
import
|
|
5818
|
+
import React44, { lazy, Suspense, useEffect as useEffect11, useState as useState14 } from "react";
|
|
5466
5819
|
import { Skeleton } from "@mui/joy";
|
|
5467
5820
|
import { Link as Link2 } from "@mui/joy";
|
|
5468
5821
|
import remarkGfm from "remark-gfm";
|
|
5469
5822
|
var LazyReactMarkdown = lazy(() => import("react-markdown"));
|
|
5470
5823
|
var Markdown = (props) => {
|
|
5471
|
-
const [rehypeAccent2, setRehypeAccent] =
|
|
5472
|
-
|
|
5824
|
+
const [rehypeAccent2, setRehypeAccent] = useState14(null);
|
|
5825
|
+
useEffect11(() => {
|
|
5473
5826
|
const loadRehypeAccent = async () => {
|
|
5474
5827
|
const module = await Promise.resolve().then(() => (init_rehype_accent(), rehype_accent_exports));
|
|
5475
5828
|
setRehypeAccent(() => module.rehypeAccent);
|
|
@@ -5491,12 +5844,12 @@ var Markdown = (props) => {
|
|
|
5491
5844
|
if (!rehypeAccent2) {
|
|
5492
5845
|
return null;
|
|
5493
5846
|
}
|
|
5494
|
-
return /* @__PURE__ */
|
|
5847
|
+
return /* @__PURE__ */ React44.createElement(Typography, { component: "div", color, textColor, level: defaultLevel, ...innerProps }, /* @__PURE__ */ React44.createElement(
|
|
5495
5848
|
Suspense,
|
|
5496
5849
|
{
|
|
5497
|
-
fallback: fallback || /* @__PURE__ */
|
|
5850
|
+
fallback: fallback || /* @__PURE__ */ React44.createElement(Typography, null, /* @__PURE__ */ React44.createElement(Skeleton, null, content || ""))
|
|
5498
5851
|
},
|
|
5499
|
-
/* @__PURE__ */
|
|
5852
|
+
/* @__PURE__ */ React44.createElement(
|
|
5500
5853
|
LazyReactMarkdown,
|
|
5501
5854
|
{
|
|
5502
5855
|
...markdownOptions,
|
|
@@ -5504,15 +5857,15 @@ var Markdown = (props) => {
|
|
|
5504
5857
|
rehypePlugins: [[rehypeAccent2, { accentColor }]],
|
|
5505
5858
|
remarkPlugins: [remarkGfm],
|
|
5506
5859
|
components: {
|
|
5507
|
-
h1: ({ children }) => /* @__PURE__ */
|
|
5508
|
-
h2: ({ children }) => /* @__PURE__ */
|
|
5509
|
-
h3: ({ children }) => /* @__PURE__ */
|
|
5510
|
-
h4: ({ children }) => /* @__PURE__ */
|
|
5511
|
-
p: ({ children, node }) => /* @__PURE__ */
|
|
5512
|
-
a: ({ children, href }) => /* @__PURE__ */
|
|
5513
|
-
hr: () => /* @__PURE__ */
|
|
5514
|
-
b: ({ children }) => /* @__PURE__ */
|
|
5515
|
-
strong: ({ children }) => /* @__PURE__ */
|
|
5860
|
+
h1: ({ children }) => /* @__PURE__ */ React44.createElement(Typography, { color, textColor, level: "h1" }, children),
|
|
5861
|
+
h2: ({ children }) => /* @__PURE__ */ React44.createElement(Typography, { color, textColor, level: "h2" }, children),
|
|
5862
|
+
h3: ({ children }) => /* @__PURE__ */ React44.createElement(Typography, { color, textColor, level: "h3" }, children),
|
|
5863
|
+
h4: ({ children }) => /* @__PURE__ */ React44.createElement(Typography, { color, textColor, level: "h4" }, children),
|
|
5864
|
+
p: ({ children, node }) => /* @__PURE__ */ React44.createElement(Typography, { color, textColor, level: defaultLevel, ...node?.properties }, children),
|
|
5865
|
+
a: ({ children, href }) => /* @__PURE__ */ React44.createElement(Link2, { href, target: defaultLinkAction }, children),
|
|
5866
|
+
hr: () => /* @__PURE__ */ React44.createElement(Divider, null),
|
|
5867
|
+
b: ({ children }) => /* @__PURE__ */ React44.createElement(Typography, { fontWeight: boldFontWeight }, children),
|
|
5868
|
+
strong: ({ children }) => /* @__PURE__ */ React44.createElement(Typography, { fontWeight: boldFontWeight }, children),
|
|
5516
5869
|
...markdownOptions?.components
|
|
5517
5870
|
}
|
|
5518
5871
|
}
|
|
@@ -5522,7 +5875,7 @@ var Markdown = (props) => {
|
|
|
5522
5875
|
Markdown.displayName = "Markdown";
|
|
5523
5876
|
|
|
5524
5877
|
// src/components/MenuButton/MenuButton.tsx
|
|
5525
|
-
import
|
|
5878
|
+
import React45 from "react";
|
|
5526
5879
|
import { MenuButton as JoyMenuButton3, Button as JoyButton2 } from "@mui/joy";
|
|
5527
5880
|
import ExpandMoreIcon from "@mui/icons-material/ExpandMore";
|
|
5528
5881
|
function MenuButton(props) {
|
|
@@ -5540,7 +5893,7 @@ function MenuButton(props) {
|
|
|
5540
5893
|
placement = "bottom"
|
|
5541
5894
|
} = props;
|
|
5542
5895
|
if (!items.length) {
|
|
5543
|
-
return /* @__PURE__ */
|
|
5896
|
+
return /* @__PURE__ */ React45.createElement(
|
|
5544
5897
|
JoyButton2,
|
|
5545
5898
|
{
|
|
5546
5899
|
component: props.buttonComponent ?? "button",
|
|
@@ -5551,12 +5904,12 @@ function MenuButton(props) {
|
|
|
5551
5904
|
loading,
|
|
5552
5905
|
startDecorator,
|
|
5553
5906
|
...props.buttonComponentProps ?? {},
|
|
5554
|
-
endDecorator: showIcon ? /* @__PURE__ */
|
|
5907
|
+
endDecorator: showIcon ? /* @__PURE__ */ React45.createElement(React45.Fragment, null, endDecorator, /* @__PURE__ */ React45.createElement(ExpandMoreIcon, null)) : /* @__PURE__ */ React45.createElement(React45.Fragment, null, endDecorator)
|
|
5555
5908
|
},
|
|
5556
5909
|
buttonText
|
|
5557
5910
|
);
|
|
5558
5911
|
}
|
|
5559
|
-
return /* @__PURE__ */
|
|
5912
|
+
return /* @__PURE__ */ React45.createElement(Dropdown_default, null, /* @__PURE__ */ React45.createElement(
|
|
5560
5913
|
JoyMenuButton3,
|
|
5561
5914
|
{
|
|
5562
5915
|
component: props.buttonComponent ?? "button",
|
|
@@ -5567,15 +5920,15 @@ function MenuButton(props) {
|
|
|
5567
5920
|
loading,
|
|
5568
5921
|
startDecorator,
|
|
5569
5922
|
...props.buttonComponentProps ?? {},
|
|
5570
|
-
endDecorator: showIcon ? /* @__PURE__ */
|
|
5923
|
+
endDecorator: showIcon ? /* @__PURE__ */ React45.createElement(React45.Fragment, null, endDecorator, /* @__PURE__ */ React45.createElement(ExpandMoreIcon, null)) : /* @__PURE__ */ React45.createElement(React45.Fragment, null, endDecorator)
|
|
5571
5924
|
},
|
|
5572
5925
|
buttonText
|
|
5573
|
-
), /* @__PURE__ */
|
|
5926
|
+
), /* @__PURE__ */ React45.createElement(Menu, { placement, size }, items.map((i) => /* @__PURE__ */ React45.createElement(MenuItem, { key: i.text, component: i.component, ...i.componentProps ?? {} }, i.text))));
|
|
5574
5927
|
}
|
|
5575
5928
|
MenuButton.displayName = "MenuButton";
|
|
5576
5929
|
|
|
5577
5930
|
// src/components/MonthPicker/MonthPicker.tsx
|
|
5578
|
-
import
|
|
5931
|
+
import React46, { forwardRef as forwardRef9, useCallback as useCallback25, useEffect as useEffect12, useImperativeHandle as useImperativeHandle4, useRef as useRef10, useState as useState15 } from "react";
|
|
5579
5932
|
import CalendarTodayIcon3 from "@mui/icons-material/CalendarToday";
|
|
5580
5933
|
import { styled as styled22, useThemeProps as useThemeProps7 } from "@mui/joy";
|
|
5581
5934
|
import { FocusTrap as FocusTrap3, ClickAwayListener as ClickAwayListener3, Popper as Popper4 } from "@mui/base";
|
|
@@ -5657,14 +6010,14 @@ var MonthPicker = forwardRef9((inProps, ref) => {
|
|
|
5657
6010
|
locale,
|
|
5658
6011
|
...innerProps
|
|
5659
6012
|
} = props;
|
|
5660
|
-
const innerRef =
|
|
5661
|
-
const buttonRef =
|
|
6013
|
+
const innerRef = useRef10(null);
|
|
6014
|
+
const buttonRef = useRef10(null);
|
|
5662
6015
|
const [value, setValue, isControlled] = useControlledState(
|
|
5663
6016
|
props.value,
|
|
5664
6017
|
props.defaultValue || "",
|
|
5665
|
-
|
|
6018
|
+
useCallback25((value2) => onChange?.({ target: { name: props.name, value: value2 } }), [props.name, onChange])
|
|
5666
6019
|
);
|
|
5667
|
-
const getFormattedDisplayValue =
|
|
6020
|
+
const getFormattedDisplayValue = useCallback25(
|
|
5668
6021
|
(inputValue) => {
|
|
5669
6022
|
if (!inputValue) return "";
|
|
5670
6023
|
try {
|
|
@@ -5675,19 +6028,19 @@ var MonthPicker = forwardRef9((inProps, ref) => {
|
|
|
5675
6028
|
},
|
|
5676
6029
|
[format, displayFormat, locale]
|
|
5677
6030
|
);
|
|
5678
|
-
const [displayValue, setDisplayValue] =
|
|
5679
|
-
const [anchorEl, setAnchorEl] =
|
|
6031
|
+
const [displayValue, setDisplayValue] = useState15(() => getFormattedDisplayValue(value));
|
|
6032
|
+
const [anchorEl, setAnchorEl] = useState15(null);
|
|
5680
6033
|
const open = Boolean(anchorEl);
|
|
5681
|
-
|
|
6034
|
+
useEffect12(() => {
|
|
5682
6035
|
if (!anchorEl) {
|
|
5683
6036
|
innerRef.current?.blur();
|
|
5684
6037
|
}
|
|
5685
6038
|
}, [anchorEl, innerRef]);
|
|
5686
6039
|
useImperativeHandle4(ref, () => innerRef.current, [innerRef]);
|
|
5687
|
-
|
|
6040
|
+
useEffect12(() => {
|
|
5688
6041
|
setDisplayValue(getFormattedDisplayValue(value));
|
|
5689
6042
|
}, [value, getFormattedDisplayValue]);
|
|
5690
|
-
const handleChange =
|
|
6043
|
+
const handleChange = useCallback25(
|
|
5691
6044
|
(event) => {
|
|
5692
6045
|
const newValue = event.target.value;
|
|
5693
6046
|
setValue(newValue);
|
|
@@ -5697,21 +6050,21 @@ var MonthPicker = forwardRef9((inProps, ref) => {
|
|
|
5697
6050
|
},
|
|
5698
6051
|
[setValue, getFormattedDisplayValue, isControlled]
|
|
5699
6052
|
);
|
|
5700
|
-
const handleCalendarToggle =
|
|
6053
|
+
const handleCalendarToggle = useCallback25(
|
|
5701
6054
|
(event) => {
|
|
5702
6055
|
setAnchorEl(anchorEl ? null : event.currentTarget);
|
|
5703
6056
|
innerRef.current?.focus();
|
|
5704
6057
|
},
|
|
5705
6058
|
[anchorEl, setAnchorEl, innerRef]
|
|
5706
6059
|
);
|
|
5707
|
-
const handleInputMouseDown =
|
|
6060
|
+
const handleInputMouseDown = useCallback25(
|
|
5708
6061
|
(event) => {
|
|
5709
6062
|
event.preventDefault();
|
|
5710
6063
|
buttonRef.current?.focus();
|
|
5711
6064
|
},
|
|
5712
6065
|
[buttonRef]
|
|
5713
6066
|
);
|
|
5714
|
-
return /* @__PURE__ */
|
|
6067
|
+
return /* @__PURE__ */ React46.createElement(MonthPickerRoot, null, /* @__PURE__ */ React46.createElement(FocusTrap3, { open: true }, /* @__PURE__ */ React46.createElement(React46.Fragment, null, /* @__PURE__ */ React46.createElement(
|
|
5715
6068
|
Input_default,
|
|
5716
6069
|
{
|
|
5717
6070
|
...innerProps,
|
|
@@ -5741,7 +6094,7 @@ var MonthPicker = forwardRef9((inProps, ref) => {
|
|
|
5741
6094
|
// NOTE: placeholder char 를 텍스트로 표시하므로 동일한 너비를 가지는 mono font 를 사용해야 이질감이 없다.
|
|
5742
6095
|
fontFamily: "monospace"
|
|
5743
6096
|
},
|
|
5744
|
-
endDecorator: /* @__PURE__ */
|
|
6097
|
+
endDecorator: /* @__PURE__ */ React46.createElement(
|
|
5745
6098
|
IconButton_default,
|
|
5746
6099
|
{
|
|
5747
6100
|
ref: buttonRef,
|
|
@@ -5753,12 +6106,12 @@ var MonthPicker = forwardRef9((inProps, ref) => {
|
|
|
5753
6106
|
"aria-expanded": open,
|
|
5754
6107
|
disabled
|
|
5755
6108
|
},
|
|
5756
|
-
/* @__PURE__ */
|
|
6109
|
+
/* @__PURE__ */ React46.createElement(CalendarTodayIcon3, null)
|
|
5757
6110
|
),
|
|
5758
6111
|
label,
|
|
5759
6112
|
helperText
|
|
5760
6113
|
}
|
|
5761
|
-
), open && /* @__PURE__ */
|
|
6114
|
+
), open && /* @__PURE__ */ React46.createElement(ClickAwayListener3, { onClickAway: () => setAnchorEl(null) }, /* @__PURE__ */ React46.createElement(
|
|
5762
6115
|
StyledPopper3,
|
|
5763
6116
|
{
|
|
5764
6117
|
id: "month-picker-popper",
|
|
@@ -5777,7 +6130,7 @@ var MonthPicker = forwardRef9((inProps, ref) => {
|
|
|
5777
6130
|
"aria-label": "Calendar Tooltip",
|
|
5778
6131
|
"aria-expanded": open
|
|
5779
6132
|
},
|
|
5780
|
-
/* @__PURE__ */
|
|
6133
|
+
/* @__PURE__ */ React46.createElement(CalendarSheet3, { tabIndex: -1, role: "presentation" }, /* @__PURE__ */ React46.createElement(
|
|
5781
6134
|
Calendar_default,
|
|
5782
6135
|
{
|
|
5783
6136
|
view: "month",
|
|
@@ -5798,14 +6151,14 @@ var MonthPicker = forwardRef9((inProps, ref) => {
|
|
|
5798
6151
|
disablePast,
|
|
5799
6152
|
locale
|
|
5800
6153
|
}
|
|
5801
|
-
), /* @__PURE__ */
|
|
6154
|
+
), /* @__PURE__ */ React46.createElement(
|
|
5802
6155
|
DialogActions_default,
|
|
5803
6156
|
{
|
|
5804
6157
|
sx: {
|
|
5805
6158
|
p: 1
|
|
5806
6159
|
}
|
|
5807
6160
|
},
|
|
5808
|
-
/* @__PURE__ */
|
|
6161
|
+
/* @__PURE__ */ React46.createElement(
|
|
5809
6162
|
Button_default,
|
|
5810
6163
|
{
|
|
5811
6164
|
size,
|
|
@@ -5828,7 +6181,7 @@ var MonthPicker = forwardRef9((inProps, ref) => {
|
|
|
5828
6181
|
});
|
|
5829
6182
|
|
|
5830
6183
|
// src/components/MonthRangePicker/MonthRangePicker.tsx
|
|
5831
|
-
import
|
|
6184
|
+
import React47, { forwardRef as forwardRef10, useCallback as useCallback26, useEffect as useEffect13, useImperativeHandle as useImperativeHandle5, useMemo as useMemo16, useRef as useRef11, useState as useState16 } from "react";
|
|
5832
6185
|
import { IMaskInput as IMaskInput3, IMask as IMask3 } from "react-imask";
|
|
5833
6186
|
import CalendarTodayIcon4 from "@mui/icons-material/CalendarToday";
|
|
5834
6187
|
import { styled as styled23, useThemeProps as useThemeProps8 } from "@mui/joy";
|
|
@@ -5886,9 +6239,9 @@ var parseDates2 = (str) => {
|
|
|
5886
6239
|
var formatToPattern3 = (format) => {
|
|
5887
6240
|
return `${format} - ${format}`.replace(/YYYY/g, "Y").replace(/MM/g, "m").replace(/[^YMm\s]/g, (match) => `${match}\``);
|
|
5888
6241
|
};
|
|
5889
|
-
var TextMaskAdapter9 =
|
|
6242
|
+
var TextMaskAdapter9 = React47.forwardRef(function TextMaskAdapter10(props, ref) {
|
|
5890
6243
|
const { onChange, format, ...other } = props;
|
|
5891
|
-
return /* @__PURE__ */
|
|
6244
|
+
return /* @__PURE__ */ React47.createElement(
|
|
5892
6245
|
IMaskInput3,
|
|
5893
6246
|
{
|
|
5894
6247
|
...other,
|
|
@@ -5936,35 +6289,35 @@ var MonthRangePicker = forwardRef10((inProps, ref) => {
|
|
|
5936
6289
|
size,
|
|
5937
6290
|
...innerProps
|
|
5938
6291
|
} = props;
|
|
5939
|
-
const innerRef =
|
|
6292
|
+
const innerRef = useRef11(null);
|
|
5940
6293
|
const [value, setValue] = useControlledState(
|
|
5941
6294
|
props.value,
|
|
5942
6295
|
props.defaultValue || "",
|
|
5943
|
-
|
|
6296
|
+
useCallback26((value2) => onChange?.({ target: { name: props.name, value: value2 } }), [props.name, onChange])
|
|
5944
6297
|
);
|
|
5945
|
-
const [anchorEl, setAnchorEl] =
|
|
6298
|
+
const [anchorEl, setAnchorEl] = useState16(null);
|
|
5946
6299
|
const open = Boolean(anchorEl);
|
|
5947
|
-
const calendarValue =
|
|
5948
|
-
|
|
6300
|
+
const calendarValue = useMemo16(() => value ? parseDates2(value) : void 0, [value]);
|
|
6301
|
+
useEffect13(() => {
|
|
5949
6302
|
if (!anchorEl) {
|
|
5950
6303
|
innerRef.current?.blur();
|
|
5951
6304
|
}
|
|
5952
6305
|
}, [anchorEl, innerRef]);
|
|
5953
6306
|
useImperativeHandle5(ref, () => innerRef.current, [innerRef]);
|
|
5954
|
-
const handleChange =
|
|
6307
|
+
const handleChange = useCallback26(
|
|
5955
6308
|
(event) => {
|
|
5956
6309
|
setValue(event.target.value);
|
|
5957
6310
|
},
|
|
5958
6311
|
[setValue]
|
|
5959
6312
|
);
|
|
5960
|
-
const handleCalendarToggle =
|
|
6313
|
+
const handleCalendarToggle = useCallback26(
|
|
5961
6314
|
(event) => {
|
|
5962
6315
|
setAnchorEl(anchorEl ? null : event.currentTarget);
|
|
5963
6316
|
innerRef.current?.focus();
|
|
5964
6317
|
},
|
|
5965
6318
|
[anchorEl, setAnchorEl, innerRef]
|
|
5966
6319
|
);
|
|
5967
|
-
const handleCalendarChange =
|
|
6320
|
+
const handleCalendarChange = useCallback26(
|
|
5968
6321
|
([date1, date2]) => {
|
|
5969
6322
|
if (!date1 || !date2) return;
|
|
5970
6323
|
setValue(formatValueString4([date1, date2], format));
|
|
@@ -5972,7 +6325,7 @@ var MonthRangePicker = forwardRef10((inProps, ref) => {
|
|
|
5972
6325
|
},
|
|
5973
6326
|
[setValue, setAnchorEl, format]
|
|
5974
6327
|
);
|
|
5975
|
-
return /* @__PURE__ */
|
|
6328
|
+
return /* @__PURE__ */ React47.createElement(MonthRangePickerRoot, null, /* @__PURE__ */ React47.createElement(FocusTrap4, { open: true }, /* @__PURE__ */ React47.createElement(React47.Fragment, null, /* @__PURE__ */ React47.createElement(
|
|
5976
6329
|
Input_default,
|
|
5977
6330
|
{
|
|
5978
6331
|
...innerProps,
|
|
@@ -5994,7 +6347,7 @@ var MonthRangePicker = forwardRef10((inProps, ref) => {
|
|
|
5994
6347
|
// NOTE: placeholder char 를 텍스트로 표시하므로 동일한 너비를 가지는 mono font 를 사용해야 이질감이 없다.
|
|
5995
6348
|
fontFamily: "monospace"
|
|
5996
6349
|
},
|
|
5997
|
-
endDecorator: /* @__PURE__ */
|
|
6350
|
+
endDecorator: /* @__PURE__ */ React47.createElement(
|
|
5998
6351
|
IconButton_default,
|
|
5999
6352
|
{
|
|
6000
6353
|
variant: "plain",
|
|
@@ -6004,12 +6357,12 @@ var MonthRangePicker = forwardRef10((inProps, ref) => {
|
|
|
6004
6357
|
"aria-haspopup": "dialog",
|
|
6005
6358
|
"aria-expanded": open
|
|
6006
6359
|
},
|
|
6007
|
-
/* @__PURE__ */
|
|
6360
|
+
/* @__PURE__ */ React47.createElement(CalendarTodayIcon4, null)
|
|
6008
6361
|
),
|
|
6009
6362
|
label,
|
|
6010
6363
|
helperText
|
|
6011
6364
|
}
|
|
6012
|
-
), open && /* @__PURE__ */
|
|
6365
|
+
), open && /* @__PURE__ */ React47.createElement(ClickAwayListener4, { onClickAway: () => setAnchorEl(null) }, /* @__PURE__ */ React47.createElement(
|
|
6013
6366
|
StyledPopper4,
|
|
6014
6367
|
{
|
|
6015
6368
|
id: "month-range-picker-popper",
|
|
@@ -6028,7 +6381,7 @@ var MonthRangePicker = forwardRef10((inProps, ref) => {
|
|
|
6028
6381
|
"aria-label": "Calendar Tooltip",
|
|
6029
6382
|
"aria-expanded": open
|
|
6030
6383
|
},
|
|
6031
|
-
/* @__PURE__ */
|
|
6384
|
+
/* @__PURE__ */ React47.createElement(CalendarSheet4, { tabIndex: -1, role: "presentation" }, /* @__PURE__ */ React47.createElement(
|
|
6032
6385
|
Calendar_default,
|
|
6033
6386
|
{
|
|
6034
6387
|
view: "month",
|
|
@@ -6041,14 +6394,14 @@ var MonthRangePicker = forwardRef10((inProps, ref) => {
|
|
|
6041
6394
|
disableFuture,
|
|
6042
6395
|
disablePast
|
|
6043
6396
|
}
|
|
6044
|
-
), /* @__PURE__ */
|
|
6397
|
+
), /* @__PURE__ */ React47.createElement(
|
|
6045
6398
|
DialogActions_default,
|
|
6046
6399
|
{
|
|
6047
6400
|
sx: {
|
|
6048
6401
|
p: 1
|
|
6049
6402
|
}
|
|
6050
6403
|
},
|
|
6051
|
-
/* @__PURE__ */
|
|
6404
|
+
/* @__PURE__ */ React47.createElement(
|
|
6052
6405
|
Button_default,
|
|
6053
6406
|
{
|
|
6054
6407
|
size,
|
|
@@ -6067,14 +6420,14 @@ var MonthRangePicker = forwardRef10((inProps, ref) => {
|
|
|
6067
6420
|
MonthRangePicker.displayName = "MonthRangePicker";
|
|
6068
6421
|
|
|
6069
6422
|
// src/components/NavigationGroup/NavigationGroup.tsx
|
|
6070
|
-
import
|
|
6423
|
+
import React48 from "react";
|
|
6071
6424
|
import {
|
|
6072
6425
|
Accordion as JoyAccordion2,
|
|
6073
6426
|
AccordionSummary as JoyAccordionSummary2,
|
|
6074
6427
|
AccordionDetails as JoyAccordionDetails2,
|
|
6075
6428
|
styled as styled24,
|
|
6076
6429
|
accordionSummaryClasses,
|
|
6077
|
-
Stack as
|
|
6430
|
+
Stack as Stack12
|
|
6078
6431
|
} from "@mui/joy";
|
|
6079
6432
|
var AccordionSummary2 = styled24(JoyAccordionSummary2, {
|
|
6080
6433
|
name: "NavigationGroup",
|
|
@@ -6098,11 +6451,11 @@ var AccordionDetails2 = styled24(JoyAccordionDetails2, {
|
|
|
6098
6451
|
}));
|
|
6099
6452
|
function NavigationGroup(props) {
|
|
6100
6453
|
const { title, children, startDecorator, level, ...rest } = props;
|
|
6101
|
-
return /* @__PURE__ */
|
|
6454
|
+
return /* @__PURE__ */ React48.createElement(JoyAccordion2, { ...rest }, /* @__PURE__ */ React48.createElement(AccordionSummary2, { useIcon: !!startDecorator, level }, /* @__PURE__ */ React48.createElement(Stack12, { direction: "row", gap: 4 }, startDecorator, title)), /* @__PURE__ */ React48.createElement(AccordionDetails2, null, children));
|
|
6102
6455
|
}
|
|
6103
6456
|
|
|
6104
6457
|
// src/components/NavigationItem/NavigationItem.tsx
|
|
6105
|
-
import
|
|
6458
|
+
import React49 from "react";
|
|
6106
6459
|
import {
|
|
6107
6460
|
ListItem as JoyListItem,
|
|
6108
6461
|
ListItemButton as JoyListItemButton,
|
|
@@ -6137,7 +6490,7 @@ function NavigationItem(props) {
|
|
|
6137
6490
|
const handleClick = () => {
|
|
6138
6491
|
onClick?.(id);
|
|
6139
6492
|
};
|
|
6140
|
-
return /* @__PURE__ */
|
|
6493
|
+
return /* @__PURE__ */ React49.createElement(JoyListItem, { ...rest }, /* @__PURE__ */ React49.createElement(
|
|
6141
6494
|
ListItemButton,
|
|
6142
6495
|
{
|
|
6143
6496
|
level,
|
|
@@ -6146,21 +6499,21 @@ function NavigationItem(props) {
|
|
|
6146
6499
|
"aria-current": selected,
|
|
6147
6500
|
onClick: handleClick
|
|
6148
6501
|
},
|
|
6149
|
-
startDecorator && /* @__PURE__ */
|
|
6502
|
+
startDecorator && /* @__PURE__ */ React49.createElement(JoyListItemDecorator, null, startDecorator),
|
|
6150
6503
|
children
|
|
6151
6504
|
));
|
|
6152
6505
|
}
|
|
6153
6506
|
|
|
6154
6507
|
// src/components/Navigator/Navigator.tsx
|
|
6155
|
-
import
|
|
6508
|
+
import React50 from "react";
|
|
6156
6509
|
function Navigator(props) {
|
|
6157
6510
|
const { items, level = 0, onSelect } = props;
|
|
6158
6511
|
const handleItemClick = (id) => {
|
|
6159
6512
|
onSelect?.(id);
|
|
6160
6513
|
};
|
|
6161
|
-
return /* @__PURE__ */
|
|
6514
|
+
return /* @__PURE__ */ React50.createElement("div", null, items.map((item, index) => {
|
|
6162
6515
|
if (item.type === "item") {
|
|
6163
|
-
return /* @__PURE__ */
|
|
6516
|
+
return /* @__PURE__ */ React50.createElement(
|
|
6164
6517
|
NavigationItem,
|
|
6165
6518
|
{
|
|
6166
6519
|
key: item.id,
|
|
@@ -6173,7 +6526,7 @@ function Navigator(props) {
|
|
|
6173
6526
|
item.title
|
|
6174
6527
|
);
|
|
6175
6528
|
} else if (item.type === "group") {
|
|
6176
|
-
return /* @__PURE__ */
|
|
6529
|
+
return /* @__PURE__ */ React50.createElement(
|
|
6177
6530
|
NavigationGroup,
|
|
6178
6531
|
{
|
|
6179
6532
|
key: `${item.title}-${index}`,
|
|
@@ -6191,7 +6544,7 @@ function Navigator(props) {
|
|
|
6191
6544
|
Navigator.displayName = "Navigator";
|
|
6192
6545
|
|
|
6193
6546
|
// src/components/ProfileMenu/ProfileMenu.tsx
|
|
6194
|
-
import
|
|
6547
|
+
import React51, { useCallback as useCallback27, useMemo as useMemo17 } from "react";
|
|
6195
6548
|
import { Dropdown as Dropdown2, ListDivider, menuItemClasses, styled as styled26, MenuButton as MenuButton2 } from "@mui/joy";
|
|
6196
6549
|
import { ClickAwayListener as ClickAwayListener5 } from "@mui/base";
|
|
6197
6550
|
import DropdownIcon from "@mui/icons-material/ArrowDropDown";
|
|
@@ -6201,9 +6554,9 @@ var StyledProfileCard = styled26(Stack, {
|
|
|
6201
6554
|
})({});
|
|
6202
6555
|
function ProfileCard(props) {
|
|
6203
6556
|
const { children, chip, caption, size } = props;
|
|
6204
|
-
const captionLevel =
|
|
6205
|
-
const nameLevel =
|
|
6206
|
-
return /* @__PURE__ */
|
|
6557
|
+
const captionLevel = useMemo17(() => size === "sm" ? "body-xs" : "body-sm", [size]);
|
|
6558
|
+
const nameLevel = useMemo17(() => size === "sm" ? "body-sm" : "body-md", [size]);
|
|
6559
|
+
return /* @__PURE__ */ React51.createElement(StyledProfileCard, { px: 4, py: 2 }, /* @__PURE__ */ React51.createElement(Stack, { direction: "row", gap: 2 }, /* @__PURE__ */ React51.createElement(Typography, { level: nameLevel, fontWeight: "bold", textColor: "text.primary" }, children), chip && /* @__PURE__ */ React51.createElement(Chip, { size, color: "neutral", variant: "outlined" }, chip)), caption && /* @__PURE__ */ React51.createElement(Typography, { level: captionLevel, textColor: "text.tertiary" }, caption));
|
|
6207
6560
|
}
|
|
6208
6561
|
ProfileCard.displayName = "ProfileCard";
|
|
6209
6562
|
var StyledProfileMenuButton = styled26(MenuButton2, {
|
|
@@ -6215,16 +6568,16 @@ var StyledProfileMenuButton = styled26(MenuButton2, {
|
|
|
6215
6568
|
}));
|
|
6216
6569
|
function ProfileMenuButton(props) {
|
|
6217
6570
|
const { size = "md", src, alt, children, getInitial, ...innerProps } = props;
|
|
6218
|
-
return /* @__PURE__ */
|
|
6571
|
+
return /* @__PURE__ */ React51.createElement(
|
|
6219
6572
|
StyledProfileMenuButton,
|
|
6220
6573
|
{
|
|
6221
6574
|
variant: "plain",
|
|
6222
6575
|
color: "neutral",
|
|
6223
6576
|
size,
|
|
6224
|
-
endDecorator: /* @__PURE__ */
|
|
6577
|
+
endDecorator: /* @__PURE__ */ React51.createElement(DropdownIcon, null),
|
|
6225
6578
|
...innerProps
|
|
6226
6579
|
},
|
|
6227
|
-
/* @__PURE__ */
|
|
6580
|
+
/* @__PURE__ */ React51.createElement(Avatar, { variant: "soft", color: "primary", size, src, alt, getInitial }, children)
|
|
6228
6581
|
);
|
|
6229
6582
|
}
|
|
6230
6583
|
ProfileMenuButton.displayName = "ProfileMenuButton";
|
|
@@ -6243,9 +6596,9 @@ function ProfileMenu(props) {
|
|
|
6243
6596
|
const [open, setOpen] = useControlledState(
|
|
6244
6597
|
_open,
|
|
6245
6598
|
defaultOpen ?? false,
|
|
6246
|
-
|
|
6599
|
+
useCallback27((value) => onOpenChange?.(value), [onOpenChange])
|
|
6247
6600
|
);
|
|
6248
|
-
return /* @__PURE__ */
|
|
6601
|
+
return /* @__PURE__ */ React51.createElement(ClickAwayListener5, { onClickAway: () => setOpen(false) }, /* @__PURE__ */ React51.createElement("div", null, /* @__PURE__ */ React51.createElement(Dropdown2, { open }, /* @__PURE__ */ React51.createElement(
|
|
6249
6602
|
ProfileMenuButton,
|
|
6250
6603
|
{
|
|
6251
6604
|
size,
|
|
@@ -6255,7 +6608,7 @@ function ProfileMenu(props) {
|
|
|
6255
6608
|
getInitial
|
|
6256
6609
|
},
|
|
6257
6610
|
profile.name
|
|
6258
|
-
), /* @__PURE__ */
|
|
6611
|
+
), /* @__PURE__ */ React51.createElement(ProfileMenuRoot, { size, placement: "bottom-end", ...innerProps, onClose: () => setOpen(false) }, /* @__PURE__ */ React51.createElement(ProfileCard, { size, caption: profile.caption, chip: profile.chip }, profile.name), !!menuItems.length && /* @__PURE__ */ React51.createElement(ListDivider, null), menuItems.map(({ label, ...menuProps }) => /* @__PURE__ */ React51.createElement(
|
|
6259
6612
|
MenuItem,
|
|
6260
6613
|
{
|
|
6261
6614
|
key: label,
|
|
@@ -6271,7 +6624,7 @@ function ProfileMenu(props) {
|
|
|
6271
6624
|
ProfileMenu.displayName = "ProfileMenu";
|
|
6272
6625
|
|
|
6273
6626
|
// src/components/RadioTileGroup/RadioTileGroup.tsx
|
|
6274
|
-
import
|
|
6627
|
+
import React52 from "react";
|
|
6275
6628
|
import { styled as styled27, radioClasses, sheetClasses } from "@mui/joy";
|
|
6276
6629
|
var RadioTileGroupRoot = styled27(RadioGroup, {
|
|
6277
6630
|
name: "RadioTileGroup",
|
|
@@ -6359,7 +6712,7 @@ function RadioTileGroup(props) {
|
|
|
6359
6712
|
error,
|
|
6360
6713
|
required
|
|
6361
6714
|
} = props;
|
|
6362
|
-
const radioGroup = /* @__PURE__ */
|
|
6715
|
+
const radioGroup = /* @__PURE__ */ React52.createElement(
|
|
6363
6716
|
RadioTileGroupRoot,
|
|
6364
6717
|
{
|
|
6365
6718
|
overlay: true,
|
|
@@ -6370,7 +6723,7 @@ function RadioTileGroup(props) {
|
|
|
6370
6723
|
flex,
|
|
6371
6724
|
columns
|
|
6372
6725
|
},
|
|
6373
|
-
options.map((option) => /* @__PURE__ */
|
|
6726
|
+
options.map((option) => /* @__PURE__ */ React52.createElement(
|
|
6374
6727
|
RadioTileSheet,
|
|
6375
6728
|
{
|
|
6376
6729
|
key: option.value,
|
|
@@ -6380,7 +6733,7 @@ function RadioTileGroup(props) {
|
|
|
6380
6733
|
flex,
|
|
6381
6734
|
textAlign
|
|
6382
6735
|
},
|
|
6383
|
-
/* @__PURE__ */
|
|
6736
|
+
/* @__PURE__ */ React52.createElement(
|
|
6384
6737
|
Radio,
|
|
6385
6738
|
{
|
|
6386
6739
|
id: `${option.value}`,
|
|
@@ -6408,7 +6761,7 @@ function RadioTileGroup(props) {
|
|
|
6408
6761
|
}
|
|
6409
6762
|
}
|
|
6410
6763
|
),
|
|
6411
|
-
option.startDecorator && /* @__PURE__ */
|
|
6764
|
+
option.startDecorator && /* @__PURE__ */ React52.createElement(
|
|
6412
6765
|
Box_default,
|
|
6413
6766
|
{
|
|
6414
6767
|
sx: {
|
|
@@ -6429,20 +6782,20 @@ function RadioTileGroup(props) {
|
|
|
6429
6782
|
)
|
|
6430
6783
|
))
|
|
6431
6784
|
);
|
|
6432
|
-
return /* @__PURE__ */
|
|
6785
|
+
return /* @__PURE__ */ React52.createElement(FormControl_default, { required, disabled: allDisabled, error, size, sx, className }, label && /* @__PURE__ */ React52.createElement(FormLabel_default, null, label), radioGroup, helperText && /* @__PURE__ */ React52.createElement(FormHelperText_default, null, helperText));
|
|
6433
6786
|
}
|
|
6434
6787
|
RadioTileGroup.displayName = "RadioTileGroup";
|
|
6435
6788
|
|
|
6436
6789
|
// src/components/RadioList/RadioList.tsx
|
|
6437
|
-
import
|
|
6790
|
+
import React53 from "react";
|
|
6438
6791
|
function RadioList(props) {
|
|
6439
6792
|
const { items, ...innerProps } = props;
|
|
6440
|
-
return /* @__PURE__ */
|
|
6793
|
+
return /* @__PURE__ */ React53.createElement(RadioGroup, { ...innerProps }, items.map((item) => /* @__PURE__ */ React53.createElement(Radio, { key: `${item.value}`, value: item.value, label: item.label })));
|
|
6441
6794
|
}
|
|
6442
6795
|
RadioList.displayName = "RadioList";
|
|
6443
6796
|
|
|
6444
6797
|
// src/components/Stepper/Stepper.tsx
|
|
6445
|
-
import
|
|
6798
|
+
import React54 from "react";
|
|
6446
6799
|
import {
|
|
6447
6800
|
Stepper as JoyStepper,
|
|
6448
6801
|
Step as JoyStep,
|
|
@@ -6478,7 +6831,7 @@ function Stepper(props) {
|
|
|
6478
6831
|
stepOrientation = "horizontal"
|
|
6479
6832
|
} = props;
|
|
6480
6833
|
const effectiveStepOrientation = orientation === "vertical" ? "horizontal" : stepOrientation;
|
|
6481
|
-
return /* @__PURE__ */
|
|
6834
|
+
return /* @__PURE__ */ React54.createElement(
|
|
6482
6835
|
MotionStepper,
|
|
6483
6836
|
{
|
|
6484
6837
|
orientation,
|
|
@@ -6517,23 +6870,23 @@ function Stepper(props) {
|
|
|
6517
6870
|
const completed = activeStep > i + 1;
|
|
6518
6871
|
const disabled = activeStep < i + 1;
|
|
6519
6872
|
const hasContent = step.label || step.extraContent;
|
|
6520
|
-
return /* @__PURE__ */
|
|
6873
|
+
return /* @__PURE__ */ React54.createElement(
|
|
6521
6874
|
Step,
|
|
6522
6875
|
{
|
|
6523
6876
|
key: `step-${i}`,
|
|
6524
|
-
indicator: /* @__PURE__ */
|
|
6877
|
+
indicator: /* @__PURE__ */ React54.createElement(StepIndicator, { variant: disabled ? "outlined" : "solid", color: disabled ? "neutral" : "primary" }, completed ? /* @__PURE__ */ React54.createElement(CheckIcon, null) : step.indicatorContent),
|
|
6525
6878
|
active,
|
|
6526
6879
|
completed,
|
|
6527
6880
|
disabled,
|
|
6528
6881
|
orientation: effectiveStepOrientation
|
|
6529
6882
|
},
|
|
6530
|
-
hasContent && /* @__PURE__ */
|
|
6883
|
+
hasContent && /* @__PURE__ */ React54.createElement(
|
|
6531
6884
|
Stack_default,
|
|
6532
6885
|
{
|
|
6533
6886
|
sx: orientation === "horizontal" && effectiveStepOrientation === "vertical" ? { alignItems: "center" } : {}
|
|
6534
6887
|
},
|
|
6535
|
-
step.label && /* @__PURE__ */
|
|
6536
|
-
step.extraContent && /* @__PURE__ */
|
|
6888
|
+
step.label && /* @__PURE__ */ React54.createElement(Typography_default, { level: "title-sm" }, step.label),
|
|
6889
|
+
step.extraContent && /* @__PURE__ */ React54.createElement(Typography_default, { level: "body-xs" }, step.extraContent)
|
|
6537
6890
|
)
|
|
6538
6891
|
);
|
|
6539
6892
|
})
|
|
@@ -6542,7 +6895,7 @@ function Stepper(props) {
|
|
|
6542
6895
|
Stepper.displayName = "Stepper";
|
|
6543
6896
|
|
|
6544
6897
|
// src/components/Switch/Switch.tsx
|
|
6545
|
-
import
|
|
6898
|
+
import React55 from "react";
|
|
6546
6899
|
import { Switch as JoySwitch, styled as styled29, switchClasses } from "@mui/joy";
|
|
6547
6900
|
import { motion as motion27 } from "framer-motion";
|
|
6548
6901
|
var MotionSwitch = motion27(JoySwitch);
|
|
@@ -6564,14 +6917,14 @@ var StyledThumb = styled29(motion27.div)({
|
|
|
6564
6917
|
right: "var(--Switch-thumbOffset)"
|
|
6565
6918
|
}
|
|
6566
6919
|
});
|
|
6567
|
-
var Thumb = (props) => /* @__PURE__ */
|
|
6920
|
+
var Thumb = (props) => /* @__PURE__ */ React55.createElement(StyledThumb, { ...props, layout: true, transition: spring });
|
|
6568
6921
|
var spring = {
|
|
6569
6922
|
type: "spring",
|
|
6570
6923
|
stiffness: 700,
|
|
6571
6924
|
damping: 30
|
|
6572
6925
|
};
|
|
6573
6926
|
var Switch = (props) => {
|
|
6574
|
-
return /* @__PURE__ */
|
|
6927
|
+
return /* @__PURE__ */ React55.createElement(
|
|
6575
6928
|
MotionSwitch,
|
|
6576
6929
|
{
|
|
6577
6930
|
...props,
|
|
@@ -6585,7 +6938,7 @@ var Switch = (props) => {
|
|
|
6585
6938
|
Switch.displayName = "Switch";
|
|
6586
6939
|
|
|
6587
6940
|
// src/components/Tabs/Tabs.tsx
|
|
6588
|
-
import
|
|
6941
|
+
import React56, { forwardRef as forwardRef11 } from "react";
|
|
6589
6942
|
import {
|
|
6590
6943
|
Tabs as JoyTabs,
|
|
6591
6944
|
Tab as JoyTab,
|
|
@@ -6609,14 +6962,14 @@ var StyledTab = styled30(JoyTab)(({ theme }) => ({
|
|
|
6609
6962
|
}
|
|
6610
6963
|
}));
|
|
6611
6964
|
var Tab = forwardRef11(function Tab2({ startDecorator, endDecorator, children, ...props }, ref) {
|
|
6612
|
-
return /* @__PURE__ */
|
|
6965
|
+
return /* @__PURE__ */ React56.createElement(StyledTab, { ...props, ref }, startDecorator, children, endDecorator);
|
|
6613
6966
|
});
|
|
6614
6967
|
Tab.displayName = "Tab";
|
|
6615
6968
|
var TabList = JoyTabList;
|
|
6616
6969
|
var TabPanel = JoyTabPanel;
|
|
6617
6970
|
|
|
6618
6971
|
// src/components/ThemeProvider/ThemeProvider.tsx
|
|
6619
|
-
import
|
|
6972
|
+
import React57 from "react";
|
|
6620
6973
|
import { CssBaseline, CssVarsProvider, checkboxClasses, extendTheme, inputClasses } from "@mui/joy";
|
|
6621
6974
|
var colorScheme = {
|
|
6622
6975
|
palette: {
|
|
@@ -6895,7 +7248,7 @@ var defaultTheme = extendTheme({
|
|
|
6895
7248
|
});
|
|
6896
7249
|
function ThemeProvider(props) {
|
|
6897
7250
|
const theme = props.theme || defaultTheme;
|
|
6898
|
-
return /* @__PURE__ */
|
|
7251
|
+
return /* @__PURE__ */ React57.createElement(React57.Fragment, null, /* @__PURE__ */ React57.createElement(CssVarsProvider, { theme }, /* @__PURE__ */ React57.createElement(CssBaseline, null), props.children));
|
|
6899
7252
|
}
|
|
6900
7253
|
ThemeProvider.displayName = "ThemeProvider";
|
|
6901
7254
|
export {
|
|
@@ -6938,6 +7291,7 @@ export {
|
|
|
6938
7291
|
Drawer,
|
|
6939
7292
|
Dropdown,
|
|
6940
7293
|
FilterMenu,
|
|
7294
|
+
FilterableCheckboxGroup,
|
|
6941
7295
|
FormControl,
|
|
6942
7296
|
FormHelperText,
|
|
6943
7297
|
FormLabel,
|