@kiva/kv-components 6.50.4 → 6.50.5
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/vue/KvTooltip.css +1 -1
- package/dist/vue/KvTooltip.js +76 -55
- package/package.json +2 -2
package/dist/vue/KvTooltip.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
.tooltip-pane[data-v-
|
|
1
|
+
.tooltip-pane[data-v-89cfb447],.tooltip-arrow[data-v-89cfb447]{box-shadow:0 4px 12px #00000014}.tooltip-arrow[data-v-89cfb447]{margin:.5rem;border-color:rgba(var(--bg-primary),var(--tw-bg-opacity, 1))}.tooltip-pane[x-placement^=top][data-v-89cfb447]{margin-bottom:.5rem}.tooltip-pane[x-placement^=top] .tooltip-arrow[data-v-89cfb447]{border-width:8px 8px 0 8px;border-left-color:transparent;border-right-color:transparent;border-bottom-color:transparent;left:calc(50% - 8px);bottom:-.5rem;margin-top:0;margin-bottom:0}.tooltip-pane[x-placement^=bottom][data-v-89cfb447]{margin-top:.5rem}.tooltip-pane[x-placement^=bottom] .tooltip-arrow[data-v-89cfb447]{border-width:0 8px 8px 8px;border-left-color:transparent;border-right-color:transparent;border-top-color:transparent;left:calc(50% - 8px);top:-.5rem;margin-bottom:0;margin-top:0}.tooltip-pane[x-placement^=right][data-v-89cfb447]{margin-left:.5rem}.tooltip-pane[x-placement^=right] .tooltip-arrow[data-v-89cfb447]{border-width:8px 8px 8px 0;border-left-color:transparent;border-top-color:transparent;border-bottom-color:transparent;top:calc(50% - 8px);left:-.5rem;margin-left:0;margin-right:0}.tooltip-pane[x-placement^=left][data-v-89cfb447]{margin-right:.5rem}.tooltip-pane[x-placement^=left] .tooltip-arrow[data-v-89cfb447]{border-width:8px 0 8px 8px;border-top-color:transparent;border-right-color:transparent;border-bottom-color:transparent;top:calc(50% - 8px);right:-.5rem;margin-left:0;margin-right:0}
|
package/dist/vue/KvTooltip.js
CHANGED
|
@@ -1,16 +1,15 @@
|
|
|
1
|
-
import { toRefs as
|
|
2
|
-
import { defaultTheme as
|
|
3
|
-
import
|
|
4
|
-
import
|
|
1
|
+
import { toRefs as M, computed as c, ref as K, watch as D, resolveComponent as u, openBlock as v, createBlock as V, withCtx as h, createVNode as B, createElementVNode as d, normalizeStyle as P, createElementBlock as C, renderSlot as w, createCommentVNode as G } from "vue";
|
|
2
|
+
import { defaultTheme as g, greenLightTheme as y, greenDarkTheme as k, marigoldLightTheme as T, stoneLightTheme as b, stoneDarkTheme as _, mintTheme as S, darkTheme as L } from "@kiva/kv-tokens";
|
|
3
|
+
import H from "./KvPopper.js";
|
|
4
|
+
import O from "./KvThemeProvider.js";
|
|
5
5
|
import "./KvTooltip.css";
|
|
6
|
-
import
|
|
7
|
-
const
|
|
6
|
+
import N from "../_virtual/_plugin-vue_export-helper.js";
|
|
7
|
+
const R = {
|
|
8
8
|
name: "KvTooltip",
|
|
9
9
|
components: {
|
|
10
|
-
KvPopper:
|
|
11
|
-
KvThemeProvider:
|
|
10
|
+
KvPopper: H,
|
|
11
|
+
KvThemeProvider: O
|
|
12
12
|
},
|
|
13
|
-
// TODO: Add prop for tooltip placement, Currently defaults to 'top' but will flip to bottom when constrained
|
|
14
13
|
props: {
|
|
15
14
|
controller: {
|
|
16
15
|
validator(e) {
|
|
@@ -30,6 +29,10 @@ const K = {
|
|
|
30
29
|
type: String,
|
|
31
30
|
default: "top"
|
|
32
31
|
},
|
|
32
|
+
showTooltip: {
|
|
33
|
+
type: Boolean,
|
|
34
|
+
default: !1
|
|
35
|
+
},
|
|
33
36
|
theme: {
|
|
34
37
|
type: String,
|
|
35
38
|
default: "default",
|
|
@@ -47,70 +50,88 @@ const K = {
|
|
|
47
50
|
}
|
|
48
51
|
}
|
|
49
52
|
},
|
|
50
|
-
|
|
53
|
+
defineEmits: ["tool-tip-visible"],
|
|
54
|
+
setup(e, { emit: t }) {
|
|
51
55
|
const {
|
|
52
|
-
modifiers:
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
+
modifiers: o,
|
|
57
|
+
showTooltip: r,
|
|
58
|
+
theme: s
|
|
59
|
+
} = M(e), m = c(() => ({
|
|
60
|
+
...o.value,
|
|
56
61
|
preventOverflow: {
|
|
57
|
-
...
|
|
62
|
+
...o.value.preventOverflow,
|
|
58
63
|
padding: 10
|
|
59
64
|
}
|
|
60
|
-
})), i =
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
65
|
+
})), i = K(null), l = () => typeof e.controller == "string" ? document.getElementById(e.controller) : e.controller, p = (n) => {
|
|
66
|
+
t("tool-tip-visible", n);
|
|
67
|
+
}, a = (n = !0) => {
|
|
68
|
+
const f = l();
|
|
69
|
+
if (f) {
|
|
70
|
+
const E = n ? "mouseover" : "mouseout";
|
|
71
|
+
f.dispatchEvent(new MouseEvent(E, { bubbles: !0 }));
|
|
72
|
+
}
|
|
73
|
+
}, x = c(() => ({
|
|
74
|
+
default: g,
|
|
75
|
+
ecoGreenLight: y,
|
|
76
|
+
ecoGreenDark: k,
|
|
77
|
+
ecoLightMarigold: T,
|
|
78
|
+
ecoStoneLight: b,
|
|
79
|
+
ecoStoneDark: _,
|
|
80
|
+
mint: S,
|
|
81
|
+
dark: L
|
|
82
|
+
})[s.value]);
|
|
83
|
+
return D(r, (n) => {
|
|
84
|
+
a(!!n);
|
|
85
|
+
}), {
|
|
86
|
+
defaultTheme: g,
|
|
87
|
+
greenLightTheme: y,
|
|
88
|
+
greenDarkTheme: k,
|
|
89
|
+
marigoldLightTheme: T,
|
|
90
|
+
stoneLightTheme: b,
|
|
91
|
+
stoneDarkTheme: _,
|
|
92
|
+
mintTheme: S,
|
|
93
|
+
darkTheme: L,
|
|
94
|
+
handleKvPopperVisibility: p,
|
|
95
|
+
popperModifiers: m,
|
|
96
|
+
popperRef: i,
|
|
97
|
+
themeStyle: x,
|
|
98
|
+
triggerHover: a
|
|
81
99
|
};
|
|
82
100
|
}
|
|
83
|
-
},
|
|
101
|
+
}, W = {
|
|
84
102
|
key: 0,
|
|
85
103
|
class: "tw-text-primary tw-font-medium tw-mb-1.5"
|
|
86
|
-
},
|
|
87
|
-
function
|
|
88
|
-
const
|
|
89
|
-
return
|
|
104
|
+
}, z = { class: "tw-text-primary" };
|
|
105
|
+
function I(e, t, o, r, s, m) {
|
|
106
|
+
const i = u("kv-popper"), l = u("kv-theme-provider");
|
|
107
|
+
return v(), V(l, {
|
|
90
108
|
theme: r.themeStyle,
|
|
91
109
|
class: "kv-tailwind"
|
|
92
110
|
}, {
|
|
93
|
-
default:
|
|
94
|
-
|
|
111
|
+
default: h(() => [
|
|
112
|
+
B(i, {
|
|
113
|
+
ref: "popperRef",
|
|
95
114
|
controller: o.controller,
|
|
96
115
|
"popper-modifiers": r.popperModifiers,
|
|
97
116
|
"popper-placement": o.placement,
|
|
98
117
|
"transition-type": "kvfastfade",
|
|
99
|
-
class: "tooltip-pane tw-absolute tw-bg-primary tw-rounded tw-z-popover"
|
|
118
|
+
class: "tooltip-pane tw-absolute tw-bg-primary tw-rounded tw-z-popover",
|
|
119
|
+
onHide: t[0] || (t[0] = (p) => r.handleKvPopperVisibility(!1)),
|
|
120
|
+
onShow: t[1] || (t[1] = (p) => r.handleKvPopperVisibility(!0))
|
|
100
121
|
}, {
|
|
101
|
-
default:
|
|
102
|
-
|
|
122
|
+
default: h(() => [
|
|
123
|
+
d("div", {
|
|
103
124
|
class: "tw-p-2.5",
|
|
104
|
-
style:
|
|
125
|
+
style: P({ maxWidth: o.maxWidth })
|
|
105
126
|
}, [
|
|
106
|
-
e.$slots.title ? (
|
|
107
|
-
|
|
108
|
-
])) :
|
|
109
|
-
|
|
110
|
-
|
|
127
|
+
e.$slots.title ? (v(), C("div", W, [
|
|
128
|
+
w(e.$slots, "title", {}, void 0, !0)
|
|
129
|
+
])) : G("", !0),
|
|
130
|
+
d("div", z, [
|
|
131
|
+
w(e.$slots, "default", {}, void 0, !0)
|
|
111
132
|
])
|
|
112
133
|
], 4),
|
|
113
|
-
t[
|
|
134
|
+
t[2] || (t[2] = d("div", {
|
|
114
135
|
class: "tooltip-arrow tw-absolute tw-w-0 tw-h-0 tw-border-solid",
|
|
115
136
|
"x-arrow": ""
|
|
116
137
|
}, null, -1))
|
|
@@ -121,7 +142,7 @@ function C(e, t, o, r, i, k) {
|
|
|
121
142
|
_: 3
|
|
122
143
|
}, 8, ["theme"]);
|
|
123
144
|
}
|
|
124
|
-
const
|
|
145
|
+
const Q = /* @__PURE__ */ N(R, [["render", I], ["__scopeId", "data-v-89cfb447"]]);
|
|
125
146
|
export {
|
|
126
|
-
|
|
147
|
+
Q as default
|
|
127
148
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@kiva/kv-components",
|
|
3
|
-
"version": "6.50.
|
|
3
|
+
"version": "6.50.5",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"access": "public"
|
|
@@ -113,5 +113,5 @@
|
|
|
113
113
|
"embla-carousel-fade",
|
|
114
114
|
"popper.js"
|
|
115
115
|
],
|
|
116
|
-
"gitHead": "
|
|
116
|
+
"gitHead": "25592bf2811c9b49ae6dec0395f0702dcbaee639"
|
|
117
117
|
}
|