@ceed/ads 0.0.73 → 0.0.74
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/Button/Button.d.ts +1 -1
- package/dist/index.js +192 -187
- package/framer/index.js +115 -110
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -192,17 +192,65 @@ Box.displayName = "Box";
|
|
|
192
192
|
var Box_default = Box;
|
|
193
193
|
|
|
194
194
|
// src/components/Breadcrumbs/Breadcrumbs.tsx
|
|
195
|
-
import React4
|
|
195
|
+
import React4 from "react";
|
|
196
196
|
import { Breadcrumbs as JoyBreadcrumbs } from "@mui/joy";
|
|
197
197
|
|
|
198
|
+
// src/components/Menu/Menu.tsx
|
|
199
|
+
import React3 from "react";
|
|
200
|
+
import {
|
|
201
|
+
Menu as JoyMenu,
|
|
202
|
+
MenuButton as JoyMenuButton,
|
|
203
|
+
MenuItem as JoyMenuItem
|
|
204
|
+
} from "@mui/joy";
|
|
205
|
+
import { motion as motion6 } from "framer-motion";
|
|
206
|
+
var MotionMenu = motion6(JoyMenu);
|
|
207
|
+
var Menu = (props) => {
|
|
208
|
+
return /* @__PURE__ */ React3.createElement(MotionMenu, { ...props });
|
|
209
|
+
};
|
|
210
|
+
Menu.displayName = "Menu";
|
|
211
|
+
var MotionMenuButton = motion6(JoyMenuButton);
|
|
212
|
+
var MenuButton = (props) => {
|
|
213
|
+
return /* @__PURE__ */ React3.createElement(MotionMenuButton, { ...props });
|
|
214
|
+
};
|
|
215
|
+
MenuButton.displayName = "MenuButton";
|
|
216
|
+
var MotionMenuItem = motion6(JoyMenuItem);
|
|
217
|
+
var MenuItem = (props) => {
|
|
218
|
+
return /* @__PURE__ */ React3.createElement(MotionMenuItem, { ...props });
|
|
219
|
+
};
|
|
220
|
+
MenuItem.displayName = "MenuItem";
|
|
221
|
+
|
|
222
|
+
// src/components/Menu/index.ts
|
|
223
|
+
var Menu_default = Menu;
|
|
224
|
+
|
|
225
|
+
// src/components/Dropdown/Dropdown.tsx
|
|
226
|
+
import { Dropdown as JoyDropdown } from "@mui/joy";
|
|
227
|
+
import { motion as motion7 } from "framer-motion";
|
|
228
|
+
var MotionDropdown = motion7(JoyDropdown);
|
|
229
|
+
var Dropdown = MotionDropdown;
|
|
230
|
+
Dropdown.displayName = "Dropdown";
|
|
231
|
+
|
|
232
|
+
// src/components/Dropdown/index.ts
|
|
233
|
+
var Dropdown_default = Dropdown;
|
|
234
|
+
|
|
235
|
+
// src/components/Breadcrumbs/Breadcrumbs.tsx
|
|
236
|
+
var MAX_CRUMBS = 4;
|
|
237
|
+
function Breadcrumbs(props) {
|
|
238
|
+
const { crumbs, collapsed, size, ...innerProps } = props;
|
|
239
|
+
const firstCrumb = crumbs[0];
|
|
240
|
+
const restCrumbs = crumbs.length < MAX_CRUMBS ? crumbs.slice(1) : crumbs.slice(-(MAX_CRUMBS - 1));
|
|
241
|
+
const collapsingCrumbs = crumbs.slice(1, -(MAX_CRUMBS - 1));
|
|
242
|
+
return /* @__PURE__ */ React4.createElement(JoyBreadcrumbs, { size, ...innerProps }, firstCrumb, collapsingCrumbs.length && (collapsed ? /* @__PURE__ */ React4.createElement(Dropdown_default, null, /* @__PURE__ */ React4.createElement(MenuButton, { size, variant: "plain", color: "neutral" }, "\u2022\u2022\u2022"), /* @__PURE__ */ React4.createElement(Menu_default, null, collapsingCrumbs.map((crumb) => /* @__PURE__ */ React4.createElement(MenuItem, null, crumb)))) : collapsingCrumbs), restCrumbs);
|
|
243
|
+
}
|
|
244
|
+
Breadcrumbs.displayName = "Breadcrumbs";
|
|
245
|
+
|
|
198
246
|
// src/components/Button/Button.tsx
|
|
199
|
-
import
|
|
247
|
+
import React5, { forwardRef } from "react";
|
|
200
248
|
import { Button as JoyButton } from "@mui/joy";
|
|
201
|
-
import { motion as
|
|
202
|
-
var MotionButton =
|
|
249
|
+
import { motion as motion8 } from "framer-motion";
|
|
250
|
+
var MotionButton = motion8(JoyButton);
|
|
203
251
|
var Button = forwardRef(
|
|
204
252
|
(props, ref) => {
|
|
205
|
-
return /* @__PURE__ */
|
|
253
|
+
return /* @__PURE__ */ React5.createElement(
|
|
206
254
|
MotionButton,
|
|
207
255
|
{
|
|
208
256
|
ref,
|
|
@@ -216,32 +264,20 @@ Button.displayName = "Button";
|
|
|
216
264
|
// src/components/Button/index.ts
|
|
217
265
|
var Button_default = Button;
|
|
218
266
|
|
|
219
|
-
// src/components/Breadcrumbs/Breadcrumbs.tsx
|
|
220
|
-
var MAX_CRUMBS = 4;
|
|
221
|
-
function Breadcrumbs(props) {
|
|
222
|
-
const { crumbs, collapsed, size, ...innerProps } = props;
|
|
223
|
-
const [needCollapsed, setNeedCollapsed] = useState(false);
|
|
224
|
-
const firstCrumb = crumbs[0];
|
|
225
|
-
const restCrumbs = crumbs.length < MAX_CRUMBS ? crumbs.slice(1) : crumbs.slice(-(MAX_CRUMBS - 1));
|
|
226
|
-
const collapsingCrumbs = crumbs.slice(1, -(MAX_CRUMBS - 1));
|
|
227
|
-
return /* @__PURE__ */ React4.createElement(JoyBreadcrumbs, { size, ...innerProps }, firstCrumb, collapsingCrumbs.length && (collapsed && !needCollapsed ? /* @__PURE__ */ React4.createElement(Button_default, { size, variant: "plain", color: "neutral", onClick: () => setNeedCollapsed(true) }, "\u2022\u2022\u2022") : collapsingCrumbs), restCrumbs);
|
|
228
|
-
}
|
|
229
|
-
Breadcrumbs.displayName = "Breadcrumbs";
|
|
230
|
-
|
|
231
267
|
// src/components/Calendar/Calendar.tsx
|
|
232
|
-
import
|
|
268
|
+
import React9, { Fragment, forwardRef as forwardRef2, useMemo as useMemo2 } from "react";
|
|
233
269
|
import { styled } from "@mui/joy";
|
|
234
270
|
import ChevronLeftIcon from "@mui/icons-material/esm/ChevronLeft.js";
|
|
235
271
|
import ChevronRightIcon from "@mui/icons-material/esm/ChevronRight.js";
|
|
236
|
-
import { AnimatePresence, motion as
|
|
272
|
+
import { AnimatePresence, motion as motion11 } from "framer-motion";
|
|
237
273
|
|
|
238
274
|
// src/components/Typography/Typography.tsx
|
|
239
|
-
import
|
|
275
|
+
import React6 from "react";
|
|
240
276
|
import { Typography as JoyTypography } from "@mui/joy";
|
|
241
|
-
import { motion as
|
|
242
|
-
var MotionTypography =
|
|
277
|
+
import { motion as motion9 } from "framer-motion";
|
|
278
|
+
var MotionTypography = motion9(JoyTypography);
|
|
243
279
|
var Typography = (props) => {
|
|
244
|
-
return /* @__PURE__ */
|
|
280
|
+
return /* @__PURE__ */ React6.createElement(MotionTypography, { ...props });
|
|
245
281
|
};
|
|
246
282
|
Typography.displayName = "Typography";
|
|
247
283
|
|
|
@@ -319,12 +355,12 @@ var isSameMonth = (date1, date2) => {
|
|
|
319
355
|
};
|
|
320
356
|
|
|
321
357
|
// src/components/IconButton/IconButton.tsx
|
|
322
|
-
import
|
|
358
|
+
import React7 from "react";
|
|
323
359
|
import { IconButton as JoyIconButton } from "@mui/joy";
|
|
324
|
-
import { motion as
|
|
325
|
-
var MotionIconButton =
|
|
360
|
+
import { motion as motion10 } from "framer-motion";
|
|
361
|
+
var MotionIconButton = motion10(JoyIconButton);
|
|
326
362
|
var IconButton = (props) => {
|
|
327
|
-
return /* @__PURE__ */
|
|
363
|
+
return /* @__PURE__ */ React7.createElement(MotionIconButton, { ...props });
|
|
328
364
|
};
|
|
329
365
|
IconButton.displayName = "IconButton";
|
|
330
366
|
|
|
@@ -332,23 +368,23 @@ IconButton.displayName = "IconButton";
|
|
|
332
368
|
var IconButton_default = IconButton;
|
|
333
369
|
|
|
334
370
|
// src/components/Calendar/hooks/use-calendar-props.ts
|
|
335
|
-
import { useCallback, useMemo, useState
|
|
371
|
+
import { useCallback, useMemo, useState } from "react";
|
|
336
372
|
import { useThemeProps } from "@mui/joy";
|
|
337
373
|
var resolveView = (view, views) => {
|
|
338
374
|
return views.includes(view) ? view : views[0];
|
|
339
375
|
};
|
|
340
376
|
var useCalendarProps = (inProps) => {
|
|
341
|
-
const [uncontrolledView, setUncontrolledView] =
|
|
377
|
+
const [uncontrolledView, setUncontrolledView] = useState(
|
|
342
378
|
() => resolveView(inProps.view || "day", inProps.views || ["day", "month"])
|
|
343
379
|
);
|
|
344
|
-
const [uncontrolledValue, setUncontrolledValue] =
|
|
345
|
-
const [viewMonth, setViewMonth] =
|
|
380
|
+
const [uncontrolledValue, setUncontrolledValue] = useState(inProps.defaultValue);
|
|
381
|
+
const [viewMonth, setViewMonth] = useState(() => {
|
|
346
382
|
const today = /* @__PURE__ */ new Date();
|
|
347
383
|
today.setDate(1);
|
|
348
384
|
today.setHours(0, 0, 0, 0);
|
|
349
385
|
return inProps.value?.[0] || inProps.defaultValue?.[0] || today;
|
|
350
386
|
});
|
|
351
|
-
const [[page, direction], setPage] =
|
|
387
|
+
const [[page, direction], setPage] = useState([0, 0]);
|
|
352
388
|
const resolvedView = inProps.view ?? uncontrolledView;
|
|
353
389
|
const paginate = (newDirection) => {
|
|
354
390
|
setPage([page + newDirection, newDirection]);
|
|
@@ -408,10 +444,10 @@ var useCalendarProps = (inProps) => {
|
|
|
408
444
|
};
|
|
409
445
|
|
|
410
446
|
// src/components/Calendar/hooks/use-calendar.ts
|
|
411
|
-
import { useCallback as useCallback2, useState as
|
|
447
|
+
import { useCallback as useCallback2, useState as useState2 } from "react";
|
|
412
448
|
var useCalendar = (ownerState) => {
|
|
413
|
-
const [hoverDay, setHoverDay] =
|
|
414
|
-
const [hoverMonth, setHoverMonth] =
|
|
449
|
+
const [hoverDay, setHoverDay] = useState2(null);
|
|
450
|
+
const [hoverMonth, setHoverMonth] = useState2(null);
|
|
415
451
|
return {
|
|
416
452
|
calendarTitle: ownerState.view === "month" ? getYearName(ownerState.viewMonth, ownerState.locale || "default") : getMonthName(ownerState.viewMonth, ownerState.locale || "default"),
|
|
417
453
|
onPrev: useCallback2(() => {
|
|
@@ -648,7 +684,7 @@ var CalendarViewContainer = styled("div", {
|
|
|
648
684
|
overflow: "hidden",
|
|
649
685
|
minHeight: calendarType === "datePicker" ? "250px" : "unset"
|
|
650
686
|
}));
|
|
651
|
-
var CalendarViewTable = styled(
|
|
687
|
+
var CalendarViewTable = styled(motion11.table, {
|
|
652
688
|
name: "Calendar",
|
|
653
689
|
slot: "viewTable"
|
|
654
690
|
})(({ theme }) => ({
|
|
@@ -832,7 +868,7 @@ var PickerDays = (props) => {
|
|
|
832
868
|
() => getWeekdayNames(ownerState.locale || "default"),
|
|
833
869
|
[ownerState.locale]
|
|
834
870
|
);
|
|
835
|
-
return /* @__PURE__ */
|
|
871
|
+
return /* @__PURE__ */ React9.createElement(CalendarViewContainer, { calendarType: "datePicker" }, /* @__PURE__ */ React9.createElement(AnimatePresence, { initial: false, custom: ownerState.direction }, /* @__PURE__ */ React9.createElement(
|
|
836
872
|
CalendarViewTable,
|
|
837
873
|
{
|
|
838
874
|
key: `${ownerState.viewMonth.toString()}_${ownerState.direction}`,
|
|
@@ -861,7 +897,7 @@ var PickerDays = (props) => {
|
|
|
861
897
|
}
|
|
862
898
|
}
|
|
863
899
|
},
|
|
864
|
-
/* @__PURE__ */
|
|
900
|
+
/* @__PURE__ */ React9.createElement(CalendarWeekHeaderContainer, null, /* @__PURE__ */ React9.createElement("tr", null, weekdayNames.map((name, i) => /* @__PURE__ */ React9.createElement(React9.Fragment, null, /* @__PURE__ */ React9.createElement("th", null, /* @__PURE__ */ React9.createElement(Typography_default, { level: "body-xs", textAlign: "center" }, name)), i < 6 && /* @__PURE__ */ React9.createElement(
|
|
865
901
|
"th",
|
|
866
902
|
{
|
|
867
903
|
style: { width: 4 },
|
|
@@ -869,8 +905,8 @@ var PickerDays = (props) => {
|
|
|
869
905
|
"aria-description": "cell-gap"
|
|
870
906
|
}
|
|
871
907
|
))))),
|
|
872
|
-
/* @__PURE__ */
|
|
873
|
-
(date, i) => date ? /* @__PURE__ */
|
|
908
|
+
/* @__PURE__ */ React9.createElement(CalendarDayPickerContainer, null, calendarDates.map((weekDates, rowIndex) => /* @__PURE__ */ React9.createElement(Fragment, { key: `${ownerState.viewMonth}_${rowIndex}` }, /* @__PURE__ */ React9.createElement("tr", null, weekDates.map(
|
|
909
|
+
(date, i) => date ? /* @__PURE__ */ React9.createElement(Fragment, { key: i }, /* @__PURE__ */ React9.createElement(CalendarDayCell, { ...getDayCellProps(date) }, /* @__PURE__ */ React9.createElement(
|
|
874
910
|
CalendarDay,
|
|
875
911
|
{
|
|
876
912
|
size: "sm",
|
|
@@ -879,8 +915,8 @@ var PickerDays = (props) => {
|
|
|
879
915
|
...getPickerDayProps(date)
|
|
880
916
|
},
|
|
881
917
|
date
|
|
882
|
-
)), i < 6 && /* @__PURE__ */
|
|
883
|
-
)), rowIndex < calendarDates.length - 1 && /* @__PURE__ */
|
|
918
|
+
)), i < 6 && /* @__PURE__ */ React9.createElement("td", { "aria-hidden": "true", "aria-description": "cell-gap" })) : /* @__PURE__ */ React9.createElement(Fragment, { key: i }, /* @__PURE__ */ React9.createElement("td", null), i < 6 && /* @__PURE__ */ React9.createElement("td", { "aria-hidden": "true", "aria-description": "cell-gap" }))
|
|
919
|
+
)), rowIndex < calendarDates.length - 1 && /* @__PURE__ */ React9.createElement("tr", { "aria-hidden": "true", "aria-description": "row-gap" }, /* @__PURE__ */ React9.createElement("td", { colSpan: 13, style: { height: 4 } })))))
|
|
884
920
|
)));
|
|
885
921
|
};
|
|
886
922
|
var PickerMonths = (props) => {
|
|
@@ -897,7 +933,7 @@ var PickerMonths = (props) => {
|
|
|
897
933
|
[[]]
|
|
898
934
|
);
|
|
899
935
|
const isMonthRangeSelection = !ownerState.views?.find((view) => view === "day") && ownerState.rangeSelection;
|
|
900
|
-
return /* @__PURE__ */
|
|
936
|
+
return /* @__PURE__ */ React9.createElement(CalendarViewContainer, { calendarType: isMonthRangeSelection ? "monthPicker" : "datePicker" }, /* @__PURE__ */ React9.createElement(AnimatePresence, { initial: false, custom: ownerState.direction }, /* @__PURE__ */ React9.createElement(
|
|
901
937
|
CalendarViewTable,
|
|
902
938
|
{
|
|
903
939
|
key: `${ownerState.viewMonth.getFullYear()}_${ownerState.direction}`,
|
|
@@ -926,7 +962,7 @@ var PickerMonths = (props) => {
|
|
|
926
962
|
}
|
|
927
963
|
}
|
|
928
964
|
},
|
|
929
|
-
/* @__PURE__ */
|
|
965
|
+
/* @__PURE__ */ React9.createElement("tbody", null, chunkedMonths.map((months, i) => /* @__PURE__ */ React9.createElement(Fragment, { key: i }, /* @__PURE__ */ React9.createElement("tr", null, months.map((monthIndex, j) => /* @__PURE__ */ React9.createElement(Fragment, { key: monthIndex }, /* @__PURE__ */ React9.createElement(CalendarMonthCell, { ...getMonthCellProps(monthIndex) }, /* @__PURE__ */ React9.createElement(
|
|
930
966
|
CalendarMonth,
|
|
931
967
|
{
|
|
932
968
|
size: "sm",
|
|
@@ -938,14 +974,14 @@ var PickerMonths = (props) => {
|
|
|
938
974
|
monthIndex,
|
|
939
975
|
ownerState.locale
|
|
940
976
|
)
|
|
941
|
-
)), j < 3 && /* @__PURE__ */
|
|
977
|
+
)), j < 3 && /* @__PURE__ */ React9.createElement(
|
|
942
978
|
"td",
|
|
943
979
|
{
|
|
944
980
|
style: { width: 4 },
|
|
945
981
|
"aria-hidden": "true",
|
|
946
982
|
"aria-description": "cell-gap"
|
|
947
983
|
}
|
|
948
|
-
)))), i < chunkedMonths.length - 1 && /* @__PURE__ */
|
|
984
|
+
)))), i < chunkedMonths.length - 1 && /* @__PURE__ */ React9.createElement("tr", { "aria-hidden": "true", "aria-description": "row-gap" }, /* @__PURE__ */ React9.createElement("td", { colSpan: 7, style: { height: 4 } })))))
|
|
949
985
|
)));
|
|
950
986
|
};
|
|
951
987
|
var Calendar = forwardRef2((inProps, ref) => {
|
|
@@ -963,7 +999,7 @@ var Calendar = forwardRef2((inProps, ref) => {
|
|
|
963
999
|
...others
|
|
964
1000
|
} = props;
|
|
965
1001
|
const { calendarTitle, onPrev, onNext } = useCalendar(ownerState);
|
|
966
|
-
return /* @__PURE__ */
|
|
1002
|
+
return /* @__PURE__ */ React9.createElement(CalendarRoot, { ref, ...others }, /* @__PURE__ */ React9.createElement(CalendarHeader, null, /* @__PURE__ */ React9.createElement(IconButton_default, { size: "sm", onClick: onPrev }, /* @__PURE__ */ React9.createElement(ChevronLeftIcon, null)), /* @__PURE__ */ React9.createElement(
|
|
967
1003
|
CalendarSwitchViewButton,
|
|
968
1004
|
{
|
|
969
1005
|
ownerState,
|
|
@@ -972,7 +1008,7 @@ var Calendar = forwardRef2((inProps, ref) => {
|
|
|
972
1008
|
onClick: onViewChange
|
|
973
1009
|
},
|
|
974
1010
|
calendarTitle
|
|
975
|
-
), /* @__PURE__ */
|
|
1011
|
+
), /* @__PURE__ */ React9.createElement(IconButton_default, { size: "sm", onClick: onNext }, /* @__PURE__ */ React9.createElement(ChevronRightIcon, null))), view === "day" && /* @__PURE__ */ React9.createElement(PickerDays, { ownerState }), view === "month" && /* @__PURE__ */ React9.createElement(PickerMonths, { ownerState }));
|
|
976
1012
|
});
|
|
977
1013
|
Calendar.displayName = "Calendar";
|
|
978
1014
|
|
|
@@ -980,12 +1016,12 @@ Calendar.displayName = "Calendar";
|
|
|
980
1016
|
var Calendar_default = Calendar;
|
|
981
1017
|
|
|
982
1018
|
// src/components/Checkbox/Checkbox.tsx
|
|
983
|
-
import
|
|
1019
|
+
import React10 from "react";
|
|
984
1020
|
import { Checkbox as JoyCheckbox } from "@mui/joy";
|
|
985
|
-
import { motion as
|
|
986
|
-
var MotionCheckbox =
|
|
1021
|
+
import { motion as motion12 } from "framer-motion";
|
|
1022
|
+
var MotionCheckbox = motion12(JoyCheckbox);
|
|
987
1023
|
var Checkbox = (props) => {
|
|
988
|
-
return /* @__PURE__ */
|
|
1024
|
+
return /* @__PURE__ */ React10.createElement(MotionCheckbox, { ...props });
|
|
989
1025
|
};
|
|
990
1026
|
Checkbox.displayName = "Checkbox";
|
|
991
1027
|
|
|
@@ -994,7 +1030,7 @@ var Checkbox_default = Checkbox;
|
|
|
994
1030
|
|
|
995
1031
|
// src/components/Container/Container.tsx
|
|
996
1032
|
import { styled as styled2 } from "@mui/joy";
|
|
997
|
-
import
|
|
1033
|
+
import React11, { forwardRef as forwardRef3 } from "react";
|
|
998
1034
|
var ContainerRoot = styled2("div", {
|
|
999
1035
|
name: "Container",
|
|
1000
1036
|
slot: "root",
|
|
@@ -1030,17 +1066,17 @@ var ContainerRoot = styled2("div", {
|
|
|
1030
1066
|
}
|
|
1031
1067
|
}));
|
|
1032
1068
|
var Container = forwardRef3(function Container2(props, ref) {
|
|
1033
|
-
return /* @__PURE__ */
|
|
1069
|
+
return /* @__PURE__ */ React11.createElement(ContainerRoot, { ref, ...props });
|
|
1034
1070
|
});
|
|
1035
1071
|
Container.displayName = "Container";
|
|
1036
1072
|
|
|
1037
1073
|
// src/components/DataTable/DataTable.tsx
|
|
1038
|
-
import
|
|
1074
|
+
import React13, {
|
|
1039
1075
|
useCallback as useCallback3,
|
|
1040
1076
|
useEffect,
|
|
1041
1077
|
useMemo as useMemo3,
|
|
1042
1078
|
useRef,
|
|
1043
|
-
useState as
|
|
1079
|
+
useState as useState3
|
|
1044
1080
|
} from "react";
|
|
1045
1081
|
import { styled as styled3, LinearProgress } from "@mui/joy";
|
|
1046
1082
|
import PreviousIcon from "@mui/icons-material/esm/ChevronLeft.js";
|
|
@@ -1048,8 +1084,8 @@ import NextIcon from "@mui/icons-material/esm/ChevronRight.js";
|
|
|
1048
1084
|
|
|
1049
1085
|
// src/components/Sheet/Sheet.tsx
|
|
1050
1086
|
import { Sheet as JoySheet } from "@mui/joy";
|
|
1051
|
-
import { motion as
|
|
1052
|
-
var MotionSheet =
|
|
1087
|
+
import { motion as motion13 } from "framer-motion";
|
|
1088
|
+
var MotionSheet = motion13(JoySheet);
|
|
1053
1089
|
var Sheet = MotionSheet;
|
|
1054
1090
|
Sheet.displayName = "Sheet";
|
|
1055
1091
|
|
|
@@ -1057,11 +1093,11 @@ Sheet.displayName = "Sheet";
|
|
|
1057
1093
|
var Sheet_default = Sheet;
|
|
1058
1094
|
|
|
1059
1095
|
// src/components/Table/Table.tsx
|
|
1060
|
-
import
|
|
1096
|
+
import React12 from "react";
|
|
1061
1097
|
import { Table as JoyTable } from "@mui/joy";
|
|
1062
1098
|
var Table = (props) => {
|
|
1063
1099
|
const { children, ...inheritProps } = props;
|
|
1064
|
-
return /* @__PURE__ */
|
|
1100
|
+
return /* @__PURE__ */ React12.createElement(JoyTable, { ...inheritProps }, children);
|
|
1065
1101
|
};
|
|
1066
1102
|
Table.displayName = "Table";
|
|
1067
1103
|
function TableHead(props) {
|
|
@@ -1072,7 +1108,7 @@ function TableHead(props) {
|
|
|
1072
1108
|
slots: { checkbox: RenderCheckbox = Checkbox_default } = {},
|
|
1073
1109
|
slotProps: { checkbox: checkboxProps = {} } = {}
|
|
1074
1110
|
} = props;
|
|
1075
|
-
return /* @__PURE__ */
|
|
1111
|
+
return /* @__PURE__ */ React12.createElement("thead", null, /* @__PURE__ */ React12.createElement("tr", null, showCheckbox && /* @__PURE__ */ React12.createElement(
|
|
1076
1112
|
"th",
|
|
1077
1113
|
{
|
|
1078
1114
|
style: {
|
|
@@ -1080,8 +1116,8 @@ function TableHead(props) {
|
|
|
1080
1116
|
textAlign: "center"
|
|
1081
1117
|
}
|
|
1082
1118
|
},
|
|
1083
|
-
/* @__PURE__ */
|
|
1084
|
-
), headCells.map((headCell) => /* @__PURE__ */
|
|
1119
|
+
/* @__PURE__ */ React12.createElement(RenderCheckbox, { onChange: onCheckboxChange, ...checkboxProps })
|
|
1120
|
+
), headCells.map((headCell) => /* @__PURE__ */ React12.createElement(
|
|
1085
1121
|
"th",
|
|
1086
1122
|
{
|
|
1087
1123
|
key: headCell.label,
|
|
@@ -1106,21 +1142,21 @@ function TableBody(props) {
|
|
|
1106
1142
|
slots: { checkbox: RenderCheckbox = Checkbox_default } = {},
|
|
1107
1143
|
slotProps: { checkbox: checkboxProps = {} } = {}
|
|
1108
1144
|
} = props;
|
|
1109
|
-
return /* @__PURE__ */
|
|
1145
|
+
return /* @__PURE__ */ React12.createElement("tbody", null, rows.map((row, rowIndex) => /* @__PURE__ */ React12.createElement("tr", { key: rowIndex }, showCheckbox && /* @__PURE__ */ React12.createElement(
|
|
1110
1146
|
"td",
|
|
1111
1147
|
{
|
|
1112
1148
|
style: {
|
|
1113
1149
|
textAlign: "center"
|
|
1114
1150
|
}
|
|
1115
1151
|
},
|
|
1116
|
-
/* @__PURE__ */
|
|
1152
|
+
/* @__PURE__ */ React12.createElement(
|
|
1117
1153
|
RenderCheckbox,
|
|
1118
1154
|
{
|
|
1119
1155
|
onChange: (event) => onCheckboxChange?.(event, rowIndex),
|
|
1120
1156
|
...checkboxProps
|
|
1121
1157
|
}
|
|
1122
1158
|
)
|
|
1123
|
-
), cellOrder.map((cellKey) => /* @__PURE__ */
|
|
1159
|
+
), cellOrder.map((cellKey) => /* @__PURE__ */ React12.createElement(
|
|
1124
1160
|
"td",
|
|
1125
1161
|
{
|
|
1126
1162
|
key: cellKey,
|
|
@@ -1135,8 +1171,8 @@ TableBody.displayName = "TableBody";
|
|
|
1135
1171
|
|
|
1136
1172
|
// src/components/Stack/Stack.tsx
|
|
1137
1173
|
import { Stack as JoyStack } from "@mui/joy";
|
|
1138
|
-
import { motion as
|
|
1139
|
-
var MotionStack =
|
|
1174
|
+
import { motion as motion14 } from "framer-motion";
|
|
1175
|
+
var MotionStack = motion14(JoyStack);
|
|
1140
1176
|
var Stack = MotionStack;
|
|
1141
1177
|
Stack.displayName = "Stack";
|
|
1142
1178
|
|
|
@@ -1172,7 +1208,7 @@ function TablePagination(props) {
|
|
|
1172
1208
|
const afterPages = [page + 1, page + 2].filter((p) => p <= lastPage - 1);
|
|
1173
1209
|
const isMoreAfterPages = lastPage > 1 && page < lastPage - 3;
|
|
1174
1210
|
const isMoreBeforePages = lastPage > 1 && page > 4;
|
|
1175
|
-
return /* @__PURE__ */
|
|
1211
|
+
return /* @__PURE__ */ React13.createElement(
|
|
1176
1212
|
Stack_default,
|
|
1177
1213
|
{
|
|
1178
1214
|
direction: "row",
|
|
@@ -1184,7 +1220,7 @@ function TablePagination(props) {
|
|
|
1184
1220
|
justifyContent: "end",
|
|
1185
1221
|
alignItems: "center"
|
|
1186
1222
|
},
|
|
1187
|
-
/* @__PURE__ */
|
|
1223
|
+
/* @__PURE__ */ React13.createElement(Stack_default, { direction: "row", spacing: 0.5, alignItems: "center" }, /* @__PURE__ */ React13.createElement(
|
|
1188
1224
|
IconButton_default,
|
|
1189
1225
|
{
|
|
1190
1226
|
size: "sm",
|
|
@@ -1194,8 +1230,8 @@ function TablePagination(props) {
|
|
|
1194
1230
|
disabled: page === firstPage,
|
|
1195
1231
|
"aria-label": "Previous page"
|
|
1196
1232
|
},
|
|
1197
|
-
/* @__PURE__ */
|
|
1198
|
-
), page !== firstPage && /* @__PURE__ */
|
|
1233
|
+
/* @__PURE__ */ React13.createElement(PreviousIcon, null)
|
|
1234
|
+
), page !== firstPage && /* @__PURE__ */ React13.createElement(
|
|
1199
1235
|
Button_default,
|
|
1200
1236
|
{
|
|
1201
1237
|
size: "sm",
|
|
@@ -1204,7 +1240,7 @@ function TablePagination(props) {
|
|
|
1204
1240
|
onClick: () => onPageChange(firstPage)
|
|
1205
1241
|
},
|
|
1206
1242
|
firstPage
|
|
1207
|
-
), isMoreBeforePages && /* @__PURE__ */
|
|
1243
|
+
), isMoreBeforePages && /* @__PURE__ */ React13.createElement(
|
|
1208
1244
|
Button_default,
|
|
1209
1245
|
{
|
|
1210
1246
|
size: "sm",
|
|
@@ -1213,7 +1249,7 @@ function TablePagination(props) {
|
|
|
1213
1249
|
onClick: () => onPageChange(page - 3)
|
|
1214
1250
|
},
|
|
1215
1251
|
"..."
|
|
1216
|
-
), beforePages.map((p) => /* @__PURE__ */
|
|
1252
|
+
), beforePages.map((p) => /* @__PURE__ */ React13.createElement(
|
|
1217
1253
|
Button_default,
|
|
1218
1254
|
{
|
|
1219
1255
|
key: p,
|
|
@@ -1223,7 +1259,7 @@ function TablePagination(props) {
|
|
|
1223
1259
|
onClick: () => onPageChange(p)
|
|
1224
1260
|
},
|
|
1225
1261
|
p
|
|
1226
|
-
)), /* @__PURE__ */
|
|
1262
|
+
)), /* @__PURE__ */ React13.createElement(Button_default, { variant: "soft", size: "sm" }, page), afterPages.map((p) => /* @__PURE__ */ React13.createElement(
|
|
1227
1263
|
Button_default,
|
|
1228
1264
|
{
|
|
1229
1265
|
key: p,
|
|
@@ -1233,7 +1269,7 @@ function TablePagination(props) {
|
|
|
1233
1269
|
onClick: () => onPageChange(p)
|
|
1234
1270
|
},
|
|
1235
1271
|
p
|
|
1236
|
-
)), isMoreAfterPages && /* @__PURE__ */
|
|
1272
|
+
)), isMoreAfterPages && /* @__PURE__ */ React13.createElement(
|
|
1237
1273
|
Button_default,
|
|
1238
1274
|
{
|
|
1239
1275
|
size: "sm",
|
|
@@ -1242,7 +1278,7 @@ function TablePagination(props) {
|
|
|
1242
1278
|
onClick: () => onPageChange(page + 3)
|
|
1243
1279
|
},
|
|
1244
1280
|
"..."
|
|
1245
|
-
), page !== lastPage && /* @__PURE__ */
|
|
1281
|
+
), page !== lastPage && /* @__PURE__ */ React13.createElement(
|
|
1246
1282
|
Button_default,
|
|
1247
1283
|
{
|
|
1248
1284
|
size: "sm",
|
|
@@ -1251,7 +1287,7 @@ function TablePagination(props) {
|
|
|
1251
1287
|
onClick: () => onPageChange(lastPage)
|
|
1252
1288
|
},
|
|
1253
1289
|
lastPage
|
|
1254
|
-
), /* @__PURE__ */
|
|
1290
|
+
), /* @__PURE__ */ React13.createElement(
|
|
1255
1291
|
IconButton_default,
|
|
1256
1292
|
{
|
|
1257
1293
|
size: "sm",
|
|
@@ -1261,11 +1297,11 @@ function TablePagination(props) {
|
|
|
1261
1297
|
disabled: page === lastPage,
|
|
1262
1298
|
"aria-label": "Next page"
|
|
1263
1299
|
},
|
|
1264
|
-
/* @__PURE__ */
|
|
1300
|
+
/* @__PURE__ */ React13.createElement(NextIcon, null)
|
|
1265
1301
|
))
|
|
1266
1302
|
);
|
|
1267
1303
|
}
|
|
1268
|
-
var Resizer = (ref) => /* @__PURE__ */
|
|
1304
|
+
var Resizer = (ref) => /* @__PURE__ */ React13.createElement(
|
|
1269
1305
|
Box_default,
|
|
1270
1306
|
{
|
|
1271
1307
|
sx: {
|
|
@@ -1303,7 +1339,7 @@ var HeadCell = (props) => {
|
|
|
1303
1339
|
position: props.stickyHeader ? void 0 : "relative"
|
|
1304
1340
|
};
|
|
1305
1341
|
const resizer = props.resizable ?? true ? Resizer(ref) : null;
|
|
1306
|
-
return /* @__PURE__ */
|
|
1342
|
+
return /* @__PURE__ */ React13.createElement("th", { ref, key: props.field, style }, props.headerName ?? props.field, resizer);
|
|
1307
1343
|
};
|
|
1308
1344
|
function useDataTableRenderer({
|
|
1309
1345
|
rows,
|
|
@@ -1317,7 +1353,7 @@ function useDataTableRenderer({
|
|
|
1317
1353
|
getId: _getId,
|
|
1318
1354
|
isTotalSelected: _isTotalSelected
|
|
1319
1355
|
}) {
|
|
1320
|
-
const [page, setPage] =
|
|
1356
|
+
const [page, setPage] = useState3(paginationModel?.page || 1);
|
|
1321
1357
|
const pageSize = paginationModel?.pageSize || 20;
|
|
1322
1358
|
const getId = useCallback3(
|
|
1323
1359
|
(row, index) => _getId?.(row) ?? row?.id ?? `${(index || 0) + (page - 1) * pageSize}`,
|
|
@@ -1425,7 +1461,7 @@ function DataTable(props) {
|
|
|
1425
1461
|
checkbox: RenderCheckbox = Checkbox_default,
|
|
1426
1462
|
toolbar: Toolbar,
|
|
1427
1463
|
footer: Footer,
|
|
1428
|
-
loadingOverlay: LoadingOverlay = () => /* @__PURE__ */
|
|
1464
|
+
loadingOverlay: LoadingOverlay = () => /* @__PURE__ */ React13.createElement(LinearProgress, { value: 8, variant: "plain" })
|
|
1429
1465
|
} = {},
|
|
1430
1466
|
slotProps: {
|
|
1431
1467
|
checkbox: checkboxProps = {},
|
|
@@ -1450,7 +1486,7 @@ function DataTable(props) {
|
|
|
1450
1486
|
onTotalSelect,
|
|
1451
1487
|
HeadCell: HeadCell2
|
|
1452
1488
|
} = useDataTableRenderer(props);
|
|
1453
|
-
return /* @__PURE__ */
|
|
1489
|
+
return /* @__PURE__ */ React13.createElement(Box_default, null, /* @__PURE__ */ React13.createElement(
|
|
1454
1490
|
Stack_default,
|
|
1455
1491
|
{
|
|
1456
1492
|
direction: "row",
|
|
@@ -1461,7 +1497,7 @@ function DataTable(props) {
|
|
|
1461
1497
|
justifyContent: "space-between",
|
|
1462
1498
|
alignItems: "center"
|
|
1463
1499
|
},
|
|
1464
|
-
/* @__PURE__ */
|
|
1500
|
+
/* @__PURE__ */ React13.createElement(Stack_default, { direction: "row", spacing: 1 }, !isAllSelected && /* @__PURE__ */ React13.createElement(Typography_default, { level: "body-xs" }, numberFormatter(selectionModel?.length || 0), " items selected"), isAllSelected && !isTotalSelected && /* @__PURE__ */ React13.createElement(Stack_default, { direction: "row", spacing: 1, alignItems: "center" }, /* @__PURE__ */ React13.createElement(Typography_default, { level: "body-xs" }, "All ", numberFormatter(selectionModel?.length || 0), " items on this page are selected."), /* @__PURE__ */ React13.createElement(Button_default, { size: "sm", variant: "plain", onClick: onTotalSelect }, "Select all ", numberFormatter(rowCount ?? rows.length), " items")), isTotalSelected && /* @__PURE__ */ React13.createElement(Stack_default, { direction: "row", spacing: 1, alignItems: "center" }, /* @__PURE__ */ React13.createElement(Typography_default, { level: "body-xs" }, "All ", numberFormatter(rowCount ?? rows.length), " items are selected."), /* @__PURE__ */ React13.createElement(
|
|
1465
1501
|
Button_default,
|
|
1466
1502
|
{
|
|
1467
1503
|
size: "sm",
|
|
@@ -1471,8 +1507,8 @@ function DataTable(props) {
|
|
|
1471
1507
|
},
|
|
1472
1508
|
"Cancel"
|
|
1473
1509
|
))),
|
|
1474
|
-
Toolbar && /* @__PURE__ */
|
|
1475
|
-
), /* @__PURE__ */
|
|
1510
|
+
Toolbar && /* @__PURE__ */ React13.createElement(Toolbar, { ...toolbarProps || {} })
|
|
1511
|
+
), /* @__PURE__ */ React13.createElement(
|
|
1476
1512
|
Sheet_default,
|
|
1477
1513
|
{
|
|
1478
1514
|
variant: "outlined",
|
|
@@ -1484,7 +1520,7 @@ function DataTable(props) {
|
|
|
1484
1520
|
},
|
|
1485
1521
|
...backgroundProps
|
|
1486
1522
|
},
|
|
1487
|
-
/* @__PURE__ */
|
|
1523
|
+
/* @__PURE__ */ React13.createElement(Table, { ...innerProps }, /* @__PURE__ */ React13.createElement("thead", null, /* @__PURE__ */ React13.createElement("tr", null, checkboxSelection && /* @__PURE__ */ React13.createElement(
|
|
1488
1524
|
"th",
|
|
1489
1525
|
{
|
|
1490
1526
|
style: {
|
|
@@ -1492,7 +1528,7 @@ function DataTable(props) {
|
|
|
1492
1528
|
textAlign: "center"
|
|
1493
1529
|
}
|
|
1494
1530
|
},
|
|
1495
|
-
/* @__PURE__ */
|
|
1531
|
+
/* @__PURE__ */ React13.createElement(
|
|
1496
1532
|
RenderCheckbox,
|
|
1497
1533
|
{
|
|
1498
1534
|
onChange: onAllCheckboxChange,
|
|
@@ -1501,14 +1537,14 @@ function DataTable(props) {
|
|
|
1501
1537
|
...checkboxProps
|
|
1502
1538
|
}
|
|
1503
1539
|
)
|
|
1504
|
-
), columns.map((c) => /* @__PURE__ */
|
|
1540
|
+
), columns.map((c) => /* @__PURE__ */ React13.createElement(
|
|
1505
1541
|
HeadCell2,
|
|
1506
1542
|
{
|
|
1507
1543
|
key: c.field,
|
|
1508
1544
|
stickyHeader: props.stickyHeader,
|
|
1509
1545
|
...c
|
|
1510
1546
|
}
|
|
1511
|
-
)))), /* @__PURE__ */
|
|
1547
|
+
)))), /* @__PURE__ */ React13.createElement("tbody", null, /* @__PURE__ */ React13.createElement(OverlayWrapper, null, !!loading && /* @__PURE__ */ React13.createElement("td", null, /* @__PURE__ */ React13.createElement(
|
|
1512
1548
|
Box_default,
|
|
1513
1549
|
{
|
|
1514
1550
|
sx: {
|
|
@@ -1518,10 +1554,10 @@ function DataTable(props) {
|
|
|
1518
1554
|
right: 0
|
|
1519
1555
|
}
|
|
1520
1556
|
},
|
|
1521
|
-
/* @__PURE__ */
|
|
1522
|
-
))), /* @__PURE__ */
|
|
1557
|
+
/* @__PURE__ */ React13.createElement(LoadingOverlay, null)
|
|
1558
|
+
))), /* @__PURE__ */ React13.createElement(OverlayWrapper, null), dataInPage.map((row, rowIndex) => {
|
|
1523
1559
|
const rowId = getId(row, rowIndex);
|
|
1524
|
-
return /* @__PURE__ */
|
|
1560
|
+
return /* @__PURE__ */ React13.createElement(
|
|
1525
1561
|
"tr",
|
|
1526
1562
|
{
|
|
1527
1563
|
key: rowId,
|
|
@@ -1530,7 +1566,7 @@ function DataTable(props) {
|
|
|
1530
1566
|
onClick: checkboxSelection ? (e) => onCheckboxChange(e, rowId) : void 0,
|
|
1531
1567
|
"aria-checked": checkboxSelection ? isSelectedRow(rowId) : void 0
|
|
1532
1568
|
},
|
|
1533
|
-
checkboxSelection && /* @__PURE__ */
|
|
1569
|
+
checkboxSelection && /* @__PURE__ */ React13.createElement(
|
|
1534
1570
|
"th",
|
|
1535
1571
|
{
|
|
1536
1572
|
scope: "row",
|
|
@@ -1538,7 +1574,7 @@ function DataTable(props) {
|
|
|
1538
1574
|
textAlign: "center"
|
|
1539
1575
|
}
|
|
1540
1576
|
},
|
|
1541
|
-
/* @__PURE__ */
|
|
1577
|
+
/* @__PURE__ */ React13.createElement(
|
|
1542
1578
|
RenderCheckbox,
|
|
1543
1579
|
{
|
|
1544
1580
|
onChange: (e) => onCheckboxChange(e, rowId),
|
|
@@ -1547,7 +1583,7 @@ function DataTable(props) {
|
|
|
1547
1583
|
}
|
|
1548
1584
|
)
|
|
1549
1585
|
),
|
|
1550
|
-
columns.map((column) => /* @__PURE__ */
|
|
1586
|
+
columns.map((column) => /* @__PURE__ */ React13.createElement(
|
|
1551
1587
|
"td",
|
|
1552
1588
|
{
|
|
1553
1589
|
key: column.field,
|
|
@@ -1562,8 +1598,8 @@ function DataTable(props) {
|
|
|
1562
1598
|
}) ?? row[column.field]
|
|
1563
1599
|
))
|
|
1564
1600
|
);
|
|
1565
|
-
})), Footer && /* @__PURE__ */
|
|
1566
|
-
), /* @__PURE__ */
|
|
1601
|
+
})), Footer && /* @__PURE__ */ React13.createElement(Footer, null))
|
|
1602
|
+
), /* @__PURE__ */ React13.createElement(
|
|
1567
1603
|
TablePagination,
|
|
1568
1604
|
{
|
|
1569
1605
|
paginationModel: useMemo3(() => ({ page, pageSize }), [page, pageSize]),
|
|
@@ -1575,23 +1611,23 @@ function DataTable(props) {
|
|
|
1575
1611
|
DataTable.displayName = "DataTable";
|
|
1576
1612
|
|
|
1577
1613
|
// src/components/DatePicker/DatePicker.tsx
|
|
1578
|
-
import
|
|
1614
|
+
import React15, { forwardRef as forwardRef4, useCallback as useCallback4, useState as useState4 } from "react";
|
|
1579
1615
|
import { IMaskInput, IMask } from "react-imask";
|
|
1580
1616
|
import CalendarTodayIcon from "@mui/icons-material/esm/CalendarToday.js";
|
|
1581
1617
|
import { styled as styled4 } from "@mui/joy";
|
|
1582
1618
|
import { FocusTrap, ClickAwayListener, Popper } from "@mui/base";
|
|
1583
1619
|
|
|
1584
1620
|
// src/components/Input/Input.tsx
|
|
1585
|
-
import
|
|
1621
|
+
import React14 from "react";
|
|
1586
1622
|
import { Input as JoyInput } from "@mui/joy";
|
|
1587
|
-
import { motion as
|
|
1588
|
-
var MotionInput =
|
|
1623
|
+
import { motion as motion15 } from "framer-motion";
|
|
1624
|
+
var MotionInput = motion15(JoyInput);
|
|
1589
1625
|
var Input = (props) => {
|
|
1590
1626
|
const { label, helperText, error, style, size, color, ...innerProps } = props;
|
|
1591
1627
|
if (label) {
|
|
1592
|
-
return /* @__PURE__ */
|
|
1628
|
+
return /* @__PURE__ */ React14.createElement(FormControl_default, { color, size, error }, /* @__PURE__ */ React14.createElement(FormLabel_default, null, label), /* @__PURE__ */ React14.createElement(MotionInput, { ...innerProps }), helperText && /* @__PURE__ */ React14.createElement(FormHelperText_default, null, helperText));
|
|
1593
1629
|
}
|
|
1594
|
-
return /* @__PURE__ */
|
|
1630
|
+
return /* @__PURE__ */ React14.createElement(MotionInput, { color, size, ...innerProps });
|
|
1595
1631
|
};
|
|
1596
1632
|
Input.displayName = "Input";
|
|
1597
1633
|
|
|
@@ -1600,8 +1636,8 @@ var Input_default = Input;
|
|
|
1600
1636
|
|
|
1601
1637
|
// src/components/DialogActions/DialogActions.tsx
|
|
1602
1638
|
import { DialogActions as JoyDialogActions } from "@mui/joy";
|
|
1603
|
-
import { motion as
|
|
1604
|
-
var MotionDialogActions =
|
|
1639
|
+
import { motion as motion16 } from "framer-motion";
|
|
1640
|
+
var MotionDialogActions = motion16(JoyDialogActions);
|
|
1605
1641
|
var DialogActions = MotionDialogActions;
|
|
1606
1642
|
DialogActions.displayName = "DialogActions";
|
|
1607
1643
|
|
|
@@ -1634,10 +1670,10 @@ var formatValueString = (date) => {
|
|
|
1634
1670
|
month = "0" + month;
|
|
1635
1671
|
return [year, month, day].join("/");
|
|
1636
1672
|
};
|
|
1637
|
-
var TextMaskAdapter =
|
|
1673
|
+
var TextMaskAdapter = React15.forwardRef(
|
|
1638
1674
|
function TextMaskAdapter2(props, ref) {
|
|
1639
1675
|
const { onChange, ...other } = props;
|
|
1640
|
-
return /* @__PURE__ */
|
|
1676
|
+
return /* @__PURE__ */ React15.createElement(
|
|
1641
1677
|
IMaskInput,
|
|
1642
1678
|
{
|
|
1643
1679
|
...other,
|
|
@@ -1683,8 +1719,8 @@ var TextMaskAdapter = React14.forwardRef(
|
|
|
1683
1719
|
var DatePicker = forwardRef4(
|
|
1684
1720
|
(props, ref) => {
|
|
1685
1721
|
const { onChange, disabled, label, error, helperText, minDate, maxDate, disableFuture, disablePast } = props;
|
|
1686
|
-
const [value, setValue] =
|
|
1687
|
-
const [anchorEl, setAnchorEl] =
|
|
1722
|
+
const [value, setValue] = useState4(props.value || "");
|
|
1723
|
+
const [anchorEl, setAnchorEl] = useState4(null);
|
|
1688
1724
|
const open = Boolean(anchorEl);
|
|
1689
1725
|
const handleChange = useCallback4(
|
|
1690
1726
|
(event) => {
|
|
@@ -1699,7 +1735,7 @@ var DatePicker = forwardRef4(
|
|
|
1699
1735
|
},
|
|
1700
1736
|
[anchorEl, setAnchorEl]
|
|
1701
1737
|
);
|
|
1702
|
-
const picker = /* @__PURE__ */
|
|
1738
|
+
const picker = /* @__PURE__ */ React15.createElement(React15.Fragment, null, /* @__PURE__ */ React15.createElement(
|
|
1703
1739
|
Input_default,
|
|
1704
1740
|
{
|
|
1705
1741
|
ref,
|
|
@@ -1713,9 +1749,9 @@ var DatePicker = forwardRef4(
|
|
|
1713
1749
|
// NOTE: placeholder char 를 텍스트로 표시하므로 동일한 너비를 가지는 mono font 를 사용해야 이질감이 없다.
|
|
1714
1750
|
fontFamily: "monospace"
|
|
1715
1751
|
},
|
|
1716
|
-
endDecorator: /* @__PURE__ */
|
|
1752
|
+
endDecorator: /* @__PURE__ */ React15.createElement(IconButton_default, { variant: "plain", onClick: handleCalendarToggle }, /* @__PURE__ */ React15.createElement(CalendarTodayIcon, null))
|
|
1717
1753
|
}
|
|
1718
|
-
), open && /* @__PURE__ */
|
|
1754
|
+
), open && /* @__PURE__ */ React15.createElement(ClickAwayListener, { onClickAway: () => setAnchorEl(null) }, /* @__PURE__ */ React15.createElement(
|
|
1719
1755
|
StyledPopper,
|
|
1720
1756
|
{
|
|
1721
1757
|
id: "date-picker-popper",
|
|
@@ -1731,7 +1767,7 @@ var DatePicker = forwardRef4(
|
|
|
1731
1767
|
}
|
|
1732
1768
|
]
|
|
1733
1769
|
},
|
|
1734
|
-
/* @__PURE__ */
|
|
1770
|
+
/* @__PURE__ */ React15.createElement(FocusTrap, { open: true }, /* @__PURE__ */ React15.createElement(CalendarSheet, { tabIndex: -1, role: "presentation" }, /* @__PURE__ */ React15.createElement(
|
|
1735
1771
|
Calendar_default,
|
|
1736
1772
|
{
|
|
1737
1773
|
value: !Number.isNaN(new Date(value).getTime()) ? [new Date(value), void 0] : void 0,
|
|
@@ -1744,14 +1780,14 @@ var DatePicker = forwardRef4(
|
|
|
1744
1780
|
disableFuture,
|
|
1745
1781
|
disablePast
|
|
1746
1782
|
}
|
|
1747
|
-
), /* @__PURE__ */
|
|
1783
|
+
), /* @__PURE__ */ React15.createElement(
|
|
1748
1784
|
DialogActions_default,
|
|
1749
1785
|
{
|
|
1750
1786
|
sx: {
|
|
1751
1787
|
p: 1
|
|
1752
1788
|
}
|
|
1753
1789
|
},
|
|
1754
|
-
/* @__PURE__ */
|
|
1790
|
+
/* @__PURE__ */ React15.createElement(
|
|
1755
1791
|
Button_default,
|
|
1756
1792
|
{
|
|
1757
1793
|
size: "sm",
|
|
@@ -1767,7 +1803,7 @@ var DatePicker = forwardRef4(
|
|
|
1767
1803
|
)))
|
|
1768
1804
|
)));
|
|
1769
1805
|
if (label) {
|
|
1770
|
-
return /* @__PURE__ */
|
|
1806
|
+
return /* @__PURE__ */ React15.createElement(FormControl_default, { error, size: "sm" }, /* @__PURE__ */ React15.createElement(FormLabel_default, null, label), picker, helperText && /* @__PURE__ */ React15.createElement(FormHelperText_default, null, helperText));
|
|
1771
1807
|
}
|
|
1772
1808
|
return picker;
|
|
1773
1809
|
}
|
|
@@ -1775,7 +1811,7 @@ var DatePicker = forwardRef4(
|
|
|
1775
1811
|
DatePicker.displayName = "DatePicker";
|
|
1776
1812
|
|
|
1777
1813
|
// src/components/DateRangePicker/DateRangePicker.tsx
|
|
1778
|
-
import
|
|
1814
|
+
import React16, { forwardRef as forwardRef5, useCallback as useCallback5, useMemo as useMemo4, useState as useState5 } from "react";
|
|
1779
1815
|
import { IMaskInput as IMaskInput2, IMask as IMask2 } from "react-imask";
|
|
1780
1816
|
import CalendarTodayIcon2 from "@mui/icons-material/esm/CalendarToday.js";
|
|
1781
1817
|
import { styled as styled5 } from "@mui/joy";
|
|
@@ -1827,10 +1863,10 @@ var parseDate = (str) => {
|
|
|
1827
1863
|
)
|
|
1828
1864
|
];
|
|
1829
1865
|
};
|
|
1830
|
-
var TextMaskAdapter3 =
|
|
1866
|
+
var TextMaskAdapter3 = React16.forwardRef(
|
|
1831
1867
|
function TextMaskAdapter4(props, ref) {
|
|
1832
1868
|
const { onChange, ...other } = props;
|
|
1833
|
-
return /* @__PURE__ */
|
|
1869
|
+
return /* @__PURE__ */ React16.createElement(
|
|
1834
1870
|
IMaskInput2,
|
|
1835
1871
|
{
|
|
1836
1872
|
...other,
|
|
@@ -1869,8 +1905,8 @@ var TextMaskAdapter3 = React15.forwardRef(
|
|
|
1869
1905
|
var DateRangePicker = forwardRef5(
|
|
1870
1906
|
(props, ref) => {
|
|
1871
1907
|
const { onChange, disabled, label, error, helperText, minDate, maxDate, disableFuture, disablePast } = props;
|
|
1872
|
-
const [value, setValue] =
|
|
1873
|
-
const [anchorEl, setAnchorEl] =
|
|
1908
|
+
const [value, setValue] = useState5(props.value || "");
|
|
1909
|
+
const [anchorEl, setAnchorEl] = useState5(null);
|
|
1874
1910
|
const open = Boolean(anchorEl);
|
|
1875
1911
|
const calendarValue = useMemo4(
|
|
1876
1912
|
() => value ? parseDate(value) : void 0,
|
|
@@ -1898,7 +1934,7 @@ var DateRangePicker = forwardRef5(
|
|
|
1898
1934
|
},
|
|
1899
1935
|
[setValue, setAnchorEl]
|
|
1900
1936
|
);
|
|
1901
|
-
const picker = /* @__PURE__ */
|
|
1937
|
+
const picker = /* @__PURE__ */ React16.createElement(React16.Fragment, null, /* @__PURE__ */ React16.createElement(
|
|
1902
1938
|
Input_default,
|
|
1903
1939
|
{
|
|
1904
1940
|
ref,
|
|
@@ -1912,9 +1948,9 @@ var DateRangePicker = forwardRef5(
|
|
|
1912
1948
|
// NOTE: placeholder char 를 텍스트로 표시하므로 동일한 너비를 가지는 mono font 를 사용해야 이질감이 없다.
|
|
1913
1949
|
fontFamily: "monospace"
|
|
1914
1950
|
},
|
|
1915
|
-
endDecorator: /* @__PURE__ */
|
|
1951
|
+
endDecorator: /* @__PURE__ */ React16.createElement(IconButton_default, { variant: "plain", onClick: handleCalendarToggle }, /* @__PURE__ */ React16.createElement(CalendarTodayIcon2, null))
|
|
1916
1952
|
}
|
|
1917
|
-
), open && /* @__PURE__ */
|
|
1953
|
+
), open && /* @__PURE__ */ React16.createElement(ClickAwayListener2, { onClickAway: () => setAnchorEl(null) }, /* @__PURE__ */ React16.createElement(
|
|
1918
1954
|
StyledPopper2,
|
|
1919
1955
|
{
|
|
1920
1956
|
id: "date-range-picker-popper",
|
|
@@ -1930,7 +1966,7 @@ var DateRangePicker = forwardRef5(
|
|
|
1930
1966
|
}
|
|
1931
1967
|
]
|
|
1932
1968
|
},
|
|
1933
|
-
/* @__PURE__ */
|
|
1969
|
+
/* @__PURE__ */ React16.createElement(FocusTrap2, { open: true }, /* @__PURE__ */ React16.createElement(CalendarSheet2, { tabIndex: -1, role: "presentation" }, /* @__PURE__ */ React16.createElement(
|
|
1934
1970
|
Calendar_default,
|
|
1935
1971
|
{
|
|
1936
1972
|
rangeSelection: true,
|
|
@@ -1941,14 +1977,14 @@ var DateRangePicker = forwardRef5(
|
|
|
1941
1977
|
disableFuture,
|
|
1942
1978
|
disablePast
|
|
1943
1979
|
}
|
|
1944
|
-
), /* @__PURE__ */
|
|
1980
|
+
), /* @__PURE__ */ React16.createElement(
|
|
1945
1981
|
DialogActions_default,
|
|
1946
1982
|
{
|
|
1947
1983
|
sx: {
|
|
1948
1984
|
p: 1
|
|
1949
1985
|
}
|
|
1950
1986
|
},
|
|
1951
|
-
/* @__PURE__ */
|
|
1987
|
+
/* @__PURE__ */ React16.createElement(
|
|
1952
1988
|
Button_default,
|
|
1953
1989
|
{
|
|
1954
1990
|
size: "sm",
|
|
@@ -1964,7 +2000,7 @@ var DateRangePicker = forwardRef5(
|
|
|
1964
2000
|
)))
|
|
1965
2001
|
)));
|
|
1966
2002
|
if (label) {
|
|
1967
|
-
return /* @__PURE__ */
|
|
2003
|
+
return /* @__PURE__ */ React16.createElement(FormControl_default, { error, size: "sm" }, /* @__PURE__ */ React16.createElement(FormLabel_default, null, label), picker, helperText && /* @__PURE__ */ React16.createElement(FormHelperText_default, null, helperText));
|
|
1968
2004
|
}
|
|
1969
2005
|
return picker;
|
|
1970
2006
|
}
|
|
@@ -1973,8 +2009,8 @@ DateRangePicker.displayName = "DateRangePicker";
|
|
|
1973
2009
|
|
|
1974
2010
|
// src/components/DialogContent/DialogContent.tsx
|
|
1975
2011
|
import { DialogContent as JoyDialogContent } from "@mui/joy";
|
|
1976
|
-
import { motion as
|
|
1977
|
-
var MotionDialogContent =
|
|
2012
|
+
import { motion as motion17 } from "framer-motion";
|
|
2013
|
+
var MotionDialogContent = motion17(JoyDialogContent);
|
|
1978
2014
|
var DialogContent = MotionDialogContent;
|
|
1979
2015
|
DialogContent.displayName = "DialogContent";
|
|
1980
2016
|
|
|
@@ -1983,8 +2019,8 @@ var DialogContent_default = DialogContent;
|
|
|
1983
2019
|
|
|
1984
2020
|
// src/components/DialogTitle/DialogTitle.tsx
|
|
1985
2021
|
import { DialogTitle as JoyDialogTitle } from "@mui/joy";
|
|
1986
|
-
import { motion as
|
|
1987
|
-
var MotionDialogTitle =
|
|
2022
|
+
import { motion as motion18 } from "framer-motion";
|
|
2023
|
+
var MotionDialogTitle = motion18(JoyDialogTitle);
|
|
1988
2024
|
var DialogTitle = MotionDialogTitle;
|
|
1989
2025
|
DialogTitle.displayName = "DialogTitle";
|
|
1990
2026
|
|
|
@@ -1992,60 +2028,60 @@ DialogTitle.displayName = "DialogTitle";
|
|
|
1992
2028
|
var DialogTitle_default = DialogTitle;
|
|
1993
2029
|
|
|
1994
2030
|
// src/components/DialogFrame/DialogFrame.tsx
|
|
1995
|
-
import
|
|
2031
|
+
import React18 from "react";
|
|
1996
2032
|
|
|
1997
2033
|
// src/components/Modal/Modal.tsx
|
|
1998
|
-
import
|
|
2034
|
+
import React17 from "react";
|
|
1999
2035
|
import {
|
|
2000
2036
|
Modal as JoyModal,
|
|
2001
2037
|
ModalDialog as JoyModalDialog,
|
|
2002
2038
|
ModalClose as JoyModalClose,
|
|
2003
2039
|
ModalOverflow as JoyModalOverflow
|
|
2004
2040
|
} from "@mui/joy";
|
|
2005
|
-
import { motion as
|
|
2006
|
-
var MotionModal =
|
|
2041
|
+
import { motion as motion19 } from "framer-motion";
|
|
2042
|
+
var MotionModal = motion19(JoyModal);
|
|
2007
2043
|
var Modal = MotionModal;
|
|
2008
2044
|
Modal.displayName = "Modal";
|
|
2009
|
-
var MotionModalDialog =
|
|
2045
|
+
var MotionModalDialog = motion19(JoyModalDialog);
|
|
2010
2046
|
var ModalDialog = MotionModalDialog;
|
|
2011
2047
|
ModalDialog.displayName = "ModalDialog";
|
|
2012
|
-
var MotionModalClose =
|
|
2048
|
+
var MotionModalClose = motion19(JoyModalClose);
|
|
2013
2049
|
var ModalClose = MotionModalClose;
|
|
2014
2050
|
ModalClose.displayName = "ModalClose";
|
|
2015
|
-
var MotionModalOverflow =
|
|
2051
|
+
var MotionModalOverflow = motion19(JoyModalOverflow);
|
|
2016
2052
|
var ModalOverflow = MotionModalOverflow;
|
|
2017
2053
|
ModalOverflow.displayName = "ModalOverflow";
|
|
2018
2054
|
function ModalFrame(props) {
|
|
2019
2055
|
const { title, children, ...innerProps } = props;
|
|
2020
|
-
return /* @__PURE__ */
|
|
2056
|
+
return /* @__PURE__ */ React17.createElement(ModalDialog, { ...innerProps }, /* @__PURE__ */ React17.createElement(ModalClose, null), /* @__PURE__ */ React17.createElement(DialogTitle_default, null, title), /* @__PURE__ */ React17.createElement(DialogContent_default, null, children));
|
|
2021
2057
|
}
|
|
2022
2058
|
ModalFrame.displayName = "ModalFrame";
|
|
2023
2059
|
|
|
2024
2060
|
// src/components/DialogFrame/DialogFrame.tsx
|
|
2025
2061
|
function DialogFrame(props) {
|
|
2026
2062
|
const { title, children, actions, ...innerProps } = props;
|
|
2027
|
-
return /* @__PURE__ */
|
|
2063
|
+
return /* @__PURE__ */ React18.createElement(ModalDialog, { ...innerProps }, /* @__PURE__ */ React18.createElement(DialogTitle_default, null, title), /* @__PURE__ */ React18.createElement(DialogContent_default, null, children), /* @__PURE__ */ React18.createElement(DialogActions_default, null, actions));
|
|
2028
2064
|
}
|
|
2029
2065
|
DialogFrame.displayName = "DialogFrame";
|
|
2030
2066
|
|
|
2031
2067
|
// src/components/Divider/Divider.tsx
|
|
2032
|
-
import
|
|
2068
|
+
import React19 from "react";
|
|
2033
2069
|
import { Divider as JoyDivider } from "@mui/joy";
|
|
2034
|
-
import { motion as
|
|
2035
|
-
var MotionDivider =
|
|
2070
|
+
import { motion as motion20 } from "framer-motion";
|
|
2071
|
+
var MotionDivider = motion20(JoyDivider);
|
|
2036
2072
|
var Divider = (props) => {
|
|
2037
|
-
return /* @__PURE__ */
|
|
2073
|
+
return /* @__PURE__ */ React19.createElement(MotionDivider, { ...props });
|
|
2038
2074
|
};
|
|
2039
2075
|
Divider.displayName = "Divider";
|
|
2040
2076
|
|
|
2041
2077
|
// src/components/InsetDrawer/InsetDrawer.tsx
|
|
2042
|
-
import
|
|
2078
|
+
import React20 from "react";
|
|
2043
2079
|
import { Drawer as JoyDrawer } from "@mui/joy";
|
|
2044
|
-
import { motion as
|
|
2045
|
-
var MotionDrawer =
|
|
2080
|
+
import { motion as motion21 } from "framer-motion";
|
|
2081
|
+
var MotionDrawer = motion21(JoyDrawer);
|
|
2046
2082
|
var InsetDrawer = (props) => {
|
|
2047
2083
|
const { children, ...innerProps } = props;
|
|
2048
|
-
return /* @__PURE__ */
|
|
2084
|
+
return /* @__PURE__ */ React20.createElement(
|
|
2049
2085
|
MotionDrawer,
|
|
2050
2086
|
{
|
|
2051
2087
|
...innerProps,
|
|
@@ -2066,46 +2102,15 @@ var InsetDrawer = (props) => {
|
|
|
2066
2102
|
};
|
|
2067
2103
|
InsetDrawer.displayName = "InsetDrawer";
|
|
2068
2104
|
|
|
2069
|
-
// src/components/Dropdown/Dropdown.tsx
|
|
2070
|
-
import { Dropdown as JoyDropdown } from "@mui/joy";
|
|
2071
|
-
import { motion as motion20 } from "framer-motion";
|
|
2072
|
-
var MotionDropdown = motion20(JoyDropdown);
|
|
2073
|
-
var Dropdown = MotionDropdown;
|
|
2074
|
-
Dropdown.displayName = "Dropdown";
|
|
2075
|
-
|
|
2076
2105
|
// src/components/Grid/Grid.tsx
|
|
2077
2106
|
import { Grid as JoyGrid } from "@mui/joy";
|
|
2078
|
-
import { motion as
|
|
2079
|
-
var MotionGrid =
|
|
2107
|
+
import { motion as motion22 } from "framer-motion";
|
|
2108
|
+
var MotionGrid = motion22(JoyGrid);
|
|
2080
2109
|
var Grid = MotionGrid;
|
|
2081
2110
|
Grid.displayName = "Grid";
|
|
2082
2111
|
|
|
2083
|
-
// src/components/Menu/Menu.tsx
|
|
2084
|
-
import React20 from "react";
|
|
2085
|
-
import {
|
|
2086
|
-
Menu as JoyMenu,
|
|
2087
|
-
MenuButton as JoyMenuButton,
|
|
2088
|
-
MenuItem as JoyMenuItem
|
|
2089
|
-
} from "@mui/joy";
|
|
2090
|
-
import { motion as motion22 } from "framer-motion";
|
|
2091
|
-
var MotionMenu = motion22(JoyMenu);
|
|
2092
|
-
var Menu = (props) => {
|
|
2093
|
-
return /* @__PURE__ */ React20.createElement(MotionMenu, { ...props });
|
|
2094
|
-
};
|
|
2095
|
-
Menu.displayName = "Menu";
|
|
2096
|
-
var MotionMenuButton = motion22(JoyMenuButton);
|
|
2097
|
-
var MenuButton = (props) => {
|
|
2098
|
-
return /* @__PURE__ */ React20.createElement(MotionMenuButton, { ...props });
|
|
2099
|
-
};
|
|
2100
|
-
MenuButton.displayName = "MenuButton";
|
|
2101
|
-
var MotionMenuItem = motion22(JoyMenuItem);
|
|
2102
|
-
var MenuItem = (props) => {
|
|
2103
|
-
return /* @__PURE__ */ React20.createElement(MotionMenuItem, { ...props });
|
|
2104
|
-
};
|
|
2105
|
-
MenuItem.displayName = "MenuItem";
|
|
2106
|
-
|
|
2107
2112
|
// src/components/MonthRangePicker/MonthRangePicker.tsx
|
|
2108
|
-
import React21, { forwardRef as forwardRef6, useCallback as useCallback6, useMemo as useMemo5, useState as
|
|
2113
|
+
import React21, { forwardRef as forwardRef6, useCallback as useCallback6, useMemo as useMemo5, useState as useState6 } from "react";
|
|
2109
2114
|
import { IMaskInput as IMaskInput3, IMask as IMask3 } from "react-imask";
|
|
2110
2115
|
import CalendarTodayIcon3 from "@mui/icons-material/esm/CalendarToday.js";
|
|
2111
2116
|
import { styled as styled6 } from "@mui/joy";
|
|
@@ -2192,8 +2197,8 @@ var MonthRangePicker = forwardRef6(
|
|
|
2192
2197
|
disableFuture,
|
|
2193
2198
|
disablePast
|
|
2194
2199
|
} = props;
|
|
2195
|
-
const [value, setValue] =
|
|
2196
|
-
const [anchorEl, setAnchorEl] =
|
|
2200
|
+
const [value, setValue] = useState6(props.value || "");
|
|
2201
|
+
const [anchorEl, setAnchorEl] = useState6(null);
|
|
2197
2202
|
const open = Boolean(anchorEl);
|
|
2198
2203
|
const calendarValue = useMemo5(
|
|
2199
2204
|
() => value ? parseDate2(value) : void 0,
|