fina-react-ds 1.0.22 → 1.0.23
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.
- package/dist/components/alert-dialog.d.ts +1 -1
- package/dist/components/alert-dialog.js +65 -59
- package/dist/components/avatar.d.ts +1 -1
- package/dist/components/avatar.js +19 -19
- package/dist/components/badge.js +12 -11
- package/dist/components/button.js +12 -11
- package/dist/components/checkbox.d.ts +1 -1
- package/dist/components/checkbox.js +17 -17
- package/dist/components/dialog.d.ts +1 -1
- package/dist/components/dialog.js +60 -60
- package/dist/components/dropdown-menu.d.ts +1 -1
- package/dist/components/dropdown-menu.js +93 -93
- package/dist/components/form.d.ts +2 -3
- package/dist/components/form.js +2 -2
- package/dist/components/hover-card.d.ts +1 -1
- package/dist/components/hover-card.js +23 -23
- package/dist/components/label.d.ts +1 -1
- package/dist/components/label.js +12 -12
- package/dist/components/popover.d.ts +1 -1
- package/dist/components/popover.js +28 -28
- package/dist/components/separator.d.ts +1 -1
- package/dist/components/separator.js +10 -10
- package/dist/components/sheet.d.ts +1 -1
- package/dist/components/sheet.js +73 -73
- package/dist/components/sidebar.js +73 -69
- package/dist/components/switch.d.ts +1 -1
- package/dist/components/switch.js +13 -13
- package/dist/components/tabs.d.ts +1 -1
- package/dist/components/tabs.js +22 -22
- package/dist/components/tooltip.d.ts +1 -1
- package/dist/components/tooltip.js +27 -27
- package/dist/index.d.ts +5 -3
- package/dist/index.js +186 -172
- package/dist/lib/http.d.ts +13 -0
- package/dist/lib/http.js +59 -0
- package/dist/lib/yup.d.ts +2 -0
- package/dist/lib/yup.js +88 -0
- package/package.json +6 -3
- package/dist/_virtual/index.js +0 -5
- package/dist/_virtual/index2.js +0 -4
- package/dist/_virtual/use-sync-external-store-shim.development.js +0 -4
- package/dist/_virtual/use-sync-external-store-shim.production.js +0 -4
- package/dist/node_modules/@floating-ui/core/dist/floating-ui.core.js +0 -534
- package/dist/node_modules/@floating-ui/dom/dist/floating-ui.dom.js +0 -430
- package/dist/node_modules/@floating-ui/react-dom/dist/floating-ui.react-dom.js +0 -215
- package/dist/node_modules/@floating-ui/utils/dist/floating-ui.utils.dom.js +0 -159
- package/dist/node_modules/@floating-ui/utils/dist/floating-ui.utils.js +0 -149
- package/dist/node_modules/@radix-ui/primitive/dist/index.js +0 -12
- package/dist/node_modules/@radix-ui/react-alert-dialog/dist/index.js +0 -130
- package/dist/node_modules/@radix-ui/react-arrow/dist/index.js +0 -24
- package/dist/node_modules/@radix-ui/react-avatar/dist/index.js +0 -80
- package/dist/node_modules/@radix-ui/react-checkbox/dist/index.js +0 -258
- package/dist/node_modules/@radix-ui/react-collection/dist/index.js +0 -51
- package/dist/node_modules/@radix-ui/react-compose-refs/dist/index.js +0 -34
- package/dist/node_modules/@radix-ui/react-context/dist/index.js +0 -76
- package/dist/node_modules/@radix-ui/react-dialog/dist/index.js +0 -265
- package/dist/node_modules/@radix-ui/react-direction/dist/index.js +0 -12
- package/dist/node_modules/@radix-ui/react-dismissable-layer/dist/index.js +0 -133
- package/dist/node_modules/@radix-ui/react-dropdown-menu/dist/index.js +0 -230
- package/dist/node_modules/@radix-ui/react-focus-guards/dist/index.js +0 -21
- package/dist/node_modules/@radix-ui/react-focus-scope/dist/index.js +0 -149
- package/dist/node_modules/@radix-ui/react-hover-card/dist/index.js +0 -192
- package/dist/node_modules/@radix-ui/react-id/dist/index.js +0 -16
- package/dist/node_modules/@radix-ui/react-label/dist/index.js +0 -22
- package/dist/node_modules/@radix-ui/react-menu/dist/index.js +0 -663
- package/dist/node_modules/@radix-ui/react-popover/dist/index.js +0 -247
- package/dist/node_modules/@radix-ui/react-popper/dist/index.js +0 -224
- package/dist/node_modules/@radix-ui/react-portal/dist/index.js +0 -16
- package/dist/node_modules/@radix-ui/react-presence/dist/index.js +0 -77
- package/dist/node_modules/@radix-ui/react-primitive/dist/index.js +0 -39
- package/dist/node_modules/@radix-ui/react-roving-focus/dist/index.js +0 -189
- package/dist/node_modules/@radix-ui/react-separator/dist/index.js +0 -27
- package/dist/node_modules/@radix-ui/react-slot/dist/index.js +0 -67
- package/dist/node_modules/@radix-ui/react-switch/dist/index.js +0 -136
- package/dist/node_modules/@radix-ui/react-tabs/dist/index.js +0 -168
- package/dist/node_modules/@radix-ui/react-tooltip/dist/index.js +0 -348
- package/dist/node_modules/@radix-ui/react-use-callback-ref/dist/index.js +0 -16
- package/dist/node_modules/@radix-ui/react-use-controllable-state/dist/index.js +0 -59
- package/dist/node_modules/@radix-ui/react-use-escape-keydown/dist/index.js +0 -17
- package/dist/node_modules/@radix-ui/react-use-is-hydrated/dist/index.js +0 -19
- package/dist/node_modules/@radix-ui/react-use-layout-effect/dist/index.js +0 -6
- package/dist/node_modules/@radix-ui/react-use-previous/dist/index.js +0 -11
- package/dist/node_modules/@radix-ui/react-use-size/dist/index.js +0 -30
- package/dist/node_modules/@radix-ui/react-visually-hidden/dist/index.js +0 -32
- package/dist/node_modules/aria-hidden/dist/es2015/index.js +0 -54
- package/dist/node_modules/get-nonce/dist/es2015/index.js +0 -9
- package/dist/node_modules/react-remove-scroll/dist/es2015/Combination.js +0 -11
- package/dist/node_modules/react-remove-scroll/dist/es2015/SideEffect.js +0 -116
- package/dist/node_modules/react-remove-scroll/dist/es2015/UI.js +0 -33
- package/dist/node_modules/react-remove-scroll/dist/es2015/aggresiveCapture.js +0 -18
- package/dist/node_modules/react-remove-scroll/dist/es2015/handleScroll.js +0 -70
- package/dist/node_modules/react-remove-scroll/dist/es2015/medium.js +0 -5
- package/dist/node_modules/react-remove-scroll/dist/es2015/sidecar.js +0 -7
- package/dist/node_modules/react-remove-scroll-bar/dist/es2015/component.js +0 -73
- package/dist/node_modules/react-remove-scroll-bar/dist/es2015/constants.js +0 -7
- package/dist/node_modules/react-remove-scroll-bar/dist/es2015/utils.js +0 -27
- package/dist/node_modules/react-style-singleton/dist/es2015/component.js +0 -13
- package/dist/node_modules/react-style-singleton/dist/es2015/hook.js +0 -17
- package/dist/node_modules/react-style-singleton/dist/es2015/singleton.js +0 -35
- package/dist/node_modules/tslib/tslib.es6.js +0 -31
- package/dist/node_modules/use-callback-ref/dist/es2015/assignRef.js +0 -9
- package/dist/node_modules/use-callback-ref/dist/es2015/useMergeRef.js +0 -29
- package/dist/node_modules/use-callback-ref/dist/es2015/useRef.js +0 -28
- package/dist/node_modules/use-sidecar/dist/es2015/exports.js +0 -21
- package/dist/node_modules/use-sidecar/dist/es2015/medium.js +0 -72
- package/dist/node_modules/use-sync-external-store/cjs/use-sync-external-store-shim.development.js +0 -73
- package/dist/node_modules/use-sync-external-store/cjs/use-sync-external-store-shim.production.js +0 -62
- package/dist/node_modules/use-sync-external-store/shim/index.js +0 -13
|
@@ -1,247 +0,0 @@
|
|
|
1
|
-
var H = Object.defineProperty;
|
|
2
|
-
var v = (o, n) => H(o, "name", { value: n, configurable: !0 });
|
|
3
|
-
import * as i from "react";
|
|
4
|
-
import { composeEventHandlers as m } from "../../primitive/dist/index.js";
|
|
5
|
-
import { useComposedRefs as _ } from "../../react-compose-refs/dist/index.js";
|
|
6
|
-
import { createContextScope as K } from "../../react-context/dist/index.js";
|
|
7
|
-
import { DismissableLayer as $ } from "../../react-dismissable-layer/dist/index.js";
|
|
8
|
-
import { useFocusGuards as j } from "../../react-focus-guards/dist/index.js";
|
|
9
|
-
import { FocusScope as U } from "../../react-focus-scope/dist/index.js";
|
|
10
|
-
import { useId as V } from "../../react-id/dist/index.js";
|
|
11
|
-
import { createPopperScope as x, Root as W, Anchor as w, Content as Z, Arrow as q } from "../../react-popper/dist/index.js";
|
|
12
|
-
import { Portal as z } from "../../react-portal/dist/index.js";
|
|
13
|
-
import { Presence as E } from "../../react-presence/dist/index.js";
|
|
14
|
-
import { Primitive as b } from "../../react-primitive/dist/index.js";
|
|
15
|
-
import { createSlot as B } from "../../react-slot/dist/index.js";
|
|
16
|
-
import { useControllableState as J } from "../../react-use-controllable-state/dist/index.js";
|
|
17
|
-
import { hideOthers as Q } from "../../../aria-hidden/dist/es2015/index.js";
|
|
18
|
-
import X from "../../../react-remove-scroll/dist/es2015/Combination.js";
|
|
19
|
-
import { jsx as p } from "react/jsx-runtime";
|
|
20
|
-
var R = "Popover", [F, Eo] = K(R, [
|
|
21
|
-
x
|
|
22
|
-
]), g = x(), [Y, f] = F(R), N = /* @__PURE__ */ v((o) => {
|
|
23
|
-
const {
|
|
24
|
-
__scopePopover: n,
|
|
25
|
-
children: t,
|
|
26
|
-
open: a,
|
|
27
|
-
defaultOpen: e,
|
|
28
|
-
onOpenChange: r,
|
|
29
|
-
modal: s = !1
|
|
30
|
-
} = o, c = g(n), u = i.useRef(null), [l, h] = i.useState(!1), [C, d] = J({
|
|
31
|
-
prop: a,
|
|
32
|
-
defaultProp: e ?? !1,
|
|
33
|
-
onChange: r,
|
|
34
|
-
caller: R
|
|
35
|
-
});
|
|
36
|
-
return /* @__PURE__ */ p(W, { ...c, children: /* @__PURE__ */ p(
|
|
37
|
-
Y,
|
|
38
|
-
{
|
|
39
|
-
scope: n,
|
|
40
|
-
contentId: V(),
|
|
41
|
-
triggerRef: u,
|
|
42
|
-
open: C,
|
|
43
|
-
onOpenChange: d,
|
|
44
|
-
onOpenToggle: i.useCallback(() => d((A) => !A), [d]),
|
|
45
|
-
hasCustomAnchor: l,
|
|
46
|
-
onCustomAnchorAdd: i.useCallback(() => h(!0), []),
|
|
47
|
-
onCustomAnchorRemove: i.useCallback(() => h(!1), []),
|
|
48
|
-
modal: s,
|
|
49
|
-
children: t
|
|
50
|
-
}
|
|
51
|
-
) });
|
|
52
|
-
}, "Popover");
|
|
53
|
-
N.displayName = R;
|
|
54
|
-
var S = "PopoverAnchor", y = i.forwardRef(
|
|
55
|
-
(o, n) => {
|
|
56
|
-
const { __scopePopover: t, ...a } = o, e = f(S, t), r = g(t), { onCustomAnchorAdd: s, onCustomAnchorRemove: c } = e;
|
|
57
|
-
return i.useEffect(() => (s(), () => c()), [s, c]), /* @__PURE__ */ p(w, { ...r, ...a, ref: n });
|
|
58
|
-
}
|
|
59
|
-
);
|
|
60
|
-
y.displayName = S;
|
|
61
|
-
var D = "PopoverTrigger", M = i.forwardRef(
|
|
62
|
-
(o, n) => {
|
|
63
|
-
const { __scopePopover: t, ...a } = o, e = f(D, t), r = g(t), s = _(n, e.triggerRef), c = /* @__PURE__ */ p(
|
|
64
|
-
b.button,
|
|
65
|
-
{
|
|
66
|
-
type: "button",
|
|
67
|
-
"aria-haspopup": "dialog",
|
|
68
|
-
"aria-expanded": e.open,
|
|
69
|
-
"aria-controls": e.contentId,
|
|
70
|
-
"data-state": G(e.open),
|
|
71
|
-
...a,
|
|
72
|
-
ref: s,
|
|
73
|
-
onClick: m(o.onClick, e.onOpenToggle)
|
|
74
|
-
}
|
|
75
|
-
);
|
|
76
|
-
return e.hasCustomAnchor ? c : /* @__PURE__ */ p(w, { asChild: !0, ...r, children: c });
|
|
77
|
-
}
|
|
78
|
-
);
|
|
79
|
-
M.displayName = D;
|
|
80
|
-
var O = "PopoverPortal", [oo, eo] = F(O, {
|
|
81
|
-
forceMount: void 0
|
|
82
|
-
}), k = /* @__PURE__ */ v((o) => {
|
|
83
|
-
const { __scopePopover: n, forceMount: t, children: a, container: e } = o, r = f(O, n);
|
|
84
|
-
return /* @__PURE__ */ p(oo, { scope: n, forceMount: t, children: /* @__PURE__ */ p(E, { present: t || r.open, children: /* @__PURE__ */ p(z, { asChild: !0, container: e, children: a }) }) });
|
|
85
|
-
}, "PopoverPortal");
|
|
86
|
-
k.displayName = O;
|
|
87
|
-
var P = "PopoverContent", I = i.forwardRef(
|
|
88
|
-
(o, n) => {
|
|
89
|
-
const t = eo(P, o.__scopePopover), { forceMount: a = t.forceMount, ...e } = o, r = f(P, o.__scopePopover);
|
|
90
|
-
return /* @__PURE__ */ p(E, { present: a || r.open, children: r.modal ? /* @__PURE__ */ p(to, { ...e, ref: n }) : /* @__PURE__ */ p(no, { ...e, ref: n }) });
|
|
91
|
-
}
|
|
92
|
-
);
|
|
93
|
-
I.displayName = P;
|
|
94
|
-
var ro = B("PopoverContent.RemoveScroll"), to = i.forwardRef(
|
|
95
|
-
(o, n) => {
|
|
96
|
-
const t = f(P, o.__scopePopover), a = i.useRef(null), e = _(n, a), r = i.useRef(!1);
|
|
97
|
-
return i.useEffect(() => {
|
|
98
|
-
const s = a.current;
|
|
99
|
-
if (s) return Q(s);
|
|
100
|
-
}, []), /* @__PURE__ */ p(X, { as: ro, allowPinchZoom: !0, children: /* @__PURE__ */ p(
|
|
101
|
-
T,
|
|
102
|
-
{
|
|
103
|
-
...o,
|
|
104
|
-
ref: e,
|
|
105
|
-
trapFocus: t.open,
|
|
106
|
-
disableOutsidePointerEvents: !0,
|
|
107
|
-
onCloseAutoFocus: m(o.onCloseAutoFocus, (s) => {
|
|
108
|
-
var c;
|
|
109
|
-
s.preventDefault(), r.current || (c = t.triggerRef.current) == null || c.focus();
|
|
110
|
-
}),
|
|
111
|
-
onPointerDownOutside: m(
|
|
112
|
-
o.onPointerDownOutside,
|
|
113
|
-
(s) => {
|
|
114
|
-
const c = s.detail.originalEvent, u = c.button === 0 && c.ctrlKey === !0, l = c.button === 2 || u;
|
|
115
|
-
r.current = l;
|
|
116
|
-
},
|
|
117
|
-
{ checkForDefaultPrevented: !1 }
|
|
118
|
-
),
|
|
119
|
-
onFocusOutside: m(
|
|
120
|
-
o.onFocusOutside,
|
|
121
|
-
(s) => s.preventDefault(),
|
|
122
|
-
{ checkForDefaultPrevented: !1 }
|
|
123
|
-
)
|
|
124
|
-
}
|
|
125
|
-
) });
|
|
126
|
-
}
|
|
127
|
-
), no = i.forwardRef(
|
|
128
|
-
(o, n) => {
|
|
129
|
-
const t = f(P, o.__scopePopover), a = i.useRef(!1), e = i.useRef(!1);
|
|
130
|
-
return /* @__PURE__ */ p(
|
|
131
|
-
T,
|
|
132
|
-
{
|
|
133
|
-
...o,
|
|
134
|
-
ref: n,
|
|
135
|
-
trapFocus: !1,
|
|
136
|
-
disableOutsidePointerEvents: !1,
|
|
137
|
-
onCloseAutoFocus: /* @__PURE__ */ v((r) => {
|
|
138
|
-
var s, c;
|
|
139
|
-
(s = o.onCloseAutoFocus) == null || s.call(o, r), r.defaultPrevented || (a.current || (c = t.triggerRef.current) == null || c.focus(), r.preventDefault()), a.current = !1, e.current = !1;
|
|
140
|
-
}, "onCloseAutoFocus"),
|
|
141
|
-
onInteractOutside: /* @__PURE__ */ v((r) => {
|
|
142
|
-
var u, l;
|
|
143
|
-
(u = o.onInteractOutside) == null || u.call(o, r), r.defaultPrevented || (a.current = !0, r.detail.originalEvent.type === "pointerdown" && (e.current = !0));
|
|
144
|
-
const s = r.target;
|
|
145
|
-
((l = t.triggerRef.current) == null ? void 0 : l.contains(s)) && r.preventDefault(), r.detail.originalEvent.type === "focusin" && e.current && r.preventDefault();
|
|
146
|
-
}, "onInteractOutside")
|
|
147
|
-
}
|
|
148
|
-
);
|
|
149
|
-
}
|
|
150
|
-
), T = i.forwardRef(
|
|
151
|
-
(o, n) => {
|
|
152
|
-
const {
|
|
153
|
-
__scopePopover: t,
|
|
154
|
-
trapFocus: a,
|
|
155
|
-
onOpenAutoFocus: e,
|
|
156
|
-
onCloseAutoFocus: r,
|
|
157
|
-
disableOutsidePointerEvents: s,
|
|
158
|
-
onEscapeKeyDown: c,
|
|
159
|
-
onPointerDownOutside: u,
|
|
160
|
-
onFocusOutside: l,
|
|
161
|
-
onInteractOutside: h,
|
|
162
|
-
...C
|
|
163
|
-
} = o, d = f(P, t), A = g(t);
|
|
164
|
-
return j(), /* @__PURE__ */ p(
|
|
165
|
-
U,
|
|
166
|
-
{
|
|
167
|
-
asChild: !0,
|
|
168
|
-
loop: !0,
|
|
169
|
-
trapped: a,
|
|
170
|
-
onMountAutoFocus: e,
|
|
171
|
-
onUnmountAutoFocus: r,
|
|
172
|
-
children: /* @__PURE__ */ p(
|
|
173
|
-
$,
|
|
174
|
-
{
|
|
175
|
-
asChild: !0,
|
|
176
|
-
disableOutsidePointerEvents: s,
|
|
177
|
-
onInteractOutside: h,
|
|
178
|
-
onEscapeKeyDown: c,
|
|
179
|
-
onPointerDownOutside: u,
|
|
180
|
-
onFocusOutside: l,
|
|
181
|
-
onDismiss: /* @__PURE__ */ v(() => d.onOpenChange(!1), "onDismiss"),
|
|
182
|
-
children: /* @__PURE__ */ p(
|
|
183
|
-
Z,
|
|
184
|
-
{
|
|
185
|
-
"data-state": G(d.open),
|
|
186
|
-
role: "dialog",
|
|
187
|
-
id: d.contentId,
|
|
188
|
-
...A,
|
|
189
|
-
...C,
|
|
190
|
-
ref: n,
|
|
191
|
-
style: {
|
|
192
|
-
...C.style,
|
|
193
|
-
"--radix-popover-content-transform-origin": "var(--radix-popper-transform-origin)",
|
|
194
|
-
"--radix-popover-content-available-width": "var(--radix-popper-available-width)",
|
|
195
|
-
"--radix-popover-content-available-height": "var(--radix-popper-available-height)",
|
|
196
|
-
"--radix-popover-trigger-width": "var(--radix-popper-anchor-width)",
|
|
197
|
-
"--radix-popover-trigger-height": "var(--radix-popper-anchor-height)"
|
|
198
|
-
}
|
|
199
|
-
}
|
|
200
|
-
)
|
|
201
|
-
}
|
|
202
|
-
)
|
|
203
|
-
}
|
|
204
|
-
);
|
|
205
|
-
}
|
|
206
|
-
), L = "PopoverClose", ao = i.forwardRef(
|
|
207
|
-
(o, n) => {
|
|
208
|
-
const { __scopePopover: t, ...a } = o, e = f(L, t);
|
|
209
|
-
return /* @__PURE__ */ p(
|
|
210
|
-
b.button,
|
|
211
|
-
{
|
|
212
|
-
type: "button",
|
|
213
|
-
...a,
|
|
214
|
-
ref: n,
|
|
215
|
-
onClick: m(o.onClick, () => e.onOpenChange(!1))
|
|
216
|
-
}
|
|
217
|
-
);
|
|
218
|
-
}
|
|
219
|
-
);
|
|
220
|
-
ao.displayName = L;
|
|
221
|
-
var so = "PopoverArrow", co = i.forwardRef(
|
|
222
|
-
(o, n) => {
|
|
223
|
-
const { __scopePopover: t, ...a } = o, e = g(t);
|
|
224
|
-
return /* @__PURE__ */ p(q, { ...e, ...a, ref: n });
|
|
225
|
-
}
|
|
226
|
-
);
|
|
227
|
-
co.displayName = so;
|
|
228
|
-
function G(o) {
|
|
229
|
-
return o ? "open" : "closed";
|
|
230
|
-
}
|
|
231
|
-
v(G, "getState");
|
|
232
|
-
var bo = N, Fo = y, No = M, So = k, yo = I;
|
|
233
|
-
export {
|
|
234
|
-
Fo as Anchor,
|
|
235
|
-
yo as Content,
|
|
236
|
-
N as Popover,
|
|
237
|
-
y as PopoverAnchor,
|
|
238
|
-
co as PopoverArrow,
|
|
239
|
-
ao as PopoverClose,
|
|
240
|
-
I as PopoverContent,
|
|
241
|
-
k as PopoverPortal,
|
|
242
|
-
M as PopoverTrigger,
|
|
243
|
-
So as Portal,
|
|
244
|
-
bo as Root,
|
|
245
|
-
No as Trigger,
|
|
246
|
-
Eo as createPopoverScope
|
|
247
|
-
};
|
|
@@ -1,224 +0,0 @@
|
|
|
1
|
-
var Pe = Object.defineProperty;
|
|
2
|
-
var l = (e, t) => Pe(e, "name", { value: t, configurable: !0 });
|
|
3
|
-
import * as s from "react";
|
|
4
|
-
import { useFloating as ye, offset as Ae, shift as ve, flip as Ce, size as be, arrow as Se, hide as Oe, limitShift as Re } from "../../../@floating-ui/react-dom/dist/floating-ui.react-dom.js";
|
|
5
|
-
import { Root as Ee } from "../../react-arrow/dist/index.js";
|
|
6
|
-
import { useComposedRefs as z } from "../../react-compose-refs/dist/index.js";
|
|
7
|
-
import { createContextScope as Ne } from "../../react-context/dist/index.js";
|
|
8
|
-
import { Primitive as L } from "../../react-primitive/dist/index.js";
|
|
9
|
-
import { useCallbackRef as _e } from "../../react-use-callback-ref/dist/index.js";
|
|
10
|
-
import { useLayoutEffect as j } from "../../react-use-layout-effect/dist/index.js";
|
|
11
|
-
import { useSize as $e } from "../../react-use-size/dist/index.js";
|
|
12
|
-
import { jsx as m } from "react/jsx-runtime";
|
|
13
|
-
import { autoUpdate as He } from "../../../@floating-ui/dom/dist/floating-ui.dom.js";
|
|
14
|
-
var _ = "Popper", [Z, Je] = Ne(_), [We, U] = Z(_), q = /* @__PURE__ */ l((e) => {
|
|
15
|
-
const { __scopePopper: t, children: a } = e, [r, i] = s.useState(null);
|
|
16
|
-
return /* @__PURE__ */ m(We, { scope: t, anchor: r, onAnchorChange: i, children: a });
|
|
17
|
-
}, "Popper");
|
|
18
|
-
q.displayName = _;
|
|
19
|
-
var G = "PopperAnchor", J = s.forwardRef(
|
|
20
|
-
(e, t) => {
|
|
21
|
-
const { __scopePopper: a, virtualRef: r, ...i } = e, o = U(G, a), n = s.useRef(null), x = z(t, n);
|
|
22
|
-
return s.useEffect(() => {
|
|
23
|
-
o.onAnchorChange((r == null ? void 0 : r.current) || n.current);
|
|
24
|
-
}), r ? null : /* @__PURE__ */ m(L.div, { ...i, ref: x });
|
|
25
|
-
}
|
|
26
|
-
);
|
|
27
|
-
J.displayName = G;
|
|
28
|
-
var $ = "PopperContent", [Ie, Ye] = Z($), K = s.forwardRef(
|
|
29
|
-
(e, t) => {
|
|
30
|
-
var M, X, D, F, k, B;
|
|
31
|
-
const {
|
|
32
|
-
__scopePopper: a,
|
|
33
|
-
side: r = "bottom",
|
|
34
|
-
sideOffset: i = 0,
|
|
35
|
-
align: o = "center",
|
|
36
|
-
alignOffset: n = 0,
|
|
37
|
-
arrowPadding: x = 0,
|
|
38
|
-
avoidCollisions: p = !0,
|
|
39
|
-
collisionBoundary: c = [],
|
|
40
|
-
collisionPadding: P = 0,
|
|
41
|
-
sticky: h = "partial",
|
|
42
|
-
hideWhenDetached: A = !1,
|
|
43
|
-
updatePositionStrategy: v = "optimized",
|
|
44
|
-
onPlaced: f,
|
|
45
|
-
...d
|
|
46
|
-
} = e, C = U($, a), [g, b] = s.useState(null), te = z(t, (y) => b(y)), [N, re] = s.useState(null), u = $e(N), oe = (u == null ? void 0 : u.width) ?? 0, H = (u == null ? void 0 : u.height) ?? 0, ne = r + (o !== "center" ? "-" + o : ""), ae = typeof P == "number" ? P : { top: 0, right: 0, bottom: 0, left: 0, ...P }, W = Array.isArray(c) ? c : [c], ie = W.length > 0, S = {
|
|
47
|
-
padding: ae,
|
|
48
|
-
boundary: W.filter(Xe),
|
|
49
|
-
// with `strategy: 'fixed'`, this is the only way to get it to respect boundaries
|
|
50
|
-
altBoundary: ie
|
|
51
|
-
}, { refs: se, floatingStyles: I, placement: pe, isPositioned: O, middlewareData: w } = ye({
|
|
52
|
-
// default to `fixed` strategy so users don't have to pick and we also avoid focus scroll issues
|
|
53
|
-
strategy: "fixed",
|
|
54
|
-
placement: ne,
|
|
55
|
-
whileElementsMounted: /* @__PURE__ */ l((...y) => He(...y, {
|
|
56
|
-
animationFrame: v === "always"
|
|
57
|
-
}), "whileElementsMounted"),
|
|
58
|
-
elements: {
|
|
59
|
-
reference: C.anchor
|
|
60
|
-
},
|
|
61
|
-
middleware: [
|
|
62
|
-
Ae({ mainAxis: i + H, alignmentAxis: n }),
|
|
63
|
-
p && ve({
|
|
64
|
-
mainAxis: !0,
|
|
65
|
-
crossAxis: !1,
|
|
66
|
-
limiter: h === "partial" ? Re() : void 0,
|
|
67
|
-
...S
|
|
68
|
-
}),
|
|
69
|
-
p && Ce({ ...S }),
|
|
70
|
-
be({
|
|
71
|
-
...S,
|
|
72
|
-
apply: /* @__PURE__ */ l(({ elements: y, rects: T, availableWidth: ge, availableHeight: ue }) => {
|
|
73
|
-
const { width: we, height: xe } = T.reference, E = y.floating.style;
|
|
74
|
-
E.setProperty("--radix-popper-available-width", `${ge}px`), E.setProperty("--radix-popper-available-height", `${ue}px`), E.setProperty("--radix-popper-anchor-width", `${we}px`), E.setProperty("--radix-popper-anchor-height", `${xe}px`);
|
|
75
|
-
}, "apply")
|
|
76
|
-
}),
|
|
77
|
-
N && Se({ element: N, padding: x }),
|
|
78
|
-
De({ arrowWidth: oe, arrowHeight: H }),
|
|
79
|
-
A && Oe({ strategy: "referenceHidden", ...S })
|
|
80
|
-
]
|
|
81
|
-
}), [Y, ce] = ee(pe), R = _e(f);
|
|
82
|
-
j(() => {
|
|
83
|
-
O && (R == null || R());
|
|
84
|
-
}, [O, R]);
|
|
85
|
-
const de = (M = w.arrow) == null ? void 0 : M.x, le = (X = w.arrow) == null ? void 0 : X.y, fe = ((D = w.arrow) == null ? void 0 : D.centerOffset) !== 0, [me, he] = s.useState();
|
|
86
|
-
return j(() => {
|
|
87
|
-
g && he(window.getComputedStyle(g).zIndex);
|
|
88
|
-
}, [g]), /* @__PURE__ */ m(
|
|
89
|
-
"div",
|
|
90
|
-
{
|
|
91
|
-
ref: se.setFloating,
|
|
92
|
-
"data-radix-popper-content-wrapper": "",
|
|
93
|
-
style: {
|
|
94
|
-
...I,
|
|
95
|
-
transform: O ? I.transform : "translate(0, -200%)",
|
|
96
|
-
// keep off the page when measuring
|
|
97
|
-
minWidth: "max-content",
|
|
98
|
-
zIndex: me,
|
|
99
|
-
"--radix-popper-transform-origin": [
|
|
100
|
-
(F = w.transformOrigin) == null ? void 0 : F.x,
|
|
101
|
-
(k = w.transformOrigin) == null ? void 0 : k.y
|
|
102
|
-
].join(" "),
|
|
103
|
-
// hide the content if using the hide middleware and should be hidden
|
|
104
|
-
// set visibility to hidden and disable pointer events so the UI behaves
|
|
105
|
-
// as if the PopperContent isn't there at all
|
|
106
|
-
...((B = w.hide) == null ? void 0 : B.referenceHidden) && {
|
|
107
|
-
visibility: "hidden",
|
|
108
|
-
pointerEvents: "none"
|
|
109
|
-
}
|
|
110
|
-
},
|
|
111
|
-
dir: e.dir,
|
|
112
|
-
children: /* @__PURE__ */ m(
|
|
113
|
-
Ie,
|
|
114
|
-
{
|
|
115
|
-
scope: a,
|
|
116
|
-
placedSide: Y,
|
|
117
|
-
onArrowChange: re,
|
|
118
|
-
arrowX: de,
|
|
119
|
-
arrowY: le,
|
|
120
|
-
shouldHideArrow: fe,
|
|
121
|
-
children: /* @__PURE__ */ m(
|
|
122
|
-
L.div,
|
|
123
|
-
{
|
|
124
|
-
"data-side": Y,
|
|
125
|
-
"data-align": ce,
|
|
126
|
-
...d,
|
|
127
|
-
ref: te,
|
|
128
|
-
style: {
|
|
129
|
-
...d.style,
|
|
130
|
-
// if the PopperContent hasn't been placed yet (not all measurements done)
|
|
131
|
-
// we prevent animations so that users's animation don't kick in too early referring wrong sides
|
|
132
|
-
animation: O ? void 0 : "none"
|
|
133
|
-
}
|
|
134
|
-
}
|
|
135
|
-
)
|
|
136
|
-
}
|
|
137
|
-
)
|
|
138
|
-
}
|
|
139
|
-
);
|
|
140
|
-
}
|
|
141
|
-
);
|
|
142
|
-
K.displayName = $;
|
|
143
|
-
var Q = "PopperArrow", Me = {
|
|
144
|
-
top: "bottom",
|
|
145
|
-
right: "left",
|
|
146
|
-
bottom: "top",
|
|
147
|
-
left: "right"
|
|
148
|
-
}, V = s.forwardRef(/* @__PURE__ */ l(function(t, a) {
|
|
149
|
-
const { __scopePopper: r, ...i } = t, o = Ye(Q, r), n = Me[o.placedSide];
|
|
150
|
-
return (
|
|
151
|
-
// we have to use an extra wrapper because `ResizeObserver` (used by `useSize`)
|
|
152
|
-
// doesn't report size as we'd expect on SVG elements.
|
|
153
|
-
// it reports their bounding box which is effectively the largest path inside the SVG.
|
|
154
|
-
/* @__PURE__ */ m(
|
|
155
|
-
"span",
|
|
156
|
-
{
|
|
157
|
-
ref: o.onArrowChange,
|
|
158
|
-
style: {
|
|
159
|
-
position: "absolute",
|
|
160
|
-
left: o.arrowX,
|
|
161
|
-
top: o.arrowY,
|
|
162
|
-
[n]: 0,
|
|
163
|
-
transformOrigin: {
|
|
164
|
-
top: "",
|
|
165
|
-
right: "0 0",
|
|
166
|
-
bottom: "center 0",
|
|
167
|
-
left: "100% 0"
|
|
168
|
-
}[o.placedSide],
|
|
169
|
-
transform: {
|
|
170
|
-
top: "translateY(100%)",
|
|
171
|
-
right: "translateY(50%) rotate(90deg) translateX(-50%)",
|
|
172
|
-
bottom: "rotate(180deg)",
|
|
173
|
-
left: "translateY(50%) rotate(-90deg) translateX(50%)"
|
|
174
|
-
}[o.placedSide],
|
|
175
|
-
visibility: o.shouldHideArrow ? "hidden" : void 0
|
|
176
|
-
},
|
|
177
|
-
children: /* @__PURE__ */ m(
|
|
178
|
-
Ee,
|
|
179
|
-
{
|
|
180
|
-
...i,
|
|
181
|
-
ref: a,
|
|
182
|
-
style: {
|
|
183
|
-
...i.style,
|
|
184
|
-
// ensures the element can be measured correctly (mostly for if SVG)
|
|
185
|
-
display: "block"
|
|
186
|
-
}
|
|
187
|
-
}
|
|
188
|
-
)
|
|
189
|
-
}
|
|
190
|
-
)
|
|
191
|
-
);
|
|
192
|
-
}, "PopperArrow2"));
|
|
193
|
-
V.displayName = Q;
|
|
194
|
-
function Xe(e) {
|
|
195
|
-
return e !== null;
|
|
196
|
-
}
|
|
197
|
-
l(Xe, "isNotNull");
|
|
198
|
-
var De = /* @__PURE__ */ l((e) => ({
|
|
199
|
-
name: "transformOrigin",
|
|
200
|
-
options: e,
|
|
201
|
-
fn(t) {
|
|
202
|
-
var C, g, b;
|
|
203
|
-
const { placement: a, rects: r, middlewareData: i } = t, n = ((C = i.arrow) == null ? void 0 : C.centerOffset) !== 0, x = n ? 0 : e.arrowWidth, p = n ? 0 : e.arrowHeight, [c, P] = ee(a), h = { start: "0%", center: "50%", end: "100%" }[P], A = (((g = i.arrow) == null ? void 0 : g.x) ?? 0) + x / 2, v = (((b = i.arrow) == null ? void 0 : b.y) ?? 0) + p / 2;
|
|
204
|
-
let f = "", d = "";
|
|
205
|
-
return c === "bottom" ? (f = n ? h : `${A}px`, d = `${-p}px`) : c === "top" ? (f = n ? h : `${A}px`, d = `${r.floating.height + p}px`) : c === "right" ? (f = `${-p}px`, d = n ? h : `${v}px`) : c === "left" && (f = `${r.floating.width + p}px`, d = n ? h : `${v}px`), { data: { x: f, y: d } };
|
|
206
|
-
}
|
|
207
|
-
}), "transformOrigin");
|
|
208
|
-
function ee(e) {
|
|
209
|
-
const [t, a = "center"] = e.split("-");
|
|
210
|
-
return [t, a];
|
|
211
|
-
}
|
|
212
|
-
l(ee, "getSideAndAlignFromPlacement");
|
|
213
|
-
var Ke = q, Qe = J, Ve = K, et = V;
|
|
214
|
-
export {
|
|
215
|
-
Qe as Anchor,
|
|
216
|
-
et as Arrow,
|
|
217
|
-
Ve as Content,
|
|
218
|
-
q as Popper,
|
|
219
|
-
J as PopperAnchor,
|
|
220
|
-
V as PopperArrow,
|
|
221
|
-
K as PopperContent,
|
|
222
|
-
Ke as Root,
|
|
223
|
-
Je as createPopperScope
|
|
224
|
-
};
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import * as r from "react";
|
|
2
|
-
import s from "react-dom";
|
|
3
|
-
import { Primitive as c } from "../../react-primitive/dist/index.js";
|
|
4
|
-
import { useLayoutEffect as u } from "../../react-use-layout-effect/dist/index.js";
|
|
5
|
-
import { jsx as l } from "react/jsx-runtime";
|
|
6
|
-
var p = "Portal", d = r.forwardRef((e, a) => {
|
|
7
|
-
var o;
|
|
8
|
-
const { container: f, ...i } = e, [m, n] = r.useState(!1);
|
|
9
|
-
u(() => n(!0), []);
|
|
10
|
-
const t = f || m && ((o = globalThis == null ? void 0 : globalThis.document) == null ? void 0 : o.body);
|
|
11
|
-
return t ? s.createPortal(/* @__PURE__ */ l(c.div, { ...i, ref: a }), t) : null;
|
|
12
|
-
});
|
|
13
|
-
d.displayName = p;
|
|
14
|
-
export {
|
|
15
|
-
d as Portal
|
|
16
|
-
};
|
|
@@ -1,77 +0,0 @@
|
|
|
1
|
-
var T = Object.defineProperty;
|
|
2
|
-
var u = (n, e) => T(n, "name", { value: e, configurable: !0 });
|
|
3
|
-
import * as a from "react";
|
|
4
|
-
import { useComposedRefs as R } from "../../react-compose-refs/dist/index.js";
|
|
5
|
-
import { useLayoutEffect as M } from "../../react-use-layout-effect/dist/index.js";
|
|
6
|
-
function v(n, e) {
|
|
7
|
-
return a.useReducer((r, t) => e[r][t] ?? r, n);
|
|
8
|
-
}
|
|
9
|
-
u(v, "useStateMachine");
|
|
10
|
-
var P = /* @__PURE__ */ u((n) => {
|
|
11
|
-
const { present: e, children: r } = n, t = w(e), i = typeof r == "function" ? r({ present: t.isPresent }) : a.Children.only(r), m = R(t.ref, y(i));
|
|
12
|
-
return typeof r == "function" || t.isPresent ? a.cloneElement(i, { ref: m }) : null;
|
|
13
|
-
}, "Presence");
|
|
14
|
-
P.displayName = "Presence";
|
|
15
|
-
function w(n) {
|
|
16
|
-
const [e, r] = a.useState(), t = a.useRef(null), i = a.useRef(n), m = a.useRef("none"), A = n ? "mounted" : "unmounted", [p, s] = v(A, {
|
|
17
|
-
mounted: {
|
|
18
|
-
UNMOUNT: "unmounted",
|
|
19
|
-
ANIMATION_OUT: "unmountSuspended"
|
|
20
|
-
},
|
|
21
|
-
unmountSuspended: {
|
|
22
|
-
MOUNT: "mounted",
|
|
23
|
-
ANIMATION_END: "unmounted"
|
|
24
|
-
},
|
|
25
|
-
unmounted: {
|
|
26
|
-
MOUNT: "mounted"
|
|
27
|
-
}
|
|
28
|
-
});
|
|
29
|
-
return a.useEffect(() => {
|
|
30
|
-
const o = N(t.current);
|
|
31
|
-
m.current = p === "mounted" ? o : "none";
|
|
32
|
-
}, [p]), M(() => {
|
|
33
|
-
const o = t.current, d = i.current;
|
|
34
|
-
if (d !== n) {
|
|
35
|
-
const l = m.current, c = N(o);
|
|
36
|
-
n ? s("MOUNT") : c === "none" || (o == null ? void 0 : o.display) === "none" ? s("UNMOUNT") : s(d && l !== c ? "ANIMATION_OUT" : "UNMOUNT"), i.current = n;
|
|
37
|
-
}
|
|
38
|
-
}, [n, s]), M(() => {
|
|
39
|
-
if (e) {
|
|
40
|
-
let o;
|
|
41
|
-
const d = e.ownerDocument.defaultView ?? window, f = /* @__PURE__ */ u((c) => {
|
|
42
|
-
const O = N(t.current).includes(c.animationName);
|
|
43
|
-
if (c.target === e && O && (s("ANIMATION_END"), !i.current)) {
|
|
44
|
-
const E = e.style.animationFillMode;
|
|
45
|
-
e.style.animationFillMode = "forwards", o = d.setTimeout(() => {
|
|
46
|
-
e.style.animationFillMode === "forwards" && (e.style.animationFillMode = E);
|
|
47
|
-
});
|
|
48
|
-
}
|
|
49
|
-
}, "handleAnimationEnd"), l = /* @__PURE__ */ u((c) => {
|
|
50
|
-
c.target === e && (m.current = N(t.current));
|
|
51
|
-
}, "handleAnimationStart");
|
|
52
|
-
return e.addEventListener("animationstart", l), e.addEventListener("animationcancel", f), e.addEventListener("animationend", f), () => {
|
|
53
|
-
d.clearTimeout(o), e.removeEventListener("animationstart", l), e.removeEventListener("animationcancel", f), e.removeEventListener("animationend", f);
|
|
54
|
-
};
|
|
55
|
-
} else
|
|
56
|
-
s("ANIMATION_END");
|
|
57
|
-
}, [e, s]), {
|
|
58
|
-
isPresent: ["mounted", "unmountSuspended"].includes(p),
|
|
59
|
-
ref: a.useCallback((o) => {
|
|
60
|
-
t.current = o ? getComputedStyle(o) : null, r(o);
|
|
61
|
-
}, [])
|
|
62
|
-
};
|
|
63
|
-
}
|
|
64
|
-
u(w, "usePresence");
|
|
65
|
-
function N(n) {
|
|
66
|
-
return (n == null ? void 0 : n.animationName) || "none";
|
|
67
|
-
}
|
|
68
|
-
u(N, "getAnimationName");
|
|
69
|
-
function y(n) {
|
|
70
|
-
var t, i;
|
|
71
|
-
let e = (t = Object.getOwnPropertyDescriptor(n.props, "ref")) == null ? void 0 : t.get, r = e && "isReactWarning" in e && e.isReactWarning;
|
|
72
|
-
return r ? n.ref : (e = (i = Object.getOwnPropertyDescriptor(n, "ref")) == null ? void 0 : i.get, r = e && "isReactWarning" in e && e.isReactWarning, r ? n.props.ref : n.props.ref || n.ref);
|
|
73
|
-
}
|
|
74
|
-
u(y, "getElementRef");
|
|
75
|
-
export {
|
|
76
|
-
P as Presence
|
|
77
|
-
};
|
|
@@ -1,39 +0,0 @@
|
|
|
1
|
-
var p = Object.defineProperty;
|
|
2
|
-
var o = (t, i) => p(t, "name", { value: i, configurable: !0 });
|
|
3
|
-
import * as c from "react";
|
|
4
|
-
import * as l from "react-dom";
|
|
5
|
-
import { createSlot as u } from "../../react-slot/dist/index.js";
|
|
6
|
-
import { jsx as v } from "react/jsx-runtime";
|
|
7
|
-
var d = [
|
|
8
|
-
"a",
|
|
9
|
-
"button",
|
|
10
|
-
"div",
|
|
11
|
-
"form",
|
|
12
|
-
"h2",
|
|
13
|
-
"h3",
|
|
14
|
-
"img",
|
|
15
|
-
"input",
|
|
16
|
-
"label",
|
|
17
|
-
"li",
|
|
18
|
-
"nav",
|
|
19
|
-
"ol",
|
|
20
|
-
"p",
|
|
21
|
-
"select",
|
|
22
|
-
"span",
|
|
23
|
-
"svg",
|
|
24
|
-
"ul"
|
|
25
|
-
], y = d.reduce((t, i) => {
|
|
26
|
-
const e = u(`Primitive.${i}`), r = c.forwardRef((m, s) => {
|
|
27
|
-
const { asChild: a, ...n } = m, f = a ? e : i;
|
|
28
|
-
return typeof window < "u" && (window[Symbol.for("radix-ui")] = !0), /* @__PURE__ */ v(f, { ...n, ref: s });
|
|
29
|
-
});
|
|
30
|
-
return r.displayName = `Primitive.${i}`, { ...t, [i]: r };
|
|
31
|
-
}, {});
|
|
32
|
-
function P(t, i) {
|
|
33
|
-
t && l.flushSync(() => t.dispatchEvent(i));
|
|
34
|
-
}
|
|
35
|
-
o(P, "dispatchDiscreteCustomEvent");
|
|
36
|
-
export {
|
|
37
|
-
y as Primitive,
|
|
38
|
-
P as dispatchDiscreteCustomEvent
|
|
39
|
-
};
|