sprintify-ui 0.11.22 → 0.11.24
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 +18 -8
- package/dist/types/components/BaseTagAutocompleteFetch.vue.d.ts +18 -0
- package/package.json +1 -1
- package/src/components/BaseTagAutocompleteFetch.stories.js +24 -0
- package/src/components/BaseTagAutocompleteFetch.vue +10 -0
- package/src/components/BaseTooltip.stories.js +10 -5
- package/src/components/BaseTooltip.vue +4 -4
- package/src/composables/tooltip.ts +14 -3
package/dist/sprintify-ui.es.js
CHANGED
|
@@ -7444,9 +7444,9 @@ function Vu(n, t, e = !1, r = 0, o = void 0, i = 6) {
|
|
|
7444
7444
|
Tl(l, "mouseenter", () => {
|
|
7445
7445
|
u = !0, c();
|
|
7446
7446
|
}), Tl(l, "mouseleave", () => {
|
|
7447
|
-
u = !1, d();
|
|
7447
|
+
u = !1, e ? d() : s.value = !1;
|
|
7448
7448
|
}), Tl(a, "mouseenter", () => {
|
|
7449
|
-
e && (u = !0, c());
|
|
7449
|
+
e && (u = !0, e ? c() : s.value = !0);
|
|
7450
7450
|
}), Tl(a, "mouseleave", () => {
|
|
7451
7451
|
e && (u = !1, d());
|
|
7452
7452
|
});
|
|
@@ -7454,7 +7454,7 @@ function Vu(n, t, e = !1, r = 0, o = void 0, i = 6) {
|
|
|
7454
7454
|
u && (s.value = !0);
|
|
7455
7455
|
}, r), d = sn(() => {
|
|
7456
7456
|
u || (s.value = !1);
|
|
7457
|
-
},
|
|
7457
|
+
}, 0), f = {
|
|
7458
7458
|
placement: "top",
|
|
7459
7459
|
middleware: [hl(i), ml(), Rv()],
|
|
7460
7460
|
whileElementsMounted: pl
|
|
@@ -7472,12 +7472,12 @@ const BC = ["innerHTML"], Ji = /* @__PURE__ */ te({
|
|
|
7472
7472
|
text: { default: null },
|
|
7473
7473
|
floatingOptions: { default() {
|
|
7474
7474
|
return {
|
|
7475
|
-
placement: "top
|
|
7475
|
+
placement: "top"
|
|
7476
7476
|
};
|
|
7477
7477
|
} },
|
|
7478
7478
|
interactive: { type: Boolean, default: !1 },
|
|
7479
7479
|
delay: { default: 0 },
|
|
7480
|
-
dark: { type: Boolean, default: !
|
|
7480
|
+
dark: { type: Boolean, default: !0 },
|
|
7481
7481
|
offset: { default: 6 }
|
|
7482
7482
|
},
|
|
7483
7483
|
setup(n) {
|
|
@@ -7499,10 +7499,10 @@ const BC = ["innerHTML"], Ji = /* @__PURE__ */ te({
|
|
|
7499
7499
|
style: Fe(g(i))
|
|
7500
7500
|
}, [
|
|
7501
7501
|
ee(An, {
|
|
7502
|
-
"enter-active-class": "transition duration-
|
|
7502
|
+
"enter-active-class": "transition duration-100 ease-out",
|
|
7503
7503
|
"enter-from-class": "transform scale-90 opacity-0",
|
|
7504
7504
|
"enter-to-class": "transform scale-100 opacity-100",
|
|
7505
|
-
"leave-active-class": "transition duration-
|
|
7505
|
+
"leave-active-class": "transition duration-0 ease-in",
|
|
7506
7506
|
"leave-from-class": "transform scale-100 opacity-100",
|
|
7507
7507
|
"leave-to-class": "transform scale-90 opacity-0"
|
|
7508
7508
|
}, {
|
|
@@ -22422,6 +22422,14 @@ const GA = /* @__PURE__ */ zu(YA), JA = { class: "text-xs text-slate-600" }, Y0
|
|
|
22422
22422
|
focusOnMount: {
|
|
22423
22423
|
default: !1,
|
|
22424
22424
|
type: Boolean
|
|
22425
|
+
},
|
|
22426
|
+
optionColor: {
|
|
22427
|
+
default: void 0,
|
|
22428
|
+
type: Function
|
|
22429
|
+
},
|
|
22430
|
+
optionIcon: {
|
|
22431
|
+
default: void 0,
|
|
22432
|
+
type: Function
|
|
22425
22433
|
}
|
|
22426
22434
|
},
|
|
22427
22435
|
emits: ["update:modelValue", "typing", "focus", "scrollBottom"],
|
|
@@ -22496,6 +22504,8 @@ const GA = /* @__PURE__ */ zu(YA), JA = { class: "text-xs text-slate-600" }, Y0
|
|
|
22496
22504
|
max: n.max,
|
|
22497
22505
|
filter: () => !0,
|
|
22498
22506
|
"focus-on-mount": n.focusOnMount,
|
|
22507
|
+
"option-color": n.optionColor,
|
|
22508
|
+
"option-icon": n.optionIcon,
|
|
22499
22509
|
onOpen: m,
|
|
22500
22510
|
onTyping: h,
|
|
22501
22511
|
onScrollBottom: g(v),
|
|
@@ -22516,7 +22526,7 @@ const GA = /* @__PURE__ */ zu(YA), JA = { class: "text-xs text-slate-600" }, Y0
|
|
|
22516
22526
|
])
|
|
22517
22527
|
]),
|
|
22518
22528
|
_: 3
|
|
22519
|
-
}, 8, ["loading", "loading-bottom", "model-value", "disabled", "placeholder", "options", "value-key", "label-key", "has-error", "max", "focus-on-mount", "onScrollBottom"]));
|
|
22529
|
+
}, 8, ["loading", "loading-bottom", "model-value", "disabled", "placeholder", "options", "value-key", "label-key", "has-error", "max", "focus-on-mount", "option-color", "option-icon", "onScrollBottom"]));
|
|
22520
22530
|
}
|
|
22521
22531
|
}), oI = { class: "inline-block w-[320px] input-rounded bg-white shadow-2xl" }, iI = { class: "flex grow items-center" }, sI = { class: "shrink-0" }, lI = /* @__PURE__ */ te({
|
|
22522
22532
|
__name: "BaseDropdownAutocomplete",
|
|
@@ -84,6 +84,14 @@ declare const __VLS_component: import("vue").DefineComponent<import("vue").Extra
|
|
|
84
84
|
default: boolean;
|
|
85
85
|
type: BooleanConstructor;
|
|
86
86
|
};
|
|
87
|
+
optionColor: {
|
|
88
|
+
default: undefined;
|
|
89
|
+
type: PropType<(option: RawOption) => string>;
|
|
90
|
+
};
|
|
91
|
+
optionIcon: {
|
|
92
|
+
default: undefined;
|
|
93
|
+
type: PropType<(option: RawOption) => string>;
|
|
94
|
+
};
|
|
87
95
|
}>, {
|
|
88
96
|
focus: () => void | undefined;
|
|
89
97
|
blur: () => void | undefined;
|
|
@@ -140,6 +148,14 @@ declare const __VLS_component: import("vue").DefineComponent<import("vue").Extra
|
|
|
140
148
|
default: boolean;
|
|
141
149
|
type: BooleanConstructor;
|
|
142
150
|
};
|
|
151
|
+
optionColor: {
|
|
152
|
+
default: undefined;
|
|
153
|
+
type: PropType<(option: RawOption) => string>;
|
|
154
|
+
};
|
|
155
|
+
optionIcon: {
|
|
156
|
+
default: undefined;
|
|
157
|
+
type: PropType<(option: RawOption) => string>;
|
|
158
|
+
};
|
|
143
159
|
}>> & Readonly<{
|
|
144
160
|
onFocus?: ((...args: any[]) => any) | undefined;
|
|
145
161
|
"onUpdate:modelValue"?: ((...args: any[]) => any) | undefined;
|
|
@@ -151,6 +167,8 @@ declare const __VLS_component: import("vue").DefineComponent<import("vue").Extra
|
|
|
151
167
|
disabled: boolean;
|
|
152
168
|
hasError: boolean;
|
|
153
169
|
max: number;
|
|
170
|
+
optionColor: (option: RawOption) => string;
|
|
171
|
+
optionIcon: (option: RawOption) => string;
|
|
154
172
|
focusOnMount: boolean;
|
|
155
173
|
queryKey: string;
|
|
156
174
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
package/package.json
CHANGED
|
@@ -47,6 +47,30 @@ const Template = (args) => {
|
|
|
47
47
|
export const Demo = Template.bind({});
|
|
48
48
|
Demo.args = {};
|
|
49
49
|
|
|
50
|
+
export const OptionColor = Template.bind({});
|
|
51
|
+
OptionColor.args = {};
|
|
52
|
+
|
|
53
|
+
export const OptionIcon = Template.bind({});
|
|
54
|
+
OptionIcon.args = {
|
|
55
|
+
optionColor: undefined,
|
|
56
|
+
optionIcon: (option) => {
|
|
57
|
+
if (option.type === "work") return "heroicons:briefcase";
|
|
58
|
+
if (option.type === "personal") return "heroicons:user";
|
|
59
|
+
if (option.type === "family") return "heroicons:home";
|
|
60
|
+
return "heroicons:tag";
|
|
61
|
+
},
|
|
62
|
+
};
|
|
63
|
+
|
|
64
|
+
export const OptionIconWithColor = Template.bind({});
|
|
65
|
+
OptionIconWithColor.args = {
|
|
66
|
+
optionIcon: (option) => {
|
|
67
|
+
if (option.type === "work") return "heroicons:briefcase";
|
|
68
|
+
if (option.type === "personal") return "heroicons:user";
|
|
69
|
+
if (option.type === "family") return "heroicons:home";
|
|
70
|
+
return "heroicons:tag";
|
|
71
|
+
},
|
|
72
|
+
};
|
|
73
|
+
|
|
50
74
|
export const LabelFunction = Template.bind({});
|
|
51
75
|
LabelFunction.args = {
|
|
52
76
|
labelKey: (option) => {
|
|
@@ -13,6 +13,8 @@
|
|
|
13
13
|
:max="max"
|
|
14
14
|
:filter="() => true"
|
|
15
15
|
:focus-on-mount="focusOnMount"
|
|
16
|
+
:option-color="optionColor"
|
|
17
|
+
:option-icon="optionIcon"
|
|
16
18
|
@open="onOpen"
|
|
17
19
|
@typing="onTyping"
|
|
18
20
|
@scroll-bottom="scrollBottom"
|
|
@@ -116,6 +118,14 @@ const props = defineProps({
|
|
|
116
118
|
default: false,
|
|
117
119
|
type: Boolean,
|
|
118
120
|
},
|
|
121
|
+
optionColor: {
|
|
122
|
+
default: undefined,
|
|
123
|
+
type: Function as PropType<(option: RawOption) => string>,
|
|
124
|
+
},
|
|
125
|
+
optionIcon: {
|
|
126
|
+
default: undefined,
|
|
127
|
+
type: Function as PropType<(option: RawOption) => string>,
|
|
128
|
+
},
|
|
119
129
|
});
|
|
120
130
|
|
|
121
131
|
defineEmits(['update:modelValue', 'typing', 'focus', 'scrollBottom']);
|
|
@@ -5,9 +5,6 @@ import { BaseCardRow } from "."
|
|
|
5
5
|
export default {
|
|
6
6
|
title: "Components/BaseTooltip",
|
|
7
7
|
component: BaseTooltip,
|
|
8
|
-
args: {
|
|
9
|
-
text: "Click here to learn more about this button",
|
|
10
|
-
},
|
|
11
8
|
};
|
|
12
9
|
|
|
13
10
|
const Template = (args) => ({
|
|
@@ -22,8 +19,16 @@ const Template = (args) => ({
|
|
|
22
19
|
template: `
|
|
23
20
|
<BaseCard>
|
|
24
21
|
<BaseCardRow size=sm>
|
|
25
|
-
<BaseTooltip class="inline-block"
|
|
26
|
-
<div>
|
|
22
|
+
<BaseTooltip class="inline-block" text="test 1" v-bind="args">
|
|
23
|
+
<div>TEST 1</div>
|
|
24
|
+
</BaseTooltip>
|
|
25
|
+
|
|
26
|
+
<BaseTooltip class="inline-block" text="test 2" v-bind="args">
|
|
27
|
+
<div>TEST 2</div>
|
|
28
|
+
</BaseTooltip>
|
|
29
|
+
|
|
30
|
+
<BaseTooltip class="inline-block" text="test 3" v-bind="args">
|
|
31
|
+
<div>TEST 3</div>
|
|
27
32
|
</BaseTooltip>
|
|
28
33
|
</BaseCardRow>
|
|
29
34
|
</BaseCard>
|
|
@@ -15,10 +15,10 @@
|
|
|
15
15
|
:style="floatingStyles"
|
|
16
16
|
>
|
|
17
17
|
<transition
|
|
18
|
-
enter-active-class="transition duration-
|
|
18
|
+
enter-active-class="transition duration-100 ease-out"
|
|
19
19
|
enter-from-class="transform scale-90 opacity-0"
|
|
20
20
|
enter-to-class="transform scale-100 opacity-100"
|
|
21
|
-
leave-active-class="transition duration-
|
|
21
|
+
leave-active-class="transition duration-0 ease-in"
|
|
22
22
|
leave-from-class="transform scale-100 opacity-100"
|
|
23
23
|
leave-to-class="transform scale-90 opacity-0"
|
|
24
24
|
>
|
|
@@ -64,12 +64,12 @@ const props = withDefaults(defineProps<{
|
|
|
64
64
|
text: null,
|
|
65
65
|
floatingOptions() {
|
|
66
66
|
return {
|
|
67
|
-
placement: 'top
|
|
67
|
+
placement: 'top',
|
|
68
68
|
};
|
|
69
69
|
},
|
|
70
70
|
interactive: false,
|
|
71
71
|
delay: 0,
|
|
72
|
-
dark:
|
|
72
|
+
dark: true,
|
|
73
73
|
offset: 6,
|
|
74
74
|
});
|
|
75
75
|
|
|
@@ -36,15 +36,26 @@ function useTooltip(
|
|
|
36
36
|
|
|
37
37
|
useEventListener(elementRef, 'mouseleave', () => {
|
|
38
38
|
nextShow = false;
|
|
39
|
-
|
|
39
|
+
|
|
40
|
+
if (interactive) {
|
|
41
|
+
hideDebounce();
|
|
42
|
+
} else {
|
|
43
|
+
show.value = false;
|
|
44
|
+
}
|
|
40
45
|
});
|
|
41
46
|
|
|
42
47
|
useEventListener(floatingRef, 'mouseenter', () => {
|
|
43
48
|
if (!interactive) {
|
|
44
49
|
return;
|
|
45
50
|
}
|
|
51
|
+
|
|
46
52
|
nextShow = true;
|
|
47
|
-
|
|
53
|
+
|
|
54
|
+
if (interactive) {
|
|
55
|
+
showDebounce();
|
|
56
|
+
} else {
|
|
57
|
+
show.value = true;
|
|
58
|
+
}
|
|
48
59
|
});
|
|
49
60
|
|
|
50
61
|
useEventListener(floatingRef, 'mouseleave', () => {
|
|
@@ -67,7 +78,7 @@ function useTooltip(
|
|
|
67
78
|
return;
|
|
68
79
|
}
|
|
69
80
|
show.value = false;
|
|
70
|
-
},
|
|
81
|
+
}, 0);
|
|
71
82
|
|
|
72
83
|
const config = {
|
|
73
84
|
placement: 'top',
|