@unicom-cloud/ui 0.8.74 → 0.8.75

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 (258) hide show
  1. package/Affix.js +1 -1
  2. package/Alert.js +1 -1
  3. package/AutoComplete.js +1 -1
  4. package/BackTop.js +1 -1
  5. package/Badge.js +1 -1
  6. package/Breadcrumb.js +2 -2
  7. package/Button.js +1 -1
  8. package/Calendar.js +1 -1
  9. package/Card.js +1 -1
  10. package/Carousel.js +1 -1
  11. package/Cascader.js +1 -1
  12. package/Checkbox.js +1 -1
  13. package/Collapse.js +1 -1
  14. package/ColorPicker.js +1 -1
  15. package/Comment.js +1 -1
  16. package/ConfigProvider.js +1 -1
  17. package/Copy.js +1 -1
  18. package/DatePicker.js +1 -1
  19. package/Descriptions.js +1 -1
  20. package/Divider.js +1 -1
  21. package/Draggable.js +1 -1
  22. package/Dropdown.js +1 -1
  23. package/Empty.js +1 -1
  24. package/Icon.js +1 -1
  25. package/IconHover.js +1 -1
  26. package/Image.js +1 -1
  27. package/InputNumber.js +1 -1
  28. package/Layout.js +1 -1
  29. package/Link.js +1 -1
  30. package/List.js +1 -1
  31. package/Mentions.js +1 -1
  32. package/Menu.js +1 -1
  33. package/Message.js +1 -1
  34. package/Modal.js +1 -1
  35. package/Notice.js +1 -1
  36. package/Notification.js +1 -1
  37. package/OverflowEllipsis.js +1 -1
  38. package/PageHeader.js +1 -1
  39. package/Popconfirm.js +1 -1
  40. package/Popover.js +1 -1
  41. package/Progress.js +1 -1
  42. package/Radio.js +1 -1
  43. package/Rate.js +1 -1
  44. package/ResizeBox.js +1 -1
  45. package/Result.js +1 -1
  46. package/Skeleton.js +1 -1
  47. package/Slider.js +1 -1
  48. package/Space.js +1 -1
  49. package/SpeechSynthesis.js +1 -1
  50. package/Spin.js +1 -1
  51. package/Statistic.js +1 -1
  52. package/Steps.js +1 -1
  53. package/Switch.js +1 -1
  54. package/Table.js +1 -1
  55. package/Tabs.js +1 -1
  56. package/Tag.js +1 -1
  57. package/Tooltip.js +2 -2
  58. package/Transfer.js +1 -1
  59. package/Tree.js +1 -1
  60. package/Trigger.js +1 -1
  61. package/affix/index.js +1 -1
  62. package/alert/index.js +1 -1
  63. package/anchor/Anchor.js +1 -1
  64. package/anchor/Link.js +1 -1
  65. package/auto-complete/index.js +1 -1
  66. package/avatar/Avatar.js +1 -1
  67. package/avatar/Group.js +1 -1
  68. package/back-top/index.js +1 -1
  69. package/badge/index.js +1 -1
  70. package/breadcrumb/index.js +2 -2
  71. package/button/Group.js +1 -1
  72. package/button/index.js +1 -1
  73. package/calendar/index.js +2 -2
  74. package/card/Grid.js +1 -1
  75. package/card/Meta.js +1 -1
  76. package/card/index.js +1 -1
  77. package/carousel/Arrow.js +1 -1
  78. package/carousel/Indicator.js +1 -1
  79. package/carousel/index.js +1 -1
  80. package/cascader/Cascader.js +2 -2
  81. package/cascader/index.js +1 -1
  82. package/cascader/util.js +1 -1
  83. package/checkbox/Checkbox.js +2 -2
  84. package/checkbox/Group.js +2 -2
  85. package/checkbox/index.js +1 -1
  86. package/chunk/{Bu8A2l60.js → 0mWCmQHr.js} +2 -2
  87. package/chunk/{DJ8rDYjb.js → B8hkFIar.js} +1 -1
  88. package/chunk/{D5UfU6-H.js → BViFMHr-.js} +3 -3
  89. package/chunk/{CWjvjpyc.js → BbqvFW5R.js} +217 -163
  90. package/chunk/{NmSLBKjp.js → BxZ39GzB.js} +1 -1
  91. package/chunk/C9XYyypq.js +713 -0
  92. package/chunk/CIkPwQlq.js +6 -0
  93. package/chunk/{BoUHPeG7.js → CPlPBkN7.js} +1 -1
  94. package/chunk/CWlklVfi.js +257 -0
  95. package/chunk/{Dn7KbmZ7.js → DFcz9ZPP.js} +2 -2
  96. package/chunk/{DdT3C0ih.js → DeCsZrXb.js} +2 -2
  97. package/chunk/DskaI8QL.js +25 -0
  98. package/chunk/{Bd9zhOZS.js → Dv6USvVF.js} +1 -1
  99. package/chunk/{BDZpJpz-.js → EL5Jmjgr.js} +1 -1
  100. package/chunk/{_L2dKF58.js → WVoGhvMI.js} +1 -1
  101. package/collapse/Collapse.js +2 -2
  102. package/collapse/Item.js +2 -2
  103. package/collapse/index.js +1 -1
  104. package/color-picker/ControlBar.js +1 -1
  105. package/color-picker/InputAlpha.js +1 -1
  106. package/color-picker/InputHex.js +7 -7
  107. package/color-picker/InputRgb.js +6 -6
  108. package/color-picker/Palette.js +5 -5
  109. package/color-picker/Panel.js +3 -3
  110. package/color-picker/colors.js +7 -23
  111. package/color-picker/index.js +2 -2
  112. package/color-picker/utils.js +1 -1
  113. package/comment/index.js +1 -1
  114. package/config-provider/ConfigProvider.js +2 -2
  115. package/config-provider/context.js +1 -1
  116. package/config-provider/index.js +2 -2
  117. package/copy/index.js +1 -1
  118. package/date-picker/Picker.js +1 -1
  119. package/date-picker/PickerRange.js +2 -2
  120. package/date-picker/index.js +1 -1
  121. package/descriptions/index.js +1 -1
  122. package/divider/index.js +1 -1
  123. package/draggable/index.js +1 -1
  124. package/drawer/Drawer.js +1 -1
  125. package/dropdown/Button.js +1 -1
  126. package/dropdown/index.js +1 -1
  127. package/empty/index.js +1 -1
  128. package/form/Form.js +1 -1
  129. package/form/FormItem.js +1 -1
  130. package/form/context.js +1 -1
  131. package/grid/Col.js +1 -1
  132. package/grid/Row.js +1 -1
  133. package/grid/grid-item.js +1 -1
  134. package/grid/grid.js +1 -1
  135. package/icon/index.js +1 -1
  136. package/icon-hover/index.js +1 -1
  137. package/image/Image.js +2 -2
  138. package/image/ImagePreview.js +2 -2
  139. package/image/ImagePreviewArrow.js +1 -1
  140. package/image/ImagePreviewGroup.js +1 -1
  141. package/image/index.js +1 -1
  142. package/index.js +488 -484
  143. package/input/Group.js +1 -1
  144. package/input/Input.js +1 -1
  145. package/input/InputElement.js +1 -1
  146. package/input/Password.js +1 -1
  147. package/input/Search.js +1 -1
  148. package/input/Textarea.js +1 -1
  149. package/input-number/index.js +1 -1
  150. package/input-tag/InputTag.js +1 -1
  151. package/layout/Content.js +1 -1
  152. package/layout/Footer.js +1 -1
  153. package/layout/Header.js +1 -1
  154. package/layout/Sider.js +1 -1
  155. package/layout/index.js +1 -1
  156. package/link/index.js +1 -1
  157. package/list/Item.js +1 -1
  158. package/list/Meta.js +1 -1
  159. package/list/index.js +1 -1
  160. package/mentions/index.js +1 -1
  161. package/menu/Menu.js +2 -2
  162. package/menu/OverflowWrap.js +1 -1
  163. package/menu/index.js +2 -2
  164. package/message/index.js +1 -1
  165. package/message/useMessage.js +1 -1
  166. package/modal/Confirm.js +2 -2
  167. package/modal/Modal.js +2 -2
  168. package/modal/index.js +1 -1
  169. package/notice/index.js +1 -1
  170. package/notification/index.js +1 -1
  171. package/notification/useNotification.js +1 -1
  172. package/overflow-ellipsis/OverflowItem.js +1 -1
  173. package/overflow-ellipsis/index.js +1 -1
  174. package/package.json +1 -1
  175. package/page-header/index.js +1 -1
  176. package/pagination/PageItem.js +1 -1
  177. package/pagination/PageJumper.js +1 -1
  178. package/pagination/PageOption.js +1 -1
  179. package/pagination/Pagination.js +1 -1
  180. package/picker/Input.js +1 -1
  181. package/picker/InputRange.js +1 -1
  182. package/popconfirm/index.js +1 -1
  183. package/popover/index.js +1 -1
  184. package/progress/index.js +1 -1
  185. package/radio/Group.js +2 -2
  186. package/radio/Radio.js +2 -2
  187. package/radio/index.js +2 -2
  188. package/rate/index.js +1 -1
  189. package/resize-box/ResizeTrigger.js +1 -1
  190. package/resize-box/Split.js +1 -1
  191. package/resize-box/SplitGroup.js +1 -1
  192. package/resize-box/index.js +1 -1
  193. package/result/index.js +1 -1
  194. package/select/Option.js +1 -1
  195. package/select/Select.js +2 -2
  196. package/select-view/Core.js +1 -1
  197. package/skeleton/index.js +1 -1
  198. package/slider/Button.js +1 -1
  199. package/slider/index.js +1 -1
  200. package/space/index.js +1 -1
  201. package/speech-synthesis/index.js +1 -1
  202. package/spin/DotLoading.js +1 -1
  203. package/spin/index.js +1 -1
  204. package/statistic/Countdown.js +1 -1
  205. package/statistic/index.js +1 -1
  206. package/steps/index.js +1 -1
  207. package/style/variables.less +375 -710
  208. package/style.css +1 -1
  209. package/switch/index.js +1 -1
  210. package/table/Table.js +2 -2
  211. package/table/index.js +3 -3
  212. package/tabs/Tab.js +2 -2
  213. package/tabs/TabContent.js +2 -2
  214. package/tabs/TabPane.js +1 -1
  215. package/tabs/index.js +2 -2
  216. package/tag/index.js +1 -1
  217. package/time-picker/Picker.js +1 -1
  218. package/time-picker/TimePicker.js +1 -1
  219. package/timeline/Item.js +1 -1
  220. package/timeline/Timeline.js +1 -1
  221. package/tooltip/index.js +2 -2
  222. package/transfer/Item.js +2 -2
  223. package/transfer/List.js +2 -2
  224. package/transfer/index.js +1 -1
  225. package/tree/Animation.js +2 -2
  226. package/tree/Node.js +3 -3
  227. package/tree/NodeList.js +1 -1
  228. package/tree/Tree.js +2 -2
  229. package/tree/index.js +1 -1
  230. package/tree-select/Select.js +1 -1
  231. package/trigger/index.js +1 -1
  232. package/types/config-provider/interface.d.ts +0 -1
  233. package/types/utils/constant.d.ts +1 -1
  234. package/types/utils/index.d.ts +1 -0
  235. package/types/utils/setDarkTheme.d.ts +4 -0
  236. package/typography/Base.js +1 -1
  237. package/typography/Ellipsis.js +9 -9
  238. package/typography/Paragraph.js +1 -1
  239. package/typography/Typography.js +1 -1
  240. package/typography/index.js +9 -9
  241. package/upload/TriggerNode.js +1 -1
  242. package/upload/Upload.js +1 -1
  243. package/upload/Uploader.js +1 -1
  244. package/upload/request.js +1 -1
  245. package/upload/request_.js +1 -1
  246. package/utils/color.js +1 -1
  247. package/utils/constant.js +3 -2
  248. package/utils/contextHolder.js +1 -1
  249. package/utils/dom.js +1 -1
  250. package/utils/index.js +202 -198
  251. package/utils/setDarkTheme.js +7 -0
  252. package/utils/tinycolor.js +3 -3
  253. package/verification-code/VerificationCode.js +1 -1
  254. package/version/index.js +1 -1
  255. package/watermark/Watermark.js +1 -1
  256. package/chunk/9we0Q8Kh.js +0 -257
  257. package/chunk/Crs3isAx.js +0 -724
  258. package/chunk/D0ZWT7db.js +0 -5
@@ -1,34 +1,34 @@
1
1
  function l(r, t) {
2
- U(r) && (r = "100%");
3
- const e = Y(r);
2
+ ue(r) && (r = "100%");
3
+ const e = fe(r);
4
4
  return r = t === 360 ? r : Math.min(t, Math.max(0, parseFloat(r))), e && (r = parseInt(String(r * t), 10) / 100), Math.abs(r - t) < 1e-6 ? 1 : (t === 360 ? r = (r < 0 ? r % t + t : r % t) / parseFloat(String(t)) : r = r % t / parseFloat(String(t)), r);
5
5
  }
6
- function w(r) {
6
+ function A(r) {
7
7
  return Math.min(1, Math.max(0, r));
8
8
  }
9
- function U(r) {
9
+ function ue(r) {
10
10
  return typeof r == "string" && r.indexOf(".") !== -1 && parseFloat(r) === 1;
11
11
  }
12
- function Y(r) {
12
+ function fe(r) {
13
13
  return typeof r == "string" && r.indexOf("%") !== -1;
14
14
  }
15
- function q(r) {
15
+ function L(r) {
16
16
  return r = parseFloat(r), (isNaN(r) || r < 0 || r > 1) && (r = 1), r;
17
17
  }
18
- function $(r) {
18
+ function S(r) {
19
19
  return Number(r) <= 1 ? `${Number(r) * 100}%` : r;
20
20
  }
21
- function d(r) {
21
+ function b(r) {
22
22
  return r.length === 1 ? "0" + r : String(r);
23
23
  }
24
- function J(r, t, e) {
24
+ function ge(r, t, e) {
25
25
  return {
26
26
  r: l(r, 255) * 255,
27
27
  g: l(t, 255) * 255,
28
28
  b: l(e, 255) * 255
29
29
  };
30
30
  }
31
- function z(r, t, e) {
31
+ function q(r, t, e) {
32
32
  r = l(r, 255), t = l(t, 255), e = l(e, 255);
33
33
  const a = Math.max(r, t, e), n = Math.min(r, t, e);
34
34
  let s = 0, i = 0;
@@ -52,20 +52,20 @@ function z(r, t, e) {
52
52
  }
53
53
  return { h: s, s: i, l: h };
54
54
  }
55
- function F(r, t, e) {
55
+ function H(r, t, e) {
56
56
  return e < 0 && (e += 1), e > 1 && (e -= 1), e < 1 / 6 ? r + (t - r) * (6 * e) : e < 1 / 2 ? t : e < 2 / 3 ? r + (t - r) * (2 / 3 - e) * 6 : r;
57
57
  }
58
- function K(r, t, e) {
58
+ function ce(r, t, e) {
59
59
  let a, n, s;
60
60
  if (r = l(r, 360), t = l(t, 100), e = l(e, 100), t === 0)
61
61
  n = e, s = e, a = e;
62
62
  else {
63
63
  const i = e < 0.5 ? e * (1 + t) : e + t - e * t, h = 2 * e - i;
64
- a = F(h, i, r + 1 / 3), n = F(h, i, r), s = F(h, i, r - 1 / 3);
64
+ a = H(h, i, r + 1 / 3), n = H(h, i, r), s = H(h, i, r - 1 / 3);
65
65
  }
66
66
  return { r: a * 255, g: n * 255, b: s * 255 };
67
67
  }
68
- function H(r, t, e) {
68
+ function R(r, t, e) {
69
69
  r = l(r, 255), t = l(t, 255), e = l(e, 255);
70
70
  const a = Math.max(r, t, e), n = Math.min(r, t, e);
71
71
  let s = 0;
@@ -88,41 +88,41 @@ function H(r, t, e) {
88
88
  }
89
89
  return { h: s, s: u, v: i };
90
90
  }
91
- function Q(r, t, e) {
91
+ function de(r, t, e) {
92
92
  r = l(r, 360) * 6, t = l(t, 100), e = l(e, 100);
93
- const a = Math.floor(r), n = r - a, s = e * (1 - t), i = e * (1 - n * t), h = e * (1 - (1 - n) * t), u = a % 6, k = [e, i, s, s, h, e][u], m = [h, e, e, i, s, s][u], S = [s, s, h, e, e, i][u];
94
- return { r: k * 255, g: m * 255, b: S * 255 };
93
+ const a = Math.floor(r), n = r - a, s = e * (1 - t), i = e * (1 - n * t), h = e * (1 - (1 - n) * t), u = a % 6, d = [e, i, s, s, h, e][u], m = [h, e, e, i, s, s][u], M = [s, s, h, e, e, i][u];
94
+ return { r: d * 255, g: m * 255, b: M * 255 };
95
95
  }
96
- function j(r, t, e, a) {
96
+ function T(r, t, e, a) {
97
97
  const n = [
98
- d(Math.round(r).toString(16)),
99
- d(Math.round(t).toString(16)),
100
- d(Math.round(e).toString(16))
98
+ b(Math.round(r).toString(16)),
99
+ b(Math.round(t).toString(16)),
100
+ b(Math.round(e).toString(16))
101
101
  ];
102
102
  return a && n[0].startsWith(n[0].charAt(1)) && n[1].startsWith(n[1].charAt(1)) && n[2].startsWith(n[2].charAt(1)) ? n[0].charAt(0) + n[1].charAt(0) + n[2].charAt(0) : n.join("");
103
103
  }
104
- function X(r, t, e, a, n) {
104
+ function be(r, t, e, a, n) {
105
105
  const s = [
106
- d(Math.round(r).toString(16)),
107
- d(Math.round(t).toString(16)),
108
- d(Math.round(e).toString(16)),
109
- d(W(a))
106
+ b(Math.round(r).toString(16)),
107
+ b(Math.round(t).toString(16)),
108
+ b(Math.round(e).toString(16)),
109
+ b(V(a))
110
110
  ];
111
111
  return n && s[0].startsWith(s[0].charAt(1)) && s[1].startsWith(s[1].charAt(1)) && s[2].startsWith(s[2].charAt(1)) && s[3].startsWith(s[3].charAt(1)) ? s[0].charAt(0) + s[1].charAt(0) + s[2].charAt(0) + s[3].charAt(0) : s.join("");
112
112
  }
113
- function oe(r, t, e, a) {
113
+ function Ae(r, t, e, a) {
114
114
  return [
115
- d(W(a)),
116
- d(Math.round(r).toString(16)),
117
- d(Math.round(t).toString(16)),
118
- d(Math.round(e).toString(16))
115
+ b(V(a)),
116
+ b(Math.round(r).toString(16)),
117
+ b(Math.round(t).toString(16)),
118
+ b(Math.round(e).toString(16))
119
119
  ].join("");
120
120
  }
121
- function Z(r, t, e, a) {
122
- const n = r / 100, s = t / 100, i = e / 100, h = a / 100, u = 255 * (1 - n) * (1 - h), k = 255 * (1 - s) * (1 - h), m = 255 * (1 - i) * (1 - h);
123
- return { r: u, g: k, b: m };
121
+ function me(r, t, e, a) {
122
+ const n = r / 100, s = t / 100, i = e / 100, h = a / 100, u = 255 * (1 - n) * (1 - h), d = 255 * (1 - s) * (1 - h), m = 255 * (1 - i) * (1 - h);
123
+ return { r: u, g: d, b: m };
124
124
  }
125
- function N(r, t, e) {
125
+ function O(r, t, e) {
126
126
  let a = 1 - r / 255, n = 1 - t / 255, s = 1 - e / 255, i = Math.min(a, n, s);
127
127
  return i === 1 ? (a = 0, n = 0, s = 0) : (a = (a - i) / (1 - i) * 100, n = (n - i) / (1 - i) * 100, s = (s - i) / (1 - i) * 100), i *= 100, {
128
128
  c: Math.round(a),
@@ -131,23 +131,23 @@ function N(r, t, e) {
131
131
  k: Math.round(i)
132
132
  };
133
133
  }
134
- function W(r) {
134
+ function V(r) {
135
135
  return Math.round(parseFloat(r) * 255).toString(16);
136
136
  }
137
- function O(r) {
137
+ function P(r) {
138
138
  return g(r) / 255;
139
139
  }
140
140
  function g(r) {
141
141
  return parseInt(r, 16);
142
142
  }
143
- function _(r) {
143
+ function pe(r) {
144
144
  return {
145
145
  r: r >> 16,
146
146
  g: (r & 65280) >> 8,
147
147
  b: r & 255
148
148
  };
149
149
  }
150
- const E = {
150
+ const C = {
151
151
  aliceblue: "#f0f8ff",
152
152
  antiquewhite: "#faebd7",
153
153
  aqua: "#00ffff",
@@ -297,9 +297,9 @@ const E = {
297
297
  yellow: "#ffff00",
298
298
  yellowgreen: "#9acd32"
299
299
  };
300
- function ee(r) {
300
+ function ye(r) {
301
301
  let t = { r: 0, g: 0, b: 0 }, e = 1, a = null, n = null, s = null, i = !1, h = !1;
302
- return typeof r == "string" && (r = ae(r)), typeof r == "object" && (f(r.r) && f(r.g) && f(r.b) ? (t = J(r.r, r.g, r.b), i = !0, h = String(r.r).slice(-1) === "%" ? "prgb" : "rgb") : f(r.h) && f(r.s) && f(r.v) ? (a = $(r.s), n = $(r.v), t = Q(r.h, a, n), i = !0, h = "hsv") : f(r.h) && f(r.s) && f(r.l) ? (a = $(r.s), s = $(r.l), t = K(r.h, a, s), i = !0, h = "hsl") : f(r.c) && f(r.m) && f(r.y) && f(r.k) && (t = Z(r.c, r.m, r.y, r.k), i = !0, h = "cmyk"), Object.prototype.hasOwnProperty.call(r, "a") && (e = r.a)), e = q(e), {
302
+ return typeof r == "string" && (r = ve(r)), typeof r == "object" && (f(r.r) && f(r.g) && f(r.b) ? (t = ge(r.r, r.g, r.b), i = !0, h = String(r.r).slice(-1) === "%" ? "prgb" : "rgb") : f(r.h) && f(r.s) && f(r.v) ? (a = S(r.s), n = S(r.v), t = de(r.h, a, n), i = !0, h = "hsv") : f(r.h) && f(r.s) && f(r.l) ? (a = S(r.s), s = S(r.l), t = ce(r.h, a, s), i = !0, h = "hsl") : f(r.c) && f(r.m) && f(r.y) && f(r.k) && (t = me(r.c, r.m, r.y, r.k), i = !0, h = "cmyk"), Object.prototype.hasOwnProperty.call(r, "a") && (e = r.a)), e = L(e), {
303
303
  ok: i,
304
304
  format: r.format || h,
305
305
  r: Math.min(255, Math.max(t.r, 0)),
@@ -308,29 +308,29 @@ function ee(r) {
308
308
  a: e
309
309
  };
310
310
  }
311
- const te = "[-\\+]?\\d+%?", re = "[-\\+]?\\d*\\.\\d+%?", p = "(?:" + re + ")|(?:" + te + ")", R = "[\\s|\\(]+(" + p + ")[,|\\s]+(" + p + ")[,|\\s]+(" + p + ")\\s*\\)?", A = (
311
+ const ke = "[-\\+]?\\d+%?", $e = "[-\\+]?\\d*\\.\\d+%?", y = "(?:" + $e + ")|(?:" + ke + ")", E = "[\\s|\\(]+(" + y + ")[,|\\s]+(" + y + ")[,|\\s]+(" + y + ")\\s*\\)?", F = (
312
312
  // eslint-disable-next-line prettier/prettier
313
- "[\\s|\\(]+(" + p + ")[,|\\s]+(" + p + ")[,|\\s]+(" + p + ")[,|\\s]+(" + p + ")\\s*\\)?"
313
+ "[\\s|\\(]+(" + y + ")[,|\\s]+(" + y + ")[,|\\s]+(" + y + ")[,|\\s]+(" + y + ")\\s*\\)?"
314
314
  ), c = {
315
- CSS_UNIT: new RegExp(p),
316
- rgb: new RegExp("rgb" + R),
317
- rgba: new RegExp("rgba" + A),
318
- hsl: new RegExp("hsl" + R),
319
- hsla: new RegExp("hsla" + A),
320
- hsv: new RegExp("hsv" + R),
321
- hsva: new RegExp("hsva" + A),
322
- cmyk: new RegExp("cmyk" + A),
315
+ CSS_UNIT: new RegExp(y),
316
+ rgb: new RegExp("rgb" + E),
317
+ rgba: new RegExp("rgba" + F),
318
+ hsl: new RegExp("hsl" + E),
319
+ hsla: new RegExp("hsla" + F),
320
+ hsv: new RegExp("hsv" + E),
321
+ hsva: new RegExp("hsva" + F),
322
+ cmyk: new RegExp("cmyk" + F),
323
323
  hex3: /^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,
324
324
  hex6: /^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/,
325
325
  hex4: /^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,
326
326
  hex8: /^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/
327
327
  };
328
- function ae(r) {
328
+ function ve(r) {
329
329
  if (r = r.trim().toLowerCase(), r.length === 0)
330
330
  return !1;
331
331
  let t = !1;
332
- if (E[r])
333
- r = E[r], t = !0;
332
+ if (C[r])
333
+ r = C[r], t = !0;
334
334
  else if (r === "transparent")
335
335
  return { r: 0, g: 0, b: 0, a: 0, format: "name" };
336
336
  let e = c.rgb.exec(r);
@@ -343,7 +343,7 @@ function ae(r) {
343
343
  r: g(e[1]),
344
344
  g: g(e[2]),
345
345
  b: g(e[3]),
346
- a: O(e[4]),
346
+ a: P(e[4]),
347
347
  format: t ? "name" : "hex8"
348
348
  } : (e = c.hex6.exec(r), e ? {
349
349
  r: g(e[1]),
@@ -354,7 +354,7 @@ function ae(r) {
354
354
  r: g(e[1] + e[1]),
355
355
  g: g(e[2] + e[2]),
356
356
  b: g(e[3] + e[3]),
357
- a: O(e[4] + e[4]),
357
+ a: P(e[4] + e[4]),
358
358
  format: t ? "name" : "hex8"
359
359
  } : (e = c.hex3.exec(r), e ? {
360
360
  r: g(e[1] + e[1]),
@@ -366,13 +366,13 @@ function ae(r) {
366
366
  function f(r) {
367
367
  return typeof r == "number" ? !Number.isNaN(r) : c.CSS_UNIT.test(r);
368
368
  }
369
- var ne = Object.defineProperty, se = (r, t, e) => t in r ? ne(r, t, { enumerable: !0, configurable: !0, writable: !0, value: e }) : r[t] = e, b = (r, t, e) => se(r, typeof t != "symbol" ? t + "" : t, e);
369
+ var Me = Object.defineProperty, xe = (r, t, e) => t in r ? Me(r, t, { enumerable: !0, configurable: !0, writable: !0, value: e }) : r[t] = e, p = (r, t, e) => xe(r, typeof t != "symbol" ? t + "" : t, e);
370
370
  class o {
371
371
  constructor(t = "", e = {}) {
372
- if (b(this, "r"), b(this, "g"), b(this, "b"), b(this, "a"), b(this, "format"), b(this, "originalInput"), b(this, "isValid"), b(this, "gradientType"), b(this, "roundA"), t instanceof o)
372
+ if (p(this, "r"), p(this, "g"), p(this, "b"), p(this, "a"), p(this, "format"), p(this, "originalInput"), p(this, "isValid"), p(this, "gradientType"), p(this, "roundA"), t instanceof o)
373
373
  return t;
374
- typeof t == "number" && (t = _(t)), this.originalInput = t;
375
- const a = ee(t);
374
+ typeof t == "number" && (t = pe(t)), this.originalInput = t;
375
+ const a = ye(t);
376
376
  this.originalInput = t, this.r = a.r, this.g = a.g, this.b = a.b, this.a = a.a, this.roundA = Math.round(100 * this.a) / 100, this.format = e.format ?? a.format, this.gradientType = e.gradientType, this.r < 1 && (this.r = Math.round(this.r)), this.g < 1 && (this.g = Math.round(this.g)), this.b < 1 && (this.b = Math.round(this.b)), this.isValid = a.ok;
377
377
  }
378
378
  get ok() {
@@ -412,7 +412,7 @@ class o {
412
412
  * @param alpha - The new alpha value. The accepted range is 0-1.
413
413
  */
414
414
  setAlpha(t) {
415
- return this.a = q(t), this.roundA = Math.round(100 * this.a) / 100, this;
415
+ return this.a = L(t), this.roundA = Math.round(100 * this.a) / 100, this;
416
416
  }
417
417
  /**
418
418
  * Returns whether the color is monochrome.
@@ -425,11 +425,11 @@ class o {
425
425
  * Returns the object as a HSVA object.
426
426
  */
427
427
  toHsv() {
428
- const t = H(this.r, this.g, this.b);
428
+ const t = R(this.r, this.g, this.b);
429
429
  return { h: t.h * 360, s: t.s, v: t.v, a: this.a };
430
430
  }
431
431
  toHsv_() {
432
- const t = H(this.r, this.g, this.b);
432
+ const t = R(this.r, this.g, this.b);
433
433
  return { h: t.h, s: t.s, v: t.v, a: this.a };
434
434
  }
435
435
  /**
@@ -437,14 +437,14 @@ class o {
437
437
  * "hsva(xxx, xxx, xxx, xx)".
438
438
  */
439
439
  toHsvString() {
440
- const t = H(this.r, this.g, this.b), e = Math.round(t.h * 360), a = Math.round(t.s * 100), n = Math.round(t.v * 100);
440
+ const t = R(this.r, this.g, this.b), e = Math.round(t.h * 360), a = Math.round(t.s * 100), n = Math.round(t.v * 100);
441
441
  return this.a === 1 ? `hsv(${e}, ${a}%, ${n}%)` : `hsva(${e}, ${a}%, ${n}%, ${this.roundA})`;
442
442
  }
443
443
  /**
444
444
  * Returns the object as a HSLA object.
445
445
  */
446
446
  toHsl() {
447
- const t = z(this.r, this.g, this.b);
447
+ const t = q(this.r, this.g, this.b);
448
448
  return { h: t.h * 360, s: t.s, l: t.l, a: this.a };
449
449
  }
450
450
  /**
@@ -452,7 +452,7 @@ class o {
452
452
  * "hsla(xxx, xxx, xxx, xx)".
453
453
  */
454
454
  toHslString() {
455
- const t = z(this.r, this.g, this.b), e = Math.round(t.h * 360), a = Math.round(t.s * 100), n = Math.round(t.l * 100);
455
+ const t = q(this.r, this.g, this.b), e = Math.round(t.h * 360), a = Math.round(t.s * 100), n = Math.round(t.l * 100);
456
456
  return this.a === 1 ? `hsl(${e}, ${a}%, ${n}%)` : `hsla(${e}, ${a}%, ${n}%, ${this.roundA})`;
457
457
  }
458
458
  /**
@@ -460,7 +460,7 @@ class o {
460
460
  * @param allow3Char will shorten hex value to 3 char if possible
461
461
  */
462
462
  toHex(t = !1) {
463
- return j(this.r, this.g, this.b, t);
463
+ return T(this.r, this.g, this.b, t);
464
464
  }
465
465
  /**
466
466
  * Returns the hex value of the color -with a # prefixed.
@@ -474,7 +474,7 @@ class o {
474
474
  * @param allow4Char will shorten hex value to 4 char if possible
475
475
  */
476
476
  toHex8(t = !1) {
477
- return X(this.r, this.g, this.b, this.a, t);
477
+ return be(this.r, this.g, this.b, this.a, t);
478
478
  }
479
479
  /**
480
480
  * Returns the hex 8 value of the color -with a # prefixed.
@@ -545,11 +545,11 @@ class o {
545
545
  }
546
546
  toCmyk() {
547
547
  return {
548
- ...N(this.r, this.g, this.b)
548
+ ...O(this.r, this.g, this.b)
549
549
  };
550
550
  }
551
551
  toCmykString() {
552
- const { c: t, m: e, y: a, k: n } = N(this.r, this.g, this.b);
552
+ const { c: t, m: e, y: a, k: n } = O(this.r, this.g, this.b);
553
553
  return `cmyk(${t}, ${e}, ${a}, ${n})`;
554
554
  }
555
555
  /**
@@ -560,8 +560,8 @@ class o {
560
560
  return "transparent";
561
561
  if (this.a < 1)
562
562
  return !1;
563
- const t = `#${j(this.r, this.g, this.b, !1)}`;
564
- for (const [e, a] of Object.entries(E))
563
+ const t = `#${T(this.r, this.g, this.b, !1)}`;
564
+ for (const [e, a] of Object.entries(C))
565
565
  if (t === a)
566
566
  return e;
567
567
  return !1;
@@ -585,7 +585,7 @@ class o {
585
585
  */
586
586
  lighten(t = 10) {
587
587
  const e = this.toHsl();
588
- return e.l += t / 100, e.l = w(e.l), new o(e);
588
+ return e.l += t / 100, e.l = A(e.l), new o(e);
589
589
  }
590
590
  /**
591
591
  * Brighten the color a given amount, from 0 to 100.
@@ -611,7 +611,7 @@ class o {
611
611
  */
612
612
  darken(t = 10) {
613
613
  const e = this.toHsl();
614
- return e.l -= t / 100, e.l = w(e.l), new o(e);
614
+ return e.l -= t / 100, e.l = A(e.l), new o(e);
615
615
  }
616
616
  /**
617
617
  * Mix the color with pure white, from 0 to 100.
@@ -636,7 +636,7 @@ class o {
636
636
  */
637
637
  desaturate(t = 10) {
638
638
  const e = this.toHsl();
639
- return e.s -= t / 100, e.s = w(e.s), new o(e);
639
+ return e.s -= t / 100, e.s = A(e.s), new o(e);
640
640
  }
641
641
  /**
642
642
  * Saturate the color a given amount, from 0 to 100.
@@ -644,7 +644,7 @@ class o {
644
644
  */
645
645
  saturate(t = 10) {
646
646
  const e = this.toHsl();
647
- return e.s += t / 100, e.s = w(e.s), new o(e);
647
+ return e.s += t / 100, e.s = A(e.s), new o(e);
648
648
  }
649
649
  /**
650
650
  * Completely desaturates a color into greyscale.
@@ -747,24 +747,68 @@ class o {
747
747
  return this.format === "cmyk" || e.format === "cmyk" ? this.toCmykString() === e.toCmykString() : this.toRgbString() === e.toRgbString();
748
748
  }
749
749
  }
750
- const y = 10, M = {
751
- red: { name: { zh: "浪漫红", en: "Red" }, value: "#F53F3F" },
752
- orangered: { name: { zh: "晚秋红", en: "Orange Red" }, value: "#FF702E" },
753
- orange: { name: { zh: "活力橙", en: "Orange" }, value: "#FFA500" },
754
- gold: { name: { zh: "黄昏", en: "Gold" }, value: "#FFBD14" },
755
- yellow: { name: { zh: "柠檬黄", en: "Yellow" }, value: "#FFE014" },
756
- lime: { name: { zh: "新生绿", en: "Lime" }, value: "#A1E619" },
757
- green: { name: { zh: "仙野绿", en: "Green" }, value: "#00B82B" },
758
- cyan: { name: { zh: "碧涛青", en: "Cyan" }, value: "#0BD0D0" },
759
- blue: { name: { zh: "海蔚蓝", en: "Blue" }, value: "#2E8FFF" },
760
- pqbblue: { name: { zh: "极致蓝", en: "Pqb Blue" }, value: "#1A5EFF" },
761
- purple: { name: { zh: "暗夜紫", en: "Purple" }, value: "#7126D9" },
762
- pinkpurple: { name: { zh: "青春紫", en: "Pink Purple" }, value: "#D91AD9" },
763
- magenta: { name: { zh: "品红", en: "Magenta" }, value: "#FF299F" },
764
- gray: { name: { zh: "中性灰", en: "Gray" }, value: "#6B6C6D" }
765
- }, { gray: le, ...ie } = M, P = Object.fromEntries(
766
- Object.entries(ie).map(([r, t], e, a) => [r, t.value])
767
- ), T = {
750
+ const $ = 10, k = {
751
+ name: { zh: "中性灰", en: "gray" },
752
+ value: "#6B6C6D"
753
+ }, G = {
754
+ name: { zh: "浪漫红", en: "red" },
755
+ value: "#F53F3F"
756
+ }, U = {
757
+ name: { zh: "晚秋红", en: "orangered" },
758
+ value: "#FF702E"
759
+ }, J = {
760
+ name: { zh: "活力橙", en: "orange" },
761
+ value: "#FFA500"
762
+ }, K = {
763
+ name: { zh: "黄昏", en: "gold" },
764
+ value: "#FFBD14"
765
+ }, Q = {
766
+ name: { zh: "柠檬黄", en: "yellow" },
767
+ value: "#FFE014"
768
+ }, X = {
769
+ name: { zh: "新生绿", en: "lime" },
770
+ value: "#A1E619"
771
+ }, Y = {
772
+ name: { zh: "仙野绿", en: "green" },
773
+ value: "#00B82B"
774
+ }, Z = {
775
+ name: { zh: "碧涛青", en: "cyan" },
776
+ value: "#0BD0D0"
777
+ }, _ = {
778
+ name: { zh: "海蔚蓝", en: "blue" },
779
+ value: "#2E8FFF"
780
+ }, ee = {
781
+ name: { zh: "极致蓝", en: "pqbblue" },
782
+ value: "#1A5EFF"
783
+ }, te = {
784
+ name: { zh: "暗夜紫", en: "purple" },
785
+ value: "#7126D9"
786
+ }, re = {
787
+ name: { zh: "青春紫", en: "pinkpurple" },
788
+ value: "#D91AD9"
789
+ }, ae = {
790
+ name: { zh: "品红", en: "magenta" },
791
+ value: "#FF299F"
792
+ }, z = [
793
+ G,
794
+ U,
795
+ J,
796
+ K,
797
+ Q,
798
+ X,
799
+ Y,
800
+ Z,
801
+ _,
802
+ ee,
803
+ te,
804
+ re,
805
+ ae
806
+ ];
807
+ var W, I;
808
+ const ne = {
809
+ key: ((W = k.name) == null ? void 0 : W.en) ?? ((I = k.name) == null ? void 0 : I.zh) ?? k.name,
810
+ name: k.name,
811
+ primary: k.value,
768
812
  light: [
769
813
  "#F7F8F9",
770
814
  "#F2F3F4",
@@ -772,7 +816,7 @@ const y = 10, M = {
772
816
  "#C9CACB",
773
817
  "#A9ABAC",
774
818
  "#868788",
775
- M.gray.value,
819
+ k.value,
776
820
  "#4D4E4F",
777
821
  "#28292A",
778
822
  "#1E1F20"
@@ -788,86 +832,96 @@ const y = 10, M = {
788
832
  "#D8D9DB",
789
833
  "#E4E6E8",
790
834
  "#E8EBEE"
791
- ],
792
- primary: M.gray.value,
793
- name: M.gray.name
794
- }, he = Object.fromEntries(
795
- Object.entries(M).map(([r, t], e, a) => {
796
- const n = t.value;
797
- return [
798
- r,
799
- {
800
- light: L({ color: n, length: y }),
801
- dark: G({ color: n, length: y }),
802
- primary: n,
803
- name: t.name
804
- }
805
- ];
806
- }).concat([["gray", T]])
807
- );
808
- function C(r = {}) {
809
- const t = ((r == null ? void 0 : r.length) ?? y) / 2 + 1, e = (r == null ? void 0 : r.level) ?? t;
810
- let a = new o(r == null ? void 0 : r.color);
811
- const n = a.toHsv(), s = n.h, i = n.s, h = n.v, u = s === 0 && i === 0, k = e < t, m = Math.abs(t - e), S = 1, B = 0.1;
812
- let v = i;
813
- v > B && (k ? v = i - (i - B) / (t - 1) * m : v = i + (S - i) / (t - 1) * m), u && (v = i);
814
- const V = u ? 0.97 : 1, D = 0.1;
815
- let x = h;
816
- return x > D && (k ? x = h + (V - h) / (t - 1) * m : x = h - (h - D) / (t - 1) * m), a = new o({
817
- h: s,
835
+ ]
836
+ }, we = z.map((r, t, e) => {
837
+ const a = r.name, n = (a == null ? void 0 : a.en) ?? (a == null ? void 0 : a.zh) ?? a, s = r.value;
838
+ return {
839
+ key: n,
840
+ name: a,
841
+ primary: s,
842
+ light: ie({ color: s, length: $ }),
843
+ dark: he({ color: s, length: $ })
844
+ };
845
+ }).concat([ne]);
846
+ function B(r = {}) {
847
+ const { length: t, color: e, level: a } = r, n = (t ?? $) / 2 + 1, s = a ?? n;
848
+ let i = new o(e);
849
+ const h = i.toHsv(), u = h.h, d = h.s, m = h.v, M = u === 0 && d === 0, D = s < n, x = Math.abs(n - s), oe = 1, N = 0.1;
850
+ let v = d;
851
+ v > N && (D ? v = d - (d - N) / (n - 1) * x : v = d + (oe - d) / (n - 1) * x), M && (v = d);
852
+ const le = M ? 0.97 : 1, j = 0.1;
853
+ let w = m;
854
+ return w > j && (D ? w = m + (le - m) / (n - 1) * x : w = m - (m - j) / (n - 1) * x), i = new o({
855
+ h: u,
818
856
  s: v,
819
- v: x
820
- }), r.dark && (a = a.darken(r.amount ?? 10)), a.toHexString();
857
+ v: w
858
+ }), r.dark && (i = i.darken(r.amount ?? 10)), i.toHexString();
821
859
  }
822
- function I(r = {}) {
823
- return C({ ...r, dark: !0 });
860
+ function se(r = {}) {
861
+ return B({ ...r, dark: !0 });
824
862
  }
825
- function L(r = {}) {
826
- return new Array((r == null ? void 0 : r.length) ?? y).fill(0).map((t, e, a) => {
827
- const n = e + 1;
828
- return C({ ...r, level: n });
863
+ function ie(r = {}) {
864
+ const { length: t } = r;
865
+ return Array.from(new Array(t ?? $), (e, a) => {
866
+ const n = a + 1;
867
+ return B({ ...r, level: n });
829
868
  });
830
869
  }
831
- function G(r = {}) {
832
- return new Array((r == null ? void 0 : r.length) ?? y).fill(0).map((t, e, a) => {
833
- const n = e + 1;
834
- return I({
870
+ function he(r = {}) {
871
+ const { length: t } = r;
872
+ return Array.from(new Array(t ?? $), (e, a) => {
873
+ const n = a + 1;
874
+ return se({
835
875
  ...r,
836
- level: y - n + 1
876
+ level: $ - n + 1
837
877
  });
838
878
  });
839
879
  }
840
- const ue = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
880
+ const Se = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
841
881
  __proto__: null,
842
- LENGTH: y,
843
- colorPresets: he,
844
- colors: P,
845
- default: P,
846
- generate: L,
847
- generateDark: G,
848
- grayPresets: T,
849
- palette: C,
850
- paletteDark: I
882
+ LENGTH: $,
883
+ blue: _,
884
+ colorPresets: we,
885
+ colors: z,
886
+ cyan: Z,
887
+ default: z,
888
+ generate: ie,
889
+ generateDark: he,
890
+ gold: K,
891
+ gray: k,
892
+ grayPresets: ne,
893
+ green: Y,
894
+ lime: X,
895
+ magenta: ae,
896
+ orange: J,
897
+ orangered: U,
898
+ palette: B,
899
+ paletteDark: se,
900
+ pinkpurple: re,
901
+ pqbblue: ee,
902
+ purple: te,
903
+ red: G,
904
+ yellow: Q
851
905
  }, Symbol.toStringTag, { value: "Module" }));
852
906
  export {
853
- J as A,
854
- N as C,
855
- j as H,
856
- ee as N,
857
- ue as P,
858
- _ as R,
859
- Q as S,
860
- z as T,
861
- X as W,
862
- o as a,
907
+ ge as A,
908
+ O as C,
909
+ T as H,
910
+ ye as N,
911
+ Se as R,
912
+ de as S,
913
+ q as T,
914
+ be as W,
915
+ pe as a,
863
916
  g as b,
864
- W as d,
865
- E as e,
866
- O as j,
867
- K as k,
868
- H as l,
917
+ o as c,
918
+ V as d,
919
+ C as e,
920
+ P as j,
921
+ ce as k,
922
+ R as l,
869
923
  f as n,
870
- oe as p,
871
- ae as w,
872
- Z as y
924
+ Ae as p,
925
+ ve as w,
926
+ me as y
873
927
  };
@@ -4,7 +4,7 @@ import W from "@unicom-cloud/icons/IconUiMinus";
4
4
  import E from "lodash/isFunction";
5
5
  import q from "lodash/isNil";
6
6
  import $, { createContext as B, useState as J, useContext as I, useCallback as F, useRef as K, useEffect as Q } from "react";
7
- import { a as M, I as X } from "./Crs3isAx.js";
7
+ import { a as M, I as X } from "./C9XYyypq.js";
8
8
  import { u as Y } from "./BFTV6myl.js";
9
9
  import { u as S } from "./DeV0v__J.js";
10
10
  import { p as U } from "./CUFsOxJ2.js";