@bigbinary/neetoui-rn 0.0.263 → 0.0.265
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/index.d.ts +22 -1
- package/lib/components/Accordion.js +1 -1
- package/lib/components/ActionIcon.js +1 -0
- package/lib/components/ChatInput/ChatInput.js +1 -1
- package/lib/components/ChatInput/IconButton.js +1 -1
- package/lib/components/CheckBox.js +1 -1
- package/lib/components/Chip.js +1 -1
- package/lib/components/MultiSelect.js +1 -1
- package/lib/components/NotificationIcon.js +1 -0
- package/lib/components/Popover.js +1 -1
- package/lib/components/RadioButton.js +1 -1
- package/lib/components/SearchBar.js +1 -1
- package/lib/components/Toast.js +1 -1
- package/lib/components/ToggleSwitch.js +1 -1
- package/lib/components/index.js +1 -1
- package/lib/config/toasterConfig.js +1 -1
- package/lib/hooks/useRefreshByUser.js +1 -1
- package/package.json +3 -2
- package/src/components/Accordion.jsx +3 -4
- package/src/components/ActionIcon.jsx +76 -0
- package/src/components/ChatInput/ChatInput.jsx +24 -14
- package/src/components/ChatInput/IconButton.jsx +24 -12
- package/src/components/CheckBox.jsx +7 -3
- package/src/components/Chip.jsx +16 -6
- package/src/components/MultiSelect.jsx +7 -9
- package/src/components/NotificationIcon.jsx +38 -0
- package/src/components/Popover.jsx +0 -1
- package/src/components/RadioButton.jsx +4 -3
- package/src/components/SearchBar.jsx +3 -4
- package/src/components/Toast.jsx +2 -2
- package/src/components/ToggleSwitch.jsx +5 -3
- package/src/components/index.js +2 -0
- package/src/config/toasterConfig.jsx +3 -6
- package/assets/icons/attachment.svg +0 -3
- package/assets/icons/canned-response.svg +0 -5
- package/assets/icons/forward.svg +0 -3
- package/assets/icons/note.svg +0 -4
|
@@ -1 +1 @@
|
|
|
1
|
-
var _interopRequireDefault=require("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(exports,"__esModule",{value:true});exports.defaultToasterConfig=void 0;var _extends2=_interopRequireDefault(require("@babel/runtime/helpers/extends"));var _react=_interopRequireDefault(require("react"));var _reactNative=require("react-native");var
|
|
1
|
+
var _interopRequireDefault=require("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(exports,"__esModule",{value:true});exports.defaultToasterConfig=void 0;var _extends2=_interopRequireDefault(require("@babel/runtime/helpers/extends"));var _react=_interopRequireDefault(require("react"));var _reactNative=require("react-native");var _neetoIconsRn=require("@bigbinary/neeto-icons-rn");var _reactNativeSizeMatters=require("react-native-size-matters");var _reactNativeToastMessage=_interopRequireWildcard(require("react-native-toast-message"));var _theme=require("../theme");var _this=this,_jsxFileName="/home/runner/work/neeto-ui-rn/neeto-ui-rn/src/config/toasterConfig.jsx";function _getRequireWildcardCache(nodeInterop){if(typeof WeakMap!=="function")return null;var cacheBabelInterop=new WeakMap();var cacheNodeInterop=new WeakMap();return(_getRequireWildcardCache=function _getRequireWildcardCache(nodeInterop){return nodeInterop?cacheNodeInterop:cacheBabelInterop;})(nodeInterop);}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;}var CloseButton=function CloseButton(){return _react.default.createElement(_reactNative.Pressable,{style:styles.closeButtonStyle,onPress:_reactNativeToastMessage.default.hide,__self:_this,__source:{fileName:_jsxFileName,lineNumber:11,columnNumber:3}},_react.default.createElement(_neetoIconsRn.Close,{color:_theme.theme.colors.background.white,size:(0,_reactNativeSizeMatters.moderateScale)(22),__self:_this,__source:{fileName:_jsxFileName,lineNumber:12,columnNumber:5}}));};var defaultToasterConfig={success:function success(props){return _react.default.createElement(_reactNativeToastMessage.BaseToast,(0,_extends2.default)({},props,{contentContainerStyle:styles.contentContainerStyle,leadingIconContainerStyle:styles.toasterBGColor,renderTrailingIcon:function renderTrailingIcon(){return _react.default.createElement(CloseButton,{__self:_this,__source:{fileName:_jsxFileName,lineNumber:22,columnNumber:33}});},text1NumberOfLines:10,text1Style:styles.text1Style,text2NumberOfLines:10,text2Style:styles.text2Style,touchableContainerProps:{style:[styles.touchableContainerProps,styles.successStyle]},__self:_this,__source:{fileName:_jsxFileName,lineNumber:18,columnNumber:5}}));},error:function error(props){return _react.default.createElement(_reactNativeToastMessage.BaseToast,(0,_extends2.default)({},props,{contentContainerStyle:styles.contentContainerStyle,leadingIconContainerStyle:styles.toasterBGColor,renderTrailingIcon:function renderTrailingIcon(){return _react.default.createElement(CloseButton,{__self:_this,__source:{fileName:_jsxFileName,lineNumber:37,columnNumber:33}});},text1NumberOfLines:10,text1Style:styles.text1Style,text2NumberOfLines:10,text2Style:styles.text2Style,touchableContainerProps:{style:[styles.touchableContainerProps,styles.errorStyle]},__self:_this,__source:{fileName:_jsxFileName,lineNumber:33,columnNumber:5}}));},info:function info(props){return _react.default.createElement(_reactNativeToastMessage.BaseToast,(0,_extends2.default)({},props,{contentContainerStyle:styles.contentContainerStyle,leadingIconContainerStyle:styles.toasterBGColor,renderTrailingIcon:function renderTrailingIcon(){return _react.default.createElement(CloseButton,{__self:_this,__source:{fileName:_jsxFileName,lineNumber:52,columnNumber:33}});},text1NumberOfLines:10,text1Style:styles.text1Style,text2NumberOfLines:10,text2Style:styles.text2Style,touchableContainerProps:{style:[styles.touchableContainerProps,styles.infoStyle]},__self:_this,__source:{fileName:_jsxFileName,lineNumber:48,columnNumber:5}}));},warning:function warning(props){return _react.default.createElement(_reactNativeToastMessage.BaseToast,(0,_extends2.default)({},props,{contentContainerStyle:styles.contentContainerStyle,leadingIconContainerStyle:styles.toasterBGColor,renderTrailingIcon:function renderTrailingIcon(){return _react.default.createElement(CloseButton,{__self:_this,__source:{fileName:_jsxFileName,lineNumber:67,columnNumber:33}});},text1NumberOfLines:10,text1Style:styles.text1Style,text2NumberOfLines:10,text2Style:styles.text2Style,touchableContainerProps:{style:[styles.touchableContainerProps,styles.warningStyle]},__self:_this,__source:{fileName:_jsxFileName,lineNumber:63,columnNumber:5}}));}};exports.defaultToasterConfig=defaultToasterConfig;defaultToasterConfig.success.displayName="Success";defaultToasterConfig.error.displayName="Error";var styles=_reactNative.StyleSheet.create({touchableContainerProps:{flexDirection:"row",flex:1,paddingVertical:10,width:340,borderRadius:6,shadowOffset:{width:0,height:0},shadowOpacity:0.1,shadowRadius:6,elevation:2,backgroundColor:"#FFF",borderLeftWidth:5,borderLeftColor:"#D8D8D8"},successStyle:{borderLeftColor:_theme.theme.colors.toast.success,backgroundColor:_theme.theme.colors.background.grey800},errorStyle:{borderLeftColor:_theme.theme.colors.toast.error,backgroundColor:_theme.theme.colors.background.grey800},infoStyle:{borderLeftColor:_theme.theme.colors.toast.info,backgroundColor:_theme.theme.colors.background.grey800},warningStyle:{borderLeftColor:_theme.theme.colors.toast.warning,backgroundColor:_theme.theme.colors.background.grey800},toasterBGColor:{backgroundColor:_theme.theme.colors.background.grey800},contentContainerStyle:{paddingHorizontal:15,backgroundColor:_theme.theme.colors.background.grey800},text1Style:{fontSize:15,fontFamily:_theme.theme.fonts.sf700,color:_theme.theme.colors.font.white},text2Style:{fontSize:16,fontFamily:_theme.theme.fonts.sf700,color:_theme.theme.colors.font.white},closeButtonStyle:{justifyContent:"center",alignItems:"center",paddingRight:10,backgroundColor:_theme.theme.colors.background.grey800,shadowColor:_theme.theme.colors.background.grey800,flexDirection:"row",borderTopRightRadius:6,borderBottomRightRadius:6,shadowOffset:{width:0,height:0},shadowOpacity:0.1,shadowRadius:6,elevation:2}});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
var _interopRequireDefault=require("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(exports,"__esModule",{value:true});exports.useRefreshByUser=useRefreshByUser;var _regenerator=_interopRequireDefault(require("@babel/runtime/regenerator"));var _slicedToArray2=_interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));var _react=require("react");function useRefreshByUser(refetch){var _useState=(0,_react.useState)(false),_useState2=(0,_slicedToArray2.default)(_useState,2),isRefetchingByUser=_useState2[0],setIsRefetchingByUser=_useState2[1];function refetchByUser(){return _regenerator.default.async(function refetchByUser$(_context){while(1)
|
|
1
|
+
var _interopRequireDefault=require("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(exports,"__esModule",{value:true});exports.useRefreshByUser=useRefreshByUser;var _regenerator=_interopRequireDefault(require("@babel/runtime/regenerator"));var _slicedToArray2=_interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));var _react=require("react");function useRefreshByUser(refetch){var _useState=(0,_react.useState)(false),_useState2=(0,_slicedToArray2.default)(_useState,2),isRefetchingByUser=_useState2[0],setIsRefetchingByUser=_useState2[1];function refetchByUser(){return _regenerator.default.async(function refetchByUser$(_context){while(1)switch(_context.prev=_context.next){case 0:setIsRefetchingByUser(true);_context.prev=1;_context.next=4;return _regenerator.default.awrap(refetch());case 4:_context.prev=4;setIsRefetchingByUser(false);return _context.finish(4);case 7:case"end":return _context.stop();}},null,null,[[1,,4,7]],Promise);}return{isRefetchingByUser:isRefetchingByUser,refetchByUser:refetchByUser};}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@bigbinary/neetoui-rn",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.265",
|
|
4
4
|
"main": "lib/index.js",
|
|
5
5
|
"author": "BigBinary",
|
|
6
6
|
"license": "MIT",
|
|
@@ -51,6 +51,8 @@
|
|
|
51
51
|
"react-native-webview": "11.14.4"
|
|
52
52
|
},
|
|
53
53
|
"dependencies": {
|
|
54
|
+
"@bigbinary/neeto-commons-frontend": "^2.0.129",
|
|
55
|
+
"@bigbinary/neeto-icons-rn": "^1.0.3",
|
|
54
56
|
"@react-native-community/hooks": "^2.8.1",
|
|
55
57
|
"@shopify/flash-list": "^1.2.0",
|
|
56
58
|
"@styled-system/prop-types": "^5.1.5",
|
|
@@ -63,7 +65,6 @@
|
|
|
63
65
|
"react-native-modal": "^13.0.0",
|
|
64
66
|
"react-native-pell-rich-editor": "^1.8.6",
|
|
65
67
|
"react-native-popover-view": "^5.1.7",
|
|
66
|
-
"react-native-remix-icon": "^0.3.0",
|
|
67
68
|
"react-native-safe-area-context": "^3.3.2",
|
|
68
69
|
"react-native-size-matters": "^0.4.0",
|
|
69
70
|
"react-native-snap-carousel": "4.0.0-beta.6",
|
|
@@ -7,8 +7,8 @@ import React, {
|
|
|
7
7
|
} from "react";
|
|
8
8
|
import { Animated, StyleSheet } from "react-native";
|
|
9
9
|
|
|
10
|
+
import { Down } from "@bigbinary/neeto-icons-rn";
|
|
10
11
|
import PropTypes from "prop-types";
|
|
11
|
-
import Icon from "react-native-remix-icon";
|
|
12
12
|
import { moderateScale } from "react-native-size-matters";
|
|
13
13
|
import styled, { ThemeContext } from "styled-components/native";
|
|
14
14
|
import {
|
|
@@ -122,7 +122,7 @@ export const Accordion = React.forwardRef(
|
|
|
122
122
|
},
|
|
123
123
|
ref
|
|
124
124
|
) => {
|
|
125
|
-
const {
|
|
125
|
+
const { Label, size, color } = iconProp;
|
|
126
126
|
const theme = useContext(ThemeContext);
|
|
127
127
|
const [isExpanded, setIsExpanded] = useState(false);
|
|
128
128
|
const animationController = useRef(
|
|
@@ -190,9 +190,8 @@ export const Accordion = React.forwardRef(
|
|
|
190
190
|
}}
|
|
191
191
|
>
|
|
192
192
|
<Container>
|
|
193
|
-
<
|
|
193
|
+
<Down
|
|
194
194
|
color={color ?? theme.colors.font.grey700}
|
|
195
|
-
name={name ?? "ri-arrow-down-s-line"}
|
|
196
195
|
size={size ?? moderateScale(24)}
|
|
197
196
|
/>
|
|
198
197
|
</Container>
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
|
|
3
|
+
import PropTypes from "prop-types";
|
|
4
|
+
import { moderateScale } from "react-native-size-matters";
|
|
5
|
+
|
|
6
|
+
import { theme } from "@theme";
|
|
7
|
+
|
|
8
|
+
import { Loader } from "./Loader";
|
|
9
|
+
import { Touchable } from "./Touchable";
|
|
10
|
+
import { Typography } from "./Typography";
|
|
11
|
+
|
|
12
|
+
export const ActionIcon = ({
|
|
13
|
+
isLoading = false,
|
|
14
|
+
icon: Icon,
|
|
15
|
+
onPress,
|
|
16
|
+
size = moderateScale(24),
|
|
17
|
+
color = theme.colors.font.grey800,
|
|
18
|
+
disabled = false,
|
|
19
|
+
label,
|
|
20
|
+
iconProps,
|
|
21
|
+
...rest
|
|
22
|
+
}) => (
|
|
23
|
+
<Touchable
|
|
24
|
+
alignItems="center"
|
|
25
|
+
aspectRatio={1}
|
|
26
|
+
disabled={disabled || isLoading}
|
|
27
|
+
height={moderateScale(40)}
|
|
28
|
+
justifyContent="center"
|
|
29
|
+
maxHeight={moderateScale(64)}
|
|
30
|
+
maxWidth={moderateScale(64)}
|
|
31
|
+
opacity={disabled ? 0.5 : 1}
|
|
32
|
+
onPress={onPress}
|
|
33
|
+
{...rest}
|
|
34
|
+
>
|
|
35
|
+
{isLoading ? <Loader /> : <Icon color={color} size={size} {...iconProps} />}
|
|
36
|
+
{!!label && (
|
|
37
|
+
<Typography
|
|
38
|
+
color="font.grey600"
|
|
39
|
+
fontFamily="sf400"
|
|
40
|
+
fontSize="4xs"
|
|
41
|
+
mt={moderateScale(2)}
|
|
42
|
+
>
|
|
43
|
+
{label}
|
|
44
|
+
</Typography>
|
|
45
|
+
)}
|
|
46
|
+
</Touchable>
|
|
47
|
+
);
|
|
48
|
+
|
|
49
|
+
ActionIcon.propTypes = {
|
|
50
|
+
/**
|
|
51
|
+
* The icon that should be displayed
|
|
52
|
+
*/
|
|
53
|
+
icon: PropTypes.elementType,
|
|
54
|
+
/**
|
|
55
|
+
* The Func that should be triggered on click of the action icon
|
|
56
|
+
*/
|
|
57
|
+
onPress: PropTypes.func,
|
|
58
|
+
/** To customize the size of the icon
|
|
59
|
+
*/
|
|
60
|
+
size: PropTypes.number,
|
|
61
|
+
/** To customize the color of the icon
|
|
62
|
+
*/
|
|
63
|
+
color: PropTypes.string,
|
|
64
|
+
/** To set the disabled state
|
|
65
|
+
*/
|
|
66
|
+
disabled: PropTypes.bool,
|
|
67
|
+
/** The label that should be displayed next to the icon
|
|
68
|
+
*/
|
|
69
|
+
label: PropTypes.string,
|
|
70
|
+
/** To display the loading state
|
|
71
|
+
*/
|
|
72
|
+
isLoading: PropTypes.bool,
|
|
73
|
+
/** To additionally customize the icon
|
|
74
|
+
*/
|
|
75
|
+
iconProps: PropTypes.object,
|
|
76
|
+
};
|
|
@@ -7,18 +7,20 @@ import React, {
|
|
|
7
7
|
useImperativeHandle,
|
|
8
8
|
} from "react";
|
|
9
9
|
|
|
10
|
+
import {
|
|
11
|
+
ChatBubble,
|
|
12
|
+
Notes,
|
|
13
|
+
Attachment,
|
|
14
|
+
Forward,
|
|
15
|
+
CannedResponses,
|
|
16
|
+
Down,
|
|
17
|
+
} from "@bigbinary/neeto-icons-rn";
|
|
10
18
|
import { parse } from "node-html-parser";
|
|
11
19
|
import PropTypes from "prop-types";
|
|
12
|
-
import Icon from "react-native-remix-icon";
|
|
13
20
|
import { moderateScale } from "react-native-size-matters";
|
|
14
21
|
|
|
15
|
-
import AttachmentSVG from "@assets/icons/attachment.svg";
|
|
16
|
-
import CannedResponseSVG from "@assets/icons/canned-response.svg";
|
|
17
22
|
import ExpandSVG from "@assets/icons/expand.svg";
|
|
18
|
-
import ForwardSVG from "@assets/icons/forward.svg";
|
|
19
23
|
import MinimizeSVG from "@assets/icons/minimize.svg";
|
|
20
|
-
import NoteSVG from "@assets/icons/note.svg";
|
|
21
|
-
import ReplySVG from "@assets/icons/reply.svg";
|
|
22
24
|
import { Container, LineLoader, Popover, Button } from "@components";
|
|
23
25
|
|
|
24
26
|
import { AttachmentsView } from "./AttachmentsView";
|
|
@@ -383,19 +385,24 @@ export const ChatInput = forwardRef(
|
|
|
383
385
|
>
|
|
384
386
|
<Container flexDirection="row" justifyContent="space-between">
|
|
385
387
|
<IconButton
|
|
386
|
-
Icon={
|
|
388
|
+
Icon={ChatBubble}
|
|
387
389
|
opacity={isReplyOptionSelected ? 1 : 0.5}
|
|
388
390
|
pl={moderateScale(10)}
|
|
391
|
+
iconProps={{
|
|
392
|
+
viewBox: "0 0 37 37",
|
|
393
|
+
size: moderateScale(30),
|
|
394
|
+
color: theme.colors.font.grey500,
|
|
395
|
+
}}
|
|
389
396
|
onPress={onReplyClickHandler}
|
|
390
397
|
/>
|
|
391
398
|
<IconButton
|
|
392
|
-
Icon={
|
|
399
|
+
Icon={Notes}
|
|
393
400
|
opacity={isNoteOptionSelected ? 1 : 0.5}
|
|
394
401
|
onPress={onAddNoteClickHandler}
|
|
395
402
|
/>
|
|
396
403
|
{onForward && (
|
|
397
404
|
<IconButton
|
|
398
|
-
Icon={
|
|
405
|
+
Icon={Forward}
|
|
399
406
|
opacity={isForwardOptionSelected ? 1 : 0.5}
|
|
400
407
|
onPress={onAddForwardClickHandler}
|
|
401
408
|
/>
|
|
@@ -408,13 +415,17 @@ export const ChatInput = forwardRef(
|
|
|
408
415
|
{onCannedResponse &&
|
|
409
416
|
showCannedResponsesFor.includes(selectedOption) && (
|
|
410
417
|
<IconButton
|
|
411
|
-
Icon={
|
|
418
|
+
Icon={CannedResponses}
|
|
412
419
|
opacity={0.5}
|
|
420
|
+
iconProps={{
|
|
421
|
+
viewBox: "0 0 38 38",
|
|
422
|
+
size: moderateScale(30),
|
|
423
|
+
}}
|
|
413
424
|
onPress={onCannedResponse}
|
|
414
425
|
/>
|
|
415
426
|
)}
|
|
416
427
|
<IconButton
|
|
417
|
-
Icon={
|
|
428
|
+
Icon={Attachment}
|
|
418
429
|
opacity={0.5}
|
|
419
430
|
onPress={onAddAttachmentsClickHandler}
|
|
420
431
|
/>
|
|
@@ -444,10 +455,9 @@ export const ChatInput = forwardRef(
|
|
|
444
455
|
p={0}
|
|
445
456
|
variant="text"
|
|
446
457
|
RightIcon={() => (
|
|
447
|
-
<
|
|
458
|
+
<Down
|
|
448
459
|
color={theme.colors.background.grey800}
|
|
449
|
-
|
|
450
|
-
size={moderateScale(30)}
|
|
460
|
+
size={moderateScale(22)}
|
|
451
461
|
/>
|
|
452
462
|
)}
|
|
453
463
|
/>
|
|
@@ -1,22 +1,34 @@
|
|
|
1
|
-
import React from "react";
|
|
1
|
+
import React, { useContext } from "react";
|
|
2
2
|
|
|
3
3
|
import PropTypes from "prop-types";
|
|
4
4
|
import { moderateScale } from "react-native-size-matters";
|
|
5
|
+
import { ThemeContext } from "styled-components/native";
|
|
5
6
|
|
|
6
7
|
import { Touchable } from "@components";
|
|
7
8
|
|
|
8
|
-
export const IconButton = ({ Icon, ...rest }) =>
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
9
|
+
export const IconButton = ({ Icon, iconProps, ...rest }) => {
|
|
10
|
+
const theme = useContext(ThemeContext);
|
|
11
|
+
|
|
12
|
+
return (
|
|
13
|
+
<Touchable
|
|
14
|
+
alignItems="center"
|
|
15
|
+
height={moderateScale(22)}
|
|
16
|
+
px={moderateScale(18)}
|
|
17
|
+
width={moderateScale(22)}
|
|
18
|
+
{...rest}
|
|
19
|
+
>
|
|
20
|
+
{
|
|
21
|
+
<Icon
|
|
22
|
+
color={theme.colors.font.grey800}
|
|
23
|
+
size={moderateScale(22)}
|
|
24
|
+
{...iconProps}
|
|
25
|
+
/>
|
|
26
|
+
}
|
|
27
|
+
</Touchable>
|
|
28
|
+
);
|
|
29
|
+
};
|
|
19
30
|
|
|
20
31
|
IconButton.propTypes = {
|
|
21
32
|
Icon: PropTypes.elementType,
|
|
33
|
+
iconProps: PropTypes.object,
|
|
22
34
|
};
|
|
@@ -1,7 +1,10 @@
|
|
|
1
1
|
import React, { useContext } from "react";
|
|
2
2
|
|
|
3
|
+
import {
|
|
4
|
+
Checkbox as CheckboxIcon,
|
|
5
|
+
CheckboxInactive,
|
|
6
|
+
} from "@bigbinary/neeto-icons-rn";
|
|
3
7
|
import Proptypes from "prop-types";
|
|
4
|
-
import Icon from "react-native-remix-icon";
|
|
5
8
|
import { moderateScale } from "react-native-size-matters";
|
|
6
9
|
import { ThemeContext } from "styled-components/native";
|
|
7
10
|
|
|
@@ -82,6 +85,8 @@ export const CheckBox = ({
|
|
|
82
85
|
},
|
|
83
86
|
};
|
|
84
87
|
|
|
88
|
+
const Icon = checked ? CheckboxIcon : CheckboxInactive;
|
|
89
|
+
|
|
85
90
|
return (
|
|
86
91
|
<Touchable
|
|
87
92
|
alignItems="center"
|
|
@@ -105,8 +110,7 @@ export const CheckBox = ({
|
|
|
105
110
|
</Typography>
|
|
106
111
|
<Icon
|
|
107
112
|
color={theme.colors.font.primary}
|
|
108
|
-
|
|
109
|
-
size={moderateScale(20)}
|
|
113
|
+
size={moderateScale(22)}
|
|
110
114
|
{...checkIconStyle}
|
|
111
115
|
/>
|
|
112
116
|
</Touchable>
|
package/src/components/Chip.jsx
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React from "react";
|
|
2
2
|
|
|
3
|
+
import { Close } from "@bigbinary/neeto-icons-rn";
|
|
3
4
|
import PropTypes from "prop-types";
|
|
4
|
-
import Icon from "react-native-remix-icon";
|
|
5
5
|
import { moderateScale } from "react-native-size-matters";
|
|
6
6
|
|
|
7
7
|
import { Typography, Touchable, Container } from "@components";
|
|
@@ -68,7 +68,8 @@ export const Chip = ({
|
|
|
68
68
|
onChipPress,
|
|
69
69
|
isDisabled,
|
|
70
70
|
closeIconSize,
|
|
71
|
-
closeIcon,
|
|
71
|
+
closeIcon: CloseIcon,
|
|
72
|
+
closeIconProps,
|
|
72
73
|
containerStyle,
|
|
73
74
|
closeIconContainerStyle,
|
|
74
75
|
}) => (
|
|
@@ -103,7 +104,11 @@ export const Chip = ({
|
|
|
103
104
|
{...closeIconContainerStyle}
|
|
104
105
|
>
|
|
105
106
|
<Touchable disabled={isDisabled} onPress={onClose}>
|
|
106
|
-
<
|
|
107
|
+
<CloseIcon
|
|
108
|
+
color={closeIconColor}
|
|
109
|
+
size={closeIconSize}
|
|
110
|
+
{...closeIconProps}
|
|
111
|
+
/>
|
|
107
112
|
</Touchable>
|
|
108
113
|
</Container>
|
|
109
114
|
)}
|
|
@@ -115,9 +120,10 @@ Chip.defaultProps = {
|
|
|
115
120
|
labelColor: "font.primary",
|
|
116
121
|
closeIconBackground: "background.grey500",
|
|
117
122
|
closeIconColor: "white",
|
|
123
|
+
closeIconProps: { viewBox: "0 0 25 25" },
|
|
118
124
|
isDisabled: false,
|
|
119
125
|
closeIconSize: moderateScale(14),
|
|
120
|
-
closeIcon:
|
|
126
|
+
closeIcon: Close,
|
|
121
127
|
};
|
|
122
128
|
|
|
123
129
|
Chip.propTypes = {
|
|
@@ -154,9 +160,13 @@ Chip.propTypes = {
|
|
|
154
160
|
*/
|
|
155
161
|
closeIconSize: PropTypes.number,
|
|
156
162
|
/**
|
|
157
|
-
* Close icon
|
|
163
|
+
* Close icon can be specified if default one needs to changed. Only supports neeto-icons.
|
|
158
164
|
*/
|
|
159
|
-
closeIcon: PropTypes.
|
|
165
|
+
closeIcon: PropTypes.elementType,
|
|
166
|
+
/**
|
|
167
|
+
* Add additional customization to close icon.
|
|
168
|
+
*/
|
|
169
|
+
closeIconProps: PropTypes.object,
|
|
160
170
|
/**
|
|
161
171
|
* Expects a function to execute on chip press.
|
|
162
172
|
*/
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import React, { useContext, useEffect, useState } from "react";
|
|
2
2
|
import { Keyboard, TouchableWithoutFeedback } from "react-native";
|
|
3
3
|
|
|
4
|
+
import { Close, Up, Down } from "@bigbinary/neeto-icons-rn";
|
|
4
5
|
import PropTypes from "prop-types";
|
|
5
6
|
import Animated, {
|
|
6
7
|
interpolate,
|
|
@@ -8,7 +9,6 @@ import Animated, {
|
|
|
8
9
|
useSharedValue,
|
|
9
10
|
withTiming,
|
|
10
11
|
} from "react-native-reanimated";
|
|
11
|
-
import Icon from "react-native-remix-icon";
|
|
12
12
|
import { moderateScale } from "react-native-size-matters";
|
|
13
13
|
import styled, { ThemeContext } from "styled-components/native";
|
|
14
14
|
import {
|
|
@@ -106,10 +106,10 @@ const MultiSelectItem = ({
|
|
|
106
106
|
disabled={disabled}
|
|
107
107
|
onPress={handleItemUnSelection}
|
|
108
108
|
>
|
|
109
|
-
<
|
|
109
|
+
<Close
|
|
110
110
|
color={theme.colors.font.grey800}
|
|
111
|
-
|
|
112
|
-
|
|
111
|
+
size={moderateScale(18)}
|
|
112
|
+
viewBox="0 0 25 20"
|
|
113
113
|
/>
|
|
114
114
|
</TouchableWithoutFeedback>
|
|
115
115
|
)}
|
|
@@ -337,6 +337,8 @@ export const MultiSelect = ({
|
|
|
337
337
|
fontSize: interpolate(animatedLabelValue.value, [0, 1], [17, 13]),
|
|
338
338
|
}));
|
|
339
339
|
|
|
340
|
+
const OpenCloseIcon = showDropdown ? Up : Down;
|
|
341
|
+
|
|
340
342
|
return (
|
|
341
343
|
<Container {...containerStyle}>
|
|
342
344
|
<TouchableWithoutFeedback
|
|
@@ -419,11 +421,7 @@ export const MultiSelect = ({
|
|
|
419
421
|
{isLoading ? (
|
|
420
422
|
<Loader color={theme.colors.background.base} />
|
|
421
423
|
) : (
|
|
422
|
-
<
|
|
423
|
-
color="grey"
|
|
424
|
-
name={`arrow-${showDropdown ? "up" : "down"}-s-line`}
|
|
425
|
-
size={moderateScale(20)}
|
|
426
|
-
/>
|
|
424
|
+
<OpenCloseIcon color="grey" size={moderateScale(20)} />
|
|
427
425
|
)}
|
|
428
426
|
</Container>
|
|
429
427
|
</Container>
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
|
|
3
|
+
import { Notification } from "@bigbinary/neeto-icons-rn";
|
|
4
|
+
import PropTypes from "prop-types";
|
|
5
|
+
|
|
6
|
+
import { ActionIcon } from "./ActionIcon";
|
|
7
|
+
import { Container } from "./Container";
|
|
8
|
+
|
|
9
|
+
export const NotificationIcon = ({ unreadCount = 0, onPress = () => {} }) => (
|
|
10
|
+
<Container>
|
|
11
|
+
<ActionIcon icon={Notification} {...{ onPress }} />
|
|
12
|
+
{unreadCount > 0 && (
|
|
13
|
+
<Container
|
|
14
|
+
bg="background.danger"
|
|
15
|
+
borderRadius={5}
|
|
16
|
+
height={10}
|
|
17
|
+
position="absolute"
|
|
18
|
+
px={2}
|
|
19
|
+
py={1}
|
|
20
|
+
right={10}
|
|
21
|
+
top={7}
|
|
22
|
+
width={10}
|
|
23
|
+
zIndex={1}
|
|
24
|
+
/>
|
|
25
|
+
)}
|
|
26
|
+
</Container>
|
|
27
|
+
);
|
|
28
|
+
|
|
29
|
+
NotificationIcon.propTypes = {
|
|
30
|
+
/**
|
|
31
|
+
* The unread notifications count to show red indicator
|
|
32
|
+
*/
|
|
33
|
+
unreadCount: PropTypes.number,
|
|
34
|
+
/**
|
|
35
|
+
* Func which will be triggered on click of the notification icon.
|
|
36
|
+
*/
|
|
37
|
+
onPress: PropTypes.func,
|
|
38
|
+
};
|
|
@@ -90,7 +90,6 @@ PopOverItem.propTypes = {
|
|
|
90
90
|
* import * as React from 'react';
|
|
91
91
|
* import { Text } from "react-native";
|
|
92
92
|
* import { Container, Button, Popover } from '@bigbinary/neetoui-rn';
|
|
93
|
-
* import Icon from "react-native-remix-icon";
|
|
94
93
|
* import { ThemeContext } from "styled-components/native";
|
|
95
94
|
*
|
|
96
95
|
* export default function Main(){
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React, { useContext } from "react";
|
|
2
2
|
|
|
3
|
+
import { Radio, RadioInactive } from "@bigbinary/neeto-icons-rn";
|
|
3
4
|
import Proptypes from "prop-types";
|
|
4
|
-
import Icon from "react-native-remix-icon";
|
|
5
5
|
import { moderateScale } from "react-native-size-matters";
|
|
6
6
|
import { ThemeContext } from "styled-components/native";
|
|
7
7
|
|
|
@@ -90,6 +90,8 @@ export const RadioButton = ({
|
|
|
90
90
|
},
|
|
91
91
|
};
|
|
92
92
|
|
|
93
|
+
const Icon = selected ? Radio : RadioInactive;
|
|
94
|
+
|
|
93
95
|
return (
|
|
94
96
|
<Touchable
|
|
95
97
|
alignItems="center"
|
|
@@ -113,8 +115,7 @@ export const RadioButton = ({
|
|
|
113
115
|
</Typography>
|
|
114
116
|
<Icon
|
|
115
117
|
color={theme.colors.font.primary}
|
|
116
|
-
|
|
117
|
-
size={moderateScale(20)}
|
|
118
|
+
size={moderateScale(22)}
|
|
118
119
|
{...selectIconStyle}
|
|
119
120
|
/>
|
|
120
121
|
</Touchable>
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import React, { useEffect, useRef, useState } from "react";
|
|
2
2
|
import { Dimensions, TouchableWithoutFeedback, StyleSheet } from "react-native";
|
|
3
3
|
|
|
4
|
+
import { Search } from "@bigbinary/neeto-icons-rn";
|
|
4
5
|
import PropTypes from "prop-types";
|
|
5
6
|
import Animated, {
|
|
6
7
|
Easing,
|
|
@@ -9,7 +10,6 @@ import Animated, {
|
|
|
9
10
|
useSharedValue,
|
|
10
11
|
withTiming,
|
|
11
12
|
} from "react-native-reanimated";
|
|
12
|
-
import Icon from "react-native-remix-icon";
|
|
13
13
|
import { moderateScale } from "react-native-size-matters";
|
|
14
14
|
import styled from "styled-components/native";
|
|
15
15
|
import {
|
|
@@ -125,10 +125,9 @@ export const SearchBar = ({
|
|
|
125
125
|
{...containerProps}
|
|
126
126
|
>
|
|
127
127
|
<Container px={moderateScale(8)}>
|
|
128
|
-
<
|
|
128
|
+
<Search
|
|
129
129
|
color={theme.colors.font.grey600}
|
|
130
|
-
|
|
131
|
-
size={moderateScale(20)}
|
|
130
|
+
size={moderateScale(22)}
|
|
132
131
|
/>
|
|
133
132
|
</Container>
|
|
134
133
|
<TextInput
|
package/src/components/Toast.jsx
CHANGED
|
@@ -2,9 +2,9 @@ import * as React from "react";
|
|
|
2
2
|
import { useContext, useEffect } from "react";
|
|
3
3
|
import { useWindowDimensions } from "react-native";
|
|
4
4
|
|
|
5
|
+
import { Close } from "@bigbinary/neeto-icons-rn";
|
|
5
6
|
import PropTypes from "prop-types";
|
|
6
7
|
import DeviceInfo from "react-native-device-info";
|
|
7
|
-
import CloseIcon from "react-native-remix-icon";
|
|
8
8
|
import { moderateScale } from "react-native-size-matters";
|
|
9
9
|
import T from "react-native-toast-message";
|
|
10
10
|
import { ThemeContext } from "styled-components/native";
|
|
@@ -104,7 +104,7 @@ const ToastComponent = ({ type, text1, text2, hide, isVisible }) => {
|
|
|
104
104
|
hide();
|
|
105
105
|
}}
|
|
106
106
|
>
|
|
107
|
-
<
|
|
107
|
+
<Close color={theme.colors.font.grey500} size={moderateScale(22)} />
|
|
108
108
|
</Touchable>
|
|
109
109
|
</Card>
|
|
110
110
|
);
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import React, { useContext, useEffect, useRef } from "react";
|
|
2
2
|
import { Animated } from "react-native";
|
|
3
3
|
|
|
4
|
+
import { Check, Close } from "@bigbinary/neeto-icons-rn";
|
|
4
5
|
import PropTypes from "prop-types";
|
|
5
|
-
import Icon from "react-native-remix-icon";
|
|
6
6
|
import { moderateScale } from "react-native-size-matters";
|
|
7
7
|
import { ThemeContext } from "styled-components/native";
|
|
8
8
|
|
|
@@ -61,6 +61,8 @@ export const ToggleSwitch = ({ value, onValueChange, disabled }) => {
|
|
|
61
61
|
? theme.colors.background.purple500
|
|
62
62
|
: theme.colors.font.grey500;
|
|
63
63
|
|
|
64
|
+
const Icon = value ? Check : Close;
|
|
65
|
+
|
|
64
66
|
return (
|
|
65
67
|
<Touchable
|
|
66
68
|
bg={containerBg}
|
|
@@ -85,8 +87,8 @@ export const ToggleSwitch = ({ value, onValueChange, disabled }) => {
|
|
|
85
87
|
>
|
|
86
88
|
<Icon
|
|
87
89
|
color={iconColor}
|
|
88
|
-
|
|
89
|
-
|
|
90
|
+
size={moderateScale(18)}
|
|
91
|
+
viewBox={value ? "0 0 22 27" : "0 0 25 25"}
|
|
90
92
|
/>
|
|
91
93
|
</Container>
|
|
92
94
|
</Animated.View>
|
package/src/components/index.js
CHANGED
|
@@ -41,3 +41,5 @@ export { ChatInput } from "./ChatInput/ChatInput";
|
|
|
41
41
|
export { Loader } from "./Loader";
|
|
42
42
|
export { InputEmailChip } from "./InputEmailChip";
|
|
43
43
|
export { LineLoader } from "./LineLoader";
|
|
44
|
+
export { ActionIcon } from "./ActionIcon";
|
|
45
|
+
export { NotificationIcon } from "./NotificationIcon";
|
|
@@ -1,18 +1,15 @@
|
|
|
1
1
|
import React from "react";
|
|
2
2
|
import { Pressable, StyleSheet } from "react-native";
|
|
3
3
|
|
|
4
|
-
import
|
|
4
|
+
import { Close } from "@bigbinary/neeto-icons-rn";
|
|
5
|
+
import { moderateScale } from "react-native-size-matters";
|
|
5
6
|
import Toast, { BaseToast } from "react-native-toast-message";
|
|
6
7
|
|
|
7
8
|
import { theme } from "@theme";
|
|
8
9
|
|
|
9
10
|
const CloseButton = () => (
|
|
10
11
|
<Pressable style={styles.closeButtonStyle} onPress={Toast.hide}>
|
|
11
|
-
<
|
|
12
|
-
color={theme.colors.background.white}
|
|
13
|
-
name="ri-close-fill"
|
|
14
|
-
size={25}
|
|
15
|
-
/>
|
|
12
|
+
<Close color={theme.colors.background.white} size={moderateScale(22)} />
|
|
16
13
|
</Pressable>
|
|
17
14
|
);
|
|
18
15
|
|
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
<svg width="12" height="22" viewBox="0 0 12 22" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
2
|
-
<path d="M12 16.1163V6.90698C12 6.48233 11.6504 6.13953 11.2174 6.13953C10.7843 6.13953 10.4348 6.48233 10.4348 6.90698V16.1163C10.4348 18.5158 8.44696 20.4651 6 20.4651C3.55304 20.4651 1.56522 18.5158 1.56522 16.1163V4.34884C1.56522 2.7986 2.85391 1.53488 4.43478 1.53488C6.01565 1.53488 7.30435 2.7986 7.30435 4.34884V15.3488C7.30435 16.0549 6.72 16.6279 6 16.6279C5.28 16.6279 4.69565 16.0549 4.69565 15.3488V5.37209C4.69565 4.94744 4.34609 4.60465 3.91304 4.60465C3.48 4.60465 3.13043 4.94744 3.13043 5.37209V15.3488C3.13043 16.8991 4.41913 18.1628 6 18.1628C7.58087 18.1628 8.86957 16.8991 8.86957 15.3488V4.34884C8.86957 1.9493 6.88174 0 4.43478 0C1.98783 0 0 1.9493 0 4.34884V16.1163C0 19.36 2.69217 22 6 22C9.30783 22 12 19.36 12 16.1163Z" fill="#2F3941"/>
|
|
3
|
-
</svg>
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
2
|
-
<path d="M10 5H3V21L7.5 18.3H19V11" stroke="#323232" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>
|
|
3
|
-
<path d="M21 5H14" stroke="#323232" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>
|
|
4
|
-
<path d="M18.999 3L21 5L18.999 7" stroke="#323232" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>
|
|
5
|
-
</svg>
|
package/assets/icons/forward.svg
DELETED
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
2
|
-
<path fill-rule="evenodd" clip-rule="evenodd" d="M13 13.097V16.165C13 17.032 14.029 17.488 14.672 16.906L20.702 11.44C21.15 11.034 21.138 10.327 20.677 9.93697L14.647 4.81897C13.997 4.26697 13 4.72897 13 5.58097V8.01797C7.537 8.01797 3 11.39 3 17V18.129C4.847 14.445 8.687 13.097 13 13.097Z" stroke="#323232" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>
|
|
3
|
-
</svg>
|
package/assets/icons/note.svg
DELETED
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
2
|
-
<path fill-rule="evenodd" clip-rule="evenodd" d="M18.414 6.414L15.586 3.586C15.211 3.211 14.702 3 14.172 3H7C5.895 3 5 3.895 5 5V19C5 20.105 5.895 21 7 21H17C18.105 21 19 20.105 19 19V7.828C19 7.298 18.789 6.789 18.414 6.414V6.414Z" stroke="#323232" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>
|
|
3
|
-
<path d="M19 8H15C14.448 8 14 7.552 14 7V3" stroke="#323232" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>
|
|
4
|
-
</svg>
|