@ceed/ads 1.8.6 → 1.8.7

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.
Files changed (126) hide show
  1. package/dist/components/Accordions/Accordions.d.ts +1 -1
  2. package/dist/components/Accordions/index.d.ts +2 -2
  3. package/dist/components/Alert/Alert.d.ts +3 -3
  4. package/dist/components/Autocomplete/Autocomplete.d.ts +3 -3
  5. package/dist/components/Autocomplete/index.d.ts +2 -2
  6. package/dist/components/Avatar/Avatar.d.ts +2 -2
  7. package/dist/components/Box/Box.d.ts +1 -1
  8. package/dist/components/Box/index.d.ts +2 -2
  9. package/dist/components/Breadcrumbs/Breadcrumbs.d.ts +5 -5
  10. package/dist/components/Breadcrumbs/index.d.ts +2 -2
  11. package/dist/components/Button/Button.d.ts +3 -3
  12. package/dist/components/Button/index.d.ts +2 -2
  13. package/dist/components/Calendar/Calendar.d.ts +2 -2
  14. package/dist/components/Calendar/hooks/use-calendar-props.d.ts +2 -2
  15. package/dist/components/Calendar/hooks/use-calendar.d.ts +11 -11
  16. package/dist/components/Calendar/index.d.ts +2 -2
  17. package/dist/components/Calendar/types.d.ts +2 -2
  18. package/dist/components/Card/Card.d.ts +1 -1
  19. package/dist/components/Card/index.d.ts +2 -2
  20. package/dist/components/Checkbox/Checkbox.d.ts +3 -3
  21. package/dist/components/Checkbox/index.d.ts +2 -2
  22. package/dist/components/Container/Container.d.ts +1 -1
  23. package/dist/components/Container/index.d.ts +2 -2
  24. package/dist/components/CurrencyInput/CurrencyInput.d.ts +4 -4
  25. package/dist/components/DataTable/DataTable.d.ts +3 -3
  26. package/dist/components/DataTable/index.d.ts +3 -3
  27. package/dist/components/DataTable/types.d.ts +27 -20
  28. package/dist/components/DatePicker/DatePicker.d.ts +3 -3
  29. package/dist/components/DatePicker/index.d.ts +2 -2
  30. package/dist/components/DateRangePicker/DateRangePicker.d.ts +3 -3
  31. package/dist/components/DateRangePicker/index.d.ts +2 -2
  32. package/dist/components/DialogActions/DialogActions.d.ts +1 -1
  33. package/dist/components/DialogActions/index.d.ts +2 -2
  34. package/dist/components/DialogContent/DialogContent.d.ts +1 -1
  35. package/dist/components/DialogContent/index.d.ts +2 -2
  36. package/dist/components/DialogFrame/DialogFrame.d.ts +1 -1
  37. package/dist/components/DialogFrame/index.d.ts +2 -2
  38. package/dist/components/DialogTitle/DialogTitle.d.ts +1 -1
  39. package/dist/components/DialogTitle/index.d.ts +2 -2
  40. package/dist/components/Divider/Divider.d.ts +3 -3
  41. package/dist/components/Divider/index.d.ts +2 -2
  42. package/dist/components/Dropdown/Dropdown.d.ts +1 -1
  43. package/dist/components/Dropdown/index.d.ts +2 -2
  44. package/dist/components/FilterMenu/FilterMenu.d.ts +2 -2
  45. package/dist/components/FilterMenu/components/Autocomplete.d.ts +2 -2
  46. package/dist/components/FilterMenu/components/CheckboxGroup.d.ts +2 -2
  47. package/dist/components/FilterMenu/components/CurrencyInput.d.ts +2 -2
  48. package/dist/components/FilterMenu/components/CurrencyRange.d.ts +2 -2
  49. package/dist/components/FilterMenu/components/DateRange.d.ts +2 -2
  50. package/dist/components/FilterMenu/components/PercentageInput.d.ts +2 -2
  51. package/dist/components/FilterMenu/components/PercentageRange.d.ts +2 -2
  52. package/dist/components/FilterMenu/components/RadioGroup.d.ts +2 -2
  53. package/dist/components/FilterMenu/index.d.ts +2 -2
  54. package/dist/components/FilterMenu/types.d.ts +18 -18
  55. package/dist/components/FormControl/FormControl.d.ts +1 -1
  56. package/dist/components/FormControl/index.d.ts +2 -2
  57. package/dist/components/FormHelperText/FormHelperText.d.ts +1 -1
  58. package/dist/components/FormHelperText/index.d.ts +2 -2
  59. package/dist/components/FormLabel/FormLabel.d.ts +1 -1
  60. package/dist/components/FormLabel/index.d.ts +2 -2
  61. package/dist/components/Grid/Grid.d.ts +1 -1
  62. package/dist/components/Grid/index.d.ts +2 -2
  63. package/dist/components/IconButton/IconButton.d.ts +4 -4
  64. package/dist/components/IconButton/index.d.ts +2 -2
  65. package/dist/components/IconMenuButton/IconMenuButton.d.ts +6 -6
  66. package/dist/components/IconMenuButton/index.d.ts +2 -2
  67. package/dist/components/InfoSign/InfoSign.d.ts +4 -4
  68. package/dist/components/InfoSign/index.d.ts +2 -2
  69. package/dist/components/Input/Input.d.ts +2 -2
  70. package/dist/components/Input/index.d.ts +2 -2
  71. package/dist/components/InsetDrawer/index.d.ts +2 -2
  72. package/dist/components/Markdown/Markdown.d.ts +6 -6
  73. package/dist/components/Markdown/index.d.ts +2 -2
  74. package/dist/components/Menu/Menu.d.ts +3 -3
  75. package/dist/components/Menu/index.d.ts +2 -2
  76. package/dist/components/MenuButton/MenuButton.d.ts +8 -8
  77. package/dist/components/MenuButton/index.d.ts +2 -2
  78. package/dist/components/Modal/Modal.d.ts +1 -1
  79. package/dist/components/Modal/index.d.ts +2 -2
  80. package/dist/components/MonthPicker/MonthPicker.d.ts +3 -3
  81. package/dist/components/MonthPicker/index.d.ts +2 -2
  82. package/dist/components/MonthRangePicker/MonthRangePicker.d.ts +3 -3
  83. package/dist/components/MonthRangePicker/index.d.ts +2 -2
  84. package/dist/components/NavigationGroup/NavigationGroup.d.ts +3 -3
  85. package/dist/components/NavigationGroup/index.d.ts +2 -2
  86. package/dist/components/NavigationItem/NavigationItem.d.ts +3 -3
  87. package/dist/components/NavigationItem/index.d.ts +2 -2
  88. package/dist/components/Navigator/Navigator.d.ts +3 -3
  89. package/dist/components/Pagination/Pagination.d.ts +2 -2
  90. package/dist/components/Pagination/index.d.ts +2 -2
  91. package/dist/components/PercentageInput/PercentageInput.d.ts +4 -4
  92. package/dist/components/ProfileMenu/ProfileMenu.d.ts +5 -5
  93. package/dist/components/ProfileMenu/index.d.ts +2 -2
  94. package/dist/components/Radio/Radio.d.ts +1 -1
  95. package/dist/components/Radio/index.d.ts +2 -2
  96. package/dist/components/RadioList/RadioList.d.ts +2 -2
  97. package/dist/components/RadioList/index.d.ts +2 -2
  98. package/dist/components/Select/Select.d.ts +5 -5
  99. package/dist/components/Select/index.d.ts +2 -2
  100. package/dist/components/Sheet/Sheet.d.ts +1 -1
  101. package/dist/components/Sheet/index.d.ts +2 -2
  102. package/dist/components/Stack/Stack.d.ts +1 -1
  103. package/dist/components/Stack/index.d.ts +2 -2
  104. package/dist/components/Stepper/Stepper.d.ts +2 -2
  105. package/dist/components/Switch/Switch.d.ts +3 -3
  106. package/dist/components/Switch/index.d.ts +2 -2
  107. package/dist/components/Table/Table.d.ts +2 -2
  108. package/dist/components/Table/index.d.ts +2 -2
  109. package/dist/components/Tabs/Tabs.d.ts +1 -1
  110. package/dist/components/Tabs/index.d.ts +2 -2
  111. package/dist/components/Textarea/Textarea.d.ts +3 -3
  112. package/dist/components/Textarea/index.d.ts +2 -2
  113. package/dist/components/ThemeProvider/ThemeProvider.d.ts +18 -18
  114. package/dist/components/ThemeProvider/index.d.ts +2 -2
  115. package/dist/components/Tooltip/Tooltip.d.ts +3 -3
  116. package/dist/components/Tooltip/index.d.ts +2 -2
  117. package/dist/components/Typography/Typography.d.ts +3 -3
  118. package/dist/components/Typography/index.d.ts +2 -2
  119. package/dist/components/Uploader/Uploader.d.ts +1 -1
  120. package/dist/components/index.d.ts +60 -60
  121. package/dist/index.cjs +1207 -2062
  122. package/dist/index.d.ts +4 -4
  123. package/dist/index.js +1226 -2162
  124. package/dist/libs/rehype-accent/index.d.ts +2 -2
  125. package/framer/index.js +28 -28
  126. package/package.json +6 -1
package/dist/index.js CHANGED
@@ -222,16 +222,7 @@ var MotionAlert = styled(motion3(JoyAlert))({
222
222
  function Alert(props) {
223
223
  const { title, content, actions, color = "primary", ...innerProps } = props;
224
224
  const invertedColors = props.invertedColors || props.variant === "solid";
225
- return /* @__PURE__ */ React3.createElement(
226
- MotionAlert,
227
- {
228
- ...innerProps,
229
- color,
230
- endDecorator: actions,
231
- invertedColors
232
- },
233
- /* @__PURE__ */ React3.createElement(Stack_default, null, title && /* @__PURE__ */ React3.createElement(Typography_default, { level: "title-md", fontWeight: "bold", color }, title), /* @__PURE__ */ React3.createElement(Typography_default, { level: "body-sm", fontWeight: 500, color }, content))
234
- );
225
+ return /* @__PURE__ */ React3.createElement(MotionAlert, { ...innerProps, color, endDecorator: actions, invertedColors }, /* @__PURE__ */ React3.createElement(Stack_default, null, title && /* @__PURE__ */ React3.createElement(Typography_default, { level: "title-md", fontWeight: "bold", color }, title), /* @__PURE__ */ React3.createElement(Typography_default, { level: "body-sm", fontWeight: 500, color }, content)));
235
226
  }
236
227
  Alert.displayName = "Alert";
237
228
 
@@ -294,9 +285,7 @@ var Chip_default = Chip;
294
285
 
295
286
  // src/components/IconButton/IconButton.tsx
296
287
  import React4, { forwardRef } from "react";
297
- import {
298
- IconButton as JoyIconButton
299
- } from "@mui/joy";
288
+ import { IconButton as JoyIconButton } from "@mui/joy";
300
289
  import { motion as motion8 } from "framer-motion";
301
290
  var MotionIconButton = motion8(JoyIconButton);
302
291
  var IconButton = forwardRef(
@@ -313,9 +302,7 @@ var IconButton_default = IconButton;
313
302
  import { useState, useCallback, useEffect, useRef } from "react";
314
303
  function useControlledState(controlledValue, defaultValue, onChange) {
315
304
  const { current: isControlled } = useRef(controlledValue !== void 0);
316
- const [internalValue, setInternalValue] = useState(
317
- controlledValue ?? defaultValue
318
- );
305
+ const [internalValue, setInternalValue] = useState(controlledValue ?? defaultValue);
319
306
  const displayValue = isControlled ? controlledValue : internalValue;
320
307
  useEffect(() => {
321
308
  if (isControlled) {
@@ -381,51 +368,42 @@ var AutocompleteListBox = React5.forwardRef((props, ref) => {
381
368
  virtualizer.measure();
382
369
  }
383
370
  }, [open, virtualizer]);
384
- return /* @__PURE__ */ React5.createElement(
385
- AutocompletePopper,
371
+ return /* @__PURE__ */ React5.createElement(AutocompletePopper, { ref, anchorEl, open, modifiers }, /* @__PURE__ */ React5.createElement(JoyAutocompleteListbox, { ...innerProps }, /* @__PURE__ */ React5.createElement("div", { ref: parentRef, style: { overflow: "auto" } }, /* @__PURE__ */ React5.createElement(
372
+ "div",
386
373
  {
387
- ref,
388
- anchorEl,
389
- open,
390
- modifiers
374
+ style: {
375
+ height: `${virtualizer.getTotalSize()}px`,
376
+ position: "relative"
377
+ }
391
378
  },
392
- /* @__PURE__ */ React5.createElement(JoyAutocompleteListbox, { ...innerProps }, /* @__PURE__ */ React5.createElement("div", { ref: parentRef, style: { overflow: "auto" } }, /* @__PURE__ */ React5.createElement(
393
- "div",
394
- {
379
+ items.map(
380
+ ({ index, size, start, key }) => React5.cloneElement(renderTargets[index], {
381
+ key,
395
382
  style: {
396
- height: `${virtualizer.getTotalSize()}px`,
397
- position: "relative"
398
- }
399
- },
400
- items.map(
401
- ({ index, size, start, key }) => React5.cloneElement(renderTargets[index], {
402
- key,
403
- style: {
404
- position: "absolute",
405
- top: 0,
406
- left: 0,
407
- width: "100%",
408
- fontSize: `var(--ceed-fontSize-${fontSize})`,
409
- height: `${size}px`,
410
- transform: `translateY(${start}px)`,
411
- overflow: "visible"
383
+ position: "absolute",
384
+ top: 0,
385
+ left: 0,
386
+ width: "100%",
387
+ fontSize: `var(--ceed-fontSize-${fontSize})`,
388
+ height: `${size}px`,
389
+ transform: `translateY(${start}px)`,
390
+ overflow: "visible"
391
+ },
392
+ children: /* @__PURE__ */ React5.createElement(
393
+ "div",
394
+ {
395
+ style: {
396
+ textOverflow: "ellipsis",
397
+ textWrap: "nowrap",
398
+ overflow: "hidden",
399
+ width: "100%"
400
+ }
412
401
  },
413
- children: /* @__PURE__ */ React5.createElement(
414
- "div",
415
- {
416
- style: {
417
- textOverflow: "ellipsis",
418
- textWrap: "nowrap",
419
- overflow: "hidden",
420
- width: "100%"
421
- }
422
- },
423
- renderTargets[index].props.children
424
- )
425
- })
426
- )
427
- )))
428
- );
402
+ renderTargets[index].props.children
403
+ )
404
+ })
405
+ )
406
+ ))));
429
407
  });
430
408
  var AutocompleteDeleteSize = {
431
409
  sm: "20px",
@@ -495,15 +473,7 @@ function Autocomplete(props) {
495
473
  return {
496
474
  value: "",
497
475
  label: "",
498
- startDecorator: /* @__PURE__ */ React5.createElement(
499
- CircularProgress,
500
- {
501
- size: "sm",
502
- color: "neutral",
503
- variant: "plain",
504
- thickness: 3
505
- }
506
- )
476
+ startDecorator: /* @__PURE__ */ React5.createElement(CircularProgress, { size: "sm", color: "neutral", variant: "plain", thickness: 3 })
507
477
  };
508
478
  }
509
479
  if (Array.isArray(_value)) {
@@ -518,15 +488,11 @@ function Autocomplete(props) {
518
488
  [size, props.loading]
519
489
  );
520
490
  const startDecorator = useMemo(
521
- () => applySize(
522
- value?.startDecorator || props.startDecorator
523
- ),
491
+ () => applySize(value?.startDecorator || props.startDecorator),
524
492
  [value, applySize, props.startDecorator]
525
493
  );
526
494
  const endDecorator = useMemo(
527
- () => applySize(
528
- value?.endDecorator || props.endDecorator
529
- ),
495
+ () => applySize(value?.endDecorator || props.endDecorator),
530
496
  [value, applySize, props.endDecorator]
531
497
  );
532
498
  const handleChange = useCallback2(
@@ -564,16 +530,7 @@ function Autocomplete(props) {
564
530
  const { onClick, ...rest } = getTagProps({ index });
565
531
  return applySize(
566
532
  /* @__PURE__ */ React5.createElement(Chip_default, { color: "primary", ...rest }, /* @__PURE__ */ React5.createElement(Stack_default, { direction: "row", alignItems: "center", gap: 2, py: 0.5 }, tag.value, applySize(
567
- /* @__PURE__ */ React5.createElement(
568
- AutocompleteTagDelete,
569
- {
570
- color: "primary",
571
- variant: "soft",
572
- onClick,
573
- size
574
- },
575
- /* @__PURE__ */ React5.createElement(CloseIcon, null)
576
- )
533
+ /* @__PURE__ */ React5.createElement(AutocompleteTagDelete, { color: "primary", variant: "soft", onClick, size }, /* @__PURE__ */ React5.createElement(CloseIcon, null))
577
534
  )))
578
535
  );
579
536
  }),
@@ -623,12 +580,7 @@ var Autocomplete_default = Autocomplete;
623
580
 
624
581
  // src/components/Avatar/Avatar.tsx
625
582
  import React6, { forwardRef as forwardRef2, useMemo as useMemo2 } from "react";
626
- import {
627
- Avatar as JoyAvatar,
628
- AvatarGroup,
629
- styled as styled4,
630
- useThemeProps
631
- } from "@mui/joy";
583
+ import { Avatar as JoyAvatar, AvatarGroup, styled as styled4, useThemeProps } from "@mui/joy";
632
584
  var StyledAvatar = styled4(JoyAvatar, {
633
585
  name: "Avatar",
634
586
  slot: "Root",
@@ -684,10 +636,7 @@ import {
684
636
 
685
637
  // src/components/Menu/Menu.tsx
686
638
  import React7 from "react";
687
- import {
688
- Menu as JoyMenu,
689
- MenuItem as JoyMenuItem
690
- } from "@mui/joy";
639
+ import { Menu as JoyMenu, MenuItem as JoyMenuItem } from "@mui/joy";
691
640
  import { motion as motion10 } from "framer-motion";
692
641
  var MotionMenu = motion10(JoyMenu);
693
642
  var Menu = (props) => {
@@ -731,33 +680,13 @@ function Breadcrumbs(props) {
731
680
  }
732
681
  };
733
682
  if (!collapsed) {
734
- return /* @__PURE__ */ React8.createElement(
735
- JoyBreadcrumbs,
736
- {
737
- size,
738
- slots: restSlots,
739
- slotProps: restSlotProps,
740
- ...innerProps
741
- },
742
- crumbs.map((crumb, index) => /* @__PURE__ */ React8.createElement(Crumb, { key: `breadcrumb-${index}`, ...crumb }))
743
- );
683
+ return /* @__PURE__ */ React8.createElement(JoyBreadcrumbs, { size, slots: restSlots, slotProps: restSlotProps, ...innerProps }, crumbs.map((crumb, index) => /* @__PURE__ */ React8.createElement(Crumb, { key: `breadcrumb-${index}`, ...crumb })));
744
684
  }
745
685
  const _endCrumbCount = Math.max(1, endCrumbCount);
746
686
  const frontCrumbs = crumbs.slice(0, startCrumbCount).map((crumb) => /* @__PURE__ */ React8.createElement(Crumb, { key: `breadcrumb-${crumb.label}`, ...crumb }));
747
687
  const backCrumbs = (startCrumbCount + _endCrumbCount > crumbs.length ? crumbs.slice(startCrumbCount) : crumbs.slice(-_endCrumbCount)).map((crumb) => /* @__PURE__ */ React8.createElement(Crumb, { key: `breadcrumb-${crumb.label}`, ...crumb }));
748
688
  const collapsedCrumbs = crumbs.slice(startCrumbCount, -_endCrumbCount).map((crumb) => /* @__PURE__ */ React8.createElement(MenuItem, { key: `breadcrumb-${crumb.label}` }, /* @__PURE__ */ React8.createElement(Crumb, { ...crumb })));
749
- return /* @__PURE__ */ React8.createElement(
750
- JoyBreadcrumbs,
751
- {
752
- size,
753
- slots: restSlots,
754
- slotProps: restSlotProps,
755
- ...innerProps
756
- },
757
- frontCrumbs,
758
- collapsedCrumbs.length && /* @__PURE__ */ React8.createElement(Dropdown_default, null, /* @__PURE__ */ React8.createElement(JoyMenuButton, { size, variant: "plain" }, "..."), /* @__PURE__ */ React8.createElement(Menu_default, { size }, collapsedCrumbs)),
759
- backCrumbs
760
- );
689
+ return /* @__PURE__ */ React8.createElement(JoyBreadcrumbs, { size, slots: restSlots, slotProps: restSlotProps, ...innerProps }, frontCrumbs, collapsedCrumbs.length && /* @__PURE__ */ React8.createElement(Dropdown_default, null, /* @__PURE__ */ React8.createElement(JoyMenuButton, { size, variant: "plain" }, "..."), /* @__PURE__ */ React8.createElement(Menu_default, { size }, collapsedCrumbs)), backCrumbs);
761
690
  }
762
691
  Breadcrumbs.displayName = "Breadcrumbs";
763
692
 
@@ -767,13 +696,7 @@ import { Button as JoyButton } from "@mui/joy";
767
696
  import { motion as motion11 } from "framer-motion";
768
697
  var MotionButton = motion11(JoyButton);
769
698
  var Button = forwardRef3(({ ...props }, ref) => {
770
- return /* @__PURE__ */ React9.createElement(
771
- MotionButton,
772
- {
773
- ref,
774
- ...props
775
- }
776
- );
699
+ return /* @__PURE__ */ React9.createElement(MotionButton, { ref, ...props });
777
700
  });
778
701
  Button.displayName = "Button";
779
702
 
@@ -793,9 +716,7 @@ var getCalendarDates = (date) => {
793
716
  const firstDay = new Date(date.getFullYear(), date.getMonth(), 1);
794
717
  const lastDay = new Date(date.getFullYear(), date.getMonth() + 1, 0);
795
718
  const firstWeekInThisMonth = Math.ceil((firstDay.getDay() + 1) / 7);
796
- const lastWeekInThisMonth = Math.ceil(
797
- (lastDay.getDate() + firstDay.getDay()) / 7
798
- );
719
+ const lastWeekInThisMonth = Math.ceil((lastDay.getDate() + firstDay.getDay()) / 7);
799
720
  let day = 1;
800
721
  for (let i = 1; i <= lastWeekInThisMonth; i++) {
801
722
  const week = [];
@@ -870,7 +791,9 @@ var useCalendarProps = (inProps) => {
870
791
  const [uncontrolledView, setUncontrolledView] = useState2(
871
792
  () => resolveView(inProps.view || "day", inProps.views || ["day", "month"])
872
793
  );
873
- const [uncontrolledValue, setUncontrolledValue] = useState2(inProps.defaultValue);
794
+ const [uncontrolledValue, setUncontrolledValue] = useState2(
795
+ inProps.defaultValue
796
+ );
874
797
  const [viewMonth, setViewMonth] = useState2(() => {
875
798
  const today = /* @__PURE__ */ new Date();
876
799
  today.setDate(1);
@@ -943,10 +866,7 @@ var useCalendarProps = (inProps) => {
943
866
  },
944
867
  name: "Calendar"
945
868
  });
946
- const ownerState = useMemo3(
947
- () => ({ ...props, viewMonth, direction }),
948
- [props, viewMonth, direction]
949
- );
869
+ const ownerState = useMemo3(() => ({ ...props, viewMonth, direction }), [props, viewMonth, direction]);
950
870
  return [props, ownerState];
951
871
  };
952
872
 
@@ -964,11 +884,7 @@ var useCalendar = (ownerState) => {
964
884
  const currentMonth = currentDate.getMonth();
965
885
  const currentDay = currentDate.getDate();
966
886
  const prevMonth = new Date(currentYear, currentMonth - 1, 1);
967
- const lastDayOfPrevMonth = new Date(
968
- currentYear,
969
- currentMonth,
970
- 0
971
- ).getDate();
887
+ const lastDayOfPrevMonth = new Date(currentYear, currentMonth, 0).getDate();
972
888
  const prevMonthDay = Math.min(currentDay, lastDayOfPrevMonth);
973
889
  prevMonth.setDate(prevMonthDay);
974
890
  ownerState.onMonthChange?.(prevMonth);
@@ -985,11 +901,7 @@ var useCalendar = (ownerState) => {
985
901
  const currentMonth = currentDate.getMonth();
986
902
  const currentDay = currentDate.getDate();
987
903
  const nextMonth = new Date(currentYear, currentMonth + 1, 1);
988
- const lastDayOfNextMonth = new Date(
989
- currentYear,
990
- currentMonth + 2,
991
- 0
992
- ).getDate();
904
+ const lastDayOfNextMonth = new Date(currentYear, currentMonth + 2, 0).getDate();
993
905
  const nextMonthDay = Math.min(currentDay, lastDayOfNextMonth);
994
906
  nextMonth.setDate(nextMonthDay);
995
907
  ownerState.onMonthChange?.(nextMonth);
@@ -1006,22 +918,13 @@ var useCalendar = (ownerState) => {
1006
918
  thisDay.setDate(day);
1007
919
  const inRange = ownerState.rangeSelection && ownerState.value && ownerState.value[0] && // NOTE: hover day is not included in the range
1008
920
  (hoverDay && isWithinRange(ownerState.value[0], hoverDay, thisDay) || // NOTE: Selected range is included in the range
1009
- ownerState.value[1] && isWithinRange(
1010
- ownerState.value[0],
1011
- ownerState.value[1],
1012
- thisDay
1013
- ));
921
+ ownerState.value[1] && isWithinRange(ownerState.value[0], ownerState.value[1], thisDay));
1014
922
  return {
1015
923
  "aria-label": thisDay.toLocaleDateString(),
1016
924
  "aria-current": inRange ? "date" : void 0
1017
925
  };
1018
926
  },
1019
- [
1020
- ownerState.rangeSelection,
1021
- ownerState.value,
1022
- ownerState.viewMonth,
1023
- hoverDay
1024
- ]
927
+ [ownerState.rangeSelection, ownerState.value, ownerState.viewMonth, hoverDay]
1025
928
  ),
1026
929
  getMonthCellProps: useCallback4(
1027
930
  (monthIndex) => {
@@ -1032,22 +935,13 @@ var useCalendar = (ownerState) => {
1032
935
  const isMonthRangeSelection = !ownerState.views?.find((view) => view === "day") && ownerState.rangeSelection;
1033
936
  const inRange = isMonthRangeSelection && ownerState.value && ownerState.value[0] && // NOTE: hover day is not included in the range
1034
937
  (hoverMonth && isWithinRange(ownerState.value[0], hoverMonth, thisMonth) || // NOTE: Selected range is included in the range
1035
- ownerState.value[1] && isWithinRange(
1036
- ownerState.value[0],
1037
- ownerState.value[1],
1038
- thisMonth
1039
- ));
938
+ ownerState.value[1] && isWithinRange(ownerState.value[0], ownerState.value[1], thisMonth));
1040
939
  return {
1041
940
  "aria-label": thisMonth.toLocaleDateString(),
1042
941
  "aria-current": inRange ? "date" : void 0
1043
942
  };
1044
943
  },
1045
- [
1046
- ownerState.rangeSelection,
1047
- ownerState.value,
1048
- ownerState.viewMonth,
1049
- hoverMonth
1050
- ]
944
+ [ownerState.rangeSelection, ownerState.value, ownerState.viewMonth, hoverMonth]
1051
945
  ),
1052
946
  getPickerDayProps: useCallback4(
1053
947
  (day) => {
@@ -1057,23 +951,15 @@ var useCalendar = (ownerState) => {
1057
951
  const isSelected = !!ownerState.value && (isSameDay(thisDay, ownerState.value[0]) || ownerState.value[1] && isSameDay(thisDay, ownerState.value[1]));
1058
952
  const inRange = ownerState.rangeSelection && ownerState.value && ownerState.value[0] && // NOTE: hover day is not included in the range
1059
953
  (hoverDay && isWithinRange(ownerState.value[0], hoverDay, thisDay) || // NOTE: Selected range is included in the range
1060
- ownerState.value[1] && isWithinRange(
1061
- ownerState.value[0],
1062
- ownerState.value[1],
1063
- thisDay
1064
- ));
954
+ ownerState.value[1] && isWithinRange(ownerState.value[0], ownerState.value[1], thisDay));
1065
955
  const handleDayClick = () => {
1066
956
  if (ownerState.rangeSelection) {
1067
957
  if (!ownerState.value) {
1068
958
  ownerState.onChange?.([thisDay, void 0]);
1069
959
  } else if (ownerState.value[0] && !ownerState.value[1]) {
1070
960
  ownerState.onChange?.([
1071
- new Date(
1072
- Math.min(ownerState.value[0].getTime(), thisDay.getTime())
1073
- ),
1074
- new Date(
1075
- Math.max(ownerState.value[0].getTime(), thisDay.getTime())
1076
- )
961
+ new Date(Math.min(ownerState.value[0].getTime(), thisDay.getTime())),
962
+ new Date(Math.max(ownerState.value[0].getTime(), thisDay.getTime()))
1077
963
  ]);
1078
964
  } else {
1079
965
  ownerState.onChange?.([thisDay, void 0]);
@@ -1122,23 +1008,15 @@ var useCalendar = (ownerState) => {
1122
1008
  const isSelected = !!ownerState.value && (isSameMonth(thisMonth, ownerState.value[0]) || ownerState.value[1] && isSameMonth(thisMonth, ownerState.value[1]));
1123
1009
  const inRange = isMonthRangeSelection && ownerState.value && ownerState.value[0] && // NOTE: hover day is not included in the range
1124
1010
  (hoverMonth && isWithinRange(ownerState.value[0], hoverMonth, thisMonth) || // NOTE: Selected range is included in the range
1125
- ownerState.value[1] && isWithinRange(
1126
- ownerState.value[0],
1127
- ownerState.value[1],
1128
- thisMonth
1129
- ));
1011
+ ownerState.value[1] && isWithinRange(ownerState.value[0], ownerState.value[1], thisMonth));
1130
1012
  const handleMonthClick = () => {
1131
1013
  if (isMonthRangeSelection) {
1132
1014
  if (!ownerState.value) {
1133
1015
  ownerState.onChange?.([thisMonth, void 0]);
1134
1016
  } else if (ownerState.value[0] && !ownerState.value[1]) {
1135
1017
  ownerState.onChange?.([
1136
- new Date(
1137
- Math.min(ownerState.value[0].getTime(), thisMonth.getTime())
1138
- ),
1139
- new Date(
1140
- Math.max(ownerState.value[0].getTime(), thisMonth.getTime())
1141
- )
1018
+ new Date(Math.min(ownerState.value[0].getTime(), thisMonth.getTime())),
1019
+ new Date(Math.max(ownerState.value[0].getTime(), thisMonth.getTime()))
1142
1020
  ]);
1143
1021
  } else {
1144
1022
  ownerState.onChange?.([thisMonth, void 0]);
@@ -1208,15 +1086,13 @@ var CalendarViewContainer = styled5("div", {
1208
1086
  name: "Calendar",
1209
1087
  slot: "viewContainer",
1210
1088
  shouldForwardProp: (prop) => prop !== "calendarType"
1211
- })(
1212
- ({ theme, calendarType }) => ({
1213
- paddingLeft: theme.spacing(2),
1214
- paddingRight: theme.spacing(2),
1215
- position: "relative",
1216
- overflow: "hidden",
1217
- minHeight: calendarType === "datePicker" ? "250px" : "unset"
1218
- })
1219
- );
1089
+ })(({ theme, calendarType }) => ({
1090
+ paddingLeft: theme.spacing(2),
1091
+ paddingRight: theme.spacing(2),
1092
+ position: "relative",
1093
+ overflow: "hidden",
1094
+ minHeight: calendarType === "datePicker" ? "250px" : "unset"
1095
+ }));
1220
1096
  var CalendarViewTable = styled5(motion12.table, {
1221
1097
  name: "Calendar",
1222
1098
  slot: "viewTable"
@@ -1395,14 +1271,8 @@ var swipePower = (offset, velocity) => {
1395
1271
  var PickerDays = (props) => {
1396
1272
  const { ownerState } = props;
1397
1273
  const { getPickerDayProps, getDayCellProps } = useCalendar(ownerState);
1398
- const calendarDates = useMemo4(
1399
- () => getCalendarDates(ownerState.viewMonth),
1400
- [ownerState.viewMonth]
1401
- );
1402
- const weekdayNames = useMemo4(
1403
- () => getWeekdayNames(ownerState.locale || "default"),
1404
- [ownerState.locale]
1405
- );
1274
+ const calendarDates = useMemo4(() => getCalendarDates(ownerState.viewMonth), [ownerState.viewMonth]);
1275
+ const weekdayNames = useMemo4(() => getWeekdayNames(ownerState.locale || "default"), [ownerState.locale]);
1406
1276
  return /* @__PURE__ */ React11.createElement(CalendarViewContainer, { calendarType: "datePicker" }, /* @__PURE__ */ React11.createElement(AnimatePresence, { initial: false, custom: ownerState.direction }, /* @__PURE__ */ React11.createElement(
1407
1277
  CalendarViewTable,
1408
1278
  {
@@ -1432,25 +1302,9 @@ var PickerDays = (props) => {
1432
1302
  }
1433
1303
  }
1434
1304
  },
1435
- /* @__PURE__ */ React11.createElement(CalendarWeekHeaderContainer, null, /* @__PURE__ */ React11.createElement("tr", null, weekdayNames.map((name, i) => /* @__PURE__ */ React11.createElement(Fragment, { key: `${ownerState.viewMonth}_${name}_${i}` }, /* @__PURE__ */ React11.createElement("th", null, /* @__PURE__ */ React11.createElement(Typography_default, { level: "body-xs", textAlign: "center" }, name)), i < 6 && /* @__PURE__ */ React11.createElement(
1436
- "th",
1437
- {
1438
- style: { width: 4 },
1439
- "aria-hidden": "true",
1440
- "aria-description": "cell-gap"
1441
- }
1442
- ))))),
1305
+ /* @__PURE__ */ React11.createElement(CalendarWeekHeaderContainer, null, /* @__PURE__ */ React11.createElement("tr", null, weekdayNames.map((name, i) => /* @__PURE__ */ React11.createElement(Fragment, { key: `${ownerState.viewMonth}_${name}_${i}` }, /* @__PURE__ */ React11.createElement("th", null, /* @__PURE__ */ React11.createElement(Typography_default, { level: "body-xs", textAlign: "center" }, name)), i < 6 && /* @__PURE__ */ React11.createElement("th", { style: { width: 4 }, "aria-hidden": "true", "aria-description": "cell-gap" }))))),
1443
1306
  /* @__PURE__ */ React11.createElement(CalendarDayPickerContainer, null, calendarDates.map((weekDates, rowIndex) => /* @__PURE__ */ React11.createElement(Fragment, { key: `${ownerState.viewMonth}_${rowIndex}` }, /* @__PURE__ */ React11.createElement("tr", null, weekDates.map(
1444
- (date, i) => date ? /* @__PURE__ */ React11.createElement(Fragment, { key: `${ownerState.viewMonth}_${date}_${i}` }, /* @__PURE__ */ React11.createElement(CalendarDayCell, { ...getDayCellProps(date) }, /* @__PURE__ */ React11.createElement(
1445
- CalendarDay,
1446
- {
1447
- size: "sm",
1448
- variant: "plain",
1449
- color: "neutral",
1450
- ...getPickerDayProps(date)
1451
- },
1452
- date
1453
- )), i < 6 && /* @__PURE__ */ React11.createElement("td", { "aria-hidden": "true", "aria-description": "cell-gap" })) : /* @__PURE__ */ React11.createElement(Fragment, { key: `${ownerState.viewMonth}_${i}` }, /* @__PURE__ */ React11.createElement("td", null), i < 6 && /* @__PURE__ */ React11.createElement("td", { "aria-hidden": "true", "aria-description": "cell-gap" }))
1307
+ (date, i) => date ? /* @__PURE__ */ React11.createElement(Fragment, { key: `${ownerState.viewMonth}_${date}_${i}` }, /* @__PURE__ */ React11.createElement(CalendarDayCell, { ...getDayCellProps(date) }, /* @__PURE__ */ React11.createElement(CalendarDay, { size: "sm", variant: "plain", color: "neutral", ...getPickerDayProps(date) }, date)), i < 6 && /* @__PURE__ */ React11.createElement("td", { "aria-hidden": "true", "aria-description": "cell-gap" })) : /* @__PURE__ */ React11.createElement(Fragment, { key: `${ownerState.viewMonth}_${i}` }, /* @__PURE__ */ React11.createElement("td", null), i < 6 && /* @__PURE__ */ React11.createElement("td", { "aria-hidden": "true", "aria-description": "cell-gap" }))
1454
1308
  )), rowIndex < calendarDates.length - 1 && /* @__PURE__ */ React11.createElement("tr", { "aria-hidden": "true", "aria-description": "row-gap" }, /* @__PURE__ */ React11.createElement("td", { colSpan: 13, style: { height: 4 } })))))
1455
1309
  )));
1456
1310
  };
@@ -1468,62 +1322,37 @@ var PickerMonths = (props) => {
1468
1322
  [[]]
1469
1323
  );
1470
1324
  const isMonthPicker = !ownerState.views?.find((view) => view === "day");
1471
- return /* @__PURE__ */ React11.createElement(
1472
- CalendarViewContainer,
1325
+ return /* @__PURE__ */ React11.createElement(CalendarViewContainer, { calendarType: isMonthPicker ? "monthPicker" : "datePicker" }, /* @__PURE__ */ React11.createElement(AnimatePresence, { initial: false, custom: ownerState.direction }, /* @__PURE__ */ React11.createElement(
1326
+ CalendarViewTable,
1473
1327
  {
1474
- calendarType: isMonthPicker ? "monthPicker" : "datePicker"
1475
- },
1476
- /* @__PURE__ */ React11.createElement(AnimatePresence, { initial: false, custom: ownerState.direction }, /* @__PURE__ */ React11.createElement(
1477
- CalendarViewTable,
1478
- {
1479
- key: `${ownerState.viewMonth.getFullYear()}_${ownerState.direction}`,
1480
- custom: ownerState.direction,
1481
- variants,
1482
- initial: "enter",
1483
- animate: "center",
1484
- exit: "exit",
1485
- transition: {
1486
- x: { type: "spring", stiffness: 300, damping: 30 },
1487
- opacity: { duration: 0.2 }
1488
- },
1489
- drag: "x",
1490
- dragConstraints: { left: 0, right: 0 },
1491
- dragElastic: 1,
1492
- onDragEnd: (e, { offset, velocity }) => {
1493
- const swipe = swipePower(offset.x, velocity.x);
1494
- if (swipe < -swipeConfidenceThreshold) {
1495
- const date = new Date(ownerState.viewMonth || /* @__PURE__ */ new Date());
1496
- date.setMonth(date.getMonth() + 1);
1497
- ownerState.onMonthChange?.(date);
1498
- } else if (swipe > swipeConfidenceThreshold) {
1499
- const date = new Date(ownerState.viewMonth || /* @__PURE__ */ new Date());
1500
- date.setMonth(date.getMonth() - 1);
1501
- ownerState.onMonthChange?.(date);
1502
- }
1503
- }
1328
+ key: `${ownerState.viewMonth.getFullYear()}_${ownerState.direction}`,
1329
+ custom: ownerState.direction,
1330
+ variants,
1331
+ initial: "enter",
1332
+ animate: "center",
1333
+ exit: "exit",
1334
+ transition: {
1335
+ x: { type: "spring", stiffness: 300, damping: 30 },
1336
+ opacity: { duration: 0.2 }
1504
1337
  },
1505
- /* @__PURE__ */ React11.createElement("tbody", null, chunkedMonths.map((months, i) => /* @__PURE__ */ React11.createElement(Fragment, { key: months.join("_") }, /* @__PURE__ */ React11.createElement("tr", null, months.map((monthIndex, j) => /* @__PURE__ */ React11.createElement(Fragment, { key: monthIndex }, /* @__PURE__ */ React11.createElement(CalendarMonthCell, { ...getMonthCellProps(monthIndex) }, /* @__PURE__ */ React11.createElement(
1506
- CalendarMonth,
1507
- {
1508
- size: "sm",
1509
- variant: "plain",
1510
- color: "neutral",
1511
- ...getPickerMonthProps(monthIndex)
1512
- },
1513
- getMonthNameFromIndex(
1514
- monthIndex,
1515
- ownerState.locale
1516
- )
1517
- )), j < 3 && /* @__PURE__ */ React11.createElement(
1518
- "td",
1519
- {
1520
- style: { width: 4 },
1521
- "aria-hidden": "true",
1522
- "aria-description": "cell-gap"
1338
+ drag: "x",
1339
+ dragConstraints: { left: 0, right: 0 },
1340
+ dragElastic: 1,
1341
+ onDragEnd: (e, { offset, velocity }) => {
1342
+ const swipe = swipePower(offset.x, velocity.x);
1343
+ if (swipe < -swipeConfidenceThreshold) {
1344
+ const date = new Date(ownerState.viewMonth || /* @__PURE__ */ new Date());
1345
+ date.setMonth(date.getMonth() + 1);
1346
+ ownerState.onMonthChange?.(date);
1347
+ } else if (swipe > swipeConfidenceThreshold) {
1348
+ const date = new Date(ownerState.viewMonth || /* @__PURE__ */ new Date());
1349
+ date.setMonth(date.getMonth() - 1);
1350
+ ownerState.onMonthChange?.(date);
1523
1351
  }
1524
- )))), i < chunkedMonths.length - 1 && /* @__PURE__ */ React11.createElement("tr", { "aria-hidden": "true", "aria-description": "row-gap" }, /* @__PURE__ */ React11.createElement("td", { colSpan: 7, style: { height: 4 } })))))
1525
- ))
1526
- );
1352
+ }
1353
+ },
1354
+ /* @__PURE__ */ React11.createElement("tbody", null, chunkedMonths.map((months, i) => /* @__PURE__ */ React11.createElement(Fragment, { key: months.join("_") }, /* @__PURE__ */ React11.createElement("tr", null, months.map((monthIndex, j) => /* @__PURE__ */ React11.createElement(Fragment, { key: monthIndex }, /* @__PURE__ */ React11.createElement(CalendarMonthCell, { ...getMonthCellProps(monthIndex) }, /* @__PURE__ */ React11.createElement(CalendarMonth, { size: "sm", variant: "plain", color: "neutral", ...getPickerMonthProps(monthIndex) }, getMonthNameFromIndex(monthIndex, ownerState.locale))), j < 3 && /* @__PURE__ */ React11.createElement("td", { style: { width: 4 }, "aria-hidden": "true", "aria-description": "cell-gap" })))), i < chunkedMonths.length - 1 && /* @__PURE__ */ React11.createElement("tr", { "aria-hidden": "true", "aria-description": "row-gap" }, /* @__PURE__ */ React11.createElement("td", { colSpan: 7, style: { height: 4 } })))))
1355
+ )));
1527
1356
  };
1528
1357
  var Calendar = forwardRef4((inProps, ref) => {
1529
1358
  const [props, ownerState] = useCalendarProps(inProps);
@@ -1544,15 +1373,7 @@ var Calendar = forwardRef4((inProps, ref) => {
1544
1373
  ...others
1545
1374
  } = props;
1546
1375
  const { calendarTitle, onPrev, onNext } = useCalendar(ownerState);
1547
- return /* @__PURE__ */ React11.createElement(CalendarRoot, { ref, ...others }, /* @__PURE__ */ React11.createElement(CalendarHeader, null, /* @__PURE__ */ React11.createElement(
1548
- IconButton_default,
1549
- {
1550
- size: "sm",
1551
- onClick: onPrev,
1552
- "aria-label": `Previous ${view === "day" ? "Month" : "Year"}`
1553
- },
1554
- /* @__PURE__ */ React11.createElement(ChevronLeftIcon, null)
1555
- ), /* @__PURE__ */ React11.createElement(
1376
+ return /* @__PURE__ */ React11.createElement(CalendarRoot, { ref, ...others }, /* @__PURE__ */ React11.createElement(CalendarHeader, null, /* @__PURE__ */ React11.createElement(IconButton_default, { size: "sm", onClick: onPrev, "aria-label": `Previous ${view === "day" ? "Month" : "Year"}` }, /* @__PURE__ */ React11.createElement(ChevronLeftIcon, null)), /* @__PURE__ */ React11.createElement(
1556
1377
  CalendarSwitchViewButton,
1557
1378
  {
1558
1379
  ownerState,
@@ -1562,15 +1383,7 @@ var Calendar = forwardRef4((inProps, ref) => {
1562
1383
  "aria-label": "Switch Calendar View"
1563
1384
  },
1564
1385
  calendarTitle
1565
- ), /* @__PURE__ */ React11.createElement(
1566
- IconButton_default,
1567
- {
1568
- size: "sm",
1569
- onClick: onNext,
1570
- "aria-label": `Next ${view === "day" ? "Month" : "Year"}`
1571
- },
1572
- /* @__PURE__ */ React11.createElement(ChevronRightIcon, null)
1573
- )), view === "day" && /* @__PURE__ */ React11.createElement(PickerDays, { ownerState }), view === "month" && /* @__PURE__ */ React11.createElement(PickerMonths, { ownerState }));
1386
+ ), /* @__PURE__ */ React11.createElement(IconButton_default, { size: "sm", onClick: onNext, "aria-label": `Next ${view === "day" ? "Month" : "Year"}` }, /* @__PURE__ */ React11.createElement(ChevronRightIcon, null))), view === "day" && /* @__PURE__ */ React11.createElement(PickerDays, { ownerState }), view === "month" && /* @__PURE__ */ React11.createElement(PickerMonths, { ownerState }));
1574
1387
  });
1575
1388
  Calendar.displayName = "Calendar";
1576
1389
 
@@ -1714,23 +1527,15 @@ var Input = React14.forwardRef((props, ref) => {
1714
1527
  ...innerProps.slotProps
1715
1528
  },
1716
1529
  ...innerProps,
1717
- endDecorator: enableClearable ? /* @__PURE__ */ React14.createElement(
1718
- Stack_default,
1530
+ endDecorator: enableClearable ? /* @__PURE__ */ React14.createElement(Stack_default, { gap: 1, direction: "row" }, innerProps.endDecorator, value && /* @__PURE__ */ React14.createElement(
1531
+ IconButton_default,
1719
1532
  {
1720
- gap: 1,
1721
- direction: "row"
1533
+ onMouseDown: (e) => e.preventDefault(),
1534
+ onClick: handleClear,
1535
+ "aria-label": "Clear"
1722
1536
  },
1723
- innerProps.endDecorator,
1724
- value && /* @__PURE__ */ React14.createElement(
1725
- IconButton_default,
1726
- {
1727
- onMouseDown: (e) => e.preventDefault(),
1728
- onClick: handleClear,
1729
- "aria-label": "Clear"
1730
- },
1731
- /* @__PURE__ */ React14.createElement(ClearIcon, null)
1732
- )
1733
- ) : innerProps.endDecorator
1537
+ /* @__PURE__ */ React14.createElement(ClearIcon, null)
1538
+ )) : innerProps.endDecorator
1734
1539
  }
1735
1540
  );
1736
1541
  return /* @__PURE__ */ React14.createElement(
@@ -1918,25 +1723,23 @@ var useCurrencySetting = (props) => {
1918
1723
  };
1919
1724
 
1920
1725
  // src/components/CurrencyInput/CurrencyInput.tsx
1921
- var TextMaskAdapter = React15.forwardRef(
1922
- function TextMaskAdapter2(props, ref) {
1923
- const { onChange, ...innerProps } = props;
1924
- return /* @__PURE__ */ React15.createElement(
1925
- NumericFormat,
1926
- {
1927
- ...innerProps,
1928
- onValueChange: ({ value }) => {
1929
- onChange?.({
1930
- target: { name: props.name, value }
1931
- });
1932
- },
1933
- valueIsNumericString: true,
1934
- getInputRef: ref,
1935
- allowNegative: true
1936
- }
1937
- );
1938
- }
1939
- );
1726
+ var TextMaskAdapter = React15.forwardRef(function TextMaskAdapter2(props, ref) {
1727
+ const { onChange, ...innerProps } = props;
1728
+ return /* @__PURE__ */ React15.createElement(
1729
+ NumericFormat,
1730
+ {
1731
+ ...innerProps,
1732
+ onValueChange: ({ value }) => {
1733
+ onChange?.({
1734
+ target: { name: props.name, value }
1735
+ });
1736
+ },
1737
+ valueIsNumericString: true,
1738
+ getInputRef: ref,
1739
+ allowNegative: true
1740
+ }
1741
+ );
1742
+ });
1940
1743
  var CurrencyInputRoot = styled7(Input_default, {
1941
1744
  name: "CurrencyInput",
1942
1745
  slot: "root",
@@ -1959,21 +1762,11 @@ var CurrencyInput = React15.forwardRef(function CurrencyInput2(inProps, ref) {
1959
1762
  className,
1960
1763
  ...innerProps
1961
1764
  } = props;
1962
- const {
1963
- symbol,
1964
- thousandSeparator,
1965
- decimalSeparator,
1966
- placeholder,
1967
- fixedDecimalScale,
1968
- decimalScale
1969
- } = useCurrencySetting(props);
1765
+ const { symbol, thousandSeparator, decimalSeparator, placeholder, fixedDecimalScale, decimalScale } = useCurrencySetting(props);
1970
1766
  const [_value, setValue] = useControlledState(
1971
1767
  props.value,
1972
1768
  props.defaultValue,
1973
- useCallback6(
1974
- (value2) => onChange?.({ target: { name, value: value2 } }),
1975
- [onChange, name]
1976
- )
1769
+ useCallback6((value2) => onChange?.({ target: { name, value: value2 } }), [onChange, name])
1977
1770
  );
1978
1771
  const value = useMemo5(() => {
1979
1772
  if (_value && useMinorUnit) {
@@ -1987,9 +1780,7 @@ var CurrencyInput = React15.forwardRef(function CurrencyInput2(inProps, ref) {
1987
1780
  }
1988
1781
  return props.max;
1989
1782
  }, [props.max, useMinorUnit, decimalScale]);
1990
- const [isOverLimit, setIsOverLimit] = useState4(
1991
- !!max && !!value && value > max
1992
- );
1783
+ const [isOverLimit, setIsOverLimit] = useState4(!!max && !!value && value > max);
1993
1784
  const handleChange = useCallback6(
1994
1785
  (event) => {
1995
1786
  if (event.target.value === "") {
@@ -2019,9 +1810,9 @@ var CurrencyInput = React15.forwardRef(function CurrencyInput2(inProps, ref) {
2019
1810
  required,
2020
1811
  color: error || isOverLimit ? "danger" : props.color,
2021
1812
  label,
2022
- helperText: isOverLimit ? new IntlMessageFormat2(
2023
- `limit: {amount, number, ::currency/${currency} unit-width-narrow}`
2024
- ).format({ amount: max }) : helperText,
1813
+ helperText: isOverLimit ? new IntlMessageFormat2(`limit: {amount, number, ::currency/${currency} unit-width-narrow}`).format({
1814
+ amount: max
1815
+ }) : helperText,
2025
1816
  slotProps: {
2026
1817
  input: {
2027
1818
  component: TextMaskAdapter,
@@ -2059,14 +1850,7 @@ import React23, {
2059
1850
  useLayoutEffect
2060
1851
  } from "react";
2061
1852
  import { useVirtualizer as useVirtualizer2 } from "@tanstack/react-virtual";
2062
- import {
2063
- styled as styled12,
2064
- LinearProgress,
2065
- Link,
2066
- useTheme,
2067
- buttonClasses,
2068
- iconButtonClasses
2069
- } from "@mui/joy";
1853
+ import { styled as styled12, LinearProgress, Link, useTheme, buttonClasses, iconButtonClasses } from "@mui/joy";
2070
1854
  import SortIcon from "@mui/icons-material/ArrowUpwardRounded";
2071
1855
 
2072
1856
  // src/components/Sheet/Sheet.tsx
@@ -2136,13 +1920,7 @@ function TableBody(props) {
2136
1920
  textAlign: "center"
2137
1921
  }
2138
1922
  },
2139
- /* @__PURE__ */ React16.createElement(
2140
- RenderCheckbox,
2141
- {
2142
- onChange: (event) => onCheckboxChange?.(event, rowIndex),
2143
- ...checkboxProps
2144
- }
2145
- )
1923
+ /* @__PURE__ */ React16.createElement(RenderCheckbox, { onChange: (event) => onCheckboxChange?.(event, rowIndex), ...checkboxProps })
2146
1924
  ), cellOrder.map((cellKey) => /* @__PURE__ */ React16.createElement(
2147
1925
  "td",
2148
1926
  {
@@ -2157,14 +1935,7 @@ function TableBody(props) {
2157
1935
  TableBody.displayName = "TableBody";
2158
1936
 
2159
1937
  // src/components/DatePicker/DatePicker.tsx
2160
- import React17, {
2161
- forwardRef as forwardRef6,
2162
- useCallback as useCallback7,
2163
- useEffect as useEffect3,
2164
- useImperativeHandle,
2165
- useRef as useRef3,
2166
- useState as useState5
2167
- } from "react";
1938
+ import React17, { forwardRef as forwardRef6, useCallback as useCallback7, useEffect as useEffect3, useImperativeHandle, useRef as useRef3, useState as useState5 } from "react";
2168
1939
  import { IMaskInput, IMask } from "react-imask";
2169
1940
  import CalendarTodayIcon from "@mui/icons-material/CalendarToday";
2170
1941
  import { styled as styled9, useThemeProps as useThemeProps4 } from "@mui/joy";
@@ -2194,9 +1965,7 @@ var CalendarButton = styled9(IconButton_default, {
2194
1965
  "&:focus": {
2195
1966
  "--Icon-color": "currentColor",
2196
1967
  outlineOffset: `${theme.getCssVar("focus-thickness")}`,
2197
- outline: `${theme.getCssVar("focus-thickness")} solid ${theme.getCssVar(
2198
- "palette-focusVisible"
2199
- )}`
1968
+ outline: `${theme.getCssVar("focus-thickness")} solid ${theme.getCssVar("palette-focusVisible")}`
2200
1969
  }
2201
1970
  }));
2202
1971
  var StyledPopper = styled9(Popper2, {
@@ -2230,9 +1999,7 @@ var validValueFormat = (value, format) => {
2230
1999
  if (value !== formatValueString(parsedValue, format)) {
2231
2000
  return false;
2232
2001
  }
2233
- const regex = new RegExp(
2234
- `^${format.replace(/Y/g, "\\d").replace(/M/g, "\\d").replace(/D/g, "\\d")}$`
2235
- );
2002
+ const regex = new RegExp(`^${format.replace(/Y/g, "\\d").replace(/M/g, "\\d").replace(/D/g, "\\d")}$`);
2236
2003
  return regex.test(value);
2237
2004
  } catch (e) {
2238
2005
  return false;
@@ -2273,276 +2040,259 @@ function parseDate(dateString, format) {
2273
2040
  var formatToPattern = (format) => {
2274
2041
  return format.replace(/YYYY/g, "Y").replace(/MM/g, "M").replace(/DD/g, "D").replace(/[^YMD\s]/g, (match) => `${match}\``);
2275
2042
  };
2276
- var TextMaskAdapter3 = React17.forwardRef(
2277
- function TextMaskAdapter4(props, ref) {
2278
- const { onChange, format, ...other } = props;
2279
- return /* @__PURE__ */ React17.createElement(
2280
- IMaskInput,
2281
- {
2282
- ...other,
2283
- inputRef: ref,
2284
- onAccept: (value) => onChange({ target: { name: props.name, value } }),
2285
- mask: Date,
2286
- pattern: formatToPattern(format),
2287
- blocks: {
2288
- D: {
2289
- mask: IMask.MaskedRange,
2290
- from: 1,
2291
- to: 31,
2292
- maxLength: 2
2293
- },
2294
- M: {
2295
- mask: IMask.MaskedRange,
2296
- from: 1,
2297
- to: 12,
2298
- maxLength: 2
2299
- },
2300
- Y: {
2301
- mask: IMask.MaskedRange,
2302
- from: 1900,
2303
- to: 9999,
2304
- maxLength: 4
2305
- }
2043
+ var TextMaskAdapter3 = React17.forwardRef(function TextMaskAdapter4(props, ref) {
2044
+ const { onChange, format, ...other } = props;
2045
+ return /* @__PURE__ */ React17.createElement(
2046
+ IMaskInput,
2047
+ {
2048
+ ...other,
2049
+ inputRef: ref,
2050
+ onAccept: (value) => onChange({ target: { name: props.name, value } }),
2051
+ mask: Date,
2052
+ pattern: formatToPattern(format),
2053
+ blocks: {
2054
+ D: {
2055
+ mask: IMask.MaskedRange,
2056
+ from: 1,
2057
+ to: 31,
2058
+ maxLength: 2
2059
+ },
2060
+ M: {
2061
+ mask: IMask.MaskedRange,
2062
+ from: 1,
2063
+ to: 12,
2064
+ maxLength: 2
2306
2065
  },
2307
- format: (date) => formatValueString(date, format),
2308
- parse: (str) => parseDate(str, format),
2309
- autofix: "pad",
2310
- overwrite: true
2066
+ Y: {
2067
+ mask: IMask.MaskedRange,
2068
+ from: 1900,
2069
+ to: 9999,
2070
+ maxLength: 4
2071
+ }
2072
+ },
2073
+ format: (date) => formatValueString(date, format),
2074
+ parse: (str) => parseDate(str, format),
2075
+ autofix: "pad",
2076
+ overwrite: true
2077
+ }
2078
+ );
2079
+ });
2080
+ var DatePicker = forwardRef6((inProps, ref) => {
2081
+ const props = useThemeProps4({ props: inProps, name: "DatePicker" });
2082
+ const {
2083
+ onChange,
2084
+ disabled,
2085
+ label,
2086
+ error,
2087
+ helperText,
2088
+ minDate,
2089
+ maxDate,
2090
+ disableFuture,
2091
+ disablePast,
2092
+ required,
2093
+ // NOTE: 스타일 관련된 props는 최상위 엘리먼트에 적용한다.
2094
+ sx,
2095
+ className,
2096
+ format = "YYYY/MM/DD",
2097
+ displayFormat = "YYYY/MM/DD",
2098
+ size,
2099
+ inputReadOnly,
2100
+ hideClearButton,
2101
+ readOnly,
2102
+ shouldDisableDate,
2103
+ ...innerProps
2104
+ } = props;
2105
+ const innerRef = useRef3(null);
2106
+ const buttonRef = useRef3(null);
2107
+ const [value, setValue] = useControlledState(
2108
+ props.value,
2109
+ props.defaultValue || "",
2110
+ useCallback7((value2) => onChange?.({ target: { name: props.name, value: value2 } }), [props.name, onChange])
2111
+ );
2112
+ const [displayValue, setDisplayValue] = useState5(
2113
+ () => value ? formatValueString(parseDate(value, format), displayFormat) : ""
2114
+ );
2115
+ const [anchorEl, setAnchorEl] = useState5(null);
2116
+ const open = Boolean(anchorEl);
2117
+ useEffect3(() => {
2118
+ if (!anchorEl) {
2119
+ innerRef.current?.blur();
2120
+ }
2121
+ }, [anchorEl, innerRef]);
2122
+ useEffect3(() => {
2123
+ if (value === "") {
2124
+ setDisplayValue("");
2125
+ return;
2126
+ }
2127
+ const formattedValue = formatValueString(parseDate(value, format), displayFormat);
2128
+ if (validValueFormat(formattedValue, displayFormat) && formattedValue !== displayValue) {
2129
+ setDisplayValue(formattedValue);
2130
+ }
2131
+ }, [displayFormat, displayValue, format, value]);
2132
+ useImperativeHandle(ref, () => innerRef.current, [innerRef]);
2133
+ const handleChange = useCallback7(
2134
+ (event) => {
2135
+ const value2 = event.target.value;
2136
+ setDisplayValue(value2 ? formatValueString(parseDate(value2, format), displayFormat) : value2);
2137
+ setValue(value2);
2138
+ },
2139
+ [displayFormat, format, setValue]
2140
+ );
2141
+ const handleDisplayInputChange = useCallback7(
2142
+ (event) => {
2143
+ if (event.target.value === "") {
2144
+ handleChange({
2145
+ target: {
2146
+ name: props.name,
2147
+ value: ""
2148
+ }
2149
+ });
2150
+ return;
2311
2151
  }
2312
- );
2313
- }
2314
- );
2315
- var DatePicker = forwardRef6(
2316
- (inProps, ref) => {
2317
- const props = useThemeProps4({ props: inProps, name: "DatePicker" });
2318
- const {
2319
- onChange,
2152
+ const isValidDisplayValue = validValueFormat(event.target.value, displayFormat);
2153
+ if (isValidDisplayValue) {
2154
+ const parsedDate = parseDate(event.target.value, displayFormat);
2155
+ const formattedValue = formatValueString(parsedDate, format);
2156
+ handleChange({
2157
+ target: {
2158
+ name: props.name,
2159
+ value: formattedValue
2160
+ }
2161
+ });
2162
+ }
2163
+ },
2164
+ [displayFormat, format, handleChange, props.name]
2165
+ );
2166
+ const handleCalendarToggle = useCallback7(
2167
+ (event) => {
2168
+ setAnchorEl(anchorEl ? null : event.currentTarget);
2169
+ setTimeout(() => {
2170
+ innerRef.current?.focus();
2171
+ }, 0);
2172
+ },
2173
+ [anchorEl, setAnchorEl, innerRef]
2174
+ );
2175
+ const handleInputMouseDown = useCallback7(
2176
+ (event) => {
2177
+ if (inputReadOnly) {
2178
+ event.preventDefault();
2179
+ buttonRef.current?.focus();
2180
+ }
2181
+ },
2182
+ [inputReadOnly, buttonRef]
2183
+ );
2184
+ return /* @__PURE__ */ React17.createElement(DatePickerRoot, null, /* @__PURE__ */ React17.createElement(FocusTrap, { open: true }, /* @__PURE__ */ React17.createElement(React17.Fragment, null, /* @__PURE__ */ React17.createElement(
2185
+ Input_default,
2186
+ {
2187
+ ...innerProps,
2188
+ color: error ? "danger" : innerProps.color,
2189
+ ref: innerRef,
2190
+ size,
2191
+ value: displayValue,
2192
+ onChange: handleDisplayInputChange,
2193
+ placeholder: displayFormat,
2320
2194
  disabled,
2321
- label,
2322
- error,
2323
- helperText,
2324
- minDate,
2325
- maxDate,
2326
- disableFuture,
2327
- disablePast,
2328
2195
  required,
2329
- // NOTE: 스타일 관련된 props는 최상위 엘리먼트에 적용한다.
2330
- sx,
2196
+ error,
2197
+ slotProps: {
2198
+ input: {
2199
+ component: TextMaskAdapter3,
2200
+ ref: innerRef,
2201
+ format: displayFormat,
2202
+ sx: {
2203
+ "&:hover": {
2204
+ cursor: inputReadOnly || readOnly ? "default" : "text"
2205
+ }
2206
+ },
2207
+ onMouseDown: handleInputMouseDown
2208
+ }
2209
+ },
2331
2210
  className,
2332
- format = "YYYY/MM/DD",
2333
- displayFormat = "YYYY/MM/DD",
2334
- size,
2335
- inputReadOnly,
2336
- hideClearButton,
2337
- readOnly,
2338
- shouldDisableDate,
2339
- ...innerProps
2340
- } = props;
2341
- const innerRef = useRef3(null);
2342
- const buttonRef = useRef3(null);
2343
- const [value, setValue] = useControlledState(
2344
- props.value,
2345
- props.defaultValue || "",
2346
- useCallback7(
2347
- (value2) => onChange?.({ target: { name: props.name, value: value2 } }),
2348
- [props.name, onChange]
2349
- )
2350
- );
2351
- const [displayValue, setDisplayValue] = useState5(
2352
- () => value ? formatValueString(parseDate(value, format), displayFormat) : ""
2353
- );
2354
- const [anchorEl, setAnchorEl] = useState5(null);
2355
- const open = Boolean(anchorEl);
2356
- useEffect3(() => {
2357
- if (!anchorEl) {
2358
- innerRef.current?.blur();
2359
- }
2360
- }, [anchorEl, innerRef]);
2361
- useEffect3(() => {
2362
- if (value === "") {
2363
- setDisplayValue("");
2364
- return;
2365
- }
2366
- const formattedValue = formatValueString(
2367
- parseDate(value, format),
2368
- displayFormat
2369
- );
2370
- if (validValueFormat(formattedValue, displayFormat) && formattedValue !== displayValue) {
2371
- setDisplayValue(formattedValue);
2372
- }
2373
- }, [displayFormat, displayValue, format, value]);
2374
- useImperativeHandle(ref, () => innerRef.current, [
2375
- innerRef
2376
- ]);
2377
- const handleChange = useCallback7(
2378
- (event) => {
2379
- const value2 = event.target.value;
2380
- setDisplayValue(
2381
- value2 ? formatValueString(parseDate(value2, format), displayFormat) : value2
2382
- );
2383
- setValue(value2);
2384
- },
2385
- [displayFormat, format, setValue]
2386
- );
2387
- const handleDisplayInputChange = useCallback7(
2388
- (event) => {
2389
- if (event.target.value === "") {
2390
- handleChange({
2391
- target: {
2392
- name: props.name,
2393
- value: ""
2394
- }
2395
- });
2396
- return;
2211
+ sx,
2212
+ endDecorator: /* @__PURE__ */ React17.createElement(
2213
+ CalendarButton,
2214
+ {
2215
+ ref: buttonRef,
2216
+ variant: "plain",
2217
+ onClick: readOnly ? void 0 : handleCalendarToggle,
2218
+ "aria-label": "Toggle Calendar",
2219
+ "aria-controls": "date-picker-popper",
2220
+ "aria-haspopup": "dialog",
2221
+ "aria-expanded": open,
2222
+ disabled
2223
+ },
2224
+ /* @__PURE__ */ React17.createElement(CalendarTodayIcon, null)
2225
+ ),
2226
+ label,
2227
+ helperText,
2228
+ readOnly: readOnly || inputReadOnly
2229
+ }
2230
+ ), open && /* @__PURE__ */ React17.createElement(ClickAwayListener, { onClickAway: () => setAnchorEl(null) }, /* @__PURE__ */ React17.createElement(
2231
+ StyledPopper,
2232
+ {
2233
+ id: "date-picker-popper",
2234
+ open: true,
2235
+ anchorEl,
2236
+ placement: "bottom-end",
2237
+ onMouseDown: (e) => e.preventDefault(),
2238
+ modifiers: [
2239
+ {
2240
+ name: "offset",
2241
+ options: {
2242
+ offset: [4, 4]
2243
+ }
2397
2244
  }
2398
- const isValidDisplayValue = validValueFormat(
2399
- event.target.value,
2400
- displayFormat
2401
- );
2402
- if (isValidDisplayValue) {
2403
- const parsedDate = parseDate(event.target.value, displayFormat);
2404
- const formattedValue = formatValueString(parsedDate, format);
2245
+ ],
2246
+ "aria-label": "Calendar Tooltip",
2247
+ "aria-expanded": open
2248
+ },
2249
+ /* @__PURE__ */ React17.createElement(CalendarSheet, { tabIndex: -1, role: "presentation" }, /* @__PURE__ */ React17.createElement(
2250
+ Calendar_default,
2251
+ {
2252
+ value: value && !Number.isNaN(parseDate(value, format).getTime()) ? [parseDate(value, format), void 0] : void 0,
2253
+ onChange: ([date]) => {
2405
2254
  handleChange({
2406
2255
  target: {
2407
2256
  name: props.name,
2408
- value: formattedValue
2257
+ value: formatValueString(date, format)
2409
2258
  }
2410
2259
  });
2411
- }
2412
- },
2413
- [displayFormat, format, handleChange, props.name]
2414
- );
2415
- const handleCalendarToggle = useCallback7(
2416
- (event) => {
2417
- setAnchorEl(anchorEl ? null : event.currentTarget);
2418
- setTimeout(() => {
2419
- innerRef.current?.focus();
2420
- }, 0);
2421
- },
2422
- [anchorEl, setAnchorEl, innerRef]
2423
- );
2424
- const handleInputMouseDown = useCallback7(
2425
- (event) => {
2426
- if (inputReadOnly) {
2427
- event.preventDefault();
2428
- buttonRef.current?.focus();
2429
- }
2430
- },
2431
- [inputReadOnly, buttonRef]
2432
- );
2433
- return /* @__PURE__ */ React17.createElement(DatePickerRoot, null, /* @__PURE__ */ React17.createElement(FocusTrap, { open: true }, /* @__PURE__ */ React17.createElement(React17.Fragment, null, /* @__PURE__ */ React17.createElement(
2434
- Input_default,
2435
- {
2436
- ...innerProps,
2437
- color: error ? "danger" : innerProps.color,
2438
- ref: innerRef,
2439
- size,
2440
- value: displayValue,
2441
- onChange: handleDisplayInputChange,
2442
- placeholder: displayFormat,
2443
- disabled,
2444
- required,
2445
- error,
2446
- slotProps: {
2447
- input: {
2448
- component: TextMaskAdapter3,
2449
- ref: innerRef,
2450
- format: displayFormat,
2451
- sx: {
2452
- "&:hover": {
2453
- cursor: inputReadOnly || readOnly ? "default" : "text"
2454
- }
2455
- },
2456
- onMouseDown: handleInputMouseDown
2457
- }
2260
+ setAnchorEl(null);
2458
2261
  },
2459
- className,
2460
- sx,
2461
- endDecorator: /* @__PURE__ */ React17.createElement(
2462
- CalendarButton,
2463
- {
2464
- ref: buttonRef,
2465
- variant: "plain",
2466
- onClick: readOnly ? void 0 : handleCalendarToggle,
2467
- "aria-label": "Toggle Calendar",
2468
- "aria-controls": "date-picker-popper",
2469
- "aria-haspopup": "dialog",
2470
- "aria-expanded": open,
2471
- disabled
2472
- },
2473
- /* @__PURE__ */ React17.createElement(CalendarTodayIcon, null)
2474
- ),
2475
- label,
2476
- helperText,
2477
- readOnly: readOnly || inputReadOnly
2262
+ minDate: minDate ? new Date(minDate) : void 0,
2263
+ maxDate: maxDate ? new Date(maxDate) : void 0,
2264
+ disableFuture,
2265
+ disablePast,
2266
+ shouldDisableDate: shouldDisableDate ? (date) => shouldDisableDate(formatValueString(date, format)) : void 0
2478
2267
  }
2479
- ), open && /* @__PURE__ */ React17.createElement(ClickAwayListener, { onClickAway: () => setAnchorEl(null) }, /* @__PURE__ */ React17.createElement(
2480
- StyledPopper,
2268
+ ), !hideClearButton && /* @__PURE__ */ React17.createElement(
2269
+ DialogActions_default,
2481
2270
  {
2482
- id: "date-picker-popper",
2483
- open: true,
2484
- anchorEl,
2485
- placement: "bottom-end",
2486
- onMouseDown: (e) => e.preventDefault(),
2487
- modifiers: [
2488
- {
2489
- name: "offset",
2490
- options: {
2491
- offset: [4, 4]
2492
- }
2493
- }
2494
- ],
2495
- "aria-label": "Calendar Tooltip",
2496
- "aria-expanded": open
2271
+ sx: {
2272
+ p: 1
2273
+ }
2497
2274
  },
2498
- /* @__PURE__ */ React17.createElement(CalendarSheet, { tabIndex: -1, role: "presentation" }, /* @__PURE__ */ React17.createElement(
2499
- Calendar_default,
2275
+ /* @__PURE__ */ React17.createElement(
2276
+ Button_default,
2500
2277
  {
2501
- value: value && !Number.isNaN(parseDate(value, format).getTime()) ? [parseDate(value, format), void 0] : void 0,
2502
- onChange: ([date]) => {
2278
+ size,
2279
+ variant: "plain",
2280
+ color: "neutral",
2281
+ onClick: () => {
2503
2282
  handleChange({
2504
2283
  target: {
2505
2284
  name: props.name,
2506
- value: formatValueString(date, format)
2285
+ value: ""
2507
2286
  }
2508
2287
  });
2509
2288
  setAnchorEl(null);
2510
- },
2511
- minDate: minDate ? new Date(minDate) : void 0,
2512
- maxDate: maxDate ? new Date(maxDate) : void 0,
2513
- disableFuture,
2514
- disablePast,
2515
- shouldDisableDate: shouldDisableDate ? (date) => shouldDisableDate(formatValueString(date, format)) : void 0
2516
- }
2517
- ), !hideClearButton && /* @__PURE__ */ React17.createElement(
2518
- DialogActions_default,
2519
- {
2520
- sx: {
2521
- p: 1
2522
2289
  }
2523
2290
  },
2524
- /* @__PURE__ */ React17.createElement(
2525
- Button_default,
2526
- {
2527
- size,
2528
- variant: "plain",
2529
- color: "neutral",
2530
- onClick: () => {
2531
- handleChange({
2532
- target: {
2533
- name: props.name,
2534
- value: ""
2535
- }
2536
- });
2537
- setAnchorEl(null);
2538
- }
2539
- },
2540
- "Clear"
2541
- )
2542
- ))
2543
- )))));
2544
- }
2545
- );
2291
+ "Clear"
2292
+ )
2293
+ ))
2294
+ )))));
2295
+ });
2546
2296
 
2547
2297
  // src/components/DatePicker/index.ts
2548
2298
  var DatePicker_default = DatePicker;
@@ -2603,10 +2353,7 @@ var Textarea_default = Textarea;
2603
2353
 
2604
2354
  // src/components/Select/Select.tsx
2605
2355
  import React19, { useMemo as useMemo7 } from "react";
2606
- import {
2607
- Select as JoySelect,
2608
- Option as JoyOption
2609
- } from "@mui/joy";
2356
+ import { Select as JoySelect, Option as JoyOption } from "@mui/joy";
2610
2357
  import { motion as motion19 } from "framer-motion";
2611
2358
  var MotionOption = motion19(JoyOption);
2612
2359
  var Option = MotionOption;
@@ -2778,18 +2525,9 @@ function Pagination(props) {
2778
2525
  setPaginationModel({ ...paginationModel, page: newPage });
2779
2526
  };
2780
2527
  const firstPage = 1;
2781
- const lastPage = Math.max(
2782
- firstPage,
2783
- Math.ceil(rowCount / paginationModel.pageSize)
2784
- );
2785
- const beforePages = [
2786
- paginationModel.page - 2,
2787
- paginationModel.page - 1
2788
- ].filter((p) => p > 1);
2789
- const afterPages = [
2790
- paginationModel.page + 1,
2791
- paginationModel.page + 2
2792
- ].filter((p) => p <= lastPage - 1);
2528
+ const lastPage = Math.max(firstPage, Math.ceil(rowCount / paginationModel.pageSize));
2529
+ const beforePages = [paginationModel.page - 2, paginationModel.page - 1].filter((p) => p > 1);
2530
+ const afterPages = [paginationModel.page + 1, paginationModel.page + 2].filter((p) => p <= lastPage - 1);
2793
2531
  const isMoreAfterPages = lastPage > 1 && paginationModel.page < lastPage - 3;
2794
2532
  const isMoreBeforePages = lastPage > 1 && paginationModel.page > 4;
2795
2533
  useEffect4(() => {
@@ -2808,16 +2546,7 @@ function Pagination(props) {
2808
2546
  "aria-label": "Previous page"
2809
2547
  },
2810
2548
  /* @__PURE__ */ React21.createElement(PreviousIcon, null)
2811
- ), paginationModel.page !== firstPage && /* @__PURE__ */ React21.createElement(
2812
- PaginationButton,
2813
- {
2814
- size,
2815
- variant: "plain",
2816
- color: "neutral",
2817
- onClick: () => handlePageChange(firstPage)
2818
- },
2819
- firstPage
2820
- ), isMoreBeforePages && /* @__PURE__ */ React21.createElement(
2549
+ ), paginationModel.page !== firstPage && /* @__PURE__ */ React21.createElement(PaginationButton, { size, variant: "plain", color: "neutral", onClick: () => handlePageChange(firstPage) }, firstPage), isMoreBeforePages && /* @__PURE__ */ React21.createElement(
2821
2550
  PaginationButton,
2822
2551
  {
2823
2552
  size,
@@ -2827,27 +2556,7 @@ function Pagination(props) {
2827
2556
  "aria-label": "More previous pages"
2828
2557
  },
2829
2558
  "..."
2830
- ), beforePages.map((p) => /* @__PURE__ */ React21.createElement(
2831
- PaginationButton,
2832
- {
2833
- key: p,
2834
- size,
2835
- variant: "plain",
2836
- color: "neutral",
2837
- onClick: () => handlePageChange(p)
2838
- },
2839
- p
2840
- )), /* @__PURE__ */ React21.createElement(PaginationButton, { active: "true", size, "aria-current": "page" }, paginationModel.page), afterPages.map((p) => /* @__PURE__ */ React21.createElement(
2841
- PaginationButton,
2842
- {
2843
- key: p,
2844
- size,
2845
- variant: "plain",
2846
- color: "neutral",
2847
- onClick: () => handlePageChange(p)
2848
- },
2849
- p
2850
- )), isMoreAfterPages && /* @__PURE__ */ React21.createElement(
2559
+ ), beforePages.map((p) => /* @__PURE__ */ React21.createElement(PaginationButton, { key: p, size, variant: "plain", color: "neutral", onClick: () => handlePageChange(p) }, p)), /* @__PURE__ */ React21.createElement(PaginationButton, { active: "true", size, "aria-current": "page" }, paginationModel.page), afterPages.map((p) => /* @__PURE__ */ React21.createElement(PaginationButton, { key: p, size, variant: "plain", color: "neutral", onClick: () => handlePageChange(p) }, p)), isMoreAfterPages && /* @__PURE__ */ React21.createElement(
2851
2560
  PaginationButton,
2852
2561
  {
2853
2562
  size,
@@ -2857,16 +2566,7 @@ function Pagination(props) {
2857
2566
  onClick: () => handlePageChange(paginationModel.page + 3)
2858
2567
  },
2859
2568
  "..."
2860
- ), paginationModel.page !== lastPage && /* @__PURE__ */ React21.createElement(
2861
- PaginationButton,
2862
- {
2863
- size,
2864
- variant: "plain",
2865
- color: "neutral",
2866
- onClick: () => handlePageChange(lastPage)
2867
- },
2868
- lastPage
2869
- ), /* @__PURE__ */ React21.createElement(
2569
+ ), paginationModel.page !== lastPage && /* @__PURE__ */ React21.createElement(PaginationButton, { size, variant: "plain", color: "neutral", onClick: () => handlePageChange(lastPage) }, lastPage), /* @__PURE__ */ React21.createElement(
2870
2570
  PaginationIconButton,
2871
2571
  {
2872
2572
  size,
@@ -2886,10 +2586,7 @@ var Pagination_default = Pagination;
2886
2586
 
2887
2587
  // src/components/InfoSign/InfoSign.tsx
2888
2588
  import React22 from "react";
2889
- import {
2890
- styled as styled11,
2891
- tooltipClasses
2892
- } from "@mui/joy";
2589
+ import { styled as styled11, tooltipClasses } from "@mui/joy";
2893
2590
  import MuiInfoIcon from "@mui/icons-material/Info";
2894
2591
  var InfoIcon = styled11(MuiInfoIcon, {
2895
2592
  name: "InfoSign",
@@ -2945,15 +2642,7 @@ var TextEllipsis = ({ children }) => {
2945
2642
  }, [children]);
2946
2643
  const content = /* @__PURE__ */ React23.createElement(EllipsisDiv, { ref: textRef }, children);
2947
2644
  if (showTooltip) {
2948
- return /* @__PURE__ */ React23.createElement(
2949
- Tooltip_default,
2950
- {
2951
- title: children,
2952
- placement: "top",
2953
- onClick: (e) => e.stopPropagation()
2954
- },
2955
- content
2956
- );
2645
+ return /* @__PURE__ */ React23.createElement(Tooltip_default, { title: children, placement: "top", onClick: (e) => e.stopPropagation() }, content);
2957
2646
  }
2958
2647
  return content;
2959
2648
  };
@@ -3137,10 +2826,7 @@ var HeadCell = (props) => {
3137
2826
  () => `${tableId}_header_${headerName ?? field}`.trim(),
3138
2827
  [tableId, headerName, field]
3139
2828
  );
3140
- const resizer = useMemo8(
3141
- () => resizable ?? true ? Resizer(ref) : null,
3142
- [resizable, ref]
3143
- );
2829
+ const resizer = useMemo8(() => resizable ?? true ? Resizer(ref) : null, [resizable, ref]);
3144
2830
  const style = useMemo8(
3145
2831
  () => ({
3146
2832
  width,
@@ -3155,17 +2841,7 @@ var HeadCell = (props) => {
3155
2841
  // TODO: multi-sort때문에 일단 추가한 property, joy-ui에서는 multi-sort시 th에 user-select: none을 적용하고 툴팁을 띄워준다.
3156
2842
  userSelect: "none"
3157
2843
  }),
3158
- [
3159
- isPinned,
3160
- maxWidth,
3161
- minWidth,
3162
- pinnedEndPosition,
3163
- pinnedStartPosition,
3164
- sortable,
3165
- stickyHeader,
3166
- theme,
3167
- width
3168
- ]
2844
+ [isPinned, maxWidth, minWidth, pinnedEndPosition, pinnedStartPosition, sortable, stickyHeader, theme, width]
3169
2845
  );
3170
2846
  const textAlign = getTextAlign(props);
3171
2847
  const initialSort = sortOrder[0];
@@ -3222,20 +2898,7 @@ var HeadCell = (props) => {
3222
2898
  whileHover: "hover",
3223
2899
  initial: "initial"
3224
2900
  },
3225
- /* @__PURE__ */ React23.createElement(
3226
- Stack_default,
3227
- {
3228
- gap: 1,
3229
- direction: "row",
3230
- justifyContent: textAlign,
3231
- alignItems: "center"
3232
- },
3233
- textAlign === "end" && sortIcon,
3234
- textAlign === "end" && infoSign,
3235
- /* @__PURE__ */ React23.createElement(TextEllipsis, null, headerName ?? field, editMode && required && /* @__PURE__ */ React23.createElement(Asterisk, null, "*")),
3236
- textAlign === "start" && infoSign,
3237
- textAlign === "start" && sortIcon
3238
- ),
2901
+ /* @__PURE__ */ React23.createElement(Stack_default, { gap: 1, direction: "row", justifyContent: textAlign, alignItems: "center" }, textAlign === "end" && sortIcon, textAlign === "end" && infoSign, /* @__PURE__ */ React23.createElement(TextEllipsis, null, headerName ?? field, editMode && required && /* @__PURE__ */ React23.createElement(Asterisk, null, "*")), textAlign === "start" && infoSign, textAlign === "start" && sortIcon),
3239
2902
  resizer
3240
2903
  );
3241
2904
  };
@@ -3254,7 +2917,10 @@ var BodyCell = (props) => {
3254
2917
  pinnedStartPosition,
3255
2918
  pinnedEndPosition,
3256
2919
  row,
3257
- rowId
2920
+ rowId,
2921
+ cellClassName,
2922
+ onCellEditStart,
2923
+ onCellEditStop
3258
2924
  } = props;
3259
2925
  const theme = useTheme();
3260
2926
  const [value, setValue] = useState6(row[field]);
@@ -3263,20 +2929,22 @@ var BodyCell = (props) => {
3263
2929
  () => ({
3264
2930
  row,
3265
2931
  value,
3266
- id: rowId
2932
+ id: rowId,
2933
+ field
3267
2934
  }),
3268
- [row, rowId, value]
2935
+ [row, rowId, value, field]
3269
2936
  );
3270
2937
  const editMode = useMemo8(
3271
2938
  () => !!(props.editMode && (typeof isCellEditable === "function" ? isCellEditable(params) : isCellEditable ?? true)),
3272
2939
  [props.editMode, isCellEditable, params]
3273
2940
  );
2941
+ const propsComponentProps = "componentProps" in props ? props.componentProps : null;
3274
2942
  const componentProps = useMemo8(
3275
2943
  () => ({
3276
- ..."componentProps" in props && (typeof props.componentProps === "function" ? props.componentProps(params) : props.componentProps || {}),
2944
+ ..."componentProps" in props && (typeof propsComponentProps === "function" ? propsComponentProps(params) : propsComponentProps || {}),
3277
2945
  size: "sm"
3278
2946
  }),
3279
- ["componentProps" in props ? props.componentProps : null, params]
2947
+ [props, propsComponentProps, params]
3280
2948
  );
3281
2949
  const editModeComponentProps = useMemo8(
3282
2950
  () => ({
@@ -3285,7 +2953,7 @@ var BodyCell = (props) => {
3285
2953
  componentProps.onChange?.(e);
3286
2954
  setValue(e.target.value);
3287
2955
  if (type === "select") {
3288
- props.onCellEditStop?.({
2956
+ onCellEditStop?.({
3289
2957
  ...params,
3290
2958
  originalRow: row,
3291
2959
  row: {
@@ -3298,7 +2966,7 @@ var BodyCell = (props) => {
3298
2966
  },
3299
2967
  onFocus: (e) => {
3300
2968
  componentProps.onFocus?.(e);
3301
- props.onCellEditStart?.({
2969
+ onCellEditStart?.({
3302
2970
  ...params,
3303
2971
  originalRow: row,
3304
2972
  row: {
@@ -3311,7 +2979,7 @@ var BodyCell = (props) => {
3311
2979
  onBlur: (e) => {
3312
2980
  componentProps.onBlur?.(e);
3313
2981
  if (type && ["number", "text", "longText", "currency", "date"].includes(type)) {
3314
- props.onCellEditStop?.({
2982
+ onCellEditStop?.({
3315
2983
  ...params,
3316
2984
  originalRow: row,
3317
2985
  row: {
@@ -3326,7 +2994,7 @@ var BodyCell = (props) => {
3326
2994
  onChangeComplete: (e) => {
3327
2995
  componentProps.onChangeComplete?.(e);
3328
2996
  setValue(e.target.value);
3329
- props.onCellEditStop?.({
2997
+ onCellEditStop?.({
3330
2998
  ...params,
3331
2999
  originalRow: row,
3332
3000
  row: {
@@ -3338,29 +3006,14 @@ var BodyCell = (props) => {
3338
3006
  }
3339
3007
  }
3340
3008
  }),
3341
- [
3342
- params,
3343
- row,
3344
- field,
3345
- value,
3346
- componentProps,
3347
- type,
3348
- props.onCellEditStop,
3349
- props.onCellEditStart
3350
- ]
3009
+ [params, row, field, value, componentProps, type, onCellEditStop, onCellEditStart]
3351
3010
  );
3352
3011
  const EditModeComponent = useMemo8(() => {
3353
3012
  if (renderEditCell) {
3354
3013
  return createElement(memo(renderEditCell), params);
3355
3014
  }
3356
3015
  return {
3357
- date: /* @__PURE__ */ React23.createElement(
3358
- DatePicker_default,
3359
- {
3360
- value,
3361
- ...editModeComponentProps
3362
- }
3363
- ),
3016
+ date: /* @__PURE__ */ React23.createElement(DatePicker_default, { value, ...editModeComponentProps }),
3364
3017
  currency: /* @__PURE__ */ React23.createElement(
3365
3018
  CurrencyInput_default,
3366
3019
  {
@@ -3368,29 +3021,9 @@ var BodyCell = (props) => {
3368
3021
  ...editModeComponentProps
3369
3022
  }
3370
3023
  ),
3371
- number: /* @__PURE__ */ React23.createElement(
3372
- Input_default,
3373
- {
3374
- value,
3375
- type: "number",
3376
- ...editModeComponentProps
3377
- }
3378
- ),
3379
- text: /* @__PURE__ */ React23.createElement(
3380
- Input_default,
3381
- {
3382
- value,
3383
- type: "text",
3384
- ...editModeComponentProps
3385
- }
3386
- ),
3387
- longText: /* @__PURE__ */ React23.createElement(
3388
- Textarea_default,
3389
- {
3390
- value,
3391
- ...editModeComponentProps
3392
- }
3393
- ),
3024
+ number: /* @__PURE__ */ React23.createElement(Input_default, { value, type: "number", ...editModeComponentProps }),
3025
+ text: /* @__PURE__ */ React23.createElement(Input_default, { value, type: "text", ...editModeComponentProps }),
3026
+ longText: /* @__PURE__ */ React23.createElement(Textarea_default, { value, ...editModeComponentProps }),
3394
3027
  autocomplete: /* @__PURE__ */ React23.createElement(
3395
3028
  Autocomplete_default,
3396
3029
  {
@@ -3408,50 +3041,34 @@ var BodyCell = (props) => {
3408
3041
  }
3409
3042
  )
3410
3043
  }[type || "text"];
3411
- }, [value, editModeComponentProps, type]);
3044
+ }, [value, editModeComponentProps, type, renderEditCell, params]);
3045
+ const linkComponentFromProps = props.component;
3412
3046
  const ReadModeComponent = useMemo8(() => {
3413
3047
  if (renderCell) {
3414
3048
  return createElement(memo(renderCell), params);
3415
3049
  }
3416
3050
  const innerText = value;
3417
3051
  const typedComponent = {
3418
- link: React23.createElement(
3419
- props.component || Link,
3420
- {
3421
- children: innerText,
3422
- ...componentProps
3423
- }
3424
- )
3052
+ link: React23.createElement(linkComponentFromProps || Link, {
3053
+ children: innerText,
3054
+ ...componentProps
3055
+ })
3425
3056
  }[type || "text"];
3426
3057
  return typedComponent || innerText;
3427
- }, [value, renderCell, params, type, componentProps]);
3058
+ }, [value, renderCell, params, type, componentProps, linkComponentFromProps]);
3059
+ const getActions = props.getActions;
3428
3060
  const CellComponent = useMemo8(() => {
3429
3061
  if (type === "actions") {
3430
- return /* @__PURE__ */ React23.createElement(
3431
- Stack_default,
3432
- {
3433
- direction: "row",
3434
- gap: 1,
3435
- justifyContent: "center",
3436
- alignItems: "center"
3437
- },
3438
- props.getActions?.(params)
3439
- );
3062
+ return /* @__PURE__ */ React23.createElement(Stack_default, { direction: "row", gap: 1, justifyContent: "center", alignItems: "center" }, getActions?.(params));
3440
3063
  }
3441
3064
  return editMode && EditModeComponent ? EditModeComponent : ReadModeComponent;
3442
- }, [
3443
- type,
3444
- props.getActions,
3445
- params,
3446
- editMode,
3447
- EditModeComponent,
3448
- ReadModeComponent
3449
- ]);
3450
- const showTooltip = useMemo8(
3451
- () => noWrap && type === "longText",
3452
- [noWrap, type]
3453
- );
3065
+ }, [type, getActions, params, editMode, EditModeComponent, ReadModeComponent]);
3066
+ const showTooltip = useMemo8(() => noWrap && type === "longText", [noWrap, type]);
3454
3067
  const isBoundary = props.isLastStartPinnedColumn || props.isLastEndPinnedColumn;
3068
+ const computedCellClassName = useMemo8(
3069
+ () => (typeof cellClassName === "function" ? cellClassName(params) : cellClassName) || "",
3070
+ [cellClassName, params]
3071
+ );
3455
3072
  useEffect5(() => {
3456
3073
  setValue(row[field]);
3457
3074
  }, [row, field]);
@@ -3470,11 +3087,11 @@ var BodyCell = (props) => {
3470
3087
  zIndex: isPinned ? `calc(${theme.getCssVar("zIndex-table")} + ${isBoundary ? 2 : 3})` : void 0,
3471
3088
  "--TableCell-dataBackground": isPinned ? `var(--TableCell-headBackground)` : void 0
3472
3089
  },
3473
- className: isLastStartPinnedColumn && "is-last-left" || isLastEndPinnedColumn && "is-last-right" || ""
3090
+ className: [isLastStartPinnedColumn && "is-last-left", isLastEndPinnedColumn && "is-last-right", computedCellClassName].filter(Boolean).join(" ") || ""
3474
3091
  },
3475
3092
  useMemo8(
3476
3093
  () => showTooltip ? /* @__PURE__ */ React23.createElement(CellTextEllipsis, null, CellComponent) : CellComponent,
3477
- [CellComponent, showTooltip, value]
3094
+ [CellComponent, showTooltip]
3478
3095
  )
3479
3096
  );
3480
3097
  };
@@ -3552,10 +3169,7 @@ function useDataTableRenderer({
3552
3169
  const [sortModel, setSortModel] = useControlledState(
3553
3170
  controlledSortModel,
3554
3171
  initialState?.sorting?.sortModel ?? [],
3555
- useCallback9(
3556
- (sortModel2) => onSortModelChange?.(sortModel2),
3557
- [onSortModelChange]
3558
- )
3172
+ useCallback9((sortModel2) => onSortModelChange?.(sortModel2), [onSortModelChange])
3559
3173
  );
3560
3174
  const columnsByField = useMemo8(
3561
3175
  () => columnsProp.reduce(
@@ -3630,9 +3244,7 @@ function useDataTableRenderer({
3630
3244
  [dataInPage, isRowSelectable, getId]
3631
3245
  );
3632
3246
  const isAllSelected = useMemo8(
3633
- () => selectableDataInPage.length > 0 && selectableDataInPage.every(
3634
- (row, i) => selectedModelSet.has(getId(row, i))
3635
- ),
3247
+ () => selectableDataInPage.length > 0 && selectableDataInPage.every((row, i) => selectedModelSet.has(getId(row, i))),
3636
3248
  [selectableDataInPage, selectedModelSet, getId]
3637
3249
  );
3638
3250
  const rowCount = totalRowsProp || rows.length;
@@ -3656,12 +3268,8 @@ function useDataTableRenderer({
3656
3268
  field: key
3657
3269
  }));
3658
3270
  return baseColumns.map((column) => {
3659
- const isLeftPinned = pinnedColumns?.left?.includes(
3660
- column.field
3661
- );
3662
- const isRightPinned = pinnedColumns?.right?.includes(
3663
- column.field
3664
- );
3271
+ const isLeftPinned = pinnedColumns?.left?.includes(column.field);
3272
+ const isRightPinned = pinnedColumns?.right?.includes(column.field);
3665
3273
  const isPinned = isLeftPinned || isRightPinned;
3666
3274
  return {
3667
3275
  ...column,
@@ -3673,13 +3281,8 @@ function useDataTableRenderer({
3673
3281
  isLastStartPinnedColumn: isLeftPinned && [...pinnedColumns?.left || []].pop() === column.field,
3674
3282
  isLastEndPinnedColumn: isRightPinned && (pinnedColumns?.right?.[0] ?? null) === column.field,
3675
3283
  // pinned 관련 계산부
3676
- pinnedStartPosition: pinnedColumns?.left?.slice(
3677
- 0,
3678
- isLeftPinned ? pinnedColumns.left.indexOf(column.field) : pinnedColumns.left.length
3679
- ).reduce((acc, curr) => acc + getWidth(curr), 0),
3680
- pinnedEndPosition: pinnedColumns?.right?.slice(
3681
- isRightPinned ? pinnedColumns.right.indexOf(column.field) + 1 : 0
3682
- ).reduce((acc, curr) => acc + getWidth(curr), 0)
3284
+ pinnedStartPosition: pinnedColumns?.left?.slice(0, isLeftPinned ? pinnedColumns.left.indexOf(column.field) : pinnedColumns.left.length).reduce((acc, curr) => acc + getWidth(curr), 0),
3285
+ pinnedEndPosition: pinnedColumns?.right?.slice(isRightPinned ? pinnedColumns.right.indexOf(column.field) + 1 : 0).reduce((acc, curr) => acc + getWidth(curr), 0)
3683
3286
  };
3684
3287
  });
3685
3288
  }, [
@@ -3714,9 +3317,7 @@ function useDataTableRenderer({
3714
3317
  setSortModel(newSortModel2);
3715
3318
  return;
3716
3319
  }
3717
- const newSortModel = multiple ? sortModel.map(
3718
- (model) => model.field === field ? { field, sort: nextSortOrder } : model
3719
- ) : [{ field, sort: nextSortOrder }];
3320
+ const newSortModel = multiple ? sortModel.map((model) => model.field === field ? { field, sort: nextSortOrder } : model) : [{ field, sort: nextSortOrder }];
3720
3321
  setSortModel(newSortModel);
3721
3322
  } else {
3722
3323
  const newSortModel = multiple ? [...sortModel, { field, sort: columnSortOrder[0] }] : [{ field, sort: columnSortOrder[0] }];
@@ -3753,10 +3354,7 @@ function useDataTableRenderer({
3753
3354
  isAllSelected,
3754
3355
  // all rows are selected on this page
3755
3356
  isTotalSelected,
3756
- isSelectedRow: useCallback9(
3757
- (model) => selectedModelSet.has(model),
3758
- [selectedModelSet]
3759
- ),
3357
+ isSelectedRow: useCallback9((model) => selectedModelSet.has(model), [selectedModelSet]),
3760
3358
  isRowSelectable: useCallback9(
3761
3359
  (rowId, row) => {
3762
3360
  if (!isRowSelectable) return true;
@@ -3769,16 +3367,12 @@ function useDataTableRenderer({
3769
3367
  setFocusedRowId(rowId);
3770
3368
  }, []),
3771
3369
  onAllCheckboxChange: useCallback9(() => {
3772
- onSelectionModelChange?.(
3773
- isAllSelected ? [] : selectableDataInPage.map(getId)
3774
- );
3370
+ onSelectionModelChange?.(isAllSelected ? [] : selectableDataInPage.map(getId));
3775
3371
  }, [isAllSelected, selectableDataInPage, onSelectionModelChange, getId]),
3776
3372
  onCheckboxChange: useCallback9(
3777
3373
  (event, selectedModel) => {
3778
3374
  if (selectedModelSet.has(selectedModel)) {
3779
- const newSelectionModel = (selectionModel || []).filter(
3780
- (model) => model !== selectedModel
3781
- );
3375
+ const newSelectionModel = (selectionModel || []).filter((model) => model !== selectedModel);
3782
3376
  onSelectionModelChange?.(newSelectionModel);
3783
3377
  } else {
3784
3378
  const newSelectionModel = [...selectionModel || [], selectedModel];
@@ -3793,10 +3387,7 @@ function useDataTableRenderer({
3793
3387
  if (!isRowSelectable) return true;
3794
3388
  return isRowSelectable({ row, id: getId(row, i) });
3795
3389
  });
3796
- onSelectionModelChange?.(
3797
- isTotalSelected ? [] : selectableRows.map(getId),
3798
- !isTotalSelected
3799
- );
3390
+ onSelectionModelChange?.(isTotalSelected ? [] : selectableRows.map(getId), !isTotalSelected);
3800
3391
  }, [isTotalSelected, rows, onSelectionModelChange, getId, isRowSelectable])
3801
3392
  };
3802
3393
  }
@@ -3839,11 +3430,7 @@ function Component(props, apiRef) {
3839
3430
  footer: Footer,
3840
3431
  loadingOverlay: LoadingOverlay = DefaultLoadingOverlay
3841
3432
  } = {},
3842
- slotProps: {
3843
- checkbox: checkboxProps = {},
3844
- toolbar: toolbarProps,
3845
- background: backgroundProps = {}
3846
- } = {},
3433
+ slotProps: { checkbox: checkboxProps = {}, toolbar: toolbarProps, background: backgroundProps = {} } = {},
3847
3434
  stripe,
3848
3435
  isTotalSelected: ___________,
3849
3436
  ...innerProps
@@ -3888,13 +3475,7 @@ function Component(props, apiRef) {
3888
3475
  onRowClick?.({ row, rowId }, e);
3889
3476
  checkboxSelection && !disableSelectionOnClick && isRowSelectableCheck(rowId, row) && onCheckboxChange(e, rowId);
3890
3477
  },
3891
- [
3892
- onRowClick,
3893
- checkboxSelection,
3894
- disableSelectionOnClick,
3895
- onCheckboxChange,
3896
- isRowSelectableCheck
3897
- ]
3478
+ [onRowClick, checkboxSelection, disableSelectionOnClick, onCheckboxChange, isRowSelectableCheck]
3898
3479
  );
3899
3480
  const getRowFocusHandler = useCallback9(
3900
3481
  (rowId) => () => {
@@ -3952,16 +3533,7 @@ function Component(props, apiRef) {
3952
3533
  justifyContent: "space-between",
3953
3534
  alignItems: "center"
3954
3535
  },
3955
- !!checkboxSelection && /* @__PURE__ */ React23.createElement(Stack_default, { direction: "row", spacing: 1 }, !isAllSelected && /* @__PURE__ */ React23.createElement(Typography_default, { level: "body-xs" }, numberFormatter(selectionModel?.length || 0), " items selected"), isAllSelected && !isTotalSelected && /* @__PURE__ */ React23.createElement(Stack_default, { direction: "row", spacing: 1, alignItems: "center" }, /* @__PURE__ */ React23.createElement(Typography_default, { level: "body-xs" }, "All ", numberFormatter(selectionModel?.length || 0), " items on this page are selected."), /* @__PURE__ */ React23.createElement(Button_default, { size: "sm", variant: "plain", onClick: onTotalSelect }, "Select all ", numberFormatter(selectableRowCount), " items")), isTotalSelected && /* @__PURE__ */ React23.createElement(Stack_default, { direction: "row", spacing: 1, alignItems: "center" }, /* @__PURE__ */ React23.createElement(Typography_default, { level: "body-xs" }, "All ", numberFormatter(selectableRowCount), " items are selected."), /* @__PURE__ */ React23.createElement(
3956
- Button_default,
3957
- {
3958
- size: "sm",
3959
- variant: "plain",
3960
- color: "danger",
3961
- onClick: onTotalSelect
3962
- },
3963
- "Cancel"
3964
- ))),
3536
+ !!checkboxSelection && /* @__PURE__ */ React23.createElement(Stack_default, { direction: "row", spacing: 1 }, !isAllSelected && /* @__PURE__ */ React23.createElement(Typography_default, { level: "body-xs" }, numberFormatter(selectionModel?.length || 0), " items selected"), isAllSelected && !isTotalSelected && /* @__PURE__ */ React23.createElement(Stack_default, { direction: "row", spacing: 1, alignItems: "center" }, /* @__PURE__ */ React23.createElement(Typography_default, { level: "body-xs" }, "All ", numberFormatter(selectionModel?.length || 0), " items on this page are selected."), /* @__PURE__ */ React23.createElement(Button_default, { size: "sm", variant: "plain", onClick: onTotalSelect }, "Select all ", numberFormatter(selectableRowCount), " items")), isTotalSelected && /* @__PURE__ */ React23.createElement(Stack_default, { direction: "row", spacing: 1, alignItems: "center" }, /* @__PURE__ */ React23.createElement(Typography_default, { level: "body-xs" }, "All ", numberFormatter(selectableRowCount), " items are selected."), /* @__PURE__ */ React23.createElement(Button_default, { size: "sm", variant: "plain", color: "danger", onClick: onTotalSelect }, "Cancel"))),
3965
3537
  Toolbar && /* @__PURE__ */ React23.createElement(Toolbar, { ...toolbarProps || {} })
3966
3538
  ),
3967
3539
  /* @__PURE__ */ React23.createElement(
@@ -4118,15 +3690,7 @@ var DataTable = forwardRef7(Component);
4118
3690
  DataTable.displayName = "DataTable";
4119
3691
 
4120
3692
  // src/components/DateRangePicker/DateRangePicker.tsx
4121
- import React24, {
4122
- forwardRef as forwardRef8,
4123
- useCallback as useCallback10,
4124
- useEffect as useEffect6,
4125
- useImperativeHandle as useImperativeHandle3,
4126
- useMemo as useMemo9,
4127
- useRef as useRef5,
4128
- useState as useState7
4129
- } from "react";
3693
+ import React24, { forwardRef as forwardRef8, useCallback as useCallback10, useEffect as useEffect6, useImperativeHandle as useImperativeHandle3, useMemo as useMemo9, useRef as useRef5, useState as useState7 } from "react";
4130
3694
  import { IMaskInput as IMaskInput2, IMask as IMask2 } from "react-imask";
4131
3695
  import CalendarTodayIcon2 from "@mui/icons-material/CalendarToday";
4132
3696
  import { styled as styled13, useThemeProps as useThemeProps5 } from "@mui/joy";
@@ -4138,9 +3702,7 @@ var CalendarButton2 = styled13(IconButton_default, {
4138
3702
  "&:focus": {
4139
3703
  "--Icon-color": "currentColor",
4140
3704
  outlineOffset: `${theme.getCssVar("focus-thickness")}`,
4141
- outline: `${theme.getCssVar("focus-thickness")} solid ${theme.getCssVar(
4142
- "palette-focusVisible"
4143
- )}`
3705
+ outline: `${theme.getCssVar("focus-thickness")} solid ${theme.getCssVar("palette-focusVisible")}`
4144
3706
  }
4145
3707
  }));
4146
3708
  var StyledPopper2 = styled13(Popper3, {
@@ -4177,10 +3739,7 @@ var validValueFormat2 = (value, format) => {
4177
3739
  if (parsedDate1.toString() === "Invalid Date" || parsedDate2.toString() === "Invalid Date") {
4178
3740
  return false;
4179
3741
  }
4180
- const formattedValue = formatValueString2(
4181
- [parsedDate1, parsedDate2],
4182
- format
4183
- );
3742
+ const formattedValue = formatValueString2([parsedDate1, parsedDate2], format);
4184
3743
  if (value !== formattedValue) {
4185
3744
  return false;
4186
3745
  }
@@ -4232,287 +3791,263 @@ var parseDates = (str, format) => {
4232
3791
  var formatToPattern2 = (format) => {
4233
3792
  return `${format} - ${format}`.replace(/YYYY/g, "Y").replace(/MM/g, "M").replace(/DD/g, "D").replace(/[^YMD\s]/g, (match) => `${match}\``);
4234
3793
  };
4235
- var TextMaskAdapter5 = React24.forwardRef(
4236
- function TextMaskAdapter6(props, ref) {
4237
- const { onChange, format, ...other } = props;
4238
- return /* @__PURE__ */ React24.createElement(
4239
- IMaskInput2,
4240
- {
4241
- ...other,
4242
- inputRef: ref,
4243
- onAccept: (value) => onChange({ target: { name: props.name, value } }),
4244
- mask: Date,
4245
- pattern: formatToPattern2(format),
4246
- blocks: {
4247
- D: {
4248
- mask: IMask2.MaskedRange,
4249
- from: 1,
4250
- to: 31,
4251
- maxLength: 2
4252
- },
4253
- M: {
4254
- mask: IMask2.MaskedRange,
4255
- from: 1,
4256
- to: 12,
4257
- maxLength: 2
4258
- },
4259
- Y: {
4260
- mask: IMask2.MaskedRange,
4261
- from: 1900,
4262
- to: 9999
4263
- }
3794
+ var TextMaskAdapter5 = React24.forwardRef(function TextMaskAdapter6(props, ref) {
3795
+ const { onChange, format, ...other } = props;
3796
+ return /* @__PURE__ */ React24.createElement(
3797
+ IMaskInput2,
3798
+ {
3799
+ ...other,
3800
+ inputRef: ref,
3801
+ onAccept: (value) => onChange({ target: { name: props.name, value } }),
3802
+ mask: Date,
3803
+ pattern: formatToPattern2(format),
3804
+ blocks: {
3805
+ D: {
3806
+ mask: IMask2.MaskedRange,
3807
+ from: 1,
3808
+ to: 31,
3809
+ maxLength: 2
4264
3810
  },
4265
- format: (dates) => formatValueString2(dates, format),
4266
- parse: (str) => parseDates(str, format),
4267
- autofix: "pad",
4268
- overwrite: true
4269
- }
4270
- );
4271
- }
4272
- );
4273
- var DateRangePicker = forwardRef8(
4274
- (inProps, ref) => {
4275
- const props = useThemeProps5({ props: inProps, name: "DateRangePicker" });
4276
- const {
4277
- onChange,
4278
- disabled,
4279
- label,
4280
- error,
4281
- helperText,
4282
- minDate,
4283
- maxDate,
4284
- disableFuture,
4285
- disablePast,
4286
- required,
4287
- // NOTE: 스타일 관련된 props는 최상위 엘리먼트에 적용한다.
4288
- sx,
4289
- className,
4290
- format = "YYYY/MM/DD",
4291
- displayFormat = "YYYY/MM/DD",
4292
- size,
4293
- inputReadOnly,
4294
- hideClearButton,
4295
- readOnly,
4296
- ...innerProps
4297
- } = props;
4298
- const innerRef = useRef5(null);
4299
- const buttonRef = useRef5(null);
4300
- const [value, setValue] = useControlledState(
4301
- props.value,
4302
- props.defaultValue || "",
4303
- useCallback10(
4304
- (value2) => onChange?.({ target: { name: props.name, value: value2 } }),
4305
- [props.name, onChange]
4306
- )
4307
- );
4308
- const [displayValue, setDisplayValue] = useState7(
4309
- () => value ? formatValueString2(parseDates(value, format), displayFormat) : ""
4310
- );
4311
- const [anchorEl, setAnchorEl] = useState7(null);
4312
- const open = Boolean(anchorEl);
4313
- const calendarValue = useMemo9(
4314
- () => value ? parseDates(value, format) : void 0,
4315
- [value, format]
4316
- );
4317
- useEffect6(() => {
4318
- if (value) {
4319
- try {
4320
- const dates = parseDates(value, format);
4321
- const newDisplayValue = formatValueString2(dates, displayFormat);
4322
- setDisplayValue(newDisplayValue);
4323
- } catch (error2) {
4324
- }
4325
- } else {
4326
- setDisplayValue("");
4327
- }
4328
- }, [displayFormat, value, format]);
4329
- useEffect6(() => {
4330
- if (!anchorEl) {
4331
- innerRef.current?.blur();
4332
- }
4333
- }, [anchorEl, innerRef]);
4334
- useImperativeHandle3(ref, () => innerRef.current, [
4335
- innerRef
4336
- ]);
4337
- const handleChange = useCallback10(
4338
- (event) => {
4339
- const value2 = event.target.value;
4340
- setDisplayValue(
4341
- value2 ? formatValueString2(parseDates(value2, format), displayFormat) : value2
4342
- );
4343
- setValue(value2);
4344
- },
4345
- [displayFormat, format, setValue]
4346
- );
4347
- const handleDisplayInputChange = useCallback10(
4348
- (event) => {
4349
- if (event.target.value === "") {
4350
- handleChange({
4351
- target: {
4352
- name: props.name,
4353
- value: ""
4354
- }
4355
- });
4356
- return;
4357
- }
4358
- const isValidDisplayValue = validValueFormat2(
4359
- event.target.value,
4360
- displayFormat
4361
- );
4362
- if (isValidDisplayValue) {
4363
- const dates = parseDates(event.target.value, displayFormat);
4364
- const formattedValue = formatValueString2(dates, format);
4365
- handleChange({
4366
- target: {
4367
- name: props.name,
4368
- value: formattedValue
4369
- }
4370
- });
4371
- }
4372
- },
4373
- [displayFormat, format, handleChange, props.name]
4374
- );
4375
- const handleCalendarToggle = useCallback10(
4376
- (event) => {
4377
- setAnchorEl(anchorEl ? null : event.currentTarget);
4378
- innerRef.current?.focus();
4379
- },
4380
- [anchorEl, setAnchorEl, innerRef]
4381
- );
4382
- const handleCalendarChange = useCallback10(
4383
- ([date1, date2]) => {
4384
- if (!date1 || !date2) return;
4385
- const formattedValue = formatValueString2([date1, date2], format);
4386
- if (props.value !== void 0) {
4387
- onChange?.({ target: { name: props.name, value: formattedValue } });
4388
- } else {
4389
- setDisplayValue(
4390
- formatValueString2([date1, date2], displayFormat)
4391
- );
4392
- setValue(formattedValue);
3811
+ M: {
3812
+ mask: IMask2.MaskedRange,
3813
+ from: 1,
3814
+ to: 12,
3815
+ maxLength: 2
3816
+ },
3817
+ Y: {
3818
+ mask: IMask2.MaskedRange,
3819
+ from: 1900,
3820
+ to: 9999
4393
3821
  }
4394
- setAnchorEl(null);
4395
3822
  },
4396
- [
4397
- props.value,
4398
- props.name,
4399
- onChange,
4400
- setValue,
4401
- setAnchorEl,
4402
- format,
4403
- displayFormat
4404
- ]
4405
- );
4406
- const handleInputMouseDown = useCallback10(
4407
- (event) => {
4408
- if (inputReadOnly) {
4409
- event.preventDefault();
4410
- buttonRef.current?.focus();
4411
- }
4412
- },
4413
- [inputReadOnly, buttonRef]
4414
- );
4415
- return /* @__PURE__ */ React24.createElement(DateRangePickerRoot, null, /* @__PURE__ */ React24.createElement(FocusTrap2, { open: true }, /* @__PURE__ */ React24.createElement(React24.Fragment, null, /* @__PURE__ */ React24.createElement(
4416
- Input_default,
4417
- {
4418
- ...innerProps,
4419
- color: error ? "danger" : innerProps.color,
4420
- ref,
4421
- size,
4422
- value: displayValue,
4423
- onChange: handleDisplayInputChange,
4424
- disabled,
4425
- required,
4426
- placeholder: `${displayFormat} - ${displayFormat}`,
4427
- slotProps: {
4428
- input: {
4429
- component: TextMaskAdapter5,
4430
- ref: innerRef,
4431
- format: displayFormat,
4432
- sx: {
4433
- "&:hover": {
4434
- cursor: inputReadOnly || readOnly ? "default" : "text"
4435
- }
4436
- },
4437
- onMouseDown: handleInputMouseDown
3823
+ format: (dates) => formatValueString2(dates, format),
3824
+ parse: (str) => parseDates(str, format),
3825
+ autofix: "pad",
3826
+ overwrite: true
3827
+ }
3828
+ );
3829
+ });
3830
+ var DateRangePicker = forwardRef8((inProps, ref) => {
3831
+ const props = useThemeProps5({ props: inProps, name: "DateRangePicker" });
3832
+ const {
3833
+ onChange,
3834
+ disabled,
3835
+ label,
3836
+ error,
3837
+ helperText,
3838
+ minDate,
3839
+ maxDate,
3840
+ disableFuture,
3841
+ disablePast,
3842
+ required,
3843
+ // NOTE: 스타일 관련된 props는 최상위 엘리먼트에 적용한다.
3844
+ sx,
3845
+ className,
3846
+ format = "YYYY/MM/DD",
3847
+ displayFormat = "YYYY/MM/DD",
3848
+ size,
3849
+ inputReadOnly,
3850
+ hideClearButton,
3851
+ readOnly,
3852
+ ...innerProps
3853
+ } = props;
3854
+ const innerRef = useRef5(null);
3855
+ const buttonRef = useRef5(null);
3856
+ const [value, setValue] = useControlledState(
3857
+ props.value,
3858
+ props.defaultValue || "",
3859
+ useCallback10((value2) => onChange?.({ target: { name: props.name, value: value2 } }), [props.name, onChange])
3860
+ );
3861
+ const [displayValue, setDisplayValue] = useState7(
3862
+ () => value ? formatValueString2(parseDates(value, format), displayFormat) : ""
3863
+ );
3864
+ const [anchorEl, setAnchorEl] = useState7(null);
3865
+ const open = Boolean(anchorEl);
3866
+ const calendarValue = useMemo9(
3867
+ () => value ? parseDates(value, format) : void 0,
3868
+ [value, format]
3869
+ );
3870
+ useEffect6(() => {
3871
+ if (value) {
3872
+ try {
3873
+ const dates = parseDates(value, format);
3874
+ const newDisplayValue = formatValueString2(dates, displayFormat);
3875
+ setDisplayValue(newDisplayValue);
3876
+ } catch (error2) {
3877
+ }
3878
+ } else {
3879
+ setDisplayValue("");
3880
+ }
3881
+ }, [displayFormat, value, format]);
3882
+ useEffect6(() => {
3883
+ if (!anchorEl) {
3884
+ innerRef.current?.blur();
3885
+ }
3886
+ }, [anchorEl, innerRef]);
3887
+ useImperativeHandle3(ref, () => innerRef.current, [innerRef]);
3888
+ const handleChange = useCallback10(
3889
+ (event) => {
3890
+ const value2 = event.target.value;
3891
+ setDisplayValue(value2 ? formatValueString2(parseDates(value2, format), displayFormat) : value2);
3892
+ setValue(value2);
3893
+ },
3894
+ [displayFormat, format, setValue]
3895
+ );
3896
+ const handleDisplayInputChange = useCallback10(
3897
+ (event) => {
3898
+ if (event.target.value === "") {
3899
+ handleChange({
3900
+ target: {
3901
+ name: props.name,
3902
+ value: ""
4438
3903
  }
4439
- },
4440
- error,
4441
- className,
4442
- sx,
4443
- endDecorator: /* @__PURE__ */ React24.createElement(
4444
- CalendarButton2,
4445
- {
4446
- ref: buttonRef,
4447
- variant: "plain",
4448
- onClick: readOnly ? void 0 : handleCalendarToggle,
4449
- "aria-label": "Toggle Calendar",
4450
- "aria-controls": "date-range-picker-popper",
4451
- "aria-haspopup": "dialog",
4452
- "aria-expanded": open,
4453
- disabled
4454
- },
4455
- /* @__PURE__ */ React24.createElement(CalendarTodayIcon2, null)
4456
- ),
4457
- label,
4458
- helperText,
4459
- readOnly: readOnly || inputReadOnly
3904
+ });
3905
+ return;
4460
3906
  }
4461
- ), open && /* @__PURE__ */ React24.createElement(ClickAwayListener2, { onClickAway: () => setAnchorEl(null) }, /* @__PURE__ */ React24.createElement(
4462
- StyledPopper2,
4463
- {
4464
- id: "date-range-picker-popper",
4465
- open: true,
4466
- anchorEl,
4467
- placement: "bottom-end",
4468
- onMouseDown: (e) => e.preventDefault(),
4469
- modifiers: [
4470
- {
4471
- name: "offset",
4472
- options: {
4473
- offset: [4, 4]
4474
- }
3907
+ const isValidDisplayValue = validValueFormat2(event.target.value, displayFormat);
3908
+ if (isValidDisplayValue) {
3909
+ const dates = parseDates(event.target.value, displayFormat);
3910
+ const formattedValue = formatValueString2(dates, format);
3911
+ handleChange({
3912
+ target: {
3913
+ name: props.name,
3914
+ value: formattedValue
4475
3915
  }
4476
- ],
4477
- "aria-label": "Calendar Tooltip",
4478
- "aria-expanded": open
3916
+ });
3917
+ }
3918
+ },
3919
+ [displayFormat, format, handleChange, props.name]
3920
+ );
3921
+ const handleCalendarToggle = useCallback10(
3922
+ (event) => {
3923
+ setAnchorEl(anchorEl ? null : event.currentTarget);
3924
+ innerRef.current?.focus();
3925
+ },
3926
+ [anchorEl, setAnchorEl, innerRef]
3927
+ );
3928
+ const handleCalendarChange = useCallback10(
3929
+ ([date1, date2]) => {
3930
+ if (!date1 || !date2) return;
3931
+ const formattedValue = formatValueString2([date1, date2], format);
3932
+ if (props.value !== void 0) {
3933
+ onChange?.({ target: { name: props.name, value: formattedValue } });
3934
+ } else {
3935
+ setDisplayValue(formatValueString2([date1, date2], displayFormat));
3936
+ setValue(formattedValue);
3937
+ }
3938
+ setAnchorEl(null);
3939
+ },
3940
+ [props.value, props.name, onChange, setValue, setAnchorEl, format, displayFormat]
3941
+ );
3942
+ const handleInputMouseDown = useCallback10(
3943
+ (event) => {
3944
+ if (inputReadOnly) {
3945
+ event.preventDefault();
3946
+ buttonRef.current?.focus();
3947
+ }
3948
+ },
3949
+ [inputReadOnly, buttonRef]
3950
+ );
3951
+ return /* @__PURE__ */ React24.createElement(DateRangePickerRoot, null, /* @__PURE__ */ React24.createElement(FocusTrap2, { open: true }, /* @__PURE__ */ React24.createElement(React24.Fragment, null, /* @__PURE__ */ React24.createElement(
3952
+ Input_default,
3953
+ {
3954
+ ...innerProps,
3955
+ color: error ? "danger" : innerProps.color,
3956
+ ref,
3957
+ size,
3958
+ value: displayValue,
3959
+ onChange: handleDisplayInputChange,
3960
+ disabled,
3961
+ required,
3962
+ placeholder: `${displayFormat} - ${displayFormat}`,
3963
+ slotProps: {
3964
+ input: {
3965
+ component: TextMaskAdapter5,
3966
+ ref: innerRef,
3967
+ format: displayFormat,
3968
+ sx: {
3969
+ "&:hover": {
3970
+ cursor: inputReadOnly || readOnly ? "default" : "text"
3971
+ }
3972
+ },
3973
+ onMouseDown: handleInputMouseDown
3974
+ }
4479
3975
  },
4480
- /* @__PURE__ */ React24.createElement(CalendarSheet2, { tabIndex: -1, role: "presentation" }, /* @__PURE__ */ React24.createElement(
4481
- Calendar_default,
3976
+ error,
3977
+ className,
3978
+ sx,
3979
+ endDecorator: /* @__PURE__ */ React24.createElement(
3980
+ CalendarButton2,
4482
3981
  {
4483
- rangeSelection: true,
4484
- defaultValue: calendarValue,
4485
- onChange: handleCalendarChange,
4486
- minDate: minDate ? new Date(minDate) : void 0,
4487
- maxDate: maxDate ? new Date(maxDate) : void 0,
4488
- disableFuture,
4489
- disablePast
3982
+ ref: buttonRef,
3983
+ variant: "plain",
3984
+ onClick: readOnly ? void 0 : handleCalendarToggle,
3985
+ "aria-label": "Toggle Calendar",
3986
+ "aria-controls": "date-range-picker-popper",
3987
+ "aria-haspopup": "dialog",
3988
+ "aria-expanded": open,
3989
+ disabled
3990
+ },
3991
+ /* @__PURE__ */ React24.createElement(CalendarTodayIcon2, null)
3992
+ ),
3993
+ label,
3994
+ helperText,
3995
+ readOnly: readOnly || inputReadOnly
3996
+ }
3997
+ ), open && /* @__PURE__ */ React24.createElement(ClickAwayListener2, { onClickAway: () => setAnchorEl(null) }, /* @__PURE__ */ React24.createElement(
3998
+ StyledPopper2,
3999
+ {
4000
+ id: "date-range-picker-popper",
4001
+ open: true,
4002
+ anchorEl,
4003
+ placement: "bottom-end",
4004
+ onMouseDown: (e) => e.preventDefault(),
4005
+ modifiers: [
4006
+ {
4007
+ name: "offset",
4008
+ options: {
4009
+ offset: [4, 4]
4010
+ }
4011
+ }
4012
+ ],
4013
+ "aria-label": "Calendar Tooltip",
4014
+ "aria-expanded": open
4015
+ },
4016
+ /* @__PURE__ */ React24.createElement(CalendarSheet2, { tabIndex: -1, role: "presentation" }, /* @__PURE__ */ React24.createElement(
4017
+ Calendar_default,
4018
+ {
4019
+ rangeSelection: true,
4020
+ defaultValue: calendarValue,
4021
+ onChange: handleCalendarChange,
4022
+ minDate: minDate ? new Date(minDate) : void 0,
4023
+ maxDate: maxDate ? new Date(maxDate) : void 0,
4024
+ disableFuture,
4025
+ disablePast
4026
+ }
4027
+ ), !hideClearButton && /* @__PURE__ */ React24.createElement(
4028
+ DialogActions_default,
4029
+ {
4030
+ sx: {
4031
+ p: 1
4490
4032
  }
4491
- ), !hideClearButton && /* @__PURE__ */ React24.createElement(
4492
- DialogActions_default,
4033
+ },
4034
+ /* @__PURE__ */ React24.createElement(
4035
+ Button_default,
4493
4036
  {
4494
- sx: {
4495
- p: 1
4037
+ size,
4038
+ variant: "plain",
4039
+ color: "neutral",
4040
+ onClick: () => {
4041
+ setValue("");
4042
+ setDisplayValue("");
4043
+ setAnchorEl(null);
4496
4044
  }
4497
4045
  },
4498
- /* @__PURE__ */ React24.createElement(
4499
- Button_default,
4500
- {
4501
- size,
4502
- variant: "plain",
4503
- color: "neutral",
4504
- onClick: () => {
4505
- setValue("");
4506
- setDisplayValue("");
4507
- setAnchorEl(null);
4508
- }
4509
- },
4510
- "Clear"
4511
- )
4512
- ))
4513
- )))));
4514
- }
4515
- );
4046
+ "Clear"
4047
+ )
4048
+ ))
4049
+ )))));
4050
+ });
4516
4051
  DateRangePicker.displayName = "DateRangePicker";
4517
4052
 
4518
4053
  // src/components/DialogContent/DialogContent.tsx
@@ -4582,17 +4117,7 @@ var StyledDialogFrame = styled17(ModalDialog, {
4582
4117
  });
4583
4118
  var DialogFrame = React26.forwardRef((props, ref) => {
4584
4119
  const { title, children, actions, fullscreen, ...innerProps } = props;
4585
- return /* @__PURE__ */ React26.createElement(
4586
- StyledDialogFrame,
4587
- {
4588
- layout: fullscreen ? "fullscreen" : "center",
4589
- ref,
4590
- ...innerProps
4591
- },
4592
- /* @__PURE__ */ React26.createElement(DialogTitle_default, null, title),
4593
- /* @__PURE__ */ React26.createElement(DialogContent_default, null, children),
4594
- /* @__PURE__ */ React26.createElement(DialogActions_default, null, actions)
4595
- );
4120
+ return /* @__PURE__ */ React26.createElement(StyledDialogFrame, { layout: fullscreen ? "fullscreen" : "center", ref, ...innerProps }, /* @__PURE__ */ React26.createElement(DialogTitle_default, null, title), /* @__PURE__ */ React26.createElement(DialogContent_default, null, children), /* @__PURE__ */ React26.createElement(DialogActions_default, null, actions));
4596
4121
  });
4597
4122
  DialogFrame.displayName = "DialogFrame";
4598
4123
 
@@ -4631,11 +4156,7 @@ import React28, { useCallback as useCallback11 } from "react";
4631
4156
  import { Stack as Stack2 } from "@mui/joy";
4632
4157
  function CheckboxGroup(props) {
4633
4158
  const { id, label, options, value, onChange, hidden } = props;
4634
- const [internalValue, setInternalValue] = useControlledState(
4635
- value,
4636
- [],
4637
- onChange
4638
- );
4159
+ const [internalValue, setInternalValue] = useControlledState(value, [], onChange);
4639
4160
  const handleCheckboxChange = useCallback11(
4640
4161
  (optionValue) => (event) => {
4641
4162
  const checked = event.target.checked;
@@ -4652,16 +4173,7 @@ function CheckboxGroup(props) {
4652
4173
  if (hidden) {
4653
4174
  return null;
4654
4175
  }
4655
- return /* @__PURE__ */ React28.createElement(Stack2, { spacing: 3, role: "group", "aria-labelledby": id }, !!label && /* @__PURE__ */ React28.createElement(
4656
- Typography_default,
4657
- {
4658
- id,
4659
- level: "title-sm",
4660
- component: "label",
4661
- textColor: "text.tertiary"
4662
- },
4663
- label
4664
- ), options.map((option) => /* @__PURE__ */ React28.createElement(
4176
+ return /* @__PURE__ */ React28.createElement(Stack2, { spacing: 3, role: "group", "aria-labelledby": id }, !!label && /* @__PURE__ */ React28.createElement(Typography_default, { id, level: "title-sm", component: "label", textColor: "text.tertiary" }, label), options.map((option) => /* @__PURE__ */ React28.createElement(
4665
4177
  Checkbox_default,
4666
4178
  {
4667
4179
  key: `${id}-${option.value}`,
@@ -4690,11 +4202,7 @@ RadioGroup.displayName = "RadioGroup";
4690
4202
  import { Stack as Stack3 } from "@mui/joy";
4691
4203
  function RadioGroup2(props) {
4692
4204
  const { id, label, options, value, onChange, hidden } = props;
4693
- const [internalValue, setInternalValue] = useControlledState(
4694
- value,
4695
- value ?? "",
4696
- onChange
4697
- );
4205
+ const [internalValue, setInternalValue] = useControlledState(value, value ?? "", onChange);
4698
4206
  const handleRadioChange = useCallback12(
4699
4207
  (event) => {
4700
4208
  const newValue = event.target.value;
@@ -4707,31 +4215,7 @@ function RadioGroup2(props) {
4707
4215
  if (hidden) {
4708
4216
  return null;
4709
4217
  }
4710
- return /* @__PURE__ */ React29.createElement(Stack3, { spacing: 3, role: "group", "aria-labelledby": id }, !!label && /* @__PURE__ */ React29.createElement(Stack3, { spacing: 1 }, /* @__PURE__ */ React29.createElement(
4711
- Typography_default,
4712
- {
4713
- id,
4714
- level: "title-sm",
4715
- component: "label",
4716
- textColor: "text.tertiary"
4717
- },
4718
- label
4719
- )), /* @__PURE__ */ React29.createElement(
4720
- RadioGroup,
4721
- {
4722
- name: id,
4723
- value: internalValue?.toString(),
4724
- onChange: handleRadioChange
4725
- },
4726
- options.map((option) => /* @__PURE__ */ React29.createElement(
4727
- Radio,
4728
- {
4729
- key: `${id}-${option.value}`,
4730
- value: option.value.toString(),
4731
- label: option.label
4732
- }
4733
- ))
4734
- ));
4218
+ return /* @__PURE__ */ React29.createElement(Stack3, { spacing: 3, role: "group", "aria-labelledby": id }, !!label && /* @__PURE__ */ React29.createElement(Stack3, { spacing: 1 }, /* @__PURE__ */ React29.createElement(Typography_default, { id, level: "title-sm", component: "label", textColor: "text.tertiary" }, label)), /* @__PURE__ */ React29.createElement(RadioGroup, { name: id, value: internalValue?.toString(), onChange: handleRadioChange }, options.map((option) => /* @__PURE__ */ React29.createElement(Radio, { key: `${id}-${option.value}`, value: option.value.toString(), label: option.label }))));
4735
4219
  }
4736
4220
  RadioGroup2.displayName = "RadioGroup";
4737
4221
 
@@ -4754,11 +4238,7 @@ function DateRange(props) {
4754
4238
  inputReadOnly,
4755
4239
  hideClearButton
4756
4240
  } = props;
4757
- const [internalValue, setInternalValue] = useControlledState(
4758
- value,
4759
- null,
4760
- onChange
4761
- );
4241
+ const [internalValue, setInternalValue] = useControlledState(value, null, onChange);
4762
4242
  const [selectedOption, setSelectedOption] = useState8("all-time");
4763
4243
  const dateRangeOptions = useMemo10(
4764
4244
  () => [
@@ -4787,28 +4267,19 @@ function DateRange(props) {
4787
4267
  case "this-month": {
4788
4268
  const startOfMonth = new Date(currentYear, currentMonth, 1);
4789
4269
  const endOfMonth = new Date(currentYear, currentMonth + 1, 0);
4790
- return [
4791
- formatDate(startOfMonth),
4792
- formatDate(endOfMonth)
4793
- ];
4270
+ return [formatDate(startOfMonth), formatDate(endOfMonth)];
4794
4271
  }
4795
4272
  case "this-year": {
4796
4273
  const startOfYear = new Date(currentYear, 0, 1);
4797
4274
  const endOfYear = new Date(currentYear, 11, 31);
4798
- return [
4799
- formatDate(startOfYear),
4800
- formatDate(endOfYear)
4801
- ];
4275
+ return [formatDate(startOfYear), formatDate(endOfYear)];
4802
4276
  }
4803
4277
  case "last-month": {
4804
4278
  const lastMonthYear = currentMonth === 0 ? currentYear - 1 : currentYear;
4805
4279
  const lastMonth = currentMonth === 0 ? 11 : currentMonth - 1;
4806
4280
  const startOfLastMonth = new Date(lastMonthYear, lastMonth, 1);
4807
4281
  const endOfLastMonth = new Date(lastMonthYear, lastMonth + 1, 0);
4808
- return [
4809
- formatDate(startOfLastMonth),
4810
- formatDate(endOfLastMonth)
4811
- ];
4282
+ return [formatDate(startOfLastMonth), formatDate(endOfLastMonth)];
4812
4283
  }
4813
4284
  case "custom":
4814
4285
  return internalValue;
@@ -4871,31 +4342,7 @@ function DateRange(props) {
4871
4342
  if (hidden) {
4872
4343
  return null;
4873
4344
  }
4874
- return /* @__PURE__ */ React30.createElement(Stack4, { spacing: 3, role: "group", "aria-labelledby": id }, !!label && /* @__PURE__ */ React30.createElement(
4875
- Typography_default,
4876
- {
4877
- id,
4878
- level: "title-sm",
4879
- component: "label",
4880
- textColor: "text.tertiary"
4881
- },
4882
- label
4883
- ), /* @__PURE__ */ React30.createElement(
4884
- RadioGroup,
4885
- {
4886
- name: `${id}-options`,
4887
- value: selectedOption,
4888
- onChange: handleOptionChange
4889
- },
4890
- dateRangeOptions.map((option) => /* @__PURE__ */ React30.createElement(
4891
- Radio,
4892
- {
4893
- key: `${id}-${option.value}`,
4894
- value: option.value,
4895
- label: option.label
4896
- }
4897
- ))
4898
- ), selectedOption === "custom" && /* @__PURE__ */ React30.createElement(
4345
+ return /* @__PURE__ */ React30.createElement(Stack4, { spacing: 3, role: "group", "aria-labelledby": id }, !!label && /* @__PURE__ */ React30.createElement(Typography_default, { id, level: "title-sm", component: "label", textColor: "text.tertiary" }, label), /* @__PURE__ */ React30.createElement(RadioGroup, { name: `${id}-options`, value: selectedOption, onChange: handleOptionChange }, dateRangeOptions.map((option) => /* @__PURE__ */ React30.createElement(Radio, { key: `${id}-${option.value}`, value: option.value, label: option.label }))), selectedOption === "custom" && /* @__PURE__ */ React30.createElement(
4899
4346
  DateRangePicker,
4900
4347
  {
4901
4348
  value: customDateRangeValue,
@@ -4917,22 +4364,8 @@ DateRange.displayName = "DateRange";
4917
4364
  import React31, { useCallback as useCallback14 } from "react";
4918
4365
  import { Stack as Stack5 } from "@mui/joy";
4919
4366
  function CurrencyInput3(props) {
4920
- const {
4921
- id,
4922
- label,
4923
- value,
4924
- onChange,
4925
- hidden,
4926
- max,
4927
- placeholder,
4928
- useMinorUnit,
4929
- currency = "USD"
4930
- } = props;
4931
- const [internalValue, setInternalValue] = useControlledState(
4932
- value,
4933
- value,
4934
- onChange
4935
- );
4367
+ const { id, label, value, onChange, hidden, max, placeholder, useMinorUnit, currency = "USD" } = props;
4368
+ const [internalValue, setInternalValue] = useControlledState(value, value, onChange);
4936
4369
  const handleCurrencyChange = useCallback14(
4937
4370
  (event) => {
4938
4371
  const newValue = event.target.value;
@@ -4943,16 +4376,7 @@ function CurrencyInput3(props) {
4943
4376
  if (hidden) {
4944
4377
  return null;
4945
4378
  }
4946
- return /* @__PURE__ */ React31.createElement(Stack5, { spacing: 3, role: "group", "aria-labelledby": id }, !!label && /* @__PURE__ */ React31.createElement(
4947
- Typography_default,
4948
- {
4949
- id,
4950
- level: "title-sm",
4951
- component: "label",
4952
- textColor: "text.tertiary"
4953
- },
4954
- label
4955
- ), /* @__PURE__ */ React31.createElement(
4379
+ return /* @__PURE__ */ React31.createElement(Stack5, { spacing: 3, role: "group", "aria-labelledby": id }, !!label && /* @__PURE__ */ React31.createElement(Typography_default, { id, level: "title-sm", component: "label", textColor: "text.tertiary" }, label), /* @__PURE__ */ React31.createElement(
4956
4380
  CurrencyInput,
4957
4381
  {
4958
4382
  value: internalValue,
@@ -4971,22 +4395,8 @@ CurrencyInput3.displayName = "CurrencyInput";
4971
4395
  import React32, { useCallback as useCallback15 } from "react";
4972
4396
  import { Stack as Stack6 } from "@mui/joy";
4973
4397
  function CurrencyRange(props) {
4974
- const {
4975
- id,
4976
- label,
4977
- value,
4978
- onChange,
4979
- hidden,
4980
- max,
4981
- placeholder,
4982
- useMinorUnit,
4983
- currency = "USD"
4984
- } = props;
4985
- const [internalValue, setInternalValue] = useControlledState(
4986
- value,
4987
- null,
4988
- onChange
4989
- );
4398
+ const { id, label, value, onChange, hidden, max, placeholder, useMinorUnit, currency = "USD" } = props;
4399
+ const [internalValue, setInternalValue] = useControlledState(value, null, onChange);
4990
4400
  const minValue = internalValue?.[0];
4991
4401
  const maxValue = internalValue?.[1];
4992
4402
  const handleMinChange = useCallback15(
@@ -5020,16 +4430,7 @@ function CurrencyRange(props) {
5020
4430
  if (hidden) {
5021
4431
  return null;
5022
4432
  }
5023
- return /* @__PURE__ */ React32.createElement(Stack6, { spacing: 3, role: "group", "aria-labelledby": id }, !!label && /* @__PURE__ */ React32.createElement(
5024
- Typography_default,
5025
- {
5026
- id,
5027
- level: "title-sm",
5028
- component: "label",
5029
- textColor: "text.tertiary"
5030
- },
5031
- label
5032
- ), /* @__PURE__ */ React32.createElement(Stack6, { direction: "row", spacing: 2, alignItems: "flex-end" }, /* @__PURE__ */ React32.createElement(
4433
+ return /* @__PURE__ */ React32.createElement(Stack6, { spacing: 3, role: "group", "aria-labelledby": id }, !!label && /* @__PURE__ */ React32.createElement(Typography_default, { id, level: "title-sm", component: "label", textColor: "text.tertiary" }, label), /* @__PURE__ */ React32.createElement(Stack6, { direction: "row", spacing: 2, alignItems: "flex-end" }, /* @__PURE__ */ React32.createElement(
5033
4434
  CurrencyInput,
5034
4435
  {
5035
4436
  label: "Minimum",
@@ -5071,115 +4472,112 @@ var padDecimal = (value, decimalScale) => {
5071
4472
  const [integer, decimal = ""] = `${value}`.split(".");
5072
4473
  return Number(`${integer}${decimal.padEnd(decimalScale, "0")}`);
5073
4474
  };
5074
- var TextMaskAdapter7 = React33.forwardRef(
5075
- function TextMaskAdapter8(props, ref) {
5076
- const { onChange, min, max, ...innerProps } = props;
5077
- return /* @__PURE__ */ React33.createElement(
5078
- NumericFormat2,
5079
- {
5080
- ...innerProps,
5081
- onValueChange: ({ value }) => {
5082
- onChange?.({
5083
- target: {
5084
- name: props.name,
5085
- value
5086
- }
5087
- });
5088
- },
5089
- valueIsNumericString: true,
5090
- thousandSeparator: true,
5091
- suffix: "%",
5092
- getInputRef: ref,
5093
- allowNegative: true
5094
- }
5095
- );
5096
- }
5097
- );
4475
+ var TextMaskAdapter7 = React33.forwardRef(function TextMaskAdapter8(props, ref) {
4476
+ const { onChange, min, max, ...innerProps } = props;
4477
+ return /* @__PURE__ */ React33.createElement(
4478
+ NumericFormat2,
4479
+ {
4480
+ ...innerProps,
4481
+ onValueChange: ({ value }) => {
4482
+ onChange?.({
4483
+ target: {
4484
+ name: props.name,
4485
+ value
4486
+ }
4487
+ });
4488
+ },
4489
+ valueIsNumericString: true,
4490
+ thousandSeparator: true,
4491
+ suffix: "%",
4492
+ getInputRef: ref,
4493
+ allowNegative: true
4494
+ }
4495
+ );
4496
+ });
5098
4497
  var PercentageInputRoot = styled19(Input_default, {
5099
4498
  name: "PercentageInput",
5100
4499
  slot: "Root",
5101
4500
  overridesResolver: (props, styles) => styles.root
5102
4501
  })({});
5103
- var PercentageInput = React33.forwardRef(function PercentageInput2(inProps, ref) {
5104
- const props = useThemeProps6({ props: inProps, name: "PercentageInput" });
5105
- const {
5106
- name,
5107
- onChange,
5108
- label,
5109
- error,
5110
- helperText,
5111
- required,
5112
- disabled,
5113
- useMinorUnit,
5114
- maxDecimalScale = 0,
5115
- min,
5116
- max,
5117
- // NOTE: 스타일 관련된 props는 최상위 엘리먼트에 적용한다.
5118
- sx,
5119
- className,
5120
- ...innerProps
5121
- } = props;
5122
- const [_value, setValue] = useControlledState(
5123
- props.value,
5124
- props.defaultValue,
5125
- useCallback16(
5126
- (value2) => onChange?.({ target: { name, value: value2 } }),
5127
- [onChange, name]
5128
- )
5129
- );
5130
- const [internalError, setInternalError] = useState9(
5131
- max && _value && _value > max || min && _value && _value < min
5132
- );
5133
- const value = useMemo11(() => {
5134
- if (_value && useMinorUnit) {
5135
- return _value / Math.pow(10, maxDecimalScale);
5136
- }
5137
- return _value;
5138
- }, [_value, useMinorUnit, maxDecimalScale]);
5139
- const handleChange = useCallback16(
5140
- (event) => {
5141
- if (event.target.value === "") {
5142
- setValue(void 0);
5143
- return;
5144
- }
5145
- const originalAmount = Number(event.target.value);
5146
- if (min && originalAmount < min || max && originalAmount > max) {
5147
- setInternalError(true);
5148
- } else {
5149
- setInternalError(false);
5150
- }
5151
- const amount = useMinorUnit ? padDecimal(originalAmount, maxDecimalScale) : originalAmount;
5152
- setValue(amount);
5153
- },
5154
- [setValue, useMinorUnit, maxDecimalScale, min, max]
5155
- );
5156
- return /* @__PURE__ */ React33.createElement(
5157
- PercentageInputRoot,
5158
- {
5159
- ...innerProps,
5160
- ref,
5161
- value,
5162
- onChange: handleChange,
5163
- error: internalError || error,
5164
- disabled,
5165
- required,
5166
- color: internalError || error ? "danger" : props.color,
4502
+ var PercentageInput = React33.forwardRef(
4503
+ function PercentageInput2(inProps, ref) {
4504
+ const props = useThemeProps6({ props: inProps, name: "PercentageInput" });
4505
+ const {
4506
+ name,
4507
+ onChange,
5167
4508
  label,
4509
+ error,
5168
4510
  helperText,
5169
- slotProps: {
5170
- input: {
5171
- component: TextMaskAdapter7,
5172
- "aria-label": innerProps["aria-label"],
5173
- decimalScale: maxDecimalScale
4511
+ required,
4512
+ disabled,
4513
+ useMinorUnit,
4514
+ maxDecimalScale = 0,
4515
+ min,
4516
+ max,
4517
+ // NOTE: 스타일 관련된 props는 최상위 엘리먼트에 적용한다.
4518
+ sx,
4519
+ className,
4520
+ ...innerProps
4521
+ } = props;
4522
+ const [_value, setValue] = useControlledState(
4523
+ props.value,
4524
+ props.defaultValue,
4525
+ useCallback16((value2) => onChange?.({ target: { name, value: value2 } }), [onChange, name])
4526
+ );
4527
+ const [internalError, setInternalError] = useState9(
4528
+ max && _value && _value > max || min && _value && _value < min
4529
+ );
4530
+ const value = useMemo11(() => {
4531
+ if (_value && useMinorUnit) {
4532
+ return _value / Math.pow(10, maxDecimalScale);
4533
+ }
4534
+ return _value;
4535
+ }, [_value, useMinorUnit, maxDecimalScale]);
4536
+ const handleChange = useCallback16(
4537
+ (event) => {
4538
+ if (event.target.value === "") {
4539
+ setValue(void 0);
4540
+ return;
5174
4541
  }
4542
+ const originalAmount = Number(event.target.value);
4543
+ if (min && originalAmount < min || max && originalAmount > max) {
4544
+ setInternalError(true);
4545
+ } else {
4546
+ setInternalError(false);
4547
+ }
4548
+ const amount = useMinorUnit ? padDecimal(originalAmount, maxDecimalScale) : originalAmount;
4549
+ setValue(amount);
5175
4550
  },
5176
- sx: {
5177
- ...sx
5178
- },
5179
- className
5180
- }
5181
- );
5182
- });
4551
+ [setValue, useMinorUnit, maxDecimalScale, min, max]
4552
+ );
4553
+ return /* @__PURE__ */ React33.createElement(
4554
+ PercentageInputRoot,
4555
+ {
4556
+ ...innerProps,
4557
+ ref,
4558
+ value,
4559
+ onChange: handleChange,
4560
+ error: internalError || error,
4561
+ disabled,
4562
+ required,
4563
+ color: internalError || error ? "danger" : props.color,
4564
+ label,
4565
+ helperText,
4566
+ slotProps: {
4567
+ input: {
4568
+ component: TextMaskAdapter7,
4569
+ "aria-label": innerProps["aria-label"],
4570
+ decimalScale: maxDecimalScale
4571
+ }
4572
+ },
4573
+ sx: {
4574
+ ...sx
4575
+ },
4576
+ className
4577
+ }
4578
+ );
4579
+ }
4580
+ );
5183
4581
  PercentageInput.displayName = "PercentageInput";
5184
4582
 
5185
4583
  // src/components/FilterMenu/components/PercentageInput.tsx
@@ -5199,16 +4597,7 @@ var PercentageInput3 = ({
5199
4597
  if (hidden) {
5200
4598
  return null;
5201
4599
  }
5202
- return /* @__PURE__ */ React34.createElement(Stack7, { spacing: 3, role: "group", "aria-labelledby": id }, !!label && /* @__PURE__ */ React34.createElement(
5203
- Typography2,
5204
- {
5205
- id,
5206
- level: "title-sm",
5207
- component: "label",
5208
- textColor: "text.tertiary"
5209
- },
5210
- label
5211
- ), /* @__PURE__ */ React34.createElement(
4600
+ return /* @__PURE__ */ React34.createElement(Stack7, { spacing: 3, role: "group", "aria-labelledby": id }, !!label && /* @__PURE__ */ React34.createElement(Typography2, { id, level: "title-sm", component: "label", textColor: "text.tertiary" }, label), /* @__PURE__ */ React34.createElement(
5212
4601
  PercentageInput,
5213
4602
  {
5214
4603
  value: _value,
@@ -5226,18 +4615,12 @@ var PercentageInput3 = ({
5226
4615
  import React35, { useCallback as useCallback17 } from "react";
5227
4616
  import { Stack as Stack8 } from "@mui/joy";
5228
4617
  function PercentageRange(props) {
5229
- const {
5230
- id,
5231
- label,
4618
+ const { id, label, value, onChange, hidden, useMinorUnit, maxDecimalScale, min, max } = props;
4619
+ const [internalValue, setInternalValue] = useControlledState(
5232
4620
  value,
5233
- onChange,
5234
- hidden,
5235
- useMinorUnit,
5236
- maxDecimalScale,
5237
- min,
5238
- max
5239
- } = props;
5240
- const [internalValue, setInternalValue] = useControlledState(value, null, onChange);
4621
+ null,
4622
+ onChange
4623
+ );
5241
4624
  const minValue = internalValue?.[0];
5242
4625
  const maxValue = internalValue?.[1];
5243
4626
  const handleMinChange = useCallback17(
@@ -5267,16 +4650,7 @@ function PercentageRange(props) {
5267
4650
  if (hidden) {
5268
4651
  return null;
5269
4652
  }
5270
- return /* @__PURE__ */ React35.createElement(Stack8, { spacing: 3, role: "group", "aria-labelledby": id }, !!label && /* @__PURE__ */ React35.createElement(
5271
- Typography_default,
5272
- {
5273
- id,
5274
- level: "title-sm",
5275
- component: "label",
5276
- textColor: "text.tertiary"
5277
- },
5278
- label
5279
- ), /* @__PURE__ */ React35.createElement(Stack8, { direction: "row", spacing: 2, alignItems: "flex-end" }, /* @__PURE__ */ React35.createElement(
4653
+ return /* @__PURE__ */ React35.createElement(Stack8, { spacing: 3, role: "group", "aria-labelledby": id }, !!label && /* @__PURE__ */ React35.createElement(Typography_default, { id, level: "title-sm", component: "label", textColor: "text.tertiary" }, label), /* @__PURE__ */ React35.createElement(Stack8, { direction: "row", spacing: 2, alignItems: "flex-end" }, /* @__PURE__ */ React35.createElement(
5280
4654
  PercentageInput,
5281
4655
  {
5282
4656
  label: "Minimum",
@@ -5313,11 +4687,7 @@ import React36, { useCallback as useCallback18 } from "react";
5313
4687
  import { Stack as Stack9 } from "@mui/joy";
5314
4688
  function Autocomplete2(props) {
5315
4689
  const { id, label, value, onChange, options, multiple, hidden, placeholder } = props;
5316
- const [internalValue, setInternalValue] = useControlledState(
5317
- value,
5318
- void 0,
5319
- onChange
5320
- );
4690
+ const [internalValue, setInternalValue] = useControlledState(value, void 0, onChange);
5321
4691
  const autocompleteValue = typeof internalValue === "string" || typeof internalValue === "number" ? String(internalValue) : void 0;
5322
4692
  const handleChange = useCallback18(
5323
4693
  (event) => {
@@ -5334,16 +4704,7 @@ function Autocomplete2(props) {
5334
4704
  if (hidden) {
5335
4705
  return null;
5336
4706
  }
5337
- return /* @__PURE__ */ React36.createElement(Stack9, { spacing: 3, role: "group", "aria-labelledby": id }, !!label && /* @__PURE__ */ React36.createElement(
5338
- Typography_default,
5339
- {
5340
- id,
5341
- level: "title-sm",
5342
- component: "label",
5343
- textColor: "text.tertiary"
5344
- },
5345
- label
5346
- ), /* @__PURE__ */ React36.createElement(
4707
+ return /* @__PURE__ */ React36.createElement(Stack9, { spacing: 3, role: "group", "aria-labelledby": id }, !!label && /* @__PURE__ */ React36.createElement(Typography_default, { id, level: "title-sm", component: "label", textColor: "text.tertiary" }, label), /* @__PURE__ */ React36.createElement(
5347
4708
  Autocomplete,
5348
4709
  {
5349
4710
  value: autocompleteValue,
@@ -5369,16 +4730,7 @@ var componentMap = {
5369
4730
  autocomplete: Autocomplete2
5370
4731
  };
5371
4732
  function FilterMenu(props) {
5372
- const {
5373
- filters,
5374
- values,
5375
- defaultValues,
5376
- resetValues = {},
5377
- onChange,
5378
- onClose,
5379
- useClear,
5380
- useReset
5381
- } = props;
4733
+ const { filters, values, defaultValues, resetValues = {}, onChange, onClose, useClear, useReset } = props;
5382
4734
  const [internalValues, setInternalValues] = useControlledState(
5383
4735
  values,
5384
4736
  defaultValues || {},
@@ -5428,37 +4780,13 @@ function FilterMenu(props) {
5428
4780
  }
5429
4781
  ) : null;
5430
4782
  }))),
5431
- /* @__PURE__ */ React37.createElement(DialogActions, { sx: { justifyContent: "space-between" } }, useClear && filters?.length === 1 && /* @__PURE__ */ React37.createElement(
5432
- Button2,
5433
- {
5434
- variant: "plain",
5435
- color: "neutral",
5436
- size: "md",
5437
- onClick: handleClear
5438
- },
5439
- "Clear"
5440
- ), useReset && !useClear && /* @__PURE__ */ React37.createElement(
5441
- Button2,
5442
- {
5443
- variant: "plain",
5444
- color: "neutral",
5445
- size: "md",
5446
- onClick: handleClear
5447
- },
5448
- "Reset"
5449
- ), /* @__PURE__ */ React37.createElement(Button2, { variant: "solid", color: "primary", size: "md", onClick: handleApply }, "Apply"))
4783
+ /* @__PURE__ */ React37.createElement(DialogActions, { sx: { justifyContent: "space-between" } }, useClear && filters?.length === 1 && /* @__PURE__ */ React37.createElement(Button2, { variant: "plain", color: "neutral", size: "md", onClick: handleClear }, "Clear"), useReset && !useClear && /* @__PURE__ */ React37.createElement(Button2, { variant: "plain", color: "neutral", size: "md", onClick: handleClear }, "Reset"), /* @__PURE__ */ React37.createElement(Button2, { variant: "solid", color: "primary", size: "md", onClick: handleApply }, "Apply"))
5450
4784
  );
5451
4785
  }
5452
4786
  FilterMenu.displayName = "FilterMenu";
5453
4787
 
5454
4788
  // src/components/Uploader/Uploader.tsx
5455
- import React38, {
5456
- useCallback as useCallback20,
5457
- useEffect as useEffect8,
5458
- useMemo as useMemo12,
5459
- useRef as useRef6,
5460
- useState as useState10
5461
- } from "react";
4789
+ import React38, { useCallback as useCallback20, useEffect as useEffect8, useMemo as useMemo12, useRef as useRef6, useState as useState10 } from "react";
5462
4790
  import { styled as styled20, Input as Input2 } from "@mui/joy";
5463
4791
  import MuiFileUploadIcon from "@mui/icons-material/CloudUploadRounded";
5464
4792
  import MuiUploadFileIcon from "@mui/icons-material/UploadFileRounded";
@@ -5517,52 +4845,11 @@ var ClearIcon2 = styled20(MuiClearIcon, {
5517
4845
  width: "18px",
5518
4846
  height: "18px"
5519
4847
  }));
5520
- var UNITS = [
5521
- "byte",
5522
- "kilobyte",
5523
- "megabyte",
5524
- "gigabyte",
5525
- "terabyte",
5526
- "petabyte"
5527
- ];
4848
+ var UNITS = ["byte", "kilobyte", "megabyte", "gigabyte", "terabyte", "petabyte"];
5528
4849
  var ALL_EXTENSIONS_BY_TYPE = {
5529
- "image/*": [
5530
- ".jpeg",
5531
- ".jpg",
5532
- ".png",
5533
- ".gif",
5534
- ".bmp",
5535
- ".tiff",
5536
- ".svg",
5537
- ".webp",
5538
- ".heic",
5539
- ".ico"
5540
- ],
5541
- "audio/*": [
5542
- ".mp3",
5543
- ".wav",
5544
- ".flac",
5545
- ".aac",
5546
- ".ogg",
5547
- ".m4a",
5548
- ".wma",
5549
- ".aiff",
5550
- ".alac",
5551
- ".midi",
5552
- ".mp4"
5553
- ],
5554
- "video/*": [
5555
- ".mp4",
5556
- ".avi",
5557
- ".mkv",
5558
- ".mov",
5559
- ".wmv",
5560
- ".flv",
5561
- ".webm",
5562
- ".mpeg",
5563
- ".3gp",
5564
- ".m4v"
5565
- ]
4850
+ "image/*": [".jpeg", ".jpg", ".png", ".gif", ".bmp", ".tiff", ".svg", ".webp", ".heic", ".ico"],
4851
+ "audio/*": [".mp3", ".wav", ".flac", ".aac", ".ogg", ".m4a", ".wma", ".aiff", ".alac", ".midi", ".mp4"],
4852
+ "video/*": [".mp4", ".avi", ".mkv", ".mov", ".wmv", ".flv", ".webm", ".mpeg", ".3gp", ".m4v"]
5566
4853
  };
5567
4854
  var getFileSize = (n) => {
5568
4855
  const i = n == 0 ? 0 : Math.floor(Math.log(n) / Math.log(1024));
@@ -5576,16 +4863,7 @@ var getFileSize = (n) => {
5576
4863
  };
5577
4864
  var Preview = (props) => {
5578
4865
  const { files, uploaded, onDelete } = props;
5579
- return /* @__PURE__ */ React38.createElement(PreviewRoot, { gap: 1 }, [...uploaded, ...files].map((file) => /* @__PURE__ */ React38.createElement(UploadCard, { key: file.name, size: "sm", color: "neutral" }, /* @__PURE__ */ React38.createElement(Stack_default, { direction: "row", alignItems: "center", gap: 2 }, /* @__PURE__ */ React38.createElement(UploadFileIcon, null), /* @__PURE__ */ React38.createElement(Stack_default, { flex: "1" }, /* @__PURE__ */ React38.createElement(Typography_default, { level: "body-sm", textColor: "common.black" }, file.name), !!file.size && /* @__PURE__ */ React38.createElement(
5580
- Typography_default,
5581
- {
5582
- level: "body-xs",
5583
- fontWeight: "300",
5584
- lineHeight: "1.33",
5585
- textColor: "text.tertiary"
5586
- },
5587
- getFileSize(file.size)
5588
- )), /* @__PURE__ */ React38.createElement(IconButton_default, { onClick: () => onDelete?.(file) }, /* @__PURE__ */ React38.createElement(ClearIcon2, null))))));
4866
+ return /* @__PURE__ */ React38.createElement(PreviewRoot, { gap: 1 }, [...uploaded, ...files].map((file) => /* @__PURE__ */ React38.createElement(UploadCard, { key: file.name, size: "sm", color: "neutral" }, /* @__PURE__ */ React38.createElement(Stack_default, { direction: "row", alignItems: "center", gap: 2 }, /* @__PURE__ */ React38.createElement(UploadFileIcon, null), /* @__PURE__ */ React38.createElement(Stack_default, { flex: "1" }, /* @__PURE__ */ React38.createElement(Typography_default, { level: "body-sm", textColor: "common.black" }, file.name), !!file.size && /* @__PURE__ */ React38.createElement(Typography_default, { level: "body-xs", fontWeight: "300", lineHeight: "1.33", textColor: "text.tertiary" }, getFileSize(file.size))), /* @__PURE__ */ React38.createElement(IconButton_default, { onClick: () => onDelete?.(file) }, /* @__PURE__ */ React38.createElement(ClearIcon2, null))))));
5589
4867
  };
5590
4868
  var UploaderRoot = styled20(Stack_default, {
5591
4869
  name: "Uploader",
@@ -5597,31 +4875,27 @@ var FileDropZone = styled20(Sheet_default, {
5597
4875
  name: "Uploader",
5598
4876
  slot: "dropZone",
5599
4877
  shouldForwardProp: (prop) => prop !== "error"
5600
- })(
5601
- ({ theme, state, error }) => ({
5602
- width: "100%",
5603
- display: "flex",
5604
- flexDirection: "column",
5605
- justifyContent: "center",
5606
- alignItems: "center",
5607
- padding: theme.spacing(5),
5608
- gap: theme.spacing(4),
5609
- cursor: "pointer",
5610
- backgroundColor: theme.palette.background.surface,
5611
- border: error ? `1px solid ${theme.palette.danger.outlinedBorder}` : state === "idle" ? `1px solid ${theme.palette.neutral.outlinedBorder}` : `1px solid ${theme.palette.primary.outlinedBorder}`
5612
- })
5613
- );
4878
+ })(({ theme, state, error }) => ({
4879
+ width: "100%",
4880
+ display: "flex",
4881
+ flexDirection: "column",
4882
+ justifyContent: "center",
4883
+ alignItems: "center",
4884
+ padding: theme.spacing(5),
4885
+ gap: theme.spacing(4),
4886
+ cursor: "pointer",
4887
+ backgroundColor: theme.palette.background.surface,
4888
+ border: error ? `1px solid ${theme.palette.danger.outlinedBorder}` : state === "idle" ? `1px solid ${theme.palette.neutral.outlinedBorder}` : `1px solid ${theme.palette.primary.outlinedBorder}`
4889
+ }));
5614
4890
  var UploaderIcon = styled20(MuiFileUploadIcon, {
5615
4891
  name: "Uploader",
5616
4892
  slot: "iconContainer",
5617
4893
  shouldForwardProp: (prop) => prop !== "error"
5618
- })(
5619
- ({ theme, state, error }) => ({
5620
- color: error ? `rgba(${theme.vars.palette.danger.mainChannel} / 0.6)` : state === "over" ? `rgba(${theme.palette.primary.mainChannel} / 0.6)` : theme.palette.neutral.softActiveBg,
5621
- width: "32px",
5622
- height: "32px"
5623
- })
5624
- );
4894
+ })(({ theme, state, error }) => ({
4895
+ color: error ? `rgba(${theme.vars.palette.danger.mainChannel} / 0.6)` : state === "over" ? `rgba(${theme.palette.primary.mainChannel} / 0.6)` : theme.palette.neutral.softActiveBg,
4896
+ width: "32px",
4897
+ height: "32px"
4898
+ }));
5625
4899
  var Uploader = React38.memo(
5626
4900
  (props) => {
5627
4901
  const {
@@ -5641,14 +4915,9 @@ var Uploader = React38.memo(
5641
4915
  const inputRef = useRef6(null);
5642
4916
  const [errorText, setErrorText] = useState10();
5643
4917
  const [files, setFiles] = useState10([]);
5644
- const [uploaded, setUploaded] = useState10(
5645
- props.uploaded || []
5646
- );
4918
+ const [uploaded, setUploaded] = useState10(props.uploaded || []);
5647
4919
  const [previewState, setPreviewState] = useState10("idle");
5648
- const accepts = useMemo12(
5649
- () => accept.split(",").map((accept2) => accept2.trim()),
5650
- [accept]
5651
- );
4920
+ const accepts = useMemo12(() => accept.split(",").map((accept2) => accept2.trim()), [accept]);
5652
4921
  const parsedAccepts = useMemo12(
5653
4922
  () => accepts.flatMap((type) => {
5654
4923
  if (["image/*", "video/*", "audio/*"].includes(type)) {
@@ -5660,15 +4929,11 @@ var Uploader = React38.memo(
5660
4929
  );
5661
4930
  const helperText = useMemo12(() => {
5662
4931
  const [allAcceptedTypes, acceptedTypes] = [
5663
- accepts.filter(
5664
- (accept2) => ["image/*", "video/*", "audio/*"].includes(accept2)
5665
- ).map((accept2) => {
4932
+ accepts.filter((accept2) => ["image/*", "video/*", "audio/*"].includes(accept2)).map((accept2) => {
5666
4933
  const [type] = accept2.split("/");
5667
4934
  return type.toLowerCase();
5668
4935
  }),
5669
- accepts.filter(
5670
- (accept2) => !["image/*", "video/*", "audio/*"].includes(accept2)
5671
- ).map((accept2) => {
4936
+ accepts.filter((accept2) => !["image/*", "video/*", "audio/*"].includes(accept2)).map((accept2) => {
5672
4937
  const [extensionOrType, subType] = accept2.split("/");
5673
4938
  if (!subType) {
5674
4939
  return extensionOrType.toUpperCase().replace(".", "");
@@ -5685,16 +4950,11 @@ var Uploader = React38.memo(
5685
4950
  }
5686
4951
  helperTexts.push(`Maximum ${getFileSize(maxFileTotalSize)}`);
5687
4952
  if (maxCount) {
5688
- helperTexts.push(
5689
- `Up to ${maxCount} ${maxCount === 1 ? "file" : "files"}`
5690
- );
4953
+ helperTexts.push(`Up to ${maxCount} ${maxCount === 1 ? "file" : "files"}`);
5691
4954
  }
5692
4955
  return helperTexts.join(", ");
5693
4956
  }, [accepts, maxFileTotalSize, maxCount]);
5694
- const error = useMemo12(
5695
- () => !!errorText || props.error,
5696
- [props.error, errorText]
5697
- );
4957
+ const error = useMemo12(() => !!errorText || props.error, [props.error, errorText]);
5698
4958
  const showDropZone = useMemo12(
5699
4959
  () => !maxCount || maxCount && [...uploaded, ...files].length !== maxCount,
5700
4960
  [files, maxCount, uploaded]
@@ -5721,10 +4981,7 @@ var Uploader = React38.memo(
5721
4981
  }
5722
4982
  });
5723
4983
  }
5724
- const totalFileSize = [...files, ...uploads].reduce(
5725
- (acc, file) => acc + file.size,
5726
- 0
5727
- );
4984
+ const totalFileSize = [...files, ...uploads].reduce((acc, file) => acc + file.size, 0);
5728
4985
  if (totalFileSize > maxFileTotalSize) {
5729
4986
  throw new Error(`Total File size exceeded the maximum limit.`);
5730
4987
  }
@@ -5745,34 +5002,15 @@ var Uploader = React38.memo(
5745
5002
  setErrorText(err.message);
5746
5003
  }
5747
5004
  },
5748
- [
5749
- files,
5750
- uploaded,
5751
- maxCount,
5752
- parsedAccepts,
5753
- maxFileSize,
5754
- maxFileTotalSize,
5755
- name,
5756
- onChange
5757
- ]
5005
+ [files, uploaded, maxCount, parsedAccepts, maxFileSize, maxFileTotalSize, name, onChange]
5758
5006
  );
5759
5007
  useEffect8(() => {
5760
5008
  if (!dropZoneRef.current || disabled) {
5761
5009
  return;
5762
5010
  }
5763
5011
  let cleanup;
5764
- Promise.all([
5765
- esmFiles.combine,
5766
- esmFiles.adapter,
5767
- esmFiles.file,
5768
- esmFiles.preventUnhandled
5769
- ]).then(
5770
- ([
5771
- combineModule,
5772
- adapterModule,
5773
- fileModule,
5774
- preventUnhandledModule
5775
- ]) => {
5012
+ Promise.all([esmFiles.combine, esmFiles.adapter, esmFiles.file, esmFiles.preventUnhandled]).then(
5013
+ ([combineModule, adapterModule, fileModule, preventUnhandledModule]) => {
5776
5014
  const { combine } = combineModule;
5777
5015
  const { dropTargetForExternal, monitorForExternal } = adapterModule;
5778
5016
  const { containsFiles, getFiles } = fileModule;
@@ -5807,9 +5045,7 @@ var Uploader = React38.memo(
5807
5045
  useEffect8(() => {
5808
5046
  if (inputRef.current && minCount) {
5809
5047
  if (files.length < minCount) {
5810
- inputRef.current.setCustomValidity(
5811
- `At least ${minCount} files are required.`
5812
- );
5048
+ inputRef.current.setCustomValidity(`At least ${minCount} files are required.`);
5813
5049
  } else {
5814
5050
  inputRef.current.setCustomValidity("");
5815
5051
  }
@@ -5835,9 +5071,7 @@ var Uploader = React38.memo(
5835
5071
  return current.filter((file) => file !== deletedFile);
5836
5072
  });
5837
5073
  } else {
5838
- setUploaded(
5839
- (uploaded2) => uploaded2.filter((file) => file.id !== deletedFile.id)
5840
- );
5074
+ setUploaded((uploaded2) => uploaded2.filter((file) => file.id !== deletedFile.id));
5841
5075
  onDelete?.(deletedFile);
5842
5076
  }
5843
5077
  setErrorText(void 0);
@@ -5863,9 +5097,7 @@ var Uploader = React38.memo(
5863
5097
  required: !!minCount,
5864
5098
  onInvalid: (e) => {
5865
5099
  if (minCount && files.length < minCount) {
5866
- setErrorText(
5867
- `Please choose ${minCount} ${minCount === 1 ? "file" : "files"} to upload.`
5868
- );
5100
+ setErrorText(`Please choose ${minCount} ${minCount === 1 ? "file" : "files"} to upload.`);
5869
5101
  }
5870
5102
  },
5871
5103
  slotProps: {
@@ -5881,25 +5113,7 @@ var Uploader = React38.memo(
5881
5113
  }
5882
5114
  )
5883
5115
  );
5884
- return /* @__PURE__ */ React38.createElement(UploaderRoot, null, showDropZone && /* @__PURE__ */ React38.createElement(
5885
- FormControl_default,
5886
- {
5887
- size,
5888
- error: !!(error || errorText),
5889
- disabled,
5890
- required: !!minCount
5891
- },
5892
- label && /* @__PURE__ */ React38.createElement(FormLabel_default, null, label),
5893
- uploader,
5894
- /* @__PURE__ */ React38.createElement(FormHelperText_default, null, /* @__PURE__ */ React38.createElement(Stack_default, null, errorText && /* @__PURE__ */ React38.createElement("div", null, errorText), /* @__PURE__ */ React38.createElement("div", null, helperText)))
5895
- ), [...uploaded, ...files].length > 0 && /* @__PURE__ */ React38.createElement(
5896
- Preview,
5897
- {
5898
- files,
5899
- uploaded,
5900
- onDelete: handleDeleteFile
5901
- }
5902
- ));
5116
+ return /* @__PURE__ */ React38.createElement(UploaderRoot, null, showDropZone && /* @__PURE__ */ React38.createElement(FormControl_default, { size, error: !!(error || errorText), disabled, required: !!minCount }, label && /* @__PURE__ */ React38.createElement(FormLabel_default, null, label), uploader, /* @__PURE__ */ React38.createElement(FormHelperText_default, null, /* @__PURE__ */ React38.createElement(Stack_default, null, errorText && /* @__PURE__ */ React38.createElement("div", null, errorText), /* @__PURE__ */ React38.createElement("div", null, helperText)))), [...uploaded, ...files].length > 0 && /* @__PURE__ */ React38.createElement(Preview, { files, uploaded, onDelete: handleDeleteFile }));
5903
5117
  }
5904
5118
  );
5905
5119
  Uploader.displayName = "Uploader";
@@ -5909,10 +5123,7 @@ import { Grid } from "@mui/joy";
5909
5123
 
5910
5124
  // src/components/IconMenuButton/IconMenuButton.tsx
5911
5125
  import React39 from "react";
5912
- import {
5913
- MenuButton as JoyMenuButton2,
5914
- IconButton as JoyIconButton2
5915
- } from "@mui/joy";
5126
+ import { MenuButton as JoyMenuButton2, IconButton as JoyIconButton2 } from "@mui/joy";
5916
5127
  function IconMenuButton(props) {
5917
5128
  const {
5918
5129
  size,
@@ -5956,15 +5167,7 @@ function IconMenuButton(props) {
5956
5167
  }
5957
5168
  },
5958
5169
  icon
5959
- ), /* @__PURE__ */ React39.createElement(Menu, { placement, size }, items.map((i) => /* @__PURE__ */ React39.createElement(
5960
- MenuItem,
5961
- {
5962
- key: i.text,
5963
- component: i.component,
5964
- ...i.componentProps ?? {}
5965
- },
5966
- i.text
5967
- ))));
5170
+ ), /* @__PURE__ */ React39.createElement(Menu, { placement, size }, items.map((i) => /* @__PURE__ */ React39.createElement(MenuItem, { key: i.text, component: i.component, ...i.componentProps ?? {} }, i.text))));
5968
5171
  }
5969
5172
  IconMenuButton.displayName = "IconMenuButton";
5970
5173
 
@@ -5998,61 +5201,39 @@ var Markdown = (props) => {
5998
5201
  if (!rehypeAccent2) {
5999
5202
  return null;
6000
5203
  }
6001
- return /* @__PURE__ */ React40.createElement(
6002
- Typography,
5204
+ return /* @__PURE__ */ React40.createElement(Typography, { component: "div", color, textColor, level: defaultLevel, ...innerProps }, /* @__PURE__ */ React40.createElement(
5205
+ Suspense,
6003
5206
  {
6004
- component: "div",
6005
- color,
6006
- textColor,
6007
- level: defaultLevel,
6008
- ...innerProps
5207
+ fallback: fallback || /* @__PURE__ */ React40.createElement(Typography, null, /* @__PURE__ */ React40.createElement(Skeleton, null, content || ""))
6009
5208
  },
6010
5209
  /* @__PURE__ */ React40.createElement(
6011
- Suspense,
5210
+ LazyReactMarkdown,
6012
5211
  {
6013
- fallback: fallback || /* @__PURE__ */ React40.createElement(Typography, null, /* @__PURE__ */ React40.createElement(Skeleton, null, content || ""))
6014
- },
6015
- /* @__PURE__ */ React40.createElement(
6016
- LazyReactMarkdown,
6017
- {
6018
- ...markdownOptions,
6019
- children: content,
6020
- rehypePlugins: [[rehypeAccent2, { accentColor }]],
6021
- remarkPlugins: [remarkGfm],
6022
- components: {
6023
- h1: ({ children }) => /* @__PURE__ */ React40.createElement(Typography, { color, textColor, level: "h1" }, children),
6024
- h2: ({ children }) => /* @__PURE__ */ React40.createElement(Typography, { color, textColor, level: "h2" }, children),
6025
- h3: ({ children }) => /* @__PURE__ */ React40.createElement(Typography, { color, textColor, level: "h3" }, children),
6026
- h4: ({ children }) => /* @__PURE__ */ React40.createElement(Typography, { color, textColor, level: "h4" }, children),
6027
- p: ({ children, node }) => /* @__PURE__ */ React40.createElement(
6028
- Typography,
6029
- {
6030
- color,
6031
- textColor,
6032
- level: defaultLevel,
6033
- ...node?.properties
6034
- },
6035
- children
6036
- ),
6037
- a: ({ children, href }) => /* @__PURE__ */ React40.createElement(Link2, { href, target: defaultLinkAction }, children),
6038
- hr: () => /* @__PURE__ */ React40.createElement(Divider, null),
6039
- b: ({ children }) => /* @__PURE__ */ React40.createElement(Typography, { fontWeight: boldFontWeight }, children),
6040
- strong: ({ children }) => /* @__PURE__ */ React40.createElement(Typography, { fontWeight: boldFontWeight }, children),
6041
- ...markdownOptions?.components
6042
- }
5212
+ ...markdownOptions,
5213
+ children: content,
5214
+ rehypePlugins: [[rehypeAccent2, { accentColor }]],
5215
+ remarkPlugins: [remarkGfm],
5216
+ components: {
5217
+ h1: ({ children }) => /* @__PURE__ */ React40.createElement(Typography, { color, textColor, level: "h1" }, children),
5218
+ h2: ({ children }) => /* @__PURE__ */ React40.createElement(Typography, { color, textColor, level: "h2" }, children),
5219
+ h3: ({ children }) => /* @__PURE__ */ React40.createElement(Typography, { color, textColor, level: "h3" }, children),
5220
+ h4: ({ children }) => /* @__PURE__ */ React40.createElement(Typography, { color, textColor, level: "h4" }, children),
5221
+ p: ({ children, node }) => /* @__PURE__ */ React40.createElement(Typography, { color, textColor, level: defaultLevel, ...node?.properties }, children),
5222
+ a: ({ children, href }) => /* @__PURE__ */ React40.createElement(Link2, { href, target: defaultLinkAction }, children),
5223
+ hr: () => /* @__PURE__ */ React40.createElement(Divider, null),
5224
+ b: ({ children }) => /* @__PURE__ */ React40.createElement(Typography, { fontWeight: boldFontWeight }, children),
5225
+ strong: ({ children }) => /* @__PURE__ */ React40.createElement(Typography, { fontWeight: boldFontWeight }, children),
5226
+ ...markdownOptions?.components
6043
5227
  }
6044
- )
5228
+ }
6045
5229
  )
6046
- );
5230
+ ));
6047
5231
  };
6048
5232
  Markdown.displayName = "Markdown";
6049
5233
 
6050
5234
  // src/components/MenuButton/MenuButton.tsx
6051
5235
  import React41 from "react";
6052
- import {
6053
- MenuButton as JoyMenuButton3,
6054
- Button as JoyButton2
6055
- } from "@mui/joy";
5236
+ import { MenuButton as JoyMenuButton3, Button as JoyButton2 } from "@mui/joy";
6056
5237
  import ExpandMoreIcon from "@mui/icons-material/ExpandMore";
6057
5238
  function MenuButton(props) {
6058
5239
  const {
@@ -6099,27 +5280,12 @@ function MenuButton(props) {
6099
5280
  endDecorator: showIcon ? /* @__PURE__ */ React41.createElement(React41.Fragment, null, endDecorator, /* @__PURE__ */ React41.createElement(ExpandMoreIcon, null)) : /* @__PURE__ */ React41.createElement(React41.Fragment, null, endDecorator)
6100
5281
  },
6101
5282
  buttonText
6102
- ), /* @__PURE__ */ React41.createElement(Menu, { placement, size }, items.map((i) => /* @__PURE__ */ React41.createElement(
6103
- MenuItem,
6104
- {
6105
- key: i.text,
6106
- component: i.component,
6107
- ...i.componentProps ?? {}
6108
- },
6109
- i.text
6110
- ))));
5283
+ ), /* @__PURE__ */ React41.createElement(Menu, { placement, size }, items.map((i) => /* @__PURE__ */ React41.createElement(MenuItem, { key: i.text, component: i.component, ...i.componentProps ?? {} }, i.text))));
6111
5284
  }
6112
5285
  MenuButton.displayName = "MenuButton";
6113
5286
 
6114
5287
  // src/components/MonthPicker/MonthPicker.tsx
6115
- import React42, {
6116
- forwardRef as forwardRef9,
6117
- useCallback as useCallback21,
6118
- useEffect as useEffect10,
6119
- useImperativeHandle as useImperativeHandle4,
6120
- useRef as useRef7,
6121
- useState as useState12
6122
- } from "react";
5288
+ import React42, { forwardRef as forwardRef9, useCallback as useCallback21, useEffect as useEffect10, useImperativeHandle as useImperativeHandle4, useRef as useRef7, useState as useState12 } from "react";
6123
5289
  import CalendarTodayIcon3 from "@mui/icons-material/CalendarToday";
6124
5290
  import { styled as styled21, useThemeProps as useThemeProps7 } from "@mui/joy";
6125
5291
  import { FocusTrap as FocusTrap3, ClickAwayListener as ClickAwayListener3, Popper as Popper4 } from "@mui/base";
@@ -6174,226 +5340,205 @@ function parseDate3(dateString, format) {
6174
5340
  const result = new Date(year, month, day);
6175
5341
  return result;
6176
5342
  }
6177
- var MonthPicker = forwardRef9(
6178
- (inProps, ref) => {
6179
- const props = useThemeProps7({ props: inProps, name: "MonthPicker" });
6180
- const {
6181
- onChange,
6182
- disabled,
6183
- label,
6184
- error,
6185
- helperText,
6186
- minDate,
6187
- maxDate,
6188
- disableFuture,
6189
- disablePast,
6190
- required,
6191
- // NOTE: 스타일 관련된 props는 최상위 엘리먼트에 적용한다.
6192
- sx,
6193
- className,
6194
- /**
6195
- * NOTE: 현재 CalendarDate는 YYYY-MM-DD로 개발하고 있어 date를 포함하여 value를 관리한다.
6196
- * @see https://ecubelabs.atlassian.net/wiki/spaces/SW/pages/1938784349/Date#CalendarDate
6197
- * @see https://github.com/Ecube-Labs/hds/pull/145
6198
- */
6199
- format = "YYYY/MM/DD",
6200
- displayFormat = "YYYY/MM",
6201
- size,
6202
- locale,
6203
- ...innerProps
6204
- } = props;
6205
- const innerRef = useRef7(null);
6206
- const buttonRef = useRef7(null);
6207
- const [value, setValue, isControlled] = useControlledState(
6208
- props.value,
6209
- props.defaultValue || "",
6210
- useCallback21(
6211
- (value2) => onChange?.({ target: { name: props.name, value: value2 } }),
6212
- [props.name, onChange]
6213
- )
6214
- );
6215
- const getFormattedDisplayValue = useCallback21(
6216
- (inputValue) => {
6217
- if (!inputValue) return "";
6218
- try {
6219
- return formatValueString3(
6220
- parseDate3(inputValue, format),
6221
- displayFormat,
6222
- locale
6223
- );
6224
- } catch (e) {
6225
- return inputValue;
6226
- }
6227
- },
6228
- [format, displayFormat, locale]
6229
- );
6230
- const [displayValue, setDisplayValue] = useState12(
6231
- () => getFormattedDisplayValue(value)
6232
- );
6233
- const [anchorEl, setAnchorEl] = useState12(null);
6234
- const open = Boolean(anchorEl);
6235
- useEffect10(() => {
6236
- if (!anchorEl) {
6237
- innerRef.current?.blur();
5343
+ var MonthPicker = forwardRef9((inProps, ref) => {
5344
+ const props = useThemeProps7({ props: inProps, name: "MonthPicker" });
5345
+ const {
5346
+ onChange,
5347
+ disabled,
5348
+ label,
5349
+ error,
5350
+ helperText,
5351
+ minDate,
5352
+ maxDate,
5353
+ disableFuture,
5354
+ disablePast,
5355
+ required,
5356
+ // NOTE: 스타일 관련된 props는 최상위 엘리먼트에 적용한다.
5357
+ sx,
5358
+ className,
5359
+ /**
5360
+ * NOTE: 현재 CalendarDate는 YYYY-MM-DD로 개발하고 있어 date를 포함하여 value를 관리한다.
5361
+ * @see https://ecubelabs.atlassian.net/wiki/spaces/SW/pages/1938784349/Date#CalendarDate
5362
+ * @see https://github.com/Ecube-Labs/hds/pull/145
5363
+ */
5364
+ format = "YYYY/MM/DD",
5365
+ displayFormat = "YYYY/MM",
5366
+ size,
5367
+ locale,
5368
+ ...innerProps
5369
+ } = props;
5370
+ const innerRef = useRef7(null);
5371
+ const buttonRef = useRef7(null);
5372
+ const [value, setValue, isControlled] = useControlledState(
5373
+ props.value,
5374
+ props.defaultValue || "",
5375
+ useCallback21((value2) => onChange?.({ target: { name: props.name, value: value2 } }), [props.name, onChange])
5376
+ );
5377
+ const getFormattedDisplayValue = useCallback21(
5378
+ (inputValue) => {
5379
+ if (!inputValue) return "";
5380
+ try {
5381
+ return formatValueString3(parseDate3(inputValue, format), displayFormat, locale);
5382
+ } catch (e) {
5383
+ return inputValue;
5384
+ }
5385
+ },
5386
+ [format, displayFormat, locale]
5387
+ );
5388
+ const [displayValue, setDisplayValue] = useState12(() => getFormattedDisplayValue(value));
5389
+ const [anchorEl, setAnchorEl] = useState12(null);
5390
+ const open = Boolean(anchorEl);
5391
+ useEffect10(() => {
5392
+ if (!anchorEl) {
5393
+ innerRef.current?.blur();
5394
+ }
5395
+ }, [anchorEl, innerRef]);
5396
+ useImperativeHandle4(ref, () => innerRef.current, [innerRef]);
5397
+ useEffect10(() => {
5398
+ setDisplayValue(getFormattedDisplayValue(value));
5399
+ }, [value, getFormattedDisplayValue]);
5400
+ const handleChange = useCallback21(
5401
+ (event) => {
5402
+ const newValue = event.target.value;
5403
+ setValue(newValue);
5404
+ if (!isControlled) {
5405
+ setDisplayValue(getFormattedDisplayValue(newValue));
6238
5406
  }
6239
- }, [anchorEl, innerRef]);
6240
- useImperativeHandle4(ref, () => innerRef.current, [
6241
- innerRef
6242
- ]);
6243
- useEffect10(() => {
6244
- setDisplayValue(getFormattedDisplayValue(value));
6245
- }, [value, getFormattedDisplayValue]);
6246
- const handleChange = useCallback21(
6247
- (event) => {
6248
- const newValue = event.target.value;
6249
- setValue(newValue);
6250
- if (!isControlled) {
6251
- setDisplayValue(getFormattedDisplayValue(newValue));
5407
+ },
5408
+ [setValue, getFormattedDisplayValue, isControlled]
5409
+ );
5410
+ const handleCalendarToggle = useCallback21(
5411
+ (event) => {
5412
+ setAnchorEl(anchorEl ? null : event.currentTarget);
5413
+ innerRef.current?.focus();
5414
+ },
5415
+ [anchorEl, setAnchorEl, innerRef]
5416
+ );
5417
+ const handleInputMouseDown = useCallback21(
5418
+ (event) => {
5419
+ event.preventDefault();
5420
+ buttonRef.current?.focus();
5421
+ },
5422
+ [buttonRef]
5423
+ );
5424
+ return /* @__PURE__ */ React42.createElement(MonthPickerRoot, null, /* @__PURE__ */ React42.createElement(FocusTrap3, { open: true }, /* @__PURE__ */ React42.createElement(React42.Fragment, null, /* @__PURE__ */ React42.createElement(
5425
+ Input_default,
5426
+ {
5427
+ ...innerProps,
5428
+ color: error ? "danger" : innerProps.color,
5429
+ ref: innerRef,
5430
+ size,
5431
+ value: displayValue,
5432
+ placeholder: displayFormat,
5433
+ disabled,
5434
+ required,
5435
+ slotProps: {
5436
+ input: {
5437
+ ref: innerRef,
5438
+ format: displayFormat,
5439
+ sx: {
5440
+ "&:hover": {
5441
+ cursor: "default"
5442
+ }
5443
+ },
5444
+ onMouseDown: handleInputMouseDown
6252
5445
  }
6253
5446
  },
6254
- [setValue, getFormattedDisplayValue, isControlled]
6255
- );
6256
- const handleCalendarToggle = useCallback21(
6257
- (event) => {
6258
- setAnchorEl(anchorEl ? null : event.currentTarget);
6259
- innerRef.current?.focus();
6260
- },
6261
- [anchorEl, setAnchorEl, innerRef]
6262
- );
6263
- const handleInputMouseDown = useCallback21(
6264
- (event) => {
6265
- event.preventDefault();
6266
- buttonRef.current?.focus();
5447
+ error,
5448
+ className,
5449
+ sx: {
5450
+ ...sx,
5451
+ // NOTE: placeholder char 를 텍스트로 표시하므로 동일한 너비를 가지는 mono font 를 사용해야 이질감이 없다.
5452
+ fontFamily: "monospace"
6267
5453
  },
6268
- [buttonRef]
6269
- );
6270
- return /* @__PURE__ */ React42.createElement(MonthPickerRoot, null, /* @__PURE__ */ React42.createElement(FocusTrap3, { open: true }, /* @__PURE__ */ React42.createElement(React42.Fragment, null, /* @__PURE__ */ React42.createElement(
6271
- Input_default,
6272
- {
6273
- ...innerProps,
6274
- color: error ? "danger" : innerProps.color,
6275
- ref: innerRef,
6276
- size,
6277
- value: displayValue,
6278
- placeholder: displayFormat,
6279
- disabled,
6280
- required,
6281
- slotProps: {
6282
- input: {
6283
- ref: innerRef,
6284
- format: displayFormat,
6285
- sx: {
6286
- "&:hover": {
6287
- cursor: "default"
6288
- }
6289
- },
6290
- onMouseDown: handleInputMouseDown
6291
- }
5454
+ endDecorator: /* @__PURE__ */ React42.createElement(
5455
+ IconButton_default,
5456
+ {
5457
+ ref: buttonRef,
5458
+ variant: "plain",
5459
+ onClick: handleCalendarToggle,
5460
+ "aria-label": "Toggle Calendar",
5461
+ "aria-controls": "month-picker-popper",
5462
+ "aria-haspopup": "dialog",
5463
+ "aria-expanded": open,
5464
+ disabled
6292
5465
  },
6293
- error,
6294
- className,
6295
- sx: {
6296
- ...sx,
6297
- // NOTE: placeholder char 를 텍스트로 표시하므로 동일한 너비를 가지는 mono font 를 사용해야 이질감이 없다.
6298
- fontFamily: "monospace"
5466
+ /* @__PURE__ */ React42.createElement(CalendarTodayIcon3, null)
5467
+ ),
5468
+ label,
5469
+ helperText
5470
+ }
5471
+ ), open && /* @__PURE__ */ React42.createElement(ClickAwayListener3, { onClickAway: () => setAnchorEl(null) }, /* @__PURE__ */ React42.createElement(
5472
+ StyledPopper3,
5473
+ {
5474
+ id: "month-picker-popper",
5475
+ open: true,
5476
+ anchorEl,
5477
+ placement: "bottom-end",
5478
+ onMouseDown: (e) => e.preventDefault(),
5479
+ modifiers: [
5480
+ {
5481
+ name: "offset",
5482
+ options: {
5483
+ offset: [4, 4]
5484
+ }
5485
+ }
5486
+ ],
5487
+ "aria-label": "Calendar Tooltip",
5488
+ "aria-expanded": open
5489
+ },
5490
+ /* @__PURE__ */ React42.createElement(CalendarSheet3, { tabIndex: -1, role: "presentation" }, /* @__PURE__ */ React42.createElement(
5491
+ Calendar_default,
5492
+ {
5493
+ view: "month",
5494
+ views: ["month"],
5495
+ value: !Number.isNaN(new Date(value).getTime()) ? [new Date(value), void 0] : void 0,
5496
+ onChange: ([date]) => {
5497
+ handleChange({
5498
+ target: {
5499
+ name: props.name,
5500
+ value: formatValueString3(date, format, locale)
5501
+ }
5502
+ });
5503
+ setAnchorEl(null);
6299
5504
  },
6300
- endDecorator: /* @__PURE__ */ React42.createElement(
6301
- IconButton_default,
6302
- {
6303
- ref: buttonRef,
6304
- variant: "plain",
6305
- onClick: handleCalendarToggle,
6306
- "aria-label": "Toggle Calendar",
6307
- "aria-controls": "month-picker-popper",
6308
- "aria-haspopup": "dialog",
6309
- "aria-expanded": open,
6310
- disabled
6311
- },
6312
- /* @__PURE__ */ React42.createElement(CalendarTodayIcon3, null)
6313
- ),
6314
- label,
6315
- helperText
5505
+ minDate: minDate ? new Date(minDate) : void 0,
5506
+ maxDate: maxDate ? new Date(maxDate) : void 0,
5507
+ disableFuture,
5508
+ disablePast,
5509
+ locale
6316
5510
  }
6317
- ), open && /* @__PURE__ */ React42.createElement(ClickAwayListener3, { onClickAway: () => setAnchorEl(null) }, /* @__PURE__ */ React42.createElement(
6318
- StyledPopper3,
5511
+ ), /* @__PURE__ */ React42.createElement(
5512
+ DialogActions_default,
6319
5513
  {
6320
- id: "month-picker-popper",
6321
- open: true,
6322
- anchorEl,
6323
- placement: "bottom-end",
6324
- onMouseDown: (e) => e.preventDefault(),
6325
- modifiers: [
6326
- {
6327
- name: "offset",
6328
- options: {
6329
- offset: [4, 4]
6330
- }
6331
- }
6332
- ],
6333
- "aria-label": "Calendar Tooltip",
6334
- "aria-expanded": open
5514
+ sx: {
5515
+ p: 1
5516
+ }
6335
5517
  },
6336
- /* @__PURE__ */ React42.createElement(CalendarSheet3, { tabIndex: -1, role: "presentation" }, /* @__PURE__ */ React42.createElement(
6337
- Calendar_default,
5518
+ /* @__PURE__ */ React42.createElement(
5519
+ Button_default,
6338
5520
  {
6339
- view: "month",
6340
- views: ["month"],
6341
- value: !Number.isNaN(new Date(value).getTime()) ? [new Date(value), void 0] : void 0,
6342
- onChange: ([date]) => {
5521
+ size,
5522
+ variant: "plain",
5523
+ color: "neutral",
5524
+ onClick: () => {
6343
5525
  handleChange({
6344
5526
  target: {
6345
5527
  name: props.name,
6346
- value: formatValueString3(date, format, locale)
5528
+ value: ""
6347
5529
  }
6348
5530
  });
6349
5531
  setAnchorEl(null);
6350
- },
6351
- minDate: minDate ? new Date(minDate) : void 0,
6352
- maxDate: maxDate ? new Date(maxDate) : void 0,
6353
- disableFuture,
6354
- disablePast,
6355
- locale
6356
- }
6357
- ), /* @__PURE__ */ React42.createElement(
6358
- DialogActions_default,
6359
- {
6360
- sx: {
6361
- p: 1
6362
5532
  }
6363
5533
  },
6364
- /* @__PURE__ */ React42.createElement(
6365
- Button_default,
6366
- {
6367
- size,
6368
- variant: "plain",
6369
- color: "neutral",
6370
- onClick: () => {
6371
- handleChange({
6372
- target: {
6373
- name: props.name,
6374
- value: ""
6375
- }
6376
- });
6377
- setAnchorEl(null);
6378
- }
6379
- },
6380
- "Clear"
6381
- )
6382
- ))
6383
- )))));
6384
- }
6385
- );
5534
+ "Clear"
5535
+ )
5536
+ ))
5537
+ )))));
5538
+ });
6386
5539
 
6387
5540
  // src/components/MonthRangePicker/MonthRangePicker.tsx
6388
- import React43, {
6389
- forwardRef as forwardRef10,
6390
- useCallback as useCallback22,
6391
- useEffect as useEffect11,
6392
- useImperativeHandle as useImperativeHandle5,
6393
- useMemo as useMemo13,
6394
- useRef as useRef8,
6395
- useState as useState13
6396
- } from "react";
5541
+ import React43, { forwardRef as forwardRef10, useCallback as useCallback22, useEffect as useEffect11, useImperativeHandle as useImperativeHandle5, useMemo as useMemo13, useRef as useRef8, useState as useState13 } from "react";
6397
5542
  import { IMaskInput as IMaskInput3, IMask as IMask3 } from "react-imask";
6398
5543
  import CalendarTodayIcon4 from "@mui/icons-material/CalendarToday";
6399
5544
  import { styled as styled22, useThemeProps as useThemeProps8 } from "@mui/joy";
@@ -6451,196 +5596,184 @@ var parseDates2 = (str) => {
6451
5596
  var formatToPattern3 = (format) => {
6452
5597
  return `${format} - ${format}`.replace(/YYYY/g, "Y").replace(/MM/g, "m").replace(/[^YMm\s]/g, (match) => `${match}\``);
6453
5598
  };
6454
- var TextMaskAdapter9 = React43.forwardRef(
6455
- function TextMaskAdapter10(props, ref) {
6456
- const { onChange, format, ...other } = props;
6457
- return /* @__PURE__ */ React43.createElement(
6458
- IMaskInput3,
6459
- {
6460
- ...other,
6461
- inputRef: ref,
6462
- onAccept: (value) => onChange({ target: { name: props.name, value } }),
6463
- mask: Date,
6464
- pattern: formatToPattern3(format),
6465
- blocks: {
6466
- m: {
6467
- mask: IMask3.MaskedRange,
6468
- from: 1,
6469
- to: 12,
6470
- maxLength: 2
6471
- },
6472
- Y: {
6473
- mask: IMask3.MaskedRange,
6474
- from: 1900,
6475
- to: 9999
6476
- }
5599
+ var TextMaskAdapter9 = React43.forwardRef(function TextMaskAdapter10(props, ref) {
5600
+ const { onChange, format, ...other } = props;
5601
+ return /* @__PURE__ */ React43.createElement(
5602
+ IMaskInput3,
5603
+ {
5604
+ ...other,
5605
+ inputRef: ref,
5606
+ onAccept: (value) => onChange({ target: { name: props.name, value } }),
5607
+ mask: Date,
5608
+ pattern: formatToPattern3(format),
5609
+ blocks: {
5610
+ m: {
5611
+ mask: IMask3.MaskedRange,
5612
+ from: 1,
5613
+ to: 12,
5614
+ maxLength: 2
6477
5615
  },
6478
- format: (dates) => formatValueString4(dates, format),
6479
- parse: parseDates2,
6480
- autofix: "pad",
6481
- overwrite: true
6482
- }
6483
- );
6484
- }
6485
- );
6486
- var MonthRangePicker = forwardRef10(
6487
- (inProps, ref) => {
6488
- const props = useThemeProps8({ props: inProps, name: "MonthRangePicker" });
6489
- const {
6490
- onChange,
5616
+ Y: {
5617
+ mask: IMask3.MaskedRange,
5618
+ from: 1900,
5619
+ to: 9999
5620
+ }
5621
+ },
5622
+ format: (dates) => formatValueString4(dates, format),
5623
+ parse: parseDates2,
5624
+ autofix: "pad",
5625
+ overwrite: true
5626
+ }
5627
+ );
5628
+ });
5629
+ var MonthRangePicker = forwardRef10((inProps, ref) => {
5630
+ const props = useThemeProps8({ props: inProps, name: "MonthRangePicker" });
5631
+ const {
5632
+ onChange,
5633
+ disabled,
5634
+ label,
5635
+ error,
5636
+ helperText,
5637
+ minDate,
5638
+ maxDate,
5639
+ disableFuture,
5640
+ disablePast,
5641
+ required,
5642
+ // NOTE: 스타일 관련된 props는 최상위 엘리먼트에 적용한다.
5643
+ sx,
5644
+ className,
5645
+ format = "YYYY/MM",
5646
+ size,
5647
+ ...innerProps
5648
+ } = props;
5649
+ const innerRef = useRef8(null);
5650
+ const [value, setValue] = useControlledState(
5651
+ props.value,
5652
+ props.defaultValue || "",
5653
+ useCallback22((value2) => onChange?.({ target: { name: props.name, value: value2 } }), [props.name, onChange])
5654
+ );
5655
+ const [anchorEl, setAnchorEl] = useState13(null);
5656
+ const open = Boolean(anchorEl);
5657
+ const calendarValue = useMemo13(() => value ? parseDates2(value) : void 0, [value]);
5658
+ useEffect11(() => {
5659
+ if (!anchorEl) {
5660
+ innerRef.current?.blur();
5661
+ }
5662
+ }, [anchorEl, innerRef]);
5663
+ useImperativeHandle5(ref, () => innerRef.current, [innerRef]);
5664
+ const handleChange = useCallback22(
5665
+ (event) => {
5666
+ setValue(event.target.value);
5667
+ },
5668
+ [setValue]
5669
+ );
5670
+ const handleCalendarToggle = useCallback22(
5671
+ (event) => {
5672
+ setAnchorEl(anchorEl ? null : event.currentTarget);
5673
+ innerRef.current?.focus();
5674
+ },
5675
+ [anchorEl, setAnchorEl, innerRef]
5676
+ );
5677
+ const handleCalendarChange = useCallback22(
5678
+ ([date1, date2]) => {
5679
+ if (!date1 || !date2) return;
5680
+ setValue(formatValueString4([date1, date2], format));
5681
+ setAnchorEl(null);
5682
+ },
5683
+ [setValue, setAnchorEl, format]
5684
+ );
5685
+ return /* @__PURE__ */ React43.createElement(MonthRangePickerRoot, null, /* @__PURE__ */ React43.createElement(FocusTrap4, { open: true }, /* @__PURE__ */ React43.createElement(React43.Fragment, null, /* @__PURE__ */ React43.createElement(
5686
+ Input_default,
5687
+ {
5688
+ ...innerProps,
5689
+ color: error ? "danger" : innerProps.color,
5690
+ ref,
5691
+ size,
5692
+ value,
5693
+ onChange: handleChange,
6491
5694
  disabled,
6492
- label,
6493
- error,
6494
- helperText,
6495
- minDate,
6496
- maxDate,
6497
- disableFuture,
6498
- disablePast,
6499
5695
  required,
6500
- // NOTE: 스타일 관련된 props는 최상위 엘리먼트에 적용한다.
6501
- sx,
6502
- className,
6503
- format = "YYYY/MM",
6504
- size,
6505
- ...innerProps
6506
- } = props;
6507
- const innerRef = useRef8(null);
6508
- const [value, setValue] = useControlledState(
6509
- props.value,
6510
- props.defaultValue || "",
6511
- useCallback22(
6512
- (value2) => onChange?.({ target: { name: props.name, value: value2 } }),
6513
- [props.name, onChange]
6514
- )
6515
- );
6516
- const [anchorEl, setAnchorEl] = useState13(null);
6517
- const open = Boolean(anchorEl);
6518
- const calendarValue = useMemo13(
6519
- () => value ? parseDates2(value) : void 0,
6520
- [value]
6521
- );
6522
- useEffect11(() => {
6523
- if (!anchorEl) {
6524
- innerRef.current?.blur();
6525
- }
6526
- }, [anchorEl, innerRef]);
6527
- useImperativeHandle5(ref, () => innerRef.current, [
6528
- innerRef
6529
- ]);
6530
- const handleChange = useCallback22(
6531
- (event) => {
6532
- setValue(event.target.value);
6533
- },
6534
- [setValue]
6535
- );
6536
- const handleCalendarToggle = useCallback22(
6537
- (event) => {
6538
- setAnchorEl(anchorEl ? null : event.currentTarget);
6539
- innerRef.current?.focus();
5696
+ placeholder: `${format} - ${format}`,
5697
+ slotProps: {
5698
+ input: { component: TextMaskAdapter9, ref: innerRef, format }
6540
5699
  },
6541
- [anchorEl, setAnchorEl, innerRef]
6542
- );
6543
- const handleCalendarChange = useCallback22(
6544
- ([date1, date2]) => {
6545
- if (!date1 || !date2) return;
6546
- setValue(formatValueString4([date1, date2], format));
6547
- setAnchorEl(null);
5700
+ error,
5701
+ className,
5702
+ sx: {
5703
+ ...sx,
5704
+ // NOTE: placeholder char 를 텍스트로 표시하므로 동일한 너비를 가지는 mono font 를 사용해야 이질감이 없다.
5705
+ fontFamily: "monospace"
6548
5706
  },
6549
- [setValue, setAnchorEl, format]
6550
- );
6551
- return /* @__PURE__ */ React43.createElement(MonthRangePickerRoot, null, /* @__PURE__ */ React43.createElement(FocusTrap4, { open: true }, /* @__PURE__ */ React43.createElement(React43.Fragment, null, /* @__PURE__ */ React43.createElement(
6552
- Input_default,
6553
- {
6554
- ...innerProps,
6555
- color: error ? "danger" : innerProps.color,
6556
- ref,
6557
- size,
6558
- value,
6559
- onChange: handleChange,
6560
- disabled,
6561
- required,
6562
- placeholder: `${format} - ${format}`,
6563
- slotProps: {
6564
- input: { component: TextMaskAdapter9, ref: innerRef, format }
6565
- },
6566
- error,
6567
- className,
6568
- sx: {
6569
- ...sx,
6570
- // NOTE: placeholder char 를 텍스트로 표시하므로 동일한 너비를 가지는 mono font 를 사용해야 이질감이 없다.
6571
- fontFamily: "monospace"
5707
+ endDecorator: /* @__PURE__ */ React43.createElement(
5708
+ IconButton_default,
5709
+ {
5710
+ variant: "plain",
5711
+ onClick: handleCalendarToggle,
5712
+ "aria-label": "Toggle Calendar",
5713
+ "aria-controls": "month-range-picker-popper",
5714
+ "aria-haspopup": "dialog",
5715
+ "aria-expanded": open
6572
5716
  },
6573
- endDecorator: /* @__PURE__ */ React43.createElement(
6574
- IconButton_default,
6575
- {
6576
- variant: "plain",
6577
- onClick: handleCalendarToggle,
6578
- "aria-label": "Toggle Calendar",
6579
- "aria-controls": "month-range-picker-popper",
6580
- "aria-haspopup": "dialog",
6581
- "aria-expanded": open
6582
- },
6583
- /* @__PURE__ */ React43.createElement(CalendarTodayIcon4, null)
6584
- ),
6585
- label,
6586
- helperText
5717
+ /* @__PURE__ */ React43.createElement(CalendarTodayIcon4, null)
5718
+ ),
5719
+ label,
5720
+ helperText
5721
+ }
5722
+ ), open && /* @__PURE__ */ React43.createElement(ClickAwayListener4, { onClickAway: () => setAnchorEl(null) }, /* @__PURE__ */ React43.createElement(
5723
+ StyledPopper4,
5724
+ {
5725
+ id: "month-range-picker-popper",
5726
+ open: true,
5727
+ anchorEl,
5728
+ placement: "bottom-end",
5729
+ onMouseDown: (e) => e.preventDefault(),
5730
+ modifiers: [
5731
+ {
5732
+ name: "offset",
5733
+ options: {
5734
+ offset: [4, 4]
5735
+ }
5736
+ }
5737
+ ],
5738
+ "aria-label": "Calendar Tooltip",
5739
+ "aria-expanded": open
5740
+ },
5741
+ /* @__PURE__ */ React43.createElement(CalendarSheet4, { tabIndex: -1, role: "presentation" }, /* @__PURE__ */ React43.createElement(
5742
+ Calendar_default,
5743
+ {
5744
+ view: "month",
5745
+ views: ["month"],
5746
+ rangeSelection: true,
5747
+ defaultValue: calendarValue,
5748
+ onChange: handleCalendarChange,
5749
+ minDate: minDate ? new Date(minDate) : void 0,
5750
+ maxDate: maxDate ? new Date(maxDate) : void 0,
5751
+ disableFuture,
5752
+ disablePast
6587
5753
  }
6588
- ), open && /* @__PURE__ */ React43.createElement(ClickAwayListener4, { onClickAway: () => setAnchorEl(null) }, /* @__PURE__ */ React43.createElement(
6589
- StyledPopper4,
5754
+ ), /* @__PURE__ */ React43.createElement(
5755
+ DialogActions_default,
6590
5756
  {
6591
- id: "month-range-picker-popper",
6592
- open: true,
6593
- anchorEl,
6594
- placement: "bottom-end",
6595
- onMouseDown: (e) => e.preventDefault(),
6596
- modifiers: [
6597
- {
6598
- name: "offset",
6599
- options: {
6600
- offset: [4, 4]
6601
- }
6602
- }
6603
- ],
6604
- "aria-label": "Calendar Tooltip",
6605
- "aria-expanded": open
6606
- },
6607
- /* @__PURE__ */ React43.createElement(CalendarSheet4, { tabIndex: -1, role: "presentation" }, /* @__PURE__ */ React43.createElement(
6608
- Calendar_default,
6609
- {
6610
- view: "month",
6611
- views: ["month"],
6612
- rangeSelection: true,
6613
- defaultValue: calendarValue,
6614
- onChange: handleCalendarChange,
6615
- minDate: minDate ? new Date(minDate) : void 0,
6616
- maxDate: maxDate ? new Date(maxDate) : void 0,
6617
- disableFuture,
6618
- disablePast
5757
+ sx: {
5758
+ p: 1
6619
5759
  }
6620
- ), /* @__PURE__ */ React43.createElement(
6621
- DialogActions_default,
5760
+ },
5761
+ /* @__PURE__ */ React43.createElement(
5762
+ Button_default,
6622
5763
  {
6623
- sx: {
6624
- p: 1
5764
+ size,
5765
+ variant: "plain",
5766
+ color: "neutral",
5767
+ onClick: () => {
5768
+ setValue("");
5769
+ setAnchorEl(null);
6625
5770
  }
6626
5771
  },
6627
- /* @__PURE__ */ React43.createElement(
6628
- Button_default,
6629
- {
6630
- size,
6631
- variant: "plain",
6632
- color: "neutral",
6633
- onClick: () => {
6634
- setValue("");
6635
- setAnchorEl(null);
6636
- }
6637
- },
6638
- "Clear"
6639
- )
6640
- ))
6641
- )))));
6642
- }
6643
- );
5772
+ "Clear"
5773
+ )
5774
+ ))
5775
+ )))));
5776
+ });
6644
5777
  MonthRangePicker.displayName = "MonthRangePicker";
6645
5778
 
6646
5779
  // src/components/NavigationGroup/NavigationGroup.tsx
@@ -6769,13 +5902,7 @@ Navigator.displayName = "Navigator";
6769
5902
 
6770
5903
  // src/components/ProfileMenu/ProfileMenu.tsx
6771
5904
  import React47, { useCallback as useCallback23, useMemo as useMemo14 } from "react";
6772
- import {
6773
- Dropdown as Dropdown2,
6774
- ListDivider,
6775
- menuItemClasses,
6776
- styled as styled25,
6777
- MenuButton as MenuButton2
6778
- } from "@mui/joy";
5905
+ import { Dropdown as Dropdown2, ListDivider, menuItemClasses, styled as styled25, MenuButton as MenuButton2 } from "@mui/joy";
6779
5906
  import { ClickAwayListener as ClickAwayListener5 } from "@mui/base";
6780
5907
  import DropdownIcon from "@mui/icons-material/ArrowDropDown";
6781
5908
  var StyledProfileCard = styled25(Stack, {
@@ -6784,23 +5911,9 @@ var StyledProfileCard = styled25(Stack, {
6784
5911
  })({});
6785
5912
  function ProfileCard(props) {
6786
5913
  const { children, chip, caption, size } = props;
6787
- const captionLevel = useMemo14(
6788
- () => size === "sm" ? "body-xs" : "body-sm",
6789
- [size]
6790
- );
6791
- const nameLevel = useMemo14(
6792
- () => size === "sm" ? "body-sm" : "body-md",
6793
- [size]
6794
- );
6795
- return /* @__PURE__ */ React47.createElement(StyledProfileCard, { px: 4, py: 2 }, /* @__PURE__ */ React47.createElement(Stack, { direction: "row", gap: 2 }, /* @__PURE__ */ React47.createElement(
6796
- Typography,
6797
- {
6798
- level: nameLevel,
6799
- fontWeight: "bold",
6800
- textColor: "text.primary"
6801
- },
6802
- children
6803
- ), chip && /* @__PURE__ */ React47.createElement(Chip, { size, color: "neutral", variant: "outlined" }, chip)), caption && /* @__PURE__ */ React47.createElement(Typography, { level: captionLevel, textColor: "text.tertiary" }, caption));
5914
+ const captionLevel = useMemo14(() => size === "sm" ? "body-xs" : "body-sm", [size]);
5915
+ const nameLevel = useMemo14(() => size === "sm" ? "body-sm" : "body-md", [size]);
5916
+ return /* @__PURE__ */ React47.createElement(StyledProfileCard, { px: 4, py: 2 }, /* @__PURE__ */ React47.createElement(Stack, { direction: "row", gap: 2 }, /* @__PURE__ */ React47.createElement(Typography, { level: nameLevel, fontWeight: "bold", textColor: "text.primary" }, children), chip && /* @__PURE__ */ React47.createElement(Chip, { size, color: "neutral", variant: "outlined" }, chip)), caption && /* @__PURE__ */ React47.createElement(Typography, { level: captionLevel, textColor: "text.tertiary" }, caption));
6804
5917
  }
6805
5918
  ProfileCard.displayName = "ProfileCard";
6806
5919
  var StyledProfileMenuButton = styled25(MenuButton2, {
@@ -6821,18 +5934,7 @@ function ProfileMenuButton(props) {
6821
5934
  endDecorator: /* @__PURE__ */ React47.createElement(DropdownIcon, null),
6822
5935
  ...innerProps
6823
5936
  },
6824
- /* @__PURE__ */ React47.createElement(
6825
- Avatar,
6826
- {
6827
- variant: "soft",
6828
- color: "primary",
6829
- size,
6830
- src,
6831
- alt,
6832
- getInitial
6833
- },
6834
- children
6835
- )
5937
+ /* @__PURE__ */ React47.createElement(Avatar, { variant: "soft", color: "primary", size, src, alt, getInitial }, children)
6836
5938
  );
6837
5939
  }
6838
5940
  ProfileMenuButton.displayName = "ProfileMenuButton";
@@ -6847,16 +5949,7 @@ var ProfileMenuRoot = styled25(Menu, {
6847
5949
  }
6848
5950
  }));
6849
5951
  function ProfileMenu(props) {
6850
- const {
6851
- open: _open,
6852
- defaultOpen,
6853
- onOpenChange,
6854
- profile,
6855
- getInitial,
6856
- menuItems,
6857
- size,
6858
- ...innerProps
6859
- } = props;
5952
+ const { open: _open, defaultOpen, onOpenChange, profile, getInitial, menuItems, size, ...innerProps } = props;
6860
5953
  const [open, setOpen] = useControlledState(
6861
5954
  _open,
6862
5955
  defaultOpen ?? false,
@@ -6872,37 +5965,18 @@ function ProfileMenu(props) {
6872
5965
  getInitial
6873
5966
  },
6874
5967
  profile.name
6875
- ), /* @__PURE__ */ React47.createElement(
6876
- ProfileMenuRoot,
5968
+ ), /* @__PURE__ */ React47.createElement(ProfileMenuRoot, { size, placement: "bottom-end", ...innerProps, onClose: () => setOpen(false) }, /* @__PURE__ */ React47.createElement(ProfileCard, { size, caption: profile.caption, chip: profile.chip }, profile.name), !!menuItems.length && /* @__PURE__ */ React47.createElement(ListDivider, null), menuItems.map(({ label, ...menuProps }) => /* @__PURE__ */ React47.createElement(
5969
+ MenuItem,
6877
5970
  {
6878
- size,
6879
- placement: "bottom-end",
6880
- ...innerProps,
6881
- onClose: () => setOpen(false)
5971
+ key: label,
5972
+ ...menuProps,
5973
+ onClick: (e) => {
5974
+ menuProps.onClick?.(e);
5975
+ setOpen(false);
5976
+ }
6882
5977
  },
6883
- /* @__PURE__ */ React47.createElement(
6884
- ProfileCard,
6885
- {
6886
- size,
6887
- caption: profile.caption,
6888
- chip: profile.chip
6889
- },
6890
- profile.name
6891
- ),
6892
- !!menuItems.length && /* @__PURE__ */ React47.createElement(ListDivider, null),
6893
- menuItems.map(({ label, ...menuProps }) => /* @__PURE__ */ React47.createElement(
6894
- MenuItem,
6895
- {
6896
- key: label,
6897
- ...menuProps,
6898
- onClick: (e) => {
6899
- menuProps.onClick?.(e);
6900
- setOpen(false);
6901
- }
6902
- },
6903
- label
6904
- ))
6905
- ))));
5978
+ label
5979
+ ))))));
6906
5980
  }
6907
5981
  ProfileMenu.displayName = "ProfileMenu";
6908
5982
 
@@ -7000,11 +6074,7 @@ Stepper.displayName = "Stepper";
7000
6074
 
7001
6075
  // src/components/Switch/Switch.tsx
7002
6076
  import React50 from "react";
7003
- import {
7004
- Switch as JoySwitch,
7005
- styled as styled27,
7006
- switchClasses
7007
- } from "@mui/joy";
6077
+ import { Switch as JoySwitch, styled as styled27, switchClasses } from "@mui/joy";
7008
6078
  import { motion as motion28 } from "framer-motion";
7009
6079
  var MotionSwitch = motion28(JoySwitch);
7010
6080
  var StyledThumb = styled27(motion28.div)({
@@ -7078,13 +6148,7 @@ var TabPanel = JoyTabPanel;
7078
6148
 
7079
6149
  // src/components/ThemeProvider/ThemeProvider.tsx
7080
6150
  import React52 from "react";
7081
- import {
7082
- CssBaseline,
7083
- CssVarsProvider,
7084
- checkboxClasses,
7085
- extendTheme,
7086
- inputClasses
7087
- } from "@mui/joy";
6151
+ import { CssBaseline, CssVarsProvider, checkboxClasses, extendTheme, inputClasses } from "@mui/joy";
7088
6152
  var colorScheme = {
7089
6153
  palette: {
7090
6154
  danger: {