@ttoss/components 1.21.8 → 1.21.9

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