@ceed/ads 1.25.1-next.3 → 1.26.0
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/chunks/rehype-accent-FZRUD7VI.js +39 -0
- package/dist/components/CurrencyInput/CurrencyInput.d.ts +1 -1
- package/dist/components/CurrencyInput/hooks/use-currency-setting.d.ts +2 -2
- package/dist/components/DataTable/components.d.ts +2 -1
- package/dist/components/DataTable/styled.d.ts +3 -1
- package/dist/components/DataTable/types.d.ts +1 -0
- package/dist/components/ProfileMenu/ProfileMenu.d.ts +1 -1
- package/dist/components/data-display/Badge.md +71 -39
- package/dist/components/data-display/DataTable.md +77 -1
- package/dist/components/data-display/InfoSign.md +74 -98
- package/dist/components/data-display/Typography.md +363 -97
- package/dist/components/feedback/CircularProgress.md +257 -0
- package/dist/components/feedback/Dialog.md +76 -62
- package/dist/components/feedback/Modal.md +259 -44
- package/dist/components/feedback/Skeleton.md +280 -0
- package/dist/components/feedback/llms.txt +2 -0
- package/dist/components/inputs/Autocomplete.md +356 -107
- package/dist/components/inputs/ButtonGroup.md +115 -106
- package/dist/components/inputs/Calendar.md +98 -459
- package/dist/components/inputs/CurrencyInput.md +183 -5
- package/dist/components/inputs/DatePicker.md +108 -431
- package/dist/components/inputs/DateRangePicker.md +131 -492
- package/dist/components/inputs/FilterMenu.md +169 -19
- package/dist/components/inputs/FilterableCheckboxGroup.md +123 -23
- package/dist/components/inputs/FormControl.md +361 -0
- package/dist/components/inputs/IconButton.md +137 -88
- package/dist/components/inputs/Input.md +5 -0
- package/dist/components/inputs/MonthPicker.md +95 -422
- package/dist/components/inputs/MonthRangePicker.md +89 -466
- package/dist/components/inputs/PercentageInput.md +185 -16
- package/dist/components/inputs/RadioButton.md +163 -35
- package/dist/components/inputs/RadioList.md +241 -0
- package/dist/components/inputs/RadioTileGroup.md +150 -61
- package/dist/components/inputs/Select.md +222 -326
- package/dist/components/inputs/Slider.md +334 -0
- package/dist/components/inputs/Switch.md +136 -376
- package/dist/components/inputs/Textarea.md +213 -10
- package/dist/components/inputs/Uploader/Uploader.md +145 -66
- package/dist/components/inputs/llms.txt +3 -0
- package/dist/components/navigation/Breadcrumbs.md +80 -322
- package/dist/components/navigation/Dropdown.md +92 -221
- package/dist/components/navigation/IconMenuButton.md +40 -502
- package/dist/components/navigation/InsetDrawer.md +68 -738
- package/dist/components/navigation/Link.md +39 -298
- package/dist/components/navigation/Menu.md +92 -285
- package/dist/components/navigation/MenuButton.md +55 -448
- package/dist/components/navigation/Pagination.md +47 -338
- package/dist/components/navigation/ProfileMenu.md +45 -268
- package/dist/components/navigation/Stepper.md +160 -28
- package/dist/components/navigation/Tabs.md +57 -316
- package/dist/components/surfaces/Sheet.md +151 -334
- package/dist/guides/ThemeProvider.md +116 -0
- package/dist/guides/llms.txt +9 -0
- package/dist/index.browser.js +16 -18
- package/dist/index.browser.js.map +4 -4
- package/dist/index.cjs +303 -209
- package/dist/index.js +381 -343
- package/dist/llms.txt +8 -0
- package/framer/index.js +1 -166
- package/package.json +15 -16
package/dist/index.cjs
CHANGED
|
@@ -841,11 +841,24 @@ Button.displayName = "Button";
|
|
|
841
841
|
var Button_default = Button;
|
|
842
842
|
|
|
843
843
|
// src/components/Calendar/Calendar.tsx
|
|
844
|
-
var
|
|
845
|
-
var
|
|
844
|
+
var import_react14 = __toESM(require("react"));
|
|
845
|
+
var import_joy19 = require("@mui/joy");
|
|
846
846
|
var import_ChevronLeft = __toESM(require("@mui/icons-material/ChevronLeft"));
|
|
847
847
|
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");
|
|
848
853
|
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;
|
|
849
862
|
|
|
850
863
|
// src/components/Calendar/utils/index.ts
|
|
851
864
|
var getCalendarDates = (date) => {
|
|
@@ -919,43 +932,43 @@ var isSameMonth = (date1, date2) => {
|
|
|
919
932
|
};
|
|
920
933
|
|
|
921
934
|
// src/components/Calendar/hooks/use-calendar-props.ts
|
|
922
|
-
var
|
|
923
|
-
var
|
|
935
|
+
var import_react12 = require("react");
|
|
936
|
+
var import_joy18 = require("@mui/joy");
|
|
924
937
|
var resolveView = (view, views) => {
|
|
925
938
|
return views.includes(view) ? view : views[0];
|
|
926
939
|
};
|
|
927
940
|
var useCalendarProps = (inProps) => {
|
|
928
|
-
const [uncontrolledView, setUncontrolledView] = (0,
|
|
941
|
+
const [uncontrolledView, setUncontrolledView] = (0, import_react12.useState)(
|
|
929
942
|
() => resolveView(inProps.view || "day", inProps.views || ["day", "month"])
|
|
930
943
|
);
|
|
931
|
-
const [uncontrolledValue, setUncontrolledValue] = (0,
|
|
944
|
+
const [uncontrolledValue, setUncontrolledValue] = (0, import_react12.useState)(
|
|
932
945
|
inProps.defaultValue
|
|
933
946
|
);
|
|
934
|
-
const [viewMonth, setViewMonth] = (0,
|
|
947
|
+
const [viewMonth, setViewMonth] = (0, import_react12.useState)(() => {
|
|
935
948
|
const today = /* @__PURE__ */ new Date();
|
|
936
949
|
today.setDate(1);
|
|
937
950
|
today.setHours(0, 0, 0, 0);
|
|
938
951
|
return inProps.value?.[0] || inProps.defaultValue?.[0] || today;
|
|
939
952
|
});
|
|
940
|
-
const [[page, direction], setPage] = (0,
|
|
953
|
+
const [[page, direction], setPage] = (0, import_react12.useState)([0, 0]);
|
|
941
954
|
const resolvedView = inProps.view ?? uncontrolledView;
|
|
942
|
-
const resolvedMinDate = (0,
|
|
955
|
+
const resolvedMinDate = (0, import_react12.useMemo)(() => {
|
|
943
956
|
const minDate = inProps.minDate || /* @__PURE__ */ new Date(0);
|
|
944
957
|
minDate.setHours(0, 0, 0, 0);
|
|
945
958
|
return minDate;
|
|
946
959
|
}, [inProps.minDate]);
|
|
947
|
-
const resolvedMaxDate = (0,
|
|
960
|
+
const resolvedMaxDate = (0, import_react12.useMemo)(() => {
|
|
948
961
|
const maxDate = inProps.maxDate || /* @__PURE__ */ new Date(864e13);
|
|
949
962
|
maxDate.setHours(0, 0, 0, 0);
|
|
950
963
|
return maxDate;
|
|
951
964
|
}, [inProps.maxDate]);
|
|
952
|
-
const paginate = (0,
|
|
965
|
+
const paginate = (0, import_react12.useCallback)(
|
|
953
966
|
(newDirection) => {
|
|
954
967
|
setPage([page + newDirection, newDirection]);
|
|
955
968
|
},
|
|
956
969
|
[page]
|
|
957
970
|
);
|
|
958
|
-
const handleViewMonthChange = (0,
|
|
971
|
+
const handleViewMonthChange = (0, import_react12.useCallback)(
|
|
959
972
|
(newMonth) => {
|
|
960
973
|
setViewMonth(newMonth);
|
|
961
974
|
if (resolvedView === "month") {
|
|
@@ -969,7 +982,7 @@ var useCalendarProps = (inProps) => {
|
|
|
969
982
|
},
|
|
970
983
|
[resolvedView, inProps, viewMonth, paginate]
|
|
971
984
|
);
|
|
972
|
-
const props = (0,
|
|
985
|
+
const props = (0, import_joy18.useThemeProps)({
|
|
973
986
|
props: {
|
|
974
987
|
locale: "default",
|
|
975
988
|
views: ["day", "month"],
|
|
@@ -1003,18 +1016,18 @@ var useCalendarProps = (inProps) => {
|
|
|
1003
1016
|
},
|
|
1004
1017
|
name: "Calendar"
|
|
1005
1018
|
});
|
|
1006
|
-
const ownerState = (0,
|
|
1019
|
+
const ownerState = (0, import_react12.useMemo)(() => ({ ...props, viewMonth, direction }), [props, viewMonth, direction]);
|
|
1007
1020
|
return [props, ownerState];
|
|
1008
1021
|
};
|
|
1009
1022
|
|
|
1010
1023
|
// src/components/Calendar/hooks/use-calendar.ts
|
|
1011
|
-
var
|
|
1024
|
+
var import_react13 = require("react");
|
|
1012
1025
|
var useCalendar = (ownerState) => {
|
|
1013
|
-
const [hoverDay, setHoverDay] = (0,
|
|
1014
|
-
const [hoverMonth, setHoverMonth] = (0,
|
|
1026
|
+
const [hoverDay, setHoverDay] = (0, import_react13.useState)(null);
|
|
1027
|
+
const [hoverMonth, setHoverMonth] = (0, import_react13.useState)(null);
|
|
1015
1028
|
return {
|
|
1016
1029
|
calendarTitle: ownerState.view === "month" ? getYearName(ownerState.viewMonth, ownerState.locale || "default") : getMonthName(ownerState.viewMonth, ownerState.locale || "default"),
|
|
1017
|
-
onPrev: (0,
|
|
1030
|
+
onPrev: (0, import_react13.useCallback)(() => {
|
|
1018
1031
|
if (ownerState.view === "day") {
|
|
1019
1032
|
const currentDate = new Date(ownerState.viewMonth || /* @__PURE__ */ new Date());
|
|
1020
1033
|
const currentYear = currentDate.getFullYear();
|
|
@@ -1031,7 +1044,7 @@ var useCalendar = (ownerState) => {
|
|
|
1031
1044
|
ownerState.onMonthChange?.(prevYear);
|
|
1032
1045
|
}
|
|
1033
1046
|
}, [ownerState.onMonthChange, ownerState.viewMonth, ownerState.view]),
|
|
1034
|
-
onNext: (0,
|
|
1047
|
+
onNext: (0, import_react13.useCallback)(() => {
|
|
1035
1048
|
if (ownerState.view === "day") {
|
|
1036
1049
|
const currentDate = new Date(ownerState.viewMonth || /* @__PURE__ */ new Date());
|
|
1037
1050
|
const currentYear = currentDate.getFullYear();
|
|
@@ -1048,7 +1061,7 @@ var useCalendar = (ownerState) => {
|
|
|
1048
1061
|
ownerState.onMonthChange?.(nextYear);
|
|
1049
1062
|
}
|
|
1050
1063
|
}, [ownerState.onMonthChange, ownerState.viewMonth, ownerState.view]),
|
|
1051
|
-
getDayCellProps: (0,
|
|
1064
|
+
getDayCellProps: (0, import_react13.useCallback)(
|
|
1052
1065
|
(day) => {
|
|
1053
1066
|
const thisDay = new Date(ownerState.viewMonth || /* @__PURE__ */ new Date());
|
|
1054
1067
|
thisDay.setHours(0, 0, 0, 0);
|
|
@@ -1063,7 +1076,7 @@ var useCalendar = (ownerState) => {
|
|
|
1063
1076
|
},
|
|
1064
1077
|
[ownerState.rangeSelection, ownerState.value, ownerState.viewMonth, hoverDay]
|
|
1065
1078
|
),
|
|
1066
|
-
getMonthCellProps: (0,
|
|
1079
|
+
getMonthCellProps: (0, import_react13.useCallback)(
|
|
1067
1080
|
(monthIndex) => {
|
|
1068
1081
|
const thisMonth = new Date(ownerState.viewMonth || /* @__PURE__ */ new Date());
|
|
1069
1082
|
thisMonth.setDate(1);
|
|
@@ -1080,7 +1093,7 @@ var useCalendar = (ownerState) => {
|
|
|
1080
1093
|
},
|
|
1081
1094
|
[ownerState.rangeSelection, ownerState.value, ownerState.viewMonth, hoverMonth]
|
|
1082
1095
|
),
|
|
1083
|
-
getPickerDayProps: (0,
|
|
1096
|
+
getPickerDayProps: (0, import_react13.useCallback)(
|
|
1084
1097
|
(day) => {
|
|
1085
1098
|
const thisDay = new Date(ownerState.viewMonth || /* @__PURE__ */ new Date());
|
|
1086
1099
|
thisDay.setHours(0, 0, 0, 0);
|
|
@@ -1134,7 +1147,7 @@ var useCalendar = (ownerState) => {
|
|
|
1134
1147
|
hoverDay
|
|
1135
1148
|
]
|
|
1136
1149
|
),
|
|
1137
|
-
getPickerMonthProps: (0,
|
|
1150
|
+
getPickerMonthProps: (0, import_react13.useCallback)(
|
|
1138
1151
|
(monthIndex) => {
|
|
1139
1152
|
const thisMonth = new Date(ownerState.viewMonth || /* @__PURE__ */ new Date());
|
|
1140
1153
|
thisMonth.setDate(1);
|
|
@@ -1204,13 +1217,19 @@ var useCalendar = (ownerState) => {
|
|
|
1204
1217
|
};
|
|
1205
1218
|
|
|
1206
1219
|
// src/components/Calendar/Calendar.tsx
|
|
1207
|
-
var
|
|
1220
|
+
var MONTH_VIEW_HINT_MESSAGE = "Click the month title to view all months.";
|
|
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
1227
|
name: "Calendar",
|
|
1209
1228
|
slot: "root"
|
|
1210
1229
|
})({
|
|
1211
1230
|
maxWidth: "264px"
|
|
1212
1231
|
});
|
|
1213
|
-
var CalendarHeader = (0,
|
|
1232
|
+
var CalendarHeader = (0, import_joy19.styled)("div", {
|
|
1214
1233
|
name: "Calendar",
|
|
1215
1234
|
slot: "calendarHeader"
|
|
1216
1235
|
})(({ theme }) => ({
|
|
@@ -1219,7 +1238,7 @@ var CalendarHeader = (0, import_joy18.styled)("div", {
|
|
|
1219
1238
|
alignItems: "center",
|
|
1220
1239
|
padding: theme.spacing(2)
|
|
1221
1240
|
}));
|
|
1222
|
-
var CalendarViewContainer = (0,
|
|
1241
|
+
var CalendarViewContainer = (0, import_joy19.styled)("div", {
|
|
1223
1242
|
name: "Calendar",
|
|
1224
1243
|
slot: "viewContainer",
|
|
1225
1244
|
shouldForwardProp: (prop) => prop !== "calendarType"
|
|
@@ -1230,7 +1249,7 @@ var CalendarViewContainer = (0, import_joy18.styled)("div", {
|
|
|
1230
1249
|
overflow: "hidden",
|
|
1231
1250
|
minHeight: calendarType === "datePicker" ? "250px" : "unset"
|
|
1232
1251
|
}));
|
|
1233
|
-
var CalendarViewTable = (0,
|
|
1252
|
+
var CalendarViewTable = (0, import_joy19.styled)(import_framer_motion13.motion.table, {
|
|
1234
1253
|
name: "Calendar",
|
|
1235
1254
|
slot: "viewTable"
|
|
1236
1255
|
})(({ theme }) => ({
|
|
@@ -1243,15 +1262,15 @@ var CalendarViewTable = (0, import_joy18.styled)(import_framer_motion12.motion.t
|
|
|
1243
1262
|
paddingBottom: theme.spacing(2)
|
|
1244
1263
|
}
|
|
1245
1264
|
}));
|
|
1246
|
-
var CalendarWeekHeaderContainer = (0,
|
|
1265
|
+
var CalendarWeekHeaderContainer = (0, import_joy19.styled)("thead", {
|
|
1247
1266
|
name: "Calendar",
|
|
1248
1267
|
slot: "weekHeaderContainer"
|
|
1249
1268
|
})({});
|
|
1250
|
-
var CalendarDayPickerContainer = (0,
|
|
1269
|
+
var CalendarDayPickerContainer = (0, import_joy19.styled)("tbody", {
|
|
1251
1270
|
name: "Calendar",
|
|
1252
1271
|
slot: "dayPickerContainer"
|
|
1253
1272
|
})({});
|
|
1254
|
-
var CalendarSwitchViewButton = (0,
|
|
1273
|
+
var CalendarSwitchViewButton = (0, import_joy19.styled)(Button_default, {
|
|
1255
1274
|
name: "Calendar",
|
|
1256
1275
|
slot: "switchViewButton"
|
|
1257
1276
|
})(({ ownerState }) => [
|
|
@@ -1259,7 +1278,7 @@ var CalendarSwitchViewButton = (0, import_joy18.styled)(Button_default, {
|
|
|
1259
1278
|
pointerEvents: "none"
|
|
1260
1279
|
}
|
|
1261
1280
|
]);
|
|
1262
|
-
var CalendarDayCell = (0,
|
|
1281
|
+
var CalendarDayCell = (0, import_joy19.styled)("td", {
|
|
1263
1282
|
name: "Calendar",
|
|
1264
1283
|
slot: "dayCell"
|
|
1265
1284
|
})(({ theme }) => ({
|
|
@@ -1281,7 +1300,7 @@ var CalendarDayCell = (0, import_joy18.styled)("td", {
|
|
|
1281
1300
|
}
|
|
1282
1301
|
}
|
|
1283
1302
|
}));
|
|
1284
|
-
var CalendarMonthCell = (0,
|
|
1303
|
+
var CalendarMonthCell = (0, import_joy19.styled)("td", {
|
|
1285
1304
|
name: "Calendar",
|
|
1286
1305
|
slot: "monthCell"
|
|
1287
1306
|
})(({ theme }) => ({
|
|
@@ -1303,7 +1322,7 @@ var CalendarMonthCell = (0, import_joy18.styled)("td", {
|
|
|
1303
1322
|
}
|
|
1304
1323
|
}
|
|
1305
1324
|
}));
|
|
1306
|
-
var CalendarMonth = (0,
|
|
1325
|
+
var CalendarMonth = (0, import_joy19.styled)(Button_default, {
|
|
1307
1326
|
name: "Calendar",
|
|
1308
1327
|
slot: "month",
|
|
1309
1328
|
shouldForwardProp: (prop) => prop !== "isSelected"
|
|
@@ -1338,7 +1357,7 @@ var CalendarMonth = (0, import_joy18.styled)(Button_default, {
|
|
|
1338
1357
|
backgroundColor: theme.palette.neutral.solidDisabledBg
|
|
1339
1358
|
}
|
|
1340
1359
|
]);
|
|
1341
|
-
var CalendarDay = (0,
|
|
1360
|
+
var CalendarDay = (0, import_joy19.styled)(Button_default, {
|
|
1342
1361
|
name: "Calendar",
|
|
1343
1362
|
slot: "day",
|
|
1344
1363
|
shouldForwardProp: (prop) => !["isToday", "isSelected"].includes(prop)
|
|
@@ -1408,9 +1427,9 @@ var swipePower = (offset, velocity) => {
|
|
|
1408
1427
|
var PickerDays = (props) => {
|
|
1409
1428
|
const { ownerState } = props;
|
|
1410
1429
|
const { getPickerDayProps, getDayCellProps } = useCalendar(ownerState);
|
|
1411
|
-
const calendarDates = (0,
|
|
1412
|
-
const weekdayNames = (0,
|
|
1413
|
-
return /* @__PURE__ */
|
|
1430
|
+
const calendarDates = (0, import_react14.useMemo)(() => getCalendarDates(ownerState.viewMonth), [ownerState.viewMonth]);
|
|
1431
|
+
const weekdayNames = (0, import_react14.useMemo)(() => getWeekdayNames(ownerState.locale || "default"), [ownerState.locale]);
|
|
1432
|
+
return /* @__PURE__ */ import_react14.default.createElement(CalendarViewContainer, { calendarType: "datePicker" }, /* @__PURE__ */ import_react14.default.createElement(import_framer_motion13.AnimatePresence, { initial: false, custom: ownerState.direction }, /* @__PURE__ */ import_react14.default.createElement(
|
|
1414
1433
|
CalendarViewTable,
|
|
1415
1434
|
{
|
|
1416
1435
|
key: `${ownerState.viewMonth.toString()}_${ownerState.direction}`,
|
|
@@ -1439,10 +1458,10 @@ var PickerDays = (props) => {
|
|
|
1439
1458
|
}
|
|
1440
1459
|
}
|
|
1441
1460
|
},
|
|
1442
|
-
/* @__PURE__ */
|
|
1443
|
-
/* @__PURE__ */
|
|
1444
|
-
(date, i) => date ? /* @__PURE__ */
|
|
1445
|
-
)), rowIndex < calendarDates.length - 1 && /* @__PURE__ */
|
|
1461
|
+
/* @__PURE__ */ import_react14.default.createElement(CalendarWeekHeaderContainer, null, /* @__PURE__ */ import_react14.default.createElement("tr", null, weekdayNames.map((name, i) => /* @__PURE__ */ import_react14.default.createElement(import_react14.Fragment, { key: `${ownerState.viewMonth}_${name}_${i}` }, /* @__PURE__ */ import_react14.default.createElement("th", null, /* @__PURE__ */ import_react14.default.createElement(Typography_default, { level: "body-xs", textAlign: "center" }, name)), i < 6 && /* @__PURE__ */ import_react14.default.createElement("th", { style: { width: 4 }, "aria-hidden": "true", "aria-description": "cell-gap" }))))),
|
|
1462
|
+
/* @__PURE__ */ import_react14.default.createElement(CalendarDayPickerContainer, null, calendarDates.map((weekDates, rowIndex) => /* @__PURE__ */ import_react14.default.createElement(import_react14.Fragment, { key: `${ownerState.viewMonth}_${rowIndex}` }, /* @__PURE__ */ import_react14.default.createElement("tr", null, weekDates.map(
|
|
1463
|
+
(date, i) => date ? /* @__PURE__ */ import_react14.default.createElement(import_react14.Fragment, { key: `${ownerState.viewMonth}_${date}_${i}` }, /* @__PURE__ */ import_react14.default.createElement(CalendarDayCell, { ...getDayCellProps(date) }, /* @__PURE__ */ import_react14.default.createElement(CalendarDay, { size: "sm", variant: "plain", color: "neutral", ...getPickerDayProps(date) }, date)), i < 6 && /* @__PURE__ */ import_react14.default.createElement("td", { "aria-hidden": "true", "aria-description": "cell-gap" })) : /* @__PURE__ */ import_react14.default.createElement(import_react14.Fragment, { key: `${ownerState.viewMonth}_${i}` }, /* @__PURE__ */ import_react14.default.createElement("td", null), i < 6 && /* @__PURE__ */ import_react14.default.createElement("td", { "aria-hidden": "true", "aria-description": "cell-gap" }))
|
|
1464
|
+
)), rowIndex < calendarDates.length - 1 && /* @__PURE__ */ import_react14.default.createElement("tr", { "aria-hidden": "true", "aria-description": "row-gap" }, /* @__PURE__ */ import_react14.default.createElement("td", { colSpan: 13, style: { height: 4 } })))))
|
|
1446
1465
|
)));
|
|
1447
1466
|
};
|
|
1448
1467
|
var PickerMonths = (props) => {
|
|
@@ -1459,7 +1478,7 @@ var PickerMonths = (props) => {
|
|
|
1459
1478
|
[[]]
|
|
1460
1479
|
);
|
|
1461
1480
|
const isMonthPicker = !ownerState.views?.find((view) => view === "day");
|
|
1462
|
-
return /* @__PURE__ */
|
|
1481
|
+
return /* @__PURE__ */ import_react14.default.createElement(CalendarViewContainer, { calendarType: isMonthPicker ? "monthPicker" : "datePicker" }, /* @__PURE__ */ import_react14.default.createElement(import_framer_motion13.AnimatePresence, { initial: false, custom: ownerState.direction }, /* @__PURE__ */ import_react14.default.createElement(
|
|
1463
1482
|
CalendarViewTable,
|
|
1464
1483
|
{
|
|
1465
1484
|
key: `${ownerState.viewMonth.getFullYear()}_${ownerState.direction}`,
|
|
@@ -1488,10 +1507,10 @@ var PickerMonths = (props) => {
|
|
|
1488
1507
|
}
|
|
1489
1508
|
}
|
|
1490
1509
|
},
|
|
1491
|
-
/* @__PURE__ */
|
|
1510
|
+
/* @__PURE__ */ import_react14.default.createElement("tbody", null, chunkedMonths.map((months, i) => /* @__PURE__ */ import_react14.default.createElement(import_react14.Fragment, { key: months.join("_") }, /* @__PURE__ */ import_react14.default.createElement("tr", null, months.map((monthIndex, j) => /* @__PURE__ */ import_react14.default.createElement(import_react14.Fragment, { key: monthIndex }, /* @__PURE__ */ import_react14.default.createElement(CalendarMonthCell, { ...getMonthCellProps(monthIndex) }, /* @__PURE__ */ import_react14.default.createElement(CalendarMonth, { size: "sm", variant: "plain", color: "neutral", ...getPickerMonthProps(monthIndex) }, getMonthNameFromIndex(monthIndex, ownerState.locale))), j < 3 && /* @__PURE__ */ import_react14.default.createElement("td", { style: { width: 4 }, "aria-hidden": "true", "aria-description": "cell-gap" })))), i < chunkedMonths.length - 1 && /* @__PURE__ */ import_react14.default.createElement("tr", { "aria-hidden": "true", "aria-description": "row-gap" }, /* @__PURE__ */ import_react14.default.createElement("td", { colSpan: 7, style: { height: 4 } })))))
|
|
1492
1511
|
)));
|
|
1493
1512
|
};
|
|
1494
|
-
var Calendar = (0,
|
|
1513
|
+
var Calendar = (0, import_react14.forwardRef)((inProps, ref) => {
|
|
1495
1514
|
const [props, ownerState] = useCalendarProps(inProps);
|
|
1496
1515
|
const {
|
|
1497
1516
|
value,
|
|
@@ -1510,17 +1529,96 @@ var Calendar = (0, import_react13.forwardRef)((inProps, ref) => {
|
|
|
1510
1529
|
...others
|
|
1511
1530
|
} = props;
|
|
1512
1531
|
const { calendarTitle, onPrev, onNext } = useCalendar(ownerState);
|
|
1513
|
-
|
|
1514
|
-
|
|
1532
|
+
const [isMonthViewAssistHintOpen, setIsMonthViewAssistHintOpen] = (0, import_react14.useState)(false);
|
|
1533
|
+
const monthNavClickTimestampsRef = (0, import_react14.useRef)([]);
|
|
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,
|
|
1515
1600
|
{
|
|
1516
|
-
|
|
1517
|
-
|
|
1518
|
-
|
|
1519
|
-
|
|
1520
|
-
|
|
1601
|
+
title: monthViewHintMessage,
|
|
1602
|
+
arrow: true,
|
|
1603
|
+
open: isMonthViewAssistHintOpen,
|
|
1604
|
+
placement: "bottom",
|
|
1605
|
+
disableFocusListener: true,
|
|
1606
|
+
disableHoverListener: true,
|
|
1607
|
+
disableTouchListener: true,
|
|
1608
|
+
variant: "solid"
|
|
1521
1609
|
},
|
|
1522
|
-
|
|
1523
|
-
|
|
1610
|
+
/* @__PURE__ */ import_react14.default.createElement(
|
|
1611
|
+
CalendarSwitchViewButton,
|
|
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 }));
|
|
1524
1622
|
});
|
|
1525
1623
|
Calendar.displayName = "Calendar";
|
|
1526
1624
|
|
|
@@ -1528,31 +1626,31 @@ Calendar.displayName = "Calendar";
|
|
|
1528
1626
|
var Calendar_default = Calendar;
|
|
1529
1627
|
|
|
1530
1628
|
// src/components/Card/Card.tsx
|
|
1531
|
-
var
|
|
1532
|
-
var
|
|
1533
|
-
var MotionCard = (0,
|
|
1629
|
+
var import_joy20 = require("@mui/joy");
|
|
1630
|
+
var import_framer_motion14 = require("framer-motion");
|
|
1631
|
+
var MotionCard = (0, import_framer_motion14.motion)(import_joy20.Card);
|
|
1534
1632
|
var Card = MotionCard;
|
|
1535
1633
|
Card.displayName = "Card";
|
|
1536
|
-
var MotionCardContent = (0,
|
|
1634
|
+
var MotionCardContent = (0, import_framer_motion14.motion)(import_joy20.CardContent);
|
|
1537
1635
|
var CardContent = MotionCardContent;
|
|
1538
1636
|
CardContent.displayName = "CardContent";
|
|
1539
|
-
var MotionCardCover = (0,
|
|
1637
|
+
var MotionCardCover = (0, import_framer_motion14.motion)(import_joy20.CardCover);
|
|
1540
1638
|
var CardCover = MotionCardCover;
|
|
1541
1639
|
CardCover.displayName = "CardCover";
|
|
1542
|
-
var MotionCardActions = (0,
|
|
1640
|
+
var MotionCardActions = (0, import_framer_motion14.motion)(import_joy20.CardActions);
|
|
1543
1641
|
var CardActions = MotionCardActions;
|
|
1544
1642
|
CardActions.displayName = "CardActions";
|
|
1545
|
-
var MotionCardOverflow = (0,
|
|
1643
|
+
var MotionCardOverflow = (0, import_framer_motion14.motion)(import_joy20.CardOverflow);
|
|
1546
1644
|
var CardOverflow = MotionCardOverflow;
|
|
1547
1645
|
CardOverflow.displayName = "CardOverflow";
|
|
1548
1646
|
|
|
1549
1647
|
// src/components/Checkbox/Checkbox.tsx
|
|
1550
|
-
var
|
|
1551
|
-
var
|
|
1552
|
-
var
|
|
1553
|
-
var MotionCheckbox = (0,
|
|
1648
|
+
var import_react15 = __toESM(require("react"));
|
|
1649
|
+
var import_joy21 = require("@mui/joy");
|
|
1650
|
+
var import_framer_motion15 = require("framer-motion");
|
|
1651
|
+
var MotionCheckbox = (0, import_framer_motion15.motion)(import_joy21.Checkbox);
|
|
1554
1652
|
var Checkbox = (props) => {
|
|
1555
|
-
return /* @__PURE__ */
|
|
1653
|
+
return /* @__PURE__ */ import_react15.default.createElement(MotionCheckbox, { ...props });
|
|
1556
1654
|
};
|
|
1557
1655
|
Checkbox.displayName = "Checkbox";
|
|
1558
1656
|
|
|
@@ -1560,9 +1658,9 @@ Checkbox.displayName = "Checkbox";
|
|
|
1560
1658
|
var Checkbox_default = Checkbox;
|
|
1561
1659
|
|
|
1562
1660
|
// src/components/Container/Container.tsx
|
|
1563
|
-
var
|
|
1564
|
-
var
|
|
1565
|
-
var ContainerRoot = (0,
|
|
1661
|
+
var import_joy22 = require("@mui/joy");
|
|
1662
|
+
var import_react16 = __toESM(require("react"));
|
|
1663
|
+
var ContainerRoot = (0, import_joy22.styled)("div", {
|
|
1566
1664
|
name: "Container",
|
|
1567
1665
|
slot: "root",
|
|
1568
1666
|
shouldForwardProp: (prop) => prop !== "maxWidth" && prop !== "overrideBreakpoint"
|
|
@@ -1587,25 +1685,24 @@ var ContainerRoot = (0, import_joy21.styled)("div", {
|
|
|
1587
1685
|
paddingRight: theme.breakpoints.values[overrideBreakpoint] >= theme.breakpoints.values.lg ? theme.spacing(8) : theme.spacing(4)
|
|
1588
1686
|
} : null
|
|
1589
1687
|
]);
|
|
1590
|
-
var Container = (0,
|
|
1591
|
-
return /* @__PURE__ */
|
|
1688
|
+
var Container = (0, import_react16.forwardRef)(function Container2(props, ref) {
|
|
1689
|
+
return /* @__PURE__ */ import_react16.default.createElement(ContainerRoot, { ref, ...props });
|
|
1592
1690
|
});
|
|
1593
1691
|
Container.displayName = "Container";
|
|
1594
1692
|
|
|
1595
1693
|
// src/components/CurrencyInput/CurrencyInput.tsx
|
|
1596
|
-
var
|
|
1597
|
-
var import_intl_messageformat2 = require("intl-messageformat");
|
|
1694
|
+
var import_react18 = __toESM(require("react"));
|
|
1598
1695
|
var import_react_number_format = require("react-number-format");
|
|
1599
1696
|
|
|
1600
1697
|
// src/components/Input/Input.tsx
|
|
1601
|
-
var
|
|
1602
|
-
var
|
|
1603
|
-
var
|
|
1698
|
+
var import_react17 = __toESM(require("react"));
|
|
1699
|
+
var import_joy23 = require("@mui/joy");
|
|
1700
|
+
var import_framer_motion16 = require("framer-motion");
|
|
1604
1701
|
var import_Close2 = __toESM(require("@mui/icons-material/Close"));
|
|
1605
1702
|
var import_Visibility = __toESM(require("@mui/icons-material/Visibility"));
|
|
1606
1703
|
var import_VisibilityOff = __toESM(require("@mui/icons-material/VisibilityOff"));
|
|
1607
|
-
var MotionInput = (0,
|
|
1608
|
-
var Input =
|
|
1704
|
+
var MotionInput = (0, import_framer_motion16.motion)(import_joy23.Input);
|
|
1705
|
+
var Input = import_react17.default.forwardRef((props, ref) => {
|
|
1609
1706
|
const {
|
|
1610
1707
|
label,
|
|
1611
1708
|
helperText,
|
|
@@ -1628,11 +1725,11 @@ var Input = import_react16.default.forwardRef((props, ref) => {
|
|
|
1628
1725
|
if (type === "password" && innerProps.endDecorator) {
|
|
1629
1726
|
console.warn('Input: endDecorator is not supported when type="password"');
|
|
1630
1727
|
}
|
|
1631
|
-
const [passwordVisible, setPasswordVisible] = (0,
|
|
1728
|
+
const [passwordVisible, setPasswordVisible] = (0, import_react17.useState)(false);
|
|
1632
1729
|
const [value, setValue] = useControlledState(
|
|
1633
1730
|
props.value,
|
|
1634
1731
|
props.defaultValue,
|
|
1635
|
-
(0,
|
|
1732
|
+
(0, import_react17.useCallback)(
|
|
1636
1733
|
(value2) => {
|
|
1637
1734
|
onChange?.({
|
|
1638
1735
|
/**
|
|
@@ -1658,7 +1755,7 @@ var Input = import_react16.default.forwardRef((props, ref) => {
|
|
|
1658
1755
|
const actualType = type === "password" && passwordVisible ? "text" : type;
|
|
1659
1756
|
const isPasswordType = type === "password";
|
|
1660
1757
|
const showPasswordToggle = isPasswordType && !disableTogglePasswordButton;
|
|
1661
|
-
const input = /* @__PURE__ */
|
|
1758
|
+
const input = /* @__PURE__ */ import_react17.default.createElement(
|
|
1662
1759
|
MotionInput,
|
|
1663
1760
|
{
|
|
1664
1761
|
value,
|
|
@@ -1673,7 +1770,7 @@ var Input = import_react16.default.forwardRef((props, ref) => {
|
|
|
1673
1770
|
...innerProps.slotProps
|
|
1674
1771
|
},
|
|
1675
1772
|
...innerProps,
|
|
1676
|
-
endDecorator: isPasswordType ? showPasswordToggle ? /* @__PURE__ */
|
|
1773
|
+
endDecorator: isPasswordType ? showPasswordToggle ? /* @__PURE__ */ import_react17.default.createElement(Stack_default, { gap: 1, direction: "row" }, /* @__PURE__ */ import_react17.default.createElement(
|
|
1677
1774
|
IconButton_default,
|
|
1678
1775
|
{
|
|
1679
1776
|
onMouseDown: (e) => e.preventDefault(),
|
|
@@ -1681,19 +1778,19 @@ var Input = import_react16.default.forwardRef((props, ref) => {
|
|
|
1681
1778
|
disabled,
|
|
1682
1779
|
"aria-label": passwordVisible ? "Hide password" : "Show password"
|
|
1683
1780
|
},
|
|
1684
|
-
passwordVisible ? /* @__PURE__ */
|
|
1685
|
-
)) : null : enableClearable ? /* @__PURE__ */
|
|
1781
|
+
passwordVisible ? /* @__PURE__ */ import_react17.default.createElement(import_VisibilityOff.default, null) : /* @__PURE__ */ import_react17.default.createElement(import_Visibility.default, null)
|
|
1782
|
+
)) : null : enableClearable ? /* @__PURE__ */ import_react17.default.createElement(Stack_default, { gap: 1, direction: "row" }, innerProps.endDecorator, value && /* @__PURE__ */ import_react17.default.createElement(
|
|
1686
1783
|
IconButton_default,
|
|
1687
1784
|
{
|
|
1688
1785
|
onMouseDown: (e) => e.preventDefault(),
|
|
1689
1786
|
onClick: handleClear,
|
|
1690
1787
|
"aria-label": "Clear"
|
|
1691
1788
|
},
|
|
1692
|
-
/* @__PURE__ */
|
|
1789
|
+
/* @__PURE__ */ import_react17.default.createElement(import_Close2.default, null)
|
|
1693
1790
|
)) : innerProps.endDecorator
|
|
1694
1791
|
}
|
|
1695
1792
|
);
|
|
1696
|
-
return /* @__PURE__ */
|
|
1793
|
+
return /* @__PURE__ */ import_react17.default.createElement(
|
|
1697
1794
|
FormControl_default,
|
|
1698
1795
|
{
|
|
1699
1796
|
required,
|
|
@@ -1704,9 +1801,9 @@ var Input = import_react16.default.forwardRef((props, ref) => {
|
|
|
1704
1801
|
sx,
|
|
1705
1802
|
className
|
|
1706
1803
|
},
|
|
1707
|
-
label && /* @__PURE__ */
|
|
1804
|
+
label && /* @__PURE__ */ import_react17.default.createElement(FormLabel_default, null, label),
|
|
1708
1805
|
input,
|
|
1709
|
-
helperText && /* @__PURE__ */
|
|
1806
|
+
helperText && /* @__PURE__ */ import_react17.default.createElement(FormHelperText_default, null, helperText)
|
|
1710
1807
|
);
|
|
1711
1808
|
});
|
|
1712
1809
|
Input.displayName = "Input";
|
|
@@ -1715,10 +1812,9 @@ Input.displayName = "Input";
|
|
|
1715
1812
|
var Input_default = Input;
|
|
1716
1813
|
|
|
1717
1814
|
// src/components/CurrencyInput/CurrencyInput.tsx
|
|
1718
|
-
var
|
|
1815
|
+
var import_joy24 = require("@mui/joy");
|
|
1719
1816
|
|
|
1720
1817
|
// src/components/CurrencyInput/hooks/use-currency-setting.ts
|
|
1721
|
-
var import_intl_messageformat = __toESM(require("intl-messageformat"));
|
|
1722
1818
|
var CURRENCY_DECIMAL_MAP = {
|
|
1723
1819
|
AED: 2,
|
|
1724
1820
|
ALL: 2,
|
|
@@ -1863,9 +1959,10 @@ var CURRENCY_DECIMAL_MAP = {
|
|
|
1863
1959
|
};
|
|
1864
1960
|
var useCurrencySetting = (props) => {
|
|
1865
1961
|
const { currency = "USD", placeholder } = props;
|
|
1866
|
-
const
|
|
1867
|
-
|
|
1868
|
-
|
|
1962
|
+
const parts = new Intl.NumberFormat("en-US", { style: "currency", currency }).formatToParts(1000.01);
|
|
1963
|
+
const symbol = parts.find((p) => p.type === "currency")?.value ?? "$";
|
|
1964
|
+
const thousandSeparator = parts.find((p) => p.type === "group")?.value ?? ",";
|
|
1965
|
+
const decimalSeparator = parts.find((p) => p.type === "decimal")?.value;
|
|
1869
1966
|
const decimalScale = CURRENCY_DECIMAL_MAP[currency];
|
|
1870
1967
|
return {
|
|
1871
1968
|
symbol: `${symbol} `,
|
|
@@ -1878,9 +1975,9 @@ var useCurrencySetting = (props) => {
|
|
|
1878
1975
|
};
|
|
1879
1976
|
|
|
1880
1977
|
// src/components/CurrencyInput/CurrencyInput.tsx
|
|
1881
|
-
var TextMaskAdapter =
|
|
1978
|
+
var TextMaskAdapter = import_react18.default.forwardRef(function TextMaskAdapter2(props, ref) {
|
|
1882
1979
|
const { onChange, ...innerProps } = props;
|
|
1883
|
-
return /* @__PURE__ */
|
|
1980
|
+
return /* @__PURE__ */ import_react18.default.createElement(
|
|
1884
1981
|
import_react_number_format.NumericFormat,
|
|
1885
1982
|
{
|
|
1886
1983
|
...innerProps,
|
|
@@ -1895,13 +1992,13 @@ var TextMaskAdapter = import_react17.default.forwardRef(function TextMaskAdapter
|
|
|
1895
1992
|
}
|
|
1896
1993
|
);
|
|
1897
1994
|
});
|
|
1898
|
-
var CurrencyInputRoot = (0,
|
|
1995
|
+
var CurrencyInputRoot = (0, import_joy24.styled)(Input_default, {
|
|
1899
1996
|
name: "CurrencyInput",
|
|
1900
1997
|
slot: "root",
|
|
1901
1998
|
overridesResolver: (props, styles) => styles.root
|
|
1902
1999
|
})({});
|
|
1903
|
-
var CurrencyInput =
|
|
1904
|
-
const props = (0,
|
|
2000
|
+
var CurrencyInput = import_react18.default.forwardRef(function CurrencyInput2(inProps, ref) {
|
|
2001
|
+
const props = (0, import_joy24.useThemeProps)({ props: inProps, name: "CurrencyInput" });
|
|
1905
2002
|
const {
|
|
1906
2003
|
currency = "USD",
|
|
1907
2004
|
name,
|
|
@@ -1921,28 +2018,28 @@ var CurrencyInput = import_react17.default.forwardRef(function CurrencyInput2(in
|
|
|
1921
2018
|
const [_value, setValue] = useControlledState(
|
|
1922
2019
|
props.value,
|
|
1923
2020
|
props.defaultValue,
|
|
1924
|
-
(0,
|
|
2021
|
+
(0, import_react18.useCallback)((value2) => onChange?.({ target: { name, value: value2 } }), [onChange, name])
|
|
1925
2022
|
);
|
|
1926
|
-
const value = (0,
|
|
2023
|
+
const value = (0, import_react18.useMemo)(() => {
|
|
1927
2024
|
if (_value && useMinorUnit) {
|
|
1928
2025
|
return _value / Math.pow(10, decimalScale);
|
|
1929
2026
|
}
|
|
1930
2027
|
return _value;
|
|
1931
2028
|
}, [_value, useMinorUnit, decimalScale]);
|
|
1932
|
-
const max = (0,
|
|
2029
|
+
const max = (0, import_react18.useMemo)(() => {
|
|
1933
2030
|
if (props.max && useMinorUnit) {
|
|
1934
2031
|
return props.max / Math.pow(10, decimalScale);
|
|
1935
2032
|
}
|
|
1936
2033
|
return props.max;
|
|
1937
2034
|
}, [props.max, useMinorUnit, decimalScale]);
|
|
1938
|
-
const [isOverLimit, setIsOverLimit] = (0,
|
|
1939
|
-
const handleChange = (0,
|
|
2035
|
+
const [isOverLimit, setIsOverLimit] = (0, import_react18.useState)(!!max && !!value && value > max);
|
|
2036
|
+
const handleChange = (0, import_react18.useCallback)(
|
|
1940
2037
|
(event) => {
|
|
1941
2038
|
if (event.target.value === "") {
|
|
1942
2039
|
setValue(void 0);
|
|
1943
2040
|
return;
|
|
1944
2041
|
}
|
|
1945
|
-
const amount = useMinorUnit ? Number(event.target.value?.replace(decimalSeparator, "")) : Number(event.target.value);
|
|
2042
|
+
const amount = useMinorUnit ? Number(decimalSeparator ? event.target.value?.replace(decimalSeparator, "") : event.target.value) : Number(event.target.value);
|
|
1946
2043
|
if (!!max && Number(event.target.value) > max) {
|
|
1947
2044
|
setIsOverLimit(true);
|
|
1948
2045
|
} else {
|
|
@@ -1952,7 +2049,7 @@ var CurrencyInput = import_react17.default.forwardRef(function CurrencyInput2(in
|
|
|
1952
2049
|
},
|
|
1953
2050
|
[decimalSeparator, max, useMinorUnit, setValue]
|
|
1954
2051
|
);
|
|
1955
|
-
return /* @__PURE__ */
|
|
2052
|
+
return /* @__PURE__ */ import_react18.default.createElement(
|
|
1956
2053
|
CurrencyInputRoot,
|
|
1957
2054
|
{
|
|
1958
2055
|
...innerProps,
|
|
@@ -1965,9 +2062,7 @@ var CurrencyInput = import_react17.default.forwardRef(function CurrencyInput2(in
|
|
|
1965
2062
|
required,
|
|
1966
2063
|
color: error || isOverLimit ? "danger" : props.color,
|
|
1967
2064
|
label,
|
|
1968
|
-
helperText: isOverLimit ?
|
|
1969
|
-
amount: max
|
|
1970
|
-
}) : helperText,
|
|
2065
|
+
helperText: isOverLimit ? `limit: ${new Intl.NumberFormat("en-US", { style: "currency", currency }).format(max)}` : helperText,
|
|
1971
2066
|
slotProps: {
|
|
1972
2067
|
input: {
|
|
1973
2068
|
component: TextMaskAdapter,
|
|
@@ -2114,19 +2209,29 @@ function getTextAlign(props) {
|
|
|
2114
2209
|
var numberFormatter = (value) => "Intl" in window ? new Intl.NumberFormat().format(value) : value;
|
|
2115
2210
|
|
|
2116
2211
|
// src/components/DataTable/styled.tsx
|
|
2117
|
-
var
|
|
2118
|
-
var
|
|
2119
|
-
var
|
|
2212
|
+
var import_react19 = __toESM(require("react"));
|
|
2213
|
+
var import_joy25 = require("@mui/joy");
|
|
2214
|
+
var import_framer_motion17 = require("framer-motion");
|
|
2120
2215
|
var import_ArrowUpwardRounded = __toESM(require("@mui/icons-material/ArrowUpwardRounded"));
|
|
2121
|
-
var EllipsisDiv = (0,
|
|
2216
|
+
var EllipsisDiv = (0, import_joy25.styled)("div", {
|
|
2122
2217
|
name: "DataTable",
|
|
2123
|
-
slot: "textEllipsis"
|
|
2124
|
-
|
|
2125
|
-
|
|
2126
|
-
|
|
2127
|
-
|
|
2128
|
-
|
|
2129
|
-
|
|
2218
|
+
slot: "textEllipsis",
|
|
2219
|
+
shouldForwardProp: (prop) => prop !== "lineClamp"
|
|
2220
|
+
})(
|
|
2221
|
+
({ lineClamp }) => lineClamp && lineClamp > 1 ? {
|
|
2222
|
+
overflow: "hidden",
|
|
2223
|
+
display: "-webkit-box !important",
|
|
2224
|
+
WebkitBoxOrient: "vertical",
|
|
2225
|
+
WebkitLineClamp: lineClamp,
|
|
2226
|
+
whiteSpace: "normal",
|
|
2227
|
+
overflowWrap: "anywhere"
|
|
2228
|
+
} : {
|
|
2229
|
+
overflow: "hidden",
|
|
2230
|
+
textOverflow: "ellipsis",
|
|
2231
|
+
whiteSpace: "nowrap"
|
|
2232
|
+
}
|
|
2233
|
+
);
|
|
2234
|
+
var OverlayWrapper = (0, import_joy25.styled)("tr", {
|
|
2130
2235
|
name: "DataTable",
|
|
2131
2236
|
slot: "overlayWrapper"
|
|
2132
2237
|
})({
|
|
@@ -2141,7 +2246,7 @@ var OverlayWrapper = (0, import_joy24.styled)("tr", {
|
|
|
2141
2246
|
border: "none !important"
|
|
2142
2247
|
}
|
|
2143
2248
|
});
|
|
2144
|
-
var VirtualizedTableBody = (0,
|
|
2249
|
+
var VirtualizedTableBody = (0, import_joy25.styled)("tbody", {
|
|
2145
2250
|
name: "DataTable",
|
|
2146
2251
|
slot: "tableBody"
|
|
2147
2252
|
})({
|
|
@@ -2150,21 +2255,21 @@ var VirtualizedTableBody = (0, import_joy24.styled)("tbody", {
|
|
|
2150
2255
|
display: "block",
|
|
2151
2256
|
height: "0.01em"
|
|
2152
2257
|
},
|
|
2153
|
-
[`& .${
|
|
2258
|
+
[`& .${import_joy25.buttonClasses.root}`]: {
|
|
2154
2259
|
"--Button-minHeight": "26px",
|
|
2155
2260
|
"--Button-paddingBlock": "0.25rem",
|
|
2156
2261
|
lineHeight: 1,
|
|
2157
2262
|
marginTop: "-2px",
|
|
2158
2263
|
marginBottom: "-2px"
|
|
2159
2264
|
},
|
|
2160
|
-
[`& .${
|
|
2265
|
+
[`& .${import_joy25.iconButtonClasses.root}`]: {
|
|
2161
2266
|
"--IconButton-size": "26px",
|
|
2162
2267
|
verticalAlign: "middle",
|
|
2163
2268
|
marginTop: "-2px",
|
|
2164
2269
|
marginBottom: "-2px"
|
|
2165
2270
|
}
|
|
2166
2271
|
});
|
|
2167
|
-
var StyledTableRow = (0,
|
|
2272
|
+
var StyledTableRow = (0, import_joy25.styled)("tr", {
|
|
2168
2273
|
name: "DataTable",
|
|
2169
2274
|
slot: "tableRow",
|
|
2170
2275
|
shouldForwardProp: (prop) => prop !== "striped"
|
|
@@ -2183,17 +2288,17 @@ var StyledTableRow = (0, import_joy24.styled)("tr", {
|
|
|
2183
2288
|
}
|
|
2184
2289
|
}
|
|
2185
2290
|
}));
|
|
2186
|
-
var Asterisk = (0,
|
|
2291
|
+
var Asterisk = (0, import_joy25.styled)("span", {
|
|
2187
2292
|
name: "DataTable",
|
|
2188
2293
|
slot: "headCellAsterisk"
|
|
2189
2294
|
})(({ theme }) => ({
|
|
2190
2295
|
color: "var(--ceed-palette-danger-500)",
|
|
2191
2296
|
marginLeft: theme.spacing(0.5)
|
|
2192
2297
|
}));
|
|
2193
|
-
var StyledTh = (0,
|
|
2298
|
+
var StyledTh = (0, import_joy25.styled)(import_framer_motion17.motion.th)(({ theme }) => ({
|
|
2194
2299
|
boxShadow: "1px 0 var(--TableCell-borderColor)"
|
|
2195
2300
|
}));
|
|
2196
|
-
var StyledTd = (0,
|
|
2301
|
+
var StyledTd = (0, import_joy25.styled)("td")(({ theme }) => ({
|
|
2197
2302
|
transition: `box-shadow 0.3s`,
|
|
2198
2303
|
"&:not(.is-last-left):not(.is-last-right)": {
|
|
2199
2304
|
boxShadow: "1px 0 var(--TableCell-borderColor)"
|
|
@@ -2209,9 +2314,9 @@ var StyledTd = (0, import_joy24.styled)("td")(({ theme }) => ({
|
|
|
2209
2314
|
}
|
|
2210
2315
|
}
|
|
2211
2316
|
}));
|
|
2212
|
-
var MotionSortIcon = (0,
|
|
2213
|
-
var DefaultLoadingOverlay = () => /* @__PURE__ */
|
|
2214
|
-
var Resizer = (ref, targetRef = ref) => /* @__PURE__ */
|
|
2317
|
+
var MotionSortIcon = (0, import_framer_motion17.motion)(import_ArrowUpwardRounded.default);
|
|
2318
|
+
var DefaultLoadingOverlay = () => /* @__PURE__ */ import_react19.default.createElement(import_joy25.LinearProgress, { value: 8, variant: "plain" });
|
|
2319
|
+
var Resizer = (ref, targetRef = ref) => /* @__PURE__ */ import_react19.default.createElement(
|
|
2215
2320
|
Box_default,
|
|
2216
2321
|
{
|
|
2217
2322
|
sx: {
|
|
@@ -2248,24 +2353,24 @@ var import_joy32 = require("@mui/joy");
|
|
|
2248
2353
|
var import_framer_motion21 = require("framer-motion");
|
|
2249
2354
|
|
|
2250
2355
|
// src/components/DatePicker/DatePicker.tsx
|
|
2251
|
-
var
|
|
2356
|
+
var import_react20 = __toESM(require("react"));
|
|
2252
2357
|
var import_react_imask = require("react-imask");
|
|
2253
2358
|
var import_CalendarToday = __toESM(require("@mui/icons-material/CalendarToday"));
|
|
2254
|
-
var
|
|
2359
|
+
var import_joy28 = require("@mui/joy");
|
|
2255
2360
|
var import_base3 = require("@mui/base");
|
|
2256
2361
|
|
|
2257
2362
|
// src/components/Sheet/Sheet.tsx
|
|
2258
|
-
var
|
|
2259
|
-
var Sheet =
|
|
2363
|
+
var import_joy26 = require("@mui/joy");
|
|
2364
|
+
var Sheet = import_joy26.Sheet;
|
|
2260
2365
|
|
|
2261
2366
|
// src/components/Sheet/index.ts
|
|
2262
2367
|
var Sheet_default = Sheet;
|
|
2263
2368
|
|
|
2264
2369
|
// src/components/DialogActions/DialogActions.tsx
|
|
2265
|
-
var
|
|
2266
|
-
var
|
|
2267
|
-
var MotionDialogActions = (0,
|
|
2268
|
-
var StyledDialogActions = (0,
|
|
2370
|
+
var import_joy27 = require("@mui/joy");
|
|
2371
|
+
var import_framer_motion18 = require("framer-motion");
|
|
2372
|
+
var MotionDialogActions = (0, import_framer_motion18.motion)(import_joy27.DialogActions);
|
|
2373
|
+
var StyledDialogActions = (0, import_joy27.styled)(MotionDialogActions)(({ theme }) => ({
|
|
2269
2374
|
padding: theme.spacing(2),
|
|
2270
2375
|
gap: theme.spacing(2),
|
|
2271
2376
|
flexDirection: "row",
|
|
@@ -2278,7 +2383,7 @@ DialogActions.displayName = "DialogActions";
|
|
|
2278
2383
|
var DialogActions_default = DialogActions;
|
|
2279
2384
|
|
|
2280
2385
|
// src/components/DatePicker/DatePicker.tsx
|
|
2281
|
-
var CalendarButton = (0,
|
|
2386
|
+
var CalendarButton = (0, import_joy28.styled)(IconButton_default, {
|
|
2282
2387
|
name: "DatePicker",
|
|
2283
2388
|
slot: "calendarButton"
|
|
2284
2389
|
})(({ theme }) => ({
|
|
@@ -2288,13 +2393,13 @@ var CalendarButton = (0, import_joy27.styled)(IconButton_default, {
|
|
|
2288
2393
|
outline: `${theme.getCssVar("focus-thickness")} solid ${theme.getCssVar("palette-focusVisible")}`
|
|
2289
2394
|
}
|
|
2290
2395
|
}));
|
|
2291
|
-
var StyledPopper = (0,
|
|
2396
|
+
var StyledPopper = (0, import_joy28.styled)(import_base3.Popper, {
|
|
2292
2397
|
name: "DatePicker",
|
|
2293
2398
|
slot: "popper"
|
|
2294
2399
|
})(({ theme }) => ({
|
|
2295
2400
|
zIndex: theme.zIndex.tooltip
|
|
2296
2401
|
}));
|
|
2297
|
-
var CalendarSheet = (0,
|
|
2402
|
+
var CalendarSheet = (0, import_joy28.styled)(Sheet_default, {
|
|
2298
2403
|
name: "DatePicker",
|
|
2299
2404
|
slot: "sheet",
|
|
2300
2405
|
overridesResolver: (props, styles) => styles.root
|
|
@@ -2303,7 +2408,7 @@ var CalendarSheet = (0, import_joy27.styled)(Sheet_default, {
|
|
|
2303
2408
|
boxShadow: theme.shadow.md,
|
|
2304
2409
|
borderRadius: theme.radius.md
|
|
2305
2410
|
}));
|
|
2306
|
-
var DatePickerRoot = (0,
|
|
2411
|
+
var DatePickerRoot = (0, import_joy28.styled)("div", {
|
|
2307
2412
|
name: "DatePicker",
|
|
2308
2413
|
slot: "root",
|
|
2309
2414
|
overridesResolver: (props, styles) => styles.root
|
|
@@ -2360,9 +2465,9 @@ function parseDate(dateString, format) {
|
|
|
2360
2465
|
var formatToPattern = (format) => {
|
|
2361
2466
|
return format.replace(/YYYY/g, "Y").replace(/MM/g, "M").replace(/DD/g, "D").replace(/[^YMD\s]/g, (match) => `${match}\``);
|
|
2362
2467
|
};
|
|
2363
|
-
var TextMaskAdapter3 =
|
|
2468
|
+
var TextMaskAdapter3 = import_react20.default.forwardRef(function TextMaskAdapter4(props, ref) {
|
|
2364
2469
|
const { onChange, format, ...other } = props;
|
|
2365
|
-
return /* @__PURE__ */
|
|
2470
|
+
return /* @__PURE__ */ import_react20.default.createElement(
|
|
2366
2471
|
import_react_imask.IMaskInput,
|
|
2367
2472
|
{
|
|
2368
2473
|
...other,
|
|
@@ -2397,8 +2502,8 @@ var TextMaskAdapter3 = import_react19.default.forwardRef(function TextMaskAdapte
|
|
|
2397
2502
|
}
|
|
2398
2503
|
);
|
|
2399
2504
|
});
|
|
2400
|
-
var DatePicker = (0,
|
|
2401
|
-
const props = (0,
|
|
2505
|
+
var DatePicker = (0, import_react20.forwardRef)((inProps, ref) => {
|
|
2506
|
+
const props = (0, import_joy28.useThemeProps)({ props: inProps, name: "DatePicker" });
|
|
2402
2507
|
const {
|
|
2403
2508
|
onChange,
|
|
2404
2509
|
disabled,
|
|
@@ -2422,24 +2527,24 @@ var DatePicker = (0, import_react19.forwardRef)((inProps, ref) => {
|
|
|
2422
2527
|
shouldDisableDate,
|
|
2423
2528
|
...innerProps
|
|
2424
2529
|
} = props;
|
|
2425
|
-
const innerRef = (0,
|
|
2426
|
-
const buttonRef = (0,
|
|
2530
|
+
const innerRef = (0, import_react20.useRef)(null);
|
|
2531
|
+
const buttonRef = (0, import_react20.useRef)(null);
|
|
2427
2532
|
const [value, setValue] = useControlledState(
|
|
2428
2533
|
props.value,
|
|
2429
2534
|
props.defaultValue || "",
|
|
2430
|
-
(0,
|
|
2535
|
+
(0, import_react20.useCallback)((value2) => onChange?.({ target: { name: props.name, value: value2 } }), [props.name, onChange])
|
|
2431
2536
|
);
|
|
2432
|
-
const [displayValue, setDisplayValue] = (0,
|
|
2537
|
+
const [displayValue, setDisplayValue] = (0, import_react20.useState)(
|
|
2433
2538
|
() => value ? formatValueString(parseDate(value, format), displayFormat) : ""
|
|
2434
2539
|
);
|
|
2435
|
-
const [anchorEl, setAnchorEl] = (0,
|
|
2540
|
+
const [anchorEl, setAnchorEl] = (0, import_react20.useState)(null);
|
|
2436
2541
|
const open = Boolean(anchorEl);
|
|
2437
|
-
(0,
|
|
2542
|
+
(0, import_react20.useEffect)(() => {
|
|
2438
2543
|
if (!anchorEl) {
|
|
2439
2544
|
innerRef.current?.blur();
|
|
2440
2545
|
}
|
|
2441
2546
|
}, [anchorEl, innerRef]);
|
|
2442
|
-
(0,
|
|
2547
|
+
(0, import_react20.useEffect)(() => {
|
|
2443
2548
|
if (value === "") {
|
|
2444
2549
|
setDisplayValue("");
|
|
2445
2550
|
return;
|
|
@@ -2449,8 +2554,8 @@ var DatePicker = (0, import_react19.forwardRef)((inProps, ref) => {
|
|
|
2449
2554
|
setDisplayValue(formattedValue);
|
|
2450
2555
|
}
|
|
2451
2556
|
}, [displayFormat, displayValue, format, value]);
|
|
2452
|
-
(0,
|
|
2453
|
-
const handleChange = (0,
|
|
2557
|
+
(0, import_react20.useImperativeHandle)(ref, () => innerRef.current, [innerRef]);
|
|
2558
|
+
const handleChange = (0, import_react20.useCallback)(
|
|
2454
2559
|
(event) => {
|
|
2455
2560
|
const value2 = event.target.value;
|
|
2456
2561
|
setDisplayValue(value2 ? formatValueString(parseDate(value2, format), displayFormat) : value2);
|
|
@@ -2458,7 +2563,7 @@ var DatePicker = (0, import_react19.forwardRef)((inProps, ref) => {
|
|
|
2458
2563
|
},
|
|
2459
2564
|
[displayFormat, format, setValue]
|
|
2460
2565
|
);
|
|
2461
|
-
const handleDisplayInputChange = (0,
|
|
2566
|
+
const handleDisplayInputChange = (0, import_react20.useCallback)(
|
|
2462
2567
|
(event) => {
|
|
2463
2568
|
if (event.target.value === "") {
|
|
2464
2569
|
handleChange({
|
|
@@ -2483,7 +2588,7 @@ var DatePicker = (0, import_react19.forwardRef)((inProps, ref) => {
|
|
|
2483
2588
|
},
|
|
2484
2589
|
[displayFormat, format, handleChange, props.name]
|
|
2485
2590
|
);
|
|
2486
|
-
const handleCalendarToggle = (0,
|
|
2591
|
+
const handleCalendarToggle = (0, import_react20.useCallback)(
|
|
2487
2592
|
(event) => {
|
|
2488
2593
|
setAnchorEl(anchorEl ? null : event.currentTarget);
|
|
2489
2594
|
setTimeout(() => {
|
|
@@ -2492,7 +2597,7 @@ var DatePicker = (0, import_react19.forwardRef)((inProps, ref) => {
|
|
|
2492
2597
|
},
|
|
2493
2598
|
[anchorEl, setAnchorEl, innerRef]
|
|
2494
2599
|
);
|
|
2495
|
-
const handleInputMouseDown = (0,
|
|
2600
|
+
const handleInputMouseDown = (0, import_react20.useCallback)(
|
|
2496
2601
|
(event) => {
|
|
2497
2602
|
if (inputReadOnly) {
|
|
2498
2603
|
event.preventDefault();
|
|
@@ -2501,7 +2606,7 @@ var DatePicker = (0, import_react19.forwardRef)((inProps, ref) => {
|
|
|
2501
2606
|
},
|
|
2502
2607
|
[inputReadOnly, buttonRef]
|
|
2503
2608
|
);
|
|
2504
|
-
return /* @__PURE__ */
|
|
2609
|
+
return /* @__PURE__ */ import_react20.default.createElement(DatePickerRoot, null, /* @__PURE__ */ import_react20.default.createElement(import_base3.FocusTrap, { open: true }, /* @__PURE__ */ import_react20.default.createElement(import_react20.default.Fragment, null, /* @__PURE__ */ import_react20.default.createElement(
|
|
2505
2610
|
Input_default,
|
|
2506
2611
|
{
|
|
2507
2612
|
...innerProps,
|
|
@@ -2529,7 +2634,7 @@ var DatePicker = (0, import_react19.forwardRef)((inProps, ref) => {
|
|
|
2529
2634
|
},
|
|
2530
2635
|
className,
|
|
2531
2636
|
sx,
|
|
2532
|
-
endDecorator: /* @__PURE__ */
|
|
2637
|
+
endDecorator: /* @__PURE__ */ import_react20.default.createElement(
|
|
2533
2638
|
CalendarButton,
|
|
2534
2639
|
{
|
|
2535
2640
|
ref: buttonRef,
|
|
@@ -2541,13 +2646,13 @@ var DatePicker = (0, import_react19.forwardRef)((inProps, ref) => {
|
|
|
2541
2646
|
"aria-expanded": open,
|
|
2542
2647
|
disabled
|
|
2543
2648
|
},
|
|
2544
|
-
/* @__PURE__ */
|
|
2649
|
+
/* @__PURE__ */ import_react20.default.createElement(import_CalendarToday.default, null)
|
|
2545
2650
|
),
|
|
2546
2651
|
label,
|
|
2547
2652
|
helperText,
|
|
2548
2653
|
readOnly: readOnly || inputReadOnly
|
|
2549
2654
|
}
|
|
2550
|
-
), open && /* @__PURE__ */
|
|
2655
|
+
), open && /* @__PURE__ */ import_react20.default.createElement(import_base3.ClickAwayListener, { onClickAway: () => setAnchorEl(null) }, /* @__PURE__ */ import_react20.default.createElement(
|
|
2551
2656
|
StyledPopper,
|
|
2552
2657
|
{
|
|
2553
2658
|
id: "date-picker-popper",
|
|
@@ -2566,7 +2671,7 @@ var DatePicker = (0, import_react19.forwardRef)((inProps, ref) => {
|
|
|
2566
2671
|
"aria-label": "Calendar Tooltip",
|
|
2567
2672
|
"aria-expanded": open
|
|
2568
2673
|
},
|
|
2569
|
-
/* @__PURE__ */
|
|
2674
|
+
/* @__PURE__ */ import_react20.default.createElement(CalendarSheet, { tabIndex: -1, role: "presentation" }, /* @__PURE__ */ import_react20.default.createElement(
|
|
2570
2675
|
Calendar_default,
|
|
2571
2676
|
{
|
|
2572
2677
|
value: value && !Number.isNaN(parseDate(value, format).getTime()) ? [parseDate(value, format), void 0] : void 0,
|
|
@@ -2585,14 +2690,14 @@ var DatePicker = (0, import_react19.forwardRef)((inProps, ref) => {
|
|
|
2585
2690
|
disablePast,
|
|
2586
2691
|
shouldDisableDate: shouldDisableDate ? (date) => shouldDisableDate(formatValueString(date, format)) : void 0
|
|
2587
2692
|
}
|
|
2588
|
-
), !hideClearButton && /* @__PURE__ */
|
|
2693
|
+
), !hideClearButton && /* @__PURE__ */ import_react20.default.createElement(
|
|
2589
2694
|
DialogActions_default,
|
|
2590
2695
|
{
|
|
2591
2696
|
sx: {
|
|
2592
2697
|
p: 1
|
|
2593
2698
|
}
|
|
2594
2699
|
},
|
|
2595
|
-
/* @__PURE__ */
|
|
2700
|
+
/* @__PURE__ */ import_react20.default.createElement(
|
|
2596
2701
|
Button_default,
|
|
2597
2702
|
{
|
|
2598
2703
|
size,
|
|
@@ -2618,10 +2723,10 @@ var DatePicker = (0, import_react19.forwardRef)((inProps, ref) => {
|
|
|
2618
2723
|
var DatePicker_default = DatePicker;
|
|
2619
2724
|
|
|
2620
2725
|
// src/components/Textarea/Textarea.tsx
|
|
2621
|
-
var
|
|
2622
|
-
var
|
|
2623
|
-
var
|
|
2624
|
-
var MotionTextarea = (0,
|
|
2726
|
+
var import_react21 = __toESM(require("react"));
|
|
2727
|
+
var import_joy29 = require("@mui/joy");
|
|
2728
|
+
var import_framer_motion19 = require("framer-motion");
|
|
2729
|
+
var MotionTextarea = (0, import_framer_motion19.motion)(import_joy29.Textarea);
|
|
2625
2730
|
var Textarea = (props) => {
|
|
2626
2731
|
const {
|
|
2627
2732
|
label,
|
|
@@ -2638,7 +2743,7 @@ var Textarea = (props) => {
|
|
|
2638
2743
|
className,
|
|
2639
2744
|
...innerProps
|
|
2640
2745
|
} = props;
|
|
2641
|
-
const textarea = /* @__PURE__ */
|
|
2746
|
+
const textarea = /* @__PURE__ */ import_react21.default.createElement(
|
|
2642
2747
|
MotionTextarea,
|
|
2643
2748
|
{
|
|
2644
2749
|
required,
|
|
@@ -2650,7 +2755,7 @@ var Textarea = (props) => {
|
|
|
2650
2755
|
...innerProps
|
|
2651
2756
|
}
|
|
2652
2757
|
);
|
|
2653
|
-
return /* @__PURE__ */
|
|
2758
|
+
return /* @__PURE__ */ import_react21.default.createElement(
|
|
2654
2759
|
FormControl_default,
|
|
2655
2760
|
{
|
|
2656
2761
|
required,
|
|
@@ -2661,9 +2766,9 @@ var Textarea = (props) => {
|
|
|
2661
2766
|
sx,
|
|
2662
2767
|
className
|
|
2663
2768
|
},
|
|
2664
|
-
label && /* @__PURE__ */
|
|
2769
|
+
label && /* @__PURE__ */ import_react21.default.createElement(FormLabel_default, null, label),
|
|
2665
2770
|
textarea,
|
|
2666
|
-
helperText && /* @__PURE__ */
|
|
2771
|
+
helperText && /* @__PURE__ */ import_react21.default.createElement(FormHelperText_default, null, helperText)
|
|
2667
2772
|
);
|
|
2668
2773
|
};
|
|
2669
2774
|
Textarea.displayName = "Textarea";
|
|
@@ -2672,10 +2777,10 @@ Textarea.displayName = "Textarea";
|
|
|
2672
2777
|
var Textarea_default = Textarea;
|
|
2673
2778
|
|
|
2674
2779
|
// src/components/Select/Select.tsx
|
|
2675
|
-
var
|
|
2676
|
-
var
|
|
2677
|
-
var
|
|
2678
|
-
var MotionOption = (0,
|
|
2780
|
+
var import_react22 = __toESM(require("react"));
|
|
2781
|
+
var import_joy30 = require("@mui/joy");
|
|
2782
|
+
var import_framer_motion20 = require("framer-motion");
|
|
2783
|
+
var MotionOption = (0, import_framer_motion20.motion)(import_joy30.Option);
|
|
2679
2784
|
var Option = MotionOption;
|
|
2680
2785
|
var secondaryTextLevelMap2 = {
|
|
2681
2786
|
sm: "body-xs",
|
|
@@ -2698,7 +2803,7 @@ function Select(props) {
|
|
|
2698
2803
|
className,
|
|
2699
2804
|
...innerProps
|
|
2700
2805
|
} = props;
|
|
2701
|
-
const options = (0,
|
|
2806
|
+
const options = (0, import_react22.useMemo)(
|
|
2702
2807
|
() => props.options.map((option) => {
|
|
2703
2808
|
if (option.hasOwnProperty("value") && option.hasOwnProperty("label")) {
|
|
2704
2809
|
return option;
|
|
@@ -2723,15 +2828,15 @@ function Select(props) {
|
|
|
2723
2828
|
};
|
|
2724
2829
|
onChange?.(newEvent, newValue);
|
|
2725
2830
|
};
|
|
2726
|
-
const optionMap = (0,
|
|
2831
|
+
const optionMap = (0, import_react22.useMemo)(() => {
|
|
2727
2832
|
const map = /* @__PURE__ */ new Map();
|
|
2728
2833
|
options.forEach((option) => {
|
|
2729
2834
|
map.set(option.value, option);
|
|
2730
2835
|
});
|
|
2731
2836
|
return map;
|
|
2732
2837
|
}, [options]);
|
|
2733
|
-
const select = /* @__PURE__ */
|
|
2734
|
-
|
|
2838
|
+
const select = /* @__PURE__ */ import_react22.default.createElement(
|
|
2839
|
+
import_joy30.Select,
|
|
2735
2840
|
{
|
|
2736
2841
|
...innerProps,
|
|
2737
2842
|
required,
|
|
@@ -2747,9 +2852,9 @@ function Select(props) {
|
|
|
2747
2852
|
return optionMap.get(selected.value)?.label;
|
|
2748
2853
|
}
|
|
2749
2854
|
},
|
|
2750
|
-
options.map((option) => /* @__PURE__ */
|
|
2855
|
+
options.map((option) => /* @__PURE__ */ import_react22.default.createElement(Option, { key: option.value, value: option.value, disabled: option.disabled }, option.secondaryText ? /* @__PURE__ */ import_react22.default.createElement(import_joy30.ListItemContent, { sx: { gap: 0.5 } }, /* @__PURE__ */ import_react22.default.createElement(import_joy30.Typography, { level: "inherit" }, option.label), /* @__PURE__ */ import_react22.default.createElement(import_joy30.Typography, { level: secondaryTextLevelMap2[size ?? "md"], textColor: "text.tertiary" }, option.secondaryText)) : option.label))
|
|
2751
2856
|
);
|
|
2752
|
-
return /* @__PURE__ */
|
|
2857
|
+
return /* @__PURE__ */ import_react22.default.createElement(
|
|
2753
2858
|
FormControl_default,
|
|
2754
2859
|
{
|
|
2755
2860
|
required,
|
|
@@ -2760,9 +2865,9 @@ function Select(props) {
|
|
|
2760
2865
|
sx,
|
|
2761
2866
|
className
|
|
2762
2867
|
},
|
|
2763
|
-
label && /* @__PURE__ */
|
|
2868
|
+
label && /* @__PURE__ */ import_react22.default.createElement(FormLabel_default, null, label),
|
|
2764
2869
|
select,
|
|
2765
|
-
helperText && /* @__PURE__ */
|
|
2870
|
+
helperText && /* @__PURE__ */ import_react22.default.createElement(FormHelperText_default, null, helperText)
|
|
2766
2871
|
);
|
|
2767
2872
|
}
|
|
2768
2873
|
Select.displayName = "Select";
|
|
@@ -2773,19 +2878,6 @@ var Select_default = Select;
|
|
|
2773
2878
|
// src/components/DataTable/components.tsx
|
|
2774
2879
|
var import_joy33 = require("@mui/joy");
|
|
2775
2880
|
|
|
2776
|
-
// src/components/Tooltip/Tooltip.tsx
|
|
2777
|
-
var import_react22 = __toESM(require("react"));
|
|
2778
|
-
var import_joy30 = require("@mui/joy");
|
|
2779
|
-
var import_framer_motion20 = require("framer-motion");
|
|
2780
|
-
var MotionTooltip = (0, import_framer_motion20.motion)(import_joy30.Tooltip);
|
|
2781
|
-
var Tooltip = (props) => {
|
|
2782
|
-
return /* @__PURE__ */ import_react22.default.createElement(MotionTooltip, { ...props });
|
|
2783
|
-
};
|
|
2784
|
-
Tooltip.displayName = "Tooltip";
|
|
2785
|
-
|
|
2786
|
-
// src/components/Tooltip/index.ts
|
|
2787
|
-
var Tooltip_default = Tooltip;
|
|
2788
|
-
|
|
2789
2881
|
// src/components/InfoSign/InfoSign.tsx
|
|
2790
2882
|
var import_react23 = __toESM(require("react"));
|
|
2791
2883
|
var import_joy31 = require("@mui/joy");
|
|
@@ -2820,21 +2912,22 @@ function InfoSign(props) {
|
|
|
2820
2912
|
var InfoSign_default = InfoSign;
|
|
2821
2913
|
|
|
2822
2914
|
// src/components/DataTable/components.tsx
|
|
2823
|
-
var TextEllipsis = ({ children }) => {
|
|
2915
|
+
var TextEllipsis = ({ children, lineClamp }) => {
|
|
2824
2916
|
const textRef = (0, import_react24.useRef)(null);
|
|
2825
2917
|
const [showTooltip, setShowTooltip] = (0, import_react24.useState)(false);
|
|
2826
2918
|
(0, import_react24.useLayoutEffect)(() => {
|
|
2827
2919
|
const element = textRef.current;
|
|
2828
|
-
if (element)
|
|
2829
|
-
|
|
2830
|
-
|
|
2831
|
-
|
|
2832
|
-
|
|
2833
|
-
|
|
2834
|
-
|
|
2835
|
-
|
|
2836
|
-
|
|
2837
|
-
|
|
2920
|
+
if (!element) return;
|
|
2921
|
+
const checkTruncation = () => {
|
|
2922
|
+
const isTruncated = lineClamp && lineClamp > 1 ? element.scrollHeight > element.clientHeight + 1 : element.scrollWidth > element.clientWidth;
|
|
2923
|
+
setShowTooltip(isTruncated);
|
|
2924
|
+
};
|
|
2925
|
+
checkTruncation();
|
|
2926
|
+
const ro = new ResizeObserver(checkTruncation);
|
|
2927
|
+
ro.observe(element);
|
|
2928
|
+
return () => ro.disconnect();
|
|
2929
|
+
}, [children, lineClamp]);
|
|
2930
|
+
return /* @__PURE__ */ import_react24.default.createElement(Tooltip_default, { title: showTooltip ? children : "", placement: "top", onClick: (e) => e.stopPropagation() }, /* @__PURE__ */ import_react24.default.createElement(EllipsisDiv, { ref: textRef, lineClamp }, children));
|
|
2838
2931
|
};
|
|
2839
2932
|
var CellTextEllipsis = ({ children }) => {
|
|
2840
2933
|
const textRef = (0, import_react24.useRef)(null);
|
|
@@ -2885,7 +2978,8 @@ var HeadCell = (props) => {
|
|
|
2885
2978
|
pinnedEndPosition,
|
|
2886
2979
|
headerRef,
|
|
2887
2980
|
tableColRef,
|
|
2888
|
-
headerClassName
|
|
2981
|
+
headerClassName,
|
|
2982
|
+
headerLineClamp
|
|
2889
2983
|
} = props;
|
|
2890
2984
|
const theme = (0, import_joy32.useTheme)();
|
|
2891
2985
|
const ref = headerRef;
|
|
@@ -2979,7 +3073,7 @@ var HeadCell = (props) => {
|
|
|
2979
3073
|
initial: "initial",
|
|
2980
3074
|
className: computedHeaderClassName
|
|
2981
3075
|
},
|
|
2982
|
-
/* @__PURE__ */ import_react24.default.createElement(Stack_default, { gap: 1, direction: "row", justifyContent: textAlign, alignItems: "center" }, textAlign === "end" && sortIcon, textAlign === "end" && infoSign, /* @__PURE__ */ import_react24.default.createElement(TextEllipsis,
|
|
3076
|
+
/* @__PURE__ */ import_react24.default.createElement(Stack_default, { gap: 1, direction: "row", justifyContent: textAlign, alignItems: "center", sx: { minWidth: 0 } }, textAlign === "end" && sortIcon, textAlign === "end" && infoSign, /* @__PURE__ */ import_react24.default.createElement(TextEllipsis, { lineClamp: headerLineClamp }, headerName ?? field, editMode && required && /* @__PURE__ */ import_react24.default.createElement(Asterisk, null, "*")), textAlign === "start" && infoSign, textAlign === "start" && sortIcon),
|
|
2983
3077
|
resizer
|
|
2984
3078
|
);
|
|
2985
3079
|
};
|