@nexara/nativeflow 0.1.7 → 0.1.8

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 (453) hide show
  1. package/README.md +1 -1
  2. package/lib/commonjs/components/Avatar/AvatarImage.js +3 -9
  3. package/lib/commonjs/components/Avatar/AvatarImage.js.map +1 -1
  4. package/lib/commonjs/components/Avatar/AvatarText.js +2 -4
  5. package/lib/commonjs/components/Avatar/AvatarText.js.map +1 -1
  6. package/lib/commonjs/components/Button/Button.js +23 -24
  7. package/lib/commonjs/components/Button/Button.js.map +1 -1
  8. package/lib/commonjs/components/Button/utils.js +34 -27
  9. package/lib/commonjs/components/Button/utils.js.map +1 -1
  10. package/lib/commonjs/components/CheckBox/CheckBox.js +41 -38
  11. package/lib/commonjs/components/CheckBox/CheckBox.js.map +1 -1
  12. package/lib/commonjs/components/Chip/Chip.js +21 -25
  13. package/lib/commonjs/components/Chip/Chip.js.map +1 -1
  14. package/lib/commonjs/components/Chip/utils.js +31 -18
  15. package/lib/commonjs/components/Chip/utils.js.map +1 -1
  16. package/lib/commonjs/components/Dialog/Dialog.js +14 -11
  17. package/lib/commonjs/components/Dialog/Dialog.js.map +1 -1
  18. package/lib/commonjs/components/Dialog/DialogBody.js +7 -7
  19. package/lib/commonjs/components/Dialog/DialogBody.js.map +1 -1
  20. package/lib/commonjs/components/Dialog/DialogDescription.js +7 -9
  21. package/lib/commonjs/components/Dialog/DialogDescription.js.map +1 -1
  22. package/lib/commonjs/components/Dialog/DialogFoot.js +13 -19
  23. package/lib/commonjs/components/Dialog/DialogFoot.js.map +1 -1
  24. package/lib/commonjs/components/Dialog/DialogHead.js +20 -27
  25. package/lib/commonjs/components/Dialog/DialogHead.js.map +1 -1
  26. package/lib/commonjs/components/Divider/Divider.js +4 -8
  27. package/lib/commonjs/components/Divider/Divider.js.map +1 -1
  28. package/lib/commonjs/components/Grid/Grid.js +3 -4
  29. package/lib/commonjs/components/Grid/Grid.js.map +1 -1
  30. package/lib/commonjs/components/Icon/Icon.js +2 -3
  31. package/lib/commonjs/components/Icon/Icon.js.map +1 -1
  32. package/lib/commonjs/components/IconButton/IconButton.js +1 -2
  33. package/lib/commonjs/components/IconButton/IconButton.js.map +1 -1
  34. package/lib/commonjs/components/Link/Link.js +13 -17
  35. package/lib/commonjs/components/Link/Link.js.map +1 -1
  36. package/lib/commonjs/components/Menu/Menu.js +12 -8
  37. package/lib/commonjs/components/Menu/Menu.js.map +1 -1
  38. package/lib/commonjs/components/Menu/MenuItem.js +3 -5
  39. package/lib/commonjs/components/Menu/MenuItem.js.map +1 -1
  40. package/lib/commonjs/components/Menu/MenuItemLabel.js +2 -8
  41. package/lib/commonjs/components/Menu/MenuItemLabel.js.map +1 -1
  42. package/lib/commonjs/components/Portal/PortalContext.js +1 -2
  43. package/lib/commonjs/components/Portal/PortalContext.js.map +1 -1
  44. package/lib/commonjs/components/Portal/PortalProvider.js +1 -2
  45. package/lib/commonjs/components/Portal/PortalProvider.js.map +1 -1
  46. package/lib/commonjs/components/Progress/Progress.js +6 -7
  47. package/lib/commonjs/components/Progress/Progress.js.map +1 -1
  48. package/lib/commonjs/components/Provider/NativeProvider.js +1 -2
  49. package/lib/commonjs/components/Provider/NativeProvider.js.map +1 -1
  50. package/lib/commonjs/components/Radio/RadioGroup.js +46 -0
  51. package/lib/commonjs/components/Radio/RadioGroup.js.map +1 -0
  52. package/lib/commonjs/components/Radio/RadioItem.js +77 -0
  53. package/lib/commonjs/components/Radio/RadioItem.js.map +1 -0
  54. package/lib/commonjs/components/Radio/index.js +15 -0
  55. package/lib/commonjs/components/Radio/index.js.map +1 -0
  56. package/lib/commonjs/components/Slider/Slider.js +4 -4
  57. package/lib/commonjs/components/Slider/Slider.js.map +1 -1
  58. package/lib/commonjs/components/Stack/HStack.js +3 -9
  59. package/lib/commonjs/components/Stack/HStack.js.map +1 -1
  60. package/lib/commonjs/components/Stack/VStack.js +4 -10
  61. package/lib/commonjs/components/Stack/VStack.js.map +1 -1
  62. package/lib/commonjs/components/StyledComponents/StyledText.js +20 -9
  63. package/lib/commonjs/components/StyledComponents/StyledText.js.map +1 -1
  64. package/lib/commonjs/components/StyledComponents/StyledView.js +3 -3
  65. package/lib/commonjs/components/StyledComponents/StyledView.js.map +1 -1
  66. package/lib/commonjs/components/Surface/Surface.js +24 -21
  67. package/lib/commonjs/components/Surface/Surface.js.map +1 -1
  68. package/lib/commonjs/components/Switch/Switch.js +13 -10
  69. package/lib/commonjs/components/Switch/Switch.js.map +1 -1
  70. package/lib/commonjs/components/UserInput/UserInput.js +17 -14
  71. package/lib/commonjs/components/UserInput/UserInput.js.map +1 -1
  72. package/lib/commonjs/components/UserInput/generateColors.js +3 -3
  73. package/lib/commonjs/components/UserInput/generateColors.js.map +1 -1
  74. package/lib/commonjs/constants/typographySizes.js +11 -7
  75. package/lib/commonjs/constants/typographySizes.js.map +1 -1
  76. package/lib/commonjs/helpers/ResponsiveCalculations.js +25 -31
  77. package/lib/commonjs/helpers/ResponsiveCalculations.js.map +1 -1
  78. package/lib/commonjs/index.js +23 -42
  79. package/lib/commonjs/index.js.map +1 -1
  80. package/lib/commonjs/themes/DarkTheme.js +185 -25
  81. package/lib/commonjs/themes/DarkTheme.js.map +1 -1
  82. package/lib/commonjs/themes/LightTheme.js +89 -81
  83. package/lib/commonjs/themes/LightTheme.js.map +1 -1
  84. package/lib/commonjs/types/divider.type.js +6 -0
  85. package/lib/commonjs/types/divider.type.js.map +1 -0
  86. package/lib/commonjs/types/index.js +44 -0
  87. package/lib/commonjs/types/index.js.map +1 -1
  88. package/lib/commonjs/types/link.type.js +6 -0
  89. package/lib/commonjs/types/link.type.js.map +1 -0
  90. package/lib/commonjs/types/radio.type.js +6 -0
  91. package/lib/commonjs/types/radio.type.js.map +1 -0
  92. package/lib/commonjs/types/surface.type.js +6 -0
  93. package/lib/commonjs/types/surface.type.js.map +1 -0
  94. package/lib/module/components/Avatar/AvatarImage.js +3 -8
  95. package/lib/module/components/Avatar/AvatarImage.js.map +1 -1
  96. package/lib/module/components/Avatar/AvatarText.js +2 -3
  97. package/lib/module/components/Avatar/AvatarText.js.map +1 -1
  98. package/lib/module/components/Button/Button.js +22 -22
  99. package/lib/module/components/Button/Button.js.map +1 -1
  100. package/lib/module/components/Button/utils.js +34 -27
  101. package/lib/module/components/Button/utils.js.map +1 -1
  102. package/lib/module/components/CheckBox/CheckBox.js +35 -30
  103. package/lib/module/components/CheckBox/CheckBox.js.map +1 -1
  104. package/lib/module/components/Chip/Chip.js +22 -26
  105. package/lib/module/components/Chip/Chip.js.map +1 -1
  106. package/lib/module/components/Chip/utils.js +30 -18
  107. package/lib/module/components/Chip/utils.js.map +1 -1
  108. package/lib/module/components/Dialog/Dialog.js +13 -9
  109. package/lib/module/components/Dialog/Dialog.js.map +1 -1
  110. package/lib/module/components/Dialog/DialogBody.js +9 -8
  111. package/lib/module/components/Dialog/DialogBody.js.map +1 -1
  112. package/lib/module/components/Dialog/DialogDescription.js +8 -9
  113. package/lib/module/components/Dialog/DialogDescription.js.map +1 -1
  114. package/lib/module/components/Dialog/DialogFoot.js +14 -17
  115. package/lib/module/components/Dialog/DialogFoot.js.map +1 -1
  116. package/lib/module/components/Dialog/DialogHead.js +22 -27
  117. package/lib/module/components/Dialog/DialogHead.js.map +1 -1
  118. package/lib/module/components/Divider/Divider.js +5 -8
  119. package/lib/module/components/Divider/Divider.js.map +1 -1
  120. package/lib/module/components/Grid/Grid.js +4 -3
  121. package/lib/module/components/Grid/Grid.js.map +1 -1
  122. package/lib/module/components/Icon/Icon.js +1 -1
  123. package/lib/module/components/Icon/Icon.js.map +1 -1
  124. package/lib/module/components/IconButton/IconButton.js.map +1 -1
  125. package/lib/module/components/Link/Link.js +15 -19
  126. package/lib/module/components/Link/Link.js.map +1 -1
  127. package/lib/module/components/Menu/Menu.js +11 -6
  128. package/lib/module/components/Menu/Menu.js.map +1 -1
  129. package/lib/module/components/Menu/MenuItem.js +4 -5
  130. package/lib/module/components/Menu/MenuItem.js.map +1 -1
  131. package/lib/module/components/Menu/MenuItemLabel.js +2 -7
  132. package/lib/module/components/Menu/MenuItemLabel.js.map +1 -1
  133. package/lib/module/components/Progress/Progress.js +7 -6
  134. package/lib/module/components/Progress/Progress.js.map +1 -1
  135. package/lib/module/components/Radio/RadioGroup.js +41 -0
  136. package/lib/module/components/Radio/RadioGroup.js.map +1 -0
  137. package/lib/module/components/Radio/RadioItem.js +73 -0
  138. package/lib/module/components/Radio/RadioItem.js.map +1 -0
  139. package/lib/module/components/Radio/index.js +10 -0
  140. package/lib/module/components/Radio/index.js.map +1 -0
  141. package/lib/module/components/Slider/Slider.js +5 -5
  142. package/lib/module/components/Slider/Slider.js.map +1 -1
  143. package/lib/module/components/Stack/HStack.js +3 -7
  144. package/lib/module/components/Stack/HStack.js.map +1 -1
  145. package/lib/module/components/Stack/VStack.js +4 -8
  146. package/lib/module/components/Stack/VStack.js.map +1 -1
  147. package/lib/module/components/StyledComponents/StyledText.js +20 -8
  148. package/lib/module/components/StyledComponents/StyledText.js.map +1 -1
  149. package/lib/module/components/StyledComponents/StyledView.js +3 -3
  150. package/lib/module/components/StyledComponents/StyledView.js.map +1 -1
  151. package/lib/module/components/Surface/Surface.js +24 -20
  152. package/lib/module/components/Surface/Surface.js.map +1 -1
  153. package/lib/module/components/Switch/Switch.js +14 -11
  154. package/lib/module/components/Switch/Switch.js.map +1 -1
  155. package/lib/module/components/UserInput/UserInput.js +18 -15
  156. package/lib/module/components/UserInput/UserInput.js.map +1 -1
  157. package/lib/module/components/UserInput/generateColors.js +3 -3
  158. package/lib/module/components/UserInput/generateColors.js.map +1 -1
  159. package/lib/module/constants/typographySizes.js +11 -7
  160. package/lib/module/constants/typographySizes.js.map +1 -1
  161. package/lib/module/helpers/ResponsiveCalculations.js +25 -28
  162. package/lib/module/helpers/ResponsiveCalculations.js.map +1 -1
  163. package/lib/module/index.js +3 -4
  164. package/lib/module/index.js.map +1 -1
  165. package/lib/module/themes/DarkTheme.js +188 -24
  166. package/lib/module/themes/DarkTheme.js.map +1 -1
  167. package/lib/module/themes/LightTheme.js +88 -81
  168. package/lib/module/themes/LightTheme.js.map +1 -1
  169. package/lib/module/themes/index.js +0 -1
  170. package/lib/module/themes/index.js.map +1 -1
  171. package/lib/module/types/divider.type.js +4 -0
  172. package/lib/module/types/divider.type.js.map +1 -0
  173. package/lib/module/types/index.js +4 -0
  174. package/lib/module/types/index.js.map +1 -1
  175. package/lib/module/types/link.type.js +4 -0
  176. package/lib/module/types/link.type.js.map +1 -0
  177. package/lib/module/types/radio.type.js +4 -0
  178. package/lib/module/types/radio.type.js.map +1 -0
  179. package/lib/module/types/surface.type.js +4 -0
  180. package/lib/module/types/surface.type.js.map +1 -0
  181. package/lib/typescript/commonjs/src/components/Avatar/AvatarImage.d.ts +2 -2
  182. package/lib/typescript/commonjs/src/components/Avatar/AvatarImage.d.ts.map +1 -1
  183. package/lib/typescript/commonjs/src/components/Avatar/AvatarText.d.ts +2 -2
  184. package/lib/typescript/commonjs/src/components/Avatar/AvatarText.d.ts.map +1 -1
  185. package/lib/typescript/commonjs/src/components/Button/Button.d.ts +2 -2
  186. package/lib/typescript/commonjs/src/components/Button/Button.d.ts.map +1 -1
  187. package/lib/typescript/commonjs/src/components/Button/utils.d.ts +0 -1
  188. package/lib/typescript/commonjs/src/components/Button/utils.d.ts.map +1 -1
  189. package/lib/typescript/commonjs/src/components/CheckBox/CheckBox.d.ts +2 -2
  190. package/lib/typescript/commonjs/src/components/CheckBox/CheckBox.d.ts.map +1 -1
  191. package/lib/typescript/commonjs/src/components/Chip/Chip.d.ts +2 -2
  192. package/lib/typescript/commonjs/src/components/Chip/Chip.d.ts.map +1 -1
  193. package/lib/typescript/commonjs/src/components/Chip/utils.d.ts +3 -2
  194. package/lib/typescript/commonjs/src/components/Chip/utils.d.ts.map +1 -1
  195. package/lib/typescript/commonjs/src/components/Dialog/Dialog.d.ts.map +1 -1
  196. package/lib/typescript/commonjs/src/components/Dialog/DialogBody.d.ts +4 -4
  197. package/lib/typescript/commonjs/src/components/Dialog/DialogBody.d.ts.map +1 -1
  198. package/lib/typescript/commonjs/src/components/Dialog/DialogDescription.d.ts +2 -2
  199. package/lib/typescript/commonjs/src/components/Dialog/DialogDescription.d.ts.map +1 -1
  200. package/lib/typescript/commonjs/src/components/Dialog/DialogFoot.d.ts +2 -2
  201. package/lib/typescript/commonjs/src/components/Dialog/DialogFoot.d.ts.map +1 -1
  202. package/lib/typescript/commonjs/src/components/Dialog/DialogHead.d.ts +2 -2
  203. package/lib/typescript/commonjs/src/components/Dialog/DialogHead.d.ts.map +1 -1
  204. package/lib/typescript/commonjs/src/components/Divider/Divider.d.ts +3 -8
  205. package/lib/typescript/commonjs/src/components/Divider/Divider.d.ts.map +1 -1
  206. package/lib/typescript/commonjs/src/components/Grid/Grid.d.ts +2 -2
  207. package/lib/typescript/commonjs/src/components/Grid/Grid.d.ts.map +1 -1
  208. package/lib/typescript/commonjs/src/components/Link/Link.d.ts +3 -10
  209. package/lib/typescript/commonjs/src/components/Link/Link.d.ts.map +1 -1
  210. package/lib/typescript/commonjs/src/components/Menu/Menu.d.ts +2 -2
  211. package/lib/typescript/commonjs/src/components/Menu/Menu.d.ts.map +1 -1
  212. package/lib/typescript/commonjs/src/components/Menu/MenuItem.d.ts +2 -2
  213. package/lib/typescript/commonjs/src/components/Menu/MenuItem.d.ts.map +1 -1
  214. package/lib/typescript/commonjs/src/components/Menu/MenuItemLabel.d.ts +2 -2
  215. package/lib/typescript/commonjs/src/components/Menu/MenuItemLabel.d.ts.map +1 -1
  216. package/lib/typescript/commonjs/src/components/Progress/Progress.d.ts +2 -2
  217. package/lib/typescript/commonjs/src/components/Progress/Progress.d.ts.map +1 -1
  218. package/lib/typescript/commonjs/src/components/Radio/RadioGroup.d.ts +5 -0
  219. package/lib/typescript/commonjs/src/components/Radio/RadioGroup.d.ts.map +1 -0
  220. package/lib/typescript/commonjs/src/components/Radio/RadioItem.d.ts +5 -0
  221. package/lib/typescript/commonjs/src/components/Radio/RadioItem.d.ts.map +1 -0
  222. package/lib/typescript/commonjs/src/components/Radio/index.d.ts +6 -0
  223. package/lib/typescript/commonjs/src/components/Radio/index.d.ts.map +1 -0
  224. package/lib/typescript/commonjs/src/components/Stack/HStack.d.ts +2 -2
  225. package/lib/typescript/commonjs/src/components/Stack/HStack.d.ts.map +1 -1
  226. package/lib/typescript/commonjs/src/components/Stack/VStack.d.ts +2 -2
  227. package/lib/typescript/commonjs/src/components/Stack/VStack.d.ts.map +1 -1
  228. package/lib/typescript/commonjs/src/components/StyledComponents/StyledText.d.ts +2 -2
  229. package/lib/typescript/commonjs/src/components/StyledComponents/StyledText.d.ts.map +1 -1
  230. package/lib/typescript/commonjs/src/components/Surface/Surface.d.ts +3 -3
  231. package/lib/typescript/commonjs/src/components/Surface/Surface.d.ts.map +1 -1
  232. package/lib/typescript/commonjs/src/components/Switch/Switch.d.ts +2 -2
  233. package/lib/typescript/commonjs/src/components/Switch/Switch.d.ts.map +1 -1
  234. package/lib/typescript/commonjs/src/components/UserInput/UserInput.d.ts +36 -2
  235. package/lib/typescript/commonjs/src/components/UserInput/UserInput.d.ts.map +1 -1
  236. package/lib/typescript/commonjs/src/constants/typographySizes.d.ts +2 -8
  237. package/lib/typescript/commonjs/src/constants/typographySizes.d.ts.map +1 -1
  238. package/lib/typescript/commonjs/src/helpers/ResponsiveCalculations.d.ts +0 -2
  239. package/lib/typescript/commonjs/src/helpers/ResponsiveCalculations.d.ts.map +1 -1
  240. package/lib/typescript/commonjs/src/index.d.ts +4 -4
  241. package/lib/typescript/commonjs/src/index.d.ts.map +1 -1
  242. package/lib/typescript/commonjs/src/themes/DarkTheme.d.ts.map +1 -1
  243. package/lib/typescript/commonjs/src/themes/LightTheme.d.ts.map +1 -1
  244. package/lib/typescript/commonjs/src/types/avatar.type.d.ts +0 -2
  245. package/lib/typescript/commonjs/src/types/avatar.type.d.ts.map +1 -1
  246. package/lib/typescript/commonjs/src/types/button.type.d.ts +20 -20
  247. package/lib/typescript/commonjs/src/types/button.type.d.ts.map +1 -1
  248. package/lib/typescript/commonjs/src/types/checkbox.type.d.ts +20 -14
  249. package/lib/typescript/commonjs/src/types/checkbox.type.d.ts.map +1 -1
  250. package/lib/typescript/commonjs/src/types/chip.type.d.ts +21 -13
  251. package/lib/typescript/commonjs/src/types/chip.type.d.ts.map +1 -1
  252. package/lib/typescript/commonjs/src/types/common.type.d.ts +71 -22
  253. package/lib/typescript/commonjs/src/types/common.type.d.ts.map +1 -1
  254. package/lib/typescript/commonjs/src/types/dialog.type.d.ts +13 -12
  255. package/lib/typescript/commonjs/src/types/dialog.type.d.ts.map +1 -1
  256. package/lib/typescript/commonjs/src/types/divider.type.d.ts +11 -0
  257. package/lib/typescript/commonjs/src/types/divider.type.d.ts.map +1 -0
  258. package/lib/typescript/commonjs/src/types/grid.type.d.ts +2 -1
  259. package/lib/typescript/commonjs/src/types/grid.type.d.ts.map +1 -1
  260. package/lib/typescript/commonjs/src/types/index.d.ts +4 -0
  261. package/lib/typescript/commonjs/src/types/index.d.ts.map +1 -1
  262. package/lib/typescript/commonjs/src/types/link.type.d.ts +12 -0
  263. package/lib/typescript/commonjs/src/types/link.type.d.ts.map +1 -0
  264. package/lib/typescript/commonjs/src/types/menu.type.d.ts +2 -15
  265. package/lib/typescript/commonjs/src/types/menu.type.d.ts.map +1 -1
  266. package/lib/typescript/commonjs/src/types/radio.type.d.ts +61 -0
  267. package/lib/typescript/commonjs/src/types/radio.type.d.ts.map +1 -0
  268. package/lib/typescript/commonjs/src/types/stack.type.d.ts +6 -14
  269. package/lib/typescript/commonjs/src/types/stack.type.d.ts.map +1 -1
  270. package/lib/typescript/commonjs/src/types/styledComponents.type.d.ts +24 -71
  271. package/lib/typescript/commonjs/src/types/styledComponents.type.d.ts.map +1 -1
  272. package/lib/typescript/commonjs/src/types/surface.type.d.ts +16 -0
  273. package/lib/typescript/commonjs/src/types/surface.type.d.ts.map +1 -0
  274. package/lib/typescript/commonjs/src/types/userInput.type.d.ts +10 -14
  275. package/lib/typescript/commonjs/src/types/userInput.type.d.ts.map +1 -1
  276. package/lib/typescript/module/src/components/Avatar/AvatarImage.d.ts +2 -2
  277. package/lib/typescript/module/src/components/Avatar/AvatarImage.d.ts.map +1 -1
  278. package/lib/typescript/module/src/components/Avatar/AvatarText.d.ts +2 -2
  279. package/lib/typescript/module/src/components/Avatar/AvatarText.d.ts.map +1 -1
  280. package/lib/typescript/module/src/components/Button/Button.d.ts +2 -2
  281. package/lib/typescript/module/src/components/Button/Button.d.ts.map +1 -1
  282. package/lib/typescript/module/src/components/Button/utils.d.ts +0 -1
  283. package/lib/typescript/module/src/components/Button/utils.d.ts.map +1 -1
  284. package/lib/typescript/module/src/components/CheckBox/CheckBox.d.ts +2 -2
  285. package/lib/typescript/module/src/components/CheckBox/CheckBox.d.ts.map +1 -1
  286. package/lib/typescript/module/src/components/Chip/Chip.d.ts +2 -2
  287. package/lib/typescript/module/src/components/Chip/Chip.d.ts.map +1 -1
  288. package/lib/typescript/module/src/components/Chip/utils.d.ts +3 -2
  289. package/lib/typescript/module/src/components/Chip/utils.d.ts.map +1 -1
  290. package/lib/typescript/module/src/components/Dialog/Dialog.d.ts.map +1 -1
  291. package/lib/typescript/module/src/components/Dialog/DialogBody.d.ts +4 -4
  292. package/lib/typescript/module/src/components/Dialog/DialogBody.d.ts.map +1 -1
  293. package/lib/typescript/module/src/components/Dialog/DialogDescription.d.ts +2 -2
  294. package/lib/typescript/module/src/components/Dialog/DialogDescription.d.ts.map +1 -1
  295. package/lib/typescript/module/src/components/Dialog/DialogFoot.d.ts +2 -2
  296. package/lib/typescript/module/src/components/Dialog/DialogFoot.d.ts.map +1 -1
  297. package/lib/typescript/module/src/components/Dialog/DialogHead.d.ts +2 -2
  298. package/lib/typescript/module/src/components/Dialog/DialogHead.d.ts.map +1 -1
  299. package/lib/typescript/module/src/components/Divider/Divider.d.ts +3 -8
  300. package/lib/typescript/module/src/components/Divider/Divider.d.ts.map +1 -1
  301. package/lib/typescript/module/src/components/Grid/Grid.d.ts +2 -2
  302. package/lib/typescript/module/src/components/Grid/Grid.d.ts.map +1 -1
  303. package/lib/typescript/module/src/components/Link/Link.d.ts +3 -10
  304. package/lib/typescript/module/src/components/Link/Link.d.ts.map +1 -1
  305. package/lib/typescript/module/src/components/Menu/Menu.d.ts +2 -2
  306. package/lib/typescript/module/src/components/Menu/Menu.d.ts.map +1 -1
  307. package/lib/typescript/module/src/components/Menu/MenuItem.d.ts +2 -2
  308. package/lib/typescript/module/src/components/Menu/MenuItem.d.ts.map +1 -1
  309. package/lib/typescript/module/src/components/Menu/MenuItemLabel.d.ts +2 -2
  310. package/lib/typescript/module/src/components/Menu/MenuItemLabel.d.ts.map +1 -1
  311. package/lib/typescript/module/src/components/Progress/Progress.d.ts +2 -2
  312. package/lib/typescript/module/src/components/Progress/Progress.d.ts.map +1 -1
  313. package/lib/typescript/module/src/components/Radio/RadioGroup.d.ts +5 -0
  314. package/lib/typescript/module/src/components/Radio/RadioGroup.d.ts.map +1 -0
  315. package/lib/typescript/module/src/components/Radio/RadioItem.d.ts +5 -0
  316. package/lib/typescript/module/src/components/Radio/RadioItem.d.ts.map +1 -0
  317. package/lib/typescript/module/src/components/Radio/index.d.ts +6 -0
  318. package/lib/typescript/module/src/components/Radio/index.d.ts.map +1 -0
  319. package/lib/typescript/module/src/components/Stack/HStack.d.ts +2 -2
  320. package/lib/typescript/module/src/components/Stack/HStack.d.ts.map +1 -1
  321. package/lib/typescript/module/src/components/Stack/VStack.d.ts +2 -2
  322. package/lib/typescript/module/src/components/Stack/VStack.d.ts.map +1 -1
  323. package/lib/typescript/module/src/components/StyledComponents/StyledText.d.ts +2 -2
  324. package/lib/typescript/module/src/components/StyledComponents/StyledText.d.ts.map +1 -1
  325. package/lib/typescript/module/src/components/Surface/Surface.d.ts +3 -3
  326. package/lib/typescript/module/src/components/Surface/Surface.d.ts.map +1 -1
  327. package/lib/typescript/module/src/components/Switch/Switch.d.ts +2 -2
  328. package/lib/typescript/module/src/components/Switch/Switch.d.ts.map +1 -1
  329. package/lib/typescript/module/src/components/UserInput/UserInput.d.ts +36 -2
  330. package/lib/typescript/module/src/components/UserInput/UserInput.d.ts.map +1 -1
  331. package/lib/typescript/module/src/constants/typographySizes.d.ts +2 -8
  332. package/lib/typescript/module/src/constants/typographySizes.d.ts.map +1 -1
  333. package/lib/typescript/module/src/helpers/ResponsiveCalculations.d.ts +0 -2
  334. package/lib/typescript/module/src/helpers/ResponsiveCalculations.d.ts.map +1 -1
  335. package/lib/typescript/module/src/index.d.ts +4 -4
  336. package/lib/typescript/module/src/index.d.ts.map +1 -1
  337. package/lib/typescript/module/src/themes/DarkTheme.d.ts.map +1 -1
  338. package/lib/typescript/module/src/themes/LightTheme.d.ts.map +1 -1
  339. package/lib/typescript/module/src/types/avatar.type.d.ts +0 -2
  340. package/lib/typescript/module/src/types/avatar.type.d.ts.map +1 -1
  341. package/lib/typescript/module/src/types/button.type.d.ts +20 -20
  342. package/lib/typescript/module/src/types/button.type.d.ts.map +1 -1
  343. package/lib/typescript/module/src/types/checkbox.type.d.ts +20 -14
  344. package/lib/typescript/module/src/types/checkbox.type.d.ts.map +1 -1
  345. package/lib/typescript/module/src/types/chip.type.d.ts +21 -13
  346. package/lib/typescript/module/src/types/chip.type.d.ts.map +1 -1
  347. package/lib/typescript/module/src/types/common.type.d.ts +71 -22
  348. package/lib/typescript/module/src/types/common.type.d.ts.map +1 -1
  349. package/lib/typescript/module/src/types/dialog.type.d.ts +13 -12
  350. package/lib/typescript/module/src/types/dialog.type.d.ts.map +1 -1
  351. package/lib/typescript/module/src/types/divider.type.d.ts +11 -0
  352. package/lib/typescript/module/src/types/divider.type.d.ts.map +1 -0
  353. package/lib/typescript/module/src/types/grid.type.d.ts +2 -1
  354. package/lib/typescript/module/src/types/grid.type.d.ts.map +1 -1
  355. package/lib/typescript/module/src/types/index.d.ts +4 -0
  356. package/lib/typescript/module/src/types/index.d.ts.map +1 -1
  357. package/lib/typescript/module/src/types/link.type.d.ts +12 -0
  358. package/lib/typescript/module/src/types/link.type.d.ts.map +1 -0
  359. package/lib/typescript/module/src/types/menu.type.d.ts +2 -15
  360. package/lib/typescript/module/src/types/menu.type.d.ts.map +1 -1
  361. package/lib/typescript/module/src/types/radio.type.d.ts +61 -0
  362. package/lib/typescript/module/src/types/radio.type.d.ts.map +1 -0
  363. package/lib/typescript/module/src/types/stack.type.d.ts +6 -14
  364. package/lib/typescript/module/src/types/stack.type.d.ts.map +1 -1
  365. package/lib/typescript/module/src/types/styledComponents.type.d.ts +24 -71
  366. package/lib/typescript/module/src/types/styledComponents.type.d.ts.map +1 -1
  367. package/lib/typescript/module/src/types/surface.type.d.ts +16 -0
  368. package/lib/typescript/module/src/types/surface.type.d.ts.map +1 -0
  369. package/lib/typescript/module/src/types/userInput.type.d.ts +10 -14
  370. package/lib/typescript/module/src/types/userInput.type.d.ts.map +1 -1
  371. package/package.json +9 -4
  372. package/src/components/Avatar/AvatarImage.tsx +2 -7
  373. package/src/components/Avatar/AvatarText.tsx +4 -4
  374. package/src/components/Button/Button.tsx +32 -26
  375. package/src/components/Button/utils.ts +30 -30
  376. package/src/components/CheckBox/CheckBox.tsx +30 -28
  377. package/src/components/Chip/Chip.tsx +23 -31
  378. package/src/components/Chip/utils.ts +34 -20
  379. package/src/components/Dialog/Dialog.tsx +11 -7
  380. package/src/components/Dialog/DialogBody.tsx +13 -13
  381. package/src/components/Dialog/DialogDescription.tsx +9 -9
  382. package/src/components/Dialog/DialogFoot.tsx +19 -21
  383. package/src/components/Dialog/DialogHead.tsx +15 -20
  384. package/src/components/Divider/Divider.tsx +7 -15
  385. package/src/components/Grid/Grid.tsx +6 -5
  386. package/src/components/Icon/Icon.tsx +1 -1
  387. package/src/components/IconButton/IconButton.tsx +2 -2
  388. package/src/components/Link/Link.tsx +20 -29
  389. package/src/components/Menu/Menu.tsx +9 -6
  390. package/src/components/Menu/MenuItem.tsx +6 -6
  391. package/src/components/Menu/MenuItemLabel.tsx +4 -9
  392. package/src/components/Progress/Progress.tsx +8 -7
  393. package/src/components/Radio/RadioGroup.tsx +40 -0
  394. package/src/components/Radio/RadioItem.tsx +72 -0
  395. package/src/components/Radio/index.ts +9 -0
  396. package/src/components/Slider/Slider.tsx +3 -3
  397. package/src/components/Stack/HStack.tsx +5 -8
  398. package/src/components/Stack/VStack.tsx +6 -11
  399. package/src/components/StyledComponents/StyledText.tsx +17 -8
  400. package/src/components/StyledComponents/StyledView.tsx +4 -4
  401. package/src/components/Surface/Surface.tsx +20 -27
  402. package/src/components/Switch/Switch.tsx +12 -10
  403. package/src/components/UserInput/UserInput.tsx +19 -16
  404. package/src/components/UserInput/generateColors.ts +3 -3
  405. package/src/constants/typographySizes.ts +13 -15
  406. package/src/helpers/ResponsiveCalculations.ts +25 -29
  407. package/src/index.ts +5 -6
  408. package/src/themes/DarkTheme.ts +169 -30
  409. package/src/themes/LightTheme.ts +78 -85
  410. package/src/themes/index.ts +0 -1
  411. package/src/types/avatar.type.ts +0 -3
  412. package/src/types/button.type.ts +20 -20
  413. package/src/types/checkbox.type.ts +22 -15
  414. package/src/types/chip.type.ts +24 -15
  415. package/src/types/common.type.ts +81 -23
  416. package/src/types/dialog.type.ts +15 -14
  417. package/src/types/divider.type.ts +15 -0
  418. package/src/types/grid.type.ts +2 -1
  419. package/src/types/index.ts +5 -1
  420. package/src/types/link.type.ts +15 -0
  421. package/src/types/menu.type.ts +2 -18
  422. package/src/types/radio.type.ts +78 -0
  423. package/src/types/stack.type.ts +7 -17
  424. package/src/types/styledComponents.type.ts +26 -74
  425. package/src/types/surface.type.ts +19 -0
  426. package/src/types/userInput.type.ts +10 -15
  427. package/lib/commonjs/components/Header/Header.js +0 -78
  428. package/lib/commonjs/components/Header/Header.js.map +0 -1
  429. package/lib/commonjs/helpers/LightenColorShades.js +0 -27
  430. package/lib/commonjs/helpers/LightenColorShades.js.map +0 -1
  431. package/lib/commonjs/themes/createTheme.js +0 -25
  432. package/lib/commonjs/themes/createTheme.js.map +0 -1
  433. package/lib/module/components/Header/Header.js +0 -73
  434. package/lib/module/components/Header/Header.js.map +0 -1
  435. package/lib/module/helpers/LightenColorShades.js +0 -23
  436. package/lib/module/helpers/LightenColorShades.js.map +0 -1
  437. package/lib/module/themes/createTheme.js +0 -25
  438. package/lib/module/themes/createTheme.js.map +0 -1
  439. package/lib/typescript/commonjs/src/components/Header/Header.d.ts +0 -16
  440. package/lib/typescript/commonjs/src/components/Header/Header.d.ts.map +0 -1
  441. package/lib/typescript/commonjs/src/helpers/LightenColorShades.d.ts +0 -3
  442. package/lib/typescript/commonjs/src/helpers/LightenColorShades.d.ts.map +0 -1
  443. package/lib/typescript/commonjs/src/themes/createTheme.d.ts +0 -1
  444. package/lib/typescript/commonjs/src/themes/createTheme.d.ts.map +0 -1
  445. package/lib/typescript/module/src/components/Header/Header.d.ts +0 -16
  446. package/lib/typescript/module/src/components/Header/Header.d.ts.map +0 -1
  447. package/lib/typescript/module/src/helpers/LightenColorShades.d.ts +0 -3
  448. package/lib/typescript/module/src/helpers/LightenColorShades.d.ts.map +0 -1
  449. package/lib/typescript/module/src/themes/createTheme.d.ts +0 -1
  450. package/lib/typescript/module/src/themes/createTheme.d.ts.map +0 -1
  451. package/src/components/Header/Header.tsx +0 -82
  452. package/src/helpers/LightenColorShades.ts +0 -27
  453. package/src/themes/createTheme.ts +0 -23
@@ -1,13 +1,13 @@
1
- import React, { useEffect, useMemo, useRef, useState } from "react";
1
+ import { useEffect, useMemo, useRef, useState, type FC } from "react";
2
2
  import { StyleSheet, TouchableWithoutFeedback, Animated, type ViewStyle } from "react-native";
3
3
  import { StyledText, StyledView } from "../StyledComponents";
4
4
  import { useTheme } from "../../hooks";
5
- import { horizontalScale, verticalScale } from "../../helpers/ResponsiveCalculations";
5
+ import { horizontalScale, verticalScale } from "../../helpers";
6
6
  import { Check } from "../../assets/svg";
7
7
  import type { CheckBoxProps } from "../../types";
8
8
 
9
9
 
10
- const CheckBox: React.FC<CheckBoxProps> = ({
10
+ const CheckBox: FC<CheckBoxProps> = ({
11
11
  variant = 'square',
12
12
  isChecked = false,
13
13
  defaultValue = false,
@@ -16,13 +16,15 @@ const CheckBox: React.FC<CheckBoxProps> = ({
16
16
  iconColor,
17
17
  disableBuiltInState = false,
18
18
  disabled = false,
19
- text,
19
+ label = 'Checkbox',
20
+ fScale = 'xs',
20
21
  fs,
21
- textVariant = 'h6',
22
+ ff,
23
+ // size = 22,
22
24
  size = 20,
23
25
  iconSize,
24
26
  containerStyle,
25
- textStyle,
27
+ labelStyle,
26
28
  checkBoxStyle,
27
29
  onPress,
28
30
  }) => {
@@ -33,19 +35,19 @@ const CheckBox: React.FC<CheckBoxProps> = ({
33
35
  }, [defaultValue]);
34
36
 
35
37
  const STYLES = useMemo(Styles, []);
36
-
38
+
37
39
  const scaleVal = useRef(new Animated.Value(1)).current;
38
40
  const { colors }: any = useTheme();
39
- activeBgColor = disabled ? colors.disable : activeBgColor ?? colors.primary;
41
+ activeBgColor = disabled ? colors.states.disabled : activeBgColor ?? colors.brand.primary;
40
42
  iconSize = iconSize ?? size / 1.5;
41
43
  const bgColor = (!disableBuiltInState && isCheckboxChecked) || (disableBuiltInState && isChecked) ? activeBgColor : inActiveBgColor;
42
- const textColor = disabled ? colors.textDisable : colors.textPrimary;
44
+ const textColor = disabled ? colors.typography.disabled : colors.typography.primary;
43
45
 
44
46
  const dynamicMainContStyles: ViewStyle = {
45
47
  height: verticalScale(size),
46
48
  width: verticalScale(size),
47
- borderColor: disabled ? colors.disable : activeBgColor,
48
- borderRadius: variant === 'square' ? 5 : verticalScale(size),
49
+ borderColor: disabled ? colors.border.default : activeBgColor,
50
+ borderRadius: verticalScale(variant === 'square' ? 5 : size),
49
51
  backgroundColor: bgColor
50
52
  };
51
53
 
@@ -70,32 +72,32 @@ const CheckBox: React.FC<CheckBoxProps> = ({
70
72
  }
71
73
  };
72
74
  return (
73
- <StyledView>
75
+ // <StyledView>
76
+ <StyledView style={[STYLES.CONTAINER, containerStyle]}>
77
+
74
78
  <TouchableWithoutFeedback
75
79
  onPressIn={() => animateScale(0.8)}
76
80
  onPressOut={() => animateScale(1)}
77
81
  onPress={onUserClick}
78
82
  disabled={disabled}
79
83
  >
80
- <StyledView style={[STYLES.CONTAINER, containerStyle]}>
81
-
82
- <Animated.View style={[STYLES.CHECKBOX_PARENT_CONT, dynamicMainContStyles, checkBoxStyle, animatedStyle]}>
83
- {
84
- (disableBuiltInState ? isChecked : isCheckboxChecked) &&
85
- <Check
86
- color={iconColor ?? colors.iconSecondary}
87
- size={verticalScale(iconSize)}
88
- />
89
- }
90
- </Animated.View>
84
+ <Animated.View style={[STYLES.CHECKBOX_PARENT_CONT, dynamicMainContStyles, checkBoxStyle, animatedStyle]}>
91
85
  {
92
- text &&
93
- <StyledText style={textStyle} fs={fs} color={textColor} variant={textVariant} primary>{text}</StyledText>
86
+ (disableBuiltInState ? isChecked : isCheckboxChecked) &&
87
+ <Check
88
+ color={disabled ? colors.states.disabled : iconColor ?? colors.brand.onPrimary}
89
+ size={verticalScale(iconSize)}
90
+ />
94
91
  }
95
-
96
- </StyledView>
92
+ </Animated.View>
97
93
  </TouchableWithoutFeedback>
94
+ {
95
+ label &&
96
+ <StyledText style={labelStyle} fs={fs} ff={ff} color={textColor} fScale={fScale}>{label}</StyledText>
97
+ }
98
+
98
99
  </StyledView>
100
+ // </StyledView>
99
101
  )
100
102
  }
101
103
  export default CheckBox;
@@ -111,6 +113,6 @@ const Styles = () => StyleSheet.create({
111
113
  borderWidth: 0.8,
112
114
  alignItems: 'center',
113
115
  justifyContent: 'center',
114
- padding: verticalScale(7)
116
+ padding: horizontalScale(7)
115
117
  }
116
118
  });
@@ -1,21 +1,23 @@
1
- import React from 'react';
2
- import { StyleSheet, Pressable, TouchableOpacity } from 'react-native';
1
+ import React, { type FC } from 'react';
2
+ import { StyleSheet, TouchableOpacity } from 'react-native';
3
3
  import { StyledText, StyledView } from '../StyledComponents';
4
4
  import { horizontalScale, verticalScale } from "../../helpers/ResponsiveCalculations";
5
5
  import { useTheme } from '../../hooks';
6
6
  import { getChipColors } from './utils';
7
7
  import type { ChipProps } from '../../types';
8
8
 
9
- const Chip: React.FC<ChipProps> = ({
10
- title = 'Chip',
11
- bg,
12
- titleColor,
9
+ const Chip: FC<ChipProps> = ({
10
+ label = 'Chip',
11
+ labelColor,
13
12
  fs,
13
+ fScale = 'sm',
14
+ ff,
15
+ bg,
14
16
  br = 7,
15
17
  gap = 7,
16
- paddingV = 9,
17
- paddingH = 13,
18
- stroke = 0.9,
18
+ paddingV = 6,
19
+ paddingH = 15,
20
+ stroke = 0.8,
19
21
  strokeColor,
20
22
  rippleColor,
21
23
  disabled = false,
@@ -23,6 +25,7 @@ const Chip: React.FC<ChipProps> = ({
23
25
  renderRightIcon,
24
26
  containerStyle,
25
27
  textStyle,
28
+ active = false,
26
29
  ...rest
27
30
  }) => {
28
31
 
@@ -31,9 +34,10 @@ const Chip: React.FC<ChipProps> = ({
31
34
  const { buttonTextColor, buttonBorderColor, backgroundColor } = getChipColors({
32
35
  theme,
33
36
  bg,
34
- titleColor,
37
+ labelColor,
35
38
  strokeColor,
36
- disabled
39
+ disabled,
40
+ active
37
41
  });
38
42
 
39
43
  const STYLES = StyleSheet.create({
@@ -45,7 +49,8 @@ const Chip: React.FC<ChipProps> = ({
45
49
  backgroundColor: backgroundColor,
46
50
  borderRadius: verticalScale(br),
47
51
  paddingVertical: verticalScale(paddingV),
48
- paddingHorizontal: horizontalScale(paddingH),
52
+ paddingLeft: horizontalScale((renderLeftIcon && paddingH / 2) ?? paddingH),
53
+ paddingRight: horizontalScale((renderRightIcon && paddingH / 2) ?? paddingH),
49
54
  gap: horizontalScale(gap)
50
55
  },
51
56
  TEXT: {
@@ -54,34 +59,21 @@ const Chip: React.FC<ChipProps> = ({
54
59
  });
55
60
  return (<>
56
61
  <StyledView alignSelf='flex-start'>
57
- <Pressable
58
- android_ripple={{
59
- color: rippleColor,
60
- }}
61
- {...rest}
62
+ <TouchableOpacity
62
63
  disabled={disabled}
64
+ {...rest}
63
65
  >
64
66
  <StyledView style={[STYLES.CONTAINER, containerStyle]}>
65
67
  {
66
- renderLeftIcon &&
67
- <TouchableOpacity
68
- disabled={disabled}
69
- >
70
- {renderLeftIcon}
71
- </TouchableOpacity>
68
+ React.isValidElement(renderLeftIcon) && renderLeftIcon
72
69
  }
73
- <StyledText primary variant='h5' fs={fs} style={[STYLES.TEXT, textStyle]}>{title}</StyledText>
70
+ <StyledText fScale={fScale} ff={ff} fs={fs} style={[STYLES.TEXT, textStyle]}>{label}</StyledText>
74
71
  {
75
- renderRightIcon &&
76
- <TouchableOpacity
77
- disabled={disabled}
78
- >
79
- {renderRightIcon}
80
- </TouchableOpacity>
72
+ React.isValidElement(renderRightIcon) && renderRightIcon
81
73
  }
82
74
  </StyledView>
83
75
 
84
- </Pressable>
76
+ </TouchableOpacity>
85
77
  </StyledView>
86
78
  </>);
87
79
  }
@@ -1,89 +1,103 @@
1
+ import Color from "color";
1
2
  import type { ThemeTypes } from "../../types";
2
3
 
3
4
  const getBorderColor = ({
4
5
  theme,
5
6
  strokeColor,
6
7
  disabled,
8
+ active
7
9
  }: {
8
10
  theme: ThemeTypes;
9
11
  strokeColor: string | undefined;
10
12
  disabled: boolean;
13
+ active: boolean;
11
14
  }) => {
12
15
  if (disabled) {
13
- return theme.colors.disable;
14
- }
15
- if (strokeColor) {
16
+ return theme.colors.border.strong;
17
+ } else if (strokeColor) {
16
18
  return strokeColor
19
+ } else if (active) {
20
+ return Color(theme.colors.brand.primary).alpha(0.3).rgb().toString();
17
21
  }
18
- return theme.colors.outline;
22
+ return theme.colors.border.default;
19
23
  };
20
24
 
21
25
 
22
26
  const getTextColor = ({
23
27
  theme,
24
- titleColor,
28
+ labelColor,
25
29
  disabled
26
30
  }: {
27
31
  theme: ThemeTypes;
28
- titleColor: string | undefined;
32
+ labelColor: string | undefined;
29
33
  disabled: boolean;
30
34
  }) => {
31
35
  if (disabled) {
32
- return theme.colors.textDisable;
36
+ return theme.colors.typography.disabled;
33
37
  }
34
- else if (titleColor) {
35
- return titleColor;
38
+ else if (labelColor) {
39
+ return labelColor;
36
40
  }
37
- return theme.colors.textTertiary;
41
+ return theme.colors.typography.secondary;
38
42
  };
39
43
 
40
44
  const getBgColor = ({
41
45
  theme,
42
46
  bg,
43
- disabled
47
+ disabled,
48
+ active
44
49
  }: {
45
50
  theme: ThemeTypes;
46
51
  bg: string | undefined;
47
52
  disabled: boolean;
53
+ active: boolean;
48
54
  }) => {
49
55
  if (disabled) {
50
- return theme.colors.disable;
51
- }
52
- else if (bg) {
56
+ return theme.colors.states.disabled;
57
+ } else if (bg) {
53
58
  return bg
59
+ } else if (active) {
60
+ return Color(theme.colors.brand.primary).alpha(0.1).rgb().toString();
54
61
  }
55
- return theme.colors.chipBgColor;
62
+ return 'transparent'
63
+ // return theme.colors.background.default
64
+ // return Color(theme.colors.brand.primary).alpha(0.2).rgb().toString();
65
+ // return Color(theme.colors.brand.primary).alpha(0.1).rgb().toString();
56
66
  };
57
67
 
58
68
  const getChipColors = ({
59
69
  theme,
60
70
  bg,
61
- titleColor,
71
+ labelColor,
62
72
  strokeColor,
63
- disabled
73
+ disabled,
74
+ active
64
75
  }: {
65
76
  theme: ThemeTypes;
66
77
  bg: string | undefined;
67
- titleColor: string | undefined;
78
+ labelColor: string | undefined;
68
79
  strokeColor: string | undefined;
69
80
  disabled: boolean;
81
+ active: boolean;
70
82
  }) => {
71
83
 
72
84
 
73
85
  const backgroundColor = getBgColor({
74
86
  theme,
75
87
  bg,
76
- disabled
88
+ disabled,
89
+ active
77
90
  });
78
91
  const buttonTextColor = getTextColor({
79
92
  theme,
80
- titleColor,
93
+ labelColor,
81
94
  disabled
82
95
  });
83
96
  const buttonBorderColor = getBorderColor({
84
97
  theme,
85
98
  strokeColor,
86
99
  disabled,
100
+ active
87
101
  });
88
102
 
89
103
  return {
@@ -5,15 +5,15 @@ import type { ViewStyle } from 'react-native';
5
5
  import { dialogSizes } from '../../constants';
6
6
  import Portal from '../Portal/Portal';
7
7
  import type { DialogProps, DialogRefProps } from '../../types';
8
+ import { useTheme } from '../../hooks';
9
+ import { verticalScale } from '../../helpers';
8
10
 
9
11
 
10
12
  const Dialog = forwardRef<DialogRefProps, DialogProps>(({
11
- variant = 'default',
13
+ variant = 'classic',
12
14
  size = 'lg',
13
15
  fullScreen,
14
- backdropColor = 'rgba(0, 0, 0, 0.5)',
15
- // backdropColor = 'red',
16
- // animationDuration = 800,
16
+ backdropColor,
17
17
  onClose,
18
18
  containerStyle,
19
19
  children,
@@ -22,6 +22,7 @@ const Dialog = forwardRef<DialogRefProps, DialogProps>(({
22
22
  const [dialogVisible, setDialogVisible] = useState(false);
23
23
  const scale = useRef(new Animated.Value(0.9)).current;
24
24
  const opacity = useRef(new Animated.Value(0)).current;
25
+ const theme = useTheme();
25
26
 
26
27
  useEffect(() => {
27
28
  Animated.timing(opacity, {
@@ -54,7 +55,7 @@ const Dialog = forwardRef<DialogRefProps, DialogProps>(({
54
55
 
55
56
  const backdropAnimatedStyles = {
56
57
  opacity: opacity,
57
- backgroundColor: backdropColor,
58
+ backgroundColor: backdropColor ?? theme?.colors.background.backdrop,
58
59
  };
59
60
  const modalContAnimatedStyles = {
60
61
  transform: [{ scale }],
@@ -64,6 +65,9 @@ const Dialog = forwardRef<DialogRefProps, DialogProps>(({
64
65
  minHeight: fullScreen ? '100%' : 'auto',
65
66
  maxHeight: fullScreen ? '100%' : '80%',
66
67
  width: `${dialogSizes[size]}%`,
68
+ backgroundColor:theme?.colors.background.elevated,
69
+ borderColor: theme?.colors.border.default,
70
+ borderRadius: verticalScale(40)
67
71
  };
68
72
 
69
73
  const renderChildrenWithVariant = () => {
@@ -113,9 +117,9 @@ const STYLES = StyleSheet.create({
113
117
  alignItems: 'center',
114
118
  },
115
119
  MODAL_CONT: {
116
- backgroundColor: '#fff',
120
+ // backgroundColor: '#fff',
117
121
  borderRadius: 5,
118
122
  borderWidth: 1,
119
- borderColor: '#d4d4d4'
123
+ // borderColor: '#d4d4d4'
120
124
  }
121
125
  });
@@ -1,30 +1,30 @@
1
- import React from 'react';
2
- import { View, ScrollView } from 'react-native';
3
- import { moderateScale } from '../../helpers/ResponsiveCalculations';
4
- import type { DialogBodyProps } from '../../types';
1
+ import { type FC } from 'react';
2
+ import { ScrollView } from 'react-native';
3
+ import { horizontalScale, verticalScale } from '../../helpers/ResponsiveCalculations';
4
+ import type { DialogBodyProps, StyledViewProps } from '../../types';
5
+ import { StyledView } from '../StyledComponents';
5
6
 
6
7
 
7
- interface props extends DialogBodyProps {
8
- variant?: 'classic' | 'default';
8
+ interface props extends DialogBodyProps, StyledViewProps {
9
+ variant?: 'classic' | 'default';
9
10
  }
10
11
 
11
- const DialogBody: React.FC<props> = ({
12
+ const DialogBody: FC<props> = ({
12
13
  variant,
13
14
  scrollEnable = true,
14
15
  containerStyle,
15
16
  children,
17
+ ...rest
16
18
  }) => {
17
19
  const style = {
18
- paddingVertical: variant == 'default' ? moderateScale(16) : 0,
19
- paddingHorizontal: moderateScale(variant == 'default' ? 16 : 25),
20
- gap: 20,
20
+ paddingVertical: variant == 'default' ? verticalScale(16) : 0,
21
+ paddingHorizontal: horizontalScale(variant == 'default' ? 16 : 25),
21
22
  };
22
23
  return (<>
23
-
24
24
  <ScrollView scrollEnabled={scrollEnable}>
25
- <View style={[style, containerStyle]} pointerEvents='box-none'>
25
+ <StyledView style={[style, containerStyle]} pointerEvents='box-none' {...rest}>
26
26
  {children}
27
- </View>
27
+ </StyledView>
28
28
  </ScrollView>
29
29
  </>);
30
30
  }
@@ -1,23 +1,23 @@
1
- import React from 'react';
1
+ import { type FC } from 'react';
2
2
  import { View } from 'react-native';
3
- import { moderateVerticalScale } from '../../helpers/ResponsiveCalculations';
3
+ import { verticalScale } from '../../helpers/ResponsiveCalculations';
4
4
  import { StyledText } from '../StyledComponents';
5
5
  import type { DialogDescriptionProps } from '../../types';
6
6
 
7
- const DialogDescription: React.FC<DialogDescriptionProps> = ({
8
- textVariant = 'h5',
9
- fs,
7
+ const DialogDescription: FC<DialogDescriptionProps> = ({
8
+ fScale = 'sm',
10
9
  containerStyle,
11
10
  textStyle,
12
11
  children,
12
+ ...rest
13
13
  }) => {
14
14
  return (<>
15
15
  <View style={containerStyle}>
16
16
  <StyledText
17
- style={[{ lineHeight: moderateVerticalScale(13) }, textStyle]}
18
- color='#a1a1aa'
19
- variant={textVariant}
20
- fs={fs}
17
+ style={[{ lineHeight: verticalScale(20) }, textStyle]}
18
+ variant='tertiary'
19
+ fScale={fScale}
20
+ {...rest}
21
21
  >
22
22
  {children}
23
23
  </StyledText>
@@ -1,38 +1,36 @@
1
- import React, { useMemo } from 'react';
2
- import { StyleSheet } from 'react-native';
3
- import Stack from '../Stack';
4
- import { moderateScale } from '../../helpers/ResponsiveCalculations';
1
+ import { type FC } from 'react';
2
+ import { type ViewStyle } from 'react-native';
3
+ import { horizontalScale, verticalScale } from '../../helpers/ResponsiveCalculations';
5
4
  import type { DialogFootProps } from '../../types';
5
+ import { useTheme } from '../../hooks';
6
+ import { StyledView } from '../StyledComponents';
6
7
 
7
8
 
8
9
  interface props extends DialogFootProps {
9
10
  variant?: 'classic' | 'default';
10
11
  }
11
12
 
12
- const DialogFoot: React.FC<props> = ({
13
+ const DialogFoot: FC<props> = ({
13
14
  variant,
14
15
  containerStyle,
15
- children
16
+ children,
17
+ ...rest
16
18
  }) => {
17
- const STYLES = useMemo(Styles, []);
18
- const dynamicStyles = {
19
+ const theme = useTheme();
20
+
21
+ const dynamicStyles: ViewStyle = {
19
22
  borderTopWidth: variant === 'default' ? 0.7 : 0,
20
- padding: moderateScale(variant === 'default' ? 16 : 20),
21
- paddingHorizontal: moderateScale(variant === 'default' ? 16 : 25),
23
+ borderColor: theme?.colors.border.subtle,
24
+ padding: verticalScale(variant === 'default' ? 16 : 20),
25
+ paddingHorizontal: horizontalScale(variant === 'default' ? 16 : 25),
26
+ justifyContent: 'flex-end',
27
+ flexDirection: 'row'
22
28
  };
23
29
  return (<>
24
- <Stack.H style={[STYLES.CONTAINER, dynamicStyles, containerStyle]}>
30
+ <StyledView style={[dynamicStyles, containerStyle]} {...rest}>
25
31
  {children}
26
- </Stack.H>
32
+ </StyledView>
27
33
  </>);
28
34
  }
29
35
  export default DialogFoot;
30
- export type { DialogFootProps };
31
-
32
- const Styles = () => StyleSheet.create({
33
- CONTAINER: {
34
- borderColor: '#d4d4d4',
35
- justifyContent: 'flex-end',
36
- gap: moderateScale(15)
37
- },
38
- });
36
+ export type { DialogFootProps };
@@ -1,39 +1,36 @@
1
- import React, { useMemo } from 'react';
2
- import { View, StyleSheet, TouchableOpacity } from 'react-native';
3
- import { moderateScale } from '../../helpers/ResponsiveCalculations';
4
- import { X } from '../../assets/svg';
1
+ import { useMemo, type FC } from 'react';
2
+ import { View, StyleSheet } from 'react-native';
3
+ import { verticalScale } from '../../helpers/ResponsiveCalculations';
5
4
  import { StyledText } from '../StyledComponents';
6
5
  import type { DialogHeadProps } from '../../types';
6
+ import { useTheme } from '../../hooks';
7
7
 
8
8
 
9
9
  interface props extends DialogHeadProps {
10
10
  variant?: 'classic' | 'default';
11
11
  }
12
12
 
13
- const DialogHead: React.FC<props> = ({
13
+ const DialogHead: FC<props> = ({
14
14
  variant = 'default',
15
- title = 'Title',
16
- textVariant = 'h4',
15
+ title,
16
+ fScale = 'xl',
17
17
  fs,
18
+ ff,
18
19
  containerStyle,
19
- textStyle,
20
+ titleStyle,
20
21
  children
21
22
  }) => {
23
+ const theme = useTheme();
22
24
  const STYLES = useMemo(Styles, []);
25
+
23
26
  const dynamicStyles = {
24
27
  borderBottomWidth: variant == 'default' ? 0.7 : 0,
25
- padding: moderateScale(variant === 'default' ? 16 : 25),
28
+ borderColor: theme?.colors.border.subtle,
29
+ padding: verticalScale(variant === 'default' ? 16 : 25),
26
30
  };
27
31
  return (<>
28
-
29
32
  <View style={[STYLES.CONTAINER, dynamicStyles, containerStyle]}>
30
- <View>
31
- <StyledText style={[STYLES.HEADER_TEXT, textStyle]} fs={fs} variant={textVariant}>{title}</StyledText>
32
- {children}
33
- </View>
34
- <TouchableOpacity>
35
- <X color='gray' size={moderateScale(20)} />
36
- </TouchableOpacity>
33
+ <StyledText style={[STYLES.HEADER_TEXT, titleStyle]} fs={fs} ff={ff} fScale={fScale}>{title || children}</StyledText>
37
34
  </View>
38
35
  </>);
39
36
  }
@@ -43,13 +40,11 @@ export type { DialogHeadProps };
43
40
 
44
41
  const Styles = () => StyleSheet.create({
45
42
  CONTAINER: {
46
- borderColor: '#d4d4d4',
47
- paddingBottom: moderateScale(16),
43
+ paddingBottom: verticalScale(16),
48
44
  justifyContent: 'space-between',
49
45
  flexDirection: 'row',
50
46
  },
51
47
  HEADER_TEXT: {
52
48
  fontWeight: 'bold',
53
- color: '#000',
54
49
  }
55
50
  });
@@ -1,30 +1,22 @@
1
- import React from 'react';
2
- import type { ViewStyle, StyleProp } from "react-native";
1
+ import { type FC } from 'react';
3
2
  import { StyledView } from '../StyledComponents';
4
3
  import { useTheme } from '../../hooks';
4
+ import type { DividerProps } from '../../types';
5
5
 
6
6
 
7
- type DividerProps = {
8
- thickness?: number;
9
- style?: StyleProp<ViewStyle>
10
- color?: string;
11
- }
12
-
13
- const Divider: React.FC<DividerProps> = ({
14
- thickness = 0.2,
7
+ const Divider: FC<DividerProps> = ({
8
+ thickness = 0.7,
15
9
  color,
16
10
  style
17
11
  }) => {
18
-
19
12
  const theme = useTheme();
20
-
21
13
  const dynamicStyles = {
22
14
  borderWidth: thickness,
23
- borderColor: color ?? theme?.colors.dividerColor
15
+ borderColor: color ?? theme?.colors.border.subtle
24
16
  };
25
- return (<>
17
+ return (
26
18
  <StyledView style={[dynamicStyles, style]} />
27
- </>);
19
+ );
28
20
  };
29
21
  export default Divider;
30
22
  export type { DividerProps };
@@ -1,10 +1,11 @@
1
- import React, { useMemo } from 'react';
2
- import { View, StyleSheet } from "react-native";
1
+ import { useMemo, type FC } from 'react';
2
+ import { StyleSheet } from "react-native";
3
3
  import { getGridValue } from '../../helpers';
4
4
  import { useConditionalWindowDimension } from '../../hooks';
5
5
  import type { GridProps } from '../../types';
6
+ import { StyledView } from '../StyledComponents';
6
7
 
7
- const Grid: React.FC<GridProps> = ({
8
+ const Grid: FC<GridProps> = ({
8
9
  container = false,
9
10
  item = false,
10
11
  spacing = 0,
@@ -48,12 +49,12 @@ const Grid: React.FC<GridProps> = ({
48
49
  },
49
50
  });
50
51
  return (<>
51
- <View
52
+ <StyledView
52
53
  style={[STYLES.MAIN_CONT, containerStyle]}
53
54
  {...rest}
54
55
  >
55
56
  {children}
56
- </View>
57
+ </StyledView>
57
58
  </>);
58
59
  };
59
60
  export default Grid;