@ceed/ads 0.0.39 → 0.0.40

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -170,13 +170,660 @@ Button.displayName = "Button";
170
170
  // src/components/Button/index.ts
171
171
  var Button_default = Button;
172
172
 
173
- // src/components/Checkbox/Checkbox.tsx
173
+ // src/components/Calendar/Calendar.tsx
174
+ import React6, { Fragment, forwardRef as forwardRef2, useMemo as useMemo2 } from "react";
175
+ import { styled } from "@mui/joy/styles";
176
+ import ChevronLeftIcon from "@mui/icons-material/ChevronLeft";
177
+ import ChevronRightIcon from "@mui/icons-material/ChevronRight";
178
+ import { AnimatePresence, motion as motion6 } from "framer-motion";
179
+
180
+ // src/components/Typography/Typography.tsx
174
181
  import React3 from "react";
175
- import { Checkbox as JoyCheckbox } from "@mui/joy";
182
+ import { Typography as JoyTypography } from "@mui/joy";
176
183
  import { motion as motion4 } from "framer-motion";
177
- var MotionCheckbox = motion4(JoyCheckbox);
184
+ var MotionTypography = motion4(JoyTypography);
185
+ var Typography = (props) => {
186
+ return /* @__PURE__ */ React3.createElement(MotionTypography, { ...props });
187
+ };
188
+ Typography.displayName = "Typography";
189
+
190
+ // src/components/Typography/index.ts
191
+ var Typography_default = Typography;
192
+
193
+ // src/components/Calendar/utils/index.ts
194
+ var getCalendarDates = (date) => {
195
+ const dates = [];
196
+ const firstDay = new Date(date.getFullYear(), date.getMonth(), 1);
197
+ const lastDay = new Date(date.getFullYear(), date.getMonth() + 1, 0);
198
+ const firstWeekInThisMonth = Math.ceil((firstDay.getDay() + 1) / 7);
199
+ const lastWeekInThisMonth = Math.ceil(
200
+ (lastDay.getDate() + firstDay.getDay()) / 7
201
+ );
202
+ let day = 1;
203
+ for (let i = 1; i <= lastWeekInThisMonth; i++) {
204
+ const week = [];
205
+ for (let j = 1; j <= 7; j++) {
206
+ if (i === firstWeekInThisMonth && j < firstDay.getDay() + 1) {
207
+ week.push(void 0);
208
+ } else if (day > lastDay.getDate()) {
209
+ week.push(void 0);
210
+ } else {
211
+ week.push(day);
212
+ day++;
213
+ }
214
+ }
215
+ dates.push(week);
216
+ }
217
+ return dates;
218
+ };
219
+ var getYearName = (date, locale) => {
220
+ return date.toLocaleString(locale, { year: "numeric" });
221
+ };
222
+ var getMonthName = (date, locale) => {
223
+ return date.toLocaleString(locale, { year: "numeric", month: "long" });
224
+ };
225
+ var getMonthNameFromIndex = (index, locale) => {
226
+ return new Date(0, index).toLocaleString(locale, { month: "long" });
227
+ };
228
+ var getWeekdayNames = (locale) => {
229
+ const currentDay = (/* @__PURE__ */ new Date()).getDay();
230
+ const date = /* @__PURE__ */ new Date();
231
+ date.setDate(date.getDate() - currentDay);
232
+ return Array.from({ length: 7 }).map(() => {
233
+ const day = date.toLocaleString(locale, { weekday: "short" });
234
+ date.setDate(date.getDate() + 1);
235
+ return day;
236
+ });
237
+ };
238
+ var isToday = (date) => {
239
+ const today = /* @__PURE__ */ new Date();
240
+ const d = new Date(date);
241
+ d.setHours(0, 0, 0, 0);
242
+ today.setHours(0, 0, 0, 0);
243
+ return d.getTime() === today.getTime();
244
+ };
245
+ var isSameDay = (date1, date2) => {
246
+ const d1 = new Date(date1);
247
+ const d2 = new Date(date2);
248
+ d1.setHours(0, 0, 0, 0);
249
+ d2.setHours(0, 0, 0, 0);
250
+ return d1.getTime() === d2.getTime();
251
+ };
252
+ var isWithinRange = (d1, d2, date) => {
253
+ const dateToCheck = new Date(date);
254
+ dateToCheck.setHours(0, 0, 0, 0);
255
+ const minDate = new Date(Math.min(d1.getTime(), d2.getTime()));
256
+ const maxDate = new Date(Math.max(d1.getTime(), d2.getTime()));
257
+ return dateToCheck >= minDate && dateToCheck <= maxDate;
258
+ };
259
+ var isSameMonth = (date1, date2) => {
260
+ return date1.getFullYear() === date2.getFullYear() && date1.getMonth() === date2.getMonth();
261
+ };
262
+
263
+ // src/components/IconButton/IconButton.tsx
264
+ import React4 from "react";
265
+ import { IconButton as JoyIconButton } from "@mui/joy";
266
+ import { motion as motion5 } from "framer-motion";
267
+ var MotionIconButton = motion5(JoyIconButton);
268
+ var IconButton = (props) => {
269
+ return /* @__PURE__ */ React4.createElement(MotionIconButton, { ...props });
270
+ };
271
+ IconButton.displayName = "IconButton";
272
+
273
+ // src/components/IconButton/index.ts
274
+ var IconButton_default = IconButton;
275
+
276
+ // src/components/Calendar/hooks/use-calendar-props.ts
277
+ import { useCallback, useMemo, useState } from "react";
278
+ import { useThemeProps } from "@mui/joy/styles";
279
+ var resolveView = (view, views) => {
280
+ return views.includes(view) ? view : views[0];
281
+ };
282
+ var useCalendarProps = (inProps) => {
283
+ const [uncontrolledView, setUncontrolledView] = useState(
284
+ () => resolveView(inProps.view || "day", inProps.views || ["day", "month"])
285
+ );
286
+ const [uncontrolledValue, setUncontrolledValue] = useState(inProps.defaultValue);
287
+ const [viewMonth, setViewMonth] = useState(() => {
288
+ const today = /* @__PURE__ */ new Date();
289
+ today.setDate(1);
290
+ today.setHours(0, 0, 0, 0);
291
+ return inProps.value?.[0] || today;
292
+ });
293
+ const [[page, direction], setPage] = useState([0, 0]);
294
+ const resolvedView = inProps.view ?? uncontrolledView;
295
+ const paginate = (newDirection) => {
296
+ setPage([page + newDirection, newDirection]);
297
+ };
298
+ const handleViewMonthChange = useCallback(
299
+ (newMonth) => {
300
+ setViewMonth(newMonth);
301
+ if (resolvedView === "month") {
302
+ if (viewMonth.getFullYear() !== newMonth.getFullYear()) {
303
+ paginate(newMonth > viewMonth ? 1 : -1);
304
+ }
305
+ } else {
306
+ paginate(newMonth > viewMonth ? 1 : -1);
307
+ }
308
+ inProps.onMonthChange?.(newMonth);
309
+ },
310
+ [inProps.onMonthChange, viewMonth, resolvedView]
311
+ );
312
+ const props = useThemeProps({
313
+ props: {
314
+ locale: "default",
315
+ views: ["day", "month"],
316
+ view: resolvedView,
317
+ value: inProps.value ?? uncontrolledValue,
318
+ ...inProps,
319
+ // overrides
320
+ onChange: inProps.value ? (
321
+ // Controlled
322
+ inProps.onChange
323
+ ) : (
324
+ // Uncontrolled
325
+ (value) => {
326
+ setUncontrolledValue(value);
327
+ inProps.onChange?.(value);
328
+ }
329
+ ),
330
+ onMonthChange: handleViewMonthChange,
331
+ onViewChange: () => {
332
+ const newView = resolvedView === "month" ? "day" : "month";
333
+ const isAllowedView = !inProps.views ? true : inProps.views.includes(newView);
334
+ if (!isAllowedView || inProps.view === newView)
335
+ return;
336
+ if (inProps.onViewChange) {
337
+ inProps.onViewChange(newView);
338
+ } else {
339
+ setUncontrolledView(newView);
340
+ }
341
+ }
342
+ },
343
+ name: "Calendar"
344
+ });
345
+ const ownerState = useMemo(
346
+ () => ({ ...props, viewMonth, direction }),
347
+ [props, viewMonth, direction]
348
+ );
349
+ return [props, ownerState];
350
+ };
351
+
352
+ // src/components/Calendar/hooks/use-calendar.ts
353
+ import { useCallback as useCallback2, useState as useState2 } from "react";
354
+ var useCalendar = (ownerState) => {
355
+ const [hoverDay, setHoverDay] = useState2(null);
356
+ return {
357
+ calendarTitle: ownerState.view === "month" ? getYearName(ownerState.viewMonth, ownerState.locale || "default") : getMonthName(ownerState.viewMonth, ownerState.locale || "default"),
358
+ onPrev: useCallback2(() => {
359
+ if (ownerState.view === "day") {
360
+ const prevMonth = new Date(ownerState.viewMonth || /* @__PURE__ */ new Date());
361
+ prevMonth.setMonth(prevMonth.getMonth() - 1);
362
+ ownerState.onMonthChange?.(prevMonth);
363
+ } else if (ownerState.view === "month") {
364
+ const prevYear = new Date(ownerState.viewMonth || /* @__PURE__ */ new Date());
365
+ prevYear.setFullYear(prevYear.getFullYear() - 1);
366
+ ownerState.onMonthChange?.(prevYear);
367
+ }
368
+ }, [ownerState.onMonthChange, ownerState.viewMonth, ownerState.view]),
369
+ onNext: useCallback2(() => {
370
+ if (ownerState.view === "day") {
371
+ const nextMonth = new Date(ownerState.viewMonth || /* @__PURE__ */ new Date());
372
+ nextMonth.setMonth(nextMonth.getMonth() + 1);
373
+ ownerState.onMonthChange?.(nextMonth);
374
+ } else if (ownerState.view === "month") {
375
+ const nextYear = new Date(ownerState.viewMonth || /* @__PURE__ */ new Date());
376
+ nextYear.setFullYear(nextYear.getFullYear() + 1);
377
+ ownerState.onMonthChange?.(nextYear);
378
+ }
379
+ }, [ownerState.onMonthChange, ownerState.viewMonth, ownerState.view]),
380
+ getDayCellProps: useCallback2(
381
+ (day) => {
382
+ const thisDay = new Date(ownerState.viewMonth || /* @__PURE__ */ new Date());
383
+ thisDay.setHours(0, 0, 0, 0);
384
+ thisDay.setDate(day);
385
+ const inRange = ownerState.rangeSelection && ownerState.value && ownerState.value[0] && // NOTE: hover day is not included in the range
386
+ (hoverDay && isWithinRange(ownerState.value[0], hoverDay, thisDay) || // NOTE: Selected range is included in the range
387
+ ownerState.value[1] && isWithinRange(
388
+ ownerState.value[0],
389
+ ownerState.value[1],
390
+ thisDay
391
+ ));
392
+ return {
393
+ "aria-label": thisDay.toLocaleDateString(),
394
+ "aria-current": inRange ? "date" : void 0
395
+ };
396
+ },
397
+ [
398
+ ownerState.rangeSelection,
399
+ ownerState.value,
400
+ ownerState.viewMonth,
401
+ hoverDay
402
+ ]
403
+ ),
404
+ getPickerDayProps: useCallback2(
405
+ (day) => {
406
+ const thisDay = new Date(ownerState.viewMonth || /* @__PURE__ */ new Date());
407
+ thisDay.setHours(0, 0, 0, 0);
408
+ thisDay.setDate(day);
409
+ const isSelected = !!ownerState.value && (isSameDay(thisDay, ownerState.value[0]) || ownerState.value[1] && isSameDay(thisDay, ownerState.value[1]));
410
+ const inRange = ownerState.rangeSelection && ownerState.value && ownerState.value[0] && // NOTE: hover day is not included in the range
411
+ (hoverDay && isWithinRange(ownerState.value[0], hoverDay, thisDay) || // NOTE: Selected range is included in the range
412
+ ownerState.value[1] && isWithinRange(
413
+ ownerState.value[0],
414
+ ownerState.value[1],
415
+ thisDay
416
+ ));
417
+ const handleDayClick = () => {
418
+ if (ownerState.rangeSelection) {
419
+ if (!ownerState.value) {
420
+ ownerState.onChange?.([thisDay, void 0]);
421
+ } else if (ownerState.value[0] && !ownerState.value[1]) {
422
+ ownerState.onChange?.([
423
+ new Date(
424
+ Math.min(ownerState.value[0].getTime(), thisDay.getTime())
425
+ ),
426
+ new Date(
427
+ Math.max(ownerState.value[0].getTime(), thisDay.getTime())
428
+ )
429
+ ]);
430
+ } else {
431
+ ownerState.onChange?.([thisDay, void 0]);
432
+ }
433
+ } else {
434
+ ownerState.onChange?.([thisDay, void 0]);
435
+ }
436
+ setHoverDay(null);
437
+ };
438
+ return {
439
+ isToday: isToday(thisDay),
440
+ isSelected,
441
+ onClick: handleDayClick,
442
+ onMouseEnter: ownerState.rangeSelection && ownerState.value?.[0] && !ownerState.value?.[1] ? () => setHoverDay(thisDay) : void 0,
443
+ tabIndex: -1,
444
+ "aria-label": thisDay.toLocaleDateString(),
445
+ "aria-selected": isSelected ? "true" : void 0,
446
+ "aria-current": inRange ? "date" : void 0
447
+ };
448
+ },
449
+ [
450
+ ownerState.onChange,
451
+ ownerState.value,
452
+ ownerState.viewMonth,
453
+ ownerState.rangeSelection,
454
+ hoverDay
455
+ ]
456
+ ),
457
+ getPickerMonthProps: useCallback2(
458
+ (monthIndex) => {
459
+ const thisMonth = new Date(ownerState.viewMonth || /* @__PURE__ */ new Date());
460
+ thisMonth.setDate(1);
461
+ thisMonth.setHours(0, 0, 0, 0);
462
+ thisMonth.setMonth(monthIndex);
463
+ const isSelected = !!ownerState.value && (isSameMonth(thisMonth, ownerState.value[0]) || ownerState.value[1] && isSameMonth(thisMonth, ownerState.value[1]));
464
+ const handleMonthClick = () => {
465
+ ownerState.onViewChange?.("day");
466
+ ownerState.onMonthChange?.(thisMonth);
467
+ };
468
+ return {
469
+ isSelected,
470
+ onClick: handleMonthClick,
471
+ tabIndex: -1,
472
+ "aria-label": getMonthName(thisMonth, ownerState.locale || "default")
473
+ };
474
+ },
475
+ [
476
+ ownerState.onMonthChange,
477
+ ownerState.onViewChange,
478
+ ownerState.onChange,
479
+ ownerState.viewMonth,
480
+ ownerState.locale,
481
+ ownerState.value
482
+ ]
483
+ )
484
+ };
485
+ };
486
+
487
+ // src/components/Calendar/Calendar.tsx
488
+ var CalendarRoot = styled("div", {
489
+ name: "Calendar",
490
+ slot: "root"
491
+ })({
492
+ maxWidth: "264px"
493
+ });
494
+ var CalendarHeader = styled("div", {
495
+ name: "Calendar",
496
+ slot: "calendarHeader"
497
+ })(({ theme }) => ({
498
+ display: "flex",
499
+ justifyContent: "space-between",
500
+ alignItems: "center",
501
+ padding: theme.spacing(1)
502
+ }));
503
+ var CalendarViewContainer = styled("div", {
504
+ name: "Calendar",
505
+ slot: "viewContainer"
506
+ })(({ theme }) => ({
507
+ paddingLeft: theme.spacing(1),
508
+ paddingRight: theme.spacing(1),
509
+ position: "relative",
510
+ overflow: "hidden",
511
+ minHeight: "250px"
512
+ }));
513
+ var CalendarViewTable = styled(motion6.table, {
514
+ name: "Calendar",
515
+ slot: "viewTable"
516
+ })(({ theme }) => ({
517
+ position: "absolute",
518
+ borderSpacing: 0,
519
+ "& td, & th": {
520
+ padding: 0
521
+ },
522
+ "& th": {
523
+ paddingTop: theme.spacing(1),
524
+ paddingBottom: theme.spacing(1)
525
+ }
526
+ }));
527
+ var CalendarWeekHeaderContainer = styled("thead", {
528
+ name: "Calendar",
529
+ slot: "weekHeaderContainer"
530
+ })({});
531
+ var CalendarDayPickerContainer = styled("tbody", {
532
+ name: "Calendar",
533
+ slot: "dayPickerContainer"
534
+ })({});
535
+ var CalendarSwitchViewButton = styled(Button_default, {
536
+ name: "Calendar",
537
+ slot: "switchViewButton"
538
+ })(({ ownerState }) => [
539
+ ownerState.view === "month" && {
540
+ pointerEvents: "none"
541
+ }
542
+ ]);
543
+ var CalendarDayCell = styled("td", {
544
+ name: "Calendar",
545
+ slot: "dayCell"
546
+ })(({ theme }) => ({
547
+ // aria-current=date === range에 포함된 버튼
548
+ "&[aria-current=date]": {
549
+ position: "relative",
550
+ "& button[aria-current=date]:not([aria-selected=true])": {
551
+ backgroundColor: `rgb(${theme.palette.primary.lightChannel})`
552
+ },
553
+ '& + td[aria-hidden] + td[aria-current="date"]::before': {
554
+ content: '""',
555
+ position: "absolute",
556
+ top: 0,
557
+ left: "-10px",
558
+ bottom: 0,
559
+ width: "16px",
560
+ backgroundColor: `rgb(${theme.palette.primary.lightChannel})`,
561
+ zIndex: -1
562
+ }
563
+ }
564
+ }));
565
+ var CalendarMonth = styled(Button_default, {
566
+ name: "Calendar",
567
+ slot: "month"
568
+ })(({ theme, isSelected, disabled }) => [
569
+ {
570
+ width: "59px",
571
+ // height: "32px",
572
+ textAlign: "center",
573
+ "&:hover": {
574
+ color: theme.palette.primary.softColor,
575
+ backgroundColor: theme.palette.primary.softHoverBg
576
+ },
577
+ "&:active": {
578
+ color: theme.palette.primary.softColor,
579
+ backgroundColor: theme.palette.primary.softActiveBg
580
+ }
581
+ },
582
+ isSelected && {
583
+ backgroundColor: theme.palette.primary.solidBg,
584
+ color: theme.palette.primary.solidColor,
585
+ "&:hover": {
586
+ color: theme.palette.primary.solidColor,
587
+ backgroundColor: theme.palette.primary.solidHoverBg
588
+ },
589
+ "&:active": {
590
+ color: theme.palette.primary.solidColor,
591
+ backgroundColor: theme.palette.primary.solidActiveBg
592
+ }
593
+ },
594
+ disabled && {
595
+ color: theme.palette.neutral.solidDisabledColor,
596
+ backgroundColor: theme.palette.neutral.solidDisabledBg
597
+ }
598
+ ]);
599
+ var CalendarDay = styled(Button_default, {
600
+ name: "Calendar",
601
+ slot: "day"
602
+ })(({ theme, isToday: isToday2, isSelected, disabled }) => [
603
+ {
604
+ width: "32px",
605
+ height: "32px",
606
+ textAlign: "center",
607
+ "&:hover": {
608
+ color: theme.palette.primary.softColor,
609
+ backgroundColor: theme.palette.primary.softHoverBg
610
+ },
611
+ "&:active": {
612
+ color: theme.palette.primary.softColor,
613
+ backgroundColor: theme.palette.primary.softActiveBg
614
+ }
615
+ },
616
+ // NOTE: enabled, disabled 일때만 border 적용
617
+ isToday2 && !isSelected && {
618
+ "&:not([aria-current=date]):not(:hover)": {
619
+ border: `1px solid ${theme.palette.neutral.outlinedBorder}`
620
+ }
621
+ },
622
+ isSelected && {
623
+ backgroundColor: theme.palette.primary.solidBg,
624
+ color: theme.palette.primary.solidColor,
625
+ "&:hover": {
626
+ color: theme.palette.primary.solidColor,
627
+ backgroundColor: theme.palette.primary.solidHoverBg
628
+ },
629
+ "&:active": {
630
+ color: theme.palette.primary.solidColor,
631
+ backgroundColor: theme.palette.primary.solidActiveBg
632
+ }
633
+ },
634
+ disabled && {
635
+ color: theme.palette.neutral.solidDisabledColor,
636
+ backgroundColor: theme.palette.neutral.solidDisabledBg
637
+ }
638
+ ]);
639
+ var variants = {
640
+ enter: (direction) => {
641
+ return {
642
+ x: direction > 0 ? 300 : -300,
643
+ opacity: 0
644
+ };
645
+ },
646
+ center: {
647
+ zIndex: 1,
648
+ x: 0,
649
+ opacity: 1
650
+ },
651
+ exit: (direction) => {
652
+ return {
653
+ zIndex: 0,
654
+ x: direction < 0 ? 300 : -300,
655
+ opacity: 0
656
+ };
657
+ }
658
+ };
659
+ var swipeConfidenceThreshold = 1e4;
660
+ var swipePower = (offset, velocity) => {
661
+ return Math.abs(offset) * velocity;
662
+ };
663
+ var PickerDays = (props) => {
664
+ const { ownerState } = props;
665
+ const { getPickerDayProps, getDayCellProps } = useCalendar(ownerState);
666
+ const calendarDates = useMemo2(
667
+ () => getCalendarDates(ownerState.viewMonth),
668
+ [ownerState.viewMonth]
669
+ );
670
+ const weekdayNames = useMemo2(
671
+ () => getWeekdayNames(ownerState.locale || "default"),
672
+ [ownerState.locale]
673
+ );
674
+ return /* @__PURE__ */ React6.createElement(CalendarViewContainer, null, /* @__PURE__ */ React6.createElement(AnimatePresence, { initial: false, custom: ownerState.direction }, /* @__PURE__ */ React6.createElement(
675
+ CalendarViewTable,
676
+ {
677
+ key: `${ownerState.viewMonth.toString()}_${ownerState.direction}`,
678
+ custom: ownerState.direction,
679
+ variants,
680
+ initial: "enter",
681
+ animate: "center",
682
+ exit: "exit",
683
+ transition: {
684
+ x: { type: "spring", stiffness: 300, damping: 30 },
685
+ opacity: { duration: 0.2 }
686
+ },
687
+ drag: "x",
688
+ dragConstraints: { left: 0, right: 0 },
689
+ dragElastic: 1,
690
+ onDragEnd: (e, { offset, velocity }) => {
691
+ const swipe = swipePower(offset.x, velocity.x);
692
+ if (swipe < -swipeConfidenceThreshold) {
693
+ const date = new Date(ownerState.viewMonth || /* @__PURE__ */ new Date());
694
+ date.setMonth(date.getMonth() + 1);
695
+ ownerState.onMonthChange?.(date);
696
+ } else if (swipe > swipeConfidenceThreshold) {
697
+ const date = new Date(ownerState.viewMonth || /* @__PURE__ */ new Date());
698
+ date.setMonth(date.getMonth() - 1);
699
+ ownerState.onMonthChange?.(date);
700
+ }
701
+ }
702
+ },
703
+ /* @__PURE__ */ React6.createElement(CalendarWeekHeaderContainer, null, /* @__PURE__ */ React6.createElement("tr", null, weekdayNames.map((name, i) => /* @__PURE__ */ React6.createElement(React6.Fragment, null, /* @__PURE__ */ React6.createElement("th", null, /* @__PURE__ */ React6.createElement(Typography_default, { level: "body-xs", textAlign: "center" }, name)), i < 6 && /* @__PURE__ */ React6.createElement(
704
+ "th",
705
+ {
706
+ style: { width: 4 },
707
+ "aria-hidden": "true",
708
+ "aria-description": "cell-gap"
709
+ }
710
+ ))))),
711
+ /* @__PURE__ */ React6.createElement(CalendarDayPickerContainer, null, calendarDates.map((weekDates, rowIndex) => /* @__PURE__ */ React6.createElement(Fragment, { key: `${ownerState.viewMonth}_${rowIndex}` }, /* @__PURE__ */ React6.createElement("tr", null, weekDates.map(
712
+ (date, i) => date ? /* @__PURE__ */ React6.createElement(Fragment, { key: i }, /* @__PURE__ */ React6.createElement(CalendarDayCell, { ...getDayCellProps(date) }, /* @__PURE__ */ React6.createElement(
713
+ CalendarDay,
714
+ {
715
+ size: "sm",
716
+ variant: "plain",
717
+ color: "neutral",
718
+ ...getPickerDayProps(date)
719
+ },
720
+ date
721
+ )), i < 6 && /* @__PURE__ */ React6.createElement("td", { "aria-hidden": "true", "aria-description": "cell-gap" })) : /* @__PURE__ */ React6.createElement(Fragment, { key: i }, /* @__PURE__ */ React6.createElement("td", null), i < 6 && /* @__PURE__ */ React6.createElement("td", { "aria-hidden": "true", "aria-description": "cell-gap" }))
722
+ )), rowIndex < calendarDates.length - 1 && /* @__PURE__ */ React6.createElement("tr", { "aria-hidden": "true", "aria-description": "row-gap" }, /* @__PURE__ */ React6.createElement("td", { colSpan: 13, style: { height: 4 } })))))
723
+ )));
724
+ };
725
+ var PickerMonths = (props) => {
726
+ const { ownerState } = props;
727
+ const { getPickerMonthProps } = useCalendar(ownerState);
728
+ const chunkedMonths = Array.from({ length: 12 }, (_, i) => i).reduce(
729
+ (acc, month) => {
730
+ if (acc[acc.length - 1].length === 4) {
731
+ acc.push([]);
732
+ }
733
+ acc[acc.length - 1].push(month);
734
+ return acc;
735
+ },
736
+ [[]]
737
+ );
738
+ return /* @__PURE__ */ React6.createElement(CalendarViewContainer, null, /* @__PURE__ */ React6.createElement(AnimatePresence, { initial: false, custom: ownerState.direction }, /* @__PURE__ */ React6.createElement(
739
+ CalendarViewTable,
740
+ {
741
+ key: `${ownerState.viewMonth.getFullYear()}_${ownerState.direction}`,
742
+ custom: ownerState.direction,
743
+ variants,
744
+ initial: "enter",
745
+ animate: "center",
746
+ exit: "exit",
747
+ transition: {
748
+ x: { type: "spring", stiffness: 300, damping: 30 },
749
+ opacity: { duration: 0.2 }
750
+ },
751
+ drag: "x",
752
+ dragConstraints: { left: 0, right: 0 },
753
+ dragElastic: 1,
754
+ onDragEnd: (e, { offset, velocity }) => {
755
+ const swipe = swipePower(offset.x, velocity.x);
756
+ if (swipe < -swipeConfidenceThreshold) {
757
+ const date = new Date(ownerState.viewMonth || /* @__PURE__ */ new Date());
758
+ date.setMonth(date.getMonth() + 1);
759
+ ownerState.onMonthChange?.(date);
760
+ } else if (swipe > swipeConfidenceThreshold) {
761
+ const date = new Date(ownerState.viewMonth || /* @__PURE__ */ new Date());
762
+ date.setMonth(date.getMonth() - 1);
763
+ ownerState.onMonthChange?.(date);
764
+ }
765
+ }
766
+ },
767
+ /* @__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(
768
+ CalendarMonth,
769
+ {
770
+ size: "sm",
771
+ variant: "plain",
772
+ color: "neutral",
773
+ ...getPickerMonthProps(monthIndex)
774
+ },
775
+ getMonthNameFromIndex(
776
+ monthIndex,
777
+ ownerState.locale
778
+ )
779
+ )), j < 3 && /* @__PURE__ */ React6.createElement(
780
+ "td",
781
+ {
782
+ style: { width: 4 },
783
+ "aria-hidden": "true",
784
+ "aria-description": "cell-gap"
785
+ }
786
+ )))), i < chunkedMonths.length - 1 && /* @__PURE__ */ React6.createElement("tr", { "aria-hidden": "true", "aria-description": "row-gap" }, /* @__PURE__ */ React6.createElement("td", { colSpan: 7, style: { height: 4 } })))))
787
+ )));
788
+ };
789
+ var Calendar = forwardRef2((inProps, ref) => {
790
+ const [props, ownerState] = useCalendarProps(inProps);
791
+ const {
792
+ value,
793
+ defaultValue,
794
+ onChange,
795
+ locale,
796
+ onViewChange,
797
+ onMonthChange,
798
+ view,
799
+ views,
800
+ rangeSelection,
801
+ ...others
802
+ } = props;
803
+ const { calendarTitle, onPrev, onNext } = useCalendar(ownerState);
804
+ return /* @__PURE__ */ React6.createElement(CalendarRoot, { ref, ...others }, /* @__PURE__ */ React6.createElement(CalendarHeader, null, /* @__PURE__ */ React6.createElement(IconButton_default, { size: "sm", onClick: onPrev }, /* @__PURE__ */ React6.createElement(ChevronLeftIcon, null)), /* @__PURE__ */ React6.createElement(
805
+ CalendarSwitchViewButton,
806
+ {
807
+ ownerState,
808
+ variant: "plain",
809
+ color: "neutral",
810
+ onClick: onViewChange
811
+ },
812
+ calendarTitle
813
+ ), /* @__PURE__ */ React6.createElement(IconButton_default, { size: "sm", onClick: onNext }, /* @__PURE__ */ React6.createElement(ChevronRightIcon, null))), view === "day" && /* @__PURE__ */ React6.createElement(PickerDays, { ownerState }), view === "month" && /* @__PURE__ */ React6.createElement(PickerMonths, { ownerState }));
814
+ });
815
+ Calendar.displayName = "Calendar";
816
+
817
+ // src/components/Calendar/index.ts
818
+ var Calendar_default = Calendar;
819
+
820
+ // src/components/Checkbox/Checkbox.tsx
821
+ import React7 from "react";
822
+ import { Checkbox as JoyCheckbox } from "@mui/joy";
823
+ import { motion as motion7 } from "framer-motion";
824
+ var MotionCheckbox = motion7(JoyCheckbox);
178
825
  var Checkbox = (props) => {
179
- return /* @__PURE__ */ React3.createElement(MotionCheckbox, { ...props });
826
+ return /* @__PURE__ */ React7.createElement(MotionCheckbox, { ...props });
180
827
  };
181
828
  Checkbox.displayName = "Checkbox";
182
829
 
@@ -184,9 +831,9 @@ Checkbox.displayName = "Checkbox";
184
831
  var Checkbox_default = Checkbox;
185
832
 
186
833
  // src/components/Container/Container.tsx
187
- import { styled } from "@mui/joy";
188
- import React4, { forwardRef as forwardRef2 } from "react";
189
- var ContainerRoot = styled("div", {
834
+ import { styled as styled2 } from "@mui/joy";
835
+ import React8, { forwardRef as forwardRef3 } from "react";
836
+ var ContainerRoot = styled2("div", {
190
837
  name: "Container",
191
838
  slot: "root",
192
839
  shouldForwardProp: (prop) => prop !== "maxWidth"
@@ -220,24 +867,24 @@ var ContainerRoot = styled("div", {
220
867
  }
221
868
  }
222
869
  }));
223
- var Container = forwardRef2(function Container2(props, ref) {
224
- return /* @__PURE__ */ React4.createElement(ContainerRoot, { ref, ...props });
870
+ var Container = forwardRef3(function Container2(props, ref) {
871
+ return /* @__PURE__ */ React8.createElement(ContainerRoot, { ref, ...props });
225
872
  });
226
873
  Container.displayName = "Container";
227
874
 
228
875
  // src/components/DataTable/DataTable.tsx
229
- import React7, {
230
- useCallback,
876
+ import React10, {
877
+ useCallback as useCallback3,
231
878
  useEffect,
232
- useMemo,
879
+ useMemo as useMemo3,
233
880
  useRef,
234
- useState
881
+ useState as useState3
235
882
  } from "react";
236
883
 
237
884
  // src/components/Sheet/Sheet.tsx
238
885
  import { Sheet as JoySheet } from "@mui/joy";
239
- import { motion as motion5 } from "framer-motion";
240
- var MotionSheet = motion5(JoySheet);
886
+ import { motion as motion8 } from "framer-motion";
887
+ var MotionSheet = motion8(JoySheet);
241
888
  var Sheet = MotionSheet;
242
889
  Sheet.displayName = "Sheet";
243
890
 
@@ -245,11 +892,11 @@ Sheet.displayName = "Sheet";
245
892
  var Sheet_default = Sheet;
246
893
 
247
894
  // src/components/Table/Table.tsx
248
- import React5 from "react";
895
+ import React9 from "react";
249
896
  import { Table as JoyTable } from "@mui/joy";
250
897
  var Table = (props) => {
251
898
  const { children, ...inheritProps } = props;
252
- return /* @__PURE__ */ React5.createElement(JoyTable, { ...inheritProps }, children);
899
+ return /* @__PURE__ */ React9.createElement(JoyTable, { ...inheritProps }, children);
253
900
  };
254
901
  Table.displayName = "Table";
255
902
  function TableHead(props) {
@@ -260,7 +907,7 @@ function TableHead(props) {
260
907
  slots: { checkbox: RenderCheckbox = Checkbox_default } = {},
261
908
  slotProps: { checkbox: checkboxProps = {} } = {}
262
909
  } = props;
263
- return /* @__PURE__ */ React5.createElement("thead", null, /* @__PURE__ */ React5.createElement("tr", null, showCheckbox && /* @__PURE__ */ React5.createElement(
910
+ return /* @__PURE__ */ React9.createElement("thead", null, /* @__PURE__ */ React9.createElement("tr", null, showCheckbox && /* @__PURE__ */ React9.createElement(
264
911
  "th",
265
912
  {
266
913
  style: {
@@ -268,8 +915,8 @@ function TableHead(props) {
268
915
  textAlign: "center"
269
916
  }
270
917
  },
271
- /* @__PURE__ */ React5.createElement(RenderCheckbox, { onChange: onCheckboxChange, ...checkboxProps })
272
- ), headCells.map((headCell) => /* @__PURE__ */ React5.createElement(
918
+ /* @__PURE__ */ React9.createElement(RenderCheckbox, { onChange: onCheckboxChange, ...checkboxProps })
919
+ ), headCells.map((headCell) => /* @__PURE__ */ React9.createElement(
273
920
  "th",
274
921
  {
275
922
  key: headCell.label,
@@ -294,21 +941,21 @@ function TableBody(props) {
294
941
  slots: { checkbox: RenderCheckbox = Checkbox_default } = {},
295
942
  slotProps: { checkbox: checkboxProps = {} } = {}
296
943
  } = props;
297
- return /* @__PURE__ */ React5.createElement("tbody", null, rows.map((row, rowIndex) => /* @__PURE__ */ React5.createElement("tr", { key: rowIndex }, showCheckbox && /* @__PURE__ */ React5.createElement(
944
+ return /* @__PURE__ */ React9.createElement("tbody", null, rows.map((row, rowIndex) => /* @__PURE__ */ React9.createElement("tr", { key: rowIndex }, showCheckbox && /* @__PURE__ */ React9.createElement(
298
945
  "td",
299
946
  {
300
947
  style: {
301
948
  textAlign: "center"
302
949
  }
303
950
  },
304
- /* @__PURE__ */ React5.createElement(
951
+ /* @__PURE__ */ React9.createElement(
305
952
  RenderCheckbox,
306
953
  {
307
954
  onChange: (event) => onCheckboxChange?.(event, rowIndex),
308
955
  ...checkboxProps
309
956
  }
310
957
  )
311
- ), cellOrder.map((cellKey) => /* @__PURE__ */ React5.createElement(
958
+ ), cellOrder.map((cellKey) => /* @__PURE__ */ React9.createElement(
312
959
  "td",
313
960
  {
314
961
  key: cellKey,
@@ -323,27 +970,14 @@ TableBody.displayName = "TableBody";
323
970
 
324
971
  // src/components/Stack/Stack.tsx
325
972
  import { Stack as JoyStack } from "@mui/joy";
326
- import { motion as motion6 } from "framer-motion";
327
- var MotionStack = motion6(JoyStack);
973
+ import { motion as motion9 } from "framer-motion";
974
+ var MotionStack = motion9(JoyStack);
328
975
  var Stack = MotionStack;
329
976
  Stack.displayName = "Stack";
330
977
 
331
978
  // src/components/Stack/index.ts
332
979
  var Stack_default = Stack;
333
980
 
334
- // src/components/Typography/Typography.tsx
335
- import React6 from "react";
336
- import { Typography as JoyTypography } from "@mui/joy";
337
- import { motion as motion7 } from "framer-motion";
338
- var MotionTypography = motion7(JoyTypography);
339
- var Typography = (props) => {
340
- return /* @__PURE__ */ React6.createElement(MotionTypography, { ...props });
341
- };
342
- Typography.displayName = "Typography";
343
-
344
- // src/components/Typography/index.ts
345
- var Typography_default = Typography;
346
-
347
981
  // src/components/DataTable/DataTable.tsx
348
982
  var numberFormatter = (value) => "Intl" in window ? new Intl.NumberFormat().format(value) : value;
349
983
  function TablePagination(props) {
@@ -358,7 +992,7 @@ function TablePagination(props) {
358
992
  const afterPages = [page + 1, page + 2].filter((p) => p <= lastPage - 1);
359
993
  const isMoreAfterPages = lastPage > 1 && page < lastPage - 3;
360
994
  const isMoreBeforePages = lastPage > 1 && page > 4;
361
- return /* @__PURE__ */ React7.createElement(
995
+ return /* @__PURE__ */ React10.createElement(
362
996
  Stack_default,
363
997
  {
364
998
  direction: "row",
@@ -370,7 +1004,7 @@ function TablePagination(props) {
370
1004
  justifyContent: "end",
371
1005
  alignItems: "center"
372
1006
  },
373
- /* @__PURE__ */ React7.createElement(Stack_default, { direction: "row", spacing: 0.5, alignItems: "center" }, /* @__PURE__ */ React7.createElement(
1007
+ /* @__PURE__ */ React10.createElement(Stack_default, { direction: "row", spacing: 0.5, alignItems: "center" }, /* @__PURE__ */ React10.createElement(
374
1008
  Button_default,
375
1009
  {
376
1010
  size: "sm",
@@ -381,7 +1015,7 @@ function TablePagination(props) {
381
1015
  "aria-label": "Previous page"
382
1016
  },
383
1017
  "<"
384
- ), page !== firstPage && /* @__PURE__ */ React7.createElement(
1018
+ ), page !== firstPage && /* @__PURE__ */ React10.createElement(
385
1019
  Button_default,
386
1020
  {
387
1021
  size: "sm",
@@ -390,7 +1024,7 @@ function TablePagination(props) {
390
1024
  onClick: () => onPageChange(firstPage)
391
1025
  },
392
1026
  firstPage
393
- ), isMoreBeforePages && /* @__PURE__ */ React7.createElement(
1027
+ ), isMoreBeforePages && /* @__PURE__ */ React10.createElement(
394
1028
  Button_default,
395
1029
  {
396
1030
  size: "sm",
@@ -399,7 +1033,7 @@ function TablePagination(props) {
399
1033
  onClick: () => onPageChange(page - 3)
400
1034
  },
401
1035
  "..."
402
- ), beforePages.map((p) => /* @__PURE__ */ React7.createElement(
1036
+ ), beforePages.map((p) => /* @__PURE__ */ React10.createElement(
403
1037
  Button_default,
404
1038
  {
405
1039
  key: p,
@@ -409,7 +1043,7 @@ function TablePagination(props) {
409
1043
  onClick: () => onPageChange(p)
410
1044
  },
411
1045
  p
412
- )), /* @__PURE__ */ React7.createElement(Button_default, { variant: "soft", size: "sm" }, page), afterPages.map((p) => /* @__PURE__ */ React7.createElement(
1046
+ )), /* @__PURE__ */ React10.createElement(Button_default, { variant: "soft", size: "sm" }, page), afterPages.map((p) => /* @__PURE__ */ React10.createElement(
413
1047
  Button_default,
414
1048
  {
415
1049
  key: p,
@@ -419,7 +1053,7 @@ function TablePagination(props) {
419
1053
  onClick: () => onPageChange(p)
420
1054
  },
421
1055
  p
422
- )), isMoreAfterPages && /* @__PURE__ */ React7.createElement(
1056
+ )), isMoreAfterPages && /* @__PURE__ */ React10.createElement(
423
1057
  Button_default,
424
1058
  {
425
1059
  size: "sm",
@@ -428,7 +1062,7 @@ function TablePagination(props) {
428
1062
  onClick: () => onPageChange(page + 3)
429
1063
  },
430
1064
  "..."
431
- ), page !== lastPage && /* @__PURE__ */ React7.createElement(
1065
+ ), page !== lastPage && /* @__PURE__ */ React10.createElement(
432
1066
  Button_default,
433
1067
  {
434
1068
  size: "sm",
@@ -437,7 +1071,7 @@ function TablePagination(props) {
437
1071
  onClick: () => onPageChange(lastPage)
438
1072
  },
439
1073
  lastPage
440
- ), /* @__PURE__ */ React7.createElement(
1074
+ ), /* @__PURE__ */ React10.createElement(
441
1075
  Button_default,
442
1076
  {
443
1077
  size: "sm",
@@ -451,7 +1085,7 @@ function TablePagination(props) {
451
1085
  ))
452
1086
  );
453
1087
  }
454
- var Resizer = (ref) => /* @__PURE__ */ React7.createElement(
1088
+ var Resizer = (ref) => /* @__PURE__ */ React10.createElement(
455
1089
  Box_default,
456
1090
  {
457
1091
  sx: {
@@ -489,7 +1123,7 @@ var HeadCell = (props) => {
489
1123
  position: props.stickyHeader ? void 0 : "relative"
490
1124
  };
491
1125
  const resizer = props.resizable ?? true ? Resizer(ref) : null;
492
- return /* @__PURE__ */ React7.createElement("th", { ref, key: props.field, style }, props.headerName ?? props.field, resizer);
1126
+ return /* @__PURE__ */ React10.createElement("th", { ref, key: props.field, style }, props.headerName ?? props.field, resizer);
493
1127
  };
494
1128
  function useDataTableRenderer({
495
1129
  rows,
@@ -501,28 +1135,28 @@ function useDataTableRenderer({
501
1135
  onSelectionModelChange,
502
1136
  stickyHeader
503
1137
  }) {
504
- const [page, setPage] = useState(paginationModel?.page || 1);
1138
+ const [page, setPage] = useState3(paginationModel?.page || 1);
505
1139
  const pageSize = paginationModel?.pageSize || 20;
506
- const selectedModelSet = useMemo(
1140
+ const selectedModelSet = useMemo3(
507
1141
  () => new Set(selectionModel),
508
1142
  [selectionModel]
509
1143
  );
510
- const dataInPage = useMemo(
1144
+ const dataInPage = useMemo3(
511
1145
  () => rows.slice((page - 1) * pageSize, (page - 1) * pageSize + pageSize),
512
1146
  [rows, page, pageSize]
513
1147
  );
514
- const isAllSelected = useMemo(
1148
+ const isAllSelected = useMemo3(
515
1149
  () => dataInPage.length > 0 && dataInPage.every(
516
1150
  (_, i) => selectedModelSet.has(`${i + (page - 1) * pageSize}`)
517
1151
  ),
518
1152
  [dataInPage, selectedModelSet, page, pageSize]
519
1153
  );
520
1154
  const rowCount = totalRowsProp || rows.length;
521
- const isTotalSelected = useMemo(
1155
+ const isTotalSelected = useMemo3(
522
1156
  () => rowCount > 0 && selectionModel.length === rowCount,
523
1157
  [selectionModel, rowCount]
524
1158
  );
525
- const handlePageChange = useCallback(
1159
+ const handlePageChange = useCallback3(
526
1160
  (newPage) => {
527
1161
  setPage(newPage);
528
1162
  onPaginationModelChange?.({ page: newPage, pageSize });
@@ -570,16 +1204,16 @@ function useDataTableRenderer({
570
1204
  isAllSelected,
571
1205
  // all rows are selected on this page
572
1206
  isTotalSelected,
573
- isSelectedRow: useCallback(
1207
+ isSelectedRow: useCallback3(
574
1208
  (model) => selectedModelSet.has(model),
575
1209
  [selectedModelSet]
576
1210
  ),
577
- onAllCheckboxChange: useCallback(() => {
1211
+ onAllCheckboxChange: useCallback3(() => {
578
1212
  onSelectionModelChange?.(
579
1213
  isAllSelected ? [] : dataInPage.map((_, i) => `${i + (page - 1) * pageSize}`)
580
1214
  );
581
1215
  }, [isAllSelected, dataInPage, onSelectionModelChange]),
582
- onCheckboxChange: useCallback(
1216
+ onCheckboxChange: useCallback3(
583
1217
  (event, selectedModel) => {
584
1218
  if (selectedModelSet.has(selectedModel)) {
585
1219
  const newSelectionModel = selectionModel.filter(
@@ -593,14 +1227,14 @@ function useDataTableRenderer({
593
1227
  },
594
1228
  [selectionModel, onSelectionModelChange]
595
1229
  ),
596
- columns: useMemo(
1230
+ columns: useMemo3(
597
1231
  () => columns || // fallback
598
1232
  Object.keys(rows[0] || {}).map((key) => ({
599
1233
  field: key
600
1234
  })),
601
1235
  [rows, columns]
602
1236
  ),
603
- onTotalSelect: useCallback(() => {
1237
+ onTotalSelect: useCallback3(() => {
604
1238
  onSelectionModelChange?.(
605
1239
  isTotalSelected ? [] : rows.map((_, i) => `${i}`)
606
1240
  );
@@ -647,7 +1281,7 @@ function DataTable(props) {
647
1281
  onTotalSelect,
648
1282
  HeadCell: HeadCell2
649
1283
  } = useDataTableRenderer(props);
650
- return /* @__PURE__ */ React7.createElement(Box_default, null, /* @__PURE__ */ React7.createElement(
1284
+ return /* @__PURE__ */ React10.createElement(Box_default, null, /* @__PURE__ */ React10.createElement(
651
1285
  Stack_default,
652
1286
  {
653
1287
  direction: "row",
@@ -658,7 +1292,7 @@ function DataTable(props) {
658
1292
  justifyContent: "space-between",
659
1293
  alignItems: "center"
660
1294
  },
661
- /* @__PURE__ */ React7.createElement(Stack_default, { direction: "row", spacing: 1 }, !isAllSelected && /* @__PURE__ */ React7.createElement(Typography_default, { level: "body-xs" }, numberFormatter(selectionModel?.length || 0), " items selected"), isAllSelected && !isTotalSelected && /* @__PURE__ */ React7.createElement(Stack_default, { direction: "row", spacing: 1, alignItems: "center" }, /* @__PURE__ */ React7.createElement(Typography_default, { level: "body-xs" }, "All ", numberFormatter(selectionModel?.length || 0), " items on this page are selected."), /* @__PURE__ */ React7.createElement(Button_default, { size: "sm", variant: "plain", onClick: onTotalSelect }, "Select all ", numberFormatter(rows.length), " items")), isTotalSelected && /* @__PURE__ */ React7.createElement(Stack_default, { direction: "row", spacing: 1, alignItems: "center" }, /* @__PURE__ */ React7.createElement(Typography_default, { level: "body-xs" }, "All ", numberFormatter(rows.length), " items are selected."), /* @__PURE__ */ React7.createElement(
1295
+ /* @__PURE__ */ React10.createElement(Stack_default, { direction: "row", spacing: 1 }, !isAllSelected && /* @__PURE__ */ React10.createElement(Typography_default, { level: "body-xs" }, numberFormatter(selectionModel?.length || 0), " items selected"), isAllSelected && !isTotalSelected && /* @__PURE__ */ React10.createElement(Stack_default, { direction: "row", spacing: 1, alignItems: "center" }, /* @__PURE__ */ React10.createElement(Typography_default, { level: "body-xs" }, "All ", numberFormatter(selectionModel?.length || 0), " items on this page are selected."), /* @__PURE__ */ React10.createElement(Button_default, { size: "sm", variant: "plain", onClick: onTotalSelect }, "Select all ", numberFormatter(rows.length), " items")), isTotalSelected && /* @__PURE__ */ React10.createElement(Stack_default, { direction: "row", spacing: 1, alignItems: "center" }, /* @__PURE__ */ React10.createElement(Typography_default, { level: "body-xs" }, "All ", numberFormatter(rows.length), " items are selected."), /* @__PURE__ */ React10.createElement(
662
1296
  Button_default,
663
1297
  {
664
1298
  size: "sm",
@@ -668,8 +1302,8 @@ function DataTable(props) {
668
1302
  },
669
1303
  "Cancel"
670
1304
  ))),
671
- Toolbar && /* @__PURE__ */ React7.createElement(Toolbar, { ...toolbarProps || {} })
672
- ), /* @__PURE__ */ React7.createElement(
1305
+ Toolbar && /* @__PURE__ */ React10.createElement(Toolbar, { ...toolbarProps || {} })
1306
+ ), /* @__PURE__ */ React10.createElement(
673
1307
  Sheet_default,
674
1308
  {
675
1309
  variant: "outlined",
@@ -681,7 +1315,7 @@ function DataTable(props) {
681
1315
  },
682
1316
  ...backgroundProps
683
1317
  },
684
- /* @__PURE__ */ React7.createElement(Table, { ...innerProps }, /* @__PURE__ */ React7.createElement("thead", null, /* @__PURE__ */ React7.createElement("tr", null, checkboxSelection && /* @__PURE__ */ React7.createElement(
1318
+ /* @__PURE__ */ React10.createElement(Table, { ...innerProps }, /* @__PURE__ */ React10.createElement("thead", null, /* @__PURE__ */ React10.createElement("tr", null, checkboxSelection && /* @__PURE__ */ React10.createElement(
685
1319
  "th",
686
1320
  {
687
1321
  style: {
@@ -689,7 +1323,7 @@ function DataTable(props) {
689
1323
  textAlign: "center"
690
1324
  }
691
1325
  },
692
- /* @__PURE__ */ React7.createElement(
1326
+ /* @__PURE__ */ React10.createElement(
693
1327
  RenderCheckbox,
694
1328
  {
695
1329
  onChange: onAllCheckboxChange,
@@ -698,16 +1332,16 @@ function DataTable(props) {
698
1332
  ...checkboxProps
699
1333
  }
700
1334
  )
701
- ), columns.map((c) => /* @__PURE__ */ React7.createElement(
1335
+ ), columns.map((c) => /* @__PURE__ */ React10.createElement(
702
1336
  HeadCell2,
703
1337
  {
704
1338
  key: c.field,
705
1339
  stickyHeader: props.stickyHeader,
706
1340
  ...c
707
1341
  }
708
- )))), /* @__PURE__ */ React7.createElement("tbody", null, dataInPage.map((row, rowIndex) => {
1342
+ )))), /* @__PURE__ */ React10.createElement("tbody", null, dataInPage.map((row, rowIndex) => {
709
1343
  const rowId = `${rowIndex + (page - 1) * pageSize}`;
710
- return /* @__PURE__ */ React7.createElement(
1344
+ return /* @__PURE__ */ React10.createElement(
711
1345
  "tr",
712
1346
  {
713
1347
  key: rowId,
@@ -716,7 +1350,7 @@ function DataTable(props) {
716
1350
  onClick: checkboxSelection ? (e) => onCheckboxChange(e, rowId) : void 0,
717
1351
  "aria-checked": checkboxSelection ? isSelectedRow(rowId) : void 0
718
1352
  },
719
- checkboxSelection && /* @__PURE__ */ React7.createElement(
1353
+ checkboxSelection && /* @__PURE__ */ React10.createElement(
720
1354
  "th",
721
1355
  {
722
1356
  scope: "row",
@@ -724,7 +1358,7 @@ function DataTable(props) {
724
1358
  textAlign: "center"
725
1359
  }
726
1360
  },
727
- /* @__PURE__ */ React7.createElement(
1361
+ /* @__PURE__ */ React10.createElement(
728
1362
  RenderCheckbox,
729
1363
  {
730
1364
  onChange: (e) => onCheckboxChange(e, rowId),
@@ -733,7 +1367,7 @@ function DataTable(props) {
733
1367
  }
734
1368
  )
735
1369
  ),
736
- columns.map((column) => /* @__PURE__ */ React7.createElement(
1370
+ columns.map((column) => /* @__PURE__ */ React10.createElement(
737
1371
  "td",
738
1372
  {
739
1373
  key: column.field,
@@ -744,8 +1378,8 @@ function DataTable(props) {
744
1378
  row[column.field]
745
1379
  ))
746
1380
  );
747
- })), Footer && /* @__PURE__ */ React7.createElement(Footer, null))
748
- ), /* @__PURE__ */ React7.createElement(
1381
+ })), Footer && /* @__PURE__ */ React10.createElement(Footer, null))
1382
+ ), /* @__PURE__ */ React10.createElement(
749
1383
  TablePagination,
750
1384
  {
751
1385
  paginationModel: { page, pageSize },
@@ -756,20 +1390,380 @@ function DataTable(props) {
756
1390
  }
757
1391
  DataTable.displayName = "DataTable";
758
1392
 
1393
+ // src/components/DatePicker/DatePicker.tsx
1394
+ import React12, { forwardRef as forwardRef4, useCallback as useCallback4, useState as useState4 } from "react";
1395
+ import { IMaskInput, IMask } from "react-imask";
1396
+ import CalendarTodayIcon from "@mui/icons-material/CalendarToday";
1397
+ import { styled as styled3 } from "@mui/joy/styles";
1398
+ import { FocusTrap } from "@mui/base/FocusTrap";
1399
+ import { ClickAwayListener } from "@mui/base/ClickAwayListener";
1400
+ import { Popper } from "@mui/base/Popper";
1401
+
1402
+ // src/components/Input/Input.tsx
1403
+ import React11 from "react";
1404
+ import { Input as JoyInput } from "@mui/joy";
1405
+ import { motion as motion10 } from "framer-motion";
1406
+ var MotionInput = motion10(JoyInput);
1407
+ var Input = (props) => {
1408
+ return /* @__PURE__ */ React11.createElement(MotionInput, { ...props });
1409
+ };
1410
+ Input.displayName = "Input";
1411
+
1412
+ // src/components/Input/index.ts
1413
+ var Input_default = Input;
1414
+
759
1415
  // src/components/DialogActions/DialogActions.tsx
760
1416
  import { DialogActions as JoyDialogActions } from "@mui/joy";
761
- import { motion as motion8 } from "framer-motion";
762
- var MotionDialogActions = motion8(JoyDialogActions);
1417
+ import { motion as motion11 } from "framer-motion";
1418
+ var MotionDialogActions = motion11(JoyDialogActions);
763
1419
  var DialogActions = MotionDialogActions;
764
1420
  DialogActions.displayName = "DialogActions";
765
1421
 
766
1422
  // src/components/DialogActions/index.ts
767
1423
  var DialogActions_default = DialogActions;
768
1424
 
1425
+ // src/components/DatePicker/DatePicker.tsx
1426
+ var CalendarSheet = styled3(Sheet_default, {
1427
+ name: "DatePicker",
1428
+ slot: "sheet",
1429
+ overridesResolver: (props, styles) => styles.root
1430
+ })(({ theme }) => ({
1431
+ zIndex: theme.zIndex.popup,
1432
+ width: "264px",
1433
+ boxShadow: theme.shadow.md,
1434
+ borderRadius: theme.radius.md
1435
+ }));
1436
+ var formatValueString = (date) => {
1437
+ let day = `${date.getDate()}`;
1438
+ let month = `${date.getMonth() + 1}`;
1439
+ const year = date.getFullYear();
1440
+ if (Number(day) < 10)
1441
+ day = "0" + day;
1442
+ if (Number(month) < 10)
1443
+ month = "0" + month;
1444
+ return [year, month, day].join("/");
1445
+ };
1446
+ var TextMaskAdapter = React12.forwardRef(
1447
+ function TextMaskAdapter2(props, ref) {
1448
+ const { onChange, ...other } = props;
1449
+ return /* @__PURE__ */ React12.createElement(
1450
+ IMaskInput,
1451
+ {
1452
+ ...other,
1453
+ inputRef: ref,
1454
+ onAccept: (value) => onChange({ target: { name: props.name, value } }),
1455
+ mask: Date,
1456
+ pattern: "Y/`m/`d",
1457
+ blocks: {
1458
+ d: {
1459
+ mask: IMask.MaskedRange,
1460
+ from: 1,
1461
+ to: 31,
1462
+ maxLength: 2
1463
+ },
1464
+ m: {
1465
+ mask: IMask.MaskedRange,
1466
+ from: 1,
1467
+ to: 12,
1468
+ maxLength: 2
1469
+ },
1470
+ Y: {
1471
+ mask: IMask.MaskedRange,
1472
+ from: 1900,
1473
+ to: 9999
1474
+ }
1475
+ },
1476
+ format: formatValueString,
1477
+ parse: (str) => {
1478
+ const yearMonthDay = str.split("/");
1479
+ return new Date(
1480
+ Number(yearMonthDay[0]),
1481
+ Number(yearMonthDay[1]) - 1,
1482
+ Number(yearMonthDay[2])
1483
+ );
1484
+ },
1485
+ autofix: "pad",
1486
+ overwrite: true,
1487
+ placeholderChar: " "
1488
+ }
1489
+ );
1490
+ }
1491
+ );
1492
+ var DatePicker = forwardRef4(
1493
+ (props, ref) => {
1494
+ const { onChange, disabled } = props;
1495
+ const [value, setValue] = useState4(props.value || "");
1496
+ const [anchorEl, setAnchorEl] = useState4(null);
1497
+ const open = Boolean(anchorEl);
1498
+ const handleChange = useCallback4(
1499
+ (event) => {
1500
+ setValue(event.target.value);
1501
+ onChange?.(event);
1502
+ },
1503
+ []
1504
+ );
1505
+ const handleCalendarToggle = useCallback4(
1506
+ (event) => {
1507
+ setAnchorEl(anchorEl ? null : event.currentTarget);
1508
+ },
1509
+ [anchorEl, setAnchorEl]
1510
+ );
1511
+ return /* @__PURE__ */ React12.createElement(React12.Fragment, null, /* @__PURE__ */ React12.createElement(
1512
+ Input_default,
1513
+ {
1514
+ ref,
1515
+ size: "sm",
1516
+ value,
1517
+ onChange: handleChange,
1518
+ placeholder: "YYYY/MM/DD",
1519
+ disabled,
1520
+ slotProps: { input: { component: TextMaskAdapter } },
1521
+ sx: {
1522
+ // NOTE: placeholder char 를 텍스트로 표시하므로 동일한 너비를 가지는 mono font 를 사용해야 이질감이 없다.
1523
+ fontFamily: "monospace"
1524
+ },
1525
+ endDecorator: /* @__PURE__ */ React12.createElement(IconButton_default, { variant: "plain", onClick: handleCalendarToggle }, /* @__PURE__ */ React12.createElement(CalendarTodayIcon, null))
1526
+ }
1527
+ ), open && /* @__PURE__ */ React12.createElement(ClickAwayListener, { onClickAway: () => setAnchorEl(null) }, /* @__PURE__ */ React12.createElement(
1528
+ Popper,
1529
+ {
1530
+ id: "date-picker-popper",
1531
+ open: true,
1532
+ anchorEl,
1533
+ placement: "bottom-end",
1534
+ modifiers: [
1535
+ {
1536
+ name: "offset",
1537
+ options: {
1538
+ offset: [0, 4]
1539
+ }
1540
+ }
1541
+ ]
1542
+ },
1543
+ /* @__PURE__ */ React12.createElement(FocusTrap, { open: true }, /* @__PURE__ */ React12.createElement(CalendarSheet, { tabIndex: -1, role: "presentation" }, /* @__PURE__ */ React12.createElement(
1544
+ Calendar_default,
1545
+ {
1546
+ value: !Number.isNaN(new Date(value).getTime()) ? [new Date(value), void 0] : void 0,
1547
+ onChange: ([date]) => {
1548
+ setValue(formatValueString(date));
1549
+ setAnchorEl(null);
1550
+ }
1551
+ }
1552
+ ), /* @__PURE__ */ React12.createElement(
1553
+ DialogActions_default,
1554
+ {
1555
+ sx: {
1556
+ p: 1
1557
+ }
1558
+ },
1559
+ /* @__PURE__ */ React12.createElement(
1560
+ Button_default,
1561
+ {
1562
+ size: "sm",
1563
+ variant: "plain",
1564
+ color: "neutral",
1565
+ onClick: () => {
1566
+ setValue("");
1567
+ setAnchorEl(null);
1568
+ }
1569
+ },
1570
+ "Clear"
1571
+ )
1572
+ )))
1573
+ )));
1574
+ }
1575
+ );
1576
+ DatePicker.displayName = "DatePicker";
1577
+
1578
+ // src/components/DateRangePicker/DateRangePicker.tsx
1579
+ import React13, { forwardRef as forwardRef5, useCallback as useCallback5, useMemo as useMemo4, useState as useState5 } from "react";
1580
+ import { IMaskInput as IMaskInput2, IMask as IMask2 } from "react-imask";
1581
+ import CalendarTodayIcon2 from "@mui/icons-material/CalendarToday";
1582
+ import { styled as styled4 } from "@mui/joy/styles";
1583
+ import { FocusTrap as FocusTrap2 } from "@mui/base/FocusTrap";
1584
+ import { ClickAwayListener as ClickAwayListener2 } from "@mui/base/ClickAwayListener";
1585
+ import { Popper as Popper2 } from "@mui/base/Popper";
1586
+ var CalendarSheet2 = styled4(Sheet_default, {
1587
+ name: "DateRangePicker",
1588
+ slot: "sheet",
1589
+ overridesResolver: (props, styles) => styles.root
1590
+ })(({ theme }) => ({
1591
+ zIndex: theme.zIndex.popup,
1592
+ width: "264px",
1593
+ boxShadow: theme.shadow.md,
1594
+ borderRadius: theme.radius.md
1595
+ }));
1596
+ var formatValueString2 = ([date1, date2]) => {
1597
+ const getStr = (date) => {
1598
+ let day = `${date.getDate()}`;
1599
+ let month = `${date.getMonth() + 1}`;
1600
+ const year = date.getFullYear();
1601
+ if (Number(day) < 10)
1602
+ day = "0" + day;
1603
+ if (Number(month) < 10)
1604
+ month = "0" + month;
1605
+ return [year, month, day].join("/");
1606
+ };
1607
+ return [getStr(date1), date2 ? getStr(date2) : ""].join(" - ");
1608
+ };
1609
+ var parseDate = (str) => {
1610
+ const date1 = str.split(" - ")[0] || "";
1611
+ const date2 = str.split(" - ")[1] || "";
1612
+ const yearMonthDay1 = date1.split("/");
1613
+ const yearMonthDay2 = date2.split("/");
1614
+ return [
1615
+ new Date(
1616
+ Number(yearMonthDay1[0]),
1617
+ Number(yearMonthDay1[1]) - 1,
1618
+ Number(yearMonthDay1[2])
1619
+ ),
1620
+ new Date(
1621
+ Number(yearMonthDay2[0]),
1622
+ Number(yearMonthDay2[1]) - 1,
1623
+ Number(yearMonthDay2[2])
1624
+ )
1625
+ ];
1626
+ };
1627
+ var TextMaskAdapter3 = React13.forwardRef(
1628
+ function TextMaskAdapter4(props, ref) {
1629
+ const { onChange, ...other } = props;
1630
+ return /* @__PURE__ */ React13.createElement(
1631
+ IMaskInput2,
1632
+ {
1633
+ ...other,
1634
+ inputRef: ref,
1635
+ onAccept: (value) => onChange({ target: { name: props.name, value } }),
1636
+ mask: Date,
1637
+ pattern: "Y/`m/`d - Y/`m/`d",
1638
+ blocks: {
1639
+ d: {
1640
+ mask: IMask2.MaskedRange,
1641
+ from: 1,
1642
+ to: 31,
1643
+ maxLength: 2
1644
+ },
1645
+ m: {
1646
+ mask: IMask2.MaskedRange,
1647
+ from: 1,
1648
+ to: 12,
1649
+ maxLength: 2
1650
+ },
1651
+ Y: {
1652
+ mask: IMask2.MaskedRange,
1653
+ from: 1900,
1654
+ to: 9999
1655
+ }
1656
+ },
1657
+ format: formatValueString2,
1658
+ parse: parseDate,
1659
+ autofix: "pad",
1660
+ overwrite: true,
1661
+ placeholderChar: " "
1662
+ }
1663
+ );
1664
+ }
1665
+ );
1666
+ var DateRangePicker = forwardRef5(
1667
+ (props, ref) => {
1668
+ const { onChange, disabled } = props;
1669
+ const [value, setValue] = useState5(props.value || "");
1670
+ const [anchorEl, setAnchorEl] = useState5(null);
1671
+ const open = Boolean(anchorEl);
1672
+ const calendarValue = useMemo4(
1673
+ () => value ? parseDate(value) : void 0,
1674
+ [value]
1675
+ );
1676
+ const handleChange = useCallback5(
1677
+ (event) => {
1678
+ setValue(event.target.value);
1679
+ onChange?.(event);
1680
+ },
1681
+ []
1682
+ );
1683
+ const handleCalendarToggle = useCallback5(
1684
+ (event) => {
1685
+ setAnchorEl(anchorEl ? null : event.currentTarget);
1686
+ },
1687
+ [anchorEl, setAnchorEl]
1688
+ );
1689
+ const handleCalendarChange = useCallback5(
1690
+ ([date1, date2]) => {
1691
+ if (!date1 || !date2)
1692
+ return;
1693
+ setValue(formatValueString2([date1, date2]));
1694
+ setAnchorEl(null);
1695
+ },
1696
+ [setValue, setAnchorEl]
1697
+ );
1698
+ return /* @__PURE__ */ React13.createElement(React13.Fragment, null, /* @__PURE__ */ React13.createElement(
1699
+ Input_default,
1700
+ {
1701
+ ref,
1702
+ size: "sm",
1703
+ value,
1704
+ onChange: handleChange,
1705
+ disabled,
1706
+ placeholder: "YYYY/MM/DD - YYYY/MM/DD",
1707
+ slotProps: { input: { component: TextMaskAdapter3 } },
1708
+ sx: {
1709
+ // NOTE: placeholder char 를 텍스트로 표시하므로 동일한 너비를 가지는 mono font 를 사용해야 이질감이 없다.
1710
+ fontFamily: "monospace"
1711
+ },
1712
+ endDecorator: /* @__PURE__ */ React13.createElement(IconButton_default, { variant: "plain", onClick: handleCalendarToggle }, /* @__PURE__ */ React13.createElement(CalendarTodayIcon2, null))
1713
+ }
1714
+ ), open && /* @__PURE__ */ React13.createElement(ClickAwayListener2, { onClickAway: () => setAnchorEl(null) }, /* @__PURE__ */ React13.createElement(
1715
+ Popper2,
1716
+ {
1717
+ id: "date-range-picker-popper",
1718
+ open: true,
1719
+ anchorEl,
1720
+ placement: "bottom-end",
1721
+ modifiers: [
1722
+ {
1723
+ name: "offset",
1724
+ options: {
1725
+ offset: [0, 4]
1726
+ }
1727
+ }
1728
+ ]
1729
+ },
1730
+ /* @__PURE__ */ React13.createElement(FocusTrap2, { open: true }, /* @__PURE__ */ React13.createElement(CalendarSheet2, { tabIndex: -1, role: "presentation" }, /* @__PURE__ */ React13.createElement(
1731
+ Calendar_default,
1732
+ {
1733
+ rangeSelection: true,
1734
+ defaultValue: calendarValue,
1735
+ onChange: handleCalendarChange
1736
+ }
1737
+ ), /* @__PURE__ */ React13.createElement(
1738
+ DialogActions_default,
1739
+ {
1740
+ sx: {
1741
+ p: 1
1742
+ }
1743
+ },
1744
+ /* @__PURE__ */ React13.createElement(
1745
+ Button_default,
1746
+ {
1747
+ size: "sm",
1748
+ variant: "plain",
1749
+ color: "neutral",
1750
+ onClick: () => {
1751
+ setValue("");
1752
+ setAnchorEl(null);
1753
+ }
1754
+ },
1755
+ "Clear"
1756
+ )
1757
+ )))
1758
+ )));
1759
+ }
1760
+ );
1761
+ DateRangePicker.displayName = "DateRangePicker";
1762
+
769
1763
  // src/components/DialogContent/DialogContent.tsx
770
1764
  import { DialogContent as JoyDialogContent } from "@mui/joy";
771
- import { motion as motion9 } from "framer-motion";
772
- var MotionDialogContent = motion9(JoyDialogContent);
1765
+ import { motion as motion12 } from "framer-motion";
1766
+ var MotionDialogContent = motion12(JoyDialogContent);
773
1767
  var DialogContent = MotionDialogContent;
774
1768
  DialogContent.displayName = "DialogContent";
775
1769
 
@@ -778,8 +1772,8 @@ var DialogContent_default = DialogContent;
778
1772
 
779
1773
  // src/components/DialogTitle/DialogTitle.tsx
780
1774
  import { DialogTitle as JoyDialogTitle } from "@mui/joy";
781
- import { motion as motion10 } from "framer-motion";
782
- var MotionDialogTitle = motion10(JoyDialogTitle);
1775
+ import { motion as motion13 } from "framer-motion";
1776
+ var MotionDialogTitle = motion13(JoyDialogTitle);
783
1777
  var DialogTitle = MotionDialogTitle;
784
1778
  DialogTitle.displayName = "DialogTitle";
785
1779
 
@@ -787,60 +1781,60 @@ DialogTitle.displayName = "DialogTitle";
787
1781
  var DialogTitle_default = DialogTitle;
788
1782
 
789
1783
  // src/components/DialogFrame/DialogFrame.tsx
790
- import React9 from "react";
1784
+ import React15 from "react";
791
1785
 
792
1786
  // src/components/Modal/Modal.tsx
793
- import React8 from "react";
1787
+ import React14 from "react";
794
1788
  import {
795
1789
  Modal as JoyModal,
796
1790
  ModalDialog as JoyModalDialog,
797
1791
  ModalClose as JoyModalClose,
798
1792
  ModalOverflow as JoyModalOverflow
799
1793
  } from "@mui/joy";
800
- import { motion as motion11 } from "framer-motion";
801
- var MotionModal = motion11(JoyModal);
1794
+ import { motion as motion14 } from "framer-motion";
1795
+ var MotionModal = motion14(JoyModal);
802
1796
  var Modal = MotionModal;
803
1797
  Modal.displayName = "Modal";
804
- var MotionModalDialog = motion11(JoyModalDialog);
1798
+ var MotionModalDialog = motion14(JoyModalDialog);
805
1799
  var ModalDialog = MotionModalDialog;
806
1800
  ModalDialog.displayName = "ModalDialog";
807
- var MotionModalClose = motion11(JoyModalClose);
1801
+ var MotionModalClose = motion14(JoyModalClose);
808
1802
  var ModalClose = MotionModalClose;
809
1803
  ModalClose.displayName = "ModalClose";
810
- var MotionModalOverflow = motion11(JoyModalOverflow);
1804
+ var MotionModalOverflow = motion14(JoyModalOverflow);
811
1805
  var ModalOverflow = MotionModalOverflow;
812
1806
  ModalOverflow.displayName = "ModalOverflow";
813
1807
  function ModalFrame(props) {
814
1808
  const { title, children, ...innerProps } = props;
815
- return /* @__PURE__ */ React8.createElement(ModalDialog, { ...innerProps }, /* @__PURE__ */ React8.createElement(ModalClose, null), /* @__PURE__ */ React8.createElement(DialogTitle_default, null, title), /* @__PURE__ */ React8.createElement(DialogContent_default, null, children));
1809
+ return /* @__PURE__ */ React14.createElement(ModalDialog, { ...innerProps }, /* @__PURE__ */ React14.createElement(ModalClose, null), /* @__PURE__ */ React14.createElement(DialogTitle_default, null, title), /* @__PURE__ */ React14.createElement(DialogContent_default, null, children));
816
1810
  }
817
1811
  ModalFrame.displayName = "ModalFrame";
818
1812
 
819
1813
  // src/components/DialogFrame/DialogFrame.tsx
820
1814
  function DialogFrame(props) {
821
1815
  const { title, children, actions, ...innerProps } = props;
822
- return /* @__PURE__ */ React9.createElement(ModalDialog, { ...innerProps }, /* @__PURE__ */ React9.createElement(DialogTitle_default, null, title), /* @__PURE__ */ React9.createElement(DialogContent_default, null, children), /* @__PURE__ */ React9.createElement(DialogActions_default, null, actions));
1816
+ return /* @__PURE__ */ React15.createElement(ModalDialog, { ...innerProps }, /* @__PURE__ */ React15.createElement(DialogTitle_default, null, title), /* @__PURE__ */ React15.createElement(DialogContent_default, null, children), /* @__PURE__ */ React15.createElement(DialogActions_default, null, actions));
823
1817
  }
824
1818
  DialogFrame.displayName = "DialogFrame";
825
1819
 
826
1820
  // src/components/Divider/Divider.tsx
827
- import React10 from "react";
1821
+ import React16 from "react";
828
1822
  import { Divider as JoyDivider } from "@mui/joy";
829
- import { motion as motion12 } from "framer-motion";
830
- var MotionDivider = motion12(JoyDivider);
1823
+ import { motion as motion15 } from "framer-motion";
1824
+ var MotionDivider = motion15(JoyDivider);
831
1825
  var Divider = (props) => {
832
- return /* @__PURE__ */ React10.createElement(MotionDivider, { ...props });
1826
+ return /* @__PURE__ */ React16.createElement(MotionDivider, { ...props });
833
1827
  };
834
1828
  Divider.displayName = "Divider";
835
1829
 
836
1830
  // src/components/InsetDrawer/InsetDrawer.tsx
837
- import React11 from "react";
1831
+ import React17 from "react";
838
1832
  import { Drawer as JoyDrawer } from "@mui/joy";
839
- import { motion as motion13 } from "framer-motion";
840
- var MotionDrawer = motion13(JoyDrawer);
1833
+ import { motion as motion16 } from "framer-motion";
1834
+ var MotionDrawer = motion16(JoyDrawer);
841
1835
  var InsetDrawer = (props) => {
842
1836
  const { children, ...innerProps } = props;
843
- return /* @__PURE__ */ React11.createElement(
1837
+ return /* @__PURE__ */ React17.createElement(
844
1838
  MotionDrawer,
845
1839
  {
846
1840
  ...innerProps,
@@ -863,121 +1857,101 @@ InsetDrawer.displayName = "InsetDrawer";
863
1857
 
864
1858
  // src/components/Dropdown/Dropdown.tsx
865
1859
  import { Dropdown as JoyDropdown } from "@mui/joy";
866
- import { motion as motion14 } from "framer-motion";
867
- var MotionDropdown = motion14(JoyDropdown);
1860
+ import { motion as motion17 } from "framer-motion";
1861
+ var MotionDropdown = motion17(JoyDropdown);
868
1862
  var Dropdown = MotionDropdown;
869
1863
  Dropdown.displayName = "Dropdown";
870
1864
 
871
1865
  // src/components/FormControl/FormControl.tsx
872
1866
  import { FormControl as JoyFormControl } from "@mui/joy";
873
- import { motion as motion15 } from "framer-motion";
874
- var MotionFormControl = motion15(JoyFormControl);
1867
+ import { motion as motion18 } from "framer-motion";
1868
+ var MotionFormControl = motion18(JoyFormControl);
875
1869
  var FormControl = MotionFormControl;
876
1870
  FormControl.displayName = "FormControl";
877
1871
 
878
1872
  // src/components/FormHelperText/FormHelperText.tsx
879
1873
  import { FormHelperText as JoyFormHelperText } from "@mui/joy";
880
- import { motion as motion16 } from "framer-motion";
881
- var MotionFormHelperText = motion16(JoyFormHelperText);
1874
+ import { motion as motion19 } from "framer-motion";
1875
+ var MotionFormHelperText = motion19(JoyFormHelperText);
882
1876
  var FormHelperText = MotionFormHelperText;
883
1877
  FormHelperText.displayName = "FormHelperText";
884
1878
 
885
1879
  // src/components/FormLabel/FormLabel.tsx
886
1880
  import { FormLabel as JoyFormLabel } from "@mui/joy";
887
- import { motion as motion17 } from "framer-motion";
888
- var MotionFormLabel = motion17(JoyFormLabel);
1881
+ import { motion as motion20 } from "framer-motion";
1882
+ var MotionFormLabel = motion20(JoyFormLabel);
889
1883
  var FormLabel = MotionFormLabel;
890
1884
  FormLabel.displayName = "FormLabel";
891
1885
 
892
1886
  // src/components/Grid/Grid.tsx
893
1887
  import { Grid as JoyGrid } from "@mui/joy";
894
- import { motion as motion18 } from "framer-motion";
895
- var MotionGrid = motion18(JoyGrid);
1888
+ import { motion as motion21 } from "framer-motion";
1889
+ var MotionGrid = motion21(JoyGrid);
896
1890
  var Grid = MotionGrid;
897
1891
  Grid.displayName = "Grid";
898
1892
 
899
- // src/components/IconButton/IconButton.tsx
900
- import React12 from "react";
901
- import { IconButton as JoyIconButton } from "@mui/joy";
902
- import { motion as motion19 } from "framer-motion";
903
- var MotionIconButton = motion19(JoyIconButton);
904
- var IconButton = (props) => {
905
- return /* @__PURE__ */ React12.createElement(MotionIconButton, { ...props });
906
- };
907
- IconButton.displayName = "IconButton";
908
-
909
- // src/components/Input/Input.tsx
910
- import React13 from "react";
911
- import { Input as JoyInput } from "@mui/joy";
912
- import { motion as motion20 } from "framer-motion";
913
- var MotionInput = motion20(JoyInput);
914
- var Input = (props) => {
915
- return /* @__PURE__ */ React13.createElement(MotionInput, { ...props });
916
- };
917
- Input.displayName = "Input";
918
-
919
1893
  // src/components/Menu/Menu.tsx
920
- import React14 from "react";
1894
+ import React18 from "react";
921
1895
  import {
922
1896
  Menu as JoyMenu,
923
1897
  MenuButton as JoyMenuButton,
924
1898
  MenuItem as JoyMenuItem
925
1899
  } from "@mui/joy";
926
- import { motion as motion21 } from "framer-motion";
927
- var MotionMenu = motion21(JoyMenu);
1900
+ import { motion as motion22 } from "framer-motion";
1901
+ var MotionMenu = motion22(JoyMenu);
928
1902
  var Menu = (props) => {
929
- return /* @__PURE__ */ React14.createElement(MotionMenu, { ...props });
1903
+ return /* @__PURE__ */ React18.createElement(MotionMenu, { ...props });
930
1904
  };
931
1905
  Menu.displayName = "Menu";
932
- var MotionMenuButton = motion21(JoyMenuButton);
1906
+ var MotionMenuButton = motion22(JoyMenuButton);
933
1907
  var MenuButton = (props) => {
934
- return /* @__PURE__ */ React14.createElement(MotionMenuButton, { ...props });
1908
+ return /* @__PURE__ */ React18.createElement(MotionMenuButton, { ...props });
935
1909
  };
936
1910
  MenuButton.displayName = "MenuButton";
937
- var MotionMenuItem = motion21(JoyMenuItem);
1911
+ var MotionMenuItem = motion22(JoyMenuItem);
938
1912
  var MenuItem = (props) => {
939
- return /* @__PURE__ */ React14.createElement(MotionMenuItem, { ...props });
1913
+ return /* @__PURE__ */ React18.createElement(MotionMenuItem, { ...props });
940
1914
  };
941
1915
  MenuItem.displayName = "MenuItem";
942
1916
 
943
1917
  // src/components/Radio/Radio.tsx
944
1918
  import { Radio as JoyRadio, RadioGroup as JoyRadioGroup } from "@mui/joy";
945
- import { motion as motion22 } from "framer-motion";
946
- var MotionRadio = motion22(JoyRadio);
1919
+ import { motion as motion23 } from "framer-motion";
1920
+ var MotionRadio = motion23(JoyRadio);
947
1921
  var Radio = MotionRadio;
948
1922
  Radio.displayName = "Radio";
949
- var MotionRadioGroup = motion22(JoyRadioGroup);
1923
+ var MotionRadioGroup = motion23(JoyRadioGroup);
950
1924
  var RadioGroup = MotionRadioGroup;
951
1925
  RadioGroup.displayName = "RadioGroup";
952
1926
 
953
1927
  // src/components/RadioList/RadioList.tsx
954
- import React15 from "react";
1928
+ import React19 from "react";
955
1929
  function RadioList(props) {
956
1930
  const { items, ...innerProps } = props;
957
- return /* @__PURE__ */ React15.createElement(RadioGroup, { ...innerProps }, items.map((item) => /* @__PURE__ */ React15.createElement(Radio, { key: `${item.value}`, value: item.value, label: item.label })));
1931
+ return /* @__PURE__ */ React19.createElement(RadioGroup, { ...innerProps }, items.map((item) => /* @__PURE__ */ React19.createElement(Radio, { key: `${item.value}`, value: item.value, label: item.label })));
958
1932
  }
959
1933
  RadioList.displayName = "RadioList";
960
1934
 
961
1935
  // src/components/Select/Select.tsx
962
1936
  import { Select as JoySelect, Option as JoyOption } from "@mui/joy";
963
- import { motion as motion23 } from "framer-motion";
964
- var MotionSelect = motion23(JoySelect);
1937
+ import { motion as motion24 } from "framer-motion";
1938
+ var MotionSelect = motion24(JoySelect);
965
1939
  var Select = MotionSelect;
966
1940
  Select.displayName = "Select";
967
- var MotionOption = motion23(JoyOption);
1941
+ var MotionOption = motion24(JoyOption);
968
1942
  var Option = MotionOption;
969
1943
  Option.displayName = "Option";
970
1944
 
971
1945
  // src/components/Switch/Switch.tsx
972
- import React16 from "react";
1946
+ import React20 from "react";
973
1947
  import {
974
1948
  Switch as JoySwitch,
975
- styled as styled2,
1949
+ styled as styled5,
976
1950
  switchClasses
977
1951
  } from "@mui/joy";
978
- import { motion as motion24 } from "framer-motion";
979
- var MotionSwitch = motion24(JoySwitch);
980
- var StyledThumb = styled2(motion24.div)({
1952
+ import { motion as motion25 } from "framer-motion";
1953
+ var MotionSwitch = motion25(JoySwitch);
1954
+ var StyledThumb = styled5(motion25.div)({
981
1955
  "--Icon-fontSize": "calc(var(--Switch-thumbSize) * 0.75)",
982
1956
  display: "inline-flex",
983
1957
  justifyContent: "center",
@@ -995,14 +1969,14 @@ var StyledThumb = styled2(motion24.div)({
995
1969
  right: "var(--Switch-thumbOffset)"
996
1970
  }
997
1971
  });
998
- var Thumb = (props) => /* @__PURE__ */ React16.createElement(StyledThumb, { ...props, layout: true, transition: spring });
1972
+ var Thumb = (props) => /* @__PURE__ */ React20.createElement(StyledThumb, { ...props, layout: true, transition: spring });
999
1973
  var spring = {
1000
1974
  type: "spring",
1001
1975
  stiffness: 700,
1002
1976
  damping: 30
1003
1977
  };
1004
1978
  var Switch = (props) => {
1005
- return /* @__PURE__ */ React16.createElement(
1979
+ return /* @__PURE__ */ React20.createElement(
1006
1980
  MotionSwitch,
1007
1981
  {
1008
1982
  ...props,
@@ -1017,32 +1991,32 @@ Switch.displayName = "Switch";
1017
1991
 
1018
1992
  // src/components/Tabs/Tabs.tsx
1019
1993
  import { Tabs as JoyTabs, Tab as JoyTab, TabList as JoyTabList, TabPanel as JoyTabPanel } from "@mui/joy";
1020
- import { motion as motion25 } from "framer-motion";
1021
- var MotionTabs = motion25(JoyTabs);
1994
+ import { motion as motion26 } from "framer-motion";
1995
+ var MotionTabs = motion26(JoyTabs);
1022
1996
  var Tabs = MotionTabs;
1023
1997
  Tabs.displayName = "Tabs";
1024
- var MotionTab = motion25(JoyTab);
1998
+ var MotionTab = motion26(JoyTab);
1025
1999
  var Tab = MotionTab;
1026
2000
  Tab.displayName = "Tab";
1027
- var MotionTabList = motion25(JoyTabList);
2001
+ var MotionTabList = motion26(JoyTabList);
1028
2002
  var TabList = MotionTabList;
1029
2003
  TabList.displayName = "TabList";
1030
- var MotionTabPanel = motion25(JoyTabPanel);
2004
+ var MotionTabPanel = motion26(JoyTabPanel);
1031
2005
  var TabPanel = MotionTabPanel;
1032
2006
  TabPanel.displayName = "TabPanel";
1033
2007
 
1034
2008
  // src/components/Textarea/Textarea.tsx
1035
- import React17 from "react";
2009
+ import React21 from "react";
1036
2010
  import { Textarea as JoyTextarea } from "@mui/joy";
1037
- import { motion as motion26 } from "framer-motion";
1038
- var MotionTextarea = motion26(JoyTextarea);
2011
+ import { motion as motion27 } from "framer-motion";
2012
+ var MotionTextarea = motion27(JoyTextarea);
1039
2013
  var Textarea = (props) => {
1040
- return /* @__PURE__ */ React17.createElement(MotionTextarea, { ...props });
2014
+ return /* @__PURE__ */ React21.createElement(MotionTextarea, { ...props });
1041
2015
  };
1042
2016
  Textarea.displayName = "Textarea";
1043
2017
 
1044
2018
  // src/components/ThemeProvider/ThemeProvider.tsx
1045
- import React18 from "react";
2019
+ import React22 from "react";
1046
2020
  import {
1047
2021
  CssBaseline,
1048
2022
  CssVarsProvider,
@@ -1089,17 +2063,17 @@ var defaultTheme = extendTheme({
1089
2063
  }
1090
2064
  });
1091
2065
  function ThemeProvider(props) {
1092
- return /* @__PURE__ */ React18.createElement(React18.Fragment, null, /* @__PURE__ */ React18.createElement(CssVarsProvider, { theme: defaultTheme }, /* @__PURE__ */ React18.createElement(CssBaseline, null), props.children));
2066
+ return /* @__PURE__ */ React22.createElement(React22.Fragment, null, /* @__PURE__ */ React22.createElement(CssVarsProvider, { theme: defaultTheme }, /* @__PURE__ */ React22.createElement(CssBaseline, null), props.children));
1093
2067
  }
1094
2068
  ThemeProvider.displayName = "ThemeProvider";
1095
2069
 
1096
2070
  // src/components/Tooltip/Tooltip.tsx
1097
- import React19 from "react";
2071
+ import React23 from "react";
1098
2072
  import { Tooltip as JoyTooltip } from "@mui/joy";
1099
- import { motion as motion27 } from "framer-motion";
1100
- var MotionTooltip = motion27(JoyTooltip);
2073
+ import { motion as motion28 } from "framer-motion";
2074
+ var MotionTooltip = motion28(JoyTooltip);
1101
2075
  var Tooltip = (props) => {
1102
- return /* @__PURE__ */ React19.createElement(MotionTooltip, { ...props });
2076
+ return /* @__PURE__ */ React23.createElement(MotionTooltip, { ...props });
1103
2077
  };
1104
2078
  Tooltip.displayName = "Tooltip";
1105
2079
  export {
@@ -1117,6 +2091,7 @@ export {
1117
2091
  Box,
1118
2092
  Breadcrumbs,
1119
2093
  Button,
2094
+ Calendar,
1120
2095
  Card,
1121
2096
  CardActions,
1122
2097
  CardContent,
@@ -1127,6 +2102,8 @@ export {
1127
2102
  CircularProgress,
1128
2103
  Container,
1129
2104
  DataTable,
2105
+ DatePicker,
2106
+ DateRangePicker,
1130
2107
  DialogActions,
1131
2108
  DialogContent,
1132
2109
  DialogFrame,