@webitel/ui-sdk 0.1.2 → 0.1.3-vue3
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-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/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/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/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/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/rounded-info.svg +3 -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/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 +18534 -0
- package/dist/ui-sdk.common.js.map +1 -0
- package/dist/ui-sdk.css +1 -0
- package/dist/ui-sdk.umd.js +18553 -0
- package/dist/ui-sdk.umd.js.map +1 -0
- package/dist/ui-sdk.umd.min.js +12 -0
- package/dist/ui-sdk.umd.min.js.map +1 -0
- package/package.json +79 -44
- package/src/components/atoms/wt-avatar/__tests__/wt-avatar.spec.js +9 -0
- package/src/components/atoms/wt-avatar/wt-avatar.vue +102 -0
- package/src/components/atoms/wt-badge/__tests__/wt-badge.spec.js +9 -0
- package/src/components/atoms/wt-badge/wt-badge.vue +44 -7
- package/src/components/atoms/wt-button/__tests__/WtButton.spec.js +29 -0
- package/src/components/atoms/wt-button/wt-button.vue +226 -140
- package/src/components/atoms/wt-chip/__tests__/WtChip.spec.js +19 -0
- package/src/components/atoms/wt-chip/wt-chip.vue +23 -0
- package/src/components/atoms/wt-context-menu/__tests__/WtContextMenu.spec.js +9 -0
- package/src/components/atoms/wt-context-menu/wt-context-menu.vue +105 -0
- package/src/components/atoms/wt-divider/__tests__/WtDivider.spec.js +9 -0
- package/src/components/atoms/wt-divider/wt-divider.vue +2 -1
- package/src/components/atoms/wt-icon/__tests__/WtIcon.spec.js +24 -0
- package/src/components/atoms/wt-icon/wt-icon.vue +133 -482
- package/src/components/atoms/wt-indicator/__tests__/WtIndicator.spec.js +29 -0
- package/src/components/atoms/wt-indicator/wt-indicator.vue +119 -0
- package/src/components/atoms/wt-input-info/__tests__/WtInputInfo.spec.js +9 -0
- package/src/components/atoms/wt-input-info/wt-input-info.vue +2 -1
- package/src/components/atoms/wt-loader/__tests__/WtLoader.spec.js +9 -0
- package/src/components/atoms/wt-loader/_internals/wt-loader--md.vue +83 -0
- package/src/components/atoms/wt-loader/_internals/wt-loader--sm.vue +73 -0
- package/src/components/atoms/wt-loader/wt-loader.vue +21 -73
- package/src/components/atoms/wt-rounded-action/__tests__/WtRoundedAction.spec.js +9 -0
- package/src/components/atoms/wt-rounded-action/wt-rounded-action.vue +156 -0
- package/src/components/atoms/wt-tooltip/__tests__/WtTooltip.spec.js +30 -0
- package/src/components/atoms/wt-tooltip/wt-tooltip.vue +35 -41
- package/src/components/index.js +57 -7
- package/src/components/molecules/wt-button-select/__tests__/WtButtonSelect.spec.js +29 -0
- package/src/components/molecules/wt-button-select/wt-button-select.vue +184 -0
- package/src/components/molecules/wt-checkbox/__tests__/WtCheckbox.spec.js +41 -0
- package/src/components/molecules/wt-checkbox/wt-checkbox.vue +24 -12
- package/src/components/molecules/wt-copy-action/__tests__/WtCopyAction.spec.js +14 -0
- package/src/components/molecules/wt-copy-action/wt-copy-action.vue +63 -0
- package/src/components/molecules/wt-datepicker/__tests__/WtDatepicker.spec.js +28 -0
- package/src/components/molecules/wt-datepicker/wt-datepicker.vue +156 -153
- package/src/components/molecules/wt-datetimepicker/__tests__/WtDatetimepicker.spec.js +79 -0
- package/src/components/molecules/wt-datetimepicker/wt-datetimepicker.vue +79 -85
- package/src/components/molecules/wt-hint/__tests__/WtHint.spec.js +9 -0
- package/src/components/molecules/wt-hint/wt-hint.vue +21 -0
- package/src/components/molecules/wt-icon-btn/__tests__/WtIconBtn.spec.js +15 -0
- package/src/components/molecules/wt-icon-btn/wt-icon-btn.vue +59 -53
- package/src/components/molecules/wt-input/__tests__/WtInput.spec.js +25 -0
- package/src/components/molecules/wt-input/wt-input.vue +248 -225
- package/src/components/molecules/wt-label/__tests__/WtLabel.spec.js +9 -0
- package/src/components/molecules/wt-label/mixins/labelUsageMixin.js +21 -0
- package/src/components/molecules/wt-label/wt-label.vue +72 -0
- package/src/components/molecules/wt-load-bar/__tests__/WtLoadBar.spec.js +9 -0
- package/src/components/molecules/wt-load-bar/wt-load-bar.vue +50 -0
- package/src/components/molecules/wt-notification/__tests__/WtNotification.spec.js +21 -0
- package/src/components/molecules/wt-notification/wt-notification.vue +12 -11
- package/src/components/molecules/wt-popup/__tests__/WtPopup.spec.js +47 -0
- package/src/components/molecules/wt-popup/wt-popup.vue +104 -60
- package/src/components/molecules/wt-progress-bar/__tests__/WtProgressBar.spec.js +17 -0
- package/src/components/molecules/wt-progress-bar/wt-progress-bar.vue +79 -0
- package/src/components/molecules/wt-radio/__tests__/WtRadio.spec.js +42 -0
- package/src/components/molecules/wt-radio/wt-radio.vue +9 -7
- package/src/components/molecules/wt-search-bar/__tests__/WtSearchBar.spec.js +35 -0
- package/src/components/molecules/wt-search-bar/wt-search-bar.vue +91 -83
- package/src/components/molecules/wt-select/__tests__/WtSelect.spec.js +27 -0
- package/src/components/molecules/wt-select/mixins/__tests__/multiselectMixin.spec.js +32 -0
- package/src/components/molecules/wt-select/mixins/multiselectMixin.js +146 -0
- package/src/components/molecules/wt-select/wt-select.vue +211 -331
- package/src/components/molecules/wt-slider/__tests__/WtSlider.spec.js +9 -0
- package/src/components/molecules/wt-slider/wt-slider.vue +174 -0
- package/src/components/molecules/wt-switcher/__tests__/WtSwitcher.spec.js +31 -0
- package/src/components/molecules/wt-switcher/wt-switcher.vue +47 -22
- package/src/components/molecules/wt-tabs/__tests__/WtTabs.spec.js +36 -0
- package/src/components/molecules/wt-tabs/wt-tabs.vue +74 -82
- package/src/components/molecules/wt-tags-input/__tests__/WtTagsInput.spec.js +42 -0
- package/src/components/molecules/wt-tags-input/wt-tags-input.vue +215 -0
- package/src/components/molecules/wt-textarea/__tests__/WtTextarea.spec.js +46 -0
- package/src/components/molecules/wt-textarea/wt-textarea.vue +114 -40
- package/src/components/molecules/wt-time-input/__tests__/WtTimeInput.spec.js +25 -0
- package/src/components/molecules/wt-time-input/wt-time-input.vue +55 -6
- package/src/components/molecules/wt-timepicker/__tests__/WtTimepicker.spec.js +60 -0
- package/src/components/molecules/wt-timepicker/wt-timepicker.vue +148 -85
- package/src/components/organisms/wt-app-header/__tests__/WtAppHeader.spec.js +19 -0
- package/src/components/organisms/wt-app-header/__tests__/WtAppNavigator.spec.js +23 -0
- package/src/components/organisms/wt-app-header/__tests__/WtHeaderActions.spec.js +21 -0
- package/src/components/organisms/wt-app-header/wt-app-header.vue +24 -0
- package/src/components/organisms/wt-app-header/wt-app-navigator.vue +249 -0
- package/src/components/organisms/wt-app-header/wt-header-actions.vue +183 -0
- package/src/components/organisms/wt-error-page/__tests__/wt-error-page.spec.js +17 -0
- package/src/components/organisms/wt-error-page/wt-error-page.vue +104 -0
- package/src/components/organisms/wt-filters-panel-wrapper/__tests__/wt-filters-panel-wrapper.spec.js +24 -0
- package/src/components/organisms/wt-filters-panel-wrapper/wt-filters-panel-wrapper.vue +146 -0
- package/src/components/organisms/wt-headline/__tests__/WtHeadline.spec.js +47 -0
- package/src/components/organisms/wt-headline/wt-headline.vue +45 -0
- package/src/components/organisms/wt-headline-nav/__tests__/wt-headline-nav.spec.js +13 -0
- package/src/components/organisms/wt-headline-nav/wt-headline-nav.vue +85 -0
- package/src/components/organisms/wt-navigation-bar/__tests__/WtNavigationBar.spec.js +64 -0
- package/src/components/organisms/wt-navigation-bar/wt-navigation-bar.vue +271 -0
- package/src/components/organisms/wt-notifications-bar/__tests__/WtNotificationsBar.spec.js +50 -0
- package/src/components/organisms/wt-notifications-bar/wt-notifications-bar.vue +71 -0
- package/src/components/organisms/wt-page-wrapper/__tests__/WtPageWrapper.spec.js +33 -0
- package/src/components/organisms/wt-page-wrapper/wt-page-wrapper.vue +52 -0
- package/src/components/organisms/wt-pagination/__tests__/WtPagination.spec.js +37 -0
- package/src/components/organisms/wt-pagination/wt-pagination.vue +108 -88
- package/src/components/organisms/wt-player/__tests__/WtPlayer.spec.js +9 -0
- package/src/components/organisms/wt-player/wt-player.vue +203 -0
- package/src/components/organisms/wt-status-select/__tests__/WtStatusSelect.spec.js +25 -0
- package/src/components/organisms/wt-status-select/_internals/StatusOptions.lookup.js +24 -0
- package/src/components/organisms/wt-status-select/wt-status-select.vue +130 -0
- package/src/components/organisms/wt-table/__tests__/WtTable.spec.js +134 -0
- package/src/components/organisms/wt-table/__tests__/WtTableDeleteAction.spec.js +9 -0
- package/src/components/organisms/wt-table/__tests__/WtTableEditAction.spec.js +9 -0
- package/src/components/organisms/wt-table/_internals/getSortOrder.js +12 -0
- package/src/components/organisms/wt-table/table-cells/wt-table-delete-action.vue +21 -0
- package/src/components/organisms/wt-table/table-cells/wt-table-edit-action.vue +22 -0
- package/src/components/organisms/wt-table/wt-table.vue +252 -0
- package/src/components/organisms/wt-table-actions/__tests__/WtTableActions.spec.js +9 -0
- package/src/components/organisms/wt-table-actions/wt-table-actions.vue +105 -0
- package/src/components/organisms/wt-table-column-select/__tests__/WtTableColumnSelect.spec.js +31 -0
- package/src/components/organisms/wt-table-column-select/wt-table-column-select.vue +120 -0
- package/src/components/transitions/__tests__/ExpandTransition.spec.js +9 -0
- package/src/components/transitions/wt-expand-transition.vue +70 -0
- package/src/css/components/_components.scss +45 -25
- package/src/css/components/atoms/wt-avatar/_variables.scss +14 -0
- package/src/css/components/atoms/wt-badge/_variables.scss +3 -6
- package/src/css/components/atoms/wt-button/_variables.scss +47 -47
- package/src/css/components/atoms/wt-chip/_variables.scss +7 -0
- package/src/css/components/atoms/wt-chip/wt-chip.scss +41 -0
- package/src/css/components/atoms/wt-context-menu/_variables.scss +7 -0
- package/src/css/components/atoms/wt-divider/_variables.scss +4 -4
- package/src/css/components/atoms/wt-icon/_variables.scss +7 -28
- package/src/css/components/atoms/wt-indicator/_variables.scss +22 -0
- package/src/css/components/atoms/wt-input-info/_variables.scss +6 -5
- package/src/css/components/atoms/wt-label/_variables.scss +3 -4
- package/src/css/components/atoms/wt-loader/_variables.scss +7 -7
- package/src/css/components/atoms/wt-rounded-action/_variables.scss +7 -0
- package/src/css/components/atoms/wt-tooltip/_variables.scss +29 -10
- package/src/css/components/molecules/wt-button-select/_variables.scss +18 -0
- package/src/css/components/molecules/wt-checkbox/_variables.scss +3 -3
- package/src/css/components/molecules/wt-datepicker/_variables.scss +21 -20
- package/src/css/components/molecules/wt-datepicker/datepicker-calendar.scss +90 -100
- package/src/css/components/molecules/wt-datetimepicker/_variables.scss +11 -12
- package/src/css/components/molecules/wt-icon-btn/_variables.scss +2 -2
- package/src/css/components/molecules/wt-input/_variables.scss +7 -5
- package/src/css/components/molecules/wt-load-bar/_variables.scss +6 -0
- package/src/css/components/molecules/wt-notification/_variables.scss +9 -9
- package/src/css/components/molecules/wt-popup/_variables.scss +20 -11
- package/src/css/components/molecules/wt-progress-bar/_variables.scss +11 -0
- package/src/css/components/molecules/wt-radio/_variables.scss +6 -6
- package/src/css/components/molecules/wt-search-bar/_variables.scss +7 -3
- package/src/css/components/molecules/wt-select/_multiselect.scss +198 -0
- package/src/css/components/molecules/wt-select/_variables.scss +14 -23
- package/src/css/components/molecules/wt-slider/_variables.scss +15 -0
- package/src/css/components/molecules/wt-switcher/_variables.scss +17 -14
- package/src/css/components/molecules/wt-tabs/_variables.scss +14 -14
- package/src/css/components/molecules/wt-tags-input/_variables.scss +24 -0
- package/src/css/components/molecules/wt-textarea/_variables.scss +5 -5
- package/src/css/components/molecules/wt-timepicker/_variables.scss +4 -3
- package/src/css/components/organisms/wt-app-header/_variables.scss +24 -0
- package/src/css/components/organisms/wt-headline/_variables.scss +6 -0
- package/src/css/components/organisms/wt-headline-nav/_variables.scss +5 -0
- package/src/css/components/organisms/wt-navigation-bar/_variables.scss +16 -0
- package/src/css/components/organisms/wt-notifications-bar/_variables.scss +7 -0
- package/src/css/components/organisms/wt-page-wrapper/_variables.scss +5 -0
- package/src/css/components/organisms/wt-pagination/_variables.scss +4 -6
- package/src/css/components/organisms/wt-player/_variables.scss +8 -0
- package/src/css/components/organisms/wt-status-select/_variables.scss +6 -0
- package/src/css/components/organisms/wt-table/_variables.scss +16 -0
- package/src/css/components/organisms/wt-table-actions/_variables.scss +5 -0
- package/src/css/main.scss +75 -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 +150 -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/enums/AbstractUserStatus/AbstractUserStatus.enum.js +8 -0
- package/src/enums/AgentStatus/AgentStatus.enum.js +6 -0
- package/src/enums/WebitelApplications/AdminSections.enum.js +46 -0
- package/src/enums/WebitelApplications/SupervisorSections.enum.js +7 -0
- package/src/enums/WebitelApplications/WebitelApplications.enum.js +10 -0
- package/src/locale/en/en.js +250 -0
- package/src/locale/i18n.js +5 -5
- package/src/locale/ru/ru.js +248 -2
- package/src/locale/ua/ua.js +273 -0
- package/src/mixins/dataFilterMixins/__tests__/apiFilterMixin.spec.js +57 -0
- package/src/mixins/dataFilterMixins/__tests__/enumFilterMixin.spec.js +66 -0
- package/src/mixins/dataFilterMixins/__tests__/paginationFilterMixin.spec.js +93 -0
- package/src/mixins/dataFilterMixins/__tests__/sortFilterMixin.spec.js +60 -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/validationMixin.js +21 -10
- 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/FilesExport/FilesExport.js +110 -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/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 +54 -0
- package/src/modules/QueryFilters/components/__tests__/abstract-enum-filter.spec.js +40 -0
- package/src/modules/QueryFilters/components/__tests__/filter-datetime.spec.js +49 -0
- package/src/modules/QueryFilters/components/__tests__/filter-from-to.spec.js +65 -0
- package/src/modules/QueryFilters/components/__tests__/filter-search.spec.js +49 -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 +39 -0
- package/src/modules/QueryFilters/components/filter-from-to.vue +136 -0
- package/src/modules/QueryFilters/components/filter-search.vue +33 -0
- package/src/modules/QueryFilters/mixins/__tests__/apiFilterMixin.spec.js +48 -0
- package/src/modules/QueryFilters/mixins/__tests__/enumFilterMixin.spec.js +70 -0
- package/src/modules/QueryFilters/mixins/__tests__/paginationFilterMixin.spec.js +86 -0
- package/src/modules/QueryFilters/mixins/__tests__/sortFilterMixin.spec.js +58 -0
- package/src/modules/QueryFilters/mixins/__tests__/urlControllerMixin.spec.js +48 -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 +48 -0
- package/src/modules/QueryFilters/store/__tests__/QueryFiltersStoreModule.spec.js +89 -0
- package/src/modules/QueryFilters/store/queryFilters.js +6 -0
- package/src/modules/Userinfo/api/BaseAPIService.js +7 -0
- package/src/modules/Userinfo/api/auth.js +29 -0
- package/src/modules/Userinfo/api/userinfo.js +32 -0
- package/src/modules/Userinfo/classes/ApplicationsAccess.js +190 -0
- package/src/modules/Userinfo/components/__tests__/auth.spec.js +56 -0
- package/src/modules/Userinfo/components/the-auth.vue +76 -0
- package/src/modules/Userinfo/store/UserinfoStoreModule.js +113 -0
- package/src/plugins/breakpoint/breakpoint.plugin.js +136 -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/caseConverters.js +89 -0
- package/src/scripts/convertDuration.js +15 -0
- package/src/scripts/editProxy.js +9 -0
- package/src/scripts/eventBus.js +4 -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/store/BaseStoreModules/BaseStoreModule.js +49 -0
- package/src/store/BaseStoreModules/__tests__/BaseStoreModule.spec.js +104 -0
- package/src/store/helpers/__tests__/getNamespacedState.spec.js +11 -0
- package/src/store/helpers/getNamespacedState.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-label/wt-label.vue +0 -58
- package/src/css/colors/_colors.scss +0 -67
- package/src/css/components/atoms/wt-badge/wt-badge.scss +0 -8
- 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/directives/clickaway/clickaway.js +0 -52
- package/src/directives/index.js +0 -12
- 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,174 @@
|
|
|
1
|
+
<!-- We were trying to draw our own slider using <div> tags, but realizing all the limitations decided to use
|
|
2
|
+
the native input of type 'range', styling it as per Webitel needs for every of the most popular web browsers.
|
|
3
|
+
|
|
4
|
+
The biggest issue to solve was the vertical input. At the moment browsers do not support vertical input range having
|
|
5
|
+
custom styling, so we are using css rotation.
|
|
6
|
+
Dealing with rotation we realized rotated element is very hard to position correctly with no fixed height of the parent element.
|
|
7
|
+
Considering the fact parent height is always relative to it's childs height, we are manipulating the child width/height on rotation.
|
|
8
|
+
To achieve correct slider height we:
|
|
9
|
+
1. Rotate slider by 90deg, so the width of slider becomes 'heigth' of the parent.
|
|
10
|
+
2. Set the new slider width (which is now positioned from bottom to top) using fixed number of pixels, received with props.
|
|
11
|
+
3. Set the container element height to 100% so it is always calculated correctly depending on it`s child dimensions.
|
|
12
|
+
|
|
13
|
+
Until there are no possibility to style input range and position it vertically, we are rotating our slider with css
|
|
14
|
+
and swapping height/width of this component in order to have the correct output.
|
|
15
|
+
-->
|
|
16
|
+
|
|
17
|
+
<template>
|
|
18
|
+
<div
|
|
19
|
+
:class="{
|
|
20
|
+
'wt-slider--disabled': disabled,
|
|
21
|
+
'wt-slider--vertical': vertical,
|
|
22
|
+
}"
|
|
23
|
+
:style="{ height: verticalHeight }"
|
|
24
|
+
class="wt-slider"
|
|
25
|
+
>
|
|
26
|
+
<div
|
|
27
|
+
:style="{ width: verticalHeight }"
|
|
28
|
+
class="wt-slider__wrapper"
|
|
29
|
+
>
|
|
30
|
+
<!-- The row above is needed in order to set correct component width when slider is vertical -->
|
|
31
|
+
<input
|
|
32
|
+
:disabled="disabled"
|
|
33
|
+
:max="max"
|
|
34
|
+
:min="min"
|
|
35
|
+
:step="step"
|
|
36
|
+
:style="{ background: progressStyle }"
|
|
37
|
+
:value="value"
|
|
38
|
+
class="wt-slider__slider"
|
|
39
|
+
type="range"
|
|
40
|
+
@input="inputHandler"
|
|
41
|
+
/>
|
|
42
|
+
</div>
|
|
43
|
+
</div>
|
|
44
|
+
</template>
|
|
45
|
+
|
|
46
|
+
<script>
|
|
47
|
+
export default {
|
|
48
|
+
name: 'wt-slider',
|
|
49
|
+
props: {
|
|
50
|
+
value: {
|
|
51
|
+
type: Number,
|
|
52
|
+
default: 0,
|
|
53
|
+
},
|
|
54
|
+
disabled: {
|
|
55
|
+
type: Boolean,
|
|
56
|
+
default: false,
|
|
57
|
+
},
|
|
58
|
+
vertical: {
|
|
59
|
+
type: Boolean,
|
|
60
|
+
default: false,
|
|
61
|
+
},
|
|
62
|
+
min: {
|
|
63
|
+
type: Number,
|
|
64
|
+
default: 0,
|
|
65
|
+
},
|
|
66
|
+
max: {
|
|
67
|
+
type: Number,
|
|
68
|
+
default: 100,
|
|
69
|
+
},
|
|
70
|
+
step: {
|
|
71
|
+
type: Number,
|
|
72
|
+
default: 1,
|
|
73
|
+
},
|
|
74
|
+
// Height of vertical slider (px):
|
|
75
|
+
height: {
|
|
76
|
+
type: Number,
|
|
77
|
+
default: 100,
|
|
78
|
+
},
|
|
79
|
+
},
|
|
80
|
+
computed: {
|
|
81
|
+
progressStyle() { // To achieve the correct color styling:
|
|
82
|
+
const progressPercent = ((this.value - this.min) / (this.max - this.min)) * 100;
|
|
83
|
+
return `linear-gradient(to right, var(--accent-color) ${progressPercent}%, var(--secondary-color) 0%)`;
|
|
84
|
+
},
|
|
85
|
+
verticalHeight() { // in order to have correct parent height after slider rotation
|
|
86
|
+
return this.vertical ? `${this.height}px` : '100%';
|
|
87
|
+
},
|
|
88
|
+
},
|
|
89
|
+
methods: {
|
|
90
|
+
inputHandler(event) {
|
|
91
|
+
this.$emit('input', +event.target.value);
|
|
92
|
+
},
|
|
93
|
+
},
|
|
94
|
+
};
|
|
95
|
+
</script>
|
|
96
|
+
|
|
97
|
+
<style lang="scss" scoped>
|
|
98
|
+
.wt-slider__wrapper {
|
|
99
|
+
display: flex;
|
|
100
|
+
align-items: center;
|
|
101
|
+
width: var(--wt-slider-width);
|
|
102
|
+
height: var(--wt-slider-height);
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
.wt-slider__slider {
|
|
106
|
+
box-sizing: border-box;
|
|
107
|
+
width: var(--wt-slider-width);
|
|
108
|
+
height: var(--wt-slider-input-height);
|
|
109
|
+
margin: 0;
|
|
110
|
+
cursor: pointer;
|
|
111
|
+
border: var(--wt-slider-border);
|
|
112
|
+
border-radius: var(--border-radius);
|
|
113
|
+
-webkit-appearance: none;
|
|
114
|
+
-moz-appearance: none;
|
|
115
|
+
|
|
116
|
+
&::-webkit-slider-thumb {
|
|
117
|
+
width: var(--wt-slider-pointer-size);
|
|
118
|
+
height: var(--wt-slider-pointer-size);
|
|
119
|
+
border: var(--wt-slider-border);
|
|
120
|
+
border-radius: var(--wt-slider-pointer-radius);
|
|
121
|
+
background: var(--main-color);
|
|
122
|
+
-webkit-appearance: none;
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
&::-webkit-slider-runnable-track {
|
|
126
|
+
-webkit-appearance: none;
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
&::-moz-range-thumb {
|
|
130
|
+
width: var(--wt-slider-pointer-size);
|
|
131
|
+
height: var(--wt-slider-pointer-size);
|
|
132
|
+
border: var(--wt-slider-border);
|
|
133
|
+
border-radius: var(--wt-slider-pointer-radius);
|
|
134
|
+
background: var(--main-color);
|
|
135
|
+
-moz-appearance: none;
|
|
136
|
+
}
|
|
137
|
+
|
|
138
|
+
&::-moz-range-track {
|
|
139
|
+
-moz-appearance: none;
|
|
140
|
+
}
|
|
141
|
+
|
|
142
|
+
&::-ms-thumb {
|
|
143
|
+
appearance: none;
|
|
144
|
+
}
|
|
145
|
+
|
|
146
|
+
&::-ms-track {
|
|
147
|
+
appearance: none;
|
|
148
|
+
}
|
|
149
|
+
}
|
|
150
|
+
|
|
151
|
+
.wt-slider--disabled {
|
|
152
|
+
.wt-slider__slider {
|
|
153
|
+
pointer-events: none;
|
|
154
|
+
|
|
155
|
+
&::-webkit-slider-thumb {
|
|
156
|
+
display: none;
|
|
157
|
+
}
|
|
158
|
+
|
|
159
|
+
&::-moz-range-thumb {
|
|
160
|
+
display: none;
|
|
161
|
+
}
|
|
162
|
+
}
|
|
163
|
+
}
|
|
164
|
+
|
|
165
|
+
.wt-slider--vertical {
|
|
166
|
+
width: var(--wt-slider-height);
|
|
167
|
+
transform: var(--wt-slider-vertical-container-translation);
|
|
168
|
+
|
|
169
|
+
.wt-slider__wrapper {
|
|
170
|
+
transform: var(--wt-slider-vertical-transform);
|
|
171
|
+
transform-origin: var(--wt-slider-vertical-transform-origin);
|
|
172
|
+
}
|
|
173
|
+
}
|
|
174
|
+
</style>
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { shallowMount } from '@vue/test-utils';
|
|
2
|
+
import WtSwitcher from '../wt-switcher.vue';
|
|
3
|
+
import WtLabel from '../../wt-label/wt-label.vue';
|
|
4
|
+
|
|
5
|
+
describe('WtSwitcher', () => {
|
|
6
|
+
it('renders a component', () => {
|
|
7
|
+
const wrapper = shallowMount(WtSwitcher, {
|
|
8
|
+
stubs: { WtLabel },
|
|
9
|
+
});
|
|
10
|
+
expect(wrapper.classes('wt-switcher')).toBe(true);
|
|
11
|
+
});
|
|
12
|
+
|
|
13
|
+
it('renders label text when passed', () => {
|
|
14
|
+
const label = 'Hello there';
|
|
15
|
+
const wrapper = shallowMount(WtSwitcher, {
|
|
16
|
+
stubs: { WtLabel },
|
|
17
|
+
propsData: { label },
|
|
18
|
+
});
|
|
19
|
+
expect(wrapper.find('.wt-switcher__label').text()).toBe(label);
|
|
20
|
+
});
|
|
21
|
+
|
|
22
|
+
it('toggles passed value at click', () => {
|
|
23
|
+
const value = true;
|
|
24
|
+
const wrapper = shallowMount(WtSwitcher, {
|
|
25
|
+
stubs: { WtLabel },
|
|
26
|
+
propsData: { value },
|
|
27
|
+
});
|
|
28
|
+
wrapper.find('.wt-switcher__input').trigger('change');
|
|
29
|
+
expect(wrapper.emitted().change[0]).toEqual([!value]);
|
|
30
|
+
});
|
|
31
|
+
});
|
|
@@ -2,13 +2,15 @@
|
|
|
2
2
|
<div
|
|
3
3
|
class="wt-switcher"
|
|
4
4
|
:class="{
|
|
5
|
-
'wt-switcher--
|
|
5
|
+
'wt-switcher--off': !value,
|
|
6
|
+
'wt-switcher--on': value,
|
|
6
7
|
'wt-switcher--disabled': disabled,
|
|
7
8
|
}"
|
|
8
9
|
>
|
|
9
10
|
<wt-label
|
|
10
11
|
class="wt-switcher__wrapper"
|
|
11
12
|
:class="{'wt-switcher__wrapper--label-left': labelLeft}"
|
|
13
|
+
v-bind="labelProps"
|
|
12
14
|
>
|
|
13
15
|
<input
|
|
14
16
|
class="wt-switcher__input"
|
|
@@ -46,6 +48,10 @@
|
|
|
46
48
|
type: Boolean,
|
|
47
49
|
default: false,
|
|
48
50
|
},
|
|
51
|
+
labelProps: {
|
|
52
|
+
type: Object,
|
|
53
|
+
description: 'Object with props, passed down to wt-label as props',
|
|
54
|
+
},
|
|
49
55
|
},
|
|
50
56
|
model: {
|
|
51
57
|
prop: 'value',
|
|
@@ -64,6 +70,10 @@
|
|
|
64
70
|
@include width-fit-content;
|
|
65
71
|
position: relative;
|
|
66
72
|
box-sizing: border-box;
|
|
73
|
+
|
|
74
|
+
.wt-label {
|
|
75
|
+
cursor: pointer;
|
|
76
|
+
}
|
|
67
77
|
}
|
|
68
78
|
|
|
69
79
|
.wt-switcher__wrapper {
|
|
@@ -86,6 +96,9 @@
|
|
|
86
96
|
margin-left: 0;
|
|
87
97
|
margin-right: var(--switcher-icon-margin);
|
|
88
98
|
}
|
|
99
|
+
.wt-switcher:hover & {
|
|
100
|
+
color: var(--form-label--hover-color);
|
|
101
|
+
}
|
|
89
102
|
}
|
|
90
103
|
|
|
91
104
|
.wt-switcher__input {
|
|
@@ -99,46 +112,62 @@
|
|
|
99
112
|
.wt-switcher__checkmark {
|
|
100
113
|
position: relative;
|
|
101
114
|
display: block;
|
|
115
|
+
flex: 0 0 var(--switcher-width);
|
|
102
116
|
width: var(--switcher-width);
|
|
103
117
|
height: var(--switcher-height);
|
|
104
|
-
background: var(--switcher-bg-color);
|
|
105
118
|
border-radius: var(--switcher-border-radius);
|
|
106
119
|
transition: var(--transition);
|
|
107
120
|
|
|
108
121
|
&:before {
|
|
109
122
|
content: '';
|
|
110
123
|
position: absolute;
|
|
111
|
-
bottom: var(--switcher-
|
|
112
|
-
left: var(--switcher-
|
|
113
|
-
height: var(--switcher-
|
|
114
|
-
width: var(--switcher-
|
|
115
|
-
background: var(--switcher-
|
|
124
|
+
bottom: var(--switcher-cicle-margin);
|
|
125
|
+
left: var(--switcher-cicle-margin);
|
|
126
|
+
height: var(--switcher-cicle-size);
|
|
127
|
+
width: var(--switcher-cicle-size);
|
|
128
|
+
background: var(--switcher-circle-bg-color);
|
|
116
129
|
border-radius: 50%;
|
|
117
130
|
transition: var(--transition);
|
|
118
131
|
}
|
|
119
132
|
}
|
|
120
133
|
|
|
121
|
-
.wt-switcher
|
|
122
|
-
.wt-
|
|
123
|
-
|
|
134
|
+
.wt-switcher--off {
|
|
135
|
+
.wt-switcher__checkmark {
|
|
136
|
+
background: var(--switcher-bg-color--off);
|
|
124
137
|
}
|
|
125
138
|
|
|
126
|
-
|
|
127
|
-
|
|
139
|
+
&:hover {
|
|
140
|
+
.wt-switcher__checkmark {
|
|
141
|
+
background: var(--switcher-bg-color--off--hover);
|
|
142
|
+
}
|
|
128
143
|
}
|
|
129
|
-
}
|
|
130
144
|
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
145
|
+
&.wt-switcher--disabled {
|
|
146
|
+
.wt-switcher__checkmark {
|
|
147
|
+
background: var(--switcher-bg-color--off--disabled);
|
|
148
|
+
}
|
|
134
149
|
}
|
|
150
|
+
}
|
|
135
151
|
|
|
152
|
+
.wt-switcher--on {
|
|
136
153
|
.wt-switcher__checkmark {
|
|
137
|
-
background: var(--switcher-
|
|
154
|
+
background: var(--switcher-bg-color--on);
|
|
138
155
|
|
|
139
156
|
/* Show the indicator (dot/circle) when checked */
|
|
140
157
|
&:before {
|
|
141
|
-
transform: translateX(var(--switcher-
|
|
158
|
+
transform: translateX(var(--switcher-cicle-translateX));
|
|
159
|
+
}
|
|
160
|
+
}
|
|
161
|
+
|
|
162
|
+
&:hover {
|
|
163
|
+
.wt-switcher__checkmark {
|
|
164
|
+
background: var(--switcher-bg-color--on--hover);
|
|
165
|
+
}
|
|
166
|
+
}
|
|
167
|
+
|
|
168
|
+
&.wt-switcher--disabled {
|
|
169
|
+
.wt-switcher__checkmark {
|
|
170
|
+
background: var(--switcher-bg-color--on--disabled);
|
|
142
171
|
}
|
|
143
172
|
}
|
|
144
173
|
}
|
|
@@ -149,9 +178,5 @@
|
|
|
149
178
|
.wt-switcher__label {
|
|
150
179
|
color: var(--form-label--disabled-color);
|
|
151
180
|
}
|
|
152
|
-
|
|
153
|
-
.wt-switcher__checkmark {
|
|
154
|
-
background: var(--icon--disabled-color);
|
|
155
|
-
}
|
|
156
181
|
}
|
|
157
182
|
</style>
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { shallowMount } from '@vue/test-utils';
|
|
2
|
+
import WtTabs from '../wt-tabs.vue';
|
|
3
|
+
|
|
4
|
+
const tabs = [{ value: 'tab1', text: 'default' }];
|
|
5
|
+
describe('WtTabs', () => {
|
|
6
|
+
it('renders a component', () => {
|
|
7
|
+
const wrapper = shallowMount(WtTabs);
|
|
8
|
+
expect(wrapper.classes('wt-tabs')).toBe(true);
|
|
9
|
+
});
|
|
10
|
+
|
|
11
|
+
it('component emits change at tab click', () => {
|
|
12
|
+
const wrapper = shallowMount(WtTabs, {
|
|
13
|
+
propsData: { tabs },
|
|
14
|
+
});
|
|
15
|
+
wrapper.find('.wt-tab').trigger('click');
|
|
16
|
+
expect(wrapper.emitted().change.pop()).toEqual([tabs[0]]);
|
|
17
|
+
});
|
|
18
|
+
|
|
19
|
+
it('renders tab default content', () => {
|
|
20
|
+
const wrapper = shallowMount(WtTabs, {
|
|
21
|
+
propsData: { tabs },
|
|
22
|
+
});
|
|
23
|
+
expect(wrapper.find('.wt-tab').text()).toBe(tabs[0].text);
|
|
24
|
+
});
|
|
25
|
+
|
|
26
|
+
it('renders tab custom content via default slot', () => {
|
|
27
|
+
const custom = 'custom name';
|
|
28
|
+
const wrapper = shallowMount(WtTabs, {
|
|
29
|
+
propsData: { tabs },
|
|
30
|
+
slots: {
|
|
31
|
+
tab1: custom,
|
|
32
|
+
},
|
|
33
|
+
});
|
|
34
|
+
expect(wrapper.find('.wt-tab').text()).toBe(custom);
|
|
35
|
+
});
|
|
36
|
+
});
|
|
@@ -1,125 +1,117 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<nav class="wt-tabs">
|
|
3
3
|
<button
|
|
4
|
-
|
|
4
|
+
v-for="(tab) in tabs"
|
|
5
|
+
:key="tab.value"
|
|
5
6
|
:class="{
|
|
6
7
|
'wt-tab--highlight': tab.value === current.value
|
|
7
8
|
}"
|
|
8
|
-
v-for="(tab) in tabs"
|
|
9
9
|
:value="tab.text"
|
|
10
|
-
|
|
10
|
+
class="wt-tab"
|
|
11
11
|
type="button"
|
|
12
12
|
@click="open(tab)"
|
|
13
13
|
>
|
|
14
14
|
<slot :name="tab.value" v-bind="{ tab, current }">
|
|
15
|
-
{{tab.text}}
|
|
15
|
+
<span style="display: block;">{{ tab.text }}</span>
|
|
16
16
|
</slot>
|
|
17
17
|
</button>
|
|
18
18
|
|
|
19
19
|
<div class="wt-tabs__underline">
|
|
20
20
|
<div
|
|
21
|
-
class="wt-tab__underline--highlight"
|
|
22
21
|
:style="{
|
|
23
22
|
width: `${activeLineWidth}px`,
|
|
24
23
|
transform: `translateX(${activeLineOffset}px)`
|
|
25
24
|
}"
|
|
25
|
+
class="wt-tab__underline--highlight"
|
|
26
26
|
></div>
|
|
27
27
|
</div>
|
|
28
28
|
</nav>
|
|
29
29
|
</template>
|
|
30
30
|
|
|
31
31
|
<script>
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
},
|
|
39
|
-
tabs: {
|
|
40
|
-
type: Array,
|
|
41
|
-
default: () => [],
|
|
42
|
-
},
|
|
32
|
+
export default {
|
|
33
|
+
name: 'wt-tabs',
|
|
34
|
+
props: {
|
|
35
|
+
current: {
|
|
36
|
+
type: Object,
|
|
37
|
+
default: () => ({}),
|
|
43
38
|
},
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
event: 'change',
|
|
39
|
+
tabs: {
|
|
40
|
+
type: Array,
|
|
41
|
+
default: () => [],
|
|
48
42
|
},
|
|
43
|
+
},
|
|
49
44
|
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
45
|
+
model: {
|
|
46
|
+
prop: 'current',
|
|
47
|
+
event: 'change',
|
|
48
|
+
},
|
|
54
49
|
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
50
|
+
data: () => ({
|
|
51
|
+
activeLineWidth: 0,
|
|
52
|
+
activeLineOffset: 0,
|
|
53
|
+
}),
|
|
54
|
+
|
|
55
|
+
methods: {
|
|
56
|
+
open(value) {
|
|
57
|
+
this.$emit('change', value);
|
|
58
|
+
this.moveActiveLine(value);
|
|
59
|
+
},
|
|
60
60
|
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
},
|
|
61
|
+
moveActiveLine(newValue) {
|
|
62
|
+
if (!this.current) return;
|
|
63
|
+
if (!this.$refs || !this.$refs[newValue] || !this.$refs[newValue][0]) return;
|
|
64
|
+
const element = this.$refs[newValue][0];
|
|
65
|
+
this.activeLineWidth = element.clientWidth;
|
|
66
|
+
this.activeLineOffset = element.offsetLeft;
|
|
68
67
|
},
|
|
69
|
-
}
|
|
68
|
+
},
|
|
69
|
+
};
|
|
70
70
|
</script>
|
|
71
71
|
|
|
72
72
|
<style lang="scss" scoped>
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
position: relative;
|
|
80
|
-
display: inline-block;
|
|
81
|
-
padding: var(--tab-padding);
|
|
82
|
-
margin: var(--tab-margin);
|
|
83
|
-
color: var(--tab-color);
|
|
84
|
-
background: transparent;
|
|
85
|
-
border: none;
|
|
86
|
-
border-bottom: var(--tab-border);
|
|
87
|
-
border-bottom-color: transparent;
|
|
88
|
-
transition: var(--transition);
|
|
89
|
-
cursor: pointer;
|
|
90
|
-
z-index: var(--tab-z-index);
|
|
73
|
+
.wt-tabs {
|
|
74
|
+
position: relative;
|
|
75
|
+
display: flex;
|
|
76
|
+
flex-wrap: nowrap;
|
|
77
|
+
gap: var(--tab-gap);
|
|
78
|
+
}
|
|
91
79
|
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
80
|
+
.wt-tab {
|
|
81
|
+
@extend %typo-body-1;
|
|
82
|
+
position: relative;
|
|
83
|
+
z-index: var(--tab-z-index);
|
|
84
|
+
display: inline-block;
|
|
85
|
+
padding-bottom: var(--tab-padding);
|
|
86
|
+
cursor: pointer;
|
|
87
|
+
transition: var(--transition);
|
|
88
|
+
color: var(--tab-color);
|
|
89
|
+
border: none;
|
|
90
|
+
border-bottom: var(--tab-border);
|
|
91
|
+
border-bottom-color: transparent;
|
|
92
|
+
outline: none;
|
|
93
|
+
background: transparent;
|
|
96
94
|
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
95
|
+
&:hover,
|
|
96
|
+
&:focus, {
|
|
97
|
+
color: var(--tab--hover-color);
|
|
98
|
+
border-bottom-color: var(--tab--active-border-color);
|
|
99
|
+
}
|
|
102
100
|
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
content: attr(value);
|
|
107
|
-
font-family: 'Montserrat Semi', monospace;
|
|
108
|
-
height: 0;
|
|
109
|
-
overflow: hidden;
|
|
110
|
-
visibility: hidden;
|
|
111
|
-
}
|
|
101
|
+
&.wt-tab--highlight {
|
|
102
|
+
color: var(--tab--active-color);
|
|
103
|
+
border-bottom-color: var(--tab--active-border-color);
|
|
112
104
|
}
|
|
113
105
|
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
z-index: 0;
|
|
106
|
+
//// disables bold font resize on hover
|
|
107
|
+
&:after {
|
|
108
|
+
display: block;
|
|
109
|
+
visibility: hidden;
|
|
110
|
+
overflow: hidden;
|
|
111
|
+
height: 0;
|
|
112
|
+
content: attr(value);
|
|
113
|
+
font-weight: bold;
|
|
123
114
|
}
|
|
115
|
+
}
|
|
124
116
|
|
|
125
117
|
</style>
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import { shallowMount } from '@vue/test-utils';
|
|
2
|
+
import WtTagsInput from '../wt-tags-input.vue';
|
|
3
|
+
import WtLabel from '../../wt-label/wt-label.vue';
|
|
4
|
+
|
|
5
|
+
describe('WtTagsInput', () => {
|
|
6
|
+
it('renders a component', () => {
|
|
7
|
+
const wrapper = shallowMount(WtTagsInput);
|
|
8
|
+
expect(wrapper.classes('wt-tags-input')).toBe(true);
|
|
9
|
+
});
|
|
10
|
+
|
|
11
|
+
it('renders label text when passed', () => {
|
|
12
|
+
const label = 'Hello there';
|
|
13
|
+
const wrapper = shallowMount(WtTagsInput, {
|
|
14
|
+
stubs: { WtLabel },
|
|
15
|
+
propsData: { label },
|
|
16
|
+
});
|
|
17
|
+
expect(wrapper.find('.wt-label').text()).toBe(label);
|
|
18
|
+
});
|
|
19
|
+
|
|
20
|
+
it('by default emits "input" event at native "tag" event', () => {
|
|
21
|
+
const tag = '123';
|
|
22
|
+
const wrapper = shallowMount(WtTagsInput, {
|
|
23
|
+
propsData: {
|
|
24
|
+
value: [],
|
|
25
|
+
},
|
|
26
|
+
});
|
|
27
|
+
wrapper.findComponent({ name: 'vue-multiselect' }).vm.$emit('tag', tag);
|
|
28
|
+
expect(wrapper.emitted().input[0][0]).toEqual([tag]);
|
|
29
|
+
});
|
|
30
|
+
|
|
31
|
+
it('in manual mode doesnt emit "input" event at native "tag" event', () => {
|
|
32
|
+
const tag = '123';
|
|
33
|
+
const wrapper = shallowMount(WtTagsInput, {
|
|
34
|
+
propsData: {
|
|
35
|
+
value: [],
|
|
36
|
+
manualTagging: true,
|
|
37
|
+
},
|
|
38
|
+
});
|
|
39
|
+
wrapper.findComponent({ name: 'vue-multiselect' }).vm.$emit('tag', tag);
|
|
40
|
+
expect(wrapper.emitted().input).toBeFalsy();
|
|
41
|
+
});
|
|
42
|
+
});
|