@nexara/nativeflow 0.1.7 → 0.1.9

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 (570) hide show
  1. package/README.md +1 -1
  2. package/lib/commonjs/assets/svg/Check.js.map +1 -1
  3. package/lib/commonjs/assets/svg/X.js.map +1 -1
  4. package/lib/commonjs/assets/svg/index.js.map +1 -1
  5. package/lib/commonjs/components/Avatar/AvatarImage.js +3 -9
  6. package/lib/commonjs/components/Avatar/AvatarImage.js.map +1 -1
  7. package/lib/commonjs/components/Avatar/AvatarText.js +2 -4
  8. package/lib/commonjs/components/Avatar/AvatarText.js.map +1 -1
  9. package/lib/commonjs/components/Avatar/index.js.map +1 -1
  10. package/lib/commonjs/components/Button/Button.js +23 -24
  11. package/lib/commonjs/components/Button/Button.js.map +1 -1
  12. package/lib/commonjs/components/Button/utils.js +34 -27
  13. package/lib/commonjs/components/Button/utils.js.map +1 -1
  14. package/lib/commonjs/components/CheckBox/CheckBox.js +41 -38
  15. package/lib/commonjs/components/CheckBox/CheckBox.js.map +1 -1
  16. package/lib/commonjs/components/Chip/Chip.js +21 -25
  17. package/lib/commonjs/components/Chip/Chip.js.map +1 -1
  18. package/lib/commonjs/components/Chip/utils.js +31 -18
  19. package/lib/commonjs/components/Chip/utils.js.map +1 -1
  20. package/lib/commonjs/components/Dialog/Dialog.js +14 -11
  21. package/lib/commonjs/components/Dialog/Dialog.js.map +1 -1
  22. package/lib/commonjs/components/Dialog/DialogBody.js +7 -7
  23. package/lib/commonjs/components/Dialog/DialogBody.js.map +1 -1
  24. package/lib/commonjs/components/Dialog/DialogDescription.js +7 -9
  25. package/lib/commonjs/components/Dialog/DialogDescription.js.map +1 -1
  26. package/lib/commonjs/components/Dialog/DialogFoot.js +13 -19
  27. package/lib/commonjs/components/Dialog/DialogFoot.js.map +1 -1
  28. package/lib/commonjs/components/Dialog/DialogHead.js +20 -27
  29. package/lib/commonjs/components/Dialog/DialogHead.js.map +1 -1
  30. package/lib/commonjs/components/Dialog/index.js.map +1 -1
  31. package/lib/commonjs/components/Divider/Divider.js +4 -8
  32. package/lib/commonjs/components/Divider/Divider.js.map +1 -1
  33. package/lib/commonjs/components/Grid/Grid.js +3 -4
  34. package/lib/commonjs/components/Grid/Grid.js.map +1 -1
  35. package/lib/commonjs/components/Icon/Icon.js +2 -3
  36. package/lib/commonjs/components/Icon/Icon.js.map +1 -1
  37. package/lib/commonjs/components/IconButton/IconButton.js +1 -2
  38. package/lib/commonjs/components/IconButton/IconButton.js.map +1 -1
  39. package/lib/commonjs/components/Link/Link.js +13 -17
  40. package/lib/commonjs/components/Link/Link.js.map +1 -1
  41. package/lib/commonjs/components/Menu/Menu.js +12 -8
  42. package/lib/commonjs/components/Menu/Menu.js.map +1 -1
  43. package/lib/commonjs/components/Menu/MenuItem.js +3 -5
  44. package/lib/commonjs/components/Menu/MenuItem.js.map +1 -1
  45. package/lib/commonjs/components/Menu/MenuItemLabel.js +2 -8
  46. package/lib/commonjs/components/Menu/MenuItemLabel.js.map +1 -1
  47. package/lib/commonjs/components/Menu/calculations.js.map +1 -1
  48. package/lib/commonjs/components/Menu/index.js.map +1 -1
  49. package/lib/commonjs/components/Portal/Portal.js.map +1 -1
  50. package/lib/commonjs/components/Portal/PortalContext.js +1 -2
  51. package/lib/commonjs/components/Portal/PortalContext.js.map +1 -1
  52. package/lib/commonjs/components/Portal/PortalProvider.js +1 -2
  53. package/lib/commonjs/components/Portal/PortalProvider.js.map +1 -1
  54. package/lib/commonjs/components/Progress/Progress.js +6 -7
  55. package/lib/commonjs/components/Progress/Progress.js.map +1 -1
  56. package/lib/commonjs/components/Provider/ContextManager.js.map +1 -1
  57. package/lib/commonjs/components/Provider/NativeProvider.js +1 -2
  58. package/lib/commonjs/components/Provider/NativeProvider.js.map +1 -1
  59. package/lib/commonjs/components/Radio/RadioGroup.js +46 -0
  60. package/lib/commonjs/components/Radio/RadioGroup.js.map +1 -0
  61. package/lib/commonjs/components/Radio/RadioItem.js +77 -0
  62. package/lib/commonjs/components/Radio/RadioItem.js.map +1 -0
  63. package/lib/commonjs/components/Radio/index.js +15 -0
  64. package/lib/commonjs/components/Radio/index.js.map +1 -0
  65. package/lib/commonjs/components/Slider/Slider.js +4 -4
  66. package/lib/commonjs/components/Slider/Slider.js.map +1 -1
  67. package/lib/commonjs/components/Stack/HStack.js +3 -9
  68. package/lib/commonjs/components/Stack/HStack.js.map +1 -1
  69. package/lib/commonjs/components/Stack/VStack.js +4 -10
  70. package/lib/commonjs/components/Stack/VStack.js.map +1 -1
  71. package/lib/commonjs/components/Stack/index.js.map +1 -1
  72. package/lib/commonjs/components/StyledComponents/StyledText.js +20 -9
  73. package/lib/commonjs/components/StyledComponents/StyledText.js.map +1 -1
  74. package/lib/commonjs/components/StyledComponents/StyledView.js +3 -3
  75. package/lib/commonjs/components/StyledComponents/StyledView.js.map +1 -1
  76. package/lib/commonjs/components/StyledComponents/index.js.map +1 -1
  77. package/lib/commonjs/components/Surface/Surface.js +24 -21
  78. package/lib/commonjs/components/Surface/Surface.js.map +1 -1
  79. package/lib/commonjs/components/Switch/Switch.js +13 -10
  80. package/lib/commonjs/components/Switch/Switch.js.map +1 -1
  81. package/lib/commonjs/components/TouchableRipple/TouchableRipple.js.map +1 -1
  82. package/lib/commonjs/components/UserInput/UserInput.js +17 -14
  83. package/lib/commonjs/components/UserInput/UserInput.js.map +1 -1
  84. package/lib/commonjs/components/UserInput/UserInputV2.js.map +1 -1
  85. package/lib/commonjs/components/UserInput/generateColors.js +3 -3
  86. package/lib/commonjs/components/UserInput/generateColors.js.map +1 -1
  87. package/lib/commonjs/constants/breakPoints.js.map +1 -1
  88. package/lib/commonjs/constants/dialogSizes.js.map +1 -1
  89. package/lib/commonjs/constants/index.js.map +1 -1
  90. package/lib/commonjs/constants/theme.js.map +1 -1
  91. package/lib/commonjs/constants/typographySizes.js +11 -7
  92. package/lib/commonjs/constants/typographySizes.js.map +1 -1
  93. package/lib/commonjs/helpers/CalculateGridSize.js +1 -1
  94. package/lib/commonjs/helpers/CalculateGridSize.js.map +1 -1
  95. package/lib/commonjs/helpers/DeviceSizeCategory.js.map +1 -1
  96. package/lib/commonjs/helpers/ResponsiveCalculations.js +29 -32
  97. package/lib/commonjs/helpers/ResponsiveCalculations.js.map +1 -1
  98. package/lib/commonjs/helpers/index.js.map +1 -1
  99. package/lib/commonjs/hooks/index.js.map +1 -1
  100. package/lib/commonjs/hooks/useColorScheme.js.map +1 -1
  101. package/lib/commonjs/hooks/useConditionalWindowDimension.js.map +1 -1
  102. package/lib/commonjs/hooks/useScalingMode.js.map +1 -1
  103. package/lib/commonjs/hooks/useTheme.js.map +1 -1
  104. package/lib/commonjs/index.d.js.map +1 -1
  105. package/lib/commonjs/index.js +23 -42
  106. package/lib/commonjs/index.js.map +1 -1
  107. package/lib/commonjs/themes/DarkTheme.js +185 -25
  108. package/lib/commonjs/themes/DarkTheme.js.map +1 -1
  109. package/lib/commonjs/themes/LightTheme.js +89 -81
  110. package/lib/commonjs/themes/LightTheme.js.map +1 -1
  111. package/lib/commonjs/themes/index.js.map +1 -1
  112. package/lib/commonjs/types/avatar.type.js.map +1 -1
  113. package/lib/commonjs/types/button.type.js.map +1 -1
  114. package/lib/commonjs/types/checkbox.type.js.map +1 -1
  115. package/lib/commonjs/types/chip.type.js.map +1 -1
  116. package/lib/commonjs/types/common.type.js.map +1 -1
  117. package/lib/commonjs/types/dialog.type.js.map +1 -1
  118. package/lib/commonjs/types/divider.type.js +6 -0
  119. package/lib/commonjs/types/divider.type.js.map +1 -0
  120. package/lib/commonjs/types/grid.type.js.map +1 -1
  121. package/lib/commonjs/types/index.js +44 -0
  122. package/lib/commonjs/types/index.js.map +1 -1
  123. package/lib/commonjs/types/link.type.js +6 -0
  124. package/lib/commonjs/types/link.type.js.map +1 -0
  125. package/lib/commonjs/types/menu.type.js.map +1 -1
  126. package/lib/commonjs/types/progress.type.js.map +1 -1
  127. package/lib/commonjs/types/radio.type.js +6 -0
  128. package/lib/commonjs/types/radio.type.js.map +1 -0
  129. package/lib/commonjs/types/stack.type.js.map +1 -1
  130. package/lib/commonjs/types/styledComponents.type.js.map +1 -1
  131. package/lib/commonjs/types/surface.type.js +6 -0
  132. package/lib/commonjs/types/surface.type.js.map +1 -0
  133. package/lib/commonjs/types/switch.type.js.map +1 -1
  134. package/lib/commonjs/types/userInput.type.js.map +1 -1
  135. package/lib/commonjs/utils/index.js.map +1 -1
  136. package/lib/module/assets/svg/Check.js.map +1 -1
  137. package/lib/module/assets/svg/X.js.map +1 -1
  138. package/lib/module/assets/svg/index.js.map +1 -1
  139. package/lib/module/components/Avatar/AvatarImage.js +3 -8
  140. package/lib/module/components/Avatar/AvatarImage.js.map +1 -1
  141. package/lib/module/components/Avatar/AvatarText.js +2 -3
  142. package/lib/module/components/Avatar/AvatarText.js.map +1 -1
  143. package/lib/module/components/Avatar/index.js.map +1 -1
  144. package/lib/module/components/Button/Button.js +22 -22
  145. package/lib/module/components/Button/Button.js.map +1 -1
  146. package/lib/module/components/Button/utils.js +34 -27
  147. package/lib/module/components/Button/utils.js.map +1 -1
  148. package/lib/module/components/CheckBox/CheckBox.js +35 -30
  149. package/lib/module/components/CheckBox/CheckBox.js.map +1 -1
  150. package/lib/module/components/Chip/Chip.js +22 -26
  151. package/lib/module/components/Chip/Chip.js.map +1 -1
  152. package/lib/module/components/Chip/utils.js +30 -18
  153. package/lib/module/components/Chip/utils.js.map +1 -1
  154. package/lib/module/components/Dialog/Dialog.js +13 -9
  155. package/lib/module/components/Dialog/Dialog.js.map +1 -1
  156. package/lib/module/components/Dialog/DialogBody.js +9 -8
  157. package/lib/module/components/Dialog/DialogBody.js.map +1 -1
  158. package/lib/module/components/Dialog/DialogDescription.js +8 -9
  159. package/lib/module/components/Dialog/DialogDescription.js.map +1 -1
  160. package/lib/module/components/Dialog/DialogFoot.js +14 -17
  161. package/lib/module/components/Dialog/DialogFoot.js.map +1 -1
  162. package/lib/module/components/Dialog/DialogHead.js +22 -27
  163. package/lib/module/components/Dialog/DialogHead.js.map +1 -1
  164. package/lib/module/components/Dialog/index.js.map +1 -1
  165. package/lib/module/components/Divider/Divider.js +5 -8
  166. package/lib/module/components/Divider/Divider.js.map +1 -1
  167. package/lib/module/components/Grid/Grid.js +4 -3
  168. package/lib/module/components/Grid/Grid.js.map +1 -1
  169. package/lib/module/components/Icon/Icon.js +1 -1
  170. package/lib/module/components/Icon/Icon.js.map +1 -1
  171. package/lib/module/components/IconButton/IconButton.js.map +1 -1
  172. package/lib/module/components/Link/Link.js +15 -19
  173. package/lib/module/components/Link/Link.js.map +1 -1
  174. package/lib/module/components/Menu/Menu.js +11 -6
  175. package/lib/module/components/Menu/Menu.js.map +1 -1
  176. package/lib/module/components/Menu/MenuItem.js +4 -5
  177. package/lib/module/components/Menu/MenuItem.js.map +1 -1
  178. package/lib/module/components/Menu/MenuItemLabel.js +2 -7
  179. package/lib/module/components/Menu/MenuItemLabel.js.map +1 -1
  180. package/lib/module/components/Menu/calculations.js.map +1 -1
  181. package/lib/module/components/Menu/index.js.map +1 -1
  182. package/lib/module/components/Portal/Portal.js.map +1 -1
  183. package/lib/module/components/Portal/PortalContext.js.map +1 -1
  184. package/lib/module/components/Portal/PortalProvider.js.map +1 -1
  185. package/lib/module/components/Progress/Progress.js +7 -6
  186. package/lib/module/components/Progress/Progress.js.map +1 -1
  187. package/lib/module/components/Provider/ContextManager.js.map +1 -1
  188. package/lib/module/components/Provider/NativeProvider.js.map +1 -1
  189. package/lib/module/components/Radio/RadioGroup.js +41 -0
  190. package/lib/module/components/Radio/RadioGroup.js.map +1 -0
  191. package/lib/module/components/Radio/RadioItem.js +73 -0
  192. package/lib/module/components/Radio/RadioItem.js.map +1 -0
  193. package/lib/module/components/Radio/index.js +10 -0
  194. package/lib/module/components/Radio/index.js.map +1 -0
  195. package/lib/module/components/Slider/Slider.js +5 -5
  196. package/lib/module/components/Slider/Slider.js.map +1 -1
  197. package/lib/module/components/Stack/HStack.js +3 -7
  198. package/lib/module/components/Stack/HStack.js.map +1 -1
  199. package/lib/module/components/Stack/VStack.js +4 -8
  200. package/lib/module/components/Stack/VStack.js.map +1 -1
  201. package/lib/module/components/Stack/index.js.map +1 -1
  202. package/lib/module/components/StyledComponents/StyledText.js +20 -8
  203. package/lib/module/components/StyledComponents/StyledText.js.map +1 -1
  204. package/lib/module/components/StyledComponents/StyledView.js +3 -3
  205. package/lib/module/components/StyledComponents/StyledView.js.map +1 -1
  206. package/lib/module/components/StyledComponents/index.js.map +1 -1
  207. package/lib/module/components/Surface/Surface.js +24 -20
  208. package/lib/module/components/Surface/Surface.js.map +1 -1
  209. package/lib/module/components/Switch/Switch.js +14 -11
  210. package/lib/module/components/Switch/Switch.js.map +1 -1
  211. package/lib/module/components/TouchableRipple/TouchableRipple.js.map +1 -1
  212. package/lib/module/components/UserInput/UserInput.js +18 -15
  213. package/lib/module/components/UserInput/UserInput.js.map +1 -1
  214. package/lib/module/components/UserInput/UserInputV2.js.map +1 -1
  215. package/lib/module/components/UserInput/generateColors.js +3 -3
  216. package/lib/module/components/UserInput/generateColors.js.map +1 -1
  217. package/lib/module/constants/breakPoints.js.map +1 -1
  218. package/lib/module/constants/dialogSizes.js.map +1 -1
  219. package/lib/module/constants/index.js.map +1 -1
  220. package/lib/module/constants/theme.js.map +1 -1
  221. package/lib/module/constants/typographySizes.js +11 -7
  222. package/lib/module/constants/typographySizes.js.map +1 -1
  223. package/lib/module/helpers/CalculateGridSize.js +1 -1
  224. package/lib/module/helpers/CalculateGridSize.js.map +1 -1
  225. package/lib/module/helpers/DeviceSizeCategory.js.map +1 -1
  226. package/lib/module/helpers/ResponsiveCalculations.js +29 -29
  227. package/lib/module/helpers/ResponsiveCalculations.js.map +1 -1
  228. package/lib/module/helpers/index.js.map +1 -1
  229. package/lib/module/hooks/index.js.map +1 -1
  230. package/lib/module/hooks/useColorScheme.js.map +1 -1
  231. package/lib/module/hooks/useConditionalWindowDimension.js.map +1 -1
  232. package/lib/module/hooks/useScalingMode.js.map +1 -1
  233. package/lib/module/hooks/useTheme.js.map +1 -1
  234. package/lib/module/index.d.js.map +1 -1
  235. package/lib/module/index.js +3 -4
  236. package/lib/module/index.js.map +1 -1
  237. package/lib/module/themes/DarkTheme.js +188 -24
  238. package/lib/module/themes/DarkTheme.js.map +1 -1
  239. package/lib/module/themes/LightTheme.js +88 -81
  240. package/lib/module/themes/LightTheme.js.map +1 -1
  241. package/lib/module/themes/index.js +0 -1
  242. package/lib/module/themes/index.js.map +1 -1
  243. package/lib/module/types/avatar.type.js.map +1 -1
  244. package/lib/module/types/button.type.js.map +1 -1
  245. package/lib/module/types/checkbox.type.js.map +1 -1
  246. package/lib/module/types/chip.type.js.map +1 -1
  247. package/lib/module/types/common.type.js.map +1 -1
  248. package/lib/module/types/dialog.type.js.map +1 -1
  249. package/lib/module/types/divider.type.js +4 -0
  250. package/lib/module/types/divider.type.js.map +1 -0
  251. package/lib/module/types/grid.type.js.map +1 -1
  252. package/lib/module/types/index.js +4 -0
  253. package/lib/module/types/index.js.map +1 -1
  254. package/lib/module/types/link.type.js +4 -0
  255. package/lib/module/types/link.type.js.map +1 -0
  256. package/lib/module/types/menu.type.js.map +1 -1
  257. package/lib/module/types/progress.type.js.map +1 -1
  258. package/lib/module/types/radio.type.js +4 -0
  259. package/lib/module/types/radio.type.js.map +1 -0
  260. package/lib/module/types/stack.type.js.map +1 -1
  261. package/lib/module/types/styledComponents.type.js.map +1 -1
  262. package/lib/module/types/surface.type.js +4 -0
  263. package/lib/module/types/surface.type.js.map +1 -0
  264. package/lib/module/types/switch.type.js.map +1 -1
  265. package/lib/module/types/userInput.type.js.map +1 -1
  266. package/lib/module/utils/index.js.map +1 -1
  267. package/lib/typescript/commonjs/src/components/Avatar/AvatarImage.d.ts +2 -2
  268. package/lib/typescript/commonjs/src/components/Avatar/AvatarImage.d.ts.map +1 -1
  269. package/lib/typescript/commonjs/src/components/Avatar/AvatarText.d.ts +2 -2
  270. package/lib/typescript/commonjs/src/components/Avatar/AvatarText.d.ts.map +1 -1
  271. package/lib/typescript/commonjs/src/components/Button/Button.d.ts +2 -2
  272. package/lib/typescript/commonjs/src/components/Button/Button.d.ts.map +1 -1
  273. package/lib/typescript/commonjs/src/components/Button/utils.d.ts +0 -1
  274. package/lib/typescript/commonjs/src/components/Button/utils.d.ts.map +1 -1
  275. package/lib/typescript/commonjs/src/components/CheckBox/CheckBox.d.ts +2 -2
  276. package/lib/typescript/commonjs/src/components/CheckBox/CheckBox.d.ts.map +1 -1
  277. package/lib/typescript/commonjs/src/components/Chip/Chip.d.ts +2 -2
  278. package/lib/typescript/commonjs/src/components/Chip/Chip.d.ts.map +1 -1
  279. package/lib/typescript/commonjs/src/components/Chip/utils.d.ts +3 -2
  280. package/lib/typescript/commonjs/src/components/Chip/utils.d.ts.map +1 -1
  281. package/lib/typescript/commonjs/src/components/Dialog/Dialog.d.ts.map +1 -1
  282. package/lib/typescript/commonjs/src/components/Dialog/DialogBody.d.ts +4 -4
  283. package/lib/typescript/commonjs/src/components/Dialog/DialogBody.d.ts.map +1 -1
  284. package/lib/typescript/commonjs/src/components/Dialog/DialogDescription.d.ts +2 -2
  285. package/lib/typescript/commonjs/src/components/Dialog/DialogDescription.d.ts.map +1 -1
  286. package/lib/typescript/commonjs/src/components/Dialog/DialogFoot.d.ts +2 -2
  287. package/lib/typescript/commonjs/src/components/Dialog/DialogFoot.d.ts.map +1 -1
  288. package/lib/typescript/commonjs/src/components/Dialog/DialogHead.d.ts +2 -2
  289. package/lib/typescript/commonjs/src/components/Dialog/DialogHead.d.ts.map +1 -1
  290. package/lib/typescript/commonjs/src/components/Divider/Divider.d.ts +3 -8
  291. package/lib/typescript/commonjs/src/components/Divider/Divider.d.ts.map +1 -1
  292. package/lib/typescript/commonjs/src/components/Grid/Grid.d.ts +2 -2
  293. package/lib/typescript/commonjs/src/components/Grid/Grid.d.ts.map +1 -1
  294. package/lib/typescript/commonjs/src/components/Link/Link.d.ts +3 -10
  295. package/lib/typescript/commonjs/src/components/Link/Link.d.ts.map +1 -1
  296. package/lib/typescript/commonjs/src/components/Menu/Menu.d.ts +2 -2
  297. package/lib/typescript/commonjs/src/components/Menu/Menu.d.ts.map +1 -1
  298. package/lib/typescript/commonjs/src/components/Menu/MenuItem.d.ts +2 -2
  299. package/lib/typescript/commonjs/src/components/Menu/MenuItem.d.ts.map +1 -1
  300. package/lib/typescript/commonjs/src/components/Menu/MenuItemLabel.d.ts +2 -2
  301. package/lib/typescript/commonjs/src/components/Menu/MenuItemLabel.d.ts.map +1 -1
  302. package/lib/typescript/commonjs/src/components/Progress/Progress.d.ts +2 -2
  303. package/lib/typescript/commonjs/src/components/Progress/Progress.d.ts.map +1 -1
  304. package/lib/typescript/commonjs/src/components/Radio/RadioGroup.d.ts +5 -0
  305. package/lib/typescript/commonjs/src/components/Radio/RadioGroup.d.ts.map +1 -0
  306. package/lib/typescript/commonjs/src/components/Radio/RadioItem.d.ts +5 -0
  307. package/lib/typescript/commonjs/src/components/Radio/RadioItem.d.ts.map +1 -0
  308. package/lib/typescript/commonjs/src/components/Radio/index.d.ts +6 -0
  309. package/lib/typescript/commonjs/src/components/Radio/index.d.ts.map +1 -0
  310. package/lib/typescript/commonjs/src/components/Stack/HStack.d.ts +2 -2
  311. package/lib/typescript/commonjs/src/components/Stack/HStack.d.ts.map +1 -1
  312. package/lib/typescript/commonjs/src/components/Stack/VStack.d.ts +2 -2
  313. package/lib/typescript/commonjs/src/components/Stack/VStack.d.ts.map +1 -1
  314. package/lib/typescript/commonjs/src/components/StyledComponents/StyledText.d.ts +2 -2
  315. package/lib/typescript/commonjs/src/components/StyledComponents/StyledText.d.ts.map +1 -1
  316. package/lib/typescript/commonjs/src/components/Surface/Surface.d.ts +3 -3
  317. package/lib/typescript/commonjs/src/components/Surface/Surface.d.ts.map +1 -1
  318. package/lib/typescript/commonjs/src/components/Switch/Switch.d.ts +2 -2
  319. package/lib/typescript/commonjs/src/components/Switch/Switch.d.ts.map +1 -1
  320. package/lib/typescript/commonjs/src/components/UserInput/UserInput.d.ts +36 -2
  321. package/lib/typescript/commonjs/src/components/UserInput/UserInput.d.ts.map +1 -1
  322. package/lib/typescript/commonjs/src/constants/typographySizes.d.ts +2 -8
  323. package/lib/typescript/commonjs/src/constants/typographySizes.d.ts.map +1 -1
  324. package/lib/typescript/commonjs/src/helpers/ResponsiveCalculations.d.ts +0 -2
  325. package/lib/typescript/commonjs/src/helpers/ResponsiveCalculations.d.ts.map +1 -1
  326. package/lib/typescript/commonjs/src/index.d.ts +4 -4
  327. package/lib/typescript/commonjs/src/index.d.ts.map +1 -1
  328. package/lib/typescript/commonjs/src/themes/DarkTheme.d.ts.map +1 -1
  329. package/lib/typescript/commonjs/src/themes/LightTheme.d.ts.map +1 -1
  330. package/lib/typescript/commonjs/src/types/avatar.type.d.ts +0 -2
  331. package/lib/typescript/commonjs/src/types/avatar.type.d.ts.map +1 -1
  332. package/lib/typescript/commonjs/src/types/button.type.d.ts +20 -20
  333. package/lib/typescript/commonjs/src/types/button.type.d.ts.map +1 -1
  334. package/lib/typescript/commonjs/src/types/checkbox.type.d.ts +20 -14
  335. package/lib/typescript/commonjs/src/types/checkbox.type.d.ts.map +1 -1
  336. package/lib/typescript/commonjs/src/types/chip.type.d.ts +21 -13
  337. package/lib/typescript/commonjs/src/types/chip.type.d.ts.map +1 -1
  338. package/lib/typescript/commonjs/src/types/common.type.d.ts +71 -22
  339. package/lib/typescript/commonjs/src/types/common.type.d.ts.map +1 -1
  340. package/lib/typescript/commonjs/src/types/dialog.type.d.ts +13 -12
  341. package/lib/typescript/commonjs/src/types/dialog.type.d.ts.map +1 -1
  342. package/lib/typescript/commonjs/src/types/divider.type.d.ts +11 -0
  343. package/lib/typescript/commonjs/src/types/divider.type.d.ts.map +1 -0
  344. package/lib/typescript/commonjs/src/types/grid.type.d.ts +2 -1
  345. package/lib/typescript/commonjs/src/types/grid.type.d.ts.map +1 -1
  346. package/lib/typescript/commonjs/src/types/index.d.ts +4 -0
  347. package/lib/typescript/commonjs/src/types/index.d.ts.map +1 -1
  348. package/lib/typescript/commonjs/src/types/link.type.d.ts +12 -0
  349. package/lib/typescript/commonjs/src/types/link.type.d.ts.map +1 -0
  350. package/lib/typescript/commonjs/src/types/menu.type.d.ts +2 -15
  351. package/lib/typescript/commonjs/src/types/menu.type.d.ts.map +1 -1
  352. package/lib/typescript/commonjs/src/types/radio.type.d.ts +61 -0
  353. package/lib/typescript/commonjs/src/types/radio.type.d.ts.map +1 -0
  354. package/lib/typescript/commonjs/src/types/stack.type.d.ts +6 -14
  355. package/lib/typescript/commonjs/src/types/stack.type.d.ts.map +1 -1
  356. package/lib/typescript/commonjs/src/types/styledComponents.type.d.ts +24 -71
  357. package/lib/typescript/commonjs/src/types/styledComponents.type.d.ts.map +1 -1
  358. package/lib/typescript/commonjs/src/types/surface.type.d.ts +16 -0
  359. package/lib/typescript/commonjs/src/types/surface.type.d.ts.map +1 -0
  360. package/lib/typescript/commonjs/src/types/userInput.type.d.ts +10 -14
  361. package/lib/typescript/commonjs/src/types/userInput.type.d.ts.map +1 -1
  362. package/lib/typescript/module/src/components/Avatar/AvatarImage.d.ts +2 -2
  363. package/lib/typescript/module/src/components/Avatar/AvatarImage.d.ts.map +1 -1
  364. package/lib/typescript/module/src/components/Avatar/AvatarText.d.ts +2 -2
  365. package/lib/typescript/module/src/components/Avatar/AvatarText.d.ts.map +1 -1
  366. package/lib/typescript/module/src/components/Button/Button.d.ts +2 -2
  367. package/lib/typescript/module/src/components/Button/Button.d.ts.map +1 -1
  368. package/lib/typescript/module/src/components/Button/utils.d.ts +0 -1
  369. package/lib/typescript/module/src/components/Button/utils.d.ts.map +1 -1
  370. package/lib/typescript/module/src/components/CheckBox/CheckBox.d.ts +2 -2
  371. package/lib/typescript/module/src/components/CheckBox/CheckBox.d.ts.map +1 -1
  372. package/lib/typescript/module/src/components/Chip/Chip.d.ts +2 -2
  373. package/lib/typescript/module/src/components/Chip/Chip.d.ts.map +1 -1
  374. package/lib/typescript/module/src/components/Chip/utils.d.ts +3 -2
  375. package/lib/typescript/module/src/components/Chip/utils.d.ts.map +1 -1
  376. package/lib/typescript/module/src/components/Dialog/Dialog.d.ts.map +1 -1
  377. package/lib/typescript/module/src/components/Dialog/DialogBody.d.ts +4 -4
  378. package/lib/typescript/module/src/components/Dialog/DialogBody.d.ts.map +1 -1
  379. package/lib/typescript/module/src/components/Dialog/DialogDescription.d.ts +2 -2
  380. package/lib/typescript/module/src/components/Dialog/DialogDescription.d.ts.map +1 -1
  381. package/lib/typescript/module/src/components/Dialog/DialogFoot.d.ts +2 -2
  382. package/lib/typescript/module/src/components/Dialog/DialogFoot.d.ts.map +1 -1
  383. package/lib/typescript/module/src/components/Dialog/DialogHead.d.ts +2 -2
  384. package/lib/typescript/module/src/components/Dialog/DialogHead.d.ts.map +1 -1
  385. package/lib/typescript/module/src/components/Divider/Divider.d.ts +3 -8
  386. package/lib/typescript/module/src/components/Divider/Divider.d.ts.map +1 -1
  387. package/lib/typescript/module/src/components/Grid/Grid.d.ts +2 -2
  388. package/lib/typescript/module/src/components/Grid/Grid.d.ts.map +1 -1
  389. package/lib/typescript/module/src/components/Link/Link.d.ts +3 -10
  390. package/lib/typescript/module/src/components/Link/Link.d.ts.map +1 -1
  391. package/lib/typescript/module/src/components/Menu/Menu.d.ts +2 -2
  392. package/lib/typescript/module/src/components/Menu/Menu.d.ts.map +1 -1
  393. package/lib/typescript/module/src/components/Menu/MenuItem.d.ts +2 -2
  394. package/lib/typescript/module/src/components/Menu/MenuItem.d.ts.map +1 -1
  395. package/lib/typescript/module/src/components/Menu/MenuItemLabel.d.ts +2 -2
  396. package/lib/typescript/module/src/components/Menu/MenuItemLabel.d.ts.map +1 -1
  397. package/lib/typescript/module/src/components/Progress/Progress.d.ts +2 -2
  398. package/lib/typescript/module/src/components/Progress/Progress.d.ts.map +1 -1
  399. package/lib/typescript/module/src/components/Radio/RadioGroup.d.ts +5 -0
  400. package/lib/typescript/module/src/components/Radio/RadioGroup.d.ts.map +1 -0
  401. package/lib/typescript/module/src/components/Radio/RadioItem.d.ts +5 -0
  402. package/lib/typescript/module/src/components/Radio/RadioItem.d.ts.map +1 -0
  403. package/lib/typescript/module/src/components/Radio/index.d.ts +6 -0
  404. package/lib/typescript/module/src/components/Radio/index.d.ts.map +1 -0
  405. package/lib/typescript/module/src/components/Stack/HStack.d.ts +2 -2
  406. package/lib/typescript/module/src/components/Stack/HStack.d.ts.map +1 -1
  407. package/lib/typescript/module/src/components/Stack/VStack.d.ts +2 -2
  408. package/lib/typescript/module/src/components/Stack/VStack.d.ts.map +1 -1
  409. package/lib/typescript/module/src/components/StyledComponents/StyledText.d.ts +2 -2
  410. package/lib/typescript/module/src/components/StyledComponents/StyledText.d.ts.map +1 -1
  411. package/lib/typescript/module/src/components/Surface/Surface.d.ts +3 -3
  412. package/lib/typescript/module/src/components/Surface/Surface.d.ts.map +1 -1
  413. package/lib/typescript/module/src/components/Switch/Switch.d.ts +2 -2
  414. package/lib/typescript/module/src/components/Switch/Switch.d.ts.map +1 -1
  415. package/lib/typescript/module/src/components/UserInput/UserInput.d.ts +36 -2
  416. package/lib/typescript/module/src/components/UserInput/UserInput.d.ts.map +1 -1
  417. package/lib/typescript/module/src/constants/typographySizes.d.ts +2 -8
  418. package/lib/typescript/module/src/constants/typographySizes.d.ts.map +1 -1
  419. package/lib/typescript/module/src/helpers/ResponsiveCalculations.d.ts +0 -2
  420. package/lib/typescript/module/src/helpers/ResponsiveCalculations.d.ts.map +1 -1
  421. package/lib/typescript/module/src/index.d.ts +4 -4
  422. package/lib/typescript/module/src/index.d.ts.map +1 -1
  423. package/lib/typescript/module/src/themes/DarkTheme.d.ts.map +1 -1
  424. package/lib/typescript/module/src/themes/LightTheme.d.ts.map +1 -1
  425. package/lib/typescript/module/src/types/avatar.type.d.ts +0 -2
  426. package/lib/typescript/module/src/types/avatar.type.d.ts.map +1 -1
  427. package/lib/typescript/module/src/types/button.type.d.ts +20 -20
  428. package/lib/typescript/module/src/types/button.type.d.ts.map +1 -1
  429. package/lib/typescript/module/src/types/checkbox.type.d.ts +20 -14
  430. package/lib/typescript/module/src/types/checkbox.type.d.ts.map +1 -1
  431. package/lib/typescript/module/src/types/chip.type.d.ts +21 -13
  432. package/lib/typescript/module/src/types/chip.type.d.ts.map +1 -1
  433. package/lib/typescript/module/src/types/common.type.d.ts +71 -22
  434. package/lib/typescript/module/src/types/common.type.d.ts.map +1 -1
  435. package/lib/typescript/module/src/types/dialog.type.d.ts +13 -12
  436. package/lib/typescript/module/src/types/dialog.type.d.ts.map +1 -1
  437. package/lib/typescript/module/src/types/divider.type.d.ts +11 -0
  438. package/lib/typescript/module/src/types/divider.type.d.ts.map +1 -0
  439. package/lib/typescript/module/src/types/grid.type.d.ts +2 -1
  440. package/lib/typescript/module/src/types/grid.type.d.ts.map +1 -1
  441. package/lib/typescript/module/src/types/index.d.ts +4 -0
  442. package/lib/typescript/module/src/types/index.d.ts.map +1 -1
  443. package/lib/typescript/module/src/types/link.type.d.ts +12 -0
  444. package/lib/typescript/module/src/types/link.type.d.ts.map +1 -0
  445. package/lib/typescript/module/src/types/menu.type.d.ts +2 -15
  446. package/lib/typescript/module/src/types/menu.type.d.ts.map +1 -1
  447. package/lib/typescript/module/src/types/radio.type.d.ts +61 -0
  448. package/lib/typescript/module/src/types/radio.type.d.ts.map +1 -0
  449. package/lib/typescript/module/src/types/stack.type.d.ts +6 -14
  450. package/lib/typescript/module/src/types/stack.type.d.ts.map +1 -1
  451. package/lib/typescript/module/src/types/styledComponents.type.d.ts +24 -71
  452. package/lib/typescript/module/src/types/styledComponents.type.d.ts.map +1 -1
  453. package/lib/typescript/module/src/types/surface.type.d.ts +16 -0
  454. package/lib/typescript/module/src/types/surface.type.d.ts.map +1 -0
  455. package/lib/typescript/module/src/types/userInput.type.d.ts +10 -14
  456. package/lib/typescript/module/src/types/userInput.type.d.ts.map +1 -1
  457. package/package.json +10 -5
  458. package/src/assets/svg/Check.tsx +16 -16
  459. package/src/assets/svg/X.tsx +15 -15
  460. package/src/assets/svg/index.ts +1 -1
  461. package/src/components/Avatar/AvatarImage.tsx +33 -38
  462. package/src/components/Avatar/AvatarText.tsx +34 -34
  463. package/src/components/Avatar/index.ts +8 -8
  464. package/src/components/Button/Button.tsx +205 -199
  465. package/src/components/Button/utils.ts +141 -141
  466. package/src/components/CheckBox/CheckBox.tsx +118 -116
  467. package/src/components/Chip/Chip.tsx +82 -90
  468. package/src/components/Chip/utils.ts +109 -95
  469. package/src/components/Dialog/Dialog.tsx +124 -120
  470. package/src/components/Dialog/DialogBody.tsx +31 -31
  471. package/src/components/Dialog/DialogDescription.tsx +27 -27
  472. package/src/components/Dialog/DialogFoot.tsx +36 -38
  473. package/src/components/Dialog/DialogHead.tsx +50 -55
  474. package/src/components/Dialog/index.ts +10 -10
  475. package/src/components/Divider/Divider.tsx +22 -30
  476. package/src/components/Grid/Grid.tsx +61 -60
  477. package/src/components/Icon/Icon.tsx +31 -31
  478. package/src/components/IconButton/IconButton.tsx +44 -44
  479. package/src/components/Link/Link.tsx +38 -47
  480. package/src/components/Menu/Menu.tsx +142 -139
  481. package/src/components/Menu/MenuItem.tsx +33 -33
  482. package/src/components/Menu/MenuItemLabel.tsx +21 -26
  483. package/src/components/Menu/calculations.ts +33 -33
  484. package/src/components/Menu/index.ts +7 -7
  485. package/src/components/Portal/Portal.tsx +18 -18
  486. package/src/components/Portal/PortalContext.tsx +9 -9
  487. package/src/components/Portal/PortalProvider.tsx +36 -36
  488. package/src/components/Progress/Progress.tsx +66 -65
  489. package/src/components/Provider/ContextManager.tsx +8 -8
  490. package/src/components/Provider/NativeProvider.tsx +72 -72
  491. package/src/components/Radio/RadioGroup.tsx +40 -0
  492. package/src/components/Radio/RadioItem.tsx +72 -0
  493. package/src/components/Radio/index.ts +9 -0
  494. package/src/components/Slider/Slider.tsx +45 -45
  495. package/src/components/Stack/HStack.tsx +32 -35
  496. package/src/components/Stack/VStack.tsx +26 -31
  497. package/src/components/Stack/index.ts +8 -8
  498. package/src/components/StyledComponents/StyledText.tsx +49 -40
  499. package/src/components/StyledComponents/StyledView.tsx +44 -44
  500. package/src/components/StyledComponents/index.tsx +5 -5
  501. package/src/components/Surface/Surface.tsx +31 -38
  502. package/src/components/Switch/Switch.tsx +36 -34
  503. package/src/components/TouchableRipple/TouchableRipple.tsx +92 -92
  504. package/src/components/UserInput/UserInput.tsx +135 -132
  505. package/src/components/UserInput/UserInputV2.tsx +132 -132
  506. package/src/components/UserInput/generateColors.ts +13 -13
  507. package/src/constants/breakPoints.ts +17 -17
  508. package/src/constants/dialogSizes.ts +11 -11
  509. package/src/constants/index.ts +2 -2
  510. package/src/constants/theme.ts +32 -32
  511. package/src/constants/typographySizes.ts +19 -21
  512. package/src/helpers/CalculateGridSize.ts +25 -25
  513. package/src/helpers/DeviceSizeCategory.ts +21 -21
  514. package/src/helpers/ResponsiveCalculations.ts +107 -108
  515. package/src/helpers/index.ts +2 -2
  516. package/src/hooks/index.ts +3 -3
  517. package/src/hooks/useColorScheme.tsx +11 -11
  518. package/src/hooks/useConditionalWindowDimension.tsx +7 -7
  519. package/src/hooks/useScalingMode.tsx +6 -6
  520. package/src/hooks/useTheme.tsx +12 -12
  521. package/src/index.d.ts +2 -2
  522. package/src/index.ts +52 -53
  523. package/src/themes/DarkTheme.ts +178 -39
  524. package/src/themes/LightTheme.ts +88 -95
  525. package/src/themes/index.ts +3 -4
  526. package/src/types/avatar.type.ts +40 -43
  527. package/src/types/button.type.ts +76 -76
  528. package/src/types/checkbox.type.ts +64 -57
  529. package/src/types/chip.type.ts +65 -56
  530. package/src/types/common.type.ts +109 -51
  531. package/src/types/dialog.type.ts +90 -89
  532. package/src/types/divider.type.ts +15 -0
  533. package/src/types/grid.type.ts +71 -70
  534. package/src/types/index.ts +17 -13
  535. package/src/types/link.type.ts +15 -0
  536. package/src/types/menu.type.ts +100 -116
  537. package/src/types/progress.type.ts +15 -15
  538. package/src/types/radio.type.ts +78 -0
  539. package/src/types/stack.type.ts +46 -56
  540. package/src/types/styledComponents.type.ts +70 -118
  541. package/src/types/surface.type.ts +19 -0
  542. package/src/types/switch.type.ts +39 -39
  543. package/src/types/userInput.type.ts +98 -103
  544. package/lib/commonjs/components/Header/Header.js +0 -78
  545. package/lib/commonjs/components/Header/Header.js.map +0 -1
  546. package/lib/commonjs/helpers/LightenColorShades.js +0 -27
  547. package/lib/commonjs/helpers/LightenColorShades.js.map +0 -1
  548. package/lib/commonjs/themes/createTheme.js +0 -25
  549. package/lib/commonjs/themes/createTheme.js.map +0 -1
  550. package/lib/module/components/Header/Header.js +0 -73
  551. package/lib/module/components/Header/Header.js.map +0 -1
  552. package/lib/module/helpers/LightenColorShades.js +0 -23
  553. package/lib/module/helpers/LightenColorShades.js.map +0 -1
  554. package/lib/module/themes/createTheme.js +0 -25
  555. package/lib/module/themes/createTheme.js.map +0 -1
  556. package/lib/typescript/commonjs/src/components/Header/Header.d.ts +0 -16
  557. package/lib/typescript/commonjs/src/components/Header/Header.d.ts.map +0 -1
  558. package/lib/typescript/commonjs/src/helpers/LightenColorShades.d.ts +0 -3
  559. package/lib/typescript/commonjs/src/helpers/LightenColorShades.d.ts.map +0 -1
  560. package/lib/typescript/commonjs/src/themes/createTheme.d.ts +0 -1
  561. package/lib/typescript/commonjs/src/themes/createTheme.d.ts.map +0 -1
  562. package/lib/typescript/module/src/components/Header/Header.d.ts +0 -16
  563. package/lib/typescript/module/src/components/Header/Header.d.ts.map +0 -1
  564. package/lib/typescript/module/src/helpers/LightenColorShades.d.ts +0 -3
  565. package/lib/typescript/module/src/helpers/LightenColorShades.d.ts.map +0 -1
  566. package/lib/typescript/module/src/themes/createTheme.d.ts +0 -1
  567. package/lib/typescript/module/src/themes/createTheme.d.ts.map +0 -1
  568. package/src/components/Header/Header.tsx +0 -82
  569. package/src/helpers/LightenColorShades.ts +0 -27
  570. package/src/themes/createTheme.ts +0 -23
@@ -1,90 +1,82 @@
1
- import React from 'react';
2
- import { StyleSheet, Pressable, TouchableOpacity } from 'react-native';
3
- import { StyledText, StyledView } from '../StyledComponents';
4
- import { horizontalScale, verticalScale } from "../../helpers/ResponsiveCalculations";
5
- import { useTheme } from '../../hooks';
6
- import { getChipColors } from './utils';
7
- import type { ChipProps } from '../../types';
8
-
9
- const Chip: React.FC<ChipProps> = ({
10
- title = 'Chip',
11
- bg,
12
- titleColor,
13
- fs,
14
- br = 7,
15
- gap = 7,
16
- paddingV = 9,
17
- paddingH = 13,
18
- stroke = 0.9,
19
- strokeColor,
20
- rippleColor,
21
- disabled = false,
22
- renderLeftIcon,
23
- renderRightIcon,
24
- containerStyle,
25
- textStyle,
26
- ...rest
27
- }) => {
28
-
29
- const theme: any = useTheme();
30
-
31
- const { buttonTextColor, buttonBorderColor, backgroundColor } = getChipColors({
32
- theme,
33
- bg,
34
- titleColor,
35
- strokeColor,
36
- disabled
37
- });
38
-
39
- const STYLES = StyleSheet.create({
40
- CONTAINER: {
41
- flexDirection: 'row',
42
- alignItems: 'center',
43
- borderWidth: stroke,
44
- borderColor: buttonBorderColor,
45
- backgroundColor: backgroundColor,
46
- borderRadius: verticalScale(br),
47
- paddingVertical: verticalScale(paddingV),
48
- paddingHorizontal: horizontalScale(paddingH),
49
- gap: horizontalScale(gap)
50
- },
51
- TEXT: {
52
- color: buttonTextColor,
53
- }
54
- });
55
- return (<>
56
- <StyledView alignSelf='flex-start'>
57
- <Pressable
58
- android_ripple={{
59
- color: rippleColor,
60
- }}
61
- {...rest}
62
- disabled={disabled}
63
- >
64
- <StyledView style={[STYLES.CONTAINER, containerStyle]}>
65
- {
66
- renderLeftIcon &&
67
- <TouchableOpacity
68
- disabled={disabled}
69
- >
70
- {renderLeftIcon}
71
- </TouchableOpacity>
72
- }
73
- <StyledText primary variant='h5' fs={fs} style={[STYLES.TEXT, textStyle]}>{title}</StyledText>
74
- {
75
- renderRightIcon &&
76
- <TouchableOpacity
77
- disabled={disabled}
78
- >
79
- {renderRightIcon}
80
- </TouchableOpacity>
81
- }
82
- </StyledView>
83
-
84
- </Pressable>
85
- </StyledView>
86
- </>);
87
- }
88
- export default Chip;
89
- export type { ChipProps };
90
-
1
+ import React, { type FC } from 'react';
2
+ import { StyleSheet, TouchableOpacity } from 'react-native';
3
+ import { StyledText, StyledView } from '../StyledComponents';
4
+ import { horizontalScale, verticalScale } from "../../helpers/ResponsiveCalculations";
5
+ import { useTheme } from '../../hooks';
6
+ import { getChipColors } from './utils';
7
+ import type { ChipProps } from '../../types';
8
+
9
+ const Chip: FC<ChipProps> = ({
10
+ label = 'Chip',
11
+ labelColor,
12
+ fs,
13
+ fScale = 'sm',
14
+ ff,
15
+ bg,
16
+ br = 7,
17
+ gap = 7,
18
+ paddingV = 6,
19
+ paddingH = 15,
20
+ stroke = 0.8,
21
+ strokeColor,
22
+ rippleColor,
23
+ disabled = false,
24
+ renderLeftIcon,
25
+ renderRightIcon,
26
+ containerStyle,
27
+ textStyle,
28
+ active = false,
29
+ ...rest
30
+ }) => {
31
+
32
+ const theme: any = useTheme();
33
+
34
+ const { buttonTextColor, buttonBorderColor, backgroundColor } = getChipColors({
35
+ theme,
36
+ bg,
37
+ labelColor,
38
+ strokeColor,
39
+ disabled,
40
+ active
41
+ });
42
+
43
+ const STYLES = StyleSheet.create({
44
+ CONTAINER: {
45
+ flexDirection: 'row',
46
+ alignItems: 'center',
47
+ borderWidth: stroke,
48
+ borderColor: buttonBorderColor,
49
+ backgroundColor: backgroundColor,
50
+ borderRadius: verticalScale(br),
51
+ paddingVertical: verticalScale(paddingV),
52
+ paddingLeft: horizontalScale((renderLeftIcon && paddingH / 2) ?? paddingH),
53
+ paddingRight: horizontalScale((renderRightIcon && paddingH / 2) ?? paddingH),
54
+ gap: horizontalScale(gap)
55
+ },
56
+ TEXT: {
57
+ color: buttonTextColor,
58
+ }
59
+ });
60
+ return (<>
61
+ <StyledView alignSelf='flex-start'>
62
+ <TouchableOpacity
63
+ disabled={disabled}
64
+ {...rest}
65
+ >
66
+ <StyledView style={[STYLES.CONTAINER, containerStyle]}>
67
+ {
68
+ React.isValidElement(renderLeftIcon) && renderLeftIcon
69
+ }
70
+ <StyledText fScale={fScale} ff={ff} fs={fs} style={[STYLES.TEXT, textStyle]}>{label}</StyledText>
71
+ {
72
+ React.isValidElement(renderRightIcon) && renderRightIcon
73
+ }
74
+ </StyledView>
75
+
76
+ </TouchableOpacity>
77
+ </StyledView>
78
+ </>);
79
+ }
80
+ export default Chip;
81
+ export type { ChipProps };
82
+
@@ -1,96 +1,110 @@
1
- import type { ThemeTypes } from "../../types";
2
-
3
- const getBorderColor = ({
4
- theme,
5
- strokeColor,
6
- disabled,
7
- }: {
8
- theme: ThemeTypes;
9
- strokeColor: string | undefined;
10
- disabled: boolean;
11
- }) => {
12
- if (disabled) {
13
- return theme.colors.disable;
14
- }
15
- if (strokeColor) {
16
- return strokeColor
17
- }
18
- return theme.colors.outline;
19
- };
20
-
21
-
22
- const getTextColor = ({
23
- theme,
24
- titleColor,
25
- disabled
26
- }: {
27
- theme: ThemeTypes;
28
- titleColor: string | undefined;
29
- disabled: boolean;
30
- }) => {
31
- if (disabled) {
32
- return theme.colors.textDisable;
33
- }
34
- else if (titleColor) {
35
- return titleColor;
36
- }
37
- return theme.colors.textTertiary;
38
- };
39
-
40
- const getBgColor = ({
41
- theme,
42
- bg,
43
- disabled
44
- }: {
45
- theme: ThemeTypes;
46
- bg: string | undefined;
47
- disabled: boolean;
48
- }) => {
49
- if (disabled) {
50
- return theme.colors.disable;
51
- }
52
- else if (bg) {
53
- return bg
54
- }
55
- return theme.colors.chipBgColor;
56
- };
57
-
58
- const getChipColors = ({
59
- theme,
60
- bg,
61
- titleColor,
62
- strokeColor,
63
- disabled
64
- }: {
65
- theme: ThemeTypes;
66
- bg: string | undefined;
67
- titleColor: string | undefined;
68
- strokeColor: string | undefined;
69
- disabled: boolean;
70
- }) => {
71
-
72
-
73
- const backgroundColor = getBgColor({
74
- theme,
75
- bg,
76
- disabled
77
- });
78
- const buttonTextColor = getTextColor({
79
- theme,
80
- titleColor,
81
- disabled
82
- });
83
- const buttonBorderColor = getBorderColor({
84
- theme,
85
- strokeColor,
86
- disabled,
87
- });
88
-
89
- return {
90
- backgroundColor,
91
- buttonTextColor,
92
- buttonBorderColor
93
- }
94
- };
95
-
1
+ import Color from "color";
2
+ import type { ThemeTypes } from "../../types";
3
+
4
+ const getBorderColor = ({
5
+ theme,
6
+ strokeColor,
7
+ disabled,
8
+ active
9
+ }: {
10
+ theme: ThemeTypes;
11
+ strokeColor: string | undefined;
12
+ disabled: boolean;
13
+ active: boolean;
14
+ }) => {
15
+ if (disabled) {
16
+ return theme.colors.border.strong;
17
+ } else if (strokeColor) {
18
+ return strokeColor
19
+ } else if (active) {
20
+ return Color(theme.colors.brand.primary).alpha(0.3).rgb().toString();
21
+ }
22
+ return theme.colors.border.default;
23
+ };
24
+
25
+
26
+ const getTextColor = ({
27
+ theme,
28
+ labelColor,
29
+ disabled
30
+ }: {
31
+ theme: ThemeTypes;
32
+ labelColor: string | undefined;
33
+ disabled: boolean;
34
+ }) => {
35
+ if (disabled) {
36
+ return theme.colors.typography.disabled;
37
+ }
38
+ else if (labelColor) {
39
+ return labelColor;
40
+ }
41
+ return theme.colors.typography.secondary;
42
+ };
43
+
44
+ const getBgColor = ({
45
+ theme,
46
+ bg,
47
+ disabled,
48
+ active
49
+ }: {
50
+ theme: ThemeTypes;
51
+ bg: string | undefined;
52
+ disabled: boolean;
53
+ active: boolean;
54
+ }) => {
55
+ if (disabled) {
56
+ return theme.colors.states.disabled;
57
+ } else if (bg) {
58
+ return bg
59
+ } else if (active) {
60
+ return Color(theme.colors.brand.primary).alpha(0.1).rgb().toString();
61
+ }
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();
66
+ };
67
+
68
+ const getChipColors = ({
69
+ theme,
70
+ bg,
71
+ labelColor,
72
+ strokeColor,
73
+ disabled,
74
+ active
75
+ }: {
76
+ theme: ThemeTypes;
77
+ bg: string | undefined;
78
+ labelColor: string | undefined;
79
+ strokeColor: string | undefined;
80
+ disabled: boolean;
81
+ active: boolean;
82
+ }) => {
83
+
84
+
85
+ const backgroundColor = getBgColor({
86
+ theme,
87
+ bg,
88
+ disabled,
89
+ active
90
+ });
91
+ const buttonTextColor = getTextColor({
92
+ theme,
93
+ labelColor,
94
+ disabled
95
+ });
96
+ const buttonBorderColor = getBorderColor({
97
+ theme,
98
+ strokeColor,
99
+ disabled,
100
+ active
101
+ });
102
+
103
+ return {
104
+ backgroundColor,
105
+ buttonTextColor,
106
+ buttonBorderColor
107
+ }
108
+ };
109
+
96
110
  export { getChipColors };
@@ -1,121 +1,125 @@
1
- import React, { cloneElement, forwardRef, useEffect, useImperativeHandle, useRef, useState } from 'react';
2
- import type { ReactElement } from "react";
3
- import { Keyboard, BackHandler, StyleSheet, Animated } from 'react-native';
4
- import type { ViewStyle } from 'react-native';
5
- import { dialogSizes } from '../../constants';
6
- import Portal from '../Portal/Portal';
7
- import type { DialogProps, DialogRefProps } from '../../types';
8
-
9
-
10
- const Dialog = forwardRef<DialogRefProps, DialogProps>(({
11
- variant = 'default',
12
- size = 'lg',
13
- fullScreen,
14
- backdropColor = 'rgba(0, 0, 0, 0.5)',
15
- // backdropColor = 'red',
16
- // animationDuration = 800,
17
- onClose,
18
- containerStyle,
19
- children,
20
- }, ref) => {
21
-
22
- const [dialogVisible, setDialogVisible] = useState(false);
23
- const scale = useRef(new Animated.Value(0.9)).current;
24
- const opacity = useRef(new Animated.Value(0)).current;
25
-
26
- useEffect(() => {
27
- Animated.timing(opacity, {
28
- toValue: dialogVisible ? 1 : 0,
29
- duration: 300,
30
- useNativeDriver: true,
31
- }).start();
32
- Animated.spring(scale, {
33
- toValue: dialogVisible ? 1 : 0.9,
34
- damping: 10,
35
- stiffness: 90,
36
- useNativeDriver: true,
37
- }).start();
38
- }, [dialogVisible]);
39
-
40
- useEffect(() => {
41
- const handler = BackHandler.addEventListener('hardwareBackPress', hardwareBackPress);
42
- return () => handler.remove();
43
- }, [dialogVisible]);
44
-
45
- const hardwareBackPress = () => {
46
- onClose?.();
47
- setDialogVisible(false);
48
- return dialogVisible;
49
- };
50
- useImperativeHandle(ref, () => ({
51
- open: () => setDialogVisible(true),
52
- close: () => setDialogVisible(false)
53
- }));
54
-
55
- const backdropAnimatedStyles = {
56
- opacity: opacity,
57
- backgroundColor: backdropColor,
58
- };
59
- const modalContAnimatedStyles = {
60
- transform: [{ scale }],
61
- opacity: opacity,
62
- };
63
- const dynamicModalContStyles: ViewStyle = {
64
- minHeight: fullScreen ? '100%' : 'auto',
65
- maxHeight: fullScreen ? '100%' : '80%',
66
- width: `${dialogSizes[size]}%`,
67
- };
68
-
69
- const renderChildrenWithVariant = () => {
70
- return React.Children.map(children, (child) => {
71
- if (React.isValidElement(child)) {
72
- return cloneElement(child as ReactElement<any>, { variant });
73
- }
74
- return child;
75
- });
76
- };
77
-
78
- const handleStartShouldSetResponder = (): boolean => {
79
- Keyboard.dismiss();
80
- onClose?.();
81
- setDialogVisible(false);
82
- return true;
83
- };
84
-
85
- return (<>
86
- <Portal name='dialog'>
87
- <Animated.View
88
- style={[STYLES.BACKDROP_CONT, backdropAnimatedStyles]}
89
- pointerEvents={dialogVisible ? 'auto' : 'none'}
90
- onStartShouldSetResponder={handleStartShouldSetResponder}
91
- >
92
- <Animated.View
93
- style={[STYLES.MODAL_CONT, dynamicModalContStyles, modalContAnimatedStyles, containerStyle]}
94
- onStartShouldSetResponder={() => true}
95
- >
96
- {renderChildrenWithVariant()}
97
- </Animated.View>
98
- </Animated.View>
99
- </Portal>
100
- </>);
101
- });
102
- export default Dialog;
103
- export type { DialogProps };
104
-
105
- const STYLES = StyleSheet.create({
106
- BACKDROP_CONT: {
107
- position: 'absolute',
108
- top: 0,
109
- bottom: 0,
110
- left: 0,
111
- right: 0,
112
- justifyContent: 'center',
113
- alignItems: 'center',
114
- },
115
- MODAL_CONT: {
116
- backgroundColor: '#fff',
117
- borderRadius: 5,
118
- borderWidth: 1,
119
- borderColor: '#d4d4d4'
120
- }
1
+ import React, { cloneElement, forwardRef, useEffect, useImperativeHandle, useRef, useState } from 'react';
2
+ import type { ReactElement } from "react";
3
+ import { Keyboard, BackHandler, StyleSheet, Animated } from 'react-native';
4
+ import type { ViewStyle } from 'react-native';
5
+ import { dialogSizes } from '../../constants';
6
+ import Portal from '../Portal/Portal';
7
+ import type { DialogProps, DialogRefProps } from '../../types';
8
+ import { useTheme } from '../../hooks';
9
+ import { verticalScale } from '../../helpers';
10
+
11
+
12
+ const Dialog = forwardRef<DialogRefProps, DialogProps>(({
13
+ variant = 'classic',
14
+ size = 'lg',
15
+ fullScreen,
16
+ backdropColor,
17
+ onClose,
18
+ containerStyle,
19
+ children,
20
+ }, ref) => {
21
+
22
+ const [dialogVisible, setDialogVisible] = useState(false);
23
+ const scale = useRef(new Animated.Value(0.9)).current;
24
+ const opacity = useRef(new Animated.Value(0)).current;
25
+ const theme = useTheme();
26
+
27
+ useEffect(() => {
28
+ Animated.timing(opacity, {
29
+ toValue: dialogVisible ? 1 : 0,
30
+ duration: 300,
31
+ useNativeDriver: true,
32
+ }).start();
33
+ Animated.spring(scale, {
34
+ toValue: dialogVisible ? 1 : 0.9,
35
+ damping: 10,
36
+ stiffness: 90,
37
+ useNativeDriver: true,
38
+ }).start();
39
+ }, [dialogVisible]);
40
+
41
+ useEffect(() => {
42
+ const handler = BackHandler.addEventListener('hardwareBackPress', hardwareBackPress);
43
+ return () => handler.remove();
44
+ }, [dialogVisible]);
45
+
46
+ const hardwareBackPress = () => {
47
+ onClose?.();
48
+ setDialogVisible(false);
49
+ return dialogVisible;
50
+ };
51
+ useImperativeHandle(ref, () => ({
52
+ open: () => setDialogVisible(true),
53
+ close: () => setDialogVisible(false)
54
+ }));
55
+
56
+ const backdropAnimatedStyles = {
57
+ opacity: opacity,
58
+ backgroundColor: backdropColor ?? theme?.colors.background.backdrop,
59
+ };
60
+ const modalContAnimatedStyles = {
61
+ transform: [{ scale }],
62
+ opacity: opacity,
63
+ };
64
+ const dynamicModalContStyles: ViewStyle = {
65
+ minHeight: fullScreen ? '100%' : 'auto',
66
+ maxHeight: fullScreen ? '100%' : '80%',
67
+ width: `${dialogSizes[size]}%`,
68
+ backgroundColor:theme?.colors.background.elevated,
69
+ borderColor: theme?.colors.border.default,
70
+ borderRadius: verticalScale(40)
71
+ };
72
+
73
+ const renderChildrenWithVariant = () => {
74
+ return React.Children.map(children, (child) => {
75
+ if (React.isValidElement(child)) {
76
+ return cloneElement(child as ReactElement<any>, { variant });
77
+ }
78
+ return child;
79
+ });
80
+ };
81
+
82
+ const handleStartShouldSetResponder = (): boolean => {
83
+ Keyboard.dismiss();
84
+ onClose?.();
85
+ setDialogVisible(false);
86
+ return true;
87
+ };
88
+
89
+ return (<>
90
+ <Portal name='dialog'>
91
+ <Animated.View
92
+ style={[STYLES.BACKDROP_CONT, backdropAnimatedStyles]}
93
+ pointerEvents={dialogVisible ? 'auto' : 'none'}
94
+ onStartShouldSetResponder={handleStartShouldSetResponder}
95
+ >
96
+ <Animated.View
97
+ style={[STYLES.MODAL_CONT, dynamicModalContStyles, modalContAnimatedStyles, containerStyle]}
98
+ onStartShouldSetResponder={() => true}
99
+ >
100
+ {renderChildrenWithVariant()}
101
+ </Animated.View>
102
+ </Animated.View>
103
+ </Portal>
104
+ </>);
105
+ });
106
+ export default Dialog;
107
+ export type { DialogProps };
108
+
109
+ const STYLES = StyleSheet.create({
110
+ BACKDROP_CONT: {
111
+ position: 'absolute',
112
+ top: 0,
113
+ bottom: 0,
114
+ left: 0,
115
+ right: 0,
116
+ justifyContent: 'center',
117
+ alignItems: 'center',
118
+ },
119
+ MODAL_CONT: {
120
+ // backgroundColor: '#fff',
121
+ borderRadius: 5,
122
+ borderWidth: 1,
123
+ // borderColor: '#d4d4d4'
124
+ }
121
125
  });