@unicom-cloud/ui 0.8.106 → 0.8.107
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/App.js +7 -0
- package/BackTop.js +2 -4
- package/Calendar.js +2 -2
- package/Modal.js +4 -2
- package/app/App.js +26 -0
- package/app/context.js +9 -0
- package/app/index.js +9 -0
- package/app/interface.js +1 -0
- package/app/useApp.js +8 -0
- package/back-top/index.js +44 -56
- package/calendar/Lunar.js +71 -0
- package/calendar/index.js +11 -11
- package/color-picker/index.js +34 -34
- package/components/common/flex/index.js +4 -4
- package/components/common/icons/file/index.js +13 -11
- package/components/common/utils/dayjs.js +99 -124
- package/components/common/utils/is.js +98 -104
- package/components/common/utils/setDir.js +12 -0
- package/components/common/utils/setTheme.js +13 -13
- package/config-provider/ConfigProvider.js +32 -30
- package/descriptions/index.js +32 -32
- package/divider/index.js +28 -20
- package/empty/index.js +1 -1
- package/grid/Grid.js +55 -88
- package/grid/Item.js +40 -61
- package/grid/context.js +1 -4
- package/grid/hook/useResponsiveState.js +22 -25
- package/grid/util.js +6 -44
- package/index.js +462 -457
- package/input/Button.js +12 -12
- package/input/Group.js +11 -12
- package/input/Input.js +112 -102
- package/input/Search.js +24 -24
- package/modal/Confirm.js +17 -17
- package/modal/Modal.js +247 -237
- package/modal/index.js +4 -2
- package/modal/use-modal/index.js +2 -2
- package/package.json +1 -1
- package/select-view/Core.js +31 -28
- package/splitter/SplitBar.js +44 -46
- package/style.css +1 -1
- package/table/Table.js +198 -210
- package/table/th-resizable/index.js +9 -10
- package/time-picker/util.js +20 -30
- package/types/common/development/interface.d.ts +3 -3
- package/types/common/utils/is.d.ts +3 -4
- package/types/common/utils/setDir.d.ts +2 -0
- package/types/pc/app/App.d.ts +6 -0
- package/types/pc/app/context.d.ts +4 -0
- package/types/pc/app/index.d.ts +5 -0
- package/types/pc/app/interface.d.ts +17 -0
- package/types/pc/app/useApp.d.ts +3 -0
- package/types/pc/back-top/interface.d.ts +4 -17
- package/types/pc/calendar/Lunar.d.ts +17 -0
- package/types/pc/calendar/index.d.ts +1 -1
- package/types/pc/config-provider/interface.d.ts +1 -1
- package/types/pc/divider/interface.d.ts +1 -0
- package/types/pc/grid/Grid.d.ts +1 -2
- package/types/pc/grid/Item.d.ts +2 -5
- package/types/pc/grid/context.d.ts +4 -10
- package/types/pc/grid/hook/useResponsiveState.d.ts +2 -2
- package/types/pc/grid/interface.d.ts +9 -19
- package/types/pc/grid/util.d.ts +1 -10
- package/types/pc/index.d.ts +3 -1
- package/types/pc/input/Button.d.ts +2 -2
- package/types/pc/message/index.d.ts +1 -9
- package/types/pc/message/interface.d.ts +8 -0
- package/types/pc/message/useMessage.d.ts +1 -2
- package/types/pc/modal/Modal.d.ts +1 -0
- package/types/pc/modal/config.d.ts +1 -2
- package/types/pc/modal/index.d.ts +2 -1
- package/types/pc/modal/interface.d.ts +17 -5
- package/types/pc/notification/index.d.ts +2 -9
- package/types/pc/notification/interface.d.ts +7 -0
- package/types/pc/notification/useNotification.d.ts +1 -2
- package/types/pc/select-view/Core.d.ts +1 -8
- package/types/pc/select-view/index.d.ts +1 -8
- package/types/pc/select-view/interface.d.ts +9 -2
- package/types/pc/utils/is.d.ts +1 -1
- package/types/pc/utils/names.d.ts +303 -0
- package/utils/index.js +58 -59
- package/utils/is.js +65 -66
- package/utils/names.js +298 -144
- package/version/index.js +1 -1
package/App.js
ADDED
package/BackTop.js
CHANGED
|
@@ -1,7 +1,5 @@
|
|
|
1
1
|
import "react/jsx-runtime";
|
|
2
2
|
import "@unicom-cloud/icons/IconUiToTop";
|
|
3
|
-
import "./dist/tween/src/tween.js";
|
|
4
|
-
import "./dist/tween/src/easing.js";
|
|
5
3
|
import "react";
|
|
6
4
|
import "./config-provider/ConfigProvider.js";
|
|
7
5
|
import "./components/common/hooks/useKeyboardEvent.js";
|
|
@@ -12,7 +10,7 @@ import "./components/common/utils/dom.js";
|
|
|
12
10
|
import "./components/common/utils/pick.js";
|
|
13
11
|
import "./components/common/utils/throttleByRaf.js";
|
|
14
12
|
import "./config-provider/context.js";
|
|
15
|
-
import { default as
|
|
13
|
+
import { default as c } from "./back-top/index.js";
|
|
16
14
|
export {
|
|
17
|
-
|
|
15
|
+
c as default
|
|
18
16
|
};
|
package/Calendar.js
CHANGED
|
@@ -6,10 +6,10 @@ import "./components/common/hooks/useMergeProps.js";
|
|
|
6
6
|
import "@unicom-cloud/utils/class-name";
|
|
7
7
|
import "./components/common/utils/dayjs.js";
|
|
8
8
|
import "./components/common/utils/pick.js";
|
|
9
|
-
import { default as x } from "./calendar/Month.js";
|
|
10
|
-
import { default as C } from "./calendar/Year.js";
|
|
11
9
|
import "./calendar/header/index.js";
|
|
12
10
|
import "./calendar/header/Panel.js";
|
|
11
|
+
import { default as x } from "./calendar/Month.js";
|
|
12
|
+
import { default as C } from "./calendar/Year.js";
|
|
13
13
|
import "./config-provider/context.js";
|
|
14
14
|
import { default as M } from "./calendar/index.js";
|
|
15
15
|
export {
|
package/Modal.js
CHANGED
package/app/App.js
ADDED
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { jsxs as f } from "react/jsx-runtime";
|
|
2
|
+
import { useMemo as l } from "react";
|
|
3
|
+
import "../message/index.js";
|
|
4
|
+
import "../modal/Modal.js";
|
|
5
|
+
import "../notification/index.js";
|
|
6
|
+
import d from "./context.js";
|
|
7
|
+
import u from "../message/useMessage.js";
|
|
8
|
+
import x from "../notification/useNotification.js";
|
|
9
|
+
import A from "../modal/use-modal/index.js";
|
|
10
|
+
function g(i) {
|
|
11
|
+
const { children: r, message: n, notification: m } = i, [o, s] = u(n), [t, p] = x(m), [e, a] = A(), c = l(() => ({
|
|
12
|
+
message: o,
|
|
13
|
+
notification: t,
|
|
14
|
+
modal: e
|
|
15
|
+
}), [o, t, e]);
|
|
16
|
+
return /* @__PURE__ */ f(d.Provider, { value: c, children: [
|
|
17
|
+
a,
|
|
18
|
+
s,
|
|
19
|
+
p,
|
|
20
|
+
r
|
|
21
|
+
] });
|
|
22
|
+
}
|
|
23
|
+
g.displayName = "App";
|
|
24
|
+
export {
|
|
25
|
+
g as default
|
|
26
|
+
};
|
package/app/context.js
ADDED
package/app/index.js
ADDED
package/app/interface.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
|
package/app/useApp.js
ADDED
package/back-top/index.js
CHANGED
|
@@ -1,83 +1,71 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import
|
|
3
|
-
import {
|
|
4
|
-
import x from "../dist/tween/src/easing.js";
|
|
5
|
-
import k, { forwardRef as y, useContext as B, useState as E, useEffect as N } from "react";
|
|
1
|
+
import { jsx as s } from "react/jsx-runtime";
|
|
2
|
+
import v from "@unicom-cloud/icons/IconUiToTop";
|
|
3
|
+
import C, { forwardRef as k, useContext as x, useState as y, useEffect as E } from "react";
|
|
6
4
|
import "../config-provider/ConfigProvider.js";
|
|
7
|
-
import
|
|
8
|
-
import
|
|
9
|
-
import { PqbCSSTransition as
|
|
10
|
-
import
|
|
11
|
-
import { on as
|
|
12
|
-
import { pickDataAttributes as
|
|
13
|
-
import { throttleByRaf as
|
|
14
|
-
import
|
|
15
|
-
function
|
|
16
|
-
const
|
|
5
|
+
import N from "../components/common/hooks/useKeyboardEvent.js";
|
|
6
|
+
import w from "../components/common/hooks/useMergeProps.js";
|
|
7
|
+
import { PqbCSSTransition as B } from "../components/common/utils/PqbCSSTransition.js";
|
|
8
|
+
import H from "@unicom-cloud/utils/class-name";
|
|
9
|
+
import { on as P, off as R } from "../components/common/utils/dom.js";
|
|
10
|
+
import { pickDataAttributes as S } from "../components/common/utils/pick.js";
|
|
11
|
+
import { throttleByRaf as $ } from "../components/common/utils/throttleByRaf.js";
|
|
12
|
+
import D from "../config-provider/context.js";
|
|
13
|
+
function I(m, a) {
|
|
14
|
+
const p = {
|
|
17
15
|
visibleHeight: 400,
|
|
18
|
-
|
|
19
|
-
easing: x.quartOut,
|
|
20
|
-
duration: 400,
|
|
16
|
+
smooth: !0,
|
|
21
17
|
target: () => window
|
|
22
|
-
}, { getPrefixCls:
|
|
18
|
+
}, { getPrefixCls: f, componentConfig: u, rtl: d } = x(D), g = N(), o = w(
|
|
23
19
|
m,
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
),
|
|
27
|
-
|
|
28
|
-
const
|
|
29
|
-
const
|
|
30
|
-
|
|
20
|
+
p,
|
|
21
|
+
u?.BackTop
|
|
22
|
+
), n = f?.("backtop"), [b, h] = y(!1), i = (t) => t === window ? document.documentElement : t;
|
|
23
|
+
E(() => {
|
|
24
|
+
const t = o.target?.(), e = $(() => {
|
|
25
|
+
const r = o.visibleHeight, T = i(t).scrollTop;
|
|
26
|
+
h(T >= r);
|
|
31
27
|
});
|
|
32
|
-
return
|
|
33
|
-
|
|
28
|
+
return P(t, "scroll", e), e(), () => {
|
|
29
|
+
e.cancel?.(), R(t, "scroll", e);
|
|
34
30
|
};
|
|
35
31
|
}, [o.target, o.visibleHeight]);
|
|
36
|
-
const
|
|
37
|
-
const
|
|
38
|
-
|
|
39
|
-
from: { scrollTop: n },
|
|
40
|
-
to: { scrollTop: 0 },
|
|
41
|
-
easing: o.easing,
|
|
42
|
-
duration: o.duration,
|
|
43
|
-
onUpdate: (h) => {
|
|
44
|
-
t.scrollTop = h.scrollTop;
|
|
45
|
-
}
|
|
46
|
-
}).start(), o.onClick?.();
|
|
32
|
+
const c = () => {
|
|
33
|
+
const t = o.target?.(), e = i(t), r = { top: 0 };
|
|
34
|
+
o.smooth && (r.behavior = "smooth"), e.scrollTo(r), o.onClick?.();
|
|
47
35
|
};
|
|
48
|
-
return /* @__PURE__ */
|
|
36
|
+
return /* @__PURE__ */ s(
|
|
49
37
|
"div",
|
|
50
38
|
{
|
|
51
|
-
...
|
|
52
|
-
ref:
|
|
53
|
-
className:
|
|
54
|
-
`${
|
|
55
|
-
{ [`${
|
|
39
|
+
...S(o),
|
|
40
|
+
ref: a,
|
|
41
|
+
className: H(
|
|
42
|
+
`${n}`,
|
|
43
|
+
{ [`${n}-rtl`]: d },
|
|
56
44
|
o.className
|
|
57
45
|
),
|
|
58
46
|
style: o.style,
|
|
59
|
-
onClick:
|
|
60
|
-
...
|
|
61
|
-
onPressEnter:
|
|
47
|
+
onClick: c,
|
|
48
|
+
...g({
|
|
49
|
+
onPressEnter: c
|
|
62
50
|
}),
|
|
63
|
-
children: /* @__PURE__ */
|
|
64
|
-
|
|
51
|
+
children: /* @__PURE__ */ s(
|
|
52
|
+
B,
|
|
65
53
|
{
|
|
66
54
|
in: b,
|
|
67
55
|
timeout: 100,
|
|
68
56
|
classNames: "fadeIn",
|
|
69
57
|
unmountOnExit: !0,
|
|
70
|
-
children: o.children || /* @__PURE__ */
|
|
58
|
+
children: o.children || /* @__PURE__ */ s("button", { className: `${n}-button`, children: /* @__PURE__ */ s(v, {}) })
|
|
71
59
|
}
|
|
72
60
|
)
|
|
73
61
|
}
|
|
74
62
|
);
|
|
75
63
|
}
|
|
76
|
-
const
|
|
77
|
-
|
|
64
|
+
const l = k(
|
|
65
|
+
I
|
|
78
66
|
);
|
|
79
|
-
|
|
80
|
-
const
|
|
67
|
+
l.displayName = "BackTop";
|
|
68
|
+
const L = C.memo(l);
|
|
81
69
|
export {
|
|
82
|
-
|
|
70
|
+
L as default
|
|
83
71
|
};
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
import { jsx as a, jsxs as s } from "react/jsx-runtime";
|
|
2
|
+
import { LunarUtil as p, SolarUtil as m, Solar as g, Lunar as u } from "@unicom-cloud/utils/lunar";
|
|
3
|
+
import { useEffect as C } from "react";
|
|
4
|
+
import E from "./index.js";
|
|
5
|
+
import S, { FlexVertical as I } from "../flex/index.js";
|
|
6
|
+
import j from "../space/index.js";
|
|
7
|
+
import "../components/common/utils/is.js";
|
|
8
|
+
import { isPlainObject as c } from "@unicom-cloud/utils/is";
|
|
9
|
+
function v(d) {
|
|
10
|
+
const { festival: n } = d;
|
|
11
|
+
return C(() => (c(n?.lunar) && Object.entries(n.lunar).forEach(([e, t], r, i) => {
|
|
12
|
+
p.FESTIVAL[e] = t;
|
|
13
|
+
}), () => {
|
|
14
|
+
c(n?.lunar) && Object.entries(n.lunar).forEach(([e, t], r, i) => {
|
|
15
|
+
delete p.FESTIVAL[e];
|
|
16
|
+
});
|
|
17
|
+
}), [n.lunar]), C(() => (c(n?.solar) && Object.entries(n.solar).forEach(([e, t], r, i) => {
|
|
18
|
+
m.FESTIVAL[e] = t;
|
|
19
|
+
}), () => {
|
|
20
|
+
c(n?.solar) && Object.entries(n.solar).forEach(([e, t], r, i) => {
|
|
21
|
+
delete m.FESTIVAL[e];
|
|
22
|
+
});
|
|
23
|
+
}), [n.solar]), /* @__PURE__ */ a(
|
|
24
|
+
E,
|
|
25
|
+
{
|
|
26
|
+
headerRender: ({
|
|
27
|
+
value: e,
|
|
28
|
+
pageShowDate: t,
|
|
29
|
+
onChangeMode: r,
|
|
30
|
+
onChange: i,
|
|
31
|
+
onChangePageDate: h,
|
|
32
|
+
header: o
|
|
33
|
+
}) => {
|
|
34
|
+
const f = t?.toDate?.(), D = g.fromDate(f), l = u.fromDate(f);
|
|
35
|
+
return /* @__PURE__ */ s(I, { children: [
|
|
36
|
+
/* @__PURE__ */ a("div", { children: o }),
|
|
37
|
+
/* @__PURE__ */ s(S, { style: { padding: "0px 24px" }, children: [
|
|
38
|
+
/* @__PURE__ */ a("span", { children: l.getYearInChinese() }),
|
|
39
|
+
/* @__PURE__ */ a("span", { children: l.getYearInGanZhi() }),
|
|
40
|
+
/* @__PURE__ */ a("span", { children: l.getYearShengXiao() }),
|
|
41
|
+
/* @__PURE__ */ s("span", { children: [
|
|
42
|
+
l.getMonthInChinese(),
|
|
43
|
+
"月"
|
|
44
|
+
] }),
|
|
45
|
+
/* @__PURE__ */ a("span", { children: l.getSeason() }),
|
|
46
|
+
/* @__PURE__ */ a("span", { children: D.getXingZuo() })
|
|
47
|
+
] })
|
|
48
|
+
] });
|
|
49
|
+
},
|
|
50
|
+
dateInnerContent: (e) => {
|
|
51
|
+
const t = g.fromDate(e.toDate()), r = u.fromDate(e.toDate()), i = r.getJieQi(), h = [
|
|
52
|
+
...t.getFestivals(),
|
|
53
|
+
...r.getFestivals()
|
|
54
|
+
// ...solar.getOtherFestivals(),
|
|
55
|
+
// ...lunar.getOtherFestivals(),
|
|
56
|
+
];
|
|
57
|
+
let o = r.getDayInChinese();
|
|
58
|
+
return r.getDay() == 1 && (o = `${r.getMonthInChinese()}月${o}`), /* @__PURE__ */ s(I, { gap: 0, children: [
|
|
59
|
+
/* @__PURE__ */ a("span", { children: o }),
|
|
60
|
+
!!h.length && /* @__PURE__ */ a(j, { children: h }),
|
|
61
|
+
!!i && /* @__PURE__ */ a("span", { children: i })
|
|
62
|
+
] });
|
|
63
|
+
},
|
|
64
|
+
...d
|
|
65
|
+
}
|
|
66
|
+
);
|
|
67
|
+
}
|
|
68
|
+
v.displayName = "LunarComponent";
|
|
69
|
+
export {
|
|
70
|
+
v as default
|
|
71
|
+
};
|
package/calendar/index.js
CHANGED
|
@@ -6,10 +6,10 @@ import de from "../components/common/hooks/useMergeProps.js";
|
|
|
6
6
|
import me from "@unicom-cloud/utils/class-name";
|
|
7
7
|
import { getDayjsValue as u, getNow as A, methods as g } from "../components/common/utils/dayjs.js";
|
|
8
8
|
import { pickDataAttributes as ce } from "../components/common/utils/pick.js";
|
|
9
|
-
import ie
|
|
10
|
-
import
|
|
11
|
-
import he from "./
|
|
12
|
-
import ue from "./
|
|
9
|
+
import ie from "./header/index.js";
|
|
10
|
+
import pe from "./header/Panel.js";
|
|
11
|
+
import fe, { getAllDaysByTime as he } from "./Month.js";
|
|
12
|
+
import ue from "./Year.js";
|
|
13
13
|
import ge from "../config-provider/context.js";
|
|
14
14
|
function ye(m, y) {
|
|
15
15
|
return m === "month" || m === "year" && !y ? "YYYY-MM-DD" : "YYYY-MM";
|
|
@@ -57,7 +57,7 @@ function De(m) {
|
|
|
57
57
|
u(w || _, i)
|
|
58
58
|
), [X, p] = M(
|
|
59
59
|
u(F, i) || Y || A()
|
|
60
|
-
), t = u(R, i) || X, C = "value" in s ? u(w, i) : Y, N = le(() =>
|
|
60
|
+
), t = u(R, i) || X, C = "value" in s ? u(w, i) : Y, N = le(() => he(s, t), [t.toString(), a, W]);
|
|
61
61
|
function f(e) {
|
|
62
62
|
U(e), z?.(e), v(e);
|
|
63
63
|
}
|
|
@@ -100,8 +100,8 @@ function De(m) {
|
|
|
100
100
|
modes: I,
|
|
101
101
|
innerMode: a,
|
|
102
102
|
panelOperations: J
|
|
103
|
-
}, $ = d ? /* @__PURE__ */ r(
|
|
104
|
-
|
|
103
|
+
}, $ = d ? /* @__PURE__ */ r(pe, { ...V }) : /* @__PURE__ */ r(
|
|
104
|
+
ie,
|
|
105
105
|
{
|
|
106
106
|
...V,
|
|
107
107
|
CALENDAR_LOCALE: l,
|
|
@@ -129,7 +129,7 @@ function De(m) {
|
|
|
129
129
|
header: $
|
|
130
130
|
}) : $,
|
|
131
131
|
a === "month" && /* @__PURE__ */ r("div", { className: `${o}-body`, children: /* @__PURE__ */ r(
|
|
132
|
-
|
|
132
|
+
fe,
|
|
133
133
|
{
|
|
134
134
|
...s,
|
|
135
135
|
prefixCls: o,
|
|
@@ -142,7 +142,7 @@ function De(m) {
|
|
|
142
142
|
}
|
|
143
143
|
) }),
|
|
144
144
|
a === "year" && /* @__PURE__ */ r("div", { className: `${o}-body`, children: /* @__PURE__ */ r(
|
|
145
|
-
|
|
145
|
+
ue,
|
|
146
146
|
{
|
|
147
147
|
...s,
|
|
148
148
|
prefixCls: o,
|
|
@@ -168,7 +168,7 @@ function De(m) {
|
|
|
168
168
|
}
|
|
169
169
|
De.displayName = "Calendar";
|
|
170
170
|
export {
|
|
171
|
-
|
|
172
|
-
|
|
171
|
+
fe as CalendarMonth,
|
|
172
|
+
ue as CalendarYear,
|
|
173
173
|
De as default
|
|
174
174
|
};
|
package/color-picker/index.js
CHANGED
|
@@ -8,12 +8,12 @@ import K from "../components/common/hooks/useMergeProps.js";
|
|
|
8
8
|
import L from "../trigger/index.js";
|
|
9
9
|
import Q from "@unicom-cloud/utils/class-name";
|
|
10
10
|
import { colors as U } from "./colors.js";
|
|
11
|
-
import { ControlBar as
|
|
11
|
+
import { ControlBar as kr } from "./ControlBar.js";
|
|
12
12
|
import { useColorPicker as W } from "./hooks/useColorPicker.js";
|
|
13
|
-
import { InputAlpha as
|
|
14
|
-
import { InputHex as
|
|
15
|
-
import { InputRgb as
|
|
16
|
-
import { Palette as
|
|
13
|
+
import { InputAlpha as yr } from "./InputAlpha.js";
|
|
14
|
+
import { InputHex as Nr } from "./InputHex.js";
|
|
15
|
+
import { InputRgb as br } from "./InputRgb.js";
|
|
16
|
+
import { Palette as zr } from "./Palette.js";
|
|
17
17
|
import { Panel as X } from "./Panel.js";
|
|
18
18
|
import { getGradientString as Y, renderBackground as Z } from "./utils.js";
|
|
19
19
|
import _ from "../config-provider/context.js";
|
|
@@ -21,7 +21,7 @@ const c = {
|
|
|
21
21
|
size: "default",
|
|
22
22
|
presetColors: U
|
|
23
23
|
};
|
|
24
|
-
function
|
|
24
|
+
function rr(t, m) {
|
|
25
25
|
const {
|
|
26
26
|
getPrefixCls: d,
|
|
27
27
|
componentConfig: g,
|
|
@@ -45,15 +45,15 @@ function oo(t, m) {
|
|
|
45
45
|
showHistory: N,
|
|
46
46
|
showPreset: A,
|
|
47
47
|
renderFooter: b
|
|
48
|
-
} = n,
|
|
49
|
-
value:
|
|
48
|
+
} = n, o = d?.("color-picker"), {
|
|
49
|
+
value: r,
|
|
50
50
|
activeMode: $,
|
|
51
51
|
gradientColors: z,
|
|
52
52
|
activeColorId: w,
|
|
53
53
|
activeColorIdRef: E,
|
|
54
54
|
popupVisible: R,
|
|
55
|
-
color:
|
|
56
|
-
alpha:
|
|
55
|
+
color: H,
|
|
56
|
+
alpha: B,
|
|
57
57
|
onHsvChange: M,
|
|
58
58
|
onAlphaChange: O,
|
|
59
59
|
onVisibleChange: T,
|
|
@@ -67,14 +67,14 @@ function oo(t, m) {
|
|
|
67
67
|
popup: () => /* @__PURE__ */ e(
|
|
68
68
|
X,
|
|
69
69
|
{
|
|
70
|
-
value:
|
|
70
|
+
value: r,
|
|
71
71
|
mode: h,
|
|
72
72
|
activeMode: $,
|
|
73
73
|
gradientColors: z,
|
|
74
74
|
activeColorId: w,
|
|
75
75
|
activeColorIdRef: E,
|
|
76
|
-
color:
|
|
77
|
-
alpha:
|
|
76
|
+
color: H,
|
|
77
|
+
alpha: B,
|
|
78
78
|
historyColors: y,
|
|
79
79
|
presetColors: I,
|
|
80
80
|
showHistory: N,
|
|
@@ -103,16 +103,16 @@ function oo(t, m) {
|
|
|
103
103
|
...P,
|
|
104
104
|
onVisibleChange: T,
|
|
105
105
|
children: (() => {
|
|
106
|
-
const a = G(t.triggerElement) ? t.triggerElement({ value:
|
|
106
|
+
const a = G(t.triggerElement) ? t.triggerElement({ value: r }) : t.triggerElement;
|
|
107
107
|
if (!S(a))
|
|
108
108
|
return a;
|
|
109
|
-
const s = typeof
|
|
109
|
+
const s = typeof r == "string" ? r : Y(r);
|
|
110
110
|
return /* @__PURE__ */ p(
|
|
111
111
|
"div",
|
|
112
112
|
{
|
|
113
|
-
className: Q(
|
|
114
|
-
[`${
|
|
115
|
-
[`${
|
|
113
|
+
className: Q(o, f, {
|
|
114
|
+
[`${o}-size-${l}`]: l,
|
|
115
|
+
[`${o}-disabled`]: i
|
|
116
116
|
}),
|
|
117
117
|
style: C,
|
|
118
118
|
ref: m,
|
|
@@ -120,20 +120,20 @@ function oo(t, m) {
|
|
|
120
120
|
/* @__PURE__ */ e(
|
|
121
121
|
"div",
|
|
122
122
|
{
|
|
123
|
-
className: `${
|
|
124
|
-
style: Array.isArray(
|
|
125
|
-
background: Z(
|
|
126
|
-
} : { backgroundColor:
|
|
123
|
+
className: `${o}-preview`,
|
|
124
|
+
style: Array.isArray(r) ? {
|
|
125
|
+
background: Z(r)
|
|
126
|
+
} : { backgroundColor: r }
|
|
127
127
|
}
|
|
128
128
|
),
|
|
129
|
-
!!v && /* @__PURE__ */ p("div", { className: `${
|
|
129
|
+
!!v && /* @__PURE__ */ p("div", { className: `${o}-value`, children: [
|
|
130
130
|
s,
|
|
131
|
-
!i && /* @__PURE__ */ e(J, { text: s, className: `${
|
|
131
|
+
!i && /* @__PURE__ */ e(J, { text: s, className: `${o}-copy` })
|
|
132
132
|
] }),
|
|
133
133
|
/* @__PURE__ */ e(
|
|
134
134
|
"input",
|
|
135
135
|
{
|
|
136
|
-
className: `${
|
|
136
|
+
className: `${o}-input`,
|
|
137
137
|
value: s,
|
|
138
138
|
disabled: i,
|
|
139
139
|
readOnly: !0
|
|
@@ -147,16 +147,16 @@ function oo(t, m) {
|
|
|
147
147
|
}
|
|
148
148
|
);
|
|
149
149
|
}
|
|
150
|
-
const
|
|
151
|
-
|
|
150
|
+
const or = D.forwardRef(
|
|
151
|
+
rr
|
|
152
152
|
);
|
|
153
|
-
|
|
153
|
+
or.displayName = "ColorPicker";
|
|
154
154
|
export {
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
155
|
+
kr as ColorPickerControlBar,
|
|
156
|
+
yr as ColorPickerInputAlpha,
|
|
157
|
+
Nr as ColorPickerInputHex,
|
|
158
|
+
br as ColorPickerInputRgb,
|
|
159
|
+
zr as ColorPickerPalette,
|
|
160
160
|
X as ColorPickerPanel,
|
|
161
|
-
|
|
161
|
+
or as default
|
|
162
162
|
};
|
|
@@ -32,10 +32,10 @@ const O = (o) => A(o) && Object.keys(y).includes(o), m = (o, r, t) => {
|
|
|
32
32
|
...s !== void 0 && {
|
|
33
33
|
flexWrap: V(s) ? s ? "wrap" : "nowrap" : s
|
|
34
34
|
},
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
35
|
+
...!!n && { alignItems: n },
|
|
36
|
+
...!!i && { justifyContent: i },
|
|
37
|
+
...!!e && { flexDirection: e },
|
|
38
|
+
...!!l && { flex: l }
|
|
39
39
|
};
|
|
40
40
|
return { ...c, ...M };
|
|
41
41
|
}, [f, s, n, i, e, l, c]);
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import { jsx as
|
|
1
|
+
import { jsx as e, jsxs as n } from "react/jsx-runtime";
|
|
2
2
|
import { UI_COMMON_PREFIX as d } from "@unicom-cloud/utils/constant/ui";
|
|
3
3
|
import { forwardRef as f } from "react";
|
|
4
4
|
import p from "@unicom-cloud/utils/class-name";
|
|
5
|
-
function x(
|
|
6
|
-
const { style: o, className:
|
|
7
|
-
return /* @__PURE__ */
|
|
5
|
+
function x(s, t) {
|
|
6
|
+
const { style: o, className: c, backgroundColor: a, color: i, text: r, ...m } = s, l = `${d}-icons-file`;
|
|
7
|
+
return /* @__PURE__ */ e("div", { className: p(l, c), children: /* @__PURE__ */ n(
|
|
8
8
|
"svg",
|
|
9
9
|
{
|
|
10
|
-
ref:
|
|
10
|
+
ref: t,
|
|
11
11
|
className: `${l}-svg`,
|
|
12
12
|
style: o,
|
|
13
13
|
...m,
|
|
@@ -16,7 +16,7 @@ function x(e, c) {
|
|
|
16
16
|
viewBox: "0 0 166 200",
|
|
17
17
|
version: "1.1",
|
|
18
18
|
children: [
|
|
19
|
-
/* @__PURE__ */
|
|
19
|
+
/* @__PURE__ */ e(
|
|
20
20
|
"path",
|
|
21
21
|
{
|
|
22
22
|
className: `${l}-svg-bg`,
|
|
@@ -26,23 +26,25 @@ function x(e, c) {
|
|
|
26
26
|
}
|
|
27
27
|
}
|
|
28
28
|
),
|
|
29
|
-
/* @__PURE__ */
|
|
29
|
+
/* @__PURE__ */ e(
|
|
30
30
|
"path",
|
|
31
31
|
{
|
|
32
32
|
className: `${l}-svg-tr`,
|
|
33
33
|
d: "M165.174,55.97l-46.193,0c-5.379,-0.13 -9.768,-4.505 -9.904,-9.872l0,-46.098l56.088,55.97l0.009,0Z"
|
|
34
34
|
}
|
|
35
35
|
),
|
|
36
|
-
/* @__PURE__ */
|
|
36
|
+
/* @__PURE__ */ e(
|
|
37
37
|
"text",
|
|
38
38
|
{
|
|
39
39
|
className: `${l}-svg-text`,
|
|
40
|
-
x: "
|
|
40
|
+
x: "50%",
|
|
41
41
|
y: "142.967px",
|
|
42
|
+
textAnchor: "middle",
|
|
43
|
+
dominantBaseline: "middle",
|
|
42
44
|
style: {
|
|
43
|
-
fill:
|
|
45
|
+
fill: i
|
|
44
46
|
},
|
|
45
|
-
children:
|
|
47
|
+
children: r ?? "doc"
|
|
46
48
|
}
|
|
47
49
|
)
|
|
48
50
|
]
|