monkey-style-guide 2.0.152 → 2.0.153

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 (483) hide show
  1. package/README.md +1239 -1237
  2. package/assets/data/country-codes.json +1466 -1466
  3. package/assets/icons/add-plus.svg +5 -0
  4. package/assets/icons/arrow-down.svg +3 -3
  5. package/assets/icons/arrow-left.svg +3 -3
  6. package/assets/icons/arrow-line-right.svg +5 -5
  7. package/assets/icons/arrow-right.svg +3 -3
  8. package/assets/icons/arrow-up.svg +3 -3
  9. package/assets/icons/arrows.svg +6 -6
  10. package/assets/icons/auction.svg +7 -7
  11. package/assets/icons/bank-account.svg +12 -12
  12. package/assets/icons/bank.svg +3 -3
  13. package/assets/icons/banknote-search.svg +8 -8
  14. package/assets/icons/bell.svg +4 -4
  15. package/assets/icons/book.svg +4 -4
  16. package/assets/icons/box.svg +6 -6
  17. package/assets/icons/build-person.svg +9 -9
  18. package/assets/icons/calendar.svg +6 -6
  19. package/assets/icons/camera.svg +4 -4
  20. package/assets/icons/card-machine.svg +14 -14
  21. package/assets/icons/card.svg +4 -4
  22. package/assets/icons/cash-banknote-invoice.svg +8 -0
  23. package/assets/icons/chat.svg +4 -4
  24. package/assets/icons/check-circle-out.svg +4 -4
  25. package/assets/icons/check-circle.svg +4 -4
  26. package/assets/icons/check-grey.svg +3 -3
  27. package/assets/icons/check-white.svg +4 -4
  28. package/assets/icons/check.svg +3 -3
  29. package/assets/icons/clipboard.svg +4 -4
  30. package/assets/icons/clock.svg +4 -4
  31. package/assets/icons/close.svg +4 -4
  32. package/assets/icons/cnpj.svg +9 -9
  33. package/assets/icons/codepen.svg +7 -7
  34. package/assets/icons/company-name.svg +12 -12
  35. package/assets/icons/contract-pen.svg +7 -7
  36. package/assets/icons/contract.svg +14 -14
  37. package/assets/icons/delete.svg +5 -5
  38. package/assets/icons/document.svg +7 -7
  39. package/assets/icons/dollar-sign-circle.svg +7 -7
  40. package/assets/icons/dollar-sign.svg +5 -5
  41. package/assets/icons/domain.svg +9 -9
  42. package/assets/icons/dots-menu.svg +5 -5
  43. package/assets/icons/double-arrow-left.svg +4 -4
  44. package/assets/icons/double-arrow-right.svg +4 -4
  45. package/assets/icons/download.svg +5 -5
  46. package/assets/icons/edit-square.svg +4 -4
  47. package/assets/icons/edit.svg +3 -3
  48. package/assets/icons/email.svg +4 -4
  49. package/assets/icons/empty-doc.svg +4 -4
  50. package/assets/icons/error.svg +5 -5
  51. package/assets/icons/eye-closed.svg +11 -11
  52. package/assets/icons/eye-open.svg +4 -4
  53. package/assets/icons/filter.svg +3 -3
  54. package/assets/icons/grid.svg +6 -6
  55. package/assets/icons/help.svg +5 -5
  56. package/assets/icons/hexagon.svg +3 -3
  57. package/assets/icons/home.svg +4 -4
  58. package/assets/icons/image.svg +5 -5
  59. package/assets/icons/info.svg +6 -6
  60. package/assets/icons/invoice.svg +5 -5
  61. package/assets/icons/list.svg +8 -8
  62. package/assets/icons/location-pin.svg +4 -4
  63. package/assets/icons/login.svg +5 -5
  64. package/assets/icons/logout.svg +5 -5
  65. package/assets/icons/medal.svg +12 -12
  66. package/assets/icons/menu.svg +5 -5
  67. package/assets/icons/money-cedule.svg +6 -6
  68. package/assets/icons/money-hand.svg +6 -6
  69. package/assets/icons/money-sign.svg +4 -4
  70. package/assets/icons/money.svg +6 -6
  71. package/assets/icons/more.svg +4 -4
  72. package/assets/icons/new-company.svg +10 -10
  73. package/assets/icons/offered.svg +5 -5
  74. package/assets/icons/password.svg +4 -4
  75. package/assets/icons/people.svg +6 -6
  76. package/assets/icons/percent.svg +5 -5
  77. package/assets/icons/person-document.svg +10 -10
  78. package/assets/icons/person-sad.svg +6 -6
  79. package/assets/icons/phone.svg +3 -3
  80. package/assets/icons/pork.svg +5 -5
  81. package/assets/icons/radio.svg +4 -4
  82. package/assets/icons/refresh.svg +5 -5
  83. package/assets/icons/repeat.svg +4 -4
  84. package/assets/icons/search.svg +4 -4
  85. package/assets/icons/second-warning.svg +5 -5
  86. package/assets/icons/settings.svg +4 -4
  87. package/assets/icons/shield-chekmark.svg +3 -3
  88. package/assets/icons/star.svg +3 -3
  89. package/assets/icons/today.svg +9 -9
  90. package/assets/icons/trash.svg +6 -6
  91. package/assets/icons/trophy.svg +8 -8
  92. package/assets/icons/unfold-more.svg +4 -4
  93. package/assets/icons/upload.svg +5 -5
  94. package/assets/icons/user.svg +4 -4
  95. package/assets/icons/waiting.svg +17 -17
  96. package/assets/icons/wallet.svg +5 -5
  97. package/assets/icons/warning.svg +5 -5
  98. package/assets/scss/partials/_forms.scss +350 -350
  99. package/assets/scss/partials/_index.scss +11 -11
  100. package/assets/scss/partials/_radio-button.scss +35 -35
  101. package/assets/scss/partials/_style-reset.scss +185 -185
  102. package/assets/scss/partials/_typography.scss +149 -149
  103. package/assets/scss/partials/_variables.scss +184 -184
  104. package/assets/scss/partials/components/_buttons.scss +831 -831
  105. package/assets/scss/partials/components/_checkbox.scss +69 -69
  106. package/assets/scss/partials/components/_date-range-picker.scss +265 -265
  107. package/assets/scss/partials/components/_expansion.scss +96 -96
  108. package/assets/scss/partials/components/_image-crop.scss +305 -305
  109. package/assets/scss/partials/components/_index.scss +23 -23
  110. package/assets/scss/partials/components/_input-phone.scss +36 -36
  111. package/assets/scss/partials/components/_input.scss +65 -65
  112. package/assets/scss/partials/components/_progressbar.scss +112 -112
  113. package/assets/scss/partials/components/_radiobutton.scss +66 -66
  114. package/assets/scss/partials/components/_select.scss +356 -356
  115. package/assets/scss/partials/components/_snackbar.scss +204 -204
  116. package/assets/scss/partials/components/_stepper.scss +86 -86
  117. package/assets/scss/partials/components/_table.scss +148 -148
  118. package/assets/scss/partials/components/_wizard.scss +112 -112
  119. package/esm2020/lib/components/badge/badge.component.mjs +43 -43
  120. package/esm2020/lib/components/badge/badge.module.mjs +18 -18
  121. package/esm2020/lib/components/badge/index.mjs +2 -2
  122. package/esm2020/lib/components/button/button-avatar.component.mjs +53 -53
  123. package/esm2020/lib/components/button/button-dropdown.component.mjs +121 -121
  124. package/esm2020/lib/components/button/button.component.mjs +154 -154
  125. package/esm2020/lib/components/button/button.module.mjs +23 -23
  126. package/esm2020/lib/components/button/index.mjs +5 -5
  127. package/esm2020/lib/components/checkbox/checkbox.component.mjs +165 -165
  128. package/esm2020/lib/components/checkbox/checkbox.module.mjs +20 -20
  129. package/esm2020/lib/components/checkbox/index.mjs +3 -3
  130. package/esm2020/lib/components/date-range-picker/date-range-picker.component.mjs +660 -660
  131. package/esm2020/lib/components/date-range-picker/date-range-picker.module.mjs +22 -22
  132. package/esm2020/lib/components/date-range-picker/index.mjs +3 -3
  133. package/esm2020/lib/components/expansion/expansion.component.mjs +115 -115
  134. package/esm2020/lib/components/expansion/expansion.module.mjs +19 -19
  135. package/esm2020/lib/components/expansion/index.mjs +2 -2
  136. package/esm2020/lib/components/file-upload/file-upload.component.mjs +294 -294
  137. package/esm2020/lib/components/file-upload/file-upload.module.mjs +37 -37
  138. package/esm2020/lib/components/file-upload/index.mjs +3 -3
  139. package/esm2020/lib/components/icon/icon-add-plus.component.mjs +15 -0
  140. package/esm2020/lib/components/icon/icon-arrow-down.component.mjs +15 -15
  141. package/esm2020/lib/components/icon/icon-arrow-left.component.mjs +15 -15
  142. package/esm2020/lib/components/icon/icon-arrow-line-right.component.mjs +15 -15
  143. package/esm2020/lib/components/icon/icon-arrow-right.component.mjs +15 -15
  144. package/esm2020/lib/components/icon/icon-arrow-up.component.mjs +15 -15
  145. package/esm2020/lib/components/icon/icon-arrows.component.mjs +15 -15
  146. package/esm2020/lib/components/icon/icon-auction.component.mjs +15 -15
  147. package/esm2020/lib/components/icon/icon-bank-account.component.mjs +15 -15
  148. package/esm2020/lib/components/icon/icon-bank.component.mjs +15 -15
  149. package/esm2020/lib/components/icon/icon-banknote-search.component.mjs +15 -15
  150. package/esm2020/lib/components/icon/icon-bell.component.mjs +15 -15
  151. package/esm2020/lib/components/icon/icon-book.component.mjs +15 -15
  152. package/esm2020/lib/components/icon/icon-box.component.mjs +15 -15
  153. package/esm2020/lib/components/icon/icon-build-person.component.mjs +15 -15
  154. package/esm2020/lib/components/icon/icon-calendar.component.mjs +15 -15
  155. package/esm2020/lib/components/icon/icon-camera.component.mjs +15 -15
  156. package/esm2020/lib/components/icon/icon-card-machine.component.mjs +15 -15
  157. package/esm2020/lib/components/icon/icon-card.component.mjs +15 -15
  158. package/esm2020/lib/components/icon/icon-cash-banknote-invoice.mjs +15 -0
  159. package/esm2020/lib/components/icon/icon-chat.component.mjs +15 -15
  160. package/esm2020/lib/components/icon/icon-check-circle-out.component.mjs +15 -15
  161. package/esm2020/lib/components/icon/icon-check-circle.component.mjs +15 -15
  162. package/esm2020/lib/components/icon/icon-check-grey.component.mjs +15 -15
  163. package/esm2020/lib/components/icon/icon-check-white.component.mjs +15 -15
  164. package/esm2020/lib/components/icon/icon-check.component.mjs +15 -15
  165. package/esm2020/lib/components/icon/icon-clipboard.component.mjs +15 -15
  166. package/esm2020/lib/components/icon/icon-clock.component.mjs +15 -15
  167. package/esm2020/lib/components/icon/icon-close.component.mjs +15 -15
  168. package/esm2020/lib/components/icon/icon-cnpj.component.mjs +15 -15
  169. package/esm2020/lib/components/icon/icon-codepen.component.mjs +15 -15
  170. package/esm2020/lib/components/icon/icon-company-name.component.mjs +15 -15
  171. package/esm2020/lib/components/icon/icon-contract-pen.component.mjs +15 -15
  172. package/esm2020/lib/components/icon/icon-contract.component.mjs +15 -15
  173. package/esm2020/lib/components/icon/icon-delete.component.mjs +15 -15
  174. package/esm2020/lib/components/icon/icon-document.component.mjs +15 -15
  175. package/esm2020/lib/components/icon/icon-dollar-sign-circle.component.mjs +15 -15
  176. package/esm2020/lib/components/icon/icon-dollar-sign.component.mjs +15 -15
  177. package/esm2020/lib/components/icon/icon-domain.component.mjs +15 -15
  178. package/esm2020/lib/components/icon/icon-dots-menu.component.mjs +15 -15
  179. package/esm2020/lib/components/icon/icon-double-arrow-left.component.mjs +15 -15
  180. package/esm2020/lib/components/icon/icon-double-arrow-right.component.mjs +15 -15
  181. package/esm2020/lib/components/icon/icon-download.component.mjs +15 -15
  182. package/esm2020/lib/components/icon/icon-edit-square.component.mjs +15 -15
  183. package/esm2020/lib/components/icon/icon-edit.component.mjs +15 -15
  184. package/esm2020/lib/components/icon/icon-email.component.mjs +15 -15
  185. package/esm2020/lib/components/icon/icon-empty-doc.component.mjs +15 -15
  186. package/esm2020/lib/components/icon/icon-error.component.mjs +15 -15
  187. package/esm2020/lib/components/icon/icon-eye-closed.component.mjs +15 -15
  188. package/esm2020/lib/components/icon/icon-eye-open.component.mjs +15 -15
  189. package/esm2020/lib/components/icon/icon-filter.component.mjs +15 -15
  190. package/esm2020/lib/components/icon/icon-grid.component.mjs +15 -15
  191. package/esm2020/lib/components/icon/icon-help.component.mjs +15 -15
  192. package/esm2020/lib/components/icon/icon-hexagon.component.mjs +15 -15
  193. package/esm2020/lib/components/icon/icon-home.component.mjs +15 -15
  194. package/esm2020/lib/components/icon/icon-image.component.mjs +15 -15
  195. package/esm2020/lib/components/icon/icon-info.component.mjs +15 -15
  196. package/esm2020/lib/components/icon/icon-invoice.component.mjs +15 -15
  197. package/esm2020/lib/components/icon/icon-list.component.mjs +15 -15
  198. package/esm2020/lib/components/icon/icon-location-pin.component.mjs +15 -15
  199. package/esm2020/lib/components/icon/icon-login.component.mjs +15 -15
  200. package/esm2020/lib/components/icon/icon-logout.component.mjs +15 -15
  201. package/esm2020/lib/components/icon/icon-medal.component.mjs +15 -15
  202. package/esm2020/lib/components/icon/icon-menu.component.mjs +15 -15
  203. package/esm2020/lib/components/icon/icon-money-cedule.component.mjs +15 -15
  204. package/esm2020/lib/components/icon/icon-money-hand.component.mjs +15 -15
  205. package/esm2020/lib/components/icon/icon-money-sign.component.mjs +15 -15
  206. package/esm2020/lib/components/icon/icon-money.component.mjs +15 -15
  207. package/esm2020/lib/components/icon/icon-more.component.mjs +15 -15
  208. package/esm2020/lib/components/icon/icon-new-company.component.mjs +15 -15
  209. package/esm2020/lib/components/icon/icon-offered.component.mjs +15 -15
  210. package/esm2020/lib/components/icon/icon-password.component.mjs +15 -15
  211. package/esm2020/lib/components/icon/icon-people.component.mjs +15 -15
  212. package/esm2020/lib/components/icon/icon-percent.component.mjs +15 -15
  213. package/esm2020/lib/components/icon/icon-person-document.component.mjs +15 -15
  214. package/esm2020/lib/components/icon/icon-person-sad.component.mjs +15 -15
  215. package/esm2020/lib/components/icon/icon-phone.component.mjs +15 -15
  216. package/esm2020/lib/components/icon/icon-pork.component.mjs +15 -15
  217. package/esm2020/lib/components/icon/icon-radio.component.mjs +15 -15
  218. package/esm2020/lib/components/icon/icon-refresh.component.mjs +15 -15
  219. package/esm2020/lib/components/icon/icon-repeat.component.mjs +15 -15
  220. package/esm2020/lib/components/icon/icon-search.component.mjs +15 -15
  221. package/esm2020/lib/components/icon/icon-second-warning.component.mjs +15 -15
  222. package/esm2020/lib/components/icon/icon-settings.component.mjs +15 -15
  223. package/esm2020/lib/components/icon/icon-shield-chekmark.component.mjs +15 -15
  224. package/esm2020/lib/components/icon/icon-star.component.mjs +15 -15
  225. package/esm2020/lib/components/icon/icon-today.component.mjs +15 -15
  226. package/esm2020/lib/components/icon/icon-trash.component.mjs +15 -15
  227. package/esm2020/lib/components/icon/icon-trophy.component.mjs +15 -15
  228. package/esm2020/lib/components/icon/icon-unfold-more.component.mjs +15 -15
  229. package/esm2020/lib/components/icon/icon-upload.component.mjs +15 -15
  230. package/esm2020/lib/components/icon/icon-user.component.mjs +15 -15
  231. package/esm2020/lib/components/icon/icon-waiting.component.mjs +15 -15
  232. package/esm2020/lib/components/icon/icon-wallet.component.mjs +15 -15
  233. package/esm2020/lib/components/icon/icon-warning.component.mjs +15 -15
  234. package/esm2020/lib/components/icon/icon.component.mjs +1328 -1302
  235. package/esm2020/lib/components/icon/icon.module.mjs +306 -300
  236. package/esm2020/lib/components/icon/index.mjs +96 -94
  237. package/esm2020/lib/components/image-crop/image-crop.component.mjs +516 -516
  238. package/esm2020/lib/components/image-crop/image-crop.module.mjs +41 -41
  239. package/esm2020/lib/components/image-crop/index.mjs +3 -3
  240. package/esm2020/lib/components/index.mjs +20 -20
  241. package/esm2020/lib/components/input/index.mjs +4 -4
  242. package/esm2020/lib/components/input/input-filter.component.mjs +286 -286
  243. package/esm2020/lib/components/input/input.component.mjs +384 -384
  244. package/esm2020/lib/components/input/input.module.mjs +38 -38
  245. package/esm2020/lib/components/input-phone/index.mjs +3 -3
  246. package/esm2020/lib/components/input-phone/input-phone.component.mjs +304 -304
  247. package/esm2020/lib/components/input-phone/input-phone.module.mjs +45 -45
  248. package/esm2020/lib/components/modal/index.mjs +3 -3
  249. package/esm2020/lib/components/modal/modal.component.mjs +236 -236
  250. package/esm2020/lib/components/modal/modal.module.mjs +21 -21
  251. package/esm2020/lib/components/option/index.mjs +3 -3
  252. package/esm2020/lib/components/option/option.component.mjs +131 -131
  253. package/esm2020/lib/components/option/option.module.mjs +29 -29
  254. package/esm2020/lib/components/radiobutton/index.mjs +3 -3
  255. package/esm2020/lib/components/radiobutton/radiobutton.component.mjs +165 -165
  256. package/esm2020/lib/components/radiobutton/radiobutton.module.mjs +36 -36
  257. package/esm2020/lib/components/select/index.mjs +6 -6
  258. package/esm2020/lib/components/select/select-filter.component.mjs +197 -197
  259. package/esm2020/lib/components/select/select-multiple.component.mjs +304 -304
  260. package/esm2020/lib/components/select/select-search.component.mjs +306 -306
  261. package/esm2020/lib/components/select/select.component.mjs +245 -245
  262. package/esm2020/lib/components/select/select.module.mjs +61 -61
  263. package/esm2020/lib/components/stepper/index.mjs +3 -3
  264. package/esm2020/lib/components/stepper/stepper.component.mjs +57 -57
  265. package/esm2020/lib/components/stepper/stepper.module.mjs +20 -20
  266. package/esm2020/lib/components/tab/index.mjs +2 -2
  267. package/esm2020/lib/components/tab/tab.component.mjs +91 -91
  268. package/esm2020/lib/components/tab/tab.module.mjs +20 -20
  269. package/esm2020/lib/components/table/index.mjs +4 -4
  270. package/esm2020/lib/components/table/table-column.component.mjs +34 -34
  271. package/esm2020/lib/components/table/table.component.mjs +267 -267
  272. package/esm2020/lib/components/table/table.module.mjs +23 -23
  273. package/esm2020/lib/components/toggle/index.mjs +2 -2
  274. package/esm2020/lib/components/toggle/toggle.component.mjs +56 -56
  275. package/esm2020/lib/components/toggle/toggle.module.mjs +18 -18
  276. package/esm2020/lib/components/wizard/index.mjs +3 -3
  277. package/esm2020/lib/components/wizard/wizard.component.mjs +61 -61
  278. package/esm2020/lib/components/wizard/wizard.module.mjs +33 -33
  279. package/esm2020/lib/core/index.mjs +4 -4
  280. package/esm2020/lib/core/interfaces/index.mjs +2 -2
  281. package/esm2020/lib/core/interfaces/monkey-modal-settings.mjs +1 -1
  282. package/esm2020/lib/core/interfaces/monkey-style-settings.mjs +2 -2
  283. package/esm2020/lib/core/services/index.mjs +4 -4
  284. package/esm2020/lib/core/services/modal/index.mjs +2 -2
  285. package/esm2020/lib/core/services/modal/monkey-style-guide-modal-fixed.service.mjs +51 -51
  286. package/esm2020/lib/core/services/modal/monkey-style-guide-modal.service.mjs +54 -54
  287. package/esm2020/lib/core/services/monkey-style-guide.service.mjs +17 -17
  288. package/esm2020/lib/core/services/settings/index.mjs +1 -1
  289. package/esm2020/lib/core/services/settings/monkey-style-guide-settings.service.mjs +41 -41
  290. package/esm2020/lib/core/services/settings/monkey-style-guide-theme-settings.service.mjs +80 -80
  291. package/esm2020/lib/core/services/snackbar/index.mjs +1 -1
  292. package/esm2020/lib/core/services/snackbar/mokey-style-guide-snackbar.service.mjs +226 -226
  293. package/esm2020/lib/core/utils/index.mjs +1 -1
  294. package/esm2020/lib/core/utils/utils.mjs +240 -240
  295. package/esm2020/lib/monkey-style-guide.module.mjs +31 -31
  296. package/esm2020/monkey-style-guide.mjs +4 -4
  297. package/esm2020/public-api.mjs +9 -9
  298. package/fesm2015/monkey-style-guide.mjs +8612 -8558
  299. package/fesm2015/monkey-style-guide.mjs.map +1 -1
  300. package/fesm2020/monkey-style-guide.mjs +8601 -8547
  301. package/fesm2020/monkey-style-guide.mjs.map +1 -1
  302. package/lib/components/badge/badge.component.d.ts +8 -8
  303. package/lib/components/badge/badge.module.d.ts +8 -8
  304. package/lib/components/badge/index.d.ts +2 -2
  305. package/lib/components/button/button-avatar.component.d.ts +19 -19
  306. package/lib/components/button/button-dropdown.component.d.ts +23 -23
  307. package/lib/components/button/button.component.d.ts +22 -22
  308. package/lib/components/button/button.module.d.ts +12 -12
  309. package/lib/components/button/index.d.ts +4 -4
  310. package/lib/components/checkbox/checkbox.component.d.ts +32 -32
  311. package/lib/components/checkbox/checkbox.module.d.ts +9 -9
  312. package/lib/components/checkbox/index.d.ts +2 -2
  313. package/lib/components/date-range-picker/date-range-picker.component.d.ts +69 -69
  314. package/lib/components/date-range-picker/date-range-picker.module.d.ts +11 -11
  315. package/lib/components/date-range-picker/index.d.ts +2 -2
  316. package/lib/components/expansion/expansion.component.d.ts +20 -20
  317. package/lib/components/expansion/expansion.module.d.ts +9 -9
  318. package/lib/components/expansion/index.d.ts +2 -2
  319. package/lib/components/file-upload/file-upload.component.d.ts +51 -51
  320. package/lib/components/file-upload/file-upload.module.d.ts +11 -11
  321. package/lib/components/file-upload/index.d.ts +2 -2
  322. package/lib/components/icon/icon-add-plus.component.d.ts +7 -0
  323. package/lib/components/icon/icon-arrow-down.component.d.ts +7 -7
  324. package/lib/components/icon/icon-arrow-left.component.d.ts +7 -7
  325. package/lib/components/icon/icon-arrow-line-right.component.d.ts +7 -7
  326. package/lib/components/icon/icon-arrow-right.component.d.ts +7 -7
  327. package/lib/components/icon/icon-arrow-up.component.d.ts +7 -7
  328. package/lib/components/icon/icon-arrows.component.d.ts +7 -7
  329. package/lib/components/icon/icon-auction.component.d.ts +7 -7
  330. package/lib/components/icon/icon-bank-account.component.d.ts +7 -7
  331. package/lib/components/icon/icon-bank.component.d.ts +7 -7
  332. package/lib/components/icon/icon-banknote-search.component.d.ts +7 -7
  333. package/lib/components/icon/icon-bell.component.d.ts +7 -7
  334. package/lib/components/icon/icon-book.component.d.ts +7 -7
  335. package/lib/components/icon/icon-box.component.d.ts +7 -7
  336. package/lib/components/icon/icon-build-person.component.d.ts +7 -7
  337. package/lib/components/icon/icon-calendar.component.d.ts +7 -7
  338. package/lib/components/icon/icon-camera.component.d.ts +7 -7
  339. package/lib/components/icon/icon-card-machine.component.d.ts +7 -7
  340. package/lib/components/icon/icon-card.component.d.ts +7 -7
  341. package/lib/components/icon/icon-cash-banknote-invoice.d.ts +7 -0
  342. package/lib/components/icon/icon-chat.component.d.ts +7 -7
  343. package/lib/components/icon/icon-check-circle-out.component.d.ts +7 -7
  344. package/lib/components/icon/icon-check-circle.component.d.ts +7 -7
  345. package/lib/components/icon/icon-check-grey.component.d.ts +7 -7
  346. package/lib/components/icon/icon-check-white.component.d.ts +7 -7
  347. package/lib/components/icon/icon-check.component.d.ts +7 -7
  348. package/lib/components/icon/icon-clipboard.component.d.ts +7 -7
  349. package/lib/components/icon/icon-clock.component.d.ts +7 -7
  350. package/lib/components/icon/icon-close.component.d.ts +7 -7
  351. package/lib/components/icon/icon-cnpj.component.d.ts +7 -7
  352. package/lib/components/icon/icon-codepen.component.d.ts +7 -7
  353. package/lib/components/icon/icon-company-name.component.d.ts +7 -7
  354. package/lib/components/icon/icon-contract-pen.component.d.ts +7 -7
  355. package/lib/components/icon/icon-contract.component.d.ts +7 -7
  356. package/lib/components/icon/icon-delete.component.d.ts +7 -7
  357. package/lib/components/icon/icon-document.component.d.ts +7 -7
  358. package/lib/components/icon/icon-dollar-sign-circle.component.d.ts +7 -7
  359. package/lib/components/icon/icon-dollar-sign.component.d.ts +7 -7
  360. package/lib/components/icon/icon-domain.component.d.ts +7 -7
  361. package/lib/components/icon/icon-dots-menu.component.d.ts +7 -7
  362. package/lib/components/icon/icon-double-arrow-left.component.d.ts +7 -7
  363. package/lib/components/icon/icon-double-arrow-right.component.d.ts +7 -7
  364. package/lib/components/icon/icon-download.component.d.ts +7 -7
  365. package/lib/components/icon/icon-edit-square.component.d.ts +7 -7
  366. package/lib/components/icon/icon-edit.component.d.ts +7 -7
  367. package/lib/components/icon/icon-email.component.d.ts +7 -7
  368. package/lib/components/icon/icon-empty-doc.component.d.ts +7 -7
  369. package/lib/components/icon/icon-error.component.d.ts +7 -7
  370. package/lib/components/icon/icon-eye-closed.component.d.ts +7 -7
  371. package/lib/components/icon/icon-eye-open.component.d.ts +7 -7
  372. package/lib/components/icon/icon-filter.component.d.ts +7 -7
  373. package/lib/components/icon/icon-grid.component.d.ts +7 -7
  374. package/lib/components/icon/icon-help.component.d.ts +7 -7
  375. package/lib/components/icon/icon-hexagon.component.d.ts +7 -7
  376. package/lib/components/icon/icon-home.component.d.ts +7 -7
  377. package/lib/components/icon/icon-image.component.d.ts +7 -7
  378. package/lib/components/icon/icon-info.component.d.ts +7 -7
  379. package/lib/components/icon/icon-invoice.component.d.ts +7 -7
  380. package/lib/components/icon/icon-list.component.d.ts +7 -7
  381. package/lib/components/icon/icon-location-pin.component.d.ts +7 -7
  382. package/lib/components/icon/icon-login.component.d.ts +7 -7
  383. package/lib/components/icon/icon-logout.component.d.ts +7 -7
  384. package/lib/components/icon/icon-medal.component.d.ts +7 -7
  385. package/lib/components/icon/icon-menu.component.d.ts +7 -7
  386. package/lib/components/icon/icon-money-cedule.component.d.ts +7 -7
  387. package/lib/components/icon/icon-money-hand.component.d.ts +7 -7
  388. package/lib/components/icon/icon-money-sign.component.d.ts +7 -7
  389. package/lib/components/icon/icon-money.component.d.ts +7 -7
  390. package/lib/components/icon/icon-more.component.d.ts +7 -7
  391. package/lib/components/icon/icon-new-company.component.d.ts +7 -7
  392. package/lib/components/icon/icon-offered.component.d.ts +7 -7
  393. package/lib/components/icon/icon-password.component.d.ts +7 -7
  394. package/lib/components/icon/icon-people.component.d.ts +7 -7
  395. package/lib/components/icon/icon-percent.component.d.ts +7 -7
  396. package/lib/components/icon/icon-person-document.component.d.ts +7 -7
  397. package/lib/components/icon/icon-person-sad.component.d.ts +7 -7
  398. package/lib/components/icon/icon-phone.component.d.ts +7 -7
  399. package/lib/components/icon/icon-pork.component.d.ts +7 -7
  400. package/lib/components/icon/icon-radio.component.d.ts +7 -7
  401. package/lib/components/icon/icon-refresh.component.d.ts +7 -7
  402. package/lib/components/icon/icon-repeat.component.d.ts +7 -7
  403. package/lib/components/icon/icon-search.component.d.ts +7 -7
  404. package/lib/components/icon/icon-second-warning.component.d.ts +7 -7
  405. package/lib/components/icon/icon-settings.component.d.ts +7 -7
  406. package/lib/components/icon/icon-shield-chekmark.component.d.ts +7 -7
  407. package/lib/components/icon/icon-star.component.d.ts +7 -7
  408. package/lib/components/icon/icon-today.component.d.ts +7 -7
  409. package/lib/components/icon/icon-trash.component.d.ts +7 -7
  410. package/lib/components/icon/icon-trophy.component.d.ts +7 -7
  411. package/lib/components/icon/icon-unfold-more.component.d.ts +7 -7
  412. package/lib/components/icon/icon-upload.component.d.ts +7 -7
  413. package/lib/components/icon/icon-user.component.d.ts +7 -7
  414. package/lib/components/icon/icon-waiting.component.d.ts +7 -7
  415. package/lib/components/icon/icon-wallet.component.d.ts +7 -7
  416. package/lib/components/icon/icon-warning.component.d.ts +7 -7
  417. package/lib/components/icon/icon.component.d.ts +27 -27
  418. package/lib/components/icon/icon.module.d.ts +103 -101
  419. package/lib/components/icon/index.d.ts +95 -93
  420. package/lib/components/image-crop/image-crop.component.d.ts +77 -77
  421. package/lib/components/image-crop/image-crop.module.d.ts +12 -12
  422. package/lib/components/image-crop/index.d.ts +2 -2
  423. package/lib/components/index.d.ts +19 -19
  424. package/lib/components/input/index.d.ts +3 -3
  425. package/lib/components/input/input-filter.component.d.ts +55 -55
  426. package/lib/components/input/input.component.d.ts +64 -64
  427. package/lib/components/input/input.module.d.ts +12 -12
  428. package/lib/components/input-phone/index.d.ts +2 -2
  429. package/lib/components/input-phone/input-phone.component.d.ts +62 -62
  430. package/lib/components/input-phone/input-phone.module.d.ts +13 -13
  431. package/lib/components/modal/index.d.ts +2 -2
  432. package/lib/components/modal/modal.component.d.ts +24 -24
  433. package/lib/components/modal/modal.module.d.ts +10 -10
  434. package/lib/components/option/index.d.ts +2 -2
  435. package/lib/components/option/option.component.d.ts +22 -22
  436. package/lib/components/option/option.module.d.ts +8 -8
  437. package/lib/components/radiobutton/index.d.ts +2 -2
  438. package/lib/components/radiobutton/radiobutton.component.d.ts +39 -39
  439. package/lib/components/radiobutton/radiobutton.module.d.ts +9 -9
  440. package/lib/components/select/index.d.ts +5 -5
  441. package/lib/components/select/select-filter.component.d.ts +41 -41
  442. package/lib/components/select/select-multiple.component.d.ts +48 -48
  443. package/lib/components/select/select-search.component.d.ts +56 -56
  444. package/lib/components/select/select.component.d.ts +48 -48
  445. package/lib/components/select/select.module.d.ts +15 -15
  446. package/lib/components/stepper/index.d.ts +2 -2
  447. package/lib/components/stepper/stepper.component.d.ts +18 -18
  448. package/lib/components/stepper/stepper.module.d.ts +9 -9
  449. package/lib/components/tab/index.d.ts +2 -2
  450. package/lib/components/tab/tab.component.d.ts +24 -24
  451. package/lib/components/tab/tab.module.d.ts +10 -10
  452. package/lib/components/table/index.d.ts +3 -3
  453. package/lib/components/table/table-column.component.d.ts +5 -5
  454. package/lib/components/table/table.component.d.ts +59 -59
  455. package/lib/components/table/table.module.d.ts +12 -12
  456. package/lib/components/toggle/index.d.ts +2 -2
  457. package/lib/components/toggle/toggle.component.d.ts +18 -18
  458. package/lib/components/toggle/toggle.module.d.ts +8 -8
  459. package/lib/components/wizard/index.d.ts +2 -2
  460. package/lib/components/wizard/wizard.component.d.ts +18 -18
  461. package/lib/components/wizard/wizard.module.d.ts +9 -9
  462. package/lib/core/index.d.ts +3 -3
  463. package/lib/core/interfaces/index.d.ts +2 -2
  464. package/lib/core/interfaces/monkey-modal-settings.d.ts +58 -58
  465. package/lib/core/interfaces/monkey-style-settings.d.ts +59 -59
  466. package/lib/core/services/index.d.ts +3 -3
  467. package/lib/core/services/modal/index.d.ts +2 -2
  468. package/lib/core/services/modal/monkey-style-guide-modal-fixed.service.d.ts +16 -16
  469. package/lib/core/services/modal/monkey-style-guide-modal.service.d.ts +18 -18
  470. package/lib/core/services/monkey-style-guide.service.d.ts +10 -10
  471. package/lib/core/services/settings/index.d.ts +1 -1
  472. package/lib/core/services/settings/monkey-style-guide-settings.service.d.ts +15 -15
  473. package/lib/core/services/settings/monkey-style-guide-theme-settings.service.d.ts +12 -12
  474. package/lib/core/services/snackbar/index.d.ts +1 -1
  475. package/lib/core/services/snackbar/mokey-style-guide-snackbar.service.d.ts +58 -58
  476. package/lib/core/utils/index.d.ts +1 -1
  477. package/lib/core/utils/utils.d.ts +29 -29
  478. package/lib/monkey-style-guide.module.d.ts +8 -8
  479. package/monkey-style-guide-2.0.153.tgz +0 -0
  480. package/monkey-style-guide.d.ts +5 -5
  481. package/package.json +1 -1
  482. package/public-api.d.ts +8 -8
  483. package/monkey-style-guide-2.0.152.tgz +0 -0
package/README.md CHANGED
@@ -1,1237 +1,1239 @@
1
- [![Contributors][contributors-shield]][contributors-url]
2
- [![MIT License][license-shield]][license-url]
3
- [![LinkedIn][linkedin-shield]][linkedin-url]
4
-
5
- <br />
6
- <p align="center">
7
- <a href="https:monkey.exchange">
8
- <img src="https://dev-monkey-emails.s3-us-west-2.amazonaws.com/monkey-style-guide/demos/images/logo.png" alt="Monkey Logo" width="80" height="80">
9
- </a>
10
- <h3 align="center">Monkey Style Guide</h3>
11
- <p align="center">
12
- An style guide template to boost your projects.
13
- <br />
14
- <br />
15
- <a href="https://www.monkey.exchange/who-we-are.html">Who We Are?</a>
16
- </p>
17
- </p>
18
-
19
- ## About The Project
20
-
21
- This project was defined to be the main guide to styles, colors and html components of the entire ecosystem of Monkey Exchange systems.
22
-
23
- This style guide contains a concept to work with a range of different colors, making possible to create beautiful and useful html components.
24
-
25
- ## Components
26
-
27
- All components was developed to work with angular reactive forms, so we need to define a formGroup and set the formControlName, and the components will do the rest of the job to fill all fields properly.
28
- First developed on Angular 10, this color guide contains the following components:
29
-
30
- ---
31
-
32
- ### **Badge**
33
-
34
- ![Badge Demo Screen Shot][badge-screenshot]
35
-
36
- Parameters:
37
-
38
- - **count** (string) is used to define the content of badge.
39
- - **pulseOn** (boolean)(default: false) is used to define if badge has to pulse like a bell.
40
-
41
- Example:
42
-
43
- `example.module.ts`
44
-
45
- ```Typescript
46
- import { MonkeyBadgeModule } from 'monkey-style-guide';
47
-
48
- ...
49
-
50
- @NgModule({
51
- imports: [MonkeyBadgeModule]
52
- })
53
- ...
54
- ```
55
-
56
- `example.component.html`
57
-
58
- ```HTML
59
- <monkey-badge count="3" [pulseOn]="true"></monkey-badge>
60
- ```
61
-
62
- ---
63
-
64
- ### **Button**
65
-
66
- ![Button Demo Screen Shot][buttons-screenshot]
67
-
68
- Parameters:
69
-
70
- - **color** (string) can be _theme_, _error_, _warning_ or _success_
71
- - **disabled** (boolean)(default: false) to disable any action
72
- - **icon** (optional)(string) define the icon for button
73
- - **iconPoition** (string)(default: 'left') define the icon position. Can be _left_ or _right_
74
- - **label** (string) define the label that will be displayed inside the button
75
- - **type** (string) can be _primary_, _secondary_, _tertiary_
76
-
77
- Example:
78
-
79
- `example.module.ts`
80
-
81
- ```Typescript
82
- import { MonkeyButtonModule } from 'monkey-style-guide';
83
-
84
- ...
85
-
86
- @NgModule({
87
- imports: [MonkeyButtonModule]
88
- })
89
- ...
90
- ```
91
-
92
- `example.component.html`
93
-
94
- ```HTML
95
- <monkey-button color="theme" label="Primary" type="primary"></monkey-button>
96
- <monkey-button color="error" label="Secondary" type="secondary"></monkey-button>
97
- <monkey-button color="warning" label="Tertiary" type="tertiary"></monkey-button>
98
- ```
99
-
100
- ---
101
-
102
- There are other variations with buttons:
103
-
104
- ### **Button Avatar**
105
-
106
- ![Button Avatar Demo Screen Shot][button-avatar-screenshot]
107
-
108
- Parameters:
109
-
110
- - **label** (string) define the label that will be displayed inside the button
111
- - **size** (string) define the size of the button
112
- - **type** (string) can be _theme_, _theme-100_ or _none_
113
-
114
- Example:
115
-
116
- `example.component.html`
117
-
118
- ```HTML
119
- <monkey-button-avatar label="Amilson" size="sm" type="theme"></monkey-button-avatar>
120
- ```
121
-
122
- ### **Button Dropdown**
123
-
124
- ![Button Dropdown Demo Screen Shot][button-dropdown-screenshot1]
125
-
126
- ![Button Dropdown Demo Screen Shot][button-dropdown-screenshot2]
127
-
128
- Parameters:
129
-
130
- - **label** (ng-template) the label that will be displayed inside the button. For this particular component, label has be a ng-template.
131
- - **listenClicks** (boolean)(default: true) can be used to define if the dropdown will be closed with clicks inside
132
- - **type** (string)(default: 'filled') can be _unfilled_ or _filled_
133
-
134
- Example:
135
-
136
- `example.component.html`
137
-
138
- ```HTML
139
- <monkey-button-dropdown [label]="profileButton">
140
- <div class="mt-2">
141
- <monkey-button
142
- color="theme"
143
- label="Profile"
144
- type="tertiary"
145
- [routerLink]="'/app/user/profile/edit'"
146
- >
147
- </monkey-button>
148
- </div>
149
- <div class="mt-2">
150
- <monkey-button color="theme" label="Logout" type="tertiary"></monkey-button>
151
- </div>
152
- </monkey-button-dropdown>
153
-
154
- <ng-template #profileButton>
155
- <monkey-button-avatar label="Monkey" size="sm" type="theme"></monkey-button-avatar>
156
- </ng-template>
157
- ```
158
-
159
- ---
160
-
161
- ### **Checkbox**
162
-
163
- ![Checkbox Demo Screen Shot][checkbox-screenshot]
164
-
165
- Parameters:
166
-
167
- - **description** (optional)(string) description to be displayed by side of the checkbox
168
- - **errorMessage** (string) message to alert user
169
- - **helperMessage** (optional)(string) can be used with type single, for formfield purpose
170
- - **infoMessage** (optional)(string) message to help user knows about this component purpose
171
- - **label** (string) define the label that will be displayed inside
172
- - **type** (string)(default: 'single') can be _single_ or _multiple_. Will be used to render checkbox with formfield body or not.
173
-
174
- Events:
175
-
176
- - **onChange** event emited when user make changes
177
-
178
- Example:
179
-
180
- `example.module.ts`
181
-
182
- ```Typescript
183
- import { MonkeyCheckboxModule } from 'monkey-style-guide';
184
-
185
- ...
186
-
187
- @NgModule({
188
- imports: [MonkeyCheckboxModule]
189
- })
190
- ...
191
- ```
192
-
193
- `example.component.html`
194
-
195
- ```HTML
196
- <monkey-checkbox
197
- description="I Agree to Terms"
198
- errorMessage="Validation Message"
199
- formControlName="terms"
200
- helperMessage="Mandatory"
201
- infoMessage="Info message"
202
- label="Terms and Conditions"
203
- type="single">
204
- </monkey-checkbox>
205
- ```
206
-
207
- ---
208
-
209
- ### **Date Range Picker**
210
-
211
- ![Date Range Picker Demo Screen Shot][date-range-picker]
212
-
213
- Parameters:
214
-
215
- - **errorMessage** (string) message to alert user
216
- - **helperMessage** (optional)(string) can be used with type single, for formfield purpose
217
- - **infoMessage** (optional)(string) message to help user knows about this component purpose
218
- - **label** (string) define the label that will be displayed inside
219
- - **i18n** (Object) an i18n object (see example)
220
-
221
- Events:
222
-
223
- - **onChange** event emited when user select a range of dates or when clicked on some action
224
-
225
- Example:
226
-
227
- `example.module.ts`
228
-
229
- ```Typescript
230
- import { MonkeyDateRangePicker } from 'monkey-style-guide';
231
-
232
- ...
233
-
234
- @NgModule({
235
- imports: [MonkeyDateRangePicker]
236
- })
237
- ...
238
- ```
239
-
240
- `example.component.html`
241
-
242
- ```HTML
243
- <monkey-date-range-picker
244
- errorMessage="Error Message"
245
- helperMessage="Helper Message"
246
- infoMessage="Info Message"
247
- label="Label"
248
- [i18n]="i18n">
249
- </monkey-date-range-picker>
250
- ```
251
-
252
- `example.component.ts`
253
-
254
- ```Typescript
255
- ...
256
- i18n = {
257
- months: {
258
- '1': 'January',
259
- '2': 'Febuary',
260
- '3': 'March',
261
- '4': 'April',
262
- '5': 'May',
263
- '6': 'June',
264
- '7': 'July',
265
- '8': 'August',
266
- '9': 'September',
267
- '10': 'October',
268
- '11': 'November',
269
- '12': 'December'
270
- },
271
- days: {
272
- '1': 'Sun.',
273
- '2': 'Mon.',
274
- '3': 'Tue.',
275
- '4': 'Wed.',
276
- '5': 'Thu.',
277
- '6': 'Fri.',
278
- '7': 'Sat.'
279
- },
280
- actions: {
281
- '30': '30 days',
282
- '60': '60 days',
283
- '90': '90 days'
284
- },
285
- today: 'Today'
286
- };
287
- ...
288
- ```
289
-
290
- ---
291
-
292
- ### **Expansion**
293
-
294
- ![Expansion Demo Screen Shot][expansion-screenshot1]
295
-
296
- ![Expansion Demo Screen Shot][expansion-screenshot2]
297
-
298
- Parameters:
299
-
300
- - **color** (string) can be _theme_, _error_, _warning_ or _success_
301
- - **disabled** (boolean)(default: false) to disable any action
302
- - **helperMessage** (optional)(string) can be used with type single, for formfield purpose
303
- - **label** (string) define the label that will be displayed inside
304
- - **open** (boolean)(default: false) make expansion open or not
305
-
306
- Events:
307
-
308
- - **onChange** event emited when user make changes
309
-
310
- Example:
311
-
312
- `example.module.ts`
313
-
314
- ```Typescript
315
- import { MonkeyExpansionModule } from 'monkey-style-guide';
316
-
317
- ...
318
-
319
- @NgModule({
320
- imports: [MonkeyExpansionModule]
321
- })
322
- ...
323
- ```
324
-
325
- `example.component.html`
326
-
327
- ```HTML
328
- <monkey-expansion
329
- color="theme"
330
- label="Expansion"
331
- [helperMessage]="'helperMessage'"
332
- >
333
- <div>Content 1</div>
334
- <div>Content 2</div>
335
- </monkey-expansion>
336
- ```
337
-
338
- ---
339
-
340
- ### **File Upload**
341
-
342
- ![File Upload Demo Screen Shot][file-upload-screenshot1]
343
-
344
- Parameters:
345
-
346
- - **allowedExtensions** (array of string) for example ['.jpg', '.jpeg', '.png']
347
- - **allowedExtensionErrorMessage** (string) message to be displayed if the file extension is wrong
348
- - **errorMessage** (string) message to alert user
349
- - **fileUpload** (function) function to be used to upload file
350
- - **helperMessage** (optional)(string) message to help user to know what to do
351
- - **infoMessage** (optional)(string) required message
352
- - **label** (string) define the label that will be displayed inside
353
- - **listenFiles** (boolean)(default: false) if true, emit event to onHandleFilesReady with the selected file
354
- - **maxSize** (number) max file size in kbytes (1 \* 1024 \* 1024)
355
- - **maxSizeErrorMessage** (string) message to be displayed if the file size is wrong
356
- - **name** (string) name to identify the input
357
- - **placeholder** (optional)(string) message to help user that will be displayed inside the input
358
- - **uploadOngoingMessage** (string) message to be used when upload starts
359
-
360
- Events:
361
-
362
- - **onChange** event emited when user make changes
363
- - **onHandleFilesReady** event emited when listenFiled is true
364
-
365
- Example:
366
-
367
- `example.module.ts`
368
-
369
- ```Typescript
370
- import { MonkeyFileUploadModule } from 'monkey-style-guide';
371
-
372
- ...
373
-
374
- @NgModule({
375
- imports: [MonkeyFileUploadModule]
376
- })
377
- ...
378
- ```
379
-
380
- `example.component.ts`
381
-
382
- ```Typescript
383
- ...
384
-
385
- uploadFunction: Function = (file: any, callback?: Function) => {
386
- this.uploadService.uploadFile(file, callback);
387
- };
388
-
389
- service.uploadFile(file: File, callback?: Function) {
390
- const { httpClient, headers } = this;
391
- const formData = new FormData();
392
- formData.append('file', file);
393
-
394
- httpClient.post<any>('endpoint/upload', formData, {
395
- headers,
396
- reportProgress: true,
397
- observe: 'events'
398
- }).subscribe((event: any) => {
399
- const { loaded, total, body } = event;
400
- switch (event.type) {
401
- case HttpEventType.UploadProgress:
402
- const progress = Math.round((loaded / total * 100));
403
- if (callback) callback(progress);
404
- break;
405
- case HttpEventType.Response:
406
- const { filename, _links: { file: { href } } } = body;
407
- if (callback) {
408
- callback(null, {
409
- fileName: filename,
410
- url: href
411
- }, null);
412
- }
413
- break;
414
- default:
415
- break;
416
- }
417
- }, (err: HttpErrorResponse) => {
418
- const { error } = err;
419
- callback(null, error?.notifications?.join(''));
420
- });
421
- }
422
- ```
423
-
424
- `example.component.html`
425
-
426
- ```HTML
427
- <monkey-file-upload
428
- allowedExtensionErrorMessage="Extension not allowed"
429
- icon="upload-20"
430
- label="upload"
431
- maxSize="5242880"
432
- maxSizeErrorMessage="Max file size is 5mb"
433
- placeholder="Add File"
434
- [fileUpload]="uploadFunction"
435
- ></monkey-file-upload>
436
- ```
437
-
438
- ---
439
-
440
- ### **Icon**
441
-
442
- ![Icons Demo Screen Shot][icons-screenshot1]
443
-
444
- Parameters:
445
-
446
- - **color** (string) define color. Can be _theme_ or _#ffffff_ (hex value)
447
- - **icon** (string) icon name and size separeted by hyfhen
448
-
449
- Icons Options:
450
-
451
- - **arrow-down**
452
- - **arrow-left**
453
- - **arrow-right**
454
- - **arrow-up**
455
- - **arrow-line-right**
456
- - **arrows**
457
- - **auction**
458
- - **bank-account**
459
- - **bank**
460
- - **banknote-search**
461
- - **bell**
462
- - **book**
463
- - **box**
464
- - **build-person**
465
- - **calendar**
466
- - **camera**
467
- - **card**
468
- - **card-machine**
469
- - **chat**
470
- - **check-circle-out**
471
- - **check-circle**
472
- - **check-grey**
473
- - **check-white**
474
- - **check**
475
- - **clipboard**
476
- - **clock**
477
- - **close**
478
- - **cnpj**
479
- - **codepen**
480
- - **company-name**
481
- - **contract-pen**
482
- - **contract**
483
- - **delete**
484
- - **document**
485
- - **dollar-sign-circle**
486
- - **dollar-sign**
487
- - **domain**
488
- - **dots-menu**
489
- - **double-arrow-left**
490
- - **double-arrow-right**
491
- - **download**
492
- - **edit-square**
493
- - **edit**
494
- - **email**
495
- - **empty-doc**
496
- - **error**
497
- - **eye-closed**
498
- - **eye-open**
499
- - **filter**
500
- - **grid**
501
- - **help**
502
- - **hexagon**
503
- - **home**
504
- - **info**
505
- - **invoice**
506
- - **image**
507
- - **list**
508
- - **location-pin**
509
- - **login**
510
- - **logout**
511
- - **medal**
512
- - **menu**
513
- - **money-cedule**
514
- - **money-hand**
515
- - **money-sign**
516
- - **money**
517
- - **more**
518
- - **new-company**
519
- - **offered**
520
- - **password**
521
- - **people**
522
- - **percent**
523
- - **person-document**
524
- - **person-sad**
525
- - **phone**
526
- - **pork**
527
- - **radio**
528
- - **refresh**
529
- - **repeat**
530
- - **search**
531
- - **second-warning**
532
- - **settings**
533
- - **shield-chekmark**
534
- - **star**
535
- - **today**
536
- - **trash**
537
- - **trophy**
538
- - **unfold-more**
539
- - **upload**
540
- - **user**
541
- - **wallet**
542
- - **warning**
543
-
544
- Example:
545
-
546
- `example.module.ts`
547
-
548
- ```Typescript
549
- import { MonkeyIconModule } from 'monkey-style-guide';
550
-
551
- ...
552
-
553
- @NgModule({
554
- imports: [MonkeyIconModule]
555
- })
556
- ...
557
- ```
558
-
559
- `example.component.html`
560
-
561
- ```HTML
562
- <monkey-icon color="#000000" icon="password-16"></monkey-icon>
563
- ```
564
-
565
- ---
566
-
567
- ### **Input**
568
-
569
- ![Input Demo Screen Shot][input-screenshot]
570
-
571
- Parameters:
572
-
573
- - **capitalize** (optional)(boolean) makes the value capitalcase
574
- - **currency** (optional)(boolean) transforms the input in currency input
575
- - **errorMessage** (string) message to alert user
576
- - **helperMessage** (optional)(string) message to help user to know what to do
577
- - **icon** (optional)(string) icon name and size separeted by hyfhen
578
- - **infoMessage** (optional)(string) message to help user knows about this component purpose
579
- - **label** (string) define the label that will be displayed inside
580
- - **lowerCase** (optional)(boolean) makes the value lowercase
581
- - **mask** (optional)(string) mask pattern to mask the input
582
- - **maxLength** (optional)(number) max 255
583
- - **name** (optional)(string) name to identify the input
584
- - **onlyNumber** (optional)(boolean) makes the input accept only number
585
- - **onlyAlphaNumeric** (optional)(boolean) makes the input accept only alphanumeric characters
586
- - **placeholder** (optional)(string) message to help user that will be displayed inside the input
587
- - **prefix** (optional)(string) prefix value for input
588
- - **type** (string) can be _text_ or _password_
589
- - **upperCase** (optional)(boolean) makes the value uppercase
590
-
591
- Events:
592
-
593
- - **onChange** event emited when user make changes
594
-
595
- Example:
596
-
597
- `example.module.ts`
598
-
599
- ```Typescript
600
- import { MonkeyInputModule } from 'monkey-style-guide';
601
-
602
- ...
603
-
604
- @NgModule({
605
- imports: [MonkeyInputModule]
606
- })
607
- ...
608
- ```
609
-
610
- `example.component.html`
611
-
612
- ```HTML
613
- <monkey-input
614
- errorMessage="Validation Message"
615
- formControlName="name"
616
- helperMessage="Mandatory"
617
- icon="user-20"
618
- infoMessage="Info message"
619
- label="Name"
620
- placeholder="Input your full name">
621
- </monkey-input>
622
- ```
623
-
624
- ---
625
-
626
- ### **Input Filter**
627
-
628
- ![Input Filter Demo Screen Shot][input-filter-screenshot]
629
-
630
- Parameters:
631
-
632
- - **helperMessage** (optional)(string) message to help user to know what to do
633
- - **icon** (optional)(string) icon name and size separeted by hyfhen
634
- - **infoMessage** (optional)(string) message to help user knows about this component purpose
635
- - **label** (string) define the label that will be displayed inside
636
- - **maxLength** (optional)(number) max 255
637
- - **name** (optional)(string) name to identify the input
638
- - **placeholder** (optional)(string) message to help user that will be displayed inside the input
639
-
640
- Events:
641
-
642
- - **onChange** event emited when user make changes
643
-
644
- Example:
645
-
646
- `example.module.ts`
647
-
648
- ```Typescript
649
- import { MonkeyInputModule } from 'monkey-style-guide';
650
-
651
- ...
652
-
653
- @NgModule({
654
- imports: [MonkeyInputModule]
655
- })
656
- ...
657
- ```
658
-
659
- `example.component.html`
660
-
661
- ```HTML
662
- <monkey-input-filter
663
- formControlName="name"
664
- helperMessage="Mandatory"
665
- icon="user-20"
666
- infoMessage="Info message"
667
- label="Name"
668
- placeholder="Input your full name">
669
- </monkey-input-filter>
670
- ```
671
-
672
- ---
673
-
674
- ### **Modal**
675
-
676
- ![Modal Demo Screen Shot][modal-screenshot]
677
-
678
- Parameters:
679
-
680
- - **config** (MonkeyModalConfig) the configuration of modal
681
- - **modalRef** (MonkeyModalRefs) the modal reference
682
- - **onHandleConfirm** (EventEmitter) will emit and event when you click confirm
683
-
684
- Example:
685
-
686
- `example.module.ts`
687
-
688
- ```Typescript
689
- import {
690
- MonkeyModalModule,
691
- MonkeyStyleGuideModalService
692
- } from 'monkey-style-guide';
693
-
694
- ...
695
-
696
- @NgModule({
697
- imports: [MonkeyModalModule],
698
- providers: [MonkeyStyleGuideModalService]
699
- })
700
- ...
701
- ```
702
-
703
- `parent.component.ts`
704
-
705
- ```Typescript
706
- ...
707
- import { MonkeyStyleGuideModalService } from 'monkey-style-guide';
708
- import { ModalComponent } from './modal/modal.component';
709
-
710
- ...
711
-
712
- constructor(private modalService: MonkeyStyleGuideModalService) {}
713
-
714
- openModal() {
715
- this.modalService.open(ModalComponent, {
716
- color: 'theme',
717
- size: 'md',
718
- action: {
719
- cancel: {
720
- actionColor: 'theme',
721
- actionType: 'tertiary',
722
- label: 'Cancel',
723
- },
724
- confirm: {
725
- actionColor: 'theme',
726
- actionType: 'primary',
727
- label: 'Confirm',
728
- },
729
- },
730
- });
731
- }
732
- ```
733
-
734
- `modal.component.ts`
735
-
736
- ```Typescript
737
- import { Component, EventEmitter, Input } from '@angular/core';
738
- import {
739
- MonkeyModalConfig,
740
- MonkeyModalRefs,
741
- MonkeyStyleGuideModalService
742
- } from 'monkey-style-guide';
743
-
744
- @Component({
745
- selector: 'mk-modal',
746
- template: `
747
- <monkey-modal
748
- [config]="config"
749
- [modalRef]="modalRef"
750
- [onHandleConfirm]="onHandleConfirm"
751
- >
752
- <div style="align-items: center; display: flex; justify-content: center;">
753
- <img
754
- src="https://dev-monkey-emails.s3-us-west-2.amazonaws.com/monkey-style-guide/demos/images/logo.png"
755
- />
756
- </div>
757
- </monkey-modal>
758
- `,
759
- })
760
- export class ModalComponent {
761
- @Input() config: MonkeyModalConfig;
762
- @Input() modalRef: MonkeyModalRefs<this>;
763
- @Input() onHandleConfirm = new EventEmitter<any>();
764
-
765
- constructor(private modalService: MonkeyStyleGuideModalService) {
766
- this.onHandleConfirm.subscribe(() => {
767
- console.log('Confirm clicked!');
768
-
769
- this.modalService.closeAll();
770
- });
771
- }
772
- }
773
- ```
774
-
775
- In case you need the logic in your parent component you can simply pass the `action` key to `MonkeyModalConfig` and remove `onHandleConfirm` of your modal component like this:
776
-
777
- ```Typescript
778
- ...
779
-
780
- openModal() {
781
- this.modalService.open(ModalComponent, {
782
- color: 'theme',
783
- size: 'md',
784
- action: {
785
- cancel: {
786
- actionColor: 'theme',
787
- actionType: 'tertiary',
788
- label: 'Cancel',
789
- },
790
- confirm: {
791
- action: () => {
792
- console.log('Modal closed!');
793
- },
794
- actionColor: 'theme',
795
- actionType: 'primary',
796
- label: 'Confirm',
797
- },
798
- },
799
- });
800
- }
801
- ```
802
-
803
- ```Typescript
804
- ...
805
-
806
- export class ModalComponent {
807
- @Input() config: MonkeyModalConfig;
808
- @Input() modalRef: MonkeyModalRefs<this>;
809
-
810
- constructor() {}
811
- }
812
- ```
813
-
814
- ---
815
-
816
- ### **Radiobutton**
817
-
818
- ![Radiobutton Demo Screen Shot][radiobutton-screenshot]
819
-
820
- Parameters:
821
-
822
- - **errorMessage** (string) message to alert user
823
- - **helperMessage** (optional)(string) message to help user to know what to do
824
- - **infoMessage** (optional)(string) message to help user knows about this component purpose
825
- - **label** (string) define the label that will be displayed inside
826
- - **placeholder** (optional)(string) message to help user that will be displayed inside the input
827
-
828
- Events:
829
-
830
- - **onChange** event emited when user make changes
831
-
832
- Example:
833
-
834
- `example.module.ts`
835
-
836
- ```Typescript
837
- import { MonkeyRadioButtonModule } from 'monkey-style-guide';
838
-
839
- ...
840
-
841
- @NgModule({
842
- imports: [MonkeyRadioButtonModule]
843
- })
844
- ...
845
- ```
846
-
847
- `example.component.html`
848
-
849
- ```HTML
850
- <monkey-radiobutton
851
- formControlName="gender"
852
- label="Gender"
853
- helperMessage="Mandatory"
854
- icon="help-20"
855
- infoMessage="Info message"
856
- errorMessage="Validation message"
857
- >
858
- <monkey-option label="Female" value="female"></monkey-option>
859
- <monkey-option label="Male" value="male"></monkey-option>
860
- <monkey-option label="I prefer not to choose" value="not_choose"></monkey-option>
861
- </monkey-radiobutton>
862
- ```
863
-
864
- ---
865
-
866
- ### **Select**
867
-
868
- ![Select Demo Screen Shot][select-screenshot]
869
-
870
- Parameters:
871
-
872
- - **errorMessage** (string) message to alert user
873
- - **helperMessage** (optional)(string) message to help user to know what to do
874
- - **icon** (optional)(string) icon name and size separeted by hyfhen
875
- - **infoMessage** (optional)(string) message to help user knows about this component purpose
876
- - **label** (string) define the label that will be displayed inside
877
- - **placeholder** (optional)(string) message to help user that will be displayed inside the input
878
-
879
- Events:
880
-
881
- - **onChange** event emited when user make changes
882
-
883
- Example:
884
-
885
- `example.module.ts`
886
-
887
- ```Typescript
888
- import {
889
- MonkeyOptionModule,
890
- MonkeySelectModule
891
- } from 'monkey-style-guide';
892
-
893
- ...
894
-
895
- @NgModule({
896
- imports: [
897
- MonkeyOptionModule,
898
- MonkeySelectModule
899
- ]
900
- })
901
- ...
902
- ```
903
-
904
- `example.component.html`
905
-
906
- ```HTML
907
- <monkey-select
908
- errorMessage="Validation Message"
909
- formControlName="documentType"
910
- helperMessage="Mandatory"
911
- icon="upload-20"
912
- infoMessage="Info message"
913
- label="Select the document type to upload"
914
- >
915
- <monkey-option label="Personal Document" value="personal_document">
916
- </monkey-option>
917
- <monkey-option label="Social Contract" value="social_contract">
918
- </monkey-option>
919
- <monkey-option label="Procuraction Contract" value="procuration_contract">
920
- </monkey-option>
921
- </monkey-select>
922
- ```
923
-
924
- ---
925
-
926
- ### **Table**
927
-
928
- ![Table Demo Screen Shot][table-screenshot]
929
-
930
- Parameters:
931
-
932
- - **dataSource** (array) the data to be displayed
933
- - **headers** (array) column headers
934
- - **loading** (optional)(boolean) show loading progress
935
- - **rowTemplate** (TemplateRef) the template to show rows
936
- - **selectable** (optional)(boolean) enable row selection
937
-
938
- Events:
939
-
940
- - **selection** returns an array with selected rows
941
-
942
- Example:
943
-
944
- `example.module.ts`
945
-
946
- ```Typescript
947
- import { MonkeyTableModule } from 'monkey-style-guide';
948
-
949
- ...
950
-
951
- @NgModule({
952
- imports: [MonkeyTableModule]
953
- })
954
- ...
955
- ```
956
-
957
- `example.component.ts`
958
-
959
- ```Typecript
960
- _dataSourceHeaders = ['column1', 'column2', 'column3', 'column4'];
961
- _dataSource = [
962
- [1, 2, 3, 4, 5, 6],
963
- [5, 6, 7, 8, 9, 10],
964
- [5, 6, 7, 8, 9, 10],
965
- [5, 6, 7, 8, 9, 10],
966
- ];
967
- ```
968
-
969
- `example.component.html`
970
-
971
- ```HTML
972
- <monkey-table
973
- [dataSource]="_dataSource"
974
- [headers]="_dataSourceHeaders"
975
- [loading]="true"
976
- [rowTemplate]="rowTemplate"
977
- [selectable]="true"
978
- (selection)="onHandleSelection($event)"
979
- >
980
- <ng-template #rowTemplate let-row="row">
981
- <monkey-table-column>{{ row[0] }}</monkey-table-column>
982
- <monkey-table-column>{{ row[1] }}</monkey-table-column>
983
- <monkey-table-column>{{ row[2] }}</monkey-table-column>
984
- <monkey-table-column>{{ row[3] }}</monkey-table-column>
985
- </ng-template>
986
- </monkey-table>
987
- ```
988
-
989
- ---
990
-
991
- ### **Toggle**
992
-
993
- ![Toggle Demo Screen Shot][toggle-screenshot]
994
-
995
- Parameters:
996
-
997
- - **value** (boolean)(default: false)
998
- - **disabled** (boolean)(default: false) to disable any action
999
-
1000
- Events:
1001
-
1002
- - **onChange** event emited when user make changes
1003
-
1004
- Example:
1005
-
1006
- `example.module.ts`
1007
-
1008
- ```Typescript
1009
- import { MonkeyToggleModule } from 'monkey-style-guide';
1010
-
1011
- ...
1012
-
1013
- @NgModule({
1014
- imports: [MonkeyToggleModule]
1015
- })
1016
- ...
1017
- ```
1018
-
1019
- `example.component.html`
1020
-
1021
- ## Prerequisites
1022
-
1023
- The main feature of this project is to allow changing the application theme, such as primary colors and error colors.
1024
- For this, it is necessary to have a file called monkey-style-guide-settings.json at the root of your project's assets folder.
1025
-
1026
- For example:
1027
-
1028
- ![Settings Json Screen Shot][settings-screenshot]
1029
-
1030
- Content of monkey-style-guide-settings.json:
1031
-
1032
- ```JSON
1033
- {
1034
- "theme": {
1035
- "title": "Monkey Exchange",
1036
- "favicon": "assets/favicon.svg"
1037
- },
1038
- "colors": {
1039
- "theme": {
1040
- "main": "#034EA2",
1041
- "100": "#F5FAFF",
1042
- "200": "#D7EAFE",
1043
- "300": "#A5CFFE",
1044
- "400": "#72B4FD",
1045
- "500": "#4099FC",
1046
- "600": "#0F7EFB",
1047
- "700": "#0465D2",
1048
- "800": "#023064",
1049
- "900": "#023064",
1050
- "contrast": {
1051
- "main": "white",
1052
- "100": "rgba(black, 0.87)",
1053
- "200": "white",
1054
- "300": "white",
1055
- "400": "white",
1056
- "500": "white",
1057
- "600": "white",
1058
- "700": "white",
1059
- "800": "white",
1060
- "900": "white"
1061
- }
1062
- },
1063
- "error": {
1064
- "main": "#e70c0c",
1065
- "100": "#fbb5b5",
1066
- "200": "#f87f7f",
1067
- "300": "#f53b3b",
1068
- "400": "#f31e1e",
1069
- "500": "#e70c0c",
1070
- "600": "#ca0a0a",
1071
- "700": "#ad0909",
1072
- "800": "#900707",
1073
- "900": "#730606",
1074
- "contrast": {
1075
- "main": "white",
1076
- "100": "rgba(black, 0.87)",
1077
- "200": "rgba(black, 0.87)",
1078
- "300": "white",
1079
- "400": "white",
1080
- "500": "white",
1081
- "600": "white",
1082
- "700": "white",
1083
- "800": "white",
1084
- "900": "white"
1085
- }
1086
- },
1087
- "warning": {
1088
- "main": "#efa30e",
1089
- "100": "#fbe7be",
1090
- "200": "#f8d389",
1091
- "300": "#f4b946",
1092
- "400": "#f2ae29",
1093
- "500": "#efa30e",
1094
- "600": "#d28f0c",
1095
- "700": "#b57c0b",
1096
- "800": "#986809",
1097
- "900": "#7b5407",
1098
- "contrast": {
1099
- "main": "rgba(black, 0.87)",
1100
- "100": "rgba(black, 0.87)",
1101
- "200": "rgba(black, 0.87)",
1102
- "300": "rgba(black, 0.87)",
1103
- "400": "rgba(black, 0.87)",
1104
- "500": "rgba(black, 0.87)",
1105
- "600": "rgba(black, 0.87)",
1106
- "700": "rgba(black, 0.87)",
1107
- "800": "white",
1108
- "900": "white"
1109
- }
1110
- },
1111
- "success": {
1112
- "main": "#00875a",
1113
- "100": "#45ffc1",
1114
- "200": "#0dffae",
1115
- "300": "#00c483",
1116
- "400": "#00a66e",
1117
- "500": "#00875a",
1118
- "600": "#006846",
1119
- "700": "#004a31",
1120
- "800": "#002b1d",
1121
- "900": "#000d08",
1122
- "contrast": {
1123
- "main": "white",
1124
- "100": "rgba(black, 0.87)",
1125
- "200": "rgba(black, 0.87)",
1126
- "300": "rgba(black, 0.87)",
1127
- "400": "white",
1128
- "500": "white",
1129
- "600": "white",
1130
- "700": "white",
1131
- "800": "white",
1132
- "900": "white"
1133
- }
1134
- },
1135
- "question": {
1136
- "main": "#8D38FA",
1137
- "100": "#F4EBFF",
1138
- "200": "#E8D7FE",
1139
- "300": "#D2AFFD",
1140
- "400": "#A460FB",
1141
- "500": "#8D38FA",
1142
- "600": "#7710F9",
1143
- "700": "#5104B3",
1144
- "800": "#2D0264",
1145
- "900": "#1B013C",
1146
- "contrast": {
1147
- "main": "white",
1148
- "100": "rgba(black, 0.87)",
1149
- "200": "rgba(black, 0.87)",
1150
- "300": "rgba(black, 0.87)",
1151
- "400": "white",
1152
- "500": "white",
1153
- "600": "white",
1154
- "700": "white",
1155
- "800": "white",
1156
- "900": "white"
1157
- }
1158
- }
1159
- }
1160
- }
1161
- ```
1162
-
1163
- ## Installation
1164
-
1165
- 1. Install NPM packages:
1166
-
1167
- ```sh
1168
- npm install monkey-style-guide
1169
- ```
1170
-
1171
- ## Usage
1172
-
1173
- Import `monkey-style-guide` in your `style.scss`
1174
-
1175
- ```scss
1176
- @import '~monkey-style-guide/assets/scss/theme';
1177
- ```
1178
-
1179
- Import `MonkeyStyleGuideModule` in your `app.module.ts`
1180
-
1181
- ```Typescript
1182
- import { MonkeyStyleGuideModule } from 'monkey-style-guide';
1183
-
1184
- @NgModule({
1185
- declarations: [AppComponent],
1186
- imports: [MonkeyStyleGuideModule],
1187
- bootstrap: [AppComponent],
1188
- })
1189
- export class AppModule {}
1190
- ```
1191
-
1192
- Than call the `bootstrap` method in your `app.component.ts`
1193
-
1194
- ```Typescript
1195
- import { Component } from '@angular/core';
1196
- import { MonkeyStyleGuideSettingsService } from 'monkey-style-guide';
1197
-
1198
- @Component({
1199
- selector: 'app-root',
1200
- templateUrl: './app.component.html',
1201
- styleUrls: ['./app.component.scss'],
1202
- })
1203
- export class AppComponent {
1204
- constructor(private settingsService: MonkeyStyleGuideSettingsService) {
1205
- this.settingsService.boostrap('');
1206
- }
1207
- }
1208
- ```
1209
-
1210
- <!-- MARKDOWN LINKS & IMAGES -->
1211
- <!-- https://www.markdownguide.org/basic-syntax/#reference-style-links -->
1212
-
1213
- [badge-screenshot]: https://user-images.githubusercontent.com/10110065/111625441-9e5df280-87cb-11eb-905c-008607cf859e.png
1214
- [button-avatar-screenshot]: https://user-images.githubusercontent.com/10110065/111626956-50e28500-87cd-11eb-85c1-aaa8c06bb4e0.png
1215
- [button-dropdown-screenshot1]: https://user-images.githubusercontent.com/10110065/111631407-1e875680-87d2-11eb-9631-d1d2ccf8f076.png
1216
- [button-dropdown-screenshot2]: https://user-images.githubusercontent.com/10110065/111631726-82118400-87d2-11eb-9653-4502c3d82d51.png
1217
- [buttons-screenshot]: https://user-images.githubusercontent.com/10110065/142933460-7a84ad76-b57f-40a0-b809-292af31c1e8f.png
1218
- [checkbox-screenshot]: https://dev-monkey-emails.s3-us-west-2.amazonaws.com/monkey-style-guide/demos/images/checkbox.png
1219
- [contributors-shield]: https://img.shields.io/badge/Contributors-2-brightgreen?style=flat
1220
- [contributors-url]: https://github.com/MonkeyECX/monkey-style-guide/graphs/contributors
1221
- [date-range-picker]: https://user-images.githubusercontent.com/12416871/146080473-8543b9ae-7186-42ee-8ec8-bfd1eef09df6.png
1222
- [expansion-screenshot1]: https://user-images.githubusercontent.com/10110065/111636157-f8b08080-87d6-11eb-86ab-86839297d068.png
1223
- [expansion-screenshot2]: https://user-images.githubusercontent.com/10110065/111636340-24336b00-87d7-11eb-9f19-504ab96cc9af.png
1224
- [file-upload-screenshot1]: https://user-images.githubusercontent.com/10110065/111640018-8b065380-87da-11eb-8d47-87ddea29b943.png
1225
- [icons-screenshot1]: https://user-images.githubusercontent.com/12416871/185962998-40a980bd-545b-4ae5-a0ed-2c4f0a1253c2.png
1226
- [input-filter-screenshot]: https://user-images.githubusercontent.com/32619691/163216159-3a9f985e-3ba9-4e10-8ba4-0f60931f83d1.png
1227
- [input-screenshot]: https://dev-monkey-emails.s3-us-west-2.amazonaws.com/monkey-style-guide/demos/images/input.png
1228
- [license-shield]: https://img.shields.io/github/license/othneildrew/Best-README-Template.svg?style=flat-square
1229
- [license-url]: https://github.com/othneildrew/Best-README-Template/blob/master/LICENSE.txt
1230
- [linkedin-shield]: https://img.shields.io/badge/-LinkedIn-black.svg?style=flat-square&logo=linkedin&colorB=157
1231
- [linkedin-url]: https://www.linkedin.com/company/monkeyexchange
1232
- [modal-screenshot]: https://user-images.githubusercontent.com/12416871/119838920-2c480f00-beda-11eb-9e44-e42262f39c34.png
1233
- [radiobutton-screenshot]: https://dev-monkey-emails.s3-us-west-2.amazonaws.com/monkey-style-guide/demos/images/radiobutton.png
1234
- [select-screenshot]: https://dev-monkey-emails.s3-us-west-2.amazonaws.com/monkey-style-guide/demos/images/select.png
1235
- [settings-screenshot]: https://dev-monkey-emails.s3-us-west-2.amazonaws.com/monkey-style-guide/demos/images/style-settings-json.png
1236
- [table-screenshot]: https://user-images.githubusercontent.com/12416871/119574643-29d79f00-bd8c-11eb-9747-2e6dc86410da.png
1237
- [toggle-screenshot]: https://user-images.githubusercontent.com/12416871/119849813-53570e80-bee3-11eb-87f8-0871f8e26f58.png
1
+ [![Contributors][contributors-shield]][contributors-url]
2
+ [![MIT License][license-shield]][license-url]
3
+ [![LinkedIn][linkedin-shield]][linkedin-url]
4
+
5
+ <br />
6
+ <p align="center">
7
+ <a href="https:monkey.exchange">
8
+ <img src="https://dev-monkey-emails.s3-us-west-2.amazonaws.com/monkey-style-guide/demos/images/logo.png" alt="Monkey Logo" width="80" height="80">
9
+ </a>
10
+ <h3 align="center">Monkey Style Guide</h3>
11
+ <p align="center">
12
+ An style guide template to boost your projects.
13
+ <br />
14
+ <br />
15
+ <a href="https://www.monkey.exchange/who-we-are.html">Who We Are?</a>
16
+ </p>
17
+ </p>
18
+
19
+ ## About The Project
20
+
21
+ This project was defined to be the main guide to styles, colors and html components of the entire ecosystem of Monkey Exchange systems.
22
+
23
+ This style guide contains a concept to work with a range of different colors, making possible to create beautiful and useful html components.
24
+
25
+ ## Components
26
+
27
+ All components was developed to work with angular reactive forms, so we need to define a formGroup and set the formControlName, and the components will do the rest of the job to fill all fields properly.
28
+ First developed on Angular 10, this color guide contains the following components:
29
+
30
+ ---
31
+
32
+ ### **Badge**
33
+
34
+ ![Badge Demo Screen Shot][badge-screenshot]
35
+
36
+ Parameters:
37
+
38
+ - **count** (string) is used to define the content of badge.
39
+ - **pulseOn** (boolean)(default: false) is used to define if badge has to pulse like a bell.
40
+
41
+ Example:
42
+
43
+ `example.module.ts`
44
+
45
+ ```Typescript
46
+ import { MonkeyBadgeModule } from 'monkey-style-guide';
47
+
48
+ ...
49
+
50
+ @NgModule({
51
+ imports: [MonkeyBadgeModule]
52
+ })
53
+ ...
54
+ ```
55
+
56
+ `example.component.html`
57
+
58
+ ```HTML
59
+ <monkey-badge count="3" [pulseOn]="true"></monkey-badge>
60
+ ```
61
+
62
+ ---
63
+
64
+ ### **Button**
65
+
66
+ ![Button Demo Screen Shot][buttons-screenshot]
67
+
68
+ Parameters:
69
+
70
+ - **color** (string) can be _theme_, _error_, _warning_ or _success_
71
+ - **disabled** (boolean)(default: false) to disable any action
72
+ - **icon** (optional)(string) define the icon for button
73
+ - **iconPoition** (string)(default: 'left') define the icon position. Can be _left_ or _right_
74
+ - **label** (string) define the label that will be displayed inside the button
75
+ - **type** (string) can be _primary_, _secondary_, _tertiary_
76
+
77
+ Example:
78
+
79
+ `example.module.ts`
80
+
81
+ ```Typescript
82
+ import { MonkeyButtonModule } from 'monkey-style-guide';
83
+
84
+ ...
85
+
86
+ @NgModule({
87
+ imports: [MonkeyButtonModule]
88
+ })
89
+ ...
90
+ ```
91
+
92
+ `example.component.html`
93
+
94
+ ```HTML
95
+ <monkey-button color="theme" label="Primary" type="primary"></monkey-button>
96
+ <monkey-button color="error" label="Secondary" type="secondary"></monkey-button>
97
+ <monkey-button color="warning" label="Tertiary" type="tertiary"></monkey-button>
98
+ ```
99
+
100
+ ---
101
+
102
+ There are other variations with buttons:
103
+
104
+ ### **Button Avatar**
105
+
106
+ ![Button Avatar Demo Screen Shot][button-avatar-screenshot]
107
+
108
+ Parameters:
109
+
110
+ - **label** (string) define the label that will be displayed inside the button
111
+ - **size** (string) define the size of the button
112
+ - **type** (string) can be _theme_, _theme-100_ or _none_
113
+
114
+ Example:
115
+
116
+ `example.component.html`
117
+
118
+ ```HTML
119
+ <monkey-button-avatar label="Amilson" size="sm" type="theme"></monkey-button-avatar>
120
+ ```
121
+
122
+ ### **Button Dropdown**
123
+
124
+ ![Button Dropdown Demo Screen Shot][button-dropdown-screenshot1]
125
+
126
+ ![Button Dropdown Demo Screen Shot][button-dropdown-screenshot2]
127
+
128
+ Parameters:
129
+
130
+ - **label** (ng-template) the label that will be displayed inside the button. For this particular component, label has be a ng-template.
131
+ - **listenClicks** (boolean)(default: true) can be used to define if the dropdown will be closed with clicks inside
132
+ - **type** (string)(default: 'filled') can be _unfilled_ or _filled_
133
+
134
+ Example:
135
+
136
+ `example.component.html`
137
+
138
+ ```HTML
139
+ <monkey-button-dropdown [label]="profileButton">
140
+ <div class="mt-2">
141
+ <monkey-button
142
+ color="theme"
143
+ label="Profile"
144
+ type="tertiary"
145
+ [routerLink]="'/app/user/profile/edit'"
146
+ >
147
+ </monkey-button>
148
+ </div>
149
+ <div class="mt-2">
150
+ <monkey-button color="theme" label="Logout" type="tertiary"></monkey-button>
151
+ </div>
152
+ </monkey-button-dropdown>
153
+
154
+ <ng-template #profileButton>
155
+ <monkey-button-avatar label="Monkey" size="sm" type="theme"></monkey-button-avatar>
156
+ </ng-template>
157
+ ```
158
+
159
+ ---
160
+
161
+ ### **Checkbox**
162
+
163
+ ![Checkbox Demo Screen Shot][checkbox-screenshot]
164
+
165
+ Parameters:
166
+
167
+ - **description** (optional)(string) description to be displayed by side of the checkbox
168
+ - **errorMessage** (string) message to alert user
169
+ - **helperMessage** (optional)(string) can be used with type single, for formfield purpose
170
+ - **infoMessage** (optional)(string) message to help user knows about this component purpose
171
+ - **label** (string) define the label that will be displayed inside
172
+ - **type** (string)(default: 'single') can be _single_ or _multiple_. Will be used to render checkbox with formfield body or not.
173
+
174
+ Events:
175
+
176
+ - **onChange** event emited when user make changes
177
+
178
+ Example:
179
+
180
+ `example.module.ts`
181
+
182
+ ```Typescript
183
+ import { MonkeyCheckboxModule } from 'monkey-style-guide';
184
+
185
+ ...
186
+
187
+ @NgModule({
188
+ imports: [MonkeyCheckboxModule]
189
+ })
190
+ ...
191
+ ```
192
+
193
+ `example.component.html`
194
+
195
+ ```HTML
196
+ <monkey-checkbox
197
+ description="I Agree to Terms"
198
+ errorMessage="Validation Message"
199
+ formControlName="terms"
200
+ helperMessage="Mandatory"
201
+ infoMessage="Info message"
202
+ label="Terms and Conditions"
203
+ type="single">
204
+ </monkey-checkbox>
205
+ ```
206
+
207
+ ---
208
+
209
+ ### **Date Range Picker**
210
+
211
+ ![Date Range Picker Demo Screen Shot][date-range-picker]
212
+
213
+ Parameters:
214
+
215
+ - **errorMessage** (string) message to alert user
216
+ - **helperMessage** (optional)(string) can be used with type single, for formfield purpose
217
+ - **infoMessage** (optional)(string) message to help user knows about this component purpose
218
+ - **label** (string) define the label that will be displayed inside
219
+ - **i18n** (Object) an i18n object (see example)
220
+
221
+ Events:
222
+
223
+ - **onChange** event emited when user select a range of dates or when clicked on some action
224
+
225
+ Example:
226
+
227
+ `example.module.ts`
228
+
229
+ ```Typescript
230
+ import { MonkeyDateRangePicker } from 'monkey-style-guide';
231
+
232
+ ...
233
+
234
+ @NgModule({
235
+ imports: [MonkeyDateRangePicker]
236
+ })
237
+ ...
238
+ ```
239
+
240
+ `example.component.html`
241
+
242
+ ```HTML
243
+ <monkey-date-range-picker
244
+ errorMessage="Error Message"
245
+ helperMessage="Helper Message"
246
+ infoMessage="Info Message"
247
+ label="Label"
248
+ [i18n]="i18n">
249
+ </monkey-date-range-picker>
250
+ ```
251
+
252
+ `example.component.ts`
253
+
254
+ ```Typescript
255
+ ...
256
+ i18n = {
257
+ months: {
258
+ '1': 'January',
259
+ '2': 'Febuary',
260
+ '3': 'March',
261
+ '4': 'April',
262
+ '5': 'May',
263
+ '6': 'June',
264
+ '7': 'July',
265
+ '8': 'August',
266
+ '9': 'September',
267
+ '10': 'October',
268
+ '11': 'November',
269
+ '12': 'December'
270
+ },
271
+ days: {
272
+ '1': 'Sun.',
273
+ '2': 'Mon.',
274
+ '3': 'Tue.',
275
+ '4': 'Wed.',
276
+ '5': 'Thu.',
277
+ '6': 'Fri.',
278
+ '7': 'Sat.'
279
+ },
280
+ actions: {
281
+ '30': '30 days',
282
+ '60': '60 days',
283
+ '90': '90 days'
284
+ },
285
+ today: 'Today'
286
+ };
287
+ ...
288
+ ```
289
+
290
+ ---
291
+
292
+ ### **Expansion**
293
+
294
+ ![Expansion Demo Screen Shot][expansion-screenshot1]
295
+
296
+ ![Expansion Demo Screen Shot][expansion-screenshot2]
297
+
298
+ Parameters:
299
+
300
+ - **color** (string) can be _theme_, _error_, _warning_ or _success_
301
+ - **disabled** (boolean)(default: false) to disable any action
302
+ - **helperMessage** (optional)(string) can be used with type single, for formfield purpose
303
+ - **label** (string) define the label that will be displayed inside
304
+ - **open** (boolean)(default: false) make expansion open or not
305
+
306
+ Events:
307
+
308
+ - **onChange** event emited when user make changes
309
+
310
+ Example:
311
+
312
+ `example.module.ts`
313
+
314
+ ```Typescript
315
+ import { MonkeyExpansionModule } from 'monkey-style-guide';
316
+
317
+ ...
318
+
319
+ @NgModule({
320
+ imports: [MonkeyExpansionModule]
321
+ })
322
+ ...
323
+ ```
324
+
325
+ `example.component.html`
326
+
327
+ ```HTML
328
+ <monkey-expansion
329
+ color="theme"
330
+ label="Expansion"
331
+ [helperMessage]="'helperMessage'"
332
+ >
333
+ <div>Content 1</div>
334
+ <div>Content 2</div>
335
+ </monkey-expansion>
336
+ ```
337
+
338
+ ---
339
+
340
+ ### **File Upload**
341
+
342
+ ![File Upload Demo Screen Shot][file-upload-screenshot1]
343
+
344
+ Parameters:
345
+
346
+ - **allowedExtensions** (array of string) for example ['.jpg', '.jpeg', '.png']
347
+ - **allowedExtensionErrorMessage** (string) message to be displayed if the file extension is wrong
348
+ - **errorMessage** (string) message to alert user
349
+ - **fileUpload** (function) function to be used to upload file
350
+ - **helperMessage** (optional)(string) message to help user to know what to do
351
+ - **infoMessage** (optional)(string) required message
352
+ - **label** (string) define the label that will be displayed inside
353
+ - **listenFiles** (boolean)(default: false) if true, emit event to onHandleFilesReady with the selected file
354
+ - **maxSize** (number) max file size in kbytes (1 \* 1024 \* 1024)
355
+ - **maxSizeErrorMessage** (string) message to be displayed if the file size is wrong
356
+ - **name** (string) name to identify the input
357
+ - **placeholder** (optional)(string) message to help user that will be displayed inside the input
358
+ - **uploadOngoingMessage** (string) message to be used when upload starts
359
+
360
+ Events:
361
+
362
+ - **onChange** event emited when user make changes
363
+ - **onHandleFilesReady** event emited when listenFiled is true
364
+
365
+ Example:
366
+
367
+ `example.module.ts`
368
+
369
+ ```Typescript
370
+ import { MonkeyFileUploadModule } from 'monkey-style-guide';
371
+
372
+ ...
373
+
374
+ @NgModule({
375
+ imports: [MonkeyFileUploadModule]
376
+ })
377
+ ...
378
+ ```
379
+
380
+ `example.component.ts`
381
+
382
+ ```Typescript
383
+ ...
384
+
385
+ uploadFunction: Function = (file: any, callback?: Function) => {
386
+ this.uploadService.uploadFile(file, callback);
387
+ };
388
+
389
+ service.uploadFile(file: File, callback?: Function) {
390
+ const { httpClient, headers } = this;
391
+ const formData = new FormData();
392
+ formData.append('file', file);
393
+
394
+ httpClient.post<any>('endpoint/upload', formData, {
395
+ headers,
396
+ reportProgress: true,
397
+ observe: 'events'
398
+ }).subscribe((event: any) => {
399
+ const { loaded, total, body } = event;
400
+ switch (event.type) {
401
+ case HttpEventType.UploadProgress:
402
+ const progress = Math.round((loaded / total * 100));
403
+ if (callback) callback(progress);
404
+ break;
405
+ case HttpEventType.Response:
406
+ const { filename, _links: { file: { href } } } = body;
407
+ if (callback) {
408
+ callback(null, {
409
+ fileName: filename,
410
+ url: href
411
+ }, null);
412
+ }
413
+ break;
414
+ default:
415
+ break;
416
+ }
417
+ }, (err: HttpErrorResponse) => {
418
+ const { error } = err;
419
+ callback(null, error?.notifications?.join(''));
420
+ });
421
+ }
422
+ ```
423
+
424
+ `example.component.html`
425
+
426
+ ```HTML
427
+ <monkey-file-upload
428
+ allowedExtensionErrorMessage="Extension not allowed"
429
+ icon="upload-20"
430
+ label="upload"
431
+ maxSize="5242880"
432
+ maxSizeErrorMessage="Max file size is 5mb"
433
+ placeholder="Add File"
434
+ [fileUpload]="uploadFunction"
435
+ ></monkey-file-upload>
436
+ ```
437
+
438
+ ---
439
+
440
+ ### **Icon**
441
+
442
+ ![Icons Demo Screen Shot][icons-screenshot1]
443
+
444
+ Parameters:
445
+
446
+ - **color** (string) define color. Can be _theme_ or _#ffffff_ (hex value)
447
+ - **icon** (string) icon name and size separeted by hyfhen
448
+
449
+ Icons Options:
450
+
451
+ - **arrow-down**
452
+ - **add-plus**
453
+ - **arrow-left**
454
+ - **arrow-right**
455
+ - **arrow-up**
456
+ - **arrow-line-right**
457
+ - **arrows**
458
+ - **auction**
459
+ - **bank-account**
460
+ - **bank**
461
+ - **banknote-search**
462
+ - **bell**
463
+ - **book**
464
+ - **box**
465
+ - **build-person**
466
+ - **calendar**
467
+ - **camera**
468
+ - **card**
469
+ - **card-machine**
470
+ - **cash-banknote-invoice**
471
+ - **chat**
472
+ - **check-circle-out**
473
+ - **check-circle**
474
+ - **check-grey**
475
+ - **check-white**
476
+ - **check**
477
+ - **clipboard**
478
+ - **clock**
479
+ - **close**
480
+ - **cnpj**
481
+ - **codepen**
482
+ - **company-name**
483
+ - **contract-pen**
484
+ - **contract**
485
+ - **delete**
486
+ - **document**
487
+ - **dollar-sign-circle**
488
+ - **dollar-sign**
489
+ - **domain**
490
+ - **dots-menu**
491
+ - **double-arrow-left**
492
+ - **double-arrow-right**
493
+ - **download**
494
+ - **edit-square**
495
+ - **edit**
496
+ - **email**
497
+ - **empty-doc**
498
+ - **error**
499
+ - **eye-closed**
500
+ - **eye-open**
501
+ - **filter**
502
+ - **grid**
503
+ - **help**
504
+ - **hexagon**
505
+ - **home**
506
+ - **info**
507
+ - **invoice**
508
+ - **image**
509
+ - **list**
510
+ - **location-pin**
511
+ - **login**
512
+ - **logout**
513
+ - **medal**
514
+ - **menu**
515
+ - **money-cedule**
516
+ - **money-hand**
517
+ - **money-sign**
518
+ - **money**
519
+ - **more**
520
+ - **new-company**
521
+ - **offered**
522
+ - **password**
523
+ - **people**
524
+ - **percent**
525
+ - **person-document**
526
+ - **person-sad**
527
+ - **phone**
528
+ - **pork**
529
+ - **radio**
530
+ - **refresh**
531
+ - **repeat**
532
+ - **search**
533
+ - **second-warning**
534
+ - **settings**
535
+ - **shield-chekmark**
536
+ - **star**
537
+ - **today**
538
+ - **trash**
539
+ - **trophy**
540
+ - **unfold-more**
541
+ - **upload**
542
+ - **user**
543
+ - **wallet**
544
+ - **warning**
545
+
546
+ Example:
547
+
548
+ `example.module.ts`
549
+
550
+ ```Typescript
551
+ import { MonkeyIconModule } from 'monkey-style-guide';
552
+
553
+ ...
554
+
555
+ @NgModule({
556
+ imports: [MonkeyIconModule]
557
+ })
558
+ ...
559
+ ```
560
+
561
+ `example.component.html`
562
+
563
+ ```HTML
564
+ <monkey-icon color="#000000" icon="password-16"></monkey-icon>
565
+ ```
566
+
567
+ ---
568
+
569
+ ### **Input**
570
+
571
+ ![Input Demo Screen Shot][input-screenshot]
572
+
573
+ Parameters:
574
+
575
+ - **capitalize** (optional)(boolean) makes the value capitalcase
576
+ - **currency** (optional)(boolean) transforms the input in currency input
577
+ - **errorMessage** (string) message to alert user
578
+ - **helperMessage** (optional)(string) message to help user to know what to do
579
+ - **icon** (optional)(string) icon name and size separeted by hyfhen
580
+ - **infoMessage** (optional)(string) message to help user knows about this component purpose
581
+ - **label** (string) define the label that will be displayed inside
582
+ - **lowerCase** (optional)(boolean) makes the value lowercase
583
+ - **mask** (optional)(string) mask pattern to mask the input
584
+ - **maxLength** (optional)(number) max 255
585
+ - **name** (optional)(string) name to identify the input
586
+ - **onlyNumber** (optional)(boolean) makes the input accept only number
587
+ - **onlyAlphaNumeric** (optional)(boolean) makes the input accept only alphanumeric characters
588
+ - **placeholder** (optional)(string) message to help user that will be displayed inside the input
589
+ - **prefix** (optional)(string) prefix value for input
590
+ - **type** (string) can be _text_ or _password_
591
+ - **upperCase** (optional)(boolean) makes the value uppercase
592
+
593
+ Events:
594
+
595
+ - **onChange** event emited when user make changes
596
+
597
+ Example:
598
+
599
+ `example.module.ts`
600
+
601
+ ```Typescript
602
+ import { MonkeyInputModule } from 'monkey-style-guide';
603
+
604
+ ...
605
+
606
+ @NgModule({
607
+ imports: [MonkeyInputModule]
608
+ })
609
+ ...
610
+ ```
611
+
612
+ `example.component.html`
613
+
614
+ ```HTML
615
+ <monkey-input
616
+ errorMessage="Validation Message"
617
+ formControlName="name"
618
+ helperMessage="Mandatory"
619
+ icon="user-20"
620
+ infoMessage="Info message"
621
+ label="Name"
622
+ placeholder="Input your full name">
623
+ </monkey-input>
624
+ ```
625
+
626
+ ---
627
+
628
+ ### **Input Filter**
629
+
630
+ ![Input Filter Demo Screen Shot][input-filter-screenshot]
631
+
632
+ Parameters:
633
+
634
+ - **helperMessage** (optional)(string) message to help user to know what to do
635
+ - **icon** (optional)(string) icon name and size separeted by hyfhen
636
+ - **infoMessage** (optional)(string) message to help user knows about this component purpose
637
+ - **label** (string) define the label that will be displayed inside
638
+ - **maxLength** (optional)(number) max 255
639
+ - **name** (optional)(string) name to identify the input
640
+ - **placeholder** (optional)(string) message to help user that will be displayed inside the input
641
+
642
+ Events:
643
+
644
+ - **onChange** event emited when user make changes
645
+
646
+ Example:
647
+
648
+ `example.module.ts`
649
+
650
+ ```Typescript
651
+ import { MonkeyInputModule } from 'monkey-style-guide';
652
+
653
+ ...
654
+
655
+ @NgModule({
656
+ imports: [MonkeyInputModule]
657
+ })
658
+ ...
659
+ ```
660
+
661
+ `example.component.html`
662
+
663
+ ```HTML
664
+ <monkey-input-filter
665
+ formControlName="name"
666
+ helperMessage="Mandatory"
667
+ icon="user-20"
668
+ infoMessage="Info message"
669
+ label="Name"
670
+ placeholder="Input your full name">
671
+ </monkey-input-filter>
672
+ ```
673
+
674
+ ---
675
+
676
+ ### **Modal**
677
+
678
+ ![Modal Demo Screen Shot][modal-screenshot]
679
+
680
+ Parameters:
681
+
682
+ - **config** (MonkeyModalConfig) the configuration of modal
683
+ - **modalRef** (MonkeyModalRefs) the modal reference
684
+ - **onHandleConfirm** (EventEmitter) will emit and event when you click confirm
685
+
686
+ Example:
687
+
688
+ `example.module.ts`
689
+
690
+ ```Typescript
691
+ import {
692
+ MonkeyModalModule,
693
+ MonkeyStyleGuideModalService
694
+ } from 'monkey-style-guide';
695
+
696
+ ...
697
+
698
+ @NgModule({
699
+ imports: [MonkeyModalModule],
700
+ providers: [MonkeyStyleGuideModalService]
701
+ })
702
+ ...
703
+ ```
704
+
705
+ `parent.component.ts`
706
+
707
+ ```Typescript
708
+ ...
709
+ import { MonkeyStyleGuideModalService } from 'monkey-style-guide';
710
+ import { ModalComponent } from './modal/modal.component';
711
+
712
+ ...
713
+
714
+ constructor(private modalService: MonkeyStyleGuideModalService) {}
715
+
716
+ openModal() {
717
+ this.modalService.open(ModalComponent, {
718
+ color: 'theme',
719
+ size: 'md',
720
+ action: {
721
+ cancel: {
722
+ actionColor: 'theme',
723
+ actionType: 'tertiary',
724
+ label: 'Cancel',
725
+ },
726
+ confirm: {
727
+ actionColor: 'theme',
728
+ actionType: 'primary',
729
+ label: 'Confirm',
730
+ },
731
+ },
732
+ });
733
+ }
734
+ ```
735
+
736
+ `modal.component.ts`
737
+
738
+ ```Typescript
739
+ import { Component, EventEmitter, Input } from '@angular/core';
740
+ import {
741
+ MonkeyModalConfig,
742
+ MonkeyModalRefs,
743
+ MonkeyStyleGuideModalService
744
+ } from 'monkey-style-guide';
745
+
746
+ @Component({
747
+ selector: 'mk-modal',
748
+ template: `
749
+ <monkey-modal
750
+ [config]="config"
751
+ [modalRef]="modalRef"
752
+ [onHandleConfirm]="onHandleConfirm"
753
+ >
754
+ <div style="align-items: center; display: flex; justify-content: center;">
755
+ <img
756
+ src="https://dev-monkey-emails.s3-us-west-2.amazonaws.com/monkey-style-guide/demos/images/logo.png"
757
+ />
758
+ </div>
759
+ </monkey-modal>
760
+ `,
761
+ })
762
+ export class ModalComponent {
763
+ @Input() config: MonkeyModalConfig;
764
+ @Input() modalRef: MonkeyModalRefs<this>;
765
+ @Input() onHandleConfirm = new EventEmitter<any>();
766
+
767
+ constructor(private modalService: MonkeyStyleGuideModalService) {
768
+ this.onHandleConfirm.subscribe(() => {
769
+ console.log('Confirm clicked!');
770
+
771
+ this.modalService.closeAll();
772
+ });
773
+ }
774
+ }
775
+ ```
776
+
777
+ In case you need the logic in your parent component you can simply pass the `action` key to `MonkeyModalConfig` and remove `onHandleConfirm` of your modal component like this:
778
+
779
+ ```Typescript
780
+ ...
781
+
782
+ openModal() {
783
+ this.modalService.open(ModalComponent, {
784
+ color: 'theme',
785
+ size: 'md',
786
+ action: {
787
+ cancel: {
788
+ actionColor: 'theme',
789
+ actionType: 'tertiary',
790
+ label: 'Cancel',
791
+ },
792
+ confirm: {
793
+ action: () => {
794
+ console.log('Modal closed!');
795
+ },
796
+ actionColor: 'theme',
797
+ actionType: 'primary',
798
+ label: 'Confirm',
799
+ },
800
+ },
801
+ });
802
+ }
803
+ ```
804
+
805
+ ```Typescript
806
+ ...
807
+
808
+ export class ModalComponent {
809
+ @Input() config: MonkeyModalConfig;
810
+ @Input() modalRef: MonkeyModalRefs<this>;
811
+
812
+ constructor() {}
813
+ }
814
+ ```
815
+
816
+ ---
817
+
818
+ ### **Radiobutton**
819
+
820
+ ![Radiobutton Demo Screen Shot][radiobutton-screenshot]
821
+
822
+ Parameters:
823
+
824
+ - **errorMessage** (string) message to alert user
825
+ - **helperMessage** (optional)(string) message to help user to know what to do
826
+ - **infoMessage** (optional)(string) message to help user knows about this component purpose
827
+ - **label** (string) define the label that will be displayed inside
828
+ - **placeholder** (optional)(string) message to help user that will be displayed inside the input
829
+
830
+ Events:
831
+
832
+ - **onChange** event emited when user make changes
833
+
834
+ Example:
835
+
836
+ `example.module.ts`
837
+
838
+ ```Typescript
839
+ import { MonkeyRadioButtonModule } from 'monkey-style-guide';
840
+
841
+ ...
842
+
843
+ @NgModule({
844
+ imports: [MonkeyRadioButtonModule]
845
+ })
846
+ ...
847
+ ```
848
+
849
+ `example.component.html`
850
+
851
+ ```HTML
852
+ <monkey-radiobutton
853
+ formControlName="gender"
854
+ label="Gender"
855
+ helperMessage="Mandatory"
856
+ icon="help-20"
857
+ infoMessage="Info message"
858
+ errorMessage="Validation message"
859
+ >
860
+ <monkey-option label="Female" value="female"></monkey-option>
861
+ <monkey-option label="Male" value="male"></monkey-option>
862
+ <monkey-option label="I prefer not to choose" value="not_choose"></monkey-option>
863
+ </monkey-radiobutton>
864
+ ```
865
+
866
+ ---
867
+
868
+ ### **Select**
869
+
870
+ ![Select Demo Screen Shot][select-screenshot]
871
+
872
+ Parameters:
873
+
874
+ - **errorMessage** (string) message to alert user
875
+ - **helperMessage** (optional)(string) message to help user to know what to do
876
+ - **icon** (optional)(string) icon name and size separeted by hyfhen
877
+ - **infoMessage** (optional)(string) message to help user knows about this component purpose
878
+ - **label** (string) define the label that will be displayed inside
879
+ - **placeholder** (optional)(string) message to help user that will be displayed inside the input
880
+
881
+ Events:
882
+
883
+ - **onChange** event emited when user make changes
884
+
885
+ Example:
886
+
887
+ `example.module.ts`
888
+
889
+ ```Typescript
890
+ import {
891
+ MonkeyOptionModule,
892
+ MonkeySelectModule
893
+ } from 'monkey-style-guide';
894
+
895
+ ...
896
+
897
+ @NgModule({
898
+ imports: [
899
+ MonkeyOptionModule,
900
+ MonkeySelectModule
901
+ ]
902
+ })
903
+ ...
904
+ ```
905
+
906
+ `example.component.html`
907
+
908
+ ```HTML
909
+ <monkey-select
910
+ errorMessage="Validation Message"
911
+ formControlName="documentType"
912
+ helperMessage="Mandatory"
913
+ icon="upload-20"
914
+ infoMessage="Info message"
915
+ label="Select the document type to upload"
916
+ >
917
+ <monkey-option label="Personal Document" value="personal_document">
918
+ </monkey-option>
919
+ <monkey-option label="Social Contract" value="social_contract">
920
+ </monkey-option>
921
+ <monkey-option label="Procuraction Contract" value="procuration_contract">
922
+ </monkey-option>
923
+ </monkey-select>
924
+ ```
925
+
926
+ ---
927
+
928
+ ### **Table**
929
+
930
+ ![Table Demo Screen Shot][table-screenshot]
931
+
932
+ Parameters:
933
+
934
+ - **dataSource** (array) the data to be displayed
935
+ - **headers** (array) column headers
936
+ - **loading** (optional)(boolean) show loading progress
937
+ - **rowTemplate** (TemplateRef) the template to show rows
938
+ - **selectable** (optional)(boolean) enable row selection
939
+
940
+ Events:
941
+
942
+ - **selection** returns an array with selected rows
943
+
944
+ Example:
945
+
946
+ `example.module.ts`
947
+
948
+ ```Typescript
949
+ import { MonkeyTableModule } from 'monkey-style-guide';
950
+
951
+ ...
952
+
953
+ @NgModule({
954
+ imports: [MonkeyTableModule]
955
+ })
956
+ ...
957
+ ```
958
+
959
+ `example.component.ts`
960
+
961
+ ```Typecript
962
+ _dataSourceHeaders = ['column1', 'column2', 'column3', 'column4'];
963
+ _dataSource = [
964
+ [1, 2, 3, 4, 5, 6],
965
+ [5, 6, 7, 8, 9, 10],
966
+ [5, 6, 7, 8, 9, 10],
967
+ [5, 6, 7, 8, 9, 10],
968
+ ];
969
+ ```
970
+
971
+ `example.component.html`
972
+
973
+ ```HTML
974
+ <monkey-table
975
+ [dataSource]="_dataSource"
976
+ [headers]="_dataSourceHeaders"
977
+ [loading]="true"
978
+ [rowTemplate]="rowTemplate"
979
+ [selectable]="true"
980
+ (selection)="onHandleSelection($event)"
981
+ >
982
+ <ng-template #rowTemplate let-row="row">
983
+ <monkey-table-column>{{ row[0] }}</monkey-table-column>
984
+ <monkey-table-column>{{ row[1] }}</monkey-table-column>
985
+ <monkey-table-column>{{ row[2] }}</monkey-table-column>
986
+ <monkey-table-column>{{ row[3] }}</monkey-table-column>
987
+ </ng-template>
988
+ </monkey-table>
989
+ ```
990
+
991
+ ---
992
+
993
+ ### **Toggle**
994
+
995
+ ![Toggle Demo Screen Shot][toggle-screenshot]
996
+
997
+ Parameters:
998
+
999
+ - **value** (boolean)(default: false)
1000
+ - **disabled** (boolean)(default: false) to disable any action
1001
+
1002
+ Events:
1003
+
1004
+ - **onChange** event emited when user make changes
1005
+
1006
+ Example:
1007
+
1008
+ `example.module.ts`
1009
+
1010
+ ```Typescript
1011
+ import { MonkeyToggleModule } from 'monkey-style-guide';
1012
+
1013
+ ...
1014
+
1015
+ @NgModule({
1016
+ imports: [MonkeyToggleModule]
1017
+ })
1018
+ ...
1019
+ ```
1020
+
1021
+ `example.component.html`
1022
+
1023
+ ## Prerequisites
1024
+
1025
+ The main feature of this project is to allow changing the application theme, such as primary colors and error colors.
1026
+ For this, it is necessary to have a file called monkey-style-guide-settings.json at the root of your project's assets folder.
1027
+
1028
+ For example:
1029
+
1030
+ ![Settings Json Screen Shot][settings-screenshot]
1031
+
1032
+ Content of monkey-style-guide-settings.json:
1033
+
1034
+ ```JSON
1035
+ {
1036
+ "theme": {
1037
+ "title": "Monkey Exchange",
1038
+ "favicon": "assets/favicon.svg"
1039
+ },
1040
+ "colors": {
1041
+ "theme": {
1042
+ "main": "#034EA2",
1043
+ "100": "#F5FAFF",
1044
+ "200": "#D7EAFE",
1045
+ "300": "#A5CFFE",
1046
+ "400": "#72B4FD",
1047
+ "500": "#4099FC",
1048
+ "600": "#0F7EFB",
1049
+ "700": "#0465D2",
1050
+ "800": "#023064",
1051
+ "900": "#023064",
1052
+ "contrast": {
1053
+ "main": "white",
1054
+ "100": "rgba(black, 0.87)",
1055
+ "200": "white",
1056
+ "300": "white",
1057
+ "400": "white",
1058
+ "500": "white",
1059
+ "600": "white",
1060
+ "700": "white",
1061
+ "800": "white",
1062
+ "900": "white"
1063
+ }
1064
+ },
1065
+ "error": {
1066
+ "main": "#e70c0c",
1067
+ "100": "#fbb5b5",
1068
+ "200": "#f87f7f",
1069
+ "300": "#f53b3b",
1070
+ "400": "#f31e1e",
1071
+ "500": "#e70c0c",
1072
+ "600": "#ca0a0a",
1073
+ "700": "#ad0909",
1074
+ "800": "#900707",
1075
+ "900": "#730606",
1076
+ "contrast": {
1077
+ "main": "white",
1078
+ "100": "rgba(black, 0.87)",
1079
+ "200": "rgba(black, 0.87)",
1080
+ "300": "white",
1081
+ "400": "white",
1082
+ "500": "white",
1083
+ "600": "white",
1084
+ "700": "white",
1085
+ "800": "white",
1086
+ "900": "white"
1087
+ }
1088
+ },
1089
+ "warning": {
1090
+ "main": "#efa30e",
1091
+ "100": "#fbe7be",
1092
+ "200": "#f8d389",
1093
+ "300": "#f4b946",
1094
+ "400": "#f2ae29",
1095
+ "500": "#efa30e",
1096
+ "600": "#d28f0c",
1097
+ "700": "#b57c0b",
1098
+ "800": "#986809",
1099
+ "900": "#7b5407",
1100
+ "contrast": {
1101
+ "main": "rgba(black, 0.87)",
1102
+ "100": "rgba(black, 0.87)",
1103
+ "200": "rgba(black, 0.87)",
1104
+ "300": "rgba(black, 0.87)",
1105
+ "400": "rgba(black, 0.87)",
1106
+ "500": "rgba(black, 0.87)",
1107
+ "600": "rgba(black, 0.87)",
1108
+ "700": "rgba(black, 0.87)",
1109
+ "800": "white",
1110
+ "900": "white"
1111
+ }
1112
+ },
1113
+ "success": {
1114
+ "main": "#00875a",
1115
+ "100": "#45ffc1",
1116
+ "200": "#0dffae",
1117
+ "300": "#00c483",
1118
+ "400": "#00a66e",
1119
+ "500": "#00875a",
1120
+ "600": "#006846",
1121
+ "700": "#004a31",
1122
+ "800": "#002b1d",
1123
+ "900": "#000d08",
1124
+ "contrast": {
1125
+ "main": "white",
1126
+ "100": "rgba(black, 0.87)",
1127
+ "200": "rgba(black, 0.87)",
1128
+ "300": "rgba(black, 0.87)",
1129
+ "400": "white",
1130
+ "500": "white",
1131
+ "600": "white",
1132
+ "700": "white",
1133
+ "800": "white",
1134
+ "900": "white"
1135
+ }
1136
+ },
1137
+ "question": {
1138
+ "main": "#8D38FA",
1139
+ "100": "#F4EBFF",
1140
+ "200": "#E8D7FE",
1141
+ "300": "#D2AFFD",
1142
+ "400": "#A460FB",
1143
+ "500": "#8D38FA",
1144
+ "600": "#7710F9",
1145
+ "700": "#5104B3",
1146
+ "800": "#2D0264",
1147
+ "900": "#1B013C",
1148
+ "contrast": {
1149
+ "main": "white",
1150
+ "100": "rgba(black, 0.87)",
1151
+ "200": "rgba(black, 0.87)",
1152
+ "300": "rgba(black, 0.87)",
1153
+ "400": "white",
1154
+ "500": "white",
1155
+ "600": "white",
1156
+ "700": "white",
1157
+ "800": "white",
1158
+ "900": "white"
1159
+ }
1160
+ }
1161
+ }
1162
+ }
1163
+ ```
1164
+
1165
+ ## Installation
1166
+
1167
+ 1. Install NPM packages:
1168
+
1169
+ ```sh
1170
+ npm install monkey-style-guide
1171
+ ```
1172
+
1173
+ ## Usage
1174
+
1175
+ Import `monkey-style-guide` in your `style.scss`
1176
+
1177
+ ```scss
1178
+ @import '~monkey-style-guide/assets/scss/theme';
1179
+ ```
1180
+
1181
+ Import `MonkeyStyleGuideModule` in your `app.module.ts`
1182
+
1183
+ ```Typescript
1184
+ import { MonkeyStyleGuideModule } from 'monkey-style-guide';
1185
+
1186
+ @NgModule({
1187
+ declarations: [AppComponent],
1188
+ imports: [MonkeyStyleGuideModule],
1189
+ bootstrap: [AppComponent],
1190
+ })
1191
+ export class AppModule {}
1192
+ ```
1193
+
1194
+ Than call the `bootstrap` method in your `app.component.ts`
1195
+
1196
+ ```Typescript
1197
+ import { Component } from '@angular/core';
1198
+ import { MonkeyStyleGuideSettingsService } from 'monkey-style-guide';
1199
+
1200
+ @Component({
1201
+ selector: 'app-root',
1202
+ templateUrl: './app.component.html',
1203
+ styleUrls: ['./app.component.scss'],
1204
+ })
1205
+ export class AppComponent {
1206
+ constructor(private settingsService: MonkeyStyleGuideSettingsService) {
1207
+ this.settingsService.boostrap('');
1208
+ }
1209
+ }
1210
+ ```
1211
+
1212
+ <!-- MARKDOWN LINKS & IMAGES -->
1213
+ <!-- https://www.markdownguide.org/basic-syntax/#reference-style-links -->
1214
+
1215
+ [badge-screenshot]: https://user-images.githubusercontent.com/10110065/111625441-9e5df280-87cb-11eb-905c-008607cf859e.png
1216
+ [button-avatar-screenshot]: https://user-images.githubusercontent.com/10110065/111626956-50e28500-87cd-11eb-85c1-aaa8c06bb4e0.png
1217
+ [button-dropdown-screenshot1]: https://user-images.githubusercontent.com/10110065/111631407-1e875680-87d2-11eb-9631-d1d2ccf8f076.png
1218
+ [button-dropdown-screenshot2]: https://user-images.githubusercontent.com/10110065/111631726-82118400-87d2-11eb-9653-4502c3d82d51.png
1219
+ [buttons-screenshot]: https://user-images.githubusercontent.com/10110065/142933460-7a84ad76-b57f-40a0-b809-292af31c1e8f.png
1220
+ [checkbox-screenshot]: https://dev-monkey-emails.s3-us-west-2.amazonaws.com/monkey-style-guide/demos/images/checkbox.png
1221
+ [contributors-shield]: https://img.shields.io/badge/Contributors-2-brightgreen?style=flat
1222
+ [contributors-url]: https://github.com/MonkeyECX/monkey-style-guide/graphs/contributors
1223
+ [date-range-picker]: https://user-images.githubusercontent.com/12416871/146080473-8543b9ae-7186-42ee-8ec8-bfd1eef09df6.png
1224
+ [expansion-screenshot1]: https://user-images.githubusercontent.com/10110065/111636157-f8b08080-87d6-11eb-86ab-86839297d068.png
1225
+ [expansion-screenshot2]: https://user-images.githubusercontent.com/10110065/111636340-24336b00-87d7-11eb-9f19-504ab96cc9af.png
1226
+ [file-upload-screenshot1]: https://user-images.githubusercontent.com/10110065/111640018-8b065380-87da-11eb-8d47-87ddea29b943.png
1227
+ [icons-screenshot1]: https://user-images.githubusercontent.com/12416871/185962998-40a980bd-545b-4ae5-a0ed-2c4f0a1253c2.png
1228
+ [input-filter-screenshot]: https://user-images.githubusercontent.com/32619691/163216159-3a9f985e-3ba9-4e10-8ba4-0f60931f83d1.png
1229
+ [input-screenshot]: https://dev-monkey-emails.s3-us-west-2.amazonaws.com/monkey-style-guide/demos/images/input.png
1230
+ [license-shield]: https://img.shields.io/github/license/othneildrew/Best-README-Template.svg?style=flat-square
1231
+ [license-url]: https://github.com/othneildrew/Best-README-Template/blob/master/LICENSE.txt
1232
+ [linkedin-shield]: https://img.shields.io/badge/-LinkedIn-black.svg?style=flat-square&logo=linkedin&colorB=157
1233
+ [linkedin-url]: https://www.linkedin.com/company/monkeyexchange
1234
+ [modal-screenshot]: https://user-images.githubusercontent.com/12416871/119838920-2c480f00-beda-11eb-9e44-e42262f39c34.png
1235
+ [radiobutton-screenshot]: https://dev-monkey-emails.s3-us-west-2.amazonaws.com/monkey-style-guide/demos/images/radiobutton.png
1236
+ [select-screenshot]: https://dev-monkey-emails.s3-us-west-2.amazonaws.com/monkey-style-guide/demos/images/select.png
1237
+ [settings-screenshot]: https://dev-monkey-emails.s3-us-west-2.amazonaws.com/monkey-style-guide/demos/images/style-settings-json.png
1238
+ [table-screenshot]: https://user-images.githubusercontent.com/12416871/119574643-29d79f00-bd8c-11eb-9747-2e6dc86410da.png
1239
+ [toggle-screenshot]: https://user-images.githubusercontent.com/12416871/119849813-53570e80-bee3-11eb-87f8-0871f8e26f58.png