@indielayer/ui 1.15.1 → 1.15.3
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/LICENSE +1 -1
- package/README.md +1 -1
- package/docs/components/common/CodeSnippet.vue +4 -3
- package/lib/components/index.js +117 -116
- package/lib/components/popover/Popover.vue2.js +2 -3
- package/lib/components/popover/Popover.vue3.js +3 -2
- package/lib/components/select/Select.vue.js +1 -1
- package/lib/components/tooltip/ToggleTip.vue.js +7 -7
- package/lib/components/tooltip/Tooltip.vue.d.ts +29 -9
- package/lib/components/tooltip/Tooltip.vue.js +106 -29
- package/lib/components/tooltip/index.d.ts +1 -1
- package/lib/components/tooltip/theme/Tooltip.base.theme.d.ts +3 -0
- package/lib/components/tooltip/theme/Tooltip.base.theme.js +8 -0
- package/lib/components/tooltip/theme/Tooltip.carbon.theme.d.ts +3 -0
- package/lib/components/tooltip/theme/Tooltip.carbon.theme.js +5 -0
- package/lib/index.js +1 -1
- package/lib/index.umd.js +4 -4
- package/lib/theme.d.ts +2 -1
- package/lib/themes/base/components.d.ts +1 -0
- package/lib/themes/base/components.js +12 -10
- package/lib/themes/carbon/components.d.ts +1 -0
- package/lib/themes/carbon/components.js +12 -10
- package/lib/version.d.ts +1 -1
- package/lib/version.js +1 -1
- package/package.json +2 -2
- package/src/components/tooltip/ToggleTip.vue +1 -1
- package/src/components/tooltip/Tooltip.vue +191 -15
- package/src/components/tooltip/index.ts +1 -1
- package/src/components/tooltip/theme/Tooltip.base.theme.ts +9 -0
- package/src/components/tooltip/theme/Tooltip.carbon.theme.ts +7 -0
- package/src/theme.ts +2 -0
- package/src/themes/base/components.ts +1 -0
- package/src/themes/carbon/components.ts +1 -0
- package/src/version.ts +1 -1
package/LICENSE
CHANGED
package/README.md
CHANGED
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
<script setup lang="ts">
|
|
2
2
|
import { onMounted, ref } from 'vue'
|
|
3
|
-
import {
|
|
3
|
+
import { createHighlighter } from 'shiki'
|
|
4
4
|
import indielayerTheme from './Indielayer-theme.json'
|
|
5
5
|
|
|
6
|
-
const highlighter =
|
|
6
|
+
const highlighter = createHighlighter({
|
|
7
7
|
langs: ['js', 'ts', 'vue-html', 'bash', 'vue'],
|
|
8
|
+
themes: [indielayerTheme as any],
|
|
8
9
|
})
|
|
9
10
|
|
|
10
11
|
const props = defineProps({
|
|
@@ -23,7 +24,7 @@ const highlighted = ref('')
|
|
|
23
24
|
|
|
24
25
|
onMounted(async () => {
|
|
25
26
|
await (await highlighter).loadTheme(indielayerTheme as any)
|
|
26
|
-
highlighted.value = (await highlighter).codeToHtml(props.code, { lang: props.lang, theme: 'Indielayer' })
|
|
27
|
+
highlighted.value = (await highlighter).codeToHtml(props.code || '', { lang: props.lang, theme: 'Indielayer' })
|
|
27
28
|
})
|
|
28
29
|
</script>
|
|
29
30
|
|
package/lib/components/index.js
CHANGED
|
@@ -1,119 +1,120 @@
|
|
|
1
|
-
import { default as
|
|
2
|
-
import { default as
|
|
3
|
-
import { default as
|
|
4
|
-
import { default as
|
|
5
|
-
import { default as
|
|
6
|
-
import { default as
|
|
7
|
-
import { default as
|
|
8
|
-
import { default as
|
|
1
|
+
import { default as t } from "./accordion/Accordion.vue.js";
|
|
2
|
+
import { default as l } from "./accordion/AccordionItem.vue.js";
|
|
3
|
+
import { default as p } from "./badge/Badge.vue.js";
|
|
4
|
+
import { default as m } from "./breadcrumbs/Breadcrumbs.vue.js";
|
|
5
|
+
import { default as x } from "./card/Card.vue.js";
|
|
6
|
+
import { default as i } from "./carousel/Carousel.vue.js";
|
|
7
|
+
import { default as T } from "./container/Container.vue.js";
|
|
8
|
+
import { default as b } from "./datepicker/Datepicker.vue.js";
|
|
9
9
|
import "./datepicker/Datepicker.vue2.js";
|
|
10
|
-
import { default as
|
|
11
|
-
import { default as
|
|
12
|
-
import { default as
|
|
13
|
-
import { default as
|
|
14
|
-
import { default as
|
|
15
|
-
import { default as
|
|
16
|
-
import { default as
|
|
17
|
-
import { default as
|
|
18
|
-
import { default as
|
|
19
|
-
import { default as
|
|
20
|
-
import
|
|
21
|
-
import { default as
|
|
22
|
-
import { default as
|
|
23
|
-
import { default as
|
|
24
|
-
import { default as
|
|
25
|
-
import { default as
|
|
26
|
-
import { default as
|
|
27
|
-
import { default as
|
|
28
|
-
import { default as
|
|
29
|
-
import { default as
|
|
30
|
-
import { default as
|
|
31
|
-
import { default as
|
|
32
|
-
import { default as
|
|
33
|
-
import { default as
|
|
34
|
-
import { default as
|
|
35
|
-
import { default as
|
|
36
|
-
import { default as
|
|
37
|
-
import { default as
|
|
38
|
-
import { default as
|
|
39
|
-
import { default as
|
|
40
|
-
import { default as
|
|
41
|
-
import { default as
|
|
42
|
-
import { default as
|
|
43
|
-
import { default as
|
|
44
|
-
import { default as
|
|
45
|
-
import { default as
|
|
46
|
-
import { default as
|
|
47
|
-
import { default as
|
|
48
|
-
import { default as
|
|
49
|
-
import { default as
|
|
50
|
-
import { default as
|
|
51
|
-
import { default as
|
|
52
|
-
import { default as
|
|
53
|
-
import { default as
|
|
54
|
-
import { default as
|
|
55
|
-
import { default as
|
|
56
|
-
import { default as
|
|
57
|
-
import { default as
|
|
58
|
-
import { default as
|
|
59
|
-
import { default as
|
|
10
|
+
import { default as C } from "./divider/Divider.vue.js";
|
|
11
|
+
import { default as I } from "./drawer/Drawer.vue.js";
|
|
12
|
+
import { default as v } from "./form/Form.vue.js";
|
|
13
|
+
import { default as k } from "./formGroup/FormGroup.vue.js";
|
|
14
|
+
import { default as D } from "./image/Image.vue.js";
|
|
15
|
+
import { default as G } from "./menu/Menu.vue.js";
|
|
16
|
+
import { default as M } from "./modal/Modal.vue.js";
|
|
17
|
+
import { default as w } from "./notifications/Notifications.vue.js";
|
|
18
|
+
import { default as R } from "./pagination/Pagination.vue.js";
|
|
19
|
+
import { default as N } from "./popover/Popover.vue.js";
|
|
20
|
+
import "./popover/Popover.vue2.js";
|
|
21
|
+
import { default as U } from "./popover/PopoverContainer.vue.js";
|
|
22
|
+
import { default as q } from "./progress/Progress.vue.js";
|
|
23
|
+
import { default as E } from "./qrCode/QrCode.vue.js";
|
|
24
|
+
import { default as K } from "./select/Select.vue.js";
|
|
25
|
+
import { default as V } from "./skeleton/Skeleton.vue.js";
|
|
26
|
+
import { default as Y } from "./stepper/Stepper.vue.js";
|
|
27
|
+
import { default as _ } from "./tab/Tab.vue.js";
|
|
28
|
+
import { default as ee } from "./tab/TabGroup.vue.js";
|
|
29
|
+
import { default as re } from "./table/Table.vue.js";
|
|
30
|
+
import { default as te } from "./textarea/Textarea.vue.js";
|
|
31
|
+
import { default as le } from "./themeProvider/ThemeProvider.vue.js";
|
|
32
|
+
import { default as pe } from "./toggle/Toggle.vue.js";
|
|
33
|
+
import { default as me } from "./upload/Upload.vue.js";
|
|
34
|
+
import { default as xe } from "./alert/Alert.vue.js";
|
|
35
|
+
import { default as ie } from "./avatar/Avatar.vue.js";
|
|
36
|
+
import { default as Te } from "./button/Button.vue.js";
|
|
37
|
+
import { default as be } from "./button/ButtonGroup.vue.js";
|
|
38
|
+
import { default as Ce } from "./carousel/CarouselSlide.vue.js";
|
|
39
|
+
import { default as Ie } from "./checkbox/Checkbox.vue.js";
|
|
40
|
+
import { default as ve } from "./icon/Icon.vue.js";
|
|
41
|
+
import { default as ke } from "./input/Input.vue.js";
|
|
42
|
+
import { default as De } from "./inputFooter/InputFooter.vue.js";
|
|
43
|
+
import { default as Ge } from "./label/Label.vue.js";
|
|
44
|
+
import { default as Me } from "./link/Link.vue.js";
|
|
45
|
+
import { default as we } from "./loader/Loader.vue.js";
|
|
46
|
+
import { default as Re } from "./menu/MenuItem.vue.js";
|
|
47
|
+
import { default as Ne } from "./pagination/PaginationItem.vue.js";
|
|
48
|
+
import { default as Ue } from "./radio/Radio.vue.js";
|
|
49
|
+
import { default as qe } from "./scroll/Scroll.vue.js";
|
|
50
|
+
import { default as Ee } from "./slider/Slider.vue.js";
|
|
51
|
+
import { default as Ke } from "./spacer/Spacer.js";
|
|
52
|
+
import { default as Ve } from "./spinner/Spinner.vue.js";
|
|
53
|
+
import { default as Ye } from "./table/TableBody.js";
|
|
54
|
+
import { default as _e } from "./table/TableCell.vue.js";
|
|
55
|
+
import { default as eo } from "./table/TableHead.vue.js";
|
|
56
|
+
import { default as ro } from "./table/TableHeader.vue.js";
|
|
57
|
+
import { default as to } from "./table/TableRow.vue.js";
|
|
58
|
+
import { default as lo } from "./tag/Tag.vue.js";
|
|
59
|
+
import { default as uo } from "./tooltip/Tooltip.vue.js";
|
|
60
|
+
import { default as so } from "./tooltip/ToggleTip.vue.js";
|
|
60
61
|
export {
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
62
|
+
t as XAccordion,
|
|
63
|
+
l as XAccordionItem,
|
|
64
|
+
xe as XAlert,
|
|
65
|
+
ie as XAvatar,
|
|
66
|
+
p as XBadge,
|
|
67
|
+
m as XBreadcrumbs,
|
|
68
|
+
Te as XButton,
|
|
69
|
+
be as XButtonGroup,
|
|
70
|
+
x as XCard,
|
|
71
|
+
i as XCarousel,
|
|
72
|
+
Ce as XCarouselSlide,
|
|
73
|
+
Ie as XCheckbox,
|
|
74
|
+
T as XContainer,
|
|
75
|
+
b as XDatepicker,
|
|
76
|
+
C as XDivider,
|
|
77
|
+
I as XDrawer,
|
|
78
|
+
v as XForm,
|
|
79
|
+
k as XFormGroup,
|
|
80
|
+
ve as XIcon,
|
|
81
|
+
D as XImage,
|
|
82
|
+
ke as XInput,
|
|
83
|
+
De as XInputFooter,
|
|
84
|
+
Ge as XLabel,
|
|
85
|
+
Me as XLink,
|
|
86
|
+
we as XLoader,
|
|
87
|
+
G as XMenu,
|
|
88
|
+
Re as XMenuItem,
|
|
89
|
+
M as XModal,
|
|
90
|
+
w as XNotifications,
|
|
91
|
+
R as XPagination,
|
|
92
|
+
Ne as XPaginationItem,
|
|
93
|
+
N as XPopover,
|
|
94
|
+
U as XPopoverContainer,
|
|
95
|
+
q as XProgress,
|
|
96
|
+
E as XQrCode,
|
|
97
|
+
Ue as XRadio,
|
|
98
|
+
qe as XScroll,
|
|
99
|
+
K as XSelect,
|
|
100
|
+
V as XSkeleton,
|
|
101
|
+
Ee as XSlider,
|
|
102
|
+
Ke as XSpacer,
|
|
103
|
+
Ve as XSpinner,
|
|
104
|
+
Y as XStepper,
|
|
105
|
+
_ as XTab,
|
|
106
|
+
ee as XTabGroup,
|
|
107
|
+
re as XTable,
|
|
108
|
+
Ye as XTableBody,
|
|
109
|
+
_e as XTableCell,
|
|
110
|
+
eo as XTableHead,
|
|
111
|
+
ro as XTableHeader,
|
|
112
|
+
to as XTableRow,
|
|
113
|
+
lo as XTag,
|
|
114
|
+
te as XTextarea,
|
|
115
|
+
le as XThemeProvider,
|
|
116
|
+
pe as XToggle,
|
|
117
|
+
so as XToggleTip,
|
|
118
|
+
uo as XTooltip,
|
|
119
|
+
me as XUpload
|
|
119
120
|
};
|
|
@@ -13,7 +13,7 @@ import me from "../icon/Icon.vue.js";
|
|
|
13
13
|
import ll from "../menu/MenuItem.vue.js";
|
|
14
14
|
import tl from "../spinner/Spinner.vue.js";
|
|
15
15
|
import ye from "../popover/Popover.vue.js";
|
|
16
|
-
import "../popover/Popover.
|
|
16
|
+
import "../popover/Popover.vue2.js";
|
|
17
17
|
import be from "../popover/PopoverContainer.vue.js";
|
|
18
18
|
import al from "../inputFooter/InputFooter.vue.js";
|
|
19
19
|
import il from "../input/Input.vue.js";
|
|
@@ -1,22 +1,22 @@
|
|
|
1
|
-
import { defineComponent as r, computed as i, openBlock as
|
|
1
|
+
import { defineComponent as r, computed as i, openBlock as s, createBlock as p, withCtx as o, createElementVNode as a, createVNode as m } from "vue";
|
|
2
2
|
import l from "./Tooltip.vue.js";
|
|
3
3
|
import _ from "../icon/Icon.vue.js";
|
|
4
4
|
import { infoIcon as d } from "../../common/icons.js";
|
|
5
|
-
const
|
|
5
|
+
const f = ["innerHTML"], u = {
|
|
6
6
|
content: String,
|
|
7
7
|
icon: String
|
|
8
8
|
}, g = { name: "XToggleTip" }, y = /* @__PURE__ */ r({
|
|
9
9
|
...g,
|
|
10
|
-
props:
|
|
10
|
+
props: u,
|
|
11
11
|
setup(t) {
|
|
12
|
-
const
|
|
13
|
-
return (c, T) => (
|
|
12
|
+
const n = t, e = i(() => n.icon || d);
|
|
13
|
+
return (c, T) => (s(), p(l, { position: "right" }, {
|
|
14
14
|
tooltip: o(() => [
|
|
15
|
-
a("div", { innerHTML: c.content }, null, 8,
|
|
15
|
+
a("div", { innerHTML: c.content }, null, 8, f)
|
|
16
16
|
]),
|
|
17
17
|
default: o(() => [
|
|
18
18
|
m(_, {
|
|
19
|
-
icon:
|
|
19
|
+
icon: e.value,
|
|
20
20
|
class: "text-secondary-500 dark:text-secondary-300 cursor-pointer"
|
|
21
21
|
}, null, 8, ["icon"])
|
|
22
22
|
]),
|
|
@@ -1,28 +1,48 @@
|
|
|
1
1
|
import type { ExtractPublicPropTypes, PropType } from 'vue';
|
|
2
|
-
import { type
|
|
2
|
+
import { type ThemeComponent } from '../../composables/useTheme';
|
|
3
3
|
declare const tooltipProps: {
|
|
4
|
+
tag: {
|
|
5
|
+
type: StringConstructor;
|
|
6
|
+
default: string;
|
|
7
|
+
};
|
|
4
8
|
tooltip: StringConstructor;
|
|
5
|
-
|
|
6
|
-
|
|
9
|
+
disabled: BooleanConstructor;
|
|
10
|
+
position: {
|
|
11
|
+
type: PropType<TooltipPosition>;
|
|
7
12
|
default: string;
|
|
8
13
|
};
|
|
9
14
|
};
|
|
10
|
-
export type
|
|
15
|
+
export type TooltipPosition = 'top' | 'bottom' | 'left' | 'right';
|
|
11
16
|
export type TooltipProps = ExtractPublicPropTypes<typeof tooltipProps>;
|
|
17
|
+
type InternalClasses = 'tooltip';
|
|
18
|
+
export interface TooltipTheme extends ThemeComponent<TooltipProps, InternalClasses> {
|
|
19
|
+
}
|
|
12
20
|
declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<import("vue").ExtractPropTypes<{
|
|
21
|
+
tag: {
|
|
22
|
+
type: StringConstructor;
|
|
23
|
+
default: string;
|
|
24
|
+
};
|
|
13
25
|
tooltip: StringConstructor;
|
|
14
|
-
|
|
15
|
-
|
|
26
|
+
disabled: BooleanConstructor;
|
|
27
|
+
position: {
|
|
28
|
+
type: PropType<TooltipPosition>;
|
|
16
29
|
default: string;
|
|
17
30
|
};
|
|
18
31
|
}>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
32
|
+
tag: {
|
|
33
|
+
type: StringConstructor;
|
|
34
|
+
default: string;
|
|
35
|
+
};
|
|
19
36
|
tooltip: StringConstructor;
|
|
20
|
-
|
|
21
|
-
|
|
37
|
+
disabled: BooleanConstructor;
|
|
38
|
+
position: {
|
|
39
|
+
type: PropType<TooltipPosition>;
|
|
22
40
|
default: string;
|
|
23
41
|
};
|
|
24
42
|
}>> & Readonly<{}>, {
|
|
25
|
-
|
|
43
|
+
disabled: boolean;
|
|
44
|
+
tag: string;
|
|
45
|
+
position: TooltipPosition;
|
|
26
46
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>, {
|
|
27
47
|
default?(_: {}): any;
|
|
28
48
|
tooltip?(_: {}): any;
|
|
@@ -1,43 +1,120 @@
|
|
|
1
|
-
import { defineComponent as r, openBlock as
|
|
2
|
-
import
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
1
|
+
import { defineComponent as H, ref as r, useSlots as M, computed as c, openBlock as v, createBlock as w, resolveDynamicComponent as W, normalizeClass as u, unref as y, withCtx as k, renderSlot as C, Teleport as O, createVNode as X, Transition as j, createElementBlock as q, normalizeStyle as A, createTextVNode as F, toDisplayString as G, createElementVNode as T, createCommentVNode as R } from "vue";
|
|
2
|
+
import { useTheme as I } from "../../composables/useTheme.js";
|
|
3
|
+
const J = {
|
|
4
|
+
tag: {
|
|
5
|
+
type: String,
|
|
6
|
+
default: "div"
|
|
7
|
+
},
|
|
7
8
|
tooltip: String,
|
|
8
|
-
|
|
9
|
+
disabled: Boolean,
|
|
10
|
+
position: {
|
|
9
11
|
type: String,
|
|
10
12
|
default: "bottom"
|
|
11
13
|
}
|
|
12
|
-
},
|
|
13
|
-
...
|
|
14
|
-
props:
|
|
15
|
-
setup(
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
"
|
|
20
|
-
|
|
14
|
+
}, K = { name: "XTooltip" }, U = /* @__PURE__ */ H({
|
|
15
|
+
...K,
|
|
16
|
+
props: J,
|
|
17
|
+
setup(S) {
|
|
18
|
+
const n = S, f = r(null), h = r(null), g = r(!1), b = r({}), p = r(n.position), _ = M(), B = c(() => n.tooltip || _.tooltip), a = c(() => n.disabled || !B.value), N = c(() => a.value ? "" : {
|
|
19
|
+
top: "-bottom-2.5 left-1/2 -translate-x-1/2 w-3.5",
|
|
20
|
+
bottom: "-top-2.5 left-1/2 -translate-x-1/2 w-3.5",
|
|
21
|
+
left: "-right-2.5 top-1/2 -translate-y-1/2 h-3.5",
|
|
22
|
+
right: "-left-2.5 top-1/2 -translate-y-1/2 h-3.5"
|
|
23
|
+
}[p.value]), V = c(() => a.value ? "" : {
|
|
24
|
+
top: "-rotate-45 origin-top-left",
|
|
25
|
+
bottom: "rotate-45 origin-bottom-left",
|
|
26
|
+
left: "rotate-45 origin-top-left",
|
|
27
|
+
right: "-rotate-45 origin-top-right"
|
|
28
|
+
}[p.value]), $ = c(() => a.value ? "" : {
|
|
29
|
+
top: "origin-bottom",
|
|
30
|
+
bottom: "origin-top",
|
|
31
|
+
left: "origin-right",
|
|
32
|
+
right: "origin-left"
|
|
33
|
+
}[p.value]), x = () => {
|
|
34
|
+
if (!f.value || !h.value)
|
|
35
|
+
return;
|
|
36
|
+
const t = f.value.getBoundingClientRect(), e = h.value.getBoundingClientRect(), l = 8, d = window.innerWidth, m = window.innerHeight;
|
|
37
|
+
let s = n.position, o = 0, i = 0;
|
|
38
|
+
switch (s) {
|
|
39
|
+
case "top":
|
|
40
|
+
o = t.top - e.height - l, i = t.left + t.width / 2 - e.width / 2, o < 0 && (s = "bottom", o = t.bottom + l);
|
|
41
|
+
break;
|
|
42
|
+
case "bottom":
|
|
43
|
+
o = t.bottom + l, i = t.left + t.width / 2 - e.width / 2, o + e.height > m && (s = "top", o = t.top - e.height - l);
|
|
44
|
+
break;
|
|
45
|
+
case "left":
|
|
46
|
+
o = t.top + t.height / 2 - e.height / 2, i = t.left - e.width - l, i < 0 && (s = "right", i = t.right + l);
|
|
47
|
+
break;
|
|
48
|
+
case "right":
|
|
49
|
+
o = t.top + t.height / 2 - e.height / 2, i = t.right + l, i + e.width > d && (s = "left", i = t.left - e.width - l);
|
|
50
|
+
break;
|
|
51
|
+
}
|
|
52
|
+
(s === "top" || s === "bottom") && (i < 0 && (i = l), i + e.width > d && (i = d - e.width - l)), (s === "left" || s === "right") && (o < 0 && (o = l), o + e.height > m && (o = m - e.height - l)), p.value = s, b.value = {
|
|
53
|
+
top: `${o}px`,
|
|
54
|
+
left: `${i}px`
|
|
55
|
+
};
|
|
56
|
+
}, z = () => {
|
|
57
|
+
a.value || (g.value = !0, setTimeout(x, 0));
|
|
58
|
+
}, P = () => {
|
|
59
|
+
a.value || (g.value = !1);
|
|
60
|
+
}, { classes: D, className: E } = I("Tooltip", {}, n);
|
|
61
|
+
return (t, e) => (v(), w(W(t.tag), {
|
|
62
|
+
ref_key: "triggerRef",
|
|
63
|
+
ref: f,
|
|
64
|
+
class: u([
|
|
65
|
+
y(E),
|
|
66
|
+
{
|
|
67
|
+
"inline-block": !t.$attrs.class
|
|
68
|
+
}
|
|
69
|
+
]),
|
|
70
|
+
onMouseenter: z,
|
|
71
|
+
onMouseleave: P
|
|
21
72
|
}, {
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
73
|
+
default: k(() => [
|
|
74
|
+
C(t.$slots, "default"),
|
|
75
|
+
a.value ? R("", !0) : (v(), w(O, {
|
|
76
|
+
key: 0,
|
|
77
|
+
to: "body"
|
|
78
|
+
}, [
|
|
79
|
+
X(j, {
|
|
80
|
+
"enter-active-class": "transition-opacity duration-150 ease-out",
|
|
81
|
+
"leave-active-class": "transition-opacity duration-150 ease-in",
|
|
82
|
+
"enter-from-class": "opacity-0",
|
|
83
|
+
"enter-to-class": "opacity-100",
|
|
84
|
+
"leave-from-class": "opacity-100",
|
|
85
|
+
"leave-to-class": "opacity-0"
|
|
86
|
+
}, {
|
|
87
|
+
default: k(() => [
|
|
88
|
+
g.value ? (v(), q("div", {
|
|
89
|
+
key: 0,
|
|
90
|
+
ref_key: "tooltipRef",
|
|
91
|
+
ref: h,
|
|
92
|
+
style: A(b.value),
|
|
93
|
+
class: u(["fixed z-[10001] pointer-events-none", [
|
|
94
|
+
y(D).tooltip,
|
|
95
|
+
$.value
|
|
96
|
+
]])
|
|
97
|
+
}, [
|
|
98
|
+
C(t.$slots, "tooltip", {}, () => [
|
|
99
|
+
F(G(t.tooltip), 1)
|
|
100
|
+
]),
|
|
101
|
+
T("div", {
|
|
102
|
+
class: u(["absolute overflow-hidden shadow-lg z-10", N.value])
|
|
103
|
+
}, [
|
|
104
|
+
T("div", {
|
|
105
|
+
class: u(["h-2.5 w-2.5 bg-secondary-700 transform border border-secondary-800", V.value])
|
|
106
|
+
}, null, 2)
|
|
107
|
+
], 2)
|
|
108
|
+
], 6)) : R("", !0)
|
|
29
109
|
]),
|
|
30
110
|
_: 3
|
|
31
111
|
})
|
|
32
|
-
])
|
|
33
|
-
]),
|
|
34
|
-
default: e(() => [
|
|
35
|
-
o(t.$slots, "default")
|
|
112
|
+
]))
|
|
36
113
|
]),
|
|
37
114
|
_: 3
|
|
38
|
-
},
|
|
115
|
+
}, 40, ["class"]));
|
|
39
116
|
}
|
|
40
117
|
});
|
|
41
118
|
export {
|
|
42
|
-
|
|
119
|
+
U as default
|
|
43
120
|
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
export { default as XTooltip } from './Tooltip.vue';
|
|
2
|
-
export type { TooltipProps } from './Tooltip.vue';
|
|
2
|
+
export type { TooltipProps, TooltipPosition, TooltipTheme } from './Tooltip.vue';
|
|
3
3
|
export { default as XToggleTip } from './ToggleTip.vue';
|
|
4
4
|
export type { ToggleTipProps } from './ToggleTip.vue';
|