@tecsinapse/react-native-kit 1.23.0-beta.3 → 1.23.0-beta.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.
@@ -10,27 +10,18 @@ var React__default = /*#__PURE__*/_interopDefaultLegacy(React);
10
10
 
11
11
  const Snackbar = ({
12
12
  value,
13
+ open,
13
14
  textProps = { colorVariant: "primary", colorTone: "medium" },
14
- onClose,
15
15
  ...rest
16
16
  }) => {
17
- const handleClose = (ref) => {
18
- clearTimeout(ref);
19
- onClose?.(ref);
20
- };
21
- React__default["default"].useEffect(() => {
22
- if (!value || value?.length === 0) {
23
- handleClose();
24
- }
25
- }, [value]);
26
17
  return /* @__PURE__ */ React__default["default"].createElement(styled.SnackbarStyled, {
27
18
  ...rest,
28
- onClose: handleClose
29
- }, /* @__PURE__ */ React__default["default"].createElement(Text, {
19
+ open
20
+ }, value && open ? /* @__PURE__ */ React__default["default"].createElement(Text, {
30
21
  ...textProps,
31
22
  fontWeight: "bold",
32
23
  typography: "base"
33
- }, value));
24
+ }, value) : null);
34
25
  };
35
26
 
36
27
  module.exports = Snackbar;
@@ -1 +1 @@
1
- {"version":3,"file":"Snackbar.js","sources":["../../../../../src/components/molecules/Snackbar/Snackbar.tsx"],"sourcesContent":["import React from 'react';\nimport { SnackbarProps as SnackPropsCore } from '@tecsinapse/react-core';\nimport { Text, TextNativeProps } from '../../atoms/Text';\nimport { SnackbarStyled } from './styled';\n\nexport interface SnackbarNativeProps extends Omit<SnackPropsCore, 'children'> {\n value?: string;\n textProps?: TextNativeProps;\n}\n\nconst Snackbar: React.FC<SnackbarNativeProps> = ({\n value,\n textProps = { colorVariant: 'primary', colorTone: 'medium' },\n onClose,\n ...rest\n}) => {\n const handleClose = (ref?: number) => {\n clearTimeout(ref);\n onClose?.(ref);\n };\n\n React.useEffect(() => {\n if (!value || value?.length === 0) {\n handleClose();\n }\n }, [value]);\n\n return (\n <SnackbarStyled {...rest} onClose={handleClose}>\n <Text {...textProps} fontWeight=\"bold\" typography=\"base\">\n {value}\n </Text>\n </SnackbarStyled>\n );\n};\n\nexport default Snackbar;\n"],"names":["React","SnackbarStyled"],"mappings":";;;;;;;;;;AAUA,MAAM,WAA0C,CAAC;AAAA,EAC/C,KAAA;AAAA,EACA,SAAY,GAAA,EAAE,YAAc,EAAA,SAAA,EAAW,WAAW,QAAS,EAAA;AAAA,EAC3D,OAAA;AAAA,EACG,GAAA,IAAA;AACL,CAAM,KAAA;AACJ,EAAM,MAAA,WAAA,GAAc,CAAC,GAAiB,KAAA;AACpC,IAAA,YAAA,CAAa,GAAG,CAAA,CAAA;AAChB,IAAA,OAAA,GAAU,GAAG,CAAA,CAAA;AAAA,GACf,CAAA;AAEA,EAAAA,yBAAA,CAAM,UAAU,MAAM;AACpB,IAAA,IAAI,CAAC,KAAA,IAAS,KAAO,EAAA,MAAA,KAAW,CAAG,EAAA;AACjC,MAAY,WAAA,EAAA,CAAA;AAAA,KACd;AAAA,GACF,EAAG,CAAC,KAAK,CAAC,CAAA,CAAA;AAEV,EAAA,uBACGA,yBAAA,CAAA,aAAA,CAAAC,qBAAA,EAAA;AAAA,IAAgB,GAAG,IAAA;AAAA,IAAM,OAAS,EAAA,WAAA;AAAA,GAAA,kBAChCD,yBAAA,CAAA,aAAA,CAAA,IAAA,EAAA;AAAA,IAAM,GAAG,SAAA;AAAA,IAAW,UAAW,EAAA,MAAA;AAAA,IAAO,UAAW,EAAA,MAAA;AAAA,GAAA,EAC/C,KACH,CACF,CAAA,CAAA;AAEJ;;;;"}
1
+ {"version":3,"file":"Snackbar.js","sources":["../../../../../src/components/molecules/Snackbar/Snackbar.tsx"],"sourcesContent":["import React from 'react';\nimport { SnackbarProps as SnackPropsCore } from '@tecsinapse/react-core';\nimport { Text, TextNativeProps } from '../../atoms/Text';\nimport { SnackbarStyled } from './styled';\n\nexport interface SnackbarNativeProps extends Omit<SnackPropsCore, 'children'> {\n value?: string;\n textProps?: TextNativeProps;\n}\n\nconst Snackbar: React.FC<SnackbarNativeProps> = ({\n value,\n open,\n textProps = { colorVariant: 'primary', colorTone: 'medium' },\n ...rest\n}) => {\n return (\n <SnackbarStyled {...rest} open={open}>\n {value && open ? (\n <Text {...textProps} fontWeight=\"bold\" typography=\"base\">\n {value}\n </Text>\n ) : null}\n </SnackbarStyled>\n );\n};\n\nexport default Snackbar;\n"],"names":["React","SnackbarStyled"],"mappings":";;;;;;;;;;AAUA,MAAM,WAA0C,CAAC;AAAA,EAC/C,KAAA;AAAA,EACA,IAAA;AAAA,EACA,SAAY,GAAA,EAAE,YAAc,EAAA,SAAA,EAAW,WAAW,QAAS,EAAA;AAAA,EACxD,GAAA,IAAA;AACL,CAAM,KAAA;AACJ,EAAA,uBACGA,yBAAA,CAAA,aAAA,CAAAC,qBAAA,EAAA;AAAA,IAAgB,GAAG,IAAA;AAAA,IAAM,IAAA;AAAA,GACvB,EAAA,KAAA,IAAS,uBACPD,yBAAA,CAAA,aAAA,CAAA,IAAA,EAAA;AAAA,IAAM,GAAG,SAAA;AAAA,IAAW,UAAW,EAAA,MAAA;AAAA,IAAO,UAAW,EAAA,MAAA;AAAA,GAC/C,EAAA,KACH,IACE,IACN,CAAA,CAAA;AAEJ;;;;"}
@@ -4,27 +4,18 @@ import { SnackbarStyled } from './styled.js';
4
4
 
5
5
  const Snackbar = ({
6
6
  value,
7
+ open,
7
8
  textProps = { colorVariant: "primary", colorTone: "medium" },
8
- onClose,
9
9
  ...rest
10
10
  }) => {
11
- const handleClose = (ref) => {
12
- clearTimeout(ref);
13
- onClose?.(ref);
14
- };
15
- React__default.useEffect(() => {
16
- if (!value || value?.length === 0) {
17
- handleClose();
18
- }
19
- }, [value]);
20
11
  return /* @__PURE__ */ React__default.createElement(SnackbarStyled, {
21
12
  ...rest,
22
- onClose: handleClose
23
- }, /* @__PURE__ */ React__default.createElement(Text, {
13
+ open
14
+ }, value && open ? /* @__PURE__ */ React__default.createElement(Text, {
24
15
  ...textProps,
25
16
  fontWeight: "bold",
26
17
  typography: "base"
27
- }, value));
18
+ }, value) : null);
28
19
  };
29
20
 
30
21
  export { Snackbar as default };
@@ -1 +1 @@
1
- {"version":3,"file":"Snackbar.js","sources":["../../../../../src/components/molecules/Snackbar/Snackbar.tsx"],"sourcesContent":["import React from 'react';\nimport { SnackbarProps as SnackPropsCore } from '@tecsinapse/react-core';\nimport { Text, TextNativeProps } from '../../atoms/Text';\nimport { SnackbarStyled } from './styled';\n\nexport interface SnackbarNativeProps extends Omit<SnackPropsCore, 'children'> {\n value?: string;\n textProps?: TextNativeProps;\n}\n\nconst Snackbar: React.FC<SnackbarNativeProps> = ({\n value,\n textProps = { colorVariant: 'primary', colorTone: 'medium' },\n onClose,\n ...rest\n}) => {\n const handleClose = (ref?: number) => {\n clearTimeout(ref);\n onClose?.(ref);\n };\n\n React.useEffect(() => {\n if (!value || value?.length === 0) {\n handleClose();\n }\n }, [value]);\n\n return (\n <SnackbarStyled {...rest} onClose={handleClose}>\n <Text {...textProps} fontWeight=\"bold\" typography=\"base\">\n {value}\n </Text>\n </SnackbarStyled>\n );\n};\n\nexport default Snackbar;\n"],"names":["React"],"mappings":";;;;AAUA,MAAM,WAA0C,CAAC;AAAA,EAC/C,KAAA;AAAA,EACA,SAAY,GAAA,EAAE,YAAc,EAAA,SAAA,EAAW,WAAW,QAAS,EAAA;AAAA,EAC3D,OAAA;AAAA,EACG,GAAA,IAAA;AACL,CAAM,KAAA;AACJ,EAAM,MAAA,WAAA,GAAc,CAAC,GAAiB,KAAA;AACpC,IAAA,YAAA,CAAa,GAAG,CAAA,CAAA;AAChB,IAAA,OAAA,GAAU,GAAG,CAAA,CAAA;AAAA,GACf,CAAA;AAEA,EAAAA,cAAA,CAAM,UAAU,MAAM;AACpB,IAAA,IAAI,CAAC,KAAA,IAAS,KAAO,EAAA,MAAA,KAAW,CAAG,EAAA;AACjC,MAAY,WAAA,EAAA,CAAA;AAAA,KACd;AAAA,GACF,EAAG,CAAC,KAAK,CAAC,CAAA,CAAA;AAEV,EAAA,uBACGA,cAAA,CAAA,aAAA,CAAA,cAAA,EAAA;AAAA,IAAgB,GAAG,IAAA;AAAA,IAAM,OAAS,EAAA,WAAA;AAAA,GAAA,kBAChCA,cAAA,CAAA,aAAA,CAAA,IAAA,EAAA;AAAA,IAAM,GAAG,SAAA;AAAA,IAAW,UAAW,EAAA,MAAA;AAAA,IAAO,UAAW,EAAA,MAAA;AAAA,GAAA,EAC/C,KACH,CACF,CAAA,CAAA;AAEJ;;;;"}
1
+ {"version":3,"file":"Snackbar.js","sources":["../../../../../src/components/molecules/Snackbar/Snackbar.tsx"],"sourcesContent":["import React from 'react';\nimport { SnackbarProps as SnackPropsCore } from '@tecsinapse/react-core';\nimport { Text, TextNativeProps } from '../../atoms/Text';\nimport { SnackbarStyled } from './styled';\n\nexport interface SnackbarNativeProps extends Omit<SnackPropsCore, 'children'> {\n value?: string;\n textProps?: TextNativeProps;\n}\n\nconst Snackbar: React.FC<SnackbarNativeProps> = ({\n value,\n open,\n textProps = { colorVariant: 'primary', colorTone: 'medium' },\n ...rest\n}) => {\n return (\n <SnackbarStyled {...rest} open={open}>\n {value && open ? (\n <Text {...textProps} fontWeight=\"bold\" typography=\"base\">\n {value}\n </Text>\n ) : null}\n </SnackbarStyled>\n );\n};\n\nexport default Snackbar;\n"],"names":["React"],"mappings":";;;;AAUA,MAAM,WAA0C,CAAC;AAAA,EAC/C,KAAA;AAAA,EACA,IAAA;AAAA,EACA,SAAY,GAAA,EAAE,YAAc,EAAA,SAAA,EAAW,WAAW,QAAS,EAAA;AAAA,EACxD,GAAA,IAAA;AACL,CAAM,KAAA;AACJ,EAAA,uBACGA,cAAA,CAAA,aAAA,CAAA,cAAA,EAAA;AAAA,IAAgB,GAAG,IAAA;AAAA,IAAM,IAAA;AAAA,GACvB,EAAA,KAAA,IAAS,uBACPA,cAAA,CAAA,aAAA,CAAA,IAAA,EAAA;AAAA,IAAM,GAAG,SAAA;AAAA,IAAW,UAAW,EAAA,MAAA;AAAA,IAAO,UAAW,EAAA,MAAA;AAAA,GAC/C,EAAA,KACH,IACE,IACN,CAAA,CAAA;AAEJ;;;;"}
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@tecsinapse/react-native-kit",
3
3
  "description": "TecSinapse React Native components",
4
- "version": "1.23.0-beta.3+6b5e743",
4
+ "version": "1.23.0-beta.5+7205fc6",
5
5
  "license": "MIT",
6
6
  "main": "dist/cjs/index.js",
7
7
  "module": "dist/esm/index.js",
@@ -22,7 +22,7 @@
22
22
  "dependencies": {
23
23
  "@emotion/native": "~11.10.0",
24
24
  "@emotion/react": "~11.10.0",
25
- "@tecsinapse/react-core": "^1.22.0-beta.9+6b5e743",
25
+ "@tecsinapse/react-core": "^1.22.0-beta.11+7205fc6",
26
26
  "react-native-linear-gradient": "~2.5.6"
27
27
  },
28
28
  "repository": {
@@ -45,5 +45,5 @@
45
45
  "devDependencies": {
46
46
  "@types/uuid": "^8.3.3"
47
47
  },
48
- "gitHead": "6b5e743a51b0c1f3d16c32915cc5aecbeb9267f7"
48
+ "gitHead": "7205fc6fa6ea57ec907e52c09bbabec00937be51"
49
49
  }