sprintify-ui 0.10.11 → 0.10.13
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/dist/sprintify-ui.es.js +15479 -15452
- package/dist/types/components/BaseActionButtons.vue.d.ts +13 -0
- package/dist/types/components/BaseAlert.vue.d.ts +1 -1
- package/dist/types/components/BaseAssign.vue.d.ts +2 -2
- package/dist/types/components/BaseAutocomplete.vue.d.ts +8 -8
- package/dist/types/components/BaseAutocompleteFetch.vue.d.ts +18 -18
- package/dist/types/components/BaseBadge.vue.d.ts +2 -2
- package/dist/types/components/BaseBelongsTo.vue.d.ts +18 -18
- package/dist/types/components/BaseBelongsToFetch.vue.d.ts +11 -11
- package/dist/types/components/BaseButton.vue.d.ts +2 -2
- package/dist/types/components/BaseButtonGroup.vue.d.ts +3 -3
- package/dist/types/components/BaseColor.vue.d.ts +2 -2
- package/dist/types/components/BaseCounter.vue.d.ts +1 -1
- package/dist/types/components/BaseDataIterator.vue.d.ts +2 -2
- package/dist/types/components/BaseDataTable.vue.d.ts +18 -14
- package/dist/types/components/BaseDatePicker.vue.d.ts +3 -3
- package/dist/types/components/BaseDateSelect.vue.d.ts +2 -2
- package/dist/types/components/BaseDialog.vue.d.ts +9 -9
- package/dist/types/components/BaseDropdownAutocomplete.vue.d.ts +2 -2
- package/dist/types/components/BaseField.vue.d.ts +2 -2
- package/dist/types/components/BaseFieldI18n.vue.d.ts +1 -1
- package/dist/types/components/BaseFileUploader.vue.d.ts +1 -1
- package/dist/types/components/BaseHasMany.vue.d.ts +18 -18
- package/dist/types/components/BaseHasManyFetch.vue.d.ts +7 -7
- package/dist/types/components/BaseHeader.vue.d.ts +4 -1
- package/dist/types/components/BaseInput.vue.d.ts +2 -2
- package/dist/types/components/BaseInputPercent.vue.d.ts +2 -2
- package/dist/types/components/BaseLoadingCover.vue.d.ts +1 -1
- package/dist/types/components/BaseMediaLibrary.vue.d.ts +1 -1
- package/dist/types/components/BaseMenu.vue.d.ts +2 -2
- package/dist/types/components/BaseMenuItem.vue.d.ts +4 -4
- package/dist/types/components/BaseNavbarItemContent.vue.d.ts +1 -1
- package/dist/types/components/BaseNavbarSideItemContent.vue.d.ts +1 -1
- package/dist/types/components/BasePanel.vue.d.ts +1 -1
- package/dist/types/components/BasePassword.vue.d.ts +2 -2
- package/dist/types/components/BaseRadioGroup.vue.d.ts +2 -2
- package/dist/types/components/BaseRichText.vue.d.ts +2 -2
- package/dist/types/components/BaseSelect.vue.d.ts +2 -2
- package/dist/types/components/BaseSwitch.vue.d.ts +3 -3
- package/dist/types/components/BaseTableColumn.vue.d.ts +3 -3
- package/dist/types/components/BaseTagAutocomplete.vue.d.ts +4 -4
- package/dist/types/components/BaseTagAutocompleteFetch.vue.d.ts +17 -17
- package/dist/types/components/BaseTextarea.vue.d.ts +2 -2
- package/dist/types/components/BaseTextareaAutoresize.vue.d.ts +2 -2
- package/dist/types/components/BaseTimePicker.vue.d.ts +2 -2
- package/dist/types/components/BaseTooltip.vue.d.ts +8 -0
- package/dist/types/components/index.d.ts +2 -1
- package/dist/types/composables/tooltip.d.ts +1 -1
- package/package.json +1 -1
- package/src/components/BaseActionButtons.vue +77 -0
- package/src/components/BaseDataTable.stories.js +26 -2
- package/src/components/BaseDataTable.vue +6 -21
- package/src/components/BaseHeader.stories.js +3 -0
- package/src/components/BaseHeader.vue +24 -78
- package/src/components/BaseNavbarSideItem.vue +15 -13
- package/src/components/BaseTable.vue +2 -2
- package/src/components/BaseTooltip.vue +10 -2
- package/src/components/index.ts +2 -0
- package/src/composables/tooltip.ts +22 -10
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { UseFloatingOptions, MaybeElement, UseFloatingReturn, autoUpdate, flip, offset, shift, useFloating } from "@floating-ui/vue";
|
|
1
|
+
import { UseFloatingOptions, MaybeElement, UseFloatingReturn, autoUpdate, flip, offset as offset2, shift, useFloating } from "@floating-ui/vue";
|
|
2
2
|
import { unrefElement, useEventListener, } from "@vueuse/core";
|
|
3
3
|
import { debounce } from "lodash";
|
|
4
4
|
|
|
@@ -12,7 +12,9 @@ function useTooltip(
|
|
|
12
12
|
reference: Readonly<Ref<MaybeElement<any>>>,
|
|
13
13
|
floating: Readonly<Ref<MaybeElement<HTMLElement>>>,
|
|
14
14
|
interactive: boolean = false,
|
|
15
|
-
|
|
15
|
+
delay: number = 0,
|
|
16
|
+
options: UseFloatingOptions | undefined = undefined,
|
|
17
|
+
offset: number = 6,
|
|
16
18
|
): ReturnType {
|
|
17
19
|
|
|
18
20
|
const show = ref(false);
|
|
@@ -29,12 +31,12 @@ function useTooltip(
|
|
|
29
31
|
|
|
30
32
|
useEventListener(elementRef, 'mouseenter', () => {
|
|
31
33
|
nextShow = true;
|
|
32
|
-
|
|
34
|
+
showDebounce();
|
|
33
35
|
});
|
|
34
36
|
|
|
35
37
|
useEventListener(elementRef, 'mouseleave', () => {
|
|
36
38
|
nextShow = false;
|
|
37
|
-
|
|
39
|
+
hideDebounce();
|
|
38
40
|
});
|
|
39
41
|
|
|
40
42
|
useEventListener(floatingRef, 'mouseenter', () => {
|
|
@@ -42,7 +44,7 @@ function useTooltip(
|
|
|
42
44
|
return;
|
|
43
45
|
}
|
|
44
46
|
nextShow = true;
|
|
45
|
-
|
|
47
|
+
showDebounce();
|
|
46
48
|
});
|
|
47
49
|
|
|
48
50
|
useEventListener(floatingRef, 'mouseleave', () => {
|
|
@@ -50,16 +52,26 @@ function useTooltip(
|
|
|
50
52
|
return;
|
|
51
53
|
}
|
|
52
54
|
nextShow = false;
|
|
53
|
-
|
|
55
|
+
hideDebounce();
|
|
54
56
|
});
|
|
55
57
|
|
|
56
|
-
const
|
|
57
|
-
|
|
58
|
-
|
|
58
|
+
const showDebounce = debounce(() => {
|
|
59
|
+
if (!nextShow) {
|
|
60
|
+
return;
|
|
61
|
+
}
|
|
62
|
+
show.value = true;
|
|
63
|
+
}, delay);
|
|
64
|
+
|
|
65
|
+
const hideDebounce = debounce(() => {
|
|
66
|
+
if (nextShow) {
|
|
67
|
+
return;
|
|
68
|
+
}
|
|
69
|
+
show.value = false;
|
|
70
|
+
}, interactive ? 0 : 150);
|
|
59
71
|
|
|
60
72
|
const config = {
|
|
61
73
|
placement: 'top',
|
|
62
|
-
middleware: [offset
|
|
74
|
+
middleware: [offset2(offset), flip(), shift()],
|
|
63
75
|
whileElementsMounted: autoUpdate,
|
|
64
76
|
};
|
|
65
77
|
|