@kukkim/react-native-ui 0.1.0

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 (321) hide show
  1. package/LICENSE +20 -0
  2. package/README.md +33 -0
  3. package/lib/module/assets/icons/arrow-down-to-line.svg +1 -0
  4. package/lib/module/assets/icons/arrow-down-wide-narrow.svg +1 -0
  5. package/lib/module/assets/icons/arrow-left.svg +1 -0
  6. package/lib/module/assets/icons/check.svg +1 -0
  7. package/lib/module/assets/icons/chevron-down.svg +1 -0
  8. package/lib/module/assets/icons/copy.svg +1 -0
  9. package/lib/module/assets/icons/rotate-cw.svg +1 -0
  10. package/lib/module/assets/icons/square-arrow-out-up-right.svg +1 -0
  11. package/lib/module/assets/icons/star-empty.svg +1 -0
  12. package/lib/module/assets/icons/star-full.svg +1 -0
  13. package/lib/module/assets/icons/star-half.svg +25 -0
  14. package/lib/module/assets/icons/x.svg +1 -0
  15. package/lib/module/assets/images/defaultImage.png +0 -0
  16. package/lib/module/components/avatar/index.js +45 -0
  17. package/lib/module/components/avatar/index.js.map +1 -0
  18. package/lib/module/components/avatar/types.js +49 -0
  19. package/lib/module/components/avatar/types.js.map +1 -0
  20. package/lib/module/components/badge/commonBadge.js +44 -0
  21. package/lib/module/components/badge/commonBadge.js.map +1 -0
  22. package/lib/module/components/badge/index.js +5 -0
  23. package/lib/module/components/badge/index.js.map +1 -0
  24. package/lib/module/components/badge/types.js +48 -0
  25. package/lib/module/components/badge/types.js.map +1 -0
  26. package/lib/module/components/button/commonButton.js +43 -0
  27. package/lib/module/components/button/commonButton.js.map +1 -0
  28. package/lib/module/components/button/index.js +5 -0
  29. package/lib/module/components/button/index.js.map +1 -0
  30. package/lib/module/components/button/types.js +28 -0
  31. package/lib/module/components/button/types.js.map +1 -0
  32. package/lib/module/components/card/commonCard.js +57 -0
  33. package/lib/module/components/card/commonCard.js.map +1 -0
  34. package/lib/module/components/card/foldableCard.js +76 -0
  35. package/lib/module/components/card/foldableCard.js.map +1 -0
  36. package/lib/module/components/card/index.js +6 -0
  37. package/lib/module/components/card/index.js.map +1 -0
  38. package/lib/module/components/card/types.js +4 -0
  39. package/lib/module/components/card/types.js.map +1 -0
  40. package/lib/module/components/checkBox/index.js +38 -0
  41. package/lib/module/components/checkBox/index.js.map +1 -0
  42. package/lib/module/components/checkBox/types.js +17 -0
  43. package/lib/module/components/checkBox/types.js.map +1 -0
  44. package/lib/module/components/header/commonHeader.js +72 -0
  45. package/lib/module/components/header/commonHeader.js.map +1 -0
  46. package/lib/module/components/header/index.js +5 -0
  47. package/lib/module/components/header/index.js.map +1 -0
  48. package/lib/module/components/header/types.js +28 -0
  49. package/lib/module/components/header/types.js.map +1 -0
  50. package/lib/module/components/icon/ArrowDownToLine.js +25 -0
  51. package/lib/module/components/icon/ArrowDownToLine.js.map +1 -0
  52. package/lib/module/components/icon/ArrowDownWideNarrow.js +25 -0
  53. package/lib/module/components/icon/ArrowDownWideNarrow.js.map +1 -0
  54. package/lib/module/components/icon/ArrowLeft.js +25 -0
  55. package/lib/module/components/icon/ArrowLeft.js.map +1 -0
  56. package/lib/module/components/icon/Check.js +25 -0
  57. package/lib/module/components/icon/Check.js.map +1 -0
  58. package/lib/module/components/icon/ChevronDown.js +25 -0
  59. package/lib/module/components/icon/ChevronDown.js.map +1 -0
  60. package/lib/module/components/icon/Copy.js +32 -0
  61. package/lib/module/components/icon/Copy.js.map +1 -0
  62. package/lib/module/components/icon/RotateCw.js +27 -0
  63. package/lib/module/components/icon/RotateCw.js.map +1 -0
  64. package/lib/module/components/icon/SquareArrowOutUpRight.js +25 -0
  65. package/lib/module/components/icon/SquareArrowOutUpRight.js.map +1 -0
  66. package/lib/module/components/icon/StarEmpty.js +25 -0
  67. package/lib/module/components/icon/StarEmpty.js.map +1 -0
  68. package/lib/module/components/icon/StarFull.js +25 -0
  69. package/lib/module/components/icon/StarFull.js.map +1 -0
  70. package/lib/module/components/icon/StarHalf.js +34 -0
  71. package/lib/module/components/icon/StarHalf.js.map +1 -0
  72. package/lib/module/components/icon/X.js +25 -0
  73. package/lib/module/components/icon/X.js.map +1 -0
  74. package/lib/module/components/icon/index.js +54 -0
  75. package/lib/module/components/icon/index.js.map +1 -0
  76. package/lib/module/components/icon/types.js +8 -0
  77. package/lib/module/components/icon/types.js.map +1 -0
  78. package/lib/module/components/image/index.js +25 -0
  79. package/lib/module/components/image/index.js.map +1 -0
  80. package/lib/module/components/image/types.js +39 -0
  81. package/lib/module/components/image/types.js.map +1 -0
  82. package/lib/module/components/index.js +15 -0
  83. package/lib/module/components/index.js.map +1 -0
  84. package/lib/module/components/progressBar/circularProgressBar.js +59 -0
  85. package/lib/module/components/progressBar/circularProgressBar.js.map +1 -0
  86. package/lib/module/components/progressBar/index.js +7 -0
  87. package/lib/module/components/progressBar/index.js.map +1 -0
  88. package/lib/module/components/progressBar/linearProgressBar.js +42 -0
  89. package/lib/module/components/progressBar/linearProgressBar.js.map +1 -0
  90. package/lib/module/components/progressBar/types.js +13 -0
  91. package/lib/module/components/progressBar/types.js.map +1 -0
  92. package/lib/module/components/rating/index.js +84 -0
  93. package/lib/module/components/rating/index.js.map +1 -0
  94. package/lib/module/components/rating/types.js +8 -0
  95. package/lib/module/components/rating/types.js.map +1 -0
  96. package/lib/module/components/screenContainer/SafeAreaContainer.js +26 -0
  97. package/lib/module/components/screenContainer/SafeAreaContainer.js.map +1 -0
  98. package/lib/module/components/screenContainer/ScrollViewContainer.js +24 -0
  99. package/lib/module/components/screenContainer/ScrollViewContainer.js.map +1 -0
  100. package/lib/module/components/screenContainer/index.js +6 -0
  101. package/lib/module/components/screenContainer/index.js.map +1 -0
  102. package/lib/module/components/skeleton/index.js +3 -0
  103. package/lib/module/components/skeleton/index.js.map +1 -0
  104. package/lib/module/components/skeleton/types.js +2 -0
  105. package/lib/module/components/skeleton/types.js.map +1 -0
  106. package/lib/module/components/slider/index.js +3 -0
  107. package/lib/module/components/slider/index.js.map +1 -0
  108. package/lib/module/components/slider/types.js +2 -0
  109. package/lib/module/components/slider/types.js.map +1 -0
  110. package/lib/module/components/switch/index.js +3 -0
  111. package/lib/module/components/switch/index.js.map +1 -0
  112. package/lib/module/components/switch/types.js +2 -0
  113. package/lib/module/components/switch/types.js.map +1 -0
  114. package/lib/module/components/text/commonText.js +28 -0
  115. package/lib/module/components/text/commonText.js.map +1 -0
  116. package/lib/module/components/text/index.js +5 -0
  117. package/lib/module/components/text/index.js.map +1 -0
  118. package/lib/module/components/text/types.js +17 -0
  119. package/lib/module/components/text/types.js.map +1 -0
  120. package/lib/module/hooks/useTheme.js +12 -0
  121. package/lib/module/hooks/useTheme.js.map +1 -0
  122. package/lib/module/index.js +5 -0
  123. package/lib/module/index.js.map +1 -0
  124. package/lib/module/package.json +1 -0
  125. package/lib/module/theme/color.js +10 -0
  126. package/lib/module/theme/color.js.map +1 -0
  127. package/lib/module/theme/style.js +17 -0
  128. package/lib/module/theme/style.js.map +1 -0
  129. package/lib/module/theme/themeProvider.js +22 -0
  130. package/lib/module/theme/themeProvider.js.map +1 -0
  131. package/lib/module/theme/themes.js +41 -0
  132. package/lib/module/theme/themes.js.map +1 -0
  133. package/lib/typescript/package.json +1 -0
  134. package/lib/typescript/src/components/avatar/index.d.ts +3 -0
  135. package/lib/typescript/src/components/avatar/index.d.ts.map +1 -0
  136. package/lib/typescript/src/components/avatar/types.d.ts +16 -0
  137. package/lib/typescript/src/components/avatar/types.d.ts.map +1 -0
  138. package/lib/typescript/src/components/badge/commonBadge.d.ts +4 -0
  139. package/lib/typescript/src/components/badge/commonBadge.d.ts.map +1 -0
  140. package/lib/typescript/src/components/badge/index.d.ts +3 -0
  141. package/lib/typescript/src/components/badge/index.d.ts.map +1 -0
  142. package/lib/typescript/src/components/badge/types.d.ts +19 -0
  143. package/lib/typescript/src/components/badge/types.d.ts.map +1 -0
  144. package/lib/typescript/src/components/button/commonButton.d.ts +4 -0
  145. package/lib/typescript/src/components/button/commonButton.d.ts.map +1 -0
  146. package/lib/typescript/src/components/button/index.d.ts +3 -0
  147. package/lib/typescript/src/components/button/index.d.ts.map +1 -0
  148. package/lib/typescript/src/components/button/types.d.ts +14 -0
  149. package/lib/typescript/src/components/button/types.d.ts.map +1 -0
  150. package/lib/typescript/src/components/card/commonCard.d.ts +4 -0
  151. package/lib/typescript/src/components/card/commonCard.d.ts.map +1 -0
  152. package/lib/typescript/src/components/card/foldableCard.d.ts +4 -0
  153. package/lib/typescript/src/components/card/foldableCard.d.ts.map +1 -0
  154. package/lib/typescript/src/components/card/index.d.ts +4 -0
  155. package/lib/typescript/src/components/card/index.d.ts.map +1 -0
  156. package/lib/typescript/src/components/card/types.d.ts +16 -0
  157. package/lib/typescript/src/components/card/types.d.ts.map +1 -0
  158. package/lib/typescript/src/components/checkBox/index.d.ts +3 -0
  159. package/lib/typescript/src/components/checkBox/index.d.ts.map +1 -0
  160. package/lib/typescript/src/components/checkBox/types.d.ts +11 -0
  161. package/lib/typescript/src/components/checkBox/types.d.ts.map +1 -0
  162. package/lib/typescript/src/components/header/commonHeader.d.ts +4 -0
  163. package/lib/typescript/src/components/header/commonHeader.d.ts.map +1 -0
  164. package/lib/typescript/src/components/header/index.d.ts +3 -0
  165. package/lib/typescript/src/components/header/index.d.ts.map +1 -0
  166. package/lib/typescript/src/components/header/types.d.ts +19 -0
  167. package/lib/typescript/src/components/header/types.d.ts.map +1 -0
  168. package/lib/typescript/src/components/icon/ArrowDownToLine.d.ts +4 -0
  169. package/lib/typescript/src/components/icon/ArrowDownToLine.d.ts.map +1 -0
  170. package/lib/typescript/src/components/icon/ArrowDownWideNarrow.d.ts +4 -0
  171. package/lib/typescript/src/components/icon/ArrowDownWideNarrow.d.ts.map +1 -0
  172. package/lib/typescript/src/components/icon/ArrowLeft.d.ts +4 -0
  173. package/lib/typescript/src/components/icon/ArrowLeft.d.ts.map +1 -0
  174. package/lib/typescript/src/components/icon/Check.d.ts +4 -0
  175. package/lib/typescript/src/components/icon/Check.d.ts.map +1 -0
  176. package/lib/typescript/src/components/icon/ChevronDown.d.ts +4 -0
  177. package/lib/typescript/src/components/icon/ChevronDown.d.ts.map +1 -0
  178. package/lib/typescript/src/components/icon/Copy.d.ts +4 -0
  179. package/lib/typescript/src/components/icon/Copy.d.ts.map +1 -0
  180. package/lib/typescript/src/components/icon/RotateCw.d.ts +4 -0
  181. package/lib/typescript/src/components/icon/RotateCw.d.ts.map +1 -0
  182. package/lib/typescript/src/components/icon/SquareArrowOutUpRight.d.ts +4 -0
  183. package/lib/typescript/src/components/icon/SquareArrowOutUpRight.d.ts.map +1 -0
  184. package/lib/typescript/src/components/icon/StarEmpty.d.ts +4 -0
  185. package/lib/typescript/src/components/icon/StarEmpty.d.ts.map +1 -0
  186. package/lib/typescript/src/components/icon/StarFull.d.ts +4 -0
  187. package/lib/typescript/src/components/icon/StarFull.d.ts.map +1 -0
  188. package/lib/typescript/src/components/icon/StarHalf.d.ts +4 -0
  189. package/lib/typescript/src/components/icon/StarHalf.d.ts.map +1 -0
  190. package/lib/typescript/src/components/icon/X.d.ts +4 -0
  191. package/lib/typescript/src/components/icon/X.d.ts.map +1 -0
  192. package/lib/typescript/src/components/icon/index.d.ts +3 -0
  193. package/lib/typescript/src/components/icon/index.d.ts.map +1 -0
  194. package/lib/typescript/src/components/icon/types.d.ts +12 -0
  195. package/lib/typescript/src/components/icon/types.d.ts.map +1 -0
  196. package/lib/typescript/src/components/image/index.d.ts +3 -0
  197. package/lib/typescript/src/components/image/index.d.ts.map +1 -0
  198. package/lib/typescript/src/components/image/types.d.ts +9 -0
  199. package/lib/typescript/src/components/image/types.d.ts.map +1 -0
  200. package/lib/typescript/src/components/index.d.ts +13 -0
  201. package/lib/typescript/src/components/index.d.ts.map +1 -0
  202. package/lib/typescript/src/components/progressBar/circularProgressBar.d.ts +4 -0
  203. package/lib/typescript/src/components/progressBar/circularProgressBar.d.ts.map +1 -0
  204. package/lib/typescript/src/components/progressBar/index.d.ts +4 -0
  205. package/lib/typescript/src/components/progressBar/index.d.ts.map +1 -0
  206. package/lib/typescript/src/components/progressBar/linearProgressBar.d.ts +4 -0
  207. package/lib/typescript/src/components/progressBar/linearProgressBar.d.ts.map +1 -0
  208. package/lib/typescript/src/components/progressBar/types.d.ts +12 -0
  209. package/lib/typescript/src/components/progressBar/types.d.ts.map +1 -0
  210. package/lib/typescript/src/components/rating/index.d.ts +3 -0
  211. package/lib/typescript/src/components/rating/index.d.ts.map +1 -0
  212. package/lib/typescript/src/components/rating/types.d.ts +13 -0
  213. package/lib/typescript/src/components/rating/types.d.ts.map +1 -0
  214. package/lib/typescript/src/components/screenContainer/SafeAreaContainer.d.ts +4 -0
  215. package/lib/typescript/src/components/screenContainer/SafeAreaContainer.d.ts.map +1 -0
  216. package/lib/typescript/src/components/screenContainer/ScrollViewContainer.d.ts +4 -0
  217. package/lib/typescript/src/components/screenContainer/ScrollViewContainer.d.ts.map +1 -0
  218. package/lib/typescript/src/components/screenContainer/index.d.ts +4 -0
  219. package/lib/typescript/src/components/screenContainer/index.d.ts.map +1 -0
  220. package/lib/typescript/src/components/skeleton/index.d.ts +1 -0
  221. package/lib/typescript/src/components/skeleton/index.d.ts.map +1 -0
  222. package/lib/typescript/src/components/skeleton/types.d.ts +1 -0
  223. package/lib/typescript/src/components/skeleton/types.d.ts.map +1 -0
  224. package/lib/typescript/src/components/slider/index.d.ts +1 -0
  225. package/lib/typescript/src/components/slider/index.d.ts.map +1 -0
  226. package/lib/typescript/src/components/slider/types.d.ts +1 -0
  227. package/lib/typescript/src/components/slider/types.d.ts.map +1 -0
  228. package/lib/typescript/src/components/switch/index.d.ts +1 -0
  229. package/lib/typescript/src/components/switch/index.d.ts.map +1 -0
  230. package/lib/typescript/src/components/switch/types.d.ts +1 -0
  231. package/lib/typescript/src/components/switch/types.d.ts.map +1 -0
  232. package/lib/typescript/src/components/text/commonText.d.ts +4 -0
  233. package/lib/typescript/src/components/text/commonText.d.ts.map +1 -0
  234. package/lib/typescript/src/components/text/index.d.ts +3 -0
  235. package/lib/typescript/src/components/text/index.d.ts.map +1 -0
  236. package/lib/typescript/src/components/text/types.d.ts +11 -0
  237. package/lib/typescript/src/components/text/types.d.ts.map +1 -0
  238. package/lib/typescript/src/hooks/useTheme.d.ts +5 -0
  239. package/lib/typescript/src/hooks/useTheme.d.ts.map +1 -0
  240. package/lib/typescript/src/index.d.ts +3 -0
  241. package/lib/typescript/src/index.d.ts.map +1 -0
  242. package/lib/typescript/src/theme/color.d.ts +8 -0
  243. package/lib/typescript/src/theme/color.d.ts.map +1 -0
  244. package/lib/typescript/src/theme/style.d.ts +15 -0
  245. package/lib/typescript/src/theme/style.d.ts.map +1 -0
  246. package/lib/typescript/src/theme/themeProvider.d.ts +13 -0
  247. package/lib/typescript/src/theme/themeProvider.d.ts.map +1 -0
  248. package/lib/typescript/src/theme/themes.d.ts +25 -0
  249. package/lib/typescript/src/theme/themes.d.ts.map +1 -0
  250. package/package.json +170 -0
  251. package/src/assets/icons/arrow-down-to-line.svg +1 -0
  252. package/src/assets/icons/arrow-down-wide-narrow.svg +1 -0
  253. package/src/assets/icons/arrow-left.svg +1 -0
  254. package/src/assets/icons/check.svg +1 -0
  255. package/src/assets/icons/chevron-down.svg +1 -0
  256. package/src/assets/icons/copy.svg +1 -0
  257. package/src/assets/icons/rotate-cw.svg +1 -0
  258. package/src/assets/icons/square-arrow-out-up-right.svg +1 -0
  259. package/src/assets/icons/star-empty.svg +1 -0
  260. package/src/assets/icons/star-full.svg +1 -0
  261. package/src/assets/icons/star-half.svg +25 -0
  262. package/src/assets/icons/x.svg +1 -0
  263. package/src/assets/images/defaultImage.png +0 -0
  264. package/src/components/avatar/index.tsx +58 -0
  265. package/src/components/avatar/types.ts +38 -0
  266. package/src/components/badge/commonBadge.tsx +50 -0
  267. package/src/components/badge/index.ts +3 -0
  268. package/src/components/badge/types.ts +36 -0
  269. package/src/components/button/commonButton.tsx +43 -0
  270. package/src/components/button/index.ts +3 -0
  271. package/src/components/button/types.ts +29 -0
  272. package/src/components/card/commonCard.tsx +67 -0
  273. package/src/components/card/foldableCard.tsx +88 -0
  274. package/src/components/card/index.ts +4 -0
  275. package/src/components/card/types.ts +18 -0
  276. package/src/components/checkBox/index.tsx +41 -0
  277. package/src/components/checkBox/types.ts +16 -0
  278. package/src/components/header/commonHeader.tsx +55 -0
  279. package/src/components/header/index.ts +3 -0
  280. package/src/components/header/types.ts +30 -0
  281. package/src/components/icon/ArrowDownToLine.tsx +21 -0
  282. package/src/components/icon/ArrowDownWideNarrow.tsx +21 -0
  283. package/src/components/icon/ArrowLeft.tsx +21 -0
  284. package/src/components/icon/Check.tsx +21 -0
  285. package/src/components/icon/ChevronDown.tsx +21 -0
  286. package/src/components/icon/Copy.tsx +22 -0
  287. package/src/components/icon/RotateCw.tsx +22 -0
  288. package/src/components/icon/SquareArrowOutUpRight.tsx +21 -0
  289. package/src/components/icon/StarEmpty.tsx +21 -0
  290. package/src/components/icon/StarFull.tsx +21 -0
  291. package/src/components/icon/StarHalf.tsx +32 -0
  292. package/src/components/icon/X.tsx +21 -0
  293. package/src/components/icon/index.tsx +54 -0
  294. package/src/components/icon/types.ts +30 -0
  295. package/src/components/image/index.tsx +21 -0
  296. package/src/components/image/types.ts +20 -0
  297. package/src/components/index.ts +12 -0
  298. package/src/components/progressBar/circularProgressBar.tsx +64 -0
  299. package/src/components/progressBar/index.ts +5 -0
  300. package/src/components/progressBar/linearProgressBar.tsx +51 -0
  301. package/src/components/progressBar/types.ts +22 -0
  302. package/src/components/rating/index.tsx +106 -0
  303. package/src/components/rating/types.ts +17 -0
  304. package/src/components/screenContainer/SafeAreaContainer.tsx +22 -0
  305. package/src/components/screenContainer/ScrollViewContainer.tsx +19 -0
  306. package/src/components/screenContainer/index.ts +4 -0
  307. package/src/components/skeleton/index.tsx +1 -0
  308. package/src/components/skeleton/types.ts +0 -0
  309. package/src/components/slider/index.tsx +1 -0
  310. package/src/components/slider/types.ts +0 -0
  311. package/src/components/switch/index.tsx +1 -0
  312. package/src/components/switch/types.ts +0 -0
  313. package/src/components/text/commonText.tsx +27 -0
  314. package/src/components/text/index.ts +3 -0
  315. package/src/components/text/types.ts +16 -0
  316. package/src/hooks/useTheme.ts +12 -0
  317. package/src/index.tsx +18 -0
  318. package/src/theme/color.ts +7 -0
  319. package/src/theme/style.ts +15 -0
  320. package/src/theme/themeProvider.tsx +25 -0
  321. package/src/theme/themes.ts +71 -0
@@ -0,0 +1,3 @@
1
+ import CommonButton from './commonButton';
2
+
3
+ export { CommonButton };
@@ -0,0 +1,29 @@
1
+ import {
2
+ type PressableProps,
3
+ type TextStyle,
4
+ type ViewStyle,
5
+ } from 'react-native';
6
+
7
+ type Variant = 'primary' | 'secondary';
8
+ type SizeVariant = 's' | 'm' | 'l';
9
+
10
+ export const sizeType: Record<SizeVariant, ViewStyle> = {
11
+ s: { width: 16, height: 16 },
12
+ m: { width: 20, height: 20 },
13
+ l: { width: 24, height: 24 },
14
+ };
15
+
16
+ export const fontSizeType: Record<SizeVariant, TextStyle> = {
17
+ s: { fontSize: 12 },
18
+ m: { fontSize: 16 },
19
+ l: { fontSize: 20 },
20
+ };
21
+
22
+ export interface ButtonProps extends PressableProps {
23
+ type?: Variant;
24
+ size?: SizeVariant;
25
+ }
26
+
27
+ export interface CommonButtonProps extends ButtonProps {
28
+ title?: string;
29
+ }
@@ -0,0 +1,67 @@
1
+ import { StyleSheet, View } from 'react-native';
2
+ import { CommonText } from '../text';
3
+ import { type CommonCardProps } from './types';
4
+ import { useTheme } from '../../hooks/useTheme';
5
+
6
+ const CommonCard = ({ children, type = 'primary', title }: CommonCardProps) => {
7
+ const { theme } = useTheme();
8
+ return (
9
+ <View style={styles.container}>
10
+ {title && (
11
+ <View
12
+ style={[
13
+ styles.titleContainer,
14
+ {
15
+ backgroundColor: theme.colors[type],
16
+ },
17
+ ]}
18
+ >
19
+ <CommonText
20
+ style={[
21
+ styles.titleText,
22
+ {
23
+ color: theme.colors.white,
24
+ },
25
+ ]}
26
+ >
27
+ {title}
28
+ </CommonText>
29
+ </View>
30
+ )}
31
+ <View
32
+ style={[
33
+ styles.contentContainer,
34
+ {
35
+ borderColor: theme.colors[type],
36
+ },
37
+ ]}
38
+ >
39
+ {children}
40
+ </View>
41
+ </View>
42
+ );
43
+ };
44
+
45
+ const styles = StyleSheet.create({
46
+ container: {
47
+ width: '100%',
48
+ padding: 10,
49
+ },
50
+ titleContainer: {
51
+ alignSelf: 'flex-start',
52
+ borderRadius: 5,
53
+ marginLeft: 5,
54
+ padding: 5,
55
+ zIndex: 1,
56
+ },
57
+ titleText: {
58
+ fontSize: 20,
59
+ },
60
+ contentContainer: {
61
+ borderWidth: 2,
62
+ borderRadius: 5,
63
+ padding: 10,
64
+ },
65
+ });
66
+
67
+ export default CommonCard;
@@ -0,0 +1,88 @@
1
+ import { StyleSheet, View, Pressable } from 'react-native';
2
+ import { CommonText } from '../text';
3
+ import { type FoldableCardProps } from './types';
4
+ import { useTheme } from '../../hooks/useTheme';
5
+ // import Animated, {
6
+ // FadeIn,
7
+ // FadeOut,
8
+ // LinearTransition,
9
+ // } from 'react-native-reanimated';
10
+
11
+ //TODO: React-native-reanimated 적용시키기
12
+ // const AnimatedPressable = Animated.createAnimatedComponent(Pressable);
13
+ const FoldableCard = ({
14
+ children,
15
+ type = 'primary',
16
+ title,
17
+ value,
18
+ onPress,
19
+ }: FoldableCardProps) => {
20
+ const { theme } = useTheme();
21
+ return (
22
+ <View style={styles.container}>
23
+ <Pressable
24
+ // <AnimatedPressable
25
+ style={[
26
+ styles.titleContainer,
27
+ {
28
+ backgroundColor: theme.colors[type],
29
+ },
30
+ ]}
31
+ onPress={onPress}
32
+ // layout={LinearTransition.duration(200)}
33
+ >
34
+ <CommonText
35
+ style={[
36
+ styles.titleText,
37
+ {
38
+ color: theme.colors.white,
39
+ },
40
+ ]}
41
+ >
42
+ {title}
43
+ </CommonText>
44
+ {/* </AnimatedPressable> */}
45
+ </Pressable>
46
+ {value && (
47
+ <View
48
+ // <Animated.View
49
+ // entering={FadeIn}
50
+ // exiting={FadeOut}
51
+ style={[
52
+ styles.contentContainer,
53
+ {
54
+ borderColor: theme.colors[type],
55
+ },
56
+ ]}
57
+ >
58
+ {children}
59
+ {/* </Animated.View> */}
60
+ </View>
61
+ )}
62
+ </View>
63
+ );
64
+ };
65
+
66
+ const styles = StyleSheet.create({
67
+ container: {
68
+ width: '100%',
69
+ padding: 10,
70
+ },
71
+ titleContainer: {
72
+ alignSelf: 'flex-start',
73
+ borderRadius: 5,
74
+ marginLeft: 5,
75
+ padding: 5,
76
+ zIndex: 1,
77
+ },
78
+ titleText: {
79
+ fontSize: 20,
80
+ },
81
+ contentContainer: {
82
+ borderWidth: 2,
83
+ borderRadius: 5,
84
+ padding: 10,
85
+ },
86
+ });
87
+
88
+ export default FoldableCard;
@@ -0,0 +1,4 @@
1
+ import CommonCard from './commonCard';
2
+ import FoldableCard from './foldableCard';
3
+
4
+ export { CommonCard, FoldableCard };
@@ -0,0 +1,18 @@
1
+ import { type ViewProps, type ViewStyle } from 'react-native';
2
+
3
+ type Variant = 'primary' | 'secondary';
4
+
5
+ export interface CardProps extends ViewProps {
6
+ type?: Variant;
7
+ }
8
+
9
+ export interface CommonCardProps extends CardProps {
10
+ title?: string;
11
+ }
12
+
13
+ export interface FoldableCardProps extends CardProps {
14
+ title: string;
15
+ titleStyle?: ViewStyle;
16
+ value: boolean;
17
+ onPress?: () => void;
18
+ }
@@ -0,0 +1,41 @@
1
+ import { Pressable, StyleSheet } from 'react-native';
2
+ import { type CheckBoxProps, sizeType } from './types';
3
+ import { useTheme } from '../../hooks/useTheme';
4
+ import { CommonIcon } from '../icon';
5
+
6
+ export const CheckBox = ({
7
+ size = 'm',
8
+ disabled,
9
+ value,
10
+ onPress,
11
+ ...props
12
+ }: CheckBoxProps) => {
13
+ const { theme } = useTheme();
14
+ return (
15
+ <Pressable
16
+ onPress={onPress}
17
+ style={[
18
+ sizeType[size],
19
+ styles.container,
20
+ disabled
21
+ ? { borderColor: theme.colors.disabled }
22
+ : { borderColor: theme.colors.primary },
23
+ ]}
24
+ disabled={disabled}
25
+ {...props}
26
+ >
27
+ {value && (
28
+ <CommonIcon
29
+ color={disabled ? theme.colors.disabled : theme.colors.primary}
30
+ iconType="check"
31
+ />
32
+ )}
33
+ </Pressable>
34
+ );
35
+ };
36
+
37
+ const styles = StyleSheet.create({
38
+ container: {
39
+ borderWidth: 1,
40
+ },
41
+ });
@@ -0,0 +1,16 @@
1
+ import { type PressableProps, type ViewStyle } from 'react-native';
2
+
3
+ type Variant = 'primary' | 'secondary';
4
+ type SizeVariant = 's' | 'm' | 'l';
5
+
6
+ export const sizeType: Record<SizeVariant, ViewStyle> = {
7
+ s: { width: 16, height: 16 },
8
+ m: { width: 20, height: 20 },
9
+ l: { width: 24, height: 24 },
10
+ };
11
+
12
+ export interface CheckBoxProps extends PressableProps {
13
+ type?: Variant;
14
+ size?: SizeVariant;
15
+ value: Boolean;
16
+ }
@@ -0,0 +1,55 @@
1
+ import { StyleSheet, View, Pressable } from 'react-native';
2
+ import { CommonText } from '../text';
3
+ import { type HeaderProps } from './types';
4
+ import { CommonIcon } from '../icon';
5
+
6
+ const CommonHeader = ({ title, left, right, style, ...props }: HeaderProps) => {
7
+ return (
8
+ <View style={[styles.container, styles.flexRow, style]} {...props}>
9
+ <View style={styles.center} pointerEvents="none">
10
+ <CommonText size="m" numberOfLines={1}>
11
+ {title}
12
+ </CommonText>
13
+ </View>
14
+ <Pressable style={[styles.flexRow, styles.side]} onPress={left?.onPress}>
15
+ {left?.icon ? <CommonIcon iconType={left.icon} /> : null}
16
+ <CommonText size="m">{left?.title}</CommonText>
17
+ </Pressable>
18
+ <Pressable
19
+ style={[styles.flexRow, styles.side, styles.right]}
20
+ onPress={right?.onPress}
21
+ >
22
+ <CommonText size="m">{right?.title}</CommonText>
23
+ {right?.icon ? <CommonIcon iconType={right.icon} /> : null}
24
+ </Pressable>
25
+ </View>
26
+ );
27
+ };
28
+
29
+ const styles = StyleSheet.create({
30
+ container: {
31
+ height: 56,
32
+ paddingHorizontal: 8,
33
+ gap: 10,
34
+ },
35
+ center: {
36
+ position: 'absolute',
37
+ left: 0,
38
+ right: 0,
39
+ alignItems: 'center',
40
+ justifyContent: 'center',
41
+ },
42
+ side: {
43
+ flex: 1,
44
+ gap: 5,
45
+ },
46
+ right: {
47
+ justifyContent: 'flex-end',
48
+ },
49
+ flexRow: {
50
+ flexDirection: 'row',
51
+ alignItems: 'center',
52
+ },
53
+ });
54
+
55
+ export default CommonHeader;
@@ -0,0 +1,3 @@
1
+ import CommonHeader from './commonHeader';
2
+
3
+ export { CommonHeader };
@@ -0,0 +1,30 @@
1
+ import { type TextStyle, type ViewProps, type ViewStyle } from 'react-native';
2
+
3
+ type Variant = 'primary' | 'secondary';
4
+ type SizeVariant = 's' | 'm' | 'l';
5
+
6
+ export const sizeType: Record<SizeVariant, ViewStyle> = {
7
+ s: { width: 16, height: 16 },
8
+ m: { width: 20, height: 20 },
9
+ l: { width: 24, height: 24 },
10
+ };
11
+
12
+ export const fontSizeType: Record<SizeVariant, TextStyle> = {
13
+ s: { fontSize: 10 },
14
+ m: { fontSize: 12 },
15
+ l: { fontSize: 14 },
16
+ };
17
+
18
+ interface HeaderAction {
19
+ icon?: 'back' | 'close';
20
+ title?: string;
21
+ onPress?: () => void;
22
+ }
23
+
24
+ export interface HeaderProps extends ViewProps {
25
+ type?: Variant;
26
+ size?: SizeVariant;
27
+ title?: string;
28
+ left?: HeaderAction;
29
+ right?: HeaderAction;
30
+ }
@@ -0,0 +1,21 @@
1
+ // import * as React from 'react';
2
+ import Svg, { Path } from 'react-native-svg';
3
+ import type { SvgProps } from 'react-native-svg';
4
+ const SvgArrowDownToLine = (props: SvgProps) => (
5
+ <Svg
6
+ // xmlns="http://www.w3.org/2000/svg"
7
+ fill="none"
8
+ stroke={props.color}
9
+ strokeLinecap="round"
10
+ strokeLinejoin="round"
11
+ strokeWidth={2}
12
+ // className="arrow-down-to-line_svg__lucide arrow-down-to-line_svg__lucide-arrow-down-to-line-icon arrow-down-to-line_svg__lucide-arrow-down-to-line"
13
+ viewBox="0 0 24 24"
14
+ width={props.width ?? 24}
15
+ height={props.height ?? 24}
16
+ {...props}
17
+ >
18
+ <Path d="M12 17V3M6 11l6 6 6-6M19 21H5" />
19
+ </Svg>
20
+ );
21
+ export default SvgArrowDownToLine;
@@ -0,0 +1,21 @@
1
+ // import * as React from 'react';
2
+ import Svg, { Path } from 'react-native-svg';
3
+ import type { SvgProps } from 'react-native-svg';
4
+ const SvgArrowDownWideNarrow = (props: SvgProps) => (
5
+ <Svg
6
+ // xmlns="http://www.w3.org/2000/svg"
7
+ fill="none"
8
+ stroke={props.color}
9
+ strokeLinecap="round"
10
+ strokeLinejoin="round"
11
+ strokeWidth={2}
12
+ // className="arrow-down-wide-narrow_svg__lucide arrow-down-wide-narrow_svg__lucide-arrow-down-wide-narrow-icon arrow-down-wide-narrow_svg__lucide-arrow-down-wide-narrow"
13
+ viewBox="0 0 24 24"
14
+ width={props.width ?? 24}
15
+ height={props.height ?? 24}
16
+ {...props}
17
+ >
18
+ <Path d="m3 16 4 4 4-4M7 20V4M11 4h10M11 8h7M11 12h4" />
19
+ </Svg>
20
+ );
21
+ export default SvgArrowDownWideNarrow;
@@ -0,0 +1,21 @@
1
+ // import * as React from 'react';
2
+ import Svg, { Path } from 'react-native-svg';
3
+ import type { SvgProps } from 'react-native-svg';
4
+ const SvgArrowLeft = (props: SvgProps) => (
5
+ <Svg
6
+ // xmlns="http://www.w3.org/2000/svg"
7
+ fill="none"
8
+ stroke={props.color}
9
+ strokeLinecap="round"
10
+ strokeLinejoin="round"
11
+ strokeWidth={2}
12
+ // className="arrow-left_svg__lucide arrow-left_svg__lucide-arrow-left-icon arrow-left_svg__lucide-arrow-left"
13
+ viewBox="0 0 24 24"
14
+ width={props.width ?? 24}
15
+ height={props.height ?? 24}
16
+ {...props}
17
+ >
18
+ <Path d="m12 19-7-7 7-7M19 12H5" />
19
+ </Svg>
20
+ );
21
+ export default SvgArrowLeft;
@@ -0,0 +1,21 @@
1
+ // import * as React from 'react';
2
+ import Svg, { Path } from 'react-native-svg';
3
+ import type { SvgProps } from 'react-native-svg';
4
+ const SvgCheck = (props: SvgProps) => (
5
+ <Svg
6
+ // xmlns="http://www.w3.org/2000/svg"
7
+ fill="none"
8
+ stroke={props.color}
9
+ strokeLinecap="round"
10
+ strokeLinejoin="round"
11
+ strokeWidth={2}
12
+ // className="check_svg__lucide check_svg__lucide-check-icon check_svg__lucide-check"
13
+ viewBox="0 0 24 24"
14
+ width={props.width ?? 24}
15
+ height={props.height ?? 24}
16
+ {...props}
17
+ >
18
+ <Path d="M20 6 9 17l-5-5" />
19
+ </Svg>
20
+ );
21
+ export default SvgCheck;
@@ -0,0 +1,21 @@
1
+ // import * as React from 'react';
2
+ import Svg, { Path } from 'react-native-svg';
3
+ import type { SvgProps } from 'react-native-svg';
4
+ const SvgChevronDown = (props: SvgProps) => (
5
+ <Svg
6
+ // xmlns="http://www.w3.org/2000/svg"
7
+ fill="none"
8
+ stroke={props.color}
9
+ strokeLinecap="round"
10
+ strokeLinejoin="round"
11
+ strokeWidth={2}
12
+ // className="chevron-down_svg__lucide chevron-down_svg__lucide-chevron-down-icon chevron-down_svg__lucide-chevron-down"
13
+ viewBox="0 0 24 24"
14
+ width={props.width ?? 24}
15
+ height={props.height ?? 24}
16
+ {...props}
17
+ >
18
+ <Path d="m6 9 6 6 6-6" />
19
+ </Svg>
20
+ );
21
+ export default SvgChevronDown;
@@ -0,0 +1,22 @@
1
+ // import * as React from 'react';
2
+ import Svg, { Rect, Path } from 'react-native-svg';
3
+ import type { SvgProps } from 'react-native-svg';
4
+ const SvgCopy = (props: SvgProps) => (
5
+ <Svg
6
+ // xmlns="http://www.w3.org/2000/svg"
7
+ fill="none"
8
+ stroke={props.color}
9
+ strokeLinecap="round"
10
+ strokeLinejoin="round"
11
+ strokeWidth={2}
12
+ // className="copy_svg__lucide copy_svg__lucide-copy-icon copy_svg__lucide-copy"
13
+ viewBox="0 0 24 24"
14
+ width={props.width ?? 24}
15
+ height={props.height ?? 24}
16
+ {...props}
17
+ >
18
+ <Rect width={14} height={14} x={8} y={8} rx={2} ry={2} />
19
+ <Path d="M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2" />
20
+ </Svg>
21
+ );
22
+ export default SvgCopy;
@@ -0,0 +1,22 @@
1
+ // import * as React from 'react';
2
+ import Svg, { Path } from 'react-native-svg';
3
+ import type { SvgProps } from 'react-native-svg';
4
+ const SvgRotateCw = (props: SvgProps) => (
5
+ <Svg
6
+ // xmlns="http://www.w3.org/2000/svg"
7
+ fill="none"
8
+ stroke={props.color}
9
+ strokeLinecap="round"
10
+ strokeLinejoin="round"
11
+ strokeWidth={2}
12
+ // className="rotate-cw_svg__lucide rotate-cw_svg__lucide-rotate-cw-icon rotate-cw_svg__lucide-rotate-cw"
13
+ viewBox="0 0 24 24"
14
+ width={props.width ?? 24}
15
+ height={props.height ?? 24}
16
+ {...props}
17
+ >
18
+ <Path d="M21 12a9 9 0 1 1-9-9c2.52 0 4.93 1 6.74 2.74L21 8" />
19
+ <Path d="M21 3v5h-5" />
20
+ </Svg>
21
+ );
22
+ export default SvgRotateCw;
@@ -0,0 +1,21 @@
1
+ // import * as React from 'react';
2
+ import Svg, { Path } from 'react-native-svg';
3
+ import type { SvgProps } from 'react-native-svg';
4
+ const SvgSquareArrowOutUpRight = (props: SvgProps) => (
5
+ <Svg
6
+ // xmlns="http://www.w3.org/2000/svg"
7
+ fill="none"
8
+ stroke={props.color}
9
+ strokeLinecap="round"
10
+ strokeLinejoin="round"
11
+ strokeWidth={2}
12
+ // className="square-arrow-out-up-right_svg__lucide square-arrow-out-up-right_svg__lucide-square-arrow-out-up-right-icon square-arrow-out-up-right_svg__lucide-square-arrow-out-up-right"
13
+ viewBox="0 0 24 24"
14
+ width={props.width ?? 24}
15
+ height={props.height ?? 24}
16
+ {...props}
17
+ >
18
+ <Path d="M21 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h6M21 3l-9 9M15 3h6v6" />
19
+ </Svg>
20
+ );
21
+ export default SvgSquareArrowOutUpRight;
@@ -0,0 +1,21 @@
1
+ // import * as React from 'react';
2
+ import Svg, { Path } from 'react-native-svg';
3
+ import type { SvgProps } from 'react-native-svg';
4
+ const SvgStarEmpty = (props: SvgProps) => (
5
+ <Svg
6
+ // xmlns="http://www.w3.org/2000/svg"
7
+ fill="none"
8
+ stroke={props.color}
9
+ strokeLinecap="round"
10
+ strokeLinejoin="round"
11
+ strokeWidth={2}
12
+ // className="star-empty_svg__lucide star-empty_svg__lucide-star-icon star-empty_svg__lucide-star"
13
+ viewBox="0 0 24 24"
14
+ width={props.width ?? 24}
15
+ height={props.height ?? 24}
16
+ {...props}
17
+ >
18
+ <Path d="M11.525 2.295a.53.53 0 0 1 .95 0l2.31 4.679a2.12 2.12 0 0 0 1.595 1.16l5.166.756a.53.53 0 0 1 .294.904l-3.736 3.638a2.12 2.12 0 0 0-.611 1.878l.882 5.14a.53.53 0 0 1-.771.56l-4.618-2.428a2.12 2.12 0 0 0-1.973 0L6.396 21.01a.53.53 0 0 1-.77-.56l.881-5.139a2.12 2.12 0 0 0-.611-1.879L2.16 9.795a.53.53 0 0 1 .294-.906l5.165-.755a2.12 2.12 0 0 0 1.597-1.16z" />
19
+ </Svg>
20
+ );
21
+ export default SvgStarEmpty;
@@ -0,0 +1,21 @@
1
+ // import * as React from 'react';
2
+ import Svg, { Path } from 'react-native-svg';
3
+ import type { SvgProps } from 'react-native-svg';
4
+ const SvgStarFull = (props: SvgProps) => (
5
+ <Svg
6
+ // xmlns="http://www.w3.org/2000/svg"
7
+ fill={props.color}
8
+ stroke={props.color}
9
+ strokeLinecap="round"
10
+ strokeLinejoin="round"
11
+ strokeWidth={2}
12
+ // className="star-full_svg__lucide star-full_svg__lucide-star-icon star-full_svg__lucide-star"
13
+ viewBox="0 0 24 24"
14
+ width={props.width ?? 24}
15
+ height={props.height ?? 24}
16
+ {...props}
17
+ >
18
+ <Path d="M11.525 2.295a.53.53 0 0 1 .95 0l2.31 4.679a2.12 2.12 0 0 0 1.595 1.16l5.166.756a.53.53 0 0 1 .294.904l-3.736 3.638a2.12 2.12 0 0 0-.611 1.878l.882 5.14a.53.53 0 0 1-.771.56l-4.618-2.428a2.12 2.12 0 0 0-1.973 0L6.396 21.01a.53.53 0 0 1-.77-.56l.881-5.139a2.12 2.12 0 0 0-.611-1.879L2.16 9.795a.53.53 0 0 1 .294-.906l5.165-.755a2.12 2.12 0 0 0 1.597-1.16z" />
19
+ </Svg>
20
+ );
21
+ export default SvgStarFull;
@@ -0,0 +1,32 @@
1
+ // import * as React from 'react';
2
+ import Svg, { Defs, ClipPath, Path } from 'react-native-svg';
3
+ import type { SvgProps } from 'react-native-svg';
4
+ const SvgStarHalf = (props: SvgProps) => (
5
+ <Svg
6
+ // xmlns="http://www.w3.org/2000/svg"
7
+ viewBox="0 0 24 24"
8
+ width={props.width ?? 24}
9
+ height={props.height ?? 24}
10
+ {...props}
11
+ >
12
+ <Defs>
13
+ <ClipPath id="star-half_svg__a">
14
+ <Path d="M0 0h12v24H0z" />
15
+ </ClipPath>
16
+ </Defs>
17
+ <Path
18
+ fill={props.color}
19
+ d="m12 2.5 2.93 5.94 6.56.96-4.75 4.63 1.12 6.53L12 17.5l-5.86 3.06 1.12-6.53L2.51 9.4l6.56-.96z"
20
+ clipPath="url(#star-half_svg__a)"
21
+ />
22
+ <Path
23
+ fill="none"
24
+ stroke={props.color}
25
+ strokeLinecap="round"
26
+ strokeLinejoin="round"
27
+ strokeWidth={2}
28
+ d="m12 2.5 2.93 5.94 6.56.96-4.75 4.63 1.12 6.53L12 17.5l-5.86 3.06 1.12-6.53L2.51 9.4l6.56-.96z"
29
+ />
30
+ </Svg>
31
+ );
32
+ export default SvgStarHalf;
@@ -0,0 +1,21 @@
1
+ // import * as React from 'react';
2
+ import Svg, { Path } from 'react-native-svg';
3
+ import type { SvgProps } from 'react-native-svg';
4
+ const SvgX = (props: SvgProps) => (
5
+ <Svg
6
+ // xmlns="http://www.w3.org/2000/svg"
7
+ fill="none"
8
+ stroke={props.color}
9
+ strokeLinecap="round"
10
+ strokeLinejoin="round"
11
+ strokeWidth={2}
12
+ // className="x_svg__lucide x_svg__lucide-x-icon x_svg__lucide-x"
13
+ viewBox="0 0 24 24"
14
+ width={props.width ?? 24}
15
+ height={props.height ?? 24}
16
+ {...props}
17
+ >
18
+ <Path d="M18 6 6 18M6 6l12 12" />
19
+ </Svg>
20
+ );
21
+ export default SvgX;