@caseparts-org/caseblocks 0.0.30 → 0.0.32

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
- ._content_ogovb_1{box-shadow:8px 8px 12px #00000026;background-color:#fff;padding:var(--spacing-1);box-sizing:border-box;width:max-content;border:1px solid var(--color-neutrals-neutral-1);border-radius:4px;z-index:9999}._wrapper_ogovb_12{position:relative;display:inline-block}._tooltip_ogovb_17{position:absolute;z-index:1000;padding:var(--spacing-0-5);background:var(--color-neutrals-neutral-1);border-radius:4px;box-shadow:0 4px 12px #0000002e;opacity:0;pointer-events:none;visibility:hidden;transition:opacity .15s ease,transform .15s ease}._open_ogovb_30{opacity:1;visibility:visible;transform:translateY(0)}._tooltip_ogovb_17[data-position=top]{bottom:100%;left:50%;transform:translate(-50%,-4px)}._open_ogovb_30._tooltip_ogovb_17[data-position=top]{transform:translate(-50%)}._tooltip_ogovb_17[data-position=bottom]{top:100%;left:50%;transform:translate(-50%,4px)}._open_ogovb_30._tooltip_ogovb_17[data-position=bottom]{transform:translate(-50%)}._tooltip_ogovb_17[data-position=left]{right:100%;top:50%;transform:translate(-4px,-50%)}._open_ogovb_30._tooltip_ogovb_17[data-position=left]{transform:translateY(-50%)}._tooltip_ogovb_17[data-position=right]{left:100%;top:50%;transform:translate(4px,-50%)}._open_ogovb_30._tooltip_ogovb_17[data-position=right]{transform:translateY(-50%)}._tooltip_ogovb_17[data-position=top]{bottom:100%;left:50%;transform:translate(calc(-50% + var(--tooltip-shift-x, 0px)),-4px)}._open_ogovb_30._tooltip_ogovb_17[data-position=top]{transform:translate(calc(-50% + var(--tooltip-shift-x, 0px)))}._tooltip_ogovb_17[data-position=bottom]{top:100%;left:50%;transform:translate(calc(-50% + var(--tooltip-shift-x, 0px)),4px)}._open_ogovb_30._tooltip_ogovb_17[data-position=bottom]{transform:translate(calc(-50% + var(--tooltip-shift-x, 0px)))}._tooltip_ogovb_17[data-position=left]{right:100%;top:50%;transform:translate(-4px,calc(-50% + var(--tooltip-shift-y, 0px)))}._open_ogovb_30._tooltip_ogovb_17[data-position=left]{transform:translateY(calc(-50% + var(--tooltip-shift-y, 0px)))}._tooltip_ogovb_17[data-position=right]{left:100%;top:50%;transform:translate(4px,calc(-50% + var(--tooltip-shift-y, 0px)))}._open_ogovb_30._tooltip_ogovb_17[data-position=right]{transform:translateY(calc(-50% + var(--tooltip-shift-y, 0px)))}
1
+ ._content_1f22n_1{box-shadow:8px 8px 12px #00000026;background-color:#fff;padding:var(--spacing-1);box-sizing:border-box;width:max-content;border:1px solid var(--color-neutrals-neutral-1);border-radius:4px;z-index:9999}._wrapper_1f22n_12{position:relative;display:inline-block}._tooltip_1f22n_17{position:absolute;z-index:1000;padding:var(--spacing-0-5);background:var(--color-neutrals-neutral-1);border-radius:4px;box-shadow:0 4px 12px #0000002e;opacity:0;visibility:hidden;transition:opacity .15s ease,transform .15s ease}._open_1f22n_30{opacity:1;visibility:visible;transform:translateY(0)}._tooltip_1f22n_17[data-position=top]{bottom:100%;left:50%;transform:translate(-50%,-4px)}._open_1f22n_30._tooltip_1f22n_17[data-position=top]{transform:translate(-50%)}._tooltip_1f22n_17[data-position=bottom]{top:100%;left:50%;transform:translate(-50%,4px)}._open_1f22n_30._tooltip_1f22n_17[data-position=bottom]{transform:translate(-50%)}._tooltip_1f22n_17[data-position=left]{right:100%;top:50%;transform:translate(-4px,-50%)}._open_1f22n_30._tooltip_1f22n_17[data-position=left]{transform:translateY(-50%)}._tooltip_1f22n_17[data-position=right]{left:100%;top:50%;transform:translate(4px,-50%)}._open_1f22n_30._tooltip_1f22n_17[data-position=right]{transform:translateY(-50%)}._tooltip_1f22n_17[data-position=top]{bottom:100%;left:50%;transform:translate(calc(-50% + var(--tooltip-shift-x, 0px)),-4px)}._open_1f22n_30._tooltip_1f22n_17[data-position=top]{transform:translate(calc(-50% + var(--tooltip-shift-x, 0px)))}._tooltip_1f22n_17[data-position=bottom]{top:100%;left:50%;transform:translate(calc(-50% + var(--tooltip-shift-x, 0px)),4px)}._open_1f22n_30._tooltip_1f22n_17[data-position=bottom]{transform:translate(calc(-50% + var(--tooltip-shift-x, 0px)))}._tooltip_1f22n_17[data-position=left]{right:100%;top:50%;transform:translate(-4px,calc(-50% + var(--tooltip-shift-y, 0px)))}._open_1f22n_30._tooltip_1f22n_17[data-position=left]{transform:translateY(calc(-50% + var(--tooltip-shift-y, 0px)))}._tooltip_1f22n_17[data-position=right]{left:100%;top:50%;transform:translate(4px,calc(-50% + var(--tooltip-shift-y, 0px)))}._open_1f22n_30._tooltip_1f22n_17[data-position=right]{transform:translateY(calc(-50% + var(--tooltip-shift-y, 0px)))}
@@ -11,6 +11,6 @@ export type { ChipProps } from './molecules/Chip/Chip';
11
11
  export { ToggleView } from './molecules/ToggleView/ToggleView';
12
12
  export type { ToggleViewProps, ToggleOptionProps, ToggleOptionBaseProps, } from './molecules/ToggleView/ToggleView';
13
13
  export { MainNav } from './organisms/MainNav/MainNav';
14
- export type { MainCategory, Category } from './organisms/MainNav/MainNav';
14
+ export type { MainCategory, MainNavProps, Category } from './organisms/MainNav/MainNav';
15
15
  export { ChipSelector } from './organisms/ChipSelector/ChipSelector';
16
16
  export type { ChipSelectorProps } from './organisms/ChipSelector/ChipSelector';
@@ -1,9 +1,9 @@
1
- import { jsx as t, jsxs as i } from "react/jsx-runtime";
1
+ import { jsx as t, jsxs as n } from "react/jsx-runtime";
2
2
  import { Icon as m } from "../../atoms/Icon/Icon.js";
3
- import { Text as n } from "../../atoms/Text/Text.js";
3
+ import { Text as s } from "../../atoms/Text/Text.js";
4
4
  import { Button as a } from "../../atoms/Button/Button.js";
5
5
  import { Tooltip as l } from "../Tooltip/Tooltip.js";
6
- import '../../assets/Cart.css';const d = "_cart_15bzn_1", h = "_count_15bzn_8", p = "_cartContainer_15bzn_23", _ = "_cartItems_15bzn_32", g = "_noItems_15bzn_58", s = {
6
+ import '../../assets/Cart.css';const d = "_cart_15bzn_1", h = "_count_15bzn_8", p = "_cartContainer_15bzn_23", _ = "_cartItems_15bzn_32", g = "_noItems_15bzn_58", o = {
7
7
  cart: d,
8
8
  count: h,
9
9
  cartContainer: p,
@@ -21,7 +21,7 @@ function v({
21
21
  return e = e || { items: [] }, /* @__PURE__ */ t(
22
22
  l,
23
23
  {
24
- trigger: /* @__PURE__ */ i("button", { className: s.cart, ...c, children: [
24
+ trigger: /* @__PURE__ */ n("button", { className: o.cart, ...c, children: [
25
25
  /* @__PURE__ */ t(
26
26
  m,
27
27
  {
@@ -30,24 +30,24 @@ function v({
30
30
  size: "lg"
31
31
  }
32
32
  ),
33
- e.items.length > 0 && /* @__PURE__ */ t("div", { className: s.count, children: /* @__PURE__ */ t(n, { size: "xxs", children: e.items.length }) })
33
+ e.items.length > 0 && /* @__PURE__ */ t("div", { className: o.count, children: /* @__PURE__ */ t(s, { size: "xxs", children: e.items.length }) })
34
34
  ] }),
35
35
  position: "bottom",
36
36
  on: "click",
37
- children: /* @__PURE__ */ i("div", { className: s.cartContainer, children: [
38
- /* @__PURE__ */ t(n, { as: "h1", size: "2xl", children: "Cart" }),
39
- /* @__PURE__ */ t("div", { className: s.cartItems, children: e.items.length > 0 ? /* @__PURE__ */ t("ul", { children: e.items.map(
40
- (o) => /* @__PURE__ */ i("li", { children: [
41
- /* @__PURE__ */ t("img", { src: o.imageUrl, alt: `${o.itemId} product image` }),
42
- /* @__PURE__ */ i("div", { children: [
43
- /* @__PURE__ */ t(n, { as: "p", size: "sm", children: o.description }),
44
- /* @__PURE__ */ i(n, { as: "p", size: "sm", children: [
37
+ children: /* @__PURE__ */ n("div", { className: o.cartContainer, children: [
38
+ /* @__PURE__ */ t(s, { as: "h1", size: "2xl", children: "Cart" }),
39
+ /* @__PURE__ */ t("div", { className: o.cartItems, children: e.items.length > 0 ? /* @__PURE__ */ t("ul", { children: e.items.map(
40
+ (i) => /* @__PURE__ */ n("li", { children: [
41
+ /* @__PURE__ */ t("img", { src: i.imageUrl, alt: `${i.itemId} product image` }),
42
+ /* @__PURE__ */ n("div", { children: [
43
+ /* @__PURE__ */ t(s, { as: "p", size: "sm", children: i.description }),
44
+ /* @__PURE__ */ n(s, { as: "p", size: "sm", children: [
45
45
  "Part # ",
46
- o.itemId
46
+ i.itemId
47
47
  ] })
48
48
  ] })
49
- ] })
50
- ) }) : /* @__PURE__ */ t("div", { className: s.noItems, children: /* @__PURE__ */ t(n, { as: "p", size: "sm", children: "No items in your cart yet" }) }) }),
49
+ ] }, i.id)
50
+ ) }) : /* @__PURE__ */ t("div", { className: o.noItems, children: /* @__PURE__ */ t(s, { as: "p", size: "sm", children: "No items in your cart yet" }) }) }),
51
51
  /* @__PURE__ */ t(a, { disabled: e.items.length === 0, onClick: r, variant: "cta-primary", size: "md", children: "Checkout" })
52
52
  ] })
53
53
  }
@@ -10,5 +10,6 @@ export interface TooltipProps {
10
10
  autoAdjust?: boolean;
11
11
  flip?: boolean;
12
12
  viewportPadding?: number;
13
+ allowEnter?: boolean;
13
14
  }
14
15
  export declare const Tooltip: React.FC<TooltipProps>;
@@ -1,7 +1,7 @@
1
- import { jsxs as Z, jsx as ee } from "react/jsx-runtime";
2
- import m, { useEffect as j, useState as te } from "react";
3
- import { c as K } from "../../clsx-OuTLNxxd.js";
4
- import '../../assets/Tooltip.css';var U = { exports: {} }, g = {};
1
+ import { jsxs as ae, jsx as ce } from "react/jsx-runtime";
2
+ import m, { useEffect as V, useState as se } from "react";
3
+ import { c as q } from "../../clsx-OuTLNxxd.js";
4
+ import '../../assets/Tooltip.css';var B = { exports: {} }, d = {};
5
5
  /**
6
6
  * @license React
7
7
  * react-dom.production.js
@@ -11,12 +11,12 @@ import '../../assets/Tooltip.css';var U = { exports: {} }, g = {};
11
11
  * This source code is licensed under the MIT license found in the
12
12
  * LICENSE file in the root directory of this source tree.
13
13
  */
14
- var Y;
15
- function re() {
16
- if (Y) return g;
17
- Y = 1;
18
- var s = m;
19
- function O(n) {
14
+ var W;
15
+ function ue() {
16
+ if (W) return d;
17
+ W = 1;
18
+ var u = m;
19
+ function T(n) {
20
20
  var t = "https://react.dev/errors/" + n;
21
21
  if (1 < arguments.length) {
22
22
  t += "?args[]=" + encodeURIComponent(arguments[1]);
@@ -31,7 +31,7 @@ function re() {
31
31
  d: {
32
32
  f: a,
33
33
  r: function() {
34
- throw Error(O(522));
34
+ throw Error(T(522));
35
35
  },
36
36
  D: a,
37
37
  C: a,
@@ -44,7 +44,7 @@ function re() {
44
44
  p: 0,
45
45
  findDOMNode: null
46
46
  }, f = Symbol.for("react.portal");
47
- function h(n, t, o) {
47
+ function v(n, t, o) {
48
48
  var r = 3 < arguments.length && arguments[3] !== void 0 ? arguments[3] : null;
49
49
  return {
50
50
  $$typeof: f,
@@ -54,31 +54,31 @@ function re() {
54
54
  implementation: o
55
55
  };
56
56
  }
57
- var v = s.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;
58
- function S(n, t) {
57
+ var _ = u.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;
58
+ function R(n, t) {
59
59
  if (n === "font") return "";
60
60
  if (typeof t == "string")
61
61
  return t === "use-credentials" ? t : "";
62
62
  }
63
- return g.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE = c, g.createPortal = function(n, t) {
63
+ return d.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE = c, d.createPortal = function(n, t) {
64
64
  var o = 2 < arguments.length && arguments[2] !== void 0 ? arguments[2] : null;
65
65
  if (!t || t.nodeType !== 1 && t.nodeType !== 9 && t.nodeType !== 11)
66
- throw Error(O(299));
67
- return h(n, t, null, o);
68
- }, g.flushSync = function(n) {
69
- var t = v.T, o = c.p;
66
+ throw Error(T(299));
67
+ return v(n, t, null, o);
68
+ }, d.flushSync = function(n) {
69
+ var t = _.T, o = c.p;
70
70
  try {
71
- if (v.T = null, c.p = 2, n) return n();
71
+ if (_.T = null, c.p = 2, n) return n();
72
72
  } finally {
73
- v.T = t, c.p = o, c.d.f();
73
+ _.T = t, c.p = o, c.d.f();
74
74
  }
75
- }, g.preconnect = function(n, t) {
75
+ }, d.preconnect = function(n, t) {
76
76
  typeof n == "string" && (t ? (t = t.crossOrigin, t = typeof t == "string" ? t === "use-credentials" ? t : "" : void 0) : t = null, c.d.C(n, t));
77
- }, g.prefetchDNS = function(n) {
77
+ }, d.prefetchDNS = function(n) {
78
78
  typeof n == "string" && c.d.D(n);
79
- }, g.preinit = function(n, t) {
79
+ }, d.preinit = function(n, t) {
80
80
  if (typeof n == "string" && t && typeof t.as == "string") {
81
- var o = t.as, r = S(o, t.crossOrigin), e = typeof t.integrity == "string" ? t.integrity : void 0, i = typeof t.fetchPriority == "string" ? t.fetchPriority : void 0;
81
+ var o = t.as, r = R(o, t.crossOrigin), e = typeof t.integrity == "string" ? t.integrity : void 0, i = typeof t.fetchPriority == "string" ? t.fetchPriority : void 0;
82
82
  o === "style" ? c.d.S(
83
83
  n,
84
84
  typeof t.precedence == "string" ? t.precedence : void 0,
@@ -94,11 +94,11 @@ function re() {
94
94
  nonce: typeof t.nonce == "string" ? t.nonce : void 0
95
95
  });
96
96
  }
97
- }, g.preinitModule = function(n, t) {
97
+ }, d.preinitModule = function(n, t) {
98
98
  if (typeof n == "string")
99
99
  if (typeof t == "object" && t !== null) {
100
100
  if (t.as == null || t.as === "script") {
101
- var o = S(
101
+ var o = R(
102
102
  t.as,
103
103
  t.crossOrigin
104
104
  );
@@ -109,9 +109,9 @@ function re() {
109
109
  });
110
110
  }
111
111
  } else t == null && c.d.M(n);
112
- }, g.preload = function(n, t) {
112
+ }, d.preload = function(n, t) {
113
113
  if (typeof n == "string" && typeof t == "object" && t !== null && typeof t.as == "string") {
114
- var o = t.as, r = S(o, t.crossOrigin);
114
+ var o = t.as, r = R(o, t.crossOrigin);
115
115
  c.d.L(n, o, {
116
116
  crossOrigin: r,
117
117
  integrity: typeof t.integrity == "string" ? t.integrity : void 0,
@@ -124,27 +124,27 @@ function re() {
124
124
  media: typeof t.media == "string" ? t.media : void 0
125
125
  });
126
126
  }
127
- }, g.preloadModule = function(n, t) {
127
+ }, d.preloadModule = function(n, t) {
128
128
  if (typeof n == "string")
129
129
  if (t) {
130
- var o = S(t.as, t.crossOrigin);
130
+ var o = R(t.as, t.crossOrigin);
131
131
  c.d.m(n, {
132
132
  as: typeof t.as == "string" && t.as !== "script" ? t.as : void 0,
133
133
  crossOrigin: o,
134
134
  integrity: typeof t.integrity == "string" ? t.integrity : void 0
135
135
  });
136
136
  } else c.d.m(n);
137
- }, g.requestFormReset = function(n) {
137
+ }, d.requestFormReset = function(n) {
138
138
  c.d.r(n);
139
- }, g.unstable_batchedUpdates = function(n, t) {
139
+ }, d.unstable_batchedUpdates = function(n, t) {
140
140
  return n(t);
141
- }, g.useFormState = function(n, t, o) {
142
- return v.H.useFormState(n, t, o);
143
- }, g.useFormStatus = function() {
144
- return v.H.useHostTransitionStatus();
145
- }, g.version = "19.1.1", g;
141
+ }, d.useFormState = function(n, t, o) {
142
+ return _.H.useFormState(n, t, o);
143
+ }, d.useFormStatus = function() {
144
+ return _.H.useHostTransitionStatus();
145
+ }, d.version = "19.1.1", d;
146
146
  }
147
- var y = {};
147
+ var g = {};
148
148
  /**
149
149
  * @license React
150
150
  * react-dom.development.js
@@ -154,28 +154,28 @@ var y = {};
154
154
  * This source code is licensed under the MIT license found in the
155
155
  * LICENSE file in the root directory of this source tree.
156
156
  */
157
- var z;
158
- function ne() {
159
- return z || (z = 1, process.env.NODE_ENV !== "production" && function() {
160
- function s() {
157
+ var X;
158
+ function le() {
159
+ return X || (X = 1, process.env.NODE_ENV !== "production" && function() {
160
+ function u() {
161
161
  }
162
- function O(r) {
162
+ function T(r) {
163
163
  return "" + r;
164
164
  }
165
165
  function a(r, e, i) {
166
- var d = 3 < arguments.length && arguments[3] !== void 0 ? arguments[3] : null;
166
+ var y = 3 < arguments.length && arguments[3] !== void 0 ? arguments[3] : null;
167
167
  try {
168
- O(d);
169
- var E = !1;
168
+ T(y);
169
+ var O = !1;
170
170
  } catch {
171
- E = !0;
171
+ O = !0;
172
172
  }
173
- return E && (console.error(
173
+ return O && (console.error(
174
174
  "The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",
175
- typeof Symbol == "function" && Symbol.toStringTag && d[Symbol.toStringTag] || d.constructor.name || "Object"
176
- ), O(d)), {
175
+ typeof Symbol == "function" && Symbol.toStringTag && y[Symbol.toStringTag] || y.constructor.name || "Object"
176
+ ), T(y)), {
177
177
  $$typeof: t,
178
- key: d == null ? null : "" + d,
178
+ key: y == null ? null : "" + y,
179
179
  children: r,
180
180
  containerInfo: e,
181
181
  implementation: i
@@ -189,10 +189,10 @@ function ne() {
189
189
  function f(r) {
190
190
  return r === null ? "`null`" : r === void 0 ? "`undefined`" : r === "" ? "an empty string" : 'something with type "' + typeof r + '"';
191
191
  }
192
- function h(r) {
192
+ function v(r) {
193
193
  return r === null ? "`null`" : r === void 0 ? "`undefined`" : r === "" ? "an empty string" : typeof r == "string" ? JSON.stringify(r) : typeof r == "number" ? "`" + r + "`" : 'something with type "' + typeof r + '"';
194
194
  }
195
- function v() {
195
+ function _() {
196
196
  var r = o.H;
197
197
  return r === null && console.error(
198
198
  `Invalid hook call. Hooks can only be called inside of the body of a function component. This could happen for one of the following reasons:
@@ -203,33 +203,33 @@ See https://react.dev/link/invalid-hook-call for tips about how to debug and fix
203
203
  ), r;
204
204
  }
205
205
  typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ < "u" && typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart == "function" && __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());
206
- var S = m, n = {
206
+ var R = m, n = {
207
207
  d: {
208
- f: s,
208
+ f: u,
209
209
  r: function() {
210
210
  throw Error(
211
211
  "Invalid form element. requestFormReset must be passed a form that was rendered by React."
212
212
  );
213
213
  },
214
- D: s,
215
- C: s,
216
- L: s,
217
- m: s,
218
- X: s,
219
- S: s,
220
- M: s
214
+ D: u,
215
+ C: u,
216
+ L: u,
217
+ m: u,
218
+ X: u,
219
+ S: u,
220
+ M: u
221
221
  },
222
222
  p: 0,
223
223
  findDOMNode: null
224
- }, t = Symbol.for("react.portal"), o = S.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;
224
+ }, t = Symbol.for("react.portal"), o = R.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;
225
225
  typeof Map == "function" && Map.prototype != null && typeof Map.prototype.forEach == "function" && typeof Set == "function" && Set.prototype != null && typeof Set.prototype.clear == "function" && typeof Set.prototype.forEach == "function" || console.error(
226
226
  "React depends on Map and Set built-in types. Make sure that you load a polyfill in older browsers. https://reactjs.org/link/react-polyfills"
227
- ), y.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE = n, y.createPortal = function(r, e) {
227
+ ), g.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE = n, g.createPortal = function(r, e) {
228
228
  var i = 2 < arguments.length && arguments[2] !== void 0 ? arguments[2] : null;
229
229
  if (!e || e.nodeType !== 1 && e.nodeType !== 9 && e.nodeType !== 11)
230
230
  throw Error("Target container is not a DOM element.");
231
231
  return a(r, e, null, i);
232
- }, y.flushSync = function(r) {
232
+ }, g.flushSync = function(r) {
233
233
  var e = o.T, i = n.p;
234
234
  try {
235
235
  if (o.T = null, n.p = 2, r)
@@ -239,10 +239,10 @@ See https://react.dev/link/invalid-hook-call for tips about how to debug and fix
239
239
  "flushSync was called from inside a lifecycle method. React cannot flush when React is already rendering. Consider moving this call to a scheduler task or micro task."
240
240
  );
241
241
  }
242
- }, y.preconnect = function(r, e) {
242
+ }, g.preconnect = function(r, e) {
243
243
  typeof r == "string" && r ? e != null && typeof e != "object" ? console.error(
244
244
  "ReactDOM.preconnect(): Expected the `options` argument (second) to be an object but encountered %s instead. The only supported option at this time is `crossOrigin` which accepts a string.",
245
- h(e)
245
+ v(e)
246
246
  ) : e != null && typeof e.crossOrigin != "string" && console.error(
247
247
  "ReactDOM.preconnect(): Expected the `crossOrigin` option (second argument) to be a string but encountered %s instead. Try removing this option or passing a string value instead.",
248
248
  f(e.crossOrigin)
@@ -250,7 +250,7 @@ See https://react.dev/link/invalid-hook-call for tips about how to debug and fix
250
250
  "ReactDOM.preconnect(): Expected the `href` argument (first) to be a non-empty string but encountered %s instead.",
251
251
  f(r)
252
252
  ), typeof r == "string" && (e ? (e = e.crossOrigin, e = typeof e == "string" ? e === "use-credentials" ? e : "" : void 0) : e = null, n.d.C(r, e));
253
- }, y.prefetchDNS = function(r) {
253
+ }, g.prefetchDNS = function(r) {
254
254
  if (typeof r != "string" || !r)
255
255
  console.error(
256
256
  "ReactDOM.prefetchDNS(): Expected the `href` argument (first) to be a non-empty string but encountered %s instead.",
@@ -260,43 +260,43 @@ See https://react.dev/link/invalid-hook-call for tips about how to debug and fix
260
260
  var e = arguments[1];
261
261
  typeof e == "object" && e.hasOwnProperty("crossOrigin") ? console.error(
262
262
  "ReactDOM.prefetchDNS(): Expected only one argument, `href`, but encountered %s as a second argument instead. This argument is reserved for future options and is currently disallowed. It looks like the you are attempting to set a crossOrigin property for this DNS lookup hint. Browsers do not perform DNS queries using CORS and setting this attribute on the resource hint has no effect. Try calling ReactDOM.prefetchDNS() with just a single string argument, `href`.",
263
- h(e)
263
+ v(e)
264
264
  ) : console.error(
265
265
  "ReactDOM.prefetchDNS(): Expected only one argument, `href`, but encountered %s as a second argument instead. This argument is reserved for future options and is currently disallowed. Try calling ReactDOM.prefetchDNS() with just a single string argument, `href`.",
266
- h(e)
266
+ v(e)
267
267
  );
268
268
  }
269
269
  typeof r == "string" && n.d.D(r);
270
- }, y.preinit = function(r, e) {
270
+ }, g.preinit = function(r, e) {
271
271
  if (typeof r == "string" && r ? e == null || typeof e != "object" ? console.error(
272
272
  "ReactDOM.preinit(): Expected the `options` argument (second) to be an object with an `as` property describing the type of resource to be preinitialized but encountered %s instead.",
273
- h(e)
273
+ v(e)
274
274
  ) : e.as !== "style" && e.as !== "script" && console.error(
275
275
  'ReactDOM.preinit(): Expected the `as` property in the `options` argument (second) to contain a valid value describing the type of resource to be preinitialized but encountered %s instead. Valid values for `as` are "style" and "script".',
276
- h(e.as)
276
+ v(e.as)
277
277
  ) : console.error(
278
278
  "ReactDOM.preinit(): Expected the `href` argument (first) to be a non-empty string but encountered %s instead.",
279
279
  f(r)
280
280
  ), typeof r == "string" && e && typeof e.as == "string") {
281
- var i = e.as, d = c(i, e.crossOrigin), E = typeof e.integrity == "string" ? e.integrity : void 0, L = typeof e.fetchPriority == "string" ? e.fetchPriority : void 0;
281
+ var i = e.as, y = c(i, e.crossOrigin), O = typeof e.integrity == "string" ? e.integrity : void 0, b = typeof e.fetchPriority == "string" ? e.fetchPriority : void 0;
282
282
  i === "style" ? n.d.S(
283
283
  r,
284
284
  typeof e.precedence == "string" ? e.precedence : void 0,
285
285
  {
286
- crossOrigin: d,
287
- integrity: E,
288
- fetchPriority: L
286
+ crossOrigin: y,
287
+ integrity: O,
288
+ fetchPriority: b
289
289
  }
290
290
  ) : i === "script" && n.d.X(r, {
291
- crossOrigin: d,
292
- integrity: E,
293
- fetchPriority: L,
291
+ crossOrigin: y,
292
+ integrity: O,
293
+ fetchPriority: b,
294
294
  nonce: typeof e.nonce == "string" ? e.nonce : void 0
295
295
  });
296
296
  }
297
- }, y.preinitModule = function(r, e) {
297
+ }, g.preinitModule = function(r, e) {
298
298
  var i = "";
299
- if (typeof r == "string" && r || (i += " The `href` argument encountered was " + f(r) + "."), e !== void 0 && typeof e != "object" ? i += " The `options` argument encountered was " + f(e) + "." : e && "as" in e && e.as !== "script" && (i += " The `as` option encountered was " + h(e.as) + "."), i)
299
+ if (typeof r == "string" && r || (i += " The `href` argument encountered was " + f(r) + "."), e !== void 0 && typeof e != "object" ? i += " The `options` argument encountered was " + f(e) + "." : e && "as" in e && e.as !== "script" && (i += " The `as` option encountered was " + v(e.as) + "."), i)
300
300
  console.error(
301
301
  "ReactDOM.preinitModule(): Expected up to two arguments, a non-empty `href` string and, optionally, an `options` object with a valid `as` property.%s",
302
302
  i
@@ -306,7 +306,7 @@ See https://react.dev/link/invalid-hook-call for tips about how to debug and fix
306
306
  case "script":
307
307
  break;
308
308
  default:
309
- i = h(i), console.error(
309
+ i = v(i), console.error(
310
310
  'ReactDOM.preinitModule(): Currently the only supported "as" type for this function is "script" but received "%s" instead. This warning was generated for `href` "%s". In the future other module types will be supported, aligning with the import-attributes proposal. Learn more here: (https://github.com/tc39/proposal-import-attributes)',
311
311
  i,
312
312
  r
@@ -320,19 +320,19 @@ See https://react.dev/link/invalid-hook-call for tips about how to debug and fix
320
320
  integrity: typeof e.integrity == "string" ? e.integrity : void 0,
321
321
  nonce: typeof e.nonce == "string" ? e.nonce : void 0
322
322
  })) : e == null && n.d.M(r));
323
- }, y.preload = function(r, e) {
323
+ }, g.preload = function(r, e) {
324
324
  var i = "";
325
325
  if (typeof r == "string" && r || (i += " The `href` argument encountered was " + f(r) + "."), e == null || typeof e != "object" ? i += " The `options` argument encountered was " + f(e) + "." : typeof e.as == "string" && e.as || (i += " The `as` option encountered was " + f(e.as) + "."), i && console.error(
326
326
  'ReactDOM.preload(): Expected two arguments, a non-empty `href` string and an `options` object with an `as` property valid for a `<link rel="preload" as="..." />` tag.%s',
327
327
  i
328
328
  ), typeof r == "string" && typeof e == "object" && e !== null && typeof e.as == "string") {
329
329
  i = e.as;
330
- var d = c(
330
+ var y = c(
331
331
  i,
332
332
  e.crossOrigin
333
333
  );
334
334
  n.d.L(r, i, {
335
- crossOrigin: d,
335
+ crossOrigin: y,
336
336
  integrity: typeof e.integrity == "string" ? e.integrity : void 0,
337
337
  nonce: typeof e.nonce == "string" ? e.nonce : void 0,
338
338
  type: typeof e.type == "string" ? e.type : void 0,
@@ -343,7 +343,7 @@ See https://react.dev/link/invalid-hook-call for tips about how to debug and fix
343
343
  media: typeof e.media == "string" ? e.media : void 0
344
344
  });
345
345
  }
346
- }, y.preloadModule = function(r, e) {
346
+ }, g.preloadModule = function(r, e) {
347
347
  var i = "";
348
348
  typeof r == "string" && r || (i += " The `href` argument encountered was " + f(r) + "."), e !== void 0 && typeof e != "object" ? i += " The `options` argument encountered was " + f(e) + "." : e && "as" in e && typeof e.as != "string" && (i += " The `as` option encountered was " + f(e.as) + "."), i && console.error(
349
349
  'ReactDOM.preloadModule(): Expected two arguments, a non-empty `href` string and, optionally, an `options` object with an `as` property valid for a `<link rel="modulepreload" as="..." />` tag.%s',
@@ -356,167 +356,205 @@ See https://react.dev/link/invalid-hook-call for tips about how to debug and fix
356
356
  crossOrigin: i,
357
357
  integrity: typeof e.integrity == "string" ? e.integrity : void 0
358
358
  })) : n.d.m(r));
359
- }, y.requestFormReset = function(r) {
359
+ }, g.requestFormReset = function(r) {
360
360
  n.d.r(r);
361
- }, y.unstable_batchedUpdates = function(r, e) {
361
+ }, g.unstable_batchedUpdates = function(r, e) {
362
362
  return r(e);
363
- }, y.useFormState = function(r, e, i) {
364
- return v().useFormState(r, e, i);
365
- }, y.useFormStatus = function() {
366
- return v().useHostTransitionStatus();
367
- }, y.version = "19.1.1", typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ < "u" && typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop == "function" && __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error());
368
- }()), y;
363
+ }, g.useFormState = function(r, e, i) {
364
+ return _().useFormState(r, e, i);
365
+ }, g.useFormStatus = function() {
366
+ return _().useHostTransitionStatus();
367
+ }, g.version = "19.1.1", typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ < "u" && typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop == "function" && __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error());
368
+ }()), g;
369
369
  }
370
- function $() {
370
+ function J() {
371
371
  if (!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ > "u" || typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE != "function")) {
372
372
  if (process.env.NODE_ENV !== "production")
373
373
  throw new Error("^_^");
374
374
  try {
375
- __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE($);
376
- } catch (s) {
377
- console.error(s);
375
+ __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(J);
376
+ } catch (u) {
377
+ console.error(u);
378
378
  }
379
379
  }
380
380
  }
381
- process.env.NODE_ENV === "production" ? ($(), U.exports = re()) : U.exports = ne();
382
- var A = U.exports;
383
- const ie = "_wrapper_ogovb_12", oe = "_tooltip_ogovb_17", ae = "_open_ogovb_30", I = {
384
- wrapper: ie,
385
- tooltip: oe,
386
- open: ae
387
- }, fe = ({
388
- trigger: s,
389
- children: O,
381
+ process.env.NODE_ENV === "production" ? (J(), B.exports = ue()) : B.exports = le();
382
+ var H = B.exports;
383
+ const fe = "_wrapper_1f22n_12", de = "_tooltip_1f22n_17", ge = "_open_1f22n_30", U = {
384
+ wrapper: fe,
385
+ tooltip: de,
386
+ open: ge
387
+ }, ve = ({
388
+ trigger: u,
389
+ children: T,
390
390
  position: a = "top",
391
391
  delay: c = 0,
392
392
  tooltipClassName: f,
393
- wrapperClassName: h,
394
- on: v = "auto",
395
- autoAdjust: S = !0,
393
+ wrapperClassName: v,
394
+ on: _ = "auto",
395
+ autoAdjust: R = !0,
396
396
  flip: n = !0,
397
- viewportPadding: t = 4
397
+ viewportPadding: t = 4,
398
+ allowEnter: o = !0
398
399
  }) => {
399
- const [o, r] = m.useState(!1), e = m.useRef(null), i = m.useId(), d = m.useRef(null), E = m.useRef(null), L = ce(), M = v === "auto" ? L ? "hover" : "click" : v, [q, V] = m.useState(a), [W, k] = m.useState(0), [X, C] = m.useState(0);
400
+ const [r, e] = m.useState(!1), i = m.useRef(null), y = m.useId(), O = m.useRef(null), b = m.useRef(null), Q = ye(), M = _ === "auto" ? Q ? "hover" : "click" : _, G = o ? 200 : 0, k = m.useRef(null), [Z, F] = m.useState(a), [ee, P] = m.useState(0), [te, I] = m.useState(0);
400
401
  m.useEffect(() => {
401
- o || (V(a), k(0), C(0));
402
- }, [o, a]);
403
- function x() {
404
- e.current && (window.clearTimeout(e.current), e.current = null);
402
+ r || (F(a), P(0), I(0));
403
+ }, [r, a]);
404
+ function C() {
405
+ i.current && (window.clearTimeout(i.current), i.current = null);
405
406
  }
406
- function P() {
407
- const u = d.current, N = E.current;
408
- if (!u || !N) return;
409
- k(0), C(0);
410
- const w = window.innerWidth, F = window.innerHeight, T = u.getBoundingClientRect(), D = N.getBoundingClientRect();
411
- let R = a;
407
+ function x() {
408
+ const s = O.current, S = b.current;
409
+ if (!s || !S) return;
410
+ P(0), I(0);
411
+ const h = window.innerWidth, $ = window.innerHeight, w = s.getBoundingClientRect(), A = S.getBoundingClientRect();
412
+ let D = a;
412
413
  if (n)
413
414
  if (a === "top" || a === "bottom") {
414
- const l = T.top, p = F - T.bottom, _ = D.height + t;
415
- a === "top" && l < _ && p > l ? R = "bottom" : a === "bottom" && p < _ && l > p && (R = "top");
415
+ const l = w.top, p = $ - w.bottom, E = A.height + t;
416
+ a === "top" && l < E && p > l ? D = "bottom" : a === "bottom" && p < E && l > p && (D = "top");
416
417
  } else {
417
- const l = T.left, p = w - T.right, _ = D.width + t;
418
- a === "left" && l < _ && p > l ? R = "right" : a === "right" && p < _ && l > p && (R = "left");
418
+ const l = w.left, p = h - w.right, E = A.width + t;
419
+ a === "left" && l < E && p > l ? D = "right" : a === "right" && p < E && l > p && (D = "left");
419
420
  }
420
- if (V(R), S)
421
- if (R === "top" || R === "bottom") {
422
- const l = T.left + T.width / 2 - D.width / 2, p = t, _ = w - t - D.width;
423
- let b = 0;
424
- l < p ? b = p - l : l > _ && (b = _ - l), k(b);
421
+ if (F(D), R)
422
+ if (D === "top" || D === "bottom") {
423
+ const l = w.left + w.width / 2 - A.width / 2, p = t, E = h - t - A.width;
424
+ let L = 0;
425
+ l < p ? L = p - l : l > E && (L = E - l), P(L);
425
426
  } else {
426
- const l = T.top + T.height / 2 - D.height / 2, p = t, _ = F - t - D.height;
427
- let b = 0;
428
- l < p ? b = p - l : l > _ && (b = _ - l), C(b);
427
+ const l = w.top + w.height / 2 - A.height / 2, p = t, E = $ - t - A.height;
428
+ let L = 0;
429
+ l < p ? L = p - l : l > E && (L = E - l), I(L);
429
430
  }
430
431
  }
431
- function B() {
432
- x(), e.current = window.setTimeout(() => {
433
- A.flushSync(() => {
434
- r(!0);
435
- }), A.flushSync(() => {
436
- P();
437
- });
432
+ function N() {
433
+ k.current && (window.clearTimeout(k.current), k.current = null);
434
+ }
435
+ function K() {
436
+ N(), k.current = window.setTimeout(() => {
437
+ e(!1);
438
+ }, G);
439
+ }
440
+ function Y() {
441
+ if (C(), N(), r) {
442
+ x();
443
+ return;
444
+ }
445
+ i.current = window.setTimeout(() => {
446
+ H.flushSync(() => e(!0)), H.flushSync(() => x());
438
447
  }, c);
439
448
  }
440
- function H() {
441
- x(), r(!1);
449
+ function re() {
450
+ C(), N(), k.current = window.setTimeout(() => {
451
+ console.log("Hiding tooltip"), e(!1);
452
+ }, G);
442
453
  }
443
- function G() {
444
- x(), o ? r(!1) : (A.flushSync(() => r(!0)), A.flushSync(() => P()));
454
+ function j() {
455
+ C(), N(), e(!1);
445
456
  }
446
- j(() => {
447
- if (!o) return;
448
- function u() {
449
- P();
457
+ function z() {
458
+ C(), r ? e(!1) : (H.flushSync(() => e(!0)), H.flushSync(() => x()));
459
+ }
460
+ V(() => {
461
+ if (!r) return;
462
+ function s() {
463
+ x();
450
464
  }
451
- return window.addEventListener("resize", u), window.addEventListener("scroll", u, !0), () => {
452
- window.removeEventListener("resize", u), window.removeEventListener("scroll", u, !0);
465
+ return window.addEventListener("resize", s), window.addEventListener("scroll", s, !0), () => {
466
+ window.removeEventListener("resize", s), window.removeEventListener("scroll", s, !0);
453
467
  };
454
- }, [o, a, S, n, t]), j(() => {
455
- if (M !== "click" || !o) return;
456
- function u(w) {
457
- d.current && (d.current.contains(w.target) || r(!1));
468
+ }, [r, a, R, n, t]), V(() => {
469
+ if (M !== "click" || !r) return;
470
+ function s(h) {
471
+ O.current && (O.current.contains(h.target) || e(!1));
458
472
  }
459
- function N(w) {
460
- w.key === "Escape" && r(!1);
473
+ function S(h) {
474
+ h.key === "Escape" && e(!1);
461
475
  }
462
- return document.addEventListener("mousedown", u), document.addEventListener("keydown", N), () => {
463
- document.removeEventListener("mousedown", u), document.removeEventListener("keydown", N);
476
+ return document.addEventListener("mousedown", s), document.addEventListener("keydown", S), () => {
477
+ document.removeEventListener("mousedown", s), document.removeEventListener("keydown", S);
464
478
  };
465
- }, [o, M]);
466
- const J = M === "hover" ? {
467
- onMouseEnter: B,
468
- onMouseLeave: H,
469
- onFocus: B,
470
- onBlur: H
471
- } : {}, Q = M === "click" ? {
472
- onClick: (u) => {
473
- o || (u.preventDefault(), G());
479
+ }, [r, M]);
480
+ const ne = M === "hover" ? {
481
+ onMouseEnter: () => {
482
+ N(), Y();
483
+ },
484
+ onMouseLeave: (s) => {
485
+ var h;
486
+ if (!o) {
487
+ j();
488
+ return;
489
+ }
490
+ const S = s.relatedTarget;
491
+ S && ((h = b.current) != null && h.contains(S)) || K();
492
+ },
493
+ onFocus: Y,
494
+ onBlur: j
495
+ } : {}, ie = M === "hover" && o ? {
496
+ onMouseEnter: () => {
497
+ N();
498
+ },
499
+ onMouseLeave: (s) => {
500
+ var h;
501
+ if (!o) {
502
+ j();
503
+ return;
504
+ }
505
+ const S = s.relatedTarget;
506
+ S && ((h = O.current) != null && h.contains(S)) || K();
507
+ }
508
+ } : {}, oe = M === "click" ? {
509
+ onClick: (s) => {
510
+ r || (s.preventDefault(), z());
474
511
  },
475
- onKeyDown: (u) => {
476
- u.key === "Enter" || u.key === " " ? (u.preventDefault(), G()) : u.key === "Escape" && H();
512
+ onKeyDown: (s) => {
513
+ s.key === "Enter" || s.key === " " ? (s.preventDefault(), z()) : s.key === "Escape" && re();
477
514
  }
478
515
  } : {};
479
- return /* @__PURE__ */ Z(
516
+ return /* @__PURE__ */ ae(
480
517
  "span",
481
518
  {
482
- ref: d,
483
- className: K(I.wrapper, h),
484
- ...J,
485
- ...Q,
519
+ ref: O,
520
+ className: q(U.wrapper, v),
521
+ ...ne,
522
+ ...oe,
486
523
  children: [
487
- m.cloneElement(s, {
488
- "aria-describedby": i,
524
+ m.cloneElement(u, {
525
+ "aria-describedby": y,
489
526
  "aria-haspopup": "true",
490
- "aria-expanded": o || void 0,
491
- tabIndex: s.props.tabIndex ?? (M === "click" ? 0 : void 0)
527
+ "aria-expanded": r || void 0,
528
+ tabIndex: u.props.tabIndex ?? (M === "click" ? 0 : void 0)
492
529
  }),
493
- o && /* @__PURE__ */ ee(
530
+ r && /* @__PURE__ */ ce(
494
531
  "span",
495
532
  {
496
- ref: E,
497
- id: i,
533
+ ref: b,
534
+ id: y,
498
535
  role: "tooltip",
499
- "data-position": q,
500
- className: K(I.tooltip, I.open, f),
536
+ "data-position": Z,
537
+ className: q(U.tooltip, U.open, f),
501
538
  style: {
502
- "--tooltip-shift-x": `${W}px`,
503
- "--tooltip-shift-y": `${X}px`
539
+ "--tooltip-shift-x": `${ee}px`,
540
+ "--tooltip-shift-y": `${te}px`
504
541
  },
505
- children: O
542
+ ...ie,
543
+ children: T
506
544
  }
507
545
  )
508
546
  ]
509
547
  }
510
548
  );
511
549
  };
512
- function ce() {
513
- const [s, O] = te(() => typeof window > "u" ? !0 : window.matchMedia("(hover: hover) and (pointer: fine)").matches);
514
- return j(() => {
550
+ function ye() {
551
+ const [u, T] = se(() => typeof window > "u" ? !0 : window.matchMedia("(hover: hover) and (pointer: fine)").matches);
552
+ return V(() => {
515
553
  if (typeof window > "u") return;
516
- const a = window.matchMedia("(hover: hover) and (pointer: fine)"), c = () => O(a.matches);
554
+ const a = window.matchMedia("(hover: hover) and (pointer: fine)"), c = () => T(a.matches);
517
555
  return a.addEventListener("change", c), () => a.removeEventListener("change", c);
518
- }, []), s;
556
+ }, []), u;
519
557
  }
520
558
  export {
521
- fe as Tooltip
559
+ ve as Tooltip
522
560
  };
@@ -15,6 +15,9 @@ declare const meta: {
15
15
  delay: {
16
16
  control: "number";
17
17
  };
18
+ allowEnter: {
19
+ control: "boolean";
20
+ };
18
21
  wrapperClassName: {
19
22
  table: {
20
23
  disable: true;
@@ -28,13 +28,15 @@ const s = {
28
28
  ]
29
29
  },
30
30
  delay: { control: "number" },
31
+ allowEnter: { control: "boolean" },
31
32
  wrapperClassName: { table: { disable: !0 } },
32
33
  tooltipClassName: { table: { disable: !0 } }
33
34
  }
34
35
  }, c = {
35
36
  args: {
36
37
  position: "top",
37
- delay: 0
38
+ delay: 0,
39
+ allowEnter: !0
38
40
  },
39
41
  render: (i) => /* @__PURE__ */ t(
40
42
  "div",
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@caseparts-org/caseblocks",
3
3
  "private": false,
4
- "version": "0.0.30",
4
+ "version": "0.0.32",
5
5
  "type": "module",
6
6
  "module": "dist/main.js",
7
7
  "types": "dist/main.d.ts",