@tecsinapse/react-native-kit 1.10.3 → 1.10.4

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/CHANGELOG.md CHANGED
@@ -3,6 +3,14 @@
3
3
  All notable changes to this project will be documented in this file.
4
4
  See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
5
5
 
6
+ ## [1.10.4](https://github.com/tecsinapse/design-system/compare/@tecsinapse/react-native-kit@1.10.3...@tecsinapse/react-native-kit@1.10.4) (2021-12-06)
7
+
8
+ **Note:** Version bump only for package @tecsinapse/react-native-kit
9
+
10
+
11
+
12
+
13
+
6
14
  ## [1.10.3](https://github.com/tecsinapse/design-system/compare/@tecsinapse/react-native-kit@1.10.2...@tecsinapse/react-native-kit@1.10.3) (2021-11-29)
7
15
 
8
16
  **Note:** Version bump only for package @tecsinapse/react-native-kit
@@ -0,0 +1,6 @@
1
+ import { ButtonProps } from "@tecsinapse/react-core";
2
+ import { FC } from "react";
3
+ export declare type ButtonNativeProps = ButtonProps & {
4
+ autoDismissKeyboard?: boolean;
5
+ };
6
+ export declare const Button: FC<ButtonNativeProps>;
@@ -0,0 +1,35 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.Button = void 0;
7
+
8
+ var _reactCore = require("@tecsinapse/react-core");
9
+
10
+ var _react = _interopRequireWildcard(require("react"));
11
+
12
+ var _reactNative = require("react-native");
13
+
14
+ function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
15
+
16
+ function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
17
+
18
+ function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
19
+
20
+ const Button = ({
21
+ autoDismissKeyboard = true,
22
+ onPress,
23
+ ...others
24
+ }) => {
25
+ const handleOnPress = (0, _react.useCallback)(event => {
26
+ autoDismissKeyboard && _reactNative.Keyboard.dismiss();
27
+ onPress === null || onPress === void 0 ? void 0 : onPress(event);
28
+ }, [onPress]);
29
+ return _react.default.createElement(_reactCore.Button, _extends({}, others, {
30
+ onPress: handleOnPress
31
+ }));
32
+ };
33
+
34
+ exports.Button = Button;
35
+ //# sourceMappingURL=Button.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../../src/components/atoms/Button/Button.tsx"],"names":["Button","autoDismissKeyboard","onPress","others","handleOnPress","event","Keyboard","dismiss"],"mappings":";;;;;;;AAAA;;AACA;;AACA;;;;;;;;AAMO,MAAMA,MAA6B,GAAG,CAAC;AAAEC,EAAAA,mBAAmB,GAAG,IAAxB;AAA8BC,EAAAA,OAA9B;AAAuC,KAAGC;AAA1C,CAAD,KAAwD;AAEjG,QAAMC,aAAa,GAAG,wBAAaC,KAAD,IAAW;AACzCJ,IAAAA,mBAAmB,IAAIK,sBAASC,OAAT,EAAvB;AACAL,IAAAA,OAAO,SAAP,IAAAA,OAAO,WAAP,YAAAA,OAAO,CAAGG,KAAH,CAAP;AACH,GAHqB,EAGnB,CAACH,OAAD,CAHmB,CAAtB;AAKA,SAAO,6BAAC,iBAAD,eAAgBC,MAAhB;AAAwB,IAAA,OAAO,EAAEC;AAAjC,KAAP;AACH,CARM","sourcesContent":["import { Button as ButtonCore, ButtonProps } from \"@tecsinapse/react-core\";\nimport React, { FC, useCallback } from \"react\";\nimport { Keyboard } from \"react-native\";\n\nexport type ButtonNativeProps = ButtonProps & {\n autoDismissKeyboard?: boolean\n}\n\nexport const Button: FC<ButtonNativeProps> = ({ autoDismissKeyboard = true, onPress, ...others }) => {\n\n const handleOnPress = useCallback((event) => {\n autoDismissKeyboard && Keyboard.dismiss()\n onPress?.(event)\n }, [onPress])\n\n return <ButtonCore {...others} onPress={handleOnPress}/>\n}"],"file":"Button.js"}
@@ -1 +1,2 @@
1
+ export { Button, ButtonNativeProps } from './Button';
1
2
  export { Error, Loading, Success } from './States';
@@ -3,6 +3,18 @@
3
3
  Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
+ Object.defineProperty(exports, "Button", {
7
+ enumerable: true,
8
+ get: function () {
9
+ return _Button.Button;
10
+ }
11
+ });
12
+ Object.defineProperty(exports, "ButtonNativeProps", {
13
+ enumerable: true,
14
+ get: function () {
15
+ return _Button.ButtonNativeProps;
16
+ }
17
+ });
6
18
  Object.defineProperty(exports, "Error", {
7
19
  enumerable: true,
8
20
  get: function () {
@@ -22,5 +34,7 @@ Object.defineProperty(exports, "Success", {
22
34
  }
23
35
  });
24
36
 
37
+ var _Button = require("./Button");
38
+
25
39
  var _States = require("./States");
26
40
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../../src/components/atoms/Button/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;AAAA","sourcesContent":["export { Error, Loading, Success } from './States';\n"],"file":"index.js"}
1
+ {"version":3,"sources":["../../../../src/components/atoms/Button/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;;AACA","sourcesContent":["export { Button, ButtonNativeProps } from './Button';\nexport { Error, Loading, Success } from './States';"],"file":"index.js"}
package/dist/index.d.ts CHANGED
@@ -4,7 +4,7 @@ export { Select, SelectNativeProps } from './components/atoms/Select';
4
4
  export { Input, InputNativeProps } from './components/atoms/Input';
5
5
  export { TextArea, TextAreaProps } from './components/atoms/TextArea';
6
6
  export { Text, TextNativeProps } from './components/atoms/Text';
7
- export { Error, Loading, Success } from './components/atoms/Button';
7
+ export { Error, Loading, Success, Button, ButtonNativeProps } from './components/atoms/Button';
8
8
  export { GroupButtonOption } from './components/atoms/GroupButton';
9
9
  export { InputPassword, InputPasswordNativeProps, } from './components/molecules/InputPassword';
10
10
  export { BottomNavigator, BottomNavigatorProps, } from './components/atoms/BottomNavigator';
package/dist/index.js CHANGED
@@ -17,6 +17,8 @@ var _exportNames = {
17
17
  Error: true,
18
18
  Loading: true,
19
19
  Success: true,
20
+ Button: true,
21
+ ButtonNativeProps: true,
20
22
  GroupButtonOption: true,
21
23
  InputPassword: true,
22
24
  InputPasswordNativeProps: true,
@@ -114,6 +116,18 @@ Object.defineProperty(exports, "Success", {
114
116
  return _Button.Success;
115
117
  }
116
118
  });
119
+ Object.defineProperty(exports, "Button", {
120
+ enumerable: true,
121
+ get: function () {
122
+ return _Button.Button;
123
+ }
124
+ });
125
+ Object.defineProperty(exports, "ButtonNativeProps", {
126
+ enumerable: true,
127
+ get: function () {
128
+ return _Button.ButtonNativeProps;
129
+ }
130
+ });
117
131
  Object.defineProperty(exports, "GroupButtonOption", {
118
132
  enumerable: true,
119
133
  get: function () {
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AAIA;;AAIA;;AACA;;AAIA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA","sourcesContent":["export * from '@tecsinapse/react-core';\nexport { Header, HeaderProps } from './components/atoms/Header';\nexport { Select, SelectNativeProps } from './components/atoms/Select';\nexport { Input, InputNativeProps } from './components/atoms/Input';\nexport { TextArea, TextAreaProps } from './components/atoms/TextArea';\nexport { Text, TextNativeProps } from './components/atoms/Text';\nexport { Error, Loading, Success } from './components/atoms/Button';\nexport { GroupButtonOption } from './components/atoms/GroupButton';\nexport {\n InputPassword,\n InputPasswordNativeProps,\n} from './components/molecules/InputPassword';\nexport {\n BottomNavigator,\n BottomNavigatorProps,\n} from './components/atoms/BottomNavigator';\nexport { Tag, TagProps } from './components/atoms/Tag';\nexport {\n SnappingSlider,\n SnappingSliderProps,\n} from './components/atoms/SnappingSlider';\nexport { Badge, BadgeNativeProps } from './components/atoms/Badge';\nexport { Snackbar, SnackbarNativeProps } from './components/molecules/Snackbar';\nexport { DatePicker } from './components/molecules/DatePicker';\nexport { DateTimePicker } from './components/molecules/DateTimePicker';\nexport { Avatar } from './components/atoms/Avatar';\nexport { Calendar } from './components/molecules/Calendar';\nexport { DateTimeSelector } from './components/molecules/DateTimeSelector';\n"],"file":"index.js"}
1
+ {"version":3,"sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AAIA;;AAIA;;AACA;;AAIA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA","sourcesContent":["export * from '@tecsinapse/react-core';\nexport { Header, HeaderProps } from './components/atoms/Header';\nexport { Select, SelectNativeProps } from './components/atoms/Select';\nexport { Input, InputNativeProps } from './components/atoms/Input';\nexport { TextArea, TextAreaProps } from './components/atoms/TextArea';\nexport { Text, TextNativeProps } from './components/atoms/Text';\nexport { Error, Loading, Success, Button, ButtonNativeProps } from './components/atoms/Button';\nexport { GroupButtonOption } from './components/atoms/GroupButton';\nexport {\n InputPassword,\n InputPasswordNativeProps,\n} from './components/molecules/InputPassword';\nexport {\n BottomNavigator,\n BottomNavigatorProps,\n} from './components/atoms/BottomNavigator';\nexport { Tag, TagProps } from './components/atoms/Tag';\nexport {\n SnappingSlider,\n SnappingSliderProps,\n} from './components/atoms/SnappingSlider';\nexport { Badge, BadgeNativeProps } from './components/atoms/Badge';\nexport { Snackbar, SnackbarNativeProps } from './components/molecules/Snackbar';\nexport { DatePicker } from './components/molecules/DatePicker';\nexport { DateTimePicker } from './components/molecules/DateTimePicker';\nexport { Avatar } from './components/atoms/Avatar';\nexport { Calendar } from './components/molecules/Calendar';\nexport { DateTimeSelector } from './components/molecules/DateTimeSelector';\n"],"file":"index.js"}
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.10.3",
4
+ "version": "1.10.4",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
7
7
  "license": "MIT",
@@ -29,5 +29,5 @@
29
29
  "react-native": ">=0.64.0",
30
30
  "react-native-vector-icons": ">=8.1.0"
31
31
  },
32
- "gitHead": "2608df0807f22cca02b657a64b3bfef334daf0e9"
32
+ "gitHead": "010afd6a57dc9a23b6ea9afff070a3b9140e523d"
33
33
  }
@@ -0,0 +1,17 @@
1
+ import { Button as ButtonCore, ButtonProps } from "@tecsinapse/react-core";
2
+ import React, { FC, useCallback } from "react";
3
+ import { Keyboard } from "react-native";
4
+
5
+ export type ButtonNativeProps = ButtonProps & {
6
+ autoDismissKeyboard?: boolean
7
+ }
8
+
9
+ export const Button: FC<ButtonNativeProps> = ({ autoDismissKeyboard = true, onPress, ...others }) => {
10
+
11
+ const handleOnPress = useCallback((event) => {
12
+ autoDismissKeyboard && Keyboard.dismiss()
13
+ onPress?.(event)
14
+ }, [onPress])
15
+
16
+ return <ButtonCore {...others} onPress={handleOnPress}/>
17
+ }
@@ -1 +1,2 @@
1
- export { Error, Loading, Success } from './States';
1
+ export { Button, ButtonNativeProps } from './Button';
2
+ export { Error, Loading, Success } from './States';
package/src/index.ts CHANGED
@@ -4,7 +4,7 @@ export { Select, SelectNativeProps } from './components/atoms/Select';
4
4
  export { Input, InputNativeProps } from './components/atoms/Input';
5
5
  export { TextArea, TextAreaProps } from './components/atoms/TextArea';
6
6
  export { Text, TextNativeProps } from './components/atoms/Text';
7
- export { Error, Loading, Success } from './components/atoms/Button';
7
+ export { Error, Loading, Success, Button, ButtonNativeProps } from './components/atoms/Button';
8
8
  export { GroupButtonOption } from './components/atoms/GroupButton';
9
9
  export {
10
10
  InputPassword,