@tecsinapse/react-native-kit 1.22.11-beta.0 → 1.22.11-beta.3
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/cjs/components/molecules/Snackbar/Snackbar.d.ts +1 -1
- package/dist/cjs/components/molecules/Snackbar/Snackbar.js +12 -1
- package/dist/cjs/components/molecules/Snackbar/Snackbar.js.map +1 -1
- package/dist/esm/components/molecules/Snackbar/Snackbar.d.ts +1 -1
- package/dist/esm/components/molecules/Snackbar/Snackbar.js +12 -1
- package/dist/esm/components/molecules/Snackbar/Snackbar.js.map +1 -1
- package/package.json +3 -3
|
@@ -2,7 +2,7 @@ import React from 'react';
|
|
|
2
2
|
import { SnackbarProps as SnackPropsCore } from '@tecsinapse/react-core';
|
|
3
3
|
import { TextNativeProps } from '../../atoms/Text';
|
|
4
4
|
export interface SnackbarNativeProps extends Omit<SnackPropsCore, 'children'> {
|
|
5
|
-
value
|
|
5
|
+
value?: string;
|
|
6
6
|
textProps?: TextNativeProps;
|
|
7
7
|
}
|
|
8
8
|
declare const Snackbar: React.FC<SnackbarNativeProps>;
|
|
@@ -11,10 +11,21 @@ var React__default = /*#__PURE__*/_interopDefaultLegacy(React);
|
|
|
11
11
|
const Snackbar = ({
|
|
12
12
|
value,
|
|
13
13
|
textProps = { colorVariant: "primary", colorTone: "medium" },
|
|
14
|
+
onClose,
|
|
14
15
|
...rest
|
|
15
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]);
|
|
16
26
|
return /* @__PURE__ */ React__default["default"].createElement(styled.SnackbarStyled, {
|
|
17
|
-
...rest
|
|
27
|
+
...rest,
|
|
28
|
+
onClose: handleClose
|
|
18
29
|
}, /* @__PURE__ */ React__default["default"].createElement(Text, {
|
|
19
30
|
...textProps,
|
|
20
31
|
fontWeight: "bold",
|
|
@@ -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
|
|
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;;;;"}
|
|
@@ -2,7 +2,7 @@ import React from 'react';
|
|
|
2
2
|
import { SnackbarProps as SnackPropsCore } from '@tecsinapse/react-core';
|
|
3
3
|
import { TextNativeProps } from '../../atoms/Text';
|
|
4
4
|
export interface SnackbarNativeProps extends Omit<SnackPropsCore, 'children'> {
|
|
5
|
-
value
|
|
5
|
+
value?: string;
|
|
6
6
|
textProps?: TextNativeProps;
|
|
7
7
|
}
|
|
8
8
|
declare const Snackbar: React.FC<SnackbarNativeProps>;
|
|
@@ -5,10 +5,21 @@ import { SnackbarStyled } from './styled.js';
|
|
|
5
5
|
const Snackbar = ({
|
|
6
6
|
value,
|
|
7
7
|
textProps = { colorVariant: "primary", colorTone: "medium" },
|
|
8
|
+
onClose,
|
|
8
9
|
...rest
|
|
9
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]);
|
|
10
20
|
return /* @__PURE__ */ React__default.createElement(SnackbarStyled, {
|
|
11
|
-
...rest
|
|
21
|
+
...rest,
|
|
22
|
+
onClose: handleClose
|
|
12
23
|
}, /* @__PURE__ */ React__default.createElement(Text, {
|
|
13
24
|
...textProps,
|
|
14
25
|
fontWeight: "bold",
|
|
@@ -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
|
|
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;;;;"}
|
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.22.11-beta.
|
|
4
|
+
"version": "1.22.11-beta.3+6b5e743",
|
|
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.21.
|
|
25
|
+
"@tecsinapse/react-core": "^1.21.9-beta.9+6b5e743",
|
|
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": "
|
|
48
|
+
"gitHead": "6b5e743a51b0c1f3d16c32915cc5aecbeb9267f7"
|
|
49
49
|
}
|