@herca/rn-kit 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 (588) hide show
  1. package/LICENSE +20 -0
  2. package/README.md +33 -0
  3. package/RnKit.podspec +21 -0
  4. package/android/build.gradle +83 -0
  5. package/android/gradle.properties +5 -0
  6. package/android/src/main/AndroidManifest.xml +2 -0
  7. package/android/src/main/java/com/herca/rnkit/RnKitModule.kt +23 -0
  8. package/android/src/main/java/com/herca/rnkit/RnKitPackage.kt +33 -0
  9. package/ios/RnKit.h +5 -0
  10. package/ios/RnKit.mm +18 -0
  11. package/lib/module/Accordion/Accordion.js +33 -0
  12. package/lib/module/Accordion/Accordion.js.map +1 -0
  13. package/lib/module/Accordion/AccordionItem.js +13 -0
  14. package/lib/module/Accordion/AccordionItem.js.map +1 -0
  15. package/lib/module/Accordion/README.md +48 -0
  16. package/lib/module/Accordion/type.js +4 -0
  17. package/lib/module/Accordion/type.js.map +1 -0
  18. package/lib/module/Alert/Alert.js +121 -0
  19. package/lib/module/Alert/Alert.js.map +1 -0
  20. package/lib/module/Alert/README.md +68 -0
  21. package/lib/module/Avatar/Avatar.js +56 -0
  22. package/lib/module/Avatar/Avatar.js.map +1 -0
  23. package/lib/module/Avatar/AvatarGroup.js +118 -0
  24. package/lib/module/Avatar/AvatarGroup.js.map +1 -0
  25. package/lib/module/Avatar/README_AVATAR.md +57 -0
  26. package/lib/module/Avatar/README_AVATARGROUP.md +58 -0
  27. package/lib/module/Avatar/type.js +4 -0
  28. package/lib/module/Avatar/type.js.map +1 -0
  29. package/lib/module/Badge/Badge.js +119 -0
  30. package/lib/module/Badge/Badge.js.map +1 -0
  31. package/lib/module/Badge/README.md +64 -0
  32. package/lib/module/Badge/type.js +2 -0
  33. package/lib/module/Badge/type.js.map +1 -0
  34. package/lib/module/BottomSheet/BottomSheet.js +211 -0
  35. package/lib/module/BottomSheet/BottomSheet.js.map +1 -0
  36. package/lib/module/BottomSheet/README.md +64 -0
  37. package/lib/module/BottomSheet/type.js +2 -0
  38. package/lib/module/BottomSheet/type.js.map +1 -0
  39. package/lib/module/Button/Button.js +138 -0
  40. package/lib/module/Button/Button.js.map +1 -0
  41. package/lib/module/Button/README.md +94 -0
  42. package/lib/module/Button/type.js +262 -0
  43. package/lib/module/Button/type.js.map +1 -0
  44. package/lib/module/Calendar/Calendar.js +356 -0
  45. package/lib/module/Calendar/Calendar.js.map +1 -0
  46. package/lib/module/Calendar/CalendarPropsType.js +4 -0
  47. package/lib/module/Calendar/CalendarPropsType.js.map +1 -0
  48. package/lib/module/Calendar/README.md +73 -0
  49. package/lib/module/CheckBox/CheckBox.js +67 -0
  50. package/lib/module/CheckBox/CheckBox.js.map +1 -0
  51. package/lib/module/CheckBox/CheckBoxList.js +41 -0
  52. package/lib/module/CheckBox/CheckBoxList.js.map +1 -0
  53. package/lib/module/CheckBox/README_CHECKBOX.md +46 -0
  54. package/lib/module/CheckBox/README_CHECKBOXLIST.md +41 -0
  55. package/lib/module/Chip/Chip.js +109 -0
  56. package/lib/module/Chip/Chip.js.map +1 -0
  57. package/lib/module/Chip/ChipItem.js +89 -0
  58. package/lib/module/Chip/ChipItem.js.map +1 -0
  59. package/lib/module/Chip/README.md +89 -0
  60. package/lib/module/Chip/type.js +94 -0
  61. package/lib/module/Chip/type.js.map +1 -0
  62. package/lib/module/Color/Color.js +126 -0
  63. package/lib/module/Color/Color.js.map +1 -0
  64. package/lib/module/Color/README.md +54 -0
  65. package/lib/module/Color/type.js +2 -0
  66. package/lib/module/Color/type.js.map +1 -0
  67. package/lib/module/DatePicker/DatePicker.js +69 -0
  68. package/lib/module/DatePicker/DatePicker.js.map +1 -0
  69. package/lib/module/DatePicker/MonthPicker.js +179 -0
  70. package/lib/module/DatePicker/MonthPicker.js.map +1 -0
  71. package/lib/module/DatePicker/README.md +51 -0
  72. package/lib/module/DatePicker/TimePicker.js +200 -0
  73. package/lib/module/DatePicker/TimePicker.js.map +1 -0
  74. package/lib/module/DatePicker/YearPicker.js +217 -0
  75. package/lib/module/DatePicker/YearPicker.js.map +1 -0
  76. package/lib/module/DatePicker/helpers.js +33 -0
  77. package/lib/module/DatePicker/helpers.js.map +1 -0
  78. package/lib/module/Drawing/Drawing.js +26 -0
  79. package/lib/module/Drawing/Drawing.js.map +1 -0
  80. package/lib/module/DropDown/DropDown.js +107 -0
  81. package/lib/module/DropDown/DropDown.js.map +1 -0
  82. package/lib/module/DropDown/type.js +4 -0
  83. package/lib/module/DropDown/type.js.map +1 -0
  84. package/lib/module/FileView/Image.js +8 -0
  85. package/lib/module/FileView/Image.js.map +1 -0
  86. package/lib/module/FileView/PdfView.js +37 -0
  87. package/lib/module/FileView/PdfView.js.map +1 -0
  88. package/lib/module/Icon/Icon.js +74 -0
  89. package/lib/module/Icon/Icon.js.map +1 -0
  90. package/lib/module/Icon/icons/AirPlane.js +22 -0
  91. package/lib/module/Icon/icons/AirPlane.js.map +1 -0
  92. package/lib/module/Icon/icons/ArrowBackAlt.js +22 -0
  93. package/lib/module/Icon/icons/ArrowBackAlt.js.map +1 -0
  94. package/lib/module/Icon/icons/ArrowDown.js +22 -0
  95. package/lib/module/Icon/icons/ArrowDown.js.map +1 -0
  96. package/lib/module/Icon/icons/ArrowForwardAlt.js +22 -0
  97. package/lib/module/Icon/icons/ArrowForwardAlt.js.map +1 -0
  98. package/lib/module/Icon/icons/ArrowLeft.js +22 -0
  99. package/lib/module/Icon/icons/ArrowLeft.js.map +1 -0
  100. package/lib/module/Icon/icons/ArrowRight.js +22 -0
  101. package/lib/module/Icon/icons/ArrowRight.js.map +1 -0
  102. package/lib/module/Icon/icons/ArrowUp.js +22 -0
  103. package/lib/module/Icon/icons/ArrowUp.js.map +1 -0
  104. package/lib/module/Icon/icons/Calendar.js +22 -0
  105. package/lib/module/Icon/icons/Calendar.js.map +1 -0
  106. package/lib/module/Icon/icons/Camera.js +22 -0
  107. package/lib/module/Icon/icons/Camera.js.map +1 -0
  108. package/lib/module/Icon/icons/Check.js +22 -0
  109. package/lib/module/Icon/icons/Check.js.map +1 -0
  110. package/lib/module/Icon/icons/Document.js +22 -0
  111. package/lib/module/Icon/icons/Document.js.map +1 -0
  112. package/lib/module/Icon/icons/Download.js +22 -0
  113. package/lib/module/Icon/icons/Download.js.map +1 -0
  114. package/lib/module/Icon/icons/ExlmationMark.js +22 -0
  115. package/lib/module/Icon/icons/ExlmationMark.js.map +1 -0
  116. package/lib/module/Icon/icons/Eye.js +22 -0
  117. package/lib/module/Icon/icons/Eye.js.map +1 -0
  118. package/lib/module/Icon/icons/EyeOpen.js +22 -0
  119. package/lib/module/Icon/icons/EyeOpen.js.map +1 -0
  120. package/lib/module/Icon/icons/Filter.js +22 -0
  121. package/lib/module/Icon/icons/Filter.js.map +1 -0
  122. package/lib/module/Icon/icons/Home.js +8 -0
  123. package/lib/module/Icon/icons/Home.js.map +1 -0
  124. package/lib/module/Icon/icons/Image.js +22 -0
  125. package/lib/module/Icon/icons/Image.js.map +1 -0
  126. package/lib/module/Icon/icons/Pdf.js +22 -0
  127. package/lib/module/Icon/icons/Pdf.js.map +1 -0
  128. package/lib/module/Icon/icons/RadioButton.js +34 -0
  129. package/lib/module/Icon/icons/RadioButton.js.map +1 -0
  130. package/lib/module/Icon/icons/Search.js +22 -0
  131. package/lib/module/Icon/icons/Search.js.map +1 -0
  132. package/lib/module/Icon/icons/StickyNote.js +22 -0
  133. package/lib/module/Icon/icons/StickyNote.js.map +1 -0
  134. package/lib/module/Icon/icons/Times.js +22 -0
  135. package/lib/module/Icon/icons/Times.js.map +1 -0
  136. package/lib/module/Icon/icons/User.js +22 -0
  137. package/lib/module/Icon/icons/User.js.map +1 -0
  138. package/lib/module/Icon/icons/XCircle.js +22 -0
  139. package/lib/module/Icon/icons/XCircle.js.map +1 -0
  140. package/lib/module/Icon/index.js +6 -0
  141. package/lib/module/Icon/index.js.map +1 -0
  142. package/lib/module/Icon/type.js +4 -0
  143. package/lib/module/Icon/type.js.map +1 -0
  144. package/lib/module/Input/Input.js +125 -0
  145. package/lib/module/Input/Input.js.map +1 -0
  146. package/lib/module/Input/Input.md +51 -0
  147. package/lib/module/Input/InputFile.js +319 -0
  148. package/lib/module/Input/InputFile.js.map +1 -0
  149. package/lib/module/Input/InputMonth.js +4 -0
  150. package/lib/module/Input/InputMonth.js.map +1 -0
  151. package/lib/module/Input/InputNumber.js +2 -0
  152. package/lib/module/Input/InputNumber.js.map +1 -0
  153. package/lib/module/Input/InputOtp.js +74 -0
  154. package/lib/module/Input/InputOtp.js.map +1 -0
  155. package/lib/module/Input/InputPassword.js +18 -0
  156. package/lib/module/Input/InputPassword.js.map +1 -0
  157. package/lib/module/Input/InputSelect.js +8 -0
  158. package/lib/module/Input/InputSelect.js.map +1 -0
  159. package/lib/module/Input/Switch.js +91 -0
  160. package/lib/module/Input/Switch.js.map +1 -0
  161. package/lib/module/Input/TextArea.js +61 -0
  162. package/lib/module/Input/TextArea.js.map +1 -0
  163. package/lib/module/Input/assets/Ilustrasi.svg +14 -0
  164. package/lib/module/Input/assets/input-file.png +0 -0
  165. package/lib/module/Input/type.js +4 -0
  166. package/lib/module/Input/type.js.map +1 -0
  167. package/lib/module/Label/Label.js +87 -0
  168. package/lib/module/Label/Label.js.map +1 -0
  169. package/lib/module/LabelForm/LabelForm.js +17 -0
  170. package/lib/module/LabelForm/LabelForm.js.map +1 -0
  171. package/lib/module/List/List.js +31 -0
  172. package/lib/module/List/List.js.map +1 -0
  173. package/lib/module/List/ListItem.js +31 -0
  174. package/lib/module/List/ListItem.js.map +1 -0
  175. package/lib/module/List/type.js +4 -0
  176. package/lib/module/List/type.js.map +1 -0
  177. package/lib/module/Loading/Loading.js +50 -0
  178. package/lib/module/Loading/Loading.js.map +1 -0
  179. package/lib/module/Modal/Modal.js +149 -0
  180. package/lib/module/Modal/Modal.js.map +1 -0
  181. package/lib/module/NativeRnKit.js +5 -0
  182. package/lib/module/NativeRnKit.js.map +1 -0
  183. package/lib/module/Provider/FooterProvider.js +25 -0
  184. package/lib/module/Provider/FooterProvider.js.map +1 -0
  185. package/lib/module/Provider/LayoutWithFooter.js +34 -0
  186. package/lib/module/Provider/LayoutWithFooter.js.map +1 -0
  187. package/lib/module/Provider/Provider.js +43 -0
  188. package/lib/module/Provider/Provider.js.map +1 -0
  189. package/lib/module/Provider/RequiredUpdateAppsProvider.js +60 -0
  190. package/lib/module/Provider/RequiredUpdateAppsProvider.js.map +1 -0
  191. package/lib/module/Provider/type.js +2 -0
  192. package/lib/module/Provider/type.js.map +1 -0
  193. package/lib/module/RadioButton/README.md +43 -0
  194. package/lib/module/RadioButton/RadioButton.js +97 -0
  195. package/lib/module/RadioButton/RadioButton.js.map +1 -0
  196. package/lib/module/Select/README.md +78 -0
  197. package/lib/module/Select/README_Select.md +78 -0
  198. package/lib/module/Select/Select.js +101 -0
  199. package/lib/module/Select/Select.js.map +1 -0
  200. package/lib/module/Select/type.js +4 -0
  201. package/lib/module/Select/type.js.map +1 -0
  202. package/lib/module/Step/Step.js +83 -0
  203. package/lib/module/Step/Step.js.map +1 -0
  204. package/lib/module/Step/StepItem.js +78 -0
  205. package/lib/module/Step/StepItem.js.map +1 -0
  206. package/lib/module/Step/type.js +4 -0
  207. package/lib/module/Step/type.js.map +1 -0
  208. package/lib/module/SwitchButton/SwitchButton.js +8 -0
  209. package/lib/module/SwitchButton/SwitchButton.js.map +1 -0
  210. package/lib/module/TextArea/TextArea.js +2 -0
  211. package/lib/module/TextArea/TextArea.js.map +1 -0
  212. package/lib/module/Theme/Theme.js +31 -0
  213. package/lib/module/Theme/Theme.js.map +1 -0
  214. package/lib/module/Timeline/Timeline.js +12 -0
  215. package/lib/module/Timeline/Timeline.js.map +1 -0
  216. package/lib/module/Timeline/TimelineItem.js +66 -0
  217. package/lib/module/Timeline/TimelineItem.js.map +1 -0
  218. package/lib/module/Toast/Toast.js +143 -0
  219. package/lib/module/Toast/Toast.js.map +1 -0
  220. package/lib/module/Toast/ToastContext.js +40 -0
  221. package/lib/module/Toast/ToastContext.js.map +1 -0
  222. package/lib/module/Typography/README.md +71 -0
  223. package/lib/module/Typography/Typography.js +39 -0
  224. package/lib/module/Typography/Typography.js.map +1 -0
  225. package/lib/module/Typography/type.js +33 -0
  226. package/lib/module/Typography/type.js.map +1 -0
  227. package/lib/module/Ui/Card.js +50 -0
  228. package/lib/module/Ui/Card.js.map +1 -0
  229. package/lib/module/Ui/Center.js +21 -0
  230. package/lib/module/Ui/Center.js.map +1 -0
  231. package/lib/module/Ui/Col.js +20 -0
  232. package/lib/module/Ui/Col.js.map +1 -0
  233. package/lib/module/Ui/Container.js +20 -0
  234. package/lib/module/Ui/Container.js.map +1 -0
  235. package/lib/module/Ui/Devider.js +18 -0
  236. package/lib/module/Ui/Devider.js.map +1 -0
  237. package/lib/module/Ui/Footer.js +36 -0
  238. package/lib/module/Ui/Footer.js.map +1 -0
  239. package/lib/module/Ui/Gap.js +13 -0
  240. package/lib/module/Ui/Gap.js.map +1 -0
  241. package/lib/module/Ui/Grid.js +31 -0
  242. package/lib/module/Ui/Grid.js.map +1 -0
  243. package/lib/module/index.js +61 -0
  244. package/lib/module/index.js.map +1 -0
  245. package/lib/module/package.json +1 -0
  246. package/lib/typescript/package.json +1 -0
  247. package/lib/typescript/src/Accordion/Accordion.d.ts +3 -0
  248. package/lib/typescript/src/Accordion/Accordion.d.ts.map +1 -0
  249. package/lib/typescript/src/Accordion/AccordionItem.d.ts +3 -0
  250. package/lib/typescript/src/Accordion/AccordionItem.d.ts.map +1 -0
  251. package/lib/typescript/src/Accordion/type.d.ts +17 -0
  252. package/lib/typescript/src/Accordion/type.d.ts.map +1 -0
  253. package/lib/typescript/src/Alert/Alert.d.ts +16 -0
  254. package/lib/typescript/src/Alert/Alert.d.ts.map +1 -0
  255. package/lib/typescript/src/Avatar/Avatar.d.ts +5 -0
  256. package/lib/typescript/src/Avatar/Avatar.d.ts.map +1 -0
  257. package/lib/typescript/src/Avatar/AvatarGroup.d.ts +4 -0
  258. package/lib/typescript/src/Avatar/AvatarGroup.d.ts.map +1 -0
  259. package/lib/typescript/src/Avatar/type.d.ts +16 -0
  260. package/lib/typescript/src/Avatar/type.d.ts.map +1 -0
  261. package/lib/typescript/src/Badge/Badge.d.ts +14 -0
  262. package/lib/typescript/src/Badge/Badge.d.ts.map +1 -0
  263. package/lib/typescript/src/Badge/type.d.ts +1 -0
  264. package/lib/typescript/src/Badge/type.d.ts.map +1 -0
  265. package/lib/typescript/src/BottomSheet/BottomSheet.d.ts +3 -0
  266. package/lib/typescript/src/BottomSheet/BottomSheet.d.ts.map +1 -0
  267. package/lib/typescript/src/BottomSheet/type.d.ts +15 -0
  268. package/lib/typescript/src/BottomSheet/type.d.ts.map +1 -0
  269. package/lib/typescript/src/Button/Button.d.ts +5 -0
  270. package/lib/typescript/src/Button/Button.d.ts.map +1 -0
  271. package/lib/typescript/src/Button/type.d.ts +49 -0
  272. package/lib/typescript/src/Button/type.d.ts.map +1 -0
  273. package/lib/typescript/src/Calendar/Calendar.d.ts +4 -0
  274. package/lib/typescript/src/Calendar/Calendar.d.ts.map +1 -0
  275. package/lib/typescript/src/Calendar/CalendarPropsType.d.ts +52 -0
  276. package/lib/typescript/src/Calendar/CalendarPropsType.d.ts.map +1 -0
  277. package/lib/typescript/src/CheckBox/CheckBox.d.ts +11 -0
  278. package/lib/typescript/src/CheckBox/CheckBox.d.ts.map +1 -0
  279. package/lib/typescript/src/CheckBox/CheckBoxList.d.ts +14 -0
  280. package/lib/typescript/src/CheckBox/CheckBoxList.d.ts.map +1 -0
  281. package/lib/typescript/src/Chip/Chip.d.ts +5 -0
  282. package/lib/typescript/src/Chip/Chip.d.ts.map +1 -0
  283. package/lib/typescript/src/Chip/ChipItem.d.ts +3 -0
  284. package/lib/typescript/src/Chip/ChipItem.d.ts.map +1 -0
  285. package/lib/typescript/src/Chip/type.d.ts +50 -0
  286. package/lib/typescript/src/Chip/type.d.ts.map +1 -0
  287. package/lib/typescript/src/Color/Color.d.ts +122 -0
  288. package/lib/typescript/src/Color/Color.d.ts.map +1 -0
  289. package/lib/typescript/src/Color/type.d.ts +2 -0
  290. package/lib/typescript/src/Color/type.d.ts.map +1 -0
  291. package/lib/typescript/src/DatePicker/DatePicker.d.ts +10 -0
  292. package/lib/typescript/src/DatePicker/DatePicker.d.ts.map +1 -0
  293. package/lib/typescript/src/DatePicker/MonthPicker.d.ts +13 -0
  294. package/lib/typescript/src/DatePicker/MonthPicker.d.ts.map +1 -0
  295. package/lib/typescript/src/DatePicker/TimePicker.d.ts +11 -0
  296. package/lib/typescript/src/DatePicker/TimePicker.d.ts.map +1 -0
  297. package/lib/typescript/src/DatePicker/YearPicker.d.ts +13 -0
  298. package/lib/typescript/src/DatePicker/YearPicker.d.ts.map +1 -0
  299. package/lib/typescript/src/DatePicker/helpers.d.ts +21 -0
  300. package/lib/typescript/src/DatePicker/helpers.d.ts.map +1 -0
  301. package/lib/typescript/src/Drawing/Drawing.d.ts +2 -0
  302. package/lib/typescript/src/Drawing/Drawing.d.ts.map +1 -0
  303. package/lib/typescript/src/DropDown/DropDown.d.ts +4 -0
  304. package/lib/typescript/src/DropDown/DropDown.d.ts.map +1 -0
  305. package/lib/typescript/src/DropDown/type.d.ts +9 -0
  306. package/lib/typescript/src/DropDown/type.d.ts.map +1 -0
  307. package/lib/typescript/src/FileView/Image.d.ts +2 -0
  308. package/lib/typescript/src/FileView/Image.d.ts.map +1 -0
  309. package/lib/typescript/src/FileView/PdfView.d.ts +5 -0
  310. package/lib/typescript/src/FileView/PdfView.d.ts.map +1 -0
  311. package/lib/typescript/src/Icon/Icon.d.ts +5 -0
  312. package/lib/typescript/src/Icon/Icon.d.ts.map +1 -0
  313. package/lib/typescript/src/Icon/icons/AirPlane.d.ts +9 -0
  314. package/lib/typescript/src/Icon/icons/AirPlane.d.ts.map +1 -0
  315. package/lib/typescript/src/Icon/icons/ArrowBackAlt.d.ts +9 -0
  316. package/lib/typescript/src/Icon/icons/ArrowBackAlt.d.ts.map +1 -0
  317. package/lib/typescript/src/Icon/icons/ArrowDown.d.ts +9 -0
  318. package/lib/typescript/src/Icon/icons/ArrowDown.d.ts.map +1 -0
  319. package/lib/typescript/src/Icon/icons/ArrowForwardAlt.d.ts +9 -0
  320. package/lib/typescript/src/Icon/icons/ArrowForwardAlt.d.ts.map +1 -0
  321. package/lib/typescript/src/Icon/icons/ArrowLeft.d.ts +9 -0
  322. package/lib/typescript/src/Icon/icons/ArrowLeft.d.ts.map +1 -0
  323. package/lib/typescript/src/Icon/icons/ArrowRight.d.ts +9 -0
  324. package/lib/typescript/src/Icon/icons/ArrowRight.d.ts.map +1 -0
  325. package/lib/typescript/src/Icon/icons/ArrowUp.d.ts +9 -0
  326. package/lib/typescript/src/Icon/icons/ArrowUp.d.ts.map +1 -0
  327. package/lib/typescript/src/Icon/icons/Calendar.d.ts +9 -0
  328. package/lib/typescript/src/Icon/icons/Calendar.d.ts.map +1 -0
  329. package/lib/typescript/src/Icon/icons/Camera.d.ts +9 -0
  330. package/lib/typescript/src/Icon/icons/Camera.d.ts.map +1 -0
  331. package/lib/typescript/src/Icon/icons/Check.d.ts +6 -0
  332. package/lib/typescript/src/Icon/icons/Check.d.ts.map +1 -0
  333. package/lib/typescript/src/Icon/icons/Document.d.ts +9 -0
  334. package/lib/typescript/src/Icon/icons/Document.d.ts.map +1 -0
  335. package/lib/typescript/src/Icon/icons/Download.d.ts +9 -0
  336. package/lib/typescript/src/Icon/icons/Download.d.ts.map +1 -0
  337. package/lib/typescript/src/Icon/icons/ExlmationMark.d.ts +9 -0
  338. package/lib/typescript/src/Icon/icons/ExlmationMark.d.ts.map +1 -0
  339. package/lib/typescript/src/Icon/icons/Eye.d.ts +9 -0
  340. package/lib/typescript/src/Icon/icons/Eye.d.ts.map +1 -0
  341. package/lib/typescript/src/Icon/icons/EyeOpen.d.ts +9 -0
  342. package/lib/typescript/src/Icon/icons/EyeOpen.d.ts.map +1 -0
  343. package/lib/typescript/src/Icon/icons/Filter.d.ts +9 -0
  344. package/lib/typescript/src/Icon/icons/Filter.d.ts.map +1 -0
  345. package/lib/typescript/src/Icon/icons/Home.d.ts +2 -0
  346. package/lib/typescript/src/Icon/icons/Home.d.ts.map +1 -0
  347. package/lib/typescript/src/Icon/icons/Image.d.ts +9 -0
  348. package/lib/typescript/src/Icon/icons/Image.d.ts.map +1 -0
  349. package/lib/typescript/src/Icon/icons/Pdf.d.ts +9 -0
  350. package/lib/typescript/src/Icon/icons/Pdf.d.ts.map +1 -0
  351. package/lib/typescript/src/Icon/icons/RadioButton.d.ts +9 -0
  352. package/lib/typescript/src/Icon/icons/RadioButton.d.ts.map +1 -0
  353. package/lib/typescript/src/Icon/icons/Search.d.ts +9 -0
  354. package/lib/typescript/src/Icon/icons/Search.d.ts.map +1 -0
  355. package/lib/typescript/src/Icon/icons/StickyNote.d.ts +9 -0
  356. package/lib/typescript/src/Icon/icons/StickyNote.d.ts.map +1 -0
  357. package/lib/typescript/src/Icon/icons/Times.d.ts +9 -0
  358. package/lib/typescript/src/Icon/icons/Times.d.ts.map +1 -0
  359. package/lib/typescript/src/Icon/icons/User.d.ts +9 -0
  360. package/lib/typescript/src/Icon/icons/User.d.ts.map +1 -0
  361. package/lib/typescript/src/Icon/icons/XCircle.d.ts +9 -0
  362. package/lib/typescript/src/Icon/icons/XCircle.d.ts.map +1 -0
  363. package/lib/typescript/src/Icon/index.d.ts +5 -0
  364. package/lib/typescript/src/Icon/index.d.ts.map +1 -0
  365. package/lib/typescript/src/Icon/type.d.ts +9 -0
  366. package/lib/typescript/src/Icon/type.d.ts.map +1 -0
  367. package/lib/typescript/src/Input/Input.d.ts +5 -0
  368. package/lib/typescript/src/Input/Input.d.ts.map +1 -0
  369. package/lib/typescript/src/Input/InputFile.d.ts +11 -0
  370. package/lib/typescript/src/Input/InputFile.d.ts.map +1 -0
  371. package/lib/typescript/src/Input/InputMonth.d.ts +2 -0
  372. package/lib/typescript/src/Input/InputMonth.d.ts.map +1 -0
  373. package/lib/typescript/src/Input/InputNumber.d.ts +1 -0
  374. package/lib/typescript/src/Input/InputNumber.d.ts.map +1 -0
  375. package/lib/typescript/src/Input/InputOtp.d.ts +11 -0
  376. package/lib/typescript/src/Input/InputOtp.d.ts.map +1 -0
  377. package/lib/typescript/src/Input/InputPassword.d.ts +15 -0
  378. package/lib/typescript/src/Input/InputPassword.d.ts.map +1 -0
  379. package/lib/typescript/src/Input/InputSelect.d.ts +2 -0
  380. package/lib/typescript/src/Input/InputSelect.d.ts.map +1 -0
  381. package/lib/typescript/src/Input/Switch.d.ts +12 -0
  382. package/lib/typescript/src/Input/Switch.d.ts.map +1 -0
  383. package/lib/typescript/src/Input/TextArea.d.ts +3 -0
  384. package/lib/typescript/src/Input/TextArea.d.ts.map +1 -0
  385. package/lib/typescript/src/Input/type.d.ts +18 -0
  386. package/lib/typescript/src/Input/type.d.ts.map +1 -0
  387. package/lib/typescript/src/Label/Label.d.ts +12 -0
  388. package/lib/typescript/src/Label/Label.d.ts.map +1 -0
  389. package/lib/typescript/src/LabelForm/LabelForm.d.ts +4 -0
  390. package/lib/typescript/src/LabelForm/LabelForm.d.ts.map +1 -0
  391. package/lib/typescript/src/List/List.d.ts +3 -0
  392. package/lib/typescript/src/List/List.d.ts.map +1 -0
  393. package/lib/typescript/src/List/ListItem.d.ts +3 -0
  394. package/lib/typescript/src/List/ListItem.d.ts.map +1 -0
  395. package/lib/typescript/src/List/type.d.ts +14 -0
  396. package/lib/typescript/src/List/type.d.ts.map +1 -0
  397. package/lib/typescript/src/Loading/Loading.d.ts +10 -0
  398. package/lib/typescript/src/Loading/Loading.d.ts.map +1 -0
  399. package/lib/typescript/src/Modal/Modal.d.ts +18 -0
  400. package/lib/typescript/src/Modal/Modal.d.ts.map +1 -0
  401. package/lib/typescript/src/NativeRnKit.d.ts +7 -0
  402. package/lib/typescript/src/NativeRnKit.d.ts.map +1 -0
  403. package/lib/typescript/src/Provider/FooterProvider.d.ts +11 -0
  404. package/lib/typescript/src/Provider/FooterProvider.d.ts.map +1 -0
  405. package/lib/typescript/src/Provider/LayoutWithFooter.d.ts +5 -0
  406. package/lib/typescript/src/Provider/LayoutWithFooter.d.ts.map +1 -0
  407. package/lib/typescript/src/Provider/Provider.d.ts +15 -0
  408. package/lib/typescript/src/Provider/Provider.d.ts.map +1 -0
  409. package/lib/typescript/src/Provider/RequiredUpdateAppsProvider.d.ts +3 -0
  410. package/lib/typescript/src/Provider/RequiredUpdateAppsProvider.d.ts.map +1 -0
  411. package/lib/typescript/src/Provider/type.d.ts +7 -0
  412. package/lib/typescript/src/Provider/type.d.ts.map +1 -0
  413. package/lib/typescript/src/RadioButton/RadioButton.d.ts +15 -0
  414. package/lib/typescript/src/RadioButton/RadioButton.d.ts.map +1 -0
  415. package/lib/typescript/src/Select/Select.d.ts +3 -0
  416. package/lib/typescript/src/Select/Select.d.ts.map +1 -0
  417. package/lib/typescript/src/Select/type.d.ts +24 -0
  418. package/lib/typescript/src/Select/type.d.ts.map +1 -0
  419. package/lib/typescript/src/Step/Step.d.ts +4 -0
  420. package/lib/typescript/src/Step/Step.d.ts.map +1 -0
  421. package/lib/typescript/src/Step/StepItem.d.ts +4 -0
  422. package/lib/typescript/src/Step/StepItem.d.ts.map +1 -0
  423. package/lib/typescript/src/Step/type.d.ts +18 -0
  424. package/lib/typescript/src/Step/type.d.ts.map +1 -0
  425. package/lib/typescript/src/SwitchButton/SwitchButton.d.ts +2 -0
  426. package/lib/typescript/src/SwitchButton/SwitchButton.d.ts.map +1 -0
  427. package/lib/typescript/src/TextArea/TextArea.d.ts +1 -0
  428. package/lib/typescript/src/TextArea/TextArea.d.ts.map +1 -0
  429. package/lib/typescript/src/Theme/Theme.d.ts +29 -0
  430. package/lib/typescript/src/Theme/Theme.d.ts.map +1 -0
  431. package/lib/typescript/src/Timeline/Timeline.d.ts +6 -0
  432. package/lib/typescript/src/Timeline/Timeline.d.ts.map +1 -0
  433. package/lib/typescript/src/Timeline/TimelineItem.d.ts +15 -0
  434. package/lib/typescript/src/Timeline/TimelineItem.d.ts.map +1 -0
  435. package/lib/typescript/src/Toast/Toast.d.ts +14 -0
  436. package/lib/typescript/src/Toast/Toast.d.ts.map +1 -0
  437. package/lib/typescript/src/Toast/ToastContext.d.ts +17 -0
  438. package/lib/typescript/src/Toast/ToastContext.d.ts.map +1 -0
  439. package/lib/typescript/src/Typography/Typography.d.ts +5 -0
  440. package/lib/typescript/src/Typography/Typography.d.ts.map +1 -0
  441. package/lib/typescript/src/Typography/type.d.ts +19 -0
  442. package/lib/typescript/src/Typography/type.d.ts.map +1 -0
  443. package/lib/typescript/src/Ui/Card.d.ts +11 -0
  444. package/lib/typescript/src/Ui/Card.d.ts.map +1 -0
  445. package/lib/typescript/src/Ui/Center.d.ts +9 -0
  446. package/lib/typescript/src/Ui/Center.d.ts.map +1 -0
  447. package/lib/typescript/src/Ui/Col.d.ts +10 -0
  448. package/lib/typescript/src/Ui/Col.d.ts.map +1 -0
  449. package/lib/typescript/src/Ui/Container.d.ts +2 -0
  450. package/lib/typescript/src/Ui/Container.d.ts.map +1 -0
  451. package/lib/typescript/src/Ui/Devider.d.ts +3 -0
  452. package/lib/typescript/src/Ui/Devider.d.ts.map +1 -0
  453. package/lib/typescript/src/Ui/Footer.d.ts +9 -0
  454. package/lib/typescript/src/Ui/Footer.d.ts.map +1 -0
  455. package/lib/typescript/src/Ui/Gap.d.ts +6 -0
  456. package/lib/typescript/src/Ui/Gap.d.ts.map +1 -0
  457. package/lib/typescript/src/Ui/Grid.d.ts +9 -0
  458. package/lib/typescript/src/Ui/Grid.d.ts.map +1 -0
  459. package/lib/typescript/src/index.d.ts +59 -0
  460. package/lib/typescript/src/index.d.ts.map +1 -0
  461. package/package.json +172 -0
  462. package/src/Accordion/Accordion.tsx +38 -0
  463. package/src/Accordion/AccordionItem.tsx +9 -0
  464. package/src/Accordion/README.md +48 -0
  465. package/src/Accordion/type.tsx +19 -0
  466. package/src/Alert/Alert.tsx +141 -0
  467. package/src/Alert/README.md +68 -0
  468. package/src/Avatar/Avatar.tsx +68 -0
  469. package/src/Avatar/AvatarGroup.tsx +135 -0
  470. package/src/Avatar/README_AVATAR.md +57 -0
  471. package/src/Avatar/README_AVATARGROUP.md +58 -0
  472. package/src/Avatar/type.tsx +17 -0
  473. package/src/Badge/Badge.tsx +135 -0
  474. package/src/Badge/README.md +64 -0
  475. package/src/Badge/type.tsx +0 -0
  476. package/src/BottomSheet/BottomSheet.tsx +259 -0
  477. package/src/BottomSheet/README.md +64 -0
  478. package/src/BottomSheet/type.tsx +15 -0
  479. package/src/Button/Button.tsx +195 -0
  480. package/src/Button/README.md +94 -0
  481. package/src/Button/type.tsx +329 -0
  482. package/src/Calendar/Calendar.tsx +382 -0
  483. package/src/Calendar/CalendarPropsType.tsx +60 -0
  484. package/src/Calendar/README.md +73 -0
  485. package/src/CheckBox/CheckBox.tsx +80 -0
  486. package/src/CheckBox/CheckBoxList.tsx +64 -0
  487. package/src/CheckBox/README_CHECKBOX.md +46 -0
  488. package/src/CheckBox/README_CHECKBOXLIST.md +41 -0
  489. package/src/Chip/Chip.tsx +134 -0
  490. package/src/Chip/ChipItem.tsx +124 -0
  491. package/src/Chip/README.md +89 -0
  492. package/src/Chip/type.tsx +152 -0
  493. package/src/Color/Color.tsx +133 -0
  494. package/src/Color/README.md +54 -0
  495. package/src/Color/type.tsx +9 -0
  496. package/src/DatePicker/DatePicker.tsx +78 -0
  497. package/src/DatePicker/MonthPicker.tsx +204 -0
  498. package/src/DatePicker/README.md +51 -0
  499. package/src/DatePicker/TimePicker.tsx +234 -0
  500. package/src/DatePicker/YearPicker.tsx +238 -0
  501. package/src/DatePicker/helpers.tsx +53 -0
  502. package/src/Drawing/Drawing.tsx +23 -0
  503. package/src/DropDown/DropDown.tsx +136 -0
  504. package/src/DropDown/type.tsx +9 -0
  505. package/src/FileView/Image.tsx +5 -0
  506. package/src/FileView/PdfView.tsx +33 -0
  507. package/src/Icon/Icon.tsx +76 -0
  508. package/src/Icon/icons/AirPlane.tsx +19 -0
  509. package/src/Icon/icons/ArrowBackAlt.tsx +23 -0
  510. package/src/Icon/icons/ArrowDown.tsx +19 -0
  511. package/src/Icon/icons/ArrowForwardAlt.tsx +23 -0
  512. package/src/Icon/icons/ArrowLeft.tsx +19 -0
  513. package/src/Icon/icons/ArrowRight.tsx +19 -0
  514. package/src/Icon/icons/ArrowUp.tsx +19 -0
  515. package/src/Icon/icons/Calendar.tsx +19 -0
  516. package/src/Icon/icons/Camera.tsx +19 -0
  517. package/src/Icon/icons/Check.tsx +15 -0
  518. package/src/Icon/icons/Document.tsx +19 -0
  519. package/src/Icon/icons/Download.tsx +19 -0
  520. package/src/Icon/icons/ExlmationMark.tsx +23 -0
  521. package/src/Icon/icons/Eye.tsx +19 -0
  522. package/src/Icon/icons/EyeOpen.tsx +19 -0
  523. package/src/Icon/icons/Filter.tsx +19 -0
  524. package/src/Icon/icons/Home.tsx +5 -0
  525. package/src/Icon/icons/Image.tsx +19 -0
  526. package/src/Icon/icons/Pdf.tsx +19 -0
  527. package/src/Icon/icons/RadioButton.tsx +22 -0
  528. package/src/Icon/icons/Search.tsx +19 -0
  529. package/src/Icon/icons/StickyNote.tsx +19 -0
  530. package/src/Icon/icons/Times.tsx +19 -0
  531. package/src/Icon/icons/User.tsx +19 -0
  532. package/src/Icon/icons/XCircle.tsx +19 -0
  533. package/src/Icon/index.tsx +5 -0
  534. package/src/Icon/type.tsx +37 -0
  535. package/src/Input/Input.md +51 -0
  536. package/src/Input/Input.tsx +134 -0
  537. package/src/Input/InputFile.tsx +320 -0
  538. package/src/Input/InputMonth.tsx +1 -0
  539. package/src/Input/InputNumber.tsx +0 -0
  540. package/src/Input/InputOtp.tsx +96 -0
  541. package/src/Input/InputPassword.tsx +31 -0
  542. package/src/Input/InputSelect.tsx +5 -0
  543. package/src/Input/Switch.tsx +111 -0
  544. package/src/Input/TextArea.tsx +67 -0
  545. package/src/Input/assets/Ilustrasi.svg +14 -0
  546. package/src/Input/assets/input-file.png +0 -0
  547. package/src/Input/type.tsx +19 -0
  548. package/src/Label/Label.tsx +119 -0
  549. package/src/LabelForm/LabelForm.tsx +12 -0
  550. package/src/List/List.tsx +31 -0
  551. package/src/List/ListItem.tsx +34 -0
  552. package/src/List/type.tsx +14 -0
  553. package/src/Loading/Loading.tsx +56 -0
  554. package/src/Modal/Modal.tsx +179 -0
  555. package/src/NativeRnKit.ts +8 -0
  556. package/src/Provider/FooterProvider.tsx +26 -0
  557. package/src/Provider/LayoutWithFooter.tsx +27 -0
  558. package/src/Provider/Provider.tsx +53 -0
  559. package/src/Provider/RequiredUpdateAppsProvider.tsx +58 -0
  560. package/src/Provider/type.tsx +6 -0
  561. package/src/RadioButton/README.md +43 -0
  562. package/src/RadioButton/RadioButton.tsx +119 -0
  563. package/src/Select/README.md +78 -0
  564. package/src/Select/README_Select.md +78 -0
  565. package/src/Select/Select.tsx +115 -0
  566. package/src/Select/type.tsx +30 -0
  567. package/src/Step/Step.tsx +92 -0
  568. package/src/Step/StepItem.tsx +86 -0
  569. package/src/Step/type.tsx +18 -0
  570. package/src/SwitchButton/SwitchButton.tsx +5 -0
  571. package/src/TextArea/TextArea.tsx +0 -0
  572. package/src/Theme/Theme.tsx +28 -0
  573. package/src/Timeline/Timeline.tsx +9 -0
  574. package/src/Timeline/TimelineItem.tsx +63 -0
  575. package/src/Toast/Toast.tsx +179 -0
  576. package/src/Toast/ToastContext.tsx +51 -0
  577. package/src/Typography/README.md +71 -0
  578. package/src/Typography/Typography.tsx +44 -0
  579. package/src/Typography/type.tsx +60 -0
  580. package/src/Ui/Card.tsx +70 -0
  581. package/src/Ui/Center.tsx +20 -0
  582. package/src/Ui/Col.tsx +17 -0
  583. package/src/Ui/Container.tsx +12 -0
  584. package/src/Ui/Devider.tsx +15 -0
  585. package/src/Ui/Footer.tsx +37 -0
  586. package/src/Ui/Gap.tsx +8 -0
  587. package/src/Ui/Grid.tsx +36 -0
  588. package/src/index.tsx +68 -0
@@ -0,0 +1,48 @@
1
+ # ๐Ÿ“‚ Accordion
2
+
3
+ Komponen **Accordion** digunakan untuk menyembunyikan atau menampilkan konten secara dinamis. Biasanya digunakan untuk struktur seperti FAQ atau daftar konten bertingkat.
4
+ ![Deskripsi Alt](../../assets/doc/Accordion/Accordion.gif)
5
+
6
+ ## ๐Ÿ“ฆ USAGE
7
+
8
+ ```tsx
9
+ import React from 'react';
10
+ import { Text } from 'react-native';
11
+ import Accordion from '@herca/rn-kit/Accordion';
12
+ import AccordionItem from '@herca/rn-kit/Accordion/AccordionItem';
13
+
14
+ export default function FAQSection() {
15
+ return (
16
+ <Accordion
17
+ header={() => <Text style={{ fontWeight: 'bold' }}>Apa itu produk ini?</Text>}
18
+ isOpen={false}
19
+ onCollapse={(isOpen) => console.log('Status:', isOpen)}
20
+ >
21
+ <AccordionItem>
22
+ Produk ini adalah solusi digital untuk kebutuhan bisnis Anda.
23
+ </AccordionItem>
24
+ <AccordionItem>
25
+ Dapat digunakan di berbagai platform termasuk Android dan iOS.
26
+ </AccordionItem>
27
+ </Accordion>
28
+ );
29
+ }
30
+
31
+ ```
32
+
33
+
34
+ ## Props
35
+
36
+ | props name | mandatory | types | default |
37
+ | -------------------- | --------- | ------- | -------------------------------------------------------- |
38
+ | header | | ReactNode | false |
39
+ | isOpen | | boolean | true |
40
+ | onCollapse | | (isOpen: boolean) => void | true | |
41
+
42
+ ## Note
43
+
44
+ Komponen Accordion menggunakan state internal (useState) untuk mengatur apakah kontennya sedang terbuka atau tidak.
45
+
46
+ Fungsi header digunakan untuk merender tampilan judul Accordion dan dapat disesuaikan.
47
+
48
+ Konten yang disembunyikan/diperluas sebaiknya dibungkus dalam AccordionItem.
@@ -0,0 +1,19 @@
1
+ import type { ReactNode } from 'react';
2
+
3
+ export interface AccordionContextType {
4
+ expandedIndex: number | null;
5
+ setExpandedIndex: (index: number | null) => void;
6
+ }
7
+
8
+ export type AccordionRenderHeaderProps = ReactNode | null;
9
+
10
+ export interface AccordionProps {
11
+ children: ReactNode;
12
+ renderHeader?: AccordionRenderHeaderProps;
13
+ isOpen?: boolean;
14
+ onCollapse?: (isOpen: boolean) => void;
15
+ }
16
+ export interface AccordionItemProps {
17
+ children: ReactNode;
18
+ index?: number;
19
+ }
@@ -0,0 +1,141 @@
1
+ import React from 'react';
2
+ import { View, StyleSheet, type ViewStyle, type StyleProp } from 'react-native';
3
+ import Color from '../Color/Color';
4
+ import Typography from '../Typography/Typography';
5
+ import { Icon } from '../Icon';
6
+ import type { IconNameProps } from '../Icon/type';
7
+ import type { ColorVariantType } from '../Color/type';
8
+
9
+ interface AlertProps {
10
+ icon?: IconNameProps;
11
+ title?: string;
12
+ message?: string;
13
+ color?: ColorVariantType;
14
+ style?: ViewStyle;
15
+ titleStyle?: StyleProp<ViewStyle>;
16
+ messageStyle?: StyleProp<ViewStyle>;
17
+ }
18
+
19
+ const COLORS: Record<
20
+ ColorVariantType,
21
+ {
22
+ background: string;
23
+ borderColor: string;
24
+ fontColor: string;
25
+ }
26
+ > = {
27
+ success: {
28
+ background: Color.success[50],
29
+ fontColor: Color.success[500],
30
+ borderColor: Color.success[500],
31
+ },
32
+ default: {
33
+ background: Color.gray[50],
34
+ fontColor: Color.gray[500],
35
+ borderColor: Color.gray[500],
36
+ },
37
+ info: {
38
+ background: Color.info[50],
39
+ fontColor: Color.info[500],
40
+ borderColor: Color.info[500],
41
+ },
42
+ warning: {
43
+ background: Color.warning[50],
44
+ fontColor: Color.warning[400],
45
+ borderColor: Color.warning[400],
46
+ },
47
+ danger: {
48
+ background: Color.danger[50],
49
+ fontColor: Color.danger[500],
50
+ borderColor: Color.danger[200],
51
+ },
52
+ primary: {
53
+ background: Color.primary[50],
54
+ fontColor: Color.primary[500],
55
+ borderColor: Color.primary[200],
56
+ },
57
+ orange: {
58
+ background: Color.orange[50],
59
+ fontColor: Color.orange[500],
60
+ borderColor: Color.orange[200],
61
+ },
62
+ purple: {
63
+ background: Color.purple[50],
64
+ fontColor: Color.purple[500],
65
+ borderColor: Color.purple[200],
66
+ },
67
+ };
68
+
69
+ const Alert: React.FC<AlertProps> = ({
70
+ icon = 'ExlamationMark',
71
+ title,
72
+ message,
73
+ color = 'primary',
74
+ titleStyle,
75
+ messageStyle,
76
+ }) => {
77
+ const { background, fontColor, borderColor } = COLORS[color];
78
+
79
+ return (
80
+ <View
81
+ style={[
82
+ styles.container,
83
+ { backgroundColor: background, borderColor: borderColor },
84
+ ]}
85
+ >
86
+ <View style={{ marginRight: 10 }}>
87
+ <Icon name={icon || 'ExlamationMark'} color={fontColor} />
88
+ </View>
89
+ <View style={styles.textContainer}>
90
+ {title && (
91
+ <Typography
92
+ variant="t2"
93
+ weight="bold"
94
+ color={fontColor}
95
+ style={StyleSheet.flatten([styles.title, titleStyle])}
96
+ >
97
+ {title}
98
+ </Typography>
99
+ )}
100
+ {message && (
101
+ <Typography
102
+ variant="t3"
103
+ color={fontColor}
104
+ style={StyleSheet.flatten([styles.message, messageStyle])}
105
+ >
106
+ {message}
107
+ </Typography>
108
+ )}
109
+ </View>
110
+ </View>
111
+ );
112
+ };
113
+
114
+ const styles = StyleSheet.create({
115
+ container: {
116
+ flexDirection: 'row',
117
+ padding: 12,
118
+ borderRadius: 8,
119
+ marginVertical: 8,
120
+ borderWidth: 1,
121
+ },
122
+ iconContainer: {
123
+ marginRight: 10,
124
+ width: 24,
125
+ },
126
+ textContainer: {
127
+ justifyContent: 'center',
128
+ flex: 1,
129
+ maxWidth: '90%',
130
+ },
131
+ title: {
132
+ flexShrink: 1,
133
+ flexWrap: 'wrap',
134
+ },
135
+ message: {
136
+ flexShrink: 1,
137
+ flexWrap: 'wrap',
138
+ },
139
+ });
140
+
141
+ export default Alert;
@@ -0,0 +1,68 @@
1
+ # ๐Ÿ“ข Alert Component
2
+
3
+ Komponen `Alert` digunakan untuk menampilkan pesan notifikasi dengan ikon, judul, dan pesan yang dapat dikustomisasi warnanya sesuai konteks (seperti *success*, *info*, *warning*, dll).
4
+
5
+ ![Deskripsi Alt](../../assets/doc/Alert/Alert.png)
6
+ ## โœจ Fitur
7
+
8
+ - Menampilkan ikon notifikasi
9
+ - Mendukung berbagai warna status
10
+ - Mendukung judul dan pesan
11
+ - Gaya dapat dikustomisasi
12
+
13
+ ## ๐Ÿงฑ Props
14
+
15
+ | Prop | Tipe | Default | Deskripsi |
16
+ |----------------|----------------------------------------------------------------------|---------------------|---------------------------------------------------------------------------|
17
+ | `icon` | `IconNameProps` | `'ExlamationMark'` | Nama ikon dari komponen `Icon` |
18
+ | `title` | `string` | `undefined` | Judul alert |
19
+ | `message` | `string` | `undefined` | Pesan tambahan |
20
+ | `color` | `'success' \| 'info' \| 'warning' \| 'danger' \| 'primary' \| 'orange' \| 'purple'` | `'primary'` | Warna tema alert |
21
+ | `style` | `ViewStyle` | `undefined` | Gaya tambahan untuk container |
22
+ | `titleStyle` | `StyleProp<ViewStyle>` | `undefined` | Gaya tambahan untuk judul |
23
+ | `messageStyle` | `StyleProp<ViewStyle>` | `undefined` | Gaya tambahan untuk pesan |
24
+
25
+ ## ๐ŸŽจ Warna yang Didukung
26
+
27
+ ```ts
28
+ type ColorProps =
29
+ | 'success'
30
+ | 'info'
31
+ | 'warning'
32
+ | 'danger'
33
+ | 'primary'
34
+ | 'orange'
35
+ | 'purple';
36
+ ```
37
+
38
+ ## ๐Ÿ“ฆ Cara Penggunaan
39
+
40
+ ```tsx
41
+ import React from 'react';
42
+ import Alert from './Alert'; // sesuaikan dengan path Anda
43
+
44
+ export default function MyScreen() {
45
+ return (
46
+ <Alert
47
+ icon="CheckCircle"
48
+ title="Berhasil"
49
+ message="Data Anda berhasil disimpan."
50
+ color="success"
51
+ />
52
+ );
53
+ }
54
+ ```
55
+
56
+ ## ๐Ÿ› ๏ธ Kustomisasi
57
+
58
+ ```tsx
59
+ <Alert
60
+ icon="Warning"
61
+ title="Peringatan"
62
+ message="Pastikan semua data telah diisi."
63
+ color="warning"
64
+ style={{ marginTop: 16 }}
65
+ titleStyle={{ fontSize: 16 }}
66
+ messageStyle={{ fontStyle: 'italic' }}
67
+ />
68
+ ```
@@ -0,0 +1,68 @@
1
+ import React from 'react';
2
+ import { Image, View, StyleSheet } from 'react-native';
3
+ import type { AvatarProps, AvatarSizeType } from './type';
4
+ import Typography from '../Typography/Typography';
5
+
6
+ const SIZE_MAP: Record<AvatarSizeType, number> = {
7
+ small: 30,
8
+ medium: 40,
9
+ large: 50,
10
+ };
11
+
12
+ const Avatar: React.FC<AvatarProps> = ({
13
+ size = 'medium',
14
+ source,
15
+ name,
16
+ backgroundColor = '#ccc',
17
+ textColor = '#fff',
18
+ style,
19
+ }) => {
20
+ const avatarSize = SIZE_MAP[size] || SIZE_MAP.medium;
21
+
22
+ return (
23
+ <View
24
+ style={[
25
+ styles.container,
26
+ {
27
+ width: avatarSize,
28
+ height: avatarSize,
29
+ borderRadius: avatarSize / 2,
30
+ backgroundColor,
31
+ },
32
+ style,
33
+ ]}
34
+ >
35
+ {source ? (
36
+ <Image
37
+ source={source}
38
+ style={{
39
+ width: avatarSize,
40
+ height: avatarSize,
41
+ borderRadius: avatarSize / 2,
42
+ }}
43
+ />
44
+ ) : (
45
+ <Typography
46
+ variant="p2"
47
+ weight="medium"
48
+ style={[styles.initials, { color: textColor }]}
49
+ >
50
+ {name}
51
+ </Typography>
52
+ )}
53
+ </View>
54
+ );
55
+ };
56
+
57
+ const styles = StyleSheet.create({
58
+ container: {
59
+ justifyContent: 'center',
60
+ alignItems: 'center',
61
+ overflow: 'hidden',
62
+ },
63
+ initials: {
64
+ textAlign: 'center',
65
+ },
66
+ });
67
+
68
+ export default Avatar;
@@ -0,0 +1,135 @@
1
+ import { View, Image, Text, StyleSheet } from 'react-native';
2
+ import { Icon } from '../Icon';
3
+ import Color from '../Color/Color';
4
+ import type { AvatarGroupProps, AvatarSizeType } from './type';
5
+
6
+ const SIZE_MAP: Record<AvatarSizeType, number> = {
7
+ small: 30,
8
+ medium: 40,
9
+ large: 50,
10
+ };
11
+
12
+ const AvatarGroup: React.FC<AvatarGroupProps> = ({
13
+ avatars = [],
14
+ maxVisible = 5,
15
+ size = 'medium',
16
+ }) => {
17
+ const avatarSize = SIZE_MAP[size] || SIZE_MAP.medium;
18
+ const visibleAvatars = avatars.slice(0, maxVisible);
19
+ const remainingCount = avatars.length - maxVisible;
20
+
21
+ return (
22
+ <View style={[styles.container, { height: avatarSize }]}>
23
+ {visibleAvatars.map((avatar, index) => {
24
+ const hasImage = avatar.source;
25
+ const initials = avatar.name;
26
+ const styleSize = {
27
+ width: avatarSize,
28
+ height: avatarSize,
29
+ borderRadius: avatarSize / 2,
30
+ };
31
+
32
+ return (
33
+ <View
34
+ key={index}
35
+ style={[
36
+ styles.avatarWrapper,
37
+ {
38
+ left: index * (avatarSize * 0.6),
39
+ zIndex: avatars.length - index,
40
+ },
41
+ ]}
42
+ >
43
+ {hasImage ? (
44
+ <Image
45
+ source={avatar.source}
46
+ style={[styles.avatar, styleSize]}
47
+ />
48
+ ) : initials ? (
49
+ <View style={[styles.initialWrapper, styleSize]}>
50
+ <Text
51
+ style={[styles.initialText, { fontSize: avatarSize * 0.4 }]}
52
+ >
53
+ {initials}
54
+ </Text>
55
+ </View>
56
+ ) : (
57
+ <View style={[styles.iconWrapper, styleSize]}>
58
+ <Icon name="User" color={Color.base.white100} />
59
+ </View>
60
+ )}
61
+ </View>
62
+ );
63
+ })}
64
+
65
+ {remainingCount > 0 && (
66
+ <View
67
+ style={[
68
+ styles.avatarWrapper,
69
+ { left: visibleAvatars.length * (avatarSize * 0.6), zIndex: 0 },
70
+ ]}
71
+ >
72
+ <View
73
+ style={[
74
+ styles.remaining,
75
+ {
76
+ width: avatarSize,
77
+ height: avatarSize,
78
+ borderRadius: avatarSize / 2,
79
+ },
80
+ ]}
81
+ >
82
+ <Text
83
+ style={[styles.remainingText, { fontSize: avatarSize * 0.4 }]}
84
+ >
85
+ +{remainingCount}
86
+ </Text>
87
+ </View>
88
+ </View>
89
+ )}
90
+ </View>
91
+ );
92
+ };
93
+
94
+ const styles = StyleSheet.create({
95
+ container: {
96
+ flexDirection: 'row',
97
+ position: 'relative',
98
+ },
99
+ avatarWrapper: {
100
+ position: 'absolute',
101
+ },
102
+ avatar: {
103
+ borderWidth: 2,
104
+ borderColor: Color.base.white100,
105
+ },
106
+ initialWrapper: {
107
+ backgroundColor: Color.gray[400],
108
+ justifyContent: 'center',
109
+ alignItems: 'center',
110
+ borderWidth: 2,
111
+ borderColor: Color.base.white100,
112
+ },
113
+ iconWrapper: {
114
+ backgroundColor: Color.gray[400],
115
+ justifyContent: 'center',
116
+ alignItems: 'center',
117
+ borderWidth: 2,
118
+ borderColor: Color.base.white100,
119
+ },
120
+ initialText: {
121
+ color: Color.base.white100,
122
+ fontWeight: 'bold',
123
+ },
124
+ remaining: {
125
+ backgroundColor: Color.gray[400],
126
+ justifyContent: 'center',
127
+ alignItems: 'center',
128
+ },
129
+ remainingText: {
130
+ color: Color.base.white100,
131
+ fontWeight: 'bold',
132
+ },
133
+ });
134
+
135
+ export default AvatarGroup;
@@ -0,0 +1,57 @@
1
+ # ๐Ÿง‘โ€๐ŸŽจ Avatar Component
2
+
3
+ Komponen `Avatar` digunakan untuk menampilkan foto pengguna atau inisial nama jika foto tidak tersedia.
4
+ ![Deskripsi Alt](../../assets/doc/Avatar/Avatar.png)
5
+
6
+ ## โœจ Fitur
7
+
8
+ - Menampilkan gambar avatar dari `Image source`
9
+ - Menampilkan inisial nama jika gambar tidak tersedia
10
+ - Mendukung tiga ukuran: kecil, sedang, besar
11
+ - Warna latar dan teks dapat dikustomisasi
12
+
13
+ ## ๐Ÿงฑ Props
14
+
15
+ | Prop | Tipe | Default | Deskripsi |
16
+ |-----------------|-------------------------|-------------|-------------------------------------------------------------------------|
17
+ | `size` | `'small'` \| `'medium'` \| `'large'` | `'medium'` | Ukuran avatar |
18
+ | `source` | `ImageSourcePropType` | `undefined` | Sumber gambar avatar |
19
+ | `name` | `string` | `undefined` | Digunakan untuk menampilkan inisial jika `source` tidak tersedia |
20
+ | `backgroundColor` | `string` | `'#ccc'` | Warna latar belakang jika tanpa gambar |
21
+ | `textColor` | `string` | `'#fff'` | Warna teks inisial jika tanpa gambar |
22
+ | `style` | `ViewStyle` | `undefined` | Gaya tambahan untuk container |
23
+
24
+ ## ๐Ÿ“ Ukuran Avatar
25
+
26
+ | Ukuran | Nilai pixel |
27
+ |---------|-------------|
28
+ | small | 30 |
29
+ | medium | 40 |
30
+ | large | 50 |
31
+
32
+ ## ๐Ÿงช Contoh Penggunaan
33
+
34
+ ```tsx
35
+ import React from 'react';
36
+ import Avatar from './Avatar'; // sesuaikan path
37
+
38
+ export default function ProfileHeader() {
39
+ return (
40
+ <>
41
+ {/* Dengan gambar */}
42
+ <Avatar
43
+ size="large"
44
+ source={{ uri: 'https://example.com/profile.jpg' }}
45
+ />
46
+
47
+ {/* Tanpa gambar, menggunakan nama */}
48
+ <Avatar
49
+ size="medium"
50
+ name="SR"
51
+ backgroundColor="#1E88E5"
52
+ textColor="#fff"
53
+ />
54
+ </>
55
+ );
56
+ }
57
+ ```
@@ -0,0 +1,58 @@
1
+
2
+ # AvatarGroup Component (React Native)
3
+
4
+ The `AvatarGroup` component displays a group of user avatars. It supports image avatars, initials-based avatars, and a fallback icon. If there are more avatars than the maximum visible count, it displays a "+X" bubble.
5
+ ![Deskripsi Alt](../../assets/doc/Avatar/AvatarGroup.png)
6
+ ---
7
+
8
+ ## ๐Ÿ“ฆ Props
9
+
10
+ ### `AvatarGroupProps`
11
+
12
+ | Prop | Type | Default | Description |
13
+ |--------------|-------------------------------------|-----------|--------------------------------------------------|
14
+ | `avatars` | `AvatarProps[]` | `[]` | Array of avatar objects. |
15
+ | `maxVisible` | `number` | `5` | Max number of avatars to display. |
16
+ | `size` | `'small' | 'medium' | 'large'` | `'medium'` | Size of avatars. |
17
+
18
+ ### `AvatarProps`
19
+
20
+ | Prop | Type | Description |
21
+ |-----------------|-----------------------|-----------------------------------------------------|
22
+ | `size` | `'small' | 'medium' | 'large'` | Size of individual avatar (optional). |
23
+ | `source` | `ImageSourcePropType` | Image source for avatar. |
24
+ | `name` | `string` | Initials to show if image is not available. |
25
+ | `backgroundColor` | `string` | Background color for initials or icon avatar. |
26
+ | `textColor` | `string` | Color of the initials text. |
27
+ | `style` | `object` | Additional style for individual avatar container. |
28
+
29
+ ---
30
+
31
+ ## ๐Ÿ–ผ๏ธ Example Usage
32
+
33
+ ```tsx
34
+ import AvatarGroup from './AvatarGroup';
35
+
36
+ const teamMembers = [
37
+ { name: 'JS', backgroundColor: '#3498db' },
38
+ { name: 'EM', source: require('./assets/emily.png') },
39
+ { name: 'RS' },
40
+ { name: 'AB', textColor: '#fff' },
41
+ { name: 'ZK' },
42
+ { name: 'XY' },
43
+ ];
44
+
45
+ <AvatarGroup avatars={teamMembers} maxVisible={4} size="small" />
46
+ ```
47
+
48
+ ---
49
+
50
+ ## ๐ŸŽจ Avatar Sizes
51
+
52
+ | Size | Dimension (px) |
53
+ |---------|----------------|
54
+ | small | 30 |
55
+ | medium | 40 |
56
+ | large | 50 |
57
+
58
+ ---
@@ -0,0 +1,17 @@
1
+ import type { ImageSourcePropType } from 'react-native';
2
+
3
+ export type AvatarSizeType = 'small' | 'medium' | 'large';
4
+ export interface AvatarProps {
5
+ size?: AvatarSizeType;
6
+ source?: ImageSourcePropType;
7
+ name?: string;
8
+ backgroundColor?: string;
9
+ textColor?: string;
10
+ style?: object;
11
+ }
12
+
13
+ export interface AvatarGroupProps {
14
+ avatars?: AvatarProps[];
15
+ maxVisible?: number;
16
+ size?: AvatarSizeType;
17
+ }