@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.
- package/README.md +35 -0
- package/library/favicon.ico +0 -0
- package/library/fonts/VC-icon.eot +0 -0
- package/library/fonts/VC-icon.svg +268 -0
- package/library/fonts/VC-icon.ttf +0 -0
- package/library/fonts/VC-icon.woff +0 -0
- package/library/icon-vc.css +753 -0
- package/library/images/logo-icon.svg +6 -0
- package/library/images/not-found.png +0 -0
- package/library/images/perfil.jpg +0 -0
- package/library/sound/test-audio.mp3 +0 -0
- package/library/style.css +1 -0
- package/library/super.mjs +24050 -0
- package/library/super.mjs.map +1 -0
- package/library/super.umd.js +37 -0
- package/library/super.umd.js.map +1 -0
- package/library/types/src/components/VcButton/VcButton.types.d.ts +5 -0
- package/library/types/src/components/VcButton/VcButton.vue.d.ts +94 -0
- package/library/types/src/components/VcButton/VcButtonIcon.vue.d.ts +89 -0
- package/library/types/src/components/VcCard/VcCard.vue.d.ts +23 -0
- package/library/types/src/components/VcCheckbox/VcCheckbox.vue.d.ts +133 -0
- package/library/types/src/components/VcCheckbox/VcCheckboxGroupEl.vue.d.ts +2 -0
- package/library/types/src/components/VcCheckbox/group.mixin.d.ts +60 -0
- package/library/types/src/components/VcCheckboxGroup/VcCheckboxGroup.vue.d.ts +140 -0
- package/library/types/src/components/VcCollapse/VcCollapse.vue.d.ts +33 -0
- package/library/types/src/components/VcCollapse/VcCollapseItem.vue.d.ts +106 -0
- package/library/types/src/components/VcCollapse/VcCollapseTransition.vue.d.ts +14 -0
- package/library/types/src/components/VcColorPicker/ColorPicker/ColorPicker.vue.d.ts +67 -0
- package/library/types/src/components/VcColorPicker/ColorPicker/Hue.vue.d.ts +40 -0
- package/library/types/src/components/VcColorPicker/ColorPicker/Saturation.vue.d.ts +49 -0
- package/library/types/src/components/VcColorPicker/ColorPicker/composible.d.ts +23 -0
- package/library/types/src/components/VcColorPicker/VcColorPicker.types.d.ts +10 -0
- package/library/types/src/components/VcColorPicker/VcColorPicker.vue.d.ts +65 -0
- package/library/types/src/components/VcDatetimeRangePicker/VcDatetimeRangePicker.types.d.ts +27 -0
- package/library/types/src/components/VcDatetimeRangePicker/VcDatetimeRangePicker.vue.d.ts +360 -0
- package/library/types/src/components/VcDelimitedList/VcDelimitedList.types.d.ts +4 -0
- package/library/types/src/components/VcDelimitedList/VcDelimitedList.vue.d.ts +92 -0
- package/library/types/src/components/VcExtendedDatetimeRangePicker/ExtendedDatetimeRangePickerPart.vue.d.ts +208 -0
- package/library/types/src/components/VcExtendedDatetimeRangePicker/ExtendedDatetimeRangePickerRelative.vue.d.ts +96 -0
- package/library/types/src/components/VcExtendedDatetimeRangePicker/VcExtendedDatetimeRangePicker.types.d.ts +11 -0
- package/library/types/src/components/VcExtendedDatetimeRangePicker/VcExtendedDatetimeRangePicker.vue.d.ts +276 -0
- package/library/types/src/components/VcExtendedDatetimeRangePicker/VcExtendedDatetimeRangePickerQuickOptionsSelection.vue.d.ts +51 -0
- package/library/types/src/components/VcExtendedDatetimeRangePicker/enum.d.ts +6 -0
- package/library/types/src/components/VcFileUploader/VcFileUploader.types.d.ts +4 -0
- package/library/types/src/components/VcFileUploader/VcFileUploader.vue.d.ts +388 -0
- package/library/types/src/components/VcForm/UiComponents/VcInputLabel.vue.d.ts +204 -0
- package/library/types/src/components/VcForm/VcForm.vue.d.ts +348 -0
- package/library/types/src/components/VcForm/VcFormItem.vue.d.ts +69 -0
- package/library/types/src/components/VcHyperLink/VcHyperLink.types.d.ts +2 -0
- package/library/types/src/components/VcHyperLink/VcHyperLink.vue.d.ts +54 -0
- package/library/types/src/components/VcIconPicker/VcIconPicker.types.d.ts +15 -0
- package/library/types/src/components/VcIconPicker/VcIconPicker.vue.d.ts +105 -0
- package/library/types/src/components/VcIconPicker/iconPicker.mixin.d.ts +51 -0
- package/library/types/src/components/VcInput/VcInput.types.d.ts +2 -0
- package/library/types/src/components/VcInput/VcInput.vue.d.ts +202 -0
- package/library/types/src/components/VcInputNumber/VcInputNumber.vue.d.ts +256 -0
- package/library/types/src/components/VcLoading/Loaders/Circles.vue.d.ts +28 -0
- package/library/types/src/components/VcLoading/Loaders/LdsSpinner.vue.d.ts +29 -0
- package/library/types/src/components/VcLoading/Loaders/LoadIcon.vue.d.ts +36 -0
- package/library/types/src/components/VcLoading/Loaders/Stretch.vue.d.ts +28 -0
- package/library/types/src/components/VcLoading/VcLoading.types.d.ts +1 -0
- package/library/types/src/components/VcLoading/VcLoading.vue.d.ts +66 -0
- package/library/types/src/components/VcModal/VcModal.types.d.ts +4 -0
- package/library/types/src/components/VcModal/VcModal.vue.d.ts +210 -0
- package/library/types/src/components/VcPagination/VcPagination.types.d.ts +4 -0
- package/library/types/src/components/VcPagination/VcPagination.vue.d.ts +64 -0
- package/library/types/src/components/VcPagination/VcPaginationButton.vue.d.ts +34 -0
- package/library/types/src/components/VcPopover/VcPopover.types.d.ts +3 -0
- package/library/types/src/components/VcPopover/VcPopover.vue.d.ts +150 -0
- package/library/types/src/components/VcProgress/VcProgress.types.d.ts +16 -0
- package/library/types/src/components/VcProgress/VcProgress.vue.d.ts +147 -0
- package/library/types/src/components/VcProgress/progress.options.d.ts +13 -0
- package/library/types/src/components/VcRadio/VcRadio.vue.d.ts +88 -0
- package/library/types/src/components/VcRadioGroup/VcRadioGroup.vue.d.ts +96 -0
- package/library/types/src/components/VcRadioTabs/UiComponents/VcRadioTabsNav.vue.d.ts +41 -0
- package/library/types/src/components/VcRadioTabs/VcRadioTabs.vue.d.ts +78 -0
- package/library/types/src/components/VcSelect/VcSelect.options.d.ts +78 -0
- package/library/types/src/components/VcSelect/VcSelect.vue.d.ts +293 -0
- package/library/types/src/components/VcSkeletonLoader/Loaders/Card.vue.d.ts +18 -0
- package/library/types/src/components/VcSkeletonLoader/Loaders/Circle.vue.d.ts +28 -0
- package/library/types/src/components/VcSkeletonLoader/Loaders/Row.vue.d.ts +18 -0
- package/library/types/src/components/VcSkeletonLoader/Loaders/Square.vue.d.ts +28 -0
- package/library/types/src/components/VcSkeletonLoader/Loaders/Text.vue.d.ts +16 -0
- package/library/types/src/components/VcSkeletonLoader/VcSkeletonLoader.types.d.ts +1 -0
- package/library/types/src/components/VcSkeletonLoader/VcSkeletonLoader.vue.d.ts +81 -0
- package/library/types/src/components/VcSoundplayer/VcSoundPlayer.types.d.ts +2 -0
- package/library/types/src/components/VcSoundplayer/VcSoundPlayer.vue.d.ts +130 -0
- package/library/types/src/components/VcSplitButton/VcSplitButton.types.d.ts +8 -0
- package/library/types/src/components/VcSplitButton/VcSplitButton.vue.d.ts +68 -0
- package/library/types/src/components/VcSwitch/VcSwitch.types.d.ts +1 -0
- package/library/types/src/components/VcSwitch/VcSwitch.vue.d.ts +151 -0
- package/library/types/src/components/VcTable/VcTable.types.d.ts +45 -0
- package/library/types/src/components/VcTable/VcTable.vue.d.ts +334 -0
- package/library/types/src/components/VcTable/tableOptions.d.ts +6 -0
- package/library/types/src/components/VcTabs/VcTabNav.vue.d.ts +54 -0
- package/library/types/src/components/VcTabs/VcTabPane.vue.d.ts +92 -0
- package/library/types/src/components/VcTabs/VcTabs.types.d.ts +14 -0
- package/library/types/src/components/VcTabs/VcTabs.vue.d.ts +62 -0
- package/library/types/src/components/VcTag/VcTag.types.d.ts +1 -0
- package/library/types/src/components/VcTag/VcTag.vue.d.ts +99 -0
- package/library/types/src/components/VcTagInput/VcTagInput.vue.d.ts +290 -0
- package/library/types/src/components/VcTimeInput/VcTimeInput.vue.d.ts +269 -0
- package/library/types/src/components/VcTree/VcTree.types.d.ts +36 -0
- package/library/types/src/components/VcTree/VcTree.vue.d.ts +209 -0
- package/library/types/src/components/VcTree/VcTreeNode.vue.d.ts +104 -0
- package/library/types/src/components/VcTree/VcTreeSelect.vue.d.ts +305 -0
- package/library/types/src/components/VcVerticalTabs/UiComponents/VerticalTabNav.vue.d.ts +54 -0
- package/library/types/src/components/VcVerticalTabs/VcVerticalTabs.vue.d.ts +76 -0
- package/library/types/src/components/VcViewSwitcher/VcViewSwitcher.vue.d.ts +74 -0
- package/library/types/src/components/VcWizard/VcSummaryProgress.vue.d.ts +55 -0
- package/library/types/src/components/VcWizard/VcSummaryStep.vue.d.ts +70 -0
- package/library/types/src/components/VcWizard/VcWizard.types.d.ts +15 -0
- package/library/types/src/components/VcWizard/VcWizard.vue.d.ts +157 -0
- package/library/types/src/components/VcWizard/VcWizardNavigation.vue.d.ts +110 -0
- package/library/types/src/components/VcWizard/VcWizardSummary.vue.d.ts +47 -0
- package/library/types/src/components/VcWizard/VcWizardTransition.vue.d.ts +83 -0
- package/library/types/src/components/index.d.ts +43 -0
- package/library/types/src/directives/resize.d.ts +6 -0
- package/library/types/src/entry.d.ts +2 -0
- package/library/types/src/entry.esm.d.ts +4 -0
- package/library/types/src/env.d.ts +18 -0
- package/library/types/src/localization/Localization.types.d.ts +17 -0
- package/library/types/src/localization/index.d.ts +9 -0
- package/library/types/src/mixins/common/appendTo.mixin.d.ts +19 -0
- package/library/types/src/mixins/defaultComponent.mixin.d.ts +14 -0
- package/library/types/src/mixins/input/baseInput.mixin.d.ts +100 -0
- package/library/types/src/mixins/input/color.mixin.d.ts +33 -0
- package/library/types/src/mixins/input/error.mixin.d.ts +23 -0
- package/library/types/src/mixins/input/input.mixin.d.ts +146 -0
- package/library/types/src/mixins/input/label.mixin.d.ts +52 -0
- package/library/types/src/mixins/optionMethods.mixin.d.ts +38 -0
- package/library/types/src/mixins/table/tableProps.mixin.d.ts +108 -0
- package/library/types/src/theme/index.d.ts +1 -0
- package/library/types/src/theme/theme.types.d.ts +6 -0
- package/library/types/src/types/AppendToTarget.types.d.ts +1 -0
- package/library/types/src/types/Entry.types.d.ts +6 -0
- package/library/types/src/types/OptionAndConfig.types.d.ts +23 -0
- package/library/types/src/types/VueGeneric.types.d.ts +1 -0
- package/library/types/src/utils/DomHandler.d.ts +5 -0
- package/library/types/src/utils/UniqueComponentId.d.ts +1 -0
- package/library/types/src/utils/ZIndexUtils.d.ts +12 -0
- package/library/types/src/utils/helpers.d.ts +6 -0
- package/library/types/src/utils/isValidTime.d.ts +2 -0
- package/package.json +66 -0
- package/src/assets/element/index.scss +161 -0
- package/src/assets/sass/main/_icons.scss +36 -0
- package/src/assets/sass/main/_loading.scss +51 -0
- package/src/assets/sass/main/_mixins.scss +339 -0
- package/src/assets/sass/main/_typography.scss +29 -0
- package/src/assets/sass/main.scss +9 -0
- package/src/components/VcButton/VcButton.scss +190 -0
- package/src/components/VcButton/VcButton.vue +117 -0
- package/src/components/VcButton/VcButtonIcon.scss +100 -0
- package/src/components/VcButton/VcButtonIcon.vue +97 -0
- package/src/components/VcCard/VcCard.vue +53 -0
- package/src/components/VcCheckbox/VcCheckbox.scss +66 -0
- package/src/components/VcCheckbox/VcCheckbox.vue +99 -0
- package/src/components/VcCheckbox/VcCheckboxGroupEl.vue +18 -0
- package/src/components/VcCheckboxGroup/VcCheckboxGroup.vue +164 -0
- package/src/components/VcCollapse/VcCollapse.vue +70 -0
- package/src/components/VcCollapse/VcCollapseItem.vue +229 -0
- package/src/components/VcCollapse/VcCollapseTransition.vue +78 -0
- package/src/components/VcColorPicker/ColorPicker/ColorPicker.vue +192 -0
- package/src/components/VcColorPicker/ColorPicker/Hue.vue +130 -0
- package/src/components/VcColorPicker/ColorPicker/Saturation.vue +146 -0
- package/src/components/VcColorPicker/VcColorPicker.vue +140 -0
- package/src/components/VcDatetimeRangePicker/VcDatetimeRangePicker.vue +474 -0
- package/src/components/VcDelimitedList/VcDelimitedList.vue +223 -0
- package/src/components/VcExtendedDatetimeRangePicker/ExtendedDatetimeRangePickerPart.vue +166 -0
- package/src/components/VcExtendedDatetimeRangePicker/ExtendedDatetimeRangePickerRelative.vue +180 -0
- package/src/components/VcExtendedDatetimeRangePicker/VcExtendedDatetimeRangePicker.vue +178 -0
- package/src/components/VcExtendedDatetimeRangePicker/VcExtendedDatetimeRangePickerQuickOptionsSelection.vue +128 -0
- package/src/components/VcFileUploader/VcFileUploader.vue +324 -0
- package/src/components/VcForm/Styles/VcInputLabel.scss +24 -0
- package/src/components/VcForm/UiComponents/VcInputError.vue +31 -0
- package/src/components/VcForm/UiComponents/VcInputLabel.vue +67 -0
- package/src/components/VcForm/VcForm.vue +88 -0
- package/src/components/VcForm/VcFormItem.vue +115 -0
- package/src/components/VcHyperLink/VcHyperLink.vue +83 -0
- package/src/components/VcIconPicker/VcIconPicker.vue +142 -0
- package/src/components/VcInput/VcInput.vue +220 -0
- package/src/components/VcInputNumber/VcInputNumber.vue +128 -0
- package/src/components/VcLoading/Loaders/Circles.vue +100 -0
- package/src/components/VcLoading/Loaders/LdsSpinner.vue +52 -0
- package/src/components/VcLoading/Loaders/LoadIcon.vue +56 -0
- package/src/components/VcLoading/Loaders/Stretch.vue +82 -0
- package/src/components/VcLoading/VcLoading.vue +159 -0
- package/src/components/VcModal/VcModal.scss +227 -0
- package/src/components/VcModal/VcModal.vue +384 -0
- package/src/components/VcNotification/VcNotification.vue +302 -0
- package/src/components/VcNotification/VcNotificationMessage.vue +119 -0
- package/src/components/VcPagination/VcPagination.vue +175 -0
- package/src/components/VcPagination/VcPaginationButton.vue +37 -0
- package/src/components/VcPopover/VcPopover.vue +186 -0
- package/src/components/VcProgress/VcProgress.vue +235 -0
- package/src/components/VcRadio/VcRadio.scss +59 -0
- package/src/components/VcRadio/VcRadio.vue +89 -0
- package/src/components/VcRadioGroup/VcRadioGroup.vue +146 -0
- package/src/components/VcRadioTabs/UiComponents/VcRadioTabsNav.vue +128 -0
- package/src/components/VcRadioTabs/VcRadioTabs.vue +151 -0
- package/src/components/VcSelect/VcSelect.scss +135 -0
- package/src/components/VcSelect/VcSelect.vue +191 -0
- package/src/components/VcSkeletonLoader/Loaders/Card.vue +79 -0
- package/src/components/VcSkeletonLoader/Loaders/Circle.vue +45 -0
- package/src/components/VcSkeletonLoader/Loaders/Row.vue +36 -0
- package/src/components/VcSkeletonLoader/Loaders/Square.vue +44 -0
- package/src/components/VcSkeletonLoader/Loaders/Text.vue +42 -0
- package/src/components/VcSkeletonLoader/VcSkeletonLoader.vue +111 -0
- package/src/components/VcSoundplayer/VcSoundPlayer.vue +497 -0
- package/src/components/VcSplitButton/VcSplitButton.vue +338 -0
- package/src/components/VcSwitch/VcSwitch.vue +352 -0
- package/src/components/VcTable/VcTable.vue +869 -0
- package/src/components/VcTabs/VcTabNav.scss +120 -0
- package/src/components/VcTabs/VcTabNav.vue +203 -0
- package/src/components/VcTabs/VcTabPane.vue +128 -0
- package/src/components/VcTabs/VcTabs.vue +186 -0
- package/src/components/VcTag/VcTag.vue +186 -0
- package/src/components/VcTagInput/VcTagInput.vue +280 -0
- package/src/components/VcTagInput/VcTagInputStyle.scss +224 -0
- package/src/components/VcTimeInput/VcTimeInput.vue +441 -0
- package/src/components/VcTree/VcTree.vue +410 -0
- package/src/components/VcTree/VcTreeNode.vue +283 -0
- package/src/components/VcTree/VcTreeSelect.vue +472 -0
- package/src/components/VcVerticalTabs/UiComponents/VerticalTabNav.vue +99 -0
- package/src/components/VcVerticalTabs/VcVerticalTabs.vue +125 -0
- package/src/components/VcViewSwitcher/VcViewSwitcher.vue +137 -0
- package/src/components/VcWizard/VcSummaryProgress.vue +193 -0
- package/src/components/VcWizard/VcSummaryStep.vue +172 -0
- package/src/components/VcWizard/VcWizard.vue +292 -0
- package/src/components/VcWizard/VcWizardNavigation.vue +196 -0
- package/src/components/VcWizard/VcWizardSummary.vue +73 -0
- package/src/components/VcWizard/VcWizardTransition.vue +119 -0
- package/src/theme/index.ts +47 -0
- package/src/theme/tailwindConfig.js +143 -0
- package/src/theme/tailwindScheme.js +9 -0
- package/src/theme/theme.types.ts +6 -0
- package/src/theme/themes.json +130 -0
|
@@ -0,0 +1,472 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div
|
|
3
|
+
:class="containerClass"
|
|
4
|
+
:style="style"
|
|
5
|
+
class="vc-tree-select"
|
|
6
|
+
>
|
|
7
|
+
<VcPopover
|
|
8
|
+
:open="open"
|
|
9
|
+
trigger="manual"
|
|
10
|
+
:popover-max-width="containerWidth"
|
|
11
|
+
placement="bottom-end"
|
|
12
|
+
classes-ref="w-full"
|
|
13
|
+
popover-class="vc-tree-select__dropdown"
|
|
14
|
+
class="vc-tree-select__dropdown-wrapper"
|
|
15
|
+
>
|
|
16
|
+
<template #reference>
|
|
17
|
+
<div
|
|
18
|
+
ref="inputField"
|
|
19
|
+
:class="[
|
|
20
|
+
...inputClasses,
|
|
21
|
+
{
|
|
22
|
+
'is-prefix-icon': prefixIcon,
|
|
23
|
+
'is-error': !!isError,
|
|
24
|
+
'is-disabled': disabled
|
|
25
|
+
}
|
|
26
|
+
]"
|
|
27
|
+
class="vc-tree-select__container"
|
|
28
|
+
@click.stop="onWrapperClick"
|
|
29
|
+
>
|
|
30
|
+
<div
|
|
31
|
+
v-if="prefixIcon"
|
|
32
|
+
class="vc-tree-select__prefix-icon"
|
|
33
|
+
>
|
|
34
|
+
<i
|
|
35
|
+
:class="prefixClasses"
|
|
36
|
+
:style="prefixStyle"
|
|
37
|
+
/>
|
|
38
|
+
</div>
|
|
39
|
+
<div
|
|
40
|
+
class="vc-tree-select__content"
|
|
41
|
+
>
|
|
42
|
+
<div class="vc-tree-select__tags flex flex-wrap">
|
|
43
|
+
<VcDelimitedList
|
|
44
|
+
:list="selectedModel"
|
|
45
|
+
:limit="tagsLimit"
|
|
46
|
+
:popover-disabled="open"
|
|
47
|
+
trigger="hover"
|
|
48
|
+
popover-max-width="250"
|
|
49
|
+
separator=""
|
|
50
|
+
>
|
|
51
|
+
<template #list-item="{item}">
|
|
52
|
+
<VcTag
|
|
53
|
+
:label="item?.label"
|
|
54
|
+
:color="tagColor"
|
|
55
|
+
:max-content="tagMaxContent"
|
|
56
|
+
:borderless="tagBorderless"
|
|
57
|
+
:disabled="disabled"
|
|
58
|
+
closable
|
|
59
|
+
@on-close="onRemoveTag(item)"
|
|
60
|
+
/>
|
|
61
|
+
</template>
|
|
62
|
+
<template #reference="{listLength}">
|
|
63
|
+
<VcTag
|
|
64
|
+
:label="`+ ${listLength}`"
|
|
65
|
+
:borderless="tagBorderless"
|
|
66
|
+
@click.stop.prevent
|
|
67
|
+
/>
|
|
68
|
+
</template>
|
|
69
|
+
<template #other-content="{list}">
|
|
70
|
+
<div class="w-full py-3 px-2">
|
|
71
|
+
<div
|
|
72
|
+
v-for="(item, index) in list"
|
|
73
|
+
:key="index"
|
|
74
|
+
class="flex items-center justify-start m-1"
|
|
75
|
+
>
|
|
76
|
+
<VcTag
|
|
77
|
+
:label="item.label"
|
|
78
|
+
:icon="item.icon"
|
|
79
|
+
:max-content="tagMaxContent"
|
|
80
|
+
:borderless="tagBorderless"
|
|
81
|
+
:disabled="disabled"
|
|
82
|
+
closable
|
|
83
|
+
@on-close="onRemoveTag(item)"
|
|
84
|
+
/>
|
|
85
|
+
</div>
|
|
86
|
+
</div>
|
|
87
|
+
</template>
|
|
88
|
+
</VcDelimitedList>
|
|
89
|
+
</div>
|
|
90
|
+
</div>
|
|
91
|
+
<div
|
|
92
|
+
class="vc-tree-select__suffix-icon"
|
|
93
|
+
>
|
|
94
|
+
<i
|
|
95
|
+
class="vc-icon-folders text-icons icon-lg"
|
|
96
|
+
/>
|
|
97
|
+
</div>
|
|
98
|
+
</div>
|
|
99
|
+
</template>
|
|
100
|
+
<div
|
|
101
|
+
v-if="loading"
|
|
102
|
+
ref="dropdown"
|
|
103
|
+
v-click-outside:[inputField]="onClickOutside"
|
|
104
|
+
class="vc-tree-select__dropdown-content h-full"
|
|
105
|
+
:style="{width: containerWidth}"
|
|
106
|
+
>
|
|
107
|
+
<div class="vc-tree-select__dropdown-tree-content">
|
|
108
|
+
<VcTree
|
|
109
|
+
v-if="options.length"
|
|
110
|
+
ref="treNode"
|
|
111
|
+
v-model:expandedKeys="expandedKeys"
|
|
112
|
+
:config="config"
|
|
113
|
+
:options="options"
|
|
114
|
+
:scroll-height="scrollHeight"
|
|
115
|
+
:default-checked-keys="checkedKeys"
|
|
116
|
+
:empty-text="emptyTextMessage"
|
|
117
|
+
@update:selectedKeys="onSelectedKeys"
|
|
118
|
+
>
|
|
119
|
+
<template
|
|
120
|
+
v-if="$slots['option-label']"
|
|
121
|
+
#node-label="data"
|
|
122
|
+
>
|
|
123
|
+
<slot
|
|
124
|
+
name="option-label"
|
|
125
|
+
:node="data.node"
|
|
126
|
+
/>
|
|
127
|
+
</template>
|
|
128
|
+
</VcTree>
|
|
129
|
+
<div
|
|
130
|
+
v-else
|
|
131
|
+
class="vc-tree-select__empty-text"
|
|
132
|
+
>
|
|
133
|
+
{{ emptyTextMessage }}
|
|
134
|
+
</div>
|
|
135
|
+
</div>
|
|
136
|
+
</div>
|
|
137
|
+
</VcPopover>
|
|
138
|
+
</div>
|
|
139
|
+
</template>
|
|
140
|
+
|
|
141
|
+
<script lang="ts">
|
|
142
|
+
import { defineComponent, PropType } from 'vue'
|
|
143
|
+
import { VcTagColorType } from '@/components/VcTag/VcTag.types'
|
|
144
|
+
import VcTag from '@/components/VcTag/VcTag.vue'
|
|
145
|
+
import VcPopover from '@/components/VcPopover/VcPopover.vue'
|
|
146
|
+
import VcTree from '@/components/VcTree/VcTree.vue'
|
|
147
|
+
import { VcTreeActionKeys, VcTreeConfig, VcTreeNodeType } from '@/components/VcTree/VcTree.types'
|
|
148
|
+
import VcDelimitedList from '@/components/VcDelimitedList/VcDelimitedList.vue'
|
|
149
|
+
import inputMixin from '@/mixins/input/input.mixin'
|
|
150
|
+
|
|
151
|
+
import { ClickOutside } from 'element-plus'
|
|
152
|
+
|
|
153
|
+
const CLASS_FOR_COLOR = 'vc-tree-select--'
|
|
154
|
+
const DEFAULT_CONFIG = {
|
|
155
|
+
valueKey: 'id',
|
|
156
|
+
labelKey: 'label',
|
|
157
|
+
iconKey: 'icon',
|
|
158
|
+
childrenKey: 'children'
|
|
159
|
+
}
|
|
160
|
+
|
|
161
|
+
export default defineComponent({
|
|
162
|
+
name: 'VcTreeSelect',
|
|
163
|
+
components: { VcDelimitedList, VcTree, VcPopover, VcTag },
|
|
164
|
+
directives: { ClickOutside },
|
|
165
|
+
mixins: [inputMixin],
|
|
166
|
+
props: {
|
|
167
|
+
modelValue: {
|
|
168
|
+
type: Array as PropType<VcTreeNodeType[]>,
|
|
169
|
+
default: undefined
|
|
170
|
+
},
|
|
171
|
+
class: {
|
|
172
|
+
type: String,
|
|
173
|
+
default: ''
|
|
174
|
+
},
|
|
175
|
+
style: {
|
|
176
|
+
type: [String, Object],
|
|
177
|
+
default: null
|
|
178
|
+
},
|
|
179
|
+
tagColor: {
|
|
180
|
+
type: String as PropType<VcTagColorType>,
|
|
181
|
+
default: 'primary'
|
|
182
|
+
},
|
|
183
|
+
tagBorderless: {
|
|
184
|
+
type: Boolean,
|
|
185
|
+
default: false
|
|
186
|
+
},
|
|
187
|
+
config: {
|
|
188
|
+
type: Object as PropType<VcTreeConfig>,
|
|
189
|
+
default: () => ({ ...DEFAULT_CONFIG })
|
|
190
|
+
},
|
|
191
|
+
options: {
|
|
192
|
+
type: Array as PropType<VcTreeNodeType[]>,
|
|
193
|
+
default: () => []
|
|
194
|
+
},
|
|
195
|
+
returnedValue: {
|
|
196
|
+
type: String,
|
|
197
|
+
default: ''
|
|
198
|
+
},
|
|
199
|
+
loading: {
|
|
200
|
+
type: Boolean,
|
|
201
|
+
default: true
|
|
202
|
+
},
|
|
203
|
+
emptyText: {
|
|
204
|
+
type: String,
|
|
205
|
+
default: ''
|
|
206
|
+
},
|
|
207
|
+
tagsLimit: {
|
|
208
|
+
type: Number,
|
|
209
|
+
default: 3
|
|
210
|
+
},
|
|
211
|
+
scrollHeight: {
|
|
212
|
+
type: [String, Number],
|
|
213
|
+
default: 252
|
|
214
|
+
}
|
|
215
|
+
},
|
|
216
|
+
emits: ['update:modelValue', 'on-change'],
|
|
217
|
+
data () {
|
|
218
|
+
return {
|
|
219
|
+
colorClass: CLASS_FOR_COLOR,
|
|
220
|
+
containerWidth: '200px',
|
|
221
|
+
focused: false,
|
|
222
|
+
tagMaxContent: '180',
|
|
223
|
+
open: false,
|
|
224
|
+
localData: [] as VcTreeNodeType[],
|
|
225
|
+
expandedKeys: {} as VcTreeActionKeys[]
|
|
226
|
+
}
|
|
227
|
+
},
|
|
228
|
+
computed: {
|
|
229
|
+
inputField () {
|
|
230
|
+
return this.$refs.inputField
|
|
231
|
+
},
|
|
232
|
+
nodeKey (): string | number {
|
|
233
|
+
return this.config?.valueKey || DEFAULT_CONFIG.valueKey
|
|
234
|
+
},
|
|
235
|
+
/* TODO: rework selectedModel value to watchers */
|
|
236
|
+
selectedModel: {
|
|
237
|
+
get (): VcTreeNodeType[] {
|
|
238
|
+
if (!this.modelValue) {
|
|
239
|
+
return this.localData
|
|
240
|
+
}
|
|
241
|
+
return this.modelValue
|
|
242
|
+
},
|
|
243
|
+
set (val: VcTreeNodeType[]) {
|
|
244
|
+
if (!this.modelValue) {
|
|
245
|
+
this.localData = val
|
|
246
|
+
} else {
|
|
247
|
+
this.emitData(val)
|
|
248
|
+
}
|
|
249
|
+
}
|
|
250
|
+
},
|
|
251
|
+
checkedKeys () {
|
|
252
|
+
return this.selectedModel.map((item: VcTreeNodeType) => item[this.nodeKey])
|
|
253
|
+
},
|
|
254
|
+
inputClasses (): (string)[] {
|
|
255
|
+
const colorClass = this.color ? (this.colorClass + this.color) : ''
|
|
256
|
+
return [
|
|
257
|
+
colorClass
|
|
258
|
+
]
|
|
259
|
+
},
|
|
260
|
+
containerClass () {
|
|
261
|
+
return [this.class, {
|
|
262
|
+
'vc-tree-select__wrap--filled': !!(this.modelValue && this.modelValue.length),
|
|
263
|
+
'vc-tree-select__wrap--focus': this.open,
|
|
264
|
+
'vc-tree-select__wrap--error': !!this.isError,
|
|
265
|
+
'vc-tree-select__wrap--disabled': this.disabled
|
|
266
|
+
}]
|
|
267
|
+
},
|
|
268
|
+
emptyTextMessage () {
|
|
269
|
+
return this.emptyText ? this.emptyText : this.$tVU.t('general.no.data')
|
|
270
|
+
}
|
|
271
|
+
},
|
|
272
|
+
mounted () {
|
|
273
|
+
this.setContainerWidth()
|
|
274
|
+
window.addEventListener('resize', this.setContainerWidth, true)
|
|
275
|
+
},
|
|
276
|
+
beforeUnmount () {
|
|
277
|
+
window.removeEventListener('resize', this.setContainerWidth)
|
|
278
|
+
},
|
|
279
|
+
methods: {
|
|
280
|
+
onClickOutside () {
|
|
281
|
+
this.open = false
|
|
282
|
+
},
|
|
283
|
+
emitData (val: VcTreeNodeType[]): void {
|
|
284
|
+
if (this.returnedValue) {
|
|
285
|
+
const _res = val.map((item: VcTreeNodeType) => item[this.returnedValue])
|
|
286
|
+
this.$emit('on-change', _res)
|
|
287
|
+
} else {
|
|
288
|
+
this.$emit('on-change', val)
|
|
289
|
+
}
|
|
290
|
+
this.$emit('update:modelValue', val)
|
|
291
|
+
},
|
|
292
|
+
onWrapperClick (): void {
|
|
293
|
+
if (!this.disabled) {
|
|
294
|
+
this.open = true
|
|
295
|
+
}
|
|
296
|
+
},
|
|
297
|
+
closeDropdown (): void {
|
|
298
|
+
this.open = false
|
|
299
|
+
},
|
|
300
|
+
onRemoveTag (data: VcTreeNodeType) {
|
|
301
|
+
this.selectedModel = this.selectedModel.filter((item: VcTreeNodeType) => item[this.nodeKey] !== data[this.nodeKey])
|
|
302
|
+
this.$nextTick(() => {
|
|
303
|
+
if (this.$refs.treNode) {
|
|
304
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
305
|
+
(this.$refs.treNode as any).initData()
|
|
306
|
+
}
|
|
307
|
+
})
|
|
308
|
+
},
|
|
309
|
+
onSelectedKeys (data: VcTreeNodeType[]) {
|
|
310
|
+
this.selectedModel = data
|
|
311
|
+
},
|
|
312
|
+
setContainerWidth () {
|
|
313
|
+
if (this.$refs.inputField) {
|
|
314
|
+
this.containerWidth = `${(this.$refs.inputField as HTMLElement).getBoundingClientRect().width}px`
|
|
315
|
+
}
|
|
316
|
+
}
|
|
317
|
+
}
|
|
318
|
+
})
|
|
319
|
+
</script>
|
|
320
|
+
|
|
321
|
+
<style lang="scss" scoped>
|
|
322
|
+
@import '../../assets/sass/main/mixins';
|
|
323
|
+
.vc-tree-select {
|
|
324
|
+
&__wrap {
|
|
325
|
+
@apply w-full;
|
|
326
|
+
}
|
|
327
|
+
@include labelCustomInput;
|
|
328
|
+
@include errorContainer;
|
|
329
|
+
|
|
330
|
+
&__prefix-icon {
|
|
331
|
+
@apply flex-shrink-0 flex items-center justify-center px-1 h-full text-active-elements;
|
|
332
|
+
flex: 0 0 1rem;
|
|
333
|
+
.vc-input-icon-color--active {
|
|
334
|
+
@apply text-active-elements;
|
|
335
|
+
}
|
|
336
|
+
.vc-input-icon-color--primary {
|
|
337
|
+
@apply text-primary-actions;
|
|
338
|
+
}
|
|
339
|
+
.vc-input-color--secondary {
|
|
340
|
+
@apply text-secondary-actions;
|
|
341
|
+
}
|
|
342
|
+
.vc-input-icon-color--destructive {
|
|
343
|
+
@apply text-destructive-actions;
|
|
344
|
+
}
|
|
345
|
+
}
|
|
346
|
+
&__suffix-icon {
|
|
347
|
+
@apply flex-shrink-0 flex items-center justify-center px-1;
|
|
348
|
+
flex: 0 0 2rem;
|
|
349
|
+
i {
|
|
350
|
+
cursor: inherit;
|
|
351
|
+
transition: all 0.3s ease;
|
|
352
|
+
&:hover {
|
|
353
|
+
@apply text-icons;
|
|
354
|
+
}
|
|
355
|
+
}
|
|
356
|
+
}
|
|
357
|
+
&__container {
|
|
358
|
+
@apply
|
|
359
|
+
min-h-8
|
|
360
|
+
pl-3
|
|
361
|
+
w-full
|
|
362
|
+
max-w-full
|
|
363
|
+
flex items-center justify-between text-sm rounded border border-field-borders outline-none overflow-hidden cursor-pointer;
|
|
364
|
+
&.is-prefix-icon {
|
|
365
|
+
@apply pl-0;
|
|
366
|
+
}
|
|
367
|
+
&:hover:not(.is-disabled) {
|
|
368
|
+
@apply shadow-focus-outer;
|
|
369
|
+
}
|
|
370
|
+
&.vc-tree-select--active {
|
|
371
|
+
&:hover:not(.is-disabled) {
|
|
372
|
+
@apply shadow-focus-outer;
|
|
373
|
+
}
|
|
374
|
+
&:focus:not(.is-disabled):not(.is-error) {
|
|
375
|
+
@apply border-active-elements--focus;
|
|
376
|
+
}
|
|
377
|
+
}
|
|
378
|
+
&.vc-tree-select--primary {
|
|
379
|
+
&:hover:not(.is-disabled) {
|
|
380
|
+
@apply shadow-focus-outer-primary;
|
|
381
|
+
}
|
|
382
|
+
&:focus:not(.is-disabled):not(.is-error) {
|
|
383
|
+
@apply border-primary-actions--focus;
|
|
384
|
+
}
|
|
385
|
+
}
|
|
386
|
+
&.vc-tree-select--secondary {
|
|
387
|
+
&:hover:not(.is-disabled) {
|
|
388
|
+
@apply shadow-focus-outer-secondary;
|
|
389
|
+
}
|
|
390
|
+
}
|
|
391
|
+
&.vc-tree-select--destructive {
|
|
392
|
+
&:hover:not(.is-disabled) {
|
|
393
|
+
@apply shadow-focus-outer-destructive;
|
|
394
|
+
}
|
|
395
|
+
}
|
|
396
|
+
}
|
|
397
|
+
&__tags {
|
|
398
|
+
@apply flex-grow;
|
|
399
|
+
.vc-tree-select__tag-item {
|
|
400
|
+
@apply mr-1;
|
|
401
|
+
}
|
|
402
|
+
}
|
|
403
|
+
&__wrap {
|
|
404
|
+
&--focus:not(&--disabled):not(&--error) {
|
|
405
|
+
.vc-tree-select__container {
|
|
406
|
+
@apply border-primary-actions--focus;
|
|
407
|
+
&.vc-tree-select--active {
|
|
408
|
+
&:not(.is-error) {
|
|
409
|
+
@apply border-active-elements--focus;
|
|
410
|
+
}
|
|
411
|
+
}
|
|
412
|
+
&.vc-tree-select--primary {
|
|
413
|
+
&:not(.is-error) {
|
|
414
|
+
@apply border-primary-actions--focus;
|
|
415
|
+
}
|
|
416
|
+
}
|
|
417
|
+
&.vc-tree-select--secondary {
|
|
418
|
+
&:not(.is-error) {
|
|
419
|
+
@apply border-secondary-actions--focus;
|
|
420
|
+
}
|
|
421
|
+
}
|
|
422
|
+
&.vc-tree-select--destructive {
|
|
423
|
+
&:not(.is-error) {
|
|
424
|
+
@apply border-destructive-actions--focus;
|
|
425
|
+
}
|
|
426
|
+
}
|
|
427
|
+
}
|
|
428
|
+
}
|
|
429
|
+
&--error {
|
|
430
|
+
.vc-tree-select__container {
|
|
431
|
+
@apply border-error;
|
|
432
|
+
}
|
|
433
|
+
}
|
|
434
|
+
&--disabled {
|
|
435
|
+
.vc-tree-select__container, input {
|
|
436
|
+
@apply bg-default-bg;
|
|
437
|
+
&:hover {
|
|
438
|
+
@apply cursor-not-allowed shadow-none;
|
|
439
|
+
}
|
|
440
|
+
}
|
|
441
|
+
}
|
|
442
|
+
}
|
|
443
|
+
&__content {
|
|
444
|
+
@apply flex-grow flex-wrap;
|
|
445
|
+
overflow: hidden;
|
|
446
|
+
flex: 1 0 2rem;
|
|
447
|
+
}
|
|
448
|
+
&__empty-text {
|
|
449
|
+
@apply text-center text-inactive-elements pt-2 items-center;
|
|
450
|
+
}
|
|
451
|
+
&__dropdown-content {
|
|
452
|
+
@apply overflow-hidden py-3 px-1;
|
|
453
|
+
}
|
|
454
|
+
}
|
|
455
|
+
</style>
|
|
456
|
+
<style lang="scss">
|
|
457
|
+
[dir='rtl'] {
|
|
458
|
+
.vc-tree-select {
|
|
459
|
+
&__container {
|
|
460
|
+
@apply pr-3;
|
|
461
|
+
&.is-prefix-icon {
|
|
462
|
+
@apply pr-0;
|
|
463
|
+
}
|
|
464
|
+
}
|
|
465
|
+
&__tags {
|
|
466
|
+
.vc-tag-input__tag-item {
|
|
467
|
+
@apply mr-0 ml-1;
|
|
468
|
+
}
|
|
469
|
+
}
|
|
470
|
+
}
|
|
471
|
+
}
|
|
472
|
+
</style>
|
|
@@ -0,0 +1,99 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div
|
|
3
|
+
class="vc-vertical-tabs__nav"
|
|
4
|
+
>
|
|
5
|
+
<div
|
|
6
|
+
v-for="(option, index) in options"
|
|
7
|
+
:key="optionKey(option, index, config)"
|
|
8
|
+
:class="{
|
|
9
|
+
'is_active': optionKey(option, index, config) === activeTab && !optionDisabled(option, {disabledKey: 'disabled'}),
|
|
10
|
+
'is_disabled': optionDisabled(option, {disabledKey: 'disabled'})
|
|
11
|
+
}"
|
|
12
|
+
class="vc-vertical-tabs__item"
|
|
13
|
+
:tabindex="optionDisabled(option, {disabledKey: 'disabled'}) ? -1 : 0"
|
|
14
|
+
@click="onClick(option, optionKey(option, index, config))"
|
|
15
|
+
@keyup.enter="onClick(option, optionKey(option, index, config))"
|
|
16
|
+
>
|
|
17
|
+
<div
|
|
18
|
+
class="flex items-center"
|
|
19
|
+
>
|
|
20
|
+
<i
|
|
21
|
+
:class="optionIcon(option, config)"
|
|
22
|
+
class="vertical-tab-icon icon-base min-w-4"
|
|
23
|
+
/>
|
|
24
|
+
<div
|
|
25
|
+
class="tab-name-content mx-2 tab-name text-sm font-medium focus:outline-none"
|
|
26
|
+
>
|
|
27
|
+
{{ optionLabel(option, config) }}
|
|
28
|
+
</div>
|
|
29
|
+
</div>
|
|
30
|
+
</div>
|
|
31
|
+
</div>
|
|
32
|
+
</template>
|
|
33
|
+
|
|
34
|
+
<script lang="ts">
|
|
35
|
+
import { defineComponent } from 'vue'
|
|
36
|
+
import optionMethods from '@/mixins/optionMethods.mixin'
|
|
37
|
+
import { OptionType } from '@/types/OptionAndConfig.types'
|
|
38
|
+
import { KeyAttributeType } from '@/types/VueGeneric.types'
|
|
39
|
+
|
|
40
|
+
export default defineComponent({
|
|
41
|
+
name: 'VerticalTabNav',
|
|
42
|
+
mixins: [optionMethods],
|
|
43
|
+
props: {
|
|
44
|
+
activeIndex: {
|
|
45
|
+
type: String,
|
|
46
|
+
required: true
|
|
47
|
+
}
|
|
48
|
+
},
|
|
49
|
+
emits: ['change', 'indexOfActiveElement'],
|
|
50
|
+
data () {
|
|
51
|
+
return {
|
|
52
|
+
activeTab: '' as KeyAttributeType | unknown | undefined
|
|
53
|
+
}
|
|
54
|
+
},
|
|
55
|
+
watch: {
|
|
56
|
+
modelValue (val) {
|
|
57
|
+
this.activeTab = val
|
|
58
|
+
}
|
|
59
|
+
},
|
|
60
|
+
mounted () {
|
|
61
|
+
this.activeTab = this.activeIndex
|
|
62
|
+
},
|
|
63
|
+
methods: {
|
|
64
|
+
onClick (option: OptionType, item: KeyAttributeType): void {
|
|
65
|
+
this.activeTab = item
|
|
66
|
+
this.$emit('change', option)
|
|
67
|
+
this.$emit('indexOfActiveElement', item)
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
})
|
|
71
|
+
</script>
|
|
72
|
+
|
|
73
|
+
<style lang="scss" scoped>
|
|
74
|
+
.vc-vertical-tabs__nav {
|
|
75
|
+
@apply h-full;
|
|
76
|
+
.vc-vertical-tabs__item {
|
|
77
|
+
@apply mx-1 my-2;
|
|
78
|
+
}
|
|
79
|
+
.vc-vertical-tabs__item {
|
|
80
|
+
@apply outline-none leading-40px relative cursor-pointer h-10 bg-white rounded-sm select-none font-normal text-default-text text-sm transition-all duration-500 ease-in-out pl-5 pr-5 shadow-vertical-tab-item;
|
|
81
|
+
.vertical-tab-icon {
|
|
82
|
+
@apply text-active-elements transition-all duration-500 ease-in-out;
|
|
83
|
+
}
|
|
84
|
+
&:focus-visible {
|
|
85
|
+
@apply outline-none;
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
&.is_active, &:hover, &:focus-visible {
|
|
89
|
+
@apply bg-active-elements text-white;
|
|
90
|
+
.vertical-tab-icon {
|
|
91
|
+
@apply text-white;
|
|
92
|
+
}
|
|
93
|
+
}
|
|
94
|
+
&.is_disabled {
|
|
95
|
+
@apply cursor-not-allowed opacity-50 pointer-events-none;
|
|
96
|
+
}
|
|
97
|
+
}
|
|
98
|
+
}
|
|
99
|
+
</style>
|
|
@@ -0,0 +1,125 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div class="vc-vertical-tabs">
|
|
3
|
+
<div class="vc-vertical-tabs__wrapper">
|
|
4
|
+
<div class="vc-vertical-tabs__header">
|
|
5
|
+
<div class="ml-1 mb-2 text-sm font-medium">
|
|
6
|
+
{{ tabsTitle }}
|
|
7
|
+
</div>
|
|
8
|
+
<div class="vc-vertical-tabs__nav-wrapper">
|
|
9
|
+
<vertical-tab-nav
|
|
10
|
+
:options="options"
|
|
11
|
+
:config="config"
|
|
12
|
+
:active-index="modelValue"
|
|
13
|
+
@index-of-active-element="getActiveIndex"
|
|
14
|
+
@change="change"
|
|
15
|
+
/>
|
|
16
|
+
</div>
|
|
17
|
+
</div>
|
|
18
|
+
<div class="vc-vertical-tabs__content-wrapper">
|
|
19
|
+
<div class="mb-2 text-sm font-medium">
|
|
20
|
+
{{ tabTitle }}
|
|
21
|
+
</div>
|
|
22
|
+
<div class="vc-vertical-tabs__content py-2">
|
|
23
|
+
<div class="vc-vertical-tabs__content--content overflow-y-auto h-full">
|
|
24
|
+
<slot :name="slotName" />
|
|
25
|
+
</div>
|
|
26
|
+
</div>
|
|
27
|
+
</div>
|
|
28
|
+
</div>
|
|
29
|
+
</div>
|
|
30
|
+
</template>
|
|
31
|
+
|
|
32
|
+
<script lang="ts">
|
|
33
|
+
import { defineComponent } from 'vue'
|
|
34
|
+
import VerticalTabNav from '@/components/VcVerticalTabs/UiComponents/VerticalTabNav.vue'
|
|
35
|
+
import optionMethods from '@/mixins/optionMethods.mixin'
|
|
36
|
+
import { KeyAttributeType } from '@/types/VueGeneric.types'
|
|
37
|
+
import { OptionType } from '@/types/OptionAndConfig.types'
|
|
38
|
+
|
|
39
|
+
export default defineComponent({
|
|
40
|
+
name: 'VcVerticalTabs',
|
|
41
|
+
components: { VerticalTabNav },
|
|
42
|
+
mixins: [optionMethods],
|
|
43
|
+
props: {
|
|
44
|
+
modelValue: {
|
|
45
|
+
type: String,
|
|
46
|
+
required: true
|
|
47
|
+
},
|
|
48
|
+
tabTitle: {
|
|
49
|
+
type: String,
|
|
50
|
+
default: ''
|
|
51
|
+
},
|
|
52
|
+
tabsTitle: {
|
|
53
|
+
type: String,
|
|
54
|
+
default: ''
|
|
55
|
+
}
|
|
56
|
+
},
|
|
57
|
+
emits: ['change', 'update:modelValue'],
|
|
58
|
+
data () {
|
|
59
|
+
return {
|
|
60
|
+
activeElement: '' as KeyAttributeType | unknown | undefined
|
|
61
|
+
}
|
|
62
|
+
},
|
|
63
|
+
computed: {
|
|
64
|
+
slotName () {
|
|
65
|
+
const allKeys: KeyAttributeType[] | unknown[] | undefined[] = Object.values(this.options).map((el, index) => typeof el === 'object' && this.optionKey(el, index, this.config))
|
|
66
|
+
const validationIsStringAndNotEmpty = typeof this.activeElement === 'string' && this.activeElement
|
|
67
|
+
|
|
68
|
+
return validationIsStringAndNotEmpty && allKeys.includes(this.activeElement) ? this.activeElement : ''
|
|
69
|
+
}
|
|
70
|
+
},
|
|
71
|
+
mounted () {
|
|
72
|
+
this.activeElement = this.modelValue
|
|
73
|
+
},
|
|
74
|
+
methods: {
|
|
75
|
+
getActiveIndex (index: KeyAttributeType | unknown | undefined) {
|
|
76
|
+
this.activeElement = index
|
|
77
|
+
this.$emit('update:modelValue', index)
|
|
78
|
+
},
|
|
79
|
+
change (val: OptionType) {
|
|
80
|
+
this.$emit('change', val)
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
})
|
|
84
|
+
</script>
|
|
85
|
+
|
|
86
|
+
<style lang="scss">
|
|
87
|
+
$max-height: 300px;
|
|
88
|
+
|
|
89
|
+
.vc-vertical-tabs {
|
|
90
|
+
@apply box-border max-h-inherit bg-transparent max-w-full h-fit-content;
|
|
91
|
+
&__wrapper {
|
|
92
|
+
@apply flex flex-row w-full;
|
|
93
|
+
}
|
|
94
|
+
&__header {
|
|
95
|
+
@apply mr-1.5 h-auto mb-0 overflow-hidden min-w-xs relative;
|
|
96
|
+
}
|
|
97
|
+
&__nav-wrapper {
|
|
98
|
+
@apply overflow-y-auto pr-0.5;
|
|
99
|
+
max-height: $max-height;
|
|
100
|
+
}
|
|
101
|
+
&__content-wrapper {
|
|
102
|
+
@apply flex-grow h-auto overflow-hidden;
|
|
103
|
+
}
|
|
104
|
+
&__content {
|
|
105
|
+
@apply h-full;
|
|
106
|
+
max-height: $max-height;
|
|
107
|
+
&--content {
|
|
108
|
+
@apply border border-secondary-actions rounded-md p-4 bg-default-bg;
|
|
109
|
+
}
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
::-webkit-scrollbar {
|
|
113
|
+
@apply w-1.5 h-1.5;
|
|
114
|
+
}
|
|
115
|
+
::-webkit-scrollbar-track {
|
|
116
|
+
@apply rounded-lg shadow-vertical-tab-scroll mt-2;
|
|
117
|
+
}
|
|
118
|
+
::-webkit-scrollbar-thumb {
|
|
119
|
+
@apply bg-secondary-actions rounded-xxl;
|
|
120
|
+
}
|
|
121
|
+
::-webkit-scrollbar-thumb:hover {
|
|
122
|
+
@apply bg-secondary-actions--focus;
|
|
123
|
+
}
|
|
124
|
+
}
|
|
125
|
+
</style>
|