@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.
@@ -1 +1 @@
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}
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}
@@ -1,16 +1,15 @@
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
- import D from "./KvPopper.js";
4
- import E from "./KvThemeProvider.js";
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 G from "../_virtual/_plugin-vue_export-helper.js";
7
- const K = {
6
+ import N from "../_virtual/_plugin-vue_export-helper.js";
7
+ const R = {
8
8
  name: "KvTooltip",
9
9
  components: {
10
- KvPopper: D,
11
- KvThemeProvider: E
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
- setup(e) {
53
+ defineEmits: ["tool-tip-visible"],
54
+ setup(e, { emit: t }) {
51
55
  const {
52
- modifiers: t,
53
- theme: o
54
- } = T(e), r = a(() => ({
55
- ...t.value,
56
+ modifiers: o,
57
+ showTooltip: r,
58
+ theme: s
59
+ } = M(e), m = c(() => ({
60
+ ...o.value,
56
61
  preventOverflow: {
57
- ...t.value.preventOverflow,
62
+ ...o.value.preventOverflow,
58
63
  padding: 10
59
64
  }
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]);
70
- return {
71
- defaultTheme: s,
72
- greenLightTheme: c,
73
- greenDarkTheme: f,
74
- marigoldLightTheme: u,
75
- stoneLightTheme: h,
76
- stoneDarkTheme: v,
77
- mintTheme: w,
78
- darkTheme: g,
79
- popperModifiers: r,
80
- themeStyle: i
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
- }, O = {
101
+ }, W = {
84
102
  key: 0,
85
103
  class: "tw-text-primary tw-font-medium tw-mb-1.5"
86
- }, B = { class: "tw-text-primary" };
87
- function C(e, t, o, r, i, k) {
88
- const _ = p("kv-popper"), y = p("kv-theme-provider");
89
- return l(), L(y, {
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: d(() => [
94
- S(_, {
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: d(() => [
102
- n("div", {
122
+ default: h(() => [
123
+ d("div", {
103
124
  class: "tw-p-2.5",
104
- style: x({ maxWidth: o.maxWidth })
125
+ style: P({ maxWidth: o.maxWidth })
105
126
  }, [
106
- e.$slots.title ? (l(), M("div", O, [
107
- m(e.$slots, "title", {}, void 0, !0)
108
- ])) : b("", !0),
109
- n("div", B, [
110
- m(e.$slots, "default", {}, void 0, !0)
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[0] || (t[0] = n("div", {
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 $ = /* @__PURE__ */ G(K, [["render", C], ["__scopeId", "data-v-88820ac6"]]);
145
+ const Q = /* @__PURE__ */ N(R, [["render", I], ["__scopeId", "data-v-89cfb447"]]);
125
146
  export {
126
- $ as default
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.4",
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": "64df72dd120838ee9d06387587c5e130d66d4009"
116
+ "gitHead": "25592bf2811c9b49ae6dec0395f0702dcbaee639"
117
117
  }