welcome-ui 8.3.0 → 8.5.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (105) hide show
  1. package/dist/{AXB53BZF-XKOjjeWO.mjs → AXB53BZF-BU4qmiUA.mjs} +3 -3
  2. package/dist/Accordion.mjs +4 -4
  3. package/dist/Alert.mjs +13 -13
  4. package/dist/AspectRatio.mjs +1 -1
  5. package/dist/Avatar.mjs +1 -1
  6. package/dist/BYC7LY2E-TZjhdRy3.mjs +619 -0
  7. package/dist/Badge.mjs +1 -1
  8. package/dist/Box.mjs +1 -1
  9. package/dist/Breadcrumb.mjs +2 -2
  10. package/dist/Button.mjs +3 -3
  11. package/dist/ButtonGroup.mjs +1 -1
  12. package/dist/Card.mjs +1 -1
  13. package/dist/Checkbox.mjs +2 -2
  14. package/dist/ClearButton.mjs +2 -2
  15. package/dist/CloseButton.mjs +2 -2
  16. package/dist/CustomPopper-DavRfSDP.mjs +7613 -0
  17. package/dist/DatePicker.mjs +2 -2
  18. package/dist/DateTimePicker.mjs +34541 -66
  19. package/dist/DateTimePickerCommon.mjs +1 -1
  20. package/dist/Drawer.mjs +58 -58
  21. package/dist/DropdownMenu.mjs +10 -10
  22. package/dist/Field.mjs +15 -15
  23. package/dist/FieldGroup.mjs +1 -1
  24. package/dist/FileDrop.mjs +3 -3
  25. package/dist/FileUpload.mjs +1 -1
  26. package/dist/Files.mjs +2 -2
  27. package/dist/Flex.mjs +1 -1
  28. package/dist/Grid.mjs +1 -1
  29. package/dist/Hint.mjs +1 -1
  30. package/dist/{ITI7HKP4-C89kOQb8.mjs → ITI7HKP4-DKM_MiJK.mjs} +4 -4
  31. package/dist/Icon.mjs +1 -1
  32. package/dist/Icons.mjs +12 -12
  33. package/dist/IconsFont.mjs +1 -1
  34. package/dist/InputText.mjs +10 -10
  35. package/dist/{JC64G2H7-afsomHuH.mjs → JC64G2H7-ifBZq_RU.mjs} +5 -5
  36. package/dist/{KUU7WJ55-CzsjuIMv.mjs → KUU7WJ55-ClLMNDee.mjs} +1 -1
  37. package/dist/{LVA2YJMS-C-kJ1lkr.mjs → LVA2YJMS-B8X1PCyC.mjs} +18 -18
  38. package/dist/Label.mjs +3 -3
  39. package/dist/Link.mjs +2 -2
  40. package/dist/Loader.mjs +1 -1
  41. package/dist/Logo.mjs +1 -1
  42. package/dist/{MTZPJQMC-TybFZCho.mjs → MTZPJQMC-DdjKPI9r.mjs} +2 -2
  43. package/dist/Modal.mjs +18 -18
  44. package/dist/{NLEBE274-oSxMftGy.mjs → NLEBE274-CnAMhwcR.mjs} +3 -3
  45. package/dist/{P2CTZE2T-DOT1mNnX.mjs → P2CTZE2T-1n7Xlf8m.mjs} +4 -4
  46. package/dist/{P4IRICAX-CWSZLTGz.mjs → P4IRICAX-Dg8AjwYu.mjs} +3 -3
  47. package/dist/Pagination.mjs +4 -4
  48. package/dist/PasswordInput.mjs +2 -2
  49. package/dist/Picker.mjs +3 -3
  50. package/dist/Popover.mjs +4 -4
  51. package/dist/{QYJ6MIDR-DJ-vUdAM.mjs → QYJ6MIDR-CpwIyzxN.mjs} +4 -4
  52. package/dist/Radio.mjs +2 -2
  53. package/dist/RadioGroup.mjs +2 -2
  54. package/dist/RadioTab.mjs +2 -2
  55. package/dist/{SYRFVSLH-B6m278Vb.mjs → SYRFVSLH-DPBHrVeS.mjs} +4 -4
  56. package/dist/Search.mjs +12 -12
  57. package/dist/Select.mjs +21 -21
  58. package/dist/Shape.mjs +1 -1
  59. package/dist/Slider.mjs +1 -1
  60. package/dist/Stack.mjs +1 -1
  61. package/dist/Swiper.mjs +1 -1
  62. package/dist/Table.mjs +1 -1
  63. package/dist/Tabs.mjs +8 -8
  64. package/dist/Tag.mjs +3 -3
  65. package/dist/Text.mjs +1 -1
  66. package/dist/Textarea.mjs +1 -1
  67. package/dist/TimePicker.mjs +2 -2
  68. package/dist/Toast.mjs +2 -2
  69. package/dist/Toggle.mjs +2 -2
  70. package/dist/Tooltip.mjs +11 -11
  71. package/dist/UniversalLink.mjs +1 -1
  72. package/dist/{VEVQD5MH-0w9Y7Ytc.mjs → VEVQD5MH-BSxDdMFG.mjs} +3 -3
  73. package/dist/{VGCJ63VH-C0UPBY-5.mjs → VGCJ63VH-C4H4_vtu.mjs} +4 -4
  74. package/dist/VariantIcon.mjs +2 -2
  75. package/dist/WelcomeLoader.mjs +1 -1
  76. package/dist/WuiProvider.mjs +328 -322
  77. package/dist/{X5NMLKT6-BJw3xE-K.mjs → X5NMLKT6-Ctro4-UX.mjs} +2 -2
  78. package/dist/{YV4JVR4I-DPC8mMuG.mjs → YV4JVR4I-BLeUul5N.mjs} +1 -1
  79. package/dist/{downshift.esm-B7Jil1wW.mjs → downshift.esm-DT64V-tc.mjs} +1 -3
  80. package/dist/floating-ui.dom.browser.min-Bza9K_UR.mjs +471 -0
  81. package/dist/{hide-focus-rings-root-CCXdysih.mjs → hide-focus-rings-root-Dcm160m2.mjs} +1 -1
  82. package/dist/{index-QaLwIvZS.mjs → index-6dgzrvpZ.mjs} +1 -1
  83. package/dist/{index-C_k-m0Rl.mjs → index-A1En5GST.mjs} +1 -1
  84. package/dist/{index-D8v_VJ9z.mjs → index-B-Yc2RN_.mjs} +1 -1
  85. package/dist/{index-DAZ1SYdj.mjs → index-B80lXHoK.mjs} +1 -1
  86. package/dist/{index-SQQQ4dEE.mjs → index-CuuMTEio.mjs} +1 -1
  87. package/dist/{index-DvzWKxKE.mjs → index-CwnxYrRd.mjs} +1 -1
  88. package/dist/{index-62h-enZF.mjs → index-D10ydFFH.mjs} +4 -4
  89. package/dist/{index-i_anpNhw.mjs → index-DKL-SItG.mjs} +1 -1
  90. package/dist/{index-CBBbX29m.mjs → index-Dct42YPA.mjs} +1 -1
  91. package/dist/{index-wl3X6EM1.mjs → index-DfD5GTDk.mjs} +1 -1
  92. package/dist/{index-CYmF7qCH.mjs → index-DtWZjMb5.mjs} +1 -1
  93. package/dist/{index-BaLGEKs7.mjs → index-KxL21VJb.mjs} +1 -1
  94. package/dist/{index-DpkNUfAS.mjs → index-eYXK9_x4.mjs} +1 -1
  95. package/dist/{jsx-runtime-B7I4PJ0H.mjs → jsx-runtime-Bqq1Hxg9.mjs} +16 -16
  96. package/dist/{radio-group-C0fUHvam.mjs → radio-group-C2Cv9SMd.mjs} +5 -5
  97. package/dist/types/components/DatePicker/index.d.ts +1 -1
  98. package/dist/types/components/DateTimePicker/index.d.ts +4 -1
  99. package/dist/types/components/DateTimePicker/utils.d.ts +3 -0
  100. package/dist/types/components/DateTimePickerCommon/styles.d.ts +1 -1
  101. package/dist/types/components/TimePicker/index.d.ts +1 -1
  102. package/dist/{wrap-children-CzmhoRzd.mjs → wrap-children-CRHMWYug.mjs} +3 -3
  103. package/package.json +3 -3
  104. package/dist/BYC7LY2E-CWSI38FM.mjs +0 -1078
  105. package/dist/CustomPopper-DezjKb9n.mjs +0 -7971
@@ -0,0 +1,619 @@
1
+ "use client";
2
+ import { a as Ye, b as qe, d as Ie, c as He } from "./JC64G2H7-ifBZq_RU.mjs";
3
+ import { m as We, o as Ue, t as Ge, c as Me, b as oe, a as Ce, d as Je } from "./YV4JVR4I-BLeUul5N.mjs";
4
+ import { z as Ze, A as Y, C as F, B as M, G as Ke, c as pe, _ as ne, i as se, a5 as Re, b as U, E as ce, D as le, d as $, g as S, f as me, h as ve, t as Qe, a6 as Fe, u as de, P as Ee, a7 as X, a4 as et, e as Te, X as tt, Y as fe, a8 as ot, l as rt, m as nt } from "./LVA2YJMS-B8X1PCyC.mjs";
5
+ import { u as $e, P as _e, a as st } from "./MTZPJQMC-DdjKPI9r.mjs";
6
+ import { B as it, N as ut, L as at, A as ct, O as lt, g as dt, C as ft, a as pt } from "./floating-ui.dom.browser.min-Bza9K_UR.mjs";
7
+ import { useRef as q, useState as he, useEffect as T, useContext as mt, createContext as vt, useCallback as De } from "react";
8
+ import { j as re } from "./jsx-runtime-Bqq1Hxg9.mjs";
9
+ function Ne(t = {}) {
10
+ var r = t, {
11
+ popover: o
12
+ } = r, e = Ze(r, [
13
+ "popover"
14
+ ]);
15
+ const n = We(
16
+ e.store,
17
+ Ue(o, [
18
+ "arrowElement",
19
+ "anchorElement",
20
+ "contentElement",
21
+ "popoverElement",
22
+ "disclosureElement"
23
+ ])
24
+ );
25
+ Ge(e, n);
26
+ const s = n == null ? void 0 : n.getState(), u = Ye(Y(F({}, e), { store: n })), c = M(
27
+ e.placement,
28
+ s == null ? void 0 : s.placement,
29
+ "bottom"
30
+ ), a = Y(F({}, u.getState()), {
31
+ placement: c,
32
+ currentPlacement: c,
33
+ anchorElement: M(s == null ? void 0 : s.anchorElement, null),
34
+ popoverElement: M(s == null ? void 0 : s.popoverElement, null),
35
+ arrowElement: M(s == null ? void 0 : s.arrowElement, null),
36
+ rendered: Symbol("rendered")
37
+ }), i = Me(a, u, n);
38
+ return Y(F(F({}, u), i), {
39
+ setAnchorElement: (d) => i.setState("anchorElement", d),
40
+ setPopoverElement: (d) => i.setState("popoverElement", d),
41
+ setArrowElement: (d) => i.setState("arrowElement", d),
42
+ render: () => i.setState("rendered", Symbol("rendered"))
43
+ });
44
+ }
45
+ function je(t, r, o) {
46
+ return Ke(r, [o.popover]), oe(t, o, "placement"), qe(t, r, o);
47
+ }
48
+ function Lt(t = {}) {
49
+ const [r, o] = Ce(Ne, t);
50
+ return je(r, o, t);
51
+ }
52
+ var ht = "div";
53
+ function Se(t = 0, r = 0, o = 0, e = 0) {
54
+ if (typeof DOMRect == "function")
55
+ return new DOMRect(t, r, o, e);
56
+ const n = {
57
+ x: t,
58
+ y: r,
59
+ width: o,
60
+ height: e,
61
+ top: r,
62
+ right: t + o,
63
+ bottom: r + e,
64
+ left: t
65
+ };
66
+ return $(S({}, n), { toJSON: () => n });
67
+ }
68
+ function Pt(t) {
69
+ if (!t) return Se();
70
+ const { x: r, y: o, width: e, height: n } = t;
71
+ return Se(r, o, e, n);
72
+ }
73
+ function gt(t, r) {
74
+ return {
75
+ contextElement: t || void 0,
76
+ getBoundingClientRect: () => {
77
+ const e = t, n = r == null ? void 0 : r(e);
78
+ return n || !e ? Pt(n) : e.getBoundingClientRect();
79
+ }
80
+ };
81
+ }
82
+ function wt(t) {
83
+ return /^(?:top|bottom|left|right)(?:-(?:start|end))?$/.test(t);
84
+ }
85
+ function ye(t) {
86
+ const r = window.devicePixelRatio || 1;
87
+ return Math.round(t * r) / r;
88
+ }
89
+ function xt(t, r) {
90
+ return at(({ placement: o }) => {
91
+ var e;
92
+ const n = ((t == null ? void 0 : t.clientHeight) || 0) / 2, s = typeof r.gutter == "number" ? r.gutter + n : (e = r.gutter) != null ? e : n;
93
+ return {
94
+ crossAxis: !!o.split("-")[1] ? void 0 : r.shift,
95
+ mainAxis: s,
96
+ alignmentAxis: r.shift
97
+ };
98
+ });
99
+ }
100
+ function Et(t) {
101
+ if (t.flip === !1) return;
102
+ const r = typeof t.flip == "string" ? t.flip.split(" ") : void 0;
103
+ return se(
104
+ !r || r.every(wt),
105
+ process.env.NODE_ENV !== "production" && "`flip` expects a spaced-delimited list of placements"
106
+ ), ct({
107
+ padding: t.overflowPadding,
108
+ fallbackPlacements: r
109
+ });
110
+ }
111
+ function St(t) {
112
+ if (!(!t.slide && !t.overlap))
113
+ return lt({
114
+ mainAxis: t.slide,
115
+ crossAxis: t.overlap,
116
+ padding: t.overflowPadding,
117
+ limiter: pt()
118
+ });
119
+ }
120
+ function yt(t) {
121
+ return ft({
122
+ padding: t.overflowPadding,
123
+ apply({ elements: r, availableWidth: o, availableHeight: e, rects: n }) {
124
+ const s = r.floating, u = Math.round(n.reference.width);
125
+ o = Math.floor(o), e = Math.floor(e), s.style.setProperty(
126
+ "--popover-anchor-width",
127
+ `${u}px`
128
+ ), s.style.setProperty(
129
+ "--popover-available-width",
130
+ `${o}px`
131
+ ), s.style.setProperty(
132
+ "--popover-available-height",
133
+ `${e}px`
134
+ ), t.sameWidth && (s.style.width = `${u}px`), t.fitViewport && (s.style.maxWidth = `${o}px`, s.style.maxHeight = `${e}px`);
135
+ }
136
+ });
137
+ }
138
+ function Ot(t, r) {
139
+ if (t)
140
+ return dt({
141
+ element: t,
142
+ padding: r.arrowPadding
143
+ });
144
+ }
145
+ var Ve = pe(
146
+ function(r) {
147
+ var o = r, {
148
+ store: e,
149
+ modal: n = !1,
150
+ portal: s = !!n,
151
+ preserveTabOrder: u = !0,
152
+ autoFocusOnShow: c = !0,
153
+ wrapperProps: a,
154
+ fixed: i = !1,
155
+ flip: d = !0,
156
+ shift: g = 0,
157
+ slide: P = !0,
158
+ overlap: E = !1,
159
+ sameWidth: h = !1,
160
+ fitViewport: b = !1,
161
+ gutter: w,
162
+ arrowPadding: f = 4,
163
+ overflowPadding: x = 8,
164
+ getAnchorRect: N,
165
+ updatePosition: C
166
+ } = o, p = ne(o, [
167
+ "store",
168
+ "modal",
169
+ "portal",
170
+ "preserveTabOrder",
171
+ "autoFocusOnShow",
172
+ "wrapperProps",
173
+ "fixed",
174
+ "flip",
175
+ "shift",
176
+ "slide",
177
+ "overlap",
178
+ "sameWidth",
179
+ "fitViewport",
180
+ "gutter",
181
+ "arrowPadding",
182
+ "overflowPadding",
183
+ "getAnchorRect",
184
+ "updatePosition"
185
+ ]);
186
+ const j = $e();
187
+ e = e || j, se(
188
+ e,
189
+ process.env.NODE_ENV !== "production" && "Popover must receive a `store` prop or be wrapped in a PopoverProvider component."
190
+ );
191
+ 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 = q(null), [A, R] = he(!1), { portalRef: ue, domReady: V } = Re(s, p.portalRef), B = U(N), k = U(C), I = !!C;
192
+ ce(() => {
193
+ if (!(m != null && m.isConnected)) return;
194
+ m.style.setProperty(
195
+ "--popover-overflow-padding",
196
+ `${x}px`
197
+ );
198
+ const H = gt(y, B), W = async () => {
199
+ if (!l) return;
200
+ _ || (v.current = v.current || document.createElement("div"));
201
+ const z = _ || v.current, ze = [
202
+ xt(z, { gutter: w, shift: g }),
203
+ Et({ flip: d, overflowPadding: x }),
204
+ St({ slide: P, overlap: E, overflowPadding: x }),
205
+ Ot(z, { arrowPadding: f }),
206
+ yt({
207
+ sameWidth: h,
208
+ fitViewport: b,
209
+ overflowPadding: x
210
+ })
211
+ ], L = await ut(H, m, {
212
+ placement: J,
213
+ strategy: i ? "fixed" : "absolute",
214
+ middleware: ze
215
+ });
216
+ e == null || e.setState("currentPlacement", L.placement), R(!0);
217
+ const Le = ye(L.x), Xe = ye(L.y);
218
+ if (Object.assign(m.style, {
219
+ top: "0",
220
+ left: "0",
221
+ transform: `translate3d(${Le}px,${Xe}px,0)`
222
+ }), z && L.middlewareData.arrow) {
223
+ const { x: K, y: Q } = L.middlewareData.arrow, ge = L.placement.split("-")[0], ee = z.clientWidth / 2, te = z.clientHeight / 2, we = K != null ? K + ee : -ee, xe = Q != null ? Q + te : -te;
224
+ m.style.setProperty(
225
+ "--popover-transform-origin",
226
+ {
227
+ top: `${we}px calc(100% + ${te}px)`,
228
+ bottom: `${we}px ${-te}px`,
229
+ left: `calc(100% + ${ee}px) ${xe}px`,
230
+ right: `${-ee}px ${xe}px`
231
+ }[ge]
232
+ ), Object.assign(z.style, {
233
+ left: K != null ? `${K}px` : "",
234
+ top: Q != null ? `${Q}px` : "",
235
+ [ge]: "100%"
236
+ });
237
+ }
238
+ }, ke = it(H, m, async () => {
239
+ I ? (await k({ updatePosition: W }), R(!0)) : await W();
240
+ }, {
241
+ // JSDOM doesn't support ResizeObserver
242
+ elementResize: typeof ResizeObserver == "function"
243
+ });
244
+ return () => {
245
+ R(!1), ke();
246
+ };
247
+ }, [
248
+ e,
249
+ O,
250
+ m,
251
+ _,
252
+ y,
253
+ m,
254
+ J,
255
+ l,
256
+ V,
257
+ i,
258
+ d,
259
+ g,
260
+ P,
261
+ E,
262
+ h,
263
+ b,
264
+ w,
265
+ f,
266
+ x,
267
+ B,
268
+ I,
269
+ k
270
+ ]), ce(() => {
271
+ if (!l || !V || !(m != null && m.isConnected) || !(D != null && D.isConnected)) return;
272
+ const H = () => {
273
+ m.style.zIndex = getComputedStyle(D).zIndex;
274
+ };
275
+ H();
276
+ let W = requestAnimationFrame(() => {
277
+ W = requestAnimationFrame(H);
278
+ });
279
+ return () => cancelAnimationFrame(W);
280
+ }, [l, V, m, D]);
281
+ const Z = i ? "fixed" : "absolute";
282
+ return p = le(
283
+ p,
284
+ (H) => /* @__PURE__ */ re.jsx(
285
+ "div",
286
+ $(S({}, a), {
287
+ style: S({
288
+ // https://floating-ui.com/docs/computeposition#initial-layout
289
+ position: Z,
290
+ top: 0,
291
+ left: 0,
292
+ width: "max-content"
293
+ }, a == null ? void 0 : a.style),
294
+ ref: e == null ? void 0 : e.setPopoverElement,
295
+ children: H
296
+ })
297
+ ),
298
+ [e, Z, a]
299
+ ), p = le(
300
+ p,
301
+ (H) => /* @__PURE__ */ re.jsx(_e, { value: e, children: H }),
302
+ [e]
303
+ ), p = $(S({
304
+ // data-placing is not part of the public API. We're setting this here so
305
+ // we can wait for the popover to be positioned before other components
306
+ // move focus into it. For example, this attribute is observed by the
307
+ // Combobox component with the autoSelect behavior.
308
+ "data-placing": !A || void 0
309
+ }, p), {
310
+ style: S({
311
+ position: "relative"
312
+ }, p.style)
313
+ }), p = Ie($(S({
314
+ store: e,
315
+ modal: n,
316
+ portal: s,
317
+ preserveTabOrder: u,
318
+ preserveTabOrderAnchor: ie || y,
319
+ autoFocusOnShow: A && c
320
+ }, p), {
321
+ portalRef: ue
322
+ })), p;
323
+ }
324
+ ), Xt = He(
325
+ me(function(r) {
326
+ const o = Ve(r);
327
+ return ve(ht, o);
328
+ }),
329
+ $e
330
+ ), G = Qe(
331
+ [st],
332
+ [_e]
333
+ );
334
+ G.useContext;
335
+ G.useScopedContext;
336
+ var Pe = G.useProviderContext, Yt = G.ContextProvider, bt = G.ScopedContextProvider;
337
+ function At(t = {}) {
338
+ var r;
339
+ const o = (r = t.store) == null ? void 0 : r.getState(), e = Ne(Y(F({}, t), {
340
+ placement: M(
341
+ t.placement,
342
+ o == null ? void 0 : o.placement,
343
+ "bottom"
344
+ )
345
+ })), n = M(t.timeout, o == null ? void 0 : o.timeout, 500), s = Y(F({}, e.getState()), {
346
+ timeout: n,
347
+ showTimeout: M(t.showTimeout, o == null ? void 0 : o.showTimeout),
348
+ hideTimeout: M(t.hideTimeout, o == null ? void 0 : o.hideTimeout),
349
+ autoFocusOnShow: M(o == null ? void 0 : o.autoFocusOnShow, !1)
350
+ }), u = Me(s, e, t.store);
351
+ return Y(F(F({}, e), u), {
352
+ setAutoFocusOnShow: (c) => u.setState("autoFocusOnShow", c)
353
+ });
354
+ }
355
+ function Ht(t, r, o) {
356
+ return oe(t, o, "timeout"), oe(t, o, "showTimeout"), oe(t, o, "hideTimeout"), je(t, r, o);
357
+ }
358
+ function qt(t = {}) {
359
+ const [r, o] = Ce(At, t);
360
+ return Ht(r, o, t);
361
+ }
362
+ function ae(t) {
363
+ return [t.clientX, t.clientY];
364
+ }
365
+ function Oe(t, r) {
366
+ const [o, e] = t;
367
+ let n = !1;
368
+ const s = r.length;
369
+ for (let u = s, c = 0, a = u - 1; c < u; a = c++) {
370
+ const [i, d] = r[c], [g, P] = r[a], [, E] = r[a === 0 ? u - 1 : a - 1] || [0, 0], h = (d - P) * (o - i) - (i - g) * (e - d);
371
+ if (P < d) {
372
+ if (e >= P && e < d) {
373
+ if (h === 0) return !0;
374
+ h > 0 && (e === P ? e > E && (n = !n) : n = !n);
375
+ }
376
+ } else if (d < P) {
377
+ if (e > d && e <= P) {
378
+ if (h === 0) return !0;
379
+ h < 0 && (e === P ? e < E && (n = !n) : n = !n);
380
+ }
381
+ } else if (e === d && (o >= g && o <= i || o >= i && o <= g))
382
+ return !0;
383
+ }
384
+ return n;
385
+ }
386
+ function Mt(t, r) {
387
+ const { top: o, right: e, bottom: n, left: s } = r, [u, c] = t, a = u < s ? "left" : u > e ? "right" : null, i = c < o ? "top" : c > n ? "bottom" : null;
388
+ return [a, i];
389
+ }
390
+ function be(t, r) {
391
+ const o = t.getBoundingClientRect(), { top: e, right: n, bottom: s, left: u } = o, [c, a] = Mt(r, o), i = [r];
392
+ return c ? (a !== "top" && i.push([c === "left" ? u : n, e]), i.push([c === "left" ? n : u, e]), i.push([c === "left" ? n : u, s]), a !== "bottom" && i.push([c === "left" ? u : n, s])) : a === "top" ? (i.push([u, e]), i.push([u, s]), i.push([n, s]), i.push([n, e])) : (i.push([u, s]), i.push([u, e]), i.push([n, e]), i.push([n, s])), i;
393
+ }
394
+ var Ct = "div";
395
+ function Be(t, r, o, e) {
396
+ return ot(r) ? !0 : t ? !!(fe(r, t) || o && fe(o, t) || e != null && e.some((n) => Be(t, n, o))) : !1;
397
+ }
398
+ function Rt(t) {
399
+ var r = t, {
400
+ store: o
401
+ } = r, e = ne(r, [
402
+ "store"
403
+ ]);
404
+ const [n, s] = he(!1), u = o.useState("mounted");
405
+ T(() => {
406
+ u || s(!1);
407
+ }, [u]);
408
+ const c = e.onFocus, a = U((d) => {
409
+ c == null || c(d), !d.defaultPrevented && s(!0);
410
+ }), i = q(null);
411
+ return T(() => Je(o, ["anchorElement"], (d) => {
412
+ i.current = d.anchorElement;
413
+ }), []), e = $(S({
414
+ autoFocusOnHide: n,
415
+ finalFocus: i
416
+ }, e), {
417
+ onFocus: a
418
+ }), e;
419
+ }
420
+ var Ae = vt(null), Ft = pe(
421
+ function(r) {
422
+ var o = r, {
423
+ store: e,
424
+ modal: n = !1,
425
+ portal: s = !!n,
426
+ hideOnEscape: u = !0,
427
+ hideOnHoverOutside: c = !0,
428
+ disablePointerEventsOnApproach: a = !!c
429
+ } = o, i = ne(o, [
430
+ "store",
431
+ "modal",
432
+ "portal",
433
+ "hideOnEscape",
434
+ "hideOnHoverOutside",
435
+ "disablePointerEventsOnApproach"
436
+ ]);
437
+ const d = Pe();
438
+ e = e || d, se(
439
+ e,
440
+ process.env.NODE_ENV !== "production" && "Hovercard must receive a `store` prop or be wrapped in a HovercardProvider component."
441
+ );
442
+ const g = q(null), [P, E] = he([]), h = q(0), b = q(null), { portalRef: w, domReady: f } = Re(s, i.portalRef), x = Fe(), N = !!c, C = de(c), p = !!a, j = de(
443
+ a
444
+ ), _ = e.useState("open"), y = e.useState("mounted");
445
+ T(() => {
446
+ if (!f || !y || !N && !p) return;
447
+ const l = g.current;
448
+ return l ? Ee(
449
+ X("mousemove", (v) => {
450
+ if (!e || !x()) return;
451
+ const { anchorElement: A, hideTimeout: R, timeout: ue } = e.getState(), V = b.current, [B] = v.composedPath(), k = A;
452
+ if (Be(B, l, k, P)) {
453
+ b.current = B && k && fe(k, B) ? ae(v) : null, window.clearTimeout(h.current), h.current = 0;
454
+ return;
455
+ }
456
+ if (!h.current) {
457
+ if (V) {
458
+ const I = ae(v), Z = be(l, V);
459
+ if (Oe(I, Z)) {
460
+ if (b.current = I, !j(v)) return;
461
+ v.preventDefault(), v.stopPropagation();
462
+ return;
463
+ }
464
+ }
465
+ C(v) && (h.current = window.setTimeout(() => {
466
+ h.current = 0, e == null || e.hide();
467
+ }, R ?? ue));
468
+ }
469
+ }, !0),
470
+ () => clearTimeout(h.current)
471
+ ) : void 0;
472
+ }, [
473
+ e,
474
+ x,
475
+ f,
476
+ y,
477
+ N,
478
+ p,
479
+ P,
480
+ j,
481
+ C
482
+ ]), T(() => {
483
+ if (!f || !y || !p) return;
484
+ const l = (O) => {
485
+ const v = g.current;
486
+ if (!v) return;
487
+ const A = b.current;
488
+ if (!A) return;
489
+ const R = be(v, A);
490
+ if (Oe(ae(O), R)) {
491
+ if (!j(O)) return;
492
+ O.preventDefault(), O.stopPropagation();
493
+ }
494
+ };
495
+ return Ee(
496
+ // Note: we may need to add pointer events here in the future.
497
+ X("mouseenter", l, !0),
498
+ X("mouseover", l, !0),
499
+ X("mouseout", l, !0),
500
+ X("mouseleave", l, !0)
501
+ );
502
+ }, [f, y, p, j]), T(() => {
503
+ f && (_ || e == null || e.setAutoFocusOnShow(!1));
504
+ }, [e, f, _]);
505
+ const ie = et(_);
506
+ T(() => {
507
+ if (f)
508
+ return () => {
509
+ ie.current || e == null || e.setAutoFocusOnShow(!1);
510
+ };
511
+ }, [e, f]);
512
+ const m = mt(Ae);
513
+ ce(() => {
514
+ if (n || !s || !y || !f) return;
515
+ const l = g.current;
516
+ if (l)
517
+ return m == null ? void 0 : m(l);
518
+ }, [n, s, y, f]);
519
+ const D = De(
520
+ (l) => {
521
+ E((v) => [...v, l]);
522
+ const O = m == null ? void 0 : m(l);
523
+ return () => {
524
+ E(
525
+ (v) => v.filter((A) => A !== l)
526
+ ), O == null || O();
527
+ };
528
+ },
529
+ [m]
530
+ );
531
+ i = le(
532
+ i,
533
+ (l) => /* @__PURE__ */ re.jsx(bt, { value: e, children: /* @__PURE__ */ re.jsx(Ae.Provider, { value: D, children: l }) }),
534
+ [e, D]
535
+ ), i = $(S({}, i), {
536
+ ref: Te(g, i.ref)
537
+ }), i = Rt(S({ store: e }, i));
538
+ const J = e.useState(
539
+ (l) => n || l.autoFocusOnShow
540
+ );
541
+ return i = Ve($(S({
542
+ store: e,
543
+ modal: n,
544
+ portal: s,
545
+ autoFocusOnShow: J
546
+ }, i), {
547
+ portalRef: w,
548
+ hideOnEscape(l) {
549
+ return tt(u, l) ? !1 : (requestAnimationFrame(() => {
550
+ requestAnimationFrame(() => {
551
+ e == null || e.hide();
552
+ });
553
+ }), !0);
554
+ }
555
+ })), i;
556
+ }
557
+ ), It = He(
558
+ me(function(r) {
559
+ const o = Ft(r);
560
+ return ve(Ct, o);
561
+ }),
562
+ Pe
563
+ ), Tt = "a", $t = pe(
564
+ function(r) {
565
+ var o = r, { store: e, showOnHover: n = !0 } = o, s = ne(o, ["store", "showOnHover"]);
566
+ const u = Pe();
567
+ e = e || u, se(
568
+ e,
569
+ process.env.NODE_ENV !== "production" && "HovercardAnchor must receive a `store` prop or be wrapped in a HovercardProvider component."
570
+ );
571
+ const c = rt(s), a = q(0);
572
+ T(() => () => window.clearTimeout(a.current), []), T(() => X("mouseleave", (f) => {
573
+ if (!e) return;
574
+ const { anchorElement: x } = e.getState();
575
+ x && f.target === x && (window.clearTimeout(a.current), a.current = 0);
576
+ }, !0), [e]);
577
+ const i = s.onMouseMove, d = de(n), g = Fe(), P = U((w) => {
578
+ if (i == null || i(w), c || !e || w.defaultPrevented || a.current || !g() || !d(w)) return;
579
+ const f = w.currentTarget;
580
+ e.setAnchorElement(f), e.setDisclosureElement(f);
581
+ const { showTimeout: x, timeout: N } = e.getState(), C = () => {
582
+ a.current = 0, g() && (e == null || e.setAnchorElement(f), e == null || e.show(), queueMicrotask(() => {
583
+ e == null || e.setDisclosureElement(f);
584
+ }));
585
+ }, p = x ?? N;
586
+ p === 0 ? C() : a.current = window.setTimeout(C, p);
587
+ }), E = s.onClick, h = U((w) => {
588
+ E == null || E(w), e && (window.clearTimeout(a.current), a.current = 0);
589
+ }), b = De(
590
+ (w) => {
591
+ if (!e) return;
592
+ const { anchorElement: f } = e.getState();
593
+ f != null && f.isConnected || e.setAnchorElement(w);
594
+ },
595
+ [e]
596
+ );
597
+ return s = $(S({}, s), {
598
+ ref: Te(b, s.ref),
599
+ onMouseMove: P,
600
+ onClick: h
601
+ }), s = nt(s), s;
602
+ }
603
+ ), Wt = me(function(r) {
604
+ const o = $t(r);
605
+ return ve(Tt, o);
606
+ });
607
+ export {
608
+ Wt as H,
609
+ Xt as P,
610
+ It as a,
611
+ qt as b,
612
+ At as c,
613
+ Ht as d,
614
+ bt as e,
615
+ Yt as f,
616
+ Ft as g,
617
+ $t as h,
618
+ Lt as u
619
+ };
package/dist/Badge.mjs CHANGED
@@ -1,5 +1,5 @@
1
1
  "use client";
2
- import { j as f } from "./jsx-runtime-B7I4PJ0H.mjs";
2
+ import { j as f } from "./jsx-runtime-Bqq1Hxg9.mjs";
3
3
  import { forwardRef as b } from "./System.mjs";
4
4
  import u, { th as t, css as n } from "@xstyled/styled-components";
5
5
  const x = u.divBox(
package/dist/Box.mjs CHANGED
@@ -1,5 +1,5 @@
1
1
  "use client";
2
- import { j as t } from "./jsx-runtime-B7I4PJ0H.mjs";
2
+ import { j as t } from "./jsx-runtime-Bqq1Hxg9.mjs";
3
3
  import { x as m } from "@xstyled/styled-components";
4
4
  import { forwardRef as e } from "./System.mjs";
5
5
  const f = e((r, o) => /* @__PURE__ */ t.jsx(m.div, { ref: o, ...r }));
@@ -1,8 +1,8 @@
1
1
  "use client";
2
- import { j as b } from "./jsx-runtime-B7I4PJ0H.mjs";
2
+ import { j as b } from "./jsx-runtime-Bqq1Hxg9.mjs";
3
3
  import { useRef as P, useState as X, Children as ge, cloneElement as me, useCallback as j, useMemo as xe, useEffect as q } from "react";
4
4
  import "./Icon.mjs";
5
- import { R as we } from "./index-CYmF7qCH.mjs";
5
+ import { R as we } from "./index-DtWZjMb5.mjs";
6
6
  import { forwardRef as ne } from "./System.mjs";
7
7
  import { t as ze } from "./throttle-BDBzFeFj.mjs";
8
8
  import { Box as Oe } from "./Box.mjs";
package/dist/Button.mjs CHANGED
@@ -1,11 +1,11 @@
1
1
  "use client";
2
- import { j as r } from "./jsx-runtime-B7I4PJ0H.mjs";
2
+ import { j as r } from "./jsx-runtime-Bqq1Hxg9.mjs";
3
3
  import { Box as l } from "./Box.mjs";
4
4
  import { Loader as f } from "./Loader.mjs";
5
5
  import { shouldForwardProp as p, forwardRef as y } from "./System.mjs";
6
- import { B as w } from "./X5NMLKT6-BJw3xE-K.mjs";
6
+ import { B as w } from "./X5NMLKT6-Ctro4-UX.mjs";
7
7
  import x, { th as t, system as g, css as n } from "@xstyled/styled-components";
8
- import { h as j } from "./hide-focus-rings-root-CCXdysih.mjs";
8
+ import { h as j } from "./hide-focus-rings-root-Dcm160m2.mjs";
9
9
  const B = (s, i = "square") => n`
10
10
  width: ${t(`buttons.sizes.${s}.height`)};
11
11
  padding: 0;
@@ -1,5 +1,5 @@
1
1
  "use client";
2
- import { j as l } from "./jsx-runtime-B7I4PJ0H.mjs";
2
+ import { j as l } from "./jsx-runtime-Bqq1Hxg9.mjs";
3
3
  import { Children as d, cloneElement as m } from "react";
4
4
  import { forwardRef as u } from "./System.mjs";
5
5
  import f from "@xstyled/styled-components";
package/dist/Card.mjs CHANGED
@@ -1,5 +1,5 @@
1
1
  "use client";
2
- import { j as d } from "./jsx-runtime-B7I4PJ0H.mjs";
2
+ import { j as d } from "./jsx-runtime-Bqq1Hxg9.mjs";
3
3
  import { forwardRef as n } from "./System.mjs";
4
4
  import e, { th as t } from "@xstyled/styled-components";
5
5
  import { Shape as i } from "./Shape.mjs";
package/dist/Checkbox.mjs CHANGED
@@ -1,6 +1,6 @@
1
- import "./jsx-runtime-B7I4PJ0H.mjs";
1
+ import "./jsx-runtime-Bqq1Hxg9.mjs";
2
2
  import "./System.mjs";
3
- import { a as t } from "./index-62h-enZF.mjs";
3
+ import { a as t } from "./index-D10ydFFH.mjs";
4
4
  export {
5
5
  t as Checkbox
6
6
  };
@@ -1,7 +1,7 @@
1
1
  "use client";
2
- import { j as t } from "./jsx-runtime-B7I4PJ0H.mjs";
2
+ import { j as t } from "./jsx-runtime-Bqq1Hxg9.mjs";
3
3
  import "./Icon.mjs";
4
- import { C as i } from "./index-BaLGEKs7.mjs";
4
+ import { C as i } from "./index-KxL21VJb.mjs";
5
5
  import { forwardRef as n } from "./System.mjs";
6
6
  import a, { keyframes as m, css as c, th as p } from "@xstyled/styled-components";
7
7
  import { Button as f } from "./Button.mjs";