@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,100 @@
1
+ $transition: all .28s ease;
2
+
3
+ @mixin colorActions($color) {
4
+ &-color--#{$color} {
5
+ @apply text-#{$color}-actions;
6
+ .vc-button--content, .content-icon {
7
+ @apply text-#{$color}-actions;
8
+ }
9
+
10
+ &:not(.vc-button--disabled) {
11
+ &:hover, &:focus {
12
+ .vc-button--content, .content-icon {
13
+ @apply text-#{$color}-actions--focus;
14
+ }
15
+ }
16
+
17
+ &:active {
18
+ .vc-button--content, .content-icon {
19
+ @apply text-#{$color}-actions--pressed;
20
+ }
21
+ }
22
+
23
+ &:not(.vc-button-icon--disabled):not(.vc-button-icon-type--hoverless) {
24
+ &:hover, &:focus {
25
+ @apply bg-#{$color}-actions-bg--focus;
26
+ }
27
+
28
+ &:active {
29
+ @apply bg-#{$color}-actions-bg--pressed;
30
+ }
31
+ }
32
+ }
33
+ }
34
+ }
35
+
36
+ .vc-button-icon {
37
+ @apply
38
+ relative
39
+ inline-flex
40
+ items-center
41
+ cursor-pointer
42
+ bg-transparent
43
+ text-center
44
+ outline-none
45
+ text-current
46
+ rounded-sm;
47
+ transition: $transition;
48
+ height: max-content;
49
+
50
+ .vc-button--content {
51
+ @apply flex text-center items-center flex-grow flex-shrink-0 whitespace-nowrap;
52
+ transition: $transition;
53
+ }
54
+
55
+ .vc-button--content, .content-icon {
56
+ @apply text-lg text-current;
57
+ line-height: 1;
58
+ }
59
+
60
+ &-type--default, &-type--hoverless {
61
+ @apply p-1;
62
+ }
63
+
64
+ &-type--outline {
65
+ @apply border-2 p-2.5 text-current border-current;
66
+ .vc-button--content, .content-icon {
67
+ @apply text-base;
68
+ }
69
+
70
+ &.is--small {
71
+ @apply border p-2;
72
+ .content-icon {
73
+ @apply text-sm;
74
+ }
75
+ }
76
+ }
77
+
78
+ @include colorActions(primary);
79
+ @include colorActions(secondary);
80
+ @include colorActions(destructive);
81
+ @include colorActions(warning);
82
+ @include colorActions(success);
83
+
84
+ &--disabled, &:disabled {
85
+ @apply opacity-50 cursor-not-allowed;
86
+ }
87
+
88
+ &.is--animate:not(&--disabled) {
89
+ .content-icon {
90
+ transform: rotate(0);
91
+ }
92
+
93
+ &:hover {
94
+ .content-icon {
95
+ transition: transform 500ms linear;
96
+ transform: rotate(180deg);
97
+ }
98
+ }
99
+ }
100
+ }
@@ -0,0 +1,97 @@
1
+ <template>
2
+ <button
3
+ class="vc-button-icon"
4
+ :disabled="disabled"
5
+ :class="classes"
6
+ :aria-disabled="disabled"
7
+ :type="buttonType"
8
+ @click="handleClick"
9
+ >
10
+ <span class="vc-button--content">
11
+ <i
12
+ v-if="icon"
13
+ :class="icon"
14
+ class="content-icon"
15
+ />
16
+ </span>
17
+ </button>
18
+ </template>
19
+
20
+ <script lang="ts">
21
+ import { defineComponent, PropType } from 'vue'
22
+ import { ButtonIconType, ButtonColor, ButtonElementType } from './VcButton.types'
23
+
24
+ const DEFAULT_TYPE = 'default'
25
+ const DEFAULT_COLOR = 'primary'
26
+
27
+ const CLASS_DISABLED = 'vc-button-icon--disabled'
28
+ const CLASS_ANIMATION = 'is--animate'
29
+ const CLASS_SMALL = 'is--small'
30
+ const CLASS_FOR_TYPE = 'vc-button-icon-type--'
31
+ const CLASS_FOR_COLOR = 'vc-button-icon-color--'
32
+
33
+ export default defineComponent({
34
+ name: 'VcButtonIcon',
35
+ props: {
36
+ type: {
37
+ type: String as PropType<ButtonIconType>,
38
+ default: DEFAULT_TYPE
39
+ },
40
+ color: {
41
+ type: String as PropType<ButtonColor>,
42
+ default: DEFAULT_COLOR
43
+ },
44
+ icon: {
45
+ type: String,
46
+ default: 'vc-icon-settings'
47
+ },
48
+ disabled: {
49
+ type: Boolean,
50
+ default: false
51
+ },
52
+ dataTestName: {
53
+ type: String,
54
+ default: 'vc-button'
55
+ },
56
+ buttonType: {
57
+ type: String as PropType<ButtonElementType>,
58
+ default: 'button'
59
+ },
60
+ animate: {
61
+ type: Boolean,
62
+ default: false
63
+ },
64
+ small: {
65
+ type: Boolean,
66
+ default: false
67
+ }
68
+ },
69
+ emits: ['click'],
70
+ computed: {
71
+ classes () {
72
+ const typeClass = CLASS_FOR_TYPE + this.type
73
+ const colorClass = CLASS_FOR_COLOR + this.color
74
+ return [
75
+ typeClass,
76
+ colorClass,
77
+ {
78
+ [CLASS_DISABLED]: this.disabled,
79
+ [CLASS_ANIMATION]: this.animate,
80
+ [CLASS_SMALL]: this.small
81
+ }
82
+ ]
83
+ }
84
+ },
85
+ methods: {
86
+ handleClick (evt: MouseEvent): void {
87
+ if (!this.disabled) {
88
+ this.$emit('click', evt)
89
+ }
90
+ }
91
+ }
92
+ })
93
+ </script>
94
+
95
+ <style lang="scss" scoped>
96
+ @import "VcButtonIcon";
97
+ </style>
@@ -0,0 +1,53 @@
1
+ <template>
2
+ <div
3
+ :class="{
4
+ 'vc-card--hover': hovered
5
+ }"
6
+ class="vc-card"
7
+ >
8
+ <div class="vc-card-content">
9
+ <slot />
10
+ </div>
11
+ </div>
12
+ </template>
13
+
14
+ <script lang="ts">
15
+ import { defineComponent } from 'vue'
16
+
17
+ export default defineComponent({
18
+ name: 'VcCard',
19
+ props: {
20
+ hovered: {
21
+ type: Boolean,
22
+ default: false
23
+ },
24
+ dataTestName: {
25
+ type: String,
26
+ default: 'vc-card'
27
+ }
28
+ }
29
+ })
30
+ </script>
31
+
32
+ <style lang="scss" scoped>
33
+ .vc-card {
34
+ @apply
35
+ relative
36
+ w-full
37
+ bg-white
38
+ rounded-md
39
+ shadow-card;
40
+
41
+ &--hover {
42
+ @apply
43
+ transition-all
44
+ duration-300
45
+ ease-in
46
+ md:hover:shadow-hover-outer cursor-pointer;
47
+ }
48
+
49
+ .vc-card-content {
50
+ @apply h-full w-full;
51
+ }
52
+ }
53
+ </style>
@@ -0,0 +1,66 @@
1
+ @mixin colorSchemeCheckbox ($colorName) {
2
+ &.vc-checkbox-color--#{$colorName}:not(.is-disabled) {
3
+ --el-checkbox-input-border-color-hover: var(--#{$colorName}-actions);
4
+ --el-checkbox-checked-bg-color: var(--#{$colorName}-actions);
5
+ --el-checkbox-checked-input-border-color: var(--#{$colorName}-actions);
6
+ &:not(.is-bordered):not(.is-disabled):hover {
7
+ .el-checkbox__inner {
8
+ @apply shadow-hover-outer-#{$colorName};
9
+ }
10
+ }
11
+ &.is-bordered {
12
+ &:not(.is-disabled).is-checked {
13
+ @apply border-#{$colorName}-actions;
14
+ }
15
+ &:not(.is-disabled):hover {
16
+ @apply shadow-hover-outer-#{$colorName};
17
+ }
18
+ }
19
+ }
20
+ }
21
+
22
+ .vc-checkbox, .el-checkbox {
23
+ @apply ltr:mr-8 rtl:ml-8 rtl:mr-0;
24
+ &:last-of-type {
25
+ @apply ltr:mr-0 rtl:ml-0 rtl:mr-0;
26
+ }
27
+ .el-checkbox__label {
28
+ @apply ltr:pl-3 rtl:pr-3;
29
+ }
30
+ .el-checkbox__input.is-indeterminate {
31
+ .el-checkbox__inner:before {
32
+ height: 6px;
33
+ transform: scale(.75);
34
+ }
35
+ }
36
+ .el-checkbox__inner {
37
+ &:after {
38
+ border-width: 4px;
39
+ height: 8px;
40
+ width: 4px;
41
+ top: 0;
42
+ }
43
+ }
44
+ &.is-disabled {
45
+ @apply cursor-not-allowed;
46
+ }
47
+ &:not(.is-bordered):not(.is-disabled):hover {
48
+ .el-checkbox__inner {
49
+ @apply shadow-hover-outer-active;
50
+ }
51
+ }
52
+ &.is-bordered {
53
+ &:not(.is-disabled).is-checked {
54
+ @apply border-active-elements;
55
+ }
56
+ &:not(.is-disabled):hover {
57
+ @apply shadow-hover-outer-active;
58
+ }
59
+ }
60
+
61
+ @include colorSchemeCheckbox(primary);
62
+ @include colorSchemeCheckbox(secondary);
63
+ @include colorSchemeCheckbox(destructive);
64
+ @include colorSchemeCheckbox(success);
65
+ @include colorSchemeCheckbox(warning);
66
+ }
@@ -0,0 +1,99 @@
1
+ <template>
2
+ <el-checkbox
3
+ :model-value="modelValue"
4
+ :checked="checked"
5
+ :indeterminate="indeterminate"
6
+ :border="border"
7
+ :label="label"
8
+ :true-label="trueLabel"
9
+ :false-label="falseLabel"
10
+ :disabled="disabled"
11
+ :name="name"
12
+ :class="inputClasses"
13
+ text-color="red"
14
+ class="vc-checkbox"
15
+ @click="onClick"
16
+ @change="onChange"
17
+ >
18
+ <slot />
19
+ </el-checkbox>
20
+ </template>
21
+
22
+ <script lang="ts">
23
+ import { ElCheckbox } from 'element-plus'
24
+ import { defineComponent } from 'vue'
25
+ import color from '@/mixins/input/color.mixin'
26
+
27
+ export default defineComponent({
28
+ name: 'VcCheckbox',
29
+ components: { ElCheckbox },
30
+ mixins: [color],
31
+ props: {
32
+ modelValue: {
33
+ type: [String, Number, Boolean],
34
+ default: undefined
35
+ },
36
+ label: {
37
+ type: [String, Number, Boolean, Object],
38
+ default: undefined
39
+ },
40
+ trueLabel: {
41
+ type: [String, Number],
42
+ default: undefined
43
+ },
44
+ falseLabel: {
45
+ type: [String, Number],
46
+ default: undefined
47
+ },
48
+ disabled: {
49
+ type: Boolean,
50
+ default: false
51
+ },
52
+ border: {
53
+ type: Boolean,
54
+ default: false
55
+ },
56
+ checked: {
57
+ type: Boolean,
58
+ default: false
59
+ },
60
+ indeterminate: {
61
+ type: Boolean,
62
+ default: false
63
+ },
64
+ name: {
65
+ type: String,
66
+ default: undefined
67
+ },
68
+ handUpdate: {
69
+ type: Boolean,
70
+ default: false
71
+ }
72
+ },
73
+ emits: ['update:modelValue', 'change', 'update:checked'],
74
+ data () {
75
+ return {
76
+ colorClass: 'vc-checkbox-color--'
77
+ }
78
+ },
79
+ methods: {
80
+ onChange (value: string | number | boolean): void {
81
+ if (this.modelValue !== undefined) {
82
+ this.$emit('update:modelValue', value)
83
+ }
84
+ this.$emit('change', value)
85
+ },
86
+ onClick (event: Event): void {
87
+ if (this.handUpdate) {
88
+ event.preventDefault()
89
+ this.$emit('update:checked', this.modelValue)
90
+ }
91
+ }
92
+ }
93
+ })
94
+
95
+ </script>
96
+
97
+ <style lang="scss">
98
+ @import "VcCheckbox";
99
+ </style>
@@ -0,0 +1,18 @@
1
+ <template>
2
+ <el-checkbox-group
3
+ class="vc-checkbox-group"
4
+ v-bind="$attrs"
5
+ >
6
+ <slot />
7
+ </el-checkbox-group>
8
+ </template>
9
+
10
+ <script lang="ts">
11
+ import { ElCheckboxGroup } from 'element-plus'
12
+ import { defineComponent } from 'vue'
13
+
14
+ export default defineComponent({
15
+ name: 'VcCheckboxGroupEl',
16
+ components: { ElCheckboxGroup }
17
+ })
18
+ </script>
@@ -0,0 +1,164 @@
1
+ <template>
2
+ <div
3
+ class="vc-checkbox-group__wrapper"
4
+ :data-test="`checkbox-group-${dataTestName}`"
5
+ >
6
+ <VcCheckbox
7
+ v-if="visibleAll"
8
+ v-model="checkAll"
9
+ :indeterminate="isIndeterminate"
10
+ >
11
+ {{ selectAllLabelText }}
12
+ </VcCheckbox>
13
+ <VcCheckboxGroupEl
14
+ v-model="checkedModel"
15
+ :disabled="disabled"
16
+ :min="min"
17
+ :max="max"
18
+ :label="label"
19
+ class="vc-checkbox-group"
20
+ >
21
+ <div
22
+ v-for="(option, index) in checkboxes"
23
+ :key="`checkbox-${index}`"
24
+ class="vc-checkbox-group__item"
25
+ >
26
+ <VcCheckbox
27
+ :label="getOptionProperty(option, 'value')"
28
+ :disabled="getOptionDisabled(option)"
29
+ :color="getOptionColor(option)"
30
+ >
31
+ <slot
32
+ name="checkbox-label"
33
+ :checkbox="option"
34
+ >
35
+ {{ getOptionProperty(option, 'label') }}
36
+ </slot>
37
+ </VcCheckbox>
38
+ </div>
39
+ </VcCheckboxGroupEl>
40
+ </div>
41
+ </template>
42
+
43
+ <script lang="ts">
44
+ import { PropType } from 'vue/dist/vue'
45
+ import { defineComponent } from 'vue'
46
+ import VcCheckbox from '@/components/VcCheckbox/VcCheckbox.vue'
47
+ import VcCheckboxGroupEl from '@/components/VcCheckbox/VcCheckboxGroupEl.vue'
48
+ import groupMixin, { ModelType, ConfigGroupType } from '@/components/VcCheckbox/group.mixin'
49
+ import { VcInputColor } from '@/components/VcInput/VcInput.types'
50
+
51
+ export default defineComponent({
52
+ name: 'VcCheckboxGroupElement',
53
+ components: { VcCheckboxGroupEl, VcCheckbox },
54
+ mixins: [groupMixin],
55
+ props: {
56
+ modelValue: {
57
+ type: Array as PropType<ModelType[]>,
58
+ default: () => []
59
+ },
60
+ checkboxes: {
61
+ type: Array as PropType<ModelType[]>,
62
+ default: () => []
63
+ },
64
+ valueKey: {
65
+ type: String,
66
+ default: ''
67
+ },
68
+ config: {
69
+ type: Object as PropType<ConfigGroupType>,
70
+ default: () => ({} as ConfigGroupType)
71
+ },
72
+ selectAllLabel: {
73
+ type: String,
74
+ default: ''
75
+ },
76
+ dataTestName: {
77
+ type: String,
78
+ default: 'default'
79
+ },
80
+ visibleAll: {
81
+ type: Boolean,
82
+ default: true
83
+ }
84
+ },
85
+ emits: ['update:modelValue', 'change'],
86
+ computed: {
87
+ checkAll: {
88
+ get (): boolean {
89
+ return this.modelValue.length === this.checkboxes.length
90
+ },
91
+ set (val: boolean): void {
92
+ this.handleCheckAllChange(val)
93
+ }
94
+ },
95
+ checkedModel: {
96
+ get (): ModelType[] {
97
+ return this.modelValue as ModelType[]
98
+ },
99
+ set (val: ModelType[]): void {
100
+ this.$emit('update:modelValue', val)
101
+ this.onChangeEmit(val)
102
+ }
103
+ },
104
+ isIndeterminate (): boolean {
105
+ return !!(this.modelValue?.length && !this.checkAll)
106
+ },
107
+ selectAllLabelText (): string {
108
+ return this.selectAllLabel ? this.selectAllLabel : this.$tVU.t('checkbox.group.choose.all')
109
+ }
110
+ },
111
+ methods: {
112
+ getOptionProperty (option: ModelType, name: string): ModelType {
113
+ if (typeof option === 'object') {
114
+ const _key = this.getPropertyKey(name)
115
+ return option[_key] as ModelType
116
+ }
117
+ return option
118
+ },
119
+ getOptionDisabled (option: ModelType): boolean {
120
+ if (typeof option === 'object') {
121
+ const _key = this.getPropertyKey('disabled')
122
+ return !!option[_key]
123
+ }
124
+ return false
125
+ },
126
+ getOptionColor (option: ModelType): VcInputColor {
127
+ if (typeof option === 'object') {
128
+ const _key = this.getPropertyKey('color')
129
+ return option[_key] as VcInputColor
130
+ }
131
+ return ''
132
+ },
133
+ getPropertyKey (name: string): string {
134
+ let _key = ''
135
+ switch (name) {
136
+ case 'label':
137
+ _key = this.config?.labelKey || 'label'
138
+ break
139
+ case 'value':
140
+ _key = this.valueKey || this.config?.valueKey || 'value'
141
+ break
142
+ case 'color':
143
+ _key = this.config?.colorKey || 'color'
144
+ break
145
+ }
146
+
147
+ return _key
148
+ },
149
+ handleCheckAllChange (val: boolean) {
150
+ if (!val) {
151
+ this.checkedModel = []
152
+ return
153
+ }
154
+ this.checkedModel = this.checkboxes.map((item: ModelType) => {
155
+ return this.getOptionProperty(item, 'value')
156
+ }) as ModelType[]
157
+ },
158
+ onChangeEmit (value: ModelType[]) {
159
+ const _result = this.checkboxes.filter((item:ModelType) => value.includes(this.getOptionProperty(item, 'value')))
160
+ this.$emit('change', _result)
161
+ }
162
+ }
163
+ })
164
+ </script>
@@ -0,0 +1,70 @@
1
+ <template>
2
+ <div
3
+ class="vc-collapse"
4
+ role="tablist"
5
+ aria-multiselectable="true"
6
+ >
7
+ <slot />
8
+ </div>
9
+ </template>
10
+
11
+ <script lang="ts">
12
+ import { defineComponent, PropType } from 'vue'
13
+
14
+ export default defineComponent({
15
+ name: 'VcCollapse',
16
+ provide () {
17
+ return {
18
+ collapse: this
19
+ }
20
+ },
21
+ props: {
22
+ modelValue: {
23
+ type: Array as PropType<string[]>,
24
+ default: () => []
25
+ },
26
+ accordion: {
27
+ type: Boolean,
28
+ default: false
29
+ }
30
+ },
31
+ emits: ['update:modelValue'],
32
+ data () {
33
+ return {
34
+ localModel: [] as string[]
35
+ }
36
+ },
37
+ watch: {
38
+ modelValue: {
39
+ immediate: true,
40
+ handler (val: string[]) {
41
+ this.localModel = val
42
+ }
43
+ },
44
+ localModel (val) {
45
+ this.$emit('update:modelValue', val)
46
+ }
47
+ },
48
+ methods: {
49
+ setActiveName (data: { name: string, state: boolean }) {
50
+ if (this.accordion) {
51
+ const name = data.name
52
+ if (name === this.localModel[0]) {
53
+ this.localModel = []
54
+ } else {
55
+ this.localModel = [data.name]
56
+ }
57
+ } else {
58
+ const _names = [...this.localModel]
59
+ const index = _names.indexOf(data.name)
60
+ if (index > -1) {
61
+ _names.splice(index, 1)
62
+ } else {
63
+ _names.push(data.name)
64
+ }
65
+ this.localModel = _names
66
+ }
67
+ }
68
+ }
69
+ })
70
+ </script>