@ceed/ads 0.0.41-2 → 0.0.41-3
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/FormControl/FormControl.d.ts +1 -1
- package/dist/components/Modal/Modal.d.ts +1 -1
- package/dist/components/Radio/Radio.d.ts +1 -1
- package/dist/components/Stack/Stack.d.ts +1 -1
- package/dist/components/index.d.ts +1 -0
- package/dist/index.d.ts +1 -1
- package/dist/index.js +781 -159
- package/framer/index.js +14600 -6831
- package/package.json +2 -2
package/dist/index.js
CHANGED
|
@@ -170,13 +170,657 @@ Button.displayName = "Button";
|
|
|
170
170
|
// src/components/Button/index.ts
|
|
171
171
|
var Button_default = Button;
|
|
172
172
|
|
|
173
|
-
// src/components/
|
|
173
|
+
// src/components/Calendar/Calendar.tsx
|
|
174
|
+
import React6, { Fragment, forwardRef as forwardRef2, useMemo as useMemo2 } from "react";
|
|
175
|
+
import { styled } from "@mui/joy/styles";
|
|
176
|
+
import ChevronLeftIcon from "@mui/icons-material/ChevronLeft";
|
|
177
|
+
import ChevronRightIcon from "@mui/icons-material/ChevronRight";
|
|
178
|
+
import { AnimatePresence, motion as motion6 } from "framer-motion";
|
|
179
|
+
|
|
180
|
+
// src/components/Typography/Typography.tsx
|
|
174
181
|
import React3 from "react";
|
|
175
|
-
import {
|
|
182
|
+
import { Typography as JoyTypography } from "@mui/joy";
|
|
176
183
|
import { motion as motion4 } from "framer-motion";
|
|
177
|
-
var
|
|
184
|
+
var MotionTypography = motion4(JoyTypography);
|
|
185
|
+
var Typography = (props) => {
|
|
186
|
+
return /* @__PURE__ */ React3.createElement(MotionTypography, { ...props });
|
|
187
|
+
};
|
|
188
|
+
Typography.displayName = "Typography";
|
|
189
|
+
|
|
190
|
+
// src/components/Typography/index.ts
|
|
191
|
+
var Typography_default = Typography;
|
|
192
|
+
|
|
193
|
+
// src/components/Calendar/utils/index.ts
|
|
194
|
+
var getCalendarDates = (date) => {
|
|
195
|
+
const dates = [];
|
|
196
|
+
const firstDay = new Date(date.getFullYear(), date.getMonth(), 1);
|
|
197
|
+
const lastDay = new Date(date.getFullYear(), date.getMonth() + 1, 0);
|
|
198
|
+
const firstWeekInThisMonth = Math.ceil((firstDay.getDay() + 1) / 7);
|
|
199
|
+
const lastWeekInThisMonth = Math.ceil(
|
|
200
|
+
(lastDay.getDate() + firstDay.getDay()) / 7
|
|
201
|
+
);
|
|
202
|
+
let day = 1;
|
|
203
|
+
for (let i = 1; i <= lastWeekInThisMonth; i++) {
|
|
204
|
+
const week = [];
|
|
205
|
+
for (let j = 1; j <= 7; j++) {
|
|
206
|
+
if (i === firstWeekInThisMonth && j < firstDay.getDay() + 1) {
|
|
207
|
+
week.push(void 0);
|
|
208
|
+
} else if (day > lastDay.getDate()) {
|
|
209
|
+
week.push(void 0);
|
|
210
|
+
} else {
|
|
211
|
+
week.push(day);
|
|
212
|
+
day++;
|
|
213
|
+
}
|
|
214
|
+
}
|
|
215
|
+
dates.push(week);
|
|
216
|
+
}
|
|
217
|
+
return dates;
|
|
218
|
+
};
|
|
219
|
+
var getYearName = (date, locale) => {
|
|
220
|
+
return date.toLocaleString(locale, { year: "numeric" });
|
|
221
|
+
};
|
|
222
|
+
var getMonthName = (date, locale) => {
|
|
223
|
+
return date.toLocaleString(locale, { year: "numeric", month: "long" });
|
|
224
|
+
};
|
|
225
|
+
var getMonthNameFromIndex = (index, locale) => {
|
|
226
|
+
return new Date(0, index).toLocaleString(locale, { month: "long" });
|
|
227
|
+
};
|
|
228
|
+
var getWeekdayNames = (locale) => {
|
|
229
|
+
const currentDay = (/* @__PURE__ */ new Date()).getDay();
|
|
230
|
+
const date = /* @__PURE__ */ new Date();
|
|
231
|
+
date.setDate(date.getDate() - currentDay);
|
|
232
|
+
return Array.from({ length: 7 }).map(() => {
|
|
233
|
+
const day = date.toLocaleString(locale, { weekday: "short" });
|
|
234
|
+
date.setDate(date.getDate() + 1);
|
|
235
|
+
return day;
|
|
236
|
+
});
|
|
237
|
+
};
|
|
238
|
+
var isToday = (date) => {
|
|
239
|
+
const today = /* @__PURE__ */ new Date();
|
|
240
|
+
const d = new Date(date);
|
|
241
|
+
d.setHours(0, 0, 0, 0);
|
|
242
|
+
today.setHours(0, 0, 0, 0);
|
|
243
|
+
return d.getTime() === today.getTime();
|
|
244
|
+
};
|
|
245
|
+
var isSameDay = (date1, date2) => {
|
|
246
|
+
const d1 = new Date(date1);
|
|
247
|
+
const d2 = new Date(date2);
|
|
248
|
+
d1.setHours(0, 0, 0, 0);
|
|
249
|
+
d2.setHours(0, 0, 0, 0);
|
|
250
|
+
return d1.getTime() === d2.getTime();
|
|
251
|
+
};
|
|
252
|
+
var isWithinRange = (d1, d2, date) => {
|
|
253
|
+
const dateToCheck = new Date(date);
|
|
254
|
+
dateToCheck.setHours(0, 0, 0, 0);
|
|
255
|
+
const minDate = new Date(Math.min(d1.getTime(), d2.getTime()));
|
|
256
|
+
const maxDate = new Date(Math.max(d1.getTime(), d2.getTime()));
|
|
257
|
+
return dateToCheck >= minDate && dateToCheck <= maxDate;
|
|
258
|
+
};
|
|
259
|
+
var isSameMonth = (date1, date2) => {
|
|
260
|
+
return date1.getFullYear() === date2.getFullYear() && date1.getMonth() === date2.getMonth();
|
|
261
|
+
};
|
|
262
|
+
|
|
263
|
+
// src/components/IconButton/IconButton.tsx
|
|
264
|
+
import React4 from "react";
|
|
265
|
+
import { IconButton as JoyIconButton } from "@mui/joy";
|
|
266
|
+
import { motion as motion5 } from "framer-motion";
|
|
267
|
+
var MotionIconButton = motion5(JoyIconButton);
|
|
268
|
+
var IconButton = (props) => {
|
|
269
|
+
return /* @__PURE__ */ React4.createElement(MotionIconButton, { ...props });
|
|
270
|
+
};
|
|
271
|
+
IconButton.displayName = "IconButton";
|
|
272
|
+
|
|
273
|
+
// src/components/IconButton/index.ts
|
|
274
|
+
var IconButton_default = IconButton;
|
|
275
|
+
|
|
276
|
+
// src/components/Calendar/hooks/use-calendar-props.ts
|
|
277
|
+
import { useCallback, useMemo, useState } from "react";
|
|
278
|
+
import { useThemeProps } from "@mui/joy/styles";
|
|
279
|
+
var resolveView = (view, views) => {
|
|
280
|
+
return views.includes(view) ? view : views[0];
|
|
281
|
+
};
|
|
282
|
+
var useCalendarProps = (inProps) => {
|
|
283
|
+
const [uncontrolledView, setUncontrolledView] = useState(
|
|
284
|
+
() => resolveView(inProps.view || "day", inProps.views || ["day", "month"])
|
|
285
|
+
);
|
|
286
|
+
const [uncontrolledValue, setUncontrolledValue] = useState(inProps.defaultValue);
|
|
287
|
+
const [viewMonth, setViewMonth] = useState(() => {
|
|
288
|
+
const today = /* @__PURE__ */ new Date();
|
|
289
|
+
today.setDate(1);
|
|
290
|
+
today.setHours(0, 0, 0, 0);
|
|
291
|
+
return inProps.value?.[0] || today;
|
|
292
|
+
});
|
|
293
|
+
const [[page, direction], setPage] = useState([0, 0]);
|
|
294
|
+
const resolvedView = inProps.view ?? uncontrolledView;
|
|
295
|
+
const paginate = (newDirection) => {
|
|
296
|
+
setPage([page + newDirection, newDirection]);
|
|
297
|
+
};
|
|
298
|
+
const handleViewMonthChange = useCallback(
|
|
299
|
+
(newMonth) => {
|
|
300
|
+
setViewMonth(newMonth);
|
|
301
|
+
if (resolvedView === "month") {
|
|
302
|
+
if (viewMonth.getFullYear() !== newMonth.getFullYear()) {
|
|
303
|
+
paginate(newMonth > viewMonth ? 1 : -1);
|
|
304
|
+
}
|
|
305
|
+
} else {
|
|
306
|
+
paginate(newMonth > viewMonth ? 1 : -1);
|
|
307
|
+
}
|
|
308
|
+
inProps.onMonthChange?.(newMonth);
|
|
309
|
+
},
|
|
310
|
+
[inProps.onMonthChange, viewMonth, resolvedView]
|
|
311
|
+
);
|
|
312
|
+
const props = useThemeProps({
|
|
313
|
+
props: {
|
|
314
|
+
locale: "default",
|
|
315
|
+
views: ["day", "month"],
|
|
316
|
+
view: resolvedView,
|
|
317
|
+
value: inProps.value ?? uncontrolledValue,
|
|
318
|
+
...inProps,
|
|
319
|
+
// overrides
|
|
320
|
+
onChange: inProps.value ? (
|
|
321
|
+
// Controlled
|
|
322
|
+
inProps.onChange
|
|
323
|
+
) : (
|
|
324
|
+
// Uncontrolled
|
|
325
|
+
(value) => {
|
|
326
|
+
setUncontrolledValue(value);
|
|
327
|
+
inProps.onChange?.(value);
|
|
328
|
+
}
|
|
329
|
+
),
|
|
330
|
+
onMonthChange: handleViewMonthChange,
|
|
331
|
+
onViewChange: () => {
|
|
332
|
+
const newView = resolvedView === "month" ? "day" : "month";
|
|
333
|
+
const isAllowedView = !inProps.views ? true : inProps.views.includes(newView);
|
|
334
|
+
if (!isAllowedView || inProps.view === newView)
|
|
335
|
+
return;
|
|
336
|
+
if (inProps.onViewChange) {
|
|
337
|
+
inProps.onViewChange(newView);
|
|
338
|
+
} else {
|
|
339
|
+
setUncontrolledView(newView);
|
|
340
|
+
}
|
|
341
|
+
}
|
|
342
|
+
},
|
|
343
|
+
name: "Calendar"
|
|
344
|
+
});
|
|
345
|
+
const ownerState = useMemo(
|
|
346
|
+
() => ({ ...props, viewMonth, direction }),
|
|
347
|
+
[props, viewMonth, direction]
|
|
348
|
+
);
|
|
349
|
+
return [props, ownerState];
|
|
350
|
+
};
|
|
351
|
+
|
|
352
|
+
// src/components/Calendar/hooks/use-calendar.ts
|
|
353
|
+
import { useCallback as useCallback2, useState as useState2 } from "react";
|
|
354
|
+
var useCalendar = (ownerState) => {
|
|
355
|
+
const [hoverDay, setHoverDay] = useState2(null);
|
|
356
|
+
return {
|
|
357
|
+
calendarTitle: ownerState.view === "month" ? getYearName(ownerState.viewMonth, ownerState.locale || "default") : getMonthName(ownerState.viewMonth, ownerState.locale || "default"),
|
|
358
|
+
onPrev: useCallback2(() => {
|
|
359
|
+
if (ownerState.view === "day") {
|
|
360
|
+
const prevMonth = new Date(ownerState.viewMonth || /* @__PURE__ */ new Date());
|
|
361
|
+
prevMonth.setMonth(prevMonth.getMonth() - 1);
|
|
362
|
+
ownerState.onMonthChange?.(prevMonth);
|
|
363
|
+
} else if (ownerState.view === "month") {
|
|
364
|
+
const prevYear = new Date(ownerState.viewMonth || /* @__PURE__ */ new Date());
|
|
365
|
+
prevYear.setFullYear(prevYear.getFullYear() - 1);
|
|
366
|
+
ownerState.onMonthChange?.(prevYear);
|
|
367
|
+
}
|
|
368
|
+
}, [ownerState.onMonthChange, ownerState.viewMonth, ownerState.view]),
|
|
369
|
+
onNext: useCallback2(() => {
|
|
370
|
+
if (ownerState.view === "day") {
|
|
371
|
+
const nextMonth = new Date(ownerState.viewMonth || /* @__PURE__ */ new Date());
|
|
372
|
+
nextMonth.setMonth(nextMonth.getMonth() + 1);
|
|
373
|
+
ownerState.onMonthChange?.(nextMonth);
|
|
374
|
+
} else if (ownerState.view === "month") {
|
|
375
|
+
const nextYear = new Date(ownerState.viewMonth || /* @__PURE__ */ new Date());
|
|
376
|
+
nextYear.setFullYear(nextYear.getFullYear() + 1);
|
|
377
|
+
ownerState.onMonthChange?.(nextYear);
|
|
378
|
+
}
|
|
379
|
+
}, [ownerState.onMonthChange, ownerState.viewMonth, ownerState.view]),
|
|
380
|
+
getDayCellProps: useCallback2(
|
|
381
|
+
(day) => {
|
|
382
|
+
const thisDay = new Date(ownerState.viewMonth || /* @__PURE__ */ new Date());
|
|
383
|
+
thisDay.setHours(0, 0, 0, 0);
|
|
384
|
+
thisDay.setDate(day);
|
|
385
|
+
const inRange = ownerState.rangeSelection && ownerState.value && ownerState.value[0] && // NOTE: hover day is not included in the range
|
|
386
|
+
(hoverDay && isWithinRange(ownerState.value[0], hoverDay, thisDay) || // NOTE: Selected range is included in the range
|
|
387
|
+
ownerState.value[1] && isWithinRange(
|
|
388
|
+
ownerState.value[0],
|
|
389
|
+
ownerState.value[1],
|
|
390
|
+
thisDay
|
|
391
|
+
));
|
|
392
|
+
return {
|
|
393
|
+
"aria-label": thisDay.toLocaleDateString(),
|
|
394
|
+
"aria-current": inRange ? "date" : void 0
|
|
395
|
+
};
|
|
396
|
+
},
|
|
397
|
+
[
|
|
398
|
+
ownerState.rangeSelection,
|
|
399
|
+
ownerState.value,
|
|
400
|
+
ownerState.viewMonth,
|
|
401
|
+
hoverDay
|
|
402
|
+
]
|
|
403
|
+
),
|
|
404
|
+
getPickerDayProps: useCallback2(
|
|
405
|
+
(day) => {
|
|
406
|
+
const thisDay = new Date(ownerState.viewMonth || /* @__PURE__ */ new Date());
|
|
407
|
+
thisDay.setHours(0, 0, 0, 0);
|
|
408
|
+
thisDay.setDate(day);
|
|
409
|
+
const isSelected = !!ownerState.value && (isSameDay(thisDay, ownerState.value[0]) || ownerState.value[1] && isSameDay(thisDay, ownerState.value[1]));
|
|
410
|
+
const inRange = ownerState.rangeSelection && ownerState.value && ownerState.value[0] && // NOTE: hover day is not included in the range
|
|
411
|
+
(hoverDay && isWithinRange(ownerState.value[0], hoverDay, thisDay) || // NOTE: Selected range is included in the range
|
|
412
|
+
ownerState.value[1] && isWithinRange(
|
|
413
|
+
ownerState.value[0],
|
|
414
|
+
ownerState.value[1],
|
|
415
|
+
thisDay
|
|
416
|
+
));
|
|
417
|
+
const handleDayClick = () => {
|
|
418
|
+
if (ownerState.rangeSelection) {
|
|
419
|
+
if (!ownerState.value) {
|
|
420
|
+
ownerState.onChange?.([thisDay, void 0]);
|
|
421
|
+
} else if (ownerState.value[0] && !ownerState.value[1]) {
|
|
422
|
+
ownerState.onChange?.([
|
|
423
|
+
new Date(
|
|
424
|
+
Math.min(ownerState.value[0].getTime(), thisDay.getTime())
|
|
425
|
+
),
|
|
426
|
+
new Date(
|
|
427
|
+
Math.max(ownerState.value[0].getTime(), thisDay.getTime())
|
|
428
|
+
)
|
|
429
|
+
]);
|
|
430
|
+
} else {
|
|
431
|
+
ownerState.onChange?.([thisDay, void 0]);
|
|
432
|
+
}
|
|
433
|
+
} else {
|
|
434
|
+
ownerState.onChange?.([thisDay, void 0]);
|
|
435
|
+
}
|
|
436
|
+
setHoverDay(null);
|
|
437
|
+
};
|
|
438
|
+
return {
|
|
439
|
+
isToday: isToday(thisDay),
|
|
440
|
+
isSelected,
|
|
441
|
+
onClick: handleDayClick,
|
|
442
|
+
onMouseEnter: ownerState.rangeSelection && ownerState.value?.[0] && !ownerState.value?.[1] ? () => setHoverDay(thisDay) : void 0,
|
|
443
|
+
tabIndex: -1,
|
|
444
|
+
"aria-label": thisDay.toLocaleDateString(),
|
|
445
|
+
"aria-selected": isSelected ? "true" : void 0,
|
|
446
|
+
"aria-current": inRange ? "date" : void 0
|
|
447
|
+
};
|
|
448
|
+
},
|
|
449
|
+
[
|
|
450
|
+
ownerState.onChange,
|
|
451
|
+
ownerState.value,
|
|
452
|
+
ownerState.viewMonth,
|
|
453
|
+
ownerState.rangeSelection,
|
|
454
|
+
hoverDay
|
|
455
|
+
]
|
|
456
|
+
),
|
|
457
|
+
getPickerMonthProps: useCallback2(
|
|
458
|
+
(monthIndex) => {
|
|
459
|
+
const thisMonth = new Date(ownerState.viewMonth || /* @__PURE__ */ new Date());
|
|
460
|
+
thisMonth.setDate(1);
|
|
461
|
+
thisMonth.setHours(0, 0, 0, 0);
|
|
462
|
+
thisMonth.setMonth(monthIndex);
|
|
463
|
+
const isSelected = !!ownerState.value && (isSameMonth(thisMonth, ownerState.value[0]) || ownerState.value[1] && isSameMonth(thisMonth, ownerState.value[1]));
|
|
464
|
+
const handleMonthClick = () => {
|
|
465
|
+
ownerState.onViewChange?.("day");
|
|
466
|
+
ownerState.onMonthChange?.(thisMonth);
|
|
467
|
+
};
|
|
468
|
+
return {
|
|
469
|
+
isSelected,
|
|
470
|
+
onClick: handleMonthClick,
|
|
471
|
+
tabIndex: -1,
|
|
472
|
+
"aria-label": getMonthName(thisMonth, ownerState.locale || "default")
|
|
473
|
+
};
|
|
474
|
+
},
|
|
475
|
+
[
|
|
476
|
+
ownerState.onMonthChange,
|
|
477
|
+
ownerState.onViewChange,
|
|
478
|
+
ownerState.onChange,
|
|
479
|
+
ownerState.viewMonth,
|
|
480
|
+
ownerState.locale,
|
|
481
|
+
ownerState.value
|
|
482
|
+
]
|
|
483
|
+
)
|
|
484
|
+
};
|
|
485
|
+
};
|
|
486
|
+
|
|
487
|
+
// src/components/Calendar/Calendar.tsx
|
|
488
|
+
var CalendarRoot = styled("div", {
|
|
489
|
+
name: "Calendar",
|
|
490
|
+
slot: "root"
|
|
491
|
+
})({
|
|
492
|
+
maxWidth: "264px"
|
|
493
|
+
});
|
|
494
|
+
var CalendarHeader = styled("div", {
|
|
495
|
+
name: "Calendar",
|
|
496
|
+
slot: "calendarHeader"
|
|
497
|
+
})(({ theme }) => ({
|
|
498
|
+
display: "flex",
|
|
499
|
+
justifyContent: "space-between",
|
|
500
|
+
alignItems: "center",
|
|
501
|
+
padding: theme.spacing(1)
|
|
502
|
+
}));
|
|
503
|
+
var CalendarViewContainer = styled("div", {
|
|
504
|
+
name: "Calendar",
|
|
505
|
+
slot: "viewContainer"
|
|
506
|
+
})(({ theme }) => ({
|
|
507
|
+
paddingLeft: theme.spacing(1),
|
|
508
|
+
paddingRight: theme.spacing(1),
|
|
509
|
+
position: "relative",
|
|
510
|
+
overflow: "hidden",
|
|
511
|
+
minHeight: "250px"
|
|
512
|
+
}));
|
|
513
|
+
var CalendarViewTable = styled(motion6.table, {
|
|
514
|
+
name: "Calendar",
|
|
515
|
+
slot: "viewTable"
|
|
516
|
+
})(({ theme }) => ({
|
|
517
|
+
position: "absolute",
|
|
518
|
+
borderSpacing: 0,
|
|
519
|
+
"& td, & th": {
|
|
520
|
+
padding: 0
|
|
521
|
+
},
|
|
522
|
+
"& th": {
|
|
523
|
+
paddingTop: theme.spacing(1),
|
|
524
|
+
paddingBottom: theme.spacing(1)
|
|
525
|
+
}
|
|
526
|
+
}));
|
|
527
|
+
var CalendarWeekHeaderContainer = styled("thead", {
|
|
528
|
+
name: "Calendar",
|
|
529
|
+
slot: "weekHeaderContainer"
|
|
530
|
+
})({});
|
|
531
|
+
var CalendarDayPickerContainer = styled("tbody", {
|
|
532
|
+
name: "Calendar",
|
|
533
|
+
slot: "dayPickerContainer"
|
|
534
|
+
})({});
|
|
535
|
+
var CalendarSwitchViewButton = styled(Button_default, {
|
|
536
|
+
name: "Calendar",
|
|
537
|
+
slot: "switchViewButton"
|
|
538
|
+
})(({ ownerState }) => [
|
|
539
|
+
ownerState.view === "month" && {
|
|
540
|
+
pointerEvents: "none"
|
|
541
|
+
}
|
|
542
|
+
]);
|
|
543
|
+
var CalendarDayCell = styled("td", {
|
|
544
|
+
name: "Calendar",
|
|
545
|
+
slot: "dayCell"
|
|
546
|
+
})(({ theme }) => ({
|
|
547
|
+
// aria-current=date === range에 포함된 버튼
|
|
548
|
+
"&[aria-current=date]": {
|
|
549
|
+
position: "relative",
|
|
550
|
+
"& button[aria-current=date]:not([aria-selected=true])": {
|
|
551
|
+
backgroundColor: `rgb(${theme.palette.primary.lightChannel})`
|
|
552
|
+
},
|
|
553
|
+
'& + td[aria-hidden] + td[aria-current="date"]::before': {
|
|
554
|
+
content: '""',
|
|
555
|
+
position: "absolute",
|
|
556
|
+
top: 0,
|
|
557
|
+
left: "-10px",
|
|
558
|
+
bottom: 0,
|
|
559
|
+
width: "16px",
|
|
560
|
+
backgroundColor: `rgb(${theme.palette.primary.lightChannel})`,
|
|
561
|
+
zIndex: -1
|
|
562
|
+
}
|
|
563
|
+
}
|
|
564
|
+
}));
|
|
565
|
+
var CalendarMonth = styled(Button_default, {
|
|
566
|
+
name: "Calendar",
|
|
567
|
+
slot: "month"
|
|
568
|
+
})(({ theme, isSelected, disabled }) => [
|
|
569
|
+
{
|
|
570
|
+
width: "59px",
|
|
571
|
+
// height: "32px",
|
|
572
|
+
textAlign: "center",
|
|
573
|
+
"&:hover": {
|
|
574
|
+
color: theme.palette.primary.softColor,
|
|
575
|
+
backgroundColor: theme.palette.primary.softHoverBg
|
|
576
|
+
},
|
|
577
|
+
"&:active": {
|
|
578
|
+
color: theme.palette.primary.softColor,
|
|
579
|
+
backgroundColor: theme.palette.primary.softActiveBg
|
|
580
|
+
}
|
|
581
|
+
},
|
|
582
|
+
isSelected && {
|
|
583
|
+
backgroundColor: theme.palette.primary.solidBg,
|
|
584
|
+
color: theme.palette.primary.solidColor,
|
|
585
|
+
"&:hover": {
|
|
586
|
+
color: theme.palette.primary.solidColor,
|
|
587
|
+
backgroundColor: theme.palette.primary.solidHoverBg
|
|
588
|
+
},
|
|
589
|
+
"&:active": {
|
|
590
|
+
color: theme.palette.primary.solidColor,
|
|
591
|
+
backgroundColor: theme.palette.primary.solidActiveBg
|
|
592
|
+
}
|
|
593
|
+
},
|
|
594
|
+
disabled && {
|
|
595
|
+
color: theme.palette.neutral.solidDisabledColor,
|
|
596
|
+
backgroundColor: theme.palette.neutral.solidDisabledBg
|
|
597
|
+
}
|
|
598
|
+
]);
|
|
599
|
+
var CalendarDay = styled(Button_default, {
|
|
600
|
+
name: "Calendar",
|
|
601
|
+
slot: "day"
|
|
602
|
+
})(({ theme, isToday: isToday2, isSelected, disabled }) => [
|
|
603
|
+
{
|
|
604
|
+
width: "32px",
|
|
605
|
+
height: "32px",
|
|
606
|
+
textAlign: "center",
|
|
607
|
+
"&:hover": {
|
|
608
|
+
color: theme.palette.primary.softColor,
|
|
609
|
+
backgroundColor: theme.palette.primary.softHoverBg
|
|
610
|
+
},
|
|
611
|
+
"&:active": {
|
|
612
|
+
color: theme.palette.primary.softColor,
|
|
613
|
+
backgroundColor: theme.palette.primary.softActiveBg
|
|
614
|
+
}
|
|
615
|
+
},
|
|
616
|
+
// NOTE: enabled, disabled 일때만 border 적용
|
|
617
|
+
isToday2 && !isSelected && {
|
|
618
|
+
"&:not([aria-current=date]):not(:hover)": {
|
|
619
|
+
border: `1px solid ${theme.palette.neutral.outlinedBorder}`
|
|
620
|
+
}
|
|
621
|
+
},
|
|
622
|
+
isSelected && {
|
|
623
|
+
backgroundColor: theme.palette.primary.solidBg,
|
|
624
|
+
color: theme.palette.primary.solidColor,
|
|
625
|
+
"&:hover": {
|
|
626
|
+
color: theme.palette.primary.solidColor,
|
|
627
|
+
backgroundColor: theme.palette.primary.solidHoverBg
|
|
628
|
+
},
|
|
629
|
+
"&:active": {
|
|
630
|
+
color: theme.palette.primary.solidColor,
|
|
631
|
+
backgroundColor: theme.palette.primary.solidActiveBg
|
|
632
|
+
}
|
|
633
|
+
},
|
|
634
|
+
disabled && {
|
|
635
|
+
color: theme.palette.neutral.solidDisabledColor,
|
|
636
|
+
backgroundColor: theme.palette.neutral.solidDisabledBg
|
|
637
|
+
}
|
|
638
|
+
]);
|
|
639
|
+
var variants = {
|
|
640
|
+
enter: (direction) => {
|
|
641
|
+
return {
|
|
642
|
+
x: direction > 0 ? 300 : -300,
|
|
643
|
+
opacity: 0
|
|
644
|
+
};
|
|
645
|
+
},
|
|
646
|
+
center: {
|
|
647
|
+
zIndex: 1,
|
|
648
|
+
x: 0,
|
|
649
|
+
opacity: 1
|
|
650
|
+
},
|
|
651
|
+
exit: (direction) => {
|
|
652
|
+
return {
|
|
653
|
+
zIndex: 0,
|
|
654
|
+
x: direction < 0 ? 300 : -300,
|
|
655
|
+
opacity: 0
|
|
656
|
+
};
|
|
657
|
+
}
|
|
658
|
+
};
|
|
659
|
+
var swipeConfidenceThreshold = 1e4;
|
|
660
|
+
var swipePower = (offset, velocity) => {
|
|
661
|
+
return Math.abs(offset) * velocity;
|
|
662
|
+
};
|
|
663
|
+
var PickerDays = (props) => {
|
|
664
|
+
const { ownerState } = props;
|
|
665
|
+
const { getPickerDayProps, getDayCellProps } = useCalendar(ownerState);
|
|
666
|
+
const calendarDates = useMemo2(
|
|
667
|
+
() => getCalendarDates(ownerState.viewMonth),
|
|
668
|
+
[ownerState.viewMonth]
|
|
669
|
+
);
|
|
670
|
+
const weekdayNames = useMemo2(
|
|
671
|
+
() => getWeekdayNames(ownerState.locale || "default"),
|
|
672
|
+
[ownerState.locale]
|
|
673
|
+
);
|
|
674
|
+
return /* @__PURE__ */ React6.createElement(CalendarViewContainer, null, /* @__PURE__ */ React6.createElement(AnimatePresence, { initial: false, custom: ownerState.direction }, /* @__PURE__ */ React6.createElement(
|
|
675
|
+
CalendarViewTable,
|
|
676
|
+
{
|
|
677
|
+
key: `${ownerState.viewMonth.toString()}_${ownerState.direction}`,
|
|
678
|
+
custom: ownerState.direction,
|
|
679
|
+
variants,
|
|
680
|
+
initial: "enter",
|
|
681
|
+
animate: "center",
|
|
682
|
+
exit: "exit",
|
|
683
|
+
transition: {
|
|
684
|
+
x: { type: "spring", stiffness: 300, damping: 30 },
|
|
685
|
+
opacity: { duration: 0.2 }
|
|
686
|
+
},
|
|
687
|
+
drag: "x",
|
|
688
|
+
dragConstraints: { left: 0, right: 0 },
|
|
689
|
+
dragElastic: 1,
|
|
690
|
+
onDragEnd: (e, { offset, velocity }) => {
|
|
691
|
+
const swipe = swipePower(offset.x, velocity.x);
|
|
692
|
+
if (swipe < -swipeConfidenceThreshold) {
|
|
693
|
+
const date = new Date(ownerState.viewMonth || /* @__PURE__ */ new Date());
|
|
694
|
+
date.setMonth(date.getMonth() + 1);
|
|
695
|
+
ownerState.onMonthChange?.(date);
|
|
696
|
+
} else if (swipe > swipeConfidenceThreshold) {
|
|
697
|
+
const date = new Date(ownerState.viewMonth || /* @__PURE__ */ new Date());
|
|
698
|
+
date.setMonth(date.getMonth() - 1);
|
|
699
|
+
ownerState.onMonthChange?.(date);
|
|
700
|
+
}
|
|
701
|
+
}
|
|
702
|
+
},
|
|
703
|
+
/* @__PURE__ */ React6.createElement(CalendarWeekHeaderContainer, null, /* @__PURE__ */ React6.createElement("tr", null, weekdayNames.map((name, i) => /* @__PURE__ */ React6.createElement(React6.Fragment, null, /* @__PURE__ */ React6.createElement("th", null, /* @__PURE__ */ React6.createElement(Typography_default, { level: "body-xs", textAlign: "center" }, name)), i < 6 && /* @__PURE__ */ React6.createElement(
|
|
704
|
+
"th",
|
|
705
|
+
{
|
|
706
|
+
style: { width: 4 },
|
|
707
|
+
"aria-hidden": "true",
|
|
708
|
+
"aria-description": "cell-gap"
|
|
709
|
+
}
|
|
710
|
+
))))),
|
|
711
|
+
/* @__PURE__ */ React6.createElement(CalendarDayPickerContainer, null, calendarDates.map((weekDates, rowIndex) => /* @__PURE__ */ React6.createElement(Fragment, { key: `${ownerState.viewMonth}_${rowIndex}` }, /* @__PURE__ */ React6.createElement("tr", null, weekDates.map(
|
|
712
|
+
(date, i) => date ? /* @__PURE__ */ React6.createElement(Fragment, { key: i }, /* @__PURE__ */ React6.createElement(CalendarDayCell, { ...getDayCellProps(date) }, /* @__PURE__ */ React6.createElement(
|
|
713
|
+
CalendarDay,
|
|
714
|
+
{
|
|
715
|
+
size: "sm",
|
|
716
|
+
variant: "plain",
|
|
717
|
+
color: "neutral",
|
|
718
|
+
...getPickerDayProps(date)
|
|
719
|
+
},
|
|
720
|
+
date
|
|
721
|
+
)), i < 6 && /* @__PURE__ */ React6.createElement("td", { "aria-hidden": "true", "aria-description": "cell-gap" })) : /* @__PURE__ */ React6.createElement(Fragment, { key: i }, /* @__PURE__ */ React6.createElement("td", null), i < 6 && /* @__PURE__ */ React6.createElement("td", { "aria-hidden": "true", "aria-description": "cell-gap" }))
|
|
722
|
+
)), rowIndex < calendarDates.length - 1 && /* @__PURE__ */ React6.createElement("tr", { "aria-hidden": "true", "aria-description": "row-gap" }, /* @__PURE__ */ React6.createElement("td", { colSpan: 13, style: { height: 4 } })))))
|
|
723
|
+
)));
|
|
724
|
+
};
|
|
725
|
+
var PickerMonths = (props) => {
|
|
726
|
+
const { ownerState } = props;
|
|
727
|
+
const { getPickerMonthProps } = useCalendar(ownerState);
|
|
728
|
+
const chunkedMonths = Array.from({ length: 12 }, (_, i) => i).reduce(
|
|
729
|
+
(acc, month) => {
|
|
730
|
+
if (acc[acc.length - 1].length === 4) {
|
|
731
|
+
acc.push([]);
|
|
732
|
+
}
|
|
733
|
+
acc[acc.length - 1].push(month);
|
|
734
|
+
return acc;
|
|
735
|
+
},
|
|
736
|
+
[[]]
|
|
737
|
+
);
|
|
738
|
+
return /* @__PURE__ */ React6.createElement(CalendarViewContainer, null, /* @__PURE__ */ React6.createElement(AnimatePresence, { initial: false, custom: ownerState.direction }, /* @__PURE__ */ React6.createElement(
|
|
739
|
+
CalendarViewTable,
|
|
740
|
+
{
|
|
741
|
+
key: `${ownerState.viewMonth.getFullYear()}_${ownerState.direction}`,
|
|
742
|
+
custom: ownerState.direction,
|
|
743
|
+
variants,
|
|
744
|
+
initial: "enter",
|
|
745
|
+
animate: "center",
|
|
746
|
+
exit: "exit",
|
|
747
|
+
transition: {
|
|
748
|
+
x: { type: "spring", stiffness: 300, damping: 30 },
|
|
749
|
+
opacity: { duration: 0.2 }
|
|
750
|
+
},
|
|
751
|
+
drag: "x",
|
|
752
|
+
dragConstraints: { left: 0, right: 0 },
|
|
753
|
+
dragElastic: 1,
|
|
754
|
+
onDragEnd: (e, { offset, velocity }) => {
|
|
755
|
+
const swipe = swipePower(offset.x, velocity.x);
|
|
756
|
+
if (swipe < -swipeConfidenceThreshold) {
|
|
757
|
+
const date = new Date(ownerState.viewMonth || /* @__PURE__ */ new Date());
|
|
758
|
+
date.setMonth(date.getMonth() + 1);
|
|
759
|
+
ownerState.onMonthChange?.(date);
|
|
760
|
+
} else if (swipe > swipeConfidenceThreshold) {
|
|
761
|
+
const date = new Date(ownerState.viewMonth || /* @__PURE__ */ new Date());
|
|
762
|
+
date.setMonth(date.getMonth() - 1);
|
|
763
|
+
ownerState.onMonthChange?.(date);
|
|
764
|
+
}
|
|
765
|
+
}
|
|
766
|
+
},
|
|
767
|
+
/* @__PURE__ */ React6.createElement("tbody", null, chunkedMonths.map((months, i) => /* @__PURE__ */ React6.createElement(Fragment, { key: i }, /* @__PURE__ */ React6.createElement("tr", null, months.map((monthIndex, j) => /* @__PURE__ */ React6.createElement(Fragment, { key: monthIndex }, /* @__PURE__ */ React6.createElement("td", null, /* @__PURE__ */ React6.createElement(
|
|
768
|
+
CalendarMonth,
|
|
769
|
+
{
|
|
770
|
+
size: "sm",
|
|
771
|
+
variant: "plain",
|
|
772
|
+
color: "neutral",
|
|
773
|
+
...getPickerMonthProps(monthIndex)
|
|
774
|
+
},
|
|
775
|
+
getMonthNameFromIndex(
|
|
776
|
+
monthIndex,
|
|
777
|
+
ownerState.locale
|
|
778
|
+
)
|
|
779
|
+
)), j < 3 && /* @__PURE__ */ React6.createElement(
|
|
780
|
+
"td",
|
|
781
|
+
{
|
|
782
|
+
style: { width: 4 },
|
|
783
|
+
"aria-hidden": "true",
|
|
784
|
+
"aria-description": "cell-gap"
|
|
785
|
+
}
|
|
786
|
+
)))), i < chunkedMonths.length - 1 && /* @__PURE__ */ React6.createElement("tr", { "aria-hidden": "true", "aria-description": "row-gap" }, /* @__PURE__ */ React6.createElement("td", { colSpan: 7, style: { height: 4 } })))))
|
|
787
|
+
)));
|
|
788
|
+
};
|
|
789
|
+
var Calendar = forwardRef2((inProps, ref) => {
|
|
790
|
+
const [props, ownerState] = useCalendarProps(inProps);
|
|
791
|
+
const {
|
|
792
|
+
value,
|
|
793
|
+
defaultValue,
|
|
794
|
+
onChange,
|
|
795
|
+
locale,
|
|
796
|
+
onViewChange,
|
|
797
|
+
onMonthChange,
|
|
798
|
+
view,
|
|
799
|
+
views,
|
|
800
|
+
rangeSelection,
|
|
801
|
+
...others
|
|
802
|
+
} = props;
|
|
803
|
+
const { calendarTitle, onPrev, onNext } = useCalendar(ownerState);
|
|
804
|
+
return /* @__PURE__ */ React6.createElement(CalendarRoot, { ref, ...others }, /* @__PURE__ */ React6.createElement(CalendarHeader, null, /* @__PURE__ */ React6.createElement(IconButton_default, { size: "sm", onClick: onPrev }, /* @__PURE__ */ React6.createElement(ChevronLeftIcon, null)), /* @__PURE__ */ React6.createElement(
|
|
805
|
+
CalendarSwitchViewButton,
|
|
806
|
+
{
|
|
807
|
+
ownerState,
|
|
808
|
+
variant: "plain",
|
|
809
|
+
color: "neutral",
|
|
810
|
+
onClick: onViewChange
|
|
811
|
+
},
|
|
812
|
+
calendarTitle
|
|
813
|
+
), /* @__PURE__ */ React6.createElement(IconButton_default, { size: "sm", onClick: onNext }, /* @__PURE__ */ React6.createElement(ChevronRightIcon, null))), view === "day" && /* @__PURE__ */ React6.createElement(PickerDays, { ownerState }), view === "month" && /* @__PURE__ */ React6.createElement(PickerMonths, { ownerState }));
|
|
814
|
+
});
|
|
815
|
+
Calendar.displayName = "Calendar";
|
|
816
|
+
|
|
817
|
+
// src/components/Checkbox/Checkbox.tsx
|
|
818
|
+
import React7 from "react";
|
|
819
|
+
import { Checkbox as JoyCheckbox } from "@mui/joy";
|
|
820
|
+
import { motion as motion7 } from "framer-motion";
|
|
821
|
+
var MotionCheckbox = motion7(JoyCheckbox);
|
|
178
822
|
var Checkbox = (props) => {
|
|
179
|
-
return /* @__PURE__ */
|
|
823
|
+
return /* @__PURE__ */ React7.createElement(MotionCheckbox, { ...props });
|
|
180
824
|
};
|
|
181
825
|
Checkbox.displayName = "Checkbox";
|
|
182
826
|
|
|
@@ -184,9 +828,9 @@ Checkbox.displayName = "Checkbox";
|
|
|
184
828
|
var Checkbox_default = Checkbox;
|
|
185
829
|
|
|
186
830
|
// src/components/Container/Container.tsx
|
|
187
|
-
import { styled } from "@mui/joy";
|
|
188
|
-
import
|
|
189
|
-
var ContainerRoot =
|
|
831
|
+
import { styled as styled2 } from "@mui/joy";
|
|
832
|
+
import React8, { forwardRef as forwardRef3 } from "react";
|
|
833
|
+
var ContainerRoot = styled2("div", {
|
|
190
834
|
name: "Container",
|
|
191
835
|
slot: "root",
|
|
192
836
|
shouldForwardProp: (prop) => prop !== "maxWidth"
|
|
@@ -220,24 +864,24 @@ var ContainerRoot = styled("div", {
|
|
|
220
864
|
}
|
|
221
865
|
}
|
|
222
866
|
}));
|
|
223
|
-
var Container =
|
|
224
|
-
return /* @__PURE__ */
|
|
867
|
+
var Container = forwardRef3(function Container2(props, ref) {
|
|
868
|
+
return /* @__PURE__ */ React8.createElement(ContainerRoot, { ref, ...props });
|
|
225
869
|
});
|
|
226
870
|
Container.displayName = "Container";
|
|
227
871
|
|
|
228
872
|
// src/components/DataTable/DataTable.tsx
|
|
229
|
-
import
|
|
230
|
-
useCallback,
|
|
873
|
+
import React10, {
|
|
874
|
+
useCallback as useCallback3,
|
|
231
875
|
useEffect,
|
|
232
|
-
useMemo,
|
|
876
|
+
useMemo as useMemo3,
|
|
233
877
|
useRef,
|
|
234
|
-
useState
|
|
878
|
+
useState as useState3
|
|
235
879
|
} from "react";
|
|
236
880
|
|
|
237
881
|
// src/components/Sheet/Sheet.tsx
|
|
238
882
|
import { Sheet as JoySheet } from "@mui/joy";
|
|
239
|
-
import { motion as
|
|
240
|
-
var MotionSheet =
|
|
883
|
+
import { motion as motion8 } from "framer-motion";
|
|
884
|
+
var MotionSheet = motion8(JoySheet);
|
|
241
885
|
var Sheet = MotionSheet;
|
|
242
886
|
Sheet.displayName = "Sheet";
|
|
243
887
|
|
|
@@ -245,11 +889,11 @@ Sheet.displayName = "Sheet";
|
|
|
245
889
|
var Sheet_default = Sheet;
|
|
246
890
|
|
|
247
891
|
// src/components/Table/Table.tsx
|
|
248
|
-
import
|
|
892
|
+
import React9 from "react";
|
|
249
893
|
import { Table as JoyTable } from "@mui/joy";
|
|
250
894
|
var Table = (props) => {
|
|
251
895
|
const { children, ...inheritProps } = props;
|
|
252
|
-
return /* @__PURE__ */
|
|
896
|
+
return /* @__PURE__ */ React9.createElement(JoyTable, { ...inheritProps }, children);
|
|
253
897
|
};
|
|
254
898
|
Table.displayName = "Table";
|
|
255
899
|
function TableHead(props) {
|
|
@@ -260,7 +904,7 @@ function TableHead(props) {
|
|
|
260
904
|
slots: { checkbox: RenderCheckbox = Checkbox_default } = {},
|
|
261
905
|
slotProps: { checkbox: checkboxProps = {} } = {}
|
|
262
906
|
} = props;
|
|
263
|
-
return /* @__PURE__ */
|
|
907
|
+
return /* @__PURE__ */ React9.createElement("thead", null, /* @__PURE__ */ React9.createElement("tr", null, showCheckbox && /* @__PURE__ */ React9.createElement(
|
|
264
908
|
"th",
|
|
265
909
|
{
|
|
266
910
|
style: {
|
|
@@ -268,8 +912,8 @@ function TableHead(props) {
|
|
|
268
912
|
textAlign: "center"
|
|
269
913
|
}
|
|
270
914
|
},
|
|
271
|
-
/* @__PURE__ */
|
|
272
|
-
), headCells.map((headCell) => /* @__PURE__ */
|
|
915
|
+
/* @__PURE__ */ React9.createElement(RenderCheckbox, { onChange: onCheckboxChange, ...checkboxProps })
|
|
916
|
+
), headCells.map((headCell) => /* @__PURE__ */ React9.createElement(
|
|
273
917
|
"th",
|
|
274
918
|
{
|
|
275
919
|
key: headCell.label,
|
|
@@ -294,21 +938,21 @@ function TableBody(props) {
|
|
|
294
938
|
slots: { checkbox: RenderCheckbox = Checkbox_default } = {},
|
|
295
939
|
slotProps: { checkbox: checkboxProps = {} } = {}
|
|
296
940
|
} = props;
|
|
297
|
-
return /* @__PURE__ */
|
|
941
|
+
return /* @__PURE__ */ React9.createElement("tbody", null, rows.map((row, rowIndex) => /* @__PURE__ */ React9.createElement("tr", { key: rowIndex }, showCheckbox && /* @__PURE__ */ React9.createElement(
|
|
298
942
|
"td",
|
|
299
943
|
{
|
|
300
944
|
style: {
|
|
301
945
|
textAlign: "center"
|
|
302
946
|
}
|
|
303
947
|
},
|
|
304
|
-
/* @__PURE__ */
|
|
948
|
+
/* @__PURE__ */ React9.createElement(
|
|
305
949
|
RenderCheckbox,
|
|
306
950
|
{
|
|
307
951
|
onChange: (event) => onCheckboxChange?.(event, rowIndex),
|
|
308
952
|
...checkboxProps
|
|
309
953
|
}
|
|
310
954
|
)
|
|
311
|
-
), cellOrder.map((cellKey) => /* @__PURE__ */
|
|
955
|
+
), cellOrder.map((cellKey) => /* @__PURE__ */ React9.createElement(
|
|
312
956
|
"td",
|
|
313
957
|
{
|
|
314
958
|
key: cellKey,
|
|
@@ -323,27 +967,14 @@ TableBody.displayName = "TableBody";
|
|
|
323
967
|
|
|
324
968
|
// src/components/Stack/Stack.tsx
|
|
325
969
|
import { Stack as JoyStack } from "@mui/joy";
|
|
326
|
-
import { motion as
|
|
327
|
-
var MotionStack =
|
|
970
|
+
import { motion as motion9 } from "framer-motion";
|
|
971
|
+
var MotionStack = motion9(JoyStack);
|
|
328
972
|
var Stack = MotionStack;
|
|
329
973
|
Stack.displayName = "Stack";
|
|
330
974
|
|
|
331
975
|
// src/components/Stack/index.ts
|
|
332
976
|
var Stack_default = Stack;
|
|
333
977
|
|
|
334
|
-
// src/components/Typography/Typography.tsx
|
|
335
|
-
import React6 from "react";
|
|
336
|
-
import { Typography as JoyTypography } from "@mui/joy";
|
|
337
|
-
import { motion as motion7 } from "framer-motion";
|
|
338
|
-
var MotionTypography = motion7(JoyTypography);
|
|
339
|
-
var Typography = (props) => {
|
|
340
|
-
return /* @__PURE__ */ React6.createElement(MotionTypography, { ...props });
|
|
341
|
-
};
|
|
342
|
-
Typography.displayName = "Typography";
|
|
343
|
-
|
|
344
|
-
// src/components/Typography/index.ts
|
|
345
|
-
var Typography_default = Typography;
|
|
346
|
-
|
|
347
978
|
// src/components/DataTable/DataTable.tsx
|
|
348
979
|
var numberFormatter = (value) => "Intl" in window ? new Intl.NumberFormat().format(value) : value;
|
|
349
980
|
function TablePagination(props) {
|
|
@@ -358,7 +989,7 @@ function TablePagination(props) {
|
|
|
358
989
|
const afterPages = [page + 1, page + 2].filter((p) => p <= lastPage - 1);
|
|
359
990
|
const isMoreAfterPages = lastPage > 1 && page < lastPage - 3;
|
|
360
991
|
const isMoreBeforePages = lastPage > 1 && page > 4;
|
|
361
|
-
return /* @__PURE__ */
|
|
992
|
+
return /* @__PURE__ */ React10.createElement(
|
|
362
993
|
Stack_default,
|
|
363
994
|
{
|
|
364
995
|
direction: "row",
|
|
@@ -370,7 +1001,7 @@ function TablePagination(props) {
|
|
|
370
1001
|
justifyContent: "end",
|
|
371
1002
|
alignItems: "center"
|
|
372
1003
|
},
|
|
373
|
-
/* @__PURE__ */
|
|
1004
|
+
/* @__PURE__ */ React10.createElement(Stack_default, { direction: "row", spacing: 0.5, alignItems: "center" }, /* @__PURE__ */ React10.createElement(
|
|
374
1005
|
Button_default,
|
|
375
1006
|
{
|
|
376
1007
|
size: "sm",
|
|
@@ -381,7 +1012,7 @@ function TablePagination(props) {
|
|
|
381
1012
|
"aria-label": "Previous page"
|
|
382
1013
|
},
|
|
383
1014
|
"<"
|
|
384
|
-
), page !== firstPage && /* @__PURE__ */
|
|
1015
|
+
), page !== firstPage && /* @__PURE__ */ React10.createElement(
|
|
385
1016
|
Button_default,
|
|
386
1017
|
{
|
|
387
1018
|
size: "sm",
|
|
@@ -390,7 +1021,7 @@ function TablePagination(props) {
|
|
|
390
1021
|
onClick: () => onPageChange(firstPage)
|
|
391
1022
|
},
|
|
392
1023
|
firstPage
|
|
393
|
-
), isMoreBeforePages && /* @__PURE__ */
|
|
1024
|
+
), isMoreBeforePages && /* @__PURE__ */ React10.createElement(
|
|
394
1025
|
Button_default,
|
|
395
1026
|
{
|
|
396
1027
|
size: "sm",
|
|
@@ -399,7 +1030,7 @@ function TablePagination(props) {
|
|
|
399
1030
|
onClick: () => onPageChange(page - 3)
|
|
400
1031
|
},
|
|
401
1032
|
"..."
|
|
402
|
-
), beforePages.map((p) => /* @__PURE__ */
|
|
1033
|
+
), beforePages.map((p) => /* @__PURE__ */ React10.createElement(
|
|
403
1034
|
Button_default,
|
|
404
1035
|
{
|
|
405
1036
|
key: p,
|
|
@@ -409,7 +1040,7 @@ function TablePagination(props) {
|
|
|
409
1040
|
onClick: () => onPageChange(p)
|
|
410
1041
|
},
|
|
411
1042
|
p
|
|
412
|
-
)), /* @__PURE__ */
|
|
1043
|
+
)), /* @__PURE__ */ React10.createElement(Button_default, { variant: "soft", size: "sm" }, page), afterPages.map((p) => /* @__PURE__ */ React10.createElement(
|
|
413
1044
|
Button_default,
|
|
414
1045
|
{
|
|
415
1046
|
key: p,
|
|
@@ -419,7 +1050,7 @@ function TablePagination(props) {
|
|
|
419
1050
|
onClick: () => onPageChange(p)
|
|
420
1051
|
},
|
|
421
1052
|
p
|
|
422
|
-
)), isMoreAfterPages && /* @__PURE__ */
|
|
1053
|
+
)), isMoreAfterPages && /* @__PURE__ */ React10.createElement(
|
|
423
1054
|
Button_default,
|
|
424
1055
|
{
|
|
425
1056
|
size: "sm",
|
|
@@ -428,7 +1059,7 @@ function TablePagination(props) {
|
|
|
428
1059
|
onClick: () => onPageChange(page + 3)
|
|
429
1060
|
},
|
|
430
1061
|
"..."
|
|
431
|
-
), page !== lastPage && /* @__PURE__ */
|
|
1062
|
+
), page !== lastPage && /* @__PURE__ */ React10.createElement(
|
|
432
1063
|
Button_default,
|
|
433
1064
|
{
|
|
434
1065
|
size: "sm",
|
|
@@ -437,7 +1068,7 @@ function TablePagination(props) {
|
|
|
437
1068
|
onClick: () => onPageChange(lastPage)
|
|
438
1069
|
},
|
|
439
1070
|
lastPage
|
|
440
|
-
), /* @__PURE__ */
|
|
1071
|
+
), /* @__PURE__ */ React10.createElement(
|
|
441
1072
|
Button_default,
|
|
442
1073
|
{
|
|
443
1074
|
size: "sm",
|
|
@@ -451,7 +1082,7 @@ function TablePagination(props) {
|
|
|
451
1082
|
))
|
|
452
1083
|
);
|
|
453
1084
|
}
|
|
454
|
-
var Resizer = (ref) => /* @__PURE__ */
|
|
1085
|
+
var Resizer = (ref) => /* @__PURE__ */ React10.createElement(
|
|
455
1086
|
Box_default,
|
|
456
1087
|
{
|
|
457
1088
|
sx: {
|
|
@@ -489,7 +1120,7 @@ var HeadCell = (props) => {
|
|
|
489
1120
|
position: props.stickyHeader ? void 0 : "relative"
|
|
490
1121
|
};
|
|
491
1122
|
const resizer = props.resizable ?? true ? Resizer(ref) : null;
|
|
492
|
-
return /* @__PURE__ */
|
|
1123
|
+
return /* @__PURE__ */ React10.createElement("th", { ref, key: props.field, style }, props.headerName ?? props.field, resizer);
|
|
493
1124
|
};
|
|
494
1125
|
function useDataTableRenderer({
|
|
495
1126
|
rows,
|
|
@@ -501,28 +1132,28 @@ function useDataTableRenderer({
|
|
|
501
1132
|
onSelectionModelChange,
|
|
502
1133
|
stickyHeader
|
|
503
1134
|
}) {
|
|
504
|
-
const [page, setPage] =
|
|
1135
|
+
const [page, setPage] = useState3(paginationModel?.page || 1);
|
|
505
1136
|
const pageSize = paginationModel?.pageSize || 20;
|
|
506
|
-
const selectedModelSet =
|
|
1137
|
+
const selectedModelSet = useMemo3(
|
|
507
1138
|
() => new Set(selectionModel),
|
|
508
1139
|
[selectionModel]
|
|
509
1140
|
);
|
|
510
|
-
const dataInPage =
|
|
1141
|
+
const dataInPage = useMemo3(
|
|
511
1142
|
() => rows.slice((page - 1) * pageSize, (page - 1) * pageSize + pageSize),
|
|
512
1143
|
[rows, page, pageSize]
|
|
513
1144
|
);
|
|
514
|
-
const isAllSelected =
|
|
1145
|
+
const isAllSelected = useMemo3(
|
|
515
1146
|
() => dataInPage.length > 0 && dataInPage.every(
|
|
516
1147
|
(_, i) => selectedModelSet.has(`${i + (page - 1) * pageSize}`)
|
|
517
1148
|
),
|
|
518
1149
|
[dataInPage, selectedModelSet, page, pageSize]
|
|
519
1150
|
);
|
|
520
1151
|
const rowCount = totalRowsProp || rows.length;
|
|
521
|
-
const isTotalSelected =
|
|
1152
|
+
const isTotalSelected = useMemo3(
|
|
522
1153
|
() => rowCount > 0 && selectionModel.length === rowCount,
|
|
523
1154
|
[selectionModel, rowCount]
|
|
524
1155
|
);
|
|
525
|
-
const handlePageChange =
|
|
1156
|
+
const handlePageChange = useCallback3(
|
|
526
1157
|
(newPage) => {
|
|
527
1158
|
setPage(newPage);
|
|
528
1159
|
onPaginationModelChange?.({ page: newPage, pageSize });
|
|
@@ -570,16 +1201,16 @@ function useDataTableRenderer({
|
|
|
570
1201
|
isAllSelected,
|
|
571
1202
|
// all rows are selected on this page
|
|
572
1203
|
isTotalSelected,
|
|
573
|
-
isSelectedRow:
|
|
1204
|
+
isSelectedRow: useCallback3(
|
|
574
1205
|
(model) => selectedModelSet.has(model),
|
|
575
1206
|
[selectedModelSet]
|
|
576
1207
|
),
|
|
577
|
-
onAllCheckboxChange:
|
|
1208
|
+
onAllCheckboxChange: useCallback3(() => {
|
|
578
1209
|
onSelectionModelChange?.(
|
|
579
1210
|
isAllSelected ? [] : dataInPage.map((_, i) => `${i + (page - 1) * pageSize}`)
|
|
580
1211
|
);
|
|
581
1212
|
}, [isAllSelected, dataInPage, onSelectionModelChange]),
|
|
582
|
-
onCheckboxChange:
|
|
1213
|
+
onCheckboxChange: useCallback3(
|
|
583
1214
|
(event, selectedModel) => {
|
|
584
1215
|
if (selectedModelSet.has(selectedModel)) {
|
|
585
1216
|
const newSelectionModel = selectionModel.filter(
|
|
@@ -593,14 +1224,14 @@ function useDataTableRenderer({
|
|
|
593
1224
|
},
|
|
594
1225
|
[selectionModel, onSelectionModelChange]
|
|
595
1226
|
),
|
|
596
|
-
columns:
|
|
1227
|
+
columns: useMemo3(
|
|
597
1228
|
() => columns || // fallback
|
|
598
1229
|
Object.keys(rows[0] || {}).map((key) => ({
|
|
599
1230
|
field: key
|
|
600
1231
|
})),
|
|
601
1232
|
[rows, columns]
|
|
602
1233
|
),
|
|
603
|
-
onTotalSelect:
|
|
1234
|
+
onTotalSelect: useCallback3(() => {
|
|
604
1235
|
onSelectionModelChange?.(
|
|
605
1236
|
isTotalSelected ? [] : rows.map((_, i) => `${i}`)
|
|
606
1237
|
);
|
|
@@ -647,7 +1278,7 @@ function DataTable(props) {
|
|
|
647
1278
|
onTotalSelect,
|
|
648
1279
|
HeadCell: HeadCell2
|
|
649
1280
|
} = useDataTableRenderer(props);
|
|
650
|
-
return /* @__PURE__ */
|
|
1281
|
+
return /* @__PURE__ */ React10.createElement(Box_default, null, /* @__PURE__ */ React10.createElement(
|
|
651
1282
|
Stack_default,
|
|
652
1283
|
{
|
|
653
1284
|
direction: "row",
|
|
@@ -658,7 +1289,7 @@ function DataTable(props) {
|
|
|
658
1289
|
justifyContent: "space-between",
|
|
659
1290
|
alignItems: "center"
|
|
660
1291
|
},
|
|
661
|
-
/* @__PURE__ */
|
|
1292
|
+
/* @__PURE__ */ React10.createElement(Stack_default, { direction: "row", spacing: 1 }, !isAllSelected && /* @__PURE__ */ React10.createElement(Typography_default, { level: "body-xs" }, numberFormatter(selectionModel?.length || 0), " items selected"), isAllSelected && !isTotalSelected && /* @__PURE__ */ React10.createElement(Stack_default, { direction: "row", spacing: 1, alignItems: "center" }, /* @__PURE__ */ React10.createElement(Typography_default, { level: "body-xs" }, "All ", numberFormatter(selectionModel?.length || 0), " items on this page are selected."), /* @__PURE__ */ React10.createElement(Button_default, { size: "sm", variant: "plain", onClick: onTotalSelect }, "Select all ", numberFormatter(rows.length), " items")), isTotalSelected && /* @__PURE__ */ React10.createElement(Stack_default, { direction: "row", spacing: 1, alignItems: "center" }, /* @__PURE__ */ React10.createElement(Typography_default, { level: "body-xs" }, "All ", numberFormatter(rows.length), " items are selected."), /* @__PURE__ */ React10.createElement(
|
|
662
1293
|
Button_default,
|
|
663
1294
|
{
|
|
664
1295
|
size: "sm",
|
|
@@ -668,8 +1299,8 @@ function DataTable(props) {
|
|
|
668
1299
|
},
|
|
669
1300
|
"Cancel"
|
|
670
1301
|
))),
|
|
671
|
-
Toolbar && /* @__PURE__ */
|
|
672
|
-
), /* @__PURE__ */
|
|
1302
|
+
Toolbar && /* @__PURE__ */ React10.createElement(Toolbar, { ...toolbarProps || {} })
|
|
1303
|
+
), /* @__PURE__ */ React10.createElement(
|
|
673
1304
|
Sheet_default,
|
|
674
1305
|
{
|
|
675
1306
|
variant: "outlined",
|
|
@@ -681,7 +1312,7 @@ function DataTable(props) {
|
|
|
681
1312
|
},
|
|
682
1313
|
...backgroundProps
|
|
683
1314
|
},
|
|
684
|
-
/* @__PURE__ */
|
|
1315
|
+
/* @__PURE__ */ React10.createElement(Table, { ...innerProps }, /* @__PURE__ */ React10.createElement("thead", null, /* @__PURE__ */ React10.createElement("tr", null, checkboxSelection && /* @__PURE__ */ React10.createElement(
|
|
685
1316
|
"th",
|
|
686
1317
|
{
|
|
687
1318
|
style: {
|
|
@@ -689,7 +1320,7 @@ function DataTable(props) {
|
|
|
689
1320
|
textAlign: "center"
|
|
690
1321
|
}
|
|
691
1322
|
},
|
|
692
|
-
/* @__PURE__ */
|
|
1323
|
+
/* @__PURE__ */ React10.createElement(
|
|
693
1324
|
RenderCheckbox,
|
|
694
1325
|
{
|
|
695
1326
|
onChange: onAllCheckboxChange,
|
|
@@ -698,16 +1329,16 @@ function DataTable(props) {
|
|
|
698
1329
|
...checkboxProps
|
|
699
1330
|
}
|
|
700
1331
|
)
|
|
701
|
-
), columns.map((c) => /* @__PURE__ */
|
|
1332
|
+
), columns.map((c) => /* @__PURE__ */ React10.createElement(
|
|
702
1333
|
HeadCell2,
|
|
703
1334
|
{
|
|
704
1335
|
key: c.field,
|
|
705
1336
|
stickyHeader: props.stickyHeader,
|
|
706
1337
|
...c
|
|
707
1338
|
}
|
|
708
|
-
)))), /* @__PURE__ */
|
|
1339
|
+
)))), /* @__PURE__ */ React10.createElement("tbody", null, dataInPage.map((row, rowIndex) => {
|
|
709
1340
|
const rowId = `${rowIndex + (page - 1) * pageSize}`;
|
|
710
|
-
return /* @__PURE__ */
|
|
1341
|
+
return /* @__PURE__ */ React10.createElement(
|
|
711
1342
|
"tr",
|
|
712
1343
|
{
|
|
713
1344
|
key: rowId,
|
|
@@ -716,7 +1347,7 @@ function DataTable(props) {
|
|
|
716
1347
|
onClick: checkboxSelection ? (e) => onCheckboxChange(e, rowId) : void 0,
|
|
717
1348
|
"aria-checked": checkboxSelection ? isSelectedRow(rowId) : void 0
|
|
718
1349
|
},
|
|
719
|
-
checkboxSelection && /* @__PURE__ */
|
|
1350
|
+
checkboxSelection && /* @__PURE__ */ React10.createElement(
|
|
720
1351
|
"th",
|
|
721
1352
|
{
|
|
722
1353
|
scope: "row",
|
|
@@ -724,7 +1355,7 @@ function DataTable(props) {
|
|
|
724
1355
|
textAlign: "center"
|
|
725
1356
|
}
|
|
726
1357
|
},
|
|
727
|
-
/* @__PURE__ */
|
|
1358
|
+
/* @__PURE__ */ React10.createElement(
|
|
728
1359
|
RenderCheckbox,
|
|
729
1360
|
{
|
|
730
1361
|
onChange: (e) => onCheckboxChange(e, rowId),
|
|
@@ -733,7 +1364,7 @@ function DataTable(props) {
|
|
|
733
1364
|
}
|
|
734
1365
|
)
|
|
735
1366
|
),
|
|
736
|
-
columns.map((column) => /* @__PURE__ */
|
|
1367
|
+
columns.map((column) => /* @__PURE__ */ React10.createElement(
|
|
737
1368
|
"td",
|
|
738
1369
|
{
|
|
739
1370
|
key: column.field,
|
|
@@ -744,8 +1375,8 @@ function DataTable(props) {
|
|
|
744
1375
|
row[column.field]
|
|
745
1376
|
))
|
|
746
1377
|
);
|
|
747
|
-
})), Footer && /* @__PURE__ */
|
|
748
|
-
), /* @__PURE__ */
|
|
1378
|
+
})), Footer && /* @__PURE__ */ React10.createElement(Footer, null))
|
|
1379
|
+
), /* @__PURE__ */ React10.createElement(
|
|
749
1380
|
TablePagination,
|
|
750
1381
|
{
|
|
751
1382
|
paginationModel: { page, pageSize },
|
|
@@ -758,8 +1389,8 @@ DataTable.displayName = "DataTable";
|
|
|
758
1389
|
|
|
759
1390
|
// src/components/DialogActions/DialogActions.tsx
|
|
760
1391
|
import { DialogActions as JoyDialogActions } from "@mui/joy";
|
|
761
|
-
import { motion as
|
|
762
|
-
var MotionDialogActions =
|
|
1392
|
+
import { motion as motion10 } from "framer-motion";
|
|
1393
|
+
var MotionDialogActions = motion10(JoyDialogActions);
|
|
763
1394
|
var DialogActions = MotionDialogActions;
|
|
764
1395
|
DialogActions.displayName = "DialogActions";
|
|
765
1396
|
|
|
@@ -768,8 +1399,8 @@ var DialogActions_default = DialogActions;
|
|
|
768
1399
|
|
|
769
1400
|
// src/components/DialogContent/DialogContent.tsx
|
|
770
1401
|
import { DialogContent as JoyDialogContent } from "@mui/joy";
|
|
771
|
-
import { motion as
|
|
772
|
-
var MotionDialogContent =
|
|
1402
|
+
import { motion as motion11 } from "framer-motion";
|
|
1403
|
+
var MotionDialogContent = motion11(JoyDialogContent);
|
|
773
1404
|
var DialogContent = MotionDialogContent;
|
|
774
1405
|
DialogContent.displayName = "DialogContent";
|
|
775
1406
|
|
|
@@ -778,8 +1409,8 @@ var DialogContent_default = DialogContent;
|
|
|
778
1409
|
|
|
779
1410
|
// src/components/DialogTitle/DialogTitle.tsx
|
|
780
1411
|
import { DialogTitle as JoyDialogTitle } from "@mui/joy";
|
|
781
|
-
import { motion as
|
|
782
|
-
var MotionDialogTitle =
|
|
1412
|
+
import { motion as motion12 } from "framer-motion";
|
|
1413
|
+
var MotionDialogTitle = motion12(JoyDialogTitle);
|
|
783
1414
|
var DialogTitle = MotionDialogTitle;
|
|
784
1415
|
DialogTitle.displayName = "DialogTitle";
|
|
785
1416
|
|
|
@@ -787,60 +1418,60 @@ DialogTitle.displayName = "DialogTitle";
|
|
|
787
1418
|
var DialogTitle_default = DialogTitle;
|
|
788
1419
|
|
|
789
1420
|
// src/components/DialogFrame/DialogFrame.tsx
|
|
790
|
-
import
|
|
1421
|
+
import React12 from "react";
|
|
791
1422
|
|
|
792
1423
|
// src/components/Modal/Modal.tsx
|
|
793
|
-
import
|
|
1424
|
+
import React11 from "react";
|
|
794
1425
|
import {
|
|
795
1426
|
Modal as JoyModal,
|
|
796
1427
|
ModalDialog as JoyModalDialog,
|
|
797
1428
|
ModalClose as JoyModalClose,
|
|
798
1429
|
ModalOverflow as JoyModalOverflow
|
|
799
1430
|
} from "@mui/joy";
|
|
800
|
-
import { motion as
|
|
801
|
-
var MotionModal =
|
|
1431
|
+
import { motion as motion13 } from "framer-motion";
|
|
1432
|
+
var MotionModal = motion13(JoyModal);
|
|
802
1433
|
var Modal = MotionModal;
|
|
803
1434
|
Modal.displayName = "Modal";
|
|
804
|
-
var MotionModalDialog =
|
|
1435
|
+
var MotionModalDialog = motion13(JoyModalDialog);
|
|
805
1436
|
var ModalDialog = MotionModalDialog;
|
|
806
1437
|
ModalDialog.displayName = "ModalDialog";
|
|
807
|
-
var MotionModalClose =
|
|
1438
|
+
var MotionModalClose = motion13(JoyModalClose);
|
|
808
1439
|
var ModalClose = MotionModalClose;
|
|
809
1440
|
ModalClose.displayName = "ModalClose";
|
|
810
|
-
var MotionModalOverflow =
|
|
1441
|
+
var MotionModalOverflow = motion13(JoyModalOverflow);
|
|
811
1442
|
var ModalOverflow = MotionModalOverflow;
|
|
812
1443
|
ModalOverflow.displayName = "ModalOverflow";
|
|
813
1444
|
function ModalFrame(props) {
|
|
814
1445
|
const { title, children, ...innerProps } = props;
|
|
815
|
-
return /* @__PURE__ */
|
|
1446
|
+
return /* @__PURE__ */ React11.createElement(ModalDialog, { ...innerProps }, /* @__PURE__ */ React11.createElement(ModalClose, null), /* @__PURE__ */ React11.createElement(DialogTitle_default, null, title), /* @__PURE__ */ React11.createElement(DialogContent_default, null, children));
|
|
816
1447
|
}
|
|
817
1448
|
ModalFrame.displayName = "ModalFrame";
|
|
818
1449
|
|
|
819
1450
|
// src/components/DialogFrame/DialogFrame.tsx
|
|
820
1451
|
function DialogFrame(props) {
|
|
821
1452
|
const { title, children, actions, ...innerProps } = props;
|
|
822
|
-
return /* @__PURE__ */
|
|
1453
|
+
return /* @__PURE__ */ React12.createElement(ModalDialog, { ...innerProps }, /* @__PURE__ */ React12.createElement(DialogTitle_default, null, title), /* @__PURE__ */ React12.createElement(DialogContent_default, null, children), /* @__PURE__ */ React12.createElement(DialogActions_default, null, actions));
|
|
823
1454
|
}
|
|
824
1455
|
DialogFrame.displayName = "DialogFrame";
|
|
825
1456
|
|
|
826
1457
|
// src/components/Divider/Divider.tsx
|
|
827
|
-
import
|
|
1458
|
+
import React13 from "react";
|
|
828
1459
|
import { Divider as JoyDivider } from "@mui/joy";
|
|
829
|
-
import { motion as
|
|
830
|
-
var MotionDivider =
|
|
1460
|
+
import { motion as motion14 } from "framer-motion";
|
|
1461
|
+
var MotionDivider = motion14(JoyDivider);
|
|
831
1462
|
var Divider = (props) => {
|
|
832
|
-
return /* @__PURE__ */
|
|
1463
|
+
return /* @__PURE__ */ React13.createElement(MotionDivider, { ...props });
|
|
833
1464
|
};
|
|
834
1465
|
Divider.displayName = "Divider";
|
|
835
1466
|
|
|
836
1467
|
// src/components/InsetDrawer/InsetDrawer.tsx
|
|
837
|
-
import
|
|
1468
|
+
import React14 from "react";
|
|
838
1469
|
import { Drawer as JoyDrawer } from "@mui/joy";
|
|
839
|
-
import { motion as
|
|
840
|
-
var MotionDrawer =
|
|
1470
|
+
import { motion as motion15 } from "framer-motion";
|
|
1471
|
+
var MotionDrawer = motion15(JoyDrawer);
|
|
841
1472
|
var InsetDrawer = (props) => {
|
|
842
1473
|
const { children, ...innerProps } = props;
|
|
843
|
-
return /* @__PURE__ */
|
|
1474
|
+
return /* @__PURE__ */ React14.createElement(
|
|
844
1475
|
MotionDrawer,
|
|
845
1476
|
{
|
|
846
1477
|
...innerProps,
|
|
@@ -863,121 +1494,111 @@ InsetDrawer.displayName = "InsetDrawer";
|
|
|
863
1494
|
|
|
864
1495
|
// src/components/Dropdown/Dropdown.tsx
|
|
865
1496
|
import { Dropdown as JoyDropdown } from "@mui/joy";
|
|
866
|
-
import { motion as
|
|
867
|
-
var MotionDropdown =
|
|
1497
|
+
import { motion as motion16 } from "framer-motion";
|
|
1498
|
+
var MotionDropdown = motion16(JoyDropdown);
|
|
868
1499
|
var Dropdown = MotionDropdown;
|
|
869
1500
|
Dropdown.displayName = "Dropdown";
|
|
870
1501
|
|
|
871
1502
|
// src/components/FormControl/FormControl.tsx
|
|
872
1503
|
import { FormControl as JoyFormControl } from "@mui/joy";
|
|
873
|
-
import { motion as
|
|
874
|
-
var MotionFormControl =
|
|
1504
|
+
import { motion as motion17 } from "framer-motion";
|
|
1505
|
+
var MotionFormControl = motion17(JoyFormControl);
|
|
875
1506
|
var FormControl = MotionFormControl;
|
|
876
1507
|
FormControl.displayName = "FormControl";
|
|
877
1508
|
|
|
878
1509
|
// src/components/FormHelperText/FormHelperText.tsx
|
|
879
1510
|
import { FormHelperText as JoyFormHelperText } from "@mui/joy";
|
|
880
|
-
import { motion as
|
|
881
|
-
var MotionFormHelperText =
|
|
1511
|
+
import { motion as motion18 } from "framer-motion";
|
|
1512
|
+
var MotionFormHelperText = motion18(JoyFormHelperText);
|
|
882
1513
|
var FormHelperText = MotionFormHelperText;
|
|
883
1514
|
FormHelperText.displayName = "FormHelperText";
|
|
884
1515
|
|
|
885
1516
|
// src/components/FormLabel/FormLabel.tsx
|
|
886
1517
|
import { FormLabel as JoyFormLabel } from "@mui/joy";
|
|
887
|
-
import { motion as
|
|
888
|
-
var MotionFormLabel =
|
|
1518
|
+
import { motion as motion19 } from "framer-motion";
|
|
1519
|
+
var MotionFormLabel = motion19(JoyFormLabel);
|
|
889
1520
|
var FormLabel = MotionFormLabel;
|
|
890
1521
|
FormLabel.displayName = "FormLabel";
|
|
891
1522
|
|
|
892
1523
|
// src/components/Grid/Grid.tsx
|
|
893
1524
|
import { Grid as JoyGrid } from "@mui/joy";
|
|
894
|
-
import { motion as
|
|
895
|
-
var MotionGrid =
|
|
1525
|
+
import { motion as motion20 } from "framer-motion";
|
|
1526
|
+
var MotionGrid = motion20(JoyGrid);
|
|
896
1527
|
var Grid = MotionGrid;
|
|
897
1528
|
Grid.displayName = "Grid";
|
|
898
1529
|
|
|
899
|
-
// src/components/IconButton/IconButton.tsx
|
|
900
|
-
import React12 from "react";
|
|
901
|
-
import { IconButton as JoyIconButton } from "@mui/joy";
|
|
902
|
-
import { motion as motion19 } from "framer-motion";
|
|
903
|
-
var MotionIconButton = motion19(JoyIconButton);
|
|
904
|
-
var IconButton = (props) => {
|
|
905
|
-
return /* @__PURE__ */ React12.createElement(MotionIconButton, { ...props });
|
|
906
|
-
};
|
|
907
|
-
IconButton.displayName = "IconButton";
|
|
908
|
-
|
|
909
1530
|
// src/components/Input/Input.tsx
|
|
910
|
-
import
|
|
1531
|
+
import React15 from "react";
|
|
911
1532
|
import { Input as JoyInput } from "@mui/joy";
|
|
912
|
-
import { motion as
|
|
913
|
-
var MotionInput =
|
|
1533
|
+
import { motion as motion21 } from "framer-motion";
|
|
1534
|
+
var MotionInput = motion21(JoyInput);
|
|
914
1535
|
var Input = (props) => {
|
|
915
|
-
return /* @__PURE__ */
|
|
1536
|
+
return /* @__PURE__ */ React15.createElement(MotionInput, { ...props });
|
|
916
1537
|
};
|
|
917
1538
|
Input.displayName = "Input";
|
|
918
1539
|
|
|
919
1540
|
// src/components/Menu/Menu.tsx
|
|
920
|
-
import
|
|
1541
|
+
import React16 from "react";
|
|
921
1542
|
import {
|
|
922
1543
|
Menu as JoyMenu,
|
|
923
1544
|
MenuButton as JoyMenuButton,
|
|
924
1545
|
MenuItem as JoyMenuItem
|
|
925
1546
|
} from "@mui/joy";
|
|
926
|
-
import { motion as
|
|
927
|
-
var MotionMenu =
|
|
1547
|
+
import { motion as motion22 } from "framer-motion";
|
|
1548
|
+
var MotionMenu = motion22(JoyMenu);
|
|
928
1549
|
var Menu = (props) => {
|
|
929
|
-
return /* @__PURE__ */
|
|
1550
|
+
return /* @__PURE__ */ React16.createElement(MotionMenu, { ...props });
|
|
930
1551
|
};
|
|
931
1552
|
Menu.displayName = "Menu";
|
|
932
|
-
var MotionMenuButton =
|
|
1553
|
+
var MotionMenuButton = motion22(JoyMenuButton);
|
|
933
1554
|
var MenuButton = (props) => {
|
|
934
|
-
return /* @__PURE__ */
|
|
1555
|
+
return /* @__PURE__ */ React16.createElement(MotionMenuButton, { ...props });
|
|
935
1556
|
};
|
|
936
1557
|
MenuButton.displayName = "MenuButton";
|
|
937
|
-
var MotionMenuItem =
|
|
1558
|
+
var MotionMenuItem = motion22(JoyMenuItem);
|
|
938
1559
|
var MenuItem = (props) => {
|
|
939
|
-
return /* @__PURE__ */
|
|
1560
|
+
return /* @__PURE__ */ React16.createElement(MotionMenuItem, { ...props });
|
|
940
1561
|
};
|
|
941
1562
|
MenuItem.displayName = "MenuItem";
|
|
942
1563
|
|
|
943
1564
|
// src/components/Radio/Radio.tsx
|
|
944
1565
|
import { Radio as JoyRadio, RadioGroup as JoyRadioGroup } from "@mui/joy";
|
|
945
|
-
import { motion as
|
|
946
|
-
var MotionRadio =
|
|
1566
|
+
import { motion as motion23 } from "framer-motion";
|
|
1567
|
+
var MotionRadio = motion23(JoyRadio);
|
|
947
1568
|
var Radio = MotionRadio;
|
|
948
1569
|
Radio.displayName = "Radio";
|
|
949
|
-
var MotionRadioGroup =
|
|
1570
|
+
var MotionRadioGroup = motion23(JoyRadioGroup);
|
|
950
1571
|
var RadioGroup = MotionRadioGroup;
|
|
951
1572
|
RadioGroup.displayName = "RadioGroup";
|
|
952
1573
|
|
|
953
1574
|
// src/components/RadioList/RadioList.tsx
|
|
954
|
-
import
|
|
1575
|
+
import React17 from "react";
|
|
955
1576
|
function RadioList(props) {
|
|
956
1577
|
const { items, ...innerProps } = props;
|
|
957
|
-
return /* @__PURE__ */
|
|
1578
|
+
return /* @__PURE__ */ React17.createElement(RadioGroup, { ...innerProps }, items.map((item) => /* @__PURE__ */ React17.createElement(Radio, { key: `${item.value}`, value: item.value, label: item.label })));
|
|
958
1579
|
}
|
|
959
1580
|
RadioList.displayName = "RadioList";
|
|
960
1581
|
|
|
961
1582
|
// src/components/Select/Select.tsx
|
|
962
1583
|
import { Select as JoySelect, Option as JoyOption } from "@mui/joy";
|
|
963
|
-
import { motion as
|
|
964
|
-
var MotionSelect =
|
|
1584
|
+
import { motion as motion24 } from "framer-motion";
|
|
1585
|
+
var MotionSelect = motion24(JoySelect);
|
|
965
1586
|
var Select = MotionSelect;
|
|
966
1587
|
Select.displayName = "Select";
|
|
967
|
-
var MotionOption =
|
|
1588
|
+
var MotionOption = motion24(JoyOption);
|
|
968
1589
|
var Option = MotionOption;
|
|
969
1590
|
Option.displayName = "Option";
|
|
970
1591
|
|
|
971
1592
|
// src/components/Switch/Switch.tsx
|
|
972
|
-
import
|
|
1593
|
+
import React18 from "react";
|
|
973
1594
|
import {
|
|
974
1595
|
Switch as JoySwitch,
|
|
975
|
-
styled as
|
|
1596
|
+
styled as styled3,
|
|
976
1597
|
switchClasses
|
|
977
1598
|
} from "@mui/joy";
|
|
978
|
-
import { motion as
|
|
979
|
-
var MotionSwitch =
|
|
980
|
-
var StyledThumb =
|
|
1599
|
+
import { motion as motion25 } from "framer-motion";
|
|
1600
|
+
var MotionSwitch = motion25(JoySwitch);
|
|
1601
|
+
var StyledThumb = styled3(motion25.div)({
|
|
981
1602
|
"--Icon-fontSize": "calc(var(--Switch-thumbSize) * 0.75)",
|
|
982
1603
|
display: "inline-flex",
|
|
983
1604
|
justifyContent: "center",
|
|
@@ -995,14 +1616,14 @@ var StyledThumb = styled2(motion24.div)({
|
|
|
995
1616
|
right: "var(--Switch-thumbOffset)"
|
|
996
1617
|
}
|
|
997
1618
|
});
|
|
998
|
-
var Thumb = (props) => /* @__PURE__ */
|
|
1619
|
+
var Thumb = (props) => /* @__PURE__ */ React18.createElement(StyledThumb, { ...props, layout: true, transition: spring });
|
|
999
1620
|
var spring = {
|
|
1000
1621
|
type: "spring",
|
|
1001
1622
|
stiffness: 700,
|
|
1002
1623
|
damping: 30
|
|
1003
1624
|
};
|
|
1004
1625
|
var Switch = (props) => {
|
|
1005
|
-
return /* @__PURE__ */
|
|
1626
|
+
return /* @__PURE__ */ React18.createElement(
|
|
1006
1627
|
MotionSwitch,
|
|
1007
1628
|
{
|
|
1008
1629
|
...props,
|
|
@@ -1017,32 +1638,32 @@ Switch.displayName = "Switch";
|
|
|
1017
1638
|
|
|
1018
1639
|
// src/components/Tabs/Tabs.tsx
|
|
1019
1640
|
import { Tabs as JoyTabs, Tab as JoyTab, TabList as JoyTabList, TabPanel as JoyTabPanel } from "@mui/joy";
|
|
1020
|
-
import { motion as
|
|
1021
|
-
var MotionTabs =
|
|
1641
|
+
import { motion as motion26 } from "framer-motion";
|
|
1642
|
+
var MotionTabs = motion26(JoyTabs);
|
|
1022
1643
|
var Tabs = MotionTabs;
|
|
1023
1644
|
Tabs.displayName = "Tabs";
|
|
1024
|
-
var MotionTab =
|
|
1645
|
+
var MotionTab = motion26(JoyTab);
|
|
1025
1646
|
var Tab = MotionTab;
|
|
1026
1647
|
Tab.displayName = "Tab";
|
|
1027
|
-
var MotionTabList =
|
|
1648
|
+
var MotionTabList = motion26(JoyTabList);
|
|
1028
1649
|
var TabList = MotionTabList;
|
|
1029
1650
|
TabList.displayName = "TabList";
|
|
1030
|
-
var MotionTabPanel =
|
|
1651
|
+
var MotionTabPanel = motion26(JoyTabPanel);
|
|
1031
1652
|
var TabPanel = MotionTabPanel;
|
|
1032
1653
|
TabPanel.displayName = "TabPanel";
|
|
1033
1654
|
|
|
1034
1655
|
// src/components/Textarea/Textarea.tsx
|
|
1035
|
-
import
|
|
1656
|
+
import React19 from "react";
|
|
1036
1657
|
import { Textarea as JoyTextarea } from "@mui/joy";
|
|
1037
|
-
import { motion as
|
|
1038
|
-
var MotionTextarea =
|
|
1658
|
+
import { motion as motion27 } from "framer-motion";
|
|
1659
|
+
var MotionTextarea = motion27(JoyTextarea);
|
|
1039
1660
|
var Textarea = (props) => {
|
|
1040
|
-
return /* @__PURE__ */
|
|
1661
|
+
return /* @__PURE__ */ React19.createElement(MotionTextarea, { ...props });
|
|
1041
1662
|
};
|
|
1042
1663
|
Textarea.displayName = "Textarea";
|
|
1043
1664
|
|
|
1044
1665
|
// src/components/ThemeProvider/ThemeProvider.tsx
|
|
1045
|
-
import
|
|
1666
|
+
import React20 from "react";
|
|
1046
1667
|
import {
|
|
1047
1668
|
CssBaseline,
|
|
1048
1669
|
CssVarsProvider,
|
|
@@ -1089,17 +1710,17 @@ var defaultTheme = extendTheme({
|
|
|
1089
1710
|
}
|
|
1090
1711
|
});
|
|
1091
1712
|
function ThemeProvider(props) {
|
|
1092
|
-
return /* @__PURE__ */
|
|
1713
|
+
return /* @__PURE__ */ React20.createElement(React20.Fragment, null, /* @__PURE__ */ React20.createElement(CssVarsProvider, { theme: defaultTheme }, /* @__PURE__ */ React20.createElement(CssBaseline, null), props.children));
|
|
1093
1714
|
}
|
|
1094
1715
|
ThemeProvider.displayName = "ThemeProvider";
|
|
1095
1716
|
|
|
1096
1717
|
// src/components/Tooltip/Tooltip.tsx
|
|
1097
|
-
import
|
|
1718
|
+
import React21 from "react";
|
|
1098
1719
|
import { Tooltip as JoyTooltip } from "@mui/joy";
|
|
1099
|
-
import { motion as
|
|
1100
|
-
var MotionTooltip =
|
|
1720
|
+
import { motion as motion28 } from "framer-motion";
|
|
1721
|
+
var MotionTooltip = motion28(JoyTooltip);
|
|
1101
1722
|
var Tooltip = (props) => {
|
|
1102
|
-
return /* @__PURE__ */
|
|
1723
|
+
return /* @__PURE__ */ React21.createElement(MotionTooltip, { ...props });
|
|
1103
1724
|
};
|
|
1104
1725
|
Tooltip.displayName = "Tooltip";
|
|
1105
1726
|
export {
|
|
@@ -1117,6 +1738,7 @@ export {
|
|
|
1117
1738
|
Box,
|
|
1118
1739
|
Breadcrumbs,
|
|
1119
1740
|
Button,
|
|
1741
|
+
Calendar,
|
|
1120
1742
|
Card,
|
|
1121
1743
|
CardActions,
|
|
1122
1744
|
CardContent,
|