welcome-ui 10.0.0-alpha.3 → 10.0.0-alpha.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (135) hide show
  1. package/dist/2W3RN7C5-DMC82gDP.js +61 -0
  2. package/dist/{4I4MLMKD-z3Xm3qCo.js → 4I4MLMKD-BO6Lcy7s.js} +17 -17
  3. package/dist/Accordion.js +19 -17
  4. package/dist/Alert.css +1 -1
  5. package/dist/Alert.js +93 -87
  6. package/dist/AspectRatio.js +1 -0
  7. package/dist/Avatar.js +13 -11
  8. package/dist/{B7UTNDHN-BDa2-8JK.js → B7UTNDHN-BghjolIs.js} +30 -30
  9. package/dist/Badge.js +1 -0
  10. package/dist/Breadcrumb.js +76 -71
  11. package/dist/Button.js +8 -6
  12. package/dist/ButtonGroup.js +6 -4
  13. package/dist/Card.css +1 -1
  14. package/dist/Card.js +68 -15
  15. package/dist/Checkbox.js +30 -29
  16. package/dist/CloseButton.js +7 -5
  17. package/dist/{CustomPopper-vwbOQq72.js → CustomPopper-C1wIDHbM.js} +5 -4
  18. package/dist/{DSAASPLT-C-2xDjIv.js → DSAASPLT-Fx1kuAsk.js} +3 -3
  19. package/dist/DatePicker.js +82 -78
  20. package/dist/DateTimePicker.js +22 -21
  21. package/dist/Drawer.js +101 -80
  22. package/dist/DropdownMenu.css +1 -1
  23. package/dist/DropdownMenu.js +889 -462
  24. package/dist/Field.js +1 -0
  25. package/dist/FieldGroup.js +9 -7
  26. package/dist/FileDrop.js +184 -176
  27. package/dist/FileUpload.js +43 -40
  28. package/dist/{GVVKDT6A-C66-lr0B.js → GVVKDT6A-CF9ejW_c.js} +103 -103
  29. package/dist/Hint.js +9 -7
  30. package/dist/Icon.js +6 -4
  31. package/dist/InputText.js +30 -28
  32. package/dist/{KPUWHTQJ-Byij2al4.js → KPUWHTQJ-Dv3cAqjP.js} +33 -31
  33. package/dist/Label.js +9 -7
  34. package/dist/Link.js +25 -21
  35. package/dist/Loader.js +12 -10
  36. package/dist/Logo.js +21 -13
  37. package/dist/Modal.js +145 -114
  38. package/dist/{NI3IVY7K-DpF3td-7.js → NI3IVY7K-Dy240mkD.js} +160 -160
  39. package/dist/{NMGNQVTG-BgAqqGOq.js → NMGNQVTG-DRO2uXZT.js} +6 -6
  40. package/dist/{OE2EFRVA-DkdhQLJL.js → OE2EFRVA-Dg1R6gaC.js} +186 -170
  41. package/dist/{OLVWQA7U-wHytlFYu.js → OLVWQA7U-Dia3UUnG.js} +36 -36
  42. package/dist/Pagination.js +39 -37
  43. package/dist/PasswordInput.js +20 -17
  44. package/dist/Popover.js +89 -72
  45. package/dist/{RTNCFSKZ-LcIdBwa8.js → RTNCFSKZ-BywELldk.js} +42 -42
  46. package/dist/Radio.js +20 -19
  47. package/dist/RadioGroup.js +29 -27
  48. package/dist/RadioTab.js +2 -1
  49. package/dist/{SBSPVDDI-BoxPz2JY.js → SBSPVDDI-CmtnvvUX.js} +46 -46
  50. package/dist/SQZLCNLX-Dg4KKdNJ.js +83 -0
  51. package/dist/Search.css +1 -1
  52. package/dist/Search.js +62 -60
  53. package/dist/Select.css +1 -1
  54. package/dist/Select.js +204 -202
  55. package/dist/Slider.js +66 -61
  56. package/dist/Stepper.js +34 -27
  57. package/dist/StickyNote.css +1 -0
  58. package/dist/StickyNote.js +49 -0
  59. package/dist/Swiper.js +52 -50
  60. package/dist/{T22PY7TE-CzEDuEn1.js → T22PY7TE-gLuJpoOm.js} +46 -46
  61. package/dist/Table.js +34 -21
  62. package/dist/Tabs.js +161 -152
  63. package/dist/Tag.css +1 -1
  64. package/dist/Tag.js +66 -61
  65. package/dist/Text.js +4 -2
  66. package/dist/Textarea.js +10 -8
  67. package/dist/TimePicker.js +22 -21
  68. package/dist/Toast.js +186 -177
  69. package/dist/Toggle.js +16 -14
  70. package/dist/Tooltip.js +29 -27
  71. package/dist/VariantIcon.js +7 -5
  72. package/dist/VisuallyHidden.js +8 -6
  73. package/dist/WelcomeLoader.js +3 -2
  74. package/dist/XCKGTAUF-CJwwVibW.js +25 -0
  75. package/dist/{Y67KZUMI-BDyUNSJw.js → Y67KZUMI-BwLWwpNF.js} +2 -2
  76. package/dist/{ZTXFEM5L-CjFLRObi.js → ZTXFEM5L-WGHY_jqg.js} +3 -3
  77. package/dist/theme.css +1 -1
  78. package/dist/theme.js +1 -0
  79. package/dist/types/components/Alert/components/Buttons.d.ts +3 -0
  80. package/dist/types/components/Alert/components/Title.d.ts +5 -0
  81. package/dist/types/components/Alert/index.d.ts +7 -3
  82. package/dist/types/components/Alert/types.d.ts +3 -9
  83. package/dist/types/components/Card/Body.d.ts +2 -3
  84. package/dist/types/components/Card/Footer.d.ts +6 -0
  85. package/dist/types/components/Card/Header.d.ts +5 -0
  86. package/dist/types/components/Card/index.d.ts +7 -8
  87. package/dist/types/components/Card/types.d.ts +16 -3
  88. package/dist/types/components/Checkbox/index.d.ts +1 -2
  89. package/dist/types/components/Checkbox/types.d.ts +3 -1
  90. package/dist/types/components/DateTimePickerCommon/CustomHeader.d.ts +4 -1
  91. package/dist/types/components/DateTimePickerCommon/CustomPopper.d.ts +6 -3
  92. package/dist/types/components/Drawer/AssetDrawer/Header.d.ts +4 -1
  93. package/dist/types/components/Drawer/AssetDrawer/IconBlock.d.ts +4 -1
  94. package/dist/types/components/Drawer/components/Close.d.ts +4 -1
  95. package/dist/types/components/Drawer/components/Title.d.ts +4 -1
  96. package/dist/types/components/Drawer/index.d.ts +12 -3
  97. package/dist/types/components/DropdownMenu/Action.d.ts +2 -0
  98. package/dist/types/components/DropdownMenu/Group.d.ts +4 -0
  99. package/dist/types/components/DropdownMenu/Item.d.ts +7 -0
  100. package/dist/types/components/DropdownMenu/Search.d.ts +2 -0
  101. package/dist/types/components/DropdownMenu/Submenu.d.ts +4 -0
  102. package/dist/types/components/DropdownMenu/index.d.ts +11 -0
  103. package/dist/types/components/DropdownMenu/types.d.ts +26 -5
  104. package/dist/types/components/FileDrop/components/FilePreview.d.ts +4 -1
  105. package/dist/types/components/FileDrop/components/Message.d.ts +4 -1
  106. package/dist/types/components/Loader/index.d.ts +4 -1
  107. package/dist/types/components/Modal/Assets/AssetContent.d.ts +4 -1
  108. package/dist/types/components/Modal/Assets/AssetTitle.d.ts +4 -1
  109. package/dist/types/components/Modal/Assets/CloseButton.d.ts +4 -1
  110. package/dist/types/components/Modal/Assets/Dialog.d.ts +4 -1
  111. package/dist/types/components/Modal/Assets/Iframe.d.ts +4 -1
  112. package/dist/types/components/Modal/Assets/index.d.ts +16 -4
  113. package/dist/types/components/Modal/components/Close.d.ts +4 -1
  114. package/dist/types/components/Modal/index.d.ts +16 -4
  115. package/dist/types/components/PasswordInput/ToggleButton.d.ts +4 -1
  116. package/dist/types/components/Popover/Arrow.d.ts +4 -1
  117. package/dist/types/components/Popover/ContentWrapper.d.ts +4 -1
  118. package/dist/types/components/RadioGroup/index.d.ts +4 -1
  119. package/dist/types/components/Stepper/index.d.ts +8 -2
  120. package/dist/types/components/StickyNote/components/Button.d.ts +5 -0
  121. package/dist/types/components/StickyNote/components/Title.d.ts +5 -0
  122. package/dist/types/components/StickyNote/index.d.ts +11 -0
  123. package/dist/types/components/StickyNote/index.test.d.ts +1 -0
  124. package/dist/types/components/StickyNote/types.d.ts +15 -0
  125. package/dist/types/components/Swiper/index.d.ts +4 -1
  126. package/dist/types/components/Table/index.d.ts +20 -5
  127. package/dist/types/components/Tabs/components/ActiveBar/index.d.ts +4 -1
  128. package/dist/types/components/Tag/types.d.ts +4 -2
  129. package/dist/types/components/Toast/index.d.ts +4 -1
  130. package/dist/types/theme/types.d.ts +233 -218
  131. package/dist/utils.js +1 -0
  132. package/package.json +2 -2
  133. package/dist/2W3RN7C5-uG7eBeTQ.js +0 -61
  134. package/dist/SQZLCNLX-CUlXoT69.js +0 -82
  135. package/dist/XCKGTAUF-CahZE721.js +0 -25
@@ -1,98 +1,101 @@
1
1
  "use client";
2
+ import './FileUpload.css';
2
3
  import { jsxs as U, Fragment as T, jsx as p } from "react/jsx-runtime";
3
- import { forwardRef as D, useState as O, useRef as A, useMemo as H, useImperativeHandle as K, useEffect as j } from "react";
4
- import { Button as M } from "./Button.js";
5
- import { g as Y, b as q, a as G } from "./index-DmEMuVTM.js";
4
+ import { forwardRef as O, useState as A, useRef as H, useMemo as K, useImperativeHandle as M, useEffect as R } from "react";
5
+ import { Button as Y } from "./Button.js";
6
+ import { g as d, b as q, a as G } from "./index-DmEMuVTM.js";
6
7
  import { Icon as J } from "./Icon.js";
7
8
  import { Tag as Q } from "./Tag.js";
8
9
  import { c as V } from "./index-PAaZGbyz.js";
9
- import { c as k } from "./create-event-rXDe5aCQ.js";
10
+ import { c as j } from "./create-event-rXDe5aCQ.js";
10
11
  const W = "_input_2g24s_2", X = {
11
12
  input: W,
12
13
  "preview-tag": "_preview-tag_2g24s_5",
13
14
  "preview-tag-size": "_preview-tag-size_2g24s_9"
14
- }, y = V(X), Z = "*/*", x = (e) => Array.isArray(e) ? e : e ? [e] : [], $ = ({ file: e, onRemove: m }) => {
15
- const a = Y(e), f = q(e), i = G(e);
15
+ }, y = V(X), Z = "*/*", k = (e) => Array.isArray(e) ? e : e ? [e] : [], x = ({ file: e, onRemove: m }) => {
16
+ const n = d(e), f = q(e), c = G(e);
16
17
  return /* @__PURE__ */ U(Q, { className: y("preview-tag"), "data-testid": f, onRemove: m, children: [
17
- /* @__PURE__ */ p(J, { name: a, size: "md" }),
18
+ /* @__PURE__ */ p(J, { name: n, size: "md" }),
18
19
  f,
19
- i ? /* @__PURE__ */ U("span", { className: y("preview-tag-size"), children: [
20
+ c ? /* @__PURE__ */ U("span", { className: y("preview-tag-size"), children: [
20
21
  "(",
21
- i,
22
+ c,
22
23
  ")"
23
24
  ] }) : null
24
25
  ] }, f);
25
- }, d = D(
26
+ };
27
+ x.displayName = "FileUpload.DefaultPreview";
28
+ const $ = O(
26
29
  ({
27
30
  accept: e = Z,
28
31
  children: m,
29
- disabled: a,
32
+ disabled: n,
30
33
  // eslint-disable-next-line @typescript-eslint/no-unused-vars
31
34
  draggable: f,
32
- handleAddFile: i,
35
+ handleAddFile: c,
33
36
  handleRemoveFile: u,
34
37
  multiple: N,
35
38
  name: v,
36
- onBlur: c,
37
- onChange: o,
39
+ onBlur: i,
40
+ onChange: a,
38
41
  // eslint-disable-next-line @typescript-eslint/no-unused-vars
39
42
  onError: C,
40
- preview: z,
43
+ preview: l,
41
44
  value: w = [],
42
45
  ...I
43
- }, S) => {
44
- const [r, g] = O(x(w)), _ = A(), E = H(() => z || $, [z]);
45
- K(S, () => _.current), j(() => {
46
- g(x(w));
47
- }, [w]), j(() => () => {
46
+ }, P) => {
47
+ const [r, g] = A(k(w)), _ = H(), z = K(() => l || x, [l]);
48
+ M(P, () => _.current), R(() => {
49
+ g(k(w));
50
+ }, [w]), R(() => () => {
48
51
  r == null || r.map((t) => t instanceof File ? URL.revokeObjectURL(t.preview) : t);
49
52
  }, [r]);
50
- const b = (t) => {
53
+ const S = (t) => {
51
54
  let s = Array.from(t.target.files).map(
52
- (n) => (n instanceof File && (n.preview = URL.createObjectURL(n)), n)
55
+ (o) => (o instanceof File && (o.preview = URL.createObjectURL(o)), o)
53
56
  );
54
57
  g(s), s.length === 1 && (s = s[0]);
55
- const F = k({ name: v, value: s });
56
- o == null || o(F), i == null || i(s), c == null || c();
57
- }, L = (t) => {
58
- const s = r.filter((P) => P !== t), F = N ? s : void 0;
58
+ const F = j({ name: v, value: s });
59
+ a == null || a(F), c == null || c(s), i == null || i();
60
+ }, E = (t) => {
61
+ const s = r.filter((D) => D !== t), F = N ? s : void 0;
59
62
  g(s);
60
- const n = k({ name: v, value: F });
61
- o == null || o(n), u == null || u(t), c == null || c();
62
- }, R = () => {
63
+ const o = j({ name: v, value: F });
64
+ a == null || a(o), u == null || u(t), i == null || i();
65
+ }, L = () => {
63
66
  _.current.click();
64
- }, l = r.map((t) => t instanceof File ? t.preview : void 0).join("");
67
+ }, b = r.map((t) => t instanceof File ? t.preview : void 0).join("");
65
68
  return /* @__PURE__ */ U(T, { children: [
66
- m ? m({ disabled: a, files: r, onRemoveFile: L, openFile: R }) : /* @__PURE__ */ p(M, { disabled: a, onClick: R, children: "Upload file" }),
69
+ m ? m({ disabled: n, files: r, onRemoveFile: E, openFile: L }) : /* @__PURE__ */ p(Y, { disabled: n, onClick: L, children: "Upload file" }),
67
70
  /* @__PURE__ */ p("br", {}),
68
71
  /* @__PURE__ */ p(
69
72
  "input",
70
73
  {
71
74
  accept: e,
72
75
  className: y("input"),
73
- disabled: a,
76
+ disabled: n,
74
77
  multiple: N,
75
78
  name: v,
76
- onBlur: c,
77
- onChange: b,
79
+ onBlur: i,
80
+ onChange: S,
78
81
  ref: _,
79
82
  ...I,
80
83
  type: "file"
81
84
  },
82
- l
85
+ b
83
86
  ),
84
- E ? r.map((t) => /* @__PURE__ */ p(
85
- E,
87
+ z ? r.map((t) => /* @__PURE__ */ p(
88
+ z,
86
89
  {
87
90
  file: t,
88
- onRemove: () => L(t)
91
+ onRemove: () => E(t)
89
92
  },
90
93
  t instanceof File ? t.name : t
91
94
  )) : null
92
95
  ] });
93
96
  }
94
97
  );
95
- d.displayName = "FileUpload";
98
+ $.displayName = "FileUpload";
96
99
  export {
97
- d as FileUpload
100
+ $ as FileUpload
98
101
  };
@@ -1,36 +1,36 @@
1
1
  "use client";
2
- import { a as Ie, c as He, b as We, d as Xe } from "./NI3IVY7K-DpF3td-7.js";
3
- import { P as Me, b as Ye, a as Ce } from "./Y67KZUMI-BDyUNSJw.js";
4
- import { e as Ue, c as pe, _ as ne, i as se, ae as Re, u as U, L as ce, x as le, d as $, a as S, f as me, b as ve, k as Fe, l as de, T as xe, a8 as z, W as Ge, p as Te, z as Je, q as fe, m as Ke, A as Ze, X as Qe, F as et, G as I, I as F, H as M, K as tt } from "./OE2EFRVA-DkdhQLJL.js";
2
+ import { a as Ye, c as He, b as Ie, d as We } from "./NI3IVY7K-Dy240mkD.js";
3
+ import { P as Me, b as Xe, a as Ce } from "./Y67KZUMI-BwLWwpNF.js";
4
+ import { e as Ue, c as pe, _ as ne, i as se, ag as Re, u as U, m as ce, k as le, d as $, a as x, f as me, b as ve, o as Fe, p as de, V as Se, aa as L, Y as Ge, v as Te, E as Ze, w as fe, q as Je, F as Ke, Z as Qe, M as et, A as Y, B as F, z as M, C as tt } from "./OE2EFRVA-Dg1R6gaC.js";
5
5
  import { B as ot, N as rt, L as nt, A as st, O as it, g as ut, C as at, a as ct } from "./floating-ui.dom.browser.min-Bza9K_UR.js";
6
- import { useRef as W, useState as he, useEffect as T, useContext as lt, createContext as dt, useCallback as $e } from "react";
6
+ import { useRef as I, useState as he, useEffect as T, useContext as lt, createContext as dt, useCallback as $e } from "react";
7
7
  import { jsx as re } from "react/jsx-runtime";
8
- import { a as ft, m as pt, o as mt, t as vt, c as _e, d as oe, b as De } from "./RTNCFSKZ-LcIdBwa8.js";
8
+ import { d as ft, m as pt, o as mt, t as vt, c as _e, a as oe, u as De } from "./RTNCFSKZ-BywELldk.js";
9
9
  var G = Ue(
10
- [Ye],
10
+ [Xe],
11
11
  [Me]
12
12
  );
13
13
  G.useContext;
14
14
  G.useScopedContext;
15
- var Pe = G.useProviderContext, qt = G.ContextProvider, ht = G.ScopedContextProvider;
15
+ var Pe = G.useProviderContext, zt = G.ContextProvider, ht = G.ScopedContextProvider;
16
16
  function ae(t) {
17
17
  return [t.clientX, t.clientY];
18
18
  }
19
- function Se(t, r) {
19
+ function xe(t, r) {
20
20
  const [o, e] = t;
21
21
  let n = !1;
22
22
  const s = r.length;
23
23
  for (let u = s, c = 0, a = u - 1; c < u; a = c++) {
24
- const [i, d] = r[c], [g, P] = r[a], [, x] = r[a === 0 ? u - 1 : a - 1] || [0, 0], h = (d - P) * (o - i) - (i - g) * (e - d);
24
+ const [i, d] = r[c], [g, P] = r[a], [, S] = r[a === 0 ? u - 1 : a - 1] || [0, 0], h = (d - P) * (o - i) - (i - g) * (e - d);
25
25
  if (P < d) {
26
26
  if (e >= P && e < d) {
27
27
  if (h === 0) return !0;
28
- h > 0 && (e === P ? e > x && (n = !n) : n = !n);
28
+ h > 0 && (e === P ? e > S && (n = !n) : n = !n);
29
29
  }
30
30
  } else if (d < P) {
31
31
  if (e > d && e <= P) {
32
32
  if (h === 0) return !0;
33
- h < 0 && (e === P ? e < x && (n = !n) : n = !n);
33
+ h < 0 && (e === P ? e < S && (n = !n) : n = !n);
34
34
  }
35
35
  } else if (e === d && (o >= g && o <= i || o >= i && o <= g))
36
36
  return !0;
@@ -59,7 +59,7 @@ function Oe(t = 0, r = 0, o = 0, e = 0) {
59
59
  bottom: r + e,
60
60
  left: t
61
61
  };
62
- return $(S({}, n), { toJSON: () => n });
62
+ return $(x({}, n), { toJSON: () => n });
63
63
  }
64
64
  function wt(t) {
65
65
  if (!t) return Oe();
@@ -75,14 +75,14 @@ function Et(t, r) {
75
75
  }
76
76
  };
77
77
  }
78
- function xt(t) {
78
+ function St(t) {
79
79
  return /^(?:top|bottom|left|right)(?:-(?:start|end))?$/.test(t);
80
80
  }
81
81
  function be(t) {
82
82
  const r = window.devicePixelRatio || 1;
83
83
  return Math.round(t * r) / r;
84
84
  }
85
- function St(t, r) {
85
+ function xt(t, r) {
86
86
  return nt(({ placement: o }) => {
87
87
  var e;
88
88
  const n = ((t == null ? void 0 : t.clientHeight) || 0) / 2, s = typeof r.gutter == "number" ? r.gutter + n : (e = r.gutter) != null ? e : n;
@@ -97,7 +97,7 @@ function yt(t) {
97
97
  if (t.flip === !1) return;
98
98
  const r = typeof t.flip == "string" ? t.flip.split(" ") : void 0;
99
99
  return se(
100
- !r || r.every(xt),
100
+ !r || r.every(St),
101
101
  process.env.NODE_ENV !== "production" && "`flip` expects a spaced-delimited list of placements"
102
102
  ), st({
103
103
  padding: t.overflowPadding,
@@ -151,7 +151,7 @@ var Ne = pe(
151
151
  flip: d = !0,
152
152
  shift: g = 0,
153
153
  slide: P = !0,
154
- overlap: x = !1,
154
+ overlap: S = !1,
155
155
  sameWidth: h = !1,
156
156
  fitViewport: b = !1,
157
157
  gutter: w,
@@ -184,39 +184,39 @@ var Ne = pe(
184
184
  e,
185
185
  process.env.NODE_ENV !== "production" && "Popover must receive a `store` prop or be wrapped in a PopoverProvider component."
186
186
  );
187
- const _ = e.useState("arrowElement"), y = e.useState("anchorElement"), ie = e.useState("disclosureElement"), m = e.useState("popoverElement"), D = e.useState("contentElement"), J = e.useState("placement"), l = e.useState("mounted"), O = e.useState("rendered"), v = W(null), [A, R] = he(!1), { portalRef: ue, domReady: k } = Re(s, p.portalRef), j = U(N), B = U(C), X = !!C;
187
+ const _ = e.useState("arrowElement"), y = e.useState("anchorElement"), ie = e.useState("disclosureElement"), m = e.useState("popoverElement"), D = e.useState("contentElement"), Z = e.useState("placement"), l = e.useState("mounted"), O = e.useState("rendered"), v = I(null), [A, R] = he(!1), { portalRef: ue, domReady: k } = Re(s, p.portalRef), B = U(N), j = U(C), W = !!C;
188
188
  ce(() => {
189
189
  if (!(m != null && m.isConnected)) return;
190
190
  m.style.setProperty(
191
191
  "--popover-overflow-padding",
192
192
  `${E}px`
193
193
  );
194
- const H = Et(y, j), Y = async () => {
194
+ const H = Et(y, B), X = async () => {
195
195
  if (!l) return;
196
196
  _ || (v.current = v.current || document.createElement("div"));
197
- const L = _ || v.current, Le = [
198
- St(L, { gutter: w, shift: g }),
197
+ const q = _ || v.current, qe = [
198
+ xt(q, { gutter: w, shift: g }),
199
199
  yt({ flip: d, overflowPadding: E }),
200
- Ot({ slide: P, overlap: x, overflowPadding: E }),
201
- At(L, { arrowPadding: f }),
200
+ Ot({ slide: P, overlap: S, overflowPadding: E }),
201
+ At(q, { arrowPadding: f }),
202
202
  bt({
203
203
  sameWidth: h,
204
204
  fitViewport: b,
205
205
  overflowPadding: E
206
206
  })
207
- ], q = await rt(H, m, {
208
- placement: J,
207
+ ], z = await rt(H, m, {
208
+ placement: Z,
209
209
  strategy: i ? "fixed" : "absolute",
210
- middleware: Le
210
+ middleware: qe
211
211
  });
212
- e == null || e.setState("currentPlacement", q.placement), R(!0);
213
- const qe = be(q.x), ze = be(q.y);
212
+ e == null || e.setState("currentPlacement", z.placement), R(!0);
213
+ const ze = be(z.x), Le = be(z.y);
214
214
  if (Object.assign(m.style, {
215
215
  top: "0",
216
216
  left: "0",
217
- transform: `translate3d(${qe}px,${ze}px,0)`
218
- }), L && q.middlewareData.arrow) {
219
- const { x: Z, y: Q } = q.middlewareData.arrow, ge = q.placement.split("-")[0], ee = L.clientWidth / 2, te = L.clientHeight / 2, we = Z != null ? Z + ee : -ee, Ee = Q != null ? Q + te : -te;
217
+ transform: `translate3d(${ze}px,${Le}px,0)`
218
+ }), q && z.middlewareData.arrow) {
219
+ const { x: K, y: Q } = z.middlewareData.arrow, ge = z.placement.split("-")[0], ee = q.clientWidth / 2, te = q.clientHeight / 2, we = K != null ? K + ee : -ee, Ee = Q != null ? Q + te : -te;
220
220
  m.style.setProperty(
221
221
  "--popover-transform-origin",
222
222
  {
@@ -225,20 +225,20 @@ var Ne = pe(
225
225
  left: `calc(100% + ${ee}px) ${Ee}px`,
226
226
  right: `${-ee}px ${Ee}px`
227
227
  }[ge]
228
- ), Object.assign(L.style, {
229
- left: Z != null ? `${Z}px` : "",
228
+ ), Object.assign(q.style, {
229
+ left: K != null ? `${K}px` : "",
230
230
  top: Q != null ? `${Q}px` : "",
231
231
  [ge]: "100%"
232
232
  });
233
233
  }
234
- }, Be = ot(H, m, async () => {
235
- X ? (await B({ updatePosition: Y }), R(!0)) : await Y();
234
+ }, je = ot(H, m, async () => {
235
+ W ? (await j({ updatePosition: X }), R(!0)) : await X();
236
236
  }, {
237
237
  // JSDOM doesn't support ResizeObserver
238
238
  elementResize: typeof ResizeObserver == "function"
239
239
  });
240
240
  return () => {
241
- R(!1), Be();
241
+ R(!1), je();
242
242
  };
243
243
  }, [
244
244
  e,
@@ -247,42 +247,42 @@ var Ne = pe(
247
247
  _,
248
248
  y,
249
249
  m,
250
- J,
250
+ Z,
251
251
  l,
252
252
  k,
253
253
  i,
254
254
  d,
255
255
  g,
256
256
  P,
257
- x,
257
+ S,
258
258
  h,
259
259
  b,
260
260
  w,
261
261
  f,
262
262
  E,
263
- j,
264
- X,
265
- B
263
+ B,
264
+ W,
265
+ j
266
266
  ]), ce(() => {
267
267
  if (!l || !k || !(m != null && m.isConnected) || !(D != null && D.isConnected)) return;
268
268
  const H = () => {
269
269
  m.style.zIndex = getComputedStyle(D).zIndex;
270
270
  };
271
271
  H();
272
- let Y = requestAnimationFrame(() => {
273
- Y = requestAnimationFrame(H);
272
+ let X = requestAnimationFrame(() => {
273
+ X = requestAnimationFrame(H);
274
274
  });
275
- return () => cancelAnimationFrame(Y);
275
+ return () => cancelAnimationFrame(X);
276
276
  }, [l, k, m, D]);
277
- const K = i ? "fixed" : "absolute";
277
+ const J = i ? "fixed" : "absolute";
278
278
  return p = le(
279
279
  p,
280
280
  (H) => /* @__PURE__ */ re(
281
281
  "div",
282
- $(S({}, a), {
283
- style: S({
282
+ $(x({}, a), {
283
+ style: x({
284
284
  // https://floating-ui.com/docs/computeposition#initial-layout
285
- position: K,
285
+ position: J,
286
286
  top: 0,
287
287
  left: 0,
288
288
  width: "max-content"
@@ -291,22 +291,22 @@ var Ne = pe(
291
291
  children: H
292
292
  })
293
293
  ),
294
- [e, K, a]
294
+ [e, J, a]
295
295
  ), p = le(
296
296
  p,
297
297
  (H) => /* @__PURE__ */ re(Me, { value: e, children: H }),
298
298
  [e]
299
- ), p = $(S({
299
+ ), p = $(x({
300
300
  // data-placing is not part of the public API. We're setting this here so
301
301
  // we can wait for the popover to be positioned before other components
302
302
  // move focus into it. For example, this attribute is observed by the
303
303
  // Combobox component with the autoSelect behavior.
304
304
  "data-placing": !A || void 0
305
305
  }, p), {
306
- style: S({
306
+ style: x({
307
307
  position: "relative"
308
308
  }, p.style)
309
- }), p = Ie($(S({
309
+ }), p = Ye($(x({
310
310
  store: e,
311
311
  modal: n,
312
312
  portal: s,
@@ -317,7 +317,7 @@ var Ne = pe(
317
317
  portalRef: ue
318
318
  })), p;
319
319
  }
320
- ), zt = He(
320
+ ), Lt = He(
321
321
  me(function(r) {
322
322
  const o = Ne(r);
323
323
  return ve(gt, o);
@@ -325,7 +325,7 @@ var Ne = pe(
325
325
  Ce
326
326
  ), Ht = "div";
327
327
  function Ve(t, r, o, e) {
328
- return Ke(r) ? !0 : t ? !!(fe(r, t) || o && fe(o, t) || e != null && e.some((n) => Ve(t, n, o))) : !1;
328
+ return Je(r) ? !0 : t ? !!(fe(r, t) || o && fe(o, t) || e != null && e.some((n) => Ve(t, n, o))) : !1;
329
329
  }
330
330
  function Mt(t) {
331
331
  var r = t, {
@@ -339,10 +339,10 @@ function Mt(t) {
339
339
  }, [u]);
340
340
  const c = e.onFocus, a = U((d) => {
341
341
  c == null || c(d), !d.defaultPrevented && s(!0);
342
- }), i = W(null);
342
+ }), i = I(null);
343
343
  return T(() => ft(o, ["anchorElement"], (d) => {
344
344
  i.current = d.anchorElement;
345
- }), []), e = $(S({
345
+ }), []), e = $(x({
346
346
  autoFocusOnHide: n,
347
347
  finalFocus: i
348
348
  }, e), {
@@ -371,25 +371,25 @@ var Ae = dt(null), Ct = pe(
371
371
  e,
372
372
  process.env.NODE_ENV !== "production" && "Hovercard must receive a `store` prop or be wrapped in a HovercardProvider component."
373
373
  );
374
- const g = W(null), [P, x] = he([]), h = W(0), b = W(null), { portalRef: w, domReady: f } = Re(s, i.portalRef), E = Fe(), N = !!c, C = de(c), p = !!a, V = de(
374
+ const g = I(null), [P, S] = he([]), h = I(0), b = I(null), { portalRef: w, domReady: f } = Re(s, i.portalRef), E = Fe(), N = !!c, C = de(c), p = !!a, V = de(
375
375
  a
376
376
  ), _ = e.useState("open"), y = e.useState("mounted");
377
377
  T(() => {
378
378
  if (!f || !y || !N && !p) return;
379
379
  const l = g.current;
380
- return l ? xe(
381
- z("mousemove", (v) => {
380
+ return l ? Se(
381
+ L("mousemove", (v) => {
382
382
  if (!e || !E()) return;
383
- const { anchorElement: A, hideTimeout: R, timeout: ue } = e.getState(), k = b.current, [j] = v.composedPath(), B = A;
384
- if (Ve(j, l, B, P)) {
385
- b.current = j && B && fe(B, j) ? ae(v) : null, window.clearTimeout(h.current), h.current = 0;
383
+ const { anchorElement: A, hideTimeout: R, timeout: ue } = e.getState(), k = b.current, [B] = v.composedPath(), j = A;
384
+ if (Ve(B, l, j, P)) {
385
+ b.current = B && j && fe(j, B) ? ae(v) : null, window.clearTimeout(h.current), h.current = 0;
386
386
  return;
387
387
  }
388
388
  if (!h.current) {
389
389
  if (k) {
390
- const X = ae(v), K = ye(l, k);
391
- if (Se(X, K)) {
392
- if (b.current = X, !V(v)) return;
390
+ const W = ae(v), J = ye(l, k);
391
+ if (xe(W, J)) {
392
+ if (b.current = W, !V(v)) return;
393
393
  v.preventDefault(), v.stopPropagation();
394
394
  return;
395
395
  }
@@ -419,17 +419,17 @@ var Ae = dt(null), Ct = pe(
419
419
  const A = b.current;
420
420
  if (!A) return;
421
421
  const R = ye(v, A);
422
- if (Se(ae(O), R)) {
422
+ if (xe(ae(O), R)) {
423
423
  if (!V(O)) return;
424
424
  O.preventDefault(), O.stopPropagation();
425
425
  }
426
426
  };
427
- return xe(
427
+ return Se(
428
428
  // Note: we may need to add pointer events here in the future.
429
- z("mouseenter", l, !0),
430
- z("mouseover", l, !0),
431
- z("mouseout", l, !0),
432
- z("mouseleave", l, !0)
429
+ L("mouseenter", l, !0),
430
+ L("mouseover", l, !0),
431
+ L("mouseout", l, !0),
432
+ L("mouseleave", l, !0)
433
433
  );
434
434
  }, [f, y, p, V]), T(() => {
435
435
  f && (_ || e == null || e.setAutoFocusOnShow(!1));
@@ -450,10 +450,10 @@ var Ae = dt(null), Ct = pe(
450
450
  }, [n, s, y, f]);
451
451
  const D = $e(
452
452
  (l) => {
453
- x((v) => [...v, l]);
453
+ S((v) => [...v, l]);
454
454
  const O = m == null ? void 0 : m(l);
455
455
  return () => {
456
- x(
456
+ S(
457
457
  (v) => v.filter((A) => A !== l)
458
458
  ), O == null || O();
459
459
  };
@@ -464,21 +464,21 @@ var Ae = dt(null), Ct = pe(
464
464
  i,
465
465
  (l) => /* @__PURE__ */ re(ht, { value: e, children: /* @__PURE__ */ re(Ae.Provider, { value: D, children: l }) }),
466
466
  [e, D]
467
- ), i = $(S({}, i), {
467
+ ), i = $(x({}, i), {
468
468
  ref: Te(g, i.ref)
469
- }), i = Mt(S({ store: e }, i));
470
- const J = e.useState(
469
+ }), i = Mt(x({ store: e }, i));
470
+ const Z = e.useState(
471
471
  (l) => n || l.autoFocusOnShow
472
472
  );
473
- return i = Ne($(S({
473
+ return i = Ne($(x({
474
474
  store: e,
475
475
  modal: n,
476
476
  portal: s,
477
- autoFocusOnShow: J
477
+ autoFocusOnShow: Z
478
478
  }, i), {
479
479
  portalRef: w,
480
480
  hideOnEscape(l) {
481
- return Je(u, l) ? !1 : (requestAnimationFrame(() => {
481
+ return Ze(u, l) ? !1 : (requestAnimationFrame(() => {
482
482
  requestAnimationFrame(() => {
483
483
  e == null || e.hide();
484
484
  });
@@ -486,7 +486,7 @@ var Ae = dt(null), Ct = pe(
486
486
  }
487
487
  })), i;
488
488
  }
489
- ), It = He(
489
+ ), Yt = He(
490
490
  me(function(r) {
491
491
  const o = Ct(r);
492
492
  return ve(Ht, o);
@@ -500,8 +500,8 @@ var Ae = dt(null), Ct = pe(
500
500
  e,
501
501
  process.env.NODE_ENV !== "production" && "HovercardAnchor must receive a `store` prop or be wrapped in a HovercardProvider component."
502
502
  );
503
- const c = Ze(s), a = W(0);
504
- T(() => () => window.clearTimeout(a.current), []), T(() => z("mouseleave", (f) => {
503
+ const c = Ke(s), a = I(0);
504
+ T(() => () => window.clearTimeout(a.current), []), T(() => L("mouseleave", (f) => {
505
505
  if (!e) return;
506
506
  const { anchorElement: E } = e.getState();
507
507
  E && f.target === E && (window.clearTimeout(a.current), a.current = 0);
@@ -516,8 +516,8 @@ var Ae = dt(null), Ct = pe(
516
516
  }));
517
517
  }, p = E ?? N;
518
518
  p === 0 ? C() : a.current = window.setTimeout(C, p);
519
- }), x = s.onClick, h = U((w) => {
520
- x == null || x(w), e && (window.clearTimeout(a.current), a.current = 0);
519
+ }), S = s.onClick, h = U((w) => {
520
+ S == null || S(w), e && (window.clearTimeout(a.current), a.current = 0);
521
521
  }), b = $e(
522
522
  (w) => {
523
523
  if (!e) return;
@@ -526,13 +526,13 @@ var Ae = dt(null), Ct = pe(
526
526
  },
527
527
  [e]
528
528
  );
529
- return s = $(S({}, s), {
529
+ return s = $(x({}, s), {
530
530
  ref: Te(b, s.ref),
531
531
  onMouseMove: P,
532
532
  onClick: h
533
533
  }), s = Qe(s), s;
534
534
  }
535
- ), Wt = me(function(r) {
535
+ ), It = me(function(r) {
536
536
  const o = Ft(r);
537
537
  return ve(Rt, o);
538
538
  });
@@ -553,11 +553,11 @@ function ke(t = {}) {
553
553
  ])
554
554
  );
555
555
  vt(e, n);
556
- const s = n == null ? void 0 : n.getState(), u = We(I(F({}, e), { store: n })), c = M(
556
+ const s = n == null ? void 0 : n.getState(), u = Ie(Y(F({}, e), { store: n })), c = M(
557
557
  e.placement,
558
558
  s == null ? void 0 : s.placement,
559
559
  "bottom"
560
- ), a = I(F({}, u.getState()), {
560
+ ), a = Y(F({}, u.getState()), {
561
561
  placement: c,
562
562
  currentPlacement: c,
563
563
  anchorElement: M(s == null ? void 0 : s.anchorElement, null),
@@ -565,55 +565,55 @@ function ke(t = {}) {
565
565
  arrowElement: M(s == null ? void 0 : s.arrowElement, null),
566
566
  rendered: Symbol("rendered")
567
567
  }), i = _e(a, u, n);
568
- return I(F(F({}, u), i), {
568
+ return Y(F(F({}, u), i), {
569
569
  setAnchorElement: (d) => i.setState("anchorElement", d),
570
570
  setPopoverElement: (d) => i.setState("popoverElement", d),
571
571
  setArrowElement: (d) => i.setState("arrowElement", d),
572
572
  render: () => i.setState("rendered", Symbol("rendered"))
573
573
  });
574
574
  }
575
- function je(t, r, o) {
576
- return tt(r, [o.popover]), oe(t, o, "placement"), Xe(t, r, o);
575
+ function Be(t, r, o) {
576
+ return tt(r, [o.popover]), oe(t, o, "placement"), We(t, r, o);
577
577
  }
578
- function Xt(t = {}) {
578
+ function Wt(t = {}) {
579
579
  const [r, o] = De(ke, t);
580
- return je(r, o, t);
580
+ return Be(r, o, t);
581
581
  }
582
582
  function Tt(t = {}) {
583
583
  var r;
584
- const o = (r = t.store) == null ? void 0 : r.getState(), e = ke(I(F({}, t), {
584
+ const o = (r = t.store) == null ? void 0 : r.getState(), e = ke(Y(F({}, t), {
585
585
  placement: M(
586
586
  t.placement,
587
587
  o == null ? void 0 : o.placement,
588
588
  "bottom"
589
589
  )
590
- })), n = M(t.timeout, o == null ? void 0 : o.timeout, 500), s = I(F({}, e.getState()), {
590
+ })), n = M(t.timeout, o == null ? void 0 : o.timeout, 500), s = Y(F({}, e.getState()), {
591
591
  timeout: n,
592
592
  showTimeout: M(t.showTimeout, o == null ? void 0 : o.showTimeout),
593
593
  hideTimeout: M(t.hideTimeout, o == null ? void 0 : o.hideTimeout),
594
594
  autoFocusOnShow: M(o == null ? void 0 : o.autoFocusOnShow, !1)
595
595
  }), u = _e(s, e, t.store);
596
- return I(F(F({}, e), u), {
596
+ return Y(F(F({}, e), u), {
597
597
  setAutoFocusOnShow: (c) => u.setState("autoFocusOnShow", c)
598
598
  });
599
599
  }
600
600
  function $t(t, r, o) {
601
- return oe(t, o, "timeout"), oe(t, o, "showTimeout"), oe(t, o, "hideTimeout"), je(t, r, o);
601
+ return oe(t, o, "timeout"), oe(t, o, "showTimeout"), oe(t, o, "hideTimeout"), Be(t, r, o);
602
602
  }
603
- function Yt(t = {}) {
603
+ function Xt(t = {}) {
604
604
  const [r, o] = De(Tt, t);
605
605
  return $t(r, o, t);
606
606
  }
607
607
  export {
608
608
  ht as H,
609
- zt as P,
610
- qt as a,
609
+ Lt as P,
610
+ zt as a,
611
611
  Ft as b,
612
612
  Tt as c,
613
613
  $t as d,
614
- Wt as e,
615
- It as f,
616
- Xt as g,
617
- Yt as h,
614
+ It as e,
615
+ Yt as f,
616
+ Wt as g,
617
+ Xt as h,
618
618
  Ct as u
619
619
  };