@unicom-cloud/ui 0.8.105 → 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.
Files changed (87) hide show
  1. package/App.js +7 -0
  2. package/BackTop.js +2 -4
  3. package/Calendar.js +2 -2
  4. package/Modal.js +4 -2
  5. package/Segmented.js +4 -2
  6. package/app/App.js +26 -0
  7. package/app/context.js +9 -0
  8. package/app/index.js +9 -0
  9. package/app/interface.js +1 -0
  10. package/app/useApp.js +8 -0
  11. package/back-top/index.js +44 -56
  12. package/calendar/Lunar.js +71 -0
  13. package/calendar/index.js +11 -11
  14. package/color-picker/index.js +34 -34
  15. package/components/common/flex/index.js +4 -4
  16. package/components/common/icons/file/index.js +13 -11
  17. package/components/common/utils/dayjs.js +99 -124
  18. package/components/common/utils/is.js +98 -104
  19. package/components/common/utils/setDir.js +12 -0
  20. package/components/common/utils/setTheme.js +13 -13
  21. package/config-provider/ConfigProvider.js +32 -30
  22. package/descriptions/index.js +32 -32
  23. package/divider/index.js +28 -20
  24. package/empty/index.js +1 -1
  25. package/grid/Grid.js +55 -88
  26. package/grid/Item.js +40 -61
  27. package/grid/context.js +1 -4
  28. package/grid/hook/useResponsiveState.js +22 -25
  29. package/grid/util.js +6 -44
  30. package/index.js +462 -457
  31. package/input/Button.js +12 -12
  32. package/input/Group.js +11 -12
  33. package/input/Input.js +112 -102
  34. package/input/Search.js +24 -24
  35. package/modal/Confirm.js +17 -17
  36. package/modal/Modal.js +247 -237
  37. package/modal/index.js +4 -2
  38. package/modal/use-modal/index.js +2 -2
  39. package/package.json +1 -1
  40. package/segmented/index.js +93 -90
  41. package/select-view/Core.js +31 -28
  42. package/splitter/SplitBar.js +44 -46
  43. package/style.css +1 -1
  44. package/table/Table.js +198 -210
  45. package/table/th-resizable/index.js +9 -10
  46. package/time-picker/util.js +20 -30
  47. package/types/common/development/interface.d.ts +3 -3
  48. package/types/common/utils/is.d.ts +3 -4
  49. package/types/common/utils/setDir.d.ts +2 -0
  50. package/types/pc/app/App.d.ts +6 -0
  51. package/types/pc/app/context.d.ts +4 -0
  52. package/types/pc/app/index.d.ts +5 -0
  53. package/types/pc/app/interface.d.ts +17 -0
  54. package/types/pc/app/useApp.d.ts +3 -0
  55. package/types/pc/back-top/interface.d.ts +4 -17
  56. package/types/pc/calendar/Lunar.d.ts +17 -0
  57. package/types/pc/calendar/index.d.ts +1 -1
  58. package/types/pc/config-provider/interface.d.ts +1 -1
  59. package/types/pc/divider/interface.d.ts +1 -0
  60. package/types/pc/grid/Grid.d.ts +1 -2
  61. package/types/pc/grid/Item.d.ts +2 -5
  62. package/types/pc/grid/context.d.ts +4 -10
  63. package/types/pc/grid/hook/useResponsiveState.d.ts +2 -2
  64. package/types/pc/grid/interface.d.ts +9 -19
  65. package/types/pc/grid/util.d.ts +1 -10
  66. package/types/pc/index.d.ts +3 -1
  67. package/types/pc/input/Button.d.ts +2 -2
  68. package/types/pc/message/index.d.ts +1 -9
  69. package/types/pc/message/interface.d.ts +8 -0
  70. package/types/pc/message/useMessage.d.ts +1 -2
  71. package/types/pc/modal/Modal.d.ts +1 -0
  72. package/types/pc/modal/config.d.ts +1 -2
  73. package/types/pc/modal/index.d.ts +2 -1
  74. package/types/pc/modal/interface.d.ts +17 -5
  75. package/types/pc/notification/index.d.ts +2 -9
  76. package/types/pc/notification/interface.d.ts +7 -0
  77. package/types/pc/notification/useNotification.d.ts +1 -2
  78. package/types/pc/segmented/interface.d.ts +6 -0
  79. package/types/pc/select-view/Core.d.ts +1 -8
  80. package/types/pc/select-view/index.d.ts +1 -8
  81. package/types/pc/select-view/interface.d.ts +9 -2
  82. package/types/pc/utils/is.d.ts +1 -1
  83. package/types/pc/utils/names.d.ts +303 -0
  84. package/utils/index.js +58 -59
  85. package/utils/is.js +65 -66
  86. package/utils/names.js +298 -144
  87. package/version/index.js +1 -1
package/App.js ADDED
@@ -0,0 +1,7 @@
1
+ import "./app/App.js";
2
+ import { default as r } from "./app/useApp.js";
3
+ import { default as f } from "./app/index.js";
4
+ export {
5
+ f as default,
6
+ r as useApp
7
+ };
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 h } from "./back-top/index.js";
13
+ import { default as c } from "./back-top/index.js";
16
14
  export {
17
- h as default
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
@@ -1,4 +1,6 @@
1
- import { default as o } from "./modal/Modal.js";
1
+ import { default as a } from "./modal/Modal.js";
2
+ import { default as r } from "./modal/use-modal/index.js";
2
3
  export {
3
- o as default
4
+ a as default,
5
+ r as useModal
4
6
  };
package/Segmented.js CHANGED
@@ -3,9 +3,11 @@ import "react";
3
3
  import "./config-provider/ConfigProvider.js";
4
4
  import "./components/common/hooks/useMergeProps.js";
5
5
  import "@unicom-cloud/utils/class-name";
6
+ import "./components/common/utils/is.js";
6
7
  import "./components/common/utils/resizeObserver.js";
7
8
  import "./config-provider/context.js";
8
- import { default as d } from "./segmented/index.js";
9
+ import "@unicom-cloud/utils/is";
10
+ import { default as u } from "./segmented/index.js";
9
11
  export {
10
- d as default
12
+ u as default
11
13
  };
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
@@ -0,0 +1,9 @@
1
+ import { createContext as t } from "react";
2
+ const o = {
3
+ message: {},
4
+ notification: {},
5
+ modal: {}
6
+ }, n = t(o);
7
+ export {
8
+ n as default
9
+ };
package/app/index.js ADDED
@@ -0,0 +1,9 @@
1
+ import p from "./App.js";
2
+ import o from "./useApp.js";
3
+ const s = Object.assign(p, {
4
+ useApp: o
5
+ });
6
+ export {
7
+ s as default,
8
+ o as useApp
9
+ };
@@ -0,0 +1 @@
1
+
package/app/useApp.js ADDED
@@ -0,0 +1,8 @@
1
+ import { useContext as t } from "react";
2
+ import o from "./context.js";
3
+ function r() {
4
+ return t(o);
5
+ }
6
+ export {
7
+ r as default
8
+ };
package/back-top/index.js CHANGED
@@ -1,83 +1,71 @@
1
- import { jsx as r } from "react/jsx-runtime";
2
- import C from "@unicom-cloud/icons/IconUiToTop";
3
- import { Tween as v } from "../dist/tween/src/tween.js";
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 H from "../components/common/hooks/useKeyboardEvent.js";
8
- import P from "../components/common/hooks/useMergeProps.js";
9
- import { PqbCSSTransition as R } from "../components/common/utils/PqbCSSTransition.js";
10
- import S from "@unicom-cloud/utils/class-name";
11
- import { on as $, off as q } from "../components/common/utils/dom.js";
12
- import { pickDataAttributes as D } from "../components/common/utils/pick.js";
13
- import { throttleByRaf as I } from "../components/common/utils/throttleByRaf.js";
14
- import K from "../config-provider/context.js";
15
- function O(m, p) {
16
- const f = {
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
- tween: !0,
19
- easing: x.quartOut,
20
- duration: 400,
16
+ smooth: !0,
21
17
  target: () => window
22
- }, { getPrefixCls: u, componentConfig: d, rtl: g } = B(K), T = H(), o = P(
18
+ }, { getPrefixCls: f, componentConfig: u, rtl: d } = x(D), g = N(), o = w(
23
19
  m,
24
- f,
25
- d?.BackTop
26
- ), s = u?.("backtop"), [b, w] = E(!1), i = (e) => e === window ? document.documentElement : e;
27
- N(() => {
28
- const e = o.target?.(), t = I(() => {
29
- const n = o.visibleHeight, c = i(e).scrollTop;
30
- w(c >= n);
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 $(e, "scroll", t), t(), () => {
33
- t.cancel?.(), q(e, "scroll", t);
28
+ return P(t, "scroll", e), e(), () => {
29
+ e.cancel?.(), R(t, "scroll", e);
34
30
  };
35
31
  }, [o.target, o.visibleHeight]);
36
- const l = () => {
37
- const e = o.target?.(), t = i(e), n = t.scrollTop;
38
- window.getComputedStyle(t)?.scrollBehavior === "smooth" || o.tween === !1 ? t.scrollTo(0, 0) : new v({
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__ */ r(
36
+ return /* @__PURE__ */ s(
49
37
  "div",
50
38
  {
51
- ...D(o),
52
- ref: p,
53
- className: S(
54
- `${s}`,
55
- { [`${s}-rtl`]: g },
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: l,
60
- ...T({
61
- onPressEnter: l
47
+ onClick: c,
48
+ ...g({
49
+ onPressEnter: c
62
50
  }),
63
- children: /* @__PURE__ */ r(
64
- R,
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__ */ r("button", { className: `${s}-button`, children: /* @__PURE__ */ r(C, {}) })
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 a = y(
77
- O
64
+ const l = k(
65
+ I
78
66
  );
79
- a.displayName = "BackTop";
80
- const Z = k.memo(a);
67
+ l.displayName = "BackTop";
68
+ const L = C.memo(l);
81
69
  export {
82
- Z as default
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, { getAllDaysByTime as pe } from "./Month.js";
10
- import fe from "./Year.js";
11
- import he from "./header/index.js";
12
- import ue from "./header/Panel.js";
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(() => pe(s, t), [t.toString(), a, W]);
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(ue, { ...V }) : /* @__PURE__ */ r(
104
- he,
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
- ie,
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
- fe,
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
- ie as CalendarMonth,
172
- fe as CalendarYear,
171
+ fe as CalendarMonth,
172
+ ue as CalendarYear,
173
173
  De as default
174
174
  };
@@ -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 vo } from "./ControlBar.js";
11
+ import { ControlBar as kr } from "./ControlBar.js";
12
12
  import { useColorPicker as W } from "./hooks/useColorPicker.js";
13
- import { InputAlpha as Io } from "./InputAlpha.js";
14
- import { InputHex as Ao } from "./InputHex.js";
15
- import { InputRgb as $o } from "./InputRgb.js";
16
- import { Palette as wo } from "./Palette.js";
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 oo(t, m) {
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, r = d?.("color-picker"), {
49
- value: o,
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: B,
56
- alpha: H,
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: o,
70
+ value: r,
71
71
  mode: h,
72
72
  activeMode: $,
73
73
  gradientColors: z,
74
74
  activeColorId: w,
75
75
  activeColorIdRef: E,
76
- color: B,
77
- alpha: H,
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: o }) : t.triggerElement;
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 o == "string" ? o : Y(o);
109
+ const s = typeof r == "string" ? r : Y(r);
110
110
  return /* @__PURE__ */ p(
111
111
  "div",
112
112
  {
113
- className: Q(r, f, {
114
- [`${r}-size-${l}`]: l,
115
- [`${r}-disabled`]: i
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: `${r}-preview`,
124
- style: Array.isArray(o) ? {
125
- background: Z(o)
126
- } : { backgroundColor: o }
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: `${r}-value`, children: [
129
+ !!v && /* @__PURE__ */ p("div", { className: `${o}-value`, children: [
130
130
  s,
131
- !i && /* @__PURE__ */ e(J, { text: s, className: `${r}-copy` })
131
+ !i && /* @__PURE__ */ e(J, { text: s, className: `${o}-copy` })
132
132
  ] }),
133
133
  /* @__PURE__ */ e(
134
134
  "input",
135
135
  {
136
- className: `${r}-input`,
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 ro = D.forwardRef(
151
- oo
150
+ const or = D.forwardRef(
151
+ rr
152
152
  );
153
- ro.displayName = "ColorPicker";
153
+ or.displayName = "ColorPicker";
154
154
  export {
155
- vo as ColorPickerControlBar,
156
- Io as ColorPickerInputAlpha,
157
- Ao as ColorPickerInputHex,
158
- $o as ColorPickerInputRgb,
159
- wo as ColorPickerPalette,
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
- ro as default
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
- ...n && { alignItems: n },
36
- ...i && { justifyContent: i },
37
- ...e && { flexDirection: e },
38
- ...l && { flex: l }
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 s, jsxs as n } from "react/jsx-runtime";
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(e, c) {
6
- const { style: o, className: t, backgroundColor: a, color: r, text: i, ...m } = e, l = `${d}-icons-file`;
7
- return /* @__PURE__ */ s("div", { className: p(l, t), children: /* @__PURE__ */ n(
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: c,
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__ */ s(
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__ */ s(
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__ */ s(
36
+ /* @__PURE__ */ e(
37
37
  "text",
38
38
  {
39
39
  className: `${l}-svg-text`,
40
- x: "16.351px",
40
+ x: "50%",
41
41
  y: "142.967px",
42
+ textAnchor: "middle",
43
+ dominantBaseline: "middle",
42
44
  style: {
43
- fill: r
45
+ fill: i
44
46
  },
45
- children: i ?? "doc"
47
+ children: r ?? "doc"
46
48
  }
47
49
  )
48
50
  ]