@unicom-cloud/ui 0.8.101 → 0.8.103

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 (141) hide show
  1. package/Badge.js +7 -54
  2. package/Copy.js +6 -5
  3. package/LiquidFill.js +6 -5
  4. package/List.js +1 -1
  5. package/Marquee.js +6 -5
  6. package/QrCode.js +6 -5
  7. package/Tooltip.js +3 -4
  8. package/Tour.js +6 -5
  9. package/anchor/Anchor.js +12 -12
  10. package/anchor/util.js +10 -10
  11. package/back-top/index.js +7 -7
  12. package/badge/index.js +109 -162
  13. package/card/index.js +63 -43
  14. package/color-picker/InputHex.js +3 -4
  15. package/color-picker/InputRgb.js +7 -8
  16. package/color-picker/Palette.js +3 -4
  17. package/color-picker/Panel.js +3 -4
  18. package/color-picker/colors.js +5 -5
  19. package/color-picker/hooks/useColorPicker.js +3 -4
  20. package/color-picker/utils.js +14 -15
  21. package/components/common/space/index.js +24 -24
  22. package/components/common/utils/PqbCSSTransition.js +1 -1
  23. package/components/common/utils/constant.js +6 -3
  24. package/components/common/utils/reactDOM.js +6 -4
  25. package/components/common/utils/{scrollIntoView.js → scrollIntoViewIfNeeded.js} +1 -1
  26. package/components/common/utils/setPrimaryColor.js +18 -18
  27. package/components/common/utils/setTheme.js +8 -9
  28. package/copy/index.js +4 -3
  29. package/dist/scroll-into-view-if-needed/compute/index.js +126 -0
  30. package/dist/scroll-into-view-if-needed/smooth/index.js +70 -0
  31. package/dist/scroll-into-view-if-needed/src/index.js +19 -19
  32. package/form/FormItem.js +69 -65
  33. package/form/context.js +6 -7
  34. package/grid/Col-.js +86 -0
  35. package/grid/Col.js +156 -73
  36. package/grid/Grid.js +71 -67
  37. package/grid/Row.js +53 -44
  38. package/grid/index.js +13 -13
  39. package/index.js +639 -662
  40. package/input/Textarea.js +1 -1
  41. package/input/autoSizeTextAreaHeight.js +7 -7
  42. package/liquid-fill/index.js +6 -5
  43. package/liquid-fill/interface.js +1 -0
  44. package/list/index.js +1 -1
  45. package/marquee/index.js +141 -223
  46. package/marquee/interface.js +1 -0
  47. package/marquee-/index.js +260 -0
  48. package/marquee-/interface.js +1 -0
  49. package/menu/Item.js +9 -9
  50. package/package.json +1 -1
  51. package/qr-code/index.js +6 -5
  52. package/splitter/SplitBar.js +81 -79
  53. package/splitter/Splitter.js +70 -78
  54. package/splitter/hooks/useResizable.js +9 -18
  55. package/splitter/hooks/useResize.js +10 -10
  56. package/splitter/hooks/useSizes.js +28 -28
  57. package/statistic/index.js +10 -10
  58. package/style.css +1 -1
  59. package/table/Table.js +369 -370
  60. package/table/hook/useThResizable.js +6 -5
  61. package/table/th-resizable/index.js +13 -12
  62. package/time-picker/util.js +8 -8
  63. package/tooltip/index.js +1 -2
  64. package/tour/index.js +6 -5
  65. package/tour/interface.js +1 -0
  66. package/tree/NodeList.js +1 -1
  67. package/types/common/utils/constant.d.ts +1 -0
  68. package/types/common/utils/scrollIntoViewIfNeeded.d.ts +4 -0
  69. package/types/common/utils/tree.d.ts +1 -0
  70. package/types/common/utils/tween.d.ts +1 -0
  71. package/types/pc/anchor/util.d.ts +1 -1
  72. package/types/pc/badge/interface.d.ts +2 -0
  73. package/types/pc/card/interface.d.ts +8 -0
  74. package/types/pc/color-picker/hooks/useColorPicker.d.ts +7 -2
  75. package/types/pc/color-picker/utils.d.ts +6 -1
  76. package/types/pc/config-provider/interface.d.ts +8 -8
  77. package/types/pc/form/FormItem.d.ts +1 -1
  78. package/types/pc/grid/Col-.d.ts +4 -0
  79. package/types/pc/grid/Col.d.ts +3 -2
  80. package/types/pc/grid/Grid.d.ts +2 -2
  81. package/types/pc/grid/Item.d.ts +3 -3
  82. package/types/pc/grid/Row.d.ts +3 -2
  83. package/types/pc/grid/hook/useResponsiveState.d.ts +2 -2
  84. package/types/pc/grid/interface.d.ts +13 -7
  85. package/types/pc/index.d.ts +4 -4
  86. package/types/pc/liquid-fill/index.d.ts +2 -113
  87. package/types/pc/liquid-fill/interface.d.ts +113 -0
  88. package/types/pc/marquee/index.d.ts +3 -60
  89. package/types/pc/marquee/interface.d.ts +95 -0
  90. package/types/pc/marquee-/index.d.ts +8 -0
  91. package/types/pc/marquee-/interface.d.ts +56 -0
  92. package/types/pc/qr-code/index.d.ts +1 -31
  93. package/types/pc/qr-code/interface.d.ts +26 -33
  94. package/types/pc/splitter/SplitBar.d.ts +0 -1
  95. package/types/pc/splitter/hooks/useResizable.d.ts +0 -1
  96. package/types/pc/splitter/hooks/useResize.d.ts +1 -2
  97. package/types/pc/splitter/interface.d.ts +0 -8
  98. package/types/pc/tour/index.d.ts +2 -45
  99. package/types/pc/tour/interface.d.ts +46 -0
  100. package/types/pc/upload/interface.d.ts +1 -0
  101. package/types/pc/utils/constant.d.ts +1 -2
  102. package/types/pc/utils/dayjs.d.ts +2 -1
  103. package/types/pc/utils/index.d.ts +2 -5
  104. package/types/pc/utils/responsiveObserve.d.ts +8 -4
  105. package/types/pc/utils/scrollIntoViewIfNeeded.d.ts +3 -0
  106. package/types/pc/utils/tree.d.ts +2 -1
  107. package/types/pc/utils/tween.d.ts +1 -1
  108. package/typography/Ellipsis.js +6 -5
  109. package/typography/Operations.js +6 -5
  110. package/upload/request.js +12 -13
  111. package/upload/request_.js +2 -3
  112. package/utils/constant.js +5 -5
  113. package/utils/dayjs.js +13 -12
  114. package/utils/index.js +261 -284
  115. package/utils/responsiveObserve.js +32 -25
  116. package/utils/scrollIntoViewIfNeeded.js +12 -0
  117. package/utils/tree.js +11 -9
  118. package/utils/tween.js +5 -5
  119. package/version/index.js +1 -1
  120. package/components/common/utils/convertToDurationBasedOnTimeUnits.js +0 -6
  121. package/dist/compute-scroll-into-view/src/index.js +0 -126
  122. package/dist/tinycolor/chunk/BOzCVdr0.js +0 -182
  123. package/dist/tinycolor/customize/index.js +0 -12
  124. package/dist/tinycolor/src/conversion.js +0 -143
  125. package/dist/tinycolor/src/css-color-names.js +0 -153
  126. package/dist/tinycolor/src/format-input.js +0 -77
  127. package/dist/tinycolor/src/index.js +0 -388
  128. package/dist/tinycolor/src/util.js +0 -32
  129. package/types/common/utils/convertToDurationBasedOnTimeUnits.d.ts +0 -3
  130. package/types/common/utils/scrollIntoView.d.ts +0 -4
  131. package/types/common/utils/tinycolor.d.ts +0 -1
  132. package/types/pc/utils/color.d.ts +0 -1
  133. package/types/pc/utils/computeScrollIntoView.d.ts +0 -1
  134. package/types/pc/utils/convertToDurationBasedOnTimeUnits.d.ts +0 -3
  135. package/types/pc/utils/scrollIntoView.d.ts +0 -3
  136. package/types/pc/utils/tinycolor.d.ts +0 -1
  137. package/utils/color.js +0 -4
  138. package/utils/computeScrollIntoView.js +0 -6
  139. package/utils/convertToDurationBasedOnTimeUnits.js +0 -6
  140. package/utils/scrollIntoView.js +0 -6
  141. package/utils/tinycolor.js +0 -29
package/badge/index.js CHANGED
@@ -1,58 +1,11 @@
1
- import { jsxs as c, jsx as e } from "react/jsx-runtime";
2
- import q from "lodash/isPlainObject";
3
- import { forwardRef as z, useContext as H, useRef as O, useImperativeHandle as L } from "react";
1
+ import { jsxs as d, jsx as o } from "react/jsx-runtime";
2
+ import _ from "lodash/isPlainObject";
3
+ import { forwardRef as q, useContext as z, useRef as H, useImperativeHandle as L } from "react";
4
4
  import "../config-provider/ConfigProvider.js";
5
- import M from "../components/common/hooks/useMergeProps.js";
6
- import "@unicom-cloud/utils/case-name";
7
- import n from "@unicom-cloud/utils/class-name";
8
- import "../dist/tinycolor/chunk/BOzCVdr0.js";
9
- import "@unicom-cloud/utils/constant/ui";
10
- import "../utils/contextHolder.js";
11
- import "@unicom-cloud/utils/dayjs";
12
- import "@unicom-cloud/utils/clipboard-copy";
13
- import "../components/common/utils/dayjs.js";
14
- import "../components/common/utils/dom.js";
15
- import "@unicom-cloud/utils/file/fileToURL";
16
- import "lodash/escapeRegExp";
17
- import "lodash/isArray";
18
- import "lodash/isNumber";
19
- import "lodash/isString";
20
- import "lodash/isFunction";
21
- import "lodash/throttle";
22
- import "../components/common/utils/is.js";
23
- import "lodash/camelCase";
24
- import "lodash/capitalize";
25
- import "lodash/cloneDeep";
26
- import "lodash/debounce";
27
- import "lodash/get";
28
- import "lodash/has";
29
- import "lodash/kebabCase";
30
- import "lodash/merge";
31
- import "lodash/mergeWith";
32
- import "lodash/set";
33
- import "lodash/setWith";
34
- import "lodash/snakeCase";
35
- import "lodash/startCase";
36
- import "lodash/uniq";
37
- import "lodash/upperFirst";
38
- import "@unicom-cloud/utils/math";
39
- import { PqbCSSTransition as U } from "../components/common/utils/PqbCSSTransition.js";
40
- import "../components/common/utils/reactDOM.js";
41
- import "../dist/react-transition-group/src/CSSTransition.js";
42
- import "../dist/react-transition-group/src/ReplaceTransition.js";
43
- import "../dist/react-transition-group/src/SwitchTransition.js";
44
- import "../dist/react-transition-group/chunk/CPfP7aNL.js";
45
- import "../dist/react-transition-group/src/TransitionGroup.js";
46
- import "@unicom-cloud/utils/file/saveAs";
47
- import "@unicom-cloud/utils/screenfull";
48
- import "@unicom-cloud/utils/constant/ui.js";
49
- import "react-is";
50
- import "@unicom-cloud/utils/tree";
51
- import "@unicom-cloud/utils/is";
52
- import { v4 as F } from "uuid";
53
- import "../dist/validate/src/index.js";
54
- import "@unicom-cloud/utils/constant/keyboardCode";
55
- import B from "./Count.js";
5
+ import U from "../components/common/hooks/useMergeProps.js";
6
+ import { PqbCSSTransition as F } from "../components/common/utils/PqbCSSTransition.js";
7
+ import l from "@unicom-cloud/utils/class-name";
8
+ import h from "./Count.js";
56
9
  import J from "../config-provider/context.js";
57
10
  const f = [
58
11
  "red",
@@ -72,164 +25,158 @@ const f = [
72
25
  dotAnimation: !0
73
26
  // 默认开启 dot 动画
74
27
  };
75
- function Q(P, v) {
76
- const { getPrefixCls: A, componentConfig: R, rtl: $ } = H(J), T = M(
77
- P,
28
+ function Q(O, B) {
29
+ const { getPrefixCls: D, componentConfig: P, rtl: $ } = z(J), R = U(
30
+ O,
78
31
  K,
79
- R?.Badge
32
+ P?.Badge
80
33
  ), {
81
- ribbon: o,
82
- count: s,
83
- prefixText: g,
84
- text: l,
85
- className: w,
86
- dotClassName: m,
87
- dot: b,
88
- dotAnimation: x,
89
- maxCount: E,
90
- color: r,
91
- dotStyle: j,
92
- offset: I,
93
- style: N,
94
- status: p,
95
- children: u,
96
- ...y
97
- } = T, d = O(null), C = O(F()), t = A?.("badge"), i = { ...j || {} }, [h, S] = I || [];
98
- h && (i.marginRight = -h), S && (i.marginTop = S), L(v, () => ({
99
- dom: d.current
34
+ ribbon: s,
35
+ count: n,
36
+ prefixText: b,
37
+ text: u,
38
+ className: A,
39
+ dotClassName: i,
40
+ dot: g,
41
+ dotAnimation: C,
42
+ maxCount: T,
43
+ color: t,
44
+ dotStyle: w,
45
+ offset: E,
46
+ style: j,
47
+ status: m,
48
+ children: N,
49
+ ...v
50
+ } = R, p = H(null), e = D?.("badge"), a = { ...w || {} }, [x, y] = E || [];
51
+ x && (a.marginRight = -x), y && (a.marginTop = y), L(B, () => ({
52
+ dom: p.current,
53
+ getRootDOMNode() {
54
+ return p.current;
55
+ }
100
56
  }));
101
57
  const k = () => {
102
- if (q(s))
103
- return /* @__PURE__ */ e(
58
+ if (_(n))
59
+ return /* @__PURE__ */ o(
104
60
  "span",
105
61
  {
106
- className: n(`${t}-custom-dot`, m),
107
- style: i,
108
- children: s
62
+ className: l(`${e}-custom-dot`, i),
63
+ style: a,
64
+ children: n
109
65
  }
110
66
  );
111
- const a = !r || f.indexOf(r) > -1 ? {} : { backgroundColor: r };
112
- return l && !r && !p ? /* @__PURE__ */ e(
67
+ const r = t ? f.includes(t) : !1, c = !t || r ? {} : { backgroundColor: t };
68
+ return u && !t && !m ? /* @__PURE__ */ o(
113
69
  "span",
114
70
  {
115
- className: n(`${t}-text`, m),
116
- style: i,
117
- children: l
71
+ className: l(`${e}-text`, i),
72
+ style: a,
73
+ children: u
118
74
  }
119
- ) : p || r && typeof s == "number" && s <= 0 ? /* @__PURE__ */ c("span", { className: `${t}-status-wrapper`, children: [
120
- !!g && /* @__PURE__ */ e("span", { className: `${t}-status-prefix-text`, children: g }),
121
- /* @__PURE__ */ e(
75
+ ) : m || t && typeof n == "number" && n <= 0 ? /* @__PURE__ */ d("span", { className: `${e}-status-wrapper`, children: [
76
+ !!b && /* @__PURE__ */ o("span", { className: `${e}-status-prefix-text`, children: b }),
77
+ /* @__PURE__ */ o(
122
78
  "span",
123
79
  {
124
- className: n(
125
- `${t}-status-dot`,
80
+ style: { ...c, ...a },
81
+ className: l(
82
+ `${e}-status-dot`,
126
83
  {
127
- [`${t}-dot-pulse`]: x,
128
- [`${t}-status-${p}`]: p,
129
- [`${t}-color-${r}`]: r
84
+ [`${e}-dot-pulse`]: C,
85
+ [`${e}-status-${m}`]: m,
86
+ [`${e}-color-${t}`]: t && r
130
87
  },
131
- m
132
- ),
133
- style: { ...a, ...i }
88
+ i
89
+ )
134
90
  }
135
91
  ),
136
- !!l && /* @__PURE__ */ e("span", { className: `${t}-status-text`, children: l })
137
- ] }) : (b || r) && typeof s == "number" && s > 0 ? /* @__PURE__ */ e(
138
- U,
92
+ !!u && /* @__PURE__ */ o("span", { className: `${e}-status-text`, children: u })
93
+ ] }) : (g || t) && typeof n == "number" && n > 0 ? /* @__PURE__ */ o(
94
+ F,
139
95
  {
140
96
  classNames: "badge-zoom",
141
- in: b || !!r,
97
+ in: g || !!t,
142
98
  timeout: 200,
143
99
  appear: !0,
144
100
  mountOnEnter: !0,
145
101
  unmountOnExit: !0,
146
- children: /* @__PURE__ */ e(
102
+ children: /* @__PURE__ */ o(
147
103
  "span",
148
104
  {
149
- className: n(
150
- `${t}-dot`,
105
+ className: l(
106
+ `${e}-dot`,
151
107
  {
152
- [`${t}-dot-pulse`]: x,
153
- [`${t}-color-${r}`]: r
108
+ [`${e}-dot-pulse`]: C,
109
+ [`${e}-color-${t}`]: t && r
154
110
  },
155
- m
111
+ i
156
112
  ),
157
- style: { ...a, ...i }
113
+ style: { ...c, ...a }
158
114
  }
159
115
  )
160
116
  }
161
- ) : /* @__PURE__ */ e(
162
- B,
117
+ ) : /* @__PURE__ */ o(
118
+ h,
163
119
  {
164
- prefixCls: t,
165
- className: n(`${t}-number`, m),
166
- style: { ...a, ...i },
167
- maxCount: E,
168
- count: s
120
+ prefixCls: e,
121
+ className: l(`${e}-number`, i),
122
+ style: { ...c, ...a },
123
+ maxCount: T,
124
+ count: n
169
125
  }
170
126
  );
171
127
  }, G = () => {
172
- if (!o || !o.text) return null;
173
- const a = o.color ? { backgroundColor: o.color } : {}, _ = o.placement || "end";
174
- return /* @__PURE__ */ c(
128
+ if (!s) return;
129
+ const r = s.color, c = r ? f.includes(r) : !1, I = {
130
+ ...c ? {} : { backgroundColor: r },
131
+ ...s.style
132
+ }, M = s.placement || "end";
133
+ return /* @__PURE__ */ d(
175
134
  "div",
176
135
  {
177
- className: n(
178
- `${t}-ribbon`,
179
- `${t}-ribbon-${_}`,
136
+ className: l(
137
+ `${e}-ribbon`,
138
+ `${e}-ribbon-${M}`,
180
139
  {
181
- [`${t}-rtl`]: $,
182
- [`${t}-color-${o.color}`]: o.color && f.includes(o.color)
183
- }
140
+ [`${e}-rtl`]: $,
141
+ [`${e}-color-${r}`]: r && c
142
+ },
143
+ s.className
184
144
  ),
185
- style: a,
145
+ style: I,
186
146
  children: [
187
- /* @__PURE__ */ e("span", { className: `${t}-ribbon-text`, children: o.text }),
188
- /* @__PURE__ */ e("div", { className: `${t}-ribbon-corner` })
147
+ /* @__PURE__ */ o("span", { className: `${e}-ribbon-text`, children: s.text }),
148
+ /* @__PURE__ */ o("div", { className: `${e}-ribbon-corner` })
189
149
  ]
190
150
  }
191
151
  );
192
152
  };
193
- return o ? /* @__PURE__ */ c(
194
- "div",
195
- {
196
- className: `${t}-ribbon-wrapper`,
197
- ref: d,
198
- style: N,
199
- id: C.current,
200
- ...y,
201
- children: [
202
- u,
203
- G()
204
- ]
205
- }
206
- ) : /* @__PURE__ */ c(
153
+ return /* @__PURE__ */ d(
207
154
  "span",
208
155
  {
209
- className: n(
210
- t,
156
+ className: l(
157
+ e,
211
158
  {
212
- [`${t}-status`]: p,
213
- [`${t}-no-children`]: !u,
214
- [`${t}-rtl`]: $
159
+ [`${e}-status`]: m,
160
+ [`${e}-no-children`]: !N,
161
+ [`${e}-rtl`]: $
215
162
  },
216
- w
163
+ !!s && `${e}-ribbon-wrapper`,
164
+ A
217
165
  ),
218
- ref: d,
219
- style: N,
220
- id: C.current,
221
- ...y,
166
+ ref: p,
167
+ style: j,
168
+ ...v,
222
169
  children: [
223
- u,
224
- k()
170
+ N,
171
+ s ? G() : k()
225
172
  ]
226
173
  }
227
174
  );
228
175
  }
229
- const D = z(Q);
230
- D.displayName = "Badge";
231
- D.Count = B;
232
- const Xt = f, Yt = [
176
+ const S = q(Q);
177
+ S.displayName = "Badge";
178
+ S.Count = h;
179
+ const se = f, ne = [
233
180
  "default",
234
181
  "processing",
235
182
  "success",
@@ -237,8 +184,8 @@ const Xt = f, Yt = [
237
184
  "error"
238
185
  ];
239
186
  export {
240
- Xt as BADGE_COLORS,
241
- Yt as BADGE_STATUS,
242
- B as BadgeCount,
243
- D as default
187
+ se as BADGE_COLORS,
188
+ ne as BADGE_STATUS,
189
+ h as BadgeCount,
190
+ S as default
244
191
  };
package/card/index.js CHANGED
@@ -1,102 +1,122 @@
1
- import { jsx as a, jsxs as s } from "react/jsx-runtime";
2
- import n, { useContext as L } from "react";
1
+ import { jsx as a, jsxs as i } from "react/jsx-runtime";
2
+ import d, { useContext as q } from "react";
3
3
  import "../config-provider/ConfigProvider.js";
4
- import k from "../components/common/hooks/useMergeProps.js";
5
- import q from "../spin/index.js";
6
- import h from "@unicom-cloud/utils/class-name";
7
- import C from "./Grid.js";
4
+ import A from "../components/common/hooks/useMergeProps.js";
5
+ import B from "../spin/index.js";
6
+ import n from "@unicom-cloud/utils/class-name";
7
+ import h from "./Grid.js";
8
8
  import $ from "./Meta.js";
9
- import A from "../config-provider/context.js";
10
- const B = {
9
+ import D from "../config-provider/context.js";
10
+ const H = {
11
11
  size: "default",
12
12
  bordered: !0
13
13
  };
14
- function D(u, N) {
15
- const { getPrefixCls: v, loadingElement: g, componentConfig: y, rtl: x } = L(A), b = k(
14
+ function I(u, N) {
15
+ const { getPrefixCls: v, loadingElement: y, componentConfig: g, rtl: x } = q(D), b = A(
16
16
  u,
17
- B,
18
- y?.Card
17
+ H,
18
+ g?.Card
19
19
  ), {
20
20
  className: M,
21
21
  children: z,
22
22
  bordered: G,
23
- loading: l,
23
+ loading: c,
24
24
  hoverable: P,
25
25
  size: R,
26
26
  title: t,
27
27
  extra: o,
28
- cover: c,
29
- actions: i,
28
+ cover: m,
29
+ actions: s,
30
30
  headerStyle: S,
31
31
  bodyStyle: j,
32
- ...w
33
- } = b, e = v?.("card"), m = i && i.length ? /* @__PURE__ */ a("div", { className: `${e}-actions`, children: /* @__PURE__ */ a("div", { className: `${e}-actions-right`, children: i.map((r, F) => /* @__PURE__ */ a(
32
+ headerClassName: w,
33
+ // 潘启宝添加
34
+ bodyClassName: E,
35
+ // 潘启宝添加
36
+ ...F
37
+ } = b, e = v?.("card"), p = s && s.length ? /* @__PURE__ */ a("div", { className: `${e}-actions`, children: /* @__PURE__ */ a("div", { className: `${e}-actions-right`, children: s.map((r, k) => /* @__PURE__ */ a(
34
38
  "span",
35
39
  {
36
40
  className: `${e}-actions-item`,
37
41
  children: r
38
42
  },
39
- `action-${F}`
43
+ `action-${k}`
40
44
  )) }) }) : null;
41
- let p = !1, f = !1;
42
- const E = n.Children.map(
45
+ let f = !1, C = !1;
46
+ const L = d.Children.map(
43
47
  z,
44
48
  (r) => {
45
49
  if (r && r.type) {
46
- if (r.type === C)
47
- p = !0;
50
+ if (r.type === h)
51
+ f = !0;
48
52
  else if (r.type === $)
49
- return f = !0, n.cloneElement(r, { actionList: m });
53
+ return C = !0, d.cloneElement(r, { actionList: p });
50
54
  }
51
55
  return r;
52
56
  }
53
57
  );
54
- return /* @__PURE__ */ s(
58
+ return /* @__PURE__ */ i(
55
59
  "div",
56
60
  {
57
- ...w,
61
+ ...F,
58
62
  ref: N,
59
- className: h(
63
+ className: n(
60
64
  e,
61
65
  `${e}-size-${R}`,
62
66
  {
63
- [`${e}-loading`]: l,
67
+ [`${e}-loading`]: c,
64
68
  [`${e}-bordered`]: G,
65
69
  [`${e}-hoverable`]: P,
66
- [`${e}-contain-grid`]: p,
70
+ [`${e}-contain-grid`]: f,
67
71
  [`${e}-rtl`]: x
68
72
  },
69
73
  M
70
74
  ),
71
75
  children: [
72
- t || o ? /* @__PURE__ */ s(
76
+ t || o ? /* @__PURE__ */ i(
73
77
  "div",
74
78
  {
75
- className: h(`${e}-header`, {
76
- [`${e}-header-no-title`]: !t
77
- }),
78
79
  style: S,
80
+ className: n(
81
+ `${e}-header`,
82
+ {
83
+ [`${e}-header-no-title`]: !t
84
+ },
85
+ w
86
+ // 潘启宝添加
87
+ ),
79
88
  children: [
80
89
  t && /* @__PURE__ */ a("div", { className: `${e}-header-title`, children: t }),
81
90
  o && /* @__PURE__ */ a("div", { className: `${e}-header-extra`, children: o })
82
91
  ]
83
92
  }
84
93
  ) : null,
85
- c ? /* @__PURE__ */ a("div", { className: `${e}-cover`, children: c }) : null,
86
- /* @__PURE__ */ s("div", { className: `${e}-body`, style: j, children: [
87
- l ? g || /* @__PURE__ */ a(q, {}) : E,
88
- f ? null : m
89
- ] })
94
+ m ? /* @__PURE__ */ a("div", { className: `${e}-cover`, children: m }) : null,
95
+ /* @__PURE__ */ i(
96
+ "div",
97
+ {
98
+ style: j,
99
+ className: n(
100
+ `${e}-body`,
101
+ E
102
+ // 潘启宝添加
103
+ ),
104
+ children: [
105
+ c ? y || /* @__PURE__ */ a(B, {}) : L,
106
+ C ? null : p
107
+ ]
108
+ }
109
+ )
90
110
  ]
91
111
  }
92
112
  );
93
113
  }
94
- const H = n.forwardRef(D), d = H;
95
- d.Meta = $;
96
- d.Grid = C;
97
- d.displayName = "Card";
114
+ const J = d.forwardRef(I), l = J;
115
+ l.Meta = $;
116
+ l.Grid = h;
117
+ l.displayName = "Card";
98
118
  export {
99
- C as CardGrid,
119
+ h as CardGrid,
100
120
  $ as CardMeta,
101
- d as default
121
+ l as default
102
122
  };
@@ -1,12 +1,11 @@
1
1
  import { jsxs as C, jsx as p } from "react/jsx-runtime";
2
- import "../dist/tinycolor/chunk/BOzCVdr0.js";
3
- import { TinyColor as m } from "../dist/tinycolor/src/index.js";
2
+ import m from "@unicom-cloud/utils/tinycolor";
4
3
  import { useContext as v, useState as I, useEffect as j } from "react";
5
4
  import "../config-provider/ConfigProvider.js";
6
5
  import c from "../input/Input.js";
7
6
  import { InputAlpha as D } from "./InputAlpha.js";
8
7
  import H from "../config-provider/context.js";
9
- const T = ({
8
+ const N = ({
10
9
  color: o,
11
10
  alpha: f,
12
11
  onHsvChange: u,
@@ -52,5 +51,5 @@ const T = ({
52
51
  ] });
53
52
  };
54
53
  export {
55
- T as InputHex
54
+ N as InputHex
56
55
  };
@@ -1,20 +1,19 @@
1
1
  import { jsxs as h, jsx as n } from "react/jsx-runtime";
2
- import "../dist/tinycolor/chunk/BOzCVdr0.js";
3
- import { TinyColor as f } from "../dist/tinycolor/src/index.js";
2
+ import f from "@unicom-cloud/utils/tinycolor";
4
3
  import { useContext as x } from "react";
5
4
  import "../config-provider/ConfigProvider.js";
6
5
  import b from "../input/Input.js";
7
6
  import m from "../input-number/index.js";
8
7
  import { InputAlpha as I } from "./InputAlpha.js";
9
8
  import d from "../config-provider/context.js";
10
- const P = ({
9
+ const H = ({
11
10
  color: p,
12
11
  alpha: s,
13
12
  onHsvChange: u,
14
- onAlphaChange: a,
15
- disabledAlpha: c
13
+ onAlphaChange: c,
14
+ disabledAlpha: C
16
15
  }) => {
17
- const { getPrefixCls: C } = x(d), g = C?.("color-picker"), r = (o) => {
16
+ const { getPrefixCls: a } = x(d), g = a?.("color-picker"), r = (o) => {
18
17
  const l = new f({
19
18
  r: o.r,
20
19
  g: o.g,
@@ -56,9 +55,9 @@ const P = ({
56
55
  onChange: (o) => r({ r: t, g: e, b: o })
57
56
  }
58
57
  ),
59
- !c && /* @__PURE__ */ n(I, { value: s, onChange: a })
58
+ !C && /* @__PURE__ */ n(I, { value: s, onChange: c })
60
59
  ] });
61
60
  };
62
61
  export {
63
- P as InputRgb
62
+ H as InputRgb
64
63
  };
@@ -1,11 +1,10 @@
1
1
  import { jsx as s } from "react/jsx-runtime";
2
- import "../dist/tinycolor/chunk/BOzCVdr0.js";
3
- import { TinyColor as u } from "../dist/tinycolor/src/index.js";
2
+ import u from "@unicom-cloud/utils/tinycolor";
4
3
  import { useContext as d, useMemo as h } from "react";
5
4
  import "../config-provider/ConfigProvider.js";
6
5
  import { useControlBlock as g } from "./hooks/useControlBlock.js";
7
6
  import x from "../config-provider/context.js";
8
- const M = ({ color: l, onChange: c }) => {
7
+ const w = ({ color: l, onChange: c }) => {
9
8
  const { getPrefixCls: i } = d(x), e = i?.("color-picker"), { h: r, s: t, v: n } = l.hsv, { blockRef: m, handlerRef: f, onMouseDown: a } = g({
10
9
  value: [t, 1 - n],
11
10
  onChange: (o) => c(o[0], 1 - o[1])
@@ -32,5 +31,5 @@ const M = ({ color: l, onChange: c }) => {
32
31
  );
33
32
  };
34
33
  export {
35
- M as Palette
34
+ w as Palette
36
35
  };
@@ -1,6 +1,5 @@
1
1
  import { jsxs as l, jsx as e } from "react/jsx-runtime";
2
- import "../dist/tinycolor/chunk/BOzCVdr0.js";
3
- import { TinyColor as d } from "../dist/tinycolor/src/index.js";
2
+ import d from "@unicom-cloud/utils/tinycolor";
4
3
  import { useContext as cr, useState as ar, useMemo as sr } from "react";
5
4
  import "../config-provider/ConfigProvider.js";
6
5
  import k from "../radio/Radio.js";
@@ -16,7 +15,7 @@ import { isMultiMode as X, isGradientMode as _ } from "./Mode.js";
16
15
  import { Palette as gr } from "./Palette.js";
17
16
  import { renderBackground as br, sortGradientColors as D, getColorByGradients as fr } from "./utils.js";
18
17
  import vr from "../config-provider/context.js";
19
- const hr = k.Group, Er = ({
18
+ const hr = k.Group, qr = ({
20
19
  value: F,
21
20
  mode: y,
22
21
  activeMode: h,
@@ -264,5 +263,5 @@ const hr = k.Group, Er = ({
264
263
  ] });
265
264
  };
266
265
  export {
267
- Er as Panel
266
+ qr as Panel
268
267
  };
@@ -1,9 +1,9 @@
1
- import { a as e } from "../dist/tinycolor/chunk/BOzCVdr0.js";
2
- import { TinyColor as l } from "../dist/tinycolor/src/index.js";
3
- new l("#eee");
1
+ import t from "@unicom-cloud/utils/tinycolor";
2
+ import * as e from "@unicom-cloud/utils/ui-color";
3
+ new t("#eee");
4
4
  const i = [
5
- e.colors.map((o, r, a) => e.palette({ color: o.value, level: 4 }).toHexString()),
6
- e.colors.map((o, r, a) => o.value)
5
+ e.colors.map((o, r, l) => e.palette({ color: o.value, level: 4 }).toHexString()),
6
+ e.colors.map((o, r, l) => o.value)
7
7
  // '#00B42A',
8
8
  // '#3C7EFF',
9
9
  // '#FF7D00',
@@ -1,12 +1,11 @@
1
- import "../../dist/tinycolor/chunk/BOzCVdr0.js";
2
- import { TinyColor as P } from "../../dist/tinycolor/src/index.js";
1
+ import P from "@unicom-cloud/utils/tinycolor";
3
2
  import { useState as C, useRef as k, useMemo as G, useCallback as F, useEffect as M } from "react";
4
3
  import Z from "../../components/common/hooks/useIsFirstRender.js";
5
4
  import q from "../../components/common/hooks/useMergeValue.js";
6
5
  import { ColorPickerMode as y } from "../interface.js";
7
6
  import { getModeByValue as $, isGradientMode as H, isSingleMode as w } from "../Mode.js";
8
7
  import { mapValueToGradientColor as ee, getColorFromHsv as E, formatRgba as oe, formatHex as te, isEqualsColors as re, equalsHsv as ne, getRandomId as T } from "../utils.js";
9
- const Ce = (s) => {
8
+ const ge = (s) => {
10
9
  const {
11
10
  mode: B = y.Single,
12
11
  defaultValue: j,
@@ -121,5 +120,5 @@ const Ce = (s) => {
121
120
  };
122
121
  };
123
122
  export {
124
- Ce as useColorPicker
123
+ ge as useColorPicker
125
124
  };