@unicom-cloud/ui 0.8.66 → 0.8.68

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 (708) hide show
  1. package/Affix.js +15 -124
  2. package/Alert.js +13 -110
  3. package/Anchor.js +2 -2
  4. package/AutoComplete.js +15 -146
  5. package/Avatar.js +4 -154
  6. package/BackTop.js +14 -83
  7. package/Badge.js +12 -176
  8. package/Breadcrumb.js +12 -138
  9. package/Button.js +12 -149
  10. package/Calendar.js +12 -569
  11. package/Card.js +10 -136
  12. package/Carousel.js +13 -380
  13. package/Cascader.js +2 -2
  14. package/Checkbox.js +2 -2
  15. package/Collapse.js +2 -2
  16. package/ColorPicker.js +14 -582
  17. package/Comment.js +10 -71
  18. package/ConfigProvider.js +5 -6
  19. package/Copy.js +12 -60
  20. package/DatePicker.js +11 -2042
  21. package/Descriptions.js +11 -176
  22. package/Divider.js +7 -38
  23. package/Draggable.js +7 -89
  24. package/Drawer.js +2 -2
  25. package/Dropdown.js +15 -199
  26. package/Empty.js +3 -3
  27. package/Form.js +16 -1416
  28. package/Grid.js +9 -252
  29. package/Icon.js +7 -55
  30. package/IconHover.js +2 -2
  31. package/Image.js +6 -5
  32. package/Input.js +11 -10
  33. package/InputNumber.js +9 -7
  34. package/InputTag.js +2 -2
  35. package/Layout.js +16 -56
  36. package/Link.js +9 -60
  37. package/List.js +18 -312
  38. package/Loading.js +4 -59
  39. package/Mentions.js +12 -163
  40. package/Menu.js +8 -7
  41. package/Message.js +9 -7
  42. package/Modal.js +2 -2
  43. package/Notice.js +13 -3
  44. package/Notification.js +10 -7
  45. package/OverflowEllipsis.js +8 -96
  46. package/PageHeader.js +13 -113
  47. package/Pagination.js +2 -2
  48. package/Picker.js +4 -3
  49. package/Popconfirm.js +13 -128
  50. package/Popover.js +10 -76
  51. package/Portal.js +5 -33
  52. package/Progress.js +11 -363
  53. package/Radio.js +5 -6
  54. package/Rate.js +14 -125
  55. package/ResizeBox.js +16 -555
  56. package/Result.js +14 -1434
  57. package/Select.js +4 -3
  58. package/SelectView.js +9 -406
  59. package/Skeleton.js +11 -94
  60. package/Slider.js +21 -773
  61. package/Space.js +11 -94
  62. package/SpeechSynthesis.js +48 -57
  63. package/Spin.js +11 -94
  64. package/Statistic.js +15 -192
  65. package/Steps.js +11 -148
  66. package/SuspenseFallbackTest.js +3 -10
  67. package/Switch.js +13 -114
  68. package/Table.js +16 -2032
  69. package/Tabs.js +4 -4
  70. package/Tag.js +13 -134
  71. package/TimePicker.js +7 -274
  72. package/Timeline.js +4 -4
  73. package/Tooltip.js +12 -136
  74. package/Transfer.js +14 -449
  75. package/Tree.js +4 -2
  76. package/TreeSelect.js +3 -4
  77. package/Trigger.js +21 -882
  78. package/Typography.js +10 -6
  79. package/Upload.js +4 -4
  80. package/VerificationCode.js +2 -2
  81. package/VirtualList.js +2 -2
  82. package/Watermark.js +2 -2
  83. package/affix/index.js +126 -0
  84. package/alert/index.js +112 -0
  85. package/alert/interface.js +1 -0
  86. package/anchor/Anchor.js +198 -0
  87. package/anchor/Link.js +52 -0
  88. package/anchor/context.js +14 -0
  89. package/anchor/index.js +4 -0
  90. package/anchor/interface.js +1 -0
  91. package/anchor/util.js +50 -0
  92. package/auto-complete/index.js +149 -0
  93. package/auto-complete/interface.js +1 -0
  94. package/avatar/Avatar.js +83 -0
  95. package/avatar/Group.js +82 -0
  96. package/avatar/context.js +5 -0
  97. package/avatar/index.js +7 -0
  98. package/avatar/interface.js +1 -0
  99. package/back-top/index.js +85 -0
  100. package/back-top/interface.js +1 -0
  101. package/badge/Count.js +35 -0
  102. package/badge/index.js +151 -0
  103. package/badge/interface.js +1 -0
  104. package/breadcrumb/Item.js +67 -0
  105. package/breadcrumb/index.js +81 -0
  106. package/breadcrumb/interface.js +1 -0
  107. package/button/Group.js +13 -0
  108. package/button/index.js +146 -0
  109. package/button/interface.js +1 -0
  110. package/calendar/Month.js +12 -0
  111. package/calendar/WeekList.js +24 -0
  112. package/calendar/Year.js +74 -0
  113. package/calendar/index.js +320 -0
  114. package/calendar/interface.js +1 -0
  115. package/card/Grid.js +25 -0
  116. package/card/Meta.js +30 -0
  117. package/card/index.js +99 -0
  118. package/card/interface.js +1 -0
  119. package/carousel/Arrow.js +55 -0
  120. package/carousel/Indicator.js +66 -0
  121. package/carousel/index.js +278 -0
  122. package/carousel/interface.js +1 -0
  123. package/cascader/Cascader.js +26 -0
  124. package/cascader/index.js +4 -0
  125. package/cascader/interface.js +1 -0
  126. package/cascader/util.js +14 -0
  127. package/checkbox/Checkbox.js +16 -0
  128. package/checkbox/Group.js +14 -0
  129. package/checkbox/IconCheck.js +19 -0
  130. package/checkbox/index.js +4 -0
  131. package/checkbox/interface.js +1 -0
  132. package/checkbox/useCheckbox.js +45 -0
  133. package/chunk/5_U1CBIu.js +8 -0
  134. package/chunk/{B8QV6E2b.js → AwZqeapI.js} +5 -5
  135. package/chunk/B2yFlXke.js +6 -0
  136. package/chunk/B4JiMp8I.js +764 -0
  137. package/chunk/B4YRLi8r.js +11 -0
  138. package/chunk/B5RFT17G.js +15 -0
  139. package/chunk/{BnSVm1YC.js → B6X4lnd0.js} +1 -1
  140. package/chunk/B7M-FGia.js +41 -0
  141. package/chunk/BBkdXHrJ.js +24 -0
  142. package/chunk/BDB0LByj.js +98 -0
  143. package/chunk/BFTV6myl.js +19 -0
  144. package/chunk/BJ1soa2K.js +178 -0
  145. package/chunk/BKKEev13.js +11 -0
  146. package/chunk/BKT9BFf4.js +11 -0
  147. package/chunk/BSCrLtfQ.js +10 -0
  148. package/chunk/{CPvvjMwZ.js → BSaQv6mx.js} +46 -43
  149. package/chunk/BXAeh0_V.js +16 -0
  150. package/chunk/Bfq4YEcr.js +23 -0
  151. package/chunk/Bg3uJGPu.js +10 -0
  152. package/chunk/{jhQQCFMn.js → Bi4UkwOR.js} +138 -126
  153. package/chunk/BibHFOCF.js +34 -0
  154. package/chunk/Biupwn8l.js +24 -0
  155. package/chunk/BjpUSKM3.js +629 -0
  156. package/chunk/{D_-UD4vO.js → Bl7BnD1R.js} +9 -9
  157. package/chunk/BrOW642m.js +130 -0
  158. package/chunk/BsY85n3_.js +14 -0
  159. package/chunk/C48SmsN-.js +38 -0
  160. package/chunk/C4OrxKE6.js +18 -0
  161. package/chunk/C98ks5S8.js +473 -0
  162. package/chunk/CC---6jO.js +110 -0
  163. package/chunk/{DUeHQKtx.js → CCv-5KFt.js} +78 -78
  164. package/chunk/{CZOP_ZHJ.js → CD3AUpzo.js} +24 -24
  165. package/chunk/CIRG541s.js +22 -0
  166. package/chunk/CKyu68pu.js +312 -0
  167. package/chunk/CQ_WOOmf.js +8 -0
  168. package/chunk/{CANaGbGR.js → CVYWxu00.js} +54 -53
  169. package/chunk/CYhxqVkn.js +9 -0
  170. package/chunk/CbLaCJmG.js +26 -0
  171. package/chunk/CdaT1b_F.js +20 -0
  172. package/chunk/Ce1j9KTi.js +6 -0
  173. package/chunk/CftuXmo_.js +6 -0
  174. package/chunk/CgurXnoy.js +569 -0
  175. package/chunk/Clo26EcR.js +34 -0
  176. package/chunk/ClqoGc3r.js +17 -0
  177. package/chunk/CmZzBtA4.js +16 -0
  178. package/chunk/CpGBWmuz.js +1461 -0
  179. package/chunk/CzQObzKd.js +1817 -0
  180. package/chunk/D-TPB2Do.js +56 -0
  181. package/chunk/D090jlwP.js +38 -0
  182. package/chunk/D0ZWT7db.js +5 -0
  183. package/chunk/DH7HTOV_.js +11 -0
  184. package/chunk/DKHXj8Kf.js +9 -0
  185. package/chunk/Dh7Osrvr.js +27 -0
  186. package/chunk/DonYzv30.js +14 -0
  187. package/chunk/DpoumMDw.js +50 -0
  188. package/chunk/Duezix3m.js +25 -0
  189. package/chunk/DxVvggX2.js +11 -0
  190. package/chunk/DzVH9IBy.js +1413 -0
  191. package/chunk/{CwhPMMWy.js → Ey4YJCkX.js} +7 -7
  192. package/chunk/JPPo5nY_.js +9 -0
  193. package/chunk/SSK90wgo.js +209 -0
  194. package/chunk/{CSC_V_25.js → URXCKjXr.js} +8 -8
  195. package/chunk/VSe_Wq1g.js +10 -0
  196. package/chunk/XTEsYGuF.js +17 -0
  197. package/chunk/b1e8awfs.js +31 -0
  198. package/chunk/hEWZQ8Zi.js +16 -0
  199. package/chunk/k-OUstoD.js +58 -0
  200. package/chunk/ll867Bf3.js +730 -0
  201. package/chunk/oopARUrq.js +10 -0
  202. package/chunk/tamGhTJp.js +186 -0
  203. package/chunk/{4-gvEY5y.js → uKZyjtff.js} +28 -28
  204. package/chunk/vmgkWLYf.js +843 -0
  205. package/chunk/yl4BU7Sd.js +1068 -0
  206. package/chunk/zmmqLCF4.js +20 -0
  207. package/collapse/Collapse.js +15 -0
  208. package/collapse/Item.js +11 -0
  209. package/collapse/index.js +4 -0
  210. package/collapse/interface.js +1 -0
  211. package/color-picker/ControlBar.js +63 -0
  212. package/color-picker/InputAlpha.js +22 -0
  213. package/color-picker/InputHex.js +55 -0
  214. package/color-picker/InputRgb.js +61 -0
  215. package/color-picker/Mode.js +10 -0
  216. package/color-picker/Palette.js +34 -0
  217. package/color-picker/Panel.js +268 -0
  218. package/color-picker/colors.js +37 -0
  219. package/color-picker/index.js +270 -0
  220. package/color-picker/interface.js +4 -0
  221. package/color-picker/utils.js +89 -0
  222. package/comment/index.js +73 -0
  223. package/comment/interface.js +1 -0
  224. package/config-provider/ConfigProvider.js +15 -0
  225. package/config-provider/context.js +8 -0
  226. package/config-provider/index.js +8 -0
  227. package/config-provider/interface.js +1 -0
  228. package/copy/index.js +63 -0
  229. package/copy/interface.js +1 -0
  230. package/date-picker/Picker.js +410 -0
  231. package/date-picker/PickerRange.js +24 -0
  232. package/date-picker/context.js +5 -0
  233. package/date-picker/index.js +50 -0
  234. package/date-picker/interface.js +1 -0
  235. package/date-picker/util.js +76 -0
  236. package/descriptions/index.js +178 -0
  237. package/descriptions/interface.js +1 -0
  238. package/divider/index.js +40 -0
  239. package/divider/interface.js +1 -0
  240. package/draggable/Item.js +67 -0
  241. package/draggable/index.js +32 -0
  242. package/draggable/interface.js +1 -0
  243. package/{chunk/BFipyA67.js → drawer/Drawer.js} +39 -39
  244. package/drawer/index.js +4 -0
  245. package/drawer/interface.js +1 -0
  246. package/dropdown/Button.js +11 -0
  247. package/dropdown/index.js +201 -0
  248. package/dropdown/interface.js +1 -0
  249. package/empty/index.js +9 -0
  250. package/empty/interface.js +1 -0
  251. package/form/Control.js +262 -0
  252. package/form/Form.js +160 -0
  253. package/form/FormItem.js +239 -0
  254. package/form/FormLabel.js +54 -0
  255. package/form/FormList.js +100 -0
  256. package/form/FormProvider.js +48 -0
  257. package/form/IconSymbol.js +20 -0
  258. package/form/context.js +43 -0
  259. package/form/index.js +107 -0
  260. package/form/interface.js +11 -0
  261. package/form/promisify.js +32 -0
  262. package/form/store.js +360 -0
  263. package/form/useForm.js +53 -0
  264. package/form/util.js +75 -0
  265. package/grid/Col.js +85 -0
  266. package/grid/Row.js +86 -0
  267. package/grid/context.js +9 -0
  268. package/grid/grid-item.js +75 -0
  269. package/grid/grid.js +103 -0
  270. package/grid/index.js +15 -0
  271. package/grid/interface.js +1 -0
  272. package/grid/util.js +51 -0
  273. package/hooks/index.js +51 -47
  274. package/hooks/useComputedState.js +2 -10
  275. package/hooks/useCreate.js +2 -7
  276. package/hooks/useForceUpdate.js +2 -7
  277. package/hooks/useId.js +2 -10
  278. package/hooks/useInView.js +2 -30
  279. package/hooks/useIntersectionObserver.js +2 -23
  280. package/hooks/useInterval.js +2 -17
  281. package/hooks/useIsFirstRender.js +2 -9
  282. package/hooks/useIsomorphicLayoutEffect.js +2 -5
  283. package/hooks/useKeyboardEvent.js +2 -16
  284. package/hooks/useMedia.js +2 -15
  285. package/hooks/useMergeProps.js +2 -18
  286. package/hooks/useMergeValue.js +2 -19
  287. package/hooks/useOnlineStatus.js +4 -0
  288. package/hooks/useOverflowHidden.js +2 -25
  289. package/hooks/useOverrideRef.js +2 -13
  290. package/hooks/usePersistCallback.js +2 -13
  291. package/hooks/usePrefersColorSchemeDark.js +4 -0
  292. package/hooks/usePrevious.js +2 -9
  293. package/hooks/useRefs.js +2 -9
  294. package/hooks/useResizeObserver.js +2 -15
  295. package/hooks/useStateCallback.js +2 -15
  296. package/hooks/useStateWithPromise.js +2 -24
  297. package/hooks/useUpdateEffect.js +2 -9
  298. package/hooks/useVerificationCode.js +73 -0
  299. package/hooks/useWatch.js +2 -10
  300. package/hooks/{use-watermark.js → useWatermark.js} +2 -1
  301. package/hooks/useWindowSize.js +2 -20
  302. package/icon/addFromIconFontCn.js +7 -0
  303. package/icon/index.js +57 -0
  304. package/icon-hover/index.js +7 -0
  305. package/image/Image.js +191 -0
  306. package/image/ImageFooter.js +8 -0
  307. package/image/ImagePreview.js +41 -0
  308. package/image/ImagePreviewArrow.js +46 -0
  309. package/image/ImagePreviewGroup.js +125 -0
  310. package/image/ImagePreviewToolbar.js +99 -0
  311. package/image/TriggerForToolbar.js +10 -0
  312. package/image/index.js +8 -0
  313. package/image/interface.js +1 -0
  314. package/image/previewGroupContext.js +17 -0
  315. package/index.js +604 -585
  316. package/input/Group.js +18 -0
  317. package/input/Input.js +688 -0
  318. package/input/InputElement.js +235 -0
  319. package/input/Number.js +4 -0
  320. package/input/Password.js +13 -0
  321. package/input/Search.js +14 -0
  322. package/input/Tag.js +4 -0
  323. package/input/Textarea.js +16 -0
  324. package/input/autoSizeTextAreaHeight.js +65 -0
  325. package/input/index.js +15 -0
  326. package/input/interface.js +1 -0
  327. package/input/useComposition.js +39 -0
  328. package/input-number/decimal.js +154 -0
  329. package/input-number/index.js +18 -0
  330. package/input-number/interface.js +1 -0
  331. package/input-number/useSelectionRange.js +26 -0
  332. package/input-number/util.js +57 -0
  333. package/{chunk/C6QWSzsM.js → input-tag/InputTag.js} +97 -89
  334. package/input-tag/index.js +4 -0
  335. package/input-tag/interface.js +1 -0
  336. package/layout/Content.js +13 -0
  337. package/layout/Footer.js +13 -0
  338. package/layout/Header.js +13 -0
  339. package/{chunk/CssIjN1g.js → layout/Sider.js} +12 -12
  340. package/layout/index.js +43 -0
  341. package/layout/interface.js +1 -0
  342. package/link/index.js +62 -0
  343. package/link/interface.js +1 -0
  344. package/list/Item.js +44 -0
  345. package/list/Meta.js +19 -0
  346. package/list/index.js +269 -0
  347. package/list/interface.js +1 -0
  348. package/loading/index.js +61 -0
  349. package/locale/en-US.js +4 -2
  350. package/locale/interface.js +1 -4
  351. package/locale/ja-JP.js +3 -1
  352. package/locale/tr-TR.js +1 -1
  353. package/locale/zh-CN.js +3 -1
  354. package/locale/zh-HK.js +3 -1
  355. package/locale/zh-TW.js +3 -1
  356. package/mentions/index.js +146 -0
  357. package/mentions/interface.js +1 -0
  358. package/mentions/util.js +26 -0
  359. package/menu/Indent.js +17 -0
  360. package/menu/Item.js +125 -0
  361. package/menu/ItemGroup.js +39 -0
  362. package/menu/Menu.js +26 -0
  363. package/menu/OverflowWrap.js +10 -0
  364. package/menu/context.js +5 -0
  365. package/menu/index.js +11 -0
  366. package/menu/interface.js +1 -0
  367. package/menu/util.js +80 -0
  368. package/message/index.js +14 -0
  369. package/message/interface.js +1 -0
  370. package/message/useMessage.js +7 -0
  371. package/modal/Confirm.js +13 -0
  372. package/modal/Modal.js +21 -0
  373. package/modal/config.js +25 -0
  374. package/modal/index.js +4 -0
  375. package/modal/interface.js +1 -0
  376. package/notice/index.js +24 -0
  377. package/notification/index.js +16 -0
  378. package/notification/interface.js +1 -0
  379. package/notification/useNotification.js +6 -0
  380. package/notification/withNotification.js +49 -0
  381. package/overflow-ellipsis/OverflowItem.js +35 -0
  382. package/overflow-ellipsis/index.js +74 -0
  383. package/package.json +1 -1
  384. package/page-header/index.js +115 -0
  385. package/page-header/interface.js +1 -0
  386. package/pagination/PageItem.js +119 -0
  387. package/pagination/PageJumper.js +60 -0
  388. package/pagination/PageOption.js +47 -0
  389. package/pagination/Pagination.js +245 -0
  390. package/pagination/index.js +4 -0
  391. package/pagination/interface.js +1 -0
  392. package/picker/Input.js +130 -0
  393. package/picker/InputRange.js +158 -0
  394. package/picker/index.js +6 -0
  395. package/popconfirm/index.js +130 -0
  396. package/popconfirm/interface.js +1 -0
  397. package/popover/index.js +78 -0
  398. package/popover/interface.js +1 -0
  399. package/portal/Portal.js +15 -0
  400. package/portal/index.js +17 -0
  401. package/progress/CircleProgress.js +117 -0
  402. package/progress/LineProgess.js +103 -0
  403. package/progress/StepProgress.js +74 -0
  404. package/progress/index.js +99 -0
  405. package/progress/interface.js +1 -0
  406. package/radio/Group.js +16 -0
  407. package/radio/Radio.js +15 -0
  408. package/radio/index.js +8 -0
  409. package/radio/interface.js +1 -0
  410. package/rate/index.js +127 -0
  411. package/rate/interface.js +1 -0
  412. package/resize-box/ResizeTrigger.js +78 -0
  413. package/resize-box/Split.js +130 -0
  414. package/resize-box/SplitGroup.js +202 -0
  415. package/resize-box/index.js +182 -0
  416. package/resize-box/interface.js +1 -0
  417. package/result/403.js +695 -0
  418. package/result/404.js +513 -0
  419. package/result/500.js +166 -0
  420. package/result/index.js +77 -0
  421. package/result/interface.js +1 -0
  422. package/select/OptGroup.js +20 -0
  423. package/select/Option.js +95 -0
  424. package/select/Select.js +549 -0
  425. package/select/index.js +8 -0
  426. package/select/interface.js +1 -0
  427. package/select/util.js +141 -0
  428. package/select-view/Core.js +370 -0
  429. package/select-view/index.js +67 -0
  430. package/select-view/interface.js +1 -0
  431. package/skeleton/Image.js +24 -0
  432. package/skeleton/Text.js +27 -0
  433. package/skeleton/index.js +57 -0
  434. package/skeleton/interface.js +1 -0
  435. package/slider/Button.js +159 -0
  436. package/slider/Dot.js +43 -0
  437. package/slider/Input.js +75 -0
  438. package/slider/Mark.js +28 -0
  439. package/slider/Tick.js +44 -0
  440. package/slider/index.js +429 -0
  441. package/slider/interface.js +1 -0
  442. package/slider/util.js +63 -0
  443. package/space/index.js +90 -0
  444. package/space/interface.js +1 -0
  445. package/space/toArray.js +11 -0
  446. package/speech-synthesis/index.js +109 -0
  447. package/spin/DotLoading.js +24 -0
  448. package/spin/index.js +79 -0
  449. package/spin/interface.js +1 -0
  450. package/statistic/Countdown.js +55 -0
  451. package/statistic/index.js +120 -0
  452. package/statistic/interface.js +1 -0
  453. package/statistic/util.js +33 -0
  454. package/steps/Step.js +68 -0
  455. package/steps/index.js +89 -0
  456. package/steps/interface.js +1 -0
  457. package/style.css +1 -1
  458. package/suspense-fallback-test/index.js +12 -0
  459. package/switch/index.js +116 -0
  460. package/switch/interface.js +1 -0
  461. package/table/ColGroup.js +59 -0
  462. package/table/Table.js +24 -0
  463. package/table/constant.js +42 -0
  464. package/table/index.js +103 -0
  465. package/table/interface.js +1 -0
  466. package/table/util.js +121 -0
  467. package/tabs/Tab.js +18 -0
  468. package/tabs/TabContent.js +8 -0
  469. package/tabs/TabPane.js +24 -0
  470. package/tabs/index.js +9 -0
  471. package/tabs/interface.js +1 -0
  472. package/tabs/util.js +22 -0
  473. package/tag/index.js +136 -0
  474. package/tag/interface.js +1 -0
  475. package/time-picker/Picker.js +219 -0
  476. package/time-picker/RangePicker.js +56 -0
  477. package/time-picker/TimeColumn.js +65 -0
  478. package/time-picker/TimePicker.js +240 -0
  479. package/time-picker/context.js +5 -0
  480. package/time-picker/index.js +20 -0
  481. package/time-picker/interface.js +1 -0
  482. package/time-picker/util.js +43 -0
  483. package/timeline/Item.js +92 -0
  484. package/timeline/Timeline.js +79 -0
  485. package/timeline/index.js +6 -0
  486. package/timeline/interface.js +1 -0
  487. package/tooltip/index.js +140 -0
  488. package/tooltip/interface.js +1 -0
  489. package/transfer/Item.js +106 -0
  490. package/transfer/List.js +186 -0
  491. package/transfer/index.js +182 -0
  492. package/transfer/interface.js +1 -0
  493. package/tree/Animation.js +11 -0
  494. package/tree/Context.js +5 -0
  495. package/tree/Node.js +16 -0
  496. package/tree/NodeList.js +82 -0
  497. package/tree/Tree.js +580 -0
  498. package/tree/index.js +6 -0
  499. package/tree/interface.js +1 -0
  500. package/tree/util.js +76 -0
  501. package/tree-select/List.js +124 -0
  502. package/tree-select/Select.js +395 -0
  503. package/tree-select/index.js +6 -0
  504. package/tree-select/interface.js +13 -0
  505. package/tree-select/util.js +9 -0
  506. package/trigger/getPopupStyle.js +192 -0
  507. package/trigger/index.js +626 -0
  508. package/trigger/interface.js +1 -0
  509. package/types/anchor/util.d.ts +1 -1
  510. package/types/button/index.d.ts +2 -2
  511. package/types/color-picker/ControlBar.d.ts +12 -5
  512. package/types/color-picker/Mode.d.ts +7 -0
  513. package/types/color-picker/Panel.d.ts +10 -2
  514. package/types/color-picker/hooks/useColorPicker.d.ts +15 -13
  515. package/types/color-picker/hooks/useControlBlock.d.ts +10 -3
  516. package/types/color-picker/index.d.ts +1 -1
  517. package/types/color-picker/interface.d.ts +19 -7
  518. package/types/color-picker/utils.d.ts +23 -0
  519. package/types/form/Control.d.ts +2 -1
  520. package/types/form/FormItem.d.ts +1 -1
  521. package/types/form/store.d.ts +0 -1
  522. package/types/hooks/index.d.ts +2 -0
  523. package/types/hooks/useComputedState.d.ts +1 -4
  524. package/types/hooks/useCreate.d.ts +1 -2
  525. package/types/hooks/useForceUpdate.d.ts +1 -2
  526. package/types/hooks/useId.d.ts +1 -2
  527. package/types/hooks/useInView.d.ts +1 -11
  528. package/types/hooks/useIntersectionObserver.d.ts +1 -7
  529. package/types/hooks/useInterval.d.ts +1 -2
  530. package/types/hooks/useIsFirstRender.d.ts +1 -2
  531. package/types/hooks/useIsomorphicLayoutEffect.d.ts +1 -3
  532. package/types/hooks/useKeyboardEvent.d.ts +1 -8
  533. package/types/hooks/useMedia.d.ts +1 -2
  534. package/types/hooks/useMergeProps.d.ts +1 -5
  535. package/types/hooks/useMergeValue.d.ts +1 -6
  536. package/types/hooks/useOnlineStatus.d.ts +1 -0
  537. package/types/hooks/useOverflowHidden.d.ts +1 -5
  538. package/types/hooks/useOverrideRef.d.ts +1 -6
  539. package/types/hooks/usePersistCallback.d.ts +1 -2
  540. package/types/hooks/usePrefersColorSchemeDark.d.ts +1 -0
  541. package/types/hooks/usePrevious.d.ts +1 -3
  542. package/types/hooks/useRefs.d.ts +1 -2
  543. package/types/hooks/useResizeObserver.d.ts +1 -6
  544. package/types/hooks/useStateCallback.d.ts +1 -5
  545. package/types/hooks/useStateWithPromise.d.ts +1 -2
  546. package/types/hooks/useUpdateEffect.d.ts +1 -3
  547. package/types/hooks/useWatch.d.ts +1 -3
  548. package/types/hooks/useWindowSize.d.ts +1 -5
  549. package/types/image/interface.d.ts +1 -0
  550. package/types/index.d.ts +156 -86
  551. package/types/input/Input.d.ts +1 -1
  552. package/types/input/Textarea.d.ts +2 -2
  553. package/types/locale/en-US.d.ts +2 -0
  554. package/types/locale/interface.d.ts +1 -2
  555. package/types/locale/ja-JP.d.ts +2 -0
  556. package/types/locale/zh-CN.d.ts +2 -0
  557. package/types/locale/zh-HK.d.ts +2 -0
  558. package/types/locale/zh-TW.d.ts +2 -0
  559. package/types/menu/context.d.ts +1 -1
  560. package/types/message/index.d.ts +14 -14
  561. package/types/message/interface.d.ts +2 -0
  562. package/types/modal/config.d.ts +0 -1
  563. package/types/modal/interface.d.ts +0 -1
  564. package/types/notice/index.d.ts +2 -27
  565. package/types/notification/index.d.ts +15 -16
  566. package/types/notification/interface.d.ts +2 -0
  567. package/types/notification/withNotification.d.ts +2 -0
  568. package/types/select/util.d.ts +1 -2
  569. package/types/select-view/interface.d.ts +2 -1
  570. package/types/speech-synthesis/index.d.ts +1 -1
  571. package/types/table/constant.d.ts +2 -0
  572. package/types/table/hook/useThResizable.d.ts +7 -0
  573. package/types/table/index.d.ts +10 -1
  574. package/types/table/style/index.d.ts +1 -0
  575. package/types/table/th-resizable/index.d.ts +2 -0
  576. package/types/table/thead/Column.d.ts +1 -2
  577. package/types/tree/Tree.d.ts +12 -67
  578. package/types/tree-select/Select.d.ts +2 -2
  579. package/types/trigger/index.d.ts +2 -120
  580. package/types/trigger/interface.d.ts +2 -1
  581. package/types/utils/CSSTransition.d.ts +2 -3
  582. package/types/utils/caseName.d.ts +1 -1
  583. package/types/utils/className.d.ts +1 -1
  584. package/types/utils/constant.d.ts +2 -2
  585. package/types/utils/copy.d.ts +1 -1
  586. package/types/utils/dayjs.d.ts +1 -21
  587. package/types/utils/dom.d.ts +1 -6
  588. package/types/utils/fileToURL.d.ts +1 -1
  589. package/types/utils/fillNBSP.d.ts +1 -1
  590. package/types/utils/getHighlightText.d.ts +1 -5
  591. package/types/utils/getHotkeyHandler.d.ts +1 -8
  592. package/types/utils/getStringLength.d.ts +1 -1
  593. package/types/utils/include.d.ts +1 -1
  594. package/types/utils/index.d.ts +3 -4
  595. package/types/utils/is.d.ts +1 -16
  596. package/types/utils/keyboardCode.d.ts +3 -0
  597. package/types/utils/lodash.d.ts +1 -17
  598. package/types/utils/mergeProps.d.ts +1 -1
  599. package/types/utils/mergedToString.d.ts +1 -1
  600. package/types/utils/omit.d.ts +1 -1
  601. package/types/utils/pad.d.ts +1 -2
  602. package/types/utils/pick.d.ts +2 -4
  603. package/types/utils/reactDOM.d.ts +1 -7
  604. package/types/utils/resizeObserverEffect.d.ts +2 -0
  605. package/types/utils/saveAs.d.ts +1 -1
  606. package/types/utils/screenfull.d.ts +2 -0
  607. package/types/utils/scrollIntoView.d.ts +1 -2
  608. package/types/utils/style.d.ts +1 -3
  609. package/types/utils/throttleByRaf.d.ts +1 -5
  610. package/types/utils/throttleByRaf2.d.ts +1 -0
  611. package/types/utils/warning.d.ts +1 -2
  612. package/types/version/index.d.ts +1 -1
  613. package/typography/Base.js +189 -0
  614. package/typography/EditContent.js +46 -0
  615. package/typography/Ellipsis.js +124 -0
  616. package/typography/Operations.js +78 -0
  617. package/typography/Paragraph.js +24 -0
  618. package/typography/Text.js +11 -0
  619. package/typography/Title.js +12 -0
  620. package/typography/Typography.js +13 -0
  621. package/typography/index.js +278 -0
  622. package/typography/interface.js +1 -0
  623. package/typography/useCssEllipsis.js +37 -0
  624. package/typography/useEllipsis.js +150 -0
  625. package/upload/TriggerNode.js +116 -0
  626. package/upload/Upload.js +627 -0
  627. package/upload/Uploader.js +206 -0
  628. package/upload/index.js +8 -0
  629. package/upload/interface.js +9 -0
  630. package/upload/request.js +51 -0
  631. package/upload/request_.js +64 -0
  632. package/upload/util.js +61 -0
  633. package/utils/CSSTransition.js +2 -6
  634. package/utils/className.js +2 -2
  635. package/utils/constant.js +8 -9
  636. package/utils/contextHolder.js +1 -1
  637. package/utils/copy.js +1 -1
  638. package/utils/dayjs.js +14 -173
  639. package/utils/dom.js +35 -31
  640. package/utils/fillNBSP.js +2 -4
  641. package/utils/getHighlightText.js +2 -38
  642. package/utils/getHotkeyHandler.js +2 -25
  643. package/utils/getStringLength.js +2 -7
  644. package/utils/include.js +2 -7
  645. package/utils/index.js +239 -242
  646. package/utils/is.js +116 -156
  647. package/utils/keyboardCode.js +27 -0
  648. package/utils/mergeProps.js +2 -9
  649. package/utils/mergedToString.js +2 -13
  650. package/utils/omit.js +2 -9
  651. package/utils/pick.js +4 -15
  652. package/utils/reactDOM.js +3 -54
  653. package/utils/resizeObserverEffect.js +4 -0
  654. package/utils/saveAs.js +1 -1
  655. package/utils/screenfull.js +4 -0
  656. package/utils/scrollIntoView.js +2 -21
  657. package/utils/style.js +2 -1
  658. package/utils/throttleByRaf.js +13 -12
  659. package/utils/throttleByRaf2.js +5 -0
  660. package/utils/warning.js +2 -1
  661. package/{chunk/BHgJ5Y3T.js → verification-code/VerificationCode.js} +24 -23
  662. package/verification-code/index.js +4 -0
  663. package/verification-code/interface.js +1 -0
  664. package/{Version.js → version/index.js} +1 -1
  665. package/virtual-list/Filler.js +31 -0
  666. package/virtual-list/VirtualList.js +493 -0
  667. package/virtual-list/index.js +4 -0
  668. package/{chunk/Bc7t9jkb.js → watermark/Watermark.js} +17 -16
  669. package/watermark/index.js +4 -0
  670. package/watermark/interface.js +1 -0
  671. package/NotificationBase.js +0 -53
  672. package/chunk/-zpSUpGE.js +0 -1501
  673. package/chunk/BAWsPQBM.js +0 -11
  674. package/chunk/BIT0j3HT.js +0 -269
  675. package/chunk/BbLKnaNO.js +0 -871
  676. package/chunk/Bfhv56O2.js +0 -638
  677. package/chunk/Bh23P4l7.js +0 -162
  678. package/chunk/C2lIz2F9.js +0 -60
  679. package/chunk/CHnFKgbk.js +0 -445
  680. package/chunk/CLBavO5c.js +0 -912
  681. package/chunk/CVkHTbic.js +0 -995
  682. package/chunk/CcV4wQB1.js +0 -968
  683. package/chunk/CeGEvXby.js +0 -278
  684. package/chunk/D3NFxdmG.js +0 -518
  685. package/chunk/DApXtulb.js +0 -1102
  686. package/chunk/DNAigumg.js +0 -166
  687. package/chunk/DPByB1ab.js +0 -698
  688. package/chunk/DQAot004.js +0 -824
  689. package/chunk/DTBtQQ2H.js +0 -334
  690. package/chunk/DV1Ab_cG.js +0 -284
  691. package/chunk/DnvO8A0Z.js +0 -518
  692. package/chunk/Du-bw6qA.js +0 -224
  693. package/chunk/dBnNCOIU.js +0 -778
  694. package/chunk/it8qlDZ3.js +0 -1032
  695. package/chunk/te_43YrB.js +0 -776
  696. package/chunk/znkyQ-HR.js +0 -243
  697. package/hooks/use-verification-code.js +0 -73
  698. package/types/notification-base/index.d.ts +0 -15
  699. package/types/notification-base/style/index.d.ts +0 -2
  700. package/types/style/index.d.ts +0 -1
  701. package/types/trigger/Portal.d.ts +0 -7
  702. package/types/utils/keyCode.d.ts +0 -45
  703. package/types/utils/raf.d.ts +0 -3
  704. package/types/utils/throttleByRafV2.d.ts +0 -5
  705. package/utils/keyCode.js +0 -12
  706. package/utils/raf.js +0 -19
  707. package/utils/throttleByRafV2.js +0 -16
  708. /package/{chunk/l0sNRNKZ.js → affix/interface.js} +0 -0
package/chunk/-zpSUpGE.js DELETED
@@ -1,1501 +0,0 @@
1
- var Ft = Object.defineProperty;
2
- var Tt = (r, e, t) => e in r ? Ft(r, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : r[e] = t;
3
- var g = (r, e, t) => Tt(r, typeof e != "symbol" ? e + "" : e, t);
4
- import G, { forwardRef as bt, useContext as nt, createContext as qt, useRef as st, useImperativeHandle as xt, Component as Ot, createRef as jt, useEffect as D, useState as Lt } from "react";
5
- import { jsx as d, jsxs as V } from "react/jsx-runtime";
6
- import _ from "@unicom-cloud/icons/context";
7
- import Dt from "lodash/isPlainObject";
8
- import { useMergeProps as Ct } from "../hooks/useMergeProps.js";
9
- import { _ as yt, P as vt } from "./CLBavO5c.js";
10
- import O from "lodash/isNumber";
11
- import F from "lodash/isUndefined";
12
- import Ut from "@unicom-cloud/icons/IconUiCheckCircleFill";
13
- import it from "@unicom-cloud/icons/IconUiClose";
14
- import Wt from "@unicom-cloud/icons/IconUiCloseCircleFill";
15
- import zt from "@unicom-cloud/icons/IconUiExclamationCircleFill";
16
- import Bt from "@unicom-cloud/icons/IconUiInfoCircleFill";
17
- import Vt from "@unicom-cloud/icons/IconUiLoading";
18
- import Gt from "@unicom-cloud/icons/IconUiEmpty";
19
- import { y as j } from "./BAWsPQBM.js";
20
- import Jt from "../locale/zh-CN.js";
21
- import wt from "../NotificationBase.js";
22
- import { render as $t } from "../utils/reactDOM.js";
23
- import Kt from "lodash/isString";
24
- import { createPortal as Qt } from "react-dom";
25
- import Xt from "../utils/omit.js";
26
- var Yt = Object.defineProperty, Zt = (r, e, t) => e in r ? Yt(r, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : r[e] = t, I = (r, e, t) => Zt(r, typeof e != "symbol" ? e + "" : e, t);
27
- function w(r, e) {
28
- _t(r) && (r = "100%");
29
- const t = te(r);
30
- return r = e === 360 ? r : Math.min(e, Math.max(0, parseFloat(r))), t && (r = parseInt(String(r * e), 10) / 100), Math.abs(r - e) < 1e-6 ? 1 : (e === 360 ? r = (r < 0 ? r % e + e : r % e) / parseFloat(String(e)) : r = r % e / parseFloat(String(e)), r);
31
- }
32
- function U(r) {
33
- return Math.min(1, Math.max(0, r));
34
- }
35
- function _t(r) {
36
- return typeof r == "string" && r.indexOf(".") !== -1 && parseFloat(r) === 1;
37
- }
38
- function te(r) {
39
- return typeof r == "string" && r.indexOf("%") !== -1;
40
- }
41
- function Mt(r) {
42
- return r = parseFloat(r), (isNaN(r) || r < 0 || r > 1) && (r = 1), r;
43
- }
44
- function W(r) {
45
- return Number(r) <= 1 ? `${Number(r) * 100}%` : r;
46
- }
47
- function P(r) {
48
- return r.length === 1 ? "0" + r : String(r);
49
- }
50
- function ee(r, e, t) {
51
- return {
52
- r: w(r, 255) * 255,
53
- g: w(e, 255) * 255,
54
- b: w(t, 255) * 255
55
- };
56
- }
57
- function ot(r, e, t) {
58
- r = w(r, 255), e = w(e, 255), t = w(t, 255);
59
- const n = Math.max(r, e, t), s = Math.min(r, e, t);
60
- let i = 0, o = 0;
61
- const a = (n + s) / 2;
62
- if (n === s)
63
- o = 0, i = 0;
64
- else {
65
- const f = n - s;
66
- switch (o = a > 0.5 ? f / (2 - n - s) : f / (n + s), n) {
67
- case r:
68
- i = (e - t) / f + (e < t ? 6 : 0);
69
- break;
70
- case e:
71
- i = (t - r) / f + 2;
72
- break;
73
- case t:
74
- i = (r - e) / f + 4;
75
- break;
76
- }
77
- i /= 6;
78
- }
79
- return { h: i, s: o, l: a };
80
- }
81
- function Q(r, e, t) {
82
- return t < 0 && (t += 1), t > 1 && (t -= 1), t < 1 / 6 ? r + (e - r) * (6 * t) : t < 1 / 2 ? e : t < 2 / 3 ? r + (e - r) * (2 / 3 - t) * 6 : r;
83
- }
84
- function re(r, e, t) {
85
- let n, s, i;
86
- if (r = w(r, 360), e = w(e, 100), t = w(t, 100), e === 0)
87
- s = t, i = t, n = t;
88
- else {
89
- const o = t < 0.5 ? t * (1 + e) : t + e - t * e, a = 2 * t - o;
90
- n = Q(a, o, r + 1 / 3), s = Q(a, o, r), i = Q(a, o, r - 1 / 3);
91
- }
92
- return { r: n * 255, g: s * 255, b: i * 255 };
93
- }
94
- function X(r, e, t) {
95
- r = w(r, 255), e = w(e, 255), t = w(t, 255);
96
- const n = Math.max(r, e, t), s = Math.min(r, e, t);
97
- let i = 0;
98
- const o = n, a = n - s, f = n === 0 ? 0 : a / n;
99
- if (n === s)
100
- i = 0;
101
- else {
102
- switch (n) {
103
- case r:
104
- i = (e - t) / a + (e < t ? 6 : 0);
105
- break;
106
- case e:
107
- i = (t - r) / a + 2;
108
- break;
109
- case t:
110
- i = (r - e) / a + 4;
111
- break;
112
- }
113
- i /= 6;
114
- }
115
- return { h: i, s: f, v: o };
116
- }
117
- function ne(r, e, t) {
118
- r = w(r, 360) * 6, e = w(e, 100), t = w(t, 100);
119
- const n = Math.floor(r), s = r - n, i = t * (1 - e), o = t * (1 - s * e), a = t * (1 - (1 - s) * e), f = n % 6, l = [t, o, i, i, a, t][f], c = [a, t, t, o, i, i][f], u = [i, i, a, t, t, o][f];
120
- return { r: l * 255, g: c * 255, b: u * 255 };
121
- }
122
- function at(r, e, t, n) {
123
- const s = [
124
- P(Math.round(r).toString(16)),
125
- P(Math.round(e).toString(16)),
126
- P(Math.round(t).toString(16))
127
- ];
128
- return n && s[0].startsWith(s[0].charAt(1)) && s[1].startsWith(s[1].charAt(1)) && s[2].startsWith(s[2].charAt(1)) ? s[0].charAt(0) + s[1].charAt(0) + s[2].charAt(0) : s.join("");
129
- }
130
- function se(r, e, t, n, s) {
131
- const i = [
132
- P(Math.round(r).toString(16)),
133
- P(Math.round(e).toString(16)),
134
- P(Math.round(t).toString(16)),
135
- P(kt(n))
136
- ];
137
- return s && i[0].startsWith(i[0].charAt(1)) && i[1].startsWith(i[1].charAt(1)) && i[2].startsWith(i[2].charAt(1)) && i[3].startsWith(i[3].charAt(1)) ? i[0].charAt(0) + i[1].charAt(0) + i[2].charAt(0) + i[3].charAt(0) : i.join("");
138
- }
139
- function Ge(r, e, t, n) {
140
- return [
141
- P(kt(n)),
142
- P(Math.round(r).toString(16)),
143
- P(Math.round(e).toString(16)),
144
- P(Math.round(t).toString(16))
145
- ].join("");
146
- }
147
- function ie(r, e, t, n) {
148
- const s = r / 100, i = e / 100, o = t / 100, a = n / 100, f = 255 * (1 - s) * (1 - a), l = 255 * (1 - i) * (1 - a), c = 255 * (1 - o) * (1 - a);
149
- return { r: f, g: l, b: c };
150
- }
151
- function ct(r, e, t) {
152
- let n = 1 - r / 255, s = 1 - e / 255, i = 1 - t / 255, o = Math.min(n, s, i);
153
- return o === 1 ? (n = 0, s = 0, i = 0) : (n = (n - o) / (1 - o) * 100, s = (s - o) / (1 - o) * 100, i = (i - o) / (1 - o) * 100), o *= 100, {
154
- c: Math.round(n),
155
- m: Math.round(s),
156
- y: Math.round(i),
157
- k: Math.round(o)
158
- };
159
- }
160
- function kt(r) {
161
- return Math.round(parseFloat(r) * 255).toString(16);
162
- }
163
- function lt(r) {
164
- return R(r) / 255;
165
- }
166
- function R(r) {
167
- return parseInt(r, 16);
168
- }
169
- function oe(r) {
170
- return {
171
- r: r >> 16,
172
- g: (r & 65280) >> 8,
173
- b: r & 255
174
- };
175
- }
176
- const tt = {
177
- aliceblue: "#f0f8ff",
178
- antiquewhite: "#faebd7",
179
- aqua: "#00ffff",
180
- aquamarine: "#7fffd4",
181
- azure: "#f0ffff",
182
- beige: "#f5f5dc",
183
- bisque: "#ffe4c4",
184
- black: "#000000",
185
- blanchedalmond: "#ffebcd",
186
- blue: "#0000ff",
187
- blueviolet: "#8a2be2",
188
- brown: "#a52a2a",
189
- burlywood: "#deb887",
190
- cadetblue: "#5f9ea0",
191
- chartreuse: "#7fff00",
192
- chocolate: "#d2691e",
193
- coral: "#ff7f50",
194
- cornflowerblue: "#6495ed",
195
- cornsilk: "#fff8dc",
196
- crimson: "#dc143c",
197
- cyan: "#00ffff",
198
- darkblue: "#00008b",
199
- darkcyan: "#008b8b",
200
- darkgoldenrod: "#b8860b",
201
- darkgray: "#a9a9a9",
202
- darkgreen: "#006400",
203
- darkgrey: "#a9a9a9",
204
- darkkhaki: "#bdb76b",
205
- darkmagenta: "#8b008b",
206
- darkolivegreen: "#556b2f",
207
- darkorange: "#ff8c00",
208
- darkorchid: "#9932cc",
209
- darkred: "#8b0000",
210
- darksalmon: "#e9967a",
211
- darkseagreen: "#8fbc8f",
212
- darkslateblue: "#483d8b",
213
- darkslategray: "#2f4f4f",
214
- darkslategrey: "#2f4f4f",
215
- darkturquoise: "#00ced1",
216
- darkviolet: "#9400d3",
217
- deeppink: "#ff1493",
218
- deepskyblue: "#00bfff",
219
- dimgray: "#696969",
220
- dimgrey: "#696969",
221
- dodgerblue: "#1e90ff",
222
- firebrick: "#b22222",
223
- floralwhite: "#fffaf0",
224
- forestgreen: "#228b22",
225
- fuchsia: "#ff00ff",
226
- gainsboro: "#dcdcdc",
227
- ghostwhite: "#f8f8ff",
228
- goldenrod: "#daa520",
229
- gold: "#ffd700",
230
- gray: "#808080",
231
- green: "#008000",
232
- greenyellow: "#adff2f",
233
- grey: "#808080",
234
- honeydew: "#f0fff0",
235
- hotpink: "#ff69b4",
236
- indianred: "#cd5c5c",
237
- indigo: "#4b0082",
238
- ivory: "#fffff0",
239
- khaki: "#f0e68c",
240
- lavenderblush: "#fff0f5",
241
- lavender: "#e6e6fa",
242
- lawngreen: "#7cfc00",
243
- lemonchiffon: "#fffacd",
244
- lightblue: "#add8e6",
245
- lightcoral: "#f08080",
246
- lightcyan: "#e0ffff",
247
- lightgoldenrodyellow: "#fafad2",
248
- lightgray: "#d3d3d3",
249
- lightgreen: "#90ee90",
250
- lightgrey: "#d3d3d3",
251
- lightpink: "#ffb6c1",
252
- lightsalmon: "#ffa07a",
253
- lightseagreen: "#20b2aa",
254
- lightskyblue: "#87cefa",
255
- lightslategray: "#778899",
256
- lightslategrey: "#778899",
257
- lightsteelblue: "#b0c4de",
258
- lightyellow: "#ffffe0",
259
- lime: "#00ff00",
260
- limegreen: "#32cd32",
261
- linen: "#faf0e6",
262
- magenta: "#ff00ff",
263
- maroon: "#800000",
264
- mediumaquamarine: "#66cdaa",
265
- mediumblue: "#0000cd",
266
- mediumorchid: "#ba55d3",
267
- mediumpurple: "#9370db",
268
- mediumseagreen: "#3cb371",
269
- mediumslateblue: "#7b68ee",
270
- mediumspringgreen: "#00fa9a",
271
- mediumturquoise: "#48d1cc",
272
- mediumvioletred: "#c71585",
273
- midnightblue: "#191970",
274
- mintcream: "#f5fffa",
275
- mistyrose: "#ffe4e1",
276
- moccasin: "#ffe4b5",
277
- navajowhite: "#ffdead",
278
- navy: "#000080",
279
- oldlace: "#fdf5e6",
280
- olive: "#808000",
281
- olivedrab: "#6b8e23",
282
- orange: "#ffa500",
283
- orangered: "#ff4500",
284
- orchid: "#da70d6",
285
- palegoldenrod: "#eee8aa",
286
- palegreen: "#98fb98",
287
- paleturquoise: "#afeeee",
288
- palevioletred: "#db7093",
289
- papayawhip: "#ffefd5",
290
- peachpuff: "#ffdab9",
291
- peru: "#cd853f",
292
- pink: "#ffc0cb",
293
- plum: "#dda0dd",
294
- powderblue: "#b0e0e6",
295
- purple: "#800080",
296
- rebeccapurple: "#663399",
297
- red: "#ff0000",
298
- rosybrown: "#bc8f8f",
299
- royalblue: "#4169e1",
300
- saddlebrown: "#8b4513",
301
- salmon: "#fa8072",
302
- sandybrown: "#f4a460",
303
- seagreen: "#2e8b57",
304
- seashell: "#fff5ee",
305
- sienna: "#a0522d",
306
- silver: "#c0c0c0",
307
- skyblue: "#87ceeb",
308
- slateblue: "#6a5acd",
309
- slategray: "#708090",
310
- slategrey: "#708090",
311
- snow: "#fffafa",
312
- springgreen: "#00ff7f",
313
- steelblue: "#4682b4",
314
- tan: "#d2b48c",
315
- teal: "#008080",
316
- thistle: "#d8bfd8",
317
- tomato: "#ff6347",
318
- turquoise: "#40e0d0",
319
- violet: "#ee82ee",
320
- wheat: "#f5deb3",
321
- white: "#ffffff",
322
- whitesmoke: "#f5f5f5",
323
- yellow: "#ffff00",
324
- yellowgreen: "#9acd32"
325
- };
326
- function ae(r) {
327
- let e = { r: 0, g: 0, b: 0 }, t = 1, n = null, s = null, i = null, o = !1, a = !1;
328
- return typeof r == "string" && (r = he(r)), typeof r == "object" && (k(r.r) && k(r.g) && k(r.b) ? (e = ee(r.r, r.g, r.b), o = !0, a = String(r.r).slice(-1) === "%" ? "prgb" : "rgb") : k(r.h) && k(r.s) && k(r.v) ? (n = W(r.s), s = W(r.v), e = ne(r.h, n, s), o = !0, a = "hsv") : k(r.h) && k(r.s) && k(r.l) ? (n = W(r.s), i = W(r.l), e = re(r.h, n, i), o = !0, a = "hsl") : k(r.c) && k(r.m) && k(r.y) && k(r.k) && (e = ie(r.c, r.m, r.y, r.k), o = !0, a = "cmyk"), Object.prototype.hasOwnProperty.call(r, "a") && (t = r.a)), t = Mt(t), {
329
- ok: o,
330
- format: r.format || a,
331
- r: Math.min(255, Math.max(e.r, 0)),
332
- g: Math.min(255, Math.max(e.g, 0)),
333
- b: Math.min(255, Math.max(e.b, 0)),
334
- a: t
335
- };
336
- }
337
- const ce = "[-\\+]?\\d+%?", le = "[-\\+]?\\d*\\.\\d+%?", H = "(?:" + le + ")|(?:" + ce + ")", Y = "[\\s|\\(]+(" + H + ")[,|\\s]+(" + H + ")[,|\\s]+(" + H + ")\\s*\\)?", z = (
338
- // eslint-disable-next-line prettier/prettier
339
- "[\\s|\\(]+(" + H + ")[,|\\s]+(" + H + ")[,|\\s]+(" + H + ")[,|\\s]+(" + H + ")\\s*\\)?"
340
- ), E = {
341
- CSS_UNIT: new RegExp(H),
342
- rgb: new RegExp("rgb" + Y),
343
- rgba: new RegExp("rgba" + z),
344
- hsl: new RegExp("hsl" + Y),
345
- hsla: new RegExp("hsla" + z),
346
- hsv: new RegExp("hsv" + Y),
347
- hsva: new RegExp("hsva" + z),
348
- cmyk: new RegExp("cmyk" + z),
349
- hex3: /^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,
350
- hex6: /^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/,
351
- hex4: /^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,
352
- hex8: /^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/
353
- };
354
- function he(r) {
355
- if (r = r.trim().toLowerCase(), r.length === 0)
356
- return !1;
357
- let e = !1;
358
- if (tt[r])
359
- r = tt[r], e = !0;
360
- else if (r === "transparent")
361
- return { r: 0, g: 0, b: 0, a: 0, format: "name" };
362
- let t = E.rgb.exec(r);
363
- return t ? { r: t[1], g: t[2], b: t[3] } : (t = E.rgba.exec(r), t ? { r: t[1], g: t[2], b: t[3], a: t[4] } : (t = E.hsl.exec(r), t ? { h: t[1], s: t[2], l: t[3] } : (t = E.hsla.exec(r), t ? { h: t[1], s: t[2], l: t[3], a: t[4] } : (t = E.hsv.exec(r), t ? { h: t[1], s: t[2], v: t[3] } : (t = E.hsva.exec(r), t ? { h: t[1], s: t[2], v: t[3], a: t[4] } : (t = E.cmyk.exec(r), t ? {
364
- c: t[1],
365
- m: t[2],
366
- y: t[3],
367
- k: t[4]
368
- } : (t = E.hex8.exec(r), t ? {
369
- r: R(t[1]),
370
- g: R(t[2]),
371
- b: R(t[3]),
372
- a: lt(t[4]),
373
- format: e ? "name" : "hex8"
374
- } : (t = E.hex6.exec(r), t ? {
375
- r: R(t[1]),
376
- g: R(t[2]),
377
- b: R(t[3]),
378
- format: e ? "name" : "hex"
379
- } : (t = E.hex4.exec(r), t ? {
380
- r: R(t[1] + t[1]),
381
- g: R(t[2] + t[2]),
382
- b: R(t[3] + t[3]),
383
- a: lt(t[4] + t[4]),
384
- format: e ? "name" : "hex8"
385
- } : (t = E.hex3.exec(r), t ? {
386
- r: R(t[1] + t[1]),
387
- g: R(t[2] + t[2]),
388
- b: R(t[3] + t[3]),
389
- format: e ? "name" : "hex"
390
- } : !1))))))))));
391
- }
392
- function k(r) {
393
- return typeof r == "number" ? !Number.isNaN(r) : E.CSS_UNIT.test(r);
394
- }
395
- class C {
396
- constructor(e = "", t = {}) {
397
- if (I(this, "r"), I(this, "g"), I(this, "b"), I(this, "a"), I(this, "format"), I(this, "originalInput"), I(this, "isValid"), I(this, "gradientType"), I(this, "roundA"), e instanceof C)
398
- return e;
399
- typeof e == "number" && (e = oe(e)), this.originalInput = e;
400
- const n = ae(e);
401
- this.originalInput = e, this.r = n.r, this.g = n.g, this.b = n.b, this.a = n.a, this.roundA = Math.round(100 * this.a) / 100, this.format = t.format ?? n.format, this.gradientType = t.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 = n.ok;
402
- }
403
- get ok() {
404
- return this.isValid;
405
- }
406
- isDark() {
407
- return this.getBrightness() < 128;
408
- }
409
- isLight() {
410
- return !this.isDark();
411
- }
412
- /**
413
- * Returns the perceived brightness of the color, from 0-255.
414
- */
415
- getBrightness() {
416
- const e = this.toRgb();
417
- return (e.r * 299 + e.g * 587 + e.b * 114) / 1e3;
418
- }
419
- /**
420
- * Returns the perceived luminance of a color, from 0-1.
421
- */
422
- getLuminance() {
423
- const e = this.toRgb();
424
- let t, n, s;
425
- const i = e.r / 255, o = e.g / 255, a = e.b / 255;
426
- return i <= 0.03928 ? t = i / 12.92 : t = Math.pow((i + 0.055) / 1.055, 2.4), o <= 0.03928 ? n = o / 12.92 : n = Math.pow((o + 0.055) / 1.055, 2.4), a <= 0.03928 ? s = a / 12.92 : s = Math.pow((a + 0.055) / 1.055, 2.4), 0.2126 * t + 0.7152 * n + 0.0722 * s;
427
- }
428
- /**
429
- * Returns the alpha value of a color, from 0-1.
430
- */
431
- getAlpha() {
432
- return this.a;
433
- }
434
- /**
435
- * Sets the alpha value on the current color.
436
- *
437
- * @param alpha - The new alpha value. The accepted range is 0-1.
438
- */
439
- setAlpha(e) {
440
- return this.a = Mt(e), this.roundA = Math.round(100 * this.a) / 100, this;
441
- }
442
- /**
443
- * Returns whether the color is monochrome.
444
- */
445
- isMonochrome() {
446
- const { s: e } = this.toHsl();
447
- return e === 0;
448
- }
449
- /**
450
- * Returns the object as a HSVA object.
451
- */
452
- toHsv() {
453
- const e = X(this.r, this.g, this.b);
454
- return { h: e.h * 360, s: e.s, v: e.v, a: this.a };
455
- }
456
- toHsv_() {
457
- const e = X(this.r, this.g, this.b);
458
- return { h: e.h, s: e.s, v: e.v, a: this.a };
459
- }
460
- /**
461
- * Returns the hsva values interpolated into a string with the following format:
462
- * "hsva(xxx, xxx, xxx, xx)".
463
- */
464
- toHsvString() {
465
- const e = X(this.r, this.g, this.b), t = Math.round(e.h * 360), n = Math.round(e.s * 100), s = Math.round(e.v * 100);
466
- return this.a === 1 ? `hsv(${t}, ${n}%, ${s}%)` : `hsva(${t}, ${n}%, ${s}%, ${this.roundA})`;
467
- }
468
- /**
469
- * Returns the object as a HSLA object.
470
- */
471
- toHsl() {
472
- const e = ot(this.r, this.g, this.b);
473
- return { h: e.h * 360, s: e.s, l: e.l, a: this.a };
474
- }
475
- /**
476
- * Returns the hsla values interpolated into a string with the following format:
477
- * "hsla(xxx, xxx, xxx, xx)".
478
- */
479
- toHslString() {
480
- const e = ot(this.r, this.g, this.b), t = Math.round(e.h * 360), n = Math.round(e.s * 100), s = Math.round(e.l * 100);
481
- return this.a === 1 ? `hsl(${t}, ${n}%, ${s}%)` : `hsla(${t}, ${n}%, ${s}%, ${this.roundA})`;
482
- }
483
- /**
484
- * Returns the hex value of the color.
485
- * @param allow3Char will shorten hex value to 3 char if possible
486
- */
487
- toHex(e = !1) {
488
- return at(this.r, this.g, this.b, e);
489
- }
490
- /**
491
- * Returns the hex value of the color -with a # prefixed.
492
- * @param allow3Char will shorten hex value to 3 char if possible
493
- */
494
- toHexString(e = !1) {
495
- return `#${this.toHex(e)}`;
496
- }
497
- /**
498
- * Returns the hex 8 value of the color.
499
- * @param allow4Char will shorten hex value to 4 char if possible
500
- */
501
- toHex8(e = !1) {
502
- return se(this.r, this.g, this.b, this.a, e);
503
- }
504
- /**
505
- * Returns the hex 8 value of the color -with a # prefixed.
506
- * @param allow4Char will shorten hex value to 4 char if possible
507
- */
508
- toHex8String(e = !1) {
509
- return `#${this.toHex8(e)}`;
510
- }
511
- /**
512
- * Returns the shorter hex value of the color depends on its alpha -with a # prefixed.
513
- * @param allowShortChar will shorten hex value to 3 or 4 char if possible
514
- */
515
- toHexShortString(e = !1) {
516
- return this.a === 1 ? this.toHexString(e) : this.toHex8String(e);
517
- }
518
- /**
519
- * Returns the object as a RGBA object.
520
- */
521
- toRgb() {
522
- return {
523
- r: Math.round(this.r),
524
- g: Math.round(this.g),
525
- b: Math.round(this.b),
526
- a: this.a
527
- };
528
- }
529
- toRgbArray() {
530
- const e = this.toRgb();
531
- return [e.r, e.g, e.b];
532
- }
533
- toRgbArrayString() {
534
- const e = this.toRgb();
535
- return `${e.r},${e.g},${e.b}`;
536
- }
537
- /**
538
- * Returns the RGBA values interpolated into a string with the following format:
539
- * "RGBA(xxx, xxx, xxx, xx)".
540
- */
541
- toRgbString() {
542
- const e = Math.round(this.r), t = Math.round(this.g), n = Math.round(this.b);
543
- return this.a === 1 ? `rgb(${e}, ${t}, ${n})` : `rgba(${e}, ${t}, ${n}, ${this.roundA})`;
544
- }
545
- /**
546
- * Returns the object as a RGBA object.
547
- */
548
- toPercentageRgb() {
549
- const e = (t) => `${Math.round(w(t, 255) * 100)}%`;
550
- return {
551
- r: e(this.r),
552
- g: e(this.g),
553
- b: e(this.b),
554
- a: this.a
555
- };
556
- }
557
- /**
558
- * Returns the RGBA relative values interpolated into a string
559
- */
560
- toPercentageRgbString() {
561
- const e = (t) => Math.round(w(t, 255) * 100);
562
- return this.a === 1 ? `rgb(${e(this.r)}%, ${e(this.g)}%, ${e(this.b)}%)` : `rgba(${e(this.r)}%, ${e(this.g)}%, ${e(this.b)}%, ${this.roundA})`;
563
- }
564
- toCmyk() {
565
- return {
566
- ...ct(this.r, this.g, this.b)
567
- };
568
- }
569
- toCmykString() {
570
- const { c: e, m: t, y: n, k: s } = ct(this.r, this.g, this.b);
571
- return `cmyk(${e}, ${t}, ${n}, ${s})`;
572
- }
573
- /**
574
- * The 'real' name of the color -if there is one.
575
- */
576
- toName() {
577
- if (this.a === 0)
578
- return "transparent";
579
- if (this.a < 1)
580
- return !1;
581
- const e = `#${at(this.r, this.g, this.b, !1)}`;
582
- for (const [t, n] of Object.entries(tt))
583
- if (e === n)
584
- return t;
585
- return !1;
586
- }
587
- toString(e) {
588
- const t = !!e;
589
- e = e ?? this.format;
590
- let n = !1;
591
- const s = this.a < 1 && this.a >= 0;
592
- return !t && s && (e.startsWith("hex") || e === "name") ? e === "name" && this.a === 0 ? this.toName() : this.toRgbString() : (e === "rgb" && (n = this.toRgbString()), e === "prgb" && (n = this.toPercentageRgbString()), (e === "hex" || e === "hex6") && (n = this.toHexString()), e === "hex3" && (n = this.toHexString(!0)), e === "hex4" && (n = this.toHex8String(!0)), e === "hex8" && (n = this.toHex8String()), e === "name" && (n = this.toName()), e === "hsl" && (n = this.toHslString()), e === "hsv" && (n = this.toHsvString()), e === "cmyk" && (n = this.toCmykString()), n || this.toHexString());
593
- }
594
- toNumber() {
595
- return (Math.round(this.r) << 16) + (Math.round(this.g) << 8) + Math.round(this.b);
596
- }
597
- clone() {
598
- return new C(this.toString());
599
- }
600
- /**
601
- * Lighten the color a given amount. Providing 100 will always return white.
602
- * @param amount - valid between 1-100
603
- */
604
- lighten(e = 10) {
605
- const t = this.toHsl();
606
- return t.l += e / 100, t.l = U(t.l), new C(t);
607
- }
608
- /**
609
- * Brighten the color a given amount, from 0 to 100.
610
- * @param amount - valid between 1-100
611
- */
612
- brighten(e = 10) {
613
- const t = this.toRgb();
614
- return t.r = Math.max(
615
- 0,
616
- Math.min(255, t.r - Math.round(255 * -(e / 100)))
617
- ), t.g = Math.max(
618
- 0,
619
- Math.min(255, t.g - Math.round(255 * -(e / 100)))
620
- ), t.b = Math.max(
621
- 0,
622
- Math.min(255, t.b - Math.round(255 * -(e / 100)))
623
- ), new C(t);
624
- }
625
- /**
626
- * Darken the color a given amount, from 0 to 100.
627
- * Providing 100 will always return black.
628
- * @param amount - valid between 1-100
629
- */
630
- darken(e = 10) {
631
- const t = this.toHsl();
632
- return t.l -= e / 100, t.l = U(t.l), new C(t);
633
- }
634
- /**
635
- * Mix the color with pure white, from 0 to 100.
636
- * Providing 0 will do nothing, providing 100 will always return white.
637
- * @param amount - valid between 1-100
638
- */
639
- tint(e = 10) {
640
- return this.mix("white", e);
641
- }
642
- /**
643
- * Mix the color with pure black, from 0 to 100.
644
- * Providing 0 will do nothing, providing 100 will always return black.
645
- * @param amount - valid between 1-100
646
- */
647
- shade(e = 10) {
648
- return this.mix("black", e);
649
- }
650
- /**
651
- * Desaturate the color a given amount, from 0 to 100.
652
- * Providing 100 will is the same as calling greyscale
653
- * @param amount - valid between 1-100
654
- */
655
- desaturate(e = 10) {
656
- const t = this.toHsl();
657
- return t.s -= e / 100, t.s = U(t.s), new C(t);
658
- }
659
- /**
660
- * Saturate the color a given amount, from 0 to 100.
661
- * @param amount - valid between 1-100
662
- */
663
- saturate(e = 10) {
664
- const t = this.toHsl();
665
- return t.s += e / 100, t.s = U(t.s), new C(t);
666
- }
667
- /**
668
- * Completely desaturates a color into greyscale.
669
- * Same as calling `desaturate(100)`
670
- */
671
- greyscale() {
672
- return this.desaturate(100);
673
- }
674
- /**
675
- * Spin takes a positive or negative amount within [-360, 360] indicating the change of hue.
676
- * Values outside of this range will be wrapped into this range.
677
- */
678
- spin(e) {
679
- const t = this.toHsl(), n = (t.h + e) % 360;
680
- return t.h = n < 0 ? 360 + n : n, new C(t);
681
- }
682
- /**
683
- * Mix the current color a given amount with another color, from 0 to 100.
684
- * 0 means no mixing (return current color).
685
- */
686
- mix(e, t = 50) {
687
- const n = this.toRgb(), s = new C(e).toRgb(), i = t / 100, o = {
688
- r: (s.r - n.r) * i + n.r,
689
- g: (s.g - n.g) * i + n.g,
690
- b: (s.b - n.b) * i + n.b,
691
- a: (s.a - n.a) * i + n.a
692
- };
693
- return new C(o);
694
- }
695
- analogous(e = 6, t = 30) {
696
- const n = this.toHsl(), s = 360 / t, i = [this];
697
- for (n.h = (n.h - (s * e >> 1) + 720) % 360; --e; )
698
- n.h = (n.h + s) % 360, i.push(new C(n));
699
- return i;
700
- }
701
- /**
702
- * taken from https://github.com/infusion/jQuery-xcolor/blob/master/jquery.xcolor.js
703
- */
704
- complement() {
705
- const e = this.toHsl();
706
- return e.h = (e.h + 180) % 360, new C(e);
707
- }
708
- monochromatic(e = 6) {
709
- const t = this.toHsv(), { h: n } = t, { s } = t;
710
- let { v: i } = t;
711
- const o = [], a = 1 / e;
712
- for (; e--; )
713
- o.push(new C({ h: n, s, v: i })), i = (i + a) % 1;
714
- return o;
715
- }
716
- splitcomplement() {
717
- const e = this.toHsl(), { h: t } = e;
718
- return [
719
- this,
720
- new C({ h: (t + 72) % 360, s: e.s, l: e.l }),
721
- new C({ h: (t + 216) % 360, s: e.s, l: e.l })
722
- ];
723
- }
724
- /**
725
- * Compute how the color would appear on a background
726
- */
727
- onBackground(e) {
728
- const t = this.toRgb(), n = new C(e).toRgb(), s = t.a + n.a * (1 - t.a);
729
- return new C({
730
- r: (t.r * t.a + n.r * n.a * (1 - t.a)) / s,
731
- g: (t.g * t.a + n.g * n.a * (1 - t.a)) / s,
732
- b: (t.b * t.a + n.b * n.a * (1 - t.a)) / s,
733
- a: s
734
- });
735
- }
736
- /**
737
- * Alias for `polyad(3)`
738
- */
739
- triad() {
740
- return this.polyad(3);
741
- }
742
- /**
743
- * Alias for `polyad(4)`
744
- */
745
- tetrad() {
746
- return this.polyad(4);
747
- }
748
- /**
749
- * Get polyad colors, like (for 1, 2, 3, 4, 5, 6, 7, 8, etc...)
750
- * monad, dyad, triad, tetrad, pentad, hexad, heptad, octad, etc...
751
- */
752
- polyad(e) {
753
- const t = this.toHsl(), { h: n } = t, s = [this], i = 360 / e;
754
- for (let o = 1; o < e; o++)
755
- s.push(
756
- new C({ h: (n + o * i) % 360, s: t.s, l: t.l })
757
- );
758
- return s;
759
- }
760
- /**
761
- * compare color vs current color
762
- */
763
- equals(e) {
764
- const t = new C(e);
765
- return this.format === "cmyk" || t.format === "cmyk" ? this.toCmykString() === t.toCmykString() : this.toRgbString() === t.toRgbString();
766
- }
767
- }
768
- function fe(r, e) {
769
- const {
770
- getPrefixCls: t,
771
- locale: n,
772
- componentConfig: s
773
- } = nt(q), i = Ct(
774
- r,
775
- {},
776
- s == null ? void 0 : s.Empty
777
- ), { style: o, className: a, description: f, icon: l, imgSrc: c, ...u } = i, m = t("empty"), b = j(m, a), p = n.Empty.noData, h = typeof f == "string" ? f : "empty";
778
- return /* @__PURE__ */ d("div", { ref: e, className: b, style: o, ...u, children: /* @__PURE__ */ V("div", { className: `${m}-wrapper`, children: [
779
- /* @__PURE__ */ d("div", { className: `${m}-image`, children: c ? /* @__PURE__ */ d("img", { alt: h, src: c }) : l || /* @__PURE__ */ d(Gt, {}) }),
780
- /* @__PURE__ */ d("div", { className: `${m}-description`, children: f || p })
781
- ] }) });
782
- }
783
- const St = bt(fe);
784
- St.displayName = "Empty";
785
- const de = G.memo(St);
786
- function ue(r) {
787
- switch (r) {
788
- default:
789
- return /* @__PURE__ */ d(de, {});
790
- }
791
- }
792
- const Rt = {
793
- locale: Jt,
794
- prefixCls: "pqb",
795
- getPopupContainer: () => document.body,
796
- size: "default",
797
- renderEmpty: ue
798
- }, q = qt({
799
- getPrefixCls: (r, e) => `${e || "pqb"}-${r}`,
800
- ...Rt
801
- });
802
- function ge(r, e) {
803
- const {
804
- children: t,
805
- className: n,
806
- disabled: s,
807
- prefix: i,
808
- size: o = "default",
809
- ...a
810
- } = r, { getPrefixCls: f } = nt(q), l = f("icon-hover"), c = st();
811
- return xt(e, () => ({
812
- getRootDOMNode: () => c.current
813
- })), /* @__PURE__ */ d(
814
- "span",
815
- {
816
- ref: c,
817
- className: j(
818
- l,
819
- {
820
- [`${i}-icon-hover`]: i,
821
- [`${l}-size-${o}`]: o && o !== "default",
822
- [`${l}-disabled`]: s
823
- },
824
- n
825
- ),
826
- onClick: r.onClick,
827
- ...a,
828
- children: t
829
- }
830
- );
831
- }
832
- const ht = G.forwardRef(ge);
833
- class J extends Ot {
834
- constructor(t) {
835
- super(t);
836
- g(this, "context");
837
- g(this, "wrapper");
838
- g(this, "timer");
839
- g(this, "rootDOMRef");
840
- g(this, "getRootDOMNode", () => this.rootDOMRef.current);
841
- g(this, "startTimer", () => {
842
- const { duration: t, onClose: n, id: s } = this.props;
843
- t !== 0 && (this.timer = window.setTimeout(() => {
844
- n == null || n(s), this.removeTimer();
845
- }, t));
846
- });
847
- g(this, "removeTimer", () => {
848
- this.timer && (window.clearTimeout(this.timer), this.timer = null);
849
- });
850
- g(this, "onClose", () => {
851
- var t, n;
852
- (n = (t = this.props).onClose) == null || n.call(t, this.props.id);
853
- });
854
- g(this, "renderIcon", () => {
855
- const { showIcon: t, icon: n, type: s, prefixCls: i, iconPrefix: o } = this.props;
856
- let a;
857
- if (n)
858
- a = n;
859
- else if (t) {
860
- switch (s) {
861
- case "info":
862
- a = /* @__PURE__ */ d(Bt, {});
863
- break;
864
- case "success":
865
- a = /* @__PURE__ */ d(Ut, {});
866
- break;
867
- case "error":
868
- a = /* @__PURE__ */ d(Wt, {});
869
- break;
870
- case "warning":
871
- a = /* @__PURE__ */ d(zt, {});
872
- break;
873
- case "loading":
874
- a = /* @__PURE__ */ d(Vt, {});
875
- break;
876
- }
877
- a = /* @__PURE__ */ d(
878
- _.Provider,
879
- {
880
- value: o ? { prefixCls: o } : {},
881
- children: a
882
- }
883
- );
884
- }
885
- return /* @__PURE__ */ d("span", { className: `${i}-icon`, children: a });
886
- });
887
- g(this, "onMouseEnter", () => {
888
- this.removeTimer();
889
- });
890
- g(this, "onMouseLeave", () => {
891
- this.removeTimer(), this.startTimer();
892
- });
893
- this.rootDOMRef = jt();
894
- }
895
- componentDidMount() {
896
- this.startTimer();
897
- }
898
- componentDidUpdate(t) {
899
- (t.duration !== this.props.duration || this.props.update) && (this.removeTimer(), this.startTimer());
900
- }
901
- componentWillUnmount() {
902
- this.removeTimer();
903
- }
904
- render() {
905
- const {
906
- title: t,
907
- content: n,
908
- showIcon: s,
909
- className: i,
910
- style: o,
911
- type: a,
912
- btn: f,
913
- icon: l,
914
- prefixCls: c,
915
- closable: u,
916
- noticeType: m,
917
- iconPrefix: b,
918
- rtl: p,
919
- closeIcon: h,
920
- classPrefixCls: x
921
- } = this.props, y = j(
922
- c,
923
- `${c}-${a}`,
924
- {
925
- [`${c}-closable`]: u,
926
- [`${c}-rtl`]: p
927
- },
928
- i
929
- );
930
- let $ = "closable" in this.props ? u : !0, v = s;
931
- a === "normal" && !l && (v = !1);
932
- const L = { ...this.context };
933
- if (x && (L.prefixCls = x), m === "message")
934
- return $ = u, /* @__PURE__ */ d(K, { ...L, children: /* @__PURE__ */ d(
935
- "div",
936
- {
937
- style: { textAlign: "center" },
938
- onMouseEnter: this.onMouseEnter,
939
- onMouseLeave: this.onMouseLeave,
940
- ref: this.rootDOMRef,
941
- children: /* @__PURE__ */ V("div", { className: y, style: o, role: "alert", children: [
942
- v && this.renderIcon(),
943
- /* @__PURE__ */ d("span", { className: `${c}-content`, children: n }),
944
- $ && (h !== void 0 ? /* @__PURE__ */ d(
945
- "span",
946
- {
947
- onClick: this.onClose,
948
- className: `${c}-close-btn`,
949
- children: h
950
- }
951
- ) : /* @__PURE__ */ d(
952
- ht,
953
- {
954
- prefix: c,
955
- className: `${c}-close-btn`,
956
- onClick: this.onClose,
957
- children: /* @__PURE__ */ d(it, {})
958
- }
959
- ))
960
- ] })
961
- }
962
- ) });
963
- if (m === "notification")
964
- return /* @__PURE__ */ d(K, { ...L, children: /* @__PURE__ */ d(
965
- "div",
966
- {
967
- ref: this.rootDOMRef,
968
- onMouseEnter: this.onMouseEnter,
969
- onMouseLeave: this.onMouseLeave,
970
- children: /* @__PURE__ */ V("div", { className: y, style: o, role: "alert", children: [
971
- v && /* @__PURE__ */ d("div", { className: `${c}-left`, children: this.renderIcon() }),
972
- /* @__PURE__ */ V("div", { className: `${c}-right`, children: [
973
- t && /* @__PURE__ */ d("div", { className: `${c}-title`, children: t }),
974
- /* @__PURE__ */ d("div", { className: `${c}-content`, children: n }),
975
- f && /* @__PURE__ */ d("div", { className: `${c}-btn-wrapper`, children: f })
976
- ] }),
977
- $ && (h !== void 0 ? /* @__PURE__ */ d(
978
- "span",
979
- {
980
- onClick: this.onClose,
981
- className: `${c}-close-btn`,
982
- children: h
983
- }
984
- ) : /* @__PURE__ */ d(
985
- ht,
986
- {
987
- prefix: c,
988
- className: `${c}-close-btn`,
989
- onClick: this.onClose,
990
- children: /* @__PURE__ */ d(
991
- _.Provider,
992
- {
993
- value: b ? { prefixCls: b } : {},
994
- children: /* @__PURE__ */ d(it, {})
995
- }
996
- )
997
- }
998
- ))
999
- ] })
1000
- }
1001
- ) });
1002
- }
1003
- }
1004
- g(J, "defaultProps", {
1005
- type: "info",
1006
- showIcon: !0,
1007
- noticeType: "message",
1008
- duration: 3e3
1009
- }), g(J, "contextType", q);
1010
- function me(r = {}) {
1011
- const { maxCount: e, duration: t = 3e3, prefixCls: n } = r, s = st(), i = /* @__PURE__ */ d(Ht, { ref: s }), o = {};
1012
- let a;
1013
- function f(c) {
1014
- let u, m;
1015
- if (s.current) {
1016
- const v = s.current.getContextConfig();
1017
- m = v.rtl, u = v.prefixCls;
1018
- }
1019
- const b = n || u, p = {
1020
- position: "top",
1021
- duration: t,
1022
- ...c
1023
- }, { position: h, transitionClassNames: x } = p;
1024
- let y;
1025
- if (o[h]) {
1026
- const v = o[h].state.notices;
1027
- v.length >= e ? (y = v[0].id, v.shift(), o[h].add({ ...p, id: y })) : y = o[h].add(p);
1028
- } else
1029
- a = /* @__PURE__ */ d(
1030
- M,
1031
- {
1032
- transitionClassNames: x,
1033
- ref: (v) => {
1034
- o[h] = v, o[h] && (y = o[h].add(p));
1035
- },
1036
- prefixCls: b,
1037
- rtl: m
1038
- }
1039
- ), s.current.addInstance(a);
1040
- return () => {
1041
- o[h] && o[h].remove(y);
1042
- };
1043
- }
1044
- const l = {};
1045
- return ["info", "success", "warning", "error", "normal"].forEach((c) => {
1046
- l[c] = (u) => {
1047
- const m = Kt(u) ? { content: u } : u;
1048
- return f({
1049
- ...m,
1050
- type: c
1051
- });
1052
- };
1053
- }), [l, i];
1054
- }
1055
- const pe = [
1056
- "info",
1057
- "success",
1058
- "error",
1059
- "warning",
1060
- "loading",
1061
- "normal"
1062
- ];
1063
- let A = {}, Nt, ft, Et, et, dt, ut;
1064
- function At(r) {
1065
- const e = {
1066
- position: "top",
1067
- duration: Et,
1068
- ...r
1069
- }, { position: t, transitionClassNames: n, transitionTimeout: s } = e;
1070
- let i;
1071
- const { instance: o, pending: a } = A[t] || {};
1072
- if (o || a) {
1073
- const l = () => {
1074
- const { instance: c } = A[t] || {}, u = c.state.notices, m = u.find((p) => p.id === r.id), b = {
1075
- ...e,
1076
- update: m
1077
- };
1078
- u.length >= Nt ? m ? c.add({
1079
- ...b,
1080
- id: m.id
1081
- }) : (u.shift(), c.add(b)) : i = c.add(b);
1082
- };
1083
- o ? l() : a != null && a.then && a.then(() => {
1084
- l(), A[t].pending = null;
1085
- });
1086
- } else {
1087
- const l = document.createElement("div");
1088
- (et || document.body).appendChild(l), A[t] = {}, A[t].pending = new Promise((c) => {
1089
- $t(
1090
- /* @__PURE__ */ d(
1091
- M,
1092
- {
1093
- transitionClassNames: n,
1094
- transitionTimeout: s,
1095
- ref: (u) => {
1096
- A[t] || (A[t] = {}), A[t].instance = u, i = u.add(e), c(null);
1097
- }
1098
- }
1099
- ),
1100
- l
1101
- );
1102
- });
1103
- }
1104
- return () => {
1105
- var l, c;
1106
- (c = (l = A[t]) == null ? void 0 : l.instance) == null || c.remove(i);
1107
- };
1108
- }
1109
- class M extends wt {
1110
- constructor() {
1111
- super(...arguments);
1112
- g(this, "remove", (t) => {
1113
- const n = this.state.notices.find((s) => s.id === t);
1114
- n && this.update({
1115
- ...n,
1116
- style: { ...n.style, opacity: 0 }
1117
- }), setTimeout(() => {
1118
- super.remove(t);
1119
- }, 100);
1120
- });
1121
- }
1122
- render() {
1123
- const {
1124
- transitionClassNames: t,
1125
- transitionTimeout: n,
1126
- prefixCls: s,
1127
- rtl: i,
1128
- closable: o
1129
- } = this.props, { notices: a, position: f } = this.state, l = s || ft, c = F(i) ? dt : i, u = F(o) ? ut : o, m = l ? `${l}-message` : "pqb-message", b = {
1130
- enter: O(n == null ? void 0 : n.enter) ? n == null ? void 0 : n.enter : 100,
1131
- exit: O(n == null ? void 0 : n.exit) ? n == null ? void 0 : n.exit : 300
1132
- }, p = j(
1133
- `${m}-wrapper`,
1134
- `${m}-wrapper-${f}`
1135
- );
1136
- return /* @__PURE__ */ d("div", { className: p, children: /* @__PURE__ */ d(yt, { component: null, children: a.map((h) => /* @__PURE__ */ d(
1137
- vt,
1138
- {
1139
- timeout: b,
1140
- classNames: t || "fadeMessage",
1141
- onExit: (x) => {
1142
- x && (x.style.height = `${x.scrollHeight}px`);
1143
- },
1144
- onExiting: (x) => {
1145
- x && (x.style.height = 0);
1146
- },
1147
- onExited: (x) => {
1148
- var y;
1149
- x && (x.style.height = 0, (y = h.onClose) == null || y.call(h));
1150
- },
1151
- children: /* @__PURE__ */ d(
1152
- J,
1153
- {
1154
- ...h,
1155
- prefixCls: m,
1156
- classPrefixCls: l,
1157
- iconPrefix: l,
1158
- onClose: this.remove,
1159
- noticeType: "message",
1160
- rtl: c,
1161
- ...F(u) ? {} : { closable: u }
1162
- }
1163
- )
1164
- },
1165
- h.id
1166
- )) }) });
1167
- }
1168
- }
1169
- g(M, "useMessage"), g(M, "success"), g(M, "info"), g(M, "warning"), g(M, "error"), g(M, "loading"), g(M, "normal"), g(M, "config", (t = {}) => {
1170
- var n;
1171
- O(t.maxCount) && (Nt = t.maxCount), t.prefixCls && (ft = t.prefixCls), O(t.duration) && (Et = t.duration), typeof t.rtl == "boolean" && (dt = t.rtl), typeof t.closable == "boolean" && (ut = t.closable), ((n = t.getContainer) == null ? void 0 : n.call(t)) !== et && (et = t.getContainer(), Object.values(A).forEach(
1172
- ({ instance: s }) => s == null ? void 0 : s.clear()
1173
- ), A = {});
1174
- }), g(M, "clear", () => {
1175
- Object.values(A).forEach(({ instance: t }) => {
1176
- t == null || t.clear();
1177
- });
1178
- }), g(M, "addInstance", At);
1179
- pe.forEach((r) => {
1180
- M[r] = (e) => At({
1181
- ...typeof e == "string" ? { content: e } : e,
1182
- type: r
1183
- });
1184
- });
1185
- M.useMessage = me;
1186
- let Pt = {};
1187
- function be(r) {
1188
- Pt = {
1189
- ...r
1190
- };
1191
- }
1192
- function Je() {
1193
- return Pt;
1194
- }
1195
- let rt = {
1196
- simple: !0
1197
- };
1198
- const Ke = (r) => {
1199
- rt = {
1200
- ...rt,
1201
- ...r
1202
- };
1203
- }, Qe = () => rt, Xe = [], Ye = [];
1204
- function xe(r = {}) {
1205
- const {
1206
- maxCount: e,
1207
- duration: t = 3e3,
1208
- prefixCls: n,
1209
- getContainer: s
1210
- } = r, i = st(), o = /* @__PURE__ */ d(Ht, { ref: i }), a = {};
1211
- let f;
1212
- function l(u) {
1213
- let m, b;
1214
- if (i.current) {
1215
- const $ = i.current.getContextConfig();
1216
- b = $.rtl, m = $.prefixCls;
1217
- }
1218
- const p = n || m;
1219
- let h = u.position;
1220
- F(u.position) && (h = b ? "topLeft" : "topRight");
1221
- const x = {
1222
- duration: t,
1223
- ...u
1224
- };
1225
- let y;
1226
- if (a[h]) {
1227
- const $ = a[h].state.notices;
1228
- $.length >= e ? (y = $[0].id, $.shift(), a[h].add({ ...x, id: y })) : y = a[h].add(x);
1229
- } else
1230
- f = /* @__PURE__ */ d(
1231
- T,
1232
- {
1233
- ref: ($) => {
1234
- a[h] = $, a[h] && (y = a[h].add(x));
1235
- },
1236
- prefixCls: p,
1237
- rtl: b,
1238
- getContainer: s
1239
- }
1240
- ), i.current.addInstance(f);
1241
- return a[h];
1242
- }
1243
- const c = {};
1244
- return ["info", "success", "warning", "error", "normal"].forEach((u) => {
1245
- c[u] = (m) => l({
1246
- ...m,
1247
- type: u
1248
- });
1249
- }), [c, o];
1250
- }
1251
- const Ce = ["info", "success", "error", "warning", "normal"];
1252
- let S = {}, gt, mt, pt, Z, B;
1253
- const N = class N extends wt {
1254
- constructor() {
1255
- super(...arguments);
1256
- g(this, "remove", (t) => {
1257
- const n = this.state.notices.find((s) => s.id === t);
1258
- n && this.update({
1259
- ...n,
1260
- style: { ...n.style, opacity: 0 }
1261
- }), setTimeout(() => {
1262
- super.remove(t);
1263
- }, 200);
1264
- });
1265
- }
1266
- render() {
1267
- const { notices: t } = this.state, { prefixCls: n, rtl: s, getContainer: i } = this.props;
1268
- let o = this.state.position;
1269
- const a = F(s) ? B : s;
1270
- F(o) && (o = a ? "topLeft" : "topRight");
1271
- const f = n || mt, l = f ? `${f}-notification` : "pqb-notification";
1272
- let c;
1273
- o === "topLeft" || o === "bottomLeft" ? c = "slideNoticeLeft" : c = "slideNoticeRight";
1274
- const u = j(
1275
- `${l}-wrapper`,
1276
- `${l}-wrapper-${o}`,
1277
- { [`${l}-wrapper-rtl`]: B }
1278
- ), m = i == null ? void 0 : i(), b = /* @__PURE__ */ d("div", { className: u, children: /* @__PURE__ */ d(yt, { component: null, children: t.map((p) => /* @__PURE__ */ d(
1279
- vt,
1280
- {
1281
- timeout: {
1282
- enter: 400,
1283
- exit: 300
1284
- },
1285
- classNames: c,
1286
- onExit: (h) => {
1287
- h && (h.style.height = `${h.scrollHeight}px`);
1288
- },
1289
- onExiting: (h) => {
1290
- h && (h.style.height = 0);
1291
- },
1292
- onExited: (h) => {
1293
- var x;
1294
- h && (h.style.height = 0, (x = p.onClose) == null || x.call(p));
1295
- },
1296
- children: /* @__PURE__ */ d(
1297
- J,
1298
- {
1299
- ...p,
1300
- onClose: this.remove,
1301
- prefixCls: l,
1302
- iconPrefix: f,
1303
- classPrefixCls: f,
1304
- noticeType: "notification",
1305
- rtl: a
1306
- }
1307
- )
1308
- },
1309
- p.id
1310
- )) }) });
1311
- return m ? Qt(b, m) : b;
1312
- }
1313
- };
1314
- g(N, "useNotification"), g(N, "success"), g(N, "info"), g(N, "warning"), g(N, "error"), g(N, "normal"), g(N, "config", (t = {}) => {
1315
- var n;
1316
- O(t.maxCount) && (gt = t.maxCount), t.prefixCls && (mt = t.prefixCls), O(t.duration) && (pt = t.duration), typeof t.rtl == "boolean" && (B = t.rtl), t.getContainer && ((n = t.getContainer) == null ? void 0 : n.call(t)) !== Z && (Z = t.getContainer(), Object.values(S).forEach(
1317
- ({ instance: s }) => s == null ? void 0 : s.clear()
1318
- ), S = {});
1319
- }), g(N, "clear", () => {
1320
- Object.values(S).forEach(({ instance: t }) => {
1321
- t == null || t.clear();
1322
- });
1323
- }), g(N, "remove", (t) => {
1324
- Object.values(S).forEach(({ instance: n }) => {
1325
- n == null || n.remove(t);
1326
- });
1327
- }), g(N, "addInstance", (t) => {
1328
- let n = t.position;
1329
- F(t.position) && (n = B ? "topLeft" : "topRight");
1330
- const s = {
1331
- duration: pt,
1332
- ...t
1333
- }, { instance: i, pending: o } = S[n] || {};
1334
- if (i || o) {
1335
- const f = () => {
1336
- const { instance: l } = S[n] || {}, c = l.state.notices, u = c.find((b) => b.id === t.id), m = {
1337
- ...s,
1338
- update: u
1339
- };
1340
- return c.length >= gt ? u ? l.add({
1341
- ...m,
1342
- id: u.id
1343
- }) : (c.shift(), l.add(m)) : l.add({ ...m }), l;
1344
- };
1345
- return i ? f() : o != null && o.then && o.then(() => {
1346
- f(), S[n].pending = null;
1347
- }), i;
1348
- }
1349
- const a = document.createElement("div");
1350
- return (Z || document.body).appendChild(a), S[n] = {}, S[n].pending = new Promise((f) => {
1351
- $t(
1352
- /* @__PURE__ */ d(
1353
- N,
1354
- {
1355
- ref: (l) => (S[n] || (S[n] = {}), S[n].instance = l, l.add(s), f(null), l)
1356
- }
1357
- ),
1358
- a
1359
- );
1360
- }), S[n].instance;
1361
- });
1362
- let T = N;
1363
- Ce.forEach((r) => {
1364
- T[r] = (e) => T.addInstance({
1365
- ...e,
1366
- type: r
1367
- });
1368
- });
1369
- T.useNotification = xe;
1370
- const ye = {
1371
- primaryColor: {
1372
- default: "--pqbblue-6",
1373
- hover: "--pqbblue-5",
1374
- active: "--pqbblue-7"
1375
- },
1376
- successColor: {
1377
- default: "--green-6",
1378
- hover: "--green-5",
1379
- active: "--green-7"
1380
- },
1381
- infoColor: {
1382
- default: "--pqbblue-6",
1383
- hover: "--pqbblue-5",
1384
- active: "--pqbblue-7"
1385
- },
1386
- warningColor: {
1387
- default: "--orangered-6",
1388
- hover: "--orangered-5",
1389
- active: "--orangered-7"
1390
- },
1391
- dangerColor: {
1392
- default: "--red-6",
1393
- hover: "--red-5",
1394
- active: "--red-7"
1395
- }
1396
- }, ve = Rt, we = {};
1397
- function K(r) {
1398
- const e = Ct(
1399
- r,
1400
- ve,
1401
- we
1402
- ), {
1403
- theme: t,
1404
- themeMode: n,
1405
- prefixCls: s,
1406
- children: i,
1407
- locale: o,
1408
- rtl: a,
1409
- effectGlobalNotice: f = !0,
1410
- effectGlobalModal: l = !0
1411
- } = e, c = window.document.body;
1412
- D(() => {
1413
- t && Dt(t) && Object.entries(ye).forEach(([p, h], x, y) => {
1414
- const $ = t[p];
1415
- if (!$) return;
1416
- const v = new C($);
1417
- c.style.setProperty(h.default, v.lighten(0).toRgbArrayString()), t[`${p}Hover`] || c.style.setProperty(h.hover, v.lighten(10).toRgbArrayString()), t[`${p}Active`] || c.style.setProperty(h.active, v.lighten(-10).toRgbArrayString());
1418
- });
1419
- }, [t]), D(() => {
1420
- const p = ["pqb-theme"];
1421
- return n ? p.forEach((h) => {
1422
- c.setAttribute(h, n);
1423
- }) : p.forEach((h) => {
1424
- c.removeAttribute(h);
1425
- }), () => {
1426
- };
1427
- }, [n]), D(() => {
1428
- f && (M.config({ prefixCls: s, rtl: a }), T.config({ prefixCls: s, rtl: a }));
1429
- }, [s, a, f]);
1430
- function u(p, h) {
1431
- return `${h || s}-${p}`;
1432
- }
1433
- const m = {
1434
- ...Xt(e, ["children"]),
1435
- getPrefixCls: u
1436
- };
1437
- D(() => {
1438
- l && be({ locale: o, prefixCls: s, rtl: a });
1439
- }, [o, s, a, l]);
1440
- let b = i;
1441
- return s && s !== "pqb" && (b = /* @__PURE__ */ d(_.Provider, { value: { prefixCls: s }, children: i })), /* @__PURE__ */ d(q.Provider, { value: m, children: b });
1442
- }
1443
- K.ConfigContext = q;
1444
- K.displayName = "ConfigProvider";
1445
- const Ze = q.Consumer;
1446
- function It(r, e) {
1447
- const t = nt(q), [n, s] = Lt([]);
1448
- function i(f) {
1449
- s((l) => [...l, f]);
1450
- }
1451
- function o(f) {
1452
- s(
1453
- (l) => l.filter((c) => f !== c)
1454
- );
1455
- }
1456
- function a() {
1457
- return t;
1458
- }
1459
- return xt(e, () => ({
1460
- addInstance: i,
1461
- removeInstance: o,
1462
- getContextConfig: a
1463
- })), G.Children.map(
1464
- n,
1465
- (f, l) => G.cloneElement(f, { key: l })
1466
- );
1467
- }
1468
- It.displayName = "ContextHolderElement";
1469
- const Ht = bt(It);
1470
- export {
1471
- ot as $,
1472
- Ht as C,
1473
- de as E,
1474
- lt as F,
1475
- ne as G,
1476
- at as H,
1477
- ht as I,
1478
- Ge as J,
1479
- M,
1480
- kt as N,
1481
- ee as O,
1482
- se as T,
1483
- oe as U,
1484
- re as W,
1485
- K as a,
1486
- Ze as b,
1487
- ye as c,
1488
- q as d,
1489
- R as e,
1490
- C as f,
1491
- T as g,
1492
- xe as h,
1493
- Xe as i,
1494
- Je as j,
1495
- Qe as k,
1496
- Ye as l,
1497
- J as m,
1498
- Ke as s,
1499
- me as u,
1500
- X as y
1501
- };