@ttoss/components 2.1.1 → 2.1.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +18 -24
- package/dist/Table/index.d.ts +12 -10
- package/dist/esm/Menu/index.js +13 -2285
- package/dist/esm/NotificationCard/index.js +23 -2
- package/dist/esm/Search/index.js +0 -1
- package/dist/esm/Table/index.js +9 -31
- package/dist/esm/Toast/index.js +0 -1
- package/dist/esm/chunk-X5PEMO2R.js +2275 -0
- package/package.json +5 -5
- package/dist/esm/chunk-ESDEGKXL.js +0 -22
|
@@ -1,31 +1,42 @@
|
|
|
1
1
|
/** Powered by @ttoss/config. https://ttoss.dev/docs/modules/packages/config/ */
|
|
2
|
+
import { Icon } from "../chunk-X5PEMO2R.js";
|
|
2
3
|
|
|
3
4
|
// src/components/NotificationCard/NotificationCard.tsx
|
|
4
|
-
import { Box, Card, CloseButton } from "@ttoss/ui";
|
|
5
|
+
import { Box, Card, CloseButton, Text } from "@ttoss/ui";
|
|
5
6
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
6
7
|
var NotificationCard = props => {
|
|
7
8
|
const sxMap = {
|
|
8
9
|
success: {
|
|
9
10
|
card: {
|
|
11
|
+
backgroundColor: "feedback.background.positive.default",
|
|
10
12
|
borderColor: "feedback.border.positive.default"
|
|
11
13
|
}
|
|
12
14
|
},
|
|
13
15
|
error: {
|
|
14
16
|
card: {
|
|
17
|
+
backgroundColor: "feedback.background.negative.default",
|
|
15
18
|
borderColor: "feedback.border.negative.default"
|
|
16
19
|
}
|
|
17
20
|
},
|
|
18
21
|
warning: {
|
|
19
22
|
card: {
|
|
23
|
+
backgroundColor: "feedback.background.caution.default",
|
|
20
24
|
borderColor: "feedback.border.caution.default"
|
|
21
25
|
}
|
|
22
26
|
},
|
|
23
27
|
info: {
|
|
24
28
|
card: {
|
|
29
|
+
backgroundColor: "feedback.background.primary.default",
|
|
25
30
|
borderColor: "feedback.border.primary.default"
|
|
26
31
|
}
|
|
27
32
|
}
|
|
28
33
|
};
|
|
34
|
+
const icon = {
|
|
35
|
+
success: "success-circle",
|
|
36
|
+
error: "error",
|
|
37
|
+
warning: "warning-alt",
|
|
38
|
+
info: "info"
|
|
39
|
+
};
|
|
29
40
|
return /* @__PURE__ */jsxs(Card, {
|
|
30
41
|
sx: {
|
|
31
42
|
...sxMap[props.type].card,
|
|
@@ -38,11 +49,21 @@ var NotificationCard = props => {
|
|
|
38
49
|
alignItems: "center",
|
|
39
50
|
fontSize: "xl"
|
|
40
51
|
},
|
|
41
|
-
children: [
|
|
52
|
+
children: [/* @__PURE__ */jsxs(Text, {
|
|
53
|
+
sx: {
|
|
54
|
+
display: "inline-flex",
|
|
55
|
+
alignItems: "center",
|
|
56
|
+
gap: "2"
|
|
57
|
+
},
|
|
58
|
+
children: [/* @__PURE__ */jsx(Icon, {
|
|
59
|
+
icon: icon[props.type]
|
|
60
|
+
}), props.title]
|
|
61
|
+
}), props.onClose && /* @__PURE__ */jsx(CloseButton, {
|
|
42
62
|
onClick: props.onClose
|
|
43
63
|
})]
|
|
44
64
|
}), /* @__PURE__ */jsxs(Card.Body, {
|
|
45
65
|
sx: {
|
|
66
|
+
...sxMap[props.type].card,
|
|
46
67
|
display: "flex",
|
|
47
68
|
gap: "4",
|
|
48
69
|
justifyContent: "space-between",
|
package/dist/esm/Search/index.js
CHANGED
package/dist/esm/Table/index.js
CHANGED
|
@@ -1,34 +1,8 @@
|
|
|
1
1
|
/** Powered by @ttoss/config. https://ttoss.dev/docs/modules/packages/config/ */
|
|
2
|
-
import { __export, __reExport } from "../chunk-ESDEGKXL.js";
|
|
3
|
-
|
|
4
|
-
// src/components/Table/index.ts
|
|
5
|
-
var Table_exports2 = {};
|
|
6
|
-
__export(Table_exports2, {
|
|
7
|
-
Table: () => Table,
|
|
8
|
-
TableBody: () => TableBody,
|
|
9
|
-
TableCaption: () => TableCaption,
|
|
10
|
-
TableCell: () => TableCell,
|
|
11
|
-
TableFooter: () => TableFooter,
|
|
12
|
-
TableHead: () => TableHead,
|
|
13
|
-
TableHeader: () => TableHeader,
|
|
14
|
-
TableRow: () => TableRow
|
|
15
|
-
});
|
|
16
2
|
|
|
17
3
|
// src/components/Table/Table.tsx
|
|
18
|
-
var Table_exports = {};
|
|
19
|
-
__export(Table_exports, {
|
|
20
|
-
Table: () => Table,
|
|
21
|
-
TableBody: () => TableBody,
|
|
22
|
-
TableCaption: () => TableCaption,
|
|
23
|
-
TableCell: () => TableCell,
|
|
24
|
-
TableFooter: () => TableFooter,
|
|
25
|
-
TableHead: () => TableHead,
|
|
26
|
-
TableHeader: () => TableHeader,
|
|
27
|
-
TableRow: () => TableRow
|
|
28
|
-
});
|
|
29
|
-
__reExport(Table_exports, react_table_star);
|
|
30
4
|
import { Box } from "@ttoss/ui";
|
|
31
|
-
import
|
|
5
|
+
import { createCell, createColumnHelper, flexRender, getCoreRowModel, useReactTable } from "@tanstack/react-table";
|
|
32
6
|
import { jsx } from "react/jsx-runtime";
|
|
33
7
|
var Table = props => {
|
|
34
8
|
return /* @__PURE__ */jsx(Box, {
|
|
@@ -78,7 +52,11 @@ var TableFooter = props => {
|
|
|
78
52
|
...props
|
|
79
53
|
});
|
|
80
54
|
};
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
55
|
+
Table.Head = TableHead;
|
|
56
|
+
Table.Body = TableBody;
|
|
57
|
+
Table.Row = TableRow;
|
|
58
|
+
Table.Cell = TableCell;
|
|
59
|
+
Table.Header = TableHeader;
|
|
60
|
+
Table.Caption = TableCaption;
|
|
61
|
+
Table.Footer = TableFooter;
|
|
62
|
+
export { Table, createCell, createColumnHelper, flexRender, getCoreRowModel, useReactTable };
|