@kiva/kv-components 6.49.4 → 6.50.0
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 +63 -48
- package/package.json +2 -2
package/dist/vue/KvTooltip.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
.tooltip-pane[data-v-
|
|
1
|
+
.tooltip-pane[data-v-88820ac6],.tooltip-arrow[data-v-88820ac6]{box-shadow:0 4px 12px #00000014}.tooltip-arrow[data-v-88820ac6]{margin:.5rem;border-color:rgba(var(--bg-primary),var(--tw-bg-opacity, 1))}.tooltip-pane[x-placement^=top][data-v-88820ac6]{margin-bottom:.5rem}.tooltip-pane[x-placement^=top] .tooltip-arrow[data-v-88820ac6]{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-88820ac6]{margin-top:.5rem}.tooltip-pane[x-placement^=bottom] .tooltip-arrow[data-v-88820ac6]{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-88820ac6]{margin-left:.5rem}.tooltip-pane[x-placement^=right] .tooltip-arrow[data-v-88820ac6]{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-88820ac6]{margin-right:.5rem}.tooltip-pane[x-placement^=left] .tooltip-arrow[data-v-88820ac6]{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,14 +1,14 @@
|
|
|
1
|
-
import { toRefs as
|
|
2
|
-
import { defaultTheme as
|
|
1
|
+
import { toRefs as T, computed as a, resolveComponent as p, openBlock as l, createBlock as L, withCtx as d, createVNode as S, createElementVNode as n, normalizeStyle as x, createElementBlock as M, renderSlot as m, createCommentVNode as b } from "vue";
|
|
2
|
+
import { defaultTheme as s, greenLightTheme as c, greenDarkTheme as f, marigoldLightTheme as u, stoneLightTheme as h, stoneDarkTheme as v, mintTheme as w, darkTheme as g } from "@kiva/kv-tokens";
|
|
3
3
|
import D from "./KvPopper.js";
|
|
4
|
-
import
|
|
4
|
+
import E from "./KvThemeProvider.js";
|
|
5
5
|
import "./KvTooltip.css";
|
|
6
|
-
import
|
|
7
|
-
const
|
|
6
|
+
import G from "../_virtual/_plugin-vue_export-helper.js";
|
|
7
|
+
const K = {
|
|
8
8
|
name: "KvTooltip",
|
|
9
9
|
components: {
|
|
10
10
|
KvPopper: D,
|
|
11
|
-
KvThemeProvider:
|
|
11
|
+
KvThemeProvider: E
|
|
12
12
|
},
|
|
13
13
|
// TODO: Add prop for tooltip placement, Currently defaults to 'top' but will flip to bottom when constrained
|
|
14
14
|
props: {
|
|
@@ -18,6 +18,18 @@ const G = {
|
|
|
18
18
|
},
|
|
19
19
|
required: !0
|
|
20
20
|
},
|
|
21
|
+
maxWidth: {
|
|
22
|
+
type: String,
|
|
23
|
+
default: "250px"
|
|
24
|
+
},
|
|
25
|
+
modifiers: {
|
|
26
|
+
type: Object,
|
|
27
|
+
default: () => ({})
|
|
28
|
+
},
|
|
29
|
+
placement: {
|
|
30
|
+
type: String,
|
|
31
|
+
default: "top"
|
|
32
|
+
},
|
|
21
33
|
theme: {
|
|
22
34
|
type: String,
|
|
23
35
|
default: "default",
|
|
@@ -37,76 +49,79 @@ const G = {
|
|
|
37
49
|
},
|
|
38
50
|
setup(e) {
|
|
39
51
|
const {
|
|
40
|
-
|
|
41
|
-
|
|
52
|
+
modifiers: t,
|
|
53
|
+
theme: o
|
|
54
|
+
} = T(e), r = a(() => ({
|
|
55
|
+
...t.value,
|
|
42
56
|
preventOverflow: {
|
|
57
|
+
...t.value.preventOverflow,
|
|
43
58
|
padding: 10
|
|
44
59
|
}
|
|
45
|
-
}),
|
|
46
|
-
default:
|
|
47
|
-
ecoGreenLight:
|
|
48
|
-
ecoGreenDark:
|
|
49
|
-
ecoLightMarigold:
|
|
50
|
-
ecoStoneLight:
|
|
51
|
-
ecoStoneDark:
|
|
52
|
-
mint:
|
|
53
|
-
dark:
|
|
54
|
-
})[
|
|
60
|
+
})), i = a(() => ({
|
|
61
|
+
default: s,
|
|
62
|
+
ecoGreenLight: c,
|
|
63
|
+
ecoGreenDark: f,
|
|
64
|
+
ecoLightMarigold: u,
|
|
65
|
+
ecoStoneLight: h,
|
|
66
|
+
ecoStoneDark: v,
|
|
67
|
+
mint: w,
|
|
68
|
+
dark: g
|
|
69
|
+
})[o.value]);
|
|
55
70
|
return {
|
|
56
|
-
defaultTheme:
|
|
57
|
-
greenLightTheme:
|
|
58
|
-
greenDarkTheme:
|
|
59
|
-
marigoldLightTheme:
|
|
60
|
-
stoneLightTheme:
|
|
61
|
-
stoneDarkTheme:
|
|
62
|
-
mintTheme:
|
|
63
|
-
darkTheme:
|
|
71
|
+
defaultTheme: s,
|
|
72
|
+
greenLightTheme: c,
|
|
73
|
+
greenDarkTheme: f,
|
|
74
|
+
marigoldLightTheme: u,
|
|
75
|
+
stoneLightTheme: h,
|
|
76
|
+
stoneDarkTheme: v,
|
|
77
|
+
mintTheme: w,
|
|
78
|
+
darkTheme: g,
|
|
64
79
|
popperModifiers: r,
|
|
65
|
-
themeStyle:
|
|
80
|
+
themeStyle: i
|
|
66
81
|
};
|
|
67
82
|
}
|
|
68
|
-
},
|
|
69
|
-
class: "tw-p-2.5",
|
|
70
|
-
style: { "max-width": "250px" }
|
|
71
|
-
}, $ = {
|
|
83
|
+
}, O = {
|
|
72
84
|
key: 0,
|
|
73
85
|
class: "tw-text-primary tw-font-medium tw-mb-1.5"
|
|
74
86
|
}, B = { class: "tw-text-primary" };
|
|
75
|
-
function C(e, t,
|
|
76
|
-
const _ =
|
|
77
|
-
return
|
|
78
|
-
theme:
|
|
87
|
+
function C(e, t, o, r, i, k) {
|
|
88
|
+
const _ = p("kv-popper"), y = p("kv-theme-provider");
|
|
89
|
+
return l(), L(y, {
|
|
90
|
+
theme: r.themeStyle,
|
|
79
91
|
class: "kv-tailwind"
|
|
80
92
|
}, {
|
|
81
93
|
default: d(() => [
|
|
82
|
-
|
|
83
|
-
controller:
|
|
84
|
-
"popper-modifiers":
|
|
85
|
-
"popper-placement":
|
|
94
|
+
S(_, {
|
|
95
|
+
controller: o.controller,
|
|
96
|
+
"popper-modifiers": r.popperModifiers,
|
|
97
|
+
"popper-placement": o.placement,
|
|
86
98
|
"transition-type": "kvfastfade",
|
|
87
99
|
class: "tooltip-pane tw-absolute tw-bg-primary tw-rounded tw-z-popover"
|
|
88
100
|
}, {
|
|
89
101
|
default: d(() => [
|
|
90
|
-
n("div",
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
102
|
+
n("div", {
|
|
103
|
+
class: "tw-p-2.5",
|
|
104
|
+
style: x({ maxWidth: o.maxWidth })
|
|
105
|
+
}, [
|
|
106
|
+
e.$slots.title ? (l(), M("div", O, [
|
|
107
|
+
m(e.$slots, "title", {}, void 0, !0)
|
|
108
|
+
])) : b("", !0),
|
|
94
109
|
n("div", B, [
|
|
95
|
-
|
|
110
|
+
m(e.$slots, "default", {}, void 0, !0)
|
|
96
111
|
])
|
|
97
|
-
]),
|
|
112
|
+
], 4),
|
|
98
113
|
t[0] || (t[0] = n("div", {
|
|
99
114
|
class: "tooltip-arrow tw-absolute tw-w-0 tw-h-0 tw-border-solid",
|
|
100
115
|
"x-arrow": ""
|
|
101
116
|
}, null, -1))
|
|
102
117
|
]),
|
|
103
118
|
_: 3
|
|
104
|
-
}, 8, ["controller", "popper-modifiers"])
|
|
119
|
+
}, 8, ["controller", "popper-modifiers", "popper-placement"])
|
|
105
120
|
]),
|
|
106
121
|
_: 3
|
|
107
122
|
}, 8, ["theme"]);
|
|
108
123
|
}
|
|
109
|
-
const
|
|
124
|
+
const $ = /* @__PURE__ */ G(K, [["render", C], ["__scopeId", "data-v-88820ac6"]]);
|
|
110
125
|
export {
|
|
111
|
-
|
|
126
|
+
$ as default
|
|
112
127
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@kiva/kv-components",
|
|
3
|
-
"version": "6.
|
|
3
|
+
"version": "6.50.0",
|
|
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": "07d21f4014a4d7b4b74ce90fbe9a92689a3725c0"
|
|
117
117
|
}
|