@webitel/ui-sdk 3.2.124 → 3.2.126

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (214) hide show
  1. package/dist/ui-sdk.common.js +735 -729
  2. package/dist/ui-sdk.common.js.map +1 -1
  3. package/dist/ui-sdk.css +1 -1
  4. package/dist/ui-sdk.umd.js +737 -731
  5. package/dist/ui-sdk.umd.js.map +1 -1
  6. package/dist/ui-sdk.umd.min.js +1 -1
  7. package/dist/ui-sdk.umd.min.js.map +1 -1
  8. package/package.json +2 -1
  9. package/src/components/index.js +56 -59
  10. package/src/components/on-demand/wt-cc-agent-status-timers/__tests__/wt-cc-agent-status-timers.spec.js +25 -0
  11. package/src/components/on-demand/wt-cc-agent-status-timers/wt-cc-agent-status-timers.vue +56 -0
  12. package/src/components/{organisms/wt-app-header → wt-app-header}/__tests__/WtAppNavigator.spec.js +1 -1
  13. package/src/{css/components/organisms → components}/wt-app-header/_variables.scss +1 -1
  14. package/src/components/wt-app-header/wt-app-header.vue +26 -0
  15. package/src/components/{organisms/wt-app-header → wt-app-header}/wt-app-navigator.vue +9 -9
  16. package/src/{css/components/atoms → components}/wt-avatar/_variables.scss +1 -1
  17. package/src/components/{atoms/wt-avatar → wt-avatar}/wt-avatar.vue +4 -2
  18. package/src/components/{atoms/wt-badge → wt-badge}/wt-badge.vue +17 -13
  19. package/src/{css/components/atoms → components}/wt-button/_variables.scss +0 -1
  20. package/src/components/{atoms/wt-button → wt-button}/wt-button.vue +2 -0
  21. package/src/{css/components/molecules → components}/wt-button-select/_variables.scss +1 -1
  22. package/src/components/{molecules/wt-button-select → wt-button-select}/wt-button-select.vue +2 -0
  23. package/src/components/{molecules/wt-checkbox → wt-checkbox}/__tests__/WtCheckbox.spec.js +1 -1
  24. package/src/components/wt-checkbox/wt-checkbox.vue +182 -0
  25. package/src/components/wt-chip/wt-chip.vue +24 -0
  26. package/src/components/{atoms/wt-context-menu → wt-context-menu}/wt-context-menu.vue +2 -0
  27. package/src/components/{molecules/wt-datepicker → wt-datepicker}/__tests__/WtDatepicker.spec.js +1 -1
  28. package/src/components/{molecules/wt-datepicker → wt-datepicker}/wt-datepicker.vue +2 -0
  29. package/src/components/wt-divider/wt-divider.vue +27 -0
  30. package/src/components/{molecules/wt-dummy → wt-dummy}/wt-dummy.vue +1 -1
  31. package/src/components/{organisms/wt-error-page → wt-error-page}/wt-error-page.vue +2 -2
  32. package/src/components/{organisms/wt-headline → wt-headline}/wt-headline.vue +2 -0
  33. package/src/components/{organisms/wt-headline-nav → wt-headline-nav}/wt-headline-nav.vue +2 -0
  34. package/src/components/{atoms/wt-icon → wt-icon}/wt-icon.vue +17 -1
  35. package/src/components/{molecules/wt-icon-btn → wt-icon-btn}/__tests__/WtIconBtn.spec.js +1 -1
  36. package/src/components/{molecules/wt-icon-btn → wt-icon-btn}/wt-icon-btn.vue +1 -1
  37. package/src/components/{atoms/wt-indicator → wt-indicator}/wt-indicator.vue +2 -0
  38. package/src/components/{molecules/wt-input → wt-input}/wt-input.vue +3 -1
  39. package/src/components/wt-input-info/wt-input-info.vue +37 -0
  40. package/src/components/{molecules/wt-label → wt-label}/wt-label.vue +2 -0
  41. package/src/components/{molecules/wt-load-bar → wt-load-bar}/wt-load-bar.vue +2 -0
  42. package/src/components/{atoms/wt-loader → wt-loader}/wt-loader.vue +19 -17
  43. package/src/components/{organisms/wt-navigation-bar → wt-navigation-bar}/wt-navigation-bar.vue +15 -13
  44. package/src/components/{molecules/wt-notification → wt-notification}/__tests__/WtNotification.spec.js +1 -1
  45. package/src/components/wt-notification/wt-notification.vue +83 -0
  46. package/src/components/{organisms/wt-notifications-bar → wt-notifications-bar}/__tests__/WtNotificationsBar.spec.js +2 -2
  47. package/src/components/{organisms/wt-notifications-bar → wt-notifications-bar}/wt-notifications-bar.vue +2 -0
  48. package/src/components/{organisms/wt-page-header → wt-page-header}/wt-page-header.vue +1 -0
  49. package/src/components/{organisms/wt-page-wrapper → wt-page-wrapper}/wt-page-wrapper.vue +2 -0
  50. package/src/components/{organisms/wt-pagination → wt-pagination}/wt-pagination.vue +3 -1
  51. package/src/components/{organisms/wt-player → wt-player}/wt-player.vue +9 -4
  52. package/src/components/{molecules/wt-popup → wt-popup}/wt-popup.vue +2 -0
  53. package/src/components/{molecules/wt-progress-bar → wt-progress-bar}/wt-progress-bar.vue +9 -2
  54. package/src/components/{molecules/wt-radio → wt-radio}/__tests__/WtRadio.spec.js +1 -1
  55. package/src/components/wt-radio/wt-radio.vue +177 -0
  56. package/src/components/{atoms/wt-rounded-action → wt-rounded-action}/wt-rounded-action.vue +2 -0
  57. package/src/components/{molecules/wt-search-bar → wt-search-bar}/wt-search-bar.vue +3 -1
  58. package/src/{css/components/molecules → components}/wt-select/_multiselect.scss +1 -1
  59. package/src/components/{molecules/wt-select → wt-select}/mixins/multiselectMixin.js +3 -3
  60. package/src/components/{molecules/wt-select → wt-select}/wt-select.vue +2 -1
  61. package/src/components/{molecules/wt-slider → wt-slider}/wt-slider.vue +2 -0
  62. package/src/components/{organisms/wt-status-select → wt-status-select}/__tests__/WtStatusSelect.spec.js +1 -1
  63. package/src/components/{organisms/wt-status-select → wt-status-select}/_internals/StatusOptions.lookup.js +1 -1
  64. package/src/components/{organisms/wt-status-select → wt-status-select}/wt-status-select.vue +4 -2
  65. package/src/components/wt-switcher/wt-switcher.vue +185 -0
  66. package/src/components/{organisms/wt-table → wt-table}/__tests__/WtTable.spec.js +1 -1
  67. package/src/components/{organisms/wt-table → wt-table}/wt-table.vue +2 -0
  68. package/src/components/{organisms/wt-table-actions → wt-table-actions}/wt-table-actions.vue +2 -0
  69. package/src/components/{molecules/wt-tabs → wt-tabs}/wt-tabs.vue +2 -0
  70. package/src/components/{molecules/wt-tags-input → wt-tags-input}/wt-tags-input.vue +2 -1
  71. package/src/components/wt-textarea/wt-textarea.vue +217 -0
  72. package/src/components/{molecules/wt-time-input → wt-time-input}/wt-time-input.vue +1 -1
  73. package/src/components/{molecules/wt-timepicker → wt-timepicker}/wt-timepicker.vue +4 -2
  74. package/src/components/wt-tooltip/_variables.scss +11 -0
  75. package/src/components/{atoms/wt-tooltip → wt-tooltip}/wt-tooltip.vue +2 -0
  76. package/src/composables/useRepresentableAgentPauseCause/__tests__/useRepresentableAgentPauseCause.spec.js +78 -0
  77. package/src/composables/useRepresentableAgentPauseCause/useRepresentableAgentPauseCause.js +36 -0
  78. package/src/css/main.scss +0 -2
  79. package/src/locale/en/en.js +7 -0
  80. package/src/locale/ru/ru.js +7 -0
  81. package/src/locale/ua/ua.js +7 -0
  82. package/src/modules/AuditForm/components/audit-form-question-read-wrapper.vue +1 -1
  83. package/src/modules/AuditForm/components/audit-form-question-write-wrapper.vue +5 -5
  84. package/src/modules/AuditForm/components/audit-form.vue +1 -1
  85. package/src/modules/AuditForm/components/questions/options/audit-form-question-options-write-row.vue +3 -3
  86. package/src/modules/AuditForm/components/questions/options/audit-form-question-options.vue +2 -2
  87. package/src/modules/AuditForm/components/questions/score/audit-form-question-score.vue +2 -2
  88. package/src/components/atoms/wt-chip/wt-chip.vue +0 -23
  89. package/src/components/atoms/wt-divider/wt-divider.vue +0 -25
  90. package/src/components/atoms/wt-input-info/wt-input-info.vue +0 -35
  91. package/src/components/molecules/wt-checkbox/wt-checkbox.vue +0 -180
  92. package/src/components/molecules/wt-notification/wt-notification.vue +0 -75
  93. package/src/components/molecules/wt-radio/wt-radio.vue +0 -174
  94. package/src/components/molecules/wt-switcher/wt-switcher.vue +0 -182
  95. package/src/components/molecules/wt-textarea/wt-textarea.vue +0 -215
  96. package/src/components/organisms/wt-app-header/wt-app-header.vue +0 -24
  97. package/src/css/components/_components.scss +0 -45
  98. package/src/css/components/atoms/wt-tooltip/_variables.scss +0 -29
  99. package/src/css/components/molecules/wt-icon-btn/_variables.scss +0 -3
  100. package/src/css/components/organisms/wt-icon-action/_variables.scss +0 -0
  101. package/src/locale/.DS_Store +0 -0
  102. /package/src/components/{organisms/wt-app-header → wt-app-header}/__tests__/WtAppHeader.spec.js +0 -0
  103. /package/src/components/{organisms/wt-app-header → wt-app-header}/__tests__/WtHeaderActions.spec.js +0 -0
  104. /package/src/components/{organisms/wt-app-header → wt-app-header}/wt-header-actions.vue +0 -0
  105. /package/src/components/{atoms/wt-avatar → wt-avatar}/__tests__/wt-avatar.spec.js +0 -0
  106. /package/src/components/{atoms/wt-badge → wt-badge}/__tests__/wt-badge.spec.js +0 -0
  107. /package/src/{css/components/atoms → components}/wt-badge/_variables.scss +0 -0
  108. /package/src/components/{atoms/wt-button → wt-button}/__tests__/WtButton.spec.js +0 -0
  109. /package/src/components/{molecules/wt-button-select → wt-button-select}/__tests__/WtButtonSelect.spec.js +0 -0
  110. /package/src/{css/components/molecules → components}/wt-checkbox/_variables.scss +0 -0
  111. /package/src/components/{atoms/wt-chip → wt-chip}/__tests__/WtChip.spec.js +0 -0
  112. /package/src/{css/components/atoms → components}/wt-chip/_variables.scss +0 -0
  113. /package/src/{css/components/atoms → components}/wt-chip/wt-chip.scss +0 -0
  114. /package/src/components/{atoms/wt-context-menu → wt-context-menu}/__tests__/WtContextMenu.spec.js +0 -0
  115. /package/src/{css/components/atoms → components}/wt-context-menu/_variables.scss +0 -0
  116. /package/src/components/{molecules/wt-copy-action → wt-copy-action}/__tests__/WtCopyAction.spec.js +0 -0
  117. /package/src/components/{molecules/wt-copy-action → wt-copy-action}/wt-copy-action.vue +0 -0
  118. /package/src/{css/components/molecules → components}/wt-datepicker/_variables.scss +0 -0
  119. /package/src/components/{atoms/wt-divider → wt-divider}/__tests__/WtDivider.spec.js +0 -0
  120. /package/src/{css/components/atoms → components}/wt-divider/_variables.scss +0 -0
  121. /package/src/components/{molecules/wt-dummy → wt-dummy}/__tests__/WtDummy.spec.js +0 -0
  122. /package/src/components/{organisms/wt-error-page → wt-error-page}/__tests__/wt-error-page.spec.js +0 -0
  123. /package/src/components/{organisms/wt-expansion-panel → wt-expansion-panel}/__tests__/WtExpansionPanel.spec.js +0 -0
  124. /package/src/components/{organisms/wt-expansion-panel → wt-expansion-panel}/wt-expansion-panel.vue +0 -0
  125. /package/src/components/{organisms/wt-filters-panel-wrapper → wt-filters-panel-wrapper}/__tests__/WtFiltersPanelWrapper.spec.js +0 -0
  126. /package/src/components/{organisms/wt-filters-panel-wrapper → wt-filters-panel-wrapper}/wt-filters-panel-wrapper.vue +0 -0
  127. /package/src/components/{organisms/wt-headline → wt-headline}/__tests__/WtHeadline.spec.js +0 -0
  128. /package/src/{css/components/organisms → components}/wt-headline/_variables.scss +0 -0
  129. /package/src/components/{organisms/wt-headline-nav → wt-headline-nav}/__tests__/wt-headline-nav.spec.js +0 -0
  130. /package/src/{css/components/organisms → components}/wt-headline-nav/_variables.scss +0 -0
  131. /package/src/components/{molecules/wt-hint → wt-hint}/__tests__/WtHint.spec.js +0 -0
  132. /package/src/components/{molecules/wt-hint → wt-hint}/wt-hint.vue +0 -0
  133. /package/src/components/{atoms/wt-icon → wt-icon}/__tests__/WtIcon.spec.js +0 -0
  134. /package/src/{css/components/atoms → components}/wt-icon/_variables.scss +0 -0
  135. /package/src/components/{atoms/wt-icon-action → wt-icon-action}/__tests__/WtIconAction.spec.js +0 -0
  136. /package/src/components/{atoms/wt-icon-action → wt-icon-action}/_internals/__tests__/WtAddIconAction.spec.js +0 -0
  137. /package/src/components/{atoms/wt-icon-action → wt-icon-action}/_internals/__tests__/WtDeleteIconAction.spec.js +0 -0
  138. /package/src/components/{atoms/wt-icon-action → wt-icon-action}/_internals/__tests__/WtDownloadIconAction.spec.js +0 -0
  139. /package/src/components/{atoms/wt-icon-action → wt-icon-action}/_internals/__tests__/WtEditIconAction.spec.js +0 -0
  140. /package/src/components/{atoms/wt-icon-action → wt-icon-action}/_internals/__tests__/WtHistoryIconAction.spec.js +0 -0
  141. /package/src/components/{atoms/wt-icon-action → wt-icon-action}/_internals/__tests__/WtRefreshIconAction.spec.js +0 -0
  142. /package/src/components/{atoms/wt-icon-action → wt-icon-action}/_internals/wt-add-icon-action.vue +0 -0
  143. /package/src/components/{atoms/wt-icon-action → wt-icon-action}/_internals/wt-delete-icon-action.vue +0 -0
  144. /package/src/components/{atoms/wt-icon-action → wt-icon-action}/_internals/wt-download-icon-action.vue +0 -0
  145. /package/src/components/{atoms/wt-icon-action → wt-icon-action}/_internals/wt-edit-icon-action.vue +0 -0
  146. /package/src/components/{atoms/wt-icon-action → wt-icon-action}/_internals/wt-history-icon-action.vue +0 -0
  147. /package/src/components/{atoms/wt-icon-action → wt-icon-action}/_internals/wt-refresh-icon-action.vue +0 -0
  148. /package/src/components/{atoms/wt-icon-action → wt-icon-action}/wt-icon-action.vue +0 -0
  149. /package/src/components/{atoms/wt-indicator → wt-indicator}/__tests__/WtIndicator.spec.js +0 -0
  150. /package/src/{css/components/atoms → components}/wt-indicator/_variables.scss +0 -0
  151. /package/src/components/{molecules/wt-input → wt-input}/__tests__/WtInput.spec.js +0 -0
  152. /package/src/{css/components/molecules → components}/wt-input/_variables.scss +0 -0
  153. /package/src/components/{atoms/wt-input-info → wt-input-info}/__tests__/WtInputInfo.spec.js +0 -0
  154. /package/src/{css/components/atoms → components}/wt-input-info/_variables.scss +0 -0
  155. /package/src/components/{molecules/wt-item-link → wt-item-link}/__tests__/WtItemLink.spec.js +0 -0
  156. /package/src/components/{molecules/wt-item-link → wt-item-link}/wt-item-link.vue +0 -0
  157. /package/src/components/{molecules/wt-label → wt-label}/__tests__/WtLabel.spec.js +0 -0
  158. /package/src/{css/components/atoms → components}/wt-label/_variables.scss +0 -0
  159. /package/src/components/{molecules/wt-label → wt-label}/mixins/labelUsageMixin.js +0 -0
  160. /package/src/components/{molecules/wt-load-bar → wt-load-bar}/__tests__/WtLoadBar.spec.js +0 -0
  161. /package/src/{css/components/molecules → components}/wt-load-bar/_variables.scss +0 -0
  162. /package/src/components/{atoms/wt-loader → wt-loader}/__tests__/WtLoader.spec.js +0 -0
  163. /package/src/components/{atoms/wt-loader → wt-loader}/_internals/wt-loader--md.vue +0 -0
  164. /package/src/components/{atoms/wt-loader → wt-loader}/_internals/wt-loader--sm.vue +0 -0
  165. /package/src/{css/components/atoms → components}/wt-loader/_variables.scss +0 -0
  166. /package/src/components/{organisms/wt-navigation-bar → wt-navigation-bar}/__tests__/WtNavigationBar.spec.js +0 -0
  167. /package/src/{css/components/organisms → components}/wt-navigation-bar/_variables.scss +0 -0
  168. /package/src/{css/components/molecules → components}/wt-notification/_variables.scss +0 -0
  169. /package/src/{css/components/organisms → components}/wt-notifications-bar/_variables.scss +0 -0
  170. /package/src/components/{organisms/wt-page-header → wt-page-header}/__tests__/wt-page-header.spec.js +0 -0
  171. /package/src/components/{organisms/wt-page-wrapper → wt-page-wrapper}/__tests__/WtPageWrapper.spec.js +0 -0
  172. /package/src/{css/components/organisms → components}/wt-page-wrapper/_variables.scss +0 -0
  173. /package/src/components/{organisms/wt-pagination → wt-pagination}/__tests__/WtPagination.spec.js +0 -0
  174. /package/src/{css/components/organisms → components}/wt-pagination/_variables.scss +0 -0
  175. /package/src/components/{organisms/wt-player → wt-player}/__tests__/WtPlayer.spec.js +0 -0
  176. /package/src/{css/components/organisms → components}/wt-player/_variables.scss +0 -0
  177. /package/src/components/{molecules/wt-popup → wt-popup}/__tests__/WtPopup.spec.js +0 -0
  178. /package/src/{css/components/molecules → components}/wt-popup/_variables.scss +0 -0
  179. /package/src/components/{molecules/wt-progress-bar → wt-progress-bar}/__tests__/WtProgressBar.spec.js +0 -0
  180. /package/src/{css/components/molecules → components}/wt-progress-bar/_variables.scss +0 -0
  181. /package/src/{css/components/molecules → components}/wt-radio/_variables.scss +0 -0
  182. /package/src/components/{atoms/wt-rounded-action → wt-rounded-action}/__tests__/WtRoundedAction.spec.js +0 -0
  183. /package/src/{css/components/atoms → components}/wt-rounded-action/_variables.scss +0 -0
  184. /package/src/components/{molecules/wt-search-bar → wt-search-bar}/__tests__/WtSearchBar.spec.js +0 -0
  185. /package/src/{css/components/molecules → components}/wt-search-bar/_variables.scss +0 -0
  186. /package/src/components/{molecules/wt-select → wt-select}/__tests__/WtSelect.spec.js +0 -0
  187. /package/src/{css/components/molecules → components}/wt-select/_variables.scss +0 -0
  188. /package/src/components/{molecules/wt-select → wt-select}/mixins/__tests__/multiselectMixin.spec.js +0 -0
  189. /package/src/components/{molecules/wt-slider → wt-slider}/__tests__/WtSlider.spec.js +0 -0
  190. /package/src/{css/components/molecules → components}/wt-slider/_variables.scss +0 -0
  191. /package/src/{css/components/organisms → components}/wt-status-select/_variables.scss +0 -0
  192. /package/src/components/{organisms/wt-stepper → wt-stepper}/__tests__/WtStepper.spec.vue.js +0 -0
  193. /package/src/components/{organisms/wt-stepper → wt-stepper}/wt-stepper.vue +0 -0
  194. /package/src/components/{molecules/wt-switcher → wt-switcher}/__tests__/WtSwitcher.spec.js +0 -0
  195. /package/src/{css/components/molecules → components}/wt-switcher/_variables.scss +0 -0
  196. /package/src/components/{organisms/wt-table → wt-table}/_internals/getSortOrder.js +0 -0
  197. /package/src/{css/components/organisms → components}/wt-table/_variables.scss +0 -0
  198. /package/src/components/{organisms/wt-table-actions → wt-table-actions}/__tests__/WtTableActions.spec.js +0 -0
  199. /package/src/{css/components/organisms → components}/wt-table-actions/_variables.scss +0 -0
  200. /package/src/components/{organisms/wt-table-column-select → wt-table-column-select}/__tests__/WtTableColumnSelect.spec.js +0 -0
  201. /package/src/components/{organisms/wt-table-column-select → wt-table-column-select}/wt-table-column-select.vue +0 -0
  202. /package/src/components/{molecules/wt-tabs → wt-tabs}/__tests__/WtTabs.spec.js +0 -0
  203. /package/src/{css/components/molecules → components}/wt-tabs/_variables.scss +0 -0
  204. /package/src/components/{molecules/wt-tags-input → wt-tags-input}/__tests__/WtTagsInput.spec.js +0 -0
  205. /package/src/{css/components/molecules → components}/wt-tags-input/_variables.scss +0 -0
  206. /package/src/components/{molecules/wt-textarea → wt-textarea}/__tests__/WtTextarea.spec.js +0 -0
  207. /package/src/{css/components/molecules → components}/wt-textarea/_variables.scss +0 -0
  208. /package/src/components/{molecules/wt-time-input → wt-time-input}/__tests__/WtTimeInput.spec.js +0 -0
  209. /package/src/components/{molecules/wt-timepicker → wt-timepicker}/__tests__/WtTimepicker.spec.js +0 -0
  210. /package/src/{css/components/molecules → components}/wt-timepicker/_variables.scss +0 -0
  211. /package/src/components/{atoms/wt-tooltip → wt-tooltip}/__tests__/WtTooltip.spec.js +0 -0
  212. /package/src/components/{atoms/wt-tooltip → wt-tooltip}/_internals/useTooltipTriggerSubscriptions.js +0 -0
  213. /package/src/components/{atoms/wt-tooltip → wt-tooltip}/_internals/wt-tooltip-floating.vue +0 -0
  214. /package/src/{scripts/validators → validators}/domainValidator.js +0 -0
@@ -1,180 +0,0 @@
1
- <template>
2
- <div
3
- class="wt-checkbox"
4
- :class="{
5
- 'wt-checkbox--active': isChecked,
6
- 'wt-checkbox--outline': outline,
7
- 'wt-checkbox--disabled': disabled,
8
- }"
9
- >
10
- <wt-label class="wt-checkbox__wrapper" v-bind="labelProps">
11
- <input
12
- class="wt-checkbox__input"
13
- type="checkbox"
14
- :value="value"
15
- :checked="isChecked"
16
- :disabled="disabled"
17
- @change="inputHandler"
18
- >
19
- <span class="wt-checkbox__checkmark">
20
- <wt-icon
21
- :icon="checkboxIcon"
22
- :color="iconColor"
23
- ></wt-icon>
24
- </span>
25
- <!-- @slot Custom label markup -->
26
- <slot name="label" v-bind="{ label, isChecked, disabled }">
27
- <div v-if="label" class="wt-checkbox__label">{{ label }}</div>
28
- </slot>
29
- </wt-label>
30
- </div>
31
- </template>
32
-
33
- <script>
34
- export default {
35
- name: 'wt-checkbox',
36
- model: {
37
- prop: 'selected',
38
- event: 'change',
39
- },
40
- props: {
41
- value: {
42
- type: [String, Boolean],
43
- default: '',
44
- },
45
- selected: {
46
- type: [Array, Boolean],
47
- default: () => [],
48
- },
49
- label: {
50
- type: String,
51
- default: '',
52
- },
53
- disabled: {
54
- type: Boolean,
55
- default: false,
56
- },
57
- outline: {
58
- type: Boolean,
59
- default: false,
60
- },
61
- labelProps: {
62
- type: Object,
63
- description: 'Object with props, passed down to wt-label as props',
64
- },
65
- },
66
- emits: ['change'],
67
- computed: {
68
- isChecked() {
69
- if (typeof this.selected === 'boolean') {
70
- return this.selected;
71
- }
72
- return this.selected.includes(this.value);
73
- },
74
- checkboxIcon() {
75
- return this.isChecked ? 'checkbox--checked' : 'checkbox';
76
- },
77
- iconColor() {
78
- if (this.disabled) return 'disabled';
79
- if (this.isChecked) return 'active';
80
- return null;
81
- },
82
- },
83
- methods: {
84
- inputHandler() {
85
- if (typeof this.selected === 'boolean') {
86
- this.$emit('change', !this.selected);
87
- } else {
88
- let selected = [...this.selected];
89
- if (selected.includes(this.value)) {
90
- selected = selected.filter((value) => value !== this.value);
91
- } else {
92
- selected.push(this.value);
93
- }
94
- this.$emit('change', selected);
95
- }
96
- },
97
- },
98
- };
99
- </script>
100
-
101
- <style lang="scss" scoped>
102
- .wt-checkbox {
103
- @include width-fit-content;
104
- box-sizing: border-box;
105
-
106
- .wt-label {
107
- cursor: pointer;
108
- }
109
- }
110
-
111
- .wt-checkbox__wrapper {
112
- position: relative;
113
- display: flex;
114
- align-items: center;
115
- user-select: none;
116
-
117
- .wt-checkbox__checkmark {
118
- line-height: 0; // prevent icon height >> content
119
- }
120
- }
121
-
122
- .wt-checkbox__label {
123
- margin-left: var(--checkbox-icon-margin);
124
- transition: var(--transition);
125
- cursor: pointer;
126
- }
127
-
128
- /* Hide the browser's default checkbox */
129
- .wt-checkbox__input {
130
- position: absolute;
131
- width: 0;
132
- height: 0;
133
- opacity: 0;
134
- pointer-events: none;
135
- }
136
-
137
- .wt-checkbox:hover {
138
- .wt-checkbox__label {
139
- color: var(--form-label--hover-color);
140
- }
141
-
142
- ::v-deep .wt-icon__icon {
143
- fill: var(--icon-color--hover);
144
- }
145
- }
146
-
147
- .wt-checkbox--active {
148
- .wt-checkbox__label {
149
- color: var(--form-label--active-color);
150
- }
151
- }
152
-
153
- .wt-checkbox--outline {
154
- .wt-checkbox__label {
155
- color: var(--form-outline-label-color);
156
- }
157
-
158
- ::v-deep .wt-icon__icon {
159
- fill: var(--icon-outline-color);
160
- }
161
-
162
- &.wt-checkbox--active {
163
- .wt-checkbox__label {
164
- color: var(--form-label--active-color);
165
- }
166
-
167
- ::v-deep .wt-icon__icon {
168
- fill: var(--icon-outline--active-color);
169
- }
170
- }
171
- }
172
-
173
- .wt-checkbox--disabled {
174
- pointer-events: none;
175
-
176
- .wt-checkbox__label {
177
- color: var(--form-label--disabled-color);
178
- }
179
- }
180
- </style>
@@ -1,75 +0,0 @@
1
- <template>
2
- <article
3
- class="wt-notification"
4
- @click="$emit('close')"
5
- >
6
- <wt-icon
7
- class="wt-notification__icon"
8
- :icon="notificationIcon"
9
- :color="notificationIconColor"
10
- ></wt-icon>
11
-
12
- <p class="wt-notification__text">
13
- <slot></slot>
14
- </p>
15
- </article>
16
- </template>
17
-
18
- <script>
19
-
20
- export default {
21
- name: 'wt-notification',
22
- props: {
23
- type: {
24
- type: String,
25
- default: 'info',
26
- },
27
- },
28
- computed: {
29
- notificationIcon() {
30
- switch (this.type) {
31
- case 'info': return 'done';
32
- case 'error': return 'attention';
33
- default: return '';
34
- }
35
- },
36
- notificationIconColor() {
37
- switch (this.type) {
38
- case 'info': return 'success';
39
- case 'error': return 'danger';
40
- default: return '';
41
- }
42
- },
43
- },
44
- };
45
- </script>
46
-
47
- <style lang="scss" scoped>
48
- .wt-notification {
49
- @extend %typo-body-1;
50
- @include width-fit-content;
51
-
52
- position: relative;
53
- display: flex;
54
- align-items: flex-start;
55
- min-width: var(--notification-min-width);
56
- max-width: var(--notification-max-width);
57
- padding: var(--notification-padding);
58
- color: var(--notification-text-color);
59
- background: var(--notification-bg-color);
60
- border-radius: var(--border-radius);
61
- box-shadow: var(--elevation-1);
62
- cursor: pointer;
63
- }
64
-
65
- .wt-notification__icon {
66
- flex: 0 0 var(--icon-md-size);
67
- margin-right: var(--notification-icon-margin);
68
- }
69
-
70
- .wt-notification__text {
71
- flex-grow: 1;
72
- align-self: center;
73
- margin: 0;
74
- }
75
- </style>
@@ -1,174 +0,0 @@
1
- <template>
2
- <div
3
- class="wt-radio"
4
- :class="{
5
- 'wt-radio--active': isChecked,
6
- 'wt-radio--outline': outline,
7
- 'wt-radio--disabled': disabled,
8
- }"
9
- >
10
- <wt-label class="wt-radio__wrapper">
11
- <input
12
- class="wt-radio__input"
13
- type="radio"
14
- :value="value"
15
- :checked="isChecked"
16
- :disabled="disabled"
17
- @input="inputHandler"
18
- >
19
- <wt-icon class="wt-radio__icon" :icon="radioIcon"></wt-icon>
20
- <!-- @slot Custom input label -->
21
- <slot name="label" v-bind="{ label, isChecked, disabled }">
22
- <div v-if="label" class="wt-radio__label">{{ label }}</div>
23
- </slot>
24
- </wt-label>
25
- </div>
26
- </template>
27
-
28
- <script>
29
- export default {
30
- name: 'wt-radio',
31
- props: {
32
- // value, set by radio
33
- value: {
34
- type: [String, Number, Boolean, Object],
35
- default: '',
36
- },
37
- // currently selected value
38
- selected: {
39
- type: [String, Number, Boolean, Object],
40
- default: '',
41
- },
42
- label: {
43
- type: String,
44
- default: '',
45
- },
46
- required: {
47
- type: Boolean,
48
- default: false,
49
- },
50
- disabled: {
51
- type: Boolean,
52
- default: false,
53
- },
54
- outline: {
55
- type: Boolean,
56
- default: false,
57
- },
58
- },
59
- model: {
60
- prop: 'selected',
61
- event: 'input',
62
- },
63
- computed: {
64
- isChecked() {
65
- return this.value === this.selected;
66
- },
67
- radioIcon() {
68
- return this.isChecked ? 'radio--checked' : 'radio';
69
- },
70
- },
71
- methods: {
72
- inputHandler() {
73
- this.$emit('input', this.value);
74
- },
75
- },
76
- };
77
- </script>
78
-
79
- <style lang="scss" scoped>
80
- /* Customize the label (the container) */
81
- .wt-radio {
82
- @include width-fit-content;
83
- box-sizing: border-box;
84
-
85
- .wt-label {
86
- cursor: pointer;
87
- }
88
- }
89
-
90
- .wt-radio__wrapper {
91
- position: relative;
92
- display: flex;
93
- align-items: center;
94
- user-select: none;
95
- cursor: pointer;
96
- }
97
-
98
- .wt-radio__label {
99
- margin-left: var(--radio-icon-margin);
100
- transition: var(--transition);
101
- }
102
-
103
- /* Hide the browser's default radio button */
104
- .wt-radio__input {
105
- position: absolute;
106
- width: 0;
107
- height: 0;
108
- opacity: 0;
109
- pointer-events: none;
110
- }
111
-
112
- .wt-radio__icon {
113
- flex: 0 0 var(--icon-md-size);
114
- }
115
-
116
- .wt-radio:hover {
117
- .wt-radio__label {
118
- color: var(--form-label--hover-color);
119
- }
120
-
121
- ::v-deep .wt-icon__icon {
122
- fill: var(--icon-color--hover);
123
- }
124
- }
125
-
126
- .wt-radio--active {
127
- .wt-radio__label {
128
- color: var(--form-label--active-color);
129
- }
130
-
131
- ::v-deep .wt-icon__icon {
132
- fill: var(--icon-color-active);
133
- }
134
- }
135
-
136
- .wt-radio--outline {
137
- .wt-radio__label {
138
- color: var(--form-outline-label-color);
139
- }
140
-
141
- ::v-deep .wt-icon__icon {
142
- fill: var(--icon-outline-color);
143
- }
144
-
145
- &.wt-radio--active {
146
- .wt-radio__label {
147
- color: var(--form-label--active-color);
148
- }
149
-
150
- ::v-deep .wt-icon__icon {
151
- fill: var(--icon-outline--active-color);
152
- }
153
- }
154
-
155
- &:hover {
156
-
157
- ::v-deep .wt-icon__icon {
158
- fill: var(--icon-outline--hover-color);
159
- }
160
- }
161
- }
162
-
163
- .wt-radio--disabled {
164
- pointer-events: none;
165
-
166
- .wt-radio__label {
167
- color: var(--form-label--disabled-color);
168
- }
169
-
170
- ::v-deep .wt-icon__icon {
171
- fill: var(--icon-color-disabled);
172
- }
173
- }
174
- </style>
@@ -1,182 +0,0 @@
1
- <template>
2
- <div
3
- class="wt-switcher"
4
- :class="{
5
- 'wt-switcher--off': !value,
6
- 'wt-switcher--on': value,
7
- 'wt-switcher--disabled': disabled,
8
- }"
9
- >
10
- <wt-label
11
- class="wt-switcher__wrapper"
12
- :class="{'wt-switcher__wrapper--label-left': labelLeft}"
13
- v-bind="labelProps"
14
- >
15
- <input
16
- class="wt-switcher__input"
17
- type="checkbox"
18
- :checked="value"
19
- :disabled="disabled"
20
- @change="inputHandler"
21
- >
22
- <span class="wt-switcher__checkmark"></span>
23
- <!-- @slot Custom input label -->
24
- <slot name="label" v-bind="{ label, value, disabled }">
25
- <div v-if="label" class="wt-switcher__label">{{ label }}</div>
26
- </slot>
27
- </wt-label>
28
- </div>
29
- </template>
30
-
31
- <script>
32
- export default {
33
- name: 'wt-switcher',
34
- props: {
35
- value: {
36
- type: Boolean,
37
- default: false,
38
- },
39
- label: {
40
- type: String,
41
- default: '',
42
- },
43
- labelLeft: {
44
- type: Boolean,
45
- default: false,
46
- },
47
- disabled: {
48
- type: Boolean,
49
- default: false,
50
- },
51
- labelProps: {
52
- type: Object,
53
- description: 'Object with props, passed down to wt-label as props',
54
- },
55
- },
56
- model: {
57
- prop: 'value',
58
- event: 'change',
59
- },
60
- methods: {
61
- inputHandler() {
62
- this.$emit('change', !this.value);
63
- },
64
- },
65
- };
66
- </script>
67
-
68
- <style lang="scss" scoped>
69
- .wt-switcher {
70
- @include width-fit-content;
71
- position: relative;
72
- box-sizing: border-box;
73
-
74
- .wt-label {
75
- cursor: pointer;
76
- }
77
- }
78
-
79
- .wt-switcher__wrapper {
80
- position: relative;
81
- display: flex;
82
- align-items: center;
83
- user-select: none;
84
- cursor: pointer;
85
-
86
- &.wt-switcher__wrapper--label-left {
87
- flex-direction: row-reverse;
88
- }
89
- }
90
-
91
- .wt-switcher__label {
92
- margin-left: var(--switcher-icon-margin);
93
- transition: var(--transition);
94
-
95
- .wt-switcher__wrapper--label-left & {
96
- margin-left: 0;
97
- margin-right: var(--switcher-icon-margin);
98
- }
99
- .wt-switcher:hover & {
100
- color: var(--form-label--hover-color);
101
- }
102
- }
103
-
104
- .wt-switcher__input {
105
- position: absolute;
106
- width: 0;
107
- height: 0;
108
- opacity: 0;
109
- pointer-events: none;
110
- }
111
-
112
- .wt-switcher__checkmark {
113
- position: relative;
114
- display: block;
115
- flex: 0 0 var(--switcher-width);
116
- width: var(--switcher-width);
117
- height: var(--switcher-height);
118
- border-radius: var(--switcher-border-radius);
119
- transition: var(--transition);
120
-
121
- &:before {
122
- content: '';
123
- position: absolute;
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);
129
- border-radius: 50%;
130
- transition: var(--transition);
131
- }
132
- }
133
-
134
- .wt-switcher--off {
135
- .wt-switcher__checkmark {
136
- background: var(--switcher-bg-color--off);
137
- }
138
-
139
- &:hover {
140
- .wt-switcher__checkmark {
141
- background: var(--switcher-bg-color--off--hover);
142
- }
143
- }
144
-
145
- &.wt-switcher--disabled {
146
- .wt-switcher__checkmark {
147
- background: var(--switcher-bg-color--off--disabled);
148
- }
149
- }
150
- }
151
-
152
- .wt-switcher--on {
153
- .wt-switcher__checkmark {
154
- background: var(--switcher-bg-color--on);
155
-
156
- /* Show the indicator (dot/circle) when checked */
157
- &:before {
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);
171
- }
172
- }
173
- }
174
-
175
- .wt-switcher--disabled {
176
- pointer-events: none;
177
-
178
- .wt-switcher__label {
179
- color: var(--form-label--disabled-color);
180
- }
181
- }
182
- </style>