sprintify-ui 0.5.11 → 0.5.12

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 (44) hide show
  1. package/dist/sprintify-ui.es.js +15072 -16268
  2. package/dist/style.css +1 -1
  3. package/dist/tailwindcss/index.js +1 -0
  4. package/dist/types/src/components/BaseAddressForm.vue.d.ts +0 -5
  5. package/dist/types/src/components/BaseAutocomplete.vue.d.ts +1 -1
  6. package/dist/types/src/components/BaseAutocompleteFetch.vue.d.ts +1 -1
  7. package/dist/types/src/components/BaseAvatar.vue.d.ts +18 -0
  8. package/dist/types/src/components/BaseCalendar.vue.d.ts +2 -2
  9. package/dist/types/src/components/BaseClipboard.vue.d.ts +0 -1
  10. package/dist/types/src/components/BaseDisplayRelativeTime.vue.d.ts +3 -4
  11. package/dist/types/src/components/BaseDropdownAutocomplete.vue.d.ts +2 -2
  12. package/dist/types/src/components/BaseIconPicker.vue.d.ts +9 -9
  13. package/dist/types/src/components/BaseInput.vue.d.ts +2 -2
  14. package/dist/types/src/components/BaseInputLabel.vue.d.ts +0 -1
  15. package/dist/types/src/components/BaseInputPercent.vue.d.ts +2 -2
  16. package/dist/types/src/components/BaseLoadingCover.vue.d.ts +2 -2
  17. package/dist/types/src/components/BaseMediaLibrary.vue.d.ts +1 -1
  18. package/dist/types/src/components/BaseMenu.vue.d.ts +14 -5
  19. package/dist/types/src/components/BaseModalCenter.vue.d.ts +1 -1
  20. package/dist/types/src/components/BaseModalSide.vue.d.ts +1 -1
  21. package/dist/types/src/components/BaseRichText.vue.d.ts +1 -1
  22. package/dist/types/src/components/BaseSelect.vue.d.ts +1 -1
  23. package/dist/types/src/components/BaseTableColumn.vue.d.ts +2 -2
  24. package/dist/types/src/components/BaseTagAutocomplete.vue.d.ts +1 -1
  25. package/dist/types/src/components/BaseTagAutocompleteFetch.vue.d.ts +1 -1
  26. package/dist/types/src/components/BaseTextareaAutoresize.vue.d.ts +1 -1
  27. package/dist/types/src/components/BaseTooltip.vue.d.ts +20 -0
  28. package/dist/types/src/composables/tooltip.d.ts +7 -0
  29. package/package.json +2 -3
  30. package/src/assets/main.css +0 -1
  31. package/src/components/BaseAddressForm.vue +1 -2
  32. package/src/components/BaseAvatar.vue +42 -2
  33. package/src/components/BaseAvatarGroup.stories.js +1 -1
  34. package/src/components/BaseAvatarGroup.vue +2 -2
  35. package/src/components/BaseClipboard.vue +56 -34
  36. package/src/components/BaseCounter.vue +1 -1
  37. package/src/components/BaseDataTable.vue +3 -1
  38. package/src/components/BaseDisplayRelativeTime.vue +15 -12
  39. package/src/components/BaseHeader.vue +0 -1
  40. package/src/components/BaseInputLabel.vue +14 -11
  41. package/src/components/BaseLayoutNotificationDropdown.vue +1 -2
  42. package/src/components/BaseMenu.vue +121 -111
  43. package/src/components/BaseTooltip.vue +44 -0
  44. package/src/composables/tooltip.ts +43 -0
@@ -86,9 +86,9 @@ declare const _default: import("vue").DefineComponent<{
86
86
  type: NumberConstructor;
87
87
  };
88
88
  }>>, {
89
- delay: number;
90
- duration: string;
91
89
  modelValue: boolean;
90
+ duration: string;
91
+ delay: number;
92
92
  size: "sm" | "lg";
93
93
  twBackdrop: string;
94
94
  twIcon: string;
@@ -74,9 +74,9 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<{
74
74
  };
75
75
  }, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
76
76
  success: (...args: any[]) => void;
77
- "update:modelValue": (...args: any[]) => void;
78
77
  start: (...args: any[]) => void;
79
78
  end: (...args: any[]) => void;
79
+ "update:modelValue": (...args: any[]) => void;
80
80
  fail: (...args: any[]) => void;
81
81
  }, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
82
82
  modelValue: {
@@ -5,14 +5,18 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<{
5
5
  default: undefined;
6
6
  type: PropType<ActionItem[]>;
7
7
  };
8
- position: {
8
+ placement: {
9
9
  default: string;
10
- type: PropType<"custom" | "bottom-left" | "bottom-right">;
10
+ type: PropType<"top" | "bottom" | "top-start" | "top-end" | "bottom-start" | "bottom-end">;
11
11
  };
12
12
  size: {
13
13
  default: string;
14
14
  type: PropType<"xs" | "sm" | "md">;
15
15
  };
16
+ width: {
17
+ default: number;
18
+ type: NumberConstructor;
19
+ };
16
20
  twMenu: {
17
21
  default: string;
18
22
  type: PropType<string | string[]>;
@@ -26,14 +30,18 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<{
26
30
  default: undefined;
27
31
  type: PropType<ActionItem[]>;
28
32
  };
29
- position: {
33
+ placement: {
30
34
  default: string;
31
- type: PropType<"custom" | "bottom-left" | "bottom-right">;
35
+ type: PropType<"top" | "bottom" | "top-start" | "top-end" | "bottom-start" | "bottom-end">;
32
36
  };
33
37
  size: {
34
38
  default: string;
35
39
  type: PropType<"xs" | "sm" | "md">;
36
40
  };
41
+ width: {
42
+ default: number;
43
+ type: NumberConstructor;
44
+ };
37
45
  twMenu: {
38
46
  default: string;
39
47
  type: PropType<string | string[]>;
@@ -43,10 +51,11 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<{
43
51
  type: (ObjectConstructor | ArrayConstructor | StringConstructor)[];
44
52
  };
45
53
  }>>, {
54
+ placement: "top" | "bottom" | "top-start" | "top-end" | "bottom-start" | "bottom-end";
55
+ width: number;
46
56
  size: "xs" | "sm" | "md";
47
57
  items: ActionItem[];
48
58
  twButton: string | Record<string, any> | unknown[];
49
- position: "custom" | "bottom-left" | "bottom-right";
50
59
  twMenu: string | string[];
51
60
  }, {}>, {
52
61
  button?(_: {
@@ -62,10 +62,10 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<{
62
62
  }>> & {
63
63
  "onUpdate:modelValue"?: ((...args: any[]) => any) | undefined;
64
64
  }, {
65
- maxWidth: string;
66
65
  modelValue: boolean;
67
66
  closeOnOutsideClick: boolean;
68
67
  clipped: boolean;
68
+ maxWidth: string;
69
69
  twBackdrop: string | string[];
70
70
  verticalAlign: string;
71
71
  showCloseButton: boolean;
@@ -46,10 +46,10 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<{
46
46
  }>> & {
47
47
  "onUpdate:modelValue"?: ((...args: any[]) => any) | undefined;
48
48
  }, {
49
- maxWidth: string;
50
49
  modelValue: boolean;
51
50
  closeOnOutsideClick: boolean;
52
51
  clipped: boolean;
52
+ maxWidth: string;
53
53
  twBackdrop: string | string[];
54
54
  }, {}>, {
55
55
  default?(_: {
@@ -83,12 +83,12 @@ declare const _default: import("vue").DefineComponent<{
83
83
  }, {
84
84
  required: boolean;
85
85
  name: string;
86
- theme: "" | "snow" | "bubble";
87
86
  modelValue: string | Delta | null | undefined;
88
87
  placeholder: string;
89
88
  disabled: boolean;
90
89
  hasError: boolean;
91
90
  enable: boolean;
92
91
  toolbar: string | Record<string, any> | unknown[] | undefined;
92
+ theme: "" | "snow" | "bubble";
93
93
  }, {}>;
94
94
  export default _default;
@@ -82,11 +82,11 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<{
82
82
  }, {
83
83
  required: boolean;
84
84
  name: string;
85
+ options: Option[];
85
86
  modelValue: SelectOption | undefined;
86
87
  placeholder: string;
87
88
  disabled: boolean;
88
89
  hasError: boolean;
89
- options: Option[];
90
90
  labelKey: string;
91
91
  valueKey: string;
92
92
  }, {}>, {
@@ -155,11 +155,11 @@ declare const _default: import("vue").DefineComponent<{
155
155
  }>>, {
156
156
  label: string;
157
157
  meta: Record<string, any> | unknown[];
158
- width: number;
159
158
  toggle: boolean;
159
+ position: "left" | "right" | "center";
160
+ width: number;
160
161
  field: string;
161
162
  padding: string;
162
- position: "left" | "right" | "center";
163
163
  searchable: boolean;
164
164
  numeric: boolean;
165
165
  sortable: boolean;
@@ -81,8 +81,8 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<{
81
81
  open: typeof open;
82
82
  setKeywords: typeof setKeywords;
83
83
  }, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
84
- "update:modelValue": (...args: any[]) => void;
85
84
  close: (...args: any[]) => void;
85
+ "update:modelValue": (...args: any[]) => void;
86
86
  scrollBottom: (...args: any[]) => void;
87
87
  typing: (...args: any[]) => void;
88
88
  open: (...args: any[]) => void;
@@ -48,8 +48,8 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<{
48
48
  close: () => void | undefined;
49
49
  setKeywords: (input: string) => void | undefined;
50
50
  }, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
51
- "update:modelValue": (...args: any[]) => void;
52
51
  focus: (...args: any[]) => void;
52
+ "update:modelValue": (...args: any[]) => void;
53
53
  scrollBottom: (...args: any[]) => void;
54
54
  typing: (...args: any[]) => void;
55
55
  }, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
@@ -52,8 +52,8 @@ declare const _default: import("vue").DefineComponent<{
52
52
  }, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
53
53
  input: (...args: any[]) => void;
54
54
  submit: (...args: any[]) => void;
55
- "update:modelValue": (...args: any[]) => void;
56
55
  focus: (...args: any[]) => void;
56
+ "update:modelValue": (...args: any[]) => void;
57
57
  }, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
58
58
  modelValue: {
59
59
  default: string;
@@ -0,0 +1,20 @@
1
+ import { PropType } from 'vue';
2
+ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<{
3
+ target: {
4
+ required: true;
5
+ type: PropType<HTMLElement | null>;
6
+ };
7
+ }, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
8
+ target: {
9
+ required: true;
10
+ type: PropType<HTMLElement | null>;
11
+ };
12
+ }>>, {}, {}>, {
13
+ default?(_: {}): any;
14
+ }>;
15
+ export default _default;
16
+ type __VLS_WithTemplateSlots<T, S> = T & {
17
+ new (): {
18
+ $slots: S;
19
+ };
20
+ };
@@ -0,0 +1,7 @@
1
+ import { UseFloatingOptions, MaybeElement, UseFloatingReturn } from "@floating-ui/vue";
2
+ type ReturnType = UseFloatingReturn & {
3
+ showTooltip: Ref<boolean>;
4
+ };
5
+ import { Ref } from "vue";
6
+ declare function useTooltip(reference: Readonly<Ref<MaybeElement<any>>>, floating: Readonly<Ref<MaybeElement<HTMLElement>>>, options?: UseFloatingOptions | undefined): ReturnType;
7
+ export { useTooltip };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "sprintify-ui",
3
- "version": "0.5.11",
3
+ "version": "0.5.12",
4
4
  "scripts": {
5
5
  "build": "rimraf dist && vue-tsc && vite build",
6
6
  "build-fast": "rimraf dist && vite build",
@@ -29,7 +29,6 @@
29
29
  "lodash": "^4.17.21",
30
30
  "luxon": "^3.0.0",
31
31
  "maska": "^2.1.3",
32
- "microtip": "^0.2.2",
33
32
  "object-to-formdata": "^4.4.2",
34
33
  "pinia": "^2.0.0",
35
34
  "qs": "^6.0.0",
@@ -39,6 +38,7 @@
39
38
  "vue-router": "^4.0.0"
40
39
  },
41
40
  "dependencies": {
41
+ "@floating-ui/vue": "^1.0.2",
42
42
  "@fullcalendar/core": "^6.1.8",
43
43
  "@fullcalendar/daygrid": "^6.1.8",
44
44
  "@fullcalendar/interaction": "^6.1.8",
@@ -98,7 +98,6 @@
98
98
  "lodash": "^4.17.21",
99
99
  "luxon": "^3.2.1",
100
100
  "maska": "^2.1.6",
101
- "microtip": "^0.2.2",
102
101
  "object-hash": "^3.0.0",
103
102
  "object-to-formdata": "^4.4.2",
104
103
  "pinia": "^2.0.30",
@@ -1,4 +1,3 @@
1
- @import "microtip/microtip.css";
2
1
  @import "./form.css";
3
2
  @import "./flatpickr.css";
4
3
 
@@ -119,7 +119,7 @@ const props = withDefaults(
119
119
  defineProps<{
120
120
  modelValue: undefined | null | Address;
121
121
  prefix: string | null;
122
- required: boolean;
122
+ required?: boolean;
123
123
  countries?: Country[];
124
124
  regions?: Region[];
125
125
  restrictCountry?: boolean;
@@ -127,7 +127,6 @@ const props = withDefaults(
127
127
  hideCountry?: boolean;
128
128
  }>(),
129
129
  {
130
- required: false,
131
130
  modelValue() {
132
131
  return {};
133
132
  },
@@ -1,13 +1,14 @@
1
1
  <template>
2
2
  <component
3
3
  :is="to ? 'RouterLink' : 'div'"
4
+ ref="buttonRef"
4
5
  :to="to"
5
- class="flex shrink-0 items-center"
6
+ :class="classInternal"
6
7
  >
7
8
  <img
8
9
  :src="user.avatar_url"
9
10
  :class="[sizeClass, detailsPosition == 'left' ? 'order-2' : 'order-1']"
10
- class="shrink-0 overflow-hidden rounded-full object-cover object-center"
11
+ class="shrink-0 block overflow-hidden rounded-full object-cover object-center"
11
12
  >
12
13
  <div
13
14
  v-if="showDetails"
@@ -28,6 +29,20 @@
28
29
  {{ user.email }}
29
30
  </div>
30
31
  </div>
32
+
33
+ <BaseTooltip
34
+ v-if="tooltip"
35
+ :target="buttonRef"
36
+ >
37
+ <div>
38
+ <p class="text-xs font-medium leading-tight">
39
+ {{ user.full_name }}
40
+ </p>
41
+ <p class="text-xs text-slate-500 leading-tight">
42
+ {{ user.email }}
43
+ </p>
44
+ </div>
45
+ </BaseTooltip>
31
46
  </component>
32
47
  </template>
33
48
 
@@ -35,6 +50,12 @@
35
50
  import { PropType } from 'vue';
36
51
  import { User } from '@/types/User';
37
52
  import { RouteLocationRaw } from 'vue-router';
53
+ import { twMerge } from 'tailwind-merge';
54
+ import BaseTooltip from './BaseTooltip.vue';
55
+
56
+ defineOptions({
57
+ inheritAttrs: false,
58
+ })
38
59
 
39
60
  const props = defineProps({
40
61
  user: {
@@ -53,12 +74,31 @@ const props = defineProps({
53
74
  default: 'right',
54
75
  type: String as PropType<'left' | 'right'>,
55
76
  },
77
+ class: {
78
+ default: '',
79
+ type: String,
80
+ },
81
+ tooltip: {
82
+ default: false,
83
+ type: Boolean,
84
+ },
56
85
  to: {
57
86
  default: undefined,
58
87
  type: [String, Object] as PropType<RouteLocationRaw>,
59
88
  },
60
89
  });
61
90
 
91
+ const classInternal = computed(() => {
92
+ return twMerge(
93
+ 'inline-flex',
94
+ 'shrink-0',
95
+ 'items-center',
96
+ props.class,
97
+ );
98
+ })
99
+
100
+ const buttonRef = ref<HTMLElement | null>(null);
101
+
62
102
  const sizeClass = computed((): string => {
63
103
  const base = 'h-9 w-9';
64
104
 
@@ -13,7 +13,7 @@ export default {
13
13
 
14
14
  const user = {
15
15
  email: 'jane@witify.io',
16
- full_name: 'Jane Doe',
16
+ full_name: 'Jane Doe with a very long name',
17
17
  avatar_url:
18
18
  'https://images.unsplash.com/photo-1494790108377-be9c29b29330??auto=format&fit=crop&w=200&h=200&q=80&g=face',
19
19
  };
@@ -3,15 +3,15 @@
3
3
  <div
4
4
  v-for="(user, index) in users"
5
5
  :key="user.email + '-' + index"
6
- role="tooltip"
7
6
  class="shrink-0"
8
- :aria-label="user.full_name + '\n' + user.email"
9
7
  :style="{
10
8
  marginLeft: index === 0 ? '0' : '-' + spacing,
11
9
  }"
12
10
  >
13
11
  <div class="rounded-full border-[3px] border-white">
14
12
  <BaseAvatar
13
+ class="flex"
14
+ tooltip
15
15
  :user="user"
16
16
  :size="size"
17
17
  :show-details="false"
@@ -1,17 +1,63 @@
1
1
  <template>
2
2
  <button
3
- ref="btn"
3
+ ref="buttonRef"
4
4
  type="button"
5
5
  class="relative inline-flex items-center"
6
+ @click="copyText"
6
7
  >
7
8
  <slot />
9
+ <Teleport
10
+ to="body"
11
+ >
12
+ <div
13
+ ref="floatingRef"
14
+ :style="floatingStyles"
15
+ class="fixed top-0 left-0 pointer-events-none"
16
+ >
17
+ <transition
18
+ enter-active-class="transition duration-200 ease-out"
19
+ enter-from-class="transform -translate-y-2 scale-95 opacity-0"
20
+ enter-to-class="transform translate-y-0 scale-100 opacity-100"
21
+ leave-active-class="transition duration-75 ease-in"
22
+ leave-from-class="transform translate-y-0 scale-100 opacity-100"
23
+ leave-to-class="transform -translate-y-2 scale-95 opacity-0"
24
+ >
25
+ <div
26
+ v-if="showTooltip"
27
+ class="bg-white shadow-md ring-1 ring-black ring-opacity-10 text-slate-900 rounded-md pt-1.5 pb-2 px-3 text-xs"
28
+ >
29
+ <div v-if="showCopied">
30
+ <div class="flex items-center">
31
+ <svg
32
+ xmlns="http://www.w3.org/2000/svg"
33
+ fill="none"
34
+ viewBox="0 0 24 24"
35
+ stroke-width="1.5"
36
+ stroke="currentColor"
37
+ class="w-5 h-5 mr-1 text-green-500"
38
+ >
39
+ <path
40
+ stroke-linecap="round"
41
+ stroke-linejoin="round"
42
+ d="M9 12.75L11.25 15 15 9.75M21 12a9 9 0 11-18 0 9 9 0 0118 0z"
43
+ ></path>
44
+ </svg>
45
+ {{ t('sui.copied') }}
46
+ </div>
47
+ </div>
48
+ <div v-else>
49
+ {{ t('sui.click_to_copy') }}
50
+ </div>
51
+ </div>
52
+ </transition>
53
+ </div>
54
+ </Teleport>
8
55
  </button>
9
56
  </template>
10
57
 
11
58
  <script lang="ts" setup>
12
59
  import { t } from '@/i18n';
13
- import { useTippy } from 'vue-tippy'
14
- import 'tippy.js/dist/tippy.css'
60
+ import { useTooltip } from '@/composables/tooltip';
15
61
 
16
62
  const showCopied = ref(false);
17
63
 
@@ -22,33 +68,10 @@ const props = defineProps({
22
68
  },
23
69
  });
24
70
 
25
- const btn = ref();
71
+ const buttonRef = ref();
72
+ const floatingRef = ref();
26
73
 
27
- const content = computed(() => {
28
- return showCopied.value ?
29
- `<div class="flex items-center">
30
- <svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" class="w-5 h-5 mr-1 text-green-500">
31
- <path stroke-linecap="round" stroke-linejoin="round" d="M9 12.75L11.25 15 15 9.75M21 12a9 9 0 11-18 0 9 9 0 0118 0z" />
32
- </svg>
33
- ${t('sui.copied')}
34
- </div>` :
35
-
36
- t('sui.click_to_copy')
37
- })
38
-
39
- useTippy(btn, {
40
- content: content,
41
- placement: 'auto',
42
- interactive: true,
43
- hideOnClick: 'toggle',
44
- trigger: 'mouseenter click',
45
- allowHTML: true,
46
- onTrigger(instance, event) {
47
- if (event.type === 'click') {
48
- copyText(instance)
49
- }
50
- },
51
- })
74
+ const { showTooltip, floatingStyles } = useTooltip(buttonRef, floatingRef);
52
75
 
53
76
  async function writeText(text: string) {
54
77
  if (
@@ -64,19 +87,18 @@ async function writeText(text: string) {
64
87
 
65
88
  let timeoutId = undefined as undefined | number;
66
89
 
67
- function copyText(instance: any) {
68
-
90
+ function copyText() {
69
91
  writeText(props.value);
70
- showSuccessMessage(instance);
92
+ showSuccessMessage();
71
93
  }
72
94
 
73
- function showSuccessMessage(instance: any) {
95
+ function showSuccessMessage() {
74
96
  showCopied.value = true;
75
97
  timeoutId = setTimeout(() => {
76
- instance.hide();
77
98
  clearTimeout(timeoutId);
78
99
  setTimeout(() => {
79
100
  showCopied.value = false;
101
+ showTooltip.value = false;
80
102
  }, 200);
81
103
  }, 1600);
82
104
  }
@@ -1,6 +1,6 @@
1
1
  <template>
2
2
  <div
3
- class="inline-flex w-auto items-center justify-center rounded-full"
3
+ class="inline-flex w-auto items-center justify-center font-normal rounded-full"
4
4
  :class="[sizeClass, colorClass]"
5
5
  >
6
6
  {{ countLabel }}
@@ -623,7 +623,7 @@ function onUpdateVisibleColumn() {
623
623
  */
624
624
 
625
625
  const rowActionsInternal = computed<RowAction[]>(() => {
626
- const actions = cloneDeep(props.rowActions) ?? [];
626
+ const actions = [];
627
627
 
628
628
  if (props.editUrl && props.editButton) {
629
629
  actions.push({
@@ -634,6 +634,8 @@ const rowActionsInternal = computed<RowAction[]>(() => {
634
634
  });
635
635
  }
636
636
 
637
+ actions.push(...cloneDeep(props.rowActions) ?? []);
638
+
637
639
  if (props.deleteUrl && props.deleteButton) {
638
640
  actions.push({
639
641
  label: t('sui.delete'),
@@ -1,7 +1,7 @@
1
1
  <template>
2
2
  <component
3
3
  :is="as"
4
- :ref="showTooltip ? 'tooltip' : ''"
4
+ ref="tooltipRef"
5
5
  >
6
6
  <slot
7
7
  name="default"
@@ -11,6 +11,15 @@
11
11
  {{ readableDate }}
12
12
  </span>
13
13
  </slot>
14
+
15
+ <BaseTooltip
16
+ v-if="tooltip"
17
+ :target="tooltipRef"
18
+ >
19
+ <div class="text-xs">
20
+ {{ tooltipContent }}
21
+ </div>
22
+ </BaseTooltip>
14
23
  </component>
15
24
  </template>
16
25
 
@@ -19,16 +28,15 @@ import { t } from '@/i18n';
19
28
  import { useI18nStore } from '@/stores/i18n';
20
29
  import humanizeDuration from 'humanize-duration';
21
30
  import { DateTime } from 'luxon';
22
- import { useTippy } from 'vue-tippy'
23
- import 'tippy.js/dist/tippy.css'
31
+ import BaseTooltip from './BaseTooltip.vue';
24
32
 
25
33
  const props = defineProps({
26
34
  value: {
27
35
  required: true,
28
36
  type: String,
29
37
  },
30
- showTooltip: {
31
- default: false,
38
+ tooltip: {
39
+ default: true,
32
40
  type: Boolean,
33
41
  },
34
42
  timeZone: {
@@ -41,19 +49,14 @@ const props = defineProps({
41
49
  },
42
50
  });
43
51
 
44
- const tooltip = ref();
52
+ const tooltipRef = ref();
45
53
 
46
54
  const tooltipContent = computed(() => {
47
55
  return DateTime.fromISO(props.value)
48
56
  .setLocale(useI18nStore().locale)
49
- .toLocaleString(DateTime.DATETIME_FULL);
57
+ .toLocaleString(DateTime.DATETIME_MED);
50
58
  });
51
59
 
52
- useTippy(tooltip, {
53
- content: tooltipContent,
54
- placement: 'auto',
55
- })
56
-
57
60
  const now = ref(DateTime.now().toSeconds());
58
61
 
59
62
  function getMinutes(duration: number) {
@@ -78,7 +78,6 @@
78
78
  v-if="secondaryActions.length"
79
79
  :items="secondaryActions"
80
80
  size="sm"
81
- :position="compactLayout ? 'bottom-right' : 'bottom-left'"
82
81
  >
83
82
  <template #button="{ open }">
84
83
  <div
@@ -1,7 +1,7 @@
1
1
  <template>
2
2
  <label :class="classes">
3
3
  <div
4
- :ref="help ? 'info' : ''"
4
+ ref="labelRef"
5
5
  class="relative inline-flex"
6
6
  :class="[help ? 'cursor-help' : 'cursor-default']"
7
7
  >
@@ -18,16 +18,25 @@
18
18
  class="ml-0.5 text-red-600"
19
19
  > *</div>
20
20
  </div>
21
+
22
+ <BaseTooltip
23
+ v-if="help"
24
+ :target="labelRef"
25
+ >
26
+ <div class="text-xs">
27
+ {{ help }}
28
+ </div>
29
+ </BaseTooltip>
30
+
21
31
  </label>
22
32
  </template>
23
33
 
24
34
  <script lang="ts" setup>
25
35
  import { PropType } from 'vue';
26
36
  import { Icon as BaseIcon } from '@iconify/vue';
27
- import { useTippy } from 'vue-tippy'
28
- import 'tippy.js/dist/tippy.css'
37
+ import BaseTooltip from './BaseTooltip.vue';
29
38
 
30
- const props = defineProps({
39
+ defineProps({
31
40
  required: {
32
41
  default: false,
33
42
  type: Boolean,
@@ -46,12 +55,6 @@ const props = defineProps({
46
55
  },
47
56
  });
48
57
 
49
- const info = ref();
50
- const content = computed(() => { return props.help })
51
-
52
- useTippy(info, {
53
- content: content,
54
- placement: 'auto',
55
- })
58
+ const labelRef = ref();
56
59
 
57
60
  </script>
@@ -1,8 +1,7 @@
1
1
  <template>
2
2
  <BaseMenu
3
3
  class="inline-block"
4
- :position="mobile ? 'custom' : 'bottom-left'"
5
- :tw-menu="['sm:w-[320px] w-[280px]', mobile ? 'right-4' : '']"
4
+ :width="mobile ? 230 : 320"
6
5
  >
7
6
  <template #button="{ open }">
8
7
  <div