@stenajs-webui/tooltip 18.4.1 → 18.4.2

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/index.es.js CHANGED
@@ -1,16 +1,16 @@
1
- (function(){"use strict";try{var r=document.createElement("style");r.appendChild(document.createTextNode('._noPadding_183x1_1 .tippy-content{padding:0}.tippy-box[data-theme~=light]{box-shadow:var(--swui-shadow-popover)}.tippy-box[data-theme~=outlined]{border:1px solid var(--lhds-color-blue-500)}.tippy-box[data-theme~=info]{background-color:var(--lhds-color-blue-50);color:var(--swui-text-primary-color)}.tippy-box[data-theme~=info] .tippy-arrow{color:var(--lhds-color-blue-50)}.tippy-box[data-theme~=warning]{background-color:var(--lhds-color-orange-50);color:var(--swui-text-primary-color)}.tippy-box[data-theme~=warning] .tippy-arrow{color:var(--lhds-color-orange-50)}.tippy-box[data-theme~=error]{background-color:var(--lhds-color-red-50);color:var(--swui-text-primary-color)}.tippy-box[data-theme~=error] .tippy-arrow{color:var(--lhds-color-red-50)}.tippy-box[data-theme~=info][data-placement^=top]>.tippy-arrow:before{border-top-color:var(--lhds-color-blue-50)}.tippy-box[data-theme~=info][data-placement^=bottom]>.tippy-arrow:before{border-bottom-color:var(--lhds-color-blue-50)}.tippy-box[data-theme~=info][data-placement^=left]>.tippy-arrow:before{border-left-color:var(--lhds-color-blue-50)}.tippy-box[data-theme~=info][data-placement^=right]>.tippy-arrow:before{border-right-color:var(--lhds-color-blue-50)}.tippy-box[data-theme~=warning][data-placement^=top]>.tippy-arrow:before{border-top-color:var(--lhds-color-orange-50)}.tippy-box[data-theme~=warning][data-placement^=bottom]>.tippy-arrow:before{border-bottom-color:var(--lhds-color-orange-50)}.tippy-box[data-theme~=warning][data-placement^=left]>.tippy-arrow:before{border-left-color:var(--lhds-color-orange-50)}.tippy-box[data-theme~=warning][data-placement^=right]>.tippy-arrow:before{border-right-color:var(--lhds-color-orange-50)}.tippy-box[data-theme~=error][data-placement^=top]>.tippy-arrow:before{border-top-color:var(--lhds-color-red-50)}.tippy-box[data-theme~=error][data-placement^=bottom]>.tippy-arrow:before{border-bottom-color:var(--lhds-color-red-50)}.tippy-box[data-theme~=error][data-placement^=left]>.tippy-arrow:before{border-left-color:var(--lhds-color-red-50)}.tippy-box[data-theme~=error][data-placement^=right]>.tippy-arrow:before{border-right-color:var(--lhds-color-red-50)}.tippy-box[data-animation=fade][data-state=hidden]{opacity:0}[data-tippy-root]{max-width:calc(100vw - 10px)}.tippy-box{position:relative;background-color:#333;color:#fff;border-radius:4px;font-size:14px;line-height:1.4;outline:0;transition-property:visibility,opacity,-webkit-transform;transition-property:transform,visibility,opacity;transition-property:transform,visibility,opacity,-webkit-transform}.tippy-box[data-placement^=top]>.tippy-arrow{bottom:0}.tippy-box[data-placement^=top]>.tippy-arrow:before{bottom:-7px;left:0;border-width:8px 8px 0;border-top-color:initial;-webkit-transform-origin:center top;transform-origin:center top}.tippy-box[data-placement^=bottom]>.tippy-arrow{top:0}.tippy-box[data-placement^=bottom]>.tippy-arrow:before{top:-7px;left:0;border-width:0 8px 8px;border-bottom-color:initial;-webkit-transform-origin:center bottom;transform-origin:center bottom}.tippy-box[data-placement^=left]>.tippy-arrow{right:0}.tippy-box[data-placement^=left]>.tippy-arrow:before{border-width:8px 0 8px 8px;border-left-color:initial;right:-7px;-webkit-transform-origin:center left;transform-origin:center left}.tippy-box[data-placement^=right]>.tippy-arrow{left:0}.tippy-box[data-placement^=right]>.tippy-arrow:before{left:-7px;border-width:8px 8px 8px 0;border-right-color:initial;-webkit-transform-origin:center right;transform-origin:center right}.tippy-box[data-inertia][data-state=visible]{transition-timing-function:cubic-bezier(.54,1.5,.38,1.11)}.tippy-arrow{width:16px;height:16px;color:#333}.tippy-arrow:before{content:"";position:absolute;border-color:transparent;border-style:solid}.tippy-content{position:relative;padding:5px 9px;z-index:1}.tippy-box[data-theme~=light]{color:#26323d;box-shadow:0 0 20px 4px #9aa1b126,0 4px 80px -8px #24282f40,0 4px 4px -2px #5b5e6926;background-color:#fff}.tippy-box[data-theme~=light][data-placement^=top]>.tippy-arrow:before{border-top-color:#fff}.tippy-box[data-theme~=light][data-placement^=bottom]>.tippy-arrow:before{border-bottom-color:#fff}.tippy-box[data-theme~=light][data-placement^=left]>.tippy-arrow:before{border-left-color:#fff}.tippy-box[data-theme~=light][data-placement^=right]>.tippy-arrow:before{border-right-color:#fff}.tippy-box[data-theme~=light]>.tippy-backdrop{background-color:#fff}.tippy-box[data-theme~=light]>.tippy-svg-arrow{fill:#fff}.tippy-box[data-theme~=dark]{color:var(--lhds-color-ui-50);box-shadow:0 0 20px 4px #9aa1b126,0 4px 80px -8px #24282f40,0 4px 4px -2px #5b5e6926;background-color:var(--lhds-color-ui-800)}.tippy-box[data-theme~=dark][data-placement^=top]>.tippy-arrow:before{border-top-color:var(--lhds-color-ui-800)}.tippy-box[data-theme~=dark][data-placement^=bottom]>.tippy-arrow:before{border-bottom-color:var(--lhds-color-ui-800)}.tippy-box[data-theme~=dark][data-placement^=left]>.tippy-arrow:before{border-left-color:var(--lhds-color-ui-800)}.tippy-box[data-theme~=dark][data-placement^=right]>.tippy-arrow:before{border-right-color:var(--lhds-color-ui-800)}.tippy-box[data-theme~=dark]>.tippy-backdrop{background-color:var(--lhds-color-ui-800)}.tippy-box[data-theme~=dark]>.tippy-svg-arrow{fill:var(--lhds-color-ui-800)}._tooltip_1gh65_1{display:flex;width:-webkit-fit-content;width:-moz-fit-content;width:fit-content;align-items:center;border-radius:var(--swui-border-radius);padding:var(--swui-metrics-spacing) calc(var(--swui-metrics-indent) * 2)}._tooltip_1gh65_1._withIcon_1gh65_8{padding:calc(var(--swui-metrics-spacing) * .5);padding-right:calc(var(--swui-metrics-indent) * 2)}._iconWrapper_1gh65_14{--current-bg-color: transparent;--current-border-color: var(--lhds-color-ui-50);--current-icon-color: var(--lhds-color-ui-50);display:inline-flex;flex-direction:row;white-space:nowrap;background-color:var(--current-bg-color);border:1px solid var(--current-border-color);border-radius:var(--swui-border-radius);padding:calc(var(--swui-metrics-spacing) * .5);height:16px;align-items:flex-start}._iconWrapper_1gh65_14 svg{color:var(--current-icon-color)}._iconWrapper_1gh65_14._info_1gh65_35{--current-border-color: var(--lhds-color-blue-300);--current-bg-color: var(--lhds-color-blue-100);--current-icon-color: var(--lhds-color-blue-700)}._iconWrapper_1gh65_14._warning_1gh65_41{--current-border-color: var(--lhds-color-orange-300);--current-bg-color: var(--lhds-color-orange-100);--current-icon-color: var(--lhds-color-orange-700)}._iconWrapper_1gh65_14._error_1gh65_47{--current-border-color: var(--lhds-color-red-300);--current-bg-color: var(--lhds-color-red-100);--current-icon-color: var(--lhds-color-red-700)}')),document.head.appendChild(r)}catch(o){console.error("vite-plugin-css-injected-by-js",o)}})();
2
- import { Column as W, Text as f, Space as a, Row as u, Box as j } from "@stenajs-webui/core";
1
+ (function(){"use strict";try{var r=document.createElement("style");r.appendChild(document.createTextNode('._noPadding_183x1_1 .tippy-content{padding:0}.tippy-box[data-theme~=light]{box-shadow:var(--swui-shadow-popover)}.tippy-box[data-theme~=outlined]{border:1px solid var(--lhds-color-blue-500)}.tippy-box[data-theme~=info]{background-color:var(--lhds-color-blue-50);color:var(--swui-text-primary-color)}.tippy-box[data-theme~=info] .tippy-arrow{color:var(--lhds-color-blue-50)}.tippy-box[data-theme~=warning]{background-color:var(--lhds-color-orange-50);color:var(--swui-text-primary-color)}.tippy-box[data-theme~=warning] .tippy-arrow{color:var(--lhds-color-orange-50)}.tippy-box[data-theme~=error]{background-color:var(--lhds-color-red-50);color:var(--swui-text-primary-color)}.tippy-box[data-theme~=error] .tippy-arrow{color:var(--lhds-color-red-50)}.tippy-box[data-theme~=info][data-placement^=top]>.tippy-arrow:before{border-top-color:var(--lhds-color-blue-50)}.tippy-box[data-theme~=info][data-placement^=bottom]>.tippy-arrow:before{border-bottom-color:var(--lhds-color-blue-50)}.tippy-box[data-theme~=info][data-placement^=left]>.tippy-arrow:before{border-left-color:var(--lhds-color-blue-50)}.tippy-box[data-theme~=info][data-placement^=right]>.tippy-arrow:before{border-right-color:var(--lhds-color-blue-50)}.tippy-box[data-theme~=warning][data-placement^=top]>.tippy-arrow:before{border-top-color:var(--lhds-color-orange-50)}.tippy-box[data-theme~=warning][data-placement^=bottom]>.tippy-arrow:before{border-bottom-color:var(--lhds-color-orange-50)}.tippy-box[data-theme~=warning][data-placement^=left]>.tippy-arrow:before{border-left-color:var(--lhds-color-orange-50)}.tippy-box[data-theme~=warning][data-placement^=right]>.tippy-arrow:before{border-right-color:var(--lhds-color-orange-50)}.tippy-box[data-theme~=error][data-placement^=top]>.tippy-arrow:before{border-top-color:var(--lhds-color-red-50)}.tippy-box[data-theme~=error][data-placement^=bottom]>.tippy-arrow:before{border-bottom-color:var(--lhds-color-red-50)}.tippy-box[data-theme~=error][data-placement^=left]>.tippy-arrow:before{border-left-color:var(--lhds-color-red-50)}.tippy-box[data-theme~=error][data-placement^=right]>.tippy-arrow:before{border-right-color:var(--lhds-color-red-50)}.tippy-box[data-animation=fade][data-state=hidden]{opacity:0}[data-tippy-root]{max-width:calc(100vw - 10px)}.tippy-box{position:relative;background-color:#333;color:#fff;border-radius:4px;font-size:14px;line-height:1.4;outline:0;transition-property:visibility,opacity,-webkit-transform;transition-property:transform,visibility,opacity;transition-property:transform,visibility,opacity,-webkit-transform}.tippy-box[data-placement^=top]>.tippy-arrow{bottom:0}.tippy-box[data-placement^=top]>.tippy-arrow:before{bottom:-7px;left:0;border-width:8px 8px 0;border-top-color:initial;-webkit-transform-origin:center top;transform-origin:center top}.tippy-box[data-placement^=bottom]>.tippy-arrow{top:0}.tippy-box[data-placement^=bottom]>.tippy-arrow:before{top:-7px;left:0;border-width:0 8px 8px;border-bottom-color:initial;-webkit-transform-origin:center bottom;transform-origin:center bottom}.tippy-box[data-placement^=left]>.tippy-arrow{right:0}.tippy-box[data-placement^=left]>.tippy-arrow:before{border-width:8px 0 8px 8px;border-left-color:initial;right:-7px;-webkit-transform-origin:center left;transform-origin:center left}.tippy-box[data-placement^=right]>.tippy-arrow{left:0}.tippy-box[data-placement^=right]>.tippy-arrow:before{left:-7px;border-width:8px 8px 8px 0;border-right-color:initial;-webkit-transform-origin:center right;transform-origin:center right}.tippy-box[data-inertia][data-state=visible]{transition-timing-function:cubic-bezier(.54,1.5,.38,1.11)}.tippy-arrow{width:16px;height:16px;color:#333}.tippy-arrow:before{content:"";position:absolute;border-color:transparent;border-style:solid}.tippy-content{position:relative;padding:5px 9px;z-index:1}.tippy-box[data-theme~=light]{color:#26323d;box-shadow:0 0 20px 4px #9aa1b126,0 4px 80px -8px #24282f40,0 4px 4px -2px #5b5e6926;background-color:#fff}.tippy-box[data-theme~=light][data-placement^=top]>.tippy-arrow:before{border-top-color:#fff}.tippy-box[data-theme~=light][data-placement^=bottom]>.tippy-arrow:before{border-bottom-color:#fff}.tippy-box[data-theme~=light][data-placement^=left]>.tippy-arrow:before{border-left-color:#fff}.tippy-box[data-theme~=light][data-placement^=right]>.tippy-arrow:before{border-right-color:#fff}.tippy-box[data-theme~=light]>.tippy-backdrop{background-color:#fff}.tippy-box[data-theme~=light]>.tippy-svg-arrow{fill:#fff}.tippy-box[data-theme~=dark]{color:var(--lhds-color-ui-50);box-shadow:0 0 20px 4px #9aa1b126,0 4px 80px -8px #24282f40,0 4px 4px -2px #5b5e6926;background-color:var(--lhds-color-ui-800)}.tippy-box[data-theme~=dark][data-placement^=top]>.tippy-arrow:before{border-top-color:var(--lhds-color-ui-800)}.tippy-box[data-theme~=dark][data-placement^=bottom]>.tippy-arrow:before{border-bottom-color:var(--lhds-color-ui-800)}.tippy-box[data-theme~=dark][data-placement^=left]>.tippy-arrow:before{border-left-color:var(--lhds-color-ui-800)}.tippy-box[data-theme~=dark][data-placement^=right]>.tippy-arrow:before{border-right-color:var(--lhds-color-ui-800)}.tippy-box[data-theme~=dark]>.tippy-backdrop{background-color:var(--lhds-color-ui-800)}.tippy-box[data-theme~=dark]>.tippy-svg-arrow{fill:var(--lhds-color-ui-800)}._tooltip_1i1mn_1{display:flex;width:-webkit-fit-content;width:-moz-fit-content;width:fit-content;align-items:center;border-radius:var(--swui-border-radius);padding:var(--swui-metrics-spacing) calc(var(--swui-metrics-indent) * 2)}._tooltip_1i1mn_1._withIcon_1i1mn_8{padding:calc(var(--swui-metrics-spacing) * .5);padding-right:calc(var(--swui-metrics-indent) * 2)}._iconWrapper_1i1mn_14{--current-bg-color: transparent;--current-border-color: var(--lhds-color-ui-50);--current-icon-color: var(--lhds-color-ui-50);display:inline-flex;flex-direction:row;white-space:nowrap;background-color:var(--current-bg-color);border:1px solid var(--current-border-color);border-radius:var(--swui-border-radius);padding:calc(var(--swui-metrics-spacing) * .5);align-items:flex-start}._iconWrapper_1i1mn_14 svg{color:var(--current-icon-color)}._iconWrapper_1i1mn_14._info_1i1mn_34{--current-border-color: var(--lhds-color-blue-300);--current-bg-color: var(--lhds-color-blue-100);--current-icon-color: var(--lhds-color-blue-700)}._iconWrapper_1i1mn_14._warning_1i1mn_40{--current-border-color: var(--lhds-color-orange-300);--current-bg-color: var(--lhds-color-orange-100);--current-icon-color: var(--lhds-color-orange-700)}._iconWrapper_1i1mn_14._error_1i1mn_46{--current-border-color: var(--lhds-color-red-300);--current-bg-color: var(--lhds-color-red-100);--current-icon-color: var(--lhds-color-red-700)}')),document.head.appendChild(r)}catch(o){console.error("vite-plugin-css-injected-by-js",o)}})();
2
+ import { Column as W, Text as f, Space as a, Row as m, Box as j } from "@stenajs-webui/core";
3
3
  import { FlatButton as _, PrimaryButton as k, Spinner as B, Icon as N, stenaInfoCircle as R, stenaExclamationCircle as $, stenaExclamationTriangle as b } from "@stenajs-webui/elements";
4
4
  import { jsxs as c, jsx as n, Fragment as A } from "react/jsx-runtime";
5
5
  import E from "@tippyjs/react";
6
6
  import { useState as F, useMemo as M, useRef as H } from "react";
7
- import g from "classnames";
7
+ import u from "classnames";
8
8
  import { cssColor as L } from "@stenajs-webui/theme";
9
9
  const cn = ({
10
10
  text: o = "Are you sure?",
11
11
  yesLabel: t = "Yes",
12
- noLabel: e = "No",
13
- onNo: i,
12
+ noLabel: i = "No",
13
+ onNo: e,
14
14
  onYes: l,
15
15
  loading: r
16
16
  }) => /* @__PURE__ */ c(W, {
@@ -21,18 +21,18 @@ const cn = ({
21
21
  },
22
22
  children: [/* @__PURE__ */ n(f, {
23
23
  children: o
24
- }), /* @__PURE__ */ n(a, {}), /* @__PURE__ */ c(u, {
24
+ }), /* @__PURE__ */ n(a, {}), /* @__PURE__ */ c(m, {
25
25
  justifyContent: "flex-end",
26
26
  alignItems: "center",
27
27
  children: [/* @__PURE__ */ n(_, {
28
- label: e,
29
- onClick: i
28
+ label: i,
29
+ onClick: e
30
30
  }), /* @__PURE__ */ n(a, {}), /* @__PURE__ */ n(k, {
31
31
  label: t,
32
32
  onClick: l
33
33
  })]
34
34
  })]
35
- }), r && /* @__PURE__ */ n(u, {
35
+ }), r && /* @__PURE__ */ n(m, {
36
36
  justifyContent: "center",
37
37
  alignItems: "center",
38
38
  left: 0,
@@ -48,22 +48,22 @@ const cn = ({
48
48
  noPadding: Y
49
49
  };
50
50
  const D = (o = []) => {
51
- const [t, e] = F(!1);
51
+ const [t, i] = F(!1);
52
52
  return {
53
53
  plugins: [M(
54
54
  () => ({
55
55
  fn: () => ({
56
- onShow: () => e(!0),
57
- onHidden: () => e(!1)
56
+ onShow: () => i(!0),
57
+ onHidden: () => i(!1)
58
58
  })
59
59
  }),
60
- [e]
60
+ [i]
61
61
  ), ...o],
62
62
  mounted: t
63
63
  };
64
64
  }, G = {
65
65
  noPadding: q.noPadding
66
- }, h = {
66
+ }, g = {
67
67
  standard: "light",
68
68
  info: "info",
69
69
  warning: "warning",
@@ -72,8 +72,8 @@ const D = (o = []) => {
72
72
  }, y = ({
73
73
  visible: o,
74
74
  trigger: t = "mouseenter",
75
- children: e,
76
- tippyRef: i,
75
+ children: i,
76
+ tippyRef: e,
77
77
  delay: l = 0,
78
78
  variant: r = "standard",
79
79
  disablePadding: d,
@@ -95,7 +95,7 @@ const D = (o = []) => {
95
95
  className: G.noPadding,
96
96
  trigger: o !== void 0 ? void 0 : t,
97
97
  visible: o,
98
- theme: `${T} ${(p = h[r]) != null ? p : h.standard}`,
98
+ theme: `${T} ${(p = g[r]) != null ? p : g.standard}`,
99
99
  delay: l,
100
100
  maxWidth: x,
101
101
  arrow: I,
@@ -107,25 +107,25 @@ const D = (o = []) => {
107
107
  plugins: z,
108
108
  ...C,
109
109
  children: /* @__PURE__ */ n("div", {
110
- ref: i,
111
- children: e
110
+ ref: e,
111
+ children: i
112
112
  })
113
113
  });
114
114
  }, ln = ({
115
115
  children: o,
116
116
  onShow: t,
117
- onHide: e,
118
- ...i
117
+ onHide: i,
118
+ ...e
119
119
  }) => /* @__PURE__ */ n(y, {
120
120
  content: o,
121
121
  trigger: "click",
122
122
  zIndex: 1e3,
123
123
  onShow: t,
124
- onHide: e,
124
+ onHide: i,
125
125
  children: /* @__PURE__ */ n(_, {
126
- ...i
126
+ ...e
127
127
  })
128
- }), J = "_tooltip_1gh65_1", K = "_withIcon_1gh65_8", O = "_iconWrapper_1gh65_14", Q = "_info_1gh65_35", U = "_warning_1gh65_41", V = "_error_1gh65_47", s = {
128
+ }), J = "_tooltip_1i1mn_1", K = "_withIcon_1i1mn_8", O = "_iconWrapper_1i1mn_14", Q = "_info_1i1mn_34", U = "_warning_1i1mn_40", V = "_error_1i1mn_46", s = {
129
129
  tooltip: J,
130
130
  withIcon: K,
131
131
  iconWrapper: O,
@@ -136,7 +136,7 @@ const D = (o = []) => {
136
136
  info: R,
137
137
  warning: $,
138
138
  error: b
139
- }, m = ({
139
+ }, h = ({
140
140
  label: o
141
141
  }) => /* @__PURE__ */ n(f, {
142
142
  color: L("--lhds-color-ui-50"),
@@ -146,35 +146,35 @@ const D = (o = []) => {
146
146
  }), an = ({
147
147
  label: o,
148
148
  variant: t,
149
- children: e,
150
- ...i
149
+ children: i,
150
+ ...e
151
151
  }) => /* @__PURE__ */ n(y, {
152
152
  theme: "dark",
153
- ...i,
153
+ ...e,
154
154
  disablePadding: !0,
155
155
  content: /* @__PURE__ */ n("div", {
156
- className: g(s.tooltip, t ? s.withIcon : null),
156
+ className: u(s.tooltip, t ? s.withIcon : null),
157
157
  children: t ? /* @__PURE__ */ c(A, {
158
158
  children: [/* @__PURE__ */ n("div", {
159
- className: g(s.iconWrapper, s[t]),
159
+ className: u(s.iconWrapper, s[t]),
160
160
  children: /* @__PURE__ */ n(N, {
161
161
  icon: X[t],
162
162
  size: 16
163
163
  })
164
- }), /* @__PURE__ */ n(a, {}), /* @__PURE__ */ n(m, {
164
+ }), /* @__PURE__ */ n(a, {}), /* @__PURE__ */ n(h, {
165
165
  label: o
166
166
  })]
167
- }) : /* @__PURE__ */ n(m, {
167
+ }) : /* @__PURE__ */ n(h, {
168
168
  label: o
169
169
  })
170
170
  }),
171
- children: e
171
+ children: i
172
172
  }), dn = () => {
173
173
  const o = H();
174
174
  return [
175
175
  (t) => {
176
- var e;
177
- o.current = (e = t == null ? void 0 : t._tippy) != null ? e : void 0;
176
+ var i;
177
+ o.current = (i = t == null ? void 0 : t._tippy) != null ? i : void 0;
178
178
  },
179
179
  o
180
180
  ];
package/dist/index.js CHANGED
@@ -1,3 +1,3 @@
1
- (function(){"use strict";try{var r=document.createElement("style");r.appendChild(document.createTextNode('._noPadding_183x1_1 .tippy-content{padding:0}.tippy-box[data-theme~=light]{box-shadow:var(--swui-shadow-popover)}.tippy-box[data-theme~=outlined]{border:1px solid var(--lhds-color-blue-500)}.tippy-box[data-theme~=info]{background-color:var(--lhds-color-blue-50);color:var(--swui-text-primary-color)}.tippy-box[data-theme~=info] .tippy-arrow{color:var(--lhds-color-blue-50)}.tippy-box[data-theme~=warning]{background-color:var(--lhds-color-orange-50);color:var(--swui-text-primary-color)}.tippy-box[data-theme~=warning] .tippy-arrow{color:var(--lhds-color-orange-50)}.tippy-box[data-theme~=error]{background-color:var(--lhds-color-red-50);color:var(--swui-text-primary-color)}.tippy-box[data-theme~=error] .tippy-arrow{color:var(--lhds-color-red-50)}.tippy-box[data-theme~=info][data-placement^=top]>.tippy-arrow:before{border-top-color:var(--lhds-color-blue-50)}.tippy-box[data-theme~=info][data-placement^=bottom]>.tippy-arrow:before{border-bottom-color:var(--lhds-color-blue-50)}.tippy-box[data-theme~=info][data-placement^=left]>.tippy-arrow:before{border-left-color:var(--lhds-color-blue-50)}.tippy-box[data-theme~=info][data-placement^=right]>.tippy-arrow:before{border-right-color:var(--lhds-color-blue-50)}.tippy-box[data-theme~=warning][data-placement^=top]>.tippy-arrow:before{border-top-color:var(--lhds-color-orange-50)}.tippy-box[data-theme~=warning][data-placement^=bottom]>.tippy-arrow:before{border-bottom-color:var(--lhds-color-orange-50)}.tippy-box[data-theme~=warning][data-placement^=left]>.tippy-arrow:before{border-left-color:var(--lhds-color-orange-50)}.tippy-box[data-theme~=warning][data-placement^=right]>.tippy-arrow:before{border-right-color:var(--lhds-color-orange-50)}.tippy-box[data-theme~=error][data-placement^=top]>.tippy-arrow:before{border-top-color:var(--lhds-color-red-50)}.tippy-box[data-theme~=error][data-placement^=bottom]>.tippy-arrow:before{border-bottom-color:var(--lhds-color-red-50)}.tippy-box[data-theme~=error][data-placement^=left]>.tippy-arrow:before{border-left-color:var(--lhds-color-red-50)}.tippy-box[data-theme~=error][data-placement^=right]>.tippy-arrow:before{border-right-color:var(--lhds-color-red-50)}.tippy-box[data-animation=fade][data-state=hidden]{opacity:0}[data-tippy-root]{max-width:calc(100vw - 10px)}.tippy-box{position:relative;background-color:#333;color:#fff;border-radius:4px;font-size:14px;line-height:1.4;outline:0;transition-property:visibility,opacity,-webkit-transform;transition-property:transform,visibility,opacity;transition-property:transform,visibility,opacity,-webkit-transform}.tippy-box[data-placement^=top]>.tippy-arrow{bottom:0}.tippy-box[data-placement^=top]>.tippy-arrow:before{bottom:-7px;left:0;border-width:8px 8px 0;border-top-color:initial;-webkit-transform-origin:center top;transform-origin:center top}.tippy-box[data-placement^=bottom]>.tippy-arrow{top:0}.tippy-box[data-placement^=bottom]>.tippy-arrow:before{top:-7px;left:0;border-width:0 8px 8px;border-bottom-color:initial;-webkit-transform-origin:center bottom;transform-origin:center bottom}.tippy-box[data-placement^=left]>.tippy-arrow{right:0}.tippy-box[data-placement^=left]>.tippy-arrow:before{border-width:8px 0 8px 8px;border-left-color:initial;right:-7px;-webkit-transform-origin:center left;transform-origin:center left}.tippy-box[data-placement^=right]>.tippy-arrow{left:0}.tippy-box[data-placement^=right]>.tippy-arrow:before{left:-7px;border-width:8px 8px 8px 0;border-right-color:initial;-webkit-transform-origin:center right;transform-origin:center right}.tippy-box[data-inertia][data-state=visible]{transition-timing-function:cubic-bezier(.54,1.5,.38,1.11)}.tippy-arrow{width:16px;height:16px;color:#333}.tippy-arrow:before{content:"";position:absolute;border-color:transparent;border-style:solid}.tippy-content{position:relative;padding:5px 9px;z-index:1}.tippy-box[data-theme~=light]{color:#26323d;box-shadow:0 0 20px 4px #9aa1b126,0 4px 80px -8px #24282f40,0 4px 4px -2px #5b5e6926;background-color:#fff}.tippy-box[data-theme~=light][data-placement^=top]>.tippy-arrow:before{border-top-color:#fff}.tippy-box[data-theme~=light][data-placement^=bottom]>.tippy-arrow:before{border-bottom-color:#fff}.tippy-box[data-theme~=light][data-placement^=left]>.tippy-arrow:before{border-left-color:#fff}.tippy-box[data-theme~=light][data-placement^=right]>.tippy-arrow:before{border-right-color:#fff}.tippy-box[data-theme~=light]>.tippy-backdrop{background-color:#fff}.tippy-box[data-theme~=light]>.tippy-svg-arrow{fill:#fff}.tippy-box[data-theme~=dark]{color:var(--lhds-color-ui-50);box-shadow:0 0 20px 4px #9aa1b126,0 4px 80px -8px #24282f40,0 4px 4px -2px #5b5e6926;background-color:var(--lhds-color-ui-800)}.tippy-box[data-theme~=dark][data-placement^=top]>.tippy-arrow:before{border-top-color:var(--lhds-color-ui-800)}.tippy-box[data-theme~=dark][data-placement^=bottom]>.tippy-arrow:before{border-bottom-color:var(--lhds-color-ui-800)}.tippy-box[data-theme~=dark][data-placement^=left]>.tippy-arrow:before{border-left-color:var(--lhds-color-ui-800)}.tippy-box[data-theme~=dark][data-placement^=right]>.tippy-arrow:before{border-right-color:var(--lhds-color-ui-800)}.tippy-box[data-theme~=dark]>.tippy-backdrop{background-color:var(--lhds-color-ui-800)}.tippy-box[data-theme~=dark]>.tippy-svg-arrow{fill:var(--lhds-color-ui-800)}._tooltip_1gh65_1{display:flex;width:-webkit-fit-content;width:-moz-fit-content;width:fit-content;align-items:center;border-radius:var(--swui-border-radius);padding:var(--swui-metrics-spacing) calc(var(--swui-metrics-indent) * 2)}._tooltip_1gh65_1._withIcon_1gh65_8{padding:calc(var(--swui-metrics-spacing) * .5);padding-right:calc(var(--swui-metrics-indent) * 2)}._iconWrapper_1gh65_14{--current-bg-color: transparent;--current-border-color: var(--lhds-color-ui-50);--current-icon-color: var(--lhds-color-ui-50);display:inline-flex;flex-direction:row;white-space:nowrap;background-color:var(--current-bg-color);border:1px solid var(--current-border-color);border-radius:var(--swui-border-radius);padding:calc(var(--swui-metrics-spacing) * .5);height:16px;align-items:flex-start}._iconWrapper_1gh65_14 svg{color:var(--current-icon-color)}._iconWrapper_1gh65_14._info_1gh65_35{--current-border-color: var(--lhds-color-blue-300);--current-bg-color: var(--lhds-color-blue-100);--current-icon-color: var(--lhds-color-blue-700)}._iconWrapper_1gh65_14._warning_1gh65_41{--current-border-color: var(--lhds-color-orange-300);--current-bg-color: var(--lhds-color-orange-100);--current-icon-color: var(--lhds-color-orange-700)}._iconWrapper_1gh65_14._error_1gh65_47{--current-border-color: var(--lhds-color-red-300);--current-bg-color: var(--lhds-color-red-100);--current-icon-color: var(--lhds-color-red-700)}')),document.head.appendChild(r)}catch(o){console.error("vite-plugin-css-injected-by-js",o)}})();
2
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const s=require("@stenajs-webui/core"),r=require("@stenajs-webui/elements"),t=require("react/jsx-runtime"),b=require("@tippyjs/react"),u=require("react"),q=require("classnames"),z=require("@stenajs-webui/theme"),_=e=>e&&typeof e=="object"&&"default"in e?e:{default:e},B=_(b),g=_(q),W=({text:e="Are you sure?",yesLabel:n="Yes",noLabel:o="No",onNo:i,onYes:l,loading:c})=>t.jsxs(s.Column,{position:"relative",children:[t.jsxs("div",{style:{opacity:c?0:1},children:[t.jsx(s.Text,{children:e}),t.jsx(s.Space,{}),t.jsxs(s.Row,{justifyContent:"flex-end",alignItems:"center",children:[t.jsx(r.FlatButton,{label:o,onClick:i}),t.jsx(s.Space,{}),t.jsx(r.PrimaryButton,{label:n,onClick:l})]})]}),c&&t.jsx(s.Row,{justifyContent:"center",alignItems:"center",left:0,top:0,width:"100%",height:"100%",position:"absolute",children:t.jsx(r.Spinner,{size:"small"})})]}),R="_noPadding_183x1_1",k={noPadding:R};const M=(e=[])=>{const[n,o]=u.useState(!1);return{plugins:[u.useMemo(()=>({fn:()=>({onShow:()=>o(!0),onHidden:()=>o(!1)})}),[o]),...e],mounted:n}},m={noPadding:k.noPadding},h={standard:"light",info:"info",warning:"warning",error:"error",outlined:"outlined"},d=({visible:e,trigger:n="mouseenter",children:o,tippyRef:i,delay:l=0,variant:c="standard",disablePadding:p,content:f,maxWidth:y="500px",plugins:w,lazy:P,arrow:v=!0,theme:T="light",...I})=>{var x;const{plugins:C,mounted:S}=M(w);return t.jsx(B.default,{interactive:!0,className:m.noPadding,trigger:e!==void 0?void 0:n,visible:e,theme:`${T} ${(x=h[c])!=null?x:h.standard}`,delay:l,maxWidth:y,arrow:v,content:(!P||S)&&t.jsx(s.Box,{spacing:!p&&1,indent:!p&&1,children:f}),plugins:C,...I,children:t.jsx("div",{ref:i,children:o})})},N=({children:e,onShow:n,onHide:o,...i})=>t.jsx(d,{content:e,trigger:"click",zIndex:1e3,onShow:n,onHide:o,children:t.jsx(r.FlatButton,{...i})}),A="_tooltip_1gh65_1",F="_withIcon_1gh65_8",$="_iconWrapper_1gh65_14",E="_info_1gh65_35",L="_warning_1gh65_41",D="_error_1gh65_47",a={tooltip:A,withIcon:F,iconWrapper:$,info:E,warning:L,error:D},H={info:r.stenaInfoCircle,warning:r.stenaExclamationCircle,error:r.stenaExclamationTriangle},j=({label:e})=>t.jsx(s.Text,{color:z.cssColor("--lhds-color-ui-50"),size:"small",variant:"bold",children:e}),O=({label:e,variant:n,children:o,...i})=>t.jsx(d,{theme:"dark",...i,disablePadding:!0,content:t.jsx("div",{className:g.default(a.tooltip,n?a.withIcon:null),children:n?t.jsxs(t.Fragment,{children:[t.jsx("div",{className:g.default(a.iconWrapper,a[n]),children:t.jsx(r.Icon,{icon:H[n],size:16})}),t.jsx(s.Space,{}),t.jsx(j,{label:e})]}):t.jsx(j,{label:e})}),children:o}),Y=()=>{const e=u.useRef();return[n=>{var o;e.current=(o=n==null?void 0:n._tippy)!=null?o:void 0},e]};exports.ActionPrompt=W;exports.ButtonWithPopover=N;exports.Popover=d;exports.Tooltip=O;exports.tippyStyles=m;exports.useTippyInstance=Y;
1
+ (function(){"use strict";try{var r=document.createElement("style");r.appendChild(document.createTextNode('._noPadding_183x1_1 .tippy-content{padding:0}.tippy-box[data-theme~=light]{box-shadow:var(--swui-shadow-popover)}.tippy-box[data-theme~=outlined]{border:1px solid var(--lhds-color-blue-500)}.tippy-box[data-theme~=info]{background-color:var(--lhds-color-blue-50);color:var(--swui-text-primary-color)}.tippy-box[data-theme~=info] .tippy-arrow{color:var(--lhds-color-blue-50)}.tippy-box[data-theme~=warning]{background-color:var(--lhds-color-orange-50);color:var(--swui-text-primary-color)}.tippy-box[data-theme~=warning] .tippy-arrow{color:var(--lhds-color-orange-50)}.tippy-box[data-theme~=error]{background-color:var(--lhds-color-red-50);color:var(--swui-text-primary-color)}.tippy-box[data-theme~=error] .tippy-arrow{color:var(--lhds-color-red-50)}.tippy-box[data-theme~=info][data-placement^=top]>.tippy-arrow:before{border-top-color:var(--lhds-color-blue-50)}.tippy-box[data-theme~=info][data-placement^=bottom]>.tippy-arrow:before{border-bottom-color:var(--lhds-color-blue-50)}.tippy-box[data-theme~=info][data-placement^=left]>.tippy-arrow:before{border-left-color:var(--lhds-color-blue-50)}.tippy-box[data-theme~=info][data-placement^=right]>.tippy-arrow:before{border-right-color:var(--lhds-color-blue-50)}.tippy-box[data-theme~=warning][data-placement^=top]>.tippy-arrow:before{border-top-color:var(--lhds-color-orange-50)}.tippy-box[data-theme~=warning][data-placement^=bottom]>.tippy-arrow:before{border-bottom-color:var(--lhds-color-orange-50)}.tippy-box[data-theme~=warning][data-placement^=left]>.tippy-arrow:before{border-left-color:var(--lhds-color-orange-50)}.tippy-box[data-theme~=warning][data-placement^=right]>.tippy-arrow:before{border-right-color:var(--lhds-color-orange-50)}.tippy-box[data-theme~=error][data-placement^=top]>.tippy-arrow:before{border-top-color:var(--lhds-color-red-50)}.tippy-box[data-theme~=error][data-placement^=bottom]>.tippy-arrow:before{border-bottom-color:var(--lhds-color-red-50)}.tippy-box[data-theme~=error][data-placement^=left]>.tippy-arrow:before{border-left-color:var(--lhds-color-red-50)}.tippy-box[data-theme~=error][data-placement^=right]>.tippy-arrow:before{border-right-color:var(--lhds-color-red-50)}.tippy-box[data-animation=fade][data-state=hidden]{opacity:0}[data-tippy-root]{max-width:calc(100vw - 10px)}.tippy-box{position:relative;background-color:#333;color:#fff;border-radius:4px;font-size:14px;line-height:1.4;outline:0;transition-property:visibility,opacity,-webkit-transform;transition-property:transform,visibility,opacity;transition-property:transform,visibility,opacity,-webkit-transform}.tippy-box[data-placement^=top]>.tippy-arrow{bottom:0}.tippy-box[data-placement^=top]>.tippy-arrow:before{bottom:-7px;left:0;border-width:8px 8px 0;border-top-color:initial;-webkit-transform-origin:center top;transform-origin:center top}.tippy-box[data-placement^=bottom]>.tippy-arrow{top:0}.tippy-box[data-placement^=bottom]>.tippy-arrow:before{top:-7px;left:0;border-width:0 8px 8px;border-bottom-color:initial;-webkit-transform-origin:center bottom;transform-origin:center bottom}.tippy-box[data-placement^=left]>.tippy-arrow{right:0}.tippy-box[data-placement^=left]>.tippy-arrow:before{border-width:8px 0 8px 8px;border-left-color:initial;right:-7px;-webkit-transform-origin:center left;transform-origin:center left}.tippy-box[data-placement^=right]>.tippy-arrow{left:0}.tippy-box[data-placement^=right]>.tippy-arrow:before{left:-7px;border-width:8px 8px 8px 0;border-right-color:initial;-webkit-transform-origin:center right;transform-origin:center right}.tippy-box[data-inertia][data-state=visible]{transition-timing-function:cubic-bezier(.54,1.5,.38,1.11)}.tippy-arrow{width:16px;height:16px;color:#333}.tippy-arrow:before{content:"";position:absolute;border-color:transparent;border-style:solid}.tippy-content{position:relative;padding:5px 9px;z-index:1}.tippy-box[data-theme~=light]{color:#26323d;box-shadow:0 0 20px 4px #9aa1b126,0 4px 80px -8px #24282f40,0 4px 4px -2px #5b5e6926;background-color:#fff}.tippy-box[data-theme~=light][data-placement^=top]>.tippy-arrow:before{border-top-color:#fff}.tippy-box[data-theme~=light][data-placement^=bottom]>.tippy-arrow:before{border-bottom-color:#fff}.tippy-box[data-theme~=light][data-placement^=left]>.tippy-arrow:before{border-left-color:#fff}.tippy-box[data-theme~=light][data-placement^=right]>.tippy-arrow:before{border-right-color:#fff}.tippy-box[data-theme~=light]>.tippy-backdrop{background-color:#fff}.tippy-box[data-theme~=light]>.tippy-svg-arrow{fill:#fff}.tippy-box[data-theme~=dark]{color:var(--lhds-color-ui-50);box-shadow:0 0 20px 4px #9aa1b126,0 4px 80px -8px #24282f40,0 4px 4px -2px #5b5e6926;background-color:var(--lhds-color-ui-800)}.tippy-box[data-theme~=dark][data-placement^=top]>.tippy-arrow:before{border-top-color:var(--lhds-color-ui-800)}.tippy-box[data-theme~=dark][data-placement^=bottom]>.tippy-arrow:before{border-bottom-color:var(--lhds-color-ui-800)}.tippy-box[data-theme~=dark][data-placement^=left]>.tippy-arrow:before{border-left-color:var(--lhds-color-ui-800)}.tippy-box[data-theme~=dark][data-placement^=right]>.tippy-arrow:before{border-right-color:var(--lhds-color-ui-800)}.tippy-box[data-theme~=dark]>.tippy-backdrop{background-color:var(--lhds-color-ui-800)}.tippy-box[data-theme~=dark]>.tippy-svg-arrow{fill:var(--lhds-color-ui-800)}._tooltip_1i1mn_1{display:flex;width:-webkit-fit-content;width:-moz-fit-content;width:fit-content;align-items:center;border-radius:var(--swui-border-radius);padding:var(--swui-metrics-spacing) calc(var(--swui-metrics-indent) * 2)}._tooltip_1i1mn_1._withIcon_1i1mn_8{padding:calc(var(--swui-metrics-spacing) * .5);padding-right:calc(var(--swui-metrics-indent) * 2)}._iconWrapper_1i1mn_14{--current-bg-color: transparent;--current-border-color: var(--lhds-color-ui-50);--current-icon-color: var(--lhds-color-ui-50);display:inline-flex;flex-direction:row;white-space:nowrap;background-color:var(--current-bg-color);border:1px solid var(--current-border-color);border-radius:var(--swui-border-radius);padding:calc(var(--swui-metrics-spacing) * .5);align-items:flex-start}._iconWrapper_1i1mn_14 svg{color:var(--current-icon-color)}._iconWrapper_1i1mn_14._info_1i1mn_34{--current-border-color: var(--lhds-color-blue-300);--current-bg-color: var(--lhds-color-blue-100);--current-icon-color: var(--lhds-color-blue-700)}._iconWrapper_1i1mn_14._warning_1i1mn_40{--current-border-color: var(--lhds-color-orange-300);--current-bg-color: var(--lhds-color-orange-100);--current-icon-color: var(--lhds-color-orange-700)}._iconWrapper_1i1mn_14._error_1i1mn_46{--current-border-color: var(--lhds-color-red-300);--current-bg-color: var(--lhds-color-red-100);--current-icon-color: var(--lhds-color-red-700)}')),document.head.appendChild(r)}catch(o){console.error("vite-plugin-css-injected-by-js",o)}})();
2
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const s=require("@stenajs-webui/core"),r=require("@stenajs-webui/elements"),n=require("react/jsx-runtime"),b=require("@tippyjs/react"),u=require("react"),q=require("classnames"),z=require("@stenajs-webui/theme"),h=t=>t&&typeof t=="object"&&"default"in t?t:{default:t},B=h(b),j=h(q),W=({text:t="Are you sure?",yesLabel:e="Yes",noLabel:o="No",onNo:i,onYes:l,loading:c})=>n.jsxs(s.Column,{position:"relative",children:[n.jsxs("div",{style:{opacity:c?0:1},children:[n.jsx(s.Text,{children:t}),n.jsx(s.Space,{}),n.jsxs(s.Row,{justifyContent:"flex-end",alignItems:"center",children:[n.jsx(r.FlatButton,{label:o,onClick:i}),n.jsx(s.Space,{}),n.jsx(r.PrimaryButton,{label:e,onClick:l})]})]}),c&&n.jsx(s.Row,{justifyContent:"center",alignItems:"center",left:0,top:0,width:"100%",height:"100%",position:"absolute",children:n.jsx(r.Spinner,{size:"small"})})]}),R="_noPadding_183x1_1",k={noPadding:R};const M=(t=[])=>{const[e,o]=u.useState(!1);return{plugins:[u.useMemo(()=>({fn:()=>({onShow:()=>o(!0),onHidden:()=>o(!1)})}),[o]),...t],mounted:e}},_={noPadding:k.noPadding},m={standard:"light",info:"info",warning:"warning",error:"error",outlined:"outlined"},d=({visible:t,trigger:e="mouseenter",children:o,tippyRef:i,delay:l=0,variant:c="standard",disablePadding:p,content:f,maxWidth:y="500px",plugins:w,lazy:P,arrow:v=!0,theme:T="light",...I})=>{var x;const{plugins:C,mounted:S}=M(w);return n.jsx(B.default,{interactive:!0,className:_.noPadding,trigger:t!==void 0?void 0:e,visible:t,theme:`${T} ${(x=m[c])!=null?x:m.standard}`,delay:l,maxWidth:y,arrow:v,content:(!P||S)&&n.jsx(s.Box,{spacing:!p&&1,indent:!p&&1,children:f}),plugins:C,...I,children:n.jsx("div",{ref:i,children:o})})},N=({children:t,onShow:e,onHide:o,...i})=>n.jsx(d,{content:t,trigger:"click",zIndex:1e3,onShow:e,onHide:o,children:n.jsx(r.FlatButton,{...i})}),A="_tooltip_1i1mn_1",F="_withIcon_1i1mn_8",$="_iconWrapper_1i1mn_14",E="_info_1i1mn_34",L="_warning_1i1mn_40",D="_error_1i1mn_46",a={tooltip:A,withIcon:F,iconWrapper:$,info:E,warning:L,error:D},H={info:r.stenaInfoCircle,warning:r.stenaExclamationCircle,error:r.stenaExclamationTriangle},g=({label:t})=>n.jsx(s.Text,{color:z.cssColor("--lhds-color-ui-50"),size:"small",variant:"bold",children:t}),O=({label:t,variant:e,children:o,...i})=>n.jsx(d,{theme:"dark",...i,disablePadding:!0,content:n.jsx("div",{className:j.default(a.tooltip,e?a.withIcon:null),children:e?n.jsxs(n.Fragment,{children:[n.jsx("div",{className:j.default(a.iconWrapper,a[e]),children:n.jsx(r.Icon,{icon:H[e],size:16})}),n.jsx(s.Space,{}),n.jsx(g,{label:t})]}):n.jsx(g,{label:t})}),children:o}),Y=()=>{const t=u.useRef();return[e=>{var o;t.current=(o=e==null?void 0:e._tippy)!=null?o:void 0},t]};exports.ActionPrompt=W;exports.ButtonWithPopover=N;exports.Popover=d;exports.Tooltip=O;exports.tippyStyles=_;exports.useTippyInstance=Y;
3
3
  //# sourceMappingURL=index.js.map
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@stenajs-webui/tooltip",
3
- "version": "18.4.1",
3
+ "version": "18.4.2",
4
4
  "description": "",
5
5
  "author": "mattias800",
6
6
  "license": "MIT",
@@ -26,9 +26,9 @@
26
26
  "deploy": "gh-pages -d example/build"
27
27
  },
28
28
  "dependencies": {
29
- "@stenajs-webui/core": "18.4.1",
30
- "@stenajs-webui/elements": "18.4.1",
31
- "@stenajs-webui/theme": "18.4.1",
29
+ "@stenajs-webui/core": "18.4.2",
30
+ "@stenajs-webui/elements": "18.4.2",
31
+ "@stenajs-webui/theme": "18.4.2",
32
32
  "@tippyjs/react": "^4.1.0",
33
33
  "classnames": "^2.3.1",
34
34
  "tippy.js": "^6.2.6"
@@ -55,5 +55,5 @@
55
55
  "files": [
56
56
  "dist"
57
57
  ],
58
- "gitHead": "5b75e3fbc5f7cc8f432e06e1027463f9fad4608a"
58
+ "gitHead": "5030d359f22e21e88efa8c36a1ea7767a6256ef9"
59
59
  }