@plyaz/ui 0.4.9 → 0.4.10
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/ui.cjs.js +120 -1
- package/dist/ui.es.js +3371 -38
- package/package.json +1 -1
- package/dist/ui.cjs10.js +0 -4
- package/dist/ui.cjs11.js +0 -1
- package/dist/ui.cjs12.js +0 -1
- package/dist/ui.cjs13.js +0 -1
- package/dist/ui.cjs14.js +0 -19
- package/dist/ui.cjs15.js +0 -7
- package/dist/ui.cjs16.js +0 -53
- package/dist/ui.cjs17.js +0 -1
- package/dist/ui.cjs18.js +0 -1
- package/dist/ui.cjs19.js +0 -31
- package/dist/ui.cjs20.js +0 -1
- package/dist/ui.cjs21.js +0 -1
- package/dist/ui.cjs22.js +0 -1
- package/dist/ui.cjs23.js +0 -6
- package/dist/ui.cjs24.js +0 -6
- package/dist/ui.cjs25.js +0 -6
- package/dist/ui.cjs26.js +0 -1
- package/dist/ui.cjs27.js +0 -1
- package/dist/ui.cjs28.js +0 -9
- package/dist/ui.cjs29.js +0 -14
- package/dist/ui.cjs3.js +0 -1
- package/dist/ui.cjs30.js +0 -1
- package/dist/ui.cjs31.js +0 -1
- package/dist/ui.cjs32.js +0 -1
- package/dist/ui.cjs33.js +0 -1
- package/dist/ui.cjs34.js +0 -1
- package/dist/ui.cjs35.js +0 -1
- package/dist/ui.cjs36.js +0 -1
- package/dist/ui.cjs37.js +0 -1
- package/dist/ui.cjs38.js +0 -1
- package/dist/ui.cjs39.js +0 -1
- package/dist/ui.cjs4.js +0 -5
- package/dist/ui.cjs40.js +0 -1
- package/dist/ui.cjs41.js +0 -1
- package/dist/ui.cjs42.js +0 -1
- package/dist/ui.cjs43.js +0 -1
- package/dist/ui.cjs44.js +0 -1
- package/dist/ui.cjs45.js +0 -1
- package/dist/ui.cjs46.js +0 -1
- package/dist/ui.cjs47.js +0 -1
- package/dist/ui.cjs48.js +0 -1
- package/dist/ui.cjs49.js +0 -1
- package/dist/ui.cjs5.js +0 -1
- package/dist/ui.cjs50.js +0 -1
- package/dist/ui.cjs51.js +0 -1
- package/dist/ui.cjs52.js +0 -1
- package/dist/ui.cjs53.js +0 -1
- package/dist/ui.cjs54.js +0 -1
- package/dist/ui.cjs55.js +0 -1
- package/dist/ui.cjs56.js +0 -1
- package/dist/ui.cjs57.js +0 -1
- package/dist/ui.cjs58.js +0 -1
- package/dist/ui.cjs59.js +0 -6
- package/dist/ui.cjs6.js +0 -1
- package/dist/ui.cjs60.js +0 -6
- package/dist/ui.cjs61.js +0 -6
- package/dist/ui.cjs62.js +0 -6
- package/dist/ui.cjs63.js +0 -1
- package/dist/ui.cjs64.js +0 -1
- package/dist/ui.cjs65.js +0 -1
- package/dist/ui.cjs66.js +0 -1
- package/dist/ui.cjs67.js +0 -1
- package/dist/ui.cjs68.js +0 -1
- package/dist/ui.cjs69.js +0 -4
- package/dist/ui.cjs7.js +0 -1
- package/dist/ui.cjs70.js +0 -1
- package/dist/ui.cjs71.js +0 -1
- package/dist/ui.cjs72.js +0 -1
- package/dist/ui.cjs73.js +0 -1
- package/dist/ui.cjs74.js +0 -1
- package/dist/ui.cjs75.js +0 -38
- package/dist/ui.cjs76.js +0 -1
- package/dist/ui.cjs77.js +0 -1
- package/dist/ui.cjs78.js +0 -1
- package/dist/ui.cjs79.js +0 -1
- package/dist/ui.cjs8.js +0 -7
- package/dist/ui.cjs80.js +0 -1
- package/dist/ui.cjs81.js +0 -1
- package/dist/ui.cjs82.js +0 -1
- package/dist/ui.cjs83.js +0 -1
- package/dist/ui.cjs84.js +0 -1
- package/dist/ui.cjs9.js +0 -1
- package/dist/ui.es10.js +0 -24
- package/dist/ui.es11.js +0 -20
- package/dist/ui.es12.js +0 -33
- package/dist/ui.es13.js +0 -25
- package/dist/ui.es14.js +0 -40
- package/dist/ui.es15.js +0 -46
- package/dist/ui.es16.js +0 -214
- package/dist/ui.es17.js +0 -5
- package/dist/ui.es18.js +0 -17
- package/dist/ui.es19.js +0 -135
- package/dist/ui.es20.js +0 -53
- package/dist/ui.es21.js +0 -8
- package/dist/ui.es22.js +0 -863
- package/dist/ui.es23.js +0 -12
- package/dist/ui.es24.js +0 -12
- package/dist/ui.es25.js +0 -12
- package/dist/ui.es26.js +0 -10
- package/dist/ui.es27.js +0 -4
- package/dist/ui.es28.js +0 -35
- package/dist/ui.es29.js +0 -247
- package/dist/ui.es3.js +0 -9
- package/dist/ui.es30.js +0 -35
- package/dist/ui.es31.js +0 -29
- package/dist/ui.es32.js +0 -2731
- package/dist/ui.es33.js +0 -6
- package/dist/ui.es34.js +0 -9
- package/dist/ui.es35.js +0 -48
- package/dist/ui.es36.js +0 -55
- package/dist/ui.es37.js +0 -10
- package/dist/ui.es38.js +0 -127
- package/dist/ui.es39.js +0 -17
- package/dist/ui.es4.js +0 -25
- package/dist/ui.es40.js +0 -137
- package/dist/ui.es41.js +0 -13
- package/dist/ui.es42.js +0 -220
- package/dist/ui.es43.js +0 -16
- package/dist/ui.es44.js +0 -36
- package/dist/ui.es45.js +0 -13
- package/dist/ui.es46.js +0 -54
- package/dist/ui.es47.js +0 -6
- package/dist/ui.es48.js +0 -8
- package/dist/ui.es49.js +0 -30
- package/dist/ui.es5.js +0 -46
- package/dist/ui.es50.js +0 -52
- package/dist/ui.es51.js +0 -11
- package/dist/ui.es52.js +0 -4
- package/dist/ui.es53.js +0 -4
- package/dist/ui.es54.js +0 -14
- package/dist/ui.es55.js +0 -208
- package/dist/ui.es56.js +0 -24
- package/dist/ui.es57.js +0 -27
- package/dist/ui.es58.js +0 -400
- package/dist/ui.es59.js +0 -27
- package/dist/ui.es6.js +0 -37
- package/dist/ui.es60.js +0 -24
- package/dist/ui.es61.js +0 -41
- package/dist/ui.es62.js +0 -20
- package/dist/ui.es63.js +0 -27
- package/dist/ui.es64.js +0 -31
- package/dist/ui.es65.js +0 -7
- package/dist/ui.es66.js +0 -7
- package/dist/ui.es67.js +0 -5
- package/dist/ui.es68.js +0 -26
- package/dist/ui.es69.js +0 -112
- package/dist/ui.es7.js +0 -29
- package/dist/ui.es70.js +0 -18
- package/dist/ui.es71.js +0 -527
- package/dist/ui.es72.js +0 -130
- package/dist/ui.es73.js +0 -136
- package/dist/ui.es74.js +0 -67
- package/dist/ui.es75.js +0 -71
- package/dist/ui.es76.js +0 -11
- package/dist/ui.es77.js +0 -16
- package/dist/ui.es78.js +0 -68
- package/dist/ui.es79.js +0 -6
- package/dist/ui.es8.js +0 -27
- package/dist/ui.es80.js +0 -25
- package/dist/ui.es81.js +0 -25
- package/dist/ui.es82.js +0 -15
- package/dist/ui.es83.js +0 -30
- package/dist/ui.es84.js +0 -7
- package/dist/ui.es9.js +0 -25
package/dist/ui.es43.js
DELETED
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import * as r from "react";
|
|
2
|
-
import f from "react-dom";
|
|
3
|
-
import { Primitive as u } from "./ui.es44.js";
|
|
4
|
-
import { useLayoutEffect as c } from "./ui.es47.js";
|
|
5
|
-
import { j as l } from "./ui.es17.js";
|
|
6
|
-
var p = "Portal", d = r.forwardRef((e, a) => {
|
|
7
|
-
var o;
|
|
8
|
-
const { container: s, ...i } = e, [m, n] = r.useState(!1);
|
|
9
|
-
c(() => n(!0), []);
|
|
10
|
-
const t = s || m && ((o = globalThis == null ? void 0 : globalThis.document) == null ? void 0 : o.body);
|
|
11
|
-
return t ? f.createPortal(/* @__PURE__ */ l.jsx(u.div, { ...i, ref: a }), t) : null;
|
|
12
|
-
});
|
|
13
|
-
d.displayName = p;
|
|
14
|
-
export {
|
|
15
|
-
d as Portal
|
|
16
|
-
};
|
package/dist/ui.es44.js
DELETED
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
import * as p from "react";
|
|
2
|
-
import * as f from "react-dom";
|
|
3
|
-
import { createSlot as c } from "./ui.es20.js";
|
|
4
|
-
import { j as u } from "./ui.es17.js";
|
|
5
|
-
var l = [
|
|
6
|
-
"a",
|
|
7
|
-
"button",
|
|
8
|
-
"div",
|
|
9
|
-
"form",
|
|
10
|
-
"h2",
|
|
11
|
-
"h3",
|
|
12
|
-
"img",
|
|
13
|
-
"input",
|
|
14
|
-
"label",
|
|
15
|
-
"li",
|
|
16
|
-
"nav",
|
|
17
|
-
"ol",
|
|
18
|
-
"p",
|
|
19
|
-
"select",
|
|
20
|
-
"span",
|
|
21
|
-
"svg",
|
|
22
|
-
"ul"
|
|
23
|
-
], h = l.reduce((t, i) => {
|
|
24
|
-
const o = c(`Primitive.${i}`), r = p.forwardRef((e, s) => {
|
|
25
|
-
const { asChild: m, ...a } = e, n = m ? o : i;
|
|
26
|
-
return typeof window < "u" && (window[Symbol.for("radix-ui")] = !0), /* @__PURE__ */ u.jsx(n, { ...a, ref: s });
|
|
27
|
-
});
|
|
28
|
-
return r.displayName = `Primitive.${i}`, { ...t, [i]: r };
|
|
29
|
-
}, {});
|
|
30
|
-
function w(t, i) {
|
|
31
|
-
t && f.flushSync(() => t.dispatchEvent(i));
|
|
32
|
-
}
|
|
33
|
-
export {
|
|
34
|
-
h as Primitive,
|
|
35
|
-
w as dispatchDiscreteCustomEvent
|
|
36
|
-
};
|
package/dist/ui.es45.js
DELETED
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import * as r from "react";
|
|
2
|
-
function o(t) {
|
|
3
|
-
const e = r.useRef(t);
|
|
4
|
-
return r.useEffect(() => {
|
|
5
|
-
e.current = t;
|
|
6
|
-
}), r.useMemo(() => (...n) => {
|
|
7
|
-
var u;
|
|
8
|
-
return (u = e.current) == null ? void 0 : u.call(e, ...n);
|
|
9
|
-
}, []);
|
|
10
|
-
}
|
|
11
|
-
export {
|
|
12
|
-
o as useCallbackRef
|
|
13
|
-
};
|
package/dist/ui.es46.js
DELETED
|
@@ -1,54 +0,0 @@
|
|
|
1
|
-
import * as n from "react";
|
|
2
|
-
import { useLayoutEffect as v } from "./ui.es47.js";
|
|
3
|
-
var E = n[" useInsertionEffect ".trim().toString()] || v;
|
|
4
|
-
function y({
|
|
5
|
-
prop: t,
|
|
6
|
-
defaultProp: u,
|
|
7
|
-
onChange: o = () => {
|
|
8
|
-
},
|
|
9
|
-
caller: i
|
|
10
|
-
}) {
|
|
11
|
-
const [l, e, r] = w({
|
|
12
|
-
defaultProp: u,
|
|
13
|
-
onChange: o
|
|
14
|
-
}), c = t !== void 0, a = c ? t : l;
|
|
15
|
-
{
|
|
16
|
-
const s = n.useRef(t !== void 0);
|
|
17
|
-
n.useEffect(() => {
|
|
18
|
-
const f = s.current;
|
|
19
|
-
f !== c && console.warn(
|
|
20
|
-
`${i} is changing from ${f ? "controlled" : "uncontrolled"} to ${c ? "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.`
|
|
21
|
-
), s.current = c;
|
|
22
|
-
}, [c, i]);
|
|
23
|
-
}
|
|
24
|
-
const m = n.useCallback(
|
|
25
|
-
(s) => {
|
|
26
|
-
var f;
|
|
27
|
-
if (c) {
|
|
28
|
-
const d = R(s) ? s(t) : s;
|
|
29
|
-
d !== t && ((f = r.current) == null || f.call(r, d));
|
|
30
|
-
} else
|
|
31
|
-
e(s);
|
|
32
|
-
},
|
|
33
|
-
[c, t, e, r]
|
|
34
|
-
);
|
|
35
|
-
return [a, m];
|
|
36
|
-
}
|
|
37
|
-
function w({
|
|
38
|
-
defaultProp: t,
|
|
39
|
-
onChange: u
|
|
40
|
-
}) {
|
|
41
|
-
const [o, i] = n.useState(t), l = n.useRef(o), e = n.useRef(u);
|
|
42
|
-
return E(() => {
|
|
43
|
-
e.current = u;
|
|
44
|
-
}, [u]), n.useEffect(() => {
|
|
45
|
-
var r;
|
|
46
|
-
l.current !== o && ((r = e.current) == null || r.call(e, o), l.current = o);
|
|
47
|
-
}, [o, l]), [o, i, e];
|
|
48
|
-
}
|
|
49
|
-
function R(t) {
|
|
50
|
-
return typeof t == "function";
|
|
51
|
-
}
|
|
52
|
-
export {
|
|
53
|
-
y as useControllableState
|
|
54
|
-
};
|
package/dist/ui.es47.js
DELETED
package/dist/ui.es48.js
DELETED
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import * as u from "react";
|
|
2
|
-
function t(r) {
|
|
3
|
-
const e = u.useRef({ value: r, previous: r });
|
|
4
|
-
return u.useMemo(() => (e.current.value !== r && (e.current.previous = e.current.value, e.current.value = r), e.current.previous), [r]);
|
|
5
|
-
}
|
|
6
|
-
export {
|
|
7
|
-
t as usePrevious
|
|
8
|
-
};
|
package/dist/ui.es49.js
DELETED
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
import * as i from "react";
|
|
2
|
-
import { Primitive as a } from "./ui.es44.js";
|
|
3
|
-
import { j as t } from "./ui.es17.js";
|
|
4
|
-
var o = 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
|
-
}), d = "VisuallyHidden", s = i.forwardRef(
|
|
17
|
-
(r, e) => /* @__PURE__ */ t.jsx(
|
|
18
|
-
a.span,
|
|
19
|
-
{
|
|
20
|
-
...r,
|
|
21
|
-
ref: e,
|
|
22
|
-
style: { ...o, ...r.style }
|
|
23
|
-
}
|
|
24
|
-
)
|
|
25
|
-
);
|
|
26
|
-
s.displayName = d;
|
|
27
|
-
export {
|
|
28
|
-
o as VISUALLY_HIDDEN_STYLES,
|
|
29
|
-
s as VisuallyHidden
|
|
30
|
-
};
|
package/dist/ui.es5.js
DELETED
|
@@ -1,46 +0,0 @@
|
|
|
1
|
-
import { j as t } from "./ui.es17.js";
|
|
2
|
-
import { clsx as P } from "./ui.es18.js";
|
|
3
|
-
/* empty css */
|
|
4
|
-
import { Box as w } from "./ui.es3.js";
|
|
5
|
-
import { JUASTIFY_MAPPER as a, ALIGN_MAPPER as c, GAP as A } from "./ui.es19.js";
|
|
6
|
-
import "./ui.es15.js";
|
|
7
|
-
const R = {
|
|
8
|
-
row: "flex-row",
|
|
9
|
-
col: "flex-col",
|
|
10
|
-
row_reverse: "flex-row-reverse",
|
|
11
|
-
col_reverse: "flex-col-reverse"
|
|
12
|
-
}, _ = {
|
|
13
|
-
wrap: "flex-wrap",
|
|
14
|
-
nowrap: "flex-nowrap",
|
|
15
|
-
wrap_reverse: "flex-wrap-reverse"
|
|
16
|
-
}, N = ({
|
|
17
|
-
children: x,
|
|
18
|
-
gap: r,
|
|
19
|
-
direction: e,
|
|
20
|
-
justify: o,
|
|
21
|
-
align: s,
|
|
22
|
-
wrap: l,
|
|
23
|
-
className: f = "",
|
|
24
|
-
element: m,
|
|
25
|
-
...p
|
|
26
|
-
}) => /* @__PURE__ */ t.jsx(
|
|
27
|
-
w,
|
|
28
|
-
{
|
|
29
|
-
element: m,
|
|
30
|
-
className: P(
|
|
31
|
-
"flex",
|
|
32
|
-
e && R[e],
|
|
33
|
-
o && a[o],
|
|
34
|
-
s && c[s],
|
|
35
|
-
l && _[l],
|
|
36
|
-
r && A[r],
|
|
37
|
-
f
|
|
38
|
-
),
|
|
39
|
-
...p,
|
|
40
|
-
children: x
|
|
41
|
-
}
|
|
42
|
-
);
|
|
43
|
-
export {
|
|
44
|
-
N as Flex,
|
|
45
|
-
N as default
|
|
46
|
-
};
|
package/dist/ui.es50.js
DELETED
|
@@ -1,52 +0,0 @@
|
|
|
1
|
-
var S = function(r) {
|
|
2
|
-
if (typeof document > "u")
|
|
3
|
-
return null;
|
|
4
|
-
var u = Array.isArray(r) ? r[0] : r;
|
|
5
|
-
return u.ownerDocument.body;
|
|
6
|
-
}, f = /* @__PURE__ */ new WeakMap(), v = /* @__PURE__ */ new WeakMap(), p = {}, h = 0, W = function(r) {
|
|
7
|
-
return r && (r.host || W(r.parentNode));
|
|
8
|
-
}, D = function(r, u) {
|
|
9
|
-
return u.map(function(e) {
|
|
10
|
-
if (r.contains(e))
|
|
11
|
-
return e;
|
|
12
|
-
var n = W(e);
|
|
13
|
-
return n && r.contains(n) ? n : (console.error("aria-hidden", e, "in not contained inside", r, ". Doing nothing"), null);
|
|
14
|
-
}).filter(function(e) {
|
|
15
|
-
return !!e;
|
|
16
|
-
});
|
|
17
|
-
}, E = function(r, u, e, n) {
|
|
18
|
-
var i = D(u, Array.isArray(r) ? r : [r]);
|
|
19
|
-
p[e] || (p[e] = /* @__PURE__ */ new WeakMap());
|
|
20
|
-
var s = p[e], l = [], o = /* @__PURE__ */ new Set(), b = new Set(i), y = function(t) {
|
|
21
|
-
!t || o.has(t) || (o.add(t), y(t.parentNode));
|
|
22
|
-
};
|
|
23
|
-
i.forEach(y);
|
|
24
|
-
var A = function(t) {
|
|
25
|
-
!t || b.has(t) || Array.prototype.forEach.call(t.children, function(a) {
|
|
26
|
-
if (o.has(a))
|
|
27
|
-
A(a);
|
|
28
|
-
else
|
|
29
|
-
try {
|
|
30
|
-
var c = a.getAttribute(n), w = c !== null && c !== "false", d = (f.get(a) || 0) + 1, M = (s.get(a) || 0) + 1;
|
|
31
|
-
f.set(a, d), s.set(a, M), l.push(a), d === 1 && w && v.set(a, !0), M === 1 && a.setAttribute(e, "true"), w || a.setAttribute(n, "true");
|
|
32
|
-
} catch (k) {
|
|
33
|
-
console.error("aria-hidden: cannot operate on ", a, k);
|
|
34
|
-
}
|
|
35
|
-
});
|
|
36
|
-
};
|
|
37
|
-
return A(u), o.clear(), h++, function() {
|
|
38
|
-
l.forEach(function(t) {
|
|
39
|
-
var a = f.get(t) - 1, c = s.get(t) - 1;
|
|
40
|
-
f.set(t, a), s.set(t, c), a || (v.has(t) || t.removeAttribute(n), v.delete(t)), c || t.removeAttribute(e);
|
|
41
|
-
}), h--, h || (f = /* @__PURE__ */ new WeakMap(), f = /* @__PURE__ */ new WeakMap(), v = /* @__PURE__ */ new WeakMap(), p = {});
|
|
42
|
-
};
|
|
43
|
-
}, C = function(r, u, e) {
|
|
44
|
-
e === void 0 && (e = "data-aria-hidden");
|
|
45
|
-
var n = Array.from(Array.isArray(r) ? r : [r]), i = S(r);
|
|
46
|
-
return i ? (n.push.apply(n, Array.from(i.querySelectorAll("[aria-live], script"))), E(n, i, e, "aria-hidden")) : function() {
|
|
47
|
-
return null;
|
|
48
|
-
};
|
|
49
|
-
};
|
|
50
|
-
export {
|
|
51
|
-
C as hideOthers
|
|
52
|
-
};
|
package/dist/ui.es51.js
DELETED
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import { __assign as m } from "./ui.es63.js";
|
|
2
|
-
import * as r from "react";
|
|
3
|
-
import { RemoveScroll as e } from "./ui.es64.js";
|
|
4
|
-
import t from "./ui.es65.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
|
-
};
|
package/dist/ui.es52.js
DELETED
package/dist/ui.es53.js
DELETED
package/dist/ui.es54.js
DELETED
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import * as r from "react";
|
|
2
|
-
import { useCallbackRef as s } from "./ui.es45.js";
|
|
3
|
-
function p(n, e = globalThis == null ? void 0 : globalThis.document) {
|
|
4
|
-
const t = s(n);
|
|
5
|
-
r.useEffect(() => {
|
|
6
|
-
const o = (a) => {
|
|
7
|
-
a.key === "Escape" && t(a);
|
|
8
|
-
};
|
|
9
|
-
return e.addEventListener("keydown", o, { capture: !0 }), () => e.removeEventListener("keydown", o, { capture: !0 });
|
|
10
|
-
}, [t, e]);
|
|
11
|
-
}
|
|
12
|
-
export {
|
|
13
|
-
p as useEscapeKeydown
|
|
14
|
-
};
|
package/dist/ui.es55.js
DELETED
|
@@ -1,208 +0,0 @@
|
|
|
1
|
-
import { computePosition as I, offset as J, shift as K, flip as N, size as Q, hide as T, limitShift as X, arrow as z } from "./ui.es58.js";
|
|
2
|
-
import { autoUpdate as pe, platform as ge } from "./ui.es58.js";
|
|
3
|
-
import * as o from "react";
|
|
4
|
-
import { useLayoutEffect as Y } from "react";
|
|
5
|
-
import * as Z from "react-dom";
|
|
6
|
-
var b = typeof document < "u", ee = function() {
|
|
7
|
-
}, w = b ? Y : ee;
|
|
8
|
-
function R(e, t) {
|
|
9
|
-
if (e === t)
|
|
10
|
-
return !0;
|
|
11
|
-
if (typeof e != typeof t)
|
|
12
|
-
return !1;
|
|
13
|
-
if (typeof e == "function" && e.toString() === t.toString())
|
|
14
|
-
return !0;
|
|
15
|
-
let n, r, i;
|
|
16
|
-
if (e && t && typeof e == "object") {
|
|
17
|
-
if (Array.isArray(e)) {
|
|
18
|
-
if (n = e.length, n !== t.length) return !1;
|
|
19
|
-
for (r = n; r-- !== 0; )
|
|
20
|
-
if (!R(e[r], t[r]))
|
|
21
|
-
return !1;
|
|
22
|
-
return !0;
|
|
23
|
-
}
|
|
24
|
-
if (i = Object.keys(e), n = i.length, n !== Object.keys(t).length)
|
|
25
|
-
return !1;
|
|
26
|
-
for (r = n; r-- !== 0; )
|
|
27
|
-
if (!{}.hasOwnProperty.call(t, i[r]))
|
|
28
|
-
return !1;
|
|
29
|
-
for (r = n; r-- !== 0; ) {
|
|
30
|
-
const p = i[r];
|
|
31
|
-
if (!(p === "_owner" && e.$$typeof) && !R(e[p], t[p]))
|
|
32
|
-
return !1;
|
|
33
|
-
}
|
|
34
|
-
return !0;
|
|
35
|
-
}
|
|
36
|
-
return e !== e && t !== t;
|
|
37
|
-
}
|
|
38
|
-
function A(e) {
|
|
39
|
-
return typeof window > "u" ? 1 : (e.ownerDocument.defaultView || window).devicePixelRatio || 1;
|
|
40
|
-
}
|
|
41
|
-
function L(e, t) {
|
|
42
|
-
const n = A(e);
|
|
43
|
-
return Math.round(t * n) / n;
|
|
44
|
-
}
|
|
45
|
-
function k(e) {
|
|
46
|
-
const t = o.useRef(e);
|
|
47
|
-
return w(() => {
|
|
48
|
-
t.current = e;
|
|
49
|
-
}), t;
|
|
50
|
-
}
|
|
51
|
-
function oe(e) {
|
|
52
|
-
e === void 0 && (e = {});
|
|
53
|
-
const {
|
|
54
|
-
placement: t = "bottom",
|
|
55
|
-
strategy: n = "absolute",
|
|
56
|
-
middleware: r = [],
|
|
57
|
-
platform: i,
|
|
58
|
-
elements: {
|
|
59
|
-
reference: p,
|
|
60
|
-
floating: q
|
|
61
|
-
} = {},
|
|
62
|
-
transform: D = !0,
|
|
63
|
-
whileElementsMounted: E,
|
|
64
|
-
open: x
|
|
65
|
-
} = e, [s, C] = o.useState({
|
|
66
|
-
x: 0,
|
|
67
|
-
y: 0,
|
|
68
|
-
strategy: n,
|
|
69
|
-
placement: t,
|
|
70
|
-
middlewareData: {},
|
|
71
|
-
isPositioned: !1
|
|
72
|
-
}), [M, B] = o.useState(r);
|
|
73
|
-
R(M, r) || B(r);
|
|
74
|
-
const [U, V] = o.useState(null), [W, G] = o.useState(null), O = o.useCallback((f) => {
|
|
75
|
-
f !== a.current && (a.current = f, V(f));
|
|
76
|
-
}, []), _ = o.useCallback((f) => {
|
|
77
|
-
f !== d.current && (d.current = f, G(f));
|
|
78
|
-
}, []), u = p || U, l = q || W, a = o.useRef(null), d = o.useRef(null), y = o.useRef(s), H = E != null, S = k(E), P = k(i), v = k(x), g = o.useCallback(() => {
|
|
79
|
-
if (!a.current || !d.current)
|
|
80
|
-
return;
|
|
81
|
-
const f = {
|
|
82
|
-
placement: t,
|
|
83
|
-
strategy: n,
|
|
84
|
-
middleware: M
|
|
85
|
-
};
|
|
86
|
-
P.current && (f.platform = P.current), I(a.current, d.current, f).then((h) => {
|
|
87
|
-
const m = {
|
|
88
|
-
...h,
|
|
89
|
-
// The floating element's position may be recomputed while it's closed
|
|
90
|
-
// but still mounted (such as when transitioning out). To ensure
|
|
91
|
-
// `isPositioned` will be `false` initially on the next open, avoid
|
|
92
|
-
// setting it to `true` when `open === false` (must be specified).
|
|
93
|
-
isPositioned: v.current !== !1
|
|
94
|
-
};
|
|
95
|
-
$.current && !R(y.current, m) && (y.current = m, Z.flushSync(() => {
|
|
96
|
-
C(m);
|
|
97
|
-
}));
|
|
98
|
-
});
|
|
99
|
-
}, [M, t, n, P, v]);
|
|
100
|
-
w(() => {
|
|
101
|
-
x === !1 && y.current.isPositioned && (y.current.isPositioned = !1, C((f) => ({
|
|
102
|
-
...f,
|
|
103
|
-
isPositioned: !1
|
|
104
|
-
})));
|
|
105
|
-
}, [x]);
|
|
106
|
-
const $ = o.useRef(!1);
|
|
107
|
-
w(() => ($.current = !0, () => {
|
|
108
|
-
$.current = !1;
|
|
109
|
-
}), []), w(() => {
|
|
110
|
-
if (u && (a.current = u), l && (d.current = l), u && l) {
|
|
111
|
-
if (S.current)
|
|
112
|
-
return S.current(u, l, g);
|
|
113
|
-
g();
|
|
114
|
-
}
|
|
115
|
-
}, [u, l, g, S, H]);
|
|
116
|
-
const F = o.useMemo(() => ({
|
|
117
|
-
reference: a,
|
|
118
|
-
floating: d,
|
|
119
|
-
setReference: O,
|
|
120
|
-
setFloating: _
|
|
121
|
-
}), [O, _]), c = o.useMemo(() => ({
|
|
122
|
-
reference: u,
|
|
123
|
-
floating: l
|
|
124
|
-
}), [u, l]), j = o.useMemo(() => {
|
|
125
|
-
const f = {
|
|
126
|
-
position: n,
|
|
127
|
-
left: 0,
|
|
128
|
-
top: 0
|
|
129
|
-
};
|
|
130
|
-
if (!c.floating)
|
|
131
|
-
return f;
|
|
132
|
-
const h = L(c.floating, s.x), m = L(c.floating, s.y);
|
|
133
|
-
return D ? {
|
|
134
|
-
...f,
|
|
135
|
-
transform: "translate(" + h + "px, " + m + "px)",
|
|
136
|
-
...A(c.floating) >= 1.5 && {
|
|
137
|
-
willChange: "transform"
|
|
138
|
-
}
|
|
139
|
-
} : {
|
|
140
|
-
position: n,
|
|
141
|
-
left: h,
|
|
142
|
-
top: m
|
|
143
|
-
};
|
|
144
|
-
}, [n, D, c.floating, s.x, s.y]);
|
|
145
|
-
return o.useMemo(() => ({
|
|
146
|
-
...s,
|
|
147
|
-
update: g,
|
|
148
|
-
refs: F,
|
|
149
|
-
elements: c,
|
|
150
|
-
floatingStyles: j
|
|
151
|
-
}), [s, g, F, c, j]);
|
|
152
|
-
}
|
|
153
|
-
const te = (e) => {
|
|
154
|
-
function t(n) {
|
|
155
|
-
return {}.hasOwnProperty.call(n, "current");
|
|
156
|
-
}
|
|
157
|
-
return {
|
|
158
|
-
name: "arrow",
|
|
159
|
-
options: e,
|
|
160
|
-
fn(n) {
|
|
161
|
-
const {
|
|
162
|
-
element: r,
|
|
163
|
-
padding: i
|
|
164
|
-
} = typeof e == "function" ? e(n) : e;
|
|
165
|
-
return r && t(r) ? r.current != null ? z({
|
|
166
|
-
element: r.current,
|
|
167
|
-
padding: i
|
|
168
|
-
}).fn(n) : {} : r ? z({
|
|
169
|
-
element: r,
|
|
170
|
-
padding: i
|
|
171
|
-
}).fn(n) : {};
|
|
172
|
-
}
|
|
173
|
-
};
|
|
174
|
-
}, fe = (e, t) => ({
|
|
175
|
-
...J(e),
|
|
176
|
-
options: [e, t]
|
|
177
|
-
}), ie = (e, t) => ({
|
|
178
|
-
...K(e),
|
|
179
|
-
options: [e, t]
|
|
180
|
-
}), se = (e, t) => ({
|
|
181
|
-
...X(e),
|
|
182
|
-
options: [e, t]
|
|
183
|
-
}), ue = (e, t) => ({
|
|
184
|
-
...N(e),
|
|
185
|
-
options: [e, t]
|
|
186
|
-
}), le = (e, t) => ({
|
|
187
|
-
...Q(e),
|
|
188
|
-
options: [e, t]
|
|
189
|
-
}), ce = (e, t) => ({
|
|
190
|
-
...T(e),
|
|
191
|
-
options: [e, t]
|
|
192
|
-
}), ae = (e, t) => ({
|
|
193
|
-
...te(e),
|
|
194
|
-
options: [e, t]
|
|
195
|
-
});
|
|
196
|
-
export {
|
|
197
|
-
ae as arrow,
|
|
198
|
-
pe as autoUpdate,
|
|
199
|
-
I as computePosition,
|
|
200
|
-
ue as flip,
|
|
201
|
-
ce as hide,
|
|
202
|
-
se as limitShift,
|
|
203
|
-
fe as offset,
|
|
204
|
-
ge as platform,
|
|
205
|
-
ie as shift,
|
|
206
|
-
le as size,
|
|
207
|
-
oe as useFloating
|
|
208
|
-
};
|
package/dist/ui.es56.js
DELETED
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
import * as n from "react";
|
|
2
|
-
import { Primitive as p } from "./ui.es44.js";
|
|
3
|
-
import { j as o } from "./ui.es17.js";
|
|
4
|
-
var v = "Arrow", e = n.forwardRef((r, i) => {
|
|
5
|
-
const { children: t, width: s = 10, height: a = 5, ...m } = r;
|
|
6
|
-
return /* @__PURE__ */ o.jsx(
|
|
7
|
-
p.svg,
|
|
8
|
-
{
|
|
9
|
-
...m,
|
|
10
|
-
ref: i,
|
|
11
|
-
width: s,
|
|
12
|
-
height: a,
|
|
13
|
-
viewBox: "0 0 30 10",
|
|
14
|
-
preserveAspectRatio: "none",
|
|
15
|
-
children: r.asChild ? t : /* @__PURE__ */ o.jsx("polygon", { points: "0,0 30,0 15,10" })
|
|
16
|
-
}
|
|
17
|
-
);
|
|
18
|
-
});
|
|
19
|
-
e.displayName = v;
|
|
20
|
-
var h = e;
|
|
21
|
-
export {
|
|
22
|
-
e as Arrow,
|
|
23
|
-
h as Root
|
|
24
|
-
};
|
package/dist/ui.es57.js
DELETED
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
import * as h from "react";
|
|
2
|
-
import { useLayoutEffect as z } from "./ui.es47.js";
|
|
3
|
-
function c(r) {
|
|
4
|
-
const [d, e] = h.useState(void 0);
|
|
5
|
-
return z(() => {
|
|
6
|
-
if (r) {
|
|
7
|
-
e({ width: r.offsetWidth, height: r.offsetHeight });
|
|
8
|
-
const f = new ResizeObserver((i) => {
|
|
9
|
-
if (!Array.isArray(i) || !i.length)
|
|
10
|
-
return;
|
|
11
|
-
const b = i[0];
|
|
12
|
-
let o, t;
|
|
13
|
-
if ("borderBoxSize" in b) {
|
|
14
|
-
const s = b.borderBoxSize, u = Array.isArray(s) ? s[0] : s;
|
|
15
|
-
o = u.inlineSize, t = u.blockSize;
|
|
16
|
-
} else
|
|
17
|
-
o = r.offsetWidth, t = r.offsetHeight;
|
|
18
|
-
e({ width: o, height: t });
|
|
19
|
-
});
|
|
20
|
-
return f.observe(r, { box: "border-box" }), () => f.unobserve(r);
|
|
21
|
-
} else
|
|
22
|
-
e(void 0);
|
|
23
|
-
}, [r]), d;
|
|
24
|
-
}
|
|
25
|
-
export {
|
|
26
|
-
c as useSize
|
|
27
|
-
};
|