@ttoss/components 2.3.0 → 2.4.1
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 +230 -317
- package/dist/FileUploader/index.d.ts +48 -0
- package/dist/JsonEditor/index.d.ts +1 -0
- package/dist/esm/Accordion/index.js +11 -15
- package/dist/esm/Drawer/index.js +14 -18
- package/dist/esm/FileUploader/index.js +346 -0
- package/dist/esm/InstallPwa/index.js +27 -32
- package/dist/esm/JsonEditor/index.js +1 -0
- package/dist/esm/JsonView/index.js +1 -0
- package/dist/esm/List/index.js +9 -12
- package/dist/esm/Markdown/index.js +10 -12
- package/dist/esm/Menu/index.js +76 -2168
- package/dist/esm/Modal/index.js +8 -10
- package/dist/esm/NotificationCard/index.js +3 -1
- package/dist/esm/NotificationsMenu/index.js +137 -148
- package/dist/esm/Search/index.js +6 -6
- package/dist/esm/Table/index.js +25 -25
- package/dist/esm/Tabs/index.js +10 -14
- package/dist/esm/Toast/index.js +10 -11
- package/dist/esm/{chunk-Q4MJKM2X.js → chunk-AZTAV4VC.js} +133 -207
- package/dist/esm/chunk-GOISZ4AR.js +156 -0
- package/dist/esm/chunk-V4MHYKRI.js +7 -0
- package/package.json +13 -5
package/dist/esm/Modal/index.js
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
/** Powered by @ttoss/config. https://ttoss.dev/docs/modules/packages/config/ */
|
|
2
|
+
import { __name } from "../chunk-V4MHYKRI.js";
|
|
2
3
|
|
|
3
4
|
// src/components/Modal/Modal.tsx
|
|
4
5
|
import { css as transformStyleObject } from "@theme-ui/css";
|
|
5
6
|
import { useResponsiveValue, useTheme } from "@ttoss/ui";
|
|
6
7
|
import ReactModal from "react-modal";
|
|
7
|
-
import { jsx } from "react/jsx-runtime";
|
|
8
8
|
ReactModal.defaultStyles = {
|
|
9
9
|
overlay: {},
|
|
10
10
|
content: {}
|
|
11
11
|
};
|
|
12
|
-
var Modal = props => {
|
|
12
|
+
var Modal = /* @__PURE__ */__name(props => {
|
|
13
13
|
const {
|
|
14
14
|
theme
|
|
15
15
|
} = useTheme();
|
|
@@ -28,20 +28,19 @@ var Modal = props => {
|
|
|
28
28
|
alignItems: "center",
|
|
29
29
|
zIndex: "modal",
|
|
30
30
|
...props.style?.overlay
|
|
31
|
-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
32
31
|
})(theme),
|
|
33
32
|
content: transformStyleObject({
|
|
34
33
|
/**
|
|
35
|
-
|
|
36
|
-
|
|
34
|
+
* Theme
|
|
35
|
+
*/
|
|
37
36
|
backgroundColor: "surface",
|
|
38
37
|
padding,
|
|
39
38
|
border: "default",
|
|
40
39
|
borderColor: "surface",
|
|
41
40
|
borderRadius: "default",
|
|
42
41
|
/**
|
|
43
|
-
|
|
44
|
-
|
|
42
|
+
* General
|
|
43
|
+
*/
|
|
45
44
|
WebkitOverflowScrolling: "touch",
|
|
46
45
|
overflow: "auto",
|
|
47
46
|
position: "relative",
|
|
@@ -52,13 +51,12 @@ var Modal = props => {
|
|
|
52
51
|
maxHeight: "90%",
|
|
53
52
|
maxWidth: "90%",
|
|
54
53
|
...props.style?.content
|
|
55
|
-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
56
54
|
})(theme)
|
|
57
55
|
};
|
|
58
|
-
return /* @__PURE__ */
|
|
56
|
+
return /* @__PURE__ */React.createElement(ReactModal, {
|
|
59
57
|
...props,
|
|
60
58
|
style
|
|
61
59
|
});
|
|
62
|
-
};
|
|
60
|
+
}, "Modal");
|
|
63
61
|
Modal.setAppElement = ReactModal.setAppElement;
|
|
64
62
|
export { Modal };
|
|
@@ -1,3 +1,5 @@
|
|
|
1
1
|
/** Powered by @ttoss/config. https://ttoss.dev/docs/modules/packages/config/ */
|
|
2
|
-
import { NotificationCard } from "../chunk-
|
|
2
|
+
import { NotificationCard } from "../chunk-GOISZ4AR.js";
|
|
3
|
+
import "../chunk-AZTAV4VC.js";
|
|
4
|
+
import "../chunk-V4MHYKRI.js";
|
|
3
5
|
export { NotificationCard };
|
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
/** Powered by @ttoss/config. https://ttoss.dev/docs/modules/packages/config/ */
|
|
2
|
-
import {
|
|
2
|
+
import { NotificationCard } from "../chunk-GOISZ4AR.js";
|
|
3
|
+
import { Icon } from "../chunk-AZTAV4VC.js";
|
|
4
|
+
import { __name } from "../chunk-V4MHYKRI.js";
|
|
3
5
|
|
|
4
6
|
// src/components/NotificationsMenu/NotificationsMenu.tsx
|
|
5
7
|
import { Box, Button, Card, Flex, IconButton, Text } from "@ttoss/ui";
|
|
6
8
|
import * as React from "react";
|
|
7
|
-
|
|
8
|
-
var NotificationsMenu = ({
|
|
9
|
+
var NotificationsMenu = /* @__PURE__ */__name(({
|
|
9
10
|
notifications,
|
|
10
11
|
defaultOpen = false,
|
|
11
12
|
hasMore = false,
|
|
@@ -21,13 +22,13 @@ var NotificationsMenu = ({
|
|
|
21
22
|
const containerRef = React.useRef(null);
|
|
22
23
|
const loadMoreRef = React.useRef(null);
|
|
23
24
|
const [showCount, setShowCount] = React.useState(true);
|
|
24
|
-
const togglePanel = () => {
|
|
25
|
+
const togglePanel = /* @__PURE__ */__name(() => {
|
|
25
26
|
setIsOpen(prev => {
|
|
26
27
|
const next = !prev;
|
|
27
28
|
onOpenChange?.(next);
|
|
28
29
|
return next;
|
|
29
30
|
});
|
|
30
|
-
};
|
|
31
|
+
}, "togglePanel");
|
|
31
32
|
React.useEffect(() => {
|
|
32
33
|
if (!isOpen || !buttonRef.current) return;
|
|
33
34
|
const rect = buttonRef.current.getBoundingClientRect();
|
|
@@ -56,161 +57,149 @@ var NotificationsMenu = ({
|
|
|
56
57
|
}, [hasMore, onLoadMore, notifications.length]);
|
|
57
58
|
React.useEffect(() => {
|
|
58
59
|
if (!isOpen) return;
|
|
59
|
-
const handleClickOutside = event => {
|
|
60
|
+
const handleClickOutside = /* @__PURE__ */__name(event => {
|
|
60
61
|
if (containerRef.current && !containerRef.current.contains(event.target) && buttonRef.current && !buttonRef.current.contains(event.target)) {
|
|
61
62
|
setIsOpen(false);
|
|
62
63
|
onOpenChange?.(false);
|
|
63
64
|
onClose?.();
|
|
64
65
|
}
|
|
65
|
-
};
|
|
66
|
+
}, "handleClickOutside");
|
|
66
67
|
document.addEventListener("mousedown", handleClickOutside);
|
|
67
68
|
return () => {
|
|
68
69
|
document.removeEventListener("mousedown", handleClickOutside);
|
|
69
70
|
};
|
|
70
71
|
}, [isOpen, onOpenChange, onClose]);
|
|
71
|
-
return /* @__PURE__ */
|
|
72
|
+
return /* @__PURE__ */React.createElement(Flex, {
|
|
72
73
|
sx: {
|
|
73
74
|
position: "relative",
|
|
74
75
|
justifyContent: "flex-start"
|
|
76
|
+
}
|
|
77
|
+
}, /* @__PURE__ */React.createElement(Box, {
|
|
78
|
+
sx: {
|
|
79
|
+
position: "relative"
|
|
80
|
+
}
|
|
81
|
+
}, /* @__PURE__ */React.createElement(IconButton, {
|
|
82
|
+
ref: buttonRef,
|
|
83
|
+
variant: "ghost",
|
|
84
|
+
sx: {
|
|
85
|
+
position: "relative",
|
|
86
|
+
borderRadius: "full",
|
|
87
|
+
padding: 1,
|
|
88
|
+
transition: "background-color 0.3s ease",
|
|
89
|
+
"&:hover": {
|
|
90
|
+
backgroundColor: "action.background.muted.default"
|
|
91
|
+
}
|
|
92
|
+
},
|
|
93
|
+
onClick: togglePanel
|
|
94
|
+
}, /* @__PURE__ */React.createElement(Box, {
|
|
95
|
+
sx: {
|
|
96
|
+
color: "display.text.muted.default"
|
|
97
|
+
}
|
|
98
|
+
}, /* @__PURE__ */React.createElement(Icon, {
|
|
99
|
+
icon: "mdi:bell-outline",
|
|
100
|
+
width: 22,
|
|
101
|
+
height: 22
|
|
102
|
+
})), count > 0 && showCount && /* @__PURE__ */React.createElement(Box, {
|
|
103
|
+
sx: {
|
|
104
|
+
position: "absolute",
|
|
105
|
+
top: "-2px",
|
|
106
|
+
right: "-2px",
|
|
107
|
+
minWidth: "14px",
|
|
108
|
+
height: "14px",
|
|
109
|
+
paddingX: 1,
|
|
110
|
+
borderRadius: "full",
|
|
111
|
+
backgroundColor: "action.background.negative.default",
|
|
112
|
+
color: "feedback.text.primary.default",
|
|
113
|
+
fontSize: "10px",
|
|
114
|
+
fontWeight: "bold",
|
|
115
|
+
display: "flex",
|
|
116
|
+
alignItems: "center",
|
|
117
|
+
justifyContent: "center",
|
|
118
|
+
lineHeight: 1
|
|
119
|
+
}
|
|
120
|
+
}, count > 99 ? "99+" : count)), isOpen && /* @__PURE__ */React.createElement("div", {
|
|
121
|
+
ref: containerRef
|
|
122
|
+
}, /* @__PURE__ */React.createElement(Card, {
|
|
123
|
+
sx: {
|
|
124
|
+
position: "absolute",
|
|
125
|
+
top: "calc(100% + 8px)",
|
|
126
|
+
left: openToLeft ? "auto" : 0,
|
|
127
|
+
right: openToLeft ? 0 : "auto",
|
|
128
|
+
width: notifications.length === 0 ? ["60vw", "300px"] : ["90vw", "600px"],
|
|
129
|
+
maxHeight: "550px",
|
|
130
|
+
overflowY: "auto",
|
|
131
|
+
zIndex: "modal",
|
|
132
|
+
padding: 0,
|
|
133
|
+
boxShadow: "xl",
|
|
134
|
+
borderRadius: "2xl",
|
|
135
|
+
backgroundColor: "display.background.secondary.default"
|
|
136
|
+
}
|
|
137
|
+
}, /* @__PURE__ */React.createElement(Box, {
|
|
138
|
+
sx: {
|
|
139
|
+
width: "100%"
|
|
140
|
+
}
|
|
141
|
+
}, /* @__PURE__ */React.createElement(Flex, {
|
|
142
|
+
sx: {
|
|
143
|
+
flexDirection: "column",
|
|
144
|
+
gap: 4
|
|
145
|
+
}
|
|
146
|
+
}, notifications.length > 0 && onClearAll && /* @__PURE__ */React.createElement(Flex, {
|
|
147
|
+
sx: {
|
|
148
|
+
justifyContent: "flex-end",
|
|
149
|
+
p: 2,
|
|
150
|
+
marginBottom: -2
|
|
151
|
+
}
|
|
152
|
+
}, /* @__PURE__ */React.createElement(Button, {
|
|
153
|
+
variant: "ghost",
|
|
154
|
+
sx: {
|
|
155
|
+
borderRadius: "md",
|
|
156
|
+
padding: 1,
|
|
157
|
+
paddingLeft: 10,
|
|
158
|
+
paddingRight: 10,
|
|
159
|
+
fontSize: "md",
|
|
160
|
+
color: "display.text.muted.default",
|
|
161
|
+
border: "1px solid",
|
|
162
|
+
borderColor: "display.border.default",
|
|
163
|
+
transition: "all 0.2s ease",
|
|
164
|
+
display: "flex",
|
|
165
|
+
alignItems: "center",
|
|
166
|
+
"&:hover": {
|
|
167
|
+
backgroundColor: "action.background.muted.default",
|
|
168
|
+
color: "display.text.default",
|
|
169
|
+
borderColor: "action.border.default"
|
|
170
|
+
}
|
|
75
171
|
},
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
paddingX: 1,
|
|
110
|
-
borderRadius: "full",
|
|
111
|
-
backgroundColor: "action.background.negative.default",
|
|
112
|
-
color: "feedback.text.primary.default",
|
|
113
|
-
fontSize: "10px",
|
|
114
|
-
fontWeight: "bold",
|
|
115
|
-
display: "flex",
|
|
116
|
-
alignItems: "center",
|
|
117
|
-
justifyContent: "center",
|
|
118
|
-
lineHeight: 1
|
|
119
|
-
},
|
|
120
|
-
children: count > 99 ? "99+" : count
|
|
121
|
-
})]
|
|
122
|
-
}), isOpen && /* @__PURE__ */jsx("div", {
|
|
123
|
-
ref: containerRef,
|
|
124
|
-
children: /* @__PURE__ */jsx(Card, {
|
|
125
|
-
sx: {
|
|
126
|
-
position: "absolute",
|
|
127
|
-
top: "calc(100% + 8px)",
|
|
128
|
-
left: openToLeft ? "auto" : 0,
|
|
129
|
-
right: openToLeft ? 0 : "auto",
|
|
130
|
-
width: notifications.length === 0 ? ["60vw", "300px"] : ["90vw", "600px"],
|
|
131
|
-
maxHeight: "550px",
|
|
132
|
-
overflowY: "auto",
|
|
133
|
-
zIndex: "modal",
|
|
134
|
-
padding: 0,
|
|
135
|
-
boxShadow: "xl",
|
|
136
|
-
borderRadius: "2xl",
|
|
137
|
-
backgroundColor: "display.background.secondary.default"
|
|
138
|
-
},
|
|
139
|
-
children: /* @__PURE__ */jsx(Box, {
|
|
140
|
-
sx: {
|
|
141
|
-
width: "100%"
|
|
142
|
-
},
|
|
143
|
-
children: /* @__PURE__ */jsxs(Flex, {
|
|
144
|
-
sx: {
|
|
145
|
-
flexDirection: "column",
|
|
146
|
-
gap: 4
|
|
147
|
-
},
|
|
148
|
-
children: [notifications.length > 0 && onClearAll && /* @__PURE__ */jsx(Flex, {
|
|
149
|
-
sx: {
|
|
150
|
-
justifyContent: "flex-end",
|
|
151
|
-
p: 2,
|
|
152
|
-
marginBottom: -2
|
|
153
|
-
},
|
|
154
|
-
children: /* @__PURE__ */jsxs(Button, {
|
|
155
|
-
variant: "ghost",
|
|
156
|
-
sx: {
|
|
157
|
-
borderRadius: "md",
|
|
158
|
-
padding: 1,
|
|
159
|
-
paddingLeft: 10,
|
|
160
|
-
paddingRight: 10,
|
|
161
|
-
fontSize: "md",
|
|
162
|
-
color: "display.text.muted.default",
|
|
163
|
-
border: "1px solid",
|
|
164
|
-
borderColor: "display.border.default",
|
|
165
|
-
transition: "all 0.2s ease",
|
|
166
|
-
display: "flex",
|
|
167
|
-
alignItems: "center",
|
|
168
|
-
"&:hover": {
|
|
169
|
-
backgroundColor: "action.background.muted.default",
|
|
170
|
-
color: "display.text.default",
|
|
171
|
-
borderColor: "action.border.default"
|
|
172
|
-
}
|
|
173
|
-
},
|
|
174
|
-
onClick: onClearAll,
|
|
175
|
-
children: [/* @__PURE__ */jsx(Icon, {
|
|
176
|
-
icon: "delete",
|
|
177
|
-
width: 16,
|
|
178
|
-
height: 16
|
|
179
|
-
}), /* @__PURE__ */jsx(Text, {
|
|
180
|
-
sx: {
|
|
181
|
-
ml: -1,
|
|
182
|
-
marginTop: -0.4,
|
|
183
|
-
fontSize: "sm"
|
|
184
|
-
},
|
|
185
|
-
children: "Limpar Tudo"
|
|
186
|
-
})]
|
|
187
|
-
})
|
|
188
|
-
}), notifications.length === 0 ? /* @__PURE__ */jsx(Text, {
|
|
189
|
-
sx: {
|
|
190
|
-
color: "display.text.muted.default",
|
|
191
|
-
textAlign: "center",
|
|
192
|
-
p: 4
|
|
193
|
-
},
|
|
194
|
-
children: "Nenhuma notifica\xE7\xE3o"
|
|
195
|
-
}) : notifications.map(notification => {
|
|
196
|
-
return /* @__PURE__ */jsx(NotificationCard, {
|
|
197
|
-
...notification,
|
|
198
|
-
onClose: () => {
|
|
199
|
-
notification.onClose?.();
|
|
200
|
-
onClose?.();
|
|
201
|
-
}
|
|
202
|
-
}, notification.id);
|
|
203
|
-
}), hasMore && /* @__PURE__ */jsx("div", {
|
|
204
|
-
ref: loadMoreRef,
|
|
205
|
-
style: {
|
|
206
|
-
height: 1
|
|
207
|
-
}
|
|
208
|
-
})]
|
|
209
|
-
})
|
|
210
|
-
})
|
|
211
|
-
})
|
|
212
|
-
})]
|
|
213
|
-
})
|
|
214
|
-
});
|
|
215
|
-
};
|
|
172
|
+
onClick: onClearAll
|
|
173
|
+
}, /* @__PURE__ */React.createElement(Icon, {
|
|
174
|
+
icon: "delete",
|
|
175
|
+
width: 16,
|
|
176
|
+
height: 16
|
|
177
|
+
}), /* @__PURE__ */React.createElement(Text, {
|
|
178
|
+
sx: {
|
|
179
|
+
ml: -1,
|
|
180
|
+
marginTop: -0.4,
|
|
181
|
+
fontSize: "sm"
|
|
182
|
+
}
|
|
183
|
+
}, "Limpar Tudo"))), notifications.length === 0 ? /* @__PURE__ */React.createElement(Text, {
|
|
184
|
+
sx: {
|
|
185
|
+
color: "display.text.muted.default",
|
|
186
|
+
textAlign: "center",
|
|
187
|
+
p: 4
|
|
188
|
+
}
|
|
189
|
+
}, "Nenhuma notifica\xE7\xE3o") : notifications.map(notification => {
|
|
190
|
+
return /* @__PURE__ */React.createElement(NotificationCard, {
|
|
191
|
+
key: notification.id,
|
|
192
|
+
...notification,
|
|
193
|
+
onClose: /* @__PURE__ */__name(() => {
|
|
194
|
+
notification.onClose?.();
|
|
195
|
+
onClose?.();
|
|
196
|
+
}, "onClose")
|
|
197
|
+
});
|
|
198
|
+
}), hasMore && /* @__PURE__ */React.createElement("div", {
|
|
199
|
+
ref: loadMoreRef,
|
|
200
|
+
style: {
|
|
201
|
+
height: 1
|
|
202
|
+
}
|
|
203
|
+
})))))));
|
|
204
|
+
}, "NotificationsMenu");
|
|
216
205
|
export { NotificationsMenu };
|
package/dist/esm/Search/index.js
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
/** Powered by @ttoss/config. https://ttoss.dev/docs/modules/packages/config/ */
|
|
2
|
+
import { __name } from "../chunk-V4MHYKRI.js";
|
|
2
3
|
|
|
3
4
|
// src/components/Search/Search.tsx
|
|
4
5
|
import * as React from "react";
|
|
5
6
|
import { Input } from "@ttoss/ui";
|
|
6
7
|
import { useDebounce } from "@ttoss/react-hooks";
|
|
7
|
-
|
|
8
|
-
var Search = ({
|
|
8
|
+
var Search = /* @__PURE__ */__name(({
|
|
9
9
|
value,
|
|
10
10
|
defaultValue,
|
|
11
11
|
loading,
|
|
@@ -17,13 +17,13 @@ var Search = ({
|
|
|
17
17
|
React.useEffect(() => {
|
|
18
18
|
onChange(debouncedValue);
|
|
19
19
|
}, [debouncedValue, onChange]);
|
|
20
|
-
return /* @__PURE__ */
|
|
20
|
+
return /* @__PURE__ */React.createElement(Input, {
|
|
21
21
|
leadingIcon: loading ? "loading" : "search",
|
|
22
22
|
defaultValue: text,
|
|
23
|
-
onChange: e => {
|
|
23
|
+
onChange: /* @__PURE__ */__name(e => {
|
|
24
24
|
return setText(e.target.value);
|
|
25
|
-
},
|
|
25
|
+
}, "onChange"),
|
|
26
26
|
...props
|
|
27
27
|
});
|
|
28
|
-
};
|
|
28
|
+
}, "Search");
|
|
29
29
|
export { Search };
|
package/dist/esm/Table/index.js
CHANGED
|
@@ -1,57 +1,57 @@
|
|
|
1
1
|
/** Powered by @ttoss/config. https://ttoss.dev/docs/modules/packages/config/ */
|
|
2
|
+
import { __name } from "../chunk-V4MHYKRI.js";
|
|
2
3
|
|
|
3
4
|
// src/components/Table/Table.tsx
|
|
4
5
|
import { Box } from "@ttoss/ui";
|
|
5
6
|
import { createCell, createColumnHelper, flexRender, getCoreRowModel, useReactTable } from "@tanstack/react-table";
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
return /* @__PURE__ */jsx(Box, {
|
|
7
|
+
var Table = /* @__PURE__ */__name(props => {
|
|
8
|
+
return /* @__PURE__ */React.createElement(Box, {
|
|
9
9
|
as: "table",
|
|
10
10
|
...props
|
|
11
11
|
});
|
|
12
|
-
};
|
|
13
|
-
var TableHead = props => {
|
|
14
|
-
return /* @__PURE__ */
|
|
12
|
+
}, "Table");
|
|
13
|
+
var TableHead = /* @__PURE__ */__name(props => {
|
|
14
|
+
return /* @__PURE__ */React.createElement(Box, {
|
|
15
15
|
as: "thead",
|
|
16
16
|
...props
|
|
17
17
|
});
|
|
18
|
-
};
|
|
19
|
-
var TableBody = props => {
|
|
20
|
-
return /* @__PURE__ */
|
|
18
|
+
}, "TableHead");
|
|
19
|
+
var TableBody = /* @__PURE__ */__name(props => {
|
|
20
|
+
return /* @__PURE__ */React.createElement(Box, {
|
|
21
21
|
as: "tbody",
|
|
22
22
|
...props
|
|
23
23
|
});
|
|
24
|
-
};
|
|
25
|
-
var TableRow = props => {
|
|
26
|
-
return /* @__PURE__ */
|
|
24
|
+
}, "TableBody");
|
|
25
|
+
var TableRow = /* @__PURE__ */__name(props => {
|
|
26
|
+
return /* @__PURE__ */React.createElement(Box, {
|
|
27
27
|
as: "tr",
|
|
28
28
|
...props
|
|
29
29
|
});
|
|
30
|
-
};
|
|
31
|
-
var TableCell = props => {
|
|
32
|
-
return /* @__PURE__ */
|
|
30
|
+
}, "TableRow");
|
|
31
|
+
var TableCell = /* @__PURE__ */__name(props => {
|
|
32
|
+
return /* @__PURE__ */React.createElement(Box, {
|
|
33
33
|
as: "td",
|
|
34
34
|
...props
|
|
35
35
|
});
|
|
36
|
-
};
|
|
37
|
-
var TableHeader = props => {
|
|
38
|
-
return /* @__PURE__ */
|
|
36
|
+
}, "TableCell");
|
|
37
|
+
var TableHeader = /* @__PURE__ */__name(props => {
|
|
38
|
+
return /* @__PURE__ */React.createElement(Box, {
|
|
39
39
|
as: "th",
|
|
40
40
|
...props
|
|
41
41
|
});
|
|
42
|
-
};
|
|
43
|
-
var TableCaption = props => {
|
|
44
|
-
return /* @__PURE__ */
|
|
42
|
+
}, "TableHeader");
|
|
43
|
+
var TableCaption = /* @__PURE__ */__name(props => {
|
|
44
|
+
return /* @__PURE__ */React.createElement(Box, {
|
|
45
45
|
as: "caption",
|
|
46
46
|
...props
|
|
47
47
|
});
|
|
48
|
-
};
|
|
49
|
-
var TableFooter = props => {
|
|
50
|
-
return /* @__PURE__ */
|
|
48
|
+
}, "TableCaption");
|
|
49
|
+
var TableFooter = /* @__PURE__ */__name(props => {
|
|
50
|
+
return /* @__PURE__ */React.createElement(Box, {
|
|
51
51
|
as: "tfoot",
|
|
52
52
|
...props
|
|
53
53
|
});
|
|
54
|
-
};
|
|
54
|
+
}, "TableFooter");
|
|
55
55
|
Table.Head = TableHead;
|
|
56
56
|
Table.Body = TableBody;
|
|
57
57
|
Table.Row = TableRow;
|
package/dist/esm/Tabs/index.js
CHANGED
|
@@ -1,23 +1,23 @@
|
|
|
1
1
|
/** Powered by @ttoss/config. https://ttoss.dev/docs/modules/packages/config/ */
|
|
2
|
+
import { __name } from "../chunk-V4MHYKRI.js";
|
|
2
3
|
|
|
3
4
|
// src/components/Tabs/Tabs.tsx
|
|
4
5
|
import { Box } from "@ttoss/ui";
|
|
5
6
|
import { Tab, TabList, TabPanel, Tabs as ReactTabs } from "react-tabs";
|
|
6
|
-
|
|
7
|
-
var Tabs = props => {
|
|
7
|
+
var Tabs = /* @__PURE__ */__name(props => {
|
|
8
8
|
const {
|
|
9
9
|
sx: customSx,
|
|
10
10
|
...restProps
|
|
11
11
|
} = props;
|
|
12
|
-
return /* @__PURE__ */
|
|
13
|
-
sx: ({
|
|
12
|
+
return /* @__PURE__ */React.createElement(Box, {
|
|
13
|
+
sx: /* @__PURE__ */__name(({
|
|
14
14
|
colors
|
|
15
15
|
}) => {
|
|
16
16
|
const themeColors = colors;
|
|
17
17
|
return {
|
|
18
18
|
/**
|
|
19
|
-
|
|
20
|
-
|
|
19
|
+
* Tabs
|
|
20
|
+
*/
|
|
21
21
|
".react-tabs": {
|
|
22
22
|
WebkitTapHighlightColor: "transparent"
|
|
23
23
|
},
|
|
@@ -61,14 +61,10 @@ var Tabs = props => {
|
|
|
61
61
|
},
|
|
62
62
|
...customSx
|
|
63
63
|
};
|
|
64
|
-
},
|
|
65
|
-
...restProps
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
children: props.children
|
|
69
|
-
})
|
|
70
|
-
});
|
|
71
|
-
};
|
|
64
|
+
}, "sx"),
|
|
65
|
+
...restProps
|
|
66
|
+
}, /* @__PURE__ */React.createElement(ReactTabs, props, props.children));
|
|
67
|
+
}, "Tabs");
|
|
72
68
|
Tabs.TabList = TabList;
|
|
73
69
|
Tabs.Tab = Tab;
|
|
74
70
|
Tabs.TabPanel = TabPanel;
|
package/dist/esm/Toast/index.js
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
/** Powered by @ttoss/config. https://ttoss.dev/docs/modules/packages/config/ */
|
|
2
|
+
import { __name } from "../chunk-V4MHYKRI.js";
|
|
2
3
|
|
|
3
4
|
// src/components/Toast/Toast.tsx
|
|
4
5
|
import { css as createClassName } from "@emotion/css";
|
|
@@ -6,8 +7,7 @@ import { css as transformStyleObject } from "@theme-ui/css";
|
|
|
6
7
|
import { Box, useTheme } from "@ttoss/ui";
|
|
7
8
|
import * as React from "react";
|
|
8
9
|
import { toast as toastReactToastify, ToastContainer as ReactToastifyToastContainer } from "react-toastify";
|
|
9
|
-
|
|
10
|
-
var ToastContainer = props => {
|
|
10
|
+
var ToastContainer = /* @__PURE__ */__name(props => {
|
|
11
11
|
const {
|
|
12
12
|
theme
|
|
13
13
|
} = useTheme();
|
|
@@ -17,9 +17,9 @@ var ToastContainer = props => {
|
|
|
17
17
|
})(theme);
|
|
18
18
|
return createClassName(styles);
|
|
19
19
|
}, [theme]);
|
|
20
|
-
return /* @__PURE__ */
|
|
20
|
+
return /* @__PURE__ */React.createElement(Box, {
|
|
21
21
|
className,
|
|
22
|
-
sx: ({
|
|
22
|
+
sx: /* @__PURE__ */__name(({
|
|
23
23
|
colors,
|
|
24
24
|
fonts
|
|
25
25
|
}) => {
|
|
@@ -28,12 +28,11 @@ var ToastContainer = props => {
|
|
|
28
28
|
"--toastify-font-family": fonts?.body,
|
|
29
29
|
"--toastify-color-light": themeColors?.feedback?.background?.primary?.default
|
|
30
30
|
};
|
|
31
|
-
},
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
};
|
|
31
|
+
}, "sx")
|
|
32
|
+
}, /* @__PURE__ */React.createElement(ReactToastifyToastContainer, {
|
|
33
|
+
className,
|
|
34
|
+
...props
|
|
35
|
+
}));
|
|
36
|
+
}, "ToastContainer");
|
|
38
37
|
var toast = toastReactToastify;
|
|
39
38
|
export { ToastContainer, toast };
|