@webitel/ui-sdk 0.1.2 → 0.1.3-vite
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/CHANGELOG.md +9 -0
- package/README.md +29 -29
- package/dist/demo.html +1 -10
- package/dist/img/plyr.svg +68 -0
- package/dist/img/sprite/account.svg +4 -0
- package/dist/img/sprite/adfs.svg +5 -0
- package/dist/img/sprite/app-navigator.svg +11 -0
- package/dist/img/sprite/arrow-down.svg +3 -0
- package/dist/img/sprite/arrow-left.svg +3 -0
- package/dist/img/sprite/arrow-mix.svg +5 -0
- package/dist/img/sprite/arrow-right.svg +3 -0
- package/dist/img/sprite/arrow-up.svg +3 -0
- package/dist/img/sprite/attach.svg +3 -0
- package/dist/img/sprite/attention.svg +3 -0
- package/dist/img/sprite/azure.svg +19 -0
- package/dist/img/sprite/back.svg +4 -0
- package/dist/img/sprite/bell-badged.svg +4 -0
- package/dist/img/sprite/bell.svg +3 -0
- package/dist/img/sprite/bucket.svg +3 -0
- package/dist/img/sprite/calendar.svg +3 -0
- package/dist/img/sprite/call--filled.svg +3 -0
- package/dist/img/sprite/call-add-to--filled.svg +4 -0
- package/dist/img/sprite/call-add-to.svg +4 -0
- package/dist/img/sprite/call-disconnect--filled.svg +3 -0
- package/dist/img/sprite/call-disconnect.svg +3 -0
- package/dist/img/sprite/call-end--filled.svg +3 -0
- package/dist/img/sprite/call-end.svg +3 -0
- package/dist/img/sprite/call-inbound--filled.svg +4 -0
- package/dist/img/sprite/call-inbound.svg +3 -0
- package/dist/img/sprite/call-missed--filled.svg +4 -0
- package/dist/img/sprite/call-missed.svg +3 -0
- package/dist/img/sprite/call-outbound--filled.svg +3 -0
- package/dist/img/sprite/call-outbound.svg +3 -0
- package/dist/img/sprite/call-ringing--filled.svg +5 -0
- package/dist/img/sprite/call-ringing.svg +3 -0
- package/dist/img/sprite/call-transfer--filled.svg +4 -0
- package/dist/img/sprite/call-transfer.svg +3 -0
- package/dist/img/sprite/call.svg +3 -0
- package/dist/img/sprite/chat--filled.svg +3 -0
- package/dist/img/sprite/chat-emoji.svg +3 -0
- package/dist/img/sprite/chat-end--filled.svg +3 -0
- package/dist/img/sprite/chat-end.svg +4 -0
- package/dist/img/sprite/chat-group.svg +5 -0
- package/dist/img/sprite/chat-join.svg +4 -0
- package/dist/img/sprite/chat-message-status-read.svg +3 -0
- package/dist/img/sprite/chat-message-status-sent.svg +3 -0
- package/dist/img/sprite/chat-quick-response--filled.svg +3 -0
- package/dist/img/sprite/chat-quick-response.svg +3 -0
- package/dist/img/sprite/chat-reply.svg +3 -0
- package/dist/img/sprite/chat-send.svg +6 -0
- package/dist/img/sprite/chat-transfer--filled.svg +3 -0
- package/dist/img/sprite/chat-transfer.svg +4 -0
- package/dist/img/sprite/chat.svg +3 -0
- package/dist/img/sprite/checkbox--checked--filled.svg +3 -0
- package/dist/img/sprite/checkbox--checked.svg +3 -0
- package/dist/img/sprite/checkbox.svg +3 -0
- package/dist/img/sprite/clear.svg +3 -0
- package/dist/img/sprite/close--filled.svg +3 -0
- package/dist/img/sprite/close.svg +3 -0
- package/dist/img/sprite/collapse.svg +5 -0
- package/dist/img/sprite/column-select.svg +4 -0
- package/dist/img/sprite/conference.svg +8 -0
- package/dist/img/sprite/contacts.svg +3 -0
- package/dist/img/sprite/copy.svg +3 -0
- package/dist/img/sprite/docs.svg +6 -0
- package/dist/img/sprite/done.svg +4 -0
- package/dist/img/sprite/download.svg +5 -0
- package/dist/img/sprite/edit.svg +3 -0
- package/dist/img/sprite/email.svg +3 -0
- package/dist/img/sprite/expand.svg +5 -0
- package/dist/img/sprite/eye--closed.svg +5 -0
- package/dist/img/sprite/eye--opened.svg +4 -0
- package/dist/img/sprite/filter.svg +5 -0
- package/dist/img/sprite/generate.svg +4 -0
- package/dist/img/sprite/google.svg +6 -0
- package/dist/img/sprite/history.svg +4 -0
- package/dist/img/sprite/hold.svg +3 -0
- package/dist/img/sprite/idle.svg +4 -0
- package/dist/img/sprite/index.js +1 -0
- package/dist/img/sprite/instagram.svg +28 -0
- package/dist/img/sprite/job--accept.svg +4 -0
- package/dist/img/sprite/job--end.svg +4 -0
- package/dist/img/sprite/job.svg +5 -0
- package/dist/img/sprite/lock.svg +3 -0
- package/dist/img/sprite/logout.svg +3 -0
- package/dist/img/sprite/mail--color.svg +4 -0
- package/dist/img/sprite/mail.svg +3 -0
- package/dist/img/sprite/menu.svg +3 -0
- package/dist/img/sprite/messenger-facebook--filled.svg +3 -0
- package/dist/img/sprite/messenger-facebook.svg +9 -0
- package/dist/img/sprite/messenger-infobip.svg +5 -0
- package/dist/img/sprite/messenger-messenger.svg +12 -0
- package/dist/img/sprite/messenger-telegram--filled.svg +3 -0
- package/dist/img/sprite/messenger-telegram.svg +10 -0
- package/dist/img/sprite/messenger-viber--filled.svg +3 -0
- package/dist/img/sprite/messenger-viber.svg +3 -0
- package/dist/img/sprite/messenger-web-chat.svg +7 -0
- package/dist/img/sprite/messenger-whatsapp--filled.svg +4 -0
- package/dist/img/sprite/messenger-whatsapp.svg +10 -0
- package/dist/img/sprite/meta.svg +17 -0
- package/dist/img/sprite/mic-muted.svg +6 -0
- package/dist/img/sprite/mic.svg +4 -0
- package/dist/img/sprite/move.svg +6 -0
- package/dist/img/sprite/note.svg +3 -0
- package/dist/img/sprite/numpad.svg +24 -0
- package/dist/img/sprite/options.svg +5 -0
- package/dist/img/sprite/pause.svg +3 -0
- package/dist/img/sprite/pin.svg +3 -0
- package/dist/img/sprite/play.svg +4 -0
- package/dist/img/sprite/plus.svg +3 -0
- package/dist/img/sprite/preview-tag-application.svg +6 -0
- package/dist/img/sprite/preview-tag-audio.svg +4 -0
- package/dist/img/sprite/preview-tag-image.svg +4 -0
- package/dist/img/sprite/preview-tag-video.svg +4 -0
- package/dist/img/sprite/prompter.svg +3 -0
- package/dist/img/sprite/queue-member.svg +3 -0
- package/dist/img/sprite/radio--checked.svg +4 -0
- package/dist/img/sprite/radio.svg +3 -0
- package/dist/img/sprite/rec-off.svg +3 -0
- package/dist/img/sprite/rec.svg +4 -0
- package/dist/img/sprite/refresh.svg +4 -0
- package/dist/img/sprite/role.svg +3 -0
- package/dist/img/sprite/rounded-info.svg +3 -0
- package/dist/img/sprite/scorecard.svg +4 -0
- package/dist/img/sprite/search.svg +3 -0
- package/dist/img/sprite/send-arrow.svg +4 -0
- package/dist/img/sprite/settings.svg +3 -0
- package/dist/img/sprite/sort-arrow-down.svg +4 -0
- package/dist/img/sprite/sort-arrow-up.svg +4 -0
- package/dist/img/sprite/sound-off.svg +4 -0
- package/dist/img/sprite/sound-on.svg +3 -0
- package/dist/img/sprite/star--filled.svg +3 -0
- package/dist/img/sprite/star.svg +3 -0
- package/dist/img/sprite/stop.svg +4 -0
- package/dist/img/sprite/stt-download.svg +4 -0
- package/dist/img/sprite/stt-search.svg +3 -0
- package/dist/img/sprite/stt.svg +4 -0
- package/dist/img/sprite/telegram-bot.svg +6 -0
- package/dist/img/sprite/tick.svg +3 -0
- package/dist/img/sprite/tts-download.svg +5 -0
- package/dist/img/sprite/unpin.svg +5 -0
- package/dist/img/sprite/upload.svg +5 -0
- package/dist/img/sprite/user.svg +3 -0
- package/dist/img/sprite/video-cam-off.svg +4 -0
- package/dist/img/sprite/video-cam.svg +3 -0
- package/dist/img/sprite/zoom-in.svg +3 -0
- package/dist/img/sprite/zoom-out.svg +4 -0
- package/dist/ui-sdk.common.js +43300 -0
- package/dist/ui-sdk.common.js.map +1 -0
- package/dist/ui-sdk.css +1 -0
- package/dist/ui-sdk.umd.js +43319 -0
- package/dist/ui-sdk.umd.js.map +1 -0
- package/dist/ui-sdk.umd.min.js +35 -0
- package/dist/ui-sdk.umd.min.js.map +1 -0
- package/package.json +95 -44
- package/src/api/axios/generateInstance.js +25 -0
- package/src/api/defaults/getDefaultGetListResponse/getDefaultGetListResponse.js +6 -0
- package/src/api/defaults/getDefaultGetParams/getDefaultGetParams.js +9 -0
- package/src/api/defaults/index.js +7 -0
- package/src/api/interceptors/request/updateToken.interceptor.js +10 -0
- package/src/api/interceptors/response/handleUnauthorized.interceptor.js +12 -0
- package/src/api/transformers/applyTransform.js +8 -0
- package/src/api/transformers/camelToSnake/camelToSnake.transformer.js +4 -0
- package/src/api/transformers/generateUrl/generateUrl.transformer.js +13 -0
- package/src/api/transformers/index.js +23 -0
- package/src/api/transformers/log/log.transformer.js +6 -0
- package/src/api/transformers/merge/merge.transformer.js +5 -0
- package/src/api/transformers/mergeEach/mergeEach.transformer.js +8 -0
- package/src/api/transformers/notify/notify.transformer.js +32 -0
- package/src/api/transformers/sanitize/sanitize.transformer.js +12 -0
- package/src/api/transformers/snakeToCamel/snakeToCamel.transformer.js +4 -0
- package/src/api/transformers/starToSearch/starToSearch.transformer.js +12 -0
- package/src/components/index.js +91 -33
- package/src/components/on-demand/wt-cc-agent-status-timers/__tests__/wt-cc-agent-status-timers.spec.js +25 -0
- package/src/components/on-demand/wt-cc-agent-status-timers/wt-cc-agent-status-timers.vue +48 -0
- package/src/components/transitions/__tests__/ExpandTransition.spec.js +9 -0
- package/src/components/transitions/wt-expand-transition.vue +72 -0
- package/src/components/wt-app-header/__tests__/WtAppHeader.spec.js +19 -0
- package/src/components/wt-app-header/__tests__/WtAppNavigator.spec.js +23 -0
- package/src/components/wt-app-header/__tests__/WtHeaderActions.spec.js +21 -0
- package/src/components/wt-app-header/_variables.scss +25 -0
- package/src/components/wt-app-header/wt-app-header.vue +29 -0
- package/src/components/wt-app-header/wt-app-navigator.vue +278 -0
- package/src/components/wt-app-header/wt-header-actions.vue +183 -0
- package/src/components/wt-avatar/__tests__/wt-avatar.spec.js +9 -0
- package/src/components/wt-avatar/_variables.scss +32 -0
- package/src/components/wt-avatar/wt-avatar.vue +187 -0
- package/src/components/wt-badge/__tests__/wt-badge.spec.js +9 -0
- package/src/components/wt-badge/_variables.scss +3 -0
- package/src/components/wt-badge/wt-badge.vue +59 -0
- package/src/components/wt-button/Readme.md +23 -0
- package/src/components/wt-button/__tests__/WtButton.spec.js +29 -0
- package/src/components/wt-button/_variables.scss +41 -0
- package/src/components/wt-button/wt-button.vue +205 -0
- package/src/components/wt-button-select/Readme.md +13 -0
- package/src/components/wt-button-select/__tests__/WtButtonSelect.spec.js +40 -0
- package/src/components/wt-button-select/_variables.scss +7 -0
- package/src/components/wt-button-select/wt-button-select.vue +130 -0
- package/src/components/wt-checkbox/__tests__/WtCheckbox.spec.js +41 -0
- package/src/components/wt-checkbox/_variables.scss +4 -0
- package/src/components/wt-checkbox/wt-checkbox.vue +191 -0
- package/src/components/wt-chip/__tests__/WtChip.spec.js +19 -0
- package/src/components/wt-chip/_variables.scss +7 -0
- package/src/components/wt-chip/wt-chip.scss +41 -0
- package/src/components/wt-chip/wt-chip.vue +24 -0
- package/src/components/wt-context-menu/__tests__/WtContextMenu.spec.js +9 -0
- package/src/components/wt-context-menu/_variables.scss +9 -0
- package/src/components/wt-context-menu/wt-context-menu.vue +131 -0
- package/src/components/wt-copy-action/__tests__/WtCopyAction.spec.js +14 -0
- package/src/components/wt-copy-action/wt-copy-action.vue +63 -0
- package/src/components/wt-datepicker/__tests__/WtDatepicker.spec.js +28 -0
- package/src/components/wt-datepicker/_variables.scss +56 -0
- package/src/components/wt-datepicker/wt-datepicker.vue +240 -0
- package/src/components/wt-divider/__tests__/WtDivider.spec.js +9 -0
- package/src/components/wt-divider/_variables.scss +5 -0
- package/src/components/wt-divider/wt-divider.vue +30 -0
- package/src/components/wt-dummy/__tests__/WtDummy.spec.js +9 -0
- package/src/components/wt-dummy/wt-dummy.vue +73 -0
- package/src/components/wt-error-page/__tests__/wt-error-page.spec.js +17 -0
- package/src/components/wt-error-page/wt-error-page.vue +104 -0
- package/src/components/wt-expansion-panel/__tests__/WtExpansionPanel.spec.js +9 -0
- package/src/components/wt-expansion-panel/wt-expansion-panel.vue +67 -0
- package/src/components/wt-filters-panel-wrapper/__tests__/WtFiltersPanelWrapper.spec.js +24 -0
- package/src/components/wt-filters-panel-wrapper/wt-filters-panel-wrapper.vue +146 -0
- package/src/components/wt-headline/__tests__/WtHeadline.spec.js +47 -0
- package/src/components/wt-headline/_variables.scss +6 -0
- package/src/components/wt-headline/wt-headline.vue +50 -0
- package/src/components/wt-headline-nav/Readme.md +9 -0
- package/src/components/wt-headline-nav/__tests__/wt-headline-nav.spec.js +13 -0
- package/src/components/wt-headline-nav/_variables.scss +8 -0
- package/src/components/wt-headline-nav/wt-headline-nav.vue +97 -0
- package/src/components/wt-hint/__tests__/WtHint.spec.js +9 -0
- package/src/components/wt-hint/wt-hint.vue +27 -0
- package/src/components/wt-icon/Readme.md +327 -0
- package/src/components/wt-icon/__tests__/WtIcon.spec.js +24 -0
- package/src/components/wt-icon/_variables.scss +31 -0
- package/src/components/wt-icon/docs/cleanup-svg-fill-none.png +0 -0
- package/src/components/wt-icon/docs/cleanup-svg-fill.png +0 -0
- package/src/components/wt-icon/docs/cleanup-svg-viewbox-correct.png +0 -0
- package/src/components/wt-icon/docs/cleanup-svg-viewbox-incorrect.png +0 -0
- package/src/components/wt-icon/docs/cleanup-svg-width-height.png +0 -0
- package/src/components/wt-icon/docs/svg-icon-code-example.png +0 -0
- package/src/components/wt-icon/docs/svg-sprite-in-dom.png +0 -0
- package/src/components/wt-icon/wt-icon.vue +172 -0
- package/src/components/wt-icon-action/__tests__/WtIconAction.spec.js +9 -0
- package/src/components/wt-icon-action/_internals/__tests__/WtAddIconAction.spec.js +9 -0
- package/src/components/wt-icon-action/_internals/__tests__/WtDeleteIconAction.spec.js +9 -0
- package/src/components/wt-icon-action/_internals/__tests__/WtDownloadIconAction.spec.js +9 -0
- package/src/components/wt-icon-action/_internals/__tests__/WtEditIconAction.spec.js +9 -0
- package/src/components/wt-icon-action/_internals/__tests__/WtHistoryIconAction.spec.js +9 -0
- package/src/components/wt-icon-action/_internals/__tests__/WtRefreshIconAction.spec.js +9 -0
- package/src/components/wt-icon-action/_internals/wt-add-icon-action.vue +27 -0
- package/src/components/wt-icon-action/_internals/wt-delete-icon-action.vue +27 -0
- package/src/components/wt-icon-action/_internals/wt-download-icon-action.vue +27 -0
- package/src/components/wt-icon-action/_internals/wt-edit-icon-action.vue +27 -0
- package/src/components/wt-icon-action/_internals/wt-history-icon-action.vue +27 -0
- package/src/components/wt-icon-action/_internals/wt-refresh-icon-action.vue +27 -0
- package/src/components/wt-icon-action/wt-icon-action.vue +54 -0
- package/src/components/wt-icon-btn/Readme.md +10 -0
- package/src/components/wt-icon-btn/__tests__/WtIconBtn.spec.js +15 -0
- package/src/components/wt-icon-btn/_variables.scss +9 -0
- package/src/components/wt-icon-btn/wt-icon-btn.vue +47 -0
- package/src/components/wt-indicator/__tests__/WtIndicator.spec.js +29 -0
- package/src/components/wt-indicator/_variables.scss +22 -0
- package/src/components/wt-indicator/wt-indicator.vue +124 -0
- package/src/components/wt-input/__tests__/WtInput.spec.js +25 -0
- package/src/components/wt-input/_variables.scss +8 -0
- package/src/components/wt-input/wt-input.vue +343 -0
- package/src/components/wt-input-info/__tests__/WtInputInfo.spec.js +9 -0
- package/src/{css/components/atoms → components}/wt-input-info/_variables.scss +7 -6
- package/src/components/wt-input-info/wt-input-info.vue +40 -0
- package/src/components/wt-item-link/__tests__/WtItemLink.spec.js +9 -0
- package/src/components/wt-item-link/wt-item-link.vue +57 -0
- package/src/components/wt-label/__tests__/WtLabel.spec.js +9 -0
- package/src/{css/components/atoms → components}/wt-label/_variables.scss +3 -4
- package/src/components/wt-label/mixins/labelUsageMixin.js +21 -0
- package/src/components/wt-label/wt-label.vue +77 -0
- package/src/components/wt-load-bar/__tests__/WtLoadBar.spec.js +9 -0
- package/src/components/wt-load-bar/_variables.scss +6 -0
- package/src/components/wt-load-bar/wt-load-bar.vue +55 -0
- package/src/components/wt-loader/__tests__/WtLoader.spec.js +9 -0
- package/src/components/{atoms/wt-loader/wt-loader.vue → wt-loader/_internals/wt-loader--md.vue} +5 -6
- package/src/components/wt-loader/_internals/wt-loader--sm.vue +73 -0
- package/src/components/wt-loader/_variables.scss +8 -0
- package/src/components/wt-loader/wt-loader.vue +37 -0
- package/src/components/wt-navigation-bar/__tests__/WtNavigationBar.spec.js +68 -0
- package/src/components/wt-navigation-bar/_variables.scss +16 -0
- package/src/components/wt-navigation-bar/wt-navigation-bar.vue +282 -0
- package/src/components/wt-notification/__tests__/WtNotification.spec.js +21 -0
- package/src/components/wt-notification/_variables.scss +10 -0
- package/src/components/wt-notification/wt-notification.vue +86 -0
- package/src/components/wt-notifications-bar/__tests__/WtNotificationsBar.spec.js +50 -0
- package/src/components/wt-notifications-bar/_variables.scss +7 -0
- package/src/components/wt-notifications-bar/wt-notifications-bar.vue +78 -0
- package/src/components/wt-page-header/__tests__/wt-page-header.spec.js +9 -0
- package/src/components/wt-page-header/wt-page-header.vue +83 -0
- package/src/components/wt-page-wrapper/__tests__/WtPageWrapper.spec.js +33 -0
- package/src/components/wt-page-wrapper/_variables.scss +5 -0
- package/src/components/wt-page-wrapper/wt-page-wrapper.vue +58 -0
- package/src/components/wt-pagination/__tests__/WtPagination.spec.js +38 -0
- package/src/components/wt-pagination/_variables.scss +5 -0
- package/src/components/wt-pagination/wt-pagination.vue +148 -0
- package/src/components/wt-player/__tests__/WtPlayer.spec.js +9 -0
- package/src/components/wt-player/_variables.scss +8 -0
- package/src/components/wt-player/wt-player.vue +208 -0
- package/src/components/wt-popup/__tests__/WtPopup.spec.js +47 -0
- package/src/components/wt-popup/_variables.scss +20 -0
- package/src/components/wt-popup/wt-popup.vue +138 -0
- package/src/components/wt-progress-bar/__tests__/WtProgressBar.spec.js +17 -0
- package/src/components/wt-progress-bar/_variables.scss +11 -0
- package/src/components/wt-progress-bar/wt-progress-bar.vue +89 -0
- package/src/components/wt-radio/__tests__/WtRadio.spec.js +42 -0
- package/src/{css/components/molecules → components}/wt-radio/_variables.scss +6 -6
- package/src/components/wt-radio/wt-radio.vue +180 -0
- package/src/components/wt-rounded-action/Readme.md +68 -0
- package/src/components/wt-rounded-action/__tests__/WtRoundedAction.spec.js +9 -0
- package/src/components/wt-rounded-action/_variables.scss +14 -0
- package/src/components/wt-rounded-action/wt-rounded-action.vue +139 -0
- package/src/components/wt-search-bar/__tests__/WtSearchBar.spec.js +44 -0
- package/src/components/wt-search-bar/_variables.scss +8 -0
- package/src/components/wt-search-bar/wt-search-bar.vue +222 -0
- package/src/components/wt-select/__tests__/WtSelect.spec.js +27 -0
- package/src/components/wt-select/_multiselect.scss +198 -0
- package/src/components/wt-select/_variables.scss +14 -0
- package/src/components/wt-select/mixins/__tests__/multiselectMixin.spec.js +32 -0
- package/src/components/wt-select/mixins/multiselectMixin.js +151 -0
- package/src/components/wt-select/wt-select.vue +288 -0
- package/src/components/wt-slider/__tests__/WtSlider.spec.js +9 -0
- package/src/components/wt-slider/_variables.scss +15 -0
- package/src/components/wt-slider/wt-slider.vue +179 -0
- package/src/components/wt-status-select/__tests__/WtStatusSelect.spec.js +25 -0
- package/src/components/wt-status-select/_internals/StatusOptions.lookup.js +24 -0
- package/src/components/wt-status-select/_variables.scss +6 -0
- package/src/components/wt-status-select/wt-status-select.vue +134 -0
- package/src/components/wt-stepper/__tests__/WtStepper.spec.vue.js +18 -0
- package/src/components/wt-stepper/wt-stepper.vue +89 -0
- package/src/components/wt-switcher/__tests__/WtSwitcher.spec.js +31 -0
- package/src/components/wt-switcher/_variables.scss +17 -0
- package/src/components/wt-switcher/wt-switcher.vue +191 -0
- package/src/components/wt-table/__tests__/WtTable.spec.js +134 -0
- package/src/components/wt-table/_internals/getSortOrder.js +12 -0
- package/src/components/wt-table/_variables.scss +16 -0
- package/src/components/wt-table/wt-table.vue +269 -0
- package/src/components/wt-table-actions/__tests__/WtTableActions.spec.js +9 -0
- package/src/components/wt-table-actions/_variables.scss +5 -0
- package/src/components/wt-table-actions/wt-table-actions.vue +110 -0
- package/src/components/wt-table-column-select/__tests__/WtTableColumnSelect.spec.js +31 -0
- package/src/components/wt-table-column-select/wt-table-column-select.vue +178 -0
- package/src/components/wt-tabs/__tests__/WtTabs.spec.js +36 -0
- package/src/{css/components/molecules → components}/wt-tabs/_variables.scss +14 -14
- package/src/components/wt-tabs/wt-tabs.vue +125 -0
- package/src/components/wt-tags-input/__tests__/WtTagsInput.spec.js +42 -0
- package/src/components/wt-tags-input/_variables.scss +24 -0
- package/src/components/wt-tags-input/wt-tags-input.vue +226 -0
- package/src/components/wt-textarea/__tests__/WtTextarea.spec.js +46 -0
- package/src/components/wt-textarea/_variables.scss +5 -0
- package/src/components/wt-textarea/wt-textarea.vue +223 -0
- package/src/components/wt-time-input/__tests__/WtTimeInput.spec.js +25 -0
- package/src/components/wt-time-input/wt-time-input.vue +187 -0
- package/src/components/wt-timepicker/__tests__/WtTimepicker.spec.js +60 -0
- package/src/components/wt-timepicker/_variables.scss +5 -0
- package/src/components/wt-timepicker/wt-timepicker.vue +181 -0
- package/src/components/wt-tooltip/__tests__/WtTooltip.spec.js +30 -0
- package/src/components/wt-tooltip/_internals/useTooltipTriggerSubscriptions.js +68 -0
- package/src/components/wt-tooltip/_internals/wt-tooltip-floating.vue +48 -0
- package/src/components/wt-tooltip/_variables.scss +11 -0
- package/src/components/wt-tooltip/wt-tooltip.vue +150 -0
- package/src/composables/useCachedInterval/__tests__/useCachedInterval.spec.js +14 -0
- package/src/composables/useCachedInterval/useCachedInterval.js +21 -0
- package/src/composables/useDestroyableSortable/useDestroyableSortable.js +66 -0
- package/src/composables/useRepresentableAgentPauseCause/__tests__/useRepresentableAgentPauseCause.spec.js +83 -0
- package/src/composables/useRepresentableAgentPauseCause/useRepresentableAgentPauseCause.js +37 -0
- package/src/css/main.scss +72 -69
- package/src/css/styleguide/_styleguide.scss +9 -0
- package/src/css/styleguide/border-radius/_border-radius.scss +4 -0
- package/src/css/styleguide/colors/_colors.scss +180 -0
- package/src/css/styleguide/colors/_deprecated.scss +151 -0
- package/src/css/styleguide/colors/_palette.scss +358 -0
- package/src/css/styleguide/display-helpers/_display-helpers.scss +23 -0
- package/src/css/styleguide/elevations/_elevations.scss +13 -0
- package/src/css/styleguide/fonts/_fonts.scss +126 -0
- package/src/css/styleguide/placeholder/_placeholder.scss +49 -0
- package/src/css/styleguide/scroll.scss +43 -40
- package/src/css/styleguide/spacings/_spacings.scss +15 -0
- package/src/css/styleguide/transitions/_transitions.scss +1 -0
- package/src/css/styleguide/transitions/fade/_fade.scss +8 -0
- package/src/css/styleguide/typography/_typography.scss +113 -0
- package/src/css/styleguide/viewport-breakpoints/_viewport-breakpoints.scss +25 -0
- package/src/directives/clickaway/clickaway.js +3 -52
- package/src/directives/index.js +0 -5
- package/src/enums/AbstractUserStatus/AbstractUserStatus.enum.js +8 -0
- package/src/enums/AgentStatus/AgentStatus.enum.js +6 -0
- package/src/enums/WebitelApplications/AdminSections.enum.js +50 -0
- package/src/enums/WebitelApplications/AuditorSections.enum.js +5 -0
- package/src/enums/WebitelApplications/CrmSections.enum.js +5 -0
- package/src/enums/WebitelApplications/SupervisorSections.enum.js +7 -0
- package/src/enums/WebitelApplications/WebitelApplications.enum.js +11 -0
- package/src/locale/.DS_Store +0 -0
- package/src/locale/en/en.js +333 -0
- package/src/locale/es/es.js +282 -0
- package/src/locale/i18n.js +9 -5
- package/src/locale/ru/ru.js +334 -3
- package/src/locale/ua/ua.js +358 -0
- package/src/mixins/dataFilterMixins/__tests__/apiFilterMixin.spec.js +55 -0
- package/src/mixins/dataFilterMixins/__tests__/enumFilterMixin.spec.js +70 -0
- package/src/mixins/dataFilterMixins/__tests__/paginationFilterMixin.spec.js +85 -0
- package/src/mixins/dataFilterMixins/__tests__/sortFilterMixin.spec.js +57 -0
- package/src/mixins/dataFilterMixins/__tests__/urlControllerMixin.spec.js +48 -0
- package/src/mixins/dataFilterMixins/_urlControllerMixin/_urlControllerMixin.js +37 -0
- package/src/mixins/dataFilterMixins/apiFilterMixin.js +23 -0
- package/src/mixins/dataFilterMixins/baseFilterMixin/baseFilterMixin.js +29 -0
- package/src/mixins/dataFilterMixins/enumFilterMixin.js +30 -0
- package/src/mixins/dataFilterMixins/paginationFilterMixin.js +79 -0
- package/src/mixins/dataFilterMixins/sortFilterMixin.js +75 -0
- package/src/mixins/validationMixin/__tests__/validationMixin.spec.js +47 -0
- package/src/mixins/validationMixin/useValidation.js +41 -0
- package/src/mixins/validationMixin/validationMixin.js +26 -10
- package/src/modules/AgentStatusSelect/api/agent-status.js +24 -0
- package/src/modules/AgentStatusSelect/api/pause-cause.js +47 -0
- package/src/modules/AgentStatusSelect/components/__tests__/wt-cc-agent-status-select.spec.js +83 -0
- package/src/modules/AgentStatusSelect/components/__tests__/wt-cc-pause-cause-popup.spec.js +18 -0
- package/src/modules/AgentStatusSelect/components/_internals/wt-cc-pause-cause-popup.vue +122 -0
- package/src/modules/AgentStatusSelect/components/_internals/wt-cc-status-select-error-popup.vue +55 -0
- package/src/modules/AgentStatusSelect/components/wt-cc-agent-status-select.vue +107 -0
- package/src/modules/AuditForm/components/__tests__/audit-form-question-read-wrapper.spec.js +14 -0
- package/src/modules/AuditForm/components/__tests__/audit-form-question-write-wrapper.spec.js +60 -0
- package/src/modules/AuditForm/components/__tests__/audit-form-question.spec.js +14 -0
- package/src/modules/AuditForm/components/__tests__/audit-form.spec.js +70 -0
- package/src/modules/AuditForm/components/audit-form-question-read-wrapper.vue +132 -0
- package/src/modules/AuditForm/components/audit-form-question-write-wrapper.vue +154 -0
- package/src/modules/AuditForm/components/audit-form-question.vue +136 -0
- package/src/modules/AuditForm/components/audit-form.vue +183 -0
- package/src/modules/AuditForm/components/questions/options/__tests__/audit-form-question-options-write-row.spec.js +24 -0
- package/src/modules/AuditForm/components/questions/options/__tests__/audit-form-question-options.spec.js +45 -0
- package/src/modules/AuditForm/components/questions/options/audit-form-question-options-write-row.vue +89 -0
- package/src/modules/AuditForm/components/questions/options/audit-form-question-options.vue +97 -0
- package/src/modules/AuditForm/components/questions/score/__tests__/audit-form-question-score.spec.js +30 -0
- package/src/modules/AuditForm/components/questions/score/audit-form-question-score.vue +132 -0
- package/src/modules/AuditForm/schemas/AuditFormQuestionOptionsSchema.js +13 -0
- package/src/modules/AuditForm/schemas/AuditFormQuestionSchema.js +8 -0
- package/src/modules/AuditForm/schemas/AuditFormQuestionScoreSchema.js +8 -0
- package/src/modules/CSVExport/CSVExport.js +89 -0
- package/src/modules/CSVExport/__tests__/CSVExport.spec.js +63 -0
- package/src/modules/CSVExport/mixins/exportCSVMixin.js +46 -0
- package/src/modules/CardStoreModule/composables/useCardStore.js +55 -0
- package/src/modules/CardStoreModule/store/CardStoreModule.js +84 -0
- package/src/modules/DeleteConfirmationPopup/components/delete-confirmation-popup.vue +87 -0
- package/src/modules/DeleteConfirmationPopup/composables/useDeleteConfirmationPopup.js +28 -0
- package/src/modules/FilesExport/FilesExport.js +113 -0
- package/src/modules/FilesExport/__tests__/FilesExport.spec.js +66 -0
- package/src/modules/FilesExport/mixins/exportFilesMixin.js +46 -0
- package/src/modules/FilesExport/scripts/generateMediaURL.js +7 -0
- package/src/modules/Filters/classes/BaseFilterSchema.js +13 -0
- package/src/modules/Filters/components/filter-pagination.vue +61 -0
- package/src/modules/Filters/components/filter-table-fields.vue +61 -0
- package/src/modules/Filters/composables/useTableFilters.js +17 -0
- package/src/modules/Filters/restores/filterFieldsRestore.js +9 -0
- package/src/modules/Filters/restores/readme.md +1 -0
- package/src/modules/Filters/store/FiltersStoreModule.js +181 -0
- package/src/modules/Notifications/assets/audio/end-chat.wav +0 -0
- package/src/modules/Notifications/assets/audio/new-chat.wav +0 -0
- package/src/modules/Notifications/assets/audio/new-message.wav +0 -0
- package/src/modules/Notifications/assets/audio/ringing.mp3 +0 -0
- package/src/modules/Notifications/assets/img/notification-icon.png +0 -0
- package/src/modules/Notifications/store/NotificationsStoreModule.js +185 -0
- package/src/modules/Notifications/store/__tests__/NotificationsStoreModule.actions.spec.js +130 -0
- package/src/modules/Notifications/store/__tests__/NotificationsStoreModule.mutations.spec.js +49 -0
- package/src/modules/QueryFilters/api/__tests__/defaults.spec.js +18 -0
- package/src/modules/QueryFilters/api/defaults.js +16 -0
- package/src/modules/QueryFilters/classes/ApiFilterSchema.js +32 -0
- package/src/modules/QueryFilters/classes/BaseFilterSchema.js +6 -0
- package/src/modules/QueryFilters/classes/EnumFilterSchema.js +23 -0
- package/src/modules/QueryFilters/classes/__tests__/ApiFilterSchema.spec.js +25 -0
- package/src/modules/QueryFilters/components/__tests__/abstract-api-filter.spec.js +52 -0
- package/src/modules/QueryFilters/components/__tests__/abstract-enum-filter.spec.js +38 -0
- package/src/modules/QueryFilters/components/__tests__/filter-datetime.spec.js +49 -0
- package/src/modules/QueryFilters/components/__tests__/filter-from-to.spec.js +63 -0
- package/src/modules/QueryFilters/components/__tests__/filter-search.spec.js +47 -0
- package/src/modules/QueryFilters/components/abstract-api-filter.vue +42 -0
- package/src/modules/QueryFilters/components/abstract-enum-filter.vue +32 -0
- package/src/modules/QueryFilters/components/filter-datetime.vue +40 -0
- package/src/modules/QueryFilters/components/filter-from-to.vue +143 -0
- package/src/modules/QueryFilters/components/filter-search.vue +33 -0
- package/src/modules/QueryFilters/components/filter-table-fields.vue +101 -0
- package/src/modules/QueryFilters/mixins/__tests__/apiFilterMixin.spec.js +48 -0
- package/src/modules/QueryFilters/mixins/__tests__/enumFilterMixin.spec.js +68 -0
- package/src/modules/QueryFilters/mixins/__tests__/paginationFilterMixin.spec.js +79 -0
- package/src/modules/QueryFilters/mixins/__tests__/sortFilterMixin.spec.js +63 -0
- package/src/modules/QueryFilters/mixins/__tests__/urlControllerMixin.spec.js +46 -0
- package/src/modules/QueryFilters/mixins/_urlControllerMixin/_urlControllerMixin.js +39 -0
- package/src/modules/QueryFilters/mixins/apiFilterMixin.js +41 -0
- package/src/modules/QueryFilters/mixins/baseFilterMixin/baseFilterMixin.js +34 -0
- package/src/modules/QueryFilters/mixins/enumFilterMixin.js +51 -0
- package/src/modules/QueryFilters/mixins/paginationFilterMixin.js +76 -0
- package/src/modules/QueryFilters/mixins/sortFilterMixin.js +56 -0
- package/src/modules/QueryFilters/store/QueryFiltersStoreModule.js +61 -0
- package/src/modules/QueryFilters/store/__tests__/QueryFiltersStoreModule.spec.js +89 -0
- package/src/modules/QueryFilters/store/queryFilters.js +6 -0
- package/src/modules/TableStoreModule/composables/useTableStore.js +58 -0
- package/src/modules/TableStoreModule/store/TableStoreModule.js +207 -0
- package/src/modules/Userinfo/api/BaseAPIService.js +7 -0
- package/src/modules/Userinfo/api/auth.js +31 -0
- package/src/modules/Userinfo/api/userinfo.js +44 -0
- package/src/modules/Userinfo/classes/ApplicationsAccess.js +217 -0
- package/src/modules/Userinfo/components/__tests__/auth.spec.js +55 -0
- package/src/modules/Userinfo/components/the-auth.vue +76 -0
- package/src/modules/Userinfo/enums/Permissions.enum.js +7 -0
- package/src/modules/Userinfo/store/UserinfoStoreModule.js +153 -0
- package/src/plugins/breakpoint/breakpoint.plugin.js +137 -0
- package/src/scripts/__tests__/caseConverters.spec.js +81 -0
- package/src/scripts/__tests__/convertDuration.spec.js +21 -0
- package/src/scripts/__tests__/debounce.spec.js +14 -0
- package/src/scripts/__tests__/editProxy.spec.js +9 -0
- package/src/scripts/__tests__/isEmpty.spec.js +16 -0
- package/src/scripts/__tests__/prettifyFileSize.spec.js +18 -0
- package/src/scripts/__tests__/prettifyTime.spec.js +18 -0
- package/src/scripts/__tests__/preventHiddenPageCallsDecorator.spec.js +16 -0
- package/src/scripts/__tests__/sortQueryAdapters.spec.js +12 -0
- package/src/scripts/__tests__/updateObject.spec.js +19 -0
- package/src/scripts/caseConverters.js +89 -0
- package/src/scripts/convertDuration.js +15 -0
- package/src/scripts/debounce.js +3 -9
- package/src/scripts/editProxy.js +9 -0
- package/src/scripts/eventBus.js +8 -0
- package/src/scripts/isEmpty.js +9 -0
- package/src/scripts/prettifyFileSize.js +11 -0
- package/src/scripts/prettifyTime.js +9 -0
- package/src/scripts/preventHiddenPageCallsDecorator.js +6 -0
- package/src/scripts/sortQueryAdapters.js +21 -0
- package/src/scripts/updateObject.js +6 -0
- package/src/store/BaseStoreModules/ApiStoreModule.js +93 -0
- package/src/store/BaseStoreModules/BaseStoreModule.js +49 -0
- package/src/store/BaseStoreModules/__tests__/BaseStoreModule.spec.js +104 -0
- package/src/store/ReactiveNowStoreModule/ReactiveNowStoreModule.js +27 -0
- package/src/store/helpers/__tests__/getNamespacedState.spec.js +11 -0
- package/src/store/helpers/getNamespacedState.js +5 -0
- package/src/validators/decimalValidator.js +9 -0
- package/src/validators/domainValidator.js +5 -0
- package/.eslintrc.js +0 -34
- package/babel.config.js +0 -5
- package/dist/@webitel/ui-sdk.common.js +0 -11586
- package/dist/@webitel/ui-sdk.common.js.map +0 -1
- package/dist/@webitel/ui-sdk.css +0 -1
- package/dist/@webitel/ui-sdk.umd.js +0 -11596
- package/dist/@webitel/ui-sdk.umd.js.map +0 -1
- package/dist/@webitel/ui-sdk.umd.min.js +0 -2
- package/dist/@webitel/ui-sdk.umd.min.js.map +0 -1
- package/dist/fonts/Montserrat-Regular.ee653992.ttf +0 -0
- package/dist/fonts/Montserrat-SemiBold.c641dbee.ttf +0 -0
- package/dist/img/arrow-down--active--md.06c6b9a1.svg +0 -3
- package/dist/img/arrow-down--disabled--md.8dd31dcb.svg +0 -3
- package/dist/img/arrow-down--md.907c231e.svg +0 -3
- package/dist/img/calendar--active--md.b649abe2.svg +0 -6
- package/dist/img/calendar--disabled--md.ff268289.svg +0 -3
- package/dist/img/calendar--md.d0280382.svg +0 -6
- package/jest.config.js +0 -3
- package/package-lock.json +0 -15072
- package/public/favicon.ico +0 -0
- package/public/index.html +0 -17
- package/src/assets/icons/arrow-down--active--md.svg +0 -3
- package/src/assets/icons/arrow-down--disabled--md.svg +0 -3
- package/src/assets/icons/arrow-down--md.svg +0 -3
- package/src/assets/icons/calendar--active--md.svg +0 -6
- package/src/assets/icons/calendar--disabled--md.svg +0 -3
- package/src/assets/icons/calendar--md.svg +0 -6
- package/src/components/atoms/wt-badge/wt-badge.vue +0 -15
- package/src/components/atoms/wt-button/wt-button.vue +0 -202
- package/src/components/atoms/wt-divider/wt-divider.vue +0 -24
- package/src/components/atoms/wt-icon/wt-icon.vue +0 -499
- package/src/components/atoms/wt-input-info/wt-input-info.vue +0 -34
- package/src/components/atoms/wt-label/wt-label.vue +0 -58
- package/src/components/atoms/wt-tooltip/wt-tooltip.vue +0 -54
- package/src/components/molecules/wt-checkbox/wt-checkbox.vue +0 -167
- package/src/components/molecules/wt-datepicker/wt-datepicker.vue +0 -200
- package/src/components/molecules/wt-datetimepicker/wt-datetimepicker.vue +0 -306
- package/src/components/molecules/wt-icon-btn/wt-icon-btn.vue +0 -69
- package/src/components/molecules/wt-input/wt-input.vue +0 -300
- package/src/components/molecules/wt-notification/wt-notification.vue +0 -74
- package/src/components/molecules/wt-popup/wt-popup.vue +0 -89
- package/src/components/molecules/wt-radio/wt-radio.vue +0 -168
- package/src/components/molecules/wt-search-bar/wt-search-bar.vue +0 -186
- package/src/components/molecules/wt-select/wt-select.vue +0 -394
- package/src/components/molecules/wt-switcher/wt-switcher.vue +0 -157
- package/src/components/molecules/wt-tabs/wt-tabs.vue +0 -125
- package/src/components/molecules/wt-textarea/wt-textarea.vue +0 -141
- package/src/components/molecules/wt-time-input/wt-time-input.vue +0 -141
- package/src/components/molecules/wt-timepicker/wt-timepicker.vue +0 -110
- package/src/components/organisms/wt-pagination/wt-pagination.vue +0 -122
- package/src/css/colors/_colors.scss +0 -67
- package/src/css/components/_components.scss +0 -25
- package/src/css/components/atoms/wt-badge/_variables.scss +0 -6
- package/src/css/components/atoms/wt-badge/wt-badge.scss +0 -8
- package/src/css/components/atoms/wt-button/_variables.scss +0 -47
- package/src/css/components/atoms/wt-divider/_variables.scss +0 -5
- package/src/css/components/atoms/wt-icon/_variables.scss +0 -29
- package/src/css/components/atoms/wt-loader/_variables.scss +0 -8
- package/src/css/components/atoms/wt-tooltip/_variables.scss +0 -10
- package/src/css/components/molecules/wt-checkbox/_variables.scss +0 -4
- package/src/css/components/molecules/wt-datepicker/_variables.scss +0 -20
- package/src/css/components/molecules/wt-datepicker/datepicker-calendar.scss +0 -100
- package/src/css/components/molecules/wt-datetimepicker/_variables.scss +0 -12
- package/src/css/components/molecules/wt-icon-btn/_variables.scss +0 -3
- package/src/css/components/molecules/wt-input/_variables.scss +0 -6
- package/src/css/components/molecules/wt-notification/_variables.scss +0 -10
- package/src/css/components/molecules/wt-popup/_variables.scss +0 -11
- package/src/css/components/molecules/wt-search-bar/_variables.scss +0 -4
- package/src/css/components/molecules/wt-select/_variables.scss +0 -23
- package/src/css/components/molecules/wt-switcher/_variables.scss +0 -14
- package/src/css/components/molecules/wt-textarea/_variables.scss +0 -5
- package/src/css/components/molecules/wt-timepicker/_variables.scss +0 -4
- package/src/css/components/organisms/wt-pagination/_variables.scss +0 -7
- package/src/css/fonts/Montserrat/Montserrat-Regular.ttf +0 -0
- package/src/css/fonts/Montserrat/Montserrat-SemiBold.ttf +0 -0
- package/src/css/fonts.scss +0 -9
- package/src/css/styleguide/styleguide.scss +0 -3
- package/src/css/typography/_typography.scss +0 -72
- package/src/install.js +0 -15
- package/src/main.js +0 -14
- package/src/playground.vue +0 -451
- package/src/the-app.vue +0 -20
- package/vue.config.js +0 -11
|
@@ -0,0 +1,187 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div
|
|
3
|
+
class="wt-avatar"
|
|
4
|
+
:class="[`wt-avatar--size-${size}`]"
|
|
5
|
+
>
|
|
6
|
+
<wt-badge
|
|
7
|
+
v-if="badge"
|
|
8
|
+
:color-variable="badgeColorVar"
|
|
9
|
+
:icon-badge="isDnd ? 'dnd' : null"
|
|
10
|
+
></wt-badge>
|
|
11
|
+
<div
|
|
12
|
+
class="wt-avatar__letters"
|
|
13
|
+
v-if="isLetterAvatar"
|
|
14
|
+
:style="{ background: `var(${avatarLettersBackground})` }"
|
|
15
|
+
>
|
|
16
|
+
{{ avatarLetters }}
|
|
17
|
+
</div>
|
|
18
|
+
<img
|
|
19
|
+
v-else
|
|
20
|
+
class="wt-avatar__img"
|
|
21
|
+
:src="imgSrc"
|
|
22
|
+
alt="avatar"
|
|
23
|
+
>
|
|
24
|
+
</div>
|
|
25
|
+
</template>
|
|
26
|
+
|
|
27
|
+
<script setup>
|
|
28
|
+
import { computed } from 'vue';
|
|
29
|
+
import defaultAvatar from '../../assets/components/atoms/wt-avatar/default-avatar.svg';
|
|
30
|
+
import AbstractUserStatus from '../../enums/AbstractUserStatus/AbstractUserStatus.enum';
|
|
31
|
+
|
|
32
|
+
const props = defineProps({
|
|
33
|
+
src: {
|
|
34
|
+
type: String,
|
|
35
|
+
},
|
|
36
|
+
size: {
|
|
37
|
+
type: String,
|
|
38
|
+
default: 'md',
|
|
39
|
+
options: ['xs', 'sm', 'md', 'lg', 'xl', '2xl', '3xl'],
|
|
40
|
+
},
|
|
41
|
+
badge: {
|
|
42
|
+
type: Boolean,
|
|
43
|
+
default: false,
|
|
44
|
+
},
|
|
45
|
+
username: {
|
|
46
|
+
type: String,
|
|
47
|
+
description: 'If passed, avatar is letter-based (if not passed src)',
|
|
48
|
+
},
|
|
49
|
+
status: {
|
|
50
|
+
type: String,
|
|
51
|
+
options: AbstractUserStatus,
|
|
52
|
+
default: AbstractUserStatus.OFFLINE,
|
|
53
|
+
},
|
|
54
|
+
});
|
|
55
|
+
|
|
56
|
+
const isLetterAvatar = computed(() => !props.src && props.username);
|
|
57
|
+
|
|
58
|
+
const avatarLetters = computed(() => {
|
|
59
|
+
if (!props.username) return false;
|
|
60
|
+
const abbreviation = props.username.split(' ').map((word) => word.at(0).toUpperCase()).join('');
|
|
61
|
+
return abbreviation.length > 2 ? abbreviation.at(0).concat(abbreviation.at(-1)) : abbreviation;
|
|
62
|
+
});
|
|
63
|
+
|
|
64
|
+
const avatarLettersBackground = computed(() => {
|
|
65
|
+
// en.concat(uk)
|
|
66
|
+
const letterList = [
|
|
67
|
+
{ letters: 'AB'.concat('АБВ'), color: '--avatar-letters-p1-color' },
|
|
68
|
+
{ letters: 'CD'.concat('ГҐД'), color: '--avatar-letters-p2-color' },
|
|
69
|
+
{ letters: 'EF'.concat('ЕЄЖ'), color: '--avatar-letters-p3-color' },
|
|
70
|
+
{ letters: 'GH'.concat('ЗИІ'), color: '--avatar-letters-p4-color' },
|
|
71
|
+
{ letters: 'IJ'.concat('ЇЙК'), color: '--avatar-letters-p5-color' },
|
|
72
|
+
{ letters: 'KL'.concat('ЛМН'), color: '--avatar-letters-p6-color' },
|
|
73
|
+
{ letters: 'MN'.concat('ОПР'), color: '--avatar-letters-p7-color' },
|
|
74
|
+
{ letters: 'OP'.concat('СТУ'), color: '--avatar-letters-p8-color' },
|
|
75
|
+
{ letters: 'QR'.concat('ФХЦ'), color: '--avatar-letters-p9-color' },
|
|
76
|
+
{ letters: 'ST'.concat('ЧШЩ'), color: '--avatar-letters-p10-color' },
|
|
77
|
+
{ letters: 'UV'.concat('ЬЮЯ'), color: '--avatar-letters-p11-color' },
|
|
78
|
+
{ letters: 'WX'.concat(''), color: '--avatar-letters-p12-color' },
|
|
79
|
+
{ letters: 'YZ'.concat(''), color: '--avatar-letters-p13-color' },
|
|
80
|
+
];
|
|
81
|
+
const searchedLetter = letterList.find(({ letters }) => letters.includes(avatarLetters.value.at(0).toUpperCase()));
|
|
82
|
+
return (searchedLetter && searchedLetter.color) || '--avatar-letters-p1-color';
|
|
83
|
+
});
|
|
84
|
+
|
|
85
|
+
const imgSrc = computed(() => props.src || defaultAvatar);
|
|
86
|
+
|
|
87
|
+
const isDnd = computed(() => props.status === AbstractUserStatus.DND);
|
|
88
|
+
|
|
89
|
+
const badgeColorVar = computed(() => {
|
|
90
|
+
switch (props.status) {
|
|
91
|
+
case AbstractUserStatus.ACTIVE:
|
|
92
|
+
return 'online-color';
|
|
93
|
+
case AbstractUserStatus.DND:
|
|
94
|
+
return 'dnd-color';
|
|
95
|
+
case AbstractUserStatus.BUSY:
|
|
96
|
+
return 'busy-color';
|
|
97
|
+
case AbstractUserStatus.OFFLINE:
|
|
98
|
+
return 'offline-color';
|
|
99
|
+
default:
|
|
100
|
+
return 'offline-color';
|
|
101
|
+
}
|
|
102
|
+
});
|
|
103
|
+
</script>
|
|
104
|
+
|
|
105
|
+
<style lang="scss">
|
|
106
|
+
@import './variables.scss';
|
|
107
|
+
</style>
|
|
108
|
+
|
|
109
|
+
<style lang="scss" scoped>
|
|
110
|
+
|
|
111
|
+
%wt-avatar-typo-sm {
|
|
112
|
+
font-size: 12px;
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
%wt-avatar-typo-lg {
|
|
116
|
+
font-size: 20px;
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
%wt-avatar-typo-2xl {
|
|
120
|
+
font-size: 36px;
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
%wt-avatar-typo-3xl {
|
|
124
|
+
font-size: 48px;
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
.wt-avatar {
|
|
128
|
+
position: relative;
|
|
129
|
+
width: var(--avatar-size);
|
|
130
|
+
height: var(--avatar-size);
|
|
131
|
+
user-select: none;
|
|
132
|
+
border-radius: 50%;
|
|
133
|
+
|
|
134
|
+
&__letters {
|
|
135
|
+
height: 100%;
|
|
136
|
+
display: flex;
|
|
137
|
+
align-items: center;
|
|
138
|
+
justify-content: center;
|
|
139
|
+
color: var(--avatar-font-color);
|
|
140
|
+
border-radius: 50%;
|
|
141
|
+
}
|
|
142
|
+
|
|
143
|
+
&__img {
|
|
144
|
+
width: 100%;
|
|
145
|
+
height: 100%;
|
|
146
|
+
}
|
|
147
|
+
|
|
148
|
+
&--size-xs {
|
|
149
|
+
width: var(--avatar-size--size-xs);
|
|
150
|
+
height: var(--avatar-size--size-xs);
|
|
151
|
+
}
|
|
152
|
+
|
|
153
|
+
&--size-sm {
|
|
154
|
+
@extend %wt-avatar-typo-sm;
|
|
155
|
+
width: var(--avatar-size--size-sm);
|
|
156
|
+
height: var(--avatar-size--size-sm);
|
|
157
|
+
}
|
|
158
|
+
|
|
159
|
+
&--size-md {
|
|
160
|
+
width: var(--avatar-size--size-md);
|
|
161
|
+
height: var(--avatar-size--size-md);
|
|
162
|
+
}
|
|
163
|
+
|
|
164
|
+
&--size-lg {
|
|
165
|
+
@extend %wt-avatar-typo-lg;
|
|
166
|
+
width: var(--avatar-size--size-lg);
|
|
167
|
+
height: var(--avatar-size--size-lg);
|
|
168
|
+
}
|
|
169
|
+
|
|
170
|
+
&--size-xl {
|
|
171
|
+
width: var(--avatar-size--size-xl);
|
|
172
|
+
height: var(--avatar-size--size-xl);
|
|
173
|
+
}
|
|
174
|
+
|
|
175
|
+
&--size-2xl {
|
|
176
|
+
@extend %wt-avatar-typo-2xl;
|
|
177
|
+
width: var(--avatar-size--size-2xl);
|
|
178
|
+
height: var(--avatar-size--size-2xl);
|
|
179
|
+
}
|
|
180
|
+
|
|
181
|
+
&--size-3xl {
|
|
182
|
+
@extend %wt-avatar-typo-3xl;
|
|
183
|
+
width: var(--avatar-size--size-3xl);
|
|
184
|
+
height: var(--avatar-size--size-3xl);
|
|
185
|
+
}
|
|
186
|
+
}
|
|
187
|
+
</style>
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<aside
|
|
3
|
+
class="wt-badge"
|
|
4
|
+
:class="{ 'wt-badge--outside': outside }"
|
|
5
|
+
:style="{ background: iconBadge ? `url(${this.showIconBadge})` : `var(--${colorVariable})` }"
|
|
6
|
+
></aside>
|
|
7
|
+
</template>
|
|
8
|
+
|
|
9
|
+
<script>
|
|
10
|
+
import BadgeDnd from '../../assets/icons/badge-dnd.svg';
|
|
11
|
+
|
|
12
|
+
export default {
|
|
13
|
+
name: 'wt-badge',
|
|
14
|
+
props: {
|
|
15
|
+
colorVariable: {
|
|
16
|
+
type: String,
|
|
17
|
+
default: 'false-color',
|
|
18
|
+
description: 'see all available colors in webitel-ui docs',
|
|
19
|
+
},
|
|
20
|
+
outside: {
|
|
21
|
+
type: Boolean,
|
|
22
|
+
default: false,
|
|
23
|
+
},
|
|
24
|
+
iconBadge: {
|
|
25
|
+
type: String,
|
|
26
|
+
},
|
|
27
|
+
},
|
|
28
|
+
computed: {
|
|
29
|
+
showIconBadge() {
|
|
30
|
+
switch (this.iconBadge) {
|
|
31
|
+
case 'dnd':
|
|
32
|
+
return BadgeDnd;
|
|
33
|
+
default:
|
|
34
|
+
return null;
|
|
35
|
+
}
|
|
36
|
+
},
|
|
37
|
+
},
|
|
38
|
+
};
|
|
39
|
+
</script>
|
|
40
|
+
|
|
41
|
+
<style lang="scss">
|
|
42
|
+
@import './variables.scss';
|
|
43
|
+
</style>
|
|
44
|
+
|
|
45
|
+
<style lang="scss" scoped>
|
|
46
|
+
|
|
47
|
+
.wt-badge {
|
|
48
|
+
position: absolute;
|
|
49
|
+
top: 0;
|
|
50
|
+
right: 0;
|
|
51
|
+
width: var(--wt-badge-size);
|
|
52
|
+
height: var(--wt-badge-size);
|
|
53
|
+
border-radius: 50%;
|
|
54
|
+
|
|
55
|
+
&--outside {
|
|
56
|
+
transform: translate(100%, -100%);
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
</style>
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
### Different colors:
|
|
2
|
+
```vue
|
|
3
|
+
<div style="display: grid; grid-template-columns: 140px; gap: var(--spacing-xs);">
|
|
4
|
+
<wt-button>Primary</wt-button>
|
|
5
|
+
<wt-button color="secondary">Secondary</wt-button>
|
|
6
|
+
<wt-button disabled>Disabled</wt-button>
|
|
7
|
+
<wt-button color="success">Success</wt-button>
|
|
8
|
+
<wt-button color="error">Error</wt-button>
|
|
9
|
+
<wt-button color="transfer">Transfer</wt-button>
|
|
10
|
+
<wt-button color="job">Job</wt-button>
|
|
11
|
+
<wt-button color="info">info</wt-button>
|
|
12
|
+
</div>
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
### Small button:
|
|
16
|
+
```vue
|
|
17
|
+
<wt-button size="sm">Small button</wt-button>
|
|
18
|
+
```
|
|
19
|
+
|
|
20
|
+
### Wide button:
|
|
21
|
+
```vue
|
|
22
|
+
<wt-button wide>Wide button</wt-button>
|
|
23
|
+
```
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { shallowMount } from '@vue/test-utils';
|
|
2
|
+
import WtButton from '../wt-button.vue';
|
|
3
|
+
import WtLoader from '../../wt-loader/wt-loader.vue';
|
|
4
|
+
|
|
5
|
+
describe('WtButton', () => {
|
|
6
|
+
it('renders a component', () => {
|
|
7
|
+
const wrapper = shallowMount(WtButton);
|
|
8
|
+
expect(wrapper.classes('wt-button')).toBe(true);
|
|
9
|
+
});
|
|
10
|
+
|
|
11
|
+
it('renders a button content via default slot', () => {
|
|
12
|
+
const content = 'button content';
|
|
13
|
+
const wrapper = shallowMount(WtButton, {
|
|
14
|
+
slots: {
|
|
15
|
+
default: content,
|
|
16
|
+
},
|
|
17
|
+
});
|
|
18
|
+
expect(wrapper.find('.wt-button').text()).toBe(content);
|
|
19
|
+
});
|
|
20
|
+
|
|
21
|
+
it('renders button spinner', () => {
|
|
22
|
+
const wrapper = shallowMount(WtButton, {
|
|
23
|
+
props: {
|
|
24
|
+
loading: true,
|
|
25
|
+
},
|
|
26
|
+
});
|
|
27
|
+
expect(wrapper.findComponent(WtLoader).exists()).toBe(true);
|
|
28
|
+
});
|
|
29
|
+
});
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
:root {
|
|
2
|
+
--btn-min-width: 90px;
|
|
3
|
+
--btn-padding: var(--spacing-xs) var(--spacing-sm);
|
|
4
|
+
--btn-padding--size-sm: var(--spacing-2xs) var(--spacing-xs);
|
|
5
|
+
|
|
6
|
+
// COLORS
|
|
7
|
+
--btn-primary-color: var(--primary-color);
|
|
8
|
+
--btn-primary-hover-color: var(--primary-hover-color);
|
|
9
|
+
--btn-primary-text-color: var(--on-primary-color);
|
|
10
|
+
|
|
11
|
+
--btn-secondary-color: var(--dp-10-surface-color);
|
|
12
|
+
--btn-secondary-hover-color: var(--dp-14-surface-color);
|
|
13
|
+
--btn-secondary-text-color: var(--grey-darken-4);
|
|
14
|
+
|
|
15
|
+
--btn-success-color: var(--success-color);
|
|
16
|
+
--btn-success-hover-color: var(--success-hover-color);
|
|
17
|
+
--btn-success-text-color: var(--grey-lighten-5);
|
|
18
|
+
|
|
19
|
+
--btn-info-color: var(--info-color);
|
|
20
|
+
--btn-info-hover-color: var(--info-hover-color);
|
|
21
|
+
--btn-info-text-color: var(--grey-lighten-5);
|
|
22
|
+
|
|
23
|
+
--btn-job-color: var(--job-color);
|
|
24
|
+
--btn-job-hover-color: var(--job-hover-color);
|
|
25
|
+
--btn-job-text-color: var(--grey-lighten-5);
|
|
26
|
+
|
|
27
|
+
--btn-error-color: var(--error-color);
|
|
28
|
+
--btn-error-hover-color: var(--error-hover-color);
|
|
29
|
+
--btn-error-text-color: var(--grey-lighten-5);
|
|
30
|
+
|
|
31
|
+
--btn-transfer-color: var(--transfer-color);
|
|
32
|
+
--btn-transfer-hover-color: var(--transfer-hover-color);
|
|
33
|
+
--btn-transfer-text-color: var(--on-transfer-color);
|
|
34
|
+
|
|
35
|
+
--btn-disabled-color: var(--dp-16-surface-color);
|
|
36
|
+
--btn-disabled-text-color: var(--grey-darken-1);
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
:root.theme--dark {
|
|
40
|
+
--btn-secondary-text-color: var(--grey-lighten-4);
|
|
41
|
+
}
|
|
@@ -0,0 +1,205 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<button
|
|
3
|
+
class="wt-button"
|
|
4
|
+
:class="[
|
|
5
|
+
colorClass,
|
|
6
|
+
`wt-button--size-${size}`,
|
|
7
|
+
{
|
|
8
|
+
'wt-button--contains-icon': containsIcon,
|
|
9
|
+
'wt-button--wide': wide,
|
|
10
|
+
'wt-button--disabled': disabled,
|
|
11
|
+
'wt-button--loading': loading,
|
|
12
|
+
}
|
|
13
|
+
]"
|
|
14
|
+
type="button"
|
|
15
|
+
:disabled="disabled"
|
|
16
|
+
@click="$emit('click', $event)"
|
|
17
|
+
>
|
|
18
|
+
<wt-loader
|
|
19
|
+
v-if="loading"
|
|
20
|
+
size="sm"
|
|
21
|
+
:color="loaderColor"
|
|
22
|
+
></wt-loader>
|
|
23
|
+
<slot v-else>no content provided</slot>
|
|
24
|
+
</button>
|
|
25
|
+
</template>
|
|
26
|
+
|
|
27
|
+
<script>
|
|
28
|
+
export default {
|
|
29
|
+
name: 'wt-button',
|
|
30
|
+
props: {
|
|
31
|
+
/**
|
|
32
|
+
* @values 'primary', 'secondary', 'success', 'error', 'transfer', 'job', 'info'
|
|
33
|
+
* @example <wt-button color="success"></wt-button>
|
|
34
|
+
*/
|
|
35
|
+
color: {
|
|
36
|
+
type: String,
|
|
37
|
+
default: 'primary',
|
|
38
|
+
},
|
|
39
|
+
disabled: {
|
|
40
|
+
type: Boolean,
|
|
41
|
+
default: false,
|
|
42
|
+
},
|
|
43
|
+
loading: {
|
|
44
|
+
type: Boolean,
|
|
45
|
+
default: false,
|
|
46
|
+
},
|
|
47
|
+
/**
|
|
48
|
+
* @values 'sm', 'md'
|
|
49
|
+
* @example <wt-button size="sm"></wt-button>
|
|
50
|
+
*/
|
|
51
|
+
size: {
|
|
52
|
+
type: String,
|
|
53
|
+
default: 'md',
|
|
54
|
+
options: ['sm', 'md'],
|
|
55
|
+
},
|
|
56
|
+
/**
|
|
57
|
+
* Stretches button to all available width
|
|
58
|
+
*/
|
|
59
|
+
wide: {
|
|
60
|
+
type: Boolean,
|
|
61
|
+
default: false,
|
|
62
|
+
},
|
|
63
|
+
/**
|
|
64
|
+
* sets wt-button line-height to 0 to prevent height changing: [stack overflow](https://stackoverflow.com/a/11126701)
|
|
65
|
+
*/
|
|
66
|
+
containsIcon: {
|
|
67
|
+
type: Boolean,
|
|
68
|
+
default: false,
|
|
69
|
+
description: 'https://stackoverflow.com/a/11126701',
|
|
70
|
+
},
|
|
71
|
+
},
|
|
72
|
+
emits: ['click'],
|
|
73
|
+
computed: {
|
|
74
|
+
colorClass() {
|
|
75
|
+
if (!this.disabled) return `${this.color}`;
|
|
76
|
+
return '';
|
|
77
|
+
},
|
|
78
|
+
loaderColor() {
|
|
79
|
+
if (['success', 'transfer', 'error', 'job'].includes(this.color)) return 'main';
|
|
80
|
+
return 'contrast';
|
|
81
|
+
},
|
|
82
|
+
},
|
|
83
|
+
};
|
|
84
|
+
</script>
|
|
85
|
+
|
|
86
|
+
<style lang="scss">
|
|
87
|
+
@import './variables.scss';
|
|
88
|
+
</style>
|
|
89
|
+
|
|
90
|
+
<style lang="scss" scoped>
|
|
91
|
+
.wt-button {
|
|
92
|
+
@extend %typo-button;
|
|
93
|
+
box-sizing: border-box;
|
|
94
|
+
position: relative;
|
|
95
|
+
display: inline-block;
|
|
96
|
+
min-width: var(--btn-min-width);
|
|
97
|
+
padding: var(--btn-padding);
|
|
98
|
+
color: var(--btn-primary-text-color);
|
|
99
|
+
background-color: var(--btn-primary-color);
|
|
100
|
+
background-clip: padding-box;
|
|
101
|
+
border-radius: var(--border-radius);
|
|
102
|
+
transition: var(--transition);
|
|
103
|
+
cursor: pointer;
|
|
104
|
+
|
|
105
|
+
&--wide {
|
|
106
|
+
width: 100%;
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
// https://stackoverflow.com/a/11126701
|
|
110
|
+
&--contains-icon {
|
|
111
|
+
line-height: 0;
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
&--loading {
|
|
115
|
+
pointer-events: none;
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
&--size {
|
|
119
|
+
&-sm {
|
|
120
|
+
padding: var(--btn-padding--size-sm);
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
&-md {
|
|
124
|
+
padding: var(--btn-padding);
|
|
125
|
+
}
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
&:hover,
|
|
129
|
+
&:active {
|
|
130
|
+
background-color: var(--btn-primary-hover-color);
|
|
131
|
+
}
|
|
132
|
+
|
|
133
|
+
&.secondary {
|
|
134
|
+
color: var(--btn-secondary-text-color);
|
|
135
|
+
background-color: var(--btn-secondary-color);
|
|
136
|
+
|
|
137
|
+
&:hover,
|
|
138
|
+
&:active {
|
|
139
|
+
background-color: var(--btn-secondary-hover-color);
|
|
140
|
+
}
|
|
141
|
+
}
|
|
142
|
+
|
|
143
|
+
&.success {
|
|
144
|
+
color: var(--btn-success-text-color);
|
|
145
|
+
background-color: var(--btn-success-color);
|
|
146
|
+
|
|
147
|
+
&:hover,
|
|
148
|
+
&:active {
|
|
149
|
+
background-color: var(--btn-success-hover-color);
|
|
150
|
+
}
|
|
151
|
+
}
|
|
152
|
+
|
|
153
|
+
&.info {
|
|
154
|
+
color: var(--btn-info-text-color);
|
|
155
|
+
background-color: var(--btn-info-color);
|
|
156
|
+
|
|
157
|
+
&:hover,
|
|
158
|
+
&:active {
|
|
159
|
+
background-color: var(--btn-info-hover-color);
|
|
160
|
+
}
|
|
161
|
+
}
|
|
162
|
+
|
|
163
|
+
&.job {
|
|
164
|
+
color: var(--btn-job-text-color);
|
|
165
|
+
background-color: var(--btn-job-color);
|
|
166
|
+
|
|
167
|
+
&:hover,
|
|
168
|
+
&:active {
|
|
169
|
+
background-color: var(--btn-job-hover-color);
|
|
170
|
+
}
|
|
171
|
+
}
|
|
172
|
+
|
|
173
|
+
&.transfer {
|
|
174
|
+
color: var(--btn-transfer-text-color);
|
|
175
|
+
background-color: var(--btn-transfer-color);
|
|
176
|
+
|
|
177
|
+
&:hover,
|
|
178
|
+
&:active {
|
|
179
|
+
background-color: var(--btn-transfer-hover-color);
|
|
180
|
+
}
|
|
181
|
+
}
|
|
182
|
+
|
|
183
|
+
&.error {
|
|
184
|
+
color: var(--btn-error-text-color);
|
|
185
|
+
background-color: var(--btn-error-color);
|
|
186
|
+
|
|
187
|
+
&:hover,
|
|
188
|
+
&:active {
|
|
189
|
+
background-color: var(--btn-error-hover-color);
|
|
190
|
+
}
|
|
191
|
+
}
|
|
192
|
+
|
|
193
|
+
&.wt-button--disabled {
|
|
194
|
+
color: var(--btn-disabled-text-color);
|
|
195
|
+
background-color: var(--btn-disabled-color);
|
|
196
|
+
cursor: auto;
|
|
197
|
+
pointer-events: none;
|
|
198
|
+
box-shadow: none;
|
|
199
|
+
}
|
|
200
|
+
|
|
201
|
+
.wt-loader {
|
|
202
|
+
margin: auto;
|
|
203
|
+
}
|
|
204
|
+
}
|
|
205
|
+
</style>
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
### Note: all buttons props are passed as "$attrs"
|
|
2
|
+
|
|
3
|
+
Different colors
|
|
4
|
+
|
|
5
|
+
```vue
|
|
6
|
+
const options = [{ text: 'lorem ipsum' }, { text: 'dolor sit amet' }, { text: 'consectetur adipiscing elit' }];
|
|
7
|
+
|
|
8
|
+
<div style="display: flex; gap: var(--spacing-xs);">
|
|
9
|
+
<wt-button-select :options="this.options">Primary</wt-button-select>
|
|
10
|
+
<wt-button-select color="secondary" :options="this.options">Secondary</wt-button-select>
|
|
11
|
+
<wt-button-select disabled :options="this.options">Disabled</wt-button-select>
|
|
12
|
+
</div>
|
|
13
|
+
```
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import { shallowMount, mount } from '@vue/test-utils';
|
|
2
|
+
import WtSelectButton from '../wt-button-select.vue';
|
|
3
|
+
|
|
4
|
+
// helps to mock @floating-ui/vue autoUpdate method
|
|
5
|
+
global.ResizeObserver = jest.fn().mockImplementation(() => ({
|
|
6
|
+
observe: jest.fn(),
|
|
7
|
+
unobserve: jest.fn(),
|
|
8
|
+
disconnect: jest.fn(),
|
|
9
|
+
}));
|
|
10
|
+
|
|
11
|
+
describe('WtSelectButton', () => {
|
|
12
|
+
it('renders a component', () => {
|
|
13
|
+
const wrapper = shallowMount(WtSelectButton);
|
|
14
|
+
expect(wrapper.classes('wt-button-select')).toBe(true);
|
|
15
|
+
});
|
|
16
|
+
|
|
17
|
+
it('renders a button content via default slot', () => {
|
|
18
|
+
const content = 'button content';
|
|
19
|
+
const wrapper = mount(WtSelectButton, {
|
|
20
|
+
slots: {
|
|
21
|
+
default: content,
|
|
22
|
+
},
|
|
23
|
+
});
|
|
24
|
+
expect(wrapper.find('.wt-button-select__button').text()).toBe(content);
|
|
25
|
+
});
|
|
26
|
+
|
|
27
|
+
it('should rotate the arrow', async () => {
|
|
28
|
+
const wrapper = mount(WtSelectButton, {
|
|
29
|
+
props: {
|
|
30
|
+
options: [],
|
|
31
|
+
},
|
|
32
|
+
});
|
|
33
|
+
const arrowBtn = wrapper.findAllComponents({ name: 'wt-button' })
|
|
34
|
+
.find((component) => component.classes().includes('wt-button-select__select-btn'));
|
|
35
|
+
arrowBtn.vm.$emit('click');
|
|
36
|
+
await wrapper.vm.$nextTick();
|
|
37
|
+
const wtIcon = wrapper.find('.wt-button-select__select-arrow');
|
|
38
|
+
expect(wtIcon.classes()).toContain('wt-button-select__select-arrow--active');
|
|
39
|
+
});
|
|
40
|
+
});
|