@ttoss/components 1.21.5 → 1.21.7
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 +5 -5
- package/dist/esm/index.js +0 -223
- package/dist/index.d.ts +0 -298
- package/dist/index.js +0 -251
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ttoss/components",
|
|
3
|
-
"version": "1.21.
|
|
3
|
+
"version": "1.21.7",
|
|
4
4
|
"description": "React components.",
|
|
5
5
|
"license": "UNLICENSED",
|
|
6
6
|
"author": "ttoss",
|
|
@@ -32,9 +32,9 @@
|
|
|
32
32
|
"react": ">=16.8.0"
|
|
33
33
|
},
|
|
34
34
|
"devDependencies": {
|
|
35
|
-
"@ttoss/config": "^1.18.
|
|
36
|
-
"@ttoss/test-utils": "^1.16.
|
|
37
|
-
"@ttoss/ui": "^1.20.
|
|
35
|
+
"@ttoss/config": "^1.18.3",
|
|
36
|
+
"@ttoss/test-utils": "^1.16.10",
|
|
37
|
+
"@ttoss/ui": "^1.20.4",
|
|
38
38
|
"@types/jest": "^28.1.5",
|
|
39
39
|
"jest": "^28.1.3"
|
|
40
40
|
},
|
|
@@ -45,5 +45,5 @@
|
|
|
45
45
|
"publishConfig": {
|
|
46
46
|
"access": "public"
|
|
47
47
|
},
|
|
48
|
-
"gitHead": "
|
|
48
|
+
"gitHead": "b9f9de9b8389be76965f125b593166f10c2171e6"
|
|
49
49
|
}
|
package/dist/esm/index.js
DELETED
|
@@ -1,223 +0,0 @@
|
|
|
1
|
-
// tsup.inject.js
|
|
2
|
-
import * as React from "react";
|
|
3
|
-
|
|
4
|
-
// src/components/Accordion/Accordion.tsx
|
|
5
|
-
import * as React2 from "react";
|
|
6
|
-
import {
|
|
7
|
-
AccordionItem,
|
|
8
|
-
AccordionItemButton,
|
|
9
|
-
AccordionItemHeading,
|
|
10
|
-
AccordionItemPanel,
|
|
11
|
-
Accordion as ReactAccessibleAccordion
|
|
12
|
-
} from "react-accessible-accordion";
|
|
13
|
-
import { Box, useTheme } from "@ttoss/ui";
|
|
14
|
-
import { css as createClassName } from "@emotion/css";
|
|
15
|
-
import { css as transformStyleObject } from "@theme-ui/css";
|
|
16
|
-
import { jsx } from "react/jsx-runtime";
|
|
17
|
-
var Accordion = ({
|
|
18
|
-
children,
|
|
19
|
-
allowMultipleExpanded,
|
|
20
|
-
allowZeroExpanded,
|
|
21
|
-
preExpanded,
|
|
22
|
-
onChange,
|
|
23
|
-
...boxProps
|
|
24
|
-
}) => {
|
|
25
|
-
const { theme } = useTheme();
|
|
26
|
-
const className = React2.useMemo(() => {
|
|
27
|
-
const styles = transformStyleObject({
|
|
28
|
-
".accordion__item": {
|
|
29
|
-
marginBottom: 3
|
|
30
|
-
},
|
|
31
|
-
".accordion__heading": {
|
|
32
|
-
padding: 2,
|
|
33
|
-
border: "1px solid",
|
|
34
|
-
borderColor: "black"
|
|
35
|
-
},
|
|
36
|
-
".accordion__button": {},
|
|
37
|
-
".accordion__panel": {
|
|
38
|
-
padding: 2
|
|
39
|
-
}
|
|
40
|
-
})(theme);
|
|
41
|
-
return createClassName(styles);
|
|
42
|
-
}, [theme]);
|
|
43
|
-
return /* @__PURE__ */ jsx(Box, {
|
|
44
|
-
variant: "accordion",
|
|
45
|
-
className,
|
|
46
|
-
...boxProps,
|
|
47
|
-
children: /* @__PURE__ */ jsx(ReactAccessibleAccordion, {
|
|
48
|
-
...{
|
|
49
|
-
allowMultipleExpanded,
|
|
50
|
-
allowZeroExpanded,
|
|
51
|
-
preExpanded,
|
|
52
|
-
onChange
|
|
53
|
-
},
|
|
54
|
-
children
|
|
55
|
-
})
|
|
56
|
-
});
|
|
57
|
-
};
|
|
58
|
-
Accordion.Item = AccordionItem;
|
|
59
|
-
Accordion.ItemButton = AccordionItemButton;
|
|
60
|
-
Accordion.ItemHeading = AccordionItemHeading;
|
|
61
|
-
Accordion.ItemPanel = AccordionItemPanel;
|
|
62
|
-
|
|
63
|
-
// src/components/InstallPwa/InstallPwa.tsx
|
|
64
|
-
import * as React3 from "react";
|
|
65
|
-
|
|
66
|
-
// src/components/InstallPwa/InstallPwaUi.tsx
|
|
67
|
-
import { Button, Flex, Text } from "@ttoss/ui";
|
|
68
|
-
import { jsx as jsx2, jsxs } from "react/jsx-runtime";
|
|
69
|
-
var InstallPwaUi = ({ onInstall }) => {
|
|
70
|
-
return /* @__PURE__ */ jsx2(Flex, {
|
|
71
|
-
sx: {
|
|
72
|
-
position: "absolute",
|
|
73
|
-
bottom: 4,
|
|
74
|
-
width: "100%",
|
|
75
|
-
justifyContent: "center"
|
|
76
|
-
},
|
|
77
|
-
children: /* @__PURE__ */ jsxs(Flex, {
|
|
78
|
-
sx: {
|
|
79
|
-
backgroundColor: "background",
|
|
80
|
-
justifyContent: "center",
|
|
81
|
-
alignItems: "center",
|
|
82
|
-
gap: 3,
|
|
83
|
-
width: "auto",
|
|
84
|
-
border: "1px solid",
|
|
85
|
-
borderColor: "muted",
|
|
86
|
-
borderRadius: 1,
|
|
87
|
-
padding: 4
|
|
88
|
-
},
|
|
89
|
-
children: [
|
|
90
|
-
/* @__PURE__ */ jsx2(Text, {
|
|
91
|
-
children: "Deseja instalar o nosso aplicativo?"
|
|
92
|
-
}),
|
|
93
|
-
/* @__PURE__ */ jsx2(Button, {
|
|
94
|
-
onClick: onInstall,
|
|
95
|
-
children: "Instalar"
|
|
96
|
-
})
|
|
97
|
-
]
|
|
98
|
-
})
|
|
99
|
-
});
|
|
100
|
-
};
|
|
101
|
-
|
|
102
|
-
// src/components/InstallPwa/InstallPwa.tsx
|
|
103
|
-
import { jsx as jsx3 } from "react/jsx-runtime";
|
|
104
|
-
var InstallPwa = () => {
|
|
105
|
-
const [supportsPwa, setSupportsPwa] = React3.useState(false);
|
|
106
|
-
const [promptInstall, setPromptInstall] = React3.useState(null);
|
|
107
|
-
React3.useEffect(() => {
|
|
108
|
-
const handler = (e) => {
|
|
109
|
-
e.preventDefault();
|
|
110
|
-
setSupportsPwa(true);
|
|
111
|
-
setPromptInstall(e);
|
|
112
|
-
};
|
|
113
|
-
window.addEventListener("beforeinstallprompt", handler);
|
|
114
|
-
return () => window.removeEventListener("transitionend", handler);
|
|
115
|
-
}, []);
|
|
116
|
-
const onInstall = (e) => {
|
|
117
|
-
e.preventDefault();
|
|
118
|
-
if (!promptInstall) {
|
|
119
|
-
return;
|
|
120
|
-
}
|
|
121
|
-
promptInstall.prompt();
|
|
122
|
-
};
|
|
123
|
-
if (!supportsPwa) {
|
|
124
|
-
return null;
|
|
125
|
-
}
|
|
126
|
-
return /* @__PURE__ */ jsx3(InstallPwaUi, {
|
|
127
|
-
onInstall
|
|
128
|
-
});
|
|
129
|
-
};
|
|
130
|
-
|
|
131
|
-
// src/components/Modal/Modal.tsx
|
|
132
|
-
import { useResponsiveValue, useTheme as useTheme2 } from "@ttoss/ui";
|
|
133
|
-
import ReactModal from "react-modal";
|
|
134
|
-
import { jsx as jsx4 } from "react/jsx-runtime";
|
|
135
|
-
ReactModal.defaultStyles = {
|
|
136
|
-
overlay: {},
|
|
137
|
-
content: {}
|
|
138
|
-
};
|
|
139
|
-
var Modal = (props) => {
|
|
140
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _i;
|
|
141
|
-
const { theme } = useTheme2();
|
|
142
|
-
const padding = useResponsiveValue([
|
|
143
|
-
(_a = theme.space) == null ? void 0 : _a[2],
|
|
144
|
-
(_b = theme.space) == null ? void 0 : _b[3],
|
|
145
|
-
(_c = theme.space) == null ? void 0 : _c[4]
|
|
146
|
-
]) || 0;
|
|
147
|
-
const style = {
|
|
148
|
-
overlay: {
|
|
149
|
-
position: "fixed",
|
|
150
|
-
top: 0,
|
|
151
|
-
left: 0,
|
|
152
|
-
right: 0,
|
|
153
|
-
bottom: 0,
|
|
154
|
-
backgroundColor: "rgba(255, 255, 255, 0.5)",
|
|
155
|
-
display: "flex",
|
|
156
|
-
justifyContent: "center",
|
|
157
|
-
alignItems: "center",
|
|
158
|
-
padding,
|
|
159
|
-
...(_d = props.style) == null ? void 0 : _d.overlay
|
|
160
|
-
},
|
|
161
|
-
content: {
|
|
162
|
-
backgroundColor: ((_f = (_e = theme.rawColors) == null ? void 0 : _e.background) == null ? void 0 : _f.toString()) || "#fff",
|
|
163
|
-
padding,
|
|
164
|
-
WebkitOverflowScrolling: "touch",
|
|
165
|
-
overflow: "auto",
|
|
166
|
-
position: "relative",
|
|
167
|
-
top: "0px",
|
|
168
|
-
left: "0px",
|
|
169
|
-
right: "0px",
|
|
170
|
-
bottom: "0px",
|
|
171
|
-
border: "2px solid",
|
|
172
|
-
borderColor: ((_h = (_g = theme.rawColors) == null ? void 0 : _g.muted) == null ? void 0 : _h.toString()) || "#fff",
|
|
173
|
-
display: "flex",
|
|
174
|
-
flexDirection: "column",
|
|
175
|
-
alignItems: "center",
|
|
176
|
-
...(_i = props.style) == null ? void 0 : _i.content
|
|
177
|
-
}
|
|
178
|
-
};
|
|
179
|
-
return /* @__PURE__ */ jsx4(ReactModal, {
|
|
180
|
-
...props,
|
|
181
|
-
style
|
|
182
|
-
});
|
|
183
|
-
};
|
|
184
|
-
Modal.setAppElement = ReactModal.setAppElement;
|
|
185
|
-
|
|
186
|
-
// src/components/Toast/Toast.tsx
|
|
187
|
-
import * as React4 from "react";
|
|
188
|
-
import { Box as Box2 } from "@ttoss/ui";
|
|
189
|
-
import {
|
|
190
|
-
ToastContainer as ReactToastifyToastContainer,
|
|
191
|
-
ToastContainerProps,
|
|
192
|
-
toast
|
|
193
|
-
} from "react-toastify";
|
|
194
|
-
import { injectStyle } from "react-toastify/dist/inject-style";
|
|
195
|
-
import { jsx as jsx5 } from "react/jsx-runtime";
|
|
196
|
-
var ToastContainer = (props) => {
|
|
197
|
-
React4.useEffect(() => {
|
|
198
|
-
injectStyle();
|
|
199
|
-
}, []);
|
|
200
|
-
return /* @__PURE__ */ jsx5(Box2, {
|
|
201
|
-
sx: ({ colors, fonts }) => ({
|
|
202
|
-
"--toastify-color-light": "#fff",
|
|
203
|
-
"--toastify-color-dark": "#121212",
|
|
204
|
-
"--toastify-color-info": (colors == null ? void 0 : colors.info) || "#3498db",
|
|
205
|
-
"--toastify-color-success": (colors == null ? void 0 : colors.success) || "#07bc0c",
|
|
206
|
-
"--toastify-color-warning": "#f1c40f",
|
|
207
|
-
"--toastify-color-error": "#e74c3c",
|
|
208
|
-
"--toastify-color-progress-light": `linear-gradient(to right, ${colors == null ? void 0 : colors.primary}, ${colors == null ? void 0 : colors.secondary})`,
|
|
209
|
-
"--toastify-font-family": fonts.body
|
|
210
|
-
}),
|
|
211
|
-
children: /* @__PURE__ */ jsx5(ReactToastifyToastContainer, {
|
|
212
|
-
...props
|
|
213
|
-
})
|
|
214
|
-
});
|
|
215
|
-
};
|
|
216
|
-
export {
|
|
217
|
-
Accordion,
|
|
218
|
-
InstallPwa,
|
|
219
|
-
Modal,
|
|
220
|
-
ToastContainer,
|
|
221
|
-
ToastContainerProps,
|
|
222
|
-
toast
|
|
223
|
-
};
|
package/dist/index.d.ts
DELETED
|
@@ -1,298 +0,0 @@
|
|
|
1
|
-
import * as react_accessible_accordion_dist_types_helpers_DisplayName from 'react-accessible-accordion/dist/types/helpers/DisplayName';
|
|
2
|
-
import * as react_accessible_accordion_dist_types_components_ItemContext from 'react-accessible-accordion/dist/types/components/ItemContext';
|
|
3
|
-
import * as react_accessible_accordion_dist_types_helpers_types from 'react-accessible-accordion/dist/types/helpers/types';
|
|
4
|
-
import * as React from 'react';
|
|
5
|
-
import { BoxProps } from '@ttoss/ui';
|
|
6
|
-
import ReactModal from 'react-modal';
|
|
7
|
-
import { ToastContainerProps } from 'react-toastify';
|
|
8
|
-
export { ToastContainerProps, toast } from 'react-toastify';
|
|
9
|
-
|
|
10
|
-
declare type AccordionProps = BoxProps & {
|
|
11
|
-
allowMultipleExpanded?: boolean;
|
|
12
|
-
allowZeroExpanded?: boolean;
|
|
13
|
-
preExpanded?: string[];
|
|
14
|
-
/**
|
|
15
|
-
* Callback which is invoked when items are expanded or collapsed. Gets passed uuids of the currently expanded AccordionItems.
|
|
16
|
-
*/
|
|
17
|
-
onChange?: (args: string[]) => void;
|
|
18
|
-
};
|
|
19
|
-
declare const Accordion: {
|
|
20
|
-
({ children, allowMultipleExpanded, allowZeroExpanded, preExpanded, onChange, ...boxProps }: AccordionProps): JSX.Element;
|
|
21
|
-
Item: {
|
|
22
|
-
({ uuid, dangerouslySetExpanded, className, activeClassName, ...rest }: react_accessible_accordion_dist_types_helpers_types.DivAttributes & {
|
|
23
|
-
uuid?: react_accessible_accordion_dist_types_components_ItemContext.ID | undefined;
|
|
24
|
-
activeClassName?: string | undefined;
|
|
25
|
-
dangerouslySetExpanded?: boolean | undefined;
|
|
26
|
-
}): JSX.Element;
|
|
27
|
-
displayName: react_accessible_accordion_dist_types_helpers_DisplayName.default;
|
|
28
|
-
};
|
|
29
|
-
ItemButton: React.FC<{
|
|
30
|
-
children?: React.ReactNode;
|
|
31
|
-
slot?: string | undefined;
|
|
32
|
-
style?: React.CSSProperties | undefined;
|
|
33
|
-
title?: string | undefined;
|
|
34
|
-
defaultChecked?: boolean | undefined;
|
|
35
|
-
defaultValue?: string | number | readonly string[] | undefined;
|
|
36
|
-
suppressContentEditableWarning?: boolean | undefined;
|
|
37
|
-
suppressHydrationWarning?: boolean | undefined;
|
|
38
|
-
accessKey?: string | undefined;
|
|
39
|
-
className?: string | undefined;
|
|
40
|
-
contentEditable?: (boolean | "true" | "false") | "inherit" | undefined;
|
|
41
|
-
contextMenu?: string | undefined;
|
|
42
|
-
dir?: string | undefined;
|
|
43
|
-
draggable?: (boolean | "true" | "false") | undefined;
|
|
44
|
-
hidden?: boolean | undefined;
|
|
45
|
-
lang?: string | undefined;
|
|
46
|
-
placeholder?: string | undefined;
|
|
47
|
-
spellCheck?: (boolean | "true" | "false") | undefined;
|
|
48
|
-
translate?: "yes" | "no" | undefined;
|
|
49
|
-
radioGroup?: string | undefined;
|
|
50
|
-
about?: string | undefined;
|
|
51
|
-
datatype?: string | undefined;
|
|
52
|
-
inlist?: any;
|
|
53
|
-
prefix?: string | undefined;
|
|
54
|
-
property?: string | undefined;
|
|
55
|
-
resource?: string | undefined;
|
|
56
|
-
typeof?: string | undefined;
|
|
57
|
-
vocab?: string | undefined;
|
|
58
|
-
autoCapitalize?: string | undefined;
|
|
59
|
-
autoCorrect?: string | undefined;
|
|
60
|
-
autoSave?: string | undefined;
|
|
61
|
-
color?: string | undefined;
|
|
62
|
-
itemProp?: string | undefined;
|
|
63
|
-
itemScope?: boolean | undefined;
|
|
64
|
-
itemType?: string | undefined;
|
|
65
|
-
itemID?: string | undefined;
|
|
66
|
-
itemRef?: string | undefined;
|
|
67
|
-
results?: number | undefined;
|
|
68
|
-
security?: string | undefined;
|
|
69
|
-
unselectable?: "on" | "off" | undefined;
|
|
70
|
-
inputMode?: "text" | "none" | "search" | "tel" | "url" | "email" | "numeric" | "decimal" | undefined;
|
|
71
|
-
is?: string | undefined;
|
|
72
|
-
'aria-activedescendant'?: string | undefined;
|
|
73
|
-
'aria-atomic'?: (boolean | "true" | "false") | undefined;
|
|
74
|
-
'aria-autocomplete'?: "list" | "none" | "both" | "inline" | undefined;
|
|
75
|
-
'aria-busy'?: (boolean | "true" | "false") | undefined;
|
|
76
|
-
'aria-checked'?: boolean | "true" | "false" | "mixed" | undefined;
|
|
77
|
-
'aria-colcount'?: number | undefined;
|
|
78
|
-
'aria-colindex'?: number | undefined;
|
|
79
|
-
'aria-colspan'?: number | undefined;
|
|
80
|
-
'aria-current'?: boolean | "time" | "true" | "false" | "page" | "step" | "location" | "date" | undefined;
|
|
81
|
-
'aria-describedby'?: string | undefined;
|
|
82
|
-
'aria-details'?: string | undefined;
|
|
83
|
-
'aria-dropeffect'?: "link" | "none" | "copy" | "move" | "execute" | "popup" | undefined;
|
|
84
|
-
'aria-errormessage'?: string | undefined;
|
|
85
|
-
'aria-flowto'?: string | undefined;
|
|
86
|
-
'aria-grabbed'?: (boolean | "true" | "false") | undefined;
|
|
87
|
-
'aria-haspopup'?: boolean | "dialog" | "menu" | "true" | "false" | "grid" | "listbox" | "tree" | undefined;
|
|
88
|
-
'aria-hidden'?: (boolean | "true" | "false") | undefined;
|
|
89
|
-
'aria-invalid'?: boolean | "true" | "false" | "grammar" | "spelling" | undefined;
|
|
90
|
-
'aria-keyshortcuts'?: string | undefined;
|
|
91
|
-
'aria-label'?: string | undefined;
|
|
92
|
-
'aria-labelledby'?: string | undefined;
|
|
93
|
-
'aria-level'?: number | undefined;
|
|
94
|
-
'aria-live'?: "off" | "assertive" | "polite" | undefined;
|
|
95
|
-
'aria-modal'?: (boolean | "true" | "false") | undefined;
|
|
96
|
-
'aria-multiline'?: (boolean | "true" | "false") | undefined;
|
|
97
|
-
'aria-multiselectable'?: (boolean | "true" | "false") | undefined;
|
|
98
|
-
'aria-orientation'?: "horizontal" | "vertical" | undefined;
|
|
99
|
-
'aria-owns'?: string | undefined;
|
|
100
|
-
'aria-placeholder'?: string | undefined;
|
|
101
|
-
'aria-posinset'?: number | undefined;
|
|
102
|
-
'aria-pressed'?: boolean | "true" | "false" | "mixed" | undefined;
|
|
103
|
-
'aria-readonly'?: (boolean | "true" | "false") | undefined;
|
|
104
|
-
'aria-relevant'?: "text" | "all" | "additions" | "additions removals" | "additions text" | "removals" | "removals additions" | "removals text" | "text additions" | "text removals" | undefined;
|
|
105
|
-
'aria-required'?: (boolean | "true" | "false") | undefined;
|
|
106
|
-
'aria-roledescription'?: string | undefined;
|
|
107
|
-
'aria-rowcount'?: number | undefined;
|
|
108
|
-
'aria-rowindex'?: number | undefined;
|
|
109
|
-
'aria-rowspan'?: number | undefined;
|
|
110
|
-
'aria-selected'?: (boolean | "true" | "false") | undefined;
|
|
111
|
-
'aria-setsize'?: number | undefined;
|
|
112
|
-
'aria-sort'?: "none" | "ascending" | "descending" | "other" | undefined;
|
|
113
|
-
'aria-valuemax'?: number | undefined;
|
|
114
|
-
'aria-valuemin'?: number | undefined;
|
|
115
|
-
'aria-valuenow'?: number | undefined;
|
|
116
|
-
'aria-valuetext'?: string | undefined;
|
|
117
|
-
dangerouslySetInnerHTML?: {
|
|
118
|
-
__html: string;
|
|
119
|
-
} | undefined;
|
|
120
|
-
onCopy?: React.ClipboardEventHandler<HTMLDivElement> | undefined;
|
|
121
|
-
onCopyCapture?: React.ClipboardEventHandler<HTMLDivElement> | undefined;
|
|
122
|
-
onCut?: React.ClipboardEventHandler<HTMLDivElement> | undefined;
|
|
123
|
-
onCutCapture?: React.ClipboardEventHandler<HTMLDivElement> | undefined;
|
|
124
|
-
onPaste?: React.ClipboardEventHandler<HTMLDivElement> | undefined;
|
|
125
|
-
onPasteCapture?: React.ClipboardEventHandler<HTMLDivElement> | undefined;
|
|
126
|
-
onCompositionEnd?: React.CompositionEventHandler<HTMLDivElement> | undefined;
|
|
127
|
-
onCompositionEndCapture?: React.CompositionEventHandler<HTMLDivElement> | undefined;
|
|
128
|
-
onCompositionStart?: React.CompositionEventHandler<HTMLDivElement> | undefined;
|
|
129
|
-
onCompositionStartCapture?: React.CompositionEventHandler<HTMLDivElement> | undefined;
|
|
130
|
-
onCompositionUpdate?: React.CompositionEventHandler<HTMLDivElement> | undefined;
|
|
131
|
-
onCompositionUpdateCapture?: React.CompositionEventHandler<HTMLDivElement> | undefined;
|
|
132
|
-
onFocus?: React.FocusEventHandler<HTMLDivElement> | undefined;
|
|
133
|
-
onFocusCapture?: React.FocusEventHandler<HTMLDivElement> | undefined;
|
|
134
|
-
onBlur?: React.FocusEventHandler<HTMLDivElement> | undefined;
|
|
135
|
-
onBlurCapture?: React.FocusEventHandler<HTMLDivElement> | undefined;
|
|
136
|
-
onChange?: React.FormEventHandler<HTMLDivElement> | undefined;
|
|
137
|
-
onChangeCapture?: React.FormEventHandler<HTMLDivElement> | undefined;
|
|
138
|
-
onBeforeInput?: React.FormEventHandler<HTMLDivElement> | undefined;
|
|
139
|
-
onBeforeInputCapture?: React.FormEventHandler<HTMLDivElement> | undefined;
|
|
140
|
-
onInput?: React.FormEventHandler<HTMLDivElement> | undefined;
|
|
141
|
-
onInputCapture?: React.FormEventHandler<HTMLDivElement> | undefined;
|
|
142
|
-
onReset?: React.FormEventHandler<HTMLDivElement> | undefined;
|
|
143
|
-
onResetCapture?: React.FormEventHandler<HTMLDivElement> | undefined;
|
|
144
|
-
onSubmit?: React.FormEventHandler<HTMLDivElement> | undefined;
|
|
145
|
-
onSubmitCapture?: React.FormEventHandler<HTMLDivElement> | undefined;
|
|
146
|
-
onInvalid?: React.FormEventHandler<HTMLDivElement> | undefined;
|
|
147
|
-
onInvalidCapture?: React.FormEventHandler<HTMLDivElement> | undefined;
|
|
148
|
-
onLoad?: React.ReactEventHandler<HTMLDivElement> | undefined;
|
|
149
|
-
onLoadCapture?: React.ReactEventHandler<HTMLDivElement> | undefined;
|
|
150
|
-
onError?: React.ReactEventHandler<HTMLDivElement> | undefined;
|
|
151
|
-
onErrorCapture?: React.ReactEventHandler<HTMLDivElement> | undefined;
|
|
152
|
-
onKeyDown?: React.KeyboardEventHandler<HTMLDivElement> | undefined;
|
|
153
|
-
onKeyDownCapture?: React.KeyboardEventHandler<HTMLDivElement> | undefined;
|
|
154
|
-
onKeyPress?: React.KeyboardEventHandler<HTMLDivElement> | undefined;
|
|
155
|
-
onKeyPressCapture?: React.KeyboardEventHandler<HTMLDivElement> | undefined;
|
|
156
|
-
onKeyUp?: React.KeyboardEventHandler<HTMLDivElement> | undefined;
|
|
157
|
-
onKeyUpCapture?: React.KeyboardEventHandler<HTMLDivElement> | undefined;
|
|
158
|
-
onAbort?: React.ReactEventHandler<HTMLDivElement> | undefined;
|
|
159
|
-
onAbortCapture?: React.ReactEventHandler<HTMLDivElement> | undefined;
|
|
160
|
-
onCanPlay?: React.ReactEventHandler<HTMLDivElement> | undefined;
|
|
161
|
-
onCanPlayCapture?: React.ReactEventHandler<HTMLDivElement> | undefined;
|
|
162
|
-
onCanPlayThrough?: React.ReactEventHandler<HTMLDivElement> | undefined;
|
|
163
|
-
onCanPlayThroughCapture?: React.ReactEventHandler<HTMLDivElement> | undefined;
|
|
164
|
-
onDurationChange?: React.ReactEventHandler<HTMLDivElement> | undefined;
|
|
165
|
-
onDurationChangeCapture?: React.ReactEventHandler<HTMLDivElement> | undefined;
|
|
166
|
-
onEmptied?: React.ReactEventHandler<HTMLDivElement> | undefined;
|
|
167
|
-
onEmptiedCapture?: React.ReactEventHandler<HTMLDivElement> | undefined;
|
|
168
|
-
onEncrypted?: React.ReactEventHandler<HTMLDivElement> | undefined;
|
|
169
|
-
onEncryptedCapture?: React.ReactEventHandler<HTMLDivElement> | undefined;
|
|
170
|
-
onEnded?: React.ReactEventHandler<HTMLDivElement> | undefined;
|
|
171
|
-
onEndedCapture?: React.ReactEventHandler<HTMLDivElement> | undefined;
|
|
172
|
-
onLoadedData?: React.ReactEventHandler<HTMLDivElement> | undefined;
|
|
173
|
-
onLoadedDataCapture?: React.ReactEventHandler<HTMLDivElement> | undefined;
|
|
174
|
-
onLoadedMetadata?: React.ReactEventHandler<HTMLDivElement> | undefined;
|
|
175
|
-
onLoadedMetadataCapture?: React.ReactEventHandler<HTMLDivElement> | undefined;
|
|
176
|
-
onLoadStart?: React.ReactEventHandler<HTMLDivElement> | undefined;
|
|
177
|
-
onLoadStartCapture?: React.ReactEventHandler<HTMLDivElement> | undefined;
|
|
178
|
-
onPause?: React.ReactEventHandler<HTMLDivElement> | undefined;
|
|
179
|
-
onPauseCapture?: React.ReactEventHandler<HTMLDivElement> | undefined;
|
|
180
|
-
onPlay?: React.ReactEventHandler<HTMLDivElement> | undefined;
|
|
181
|
-
onPlayCapture?: React.ReactEventHandler<HTMLDivElement> | undefined;
|
|
182
|
-
onPlaying?: React.ReactEventHandler<HTMLDivElement> | undefined;
|
|
183
|
-
onPlayingCapture?: React.ReactEventHandler<HTMLDivElement> | undefined;
|
|
184
|
-
onProgress?: React.ReactEventHandler<HTMLDivElement> | undefined;
|
|
185
|
-
onProgressCapture?: React.ReactEventHandler<HTMLDivElement> | undefined;
|
|
186
|
-
onRateChange?: React.ReactEventHandler<HTMLDivElement> | undefined;
|
|
187
|
-
onRateChangeCapture?: React.ReactEventHandler<HTMLDivElement> | undefined;
|
|
188
|
-
onSeeked?: React.ReactEventHandler<HTMLDivElement> | undefined;
|
|
189
|
-
onSeekedCapture?: React.ReactEventHandler<HTMLDivElement> | undefined;
|
|
190
|
-
onSeeking?: React.ReactEventHandler<HTMLDivElement> | undefined;
|
|
191
|
-
onSeekingCapture?: React.ReactEventHandler<HTMLDivElement> | undefined;
|
|
192
|
-
onStalled?: React.ReactEventHandler<HTMLDivElement> | undefined;
|
|
193
|
-
onStalledCapture?: React.ReactEventHandler<HTMLDivElement> | undefined;
|
|
194
|
-
onSuspend?: React.ReactEventHandler<HTMLDivElement> | undefined;
|
|
195
|
-
onSuspendCapture?: React.ReactEventHandler<HTMLDivElement> | undefined;
|
|
196
|
-
onTimeUpdate?: React.ReactEventHandler<HTMLDivElement> | undefined;
|
|
197
|
-
onTimeUpdateCapture?: React.ReactEventHandler<HTMLDivElement> | undefined;
|
|
198
|
-
onVolumeChange?: React.ReactEventHandler<HTMLDivElement> | undefined;
|
|
199
|
-
onVolumeChangeCapture?: React.ReactEventHandler<HTMLDivElement> | undefined;
|
|
200
|
-
onWaiting?: React.ReactEventHandler<HTMLDivElement> | undefined;
|
|
201
|
-
onWaitingCapture?: React.ReactEventHandler<HTMLDivElement> | undefined;
|
|
202
|
-
onAuxClick?: React.MouseEventHandler<HTMLDivElement> | undefined;
|
|
203
|
-
onAuxClickCapture?: React.MouseEventHandler<HTMLDivElement> | undefined;
|
|
204
|
-
onClick?: React.MouseEventHandler<HTMLDivElement> | undefined;
|
|
205
|
-
onClickCapture?: React.MouseEventHandler<HTMLDivElement> | undefined;
|
|
206
|
-
onContextMenu?: React.MouseEventHandler<HTMLDivElement> | undefined;
|
|
207
|
-
onContextMenuCapture?: React.MouseEventHandler<HTMLDivElement> | undefined;
|
|
208
|
-
onDoubleClick?: React.MouseEventHandler<HTMLDivElement> | undefined;
|
|
209
|
-
onDoubleClickCapture?: React.MouseEventHandler<HTMLDivElement> | undefined;
|
|
210
|
-
onDrag?: React.DragEventHandler<HTMLDivElement> | undefined;
|
|
211
|
-
onDragCapture?: React.DragEventHandler<HTMLDivElement> | undefined;
|
|
212
|
-
onDragEnd?: React.DragEventHandler<HTMLDivElement> | undefined;
|
|
213
|
-
onDragEndCapture?: React.DragEventHandler<HTMLDivElement> | undefined;
|
|
214
|
-
onDragEnter?: React.DragEventHandler<HTMLDivElement> | undefined;
|
|
215
|
-
onDragEnterCapture?: React.DragEventHandler<HTMLDivElement> | undefined;
|
|
216
|
-
onDragExit?: React.DragEventHandler<HTMLDivElement> | undefined;
|
|
217
|
-
onDragExitCapture?: React.DragEventHandler<HTMLDivElement> | undefined;
|
|
218
|
-
onDragLeave?: React.DragEventHandler<HTMLDivElement> | undefined;
|
|
219
|
-
onDragLeaveCapture?: React.DragEventHandler<HTMLDivElement> | undefined;
|
|
220
|
-
onDragOver?: React.DragEventHandler<HTMLDivElement> | undefined;
|
|
221
|
-
onDragOverCapture?: React.DragEventHandler<HTMLDivElement> | undefined;
|
|
222
|
-
onDragStart?: React.DragEventHandler<HTMLDivElement> | undefined;
|
|
223
|
-
onDragStartCapture?: React.DragEventHandler<HTMLDivElement> | undefined;
|
|
224
|
-
onDrop?: React.DragEventHandler<HTMLDivElement> | undefined;
|
|
225
|
-
onDropCapture?: React.DragEventHandler<HTMLDivElement> | undefined;
|
|
226
|
-
onMouseDown?: React.MouseEventHandler<HTMLDivElement> | undefined;
|
|
227
|
-
onMouseDownCapture?: React.MouseEventHandler<HTMLDivElement> | undefined;
|
|
228
|
-
onMouseEnter?: React.MouseEventHandler<HTMLDivElement> | undefined;
|
|
229
|
-
onMouseLeave?: React.MouseEventHandler<HTMLDivElement> | undefined;
|
|
230
|
-
onMouseMove?: React.MouseEventHandler<HTMLDivElement> | undefined;
|
|
231
|
-
onMouseMoveCapture?: React.MouseEventHandler<HTMLDivElement> | undefined;
|
|
232
|
-
onMouseOut?: React.MouseEventHandler<HTMLDivElement> | undefined;
|
|
233
|
-
onMouseOutCapture?: React.MouseEventHandler<HTMLDivElement> | undefined;
|
|
234
|
-
onMouseOver?: React.MouseEventHandler<HTMLDivElement> | undefined;
|
|
235
|
-
onMouseOverCapture?: React.MouseEventHandler<HTMLDivElement> | undefined;
|
|
236
|
-
onMouseUp?: React.MouseEventHandler<HTMLDivElement> | undefined;
|
|
237
|
-
onMouseUpCapture?: React.MouseEventHandler<HTMLDivElement> | undefined;
|
|
238
|
-
onSelect?: React.ReactEventHandler<HTMLDivElement> | undefined;
|
|
239
|
-
onSelectCapture?: React.ReactEventHandler<HTMLDivElement> | undefined;
|
|
240
|
-
onTouchCancel?: React.TouchEventHandler<HTMLDivElement> | undefined;
|
|
241
|
-
onTouchCancelCapture?: React.TouchEventHandler<HTMLDivElement> | undefined;
|
|
242
|
-
onTouchEnd?: React.TouchEventHandler<HTMLDivElement> | undefined;
|
|
243
|
-
onTouchEndCapture?: React.TouchEventHandler<HTMLDivElement> | undefined;
|
|
244
|
-
onTouchMove?: React.TouchEventHandler<HTMLDivElement> | undefined;
|
|
245
|
-
onTouchMoveCapture?: React.TouchEventHandler<HTMLDivElement> | undefined;
|
|
246
|
-
onTouchStart?: React.TouchEventHandler<HTMLDivElement> | undefined;
|
|
247
|
-
onTouchStartCapture?: React.TouchEventHandler<HTMLDivElement> | undefined;
|
|
248
|
-
onPointerDown?: React.PointerEventHandler<HTMLDivElement> | undefined;
|
|
249
|
-
onPointerDownCapture?: React.PointerEventHandler<HTMLDivElement> | undefined;
|
|
250
|
-
onPointerMove?: React.PointerEventHandler<HTMLDivElement> | undefined;
|
|
251
|
-
onPointerMoveCapture?: React.PointerEventHandler<HTMLDivElement> | undefined;
|
|
252
|
-
onPointerUp?: React.PointerEventHandler<HTMLDivElement> | undefined;
|
|
253
|
-
onPointerUpCapture?: React.PointerEventHandler<HTMLDivElement> | undefined;
|
|
254
|
-
onPointerCancel?: React.PointerEventHandler<HTMLDivElement> | undefined;
|
|
255
|
-
onPointerCancelCapture?: React.PointerEventHandler<HTMLDivElement> | undefined;
|
|
256
|
-
onPointerEnter?: React.PointerEventHandler<HTMLDivElement> | undefined;
|
|
257
|
-
onPointerEnterCapture?: React.PointerEventHandler<HTMLDivElement> | undefined;
|
|
258
|
-
onPointerLeave?: React.PointerEventHandler<HTMLDivElement> | undefined;
|
|
259
|
-
onPointerLeaveCapture?: React.PointerEventHandler<HTMLDivElement> | undefined;
|
|
260
|
-
onPointerOver?: React.PointerEventHandler<HTMLDivElement> | undefined;
|
|
261
|
-
onPointerOverCapture?: React.PointerEventHandler<HTMLDivElement> | undefined;
|
|
262
|
-
onPointerOut?: React.PointerEventHandler<HTMLDivElement> | undefined;
|
|
263
|
-
onPointerOutCapture?: React.PointerEventHandler<HTMLDivElement> | undefined;
|
|
264
|
-
onGotPointerCapture?: React.PointerEventHandler<HTMLDivElement> | undefined;
|
|
265
|
-
onGotPointerCaptureCapture?: React.PointerEventHandler<HTMLDivElement> | undefined;
|
|
266
|
-
onLostPointerCapture?: React.PointerEventHandler<HTMLDivElement> | undefined;
|
|
267
|
-
onLostPointerCaptureCapture?: React.PointerEventHandler<HTMLDivElement> | undefined;
|
|
268
|
-
onScroll?: React.UIEventHandler<HTMLDivElement> | undefined;
|
|
269
|
-
onScrollCapture?: React.UIEventHandler<HTMLDivElement> | undefined;
|
|
270
|
-
onWheel?: React.WheelEventHandler<HTMLDivElement> | undefined;
|
|
271
|
-
onWheelCapture?: React.WheelEventHandler<HTMLDivElement> | undefined;
|
|
272
|
-
onAnimationStart?: React.AnimationEventHandler<HTMLDivElement> | undefined;
|
|
273
|
-
onAnimationStartCapture?: React.AnimationEventHandler<HTMLDivElement> | undefined;
|
|
274
|
-
onAnimationEnd?: React.AnimationEventHandler<HTMLDivElement> | undefined;
|
|
275
|
-
onAnimationEndCapture?: React.AnimationEventHandler<HTMLDivElement> | undefined;
|
|
276
|
-
onAnimationIteration?: React.AnimationEventHandler<HTMLDivElement> | undefined;
|
|
277
|
-
onAnimationIterationCapture?: React.AnimationEventHandler<HTMLDivElement> | undefined;
|
|
278
|
-
onTransitionEnd?: React.TransitionEventHandler<HTMLDivElement> | undefined;
|
|
279
|
-
onTransitionEndCapture?: React.TransitionEventHandler<HTMLDivElement> | undefined;
|
|
280
|
-
}>;
|
|
281
|
-
ItemHeading: React.FC<react_accessible_accordion_dist_types_helpers_types.DivAttributes>;
|
|
282
|
-
ItemPanel: ({ className, region, id, ...rest }: react_accessible_accordion_dist_types_helpers_types.DivAttributes & {
|
|
283
|
-
region?: boolean | undefined;
|
|
284
|
-
className?: string | undefined;
|
|
285
|
-
}) => JSX.Element;
|
|
286
|
-
};
|
|
287
|
-
|
|
288
|
-
declare const InstallPwa: () => JSX.Element | null;
|
|
289
|
-
|
|
290
|
-
declare type ModalProps = ReactModal.Props;
|
|
291
|
-
declare const Modal: {
|
|
292
|
-
(props: ModalProps): JSX.Element;
|
|
293
|
-
setAppElement: typeof ReactModal.setAppElement;
|
|
294
|
-
};
|
|
295
|
-
|
|
296
|
-
declare const ToastContainer: (props: ToastContainerProps) => JSX.Element;
|
|
297
|
-
|
|
298
|
-
export { Accordion, AccordionProps, InstallPwa, Modal, ModalProps, ToastContainer };
|
package/dist/index.js
DELETED
|
@@ -1,251 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __create = Object.create;
|
|
3
|
-
var __defProp = Object.defineProperty;
|
|
4
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
5
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
|
-
var __getProtoOf = Object.getPrototypeOf;
|
|
7
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
8
|
-
var __export = (target, all) => {
|
|
9
|
-
for (var name in all)
|
|
10
|
-
__defProp(target, name, { get: all[name], enumerable: true });
|
|
11
|
-
};
|
|
12
|
-
var __copyProps = (to, from, except, desc) => {
|
|
13
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
14
|
-
for (let key of __getOwnPropNames(from))
|
|
15
|
-
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
16
|
-
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
17
|
-
}
|
|
18
|
-
return to;
|
|
19
|
-
};
|
|
20
|
-
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
21
|
-
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
22
|
-
mod
|
|
23
|
-
));
|
|
24
|
-
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
25
|
-
|
|
26
|
-
// src/index.ts
|
|
27
|
-
var src_exports = {};
|
|
28
|
-
__export(src_exports, {
|
|
29
|
-
Accordion: () => Accordion,
|
|
30
|
-
InstallPwa: () => InstallPwa,
|
|
31
|
-
Modal: () => Modal,
|
|
32
|
-
ToastContainer: () => ToastContainer,
|
|
33
|
-
ToastContainerProps: () => import_react_toastify.ToastContainerProps,
|
|
34
|
-
toast: () => import_react_toastify.toast
|
|
35
|
-
});
|
|
36
|
-
module.exports = __toCommonJS(src_exports);
|
|
37
|
-
|
|
38
|
-
// tsup.inject.js
|
|
39
|
-
var React = __toESM(require("react"));
|
|
40
|
-
|
|
41
|
-
// src/components/Accordion/Accordion.tsx
|
|
42
|
-
var React2 = __toESM(require("react"));
|
|
43
|
-
var import_react_accessible_accordion = require("react-accessible-accordion");
|
|
44
|
-
var import_ui = require("@ttoss/ui");
|
|
45
|
-
var import_css = require("@emotion/css");
|
|
46
|
-
var import_css2 = require("@theme-ui/css");
|
|
47
|
-
var import_jsx_runtime = require("react/jsx-runtime");
|
|
48
|
-
var Accordion = ({
|
|
49
|
-
children,
|
|
50
|
-
allowMultipleExpanded,
|
|
51
|
-
allowZeroExpanded,
|
|
52
|
-
preExpanded,
|
|
53
|
-
onChange,
|
|
54
|
-
...boxProps
|
|
55
|
-
}) => {
|
|
56
|
-
const { theme } = (0, import_ui.useTheme)();
|
|
57
|
-
const className = React2.useMemo(() => {
|
|
58
|
-
const styles = (0, import_css2.css)({
|
|
59
|
-
".accordion__item": {
|
|
60
|
-
marginBottom: 3
|
|
61
|
-
},
|
|
62
|
-
".accordion__heading": {
|
|
63
|
-
padding: 2,
|
|
64
|
-
border: "1px solid",
|
|
65
|
-
borderColor: "black"
|
|
66
|
-
},
|
|
67
|
-
".accordion__button": {},
|
|
68
|
-
".accordion__panel": {
|
|
69
|
-
padding: 2
|
|
70
|
-
}
|
|
71
|
-
})(theme);
|
|
72
|
-
return (0, import_css.css)(styles);
|
|
73
|
-
}, [theme]);
|
|
74
|
-
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_ui.Box, {
|
|
75
|
-
variant: "accordion",
|
|
76
|
-
className,
|
|
77
|
-
...boxProps,
|
|
78
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_react_accessible_accordion.Accordion, {
|
|
79
|
-
...{
|
|
80
|
-
allowMultipleExpanded,
|
|
81
|
-
allowZeroExpanded,
|
|
82
|
-
preExpanded,
|
|
83
|
-
onChange
|
|
84
|
-
},
|
|
85
|
-
children
|
|
86
|
-
})
|
|
87
|
-
});
|
|
88
|
-
};
|
|
89
|
-
Accordion.Item = import_react_accessible_accordion.AccordionItem;
|
|
90
|
-
Accordion.ItemButton = import_react_accessible_accordion.AccordionItemButton;
|
|
91
|
-
Accordion.ItemHeading = import_react_accessible_accordion.AccordionItemHeading;
|
|
92
|
-
Accordion.ItemPanel = import_react_accessible_accordion.AccordionItemPanel;
|
|
93
|
-
|
|
94
|
-
// src/components/InstallPwa/InstallPwa.tsx
|
|
95
|
-
var React3 = __toESM(require("react"));
|
|
96
|
-
|
|
97
|
-
// src/components/InstallPwa/InstallPwaUi.tsx
|
|
98
|
-
var import_ui2 = require("@ttoss/ui");
|
|
99
|
-
var import_jsx_runtime2 = require("react/jsx-runtime");
|
|
100
|
-
var InstallPwaUi = ({ onInstall }) => {
|
|
101
|
-
return /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(import_ui2.Flex, {
|
|
102
|
-
sx: {
|
|
103
|
-
position: "absolute",
|
|
104
|
-
bottom: 4,
|
|
105
|
-
width: "100%",
|
|
106
|
-
justifyContent: "center"
|
|
107
|
-
},
|
|
108
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)(import_ui2.Flex, {
|
|
109
|
-
sx: {
|
|
110
|
-
backgroundColor: "background",
|
|
111
|
-
justifyContent: "center",
|
|
112
|
-
alignItems: "center",
|
|
113
|
-
gap: 3,
|
|
114
|
-
width: "auto",
|
|
115
|
-
border: "1px solid",
|
|
116
|
-
borderColor: "muted",
|
|
117
|
-
borderRadius: 1,
|
|
118
|
-
padding: 4
|
|
119
|
-
},
|
|
120
|
-
children: [
|
|
121
|
-
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)(import_ui2.Text, {
|
|
122
|
-
children: "Deseja instalar o nosso aplicativo?"
|
|
123
|
-
}),
|
|
124
|
-
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)(import_ui2.Button, {
|
|
125
|
-
onClick: onInstall,
|
|
126
|
-
children: "Instalar"
|
|
127
|
-
})
|
|
128
|
-
]
|
|
129
|
-
})
|
|
130
|
-
});
|
|
131
|
-
};
|
|
132
|
-
|
|
133
|
-
// src/components/InstallPwa/InstallPwa.tsx
|
|
134
|
-
var import_jsx_runtime3 = require("react/jsx-runtime");
|
|
135
|
-
var InstallPwa = () => {
|
|
136
|
-
const [supportsPwa, setSupportsPwa] = React3.useState(false);
|
|
137
|
-
const [promptInstall, setPromptInstall] = React3.useState(null);
|
|
138
|
-
React3.useEffect(() => {
|
|
139
|
-
const handler = (e) => {
|
|
140
|
-
e.preventDefault();
|
|
141
|
-
setSupportsPwa(true);
|
|
142
|
-
setPromptInstall(e);
|
|
143
|
-
};
|
|
144
|
-
window.addEventListener("beforeinstallprompt", handler);
|
|
145
|
-
return () => window.removeEventListener("transitionend", handler);
|
|
146
|
-
}, []);
|
|
147
|
-
const onInstall = (e) => {
|
|
148
|
-
e.preventDefault();
|
|
149
|
-
if (!promptInstall) {
|
|
150
|
-
return;
|
|
151
|
-
}
|
|
152
|
-
promptInstall.prompt();
|
|
153
|
-
};
|
|
154
|
-
if (!supportsPwa) {
|
|
155
|
-
return null;
|
|
156
|
-
}
|
|
157
|
-
return /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(InstallPwaUi, {
|
|
158
|
-
onInstall
|
|
159
|
-
});
|
|
160
|
-
};
|
|
161
|
-
|
|
162
|
-
// src/components/Modal/Modal.tsx
|
|
163
|
-
var import_ui3 = require("@ttoss/ui");
|
|
164
|
-
var import_react_modal = __toESM(require("react-modal"));
|
|
165
|
-
var import_jsx_runtime4 = require("react/jsx-runtime");
|
|
166
|
-
import_react_modal.default.defaultStyles = {
|
|
167
|
-
overlay: {},
|
|
168
|
-
content: {}
|
|
169
|
-
};
|
|
170
|
-
var Modal = (props) => {
|
|
171
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _i;
|
|
172
|
-
const { theme } = (0, import_ui3.useTheme)();
|
|
173
|
-
const padding = (0, import_ui3.useResponsiveValue)([
|
|
174
|
-
(_a = theme.space) == null ? void 0 : _a[2],
|
|
175
|
-
(_b = theme.space) == null ? void 0 : _b[3],
|
|
176
|
-
(_c = theme.space) == null ? void 0 : _c[4]
|
|
177
|
-
]) || 0;
|
|
178
|
-
const style = {
|
|
179
|
-
overlay: {
|
|
180
|
-
position: "fixed",
|
|
181
|
-
top: 0,
|
|
182
|
-
left: 0,
|
|
183
|
-
right: 0,
|
|
184
|
-
bottom: 0,
|
|
185
|
-
backgroundColor: "rgba(255, 255, 255, 0.5)",
|
|
186
|
-
display: "flex",
|
|
187
|
-
justifyContent: "center",
|
|
188
|
-
alignItems: "center",
|
|
189
|
-
padding,
|
|
190
|
-
...(_d = props.style) == null ? void 0 : _d.overlay
|
|
191
|
-
},
|
|
192
|
-
content: {
|
|
193
|
-
backgroundColor: ((_f = (_e = theme.rawColors) == null ? void 0 : _e.background) == null ? void 0 : _f.toString()) || "#fff",
|
|
194
|
-
padding,
|
|
195
|
-
WebkitOverflowScrolling: "touch",
|
|
196
|
-
overflow: "auto",
|
|
197
|
-
position: "relative",
|
|
198
|
-
top: "0px",
|
|
199
|
-
left: "0px",
|
|
200
|
-
right: "0px",
|
|
201
|
-
bottom: "0px",
|
|
202
|
-
border: "2px solid",
|
|
203
|
-
borderColor: ((_h = (_g = theme.rawColors) == null ? void 0 : _g.muted) == null ? void 0 : _h.toString()) || "#fff",
|
|
204
|
-
display: "flex",
|
|
205
|
-
flexDirection: "column",
|
|
206
|
-
alignItems: "center",
|
|
207
|
-
...(_i = props.style) == null ? void 0 : _i.content
|
|
208
|
-
}
|
|
209
|
-
};
|
|
210
|
-
return /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(import_react_modal.default, {
|
|
211
|
-
...props,
|
|
212
|
-
style
|
|
213
|
-
});
|
|
214
|
-
};
|
|
215
|
-
Modal.setAppElement = import_react_modal.default.setAppElement;
|
|
216
|
-
|
|
217
|
-
// src/components/Toast/Toast.tsx
|
|
218
|
-
var React4 = __toESM(require("react"));
|
|
219
|
-
var import_ui4 = require("@ttoss/ui");
|
|
220
|
-
var import_react_toastify = require("react-toastify");
|
|
221
|
-
var import_inject_style = require("react-toastify/dist/inject-style");
|
|
222
|
-
var import_jsx_runtime5 = require("react/jsx-runtime");
|
|
223
|
-
var ToastContainer = (props) => {
|
|
224
|
-
React4.useEffect(() => {
|
|
225
|
-
(0, import_inject_style.injectStyle)();
|
|
226
|
-
}, []);
|
|
227
|
-
return /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(import_ui4.Box, {
|
|
228
|
-
sx: ({ colors, fonts }) => ({
|
|
229
|
-
"--toastify-color-light": "#fff",
|
|
230
|
-
"--toastify-color-dark": "#121212",
|
|
231
|
-
"--toastify-color-info": (colors == null ? void 0 : colors.info) || "#3498db",
|
|
232
|
-
"--toastify-color-success": (colors == null ? void 0 : colors.success) || "#07bc0c",
|
|
233
|
-
"--toastify-color-warning": "#f1c40f",
|
|
234
|
-
"--toastify-color-error": "#e74c3c",
|
|
235
|
-
"--toastify-color-progress-light": `linear-gradient(to right, ${colors == null ? void 0 : colors.primary}, ${colors == null ? void 0 : colors.secondary})`,
|
|
236
|
-
"--toastify-font-family": fonts.body
|
|
237
|
-
}),
|
|
238
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(import_react_toastify.ToastContainer, {
|
|
239
|
-
...props
|
|
240
|
-
})
|
|
241
|
-
});
|
|
242
|
-
};
|
|
243
|
-
// Annotate the CommonJS export names for ESM import in node:
|
|
244
|
-
0 && (module.exports = {
|
|
245
|
-
Accordion,
|
|
246
|
-
InstallPwa,
|
|
247
|
-
Modal,
|
|
248
|
-
ToastContainer,
|
|
249
|
-
ToastContainerProps,
|
|
250
|
-
toast
|
|
251
|
-
});
|