@ttoss/components 2.10.1 → 2.10.2
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/package.json +12 -12
- package/dist/Accordion/index.d.ts +0 -16
- package/dist/DatePicker/index.d.ts +0 -19
- package/dist/Drawer/index.d.ts +0 -12
- package/dist/FileUploader/index.d.ts +0 -55
- package/dist/InstallPwa/index.d.ts +0 -10
- package/dist/JsonEditor/index.d.ts +0 -2
- package/dist/JsonView/index.d.ts +0 -1
- package/dist/List/index.d.ts +0 -13
- package/dist/Markdown/index.d.ts +0 -11
- package/dist/Menu/index.d.ts +0 -11
- package/dist/Modal/index.d.ts +0 -10
- package/dist/NavList/index.d.ts +0 -55
- package/dist/NotificationCard/index.d.ts +0 -21
- package/dist/NotificationsMenu/index.d.ts +0 -21
- package/dist/Search/index.d.ts +0 -11
- package/dist/SpotlightCard/index.d.ts +0 -27
- package/dist/Table/index.d.ts +0 -16
- package/dist/Tabs/index.d.ts +0 -18
- package/dist/Toast/index.d.ts +0 -8
- package/dist/esm/Accordion/index.js +0 -49
- package/dist/esm/DatePicker/index.js +0 -2476
- package/dist/esm/Drawer/index.js +0 -59
- package/dist/esm/FileUploader/index.js +0 -401
- package/dist/esm/InstallPwa/index.js +0 -61
- package/dist/esm/JsonEditor/index.js +0 -6
- package/dist/esm/JsonView/index.js +0 -6
- package/dist/esm/List/index.js +0 -30
- package/dist/esm/Markdown/index.js +0 -23
- package/dist/esm/Menu/index.js +0 -131
- package/dist/esm/Modal/index.js +0 -65
- package/dist/esm/NavList/index.js +0 -246
- package/dist/esm/NotificationCard/index.js +0 -5
- package/dist/esm/NotificationsMenu/index.js +0 -205
- package/dist/esm/Search/index.js +0 -29
- package/dist/esm/SpotlightCard/index.js +0 -212
- package/dist/esm/Table/index.js +0 -63
- package/dist/esm/Tabs/index.js +0 -75
- package/dist/esm/Toast/index.js +0 -38
- package/dist/esm/chunk-2R7AUPJL.js +0 -2176
- package/dist/esm/chunk-4GBVRL7E.js +0 -156
- package/dist/esm/chunk-V4MHYKRI.js +0 -7
|
@@ -1,212 +0,0 @@
|
|
|
1
|
-
/** Powered by @ttoss/config. https://ttoss.dev/docs/modules/packages/config/ */
|
|
2
|
-
import { Icon } from "../chunk-2R7AUPJL.js";
|
|
3
|
-
import { __name } from "../chunk-V4MHYKRI.js";
|
|
4
|
-
|
|
5
|
-
// src/components/SpotlightCard/SpotlightCard.tsx
|
|
6
|
-
import { Box, Button, Card, Flex, keyframes, Text } from "@ttoss/ui";
|
|
7
|
-
import * as React from "react";
|
|
8
|
-
var SpotlightCard = /* @__PURE__ */__name(({
|
|
9
|
-
icon,
|
|
10
|
-
title,
|
|
11
|
-
badge,
|
|
12
|
-
description,
|
|
13
|
-
firstButton,
|
|
14
|
-
secondButton,
|
|
15
|
-
variant = "accent"
|
|
16
|
-
}) => {
|
|
17
|
-
const gradientFlow = keyframes({
|
|
18
|
-
"0%": {
|
|
19
|
-
backgroundPosition: "0% 50%"
|
|
20
|
-
},
|
|
21
|
-
"50%": {
|
|
22
|
-
backgroundPosition: "100% 50%"
|
|
23
|
-
},
|
|
24
|
-
"100%": {
|
|
25
|
-
backgroundPosition: "0% 50%"
|
|
26
|
-
}
|
|
27
|
-
});
|
|
28
|
-
const hasButtons = !!firstButton || !!secondButton;
|
|
29
|
-
const isAccent = variant === "accent";
|
|
30
|
-
const textColorToken = isAccent ? "action.text.accent.default" : "action.text.primary.default";
|
|
31
|
-
const iconColorToken = isAccent ? "action.text.accent.default" : "display.text.accent.default";
|
|
32
|
-
const iconBgToken = isAccent ? "rgba(255,255,255,0.3)" : "action.background.secondary.default";
|
|
33
|
-
const badgeBgToken = isAccent ? "action.background.primary.default" : "action.background.accent.default";
|
|
34
|
-
const badgeTextToken = isAccent ? "action.text.primary.default" : "action.text.accent.default";
|
|
35
|
-
const btnPrimaryVariant = isAccent ? "primary" : "accent";
|
|
36
|
-
const btnPrimaryColorToken = isAccent ? "action.text.primary.default" : "action.text.accent.default";
|
|
37
|
-
const btnSecondaryColorToken = textColorToken;
|
|
38
|
-
const btnSecondaryBorderColorToken = isAccent ? "currentColor" : "display.border.muted.default";
|
|
39
|
-
const renderButton = /* @__PURE__ */__name((prop, config) => {
|
|
40
|
-
if (!prop) return null;
|
|
41
|
-
if (/* @__PURE__ */React.isValidElement(prop)) return prop;
|
|
42
|
-
if (typeof prop !== "object") return prop;
|
|
43
|
-
const {
|
|
44
|
-
sx,
|
|
45
|
-
...rest
|
|
46
|
-
} = prop;
|
|
47
|
-
const {
|
|
48
|
-
variant: defaultVariant,
|
|
49
|
-
textColor,
|
|
50
|
-
styles = {}
|
|
51
|
-
} = config;
|
|
52
|
-
return /* @__PURE__ */React.createElement(Button, {
|
|
53
|
-
variant: defaultVariant,
|
|
54
|
-
sx: {
|
|
55
|
-
display: "flex",
|
|
56
|
-
alignItems: "center",
|
|
57
|
-
justifyContent: "center",
|
|
58
|
-
gap: "2",
|
|
59
|
-
px: "6",
|
|
60
|
-
py: "3",
|
|
61
|
-
fontSize: "15px",
|
|
62
|
-
fontWeight: "bold",
|
|
63
|
-
whiteSpace: "nowrap",
|
|
64
|
-
transition: "all 0.2s",
|
|
65
|
-
color: textColor,
|
|
66
|
-
...styles,
|
|
67
|
-
...sx
|
|
68
|
-
},
|
|
69
|
-
...rest
|
|
70
|
-
});
|
|
71
|
-
}, "renderButton");
|
|
72
|
-
return /* @__PURE__ */React.createElement(Card, {
|
|
73
|
-
sx: {
|
|
74
|
-
display: "flex",
|
|
75
|
-
flexDirection: "row",
|
|
76
|
-
flexWrap: "nowrap",
|
|
77
|
-
alignItems: "center",
|
|
78
|
-
justifyContent: "space-between",
|
|
79
|
-
background: /* @__PURE__ */__name(t => {
|
|
80
|
-
const theme = t;
|
|
81
|
-
const bgStart = isAccent ? theme.colors?.action?.background?.accent?.default : theme.colors?.action?.background?.primary?.default;
|
|
82
|
-
const bgMiddle = isAccent ? theme.colors?.action?.background?.accent?.active : theme.colors?.action?.background?.secondary?.default;
|
|
83
|
-
if (isAccent) {
|
|
84
|
-
return `linear-gradient(270deg, transparent 0%, rgba(255,255,255,0.4) 50%, transparent 100%),
|
|
85
|
-
linear-gradient(0deg, ${bgStart}, ${bgStart})`;
|
|
86
|
-
}
|
|
87
|
-
return `linear-gradient(270deg, ${bgStart}, ${bgMiddle}, ${bgStart})`;
|
|
88
|
-
}, "background"),
|
|
89
|
-
backgroundSize: isAccent ? "200% 100%, auto" : "400% 400%",
|
|
90
|
-
animation: `${gradientFlow} 6s ease infinite`,
|
|
91
|
-
width: "100%",
|
|
92
|
-
minHeight: "104px",
|
|
93
|
-
borderRadius: "xl",
|
|
94
|
-
boxShadow: "0 4px 20px rgba(0,0,0,0.1)",
|
|
95
|
-
py: "7",
|
|
96
|
-
px: "8",
|
|
97
|
-
gap: "5",
|
|
98
|
-
color: textColorToken,
|
|
99
|
-
overflow: "hidden",
|
|
100
|
-
borderWidth: "1px",
|
|
101
|
-
borderStyle: "solid",
|
|
102
|
-
borderColor: isAccent ? "transparent" : "display.border.muted.default"
|
|
103
|
-
},
|
|
104
|
-
"data-testid": "spotlight-card"
|
|
105
|
-
}, /* @__PURE__ */React.createElement(Flex, {
|
|
106
|
-
sx: {
|
|
107
|
-
alignItems: "center",
|
|
108
|
-
gap: "5",
|
|
109
|
-
flex: 1,
|
|
110
|
-
minWidth: 0
|
|
111
|
-
}
|
|
112
|
-
}, /* @__PURE__ */React.createElement(Box, {
|
|
113
|
-
sx: {
|
|
114
|
-
width: 64,
|
|
115
|
-
height: 64,
|
|
116
|
-
borderRadius: "2xl",
|
|
117
|
-
backgroundColor: iconBgToken,
|
|
118
|
-
display: "flex",
|
|
119
|
-
alignItems: "center",
|
|
120
|
-
justifyContent: "center",
|
|
121
|
-
flexShrink: 0,
|
|
122
|
-
color: iconColorToken
|
|
123
|
-
}
|
|
124
|
-
}, /* @__PURE__ */React.createElement(Icon, {
|
|
125
|
-
icon,
|
|
126
|
-
width: 32
|
|
127
|
-
})), /* @__PURE__ */React.createElement(Box, {
|
|
128
|
-
sx: {
|
|
129
|
-
minWidth: 0
|
|
130
|
-
}
|
|
131
|
-
}, /* @__PURE__ */React.createElement(Text, {
|
|
132
|
-
as: "div",
|
|
133
|
-
sx: {
|
|
134
|
-
fontFamily: "mono",
|
|
135
|
-
// Tamanho da fonte aumentado para dar mais presença ao OneClick
|
|
136
|
-
fontSize: "32px",
|
|
137
|
-
lineHeight: 1.1,
|
|
138
|
-
color: "inherit",
|
|
139
|
-
whiteSpace: "nowrap",
|
|
140
|
-
display: "flex",
|
|
141
|
-
alignItems: "center",
|
|
142
|
-
gap: "3"
|
|
143
|
-
}
|
|
144
|
-
}, title, badge && /* @__PURE__ */React.createElement(Box, {
|
|
145
|
-
as: "span",
|
|
146
|
-
sx: {
|
|
147
|
-
backgroundColor: badgeBgToken,
|
|
148
|
-
color: badgeTextToken,
|
|
149
|
-
fontFamily: "mono",
|
|
150
|
-
fontWeight: "bold",
|
|
151
|
-
fontSize: "11px",
|
|
152
|
-
lineHeight: 1,
|
|
153
|
-
paddingX: "6px",
|
|
154
|
-
paddingY: "3px",
|
|
155
|
-
borderRadius: "md",
|
|
156
|
-
textTransform: "uppercase",
|
|
157
|
-
letterSpacing: "0.05em",
|
|
158
|
-
display: "inline-flex",
|
|
159
|
-
alignItems: "center",
|
|
160
|
-
boxShadow: "0 2px 4px rgba(0,0,0,0.1)",
|
|
161
|
-
transform: "translateY(3px)"
|
|
162
|
-
}
|
|
163
|
-
}, badge)), /* @__PURE__ */React.createElement(Text, {
|
|
164
|
-
as: "div",
|
|
165
|
-
sx: {
|
|
166
|
-
fontFamily: "body",
|
|
167
|
-
fontWeight: 400,
|
|
168
|
-
fontSize: "16px",
|
|
169
|
-
color: "inherit",
|
|
170
|
-
opacity: 0.9,
|
|
171
|
-
mt: "1",
|
|
172
|
-
overflow: "hidden",
|
|
173
|
-
textOverflow: "ellipsis",
|
|
174
|
-
display: "-webkit-box",
|
|
175
|
-
WebkitLineClamp: 2,
|
|
176
|
-
WebkitBoxOrient: "vertical"
|
|
177
|
-
}
|
|
178
|
-
}, description))), hasButtons && /* @__PURE__ */React.createElement(Flex, {
|
|
179
|
-
sx: {
|
|
180
|
-
gap: "4",
|
|
181
|
-
alignItems: "center",
|
|
182
|
-
flexShrink: 0,
|
|
183
|
-
ml: "auto"
|
|
184
|
-
}
|
|
185
|
-
}, renderButton(firstButton, {
|
|
186
|
-
variant: btnPrimaryVariant,
|
|
187
|
-
textColor: btnPrimaryColorToken,
|
|
188
|
-
styles: {
|
|
189
|
-
":hover": {
|
|
190
|
-
transform: "translateY(-1px)"
|
|
191
|
-
}
|
|
192
|
-
}
|
|
193
|
-
}), renderButton(secondButton, {
|
|
194
|
-
variant: "secondary",
|
|
195
|
-
textColor: btnSecondaryColorToken,
|
|
196
|
-
styles: {
|
|
197
|
-
backgroundColor: "transparent",
|
|
198
|
-
borderWidth: "1px",
|
|
199
|
-
borderStyle: "solid",
|
|
200
|
-
borderColor: btnSecondaryBorderColorToken,
|
|
201
|
-
opacity: isAccent ? 0.6 : 1,
|
|
202
|
-
cursor: "pointer",
|
|
203
|
-
":hover": {
|
|
204
|
-
backgroundColor: "rgba(255,255,255,0.2)",
|
|
205
|
-
opacity: 1,
|
|
206
|
-
borderColor: btnSecondaryBorderColorToken
|
|
207
|
-
}
|
|
208
|
-
}
|
|
209
|
-
})));
|
|
210
|
-
}, "SpotlightCard");
|
|
211
|
-
SpotlightCard.displayName = "SpotlightCard";
|
|
212
|
-
export { SpotlightCard };
|
package/dist/esm/Table/index.js
DELETED
|
@@ -1,63 +0,0 @@
|
|
|
1
|
-
/** Powered by @ttoss/config. https://ttoss.dev/docs/modules/packages/config/ */
|
|
2
|
-
import * as React from 'react';
|
|
3
|
-
import { __name } from "../chunk-V4MHYKRI.js";
|
|
4
|
-
|
|
5
|
-
// src/components/Table/Table.tsx
|
|
6
|
-
import { Box } from "@ttoss/ui";
|
|
7
|
-
import { createCell, createColumnHelper, flexRender, getCoreRowModel, useReactTable } from "@tanstack/react-table";
|
|
8
|
-
var Table = /* @__PURE__ */__name(props => {
|
|
9
|
-
return /* @__PURE__ */React.createElement(Box, {
|
|
10
|
-
as: "table",
|
|
11
|
-
...props
|
|
12
|
-
});
|
|
13
|
-
}, "Table");
|
|
14
|
-
var TableHead = /* @__PURE__ */__name(props => {
|
|
15
|
-
return /* @__PURE__ */React.createElement(Box, {
|
|
16
|
-
as: "thead",
|
|
17
|
-
...props
|
|
18
|
-
});
|
|
19
|
-
}, "TableHead");
|
|
20
|
-
var TableBody = /* @__PURE__ */__name(props => {
|
|
21
|
-
return /* @__PURE__ */React.createElement(Box, {
|
|
22
|
-
as: "tbody",
|
|
23
|
-
...props
|
|
24
|
-
});
|
|
25
|
-
}, "TableBody");
|
|
26
|
-
var TableRow = /* @__PURE__ */__name(props => {
|
|
27
|
-
return /* @__PURE__ */React.createElement(Box, {
|
|
28
|
-
as: "tr",
|
|
29
|
-
...props
|
|
30
|
-
});
|
|
31
|
-
}, "TableRow");
|
|
32
|
-
var TableCell = /* @__PURE__ */__name(props => {
|
|
33
|
-
return /* @__PURE__ */React.createElement(Box, {
|
|
34
|
-
as: "td",
|
|
35
|
-
...props
|
|
36
|
-
});
|
|
37
|
-
}, "TableCell");
|
|
38
|
-
var TableHeader = /* @__PURE__ */__name(props => {
|
|
39
|
-
return /* @__PURE__ */React.createElement(Box, {
|
|
40
|
-
as: "th",
|
|
41
|
-
...props
|
|
42
|
-
});
|
|
43
|
-
}, "TableHeader");
|
|
44
|
-
var TableCaption = /* @__PURE__ */__name(props => {
|
|
45
|
-
return /* @__PURE__ */React.createElement(Box, {
|
|
46
|
-
as: "caption",
|
|
47
|
-
...props
|
|
48
|
-
});
|
|
49
|
-
}, "TableCaption");
|
|
50
|
-
var TableFooter = /* @__PURE__ */__name(props => {
|
|
51
|
-
return /* @__PURE__ */React.createElement(Box, {
|
|
52
|
-
as: "tfoot",
|
|
53
|
-
...props
|
|
54
|
-
});
|
|
55
|
-
}, "TableFooter");
|
|
56
|
-
Table.Head = TableHead;
|
|
57
|
-
Table.Body = TableBody;
|
|
58
|
-
Table.Row = TableRow;
|
|
59
|
-
Table.Cell = TableCell;
|
|
60
|
-
Table.Header = TableHeader;
|
|
61
|
-
Table.Caption = TableCaption;
|
|
62
|
-
Table.Footer = TableFooter;
|
|
63
|
-
export { Table, createCell, createColumnHelper, flexRender, getCoreRowModel, useReactTable };
|
package/dist/esm/Tabs/index.js
DELETED
|
@@ -1,75 +0,0 @@
|
|
|
1
|
-
/** Powered by @ttoss/config. https://ttoss.dev/docs/modules/packages/config/ */
|
|
2
|
-
import * as React from 'react';
|
|
3
|
-
import { __name } from "../chunk-V4MHYKRI.js";
|
|
4
|
-
|
|
5
|
-
// src/components/Tabs/Tabs.tsx
|
|
6
|
-
import { Box } from "@ttoss/ui";
|
|
7
|
-
import { Tab, TabList, TabPanel, Tabs as ReactTabs } from "react-tabs";
|
|
8
|
-
var Tabs = /* @__PURE__ */__name(props => {
|
|
9
|
-
const {
|
|
10
|
-
sx: customSx,
|
|
11
|
-
...restProps
|
|
12
|
-
} = props;
|
|
13
|
-
return /* @__PURE__ */React.createElement(Box, {
|
|
14
|
-
sx: /* @__PURE__ */__name(({
|
|
15
|
-
colors
|
|
16
|
-
}) => {
|
|
17
|
-
const themeColors = colors;
|
|
18
|
-
return {
|
|
19
|
-
/**
|
|
20
|
-
* Tabs
|
|
21
|
-
*/
|
|
22
|
-
".react-tabs": {
|
|
23
|
-
WebkitTapHighlightColor: "transparent"
|
|
24
|
-
},
|
|
25
|
-
".react-tabs__tab-list": {
|
|
26
|
-
borderBottom: "md",
|
|
27
|
-
borderColor: themeColors?.input?.border?.muted?.default,
|
|
28
|
-
paddingLeft: 0
|
|
29
|
-
},
|
|
30
|
-
".react-tabs__tab--selected": {
|
|
31
|
-
backgroundColor: "transparent",
|
|
32
|
-
border: "none",
|
|
33
|
-
borderBottom: "lg",
|
|
34
|
-
borderColor: themeColors?.input?.border?.accent?.default
|
|
35
|
-
},
|
|
36
|
-
".react-tabs__tab": {
|
|
37
|
-
color: themeColors?.input?.text?.secondary?.default,
|
|
38
|
-
display: "inline-flex",
|
|
39
|
-
alignItems: "center",
|
|
40
|
-
gap: "2",
|
|
41
|
-
padding: "3",
|
|
42
|
-
cursor: "pointer",
|
|
43
|
-
position: "relative",
|
|
44
|
-
listStyle: "none"
|
|
45
|
-
},
|
|
46
|
-
".react-tabs__tab--disabled": {
|
|
47
|
-
cursor: "not-allowed",
|
|
48
|
-
color: themeColors?.input?.text?.muted?.default
|
|
49
|
-
},
|
|
50
|
-
".react-tabs__tab:focus": {
|
|
51
|
-
outline: "none"
|
|
52
|
-
},
|
|
53
|
-
".react-tabs__tab:focus:after": {
|
|
54
|
-
position: "absolute",
|
|
55
|
-
height: "min",
|
|
56
|
-
left: "-2",
|
|
57
|
-
right: "-2",
|
|
58
|
-
bottom: "-3"
|
|
59
|
-
},
|
|
60
|
-
".react-tabs__tab-panel": {
|
|
61
|
-
display: "none"
|
|
62
|
-
},
|
|
63
|
-
".react-tabs__tab-panel--selected": {
|
|
64
|
-
display: "block"
|
|
65
|
-
},
|
|
66
|
-
...customSx
|
|
67
|
-
};
|
|
68
|
-
}, "sx"),
|
|
69
|
-
...restProps
|
|
70
|
-
}, /* @__PURE__ */React.createElement(ReactTabs, restProps, props.children));
|
|
71
|
-
}, "Tabs");
|
|
72
|
-
Tabs.TabList = TabList;
|
|
73
|
-
Tabs.Tab = Tab;
|
|
74
|
-
Tabs.TabPanel = TabPanel;
|
|
75
|
-
export { Tabs };
|
package/dist/esm/Toast/index.js
DELETED
|
@@ -1,38 +0,0 @@
|
|
|
1
|
-
/** Powered by @ttoss/config. https://ttoss.dev/docs/modules/packages/config/ */
|
|
2
|
-
import { __name } from "../chunk-V4MHYKRI.js";
|
|
3
|
-
|
|
4
|
-
// src/components/Toast/Toast.tsx
|
|
5
|
-
import { css as createClassName } from "@emotion/css";
|
|
6
|
-
import { css as transformStyleObject } from "@theme-ui/css";
|
|
7
|
-
import { Box, useTheme } from "@ttoss/ui";
|
|
8
|
-
import * as React from "react";
|
|
9
|
-
import { toast as toastReactToastify, ToastContainer as ReactToastifyToastContainer } from "react-toastify";
|
|
10
|
-
var ToastContainer = /* @__PURE__ */__name(props => {
|
|
11
|
-
const {
|
|
12
|
-
theme
|
|
13
|
-
} = useTheme();
|
|
14
|
-
const className = React.useMemo(() => {
|
|
15
|
-
const styles = transformStyleObject({
|
|
16
|
-
".Toastify__toast-container": {}
|
|
17
|
-
})(theme);
|
|
18
|
-
return createClassName(styles);
|
|
19
|
-
}, [theme]);
|
|
20
|
-
return /* @__PURE__ */React.createElement(Box, {
|
|
21
|
-
className,
|
|
22
|
-
sx: /* @__PURE__ */__name(({
|
|
23
|
-
colors,
|
|
24
|
-
fonts
|
|
25
|
-
}) => {
|
|
26
|
-
const themeColors = colors;
|
|
27
|
-
return {
|
|
28
|
-
"--toastify-font-family": fonts?.body,
|
|
29
|
-
"--toastify-color-light": themeColors?.feedback?.background?.primary?.default
|
|
30
|
-
};
|
|
31
|
-
}, "sx")
|
|
32
|
-
}, /* @__PURE__ */React.createElement(ReactToastifyToastContainer, {
|
|
33
|
-
className,
|
|
34
|
-
...props
|
|
35
|
-
}));
|
|
36
|
-
}, "ToastContainer");
|
|
37
|
-
var toast = toastReactToastify;
|
|
38
|
-
export { ToastContainer, toast };
|