@ttoss/components 1.24.3 → 1.24.5

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,10 +1,7 @@
1
1
  /** Powered by @ttoss/config. https://ttoss.dev/docs/modules/packages/config/ */
2
2
 
3
- // tsup.inject.js
4
- import * as React from "react";
5
-
6
3
  // src/components/Accordion/Accordion.tsx
7
- import * as React2 from "react";
4
+ import * as React from "react";
8
5
  import {
9
6
  AccordionItem,
10
7
  AccordionItemButton,
@@ -25,7 +22,7 @@ var Accordion = ({
25
22
  ...boxProps
26
23
  }) => {
27
24
  const { theme } = useTheme();
28
- const className = React2.useMemo(() => {
25
+ const className = React.useMemo(() => {
29
26
  const styles = transformStyleObject({
30
27
  ".accordion__item": {
31
28
  marginBottom: 3
@@ -42,11 +39,9 @@ var Accordion = ({
42
39
  })(theme);
43
40
  return createClassName(styles);
44
41
  }, [theme]);
45
- return /* @__PURE__ */ jsx(Box, {
46
- variant: "accordion",
47
- className,
48
- ...boxProps,
49
- children: /* @__PURE__ */ jsx(ReactAccessibleAccordion, {
42
+ return /* @__PURE__ */ jsx(Box, { variant: "accordion", className, ...boxProps, children: /* @__PURE__ */ jsx(
43
+ ReactAccessibleAccordion,
44
+ {
50
45
  ...{
51
46
  allowMultipleExpanded,
52
47
  allowZeroExpanded,
@@ -54,8 +49,8 @@ var Accordion = ({
54
49
  onChange
55
50
  },
56
51
  children
57
- })
58
- });
52
+ }
53
+ ) });
59
54
  };
60
55
  Accordion.Item = AccordionItem;
61
56
  Accordion.ItemButton = AccordionItemButton;
@@ -69,36 +64,37 @@ import * as React3 from "react";
69
64
  import { Button, Flex, Text } from "@ttoss/ui";
70
65
  import { jsx as jsx2, jsxs } from "react/jsx-runtime";
71
66
  var InstallPwaUi = ({ onInstall }) => {
72
- return /* @__PURE__ */ jsx2(Flex, {
73
- sx: {
74
- position: "absolute",
75
- bottom: 4,
76
- width: "100%",
77
- justifyContent: "center"
78
- },
79
- children: /* @__PURE__ */ jsxs(Flex, {
67
+ return /* @__PURE__ */ jsx2(
68
+ Flex,
69
+ {
80
70
  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
71
+ position: "absolute",
72
+ bottom: 4,
73
+ width: "100%",
74
+ justifyContent: "center"
90
75
  },
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
- });
76
+ children: /* @__PURE__ */ jsxs(
77
+ Flex,
78
+ {
79
+ sx: {
80
+ backgroundColor: "background",
81
+ justifyContent: "center",
82
+ alignItems: "center",
83
+ gap: 3,
84
+ width: "auto",
85
+ border: "1px solid",
86
+ borderColor: "muted",
87
+ borderRadius: 1,
88
+ padding: 4
89
+ },
90
+ children: [
91
+ /* @__PURE__ */ jsx2(Text, { children: "Deseja instalar o nosso aplicativo?" }),
92
+ /* @__PURE__ */ jsx2(Button, { onClick: onInstall, children: "Instalar" })
93
+ ]
94
+ }
95
+ )
96
+ }
97
+ );
102
98
  };
103
99
 
104
100
  // src/components/InstallPwa/InstallPwa.tsx
@@ -125,9 +121,7 @@ var InstallPwa = () => {
125
121
  if (!supportsPwa) {
126
122
  return null;
127
123
  }
128
- return /* @__PURE__ */ jsx3(InstallPwaUi, {
129
- onInstall
130
- });
124
+ return /* @__PURE__ */ jsx3(InstallPwaUi, { onInstall });
131
125
  };
132
126
 
133
127
  // src/components/Modal/Modal.tsx
@@ -177,10 +171,7 @@ var Modal = (props) => {
177
171
  ...props.style?.content
178
172
  }
179
173
  };
180
- return /* @__PURE__ */ jsx4(ReactModal, {
181
- ...props,
182
- style
183
- });
174
+ return /* @__PURE__ */ jsx4(ReactModal, { ...props, style });
184
175
  };
185
176
  Modal.setAppElement = ReactModal.setAppElement;
186
177
 
@@ -197,21 +188,22 @@ var ToastContainer = (props) => {
197
188
  React4.useEffect(() => {
198
189
  injectStyle();
199
190
  }, []);
200
- return /* @__PURE__ */ jsx5(Box2, {
201
- sx: ({ colors, fonts }) => ({
202
- "--toastify-color-light": "#fff",
203
- "--toastify-color-dark": "#121212",
204
- "--toastify-color-info": colors?.info || "#3498db",
205
- "--toastify-color-success": colors?.success || "#07bc0c",
206
- "--toastify-color-warning": "#f1c40f",
207
- "--toastify-color-error": "#e74c3c",
208
- "--toastify-color-progress-light": `linear-gradient(to right, ${colors?.primary}, ${colors?.secondary})`,
209
- "--toastify-font-family": fonts.body
210
- }),
211
- children: /* @__PURE__ */ jsx5(ReactToastifyToastContainer, {
212
- ...props
213
- })
214
- });
191
+ return /* @__PURE__ */ jsx5(
192
+ Box2,
193
+ {
194
+ sx: ({ colors, fonts }) => ({
195
+ "--toastify-color-light": "#fff",
196
+ "--toastify-color-dark": "#121212",
197
+ "--toastify-color-info": colors?.info || "#3498db",
198
+ "--toastify-color-success": colors?.success || "#07bc0c",
199
+ "--toastify-color-warning": "#f1c40f",
200
+ "--toastify-color-error": "#e74c3c",
201
+ "--toastify-color-progress-light": `linear-gradient(to right, ${colors?.primary}, ${colors?.secondary})`,
202
+ "--toastify-font-family": fonts.body
203
+ }),
204
+ children: /* @__PURE__ */ jsx5(ReactToastifyToastContainer, { ...props })
205
+ }
206
+ );
215
207
  };
216
208
  export {
217
209
  Accordion,
package/dist/index.d.ts CHANGED
@@ -7,7 +7,7 @@ import ReactModal from 'react-modal';
7
7
  import { ToastContainerProps } from 'react-toastify';
8
8
  export { ToastContainerProps, toast } from 'react-toastify';
9
9
 
10
- declare type AccordionProps = BoxProps & {
10
+ type AccordionProps = BoxProps & {
11
11
  allowMultipleExpanded?: boolean;
12
12
  allowZeroExpanded?: boolean;
13
13
  preExpanded?: string[];
@@ -19,7 +19,7 @@ declare type AccordionProps = BoxProps & {
19
19
  declare const Accordion: {
20
20
  ({ children, allowMultipleExpanded, allowZeroExpanded, preExpanded, onChange, ...boxProps }: AccordionProps): JSX.Element;
21
21
  Item: {
22
- ({ uuid, dangerouslySetExpanded, className, activeClassName, ...rest }: react_accessible_accordion_dist_types_helpers_types.DivAttributes & {
22
+ ({ uuid: customUuid, dangerouslySetExpanded, className, activeClassName, ...rest }: react_accessible_accordion_dist_types_helpers_types.DivAttributes & {
23
23
  uuid?: react_accessible_accordion_dist_types_components_ItemContext.ID | undefined;
24
24
  activeClassName?: string | undefined;
25
25
  dangerouslySetExpanded?: boolean | undefined;
@@ -37,12 +37,13 @@ declare const Accordion: {
37
37
  suppressHydrationWarning?: boolean | undefined;
38
38
  accessKey?: string | undefined;
39
39
  className?: string | undefined;
40
- contentEditable?: (boolean | "true" | "false") | "inherit" | undefined;
40
+ contentEditable?: "inherit" | (boolean | "true" | "false") | undefined;
41
41
  contextMenu?: string | undefined;
42
42
  dir?: string | undefined;
43
43
  draggable?: (boolean | "true" | "false") | undefined;
44
44
  hidden?: boolean | undefined;
45
45
  lang?: string | undefined;
46
+ nonce?: string | undefined;
46
47
  placeholder?: string | undefined;
47
48
  spellCheck?: (boolean | "true" | "false") | undefined;
48
49
  translate?: "yes" | "no" | undefined;
@@ -71,7 +72,7 @@ declare const Accordion: {
71
72
  is?: string | undefined;
72
73
  'aria-activedescendant'?: string | undefined;
73
74
  'aria-atomic'?: (boolean | "true" | "false") | undefined;
74
- 'aria-autocomplete'?: "list" | "none" | "both" | "inline" | undefined;
75
+ 'aria-autocomplete'?: "none" | "list" | "inline" | "both" | undefined;
75
76
  'aria-busy'?: (boolean | "true" | "false") | undefined;
76
77
  'aria-checked'?: boolean | "true" | "false" | "mixed" | undefined;
77
78
  'aria-colcount'?: number | undefined;
@@ -80,11 +81,11 @@ declare const Accordion: {
80
81
  'aria-current'?: boolean | "time" | "true" | "false" | "page" | "step" | "location" | "date" | undefined;
81
82
  'aria-describedby'?: string | undefined;
82
83
  'aria-details'?: string | undefined;
83
- 'aria-dropeffect'?: "link" | "none" | "copy" | "move" | "execute" | "popup" | undefined;
84
+ 'aria-dropeffect'?: "link" | "none" | "copy" | "execute" | "move" | "popup" | undefined;
84
85
  'aria-errormessage'?: string | undefined;
85
86
  'aria-flowto'?: string | undefined;
86
87
  'aria-grabbed'?: (boolean | "true" | "false") | undefined;
87
- 'aria-haspopup'?: boolean | "dialog" | "menu" | "true" | "false" | "grid" | "listbox" | "tree" | undefined;
88
+ 'aria-haspopup'?: boolean | "dialog" | "menu" | "grid" | "true" | "false" | "listbox" | "tree" | undefined;
88
89
  'aria-hidden'?: (boolean | "true" | "false") | undefined;
89
90
  'aria-invalid'?: boolean | "true" | "false" | "grammar" | "spelling" | undefined;
90
91
  'aria-keyshortcuts'?: string | undefined;
@@ -185,6 +186,8 @@ declare const Accordion: {
185
186
  onProgressCapture?: React.ReactEventHandler<HTMLDivElement> | undefined;
186
187
  onRateChange?: React.ReactEventHandler<HTMLDivElement> | undefined;
187
188
  onRateChangeCapture?: React.ReactEventHandler<HTMLDivElement> | undefined;
189
+ onResize?: React.ReactEventHandler<HTMLDivElement> | undefined;
190
+ onResizeCapture?: React.ReactEventHandler<HTMLDivElement> | undefined;
188
191
  onSeeked?: React.ReactEventHandler<HTMLDivElement> | undefined;
189
192
  onSeekedCapture?: React.ReactEventHandler<HTMLDivElement> | undefined;
190
193
  onSeeking?: React.ReactEventHandler<HTMLDivElement> | undefined;
@@ -287,7 +290,7 @@ declare const Accordion: {
287
290
 
288
291
  declare const InstallPwa: () => JSX.Element | null;
289
292
 
290
- declare type ModalProps = ReactModal.Props;
293
+ type ModalProps = ReactModal.Props;
291
294
  declare const Modal: {
292
295
  (props: ModalProps): JSX.Element;
293
296
  setAppElement: typeof ReactModal.setAppElement;
package/dist/index.js CHANGED
@@ -35,11 +35,8 @@ __export(src_exports, {
35
35
  });
36
36
  module.exports = __toCommonJS(src_exports);
37
37
 
38
- // tsup.inject.js
39
- var React = __toESM(require("react"));
40
-
41
38
  // src/components/Accordion/Accordion.tsx
42
- var React2 = __toESM(require("react"));
39
+ var React = __toESM(require("react"));
43
40
  var import_react_accessible_accordion = require("react-accessible-accordion");
44
41
  var import_ui = require("@ttoss/ui");
45
42
  var import_css = require("@emotion/css");
@@ -54,7 +51,7 @@ var Accordion = ({
54
51
  ...boxProps
55
52
  }) => {
56
53
  const { theme } = (0, import_ui.useTheme)();
57
- const className = React2.useMemo(() => {
54
+ const className = React.useMemo(() => {
58
55
  const styles = (0, import_css2.css)({
59
56
  ".accordion__item": {
60
57
  marginBottom: 3
@@ -71,11 +68,9 @@ var Accordion = ({
71
68
  })(theme);
72
69
  return (0, import_css.css)(styles);
73
70
  }, [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, {
71
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_ui.Box, { variant: "accordion", className, ...boxProps, children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
72
+ import_react_accessible_accordion.Accordion,
73
+ {
79
74
  ...{
80
75
  allowMultipleExpanded,
81
76
  allowZeroExpanded,
@@ -83,8 +78,8 @@ var Accordion = ({
83
78
  onChange
84
79
  },
85
80
  children
86
- })
87
- });
81
+ }
82
+ ) });
88
83
  };
89
84
  Accordion.Item = import_react_accessible_accordion.AccordionItem;
90
85
  Accordion.ItemButton = import_react_accessible_accordion.AccordionItemButton;
@@ -98,36 +93,37 @@ var React3 = __toESM(require("react"));
98
93
  var import_ui2 = require("@ttoss/ui");
99
94
  var import_jsx_runtime2 = require("react/jsx-runtime");
100
95
  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, {
96
+ return /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
97
+ import_ui2.Flex,
98
+ {
109
99
  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
100
+ position: "absolute",
101
+ bottom: 4,
102
+ width: "100%",
103
+ justifyContent: "center"
119
104
  },
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
- });
105
+ children: /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)(
106
+ import_ui2.Flex,
107
+ {
108
+ sx: {
109
+ backgroundColor: "background",
110
+ justifyContent: "center",
111
+ alignItems: "center",
112
+ gap: 3,
113
+ width: "auto",
114
+ border: "1px solid",
115
+ borderColor: "muted",
116
+ borderRadius: 1,
117
+ padding: 4
118
+ },
119
+ children: [
120
+ /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(import_ui2.Text, { children: "Deseja instalar o nosso aplicativo?" }),
121
+ /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(import_ui2.Button, { onClick: onInstall, children: "Instalar" })
122
+ ]
123
+ }
124
+ )
125
+ }
126
+ );
131
127
  };
132
128
 
133
129
  // src/components/InstallPwa/InstallPwa.tsx
@@ -154,9 +150,7 @@ var InstallPwa = () => {
154
150
  if (!supportsPwa) {
155
151
  return null;
156
152
  }
157
- return /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(InstallPwaUi, {
158
- onInstall
159
- });
153
+ return /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(InstallPwaUi, { onInstall });
160
154
  };
161
155
 
162
156
  // src/components/Modal/Modal.tsx
@@ -206,10 +200,7 @@ var Modal = (props) => {
206
200
  ...props.style?.content
207
201
  }
208
202
  };
209
- return /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(import_react_modal.default, {
210
- ...props,
211
- style
212
- });
203
+ return /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(import_react_modal.default, { ...props, style });
213
204
  };
214
205
  Modal.setAppElement = import_react_modal.default.setAppElement;
215
206
 
@@ -223,21 +214,22 @@ var ToastContainer = (props) => {
223
214
  React4.useEffect(() => {
224
215
  (0, import_inject_style.injectStyle)();
225
216
  }, []);
226
- return /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(import_ui4.Box, {
227
- sx: ({ colors, fonts }) => ({
228
- "--toastify-color-light": "#fff",
229
- "--toastify-color-dark": "#121212",
230
- "--toastify-color-info": colors?.info || "#3498db",
231
- "--toastify-color-success": colors?.success || "#07bc0c",
232
- "--toastify-color-warning": "#f1c40f",
233
- "--toastify-color-error": "#e74c3c",
234
- "--toastify-color-progress-light": `linear-gradient(to right, ${colors?.primary}, ${colors?.secondary})`,
235
- "--toastify-font-family": fonts.body
236
- }),
237
- children: /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(import_react_toastify.ToastContainer, {
238
- ...props
239
- })
240
- });
217
+ return /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
218
+ import_ui4.Box,
219
+ {
220
+ sx: ({ colors, fonts }) => ({
221
+ "--toastify-color-light": "#fff",
222
+ "--toastify-color-dark": "#121212",
223
+ "--toastify-color-info": colors?.info || "#3498db",
224
+ "--toastify-color-success": colors?.success || "#07bc0c",
225
+ "--toastify-color-warning": "#f1c40f",
226
+ "--toastify-color-error": "#e74c3c",
227
+ "--toastify-color-progress-light": `linear-gradient(to right, ${colors?.primary}, ${colors?.secondary})`,
228
+ "--toastify-font-family": fonts.body
229
+ }),
230
+ children: /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(import_react_toastify.ToastContainer, { ...props })
231
+ }
232
+ );
241
233
  };
242
234
  // Annotate the CommonJS export names for ESM import in node:
243
235
  0 && (module.exports = {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ttoss/components",
3
- "version": "1.24.3",
3
+ "version": "1.24.5",
4
4
  "description": "React components.",
5
5
  "license": "UNLICENSED",
6
6
  "author": "ttoss",
@@ -18,6 +18,7 @@
18
18
  "dev": "yarn workspace @docs/storybook run dev",
19
19
  "test": "jest"
20
20
  },
21
+ "sideEffects": false,
21
22
  "typings": "dist/index.d.ts",
22
23
  "dependencies": {
23
24
  "@emotion/css": "^11.10.5",
@@ -34,7 +35,7 @@
34
35
  "devDependencies": {
35
36
  "@ttoss/config": "^1.25.0",
36
37
  "@ttoss/test-utils": "^1.18.3",
37
- "@ttoss/ui": "^1.26.3",
38
+ "@ttoss/ui": "^1.27.1",
38
39
  "@types/jest": "^29.2.4",
39
40
  "jest": "^29.3.1"
40
41
  },
@@ -45,5 +46,5 @@
45
46
  "publishConfig": {
46
47
  "access": "public"
47
48
  },
48
- "gitHead": "88b98945c469cdfdece6b12ce41243403ad2c242"
49
+ "gitHead": "055a9b2d3f53f0d8f3bbaea24ac9e51f99d0ca57"
49
50
  }