monkey-style-guide 2.0.165 → 2.0.167
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.
- package/README.md +1266 -1260
- package/assets/data/country-codes.json +1466 -1466
- package/assets/icons/add-plus.svg +5 -5
- package/assets/icons/arrow-down.svg +3 -3
- package/assets/icons/arrow-left.svg +3 -3
- package/assets/icons/arrow-line-right.svg +5 -5
- package/assets/icons/arrow-right.svg +3 -3
- package/assets/icons/arrow-up.svg +3 -3
- package/assets/icons/arrows.svg +6 -6
- package/assets/icons/auction.svg +7 -7
- package/assets/icons/average-tax.svg +6 -0
- package/assets/icons/bank-account.svg +12 -12
- package/assets/icons/bank-agency.svg +8 -0
- package/assets/icons/bank.svg +3 -3
- package/assets/icons/banknote-search.svg +8 -8
- package/assets/icons/bell.svg +4 -4
- package/assets/icons/block.svg +4 -4
- package/assets/icons/book-open-text.svg +10 -10
- package/assets/icons/book.svg +4 -4
- package/assets/icons/box.svg +6 -6
- package/assets/icons/build-person.svg +9 -9
- package/assets/icons/calendar.svg +6 -6
- package/assets/icons/camera.svg +4 -4
- package/assets/icons/card-machine.svg +14 -14
- package/assets/icons/card.svg +4 -4
- package/assets/icons/cash-banknote-invoice.svg +8 -8
- package/assets/icons/chat.svg +4 -4
- package/assets/icons/check-circle-out.svg +4 -4
- package/assets/icons/check-circle.svg +4 -4
- package/assets/icons/check-grey.svg +3 -3
- package/assets/icons/check-white.svg +4 -4
- package/assets/icons/check.svg +3 -3
- package/assets/icons/clipboard.svg +4 -4
- package/assets/icons/clock-closed.svg +6 -6
- package/assets/icons/clock.svg +4 -4
- package/assets/icons/close-circle.svg +5 -5
- package/assets/icons/close.svg +4 -4
- package/assets/icons/cnpj.svg +9 -9
- package/assets/icons/codepen.svg +7 -7
- package/assets/icons/company-name.svg +12 -12
- package/assets/icons/contract-pen.svg +7 -7
- package/assets/icons/contract.svg +14 -14
- package/assets/icons/delete.svg +5 -5
- package/assets/icons/document.svg +7 -7
- package/assets/icons/dollar-sign-circle.svg +7 -7
- package/assets/icons/dollar-sign.svg +5 -5
- package/assets/icons/domain.svg +9 -9
- package/assets/icons/dots-menu.svg +5 -5
- package/assets/icons/double-arrow-left.svg +4 -4
- package/assets/icons/double-arrow-right.svg +4 -4
- package/assets/icons/download.svg +5 -5
- package/assets/icons/edit-square.svg +4 -4
- package/assets/icons/edit.svg +3 -3
- package/assets/icons/email.svg +4 -4
- package/assets/icons/empty-doc.svg +4 -4
- package/assets/icons/error.svg +5 -5
- package/assets/icons/eye-closed.svg +11 -11
- package/assets/icons/eye-open.svg +4 -4
- package/assets/icons/filter-add.svg +6 -6
- package/assets/icons/filter.svg +3 -3
- package/assets/icons/grid.svg +6 -6
- package/assets/icons/help.svg +5 -5
- package/assets/icons/hexagon.svg +3 -3
- package/assets/icons/home.svg +4 -4
- package/assets/icons/image.svg +5 -5
- package/assets/icons/info.svg +6 -6
- package/assets/icons/invoice.svg +5 -5
- package/assets/icons/invoices-anticipated.svg +8 -8
- package/assets/icons/invoices-approval.svg +8 -8
- package/assets/icons/invoices-refused.svg +8 -8
- package/assets/icons/list.svg +8 -8
- package/assets/icons/location-pin.svg +4 -4
- package/assets/icons/login.svg +5 -5
- package/assets/icons/logout.svg +5 -5
- package/assets/icons/medal.svg +12 -12
- package/assets/icons/menu.svg +5 -5
- package/assets/icons/money-cedule.svg +6 -6
- package/assets/icons/money-discount.svg +8 -0
- package/assets/icons/money-hand.svg +6 -6
- package/assets/icons/money-net.svg +8 -0
- package/assets/icons/money-new.svg +7 -0
- package/assets/icons/money-sign.svg +4 -4
- package/assets/icons/money.svg +6 -6
- package/assets/icons/more-circle.svg +5 -5
- package/assets/icons/more.svg +4 -4
- package/assets/icons/new-company.svg +10 -10
- package/assets/icons/offered.svg +5 -5
- package/assets/icons/office-work.svg +10 -0
- package/assets/icons/open-external.svg +5 -5
- package/assets/icons/password.svg +4 -4
- package/assets/icons/people.svg +6 -6
- package/assets/icons/percent.svg +5 -5
- package/assets/icons/person-document.svg +10 -10
- package/assets/icons/person-sad.svg +6 -6
- package/assets/icons/phone.svg +3 -3
- package/assets/icons/pork.svg +5 -5
- package/assets/icons/radio.svg +4 -4
- package/assets/icons/refresh.svg +5 -5
- package/assets/icons/registration.svg +8 -0
- package/assets/icons/repeat.svg +4 -4
- package/assets/icons/search.svg +4 -4
- package/assets/icons/second-warning.svg +5 -5
- package/assets/icons/settings.svg +4 -4
- package/assets/icons/shield-chekmark.svg +3 -3
- package/assets/icons/star.svg +3 -3
- package/assets/icons/store.svg +8 -8
- package/assets/icons/today.svg +9 -9
- package/assets/icons/trash.svg +6 -6
- package/assets/icons/trophy.svg +8 -8
- package/assets/icons/unfold-more.svg +4 -4
- package/assets/icons/upload.svg +5 -5
- package/assets/icons/user.svg +4 -4
- package/assets/icons/waiting.svg +17 -17
- package/assets/icons/wallet.svg +5 -5
- package/assets/icons/warning.svg +5 -5
- package/assets/scss/partials/_forms.scss +350 -350
- package/assets/scss/partials/_index.scss +11 -11
- package/assets/scss/partials/_radio-button.scss +35 -35
- package/assets/scss/partials/_style-reset.scss +185 -185
- package/assets/scss/partials/_typography.scss +149 -149
- package/assets/scss/partials/_variables.scss +184 -184
- package/assets/scss/partials/components/_buttons.scss +831 -831
- package/assets/scss/partials/components/_checkbox.scss +69 -69
- package/assets/scss/partials/components/_date-range-picker.scss +265 -265
- package/assets/scss/partials/components/_expansion.scss +96 -96
- package/assets/scss/partials/components/_image-crop.scss +305 -305
- package/assets/scss/partials/components/_index.scss +23 -23
- package/assets/scss/partials/components/_input-phone.scss +36 -36
- package/assets/scss/partials/components/_input.scss +65 -65
- package/assets/scss/partials/components/_progressbar.scss +112 -112
- package/assets/scss/partials/components/_radiobutton.scss +66 -66
- package/assets/scss/partials/components/_select.scss +356 -356
- package/assets/scss/partials/components/_snackbar.scss +204 -204
- package/assets/scss/partials/components/_stepper.scss +86 -86
- package/assets/scss/partials/components/_table.scss +148 -148
- package/assets/scss/partials/components/_wizard.scss +112 -112
- package/esm2020/lib/components/badge/badge.component.mjs +43 -43
- package/esm2020/lib/components/badge/badge.module.mjs +18 -18
- package/esm2020/lib/components/badge/index.mjs +2 -2
- package/esm2020/lib/components/button/button-avatar.component.mjs +53 -53
- package/esm2020/lib/components/button/button-dropdown.component.mjs +121 -121
- package/esm2020/lib/components/button/button.component.mjs +154 -154
- package/esm2020/lib/components/button/button.module.mjs +23 -23
- package/esm2020/lib/components/button/index.mjs +5 -5
- package/esm2020/lib/components/checkbox/checkbox.component.mjs +165 -165
- package/esm2020/lib/components/checkbox/checkbox.module.mjs +20 -20
- package/esm2020/lib/components/checkbox/index.mjs +3 -3
- package/esm2020/lib/components/date-range-picker/date-range-picker.component.mjs +660 -660
- package/esm2020/lib/components/date-range-picker/date-range-picker.module.mjs +22 -22
- package/esm2020/lib/components/date-range-picker/index.mjs +3 -3
- package/esm2020/lib/components/expansion/expansion.component.mjs +115 -115
- package/esm2020/lib/components/expansion/expansion.module.mjs +19 -19
- package/esm2020/lib/components/expansion/index.mjs +2 -2
- package/esm2020/lib/components/file-upload/file-upload.component.mjs +294 -294
- package/esm2020/lib/components/file-upload/file-upload.module.mjs +37 -37
- package/esm2020/lib/components/file-upload/index.mjs +3 -3
- package/esm2020/lib/components/icon/icon-add-plus.component.mjs +15 -15
- package/esm2020/lib/components/icon/icon-arrow-down.component.mjs +15 -15
- package/esm2020/lib/components/icon/icon-arrow-left.component.mjs +15 -15
- package/esm2020/lib/components/icon/icon-arrow-line-right.component.mjs +15 -15
- package/esm2020/lib/components/icon/icon-arrow-right.component.mjs +15 -15
- package/esm2020/lib/components/icon/icon-arrow-up.component.mjs +15 -15
- package/esm2020/lib/components/icon/icon-arrows.component.mjs +15 -15
- package/esm2020/lib/components/icon/icon-auction.component.mjs +15 -15
- package/esm2020/lib/components/icon/icon-average-tax.mjs +15 -0
- package/esm2020/lib/components/icon/icon-bank-account.component.mjs +15 -15
- package/esm2020/lib/components/icon/icon-bank-agency.mjs +15 -0
- package/esm2020/lib/components/icon/icon-bank.component.mjs +15 -15
- package/esm2020/lib/components/icon/icon-banknote-search.component.mjs +15 -15
- package/esm2020/lib/components/icon/icon-bell.component.mjs +15 -15
- package/esm2020/lib/components/icon/icon-block.component.mjs +15 -15
- package/esm2020/lib/components/icon/icon-book-open-text.component.mjs +15 -15
- package/esm2020/lib/components/icon/icon-book.component.mjs +15 -15
- package/esm2020/lib/components/icon/icon-box.component.mjs +15 -15
- package/esm2020/lib/components/icon/icon-build-person.component.mjs +15 -15
- package/esm2020/lib/components/icon/icon-calendar.component.mjs +15 -15
- package/esm2020/lib/components/icon/icon-camera.component.mjs +15 -15
- package/esm2020/lib/components/icon/icon-card-machine.component.mjs +15 -15
- package/esm2020/lib/components/icon/icon-card.component.mjs +15 -15
- package/esm2020/lib/components/icon/icon-cash-banknote-invoice.mjs +15 -15
- package/esm2020/lib/components/icon/icon-chat.component.mjs +15 -15
- package/esm2020/lib/components/icon/icon-check-circle-out.component.mjs +15 -15
- package/esm2020/lib/components/icon/icon-check-circle.component.mjs +15 -15
- package/esm2020/lib/components/icon/icon-check-grey.component.mjs +15 -15
- package/esm2020/lib/components/icon/icon-check-white.component.mjs +15 -15
- package/esm2020/lib/components/icon/icon-check.component.mjs +15 -15
- package/esm2020/lib/components/icon/icon-clipboard.component.mjs +15 -15
- package/esm2020/lib/components/icon/icon-clock-closed.component.mjs +15 -15
- package/esm2020/lib/components/icon/icon-clock.component.mjs +15 -15
- package/esm2020/lib/components/icon/icon-close-circle.component.mjs +15 -15
- package/esm2020/lib/components/icon/icon-close.component.mjs +15 -15
- package/esm2020/lib/components/icon/icon-cnpj.component.mjs +15 -15
- package/esm2020/lib/components/icon/icon-codepen.component.mjs +15 -15
- package/esm2020/lib/components/icon/icon-company-name.component.mjs +15 -15
- package/esm2020/lib/components/icon/icon-contract-pen.component.mjs +15 -15
- package/esm2020/lib/components/icon/icon-contract.component.mjs +15 -15
- package/esm2020/lib/components/icon/icon-delete.component.mjs +15 -15
- package/esm2020/lib/components/icon/icon-document.component.mjs +15 -15
- package/esm2020/lib/components/icon/icon-dollar-sign-circle.component.mjs +15 -15
- package/esm2020/lib/components/icon/icon-dollar-sign.component.mjs +15 -15
- package/esm2020/lib/components/icon/icon-domain.component.mjs +15 -15
- package/esm2020/lib/components/icon/icon-dots-menu.component.mjs +15 -15
- package/esm2020/lib/components/icon/icon-double-arrow-left.component.mjs +15 -15
- package/esm2020/lib/components/icon/icon-double-arrow-right.component.mjs +15 -15
- package/esm2020/lib/components/icon/icon-download.component.mjs +15 -15
- package/esm2020/lib/components/icon/icon-edit-square.component.mjs +15 -15
- package/esm2020/lib/components/icon/icon-edit.component.mjs +15 -15
- package/esm2020/lib/components/icon/icon-email.component.mjs +15 -15
- package/esm2020/lib/components/icon/icon-empty-doc.component.mjs +15 -15
- package/esm2020/lib/components/icon/icon-error.component.mjs +15 -15
- package/esm2020/lib/components/icon/icon-eye-closed.component.mjs +15 -15
- package/esm2020/lib/components/icon/icon-eye-open.component.mjs +15 -15
- package/esm2020/lib/components/icon/icon-filter-add.component.mjs +15 -15
- package/esm2020/lib/components/icon/icon-filter.component.mjs +15 -15
- package/esm2020/lib/components/icon/icon-grid.component.mjs +15 -15
- package/esm2020/lib/components/icon/icon-hands-clap.component.mjs +15 -15
- package/esm2020/lib/components/icon/icon-help.component.mjs +15 -15
- package/esm2020/lib/components/icon/icon-hexagon.component.mjs +15 -15
- package/esm2020/lib/components/icon/icon-home.component.mjs +15 -15
- package/esm2020/lib/components/icon/icon-image.component.mjs +15 -15
- package/esm2020/lib/components/icon/icon-info.component.mjs +15 -15
- package/esm2020/lib/components/icon/icon-invoice.component.mjs +15 -15
- package/esm2020/lib/components/icon/icon-invoices-anticipated.component.mjs +15 -15
- package/esm2020/lib/components/icon/icon-invoices-approval.component.mjs +15 -15
- package/esm2020/lib/components/icon/icon-invoices-refused.component.mjs +15 -15
- package/esm2020/lib/components/icon/icon-list.component.mjs +15 -15
- package/esm2020/lib/components/icon/icon-location-pin.component.mjs +15 -15
- package/esm2020/lib/components/icon/icon-login.component.mjs +15 -15
- package/esm2020/lib/components/icon/icon-logout.component.mjs +15 -15
- package/esm2020/lib/components/icon/icon-medal.component.mjs +15 -15
- package/esm2020/lib/components/icon/icon-menu.component.mjs +15 -15
- package/esm2020/lib/components/icon/icon-money-cedule.component.mjs +15 -15
- package/esm2020/lib/components/icon/icon-money-discount.mjs +15 -0
- package/esm2020/lib/components/icon/icon-money-hand.component.mjs +15 -15
- package/esm2020/lib/components/icon/icon-money-net.mjs +15 -0
- package/esm2020/lib/components/icon/icon-money-new.mjs +15 -0
- package/esm2020/lib/components/icon/icon-money-sign.component.mjs +15 -15
- package/esm2020/lib/components/icon/icon-money.component.mjs +15 -15
- package/esm2020/lib/components/icon/icon-more-circle.component.mjs +15 -15
- package/esm2020/lib/components/icon/icon-more.component.mjs +15 -15
- package/esm2020/lib/components/icon/icon-new-company.component.mjs +15 -15
- package/esm2020/lib/components/icon/icon-offered.component.mjs +15 -15
- package/esm2020/lib/components/icon/icon-open-external.component.mjs +15 -15
- package/esm2020/lib/components/icon/icon-password.component.mjs +15 -15
- package/esm2020/lib/components/icon/icon-people.component.mjs +15 -15
- package/esm2020/lib/components/icon/icon-percent.component.mjs +15 -15
- package/esm2020/lib/components/icon/icon-person-document.component.mjs +15 -15
- package/esm2020/lib/components/icon/icon-person-sad.component.mjs +15 -15
- package/esm2020/lib/components/icon/icon-phone-call.component.mjs +15 -15
- package/esm2020/lib/components/icon/icon-phone.component.mjs +15 -15
- package/esm2020/lib/components/icon/icon-pin-navigation.component.mjs +15 -15
- package/esm2020/lib/components/icon/icon-pork.component.mjs +15 -15
- package/esm2020/lib/components/icon/icon-radio.component.mjs +15 -15
- package/esm2020/lib/components/icon/icon-refresh.component.mjs +15 -15
- package/esm2020/lib/components/icon/icon-registration.mjs +15 -0
- package/esm2020/lib/components/icon/icon-repeat.component.mjs +15 -15
- package/esm2020/lib/components/icon/icon-search.component.mjs +15 -15
- package/esm2020/lib/components/icon/icon-second-warning.component.mjs +15 -15
- package/esm2020/lib/components/icon/icon-settings.component.mjs +15 -15
- package/esm2020/lib/components/icon/icon-shield-chekmark.component.mjs +15 -15
- package/esm2020/lib/components/icon/icon-star.component.mjs +15 -15
- package/esm2020/lib/components/icon/icon-store.component.mjs +15 -15
- package/esm2020/lib/components/icon/icon-today.component.mjs +15 -15
- package/esm2020/lib/components/icon/icon-trash.component.mjs +15 -15
- package/esm2020/lib/components/icon/icon-trophy.component.mjs +15 -15
- package/esm2020/lib/components/icon/icon-unfold-more.component.mjs +15 -15
- package/esm2020/lib/components/icon/icon-upload.component.mjs +15 -15
- package/esm2020/lib/components/icon/icon-user-group.component.mjs +15 -15
- package/esm2020/lib/components/icon/icon-user.component.mjs +15 -15
- package/esm2020/lib/components/icon/icon-waiting.component.mjs +15 -15
- package/esm2020/lib/components/icon/icon-wallet.component.mjs +15 -15
- package/esm2020/lib/components/icon/icon-warning.component.mjs +15 -15
- package/esm2020/lib/components/icon/icon.component.mjs +1601 -1523
- package/esm2020/lib/components/icon/icon.module.mjs +369 -351
- package/esm2020/lib/components/icon/index.mjs +108 -102
- package/esm2020/lib/components/image-crop/image-crop.component.mjs +516 -516
- package/esm2020/lib/components/image-crop/image-crop.module.mjs +41 -41
- package/esm2020/lib/components/image-crop/index.mjs +3 -3
- package/esm2020/lib/components/index.mjs +20 -20
- package/esm2020/lib/components/input/index.mjs +4 -4
- package/esm2020/lib/components/input/input-filter.component.mjs +286 -286
- package/esm2020/lib/components/input/input.component.mjs +384 -384
- package/esm2020/lib/components/input/input.module.mjs +38 -38
- package/esm2020/lib/components/input-phone/index.mjs +3 -3
- package/esm2020/lib/components/input-phone/input-phone.component.mjs +307 -307
- package/esm2020/lib/components/input-phone/input-phone.module.mjs +45 -45
- package/esm2020/lib/components/modal/index.mjs +3 -3
- package/esm2020/lib/components/modal/modal.component.mjs +236 -236
- package/esm2020/lib/components/modal/modal.module.mjs +21 -21
- package/esm2020/lib/components/option/index.mjs +3 -3
- package/esm2020/lib/components/option/option.component.mjs +131 -131
- package/esm2020/lib/components/option/option.module.mjs +29 -29
- package/esm2020/lib/components/radiobutton/index.mjs +3 -3
- package/esm2020/lib/components/radiobutton/radiobutton.component.mjs +165 -165
- package/esm2020/lib/components/radiobutton/radiobutton.module.mjs +36 -36
- package/esm2020/lib/components/select/index.mjs +6 -6
- package/esm2020/lib/components/select/select-filter.component.mjs +197 -197
- package/esm2020/lib/components/select/select-multiple.component.mjs +304 -304
- package/esm2020/lib/components/select/select-search.component.mjs +306 -306
- package/esm2020/lib/components/select/select.component.mjs +245 -245
- package/esm2020/lib/components/select/select.module.mjs +61 -61
- package/esm2020/lib/components/stepper/index.mjs +3 -3
- package/esm2020/lib/components/stepper/stepper.component.mjs +57 -57
- package/esm2020/lib/components/stepper/stepper.module.mjs +20 -20
- package/esm2020/lib/components/tab/index.mjs +2 -2
- package/esm2020/lib/components/tab/tab.component.mjs +91 -91
- package/esm2020/lib/components/tab/tab.module.mjs +20 -20
- package/esm2020/lib/components/table/index.mjs +4 -4
- package/esm2020/lib/components/table/table-column.component.mjs +34 -34
- package/esm2020/lib/components/table/table.component.mjs +267 -267
- package/esm2020/lib/components/table/table.module.mjs +23 -23
- package/esm2020/lib/components/toggle/index.mjs +2 -2
- package/esm2020/lib/components/toggle/toggle.component.mjs +56 -56
- package/esm2020/lib/components/toggle/toggle.module.mjs +18 -18
- package/esm2020/lib/components/wizard/index.mjs +3 -3
- package/esm2020/lib/components/wizard/wizard.component.mjs +61 -61
- package/esm2020/lib/components/wizard/wizard.module.mjs +33 -33
- package/esm2020/lib/core/index.mjs +4 -4
- package/esm2020/lib/core/interfaces/index.mjs +2 -2
- package/esm2020/lib/core/interfaces/monkey-modal-settings.mjs +1 -1
- package/esm2020/lib/core/interfaces/monkey-style-settings.mjs +2 -2
- package/esm2020/lib/core/services/index.mjs +4 -4
- package/esm2020/lib/core/services/modal/index.mjs +2 -2
- package/esm2020/lib/core/services/modal/monkey-style-guide-modal-fixed.service.mjs +51 -51
- package/esm2020/lib/core/services/modal/monkey-style-guide-modal.service.mjs +54 -54
- package/esm2020/lib/core/services/monkey-style-guide.service.mjs +17 -17
- package/esm2020/lib/core/services/settings/index.mjs +1 -1
- package/esm2020/lib/core/services/settings/monkey-style-guide-settings.service.mjs +41 -41
- package/esm2020/lib/core/services/settings/monkey-style-guide-theme-settings.service.mjs +80 -80
- package/esm2020/lib/core/services/snackbar/index.mjs +1 -1
- package/esm2020/lib/core/services/snackbar/mokey-style-guide-snackbar.service.mjs +226 -226
- package/esm2020/lib/core/utils/index.mjs +1 -1
- package/esm2020/lib/core/utils/utils.mjs +240 -240
- package/esm2020/lib/monkey-style-guide.module.mjs +31 -31
- package/esm2020/monkey-style-guide.mjs +4 -4
- package/esm2020/public-api.mjs +9 -9
- package/fesm2015/monkey-style-guide.mjs +9418 -9256
- package/fesm2015/monkey-style-guide.mjs.map +1 -1
- package/fesm2020/monkey-style-guide.mjs +9407 -9245
- package/fesm2020/monkey-style-guide.mjs.map +1 -1
- package/lib/components/badge/badge.component.d.ts +8 -8
- package/lib/components/badge/badge.module.d.ts +8 -8
- package/lib/components/badge/index.d.ts +2 -2
- package/lib/components/button/button-avatar.component.d.ts +19 -19
- package/lib/components/button/button-dropdown.component.d.ts +23 -23
- package/lib/components/button/button.component.d.ts +22 -22
- package/lib/components/button/button.module.d.ts +12 -12
- package/lib/components/button/index.d.ts +4 -4
- package/lib/components/checkbox/checkbox.component.d.ts +32 -32
- package/lib/components/checkbox/checkbox.module.d.ts +9 -9
- package/lib/components/checkbox/index.d.ts +2 -2
- package/lib/components/date-range-picker/date-range-picker.component.d.ts +69 -69
- package/lib/components/date-range-picker/date-range-picker.module.d.ts +11 -11
- package/lib/components/date-range-picker/index.d.ts +2 -2
- package/lib/components/expansion/expansion.component.d.ts +20 -20
- package/lib/components/expansion/expansion.module.d.ts +9 -9
- package/lib/components/expansion/index.d.ts +2 -2
- package/lib/components/file-upload/file-upload.component.d.ts +51 -51
- package/lib/components/file-upload/file-upload.module.d.ts +11 -11
- package/lib/components/file-upload/index.d.ts +2 -2
- package/lib/components/icon/icon-add-plus.component.d.ts +7 -7
- package/lib/components/icon/icon-arrow-down.component.d.ts +7 -7
- package/lib/components/icon/icon-arrow-left.component.d.ts +7 -7
- package/lib/components/icon/icon-arrow-line-right.component.d.ts +7 -7
- package/lib/components/icon/icon-arrow-right.component.d.ts +7 -7
- package/lib/components/icon/icon-arrow-up.component.d.ts +7 -7
- package/lib/components/icon/icon-arrows.component.d.ts +7 -7
- package/lib/components/icon/icon-auction.component.d.ts +7 -7
- package/lib/components/icon/icon-average-tax.d.ts +7 -0
- package/lib/components/icon/icon-bank-account.component.d.ts +7 -7
- package/lib/components/icon/icon-bank-agency.d.ts +7 -0
- package/lib/components/icon/icon-bank.component.d.ts +7 -7
- package/lib/components/icon/icon-banknote-search.component.d.ts +7 -7
- package/lib/components/icon/icon-bell.component.d.ts +7 -7
- package/lib/components/icon/icon-block.component.d.ts +7 -7
- package/lib/components/icon/icon-book-open-text.component.d.ts +7 -7
- package/lib/components/icon/icon-book.component.d.ts +7 -7
- package/lib/components/icon/icon-box.component.d.ts +7 -7
- package/lib/components/icon/icon-build-person.component.d.ts +7 -7
- package/lib/components/icon/icon-calendar.component.d.ts +7 -7
- package/lib/components/icon/icon-camera.component.d.ts +7 -7
- package/lib/components/icon/icon-card-machine.component.d.ts +7 -7
- package/lib/components/icon/icon-card.component.d.ts +7 -7
- package/lib/components/icon/icon-cash-banknote-invoice.d.ts +7 -7
- package/lib/components/icon/icon-chat.component.d.ts +7 -7
- package/lib/components/icon/icon-check-circle-out.component.d.ts +7 -7
- package/lib/components/icon/icon-check-circle.component.d.ts +7 -7
- package/lib/components/icon/icon-check-grey.component.d.ts +7 -7
- package/lib/components/icon/icon-check-white.component.d.ts +7 -7
- package/lib/components/icon/icon-check.component.d.ts +7 -7
- package/lib/components/icon/icon-clipboard.component.d.ts +7 -7
- package/lib/components/icon/icon-clock-closed.component.d.ts +7 -7
- package/lib/components/icon/icon-clock.component.d.ts +7 -7
- package/lib/components/icon/icon-close-circle.component.d.ts +7 -7
- package/lib/components/icon/icon-close.component.d.ts +7 -7
- package/lib/components/icon/icon-cnpj.component.d.ts +7 -7
- package/lib/components/icon/icon-codepen.component.d.ts +7 -7
- package/lib/components/icon/icon-company-name.component.d.ts +7 -7
- package/lib/components/icon/icon-contract-pen.component.d.ts +7 -7
- package/lib/components/icon/icon-contract.component.d.ts +7 -7
- package/lib/components/icon/icon-delete.component.d.ts +7 -7
- package/lib/components/icon/icon-document.component.d.ts +7 -7
- package/lib/components/icon/icon-dollar-sign-circle.component.d.ts +7 -7
- package/lib/components/icon/icon-dollar-sign.component.d.ts +7 -7
- package/lib/components/icon/icon-domain.component.d.ts +7 -7
- package/lib/components/icon/icon-dots-menu.component.d.ts +7 -7
- package/lib/components/icon/icon-double-arrow-left.component.d.ts +7 -7
- package/lib/components/icon/icon-double-arrow-right.component.d.ts +7 -7
- package/lib/components/icon/icon-download.component.d.ts +7 -7
- package/lib/components/icon/icon-edit-square.component.d.ts +7 -7
- package/lib/components/icon/icon-edit.component.d.ts +7 -7
- package/lib/components/icon/icon-email.component.d.ts +7 -7
- package/lib/components/icon/icon-empty-doc.component.d.ts +7 -7
- package/lib/components/icon/icon-error.component.d.ts +7 -7
- package/lib/components/icon/icon-eye-closed.component.d.ts +7 -7
- package/lib/components/icon/icon-eye-open.component.d.ts +7 -7
- package/lib/components/icon/icon-filter-add.component.d.ts +7 -7
- package/lib/components/icon/icon-filter.component.d.ts +7 -7
- package/lib/components/icon/icon-grid.component.d.ts +7 -7
- package/lib/components/icon/icon-hands-clap.component.d.ts +7 -7
- package/lib/components/icon/icon-help.component.d.ts +7 -7
- package/lib/components/icon/icon-hexagon.component.d.ts +7 -7
- package/lib/components/icon/icon-home.component.d.ts +7 -7
- package/lib/components/icon/icon-image.component.d.ts +7 -7
- package/lib/components/icon/icon-info.component.d.ts +7 -7
- package/lib/components/icon/icon-invoice.component.d.ts +7 -7
- package/lib/components/icon/icon-invoices-anticipated.component.d.ts +7 -7
- package/lib/components/icon/icon-invoices-approval.component.d.ts +7 -7
- package/lib/components/icon/icon-invoices-refused.component.d.ts +7 -7
- package/lib/components/icon/icon-list.component.d.ts +7 -7
- package/lib/components/icon/icon-location-pin.component.d.ts +7 -7
- package/lib/components/icon/icon-login.component.d.ts +7 -7
- package/lib/components/icon/icon-logout.component.d.ts +7 -7
- package/lib/components/icon/icon-medal.component.d.ts +7 -7
- package/lib/components/icon/icon-menu.component.d.ts +7 -7
- package/lib/components/icon/icon-money-cedule.component.d.ts +7 -7
- package/lib/components/icon/icon-money-discount.d.ts +7 -0
- package/lib/components/icon/icon-money-hand.component.d.ts +7 -7
- package/lib/components/icon/icon-money-net.d.ts +7 -0
- package/lib/components/icon/icon-money-new.d.ts +7 -0
- package/lib/components/icon/icon-money-sign.component.d.ts +7 -7
- package/lib/components/icon/icon-money.component.d.ts +7 -7
- package/lib/components/icon/icon-more-circle.component.d.ts +7 -7
- package/lib/components/icon/icon-more.component.d.ts +7 -7
- package/lib/components/icon/icon-new-company.component.d.ts +7 -7
- package/lib/components/icon/icon-offered.component.d.ts +7 -7
- package/lib/components/icon/icon-open-external.component.d.ts +7 -7
- package/lib/components/icon/icon-password.component.d.ts +7 -7
- package/lib/components/icon/icon-people.component.d.ts +7 -7
- package/lib/components/icon/icon-percent.component.d.ts +7 -7
- package/lib/components/icon/icon-person-document.component.d.ts +7 -7
- package/lib/components/icon/icon-person-sad.component.d.ts +7 -7
- package/lib/components/icon/icon-phone-call.component.d.ts +7 -7
- package/lib/components/icon/icon-phone.component.d.ts +7 -7
- package/lib/components/icon/icon-pin-navigation.component.d.ts +7 -7
- package/lib/components/icon/icon-pork.component.d.ts +7 -7
- package/lib/components/icon/icon-radio.component.d.ts +7 -7
- package/lib/components/icon/icon-refresh.component.d.ts +7 -7
- package/lib/components/icon/icon-registration.d.ts +7 -0
- package/lib/components/icon/icon-repeat.component.d.ts +7 -7
- package/lib/components/icon/icon-search.component.d.ts +7 -7
- package/lib/components/icon/icon-second-warning.component.d.ts +7 -7
- package/lib/components/icon/icon-settings.component.d.ts +7 -7
- package/lib/components/icon/icon-shield-chekmark.component.d.ts +7 -7
- package/lib/components/icon/icon-star.component.d.ts +7 -7
- package/lib/components/icon/icon-store.component.d.ts +7 -7
- package/lib/components/icon/icon-today.component.d.ts +7 -7
- package/lib/components/icon/icon-trash.component.d.ts +7 -7
- package/lib/components/icon/icon-trophy.component.d.ts +7 -7
- package/lib/components/icon/icon-unfold-more.component.d.ts +7 -7
- package/lib/components/icon/icon-upload.component.d.ts +7 -7
- package/lib/components/icon/icon-user-group.component.d.ts +7 -7
- package/lib/components/icon/icon-user.component.d.ts +7 -7
- package/lib/components/icon/icon-waiting.component.d.ts +7 -7
- package/lib/components/icon/icon-wallet.component.d.ts +7 -7
- package/lib/components/icon/icon-warning.component.d.ts +7 -7
- package/lib/components/icon/icon.component.d.ts +27 -27
- package/lib/components/icon/icon.module.d.ts +124 -118
- package/lib/components/icon/index.d.ts +107 -101
- package/lib/components/image-crop/image-crop.component.d.ts +77 -77
- package/lib/components/image-crop/image-crop.module.d.ts +12 -12
- package/lib/components/image-crop/index.d.ts +2 -2
- package/lib/components/index.d.ts +19 -19
- package/lib/components/input/index.d.ts +3 -3
- package/lib/components/input/input-filter.component.d.ts +55 -55
- package/lib/components/input/input.component.d.ts +64 -64
- package/lib/components/input/input.module.d.ts +12 -12
- package/lib/components/input-phone/index.d.ts +2 -2
- package/lib/components/input-phone/input-phone.component.d.ts +62 -62
- package/lib/components/input-phone/input-phone.module.d.ts +13 -13
- package/lib/components/modal/index.d.ts +2 -2
- package/lib/components/modal/modal.component.d.ts +24 -24
- package/lib/components/modal/modal.module.d.ts +10 -10
- package/lib/components/option/index.d.ts +2 -2
- package/lib/components/option/option.component.d.ts +22 -22
- package/lib/components/option/option.module.d.ts +8 -8
- package/lib/components/radiobutton/index.d.ts +2 -2
- package/lib/components/radiobutton/radiobutton.component.d.ts +39 -39
- package/lib/components/radiobutton/radiobutton.module.d.ts +9 -9
- package/lib/components/select/index.d.ts +5 -5
- package/lib/components/select/select-filter.component.d.ts +41 -41
- package/lib/components/select/select-multiple.component.d.ts +48 -48
- package/lib/components/select/select-search.component.d.ts +56 -56
- package/lib/components/select/select.component.d.ts +48 -48
- package/lib/components/select/select.module.d.ts +15 -15
- package/lib/components/stepper/index.d.ts +2 -2
- package/lib/components/stepper/stepper.component.d.ts +18 -18
- package/lib/components/stepper/stepper.module.d.ts +9 -9
- package/lib/components/tab/index.d.ts +2 -2
- package/lib/components/tab/tab.component.d.ts +24 -24
- package/lib/components/tab/tab.module.d.ts +10 -10
- package/lib/components/table/index.d.ts +3 -3
- package/lib/components/table/table-column.component.d.ts +5 -5
- package/lib/components/table/table.component.d.ts +59 -59
- package/lib/components/table/table.module.d.ts +12 -12
- package/lib/components/toggle/index.d.ts +2 -2
- package/lib/components/toggle/toggle.component.d.ts +18 -18
- package/lib/components/toggle/toggle.module.d.ts +8 -8
- package/lib/components/wizard/index.d.ts +2 -2
- package/lib/components/wizard/wizard.component.d.ts +18 -18
- package/lib/components/wizard/wizard.module.d.ts +9 -9
- package/lib/core/index.d.ts +3 -3
- package/lib/core/interfaces/index.d.ts +2 -2
- package/lib/core/interfaces/monkey-modal-settings.d.ts +58 -58
- package/lib/core/interfaces/monkey-style-settings.d.ts +59 -59
- package/lib/core/services/index.d.ts +3 -3
- package/lib/core/services/modal/index.d.ts +2 -2
- package/lib/core/services/modal/monkey-style-guide-modal-fixed.service.d.ts +16 -16
- package/lib/core/services/modal/monkey-style-guide-modal.service.d.ts +18 -18
- package/lib/core/services/monkey-style-guide.service.d.ts +10 -10
- package/lib/core/services/settings/index.d.ts +1 -1
- package/lib/core/services/settings/monkey-style-guide-settings.service.d.ts +15 -15
- package/lib/core/services/settings/monkey-style-guide-theme-settings.service.d.ts +12 -12
- package/lib/core/services/snackbar/index.d.ts +1 -1
- package/lib/core/services/snackbar/mokey-style-guide-snackbar.service.d.ts +58 -58
- package/lib/core/utils/index.d.ts +1 -1
- package/lib/core/utils/utils.d.ts +29 -29
- package/lib/monkey-style-guide.module.d.ts +8 -8
- package/monkey-style-guide-2.0.167.tgz +0 -0
- package/monkey-style-guide.d.ts +5 -5
- package/package.json +1 -1
- package/public-api.d.ts +8 -8
- package/monkey-style-guide-2.0.165.tgz +0 -0
package/README.md
CHANGED
|
@@ -1,1260 +1,1266 @@
|
|
|
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
|
-
- **add-plus**
|
|
452
|
-
- **arrow-down**
|
|
453
|
-
- **arrow-left**
|
|
454
|
-
- **arrow-line-right**
|
|
455
|
-
- **arrow-right**
|
|
456
|
-
- **arrow-up**
|
|
457
|
-
- **arrows**
|
|
458
|
-
- **auction**
|
|
459
|
-
- **
|
|
460
|
-
- **bank**
|
|
461
|
-
- **
|
|
462
|
-
- **
|
|
463
|
-
- **
|
|
464
|
-
- **
|
|
465
|
-
- **
|
|
466
|
-
- **
|
|
467
|
-
- **
|
|
468
|
-
- **
|
|
469
|
-
- **
|
|
470
|
-
- **
|
|
471
|
-
- **
|
|
472
|
-
- **
|
|
473
|
-
- **
|
|
474
|
-
- **
|
|
475
|
-
- **
|
|
476
|
-
- **check-
|
|
477
|
-
- **check-
|
|
478
|
-
- **check**
|
|
479
|
-
- **
|
|
480
|
-
- **
|
|
481
|
-
- **
|
|
482
|
-
- **
|
|
483
|
-
- **
|
|
484
|
-
- **
|
|
485
|
-
- **
|
|
486
|
-
- **
|
|
487
|
-
- **
|
|
488
|
-
- **
|
|
489
|
-
- **
|
|
490
|
-
- **
|
|
491
|
-
- **
|
|
492
|
-
- **
|
|
493
|
-
- **
|
|
494
|
-
- **
|
|
495
|
-
- **
|
|
496
|
-
- **
|
|
497
|
-
- **
|
|
498
|
-
- **
|
|
499
|
-
- **
|
|
500
|
-
- **
|
|
501
|
-
- **
|
|
502
|
-
- **
|
|
503
|
-
- **
|
|
504
|
-
- **
|
|
505
|
-
- **
|
|
506
|
-
- **
|
|
507
|
-
- **
|
|
508
|
-
- **
|
|
509
|
-
- **
|
|
510
|
-
- **
|
|
511
|
-
- **
|
|
512
|
-
- **
|
|
513
|
-
- **
|
|
514
|
-
- **
|
|
515
|
-
- **
|
|
516
|
-
- **
|
|
517
|
-
- **invoices-
|
|
518
|
-
- **
|
|
519
|
-
- **
|
|
520
|
-
- **
|
|
521
|
-
- **
|
|
522
|
-
- **
|
|
523
|
-
- **
|
|
524
|
-
- **
|
|
525
|
-
- **
|
|
526
|
-
- **money-
|
|
527
|
-
- **money**
|
|
528
|
-
- **
|
|
529
|
-
- **
|
|
530
|
-
- **new
|
|
531
|
-
- **
|
|
532
|
-
- **
|
|
533
|
-
- **
|
|
534
|
-
- **
|
|
535
|
-
- **
|
|
536
|
-
- **
|
|
537
|
-
- **
|
|
538
|
-
- **
|
|
539
|
-
- **
|
|
540
|
-
- **
|
|
541
|
-
- **
|
|
542
|
-
- **
|
|
543
|
-
- **
|
|
544
|
-
- **
|
|
545
|
-
- **
|
|
546
|
-
- **
|
|
547
|
-
- **
|
|
548
|
-
- **
|
|
549
|
-
- **
|
|
550
|
-
- **
|
|
551
|
-
- **
|
|
552
|
-
- **
|
|
553
|
-
- **
|
|
554
|
-
- **
|
|
555
|
-
- **
|
|
556
|
-
- **
|
|
557
|
-
- **
|
|
558
|
-
- **
|
|
559
|
-
- **
|
|
560
|
-
|
|
561
|
-
|
|
562
|
-
|
|
563
|
-
|
|
564
|
-
|
|
565
|
-
|
|
566
|
-
|
|
567
|
-
|
|
568
|
-
|
|
569
|
-
|
|
570
|
-
|
|
571
|
-
|
|
572
|
-
}
|
|
573
|
-
|
|
574
|
-
|
|
575
|
-
|
|
576
|
-
|
|
577
|
-
|
|
578
|
-
|
|
579
|
-
|
|
580
|
-
```
|
|
581
|
-
|
|
582
|
-
|
|
583
|
-
|
|
584
|
-
|
|
585
|
-
|
|
586
|
-
|
|
587
|
-
|
|
588
|
-
|
|
589
|
-
|
|
590
|
-
|
|
591
|
-
|
|
592
|
-
|
|
593
|
-
|
|
594
|
-
|
|
595
|
-
|
|
596
|
-
- **
|
|
597
|
-
- **
|
|
598
|
-
- **
|
|
599
|
-
- **
|
|
600
|
-
- **
|
|
601
|
-
- **
|
|
602
|
-
- **
|
|
603
|
-
- **
|
|
604
|
-
- **
|
|
605
|
-
- **
|
|
606
|
-
- **
|
|
607
|
-
|
|
608
|
-
|
|
609
|
-
|
|
610
|
-
- **
|
|
611
|
-
|
|
612
|
-
|
|
613
|
-
|
|
614
|
-
|
|
615
|
-
|
|
616
|
-
|
|
617
|
-
|
|
618
|
-
|
|
619
|
-
|
|
620
|
-
|
|
621
|
-
|
|
622
|
-
|
|
623
|
-
}
|
|
624
|
-
|
|
625
|
-
|
|
626
|
-
|
|
627
|
-
|
|
628
|
-
|
|
629
|
-
|
|
630
|
-
|
|
631
|
-
|
|
632
|
-
|
|
633
|
-
|
|
634
|
-
|
|
635
|
-
|
|
636
|
-
|
|
637
|
-
|
|
638
|
-
|
|
639
|
-
|
|
640
|
-
|
|
641
|
-
|
|
642
|
-
|
|
643
|
-
|
|
644
|
-
|
|
645
|
-
|
|
646
|
-
|
|
647
|
-
|
|
648
|
-
|
|
649
|
-
|
|
650
|
-
|
|
651
|
-
|
|
652
|
-
|
|
653
|
-
|
|
654
|
-
|
|
655
|
-
- **
|
|
656
|
-
|
|
657
|
-
|
|
658
|
-
|
|
659
|
-
- **
|
|
660
|
-
|
|
661
|
-
|
|
662
|
-
|
|
663
|
-
|
|
664
|
-
|
|
665
|
-
|
|
666
|
-
|
|
667
|
-
|
|
668
|
-
|
|
669
|
-
|
|
670
|
-
|
|
671
|
-
|
|
672
|
-
}
|
|
673
|
-
|
|
674
|
-
|
|
675
|
-
|
|
676
|
-
|
|
677
|
-
|
|
678
|
-
|
|
679
|
-
|
|
680
|
-
|
|
681
|
-
|
|
682
|
-
|
|
683
|
-
|
|
684
|
-
|
|
685
|
-
|
|
686
|
-
|
|
687
|
-
|
|
688
|
-
|
|
689
|
-
|
|
690
|
-
|
|
691
|
-
|
|
692
|
-
|
|
693
|
-
|
|
694
|
-
|
|
695
|
-
|
|
696
|
-
|
|
697
|
-
|
|
698
|
-
|
|
699
|
-
|
|
700
|
-
|
|
701
|
-
|
|
702
|
-
|
|
703
|
-
|
|
704
|
-
|
|
705
|
-
|
|
706
|
-
|
|
707
|
-
|
|
708
|
-
|
|
709
|
-
|
|
710
|
-
|
|
711
|
-
|
|
712
|
-
|
|
713
|
-
|
|
714
|
-
|
|
715
|
-
|
|
716
|
-
|
|
717
|
-
...
|
|
718
|
-
|
|
719
|
-
|
|
720
|
-
|
|
721
|
-
|
|
722
|
-
|
|
723
|
-
...
|
|
724
|
-
|
|
725
|
-
|
|
726
|
-
|
|
727
|
-
|
|
728
|
-
|
|
729
|
-
|
|
730
|
-
|
|
731
|
-
|
|
732
|
-
|
|
733
|
-
|
|
734
|
-
|
|
735
|
-
|
|
736
|
-
|
|
737
|
-
|
|
738
|
-
|
|
739
|
-
|
|
740
|
-
|
|
741
|
-
|
|
742
|
-
|
|
743
|
-
|
|
744
|
-
|
|
745
|
-
|
|
746
|
-
|
|
747
|
-
|
|
748
|
-
|
|
749
|
-
|
|
750
|
-
|
|
751
|
-
|
|
752
|
-
|
|
753
|
-
|
|
754
|
-
|
|
755
|
-
|
|
756
|
-
|
|
757
|
-
|
|
758
|
-
|
|
759
|
-
|
|
760
|
-
|
|
761
|
-
|
|
762
|
-
|
|
763
|
-
|
|
764
|
-
|
|
765
|
-
|
|
766
|
-
|
|
767
|
-
|
|
768
|
-
|
|
769
|
-
|
|
770
|
-
|
|
771
|
-
|
|
772
|
-
|
|
773
|
-
|
|
774
|
-
|
|
775
|
-
|
|
776
|
-
|
|
777
|
-
|
|
778
|
-
|
|
779
|
-
|
|
780
|
-
|
|
781
|
-
|
|
782
|
-
|
|
783
|
-
|
|
784
|
-
|
|
785
|
-
|
|
786
|
-
|
|
787
|
-
|
|
788
|
-
|
|
789
|
-
|
|
790
|
-
|
|
791
|
-
|
|
792
|
-
|
|
793
|
-
|
|
794
|
-
|
|
795
|
-
|
|
796
|
-
|
|
797
|
-
|
|
798
|
-
|
|
799
|
-
|
|
800
|
-
|
|
801
|
-
|
|
802
|
-
|
|
803
|
-
|
|
804
|
-
|
|
805
|
-
|
|
806
|
-
|
|
807
|
-
|
|
808
|
-
|
|
809
|
-
|
|
810
|
-
|
|
811
|
-
|
|
812
|
-
|
|
813
|
-
|
|
814
|
-
|
|
815
|
-
|
|
816
|
-
|
|
817
|
-
|
|
818
|
-
|
|
819
|
-
|
|
820
|
-
|
|
821
|
-
|
|
822
|
-
|
|
823
|
-
|
|
824
|
-
|
|
825
|
-
|
|
826
|
-
|
|
827
|
-
|
|
828
|
-
|
|
829
|
-
|
|
830
|
-
|
|
831
|
-
|
|
832
|
-
|
|
833
|
-
|
|
834
|
-
|
|
835
|
-
|
|
836
|
-
|
|
837
|
-
|
|
838
|
-
|
|
839
|
-
|
|
840
|
-
|
|
841
|
-
|
|
842
|
-
|
|
843
|
-
|
|
844
|
-
|
|
845
|
-
|
|
846
|
-
|
|
847
|
-
- **
|
|
848
|
-
|
|
849
|
-
|
|
850
|
-
|
|
851
|
-
|
|
852
|
-
|
|
853
|
-
|
|
854
|
-
|
|
855
|
-
|
|
856
|
-
|
|
857
|
-
|
|
858
|
-
|
|
859
|
-
|
|
860
|
-
}
|
|
861
|
-
|
|
862
|
-
|
|
863
|
-
|
|
864
|
-
|
|
865
|
-
|
|
866
|
-
|
|
867
|
-
|
|
868
|
-
|
|
869
|
-
|
|
870
|
-
|
|
871
|
-
|
|
872
|
-
|
|
873
|
-
|
|
874
|
-
|
|
875
|
-
|
|
876
|
-
|
|
877
|
-
|
|
878
|
-
|
|
879
|
-
|
|
880
|
-
|
|
881
|
-
|
|
882
|
-
|
|
883
|
-
|
|
884
|
-
|
|
885
|
-
|
|
886
|
-
|
|
887
|
-
|
|
888
|
-
|
|
889
|
-
|
|
890
|
-
|
|
891
|
-
|
|
892
|
-
|
|
893
|
-
|
|
894
|
-
|
|
895
|
-
|
|
896
|
-
|
|
897
|
-
|
|
898
|
-
- **
|
|
899
|
-
|
|
900
|
-
|
|
901
|
-
|
|
902
|
-
|
|
903
|
-
|
|
904
|
-
|
|
905
|
-
|
|
906
|
-
|
|
907
|
-
|
|
908
|
-
|
|
909
|
-
|
|
910
|
-
|
|
911
|
-
|
|
912
|
-
|
|
913
|
-
|
|
914
|
-
|
|
915
|
-
|
|
916
|
-
|
|
917
|
-
|
|
918
|
-
|
|
919
|
-
|
|
920
|
-
|
|
921
|
-
|
|
922
|
-
|
|
923
|
-
|
|
924
|
-
|
|
925
|
-
|
|
926
|
-
|
|
927
|
-
|
|
928
|
-
|
|
929
|
-
|
|
930
|
-
|
|
931
|
-
|
|
932
|
-
|
|
933
|
-
|
|
934
|
-
|
|
935
|
-
|
|
936
|
-
|
|
937
|
-
|
|
938
|
-
|
|
939
|
-
|
|
940
|
-
|
|
941
|
-
|
|
942
|
-
|
|
943
|
-
|
|
944
|
-
|
|
945
|
-
|
|
946
|
-
|
|
947
|
-
|
|
948
|
-
|
|
949
|
-
|
|
950
|
-
|
|
951
|
-
|
|
952
|
-
|
|
953
|
-
|
|
954
|
-
|
|
955
|
-
|
|
956
|
-
|
|
957
|
-
- **
|
|
958
|
-
|
|
959
|
-
|
|
960
|
-
|
|
961
|
-
|
|
962
|
-
|
|
963
|
-
|
|
964
|
-
|
|
965
|
-
|
|
966
|
-
|
|
967
|
-
|
|
968
|
-
|
|
969
|
-
|
|
970
|
-
}
|
|
971
|
-
|
|
972
|
-
|
|
973
|
-
|
|
974
|
-
|
|
975
|
-
|
|
976
|
-
|
|
977
|
-
|
|
978
|
-
|
|
979
|
-
|
|
980
|
-
|
|
981
|
-
|
|
982
|
-
|
|
983
|
-
];
|
|
984
|
-
|
|
985
|
-
|
|
986
|
-
|
|
987
|
-
|
|
988
|
-
|
|
989
|
-
|
|
990
|
-
|
|
991
|
-
|
|
992
|
-
|
|
993
|
-
|
|
994
|
-
|
|
995
|
-
|
|
996
|
-
|
|
997
|
-
|
|
998
|
-
|
|
999
|
-
|
|
1000
|
-
|
|
1001
|
-
|
|
1002
|
-
|
|
1003
|
-
|
|
1004
|
-
|
|
1005
|
-
|
|
1006
|
-
|
|
1007
|
-
|
|
1008
|
-
|
|
1009
|
-
|
|
1010
|
-
|
|
1011
|
-
|
|
1012
|
-
|
|
1013
|
-
|
|
1014
|
-
|
|
1015
|
-
|
|
1016
|
-
|
|
1017
|
-
|
|
1018
|
-
|
|
1019
|
-
|
|
1020
|
-
|
|
1021
|
-
|
|
1022
|
-
|
|
1023
|
-
|
|
1024
|
-
|
|
1025
|
-
|
|
1026
|
-
|
|
1027
|
-
|
|
1028
|
-
|
|
1029
|
-
|
|
1030
|
-
|
|
1031
|
-
|
|
1032
|
-
}
|
|
1033
|
-
|
|
1034
|
-
|
|
1035
|
-
|
|
1036
|
-
|
|
1037
|
-
|
|
1038
|
-
|
|
1039
|
-
|
|
1040
|
-
|
|
1041
|
-
|
|
1042
|
-
|
|
1043
|
-
|
|
1044
|
-
|
|
1045
|
-
|
|
1046
|
-
|
|
1047
|
-
|
|
1048
|
-
|
|
1049
|
-
|
|
1050
|
-
|
|
1051
|
-
|
|
1052
|
-
|
|
1053
|
-
|
|
1054
|
-
|
|
1055
|
-
|
|
1056
|
-
|
|
1057
|
-
|
|
1058
|
-
|
|
1059
|
-
|
|
1060
|
-
|
|
1061
|
-
|
|
1062
|
-
|
|
1063
|
-
|
|
1064
|
-
|
|
1065
|
-
|
|
1066
|
-
|
|
1067
|
-
|
|
1068
|
-
|
|
1069
|
-
"
|
|
1070
|
-
"
|
|
1071
|
-
"
|
|
1072
|
-
"
|
|
1073
|
-
"
|
|
1074
|
-
|
|
1075
|
-
|
|
1076
|
-
|
|
1077
|
-
|
|
1078
|
-
|
|
1079
|
-
|
|
1080
|
-
"
|
|
1081
|
-
"
|
|
1082
|
-
"
|
|
1083
|
-
"
|
|
1084
|
-
|
|
1085
|
-
|
|
1086
|
-
|
|
1087
|
-
|
|
1088
|
-
|
|
1089
|
-
|
|
1090
|
-
|
|
1091
|
-
|
|
1092
|
-
|
|
1093
|
-
"
|
|
1094
|
-
"
|
|
1095
|
-
"
|
|
1096
|
-
"
|
|
1097
|
-
"
|
|
1098
|
-
|
|
1099
|
-
|
|
1100
|
-
|
|
1101
|
-
|
|
1102
|
-
|
|
1103
|
-
|
|
1104
|
-
"
|
|
1105
|
-
"
|
|
1106
|
-
"
|
|
1107
|
-
"
|
|
1108
|
-
|
|
1109
|
-
|
|
1110
|
-
|
|
1111
|
-
|
|
1112
|
-
|
|
1113
|
-
|
|
1114
|
-
|
|
1115
|
-
|
|
1116
|
-
|
|
1117
|
-
"
|
|
1118
|
-
"
|
|
1119
|
-
"
|
|
1120
|
-
"
|
|
1121
|
-
"
|
|
1122
|
-
|
|
1123
|
-
|
|
1124
|
-
|
|
1125
|
-
|
|
1126
|
-
|
|
1127
|
-
|
|
1128
|
-
"
|
|
1129
|
-
"
|
|
1130
|
-
"
|
|
1131
|
-
"
|
|
1132
|
-
|
|
1133
|
-
|
|
1134
|
-
|
|
1135
|
-
|
|
1136
|
-
|
|
1137
|
-
|
|
1138
|
-
|
|
1139
|
-
|
|
1140
|
-
|
|
1141
|
-
"
|
|
1142
|
-
"
|
|
1143
|
-
"
|
|
1144
|
-
"
|
|
1145
|
-
"
|
|
1146
|
-
|
|
1147
|
-
|
|
1148
|
-
|
|
1149
|
-
|
|
1150
|
-
|
|
1151
|
-
|
|
1152
|
-
"
|
|
1153
|
-
"
|
|
1154
|
-
"
|
|
1155
|
-
"
|
|
1156
|
-
|
|
1157
|
-
|
|
1158
|
-
|
|
1159
|
-
|
|
1160
|
-
|
|
1161
|
-
|
|
1162
|
-
|
|
1163
|
-
|
|
1164
|
-
|
|
1165
|
-
"
|
|
1166
|
-
"
|
|
1167
|
-
"
|
|
1168
|
-
"
|
|
1169
|
-
"
|
|
1170
|
-
|
|
1171
|
-
|
|
1172
|
-
|
|
1173
|
-
|
|
1174
|
-
|
|
1175
|
-
|
|
1176
|
-
"
|
|
1177
|
-
"
|
|
1178
|
-
"
|
|
1179
|
-
"
|
|
1180
|
-
|
|
1181
|
-
|
|
1182
|
-
|
|
1183
|
-
|
|
1184
|
-
|
|
1185
|
-
|
|
1186
|
-
|
|
1187
|
-
|
|
1188
|
-
|
|
1189
|
-
|
|
1190
|
-
```
|
|
1191
|
-
|
|
1192
|
-
|
|
1193
|
-
|
|
1194
|
-
|
|
1195
|
-
|
|
1196
|
-
|
|
1197
|
-
|
|
1198
|
-
```
|
|
1199
|
-
|
|
1200
|
-
|
|
1201
|
-
|
|
1202
|
-
Import `
|
|
1203
|
-
|
|
1204
|
-
```
|
|
1205
|
-
import
|
|
1206
|
-
|
|
1207
|
-
|
|
1208
|
-
|
|
1209
|
-
|
|
1210
|
-
|
|
1211
|
-
}
|
|
1212
|
-
|
|
1213
|
-
|
|
1214
|
-
|
|
1215
|
-
|
|
1216
|
-
|
|
1217
|
-
|
|
1218
|
-
|
|
1219
|
-
|
|
1220
|
-
|
|
1221
|
-
|
|
1222
|
-
|
|
1223
|
-
|
|
1224
|
-
|
|
1225
|
-
}
|
|
1226
|
-
|
|
1227
|
-
|
|
1228
|
-
|
|
1229
|
-
|
|
1230
|
-
|
|
1231
|
-
|
|
1232
|
-
|
|
1233
|
-
|
|
1234
|
-
|
|
1235
|
-
|
|
1236
|
-
|
|
1237
|
-
|
|
1238
|
-
|
|
1239
|
-
|
|
1240
|
-
|
|
1241
|
-
|
|
1242
|
-
[
|
|
1243
|
-
[
|
|
1244
|
-
[
|
|
1245
|
-
[
|
|
1246
|
-
[
|
|
1247
|
-
[
|
|
1248
|
-
[
|
|
1249
|
-
[
|
|
1250
|
-
[
|
|
1251
|
-
[
|
|
1252
|
-
[
|
|
1253
|
-
[
|
|
1254
|
-
[
|
|
1255
|
-
[
|
|
1256
|
-
[
|
|
1257
|
-
[
|
|
1258
|
-
[
|
|
1259
|
-
[
|
|
1260
|
-
[
|
|
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
|
+
- **add-plus**
|
|
452
|
+
- **arrow-down**
|
|
453
|
+
- **arrow-left**
|
|
454
|
+
- **arrow-line-right**
|
|
455
|
+
- **arrow-right**
|
|
456
|
+
- **arrow-up**
|
|
457
|
+
- **arrows**
|
|
458
|
+
- **auction**
|
|
459
|
+
- **average-tax**
|
|
460
|
+
- **bank-account**
|
|
461
|
+
- **bank-agency**
|
|
462
|
+
- **bank**
|
|
463
|
+
- **banknote-search**
|
|
464
|
+
- **bell**
|
|
465
|
+
- **block**
|
|
466
|
+
- **book-open-text**
|
|
467
|
+
- **book**
|
|
468
|
+
- **box**
|
|
469
|
+
- **build-person**
|
|
470
|
+
- **calendar**
|
|
471
|
+
- **camera**
|
|
472
|
+
- **card-machine**
|
|
473
|
+
- **card**
|
|
474
|
+
- **cash-banknote-invoice**
|
|
475
|
+
- **chat**
|
|
476
|
+
- **check-circle-out**
|
|
477
|
+
- **check-circle**
|
|
478
|
+
- **check-grey**
|
|
479
|
+
- **check-white**
|
|
480
|
+
- **check**
|
|
481
|
+
- **clipboard**
|
|
482
|
+
- **clock-closed**
|
|
483
|
+
- **clock**
|
|
484
|
+
- **close-circle**
|
|
485
|
+
- **close**
|
|
486
|
+
- **cnpj**
|
|
487
|
+
- **codepen**
|
|
488
|
+
- **company-name**
|
|
489
|
+
- **contract-pen**
|
|
490
|
+
- **contract**
|
|
491
|
+
- **delete**
|
|
492
|
+
- **document**
|
|
493
|
+
- **dollar-sign-circle**
|
|
494
|
+
- **dollar-sign**
|
|
495
|
+
- **domain**
|
|
496
|
+
- **dots-menu**
|
|
497
|
+
- **double-arrow-left**
|
|
498
|
+
- **double-arrow-right**
|
|
499
|
+
- **download**
|
|
500
|
+
- **edit-square**
|
|
501
|
+
- **edit**
|
|
502
|
+
- **email**
|
|
503
|
+
- **empty-doc**
|
|
504
|
+
- **error**
|
|
505
|
+
- **eye-closed**
|
|
506
|
+
- **eye-open**
|
|
507
|
+
- **filter-add**
|
|
508
|
+
- **filter**
|
|
509
|
+
- **grid**
|
|
510
|
+
- **hands-clap**
|
|
511
|
+
- **help**
|
|
512
|
+
- **hexagon**
|
|
513
|
+
- **home**
|
|
514
|
+
- **image**
|
|
515
|
+
- **info**
|
|
516
|
+
- **invoice**
|
|
517
|
+
- **invoices-anticipated**
|
|
518
|
+
- **invoices-approval**
|
|
519
|
+
- **invoices-refused**
|
|
520
|
+
- **list**
|
|
521
|
+
- **location-pin**
|
|
522
|
+
- **login**
|
|
523
|
+
- **logout**
|
|
524
|
+
- **medal**
|
|
525
|
+
- **menu**
|
|
526
|
+
- **money-cedule**
|
|
527
|
+
- **money-discount**
|
|
528
|
+
- **money-hand**
|
|
529
|
+
- **money-net**
|
|
530
|
+
- **money-new**
|
|
531
|
+
- **money-sign**
|
|
532
|
+
- **money**
|
|
533
|
+
- **more-circle**
|
|
534
|
+
- **more**
|
|
535
|
+
- **new-company**
|
|
536
|
+
- **offered**
|
|
537
|
+
- **open-external**
|
|
538
|
+
- **password**
|
|
539
|
+
- **people**
|
|
540
|
+
- **percent**
|
|
541
|
+
- **person-document**
|
|
542
|
+
- **person-sad**
|
|
543
|
+
- **phone-call**
|
|
544
|
+
- **phone**
|
|
545
|
+
- **pin-navigation**
|
|
546
|
+
- **pork**
|
|
547
|
+
- **radio**
|
|
548
|
+
- **refresh**
|
|
549
|
+
- **registration**
|
|
550
|
+
- **repeat**
|
|
551
|
+
- **search**
|
|
552
|
+
- **second-warning**
|
|
553
|
+
- **settings**
|
|
554
|
+
- **shield-chekmark**
|
|
555
|
+
- **star**
|
|
556
|
+
- **store**
|
|
557
|
+
- **today**
|
|
558
|
+
- **trash**
|
|
559
|
+
- **trophy**
|
|
560
|
+
- **unfold-more**
|
|
561
|
+
- **upload**
|
|
562
|
+
- **user-group**
|
|
563
|
+
- **user**
|
|
564
|
+
- **wallet**
|
|
565
|
+
- **warning**
|
|
566
|
+
|
|
567
|
+
Example:
|
|
568
|
+
|
|
569
|
+
`example.module.ts`
|
|
570
|
+
|
|
571
|
+
```Typescript
|
|
572
|
+
import { MonkeyIconModule } from 'monkey-style-guide';
|
|
573
|
+
|
|
574
|
+
...
|
|
575
|
+
|
|
576
|
+
@NgModule({
|
|
577
|
+
imports: [MonkeyIconModule]
|
|
578
|
+
})
|
|
579
|
+
...
|
|
580
|
+
```
|
|
581
|
+
|
|
582
|
+
`example.component.html`
|
|
583
|
+
|
|
584
|
+
```HTML
|
|
585
|
+
<monkey-icon color="#000000" icon="password-16"></monkey-icon>
|
|
586
|
+
```
|
|
587
|
+
|
|
588
|
+
---
|
|
589
|
+
|
|
590
|
+
### **Input**
|
|
591
|
+
|
|
592
|
+
![Input Demo Screen Shot][input-screenshot]
|
|
593
|
+
|
|
594
|
+
Parameters:
|
|
595
|
+
|
|
596
|
+
- **capitalize** (optional)(boolean) makes the value capitalcase
|
|
597
|
+
- **currency** (optional)(boolean) transforms the input in currency input
|
|
598
|
+
- **errorMessage** (string) message to alert user
|
|
599
|
+
- **helperMessage** (optional)(string) message to help user to know what to do
|
|
600
|
+
- **icon** (optional)(string) icon name and size separeted by hyfhen
|
|
601
|
+
- **infoMessage** (optional)(string) message to help user knows about this component purpose
|
|
602
|
+
- **label** (string) define the label that will be displayed inside
|
|
603
|
+
- **lowerCase** (optional)(boolean) makes the value lowercase
|
|
604
|
+
- **mask** (optional)(string) mask pattern to mask the input
|
|
605
|
+
- **maxLength** (optional)(number) max 255
|
|
606
|
+
- **name** (optional)(string) name to identify the input
|
|
607
|
+
- **onlyNumber** (optional)(boolean) makes the input accept only number
|
|
608
|
+
- **onlyAlphaNumeric** (optional)(boolean) makes the input accept only alphanumeric characters
|
|
609
|
+
- **placeholder** (optional)(string) message to help user that will be displayed inside the input
|
|
610
|
+
- **prefix** (optional)(string) prefix value for input
|
|
611
|
+
- **type** (string) can be _text_ or _password_
|
|
612
|
+
- **upperCase** (optional)(boolean) makes the value uppercase
|
|
613
|
+
|
|
614
|
+
Events:
|
|
615
|
+
|
|
616
|
+
- **onChange** event emited when user make changes
|
|
617
|
+
|
|
618
|
+
Example:
|
|
619
|
+
|
|
620
|
+
`example.module.ts`
|
|
621
|
+
|
|
622
|
+
```Typescript
|
|
623
|
+
import { MonkeyInputModule } from 'monkey-style-guide';
|
|
624
|
+
|
|
625
|
+
...
|
|
626
|
+
|
|
627
|
+
@NgModule({
|
|
628
|
+
imports: [MonkeyInputModule]
|
|
629
|
+
})
|
|
630
|
+
...
|
|
631
|
+
```
|
|
632
|
+
|
|
633
|
+
`example.component.html`
|
|
634
|
+
|
|
635
|
+
```HTML
|
|
636
|
+
<monkey-input
|
|
637
|
+
errorMessage="Validation Message"
|
|
638
|
+
formControlName="name"
|
|
639
|
+
helperMessage="Mandatory"
|
|
640
|
+
icon="user-20"
|
|
641
|
+
infoMessage="Info message"
|
|
642
|
+
label="Name"
|
|
643
|
+
placeholder="Input your full name">
|
|
644
|
+
</monkey-input>
|
|
645
|
+
```
|
|
646
|
+
|
|
647
|
+
---
|
|
648
|
+
|
|
649
|
+
### **Input Filter**
|
|
650
|
+
|
|
651
|
+
![Input Filter Demo Screen Shot][input-filter-screenshot]
|
|
652
|
+
|
|
653
|
+
Parameters:
|
|
654
|
+
|
|
655
|
+
- **helperMessage** (optional)(string) message to help user to know what to do
|
|
656
|
+
- **icon** (optional)(string) icon name and size separeted by hyfhen
|
|
657
|
+
- **infoMessage** (optional)(string) message to help user knows about this component purpose
|
|
658
|
+
- **label** (string) define the label that will be displayed inside
|
|
659
|
+
- **maxLength** (optional)(number) max 255
|
|
660
|
+
- **name** (optional)(string) name to identify the input
|
|
661
|
+
- **placeholder** (optional)(string) message to help user that will be displayed inside the input
|
|
662
|
+
|
|
663
|
+
Events:
|
|
664
|
+
|
|
665
|
+
- **onChange** event emited when user make changes
|
|
666
|
+
|
|
667
|
+
Example:
|
|
668
|
+
|
|
669
|
+
`example.module.ts`
|
|
670
|
+
|
|
671
|
+
```Typescript
|
|
672
|
+
import { MonkeyInputModule } from 'monkey-style-guide';
|
|
673
|
+
|
|
674
|
+
...
|
|
675
|
+
|
|
676
|
+
@NgModule({
|
|
677
|
+
imports: [MonkeyInputModule]
|
|
678
|
+
})
|
|
679
|
+
...
|
|
680
|
+
```
|
|
681
|
+
|
|
682
|
+
`example.component.html`
|
|
683
|
+
|
|
684
|
+
```HTML
|
|
685
|
+
<monkey-input-filter
|
|
686
|
+
formControlName="name"
|
|
687
|
+
helperMessage="Mandatory"
|
|
688
|
+
icon="user-20"
|
|
689
|
+
infoMessage="Info message"
|
|
690
|
+
label="Name"
|
|
691
|
+
placeholder="Input your full name">
|
|
692
|
+
</monkey-input-filter>
|
|
693
|
+
```
|
|
694
|
+
|
|
695
|
+
---
|
|
696
|
+
|
|
697
|
+
### **Modal**
|
|
698
|
+
|
|
699
|
+
![Modal Demo Screen Shot][modal-screenshot]
|
|
700
|
+
|
|
701
|
+
Parameters:
|
|
702
|
+
|
|
703
|
+
- **config** (MonkeyModalConfig) the configuration of modal
|
|
704
|
+
- **modalRef** (MonkeyModalRefs) the modal reference
|
|
705
|
+
- **onHandleConfirm** (EventEmitter) will emit and event when you click confirm
|
|
706
|
+
|
|
707
|
+
Example:
|
|
708
|
+
|
|
709
|
+
`example.module.ts`
|
|
710
|
+
|
|
711
|
+
```Typescript
|
|
712
|
+
import {
|
|
713
|
+
MonkeyModalModule,
|
|
714
|
+
MonkeyStyleGuideModalService
|
|
715
|
+
} from 'monkey-style-guide';
|
|
716
|
+
|
|
717
|
+
...
|
|
718
|
+
|
|
719
|
+
@NgModule({
|
|
720
|
+
imports: [MonkeyModalModule],
|
|
721
|
+
providers: [MonkeyStyleGuideModalService]
|
|
722
|
+
})
|
|
723
|
+
...
|
|
724
|
+
```
|
|
725
|
+
|
|
726
|
+
`parent.component.ts`
|
|
727
|
+
|
|
728
|
+
```Typescript
|
|
729
|
+
...
|
|
730
|
+
import { MonkeyStyleGuideModalService } from 'monkey-style-guide';
|
|
731
|
+
import { ModalComponent } from './modal/modal.component';
|
|
732
|
+
|
|
733
|
+
...
|
|
734
|
+
|
|
735
|
+
constructor(private modalService: MonkeyStyleGuideModalService) {}
|
|
736
|
+
|
|
737
|
+
openModal() {
|
|
738
|
+
this.modalService.open(ModalComponent, {
|
|
739
|
+
color: 'theme',
|
|
740
|
+
size: 'md',
|
|
741
|
+
action: {
|
|
742
|
+
cancel: {
|
|
743
|
+
actionColor: 'theme',
|
|
744
|
+
actionType: 'tertiary',
|
|
745
|
+
label: 'Cancel',
|
|
746
|
+
},
|
|
747
|
+
confirm: {
|
|
748
|
+
actionColor: 'theme',
|
|
749
|
+
actionType: 'primary',
|
|
750
|
+
label: 'Confirm',
|
|
751
|
+
},
|
|
752
|
+
},
|
|
753
|
+
});
|
|
754
|
+
}
|
|
755
|
+
```
|
|
756
|
+
|
|
757
|
+
`modal.component.ts`
|
|
758
|
+
|
|
759
|
+
```Typescript
|
|
760
|
+
import { Component, EventEmitter, Input } from '@angular/core';
|
|
761
|
+
import {
|
|
762
|
+
MonkeyModalConfig,
|
|
763
|
+
MonkeyModalRefs,
|
|
764
|
+
MonkeyStyleGuideModalService
|
|
765
|
+
} from 'monkey-style-guide';
|
|
766
|
+
|
|
767
|
+
@Component({
|
|
768
|
+
selector: 'mk-modal',
|
|
769
|
+
template: `
|
|
770
|
+
<monkey-modal
|
|
771
|
+
[config]="config"
|
|
772
|
+
[modalRef]="modalRef"
|
|
773
|
+
[onHandleConfirm]="onHandleConfirm"
|
|
774
|
+
>
|
|
775
|
+
<div style="align-items: center; display: flex; justify-content: center;">
|
|
776
|
+
<img
|
|
777
|
+
src="https://dev-monkey-emails.s3-us-west-2.amazonaws.com/monkey-style-guide/demos/images/logo.png"
|
|
778
|
+
/>
|
|
779
|
+
</div>
|
|
780
|
+
</monkey-modal>
|
|
781
|
+
`,
|
|
782
|
+
})
|
|
783
|
+
export class ModalComponent {
|
|
784
|
+
@Input() config: MonkeyModalConfig;
|
|
785
|
+
@Input() modalRef: MonkeyModalRefs<this>;
|
|
786
|
+
@Input() onHandleConfirm = new EventEmitter<any>();
|
|
787
|
+
|
|
788
|
+
constructor(private modalService: MonkeyStyleGuideModalService) {
|
|
789
|
+
this.onHandleConfirm.subscribe(() => {
|
|
790
|
+
console.log('Confirm clicked!');
|
|
791
|
+
|
|
792
|
+
this.modalService.closeAll();
|
|
793
|
+
});
|
|
794
|
+
}
|
|
795
|
+
}
|
|
796
|
+
```
|
|
797
|
+
|
|
798
|
+
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:
|
|
799
|
+
|
|
800
|
+
```Typescript
|
|
801
|
+
...
|
|
802
|
+
|
|
803
|
+
openModal() {
|
|
804
|
+
this.modalService.open(ModalComponent, {
|
|
805
|
+
color: 'theme',
|
|
806
|
+
size: 'md',
|
|
807
|
+
action: {
|
|
808
|
+
cancel: {
|
|
809
|
+
actionColor: 'theme',
|
|
810
|
+
actionType: 'tertiary',
|
|
811
|
+
label: 'Cancel',
|
|
812
|
+
},
|
|
813
|
+
confirm: {
|
|
814
|
+
action: () => {
|
|
815
|
+
console.log('Modal closed!');
|
|
816
|
+
},
|
|
817
|
+
actionColor: 'theme',
|
|
818
|
+
actionType: 'primary',
|
|
819
|
+
label: 'Confirm',
|
|
820
|
+
},
|
|
821
|
+
},
|
|
822
|
+
});
|
|
823
|
+
}
|
|
824
|
+
```
|
|
825
|
+
|
|
826
|
+
```Typescript
|
|
827
|
+
...
|
|
828
|
+
|
|
829
|
+
export class ModalComponent {
|
|
830
|
+
@Input() config: MonkeyModalConfig;
|
|
831
|
+
@Input() modalRef: MonkeyModalRefs<this>;
|
|
832
|
+
|
|
833
|
+
constructor() {}
|
|
834
|
+
}
|
|
835
|
+
```
|
|
836
|
+
|
|
837
|
+
---
|
|
838
|
+
|
|
839
|
+
### **Radiobutton**
|
|
840
|
+
|
|
841
|
+
![Radiobutton Demo Screen Shot][radiobutton-screenshot]
|
|
842
|
+
|
|
843
|
+
Parameters:
|
|
844
|
+
|
|
845
|
+
- **errorMessage** (string) message to alert user
|
|
846
|
+
- **helperMessage** (optional)(string) message to help user to know what to do
|
|
847
|
+
- **infoMessage** (optional)(string) message to help user knows about this component purpose
|
|
848
|
+
- **label** (string) define the label that will be displayed inside
|
|
849
|
+
- **placeholder** (optional)(string) message to help user that will be displayed inside the input
|
|
850
|
+
|
|
851
|
+
Events:
|
|
852
|
+
|
|
853
|
+
- **onChange** event emited when user make changes
|
|
854
|
+
|
|
855
|
+
Example:
|
|
856
|
+
|
|
857
|
+
`example.module.ts`
|
|
858
|
+
|
|
859
|
+
```Typescript
|
|
860
|
+
import { MonkeyRadioButtonModule } from 'monkey-style-guide';
|
|
861
|
+
|
|
862
|
+
...
|
|
863
|
+
|
|
864
|
+
@NgModule({
|
|
865
|
+
imports: [MonkeyRadioButtonModule]
|
|
866
|
+
})
|
|
867
|
+
...
|
|
868
|
+
```
|
|
869
|
+
|
|
870
|
+
`example.component.html`
|
|
871
|
+
|
|
872
|
+
```HTML
|
|
873
|
+
<monkey-radiobutton
|
|
874
|
+
formControlName="gender"
|
|
875
|
+
label="Gender"
|
|
876
|
+
helperMessage="Mandatory"
|
|
877
|
+
icon="help-20"
|
|
878
|
+
infoMessage="Info message"
|
|
879
|
+
errorMessage="Validation message"
|
|
880
|
+
>
|
|
881
|
+
<monkey-option label="Female" value="female"></monkey-option>
|
|
882
|
+
<monkey-option label="Male" value="male"></monkey-option>
|
|
883
|
+
<monkey-option label="I prefer not to choose" value="not_choose"></monkey-option>
|
|
884
|
+
</monkey-radiobutton>
|
|
885
|
+
```
|
|
886
|
+
|
|
887
|
+
---
|
|
888
|
+
|
|
889
|
+
### **Select**
|
|
890
|
+
|
|
891
|
+
![Select Demo Screen Shot][select-screenshot]
|
|
892
|
+
|
|
893
|
+
Parameters:
|
|
894
|
+
|
|
895
|
+
- **errorMessage** (string) message to alert user
|
|
896
|
+
- **helperMessage** (optional)(string) message to help user to know what to do
|
|
897
|
+
- **icon** (optional)(string) icon name and size separeted by hyfhen
|
|
898
|
+
- **infoMessage** (optional)(string) message to help user knows about this component purpose
|
|
899
|
+
- **label** (string) define the label that will be displayed inside
|
|
900
|
+
- **placeholder** (optional)(string) message to help user that will be displayed inside the input
|
|
901
|
+
|
|
902
|
+
Events:
|
|
903
|
+
|
|
904
|
+
- **onChange** event emited when user make changes
|
|
905
|
+
|
|
906
|
+
Example:
|
|
907
|
+
|
|
908
|
+
`example.module.ts`
|
|
909
|
+
|
|
910
|
+
```Typescript
|
|
911
|
+
import {
|
|
912
|
+
MonkeyOptionModule,
|
|
913
|
+
MonkeySelectModule
|
|
914
|
+
} from 'monkey-style-guide';
|
|
915
|
+
|
|
916
|
+
...
|
|
917
|
+
|
|
918
|
+
@NgModule({
|
|
919
|
+
imports: [
|
|
920
|
+
MonkeyOptionModule,
|
|
921
|
+
MonkeySelectModule
|
|
922
|
+
]
|
|
923
|
+
})
|
|
924
|
+
...
|
|
925
|
+
```
|
|
926
|
+
|
|
927
|
+
`example.component.html`
|
|
928
|
+
|
|
929
|
+
```HTML
|
|
930
|
+
<monkey-select
|
|
931
|
+
errorMessage="Validation Message"
|
|
932
|
+
formControlName="documentType"
|
|
933
|
+
helperMessage="Mandatory"
|
|
934
|
+
icon="upload-20"
|
|
935
|
+
infoMessage="Info message"
|
|
936
|
+
label="Select the document type to upload"
|
|
937
|
+
>
|
|
938
|
+
<monkey-option label="Personal Document" value="personal_document">
|
|
939
|
+
</monkey-option>
|
|
940
|
+
<monkey-option label="Social Contract" value="social_contract">
|
|
941
|
+
</monkey-option>
|
|
942
|
+
<monkey-option label="Procuraction Contract" value="procuration_contract">
|
|
943
|
+
</monkey-option>
|
|
944
|
+
</monkey-select>
|
|
945
|
+
```
|
|
946
|
+
|
|
947
|
+
---
|
|
948
|
+
|
|
949
|
+
### **Table**
|
|
950
|
+
|
|
951
|
+
![Table Demo Screen Shot][table-screenshot]
|
|
952
|
+
|
|
953
|
+
Parameters:
|
|
954
|
+
|
|
955
|
+
- **dataSource** (array) the data to be displayed
|
|
956
|
+
- **headers** (array) column headers
|
|
957
|
+
- **loading** (optional)(boolean) show loading progress
|
|
958
|
+
- **rowTemplate** (TemplateRef) the template to show rows
|
|
959
|
+
- **selectable** (optional)(boolean) enable row selection
|
|
960
|
+
|
|
961
|
+
Events:
|
|
962
|
+
|
|
963
|
+
- **selection** returns an array with selected rows
|
|
964
|
+
|
|
965
|
+
Example:
|
|
966
|
+
|
|
967
|
+
`example.module.ts`
|
|
968
|
+
|
|
969
|
+
```Typescript
|
|
970
|
+
import { MonkeyTableModule } from 'monkey-style-guide';
|
|
971
|
+
|
|
972
|
+
...
|
|
973
|
+
|
|
974
|
+
@NgModule({
|
|
975
|
+
imports: [MonkeyTableModule]
|
|
976
|
+
})
|
|
977
|
+
...
|
|
978
|
+
```
|
|
979
|
+
|
|
980
|
+
`example.component.ts`
|
|
981
|
+
|
|
982
|
+
```Typecript
|
|
983
|
+
_dataSourceHeaders = ['column1', 'column2', 'column3', 'column4'];
|
|
984
|
+
_dataSource = [
|
|
985
|
+
[1, 2, 3, 4, 5, 6],
|
|
986
|
+
[5, 6, 7, 8, 9, 10],
|
|
987
|
+
[5, 6, 7, 8, 9, 10],
|
|
988
|
+
[5, 6, 7, 8, 9, 10],
|
|
989
|
+
];
|
|
990
|
+
```
|
|
991
|
+
|
|
992
|
+
`example.component.html`
|
|
993
|
+
|
|
994
|
+
```HTML
|
|
995
|
+
<monkey-table
|
|
996
|
+
[dataSource]="_dataSource"
|
|
997
|
+
[headers]="_dataSourceHeaders"
|
|
998
|
+
[loading]="true"
|
|
999
|
+
[rowTemplate]="rowTemplate"
|
|
1000
|
+
[selectable]="true"
|
|
1001
|
+
(selection)="onHandleSelection($event)"
|
|
1002
|
+
>
|
|
1003
|
+
<ng-template #rowTemplate let-row="row">
|
|
1004
|
+
<monkey-table-column>{{ row[0] }}</monkey-table-column>
|
|
1005
|
+
<monkey-table-column>{{ row[1] }}</monkey-table-column>
|
|
1006
|
+
<monkey-table-column>{{ row[2] }}</monkey-table-column>
|
|
1007
|
+
<monkey-table-column>{{ row[3] }}</monkey-table-column>
|
|
1008
|
+
</ng-template>
|
|
1009
|
+
</monkey-table>
|
|
1010
|
+
```
|
|
1011
|
+
|
|
1012
|
+
---
|
|
1013
|
+
|
|
1014
|
+
### **Toggle**
|
|
1015
|
+
|
|
1016
|
+
![Toggle Demo Screen Shot][toggle-screenshot]
|
|
1017
|
+
|
|
1018
|
+
Parameters:
|
|
1019
|
+
|
|
1020
|
+
- **value** (boolean)(default: false)
|
|
1021
|
+
- **disabled** (boolean)(default: false) to disable any action
|
|
1022
|
+
|
|
1023
|
+
Events:
|
|
1024
|
+
|
|
1025
|
+
- **onChange** event emited when user make changes
|
|
1026
|
+
|
|
1027
|
+
Example:
|
|
1028
|
+
|
|
1029
|
+
`example.module.ts`
|
|
1030
|
+
|
|
1031
|
+
```Typescript
|
|
1032
|
+
import { MonkeyToggleModule } from 'monkey-style-guide';
|
|
1033
|
+
|
|
1034
|
+
...
|
|
1035
|
+
|
|
1036
|
+
@NgModule({
|
|
1037
|
+
imports: [MonkeyToggleModule]
|
|
1038
|
+
})
|
|
1039
|
+
...
|
|
1040
|
+
```
|
|
1041
|
+
|
|
1042
|
+
`example.component.html`
|
|
1043
|
+
|
|
1044
|
+
```HTML
|
|
1045
|
+
<monkey-toggle [value]="_form?.get('smsNotification').value"
|
|
1046
|
+
(onChange)="onHandleToggleSMS($event)">
|
|
1047
|
+
</monkey-toggle>
|
|
1048
|
+
```
|
|
1049
|
+
|
|
1050
|
+
## Prerequisites
|
|
1051
|
+
|
|
1052
|
+
The main feature of this project is to allow changing the application theme, such as primary colors and error colors.
|
|
1053
|
+
For this, it is necessary to have a file called monkey-style-guide-settings.json at the root of your project's assets folder.
|
|
1054
|
+
|
|
1055
|
+
For example:
|
|
1056
|
+
|
|
1057
|
+
![Settings Json Screen Shot][settings-screenshot]
|
|
1058
|
+
|
|
1059
|
+
Content of monkey-style-guide-settings.json:
|
|
1060
|
+
|
|
1061
|
+
```JSON
|
|
1062
|
+
{
|
|
1063
|
+
"theme": {
|
|
1064
|
+
"title": "Monkey Exchange",
|
|
1065
|
+
"favicon": "assets/favicon.svg"
|
|
1066
|
+
},
|
|
1067
|
+
"colors": {
|
|
1068
|
+
"theme": {
|
|
1069
|
+
"main": "#034EA2",
|
|
1070
|
+
"100": "#F5FAFF",
|
|
1071
|
+
"200": "#D7EAFE",
|
|
1072
|
+
"300": "#A5CFFE",
|
|
1073
|
+
"400": "#72B4FD",
|
|
1074
|
+
"500": "#4099FC",
|
|
1075
|
+
"600": "#0F7EFB",
|
|
1076
|
+
"700": "#0465D2",
|
|
1077
|
+
"800": "#023064",
|
|
1078
|
+
"900": "#023064",
|
|
1079
|
+
"contrast": {
|
|
1080
|
+
"main": "white",
|
|
1081
|
+
"100": "rgba(black, 0.87)",
|
|
1082
|
+
"200": "white",
|
|
1083
|
+
"300": "white",
|
|
1084
|
+
"400": "white",
|
|
1085
|
+
"500": "white",
|
|
1086
|
+
"600": "white",
|
|
1087
|
+
"700": "white",
|
|
1088
|
+
"800": "white",
|
|
1089
|
+
"900": "white"
|
|
1090
|
+
}
|
|
1091
|
+
},
|
|
1092
|
+
"error": {
|
|
1093
|
+
"main": "#e70c0c",
|
|
1094
|
+
"100": "#fbb5b5",
|
|
1095
|
+
"200": "#f87f7f",
|
|
1096
|
+
"300": "#f53b3b",
|
|
1097
|
+
"400": "#f31e1e",
|
|
1098
|
+
"500": "#e70c0c",
|
|
1099
|
+
"600": "#ca0a0a",
|
|
1100
|
+
"700": "#ad0909",
|
|
1101
|
+
"800": "#900707",
|
|
1102
|
+
"900": "#730606",
|
|
1103
|
+
"contrast": {
|
|
1104
|
+
"main": "white",
|
|
1105
|
+
"100": "rgba(black, 0.87)",
|
|
1106
|
+
"200": "rgba(black, 0.87)",
|
|
1107
|
+
"300": "white",
|
|
1108
|
+
"400": "white",
|
|
1109
|
+
"500": "white",
|
|
1110
|
+
"600": "white",
|
|
1111
|
+
"700": "white",
|
|
1112
|
+
"800": "white",
|
|
1113
|
+
"900": "white"
|
|
1114
|
+
}
|
|
1115
|
+
},
|
|
1116
|
+
"warning": {
|
|
1117
|
+
"main": "#efa30e",
|
|
1118
|
+
"100": "#fbe7be",
|
|
1119
|
+
"200": "#f8d389",
|
|
1120
|
+
"300": "#f4b946",
|
|
1121
|
+
"400": "#f2ae29",
|
|
1122
|
+
"500": "#efa30e",
|
|
1123
|
+
"600": "#d28f0c",
|
|
1124
|
+
"700": "#b57c0b",
|
|
1125
|
+
"800": "#986809",
|
|
1126
|
+
"900": "#7b5407",
|
|
1127
|
+
"contrast": {
|
|
1128
|
+
"main": "rgba(black, 0.87)",
|
|
1129
|
+
"100": "rgba(black, 0.87)",
|
|
1130
|
+
"200": "rgba(black, 0.87)",
|
|
1131
|
+
"300": "rgba(black, 0.87)",
|
|
1132
|
+
"400": "rgba(black, 0.87)",
|
|
1133
|
+
"500": "rgba(black, 0.87)",
|
|
1134
|
+
"600": "rgba(black, 0.87)",
|
|
1135
|
+
"700": "rgba(black, 0.87)",
|
|
1136
|
+
"800": "white",
|
|
1137
|
+
"900": "white"
|
|
1138
|
+
}
|
|
1139
|
+
},
|
|
1140
|
+
"success": {
|
|
1141
|
+
"main": "#00875a",
|
|
1142
|
+
"100": "#45ffc1",
|
|
1143
|
+
"200": "#0dffae",
|
|
1144
|
+
"300": "#00c483",
|
|
1145
|
+
"400": "#00a66e",
|
|
1146
|
+
"500": "#00875a",
|
|
1147
|
+
"600": "#006846",
|
|
1148
|
+
"700": "#004a31",
|
|
1149
|
+
"800": "#002b1d",
|
|
1150
|
+
"900": "#000d08",
|
|
1151
|
+
"contrast": {
|
|
1152
|
+
"main": "white",
|
|
1153
|
+
"100": "rgba(black, 0.87)",
|
|
1154
|
+
"200": "rgba(black, 0.87)",
|
|
1155
|
+
"300": "rgba(black, 0.87)",
|
|
1156
|
+
"400": "white",
|
|
1157
|
+
"500": "white",
|
|
1158
|
+
"600": "white",
|
|
1159
|
+
"700": "white",
|
|
1160
|
+
"800": "white",
|
|
1161
|
+
"900": "white"
|
|
1162
|
+
}
|
|
1163
|
+
},
|
|
1164
|
+
"question": {
|
|
1165
|
+
"main": "#8D38FA",
|
|
1166
|
+
"100": "#F4EBFF",
|
|
1167
|
+
"200": "#E8D7FE",
|
|
1168
|
+
"300": "#D2AFFD",
|
|
1169
|
+
"400": "#A460FB",
|
|
1170
|
+
"500": "#8D38FA",
|
|
1171
|
+
"600": "#7710F9",
|
|
1172
|
+
"700": "#5104B3",
|
|
1173
|
+
"800": "#2D0264",
|
|
1174
|
+
"900": "#1B013C",
|
|
1175
|
+
"contrast": {
|
|
1176
|
+
"main": "white",
|
|
1177
|
+
"100": "rgba(black, 0.87)",
|
|
1178
|
+
"200": "rgba(black, 0.87)",
|
|
1179
|
+
"300": "rgba(black, 0.87)",
|
|
1180
|
+
"400": "white",
|
|
1181
|
+
"500": "white",
|
|
1182
|
+
"600": "white",
|
|
1183
|
+
"700": "white",
|
|
1184
|
+
"800": "white",
|
|
1185
|
+
"900": "white"
|
|
1186
|
+
}
|
|
1187
|
+
}
|
|
1188
|
+
}
|
|
1189
|
+
}
|
|
1190
|
+
```
|
|
1191
|
+
|
|
1192
|
+
## Installation
|
|
1193
|
+
|
|
1194
|
+
1. Install NPM packages:
|
|
1195
|
+
|
|
1196
|
+
```sh
|
|
1197
|
+
npm install monkey-style-guide
|
|
1198
|
+
```
|
|
1199
|
+
|
|
1200
|
+
## Usage
|
|
1201
|
+
|
|
1202
|
+
Import `monkey-style-guide` in your `style.scss`
|
|
1203
|
+
|
|
1204
|
+
```scss
|
|
1205
|
+
@import '~monkey-style-guide/assets/scss/theme';
|
|
1206
|
+
```
|
|
1207
|
+
|
|
1208
|
+
Import `MonkeyStyleGuideModule` in your `app.module.ts`
|
|
1209
|
+
|
|
1210
|
+
```Typescript
|
|
1211
|
+
import { MonkeyStyleGuideModule } from 'monkey-style-guide';
|
|
1212
|
+
|
|
1213
|
+
@NgModule({
|
|
1214
|
+
declarations: [AppComponent],
|
|
1215
|
+
imports: [MonkeyStyleGuideModule],
|
|
1216
|
+
bootstrap: [AppComponent],
|
|
1217
|
+
})
|
|
1218
|
+
export class AppModule {}
|
|
1219
|
+
```
|
|
1220
|
+
|
|
1221
|
+
Than call the `bootstrap` method in your `app.component.ts`
|
|
1222
|
+
|
|
1223
|
+
```Typescript
|
|
1224
|
+
import { Component } from '@angular/core';
|
|
1225
|
+
import { MonkeyStyleGuideSettingsService } from 'monkey-style-guide';
|
|
1226
|
+
|
|
1227
|
+
@Component({
|
|
1228
|
+
selector: 'app-root',
|
|
1229
|
+
templateUrl: './app.component.html',
|
|
1230
|
+
styleUrls: ['./app.component.scss'],
|
|
1231
|
+
})
|
|
1232
|
+
export class AppComponent {
|
|
1233
|
+
constructor(private settingsService: MonkeyStyleGuideSettingsService) {
|
|
1234
|
+
this.settingsService.boostrap('');
|
|
1235
|
+
}
|
|
1236
|
+
}
|
|
1237
|
+
```
|
|
1238
|
+
|
|
1239
|
+
<!-- MARKDOWN LINKS & IMAGES -->
|
|
1240
|
+
<!-- https://www.markdownguide.org/basic-syntax/#reference-style-links -->
|
|
1241
|
+
|
|
1242
|
+
[badge-screenshot]: https://user-images.githubusercontent.com/10110065/111625441-9e5df280-87cb-11eb-905c-008607cf859e.png
|
|
1243
|
+
[button-avatar-screenshot]: https://user-images.githubusercontent.com/10110065/111626956-50e28500-87cd-11eb-85c1-aaa8c06bb4e0.png
|
|
1244
|
+
[button-dropdown-screenshot1]: https://user-images.githubusercontent.com/10110065/111631407-1e875680-87d2-11eb-9631-d1d2ccf8f076.png
|
|
1245
|
+
[button-dropdown-screenshot2]: https://user-images.githubusercontent.com/10110065/111631726-82118400-87d2-11eb-9653-4502c3d82d51.png
|
|
1246
|
+
[buttons-screenshot]: https://user-images.githubusercontent.com/10110065/142933460-7a84ad76-b57f-40a0-b809-292af31c1e8f.png
|
|
1247
|
+
[checkbox-screenshot]: https://dev-monkey-emails.s3-us-west-2.amazonaws.com/monkey-style-guide/demos/images/checkbox.png
|
|
1248
|
+
[contributors-shield]: https://img.shields.io/badge/Contributors-2-brightgreen?style=flat
|
|
1249
|
+
[contributors-url]: https://github.com/MonkeyECX/monkey-style-guide/graphs/contributors
|
|
1250
|
+
[date-range-picker]: https://user-images.githubusercontent.com/12416871/146080473-8543b9ae-7186-42ee-8ec8-bfd1eef09df6.png
|
|
1251
|
+
[expansion-screenshot1]: https://user-images.githubusercontent.com/10110065/111636157-f8b08080-87d6-11eb-86ab-86839297d068.png
|
|
1252
|
+
[expansion-screenshot2]: https://user-images.githubusercontent.com/10110065/111636340-24336b00-87d7-11eb-9f19-504ab96cc9af.png
|
|
1253
|
+
[file-upload-screenshot1]: https://user-images.githubusercontent.com/10110065/111640018-8b065380-87da-11eb-8d47-87ddea29b943.png
|
|
1254
|
+
[icons-screenshot1]: https://user-images.githubusercontent.com/12416871/196422713-51477478-4db3-4234-83a2-d87ef953d545.png
|
|
1255
|
+
[input-filter-screenshot]: https://user-images.githubusercontent.com/32619691/163216159-3a9f985e-3ba9-4e10-8ba4-0f60931f83d1.png
|
|
1256
|
+
[input-screenshot]: https://dev-monkey-emails.s3-us-west-2.amazonaws.com/monkey-style-guide/demos/images/input.png
|
|
1257
|
+
[license-shield]: https://img.shields.io/github/license/othneildrew/Best-README-Template.svg?style=flat-square
|
|
1258
|
+
[license-url]: https://github.com/othneildrew/Best-README-Template/blob/master/LICENSE.txt
|
|
1259
|
+
[linkedin-shield]: https://img.shields.io/badge/-LinkedIn-black.svg?style=flat-square&logo=linkedin&colorB=157
|
|
1260
|
+
[linkedin-url]: https://www.linkedin.com/company/monkeyexchange
|
|
1261
|
+
[modal-screenshot]: https://user-images.githubusercontent.com/12416871/119838920-2c480f00-beda-11eb-9e44-e42262f39c34.png
|
|
1262
|
+
[radiobutton-screenshot]: https://dev-monkey-emails.s3-us-west-2.amazonaws.com/monkey-style-guide/demos/images/radiobutton.png
|
|
1263
|
+
[select-screenshot]: https://dev-monkey-emails.s3-us-west-2.amazonaws.com/monkey-style-guide/demos/images/select.png
|
|
1264
|
+
[settings-screenshot]: https://dev-monkey-emails.s3-us-west-2.amazonaws.com/monkey-style-guide/demos/images/style-settings-json.png
|
|
1265
|
+
[table-screenshot]: https://user-images.githubusercontent.com/12416871/119574643-29d79f00-bd8c-11eb-9747-2e6dc86410da.png
|
|
1266
|
+
[toggle-screenshot]: https://user-images.githubusercontent.com/12416871/119849813-53570e80-bee3-11eb-87f8-0871f8e26f58.png
|