sprintify-ui 0.10.12 → 0.10.14

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 (58) hide show
  1. package/dist/sprintify-ui.es.js +15478 -15451
  2. package/dist/types/components/BaseActionButtons.vue.d.ts +13 -0
  3. package/dist/types/components/BaseAlert.vue.d.ts +1 -1
  4. package/dist/types/components/BaseAssign.vue.d.ts +2 -2
  5. package/dist/types/components/BaseAutocomplete.vue.d.ts +8 -8
  6. package/dist/types/components/BaseAutocompleteFetch.vue.d.ts +18 -18
  7. package/dist/types/components/BaseBadge.vue.d.ts +2 -2
  8. package/dist/types/components/BaseBelongsTo.vue.d.ts +18 -18
  9. package/dist/types/components/BaseBelongsToFetch.vue.d.ts +11 -11
  10. package/dist/types/components/BaseButton.vue.d.ts +2 -2
  11. package/dist/types/components/BaseButtonGroup.vue.d.ts +3 -3
  12. package/dist/types/components/BaseColor.vue.d.ts +2 -2
  13. package/dist/types/components/BaseCounter.vue.d.ts +1 -1
  14. package/dist/types/components/BaseDataIterator.vue.d.ts +2 -2
  15. package/dist/types/components/BaseDataTable.vue.d.ts +18 -14
  16. package/dist/types/components/BaseDatePicker.vue.d.ts +3 -3
  17. package/dist/types/components/BaseDateSelect.vue.d.ts +2 -2
  18. package/dist/types/components/BaseDialog.vue.d.ts +9 -9
  19. package/dist/types/components/BaseDropdownAutocomplete.vue.d.ts +2 -2
  20. package/dist/types/components/BaseField.vue.d.ts +2 -2
  21. package/dist/types/components/BaseFieldI18n.vue.d.ts +1 -1
  22. package/dist/types/components/BaseFileUploader.vue.d.ts +1 -1
  23. package/dist/types/components/BaseHasMany.vue.d.ts +18 -18
  24. package/dist/types/components/BaseHasManyFetch.vue.d.ts +7 -7
  25. package/dist/types/components/BaseHeader.vue.d.ts +4 -1
  26. package/dist/types/components/BaseInput.vue.d.ts +2 -2
  27. package/dist/types/components/BaseInputPercent.vue.d.ts +2 -2
  28. package/dist/types/components/BaseLoadingCover.vue.d.ts +1 -1
  29. package/dist/types/components/BaseMediaLibrary.vue.d.ts +1 -1
  30. package/dist/types/components/BaseMenu.vue.d.ts +2 -2
  31. package/dist/types/components/BaseMenuItem.vue.d.ts +4 -4
  32. package/dist/types/components/BaseNavbarItemContent.vue.d.ts +1 -1
  33. package/dist/types/components/BaseNavbarSideItemContent.vue.d.ts +1 -1
  34. package/dist/types/components/BasePanel.vue.d.ts +1 -1
  35. package/dist/types/components/BasePassword.vue.d.ts +2 -2
  36. package/dist/types/components/BaseRadioGroup.vue.d.ts +2 -2
  37. package/dist/types/components/BaseRichText.vue.d.ts +2 -2
  38. package/dist/types/components/BaseSelect.vue.d.ts +2 -2
  39. package/dist/types/components/BaseSwitch.vue.d.ts +3 -3
  40. package/dist/types/components/BaseTableColumn.vue.d.ts +3 -3
  41. package/dist/types/components/BaseTagAutocomplete.vue.d.ts +4 -4
  42. package/dist/types/components/BaseTagAutocompleteFetch.vue.d.ts +17 -17
  43. package/dist/types/components/BaseTextarea.vue.d.ts +2 -2
  44. package/dist/types/components/BaseTextareaAutoresize.vue.d.ts +2 -2
  45. package/dist/types/components/BaseTimePicker.vue.d.ts +2 -2
  46. package/dist/types/components/BaseTooltip.vue.d.ts +8 -0
  47. package/dist/types/components/index.d.ts +2 -1
  48. package/dist/types/composables/tooltip.d.ts +1 -1
  49. package/package.json +1 -1
  50. package/src/components/BaseActionButtons.vue +77 -0
  51. package/src/components/BaseDataTable.stories.js +26 -2
  52. package/src/components/BaseDataTable.vue +6 -21
  53. package/src/components/BaseHeader.stories.js +3 -0
  54. package/src/components/BaseHeader.vue +24 -78
  55. package/src/components/BaseNavbarSideItem.vue +15 -13
  56. package/src/components/BaseTooltip.vue +10 -2
  57. package/src/components/index.ts +2 -0
  58. 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
- options: UseFloatingOptions | undefined = undefined
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
- renderShow();
34
+ showDebounce();
33
35
  });
34
36
 
35
37
  useEventListener(elementRef, 'mouseleave', () => {
36
38
  nextShow = false;
37
- renderShow();
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
- renderShow();
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
- renderShow();
55
+ hideDebounce();
54
56
  });
55
57
 
56
- const renderShow = debounce(() => {
57
- show.value = nextShow;
58
- }, interactive ? 150 : 0);
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(6), flip(), shift()],
74
+ middleware: [offset2(offset), flip(), shift()],
63
75
  whileElementsMounted: autoUpdate,
64
76
  };
65
77