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,430 +0,0 @@
|
|
|
1
|
-
var st = Object.defineProperty;
|
|
2
|
-
var u = (t, e) => st(t, "name", { value: e, configurable: !0 });
|
|
3
|
-
import { offset as rt, shift as ct, flip as lt, size as ft, hide as ut, limitShift as ht, computePosition as at, arrow as dt } from "../../core/dist/floating-ui.core.js";
|
|
4
|
-
import { createCoords as x, round as H, max as F, min as V, rectToClientRect as Q, floor as A } from "../../utils/dist/floating-ui.utils.js";
|
|
5
|
-
import { isElement as R, getDocumentElement as b, getOverflowAncestors as $, getComputedStyle as O, isHTMLElement as C, getWindow as T, isTopLayer as M, getParentNode as B, isLastTraversableNode as N, isTableElement as gt, isContainingBlock as Y, getContainingBlock as pt, getNodeName as _, isOverflowElement as q, getNodeScroll as I, getFrameElement as j, isWebKit as Z } from "../../utils/dist/floating-ui.utils.dom.js";
|
|
6
|
-
function X(t) {
|
|
7
|
-
const e = O(t);
|
|
8
|
-
let i = parseFloat(e.width) || 0, n = parseFloat(e.height) || 0;
|
|
9
|
-
const o = C(t), r = o ? t.offsetWidth : i, s = o ? t.offsetHeight : n, c = H(i) !== r || H(n) !== s;
|
|
10
|
-
return c && (i = r, n = s), {
|
|
11
|
-
width: i,
|
|
12
|
-
height: n,
|
|
13
|
-
$: c
|
|
14
|
-
};
|
|
15
|
-
}
|
|
16
|
-
u(X, "getCssDimensions");
|
|
17
|
-
function k(t) {
|
|
18
|
-
return R(t) ? t : t.contextElement;
|
|
19
|
-
}
|
|
20
|
-
u(k, "unwrapElement");
|
|
21
|
-
function W(t) {
|
|
22
|
-
const e = k(t);
|
|
23
|
-
if (!C(e))
|
|
24
|
-
return x(1);
|
|
25
|
-
const i = e.getBoundingClientRect(), {
|
|
26
|
-
width: n,
|
|
27
|
-
height: o,
|
|
28
|
-
$: r
|
|
29
|
-
} = X(e);
|
|
30
|
-
let s = (r ? H(i.width) : i.width) / n, c = (r ? H(i.height) : i.height) / o;
|
|
31
|
-
return (!s || !Number.isFinite(s)) && (s = 1), (!c || !Number.isFinite(c)) && (c = 1), {
|
|
32
|
-
x: s,
|
|
33
|
-
y: c
|
|
34
|
-
};
|
|
35
|
-
}
|
|
36
|
-
u(W, "getScale");
|
|
37
|
-
const wt = /* @__PURE__ */ x(0);
|
|
38
|
-
function tt(t) {
|
|
39
|
-
const e = T(t);
|
|
40
|
-
return !Z() || !e.visualViewport ? wt : {
|
|
41
|
-
x: e.visualViewport.offsetLeft,
|
|
42
|
-
y: e.visualViewport.offsetTop
|
|
43
|
-
};
|
|
44
|
-
}
|
|
45
|
-
u(tt, "getVisualOffsets");
|
|
46
|
-
function mt(t, e, i) {
|
|
47
|
-
return e === void 0 && (e = !1), !i || e && i !== T(t) ? !1 : e;
|
|
48
|
-
}
|
|
49
|
-
u(mt, "shouldAddVisualOffsets");
|
|
50
|
-
function E(t, e, i, n) {
|
|
51
|
-
e === void 0 && (e = !1), i === void 0 && (i = !1);
|
|
52
|
-
const o = t.getBoundingClientRect(), r = k(t);
|
|
53
|
-
let s = x(1);
|
|
54
|
-
e && (n ? R(n) && (s = W(n)) : s = W(t));
|
|
55
|
-
const c = mt(r, i, n) ? tt(r) : x(0);
|
|
56
|
-
let l = (o.left + c.x) / s.x, f = (o.top + c.y) / s.y, h = o.width / s.x, a = o.height / s.y;
|
|
57
|
-
if (r) {
|
|
58
|
-
const w = T(r), d = n && R(n) ? T(n) : n;
|
|
59
|
-
let y = w, p = j(y);
|
|
60
|
-
for (; p && n && d !== y; ) {
|
|
61
|
-
const m = W(p), g = p.getBoundingClientRect(), v = O(p), L = g.left + (p.clientLeft + parseFloat(v.paddingLeft)) * m.x, z = g.top + (p.clientTop + parseFloat(v.paddingTop)) * m.y;
|
|
62
|
-
l *= m.x, f *= m.y, h *= m.x, a *= m.y, l += L, f += z, y = T(p), p = j(y);
|
|
63
|
-
}
|
|
64
|
-
}
|
|
65
|
-
return Q({
|
|
66
|
-
width: h,
|
|
67
|
-
height: a,
|
|
68
|
-
x: l,
|
|
69
|
-
y: f
|
|
70
|
-
});
|
|
71
|
-
}
|
|
72
|
-
u(E, "getBoundingClientRect");
|
|
73
|
-
function P(t, e) {
|
|
74
|
-
const i = I(t).scrollLeft;
|
|
75
|
-
return e ? e.left + i : E(b(t)).left + i;
|
|
76
|
-
}
|
|
77
|
-
u(P, "getWindowScrollBarX");
|
|
78
|
-
function et(t, e, i) {
|
|
79
|
-
i === void 0 && (i = !1);
|
|
80
|
-
const n = t.getBoundingClientRect(), o = n.left + e.scrollLeft - (i ? 0 : (
|
|
81
|
-
// RTL <body> scrollbar.
|
|
82
|
-
P(t, n)
|
|
83
|
-
)), r = n.top + e.scrollTop;
|
|
84
|
-
return {
|
|
85
|
-
x: o,
|
|
86
|
-
y: r
|
|
87
|
-
};
|
|
88
|
-
}
|
|
89
|
-
u(et, "getHTMLOffset");
|
|
90
|
-
function xt(t) {
|
|
91
|
-
let {
|
|
92
|
-
elements: e,
|
|
93
|
-
rect: i,
|
|
94
|
-
offsetParent: n,
|
|
95
|
-
strategy: o
|
|
96
|
-
} = t;
|
|
97
|
-
const r = o === "fixed", s = b(n), c = e ? M(e.floating) : !1;
|
|
98
|
-
if (n === s || c && r)
|
|
99
|
-
return i;
|
|
100
|
-
let l = {
|
|
101
|
-
scrollLeft: 0,
|
|
102
|
-
scrollTop: 0
|
|
103
|
-
}, f = x(1);
|
|
104
|
-
const h = x(0), a = C(n);
|
|
105
|
-
if ((a || !a && !r) && ((_(n) !== "body" || q(s)) && (l = I(n)), C(n))) {
|
|
106
|
-
const d = E(n);
|
|
107
|
-
f = W(n), h.x = d.x + n.clientLeft, h.y = d.y + n.clientTop;
|
|
108
|
-
}
|
|
109
|
-
const w = s && !a && !r ? et(s, l, !0) : x(0);
|
|
110
|
-
return {
|
|
111
|
-
width: i.width * f.x,
|
|
112
|
-
height: i.height * f.y,
|
|
113
|
-
x: i.x * f.x - l.scrollLeft * f.x + h.x + w.x,
|
|
114
|
-
y: i.y * f.y - l.scrollTop * f.y + h.y + w.y
|
|
115
|
-
};
|
|
116
|
-
}
|
|
117
|
-
u(xt, "convertOffsetParentRelativeRectToViewportRelativeRect");
|
|
118
|
-
function yt(t) {
|
|
119
|
-
return Array.from(t.getClientRects());
|
|
120
|
-
}
|
|
121
|
-
u(yt, "getClientRects");
|
|
122
|
-
function vt(t) {
|
|
123
|
-
const e = b(t), i = I(t), n = t.ownerDocument.body, o = F(e.scrollWidth, e.clientWidth, n.scrollWidth, n.clientWidth), r = F(e.scrollHeight, e.clientHeight, n.scrollHeight, n.clientHeight);
|
|
124
|
-
let s = -i.scrollLeft + P(t);
|
|
125
|
-
const c = -i.scrollTop;
|
|
126
|
-
return O(n).direction === "rtl" && (s += F(e.clientWidth, n.clientWidth) - o), {
|
|
127
|
-
width: o,
|
|
128
|
-
height: r,
|
|
129
|
-
x: s,
|
|
130
|
-
y: c
|
|
131
|
-
};
|
|
132
|
-
}
|
|
133
|
-
u(vt, "getDocumentRect");
|
|
134
|
-
function Rt(t, e) {
|
|
135
|
-
const i = T(t), n = b(t), o = i.visualViewport;
|
|
136
|
-
let r = n.clientWidth, s = n.clientHeight, c = 0, l = 0;
|
|
137
|
-
if (o) {
|
|
138
|
-
r = o.width, s = o.height;
|
|
139
|
-
const f = Z();
|
|
140
|
-
(!f || f && e === "fixed") && (c = o.offsetLeft, l = o.offsetTop);
|
|
141
|
-
}
|
|
142
|
-
return {
|
|
143
|
-
width: r,
|
|
144
|
-
height: s,
|
|
145
|
-
x: c,
|
|
146
|
-
y: l
|
|
147
|
-
};
|
|
148
|
-
}
|
|
149
|
-
u(Rt, "getViewportRect");
|
|
150
|
-
const Ot = /* @__PURE__ */ new Set(["absolute", "fixed"]);
|
|
151
|
-
function bt(t, e) {
|
|
152
|
-
const i = E(t, !0, e === "fixed"), n = i.top + t.clientTop, o = i.left + t.clientLeft, r = C(t) ? W(t) : x(1), s = t.clientWidth * r.x, c = t.clientHeight * r.y, l = o * r.x, f = n * r.y;
|
|
153
|
-
return {
|
|
154
|
-
width: s,
|
|
155
|
-
height: c,
|
|
156
|
-
x: l,
|
|
157
|
-
y: f
|
|
158
|
-
};
|
|
159
|
-
}
|
|
160
|
-
u(bt, "getInnerBoundingClientRect");
|
|
161
|
-
function G(t, e, i) {
|
|
162
|
-
let n;
|
|
163
|
-
if (e === "viewport")
|
|
164
|
-
n = Rt(t, i);
|
|
165
|
-
else if (e === "document")
|
|
166
|
-
n = vt(b(t));
|
|
167
|
-
else if (R(e))
|
|
168
|
-
n = bt(e, i);
|
|
169
|
-
else {
|
|
170
|
-
const o = tt(t);
|
|
171
|
-
n = {
|
|
172
|
-
x: e.x - o.x,
|
|
173
|
-
y: e.y - o.y,
|
|
174
|
-
width: e.width,
|
|
175
|
-
height: e.height
|
|
176
|
-
};
|
|
177
|
-
}
|
|
178
|
-
return Q(n);
|
|
179
|
-
}
|
|
180
|
-
u(G, "getClientRectFromClippingAncestor");
|
|
181
|
-
function it(t, e) {
|
|
182
|
-
const i = B(t);
|
|
183
|
-
return i === e || !R(i) || N(i) ? !1 : O(i).position === "fixed" || it(i, e);
|
|
184
|
-
}
|
|
185
|
-
u(it, "hasFixedPositionAncestor");
|
|
186
|
-
function Ct(t, e) {
|
|
187
|
-
const i = e.get(t);
|
|
188
|
-
if (i)
|
|
189
|
-
return i;
|
|
190
|
-
let n = $(t, [], !1).filter((c) => R(c) && _(c) !== "body"), o = null;
|
|
191
|
-
const r = O(t).position === "fixed";
|
|
192
|
-
let s = r ? B(t) : t;
|
|
193
|
-
for (; R(s) && !N(s); ) {
|
|
194
|
-
const c = O(s), l = Y(s);
|
|
195
|
-
!l && c.position === "fixed" && (o = null), (r ? !l && !o : !l && c.position === "static" && !!o && Ot.has(o.position) || q(s) && !l && it(t, s)) ? n = n.filter((h) => h !== s) : o = c, s = B(s);
|
|
196
|
-
}
|
|
197
|
-
return e.set(t, n), n;
|
|
198
|
-
}
|
|
199
|
-
u(Ct, "getClippingElementAncestors");
|
|
200
|
-
function Lt(t) {
|
|
201
|
-
let {
|
|
202
|
-
element: e,
|
|
203
|
-
boundary: i,
|
|
204
|
-
rootBoundary: n,
|
|
205
|
-
strategy: o
|
|
206
|
-
} = t;
|
|
207
|
-
const s = [...i === "clippingAncestors" ? M(e) ? [] : Ct(e, this._c) : [].concat(i), n], c = s[0], l = s.reduce((f, h) => {
|
|
208
|
-
const a = G(e, h, o);
|
|
209
|
-
return f.top = F(a.top, f.top), f.right = V(a.right, f.right), f.bottom = V(a.bottom, f.bottom), f.left = F(a.left, f.left), f;
|
|
210
|
-
}, G(e, c, o));
|
|
211
|
-
return {
|
|
212
|
-
width: l.right - l.left,
|
|
213
|
-
height: l.bottom - l.top,
|
|
214
|
-
x: l.left,
|
|
215
|
-
y: l.top
|
|
216
|
-
};
|
|
217
|
-
}
|
|
218
|
-
u(Lt, "getClippingRect");
|
|
219
|
-
function Tt(t) {
|
|
220
|
-
const {
|
|
221
|
-
width: e,
|
|
222
|
-
height: i
|
|
223
|
-
} = X(t);
|
|
224
|
-
return {
|
|
225
|
-
width: e,
|
|
226
|
-
height: i
|
|
227
|
-
};
|
|
228
|
-
}
|
|
229
|
-
u(Tt, "getDimensions");
|
|
230
|
-
function Et(t, e, i) {
|
|
231
|
-
const n = C(e), o = b(e), r = i === "fixed", s = E(t, !0, r, e);
|
|
232
|
-
let c = {
|
|
233
|
-
scrollLeft: 0,
|
|
234
|
-
scrollTop: 0
|
|
235
|
-
};
|
|
236
|
-
const l = x(0);
|
|
237
|
-
function f() {
|
|
238
|
-
l.x = P(o);
|
|
239
|
-
}
|
|
240
|
-
if (u(f, "setLeftRTLScrollbarOffset"), n || !n && !r)
|
|
241
|
-
if ((_(e) !== "body" || q(o)) && (c = I(e)), n) {
|
|
242
|
-
const d = E(e, !0, r, e);
|
|
243
|
-
l.x = d.x + e.clientLeft, l.y = d.y + e.clientTop;
|
|
244
|
-
} else o && f();
|
|
245
|
-
r && !n && o && f();
|
|
246
|
-
const h = o && !n && !r ? et(o, c) : x(0), a = s.left + c.scrollLeft - l.x - h.x, w = s.top + c.scrollTop - l.y - h.y;
|
|
247
|
-
return {
|
|
248
|
-
x: a,
|
|
249
|
-
y: w,
|
|
250
|
-
width: s.width,
|
|
251
|
-
height: s.height
|
|
252
|
-
};
|
|
253
|
-
}
|
|
254
|
-
u(Et, "getRectRelativeToOffsetParent");
|
|
255
|
-
function S(t) {
|
|
256
|
-
return O(t).position === "static";
|
|
257
|
-
}
|
|
258
|
-
u(S, "isStaticPositioned");
|
|
259
|
-
function J(t, e) {
|
|
260
|
-
if (!C(t) || O(t).position === "fixed")
|
|
261
|
-
return null;
|
|
262
|
-
if (e)
|
|
263
|
-
return e(t);
|
|
264
|
-
let i = t.offsetParent;
|
|
265
|
-
return b(t) === i && (i = i.ownerDocument.body), i;
|
|
266
|
-
}
|
|
267
|
-
u(J, "getTrueOffsetParent");
|
|
268
|
-
function nt(t, e) {
|
|
269
|
-
const i = T(t);
|
|
270
|
-
if (M(t))
|
|
271
|
-
return i;
|
|
272
|
-
if (!C(t)) {
|
|
273
|
-
let o = B(t);
|
|
274
|
-
for (; o && !N(o); ) {
|
|
275
|
-
if (R(o) && !S(o))
|
|
276
|
-
return o;
|
|
277
|
-
o = B(o);
|
|
278
|
-
}
|
|
279
|
-
return i;
|
|
280
|
-
}
|
|
281
|
-
let n = J(t, e);
|
|
282
|
-
for (; n && gt(n) && S(n); )
|
|
283
|
-
n = J(n, e);
|
|
284
|
-
return n && N(n) && S(n) && !Y(n) ? i : n || pt(t) || i;
|
|
285
|
-
}
|
|
286
|
-
u(nt, "getOffsetParent");
|
|
287
|
-
const Ft = /* @__PURE__ */ u(async function(t) {
|
|
288
|
-
const e = this.getOffsetParent || nt, i = this.getDimensions, n = await i(t.floating);
|
|
289
|
-
return {
|
|
290
|
-
reference: Et(t.reference, await e(t.floating), t.strategy),
|
|
291
|
-
floating: {
|
|
292
|
-
x: 0,
|
|
293
|
-
y: 0,
|
|
294
|
-
width: n.width,
|
|
295
|
-
height: n.height
|
|
296
|
-
}
|
|
297
|
-
};
|
|
298
|
-
}, "getElementRects");
|
|
299
|
-
function Wt(t) {
|
|
300
|
-
return O(t).direction === "rtl";
|
|
301
|
-
}
|
|
302
|
-
u(Wt, "isRTL");
|
|
303
|
-
const Bt = {
|
|
304
|
-
convertOffsetParentRelativeRectToViewportRelativeRect: xt,
|
|
305
|
-
getDocumentElement: b,
|
|
306
|
-
getClippingRect: Lt,
|
|
307
|
-
getOffsetParent: nt,
|
|
308
|
-
getElementRects: Ft,
|
|
309
|
-
getClientRects: yt,
|
|
310
|
-
getDimensions: Tt,
|
|
311
|
-
getScale: W,
|
|
312
|
-
isElement: R,
|
|
313
|
-
isRTL: Wt
|
|
314
|
-
};
|
|
315
|
-
function ot(t, e) {
|
|
316
|
-
return t.x === e.x && t.y === e.y && t.width === e.width && t.height === e.height;
|
|
317
|
-
}
|
|
318
|
-
u(ot, "rectsAreEqual");
|
|
319
|
-
function zt(t, e) {
|
|
320
|
-
let i = null, n;
|
|
321
|
-
const o = b(t);
|
|
322
|
-
function r() {
|
|
323
|
-
var c;
|
|
324
|
-
clearTimeout(n), (c = i) == null || c.disconnect(), i = null;
|
|
325
|
-
}
|
|
326
|
-
u(r, "cleanup");
|
|
327
|
-
function s(c, l) {
|
|
328
|
-
c === void 0 && (c = !1), l === void 0 && (l = 1), r();
|
|
329
|
-
const f = t.getBoundingClientRect(), {
|
|
330
|
-
left: h,
|
|
331
|
-
top: a,
|
|
332
|
-
width: w,
|
|
333
|
-
height: d
|
|
334
|
-
} = f;
|
|
335
|
-
if (c || e(), !w || !d)
|
|
336
|
-
return;
|
|
337
|
-
const y = A(a), p = A(o.clientWidth - (h + w)), m = A(o.clientHeight - (a + d)), g = A(h), L = {
|
|
338
|
-
rootMargin: -y + "px " + -p + "px " + -m + "px " + -g + "px",
|
|
339
|
-
threshold: F(0, V(1, l)) || 1
|
|
340
|
-
};
|
|
341
|
-
let z = !0;
|
|
342
|
-
function U(K) {
|
|
343
|
-
const D = K[0].intersectionRatio;
|
|
344
|
-
if (D !== l) {
|
|
345
|
-
if (!z)
|
|
346
|
-
return s();
|
|
347
|
-
D ? s(!1, D) : n = setTimeout(() => {
|
|
348
|
-
s(!1, 1e-7);
|
|
349
|
-
}, 1e3);
|
|
350
|
-
}
|
|
351
|
-
D === 1 && !ot(f, t.getBoundingClientRect()) && s(), z = !1;
|
|
352
|
-
}
|
|
353
|
-
u(U, "handleObserve");
|
|
354
|
-
try {
|
|
355
|
-
i = new IntersectionObserver(U, {
|
|
356
|
-
...L,
|
|
357
|
-
// Handle <iframe>s
|
|
358
|
-
root: o.ownerDocument
|
|
359
|
-
});
|
|
360
|
-
} catch {
|
|
361
|
-
i = new IntersectionObserver(U, L);
|
|
362
|
-
}
|
|
363
|
-
i.observe(t);
|
|
364
|
-
}
|
|
365
|
-
return u(s, "refresh"), s(!0), r;
|
|
366
|
-
}
|
|
367
|
-
u(zt, "observeMove");
|
|
368
|
-
function It(t, e, i, n) {
|
|
369
|
-
n === void 0 && (n = {});
|
|
370
|
-
const {
|
|
371
|
-
ancestorScroll: o = !0,
|
|
372
|
-
ancestorResize: r = !0,
|
|
373
|
-
elementResize: s = typeof ResizeObserver == "function",
|
|
374
|
-
layoutShift: c = typeof IntersectionObserver == "function",
|
|
375
|
-
animationFrame: l = !1
|
|
376
|
-
} = n, f = k(t), h = o || r ? [...f ? $(f) : [], ...$(e)] : [];
|
|
377
|
-
h.forEach((g) => {
|
|
378
|
-
o && g.addEventListener("scroll", i, {
|
|
379
|
-
passive: !0
|
|
380
|
-
}), r && g.addEventListener("resize", i);
|
|
381
|
-
});
|
|
382
|
-
const a = f && c ? zt(f, i) : null;
|
|
383
|
-
let w = -1, d = null;
|
|
384
|
-
s && (d = new ResizeObserver((g) => {
|
|
385
|
-
let [v] = g;
|
|
386
|
-
v && v.target === f && d && (d.unobserve(e), cancelAnimationFrame(w), w = requestAnimationFrame(() => {
|
|
387
|
-
var L;
|
|
388
|
-
(L = d) == null || L.observe(e);
|
|
389
|
-
})), i();
|
|
390
|
-
}), f && !l && d.observe(f), d.observe(e));
|
|
391
|
-
let y, p = l ? E(t) : null;
|
|
392
|
-
l && m();
|
|
393
|
-
function m() {
|
|
394
|
-
const g = E(t);
|
|
395
|
-
p && !ot(p, g) && i(), p = g, y = requestAnimationFrame(m);
|
|
396
|
-
}
|
|
397
|
-
return u(m, "frameLoop"), i(), () => {
|
|
398
|
-
var g;
|
|
399
|
-
h.forEach((v) => {
|
|
400
|
-
o && v.removeEventListener("scroll", i), r && v.removeEventListener("resize", i);
|
|
401
|
-
}), a == null || a(), (g = d) == null || g.disconnect(), d = null, l && cancelAnimationFrame(y);
|
|
402
|
-
};
|
|
403
|
-
}
|
|
404
|
-
u(It, "autoUpdate");
|
|
405
|
-
const St = rt, Vt = ct, $t = lt, Mt = ft, _t = ut, qt = dt, kt = ht, Pt = /* @__PURE__ */ u((t, e, i) => {
|
|
406
|
-
const n = /* @__PURE__ */ new Map(), o = {
|
|
407
|
-
platform: Bt,
|
|
408
|
-
...i
|
|
409
|
-
}, r = {
|
|
410
|
-
...o.platform,
|
|
411
|
-
_c: n
|
|
412
|
-
};
|
|
413
|
-
return at(t, e, {
|
|
414
|
-
...o,
|
|
415
|
-
platform: r
|
|
416
|
-
});
|
|
417
|
-
}, "computePosition");
|
|
418
|
-
export {
|
|
419
|
-
qt as arrow,
|
|
420
|
-
It as autoUpdate,
|
|
421
|
-
Pt as computePosition,
|
|
422
|
-
$t as flip,
|
|
423
|
-
$ as getOverflowAncestors,
|
|
424
|
-
_t as hide,
|
|
425
|
-
kt as limitShift,
|
|
426
|
-
St as offset,
|
|
427
|
-
Bt as platform,
|
|
428
|
-
Vt as shift,
|
|
429
|
-
Mt as size
|
|
430
|
-
};
|
|
@@ -1,215 +0,0 @@
|
|
|
1
|
-
var J = Object.defineProperty;
|
|
2
|
-
var o = (e, t) => J(e, "name", { value: t, configurable: !0 });
|
|
3
|
-
import { computePosition as K, offset as N, shift as Q, flip as T, size as X, hide as Y, limitShift as Z, arrow as L } from "../../dom/dist/floating-ui.dom.js";
|
|
4
|
-
import { autoUpdate as he, platform as we } from "../../dom/dist/floating-ui.dom.js";
|
|
5
|
-
import * as f from "react";
|
|
6
|
-
import { useLayoutEffect as b } from "react";
|
|
7
|
-
import * as ee from "react-dom";
|
|
8
|
-
var te = typeof document < "u", ne = /* @__PURE__ */ o(function() {
|
|
9
|
-
}, "noop"), R = te ? b : ne;
|
|
10
|
-
function x(e, t) {
|
|
11
|
-
if (e === t)
|
|
12
|
-
return !0;
|
|
13
|
-
if (typeof e != typeof t)
|
|
14
|
-
return !1;
|
|
15
|
-
if (typeof e == "function" && e.toString() === t.toString())
|
|
16
|
-
return !0;
|
|
17
|
-
let n, r, s;
|
|
18
|
-
if (e && t && typeof e == "object") {
|
|
19
|
-
if (Array.isArray(e)) {
|
|
20
|
-
if (n = e.length, n !== t.length) return !1;
|
|
21
|
-
for (r = n; r-- !== 0; )
|
|
22
|
-
if (!x(e[r], t[r]))
|
|
23
|
-
return !1;
|
|
24
|
-
return !0;
|
|
25
|
-
}
|
|
26
|
-
if (s = Object.keys(e), n = s.length, n !== Object.keys(t).length)
|
|
27
|
-
return !1;
|
|
28
|
-
for (r = n; r-- !== 0; )
|
|
29
|
-
if (!{}.hasOwnProperty.call(t, s[r]))
|
|
30
|
-
return !1;
|
|
31
|
-
for (r = n; r-- !== 0; ) {
|
|
32
|
-
const g = s[r];
|
|
33
|
-
if (!(g === "_owner" && e.$$typeof) && !x(e[g], t[g]))
|
|
34
|
-
return !1;
|
|
35
|
-
}
|
|
36
|
-
return !0;
|
|
37
|
-
}
|
|
38
|
-
return e !== e && t !== t;
|
|
39
|
-
}
|
|
40
|
-
o(x, "deepEqual");
|
|
41
|
-
function q(e) {
|
|
42
|
-
return typeof window > "u" ? 1 : (e.ownerDocument.defaultView || window).devicePixelRatio || 1;
|
|
43
|
-
}
|
|
44
|
-
o(q, "getDPR");
|
|
45
|
-
function A(e, t) {
|
|
46
|
-
const n = q(e);
|
|
47
|
-
return Math.round(t * n) / n;
|
|
48
|
-
}
|
|
49
|
-
o(A, "roundByDPR");
|
|
50
|
-
function D(e) {
|
|
51
|
-
const t = f.useRef(e);
|
|
52
|
-
return R(() => {
|
|
53
|
-
t.current = e;
|
|
54
|
-
}), t;
|
|
55
|
-
}
|
|
56
|
-
o(D, "useLatestRef");
|
|
57
|
-
function se(e) {
|
|
58
|
-
e === void 0 && (e = {});
|
|
59
|
-
const {
|
|
60
|
-
placement: t = "bottom",
|
|
61
|
-
strategy: n = "absolute",
|
|
62
|
-
middleware: r = [],
|
|
63
|
-
platform: s,
|
|
64
|
-
elements: {
|
|
65
|
-
reference: g,
|
|
66
|
-
floating: B
|
|
67
|
-
} = {},
|
|
68
|
-
transform: E = !0,
|
|
69
|
-
whileElementsMounted: C,
|
|
70
|
-
open: M
|
|
71
|
-
} = e, [u, O] = f.useState({
|
|
72
|
-
x: 0,
|
|
73
|
-
y: 0,
|
|
74
|
-
strategy: n,
|
|
75
|
-
placement: t,
|
|
76
|
-
middlewareData: {},
|
|
77
|
-
isPositioned: !1
|
|
78
|
-
}), [S, U] = f.useState(r);
|
|
79
|
-
x(S, r) || U(r);
|
|
80
|
-
const [V, W] = f.useState(null), [G, H] = f.useState(null), _ = f.useCallback((i) => {
|
|
81
|
-
i !== d.current && (d.current = i, W(i));
|
|
82
|
-
}, []), v = f.useCallback((i) => {
|
|
83
|
-
i !== m.current && (m.current = i, H(i));
|
|
84
|
-
}, []), l = g || V, c = B || G, d = f.useRef(null), m = f.useRef(null), h = f.useRef(u), I = C != null, P = D(C), $ = D(s), F = D(M), y = f.useCallback(() => {
|
|
85
|
-
if (!d.current || !m.current)
|
|
86
|
-
return;
|
|
87
|
-
const i = {
|
|
88
|
-
placement: t,
|
|
89
|
-
strategy: n,
|
|
90
|
-
middleware: S
|
|
91
|
-
};
|
|
92
|
-
$.current && (i.platform = $.current), K(d.current, m.current, i).then((w) => {
|
|
93
|
-
const p = {
|
|
94
|
-
...w,
|
|
95
|
-
// The floating element's position may be recomputed while it's closed
|
|
96
|
-
// but still mounted (such as when transitioning out). To ensure
|
|
97
|
-
// `isPositioned` will be `false` initially on the next open, avoid
|
|
98
|
-
// setting it to `true` when `open === false` (must be specified).
|
|
99
|
-
isPositioned: F.current !== !1
|
|
100
|
-
};
|
|
101
|
-
k.current && !x(h.current, p) && (h.current = p, ee.flushSync(() => {
|
|
102
|
-
O(p);
|
|
103
|
-
}));
|
|
104
|
-
});
|
|
105
|
-
}, [S, t, n, $, F]);
|
|
106
|
-
R(() => {
|
|
107
|
-
M === !1 && h.current.isPositioned && (h.current.isPositioned = !1, O((i) => ({
|
|
108
|
-
...i,
|
|
109
|
-
isPositioned: !1
|
|
110
|
-
})));
|
|
111
|
-
}, [M]);
|
|
112
|
-
const k = f.useRef(!1);
|
|
113
|
-
R(() => (k.current = !0, () => {
|
|
114
|
-
k.current = !1;
|
|
115
|
-
}), []), R(() => {
|
|
116
|
-
if (l && (d.current = l), c && (m.current = c), l && c) {
|
|
117
|
-
if (P.current)
|
|
118
|
-
return P.current(l, c, y);
|
|
119
|
-
y();
|
|
120
|
-
}
|
|
121
|
-
}, [l, c, y, P, I]);
|
|
122
|
-
const j = f.useMemo(() => ({
|
|
123
|
-
reference: d,
|
|
124
|
-
floating: m,
|
|
125
|
-
setReference: _,
|
|
126
|
-
setFloating: v
|
|
127
|
-
}), [_, v]), a = f.useMemo(() => ({
|
|
128
|
-
reference: l,
|
|
129
|
-
floating: c
|
|
130
|
-
}), [l, c]), z = f.useMemo(() => {
|
|
131
|
-
const i = {
|
|
132
|
-
position: n,
|
|
133
|
-
left: 0,
|
|
134
|
-
top: 0
|
|
135
|
-
};
|
|
136
|
-
if (!a.floating)
|
|
137
|
-
return i;
|
|
138
|
-
const w = A(a.floating, u.x), p = A(a.floating, u.y);
|
|
139
|
-
return E ? {
|
|
140
|
-
...i,
|
|
141
|
-
transform: "translate(" + w + "px, " + p + "px)",
|
|
142
|
-
...q(a.floating) >= 1.5 && {
|
|
143
|
-
willChange: "transform"
|
|
144
|
-
}
|
|
145
|
-
} : {
|
|
146
|
-
position: n,
|
|
147
|
-
left: w,
|
|
148
|
-
top: p
|
|
149
|
-
};
|
|
150
|
-
}, [n, E, a.floating, u.x, u.y]);
|
|
151
|
-
return f.useMemo(() => ({
|
|
152
|
-
...u,
|
|
153
|
-
update: y,
|
|
154
|
-
refs: j,
|
|
155
|
-
elements: a,
|
|
156
|
-
floatingStyles: z
|
|
157
|
-
}), [u, y, j, a, z]);
|
|
158
|
-
}
|
|
159
|
-
o(se, "useFloating");
|
|
160
|
-
const re = /* @__PURE__ */ o((e) => {
|
|
161
|
-
function t(n) {
|
|
162
|
-
return {}.hasOwnProperty.call(n, "current");
|
|
163
|
-
}
|
|
164
|
-
return o(t, "isRef"), {
|
|
165
|
-
name: "arrow",
|
|
166
|
-
options: e,
|
|
167
|
-
fn(n) {
|
|
168
|
-
const {
|
|
169
|
-
element: r,
|
|
170
|
-
padding: s
|
|
171
|
-
} = typeof e == "function" ? e(n) : e;
|
|
172
|
-
return r && t(r) ? r.current != null ? L({
|
|
173
|
-
element: r.current,
|
|
174
|
-
padding: s
|
|
175
|
-
}).fn(n) : {} : r ? L({
|
|
176
|
-
element: r,
|
|
177
|
-
padding: s
|
|
178
|
-
}).fn(n) : {};
|
|
179
|
-
}
|
|
180
|
-
};
|
|
181
|
-
}, "arrow$1"), ue = /* @__PURE__ */ o((e, t) => ({
|
|
182
|
-
...N(e),
|
|
183
|
-
options: [e, t]
|
|
184
|
-
}), "offset"), le = /* @__PURE__ */ o((e, t) => ({
|
|
185
|
-
...Q(e),
|
|
186
|
-
options: [e, t]
|
|
187
|
-
}), "shift"), ce = /* @__PURE__ */ o((e, t) => ({
|
|
188
|
-
...Z(e),
|
|
189
|
-
options: [e, t]
|
|
190
|
-
}), "limitShift"), ae = /* @__PURE__ */ o((e, t) => ({
|
|
191
|
-
...T(e),
|
|
192
|
-
options: [e, t]
|
|
193
|
-
}), "flip"), de = /* @__PURE__ */ o((e, t) => ({
|
|
194
|
-
...X(e),
|
|
195
|
-
options: [e, t]
|
|
196
|
-
}), "size"), me = /* @__PURE__ */ o((e, t) => ({
|
|
197
|
-
...Y(e),
|
|
198
|
-
options: [e, t]
|
|
199
|
-
}), "hide"), pe = /* @__PURE__ */ o((e, t) => ({
|
|
200
|
-
...re(e),
|
|
201
|
-
options: [e, t]
|
|
202
|
-
}), "arrow");
|
|
203
|
-
export {
|
|
204
|
-
pe as arrow,
|
|
205
|
-
he as autoUpdate,
|
|
206
|
-
K as computePosition,
|
|
207
|
-
ae as flip,
|
|
208
|
-
me as hide,
|
|
209
|
-
ce as limitShift,
|
|
210
|
-
ue as offset,
|
|
211
|
-
we as platform,
|
|
212
|
-
le as shift,
|
|
213
|
-
de as size,
|
|
214
|
-
se as useFloating
|
|
215
|
-
};
|