@adiraku/react-native-ui 1.2.9-canary-7 → 2.0.0-canary-2

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 (274) hide show
  1. package/lib/commonjs/components/ActionList/ActionList.component.js +8 -7
  2. package/lib/commonjs/components/ActionList/ActionList.component.js.map +1 -1
  3. package/lib/commonjs/components/ActionList/ActionList.styles.js +13 -10
  4. package/lib/commonjs/components/ActionList/ActionList.styles.js.map +1 -1
  5. package/lib/commonjs/components/Appbar/Appbar.component.js +5 -4
  6. package/lib/commonjs/components/Appbar/Appbar.component.js.map +1 -1
  7. package/lib/commonjs/components/Appbar/Appbar.style.js +15 -12
  8. package/lib/commonjs/components/Appbar/Appbar.style.js.map +1 -1
  9. package/lib/commonjs/components/BottomSheet/BottomSheet.component.js +1 -1
  10. package/lib/commonjs/components/BottomSheet/BottomSheet.component.js.map +1 -1
  11. package/lib/commonjs/components/BottomSheet/BottomSheet.style.js +10 -8
  12. package/lib/commonjs/components/BottomSheet/BottomSheet.style.js.map +1 -1
  13. package/lib/commonjs/components/CheckBoxInput/CheckBoxInput.component.js +16 -16
  14. package/lib/commonjs/components/CheckBoxInput/CheckBoxInput.component.js.map +1 -1
  15. package/lib/commonjs/components/CheckBoxInput/CheckBoxInput.style.js +35 -25
  16. package/lib/commonjs/components/CheckBoxInput/CheckBoxInput.style.js.map +1 -1
  17. package/lib/commonjs/components/Checkbox/Checkbox.component.js +8 -4
  18. package/lib/commonjs/components/Checkbox/Checkbox.component.js.map +1 -1
  19. package/lib/commonjs/components/Checkbox/Checkbox.style.js +16 -17
  20. package/lib/commonjs/components/Checkbox/Checkbox.style.js.map +1 -1
  21. package/lib/commonjs/components/Pagination/pagination.component.js +39 -0
  22. package/lib/commonjs/components/Pagination/pagination.component.js.map +1 -0
  23. package/lib/commonjs/components/Pagination/pagination.style.js +26 -0
  24. package/lib/commonjs/components/Pagination/pagination.style.js.map +1 -0
  25. package/lib/commonjs/components/Pagination/pagination.type.js +2 -0
  26. package/lib/commonjs/components/Pagination/pagination.type.js.map +1 -0
  27. package/lib/commonjs/components/RadioButton/RadioButton.component.js +1 -1
  28. package/lib/commonjs/components/RadioButton/RadioButton.component.js.map +1 -1
  29. package/lib/commonjs/components/RadioButton/RadioButton.style.js +15 -12
  30. package/lib/commonjs/components/RadioButton/RadioButton.style.js.map +1 -1
  31. package/lib/commonjs/components/RadioInput/RadioInput.component.js +17 -19
  32. package/lib/commonjs/components/RadioInput/RadioInput.component.js.map +1 -1
  33. package/lib/commonjs/components/RadioInput/RadioInput.style.js +35 -25
  34. package/lib/commonjs/components/RadioInput/RadioInput.style.js.map +1 -1
  35. package/lib/commonjs/components/StickyBar/StickyBar.component.js +67 -0
  36. package/lib/commonjs/components/StickyBar/StickyBar.component.js.map +1 -0
  37. package/lib/commonjs/components/StickyBar/StickyBar.style.js +64 -0
  38. package/lib/commonjs/components/StickyBar/StickyBar.style.js.map +1 -0
  39. package/lib/commonjs/components/StickyBar/StickyBar.type.js +6 -0
  40. package/lib/commonjs/components/StickyBar/StickyBar.type.js.map +1 -0
  41. package/lib/commonjs/components/TextInput/TextInput.component.js +9 -3
  42. package/lib/commonjs/components/TextInput/TextInput.component.js.map +1 -1
  43. package/lib/commonjs/components/TextInput/TextInput.style.js +30 -25
  44. package/lib/commonjs/components/TextInput/TextInput.style.js.map +1 -1
  45. package/lib/commonjs/components/View/View.component.js +42 -0
  46. package/lib/commonjs/components/View/View.component.js.map +1 -0
  47. package/lib/commonjs/components/View/View.type.js +6 -0
  48. package/lib/commonjs/components/View/View.type.js.map +1 -0
  49. package/lib/commonjs/components/button/button.component.js +7 -4
  50. package/lib/commonjs/components/button/button.component.js.map +1 -1
  51. package/lib/commonjs/components/button/button.styles.js +21 -17
  52. package/lib/commonjs/components/button/button.styles.js.map +1 -1
  53. package/lib/commonjs/components/calendars/calendars.component.js +37 -37
  54. package/lib/commonjs/components/calendars/calendars.component.js.map +1 -1
  55. package/lib/commonjs/components/calendars/calendars.service.js.map +1 -1
  56. package/lib/commonjs/components/calendars/calendars.style.js +73 -51
  57. package/lib/commonjs/components/calendars/calendars.style.js.map +1 -1
  58. package/lib/commonjs/components/index.js +21 -0
  59. package/lib/commonjs/components/index.js.map +1 -1
  60. package/lib/commonjs/components/typography/typography.component.js +12 -2
  61. package/lib/commonjs/components/typography/typography.component.js.map +1 -1
  62. package/lib/commonjs/components/typography/typography.style.js +21 -351
  63. package/lib/commonjs/components/typography/typography.style.js.map +1 -1
  64. package/lib/commonjs/config/index.js +50 -0
  65. package/lib/commonjs/config/index.js.map +1 -0
  66. package/lib/commonjs/config/makeStyles.js +37 -0
  67. package/lib/commonjs/config/makeStyles.js.map +1 -0
  68. package/lib/commonjs/config/theme.default.js +422 -0
  69. package/lib/commonjs/config/theme.default.js.map +1 -0
  70. package/lib/commonjs/config/theme.provider.js +48 -0
  71. package/lib/commonjs/config/theme.provider.js.map +1 -0
  72. package/lib/commonjs/config/theme.type.js +6 -0
  73. package/lib/commonjs/config/theme.type.js.map +1 -0
  74. package/lib/commonjs/index.js +11 -0
  75. package/lib/commonjs/index.js.map +1 -1
  76. package/lib/commonjs/themes/border.js.map +1 -1
  77. package/lib/commonjs/themes/colors.js +1 -1
  78. package/lib/commonjs/themes/shadow.js +1 -0
  79. package/lib/commonjs/themes/shadow.js.map +1 -1
  80. package/lib/module/components/ActionList/ActionList.component.js +8 -7
  81. package/lib/module/components/ActionList/ActionList.component.js.map +1 -1
  82. package/lib/module/components/ActionList/ActionList.styles.js +11 -7
  83. package/lib/module/components/ActionList/ActionList.styles.js.map +1 -1
  84. package/lib/module/components/Appbar/Appbar.component.js +4 -3
  85. package/lib/module/components/Appbar/Appbar.component.js.map +1 -1
  86. package/lib/module/components/Appbar/Appbar.style.js +10 -6
  87. package/lib/module/components/Appbar/Appbar.style.js.map +1 -1
  88. package/lib/module/components/BottomSheet/BottomSheet.component.js +2 -2
  89. package/lib/module/components/BottomSheet/BottomSheet.component.js.map +1 -1
  90. package/lib/module/components/BottomSheet/BottomSheet.style.js +10 -7
  91. package/lib/module/components/BottomSheet/BottomSheet.style.js.map +1 -1
  92. package/lib/module/components/CheckBoxInput/CheckBoxInput.component.js +17 -17
  93. package/lib/module/components/CheckBoxInput/CheckBoxInput.component.js.map +1 -1
  94. package/lib/module/components/CheckBoxInput/CheckBoxInput.style.js +24 -13
  95. package/lib/module/components/CheckBoxInput/CheckBoxInput.style.js.map +1 -1
  96. package/lib/module/components/Checkbox/Checkbox.component.js +9 -5
  97. package/lib/module/components/Checkbox/Checkbox.component.js.map +1 -1
  98. package/lib/module/components/Checkbox/Checkbox.style.js +14 -14
  99. package/lib/module/components/Checkbox/Checkbox.style.js.map +1 -1
  100. package/lib/module/components/Pagination/pagination.component.js +31 -0
  101. package/lib/module/components/Pagination/pagination.component.js.map +1 -0
  102. package/lib/module/components/Pagination/pagination.style.js +20 -0
  103. package/lib/module/components/Pagination/pagination.style.js.map +1 -0
  104. package/lib/module/components/Pagination/pagination.type.js +2 -0
  105. package/lib/module/components/Pagination/pagination.type.js.map +1 -0
  106. package/lib/module/components/RadioButton/RadioButton.component.js +2 -2
  107. package/lib/module/components/RadioButton/RadioButton.component.js.map +1 -1
  108. package/lib/module/components/RadioButton/RadioButton.style.js +12 -8
  109. package/lib/module/components/RadioButton/RadioButton.style.js.map +1 -1
  110. package/lib/module/components/RadioInput/RadioInput.component.js +17 -19
  111. package/lib/module/components/RadioInput/RadioInput.component.js.map +1 -1
  112. package/lib/module/components/RadioInput/RadioInput.style.js +24 -13
  113. package/lib/module/components/RadioInput/RadioInput.style.js.map +1 -1
  114. package/lib/module/components/StickyBar/StickyBar.component.js +60 -0
  115. package/lib/module/components/StickyBar/StickyBar.component.js.map +1 -0
  116. package/lib/module/components/StickyBar/StickyBar.style.js +57 -0
  117. package/lib/module/components/StickyBar/StickyBar.style.js.map +1 -0
  118. package/lib/module/components/StickyBar/StickyBar.type.js +2 -0
  119. package/lib/module/components/StickyBar/StickyBar.type.js.map +1 -0
  120. package/lib/module/components/TextInput/TextInput.component.js +10 -4
  121. package/lib/module/components/TextInput/TextInput.component.js.map +1 -1
  122. package/lib/module/components/TextInput/TextInput.style.js +21 -15
  123. package/lib/module/components/TextInput/TextInput.style.js.map +1 -1
  124. package/lib/module/components/View/View.component.js +35 -0
  125. package/lib/module/components/View/View.component.js.map +1 -0
  126. package/lib/module/components/View/View.type.js +2 -0
  127. package/lib/module/components/View/View.type.js.map +1 -0
  128. package/lib/module/components/button/button.component.js +7 -4
  129. package/lib/module/components/button/button.component.js.map +1 -1
  130. package/lib/module/components/button/button.styles.js +14 -9
  131. package/lib/module/components/button/button.styles.js.map +1 -1
  132. package/lib/module/components/calendars/calendars.component.js +36 -36
  133. package/lib/module/components/calendars/calendars.component.js.map +1 -1
  134. package/lib/module/components/calendars/calendars.service.js.map +1 -1
  135. package/lib/module/components/calendars/calendars.style.js +65 -43
  136. package/lib/module/components/calendars/calendars.style.js.map +1 -1
  137. package/lib/module/components/index.js +3 -0
  138. package/lib/module/components/index.js.map +1 -1
  139. package/lib/module/components/typography/typography.component.js +13 -3
  140. package/lib/module/components/typography/typography.component.js.map +1 -1
  141. package/lib/module/components/typography/typography.style.js +21 -350
  142. package/lib/module/components/typography/typography.style.js.map +1 -1
  143. package/lib/module/config/index.js +5 -0
  144. package/lib/module/config/index.js.map +1 -0
  145. package/lib/module/config/makeStyles.js +30 -0
  146. package/lib/module/config/makeStyles.js.map +1 -0
  147. package/lib/module/config/theme.default.js +416 -0
  148. package/lib/module/config/theme.default.js.map +1 -0
  149. package/lib/module/config/theme.provider.js +35 -0
  150. package/lib/module/config/theme.provider.js.map +1 -0
  151. package/lib/module/config/theme.type.js +2 -0
  152. package/lib/module/config/theme.type.js.map +1 -0
  153. package/lib/module/index.js +1 -0
  154. package/lib/module/index.js.map +1 -1
  155. package/lib/module/themes/border.js.map +1 -1
  156. package/lib/module/themes/colors.js +1 -1
  157. package/lib/module/themes/shadow.js +1 -0
  158. package/lib/module/themes/shadow.js.map +1 -1
  159. package/lib/typescript/components/ActionList/ActionList.component.d.ts.map +1 -1
  160. package/lib/typescript/components/ActionList/ActionList.styles.d.ts +3 -4
  161. package/lib/typescript/components/ActionList/ActionList.styles.d.ts.map +1 -1
  162. package/lib/typescript/components/Appbar/Appbar.component.d.ts.map +1 -1
  163. package/lib/typescript/components/Appbar/Appbar.style.d.ts +2 -3
  164. package/lib/typescript/components/Appbar/Appbar.style.d.ts.map +1 -1
  165. package/lib/typescript/components/BottomSheet/BottomSheet.style.d.ts +1 -1
  166. package/lib/typescript/components/BottomSheet/BottomSheet.style.d.ts.map +1 -1
  167. package/lib/typescript/components/CheckBoxInput/CheckBoxInput.component.d.ts +1 -1
  168. package/lib/typescript/components/CheckBoxInput/CheckBoxInput.component.d.ts.map +1 -1
  169. package/lib/typescript/components/CheckBoxInput/CheckBoxInput.style.d.ts +5 -4
  170. package/lib/typescript/components/CheckBoxInput/CheckBoxInput.style.d.ts.map +1 -1
  171. package/lib/typescript/components/Checkbox/Checkbox.component.d.ts.map +1 -1
  172. package/lib/typescript/components/Checkbox/Checkbox.style.d.ts +3 -2
  173. package/lib/typescript/components/Checkbox/Checkbox.style.d.ts.map +1 -1
  174. package/lib/typescript/components/Pagination/pagination.component.d.ts +5 -0
  175. package/lib/typescript/components/Pagination/pagination.component.d.ts.map +1 -0
  176. package/lib/typescript/components/Pagination/pagination.style.d.ts +19 -0
  177. package/lib/typescript/components/Pagination/pagination.style.d.ts.map +1 -0
  178. package/lib/typescript/components/Pagination/pagination.type.d.ts +15 -0
  179. package/lib/typescript/components/Pagination/pagination.type.d.ts.map +1 -0
  180. package/lib/typescript/components/RadioButton/RadioButton.component.d.ts +1 -1
  181. package/lib/typescript/components/RadioButton/RadioButton.component.d.ts.map +1 -1
  182. package/lib/typescript/components/RadioButton/RadioButton.style.d.ts +2 -2
  183. package/lib/typescript/components/RadioButton/RadioButton.style.d.ts.map +1 -1
  184. package/lib/typescript/components/RadioInput/RadioInput.component.d.ts.map +1 -1
  185. package/lib/typescript/components/RadioInput/RadioInput.style.d.ts +5 -4
  186. package/lib/typescript/components/RadioInput/RadioInput.style.d.ts.map +1 -1
  187. package/lib/typescript/components/StickyBar/StickyBar.component.d.ts +5 -0
  188. package/lib/typescript/components/StickyBar/StickyBar.component.d.ts.map +1 -0
  189. package/lib/typescript/components/StickyBar/StickyBar.style.d.ts +15 -0
  190. package/lib/typescript/components/StickyBar/StickyBar.style.d.ts.map +1 -0
  191. package/lib/typescript/components/StickyBar/StickyBar.type.d.ts +30 -0
  192. package/lib/typescript/components/StickyBar/StickyBar.type.d.ts.map +1 -0
  193. package/lib/typescript/components/TextInput/TextInput.component.d.ts.map +1 -1
  194. package/lib/typescript/components/TextInput/TextInput.style.d.ts +6 -4
  195. package/lib/typescript/components/TextInput/TextInput.style.d.ts.map +1 -1
  196. package/lib/typescript/components/TextInput/TextInput.type.d.ts +1 -1
  197. package/lib/typescript/components/TextInput/TextInput.type.d.ts.map +1 -1
  198. package/lib/typescript/components/View/View.component.d.ts +4 -0
  199. package/lib/typescript/components/View/View.component.d.ts.map +1 -0
  200. package/lib/typescript/components/View/View.type.d.ts +10 -0
  201. package/lib/typescript/components/View/View.type.d.ts.map +1 -0
  202. package/lib/typescript/components/button/button.component.d.ts.map +1 -1
  203. package/lib/typescript/components/button/button.styles.d.ts +3 -4
  204. package/lib/typescript/components/button/button.styles.d.ts.map +1 -1
  205. package/lib/typescript/components/calendars/calendars.component.d.ts.map +1 -1
  206. package/lib/typescript/components/calendars/calendars.service.d.ts.map +1 -1
  207. package/lib/typescript/components/calendars/calendars.style.d.ts +6 -4
  208. package/lib/typescript/components/calendars/calendars.style.d.ts.map +1 -1
  209. package/lib/typescript/components/index.d.ts +7 -0
  210. package/lib/typescript/components/index.d.ts.map +1 -1
  211. package/lib/typescript/components/typography/typography.component.d.ts +1 -1
  212. package/lib/typescript/components/typography/typography.component.d.ts.map +1 -1
  213. package/lib/typescript/components/typography/typography.style.d.ts +5 -60
  214. package/lib/typescript/components/typography/typography.style.d.ts.map +1 -1
  215. package/lib/typescript/components/typography/typography.type.d.ts +7 -0
  216. package/lib/typescript/components/typography/typography.type.d.ts.map +1 -1
  217. package/lib/typescript/config/index.d.ts +5 -0
  218. package/lib/typescript/config/index.d.ts.map +1 -0
  219. package/lib/typescript/config/makeStyles.d.ts +4 -0
  220. package/lib/typescript/config/makeStyles.d.ts.map +1 -0
  221. package/lib/typescript/config/theme.default.d.ts +178 -0
  222. package/lib/typescript/config/theme.default.d.ts.map +1 -0
  223. package/lib/typescript/config/theme.provider.d.ts +8 -0
  224. package/lib/typescript/config/theme.provider.d.ts.map +1 -0
  225. package/lib/typescript/config/theme.type.d.ts +12 -0
  226. package/lib/typescript/config/theme.type.d.ts.map +1 -0
  227. package/lib/typescript/index.d.ts +1 -0
  228. package/lib/typescript/index.d.ts.map +1 -1
  229. package/lib/typescript/themes/shadow.d.ts +2 -3
  230. package/lib/typescript/themes/shadow.d.ts.map +1 -1
  231. package/package.json +5 -1
  232. package/src/components/ActionList/ActionList.component.tsx +20 -17
  233. package/src/components/ActionList/ActionList.styles.tsx +11 -11
  234. package/src/components/Appbar/Appbar.component.tsx +4 -3
  235. package/src/components/Appbar/Appbar.style.tsx +9 -9
  236. package/src/components/BottomSheet/BottomSheet.component.tsx +2 -2
  237. package/src/components/BottomSheet/BottomSheet.style.tsx +9 -7
  238. package/src/components/CheckBoxInput/CheckBoxInput.component.tsx +21 -20
  239. package/src/components/CheckBoxInput/CheckBoxInput.style.tsx +29 -15
  240. package/src/components/Checkbox/Checkbox.component.tsx +13 -13
  241. package/src/components/Checkbox/Checkbox.style.tsx +16 -17
  242. package/src/components/Pagination/pagination.component.tsx +29 -0
  243. package/src/components/Pagination/pagination.style.tsx +20 -0
  244. package/src/components/Pagination/pagination.type.ts +16 -0
  245. package/src/components/RadioButton/RadioButton.component.tsx +3 -4
  246. package/src/components/RadioButton/RadioButton.style.tsx +10 -10
  247. package/src/components/RadioInput/RadioInput.component.tsx +14 -15
  248. package/src/components/RadioInput/RadioInput.style.tsx +29 -15
  249. package/src/components/StickyBar/StickyBar.component.tsx +74 -0
  250. package/src/components/StickyBar/StickyBar.style.tsx +79 -0
  251. package/src/components/StickyBar/StickyBar.type.ts +35 -0
  252. package/src/components/TextInput/TextInput.component.tsx +7 -6
  253. package/src/components/TextInput/TextInput.style.tsx +86 -70
  254. package/src/components/TextInput/TextInput.type.ts +1 -1
  255. package/src/components/View/View.component.tsx +42 -0
  256. package/src/components/View/View.type.ts +14 -0
  257. package/src/components/button/button.component.tsx +9 -4
  258. package/src/components/button/button.styles.ts +15 -15
  259. package/src/components/calendars/calendars.component.tsx +27 -22
  260. package/src/components/calendars/calendars.service.ts +7 -3
  261. package/src/components/calendars/calendars.style.ts +77 -49
  262. package/src/components/index.ts +15 -0
  263. package/src/components/typography/typography.component.tsx +17 -4
  264. package/src/components/typography/typography.style.tsx +17 -472
  265. package/src/components/typography/typography.type.ts +9 -0
  266. package/src/config/index.ts +4 -0
  267. package/src/config/makeStyles.ts +52 -0
  268. package/src/config/theme.default.ts +440 -0
  269. package/src/config/theme.provider.tsx +53 -0
  270. package/src/config/theme.type.ts +17 -0
  271. package/src/index.tsx +1 -0
  272. package/src/themes/border.ts +3 -3
  273. package/src/themes/colors.ts +1 -1
  274. package/src/themes/shadow.tsx +4 -2
@@ -1,8 +1,7 @@
1
- import type { TextStyle } from 'react-native';
2
- import type { ViewStyle } from 'react-native';
3
- import { Platform, StyleSheet } from 'react-native';
4
- import type { CheckboxInputProps } from './CheckBoxInput.type';
5
- import { Palettes, Radius, Spacing } from '../../themes';
1
+ import { Platform, ViewStyle, TextStyle } from 'react-native';
2
+
3
+ import { CheckboxInputProps } from './CheckBoxInput.type';
4
+ import { makeStyles } from '../../config';
6
5
 
7
6
  interface ComputedStyleProps {
8
7
  fieldWrapper?: ViewStyle;
@@ -15,17 +14,20 @@ interface ComputedStyleProps {
15
14
  counter?: TextStyle;
16
15
  inputIconWrapper?: ViewStyle;
17
16
  checkboxItemWrapper?: ViewStyle;
17
+ sheetListContentContainer?: ViewStyle;
18
+ sheetBottomContaienr?: ViewStyle;
18
19
  }
19
20
 
20
- export const getStyle = (props: CheckboxInputProps) => {
21
+ export const useStyles = makeStyles((themes, props: CheckboxInputProps) => {
22
+ const { colors, Spacing, Radius } = themes;
21
23
  const { editable = true, disabled = false, isError, errorMessage } = props;
22
24
 
23
25
  const stateColor =
24
26
  isError || errorMessage
25
- ? { text: Palettes.red[500], border: Palettes.red[500] }
27
+ ? { text: colors['text-danger'], border: colors['border-danger'] }
26
28
  : {
27
- text: Palettes.black[900],
28
- border: Palettes.grey[200],
29
+ text: colors['text-primary'],
30
+ border: colors['border-default'],
29
31
  };
30
32
 
31
33
  const computedStyle: ComputedStyleProps = {};
@@ -48,7 +50,9 @@ export const getStyle = (props: CheckboxInputProps) => {
48
50
  computedStyle.label = {
49
51
  color: stateColor.text,
50
52
  backgroundColor:
51
- !editable || disabled ? Palettes.grey[50] : Palettes.white[50],
53
+ !editable || disabled
54
+ ? colors['fill-disable-secondary']
55
+ : colors['surface-primary'],
52
56
  paddingHorizontal: Spacing[4],
53
57
  borderRadius: Radius[4],
54
58
  marginLeft: Spacing[8],
@@ -62,7 +66,9 @@ export const getStyle = (props: CheckboxInputProps) => {
62
66
  borderWidth: Radius.border,
63
67
  borderColor: stateColor.border,
64
68
  backgroundColor:
65
- !editable || disabled ? Palettes.grey[50] : Palettes.white[50],
69
+ !editable || disabled
70
+ ? colors['fill-disable-secondary']
71
+ : colors['surface-primary'],
66
72
  borderRadius: Radius[8],
67
73
  padding: Spacing[8],
68
74
  width: '100%',
@@ -70,7 +76,7 @@ export const getStyle = (props: CheckboxInputProps) => {
70
76
 
71
77
  computedStyle.textField = {
72
78
  flex: 1,
73
- color: Palettes.black[900],
79
+ color: colors['text-primary'],
74
80
  padding: 0,
75
81
  margin: 0,
76
82
  overflow: 'visible',
@@ -87,7 +93,7 @@ export const getStyle = (props: CheckboxInputProps) => {
87
93
 
88
94
  computedStyle.counter = {
89
95
  marginLeft: Spacing[4],
90
- color: Palettes.grey[500],
96
+ color: colors['text-disable'],
91
97
  };
92
98
 
93
99
  computedStyle.inputIconWrapper = {
@@ -102,5 +108,13 @@ export const getStyle = (props: CheckboxInputProps) => {
102
108
  justifyContent: 'space-between',
103
109
  };
104
110
 
105
- return StyleSheet.create(computedStyle);
106
- };
111
+ computedStyle.sheetListContentContainer = {
112
+ paddingHorizontal: Spacing[16],
113
+ };
114
+
115
+ computedStyle.sheetBottomContaienr = {
116
+ padding: Spacing[16],
117
+ };
118
+
119
+ return computedStyle;
120
+ });
@@ -1,32 +1,32 @@
1
1
  import * as React from 'react';
2
2
  import { View } from 'react-native';
3
3
 
4
- import { getStyle } from './Checkbox.style';
5
-
4
+ import { useStyles } from './Checkbox.style';
6
5
  import type { CheckboxProps } from './Checkbox.type';
6
+
7
7
  import { IconTick } from '../../icons';
8
- import { Palettes } from '../../themes';
8
+ import { useAppTheme } from '../../config';
9
9
 
10
10
  const Checkbox: React.FunctionComponent<CheckboxProps> = (props) => {
11
11
  const { selected, disabled, ...rest } = props;
12
+ const { colors, colorScheme } = useAppTheme();
12
13
 
13
- const computedStyle = getStyle();
14
+ const computedStyle = useStyles(props);
14
15
 
15
16
  return (
16
17
  <>
17
- <View
18
- style={[
19
- computedStyle.outer,
20
- selected && computedStyle.outerSelected,
21
- disabled && computedStyle.outerDisabled,
22
- ]}
23
- {...rest}
24
- >
18
+ <View style={[computedStyle.outer]} {...rest}>
25
19
  {selected && (
26
20
  <IconTick
27
21
  height={14}
28
22
  width={14}
29
- fill={disabled ? Palettes.white[50] : Palettes.black[900]}
23
+ fill={
24
+ disabled
25
+ ? colors['icon-disable']
26
+ : colorScheme === 'light'
27
+ ? colors['icon-primary']
28
+ : colors['icon-inverse']
29
+ }
30
30
  />
31
31
  )}
32
32
  </View>
@@ -1,7 +1,7 @@
1
- import { StyleSheet } from 'react-native';
2
- import { Palettes, Radius } from '../../themes';
1
+ import { ViewStyle } from 'react-native';
3
2
 
4
- import type { ViewStyle } from 'react-native';
3
+ import { CheckboxProps } from './Checkbox.type';
4
+ import { makeStyles } from '../../config';
5
5
 
6
6
  interface ComputedStyleProps {
7
7
  outer?: ViewStyle;
@@ -12,7 +12,9 @@ interface ComputedStyleProps {
12
12
  innerDisabled?: ViewStyle;
13
13
  }
14
14
 
15
- export const getStyle = () => {
15
+ export const useStyles = makeStyles((themes, props: CheckboxProps) => {
16
+ const { colors, Radius } = themes;
17
+ const { selected, disabled } = props;
16
18
  const computedStyle: ComputedStyleProps = {};
17
19
 
18
20
  computedStyle.outer = {
@@ -20,20 +22,17 @@ export const getStyle = () => {
20
22
  width: 18,
21
23
  borderRadius: Radius[4],
22
24
  borderWidth: 2,
23
- borderColor: Palettes.black[900],
25
+ borderColor: disabled
26
+ ? colors['icon-disable-secondary']
27
+ : colors['border-primary'],
28
+ backgroundColor: !selected
29
+ ? 'transparent'
30
+ : disabled
31
+ ? colors['icon-disable-secondary']
32
+ : colors['fill-warning'],
24
33
  justifyContent: 'center',
25
34
  alignItems: 'center',
26
35
  };
27
36
 
28
- computedStyle.outerSelected = {
29
- backgroundColor: Palettes.yellow[600],
30
- borderColor: Palettes.yellow[600],
31
- };
32
-
33
- computedStyle.outerDisabled = {
34
- borderColor: Palettes.grey[100],
35
- backgroundColor: Palettes.grey[100],
36
- };
37
-
38
- return StyleSheet.create(computedStyle);
39
- };
37
+ return computedStyle;
38
+ });
@@ -0,0 +1,29 @@
1
+ import * as React from 'react';
2
+ import { View } from 'react-native';
3
+ import type { PaginationProps } from './pagination.type';
4
+
5
+ const Pagination = ({ totalPages = 1, currentPage = 1 }: PaginationProps) => {
6
+ return (
7
+ <View style={{ flexDirection: 'row', justifyContent: 'flex-start', alignItems: 'flex-start' }}>
8
+ {Array.from({ length: totalPages }).map((_, index) => {
9
+ const page = index + 0;
10
+ const isActive = page === currentPage;
11
+
12
+ return (
13
+ <View
14
+ key={page}
15
+ style={{
16
+ width: isActive ? 30 : 8,
17
+ height: 8,
18
+ borderRadius: 4,
19
+ backgroundColor: isActive ? '#000' : '#ddd',
20
+ marginHorizontal: 4,
21
+ }}
22
+ />
23
+ );
24
+ })}
25
+ </View>
26
+ );
27
+ };
28
+
29
+ export { Pagination };
@@ -0,0 +1,20 @@
1
+ import { StyleSheet } from 'react-native';
2
+
3
+ export const styles = StyleSheet.create({
4
+ paginationContainer: {
5
+ flexDirection: 'row',
6
+ justifyContent: 'flex-start',
7
+ alignItems: 'flex-end',
8
+ },
9
+ dot: {
10
+ width: 8,
11
+ height: 8,
12
+ borderRadius: 4,
13
+ backgroundColor: '#ddd',
14
+ marginHorizontal: 4,
15
+ },
16
+ activeDot: {
17
+ width: 20,
18
+ backgroundColor: '#000',
19
+ },
20
+ });
@@ -0,0 +1,16 @@
1
+ export interface PaginationProps {
2
+ /**
3
+ * Total number of pages
4
+ *
5
+ * @default 1
6
+ */
7
+ totalPages?: number;
8
+
9
+ /**
10
+ * Current active page
11
+ *
12
+ * @default 1
13
+ */
14
+ currentPage?: number;
15
+ }
16
+
@@ -1,14 +1,13 @@
1
1
  import * as React from 'react';
2
2
  import { View } from 'react-native';
3
3
 
4
- import { getStyle } from './RadioButton.style';
5
-
6
- import type { RadioButtonProps } from './RadioButton.type';
4
+ import { useStyles } from './RadioButton.style';
5
+ import { RadioButtonProps } from './RadioButton.type';
7
6
 
8
7
  const RadioButton: React.FunctionComponent<RadioButtonProps> = (props) => {
9
8
  const { selected, disabled, ...rest } = props;
10
9
 
11
- const computedStyle = getStyle();
10
+ const computedStyle = useStyles();
12
11
 
13
12
  return (
14
13
  <>
@@ -1,7 +1,6 @@
1
- import { StyleSheet } from 'react-native';
2
- import { Palettes, Radius } from '../../themes';
1
+ import { StyleSheet, ViewStyle } from 'react-native';
3
2
 
4
- import type { ViewStyle } from 'react-native';
3
+ import { makeStyles } from '../../config';
5
4
 
6
5
  interface ComputedStyleProps {
7
6
  outer?: ViewStyle;
@@ -11,7 +10,8 @@ interface ComputedStyleProps {
11
10
  innerDisabled?: ViewStyle;
12
11
  }
13
12
 
14
- export const getStyle = () => {
13
+ export const useStyles = makeStyles((themes) => {
14
+ const { colors, Radius } = themes;
15
15
  const computedStyle: ComputedStyleProps = {};
16
16
 
17
17
  computedStyle.outer = {
@@ -20,26 +20,26 @@ export const getStyle = () => {
20
20
  padding: 2,
21
21
  borderRadius: Radius.full,
22
22
  borderWidth: 2,
23
- borderColor: Palettes.black[900],
23
+ borderColor: colors['border-primary'],
24
24
  };
25
25
 
26
26
  computedStyle.inner = {
27
27
  flex: 1,
28
28
  borderRadius: Radius.full,
29
- backgroundColor: Palettes.white[50],
29
+ backgroundColor: colors['fill-inverse'],
30
30
  };
31
31
 
32
32
  computedStyle.innerSelected = {
33
- backgroundColor: Palettes.yellow[600],
33
+ backgroundColor: colors['fill-warning'],
34
34
  };
35
35
 
36
36
  computedStyle.outerDisabled = {
37
- borderColor: Palettes.grey[100],
37
+ borderColor: colors['border-disable'],
38
38
  };
39
39
 
40
40
  computedStyle.innerDisabled = {
41
- backgroundColor: Palettes.grey[100],
41
+ backgroundColor: colors['border-default'],
42
42
  };
43
43
 
44
44
  return StyleSheet.create(computedStyle);
45
- };
45
+ });
@@ -2,28 +2,29 @@ import * as React from 'react';
2
2
  import {
3
3
  Animated,
4
4
  FlatList,
5
+ LayoutChangeEvent,
5
6
  TouchableHighlight,
6
7
  TouchableWithoutFeedback,
7
8
  View,
8
9
  } from 'react-native';
9
10
 
10
- import { getStyle } from './RadioInput.style';
11
- import { Palettes } from '../../themes';
11
+ import { useAppTheme } from '../../config';
12
12
  import { IconChevronDown } from '../../icons';
13
13
  import { Button } from '../button/button.component';
14
- import { Typography } from '../typography/typography.component';
15
14
  import { BottomSheet } from '../BottomSheet/BottomSheet.component';
16
- import { RadioButton } from '../RadioButton/RadioButton.component';
17
15
  import { Divider } from '../Divider/Divider.component';
16
+ import { RadioButton } from '../RadioButton/RadioButton.component';
17
+ import { Typography } from '../typography/typography.component';
18
18
 
19
- import type { LayoutChangeEvent } from 'react-native';
20
19
  import type {
21
20
  RadioInputProps,
22
21
  RadioItemProps,
23
22
  RadioItemPropsComponent,
24
23
  } from './RadioInput.type';
24
+ import { useStyles } from './RadioInput.style';
25
25
 
26
26
  const RadioInput: React.FunctionComponent<RadioInputProps> = (props) => {
27
+ const { colors } = useAppTheme();
27
28
  const {
28
29
  value,
29
30
  label,
@@ -34,7 +35,7 @@ const RadioInput: React.FunctionComponent<RadioInputProps> = (props) => {
34
35
  disabled,
35
36
  editable = true,
36
37
  inputIcon = (
37
- <IconChevronDown width={14} height={14} fill={Palettes.black[900]} />
38
+ <IconChevronDown width={14} height={14} fill={colors['icon-primary']} />
38
39
  ),
39
40
  data,
40
41
  onSaveInput = () => {},
@@ -50,10 +51,9 @@ const RadioInput: React.FunctionComponent<RadioInputProps> = (props) => {
50
51
  } = props;
51
52
 
52
53
  const [labelWidth, setLabelWidth] = React.useState(0);
53
- // const [inputVisibility, setInputVisibility] = React.useState(false);
54
54
  const [selectedValue, setSelectedValue] = React.useState(value);
55
55
 
56
- const computedStyle = getStyle(props);
56
+ const computedStyle = useStyles(props);
57
57
 
58
58
  type BottomSheetHandler = React.ElementRef<typeof BottomSheet>;
59
59
  const ref = React.useRef<BottomSheetHandler>(null);
@@ -156,7 +156,7 @@ const RadioInput: React.FunctionComponent<RadioInputProps> = (props) => {
156
156
  computedStyle.inputWrapper,
157
157
  !!selectedObject() &&
158
158
  !isError &&
159
- !errorMessage && { borderColor: Palettes.black[900] },
159
+ !errorMessage && { borderColor: colors['border-primary'] },
160
160
  ]}
161
161
  >
162
162
  <Typography
@@ -208,12 +208,10 @@ const RadioInput: React.FunctionComponent<RadioInputProps> = (props) => {
208
208
  />
209
209
  );
210
210
  }}
211
- // eslint-disable-next-line react-native/no-inline-styles
212
- contentContainerStyle={{ padding: 16 }}
211
+ contentContainerStyle={computedStyle.sheetListContentContainer}
213
212
  ItemSeparatorComponent={() => customItemSeparator}
214
213
  />
215
- {/* eslint-disable-next-line react-native/no-inline-styles */}
216
- <View style={{ padding: 16, backgroundColor: 'transparent' }}>
214
+ <View style={computedStyle.sheetBottomContaienr}>
217
215
  <Button
218
216
  variant="primary"
219
217
  label={saveInputLabel}
@@ -233,14 +231,15 @@ function RadioItem({
233
231
  testID,
234
232
  ...rest
235
233
  }: RadioItemPropsComponent) {
234
+ const { colors } = useAppTheme();
236
235
  const { item } = data;
237
236
  const { label, value, disabled } = item;
238
- const computedStyle = getStyle({} as RadioInputProps);
237
+ const computedStyle = useStyles({} as RadioInputProps);
239
238
 
240
239
  return (
241
240
  <TouchableHighlight
242
241
  onPress={() => onItemPress(item)}
243
- underlayColor={Palettes.whiteDark[100]}
242
+ underlayColor={colors['fill-disable-secondary']}
244
243
  disabled={disabled}
245
244
  testID={testID + 'item_radio_touchable_' + data.index}
246
245
  accessibilityLabel={testID + 'item_radio_touchable_' + data.index}
@@ -1,8 +1,7 @@
1
- import type { TextStyle } from 'react-native';
2
- import type { ViewStyle } from 'react-native';
3
- import { Platform, StyleSheet } from 'react-native';
4
- import type { RadioInputProps } from './RadioInput.type';
5
- import { Palettes, Radius, Spacing } from '../../themes';
1
+ import { Platform, TextStyle, ViewStyle } from 'react-native';
2
+
3
+ import { RadioInputProps } from './RadioInput.type';
4
+ import { makeStyles } from '../../config';
6
5
 
7
6
  interface ComputedStyleProps {
8
7
  fieldWrapper?: ViewStyle;
@@ -15,17 +14,20 @@ interface ComputedStyleProps {
15
14
  counter?: TextStyle;
16
15
  inputIconWrapper?: ViewStyle;
17
16
  radioItemWrapper?: ViewStyle;
17
+ sheetListContentContainer?: ViewStyle;
18
+ sheetBottomContaienr?: ViewStyle;
18
19
  }
19
20
 
20
- export const getStyle = (props: RadioInputProps) => {
21
+ export const useStyles = makeStyles((themes, props: RadioInputProps) => {
22
+ const { colors, Radius, Spacing } = themes;
21
23
  const { editable = true, disabled = false, isError, errorMessage } = props;
22
24
 
23
25
  const stateColor =
24
26
  isError || errorMessage
25
- ? { text: Palettes.red[500], border: Palettes.red[500] }
27
+ ? { text: colors['text-danger'], border: colors['border-danger'] }
26
28
  : {
27
- text: Palettes.black[900],
28
- border: Palettes.grey[200],
29
+ text: colors['text-primary'],
30
+ border: colors['border-disable'],
29
31
  };
30
32
 
31
33
  const computedStyle: ComputedStyleProps = {};
@@ -48,7 +50,9 @@ export const getStyle = (props: RadioInputProps) => {
48
50
  computedStyle.label = {
49
51
  color: stateColor.text,
50
52
  backgroundColor:
51
- !editable || disabled ? Palettes.grey[50] : Palettes.white[50],
53
+ !editable || disabled
54
+ ? colors['fill-disable-secondary']
55
+ : colors['fill-inverse'],
52
56
  paddingHorizontal: Spacing[4],
53
57
  borderRadius: Radius[4],
54
58
  marginLeft: Spacing[8],
@@ -62,7 +66,9 @@ export const getStyle = (props: RadioInputProps) => {
62
66
  borderWidth: Radius.border,
63
67
  borderColor: stateColor.border,
64
68
  backgroundColor:
65
- !editable || disabled ? Palettes.grey[50] : Palettes.white[50],
69
+ !editable || disabled
70
+ ? colors['fill-disable-secondary']
71
+ : colors['fill-inverse'],
66
72
  borderRadius: Radius[8],
67
73
  padding: Spacing[8],
68
74
  width: '100%',
@@ -70,7 +76,7 @@ export const getStyle = (props: RadioInputProps) => {
70
76
 
71
77
  computedStyle.textField = {
72
78
  flex: 1,
73
- color: Palettes.black[900],
79
+ color: colors['text-primary'],
74
80
  padding: 0,
75
81
  margin: 0,
76
82
  overflow: 'visible',
@@ -87,7 +93,7 @@ export const getStyle = (props: RadioInputProps) => {
87
93
 
88
94
  computedStyle.counter = {
89
95
  marginLeft: Spacing[4],
90
- color: Palettes.grey[500],
96
+ color: colors['text-disable'],
91
97
  };
92
98
 
93
99
  computedStyle.inputIconWrapper = {
@@ -102,5 +108,13 @@ export const getStyle = (props: RadioInputProps) => {
102
108
  justifyContent: 'space-between',
103
109
  };
104
110
 
105
- return StyleSheet.create(computedStyle);
106
- };
111
+ computedStyle.sheetListContentContainer = {
112
+ paddingHorizontal: Spacing[16],
113
+ };
114
+
115
+ computedStyle.sheetBottomContaienr = {
116
+ padding: Spacing[16],
117
+ };
118
+
119
+ return computedStyle;
120
+ });
@@ -0,0 +1,74 @@
1
+ import React, { FC } from 'react';
2
+ import { TouchableOpacity, View } from 'react-native';
3
+ import LinearGradient from 'react-native-linear-gradient';
4
+
5
+ import { Typography } from '../typography/typography.component';
6
+ import { StickyBarProps } from './StickyBar.type';
7
+ import { Palettes, Spacing } from 'src/themes';
8
+
9
+ import { IconClose } from 'src/icons';
10
+ import { getStyle } from './StickyBar.style';
11
+
12
+ const StickyBar: FC<StickyBarProps> = ({
13
+ show,
14
+ text,
15
+ onClose,
16
+ iconComponent,
17
+ buttonComponent,
18
+ testID,
19
+ }) => {
20
+ const computedStyle = getStyle({
21
+ show,
22
+ text,
23
+ iconComponent,
24
+ buttonComponent,
25
+ onClose,
26
+ });
27
+
28
+ return (
29
+ <View style={[computedStyle.container]}>
30
+ <LinearGradient
31
+ colors={[Palettes.yellow[600], '#FFFFFF']}
32
+ start={{ x: 0.5, y: 0 }}
33
+ end={{ x: 1, y: 0.1 }}
34
+ useAngle={true}
35
+ angle={45}
36
+ style={[computedStyle.linearGradient]}
37
+ >
38
+ <View style={[computedStyle.rowContainer]}>
39
+ {/* Small Image */}
40
+ <View
41
+ style={[computedStyle.contentWrapper, computedStyle.imageWrapper]}
42
+ >
43
+ {iconComponent}
44
+ </View>
45
+
46
+ {/* Copy */}
47
+ <View
48
+ style={[computedStyle.contentWrapper, computedStyle.textWrapper]}
49
+ >
50
+ <Typography
51
+ variant="overline-small"
52
+ testID={testID}
53
+ accessibilityLabel={testID}
54
+ >
55
+ {text}
56
+ </Typography>
57
+ </View>
58
+
59
+ {/* CTA Button */}
60
+ <View style={[computedStyle.contentWrapper]}>{buttonComponent}</View>
61
+
62
+ {/* Close Button */}
63
+ <View style={[computedStyle.closeButtonWrapper]}>
64
+ <TouchableOpacity onPress={onClose}>
65
+ <IconClose height={Spacing[12]} width={Spacing[12]} />
66
+ </TouchableOpacity>
67
+ </View>
68
+ </View>
69
+ </LinearGradient>
70
+ </View>
71
+ );
72
+ };
73
+
74
+ export { StickyBar };
@@ -0,0 +1,79 @@
1
+ import { StyleSheet, ViewStyle } from 'react-native';
2
+ import { StickyBarProps } from './StickyBar.type';
3
+ import { Palettes, Spacing } from 'src/themes';
4
+
5
+ interface ComputedStyleProps {
6
+ container?: ViewStyle;
7
+ rowContainer?: ViewStyle;
8
+ linearGradient?: ViewStyle;
9
+ contentWrapper?: ViewStyle;
10
+ imageWrapper?: ViewStyle;
11
+ textWrapper?: ViewStyle;
12
+ buttonWrapper?: ViewStyle;
13
+ closeButtonWrapper?: ViewStyle;
14
+ }
15
+
16
+ export const getStyle = (props: StickyBarProps) => {
17
+ const {
18
+ show,
19
+ onClose,
20
+ iconComponent: IconComponent,
21
+ buttonComponent,
22
+ } = props;
23
+
24
+ const computedStyle: ComputedStyleProps = {};
25
+
26
+ computedStyle.container = {
27
+ flex: 1,
28
+ minWidth: 400,
29
+ display: show ? 'flex' : 'none',
30
+ };
31
+
32
+ computedStyle.rowContainer = {
33
+ flexDirection: 'row',
34
+ justifyContent: 'center',
35
+ alignItems: 'center',
36
+ };
37
+
38
+ computedStyle.linearGradient = {
39
+ paddingVertical: Spacing[8],
40
+ paddingHorizontal: Spacing[16],
41
+ borderTopRightRadius: Spacing[16],
42
+ borderTopLeftRadius: Spacing[16],
43
+ position: 'absolute',
44
+ zIndex: 2,
45
+ };
46
+
47
+ computedStyle.contentWrapper = {
48
+ marginRight: Spacing[8],
49
+ };
50
+
51
+ computedStyle.imageWrapper = {
52
+ display: IconComponent ? 'flex' : 'none',
53
+ alignSelf: 'center',
54
+ justifyContent: 'center',
55
+ backgroundColor: 'white',
56
+ borderRadius: Spacing[32],
57
+ padding: 6,
58
+ };
59
+
60
+ computedStyle.textWrapper = {
61
+ flex: 1,
62
+ flexWrap: 'wrap',
63
+ };
64
+
65
+ computedStyle.buttonWrapper = {
66
+ display: buttonComponent ? 'flex' : 'none',
67
+ };
68
+
69
+ computedStyle.closeButtonWrapper = {
70
+ display: onClose ? 'flex' : 'none',
71
+ borderWidth: 2,
72
+ borderRadius: 12,
73
+ borderColor: Palettes.black[900],
74
+ borderStyle: 'solid',
75
+ padding: 2,
76
+ };
77
+
78
+ return StyleSheet.create(computedStyle);
79
+ };