@voicenter-team/voicenter-ui-plus 0.0.1

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 (237) hide show
  1. package/README.md +35 -0
  2. package/library/favicon.ico +0 -0
  3. package/library/fonts/VC-icon.eot +0 -0
  4. package/library/fonts/VC-icon.svg +268 -0
  5. package/library/fonts/VC-icon.ttf +0 -0
  6. package/library/fonts/VC-icon.woff +0 -0
  7. package/library/icon-vc.css +753 -0
  8. package/library/images/logo-icon.svg +6 -0
  9. package/library/images/not-found.png +0 -0
  10. package/library/images/perfil.jpg +0 -0
  11. package/library/sound/test-audio.mp3 +0 -0
  12. package/library/style.css +1 -0
  13. package/library/super.mjs +24050 -0
  14. package/library/super.mjs.map +1 -0
  15. package/library/super.umd.js +37 -0
  16. package/library/super.umd.js.map +1 -0
  17. package/library/types/src/components/VcButton/VcButton.types.d.ts +5 -0
  18. package/library/types/src/components/VcButton/VcButton.vue.d.ts +94 -0
  19. package/library/types/src/components/VcButton/VcButtonIcon.vue.d.ts +89 -0
  20. package/library/types/src/components/VcCard/VcCard.vue.d.ts +23 -0
  21. package/library/types/src/components/VcCheckbox/VcCheckbox.vue.d.ts +133 -0
  22. package/library/types/src/components/VcCheckbox/VcCheckboxGroupEl.vue.d.ts +2 -0
  23. package/library/types/src/components/VcCheckbox/group.mixin.d.ts +60 -0
  24. package/library/types/src/components/VcCheckboxGroup/VcCheckboxGroup.vue.d.ts +140 -0
  25. package/library/types/src/components/VcCollapse/VcCollapse.vue.d.ts +33 -0
  26. package/library/types/src/components/VcCollapse/VcCollapseItem.vue.d.ts +106 -0
  27. package/library/types/src/components/VcCollapse/VcCollapseTransition.vue.d.ts +14 -0
  28. package/library/types/src/components/VcColorPicker/ColorPicker/ColorPicker.vue.d.ts +67 -0
  29. package/library/types/src/components/VcColorPicker/ColorPicker/Hue.vue.d.ts +40 -0
  30. package/library/types/src/components/VcColorPicker/ColorPicker/Saturation.vue.d.ts +49 -0
  31. package/library/types/src/components/VcColorPicker/ColorPicker/composible.d.ts +23 -0
  32. package/library/types/src/components/VcColorPicker/VcColorPicker.types.d.ts +10 -0
  33. package/library/types/src/components/VcColorPicker/VcColorPicker.vue.d.ts +65 -0
  34. package/library/types/src/components/VcDatetimeRangePicker/VcDatetimeRangePicker.types.d.ts +27 -0
  35. package/library/types/src/components/VcDatetimeRangePicker/VcDatetimeRangePicker.vue.d.ts +360 -0
  36. package/library/types/src/components/VcDelimitedList/VcDelimitedList.types.d.ts +4 -0
  37. package/library/types/src/components/VcDelimitedList/VcDelimitedList.vue.d.ts +92 -0
  38. package/library/types/src/components/VcExtendedDatetimeRangePicker/ExtendedDatetimeRangePickerPart.vue.d.ts +208 -0
  39. package/library/types/src/components/VcExtendedDatetimeRangePicker/ExtendedDatetimeRangePickerRelative.vue.d.ts +96 -0
  40. package/library/types/src/components/VcExtendedDatetimeRangePicker/VcExtendedDatetimeRangePicker.types.d.ts +11 -0
  41. package/library/types/src/components/VcExtendedDatetimeRangePicker/VcExtendedDatetimeRangePicker.vue.d.ts +276 -0
  42. package/library/types/src/components/VcExtendedDatetimeRangePicker/VcExtendedDatetimeRangePickerQuickOptionsSelection.vue.d.ts +51 -0
  43. package/library/types/src/components/VcExtendedDatetimeRangePicker/enum.d.ts +6 -0
  44. package/library/types/src/components/VcFileUploader/VcFileUploader.types.d.ts +4 -0
  45. package/library/types/src/components/VcFileUploader/VcFileUploader.vue.d.ts +388 -0
  46. package/library/types/src/components/VcForm/UiComponents/VcInputLabel.vue.d.ts +204 -0
  47. package/library/types/src/components/VcForm/VcForm.vue.d.ts +348 -0
  48. package/library/types/src/components/VcForm/VcFormItem.vue.d.ts +69 -0
  49. package/library/types/src/components/VcHyperLink/VcHyperLink.types.d.ts +2 -0
  50. package/library/types/src/components/VcHyperLink/VcHyperLink.vue.d.ts +54 -0
  51. package/library/types/src/components/VcIconPicker/VcIconPicker.types.d.ts +15 -0
  52. package/library/types/src/components/VcIconPicker/VcIconPicker.vue.d.ts +105 -0
  53. package/library/types/src/components/VcIconPicker/iconPicker.mixin.d.ts +51 -0
  54. package/library/types/src/components/VcInput/VcInput.types.d.ts +2 -0
  55. package/library/types/src/components/VcInput/VcInput.vue.d.ts +202 -0
  56. package/library/types/src/components/VcInputNumber/VcInputNumber.vue.d.ts +256 -0
  57. package/library/types/src/components/VcLoading/Loaders/Circles.vue.d.ts +28 -0
  58. package/library/types/src/components/VcLoading/Loaders/LdsSpinner.vue.d.ts +29 -0
  59. package/library/types/src/components/VcLoading/Loaders/LoadIcon.vue.d.ts +36 -0
  60. package/library/types/src/components/VcLoading/Loaders/Stretch.vue.d.ts +28 -0
  61. package/library/types/src/components/VcLoading/VcLoading.types.d.ts +1 -0
  62. package/library/types/src/components/VcLoading/VcLoading.vue.d.ts +66 -0
  63. package/library/types/src/components/VcModal/VcModal.types.d.ts +4 -0
  64. package/library/types/src/components/VcModal/VcModal.vue.d.ts +210 -0
  65. package/library/types/src/components/VcPagination/VcPagination.types.d.ts +4 -0
  66. package/library/types/src/components/VcPagination/VcPagination.vue.d.ts +64 -0
  67. package/library/types/src/components/VcPagination/VcPaginationButton.vue.d.ts +34 -0
  68. package/library/types/src/components/VcPopover/VcPopover.types.d.ts +3 -0
  69. package/library/types/src/components/VcPopover/VcPopover.vue.d.ts +150 -0
  70. package/library/types/src/components/VcProgress/VcProgress.types.d.ts +16 -0
  71. package/library/types/src/components/VcProgress/VcProgress.vue.d.ts +147 -0
  72. package/library/types/src/components/VcProgress/progress.options.d.ts +13 -0
  73. package/library/types/src/components/VcRadio/VcRadio.vue.d.ts +88 -0
  74. package/library/types/src/components/VcRadioGroup/VcRadioGroup.vue.d.ts +96 -0
  75. package/library/types/src/components/VcRadioTabs/UiComponents/VcRadioTabsNav.vue.d.ts +41 -0
  76. package/library/types/src/components/VcRadioTabs/VcRadioTabs.vue.d.ts +78 -0
  77. package/library/types/src/components/VcSelect/VcSelect.options.d.ts +78 -0
  78. package/library/types/src/components/VcSelect/VcSelect.vue.d.ts +293 -0
  79. package/library/types/src/components/VcSkeletonLoader/Loaders/Card.vue.d.ts +18 -0
  80. package/library/types/src/components/VcSkeletonLoader/Loaders/Circle.vue.d.ts +28 -0
  81. package/library/types/src/components/VcSkeletonLoader/Loaders/Row.vue.d.ts +18 -0
  82. package/library/types/src/components/VcSkeletonLoader/Loaders/Square.vue.d.ts +28 -0
  83. package/library/types/src/components/VcSkeletonLoader/Loaders/Text.vue.d.ts +16 -0
  84. package/library/types/src/components/VcSkeletonLoader/VcSkeletonLoader.types.d.ts +1 -0
  85. package/library/types/src/components/VcSkeletonLoader/VcSkeletonLoader.vue.d.ts +81 -0
  86. package/library/types/src/components/VcSoundplayer/VcSoundPlayer.types.d.ts +2 -0
  87. package/library/types/src/components/VcSoundplayer/VcSoundPlayer.vue.d.ts +130 -0
  88. package/library/types/src/components/VcSplitButton/VcSplitButton.types.d.ts +8 -0
  89. package/library/types/src/components/VcSplitButton/VcSplitButton.vue.d.ts +68 -0
  90. package/library/types/src/components/VcSwitch/VcSwitch.types.d.ts +1 -0
  91. package/library/types/src/components/VcSwitch/VcSwitch.vue.d.ts +151 -0
  92. package/library/types/src/components/VcTable/VcTable.types.d.ts +45 -0
  93. package/library/types/src/components/VcTable/VcTable.vue.d.ts +334 -0
  94. package/library/types/src/components/VcTable/tableOptions.d.ts +6 -0
  95. package/library/types/src/components/VcTabs/VcTabNav.vue.d.ts +54 -0
  96. package/library/types/src/components/VcTabs/VcTabPane.vue.d.ts +92 -0
  97. package/library/types/src/components/VcTabs/VcTabs.types.d.ts +14 -0
  98. package/library/types/src/components/VcTabs/VcTabs.vue.d.ts +62 -0
  99. package/library/types/src/components/VcTag/VcTag.types.d.ts +1 -0
  100. package/library/types/src/components/VcTag/VcTag.vue.d.ts +99 -0
  101. package/library/types/src/components/VcTagInput/VcTagInput.vue.d.ts +290 -0
  102. package/library/types/src/components/VcTimeInput/VcTimeInput.vue.d.ts +269 -0
  103. package/library/types/src/components/VcTree/VcTree.types.d.ts +36 -0
  104. package/library/types/src/components/VcTree/VcTree.vue.d.ts +209 -0
  105. package/library/types/src/components/VcTree/VcTreeNode.vue.d.ts +104 -0
  106. package/library/types/src/components/VcTree/VcTreeSelect.vue.d.ts +305 -0
  107. package/library/types/src/components/VcVerticalTabs/UiComponents/VerticalTabNav.vue.d.ts +54 -0
  108. package/library/types/src/components/VcVerticalTabs/VcVerticalTabs.vue.d.ts +76 -0
  109. package/library/types/src/components/VcViewSwitcher/VcViewSwitcher.vue.d.ts +74 -0
  110. package/library/types/src/components/VcWizard/VcSummaryProgress.vue.d.ts +55 -0
  111. package/library/types/src/components/VcWizard/VcSummaryStep.vue.d.ts +70 -0
  112. package/library/types/src/components/VcWizard/VcWizard.types.d.ts +15 -0
  113. package/library/types/src/components/VcWizard/VcWizard.vue.d.ts +157 -0
  114. package/library/types/src/components/VcWizard/VcWizardNavigation.vue.d.ts +110 -0
  115. package/library/types/src/components/VcWizard/VcWizardSummary.vue.d.ts +47 -0
  116. package/library/types/src/components/VcWizard/VcWizardTransition.vue.d.ts +83 -0
  117. package/library/types/src/components/index.d.ts +43 -0
  118. package/library/types/src/directives/resize.d.ts +6 -0
  119. package/library/types/src/entry.d.ts +2 -0
  120. package/library/types/src/entry.esm.d.ts +4 -0
  121. package/library/types/src/env.d.ts +18 -0
  122. package/library/types/src/localization/Localization.types.d.ts +17 -0
  123. package/library/types/src/localization/index.d.ts +9 -0
  124. package/library/types/src/mixins/common/appendTo.mixin.d.ts +19 -0
  125. package/library/types/src/mixins/defaultComponent.mixin.d.ts +14 -0
  126. package/library/types/src/mixins/input/baseInput.mixin.d.ts +100 -0
  127. package/library/types/src/mixins/input/color.mixin.d.ts +33 -0
  128. package/library/types/src/mixins/input/error.mixin.d.ts +23 -0
  129. package/library/types/src/mixins/input/input.mixin.d.ts +146 -0
  130. package/library/types/src/mixins/input/label.mixin.d.ts +52 -0
  131. package/library/types/src/mixins/optionMethods.mixin.d.ts +38 -0
  132. package/library/types/src/mixins/table/tableProps.mixin.d.ts +108 -0
  133. package/library/types/src/theme/index.d.ts +1 -0
  134. package/library/types/src/theme/theme.types.d.ts +6 -0
  135. package/library/types/src/types/AppendToTarget.types.d.ts +1 -0
  136. package/library/types/src/types/Entry.types.d.ts +6 -0
  137. package/library/types/src/types/OptionAndConfig.types.d.ts +23 -0
  138. package/library/types/src/types/VueGeneric.types.d.ts +1 -0
  139. package/library/types/src/utils/DomHandler.d.ts +5 -0
  140. package/library/types/src/utils/UniqueComponentId.d.ts +1 -0
  141. package/library/types/src/utils/ZIndexUtils.d.ts +12 -0
  142. package/library/types/src/utils/helpers.d.ts +6 -0
  143. package/library/types/src/utils/isValidTime.d.ts +2 -0
  144. package/package.json +66 -0
  145. package/src/assets/element/index.scss +161 -0
  146. package/src/assets/sass/main/_icons.scss +36 -0
  147. package/src/assets/sass/main/_loading.scss +51 -0
  148. package/src/assets/sass/main/_mixins.scss +339 -0
  149. package/src/assets/sass/main/_typography.scss +29 -0
  150. package/src/assets/sass/main.scss +9 -0
  151. package/src/components/VcButton/VcButton.scss +190 -0
  152. package/src/components/VcButton/VcButton.vue +117 -0
  153. package/src/components/VcButton/VcButtonIcon.scss +100 -0
  154. package/src/components/VcButton/VcButtonIcon.vue +97 -0
  155. package/src/components/VcCard/VcCard.vue +53 -0
  156. package/src/components/VcCheckbox/VcCheckbox.scss +66 -0
  157. package/src/components/VcCheckbox/VcCheckbox.vue +99 -0
  158. package/src/components/VcCheckbox/VcCheckboxGroupEl.vue +18 -0
  159. package/src/components/VcCheckboxGroup/VcCheckboxGroup.vue +164 -0
  160. package/src/components/VcCollapse/VcCollapse.vue +70 -0
  161. package/src/components/VcCollapse/VcCollapseItem.vue +229 -0
  162. package/src/components/VcCollapse/VcCollapseTransition.vue +78 -0
  163. package/src/components/VcColorPicker/ColorPicker/ColorPicker.vue +192 -0
  164. package/src/components/VcColorPicker/ColorPicker/Hue.vue +130 -0
  165. package/src/components/VcColorPicker/ColorPicker/Saturation.vue +146 -0
  166. package/src/components/VcColorPicker/VcColorPicker.vue +140 -0
  167. package/src/components/VcDatetimeRangePicker/VcDatetimeRangePicker.vue +474 -0
  168. package/src/components/VcDelimitedList/VcDelimitedList.vue +223 -0
  169. package/src/components/VcExtendedDatetimeRangePicker/ExtendedDatetimeRangePickerPart.vue +166 -0
  170. package/src/components/VcExtendedDatetimeRangePicker/ExtendedDatetimeRangePickerRelative.vue +180 -0
  171. package/src/components/VcExtendedDatetimeRangePicker/VcExtendedDatetimeRangePicker.vue +178 -0
  172. package/src/components/VcExtendedDatetimeRangePicker/VcExtendedDatetimeRangePickerQuickOptionsSelection.vue +128 -0
  173. package/src/components/VcFileUploader/VcFileUploader.vue +324 -0
  174. package/src/components/VcForm/Styles/VcInputLabel.scss +24 -0
  175. package/src/components/VcForm/UiComponents/VcInputError.vue +31 -0
  176. package/src/components/VcForm/UiComponents/VcInputLabel.vue +67 -0
  177. package/src/components/VcForm/VcForm.vue +88 -0
  178. package/src/components/VcForm/VcFormItem.vue +115 -0
  179. package/src/components/VcHyperLink/VcHyperLink.vue +83 -0
  180. package/src/components/VcIconPicker/VcIconPicker.vue +142 -0
  181. package/src/components/VcInput/VcInput.vue +220 -0
  182. package/src/components/VcInputNumber/VcInputNumber.vue +128 -0
  183. package/src/components/VcLoading/Loaders/Circles.vue +100 -0
  184. package/src/components/VcLoading/Loaders/LdsSpinner.vue +52 -0
  185. package/src/components/VcLoading/Loaders/LoadIcon.vue +56 -0
  186. package/src/components/VcLoading/Loaders/Stretch.vue +82 -0
  187. package/src/components/VcLoading/VcLoading.vue +159 -0
  188. package/src/components/VcModal/VcModal.scss +227 -0
  189. package/src/components/VcModal/VcModal.vue +384 -0
  190. package/src/components/VcNotification/VcNotification.vue +302 -0
  191. package/src/components/VcNotification/VcNotificationMessage.vue +119 -0
  192. package/src/components/VcPagination/VcPagination.vue +175 -0
  193. package/src/components/VcPagination/VcPaginationButton.vue +37 -0
  194. package/src/components/VcPopover/VcPopover.vue +186 -0
  195. package/src/components/VcProgress/VcProgress.vue +235 -0
  196. package/src/components/VcRadio/VcRadio.scss +59 -0
  197. package/src/components/VcRadio/VcRadio.vue +89 -0
  198. package/src/components/VcRadioGroup/VcRadioGroup.vue +146 -0
  199. package/src/components/VcRadioTabs/UiComponents/VcRadioTabsNav.vue +128 -0
  200. package/src/components/VcRadioTabs/VcRadioTabs.vue +151 -0
  201. package/src/components/VcSelect/VcSelect.scss +135 -0
  202. package/src/components/VcSelect/VcSelect.vue +191 -0
  203. package/src/components/VcSkeletonLoader/Loaders/Card.vue +79 -0
  204. package/src/components/VcSkeletonLoader/Loaders/Circle.vue +45 -0
  205. package/src/components/VcSkeletonLoader/Loaders/Row.vue +36 -0
  206. package/src/components/VcSkeletonLoader/Loaders/Square.vue +44 -0
  207. package/src/components/VcSkeletonLoader/Loaders/Text.vue +42 -0
  208. package/src/components/VcSkeletonLoader/VcSkeletonLoader.vue +111 -0
  209. package/src/components/VcSoundplayer/VcSoundPlayer.vue +497 -0
  210. package/src/components/VcSplitButton/VcSplitButton.vue +338 -0
  211. package/src/components/VcSwitch/VcSwitch.vue +352 -0
  212. package/src/components/VcTable/VcTable.vue +869 -0
  213. package/src/components/VcTabs/VcTabNav.scss +120 -0
  214. package/src/components/VcTabs/VcTabNav.vue +203 -0
  215. package/src/components/VcTabs/VcTabPane.vue +128 -0
  216. package/src/components/VcTabs/VcTabs.vue +186 -0
  217. package/src/components/VcTag/VcTag.vue +186 -0
  218. package/src/components/VcTagInput/VcTagInput.vue +280 -0
  219. package/src/components/VcTagInput/VcTagInputStyle.scss +224 -0
  220. package/src/components/VcTimeInput/VcTimeInput.vue +441 -0
  221. package/src/components/VcTree/VcTree.vue +410 -0
  222. package/src/components/VcTree/VcTreeNode.vue +283 -0
  223. package/src/components/VcTree/VcTreeSelect.vue +472 -0
  224. package/src/components/VcVerticalTabs/UiComponents/VerticalTabNav.vue +99 -0
  225. package/src/components/VcVerticalTabs/VcVerticalTabs.vue +125 -0
  226. package/src/components/VcViewSwitcher/VcViewSwitcher.vue +137 -0
  227. package/src/components/VcWizard/VcSummaryProgress.vue +193 -0
  228. package/src/components/VcWizard/VcSummaryStep.vue +172 -0
  229. package/src/components/VcWizard/VcWizard.vue +292 -0
  230. package/src/components/VcWizard/VcWizardNavigation.vue +196 -0
  231. package/src/components/VcWizard/VcWizardSummary.vue +73 -0
  232. package/src/components/VcWizard/VcWizardTransition.vue +119 -0
  233. package/src/theme/index.ts +47 -0
  234. package/src/theme/tailwindConfig.js +143 -0
  235. package/src/theme/tailwindScheme.js +9 -0
  236. package/src/theme/theme.types.ts +6 -0
  237. package/src/theme/themes.json +130 -0
@@ -0,0 +1,151 @@
1
+ <template>
2
+ <div class="vc-radio-tabs">
3
+ <div class="vc-radio-tabs__wrapper">
4
+ <div class="vc-radio-tabs__header">
5
+ <VcRadioTabsNav
6
+ :options="options"
7
+ :config="config"
8
+ :active-tab="modelValue"
9
+ @tab-click="onSetActiveTab"
10
+ />
11
+ </div>
12
+ <div class="vc-radio-tabs__content-wrapper">
13
+ <div class="vc-radio-tabs__content">
14
+ <template v-if="lazy">
15
+ <div class="vc-radio-tabs__content-tab">
16
+ <slot
17
+ :name="modelValue"
18
+ :tab="activeOption"
19
+ >
20
+ {{ activeOption }}
21
+ </slot>
22
+ </div>
23
+ </template>
24
+ <template v-else>
25
+ <div
26
+ v-for="(option, index) in options"
27
+ v-show="isActiveTab(option)"
28
+ :key="`tab-pane-${index}`"
29
+ class="vc-radio-tabs__content-tab"
30
+ >
31
+ <slot
32
+ :name="getSlotPaneName(option)"
33
+ :tab="option"
34
+ :index="index"
35
+ >
36
+ {{ option }}
37
+ </slot>
38
+ </div>
39
+ </template>
40
+ </div>
41
+ </div>
42
+ </div>
43
+ </div>
44
+ </template>
45
+
46
+ <script lang="ts">
47
+ import { defineComponent, PropType } from 'vue'
48
+ import { ConfigType, OptionType } from '@/types/OptionAndConfig.types'
49
+ import VcRadioTabsNav from '@/components/VcRadioTabs/UiComponents/VcRadioTabsNav.vue'
50
+
51
+ const DEFAULT_CONFIG = {
52
+ labelKey: 'name',
53
+ iconKey: 'icon',
54
+ keyKey: 'key'
55
+ } as ConfigType
56
+
57
+ export default defineComponent({
58
+ name: 'VcRadioTabs',
59
+ components: { VcRadioTabsNav },
60
+ props: {
61
+ modelValue: {
62
+ type: [String, Number],
63
+ required: true
64
+ },
65
+ config: {
66
+ type: Object as PropType<ConfigType>,
67
+ default: () => ({ ...DEFAULT_CONFIG })
68
+ },
69
+ options: {
70
+ type: Array as PropType<OptionType[]>,
71
+ default: () => ([] as OptionType[])
72
+ },
73
+ lazy: {
74
+ type: Boolean,
75
+ default: false
76
+ }
77
+ },
78
+ emits: ['update:modelValue', 'change'],
79
+ computed: {
80
+ activeOption (): OptionType | null | undefined {
81
+ if (this.modelValue) {
82
+ return this.options?.find((item: OptionType) => {
83
+ if (typeof item === 'object') {
84
+ return item[this.config?.keyKey || 'key'] === this.modelValue
85
+ }
86
+ return item === this.modelValue
87
+ })
88
+ }
89
+ return null
90
+ }
91
+ },
92
+ mounted () {
93
+ if (!this.modelValue && this.options?.length) {
94
+ const option = this.options[0]
95
+ this.updateModelValue(option)
96
+ }
97
+ },
98
+ methods: {
99
+ onSetActiveTab (data: OptionType): void {
100
+ this.updateModelValue(data)
101
+ this.$emit('change', data)
102
+ },
103
+ updateModelValue (data: OptionType): void {
104
+ if (typeof data === 'object') {
105
+ const _key = this.config.keyKey || 'key'
106
+ this.$emit('update:modelValue', data[_key])
107
+ } else {
108
+ this.$emit('update:modelValue', data)
109
+ }
110
+ },
111
+ getSlotPaneName (option: OptionType): string | number | unknown {
112
+ if (typeof option === 'object') {
113
+ const _key = this.config.keyKey || 'key'
114
+ return option[_key]
115
+ }
116
+ return option
117
+ },
118
+ isActiveTab (data: OptionType): boolean {
119
+ if (typeof data === 'object') {
120
+ const _key = this.config.keyKey || 'key'
121
+ return this.modelValue === data[_key]
122
+ }
123
+
124
+ return this.modelValue === data
125
+ }
126
+ }
127
+ })
128
+ </script>
129
+
130
+ <style lang="scss" scoped>
131
+ .vc-radio-tabs {
132
+ @apply box-border w-full h-0.5 overflow-hidden max-w-full border border-secondary-actions rounded-lg;
133
+ min-height: 16rem;
134
+ &__wrapper {
135
+ @apply flex flex-col w-full h-full;
136
+ }
137
+ &__header {
138
+ @apply h-1 mb-0 relative;
139
+ min-height: 3.5rem;
140
+ }
141
+ &__content-wrapper {
142
+ @apply flex-grow overflow-hidden;
143
+ }
144
+ &__content {
145
+ @apply w-full h-full p-6;
146
+ }
147
+ &__content-tab {
148
+ @apply w-full h-full;
149
+ }
150
+ }
151
+ </style>
@@ -0,0 +1,135 @@
1
+ $colorFocus: var(--active-elements--focus);
2
+
3
+ @mixin ElSelectColorScheme($color) {
4
+ &.vc-select--#{$color} {
5
+ --el-select-close-hover-color: var(--#{$color}-actions--focus);
6
+ --el-select-input-focus-border-color: var(--#{$color}-actions--focus);
7
+ .el-input {
8
+ .el-input__prefix {
9
+ --el-input-icon-color: var(--#{$color}-actions);
10
+ }
11
+ .el-select__icon {
12
+ @apply text-#{$color}-actions;
13
+ }
14
+ .el-input__wrapper {
15
+ &.is-focus {
16
+ @apply border-#{$color}-actions--focus;
17
+ &:hover {
18
+ box-shadow: 0 0 3px var(--#{$color}-actions--focus) !important;
19
+ }
20
+ }
21
+ &:hover {
22
+ box-shadow: 0 0 3px var(--#{$color}-actions--focus) !important;
23
+ }
24
+ }
25
+ &.is-focus {
26
+ .el-input__wrapper {
27
+ @apply border-#{$color}-actions--focus;
28
+ }
29
+ }
30
+ }
31
+ }
32
+ }
33
+
34
+ @mixin ElSelectDropdownColorScheme($color, $suffix: false) {
35
+ &.color--#{$color} {
36
+ @if ($suffix) {
37
+ .vc-select__option-icon {
38
+ @apply text-#{$color}-#{$suffix};
39
+ }
40
+ } @else {
41
+ .vc-select__option-icon {
42
+ @apply text-#{$color};
43
+ }
44
+ }
45
+
46
+ }
47
+ }
48
+
49
+ .el-select.vc-select {
50
+ @apply w-full text-sm;
51
+
52
+ .el-input {
53
+ .el-input__prefix {
54
+ --el-input-icon-color: var(--active-elements);
55
+ }
56
+ .el-input__prefix-inner {
57
+ & > :last-child {
58
+ @apply ltr:mr-2 rtl:mr-0 rtl:ml-2;
59
+ }
60
+ }
61
+ .el-select__icon {
62
+ @apply text-active-elements;
63
+ }
64
+ .el-input__wrapper {
65
+ @apply py-0 px-1 border border-field-borders;
66
+ box-shadow: none !important;
67
+ &.is-focus {
68
+ @apply border-active-elements--focus;
69
+ &:hover {
70
+ box-shadow: 0 0 3px var(--active-elements--focus) !important;
71
+ }
72
+ }
73
+ &:hover {
74
+ box-shadow: 0 0 3px var(--active-elements--focus) !important;
75
+ }
76
+ }
77
+ &.is-focus {
78
+ .el-input__wrapper {
79
+ @apply border-active-elements--focus;
80
+ box-shadow: none !important;
81
+ }
82
+ }
83
+ }
84
+ .el-select__tags:hover + .el-input .el-input__wrapper {
85
+ box-shadow: 0 0 3px var(--active-elements--focus) !important;
86
+ }
87
+
88
+ @include ElSelectColorScheme(primary);
89
+ @include ElSelectColorScheme(secondary);
90
+ @include ElSelectColorScheme(destructive);
91
+ @include ElSelectColorScheme(success);
92
+ @include ElSelectColorScheme(warning);
93
+
94
+ .el-input {
95
+ &.is-disabled {
96
+ .el-input__prefix {
97
+ --el-input-icon-color: var(--inactive-elements);
98
+ }
99
+ .el-select__icon {
100
+ @apply text-inactive-elements;
101
+ }
102
+ .el-input__wrapper {
103
+ &:hover {
104
+ box-shadow: none !important;
105
+ }
106
+ }
107
+ }
108
+ }
109
+ }
110
+ .vc-select__dropdown, .vc-select__dropdown.is-multiple {
111
+ .vc-select__option-content {
112
+ @apply flex items-center;
113
+ }
114
+ .vc-select__option-icon {
115
+ @apply ltr:mr-2 rtl:ml-2 text-active-elements;
116
+ }
117
+ .el-select-dropdown__item {
118
+ @apply px-2;
119
+ &:not(:last-child) {
120
+ @apply border-b border-ui-lines;
121
+ }
122
+ }
123
+ .el-select-dropdown__item.selected, .el-select-dropdown__item.is--selected {
124
+ @apply font-medium text-active-elements;
125
+ &:after {
126
+ @apply bg-active-elements;
127
+ }
128
+ }
129
+
130
+ @include ElSelectDropdownColorScheme(primary);
131
+ @include ElSelectDropdownColorScheme(secondary, actions);
132
+ @include ElSelectDropdownColorScheme(destructive, actions);
133
+ @include ElSelectDropdownColorScheme(success);
134
+ @include ElSelectDropdownColorScheme(warning);
135
+ }
@@ -0,0 +1,191 @@
1
+ <template>
2
+ <el-select
3
+ :id="id"
4
+ ref="select"
5
+ v-model="selectModel"
6
+ :clearable="clearable"
7
+ :data-test-name="dataTestName"
8
+ :disabled="disabled"
9
+ :filterable="filterable"
10
+ :filter-method="filterMethod"
11
+ :loading="loading"
12
+ :multiple="multiple"
13
+ :no-data-text="emptyText"
14
+ :placeholder="placeholder"
15
+ :remote="!!(remoteMethod)"
16
+ :remote-method="remoteMethod"
17
+ :size="size"
18
+ :teleported="teleported"
19
+ :name="name"
20
+ :value-key="optionValueKey"
21
+ :reserve-keyword="multiple || filterable"
22
+ :class="inputClasses"
23
+ :popper-class="popperClass"
24
+ :clear-icon="clearIcon"
25
+ collapse-tags
26
+ collapse-tags-tooltip
27
+ class="vc-select"
28
+ v-bind="$attrs"
29
+ @visible-change="onVisibleChange"
30
+ @remove-tag="onRemoveTag"
31
+ @clear="onClear"
32
+ @blur="onBlur"
33
+ @focus="onFocus"
34
+ >
35
+ <template
36
+ v-if="prefixIcon || $slots['prefix-icon']"
37
+ #prefix
38
+ >
39
+ <slot name="prefix-icon">
40
+ <i
41
+ :class="prefixClasses"
42
+ :style="prefixStyle"
43
+ class="vc-select__prefix-icon"
44
+ />
45
+ </slot>
46
+ </template>
47
+ <el-option
48
+ v-for="item in selectOptions"
49
+ :key="item[optionValueKey]"
50
+ :value="item[optionValueKey]"
51
+ :label="item[optionLabelKey]"
52
+ :disabled="typeof config.disabledKey === 'string' && item[config.disabledKey]"
53
+ :class="{'is--selected': isSelectedClass(item)}"
54
+ @click="onOptionClick(item)"
55
+ >
56
+ <slot
57
+ name="option"
58
+ :option="item"
59
+ >
60
+ <div
61
+ class="vc-select__option-content"
62
+ >
63
+ <i
64
+ v-if="item[optionIconKey]"
65
+ :class="item[optionIconKey]"
66
+ :style="getIconStyle(item)"
67
+ class="vc-select__option-icon"
68
+ />
69
+ {{ item[optionLabelKey] }}
70
+ </div>
71
+ </slot>
72
+ </el-option>
73
+ </el-select>
74
+ </template>
75
+
76
+ <script lang="ts">
77
+ import { defineComponent, h, StyleValue } from 'vue'
78
+ import { ElOption, ElSelect } from 'element-plus'
79
+ import baseInputMixin from '@/mixins/input/baseInput.mixin'
80
+ import { SelectComputedOptionType, SelectModelType, SelectProps } from '@/components/VcSelect/VcSelect.options'
81
+
82
+ const DEFAULT_KEY = 'value'
83
+ const DEFAULT_LABEL = 'label'
84
+ const DEFAULT_ICON = 'icon'
85
+
86
+ export default defineComponent({
87
+ name: 'VcSelect',
88
+ components: { ElSelect, ElOption },
89
+ mixins: [baseInputMixin],
90
+ props: { ...SelectProps },
91
+ emits: [
92
+ 'update:modelValue',
93
+ 'update:visible',
94
+ 'remove-tag',
95
+ 'clear',
96
+ 'blur',
97
+ 'focus',
98
+ 'option:click',
99
+ 'change'
100
+ ],
101
+ data () {
102
+ return {
103
+ colorClass: 'vc-select--'
104
+ }
105
+ },
106
+ computed: {
107
+ clearIcon () {
108
+ return h('i', {
109
+ class: 'vc-icon-close icon-xs'
110
+ })
111
+ },
112
+ selectModel: {
113
+ get (): SelectModelType {
114
+ return this.modelValue
115
+ },
116
+ set (val: SelectModelType) {
117
+ this.$emit('update:modelValue', val)
118
+ this.onModelChange(val)
119
+ }
120
+ },
121
+ selectOptions (): SelectComputedOptionType[] {
122
+ return this.options.map((item: SelectModelType) => {
123
+ if (typeof item !== 'object') {
124
+ return {
125
+ [this.optionValueKey]: item,
126
+ [this.optionLabelKey]: item
127
+ }
128
+ }
129
+
130
+ return { ...item }
131
+ })
132
+ },
133
+ optionValueKey (): string {
134
+ return this.valueKey || this.config.valueKey || DEFAULT_KEY
135
+ },
136
+ optionLabelKey (): string {
137
+ return this.config.labelKey || DEFAULT_LABEL
138
+ },
139
+ optionIconKey (): string {
140
+ return this.config?.iconKey || DEFAULT_ICON
141
+ },
142
+ popperClass (): string {
143
+ return this.color ? ['vc-select__dropdown', `color--${this.color}`].join(' ') : 'vc-select__dropdown'
144
+ }
145
+ },
146
+ methods: {
147
+ getIconStyle (item: SelectComputedOptionType) {
148
+ if (typeof this.config.optionIconStyleKey === 'string') {
149
+ return item[this.config.optionIconStyleKey] as StyleValue
150
+ }
151
+ },
152
+ onModelChange (val: SelectModelType): void {
153
+ if (this.multiple && Array.isArray(val)) {
154
+ const options = this.selectOptions.filter(item => val.includes(item[this.optionValueKey]))
155
+ this.$emit('change', options)
156
+ } else {
157
+ const option = this.selectOptions.find(item => item[this.optionValueKey] === val)
158
+ this.$emit('change', option)
159
+ }
160
+ },
161
+ onVisibleChange (status: boolean): void {
162
+ this.$emit('update:visible', status)
163
+ },
164
+ onRemoveTag (value: SelectModelType): void {
165
+ this.$emit('remove-tag', value)
166
+ },
167
+ onClear (): void {
168
+ this.$emit('clear')
169
+ },
170
+ onBlur (event: Event): void {
171
+ this.$emit('blur', event)
172
+ },
173
+ onFocus (event: Event): void {
174
+ this.$emit('focus', event)
175
+ },
176
+ onOptionClick (option: unknown): void {
177
+ this.$emit('option:click', option)
178
+ },
179
+ isSelectedClass (item: SelectComputedOptionType): boolean {
180
+ if (this.multiple) {
181
+ return false
182
+ }
183
+ return this.selectModel === item[this.optionValueKey]
184
+ }
185
+ }
186
+ })
187
+ </script>
188
+
189
+ <style lang="scss">
190
+ @import "VcSelect";
191
+ </style>
@@ -0,0 +1,79 @@
1
+ <template>
2
+ <div class="vc-loader__card">
3
+ <div
4
+ :style="[phRowHeight]"
5
+ class="ph-row flex justify-between items-center mb-10"
6
+ >
7
+ <div class="ph-cell w-5/12" />
8
+ <div class="ph-cell empty" />
9
+ <div class="ph-cell mini" />
10
+ <div class="ph-cell mini" />
11
+ </div>
12
+ <div
13
+ :style="[phRowHeight]"
14
+ class="ph-row flex justify-between items-center mb-4"
15
+ >
16
+ <div class="ph-cell w-8/12" />
17
+ </div>
18
+ <div
19
+ :style="[phRowHeight]"
20
+ class="ph-row flex justify-between items-center mb-4"
21
+ >
22
+ <div class="ph-cell w-10/12" />
23
+ </div>
24
+ <div
25
+ :style="[phRowHeight]"
26
+ class="ph-row flex justify-between items-center"
27
+ >
28
+ <div class="ph-cell w-6/12" />
29
+ </div>
30
+ </div>
31
+ </template>
32
+
33
+ <script lang="ts">
34
+ import { defineComponent } from 'vue'
35
+
36
+ const DEFAULT_HEIGHT_ROW = '25px'
37
+
38
+ export default defineComponent({
39
+ name: 'Card',
40
+ props: {
41
+ rowHeight: {
42
+ type: [Number, String],
43
+ default: undefined
44
+ }
45
+ },
46
+ computed: {
47
+ phRowHeight () {
48
+ const height = this.rowHeight || DEFAULT_HEIGHT_ROW
49
+ return {
50
+ height
51
+ }
52
+ }
53
+ }
54
+ })
55
+ </script>
56
+
57
+ <style lang="scss" scoped>
58
+ .vc-loader__card {
59
+ @apply rounded bg-white p-4 h-full;
60
+ min-height: 204px;
61
+
62
+ .ph-row {
63
+ .ph-cell {
64
+ @apply h-full rounded-xs bg-skeleton-loader;
65
+
66
+ &:not(:first-child) {
67
+ @apply ml-4;
68
+ }
69
+ &.mini {
70
+ @apply flex-shrink-0;
71
+ width: 3.125rem;
72
+ }
73
+ &.empty {
74
+ @apply bg-white flex-grow;
75
+ }
76
+ }
77
+ }
78
+ }
79
+ </style>
@@ -0,0 +1,45 @@
1
+ <template>
2
+ <div
3
+ v-for="item in cols"
4
+ :key="item"
5
+ :style="phRowHeight"
6
+ class="ph-circle"
7
+ />
8
+ </template>
9
+
10
+ <script lang="ts">
11
+ import { defineComponent } from 'vue'
12
+
13
+ const DEFAULT_SIZE = '25px'
14
+
15
+ export default defineComponent({
16
+ // eslint-disable-next-line vue/no-reserved-component-names
17
+ name: 'Circle',
18
+ props: {
19
+ rowHeight: {
20
+ type: [Number, String],
21
+ default: undefined
22
+ },
23
+ cols: {
24
+ type: Number,
25
+ default: 1
26
+ }
27
+ },
28
+ computed: {
29
+ phRowHeight () {
30
+ const height = this.rowHeight || DEFAULT_SIZE
31
+ const width = this.rowHeight || DEFAULT_SIZE
32
+ return {
33
+ height,
34
+ width
35
+ }
36
+ }
37
+ }
38
+ })
39
+ </script>
40
+
41
+ <style lang="scss" scoped>
42
+ .ph-circle {
43
+ @apply rounded-full bg-skeleton-loader;
44
+ }
45
+ </style>
@@ -0,0 +1,36 @@
1
+ <template>
2
+ <div
3
+ :style="[phRowHeight]"
4
+ class="ph-row w-full"
5
+ />
6
+ </template>
7
+
8
+ <script lang="ts">
9
+ import { defineComponent } from 'vue'
10
+
11
+ const DEFAULT_HEIGHT_ROW = '100%'
12
+
13
+ export default defineComponent({
14
+ name: 'Row',
15
+ props: {
16
+ rowHeight: {
17
+ type: [Number, String],
18
+ default: undefined
19
+ }
20
+ },
21
+ computed: {
22
+ phRowHeight () {
23
+ const height = this.rowHeight || DEFAULT_HEIGHT_ROW
24
+ return {
25
+ height
26
+ }
27
+ }
28
+ }
29
+ })
30
+ </script>
31
+
32
+ <style lang="scss" scoped>
33
+ .ph-row {
34
+ @apply rounded-xs bg-skeleton-loader;
35
+ }
36
+ </style>
@@ -0,0 +1,44 @@
1
+ <template>
2
+ <div
3
+ v-for="item in cols"
4
+ :key="item"
5
+ :style="phRowHeight"
6
+ class="ph-block"
7
+ />
8
+ </template>
9
+
10
+ <script lang="ts">
11
+ import { defineComponent } from 'vue'
12
+
13
+ const DEFAULT_SIZE = '25px'
14
+
15
+ export default defineComponent({
16
+ name: 'Square',
17
+ props: {
18
+ rowHeight: {
19
+ type: [Number, String],
20
+ default: undefined
21
+ },
22
+ cols: {
23
+ type: Number,
24
+ default: 1
25
+ }
26
+ },
27
+ computed: {
28
+ phRowHeight () {
29
+ const height = this.rowHeight || DEFAULT_SIZE
30
+ const width = this.rowHeight || DEFAULT_SIZE
31
+ return {
32
+ height,
33
+ width
34
+ }
35
+ }
36
+ }
37
+ })
38
+ </script>
39
+
40
+ <style lang="scss" scoped>
41
+ .ph-block {
42
+ @apply bg-skeleton-loader rounded-xs;
43
+ }
44
+ </style>