@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,137 @@
1
+ <template>
2
+ <div class="vc-view-switcher__wrap">
3
+ <span
4
+ class="vc-view-switcher"
5
+ :class="{ 'vc-view-switcher--disabled': disabled }"
6
+ :data-test-name="dataTestName"
7
+ >
8
+ <span
9
+ v-for="(option, index) in options"
10
+ :key="optionKey(option, index, config)"
11
+ class="vc-view-switcher-container"
12
+ tabindex="-1"
13
+ >
14
+ <span
15
+ class="vc-view-switcher-item"
16
+ :class="[
17
+ { 'vc-view-switcher-item--active': optionKey(option, index, config) === activeElement },
18
+ { 'vc-view-switcher-item--disabled': optionDisabled(option, {disabledKey: 'disabled'}) }
19
+ ]"
20
+ :tabindex="optionDisabled(option, {disabledKey: 'disabled'}) ? -1 : 0"
21
+ @keyup.enter="onClick(option, optionKey(option, index, config))"
22
+ @click="onClick(option, optionKey(option, index, config))"
23
+ >
24
+ <i
25
+ :class="optionIcon(option, config)"
26
+ class="vc-view-switcher-item--icon text-icons"
27
+ />
28
+ <span
29
+ class="vc-view-switcher-item--text"
30
+ >
31
+ {{ optionLabel(option, config) }}
32
+ </span>
33
+ </span>
34
+ <span class="vc-view-switcher-item--vertical-line" />
35
+ </span>
36
+ </span>
37
+ </div>
38
+ </template>
39
+
40
+ <script lang="ts">
41
+ import { defineComponent } from 'vue'
42
+ import optionMethods from '@/mixins/optionMethods.mixin'
43
+ import { OptionType } from '@/types/OptionAndConfig.types'
44
+ import { KeyAttributeType } from '@/types/VueGeneric.types'
45
+
46
+ export default defineComponent({
47
+ name: 'VcViewSwitcher',
48
+ mixins: [optionMethods],
49
+ props: {
50
+ disabled: {
51
+ type: Boolean,
52
+ default: false
53
+ },
54
+ dataTestName: {
55
+ type: String,
56
+ default: 'default'
57
+ },
58
+ modelValue: {
59
+ type: [Number, String],
60
+ default: ''
61
+ }
62
+ },
63
+ emits: ['change', 'update:modelValue'],
64
+ data () {
65
+ return {
66
+ activeElement: '' as KeyAttributeType | unknown | undefined
67
+ }
68
+ },
69
+ watch: {
70
+ modelValue (val) {
71
+ this.activeElement = val
72
+ }
73
+ },
74
+ mounted () {
75
+ this.activeElement = this.modelValue
76
+ },
77
+ methods: {
78
+ onClick (option: OptionType, item: KeyAttributeType): void {
79
+ this.activeElement = item
80
+ this.$emit('change', option)
81
+ this.$emit('update:modelValue', item)
82
+ }
83
+ }
84
+ })
85
+ </script>
86
+
87
+ <style lang="scss" scoped>
88
+ .vc-view-switcher {
89
+ @apply p-1 bg-secondary-actions-bg--focus rounded border border-secondary-actions outline-none h-8 inline-flex items-center;
90
+ &__wrap {
91
+ @apply max-w-full overflow-x-auto overflow-y-hidden pb-0.5 relative;
92
+ &::-webkit-scrollbar {
93
+ width: 2px;
94
+ height: 2px;
95
+ }
96
+ }
97
+ &--disabled {
98
+ @apply cursor-not-allowed opacity-50 pointer-events-none select-none;
99
+ }
100
+ &--disabled &-item {
101
+ @apply cursor-not-allowed select-none;
102
+ }
103
+ &-item {
104
+ @apply px-3 h-6 cursor-pointer inline-flex relative items-center;
105
+ &--icon {
106
+ @apply mr-1 rtl:mr-0 rtl:ml-1;
107
+ }
108
+ &--text {
109
+ @apply text-sm font-medium text-default-text;
110
+ }
111
+ &--active {
112
+ @apply rounded bg-white shadow-view-switcher;
113
+ }
114
+ &--vertical-line {
115
+ @apply border-r border-secondary-actions inline-block mx-0.5 h-8;
116
+ }
117
+ &:not(.vc-view-switcher-item--active):hover {
118
+ @apply bg-active-elements-bg--focus rounded shadow-view-switcher transition duration-300 ease-in-out;
119
+ }
120
+ }
121
+ &-item:not(.vc-view-switcher-item--active):focus-visible {
122
+ @apply bg-active-elements-bg--focus rounded shadow-view-switcher transition duration-300 ease-in-out;
123
+ }
124
+ &-item {
125
+ @apply outline-none;
126
+ }
127
+ &:not(.vc-view-switcher--disabled) &-item--disabled {
128
+ @apply cursor-not-allowed opacity-50 pointer-events-none;
129
+ }
130
+ &-container:last-child &-item--vertical-line {
131
+ @apply hidden;
132
+ }
133
+ &-container {
134
+ @apply inline-flex items-center;
135
+ }
136
+ }
137
+ </style>
@@ -0,0 +1,193 @@
1
+ <template>
2
+ <div
3
+ :class="{'active': isActive}"
4
+ class="summary-step-progress"
5
+ >
6
+ <div
7
+ v-show="visible"
8
+ :class="lineFilledClass"
9
+ class="summary-step-progress-line relative"
10
+ >
11
+ <div class="summary-step-dividers">
12
+ <span
13
+ v-for="item in countDownIcons"
14
+ :key="`down-${item}`"
15
+ class="divide-icon"
16
+ >
17
+ <i class="vc-icon-down icon-base text-white" />
18
+ </span>
19
+ </div>
20
+ <i class="summary-step-progress-line-inner h-0 h-full" />
21
+ </div>
22
+ <div class="summary-step-progress-circle">
23
+ <div
24
+ :class="dotFilledClass"
25
+ class="summary-step-progress-circle-point"
26
+ />
27
+ <div class="summary-step-progress-circle-icon">
28
+ <i
29
+ :class="[icon, activeDot ? 'text-active-elements' : 'text-inactive-elements']"
30
+ class="step-icon min-w-8"
31
+ />
32
+ </div>
33
+ </div>
34
+ </div>
35
+ </template>
36
+
37
+ <script lang="ts">
38
+ import { defineComponent } from 'vue'
39
+
40
+ const DEFAULT_ICON = 'vc-icon-settings'
41
+
42
+ export default defineComponent({
43
+ name: 'VcSummaryProgress',
44
+ props: {
45
+ icon: {
46
+ type: String,
47
+ default: DEFAULT_ICON
48
+ },
49
+ lineFilled: {
50
+ type: Boolean,
51
+ default: false
52
+ },
53
+ visible: {
54
+ type: Boolean,
55
+ default: false
56
+ },
57
+ isActive: {
58
+ type: Boolean,
59
+ default: false
60
+ },
61
+ activeDot: {
62
+ type: Boolean,
63
+ default: false
64
+ }
65
+ },
66
+ data: () => ({
67
+ countDownIcons: 3
68
+ }),
69
+ computed: {
70
+ lineFilledClass (): string {
71
+ return this.lineFilled ? 'bg-progress-line-done' : 'bg-progress-line-not-done'
72
+ },
73
+ dotFilledClass (): string {
74
+ return this.activeDot ? 'border-progress-line-done' : 'border-progress-line-not-done'
75
+ }
76
+ }
77
+ })
78
+ </script>
79
+
80
+ <style lang="scss" scoped>
81
+ .summary-step-progress {
82
+ @apply
83
+ relative
84
+ h-4
85
+ lg:h-full
86
+ w-full
87
+ lg:w-4
88
+ flex-shrink-0
89
+ border-progress-line-not-done;
90
+
91
+ .summary-step-progress-line {
92
+ width: 6px;
93
+ top: 14px;
94
+ bottom: 0;
95
+ left: 4px;
96
+ border-color: inherit;
97
+ position: absolute;
98
+ }
99
+
100
+ .summary-step-progress-circle {
101
+ @apply absolute rounded-full;
102
+ border-width: 1px;
103
+ width: 30px;
104
+ height: 30px;
105
+ transform: translateY(-8px);
106
+ left: -50%;
107
+ background: transparent;
108
+ border-color: transparent;
109
+ z-index: 1;
110
+ transition: .3s ease-out;
111
+
112
+ .summary-step-progress-circle-point {
113
+ @apply absolute bg-white rounded-full h-4 w-4;
114
+ border-width: 4px;
115
+ --bg-opacity: 1;
116
+ transform: translate(-50%, -50%);
117
+ left: 50%;
118
+ top: 50%;
119
+ }
120
+
121
+ .summary-step-progress-circle-icon {
122
+ position: absolute;
123
+ right: calc(100% + 8px);
124
+ .step-icon {
125
+ font-size: 1.875rem
126
+ }
127
+ }
128
+ }
129
+
130
+ .summary-step-dividers {
131
+ @apply flex lg:flex-col justify-around items-center h-full w-full absolute;
132
+ }
133
+
134
+ &.active {
135
+ @apply cursor-pointer;
136
+ .summary-step-progress-circle {
137
+ @apply border-active-elements bg-active-elements-bg--focus;
138
+ }
139
+ }
140
+ @media only screen and (max-width: 1264px) {
141
+ .summary-step-progress-line {
142
+ width: 100%;
143
+ height: 6px;
144
+ top: 4px;
145
+ left: calc(50% + 8px);
146
+ }
147
+ .summary-step-progress-circle {
148
+ left: 50%;
149
+ .summary-step-progress-circle-icon {
150
+ top: calc(100% + 2px);
151
+ right: 50%;
152
+ transform: translateX(50%);
153
+ .step-icon {
154
+ font-size: 1.375rem
155
+ }
156
+ }
157
+ }
158
+ .summary-step-dividers {
159
+ .divide-icon {
160
+ transform: rotate(-90deg);
161
+ }
162
+ }
163
+ }
164
+ }
165
+ [dir='rtl'] {
166
+ .summary-step-progress {
167
+ .summary-step-progress-circle {
168
+ .summary-step-progress-circle-icon {
169
+ left: calc(100% + 8px);
170
+ right: auto;
171
+ }
172
+ }
173
+ @media only screen and (max-width: 1264px) {
174
+ .summary-step-progress-line {
175
+ right: calc(50% - 8px);
176
+ left: auto;
177
+ }
178
+ .summary-step-progress-circle {
179
+ .summary-step-progress-circle-icon {
180
+ left: 50%;
181
+ right: auto;
182
+ transform: translateX(-50%);
183
+ }
184
+ }
185
+ .summary-step-dividers {
186
+ .divide-icon {
187
+ transform: rotate(90deg);
188
+ }
189
+ }
190
+ }
191
+ }
192
+ }
193
+ </style>
@@ -0,0 +1,172 @@
1
+ <template>
2
+ <div
3
+ :class="{
4
+ 'active': isActive,
5
+ 'passed': isPassed,
6
+ 'visited': isVisited
7
+ }"
8
+ class="summary-step"
9
+ @click="onClickSepSummary"
10
+ >
11
+ <VcSummaryProgress
12
+ :icon="step.icon"
13
+ :visible="isProgressLine"
14
+ :line-filled="isPassed"
15
+ :active-dot="isVisited"
16
+ :is-active="isActive"
17
+ />
18
+ <div class="summary-step-content">
19
+ <div class="flex justify-center lg:justify-between">
20
+ <span class="summary-step-content-header leading-none">
21
+ <h2
22
+ :class="{'text-primary': isActive}"
23
+ class="mb-0 text-sm lg:text-base font-bold uppercase"
24
+ >
25
+ {{ `${stepIndex + 1}. ${step.label}` }}
26
+ </h2>
27
+ </span>
28
+ <i
29
+ v-show="canEdit"
30
+ class="vc-icon-edit-pencil icon-base text-active-elements"
31
+ />
32
+ </div>
33
+ <transition name="fade-content">
34
+ <div
35
+ v-show="isVisited"
36
+ class="summary-step-content-list"
37
+ >
38
+ <div
39
+ v-for="(row, i) in content"
40
+ :key="`r-${i}`"
41
+ class="mb-1 flex"
42
+ >
43
+ <div
44
+ class="font-medium text-sm lg:text-base"
45
+ >
46
+ {{ row.label }}:&nbsp;
47
+ </div>
48
+ <div
49
+ class="text-value font-normal text-sm lg:text-base break-all"
50
+ v-html="row.value"
51
+ />
52
+ </div>
53
+ </div>
54
+ </transition>
55
+ </div>
56
+ </div>
57
+ </template>
58
+
59
+ <script lang="ts">
60
+ import { defineComponent, PropType } from 'vue'
61
+ import VcSummaryProgress from '@/components/VcWizard/VcSummaryProgress.vue'
62
+ import { VcWizardStepType, VcWizardSummaryContentType } from './VcWizard.types'
63
+
64
+ export default defineComponent({
65
+ name: 'VcSummaryStep',
66
+ components: { VcSummaryProgress },
67
+ props: {
68
+ stepIndex: {
69
+ type: Number,
70
+ default: -1
71
+ },
72
+ step: {
73
+ type: Object as PropType<VcWizardStepType>,
74
+ required: true
75
+ },
76
+ stepsCount: {
77
+ type: Number,
78
+ default: 0
79
+ },
80
+ visited: {
81
+ type: Number,
82
+ default: 0
83
+ },
84
+ activeIndex: {
85
+ type: Number,
86
+ default: 0
87
+ },
88
+ content: {
89
+ type: Array as PropType<Array<VcWizardSummaryContentType>>,
90
+ default: () => []
91
+ }
92
+ },
93
+ emits: ['click-step'],
94
+ computed: {
95
+ canEdit (): boolean {
96
+ return this.stepIndex <= this.visited && this.stepIndex !== this.activeIndex
97
+ },
98
+ isVisited (): boolean {
99
+ return this.stepIndex <= this.visited
100
+ },
101
+ isPassed (): boolean {
102
+ return this.stepIndex < this.visited
103
+ },
104
+ isActive (): boolean {
105
+ return this.stepIndex === this.activeIndex
106
+ },
107
+ isProgressLine (): boolean {
108
+ return this.stepIndex < this.stepsCount - 1
109
+ }
110
+ },
111
+ methods: {
112
+ onClickSepSummary (): void {
113
+ if (this.canEdit) {
114
+ this.$emit('click-step', this.stepIndex)
115
+ }
116
+ }
117
+ }
118
+ })
119
+ </script>
120
+
121
+ <style lang="scss" scoped>
122
+ .summary-step {
123
+ @apply
124
+ w-full
125
+ justify-center
126
+ flex-col
127
+ items-center
128
+ lg:w-auto
129
+ lg:flex-row
130
+ lg:justify-start
131
+ lg:items-start
132
+ flex;
133
+ min-height: 80px;
134
+ &.active, &.passed, &.visited {
135
+ @apply cursor-pointer;
136
+ }
137
+ &-content {
138
+ @apply w-full hidden lg:block flex-grow whitespace-normal pl-4 mb-10;
139
+ }
140
+ &-content-list {
141
+ @apply hidden lg:block mt-4;
142
+ transform-origin: left top;
143
+ }
144
+ &-content-header {
145
+ @apply justify-center lg:justify-start;
146
+ }
147
+ }
148
+
149
+ [dir='rtl'] {
150
+ .summary-step {
151
+ &-content {
152
+ @apply pl-0 pr-4;
153
+ }
154
+ }
155
+ }
156
+
157
+ .fade-content-enter-active,
158
+ .fade-content-leave-active {
159
+ transition: all 0.3s linear;
160
+ overflow: hidden;
161
+ }
162
+ .fade-content-enter-from,
163
+ .fade-content-leave-to {
164
+ opacity: 0;
165
+ max-height: 0;
166
+ }
167
+ .fade-content-enter-to,
168
+ .fade-content-leave-from {
169
+ opacity: 1;
170
+ max-height: 100%;
171
+ }
172
+ </style>