@pismo/marola 1.1.17 → 1.1.18

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,51 +1,51 @@
1
- import { jsx as a, jsxs as v, Fragment as P } from "react/jsx-runtime";
1
+ import { jsx as a, jsxs as S, Fragment as v } from "react/jsx-runtime";
2
2
  import * as u from "react";
3
- import { useRef as R, useState as T, useEffect as E, isValidElement as q, cloneElement as M } from "react";
4
- import { T as O, P as V } from "../../Popup-Ck3XlWMq.js";
5
- import { _ as $, b as z, P as l } from "../../useSlotProps-C_I1kEHr.js";
6
- import { c as D } from "../../clsx-DB4S2d7J.js";
7
- import { C as F } from "../../ClickAwayListener-DbEYZpyh.js";
8
- import '../../assets/Tooltip.css';function I() {
9
- const e = u.useContext(O);
10
- if (!e)
3
+ import { useRef as P, useState as R, useEffect as C, isValidElement as T, cloneElement as q } from "react";
4
+ import { T as M, P as O } from "../../Popup-Ck3XlWMq.js";
5
+ import { _ as V, b as $, P as l } from "../../useSlotProps-C_I1kEHr.js";
6
+ import { c as z } from "../../clsx-DB4S2d7J.js";
7
+ import { C as D } from "../../ClickAwayListener-DbEYZpyh.js";
8
+ import '../../assets/Tooltip.css';function F() {
9
+ const n = u.useContext(M);
10
+ if (!n)
11
11
  throw new Error("Missing transition context");
12
12
  const {
13
13
  registerTransition: o,
14
14
  requestedEnter: r,
15
- onExited: n
16
- } = e;
15
+ onExited: e
16
+ } = n;
17
17
  return u.useEffect(() => o(), [o]), {
18
- onExited: n,
18
+ onExited: e,
19
19
  requestedEnter: r
20
20
  };
21
21
  }
22
- const W = ["children", "className", "enterAnimationName", "enterClassName", "exitAnimationName", "exitClassName"];
23
- function b(e) {
22
+ const I = ["children", "className", "enterAnimationName", "enterClassName", "exitAnimationName", "exitClassName"];
23
+ function E(n) {
24
24
  const {
25
25
  children: o,
26
26
  className: r,
27
- enterAnimationName: n,
27
+ enterAnimationName: e,
28
28
  enterClassName: c,
29
29
  exitAnimationName: _,
30
30
  exitClassName: f
31
- } = e, p = $(e, W), {
31
+ } = n, p = V(n, I), {
32
32
  requestedEnter: d,
33
33
  onExited: s
34
- } = I(), i = u.useRef(!0);
34
+ } = F(), i = u.useRef(!0);
35
35
  u.useEffect(() => {
36
36
  d && i.current && (i.current = !1);
37
37
  }, [d]);
38
38
  const N = u.useCallback((t) => {
39
- t.animationName === _ ? (s(), i.current = !0) : t.animationName === n && (i.current = !1);
40
- }, [s, _, n]);
41
- return /* @__PURE__ */ a("div", z({
39
+ t.animationName === _ ? (s(), i.current = !0) : t.animationName === e && (i.current = !1);
40
+ }, [s, _, e]);
41
+ return /* @__PURE__ */ a("div", $({
42
42
  onAnimationEnd: N,
43
- className: D(r, d ? c : f)
43
+ className: z(r, d ? c : f)
44
44
  }, p, {
45
45
  children: o
46
46
  }));
47
47
  }
48
- process.env.NODE_ENV !== "production" && (b.propTypes = {
48
+ process.env.NODE_ENV !== "production" && (E.propTypes = {
49
49
  children: l.node,
50
50
  className: l.string,
51
51
  enterAnimationName: l.string,
@@ -53,8 +53,8 @@ process.env.NODE_ENV !== "production" && (b.propTypes = {
53
53
  exitAnimationName: l.string,
54
54
  exitClassName: l.string
55
55
  });
56
- const B = "_tooltip_1dujm_1", m = {
57
- tooltip: B,
56
+ const W = "_tooltip_1dujm_1", m = {
57
+ tooltip: W,
58
58
  "tooltip--small-padding": "_tooltip--small-padding_1dujm_5",
59
59
  "tooltip--normal-padding": "_tooltip--normal-padding_1dujm_8",
60
60
  "tooltip--white-theme": "_tooltip--white-theme_1dujm_11",
@@ -64,11 +64,11 @@ const B = "_tooltip_1dujm_1", m = {
64
64
  "tooltip--open-animation": "_tooltip--open-animation_1dujm_1",
65
65
  "tooltip--anim-close": "_tooltip--anim-close_1dujm_23",
66
66
  "tooltip--close-animation": "_tooltip--close-animation_1dujm_1"
67
- }, X = ({
68
- arialRole: e,
67
+ }, U = ({
68
+ arialRole: n,
69
69
  children: o,
70
70
  className: r,
71
- disableHoverListener: n,
71
+ disableHoverListener: e,
72
72
  onClose: c,
73
73
  padding: _ = "small",
74
74
  position: f = "bottom",
@@ -78,57 +78,55 @@ const B = "_tooltip_1dujm_1", m = {
78
78
  onTargetCreated: i,
79
79
  ...N
80
80
  }) => {
81
- const t = R(null), [y, h] = T(p || !1);
82
- let j = y;
83
- E(() => {
81
+ const t = P(null), [b, h] = R(p || !1);
82
+ let j = b;
83
+ C(() => {
84
84
  h(p || !1);
85
85
  }, [p]);
86
- const A = q(o) ? o : /* @__PURE__ */ a("span", { children: o });
86
+ const A = T(o) ? o : /* @__PURE__ */ a("span", { children: o });
87
87
  !s && s !== 0 && (j = !1);
88
- const k = () => {
89
- c == null || c(), !n && h(!1);
88
+ const y = () => {
89
+ c == null || c(), !e && h(!1);
90
90
  };
91
- E(() => {
92
- var C;
91
+ C(() => {
93
92
  if (t != null && t.current) {
94
- i == null || i(t == null ? void 0 : t.current);
95
- const x = (C = t == null ? void 0 : t.current) == null ? void 0 : C.parentElement;
96
- x && (n || (x.onpointerenter = () => h(!0), x.onpointerleave = () => h(!1)));
93
+ const x = t == null ? void 0 : t.current;
94
+ i == null || i(x), e || (x.onpointerenter = () => h(!0), x.onpointerleave = () => h(!1));
97
95
  }
98
- }, [t, n]);
99
- const w = {
96
+ }, [t, e]);
97
+ const g = {
100
98
  padding: f.match(/(bottom|top)/) ? ".25rem 0" : "0 .25rem",
101
99
  zIndex: 1
102
- }, S = [
100
+ }, k = [
103
101
  m.tooltip,
104
102
  m[`tooltip--${d}-theme`],
105
103
  m[`tooltip--${_}-padding`],
106
104
  r || ""
107
- ].join(" ").trim(), g = {
105
+ ].join(" ").trim(), w = {
108
106
  ...A.props,
109
107
  ref: t
110
108
  };
111
- return /* @__PURE__ */ v(P, { children: [
112
- M(A, g),
109
+ return /* @__PURE__ */ S(v, { children: [
110
+ q(A, w),
113
111
  /* @__PURE__ */ a(
114
- V,
112
+ O,
115
113
  {
116
114
  disablePortal: !0,
117
115
  ...N,
118
116
  open: j,
119
117
  anchor: t == null ? void 0 : t.current,
120
- style: w,
121
- role: e,
118
+ style: g,
119
+ role: n,
122
120
  placement: f,
123
121
  children: /* @__PURE__ */ a(
124
- b,
122
+ E,
125
123
  {
126
124
  className: m["tooltip--animation"],
127
125
  enterClassName: m["tooltip--anim-open"],
128
126
  exitClassName: m["tooltip--anim-close"],
129
127
  enterAnimationName: "tooltip--open-animation",
130
128
  exitAnimationName: "tooltip--close-animation",
131
- children: /* @__PURE__ */ a("div", { className: S, children: /* @__PURE__ */ a(F, { onClickAway: k, children: /* @__PURE__ */ a("div", { children: s }) }) })
129
+ children: /* @__PURE__ */ a("div", { className: k, children: /* @__PURE__ */ a(D, { onClickAway: y, children: /* @__PURE__ */ a("div", { children: s }) }) })
132
130
  }
133
131
  )
134
132
  }
@@ -136,5 +134,5 @@ const B = "_tooltip_1dujm_1", m = {
136
134
  ] });
137
135
  };
138
136
  export {
139
- X as Tooltip
137
+ U as Tooltip
140
138
  };
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@pismo/marola",
3
3
  "description": "CDX tribe component library",
4
- "version": "1.1.17",
4
+ "version": "1.1.18",
5
5
  "type": "module",
6
6
  "main": "dist/main.js",
7
7
  "types": "dist/main.d.ts",