@ceed/ads 0.0.14-0 → 0.0.14
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/DataTable/DataTable.d.ts +23 -0
- package/dist/components/DataTable/DataTable.js +93 -0
- package/dist/components/DataTable/index.d.ts +3 -0
- package/dist/components/DataTable/index.js +3 -0
- package/dist/components/DialogActions/DialogActions.d.ts +1 -1
- package/dist/components/InsetDrawer/InsetDrawer.d.ts +8 -0
- package/dist/components/{FilterDrawer/FilterDrawer.js → InsetDrawer/InsetDrawer.js} +6 -26
- package/dist/components/InsetDrawer/index.d.ts +3 -0
- package/dist/components/InsetDrawer/index.js +3 -0
- package/dist/components/Modal/Modal.d.ts +11 -3
- package/dist/components/Modal/Modal.js +42 -0
- package/dist/components/Table/Table.d.ts +2 -0
- package/dist/components/Table/Table.js +2 -0
- package/dist/components/index.d.ts +3 -2
- package/dist/components/index.js +3 -2
- package/dist/index.d.ts +1 -1
- package/dist/index.js +1 -1
- package/framer/index.js +251 -162
- package/package.json +3 -5
- package/dist/components/FilterDrawer/FilterDrawer.d.ts +0 -21
- package/dist/components/FilterDrawer/index.d.ts +0 -3
- package/dist/components/FilterDrawer/index.js +0 -3
- package/framer-export.js +0 -15
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import React, { ComponentProps } from "react";
|
|
2
|
+
import { Table, TableBody, TableHead } from "../Table";
|
|
3
|
+
declare function DataTable<T extends Record<string, unknown>>(props: {
|
|
4
|
+
data: T[];
|
|
5
|
+
showCheckbox?: boolean;
|
|
6
|
+
slots?: {
|
|
7
|
+
checkbox?: React.ElementType;
|
|
8
|
+
toolbar?: React.ElementType;
|
|
9
|
+
};
|
|
10
|
+
slotProps?: {
|
|
11
|
+
checkbox?: Partial<{
|
|
12
|
+
checked: boolean;
|
|
13
|
+
[key: string]: any;
|
|
14
|
+
}>;
|
|
15
|
+
toolbar?: Partial<{
|
|
16
|
+
[key: string]: any;
|
|
17
|
+
}>;
|
|
18
|
+
};
|
|
19
|
+
} & ComponentProps<typeof Table> & Pick<ComponentProps<typeof TableHead>, "headCells"> & Pick<ComponentProps<typeof TableBody>, "cellOrder">): React.JSX.Element;
|
|
20
|
+
declare namespace DataTable {
|
|
21
|
+
var displayName: string;
|
|
22
|
+
}
|
|
23
|
+
export { DataTable };
|
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
var __assign = (this && this.__assign) || function () {
|
|
2
|
+
__assign = Object.assign || function(t) {
|
|
3
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
4
|
+
s = arguments[i];
|
|
5
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
6
|
+
t[p] = s[p];
|
|
7
|
+
}
|
|
8
|
+
return t;
|
|
9
|
+
};
|
|
10
|
+
return __assign.apply(this, arguments);
|
|
11
|
+
};
|
|
12
|
+
var __rest = (this && this.__rest) || function (s, e) {
|
|
13
|
+
var t = {};
|
|
14
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
15
|
+
t[p] = s[p];
|
|
16
|
+
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
17
|
+
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
18
|
+
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
19
|
+
t[p[i]] = s[p[i]];
|
|
20
|
+
}
|
|
21
|
+
return t;
|
|
22
|
+
};
|
|
23
|
+
import React, { useMemo } from "react";
|
|
24
|
+
import Sheet from "../Sheet";
|
|
25
|
+
import { Table, TableHead } from "../Table";
|
|
26
|
+
import Checkbox from "../Checkbox";
|
|
27
|
+
function useDataTableRenderer(_a) {
|
|
28
|
+
var data = _a.data, cellOrder = _a.cellOrder, headCells = _a.headCells;
|
|
29
|
+
return {
|
|
30
|
+
renderCellOrder: useMemo(function () { return cellOrder || Object.keys(data[0] || {}); }, [data, cellOrder]),
|
|
31
|
+
renderHeadCells: useMemo(function () {
|
|
32
|
+
return headCells ||
|
|
33
|
+
// fallback
|
|
34
|
+
Object.keys(data[0] || {}).map(function (key) { return ({
|
|
35
|
+
label: key,
|
|
36
|
+
}); });
|
|
37
|
+
}, [data, headCells]),
|
|
38
|
+
};
|
|
39
|
+
}
|
|
40
|
+
function DataTable(props) {
|
|
41
|
+
// prop destruction
|
|
42
|
+
var data = props.data, showCheckbox = props.showCheckbox, headCells = props.headCells, cellOrder = props.cellOrder, _a = props.slots, _b = _a === void 0 ? {} : _a, _c = _b.checkbox, RenderCheckbox = _c === void 0 ? Checkbox : _c, Toolbar = _b.toolbar, _d = props.slotProps, _e = _d === void 0 ? {} : _d, _f = _e.checkbox, checkboxProps = _f === void 0 ? {} : _f, toolbarProps = _e.toolbar, innerProps = __rest(props, ["data", "showCheckbox", "headCells", "cellOrder", "slots", "slotProps"]);
|
|
43
|
+
// lib hooks
|
|
44
|
+
var _g = useDataTableRenderer({
|
|
45
|
+
data: data,
|
|
46
|
+
cellOrder: cellOrder,
|
|
47
|
+
headCells: headCells,
|
|
48
|
+
}), renderCellOrder = _g.renderCellOrder, renderHeadCells = _g.renderHeadCells;
|
|
49
|
+
// state, ref, querystring hooks
|
|
50
|
+
// form hooks
|
|
51
|
+
// query hooks
|
|
52
|
+
// calculated values
|
|
53
|
+
// effects
|
|
54
|
+
// handlers
|
|
55
|
+
return (React.createElement(Sheet, { variant: "outlined", sx: {
|
|
56
|
+
overflow: "auto",
|
|
57
|
+
width: "100%",
|
|
58
|
+
boxShadow: "sm",
|
|
59
|
+
borderRadius: "sm",
|
|
60
|
+
} },
|
|
61
|
+
Toolbar && React.createElement(Toolbar, __assign({}, (toolbarProps || {}))),
|
|
62
|
+
React.createElement(Table, __assign({ sx: [
|
|
63
|
+
showCheckbox
|
|
64
|
+
? {
|
|
65
|
+
"& tr > *:first-of-type": {
|
|
66
|
+
position: "sticky",
|
|
67
|
+
left: 0,
|
|
68
|
+
boxShadow: "1px 0 var(--TableCell-borderColor)",
|
|
69
|
+
bgcolor: "background.surface",
|
|
70
|
+
},
|
|
71
|
+
}
|
|
72
|
+
: {},
|
|
73
|
+
{
|
|
74
|
+
"--TableCell-headBackground": "transparent",
|
|
75
|
+
"--TableCell-selectedBackground": function (theme) {
|
|
76
|
+
return theme.vars.palette.success.softBg;
|
|
77
|
+
},
|
|
78
|
+
},
|
|
79
|
+
] }, innerProps),
|
|
80
|
+
React.createElement(TableHead, { showCheckbox: showCheckbox, headCells: renderHeadCells || [] }),
|
|
81
|
+
React.createElement("tbody", null, data.map(function (row, rowIndex) { return (React.createElement("tr", { key: rowIndex },
|
|
82
|
+
showCheckbox && (React.createElement("td", { style: {
|
|
83
|
+
textAlign: "center",
|
|
84
|
+
} },
|
|
85
|
+
React.createElement(RenderCheckbox
|
|
86
|
+
// onChange={(event: any) =>
|
|
87
|
+
// onCheckboxChange?.(event, rowIndex)
|
|
88
|
+
// }
|
|
89
|
+
, __assign({}, checkboxProps)))),
|
|
90
|
+
renderCellOrder.map(function (cellKey) { return (React.createElement("td", { key: cellKey }, row[cellKey])); }))); })))));
|
|
91
|
+
}
|
|
92
|
+
export { DataTable };
|
|
93
|
+
DataTable.displayName = "DataTable";
|
|
@@ -6,5 +6,5 @@ declare const DialogActions: import("framer-motion").CustomDomComponent<{
|
|
|
6
6
|
sx?: import("@mui/joy/styles/types").SxProps | undefined;
|
|
7
7
|
} & import("@mui/joy").DialogActionsSlotsAndSlotProps & Omit<Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & {
|
|
8
8
|
ref?: ((instance: HTMLDivElement | null) => void) | React.RefObject<HTMLDivElement> | null | undefined;
|
|
9
|
-
}, "children" | "sx" | "
|
|
9
|
+
}, "children" | "sx" | "orientation" | "buttonFlex" | keyof import("@mui/joy").DialogActionsSlotsAndSlotProps>>;
|
|
10
10
|
export { DialogActions };
|
|
@@ -21,18 +21,13 @@ var __rest = (this && this.__rest) || function (s, e) {
|
|
|
21
21
|
return t;
|
|
22
22
|
};
|
|
23
23
|
import React from "react";
|
|
24
|
-
import { Drawer as JoyDrawer
|
|
24
|
+
import { Drawer as JoyDrawer } from "@mui/joy";
|
|
25
25
|
import { motion } from "framer-motion";
|
|
26
|
-
import Sheet from "../Sheet";
|
|
27
|
-
import DialogTitle from "../DialogTitle";
|
|
28
|
-
import { ModalClose } from "../Modal";
|
|
29
|
-
import Divider from "../Divider";
|
|
30
|
-
import DialogContent from "../DialogContent";
|
|
31
26
|
var MotionDrawer = motion(JoyDrawer);
|
|
32
|
-
var
|
|
27
|
+
var InsetDrawer = function (props) {
|
|
33
28
|
var _a;
|
|
34
29
|
// prop destruction
|
|
35
|
-
var children = props.children,
|
|
30
|
+
var children = props.children, innerProps = __rest(props, ["children"]);
|
|
36
31
|
// lib hooks
|
|
37
32
|
// state, ref, querystring hooks
|
|
38
33
|
// form hooks
|
|
@@ -44,22 +39,7 @@ var FilterDrawer = function (props) {
|
|
|
44
39
|
bgcolor: "transparent",
|
|
45
40
|
p: { md: 3, sm: 0 },
|
|
46
41
|
boxShadow: "none",
|
|
47
|
-
} }) }) }),
|
|
48
|
-
React.createElement(Sheet, { sx: {
|
|
49
|
-
borderRadius: "md",
|
|
50
|
-
p: 2,
|
|
51
|
-
display: "flex",
|
|
52
|
-
flexDirection: "column",
|
|
53
|
-
gap: 2,
|
|
54
|
-
height: "100%",
|
|
55
|
-
overflow: "auto",
|
|
56
|
-
} },
|
|
57
|
-
React.createElement(DialogTitle, null, title),
|
|
58
|
-
React.createElement(ModalClose, null),
|
|
59
|
-
React.createElement(Divider, { sx: { mt: "auto" } }),
|
|
60
|
-
React.createElement(DialogContent, null, children),
|
|
61
|
-
actions && React.createElement(Divider, { sx: { mt: "auto" } }),
|
|
62
|
-
actions)));
|
|
42
|
+
} }) }) }), children));
|
|
63
43
|
};
|
|
64
|
-
export {
|
|
65
|
-
|
|
44
|
+
export { InsetDrawer };
|
|
45
|
+
InsetDrawer.displayName = "InsetDrawer";
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import React from "react";
|
|
2
|
-
declare const Modal: import("framer-motion").CustomDomComponent<Pick<import("@mui/base").ModalOwnProps, "children" | "container" | "disableAutoFocus" | "disableEnforceFocus" | "disableEscapeKeyDown" | "disablePortal" | "disableRestoreFocus" | "disableScrollLock" | "hideBackdrop" | "keepMounted"
|
|
2
|
+
declare const Modal: import("framer-motion").CustomDomComponent<Pick<import("@mui/base").ModalOwnProps, "children" | "container" | "open" | "disableAutoFocus" | "disableEnforceFocus" | "disableEscapeKeyDown" | "disablePortal" | "disableRestoreFocus" | "disableScrollLock" | "hideBackdrop" | "keepMounted"> & {
|
|
3
3
|
onClose?: ((event: {}, reason: "backdropClick" | "escapeKeyDown" | "closeClick") => void) | undefined;
|
|
4
4
|
sx?: import("@mui/joy/styles/types").SxProps | undefined;
|
|
5
5
|
} & import("@mui/joy").ModalSlotsAndSlotProps & Omit<Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & {
|
|
6
6
|
ref?: ((instance: HTMLDivElement | null) => void) | React.RefObject<HTMLDivElement> | null | undefined;
|
|
7
|
-
}, "children" | "container" | "sx" | "
|
|
7
|
+
}, "children" | "container" | "sx" | "open" | "onClose" | "disableAutoFocus" | "disableEnforceFocus" | "disableEscapeKeyDown" | "disablePortal" | "disableRestoreFocus" | "disableScrollLock" | "hideBackdrop" | "keepMounted" | keyof import("@mui/joy").ModalSlotsAndSlotProps>>;
|
|
8
8
|
export { Modal };
|
|
9
9
|
declare const ModalDialog: import("framer-motion").CustomDomComponent<{
|
|
10
10
|
children?: React.ReactNode;
|
|
@@ -19,7 +19,7 @@ declare const ModalDialog: import("framer-motion").CustomDomComponent<{
|
|
|
19
19
|
variant?: import("@mui/types").OverridableStringUnion<import("@mui/joy").VariantProp, import("@mui/joy").ModalDialogPropsVariantOverrides> | undefined;
|
|
20
20
|
} & import("@mui/joy").ModalDialogSlotsAndSlotProps & Omit<Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & {
|
|
21
21
|
ref?: ((instance: HTMLDivElement | null) => void) | React.RefObject<HTMLDivElement> | null | undefined;
|
|
22
|
-
}, "children" | "layout" | "color" | "maxWidth" | "minWidth" | "sx" | "size" | "variant" | "
|
|
22
|
+
}, "children" | "layout" | "color" | "maxWidth" | "minWidth" | "sx" | "size" | "variant" | "invertedColors" | "orientation" | keyof import("@mui/joy").ModalDialogSlotsAndSlotProps>>;
|
|
23
23
|
export { ModalDialog };
|
|
24
24
|
declare const ModalClose: import("framer-motion").CustomDomComponent<{
|
|
25
25
|
color?: import("@mui/types").OverridableStringUnion<import("@mui/joy").ColorPaletteProp, import("@mui/joy").ModalClosePropsColorOverrides> | undefined;
|
|
@@ -36,3 +36,11 @@ declare const ModalOverflow: import("framer-motion").CustomDomComponent<{
|
|
|
36
36
|
ref?: ((instance: HTMLDivElement | null) => void) | React.RefObject<HTMLDivElement> | null | undefined;
|
|
37
37
|
}, "sx" | keyof import("@mui/joy").ModalOverflowSlotsAndSlotProps>>;
|
|
38
38
|
export { ModalOverflow };
|
|
39
|
+
declare function ModalFrame(props: {
|
|
40
|
+
title: React.ReactNode;
|
|
41
|
+
children: React.ReactNode;
|
|
42
|
+
} & React.ComponentProps<typeof ModalDialog>): React.JSX.Element;
|
|
43
|
+
declare namespace ModalFrame {
|
|
44
|
+
var displayName: string;
|
|
45
|
+
}
|
|
46
|
+
export { ModalFrame };
|
|
@@ -1,5 +1,30 @@
|
|
|
1
|
+
var __assign = (this && this.__assign) || function () {
|
|
2
|
+
__assign = Object.assign || function(t) {
|
|
3
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
4
|
+
s = arguments[i];
|
|
5
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
6
|
+
t[p] = s[p];
|
|
7
|
+
}
|
|
8
|
+
return t;
|
|
9
|
+
};
|
|
10
|
+
return __assign.apply(this, arguments);
|
|
11
|
+
};
|
|
12
|
+
var __rest = (this && this.__rest) || function (s, e) {
|
|
13
|
+
var t = {};
|
|
14
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
15
|
+
t[p] = s[p];
|
|
16
|
+
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
17
|
+
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
18
|
+
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
19
|
+
t[p[i]] = s[p[i]];
|
|
20
|
+
}
|
|
21
|
+
return t;
|
|
22
|
+
};
|
|
23
|
+
import React from "react";
|
|
1
24
|
import { Modal as JoyModal, ModalDialog as JoyModalDialog, ModalClose as JoyModalClose, ModalOverflow as JoyModalOverflow, } from "@mui/joy";
|
|
2
25
|
import { motion } from "framer-motion";
|
|
26
|
+
import DialogTitle from "../DialogTitle";
|
|
27
|
+
import DialogContent from "../DialogContent";
|
|
3
28
|
var MotionModal = motion(JoyModal);
|
|
4
29
|
var Modal = MotionModal;
|
|
5
30
|
export { Modal };
|
|
@@ -16,3 +41,20 @@ var MotionModalOverflow = motion(JoyModalOverflow);
|
|
|
16
41
|
var ModalOverflow = MotionModalOverflow;
|
|
17
42
|
export { ModalOverflow };
|
|
18
43
|
ModalOverflow.displayName = "ModalOverflow";
|
|
44
|
+
function ModalFrame(props) {
|
|
45
|
+
// prop destruction
|
|
46
|
+
var title = props.title, children = props.children, innerProps = __rest(props, ["title", "children"]);
|
|
47
|
+
// lib hooks
|
|
48
|
+
// state, ref, querystring hooks
|
|
49
|
+
// form hooks
|
|
50
|
+
// query hooks
|
|
51
|
+
// calculated values
|
|
52
|
+
// effects
|
|
53
|
+
// handlers
|
|
54
|
+
return (React.createElement(ModalDialog, __assign({}, innerProps),
|
|
55
|
+
React.createElement(ModalClose, null),
|
|
56
|
+
React.createElement(DialogTitle, null, title),
|
|
57
|
+
React.createElement(DialogContent, null, children)));
|
|
58
|
+
}
|
|
59
|
+
export { ModalFrame };
|
|
60
|
+
ModalFrame.displayName = "ModalFrame";
|
|
@@ -56,6 +56,8 @@ function TableHead(props) {
|
|
|
56
56
|
React.createElement(RenderCheckbox, __assign({ onChange: onCheckboxChange }, checkboxProps)))),
|
|
57
57
|
headCells.map(function (headCell) { return (React.createElement("th", { key: headCell.label, style: {
|
|
58
58
|
width: headCell.width,
|
|
59
|
+
minWidth: headCell.minWidth,
|
|
60
|
+
maxWidth: headCell.maxWidth,
|
|
59
61
|
textAlign: headCell.numeric ? "right" : "left",
|
|
60
62
|
} }, headCell.label)); }))));
|
|
61
63
|
}
|
|
@@ -2,11 +2,12 @@ export { Box } from "./Box";
|
|
|
2
2
|
export { Button } from "./Button";
|
|
3
3
|
export { Checkbox } from "./Checkbox";
|
|
4
4
|
export { Container } from "./Container";
|
|
5
|
+
export { DataTable } from "./DataTable";
|
|
5
6
|
export { DialogActions } from "./DialogActions";
|
|
6
7
|
export { DialogContent } from "./DialogContent";
|
|
7
8
|
export { DialogTitle } from "./DialogTitle";
|
|
8
9
|
export { Divider } from "./Divider";
|
|
9
|
-
export {
|
|
10
|
+
export { InsetDrawer } from "./InsetDrawer";
|
|
10
11
|
export { Dropdown } from "./Dropdown";
|
|
11
12
|
export { FormControl } from "./FormControl";
|
|
12
13
|
export { FormHelperText } from "./FormHelperText";
|
|
@@ -15,7 +16,7 @@ export { Grid } from "./Grid";
|
|
|
15
16
|
export { IconButton } from "./IconButton";
|
|
16
17
|
export { Input } from "./Input";
|
|
17
18
|
export { Menu, MenuButton, MenuItem } from "./Menu";
|
|
18
|
-
export { Modal, ModalClose, ModalDialog, ModalOverflow } from "./Modal";
|
|
19
|
+
export { Modal, ModalClose, ModalDialog, ModalOverflow, ModalFrame } from "./Modal";
|
|
19
20
|
export { Radio, RadioGroup } from "./Radio";
|
|
20
21
|
export { Select, Option } from "./Select";
|
|
21
22
|
export { Sheet } from "./Sheet";
|
package/dist/components/index.js
CHANGED
|
@@ -2,11 +2,12 @@ export { Box } from "./Box";
|
|
|
2
2
|
export { Button } from "./Button";
|
|
3
3
|
export { Checkbox } from "./Checkbox";
|
|
4
4
|
export { Container } from "./Container";
|
|
5
|
+
export { DataTable } from "./DataTable";
|
|
5
6
|
export { DialogActions } from "./DialogActions";
|
|
6
7
|
export { DialogContent } from "./DialogContent";
|
|
7
8
|
export { DialogTitle } from "./DialogTitle";
|
|
8
9
|
export { Divider } from "./Divider";
|
|
9
|
-
export {
|
|
10
|
+
export { InsetDrawer } from "./InsetDrawer";
|
|
10
11
|
export { Dropdown } from "./Dropdown";
|
|
11
12
|
export { FormControl } from "./FormControl";
|
|
12
13
|
export { FormHelperText } from "./FormHelperText";
|
|
@@ -15,7 +16,7 @@ export { Grid } from "./Grid";
|
|
|
15
16
|
export { IconButton } from "./IconButton";
|
|
16
17
|
export { Input } from "./Input";
|
|
17
18
|
export { Menu, MenuButton, MenuItem } from "./Menu";
|
|
18
|
-
export { Modal, ModalClose, ModalDialog, ModalOverflow } from "./Modal";
|
|
19
|
+
export { Modal, ModalClose, ModalDialog, ModalOverflow, ModalFrame } from "./Modal";
|
|
19
20
|
export { Radio, RadioGroup } from "./Radio";
|
|
20
21
|
export { Select, Option } from "./Select";
|
|
21
22
|
export { Sheet } from "./Sheet";
|
package/dist/index.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
export { boxClasses, buttonClasses, checkboxClasses, dividerClasses, iconButtonClasses, inputClasses, menuClasses, menuButtonClasses, menuItemClasses, optionClasses, radioClasses, radioGroupClasses, selectClasses, switchClasses, tableClasses, textareaClasses, typographyClasses, formControlClasses, formLabelClasses, formHelperTextClasses, gridClasses, stackClasses, sheetClasses, modalClasses, modalCloseClasses, modalDialogClasses, modalOverflowClasses, dialogTitleClasses, dialogContentClasses, dialogActionsClasses, tooltipClasses, tabsClasses, tabListClasses, tabPanelClasses, Accordion, accordionClasses, AccordionDetails, accordionDetailsClasses, AccordionGroup, accordionGroupClasses, AccordionSummary, accordionSummaryClasses, Avatar, avatarClasses, AvatarGroup, avatarGroupClasses, AspectRatio, aspectRatioClasses, Badge, badgeClasses, Breadcrumbs, breadcrumbsClasses, Card, cardClasses, CardActions, cardActionsClasses, CardContent, cardContentClasses, CardCover, cardCoverClasses, CardOverflow, cardOverflowClasses, Chip, chipClasses, CircularProgress, circularProgressClasses, Drawer, drawerClasses, LinearProgress, linearProgressClasses, List, listClasses, ListDivider, listDividerClasses, ListItem, listItemClasses, ListItemButton, listItemButtonClasses, ListItemContent, listItemContentClasses, ListItemDecorator, listItemDecoratorClasses, ListSubheader, listSubheaderClasses, Link, linkClasses, Slider, sliderClasses, Step, stepClasses, StepButton, stepButtonClasses, StepIndicator, Stepper, stepperClasses, Skeleton, skeletonClasses, } from "@mui/joy";
|
|
2
|
-
export { Box, Button, Checkbox, Container, DialogActions, DialogContent, DialogTitle, Divider, Dropdown,
|
|
2
|
+
export { Box, Button, Checkbox, Container, DataTable, DialogActions, DialogContent, DialogTitle, Divider, Dropdown, InsetDrawer, FormControl, FormHelperText, FormLabel, Grid, IconButton, Input, Menu, MenuButton, MenuItem, Modal, ModalClose, ModalDialog, ModalOverflow, ModalFrame, Radio, RadioGroup, Select, Option, Sheet, Stack, Switch, Table, TableHead, TableBody, Tabs, Tab, TabList, TabPanel, Textarea, ThemeProvider, Tooltip, Typography, } from "./components";
|
package/dist/index.js
CHANGED
|
@@ -3,4 +3,4 @@ export {
|
|
|
3
3
|
boxClasses, buttonClasses, checkboxClasses, dividerClasses, iconButtonClasses, inputClasses, menuClasses, menuButtonClasses, menuItemClasses, optionClasses, radioClasses, radioGroupClasses, selectClasses, switchClasses, tableClasses, textareaClasses, typographyClasses, formControlClasses, formLabelClasses, formHelperTextClasses, gridClasses, stackClasses, sheetClasses, modalClasses, modalCloseClasses, modalDialogClasses, modalOverflowClasses, dialogTitleClasses, dialogContentClasses, dialogActionsClasses, tooltipClasses, tabsClasses, tabListClasses, tabPanelClasses,
|
|
4
4
|
// Pure JoyUI
|
|
5
5
|
Accordion, accordionClasses, AccordionDetails, accordionDetailsClasses, AccordionGroup, accordionGroupClasses, AccordionSummary, accordionSummaryClasses, Avatar, avatarClasses, AvatarGroup, avatarGroupClasses, AspectRatio, aspectRatioClasses, Badge, badgeClasses, Breadcrumbs, breadcrumbsClasses, Card, cardClasses, CardActions, cardActionsClasses, CardContent, cardContentClasses, CardCover, cardCoverClasses, CardOverflow, cardOverflowClasses, Chip, chipClasses, CircularProgress, circularProgressClasses, Drawer, drawerClasses, LinearProgress, linearProgressClasses, List, listClasses, ListDivider, listDividerClasses, ListItem, listItemClasses, ListItemButton, listItemButtonClasses, ListItemContent, listItemContentClasses, ListItemDecorator, listItemDecoratorClasses, ListSubheader, listSubheaderClasses, Link, linkClasses, Slider, sliderClasses, Step, stepClasses, StepButton, stepButtonClasses, StepIndicator, Stepper, stepperClasses, Skeleton, skeletonClasses, } from "@mui/joy";
|
|
6
|
-
export { Box, Button, Checkbox, Container, DialogActions, DialogContent, DialogTitle, Divider, Dropdown,
|
|
6
|
+
export { Box, Button, Checkbox, Container, DataTable, DialogActions, DialogContent, DialogTitle, Divider, Dropdown, InsetDrawer, FormControl, FormHelperText, FormLabel, Grid, IconButton, Input, Menu, MenuButton, MenuItem, Modal, ModalClose, ModalDialog, ModalOverflow, ModalFrame, Radio, RadioGroup, Select, Option, Sheet, Stack, Switch, Table, TableHead, TableBody, Tabs, Tab, TabList, TabPanel, Textarea, ThemeProvider, Tooltip, Typography, } from "./components";
|
package/framer/index.js
CHANGED
|
@@ -31835,15 +31835,207 @@ var Container = forwardRef75(function Container2(props, ref) {
|
|
|
31835
31835
|
});
|
|
31836
31836
|
Container.displayName = "Container";
|
|
31837
31837
|
|
|
31838
|
-
// src/components/
|
|
31838
|
+
// src/components/DataTable/DataTable.tsx
|
|
31839
|
+
import { useMemo as useMemo32 } from "react";
|
|
31840
|
+
|
|
31841
|
+
// src/components/Sheet/Sheet.tsx
|
|
31839
31842
|
import { motion as motion4 } from "framer-motion";
|
|
31840
|
-
var
|
|
31843
|
+
var MotionSheet = motion4(Sheet_default);
|
|
31844
|
+
var Sheet3 = MotionSheet;
|
|
31845
|
+
Sheet3.displayName = "Sheet";
|
|
31846
|
+
|
|
31847
|
+
// src/components/Sheet/index.ts
|
|
31848
|
+
var Sheet_default2 = Sheet3;
|
|
31849
|
+
|
|
31850
|
+
// src/components/Table/Table.tsx
|
|
31851
|
+
var Table3 = (props) => {
|
|
31852
|
+
const { children, ...inheritProps } = props;
|
|
31853
|
+
return /* @__PURE__ */ jsx2(Table_default, { ...inheritProps, children });
|
|
31854
|
+
};
|
|
31855
|
+
Table3.displayName = "Table";
|
|
31856
|
+
function TableHead(props) {
|
|
31857
|
+
const {
|
|
31858
|
+
headCells,
|
|
31859
|
+
showCheckbox,
|
|
31860
|
+
onCheckboxChange,
|
|
31861
|
+
slots: { checkbox: RenderCheckbox = Checkbox_default2 } = {},
|
|
31862
|
+
slotProps: { checkbox: checkboxProps = {} } = {}
|
|
31863
|
+
} = props;
|
|
31864
|
+
return /* @__PURE__ */ jsx2("thead", { children: /* @__PURE__ */ jsxs2("tr", { children: [
|
|
31865
|
+
showCheckbox && /* @__PURE__ */ jsx2(
|
|
31866
|
+
"th",
|
|
31867
|
+
{
|
|
31868
|
+
style: {
|
|
31869
|
+
width: "40px",
|
|
31870
|
+
textAlign: "center"
|
|
31871
|
+
},
|
|
31872
|
+
children: /* @__PURE__ */ jsx2(RenderCheckbox, { onChange: onCheckboxChange, ...checkboxProps })
|
|
31873
|
+
}
|
|
31874
|
+
),
|
|
31875
|
+
headCells.map((headCell) => /* @__PURE__ */ jsx2(
|
|
31876
|
+
"th",
|
|
31877
|
+
{
|
|
31878
|
+
style: {
|
|
31879
|
+
width: headCell.width,
|
|
31880
|
+
minWidth: headCell.minWidth,
|
|
31881
|
+
maxWidth: headCell.maxWidth,
|
|
31882
|
+
textAlign: headCell.numeric ? "right" : "left"
|
|
31883
|
+
},
|
|
31884
|
+
children: headCell.label
|
|
31885
|
+
},
|
|
31886
|
+
headCell.label
|
|
31887
|
+
))
|
|
31888
|
+
] }) });
|
|
31889
|
+
}
|
|
31890
|
+
TableHead.displayName = "TableHead";
|
|
31891
|
+
function TableBody(props) {
|
|
31892
|
+
const {
|
|
31893
|
+
rows,
|
|
31894
|
+
cellOrder,
|
|
31895
|
+
rowOptions,
|
|
31896
|
+
showCheckbox,
|
|
31897
|
+
onCheckboxChange,
|
|
31898
|
+
slots: { checkbox: RenderCheckbox = Checkbox_default2 } = {},
|
|
31899
|
+
slotProps: { checkbox: checkboxProps = {} } = {}
|
|
31900
|
+
} = props;
|
|
31901
|
+
return /* @__PURE__ */ jsx2("tbody", { children: rows.map((row, rowIndex) => /* @__PURE__ */ jsxs2("tr", { children: [
|
|
31902
|
+
showCheckbox && /* @__PURE__ */ jsx2(
|
|
31903
|
+
"td",
|
|
31904
|
+
{
|
|
31905
|
+
style: {
|
|
31906
|
+
textAlign: "center"
|
|
31907
|
+
},
|
|
31908
|
+
children: /* @__PURE__ */ jsx2(
|
|
31909
|
+
RenderCheckbox,
|
|
31910
|
+
{
|
|
31911
|
+
onChange: (event) => onCheckboxChange?.(event, rowIndex),
|
|
31912
|
+
...checkboxProps
|
|
31913
|
+
}
|
|
31914
|
+
)
|
|
31915
|
+
}
|
|
31916
|
+
),
|
|
31917
|
+
cellOrder.map((cellKey) => /* @__PURE__ */ jsx2(
|
|
31918
|
+
"td",
|
|
31919
|
+
{
|
|
31920
|
+
style: {
|
|
31921
|
+
textAlign: rowOptions?.[cellKey]?.numeric ? "right" : "left"
|
|
31922
|
+
},
|
|
31923
|
+
children: row[cellKey]
|
|
31924
|
+
},
|
|
31925
|
+
cellKey
|
|
31926
|
+
))
|
|
31927
|
+
] }, rowIndex)) });
|
|
31928
|
+
}
|
|
31929
|
+
TableBody.displayName = "TableBody";
|
|
31930
|
+
|
|
31931
|
+
// src/components/DataTable/DataTable.tsx
|
|
31932
|
+
function useDataTableRenderer({
|
|
31933
|
+
data,
|
|
31934
|
+
cellOrder,
|
|
31935
|
+
headCells
|
|
31936
|
+
}) {
|
|
31937
|
+
return {
|
|
31938
|
+
renderCellOrder: useMemo32(
|
|
31939
|
+
() => cellOrder || Object.keys(data[0] || {}),
|
|
31940
|
+
[data, cellOrder]
|
|
31941
|
+
),
|
|
31942
|
+
renderHeadCells: useMemo32(
|
|
31943
|
+
() => headCells || // fallback
|
|
31944
|
+
Object.keys(data[0] || {}).map((key) => ({
|
|
31945
|
+
label: key
|
|
31946
|
+
})),
|
|
31947
|
+
[data, headCells]
|
|
31948
|
+
)
|
|
31949
|
+
};
|
|
31950
|
+
}
|
|
31951
|
+
function DataTable(props) {
|
|
31952
|
+
const {
|
|
31953
|
+
data,
|
|
31954
|
+
showCheckbox,
|
|
31955
|
+
headCells,
|
|
31956
|
+
cellOrder,
|
|
31957
|
+
slots: { checkbox: RenderCheckbox = Checkbox_default2, toolbar: Toolbar } = {},
|
|
31958
|
+
slotProps: { checkbox: checkboxProps = {}, toolbar: toolbarProps } = {},
|
|
31959
|
+
...innerProps
|
|
31960
|
+
} = props;
|
|
31961
|
+
const { renderCellOrder, renderHeadCells } = useDataTableRenderer({
|
|
31962
|
+
data,
|
|
31963
|
+
cellOrder,
|
|
31964
|
+
headCells
|
|
31965
|
+
});
|
|
31966
|
+
return /* @__PURE__ */ jsxs2(
|
|
31967
|
+
Sheet_default2,
|
|
31968
|
+
{
|
|
31969
|
+
variant: "outlined",
|
|
31970
|
+
sx: {
|
|
31971
|
+
overflow: "auto",
|
|
31972
|
+
width: "100%",
|
|
31973
|
+
boxShadow: "sm",
|
|
31974
|
+
borderRadius: "sm"
|
|
31975
|
+
},
|
|
31976
|
+
children: [
|
|
31977
|
+
Toolbar && /* @__PURE__ */ jsx2(Toolbar, { ...toolbarProps || {} }),
|
|
31978
|
+
/* @__PURE__ */ jsxs2(
|
|
31979
|
+
Table3,
|
|
31980
|
+
{
|
|
31981
|
+
sx: [
|
|
31982
|
+
showCheckbox ? {
|
|
31983
|
+
"& tr > *:first-of-type": {
|
|
31984
|
+
position: "sticky",
|
|
31985
|
+
left: 0,
|
|
31986
|
+
boxShadow: "1px 0 var(--TableCell-borderColor)",
|
|
31987
|
+
bgcolor: "background.surface"
|
|
31988
|
+
}
|
|
31989
|
+
} : {},
|
|
31990
|
+
{
|
|
31991
|
+
"--TableCell-headBackground": "transparent",
|
|
31992
|
+
"--TableCell-selectedBackground": (theme) => theme.vars.palette.success.softBg
|
|
31993
|
+
}
|
|
31994
|
+
],
|
|
31995
|
+
...innerProps,
|
|
31996
|
+
children: [
|
|
31997
|
+
/* @__PURE__ */ jsx2(
|
|
31998
|
+
TableHead,
|
|
31999
|
+
{
|
|
32000
|
+
showCheckbox,
|
|
32001
|
+
headCells: renderHeadCells || []
|
|
32002
|
+
}
|
|
32003
|
+
),
|
|
32004
|
+
/* @__PURE__ */ jsx2("tbody", { children: data.map((row, rowIndex) => /* @__PURE__ */ jsxs2("tr", { children: [
|
|
32005
|
+
showCheckbox && /* @__PURE__ */ jsx2(
|
|
32006
|
+
"td",
|
|
32007
|
+
{
|
|
32008
|
+
style: {
|
|
32009
|
+
textAlign: "center"
|
|
32010
|
+
},
|
|
32011
|
+
children: /* @__PURE__ */ jsx2(
|
|
32012
|
+
RenderCheckbox,
|
|
32013
|
+
{
|
|
32014
|
+
...checkboxProps
|
|
32015
|
+
}
|
|
32016
|
+
)
|
|
32017
|
+
}
|
|
32018
|
+
),
|
|
32019
|
+
renderCellOrder.map((cellKey) => /* @__PURE__ */ jsx2("td", { children: row[cellKey] }, cellKey))
|
|
32020
|
+
] }, rowIndex)) })
|
|
32021
|
+
]
|
|
32022
|
+
}
|
|
32023
|
+
)
|
|
32024
|
+
]
|
|
32025
|
+
}
|
|
32026
|
+
);
|
|
32027
|
+
}
|
|
32028
|
+
DataTable.displayName = "DataTable";
|
|
32029
|
+
|
|
32030
|
+
// src/components/DialogActions/DialogActions.tsx
|
|
32031
|
+
import { motion as motion5 } from "framer-motion";
|
|
32032
|
+
var MotionDialogActions = motion5(DialogActions_default);
|
|
31841
32033
|
var DialogActions3 = MotionDialogActions;
|
|
31842
32034
|
DialogActions3.displayName = "DialogActions";
|
|
31843
32035
|
|
|
31844
32036
|
// src/components/DialogContent/DialogContent.tsx
|
|
31845
|
-
import { motion as
|
|
31846
|
-
var MotionDialogContent =
|
|
32037
|
+
import { motion as motion6 } from "framer-motion";
|
|
32038
|
+
var MotionDialogContent = motion6(DialogContent_default);
|
|
31847
32039
|
var DialogContent3 = MotionDialogContent;
|
|
31848
32040
|
DialogContent3.displayName = "DialogContent";
|
|
31849
32041
|
|
|
@@ -31851,8 +32043,8 @@ DialogContent3.displayName = "DialogContent";
|
|
|
31851
32043
|
var DialogContent_default2 = DialogContent3;
|
|
31852
32044
|
|
|
31853
32045
|
// src/components/DialogTitle/DialogTitle.tsx
|
|
31854
|
-
import { motion as
|
|
31855
|
-
var MotionDialogTitle =
|
|
32046
|
+
import { motion as motion7 } from "framer-motion";
|
|
32047
|
+
var MotionDialogTitle = motion7(DialogTitle_default);
|
|
31856
32048
|
var DialogTitle3 = MotionDialogTitle;
|
|
31857
32049
|
DialogTitle3.displayName = "DialogTitle";
|
|
31858
32050
|
|
|
@@ -31860,47 +32052,18 @@ DialogTitle3.displayName = "DialogTitle";
|
|
|
31860
32052
|
var DialogTitle_default2 = DialogTitle3;
|
|
31861
32053
|
|
|
31862
32054
|
// src/components/Divider/Divider.tsx
|
|
31863
|
-
import { motion as
|
|
31864
|
-
var MotionDivider =
|
|
32055
|
+
import { motion as motion8 } from "framer-motion";
|
|
32056
|
+
var MotionDivider = motion8(Divider_default);
|
|
31865
32057
|
var Divider3 = (props) => {
|
|
31866
32058
|
return /* @__PURE__ */ jsx2(MotionDivider, { ...props });
|
|
31867
32059
|
};
|
|
31868
32060
|
Divider3.displayName = "Divider";
|
|
31869
32061
|
|
|
31870
|
-
// src/components/
|
|
31871
|
-
var Divider_default2 = Divider3;
|
|
31872
|
-
|
|
31873
|
-
// src/components/FilterDrawer/FilterDrawer.tsx
|
|
31874
|
-
import { motion as motion10 } from "framer-motion";
|
|
31875
|
-
|
|
31876
|
-
// src/components/Sheet/Sheet.tsx
|
|
31877
|
-
import { motion as motion8 } from "framer-motion";
|
|
31878
|
-
var MotionSheet = motion8(Sheet_default);
|
|
31879
|
-
var Sheet3 = MotionSheet;
|
|
31880
|
-
Sheet3.displayName = "Sheet";
|
|
31881
|
-
|
|
31882
|
-
// src/components/Sheet/index.ts
|
|
31883
|
-
var Sheet_default2 = Sheet3;
|
|
31884
|
-
|
|
31885
|
-
// src/components/Modal/Modal.tsx
|
|
32062
|
+
// src/components/InsetDrawer/InsetDrawer.tsx
|
|
31886
32063
|
import { motion as motion9 } from "framer-motion";
|
|
31887
|
-
var
|
|
31888
|
-
var
|
|
31889
|
-
|
|
31890
|
-
var MotionModalDialog = motion9(ModalDialog_default);
|
|
31891
|
-
var ModalDialog3 = MotionModalDialog;
|
|
31892
|
-
ModalDialog3.displayName = "ModalDialog";
|
|
31893
|
-
var MotionModalClose = motion9(ModalClose_default);
|
|
31894
|
-
var ModalClose3 = MotionModalClose;
|
|
31895
|
-
ModalClose3.displayName = "ModalClose";
|
|
31896
|
-
var MotionModalOverflow = motion9(ModalOverflow_default);
|
|
31897
|
-
var ModalOverflow3 = MotionModalOverflow;
|
|
31898
|
-
ModalOverflow3.displayName = "ModalOverflow";
|
|
31899
|
-
|
|
31900
|
-
// src/components/FilterDrawer/FilterDrawer.tsx
|
|
31901
|
-
var MotionDrawer = motion10(Drawer_default);
|
|
31902
|
-
var FilterDrawer = (props) => {
|
|
31903
|
-
const { children, actions, title, ...innerProps } = props;
|
|
32064
|
+
var MotionDrawer = motion9(Drawer_default);
|
|
32065
|
+
var InsetDrawer = (props) => {
|
|
32066
|
+
const { children, ...innerProps } = props;
|
|
31904
32067
|
return /* @__PURE__ */ jsx2(
|
|
31905
32068
|
MotionDrawer,
|
|
31906
32069
|
{
|
|
@@ -31916,97 +32079,100 @@ var FilterDrawer = (props) => {
|
|
|
31916
32079
|
}
|
|
31917
32080
|
}
|
|
31918
32081
|
},
|
|
31919
|
-
children
|
|
31920
|
-
Sheet_default2,
|
|
31921
|
-
{
|
|
31922
|
-
sx: {
|
|
31923
|
-
borderRadius: "md",
|
|
31924
|
-
p: 2,
|
|
31925
|
-
display: "flex",
|
|
31926
|
-
flexDirection: "column",
|
|
31927
|
-
gap: 2,
|
|
31928
|
-
height: "100%",
|
|
31929
|
-
overflow: "auto"
|
|
31930
|
-
},
|
|
31931
|
-
children: [
|
|
31932
|
-
/* @__PURE__ */ jsx2(DialogTitle_default2, { children: title }),
|
|
31933
|
-
/* @__PURE__ */ jsx2(ModalClose3, {}),
|
|
31934
|
-
/* @__PURE__ */ jsx2(Divider_default2, { sx: { mt: "auto" } }),
|
|
31935
|
-
/* @__PURE__ */ jsx2(DialogContent_default2, { children }),
|
|
31936
|
-
actions && /* @__PURE__ */ jsx2(Divider_default2, { sx: { mt: "auto" } }),
|
|
31937
|
-
actions
|
|
31938
|
-
]
|
|
31939
|
-
}
|
|
31940
|
-
)
|
|
32082
|
+
children
|
|
31941
32083
|
}
|
|
31942
32084
|
);
|
|
31943
32085
|
};
|
|
31944
|
-
|
|
32086
|
+
InsetDrawer.displayName = "InsetDrawer";
|
|
31945
32087
|
|
|
31946
32088
|
// src/components/Dropdown/Dropdown.tsx
|
|
31947
|
-
import { motion as
|
|
31948
|
-
var MotionDropdown =
|
|
32089
|
+
import { motion as motion10 } from "framer-motion";
|
|
32090
|
+
var MotionDropdown = motion10(Dropdown);
|
|
31949
32091
|
var Dropdown2 = MotionDropdown;
|
|
31950
32092
|
Dropdown2.displayName = "Dropdown";
|
|
31951
32093
|
|
|
31952
32094
|
// src/components/FormControl/FormControl.tsx
|
|
31953
|
-
import { motion as
|
|
31954
|
-
var MotionFormControl =
|
|
32095
|
+
import { motion as motion11 } from "framer-motion";
|
|
32096
|
+
var MotionFormControl = motion11(FormControl_default);
|
|
31955
32097
|
var FormControl3 = MotionFormControl;
|
|
31956
32098
|
FormControl3.displayName = "FormControl";
|
|
31957
32099
|
|
|
31958
32100
|
// src/components/FormHelperText/FormHelperText.tsx
|
|
31959
|
-
import { motion as
|
|
31960
|
-
var MotionFormHelperText =
|
|
32101
|
+
import { motion as motion12 } from "framer-motion";
|
|
32102
|
+
var MotionFormHelperText = motion12(FormHelperText_default);
|
|
31961
32103
|
var FormHelperText3 = MotionFormHelperText;
|
|
31962
32104
|
FormHelperText3.displayName = "FormHelperText";
|
|
31963
32105
|
|
|
31964
32106
|
// src/components/FormLabel/FormLabel.tsx
|
|
31965
|
-
import { motion as
|
|
31966
|
-
var MotionFormLabel =
|
|
32107
|
+
import { motion as motion13 } from "framer-motion";
|
|
32108
|
+
var MotionFormLabel = motion13(FormLabel_default);
|
|
31967
32109
|
var FormLabel3 = MotionFormLabel;
|
|
31968
32110
|
FormLabel3.displayName = "FormLabel";
|
|
31969
32111
|
|
|
31970
32112
|
// src/components/Grid/Grid.tsx
|
|
31971
|
-
import { motion as
|
|
31972
|
-
var MotionGrid =
|
|
32113
|
+
import { motion as motion14 } from "framer-motion";
|
|
32114
|
+
var MotionGrid = motion14(Grid_default);
|
|
31973
32115
|
var Grid2 = MotionGrid;
|
|
31974
32116
|
Grid2.displayName = "Grid";
|
|
31975
32117
|
|
|
31976
32118
|
// src/components/IconButton/IconButton.tsx
|
|
31977
|
-
import { motion as
|
|
31978
|
-
var MotionIconButton =
|
|
32119
|
+
import { motion as motion15 } from "framer-motion";
|
|
32120
|
+
var MotionIconButton = motion15(IconButton_default);
|
|
31979
32121
|
var IconButton3 = (props) => {
|
|
31980
32122
|
return /* @__PURE__ */ jsx2(MotionIconButton, { ...props });
|
|
31981
32123
|
};
|
|
31982
32124
|
IconButton3.displayName = "IconButton";
|
|
31983
32125
|
|
|
31984
32126
|
// src/components/Input/Input.tsx
|
|
31985
|
-
import { motion as
|
|
31986
|
-
var MotionInput =
|
|
32127
|
+
import { motion as motion16 } from "framer-motion";
|
|
32128
|
+
var MotionInput = motion16(Input_default);
|
|
31987
32129
|
var Input3 = (props) => {
|
|
31988
32130
|
return /* @__PURE__ */ jsx2(MotionInput, { ...props });
|
|
31989
32131
|
};
|
|
31990
32132
|
Input3.displayName = "Input";
|
|
31991
32133
|
|
|
31992
32134
|
// src/components/Menu/Menu.tsx
|
|
31993
|
-
import { motion as
|
|
31994
|
-
var MotionMenu =
|
|
32135
|
+
import { motion as motion17 } from "framer-motion";
|
|
32136
|
+
var MotionMenu = motion17(Menu_default);
|
|
31995
32137
|
var Menu3 = (props) => {
|
|
31996
32138
|
return /* @__PURE__ */ jsx2(MotionMenu, { ...props });
|
|
31997
32139
|
};
|
|
31998
32140
|
Menu3.displayName = "Menu";
|
|
31999
|
-
var MotionMenuButton =
|
|
32141
|
+
var MotionMenuButton = motion17(MenuButton_default);
|
|
32000
32142
|
var MenuButton3 = (props) => {
|
|
32001
32143
|
return /* @__PURE__ */ jsx2(MotionMenuButton, { ...props });
|
|
32002
32144
|
};
|
|
32003
32145
|
MenuButton3.displayName = "MenuButton";
|
|
32004
|
-
var MotionMenuItem =
|
|
32146
|
+
var MotionMenuItem = motion17(MenuItem_default);
|
|
32005
32147
|
var MenuItem3 = (props) => {
|
|
32006
32148
|
return /* @__PURE__ */ jsx2(MotionMenuItem, { ...props });
|
|
32007
32149
|
};
|
|
32008
32150
|
MenuItem3.displayName = "MenuItem";
|
|
32009
32151
|
|
|
32152
|
+
// src/components/Modal/Modal.tsx
|
|
32153
|
+
import { motion as motion18 } from "framer-motion";
|
|
32154
|
+
var MotionModal = motion18(Modal_default);
|
|
32155
|
+
var Modal3 = MotionModal;
|
|
32156
|
+
Modal3.displayName = "Modal";
|
|
32157
|
+
var MotionModalDialog = motion18(ModalDialog_default);
|
|
32158
|
+
var ModalDialog3 = MotionModalDialog;
|
|
32159
|
+
ModalDialog3.displayName = "ModalDialog";
|
|
32160
|
+
var MotionModalClose = motion18(ModalClose_default);
|
|
32161
|
+
var ModalClose3 = MotionModalClose;
|
|
32162
|
+
ModalClose3.displayName = "ModalClose";
|
|
32163
|
+
var MotionModalOverflow = motion18(ModalOverflow_default);
|
|
32164
|
+
var ModalOverflow3 = MotionModalOverflow;
|
|
32165
|
+
ModalOverflow3.displayName = "ModalOverflow";
|
|
32166
|
+
function ModalFrame(props) {
|
|
32167
|
+
const { title, children, ...innerProps } = props;
|
|
32168
|
+
return /* @__PURE__ */ jsxs2(ModalDialog3, { ...innerProps, children: [
|
|
32169
|
+
/* @__PURE__ */ jsx2(ModalClose3, {}),
|
|
32170
|
+
/* @__PURE__ */ jsx2(DialogTitle_default2, { children: title }),
|
|
32171
|
+
/* @__PURE__ */ jsx2(DialogContent_default2, { children })
|
|
32172
|
+
] });
|
|
32173
|
+
}
|
|
32174
|
+
ModalFrame.displayName = "ModalFrame";
|
|
32175
|
+
|
|
32010
32176
|
// src/components/Radio/Radio.tsx
|
|
32011
32177
|
import { motion as motion19 } from "framer-motion";
|
|
32012
32178
|
var MotionRadio = motion19(Radio_default);
|
|
@@ -32072,85 +32238,6 @@ var Switch3 = (props) => {
|
|
|
32072
32238
|
};
|
|
32073
32239
|
Switch3.displayName = "Switch";
|
|
32074
32240
|
|
|
32075
|
-
// src/components/Table/Table.tsx
|
|
32076
|
-
var Table3 = (props) => {
|
|
32077
|
-
const { children, ...inheritProps } = props;
|
|
32078
|
-
return /* @__PURE__ */ jsx2(Table_default, { ...inheritProps, children });
|
|
32079
|
-
};
|
|
32080
|
-
Table3.displayName = "Table";
|
|
32081
|
-
function TableHead(props) {
|
|
32082
|
-
const {
|
|
32083
|
-
headCells,
|
|
32084
|
-
showCheckbox,
|
|
32085
|
-
onCheckboxChange,
|
|
32086
|
-
slots: { checkbox: RenderCheckbox = Checkbox_default2 } = {},
|
|
32087
|
-
slotProps: { checkbox: checkboxProps = {} } = {}
|
|
32088
|
-
} = props;
|
|
32089
|
-
return /* @__PURE__ */ jsx2("thead", { children: /* @__PURE__ */ jsxs2("tr", { children: [
|
|
32090
|
-
showCheckbox && /* @__PURE__ */ jsx2(
|
|
32091
|
-
"th",
|
|
32092
|
-
{
|
|
32093
|
-
style: {
|
|
32094
|
-
width: "40px",
|
|
32095
|
-
textAlign: "center"
|
|
32096
|
-
},
|
|
32097
|
-
children: /* @__PURE__ */ jsx2(RenderCheckbox, { onChange: onCheckboxChange, ...checkboxProps })
|
|
32098
|
-
}
|
|
32099
|
-
),
|
|
32100
|
-
headCells.map((headCell) => /* @__PURE__ */ jsx2(
|
|
32101
|
-
"th",
|
|
32102
|
-
{
|
|
32103
|
-
style: {
|
|
32104
|
-
width: headCell.width,
|
|
32105
|
-
textAlign: headCell.numeric ? "right" : "left"
|
|
32106
|
-
},
|
|
32107
|
-
children: headCell.label
|
|
32108
|
-
},
|
|
32109
|
-
headCell.label
|
|
32110
|
-
))
|
|
32111
|
-
] }) });
|
|
32112
|
-
}
|
|
32113
|
-
TableHead.displayName = "TableHead";
|
|
32114
|
-
function TableBody(props) {
|
|
32115
|
-
const {
|
|
32116
|
-
rows,
|
|
32117
|
-
cellOrder,
|
|
32118
|
-
rowOptions,
|
|
32119
|
-
showCheckbox,
|
|
32120
|
-
onCheckboxChange,
|
|
32121
|
-
slots: { checkbox: RenderCheckbox = Checkbox_default2 } = {},
|
|
32122
|
-
slotProps: { checkbox: checkboxProps = {} } = {}
|
|
32123
|
-
} = props;
|
|
32124
|
-
return /* @__PURE__ */ jsx2("tbody", { children: rows.map((row, rowIndex) => /* @__PURE__ */ jsxs2("tr", { children: [
|
|
32125
|
-
showCheckbox && /* @__PURE__ */ jsx2(
|
|
32126
|
-
"td",
|
|
32127
|
-
{
|
|
32128
|
-
style: {
|
|
32129
|
-
textAlign: "center"
|
|
32130
|
-
},
|
|
32131
|
-
children: /* @__PURE__ */ jsx2(
|
|
32132
|
-
RenderCheckbox,
|
|
32133
|
-
{
|
|
32134
|
-
onChange: (event) => onCheckboxChange?.(event, rowIndex),
|
|
32135
|
-
...checkboxProps
|
|
32136
|
-
}
|
|
32137
|
-
)
|
|
32138
|
-
}
|
|
32139
|
-
),
|
|
32140
|
-
cellOrder.map((cellKey) => /* @__PURE__ */ jsx2(
|
|
32141
|
-
"td",
|
|
32142
|
-
{
|
|
32143
|
-
style: {
|
|
32144
|
-
textAlign: rowOptions?.[cellKey]?.numeric ? "right" : "left"
|
|
32145
|
-
},
|
|
32146
|
-
children: row[cellKey]
|
|
32147
|
-
},
|
|
32148
|
-
cellKey
|
|
32149
|
-
))
|
|
32150
|
-
] }, rowIndex)) });
|
|
32151
|
-
}
|
|
32152
|
-
TableBody.displayName = "TableBody";
|
|
32153
|
-
|
|
32154
32241
|
// src/components/Tabs/Tabs.tsx
|
|
32155
32242
|
import { motion as motion23 } from "framer-motion";
|
|
32156
32243
|
var MotionTabs = motion23(Tabs_default);
|
|
@@ -32246,19 +32333,20 @@ export {
|
|
|
32246
32333
|
Chip_default as Chip,
|
|
32247
32334
|
CircularProgress_default as CircularProgress,
|
|
32248
32335
|
Container,
|
|
32336
|
+
DataTable,
|
|
32249
32337
|
DialogActions3 as DialogActions,
|
|
32250
32338
|
DialogContent3 as DialogContent,
|
|
32251
32339
|
DialogTitle3 as DialogTitle,
|
|
32252
32340
|
Divider3 as Divider,
|
|
32253
32341
|
Drawer_default as Drawer,
|
|
32254
32342
|
Dropdown2 as Dropdown,
|
|
32255
|
-
FilterDrawer,
|
|
32256
32343
|
FormControl3 as FormControl,
|
|
32257
32344
|
FormHelperText3 as FormHelperText,
|
|
32258
32345
|
FormLabel3 as FormLabel,
|
|
32259
32346
|
Grid2 as Grid,
|
|
32260
32347
|
IconButton3 as IconButton,
|
|
32261
32348
|
Input3 as Input,
|
|
32349
|
+
InsetDrawer,
|
|
32262
32350
|
LinearProgress_default as LinearProgress,
|
|
32263
32351
|
Link_default as Link,
|
|
32264
32352
|
List_default as List,
|
|
@@ -32274,6 +32362,7 @@ export {
|
|
|
32274
32362
|
Modal3 as Modal,
|
|
32275
32363
|
ModalClose3 as ModalClose,
|
|
32276
32364
|
ModalDialog3 as ModalDialog,
|
|
32365
|
+
ModalFrame,
|
|
32277
32366
|
ModalOverflow3 as ModalOverflow,
|
|
32278
32367
|
Option3 as Option,
|
|
32279
32368
|
Radio3 as Radio,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ceed/ads",
|
|
3
|
-
"version": "0.0.14
|
|
3
|
+
"version": "0.0.14",
|
|
4
4
|
"main": "dist/index.js",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"description": "UI tool for Ecube Labs front-end developers",
|
|
@@ -12,8 +12,7 @@
|
|
|
12
12
|
},
|
|
13
13
|
"files": [
|
|
14
14
|
"dist",
|
|
15
|
-
"framer"
|
|
16
|
-
"framer-export.js"
|
|
15
|
+
"framer"
|
|
17
16
|
],
|
|
18
17
|
"author": "Ecube Labs",
|
|
19
18
|
"sideEffects": false,
|
|
@@ -53,6 +52,5 @@
|
|
|
53
52
|
"type": "git",
|
|
54
53
|
"url": "git+ssh://git@github.com/Ecube-Labs/hds.git"
|
|
55
54
|
},
|
|
56
|
-
"packageManager": "yarn@4.1.0"
|
|
57
|
-
"stableVersion": "0.0.13"
|
|
55
|
+
"packageManager": "yarn@4.1.0"
|
|
58
56
|
}
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
import React from "react";
|
|
2
|
-
import { DrawerProps } from "@mui/joy";
|
|
3
|
-
import { MotionProps } from "framer-motion";
|
|
4
|
-
declare const FilterDrawer: {
|
|
5
|
-
(props: {
|
|
6
|
-
component?: React.ElementType<any, keyof React.JSX.IntrinsicElements> | undefined;
|
|
7
|
-
} & Omit<import("@mui/joy").ModalOwnProps, "children" | "keepMounted"> & import("@mui/joy").DrawerSlotsAndSlotProps & {
|
|
8
|
-
anchor?: "top" | "right" | "bottom" | "left" | undefined;
|
|
9
|
-
color?: import("@mui/types").OverridableStringUnion<import("@mui/joy").ColorPaletteProp, import("@mui/joy").DrawerPropsColorOverrides> | undefined;
|
|
10
|
-
invertedColors?: boolean | undefined;
|
|
11
|
-
size?: import("@mui/types").OverridableStringUnion<"sm" | "md" | "lg", import("@mui/joy").DrawerPropsSizeOverrides> | undefined;
|
|
12
|
-
variant?: import("@mui/types").OverridableStringUnion<import("@mui/joy").VariantProp, import("@mui/joy").DrawerPropsVariantOverrides> | undefined;
|
|
13
|
-
} & Omit<Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & {
|
|
14
|
-
ref?: ((instance: HTMLDivElement | null) => void) | React.RefObject<HTMLDivElement> | null | undefined;
|
|
15
|
-
}, "color" | "container" | "component" | "sx" | "size" | "variant" | "anchor" | "invertedColors" | "disableAutoFocus" | "disableEnforceFocus" | "disableEscapeKeyDown" | "disablePortal" | "disableRestoreFocus" | "disableScrollLock" | "hideBackdrop" | "open" | "onClose" | keyof import("@mui/joy").DrawerSlotsAndSlotProps> & MotionProps & {
|
|
16
|
-
title: React.ReactNode;
|
|
17
|
-
actions?: React.ReactNode;
|
|
18
|
-
}): React.JSX.Element;
|
|
19
|
-
displayName: string;
|
|
20
|
-
};
|
|
21
|
-
export { FilterDrawer };
|
package/framer-export.js
DELETED
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import { addPropertyControls, ControlType } from "framer";
|
|
2
|
-
import * as ADS from "./framer";
|
|
3
|
-
|
|
4
|
-
export function Divider(props) {
|
|
5
|
-
return <ADS.Divider {...props} />;
|
|
6
|
-
}
|
|
7
|
-
|
|
8
|
-
// addPropertyControls(Divider, {
|
|
9
|
-
// })
|
|
10
|
-
|
|
11
|
-
export function withTooltip(Component) {
|
|
12
|
-
return function (props) {
|
|
13
|
-
return <ADS.Tooltip {...props} />;
|
|
14
|
-
};
|
|
15
|
-
}
|