@ttoss/components 1.21.11 → 1.21.12

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