@veritree/ui 0.22.3 → 0.24.0
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/mixins/floating-ui-content.js +0 -21
- package/mixins/floating-ui-item.js +88 -46
- package/mixins/floating-ui.js +4 -13
- package/mixins/form-control-icon.js +2 -2
- package/mixins/form-control.js +9 -5
- package/nuxt.js +1 -0
- package/package.json +1 -1
- package/src/components/Avatar/VTAvatarImage.vue +26 -6
- package/src/components/Button/VTButton.vue +5 -5
- package/src/components/Dialog/VTDialog.vue +6 -15
- package/src/components/Dialog/VTDialogClose.vue +19 -25
- package/src/components/Dialog/VTDialogContent.vue +18 -21
- package/src/components/Dialog/VTDialogFooter.vue +7 -18
- package/src/components/Dialog/VTDialogHeader.vue +15 -18
- package/src/components/Dialog/VTDialogMain.vue +11 -18
- package/src/components/Dialog/VTDialogOverlay.vue +14 -18
- package/src/components/Dialog/VTDialogTitle.vue +10 -7
- package/src/components/Drawer/VTDrawerContent.vue +1 -1
- package/src/components/Drawer/VTDrawerFooter.vue +1 -1
- package/src/components/DropdownMenu/VTDropdownMenu.vue +19 -0
- package/src/components/DropdownMenu/VTDropdownMenuContent.vue +5 -6
- package/src/components/DropdownMenu/VTDropdownMenuItem.vue +2 -2
- package/src/components/Form/VTFormFeedback.vue +5 -5
- package/src/components/Form/VTInput.vue +5 -2
- package/src/components/Form/VTTextarea.vue +5 -2
- package/src/components/Listbox/VTListbox.vue +35 -11
- package/src/components/Listbox/VTListboxContent.vue +4 -7
- package/src/components/Listbox/VTListboxItem.vue +117 -6
- package/src/components/Listbox/VTListboxList.vue +1 -24
- package/src/components/Listbox/VTListboxSearch.vue +58 -52
- package/src/components/Listbox/VTListboxTrigger.vue +7 -4
- package/src/components/Modal/VTModal.vue +1 -1
- package/src/components/Popover/VTPopover.vue +19 -0
- package/src/components/Popover/VTPopoverContent.vue +3 -3
- package/src/components/Tooltip/VTTooltip.vue +65 -0
- package/src/components/Tooltip/VTTooltipContent.vue +59 -0
- package/src/components/Tooltip/VTTooltipTrigger.vue +100 -0
- package/src/components/Utils/FloatingUi.vue +27 -13
|
@@ -7,19 +7,19 @@
|
|
|
7
7
|
leave-active-class="duration-200 ease-in"
|
|
8
8
|
leave-class="translate-y-0 opacity-100"
|
|
9
9
|
leave-to-class="translate-y-[15px] opacity-0"
|
|
10
|
-
@after-leave="
|
|
10
|
+
@after-leave="hidden"
|
|
11
|
+
@after-enter="shown"
|
|
11
12
|
>
|
|
12
13
|
<div
|
|
13
14
|
v-if="visible"
|
|
14
|
-
:id="id"
|
|
15
15
|
:class="[
|
|
16
16
|
headless
|
|
17
|
-
?
|
|
18
|
-
:
|
|
19
|
-
floatingUiClass ? floatingUiClass : null,
|
|
17
|
+
? `${this.component}-content`
|
|
18
|
+
: `shadow-300 absolute z-50 grid overflow-x-hidden rounded-md py-2 px-3 ${this.classes} ${this.portalClass}`,
|
|
20
19
|
]"
|
|
20
|
+
v-bind="$attrs"
|
|
21
21
|
>
|
|
22
|
-
<slot
|
|
22
|
+
<slot />
|
|
23
23
|
</div>
|
|
24
24
|
</transition>
|
|
25
25
|
</Portal>
|
|
@@ -34,27 +34,41 @@ export default {
|
|
|
34
34
|
},
|
|
35
35
|
|
|
36
36
|
props: {
|
|
37
|
+
component: {
|
|
38
|
+
type: String,
|
|
39
|
+
default: null,
|
|
40
|
+
},
|
|
37
41
|
headless: {
|
|
38
42
|
type: Boolean,
|
|
39
43
|
default: false,
|
|
40
44
|
},
|
|
41
|
-
id: {
|
|
42
|
-
type: [String, Number],
|
|
43
|
-
default: null,
|
|
44
|
-
},
|
|
45
45
|
visible: {
|
|
46
46
|
type: Boolean,
|
|
47
47
|
default: false,
|
|
48
48
|
},
|
|
49
|
-
|
|
49
|
+
portalClass: {
|
|
50
50
|
type: [String, Function],
|
|
51
51
|
default: null,
|
|
52
52
|
},
|
|
53
53
|
},
|
|
54
54
|
|
|
55
|
+
computed: {
|
|
56
|
+
isTooltip() {
|
|
57
|
+
return this.component === 'tooltip';
|
|
58
|
+
},
|
|
59
|
+
|
|
60
|
+
classes() {
|
|
61
|
+
return this.isTooltip ? 'bg-gray-800 text-sm text-white' : 'bg-white';
|
|
62
|
+
},
|
|
63
|
+
},
|
|
64
|
+
|
|
55
65
|
methods: {
|
|
56
|
-
|
|
57
|
-
this.$emit('
|
|
66
|
+
shown() {
|
|
67
|
+
this.$emit('shown');
|
|
68
|
+
},
|
|
69
|
+
|
|
70
|
+
hidden() {
|
|
71
|
+
this.$emit('hidden');
|
|
58
72
|
},
|
|
59
73
|
},
|
|
60
74
|
};
|