ono-react-element 0.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/es/AutoSliderList-DqaQhmce.js +106 -0
- package/dist/es/AvatarCrop-DzGw2FVQ.js +225 -0
- package/dist/es/Button-CdxyXFF4.js +72 -0
- package/dist/es/Card3D-sf3zmiHk.js +41 -0
- package/dist/es/Checkbox-BN7rT73n.js +62 -0
- package/dist/es/InjunctiveBox-CmZg4sIq.js +39 -0
- package/dist/es/Input-wORRaL9-.js +301 -0
- package/dist/es/List-B9mP7VjN.js +35 -0
- package/dist/es/MenuButton-CuOdVlg0.js +62 -0
- package/dist/es/Message-BMimz-k2.js +219 -0
- package/dist/es/Modal-BAJOEXRd.js +154 -0
- package/dist/es/Pagination-BtmtUkVw.js +110 -0
- package/dist/es/PortalRenderer-8Iur-eZp.js +38 -0
- package/dist/es/Radio-BmSpqdK8.js +113 -0
- package/dist/es/SvgImg-Bcmzdjzl.js +38 -0
- package/dist/es/Switch-hGQGZVO2.js +110 -0
- package/dist/es/TemplateDialog-DuURiDPX.js +75 -0
- package/dist/es/Toast-CkC8zQdq.js +174 -0
- package/dist/es/Tooltip-C_gPojr9.js +94 -0
- package/dist/es/VirtualList-D8M5JJ-W.js +160 -0
- package/dist/es/Waterfall-BXE2_5Sj.js +131 -0
- package/dist/es/dependencies-DWmdjl5u.js +25491 -0
- package/dist/es/hooks-Bj-aT2k8.js +159 -0
- package/dist/es/index.js +227 -0
- package/dist/es/utils-ziqvBIOU.js +567 -0
- package/dist/index.css +1 -0
- package/dist/types/components/AutoSliderList/AutoSliderList.d.ts +2 -0
- package/dist/types/components/AutoSliderList/index.d.ts +2 -0
- package/dist/types/components/AutoSliderList/types.d.ts +23 -0
- package/dist/types/components/AvatarCrop/AvatarCanvas.d.ts +2 -0
- package/dist/types/components/AvatarCrop/AvatarCrop.d.ts +13 -0
- package/dist/types/components/AvatarCrop/index.d.ts +1 -0
- package/dist/types/components/AvatarCrop/types.d.ts +42 -0
- package/dist/types/components/Button/Button.d.ts +2 -0
- package/dist/types/components/Button/index.d.ts +2 -0
- package/dist/types/components/Button/types.d.ts +20 -0
- package/dist/types/components/Card3D/Card3D.d.ts +12 -0
- package/dist/types/components/Card3D/index.d.ts +1 -0
- package/dist/types/components/Checkbox/Checkbox.d.ts +2 -0
- package/dist/types/components/Checkbox/index.d.ts +2 -0
- package/dist/types/components/Checkbox/types.d.ts +12 -0
- package/dist/types/components/InjunctiveBox/InjunctiveBox.d.ts +18 -0
- package/dist/types/components/InjunctiveBox/index.d.ts +1 -0
- package/dist/types/components/Input/Input.d.ts +2 -0
- package/dist/types/components/Input/Textarea.d.ts +2 -0
- package/dist/types/components/Input/index.d.ts +2 -0
- package/dist/types/components/Input/types.d.ts +46 -0
- package/dist/types/components/List/AwaitList.d.ts +3 -0
- package/dist/types/components/List/List.d.ts +3 -0
- package/dist/types/components/List/index.d.ts +2 -0
- package/dist/types/components/List/types.d.ts +11 -0
- package/dist/types/components/MenuButton/MenuButton.d.ts +2 -0
- package/dist/types/components/MenuButton/index.d.ts +1 -0
- package/dist/types/components/MenuButton/types.d.ts +8 -0
- package/dist/types/components/Message/Message.d.ts +8 -0
- package/dist/types/components/Message/index.d.ts +1 -0
- package/dist/types/components/Message/types.d.ts +20 -0
- package/dist/types/components/Message/utils.d.ts +23 -0
- package/dist/types/components/Modal/Modal.d.ts +2 -0
- package/dist/types/components/Modal/index.d.ts +1 -0
- package/dist/types/components/Modal/types.d.ts +27 -0
- package/dist/types/components/Pagination/Pagination.d.ts +2 -0
- package/dist/types/components/Pagination/index.d.ts +1 -0
- package/dist/types/components/Pagination/types.d.ts +20 -0
- package/dist/types/components/PortalRenderer/PortalRenderer.d.ts +2 -0
- package/dist/types/components/PortalRenderer/index.d.ts +1 -0
- package/dist/types/components/Radio/Radio.d.ts +2 -0
- package/dist/types/components/Radio/RadioGroup.d.ts +2 -0
- package/dist/types/components/Radio/index.d.ts +2 -0
- package/dist/types/components/Radio/types.d.ts +26 -0
- package/dist/types/components/Select/Option.d.ts +2 -0
- package/dist/types/components/Select/Select.d.ts +2 -0
- package/dist/types/components/Select/index.d.ts +1 -0
- package/dist/types/components/Select/types.d.ts +30 -0
- package/dist/types/components/SvgImg/SvgImg.d.ts +10 -0
- package/dist/types/components/SvgImg/index.d.ts +1 -0
- package/dist/types/components/Switch/Switch.d.ts +2 -0
- package/dist/types/components/Switch/index.d.ts +1 -0
- package/dist/types/components/Switch/types.d.ts +18 -0
- package/dist/types/components/TemplateDialog/TemplateDialog.d.ts +2 -0
- package/dist/types/components/TemplateDialog/index.d.ts +1 -0
- package/dist/types/components/TemplateDialog/types.d.ts +19 -0
- package/dist/types/components/Toast/Toast.d.ts +7 -0
- package/dist/types/components/Toast/index.d.ts +1 -0
- package/dist/types/components/Toast/types.d.ts +19 -0
- package/dist/types/components/Tooltip/Tooltip.d.ts +2 -0
- package/dist/types/components/Tooltip/index.d.ts +1 -0
- package/dist/types/components/Tooltip/types.d.ts +15 -0
- package/dist/types/components/VirtualList/EstimatedVirtualList.d.ts +2 -0
- package/dist/types/components/VirtualList/index.d.ts +2 -0
- package/dist/types/components/VirtualList/types.d.ts +35 -0
- package/dist/types/components/Waterfall/Waterfall.d.ts +2 -0
- package/dist/types/components/Waterfall/index.d.ts +2 -0
- package/dist/types/components/Waterfall/types.d.ts +23 -0
- package/dist/types/components/index.d.ts +21 -0
- package/dist/types/hooks/index.d.ts +7 -0
- package/dist/types/hooks/useClickOutSide.d.ts +9 -0
- package/dist/types/hooks/useCountdown.d.ts +1 -0
- package/dist/types/hooks/useEventListener.d.ts +8 -0
- package/dist/types/hooks/useGetElementSize.d.ts +5 -0
- package/dist/types/hooks/useKeyPress.d.ts +12 -0
- package/dist/types/hooks/useTheme.d.ts +8 -0
- package/dist/types/hooks/useThemePro.d.ts +11 -0
- package/dist/types/index.d.ts +8 -0
- package/dist/types/utils/colorUtils.d.ts +33 -0
- package/dist/types/utils/common.d.ts +96 -0
- package/dist/types/utils/fileFormatConversion.d.ts +10 -0
- package/dist/types/utils/formatTimeUtils.d.ts +6 -0
- package/dist/types/utils/viewTransitionUtils.d.ts +9 -0
- package/dist/umd/index.css +1 -0
- package/dist/umd/index.umd.cjs +298 -0
- package/package.json +49 -0
|
@@ -0,0 +1,159 @@
|
|
|
1
|
+
import { useEffect as E, useState as L, useRef as b, useCallback as T } from "react";
|
|
2
|
+
import { R as v } from "./utils-ziqvBIOU.js";
|
|
3
|
+
const C = (e, c, t) => {
|
|
4
|
+
const { target: s, deps: i, isDeferred: r } = t || {}, n = (l) => c(l);
|
|
5
|
+
return E(() => (typeof e == "string" ? !r && (s || window).addEventListener(e, n) : e.forEach(
|
|
6
|
+
(l) => !r && (s || window).addEventListener(l, n)
|
|
7
|
+
), () => {
|
|
8
|
+
typeof e == "string" ? (s || window).removeEventListener(e, n) : e.forEach(
|
|
9
|
+
(l) => (s || window).removeEventListener(l, n)
|
|
10
|
+
);
|
|
11
|
+
}), [s, ...i || []]), r ? () => {
|
|
12
|
+
typeof e == "string" ? (s || window).addEventListener(e, n) : e.forEach(
|
|
13
|
+
(l) => (s || window).addEventListener(l, n)
|
|
14
|
+
);
|
|
15
|
+
} : void 0;
|
|
16
|
+
}, S = (e) => {
|
|
17
|
+
const c = typeof e == "string" ? [e] : e;
|
|
18
|
+
if (new Set(c).size !== c.length)
|
|
19
|
+
throw new Error("there are duplicates in the event type");
|
|
20
|
+
return c;
|
|
21
|
+
}, M = (e, c, t) => C(
|
|
22
|
+
S((t == null ? void 0 : t.event) || "click"),
|
|
23
|
+
(s) => {
|
|
24
|
+
if (e)
|
|
25
|
+
if (e instanceof Array)
|
|
26
|
+
e.map(
|
|
27
|
+
(n) => n instanceof HTMLElement ? n : n.current
|
|
28
|
+
).some(
|
|
29
|
+
(n) => n ? n.contains(s.target) : !1
|
|
30
|
+
) || c(s);
|
|
31
|
+
else {
|
|
32
|
+
const i = e instanceof HTMLElement ? e : e.current;
|
|
33
|
+
i && !i.contains(s.target) && c(s);
|
|
34
|
+
}
|
|
35
|
+
},
|
|
36
|
+
{
|
|
37
|
+
deps: [e, ...(t == null ? void 0 : t.deps) || []]
|
|
38
|
+
}
|
|
39
|
+
), R = (e = 60, c) => {
|
|
40
|
+
const [t, s] = L(e), [i, r] = L(!1), n = b(null), l = T(() => r(!0), []), u = T(() => {
|
|
41
|
+
r(!1), s(e), n.current && (clearTimeout(n.current), n.current = null), c == null || c();
|
|
42
|
+
}, [e, c]);
|
|
43
|
+
return E(() => {
|
|
44
|
+
if (i)
|
|
45
|
+
return t > 0 ? n.current = setTimeout(() => {
|
|
46
|
+
s((a) => a - 1);
|
|
47
|
+
}, 1e3) : u(), () => {
|
|
48
|
+
n.current && (clearTimeout(n.current), n.current = null);
|
|
49
|
+
};
|
|
50
|
+
}, [i, t, u]), [t, l, u];
|
|
51
|
+
}, A = (e) => {
|
|
52
|
+
const [c, t] = L({ w: 0, h: 0 }), s = new ResizeObserver((r) => {
|
|
53
|
+
for (const n of r)
|
|
54
|
+
t({
|
|
55
|
+
w: n.borderBoxSize[0].inlineSize,
|
|
56
|
+
h: n.borderBoxSize[0].blockSize
|
|
57
|
+
});
|
|
58
|
+
}), i = () => {
|
|
59
|
+
if (e && typeof e != "function")
|
|
60
|
+
s.observe(e instanceof HTMLElement ? e : e.current);
|
|
61
|
+
else if (e && typeof e == "function") {
|
|
62
|
+
const r = e();
|
|
63
|
+
s.observe(r instanceof HTMLElement ? r : r.current);
|
|
64
|
+
} else t({ w: window.innerWidth, h: window.innerHeight });
|
|
65
|
+
};
|
|
66
|
+
return E(() => (i(), window.addEventListener("resize", i), () => {
|
|
67
|
+
if (window.removeEventListener("resize", i), e && typeof e != "function")
|
|
68
|
+
s.unobserve(e instanceof HTMLElement ? e : e.current);
|
|
69
|
+
else if (e && typeof e == "function") {
|
|
70
|
+
const r = e();
|
|
71
|
+
s.unobserve(r instanceof HTMLElement ? r : r.current);
|
|
72
|
+
}
|
|
73
|
+
}), [e]), c;
|
|
74
|
+
}, w = (e) => e.toString().toLocaleLowerCase(), k = (e, c, t) => {
|
|
75
|
+
const s = (r, n, l) => {
|
|
76
|
+
r.forEach((u) => {
|
|
77
|
+
if (u.includes("+") && u.length > 1) {
|
|
78
|
+
const a = u.split("+"), f = n.ctrlKey && a.includes("ctrl"), o = n.shiftKey && a.includes("shift"), m = n.altKey && a.includes("alt"), d = n.metaKey && a.includes("meta"), h = (n.ctrlKey || n.metaKey) && a.includes("commandorcontrol");
|
|
79
|
+
a.length === 2 ? (f || o || m || d || h) && n.key.toLocaleLowerCase() === a[a.length - 1] && c(n, u) : a.length === 3 && (f && o || f && m || f && d || f && h || o && m || o && d || o && h || m && d || m && h || d && h) && n.key.toLocaleLowerCase() === a[a.length - 1] && c(n, u);
|
|
80
|
+
} else if (u.includes(w(n.key))) {
|
|
81
|
+
if (l) u === w(n.key) && c(n, u);
|
|
82
|
+
else if (!n.ctrlKey && !n.metaKey && !n.shiftKey && !n.altKey)
|
|
83
|
+
return c(n, u);
|
|
84
|
+
}
|
|
85
|
+
});
|
|
86
|
+
}, i = (r) => C(
|
|
87
|
+
r,
|
|
88
|
+
(n) => s(
|
|
89
|
+
e instanceof Array ? e.map((l) => w(l)) : [w(e)],
|
|
90
|
+
n,
|
|
91
|
+
(t == null ? void 0 : t.exactMatch) || !1
|
|
92
|
+
),
|
|
93
|
+
{
|
|
94
|
+
deps: [t == null ? void 0 : t.target, ...(t == null ? void 0 : t.deps) || []]
|
|
95
|
+
}
|
|
96
|
+
);
|
|
97
|
+
(t == null ? void 0 : t.events) instanceof Array ? t.events.forEach((r) => i(r)) : i((t == null ? void 0 : t.events) || "keydown");
|
|
98
|
+
};
|
|
99
|
+
let y = !1;
|
|
100
|
+
const z = ({ theme: e, onDark: c, onLight: t }) => {
|
|
101
|
+
const s = window.matchMedia("(prefers-color-scheme: dark)"), i = () => {
|
|
102
|
+
s.matches ? c() : t();
|
|
103
|
+
}, r = () => {
|
|
104
|
+
switch (y && (y = !1, s.removeEventListener("change", i)), e) {
|
|
105
|
+
case "light":
|
|
106
|
+
t();
|
|
107
|
+
break;
|
|
108
|
+
case "dark":
|
|
109
|
+
c();
|
|
110
|
+
break;
|
|
111
|
+
default: {
|
|
112
|
+
i(), y = !0, s.addEventListener("change", i);
|
|
113
|
+
break;
|
|
114
|
+
}
|
|
115
|
+
}
|
|
116
|
+
};
|
|
117
|
+
E(() => {
|
|
118
|
+
r();
|
|
119
|
+
}, [e]);
|
|
120
|
+
}, x = (e) => {
|
|
121
|
+
const {
|
|
122
|
+
initTheme: c = "light",
|
|
123
|
+
themeRules: t = (l) => {
|
|
124
|
+
l ? document.documentElement.classList.add("dark") : document.documentElement.classList.remove("dark");
|
|
125
|
+
}
|
|
126
|
+
} = e || Object.assign({}), [s, i] = L(c), r = b(null), n = ({
|
|
127
|
+
targetTheme: l,
|
|
128
|
+
element: u,
|
|
129
|
+
onChange: a
|
|
130
|
+
}) => {
|
|
131
|
+
r.current = u || null, requestAnimationFrame(() => {
|
|
132
|
+
a == null || a(), i(l);
|
|
133
|
+
});
|
|
134
|
+
};
|
|
135
|
+
return z({
|
|
136
|
+
theme: s,
|
|
137
|
+
onDark: () => {
|
|
138
|
+
r.current ? v.changeThemeClipPathCircle({
|
|
139
|
+
element: r.current,
|
|
140
|
+
onChangeTheme: () => t(!0)
|
|
141
|
+
}) : t(!0);
|
|
142
|
+
},
|
|
143
|
+
onLight: () => {
|
|
144
|
+
r.current ? v.changeThemeClipPathCircle({
|
|
145
|
+
element: r.current,
|
|
146
|
+
onChangeTheme: () => t(!1)
|
|
147
|
+
}) : t(!1);
|
|
148
|
+
}
|
|
149
|
+
}), [s, n];
|
|
150
|
+
};
|
|
151
|
+
export {
|
|
152
|
+
C as a,
|
|
153
|
+
k as b,
|
|
154
|
+
M as c,
|
|
155
|
+
R as d,
|
|
156
|
+
z as e,
|
|
157
|
+
x as f,
|
|
158
|
+
A as u
|
|
159
|
+
};
|
package/dist/es/index.js
ADDED
|
@@ -0,0 +1,227 @@
|
|
|
1
|
+
import { f as X, h as Y, i as Z, j as _, k as $, l as oo, m as eo, n as so, o as to, q as ao, r as ro, s as io, t as no, u as co, v as lo, w as mo, x as po, y as fo, z as uo, A as xo, B as So, C as jo, D as vo, E as To, F as ho, G as go, H as wo, I as Bo, J as Lo, K as Oo, L as bo, M as Do, N as Fo, O as Io, P as No } from "./utils-ziqvBIOU.js";
|
|
2
|
+
import { A as Ao, D as Po } from "./AutoSliderList-DqaQhmce.js";
|
|
3
|
+
import { A as Co } from "./AvatarCrop-DzGw2FVQ.js";
|
|
4
|
+
import { L as C } from "./List-B9mP7VjN.js";
|
|
5
|
+
import { A as Vo } from "./List-B9mP7VjN.js";
|
|
6
|
+
import { B as zo } from "./Button-CdxyXFF4.js";
|
|
7
|
+
import { C as Wo } from "./Card3D-sf3zmiHk.js";
|
|
8
|
+
import { C as Ho } from "./Checkbox-BN7rT73n.js";
|
|
9
|
+
import { E as Ko, c as Uo } from "./VirtualList-D8M5JJ-W.js";
|
|
10
|
+
import { M as Qo } from "./MenuButton-CuOdVlg0.js";
|
|
11
|
+
import { m as Yo } from "./Message-BMimz-k2.js";
|
|
12
|
+
import { M as _o } from "./Modal-BAJOEXRd.js";
|
|
13
|
+
import { O as E } from "./Input-wORRaL9-.js";
|
|
14
|
+
import { a as oe } from "./Input-wORRaL9-.js";
|
|
15
|
+
import { j as e } from "./dependencies-DWmdjl5u.js";
|
|
16
|
+
import { useState as l, useEffect as V } from "react";
|
|
17
|
+
import { T as M } from "./Tooltip-C_gPojr9.js";
|
|
18
|
+
import { P as se } from "./Pagination-BtmtUkVw.js";
|
|
19
|
+
import { p as ae } from "./PortalRenderer-8Iur-eZp.js";
|
|
20
|
+
import { R as ie, a as ne } from "./Radio-BmSpqdK8.js";
|
|
21
|
+
import { S as le } from "./SvgImg-Bcmzdjzl.js";
|
|
22
|
+
import { S as pe } from "./Switch-hGQGZVO2.js";
|
|
23
|
+
import { T as ue } from "./TemplateDialog-DuURiDPX.js";
|
|
24
|
+
import { t as xe } from "./Toast-CkC8zQdq.js";
|
|
25
|
+
import { c as je, d as ve, a as Te, u as he, b as ge, e as we, f as Be } from "./hooks-Bj-aT2k8.js";
|
|
26
|
+
import { W as Oe } from "./Waterfall-BXE2_5Sj.js";
|
|
27
|
+
const z = ({
|
|
28
|
+
label: s,
|
|
29
|
+
value: a,
|
|
30
|
+
disabled: i,
|
|
31
|
+
onChange: n,
|
|
32
|
+
optionRender: m,
|
|
33
|
+
currentValue: p
|
|
34
|
+
}) => /* @__PURE__ */ e.jsx(
|
|
35
|
+
"button",
|
|
36
|
+
{
|
|
37
|
+
role: "option",
|
|
38
|
+
"aria-label": s,
|
|
39
|
+
disabled: i,
|
|
40
|
+
className: "ono-option-item",
|
|
41
|
+
onClick: () => n == null ? void 0 : n(a),
|
|
42
|
+
children: m ? m({ label: s, value: a, disabled: i }, p === s) : /* @__PURE__ */ e.jsx(
|
|
43
|
+
"div",
|
|
44
|
+
{
|
|
45
|
+
className: [
|
|
46
|
+
"ono-option-item-content",
|
|
47
|
+
p === s ? "ono-option-item-content-active" : "",
|
|
48
|
+
i ? "ono-option-item-content-disabled" : ""
|
|
49
|
+
].filter(Boolean).join(" "),
|
|
50
|
+
children: s
|
|
51
|
+
}
|
|
52
|
+
)
|
|
53
|
+
}
|
|
54
|
+
), U = ({
|
|
55
|
+
options: s,
|
|
56
|
+
defaultValue: a,
|
|
57
|
+
placeholder: i,
|
|
58
|
+
inputBorder: n,
|
|
59
|
+
isShowArrow: m,
|
|
60
|
+
disabled: p,
|
|
61
|
+
clearable: u,
|
|
62
|
+
selectClassName: L,
|
|
63
|
+
optionsClassName: O,
|
|
64
|
+
filterable: t,
|
|
65
|
+
notFoundContent: b,
|
|
66
|
+
optionRender: D,
|
|
67
|
+
onClear: d,
|
|
68
|
+
onChange: r,
|
|
69
|
+
filterMethod: x
|
|
70
|
+
}) => {
|
|
71
|
+
const [f, S] = l(""), [c, j] = l(""), [v, T] = l(!1), [h, F] = l(!1), [I, g] = l(""), w = (o) => {
|
|
72
|
+
const B = s.find((y) => y.value === o);
|
|
73
|
+
S(B ? B.label : "");
|
|
74
|
+
}, N = () => t ? x && typeof x == "function" ? x(c, s) : s.filter(
|
|
75
|
+
(o) => o.label.toLocaleLowerCase().includes(c.toLocaleLowerCase())
|
|
76
|
+
) : s, k = (o) => {
|
|
77
|
+
F(o), t && c && !o && j("");
|
|
78
|
+
}, A = (o) => {
|
|
79
|
+
r == null || r(o), g(o), w(o);
|
|
80
|
+
}, P = () => {
|
|
81
|
+
d == null || d(), r == null || r(""), g(""), S(""), j("");
|
|
82
|
+
};
|
|
83
|
+
return V(() => {
|
|
84
|
+
a && w(a);
|
|
85
|
+
}, [a, s]), /* @__PURE__ */ e.jsx(
|
|
86
|
+
M,
|
|
87
|
+
{
|
|
88
|
+
sameWidth: !0,
|
|
89
|
+
trigger: "click",
|
|
90
|
+
placement: "bottom",
|
|
91
|
+
isShowArrow: m,
|
|
92
|
+
className: ["ono-option", O].filter(Boolean).join(" "),
|
|
93
|
+
onOpenChange: k,
|
|
94
|
+
content: /* @__PURE__ */ e.jsx(
|
|
95
|
+
C,
|
|
96
|
+
{
|
|
97
|
+
list: N(),
|
|
98
|
+
fallback: b ?? /* @__PURE__ */ e.jsx("div", { className: "ono-option-item", children: /* @__PURE__ */ e.jsx(
|
|
99
|
+
"div",
|
|
100
|
+
{
|
|
101
|
+
className: "ono-option-item-content-no-data",
|
|
102
|
+
onClick: (o) => o.stopPropagation(),
|
|
103
|
+
children: "No Data"
|
|
104
|
+
}
|
|
105
|
+
) }),
|
|
106
|
+
children: (o) => /* @__PURE__ */ e.jsx(
|
|
107
|
+
z,
|
|
108
|
+
{
|
|
109
|
+
...o,
|
|
110
|
+
onChange: A,
|
|
111
|
+
currentValue: f.toString(),
|
|
112
|
+
optionRender: D
|
|
113
|
+
},
|
|
114
|
+
o.value
|
|
115
|
+
)
|
|
116
|
+
}
|
|
117
|
+
),
|
|
118
|
+
children: /* @__PURE__ */ e.jsx(
|
|
119
|
+
"div",
|
|
120
|
+
{
|
|
121
|
+
className: "ono-select",
|
|
122
|
+
onMouseEnter: () => T(!0),
|
|
123
|
+
onMouseLeave: () => T(!1),
|
|
124
|
+
children: /* @__PURE__ */ e.jsx(
|
|
125
|
+
E,
|
|
126
|
+
{
|
|
127
|
+
className: [t ? "" : "ono-select-readonly", L].filter(Boolean).join(" "),
|
|
128
|
+
border: n,
|
|
129
|
+
disabled: p,
|
|
130
|
+
placeholder: t && I ? f.toString() || "" : i,
|
|
131
|
+
readonly: !t,
|
|
132
|
+
value: t && h ? c : f.toString(),
|
|
133
|
+
clearable: v && u,
|
|
134
|
+
suffix: !(v && u && f) && !(u && c && t) ? /* @__PURE__ */ e.jsx(R, { isVisible: h }) : /* @__PURE__ */ e.jsx(e.Fragment, {}),
|
|
135
|
+
onClear: P,
|
|
136
|
+
onChange: (o) => j(o.target.value)
|
|
137
|
+
}
|
|
138
|
+
)
|
|
139
|
+
}
|
|
140
|
+
)
|
|
141
|
+
}
|
|
142
|
+
);
|
|
143
|
+
}, R = ({ isVisible: s }) => /* @__PURE__ */ e.jsx(
|
|
144
|
+
"svg",
|
|
145
|
+
{
|
|
146
|
+
className: [
|
|
147
|
+
"ono-select-arrow-down-icon",
|
|
148
|
+
s ? "ono-select-arrow-down-active" : ""
|
|
149
|
+
].filter(Boolean).join(" "),
|
|
150
|
+
viewBox: "64 64 896 896",
|
|
151
|
+
focusable: "false",
|
|
152
|
+
"data-icon": "down",
|
|
153
|
+
fill: "currentColor",
|
|
154
|
+
"aria-hidden": "true",
|
|
155
|
+
children: /* @__PURE__ */ e.jsx("path", { d: "M884 256h-75c-5.1 0-9.9 2.5-12.9 6.6L512 654.2 227.9 262.6c-3-4.1-7.8-6.6-12.9-6.6h-75c-6.5 0-10.3 7.4-6.5 12.7l352.6 486.1c12.8 17.6 39 17.6 51.7 0l352.6-486.1c3.9-5.3.1-12.7-6.4-12.7z" })
|
|
156
|
+
}
|
|
157
|
+
);
|
|
158
|
+
export {
|
|
159
|
+
Ao as AutoSliderList,
|
|
160
|
+
Co as AvatarCrop,
|
|
161
|
+
Vo as AwaitList,
|
|
162
|
+
zo as Button,
|
|
163
|
+
Wo as Card3D,
|
|
164
|
+
Ho as Checkbox,
|
|
165
|
+
Po as Direction,
|
|
166
|
+
Ko as EstimatedVirtualList,
|
|
167
|
+
C as List,
|
|
168
|
+
Qo as MenuButton,
|
|
169
|
+
_o as Modal,
|
|
170
|
+
E as OnoInput,
|
|
171
|
+
U as OnoSelect,
|
|
172
|
+
oe as OnoTextarea,
|
|
173
|
+
se as Pagination,
|
|
174
|
+
ie as Radio,
|
|
175
|
+
ne as RadioGroup,
|
|
176
|
+
le as SvgImg,
|
|
177
|
+
pe as Switch,
|
|
178
|
+
ue as TemplateDialog,
|
|
179
|
+
M as Tooltip,
|
|
180
|
+
Oe as Waterfall,
|
|
181
|
+
X as adjustingColors,
|
|
182
|
+
Y as base64ToBlob,
|
|
183
|
+
Z as base64ToFile,
|
|
184
|
+
_ as blobToBase64,
|
|
185
|
+
$ as blobToFile,
|
|
186
|
+
oo as calculateAspectRatio,
|
|
187
|
+
eo as checkDeviceIsMobile,
|
|
188
|
+
so as checkStatusCode,
|
|
189
|
+
to as colorUtils,
|
|
190
|
+
ao as common,
|
|
191
|
+
ro as convertSecondToOtherTime,
|
|
192
|
+
io as copy2Clipboard,
|
|
193
|
+
Uo as createDataSource,
|
|
194
|
+
no as createIntersectionObserver,
|
|
195
|
+
co as deepCopy,
|
|
196
|
+
lo as downloadFile,
|
|
197
|
+
mo as fileToBase64,
|
|
198
|
+
po as fileToBlob,
|
|
199
|
+
fo as formatFileSize,
|
|
200
|
+
uo as formatSecondes,
|
|
201
|
+
xo as formatTime,
|
|
202
|
+
So as getFileName,
|
|
203
|
+
jo as getFileSuffix,
|
|
204
|
+
vo as getImageSIze,
|
|
205
|
+
To as getPointDistance,
|
|
206
|
+
ho as getURLSearchParams,
|
|
207
|
+
go as localFormat,
|
|
208
|
+
Yo as message,
|
|
209
|
+
ae as portalRenderer,
|
|
210
|
+
wo as printStr,
|
|
211
|
+
Bo as quickSort,
|
|
212
|
+
Lo as randomString,
|
|
213
|
+
Oo as safeCapitalizeWord,
|
|
214
|
+
bo as second2Day,
|
|
215
|
+
Do as singleton,
|
|
216
|
+
xe as toast,
|
|
217
|
+
Fo as urlToBase64,
|
|
218
|
+
Io as urlToBlob,
|
|
219
|
+
No as urlToFile,
|
|
220
|
+
je as useClickOutSide,
|
|
221
|
+
ve as useCountdown,
|
|
222
|
+
Te as useEventListener,
|
|
223
|
+
he as useGetElementSize,
|
|
224
|
+
ge as useKeyPress,
|
|
225
|
+
we as useTheme,
|
|
226
|
+
Be as useThemePro
|
|
227
|
+
};
|