@ttoss/components 2.0.2 → 2.0.4
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/Accordion/index.d.ts +16 -0
- package/dist/Drawer/index.d.ts +12 -0
- package/dist/InstallPwa/index.d.ts +10 -0
- package/dist/Markdown/index.d.ts +11 -0
- package/dist/Menu/index.d.ts +32 -0
- package/dist/Modal/index.d.ts +10 -0
- package/dist/Search/index.d.ts +11 -0
- package/dist/Toast/index.d.ts +7 -0
- package/dist/esm/Accordion/index.js +53 -0
- package/dist/esm/Drawer/index.js +53 -0
- package/dist/esm/InstallPwa/index.js +66 -0
- package/dist/esm/{components/List → List}/index.js +2 -3
- package/dist/esm/Markdown/index.js +24 -0
- package/dist/esm/{index.js → Menu/index.js} +65 -325
- package/dist/esm/Modal/index.js +65 -0
- package/dist/esm/Search/index.js +30 -0
- package/dist/esm/{components/Table.js → Table/index.js} +31 -3
- package/dist/esm/Toast/index.js +35 -0
- package/dist/esm/chunk-XEYGFSK5.js +29 -0
- package/package.json +49 -18
- package/src/components/{Accordion.tsx → Accordion/Accordion.tsx} +6 -4
- package/src/components/Accordion/index.ts +1 -0
- package/src/components/Drawer/index.ts +1 -0
- package/src/components/{InstallPwa.tsx → InstallPwa/InstallPwa.tsx} +1 -0
- package/src/components/InstallPwa/index.ts +1 -0
- package/src/components/Markdown/index.ts +1 -0
- package/src/components/{Menu.tsx → Menu/Menu.tsx} +1 -1
- package/src/components/Menu/index.ts +1 -0
- package/src/components/{Modal.tsx → Modal/Modal.tsx} +2 -0
- package/src/components/Modal/index.ts +1 -0
- package/src/components/Search/index.ts +1 -0
- package/src/components/Table/index.ts +1 -0
- package/src/components/Toast/index.ts +1 -0
- package/dist/esm/chunk-LZE3LOYR.js +0 -10
- package/dist/index.d.ts +0 -360
- package/src/index.ts +0 -8
- /package/dist/{components/List → List}/index.d.ts +0 -0
- /package/dist/{components/Table.d.ts → Table/index.d.ts} +0 -0
- /package/src/components/{Drawer.tsx → Drawer/Drawer.tsx} +0 -0
- /package/src/components/{Markdown.tsx → Markdown/Markdown.tsx} +0 -0
- /package/src/components/{Search.tsx → Search/Search.tsx} +0 -0
- /package/src/components/{Table.tsx → Table/Table.tsx} +0 -0
- /package/src/components/{Toast.tsx → Toast/Toast.tsx} +0 -0
|
@@ -1,274 +1,65 @@
|
|
|
1
1
|
/** Powered by @ttoss/config. https://ttoss.dev/docs/modules/packages/config/ */
|
|
2
|
-
import { __publicField } from "
|
|
2
|
+
import { __publicField } from "../chunk-XEYGFSK5.js";
|
|
3
3
|
|
|
4
|
-
// src/components/
|
|
5
|
-
import
|
|
6
|
-
|
|
7
|
-
|
|
4
|
+
// src/components/Menu/Menu.tsx
|
|
5
|
+
import { Box as Box2, Flex, Image, Text, useResponsiveValue } from "@ttoss/ui";
|
|
6
|
+
|
|
7
|
+
// src/components/Drawer/Drawer.tsx
|
|
8
|
+
import { Box } from "@ttoss/ui";
|
|
8
9
|
import { css as createClassName } from "@emotion/css";
|
|
9
|
-
import
|
|
10
|
+
import DrawerUi from "react-modern-drawer";
|
|
10
11
|
import { jsx } from "react/jsx-runtime";
|
|
11
|
-
var
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
return /* @__PURE__ */jsx(Box, {
|
|
40
|
-
variant: "accordion",
|
|
41
|
-
className,
|
|
42
|
-
...boxProps,
|
|
43
|
-
children: /* @__PURE__ */jsx(ReactAccessibleAccordion, {
|
|
44
|
-
...{
|
|
45
|
-
allowMultipleExpanded,
|
|
46
|
-
allowZeroExpanded,
|
|
47
|
-
preExpanded,
|
|
48
|
-
onChange
|
|
49
|
-
},
|
|
50
|
-
children
|
|
51
|
-
})
|
|
52
|
-
});
|
|
53
|
-
};
|
|
54
|
-
Accordion.Item = AccordionItem;
|
|
55
|
-
Accordion.ItemButton = AccordionItemButton;
|
|
56
|
-
Accordion.ItemHeading = AccordionItemHeading;
|
|
57
|
-
Accordion.ItemPanel = AccordionItemPanel;
|
|
58
|
-
|
|
59
|
-
// src/components/InstallPwa.tsx
|
|
60
|
-
import * as React2 from "react";
|
|
61
|
-
import { Button, Flex, Text } from "@ttoss/ui";
|
|
62
|
-
import { jsx as jsx2, jsxs } from "react/jsx-runtime";
|
|
63
|
-
var InstallPwaUi = ({
|
|
64
|
-
onInstall
|
|
65
|
-
}) => {
|
|
66
|
-
return /* @__PURE__ */jsx2(Flex, {
|
|
67
|
-
sx: {
|
|
68
|
-
position: "absolute",
|
|
69
|
-
bottom: 4,
|
|
70
|
-
width: "100%",
|
|
71
|
-
justifyContent: "center"
|
|
72
|
-
},
|
|
73
|
-
children: /* @__PURE__ */jsxs(Flex, {
|
|
74
|
-
sx: {
|
|
75
|
-
backgroundColor: "background",
|
|
76
|
-
justifyContent: "center",
|
|
77
|
-
alignItems: "center",
|
|
78
|
-
gap: 3,
|
|
79
|
-
width: "auto",
|
|
80
|
-
border: "1px solid",
|
|
81
|
-
borderColor: "muted",
|
|
82
|
-
borderRadius: 1,
|
|
83
|
-
padding: 4
|
|
84
|
-
},
|
|
85
|
-
children: [/* @__PURE__ */jsx2(Text, {
|
|
86
|
-
children: "Deseja instalar o nosso aplicativo?"
|
|
87
|
-
}), /* @__PURE__ */jsx2(Button, {
|
|
88
|
-
onClick: onInstall,
|
|
89
|
-
children: "Instalar"
|
|
90
|
-
})]
|
|
91
|
-
})
|
|
92
|
-
});
|
|
93
|
-
};
|
|
94
|
-
var InstallPwa = () => {
|
|
95
|
-
const [supportsPwa, setSupportsPwa] = React2.useState(false);
|
|
96
|
-
const [promptInstall, setPromptInstall] = React2.useState(null);
|
|
97
|
-
React2.useEffect(() => {
|
|
98
|
-
const handler = e => {
|
|
99
|
-
e.preventDefault();
|
|
100
|
-
setSupportsPwa(true);
|
|
101
|
-
setPromptInstall(e);
|
|
102
|
-
};
|
|
103
|
-
window.addEventListener("beforeinstallprompt", handler);
|
|
104
|
-
return () => {
|
|
105
|
-
return window.removeEventListener("transitionend", handler);
|
|
106
|
-
};
|
|
107
|
-
}, []);
|
|
108
|
-
const onInstall = e => {
|
|
109
|
-
e.preventDefault();
|
|
110
|
-
if (!promptInstall) {
|
|
111
|
-
return;
|
|
112
|
-
}
|
|
113
|
-
promptInstall.prompt();
|
|
114
|
-
};
|
|
115
|
-
if (!supportsPwa) {
|
|
116
|
-
return null;
|
|
117
|
-
}
|
|
118
|
-
return /* @__PURE__ */jsx2(InstallPwaUi, {
|
|
119
|
-
onInstall
|
|
120
|
-
});
|
|
121
|
-
};
|
|
122
|
-
|
|
123
|
-
// src/components/Modal.tsx
|
|
124
|
-
import { css as transformStyleObject2 } from "@theme-ui/css";
|
|
125
|
-
import { useResponsiveValue, useTheme as useTheme2 } from "@ttoss/ui";
|
|
126
|
-
import ReactModal from "react-modal";
|
|
127
|
-
import { jsx as jsx3 } from "react/jsx-runtime";
|
|
128
|
-
ReactModal.defaultStyles = {
|
|
129
|
-
overlay: {},
|
|
130
|
-
content: {}
|
|
131
|
-
};
|
|
132
|
-
var Modal = props => {
|
|
133
|
-
const {
|
|
134
|
-
theme
|
|
135
|
-
} = useTheme2();
|
|
136
|
-
const space = theme.space;
|
|
137
|
-
const padding = useResponsiveValue([space?.["lg"], space?.["xl"], space?.["xl"]]) || 0;
|
|
138
|
-
const style = {
|
|
139
|
-
overlay: transformStyleObject2({
|
|
140
|
-
position: "fixed",
|
|
141
|
-
top: 0,
|
|
142
|
-
left: 0,
|
|
143
|
-
right: 0,
|
|
144
|
-
bottom: 0,
|
|
145
|
-
backgroundColor: "rgba(0, 0, 0, 0.5)",
|
|
146
|
-
display: "flex",
|
|
147
|
-
justifyContent: "center",
|
|
148
|
-
alignItems: "center",
|
|
149
|
-
zIndex: "modal",
|
|
150
|
-
...props.style?.overlay
|
|
151
|
-
})(theme),
|
|
152
|
-
content: transformStyleObject2({
|
|
153
|
-
/**
|
|
154
|
-
* Theme
|
|
155
|
-
*/
|
|
156
|
-
backgroundColor: "surface",
|
|
157
|
-
padding,
|
|
158
|
-
border: "default",
|
|
159
|
-
borderColor: "surface",
|
|
160
|
-
borderRadius: "default",
|
|
161
|
-
/**
|
|
162
|
-
* General
|
|
163
|
-
*/
|
|
164
|
-
WebkitOverflowScrolling: "touch",
|
|
165
|
-
overflow: "auto",
|
|
166
|
-
position: "relative",
|
|
167
|
-
top: "0px",
|
|
168
|
-
left: "0px",
|
|
169
|
-
right: "0px",
|
|
170
|
-
bottom: "0px",
|
|
171
|
-
maxHeight: "90%",
|
|
172
|
-
maxWidth: "90%",
|
|
173
|
-
...props.style?.content
|
|
174
|
-
})(theme)
|
|
175
|
-
};
|
|
176
|
-
return /* @__PURE__ */jsx3(ReactModal, {
|
|
177
|
-
...props,
|
|
178
|
-
style
|
|
179
|
-
});
|
|
180
|
-
};
|
|
181
|
-
Modal.setAppElement = ReactModal.setAppElement;
|
|
182
|
-
|
|
183
|
-
// src/components/Toast.tsx
|
|
184
|
-
import * as React3 from "react";
|
|
185
|
-
import { Box as Box2 } from "@ttoss/ui";
|
|
186
|
-
import { ToastContainer as ReactToastifyToastContainer, toast } from "react-toastify";
|
|
187
|
-
import { injectStyle } from "react-toastify/dist/inject-style";
|
|
188
|
-
import { jsx as jsx4 } from "react/jsx-runtime";
|
|
189
|
-
var ToastContainer = props => {
|
|
190
|
-
React3.useEffect(() => {
|
|
191
|
-
injectStyle();
|
|
192
|
-
}, []);
|
|
193
|
-
return /* @__PURE__ */jsx4(Box2, {
|
|
194
|
-
sx: ({
|
|
195
|
-
colors,
|
|
196
|
-
fonts
|
|
197
|
-
}) => {
|
|
198
|
-
return {
|
|
199
|
-
"--toastify-color-light": "#fff",
|
|
200
|
-
"--toastify-color-dark": "#121212",
|
|
201
|
-
"--toastify-color-info": colors?.info || "#3498db",
|
|
202
|
-
"--toastify-color-success": colors?.success || "#07bc0c",
|
|
203
|
-
"--toastify-color-warning": "#f1c40f",
|
|
204
|
-
"--toastify-color-error": "#e74c3c",
|
|
205
|
-
"--toastify-color-progress-light": `linear-gradient(to right, ${colors?.primary}, ${colors?.secondary})`,
|
|
206
|
-
"--toastify-font-family": fonts.body
|
|
207
|
-
};
|
|
208
|
-
},
|
|
209
|
-
children: /* @__PURE__ */jsx4(ReactToastifyToastContainer, {
|
|
210
|
-
...props
|
|
211
|
-
})
|
|
212
|
-
});
|
|
213
|
-
};
|
|
214
|
-
|
|
215
|
-
// src/components/Markdown.tsx
|
|
216
|
-
import { BaseStyles } from "@ttoss/ui";
|
|
217
|
-
import ReactMarkdown from "react-markdown";
|
|
218
|
-
import rehypeRaw from "rehype-raw";
|
|
219
|
-
import remarkGfm from "remark-gfm";
|
|
220
|
-
import { jsx as jsx5 } from "react/jsx-runtime";
|
|
221
|
-
var Markdown = ({
|
|
12
|
+
var reactModernDrawerClassName = createClassName(`
|
|
13
|
+
.EZDrawer .EZDrawer__checkbox {
|
|
14
|
+
display: none;
|
|
15
|
+
}
|
|
16
|
+
.EZDrawer .EZDrawer__checkbox:checked ~ .EZDrawer__overlay {
|
|
17
|
+
display: block;
|
|
18
|
+
opacity: 1;
|
|
19
|
+
}
|
|
20
|
+
.EZDrawer .EZDrawer__checkbox:checked ~ .EZDrawer__container {
|
|
21
|
+
visibility: visible;
|
|
22
|
+
transform: translate3d(0, 0, 0) !important;
|
|
23
|
+
}
|
|
24
|
+
.EZDrawer .EZDrawer__overlay {
|
|
25
|
+
display: none;
|
|
26
|
+
height: 100vh;
|
|
27
|
+
left: 0;
|
|
28
|
+
position: fixed;
|
|
29
|
+
top: 0;
|
|
30
|
+
width: 100%;
|
|
31
|
+
}
|
|
32
|
+
.EZDrawer .EZDrawer__container {
|
|
33
|
+
position: fixed;
|
|
34
|
+
visibility: hidden;
|
|
35
|
+
background: white;
|
|
36
|
+
transition: all;
|
|
37
|
+
box-shadow: 0 0 10px 5px rgba(0, 0, 0, 0.1);
|
|
38
|
+
}`);
|
|
39
|
+
var Drawer = ({
|
|
222
40
|
children,
|
|
223
41
|
sx,
|
|
224
42
|
...props
|
|
225
43
|
}) => {
|
|
226
|
-
return /* @__PURE__ */
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
44
|
+
return /* @__PURE__ */jsx(DrawerUi, {
|
|
45
|
+
...props,
|
|
46
|
+
className: reactModernDrawerClassName,
|
|
47
|
+
children: /* @__PURE__ */jsx(Box, {
|
|
48
|
+
sx: {
|
|
49
|
+
width: "100%",
|
|
50
|
+
height: "100%",
|
|
51
|
+
...sx
|
|
52
|
+
},
|
|
232
53
|
children
|
|
233
54
|
})
|
|
234
55
|
});
|
|
235
56
|
};
|
|
236
57
|
|
|
237
|
-
// src/components/Search.tsx
|
|
238
|
-
import * as React4 from "react";
|
|
239
|
-
import { Input } from "@ttoss/ui";
|
|
240
|
-
import { useDebounce } from "@ttoss/react-hooks";
|
|
241
|
-
import { jsx as jsx6 } from "react/jsx-runtime";
|
|
242
|
-
var Search = ({
|
|
243
|
-
value,
|
|
244
|
-
defaultValue,
|
|
245
|
-
loading,
|
|
246
|
-
onChange,
|
|
247
|
-
...props
|
|
248
|
-
}) => {
|
|
249
|
-
const [text, setText] = React4.useState(value ?? defaultValue);
|
|
250
|
-
const debouncedValue = useDebounce(text, 500);
|
|
251
|
-
React4.useEffect(() => {
|
|
252
|
-
onChange(debouncedValue);
|
|
253
|
-
}, [debouncedValue, onChange]);
|
|
254
|
-
return /* @__PURE__ */jsx6(Input, {
|
|
255
|
-
leadingIcon: loading ? "loading" : "search",
|
|
256
|
-
defaultValue: text,
|
|
257
|
-
onChange: e => {
|
|
258
|
-
return setText(e.target.value);
|
|
259
|
-
},
|
|
260
|
-
...props
|
|
261
|
-
});
|
|
262
|
-
};
|
|
263
|
-
|
|
264
|
-
// src/components/Menu.tsx
|
|
265
|
-
import { Box as Box3, Flex as Flex2, Image, Text as Text2, useResponsiveValue as useResponsiveValue2 } from "@ttoss/ui";
|
|
266
|
-
|
|
267
58
|
// ../react-icons/src/Icon.tsx
|
|
268
|
-
import * as
|
|
59
|
+
import * as React2 from "react";
|
|
269
60
|
|
|
270
61
|
// ../../node_modules/.pnpm/@iconify-icon+react@2.1.0_react@18.3.1/node_modules/@iconify-icon/react/dist/iconify.mjs
|
|
271
|
-
import
|
|
62
|
+
import React from "react";
|
|
272
63
|
|
|
273
64
|
// ../../node_modules/.pnpm/iconify-icon@2.1.0/node_modules/iconify-icon/dist/iconify-icon.mjs
|
|
274
65
|
var defaultIconDimensions = Object.freeze({
|
|
@@ -2382,7 +2173,7 @@ var {
|
|
|
2382
2173
|
} = IconifyIconComponent;
|
|
2383
2174
|
|
|
2384
2175
|
// ../../node_modules/.pnpm/@iconify-icon+react@2.1.0_react@18.3.1/node_modules/@iconify-icon/react/dist/iconify.mjs
|
|
2385
|
-
var Icon =
|
|
2176
|
+
var Icon = React.forwardRef((props, ref) => {
|
|
2386
2177
|
const newProps = {
|
|
2387
2178
|
...props,
|
|
2388
2179
|
ref
|
|
@@ -2396,13 +2187,13 @@ var Icon = /*#__PURE__*/React5.forwardRef((props, ref) => {
|
|
|
2396
2187
|
if (props.className) {
|
|
2397
2188
|
newProps["class"] = props.className;
|
|
2398
2189
|
}
|
|
2399
|
-
return
|
|
2190
|
+
return React.createElement("iconify-icon", newProps);
|
|
2400
2191
|
});
|
|
2401
2192
|
|
|
2402
2193
|
// ../react-icons/src/Icon.tsx
|
|
2403
|
-
import { jsx as
|
|
2404
|
-
var Icon2 =
|
|
2405
|
-
return /* @__PURE__ */
|
|
2194
|
+
import { jsx as jsx2 } from "react/jsx-runtime";
|
|
2195
|
+
var Icon2 = React2.forwardRef((props, ref) => {
|
|
2196
|
+
return /* @__PURE__ */jsx2(Icon, {
|
|
2406
2197
|
ref,
|
|
2407
2198
|
"data-testid": "iconify-icon",
|
|
2408
2199
|
...props
|
|
@@ -2410,8 +2201,8 @@ var Icon2 = /*#__PURE__*/React6.forwardRef((props, ref) => {
|
|
|
2410
2201
|
});
|
|
2411
2202
|
Icon2.displayName = "Icon";
|
|
2412
2203
|
|
|
2413
|
-
// src/components/Menu.tsx
|
|
2414
|
-
import { Fragment, jsx as
|
|
2204
|
+
// src/components/Menu/Menu.tsx
|
|
2205
|
+
import { Fragment, jsx as jsx3, jsxs } from "react/jsx-runtime";
|
|
2415
2206
|
var Menu = ({
|
|
2416
2207
|
children,
|
|
2417
2208
|
srcLogo,
|
|
@@ -2424,21 +2215,21 @@ var Menu = ({
|
|
|
2424
2215
|
sizeOnMobile = "100%",
|
|
2425
2216
|
menuIcon = "menu-open"
|
|
2426
2217
|
}) => {
|
|
2427
|
-
const responsiveSize =
|
|
2428
|
-
return /* @__PURE__ */
|
|
2429
|
-
children: [/* @__PURE__ */
|
|
2218
|
+
const responsiveSize = useResponsiveValue([sizeOnMobile, sizeOnDesktop]);
|
|
2219
|
+
return /* @__PURE__ */jsxs(Fragment, {
|
|
2220
|
+
children: [/* @__PURE__ */jsx3(Text, {
|
|
2430
2221
|
sx: {
|
|
2431
2222
|
cursor: "pointer"
|
|
2432
2223
|
},
|
|
2433
2224
|
onClick: onOpen,
|
|
2434
|
-
children: /* @__PURE__ */
|
|
2225
|
+
children: /* @__PURE__ */jsx3(Icon2, {
|
|
2435
2226
|
icon: menuIcon
|
|
2436
2227
|
})
|
|
2437
|
-
}), /* @__PURE__ */
|
|
2228
|
+
}), /* @__PURE__ */jsx3(Drawer, {
|
|
2438
2229
|
size: responsiveSize,
|
|
2439
2230
|
direction,
|
|
2440
2231
|
open: isOpen,
|
|
2441
|
-
children: /* @__PURE__ */
|
|
2232
|
+
children: /* @__PURE__ */jsxs(Box2, {
|
|
2442
2233
|
sx: {
|
|
2443
2234
|
position: "fixed",
|
|
2444
2235
|
height: "100%",
|
|
@@ -2452,18 +2243,18 @@ var Menu = ({
|
|
|
2452
2243
|
paddingBottom: "2xl",
|
|
2453
2244
|
...sx
|
|
2454
2245
|
},
|
|
2455
|
-
children: [/* @__PURE__ */
|
|
2246
|
+
children: [/* @__PURE__ */jsxs(Flex, {
|
|
2456
2247
|
sx: {
|
|
2457
2248
|
justifyContent: "space-between"
|
|
2458
2249
|
},
|
|
2459
|
-
children: [/* @__PURE__ */
|
|
2250
|
+
children: [/* @__PURE__ */jsx3(Image, {
|
|
2460
2251
|
src: srcLogo,
|
|
2461
2252
|
sx: {
|
|
2462
2253
|
maxWidth: "200px",
|
|
2463
2254
|
height: "44px",
|
|
2464
2255
|
objectFit: "cover"
|
|
2465
2256
|
}
|
|
2466
|
-
}), /* @__PURE__ */
|
|
2257
|
+
}), /* @__PURE__ */jsx3(Text, {
|
|
2467
2258
|
sx: {
|
|
2468
2259
|
marginLeft: "auto",
|
|
2469
2260
|
fontSize: "2xl",
|
|
@@ -2474,11 +2265,11 @@ var Menu = ({
|
|
|
2474
2265
|
},
|
|
2475
2266
|
role: "button",
|
|
2476
2267
|
onClick: onClose,
|
|
2477
|
-
children: /* @__PURE__ */
|
|
2268
|
+
children: /* @__PURE__ */jsx3(Icon2, {
|
|
2478
2269
|
icon: "close"
|
|
2479
2270
|
})
|
|
2480
2271
|
})]
|
|
2481
|
-
}), /* @__PURE__ */
|
|
2272
|
+
}), /* @__PURE__ */jsx3(Box2, {
|
|
2482
2273
|
sx: {
|
|
2483
2274
|
paddingTop: "3xl"
|
|
2484
2275
|
},
|
|
@@ -2489,58 +2280,7 @@ var Menu = ({
|
|
|
2489
2280
|
})]
|
|
2490
2281
|
});
|
|
2491
2282
|
};
|
|
2492
|
-
|
|
2493
|
-
// src/components/Drawer.tsx
|
|
2494
|
-
import { Box as Box4 } from "@ttoss/ui";
|
|
2495
|
-
import { css as createClassName2 } from "@emotion/css";
|
|
2496
|
-
import DrawerUi from "react-modern-drawer";
|
|
2497
|
-
import { jsx as jsx9 } from "react/jsx-runtime";
|
|
2498
|
-
var reactModernDrawerClassName = createClassName2(`
|
|
2499
|
-
.EZDrawer .EZDrawer__checkbox {
|
|
2500
|
-
display: none;
|
|
2501
|
-
}
|
|
2502
|
-
.EZDrawer .EZDrawer__checkbox:checked ~ .EZDrawer__overlay {
|
|
2503
|
-
display: block;
|
|
2504
|
-
opacity: 1;
|
|
2505
|
-
}
|
|
2506
|
-
.EZDrawer .EZDrawer__checkbox:checked ~ .EZDrawer__container {
|
|
2507
|
-
visibility: visible;
|
|
2508
|
-
transform: translate3d(0, 0, 0) !important;
|
|
2509
|
-
}
|
|
2510
|
-
.EZDrawer .EZDrawer__overlay {
|
|
2511
|
-
display: none;
|
|
2512
|
-
height: 100vh;
|
|
2513
|
-
left: 0;
|
|
2514
|
-
position: fixed;
|
|
2515
|
-
top: 0;
|
|
2516
|
-
width: 100%;
|
|
2517
|
-
}
|
|
2518
|
-
.EZDrawer .EZDrawer__container {
|
|
2519
|
-
position: fixed;
|
|
2520
|
-
visibility: hidden;
|
|
2521
|
-
background: white;
|
|
2522
|
-
transition: all;
|
|
2523
|
-
box-shadow: 0 0 10px 5px rgba(0, 0, 0, 0.1);
|
|
2524
|
-
}`);
|
|
2525
|
-
var Drawer = ({
|
|
2526
|
-
children,
|
|
2527
|
-
sx,
|
|
2528
|
-
...props
|
|
2529
|
-
}) => {
|
|
2530
|
-
return /* @__PURE__ */jsx9(DrawerUi, {
|
|
2531
|
-
...props,
|
|
2532
|
-
className: reactModernDrawerClassName,
|
|
2533
|
-
children: /* @__PURE__ */jsx9(Box4, {
|
|
2534
|
-
sx: {
|
|
2535
|
-
width: "100%",
|
|
2536
|
-
height: "100%",
|
|
2537
|
-
...sx
|
|
2538
|
-
},
|
|
2539
|
-
children
|
|
2540
|
-
})
|
|
2541
|
-
});
|
|
2542
|
-
};
|
|
2543
|
-
export { Accordion, Drawer, InstallPwa, InstallPwaUi, Markdown, Menu, Modal, Search, ToastContainer, toast };
|
|
2283
|
+
export { Menu };
|
|
2544
2284
|
/*! Bundled license information:
|
|
2545
2285
|
|
|
2546
2286
|
iconify-icon/dist/iconify-icon.mjs:
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
/** Powered by @ttoss/config. https://ttoss.dev/docs/modules/packages/config/ */
|
|
2
|
+
import "../chunk-XEYGFSK5.js";
|
|
3
|
+
|
|
4
|
+
// src/components/Modal/Modal.tsx
|
|
5
|
+
import { css as transformStyleObject } from "@theme-ui/css";
|
|
6
|
+
import { useResponsiveValue, useTheme } from "@ttoss/ui";
|
|
7
|
+
import ReactModal from "react-modal";
|
|
8
|
+
import { jsx } from "react/jsx-runtime";
|
|
9
|
+
ReactModal.defaultStyles = {
|
|
10
|
+
overlay: {},
|
|
11
|
+
content: {}
|
|
12
|
+
};
|
|
13
|
+
var Modal = props => {
|
|
14
|
+
const {
|
|
15
|
+
theme
|
|
16
|
+
} = useTheme();
|
|
17
|
+
const space = theme.space;
|
|
18
|
+
const padding = useResponsiveValue([space?.["lg"], space?.["xl"], space?.["xl"]]) || 0;
|
|
19
|
+
const style = {
|
|
20
|
+
overlay: transformStyleObject({
|
|
21
|
+
position: "fixed",
|
|
22
|
+
top: 0,
|
|
23
|
+
left: 0,
|
|
24
|
+
right: 0,
|
|
25
|
+
bottom: 0,
|
|
26
|
+
backgroundColor: "rgba(0, 0, 0, 0.5)",
|
|
27
|
+
display: "flex",
|
|
28
|
+
justifyContent: "center",
|
|
29
|
+
alignItems: "center",
|
|
30
|
+
zIndex: "modal",
|
|
31
|
+
...props.style?.overlay
|
|
32
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
33
|
+
})(theme),
|
|
34
|
+
content: transformStyleObject({
|
|
35
|
+
/**
|
|
36
|
+
* Theme
|
|
37
|
+
*/
|
|
38
|
+
backgroundColor: "surface",
|
|
39
|
+
padding,
|
|
40
|
+
border: "default",
|
|
41
|
+
borderColor: "surface",
|
|
42
|
+
borderRadius: "default",
|
|
43
|
+
/**
|
|
44
|
+
* General
|
|
45
|
+
*/
|
|
46
|
+
WebkitOverflowScrolling: "touch",
|
|
47
|
+
overflow: "auto",
|
|
48
|
+
position: "relative",
|
|
49
|
+
top: "0px",
|
|
50
|
+
left: "0px",
|
|
51
|
+
right: "0px",
|
|
52
|
+
bottom: "0px",
|
|
53
|
+
maxHeight: "90%",
|
|
54
|
+
maxWidth: "90%",
|
|
55
|
+
...props.style?.content
|
|
56
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
57
|
+
})(theme)
|
|
58
|
+
};
|
|
59
|
+
return /* @__PURE__ */jsx(ReactModal, {
|
|
60
|
+
...props,
|
|
61
|
+
style
|
|
62
|
+
});
|
|
63
|
+
};
|
|
64
|
+
Modal.setAppElement = ReactModal.setAppElement;
|
|
65
|
+
export { Modal };
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
/** Powered by @ttoss/config. https://ttoss.dev/docs/modules/packages/config/ */
|
|
2
|
+
import "../chunk-XEYGFSK5.js";
|
|
3
|
+
|
|
4
|
+
// src/components/Search/Search.tsx
|
|
5
|
+
import * as React from "react";
|
|
6
|
+
import { Input } from "@ttoss/ui";
|
|
7
|
+
import { useDebounce } from "@ttoss/react-hooks";
|
|
8
|
+
import { jsx } from "react/jsx-runtime";
|
|
9
|
+
var Search = ({
|
|
10
|
+
value,
|
|
11
|
+
defaultValue,
|
|
12
|
+
loading,
|
|
13
|
+
onChange,
|
|
14
|
+
...props
|
|
15
|
+
}) => {
|
|
16
|
+
const [text, setText] = React.useState(value ?? defaultValue);
|
|
17
|
+
const debouncedValue = useDebounce(text, 500);
|
|
18
|
+
React.useEffect(() => {
|
|
19
|
+
onChange(debouncedValue);
|
|
20
|
+
}, [debouncedValue, onChange]);
|
|
21
|
+
return /* @__PURE__ */jsx(Input, {
|
|
22
|
+
leadingIcon: loading ? "loading" : "search",
|
|
23
|
+
defaultValue: text,
|
|
24
|
+
onChange: e => {
|
|
25
|
+
return setText(e.target.value);
|
|
26
|
+
},
|
|
27
|
+
...props
|
|
28
|
+
});
|
|
29
|
+
};
|
|
30
|
+
export { Search };
|
|
@@ -1,9 +1,34 @@
|
|
|
1
1
|
/** Powered by @ttoss/config. https://ttoss.dev/docs/modules/packages/config/ */
|
|
2
|
-
import "../chunk-
|
|
2
|
+
import { __export, __reExport } from "../chunk-XEYGFSK5.js";
|
|
3
3
|
|
|
4
|
-
// src/components/Table.
|
|
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
|
+
|
|
17
|
+
// 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);
|
|
5
30
|
import { Box } from "@ttoss/ui";
|
|
6
|
-
|
|
31
|
+
import * as react_table_star from "@tanstack/react-table";
|
|
7
32
|
import { jsx } from "react/jsx-runtime";
|
|
8
33
|
var Table = props => {
|
|
9
34
|
return /* @__PURE__ */jsx(Box, {
|
|
@@ -53,4 +78,7 @@ var TableFooter = props => {
|
|
|
53
78
|
...props
|
|
54
79
|
});
|
|
55
80
|
};
|
|
81
|
+
|
|
82
|
+
// src/components/Table/index.ts
|
|
83
|
+
__reExport(Table_exports2, Table_exports);
|
|
56
84
|
export { Table, TableBody, TableCaption, TableCell, TableFooter, TableHead, TableHeader, TableRow };
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
/** Powered by @ttoss/config. https://ttoss.dev/docs/modules/packages/config/ */
|
|
2
|
+
import "../chunk-XEYGFSK5.js";
|
|
3
|
+
|
|
4
|
+
// src/components/Toast/Toast.tsx
|
|
5
|
+
import * as React from "react";
|
|
6
|
+
import { Box } from "@ttoss/ui";
|
|
7
|
+
import { ToastContainer as ReactToastifyToastContainer, toast } from "react-toastify";
|
|
8
|
+
import { injectStyle } from "react-toastify/dist/inject-style";
|
|
9
|
+
import { jsx } from "react/jsx-runtime";
|
|
10
|
+
var ToastContainer = props => {
|
|
11
|
+
React.useEffect(() => {
|
|
12
|
+
injectStyle();
|
|
13
|
+
}, []);
|
|
14
|
+
return /* @__PURE__ */jsx(Box, {
|
|
15
|
+
sx: ({
|
|
16
|
+
colors,
|
|
17
|
+
fonts
|
|
18
|
+
}) => {
|
|
19
|
+
return {
|
|
20
|
+
"--toastify-color-light": "#fff",
|
|
21
|
+
"--toastify-color-dark": "#121212",
|
|
22
|
+
"--toastify-color-info": colors?.info || "#3498db",
|
|
23
|
+
"--toastify-color-success": colors?.success || "#07bc0c",
|
|
24
|
+
"--toastify-color-warning": "#f1c40f",
|
|
25
|
+
"--toastify-color-error": "#e74c3c",
|
|
26
|
+
"--toastify-color-progress-light": `linear-gradient(to right, ${colors?.primary}, ${colors?.secondary})`,
|
|
27
|
+
"--toastify-font-family": fonts.body
|
|
28
|
+
};
|
|
29
|
+
},
|
|
30
|
+
children: /* @__PURE__ */jsx(ReactToastifyToastContainer, {
|
|
31
|
+
...props
|
|
32
|
+
})
|
|
33
|
+
});
|
|
34
|
+
};
|
|
35
|
+
export { ToastContainer, toast };
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
/** Powered by @ttoss/config. https://ttoss.dev/docs/modules/packages/config/ */
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
+
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, {
|
|
7
|
+
enumerable: true,
|
|
8
|
+
configurable: true,
|
|
9
|
+
writable: true,
|
|
10
|
+
value
|
|
11
|
+
}) : obj[key] = value;
|
|
12
|
+
var __export = (target, all) => {
|
|
13
|
+
for (var name in all) __defProp(target, name, {
|
|
14
|
+
get: all[name],
|
|
15
|
+
enumerable: true
|
|
16
|
+
});
|
|
17
|
+
};
|
|
18
|
+
var __copyProps = (to, from, except, desc) => {
|
|
19
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
20
|
+
for (let key of __getOwnPropNames(from)) if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
|
|
21
|
+
get: () => from[key],
|
|
22
|
+
enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
|
|
23
|
+
});
|
|
24
|
+
}
|
|
25
|
+
return to;
|
|
26
|
+
};
|
|
27
|
+
var __reExport = (target, mod, secondTarget) => (__copyProps(target, mod, "default"), secondTarget && __copyProps(secondTarget, mod, "default"));
|
|
28
|
+
var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
29
|
+
export { __export, __reExport, __publicField };
|