@ceed/ads 0.0.34 → 0.0.36
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/Modal/Modal.d.ts +1 -1
- package/dist/index.js +1254 -6
- package/framer/index.js +3397 -3278
- package/package.json +9 -2
- package/dist/components/Accordions/Accordions.js +0 -66
- package/dist/components/Accordions/index.js +0 -3
- package/dist/components/Box/Box.js +0 -6
- package/dist/components/Box/index.js +0 -3
- package/dist/components/Button/Button.js +0 -28
- package/dist/components/Button/index.js +0 -3
- package/dist/components/Checkbox/Checkbox.js +0 -28
- package/dist/components/Checkbox/index.js +0 -3
- package/dist/components/Container/Container.js +0 -51
- package/dist/components/Container/index.js +0 -3
- package/dist/components/DataTable/DataTable.js +0 -268
- package/dist/components/DataTable/index.js +0 -3
- package/dist/components/DialogActions/DialogActions.js +0 -6
- package/dist/components/DialogActions/index.js +0 -3
- package/dist/components/DialogContent/DialogContent.js +0 -6
- package/dist/components/DialogContent/index.js +0 -3
- package/dist/components/DialogFrame/DialogFrame.js +0 -44
- package/dist/components/DialogFrame/index.js +0 -3
- package/dist/components/DialogTitle/DialogTitle.js +0 -6
- package/dist/components/DialogTitle/index.js +0 -3
- package/dist/components/Divider/Divider.js +0 -28
- package/dist/components/Divider/index.js +0 -3
- package/dist/components/Dropdown/Dropdown.js +0 -6
- package/dist/components/Dropdown/index.js +0 -3
- package/dist/components/FormControl/FormControl.js +0 -6
- package/dist/components/FormControl/index.js +0 -3
- package/dist/components/FormHelperText/FormHelperText.js +0 -6
- package/dist/components/FormHelperText/index.js +0 -3
- package/dist/components/FormLabel/FormLabel.js +0 -6
- package/dist/components/FormLabel/index.js +0 -3
- package/dist/components/Grid/Grid.js +0 -6
- package/dist/components/Grid/index.js +0 -3
- package/dist/components/IconButton/IconButton.js +0 -28
- package/dist/components/IconButton/index.js +0 -3
- package/dist/components/Input/Input.js +0 -28
- package/dist/components/Input/index.js +0 -3
- package/dist/components/InsetDrawer/InsetDrawer.js +0 -45
- package/dist/components/InsetDrawer/index.js +0 -3
- package/dist/components/Menu/Menu.js +0 -56
- package/dist/components/Menu/index.js +0 -3
- package/dist/components/Modal/Modal.js +0 -60
- package/dist/components/Modal/index.js +0 -3
- package/dist/components/Radio/Radio.js +0 -10
- package/dist/components/Radio/index.js +0 -3
- package/dist/components/RadioList/RadioList.js +0 -38
- package/dist/components/RadioList/index.js +0 -3
- package/dist/components/Select/Select.js +0 -12
- package/dist/components/Select/index.js +0 -3
- package/dist/components/Sheet/Sheet.js +0 -6
- package/dist/components/Sheet/index.js +0 -3
- package/dist/components/Stack/Stack.js +0 -6
- package/dist/components/Stack/index.js +0 -3
- package/dist/components/Switch/Switch.js +0 -54
- package/dist/components/Switch/index.js +0 -3
- package/dist/components/Table/Table.js +0 -89
- package/dist/components/Table/index.js +0 -3
- package/dist/components/Tabs/Tabs.js +0 -18
- package/dist/components/Tabs/index.js +0 -3
- package/dist/components/Textarea/Textarea.js +0 -28
- package/dist/components/Textarea/index.js +0 -3
- package/dist/components/ThemeProvider/ThemeProvider.js +0 -54
- package/dist/components/ThemeProvider/index.js +0 -3
- package/dist/components/Tooltip/Tooltip.js +0 -28
- package/dist/components/Tooltip/index.js +0 -3
- package/dist/components/Typography/Typography.js +0 -28
- package/dist/components/Typography/index.js +0 -3
- package/dist/components/index.js +0 -33
package/dist/index.js
CHANGED
|
@@ -1,6 +1,1254 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
boxClasses,
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
1
|
+
// src/index.ts
|
|
2
|
+
import {
|
|
3
|
+
boxClasses,
|
|
4
|
+
buttonClasses,
|
|
5
|
+
checkboxClasses as checkboxClasses2,
|
|
6
|
+
dividerClasses,
|
|
7
|
+
iconButtonClasses,
|
|
8
|
+
inputClasses,
|
|
9
|
+
menuClasses,
|
|
10
|
+
menuButtonClasses,
|
|
11
|
+
menuItemClasses,
|
|
12
|
+
optionClasses,
|
|
13
|
+
radioClasses,
|
|
14
|
+
radioGroupClasses,
|
|
15
|
+
selectClasses,
|
|
16
|
+
switchClasses as switchClasses2,
|
|
17
|
+
tableClasses,
|
|
18
|
+
textareaClasses,
|
|
19
|
+
typographyClasses,
|
|
20
|
+
formControlClasses,
|
|
21
|
+
formLabelClasses,
|
|
22
|
+
formHelperTextClasses,
|
|
23
|
+
gridClasses,
|
|
24
|
+
stackClasses,
|
|
25
|
+
sheetClasses,
|
|
26
|
+
modalClasses,
|
|
27
|
+
modalCloseClasses,
|
|
28
|
+
modalDialogClasses,
|
|
29
|
+
modalOverflowClasses,
|
|
30
|
+
dialogTitleClasses,
|
|
31
|
+
dialogContentClasses,
|
|
32
|
+
dialogActionsClasses,
|
|
33
|
+
tooltipClasses,
|
|
34
|
+
tabsClasses,
|
|
35
|
+
tabListClasses,
|
|
36
|
+
tabPanelClasses,
|
|
37
|
+
accordionClasses,
|
|
38
|
+
accordionDetailsClasses,
|
|
39
|
+
accordionGroupClasses,
|
|
40
|
+
accordionSummaryClasses,
|
|
41
|
+
Autocomplete,
|
|
42
|
+
AutocompleteListbox,
|
|
43
|
+
AutocompleteOption,
|
|
44
|
+
autocompleteClasses,
|
|
45
|
+
autocompleteListboxClasses,
|
|
46
|
+
autocompleteOptionClasses,
|
|
47
|
+
Avatar,
|
|
48
|
+
avatarClasses,
|
|
49
|
+
AvatarGroup,
|
|
50
|
+
avatarGroupClasses,
|
|
51
|
+
AspectRatio,
|
|
52
|
+
aspectRatioClasses,
|
|
53
|
+
Badge,
|
|
54
|
+
badgeClasses,
|
|
55
|
+
Breadcrumbs,
|
|
56
|
+
breadcrumbsClasses,
|
|
57
|
+
Card,
|
|
58
|
+
cardClasses,
|
|
59
|
+
CardActions,
|
|
60
|
+
cardActionsClasses,
|
|
61
|
+
CardContent,
|
|
62
|
+
cardContentClasses,
|
|
63
|
+
CardCover,
|
|
64
|
+
cardCoverClasses,
|
|
65
|
+
CardOverflow,
|
|
66
|
+
cardOverflowClasses,
|
|
67
|
+
Chip,
|
|
68
|
+
chipClasses,
|
|
69
|
+
CircularProgress,
|
|
70
|
+
circularProgressClasses,
|
|
71
|
+
Drawer,
|
|
72
|
+
drawerClasses,
|
|
73
|
+
LinearProgress,
|
|
74
|
+
linearProgressClasses,
|
|
75
|
+
List,
|
|
76
|
+
listClasses,
|
|
77
|
+
ListDivider,
|
|
78
|
+
listDividerClasses,
|
|
79
|
+
ListItem,
|
|
80
|
+
listItemClasses,
|
|
81
|
+
ListItemButton,
|
|
82
|
+
listItemButtonClasses,
|
|
83
|
+
ListItemContent,
|
|
84
|
+
listItemContentClasses,
|
|
85
|
+
ListItemDecorator,
|
|
86
|
+
listItemDecoratorClasses,
|
|
87
|
+
ListSubheader,
|
|
88
|
+
listSubheaderClasses,
|
|
89
|
+
Link,
|
|
90
|
+
linkClasses,
|
|
91
|
+
Slider,
|
|
92
|
+
sliderClasses,
|
|
93
|
+
Step,
|
|
94
|
+
stepClasses,
|
|
95
|
+
StepButton,
|
|
96
|
+
stepButtonClasses,
|
|
97
|
+
StepIndicator,
|
|
98
|
+
Stepper,
|
|
99
|
+
stepperClasses,
|
|
100
|
+
Skeleton,
|
|
101
|
+
skeletonClasses
|
|
102
|
+
} from "@mui/joy";
|
|
103
|
+
|
|
104
|
+
// src/components/Accordions/Accordions.tsx
|
|
105
|
+
import React from "react";
|
|
106
|
+
import {
|
|
107
|
+
AccordionGroup as JoyAccordionGroup,
|
|
108
|
+
Accordion as JoyAccordion,
|
|
109
|
+
AccordionSummary as JoyAccordionSummary,
|
|
110
|
+
AccordionDetails as JoyAccordionDetails
|
|
111
|
+
} from "@mui/joy";
|
|
112
|
+
import { motion } from "framer-motion";
|
|
113
|
+
var MotionAccordionSummary = motion(JoyAccordionSummary);
|
|
114
|
+
var AccordionSummary = MotionAccordionSummary;
|
|
115
|
+
AccordionSummary.displayName = "AccordionSummary";
|
|
116
|
+
var MotionAccordionDetails = motion(JoyAccordionDetails);
|
|
117
|
+
var AccordionDetails = MotionAccordionDetails;
|
|
118
|
+
AccordionDetails.displayName = "AccordionDetails";
|
|
119
|
+
var MotionAccordion = motion(JoyAccordion);
|
|
120
|
+
function Accordion(props) {
|
|
121
|
+
const { summary, details, variant, color, ...innerProps } = props;
|
|
122
|
+
const inheritedVariant = variant === "solid" ? "solid" : void 0;
|
|
123
|
+
return /* @__PURE__ */ React.createElement(MotionAccordion, { variant: inheritedVariant, color, ...innerProps }, /* @__PURE__ */ React.createElement(AccordionSummary, { variant: inheritedVariant, color }, summary), /* @__PURE__ */ React.createElement(AccordionDetails, { variant: inheritedVariant, color }, details));
|
|
124
|
+
}
|
|
125
|
+
Accordion.displayName = "Accordion";
|
|
126
|
+
var MotionAccordions = motion(JoyAccordionGroup);
|
|
127
|
+
function Accordions(props) {
|
|
128
|
+
const { variant, color, items, ...innerProps } = props;
|
|
129
|
+
return /* @__PURE__ */ React.createElement(MotionAccordions, { variant, color, ...innerProps }, items.map((item, index) => /* @__PURE__ */ React.createElement(
|
|
130
|
+
Accordion,
|
|
131
|
+
{
|
|
132
|
+
summary: item.summary,
|
|
133
|
+
details: item.details,
|
|
134
|
+
index,
|
|
135
|
+
variant,
|
|
136
|
+
color
|
|
137
|
+
}
|
|
138
|
+
)));
|
|
139
|
+
}
|
|
140
|
+
Accordions.displayName = "Accordions";
|
|
141
|
+
|
|
142
|
+
// src/components/Box/Box.tsx
|
|
143
|
+
import { Box as JoyBox } from "@mui/joy";
|
|
144
|
+
import { motion as motion2 } from "framer-motion";
|
|
145
|
+
var MotionBox = motion2(JoyBox);
|
|
146
|
+
var Box = MotionBox;
|
|
147
|
+
Box.displayName = "Box";
|
|
148
|
+
|
|
149
|
+
// src/components/Box/index.ts
|
|
150
|
+
var Box_default = Box;
|
|
151
|
+
|
|
152
|
+
// src/components/Button/Button.tsx
|
|
153
|
+
import React2, { forwardRef } from "react";
|
|
154
|
+
import { Button as JoyButton } from "@mui/joy";
|
|
155
|
+
import { motion as motion3 } from "framer-motion";
|
|
156
|
+
var MotionButton = motion3(JoyButton);
|
|
157
|
+
var Button = forwardRef(
|
|
158
|
+
(props, ref) => {
|
|
159
|
+
return /* @__PURE__ */ React2.createElement(
|
|
160
|
+
MotionButton,
|
|
161
|
+
{
|
|
162
|
+
ref,
|
|
163
|
+
...props
|
|
164
|
+
}
|
|
165
|
+
);
|
|
166
|
+
}
|
|
167
|
+
);
|
|
168
|
+
Button.displayName = "Button";
|
|
169
|
+
|
|
170
|
+
// src/components/Button/index.ts
|
|
171
|
+
var Button_default = Button;
|
|
172
|
+
|
|
173
|
+
// src/components/Checkbox/Checkbox.tsx
|
|
174
|
+
import React3 from "react";
|
|
175
|
+
import { Checkbox as JoyCheckbox } from "@mui/joy";
|
|
176
|
+
import { motion as motion4 } from "framer-motion";
|
|
177
|
+
var MotionCheckbox = motion4(JoyCheckbox);
|
|
178
|
+
var Checkbox = (props) => {
|
|
179
|
+
return /* @__PURE__ */ React3.createElement(MotionCheckbox, { ...props });
|
|
180
|
+
};
|
|
181
|
+
Checkbox.displayName = "Checkbox";
|
|
182
|
+
|
|
183
|
+
// src/components/Checkbox/index.ts
|
|
184
|
+
var Checkbox_default = Checkbox;
|
|
185
|
+
|
|
186
|
+
// src/components/Container/Container.tsx
|
|
187
|
+
import { styled } from "@mui/joy";
|
|
188
|
+
import React4, { forwardRef as forwardRef2 } from "react";
|
|
189
|
+
var ContainerRoot = styled("div", {
|
|
190
|
+
name: "Container",
|
|
191
|
+
slot: "root",
|
|
192
|
+
shouldForwardProp: (prop) => prop !== "maxWidth"
|
|
193
|
+
})(({ theme, maxWidth = "lg" }) => ({
|
|
194
|
+
width: "100%",
|
|
195
|
+
marginLeft: "auto",
|
|
196
|
+
boxSizing: "border-box",
|
|
197
|
+
marginRight: "auto",
|
|
198
|
+
display: "block",
|
|
199
|
+
// Fix IE11 layout when used with main.
|
|
200
|
+
paddingLeft: theme.spacing(2),
|
|
201
|
+
paddingRight: theme.spacing(2),
|
|
202
|
+
...maxWidth === "sm" && {
|
|
203
|
+
[theme.breakpoints.up("xs")]: {
|
|
204
|
+
maxWidth: theme.breakpoints.values.sm
|
|
205
|
+
}
|
|
206
|
+
},
|
|
207
|
+
...maxWidth === "md" && {
|
|
208
|
+
[theme.breakpoints.up("sm")]: {
|
|
209
|
+
maxWidth: theme.breakpoints.values.md
|
|
210
|
+
}
|
|
211
|
+
},
|
|
212
|
+
...maxWidth === "lg" && {
|
|
213
|
+
[theme.breakpoints.up("md")]: {
|
|
214
|
+
maxWidth: theme.breakpoints.values.lg
|
|
215
|
+
}
|
|
216
|
+
},
|
|
217
|
+
...maxWidth === "xl" && {
|
|
218
|
+
[theme.breakpoints.up("lg")]: {
|
|
219
|
+
maxWidth: theme.breakpoints.values.xl
|
|
220
|
+
}
|
|
221
|
+
}
|
|
222
|
+
}));
|
|
223
|
+
var Container = forwardRef2(function Container2(props, ref) {
|
|
224
|
+
return /* @__PURE__ */ React4.createElement(ContainerRoot, { ref, ...props });
|
|
225
|
+
});
|
|
226
|
+
Container.displayName = "Container";
|
|
227
|
+
|
|
228
|
+
// src/components/DataTable/DataTable.tsx
|
|
229
|
+
import React7, {
|
|
230
|
+
useCallback,
|
|
231
|
+
useEffect,
|
|
232
|
+
useMemo,
|
|
233
|
+
useRef,
|
|
234
|
+
useState
|
|
235
|
+
} from "react";
|
|
236
|
+
|
|
237
|
+
// src/components/Sheet/Sheet.tsx
|
|
238
|
+
import { Sheet as JoySheet } from "@mui/joy";
|
|
239
|
+
import { motion as motion5 } from "framer-motion";
|
|
240
|
+
var MotionSheet = motion5(JoySheet);
|
|
241
|
+
var Sheet = MotionSheet;
|
|
242
|
+
Sheet.displayName = "Sheet";
|
|
243
|
+
|
|
244
|
+
// src/components/Sheet/index.ts
|
|
245
|
+
var Sheet_default = Sheet;
|
|
246
|
+
|
|
247
|
+
// src/components/Table/Table.tsx
|
|
248
|
+
import React5 from "react";
|
|
249
|
+
import { Table as JoyTable } from "@mui/joy";
|
|
250
|
+
var Table = (props) => {
|
|
251
|
+
const { children, ...inheritProps } = props;
|
|
252
|
+
return /* @__PURE__ */ React5.createElement(JoyTable, { ...inheritProps }, children);
|
|
253
|
+
};
|
|
254
|
+
Table.displayName = "Table";
|
|
255
|
+
function TableHead(props) {
|
|
256
|
+
const {
|
|
257
|
+
headCells,
|
|
258
|
+
showCheckbox,
|
|
259
|
+
onCheckboxChange,
|
|
260
|
+
slots: { checkbox: RenderCheckbox = Checkbox_default } = {},
|
|
261
|
+
slotProps: { checkbox: checkboxProps = {} } = {}
|
|
262
|
+
} = props;
|
|
263
|
+
return /* @__PURE__ */ React5.createElement("thead", null, /* @__PURE__ */ React5.createElement("tr", null, showCheckbox && /* @__PURE__ */ React5.createElement(
|
|
264
|
+
"th",
|
|
265
|
+
{
|
|
266
|
+
style: {
|
|
267
|
+
width: "40px",
|
|
268
|
+
textAlign: "center"
|
|
269
|
+
}
|
|
270
|
+
},
|
|
271
|
+
/* @__PURE__ */ React5.createElement(RenderCheckbox, { onChange: onCheckboxChange, ...checkboxProps })
|
|
272
|
+
), headCells.map((headCell) => /* @__PURE__ */ React5.createElement(
|
|
273
|
+
"th",
|
|
274
|
+
{
|
|
275
|
+
key: headCell.label,
|
|
276
|
+
style: {
|
|
277
|
+
width: headCell.width,
|
|
278
|
+
minWidth: headCell.minWidth,
|
|
279
|
+
maxWidth: headCell.maxWidth,
|
|
280
|
+
textAlign: headCell.numeric ? "right" : "left"
|
|
281
|
+
}
|
|
282
|
+
},
|
|
283
|
+
headCell.label
|
|
284
|
+
))));
|
|
285
|
+
}
|
|
286
|
+
TableHead.displayName = "TableHead";
|
|
287
|
+
function TableBody(props) {
|
|
288
|
+
const {
|
|
289
|
+
rows,
|
|
290
|
+
cellOrder,
|
|
291
|
+
rowOptions,
|
|
292
|
+
showCheckbox,
|
|
293
|
+
onCheckboxChange,
|
|
294
|
+
slots: { checkbox: RenderCheckbox = Checkbox_default } = {},
|
|
295
|
+
slotProps: { checkbox: checkboxProps = {} } = {}
|
|
296
|
+
} = props;
|
|
297
|
+
return /* @__PURE__ */ React5.createElement("tbody", null, rows.map((row, rowIndex) => /* @__PURE__ */ React5.createElement("tr", { key: rowIndex }, showCheckbox && /* @__PURE__ */ React5.createElement(
|
|
298
|
+
"td",
|
|
299
|
+
{
|
|
300
|
+
style: {
|
|
301
|
+
textAlign: "center"
|
|
302
|
+
}
|
|
303
|
+
},
|
|
304
|
+
/* @__PURE__ */ React5.createElement(
|
|
305
|
+
RenderCheckbox,
|
|
306
|
+
{
|
|
307
|
+
onChange: (event) => onCheckboxChange?.(event, rowIndex),
|
|
308
|
+
...checkboxProps
|
|
309
|
+
}
|
|
310
|
+
)
|
|
311
|
+
), cellOrder.map((cellKey) => /* @__PURE__ */ React5.createElement(
|
|
312
|
+
"td",
|
|
313
|
+
{
|
|
314
|
+
key: cellKey,
|
|
315
|
+
style: {
|
|
316
|
+
textAlign: rowOptions?.[cellKey]?.numeric ? "right" : "left"
|
|
317
|
+
}
|
|
318
|
+
},
|
|
319
|
+
row[cellKey]
|
|
320
|
+
)))));
|
|
321
|
+
}
|
|
322
|
+
TableBody.displayName = "TableBody";
|
|
323
|
+
|
|
324
|
+
// src/components/Stack/Stack.tsx
|
|
325
|
+
import { Stack as JoyStack } from "@mui/joy";
|
|
326
|
+
import { motion as motion6 } from "framer-motion";
|
|
327
|
+
var MotionStack = motion6(JoyStack);
|
|
328
|
+
var Stack = MotionStack;
|
|
329
|
+
Stack.displayName = "Stack";
|
|
330
|
+
|
|
331
|
+
// src/components/Stack/index.ts
|
|
332
|
+
var Stack_default = Stack;
|
|
333
|
+
|
|
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
|
+
// src/components/DataTable/DataTable.tsx
|
|
348
|
+
var numberFormatter = (value) => "Intl" in window ? new Intl.NumberFormat().format(value) : value;
|
|
349
|
+
function TablePagination(props) {
|
|
350
|
+
const {
|
|
351
|
+
paginationModel: { page, pageSize },
|
|
352
|
+
rowCount,
|
|
353
|
+
onPageChange
|
|
354
|
+
} = props;
|
|
355
|
+
const firstPage = 1;
|
|
356
|
+
const lastPage = Math.ceil(rowCount / pageSize);
|
|
357
|
+
const beforePages = [page - 2, page - 1].filter((p) => p > 1);
|
|
358
|
+
const afterPages = [page + 1, page + 2].filter((p) => p <= lastPage - 1);
|
|
359
|
+
const isMoreAfterPages = lastPage > 1 && page < lastPage - 3;
|
|
360
|
+
const isMoreBeforePages = lastPage > 1 && page > 4;
|
|
361
|
+
return /* @__PURE__ */ React7.createElement(
|
|
362
|
+
Stack_default,
|
|
363
|
+
{
|
|
364
|
+
direction: "row",
|
|
365
|
+
spacing: 1,
|
|
366
|
+
sx: {
|
|
367
|
+
pt: 1,
|
|
368
|
+
pb: 1
|
|
369
|
+
},
|
|
370
|
+
justifyContent: "end",
|
|
371
|
+
alignItems: "center"
|
|
372
|
+
},
|
|
373
|
+
/* @__PURE__ */ React7.createElement(Stack_default, { direction: "row", spacing: 0.5, alignItems: "center" }, /* @__PURE__ */ React7.createElement(
|
|
374
|
+
Button_default,
|
|
375
|
+
{
|
|
376
|
+
size: "sm",
|
|
377
|
+
variant: "plain",
|
|
378
|
+
color: "neutral",
|
|
379
|
+
onClick: () => onPageChange(page - 1),
|
|
380
|
+
disabled: page === firstPage,
|
|
381
|
+
"aria-label": "Previous page"
|
|
382
|
+
},
|
|
383
|
+
"<"
|
|
384
|
+
), page !== firstPage && /* @__PURE__ */ React7.createElement(
|
|
385
|
+
Button_default,
|
|
386
|
+
{
|
|
387
|
+
size: "sm",
|
|
388
|
+
variant: "plain",
|
|
389
|
+
color: "neutral",
|
|
390
|
+
onClick: () => onPageChange(firstPage)
|
|
391
|
+
},
|
|
392
|
+
firstPage
|
|
393
|
+
), isMoreBeforePages && /* @__PURE__ */ React7.createElement(
|
|
394
|
+
Button_default,
|
|
395
|
+
{
|
|
396
|
+
size: "sm",
|
|
397
|
+
variant: "plain",
|
|
398
|
+
color: "neutral",
|
|
399
|
+
onClick: () => onPageChange(page - 3)
|
|
400
|
+
},
|
|
401
|
+
"..."
|
|
402
|
+
), beforePages.map((p) => /* @__PURE__ */ React7.createElement(
|
|
403
|
+
Button_default,
|
|
404
|
+
{
|
|
405
|
+
key: p,
|
|
406
|
+
size: "sm",
|
|
407
|
+
variant: "plain",
|
|
408
|
+
color: "neutral",
|
|
409
|
+
onClick: () => onPageChange(p)
|
|
410
|
+
},
|
|
411
|
+
p
|
|
412
|
+
)), /* @__PURE__ */ React7.createElement(Button_default, { variant: "soft", size: "sm" }, page), afterPages.map((p) => /* @__PURE__ */ React7.createElement(
|
|
413
|
+
Button_default,
|
|
414
|
+
{
|
|
415
|
+
key: p,
|
|
416
|
+
size: "sm",
|
|
417
|
+
variant: "plain",
|
|
418
|
+
color: "neutral",
|
|
419
|
+
onClick: () => onPageChange(p)
|
|
420
|
+
},
|
|
421
|
+
p
|
|
422
|
+
)), isMoreAfterPages && /* @__PURE__ */ React7.createElement(
|
|
423
|
+
Button_default,
|
|
424
|
+
{
|
|
425
|
+
size: "sm",
|
|
426
|
+
variant: "plain",
|
|
427
|
+
color: "neutral",
|
|
428
|
+
onClick: () => onPageChange(page + 3)
|
|
429
|
+
},
|
|
430
|
+
"..."
|
|
431
|
+
), page !== lastPage && /* @__PURE__ */ React7.createElement(
|
|
432
|
+
Button_default,
|
|
433
|
+
{
|
|
434
|
+
size: "sm",
|
|
435
|
+
variant: "plain",
|
|
436
|
+
color: "neutral",
|
|
437
|
+
onClick: () => onPageChange(lastPage)
|
|
438
|
+
},
|
|
439
|
+
lastPage
|
|
440
|
+
), /* @__PURE__ */ React7.createElement(
|
|
441
|
+
Button_default,
|
|
442
|
+
{
|
|
443
|
+
size: "sm",
|
|
444
|
+
variant: "plain",
|
|
445
|
+
color: "neutral",
|
|
446
|
+
onClick: () => onPageChange(page + 1),
|
|
447
|
+
disabled: page === lastPage,
|
|
448
|
+
"aria-label": "Next page"
|
|
449
|
+
},
|
|
450
|
+
">"
|
|
451
|
+
))
|
|
452
|
+
);
|
|
453
|
+
}
|
|
454
|
+
var Resizer = (ref) => /* @__PURE__ */ React7.createElement(
|
|
455
|
+
Box_default,
|
|
456
|
+
{
|
|
457
|
+
sx: {
|
|
458
|
+
position: "absolute",
|
|
459
|
+
top: 0,
|
|
460
|
+
right: 0,
|
|
461
|
+
bottom: 0,
|
|
462
|
+
width: "4px",
|
|
463
|
+
cursor: "col-resize"
|
|
464
|
+
},
|
|
465
|
+
onMouseDown: (e) => {
|
|
466
|
+
const initialX = e.clientX;
|
|
467
|
+
const initialWidth = ref.current?.getBoundingClientRect().width;
|
|
468
|
+
const onMouseMove = (e2) => {
|
|
469
|
+
if (initialWidth && initialX) {
|
|
470
|
+
ref.current.style.width = `${initialWidth + (e2.clientX - initialX)}px`;
|
|
471
|
+
}
|
|
472
|
+
};
|
|
473
|
+
const onMouseUp = () => {
|
|
474
|
+
document.removeEventListener("mousemove", onMouseMove);
|
|
475
|
+
document.removeEventListener("mouseup", onMouseUp);
|
|
476
|
+
};
|
|
477
|
+
document.addEventListener("mousemove", onMouseMove);
|
|
478
|
+
document.addEventListener("mouseup", onMouseUp);
|
|
479
|
+
}
|
|
480
|
+
}
|
|
481
|
+
);
|
|
482
|
+
var HeadCell = (props) => {
|
|
483
|
+
const ref = useRef(null);
|
|
484
|
+
const style = {
|
|
485
|
+
width: props.width,
|
|
486
|
+
minWidth: props.minWidth ?? "50px",
|
|
487
|
+
maxWidth: props.maxWidth,
|
|
488
|
+
textAlign: props.type === "number" ? "end" : "start",
|
|
489
|
+
position: props.stickyHeader ? void 0 : "relative"
|
|
490
|
+
};
|
|
491
|
+
const resizer = props.resizable ?? true ? Resizer(ref) : null;
|
|
492
|
+
return /* @__PURE__ */ React7.createElement("th", { ref, key: props.field, style }, props.headerName ?? props.field, resizer);
|
|
493
|
+
};
|
|
494
|
+
function useDataTableRenderer({
|
|
495
|
+
rows,
|
|
496
|
+
columns,
|
|
497
|
+
rowCount: totalRowsProp,
|
|
498
|
+
paginationModel,
|
|
499
|
+
onPaginationModelChange,
|
|
500
|
+
selectionModel = [],
|
|
501
|
+
onSelectionModelChange,
|
|
502
|
+
stickyHeader
|
|
503
|
+
}) {
|
|
504
|
+
const [page, setPage] = useState(paginationModel?.page || 1);
|
|
505
|
+
const pageSize = paginationModel?.pageSize || 20;
|
|
506
|
+
const selectedModelSet = useMemo(
|
|
507
|
+
() => new Set(selectionModel),
|
|
508
|
+
[selectionModel]
|
|
509
|
+
);
|
|
510
|
+
const dataInPage = useMemo(
|
|
511
|
+
() => rows.slice((page - 1) * pageSize, (page - 1) * pageSize + pageSize),
|
|
512
|
+
[rows, page, pageSize]
|
|
513
|
+
);
|
|
514
|
+
const isAllSelected = useMemo(
|
|
515
|
+
() => dataInPage.length > 0 && dataInPage.every(
|
|
516
|
+
(_, i) => selectedModelSet.has(`${i + (page - 1) * pageSize}`)
|
|
517
|
+
),
|
|
518
|
+
[dataInPage, selectedModelSet, page, pageSize]
|
|
519
|
+
);
|
|
520
|
+
const rowCount = totalRowsProp || rows.length;
|
|
521
|
+
const isTotalSelected = useMemo(
|
|
522
|
+
() => rowCount > 0 && selectionModel.length === rowCount,
|
|
523
|
+
[selectionModel, rowCount]
|
|
524
|
+
);
|
|
525
|
+
const handlePageChange = useCallback(
|
|
526
|
+
(newPage) => {
|
|
527
|
+
setPage(newPage);
|
|
528
|
+
onPaginationModelChange?.({ page: newPage, pageSize });
|
|
529
|
+
},
|
|
530
|
+
[onPaginationModelChange]
|
|
531
|
+
);
|
|
532
|
+
useEffect(() => {
|
|
533
|
+
handlePageChange(1);
|
|
534
|
+
}, [rowCount]);
|
|
535
|
+
useEffect(() => {
|
|
536
|
+
if (page > Math.ceil(rowCount / pageSize)) {
|
|
537
|
+
handlePageChange(Math.ceil(rowCount / pageSize));
|
|
538
|
+
}
|
|
539
|
+
}, [rowCount, pageSize]);
|
|
540
|
+
useEffect(() => {
|
|
541
|
+
onSelectionModelChange?.([]);
|
|
542
|
+
}, [page]);
|
|
543
|
+
return {
|
|
544
|
+
rowCount,
|
|
545
|
+
page,
|
|
546
|
+
pageSize,
|
|
547
|
+
onPaginationModelChange: handlePageChange,
|
|
548
|
+
HeadCell,
|
|
549
|
+
// HeadCell: useCallback(
|
|
550
|
+
// (column: Column<any>) => {
|
|
551
|
+
// const ref = useRef<HTMLTableCellElement>(null);
|
|
552
|
+
// const style = {
|
|
553
|
+
// width: column.width,
|
|
554
|
+
// minWidth: column.minWidth ?? "50px",
|
|
555
|
+
// maxWidth: column.maxWidth,
|
|
556
|
+
// textAlign: column.type === "number" ? "end" : "start",
|
|
557
|
+
// position: stickyHeader ? undefined : "relative",
|
|
558
|
+
// } as React.CSSProperties;
|
|
559
|
+
// const resizer = column.resizable ?? true ? Resizer(ref) : null;
|
|
560
|
+
// return (
|
|
561
|
+
// <th ref={ref} key={column.field as string} style={style}>
|
|
562
|
+
// {column.headerName ?? (column.field as string)}
|
|
563
|
+
// {resizer}
|
|
564
|
+
// </th>
|
|
565
|
+
// );
|
|
566
|
+
// },
|
|
567
|
+
// [stickyHeader, columns]
|
|
568
|
+
// ),
|
|
569
|
+
dataInPage,
|
|
570
|
+
isAllSelected,
|
|
571
|
+
// all rows are selected on this page
|
|
572
|
+
isTotalSelected,
|
|
573
|
+
isSelectedRow: useCallback(
|
|
574
|
+
(model) => selectedModelSet.has(model),
|
|
575
|
+
[selectedModelSet]
|
|
576
|
+
),
|
|
577
|
+
onAllCheckboxChange: useCallback(() => {
|
|
578
|
+
onSelectionModelChange?.(
|
|
579
|
+
isAllSelected ? [] : dataInPage.map((_, i) => `${i + (page - 1) * pageSize}`)
|
|
580
|
+
);
|
|
581
|
+
}, [isAllSelected, dataInPage, onSelectionModelChange]),
|
|
582
|
+
onCheckboxChange: useCallback(
|
|
583
|
+
(event, selectedModel) => {
|
|
584
|
+
if (selectedModelSet.has(selectedModel)) {
|
|
585
|
+
const newSelectionModel = selectionModel.filter(
|
|
586
|
+
(model) => model !== selectedModel
|
|
587
|
+
);
|
|
588
|
+
onSelectionModelChange?.(newSelectionModel);
|
|
589
|
+
} else {
|
|
590
|
+
const newSelectionModel = [...selectionModel, selectedModel];
|
|
591
|
+
onSelectionModelChange?.(newSelectionModel);
|
|
592
|
+
}
|
|
593
|
+
},
|
|
594
|
+
[selectionModel, onSelectionModelChange]
|
|
595
|
+
),
|
|
596
|
+
columns: useMemo(
|
|
597
|
+
() => columns || // fallback
|
|
598
|
+
Object.keys(rows[0] || {}).map((key) => ({
|
|
599
|
+
field: key
|
|
600
|
+
})),
|
|
601
|
+
[rows, columns]
|
|
602
|
+
),
|
|
603
|
+
onTotalSelect: useCallback(() => {
|
|
604
|
+
onSelectionModelChange?.(
|
|
605
|
+
isTotalSelected ? [] : rows.map((_, i) => `${i}`)
|
|
606
|
+
);
|
|
607
|
+
}, [isTotalSelected, rows, onSelectionModelChange])
|
|
608
|
+
};
|
|
609
|
+
}
|
|
610
|
+
function DataTable(props) {
|
|
611
|
+
const {
|
|
612
|
+
rows,
|
|
613
|
+
checkboxSelection,
|
|
614
|
+
selectionModel,
|
|
615
|
+
onSelectionModelChange,
|
|
616
|
+
rowCount: _,
|
|
617
|
+
// rowCount is used in useDataTableRenderer
|
|
618
|
+
columns: __,
|
|
619
|
+
// columns is used in useDataTableRenderer
|
|
620
|
+
onPaginationModelChange: ___,
|
|
621
|
+
// onPaginationModelChange is used in useDataTableRenderer
|
|
622
|
+
paginationModel,
|
|
623
|
+
slots: {
|
|
624
|
+
checkbox: RenderCheckbox = Checkbox_default,
|
|
625
|
+
toolbar: Toolbar,
|
|
626
|
+
footer: Footer
|
|
627
|
+
} = {},
|
|
628
|
+
slotProps: {
|
|
629
|
+
checkbox: checkboxProps = {},
|
|
630
|
+
toolbar: toolbarProps,
|
|
631
|
+
background: backgroundProps = {}
|
|
632
|
+
} = {},
|
|
633
|
+
...innerProps
|
|
634
|
+
} = props;
|
|
635
|
+
const {
|
|
636
|
+
columns,
|
|
637
|
+
isAllSelected,
|
|
638
|
+
isSelectedRow,
|
|
639
|
+
onAllCheckboxChange,
|
|
640
|
+
onCheckboxChange,
|
|
641
|
+
rowCount,
|
|
642
|
+
page,
|
|
643
|
+
pageSize,
|
|
644
|
+
onPaginationModelChange,
|
|
645
|
+
dataInPage,
|
|
646
|
+
isTotalSelected,
|
|
647
|
+
onTotalSelect,
|
|
648
|
+
HeadCell: HeadCell2
|
|
649
|
+
} = useDataTableRenderer(props);
|
|
650
|
+
return /* @__PURE__ */ React7.createElement(Box_default, null, /* @__PURE__ */ React7.createElement(
|
|
651
|
+
Stack_default,
|
|
652
|
+
{
|
|
653
|
+
direction: "row",
|
|
654
|
+
sx: {
|
|
655
|
+
pt: 1,
|
|
656
|
+
pb: 1
|
|
657
|
+
},
|
|
658
|
+
justifyContent: "space-between",
|
|
659
|
+
alignItems: "center"
|
|
660
|
+
},
|
|
661
|
+
/* @__PURE__ */ React7.createElement(Stack_default, { direction: "row", spacing: 1 }, !isAllSelected && /* @__PURE__ */ React7.createElement(Typography_default, { level: "body-xs" }, numberFormatter(selectionModel?.length || 0), " items selected"), isAllSelected && !isTotalSelected && /* @__PURE__ */ React7.createElement(Stack_default, { direction: "row", spacing: 1, alignItems: "center" }, /* @__PURE__ */ React7.createElement(Typography_default, { level: "body-xs" }, "All ", numberFormatter(selectionModel?.length || 0), " items on this page are selected."), /* @__PURE__ */ React7.createElement(Button_default, { size: "sm", variant: "plain", onClick: onTotalSelect }, "Select all ", numberFormatter(rows.length), " items")), isTotalSelected && /* @__PURE__ */ React7.createElement(Stack_default, { direction: "row", spacing: 1, alignItems: "center" }, /* @__PURE__ */ React7.createElement(Typography_default, { level: "body-xs" }, "All ", numberFormatter(rows.length), " items are selected."), /* @__PURE__ */ React7.createElement(
|
|
662
|
+
Button_default,
|
|
663
|
+
{
|
|
664
|
+
size: "sm",
|
|
665
|
+
variant: "plain",
|
|
666
|
+
color: "danger",
|
|
667
|
+
onClick: onTotalSelect
|
|
668
|
+
},
|
|
669
|
+
"Cancel"
|
|
670
|
+
))),
|
|
671
|
+
Toolbar && /* @__PURE__ */ React7.createElement(Toolbar, { ...toolbarProps || {} })
|
|
672
|
+
), /* @__PURE__ */ React7.createElement(
|
|
673
|
+
Sheet_default,
|
|
674
|
+
{
|
|
675
|
+
variant: "outlined",
|
|
676
|
+
sx: {
|
|
677
|
+
overflow: "auto",
|
|
678
|
+
width: "100%",
|
|
679
|
+
boxShadow: "sm",
|
|
680
|
+
borderRadius: "sm"
|
|
681
|
+
},
|
|
682
|
+
...backgroundProps
|
|
683
|
+
},
|
|
684
|
+
/* @__PURE__ */ React7.createElement(Table, { ...innerProps }, /* @__PURE__ */ React7.createElement("thead", null, /* @__PURE__ */ React7.createElement("tr", null, checkboxSelection && /* @__PURE__ */ React7.createElement(
|
|
685
|
+
"th",
|
|
686
|
+
{
|
|
687
|
+
style: {
|
|
688
|
+
width: "40px",
|
|
689
|
+
textAlign: "center"
|
|
690
|
+
}
|
|
691
|
+
},
|
|
692
|
+
/* @__PURE__ */ React7.createElement(
|
|
693
|
+
RenderCheckbox,
|
|
694
|
+
{
|
|
695
|
+
onChange: onAllCheckboxChange,
|
|
696
|
+
checked: isAllSelected,
|
|
697
|
+
indeterminate: (selectionModel || []).length > 0 && !isAllSelected,
|
|
698
|
+
...checkboxProps
|
|
699
|
+
}
|
|
700
|
+
)
|
|
701
|
+
), columns.map((c) => /* @__PURE__ */ React7.createElement(
|
|
702
|
+
HeadCell2,
|
|
703
|
+
{
|
|
704
|
+
key: c.field,
|
|
705
|
+
stickyHeader: props.stickyHeader,
|
|
706
|
+
...c
|
|
707
|
+
}
|
|
708
|
+
)))), /* @__PURE__ */ React7.createElement("tbody", null, dataInPage.map((row, rowIndex) => {
|
|
709
|
+
const rowId = `${rowIndex + (page - 1) * pageSize}`;
|
|
710
|
+
return /* @__PURE__ */ React7.createElement(
|
|
711
|
+
"tr",
|
|
712
|
+
{
|
|
713
|
+
key: rowId,
|
|
714
|
+
role: checkboxSelection ? "checkbox" : void 0,
|
|
715
|
+
tabIndex: checkboxSelection ? -1 : void 0,
|
|
716
|
+
onClick: checkboxSelection ? (e) => onCheckboxChange(e, rowId) : void 0,
|
|
717
|
+
"aria-checked": checkboxSelection ? isSelectedRow(rowId) : void 0
|
|
718
|
+
},
|
|
719
|
+
checkboxSelection && /* @__PURE__ */ React7.createElement(
|
|
720
|
+
"th",
|
|
721
|
+
{
|
|
722
|
+
scope: "row",
|
|
723
|
+
style: {
|
|
724
|
+
textAlign: "center"
|
|
725
|
+
}
|
|
726
|
+
},
|
|
727
|
+
/* @__PURE__ */ React7.createElement(
|
|
728
|
+
RenderCheckbox,
|
|
729
|
+
{
|
|
730
|
+
onChange: (e) => onCheckboxChange(e, rowId),
|
|
731
|
+
checked: isSelectedRow(rowId),
|
|
732
|
+
...checkboxProps
|
|
733
|
+
}
|
|
734
|
+
)
|
|
735
|
+
),
|
|
736
|
+
columns.map((column) => /* @__PURE__ */ React7.createElement(
|
|
737
|
+
"td",
|
|
738
|
+
{
|
|
739
|
+
key: column.field,
|
|
740
|
+
style: {
|
|
741
|
+
textAlign: column.type === "number" ? "end" : "start"
|
|
742
|
+
}
|
|
743
|
+
},
|
|
744
|
+
row[column.field]
|
|
745
|
+
))
|
|
746
|
+
);
|
|
747
|
+
})), Footer && /* @__PURE__ */ React7.createElement(Footer, null))
|
|
748
|
+
), /* @__PURE__ */ React7.createElement(
|
|
749
|
+
TablePagination,
|
|
750
|
+
{
|
|
751
|
+
paginationModel: { page, pageSize },
|
|
752
|
+
rowCount,
|
|
753
|
+
onPageChange: onPaginationModelChange
|
|
754
|
+
}
|
|
755
|
+
));
|
|
756
|
+
}
|
|
757
|
+
DataTable.displayName = "DataTable";
|
|
758
|
+
|
|
759
|
+
// src/components/DialogActions/DialogActions.tsx
|
|
760
|
+
import { DialogActions as JoyDialogActions } from "@mui/joy";
|
|
761
|
+
import { motion as motion8 } from "framer-motion";
|
|
762
|
+
var MotionDialogActions = motion8(JoyDialogActions);
|
|
763
|
+
var DialogActions = MotionDialogActions;
|
|
764
|
+
DialogActions.displayName = "DialogActions";
|
|
765
|
+
|
|
766
|
+
// src/components/DialogActions/index.ts
|
|
767
|
+
var DialogActions_default = DialogActions;
|
|
768
|
+
|
|
769
|
+
// src/components/DialogContent/DialogContent.tsx
|
|
770
|
+
import { DialogContent as JoyDialogContent } from "@mui/joy";
|
|
771
|
+
import { motion as motion9 } from "framer-motion";
|
|
772
|
+
var MotionDialogContent = motion9(JoyDialogContent);
|
|
773
|
+
var DialogContent = MotionDialogContent;
|
|
774
|
+
DialogContent.displayName = "DialogContent";
|
|
775
|
+
|
|
776
|
+
// src/components/DialogContent/index.ts
|
|
777
|
+
var DialogContent_default = DialogContent;
|
|
778
|
+
|
|
779
|
+
// src/components/DialogTitle/DialogTitle.tsx
|
|
780
|
+
import { DialogTitle as JoyDialogTitle } from "@mui/joy";
|
|
781
|
+
import { motion as motion10 } from "framer-motion";
|
|
782
|
+
var MotionDialogTitle = motion10(JoyDialogTitle);
|
|
783
|
+
var DialogTitle = MotionDialogTitle;
|
|
784
|
+
DialogTitle.displayName = "DialogTitle";
|
|
785
|
+
|
|
786
|
+
// src/components/DialogTitle/index.ts
|
|
787
|
+
var DialogTitle_default = DialogTitle;
|
|
788
|
+
|
|
789
|
+
// src/components/DialogFrame/DialogFrame.tsx
|
|
790
|
+
import React9 from "react";
|
|
791
|
+
|
|
792
|
+
// src/components/Modal/Modal.tsx
|
|
793
|
+
import React8 from "react";
|
|
794
|
+
import {
|
|
795
|
+
Modal as JoyModal,
|
|
796
|
+
ModalDialog as JoyModalDialog,
|
|
797
|
+
ModalClose as JoyModalClose,
|
|
798
|
+
ModalOverflow as JoyModalOverflow
|
|
799
|
+
} from "@mui/joy";
|
|
800
|
+
import { motion as motion11 } from "framer-motion";
|
|
801
|
+
var MotionModal = motion11(JoyModal);
|
|
802
|
+
var Modal = MotionModal;
|
|
803
|
+
Modal.displayName = "Modal";
|
|
804
|
+
var MotionModalDialog = motion11(JoyModalDialog);
|
|
805
|
+
var ModalDialog = MotionModalDialog;
|
|
806
|
+
ModalDialog.displayName = "ModalDialog";
|
|
807
|
+
var MotionModalClose = motion11(JoyModalClose);
|
|
808
|
+
var ModalClose = MotionModalClose;
|
|
809
|
+
ModalClose.displayName = "ModalClose";
|
|
810
|
+
var MotionModalOverflow = motion11(JoyModalOverflow);
|
|
811
|
+
var ModalOverflow = MotionModalOverflow;
|
|
812
|
+
ModalOverflow.displayName = "ModalOverflow";
|
|
813
|
+
function ModalFrame(props) {
|
|
814
|
+
const { title, children, ...innerProps } = props;
|
|
815
|
+
return /* @__PURE__ */ React8.createElement(ModalDialog, { ...innerProps }, /* @__PURE__ */ React8.createElement(ModalClose, null), /* @__PURE__ */ React8.createElement(DialogTitle_default, null, title), /* @__PURE__ */ React8.createElement(DialogContent_default, null, children));
|
|
816
|
+
}
|
|
817
|
+
ModalFrame.displayName = "ModalFrame";
|
|
818
|
+
|
|
819
|
+
// src/components/DialogFrame/DialogFrame.tsx
|
|
820
|
+
function DialogFrame(props) {
|
|
821
|
+
const { title, children, actions, ...innerProps } = props;
|
|
822
|
+
return /* @__PURE__ */ React9.createElement(ModalDialog, { ...innerProps }, /* @__PURE__ */ React9.createElement(DialogTitle_default, null, title), /* @__PURE__ */ React9.createElement(DialogContent_default, null, children), /* @__PURE__ */ React9.createElement(DialogActions_default, null, actions));
|
|
823
|
+
}
|
|
824
|
+
DialogFrame.displayName = "DialogFrame";
|
|
825
|
+
|
|
826
|
+
// src/components/Divider/Divider.tsx
|
|
827
|
+
import React10 from "react";
|
|
828
|
+
import { Divider as JoyDivider } from "@mui/joy";
|
|
829
|
+
import { motion as motion12 } from "framer-motion";
|
|
830
|
+
var MotionDivider = motion12(JoyDivider);
|
|
831
|
+
var Divider = (props) => {
|
|
832
|
+
return /* @__PURE__ */ React10.createElement(MotionDivider, { ...props });
|
|
833
|
+
};
|
|
834
|
+
Divider.displayName = "Divider";
|
|
835
|
+
|
|
836
|
+
// src/components/InsetDrawer/InsetDrawer.tsx
|
|
837
|
+
import React11 from "react";
|
|
838
|
+
import { Drawer as JoyDrawer } from "@mui/joy";
|
|
839
|
+
import { motion as motion13 } from "framer-motion";
|
|
840
|
+
var MotionDrawer = motion13(JoyDrawer);
|
|
841
|
+
var InsetDrawer = (props) => {
|
|
842
|
+
const { children, ...innerProps } = props;
|
|
843
|
+
return /* @__PURE__ */ React11.createElement(
|
|
844
|
+
MotionDrawer,
|
|
845
|
+
{
|
|
846
|
+
...innerProps,
|
|
847
|
+
slotProps: {
|
|
848
|
+
...innerProps.slotProps,
|
|
849
|
+
content: {
|
|
850
|
+
...innerProps.slotProps?.content,
|
|
851
|
+
sx: {
|
|
852
|
+
bgcolor: "transparent",
|
|
853
|
+
p: { md: 3, sm: 0 },
|
|
854
|
+
boxShadow: "none"
|
|
855
|
+
}
|
|
856
|
+
}
|
|
857
|
+
}
|
|
858
|
+
},
|
|
859
|
+
children
|
|
860
|
+
);
|
|
861
|
+
};
|
|
862
|
+
InsetDrawer.displayName = "InsetDrawer";
|
|
863
|
+
|
|
864
|
+
// src/components/Dropdown/Dropdown.tsx
|
|
865
|
+
import { Dropdown as JoyDropdown } from "@mui/joy";
|
|
866
|
+
import { motion as motion14 } from "framer-motion";
|
|
867
|
+
var MotionDropdown = motion14(JoyDropdown);
|
|
868
|
+
var Dropdown = MotionDropdown;
|
|
869
|
+
Dropdown.displayName = "Dropdown";
|
|
870
|
+
|
|
871
|
+
// src/components/FormControl/FormControl.tsx
|
|
872
|
+
import { FormControl as JoyFormControl } from "@mui/joy";
|
|
873
|
+
import { motion as motion15 } from "framer-motion";
|
|
874
|
+
var MotionFormControl = motion15(JoyFormControl);
|
|
875
|
+
var FormControl = MotionFormControl;
|
|
876
|
+
FormControl.displayName = "FormControl";
|
|
877
|
+
|
|
878
|
+
// src/components/FormHelperText/FormHelperText.tsx
|
|
879
|
+
import { FormHelperText as JoyFormHelperText } from "@mui/joy";
|
|
880
|
+
import { motion as motion16 } from "framer-motion";
|
|
881
|
+
var MotionFormHelperText = motion16(JoyFormHelperText);
|
|
882
|
+
var FormHelperText = MotionFormHelperText;
|
|
883
|
+
FormHelperText.displayName = "FormHelperText";
|
|
884
|
+
|
|
885
|
+
// src/components/FormLabel/FormLabel.tsx
|
|
886
|
+
import { FormLabel as JoyFormLabel } from "@mui/joy";
|
|
887
|
+
import { motion as motion17 } from "framer-motion";
|
|
888
|
+
var MotionFormLabel = motion17(JoyFormLabel);
|
|
889
|
+
var FormLabel = MotionFormLabel;
|
|
890
|
+
FormLabel.displayName = "FormLabel";
|
|
891
|
+
|
|
892
|
+
// src/components/Grid/Grid.tsx
|
|
893
|
+
import { Grid as JoyGrid } from "@mui/joy";
|
|
894
|
+
import { motion as motion18 } from "framer-motion";
|
|
895
|
+
var MotionGrid = motion18(JoyGrid);
|
|
896
|
+
var Grid = MotionGrid;
|
|
897
|
+
Grid.displayName = "Grid";
|
|
898
|
+
|
|
899
|
+
// src/components/IconButton/IconButton.tsx
|
|
900
|
+
import React12 from "react";
|
|
901
|
+
import { IconButton as JoyIconButton } from "@mui/joy";
|
|
902
|
+
import { motion as motion19 } from "framer-motion";
|
|
903
|
+
var MotionIconButton = motion19(JoyIconButton);
|
|
904
|
+
var IconButton = (props) => {
|
|
905
|
+
return /* @__PURE__ */ React12.createElement(MotionIconButton, { ...props });
|
|
906
|
+
};
|
|
907
|
+
IconButton.displayName = "IconButton";
|
|
908
|
+
|
|
909
|
+
// src/components/Input/Input.tsx
|
|
910
|
+
import React13 from "react";
|
|
911
|
+
import { Input as JoyInput } from "@mui/joy";
|
|
912
|
+
import { motion as motion20 } from "framer-motion";
|
|
913
|
+
var MotionInput = motion20(JoyInput);
|
|
914
|
+
var Input = (props) => {
|
|
915
|
+
return /* @__PURE__ */ React13.createElement(MotionInput, { ...props });
|
|
916
|
+
};
|
|
917
|
+
Input.displayName = "Input";
|
|
918
|
+
|
|
919
|
+
// src/components/Menu/Menu.tsx
|
|
920
|
+
import React14 from "react";
|
|
921
|
+
import {
|
|
922
|
+
Menu as JoyMenu,
|
|
923
|
+
MenuButton as JoyMenuButton,
|
|
924
|
+
MenuItem as JoyMenuItem
|
|
925
|
+
} from "@mui/joy";
|
|
926
|
+
import { motion as motion21 } from "framer-motion";
|
|
927
|
+
var MotionMenu = motion21(JoyMenu);
|
|
928
|
+
var Menu = (props) => {
|
|
929
|
+
return /* @__PURE__ */ React14.createElement(MotionMenu, { ...props });
|
|
930
|
+
};
|
|
931
|
+
Menu.displayName = "Menu";
|
|
932
|
+
var MotionMenuButton = motion21(JoyMenuButton);
|
|
933
|
+
var MenuButton = (props) => {
|
|
934
|
+
return /* @__PURE__ */ React14.createElement(MotionMenuButton, { ...props });
|
|
935
|
+
};
|
|
936
|
+
MenuButton.displayName = "MenuButton";
|
|
937
|
+
var MotionMenuItem = motion21(JoyMenuItem);
|
|
938
|
+
var MenuItem = (props) => {
|
|
939
|
+
return /* @__PURE__ */ React14.createElement(MotionMenuItem, { ...props });
|
|
940
|
+
};
|
|
941
|
+
MenuItem.displayName = "MenuItem";
|
|
942
|
+
|
|
943
|
+
// src/components/Radio/Radio.tsx
|
|
944
|
+
import { Radio as JoyRadio, RadioGroup as JoyRadioGroup } from "@mui/joy";
|
|
945
|
+
import { motion as motion22 } from "framer-motion";
|
|
946
|
+
var MotionRadio = motion22(JoyRadio);
|
|
947
|
+
var Radio = MotionRadio;
|
|
948
|
+
Radio.displayName = "Radio";
|
|
949
|
+
var MotionRadioGroup = motion22(JoyRadioGroup);
|
|
950
|
+
var RadioGroup = MotionRadioGroup;
|
|
951
|
+
RadioGroup.displayName = "RadioGroup";
|
|
952
|
+
|
|
953
|
+
// src/components/RadioList/RadioList.tsx
|
|
954
|
+
import React15 from "react";
|
|
955
|
+
function RadioList(props) {
|
|
956
|
+
const { items, ...innerProps } = props;
|
|
957
|
+
return /* @__PURE__ */ React15.createElement(RadioGroup, { ...innerProps }, items.map((item) => /* @__PURE__ */ React15.createElement(Radio, { key: `${item.value}`, value: item.value, label: item.label })));
|
|
958
|
+
}
|
|
959
|
+
RadioList.displayName = "RadioList";
|
|
960
|
+
|
|
961
|
+
// src/components/Select/Select.tsx
|
|
962
|
+
import { Select as JoySelect, Option as JoyOption } from "@mui/joy";
|
|
963
|
+
import { motion as motion23 } from "framer-motion";
|
|
964
|
+
var MotionSelect = motion23(JoySelect);
|
|
965
|
+
var Select = MotionSelect;
|
|
966
|
+
Select.displayName = "Select";
|
|
967
|
+
var MotionOption = motion23(JoyOption);
|
|
968
|
+
var Option = MotionOption;
|
|
969
|
+
Option.displayName = "Option";
|
|
970
|
+
|
|
971
|
+
// src/components/Switch/Switch.tsx
|
|
972
|
+
import React16 from "react";
|
|
973
|
+
import {
|
|
974
|
+
Switch as JoySwitch,
|
|
975
|
+
styled as styled2,
|
|
976
|
+
switchClasses
|
|
977
|
+
} from "@mui/joy";
|
|
978
|
+
import { motion as motion24 } from "framer-motion";
|
|
979
|
+
var MotionSwitch = motion24(JoySwitch);
|
|
980
|
+
var StyledThumb = styled2(motion24.div)({
|
|
981
|
+
"--Icon-fontSize": "calc(var(--Switch-thumbSize) * 0.75)",
|
|
982
|
+
display: "inline-flex",
|
|
983
|
+
justifyContent: "center",
|
|
984
|
+
alignItems: "center",
|
|
985
|
+
position: "absolute",
|
|
986
|
+
left: "var(--Switch-thumbOffset)",
|
|
987
|
+
width: "var(--Switch-thumbWidth)",
|
|
988
|
+
height: "var(--Switch-thumbSize)",
|
|
989
|
+
borderRadius: "var(--Switch-thumbRadius)",
|
|
990
|
+
boxShadow: "var(--Switch-thumbShadow)",
|
|
991
|
+
color: "var(--Switch-thumbColor)",
|
|
992
|
+
backgroundColor: "var(--Switch-thumbBackground)",
|
|
993
|
+
[`&.${switchClasses.checked}`]: {
|
|
994
|
+
left: "unset",
|
|
995
|
+
right: "var(--Switch-thumbOffset)"
|
|
996
|
+
}
|
|
997
|
+
});
|
|
998
|
+
var Thumb = (props) => /* @__PURE__ */ React16.createElement(StyledThumb, { ...props, layout: true, transition: spring });
|
|
999
|
+
var spring = {
|
|
1000
|
+
type: "spring",
|
|
1001
|
+
stiffness: 700,
|
|
1002
|
+
damping: 30
|
|
1003
|
+
};
|
|
1004
|
+
var Switch = (props) => {
|
|
1005
|
+
return /* @__PURE__ */ React16.createElement(
|
|
1006
|
+
MotionSwitch,
|
|
1007
|
+
{
|
|
1008
|
+
...props,
|
|
1009
|
+
slots: {
|
|
1010
|
+
thumb: Thumb,
|
|
1011
|
+
...props.slots
|
|
1012
|
+
}
|
|
1013
|
+
}
|
|
1014
|
+
);
|
|
1015
|
+
};
|
|
1016
|
+
Switch.displayName = "Switch";
|
|
1017
|
+
|
|
1018
|
+
// src/components/Tabs/Tabs.tsx
|
|
1019
|
+
import { Tabs as JoyTabs, Tab as JoyTab, TabList as JoyTabList, TabPanel as JoyTabPanel } from "@mui/joy";
|
|
1020
|
+
import { motion as motion25 } from "framer-motion";
|
|
1021
|
+
var MotionTabs = motion25(JoyTabs);
|
|
1022
|
+
var Tabs = MotionTabs;
|
|
1023
|
+
Tabs.displayName = "Tabs";
|
|
1024
|
+
var MotionTab = motion25(JoyTab);
|
|
1025
|
+
var Tab = MotionTab;
|
|
1026
|
+
Tab.displayName = "Tab";
|
|
1027
|
+
var MotionTabList = motion25(JoyTabList);
|
|
1028
|
+
var TabList = MotionTabList;
|
|
1029
|
+
TabList.displayName = "TabList";
|
|
1030
|
+
var MotionTabPanel = motion25(JoyTabPanel);
|
|
1031
|
+
var TabPanel = MotionTabPanel;
|
|
1032
|
+
TabPanel.displayName = "TabPanel";
|
|
1033
|
+
|
|
1034
|
+
// src/components/Textarea/Textarea.tsx
|
|
1035
|
+
import React17 from "react";
|
|
1036
|
+
import { Textarea as JoyTextarea } from "@mui/joy";
|
|
1037
|
+
import { motion as motion26 } from "framer-motion";
|
|
1038
|
+
var MotionTextarea = motion26(JoyTextarea);
|
|
1039
|
+
var Textarea = (props) => {
|
|
1040
|
+
return /* @__PURE__ */ React17.createElement(MotionTextarea, { ...props });
|
|
1041
|
+
};
|
|
1042
|
+
Textarea.displayName = "Textarea";
|
|
1043
|
+
|
|
1044
|
+
// src/components/ThemeProvider/ThemeProvider.tsx
|
|
1045
|
+
import React18 from "react";
|
|
1046
|
+
import {
|
|
1047
|
+
CssBaseline,
|
|
1048
|
+
CssVarsProvider,
|
|
1049
|
+
checkboxClasses,
|
|
1050
|
+
extendTheme
|
|
1051
|
+
} from "@mui/joy";
|
|
1052
|
+
var defaultTheme = extendTheme({
|
|
1053
|
+
cssVarPrefix: "ceed",
|
|
1054
|
+
components: {
|
|
1055
|
+
JoyTable: {
|
|
1056
|
+
defaultProps: {
|
|
1057
|
+
size: "sm",
|
|
1058
|
+
borderAxis: "bothBetween"
|
|
1059
|
+
},
|
|
1060
|
+
styleOverrides: {
|
|
1061
|
+
root: ({ theme }) => ({
|
|
1062
|
+
"--TableRow-stripeBackground": theme.palette.background.level1,
|
|
1063
|
+
"--TableCell-selectedBackground": theme.palette.background.level2,
|
|
1064
|
+
"--TableRow-hoverBackground": theme.palette.background.level3,
|
|
1065
|
+
"& tbody tr[aria-checked=false] th": {
|
|
1066
|
+
"--TableCell-headBackground": "transparent"
|
|
1067
|
+
},
|
|
1068
|
+
"& tbody tr[aria-checked=true]:hover th": {
|
|
1069
|
+
"--TableCell-headBackground": "var(--TableRow-hoverBackground)"
|
|
1070
|
+
},
|
|
1071
|
+
[`& tbody tr[aria-checked=true]:not(:hover) th`]: {
|
|
1072
|
+
"--TableCell-headBackground": "var(--TableCell-selectedBackground)"
|
|
1073
|
+
},
|
|
1074
|
+
[`& tbody tr[aria-checked=true]:not(:hover) td`]: {
|
|
1075
|
+
"--TableCell-dataBackground": "var(--TableCell-selectedBackground)"
|
|
1076
|
+
},
|
|
1077
|
+
[`& .${checkboxClasses.root}`]: {
|
|
1078
|
+
verticalAlign: "middle"
|
|
1079
|
+
}
|
|
1080
|
+
})
|
|
1081
|
+
}
|
|
1082
|
+
},
|
|
1083
|
+
JoyTooltip: {
|
|
1084
|
+
defaultProps: {
|
|
1085
|
+
size: "sm",
|
|
1086
|
+
placement: "top"
|
|
1087
|
+
}
|
|
1088
|
+
}
|
|
1089
|
+
}
|
|
1090
|
+
});
|
|
1091
|
+
function ThemeProvider(props) {
|
|
1092
|
+
return /* @__PURE__ */ React18.createElement(React18.Fragment, null, /* @__PURE__ */ React18.createElement(CssVarsProvider, { theme: defaultTheme }, /* @__PURE__ */ React18.createElement(CssBaseline, null), props.children));
|
|
1093
|
+
}
|
|
1094
|
+
ThemeProvider.displayName = "ThemeProvider";
|
|
1095
|
+
|
|
1096
|
+
// src/components/Tooltip/Tooltip.tsx
|
|
1097
|
+
import React19 from "react";
|
|
1098
|
+
import { Tooltip as JoyTooltip } from "@mui/joy";
|
|
1099
|
+
import { motion as motion27 } from "framer-motion";
|
|
1100
|
+
var MotionTooltip = motion27(JoyTooltip);
|
|
1101
|
+
var Tooltip = (props) => {
|
|
1102
|
+
return /* @__PURE__ */ React19.createElement(MotionTooltip, { ...props });
|
|
1103
|
+
};
|
|
1104
|
+
Tooltip.displayName = "Tooltip";
|
|
1105
|
+
export {
|
|
1106
|
+
Accordion,
|
|
1107
|
+
AccordionDetails,
|
|
1108
|
+
AccordionSummary,
|
|
1109
|
+
Accordions,
|
|
1110
|
+
AspectRatio,
|
|
1111
|
+
Autocomplete,
|
|
1112
|
+
AutocompleteListbox,
|
|
1113
|
+
AutocompleteOption,
|
|
1114
|
+
Avatar,
|
|
1115
|
+
AvatarGroup,
|
|
1116
|
+
Badge,
|
|
1117
|
+
Box,
|
|
1118
|
+
Breadcrumbs,
|
|
1119
|
+
Button,
|
|
1120
|
+
Card,
|
|
1121
|
+
CardActions,
|
|
1122
|
+
CardContent,
|
|
1123
|
+
CardCover,
|
|
1124
|
+
CardOverflow,
|
|
1125
|
+
Checkbox,
|
|
1126
|
+
Chip,
|
|
1127
|
+
CircularProgress,
|
|
1128
|
+
Container,
|
|
1129
|
+
DataTable,
|
|
1130
|
+
DialogActions,
|
|
1131
|
+
DialogContent,
|
|
1132
|
+
DialogFrame,
|
|
1133
|
+
DialogTitle,
|
|
1134
|
+
Divider,
|
|
1135
|
+
Drawer,
|
|
1136
|
+
Dropdown,
|
|
1137
|
+
FormControl,
|
|
1138
|
+
FormHelperText,
|
|
1139
|
+
FormLabel,
|
|
1140
|
+
Grid,
|
|
1141
|
+
IconButton,
|
|
1142
|
+
Input,
|
|
1143
|
+
InsetDrawer,
|
|
1144
|
+
LinearProgress,
|
|
1145
|
+
Link,
|
|
1146
|
+
List,
|
|
1147
|
+
ListDivider,
|
|
1148
|
+
ListItem,
|
|
1149
|
+
ListItemButton,
|
|
1150
|
+
ListItemContent,
|
|
1151
|
+
ListItemDecorator,
|
|
1152
|
+
ListSubheader,
|
|
1153
|
+
Menu,
|
|
1154
|
+
MenuButton,
|
|
1155
|
+
MenuItem,
|
|
1156
|
+
Modal,
|
|
1157
|
+
ModalClose,
|
|
1158
|
+
ModalDialog,
|
|
1159
|
+
ModalFrame,
|
|
1160
|
+
ModalOverflow,
|
|
1161
|
+
Option,
|
|
1162
|
+
Radio,
|
|
1163
|
+
RadioGroup,
|
|
1164
|
+
RadioList,
|
|
1165
|
+
Select,
|
|
1166
|
+
Sheet,
|
|
1167
|
+
Skeleton,
|
|
1168
|
+
Slider,
|
|
1169
|
+
Stack,
|
|
1170
|
+
Step,
|
|
1171
|
+
StepButton,
|
|
1172
|
+
StepIndicator,
|
|
1173
|
+
Stepper,
|
|
1174
|
+
Switch,
|
|
1175
|
+
Tab,
|
|
1176
|
+
TabList,
|
|
1177
|
+
TabPanel,
|
|
1178
|
+
Table,
|
|
1179
|
+
TableBody,
|
|
1180
|
+
TableHead,
|
|
1181
|
+
Tabs,
|
|
1182
|
+
Textarea,
|
|
1183
|
+
ThemeProvider,
|
|
1184
|
+
Tooltip,
|
|
1185
|
+
Typography,
|
|
1186
|
+
accordionClasses,
|
|
1187
|
+
accordionDetailsClasses,
|
|
1188
|
+
accordionSummaryClasses,
|
|
1189
|
+
accordionGroupClasses as accordionsClasses,
|
|
1190
|
+
aspectRatioClasses,
|
|
1191
|
+
autocompleteClasses,
|
|
1192
|
+
autocompleteListboxClasses,
|
|
1193
|
+
autocompleteOptionClasses,
|
|
1194
|
+
avatarClasses,
|
|
1195
|
+
avatarGroupClasses,
|
|
1196
|
+
badgeClasses,
|
|
1197
|
+
boxClasses,
|
|
1198
|
+
breadcrumbsClasses,
|
|
1199
|
+
buttonClasses,
|
|
1200
|
+
cardActionsClasses,
|
|
1201
|
+
cardClasses,
|
|
1202
|
+
cardContentClasses,
|
|
1203
|
+
cardCoverClasses,
|
|
1204
|
+
cardOverflowClasses,
|
|
1205
|
+
checkboxClasses2 as checkboxClasses,
|
|
1206
|
+
chipClasses,
|
|
1207
|
+
circularProgressClasses,
|
|
1208
|
+
dialogActionsClasses,
|
|
1209
|
+
dialogContentClasses,
|
|
1210
|
+
dialogTitleClasses,
|
|
1211
|
+
dividerClasses,
|
|
1212
|
+
drawerClasses,
|
|
1213
|
+
formControlClasses,
|
|
1214
|
+
formHelperTextClasses,
|
|
1215
|
+
formLabelClasses,
|
|
1216
|
+
gridClasses,
|
|
1217
|
+
iconButtonClasses,
|
|
1218
|
+
inputClasses,
|
|
1219
|
+
linearProgressClasses,
|
|
1220
|
+
linkClasses,
|
|
1221
|
+
listClasses,
|
|
1222
|
+
listDividerClasses,
|
|
1223
|
+
listItemButtonClasses,
|
|
1224
|
+
listItemClasses,
|
|
1225
|
+
listItemContentClasses,
|
|
1226
|
+
listItemDecoratorClasses,
|
|
1227
|
+
listSubheaderClasses,
|
|
1228
|
+
menuButtonClasses,
|
|
1229
|
+
menuClasses,
|
|
1230
|
+
menuItemClasses,
|
|
1231
|
+
modalClasses,
|
|
1232
|
+
modalCloseClasses,
|
|
1233
|
+
modalDialogClasses,
|
|
1234
|
+
modalOverflowClasses,
|
|
1235
|
+
optionClasses,
|
|
1236
|
+
radioClasses,
|
|
1237
|
+
radioGroupClasses,
|
|
1238
|
+
selectClasses,
|
|
1239
|
+
sheetClasses,
|
|
1240
|
+
skeletonClasses,
|
|
1241
|
+
sliderClasses,
|
|
1242
|
+
stackClasses,
|
|
1243
|
+
stepButtonClasses,
|
|
1244
|
+
stepClasses,
|
|
1245
|
+
stepperClasses,
|
|
1246
|
+
switchClasses2 as switchClasses,
|
|
1247
|
+
tabListClasses,
|
|
1248
|
+
tabPanelClasses,
|
|
1249
|
+
tableClasses,
|
|
1250
|
+
tabsClasses,
|
|
1251
|
+
textareaClasses,
|
|
1252
|
+
tooltipClasses,
|
|
1253
|
+
typographyClasses
|
|
1254
|
+
};
|