monkey-style-guide 2.0.149 → 2.0.152

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