@ttoss/components 1.21.4 → 1.21.6

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/esm/index.js CHANGED
@@ -1,4 +1,4 @@
1
- "use strict";
1
+ /** Powered by @ttoss/config. https://ttoss.dev/docs/modules/packages/config/ */
2
2
 
3
3
  // tsup.inject.js
4
4
  import * as React from "react";
@@ -15,6 +15,7 @@ import {
15
15
  import { Box, useTheme } from "@ttoss/ui";
16
16
  import { css as createClassName } from "@emotion/css";
17
17
  import { css as transformStyleObject } from "@theme-ui/css";
18
+ import { jsx } from "react/jsx-runtime";
18
19
  var Accordion = ({
19
20
  children,
20
21
  allowMultipleExpanded,
@@ -41,18 +42,20 @@ var Accordion = ({
41
42
  })(theme);
42
43
  return createClassName(styles);
43
44
  }, [theme]);
44
- return /* @__PURE__ */ React2.createElement(Box, {
45
+ return /* @__PURE__ */ jsx(Box, {
45
46
  variant: "accordion",
46
47
  className,
47
- ...boxProps
48
- }, /* @__PURE__ */ React2.createElement(ReactAccessibleAccordion, {
49
- ...{
50
- allowMultipleExpanded,
51
- allowZeroExpanded,
52
- preExpanded,
53
- onChange
54
- }
55
- }, children));
48
+ ...boxProps,
49
+ children: /* @__PURE__ */ jsx(ReactAccessibleAccordion, {
50
+ ...{
51
+ allowMultipleExpanded,
52
+ allowZeroExpanded,
53
+ preExpanded,
54
+ onChange
55
+ },
56
+ children
57
+ })
58
+ });
56
59
  };
57
60
  Accordion.Item = AccordionItem;
58
61
  Accordion.ItemButton = AccordionItemButton;
@@ -64,32 +67,42 @@ import * as React3 from "react";
64
67
 
65
68
  // src/components/InstallPwa/InstallPwaUi.tsx
66
69
  import { Button, Flex, Text } from "@ttoss/ui";
70
+ import { jsx as jsx2, jsxs } from "react/jsx-runtime";
67
71
  var InstallPwaUi = ({ onInstall }) => {
68
- return /* @__PURE__ */ React.createElement(Flex, {
72
+ return /* @__PURE__ */ jsx2(Flex, {
69
73
  sx: {
70
74
  position: "absolute",
71
75
  bottom: 4,
72
76
  width: "100%",
73
77
  justifyContent: "center"
74
- }
75
- }, /* @__PURE__ */ React.createElement(Flex, {
76
- sx: {
77
- backgroundColor: "background",
78
- justifyContent: "center",
79
- alignItems: "center",
80
- gap: 3,
81
- width: "auto",
82
- border: "1px solid",
83
- borderColor: "muted",
84
- borderRadius: 1,
85
- padding: 4
86
- }
87
- }, /* @__PURE__ */ React.createElement(Text, null, "Deseja instalar o nosso aplicativo?"), /* @__PURE__ */ React.createElement(Button, {
88
- onClick: onInstall
89
- }, "Instalar")));
78
+ },
79
+ children: /* @__PURE__ */ jsxs(Flex, {
80
+ sx: {
81
+ backgroundColor: "background",
82
+ justifyContent: "center",
83
+ alignItems: "center",
84
+ gap: 3,
85
+ width: "auto",
86
+ border: "1px solid",
87
+ borderColor: "muted",
88
+ borderRadius: 1,
89
+ padding: 4
90
+ },
91
+ children: [
92
+ /* @__PURE__ */ jsx2(Text, {
93
+ children: "Deseja instalar o nosso aplicativo?"
94
+ }),
95
+ /* @__PURE__ */ jsx2(Button, {
96
+ onClick: onInstall,
97
+ children: "Instalar"
98
+ })
99
+ ]
100
+ })
101
+ });
90
102
  };
91
103
 
92
104
  // src/components/InstallPwa/InstallPwa.tsx
105
+ import { jsx as jsx3 } from "react/jsx-runtime";
93
106
  var InstallPwa = () => {
94
107
  const [supportsPwa, setSupportsPwa] = React3.useState(false);
95
108
  const [promptInstall, setPromptInstall] = React3.useState(null);
@@ -112,7 +125,7 @@ var InstallPwa = () => {
112
125
  if (!supportsPwa) {
113
126
  return null;
114
127
  }
115
- return /* @__PURE__ */ React3.createElement(InstallPwaUi, {
128
+ return /* @__PURE__ */ jsx3(InstallPwaUi, {
116
129
  onInstall
117
130
  });
118
131
  };
@@ -120,6 +133,7 @@ var InstallPwa = () => {
120
133
  // src/components/Modal/Modal.tsx
121
134
  import { useResponsiveValue, useTheme as useTheme2 } from "@ttoss/ui";
122
135
  import ReactModal from "react-modal";
136
+ import { jsx as jsx4 } from "react/jsx-runtime";
123
137
  ReactModal.defaultStyles = {
124
138
  overlay: {},
125
139
  content: {}
@@ -164,7 +178,7 @@ var Modal = (props) => {
164
178
  ...(_i = props.style) == null ? void 0 : _i.content
165
179
  }
166
180
  };
167
- return /* @__PURE__ */ React.createElement(ReactModal, {
181
+ return /* @__PURE__ */ jsx4(ReactModal, {
168
182
  ...props,
169
183
  style
170
184
  });
@@ -180,11 +194,12 @@ import {
180
194
  toast
181
195
  } from "react-toastify";
182
196
  import { injectStyle } from "react-toastify/dist/inject-style";
197
+ import { jsx as jsx5 } from "react/jsx-runtime";
183
198
  var ToastContainer = (props) => {
184
199
  React4.useEffect(() => {
185
200
  injectStyle();
186
201
  }, []);
187
- return /* @__PURE__ */ React4.createElement(Box2, {
202
+ return /* @__PURE__ */ jsx5(Box2, {
188
203
  sx: ({ colors, fonts }) => ({
189
204
  "--toastify-color-light": "#fff",
190
205
  "--toastify-color-dark": "#121212",
@@ -194,10 +209,11 @@ var ToastContainer = (props) => {
194
209
  "--toastify-color-error": "#e74c3c",
195
210
  "--toastify-color-progress-light": `linear-gradient(to right, ${colors == null ? void 0 : colors.primary}, ${colors == null ? void 0 : colors.secondary})`,
196
211
  "--toastify-font-family": fonts.body
212
+ }),
213
+ children: /* @__PURE__ */ jsx5(ReactToastifyToastContainer, {
214
+ ...props
197
215
  })
198
- }, /* @__PURE__ */ React4.createElement(ReactToastifyToastContainer, {
199
- ...props
200
- }));
216
+ });
201
217
  };
202
218
  export {
203
219
  Accordion,
package/dist/index.js CHANGED
@@ -1,3 +1,4 @@
1
+ /** Powered by @ttoss/config. https://ttoss.dev/docs/modules/packages/config/ */
1
2
  "use strict";
2
3
  var __create = Object.create;
3
4
  var __defProp = Object.defineProperty;
@@ -17,7 +18,10 @@ var __copyProps = (to, from, except, desc) => {
17
18
  }
18
19
  return to;
19
20
  };
20
- var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target, mod));
21
+ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
22
+ isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
23
+ mod
24
+ ));
21
25
  var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
22
26
 
23
27
  // src/index.ts
@@ -41,6 +45,7 @@ var import_react_accessible_accordion = require("react-accessible-accordion");
41
45
  var import_ui = require("@ttoss/ui");
42
46
  var import_css = require("@emotion/css");
43
47
  var import_css2 = require("@theme-ui/css");
48
+ var import_jsx_runtime = require("react/jsx-runtime");
44
49
  var Accordion = ({
45
50
  children,
46
51
  allowMultipleExpanded,
@@ -67,18 +72,20 @@ var Accordion = ({
67
72
  })(theme);
68
73
  return (0, import_css.css)(styles);
69
74
  }, [theme]);
70
- return /* @__PURE__ */ React2.createElement(import_ui.Box, {
75
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_ui.Box, {
71
76
  variant: "accordion",
72
77
  className,
73
- ...boxProps
74
- }, /* @__PURE__ */ React2.createElement(import_react_accessible_accordion.Accordion, {
75
- ...{
76
- allowMultipleExpanded,
77
- allowZeroExpanded,
78
- preExpanded,
79
- onChange
80
- }
81
- }, children));
78
+ ...boxProps,
79
+ children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_react_accessible_accordion.Accordion, {
80
+ ...{
81
+ allowMultipleExpanded,
82
+ allowZeroExpanded,
83
+ preExpanded,
84
+ onChange
85
+ },
86
+ children
87
+ })
88
+ });
82
89
  };
83
90
  Accordion.Item = import_react_accessible_accordion.AccordionItem;
84
91
  Accordion.ItemButton = import_react_accessible_accordion.AccordionItemButton;
@@ -90,32 +97,42 @@ var React3 = __toESM(require("react"));
90
97
 
91
98
  // src/components/InstallPwa/InstallPwaUi.tsx
92
99
  var import_ui2 = require("@ttoss/ui");
100
+ var import_jsx_runtime2 = require("react/jsx-runtime");
93
101
  var InstallPwaUi = ({ onInstall }) => {
94
- return /* @__PURE__ */ React.createElement(import_ui2.Flex, {
102
+ return /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(import_ui2.Flex, {
95
103
  sx: {
96
104
  position: "absolute",
97
105
  bottom: 4,
98
106
  width: "100%",
99
107
  justifyContent: "center"
100
- }
101
- }, /* @__PURE__ */ React.createElement(import_ui2.Flex, {
102
- sx: {
103
- backgroundColor: "background",
104
- justifyContent: "center",
105
- alignItems: "center",
106
- gap: 3,
107
- width: "auto",
108
- border: "1px solid",
109
- borderColor: "muted",
110
- borderRadius: 1,
111
- padding: 4
112
- }
113
- }, /* @__PURE__ */ React.createElement(import_ui2.Text, null, "Deseja instalar o nosso aplicativo?"), /* @__PURE__ */ React.createElement(import_ui2.Button, {
114
- onClick: onInstall
115
- }, "Instalar")));
108
+ },
109
+ children: /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)(import_ui2.Flex, {
110
+ sx: {
111
+ backgroundColor: "background",
112
+ justifyContent: "center",
113
+ alignItems: "center",
114
+ gap: 3,
115
+ width: "auto",
116
+ border: "1px solid",
117
+ borderColor: "muted",
118
+ borderRadius: 1,
119
+ padding: 4
120
+ },
121
+ children: [
122
+ /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(import_ui2.Text, {
123
+ children: "Deseja instalar o nosso aplicativo?"
124
+ }),
125
+ /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(import_ui2.Button, {
126
+ onClick: onInstall,
127
+ children: "Instalar"
128
+ })
129
+ ]
130
+ })
131
+ });
116
132
  };
117
133
 
118
134
  // src/components/InstallPwa/InstallPwa.tsx
135
+ var import_jsx_runtime3 = require("react/jsx-runtime");
119
136
  var InstallPwa = () => {
120
137
  const [supportsPwa, setSupportsPwa] = React3.useState(false);
121
138
  const [promptInstall, setPromptInstall] = React3.useState(null);
@@ -138,7 +155,7 @@ var InstallPwa = () => {
138
155
  if (!supportsPwa) {
139
156
  return null;
140
157
  }
141
- return /* @__PURE__ */ React3.createElement(InstallPwaUi, {
158
+ return /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(InstallPwaUi, {
142
159
  onInstall
143
160
  });
144
161
  };
@@ -146,6 +163,7 @@ var InstallPwa = () => {
146
163
  // src/components/Modal/Modal.tsx
147
164
  var import_ui3 = require("@ttoss/ui");
148
165
  var import_react_modal = __toESM(require("react-modal"));
166
+ var import_jsx_runtime4 = require("react/jsx-runtime");
149
167
  import_react_modal.default.defaultStyles = {
150
168
  overlay: {},
151
169
  content: {}
@@ -190,7 +208,7 @@ var Modal = (props) => {
190
208
  ...(_i = props.style) == null ? void 0 : _i.content
191
209
  }
192
210
  };
193
- return /* @__PURE__ */ React.createElement(import_react_modal.default, {
211
+ return /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(import_react_modal.default, {
194
212
  ...props,
195
213
  style
196
214
  });
@@ -202,11 +220,12 @@ var React4 = __toESM(require("react"));
202
220
  var import_ui4 = require("@ttoss/ui");
203
221
  var import_react_toastify = require("react-toastify");
204
222
  var import_inject_style = require("react-toastify/dist/inject-style");
223
+ var import_jsx_runtime5 = require("react/jsx-runtime");
205
224
  var ToastContainer = (props) => {
206
225
  React4.useEffect(() => {
207
226
  (0, import_inject_style.injectStyle)();
208
227
  }, []);
209
- return /* @__PURE__ */ React4.createElement(import_ui4.Box, {
228
+ return /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(import_ui4.Box, {
210
229
  sx: ({ colors, fonts }) => ({
211
230
  "--toastify-color-light": "#fff",
212
231
  "--toastify-color-dark": "#121212",
@@ -216,10 +235,11 @@ var ToastContainer = (props) => {
216
235
  "--toastify-color-error": "#e74c3c",
217
236
  "--toastify-color-progress-light": `linear-gradient(to right, ${colors == null ? void 0 : colors.primary}, ${colors == null ? void 0 : colors.secondary})`,
218
237
  "--toastify-font-family": fonts.body
238
+ }),
239
+ children: /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(import_react_toastify.ToastContainer, {
240
+ ...props
219
241
  })
220
- }, /* @__PURE__ */ React4.createElement(import_react_toastify.ToastContainer, {
221
- ...props
222
- }));
242
+ });
223
243
  };
224
244
  // Annotate the CommonJS export names for ESM import in node:
225
245
  0 && (module.exports = {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ttoss/components",
3
- "version": "1.21.4",
3
+ "version": "1.21.6",
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.1",
36
- "@ttoss/test-utils": "^1.16.8",
37
- "@ttoss/ui": "^1.20.1",
35
+ "@ttoss/config": "^1.18.2",
36
+ "@ttoss/test-utils": "^1.16.9",
37
+ "@ttoss/ui": "^1.20.3",
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": "5624791e118681b8ecbe2372bbc61806442df71b"
48
+ "gitHead": "4548135614dd048140cece482703445cf436f39f"
49
49
  }