@ceed/ads 1.29.1 → 1.30.0-next.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/CurrencyInput/CurrencyInput.d.ts +1 -1
- package/dist/components/CurrencyInput/hooks/use-currency-setting.d.ts +2 -2
- package/dist/components/ProfileMenu/ProfileMenu.d.ts +1 -1
- package/dist/components/SearchBar/SearchBar.d.ts +21 -0
- package/dist/components/SearchBar/index.d.ts +3 -0
- package/dist/components/data-display/Badge.md +39 -71
- package/dist/components/data-display/DataTable.md +1 -1
- package/dist/components/data-display/InfoSign.md +98 -74
- package/dist/components/data-display/Typography.md +97 -363
- package/dist/components/feedback/Dialog.md +62 -76
- package/dist/components/feedback/Modal.md +44 -259
- package/dist/components/feedback/llms.txt +0 -2
- package/dist/components/index.d.ts +2 -0
- package/dist/components/inputs/Autocomplete.md +107 -356
- package/dist/components/inputs/ButtonGroup.md +106 -115
- package/dist/components/inputs/Calendar.md +459 -98
- package/dist/components/inputs/CurrencyInput.md +5 -183
- package/dist/components/inputs/DatePicker.md +431 -108
- package/dist/components/inputs/DateRangePicker.md +492 -131
- package/dist/components/inputs/FilterMenu.md +19 -169
- package/dist/components/inputs/FilterableCheckboxGroup.md +23 -123
- package/dist/components/inputs/IconButton.md +88 -137
- package/dist/components/inputs/Input.md +0 -5
- package/dist/components/inputs/MonthPicker.md +422 -95
- package/dist/components/inputs/MonthRangePicker.md +466 -89
- package/dist/components/inputs/PercentageInput.md +16 -185
- package/dist/components/inputs/RadioButton.md +35 -163
- package/dist/components/inputs/RadioTileGroup.md +61 -150
- package/dist/components/inputs/SearchBar.md +44 -0
- package/dist/components/inputs/Select.md +326 -222
- package/dist/components/inputs/Switch.md +376 -136
- package/dist/components/inputs/Textarea.md +10 -213
- package/dist/components/inputs/Uploader/Uploader.md +66 -145
- package/dist/components/inputs/llms.txt +1 -3
- package/dist/components/navigation/Breadcrumbs.md +322 -80
- package/dist/components/navigation/Dropdown.md +221 -92
- package/dist/components/navigation/IconMenuButton.md +502 -40
- package/dist/components/navigation/InsetDrawer.md +738 -68
- package/dist/components/navigation/Link.md +298 -39
- package/dist/components/navigation/Menu.md +285 -92
- package/dist/components/navigation/MenuButton.md +448 -55
- package/dist/components/navigation/Pagination.md +338 -47
- package/dist/components/navigation/ProfileMenu.md +268 -45
- package/dist/components/navigation/Stepper.md +28 -160
- package/dist/components/navigation/Tabs.md +316 -57
- package/dist/components/surfaces/Sheet.md +334 -151
- package/dist/index.browser.js +15 -13
- package/dist/index.browser.js.map +4 -4
- package/dist/index.cjs +289 -288
- package/dist/index.d.ts +1 -1
- package/dist/index.js +426 -369
- package/dist/llms.txt +1 -8
- package/framer/index.js +1 -1
- package/package.json +16 -15
- package/dist/chunks/rehype-accent-FZRUD7VI.js +0 -39
- package/dist/components/feedback/CircularProgress.md +0 -257
- package/dist/components/feedback/Skeleton.md +0 -280
- package/dist/components/inputs/FormControl.md +0 -361
- package/dist/components/inputs/RadioList.md +0 -241
- package/dist/components/inputs/Slider.md +0 -334
- package/dist/guides/ThemeProvider.md +0 -116
- package/dist/guides/llms.txt +0 -9
package/dist/index.cjs
CHANGED
|
@@ -160,6 +160,7 @@ __export(index_exports, {
|
|
|
160
160
|
RadioGroup: () => RadioGroup,
|
|
161
161
|
RadioList: () => RadioList,
|
|
162
162
|
RadioTileGroup: () => RadioTileGroup,
|
|
163
|
+
SearchBar: () => SearchBar,
|
|
163
164
|
Select: () => Select,
|
|
164
165
|
Sheet: () => Sheet,
|
|
165
166
|
Skeleton: () => import_joy71.Skeleton,
|
|
@@ -841,24 +842,11 @@ Button.displayName = "Button";
|
|
|
841
842
|
var Button_default = Button;
|
|
842
843
|
|
|
843
844
|
// src/components/Calendar/Calendar.tsx
|
|
844
|
-
var
|
|
845
|
-
var
|
|
845
|
+
var import_react13 = __toESM(require("react"));
|
|
846
|
+
var import_joy18 = require("@mui/joy");
|
|
846
847
|
var import_ChevronLeft = __toESM(require("@mui/icons-material/ChevronLeft"));
|
|
847
848
|
var import_ChevronRight = __toESM(require("@mui/icons-material/ChevronRight"));
|
|
848
|
-
var import_framer_motion13 = require("framer-motion");
|
|
849
|
-
|
|
850
|
-
// src/components/Tooltip/Tooltip.tsx
|
|
851
|
-
var import_react11 = __toESM(require("react"));
|
|
852
|
-
var import_joy17 = require("@mui/joy");
|
|
853
849
|
var import_framer_motion12 = require("framer-motion");
|
|
854
|
-
var MotionTooltip = (0, import_framer_motion12.motion)(import_joy17.Tooltip);
|
|
855
|
-
var Tooltip = (props) => {
|
|
856
|
-
return /* @__PURE__ */ import_react11.default.createElement(MotionTooltip, { ...props });
|
|
857
|
-
};
|
|
858
|
-
Tooltip.displayName = "Tooltip";
|
|
859
|
-
|
|
860
|
-
// src/components/Tooltip/index.ts
|
|
861
|
-
var Tooltip_default = Tooltip;
|
|
862
850
|
|
|
863
851
|
// src/components/Calendar/utils/index.ts
|
|
864
852
|
var getCalendarDates = (date) => {
|
|
@@ -932,43 +920,43 @@ var isSameMonth = (date1, date2) => {
|
|
|
932
920
|
};
|
|
933
921
|
|
|
934
922
|
// src/components/Calendar/hooks/use-calendar-props.ts
|
|
935
|
-
var
|
|
936
|
-
var
|
|
923
|
+
var import_react11 = require("react");
|
|
924
|
+
var import_joy17 = require("@mui/joy");
|
|
937
925
|
var resolveView = (view, views) => {
|
|
938
926
|
return views.includes(view) ? view : views[0];
|
|
939
927
|
};
|
|
940
928
|
var useCalendarProps = (inProps) => {
|
|
941
|
-
const [uncontrolledView, setUncontrolledView] = (0,
|
|
929
|
+
const [uncontrolledView, setUncontrolledView] = (0, import_react11.useState)(
|
|
942
930
|
() => resolveView(inProps.view || "day", inProps.views || ["day", "month"])
|
|
943
931
|
);
|
|
944
|
-
const [uncontrolledValue, setUncontrolledValue] = (0,
|
|
932
|
+
const [uncontrolledValue, setUncontrolledValue] = (0, import_react11.useState)(
|
|
945
933
|
inProps.defaultValue
|
|
946
934
|
);
|
|
947
|
-
const [viewMonth, setViewMonth] = (0,
|
|
935
|
+
const [viewMonth, setViewMonth] = (0, import_react11.useState)(() => {
|
|
948
936
|
const today = /* @__PURE__ */ new Date();
|
|
949
937
|
today.setDate(1);
|
|
950
938
|
today.setHours(0, 0, 0, 0);
|
|
951
939
|
return inProps.value?.[0] || inProps.defaultValue?.[0] || today;
|
|
952
940
|
});
|
|
953
|
-
const [[page, direction], setPage] = (0,
|
|
941
|
+
const [[page, direction], setPage] = (0, import_react11.useState)([0, 0]);
|
|
954
942
|
const resolvedView = inProps.view ?? uncontrolledView;
|
|
955
|
-
const resolvedMinDate = (0,
|
|
943
|
+
const resolvedMinDate = (0, import_react11.useMemo)(() => {
|
|
956
944
|
const minDate = inProps.minDate || /* @__PURE__ */ new Date(0);
|
|
957
945
|
minDate.setHours(0, 0, 0, 0);
|
|
958
946
|
return minDate;
|
|
959
947
|
}, [inProps.minDate]);
|
|
960
|
-
const resolvedMaxDate = (0,
|
|
948
|
+
const resolvedMaxDate = (0, import_react11.useMemo)(() => {
|
|
961
949
|
const maxDate = inProps.maxDate || /* @__PURE__ */ new Date(864e13);
|
|
962
950
|
maxDate.setHours(0, 0, 0, 0);
|
|
963
951
|
return maxDate;
|
|
964
952
|
}, [inProps.maxDate]);
|
|
965
|
-
const paginate = (0,
|
|
953
|
+
const paginate = (0, import_react11.useCallback)(
|
|
966
954
|
(newDirection) => {
|
|
967
955
|
setPage([page + newDirection, newDirection]);
|
|
968
956
|
},
|
|
969
957
|
[page]
|
|
970
958
|
);
|
|
971
|
-
const handleViewMonthChange = (0,
|
|
959
|
+
const handleViewMonthChange = (0, import_react11.useCallback)(
|
|
972
960
|
(newMonth) => {
|
|
973
961
|
setViewMonth(newMonth);
|
|
974
962
|
if (resolvedView === "month") {
|
|
@@ -982,7 +970,7 @@ var useCalendarProps = (inProps) => {
|
|
|
982
970
|
},
|
|
983
971
|
[resolvedView, inProps, viewMonth, paginate]
|
|
984
972
|
);
|
|
985
|
-
const props = (0,
|
|
973
|
+
const props = (0, import_joy17.useThemeProps)({
|
|
986
974
|
props: {
|
|
987
975
|
locale: "default",
|
|
988
976
|
views: ["day", "month"],
|
|
@@ -1016,18 +1004,18 @@ var useCalendarProps = (inProps) => {
|
|
|
1016
1004
|
},
|
|
1017
1005
|
name: "Calendar"
|
|
1018
1006
|
});
|
|
1019
|
-
const ownerState = (0,
|
|
1007
|
+
const ownerState = (0, import_react11.useMemo)(() => ({ ...props, viewMonth, direction }), [props, viewMonth, direction]);
|
|
1020
1008
|
return [props, ownerState];
|
|
1021
1009
|
};
|
|
1022
1010
|
|
|
1023
1011
|
// src/components/Calendar/hooks/use-calendar.ts
|
|
1024
|
-
var
|
|
1012
|
+
var import_react12 = require("react");
|
|
1025
1013
|
var useCalendar = (ownerState) => {
|
|
1026
|
-
const [hoverDay, setHoverDay] = (0,
|
|
1027
|
-
const [hoverMonth, setHoverMonth] = (0,
|
|
1014
|
+
const [hoverDay, setHoverDay] = (0, import_react12.useState)(null);
|
|
1015
|
+
const [hoverMonth, setHoverMonth] = (0, import_react12.useState)(null);
|
|
1028
1016
|
return {
|
|
1029
1017
|
calendarTitle: ownerState.view === "month" ? getYearName(ownerState.viewMonth, ownerState.locale || "default") : getMonthName(ownerState.viewMonth, ownerState.locale || "default"),
|
|
1030
|
-
onPrev: (0,
|
|
1018
|
+
onPrev: (0, import_react12.useCallback)(() => {
|
|
1031
1019
|
if (ownerState.view === "day") {
|
|
1032
1020
|
const currentDate = new Date(ownerState.viewMonth || /* @__PURE__ */ new Date());
|
|
1033
1021
|
const currentYear = currentDate.getFullYear();
|
|
@@ -1044,7 +1032,7 @@ var useCalendar = (ownerState) => {
|
|
|
1044
1032
|
ownerState.onMonthChange?.(prevYear);
|
|
1045
1033
|
}
|
|
1046
1034
|
}, [ownerState.onMonthChange, ownerState.viewMonth, ownerState.view]),
|
|
1047
|
-
onNext: (0,
|
|
1035
|
+
onNext: (0, import_react12.useCallback)(() => {
|
|
1048
1036
|
if (ownerState.view === "day") {
|
|
1049
1037
|
const currentDate = new Date(ownerState.viewMonth || /* @__PURE__ */ new Date());
|
|
1050
1038
|
const currentYear = currentDate.getFullYear();
|
|
@@ -1061,7 +1049,7 @@ var useCalendar = (ownerState) => {
|
|
|
1061
1049
|
ownerState.onMonthChange?.(nextYear);
|
|
1062
1050
|
}
|
|
1063
1051
|
}, [ownerState.onMonthChange, ownerState.viewMonth, ownerState.view]),
|
|
1064
|
-
getDayCellProps: (0,
|
|
1052
|
+
getDayCellProps: (0, import_react12.useCallback)(
|
|
1065
1053
|
(day) => {
|
|
1066
1054
|
const thisDay = new Date(ownerState.viewMonth || /* @__PURE__ */ new Date());
|
|
1067
1055
|
thisDay.setHours(0, 0, 0, 0);
|
|
@@ -1076,7 +1064,7 @@ var useCalendar = (ownerState) => {
|
|
|
1076
1064
|
},
|
|
1077
1065
|
[ownerState.rangeSelection, ownerState.value, ownerState.viewMonth, hoverDay]
|
|
1078
1066
|
),
|
|
1079
|
-
getMonthCellProps: (0,
|
|
1067
|
+
getMonthCellProps: (0, import_react12.useCallback)(
|
|
1080
1068
|
(monthIndex) => {
|
|
1081
1069
|
const thisMonth = new Date(ownerState.viewMonth || /* @__PURE__ */ new Date());
|
|
1082
1070
|
thisMonth.setDate(1);
|
|
@@ -1093,7 +1081,7 @@ var useCalendar = (ownerState) => {
|
|
|
1093
1081
|
},
|
|
1094
1082
|
[ownerState.rangeSelection, ownerState.value, ownerState.viewMonth, hoverMonth]
|
|
1095
1083
|
),
|
|
1096
|
-
getPickerDayProps: (0,
|
|
1084
|
+
getPickerDayProps: (0, import_react12.useCallback)(
|
|
1097
1085
|
(day) => {
|
|
1098
1086
|
const thisDay = new Date(ownerState.viewMonth || /* @__PURE__ */ new Date());
|
|
1099
1087
|
thisDay.setHours(0, 0, 0, 0);
|
|
@@ -1147,7 +1135,7 @@ var useCalendar = (ownerState) => {
|
|
|
1147
1135
|
hoverDay
|
|
1148
1136
|
]
|
|
1149
1137
|
),
|
|
1150
|
-
getPickerMonthProps: (0,
|
|
1138
|
+
getPickerMonthProps: (0, import_react12.useCallback)(
|
|
1151
1139
|
(monthIndex) => {
|
|
1152
1140
|
const thisMonth = new Date(ownerState.viewMonth || /* @__PURE__ */ new Date());
|
|
1153
1141
|
thisMonth.setDate(1);
|
|
@@ -1217,19 +1205,13 @@ var useCalendar = (ownerState) => {
|
|
|
1217
1205
|
};
|
|
1218
1206
|
|
|
1219
1207
|
// src/components/Calendar/Calendar.tsx
|
|
1220
|
-
var
|
|
1221
|
-
var MONTH_NAV_CLICK_WINDOW_MS = 1200;
|
|
1222
|
-
var MONTH_NAV_CLICK_THRESHOLD = 3;
|
|
1223
|
-
var MONTH_VIEW_HINT_DURATION_MS = 5e3;
|
|
1224
|
-
var MONTH_VIEW_HINT_COOLDOWN_MS = 3e4;
|
|
1225
|
-
var lastMonthViewAssistHintShownAt = 0;
|
|
1226
|
-
var CalendarRoot = (0, import_joy19.styled)("div", {
|
|
1208
|
+
var CalendarRoot = (0, import_joy18.styled)("div", {
|
|
1227
1209
|
name: "Calendar",
|
|
1228
1210
|
slot: "root"
|
|
1229
1211
|
})({
|
|
1230
1212
|
maxWidth: "264px"
|
|
1231
1213
|
});
|
|
1232
|
-
var CalendarHeader = (0,
|
|
1214
|
+
var CalendarHeader = (0, import_joy18.styled)("div", {
|
|
1233
1215
|
name: "Calendar",
|
|
1234
1216
|
slot: "calendarHeader"
|
|
1235
1217
|
})(({ theme }) => ({
|
|
@@ -1238,7 +1220,7 @@ var CalendarHeader = (0, import_joy19.styled)("div", {
|
|
|
1238
1220
|
alignItems: "center",
|
|
1239
1221
|
padding: theme.spacing(2)
|
|
1240
1222
|
}));
|
|
1241
|
-
var CalendarViewContainer = (0,
|
|
1223
|
+
var CalendarViewContainer = (0, import_joy18.styled)("div", {
|
|
1242
1224
|
name: "Calendar",
|
|
1243
1225
|
slot: "viewContainer",
|
|
1244
1226
|
shouldForwardProp: (prop) => prop !== "calendarType"
|
|
@@ -1249,7 +1231,7 @@ var CalendarViewContainer = (0, import_joy19.styled)("div", {
|
|
|
1249
1231
|
overflow: "hidden",
|
|
1250
1232
|
minHeight: calendarType === "datePicker" ? "250px" : "unset"
|
|
1251
1233
|
}));
|
|
1252
|
-
var CalendarViewTable = (0,
|
|
1234
|
+
var CalendarViewTable = (0, import_joy18.styled)(import_framer_motion12.motion.table, {
|
|
1253
1235
|
name: "Calendar",
|
|
1254
1236
|
slot: "viewTable"
|
|
1255
1237
|
})(({ theme }) => ({
|
|
@@ -1262,15 +1244,15 @@ var CalendarViewTable = (0, import_joy19.styled)(import_framer_motion13.motion.t
|
|
|
1262
1244
|
paddingBottom: theme.spacing(2)
|
|
1263
1245
|
}
|
|
1264
1246
|
}));
|
|
1265
|
-
var CalendarWeekHeaderContainer = (0,
|
|
1247
|
+
var CalendarWeekHeaderContainer = (0, import_joy18.styled)("thead", {
|
|
1266
1248
|
name: "Calendar",
|
|
1267
1249
|
slot: "weekHeaderContainer"
|
|
1268
1250
|
})({});
|
|
1269
|
-
var CalendarDayPickerContainer = (0,
|
|
1251
|
+
var CalendarDayPickerContainer = (0, import_joy18.styled)("tbody", {
|
|
1270
1252
|
name: "Calendar",
|
|
1271
1253
|
slot: "dayPickerContainer"
|
|
1272
1254
|
})({});
|
|
1273
|
-
var CalendarSwitchViewButton = (0,
|
|
1255
|
+
var CalendarSwitchViewButton = (0, import_joy18.styled)(Button_default, {
|
|
1274
1256
|
name: "Calendar",
|
|
1275
1257
|
slot: "switchViewButton"
|
|
1276
1258
|
})(({ ownerState }) => [
|
|
@@ -1278,7 +1260,7 @@ var CalendarSwitchViewButton = (0, import_joy19.styled)(Button_default, {
|
|
|
1278
1260
|
pointerEvents: "none"
|
|
1279
1261
|
}
|
|
1280
1262
|
]);
|
|
1281
|
-
var CalendarDayCell = (0,
|
|
1263
|
+
var CalendarDayCell = (0, import_joy18.styled)("td", {
|
|
1282
1264
|
name: "Calendar",
|
|
1283
1265
|
slot: "dayCell"
|
|
1284
1266
|
})(({ theme }) => ({
|
|
@@ -1300,7 +1282,7 @@ var CalendarDayCell = (0, import_joy19.styled)("td", {
|
|
|
1300
1282
|
}
|
|
1301
1283
|
}
|
|
1302
1284
|
}));
|
|
1303
|
-
var CalendarMonthCell = (0,
|
|
1285
|
+
var CalendarMonthCell = (0, import_joy18.styled)("td", {
|
|
1304
1286
|
name: "Calendar",
|
|
1305
1287
|
slot: "monthCell"
|
|
1306
1288
|
})(({ theme }) => ({
|
|
@@ -1322,7 +1304,7 @@ var CalendarMonthCell = (0, import_joy19.styled)("td", {
|
|
|
1322
1304
|
}
|
|
1323
1305
|
}
|
|
1324
1306
|
}));
|
|
1325
|
-
var CalendarMonth = (0,
|
|
1307
|
+
var CalendarMonth = (0, import_joy18.styled)(Button_default, {
|
|
1326
1308
|
name: "Calendar",
|
|
1327
1309
|
slot: "month",
|
|
1328
1310
|
shouldForwardProp: (prop) => prop !== "isSelected"
|
|
@@ -1357,7 +1339,7 @@ var CalendarMonth = (0, import_joy19.styled)(Button_default, {
|
|
|
1357
1339
|
backgroundColor: theme.palette.neutral.solidDisabledBg
|
|
1358
1340
|
}
|
|
1359
1341
|
]);
|
|
1360
|
-
var CalendarDay = (0,
|
|
1342
|
+
var CalendarDay = (0, import_joy18.styled)(Button_default, {
|
|
1361
1343
|
name: "Calendar",
|
|
1362
1344
|
slot: "day",
|
|
1363
1345
|
shouldForwardProp: (prop) => !["isToday", "isSelected"].includes(prop)
|
|
@@ -1427,9 +1409,9 @@ var swipePower = (offset, velocity) => {
|
|
|
1427
1409
|
var PickerDays = (props) => {
|
|
1428
1410
|
const { ownerState } = props;
|
|
1429
1411
|
const { getPickerDayProps, getDayCellProps } = useCalendar(ownerState);
|
|
1430
|
-
const calendarDates = (0,
|
|
1431
|
-
const weekdayNames = (0,
|
|
1432
|
-
return /* @__PURE__ */
|
|
1412
|
+
const calendarDates = (0, import_react13.useMemo)(() => getCalendarDates(ownerState.viewMonth), [ownerState.viewMonth]);
|
|
1413
|
+
const weekdayNames = (0, import_react13.useMemo)(() => getWeekdayNames(ownerState.locale || "default"), [ownerState.locale]);
|
|
1414
|
+
return /* @__PURE__ */ import_react13.default.createElement(CalendarViewContainer, { calendarType: "datePicker" }, /* @__PURE__ */ import_react13.default.createElement(import_framer_motion12.AnimatePresence, { initial: false, custom: ownerState.direction }, /* @__PURE__ */ import_react13.default.createElement(
|
|
1433
1415
|
CalendarViewTable,
|
|
1434
1416
|
{
|
|
1435
1417
|
key: `${ownerState.viewMonth.toString()}_${ownerState.direction}`,
|
|
@@ -1458,10 +1440,10 @@ var PickerDays = (props) => {
|
|
|
1458
1440
|
}
|
|
1459
1441
|
}
|
|
1460
1442
|
},
|
|
1461
|
-
/* @__PURE__ */
|
|
1462
|
-
/* @__PURE__ */
|
|
1463
|
-
(date, i) => date ? /* @__PURE__ */
|
|
1464
|
-
)), rowIndex < calendarDates.length - 1 && /* @__PURE__ */
|
|
1443
|
+
/* @__PURE__ */ import_react13.default.createElement(CalendarWeekHeaderContainer, null, /* @__PURE__ */ import_react13.default.createElement("tr", null, weekdayNames.map((name, i) => /* @__PURE__ */ import_react13.default.createElement(import_react13.Fragment, { key: `${ownerState.viewMonth}_${name}_${i}` }, /* @__PURE__ */ import_react13.default.createElement("th", null, /* @__PURE__ */ import_react13.default.createElement(Typography_default, { level: "body-xs", textAlign: "center" }, name)), i < 6 && /* @__PURE__ */ import_react13.default.createElement("th", { style: { width: 4 }, "aria-hidden": "true", "aria-description": "cell-gap" }))))),
|
|
1444
|
+
/* @__PURE__ */ import_react13.default.createElement(CalendarDayPickerContainer, null, calendarDates.map((weekDates, rowIndex) => /* @__PURE__ */ import_react13.default.createElement(import_react13.Fragment, { key: `${ownerState.viewMonth}_${rowIndex}` }, /* @__PURE__ */ import_react13.default.createElement("tr", null, weekDates.map(
|
|
1445
|
+
(date, i) => date ? /* @__PURE__ */ import_react13.default.createElement(import_react13.Fragment, { key: `${ownerState.viewMonth}_${date}_${i}` }, /* @__PURE__ */ import_react13.default.createElement(CalendarDayCell, { ...getDayCellProps(date) }, /* @__PURE__ */ import_react13.default.createElement(CalendarDay, { size: "sm", variant: "plain", color: "neutral", ...getPickerDayProps(date) }, date)), i < 6 && /* @__PURE__ */ import_react13.default.createElement("td", { "aria-hidden": "true", "aria-description": "cell-gap" })) : /* @__PURE__ */ import_react13.default.createElement(import_react13.Fragment, { key: `${ownerState.viewMonth}_${i}` }, /* @__PURE__ */ import_react13.default.createElement("td", null), i < 6 && /* @__PURE__ */ import_react13.default.createElement("td", { "aria-hidden": "true", "aria-description": "cell-gap" }))
|
|
1446
|
+
)), rowIndex < calendarDates.length - 1 && /* @__PURE__ */ import_react13.default.createElement("tr", { "aria-hidden": "true", "aria-description": "row-gap" }, /* @__PURE__ */ import_react13.default.createElement("td", { colSpan: 13, style: { height: 4 } })))))
|
|
1465
1447
|
)));
|
|
1466
1448
|
};
|
|
1467
1449
|
var PickerMonths = (props) => {
|
|
@@ -1478,7 +1460,7 @@ var PickerMonths = (props) => {
|
|
|
1478
1460
|
[[]]
|
|
1479
1461
|
);
|
|
1480
1462
|
const isMonthPicker = !ownerState.views?.find((view) => view === "day");
|
|
1481
|
-
return /* @__PURE__ */
|
|
1463
|
+
return /* @__PURE__ */ import_react13.default.createElement(CalendarViewContainer, { calendarType: isMonthPicker ? "monthPicker" : "datePicker" }, /* @__PURE__ */ import_react13.default.createElement(import_framer_motion12.AnimatePresence, { initial: false, custom: ownerState.direction }, /* @__PURE__ */ import_react13.default.createElement(
|
|
1482
1464
|
CalendarViewTable,
|
|
1483
1465
|
{
|
|
1484
1466
|
key: `${ownerState.viewMonth.getFullYear()}_${ownerState.direction}`,
|
|
@@ -1507,10 +1489,10 @@ var PickerMonths = (props) => {
|
|
|
1507
1489
|
}
|
|
1508
1490
|
}
|
|
1509
1491
|
},
|
|
1510
|
-
/* @__PURE__ */
|
|
1492
|
+
/* @__PURE__ */ import_react13.default.createElement("tbody", null, chunkedMonths.map((months, i) => /* @__PURE__ */ import_react13.default.createElement(import_react13.Fragment, { key: months.join("_") }, /* @__PURE__ */ import_react13.default.createElement("tr", null, months.map((monthIndex, j) => /* @__PURE__ */ import_react13.default.createElement(import_react13.Fragment, { key: monthIndex }, /* @__PURE__ */ import_react13.default.createElement(CalendarMonthCell, { ...getMonthCellProps(monthIndex) }, /* @__PURE__ */ import_react13.default.createElement(CalendarMonth, { size: "sm", variant: "plain", color: "neutral", ...getPickerMonthProps(monthIndex) }, getMonthNameFromIndex(monthIndex, ownerState.locale))), j < 3 && /* @__PURE__ */ import_react13.default.createElement("td", { style: { width: 4 }, "aria-hidden": "true", "aria-description": "cell-gap" })))), i < chunkedMonths.length - 1 && /* @__PURE__ */ import_react13.default.createElement("tr", { "aria-hidden": "true", "aria-description": "row-gap" }, /* @__PURE__ */ import_react13.default.createElement("td", { colSpan: 7, style: { height: 4 } })))))
|
|
1511
1493
|
)));
|
|
1512
1494
|
};
|
|
1513
|
-
var Calendar = (0,
|
|
1495
|
+
var Calendar = (0, import_react13.forwardRef)((inProps, ref) => {
|
|
1514
1496
|
const [props, ownerState] = useCalendarProps(inProps);
|
|
1515
1497
|
const {
|
|
1516
1498
|
value,
|
|
@@ -1529,96 +1511,17 @@ var Calendar = (0, import_react14.forwardRef)((inProps, ref) => {
|
|
|
1529
1511
|
...others
|
|
1530
1512
|
} = props;
|
|
1531
1513
|
const { calendarTitle, onPrev, onNext } = useCalendar(ownerState);
|
|
1532
|
-
|
|
1533
|
-
|
|
1534
|
-
const monthViewAssistHintShownInSessionRef = (0, import_react14.useRef)(false);
|
|
1535
|
-
const monthViewAssistHintTimeoutRef = (0, import_react14.useRef)(null);
|
|
1536
|
-
const hasEndDate = Boolean(value?.[1]);
|
|
1537
|
-
const isRangeHintEligible = Boolean(rangeSelection && !hasEndDate);
|
|
1538
|
-
const isHintEligible = Boolean(view === "day" && (!rangeSelection || isRangeHintEligible));
|
|
1539
|
-
const monthViewHintMessage = MONTH_VIEW_HINT_MESSAGE;
|
|
1540
|
-
(0, import_react14.useEffect)(() => {
|
|
1541
|
-
if (!isHintEligible) {
|
|
1542
|
-
monthNavClickTimestampsRef.current = [];
|
|
1543
|
-
setIsMonthViewAssistHintOpen(false);
|
|
1544
|
-
}
|
|
1545
|
-
}, [isHintEligible]);
|
|
1546
|
-
(0, import_react14.useEffect)(() => {
|
|
1547
|
-
return () => {
|
|
1548
|
-
if (monthViewAssistHintTimeoutRef.current) {
|
|
1549
|
-
clearTimeout(monthViewAssistHintTimeoutRef.current);
|
|
1550
|
-
}
|
|
1551
|
-
};
|
|
1552
|
-
}, []);
|
|
1553
|
-
const closeMonthViewAssistHint = (0, import_react14.useCallback)(() => {
|
|
1554
|
-
if (monthViewAssistHintTimeoutRef.current) {
|
|
1555
|
-
clearTimeout(monthViewAssistHintTimeoutRef.current);
|
|
1556
|
-
monthViewAssistHintTimeoutRef.current = null;
|
|
1557
|
-
}
|
|
1558
|
-
setIsMonthViewAssistHintOpen(false);
|
|
1559
|
-
}, []);
|
|
1560
|
-
const showMonthViewAssistHint = (0, import_react14.useCallback)(() => {
|
|
1561
|
-
const now = Date.now();
|
|
1562
|
-
if (monthViewAssistHintShownInSessionRef.current) return;
|
|
1563
|
-
if (now - lastMonthViewAssistHintShownAt < MONTH_VIEW_HINT_COOLDOWN_MS) return;
|
|
1564
|
-
monthViewAssistHintShownInSessionRef.current = true;
|
|
1565
|
-
lastMonthViewAssistHintShownAt = now;
|
|
1566
|
-
setIsMonthViewAssistHintOpen(true);
|
|
1567
|
-
if (monthViewAssistHintTimeoutRef.current) {
|
|
1568
|
-
clearTimeout(monthViewAssistHintTimeoutRef.current);
|
|
1569
|
-
}
|
|
1570
|
-
monthViewAssistHintTimeoutRef.current = setTimeout(() => {
|
|
1571
|
-
setIsMonthViewAssistHintOpen(false);
|
|
1572
|
-
monthViewAssistHintTimeoutRef.current = null;
|
|
1573
|
-
}, MONTH_VIEW_HINT_DURATION_MS);
|
|
1574
|
-
}, []);
|
|
1575
|
-
const trackFastMonthNavigation = (0, import_react14.useCallback)(() => {
|
|
1576
|
-
if (!isHintEligible) return;
|
|
1577
|
-
const now = Date.now();
|
|
1578
|
-
monthNavClickTimestampsRef.current = [
|
|
1579
|
-
...monthNavClickTimestampsRef.current.filter((timestamp) => now - timestamp <= MONTH_NAV_CLICK_WINDOW_MS),
|
|
1580
|
-
now
|
|
1581
|
-
];
|
|
1582
|
-
if (monthNavClickTimestampsRef.current.length >= MONTH_NAV_CLICK_THRESHOLD) {
|
|
1583
|
-
showMonthViewAssistHint();
|
|
1584
|
-
}
|
|
1585
|
-
}, [isHintEligible, showMonthViewAssistHint]);
|
|
1586
|
-
const handlePrevClick = (0, import_react14.useCallback)(() => {
|
|
1587
|
-
onPrev();
|
|
1588
|
-
trackFastMonthNavigation();
|
|
1589
|
-
}, [onPrev, trackFastMonthNavigation]);
|
|
1590
|
-
const handleNextClick = (0, import_react14.useCallback)(() => {
|
|
1591
|
-
onNext();
|
|
1592
|
-
trackFastMonthNavigation();
|
|
1593
|
-
}, [onNext, trackFastMonthNavigation]);
|
|
1594
|
-
const handleSwitchViewClick = (0, import_react14.useCallback)(() => {
|
|
1595
|
-
closeMonthViewAssistHint();
|
|
1596
|
-
onViewChange?.();
|
|
1597
|
-
}, [closeMonthViewAssistHint, onViewChange]);
|
|
1598
|
-
return /* @__PURE__ */ import_react14.default.createElement(CalendarRoot, { ref, ...others }, /* @__PURE__ */ import_react14.default.createElement(CalendarHeader, null, /* @__PURE__ */ import_react14.default.createElement(IconButton_default, { size: "sm", onClick: handlePrevClick, "aria-label": `Previous ${view === "day" ? "Month" : "Year"}` }, /* @__PURE__ */ import_react14.default.createElement(import_ChevronLeft.default, null)), /* @__PURE__ */ import_react14.default.createElement(
|
|
1599
|
-
Tooltip_default,
|
|
1514
|
+
return /* @__PURE__ */ import_react13.default.createElement(CalendarRoot, { ref, ...others }, /* @__PURE__ */ import_react13.default.createElement(CalendarHeader, null, /* @__PURE__ */ import_react13.default.createElement(IconButton_default, { size: "sm", onClick: onPrev, "aria-label": `Previous ${view === "day" ? "Month" : "Year"}` }, /* @__PURE__ */ import_react13.default.createElement(import_ChevronLeft.default, null)), /* @__PURE__ */ import_react13.default.createElement(
|
|
1515
|
+
CalendarSwitchViewButton,
|
|
1600
1516
|
{
|
|
1601
|
-
|
|
1602
|
-
|
|
1603
|
-
|
|
1604
|
-
|
|
1605
|
-
|
|
1606
|
-
disableHoverListener: true,
|
|
1607
|
-
disableTouchListener: true,
|
|
1608
|
-
variant: "solid"
|
|
1517
|
+
ownerState,
|
|
1518
|
+
variant: "plain",
|
|
1519
|
+
color: "neutral",
|
|
1520
|
+
onClick: onViewChange,
|
|
1521
|
+
"aria-label": "Switch Calendar View"
|
|
1609
1522
|
},
|
|
1610
|
-
|
|
1611
|
-
|
|
1612
|
-
{
|
|
1613
|
-
ownerState,
|
|
1614
|
-
variant: "plain",
|
|
1615
|
-
color: "neutral",
|
|
1616
|
-
onClick: handleSwitchViewClick,
|
|
1617
|
-
"aria-label": "Switch Calendar View"
|
|
1618
|
-
},
|
|
1619
|
-
calendarTitle
|
|
1620
|
-
)
|
|
1621
|
-
), /* @__PURE__ */ import_react14.default.createElement(IconButton_default, { size: "sm", onClick: handleNextClick, "aria-label": `Next ${view === "day" ? "Month" : "Year"}` }, /* @__PURE__ */ import_react14.default.createElement(import_ChevronRight.default, null))), view === "day" && /* @__PURE__ */ import_react14.default.createElement(PickerDays, { ownerState }), view === "month" && /* @__PURE__ */ import_react14.default.createElement(PickerMonths, { ownerState }));
|
|
1523
|
+
calendarTitle
|
|
1524
|
+
), /* @__PURE__ */ import_react13.default.createElement(IconButton_default, { size: "sm", onClick: onNext, "aria-label": `Next ${view === "day" ? "Month" : "Year"}` }, /* @__PURE__ */ import_react13.default.createElement(import_ChevronRight.default, null))), view === "day" && /* @__PURE__ */ import_react13.default.createElement(PickerDays, { ownerState }), view === "month" && /* @__PURE__ */ import_react13.default.createElement(PickerMonths, { ownerState }));
|
|
1622
1525
|
});
|
|
1623
1526
|
Calendar.displayName = "Calendar";
|
|
1624
1527
|
|
|
@@ -1626,31 +1529,31 @@ Calendar.displayName = "Calendar";
|
|
|
1626
1529
|
var Calendar_default = Calendar;
|
|
1627
1530
|
|
|
1628
1531
|
// src/components/Card/Card.tsx
|
|
1629
|
-
var
|
|
1630
|
-
var
|
|
1631
|
-
var MotionCard = (0,
|
|
1532
|
+
var import_joy19 = require("@mui/joy");
|
|
1533
|
+
var import_framer_motion13 = require("framer-motion");
|
|
1534
|
+
var MotionCard = (0, import_framer_motion13.motion)(import_joy19.Card);
|
|
1632
1535
|
var Card = MotionCard;
|
|
1633
1536
|
Card.displayName = "Card";
|
|
1634
|
-
var MotionCardContent = (0,
|
|
1537
|
+
var MotionCardContent = (0, import_framer_motion13.motion)(import_joy19.CardContent);
|
|
1635
1538
|
var CardContent = MotionCardContent;
|
|
1636
1539
|
CardContent.displayName = "CardContent";
|
|
1637
|
-
var MotionCardCover = (0,
|
|
1540
|
+
var MotionCardCover = (0, import_framer_motion13.motion)(import_joy19.CardCover);
|
|
1638
1541
|
var CardCover = MotionCardCover;
|
|
1639
1542
|
CardCover.displayName = "CardCover";
|
|
1640
|
-
var MotionCardActions = (0,
|
|
1543
|
+
var MotionCardActions = (0, import_framer_motion13.motion)(import_joy19.CardActions);
|
|
1641
1544
|
var CardActions = MotionCardActions;
|
|
1642
1545
|
CardActions.displayName = "CardActions";
|
|
1643
|
-
var MotionCardOverflow = (0,
|
|
1546
|
+
var MotionCardOverflow = (0, import_framer_motion13.motion)(import_joy19.CardOverflow);
|
|
1644
1547
|
var CardOverflow = MotionCardOverflow;
|
|
1645
1548
|
CardOverflow.displayName = "CardOverflow";
|
|
1646
1549
|
|
|
1647
1550
|
// src/components/Checkbox/Checkbox.tsx
|
|
1648
|
-
var
|
|
1649
|
-
var
|
|
1650
|
-
var
|
|
1651
|
-
var MotionCheckbox = (0,
|
|
1551
|
+
var import_react14 = __toESM(require("react"));
|
|
1552
|
+
var import_joy20 = require("@mui/joy");
|
|
1553
|
+
var import_framer_motion14 = require("framer-motion");
|
|
1554
|
+
var MotionCheckbox = (0, import_framer_motion14.motion)(import_joy20.Checkbox);
|
|
1652
1555
|
var Checkbox = (props) => {
|
|
1653
|
-
return /* @__PURE__ */
|
|
1556
|
+
return /* @__PURE__ */ import_react14.default.createElement(MotionCheckbox, { ...props });
|
|
1654
1557
|
};
|
|
1655
1558
|
Checkbox.displayName = "Checkbox";
|
|
1656
1559
|
|
|
@@ -1658,9 +1561,9 @@ Checkbox.displayName = "Checkbox";
|
|
|
1658
1561
|
var Checkbox_default = Checkbox;
|
|
1659
1562
|
|
|
1660
1563
|
// src/components/Container/Container.tsx
|
|
1661
|
-
var
|
|
1662
|
-
var
|
|
1663
|
-
var ContainerRoot = (0,
|
|
1564
|
+
var import_joy21 = require("@mui/joy");
|
|
1565
|
+
var import_react15 = __toESM(require("react"));
|
|
1566
|
+
var ContainerRoot = (0, import_joy21.styled)("div", {
|
|
1664
1567
|
name: "Container",
|
|
1665
1568
|
slot: "root",
|
|
1666
1569
|
shouldForwardProp: (prop) => prop !== "maxWidth" && prop !== "overrideBreakpoint"
|
|
@@ -1685,24 +1588,25 @@ var ContainerRoot = (0, import_joy22.styled)("div", {
|
|
|
1685
1588
|
paddingRight: theme.breakpoints.values[overrideBreakpoint] >= theme.breakpoints.values.lg ? theme.spacing(8) : theme.spacing(4)
|
|
1686
1589
|
} : null
|
|
1687
1590
|
]);
|
|
1688
|
-
var Container = (0,
|
|
1689
|
-
return /* @__PURE__ */
|
|
1591
|
+
var Container = (0, import_react15.forwardRef)(function Container2(props, ref) {
|
|
1592
|
+
return /* @__PURE__ */ import_react15.default.createElement(ContainerRoot, { ref, ...props });
|
|
1690
1593
|
});
|
|
1691
1594
|
Container.displayName = "Container";
|
|
1692
1595
|
|
|
1693
1596
|
// src/components/CurrencyInput/CurrencyInput.tsx
|
|
1694
|
-
var
|
|
1597
|
+
var import_react17 = __toESM(require("react"));
|
|
1598
|
+
var import_intl_messageformat2 = require("intl-messageformat");
|
|
1695
1599
|
var import_react_number_format = require("react-number-format");
|
|
1696
1600
|
|
|
1697
1601
|
// src/components/Input/Input.tsx
|
|
1698
|
-
var
|
|
1699
|
-
var
|
|
1700
|
-
var
|
|
1602
|
+
var import_react16 = __toESM(require("react"));
|
|
1603
|
+
var import_joy22 = require("@mui/joy");
|
|
1604
|
+
var import_framer_motion15 = require("framer-motion");
|
|
1701
1605
|
var import_Close2 = __toESM(require("@mui/icons-material/Close"));
|
|
1702
1606
|
var import_Visibility = __toESM(require("@mui/icons-material/Visibility"));
|
|
1703
1607
|
var import_VisibilityOff = __toESM(require("@mui/icons-material/VisibilityOff"));
|
|
1704
|
-
var MotionInput = (0,
|
|
1705
|
-
var Input =
|
|
1608
|
+
var MotionInput = (0, import_framer_motion15.motion)(import_joy22.Input);
|
|
1609
|
+
var Input = import_react16.default.forwardRef((props, ref) => {
|
|
1706
1610
|
const {
|
|
1707
1611
|
label,
|
|
1708
1612
|
helperText,
|
|
@@ -1725,11 +1629,11 @@ var Input = import_react17.default.forwardRef((props, ref) => {
|
|
|
1725
1629
|
if (type === "password" && innerProps.endDecorator) {
|
|
1726
1630
|
console.warn('Input: endDecorator is not supported when type="password"');
|
|
1727
1631
|
}
|
|
1728
|
-
const [passwordVisible, setPasswordVisible] = (0,
|
|
1632
|
+
const [passwordVisible, setPasswordVisible] = (0, import_react16.useState)(false);
|
|
1729
1633
|
const [value, setValue] = useControlledState(
|
|
1730
1634
|
props.value,
|
|
1731
1635
|
props.defaultValue,
|
|
1732
|
-
(0,
|
|
1636
|
+
(0, import_react16.useCallback)(
|
|
1733
1637
|
(value2) => {
|
|
1734
1638
|
onChange?.({
|
|
1735
1639
|
/**
|
|
@@ -1755,7 +1659,7 @@ var Input = import_react17.default.forwardRef((props, ref) => {
|
|
|
1755
1659
|
const actualType = type === "password" && passwordVisible ? "text" : type;
|
|
1756
1660
|
const isPasswordType = type === "password";
|
|
1757
1661
|
const showPasswordToggle = isPasswordType && !disableTogglePasswordButton;
|
|
1758
|
-
const input = /* @__PURE__ */
|
|
1662
|
+
const input = /* @__PURE__ */ import_react16.default.createElement(
|
|
1759
1663
|
MotionInput,
|
|
1760
1664
|
{
|
|
1761
1665
|
value,
|
|
@@ -1770,7 +1674,7 @@ var Input = import_react17.default.forwardRef((props, ref) => {
|
|
|
1770
1674
|
...innerProps.slotProps
|
|
1771
1675
|
},
|
|
1772
1676
|
...innerProps,
|
|
1773
|
-
endDecorator: isPasswordType ? showPasswordToggle ? /* @__PURE__ */
|
|
1677
|
+
endDecorator: isPasswordType ? showPasswordToggle ? /* @__PURE__ */ import_react16.default.createElement(Stack_default, { gap: 1, direction: "row" }, /* @__PURE__ */ import_react16.default.createElement(
|
|
1774
1678
|
IconButton_default,
|
|
1775
1679
|
{
|
|
1776
1680
|
onMouseDown: (e) => e.preventDefault(),
|
|
@@ -1778,19 +1682,19 @@ var Input = import_react17.default.forwardRef((props, ref) => {
|
|
|
1778
1682
|
disabled,
|
|
1779
1683
|
"aria-label": passwordVisible ? "Hide password" : "Show password"
|
|
1780
1684
|
},
|
|
1781
|
-
passwordVisible ? /* @__PURE__ */
|
|
1782
|
-
)) : null : enableClearable ? /* @__PURE__ */
|
|
1685
|
+
passwordVisible ? /* @__PURE__ */ import_react16.default.createElement(import_VisibilityOff.default, null) : /* @__PURE__ */ import_react16.default.createElement(import_Visibility.default, null)
|
|
1686
|
+
)) : null : enableClearable ? /* @__PURE__ */ import_react16.default.createElement(Stack_default, { gap: 1, direction: "row" }, innerProps.endDecorator, value && /* @__PURE__ */ import_react16.default.createElement(
|
|
1783
1687
|
IconButton_default,
|
|
1784
1688
|
{
|
|
1785
1689
|
onMouseDown: (e) => e.preventDefault(),
|
|
1786
1690
|
onClick: handleClear,
|
|
1787
1691
|
"aria-label": "Clear"
|
|
1788
1692
|
},
|
|
1789
|
-
/* @__PURE__ */
|
|
1693
|
+
/* @__PURE__ */ import_react16.default.createElement(import_Close2.default, null)
|
|
1790
1694
|
)) : innerProps.endDecorator
|
|
1791
1695
|
}
|
|
1792
1696
|
);
|
|
1793
|
-
return /* @__PURE__ */
|
|
1697
|
+
return /* @__PURE__ */ import_react16.default.createElement(
|
|
1794
1698
|
FormControl_default,
|
|
1795
1699
|
{
|
|
1796
1700
|
required,
|
|
@@ -1801,9 +1705,9 @@ var Input = import_react17.default.forwardRef((props, ref) => {
|
|
|
1801
1705
|
sx,
|
|
1802
1706
|
className
|
|
1803
1707
|
},
|
|
1804
|
-
label && /* @__PURE__ */
|
|
1708
|
+
label && /* @__PURE__ */ import_react16.default.createElement(FormLabel_default, null, label),
|
|
1805
1709
|
input,
|
|
1806
|
-
helperText && /* @__PURE__ */
|
|
1710
|
+
helperText && /* @__PURE__ */ import_react16.default.createElement(FormHelperText_default, null, helperText)
|
|
1807
1711
|
);
|
|
1808
1712
|
});
|
|
1809
1713
|
Input.displayName = "Input";
|
|
@@ -1812,9 +1716,10 @@ Input.displayName = "Input";
|
|
|
1812
1716
|
var Input_default = Input;
|
|
1813
1717
|
|
|
1814
1718
|
// src/components/CurrencyInput/CurrencyInput.tsx
|
|
1815
|
-
var
|
|
1719
|
+
var import_joy23 = require("@mui/joy");
|
|
1816
1720
|
|
|
1817
1721
|
// src/components/CurrencyInput/hooks/use-currency-setting.ts
|
|
1722
|
+
var import_intl_messageformat = __toESM(require("intl-messageformat"));
|
|
1818
1723
|
var CURRENCY_DECIMAL_MAP = {
|
|
1819
1724
|
AED: 2,
|
|
1820
1725
|
ALL: 2,
|
|
@@ -1959,10 +1864,9 @@ var CURRENCY_DECIMAL_MAP = {
|
|
|
1959
1864
|
};
|
|
1960
1865
|
var useCurrencySetting = (props) => {
|
|
1961
1866
|
const { currency = "USD", placeholder } = props;
|
|
1962
|
-
const
|
|
1963
|
-
|
|
1964
|
-
|
|
1965
|
-
const decimalSeparator = parts.find((p) => p.type === "decimal")?.value;
|
|
1867
|
+
const [symbol, thousandSeparator, decimalSeparator, ...rest] = new import_intl_messageformat.default(
|
|
1868
|
+
`{amount, number, ::currency/${currency} unit-width-narrow}`
|
|
1869
|
+
).format({ amount: 1e3 }).toString().replace(/\d/g, "").split("");
|
|
1966
1870
|
const decimalScale = CURRENCY_DECIMAL_MAP[currency];
|
|
1967
1871
|
return {
|
|
1968
1872
|
symbol: `${symbol} `,
|
|
@@ -1975,9 +1879,9 @@ var useCurrencySetting = (props) => {
|
|
|
1975
1879
|
};
|
|
1976
1880
|
|
|
1977
1881
|
// src/components/CurrencyInput/CurrencyInput.tsx
|
|
1978
|
-
var TextMaskAdapter =
|
|
1882
|
+
var TextMaskAdapter = import_react17.default.forwardRef(function TextMaskAdapter2(props, ref) {
|
|
1979
1883
|
const { onChange, ...innerProps } = props;
|
|
1980
|
-
return /* @__PURE__ */
|
|
1884
|
+
return /* @__PURE__ */ import_react17.default.createElement(
|
|
1981
1885
|
import_react_number_format.NumericFormat,
|
|
1982
1886
|
{
|
|
1983
1887
|
...innerProps,
|
|
@@ -1992,13 +1896,13 @@ var TextMaskAdapter = import_react18.default.forwardRef(function TextMaskAdapter
|
|
|
1992
1896
|
}
|
|
1993
1897
|
);
|
|
1994
1898
|
});
|
|
1995
|
-
var CurrencyInputRoot = (0,
|
|
1899
|
+
var CurrencyInputRoot = (0, import_joy23.styled)(Input_default, {
|
|
1996
1900
|
name: "CurrencyInput",
|
|
1997
1901
|
slot: "root",
|
|
1998
1902
|
overridesResolver: (props, styles) => styles.root
|
|
1999
1903
|
})({});
|
|
2000
|
-
var CurrencyInput =
|
|
2001
|
-
const props = (0,
|
|
1904
|
+
var CurrencyInput = import_react17.default.forwardRef(function CurrencyInput2(inProps, ref) {
|
|
1905
|
+
const props = (0, import_joy23.useThemeProps)({ props: inProps, name: "CurrencyInput" });
|
|
2002
1906
|
const {
|
|
2003
1907
|
currency = "USD",
|
|
2004
1908
|
name,
|
|
@@ -2018,28 +1922,28 @@ var CurrencyInput = import_react18.default.forwardRef(function CurrencyInput2(in
|
|
|
2018
1922
|
const [_value, setValue] = useControlledState(
|
|
2019
1923
|
props.value,
|
|
2020
1924
|
props.defaultValue,
|
|
2021
|
-
(0,
|
|
1925
|
+
(0, import_react17.useCallback)((value2) => onChange?.({ target: { name, value: value2 } }), [onChange, name])
|
|
2022
1926
|
);
|
|
2023
|
-
const value = (0,
|
|
1927
|
+
const value = (0, import_react17.useMemo)(() => {
|
|
2024
1928
|
if (_value && useMinorUnit) {
|
|
2025
1929
|
return _value / Math.pow(10, decimalScale);
|
|
2026
1930
|
}
|
|
2027
1931
|
return _value;
|
|
2028
1932
|
}, [_value, useMinorUnit, decimalScale]);
|
|
2029
|
-
const max = (0,
|
|
1933
|
+
const max = (0, import_react17.useMemo)(() => {
|
|
2030
1934
|
if (props.max && useMinorUnit) {
|
|
2031
1935
|
return props.max / Math.pow(10, decimalScale);
|
|
2032
1936
|
}
|
|
2033
1937
|
return props.max;
|
|
2034
1938
|
}, [props.max, useMinorUnit, decimalScale]);
|
|
2035
|
-
const [isOverLimit, setIsOverLimit] = (0,
|
|
2036
|
-
const handleChange = (0,
|
|
1939
|
+
const [isOverLimit, setIsOverLimit] = (0, import_react17.useState)(!!max && !!value && value > max);
|
|
1940
|
+
const handleChange = (0, import_react17.useCallback)(
|
|
2037
1941
|
(event) => {
|
|
2038
1942
|
if (event.target.value === "") {
|
|
2039
1943
|
setValue(void 0);
|
|
2040
1944
|
return;
|
|
2041
1945
|
}
|
|
2042
|
-
const amount = useMinorUnit ? Number(
|
|
1946
|
+
const amount = useMinorUnit ? Number(event.target.value?.replace(decimalSeparator, "")) : Number(event.target.value);
|
|
2043
1947
|
if (!!max && Number(event.target.value) > max) {
|
|
2044
1948
|
setIsOverLimit(true);
|
|
2045
1949
|
} else {
|
|
@@ -2049,7 +1953,7 @@ var CurrencyInput = import_react18.default.forwardRef(function CurrencyInput2(in
|
|
|
2049
1953
|
},
|
|
2050
1954
|
[decimalSeparator, max, useMinorUnit, setValue]
|
|
2051
1955
|
);
|
|
2052
|
-
return /* @__PURE__ */
|
|
1956
|
+
return /* @__PURE__ */ import_react17.default.createElement(
|
|
2053
1957
|
CurrencyInputRoot,
|
|
2054
1958
|
{
|
|
2055
1959
|
...innerProps,
|
|
@@ -2062,7 +1966,9 @@ var CurrencyInput = import_react18.default.forwardRef(function CurrencyInput2(in
|
|
|
2062
1966
|
required,
|
|
2063
1967
|
color: error || isOverLimit ? "danger" : props.color,
|
|
2064
1968
|
label,
|
|
2065
|
-
helperText: isOverLimit ? `limit:
|
|
1969
|
+
helperText: isOverLimit ? new import_intl_messageformat2.IntlMessageFormat(`limit: {amount, number, ::currency/${currency} unit-width-narrow}`).format({
|
|
1970
|
+
amount: max
|
|
1971
|
+
}) : helperText,
|
|
2066
1972
|
slotProps: {
|
|
2067
1973
|
input: {
|
|
2068
1974
|
component: TextMaskAdapter,
|
|
@@ -2316,11 +2222,11 @@ function computeAutoFitWidth(params) {
|
|
|
2316
2222
|
}
|
|
2317
2223
|
|
|
2318
2224
|
// src/components/DataTable/styled.tsx
|
|
2319
|
-
var
|
|
2320
|
-
var
|
|
2321
|
-
var
|
|
2225
|
+
var import_react18 = __toESM(require("react"));
|
|
2226
|
+
var import_joy24 = require("@mui/joy");
|
|
2227
|
+
var import_framer_motion16 = require("framer-motion");
|
|
2322
2228
|
var import_ArrowUpwardRounded = __toESM(require("@mui/icons-material/ArrowUpwardRounded"));
|
|
2323
|
-
var EllipsisDiv = (0,
|
|
2229
|
+
var EllipsisDiv = (0, import_joy24.styled)("div", {
|
|
2324
2230
|
name: "DataTable",
|
|
2325
2231
|
slot: "textEllipsis",
|
|
2326
2232
|
shouldForwardProp: (prop) => prop !== "lineClamp"
|
|
@@ -2338,7 +2244,7 @@ var EllipsisDiv = (0, import_joy25.styled)("div", {
|
|
|
2338
2244
|
whiteSpace: "nowrap"
|
|
2339
2245
|
}
|
|
2340
2246
|
);
|
|
2341
|
-
var OverlayWrapper = (0,
|
|
2247
|
+
var OverlayWrapper = (0, import_joy24.styled)("tr", {
|
|
2342
2248
|
name: "DataTable",
|
|
2343
2249
|
slot: "overlayWrapper"
|
|
2344
2250
|
})({
|
|
@@ -2353,7 +2259,7 @@ var OverlayWrapper = (0, import_joy25.styled)("tr", {
|
|
|
2353
2259
|
border: "none !important"
|
|
2354
2260
|
}
|
|
2355
2261
|
});
|
|
2356
|
-
var VirtualizedTableBody = (0,
|
|
2262
|
+
var VirtualizedTableBody = (0, import_joy24.styled)("tbody", {
|
|
2357
2263
|
name: "DataTable",
|
|
2358
2264
|
slot: "tableBody"
|
|
2359
2265
|
})({
|
|
@@ -2362,21 +2268,21 @@ var VirtualizedTableBody = (0, import_joy25.styled)("tbody", {
|
|
|
2362
2268
|
display: "block",
|
|
2363
2269
|
height: "0.01em"
|
|
2364
2270
|
},
|
|
2365
|
-
[`& .${
|
|
2271
|
+
[`& .${import_joy24.buttonClasses.root}`]: {
|
|
2366
2272
|
"--Button-minHeight": "26px",
|
|
2367
2273
|
"--Button-paddingBlock": "0.25rem",
|
|
2368
2274
|
lineHeight: 1,
|
|
2369
2275
|
marginTop: "-2px",
|
|
2370
2276
|
marginBottom: "-2px"
|
|
2371
2277
|
},
|
|
2372
|
-
[`& .${
|
|
2278
|
+
[`& .${import_joy24.iconButtonClasses.root}`]: {
|
|
2373
2279
|
"--IconButton-size": "26px",
|
|
2374
2280
|
verticalAlign: "middle",
|
|
2375
2281
|
marginTop: "-2px",
|
|
2376
2282
|
marginBottom: "-2px"
|
|
2377
2283
|
}
|
|
2378
2284
|
});
|
|
2379
|
-
var StyledTableRow = (0,
|
|
2285
|
+
var StyledTableRow = (0, import_joy24.styled)("tr", {
|
|
2380
2286
|
name: "DataTable",
|
|
2381
2287
|
slot: "tableRow",
|
|
2382
2288
|
shouldForwardProp: (prop) => prop !== "striped"
|
|
@@ -2395,17 +2301,17 @@ var StyledTableRow = (0, import_joy25.styled)("tr", {
|
|
|
2395
2301
|
}
|
|
2396
2302
|
}
|
|
2397
2303
|
}));
|
|
2398
|
-
var Asterisk = (0,
|
|
2304
|
+
var Asterisk = (0, import_joy24.styled)("span", {
|
|
2399
2305
|
name: "DataTable",
|
|
2400
2306
|
slot: "headCellAsterisk"
|
|
2401
2307
|
})(({ theme }) => ({
|
|
2402
2308
|
color: "var(--ceed-palette-danger-500)",
|
|
2403
2309
|
marginLeft: theme.spacing(0.5)
|
|
2404
2310
|
}));
|
|
2405
|
-
var StyledTh = (0,
|
|
2311
|
+
var StyledTh = (0, import_joy24.styled)(import_framer_motion16.motion.th)(({ theme }) => ({
|
|
2406
2312
|
boxShadow: "1px 0 var(--TableCell-borderColor)"
|
|
2407
2313
|
}));
|
|
2408
|
-
var StyledTd = (0,
|
|
2314
|
+
var StyledTd = (0, import_joy24.styled)("td")(({ theme }) => ({
|
|
2409
2315
|
transition: `box-shadow 0.3s`,
|
|
2410
2316
|
"&:not(.is-last-left):not(.is-last-right)": {
|
|
2411
2317
|
boxShadow: "1px 0 var(--TableCell-borderColor)"
|
|
@@ -2421,10 +2327,10 @@ var StyledTd = (0, import_joy25.styled)("td")(({ theme }) => ({
|
|
|
2421
2327
|
}
|
|
2422
2328
|
}
|
|
2423
2329
|
}));
|
|
2424
|
-
var MotionSortIcon = (0,
|
|
2425
|
-
var DefaultLoadingOverlay = () => /* @__PURE__ */
|
|
2426
|
-
var DefaultNoRowsOverlay = () => /* @__PURE__ */
|
|
2427
|
-
var Resizer = (ref, targetRef = ref, onResizeStateChange, onAutoFit) => /* @__PURE__ */
|
|
2330
|
+
var MotionSortIcon = (0, import_framer_motion16.motion)(import_ArrowUpwardRounded.default);
|
|
2331
|
+
var DefaultLoadingOverlay = () => /* @__PURE__ */ import_react18.default.createElement(import_joy24.LinearProgress, { value: 8, variant: "plain" });
|
|
2332
|
+
var DefaultNoRowsOverlay = () => /* @__PURE__ */ import_react18.default.createElement(import_joy24.Typography, { level: "body-sm", textColor: "text.tertiary" }, "No rows");
|
|
2333
|
+
var Resizer = (ref, targetRef = ref, onResizeStateChange, onAutoFit) => /* @__PURE__ */ import_react18.default.createElement(
|
|
2428
2334
|
Box_default,
|
|
2429
2335
|
{
|
|
2430
2336
|
sx: {
|
|
@@ -2506,24 +2412,24 @@ var import_joy32 = require("@mui/joy");
|
|
|
2506
2412
|
var import_framer_motion21 = require("framer-motion");
|
|
2507
2413
|
|
|
2508
2414
|
// src/components/DatePicker/DatePicker.tsx
|
|
2509
|
-
var
|
|
2415
|
+
var import_react19 = __toESM(require("react"));
|
|
2510
2416
|
var import_react_imask = require("react-imask");
|
|
2511
2417
|
var import_CalendarToday = __toESM(require("@mui/icons-material/CalendarToday"));
|
|
2512
|
-
var
|
|
2418
|
+
var import_joy27 = require("@mui/joy");
|
|
2513
2419
|
var import_base3 = require("@mui/base");
|
|
2514
2420
|
|
|
2515
2421
|
// src/components/Sheet/Sheet.tsx
|
|
2516
|
-
var
|
|
2517
|
-
var Sheet =
|
|
2422
|
+
var import_joy25 = require("@mui/joy");
|
|
2423
|
+
var Sheet = import_joy25.Sheet;
|
|
2518
2424
|
|
|
2519
2425
|
// src/components/Sheet/index.ts
|
|
2520
2426
|
var Sheet_default = Sheet;
|
|
2521
2427
|
|
|
2522
2428
|
// src/components/DialogActions/DialogActions.tsx
|
|
2523
|
-
var
|
|
2524
|
-
var
|
|
2525
|
-
var MotionDialogActions = (0,
|
|
2526
|
-
var StyledDialogActions = (0,
|
|
2429
|
+
var import_joy26 = require("@mui/joy");
|
|
2430
|
+
var import_framer_motion17 = require("framer-motion");
|
|
2431
|
+
var MotionDialogActions = (0, import_framer_motion17.motion)(import_joy26.DialogActions);
|
|
2432
|
+
var StyledDialogActions = (0, import_joy26.styled)(MotionDialogActions)(({ theme }) => ({
|
|
2527
2433
|
padding: theme.spacing(2),
|
|
2528
2434
|
gap: theme.spacing(2),
|
|
2529
2435
|
flexDirection: "row",
|
|
@@ -2536,7 +2442,7 @@ DialogActions.displayName = "DialogActions";
|
|
|
2536
2442
|
var DialogActions_default = DialogActions;
|
|
2537
2443
|
|
|
2538
2444
|
// src/components/DatePicker/DatePicker.tsx
|
|
2539
|
-
var CalendarButton = (0,
|
|
2445
|
+
var CalendarButton = (0, import_joy27.styled)(IconButton_default, {
|
|
2540
2446
|
name: "DatePicker",
|
|
2541
2447
|
slot: "calendarButton"
|
|
2542
2448
|
})(({ theme }) => ({
|
|
@@ -2546,13 +2452,13 @@ var CalendarButton = (0, import_joy28.styled)(IconButton_default, {
|
|
|
2546
2452
|
outline: `${theme.getCssVar("focus-thickness")} solid ${theme.getCssVar("palette-focusVisible")}`
|
|
2547
2453
|
}
|
|
2548
2454
|
}));
|
|
2549
|
-
var StyledPopper = (0,
|
|
2455
|
+
var StyledPopper = (0, import_joy27.styled)(import_base3.Popper, {
|
|
2550
2456
|
name: "DatePicker",
|
|
2551
2457
|
slot: "popper"
|
|
2552
2458
|
})(({ theme }) => ({
|
|
2553
2459
|
zIndex: theme.zIndex.tooltip
|
|
2554
2460
|
}));
|
|
2555
|
-
var CalendarSheet = (0,
|
|
2461
|
+
var CalendarSheet = (0, import_joy27.styled)(Sheet_default, {
|
|
2556
2462
|
name: "DatePicker",
|
|
2557
2463
|
slot: "sheet",
|
|
2558
2464
|
overridesResolver: (props, styles) => styles.root
|
|
@@ -2561,7 +2467,7 @@ var CalendarSheet = (0, import_joy28.styled)(Sheet_default, {
|
|
|
2561
2467
|
boxShadow: theme.shadow.md,
|
|
2562
2468
|
borderRadius: theme.radius.md
|
|
2563
2469
|
}));
|
|
2564
|
-
var DatePickerRoot = (0,
|
|
2470
|
+
var DatePickerRoot = (0, import_joy27.styled)("div", {
|
|
2565
2471
|
name: "DatePicker",
|
|
2566
2472
|
slot: "root",
|
|
2567
2473
|
overridesResolver: (props, styles) => styles.root
|
|
@@ -2618,9 +2524,9 @@ function parseDate(dateString, format) {
|
|
|
2618
2524
|
var formatToPattern = (format) => {
|
|
2619
2525
|
return format.replace(/YYYY/g, "Y").replace(/MM/g, "M").replace(/DD/g, "D").replace(/[^YMD\s]/g, (match) => `${match}\``);
|
|
2620
2526
|
};
|
|
2621
|
-
var TextMaskAdapter3 =
|
|
2527
|
+
var TextMaskAdapter3 = import_react19.default.forwardRef(function TextMaskAdapter4(props, ref) {
|
|
2622
2528
|
const { onChange, format, ...other } = props;
|
|
2623
|
-
return /* @__PURE__ */
|
|
2529
|
+
return /* @__PURE__ */ import_react19.default.createElement(
|
|
2624
2530
|
import_react_imask.IMaskInput,
|
|
2625
2531
|
{
|
|
2626
2532
|
...other,
|
|
@@ -2655,8 +2561,8 @@ var TextMaskAdapter3 = import_react20.default.forwardRef(function TextMaskAdapte
|
|
|
2655
2561
|
}
|
|
2656
2562
|
);
|
|
2657
2563
|
});
|
|
2658
|
-
var DatePicker = (0,
|
|
2659
|
-
const props = (0,
|
|
2564
|
+
var DatePicker = (0, import_react19.forwardRef)((inProps, ref) => {
|
|
2565
|
+
const props = (0, import_joy27.useThemeProps)({ props: inProps, name: "DatePicker" });
|
|
2660
2566
|
const {
|
|
2661
2567
|
onChange,
|
|
2662
2568
|
disabled,
|
|
@@ -2680,24 +2586,24 @@ var DatePicker = (0, import_react20.forwardRef)((inProps, ref) => {
|
|
|
2680
2586
|
shouldDisableDate,
|
|
2681
2587
|
...innerProps
|
|
2682
2588
|
} = props;
|
|
2683
|
-
const innerRef = (0,
|
|
2684
|
-
const buttonRef = (0,
|
|
2589
|
+
const innerRef = (0, import_react19.useRef)(null);
|
|
2590
|
+
const buttonRef = (0, import_react19.useRef)(null);
|
|
2685
2591
|
const [value, setValue] = useControlledState(
|
|
2686
2592
|
props.value,
|
|
2687
2593
|
props.defaultValue || "",
|
|
2688
|
-
(0,
|
|
2594
|
+
(0, import_react19.useCallback)((value2) => onChange?.({ target: { name: props.name, value: value2 } }), [props.name, onChange])
|
|
2689
2595
|
);
|
|
2690
|
-
const [displayValue, setDisplayValue] = (0,
|
|
2596
|
+
const [displayValue, setDisplayValue] = (0, import_react19.useState)(
|
|
2691
2597
|
() => value ? formatValueString(parseDate(value, format), displayFormat) : ""
|
|
2692
2598
|
);
|
|
2693
|
-
const [anchorEl, setAnchorEl] = (0,
|
|
2599
|
+
const [anchorEl, setAnchorEl] = (0, import_react19.useState)(null);
|
|
2694
2600
|
const open = Boolean(anchorEl);
|
|
2695
|
-
(0,
|
|
2601
|
+
(0, import_react19.useEffect)(() => {
|
|
2696
2602
|
if (!anchorEl) {
|
|
2697
2603
|
innerRef.current?.blur();
|
|
2698
2604
|
}
|
|
2699
2605
|
}, [anchorEl, innerRef]);
|
|
2700
|
-
(0,
|
|
2606
|
+
(0, import_react19.useEffect)(() => {
|
|
2701
2607
|
if (value === "") {
|
|
2702
2608
|
setDisplayValue("");
|
|
2703
2609
|
return;
|
|
@@ -2707,8 +2613,8 @@ var DatePicker = (0, import_react20.forwardRef)((inProps, ref) => {
|
|
|
2707
2613
|
setDisplayValue(formattedValue);
|
|
2708
2614
|
}
|
|
2709
2615
|
}, [displayFormat, displayValue, format, value]);
|
|
2710
|
-
(0,
|
|
2711
|
-
const handleChange = (0,
|
|
2616
|
+
(0, import_react19.useImperativeHandle)(ref, () => innerRef.current, [innerRef]);
|
|
2617
|
+
const handleChange = (0, import_react19.useCallback)(
|
|
2712
2618
|
(event) => {
|
|
2713
2619
|
const value2 = event.target.value;
|
|
2714
2620
|
setDisplayValue(value2 ? formatValueString(parseDate(value2, format), displayFormat) : value2);
|
|
@@ -2716,7 +2622,7 @@ var DatePicker = (0, import_react20.forwardRef)((inProps, ref) => {
|
|
|
2716
2622
|
},
|
|
2717
2623
|
[displayFormat, format, setValue]
|
|
2718
2624
|
);
|
|
2719
|
-
const handleDisplayInputChange = (0,
|
|
2625
|
+
const handleDisplayInputChange = (0, import_react19.useCallback)(
|
|
2720
2626
|
(event) => {
|
|
2721
2627
|
if (event.target.value === "") {
|
|
2722
2628
|
handleChange({
|
|
@@ -2741,7 +2647,7 @@ var DatePicker = (0, import_react20.forwardRef)((inProps, ref) => {
|
|
|
2741
2647
|
},
|
|
2742
2648
|
[displayFormat, format, handleChange, props.name]
|
|
2743
2649
|
);
|
|
2744
|
-
const handleCalendarToggle = (0,
|
|
2650
|
+
const handleCalendarToggle = (0, import_react19.useCallback)(
|
|
2745
2651
|
(event) => {
|
|
2746
2652
|
setAnchorEl(anchorEl ? null : event.currentTarget);
|
|
2747
2653
|
setTimeout(() => {
|
|
@@ -2750,7 +2656,7 @@ var DatePicker = (0, import_react20.forwardRef)((inProps, ref) => {
|
|
|
2750
2656
|
},
|
|
2751
2657
|
[anchorEl, setAnchorEl, innerRef]
|
|
2752
2658
|
);
|
|
2753
|
-
const handleInputMouseDown = (0,
|
|
2659
|
+
const handleInputMouseDown = (0, import_react19.useCallback)(
|
|
2754
2660
|
(event) => {
|
|
2755
2661
|
if (inputReadOnly) {
|
|
2756
2662
|
event.preventDefault();
|
|
@@ -2759,7 +2665,7 @@ var DatePicker = (0, import_react20.forwardRef)((inProps, ref) => {
|
|
|
2759
2665
|
},
|
|
2760
2666
|
[inputReadOnly, buttonRef]
|
|
2761
2667
|
);
|
|
2762
|
-
return /* @__PURE__ */
|
|
2668
|
+
return /* @__PURE__ */ import_react19.default.createElement(DatePickerRoot, null, /* @__PURE__ */ import_react19.default.createElement(import_base3.FocusTrap, { open: true }, /* @__PURE__ */ import_react19.default.createElement(import_react19.default.Fragment, null, /* @__PURE__ */ import_react19.default.createElement(
|
|
2763
2669
|
Input_default,
|
|
2764
2670
|
{
|
|
2765
2671
|
...innerProps,
|
|
@@ -2787,7 +2693,7 @@ var DatePicker = (0, import_react20.forwardRef)((inProps, ref) => {
|
|
|
2787
2693
|
},
|
|
2788
2694
|
className,
|
|
2789
2695
|
sx,
|
|
2790
|
-
endDecorator: /* @__PURE__ */
|
|
2696
|
+
endDecorator: /* @__PURE__ */ import_react19.default.createElement(
|
|
2791
2697
|
CalendarButton,
|
|
2792
2698
|
{
|
|
2793
2699
|
ref: buttonRef,
|
|
@@ -2799,13 +2705,13 @@ var DatePicker = (0, import_react20.forwardRef)((inProps, ref) => {
|
|
|
2799
2705
|
"aria-expanded": open,
|
|
2800
2706
|
disabled
|
|
2801
2707
|
},
|
|
2802
|
-
/* @__PURE__ */
|
|
2708
|
+
/* @__PURE__ */ import_react19.default.createElement(import_CalendarToday.default, null)
|
|
2803
2709
|
),
|
|
2804
2710
|
label,
|
|
2805
2711
|
helperText,
|
|
2806
2712
|
readOnly: readOnly || inputReadOnly
|
|
2807
2713
|
}
|
|
2808
|
-
), open && /* @__PURE__ */
|
|
2714
|
+
), open && /* @__PURE__ */ import_react19.default.createElement(import_base3.ClickAwayListener, { onClickAway: () => setAnchorEl(null) }, /* @__PURE__ */ import_react19.default.createElement(
|
|
2809
2715
|
StyledPopper,
|
|
2810
2716
|
{
|
|
2811
2717
|
id: "date-picker-popper",
|
|
@@ -2824,7 +2730,7 @@ var DatePicker = (0, import_react20.forwardRef)((inProps, ref) => {
|
|
|
2824
2730
|
"aria-label": "Calendar Tooltip",
|
|
2825
2731
|
"aria-expanded": open
|
|
2826
2732
|
},
|
|
2827
|
-
/* @__PURE__ */
|
|
2733
|
+
/* @__PURE__ */ import_react19.default.createElement(CalendarSheet, { tabIndex: -1, role: "presentation" }, /* @__PURE__ */ import_react19.default.createElement(
|
|
2828
2734
|
Calendar_default,
|
|
2829
2735
|
{
|
|
2830
2736
|
value: value && !Number.isNaN(parseDate(value, format).getTime()) ? [parseDate(value, format), void 0] : void 0,
|
|
@@ -2843,14 +2749,14 @@ var DatePicker = (0, import_react20.forwardRef)((inProps, ref) => {
|
|
|
2843
2749
|
disablePast,
|
|
2844
2750
|
shouldDisableDate: shouldDisableDate ? (date) => shouldDisableDate(formatValueString(date, format)) : void 0
|
|
2845
2751
|
}
|
|
2846
|
-
), !hideClearButton && /* @__PURE__ */
|
|
2752
|
+
), !hideClearButton && /* @__PURE__ */ import_react19.default.createElement(
|
|
2847
2753
|
DialogActions_default,
|
|
2848
2754
|
{
|
|
2849
2755
|
sx: {
|
|
2850
2756
|
p: 1
|
|
2851
2757
|
}
|
|
2852
2758
|
},
|
|
2853
|
-
/* @__PURE__ */
|
|
2759
|
+
/* @__PURE__ */ import_react19.default.createElement(
|
|
2854
2760
|
Button_default,
|
|
2855
2761
|
{
|
|
2856
2762
|
size,
|
|
@@ -2876,10 +2782,10 @@ var DatePicker = (0, import_react20.forwardRef)((inProps, ref) => {
|
|
|
2876
2782
|
var DatePicker_default = DatePicker;
|
|
2877
2783
|
|
|
2878
2784
|
// src/components/Textarea/Textarea.tsx
|
|
2879
|
-
var
|
|
2880
|
-
var
|
|
2881
|
-
var
|
|
2882
|
-
var MotionTextarea = (0,
|
|
2785
|
+
var import_react20 = __toESM(require("react"));
|
|
2786
|
+
var import_joy28 = require("@mui/joy");
|
|
2787
|
+
var import_framer_motion18 = require("framer-motion");
|
|
2788
|
+
var MotionTextarea = (0, import_framer_motion18.motion)(import_joy28.Textarea);
|
|
2883
2789
|
var Textarea = (props) => {
|
|
2884
2790
|
const {
|
|
2885
2791
|
label,
|
|
@@ -2896,7 +2802,7 @@ var Textarea = (props) => {
|
|
|
2896
2802
|
className,
|
|
2897
2803
|
...innerProps
|
|
2898
2804
|
} = props;
|
|
2899
|
-
const textarea = /* @__PURE__ */
|
|
2805
|
+
const textarea = /* @__PURE__ */ import_react20.default.createElement(
|
|
2900
2806
|
MotionTextarea,
|
|
2901
2807
|
{
|
|
2902
2808
|
required,
|
|
@@ -2908,7 +2814,7 @@ var Textarea = (props) => {
|
|
|
2908
2814
|
...innerProps
|
|
2909
2815
|
}
|
|
2910
2816
|
);
|
|
2911
|
-
return /* @__PURE__ */
|
|
2817
|
+
return /* @__PURE__ */ import_react20.default.createElement(
|
|
2912
2818
|
FormControl_default,
|
|
2913
2819
|
{
|
|
2914
2820
|
required,
|
|
@@ -2919,9 +2825,9 @@ var Textarea = (props) => {
|
|
|
2919
2825
|
sx,
|
|
2920
2826
|
className
|
|
2921
2827
|
},
|
|
2922
|
-
label && /* @__PURE__ */
|
|
2828
|
+
label && /* @__PURE__ */ import_react20.default.createElement(FormLabel_default, null, label),
|
|
2923
2829
|
textarea,
|
|
2924
|
-
helperText && /* @__PURE__ */
|
|
2830
|
+
helperText && /* @__PURE__ */ import_react20.default.createElement(FormHelperText_default, null, helperText)
|
|
2925
2831
|
);
|
|
2926
2832
|
};
|
|
2927
2833
|
Textarea.displayName = "Textarea";
|
|
@@ -2930,10 +2836,10 @@ Textarea.displayName = "Textarea";
|
|
|
2930
2836
|
var Textarea_default = Textarea;
|
|
2931
2837
|
|
|
2932
2838
|
// src/components/Select/Select.tsx
|
|
2933
|
-
var
|
|
2934
|
-
var
|
|
2935
|
-
var
|
|
2936
|
-
var MotionOption = (0,
|
|
2839
|
+
var import_react21 = __toESM(require("react"));
|
|
2840
|
+
var import_joy29 = require("@mui/joy");
|
|
2841
|
+
var import_framer_motion19 = require("framer-motion");
|
|
2842
|
+
var MotionOption = (0, import_framer_motion19.motion)(import_joy29.Option);
|
|
2937
2843
|
var Option = MotionOption;
|
|
2938
2844
|
var secondaryTextLevelMap2 = {
|
|
2939
2845
|
sm: "body-xs",
|
|
@@ -2956,7 +2862,7 @@ function Select(props) {
|
|
|
2956
2862
|
className,
|
|
2957
2863
|
...innerProps
|
|
2958
2864
|
} = props;
|
|
2959
|
-
const options = (0,
|
|
2865
|
+
const options = (0, import_react21.useMemo)(
|
|
2960
2866
|
() => props.options.map((option) => {
|
|
2961
2867
|
if (option.hasOwnProperty("value") && option.hasOwnProperty("label")) {
|
|
2962
2868
|
return option;
|
|
@@ -2981,15 +2887,15 @@ function Select(props) {
|
|
|
2981
2887
|
};
|
|
2982
2888
|
onChange?.(newEvent, newValue);
|
|
2983
2889
|
};
|
|
2984
|
-
const optionMap = (0,
|
|
2890
|
+
const optionMap = (0, import_react21.useMemo)(() => {
|
|
2985
2891
|
const map = /* @__PURE__ */ new Map();
|
|
2986
2892
|
options.forEach((option) => {
|
|
2987
2893
|
map.set(option.value, option);
|
|
2988
2894
|
});
|
|
2989
2895
|
return map;
|
|
2990
2896
|
}, [options]);
|
|
2991
|
-
const select = /* @__PURE__ */
|
|
2992
|
-
|
|
2897
|
+
const select = /* @__PURE__ */ import_react21.default.createElement(
|
|
2898
|
+
import_joy29.Select,
|
|
2993
2899
|
{
|
|
2994
2900
|
...innerProps,
|
|
2995
2901
|
required,
|
|
@@ -3005,9 +2911,9 @@ function Select(props) {
|
|
|
3005
2911
|
return optionMap.get(selected.value)?.label;
|
|
3006
2912
|
}
|
|
3007
2913
|
},
|
|
3008
|
-
options.map((option) => /* @__PURE__ */
|
|
2914
|
+
options.map((option) => /* @__PURE__ */ import_react21.default.createElement(Option, { key: option.value, value: option.value, disabled: option.disabled }, option.secondaryText ? /* @__PURE__ */ import_react21.default.createElement(import_joy29.ListItemContent, { sx: { gap: 0.5 } }, /* @__PURE__ */ import_react21.default.createElement(import_joy29.Typography, { level: "inherit" }, option.label), /* @__PURE__ */ import_react21.default.createElement(import_joy29.Typography, { level: secondaryTextLevelMap2[size ?? "md"], textColor: "text.tertiary" }, option.secondaryText)) : option.label))
|
|
3009
2915
|
);
|
|
3010
|
-
return /* @__PURE__ */
|
|
2916
|
+
return /* @__PURE__ */ import_react21.default.createElement(
|
|
3011
2917
|
FormControl_default,
|
|
3012
2918
|
{
|
|
3013
2919
|
required,
|
|
@@ -3018,9 +2924,9 @@ function Select(props) {
|
|
|
3018
2924
|
sx,
|
|
3019
2925
|
className
|
|
3020
2926
|
},
|
|
3021
|
-
label && /* @__PURE__ */
|
|
2927
|
+
label && /* @__PURE__ */ import_react21.default.createElement(FormLabel_default, null, label),
|
|
3022
2928
|
select,
|
|
3023
|
-
helperText && /* @__PURE__ */
|
|
2929
|
+
helperText && /* @__PURE__ */ import_react21.default.createElement(FormHelperText_default, null, helperText)
|
|
3024
2930
|
);
|
|
3025
2931
|
}
|
|
3026
2932
|
Select.displayName = "Select";
|
|
@@ -3031,6 +2937,19 @@ var Select_default = Select;
|
|
|
3031
2937
|
// src/components/DataTable/components.tsx
|
|
3032
2938
|
var import_joy33 = require("@mui/joy");
|
|
3033
2939
|
|
|
2940
|
+
// src/components/Tooltip/Tooltip.tsx
|
|
2941
|
+
var import_react22 = __toESM(require("react"));
|
|
2942
|
+
var import_joy30 = require("@mui/joy");
|
|
2943
|
+
var import_framer_motion20 = require("framer-motion");
|
|
2944
|
+
var MotionTooltip = (0, import_framer_motion20.motion)(import_joy30.Tooltip);
|
|
2945
|
+
var Tooltip = (props) => {
|
|
2946
|
+
return /* @__PURE__ */ import_react22.default.createElement(MotionTooltip, { ...props });
|
|
2947
|
+
};
|
|
2948
|
+
Tooltip.displayName = "Tooltip";
|
|
2949
|
+
|
|
2950
|
+
// src/components/Tooltip/index.ts
|
|
2951
|
+
var Tooltip_default = Tooltip;
|
|
2952
|
+
|
|
3034
2953
|
// src/components/InfoSign/InfoSign.tsx
|
|
3035
2954
|
var import_react23 = __toESM(require("react"));
|
|
3036
2955
|
var import_joy31 = require("@mui/joy");
|
|
@@ -7465,8 +7384,90 @@ function RadioList(props) {
|
|
|
7465
7384
|
}
|
|
7466
7385
|
RadioList.displayName = "RadioList";
|
|
7467
7386
|
|
|
7468
|
-
// src/components/
|
|
7387
|
+
// src/components/SearchBar/SearchBar.tsx
|
|
7469
7388
|
var import_react57 = __toESM(require("react"));
|
|
7389
|
+
var import_SearchRounded = __toESM(require("@mui/icons-material/SearchRounded"));
|
|
7390
|
+
var import_CloseRounded = __toESM(require("@mui/icons-material/CloseRounded"));
|
|
7391
|
+
function SearchBar(props) {
|
|
7392
|
+
const { hideSelect = false, options, value, onChange, onSearch } = props;
|
|
7393
|
+
const [selectVal, setSelectVal] = (0, import_react57.useState)(options?.[0]?.value ?? "");
|
|
7394
|
+
const [isHovered, setIsHovered] = (0, import_react57.useState)(false);
|
|
7395
|
+
const selectedOption = options?.find((o) => o.value === selectVal);
|
|
7396
|
+
const placeholder = selectedOption?.placeholder ?? "";
|
|
7397
|
+
const handleSearch = () => {
|
|
7398
|
+
onSearch?.({ selectValue: hideSelect ? void 0 : selectVal, inputValue: value });
|
|
7399
|
+
};
|
|
7400
|
+
const handleClear = () => {
|
|
7401
|
+
onChange("");
|
|
7402
|
+
};
|
|
7403
|
+
const handleKeyDown = (e) => {
|
|
7404
|
+
if (e.key === "Enter") {
|
|
7405
|
+
handleSearch();
|
|
7406
|
+
}
|
|
7407
|
+
};
|
|
7408
|
+
return /* @__PURE__ */ import_react57.default.createElement(
|
|
7409
|
+
import_joy3.Stack,
|
|
7410
|
+
{
|
|
7411
|
+
direction: "row",
|
|
7412
|
+
sx: {
|
|
7413
|
+
width: hideSelect ? "220px" : "300px",
|
|
7414
|
+
bgcolor: "background.surface",
|
|
7415
|
+
borderRadius: "sm",
|
|
7416
|
+
border: 1,
|
|
7417
|
+
borderColor: "neutral.outlinedBorder"
|
|
7418
|
+
}
|
|
7419
|
+
},
|
|
7420
|
+
!hideSelect && options && /* @__PURE__ */ import_react57.default.createElement(import_react57.default.Fragment, null, /* @__PURE__ */ import_react57.default.createElement(
|
|
7421
|
+
Select,
|
|
7422
|
+
{
|
|
7423
|
+
variant: "plain",
|
|
7424
|
+
size: "sm",
|
|
7425
|
+
color: "neutral",
|
|
7426
|
+
value: selectVal,
|
|
7427
|
+
options,
|
|
7428
|
+
onChange: (_, newValue) => setSelectVal(newValue),
|
|
7429
|
+
sx: { flex: 1, maxWidth: "110px" },
|
|
7430
|
+
slotProps: {
|
|
7431
|
+
button: {
|
|
7432
|
+
style: { display: "block", overflow: "hidden", textOverflow: "ellipsis", whiteSpace: "nowrap" }
|
|
7433
|
+
}
|
|
7434
|
+
}
|
|
7435
|
+
}
|
|
7436
|
+
), /* @__PURE__ */ import_react57.default.createElement(Divider, { orientation: "vertical", sx: { height: "16px", alignSelf: "center" } })),
|
|
7437
|
+
/* @__PURE__ */ import_react57.default.createElement(
|
|
7438
|
+
Input,
|
|
7439
|
+
{
|
|
7440
|
+
variant: "plain",
|
|
7441
|
+
size: "sm",
|
|
7442
|
+
color: "neutral",
|
|
7443
|
+
placeholder,
|
|
7444
|
+
value,
|
|
7445
|
+
onChange: (e) => onChange(e.target.value),
|
|
7446
|
+
onKeyDown: handleKeyDown,
|
|
7447
|
+
sx: { flex: 1, minWidth: 0 },
|
|
7448
|
+
onMouseEnter: () => setIsHovered(true),
|
|
7449
|
+
onMouseLeave: () => setIsHovered(false),
|
|
7450
|
+
endDecorator: isHovered && value ? /* @__PURE__ */ import_react57.default.createElement(
|
|
7451
|
+
IconButton,
|
|
7452
|
+
{
|
|
7453
|
+
variant: "plain",
|
|
7454
|
+
size: "sm",
|
|
7455
|
+
color: "neutral",
|
|
7456
|
+
onMouseDown: (e) => e.preventDefault(),
|
|
7457
|
+
onClick: handleClear,
|
|
7458
|
+
"aria-label": "Clear"
|
|
7459
|
+
},
|
|
7460
|
+
/* @__PURE__ */ import_react57.default.createElement(import_CloseRounded.default, null)
|
|
7461
|
+
) : void 0
|
|
7462
|
+
}
|
|
7463
|
+
),
|
|
7464
|
+
/* @__PURE__ */ import_react57.default.createElement(IconButton, { variant: "plain", size: "sm", color: "neutral", onClick: handleSearch, "aria-label": "Search" }, /* @__PURE__ */ import_react57.default.createElement(import_SearchRounded.default, null))
|
|
7465
|
+
);
|
|
7466
|
+
}
|
|
7467
|
+
SearchBar.displayName = "SearchBar";
|
|
7468
|
+
|
|
7469
|
+
// src/components/Stepper/Stepper.tsx
|
|
7470
|
+
var import_react58 = __toESM(require("react"));
|
|
7470
7471
|
var import_joy67 = require("@mui/joy");
|
|
7471
7472
|
var import_Check = __toESM(require("@mui/icons-material/Check"));
|
|
7472
7473
|
var import_framer_motion27 = require("framer-motion");
|
|
@@ -7495,7 +7496,7 @@ function Stepper(props) {
|
|
|
7495
7496
|
stepOrientation = "horizontal"
|
|
7496
7497
|
} = props;
|
|
7497
7498
|
const effectiveStepOrientation = orientation === "vertical" ? "horizontal" : stepOrientation;
|
|
7498
|
-
return /* @__PURE__ */
|
|
7499
|
+
return /* @__PURE__ */ import_react58.default.createElement(
|
|
7499
7500
|
MotionStepper,
|
|
7500
7501
|
{
|
|
7501
7502
|
orientation,
|
|
@@ -7534,23 +7535,23 @@ function Stepper(props) {
|
|
|
7534
7535
|
const completed = activeStep > i + 1;
|
|
7535
7536
|
const disabled = activeStep < i + 1;
|
|
7536
7537
|
const hasContent = step.label || step.extraContent;
|
|
7537
|
-
return /* @__PURE__ */
|
|
7538
|
+
return /* @__PURE__ */ import_react58.default.createElement(
|
|
7538
7539
|
Step,
|
|
7539
7540
|
{
|
|
7540
7541
|
key: `step-${i}`,
|
|
7541
|
-
indicator: /* @__PURE__ */
|
|
7542
|
+
indicator: /* @__PURE__ */ import_react58.default.createElement(StepIndicator, { variant: disabled ? "outlined" : "solid", color: disabled ? "neutral" : "primary" }, completed ? /* @__PURE__ */ import_react58.default.createElement(import_Check.default, null) : step.indicatorContent),
|
|
7542
7543
|
active,
|
|
7543
7544
|
completed,
|
|
7544
7545
|
disabled,
|
|
7545
7546
|
orientation: effectiveStepOrientation
|
|
7546
7547
|
},
|
|
7547
|
-
hasContent && /* @__PURE__ */
|
|
7548
|
+
hasContent && /* @__PURE__ */ import_react58.default.createElement(
|
|
7548
7549
|
Stack_default,
|
|
7549
7550
|
{
|
|
7550
7551
|
sx: orientation === "horizontal" && effectiveStepOrientation === "vertical" ? { alignItems: "center" } : {}
|
|
7551
7552
|
},
|
|
7552
|
-
step.label && /* @__PURE__ */
|
|
7553
|
-
step.extraContent && /* @__PURE__ */
|
|
7553
|
+
step.label && /* @__PURE__ */ import_react58.default.createElement(Typography_default, { level: "title-sm" }, step.label),
|
|
7554
|
+
step.extraContent && /* @__PURE__ */ import_react58.default.createElement(Typography_default, { level: "body-xs" }, step.extraContent)
|
|
7554
7555
|
)
|
|
7555
7556
|
);
|
|
7556
7557
|
})
|
|
@@ -7559,7 +7560,7 @@ function Stepper(props) {
|
|
|
7559
7560
|
Stepper.displayName = "Stepper";
|
|
7560
7561
|
|
|
7561
7562
|
// src/components/Switch/Switch.tsx
|
|
7562
|
-
var
|
|
7563
|
+
var import_react59 = __toESM(require("react"));
|
|
7563
7564
|
var import_joy68 = require("@mui/joy");
|
|
7564
7565
|
var import_framer_motion28 = require("framer-motion");
|
|
7565
7566
|
var MotionSwitch = (0, import_framer_motion28.motion)(import_joy68.Switch);
|
|
@@ -7581,14 +7582,14 @@ var StyledThumb = (0, import_joy68.styled)(import_framer_motion28.motion.div)({
|
|
|
7581
7582
|
right: "var(--Switch-thumbOffset)"
|
|
7582
7583
|
}
|
|
7583
7584
|
});
|
|
7584
|
-
var Thumb = (props) => /* @__PURE__ */
|
|
7585
|
+
var Thumb = (props) => /* @__PURE__ */ import_react59.default.createElement(StyledThumb, { ...props, layout: true, transition: spring });
|
|
7585
7586
|
var spring = {
|
|
7586
7587
|
type: "spring",
|
|
7587
7588
|
stiffness: 700,
|
|
7588
7589
|
damping: 30
|
|
7589
7590
|
};
|
|
7590
7591
|
var Switch = (props) => {
|
|
7591
|
-
return /* @__PURE__ */
|
|
7592
|
+
return /* @__PURE__ */ import_react59.default.createElement(
|
|
7592
7593
|
MotionSwitch,
|
|
7593
7594
|
{
|
|
7594
7595
|
...props,
|
|
@@ -7602,7 +7603,7 @@ var Switch = (props) => {
|
|
|
7602
7603
|
Switch.displayName = "Switch";
|
|
7603
7604
|
|
|
7604
7605
|
// src/components/Tabs/Tabs.tsx
|
|
7605
|
-
var
|
|
7606
|
+
var import_react60 = __toESM(require("react"));
|
|
7606
7607
|
var import_joy69 = require("@mui/joy");
|
|
7607
7608
|
var StyledTabs = (0, import_joy69.styled)(import_joy69.Tabs)(({ theme }) => ({
|
|
7608
7609
|
backgroundColor: theme.palette.background.body
|
|
@@ -7618,15 +7619,15 @@ var StyledTab = (0, import_joy69.styled)(import_joy69.Tab)(({ theme }) => ({
|
|
|
7618
7619
|
backgroundColor: theme.palette.background.body
|
|
7619
7620
|
}
|
|
7620
7621
|
}));
|
|
7621
|
-
var Tab = (0,
|
|
7622
|
-
return /* @__PURE__ */
|
|
7622
|
+
var Tab = (0, import_react60.forwardRef)(function Tab2({ startDecorator, endDecorator, children, ...props }, ref) {
|
|
7623
|
+
return /* @__PURE__ */ import_react60.default.createElement(StyledTab, { ...props, ref }, startDecorator, children, endDecorator);
|
|
7623
7624
|
});
|
|
7624
7625
|
Tab.displayName = "Tab";
|
|
7625
7626
|
var TabList = import_joy69.TabList;
|
|
7626
7627
|
var TabPanel = import_joy69.TabPanel;
|
|
7627
7628
|
|
|
7628
7629
|
// src/components/ThemeProvider/ThemeProvider.tsx
|
|
7629
|
-
var
|
|
7630
|
+
var import_react61 = __toESM(require("react"));
|
|
7630
7631
|
var import_joy70 = require("@mui/joy");
|
|
7631
7632
|
var colorScheme = {
|
|
7632
7633
|
palette: {
|
|
@@ -7905,6 +7906,6 @@ var defaultTheme = (0, import_joy70.extendTheme)({
|
|
|
7905
7906
|
});
|
|
7906
7907
|
function ThemeProvider(props) {
|
|
7907
7908
|
const theme = props.theme || defaultTheme;
|
|
7908
|
-
return /* @__PURE__ */
|
|
7909
|
+
return /* @__PURE__ */ import_react61.default.createElement(import_react61.default.Fragment, null, /* @__PURE__ */ import_react61.default.createElement(import_joy70.CssVarsProvider, { theme }, /* @__PURE__ */ import_react61.default.createElement(import_joy70.CssBaseline, null), props.children));
|
|
7909
7910
|
}
|
|
7910
7911
|
ThemeProvider.displayName = "ThemeProvider";
|