@ceed/ads 0.0.7 → 0.0.9
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/Container/Container.d.ts +5 -0
- package/dist/components/Container/Container.js +47 -0
- package/dist/components/Container/index.d.ts +3 -0
- package/dist/components/Container/index.js +3 -0
- package/dist/components/Table/Table.d.ts +54 -2
- package/dist/components/Table/Table.js +62 -3
- package/dist/components/ThemeProvider/ThemeProvider.d.ts +14 -1
- package/dist/components/ThemeProvider/ThemeProvider.js +32 -4
- 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 +151 -10
- package/package.json +1 -5
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
declare const Container: React.ForwardRefExoticComponent<Omit<import("@mui/system").MUIStyledCommonProps<import("@mui/joy").Theme> & {
|
|
3
|
+
maxWidth?: "tablet" | "laptop" | "desktop" | undefined;
|
|
4
|
+
} & React.ClassAttributes<HTMLDivElement> & React.HTMLAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
5
|
+
export { Container };
|
|
@@ -0,0 +1,47 @@
|
|
|
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
|
+
import { styled } from "@mui/joy";
|
|
13
|
+
import React, { forwardRef } from "react";
|
|
14
|
+
var ContainerRoot = styled("div", {
|
|
15
|
+
name: "Container",
|
|
16
|
+
slot: "root",
|
|
17
|
+
shouldForwardProp: function (prop) { return prop !== "maxWidth"; },
|
|
18
|
+
})(function (_a) {
|
|
19
|
+
var _b, _c, _d;
|
|
20
|
+
var theme = _a.theme, _e = _a.maxWidth, maxWidth = _e === void 0 ? "desktop" : _e;
|
|
21
|
+
return (__assign(__assign(__assign({ width: "100%", marginLeft: "auto", boxSizing: "border-box", marginRight: "auto", display: "block", paddingLeft: theme.spacing(2), paddingRight: theme.spacing(2) }, (maxWidth === "tablet" && (_b = {},
|
|
22
|
+
_b[theme.breakpoints.up("mobile")] = {
|
|
23
|
+
maxWidth: theme.breakpoints.values.tablet,
|
|
24
|
+
},
|
|
25
|
+
_b))), (maxWidth === "laptop" && (_c = {},
|
|
26
|
+
_c[theme.breakpoints.up("tablet")] = {
|
|
27
|
+
maxWidth: theme.breakpoints.values.laptop,
|
|
28
|
+
},
|
|
29
|
+
_c))), (maxWidth === "desktop" && (_d = {},
|
|
30
|
+
_d[theme.breakpoints.up("laptop")] = {
|
|
31
|
+
maxWidth: theme.breakpoints.values.desktop,
|
|
32
|
+
},
|
|
33
|
+
_d))));
|
|
34
|
+
});
|
|
35
|
+
var Container = forwardRef(function Container(props, ref) {
|
|
36
|
+
// prop destruction
|
|
37
|
+
// lib hooks
|
|
38
|
+
// state, ref, querystring hooks
|
|
39
|
+
// form hooks
|
|
40
|
+
// query hooks
|
|
41
|
+
// calculated values
|
|
42
|
+
// effects
|
|
43
|
+
// handlers
|
|
44
|
+
return React.createElement(ContainerRoot, __assign({ ref: ref }, props));
|
|
45
|
+
});
|
|
46
|
+
export { Container };
|
|
47
|
+
Container.displayName = "Container";
|
|
@@ -1,8 +1,60 @@
|
|
|
1
1
|
import React from "react";
|
|
2
2
|
import { TableProps } from "@mui/joy";
|
|
3
|
-
import { MotionProps } from "framer-motion";
|
|
4
3
|
declare const Table: {
|
|
5
|
-
(props: TableProps
|
|
4
|
+
(props: TableProps): React.JSX.Element;
|
|
6
5
|
displayName: string;
|
|
7
6
|
};
|
|
8
7
|
export { Table };
|
|
8
|
+
interface HeadCell {
|
|
9
|
+
label: string;
|
|
10
|
+
numeric?: boolean;
|
|
11
|
+
width?: string;
|
|
12
|
+
}
|
|
13
|
+
declare function TableHead<D extends Record<string, unknown>>(props: {
|
|
14
|
+
headCells: HeadCell[];
|
|
15
|
+
/**
|
|
16
|
+
* Show Checkbox to select all rows
|
|
17
|
+
*/
|
|
18
|
+
showCheckbox?: boolean;
|
|
19
|
+
onCheckboxChange?: (event: React.ChangeEvent<HTMLInputElement>) => void;
|
|
20
|
+
/**
|
|
21
|
+
* Inject custom component
|
|
22
|
+
*/
|
|
23
|
+
slots?: {
|
|
24
|
+
checkbox?: React.ElementType;
|
|
25
|
+
};
|
|
26
|
+
slotProps?: {
|
|
27
|
+
checkbox?: Partial<{
|
|
28
|
+
checked: boolean;
|
|
29
|
+
indeterminate: boolean;
|
|
30
|
+
[key: string]: any;
|
|
31
|
+
}>;
|
|
32
|
+
};
|
|
33
|
+
}): React.JSX.Element;
|
|
34
|
+
declare namespace TableHead {
|
|
35
|
+
var displayName: string;
|
|
36
|
+
}
|
|
37
|
+
export { TableHead };
|
|
38
|
+
interface TableBodyProps<D extends Record<string, unknown>> {
|
|
39
|
+
rows: D[];
|
|
40
|
+
cellOrder: (keyof D)[];
|
|
41
|
+
rowOptions?: Partial<Record<keyof D, {
|
|
42
|
+
numeric?: boolean;
|
|
43
|
+
}>>;
|
|
44
|
+
showCheckbox?: boolean;
|
|
45
|
+
onCheckboxChange?: (event: React.ChangeEvent<HTMLInputElement>, rowIndex: number) => void;
|
|
46
|
+
slots?: {
|
|
47
|
+
checkbox?: React.ElementType;
|
|
48
|
+
};
|
|
49
|
+
slotProps?: {
|
|
50
|
+
checkbox?: Partial<{
|
|
51
|
+
checked: boolean;
|
|
52
|
+
[key: string]: any;
|
|
53
|
+
}>;
|
|
54
|
+
};
|
|
55
|
+
}
|
|
56
|
+
declare function TableBody<D extends Record<string, unknown>>(props: TableBodyProps<D>): React.JSX.Element;
|
|
57
|
+
declare namespace TableBody {
|
|
58
|
+
var displayName: string;
|
|
59
|
+
}
|
|
60
|
+
export { TableBody };
|
|
@@ -9,12 +9,23 @@ var __assign = (this && this.__assign) || function () {
|
|
|
9
9
|
};
|
|
10
10
|
return __assign.apply(this, arguments);
|
|
11
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
|
+
};
|
|
12
23
|
import React from "react";
|
|
13
24
|
import { Table as JoyTable } from "@mui/joy";
|
|
14
|
-
import
|
|
15
|
-
var MotionTable = motion(JoyTable);
|
|
25
|
+
import Checkbox from "../Checkbox";
|
|
16
26
|
var Table = function (props) {
|
|
17
27
|
// prop destruction
|
|
28
|
+
var children = props.children, inheritProps = __rest(props, ["children"]);
|
|
18
29
|
// lib hooks
|
|
19
30
|
// state, ref, querystring hooks
|
|
20
31
|
// form hooks
|
|
@@ -22,7 +33,55 @@ var Table = function (props) {
|
|
|
22
33
|
// calculated values
|
|
23
34
|
// effects
|
|
24
35
|
// handlers
|
|
25
|
-
return React.createElement(
|
|
36
|
+
return React.createElement(JoyTable, __assign({}, inheritProps), children);
|
|
26
37
|
};
|
|
27
38
|
export { Table };
|
|
28
39
|
Table.displayName = "Table";
|
|
40
|
+
function TableHead(props) {
|
|
41
|
+
// prop destruction
|
|
42
|
+
var headCells = props.headCells, showCheckbox = props.showCheckbox, onCheckboxChange = props.onCheckboxChange, _a = props.slots, _b = _a === void 0 ? {} : _a, _c = _b.checkbox, RenderCheckbox = _c === void 0 ? Checkbox : _c, _d = props.slotProps, _e = _d === void 0 ? {} : _d, _f = _e.checkbox, checkboxProps = _f === void 0 ? {} : _f;
|
|
43
|
+
// lib hooks
|
|
44
|
+
// state, ref, querystring hooks
|
|
45
|
+
// form hooks
|
|
46
|
+
// query hooks
|
|
47
|
+
// calculated values
|
|
48
|
+
// effects
|
|
49
|
+
// handlers
|
|
50
|
+
return (React.createElement("thead", null,
|
|
51
|
+
React.createElement("tr", null,
|
|
52
|
+
showCheckbox && (React.createElement("th", { style: {
|
|
53
|
+
width: "40px",
|
|
54
|
+
textAlign: "center",
|
|
55
|
+
} },
|
|
56
|
+
React.createElement(RenderCheckbox, __assign({ onChange: onCheckboxChange }, checkboxProps)))),
|
|
57
|
+
headCells.map(function (headCell) { return (React.createElement("th", { key: headCell.label, style: {
|
|
58
|
+
width: headCell.width,
|
|
59
|
+
textAlign: headCell.numeric ? "right" : "left",
|
|
60
|
+
} }, headCell.label)); }))));
|
|
61
|
+
}
|
|
62
|
+
TableHead.displayName = "TableHead";
|
|
63
|
+
export { TableHead };
|
|
64
|
+
function TableBody(props) {
|
|
65
|
+
// prop destruction
|
|
66
|
+
var rows = props.rows, cellOrder = props.cellOrder, rowOptions = props.rowOptions, showCheckbox = props.showCheckbox, onCheckboxChange = props.onCheckboxChange, _a = props.slots, _b = _a === void 0 ? {} : _a, _c = _b.checkbox, RenderCheckbox = _c === void 0 ? Checkbox : _c, _d = props.slotProps, _e = _d === void 0 ? {} : _d, _f = _e.checkbox, checkboxProps = _f === void 0 ? {} : _f;
|
|
67
|
+
// lib hooks
|
|
68
|
+
// state, ref, querystring hooks
|
|
69
|
+
// form hooks
|
|
70
|
+
// query hooks
|
|
71
|
+
// calculated values
|
|
72
|
+
// effects
|
|
73
|
+
// handlers
|
|
74
|
+
return (React.createElement("tbody", null, rows.map(function (row, rowIndex) { return (React.createElement("tr", { key: rowIndex },
|
|
75
|
+
showCheckbox && (React.createElement("td", { style: {
|
|
76
|
+
textAlign: "center",
|
|
77
|
+
} },
|
|
78
|
+
React.createElement(RenderCheckbox, __assign({ onChange: function (event) { return onCheckboxChange === null || onCheckboxChange === void 0 ? void 0 : onCheckboxChange(event, rowIndex); } }, checkboxProps)))),
|
|
79
|
+
cellOrder.map(function (cellKey) {
|
|
80
|
+
var _a;
|
|
81
|
+
return (React.createElement("td", { key: cellKey, style: {
|
|
82
|
+
textAlign: ((_a = rowOptions === null || rowOptions === void 0 ? void 0 : rowOptions[cellKey]) === null || _a === void 0 ? void 0 : _a.numeric) ? "right" : "left",
|
|
83
|
+
} }, row[cellKey]));
|
|
84
|
+
}))); })));
|
|
85
|
+
}
|
|
86
|
+
TableBody.displayName = "TableBody";
|
|
87
|
+
export { TableBody };
|
|
@@ -1,4 +1,17 @@
|
|
|
1
|
-
import React from
|
|
1
|
+
import React from "react";
|
|
2
|
+
declare module "@mui/joy/styles" {
|
|
3
|
+
interface BreakpointOverrides {
|
|
4
|
+
xs: false;
|
|
5
|
+
sm: false;
|
|
6
|
+
md: false;
|
|
7
|
+
lg: false;
|
|
8
|
+
xl: false;
|
|
9
|
+
mobile: true;
|
|
10
|
+
tablet: true;
|
|
11
|
+
laptop: true;
|
|
12
|
+
desktop: true;
|
|
13
|
+
}
|
|
14
|
+
}
|
|
2
15
|
declare function ThemeProvider(props: {
|
|
3
16
|
children?: React.ReactNode;
|
|
4
17
|
}): React.JSX.Element;
|
|
@@ -1,7 +1,35 @@
|
|
|
1
|
-
import React from
|
|
2
|
-
import { CssBaseline, CssVarsProvider, extendTheme } from
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { CssBaseline, CssVarsProvider, checkboxClasses, extendTheme, } from "@mui/joy";
|
|
3
3
|
var defaultTheme = extendTheme({
|
|
4
|
-
cssVarPrefix:
|
|
4
|
+
cssVarPrefix: "ceed",
|
|
5
|
+
breakpoints: {
|
|
6
|
+
values: {
|
|
7
|
+
mobile: 0,
|
|
8
|
+
tablet: 768,
|
|
9
|
+
laptop: 1024,
|
|
10
|
+
desktop: 1280,
|
|
11
|
+
},
|
|
12
|
+
},
|
|
13
|
+
components: {
|
|
14
|
+
JoyTable: {
|
|
15
|
+
defaultProps: {
|
|
16
|
+
size: "sm",
|
|
17
|
+
borderAxis: "bothBetween",
|
|
18
|
+
},
|
|
19
|
+
styleOverrides: {
|
|
20
|
+
root: function (_a) {
|
|
21
|
+
var _b;
|
|
22
|
+
var theme = _a.theme;
|
|
23
|
+
return (_b = {},
|
|
24
|
+
// "--TableRow-hoverBackground": theme.palette.primary.outlinedHoverBg,
|
|
25
|
+
_b["& .".concat(checkboxClasses.root)] = {
|
|
26
|
+
verticalAlign: "middle",
|
|
27
|
+
},
|
|
28
|
+
_b);
|
|
29
|
+
},
|
|
30
|
+
},
|
|
31
|
+
},
|
|
32
|
+
},
|
|
5
33
|
});
|
|
6
34
|
function ThemeProvider(props) {
|
|
7
35
|
return (React.createElement(React.Fragment, null,
|
|
@@ -10,4 +38,4 @@ function ThemeProvider(props) {
|
|
|
10
38
|
props.children)));
|
|
11
39
|
}
|
|
12
40
|
export { ThemeProvider };
|
|
13
|
-
ThemeProvider.displayName =
|
|
41
|
+
ThemeProvider.displayName = "ThemeProvider";
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
export { Box } from "./Box";
|
|
2
2
|
export { Button } from "./Button";
|
|
3
3
|
export { Checkbox } from "./Checkbox";
|
|
4
|
+
export { Container } from "./Container";
|
|
4
5
|
export { DialogActions } from "./DialogActions";
|
|
5
6
|
export { DialogContent } from "./DialogContent";
|
|
6
7
|
export { DialogTitle } from "./DialogTitle";
|
|
@@ -12,14 +13,14 @@ export { FormLabel } from "./FormLabel";
|
|
|
12
13
|
export { Grid } from "./Grid";
|
|
13
14
|
export { IconButton } from "./IconButton";
|
|
14
15
|
export { Input } from "./Input";
|
|
15
|
-
export { Menu } from "./Menu";
|
|
16
|
+
export { Menu, MenuButton, MenuItem } from "./Menu";
|
|
16
17
|
export { Modal, ModalClose, ModalDialog, ModalOverflow } from "./Modal";
|
|
17
18
|
export { Radio, RadioGroup } from "./Radio";
|
|
18
19
|
export { Select, Option } from "./Select";
|
|
19
20
|
export { Sheet } from "./Sheet";
|
|
20
21
|
export { Stack } from "./Stack";
|
|
21
22
|
export { Switch } from "./Switch";
|
|
22
|
-
export { Table } from "./Table";
|
|
23
|
+
export { Table, TableHead, TableBody } from "./Table";
|
|
23
24
|
export { Textarea } from "./Textarea";
|
|
24
25
|
export { ThemeProvider } from "./ThemeProvider";
|
|
25
26
|
export { Tooltip } from "./Tooltip";
|
package/dist/components/index.js
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
export { Box } from "./Box";
|
|
2
2
|
export { Button } from "./Button";
|
|
3
3
|
export { Checkbox } from "./Checkbox";
|
|
4
|
+
export { Container } from "./Container";
|
|
4
5
|
export { DialogActions } from "./DialogActions";
|
|
5
6
|
export { DialogContent } from "./DialogContent";
|
|
6
7
|
export { DialogTitle } from "./DialogTitle";
|
|
@@ -12,14 +13,14 @@ export { FormLabel } from "./FormLabel";
|
|
|
12
13
|
export { Grid } from "./Grid";
|
|
13
14
|
export { IconButton } from "./IconButton";
|
|
14
15
|
export { Input } from "./Input";
|
|
15
|
-
export { Menu } from "./Menu";
|
|
16
|
+
export { Menu, MenuButton, MenuItem } from "./Menu";
|
|
16
17
|
export { Modal, ModalClose, ModalDialog, ModalOverflow } from "./Modal";
|
|
17
18
|
export { Radio, RadioGroup } from "./Radio";
|
|
18
19
|
export { Select, Option } from "./Select";
|
|
19
20
|
export { Sheet } from "./Sheet";
|
|
20
21
|
export { Stack } from "./Stack";
|
|
21
22
|
export { Switch } from "./Switch";
|
|
22
|
-
export { Table } from "./Table";
|
|
23
|
+
export { Table, TableHead, TableBody } from "./Table";
|
|
23
24
|
export { Textarea } from "./Textarea";
|
|
24
25
|
export { ThemeProvider } from "./ThemeProvider";
|
|
25
26
|
export { Tooltip } from "./Tooltip";
|
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, Avatar, avatarClasses, AvatarGroup, avatarGroupClasses, Chip, chipClasses, } from "@mui/joy";
|
|
2
|
-
export { Box, Button, Checkbox, DialogActions, DialogContent, DialogTitle, Divider, Dropdown, FormControl, FormHelperText, FormLabel, Grid, IconButton, Input, Menu, Modal, ModalClose, ModalDialog, ModalOverflow, Radio, RadioGroup, Select, Option, Sheet, Stack, Switch, Table, Textarea, ThemeProvider, Tooltip, Typography, } from "./components";
|
|
2
|
+
export { Box, Button, Checkbox, Container, DialogActions, DialogContent, DialogTitle, Divider, Dropdown, FormControl, FormHelperText, FormLabel, Grid, IconButton, Input, Menu, MenuButton, MenuItem, Modal, ModalClose, ModalDialog, ModalOverflow, Radio, RadioGroup, Select, Option, Sheet, Stack, Switch, Table, TableHead, TableBody, 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,
|
|
4
4
|
// Pure JoyUI
|
|
5
5
|
Avatar, avatarClasses, AvatarGroup, avatarGroupClasses, Chip, chipClasses, } from "@mui/joy";
|
|
6
|
-
export { Box, Button, Checkbox, DialogActions, DialogContent, DialogTitle, Divider, Dropdown, FormControl, FormHelperText, FormLabel, Grid, IconButton, Input, Menu, Modal, ModalClose, ModalDialog, ModalOverflow, Radio, RadioGroup, Select, Option, Sheet, Stack, Switch, Table, Textarea, ThemeProvider, Tooltip, Typography, } from "./components";
|
|
6
|
+
export { Box, Button, Checkbox, Container, DialogActions, DialogContent, DialogTitle, Divider, Dropdown, FormControl, FormHelperText, FormLabel, Grid, IconButton, Input, Menu, MenuButton, MenuItem, Modal, ModalClose, ModalDialog, ModalOverflow, Radio, RadioGroup, Select, Option, Sheet, Stack, Switch, Table, TableHead, TableBody, Textarea, ThemeProvider, Tooltip, Typography, } from "./components";
|
package/framer/index.js
CHANGED
|
@@ -24372,6 +24372,47 @@ var Checkbox3 = (props) => {
|
|
|
24372
24372
|
};
|
|
24373
24373
|
Checkbox3.displayName = "Checkbox";
|
|
24374
24374
|
|
|
24375
|
+
// src/components/Checkbox/index.ts
|
|
24376
|
+
var Checkbox_default2 = Checkbox3;
|
|
24377
|
+
|
|
24378
|
+
// src/components/Container/Container.tsx
|
|
24379
|
+
import { forwardRef as forwardRef48 } from "react";
|
|
24380
|
+
var ContainerRoot = styled_default2("div", {
|
|
24381
|
+
name: "Container",
|
|
24382
|
+
slot: "root",
|
|
24383
|
+
shouldForwardProp: (prop) => prop !== "maxWidth"
|
|
24384
|
+
})(
|
|
24385
|
+
({ theme, maxWidth: maxWidth2 = "desktop" }) => ({
|
|
24386
|
+
width: "100%",
|
|
24387
|
+
marginLeft: "auto",
|
|
24388
|
+
boxSizing: "border-box",
|
|
24389
|
+
marginRight: "auto",
|
|
24390
|
+
display: "block",
|
|
24391
|
+
// Fix IE11 layout when used with main.
|
|
24392
|
+
paddingLeft: theme.spacing(2),
|
|
24393
|
+
paddingRight: theme.spacing(2),
|
|
24394
|
+
...maxWidth2 === "tablet" && {
|
|
24395
|
+
[theme.breakpoints.up("mobile")]: {
|
|
24396
|
+
maxWidth: theme.breakpoints.values.tablet
|
|
24397
|
+
}
|
|
24398
|
+
},
|
|
24399
|
+
...maxWidth2 === "laptop" && {
|
|
24400
|
+
[theme.breakpoints.up("tablet")]: {
|
|
24401
|
+
maxWidth: theme.breakpoints.values.laptop
|
|
24402
|
+
}
|
|
24403
|
+
},
|
|
24404
|
+
...maxWidth2 === "desktop" && {
|
|
24405
|
+
[theme.breakpoints.up("laptop")]: {
|
|
24406
|
+
maxWidth: theme.breakpoints.values.desktop
|
|
24407
|
+
}
|
|
24408
|
+
}
|
|
24409
|
+
})
|
|
24410
|
+
);
|
|
24411
|
+
var Container = forwardRef48(function Container2(props, ref) {
|
|
24412
|
+
return /* @__PURE__ */ jsx2(ContainerRoot, { ref, ...props });
|
|
24413
|
+
});
|
|
24414
|
+
Container.displayName = "Container";
|
|
24415
|
+
|
|
24375
24416
|
// src/components/DialogActions/DialogActions.tsx
|
|
24376
24417
|
import { motion as motion4 } from "framer-motion";
|
|
24377
24418
|
var MotionDialogActions = motion4(DialogActions_default);
|
|
@@ -24549,16 +24590,87 @@ var Switch3 = (props) => {
|
|
|
24549
24590
|
Switch3.displayName = "Switch";
|
|
24550
24591
|
|
|
24551
24592
|
// src/components/Table/Table.tsx
|
|
24552
|
-
import { motion as motion22 } from "framer-motion";
|
|
24553
|
-
var MotionTable = motion22(Table_default);
|
|
24554
24593
|
var Table3 = (props) => {
|
|
24555
|
-
|
|
24594
|
+
const { children, ...inheritProps } = props;
|
|
24595
|
+
return /* @__PURE__ */ jsx2(Table_default, { ...inheritProps, children });
|
|
24556
24596
|
};
|
|
24557
24597
|
Table3.displayName = "Table";
|
|
24598
|
+
function TableHead(props) {
|
|
24599
|
+
const {
|
|
24600
|
+
headCells,
|
|
24601
|
+
showCheckbox,
|
|
24602
|
+
onCheckboxChange,
|
|
24603
|
+
slots: { checkbox: RenderCheckbox = Checkbox_default2 } = {},
|
|
24604
|
+
slotProps: { checkbox: checkboxProps = {} } = {}
|
|
24605
|
+
} = props;
|
|
24606
|
+
return /* @__PURE__ */ jsx2("thead", { children: /* @__PURE__ */ jsxs2("tr", { children: [
|
|
24607
|
+
showCheckbox && /* @__PURE__ */ jsx2(
|
|
24608
|
+
"th",
|
|
24609
|
+
{
|
|
24610
|
+
style: {
|
|
24611
|
+
width: "40px",
|
|
24612
|
+
textAlign: "center"
|
|
24613
|
+
},
|
|
24614
|
+
children: /* @__PURE__ */ jsx2(RenderCheckbox, { onChange: onCheckboxChange, ...checkboxProps })
|
|
24615
|
+
}
|
|
24616
|
+
),
|
|
24617
|
+
headCells.map((headCell) => /* @__PURE__ */ jsx2(
|
|
24618
|
+
"th",
|
|
24619
|
+
{
|
|
24620
|
+
style: {
|
|
24621
|
+
width: headCell.width,
|
|
24622
|
+
textAlign: headCell.numeric ? "right" : "left"
|
|
24623
|
+
},
|
|
24624
|
+
children: headCell.label
|
|
24625
|
+
},
|
|
24626
|
+
headCell.label
|
|
24627
|
+
))
|
|
24628
|
+
] }) });
|
|
24629
|
+
}
|
|
24630
|
+
TableHead.displayName = "TableHead";
|
|
24631
|
+
function TableBody(props) {
|
|
24632
|
+
const {
|
|
24633
|
+
rows,
|
|
24634
|
+
cellOrder,
|
|
24635
|
+
rowOptions,
|
|
24636
|
+
showCheckbox,
|
|
24637
|
+
onCheckboxChange,
|
|
24638
|
+
slots: { checkbox: RenderCheckbox = Checkbox_default2 } = {},
|
|
24639
|
+
slotProps: { checkbox: checkboxProps = {} } = {}
|
|
24640
|
+
} = props;
|
|
24641
|
+
return /* @__PURE__ */ jsx2("tbody", { children: rows.map((row, rowIndex) => /* @__PURE__ */ jsxs2("tr", { children: [
|
|
24642
|
+
showCheckbox && /* @__PURE__ */ jsx2(
|
|
24643
|
+
"td",
|
|
24644
|
+
{
|
|
24645
|
+
style: {
|
|
24646
|
+
textAlign: "center"
|
|
24647
|
+
},
|
|
24648
|
+
children: /* @__PURE__ */ jsx2(
|
|
24649
|
+
RenderCheckbox,
|
|
24650
|
+
{
|
|
24651
|
+
onChange: (event) => onCheckboxChange?.(event, rowIndex),
|
|
24652
|
+
...checkboxProps
|
|
24653
|
+
}
|
|
24654
|
+
)
|
|
24655
|
+
}
|
|
24656
|
+
),
|
|
24657
|
+
cellOrder.map((cellKey) => /* @__PURE__ */ jsx2(
|
|
24658
|
+
"td",
|
|
24659
|
+
{
|
|
24660
|
+
style: {
|
|
24661
|
+
textAlign: rowOptions?.[cellKey]?.numeric ? "right" : "left"
|
|
24662
|
+
},
|
|
24663
|
+
children: row[cellKey]
|
|
24664
|
+
},
|
|
24665
|
+
cellKey
|
|
24666
|
+
))
|
|
24667
|
+
] }, rowIndex)) });
|
|
24668
|
+
}
|
|
24669
|
+
TableBody.displayName = "TableBody";
|
|
24558
24670
|
|
|
24559
24671
|
// src/components/Textarea/Textarea.tsx
|
|
24560
|
-
import { motion as
|
|
24561
|
-
var MotionTextarea =
|
|
24672
|
+
import { motion as motion22 } from "framer-motion";
|
|
24673
|
+
var MotionTextarea = motion22(Textarea_default);
|
|
24562
24674
|
var Textarea3 = (props) => {
|
|
24563
24675
|
return /* @__PURE__ */ jsx2(MotionTextarea, { ...props });
|
|
24564
24676
|
};
|
|
@@ -24566,7 +24678,31 @@ Textarea3.displayName = "Textarea";
|
|
|
24566
24678
|
|
|
24567
24679
|
// src/components/ThemeProvider/ThemeProvider.tsx
|
|
24568
24680
|
var defaultTheme4 = extendTheme({
|
|
24569
|
-
cssVarPrefix: "ceed"
|
|
24681
|
+
cssVarPrefix: "ceed",
|
|
24682
|
+
breakpoints: {
|
|
24683
|
+
values: {
|
|
24684
|
+
mobile: 0,
|
|
24685
|
+
tablet: 768,
|
|
24686
|
+
laptop: 1024,
|
|
24687
|
+
desktop: 1280
|
|
24688
|
+
}
|
|
24689
|
+
},
|
|
24690
|
+
components: {
|
|
24691
|
+
JoyTable: {
|
|
24692
|
+
defaultProps: {
|
|
24693
|
+
size: "sm",
|
|
24694
|
+
borderAxis: "bothBetween"
|
|
24695
|
+
},
|
|
24696
|
+
styleOverrides: {
|
|
24697
|
+
root: ({ theme }) => ({
|
|
24698
|
+
// "--TableRow-hoverBackground": theme.palette.primary.outlinedHoverBg,
|
|
24699
|
+
[`& .${checkboxClasses_default.root}`]: {
|
|
24700
|
+
verticalAlign: "middle"
|
|
24701
|
+
}
|
|
24702
|
+
})
|
|
24703
|
+
}
|
|
24704
|
+
}
|
|
24705
|
+
}
|
|
24570
24706
|
});
|
|
24571
24707
|
function ThemeProvider4(props) {
|
|
24572
24708
|
return /* @__PURE__ */ jsx2(Fragment12, { children: /* @__PURE__ */ jsxs2(CssVarsProvider, { theme: defaultTheme4, children: [
|
|
@@ -24577,16 +24713,16 @@ function ThemeProvider4(props) {
|
|
|
24577
24713
|
ThemeProvider4.displayName = "ThemeProvider";
|
|
24578
24714
|
|
|
24579
24715
|
// src/components/Tooltip/Tooltip.tsx
|
|
24580
|
-
import { motion as
|
|
24581
|
-
var MotionTooltip =
|
|
24716
|
+
import { motion as motion23 } from "framer-motion";
|
|
24717
|
+
var MotionTooltip = motion23(Tooltip_default);
|
|
24582
24718
|
var Tooltip3 = (props) => {
|
|
24583
24719
|
return /* @__PURE__ */ jsx2(MotionTooltip, { ...props });
|
|
24584
24720
|
};
|
|
24585
24721
|
Tooltip3.displayName = "Tooltip";
|
|
24586
24722
|
|
|
24587
24723
|
// src/components/Typography/Typography.tsx
|
|
24588
|
-
import { motion as
|
|
24589
|
-
var MotionTypography =
|
|
24724
|
+
import { motion as motion24 } from "framer-motion";
|
|
24725
|
+
var MotionTypography = motion24(Typography_default);
|
|
24590
24726
|
var Typography3 = (props) => {
|
|
24591
24727
|
return /* @__PURE__ */ jsx2(MotionTypography, { ...props });
|
|
24592
24728
|
};
|
|
@@ -24598,6 +24734,7 @@ export {
|
|
|
24598
24734
|
Button3 as Button,
|
|
24599
24735
|
Checkbox3 as Checkbox,
|
|
24600
24736
|
Chip_default as Chip,
|
|
24737
|
+
Container,
|
|
24601
24738
|
DialogActions3 as DialogActions,
|
|
24602
24739
|
DialogContent3 as DialogContent,
|
|
24603
24740
|
DialogTitle3 as DialogTitle,
|
|
@@ -24610,6 +24747,8 @@ export {
|
|
|
24610
24747
|
IconButton3 as IconButton,
|
|
24611
24748
|
Input3 as Input,
|
|
24612
24749
|
Menu3 as Menu,
|
|
24750
|
+
MenuButton3 as MenuButton,
|
|
24751
|
+
MenuItem3 as MenuItem,
|
|
24613
24752
|
Modal3 as Modal,
|
|
24614
24753
|
ModalClose3 as ModalClose,
|
|
24615
24754
|
ModalDialog3 as ModalDialog,
|
|
@@ -24622,6 +24761,8 @@ export {
|
|
|
24622
24761
|
Stack2 as Stack,
|
|
24623
24762
|
Switch3 as Switch,
|
|
24624
24763
|
Table3 as Table,
|
|
24764
|
+
TableBody,
|
|
24765
|
+
TableHead,
|
|
24625
24766
|
Textarea3 as Textarea,
|
|
24626
24767
|
ThemeProvider4 as ThemeProvider,
|
|
24627
24768
|
Tooltip3 as Tooltip,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ceed/ads",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.9",
|
|
4
4
|
"main": "dist/index.js",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"description": "UI tool for Ecube Labs front-end developers",
|
|
@@ -42,14 +42,10 @@
|
|
|
42
42
|
"@storybook/react-webpack5": "^7.6.13",
|
|
43
43
|
"@storybook/test": "^7.6.13",
|
|
44
44
|
"@storybook/theming": "^7.6.13",
|
|
45
|
-
"@types/tmp": "^0",
|
|
46
45
|
"esbuild": "^0.20.1",
|
|
47
|
-
"postcss": "^8.4.35",
|
|
48
|
-
"postcss-modules": "^6.0.0",
|
|
49
46
|
"react": "^18.2.0",
|
|
50
47
|
"react-dom": "^18.2.0",
|
|
51
48
|
"storybook": "^7.6.13",
|
|
52
|
-
"tmp": "^0.2.1",
|
|
53
49
|
"typescript": "^5.3.3"
|
|
54
50
|
},
|
|
55
51
|
"repository": {
|