@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.
@@ -1 +1 @@
1
- .tooltip-pane[data-v-d21ce029],.tooltip-arrow[data-v-d21ce029]{box-shadow:0 4px 12px #00000014}.tooltip-arrow[data-v-d21ce029]{margin:.5rem;border-color:rgba(var(--bg-primary),var(--tw-bg-opacity, 1))}.tooltip-pane[x-placement^=top][data-v-d21ce029]{margin-bottom:.5rem}.tooltip-pane[x-placement^=top] .tooltip-arrow[data-v-d21ce029]{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-d21ce029]{margin-top:.5rem}.tooltip-pane[x-placement^=bottom] .tooltip-arrow[data-v-d21ce029]{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-d21ce029]{margin-left:.5rem}.tooltip-pane[x-placement^=right] .tooltip-arrow[data-v-d21ce029]{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-d21ce029]{margin-right:.5rem}.tooltip-pane[x-placement^=left] .tooltip-arrow[data-v-d21ce029]{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-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,14 +1,14 @@
1
- import { toRefs as g, ref as T, computed as y, resolveComponent as i, openBlock as p, createBlock as L, withCtx as d, createVNode as M, createElementVNode as n, createElementBlock as S, renderSlot as a, createCommentVNode as x } from "vue";
2
- import { defaultTheme as l, greenLightTheme as m, greenDarkTheme as s, marigoldLightTheme as c, stoneLightTheme as f, stoneDarkTheme as h, mintTheme as u, darkTheme as v } from "@kiva/kv-tokens";
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 b from "./KvThemeProvider.js";
4
+ import E from "./KvThemeProvider.js";
5
5
  import "./KvTooltip.css";
6
- import E from "../_virtual/_plugin-vue_export-helper.js";
7
- const G = {
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: b
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
- theme: t
41
- } = g(e), r = T({
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
- }), o = y(() => ({
46
- default: l,
47
- ecoGreenLight: m,
48
- ecoGreenDark: s,
49
- ecoLightMarigold: c,
50
- ecoStoneLight: f,
51
- ecoStoneDark: h,
52
- mint: u,
53
- dark: v
54
- })[t.value]);
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: l,
57
- greenLightTheme: m,
58
- greenDarkTheme: s,
59
- marigoldLightTheme: c,
60
- stoneLightTheme: f,
61
- stoneDarkTheme: h,
62
- mintTheme: u,
63
- darkTheme: v,
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: o
80
+ themeStyle: i
66
81
  };
67
82
  }
68
- }, K = {
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, r, o, w, N) {
76
- const _ = i("kv-popper"), k = i("kv-theme-provider");
77
- return p(), L(k, {
78
- theme: o.themeStyle,
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
- M(_, {
83
- controller: r.controller,
84
- "popper-modifiers": o.popperModifiers,
85
- "popper-placement": "top",
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", K, [
91
- e.$slots.title ? (p(), S("div", $, [
92
- a(e.$slots, "title", {}, void 0, !0)
93
- ])) : x("", !0),
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
- a(e.$slots, "default", {}, void 0, !0)
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 I = /* @__PURE__ */ E(G, [["render", C], ["__scopeId", "data-v-d21ce029"]]);
124
+ const $ = /* @__PURE__ */ G(K, [["render", C], ["__scopeId", "data-v-88820ac6"]]);
110
125
  export {
111
- I as default
126
+ $ as default
112
127
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kiva/kv-components",
3
- "version": "6.49.4",
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": "8cc908092982229cff8fe7d0cb421591b0d7d652"
116
+ "gitHead": "07d21f4014a4d7b4b74ce90fbe9a92689a3725c0"
117
117
  }