@ceed/ads 1.7.8 → 1.8.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/CurrencyInput/CurrencyInput.d.ts +1 -1
- package/dist/components/DateRangePicker/DateRangePicker.d.ts +10 -0
- package/dist/components/FilterMenu/FilterMenu.d.ts +24 -0
- package/dist/components/FilterMenu/components/Autocomplete.d.ts +11 -0
- package/dist/components/FilterMenu/components/CheckboxGroup.d.ts +11 -0
- package/dist/components/FilterMenu/components/CurrencyInput.d.ts +11 -0
- package/dist/components/FilterMenu/components/CurrencyRange.d.ts +11 -0
- package/dist/components/FilterMenu/components/DateRange.d.ts +11 -0
- package/dist/components/FilterMenu/components/PercentageInput.d.ts +7 -0
- package/dist/components/FilterMenu/components/PercentageRange.d.ts +11 -0
- package/dist/components/FilterMenu/components/RadioGroup.d.ts +11 -0
- package/dist/components/FilterMenu/index.d.ts +2 -0
- package/dist/components/FilterMenu/types.d.ts +46 -0
- package/dist/components/ProfileMenu/ProfileMenu.d.ts +1 -1
- package/dist/components/index.d.ts +2 -0
- package/dist/index.cjs +1456 -613
- package/dist/index.d.ts +2 -1
- package/dist/index.js +1315 -472
- package/framer/index.js +53 -53
- package/package.json +3 -2
package/dist/index.cjs
CHANGED
|
@@ -85,17 +85,17 @@ __export(index_exports, {
|
|
|
85
85
|
AccordionSummary: () => AccordionSummary,
|
|
86
86
|
Accordions: () => Accordions,
|
|
87
87
|
Alert: () => Alert,
|
|
88
|
-
AspectRatio: () =>
|
|
88
|
+
AspectRatio: () => import_joy67.AspectRatio,
|
|
89
89
|
Autocomplete: () => Autocomplete,
|
|
90
|
-
AutocompleteListbox: () =>
|
|
91
|
-
AutocompleteOption: () =>
|
|
90
|
+
AutocompleteListbox: () => import_joy67.AutocompleteListbox,
|
|
91
|
+
AutocompleteOption: () => import_joy67.AutocompleteOption,
|
|
92
92
|
Avatar: () => Avatar,
|
|
93
93
|
AvatarGroup: () => import_joy11.AvatarGroup,
|
|
94
|
-
Badge: () =>
|
|
94
|
+
Badge: () => import_joy67.Badge,
|
|
95
95
|
Box: () => Box,
|
|
96
96
|
Breadcrumbs: () => Breadcrumbs,
|
|
97
97
|
Button: () => Button,
|
|
98
|
-
ButtonGroup: () =>
|
|
98
|
+
ButtonGroup: () => import_joy67.ButtonGroup,
|
|
99
99
|
Calendar: () => Calendar,
|
|
100
100
|
Card: () => Card,
|
|
101
101
|
CardActions: () => CardActions,
|
|
@@ -104,9 +104,9 @@ __export(index_exports, {
|
|
|
104
104
|
CardOverflow: () => CardOverflow,
|
|
105
105
|
Checkbox: () => Checkbox,
|
|
106
106
|
Chip: () => Chip,
|
|
107
|
-
CircularProgress: () =>
|
|
107
|
+
CircularProgress: () => import_joy67.CircularProgress,
|
|
108
108
|
Container: () => Container,
|
|
109
|
-
CssBaseline: () =>
|
|
109
|
+
CssBaseline: () => import_joy66.CssBaseline,
|
|
110
110
|
CurrencyInput: () => CurrencyInput,
|
|
111
111
|
DataTable: () => DataTable,
|
|
112
112
|
DatePicker: () => DatePicker,
|
|
@@ -116,26 +116,27 @@ __export(index_exports, {
|
|
|
116
116
|
DialogFrame: () => DialogFrame,
|
|
117
117
|
DialogTitle: () => DialogTitle,
|
|
118
118
|
Divider: () => Divider,
|
|
119
|
-
Drawer: () =>
|
|
119
|
+
Drawer: () => import_joy67.Drawer,
|
|
120
120
|
Dropdown: () => import_joy14.Dropdown,
|
|
121
|
+
FilterMenu: () => FilterMenu,
|
|
121
122
|
FormControl: () => FormControl,
|
|
122
123
|
FormHelperText: () => FormHelperText,
|
|
123
124
|
FormLabel: () => FormLabel,
|
|
124
|
-
Grid: () =>
|
|
125
|
+
Grid: () => import_joy53.Grid,
|
|
125
126
|
IconButton: () => IconButton,
|
|
126
127
|
IconMenuButton: () => IconMenuButton,
|
|
127
128
|
InfoSign: () => InfoSign,
|
|
128
129
|
Input: () => Input,
|
|
129
130
|
InsetDrawer: () => InsetDrawer,
|
|
130
|
-
LinearProgress: () =>
|
|
131
|
-
Link: () =>
|
|
132
|
-
List: () =>
|
|
133
|
-
ListDivider: () =>
|
|
134
|
-
ListItem: () =>
|
|
135
|
-
ListItemButton: () =>
|
|
136
|
-
ListItemContent: () =>
|
|
137
|
-
ListItemDecorator: () =>
|
|
138
|
-
ListSubheader: () =>
|
|
131
|
+
LinearProgress: () => import_joy67.LinearProgress,
|
|
132
|
+
Link: () => import_joy67.Link,
|
|
133
|
+
List: () => import_joy67.List,
|
|
134
|
+
ListDivider: () => import_joy67.ListDivider,
|
|
135
|
+
ListItem: () => import_joy67.ListItem,
|
|
136
|
+
ListItemButton: () => import_joy67.ListItemButton,
|
|
137
|
+
ListItemContent: () => import_joy67.ListItemContent,
|
|
138
|
+
ListItemDecorator: () => import_joy67.ListItemDecorator,
|
|
139
|
+
ListSubheader: () => import_joy67.ListSubheader,
|
|
139
140
|
Markdown: () => Markdown,
|
|
140
141
|
Menu: () => Menu,
|
|
141
142
|
MenuButton: () => MenuButton,
|
|
@@ -159,11 +160,11 @@ __export(index_exports, {
|
|
|
159
160
|
RadioList: () => RadioList,
|
|
160
161
|
Select: () => Select,
|
|
161
162
|
Sheet: () => Sheet,
|
|
162
|
-
Skeleton: () =>
|
|
163
|
-
Slider: () =>
|
|
163
|
+
Skeleton: () => import_joy67.Skeleton,
|
|
164
|
+
Slider: () => import_joy67.Slider,
|
|
164
165
|
Stack: () => import_joy3.Stack,
|
|
165
166
|
Step: () => Step,
|
|
166
|
-
StepButton: () =>
|
|
167
|
+
StepButton: () => import_joy67.StepButton,
|
|
167
168
|
StepIndicator: () => StepIndicator,
|
|
168
169
|
Stepper: () => Stepper,
|
|
169
170
|
Switch: () => Switch,
|
|
@@ -179,84 +180,84 @@ __export(index_exports, {
|
|
|
179
180
|
Tooltip: () => Tooltip,
|
|
180
181
|
Typography: () => Typography,
|
|
181
182
|
Uploader: () => Uploader,
|
|
182
|
-
accordionClasses: () =>
|
|
183
|
-
accordionDetailsClasses: () =>
|
|
184
|
-
accordionSummaryClasses: () =>
|
|
185
|
-
accordionsClasses: () =>
|
|
186
|
-
alertClasses: () =>
|
|
187
|
-
aspectRatioClasses: () =>
|
|
188
|
-
autocompleteClasses: () =>
|
|
189
|
-
autocompleteListboxClasses: () =>
|
|
190
|
-
autocompleteOptionClasses: () =>
|
|
191
|
-
avatarClasses: () =>
|
|
192
|
-
avatarGroupClasses: () =>
|
|
193
|
-
badgeClasses: () =>
|
|
194
|
-
boxClasses: () =>
|
|
195
|
-
breadcrumbsClasses: () =>
|
|
196
|
-
buttonClasses: () =>
|
|
197
|
-
cardActionsClasses: () =>
|
|
198
|
-
cardClasses: () =>
|
|
199
|
-
cardContentClasses: () =>
|
|
200
|
-
cardCoverClasses: () =>
|
|
201
|
-
cardOverflowClasses: () =>
|
|
202
|
-
checkboxClasses: () =>
|
|
203
|
-
chipClasses: () =>
|
|
204
|
-
circularProgressClasses: () =>
|
|
205
|
-
dialogActionsClasses: () =>
|
|
206
|
-
dialogContentClasses: () =>
|
|
207
|
-
dialogTitleClasses: () =>
|
|
208
|
-
dividerClasses: () =>
|
|
209
|
-
drawerClasses: () =>
|
|
210
|
-
extendTheme: () =>
|
|
211
|
-
formControlClasses: () =>
|
|
212
|
-
formHelperTextClasses: () =>
|
|
213
|
-
formLabelClasses: () =>
|
|
214
|
-
gridClasses: () =>
|
|
215
|
-
iconButtonClasses: () =>
|
|
216
|
-
inputClasses: () =>
|
|
217
|
-
linearProgressClasses: () =>
|
|
218
|
-
linkClasses: () =>
|
|
219
|
-
listClasses: () =>
|
|
220
|
-
listDividerClasses: () =>
|
|
221
|
-
listItemButtonClasses: () =>
|
|
222
|
-
listItemClasses: () =>
|
|
223
|
-
listItemContentClasses: () =>
|
|
224
|
-
listItemDecoratorClasses: () =>
|
|
225
|
-
listSubheaderClasses: () =>
|
|
226
|
-
menuButtonClasses: () =>
|
|
227
|
-
menuClasses: () =>
|
|
228
|
-
menuItemClasses: () =>
|
|
229
|
-
modalClasses: () =>
|
|
230
|
-
modalCloseClasses: () =>
|
|
231
|
-
modalDialogClasses: () =>
|
|
232
|
-
modalOverflowClasses: () =>
|
|
233
|
-
optionClasses: () =>
|
|
234
|
-
radioClasses: () =>
|
|
235
|
-
radioGroupClasses: () =>
|
|
236
|
-
selectClasses: () =>
|
|
237
|
-
sheetClasses: () =>
|
|
238
|
-
skeletonClasses: () =>
|
|
239
|
-
sliderClasses: () =>
|
|
240
|
-
stackClasses: () =>
|
|
241
|
-
stepButtonClasses: () =>
|
|
242
|
-
stepClasses: () =>
|
|
243
|
-
stepperClasses: () =>
|
|
244
|
-
styled: () =>
|
|
245
|
-
switchClasses: () =>
|
|
246
|
-
tabListClasses: () =>
|
|
247
|
-
tabPanelClasses: () =>
|
|
248
|
-
tableClasses: () =>
|
|
249
|
-
tabsClasses: () =>
|
|
250
|
-
textareaClasses: () =>
|
|
183
|
+
accordionClasses: () => import_joy67.accordionClasses,
|
|
184
|
+
accordionDetailsClasses: () => import_joy67.accordionDetailsClasses,
|
|
185
|
+
accordionSummaryClasses: () => import_joy67.accordionSummaryClasses,
|
|
186
|
+
accordionsClasses: () => import_joy67.accordionGroupClasses,
|
|
187
|
+
alertClasses: () => import_joy67.alertClasses,
|
|
188
|
+
aspectRatioClasses: () => import_joy67.aspectRatioClasses,
|
|
189
|
+
autocompleteClasses: () => import_joy67.autocompleteClasses,
|
|
190
|
+
autocompleteListboxClasses: () => import_joy67.autocompleteListboxClasses,
|
|
191
|
+
autocompleteOptionClasses: () => import_joy67.autocompleteOptionClasses,
|
|
192
|
+
avatarClasses: () => import_joy67.avatarClasses,
|
|
193
|
+
avatarGroupClasses: () => import_joy67.avatarGroupClasses,
|
|
194
|
+
badgeClasses: () => import_joy67.badgeClasses,
|
|
195
|
+
boxClasses: () => import_joy67.boxClasses,
|
|
196
|
+
breadcrumbsClasses: () => import_joy67.breadcrumbsClasses,
|
|
197
|
+
buttonClasses: () => import_joy67.buttonClasses,
|
|
198
|
+
cardActionsClasses: () => import_joy67.cardActionsClasses,
|
|
199
|
+
cardClasses: () => import_joy67.cardClasses,
|
|
200
|
+
cardContentClasses: () => import_joy67.cardContentClasses,
|
|
201
|
+
cardCoverClasses: () => import_joy67.cardCoverClasses,
|
|
202
|
+
cardOverflowClasses: () => import_joy67.cardOverflowClasses,
|
|
203
|
+
checkboxClasses: () => import_joy67.checkboxClasses,
|
|
204
|
+
chipClasses: () => import_joy67.chipClasses,
|
|
205
|
+
circularProgressClasses: () => import_joy67.circularProgressClasses,
|
|
206
|
+
dialogActionsClasses: () => import_joy67.dialogActionsClasses,
|
|
207
|
+
dialogContentClasses: () => import_joy67.dialogContentClasses,
|
|
208
|
+
dialogTitleClasses: () => import_joy67.dialogTitleClasses,
|
|
209
|
+
dividerClasses: () => import_joy67.dividerClasses,
|
|
210
|
+
drawerClasses: () => import_joy67.drawerClasses,
|
|
211
|
+
extendTheme: () => import_joy66.extendTheme,
|
|
212
|
+
formControlClasses: () => import_joy67.formControlClasses,
|
|
213
|
+
formHelperTextClasses: () => import_joy67.formHelperTextClasses,
|
|
214
|
+
formLabelClasses: () => import_joy67.formLabelClasses,
|
|
215
|
+
gridClasses: () => import_joy67.gridClasses,
|
|
216
|
+
iconButtonClasses: () => import_joy67.iconButtonClasses,
|
|
217
|
+
inputClasses: () => import_joy67.inputClasses,
|
|
218
|
+
linearProgressClasses: () => import_joy67.linearProgressClasses,
|
|
219
|
+
linkClasses: () => import_joy67.linkClasses,
|
|
220
|
+
listClasses: () => import_joy67.listClasses,
|
|
221
|
+
listDividerClasses: () => import_joy67.listDividerClasses,
|
|
222
|
+
listItemButtonClasses: () => import_joy67.listItemButtonClasses,
|
|
223
|
+
listItemClasses: () => import_joy67.listItemClasses,
|
|
224
|
+
listItemContentClasses: () => import_joy67.listItemContentClasses,
|
|
225
|
+
listItemDecoratorClasses: () => import_joy67.listItemDecoratorClasses,
|
|
226
|
+
listSubheaderClasses: () => import_joy67.listSubheaderClasses,
|
|
227
|
+
menuButtonClasses: () => import_joy67.menuButtonClasses,
|
|
228
|
+
menuClasses: () => import_joy67.menuClasses,
|
|
229
|
+
menuItemClasses: () => import_joy67.menuItemClasses,
|
|
230
|
+
modalClasses: () => import_joy67.modalClasses,
|
|
231
|
+
modalCloseClasses: () => import_joy67.modalCloseClasses,
|
|
232
|
+
modalDialogClasses: () => import_joy67.modalDialogClasses,
|
|
233
|
+
modalOverflowClasses: () => import_joy67.modalOverflowClasses,
|
|
234
|
+
optionClasses: () => import_joy67.optionClasses,
|
|
235
|
+
radioClasses: () => import_joy67.radioClasses,
|
|
236
|
+
radioGroupClasses: () => import_joy67.radioGroupClasses,
|
|
237
|
+
selectClasses: () => import_joy67.selectClasses,
|
|
238
|
+
sheetClasses: () => import_joy67.sheetClasses,
|
|
239
|
+
skeletonClasses: () => import_joy67.skeletonClasses,
|
|
240
|
+
sliderClasses: () => import_joy67.sliderClasses,
|
|
241
|
+
stackClasses: () => import_joy67.stackClasses,
|
|
242
|
+
stepButtonClasses: () => import_joy67.stepButtonClasses,
|
|
243
|
+
stepClasses: () => import_joy67.stepClasses,
|
|
244
|
+
stepperClasses: () => import_joy67.stepperClasses,
|
|
245
|
+
styled: () => import_joy67.styled,
|
|
246
|
+
switchClasses: () => import_joy67.switchClasses,
|
|
247
|
+
tabListClasses: () => import_joy67.tabListClasses,
|
|
248
|
+
tabPanelClasses: () => import_joy67.tabPanelClasses,
|
|
249
|
+
tableClasses: () => import_joy67.tableClasses,
|
|
250
|
+
tabsClasses: () => import_joy67.tabsClasses,
|
|
251
|
+
textareaClasses: () => import_joy67.textareaClasses,
|
|
251
252
|
theme: () => defaultTheme,
|
|
252
|
-
tooltipClasses: () =>
|
|
253
|
-
typographyClasses: () =>
|
|
254
|
-
useColorScheme: () =>
|
|
255
|
-
useTheme: () =>
|
|
256
|
-
useThemeProps: () =>
|
|
253
|
+
tooltipClasses: () => import_joy67.tooltipClasses,
|
|
254
|
+
typographyClasses: () => import_joy67.typographyClasses,
|
|
255
|
+
useColorScheme: () => import_joy67.useColorScheme,
|
|
256
|
+
useTheme: () => import_joy67.useTheme,
|
|
257
|
+
useThemeProps: () => import_joy67.useThemeProps
|
|
257
258
|
});
|
|
258
259
|
module.exports = __toCommonJS(index_exports);
|
|
259
|
-
var
|
|
260
|
+
var import_joy67 = require("@mui/joy");
|
|
260
261
|
|
|
261
262
|
// src/components/Accordions/Accordions.tsx
|
|
262
263
|
var import_react = __toESM(require("react"));
|
|
@@ -441,7 +442,7 @@ var AutocompleteListBox = import_react6.default.forwardRef((props, ref) => {
|
|
|
441
442
|
open,
|
|
442
443
|
modifiers,
|
|
443
444
|
children,
|
|
444
|
-
ownerState: { loading, size: fontSize
|
|
445
|
+
ownerState: { loading, size: fontSize },
|
|
445
446
|
...innerProps
|
|
446
447
|
} = props;
|
|
447
448
|
const parentRef = (0, import_react6.useRef)(null);
|
|
@@ -474,42 +475,51 @@ var AutocompleteListBox = import_react6.default.forwardRef((props, ref) => {
|
|
|
474
475
|
virtualizer.measure();
|
|
475
476
|
}
|
|
476
477
|
}, [open, virtualizer]);
|
|
477
|
-
return /* @__PURE__ */ import_react6.default.createElement(
|
|
478
|
-
|
|
478
|
+
return /* @__PURE__ */ import_react6.default.createElement(
|
|
479
|
+
AutocompletePopper,
|
|
479
480
|
{
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
|
|
481
|
+
ref,
|
|
482
|
+
anchorEl,
|
|
483
|
+
open,
|
|
484
|
+
modifiers
|
|
484
485
|
},
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
|
|
486
|
+
/* @__PURE__ */ import_react6.default.createElement(import_joy10.AutocompleteListbox, { ...innerProps }, /* @__PURE__ */ import_react6.default.createElement("div", { ref: parentRef, style: { overflow: "auto" } }, /* @__PURE__ */ import_react6.default.createElement(
|
|
487
|
+
"div",
|
|
488
|
+
{
|
|
488
489
|
style: {
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
|
|
505
|
-
width: "100%"
|
|
506
|
-
}
|
|
490
|
+
height: `${virtualizer.getTotalSize()}px`,
|
|
491
|
+
position: "relative"
|
|
492
|
+
}
|
|
493
|
+
},
|
|
494
|
+
items.map(
|
|
495
|
+
({ index, size, start, key }) => import_react6.default.cloneElement(renderTargets[index], {
|
|
496
|
+
key,
|
|
497
|
+
style: {
|
|
498
|
+
position: "absolute",
|
|
499
|
+
top: 0,
|
|
500
|
+
left: 0,
|
|
501
|
+
width: "100%",
|
|
502
|
+
fontSize: `var(--ceed-fontSize-${fontSize})`,
|
|
503
|
+
height: `${size}px`,
|
|
504
|
+
transform: `translateY(${start}px)`,
|
|
505
|
+
overflow: "visible"
|
|
507
506
|
},
|
|
508
|
-
|
|
509
|
-
|
|
510
|
-
|
|
511
|
-
|
|
512
|
-
|
|
507
|
+
children: /* @__PURE__ */ import_react6.default.createElement(
|
|
508
|
+
"div",
|
|
509
|
+
{
|
|
510
|
+
style: {
|
|
511
|
+
textOverflow: "ellipsis",
|
|
512
|
+
textWrap: "nowrap",
|
|
513
|
+
overflow: "hidden",
|
|
514
|
+
width: "100%"
|
|
515
|
+
}
|
|
516
|
+
},
|
|
517
|
+
renderTargets[index].props.children
|
|
518
|
+
)
|
|
519
|
+
})
|
|
520
|
+
)
|
|
521
|
+
)))
|
|
522
|
+
);
|
|
513
523
|
});
|
|
514
524
|
var AutocompleteDeleteSize = {
|
|
515
525
|
sm: "20px",
|
|
@@ -519,7 +529,7 @@ var AutocompleteDeleteSize = {
|
|
|
519
529
|
var AutocompleteTagDelete = (0, import_joy10.styled)(IconButton_default, {
|
|
520
530
|
name: "Autocomplete",
|
|
521
531
|
slot: "tagDelete"
|
|
522
|
-
})(({ theme, size = "
|
|
532
|
+
})(({ theme, size = "sm" }) => ({
|
|
523
533
|
width: AutocompleteDeleteSize[size],
|
|
524
534
|
height: AutocompleteDeleteSize[size],
|
|
525
535
|
minWidth: AutocompleteDeleteSize[size],
|
|
@@ -579,7 +589,15 @@ function Autocomplete(props) {
|
|
|
579
589
|
return {
|
|
580
590
|
value: "",
|
|
581
591
|
label: "",
|
|
582
|
-
startDecorator: /* @__PURE__ */ import_react6.default.createElement(
|
|
592
|
+
startDecorator: /* @__PURE__ */ import_react6.default.createElement(
|
|
593
|
+
import_joy10.CircularProgress,
|
|
594
|
+
{
|
|
595
|
+
size: "sm",
|
|
596
|
+
color: "neutral",
|
|
597
|
+
variant: "plain",
|
|
598
|
+
thickness: 3
|
|
599
|
+
}
|
|
600
|
+
)
|
|
583
601
|
};
|
|
584
602
|
}
|
|
585
603
|
if (Array.isArray(_value)) {
|
|
@@ -594,11 +612,15 @@ function Autocomplete(props) {
|
|
|
594
612
|
[size, props.loading]
|
|
595
613
|
);
|
|
596
614
|
const startDecorator = (0, import_react6.useMemo)(
|
|
597
|
-
() => applySize(
|
|
615
|
+
() => applySize(
|
|
616
|
+
value?.startDecorator || props.startDecorator
|
|
617
|
+
),
|
|
598
618
|
[value, applySize, props.startDecorator]
|
|
599
619
|
);
|
|
600
620
|
const endDecorator = (0, import_react6.useMemo)(
|
|
601
|
-
() => applySize(
|
|
621
|
+
() => applySize(
|
|
622
|
+
value?.endDecorator || props.endDecorator
|
|
623
|
+
),
|
|
602
624
|
[value, applySize, props.endDecorator]
|
|
603
625
|
);
|
|
604
626
|
const handleChange = (0, import_react6.useCallback)(
|
|
@@ -636,7 +658,16 @@ function Autocomplete(props) {
|
|
|
636
658
|
const { onClick, ...rest } = getTagProps({ index });
|
|
637
659
|
return applySize(
|
|
638
660
|
/* @__PURE__ */ import_react6.default.createElement(Chip_default, { color: "primary", ...rest }, /* @__PURE__ */ import_react6.default.createElement(Stack_default, { direction: "row", alignItems: "center", gap: 2, py: 0.5 }, tag.value, applySize(
|
|
639
|
-
/* @__PURE__ */ import_react6.default.createElement(
|
|
661
|
+
/* @__PURE__ */ import_react6.default.createElement(
|
|
662
|
+
AutocompleteTagDelete,
|
|
663
|
+
{
|
|
664
|
+
color: "primary",
|
|
665
|
+
variant: "soft",
|
|
666
|
+
onClick,
|
|
667
|
+
size
|
|
668
|
+
},
|
|
669
|
+
/* @__PURE__ */ import_react6.default.createElement(import_Close.default, null)
|
|
670
|
+
)
|
|
640
671
|
)))
|
|
641
672
|
);
|
|
642
673
|
}),
|
|
@@ -4126,7 +4157,9 @@ var CalendarButton2 = (0, import_joy34.styled)(IconButton_default, {
|
|
|
4126
4157
|
"&:focus": {
|
|
4127
4158
|
"--Icon-color": "currentColor",
|
|
4128
4159
|
outlineOffset: `${theme.getCssVar("focus-thickness")}`,
|
|
4129
|
-
outline: `${theme.getCssVar("focus-thickness")} solid ${theme.getCssVar(
|
|
4160
|
+
outline: `${theme.getCssVar("focus-thickness")} solid ${theme.getCssVar(
|
|
4161
|
+
"palette-focusVisible"
|
|
4162
|
+
)}`
|
|
4130
4163
|
}
|
|
4131
4164
|
}));
|
|
4132
4165
|
var StyledPopper2 = (0, import_joy34.styled)(import_base3.Popper, {
|
|
@@ -4152,6 +4185,32 @@ var DateRangePickerRoot = (0, import_joy34.styled)("div", {
|
|
|
4152
4185
|
})({
|
|
4153
4186
|
width: "100%"
|
|
4154
4187
|
});
|
|
4188
|
+
var validValueFormat2 = (value, format) => {
|
|
4189
|
+
try {
|
|
4190
|
+
const [date1Str, date2Str] = value.split(" - ");
|
|
4191
|
+
if (!date1Str || !date2Str) {
|
|
4192
|
+
return false;
|
|
4193
|
+
}
|
|
4194
|
+
const parsedDate1 = parseDate2(date1Str, format);
|
|
4195
|
+
const parsedDate2 = parseDate2(date2Str, format);
|
|
4196
|
+
if (parsedDate1.toString() === "Invalid Date" || parsedDate2.toString() === "Invalid Date") {
|
|
4197
|
+
return false;
|
|
4198
|
+
}
|
|
4199
|
+
const formattedValue = formatValueString2(
|
|
4200
|
+
[parsedDate1, parsedDate2],
|
|
4201
|
+
format
|
|
4202
|
+
);
|
|
4203
|
+
if (value !== formattedValue) {
|
|
4204
|
+
return false;
|
|
4205
|
+
}
|
|
4206
|
+
const regex = new RegExp(
|
|
4207
|
+
`^${format.replace(/Y/g, "\\d").replace(/M/g, "\\d").replace(/D/g, "\\d")} - ${format.replace(/Y/g, "\\d").replace(/M/g, "\\d").replace(/D/g, "\\d")}$`
|
|
4208
|
+
);
|
|
4209
|
+
return regex.test(value);
|
|
4210
|
+
} catch (e) {
|
|
4211
|
+
return false;
|
|
4212
|
+
}
|
|
4213
|
+
};
|
|
4155
4214
|
var formatValueString2 = ([date1, date2], format) => {
|
|
4156
4215
|
const getStr = (date) => {
|
|
4157
4216
|
let day = `${date.getDate()}`;
|
|
@@ -4248,6 +4307,7 @@ var DateRangePicker = (0, import_react26.forwardRef)(
|
|
|
4248
4307
|
sx,
|
|
4249
4308
|
className,
|
|
4250
4309
|
format = "YYYY/MM/DD",
|
|
4310
|
+
displayFormat = "YYYY/MM/DD",
|
|
4251
4311
|
size,
|
|
4252
4312
|
inputReadOnly,
|
|
4253
4313
|
hideClearButton,
|
|
@@ -4264,12 +4324,27 @@ var DateRangePicker = (0, import_react26.forwardRef)(
|
|
|
4264
4324
|
[props.name, onChange]
|
|
4265
4325
|
)
|
|
4266
4326
|
);
|
|
4327
|
+
const [displayValue, setDisplayValue] = (0, import_react26.useState)(
|
|
4328
|
+
() => value ? formatValueString2(parseDates(value, format), displayFormat) : ""
|
|
4329
|
+
);
|
|
4267
4330
|
const [anchorEl, setAnchorEl] = (0, import_react26.useState)(null);
|
|
4268
4331
|
const open = Boolean(anchorEl);
|
|
4269
4332
|
const calendarValue = (0, import_react26.useMemo)(
|
|
4270
4333
|
() => value ? parseDates(value, format) : void 0,
|
|
4271
4334
|
[value, format]
|
|
4272
4335
|
);
|
|
4336
|
+
(0, import_react26.useEffect)(() => {
|
|
4337
|
+
if (value) {
|
|
4338
|
+
try {
|
|
4339
|
+
const dates = parseDates(value, format);
|
|
4340
|
+
const newDisplayValue = formatValueString2(dates, displayFormat);
|
|
4341
|
+
setDisplayValue(newDisplayValue);
|
|
4342
|
+
} catch (error2) {
|
|
4343
|
+
}
|
|
4344
|
+
} else {
|
|
4345
|
+
setDisplayValue("");
|
|
4346
|
+
}
|
|
4347
|
+
}, [displayFormat, value, format]);
|
|
4273
4348
|
(0, import_react26.useEffect)(() => {
|
|
4274
4349
|
if (!anchorEl) {
|
|
4275
4350
|
innerRef.current?.blur();
|
|
@@ -4280,9 +4355,41 @@ var DateRangePicker = (0, import_react26.forwardRef)(
|
|
|
4280
4355
|
]);
|
|
4281
4356
|
const handleChange = (0, import_react26.useCallback)(
|
|
4282
4357
|
(event) => {
|
|
4283
|
-
|
|
4358
|
+
const value2 = event.target.value;
|
|
4359
|
+
setDisplayValue(
|
|
4360
|
+
value2 ? formatValueString2(parseDates(value2, format), displayFormat) : value2
|
|
4361
|
+
);
|
|
4362
|
+
setValue(value2);
|
|
4284
4363
|
},
|
|
4285
|
-
[setValue]
|
|
4364
|
+
[displayFormat, format, setValue]
|
|
4365
|
+
);
|
|
4366
|
+
const handleDisplayInputChange = (0, import_react26.useCallback)(
|
|
4367
|
+
(event) => {
|
|
4368
|
+
if (event.target.value === "") {
|
|
4369
|
+
handleChange({
|
|
4370
|
+
target: {
|
|
4371
|
+
name: props.name,
|
|
4372
|
+
value: ""
|
|
4373
|
+
}
|
|
4374
|
+
});
|
|
4375
|
+
return;
|
|
4376
|
+
}
|
|
4377
|
+
const isValidDisplayValue = validValueFormat2(
|
|
4378
|
+
event.target.value,
|
|
4379
|
+
displayFormat
|
|
4380
|
+
);
|
|
4381
|
+
if (isValidDisplayValue) {
|
|
4382
|
+
const dates = parseDates(event.target.value, displayFormat);
|
|
4383
|
+
const formattedValue = formatValueString2(dates, format);
|
|
4384
|
+
handleChange({
|
|
4385
|
+
target: {
|
|
4386
|
+
name: props.name,
|
|
4387
|
+
value: formattedValue
|
|
4388
|
+
}
|
|
4389
|
+
});
|
|
4390
|
+
}
|
|
4391
|
+
},
|
|
4392
|
+
[displayFormat, format, handleChange, props.name]
|
|
4286
4393
|
);
|
|
4287
4394
|
const handleCalendarToggle = (0, import_react26.useCallback)(
|
|
4288
4395
|
(event) => {
|
|
@@ -4294,10 +4401,26 @@ var DateRangePicker = (0, import_react26.forwardRef)(
|
|
|
4294
4401
|
const handleCalendarChange = (0, import_react26.useCallback)(
|
|
4295
4402
|
([date1, date2]) => {
|
|
4296
4403
|
if (!date1 || !date2) return;
|
|
4297
|
-
|
|
4404
|
+
const formattedValue = formatValueString2([date1, date2], format);
|
|
4405
|
+
if (props.value !== void 0) {
|
|
4406
|
+
onChange?.({ target: { name: props.name, value: formattedValue } });
|
|
4407
|
+
} else {
|
|
4408
|
+
setDisplayValue(
|
|
4409
|
+
formatValueString2([date1, date2], displayFormat)
|
|
4410
|
+
);
|
|
4411
|
+
setValue(formattedValue);
|
|
4412
|
+
}
|
|
4298
4413
|
setAnchorEl(null);
|
|
4299
4414
|
},
|
|
4300
|
-
[
|
|
4415
|
+
[
|
|
4416
|
+
props.value,
|
|
4417
|
+
props.name,
|
|
4418
|
+
onChange,
|
|
4419
|
+
setValue,
|
|
4420
|
+
setAnchorEl,
|
|
4421
|
+
format,
|
|
4422
|
+
displayFormat
|
|
4423
|
+
]
|
|
4301
4424
|
);
|
|
4302
4425
|
const handleInputMouseDown = (0, import_react26.useCallback)(
|
|
4303
4426
|
(event) => {
|
|
@@ -4315,17 +4438,21 @@ var DateRangePicker = (0, import_react26.forwardRef)(
|
|
|
4315
4438
|
color: error ? "danger" : innerProps.color,
|
|
4316
4439
|
ref,
|
|
4317
4440
|
size,
|
|
4318
|
-
value,
|
|
4319
|
-
onChange:
|
|
4441
|
+
value: displayValue,
|
|
4442
|
+
onChange: handleDisplayInputChange,
|
|
4320
4443
|
disabled,
|
|
4321
4444
|
required,
|
|
4322
|
-
placeholder: `${
|
|
4445
|
+
placeholder: `${displayFormat} - ${displayFormat}`,
|
|
4323
4446
|
slotProps: {
|
|
4324
4447
|
input: {
|
|
4325
4448
|
component: TextMaskAdapter5,
|
|
4326
4449
|
ref: innerRef,
|
|
4327
|
-
format,
|
|
4328
|
-
sx: {
|
|
4450
|
+
format: displayFormat,
|
|
4451
|
+
sx: {
|
|
4452
|
+
"&:hover": {
|
|
4453
|
+
cursor: inputReadOnly || readOnly ? "default" : "text"
|
|
4454
|
+
}
|
|
4455
|
+
},
|
|
4329
4456
|
onMouseDown: handleInputMouseDown
|
|
4330
4457
|
}
|
|
4331
4458
|
},
|
|
@@ -4395,6 +4522,7 @@ var DateRangePicker = (0, import_react26.forwardRef)(
|
|
|
4395
4522
|
color: "neutral",
|
|
4396
4523
|
onClick: () => {
|
|
4397
4524
|
setValue("");
|
|
4525
|
+
setDisplayValue("");
|
|
4398
4526
|
setAnchorEl(null);
|
|
4399
4527
|
}
|
|
4400
4528
|
},
|
|
@@ -4507,152 +4635,981 @@ var InsetDrawer = (0, import_joy40.styled)(import_joy40.Drawer)(({ theme }) => (
|
|
|
4507
4635
|
}
|
|
4508
4636
|
}));
|
|
4509
4637
|
|
|
4510
|
-
// src/components/
|
|
4638
|
+
// src/components/FilterMenu/FilterMenu.tsx
|
|
4639
|
+
var import_react39 = __toESM(require("react"));
|
|
4640
|
+
var import_joy51 = require("@mui/joy");
|
|
4641
|
+
|
|
4642
|
+
// src/components/FilterMenu/components/CheckboxGroup.tsx
|
|
4511
4643
|
var import_react30 = __toESM(require("react"));
|
|
4512
4644
|
var import_joy41 = require("@mui/joy");
|
|
4513
|
-
|
|
4514
|
-
|
|
4515
|
-
|
|
4516
|
-
|
|
4517
|
-
|
|
4518
|
-
|
|
4519
|
-
|
|
4520
|
-
)
|
|
4521
|
-
|
|
4522
|
-
|
|
4523
|
-
|
|
4524
|
-
|
|
4525
|
-
|
|
4526
|
-
|
|
4527
|
-
|
|
4528
|
-
|
|
4529
|
-
|
|
4530
|
-
|
|
4531
|
-
|
|
4532
|
-
)
|
|
4533
|
-
|
|
4534
|
-
|
|
4535
|
-
|
|
4536
|
-
|
|
4537
|
-
overflow: "hidden",
|
|
4538
|
-
whiteSpace: "nowrap",
|
|
4539
|
-
clip: "rect(0 0 0 0)",
|
|
4540
|
-
clipPath: "inset(50%)",
|
|
4541
|
-
position: "absolute"
|
|
4542
|
-
});
|
|
4543
|
-
var PreviewRoot = (0, import_joy41.styled)(Stack_default, {
|
|
4544
|
-
name: "Uploader",
|
|
4545
|
-
slot: "PreviewRoot"
|
|
4546
|
-
})({});
|
|
4547
|
-
var UploadCard = (0, import_joy41.styled)(Card, {
|
|
4548
|
-
name: "Uploader",
|
|
4549
|
-
slot: "UploadCard"
|
|
4550
|
-
})(({ theme }) => ({
|
|
4551
|
-
padding: theme.spacing(2.5),
|
|
4552
|
-
border: `1px solid ${theme.palette.neutral.outlinedBorder}`
|
|
4553
|
-
}));
|
|
4554
|
-
var UploadFileIcon = (0, import_joy41.styled)(import_UploadFileRounded.default, {
|
|
4555
|
-
name: "Uploader",
|
|
4556
|
-
slot: "UploadFileIcon"
|
|
4557
|
-
})(({ theme }) => ({
|
|
4558
|
-
color: theme.palette.neutral["400"],
|
|
4559
|
-
width: "32px",
|
|
4560
|
-
height: "32px"
|
|
4561
|
-
}));
|
|
4562
|
-
var ClearIcon2 = (0, import_joy41.styled)(import_ClearRounded.default, {
|
|
4563
|
-
name: "Uploader",
|
|
4564
|
-
slot: "ClearIcon"
|
|
4565
|
-
})(({ theme }) => ({
|
|
4566
|
-
color: theme.palette.neutral.plainColor,
|
|
4567
|
-
width: "18px",
|
|
4568
|
-
height: "18px"
|
|
4569
|
-
}));
|
|
4570
|
-
var UNITS = [
|
|
4571
|
-
"byte",
|
|
4572
|
-
"kilobyte",
|
|
4573
|
-
"megabyte",
|
|
4574
|
-
"gigabyte",
|
|
4575
|
-
"terabyte",
|
|
4576
|
-
"petabyte"
|
|
4577
|
-
];
|
|
4578
|
-
var ALL_EXTENSIONS_BY_TYPE = {
|
|
4579
|
-
"image/*": [
|
|
4580
|
-
".jpeg",
|
|
4581
|
-
".jpg",
|
|
4582
|
-
".png",
|
|
4583
|
-
".gif",
|
|
4584
|
-
".bmp",
|
|
4585
|
-
".tiff",
|
|
4586
|
-
".svg",
|
|
4587
|
-
".webp",
|
|
4588
|
-
".heic",
|
|
4589
|
-
".ico"
|
|
4590
|
-
],
|
|
4591
|
-
"audio/*": [
|
|
4592
|
-
".mp3",
|
|
4593
|
-
".wav",
|
|
4594
|
-
".flac",
|
|
4595
|
-
".aac",
|
|
4596
|
-
".ogg",
|
|
4597
|
-
".m4a",
|
|
4598
|
-
".wma",
|
|
4599
|
-
".aiff",
|
|
4600
|
-
".alac",
|
|
4601
|
-
".midi",
|
|
4602
|
-
".mp4"
|
|
4603
|
-
],
|
|
4604
|
-
"video/*": [
|
|
4605
|
-
".mp4",
|
|
4606
|
-
".avi",
|
|
4607
|
-
".mkv",
|
|
4608
|
-
".mov",
|
|
4609
|
-
".wmv",
|
|
4610
|
-
".flv",
|
|
4611
|
-
".webm",
|
|
4612
|
-
".mpeg",
|
|
4613
|
-
".3gp",
|
|
4614
|
-
".m4v"
|
|
4615
|
-
]
|
|
4616
|
-
};
|
|
4617
|
-
var getFileSize = (n) => {
|
|
4618
|
-
const i = n == 0 ? 0 : Math.floor(Math.log(n) / Math.log(1024));
|
|
4619
|
-
const value = n / Math.pow(1024, i);
|
|
4620
|
-
const unit = UNITS[i];
|
|
4621
|
-
return Intl.NumberFormat("en-us", {
|
|
4622
|
-
style: "unit",
|
|
4623
|
-
unit,
|
|
4624
|
-
unitDisplay: "narrow"
|
|
4625
|
-
}).format(value);
|
|
4626
|
-
};
|
|
4627
|
-
var Preview = (props) => {
|
|
4628
|
-
const { files, uploaded, onDelete } = props;
|
|
4629
|
-
return /* @__PURE__ */ import_react30.default.createElement(PreviewRoot, { gap: 1 }, [...uploaded, ...files].map((file) => /* @__PURE__ */ import_react30.default.createElement(UploadCard, { key: file.name, size: "sm", color: "neutral" }, /* @__PURE__ */ import_react30.default.createElement(Stack_default, { direction: "row", alignItems: "center", gap: 2 }, /* @__PURE__ */ import_react30.default.createElement(UploadFileIcon, null), /* @__PURE__ */ import_react30.default.createElement(Stack_default, { flex: "1" }, /* @__PURE__ */ import_react30.default.createElement(Typography_default, { level: "body-sm", textColor: "common.black" }, file.name), !!file.size && /* @__PURE__ */ import_react30.default.createElement(
|
|
4645
|
+
function CheckboxGroup(props) {
|
|
4646
|
+
const { id, label, options, value, onChange, hidden } = props;
|
|
4647
|
+
const [internalValue, setInternalValue] = useControlledState(
|
|
4648
|
+
value,
|
|
4649
|
+
[],
|
|
4650
|
+
onChange
|
|
4651
|
+
);
|
|
4652
|
+
const handleCheckboxChange = (0, import_react30.useCallback)(
|
|
4653
|
+
(optionValue) => (event) => {
|
|
4654
|
+
const checked = event.target.checked;
|
|
4655
|
+
let newValue;
|
|
4656
|
+
if (checked) {
|
|
4657
|
+
newValue = [...internalValue, optionValue];
|
|
4658
|
+
} else {
|
|
4659
|
+
newValue = internalValue.filter((v) => v !== optionValue);
|
|
4660
|
+
}
|
|
4661
|
+
setInternalValue(newValue);
|
|
4662
|
+
},
|
|
4663
|
+
[internalValue, setInternalValue]
|
|
4664
|
+
);
|
|
4665
|
+
if (hidden) {
|
|
4666
|
+
return null;
|
|
4667
|
+
}
|
|
4668
|
+
return /* @__PURE__ */ import_react30.default.createElement(import_joy41.Stack, { spacing: 3, role: "group", "aria-labelledby": id }, !!label && /* @__PURE__ */ import_react30.default.createElement(
|
|
4630
4669
|
Typography_default,
|
|
4631
4670
|
{
|
|
4632
|
-
|
|
4633
|
-
|
|
4634
|
-
|
|
4671
|
+
id,
|
|
4672
|
+
level: "title-sm",
|
|
4673
|
+
component: "label",
|
|
4635
4674
|
textColor: "text.tertiary"
|
|
4636
4675
|
},
|
|
4637
|
-
|
|
4638
|
-
)
|
|
4639
|
-
|
|
4640
|
-
|
|
4641
|
-
|
|
4642
|
-
|
|
4643
|
-
|
|
4644
|
-
|
|
4645
|
-
}
|
|
4646
|
-
|
|
4647
|
-
|
|
4648
|
-
|
|
4649
|
-
|
|
4650
|
-
|
|
4651
|
-
|
|
4652
|
-
|
|
4653
|
-
|
|
4654
|
-
|
|
4655
|
-
|
|
4676
|
+
label
|
|
4677
|
+
), options.map((option) => /* @__PURE__ */ import_react30.default.createElement(
|
|
4678
|
+
Checkbox_default,
|
|
4679
|
+
{
|
|
4680
|
+
key: `${id}-${option.value}`,
|
|
4681
|
+
label: option.label,
|
|
4682
|
+
checked: internalValue?.includes(option.value),
|
|
4683
|
+
onChange: handleCheckboxChange(option.value)
|
|
4684
|
+
}
|
|
4685
|
+
)));
|
|
4686
|
+
}
|
|
4687
|
+
CheckboxGroup.displayName = "CheckboxGroup";
|
|
4688
|
+
|
|
4689
|
+
// src/components/FilterMenu/components/RadioGroup.tsx
|
|
4690
|
+
var import_react31 = __toESM(require("react"));
|
|
4691
|
+
|
|
4692
|
+
// src/components/Radio/Radio.tsx
|
|
4693
|
+
var import_joy42 = require("@mui/joy");
|
|
4694
|
+
var import_framer_motion26 = require("framer-motion");
|
|
4695
|
+
var MotionRadio = (0, import_framer_motion26.motion)(import_joy42.Radio);
|
|
4696
|
+
var Radio = MotionRadio;
|
|
4697
|
+
Radio.displayName = "Radio";
|
|
4698
|
+
var MotionRadioGroup = (0, import_framer_motion26.motion)(import_joy42.RadioGroup);
|
|
4699
|
+
var RadioGroup = MotionRadioGroup;
|
|
4700
|
+
RadioGroup.displayName = "RadioGroup";
|
|
4701
|
+
|
|
4702
|
+
// src/components/FilterMenu/components/RadioGroup.tsx
|
|
4703
|
+
var import_joy43 = require("@mui/joy");
|
|
4704
|
+
function RadioGroup2(props) {
|
|
4705
|
+
const { id, label, options, value, onChange, hidden } = props;
|
|
4706
|
+
const [internalValue, setInternalValue] = useControlledState(
|
|
4707
|
+
value,
|
|
4708
|
+
value ?? "",
|
|
4709
|
+
onChange
|
|
4710
|
+
);
|
|
4711
|
+
const handleRadioChange = (0, import_react31.useCallback)(
|
|
4712
|
+
(event) => {
|
|
4713
|
+
const newValue = event.target.value;
|
|
4714
|
+
const option = options.find((opt) => opt.value.toString() === newValue);
|
|
4715
|
+
const convertedValue = option ? option.value : newValue;
|
|
4716
|
+
setInternalValue(convertedValue);
|
|
4717
|
+
},
|
|
4718
|
+
[options, setInternalValue]
|
|
4719
|
+
);
|
|
4720
|
+
if (hidden) {
|
|
4721
|
+
return null;
|
|
4722
|
+
}
|
|
4723
|
+
return /* @__PURE__ */ import_react31.default.createElement(import_joy43.Stack, { spacing: 3, role: "group", "aria-labelledby": id }, !!label && /* @__PURE__ */ import_react31.default.createElement(import_joy43.Stack, { spacing: 1 }, /* @__PURE__ */ import_react31.default.createElement(
|
|
4724
|
+
Typography_default,
|
|
4725
|
+
{
|
|
4726
|
+
id,
|
|
4727
|
+
level: "title-sm",
|
|
4728
|
+
component: "label",
|
|
4729
|
+
textColor: "text.tertiary"
|
|
4730
|
+
},
|
|
4731
|
+
label
|
|
4732
|
+
)), /* @__PURE__ */ import_react31.default.createElement(
|
|
4733
|
+
RadioGroup,
|
|
4734
|
+
{
|
|
4735
|
+
name: id,
|
|
4736
|
+
value: internalValue?.toString(),
|
|
4737
|
+
onChange: handleRadioChange
|
|
4738
|
+
},
|
|
4739
|
+
options.map((option) => /* @__PURE__ */ import_react31.default.createElement(
|
|
4740
|
+
Radio,
|
|
4741
|
+
{
|
|
4742
|
+
key: `${id}-${option.value}`,
|
|
4743
|
+
value: option.value.toString(),
|
|
4744
|
+
label: option.label
|
|
4745
|
+
}
|
|
4746
|
+
))
|
|
4747
|
+
));
|
|
4748
|
+
}
|
|
4749
|
+
RadioGroup2.displayName = "RadioGroup";
|
|
4750
|
+
|
|
4751
|
+
// src/components/FilterMenu/components/DateRange.tsx
|
|
4752
|
+
var import_react32 = __toESM(require("react"));
|
|
4753
|
+
var import_joy44 = require("@mui/joy");
|
|
4754
|
+
function DateRange(props) {
|
|
4755
|
+
const {
|
|
4756
|
+
id,
|
|
4757
|
+
label,
|
|
4758
|
+
value,
|
|
4759
|
+
onChange,
|
|
4760
|
+
hidden,
|
|
4761
|
+
minDate,
|
|
4762
|
+
maxDate,
|
|
4763
|
+
disableFuture,
|
|
4764
|
+
disablePast,
|
|
4765
|
+
format = "YYYY/MM/DD",
|
|
4766
|
+
displayFormat,
|
|
4767
|
+
inputReadOnly,
|
|
4768
|
+
hideClearButton
|
|
4769
|
+
} = props;
|
|
4770
|
+
const [internalValue, setInternalValue] = useControlledState(
|
|
4771
|
+
value,
|
|
4772
|
+
null,
|
|
4773
|
+
onChange
|
|
4774
|
+
);
|
|
4775
|
+
const [selectedOption, setSelectedOption] = (0, import_react32.useState)("all-time");
|
|
4776
|
+
const dateRangeOptions = (0, import_react32.useMemo)(
|
|
4777
|
+
() => [
|
|
4778
|
+
{ label: "All Time", value: "all-time" },
|
|
4779
|
+
{ label: "This Month", value: "this-month" },
|
|
4780
|
+
{ label: "This Year", value: "this-year" },
|
|
4781
|
+
{ label: "Last Month", value: "last-month" },
|
|
4782
|
+
{ label: "Custom", value: "custom" }
|
|
4783
|
+
],
|
|
4784
|
+
[]
|
|
4785
|
+
);
|
|
4786
|
+
const getDateRangeForOption = (0, import_react32.useCallback)(
|
|
4787
|
+
(option) => {
|
|
4788
|
+
const now = /* @__PURE__ */ new Date();
|
|
4789
|
+
const currentYear = now.getFullYear();
|
|
4790
|
+
const currentMonth = now.getMonth();
|
|
4791
|
+
const formatDate = (date) => {
|
|
4792
|
+
const year = date.getFullYear();
|
|
4793
|
+
const month = String(date.getMonth() + 1).padStart(2, "0");
|
|
4794
|
+
const day = String(date.getDate()).padStart(2, "0");
|
|
4795
|
+
return `${year}-${month}-${day}`;
|
|
4796
|
+
};
|
|
4797
|
+
switch (option) {
|
|
4798
|
+
case "all-time":
|
|
4799
|
+
return null;
|
|
4800
|
+
case "this-month": {
|
|
4801
|
+
const startOfMonth = new Date(currentYear, currentMonth, 1);
|
|
4802
|
+
const endOfMonth = new Date(currentYear, currentMonth + 1, 0);
|
|
4803
|
+
return [
|
|
4804
|
+
formatDate(startOfMonth),
|
|
4805
|
+
formatDate(endOfMonth)
|
|
4806
|
+
];
|
|
4807
|
+
}
|
|
4808
|
+
case "this-year": {
|
|
4809
|
+
const startOfYear = new Date(currentYear, 0, 1);
|
|
4810
|
+
const endOfYear = new Date(currentYear, 11, 31);
|
|
4811
|
+
return [
|
|
4812
|
+
formatDate(startOfYear),
|
|
4813
|
+
formatDate(endOfYear)
|
|
4814
|
+
];
|
|
4815
|
+
}
|
|
4816
|
+
case "last-month": {
|
|
4817
|
+
const lastMonthYear = currentMonth === 0 ? currentYear - 1 : currentYear;
|
|
4818
|
+
const lastMonth = currentMonth === 0 ? 11 : currentMonth - 1;
|
|
4819
|
+
const startOfLastMonth = new Date(lastMonthYear, lastMonth, 1);
|
|
4820
|
+
const endOfLastMonth = new Date(lastMonthYear, lastMonth + 1, 0);
|
|
4821
|
+
return [
|
|
4822
|
+
formatDate(startOfLastMonth),
|
|
4823
|
+
formatDate(endOfLastMonth)
|
|
4824
|
+
];
|
|
4825
|
+
}
|
|
4826
|
+
case "custom":
|
|
4827
|
+
return internalValue;
|
|
4828
|
+
default:
|
|
4829
|
+
return null;
|
|
4830
|
+
}
|
|
4831
|
+
},
|
|
4832
|
+
[internalValue]
|
|
4833
|
+
);
|
|
4834
|
+
const determineOptionFromValue = (0, import_react32.useCallback)(
|
|
4835
|
+
(value2) => {
|
|
4836
|
+
if (!value2) {
|
|
4837
|
+
return "all-time";
|
|
4838
|
+
}
|
|
4839
|
+
const options = ["this-month", "this-year", "last-month"];
|
|
4840
|
+
for (const option of options) {
|
|
4841
|
+
const optionRange = getDateRangeForOption(option);
|
|
4842
|
+
if (optionRange && optionRange[0] === value2[0] && optionRange[1] === value2[1]) {
|
|
4843
|
+
return option;
|
|
4844
|
+
}
|
|
4845
|
+
}
|
|
4846
|
+
return "custom";
|
|
4847
|
+
},
|
|
4848
|
+
[getDateRangeForOption]
|
|
4849
|
+
);
|
|
4850
|
+
const customDateRangeValue = (0, import_react32.useMemo)(() => {
|
|
4851
|
+
if (selectedOption === "custom" && internalValue) {
|
|
4852
|
+
return `${internalValue[0]} - ${internalValue[1]}`;
|
|
4853
|
+
}
|
|
4854
|
+
return "";
|
|
4855
|
+
}, [selectedOption, internalValue]);
|
|
4856
|
+
(0, import_react32.useEffect)(() => {
|
|
4857
|
+
const newOption = determineOptionFromValue(internalValue);
|
|
4858
|
+
setSelectedOption(newOption);
|
|
4859
|
+
}, [internalValue, determineOptionFromValue]);
|
|
4860
|
+
const handleOptionChange = (0, import_react32.useCallback)(
|
|
4861
|
+
(event) => {
|
|
4862
|
+
const newOption = event.target.value;
|
|
4863
|
+
setSelectedOption(newOption);
|
|
4864
|
+
const newDateRange = getDateRangeForOption(newOption);
|
|
4865
|
+
setInternalValue(newDateRange);
|
|
4866
|
+
},
|
|
4867
|
+
[getDateRangeForOption, setInternalValue]
|
|
4868
|
+
);
|
|
4869
|
+
const handleCustomDateChange = (0, import_react32.useCallback)(
|
|
4870
|
+
(event) => {
|
|
4871
|
+
const dateRangeString = event.target.value;
|
|
4872
|
+
if (dateRangeString && dateRangeString.includes(" - ")) {
|
|
4873
|
+
const [startDate, endDate] = dateRangeString.split(" - ");
|
|
4874
|
+
if (startDate && endDate) {
|
|
4875
|
+
const newValue = [startDate, endDate];
|
|
4876
|
+
setInternalValue(newValue);
|
|
4877
|
+
}
|
|
4878
|
+
} else if (!dateRangeString) {
|
|
4879
|
+
setInternalValue(null);
|
|
4880
|
+
}
|
|
4881
|
+
},
|
|
4882
|
+
[setInternalValue]
|
|
4883
|
+
);
|
|
4884
|
+
if (hidden) {
|
|
4885
|
+
return null;
|
|
4886
|
+
}
|
|
4887
|
+
return /* @__PURE__ */ import_react32.default.createElement(import_joy44.Stack, { spacing: 3, role: "group", "aria-labelledby": id }, !!label && /* @__PURE__ */ import_react32.default.createElement(
|
|
4888
|
+
Typography_default,
|
|
4889
|
+
{
|
|
4890
|
+
id,
|
|
4891
|
+
level: "title-sm",
|
|
4892
|
+
component: "label",
|
|
4893
|
+
textColor: "text.tertiary"
|
|
4894
|
+
},
|
|
4895
|
+
label
|
|
4896
|
+
), /* @__PURE__ */ import_react32.default.createElement(
|
|
4897
|
+
RadioGroup,
|
|
4898
|
+
{
|
|
4899
|
+
name: `${id}-options`,
|
|
4900
|
+
value: selectedOption,
|
|
4901
|
+
onChange: handleOptionChange
|
|
4902
|
+
},
|
|
4903
|
+
dateRangeOptions.map((option) => /* @__PURE__ */ import_react32.default.createElement(
|
|
4904
|
+
Radio,
|
|
4905
|
+
{
|
|
4906
|
+
key: `${id}-${option.value}`,
|
|
4907
|
+
value: option.value,
|
|
4908
|
+
label: option.label
|
|
4909
|
+
}
|
|
4910
|
+
))
|
|
4911
|
+
), selectedOption === "custom" && /* @__PURE__ */ import_react32.default.createElement(
|
|
4912
|
+
DateRangePicker,
|
|
4913
|
+
{
|
|
4914
|
+
value: customDateRangeValue,
|
|
4915
|
+
onChange: handleCustomDateChange,
|
|
4916
|
+
minDate,
|
|
4917
|
+
maxDate,
|
|
4918
|
+
disableFuture,
|
|
4919
|
+
disablePast,
|
|
4920
|
+
format,
|
|
4921
|
+
displayFormat,
|
|
4922
|
+
inputReadOnly,
|
|
4923
|
+
hideClearButton
|
|
4924
|
+
}
|
|
4925
|
+
));
|
|
4926
|
+
}
|
|
4927
|
+
DateRange.displayName = "DateRange";
|
|
4928
|
+
|
|
4929
|
+
// src/components/FilterMenu/components/CurrencyInput.tsx
|
|
4930
|
+
var import_react33 = __toESM(require("react"));
|
|
4931
|
+
var import_joy45 = require("@mui/joy");
|
|
4932
|
+
function CurrencyInput3(props) {
|
|
4933
|
+
const {
|
|
4934
|
+
id,
|
|
4935
|
+
label,
|
|
4936
|
+
value,
|
|
4937
|
+
onChange,
|
|
4938
|
+
hidden,
|
|
4939
|
+
max,
|
|
4940
|
+
placeholder,
|
|
4941
|
+
useMinorUnit,
|
|
4942
|
+
currency = "USD"
|
|
4943
|
+
} = props;
|
|
4944
|
+
const [internalValue, setInternalValue] = useControlledState(
|
|
4945
|
+
value,
|
|
4946
|
+
value,
|
|
4947
|
+
onChange
|
|
4948
|
+
);
|
|
4949
|
+
const handleCurrencyChange = (0, import_react33.useCallback)(
|
|
4950
|
+
(event) => {
|
|
4951
|
+
const newValue = event.target.value;
|
|
4952
|
+
setInternalValue(newValue);
|
|
4953
|
+
},
|
|
4954
|
+
[setInternalValue]
|
|
4955
|
+
);
|
|
4956
|
+
if (hidden) {
|
|
4957
|
+
return null;
|
|
4958
|
+
}
|
|
4959
|
+
return /* @__PURE__ */ import_react33.default.createElement(import_joy45.Stack, { spacing: 3, role: "group", "aria-labelledby": id }, !!label && /* @__PURE__ */ import_react33.default.createElement(
|
|
4960
|
+
Typography_default,
|
|
4961
|
+
{
|
|
4962
|
+
id,
|
|
4963
|
+
level: "title-sm",
|
|
4964
|
+
component: "label",
|
|
4965
|
+
textColor: "text.tertiary"
|
|
4966
|
+
},
|
|
4967
|
+
label
|
|
4968
|
+
), /* @__PURE__ */ import_react33.default.createElement(
|
|
4969
|
+
CurrencyInput,
|
|
4970
|
+
{
|
|
4971
|
+
value: internalValue,
|
|
4972
|
+
onChange: handleCurrencyChange,
|
|
4973
|
+
max,
|
|
4974
|
+
placeholder,
|
|
4975
|
+
useMinorUnit,
|
|
4976
|
+
currency,
|
|
4977
|
+
"aria-labelledby": label ? id : void 0
|
|
4978
|
+
}
|
|
4979
|
+
));
|
|
4980
|
+
}
|
|
4981
|
+
CurrencyInput3.displayName = "CurrencyInput";
|
|
4982
|
+
|
|
4983
|
+
// src/components/FilterMenu/components/CurrencyRange.tsx
|
|
4984
|
+
var import_react34 = __toESM(require("react"));
|
|
4985
|
+
var import_joy46 = require("@mui/joy");
|
|
4986
|
+
function CurrencyRange(props) {
|
|
4987
|
+
const {
|
|
4988
|
+
id,
|
|
4989
|
+
label,
|
|
4990
|
+
value,
|
|
4991
|
+
onChange,
|
|
4992
|
+
hidden,
|
|
4993
|
+
max,
|
|
4994
|
+
placeholder,
|
|
4995
|
+
useMinorUnit,
|
|
4996
|
+
currency = "USD"
|
|
4997
|
+
} = props;
|
|
4998
|
+
const [internalValue, setInternalValue] = useControlledState(
|
|
4999
|
+
value,
|
|
5000
|
+
null,
|
|
5001
|
+
onChange
|
|
5002
|
+
);
|
|
5003
|
+
const minValue = internalValue?.[0];
|
|
5004
|
+
const maxValue = internalValue?.[1];
|
|
5005
|
+
const handleMinChange = (0, import_react34.useCallback)(
|
|
5006
|
+
(event) => {
|
|
5007
|
+
const newMinValue = event.target.value;
|
|
5008
|
+
const currentMaxValue = maxValue;
|
|
5009
|
+
if (newMinValue !== void 0 && currentMaxValue !== void 0) {
|
|
5010
|
+
setInternalValue([newMinValue, currentMaxValue]);
|
|
5011
|
+
} else if (newMinValue !== void 0) {
|
|
5012
|
+
setInternalValue([newMinValue, newMinValue]);
|
|
5013
|
+
} else {
|
|
5014
|
+
setInternalValue(null);
|
|
5015
|
+
}
|
|
5016
|
+
},
|
|
5017
|
+
[maxValue, setInternalValue]
|
|
5018
|
+
);
|
|
5019
|
+
const handleMaxChange = (0, import_react34.useCallback)(
|
|
5020
|
+
(event) => {
|
|
5021
|
+
const newMaxValue = event.target.value;
|
|
5022
|
+
const currentMinValue = minValue;
|
|
5023
|
+
if (currentMinValue !== void 0 && newMaxValue !== void 0) {
|
|
5024
|
+
setInternalValue([currentMinValue, newMaxValue]);
|
|
5025
|
+
} else if (newMaxValue !== void 0) {
|
|
5026
|
+
setInternalValue([newMaxValue, newMaxValue]);
|
|
5027
|
+
} else {
|
|
5028
|
+
setInternalValue(null);
|
|
5029
|
+
}
|
|
5030
|
+
},
|
|
5031
|
+
[minValue, setInternalValue]
|
|
5032
|
+
);
|
|
5033
|
+
if (hidden) {
|
|
5034
|
+
return null;
|
|
5035
|
+
}
|
|
5036
|
+
return /* @__PURE__ */ import_react34.default.createElement(import_joy46.Stack, { spacing: 3, role: "group", "aria-labelledby": id }, !!label && /* @__PURE__ */ import_react34.default.createElement(
|
|
5037
|
+
Typography_default,
|
|
5038
|
+
{
|
|
5039
|
+
id,
|
|
5040
|
+
level: "title-sm",
|
|
5041
|
+
component: "label",
|
|
5042
|
+
textColor: "text.tertiary"
|
|
5043
|
+
},
|
|
5044
|
+
label
|
|
5045
|
+
), /* @__PURE__ */ import_react34.default.createElement(import_joy46.Stack, { direction: "row", spacing: 2, alignItems: "flex-end" }, /* @__PURE__ */ import_react34.default.createElement(
|
|
5046
|
+
CurrencyInput,
|
|
5047
|
+
{
|
|
5048
|
+
label: "Minimum",
|
|
5049
|
+
value: minValue,
|
|
5050
|
+
onChange: handleMinChange,
|
|
5051
|
+
max,
|
|
5052
|
+
placeholder,
|
|
5053
|
+
useMinorUnit,
|
|
5054
|
+
currency,
|
|
5055
|
+
"aria-labelledby": label ? id : void 0,
|
|
5056
|
+
"aria-label": "Minimum amount"
|
|
5057
|
+
}
|
|
5058
|
+
), /* @__PURE__ */ import_react34.default.createElement(
|
|
5059
|
+
CurrencyInput,
|
|
5060
|
+
{
|
|
5061
|
+
label: "Maximum",
|
|
5062
|
+
value: maxValue,
|
|
5063
|
+
onChange: handleMaxChange,
|
|
5064
|
+
max,
|
|
5065
|
+
placeholder,
|
|
5066
|
+
useMinorUnit,
|
|
5067
|
+
currency,
|
|
5068
|
+
"aria-labelledby": label ? id : void 0,
|
|
5069
|
+
"aria-label": "Maximum amount"
|
|
5070
|
+
}
|
|
5071
|
+
)));
|
|
5072
|
+
}
|
|
5073
|
+
CurrencyRange.displayName = "CurrencyRange";
|
|
5074
|
+
|
|
5075
|
+
// src/components/FilterMenu/components/PercentageInput.tsx
|
|
5076
|
+
var import_react36 = __toESM(require("react"));
|
|
5077
|
+
var import_joy48 = require("@mui/joy");
|
|
5078
|
+
|
|
5079
|
+
// src/components/PercentageInput/PercentageInput.tsx
|
|
5080
|
+
var import_react35 = __toESM(require("react"));
|
|
5081
|
+
var import_react_number_format2 = require("react-number-format");
|
|
5082
|
+
var import_joy47 = require("@mui/joy");
|
|
5083
|
+
var padDecimal = (value, decimalScale) => {
|
|
5084
|
+
const [integer, decimal = ""] = `${value}`.split(".");
|
|
5085
|
+
return Number(`${integer}${decimal.padEnd(decimalScale, "0")}`);
|
|
5086
|
+
};
|
|
5087
|
+
var TextMaskAdapter7 = import_react35.default.forwardRef(
|
|
5088
|
+
function TextMaskAdapter8(props, ref) {
|
|
5089
|
+
const { onChange, min, max, ...innerProps } = props;
|
|
5090
|
+
return /* @__PURE__ */ import_react35.default.createElement(
|
|
5091
|
+
import_react_number_format2.NumericFormat,
|
|
5092
|
+
{
|
|
5093
|
+
...innerProps,
|
|
5094
|
+
onValueChange: ({ value }) => {
|
|
5095
|
+
onChange?.({
|
|
5096
|
+
target: {
|
|
5097
|
+
name: props.name,
|
|
5098
|
+
value
|
|
5099
|
+
}
|
|
5100
|
+
});
|
|
5101
|
+
},
|
|
5102
|
+
valueIsNumericString: true,
|
|
5103
|
+
thousandSeparator: true,
|
|
5104
|
+
suffix: "%",
|
|
5105
|
+
getInputRef: ref,
|
|
5106
|
+
allowNegative: true
|
|
5107
|
+
}
|
|
5108
|
+
);
|
|
5109
|
+
}
|
|
5110
|
+
);
|
|
5111
|
+
var PercentageInputRoot = (0, import_joy47.styled)(Input_default, {
|
|
5112
|
+
name: "PercentageInput",
|
|
5113
|
+
slot: "Root",
|
|
5114
|
+
overridesResolver: (props, styles) => styles.root
|
|
5115
|
+
})({});
|
|
5116
|
+
var PercentageInput = import_react35.default.forwardRef(function PercentageInput2(inProps, ref) {
|
|
5117
|
+
const props = (0, import_joy47.useThemeProps)({ props: inProps, name: "PercentageInput" });
|
|
5118
|
+
const {
|
|
5119
|
+
name,
|
|
5120
|
+
onChange,
|
|
5121
|
+
label,
|
|
5122
|
+
error,
|
|
5123
|
+
helperText,
|
|
5124
|
+
required,
|
|
5125
|
+
disabled,
|
|
5126
|
+
useMinorUnit,
|
|
5127
|
+
maxDecimalScale = 0,
|
|
5128
|
+
min,
|
|
5129
|
+
max,
|
|
5130
|
+
// NOTE: 스타일 관련된 props는 최상위 엘리먼트에 적용한다.
|
|
5131
|
+
sx,
|
|
5132
|
+
className,
|
|
5133
|
+
...innerProps
|
|
5134
|
+
} = props;
|
|
5135
|
+
const [_value, setValue] = useControlledState(
|
|
5136
|
+
props.value,
|
|
5137
|
+
props.defaultValue,
|
|
5138
|
+
(0, import_react35.useCallback)(
|
|
5139
|
+
(value2) => onChange?.({ target: { name, value: value2 } }),
|
|
5140
|
+
[onChange, name]
|
|
5141
|
+
)
|
|
5142
|
+
);
|
|
5143
|
+
const [internalError, setInternalError] = (0, import_react35.useState)(
|
|
5144
|
+
max && _value && _value > max || min && _value && _value < min
|
|
5145
|
+
);
|
|
5146
|
+
const value = (0, import_react35.useMemo)(() => {
|
|
5147
|
+
if (_value && useMinorUnit) {
|
|
5148
|
+
return _value / Math.pow(10, maxDecimalScale);
|
|
5149
|
+
}
|
|
5150
|
+
return _value;
|
|
5151
|
+
}, [_value, useMinorUnit, maxDecimalScale]);
|
|
5152
|
+
const handleChange = (0, import_react35.useCallback)(
|
|
5153
|
+
(event) => {
|
|
5154
|
+
if (event.target.value === "") {
|
|
5155
|
+
setValue(void 0);
|
|
5156
|
+
return;
|
|
5157
|
+
}
|
|
5158
|
+
const originalAmount = Number(event.target.value);
|
|
5159
|
+
if (min && originalAmount < min || max && originalAmount > max) {
|
|
5160
|
+
setInternalError(true);
|
|
5161
|
+
} else {
|
|
5162
|
+
setInternalError(false);
|
|
5163
|
+
}
|
|
5164
|
+
const amount = useMinorUnit ? padDecimal(originalAmount, maxDecimalScale) : originalAmount;
|
|
5165
|
+
setValue(amount);
|
|
5166
|
+
},
|
|
5167
|
+
[setValue, useMinorUnit, maxDecimalScale, min, max]
|
|
5168
|
+
);
|
|
5169
|
+
return /* @__PURE__ */ import_react35.default.createElement(
|
|
5170
|
+
PercentageInputRoot,
|
|
5171
|
+
{
|
|
5172
|
+
...innerProps,
|
|
5173
|
+
ref,
|
|
5174
|
+
value,
|
|
5175
|
+
onChange: handleChange,
|
|
5176
|
+
error: internalError || error,
|
|
5177
|
+
disabled,
|
|
5178
|
+
required,
|
|
5179
|
+
color: internalError || error ? "danger" : props.color,
|
|
5180
|
+
label,
|
|
5181
|
+
helperText,
|
|
5182
|
+
slotProps: {
|
|
5183
|
+
input: {
|
|
5184
|
+
component: TextMaskAdapter7,
|
|
5185
|
+
"aria-label": innerProps["aria-label"],
|
|
5186
|
+
decimalScale: maxDecimalScale
|
|
5187
|
+
}
|
|
5188
|
+
},
|
|
5189
|
+
sx: {
|
|
5190
|
+
...sx
|
|
5191
|
+
},
|
|
5192
|
+
className
|
|
5193
|
+
}
|
|
5194
|
+
);
|
|
5195
|
+
});
|
|
5196
|
+
PercentageInput.displayName = "PercentageInput";
|
|
5197
|
+
|
|
5198
|
+
// src/components/FilterMenu/components/PercentageInput.tsx
|
|
5199
|
+
var PercentageInput3 = ({
|
|
5200
|
+
id,
|
|
5201
|
+
hidden,
|
|
5202
|
+
label,
|
|
5203
|
+
value,
|
|
5204
|
+
onChange,
|
|
5205
|
+
placeholder,
|
|
5206
|
+
useMinorUnit,
|
|
5207
|
+
maxDecimalScale,
|
|
5208
|
+
min,
|
|
5209
|
+
max
|
|
5210
|
+
}) => {
|
|
5211
|
+
const [_value, setValue] = useControlledState(value, void 0, onChange);
|
|
5212
|
+
if (hidden) {
|
|
5213
|
+
return null;
|
|
5214
|
+
}
|
|
5215
|
+
return /* @__PURE__ */ import_react36.default.createElement(import_joy48.Stack, { spacing: 3, role: "group", "aria-labelledby": id }, !!label && /* @__PURE__ */ import_react36.default.createElement(
|
|
5216
|
+
import_joy48.Typography,
|
|
5217
|
+
{
|
|
5218
|
+
id,
|
|
5219
|
+
level: "title-sm",
|
|
5220
|
+
component: "label",
|
|
5221
|
+
textColor: "text.tertiary"
|
|
5222
|
+
},
|
|
5223
|
+
label
|
|
5224
|
+
), /* @__PURE__ */ import_react36.default.createElement(
|
|
5225
|
+
PercentageInput,
|
|
5226
|
+
{
|
|
5227
|
+
value: _value,
|
|
5228
|
+
onChange: (event) => setValue(event.target.value),
|
|
5229
|
+
useMinorUnit,
|
|
5230
|
+
maxDecimalScale,
|
|
5231
|
+
min,
|
|
5232
|
+
max,
|
|
5233
|
+
placeholder
|
|
5234
|
+
}
|
|
5235
|
+
));
|
|
5236
|
+
};
|
|
5237
|
+
|
|
5238
|
+
// src/components/FilterMenu/components/PercentageRange.tsx
|
|
5239
|
+
var import_react37 = __toESM(require("react"));
|
|
5240
|
+
var import_joy49 = require("@mui/joy");
|
|
5241
|
+
function PercentageRange(props) {
|
|
5242
|
+
const {
|
|
5243
|
+
id,
|
|
5244
|
+
label,
|
|
5245
|
+
value,
|
|
5246
|
+
onChange,
|
|
5247
|
+
hidden,
|
|
5248
|
+
useMinorUnit,
|
|
5249
|
+
maxDecimalScale,
|
|
5250
|
+
min,
|
|
5251
|
+
max
|
|
5252
|
+
} = props;
|
|
5253
|
+
const [internalValue, setInternalValue] = useControlledState(value, null, onChange);
|
|
5254
|
+
const minValue = internalValue?.[0];
|
|
5255
|
+
const maxValue = internalValue?.[1];
|
|
5256
|
+
const handleMinChange = (0, import_react37.useCallback)(
|
|
5257
|
+
(event) => {
|
|
5258
|
+
const newMinValue = event.target.value;
|
|
5259
|
+
const currentMaxValue = maxValue;
|
|
5260
|
+
if (newMinValue !== void 0) {
|
|
5261
|
+
setInternalValue([newMinValue, currentMaxValue || null]);
|
|
5262
|
+
} else {
|
|
5263
|
+
setInternalValue(null);
|
|
5264
|
+
}
|
|
5265
|
+
},
|
|
5266
|
+
[maxValue, setInternalValue]
|
|
5267
|
+
);
|
|
5268
|
+
const handleMaxChange = (0, import_react37.useCallback)(
|
|
5269
|
+
(event) => {
|
|
5270
|
+
const newMaxValue = event.target.value;
|
|
5271
|
+
const currentMinValue = minValue;
|
|
5272
|
+
if (newMaxValue !== void 0) {
|
|
5273
|
+
setInternalValue([currentMinValue || null, newMaxValue]);
|
|
5274
|
+
} else {
|
|
5275
|
+
setInternalValue(null);
|
|
5276
|
+
}
|
|
5277
|
+
},
|
|
5278
|
+
[minValue, setInternalValue]
|
|
5279
|
+
);
|
|
5280
|
+
if (hidden) {
|
|
5281
|
+
return null;
|
|
5282
|
+
}
|
|
5283
|
+
return /* @__PURE__ */ import_react37.default.createElement(import_joy49.Stack, { spacing: 3, role: "group", "aria-labelledby": id }, !!label && /* @__PURE__ */ import_react37.default.createElement(
|
|
5284
|
+
Typography_default,
|
|
5285
|
+
{
|
|
5286
|
+
id,
|
|
5287
|
+
level: "title-sm",
|
|
5288
|
+
component: "label",
|
|
5289
|
+
textColor: "text.tertiary"
|
|
5290
|
+
},
|
|
5291
|
+
label
|
|
5292
|
+
), /* @__PURE__ */ import_react37.default.createElement(import_joy49.Stack, { direction: "row", spacing: 2, alignItems: "flex-end" }, /* @__PURE__ */ import_react37.default.createElement(
|
|
5293
|
+
PercentageInput,
|
|
5294
|
+
{
|
|
5295
|
+
label: "Minimum",
|
|
5296
|
+
value: minValue ?? void 0,
|
|
5297
|
+
onChange: handleMinChange,
|
|
5298
|
+
useMinorUnit,
|
|
5299
|
+
maxDecimalScale,
|
|
5300
|
+
min,
|
|
5301
|
+
max,
|
|
5302
|
+
"aria-labelledby": label ? id : void 0,
|
|
5303
|
+
"aria-label": "Minimum percentage",
|
|
5304
|
+
placeholder: "0%"
|
|
5305
|
+
}
|
|
5306
|
+
), /* @__PURE__ */ import_react37.default.createElement(
|
|
5307
|
+
PercentageInput,
|
|
5308
|
+
{
|
|
5309
|
+
label: "Maximum",
|
|
5310
|
+
value: maxValue ?? void 0,
|
|
5311
|
+
onChange: handleMaxChange,
|
|
5312
|
+
useMinorUnit,
|
|
5313
|
+
maxDecimalScale,
|
|
5314
|
+
min,
|
|
5315
|
+
max,
|
|
5316
|
+
"aria-labelledby": label ? id : void 0,
|
|
5317
|
+
"aria-label": "Maximum percentage",
|
|
5318
|
+
placeholder: "0%"
|
|
5319
|
+
}
|
|
5320
|
+
)));
|
|
5321
|
+
}
|
|
5322
|
+
PercentageRange.displayName = "PercentageRange";
|
|
5323
|
+
|
|
5324
|
+
// src/components/FilterMenu/components/Autocomplete.tsx
|
|
5325
|
+
var import_react38 = __toESM(require("react"));
|
|
5326
|
+
var import_joy50 = require("@mui/joy");
|
|
5327
|
+
function Autocomplete2(props) {
|
|
5328
|
+
const { id, label, value, onChange, options, multiple, hidden, placeholder } = props;
|
|
5329
|
+
const [internalValue, setInternalValue] = useControlledState(
|
|
5330
|
+
value,
|
|
5331
|
+
void 0,
|
|
5332
|
+
onChange
|
|
5333
|
+
);
|
|
5334
|
+
const autocompleteValue = typeof internalValue === "string" || typeof internalValue === "number" ? String(internalValue) : void 0;
|
|
5335
|
+
const handleChange = (0, import_react38.useCallback)(
|
|
5336
|
+
(event) => {
|
|
5337
|
+
const val = event.target.value;
|
|
5338
|
+
if (val) {
|
|
5339
|
+
const numVal = Number(val);
|
|
5340
|
+
setInternalValue(!isNaN(numVal) && isFinite(numVal) ? numVal : val);
|
|
5341
|
+
} else {
|
|
5342
|
+
setInternalValue(void 0);
|
|
5343
|
+
}
|
|
5344
|
+
},
|
|
5345
|
+
[setInternalValue]
|
|
5346
|
+
);
|
|
5347
|
+
if (hidden) {
|
|
5348
|
+
return null;
|
|
5349
|
+
}
|
|
5350
|
+
return /* @__PURE__ */ import_react38.default.createElement(import_joy50.Stack, { spacing: 3, role: "group", "aria-labelledby": id }, !!label && /* @__PURE__ */ import_react38.default.createElement(
|
|
5351
|
+
Typography_default,
|
|
5352
|
+
{
|
|
5353
|
+
id,
|
|
5354
|
+
level: "title-sm",
|
|
5355
|
+
component: "label",
|
|
5356
|
+
textColor: "text.tertiary"
|
|
5357
|
+
},
|
|
5358
|
+
label
|
|
5359
|
+
), /* @__PURE__ */ import_react38.default.createElement(
|
|
5360
|
+
Autocomplete,
|
|
5361
|
+
{
|
|
5362
|
+
value: autocompleteValue,
|
|
5363
|
+
onChange: handleChange,
|
|
5364
|
+
options,
|
|
5365
|
+
multiple,
|
|
5366
|
+
placeholder,
|
|
5367
|
+
"aria-labelledby": label ? id : void 0
|
|
5368
|
+
}
|
|
5369
|
+
));
|
|
5370
|
+
}
|
|
5371
|
+
Autocomplete2.displayName = "Autocomplete";
|
|
5372
|
+
|
|
5373
|
+
// src/components/FilterMenu/FilterMenu.tsx
|
|
5374
|
+
var componentMap = {
|
|
5375
|
+
"checkbox-group": CheckboxGroup,
|
|
5376
|
+
"radio-group": RadioGroup2,
|
|
5377
|
+
"date-range": DateRange,
|
|
5378
|
+
"currency-input": CurrencyInput3,
|
|
5379
|
+
"currency-range": CurrencyRange,
|
|
5380
|
+
"percentage-input": PercentageInput3,
|
|
5381
|
+
"percentage-range": PercentageRange,
|
|
5382
|
+
autocomplete: Autocomplete2
|
|
5383
|
+
};
|
|
5384
|
+
function FilterMenu(props) {
|
|
5385
|
+
const {
|
|
5386
|
+
filters,
|
|
5387
|
+
values,
|
|
5388
|
+
defaultValues,
|
|
5389
|
+
resetValues = {},
|
|
5390
|
+
onChange,
|
|
5391
|
+
onClose,
|
|
5392
|
+
useClear,
|
|
5393
|
+
useReset
|
|
5394
|
+
} = props;
|
|
5395
|
+
const [internalValues, setInternalValues] = useControlledState(
|
|
5396
|
+
values,
|
|
5397
|
+
defaultValues || {},
|
|
5398
|
+
void 0
|
|
5399
|
+
// onChange는 Apply 버튼에서만 호출
|
|
5400
|
+
);
|
|
5401
|
+
const handleFilterChange = (0, import_react39.useCallback)(
|
|
5402
|
+
(filterId, value) => {
|
|
5403
|
+
setInternalValues((prev) => ({
|
|
5404
|
+
...prev,
|
|
5405
|
+
[filterId]: value
|
|
5406
|
+
}));
|
|
5407
|
+
},
|
|
5408
|
+
[setInternalValues]
|
|
5409
|
+
);
|
|
5410
|
+
const handleApply = (0, import_react39.useCallback)(() => {
|
|
5411
|
+
onChange?.(internalValues);
|
|
5412
|
+
onClose?.();
|
|
5413
|
+
}, [onChange, onClose, internalValues]);
|
|
5414
|
+
const handleClear = (0, import_react39.useCallback)(() => {
|
|
5415
|
+
const clearedValues = resetValues || {};
|
|
5416
|
+
setInternalValues(clearedValues);
|
|
5417
|
+
onChange?.(clearedValues);
|
|
5418
|
+
onClose?.();
|
|
5419
|
+
}, [resetValues, setInternalValues, onChange, onClose]);
|
|
5420
|
+
return /* @__PURE__ */ import_react39.default.createElement(
|
|
5421
|
+
ModalDialog,
|
|
5422
|
+
{
|
|
5423
|
+
sx: {
|
|
5424
|
+
position: "relative",
|
|
5425
|
+
transform: "none",
|
|
5426
|
+
left: "initial",
|
|
5427
|
+
top: "initial"
|
|
5428
|
+
}
|
|
5429
|
+
},
|
|
5430
|
+
/* @__PURE__ */ import_react39.default.createElement(DialogContent, { sx: { paddingTop: 5 } }, /* @__PURE__ */ import_react39.default.createElement(import_joy51.Stack, { spacing: 6 }, filters?.map((filter) => {
|
|
5431
|
+
const FilterComponent = componentMap[filter.type];
|
|
5432
|
+
return FilterComponent ? /* @__PURE__ */ import_react39.default.createElement(
|
|
5433
|
+
FilterComponent,
|
|
5434
|
+
{
|
|
5435
|
+
key: filter.id,
|
|
5436
|
+
...filter,
|
|
5437
|
+
value: internalValues[filter.id],
|
|
5438
|
+
onChange: (value) => {
|
|
5439
|
+
handleFilterChange(filter.id, value);
|
|
5440
|
+
}
|
|
5441
|
+
}
|
|
5442
|
+
) : null;
|
|
5443
|
+
}))),
|
|
5444
|
+
/* @__PURE__ */ import_react39.default.createElement(DialogActions, { sx: { justifyContent: "space-between" } }, useClear && filters?.length === 1 && /* @__PURE__ */ import_react39.default.createElement(
|
|
5445
|
+
import_joy51.Button,
|
|
5446
|
+
{
|
|
5447
|
+
variant: "plain",
|
|
5448
|
+
color: "neutral",
|
|
5449
|
+
size: "md",
|
|
5450
|
+
onClick: handleClear
|
|
5451
|
+
},
|
|
5452
|
+
"Clear"
|
|
5453
|
+
), useReset && !useClear && /* @__PURE__ */ import_react39.default.createElement(
|
|
5454
|
+
import_joy51.Button,
|
|
5455
|
+
{
|
|
5456
|
+
variant: "plain",
|
|
5457
|
+
color: "neutral",
|
|
5458
|
+
size: "md",
|
|
5459
|
+
onClick: handleClear
|
|
5460
|
+
},
|
|
5461
|
+
"Reset"
|
|
5462
|
+
), /* @__PURE__ */ import_react39.default.createElement(import_joy51.Button, { variant: "solid", color: "primary", size: "md", onClick: handleApply }, "Apply"))
|
|
5463
|
+
);
|
|
5464
|
+
}
|
|
5465
|
+
FilterMenu.displayName = "FilterMenu";
|
|
5466
|
+
|
|
5467
|
+
// src/components/Uploader/Uploader.tsx
|
|
5468
|
+
var import_react40 = __toESM(require("react"));
|
|
5469
|
+
var import_joy52 = require("@mui/joy");
|
|
5470
|
+
var import_CloudUploadRounded = __toESM(require("@mui/icons-material/CloudUploadRounded"));
|
|
5471
|
+
var import_UploadFileRounded = __toESM(require("@mui/icons-material/UploadFileRounded"));
|
|
5472
|
+
var import_ClearRounded = __toESM(require("@mui/icons-material/ClearRounded"));
|
|
5473
|
+
var esmFiles = {
|
|
5474
|
+
combine: import(
|
|
5475
|
+
// @ts-ignore: build된 pragmatic-drag-and-drop의 esm file에 extension이 없어서 에러가 발생함. 따라서 빌드된 js파일을 direct로 import한다.
|
|
5476
|
+
"@atlaskit/pragmatic-drag-and-drop/dist/esm/entry-point/combine.js"
|
|
5477
|
+
),
|
|
5478
|
+
adapter: import(
|
|
5479
|
+
// @ts-ignore: build된 pragmatic-drag-and-drop의 esm file에 extension이 없어서 에러가 발생함. 따라서 빌드된 js파일을 direct로 import한다.
|
|
5480
|
+
"@atlaskit/pragmatic-drag-and-drop/dist/esm/entry-point/external/adapter.js"
|
|
5481
|
+
),
|
|
5482
|
+
file: import(
|
|
5483
|
+
// @ts-ignore: build된 pragmatic-drag-and-drop의 esm file에 extension이 없어서 에러가 발생함. 따라서 빌드된 js파일을 direct로 import한다.
|
|
5484
|
+
"@atlaskit/pragmatic-drag-and-drop/dist/esm/entry-point/external/file.js"
|
|
5485
|
+
),
|
|
5486
|
+
preventUnhandled: import(
|
|
5487
|
+
// @ts-ignore: build된 pragmatic-drag-and-drop의 esm file에 extension이 없어서 에러가 발생함. 따라서 빌드된 js파일을 direct로 import한다.
|
|
5488
|
+
"@atlaskit/pragmatic-drag-and-drop/dist/esm/entry-point/prevent-unhandled.js"
|
|
5489
|
+
)
|
|
5490
|
+
};
|
|
5491
|
+
var VisuallyHiddenInput = (0, import_joy52.styled)(import_joy52.Input)({
|
|
5492
|
+
width: "1px",
|
|
5493
|
+
height: "1px",
|
|
5494
|
+
overflow: "hidden",
|
|
5495
|
+
whiteSpace: "nowrap",
|
|
5496
|
+
clip: "rect(0 0 0 0)",
|
|
5497
|
+
clipPath: "inset(50%)",
|
|
5498
|
+
position: "absolute"
|
|
5499
|
+
});
|
|
5500
|
+
var PreviewRoot = (0, import_joy52.styled)(Stack_default, {
|
|
5501
|
+
name: "Uploader",
|
|
5502
|
+
slot: "PreviewRoot"
|
|
5503
|
+
})({});
|
|
5504
|
+
var UploadCard = (0, import_joy52.styled)(Card, {
|
|
5505
|
+
name: "Uploader",
|
|
5506
|
+
slot: "UploadCard"
|
|
5507
|
+
})(({ theme }) => ({
|
|
5508
|
+
padding: theme.spacing(2.5),
|
|
5509
|
+
border: `1px solid ${theme.palette.neutral.outlinedBorder}`
|
|
5510
|
+
}));
|
|
5511
|
+
var UploadFileIcon = (0, import_joy52.styled)(import_UploadFileRounded.default, {
|
|
5512
|
+
name: "Uploader",
|
|
5513
|
+
slot: "UploadFileIcon"
|
|
5514
|
+
})(({ theme }) => ({
|
|
5515
|
+
color: theme.palette.neutral["400"],
|
|
5516
|
+
width: "32px",
|
|
5517
|
+
height: "32px"
|
|
5518
|
+
}));
|
|
5519
|
+
var ClearIcon2 = (0, import_joy52.styled)(import_ClearRounded.default, {
|
|
5520
|
+
name: "Uploader",
|
|
5521
|
+
slot: "ClearIcon"
|
|
5522
|
+
})(({ theme }) => ({
|
|
5523
|
+
color: theme.palette.neutral.plainColor,
|
|
5524
|
+
width: "18px",
|
|
5525
|
+
height: "18px"
|
|
5526
|
+
}));
|
|
5527
|
+
var UNITS = [
|
|
5528
|
+
"byte",
|
|
5529
|
+
"kilobyte",
|
|
5530
|
+
"megabyte",
|
|
5531
|
+
"gigabyte",
|
|
5532
|
+
"terabyte",
|
|
5533
|
+
"petabyte"
|
|
5534
|
+
];
|
|
5535
|
+
var ALL_EXTENSIONS_BY_TYPE = {
|
|
5536
|
+
"image/*": [
|
|
5537
|
+
".jpeg",
|
|
5538
|
+
".jpg",
|
|
5539
|
+
".png",
|
|
5540
|
+
".gif",
|
|
5541
|
+
".bmp",
|
|
5542
|
+
".tiff",
|
|
5543
|
+
".svg",
|
|
5544
|
+
".webp",
|
|
5545
|
+
".heic",
|
|
5546
|
+
".ico"
|
|
5547
|
+
],
|
|
5548
|
+
"audio/*": [
|
|
5549
|
+
".mp3",
|
|
5550
|
+
".wav",
|
|
5551
|
+
".flac",
|
|
5552
|
+
".aac",
|
|
5553
|
+
".ogg",
|
|
5554
|
+
".m4a",
|
|
5555
|
+
".wma",
|
|
5556
|
+
".aiff",
|
|
5557
|
+
".alac",
|
|
5558
|
+
".midi",
|
|
5559
|
+
".mp4"
|
|
5560
|
+
],
|
|
5561
|
+
"video/*": [
|
|
5562
|
+
".mp4",
|
|
5563
|
+
".avi",
|
|
5564
|
+
".mkv",
|
|
5565
|
+
".mov",
|
|
5566
|
+
".wmv",
|
|
5567
|
+
".flv",
|
|
5568
|
+
".webm",
|
|
5569
|
+
".mpeg",
|
|
5570
|
+
".3gp",
|
|
5571
|
+
".m4v"
|
|
5572
|
+
]
|
|
5573
|
+
};
|
|
5574
|
+
var getFileSize = (n) => {
|
|
5575
|
+
const i = n == 0 ? 0 : Math.floor(Math.log(n) / Math.log(1024));
|
|
5576
|
+
const value = n / Math.pow(1024, i);
|
|
5577
|
+
const unit = UNITS[i];
|
|
5578
|
+
return Intl.NumberFormat("en-us", {
|
|
5579
|
+
style: "unit",
|
|
5580
|
+
unit,
|
|
5581
|
+
unitDisplay: "narrow"
|
|
5582
|
+
}).format(value);
|
|
5583
|
+
};
|
|
5584
|
+
var Preview = (props) => {
|
|
5585
|
+
const { files, uploaded, onDelete } = props;
|
|
5586
|
+
return /* @__PURE__ */ import_react40.default.createElement(PreviewRoot, { gap: 1 }, [...uploaded, ...files].map((file) => /* @__PURE__ */ import_react40.default.createElement(UploadCard, { key: file.name, size: "sm", color: "neutral" }, /* @__PURE__ */ import_react40.default.createElement(Stack_default, { direction: "row", alignItems: "center", gap: 2 }, /* @__PURE__ */ import_react40.default.createElement(UploadFileIcon, null), /* @__PURE__ */ import_react40.default.createElement(Stack_default, { flex: "1" }, /* @__PURE__ */ import_react40.default.createElement(Typography_default, { level: "body-sm", textColor: "common.black" }, file.name), !!file.size && /* @__PURE__ */ import_react40.default.createElement(
|
|
5587
|
+
Typography_default,
|
|
5588
|
+
{
|
|
5589
|
+
level: "body-xs",
|
|
5590
|
+
fontWeight: "300",
|
|
5591
|
+
lineHeight: "1.33",
|
|
5592
|
+
textColor: "text.tertiary"
|
|
5593
|
+
},
|
|
5594
|
+
getFileSize(file.size)
|
|
5595
|
+
)), /* @__PURE__ */ import_react40.default.createElement(IconButton_default, { onClick: () => onDelete?.(file) }, /* @__PURE__ */ import_react40.default.createElement(ClearIcon2, null))))));
|
|
5596
|
+
};
|
|
5597
|
+
var UploaderRoot = (0, import_joy52.styled)(Stack_default, {
|
|
5598
|
+
name: "Uploader",
|
|
5599
|
+
slot: "root"
|
|
5600
|
+
})(({ theme }) => ({
|
|
5601
|
+
gap: theme.spacing(2)
|
|
5602
|
+
}));
|
|
5603
|
+
var FileDropZone = (0, import_joy52.styled)(Sheet_default, {
|
|
5604
|
+
name: "Uploader",
|
|
5605
|
+
slot: "dropZone",
|
|
5606
|
+
shouldForwardProp: (prop) => prop !== "error"
|
|
5607
|
+
})(
|
|
5608
|
+
({ theme, state, error }) => ({
|
|
5609
|
+
width: "100%",
|
|
5610
|
+
display: "flex",
|
|
5611
|
+
flexDirection: "column",
|
|
5612
|
+
justifyContent: "center",
|
|
4656
5613
|
alignItems: "center",
|
|
4657
5614
|
padding: theme.spacing(5),
|
|
4658
5615
|
gap: theme.spacing(4),
|
|
@@ -4661,7 +5618,7 @@ var FileDropZone = (0, import_joy41.styled)(Sheet_default, {
|
|
|
4661
5618
|
border: error ? `1px solid ${theme.palette.danger.outlinedBorder}` : state === "idle" ? `1px solid ${theme.palette.neutral.outlinedBorder}` : `1px solid ${theme.palette.primary.outlinedBorder}`
|
|
4662
5619
|
})
|
|
4663
5620
|
);
|
|
4664
|
-
var UploaderIcon = (0,
|
|
5621
|
+
var UploaderIcon = (0, import_joy52.styled)(import_CloudUploadRounded.default, {
|
|
4665
5622
|
name: "Uploader",
|
|
4666
5623
|
slot: "iconContainer",
|
|
4667
5624
|
shouldForwardProp: (prop) => prop !== "error"
|
|
@@ -4672,7 +5629,7 @@ var UploaderIcon = (0, import_joy41.styled)(import_CloudUploadRounded.default, {
|
|
|
4672
5629
|
height: "32px"
|
|
4673
5630
|
})
|
|
4674
5631
|
);
|
|
4675
|
-
var Uploader =
|
|
5632
|
+
var Uploader = import_react40.default.memo(
|
|
4676
5633
|
(props) => {
|
|
4677
5634
|
const {
|
|
4678
5635
|
accept,
|
|
@@ -4687,19 +5644,19 @@ var Uploader = import_react30.default.memo(
|
|
|
4687
5644
|
disabled,
|
|
4688
5645
|
onDelete
|
|
4689
5646
|
} = props;
|
|
4690
|
-
const dropZoneRef = (0,
|
|
4691
|
-
const inputRef = (0,
|
|
4692
|
-
const [errorText, setErrorText] = (0,
|
|
4693
|
-
const [files, setFiles] = (0,
|
|
4694
|
-
const [uploaded, setUploaded] = (0,
|
|
5647
|
+
const dropZoneRef = (0, import_react40.useRef)(null);
|
|
5648
|
+
const inputRef = (0, import_react40.useRef)(null);
|
|
5649
|
+
const [errorText, setErrorText] = (0, import_react40.useState)();
|
|
5650
|
+
const [files, setFiles] = (0, import_react40.useState)([]);
|
|
5651
|
+
const [uploaded, setUploaded] = (0, import_react40.useState)(
|
|
4695
5652
|
props.uploaded || []
|
|
4696
5653
|
);
|
|
4697
|
-
const [previewState, setPreviewState] = (0,
|
|
4698
|
-
const accepts = (0,
|
|
5654
|
+
const [previewState, setPreviewState] = (0, import_react40.useState)("idle");
|
|
5655
|
+
const accepts = (0, import_react40.useMemo)(
|
|
4699
5656
|
() => accept.split(",").map((accept2) => accept2.trim()),
|
|
4700
5657
|
[accept]
|
|
4701
5658
|
);
|
|
4702
|
-
const parsedAccepts = (0,
|
|
5659
|
+
const parsedAccepts = (0, import_react40.useMemo)(
|
|
4703
5660
|
() => accepts.flatMap((type) => {
|
|
4704
5661
|
if (["image/*", "video/*", "audio/*"].includes(type)) {
|
|
4705
5662
|
return ALL_EXTENSIONS_BY_TYPE[type];
|
|
@@ -4708,7 +5665,7 @@ var Uploader = import_react30.default.memo(
|
|
|
4708
5665
|
}),
|
|
4709
5666
|
[accepts]
|
|
4710
5667
|
);
|
|
4711
|
-
const helperText = (0,
|
|
5668
|
+
const helperText = (0, import_react40.useMemo)(() => {
|
|
4712
5669
|
const [allAcceptedTypes, acceptedTypes] = [
|
|
4713
5670
|
accepts.filter(
|
|
4714
5671
|
(accept2) => ["image/*", "video/*", "audio/*"].includes(accept2)
|
|
@@ -4741,15 +5698,15 @@ var Uploader = import_react30.default.memo(
|
|
|
4741
5698
|
}
|
|
4742
5699
|
return helperTexts.join(", ");
|
|
4743
5700
|
}, [accepts, maxFileTotalSize, maxCount]);
|
|
4744
|
-
const error = (0,
|
|
5701
|
+
const error = (0, import_react40.useMemo)(
|
|
4745
5702
|
() => !!errorText || props.error,
|
|
4746
5703
|
[props.error, errorText]
|
|
4747
5704
|
);
|
|
4748
|
-
const showDropZone = (0,
|
|
5705
|
+
const showDropZone = (0, import_react40.useMemo)(
|
|
4749
5706
|
() => !maxCount || maxCount && [...uploaded, ...files].length !== maxCount,
|
|
4750
5707
|
[files, maxCount, uploaded]
|
|
4751
5708
|
);
|
|
4752
|
-
const addFiles = (0,
|
|
5709
|
+
const addFiles = (0, import_react40.useCallback)(
|
|
4753
5710
|
(uploads) => {
|
|
4754
5711
|
try {
|
|
4755
5712
|
const types = parsedAccepts.map((type) => type.replace(".", "")) || [];
|
|
@@ -4806,7 +5763,7 @@ var Uploader = import_react30.default.memo(
|
|
|
4806
5763
|
onChange
|
|
4807
5764
|
]
|
|
4808
5765
|
);
|
|
4809
|
-
(0,
|
|
5766
|
+
(0, import_react40.useEffect)(() => {
|
|
4810
5767
|
if (!dropZoneRef.current || disabled) {
|
|
4811
5768
|
return;
|
|
4812
5769
|
}
|
|
@@ -4854,7 +5811,7 @@ var Uploader = import_react30.default.memo(
|
|
|
4854
5811
|
);
|
|
4855
5812
|
return () => cleanup?.();
|
|
4856
5813
|
}, [disabled, addFiles]);
|
|
4857
|
-
(0,
|
|
5814
|
+
(0, import_react40.useEffect)(() => {
|
|
4858
5815
|
if (inputRef.current && minCount) {
|
|
4859
5816
|
if (files.length < minCount) {
|
|
4860
5817
|
inputRef.current.setCustomValidity(
|
|
@@ -4865,14 +5822,14 @@ var Uploader = import_react30.default.memo(
|
|
|
4865
5822
|
}
|
|
4866
5823
|
}
|
|
4867
5824
|
}, [inputRef, files, minCount]);
|
|
4868
|
-
const handleFileChanged = (0,
|
|
5825
|
+
const handleFileChanged = (0, import_react40.useCallback)(
|
|
4869
5826
|
(event) => {
|
|
4870
5827
|
const files2 = Array.from(event.target.files || []);
|
|
4871
5828
|
addFiles(files2);
|
|
4872
5829
|
},
|
|
4873
5830
|
[addFiles]
|
|
4874
5831
|
);
|
|
4875
|
-
const handleDeleteFile = (0,
|
|
5832
|
+
const handleDeleteFile = (0, import_react40.useCallback)(
|
|
4876
5833
|
(deletedFile) => {
|
|
4877
5834
|
if (deletedFile instanceof File) {
|
|
4878
5835
|
setFiles((current) => {
|
|
@@ -4894,10 +5851,10 @@ var Uploader = import_react30.default.memo(
|
|
|
4894
5851
|
},
|
|
4895
5852
|
[name, onChange, onDelete]
|
|
4896
5853
|
);
|
|
4897
|
-
const handleUploaderButtonClick = (0,
|
|
5854
|
+
const handleUploaderButtonClick = (0, import_react40.useCallback)(() => {
|
|
4898
5855
|
inputRef.current?.click();
|
|
4899
5856
|
}, []);
|
|
4900
|
-
const uploader = /* @__PURE__ */
|
|
5857
|
+
const uploader = /* @__PURE__ */ import_react40.default.createElement(
|
|
4901
5858
|
FileDropZone,
|
|
4902
5859
|
{
|
|
4903
5860
|
state: previewState,
|
|
@@ -4905,8 +5862,8 @@ var Uploader = import_react30.default.memo(
|
|
|
4905
5862
|
ref: dropZoneRef,
|
|
4906
5863
|
onClick: handleUploaderButtonClick
|
|
4907
5864
|
},
|
|
4908
|
-
/* @__PURE__ */
|
|
4909
|
-
/* @__PURE__ */
|
|
5865
|
+
/* @__PURE__ */ import_react40.default.createElement(Stack_default, { alignItems: "center", gap: 1 }, /* @__PURE__ */ import_react40.default.createElement(UploaderIcon, { state: previewState, error: !!(error || errorText) })),
|
|
5866
|
+
/* @__PURE__ */ import_react40.default.createElement(
|
|
4910
5867
|
VisuallyHiddenInput,
|
|
4911
5868
|
{
|
|
4912
5869
|
disabled,
|
|
@@ -4931,7 +5888,7 @@ var Uploader = import_react30.default.memo(
|
|
|
4931
5888
|
}
|
|
4932
5889
|
)
|
|
4933
5890
|
);
|
|
4934
|
-
return /* @__PURE__ */
|
|
5891
|
+
return /* @__PURE__ */ import_react40.default.createElement(UploaderRoot, null, showDropZone && /* @__PURE__ */ import_react40.default.createElement(
|
|
4935
5892
|
FormControl_default,
|
|
4936
5893
|
{
|
|
4937
5894
|
size,
|
|
@@ -4939,10 +5896,10 @@ var Uploader = import_react30.default.memo(
|
|
|
4939
5896
|
disabled,
|
|
4940
5897
|
required: !!minCount
|
|
4941
5898
|
},
|
|
4942
|
-
label && /* @__PURE__ */
|
|
5899
|
+
label && /* @__PURE__ */ import_react40.default.createElement(FormLabel_default, null, label),
|
|
4943
5900
|
uploader,
|
|
4944
|
-
/* @__PURE__ */
|
|
4945
|
-
), [...uploaded, ...files].length > 0 && /* @__PURE__ */
|
|
5901
|
+
/* @__PURE__ */ import_react40.default.createElement(FormHelperText_default, null, /* @__PURE__ */ import_react40.default.createElement(Stack_default, null, errorText && /* @__PURE__ */ import_react40.default.createElement("div", null, errorText), /* @__PURE__ */ import_react40.default.createElement("div", null, helperText)))
|
|
5902
|
+
), [...uploaded, ...files].length > 0 && /* @__PURE__ */ import_react40.default.createElement(
|
|
4946
5903
|
Preview,
|
|
4947
5904
|
{
|
|
4948
5905
|
files,
|
|
@@ -4955,11 +5912,11 @@ var Uploader = import_react30.default.memo(
|
|
|
4955
5912
|
Uploader.displayName = "Uploader";
|
|
4956
5913
|
|
|
4957
5914
|
// src/components/Grid/Grid.tsx
|
|
4958
|
-
var
|
|
5915
|
+
var import_joy53 = require("@mui/joy");
|
|
4959
5916
|
|
|
4960
5917
|
// src/components/IconMenuButton/IconMenuButton.tsx
|
|
4961
|
-
var
|
|
4962
|
-
var
|
|
5918
|
+
var import_react41 = __toESM(require("react"));
|
|
5919
|
+
var import_joy54 = require("@mui/joy");
|
|
4963
5920
|
function IconMenuButton(props) {
|
|
4964
5921
|
const {
|
|
4965
5922
|
size,
|
|
@@ -4972,8 +5929,8 @@ function IconMenuButton(props) {
|
|
|
4972
5929
|
placement = "bottom"
|
|
4973
5930
|
} = props;
|
|
4974
5931
|
if (!items.length) {
|
|
4975
|
-
return /* @__PURE__ */
|
|
4976
|
-
|
|
5932
|
+
return /* @__PURE__ */ import_react41.default.createElement(
|
|
5933
|
+
import_joy54.IconButton,
|
|
4977
5934
|
{
|
|
4978
5935
|
component: props.buttonComponent ?? "button",
|
|
4979
5936
|
size,
|
|
@@ -4986,10 +5943,10 @@ function IconMenuButton(props) {
|
|
|
4986
5943
|
icon
|
|
4987
5944
|
);
|
|
4988
5945
|
}
|
|
4989
|
-
return /* @__PURE__ */
|
|
4990
|
-
|
|
5946
|
+
return /* @__PURE__ */ import_react41.default.createElement(Dropdown_default, null, /* @__PURE__ */ import_react41.default.createElement(
|
|
5947
|
+
import_joy54.MenuButton,
|
|
4991
5948
|
{
|
|
4992
|
-
slots: { root:
|
|
5949
|
+
slots: { root: import_joy54.IconButton },
|
|
4993
5950
|
slotProps: {
|
|
4994
5951
|
root: {
|
|
4995
5952
|
component: props.buttonComponent ?? "button",
|
|
@@ -5003,7 +5960,7 @@ function IconMenuButton(props) {
|
|
|
5003
5960
|
}
|
|
5004
5961
|
},
|
|
5005
5962
|
icon
|
|
5006
|
-
), /* @__PURE__ */
|
|
5963
|
+
), /* @__PURE__ */ import_react41.default.createElement(Menu, { placement, size }, items.map((i) => /* @__PURE__ */ import_react41.default.createElement(
|
|
5007
5964
|
MenuItem,
|
|
5008
5965
|
{
|
|
5009
5966
|
key: i.text,
|
|
@@ -5016,14 +5973,14 @@ function IconMenuButton(props) {
|
|
|
5016
5973
|
IconMenuButton.displayName = "IconMenuButton";
|
|
5017
5974
|
|
|
5018
5975
|
// src/components/Markdown/Markdown.tsx
|
|
5019
|
-
var
|
|
5020
|
-
var
|
|
5021
|
-
var
|
|
5976
|
+
var import_react42 = __toESM(require("react"));
|
|
5977
|
+
var import_joy55 = require("@mui/joy");
|
|
5978
|
+
var import_joy56 = require("@mui/joy");
|
|
5022
5979
|
var import_remark_gfm = __toESM(require("remark-gfm"));
|
|
5023
|
-
var LazyReactMarkdown = (0,
|
|
5980
|
+
var LazyReactMarkdown = (0, import_react42.lazy)(() => import("react-markdown"));
|
|
5024
5981
|
var Markdown = (props) => {
|
|
5025
|
-
const [rehypeAccent2, setRehypeAccent] = (0,
|
|
5026
|
-
(0,
|
|
5982
|
+
const [rehypeAccent2, setRehypeAccent] = (0, import_react42.useState)(null);
|
|
5983
|
+
(0, import_react42.useEffect)(() => {
|
|
5027
5984
|
const loadRehypeAccent = async () => {
|
|
5028
5985
|
const module2 = await Promise.resolve().then(() => (init_rehype_accent(), rehype_accent_exports));
|
|
5029
5986
|
setRehypeAccent(() => module2.rehypeAccent);
|
|
@@ -5045,7 +6002,7 @@ var Markdown = (props) => {
|
|
|
5045
6002
|
if (!rehypeAccent2) {
|
|
5046
6003
|
return null;
|
|
5047
6004
|
}
|
|
5048
|
-
return /* @__PURE__ */
|
|
6005
|
+
return /* @__PURE__ */ import_react42.default.createElement(
|
|
5049
6006
|
Typography,
|
|
5050
6007
|
{
|
|
5051
6008
|
component: "div",
|
|
@@ -5054,12 +6011,12 @@ var Markdown = (props) => {
|
|
|
5054
6011
|
level: defaultLevel,
|
|
5055
6012
|
...innerProps
|
|
5056
6013
|
},
|
|
5057
|
-
/* @__PURE__ */
|
|
5058
|
-
|
|
6014
|
+
/* @__PURE__ */ import_react42.default.createElement(
|
|
6015
|
+
import_react42.Suspense,
|
|
5059
6016
|
{
|
|
5060
|
-
fallback: fallback || /* @__PURE__ */
|
|
6017
|
+
fallback: fallback || /* @__PURE__ */ import_react42.default.createElement(Typography, null, /* @__PURE__ */ import_react42.default.createElement(import_joy55.Skeleton, null, content || ""))
|
|
5061
6018
|
},
|
|
5062
|
-
/* @__PURE__ */
|
|
6019
|
+
/* @__PURE__ */ import_react42.default.createElement(
|
|
5063
6020
|
LazyReactMarkdown,
|
|
5064
6021
|
{
|
|
5065
6022
|
...markdownOptions,
|
|
@@ -5067,11 +6024,11 @@ var Markdown = (props) => {
|
|
|
5067
6024
|
rehypePlugins: [[rehypeAccent2, { accentColor }]],
|
|
5068
6025
|
remarkPlugins: [import_remark_gfm.default],
|
|
5069
6026
|
components: {
|
|
5070
|
-
h1: ({ children }) => /* @__PURE__ */
|
|
5071
|
-
h2: ({ children }) => /* @__PURE__ */
|
|
5072
|
-
h3: ({ children }) => /* @__PURE__ */
|
|
5073
|
-
h4: ({ children }) => /* @__PURE__ */
|
|
5074
|
-
p: ({ children, node }) => /* @__PURE__ */
|
|
6027
|
+
h1: ({ children }) => /* @__PURE__ */ import_react42.default.createElement(Typography, { color, textColor, level: "h1" }, children),
|
|
6028
|
+
h2: ({ children }) => /* @__PURE__ */ import_react42.default.createElement(Typography, { color, textColor, level: "h2" }, children),
|
|
6029
|
+
h3: ({ children }) => /* @__PURE__ */ import_react42.default.createElement(Typography, { color, textColor, level: "h3" }, children),
|
|
6030
|
+
h4: ({ children }) => /* @__PURE__ */ import_react42.default.createElement(Typography, { color, textColor, level: "h4" }, children),
|
|
6031
|
+
p: ({ children, node }) => /* @__PURE__ */ import_react42.default.createElement(
|
|
5075
6032
|
Typography,
|
|
5076
6033
|
{
|
|
5077
6034
|
color,
|
|
@@ -5081,10 +6038,10 @@ var Markdown = (props) => {
|
|
|
5081
6038
|
},
|
|
5082
6039
|
children
|
|
5083
6040
|
),
|
|
5084
|
-
a: ({ children, href }) => /* @__PURE__ */
|
|
5085
|
-
hr: () => /* @__PURE__ */
|
|
5086
|
-
b: ({ children }) => /* @__PURE__ */
|
|
5087
|
-
strong: ({ children }) => /* @__PURE__ */
|
|
6041
|
+
a: ({ children, href }) => /* @__PURE__ */ import_react42.default.createElement(import_joy56.Link, { href, target: defaultLinkAction }, children),
|
|
6042
|
+
hr: () => /* @__PURE__ */ import_react42.default.createElement(Divider, null),
|
|
6043
|
+
b: ({ children }) => /* @__PURE__ */ import_react42.default.createElement(Typography, { fontWeight: boldFontWeight }, children),
|
|
6044
|
+
strong: ({ children }) => /* @__PURE__ */ import_react42.default.createElement(Typography, { fontWeight: boldFontWeight }, children),
|
|
5088
6045
|
...markdownOptions?.components
|
|
5089
6046
|
}
|
|
5090
6047
|
}
|
|
@@ -5095,8 +6052,8 @@ var Markdown = (props) => {
|
|
|
5095
6052
|
Markdown.displayName = "Markdown";
|
|
5096
6053
|
|
|
5097
6054
|
// src/components/MenuButton/MenuButton.tsx
|
|
5098
|
-
var
|
|
5099
|
-
var
|
|
6055
|
+
var import_react43 = __toESM(require("react"));
|
|
6056
|
+
var import_joy57 = require("@mui/joy");
|
|
5100
6057
|
var import_ExpandMore = __toESM(require("@mui/icons-material/ExpandMore"));
|
|
5101
6058
|
function MenuButton(props) {
|
|
5102
6059
|
const {
|
|
@@ -5113,8 +6070,8 @@ function MenuButton(props) {
|
|
|
5113
6070
|
placement = "bottom"
|
|
5114
6071
|
} = props;
|
|
5115
6072
|
if (!items.length) {
|
|
5116
|
-
return /* @__PURE__ */
|
|
5117
|
-
|
|
6073
|
+
return /* @__PURE__ */ import_react43.default.createElement(
|
|
6074
|
+
import_joy57.Button,
|
|
5118
6075
|
{
|
|
5119
6076
|
component: props.buttonComponent ?? "button",
|
|
5120
6077
|
size,
|
|
@@ -5124,13 +6081,13 @@ function MenuButton(props) {
|
|
|
5124
6081
|
loading,
|
|
5125
6082
|
startDecorator,
|
|
5126
6083
|
...props.buttonComponentProps ?? {},
|
|
5127
|
-
endDecorator: showIcon ? /* @__PURE__ */
|
|
6084
|
+
endDecorator: showIcon ? /* @__PURE__ */ import_react43.default.createElement(import_react43.default.Fragment, null, endDecorator, /* @__PURE__ */ import_react43.default.createElement(import_ExpandMore.default, null)) : /* @__PURE__ */ import_react43.default.createElement(import_react43.default.Fragment, null, endDecorator)
|
|
5128
6085
|
},
|
|
5129
6086
|
buttonText
|
|
5130
6087
|
);
|
|
5131
6088
|
}
|
|
5132
|
-
return /* @__PURE__ */
|
|
5133
|
-
|
|
6089
|
+
return /* @__PURE__ */ import_react43.default.createElement(Dropdown_default, null, /* @__PURE__ */ import_react43.default.createElement(
|
|
6090
|
+
import_joy57.MenuButton,
|
|
5134
6091
|
{
|
|
5135
6092
|
component: props.buttonComponent ?? "button",
|
|
5136
6093
|
size,
|
|
@@ -5140,10 +6097,10 @@ function MenuButton(props) {
|
|
|
5140
6097
|
loading,
|
|
5141
6098
|
startDecorator,
|
|
5142
6099
|
...props.buttonComponentProps ?? {},
|
|
5143
|
-
endDecorator: showIcon ? /* @__PURE__ */
|
|
6100
|
+
endDecorator: showIcon ? /* @__PURE__ */ import_react43.default.createElement(import_react43.default.Fragment, null, endDecorator, /* @__PURE__ */ import_react43.default.createElement(import_ExpandMore.default, null)) : /* @__PURE__ */ import_react43.default.createElement(import_react43.default.Fragment, null, endDecorator)
|
|
5144
6101
|
},
|
|
5145
6102
|
buttonText
|
|
5146
|
-
), /* @__PURE__ */
|
|
6103
|
+
), /* @__PURE__ */ import_react43.default.createElement(Menu, { placement, size }, items.map((i) => /* @__PURE__ */ import_react43.default.createElement(
|
|
5147
6104
|
MenuItem,
|
|
5148
6105
|
{
|
|
5149
6106
|
key: i.text,
|
|
@@ -5156,17 +6113,17 @@ function MenuButton(props) {
|
|
|
5156
6113
|
MenuButton.displayName = "MenuButton";
|
|
5157
6114
|
|
|
5158
6115
|
// src/components/MonthPicker/MonthPicker.tsx
|
|
5159
|
-
var
|
|
6116
|
+
var import_react44 = __toESM(require("react"));
|
|
5160
6117
|
var import_CalendarToday3 = __toESM(require("@mui/icons-material/CalendarToday"));
|
|
5161
|
-
var
|
|
6118
|
+
var import_joy58 = require("@mui/joy");
|
|
5162
6119
|
var import_base4 = require("@mui/base");
|
|
5163
|
-
var StyledPopper3 = (0,
|
|
6120
|
+
var StyledPopper3 = (0, import_joy58.styled)(import_base4.Popper, {
|
|
5164
6121
|
name: "MonthPicker",
|
|
5165
6122
|
slot: "popper"
|
|
5166
6123
|
})(({ theme }) => ({
|
|
5167
6124
|
zIndex: theme.zIndex.tooltip
|
|
5168
6125
|
}));
|
|
5169
|
-
var CalendarSheet3 = (0,
|
|
6126
|
+
var CalendarSheet3 = (0, import_joy58.styled)(Sheet_default, {
|
|
5170
6127
|
name: "MonthPicker",
|
|
5171
6128
|
slot: "sheet",
|
|
5172
6129
|
overridesResolver: (props, styles) => styles.root
|
|
@@ -5175,7 +6132,7 @@ var CalendarSheet3 = (0, import_joy47.styled)(Sheet_default, {
|
|
|
5175
6132
|
boxShadow: theme.shadow.md,
|
|
5176
6133
|
borderRadius: theme.radius.md
|
|
5177
6134
|
}));
|
|
5178
|
-
var MonthPickerRoot = (0,
|
|
6135
|
+
var MonthPickerRoot = (0, import_joy58.styled)("div", {
|
|
5179
6136
|
name: "MonthPicker",
|
|
5180
6137
|
slot: "root",
|
|
5181
6138
|
overridesResolver: (props, styles) => styles.root
|
|
@@ -5211,9 +6168,9 @@ function parseDate3(dateString, format) {
|
|
|
5211
6168
|
const result = new Date(year, month, day);
|
|
5212
6169
|
return result;
|
|
5213
6170
|
}
|
|
5214
|
-
var MonthPicker = (0,
|
|
6171
|
+
var MonthPicker = (0, import_react44.forwardRef)(
|
|
5215
6172
|
(inProps, ref) => {
|
|
5216
|
-
const props = (0,
|
|
6173
|
+
const props = (0, import_joy58.useThemeProps)({ props: inProps, name: "MonthPicker" });
|
|
5217
6174
|
const {
|
|
5218
6175
|
onChange,
|
|
5219
6176
|
disabled,
|
|
@@ -5239,17 +6196,17 @@ var MonthPicker = (0, import_react34.forwardRef)(
|
|
|
5239
6196
|
locale,
|
|
5240
6197
|
...innerProps
|
|
5241
6198
|
} = props;
|
|
5242
|
-
const innerRef = (0,
|
|
5243
|
-
const buttonRef = (0,
|
|
6199
|
+
const innerRef = (0, import_react44.useRef)(null);
|
|
6200
|
+
const buttonRef = (0, import_react44.useRef)(null);
|
|
5244
6201
|
const [value, setValue, isControlled] = useControlledState(
|
|
5245
6202
|
props.value,
|
|
5246
6203
|
props.defaultValue || "",
|
|
5247
|
-
(0,
|
|
6204
|
+
(0, import_react44.useCallback)(
|
|
5248
6205
|
(value2) => onChange?.({ target: { name: props.name, value: value2 } }),
|
|
5249
6206
|
[props.name, onChange]
|
|
5250
6207
|
)
|
|
5251
6208
|
);
|
|
5252
|
-
const getFormattedDisplayValue = (0,
|
|
6209
|
+
const getFormattedDisplayValue = (0, import_react44.useCallback)(
|
|
5253
6210
|
(inputValue) => {
|
|
5254
6211
|
if (!inputValue) return "";
|
|
5255
6212
|
try {
|
|
@@ -5264,23 +6221,23 @@ var MonthPicker = (0, import_react34.forwardRef)(
|
|
|
5264
6221
|
},
|
|
5265
6222
|
[format, displayFormat, locale]
|
|
5266
6223
|
);
|
|
5267
|
-
const [displayValue, setDisplayValue] = (0,
|
|
6224
|
+
const [displayValue, setDisplayValue] = (0, import_react44.useState)(
|
|
5268
6225
|
() => getFormattedDisplayValue(value)
|
|
5269
6226
|
);
|
|
5270
|
-
const [anchorEl, setAnchorEl] = (0,
|
|
6227
|
+
const [anchorEl, setAnchorEl] = (0, import_react44.useState)(null);
|
|
5271
6228
|
const open = Boolean(anchorEl);
|
|
5272
|
-
(0,
|
|
6229
|
+
(0, import_react44.useEffect)(() => {
|
|
5273
6230
|
if (!anchorEl) {
|
|
5274
6231
|
innerRef.current?.blur();
|
|
5275
6232
|
}
|
|
5276
6233
|
}, [anchorEl, innerRef]);
|
|
5277
|
-
(0,
|
|
6234
|
+
(0, import_react44.useImperativeHandle)(ref, () => innerRef.current, [
|
|
5278
6235
|
innerRef
|
|
5279
6236
|
]);
|
|
5280
|
-
(0,
|
|
6237
|
+
(0, import_react44.useEffect)(() => {
|
|
5281
6238
|
setDisplayValue(getFormattedDisplayValue(value));
|
|
5282
6239
|
}, [value, getFormattedDisplayValue]);
|
|
5283
|
-
const handleChange = (0,
|
|
6240
|
+
const handleChange = (0, import_react44.useCallback)(
|
|
5284
6241
|
(event) => {
|
|
5285
6242
|
const newValue = event.target.value;
|
|
5286
6243
|
setValue(newValue);
|
|
@@ -5290,21 +6247,21 @@ var MonthPicker = (0, import_react34.forwardRef)(
|
|
|
5290
6247
|
},
|
|
5291
6248
|
[setValue, getFormattedDisplayValue, isControlled]
|
|
5292
6249
|
);
|
|
5293
|
-
const handleCalendarToggle = (0,
|
|
6250
|
+
const handleCalendarToggle = (0, import_react44.useCallback)(
|
|
5294
6251
|
(event) => {
|
|
5295
6252
|
setAnchorEl(anchorEl ? null : event.currentTarget);
|
|
5296
6253
|
innerRef.current?.focus();
|
|
5297
6254
|
},
|
|
5298
6255
|
[anchorEl, setAnchorEl, innerRef]
|
|
5299
6256
|
);
|
|
5300
|
-
const handleInputMouseDown = (0,
|
|
6257
|
+
const handleInputMouseDown = (0, import_react44.useCallback)(
|
|
5301
6258
|
(event) => {
|
|
5302
6259
|
event.preventDefault();
|
|
5303
6260
|
buttonRef.current?.focus();
|
|
5304
6261
|
},
|
|
5305
6262
|
[buttonRef]
|
|
5306
6263
|
);
|
|
5307
|
-
return /* @__PURE__ */
|
|
6264
|
+
return /* @__PURE__ */ import_react44.default.createElement(MonthPickerRoot, null, /* @__PURE__ */ import_react44.default.createElement(import_base4.FocusTrap, { open: true }, /* @__PURE__ */ import_react44.default.createElement(import_react44.default.Fragment, null, /* @__PURE__ */ import_react44.default.createElement(
|
|
5308
6265
|
Input_default,
|
|
5309
6266
|
{
|
|
5310
6267
|
...innerProps,
|
|
@@ -5334,7 +6291,7 @@ var MonthPicker = (0, import_react34.forwardRef)(
|
|
|
5334
6291
|
// NOTE: placeholder char 를 텍스트로 표시하므로 동일한 너비를 가지는 mono font 를 사용해야 이질감이 없다.
|
|
5335
6292
|
fontFamily: "monospace"
|
|
5336
6293
|
},
|
|
5337
|
-
endDecorator: /* @__PURE__ */
|
|
6294
|
+
endDecorator: /* @__PURE__ */ import_react44.default.createElement(
|
|
5338
6295
|
IconButton_default,
|
|
5339
6296
|
{
|
|
5340
6297
|
ref: buttonRef,
|
|
@@ -5346,12 +6303,12 @@ var MonthPicker = (0, import_react34.forwardRef)(
|
|
|
5346
6303
|
"aria-expanded": open,
|
|
5347
6304
|
disabled
|
|
5348
6305
|
},
|
|
5349
|
-
/* @__PURE__ */
|
|
6306
|
+
/* @__PURE__ */ import_react44.default.createElement(import_CalendarToday3.default, null)
|
|
5350
6307
|
),
|
|
5351
6308
|
label,
|
|
5352
6309
|
helperText
|
|
5353
6310
|
}
|
|
5354
|
-
), open && /* @__PURE__ */
|
|
6311
|
+
), open && /* @__PURE__ */ import_react44.default.createElement(import_base4.ClickAwayListener, { onClickAway: () => setAnchorEl(null) }, /* @__PURE__ */ import_react44.default.createElement(
|
|
5355
6312
|
StyledPopper3,
|
|
5356
6313
|
{
|
|
5357
6314
|
id: "month-picker-popper",
|
|
@@ -5370,7 +6327,7 @@ var MonthPicker = (0, import_react34.forwardRef)(
|
|
|
5370
6327
|
"aria-label": "Calendar Tooltip",
|
|
5371
6328
|
"aria-expanded": open
|
|
5372
6329
|
},
|
|
5373
|
-
/* @__PURE__ */
|
|
6330
|
+
/* @__PURE__ */ import_react44.default.createElement(CalendarSheet3, { tabIndex: -1, role: "presentation" }, /* @__PURE__ */ import_react44.default.createElement(
|
|
5374
6331
|
Calendar_default,
|
|
5375
6332
|
{
|
|
5376
6333
|
view: "month",
|
|
@@ -5391,14 +6348,14 @@ var MonthPicker = (0, import_react34.forwardRef)(
|
|
|
5391
6348
|
disablePast,
|
|
5392
6349
|
locale
|
|
5393
6350
|
}
|
|
5394
|
-
), /* @__PURE__ */
|
|
6351
|
+
), /* @__PURE__ */ import_react44.default.createElement(
|
|
5395
6352
|
DialogActions_default,
|
|
5396
6353
|
{
|
|
5397
6354
|
sx: {
|
|
5398
6355
|
p: 1
|
|
5399
6356
|
}
|
|
5400
6357
|
},
|
|
5401
|
-
/* @__PURE__ */
|
|
6358
|
+
/* @__PURE__ */ import_react44.default.createElement(
|
|
5402
6359
|
Button_default,
|
|
5403
6360
|
{
|
|
5404
6361
|
size,
|
|
@@ -5422,18 +6379,18 @@ var MonthPicker = (0, import_react34.forwardRef)(
|
|
|
5422
6379
|
);
|
|
5423
6380
|
|
|
5424
6381
|
// src/components/MonthRangePicker/MonthRangePicker.tsx
|
|
5425
|
-
var
|
|
6382
|
+
var import_react45 = __toESM(require("react"));
|
|
5426
6383
|
var import_react_imask3 = require("react-imask");
|
|
5427
6384
|
var import_CalendarToday4 = __toESM(require("@mui/icons-material/CalendarToday"));
|
|
5428
|
-
var
|
|
6385
|
+
var import_joy59 = require("@mui/joy");
|
|
5429
6386
|
var import_base5 = require("@mui/base");
|
|
5430
|
-
var StyledPopper4 = (0,
|
|
6387
|
+
var StyledPopper4 = (0, import_joy59.styled)(import_base5.Popper, {
|
|
5431
6388
|
name: "MonthRangePicker",
|
|
5432
6389
|
slot: "popper"
|
|
5433
6390
|
})(({ theme }) => ({
|
|
5434
6391
|
zIndex: theme.zIndex.tooltip
|
|
5435
6392
|
}));
|
|
5436
|
-
var CalendarSheet4 = (0,
|
|
6393
|
+
var CalendarSheet4 = (0, import_joy59.styled)(Sheet_default, {
|
|
5437
6394
|
name: "MonthRangePicker",
|
|
5438
6395
|
slot: "sheet",
|
|
5439
6396
|
overridesResolver: (props, styles) => styles.root
|
|
@@ -5443,7 +6400,7 @@ var CalendarSheet4 = (0, import_joy48.styled)(Sheet_default, {
|
|
|
5443
6400
|
boxShadow: theme.shadow.md,
|
|
5444
6401
|
borderRadius: theme.radius.md
|
|
5445
6402
|
}));
|
|
5446
|
-
var MonthRangePickerRoot = (0,
|
|
6403
|
+
var MonthRangePickerRoot = (0, import_joy59.styled)("div", {
|
|
5447
6404
|
name: "MonthRangePicker",
|
|
5448
6405
|
slot: "root",
|
|
5449
6406
|
overridesResolver: (props, styles) => styles.root
|
|
@@ -5480,10 +6437,10 @@ var parseDates2 = (str) => {
|
|
|
5480
6437
|
var formatToPattern3 = (format) => {
|
|
5481
6438
|
return `${format} - ${format}`.replace(/YYYY/g, "Y").replace(/MM/g, "m").replace(/[^YMm\s]/g, (match) => `${match}\``);
|
|
5482
6439
|
};
|
|
5483
|
-
var
|
|
5484
|
-
function
|
|
6440
|
+
var TextMaskAdapter9 = import_react45.default.forwardRef(
|
|
6441
|
+
function TextMaskAdapter10(props, ref) {
|
|
5485
6442
|
const { onChange, format, ...other } = props;
|
|
5486
|
-
return /* @__PURE__ */
|
|
6443
|
+
return /* @__PURE__ */ import_react45.default.createElement(
|
|
5487
6444
|
import_react_imask3.IMaskInput,
|
|
5488
6445
|
{
|
|
5489
6446
|
...other,
|
|
@@ -5512,9 +6469,9 @@ var TextMaskAdapter7 = import_react35.default.forwardRef(
|
|
|
5512
6469
|
);
|
|
5513
6470
|
}
|
|
5514
6471
|
);
|
|
5515
|
-
var MonthRangePicker = (0,
|
|
6472
|
+
var MonthRangePicker = (0, import_react45.forwardRef)(
|
|
5516
6473
|
(inProps, ref) => {
|
|
5517
|
-
const props = (0,
|
|
6474
|
+
const props = (0, import_joy59.useThemeProps)({ props: inProps, name: "MonthRangePicker" });
|
|
5518
6475
|
const {
|
|
5519
6476
|
onChange,
|
|
5520
6477
|
disabled,
|
|
@@ -5533,43 +6490,43 @@ var MonthRangePicker = (0, import_react35.forwardRef)(
|
|
|
5533
6490
|
size,
|
|
5534
6491
|
...innerProps
|
|
5535
6492
|
} = props;
|
|
5536
|
-
const innerRef = (0,
|
|
6493
|
+
const innerRef = (0, import_react45.useRef)(null);
|
|
5537
6494
|
const [value, setValue] = useControlledState(
|
|
5538
6495
|
props.value,
|
|
5539
6496
|
props.defaultValue || "",
|
|
5540
|
-
(0,
|
|
6497
|
+
(0, import_react45.useCallback)(
|
|
5541
6498
|
(value2) => onChange?.({ target: { name: props.name, value: value2 } }),
|
|
5542
6499
|
[props.name, onChange]
|
|
5543
6500
|
)
|
|
5544
6501
|
);
|
|
5545
|
-
const [anchorEl, setAnchorEl] = (0,
|
|
6502
|
+
const [anchorEl, setAnchorEl] = (0, import_react45.useState)(null);
|
|
5546
6503
|
const open = Boolean(anchorEl);
|
|
5547
|
-
const calendarValue = (0,
|
|
6504
|
+
const calendarValue = (0, import_react45.useMemo)(
|
|
5548
6505
|
() => value ? parseDates2(value) : void 0,
|
|
5549
6506
|
[value]
|
|
5550
6507
|
);
|
|
5551
|
-
(0,
|
|
6508
|
+
(0, import_react45.useEffect)(() => {
|
|
5552
6509
|
if (!anchorEl) {
|
|
5553
6510
|
innerRef.current?.blur();
|
|
5554
6511
|
}
|
|
5555
6512
|
}, [anchorEl, innerRef]);
|
|
5556
|
-
(0,
|
|
6513
|
+
(0, import_react45.useImperativeHandle)(ref, () => innerRef.current, [
|
|
5557
6514
|
innerRef
|
|
5558
6515
|
]);
|
|
5559
|
-
const handleChange = (0,
|
|
6516
|
+
const handleChange = (0, import_react45.useCallback)(
|
|
5560
6517
|
(event) => {
|
|
5561
6518
|
setValue(event.target.value);
|
|
5562
6519
|
},
|
|
5563
6520
|
[setValue]
|
|
5564
6521
|
);
|
|
5565
|
-
const handleCalendarToggle = (0,
|
|
6522
|
+
const handleCalendarToggle = (0, import_react45.useCallback)(
|
|
5566
6523
|
(event) => {
|
|
5567
6524
|
setAnchorEl(anchorEl ? null : event.currentTarget);
|
|
5568
6525
|
innerRef.current?.focus();
|
|
5569
6526
|
},
|
|
5570
6527
|
[anchorEl, setAnchorEl, innerRef]
|
|
5571
6528
|
);
|
|
5572
|
-
const handleCalendarChange = (0,
|
|
6529
|
+
const handleCalendarChange = (0, import_react45.useCallback)(
|
|
5573
6530
|
([date1, date2]) => {
|
|
5574
6531
|
if (!date1 || !date2) return;
|
|
5575
6532
|
setValue(formatValueString4([date1, date2], format));
|
|
@@ -5577,7 +6534,7 @@ var MonthRangePicker = (0, import_react35.forwardRef)(
|
|
|
5577
6534
|
},
|
|
5578
6535
|
[setValue, setAnchorEl, format]
|
|
5579
6536
|
);
|
|
5580
|
-
return /* @__PURE__ */
|
|
6537
|
+
return /* @__PURE__ */ import_react45.default.createElement(MonthRangePickerRoot, null, /* @__PURE__ */ import_react45.default.createElement(import_base5.FocusTrap, { open: true }, /* @__PURE__ */ import_react45.default.createElement(import_react45.default.Fragment, null, /* @__PURE__ */ import_react45.default.createElement(
|
|
5581
6538
|
Input_default,
|
|
5582
6539
|
{
|
|
5583
6540
|
...innerProps,
|
|
@@ -5590,7 +6547,7 @@ var MonthRangePicker = (0, import_react35.forwardRef)(
|
|
|
5590
6547
|
required,
|
|
5591
6548
|
placeholder: `${format} - ${format}`,
|
|
5592
6549
|
slotProps: {
|
|
5593
|
-
input: { component:
|
|
6550
|
+
input: { component: TextMaskAdapter9, ref: innerRef, format }
|
|
5594
6551
|
},
|
|
5595
6552
|
error,
|
|
5596
6553
|
className,
|
|
@@ -5599,7 +6556,7 @@ var MonthRangePicker = (0, import_react35.forwardRef)(
|
|
|
5599
6556
|
// NOTE: placeholder char 를 텍스트로 표시하므로 동일한 너비를 가지는 mono font 를 사용해야 이질감이 없다.
|
|
5600
6557
|
fontFamily: "monospace"
|
|
5601
6558
|
},
|
|
5602
|
-
endDecorator: /* @__PURE__ */
|
|
6559
|
+
endDecorator: /* @__PURE__ */ import_react45.default.createElement(
|
|
5603
6560
|
IconButton_default,
|
|
5604
6561
|
{
|
|
5605
6562
|
variant: "plain",
|
|
@@ -5609,12 +6566,12 @@ var MonthRangePicker = (0, import_react35.forwardRef)(
|
|
|
5609
6566
|
"aria-haspopup": "dialog",
|
|
5610
6567
|
"aria-expanded": open
|
|
5611
6568
|
},
|
|
5612
|
-
/* @__PURE__ */
|
|
6569
|
+
/* @__PURE__ */ import_react45.default.createElement(import_CalendarToday4.default, null)
|
|
5613
6570
|
),
|
|
5614
6571
|
label,
|
|
5615
6572
|
helperText
|
|
5616
6573
|
}
|
|
5617
|
-
), open && /* @__PURE__ */
|
|
6574
|
+
), open && /* @__PURE__ */ import_react45.default.createElement(import_base5.ClickAwayListener, { onClickAway: () => setAnchorEl(null) }, /* @__PURE__ */ import_react45.default.createElement(
|
|
5618
6575
|
StyledPopper4,
|
|
5619
6576
|
{
|
|
5620
6577
|
id: "month-range-picker-popper",
|
|
@@ -5633,7 +6590,7 @@ var MonthRangePicker = (0, import_react35.forwardRef)(
|
|
|
5633
6590
|
"aria-label": "Calendar Tooltip",
|
|
5634
6591
|
"aria-expanded": open
|
|
5635
6592
|
},
|
|
5636
|
-
/* @__PURE__ */
|
|
6593
|
+
/* @__PURE__ */ import_react45.default.createElement(CalendarSheet4, { tabIndex: -1, role: "presentation" }, /* @__PURE__ */ import_react45.default.createElement(
|
|
5637
6594
|
Calendar_default,
|
|
5638
6595
|
{
|
|
5639
6596
|
view: "month",
|
|
@@ -5646,14 +6603,14 @@ var MonthRangePicker = (0, import_react35.forwardRef)(
|
|
|
5646
6603
|
disableFuture,
|
|
5647
6604
|
disablePast
|
|
5648
6605
|
}
|
|
5649
|
-
), /* @__PURE__ */
|
|
6606
|
+
), /* @__PURE__ */ import_react45.default.createElement(
|
|
5650
6607
|
DialogActions_default,
|
|
5651
6608
|
{
|
|
5652
6609
|
sx: {
|
|
5653
6610
|
p: 1
|
|
5654
6611
|
}
|
|
5655
6612
|
},
|
|
5656
|
-
/* @__PURE__ */
|
|
6613
|
+
/* @__PURE__ */ import_react45.default.createElement(
|
|
5657
6614
|
Button_default,
|
|
5658
6615
|
{
|
|
5659
6616
|
size,
|
|
@@ -5673,22 +6630,22 @@ var MonthRangePicker = (0, import_react35.forwardRef)(
|
|
|
5673
6630
|
MonthRangePicker.displayName = "MonthRangePicker";
|
|
5674
6631
|
|
|
5675
6632
|
// src/components/NavigationGroup/NavigationGroup.tsx
|
|
5676
|
-
var
|
|
5677
|
-
var
|
|
5678
|
-
var AccordionSummary2 = (0,
|
|
6633
|
+
var import_react46 = __toESM(require("react"));
|
|
6634
|
+
var import_joy60 = require("@mui/joy");
|
|
6635
|
+
var AccordionSummary2 = (0, import_joy60.styled)(import_joy60.AccordionSummary, {
|
|
5679
6636
|
name: "NavigationGroup",
|
|
5680
6637
|
slot: "Summary",
|
|
5681
6638
|
shouldForwardProp: (prop) => prop !== "useIcon" && prop !== "level"
|
|
5682
6639
|
})(({ theme, useIcon, level }) => ({
|
|
5683
|
-
[`& .${
|
|
6640
|
+
[`& .${import_joy60.accordionSummaryClasses.button}`]: {
|
|
5684
6641
|
padding: theme.spacing(4, 6, 4, (useIcon ? 6 : 8) + (level || 0) * 8),
|
|
5685
|
-
[`&.${
|
|
6642
|
+
[`&.${import_joy60.accordionSummaryClasses.expanded}`]: {
|
|
5686
6643
|
color: theme.palette.primary.plainColor,
|
|
5687
6644
|
"--Icon-color": theme.palette.primary.plainColor
|
|
5688
6645
|
}
|
|
5689
6646
|
}
|
|
5690
6647
|
}));
|
|
5691
|
-
var AccordionDetails2 = (0,
|
|
6648
|
+
var AccordionDetails2 = (0, import_joy60.styled)(import_joy60.AccordionDetails, {
|
|
5692
6649
|
name: "NavigationGroup",
|
|
5693
6650
|
slot: "Details"
|
|
5694
6651
|
})(({ theme }) => ({
|
|
@@ -5697,13 +6654,13 @@ var AccordionDetails2 = (0, import_joy49.styled)(import_joy49.AccordionDetails,
|
|
|
5697
6654
|
}));
|
|
5698
6655
|
function NavigationGroup(props) {
|
|
5699
6656
|
const { title, children, startDecorator, level, ...rest } = props;
|
|
5700
|
-
return /* @__PURE__ */
|
|
6657
|
+
return /* @__PURE__ */ import_react46.default.createElement(import_joy60.Accordion, { ...rest }, /* @__PURE__ */ import_react46.default.createElement(AccordionSummary2, { useIcon: !!startDecorator, level }, /* @__PURE__ */ import_react46.default.createElement(import_joy60.Stack, { direction: "row", gap: 4 }, startDecorator, title)), /* @__PURE__ */ import_react46.default.createElement(AccordionDetails2, null, children));
|
|
5701
6658
|
}
|
|
5702
6659
|
|
|
5703
6660
|
// src/components/NavigationItem/NavigationItem.tsx
|
|
5704
|
-
var
|
|
5705
|
-
var
|
|
5706
|
-
var ListItemButton = (0,
|
|
6661
|
+
var import_react47 = __toESM(require("react"));
|
|
6662
|
+
var import_joy61 = require("@mui/joy");
|
|
6663
|
+
var ListItemButton = (0, import_joy61.styled)(import_joy61.ListItemButton, {
|
|
5707
6664
|
name: "NavigationItem",
|
|
5708
6665
|
slot: "Button",
|
|
5709
6666
|
shouldForwardProp: (prop) => prop !== "useIcon" && prop !== "level"
|
|
@@ -5717,7 +6674,7 @@ var ListItemButton = (0, import_joy50.styled)(import_joy50.ListItemButton, {
|
|
|
5717
6674
|
"&:active": {
|
|
5718
6675
|
backgroundColor: theme.palette.neutral.plainActiveBg
|
|
5719
6676
|
},
|
|
5720
|
-
[`&.${
|
|
6677
|
+
[`&.${import_joy61.listItemButtonClasses.selected}`]: {
|
|
5721
6678
|
color: theme.palette.primary.plainColor,
|
|
5722
6679
|
"--Icon-color": theme.palette.primary.plainColor,
|
|
5723
6680
|
"&:not(:hover):not(:active)": {
|
|
@@ -5730,7 +6687,7 @@ function NavigationItem(props) {
|
|
|
5730
6687
|
const handleClick = () => {
|
|
5731
6688
|
onClick?.(id);
|
|
5732
6689
|
};
|
|
5733
|
-
return /* @__PURE__ */
|
|
6690
|
+
return /* @__PURE__ */ import_react47.default.createElement(import_joy61.ListItem, { ...rest }, /* @__PURE__ */ import_react47.default.createElement(
|
|
5734
6691
|
ListItemButton,
|
|
5735
6692
|
{
|
|
5736
6693
|
level,
|
|
@@ -5739,21 +6696,21 @@ function NavigationItem(props) {
|
|
|
5739
6696
|
"aria-current": selected,
|
|
5740
6697
|
onClick: handleClick
|
|
5741
6698
|
},
|
|
5742
|
-
startDecorator && /* @__PURE__ */
|
|
6699
|
+
startDecorator && /* @__PURE__ */ import_react47.default.createElement(import_joy61.ListItemDecorator, null, startDecorator),
|
|
5743
6700
|
children
|
|
5744
6701
|
));
|
|
5745
6702
|
}
|
|
5746
6703
|
|
|
5747
6704
|
// src/components/Navigator/Navigator.tsx
|
|
5748
|
-
var
|
|
6705
|
+
var import_react48 = __toESM(require("react"));
|
|
5749
6706
|
function Navigator(props) {
|
|
5750
6707
|
const { items, level = 0, onSelect } = props;
|
|
5751
6708
|
const handleItemClick = (id) => {
|
|
5752
6709
|
onSelect?.(id);
|
|
5753
6710
|
};
|
|
5754
|
-
return /* @__PURE__ */
|
|
6711
|
+
return /* @__PURE__ */ import_react48.default.createElement("div", null, items.map((item, index) => {
|
|
5755
6712
|
if (item.type === "item") {
|
|
5756
|
-
return /* @__PURE__ */
|
|
6713
|
+
return /* @__PURE__ */ import_react48.default.createElement(
|
|
5757
6714
|
NavigationItem,
|
|
5758
6715
|
{
|
|
5759
6716
|
key: item.id,
|
|
@@ -5766,7 +6723,7 @@ function Navigator(props) {
|
|
|
5766
6723
|
item.title
|
|
5767
6724
|
);
|
|
5768
6725
|
} else if (item.type === "group") {
|
|
5769
|
-
return /* @__PURE__ */
|
|
6726
|
+
return /* @__PURE__ */ import_react48.default.createElement(
|
|
5770
6727
|
NavigationGroup,
|
|
5771
6728
|
{
|
|
5772
6729
|
key: index,
|
|
@@ -5783,145 +6740,26 @@ function Navigator(props) {
|
|
|
5783
6740
|
}
|
|
5784
6741
|
Navigator.displayName = "Navigator";
|
|
5785
6742
|
|
|
5786
|
-
// src/components/PercentageInput/PercentageInput.tsx
|
|
5787
|
-
var import_react39 = __toESM(require("react"));
|
|
5788
|
-
var import_react_number_format2 = require("react-number-format");
|
|
5789
|
-
var import_joy51 = require("@mui/joy");
|
|
5790
|
-
var padDecimal = (value, decimalScale) => {
|
|
5791
|
-
const [integer, decimal = ""] = `${value}`.split(".");
|
|
5792
|
-
return Number(`${integer}${decimal.padEnd(decimalScale, "0")}`);
|
|
5793
|
-
};
|
|
5794
|
-
var TextMaskAdapter9 = import_react39.default.forwardRef(
|
|
5795
|
-
function TextMaskAdapter10(props, ref) {
|
|
5796
|
-
const { onChange, min, max, ...innerProps } = props;
|
|
5797
|
-
return /* @__PURE__ */ import_react39.default.createElement(
|
|
5798
|
-
import_react_number_format2.NumericFormat,
|
|
5799
|
-
{
|
|
5800
|
-
...innerProps,
|
|
5801
|
-
onValueChange: ({ value }) => {
|
|
5802
|
-
onChange?.({
|
|
5803
|
-
target: {
|
|
5804
|
-
name: props.name,
|
|
5805
|
-
value
|
|
5806
|
-
}
|
|
5807
|
-
});
|
|
5808
|
-
},
|
|
5809
|
-
valueIsNumericString: true,
|
|
5810
|
-
thousandSeparator: true,
|
|
5811
|
-
suffix: "%",
|
|
5812
|
-
getInputRef: ref,
|
|
5813
|
-
allowNegative: true
|
|
5814
|
-
}
|
|
5815
|
-
);
|
|
5816
|
-
}
|
|
5817
|
-
);
|
|
5818
|
-
var PercentageInputRoot = (0, import_joy51.styled)(Input_default, {
|
|
5819
|
-
name: "PercentageInput",
|
|
5820
|
-
slot: "Root",
|
|
5821
|
-
overridesResolver: (props, styles) => styles.root
|
|
5822
|
-
})({});
|
|
5823
|
-
var PercentageInput = import_react39.default.forwardRef(function PercentageInput2(inProps, ref) {
|
|
5824
|
-
const props = (0, import_joy51.useThemeProps)({ props: inProps, name: "PercentageInput" });
|
|
5825
|
-
const {
|
|
5826
|
-
name,
|
|
5827
|
-
onChange,
|
|
5828
|
-
label,
|
|
5829
|
-
error,
|
|
5830
|
-
helperText,
|
|
5831
|
-
required,
|
|
5832
|
-
disabled,
|
|
5833
|
-
useMinorUnit,
|
|
5834
|
-
maxDecimalScale = 0,
|
|
5835
|
-
min,
|
|
5836
|
-
max,
|
|
5837
|
-
// NOTE: 스타일 관련된 props는 최상위 엘리먼트에 적용한다.
|
|
5838
|
-
sx,
|
|
5839
|
-
className,
|
|
5840
|
-
...innerProps
|
|
5841
|
-
} = props;
|
|
5842
|
-
const [_value, setValue] = useControlledState(
|
|
5843
|
-
props.value,
|
|
5844
|
-
props.defaultValue,
|
|
5845
|
-
(0, import_react39.useCallback)(
|
|
5846
|
-
(value2) => onChange?.({ target: { name, value: value2 } }),
|
|
5847
|
-
[onChange, name]
|
|
5848
|
-
)
|
|
5849
|
-
);
|
|
5850
|
-
const [internalError, setInternalError] = (0, import_react39.useState)(
|
|
5851
|
-
max && _value && _value > max || min && _value && _value < min
|
|
5852
|
-
);
|
|
5853
|
-
const value = (0, import_react39.useMemo)(() => {
|
|
5854
|
-
if (_value && useMinorUnit) {
|
|
5855
|
-
return _value / Math.pow(10, maxDecimalScale);
|
|
5856
|
-
}
|
|
5857
|
-
return _value;
|
|
5858
|
-
}, [_value, useMinorUnit, maxDecimalScale]);
|
|
5859
|
-
const handleChange = (0, import_react39.useCallback)(
|
|
5860
|
-
(event) => {
|
|
5861
|
-
if (event.target.value === "") {
|
|
5862
|
-
setValue(void 0);
|
|
5863
|
-
return;
|
|
5864
|
-
}
|
|
5865
|
-
const originalAmount = Number(event.target.value);
|
|
5866
|
-
if (min && originalAmount < min || max && originalAmount > max) {
|
|
5867
|
-
setInternalError(true);
|
|
5868
|
-
} else {
|
|
5869
|
-
setInternalError(false);
|
|
5870
|
-
}
|
|
5871
|
-
const amount = useMinorUnit ? padDecimal(originalAmount, maxDecimalScale) : originalAmount;
|
|
5872
|
-
setValue(amount);
|
|
5873
|
-
},
|
|
5874
|
-
[setValue, useMinorUnit, maxDecimalScale, min, max]
|
|
5875
|
-
);
|
|
5876
|
-
return /* @__PURE__ */ import_react39.default.createElement(
|
|
5877
|
-
PercentageInputRoot,
|
|
5878
|
-
{
|
|
5879
|
-
...innerProps,
|
|
5880
|
-
ref,
|
|
5881
|
-
value,
|
|
5882
|
-
onChange: handleChange,
|
|
5883
|
-
error: internalError || error,
|
|
5884
|
-
disabled,
|
|
5885
|
-
required,
|
|
5886
|
-
color: internalError || error ? "danger" : props.color,
|
|
5887
|
-
label,
|
|
5888
|
-
helperText,
|
|
5889
|
-
slotProps: {
|
|
5890
|
-
input: {
|
|
5891
|
-
component: TextMaskAdapter9,
|
|
5892
|
-
"aria-label": innerProps["aria-label"],
|
|
5893
|
-
decimalScale: maxDecimalScale
|
|
5894
|
-
}
|
|
5895
|
-
},
|
|
5896
|
-
sx: {
|
|
5897
|
-
...sx
|
|
5898
|
-
},
|
|
5899
|
-
className
|
|
5900
|
-
}
|
|
5901
|
-
);
|
|
5902
|
-
});
|
|
5903
|
-
PercentageInput.displayName = "PercentageInput";
|
|
5904
|
-
|
|
5905
6743
|
// src/components/ProfileMenu/ProfileMenu.tsx
|
|
5906
|
-
var
|
|
5907
|
-
var
|
|
6744
|
+
var import_react49 = __toESM(require("react"));
|
|
6745
|
+
var import_joy62 = require("@mui/joy");
|
|
5908
6746
|
var import_base6 = require("@mui/base");
|
|
5909
6747
|
var import_ArrowDropDown = __toESM(require("@mui/icons-material/ArrowDropDown"));
|
|
5910
|
-
var StyledProfileCard = (0,
|
|
6748
|
+
var StyledProfileCard = (0, import_joy62.styled)(import_joy3.Stack, {
|
|
5911
6749
|
name: "ProfileMenu",
|
|
5912
6750
|
slot: "item"
|
|
5913
6751
|
})({});
|
|
5914
6752
|
function ProfileCard(props) {
|
|
5915
6753
|
const { children, chip, caption, size } = props;
|
|
5916
|
-
const captionLevel = (0,
|
|
6754
|
+
const captionLevel = (0, import_react49.useMemo)(
|
|
5917
6755
|
() => size === "sm" ? "body-xs" : "body-sm",
|
|
5918
6756
|
[size]
|
|
5919
6757
|
);
|
|
5920
|
-
const nameLevel = (0,
|
|
6758
|
+
const nameLevel = (0, import_react49.useMemo)(
|
|
5921
6759
|
() => size === "sm" ? "body-sm" : "body-md",
|
|
5922
6760
|
[size]
|
|
5923
6761
|
);
|
|
5924
|
-
return /* @__PURE__ */
|
|
6762
|
+
return /* @__PURE__ */ import_react49.default.createElement(StyledProfileCard, { px: 4, py: 2 }, /* @__PURE__ */ import_react49.default.createElement(import_joy3.Stack, { direction: "row", gap: 2 }, /* @__PURE__ */ import_react49.default.createElement(
|
|
5925
6763
|
Typography,
|
|
5926
6764
|
{
|
|
5927
6765
|
level: nameLevel,
|
|
@@ -5929,10 +6767,10 @@ function ProfileCard(props) {
|
|
|
5929
6767
|
textColor: "text.primary"
|
|
5930
6768
|
},
|
|
5931
6769
|
children
|
|
5932
|
-
), chip && /* @__PURE__ */
|
|
6770
|
+
), chip && /* @__PURE__ */ import_react49.default.createElement(Chip, { size, color: "neutral", variant: "outlined" }, chip)), caption && /* @__PURE__ */ import_react49.default.createElement(Typography, { level: captionLevel, textColor: "text.tertiary" }, caption));
|
|
5933
6771
|
}
|
|
5934
6772
|
ProfileCard.displayName = "ProfileCard";
|
|
5935
|
-
var StyledProfileMenuButton = (0,
|
|
6773
|
+
var StyledProfileMenuButton = (0, import_joy62.styled)(import_joy62.MenuButton, {
|
|
5936
6774
|
name: "ProfileMenu",
|
|
5937
6775
|
slot: "button"
|
|
5938
6776
|
})(({ theme }) => ({
|
|
@@ -5941,16 +6779,16 @@ var StyledProfileMenuButton = (0, import_joy52.styled)(import_joy52.MenuButton,
|
|
|
5941
6779
|
}));
|
|
5942
6780
|
function ProfileMenuButton(props) {
|
|
5943
6781
|
const { size = "md", src, alt, children, getInitial, ...innerProps } = props;
|
|
5944
|
-
return /* @__PURE__ */
|
|
6782
|
+
return /* @__PURE__ */ import_react49.default.createElement(
|
|
5945
6783
|
StyledProfileMenuButton,
|
|
5946
6784
|
{
|
|
5947
6785
|
variant: "plain",
|
|
5948
6786
|
color: "neutral",
|
|
5949
6787
|
size,
|
|
5950
|
-
endDecorator: /* @__PURE__ */
|
|
6788
|
+
endDecorator: /* @__PURE__ */ import_react49.default.createElement(import_ArrowDropDown.default, null),
|
|
5951
6789
|
...innerProps
|
|
5952
6790
|
},
|
|
5953
|
-
/* @__PURE__ */
|
|
6791
|
+
/* @__PURE__ */ import_react49.default.createElement(
|
|
5954
6792
|
Avatar,
|
|
5955
6793
|
{
|
|
5956
6794
|
variant: "soft",
|
|
@@ -5965,13 +6803,13 @@ function ProfileMenuButton(props) {
|
|
|
5965
6803
|
);
|
|
5966
6804
|
}
|
|
5967
6805
|
ProfileMenuButton.displayName = "ProfileMenuButton";
|
|
5968
|
-
var ProfileMenuRoot = (0,
|
|
6806
|
+
var ProfileMenuRoot = (0, import_joy62.styled)(Menu, {
|
|
5969
6807
|
name: "ProfileMenu",
|
|
5970
6808
|
slot: "root"
|
|
5971
6809
|
})(({ theme }) => ({
|
|
5972
6810
|
border: "none",
|
|
5973
6811
|
"--ListItem-paddingX": theme.spacing(4),
|
|
5974
|
-
[`.${
|
|
6812
|
+
[`.${import_joy62.menuItemClasses.root}`]: {
|
|
5975
6813
|
border: "none"
|
|
5976
6814
|
}
|
|
5977
6815
|
}));
|
|
@@ -5989,9 +6827,9 @@ function ProfileMenu(props) {
|
|
|
5989
6827
|
const [open, setOpen] = useControlledState(
|
|
5990
6828
|
_open,
|
|
5991
6829
|
defaultOpen ?? false,
|
|
5992
|
-
(0,
|
|
6830
|
+
(0, import_react49.useCallback)((value) => onOpenChange?.(value), [onOpenChange])
|
|
5993
6831
|
);
|
|
5994
|
-
return /* @__PURE__ */
|
|
6832
|
+
return /* @__PURE__ */ import_react49.default.createElement(import_base6.ClickAwayListener, { onClickAway: () => setOpen(false) }, /* @__PURE__ */ import_react49.default.createElement("div", null, /* @__PURE__ */ import_react49.default.createElement(import_joy62.Dropdown, { open }, /* @__PURE__ */ import_react49.default.createElement(
|
|
5995
6833
|
ProfileMenuButton,
|
|
5996
6834
|
{
|
|
5997
6835
|
size,
|
|
@@ -6001,7 +6839,7 @@ function ProfileMenu(props) {
|
|
|
6001
6839
|
getInitial
|
|
6002
6840
|
},
|
|
6003
6841
|
profile.name
|
|
6004
|
-
), /* @__PURE__ */
|
|
6842
|
+
), /* @__PURE__ */ import_react49.default.createElement(
|
|
6005
6843
|
ProfileMenuRoot,
|
|
6006
6844
|
{
|
|
6007
6845
|
size,
|
|
@@ -6009,7 +6847,7 @@ function ProfileMenu(props) {
|
|
|
6009
6847
|
...innerProps,
|
|
6010
6848
|
onClose: () => setOpen(false)
|
|
6011
6849
|
},
|
|
6012
|
-
/* @__PURE__ */
|
|
6850
|
+
/* @__PURE__ */ import_react49.default.createElement(
|
|
6013
6851
|
ProfileCard,
|
|
6014
6852
|
{
|
|
6015
6853
|
size,
|
|
@@ -6018,8 +6856,8 @@ function ProfileMenu(props) {
|
|
|
6018
6856
|
},
|
|
6019
6857
|
profile.name
|
|
6020
6858
|
),
|
|
6021
|
-
!!menuItems.length && /* @__PURE__ */
|
|
6022
|
-
menuItems.map(({ label, ...menuProps }) => /* @__PURE__ */
|
|
6859
|
+
!!menuItems.length && /* @__PURE__ */ import_react49.default.createElement(import_joy62.ListDivider, null),
|
|
6860
|
+
menuItems.map(({ label, ...menuProps }) => /* @__PURE__ */ import_react49.default.createElement(
|
|
6023
6861
|
MenuItem,
|
|
6024
6862
|
{
|
|
6025
6863
|
...menuProps,
|
|
@@ -6034,38 +6872,28 @@ function ProfileMenu(props) {
|
|
|
6034
6872
|
}
|
|
6035
6873
|
ProfileMenu.displayName = "ProfileMenu";
|
|
6036
6874
|
|
|
6037
|
-
// src/components/Radio/Radio.tsx
|
|
6038
|
-
var import_joy53 = require("@mui/joy");
|
|
6039
|
-
var import_framer_motion26 = require("framer-motion");
|
|
6040
|
-
var MotionRadio = (0, import_framer_motion26.motion)(import_joy53.Radio);
|
|
6041
|
-
var Radio = MotionRadio;
|
|
6042
|
-
Radio.displayName = "Radio";
|
|
6043
|
-
var MotionRadioGroup = (0, import_framer_motion26.motion)(import_joy53.RadioGroup);
|
|
6044
|
-
var RadioGroup = MotionRadioGroup;
|
|
6045
|
-
RadioGroup.displayName = "RadioGroup";
|
|
6046
|
-
|
|
6047
6875
|
// src/components/RadioList/RadioList.tsx
|
|
6048
|
-
var
|
|
6876
|
+
var import_react50 = __toESM(require("react"));
|
|
6049
6877
|
function RadioList(props) {
|
|
6050
6878
|
const { items, ...innerProps } = props;
|
|
6051
|
-
return /* @__PURE__ */
|
|
6879
|
+
return /* @__PURE__ */ import_react50.default.createElement(RadioGroup, { ...innerProps }, items.map((item) => /* @__PURE__ */ import_react50.default.createElement(Radio, { key: `${item.value}`, value: item.value, label: item.label })));
|
|
6052
6880
|
}
|
|
6053
6881
|
RadioList.displayName = "RadioList";
|
|
6054
6882
|
|
|
6055
6883
|
// src/components/Stepper/Stepper.tsx
|
|
6056
|
-
var
|
|
6057
|
-
var
|
|
6884
|
+
var import_react51 = __toESM(require("react"));
|
|
6885
|
+
var import_joy63 = require("@mui/joy");
|
|
6058
6886
|
var import_Check = __toESM(require("@mui/icons-material/Check"));
|
|
6059
6887
|
var import_framer_motion27 = require("framer-motion");
|
|
6060
|
-
var Step = (0,
|
|
6888
|
+
var Step = (0, import_joy63.styled)(import_joy63.Step)({});
|
|
6061
6889
|
Step.displayName = "Step";
|
|
6062
|
-
var StepIndicator = (0,
|
|
6890
|
+
var StepIndicator = (0, import_joy63.styled)(import_joy63.StepIndicator)({});
|
|
6063
6891
|
StepIndicator.displayName = "StepIndicator";
|
|
6064
|
-
var StyledStepper = (0,
|
|
6892
|
+
var StyledStepper = (0, import_joy63.styled)(import_joy63.Stepper)(({ theme }) => ({
|
|
6065
6893
|
"--StepIndicator-size": "24px",
|
|
6066
6894
|
"--Step-gap": theme.spacing(2),
|
|
6067
6895
|
"--joy-palette-success-solidBg": "var(--joy-palette-success-400)",
|
|
6068
|
-
[`& .${
|
|
6896
|
+
[`& .${import_joy63.stepIndicatorClasses.root}`]: {
|
|
6069
6897
|
fontSize: "var(--ceed-fontSize-xs)"
|
|
6070
6898
|
}
|
|
6071
6899
|
}));
|
|
@@ -6079,30 +6907,30 @@ function Stepper(props) {
|
|
|
6079
6907
|
inactiveLineColor = "neutral.300",
|
|
6080
6908
|
activeStep
|
|
6081
6909
|
} = props;
|
|
6082
|
-
return /* @__PURE__ */
|
|
6910
|
+
return /* @__PURE__ */ import_react51.default.createElement(
|
|
6083
6911
|
MotionStepper,
|
|
6084
6912
|
{
|
|
6085
6913
|
sx: (theme) => ({
|
|
6086
6914
|
"--StepIndicator-size": "24px",
|
|
6087
6915
|
"--Step-gap": theme.spacing(2),
|
|
6088
|
-
[`& .${
|
|
6916
|
+
[`& .${import_joy63.stepIndicatorClasses.root}`]: {
|
|
6089
6917
|
fontSize: "var(--ceed-fontSize-xs)"
|
|
6090
6918
|
},
|
|
6091
|
-
[`& .${
|
|
6919
|
+
[`& .${import_joy63.stepClasses.completed}`]: {
|
|
6092
6920
|
"&::after": { bgcolor: activeLineColor },
|
|
6093
|
-
[`& .${
|
|
6921
|
+
[`& .${import_joy63.stepIndicatorClasses.root}`]: {
|
|
6094
6922
|
bgcolor: activeColor
|
|
6095
6923
|
}
|
|
6096
6924
|
},
|
|
6097
|
-
[`& .${
|
|
6925
|
+
[`& .${import_joy63.stepClasses.active}`]: {
|
|
6098
6926
|
"&::after": { bgcolor: inactiveLineColor },
|
|
6099
|
-
[`& .${
|
|
6927
|
+
[`& .${import_joy63.stepIndicatorClasses.root}`]: {
|
|
6100
6928
|
bgcolor: activeColor
|
|
6101
6929
|
}
|
|
6102
6930
|
},
|
|
6103
|
-
[`& .${
|
|
6931
|
+
[`& .${import_joy63.stepClasses.disabled}`]: {
|
|
6104
6932
|
"&::after": { bgcolor: inactiveLineColor },
|
|
6105
|
-
[`& .${
|
|
6933
|
+
[`& .${import_joy63.stepIndicatorClasses.root}`]: {
|
|
6106
6934
|
bgcolor: inactiveColor
|
|
6107
6935
|
}
|
|
6108
6936
|
}
|
|
@@ -6113,15 +6941,15 @@ function Stepper(props) {
|
|
|
6113
6941
|
const completed = activeStep > i + 1;
|
|
6114
6942
|
const disabled = activeStep < i + 1;
|
|
6115
6943
|
const hasContent = step.label || step.extraContent;
|
|
6116
|
-
return /* @__PURE__ */
|
|
6944
|
+
return /* @__PURE__ */ import_react51.default.createElement(
|
|
6117
6945
|
Step,
|
|
6118
6946
|
{
|
|
6119
|
-
indicator: /* @__PURE__ */
|
|
6947
|
+
indicator: /* @__PURE__ */ import_react51.default.createElement(StepIndicator, { variant: "solid", color: "primary" }, completed ? /* @__PURE__ */ import_react51.default.createElement(import_Check.default, null) : step.indicatorContent),
|
|
6120
6948
|
active,
|
|
6121
6949
|
completed,
|
|
6122
6950
|
disabled
|
|
6123
6951
|
},
|
|
6124
|
-
hasContent && /* @__PURE__ */
|
|
6952
|
+
hasContent && /* @__PURE__ */ import_react51.default.createElement(Stack_default, null, step.label && /* @__PURE__ */ import_react51.default.createElement(Typography_default, { level: "title-sm" }, step.label), step.extraContent && /* @__PURE__ */ import_react51.default.createElement(Typography_default, { level: "body-xs" }, step.extraContent))
|
|
6125
6953
|
);
|
|
6126
6954
|
})
|
|
6127
6955
|
);
|
|
@@ -6129,11 +6957,11 @@ function Stepper(props) {
|
|
|
6129
6957
|
Stepper.displayName = "Stepper";
|
|
6130
6958
|
|
|
6131
6959
|
// src/components/Switch/Switch.tsx
|
|
6132
|
-
var
|
|
6133
|
-
var
|
|
6960
|
+
var import_react52 = __toESM(require("react"));
|
|
6961
|
+
var import_joy64 = require("@mui/joy");
|
|
6134
6962
|
var import_framer_motion28 = require("framer-motion");
|
|
6135
|
-
var MotionSwitch = (0, import_framer_motion28.motion)(
|
|
6136
|
-
var StyledThumb = (0,
|
|
6963
|
+
var MotionSwitch = (0, import_framer_motion28.motion)(import_joy64.Switch);
|
|
6964
|
+
var StyledThumb = (0, import_joy64.styled)(import_framer_motion28.motion.div)({
|
|
6137
6965
|
"--Icon-fontSize": "calc(var(--Switch-thumbSize) * 0.75)",
|
|
6138
6966
|
display: "inline-flex",
|
|
6139
6967
|
justifyContent: "center",
|
|
@@ -6146,19 +6974,19 @@ var StyledThumb = (0, import_joy55.styled)(import_framer_motion28.motion.div)({
|
|
|
6146
6974
|
boxShadow: "var(--Switch-thumbShadow)",
|
|
6147
6975
|
color: "var(--Switch-thumbColor)",
|
|
6148
6976
|
backgroundColor: "var(--Switch-thumbBackground)",
|
|
6149
|
-
[`&.${
|
|
6977
|
+
[`&.${import_joy64.switchClasses.checked}`]: {
|
|
6150
6978
|
left: "unset",
|
|
6151
6979
|
right: "var(--Switch-thumbOffset)"
|
|
6152
6980
|
}
|
|
6153
6981
|
});
|
|
6154
|
-
var Thumb = (props) => /* @__PURE__ */
|
|
6982
|
+
var Thumb = (props) => /* @__PURE__ */ import_react52.default.createElement(StyledThumb, { ...props, layout: true, transition: spring });
|
|
6155
6983
|
var spring = {
|
|
6156
6984
|
type: "spring",
|
|
6157
6985
|
stiffness: 700,
|
|
6158
6986
|
damping: 30
|
|
6159
6987
|
};
|
|
6160
6988
|
var Switch = (props) => {
|
|
6161
|
-
return /* @__PURE__ */
|
|
6989
|
+
return /* @__PURE__ */ import_react52.default.createElement(
|
|
6162
6990
|
MotionSwitch,
|
|
6163
6991
|
{
|
|
6164
6992
|
...props,
|
|
@@ -6172,32 +7000,32 @@ var Switch = (props) => {
|
|
|
6172
7000
|
Switch.displayName = "Switch";
|
|
6173
7001
|
|
|
6174
7002
|
// src/components/Tabs/Tabs.tsx
|
|
6175
|
-
var
|
|
6176
|
-
var
|
|
6177
|
-
var StyledTabs = (0,
|
|
7003
|
+
var import_react53 = __toESM(require("react"));
|
|
7004
|
+
var import_joy65 = require("@mui/joy");
|
|
7005
|
+
var StyledTabs = (0, import_joy65.styled)(import_joy65.Tabs)(({ theme }) => ({
|
|
6178
7006
|
backgroundColor: theme.palette.background.body
|
|
6179
7007
|
}));
|
|
6180
7008
|
var Tabs = StyledTabs;
|
|
6181
7009
|
Tabs.displayName = "Tabs";
|
|
6182
|
-
var StyledTab = (0,
|
|
7010
|
+
var StyledTab = (0, import_joy65.styled)(import_joy65.Tab)(({ theme }) => ({
|
|
6183
7011
|
gap: theme.spacing(2),
|
|
6184
|
-
[`&:not(.${
|
|
7012
|
+
[`&:not(.${import_joy65.tabClasses.selected})`]: {
|
|
6185
7013
|
color: theme.palette.neutral[700]
|
|
6186
7014
|
},
|
|
6187
|
-
[`&.${
|
|
7015
|
+
[`&.${import_joy65.tabClasses.variantPlain}`]: {
|
|
6188
7016
|
backgroundColor: theme.palette.background.body
|
|
6189
7017
|
}
|
|
6190
7018
|
}));
|
|
6191
|
-
var Tab = (0,
|
|
6192
|
-
return /* @__PURE__ */
|
|
7019
|
+
var Tab = (0, import_react53.forwardRef)(function Tab2({ startDecorator, endDecorator, children, ...props }, ref) {
|
|
7020
|
+
return /* @__PURE__ */ import_react53.default.createElement(StyledTab, { ...props, ref }, startDecorator, children, endDecorator);
|
|
6193
7021
|
});
|
|
6194
7022
|
Tab.displayName = "Tab";
|
|
6195
|
-
var TabList =
|
|
6196
|
-
var TabPanel =
|
|
7023
|
+
var TabList = import_joy65.TabList;
|
|
7024
|
+
var TabPanel = import_joy65.TabPanel;
|
|
6197
7025
|
|
|
6198
7026
|
// src/components/ThemeProvider/ThemeProvider.tsx
|
|
6199
|
-
var
|
|
6200
|
-
var
|
|
7027
|
+
var import_react54 = __toESM(require("react"));
|
|
7028
|
+
var import_joy66 = require("@mui/joy");
|
|
6201
7029
|
var colorScheme = {
|
|
6202
7030
|
palette: {
|
|
6203
7031
|
danger: {
|
|
@@ -6250,7 +7078,7 @@ var colorScheme = {
|
|
|
6250
7078
|
}
|
|
6251
7079
|
}
|
|
6252
7080
|
};
|
|
6253
|
-
var defaultTheme = (0,
|
|
7081
|
+
var defaultTheme = (0, import_joy66.extendTheme)({
|
|
6254
7082
|
cssVarPrefix: "ceed",
|
|
6255
7083
|
spacing: 4,
|
|
6256
7084
|
breakpoints: {
|
|
@@ -6277,7 +7105,7 @@ var defaultTheme = (0, import_joy57.extendTheme)({
|
|
|
6277
7105
|
},
|
|
6278
7106
|
styleOverrides: {
|
|
6279
7107
|
root: {
|
|
6280
|
-
[`.${
|
|
7108
|
+
[`.${import_joy66.inputClasses.root}`]: {
|
|
6281
7109
|
// NOTE: placeholder char 를 텍스트로 표시하므로 동일한 너비를 가지는 mono font 를 사용해야 이질감이 없다.
|
|
6282
7110
|
"font-family": "monospace"
|
|
6283
7111
|
}
|
|
@@ -6290,7 +7118,7 @@ var defaultTheme = (0, import_joy57.extendTheme)({
|
|
|
6290
7118
|
},
|
|
6291
7119
|
styleOverrides: {
|
|
6292
7120
|
root: {
|
|
6293
|
-
[`.${
|
|
7121
|
+
[`.${import_joy66.inputClasses.root}`]: {
|
|
6294
7122
|
// NOTE: placeholder char 를 텍스트로 표시하므로 동일한 너비를 가지는 mono font 를 사용해야 이질감이 없다.
|
|
6295
7123
|
"font-family": "monospace"
|
|
6296
7124
|
}
|
|
@@ -6303,7 +7131,7 @@ var defaultTheme = (0, import_joy57.extendTheme)({
|
|
|
6303
7131
|
},
|
|
6304
7132
|
styleOverrides: {
|
|
6305
7133
|
root: {
|
|
6306
|
-
[`.${
|
|
7134
|
+
[`.${import_joy66.inputClasses.root}`]: {
|
|
6307
7135
|
// NOTE: placeholder char 를 텍스트로 표시하므로 동일한 너비를 가지는 mono font 를 사용해야 이질감이 없다.
|
|
6308
7136
|
"font-family": "monospace"
|
|
6309
7137
|
}
|
|
@@ -6316,7 +7144,7 @@ var defaultTheme = (0, import_joy57.extendTheme)({
|
|
|
6316
7144
|
},
|
|
6317
7145
|
styleOverrides: {
|
|
6318
7146
|
root: {
|
|
6319
|
-
[`.${
|
|
7147
|
+
[`.${import_joy66.inputClasses.root}`]: {
|
|
6320
7148
|
// NOTE: placeholder char 를 텍스트로 표시하므로 동일한 너비를 가지는 mono font 를 사용해야 이질감이 없다.
|
|
6321
7149
|
"font-family": "monospace"
|
|
6322
7150
|
}
|
|
@@ -6329,7 +7157,7 @@ var defaultTheme = (0, import_joy57.extendTheme)({
|
|
|
6329
7157
|
},
|
|
6330
7158
|
styleOverrides: {
|
|
6331
7159
|
root: {
|
|
6332
|
-
[`.${
|
|
7160
|
+
[`.${import_joy66.inputClasses.root}`]: {
|
|
6333
7161
|
// NOTE: placeholder char 를 텍스트로 표시하므로 동일한 너비를 가지는 mono font 를 사용해야 이질감이 없다.
|
|
6334
7162
|
"font-family": "monospace"
|
|
6335
7163
|
}
|
|
@@ -6342,7 +7170,7 @@ var defaultTheme = (0, import_joy57.extendTheme)({
|
|
|
6342
7170
|
},
|
|
6343
7171
|
styleOverrides: {
|
|
6344
7172
|
root: {
|
|
6345
|
-
[`.${
|
|
7173
|
+
[`.${import_joy66.inputClasses.root}`]: {
|
|
6346
7174
|
// NOTE: placeholder char 를 텍스트로 표시하므로 동일한 너비를 가지는 mono font 를 사용해야 이질감이 없다.
|
|
6347
7175
|
"font-family": "monospace"
|
|
6348
7176
|
}
|
|
@@ -6369,6 +7197,11 @@ var defaultTheme = (0, import_joy57.extendTheme)({
|
|
|
6369
7197
|
size: "sm"
|
|
6370
7198
|
}
|
|
6371
7199
|
},
|
|
7200
|
+
JoyRadioGroup: {
|
|
7201
|
+
defaultProps: {
|
|
7202
|
+
size: "sm"
|
|
7203
|
+
}
|
|
7204
|
+
},
|
|
6372
7205
|
JoySwitch: {
|
|
6373
7206
|
defaultProps: {
|
|
6374
7207
|
size: "sm"
|
|
@@ -6379,6 +7212,11 @@ var defaultTheme = (0, import_joy57.extendTheme)({
|
|
|
6379
7212
|
size: "sm"
|
|
6380
7213
|
}
|
|
6381
7214
|
},
|
|
7215
|
+
JoyAutocompleteListbox: {
|
|
7216
|
+
defaultProps: {
|
|
7217
|
+
size: "sm"
|
|
7218
|
+
}
|
|
7219
|
+
},
|
|
6382
7220
|
JoyTextarea: {
|
|
6383
7221
|
defaultProps: {
|
|
6384
7222
|
size: "sm"
|
|
@@ -6410,7 +7248,7 @@ var defaultTheme = (0, import_joy57.extendTheme)({
|
|
|
6410
7248
|
outline: `${theme.palette.primary[500]} solid 2px`,
|
|
6411
7249
|
outlineOffset: "-2px"
|
|
6412
7250
|
},
|
|
6413
|
-
[`& .${
|
|
7251
|
+
[`& .${import_joy66.checkboxClasses.root}`]: {
|
|
6414
7252
|
verticalAlign: "middle"
|
|
6415
7253
|
}
|
|
6416
7254
|
})
|
|
@@ -6455,11 +7293,16 @@ var defaultTheme = (0, import_joy57.extendTheme)({
|
|
|
6455
7293
|
fontWeight: "var(--ceed-fontWeight-xl, 700)"
|
|
6456
7294
|
}
|
|
6457
7295
|
}
|
|
7296
|
+
},
|
|
7297
|
+
JoyFormControl: {
|
|
7298
|
+
defaultProps: {
|
|
7299
|
+
size: "sm"
|
|
7300
|
+
}
|
|
6458
7301
|
}
|
|
6459
7302
|
}
|
|
6460
7303
|
});
|
|
6461
7304
|
function ThemeProvider(props) {
|
|
6462
7305
|
const theme = props.theme || defaultTheme;
|
|
6463
|
-
return /* @__PURE__ */
|
|
7306
|
+
return /* @__PURE__ */ import_react54.default.createElement(import_react54.default.Fragment, null, /* @__PURE__ */ import_react54.default.createElement(import_joy66.CssVarsProvider, { theme }, /* @__PURE__ */ import_react54.default.createElement(import_joy66.CssBaseline, null), props.children));
|
|
6464
7307
|
}
|
|
6465
7308
|
ThemeProvider.displayName = "ThemeProvider";
|