@ceed/ads 0.0.54 → 0.0.55

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.
@@ -7,6 +7,10 @@ export declare const useCalendar: (ownerState: CalendarOwnerState) => {
7
7
  readonly "aria-label": string;
8
8
  readonly "aria-current": "date" | undefined;
9
9
  };
10
+ getMonthCellProps: (monthIndex: number) => {
11
+ readonly "aria-label": string;
12
+ readonly "aria-current": "date" | undefined;
13
+ };
10
14
  getPickerDayProps: (day: number) => {
11
15
  readonly isToday: boolean;
12
16
  readonly isSelected: boolean | undefined;
@@ -20,9 +24,12 @@ export declare const useCalendar: (ownerState: CalendarOwnerState) => {
20
24
  };
21
25
  getPickerMonthProps: (monthIndex: number) => {
22
26
  readonly isSelected: boolean | undefined;
27
+ readonly onMouseEnter: (() => void) | undefined;
23
28
  readonly disabled: boolean | undefined;
24
29
  readonly onClick: () => void;
25
30
  readonly tabIndex: -1;
26
31
  readonly "aria-label": string;
32
+ readonly "aria-selected": "true" | undefined;
33
+ readonly "aria-current": "date" | undefined;
27
34
  };
28
35
  };
@@ -0,0 +1,21 @@
1
+ import React from "react";
2
+ interface MonthRangePickerProps {
3
+ value?: string;
4
+ onChange?: (event: {
5
+ target: {
6
+ name?: string;
7
+ value: string;
8
+ };
9
+ }) => void;
10
+ name?: string;
11
+ disabled?: boolean;
12
+ label?: React.ReactNode;
13
+ error?: boolean;
14
+ helperText?: React.ReactNode;
15
+ minDate?: Date;
16
+ maxDate?: Date;
17
+ disableFuture?: boolean;
18
+ disablePast?: boolean;
19
+ }
20
+ declare const MonthRangePicker: React.ForwardRefExoticComponent<MonthRangePickerProps & React.RefAttributes<HTMLDivElement>>;
21
+ export { MonthRangePicker };
@@ -0,0 +1,3 @@
1
+ import { MonthRangePicker } from "./MonthRangePicker";
2
+ export * from "./MonthRangePicker";
3
+ export default MonthRangePicker;
@@ -22,6 +22,7 @@ export { IconButton } from "./IconButton";
22
22
  export { Input } from "./Input";
23
23
  export { Menu, MenuButton, MenuItem } from "./Menu";
24
24
  export { Modal, ModalClose, ModalDialog, ModalOverflow, ModalFrame, } from "./Modal";
25
+ export { MonthRangePicker } from "./MonthRangePicker";
25
26
  export { Radio, RadioGroup } from "./Radio";
26
27
  export { RadioList } from "./RadioList";
27
28
  export { Select, Option } from "./Select";
package/dist/index.d.ts CHANGED
@@ -1,2 +1,2 @@
1
1
  export { boxClasses, buttonClasses, checkboxClasses, dividerClasses, iconButtonClasses, inputClasses, menuClasses, menuButtonClasses, menuItemClasses, optionClasses, radioClasses, radioGroupClasses, selectClasses, switchClasses, tableClasses, textareaClasses, typographyClasses, formControlClasses, formLabelClasses, formHelperTextClasses, gridClasses, stackClasses, sheetClasses, modalClasses, modalCloseClasses, modalDialogClasses, modalOverflowClasses, dialogTitleClasses, dialogContentClasses, dialogActionsClasses, tooltipClasses, tabsClasses, tabListClasses, tabPanelClasses, accordionClasses, accordionDetailsClasses, accordionGroupClasses as accordionsClasses, accordionSummaryClasses, Autocomplete, AutocompleteListbox, AutocompleteOption, autocompleteClasses, autocompleteListboxClasses, autocompleteOptionClasses, Avatar, avatarClasses, AvatarGroup, avatarGroupClasses, AspectRatio, aspectRatioClasses, Badge, badgeClasses, Breadcrumbs, breadcrumbsClasses, Card, cardClasses, CardActions, cardActionsClasses, CardContent, cardContentClasses, CardCover, cardCoverClasses, CardOverflow, cardOverflowClasses, Chip, chipClasses, CircularProgress, circularProgressClasses, Drawer, drawerClasses, LinearProgress, linearProgressClasses, List, listClasses, ListDivider, listDividerClasses, ListItem, listItemClasses, ListItemButton, listItemButtonClasses, ListItemContent, listItemContentClasses, ListItemDecorator, listItemDecoratorClasses, ListSubheader, listSubheaderClasses, Link, linkClasses, Slider, sliderClasses, Step, stepClasses, StepButton, stepButtonClasses, StepIndicator, Stepper, stepperClasses, Skeleton, skeletonClasses, } from "@mui/joy";
2
- export { Accordion, Accordions, AccordionDetails, AccordionSummary, Box, Button, Calendar, Checkbox, Container, DataTable, DatePicker, DateRangePicker, DialogActions, DialogContent, DialogTitle, DialogFrame, Divider, Dropdown, InsetDrawer, FormControl, FormHelperText, FormLabel, Grid, IconButton, Input, Menu, MenuButton, MenuItem, Modal, ModalClose, ModalDialog, ModalOverflow, ModalFrame, Radio, RadioGroup, RadioList, Select, Option, Sheet, Stack, Switch, Table, TableHead, TableBody, Tabs, Tab, TabList, TabPanel, Textarea, ThemeProvider, Tooltip, Typography, } from "./components";
2
+ export { Accordion, Accordions, AccordionDetails, AccordionSummary, Box, Button, Calendar, Checkbox, Container, DataTable, DatePicker, DateRangePicker, DialogActions, DialogContent, DialogTitle, DialogFrame, Divider, Dropdown, InsetDrawer, FormControl, FormHelperText, FormLabel, Grid, IconButton, Input, Menu, MenuButton, MenuItem, Modal, ModalClose, ModalDialog, ModalOverflow, ModalFrame, MonthRangePicker, Radio, RadioGroup, RadioList, Select, Option, Sheet, Stack, Switch, Table, TableHead, TableBody, Tabs, Tab, TabList, TabPanel, Textarea, ThemeProvider, Tooltip, Typography, } from "./components";
package/dist/index.js CHANGED
@@ -173,8 +173,8 @@ var Button_default = Button;
173
173
  // src/components/Calendar/Calendar.tsx
174
174
  import React6, { Fragment, forwardRef as forwardRef2, useMemo as useMemo2 } from "react";
175
175
  import { styled } from "@mui/joy/styles";
176
- import ChevronLeftIcon from "@mui/icons-material/esm/ChevronLeft";
177
- import ChevronRightIcon from "@mui/icons-material/esm/ChevronRight";
176
+ import ChevronLeftIcon from "@mui/icons-material/esm/ChevronLeft.js";
177
+ import ChevronRightIcon from "@mui/icons-material/esm/ChevronRight.js";
178
178
  import { AnimatePresence, motion as motion6 } from "framer-motion";
179
179
 
180
180
  // src/components/Typography/Typography.tsx
@@ -223,7 +223,7 @@ var getMonthName = (date, locale) => {
223
223
  return date.toLocaleString(locale, { year: "numeric", month: "long" });
224
224
  };
225
225
  var getMonthNameFromIndex = (index, locale) => {
226
- return new Date(0, index).toLocaleString(locale, { month: "long" });
226
+ return new Date(0, index).toLocaleString(locale, { month: "short" });
227
227
  };
228
228
  var getWeekdayNames = (locale) => {
229
229
  const currentDay = (/* @__PURE__ */ new Date()).getDay();
@@ -353,6 +353,7 @@ var useCalendarProps = (inProps) => {
353
353
  import { useCallback as useCallback2, useState as useState2 } from "react";
354
354
  var useCalendar = (ownerState) => {
355
355
  const [hoverDay, setHoverDay] = useState2(null);
356
+ const [hoverMonth, setHoverMonth] = useState2(null);
356
357
  return {
357
358
  calendarTitle: ownerState.view === "month" ? getYearName(ownerState.viewMonth, ownerState.locale || "default") : getMonthName(ownerState.viewMonth, ownerState.locale || "default"),
358
359
  onPrev: useCallback2(() => {
@@ -401,6 +402,32 @@ var useCalendar = (ownerState) => {
401
402
  hoverDay
402
403
  ]
403
404
  ),
405
+ getMonthCellProps: useCallback2(
406
+ (monthIndex) => {
407
+ const thisMonth = new Date(ownerState.viewMonth || /* @__PURE__ */ new Date());
408
+ thisMonth.setDate(1);
409
+ thisMonth.setHours(0, 0, 0, 0);
410
+ thisMonth.setMonth(monthIndex);
411
+ const isMonthRangeSelection = !ownerState.views?.find((view) => view === "day") && ownerState.rangeSelection;
412
+ const inRange = isMonthRangeSelection && ownerState.value && ownerState.value[0] && // NOTE: hover day is not included in the range
413
+ (hoverMonth && isWithinRange(ownerState.value[0], hoverMonth, thisMonth) || // NOTE: Selected range is included in the range
414
+ ownerState.value[1] && isWithinRange(
415
+ ownerState.value[0],
416
+ ownerState.value[1],
417
+ thisMonth
418
+ ));
419
+ return {
420
+ "aria-label": thisMonth.toLocaleDateString(),
421
+ "aria-current": inRange ? "date" : void 0
422
+ };
423
+ },
424
+ [
425
+ ownerState.rangeSelection,
426
+ ownerState.value,
427
+ ownerState.viewMonth,
428
+ hoverMonth
429
+ ]
430
+ ),
404
431
  getPickerDayProps: useCallback2(
405
432
  (day) => {
406
433
  const thisDay = new Date(ownerState.viewMonth || /* @__PURE__ */ new Date());
@@ -469,13 +496,40 @@ var useCalendar = (ownerState) => {
469
496
  thisMonth.setDate(1);
470
497
  thisMonth.setHours(0, 0, 0, 0);
471
498
  thisMonth.setMonth(monthIndex);
499
+ const isMonthRangeSelection = !ownerState.views?.find((view) => view === "day") && ownerState.rangeSelection;
472
500
  const isSelected = !!ownerState.value && (isSameMonth(thisMonth, ownerState.value[0]) || ownerState.value[1] && isSameMonth(thisMonth, ownerState.value[1]));
501
+ const inRange = isMonthRangeSelection && ownerState.value && ownerState.value[0] && // NOTE: hover day is not included in the range
502
+ (hoverMonth && isWithinRange(ownerState.value[0], hoverMonth, thisMonth) || // NOTE: Selected range is included in the range
503
+ ownerState.value[1] && isWithinRange(
504
+ ownerState.value[0],
505
+ ownerState.value[1],
506
+ thisMonth
507
+ ));
473
508
  const handleMonthClick = () => {
474
- ownerState.onViewChange?.("day");
475
- ownerState.onMonthChange?.(thisMonth);
509
+ if (isMonthRangeSelection) {
510
+ if (!ownerState.value) {
511
+ ownerState.onChange?.([thisMonth, void 0]);
512
+ } else if (ownerState.value[0] && !ownerState.value[1]) {
513
+ ownerState.onChange?.([
514
+ new Date(
515
+ Math.min(ownerState.value[0].getTime(), thisMonth.getTime())
516
+ ),
517
+ new Date(
518
+ Math.max(ownerState.value[0].getTime(), thisMonth.getTime())
519
+ )
520
+ ]);
521
+ } else {
522
+ ownerState.onChange?.([thisMonth, void 0]);
523
+ }
524
+ } else {
525
+ ownerState.onViewChange?.("day");
526
+ ownerState.onMonthChange?.(thisMonth);
527
+ }
528
+ setHoverMonth(null);
476
529
  };
477
530
  return {
478
531
  isSelected,
532
+ onMouseEnter: isMonthRangeSelection && ownerState.value?.[0] && !ownerState.value?.[1] ? () => setHoverMonth(thisMonth) : void 0,
479
533
  disabled: ownerState.minDate && (() => {
480
534
  const lastDay = new Date(thisMonth);
481
535
  lastDay.setMonth(lastDay.getMonth() + 1);
@@ -485,10 +539,12 @@ var useCalendar = (ownerState) => {
485
539
  const lastDay = new Date(thisMonth);
486
540
  lastDay.setDate(0);
487
541
  return lastDay > ownerState.maxDate;
488
- })() || ownerState.disableFuture && thisMonth > /* @__PURE__ */ new Date() || ownerState.disablePast && thisMonth < /* @__PURE__ */ new Date(),
542
+ })() || ownerState.disableFuture && thisMonth > /* @__PURE__ */ new Date() || ownerState.disablePast && thisMonth < /* @__PURE__ */ new Date() && !isSameMonth(thisMonth, /* @__PURE__ */ new Date()),
489
543
  onClick: handleMonthClick,
490
544
  tabIndex: -1,
491
- "aria-label": getMonthName(thisMonth, ownerState.locale || "default")
545
+ "aria-label": getMonthName(thisMonth, ownerState.locale || "default"),
546
+ "aria-selected": isSelected ? "true" : void 0,
547
+ "aria-current": inRange ? "date" : void 0
492
548
  };
493
549
  },
494
550
  [
@@ -501,7 +557,8 @@ var useCalendar = (ownerState) => {
501
557
  ownerState.minDate,
502
558
  ownerState.maxDate,
503
559
  ownerState.disableFuture,
504
- ownerState.disablePast
560
+ ownerState.disablePast,
561
+ hoverMonth
505
562
  ]
506
563
  )
507
564
  };
@@ -585,6 +642,28 @@ var CalendarDayCell = styled("td", {
585
642
  }
586
643
  }
587
644
  }));
645
+ var CalendarMonthCell = styled("td", {
646
+ name: "Calendar",
647
+ slot: "monthCell"
648
+ })(({ theme }) => ({
649
+ // aria-current=date === range에 포함된 버튼
650
+ "&[aria-current=date]": {
651
+ position: "relative",
652
+ "& button[aria-current=date]:not([aria-selected=true]):not(:hover):not(:active)": {
653
+ backgroundColor: `rgb(${theme.palette.primary.lightChannel})`
654
+ },
655
+ '& + td[aria-hidden] + td[aria-current="date"]::before': {
656
+ content: '""',
657
+ position: "absolute",
658
+ top: 0,
659
+ left: "-10px",
660
+ bottom: 0,
661
+ width: "16px",
662
+ backgroundColor: `rgb(${theme.palette.primary.lightChannel})`,
663
+ zIndex: -1
664
+ }
665
+ }
666
+ }));
588
667
  var CalendarMonth = styled(Button_default, {
589
668
  name: "Calendar",
590
669
  slot: "month"
@@ -747,7 +826,7 @@ var PickerDays = (props) => {
747
826
  };
748
827
  var PickerMonths = (props) => {
749
828
  const { ownerState } = props;
750
- const { getPickerMonthProps } = useCalendar(ownerState);
829
+ const { getPickerMonthProps, getMonthCellProps } = useCalendar(ownerState);
751
830
  const chunkedMonths = Array.from({ length: 12 }, (_, i) => i).reduce(
752
831
  (acc, month) => {
753
832
  if (acc[acc.length - 1].length === 4) {
@@ -787,7 +866,7 @@ var PickerMonths = (props) => {
787
866
  }
788
867
  }
789
868
  },
790
- /* @__PURE__ */ React6.createElement("tbody", null, chunkedMonths.map((months, i) => /* @__PURE__ */ React6.createElement(Fragment, { key: i }, /* @__PURE__ */ React6.createElement("tr", null, months.map((monthIndex, j) => /* @__PURE__ */ React6.createElement(Fragment, { key: monthIndex }, /* @__PURE__ */ React6.createElement("td", null, /* @__PURE__ */ React6.createElement(
869
+ /* @__PURE__ */ React6.createElement("tbody", null, chunkedMonths.map((months, i) => /* @__PURE__ */ React6.createElement(Fragment, { key: i }, /* @__PURE__ */ React6.createElement("tr", null, months.map((monthIndex, j) => /* @__PURE__ */ React6.createElement(Fragment, { key: monthIndex }, /* @__PURE__ */ React6.createElement(CalendarMonthCell, { ...getMonthCellProps(monthIndex) }, /* @__PURE__ */ React6.createElement(
791
870
  CalendarMonth,
792
871
  {
793
872
  size: "sm",
@@ -1416,7 +1495,7 @@ DataTable.displayName = "DataTable";
1416
1495
  // src/components/DatePicker/DatePicker.tsx
1417
1496
  import React12, { forwardRef as forwardRef4, useCallback as useCallback4, useState as useState4 } from "react";
1418
1497
  import { IMaskInput, IMask } from "react-imask";
1419
- import CalendarTodayIcon from "@mui/icons-material/esm/CalendarToday";
1498
+ import CalendarTodayIcon from "@mui/icons-material/esm/CalendarToday.js";
1420
1499
  import { styled as styled3 } from "@mui/joy/styles";
1421
1500
  import { FocusTrap } from "@mui/base/FocusTrap";
1422
1501
  import { ClickAwayListener } from "@mui/base/ClickAwayListener";
@@ -1650,7 +1729,7 @@ DatePicker.displayName = "DatePicker";
1650
1729
  // src/components/DateRangePicker/DateRangePicker.tsx
1651
1730
  import React13, { forwardRef as forwardRef5, useCallback as useCallback5, useMemo as useMemo4, useState as useState5 } from "react";
1652
1731
  import { IMaskInput as IMaskInput2, IMask as IMask2 } from "react-imask";
1653
- import CalendarTodayIcon2 from "@mui/icons-material/esm/CalendarToday";
1732
+ import CalendarTodayIcon2 from "@mui/icons-material/esm/CalendarToday.js";
1654
1733
  import { styled as styled4 } from "@mui/joy/styles";
1655
1734
  import { FocusTrap as FocusTrap2 } from "@mui/base/FocusTrap";
1656
1735
  import { ClickAwayListener as ClickAwayListener2 } from "@mui/base/ClickAwayListener";
@@ -1979,6 +2058,196 @@ var MenuItem = (props) => {
1979
2058
  };
1980
2059
  MenuItem.displayName = "MenuItem";
1981
2060
 
2061
+ // src/components/MonthRangePicker/MonthRangePicker.tsx
2062
+ import React19, { forwardRef as forwardRef6, useCallback as useCallback6, useMemo as useMemo5, useState as useState6 } from "react";
2063
+ import { IMaskInput as IMaskInput3, IMask as IMask3 } from "react-imask";
2064
+ import CalendarTodayIcon3 from "@mui/icons-material/esm/CalendarToday";
2065
+ import { styled as styled5 } from "@mui/joy/styles";
2066
+ import { FocusTrap as FocusTrap3 } from "@mui/base/FocusTrap";
2067
+ import { ClickAwayListener as ClickAwayListener3 } from "@mui/base/ClickAwayListener";
2068
+ import { Popper as Popper3 } from "@mui/base/Popper";
2069
+ var StyledPopper3 = styled5(Popper3, {
2070
+ name: "MonthRangePicker",
2071
+ slot: "popper"
2072
+ })(({ theme }) => ({
2073
+ zIndex: theme.zIndex.popup
2074
+ }));
2075
+ var CalendarSheet3 = styled5(Sheet_default, {
2076
+ name: "MonthRangePicker",
2077
+ slot: "sheet",
2078
+ overridesResolver: (props, styles) => styles.root
2079
+ })(({ theme }) => ({
2080
+ zIndex: theme.zIndex.popup,
2081
+ width: "264px",
2082
+ boxShadow: theme.shadow.md,
2083
+ borderRadius: theme.radius.md
2084
+ }));
2085
+ var formatValueString3 = ([date1, date2]) => {
2086
+ const getStr = (date) => {
2087
+ let month = `${date.getMonth() + 1}`;
2088
+ const year = date.getFullYear();
2089
+ if (Number(month) < 10)
2090
+ month = "0" + month;
2091
+ return [year, month].join("/");
2092
+ };
2093
+ return [getStr(date1), date2 ? getStr(date2) : ""].join(" - ");
2094
+ };
2095
+ var parseDate2 = (str) => {
2096
+ const date1 = str.split(" - ")[0] || "";
2097
+ const date2 = str.split(" - ")[1] || "";
2098
+ const yearMonthDay1 = date1.split("/");
2099
+ const yearMonthDay2 = date2.split("/");
2100
+ return [
2101
+ new Date(
2102
+ Number(yearMonthDay1[0]),
2103
+ Number(yearMonthDay1[1]) - 1
2104
+ ),
2105
+ new Date(
2106
+ Number(yearMonthDay2[0]),
2107
+ Number(yearMonthDay2[1]) - 1
2108
+ )
2109
+ ];
2110
+ };
2111
+ var TextMaskAdapter5 = React19.forwardRef(
2112
+ function TextMaskAdapter6(props, ref) {
2113
+ const { onChange, ...other } = props;
2114
+ return /* @__PURE__ */ React19.createElement(
2115
+ IMaskInput3,
2116
+ {
2117
+ ...other,
2118
+ inputRef: ref,
2119
+ onAccept: (value) => onChange({ target: { name: props.name, value } }),
2120
+ mask: Date,
2121
+ pattern: "Y/`m - Y/`m",
2122
+ blocks: {
2123
+ m: {
2124
+ mask: IMask3.MaskedRange,
2125
+ from: 1,
2126
+ to: 12,
2127
+ maxLength: 2
2128
+ },
2129
+ Y: {
2130
+ mask: IMask3.MaskedRange,
2131
+ from: 1900,
2132
+ to: 9999
2133
+ }
2134
+ },
2135
+ format: formatValueString3,
2136
+ parse: parseDate2,
2137
+ autofix: "pad",
2138
+ overwrite: true,
2139
+ placeholderChar: " "
2140
+ }
2141
+ );
2142
+ }
2143
+ );
2144
+ var MonthRangePicker = forwardRef6(
2145
+ (props, ref) => {
2146
+ const { onChange, disabled, label, error, helperText, minDate, maxDate, disableFuture, disablePast } = props;
2147
+ const [value, setValue] = useState6(props.value || "");
2148
+ const [anchorEl, setAnchorEl] = useState6(null);
2149
+ const open = Boolean(anchorEl);
2150
+ const calendarValue = useMemo5(
2151
+ () => value ? parseDate2(value) : void 0,
2152
+ [value]
2153
+ );
2154
+ const handleChange = useCallback6(
2155
+ (event) => {
2156
+ setValue(event.target.value);
2157
+ onChange?.(event);
2158
+ },
2159
+ [onChange]
2160
+ );
2161
+ const handleCalendarToggle = useCallback6(
2162
+ (event) => {
2163
+ setAnchorEl(anchorEl ? null : event.currentTarget);
2164
+ },
2165
+ [anchorEl, setAnchorEl]
2166
+ );
2167
+ const handleCalendarChange = useCallback6(
2168
+ ([date1, date2]) => {
2169
+ if (!date1 || !date2)
2170
+ return;
2171
+ setValue(formatValueString3([date1, date2]));
2172
+ setAnchorEl(null);
2173
+ },
2174
+ [setValue, setAnchorEl]
2175
+ );
2176
+ const picker = /* @__PURE__ */ React19.createElement(React19.Fragment, null, /* @__PURE__ */ React19.createElement(
2177
+ Input_default,
2178
+ {
2179
+ ref,
2180
+ size: "sm",
2181
+ value,
2182
+ onChange: handleChange,
2183
+ disabled,
2184
+ placeholder: "YYYY/MM - YYYY/MM",
2185
+ slotProps: { input: { component: TextMaskAdapter5 } },
2186
+ sx: {
2187
+ // NOTE: placeholder char 를 텍스트로 표시하므로 동일한 너비를 가지는 mono font 를 사용해야 이질감이 없다.
2188
+ fontFamily: "monospace"
2189
+ },
2190
+ endDecorator: /* @__PURE__ */ React19.createElement(IconButton_default, { variant: "plain", onClick: handleCalendarToggle }, /* @__PURE__ */ React19.createElement(CalendarTodayIcon3, null))
2191
+ }
2192
+ ), open && /* @__PURE__ */ React19.createElement(ClickAwayListener3, { onClickAway: () => setAnchorEl(null) }, /* @__PURE__ */ React19.createElement(
2193
+ StyledPopper3,
2194
+ {
2195
+ id: "date-range-picker-popper",
2196
+ open: true,
2197
+ anchorEl,
2198
+ placement: "bottom-end",
2199
+ modifiers: [
2200
+ {
2201
+ name: "offset",
2202
+ options: {
2203
+ offset: [4, 4]
2204
+ }
2205
+ }
2206
+ ]
2207
+ },
2208
+ /* @__PURE__ */ React19.createElement(FocusTrap3, { open: true }, /* @__PURE__ */ React19.createElement(CalendarSheet3, { tabIndex: -1, role: "presentation" }, /* @__PURE__ */ React19.createElement(
2209
+ Calendar_default,
2210
+ {
2211
+ view: "month",
2212
+ views: ["month"],
2213
+ rangeSelection: true,
2214
+ defaultValue: calendarValue,
2215
+ onChange: handleCalendarChange,
2216
+ minDate,
2217
+ maxDate,
2218
+ disableFuture,
2219
+ disablePast
2220
+ }
2221
+ ), /* @__PURE__ */ React19.createElement(
2222
+ DialogActions_default,
2223
+ {
2224
+ sx: {
2225
+ p: 1
2226
+ }
2227
+ },
2228
+ /* @__PURE__ */ React19.createElement(
2229
+ Button_default,
2230
+ {
2231
+ size: "sm",
2232
+ variant: "plain",
2233
+ color: "neutral",
2234
+ onClick: () => {
2235
+ setValue("");
2236
+ setAnchorEl(null);
2237
+ }
2238
+ },
2239
+ "Clear"
2240
+ )
2241
+ )))
2242
+ )));
2243
+ if (label) {
2244
+ return /* @__PURE__ */ React19.createElement(FormControl_default, { error, size: "sm" }, /* @__PURE__ */ React19.createElement(FormLabel_default, null, label), picker, helperText && /* @__PURE__ */ React19.createElement(FormHelperText_default, null, helperText));
2245
+ }
2246
+ return picker;
2247
+ }
2248
+ );
2249
+ MonthRangePicker.displayName = "MonthRangePicker";
2250
+
1982
2251
  // src/components/Radio/Radio.tsx
1983
2252
  import { Radio as JoyRadio, RadioGroup as JoyRadioGroup } from "@mui/joy";
1984
2253
  import { motion as motion23 } from "framer-motion";
@@ -1990,15 +2259,15 @@ var RadioGroup = MotionRadioGroup;
1990
2259
  RadioGroup.displayName = "RadioGroup";
1991
2260
 
1992
2261
  // src/components/RadioList/RadioList.tsx
1993
- import React19 from "react";
2262
+ import React20 from "react";
1994
2263
  function RadioList(props) {
1995
2264
  const { items, ...innerProps } = props;
1996
- return /* @__PURE__ */ React19.createElement(RadioGroup, { ...innerProps }, items.map((item) => /* @__PURE__ */ React19.createElement(Radio, { key: `${item.value}`, value: item.value, label: item.label })));
2265
+ return /* @__PURE__ */ React20.createElement(RadioGroup, { ...innerProps }, items.map((item) => /* @__PURE__ */ React20.createElement(Radio, { key: `${item.value}`, value: item.value, label: item.label })));
1997
2266
  }
1998
2267
  RadioList.displayName = "RadioList";
1999
2268
 
2000
2269
  // src/components/Select/Select.tsx
2001
- import React20 from "react";
2270
+ import React21 from "react";
2002
2271
  import {
2003
2272
  Select as JoySelect,
2004
2273
  Option as JoyOption
@@ -2010,28 +2279,28 @@ Option.displayName = "Option";
2010
2279
  function Select(props) {
2011
2280
  const { label, helperText, error, ...innerProps } = props;
2012
2281
  if (label) {
2013
- return /* @__PURE__ */ React20.createElement(FormControl_default, { error }, /* @__PURE__ */ React20.createElement(FormLabel_default, null, label), /* @__PURE__ */ React20.createElement(
2282
+ return /* @__PURE__ */ React21.createElement(FormControl_default, { error }, /* @__PURE__ */ React21.createElement(FormLabel_default, null, label), /* @__PURE__ */ React21.createElement(
2014
2283
  JoySelect,
2015
2284
  {
2016
2285
  ...innerProps,
2017
2286
  color: error ? "danger" : innerProps.color
2018
2287
  }
2019
- ), helperText && /* @__PURE__ */ React20.createElement(FormHelperText_default, null, helperText));
2288
+ ), helperText && /* @__PURE__ */ React21.createElement(FormHelperText_default, null, helperText));
2020
2289
  }
2021
- return /* @__PURE__ */ React20.createElement(JoySelect, { ...innerProps });
2290
+ return /* @__PURE__ */ React21.createElement(JoySelect, { ...innerProps });
2022
2291
  }
2023
2292
  Select.displayName = "Select";
2024
2293
 
2025
2294
  // src/components/Switch/Switch.tsx
2026
- import React21 from "react";
2295
+ import React22 from "react";
2027
2296
  import {
2028
2297
  Switch as JoySwitch,
2029
- styled as styled5,
2298
+ styled as styled6,
2030
2299
  switchClasses
2031
2300
  } from "@mui/joy";
2032
2301
  import { motion as motion25 } from "framer-motion";
2033
2302
  var MotionSwitch = motion25(JoySwitch);
2034
- var StyledThumb = styled5(motion25.div)({
2303
+ var StyledThumb = styled6(motion25.div)({
2035
2304
  "--Icon-fontSize": "calc(var(--Switch-thumbSize) * 0.75)",
2036
2305
  display: "inline-flex",
2037
2306
  justifyContent: "center",
@@ -2049,14 +2318,14 @@ var StyledThumb = styled5(motion25.div)({
2049
2318
  right: "var(--Switch-thumbOffset)"
2050
2319
  }
2051
2320
  });
2052
- var Thumb = (props) => /* @__PURE__ */ React21.createElement(StyledThumb, { ...props, layout: true, transition: spring });
2321
+ var Thumb = (props) => /* @__PURE__ */ React22.createElement(StyledThumb, { ...props, layout: true, transition: spring });
2053
2322
  var spring = {
2054
2323
  type: "spring",
2055
2324
  stiffness: 700,
2056
2325
  damping: 30
2057
2326
  };
2058
2327
  var Switch = (props) => {
2059
- return /* @__PURE__ */ React21.createElement(
2328
+ return /* @__PURE__ */ React22.createElement(
2060
2329
  MotionSwitch,
2061
2330
  {
2062
2331
  ...props,
@@ -2086,17 +2355,17 @@ var TabPanel = MotionTabPanel;
2086
2355
  TabPanel.displayName = "TabPanel";
2087
2356
 
2088
2357
  // src/components/Textarea/Textarea.tsx
2089
- import React22 from "react";
2358
+ import React23 from "react";
2090
2359
  import { Textarea as JoyTextarea } from "@mui/joy";
2091
2360
  import { motion as motion27 } from "framer-motion";
2092
2361
  var MotionTextarea = motion27(JoyTextarea);
2093
2362
  var Textarea = (props) => {
2094
- return /* @__PURE__ */ React22.createElement(MotionTextarea, { ...props });
2363
+ return /* @__PURE__ */ React23.createElement(MotionTextarea, { ...props });
2095
2364
  };
2096
2365
  Textarea.displayName = "Textarea";
2097
2366
 
2098
2367
  // src/components/ThemeProvider/ThemeProvider.tsx
2099
- import React23 from "react";
2368
+ import React24 from "react";
2100
2369
  import {
2101
2370
  CssBaseline,
2102
2371
  CssVarsProvider,
@@ -2143,17 +2412,17 @@ var defaultTheme = extendTheme({
2143
2412
  }
2144
2413
  });
2145
2414
  function ThemeProvider(props) {
2146
- return /* @__PURE__ */ React23.createElement(React23.Fragment, null, /* @__PURE__ */ React23.createElement(CssVarsProvider, { theme: defaultTheme }, /* @__PURE__ */ React23.createElement(CssBaseline, null), props.children));
2415
+ return /* @__PURE__ */ React24.createElement(React24.Fragment, null, /* @__PURE__ */ React24.createElement(CssVarsProvider, { theme: defaultTheme }, /* @__PURE__ */ React24.createElement(CssBaseline, null), props.children));
2147
2416
  }
2148
2417
  ThemeProvider.displayName = "ThemeProvider";
2149
2418
 
2150
2419
  // src/components/Tooltip/Tooltip.tsx
2151
- import React24 from "react";
2420
+ import React25 from "react";
2152
2421
  import { Tooltip as JoyTooltip } from "@mui/joy";
2153
2422
  import { motion as motion28 } from "framer-motion";
2154
2423
  var MotionTooltip = motion28(JoyTooltip);
2155
2424
  var Tooltip = (props) => {
2156
- return /* @__PURE__ */ React24.createElement(MotionTooltip, { ...props });
2425
+ return /* @__PURE__ */ React25.createElement(MotionTooltip, { ...props });
2157
2426
  };
2158
2427
  Tooltip.displayName = "Tooltip";
2159
2428
  export {
@@ -2215,6 +2484,7 @@ export {
2215
2484
  ModalDialog,
2216
2485
  ModalFrame,
2217
2486
  ModalOverflow,
2487
+ MonthRangePicker,
2218
2488
  Option,
2219
2489
  Radio,
2220
2490
  RadioGroup,