fina-react-ds 1.0.22 → 1.0.24

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 (108) hide show
  1. package/dist/components/alert-dialog.d.ts +1 -1
  2. package/dist/components/alert-dialog.js +65 -59
  3. package/dist/components/avatar.d.ts +1 -1
  4. package/dist/components/avatar.js +19 -19
  5. package/dist/components/badge.js +12 -11
  6. package/dist/components/button.js +12 -11
  7. package/dist/components/checkbox.d.ts +1 -1
  8. package/dist/components/checkbox.js +17 -17
  9. package/dist/components/dialog.d.ts +1 -1
  10. package/dist/components/dialog.js +60 -60
  11. package/dist/components/dropdown-menu.d.ts +1 -1
  12. package/dist/components/dropdown-menu.js +93 -93
  13. package/dist/components/form.d.ts +2 -3
  14. package/dist/components/form.js +2 -2
  15. package/dist/components/hover-card.d.ts +1 -1
  16. package/dist/components/hover-card.js +23 -23
  17. package/dist/components/label.d.ts +1 -1
  18. package/dist/components/label.js +12 -12
  19. package/dist/components/popover.d.ts +1 -1
  20. package/dist/components/popover.js +28 -28
  21. package/dist/components/separator.d.ts +1 -1
  22. package/dist/components/separator.js +10 -10
  23. package/dist/components/sheet.d.ts +1 -1
  24. package/dist/components/sheet.js +73 -73
  25. package/dist/components/sidebar.js +73 -69
  26. package/dist/components/switch.d.ts +1 -1
  27. package/dist/components/switch.js +13 -13
  28. package/dist/components/tabs.d.ts +1 -1
  29. package/dist/components/tabs.js +22 -22
  30. package/dist/components/tooltip.d.ts +1 -1
  31. package/dist/components/tooltip.js +27 -27
  32. package/dist/index.d.ts +5 -3
  33. package/dist/index.js +186 -172
  34. package/dist/lib/http.d.ts +13 -0
  35. package/dist/lib/http.js +58 -0
  36. package/dist/lib/yup.d.ts +2 -0
  37. package/dist/lib/yup.js +88 -0
  38. package/package.json +5 -3
  39. package/dist/_virtual/index.js +0 -5
  40. package/dist/_virtual/index2.js +0 -4
  41. package/dist/_virtual/use-sync-external-store-shim.development.js +0 -4
  42. package/dist/_virtual/use-sync-external-store-shim.production.js +0 -4
  43. package/dist/node_modules/@floating-ui/core/dist/floating-ui.core.js +0 -534
  44. package/dist/node_modules/@floating-ui/dom/dist/floating-ui.dom.js +0 -430
  45. package/dist/node_modules/@floating-ui/react-dom/dist/floating-ui.react-dom.js +0 -215
  46. package/dist/node_modules/@floating-ui/utils/dist/floating-ui.utils.dom.js +0 -159
  47. package/dist/node_modules/@floating-ui/utils/dist/floating-ui.utils.js +0 -149
  48. package/dist/node_modules/@radix-ui/primitive/dist/index.js +0 -12
  49. package/dist/node_modules/@radix-ui/react-alert-dialog/dist/index.js +0 -130
  50. package/dist/node_modules/@radix-ui/react-arrow/dist/index.js +0 -24
  51. package/dist/node_modules/@radix-ui/react-avatar/dist/index.js +0 -80
  52. package/dist/node_modules/@radix-ui/react-checkbox/dist/index.js +0 -258
  53. package/dist/node_modules/@radix-ui/react-collection/dist/index.js +0 -51
  54. package/dist/node_modules/@radix-ui/react-compose-refs/dist/index.js +0 -34
  55. package/dist/node_modules/@radix-ui/react-context/dist/index.js +0 -76
  56. package/dist/node_modules/@radix-ui/react-dialog/dist/index.js +0 -265
  57. package/dist/node_modules/@radix-ui/react-direction/dist/index.js +0 -12
  58. package/dist/node_modules/@radix-ui/react-dismissable-layer/dist/index.js +0 -133
  59. package/dist/node_modules/@radix-ui/react-dropdown-menu/dist/index.js +0 -230
  60. package/dist/node_modules/@radix-ui/react-focus-guards/dist/index.js +0 -21
  61. package/dist/node_modules/@radix-ui/react-focus-scope/dist/index.js +0 -149
  62. package/dist/node_modules/@radix-ui/react-hover-card/dist/index.js +0 -192
  63. package/dist/node_modules/@radix-ui/react-id/dist/index.js +0 -16
  64. package/dist/node_modules/@radix-ui/react-label/dist/index.js +0 -22
  65. package/dist/node_modules/@radix-ui/react-menu/dist/index.js +0 -663
  66. package/dist/node_modules/@radix-ui/react-popover/dist/index.js +0 -247
  67. package/dist/node_modules/@radix-ui/react-popper/dist/index.js +0 -224
  68. package/dist/node_modules/@radix-ui/react-portal/dist/index.js +0 -16
  69. package/dist/node_modules/@radix-ui/react-presence/dist/index.js +0 -77
  70. package/dist/node_modules/@radix-ui/react-primitive/dist/index.js +0 -39
  71. package/dist/node_modules/@radix-ui/react-roving-focus/dist/index.js +0 -189
  72. package/dist/node_modules/@radix-ui/react-separator/dist/index.js +0 -27
  73. package/dist/node_modules/@radix-ui/react-slot/dist/index.js +0 -67
  74. package/dist/node_modules/@radix-ui/react-switch/dist/index.js +0 -136
  75. package/dist/node_modules/@radix-ui/react-tabs/dist/index.js +0 -168
  76. package/dist/node_modules/@radix-ui/react-tooltip/dist/index.js +0 -348
  77. package/dist/node_modules/@radix-ui/react-use-callback-ref/dist/index.js +0 -16
  78. package/dist/node_modules/@radix-ui/react-use-controllable-state/dist/index.js +0 -59
  79. package/dist/node_modules/@radix-ui/react-use-escape-keydown/dist/index.js +0 -17
  80. package/dist/node_modules/@radix-ui/react-use-is-hydrated/dist/index.js +0 -19
  81. package/dist/node_modules/@radix-ui/react-use-layout-effect/dist/index.js +0 -6
  82. package/dist/node_modules/@radix-ui/react-use-previous/dist/index.js +0 -11
  83. package/dist/node_modules/@radix-ui/react-use-size/dist/index.js +0 -30
  84. package/dist/node_modules/@radix-ui/react-visually-hidden/dist/index.js +0 -32
  85. package/dist/node_modules/aria-hidden/dist/es2015/index.js +0 -54
  86. package/dist/node_modules/get-nonce/dist/es2015/index.js +0 -9
  87. package/dist/node_modules/react-remove-scroll/dist/es2015/Combination.js +0 -11
  88. package/dist/node_modules/react-remove-scroll/dist/es2015/SideEffect.js +0 -116
  89. package/dist/node_modules/react-remove-scroll/dist/es2015/UI.js +0 -33
  90. package/dist/node_modules/react-remove-scroll/dist/es2015/aggresiveCapture.js +0 -18
  91. package/dist/node_modules/react-remove-scroll/dist/es2015/handleScroll.js +0 -70
  92. package/dist/node_modules/react-remove-scroll/dist/es2015/medium.js +0 -5
  93. package/dist/node_modules/react-remove-scroll/dist/es2015/sidecar.js +0 -7
  94. package/dist/node_modules/react-remove-scroll-bar/dist/es2015/component.js +0 -73
  95. package/dist/node_modules/react-remove-scroll-bar/dist/es2015/constants.js +0 -7
  96. package/dist/node_modules/react-remove-scroll-bar/dist/es2015/utils.js +0 -27
  97. package/dist/node_modules/react-style-singleton/dist/es2015/component.js +0 -13
  98. package/dist/node_modules/react-style-singleton/dist/es2015/hook.js +0 -17
  99. package/dist/node_modules/react-style-singleton/dist/es2015/singleton.js +0 -35
  100. package/dist/node_modules/tslib/tslib.es6.js +0 -31
  101. package/dist/node_modules/use-callback-ref/dist/es2015/assignRef.js +0 -9
  102. package/dist/node_modules/use-callback-ref/dist/es2015/useMergeRef.js +0 -29
  103. package/dist/node_modules/use-callback-ref/dist/es2015/useRef.js +0 -28
  104. package/dist/node_modules/use-sidecar/dist/es2015/exports.js +0 -21
  105. package/dist/node_modules/use-sidecar/dist/es2015/medium.js +0 -72
  106. package/dist/node_modules/use-sync-external-store/cjs/use-sync-external-store-shim.development.js +0 -73
  107. package/dist/node_modules/use-sync-external-store/cjs/use-sync-external-store-shim.production.js +0 -62
  108. package/dist/node_modules/use-sync-external-store/shim/index.js +0 -13
@@ -1,348 +0,0 @@
1
- var $ = Object.defineProperty;
2
- var v = (t, o) => $(t, "name", { value: o, configurable: !0 });
3
- import * as s from "react";
4
- import { composeEventHandlers as b } from "../../primitive/dist/index.js";
5
- import { useComposedRefs as S } from "../../react-compose-refs/dist/index.js";
6
- import { createContextScope as z } from "../../react-context/dist/index.js";
7
- import { DismissableLayer as J } from "../../react-dismissable-layer/dist/index.js";
8
- import { useId as Q } from "../../react-id/dist/index.js";
9
- import { createPopperScope as G, Root as Z, Anchor as ee, Arrow as te, Content as oe } from "../../react-popper/dist/index.js";
10
- import { Portal as re } from "../../react-portal/dist/index.js";
11
- import { Presence as j } from "../../react-presence/dist/index.js";
12
- import { Primitive as ne } from "../../react-primitive/dist/index.js";
13
- import { createSlottable as se } from "../../react-slot/dist/index.js";
14
- import { useControllableState as ie } from "../../react-use-controllable-state/dist/index.js";
15
- import { Root as ae } from "../../react-visually-hidden/dist/index.js";
16
- import { jsx as f, jsxs as le } from "react/jsx-runtime";
17
- var [D, Ge] = z("Tooltip", [
18
- G
19
- ]), O = G(), F = "TooltipProvider", ce = 700, L = "tooltip.open", [ue, M] = D(F), B = /* @__PURE__ */ v((t) => {
20
- const {
21
- __scopeTooltip: o,
22
- delayDuration: e = ce,
23
- skipDelayDuration: r = 300,
24
- disableHoverableContent: n = !1,
25
- children: a
26
- } = t, l = s.useRef(!0), h = s.useRef(!1), i = s.useRef(0);
27
- return s.useEffect(() => {
28
- const p = i.current;
29
- return () => window.clearTimeout(p);
30
- }, []), /* @__PURE__ */ f(
31
- ue,
32
- {
33
- scope: o,
34
- isOpenDelayedRef: l,
35
- delayDuration: e,
36
- onOpen: s.useCallback(() => {
37
- window.clearTimeout(i.current), l.current = !1;
38
- }, []),
39
- onClose: s.useCallback(() => {
40
- window.clearTimeout(i.current), i.current = window.setTimeout(
41
- () => l.current = !0,
42
- r
43
- );
44
- }, [r]),
45
- isPointerInTransitRef: h,
46
- onPointerInTransitChange: s.useCallback((p) => {
47
- h.current = p;
48
- }, []),
49
- disableHoverableContent: n,
50
- children: a
51
- }
52
- );
53
- }, "TooltipProvider");
54
- B.displayName = F;
55
- var _ = "Tooltip", [pe, A] = D(_), U = /* @__PURE__ */ v((t) => {
56
- const {
57
- __scopeTooltip: o,
58
- children: e,
59
- open: r,
60
- defaultOpen: n,
61
- onOpenChange: a,
62
- disableHoverableContent: l,
63
- delayDuration: h
64
- } = t, i = M(_, t.__scopeTooltip), p = O(o), [c, d] = s.useState(null), m = Q(), u = s.useRef(0), T = l ?? i.disableHoverableContent, C = h ?? i.delayDuration, y = s.useRef(!1), [g, x] = ie({
65
- prop: r,
66
- defaultProp: n ?? !1,
67
- onChange: /* @__PURE__ */ v((N) => {
68
- N ? (i.onOpen(), document.dispatchEvent(new CustomEvent(L))) : i.onClose(), a == null || a(N);
69
- }, "onChange"),
70
- caller: _
71
- }), P = s.useMemo(() => g ? y.current ? "delayed-open" : "instant-open" : "closed", [g]), E = s.useCallback(() => {
72
- window.clearTimeout(u.current), u.current = 0, y.current = !1, x(!0);
73
- }, [x]), R = s.useCallback(() => {
74
- window.clearTimeout(u.current), u.current = 0, x(!1);
75
- }, [x]), H = s.useCallback(() => {
76
- window.clearTimeout(u.current), u.current = window.setTimeout(() => {
77
- y.current = !0, x(!0), u.current = 0;
78
- }, C);
79
- }, [C, x]);
80
- return s.useEffect(() => () => {
81
- u.current && (window.clearTimeout(u.current), u.current = 0);
82
- }, []), /* @__PURE__ */ f(Z, { ...p, children: /* @__PURE__ */ f(
83
- pe,
84
- {
85
- scope: o,
86
- contentId: m,
87
- open: g,
88
- stateAttribute: P,
89
- trigger: c,
90
- onTriggerChange: d,
91
- onTriggerEnter: s.useCallback(() => {
92
- i.isOpenDelayedRef.current ? H() : E();
93
- }, [i.isOpenDelayedRef, H, E]),
94
- onTriggerLeave: s.useCallback(() => {
95
- T ? R() : (window.clearTimeout(u.current), u.current = 0);
96
- }, [R, T]),
97
- onOpen: E,
98
- onClose: R,
99
- disableHoverableContent: T,
100
- children: e
101
- }
102
- ) });
103
- }, "Tooltip");
104
- U.displayName = _;
105
- var k = "TooltipTrigger", V = s.forwardRef(
106
- (t, o) => {
107
- const { __scopeTooltip: e, ...r } = t, n = A(k, e), a = M(k, e), l = O(e), h = s.useRef(null), i = S(o, h, n.onTriggerChange), p = s.useRef(!1), c = s.useRef(!1), d = s.useCallback(() => p.current = !1, []);
108
- return s.useEffect(() => () => document.removeEventListener("pointerup", d), [d]), /* @__PURE__ */ f(ee, { asChild: !0, ...l, children: /* @__PURE__ */ f(
109
- ne.button,
110
- {
111
- "aria-describedby": n.open ? n.contentId : void 0,
112
- "data-state": n.stateAttribute,
113
- ...r,
114
- ref: i,
115
- onPointerMove: b(t.onPointerMove, (m) => {
116
- m.pointerType !== "touch" && !c.current && !a.isPointerInTransitRef.current && (n.onTriggerEnter(), c.current = !0);
117
- }),
118
- onPointerLeave: b(t.onPointerLeave, () => {
119
- n.onTriggerLeave(), c.current = !1;
120
- }),
121
- onPointerDown: b(t.onPointerDown, () => {
122
- n.open && n.onClose(), p.current = !0, document.addEventListener("pointerup", d, { once: !0 });
123
- }),
124
- onFocus: b(t.onFocus, () => {
125
- p.current || n.onOpen();
126
- }),
127
- onBlur: b(t.onBlur, n.onClose),
128
- onClick: b(t.onClick, n.onClose)
129
- }
130
- ) });
131
- }
132
- );
133
- V.displayName = k;
134
- var I = "TooltipPortal", [de, fe] = D(I, {
135
- forceMount: void 0
136
- }), Y = /* @__PURE__ */ v((t) => {
137
- const { __scopeTooltip: o, forceMount: e, children: r, container: n } = t, a = A(I, o);
138
- return /* @__PURE__ */ f(de, { scope: o, forceMount: e, children: /* @__PURE__ */ f(j, { present: e || a.open, children: /* @__PURE__ */ f(re, { asChild: !0, container: n, children: r }) }) });
139
- }, "TooltipPortal");
140
- Y.displayName = I;
141
- var w = "TooltipContent", q = s.forwardRef(
142
- (t, o) => {
143
- const e = fe(w, t.__scopeTooltip), { forceMount: r = e.forceMount, side: n = "top", ...a } = t, l = A(w, t.__scopeTooltip);
144
- return /* @__PURE__ */ f(j, { present: r || l.open, children: l.disableHoverableContent ? /* @__PURE__ */ f(X, { side: n, ...a, ref: o }) : /* @__PURE__ */ f(ve, { side: n, ...a, ref: o }) });
145
- }
146
- ), ve = s.forwardRef((t, o) => {
147
- const e = A(w, t.__scopeTooltip), r = M(w, t.__scopeTooltip), n = s.useRef(null), a = S(o, n), [l, h] = s.useState(null), { trigger: i, onClose: p } = e, c = n.current, { onPointerInTransitChange: d } = r, m = s.useCallback(() => {
148
- h(null), d(!1);
149
- }, [d]), u = s.useCallback(
150
- (T, C) => {
151
- const y = T.currentTarget, g = { x: T.clientX, y: T.clientY }, x = ye(g, y.getBoundingClientRect()), P = Ce(g, x), E = xe(C.getBoundingClientRect()), R = be([...P, ...E]);
152
- h(R), d(!0);
153
- },
154
- [d]
155
- );
156
- return s.useEffect(() => () => m(), [m]), s.useEffect(() => {
157
- if (i && c) {
158
- const T = /* @__PURE__ */ v((y) => u(y, c), "handleTriggerLeave"), C = /* @__PURE__ */ v((y) => u(y, i), "handleContentLeave");
159
- return i.addEventListener("pointerleave", T), c.addEventListener("pointerleave", C), () => {
160
- i.removeEventListener("pointerleave", T), c.removeEventListener("pointerleave", C);
161
- };
162
- }
163
- }, [i, c, u, m]), s.useEffect(() => {
164
- if (l) {
165
- const T = /* @__PURE__ */ v((C) => {
166
- const y = C.target, g = { x: C.clientX, y: C.clientY }, x = (i == null ? void 0 : i.contains(y)) || (c == null ? void 0 : c.contains(y)), P = !ge(g, l);
167
- x ? m() : P && (m(), p());
168
- }, "handleTrackPointerGrace");
169
- return document.addEventListener("pointermove", T), () => document.removeEventListener("pointermove", T);
170
- }
171
- }, [i, c, l, p, m]), /* @__PURE__ */ f(X, { ...t, ref: a });
172
- }), [he, me] = D(_, { isInside: !1 }), Te = se("TooltipContent"), X = s.forwardRef(
173
- (t, o) => {
174
- const {
175
- __scopeTooltip: e,
176
- children: r,
177
- "aria-label": n,
178
- onEscapeKeyDown: a,
179
- onPointerDownOutside: l,
180
- ...h
181
- } = t, i = A(w, e), p = O(e), { onClose: c } = i;
182
- return s.useEffect(() => (document.addEventListener(L, c), () => document.removeEventListener(L, c)), [c]), s.useEffect(() => {
183
- if (i.trigger) {
184
- const d = /* @__PURE__ */ v((m) => {
185
- const u = m.target;
186
- u != null && u.contains(i.trigger) && c();
187
- }, "handleScroll");
188
- return window.addEventListener("scroll", d, { capture: !0 }), () => window.removeEventListener("scroll", d, { capture: !0 });
189
- }
190
- }, [i.trigger, c]), /* @__PURE__ */ f(
191
- J,
192
- {
193
- asChild: !0,
194
- disableOutsidePointerEvents: !1,
195
- onEscapeKeyDown: a,
196
- onPointerDownOutside: l,
197
- onFocusOutside: /* @__PURE__ */ v((d) => d.preventDefault(), "onFocusOutside"),
198
- onDismiss: c,
199
- children: /* @__PURE__ */ le(
200
- oe,
201
- {
202
- "data-state": i.stateAttribute,
203
- ...p,
204
- ...h,
205
- ref: o,
206
- style: {
207
- ...h.style,
208
- "--radix-tooltip-content-transform-origin": "var(--radix-popper-transform-origin)",
209
- "--radix-tooltip-content-available-width": "var(--radix-popper-available-width)",
210
- "--radix-tooltip-content-available-height": "var(--radix-popper-available-height)",
211
- "--radix-tooltip-trigger-width": "var(--radix-popper-anchor-width)",
212
- "--radix-tooltip-trigger-height": "var(--radix-popper-anchor-height)"
213
- },
214
- children: [
215
- /* @__PURE__ */ f(Te, { children: r }),
216
- /* @__PURE__ */ f(he, { scope: e, isInside: !0, children: /* @__PURE__ */ f(ae, { id: i.contentId, role: "tooltip", children: n || r }) })
217
- ]
218
- }
219
- )
220
- }
221
- );
222
- }
223
- );
224
- q.displayName = w;
225
- var K = "TooltipArrow", W = s.forwardRef(
226
- (t, o) => {
227
- const { __scopeTooltip: e, ...r } = t, n = O(e);
228
- return me(
229
- K,
230
- e
231
- ).isInside ? null : /* @__PURE__ */ f(te, { ...n, ...r, ref: o });
232
- }
233
- );
234
- W.displayName = K;
235
- function ye(t, o) {
236
- const e = Math.abs(o.top - t.y), r = Math.abs(o.bottom - t.y), n = Math.abs(o.right - t.x), a = Math.abs(o.left - t.x);
237
- switch (Math.min(e, r, n, a)) {
238
- case a:
239
- return "left";
240
- case n:
241
- return "right";
242
- case e:
243
- return "top";
244
- case r:
245
- return "bottom";
246
- default:
247
- throw new Error("unreachable");
248
- }
249
- }
250
- v(ye, "getExitSideFromRect");
251
- function Ce(t, o, e = 5) {
252
- const r = [];
253
- switch (o) {
254
- case "top":
255
- r.push(
256
- { x: t.x - e, y: t.y + e },
257
- { x: t.x + e, y: t.y + e }
258
- );
259
- break;
260
- case "bottom":
261
- r.push(
262
- { x: t.x - e, y: t.y - e },
263
- { x: t.x + e, y: t.y - e }
264
- );
265
- break;
266
- case "left":
267
- r.push(
268
- { x: t.x + e, y: t.y - e },
269
- { x: t.x + e, y: t.y + e }
270
- );
271
- break;
272
- case "right":
273
- r.push(
274
- { x: t.x - e, y: t.y - e },
275
- { x: t.x - e, y: t.y + e }
276
- );
277
- break;
278
- }
279
- return r;
280
- }
281
- v(Ce, "getPaddedExitPoints");
282
- function xe(t) {
283
- const { top: o, right: e, bottom: r, left: n } = t;
284
- return [
285
- { x: n, y: o },
286
- { x: e, y: o },
287
- { x: e, y: r },
288
- { x: n, y: r }
289
- ];
290
- }
291
- v(xe, "getPointsFromRect");
292
- function ge(t, o) {
293
- const { x: e, y: r } = t;
294
- let n = !1;
295
- for (let a = 0, l = o.length - 1; a < o.length; l = a++) {
296
- const h = o[a], i = o[l], p = h.x, c = h.y, d = i.x, m = i.y;
297
- c > r != m > r && e < (d - p) * (r - c) / (m - c) + p && (n = !n);
298
- }
299
- return n;
300
- }
301
- v(ge, "isPointInPolygon");
302
- function be(t) {
303
- const o = t.slice();
304
- return o.sort((e, r) => e.x < r.x ? -1 : e.x > r.x ? 1 : e.y < r.y ? -1 : e.y > r.y ? 1 : 0), we(o);
305
- }
306
- v(be, "getHull");
307
- function we(t) {
308
- if (t.length <= 1) return t.slice();
309
- const o = [];
310
- for (let r = 0; r < t.length; r++) {
311
- const n = t[r];
312
- for (; o.length >= 2; ) {
313
- const a = o[o.length - 1], l = o[o.length - 2];
314
- if ((a.x - l.x) * (n.y - l.y) >= (a.y - l.y) * (n.x - l.x)) o.pop();
315
- else break;
316
- }
317
- o.push(n);
318
- }
319
- o.pop();
320
- const e = [];
321
- for (let r = t.length - 1; r >= 0; r--) {
322
- const n = t[r];
323
- for (; e.length >= 2; ) {
324
- const a = e[e.length - 1], l = e[e.length - 2];
325
- if ((a.x - l.x) * (n.y - l.y) >= (a.y - l.y) * (n.x - l.x)) e.pop();
326
- else break;
327
- }
328
- e.push(n);
329
- }
330
- return e.pop(), o.length === 1 && e.length === 1 && o[0].x === e[0].x && o[0].y === e[0].y ? o : o.concat(e);
331
- }
332
- v(we, "getHullPresorted");
333
- var je = B, Fe = U, Be = V, Ue = Y, Ve = q, Ye = W;
334
- export {
335
- Ye as Arrow,
336
- Ve as Content,
337
- Ue as Portal,
338
- je as Provider,
339
- Fe as Root,
340
- U as Tooltip,
341
- W as TooltipArrow,
342
- q as TooltipContent,
343
- Y as TooltipPortal,
344
- B as TooltipProvider,
345
- V as TooltipTrigger,
346
- Be as Trigger,
347
- Ge as createTooltipScope
348
- };
@@ -1,16 +0,0 @@
1
- var s = Object.defineProperty;
2
- var n = (r, e) => s(r, "name", { value: e, configurable: !0 });
3
- import * as t from "react";
4
- function c(r) {
5
- const e = t.useRef(r);
6
- return t.useEffect(() => {
7
- e.current = r;
8
- }), t.useMemo(() => (...o) => {
9
- var u;
10
- return (u = e.current) == null ? void 0 : u.call(e, ...o);
11
- }, []);
12
- }
13
- n(c, "useCallbackRef");
14
- export {
15
- c as useCallbackRef
16
- };
@@ -1,59 +0,0 @@
1
- var E = Object.defineProperty;
2
- var i = (t, r) => E(t, "name", { value: r, configurable: !0 });
3
- import * as n from "react";
4
- import { useLayoutEffect as w } from "../../react-use-layout-effect/dist/index.js";
5
- var R = n[" useInsertionEffect ".trim().toString()] || w;
6
- function I({
7
- prop: t,
8
- defaultProp: r,
9
- onChange: o = /* @__PURE__ */ i(() => {
10
- }, "onChange"),
11
- caller: d
12
- }) {
13
- const [l, e, c] = S({
14
- defaultProp: r,
15
- onChange: o
16
- }), s = t !== void 0, m = s ? t : l;
17
- {
18
- const u = n.useRef(t !== void 0);
19
- n.useEffect(() => {
20
- const f = u.current;
21
- f !== s && console.warn(
22
- `${d} is changing from ${f ? "controlled" : "uncontrolled"} to ${s ? "controlled" : "uncontrolled"}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`
23
- ), u.current = s;
24
- }, [s, d]);
25
- }
26
- const v = n.useCallback(
27
- (u) => {
28
- var f;
29
- if (s) {
30
- const a = b(u) ? u(t) : u;
31
- a !== t && ((f = c.current) == null || f.call(c, a));
32
- } else
33
- e(u);
34
- },
35
- [s, t, e, c]
36
- );
37
- return [m, v];
38
- }
39
- i(I, "useControllableState");
40
- function S({
41
- defaultProp: t,
42
- onChange: r
43
- }) {
44
- const [o, d] = n.useState(t), l = n.useRef(o), e = n.useRef(r);
45
- return R(() => {
46
- e.current = r;
47
- }, [r]), n.useEffect(() => {
48
- var c;
49
- l.current !== o && ((c = e.current) == null || c.call(e, o), l.current = o);
50
- }, [o, l]), [o, d, e];
51
- }
52
- i(S, "useUncontrolledState");
53
- function b(t) {
54
- return typeof t == "function";
55
- }
56
- i(b, "isFunction");
57
- export {
58
- I as useControllableState
59
- };
@@ -1,17 +0,0 @@
1
- var s = Object.defineProperty;
2
- var o = (t, e) => s(t, "name", { value: e, configurable: !0 });
3
- import * as c from "react";
4
- import { useCallbackRef as p } from "../../react-use-callback-ref/dist/index.js";
5
- function f(t, e = globalThis == null ? void 0 : globalThis.document) {
6
- const a = p(t);
7
- c.useEffect(() => {
8
- const n = /* @__PURE__ */ o((r) => {
9
- r.key === "Escape" && a(r);
10
- }, "handleKeyDown");
11
- return e.addEventListener("keydown", n, { capture: !0 }), () => e.removeEventListener("keydown", n, { capture: !0 });
12
- }, [a, e]);
13
- }
14
- o(f, "useEscapeKeydown");
15
- export {
16
- f as useEscapeKeydown
17
- };
@@ -1,19 +0,0 @@
1
- var s = Object.defineProperty;
2
- var r = (e, t) => s(e, "name", { value: t, configurable: !0 });
3
- import { s as n } from "../../../../_virtual/index.js";
4
- function a() {
5
- return n.useSyncExternalStore(
6
- u,
7
- () => !0,
8
- () => !1
9
- );
10
- }
11
- r(a, "useIsHydrated");
12
- function u() {
13
- return () => {
14
- };
15
- }
16
- r(u, "subscribe");
17
- export {
18
- a as useIsHydrated
19
- };
@@ -1,6 +0,0 @@
1
- import * as t from "react";
2
- var e = globalThis != null && globalThis.document ? t.useLayoutEffect : () => {
3
- };
4
- export {
5
- e as useLayoutEffect
6
- };
@@ -1,11 +0,0 @@
1
- var n = Object.defineProperty;
2
- var u = (r, e) => n(r, "name", { value: e, configurable: !0 });
3
- import * as t from "react";
4
- function s(r) {
5
- const e = t.useRef({ value: r, previous: r });
6
- return t.useMemo(() => (e.current.value !== r && (e.current.previous = e.current.value, e.current.value = r), e.current.previous), [r]);
7
- }
8
- u(s, "usePrevious");
9
- export {
10
- s as usePrevious
11
- };
@@ -1,30 +0,0 @@
1
- var z = Object.defineProperty;
2
- var h = (r, e) => z(r, "name", { value: e, configurable: !0 });
3
- import * as a from "react";
4
- import { useLayoutEffect as c } from "../../react-use-layout-effect/dist/index.js";
5
- function y(r) {
6
- const [e, i] = a.useState(void 0);
7
- return c(() => {
8
- if (r) {
9
- i({ width: r.offsetWidth, height: r.offsetHeight });
10
- const b = new ResizeObserver((o) => {
11
- if (!Array.isArray(o) || !o.length)
12
- return;
13
- const u = o[0];
14
- let t, s;
15
- if ("borderBoxSize" in u) {
16
- const f = u.borderBoxSize, d = Array.isArray(f) ? f[0] : f;
17
- t = d.inlineSize, s = d.blockSize;
18
- } else
19
- t = r.offsetWidth, s = r.offsetHeight;
20
- i({ width: t, height: s });
21
- });
22
- return b.observe(r, { box: "border-box" }), () => b.unobserve(r);
23
- } else
24
- i(void 0);
25
- }, [r]), e;
26
- }
27
- h(y, "useSize");
28
- export {
29
- y as useSize
30
- };
@@ -1,32 +0,0 @@
1
- import * as a from "react";
2
- import { Primitive as o } from "../../react-primitive/dist/index.js";
3
- import { jsx as t } from "react/jsx-runtime";
4
- var d = Object.freeze({
5
- // See: https://github.com/twbs/bootstrap/blob/main/scss/mixins/_visually-hidden.scss
6
- position: "absolute",
7
- border: 0,
8
- width: 1,
9
- height: 1,
10
- padding: 0,
11
- margin: -1,
12
- overflow: "hidden",
13
- clip: "rect(0, 0, 0, 0)",
14
- whiteSpace: "nowrap",
15
- wordWrap: "normal"
16
- }), l = "VisuallyHidden", e = a.forwardRef(
17
- (r, i) => /* @__PURE__ */ t(
18
- o.span,
19
- {
20
- ...r,
21
- ref: i,
22
- style: { ...d, ...r.style }
23
- }
24
- )
25
- );
26
- e.displayName = l;
27
- var p = e;
28
- export {
29
- p as Root,
30
- d as VISUALLY_HIDDEN_STYLES,
31
- e as VisuallyHidden
32
- };
@@ -1,54 +0,0 @@
1
- var D = Object.defineProperty;
2
- var i = (r, u) => D(r, "name", { value: u, configurable: !0 });
3
- var E = /* @__PURE__ */ i(function(r) {
4
- if (typeof document > "u")
5
- return null;
6
- var u = Array.isArray(r) ? r[0] : r;
7
- return u.ownerDocument.body;
8
- }, "getDefaultParent"), c = /* @__PURE__ */ new WeakMap(), p = /* @__PURE__ */ new WeakMap(), h = {}, l = 0, b = /* @__PURE__ */ i(function(r) {
9
- return r && (r.host || b(r.parentNode));
10
- }, "unwrapHost"), C = /* @__PURE__ */ i(function(r, u) {
11
- return u.map(function(e) {
12
- if (r.contains(e))
13
- return e;
14
- var n = b(e);
15
- return n && r.contains(n) ? n : (console.error("aria-hidden", e, "in not contained inside", r, ". Doing nothing"), null);
16
- }).filter(function(e) {
17
- return !!e;
18
- });
19
- }, "correctTargets"), O = /* @__PURE__ */ i(function(r, u, e, n) {
20
- var f = C(u, Array.isArray(r) ? r : [r]);
21
- h[e] || (h[e] = /* @__PURE__ */ new WeakMap());
22
- var o = h[e], y = [], v = /* @__PURE__ */ new Set(), k = new Set(f), A = /* @__PURE__ */ i(function(t) {
23
- !t || v.has(t) || (v.add(t), A(t.parentNode));
24
- }, "keep");
25
- f.forEach(A);
26
- var w = /* @__PURE__ */ i(function(t) {
27
- !t || k.has(t) || Array.prototype.forEach.call(t.children, function(a) {
28
- if (v.has(a))
29
- w(a);
30
- else
31
- try {
32
- var s = a.getAttribute(n), d = s !== null && s !== "false", M = (c.get(a) || 0) + 1, W = (o.get(a) || 0) + 1;
33
- c.set(a, M), o.set(a, W), y.push(a), M === 1 && d && p.set(a, !0), W === 1 && a.setAttribute(e, "true"), d || a.setAttribute(n, "true");
34
- } catch (S) {
35
- console.error("aria-hidden: cannot operate on ", a, S);
36
- }
37
- });
38
- }, "deep");
39
- return w(u), v.clear(), l++, function() {
40
- y.forEach(function(t) {
41
- var a = c.get(t) - 1, s = o.get(t) - 1;
42
- c.set(t, a), o.set(t, s), a || (p.has(t) || t.removeAttribute(n), p.delete(t)), s || t.removeAttribute(e);
43
- }), l--, l || (c = /* @__PURE__ */ new WeakMap(), c = /* @__PURE__ */ new WeakMap(), p = /* @__PURE__ */ new WeakMap(), h = {});
44
- };
45
- }, "applyAttributeToOthers"), q = /* @__PURE__ */ i(function(r, u, e) {
46
- e === void 0 && (e = "data-aria-hidden");
47
- var n = Array.from(Array.isArray(r) ? r : [r]), f = E(r);
48
- return f ? (n.push.apply(n, Array.from(f.querySelectorAll("[aria-live], script"))), O(n, f, e, "aria-hidden")) : function() {
49
- return null;
50
- };
51
- }, "hideOthers");
52
- export {
53
- q as hideOthers
54
- };
@@ -1,9 +0,0 @@
1
- var c = Object.defineProperty;
2
- var e = (n, _) => c(n, "name", { value: _, configurable: !0 });
3
- var r = /* @__PURE__ */ e(function() {
4
- if (typeof __webpack_nonce__ < "u")
5
- return __webpack_nonce__;
6
- }, "getNonce");
7
- export {
8
- r as getNonce
9
- };
@@ -1,11 +0,0 @@
1
- import { __assign as m } from "../../../tslib/tslib.es6.js";
2
- import * as r from "react";
3
- import { RemoveScroll as e } from "./UI.js";
4
- import t from "./sidecar.js";
5
- var s = r.forwardRef(function(a, o) {
6
- return r.createElement(e, m({}, a, { ref: o, sideCar: t }));
7
- });
8
- s.classNames = e.classNames;
9
- export {
10
- s as default
11
- };