@bigbinary/neetoui-rn 0.0.223 → 0.0.225

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.
Files changed (92) hide show
  1. package/lib/components/Accordion.js +1 -1
  2. package/lib/components/Alert.js +1 -1
  3. package/lib/components/AnimatedImage.js +1 -1
  4. package/lib/components/Avatar.js +1 -1
  5. package/lib/components/Badge.js +1 -1
  6. package/lib/components/BottomSheet.js +1 -1
  7. package/lib/components/BottomTabBar.js +1 -1
  8. package/lib/components/Button.js +1 -1
  9. package/lib/components/ButtonGroup.js +1 -1
  10. package/lib/components/Calendar.js +1 -1
  11. package/lib/components/Card.js +1 -1
  12. package/lib/components/Carousel.js +1 -1
  13. package/lib/components/CheckBox.js +1 -1
  14. package/lib/components/Chip.js +1 -1
  15. package/lib/components/Container.js +1 -1
  16. package/lib/components/Divider.js +1 -1
  17. package/lib/components/FAB.js +1 -1
  18. package/lib/components/FlashList.js +1 -1
  19. package/lib/components/FlatList.js +1 -1
  20. package/lib/components/Input.js +1 -1
  21. package/lib/components/ListItem.js +1 -1
  22. package/lib/components/Loader.js +1 -1
  23. package/lib/components/MultiSelect.js +1 -1
  24. package/lib/components/NotificationPreferenceList.js +1 -1
  25. package/lib/components/OnBoarding.js +1 -1
  26. package/lib/components/OrganizationItem.js +1 -1
  27. package/lib/components/OtpInputs.js +1 -1
  28. package/lib/components/ParentView.js +1 -1
  29. package/lib/components/Popover.js +1 -1
  30. package/lib/components/RadioButton.js +1 -1
  31. package/lib/components/RichTextEditor.js +1 -1
  32. package/lib/components/ScrollView.js +1 -1
  33. package/lib/components/SearchBar.js +1 -1
  34. package/lib/components/SegmentedTopBar.js +1 -1
  35. package/lib/components/Select.js +1 -1
  36. package/lib/components/SocialButton.js +1 -1
  37. package/lib/components/Toast.js +1 -1
  38. package/lib/components/ToggleSwitch.js +1 -1
  39. package/lib/components/TopBar.js +1 -1
  40. package/lib/components/Touchable.js +1 -1
  41. package/lib/components/Typography.js +1 -1
  42. package/lib/config/toasterConfig.js +1 -1
  43. package/lib/index.js +1 -1
  44. package/package.json +10 -7
  45. package/src/components/{Accordion.js → Accordion.jsx} +11 -12
  46. package/src/components/{Alert.js → Alert.jsx} +30 -29
  47. package/src/components/{AnimatedImage.js → AnimatedImage.jsx} +52 -55
  48. package/src/components/{Avatar.js → Avatar.jsx} +36 -39
  49. package/src/components/{Badge.js → Badge.jsx} +19 -20
  50. package/src/components/{BottomSheet.js → BottomSheet.jsx} +81 -87
  51. package/src/components/{BottomTabBar.js → BottomTabBar.jsx} +71 -77
  52. package/src/components/{Button.js → Button.jsx} +18 -15
  53. package/src/components/{ButtonGroup.js → ButtonGroup.jsx} +35 -38
  54. package/src/components/{Calendar.js → Calendar.jsx} +3 -2
  55. package/src/components/{Card.js → Card.jsx} +5 -2
  56. package/src/components/{Carousel.js → Carousel.jsx} +6 -6
  57. package/src/components/{CheckBox.js → CheckBox.jsx} +12 -8
  58. package/src/components/{Chip.js → Chip.jsx} +30 -31
  59. package/src/components/{Container.js → Container.jsx} +6 -5
  60. package/src/components/{Divider.js → Divider.jsx} +3 -2
  61. package/src/components/{FAB.js → FAB.jsx} +3 -2
  62. package/src/components/{FlashList.js → FlashList.jsx} +54 -53
  63. package/src/components/FlatList.js +1 -1
  64. package/src/components/{Input.js → Input.jsx} +43 -43
  65. package/src/components/{ListItem.js → ListItem.jsx} +24 -25
  66. package/src/components/{Loader.js → Loader.jsx} +11 -9
  67. package/src/components/{MultiSelect.js → MultiSelect.jsx} +62 -68
  68. package/src/components/{NotificationPreferenceList.js → NotificationPreferenceList.jsx} +43 -43
  69. package/src/components/{OnBoarding.js → OnBoarding.jsx} +24 -27
  70. package/src/components/OrganizationItem.jsx +107 -0
  71. package/src/components/{OtpInputs.js → OtpInputs.jsx} +35 -34
  72. package/src/components/{ParentView.js → ParentView.jsx} +5 -3
  73. package/src/components/{Popover.js → Popover.jsx} +21 -22
  74. package/src/components/{RadioButton.js → RadioButton.jsx} +10 -6
  75. package/src/components/{RichTextEditor.js → RichTextEditor.jsx} +32 -34
  76. package/src/components/ScrollView.js +1 -1
  77. package/src/components/{SearchBar.js → SearchBar.jsx} +22 -22
  78. package/src/components/{SegmentedTopBar.js → SegmentedTopBar.jsx} +15 -17
  79. package/src/components/{Select.js → Select.jsx} +33 -30
  80. package/src/components/{SocialButton.js → SocialButton.jsx} +9 -8
  81. package/src/components/{Toast.js → Toast.jsx} +25 -22
  82. package/src/components/{ToggleSwitch.js → ToggleSwitch.jsx} +12 -11
  83. package/src/components/{TopBar.js → TopBar.jsx} +4 -4
  84. package/src/components/{Touchable.js → Touchable.jsx} +9 -4
  85. package/src/components/{Typography.js → Typography.jsx} +6 -5
  86. package/src/config/{toasterConfig.js → toasterConfig.jsx} +23 -24
  87. package/src/hooks/useDebounce.js +1 -0
  88. package/src/hooks/useKeyboard.js +1 -0
  89. package/src/index.js +2 -2
  90. package/src/theme/index.js +1 -1
  91. package/src/utils/utils.js +2 -1
  92. package/src/components/OrganizationItem.js +0 -116
@@ -1,33 +1,32 @@
1
1
  import React from "react";
2
- import Toast, { BaseToast } from "react-native-toast-message";
3
2
  import { Pressable, StyleSheet } from "react-native";
3
+
4
4
  import Icon from "react-native-remix-icon";
5
+ import Toast, { BaseToast } from "react-native-toast-message";
5
6
 
6
7
  import { theme } from "@theme";
7
8
 
8
- const CloseButton = () => {
9
- return (
10
- <Pressable style={styles.closeButtonStyle} onPress={Toast.hide}>
11
- <Icon
12
- name="ri-close-fill"
13
- size={25}
14
- color={theme.colors.background.white}
15
- />
16
- </Pressable>
17
- );
18
- };
9
+ const CloseButton = () => (
10
+ <Pressable style={styles.closeButtonStyle} onPress={Toast.hide}>
11
+ <Icon
12
+ color={theme.colors.background.white}
13
+ name="ri-close-fill"
14
+ size={25}
15
+ />
16
+ </Pressable>
17
+ );
19
18
 
20
19
  export const defaultToasterConfig = {
21
20
  success: props => (
22
21
  <BaseToast
23
22
  {...props}
23
+ contentContainerStyle={styles.contentContainerStyle}
24
24
  leadingIconContainerStyle={styles.toasterBGColor}
25
25
  renderTrailingIcon={() => <CloseButton />}
26
- contentContainerStyle={styles.contentContainerStyle}
27
- text1Style={styles.text1Style}
28
- text2Style={styles.text2Style}
29
26
  text1NumberOfLines={10}
27
+ text1Style={styles.text1Style}
30
28
  text2NumberOfLines={10}
29
+ text2Style={styles.text2Style}
31
30
  touchableContainerProps={{
32
31
  style: [styles.touchableContainerProps, styles.successStyle],
33
32
  }}
@@ -36,13 +35,13 @@ export const defaultToasterConfig = {
36
35
  error: props => (
37
36
  <BaseToast
38
37
  {...props}
38
+ contentContainerStyle={styles.contentContainerStyle}
39
39
  leadingIconContainerStyle={styles.toasterBGColor}
40
40
  renderTrailingIcon={() => <CloseButton />}
41
- contentContainerStyle={styles.contentContainerStyle}
42
- text1Style={styles.text1Style}
43
- text2Style={styles.text2Style}
44
41
  text1NumberOfLines={10}
42
+ text1Style={styles.text1Style}
45
43
  text2NumberOfLines={10}
44
+ text2Style={styles.text2Style}
46
45
  touchableContainerProps={{
47
46
  style: [styles.touchableContainerProps, styles.errorStyle],
48
47
  }}
@@ -51,13 +50,13 @@ export const defaultToasterConfig = {
51
50
  info: props => (
52
51
  <BaseToast
53
52
  {...props}
53
+ contentContainerStyle={styles.contentContainerStyle}
54
54
  leadingIconContainerStyle={styles.toasterBGColor}
55
55
  renderTrailingIcon={() => <CloseButton />}
56
- contentContainerStyle={styles.contentContainerStyle}
57
- text1Style={styles.text1Style}
58
- text2Style={styles.text2Style}
59
56
  text1NumberOfLines={10}
57
+ text1Style={styles.text1Style}
60
58
  text2NumberOfLines={10}
59
+ text2Style={styles.text2Style}
61
60
  touchableContainerProps={{
62
61
  style: [styles.touchableContainerProps, styles.infoStyle],
63
62
  }}
@@ -66,13 +65,13 @@ export const defaultToasterConfig = {
66
65
  warning: props => (
67
66
  <BaseToast
68
67
  {...props}
68
+ contentContainerStyle={styles.contentContainerStyle}
69
69
  leadingIconContainerStyle={styles.toasterBGColor}
70
70
  renderTrailingIcon={() => <CloseButton />}
71
- contentContainerStyle={styles.contentContainerStyle}
72
- text1Style={styles.text1Style}
73
- text2Style={styles.text2Style}
74
71
  text1NumberOfLines={10}
72
+ text1Style={styles.text1Style}
75
73
  text2NumberOfLines={10}
74
+ text2Style={styles.text2Style}
76
75
  touchableContainerProps={{
77
76
  style: [styles.touchableContainerProps, styles.warningStyle],
78
77
  }}
@@ -7,6 +7,7 @@ export function useDebounce(value, delay) {
7
7
  const handler = setTimeout(() => {
8
8
  setDebouncedValue(value);
9
9
  }, delay);
10
+
10
11
  return () => {
11
12
  clearTimeout(handler);
12
13
  };
@@ -17,6 +17,7 @@ export function useKeyboard() {
17
17
  "keyboardDidShow",
18
18
  onKeyboardDidShow
19
19
  );
20
+
20
21
  const keyboardDidHideListener = Keyboard.addListener(
21
22
  "keyboardDidHide",
22
23
  onKeyboardDidHide
package/src/index.js CHANGED
@@ -1,2 +1,2 @@
1
- export * from "./components/index";
2
- export * from "./theme/index";
1
+ export * from "./components";
2
+ export * from "./theme";
@@ -117,7 +117,7 @@ const baseTheme = {
117
117
  };
118
118
 
119
119
  //aliases
120
- baseTheme.lineHeights.note = baseTheme.lineHeights[0] + "px";
120
+ baseTheme.lineHeights.note = `${baseTheme.lineHeights[0]}px`;
121
121
 
122
122
  export const theme = {
123
123
  ...baseTheme,
@@ -10,6 +10,7 @@ const shadowOpacityList = [
10
10
 
11
11
  export const getShadowStyles = (elevation = 0) => {
12
12
  if (elevation > 24) elevation = 24;
13
+
13
14
  return {
14
15
  shadowOffset: {
15
16
  width: 0,
@@ -17,6 +18,6 @@ export const getShadowStyles = (elevation = 0) => {
17
18
  },
18
19
  shadowRadius: shadowRadiusList[elevation - 1],
19
20
  shadowOpacity: shadowOpacityList[elevation - 1],
20
- elevation: elevation,
21
+ elevation,
21
22
  };
22
23
  };
@@ -1,116 +0,0 @@
1
- import React, { useContext } from "react";
2
- import PropTypes from "prop-types";
3
- import Icon from "react-native-remix-icon";
4
-
5
- import { Container, Typography } from "@components";
6
- import { ThemeContext } from "styled-components/native";
7
-
8
- /**
9
- *
10
- * Buttons are touchable elements used to interact with the screen and to trigger an action.
11
- *
12
- * <div class="screenshots">
13
- * <img src="screenshots/organizationItem/organizationItem.png" />
14
- * </div>
15
- *
16
- * ## Usage
17
- * ```js
18
- * import * as React from 'react';
19
- * import { OrganizationItem } from '@bigbinary/neetoui-rn';
20
- *
21
- * export default function Main() {
22
- * return (
23
- * <OrganizationItem name="BigBinary Solutions Pvt. Ltd." />
24
- * );
25
- * }
26
- * ```
27
- *
28
- */
29
-
30
- export const OrganizationItem = ({
31
- label,
32
- labelContainerProps,
33
- iconContainerProps,
34
- iconProps,
35
- labelProps,
36
- name,
37
- nameProps,
38
- ...rest
39
- }) => {
40
- const theme = useContext(ThemeContext);
41
- return (
42
- <Container
43
- bg="background.secondary"
44
- width="100%"
45
- px={16}
46
- py={12}
47
- borderRadius={6}
48
- justifyContent="space-between"
49
- {...rest}
50
- >
51
- <Container
52
- flexDirection="row"
53
- alignItems="center"
54
- {...labelContainerProps}
55
- >
56
- <Container mr={9} {...iconContainerProps}>
57
- <Icon
58
- size={20}
59
- color={theme.colors.font.grey800}
60
- name="building-line"
61
- {...iconProps}
62
- />
63
- </Container>
64
- <Typography
65
- color="font.grey800"
66
- fontSize="l"
67
- fontFamily="sf500"
68
- {...labelProps}
69
- >
70
- {label || "Organization"}
71
- </Typography>
72
- </Container>
73
- <Typography
74
- ml={29}
75
- color="font.grey"
76
- fontSize="m"
77
- fontFamily="sf500"
78
- mt="8px"
79
- {...nameProps}
80
- >
81
- {name}
82
- </Typography>
83
- </Container>
84
- );
85
- };
86
-
87
- OrganizationItem.propTypes = {
88
- /**
89
- * Organization label
90
- */
91
- label: PropTypes.string,
92
- /**
93
- * Customize label container
94
- */
95
- labelContainerProps: PropTypes.object,
96
- /**
97
- * Customize icon container
98
- */
99
- iconContainerProps: PropTypes.object,
100
- /**
101
- * Customize icon
102
- */
103
- iconProps: PropTypes.object,
104
- /**
105
- * Customize label
106
- */
107
- labelProps: PropTypes.object,
108
- /**
109
- * Organization name
110
- */
111
- name: PropTypes.string.isRequired,
112
- /**
113
- * Customize name
114
- */
115
- nameProps: PropTypes.object,
116
- };