@unicom-cloud/ui 0.8.66 → 0.8.67

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 (357) hide show
  1. package/Affix.js +79 -79
  2. package/Alert.js +46 -46
  3. package/Anchor.js +1 -1
  4. package/AutoComplete.js +74 -74
  5. package/Avatar.js +36 -36
  6. package/BackTop.js +35 -35
  7. package/Badge.js +55 -55
  8. package/Breadcrumb.js +42 -42
  9. package/Button.js +24 -24
  10. package/Calendar.js +230 -230
  11. package/Card.js +18 -18
  12. package/Carousel.js +165 -165
  13. package/Cascader.js +1 -1
  14. package/Checkbox.js +1 -1
  15. package/Collapse.js +1 -1
  16. package/ColorPicker.js +26 -26
  17. package/Comment.js +18 -18
  18. package/ConfigProvider.js +2 -2
  19. package/Copy.js +28 -27
  20. package/DatePicker.js +872 -871
  21. package/Descriptions.js +34 -34
  22. package/Divider.js +19 -19
  23. package/Draggable.js +27 -26
  24. package/Drawer.js +1 -1
  25. package/Dropdown.js +110 -110
  26. package/Empty.js +3 -3
  27. package/Form.js +984 -945
  28. package/Grid.js +34 -34
  29. package/Icon.js +16 -16
  30. package/IconHover.js +2 -2
  31. package/Image.js +2 -2
  32. package/Input.js +7 -6
  33. package/InputNumber.js +6 -6
  34. package/InputTag.js +1 -1
  35. package/Layout.js +24 -24
  36. package/Link.js +30 -30
  37. package/List.js +95 -95
  38. package/Mentions.js +85 -84
  39. package/Menu.js +2 -2
  40. package/Message.js +7 -6
  41. package/Modal.js +1 -1
  42. package/Notice.js +14 -3
  43. package/Notification.js +9 -7
  44. package/OverflowEllipsis.js +64 -62
  45. package/PageHeader.js +73 -73
  46. package/Pagination.js +1 -1
  47. package/Picker.js +1 -1
  48. package/Popconfirm.js +60 -60
  49. package/Popover.js +31 -31
  50. package/Portal.js +23 -31
  51. package/Progress.js +22 -22
  52. package/Radio.js +2 -2
  53. package/Rate.js +24 -24
  54. package/ResizeBox.js +274 -271
  55. package/Result.js +3 -3
  56. package/Select.js +4 -4
  57. package/SelectView.js +257 -238
  58. package/Skeleton.js +46 -46
  59. package/Slider.js +286 -283
  60. package/Space.js +28 -28
  61. package/SpeechSynthesis.js +62 -55
  62. package/Spin.js +23 -23
  63. package/Statistic.js +80 -80
  64. package/Steps.js +67 -67
  65. package/Switch.js +47 -47
  66. package/Table.js +1445 -1380
  67. package/Tabs.js +5 -5
  68. package/Tag.js +45 -45
  69. package/TimePicker.js +154 -154
  70. package/Timeline.js +2 -2
  71. package/Tooltip.js +80 -79
  72. package/Transfer.js +103 -102
  73. package/Tree.js +3 -2
  74. package/TreeSelect.js +2 -2
  75. package/Trigger.js +699 -772
  76. package/Typography.js +756 -6
  77. package/Upload.js +2 -2
  78. package/VerificationCode.js +1 -1
  79. package/Version.js +1 -1
  80. package/VirtualList.js +1 -1
  81. package/Watermark.js +1 -1
  82. package/chunk/{BHgJ5Y3T.js → -UuKKT0Z.js} +29 -29
  83. package/chunk/{B8QV6E2b.js → AwZqeapI.js} +5 -5
  84. package/chunk/B5gK1Idp.js +19 -0
  85. package/chunk/B7FlazNB.js +24 -0
  86. package/chunk/{DTBtQQ2H.js → BBvWDeuZ.js} +67 -67
  87. package/chunk/BCftTxEy.js +626 -0
  88. package/chunk/{CZOP_ZHJ.js → BGny4zSb.js} +60 -60
  89. package/chunk/BHF15Dog.js +98 -0
  90. package/chunk/BJQ5UNa-.js +1585 -0
  91. package/chunk/BP9sYyk9.js +8 -0
  92. package/chunk/BUdtVdnv.js +38 -0
  93. package/chunk/BVQlOzTS.js +11 -0
  94. package/chunk/B__a_gb_.js +519 -0
  95. package/chunk/BbEYToV1.js +10 -0
  96. package/chunk/BbdDQAnm.js +15 -0
  97. package/chunk/BdUcgWdu.js +11 -0
  98. package/chunk/BfbXSG70.js +26 -0
  99. package/chunk/BndfNLK4.js +186 -0
  100. package/chunk/BoMCZV6K.js +1098 -0
  101. package/chunk/Br0B6y1T.js +18 -0
  102. package/chunk/BrOW642m.js +130 -0
  103. package/chunk/BxUs8_Cr.js +9 -0
  104. package/chunk/{CcV4wQB1.js → C42LIMP9.js} +244 -242
  105. package/chunk/C4YkFMzC.js +778 -0
  106. package/chunk/{Bh23P4l7.js → C9Wcraj7.js} +21 -21
  107. package/chunk/{4-gvEY5y.js → CANgSlh3.js} +10 -10
  108. package/chunk/CJ_o9tZM.js +5 -0
  109. package/chunk/{DNAigumg.js → CK5m7rLl.js} +36 -36
  110. package/chunk/{CANaGbGR.js → CKNyIitu.js} +57 -56
  111. package/chunk/CLiqJm_T.js +10 -0
  112. package/chunk/{BnSVm1YC.js → CNmmhbCn.js} +32 -32
  113. package/chunk/{BFipyA67.js → CP0odX99.js} +51 -51
  114. package/chunk/CPT-OZH2.js +14 -0
  115. package/chunk/CVSF8p0O.js +698 -0
  116. package/chunk/C_agcwLN.js +31 -0
  117. package/chunk/{jhQQCFMn.js → C_gJWGGh.js} +201 -201
  118. package/chunk/{Bc7t9jkb.js → CaasmWg_.js} +11 -11
  119. package/chunk/Ce1j9KTi.js +6 -0
  120. package/chunk/{D_-UD4vO.js → Cf5QNhkG.js} +18 -18
  121. package/chunk/CkNSv2U7.js +56 -0
  122. package/chunk/Cp2f70gB.js +9 -0
  123. package/chunk/CpegYjdC.js +16 -0
  124. package/chunk/CucI3KZr.js +20 -0
  125. package/chunk/CwoFBTYz.js +11 -0
  126. package/chunk/D2KPqPhV.js +17 -0
  127. package/chunk/D7NyvE5f.js +17 -0
  128. package/chunk/D8oTPQ2H.js +384 -0
  129. package/chunk/{CLBavO5c.js → DC1iHEiy.js} +87 -87
  130. package/chunk/{DnvO8A0Z.js → DFrfrmfK.js} +120 -119
  131. package/chunk/DGTIZ_0O.js +6 -0
  132. package/chunk/DJfpiZn_.js +25 -0
  133. package/chunk/DKr2_PYd.js +34 -0
  134. package/chunk/DNUz6zgo.js +11 -0
  135. package/chunk/DRtM649q.js +11 -0
  136. package/chunk/DS_mUWn6.js +41 -0
  137. package/chunk/DU6bs_19.js +10 -0
  138. package/chunk/DWdbwz22.js +10 -0
  139. package/chunk/DcveZuqd.js +6 -0
  140. package/chunk/DdVFknul.js +24 -0
  141. package/chunk/DgRfikwe.js +16 -0
  142. package/chunk/{znkyQ-HR.js → DkyR2EfG.js} +66 -66
  143. package/chunk/{DUeHQKtx.js → DleQ5HwG.js} +42 -42
  144. package/chunk/DnrZEnQ_.js +27 -0
  145. package/chunk/DsRSHWtX.js +1025 -0
  146. package/chunk/Dz5BdmXo.js +270 -0
  147. package/chunk/EANe01DF.js +1030 -0
  148. package/chunk/{CwhPMMWy.js → Ey4YJCkX.js} +7 -7
  149. package/chunk/GoNx5R4F.js +873 -0
  150. package/chunk/HDUQku8d.js +20 -0
  151. package/chunk/HrAP__Hi.js +25 -0
  152. package/chunk/JPPo5nY_.js +9 -0
  153. package/chunk/{Du-bw6qA.js → SLWP34OR.js} +90 -85
  154. package/chunk/VVKtwaGf.js +278 -0
  155. package/chunk/WPNpLxSI.js +16 -0
  156. package/chunk/{CPvvjMwZ.js → WpO_DsK4.js} +49 -48
  157. package/chunk/fdU3ang6.js +14 -0
  158. package/chunk/{DQAot004.js → fkclKOAL.js} +298 -292
  159. package/chunk/flvYlqx3.js +22 -0
  160. package/chunk/kTDayEpF.js +288 -0
  161. package/chunk/{CssIjN1g.js → pZoNQ75H.js} +31 -31
  162. package/chunk/qFf1w_Jq.js +8 -0
  163. package/chunk/{CHnFKgbk.js → w-kM1L5W.js} +155 -155
  164. package/hooks/index.js +53 -49
  165. package/hooks/useComputedState.js +2 -10
  166. package/hooks/useCreate.js +2 -7
  167. package/hooks/useForceUpdate.js +2 -7
  168. package/hooks/useId.js +2 -10
  169. package/hooks/useInView.js +2 -30
  170. package/hooks/useIntersectionObserver.js +2 -23
  171. package/hooks/useInterval.js +2 -17
  172. package/hooks/useIsFirstRender.js +2 -9
  173. package/hooks/useIsomorphicLayoutEffect.js +2 -5
  174. package/hooks/useKeyboardEvent.js +2 -16
  175. package/hooks/useMedia.js +2 -15
  176. package/hooks/useMergeProps.js +2 -18
  177. package/hooks/useMergeValue.js +2 -19
  178. package/hooks/useOnlineStatus.js +4 -0
  179. package/hooks/useOverflowHidden.js +2 -25
  180. package/hooks/useOverrideRef.js +2 -13
  181. package/hooks/usePersistCallback.js +2 -13
  182. package/hooks/usePrefersColorSchemeDark.js +4 -0
  183. package/hooks/usePrevious.js +2 -9
  184. package/hooks/useRefs.js +2 -9
  185. package/hooks/useResizeObserver.js +2 -15
  186. package/hooks/useStateCallback.js +2 -15
  187. package/hooks/useStateWithPromise.js +2 -24
  188. package/hooks/useUpdateEffect.js +2 -9
  189. package/hooks/useVerificationCode.js +73 -0
  190. package/hooks/useWatch.js +2 -10
  191. package/hooks/{use-watermark.js → useWatermark.js} +27 -26
  192. package/hooks/useWindowSize.js +2 -20
  193. package/index.js +571 -584
  194. package/locale/en-US.js +4 -2
  195. package/locale/interface.js +1 -4
  196. package/locale/ja-JP.js +3 -1
  197. package/locale/tr-TR.js +1 -1
  198. package/locale/zh-CN.js +3 -1
  199. package/locale/zh-HK.js +3 -1
  200. package/locale/zh-TW.js +3 -1
  201. package/package.json +1 -1
  202. package/style.css +1 -1
  203. package/types/anchor/util.d.ts +1 -1
  204. package/types/button/index.d.ts +2 -2
  205. package/types/color-picker/hooks/useColorPicker.d.ts +2 -2
  206. package/types/form/Control-old.d.ts +56 -0
  207. package/types/form/Control.d.ts +6 -54
  208. package/types/form/FormItem.d.ts +1 -1
  209. package/types/form/store.d.ts +0 -1
  210. package/types/hooks/index.d.ts +2 -0
  211. package/types/hooks/useComputedState.d.ts +1 -4
  212. package/types/hooks/useCreate.d.ts +1 -2
  213. package/types/hooks/useForceUpdate.d.ts +1 -2
  214. package/types/hooks/useId.d.ts +1 -2
  215. package/types/hooks/useInView.d.ts +1 -11
  216. package/types/hooks/useIntersectionObserver.d.ts +1 -7
  217. package/types/hooks/useInterval.d.ts +1 -2
  218. package/types/hooks/useIsFirstRender.d.ts +1 -2
  219. package/types/hooks/useIsomorphicLayoutEffect.d.ts +1 -3
  220. package/types/hooks/useKeyboardEvent.d.ts +1 -8
  221. package/types/hooks/useMedia.d.ts +1 -2
  222. package/types/hooks/useMergeProps.d.ts +1 -5
  223. package/types/hooks/useMergeValue.d.ts +1 -6
  224. package/types/hooks/useOnlineStatus.d.ts +1 -0
  225. package/types/hooks/useOverflowHidden.d.ts +1 -5
  226. package/types/hooks/useOverrideRef.d.ts +1 -6
  227. package/types/hooks/usePersistCallback.d.ts +1 -2
  228. package/types/hooks/usePrefersColorSchemeDark.d.ts +1 -0
  229. package/types/hooks/usePrevious.d.ts +1 -3
  230. package/types/hooks/useRefs.d.ts +1 -2
  231. package/types/hooks/useResizeObserver.d.ts +1 -6
  232. package/types/hooks/useStateCallback.d.ts +1 -5
  233. package/types/hooks/useStateWithPromise.d.ts +1 -2
  234. package/types/hooks/useUpdateEffect.d.ts +1 -3
  235. package/types/hooks/useWatch.d.ts +1 -3
  236. package/types/hooks/useWindowSize.d.ts +1 -5
  237. package/types/image/interface.d.ts +1 -0
  238. package/types/index.d.ts +157 -86
  239. package/types/input/Input.d.ts +1 -1
  240. package/types/input/Textarea.d.ts +2 -2
  241. package/types/locale/en-US.d.ts +2 -0
  242. package/types/locale/interface.d.ts +1 -2
  243. package/types/locale/ja-JP.d.ts +2 -0
  244. package/types/locale/zh-CN.d.ts +2 -0
  245. package/types/locale/zh-HK.d.ts +2 -0
  246. package/types/locale/zh-TW.d.ts +2 -0
  247. package/types/menu/context.d.ts +1 -1
  248. package/types/message/index.d.ts +14 -14
  249. package/types/message/interface.d.ts +2 -0
  250. package/types/modal/config.d.ts +0 -1
  251. package/types/modal/interface.d.ts +0 -1
  252. package/types/notice/index.d.ts +2 -27
  253. package/types/notification/index.d.ts +15 -16
  254. package/types/notification/interface.d.ts +2 -0
  255. package/types/notification/withNotification.d.ts +2 -0
  256. package/types/select/util.d.ts +1 -2
  257. package/types/select-view/interface.d.ts +2 -1
  258. package/types/speech-synthesis/index.d.ts +1 -1
  259. package/types/table/constant.d.ts +2 -0
  260. package/types/table/hook/useThResizable.d.ts +7 -0
  261. package/types/table/index.d.ts +10 -1
  262. package/types/table/style/index.d.ts +1 -0
  263. package/types/table/th-resizable/index.d.ts +2 -0
  264. package/types/table/thead/Column.d.ts +1 -2
  265. package/types/tree/Tree.d.ts +12 -67
  266. package/types/tree-select/Select.d.ts +2 -2
  267. package/types/trigger/index.d.ts +2 -120
  268. package/types/trigger/interface.d.ts +2 -1
  269. package/types/utils/CSSTransition.d.ts +2 -3
  270. package/types/utils/caseName.d.ts +1 -1
  271. package/types/utils/className.d.ts +1 -1
  272. package/types/utils/constant.d.ts +2 -2
  273. package/types/utils/copy.d.ts +1 -1
  274. package/types/utils/dayjs.d.ts +1 -21
  275. package/types/utils/dom.d.ts +1 -6
  276. package/types/utils/fileToURL.d.ts +1 -1
  277. package/types/utils/fillNBSP.d.ts +1 -1
  278. package/types/utils/getHighlightText.d.ts +1 -5
  279. package/types/utils/getHotkeyHandler.d.ts +1 -8
  280. package/types/utils/getStringLength.d.ts +1 -1
  281. package/types/utils/include.d.ts +1 -1
  282. package/types/utils/index.d.ts +3 -4
  283. package/types/utils/is.d.ts +1 -16
  284. package/types/utils/keyboardCode.d.ts +3 -0
  285. package/types/utils/lodash.d.ts +1 -17
  286. package/types/utils/mergeProps.d.ts +1 -1
  287. package/types/utils/mergedToString.d.ts +1 -1
  288. package/types/utils/omit.d.ts +1 -1
  289. package/types/utils/pad.d.ts +1 -2
  290. package/types/utils/pick.d.ts +2 -4
  291. package/types/utils/reactDOM.d.ts +1 -7
  292. package/types/utils/resizeObserverEffect.d.ts +2 -0
  293. package/types/utils/saveAs.d.ts +1 -1
  294. package/types/utils/screenfull.d.ts +2 -0
  295. package/types/utils/scrollIntoView.d.ts +1 -2
  296. package/types/utils/style.d.ts +1 -3
  297. package/types/utils/throttleByRaf.d.ts +1 -5
  298. package/types/utils/throttleByRaf2.d.ts +1 -0
  299. package/types/utils/warning.d.ts +1 -2
  300. package/types/version/index.d.ts +1 -1
  301. package/utils/CSSTransition.js +2 -6
  302. package/utils/className.js +2 -2
  303. package/utils/constant.js +8 -9
  304. package/utils/contextHolder.js +1 -1
  305. package/utils/copy.js +1 -1
  306. package/utils/dayjs.js +14 -173
  307. package/utils/dom.js +33 -29
  308. package/utils/fillNBSP.js +2 -4
  309. package/utils/getHighlightText.js +2 -38
  310. package/utils/getHotkeyHandler.js +2 -25
  311. package/utils/getStringLength.js +2 -7
  312. package/utils/include.js +2 -7
  313. package/utils/index.js +237 -240
  314. package/utils/is.js +116 -156
  315. package/utils/keyboardCode.js +27 -0
  316. package/utils/mergeProps.js +2 -9
  317. package/utils/mergedToString.js +2 -13
  318. package/utils/omit.js +2 -9
  319. package/utils/pad.js +12 -12
  320. package/utils/pick.js +4 -15
  321. package/utils/reactDOM.js +3 -54
  322. package/utils/resizeObserverEffect.js +4 -0
  323. package/utils/saveAs.js +1 -1
  324. package/utils/screenfull.js +4 -0
  325. package/utils/scrollIntoView.js +2 -21
  326. package/utils/style.js +12 -11
  327. package/utils/throttleByRaf.js +13 -12
  328. package/utils/throttleByRaf2.js +5 -0
  329. package/utils/warning.js +5 -4
  330. package/NotificationBase.js +0 -53
  331. package/chunk/-zpSUpGE.js +0 -1501
  332. package/chunk/BAWsPQBM.js +0 -11
  333. package/chunk/BIT0j3HT.js +0 -269
  334. package/chunk/BbLKnaNO.js +0 -871
  335. package/chunk/Bfhv56O2.js +0 -638
  336. package/chunk/C2lIz2F9.js +0 -60
  337. package/chunk/C6QWSzsM.js +0 -376
  338. package/chunk/CVkHTbic.js +0 -995
  339. package/chunk/CeGEvXby.js +0 -278
  340. package/chunk/D3NFxdmG.js +0 -518
  341. package/chunk/DApXtulb.js +0 -1102
  342. package/chunk/DPByB1ab.js +0 -698
  343. package/chunk/DV1Ab_cG.js +0 -284
  344. package/chunk/dBnNCOIU.js +0 -778
  345. package/chunk/it8qlDZ3.js +0 -1032
  346. package/chunk/l0sNRNKZ.js +0 -1
  347. package/chunk/te_43YrB.js +0 -776
  348. package/hooks/use-verification-code.js +0 -73
  349. package/types/notification-base/index.d.ts +0 -15
  350. package/types/notification-base/style/index.d.ts +0 -2
  351. package/types/trigger/Portal.d.ts +0 -7
  352. package/types/utils/keyCode.d.ts +0 -45
  353. package/types/utils/raf.d.ts +0 -3
  354. package/types/utils/throttleByRafV2.d.ts +0 -5
  355. package/utils/keyCode.js +0 -12
  356. package/utils/raf.js +0 -19
  357. package/utils/throttleByRafV2.js +0 -16
@@ -1,10 +1,10 @@
1
- import { jsx as g } from "react/jsx-runtime";
2
- import { forwardRef as l, useContext as u, useRef as p, useCallback as d, useEffect as C } from "react";
3
- import { d as h } from "./-zpSUpGE.js";
4
- import { useWatermark as x } from "../hooks/use-watermark.js";
5
- import { useMergeProps as k } from "../hooks/useMergeProps.js";
6
- import { y } from "./BAWsPQBM.js";
7
- const w = {}, W = [
1
+ import { jsx as l } from "react/jsx-runtime";
2
+ import { forwardRef as g, useContext as u, useRef as p, useCallback as d, useEffect as C } from "react";
3
+ import { a as h } from "./BJQ5UNa-.js";
4
+ import { useWatermark as x } from "../hooks/useWatermark.js";
5
+ import { c as k } from "./B5gK1Idp.js";
6
+ import { m as w } from "./JPPo5nY_.js";
7
+ const y = {}, W = [
8
8
  "zIndex",
9
9
  "width",
10
10
  "height",
@@ -20,7 +20,7 @@ function N(c, O) {
20
20
  var f;
21
21
  const r = u(h), t = k(
22
22
  c,
23
- w,
23
+ y,
24
24
  (f = r.componentConfig) == null ? void 0 : f.Watermark
25
25
  ), n = p(), o = d(() => {
26
26
  var e;
@@ -47,10 +47,10 @@ function N(c, O) {
47
47
  o
48
48
  ]);
49
49
  const s = r.getPrefixCls("watermark");
50
- return t.children ? /* @__PURE__ */ g(
50
+ return t.children ? /* @__PURE__ */ l(
51
51
  "div",
52
52
  {
53
- className: y(`${s}`, t.className, {
53
+ className: w(`${s}`, t.className, {
54
54
  [`${s}-rtl`]: r.rtl
55
55
  }),
56
56
  style: t.style,
@@ -59,7 +59,7 @@ function N(c, O) {
59
59
  }
60
60
  ) : null;
61
61
  }
62
- const $ = l(N);
62
+ const $ = g(N);
63
63
  export {
64
64
  $ as W
65
65
  };
@@ -0,0 +1,6 @@
1
+ const e = window.matchMedia(
2
+ "(prefers-color-scheme: dark)"
3
+ );
4
+ export {
5
+ e
6
+ };
@@ -1,4 +1,4 @@
1
- const s = [
1
+ const o = [
2
2
  [
3
3
  "requestFullscreen",
4
4
  "exitFullscreen",
@@ -45,30 +45,30 @@ const s = [
45
45
  () => {
46
46
  if (typeof document > "u")
47
47
  return !1;
48
- const l = s[0], t = {};
49
- for (const n of s)
48
+ const l = o[0], t = {};
49
+ for (const n of o)
50
50
  if ((n == null ? void 0 : n[1]) in document) {
51
- for (const [c, o] of n.entries())
52
- t[l[c]] = o;
51
+ for (const [u, c] of n.entries())
52
+ t[l[u]] = c;
53
53
  return t;
54
54
  }
55
55
  return !1;
56
56
  },
57
57
  void 0,
58
58
  []
59
- ), i = {
59
+ ), f = {
60
60
  change: e == null ? void 0 : e.fullscreenchange,
61
61
  error: e == null ? void 0 : e.fullscreenerror
62
62
  };
63
63
  let r = {
64
64
  request(l = document.documentElement, t) {
65
- return new Promise((n, c) => {
66
- const o = () => {
67
- r.off("change", o), n();
65
+ return new Promise((n, u) => {
66
+ const c = () => {
67
+ r.off("change", c), n();
68
68
  };
69
- r.on("change", o);
70
- const u = l[e == null ? void 0 : e.requestFullscreen](t);
71
- u instanceof Promise && u.then(o).catch(c);
69
+ r.on("change", c);
70
+ const s = l[e == null ? void 0 : e.requestFullscreen](t);
71
+ s instanceof Promise && s.then(c).catch(u);
72
72
  });
73
73
  },
74
74
  exit() {
@@ -81,19 +81,19 @@ let r = {
81
81
  r.off("change", n), l();
82
82
  };
83
83
  r.on("change", n);
84
- const c = document[e == null ? void 0 : e.exitFullscreen]();
85
- c instanceof Promise && c.then(n).catch(t);
84
+ const u = document[e == null ? void 0 : e.exitFullscreen]();
85
+ u instanceof Promise && u.then(n).catch(t);
86
86
  });
87
87
  },
88
88
  toggle(l, t) {
89
89
  return r.isFullscreen ? r.exit() : r.request(l, t);
90
90
  },
91
91
  on(l, t) {
92
- const n = i[l];
92
+ const n = f[l];
93
93
  n && document.addEventListener(n, t, !1);
94
94
  },
95
95
  off(l, t) {
96
- const n = i[l];
96
+ const n = f[l];
97
97
  n && document.removeEventListener(n, t, !1);
98
98
  },
99
99
  raw: e
@@ -113,7 +113,7 @@ Object.defineProperties(r, {
113
113
  }
114
114
  });
115
115
  e || (r = { isEnabled: !1 });
116
- const f = r;
116
+ const i = r;
117
117
  export {
118
- f as d
118
+ i as d
119
119
  };
@@ -0,0 +1,56 @@
1
+ import { isValidElement as u } from "react";
2
+ import r from "react-dom";
3
+ import { isForwardRef as p, ForwardRef as i, Memo as c } from "react-is";
4
+ import "./CSC_V_25.js";
5
+ function F(t) {
6
+ return t == null;
7
+ }
8
+ function S(t, e) {
9
+ return t == null || t === !1 || typeof t == "string" && (e ? t.trim() === "" : t === "");
10
+ }
11
+ function g(t) {
12
+ return t || t === 0;
13
+ }
14
+ function j(t) {
15
+ return t === window;
16
+ }
17
+ function x(t) {
18
+ return isPlainObject(t) && "$y" in t && "$M" in t && "$D" in t && "$d" in t && "$H" in t && "$m" in t && "$s" in t;
19
+ }
20
+ const s = (t) => t && u(t) && typeof t.type == "function", m = (t) => {
21
+ var e;
22
+ return s(t) && !!((e = t.type.prototype) != null && e.isReactComponent);
23
+ }, $ = (t) => u(t) && typeof t.type == "string";
24
+ var f;
25
+ const E = Number((f = r.version) == null ? void 0 : f.split(".")[0]) > 17;
26
+ var l;
27
+ const d = Number((l = r.version) == null ? void 0 : l.split(".")[0]) > 18, b = (t) => {
28
+ if (!d)
29
+ return p(t);
30
+ const e = Symbol.for("react.element"), a = Symbol.for("react.transitional.element"), y = Symbol.for("react.forward_ref");
31
+ if (typeof t == "object" && t !== null) {
32
+ const n = t.$$typeof;
33
+ if (n === e || n === a) {
34
+ const o = t.type;
35
+ return (o && o.$$typeof) === y;
36
+ }
37
+ }
38
+ return !1;
39
+ }, M = (t) => {
40
+ var e;
41
+ return t ? $(t) || b(t) || p(t) || t.$$typeof === i ? !0 : t.$$typeof === c ? ((e = t.type) == null ? void 0 : e.$$typeof) === i : s(t) ? m(t) : !1 : !1;
42
+ };
43
+ export {
44
+ M as A,
45
+ $ as E,
46
+ g as F,
47
+ j as N,
48
+ x as P,
49
+ b as R,
50
+ F as _,
51
+ s as a,
52
+ m as d,
53
+ d as l,
54
+ S as w,
55
+ E as x
56
+ };
@@ -0,0 +1,9 @@
1
+ function n(r) {
2
+ let t = 0;
3
+ for (let e = 0; e < r.length; e++)
4
+ r.charCodeAt(e) > 127 || r.charCodeAt(e) === 94 ? t += 2 : t++;
5
+ return t;
6
+ }
7
+ export {
8
+ n as l
9
+ };
@@ -0,0 +1,16 @@
1
+ import { useState as d, useEffect as o } from "react";
2
+ const i = (e, t) => t !== void 0 ? t : window.matchMedia(e).matches, h = (e, t) => {
3
+ const [s, a] = d(i(e, t));
4
+ return o(() => {
5
+ let c = !0;
6
+ const n = window.matchMedia(e), r = () => {
7
+ c && a(!!n.matches);
8
+ };
9
+ return n.addEventListener("change", r), a(n.matches), () => {
10
+ c = !1, n.removeEventListener("change", r);
11
+ };
12
+ }, [e]), s;
13
+ };
14
+ export {
15
+ h as u
16
+ };
@@ -0,0 +1,20 @@
1
+ import { useSyncExternalStore as e, useDebugValue as t } from "react";
2
+ function i(n) {
3
+ return window.addEventListener("online", n), window.addEventListener("offline", n), () => {
4
+ window.removeEventListener("online", n), window.removeEventListener("offline", n);
5
+ };
6
+ }
7
+ function r() {
8
+ const n = e(
9
+ i,
10
+ // 只要传递的是同一个函数,React 不会重新订阅
11
+ () => navigator.onLine,
12
+ // 如何在客户端获取值
13
+ () => !0
14
+ // 如何在服务端获取值
15
+ );
16
+ return t(n ? "Online" : "Offline"), n;
17
+ }
18
+ export {
19
+ r
20
+ };
@@ -0,0 +1,11 @@
1
+ import { useState as s, useEffect as c } from "react";
2
+ function u(t, e) {
3
+ const [n, o] = s(t());
4
+ return c(() => {
5
+ const r = t();
6
+ o(r);
7
+ }, [e]), n;
8
+ }
9
+ export {
10
+ u as r
11
+ };
@@ -0,0 +1,17 @@
1
+ import { useCallback as w } from "react";
2
+ import { e as k, r as f, y as i, n as A, d as m } from "./BrOW642m.js";
3
+ function d(r) {
4
+ return w(
5
+ (l) => ({
6
+ onKeyDown(o) {
7
+ var u, t, y, a, c, e;
8
+ const n = o.key;
9
+ n === k.key && ((u = l.onPressEnter) == null || u.call(l, o)), n === f.key && ((t = l.onArrowDown) == null || t.call(l, o)), n === i.key && ((y = l.onArrowLeft) == null || y.call(l, o)), n === A.key && ((a = l.onArrowRight) == null || a.call(l, o)), n === m.key && ((c = l.onArrowUp) == null || c.call(l, o)), (e = r == null ? void 0 : r.onKeyDown) == null || e.call(r, o);
10
+ }
11
+ }),
12
+ []
13
+ );
14
+ }
15
+ export {
16
+ d as h
17
+ };
@@ -0,0 +1,17 @@
1
+ function c(t, r) {
2
+ const n = {};
3
+ return r.forEach((e) => {
4
+ const a = e;
5
+ e in t && (n[a] = t[a]);
6
+ }), n;
7
+ }
8
+ function f(t) {
9
+ const r = {};
10
+ return Object.entries(t ?? {}).forEach(([n, e], a, o) => {
11
+ n.indexOf("data-") === 0 && (r[n] = e), n.indexOf("aria-") === 0 && (r[n] = e);
12
+ }), r;
13
+ }
14
+ export {
15
+ c as f,
16
+ f as r
17
+ };
@@ -0,0 +1,384 @@
1
+ import { jsx as i, jsxs as A, Fragment as Be } from "react/jsx-runtime";
2
+ import Ge from "@unicom-cloud/icons/IconUiClose";
3
+ import { N as be, _ as Ke } from "./DC1iHEiy.js";
4
+ import Te from "lodash/isArray";
5
+ import Ce, { useContext as Xe, useRef as C, useState as Ye, useImperativeHandle as qe, useMemo as Je, useEffect as Qe } from "react";
6
+ import { a as Ze, I as et } from "./BJQ5UNa-.js";
7
+ import tt from "../Draggable.js";
8
+ import { c as ot } from "./B5gK1Idp.js";
9
+ import { R as ye } from "./HDUQku8d.js";
10
+ import { I as nt } from "./Dz5BdmXo.js";
11
+ import at from "../OverflowEllipsis.js";
12
+ import rt from "../Popover.js";
13
+ import st from "../Tag.js";
14
+ import { m as S } from "./JPPo5nY_.js";
15
+ import { l as lt } from "./DGTIZ_0O.js";
16
+ import { n as ct } from "./DnrZEnQ_.js";
17
+ import "./CkNSv2U7.js";
18
+ import { t as it } from "./BrOW642m.js";
19
+ import { c as ut } from "./BdUcgWdu.js";
20
+ import Ve from "lodash/isPlainObject.js";
21
+ const Y = 300, pt = "responsive", ft = `__input_${Math.random().toFixed(10).slice(2)}`, T = (s) => s == null, E = (s) => {
22
+ s.target.tagName !== "INPUT" && s.preventDefault();
23
+ }, Ne = (s) => Te(s) ? s.map((c) => Ve(c) ? {
24
+ ...c,
25
+ label: "label" in c ? c.label : c.value,
26
+ value: c.value,
27
+ closable: c.closable
28
+ } : {
29
+ label: c,
30
+ value: c
31
+ }) : [], dt = (s) => {
32
+ const c = C(0), d = C(s.length);
33
+ return Qe(() => {
34
+ c.current = s.length === 0 && d.current > 0 ? Y : 0, d.current = s.length;
35
+ }, [s]), c;
36
+ }, $e = ({
37
+ prefixCls: s,
38
+ children: c,
39
+ animation: d
40
+ }) => /* @__PURE__ */ i("div", { className: `${s}-inner`, children: d ? /* @__PURE__ */ i(Ke, { component: null, children: c }) : c }), mt = {
41
+ animation: !0,
42
+ validate: (s, c) => s && c.every((d) => d.value !== s)
43
+ };
44
+ function gt(s, c) {
45
+ const {
46
+ getPrefixCls: d,
47
+ size: we,
48
+ componentConfig: M,
49
+ rtl: q
50
+ } = Xe(Ze), f = ot(
51
+ s,
52
+ mt,
53
+ M == null ? void 0 : M.InputTag
54
+ ), {
55
+ className: Re,
56
+ style: De,
57
+ placeholder: Pe,
58
+ error: _e,
59
+ disabled: v,
60
+ readOnly: g,
61
+ allowClear: Ae,
62
+ autoFocus: Se,
63
+ labelInValue: Ee,
64
+ disableInput: Me,
65
+ animation: J,
66
+ saveOnBlur: xe,
67
+ dragToSort: ze,
68
+ icon: I,
69
+ prefix: Q,
70
+ suffix: Z,
71
+ addBefore: ee,
72
+ addAfter: te,
73
+ tokenSeparators: x,
74
+ validate: V,
75
+ renderTag: oe,
76
+ tagClassName: ne,
77
+ maxTagCount: m,
78
+ onInputChange: z,
79
+ onKeyDown: k,
80
+ onPaste: O,
81
+ onChange: F,
82
+ onFocus: j,
83
+ onBlur: W,
84
+ onPressEnter: L,
85
+ onRemove: H,
86
+ onClear: U,
87
+ onClick: ae,
88
+ ...ke
89
+ } = f, o = d("input-tag"), w = "size" in f ? f.size : we, b = typeof m == "object" ? m.count : m, y = C(), B = C(null), G = C(), [R, re] = Ye(!1), [n, Oe] = ye([], {
90
+ defaultValue: "defaultValue" in f ? Ne(f.defaultValue) : void 0,
91
+ value: "value" in f ? Ne(f.value) : void 0
92
+ }), [N, D] = ye("", {
93
+ value: f.inputValue
94
+ }), Fe = dt(n), je = !!(ze && !g && !v);
95
+ qe(c, () => {
96
+ var e, t;
97
+ return {
98
+ blur: (e = y.current) == null ? void 0 : e.blur,
99
+ focus: (t = y.current) == null ? void 0 : t.focus,
100
+ getRootDOMNode: () => G.current
101
+ };
102
+ }, []);
103
+ const $ = (e, t) => {
104
+ v || g || ("value" in f || Oe(e), F == null || F(Ee ? e : e.map((a) => a == null ? void 0 : a.value), t));
105
+ }, se = (e, t, a) => {
106
+ H == null || H(e, t, a), $(
107
+ [...n.slice(0, t), ...n.slice(t + 1)],
108
+ "remove"
109
+ );
110
+ }, We = ct(
111
+ /* @__PURE__ */ new Map([
112
+ [
113
+ it.key,
114
+ (e) => {
115
+ if (!e.target.value && n.length)
116
+ for (let t = n.length - 1; t >= 0; t--) {
117
+ const a = n[t];
118
+ if (a.closable !== !1) {
119
+ se(a, t, e);
120
+ return;
121
+ }
122
+ }
123
+ }
124
+ ]
125
+ ])
126
+ ), le = async () => {
127
+ try {
128
+ const e = typeof V == "function" ? await V(N, n) : !0;
129
+ e && ($(
130
+ n.concat({
131
+ value: e === !0 ? N : e,
132
+ label: N
133
+ }),
134
+ "add"
135
+ ), D(""));
136
+ } catch (e) {
137
+ console.error(e);
138
+ }
139
+ }, ce = (e, t, a = !1) => {
140
+ const r = e.value;
141
+ let l = e.label, u = !g && !v && e.closable !== !1;
142
+ const p = typeof r == "object" ? t : r, h = (Ue) => {
143
+ se(e, t, Ue);
144
+ };
145
+ if (!a && typeof b == "number" && t >= b)
146
+ return t === n.length - 1 ? (l = ie(n.length - Number(b)), u = !1, { valueKey: p, dom: l }) : { valueKey: p, dom: null };
147
+ if (oe)
148
+ return {
149
+ valueKey: p,
150
+ dom: oe(
151
+ {
152
+ value: r,
153
+ label: l,
154
+ closable: u,
155
+ onClose: h
156
+ },
157
+ t,
158
+ n
159
+ )
160
+ };
161
+ const He = {
162
+ closable: u,
163
+ onClose: h,
164
+ visible: !0,
165
+ children: lt(l),
166
+ closeIcon: I == null ? void 0 : I.removeIcon,
167
+ __closeIconProps: {
168
+ onMouseDown: E
169
+ },
170
+ className: S(`${o}-tag`, {
171
+ [ne]: ne
172
+ }),
173
+ title: typeof l == "string" ? l : void 0
174
+ };
175
+ return { valueKey: p, dom: /* @__PURE__ */ i(st, { ...He }, `${p}-tag`) };
176
+ };
177
+ function ie(e) {
178
+ const t = typeof m == "object" && m.render ? m.render : () => /* @__PURE__ */ A("span", { className: `${o}-tag-ellipsis`, children: [
179
+ "+",
180
+ e
181
+ ] }), a = Ve(m) && m.popoverProps;
182
+ return /* @__PURE__ */ i(
183
+ rt,
184
+ {
185
+ content: /* @__PURE__ */ i(Be, { children: n.map((r, l) => ({ tagValue: r, tagIndex: l })).slice(-e).map(
186
+ ({ tagValue: r, tagIndex: l }) => {
187
+ var u;
188
+ return (u = ce(r, l, !0)) == null ? void 0 : u.dom;
189
+ }
190
+ ) }),
191
+ ...a || {},
192
+ children: t(e, n)
193
+ }
194
+ );
195
+ }
196
+ const ue = async (e) => {
197
+ if (B.current = null, Te(x) && x.length) {
198
+ const t = e.split(
199
+ new RegExp(`[${x.join("")}]`)
200
+ );
201
+ if (t.length > 1) {
202
+ B.current = Date.now();
203
+ const a = [];
204
+ await Promise.all(
205
+ t.map(async (r) => {
206
+ const l = r ? typeof V == "function" ? await V(r, n) : !0 : !1;
207
+ l && a.push({
208
+ value: l === !0 ? r : l,
209
+ label: r
210
+ });
211
+ })
212
+ ), a.length && $(n.concat(a), "add");
213
+ }
214
+ }
215
+ }, pe = Ae && !v && !g && n.length ? /* @__PURE__ */ i(
216
+ et,
217
+ {
218
+ size: w,
219
+ className: `${o}-clear-icon`,
220
+ onClick: (e) => {
221
+ var t;
222
+ e.stopPropagation(), $([], "clear"), R || (t = y.current) == null || t.focus(), U == null || U();
223
+ },
224
+ children: I && I.clearIcon || /* @__PURE__ */ i(Ge, {})
225
+ },
226
+ "clearIcon"
227
+ ) : null, fe = v || Me, K = Je(() => {
228
+ const e = {};
229
+ return n.map((a, r) => {
230
+ const l = e[a.value] || 0, u = l >= 1;
231
+ e[a.value] = l + 1;
232
+ const { dom: p, valueKey: h } = ce(a, r);
233
+ return Ce.isValidElement(p) ? /* @__PURE__ */ i(
234
+ be,
235
+ {
236
+ timeout: Y,
237
+ classNames: "zoomIn",
238
+ children: p
239
+ },
240
+ u ? `${h}-${r}` : h
241
+ ) : p;
242
+ });
243
+ }, [n]), X = [
244
+ /* @__PURE__ */ i(
245
+ be,
246
+ {
247
+ timeout: Y,
248
+ classNames: "zoomIn",
249
+ children: /* @__PURE__ */ i(
250
+ nt,
251
+ {
252
+ autoComplete: "off",
253
+ size: w,
254
+ disabled: fe,
255
+ readOnly: g,
256
+ ref: y,
257
+ autoFocus: Se,
258
+ placeholder: n.length ? "" : Pe,
259
+ prefixCls: `${o}-input`,
260
+ autoFitWidth: {
261
+ delay: () => Fe.current,
262
+ pure: !0
263
+ },
264
+ onPressEnter: async (e) => {
265
+ N && e.preventDefault(), L == null || L(e), await le();
266
+ },
267
+ onFocus: (e) => {
268
+ !fe && !g && (re(!0), j == null || j(e));
269
+ },
270
+ onBlur: async (e) => {
271
+ re(!1), W == null || W(e), xe && await le(), D("");
272
+ },
273
+ value: N,
274
+ onChange: (e, t) => {
275
+ z == null || z(e, t), t.nativeEvent.inputType !== "insertFromPaste" && ue(e), B.current ? D("") : D(e);
276
+ },
277
+ onKeyDown: (e) => {
278
+ We(e), k == null || k(e);
279
+ },
280
+ onPaste: (e) => {
281
+ O == null || O(e), ue(e.clipboardData.getData("text"));
282
+ }
283
+ }
284
+ )
285
+ },
286
+ ft
287
+ )
288
+ ], Le = !T(Q), de = !T(Z) || !T(pe), me = !T(ee), ge = !T(te), P = me || ge, he = f.status || (_e ? "error" : void 0), ve = S(o, {
289
+ [`${o}-size-${w}`]: w,
290
+ [`${o}-disabled`]: v,
291
+ [`${o}-${he}`]: he,
292
+ [`${o}-focus`]: R,
293
+ [`${o}-readonly`]: g,
294
+ [`${o}-has-suffix`]: de,
295
+ [`${o}-has-placeholder`]: !n.length,
296
+ [`${o}-rtl`]: q
297
+ }), _ = { style: De, className: Re }, Ie = /* @__PURE__ */ i(
298
+ "div",
299
+ {
300
+ ...ut(ke, ["status", "size", "defaultValue", "value", "inputValue"]),
301
+ ...P ? {} : _,
302
+ className: P ? ve : S(ve, _.className),
303
+ onMouseDown: (e) => {
304
+ R && E(e);
305
+ },
306
+ onClick: (e) => {
307
+ var t;
308
+ !R && ((t = y.current) == null || t.focus()), ae && ae(e);
309
+ },
310
+ ref: P ? void 0 : G,
311
+ children: /* @__PURE__ */ A("div", { className: `${o}-view`, children: [
312
+ Le && /* @__PURE__ */ i("div", { className: `${o}-prefix`, onMouseDown: E, children: Q }),
313
+ je ? /* @__PURE__ */ i(
314
+ $e,
315
+ {
316
+ prefixCls: o,
317
+ animation: J,
318
+ children: /* @__PURE__ */ i(
319
+ tt,
320
+ {
321
+ itemWrapperStyle: { display: "inline-block" },
322
+ direction: "horizontal",
323
+ onIndexChange: (e, t) => {
324
+ $(function(r, l, u) {
325
+ r = r.slice();
326
+ const p = l > u, [h] = r.splice(l, 1);
327
+ return r.splice(p ? u : u - 1, 0, h), r;
328
+ }(n, t, e), "sort");
329
+ },
330
+ children: K.concat(X)
331
+ }
332
+ )
333
+ },
334
+ "transitionGroupWithDrag"
335
+ ) : /* @__PURE__ */ i(
336
+ $e,
337
+ {
338
+ prefixCls: o,
339
+ animation: J,
340
+ children: b === pt ? /* @__PURE__ */ i(
341
+ at,
342
+ {
343
+ items: K,
344
+ suffixItems: X,
345
+ ellipsisNode: ({ ellipsisCount: e }) => ie(e)
346
+ }
347
+ ) : K.concat(X)
348
+ },
349
+ `max_tag_group_${b}`
350
+ ),
351
+ de && /* @__PURE__ */ A("div", { className: `${o}-suffix`, onMouseDown: E, children: [
352
+ pe,
353
+ Z
354
+ ] })
355
+ ] })
356
+ }
357
+ );
358
+ return P ? /* @__PURE__ */ A(
359
+ "div",
360
+ {
361
+ ..._,
362
+ className: S(
363
+ `${o}-wrapper`,
364
+ {
365
+ [`${o}-wrapper-rtl`]: q
366
+ },
367
+ _.className
368
+ ),
369
+ ref: G,
370
+ children: [
371
+ me && /* @__PURE__ */ i("div", { className: `${o}-addbefore`, children: ee }),
372
+ Ie,
373
+ ge && /* @__PURE__ */ i("div", { className: `${o}-addafter`, children: te })
374
+ ]
375
+ }
376
+ ) : Ie;
377
+ }
378
+ const ht = Ce.forwardRef(
379
+ gt
380
+ );
381
+ ht.displayName = "InputTag";
382
+ export {
383
+ ht as I
384
+ };