@unicom-cloud/ui 0.8.95 → 0.8.97

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 (326) hide show
  1. package/Affix.js +1 -1
  2. package/Carousel.js +1 -1
  3. package/LiquidFill.js +4 -0
  4. package/Message.js +1 -1
  5. package/Notification.js +1 -1
  6. package/OverflowEllipsis.js +1 -1
  7. package/PageHeader.js +1 -1
  8. package/QrCode.js +57 -0
  9. package/Switch.js +1 -1
  10. package/Tour.js +63 -0
  11. package/Trigger.js +2 -2
  12. package/_virtual/_commonjsHelpers.js +6 -0
  13. package/_virtual/index.js +7 -0
  14. package/_virtual/index2.js +4 -0
  15. package/affix/index.js +70 -72
  16. package/alert/index.js +52 -51
  17. package/anchor/Anchor.js +55 -55
  18. package/anchor/Link.js +34 -34
  19. package/anchor/util.js +5 -5
  20. package/auto-complete/index.js +116 -122
  21. package/avatar/Avatar.js +33 -33
  22. package/avatar/Group.js +26 -26
  23. package/back-top/index.js +58 -61
  24. package/badge/index.js +46 -46
  25. package/breadcrumb/Item.js +42 -43
  26. package/breadcrumb/index.js +47 -47
  27. package/button/Group.js +6 -6
  28. package/button/index.js +91 -91
  29. package/calendar/Month.js +75 -75
  30. package/calendar/Year.js +35 -35
  31. package/calendar/header/index.js +25 -25
  32. package/calendar/index.js +103 -103
  33. package/card/Grid.js +8 -8
  34. package/card/Meta.js +16 -16
  35. package/card/index.js +49 -49
  36. package/carousel/Arrow.js +19 -19
  37. package/carousel/Indicator.js +26 -26
  38. package/carousel/index.js +108 -108
  39. package/cascader/Cascader.js +178 -191
  40. package/cascader/base/node.js +133 -136
  41. package/cascader/base/store.js +82 -85
  42. package/cascader/panel/List.js +126 -130
  43. package/cascader/panel/Search.js +79 -81
  44. package/cascader/util.js +13 -13
  45. package/checkbox/Checkbox.js +94 -96
  46. package/checkbox/Group.js +54 -56
  47. package/checkbox/GroupBlock.js +28 -29
  48. package/collapse/Collapse.js +45 -45
  49. package/collapse/Item.js +53 -55
  50. package/color-picker/ControlBar.js +43 -43
  51. package/color-picker/InputAlpha.js +12 -12
  52. package/color-picker/InputHex.js +30 -31
  53. package/color-picker/InputRgb.js +24 -24
  54. package/color-picker/Palette.js +18 -18
  55. package/color-picker/Panel.js +122 -125
  56. package/color-picker/hooks/useColorPicker.js +85 -88
  57. package/color-picker/hooks/useControlBlock.js +38 -40
  58. package/color-picker/index.js +47 -47
  59. package/comment/index.js +29 -29
  60. package/components/common/higher-order/with-speech-synthesis/index.js +37 -40
  61. package/components/common/hooks/useForceUpdate.js +6 -2
  62. package/components/common/hooks/useId.js +4 -4
  63. package/components/common/hooks/useInView.js +16 -16
  64. package/components/common/hooks/useIntersectionObserver.js +1 -1
  65. package/components/common/hooks/useKeyboardEvent.js +9 -10
  66. package/components/common/hooks/useOverflowHidden.js +1 -4
  67. package/components/common/hooks/usePersistCallback.js +7 -7
  68. package/components/common/hooks/useStateCallback.js +9 -10
  69. package/components/common/hooks/useWindowSize.js +8 -8
  70. package/components/common/space/index.js +11 -10
  71. package/components/common/utils/PqbCSSTransition.js +1 -1
  72. package/components/common/utils/convertToDurationBasedOnTimeUnits.js +6 -0
  73. package/components/common/utils/dom.js +27 -29
  74. package/components/common/utils/findScrollParent.js +17 -0
  75. package/components/common/utils/intersectionObserver.js +21 -0
  76. package/components/common/utils/is.js +99 -109
  77. package/components/common/utils/mutationObserver.js +19 -0
  78. package/components/common/utils/reactDOM.js +34 -34
  79. package/components/common/utils/resizeObserver.js +21 -0
  80. package/copy/index.js +38 -40
  81. package/date-picker/Picker.js +290 -295
  82. package/date-picker/RangePicker.js +367 -372
  83. package/date-picker/index.js +33 -35
  84. package/date-picker/panel/Body.js +46 -47
  85. package/date-picker/panel/Header.js +33 -33
  86. package/date-picker/panel/Shortcut.js +31 -31
  87. package/date-picker/panel/date/index.js +85 -85
  88. package/date-picker/panel/month/index.js +59 -59
  89. package/date-picker/panel/quarter/index.js +67 -70
  90. package/date-picker/panel/range/index.js +101 -101
  91. package/date-picker/panel/year/index.js +39 -39
  92. package/date-picker/util.js +17 -18
  93. package/descriptions/index.js +62 -62
  94. package/details/index.js +55 -56
  95. package/development/index.js +9 -9
  96. package/dist/react-transition-group/src/CSSTransition.js +1 -1
  97. package/dist/react-transition-group/src/SwitchTransition.js +1 -1
  98. package/dist/tinycolor/chunk/BOzCVdr0.js +1 -1
  99. package/dist/tween/src/tween.js +24 -25
  100. package/dist/validate/src/index.js +5 -5
  101. package/dist/validate/src/util.js +1 -1
  102. package/divider/index.js +21 -21
  103. package/draggable/Item.js +35 -35
  104. package/draggable/index.js +22 -22
  105. package/drawer/Drawer.js +142 -147
  106. package/dropdown/Button.js +48 -48
  107. package/dropdown/index.js +88 -92
  108. package/empty/index.js +16 -16
  109. package/form/Control.js +211 -225
  110. package/form/Form.js +109 -113
  111. package/form/FormItem.js +118 -120
  112. package/form/FormList.js +60 -66
  113. package/form/FormProvider.js +31 -34
  114. package/form/hook/useContext.js +17 -19
  115. package/form/hook/useState.js +22 -23
  116. package/form/hook/useWatch.js +26 -27
  117. package/form/promisify.js +14 -18
  118. package/form/store.js +304 -316
  119. package/form/util.js +14 -15
  120. package/grid/Col.js +64 -64
  121. package/grid/Grid.js +51 -51
  122. package/grid/GridItem.js +48 -48
  123. package/grid/Row.js +39 -39
  124. package/hooks/index.js +50 -52
  125. package/hooks/useVerificationCode.js +41 -43
  126. package/hooks/useWatermark.js +89 -92
  127. package/icon/index.js +23 -24
  128. package/icon-hover/index.js +16 -16
  129. package/icons/file.js +11 -11
  130. package/image/Image.js +140 -141
  131. package/image/ImagePreview.js +252 -255
  132. package/image/ImagePreviewArrow.js +25 -25
  133. package/image/ImagePreviewGroup.js +62 -62
  134. package/image/util/getScale.js +25 -28
  135. package/index.js +682 -679
  136. package/input/Button.js +48 -50
  137. package/input/Group.js +9 -9
  138. package/input/Input.js +145 -154
  139. package/input/InputElement.js +108 -115
  140. package/input/Password.js +38 -38
  141. package/input/Search.js +51 -55
  142. package/input/Textarea.js +80 -81
  143. package/input/useComposition.js +23 -23
  144. package/input-number/decimal.js +59 -62
  145. package/input-number/index.js +139 -141
  146. package/input-tag/InputTag.js +223 -231
  147. package/layout/Content.js +6 -6
  148. package/layout/Footer.js +8 -8
  149. package/layout/Header.js +7 -7
  150. package/layout/Sider.js +88 -90
  151. package/layout/index.js +30 -30
  152. package/link/index.js +45 -46
  153. package/liquid-fill/LiquidFill.js +189 -0
  154. package/liquid-fill/LiquidFill2.js +3 -0
  155. package/liquid-fill/index.js +4 -0
  156. package/liquid-fill/interface.js +1 -0
  157. package/list/Item.js +28 -28
  158. package/list/Meta.js +12 -12
  159. package/list/index.js +146 -148
  160. package/mentions/index.js +75 -76
  161. package/menu/Item.js +58 -58
  162. package/menu/Menu.js +125 -127
  163. package/menu/OverflowWrap.js +39 -40
  164. package/menu/sub-menu/Inline.js +45 -45
  165. package/menu/util.js +26 -28
  166. package/message/index.js +97 -100
  167. package/message/useMessage.js +26 -27
  168. package/modal/Confirm.js +47 -49
  169. package/modal/Modal.js +250 -257
  170. package/modal/use-modal/Hook.js +26 -28
  171. package/modal/use-modal/index.js +46 -49
  172. package/notice/index.js +89 -90
  173. package/notification/index.js +61 -66
  174. package/notification/withNotification.js +35 -35
  175. package/overflow-ellipsis/OverflowItem.js +19 -20
  176. package/overflow-ellipsis/index.js +45 -46
  177. package/package.json +1 -1
  178. package/page-header/index.js +45 -45
  179. package/pagination/PageItem.js +87 -91
  180. package/pagination/PageJumper.js +40 -41
  181. package/pagination/PageOption.js +31 -35
  182. package/pagination/Pagination.js +162 -163
  183. package/picker/Input.js +90 -96
  184. package/picker/InputRange.js +115 -122
  185. package/popconfirm/index.js +98 -100
  186. package/popover/index.js +28 -28
  187. package/portal/Portal.js +10 -11
  188. package/progress/index.js +36 -36
  189. package/qr-code/index.js +99 -0
  190. package/qr-code/interface.js +1 -0
  191. package/radio/Group.js +48 -48
  192. package/radio/GroupBlock.js +32 -33
  193. package/radio/Radio.js +62 -64
  194. package/rate/index.js +88 -88
  195. package/resize-box/ResizeTrigger.js +39 -39
  196. package/resize-box/Split.js +92 -96
  197. package/resize-box/SplitGroup.js +116 -122
  198. package/resize-box/index.js +112 -115
  199. package/result/index.js +44 -44
  200. package/select/Option.js +53 -56
  201. package/select/Select.js +365 -381
  202. package/select/util.js +95 -99
  203. package/select-view/Core.js +159 -160
  204. package/skeleton/index.js +23 -23
  205. package/slider/Button.js +84 -92
  206. package/slider/Input.js +47 -49
  207. package/slider/Tick.js +28 -31
  208. package/slider/index.js +108 -108
  209. package/slider/util.js +1 -1
  210. package/space/index.js +26 -26
  211. package/space-/index.js +51 -51
  212. package/spin/DotLoading.js +8 -8
  213. package/spin/index.js +47 -47
  214. package/statistic/Countdown.js +37 -37
  215. package/statistic/index.js +61 -61
  216. package/steps/Step.js +42 -42
  217. package/steps/index.js +54 -54
  218. package/style.css +1 -1
  219. package/switch/index.js +78 -79
  220. package/table/ColGroup.js +36 -37
  221. package/table/Table.js +447 -450
  222. package/table/hook/useExpand.js +24 -24
  223. package/table/hook/useRowSelection.js +62 -62
  224. package/table/summary/Row.js +16 -17
  225. package/table/tbody/Td.js +119 -118
  226. package/table/tbody/Tr.js +119 -121
  227. package/table/tbody/index.js +62 -63
  228. package/table/th-resizable/index.js +30 -30
  229. package/table/thead/Column.js +148 -148
  230. package/table/thead/index.js +87 -88
  231. package/tabs/Tab.js +55 -55
  232. package/tabs/TabContent.js +8 -8
  233. package/tabs/TabPane.js +15 -15
  234. package/tabs/hook/useHeaderScroll.js +36 -36
  235. package/tabs/tab-header/TabInk.js +31 -33
  236. package/tabs/tab-header/TabNavIcon.js +34 -35
  237. package/tabs/tab-header/index.js +192 -195
  238. package/tag/index.js +94 -97
  239. package/time-picker/Picker.js +167 -172
  240. package/time-picker/RangePicker.js +28 -28
  241. package/time-picker/TimePicker.js +146 -146
  242. package/time-picker/util.js +4 -4
  243. package/timeline/Item.js +46 -46
  244. package/timeline/Timeline.js +52 -52
  245. package/tooltip/index.js +89 -95
  246. package/tour/index.js +289 -0
  247. package/transfer/Item.js +54 -54
  248. package/transfer/List.js +134 -136
  249. package/transfer/index.js +91 -91
  250. package/tree/Animation.js +49 -52
  251. package/tree/Node.js +114 -122
  252. package/tree/NodeList.js +51 -51
  253. package/tree/Tree.js +386 -393
  254. package/tree-select/List.js +71 -72
  255. package/tree-select/Select.js +135 -143
  256. package/tree-select/hook/useKeyCache.js +39 -39
  257. package/tree-select/hook/useStateValue.js +12 -12
  258. package/trigger/getPopupStyle.js +60 -61
  259. package/trigger/index.js +338 -347
  260. package/types/common/space/interface.d.ts +1 -1
  261. package/types/common/utils/convertToDurationBasedOnTimeUnits.d.ts +3 -0
  262. package/types/common/utils/findScrollParent.d.ts +2 -0
  263. package/types/common/utils/index.d.ts +5 -0
  264. package/types/common/utils/intersectionObserver.d.ts +2 -0
  265. package/types/common/utils/math.d.ts +1 -1
  266. package/types/common/utils/mutationObserver.d.ts +2 -0
  267. package/types/common/utils/resizeObserver.d.ts +2 -0
  268. package/types/pc/alert/interface.d.ts +2 -2
  269. package/types/pc/details/interface.d.ts +2 -2
  270. package/types/pc/hooks/index.d.ts +0 -1
  271. package/types/pc/index.d.ts +3 -0
  272. package/types/pc/liquid-fill/LiquidFill.d.ts +30 -0
  273. package/types/pc/liquid-fill/LiquidFill2.d.ts +1 -0
  274. package/types/pc/liquid-fill/index.d.ts +4 -0
  275. package/types/pc/liquid-fill/interface.d.ts +0 -0
  276. package/types/pc/qr-code/index.d.ts +34 -0
  277. package/types/pc/qr-code/interface.d.ts +39 -0
  278. package/types/pc/table/interface.d.ts +2 -2
  279. package/types/pc/tour/index.d.ts +42 -0
  280. package/types/pc/utils/convertToDurationBasedOnTimeUnits.d.ts +3 -0
  281. package/types/pc/utils/findScrollParent.d.ts +2 -0
  282. package/types/pc/utils/index.d.ts +5 -0
  283. package/types/pc/utils/intersectionObserver.d.ts +2 -0
  284. package/types/pc/utils/math.d.ts +1 -1
  285. package/types/pc/utils/mutationObserver.d.ts +2 -0
  286. package/types/pc/utils/names.d.ts +18 -0
  287. package/types/pc/utils/resizeObserver.d.ts +2 -0
  288. package/typography/Base.js +79 -81
  289. package/typography/EditContent.js +30 -33
  290. package/typography/Ellipsis.js +78 -75
  291. package/typography/Operations.js +50 -52
  292. package/typography/Paragraph.js +7 -7
  293. package/typography/Typography.js +7 -7
  294. package/typography/useEllipsis.js +105 -106
  295. package/upload/TriggerNode.js +69 -76
  296. package/upload/Upload.js +84 -87
  297. package/upload/Uploader.js +115 -118
  298. package/upload/list/PictureItem.js +61 -71
  299. package/upload/list/TextItem.js +61 -67
  300. package/upload/list/UploadProgress.js +42 -49
  301. package/upload/list/index.js +49 -50
  302. package/upload/request_.js +37 -38
  303. package/upload/util.js +39 -39
  304. package/utils/convertToDurationBasedOnTimeUnits.js +6 -0
  305. package/utils/findScrollParent.js +4 -0
  306. package/utils/index.js +274 -275
  307. package/utils/intersectionObserver.js +4 -0
  308. package/utils/math.js +7 -11
  309. package/utils/mutationObserver.js +4 -0
  310. package/utils/names.js +12 -0
  311. package/utils/reactTransitionGroup.js +1 -1
  312. package/utils/resizeObserver.js +4 -0
  313. package/verification-code/VerificationCode.js +50 -51
  314. package/version/index.js +1 -1
  315. package/virtual-list/VirtualList.js +243 -244
  316. package/virtual-list/util/item.js +3 -4
  317. package/watermark/Watermark.js +27 -31
  318. package/components/common/hooks/useComputedState.js +0 -11
  319. package/components/common/utils/resizeObserverEffect.js +0 -23
  320. package/hooks/useComputedState.js +0 -4
  321. package/types/common/hooks/useComputedState.d.ts +0 -4
  322. package/types/common/utils/resizeObserverEffect.d.ts +0 -2
  323. package/types/pc/hooks/useComputedState.d.ts +0 -1
  324. package/types/pc/utils/resizeObserverEffect.d.ts +0 -2
  325. package/utils/resizeObserverEffect.js +0 -4
  326. /package/dist/react-transition-group/chunk/{C6QwjD4L.js → CPfP7aNL.js} +0 -0
@@ -3,7 +3,7 @@ import { useState as l, useDeferredValue as h, useCallback as o, useEffect as m
3
3
  import z from "./useListenResize.js";
4
4
  const R = (i = !1) => {
5
5
  const [s, u] = l({
6
- ...n(null)
6
+ ...t(null)
7
7
  }), c = h(
8
8
  s
9
9
  // 延迟一个值与防抖和节流之间有什么不同?
@@ -14,17 +14,17 @@ const R = (i = !1) => {
14
14
  // 此外,与防抖或节流不同,useDeferredValue 执行的延迟重新渲染默认是可中断的。这意味着,如果 React 正在重新渲染一个大型列表,但用户进行了另一次键盘输入,React 会放弃该重新渲染,先处理键盘输入,然后再次开始在后台渲染。相比之下,防抖和节流仍会产生不顺畅的体验,因为它们是阻塞的:它们仅仅是将渲染阻塞键盘输入的时刻推迟了。
15
15
  // 如果你要优化的工作不是在渲染期间发生的,那么防抖和节流仍然非常有用。例如,它们可以让你减少网络请求的次数。你也可以同时使用这些技术。
16
16
  );
17
- function n(e) {
18
- const t = (e == null ? void 0 : e.currentTarget) ?? (e == null ? void 0 : e.target) ?? window;
17
+ function t(e) {
18
+ const r = e?.currentTarget ?? e?.target ?? window;
19
19
  return {
20
- width: (t == null ? void 0 : t.innerWidth) ?? 0,
21
- height: (t == null ? void 0 : t.innerHeight) ?? 0
20
+ width: r?.innerWidth ?? 0,
21
+ height: r?.innerHeight ?? 0
22
22
  };
23
23
  }
24
- function r(e) {
25
- u(n(e));
24
+ function n(e) {
25
+ u(t(e));
26
26
  }
27
- const a = o(r, []), f = o(d(r, 123), []);
27
+ const a = o(n, []), f = o(d(n, 123), []);
28
28
  return z(i ? f : a, []), m(() => () => {
29
29
  }, []), c;
30
30
  };
@@ -4,6 +4,7 @@ import { forwardRef as c } from "react";
4
4
  import "@unicom-cloud/utils/case-name";
5
5
  import _ from "@unicom-cloud/utils/class-name";
6
6
  import "../../../dist/tinycolor/chunk/BOzCVdr0.js";
7
+ import "@unicom-cloud/utils/dayjs";
7
8
  import "@unicom-cloud/utils/clipboard-copy";
8
9
  import "../utils/dayjs.js";
9
10
  import "../utils/dom.js";
@@ -12,6 +13,8 @@ import "lodash/escapeRegExp";
12
13
  import "lodash/isArray";
13
14
  import "lodash/isNumber";
14
15
  import "lodash/isString";
16
+ import "lodash/isFunction";
17
+ import "lodash/throttle";
15
18
  import "../utils/is.js";
16
19
  import "lodash/camelCase";
17
20
  import "lodash/capitalize";
@@ -26,7 +29,6 @@ import "lodash/set";
26
29
  import "lodash/setWith";
27
30
  import "lodash/snakeCase";
28
31
  import "lodash/startCase";
29
- import "lodash/throttle";
30
32
  import "lodash/uniq";
31
33
  import "lodash/upperFirst";
32
34
  import "@unicom-cloud/utils/math";
@@ -34,22 +36,21 @@ import "lodash/isPlainObject";
34
36
  import "../../../dist/react-transition-group/src/CSSTransition.js";
35
37
  import "../../../dist/react-transition-group/src/ReplaceTransition.js";
36
38
  import "../../../dist/react-transition-group/src/SwitchTransition.js";
37
- import "../../../dist/react-transition-group/chunk/C6QwjD4L.js";
39
+ import "../../../dist/react-transition-group/chunk/CPfP7aNL.js";
38
40
  import "../../../dist/react-transition-group/src/TransitionGroup.js";
39
41
  import "../utils/reactDOM.js";
40
42
  import "@unicom-cloud/utils/file/saveAs";
41
43
  import "@unicom-cloud/utils/screenfull";
42
44
  import "@unicom-cloud/utils/tree";
43
- import "lodash/isFunction";
45
+ import { isArray as l, isNumber as I } from "@unicom-cloud/utils/is";
44
46
  import "uuid";
45
47
  import "../../../dist/validate/src/index.js";
46
48
  import "@unicom-cloud/utils/constant/keyboardCode";
47
- import { isArray as l, isNumber as I } from "@unicom-cloud/utils/is";
48
49
  function f(t = 8) {
49
50
  if (I(t))
50
51
  return t;
51
52
  if (l(t))
52
- return t.map((i, r, p) => f(i));
53
+ return t.map((i, r, e) => f(i));
53
54
  switch (t) {
54
55
  case "mini":
55
56
  return 4;
@@ -65,7 +66,7 @@ function f(t = 8) {
65
66
  }
66
67
  function S(t, i) {
67
68
  const r = `${C}-space`, {
68
- className: p,
69
+ className: e,
69
70
  style: d,
70
71
  children: $,
71
72
  inline: y,
@@ -76,8 +77,8 @@ function S(t, i) {
76
77
  alignItems: g,
77
78
  ...w
78
79
  } = t;
79
- let e = g;
80
- n === "horizontal" && (e || (e = "center"));
80
+ let p = g;
81
+ n === "horizontal" && (p ||= "center");
81
82
  const o = f(N), m = { ...d };
82
83
  return l(o) ? (m.rowGap = o[0], m.columnGap = o[1]) : m.gap = o, /* @__PURE__ */ s(
83
84
  "div",
@@ -89,8 +90,8 @@ function S(t, i) {
89
90
  h && `${r}-wrap`,
90
91
  `${r}-${n}`,
91
92
  a && `${r}-justify-content-${a}`,
92
- e && `${r}-align-items-${e}`,
93
- p
93
+ p && `${r}-align-items-${p}`,
94
+ e
94
95
  ),
95
96
  style: m,
96
97
  ...w,
@@ -2,7 +2,7 @@ import { jsx as d } from "react/jsx-runtime";
2
2
  import u from "../../../dist/react-transition-group/src/CSSTransition.js";
3
3
  import "../../../dist/react-transition-group/src/ReplaceTransition.js";
4
4
  import "../../../dist/react-transition-group/src/SwitchTransition.js";
5
- import "../../../dist/react-transition-group/chunk/C6QwjD4L.js";
5
+ import "../../../dist/react-transition-group/chunk/CPfP7aNL.js";
6
6
  import "../../../dist/react-transition-group/src/TransitionGroup.js";
7
7
  import { useRef as f, useMemo as l, isValidElement as a, cloneElement as s } from "react";
8
8
  import { supportRef as E } from "./is.js";
@@ -0,0 +1,6 @@
1
+ import "@unicom-cloud/utils/dayjs";
2
+ import { convertToDurationBasedOnTimeUnits as i, convertToDurationBasedOnTimeUnits as r } from "@unicom-cloud/utils/dayjs";
3
+ export {
4
+ i as convertToDurationBasedOnTimeUnits,
5
+ r as default
6
+ };
@@ -1,51 +1,49 @@
1
- import { NOOP as u } from "./constant.js";
2
- const f = function() {
1
+ import { NOOP as i } from "./constant.js";
2
+ const l = function() {
3
3
  try {
4
4
  return !(typeof window < "u" && document !== void 0);
5
5
  } catch {
6
6
  return !0;
7
7
  }
8
- }(), E = /* @__PURE__ */ function() {
9
- return f ? u : function(t, c, o, n) {
10
- var r;
11
- (r = t == null ? void 0 : t.addEventListener) == null || r.call(t, c, o, n || !1);
8
+ }(), w = /* @__PURE__ */ function() {
9
+ return l ? i : function(t, o, n, e) {
10
+ t?.addEventListener?.(o, n, e || !1);
12
11
  };
13
- }(), g = /* @__PURE__ */ function() {
14
- return f ? u : function(t, c, o, n) {
15
- var r;
16
- (r = t == null ? void 0 : t.removeEventListener) == null || r.call(t, c, o, n || !1);
12
+ }(), E = /* @__PURE__ */ function() {
13
+ return l ? i : function(t, o, n, e) {
14
+ t?.removeEventListener?.(o, n, e || !1);
17
15
  };
18
- }(), p = function(t, c) {
16
+ }(), g = function(t, o) {
19
17
  if (!t)
20
18
  return !1;
21
19
  if (t.contains)
22
- return t.contains(c);
23
- let o = c;
24
- for (; o; ) {
25
- if (o === t)
20
+ return t.contains(o);
21
+ let n = o;
22
+ for (; n; ) {
23
+ if (n === t)
26
24
  return !0;
27
- o = o.parentNode;
25
+ n = n.parentNode;
28
26
  }
29
27
  return !1;
30
28
  };
31
29
  function h(t) {
32
30
  if (!(t instanceof HTMLElement) || t === document.documentElement || t === window)
33
31
  return !1;
34
- const c = t === document.documentElement ? t.clientHeight : t.offsetHeight, o = t === document.documentElement ? t.clientWidth : t.offsetWidth, n = t.scrollHeight, r = t.scrollWidth, i = window.getComputedStyle(t), l = i.getPropertyValue("overflow-x"), d = i.getPropertyValue("overflow-y"), s = ["scroll", "auto"], e = n > c && s.includes(d), a = r > o && s.includes(l);
35
- return e || a;
32
+ const o = t === document.documentElement ? t.clientHeight : t.offsetHeight, n = t === document.documentElement ? t.clientWidth : t.offsetWidth, e = t.scrollHeight, s = t.scrollWidth, c = window.getComputedStyle(t), u = c.getPropertyValue("overflow-x"), f = c.getPropertyValue("overflow-y"), r = ["scroll", "auto"], d = e > o && r.includes(f), a = s > n && r.includes(u);
33
+ return d || a;
36
34
  }
37
- const v = (t, c = document.documentElement) => {
38
- const o = [];
39
- let n = t;
40
- for (; n && n !== c; )
41
- h(n) && o.push(n), n = n.parentElement;
42
- return o;
35
+ const p = (t, o = document.documentElement) => {
36
+ const n = [];
37
+ let e = t;
38
+ for (; e && e !== o; )
39
+ h(e) && n.push(e), e = e.parentElement;
40
+ return n;
43
41
  };
44
42
  export {
45
- p as contains,
46
- v as getScrollElements,
43
+ g as contains,
44
+ p as getScrollElements,
47
45
  h as isScrollElement,
48
- f as isServerRendering,
49
- g as off,
50
- E as on
46
+ l as isServerRendering,
47
+ E as off,
48
+ w as on
51
49
  };
@@ -0,0 +1,17 @@
1
+ function i(o, l = !1) {
2
+ if (!o) return document.documentElement;
3
+ const n = getComputedStyle(o), r = n.position === "absolute", c = l ? /(auto|scroll|hidden)/ : /(auto|scroll)/;
4
+ if (n.position === "fixed")
5
+ return document.documentElement;
6
+ for (let t = o; t = t.parentElement; ) {
7
+ const e = getComputedStyle(t);
8
+ if (!(r && e.position === "static") && (c.test(
9
+ e.overflow + e.overflowY + e.overflowX
10
+ ) || t.scrollHeight > t.clientHeight))
11
+ return t;
12
+ }
13
+ return document.documentElement;
14
+ }
15
+ export {
16
+ i as default
17
+ };
@@ -0,0 +1,21 @@
1
+ import a from "lodash/isFunction";
2
+ import f from "lodash/throttle";
3
+ function h(c, n) {
4
+ const t = [].concat(c).filter(Boolean);
5
+ if (!(t.length && a(n))) return () => {
6
+ };
7
+ const o = f((...e) => {
8
+ n(...e);
9
+ }), r = new IntersectionObserver(o);
10
+ return t.forEach((e, i, s) => {
11
+ r.observe(e);
12
+ }), () => {
13
+ t.forEach((e, i, s) => {
14
+ r.unobserve(e);
15
+ }), r.disconnect(), o.cancel();
16
+ };
17
+ }
18
+ export {
19
+ h as default,
20
+ h as intersectionObserver
21
+ };
@@ -1,126 +1,116 @@
1
- import { isPlainObject as y } from "@unicom-cloud/utils/is";
2
- import { isArguments as V, isArray as W, isArrayBuffer as h, isArrayLike as k, isArrayLikeObject as B, isBlob as j, isBoolean as I, isBuffer as Y, isColor as q, isColor2 as z, isDate as U, isElement as H, isEmpty as J, isEmptyArray as G, isEmptyObject as K, isEmptyValue as Q, isEqual as X, isEqualWith as Z, isError as ii, isFile as si, isFinite as ri, isFunction as ei, isInteger as ti, isJSON as oi, isLength as ai, isMap as ni, isMatch as fi, isMatchWith as ui, isNaN as pi, isNative as li, isNil as ci, isNull as yi, isNumber as di, isObject as Ri, isObjectLike as Ei, isPlainObject as mi, isPromise as Si, isReadableByteStreamControllerSupported as $i, isReadableStream as Ci, isReadableStreamDefaultControllerSupported as Mi, isReadableStreamSupported as bi, isReadableStreamSymbolAsyncIteratorSupported as Ai, isRegExp as Ni, isSafeInteger as Ti, isSet as Fi, isString as Pi, isSymbol as gi, isTypedArray as Oi, isUndefined as wi, isValidColor as xi, isWeakMap as _i, isWeakSet as Di } from "@unicom-cloud/utils/is";
3
- import { isDayjs as d } from "dayjs";
4
- import { isValidElement as n } from "react";
5
- import f from "react-dom";
6
- import { isForwardRef as u, ForwardRef as t, Memo as R } from "react-is";
7
- import { isAsyncMode as vi, isConcurrentMode as Vi, isContextConsumer as Wi, isContextProvider as hi, isElement as ki, isForwardRef as Bi, isFragment as ji, isLazy as Ii, isMemo as Yi, isPortal as qi, isProfiler as zi, isStrictMode as Ui, isSuspense as Hi, isValidElementType as Ji } from "react-is";
8
- function P(i) {
1
+ import { isPlainObject as l } from "@unicom-cloud/utils/is";
2
+ import { isArguments as L, isArray as v, isArrayBuffer as V, isArrayLike as W, isArrayLikeObject as h, isBlob as k, isBoolean as B, isBuffer as j, isColor as I, isColor2 as Y, isDate as q, isElement as z, isEmpty as U, isEmptyArray as H, isEmptyObject as J, isEmptyValue as G, isEqual as K, isEqualWith as Q, isError as X, isFile as Z, isFinite as ii, isFunction as si, isInteger as ri, isJSON as ei, isLength as ti, isMap as oi, isMatch as ai, isMatchWith as ni, isNaN as fi, isNative as ui, isNil as pi, isNull as li, isNumber as ci, isObject as yi, isObjectLike as di, isPlainObject as Ri, isPromise as Ei, isReadableByteStreamControllerSupported as mi, isReadableStream as Si, isReadableStreamDefaultControllerSupported as $i, isReadableStreamSupported as Ci, isReadableStreamSymbolAsyncIteratorSupported as Mi, isRegExp as bi, isSafeInteger as Ai, isSet as Ni, isString as Ti, isSymbol as Fi, isTypedArray as Pi, isUndefined as gi, isValidColor as Oi, isWeakMap as wi, isWeakSet as xi } from "@unicom-cloud/utils/is";
3
+ import { isDayjs as c } from "dayjs";
4
+ import { isValidElement as o } from "react";
5
+ import a from "react-dom";
6
+ import { isForwardRef as n, ForwardRef as t, Memo as y } from "react-is";
7
+ import { isAsyncMode as Di, isConcurrentMode as Li, isContextConsumer as vi, isContextProvider as Vi, isElement as Wi, isForwardRef as hi, isFragment as ki, isLazy as Bi, isMemo as ji, isPortal as Ii, isProfiler as Yi, isStrictMode as qi, isSuspense as zi, isValidElementType as Ui } from "react-is";
8
+ function T(i) {
9
9
  return i == null;
10
10
  }
11
- function g(i, s) {
11
+ function F(i, s) {
12
12
  return i == null || i === !1 || typeof i == "string" && (s ? i.trim() === "" : i === "");
13
13
  }
14
- function O(i) {
14
+ function P(i) {
15
15
  return i || i === 0;
16
16
  }
17
- function w(i) {
17
+ function g(i) {
18
18
  return i === window;
19
19
  }
20
- function x(i) {
21
- return i && d(i) && typeof i.isValid == "function" && i.isValid() && y(i) && "$y" in i && "$M" in i && "$D" in i && "$d" in i && "$H" in i && "$m" in i && "$s" in i;
20
+ function O(i) {
21
+ return i && c(i) && typeof i.isValid == "function" && i.isValid() && l(i) && "$y" in i && "$M" in i && "$D" in i && "$d" in i && "$H" in i && "$m" in i && "$s" in i;
22
22
  }
23
- const p = (i) => i && n(i) && typeof i.type == "function", E = (i) => {
24
- var s;
25
- return p(i) && !!((s = i.type.prototype) != null && s.isReactComponent);
26
- }, m = (i) => n(i) && typeof i.type == "string";
27
- var o;
28
- const _ = Number((o = f.version) == null ? void 0 : o.split(".")[0]) > 17;
29
- var a;
30
- const S = Number((a = f.version) == null ? void 0 : a.split(".")[0]) > 18, $ = (i) => {
31
- if (!S)
32
- return u(i);
33
- const s = Symbol.for("react.element"), l = Symbol.for("react.transitional.element"), c = Symbol.for("react.forward_ref");
23
+ const f = (i) => i && o(i) && typeof i.type == "function", d = (i) => f(i) && !!i.type.prototype?.isReactComponent, R = (i) => o(i) && typeof i.type == "string", w = Number(a.version?.split(".")[0]) > 17, E = Number(a.version?.split(".")[0]) > 18, m = (i) => {
24
+ if (!E)
25
+ return n(i);
26
+ const s = Symbol.for("react.element"), u = Symbol.for("react.transitional.element"), p = Symbol.for("react.forward_ref");
34
27
  if (typeof i == "object" && i !== null) {
35
28
  const r = i.$$typeof;
36
- if (r === s || r === l) {
29
+ if (r === s || r === u) {
37
30
  const e = i.type;
38
- return (e && e.$$typeof) === c;
31
+ return (e && e.$$typeof) === p;
39
32
  }
40
33
  }
41
34
  return !1;
42
- }, C = (i) => {
43
- var s;
44
- return i ? m(i) || $(i) || u(i) || i.$$typeof === t ? !0 : i.$$typeof === R ? ((s = i.type) == null ? void 0 : s.$$typeof) === t : p(i) ? E(i) : !1 : !1;
45
- }, D = C;
35
+ }, S = (i) => i ? R(i) || m(i) || n(i) || i.$$typeof === t ? !0 : i.$$typeof === y ? i.type?.$$typeof === t : f(i) ? d(i) : !1 : !1, x = S;
46
36
  export {
47
- V as isArguments,
48
- W as isArray,
49
- h as isArrayBuffer,
50
- k as isArrayLike,
51
- B as isArrayLikeObject,
52
- j as isBlob,
53
- I as isBoolean,
54
- Y as isBuffer,
55
- E as isClassComponent,
56
- q as isColor,
57
- z as isColor2,
58
- m as isDOMElement,
59
- U as isDate,
60
- x as isDayjs,
61
- H as isElement,
62
- J as isEmpty,
63
- G as isEmptyArray,
64
- K as isEmptyObject,
65
- g as isEmptyReactNode,
66
- Q as isEmptyValue,
67
- X as isEqual,
68
- Z as isEqualWith,
69
- ii as isError,
70
- O as isExist,
71
- si as isFile,
72
- ri as isFinite,
73
- $ as isForwardRefReact,
74
- ei as isFunction,
75
- ti as isInteger,
76
- oi as isJSON,
77
- ai as isLength,
78
- ni as isMap,
79
- fi as isMatch,
80
- ui as isMatchWith,
81
- pi as isNaN,
82
- li as isNative,
83
- ci as isNil,
84
- yi as isNull,
85
- P as isNullOrUndefined,
86
- di as isNumber,
87
- Ri as isObject,
88
- Ei as isObjectLike,
89
- mi as isPlainObject,
90
- Si as isPromise,
91
- _ as isReact18,
92
- S as isReact19,
93
- vi as isReactAsyncMode,
94
- p as isReactComponent,
95
- Vi as isReactConcurrentMode,
96
- Wi as isReactContextConsumer,
97
- hi as isReactContextProvider,
98
- ki as isReactElement,
99
- Bi as isReactForwardRef,
100
- ji as isReactFragment,
101
- Ii as isReactLazy,
102
- Yi as isReactMemo,
103
- qi as isReactPortal,
104
- zi as isReactProfiler,
105
- Ui as isReactStrictMode,
106
- Hi as isReactSuspense,
107
- Ji as isReactValidElementType,
108
- $i as isReadableByteStreamControllerSupported,
109
- Ci as isReadableStream,
110
- Mi as isReadableStreamDefaultControllerSupported,
111
- bi as isReadableStreamSupported,
112
- Ai as isReadableStreamSymbolAsyncIteratorSupported,
113
- Ni as isRegExp,
114
- Ti as isSafeInteger,
115
- Fi as isSet,
116
- Pi as isString,
117
- D as isSupportRef,
118
- gi as isSymbol,
119
- Oi as isTypedArray,
120
- wi as isUndefined,
121
- xi as isValidColor,
122
- _i as isWeakMap,
123
- Di as isWeakSet,
124
- w as isWindow,
125
- C as supportRef
37
+ L as isArguments,
38
+ v as isArray,
39
+ V as isArrayBuffer,
40
+ W as isArrayLike,
41
+ h as isArrayLikeObject,
42
+ k as isBlob,
43
+ B as isBoolean,
44
+ j as isBuffer,
45
+ d as isClassComponent,
46
+ I as isColor,
47
+ Y as isColor2,
48
+ R as isDOMElement,
49
+ q as isDate,
50
+ O as isDayjs,
51
+ z as isElement,
52
+ U as isEmpty,
53
+ H as isEmptyArray,
54
+ J as isEmptyObject,
55
+ F as isEmptyReactNode,
56
+ G as isEmptyValue,
57
+ K as isEqual,
58
+ Q as isEqualWith,
59
+ X as isError,
60
+ P as isExist,
61
+ Z as isFile,
62
+ ii as isFinite,
63
+ m as isForwardRefReact,
64
+ si as isFunction,
65
+ ri as isInteger,
66
+ ei as isJSON,
67
+ ti as isLength,
68
+ oi as isMap,
69
+ ai as isMatch,
70
+ ni as isMatchWith,
71
+ fi as isNaN,
72
+ ui as isNative,
73
+ pi as isNil,
74
+ li as isNull,
75
+ T as isNullOrUndefined,
76
+ ci as isNumber,
77
+ yi as isObject,
78
+ di as isObjectLike,
79
+ Ri as isPlainObject,
80
+ Ei as isPromise,
81
+ w as isReact18,
82
+ E as isReact19,
83
+ Di as isReactAsyncMode,
84
+ f as isReactComponent,
85
+ Li as isReactConcurrentMode,
86
+ vi as isReactContextConsumer,
87
+ Vi as isReactContextProvider,
88
+ Wi as isReactElement,
89
+ hi as isReactForwardRef,
90
+ ki as isReactFragment,
91
+ Bi as isReactLazy,
92
+ ji as isReactMemo,
93
+ Ii as isReactPortal,
94
+ Yi as isReactProfiler,
95
+ qi as isReactStrictMode,
96
+ zi as isReactSuspense,
97
+ Ui as isReactValidElementType,
98
+ mi as isReadableByteStreamControllerSupported,
99
+ Si as isReadableStream,
100
+ $i as isReadableStreamDefaultControllerSupported,
101
+ Ci as isReadableStreamSupported,
102
+ Mi as isReadableStreamSymbolAsyncIteratorSupported,
103
+ bi as isRegExp,
104
+ Ai as isSafeInteger,
105
+ Ni as isSet,
106
+ Ti as isString,
107
+ x as isSupportRef,
108
+ Fi as isSymbol,
109
+ Pi as isTypedArray,
110
+ gi as isUndefined,
111
+ Oi as isValidColor,
112
+ wi as isWeakMap,
113
+ xi as isWeakSet,
114
+ g as isWindow,
115
+ S as supportRef
126
116
  };
@@ -0,0 +1,19 @@
1
+ import s from "lodash/isFunction";
2
+ import u from "lodash/throttle";
3
+ function m(i, e) {
4
+ const r = [].concat(i).filter(Boolean);
5
+ if (!(r.length && s(e))) return () => {
6
+ };
7
+ const o = u((...t) => {
8
+ e(...t);
9
+ }), n = new MutationObserver(o);
10
+ return r.forEach((t, c, a) => {
11
+ n.observe(t, { attributes: !0, childList: !0, subtree: !0 });
12
+ }), () => {
13
+ n.disconnect(), o.cancel();
14
+ };
15
+ }
16
+ export {
17
+ m as default,
18
+ m as mutationObserver
19
+ };
@@ -1,46 +1,46 @@
1
- import { Component as n } from "react";
2
- import u, { findDOMNode as f } from "react-dom";
3
- import { isReact18 as a } from "./is.js";
4
- import { warning as s } from "./warning.js";
5
- import { isFunction as i } from "@unicom-cloud/utils/is";
6
- const p = u;
7
- let e;
1
+ import { Component as c } from "react";
2
+ import a, { findDOMNode as r } from "react-dom";
3
+ import { isReact18 as s } from "./is.js";
4
+ import { warning as u } from "./warning.js";
5
+ import { isFunction as f } from "@unicom-cloud/utils/is";
6
+ const d = a;
7
+ let n;
8
8
  try {
9
- e = p.createRoot;
9
+ n = d.createRoot;
10
10
  } catch {
11
11
  }
12
- let r;
13
- function R(o) {
14
- const t = o.constructor;
15
- if (typeof t != "function")
12
+ let e;
13
+ function p(t) {
14
+ const o = t.constructor;
15
+ if (typeof o != "function")
16
16
  return !1;
17
- !r && typeof WeakSet == "function" && (r = /* @__PURE__ */ new WeakSet());
18
- const c = !!(r != null && r.has(t));
19
- return r == null || r.add(t), c;
17
+ !e && typeof WeakSet == "function" && (e = /* @__PURE__ */ new WeakSet());
18
+ const i = !!e?.has(o);
19
+ return e?.add(o), i;
20
20
  }
21
- const N = (o, t) => {
22
- if (o) {
23
- if (o instanceof Element)
24
- return o;
25
- if (o.current instanceof Element)
26
- return o.current;
27
- if (i(o.getRootDOMNode))
28
- return o.getRootDOMNode();
29
- if (o instanceof n && f)
30
- return f(o);
21
+ const N = (t, o) => {
22
+ if (t) {
23
+ if (t instanceof Element)
24
+ return t;
25
+ if (t.current instanceof Element)
26
+ return t.current;
27
+ if (f(t.getRootDOMNode))
28
+ return t.getRootDOMNode();
29
+ if (t instanceof c && r)
30
+ return r(t);
31
31
  }
32
- return t && (s(
33
- a && !R(t),
32
+ return o && (u(
33
+ s && !p(o),
34
34
  "Element does not define the `getRootDOMNode` method causing a call to React.findDOMNode. but findDOMNode is deprecated in StrictMode. Please check the code logic",
35
- { element: o, instance: t }
36
- ), f) ? f(t) : null;
37
- }, m = (o, t) => {
38
- o && o.ref && (i(o.ref) && (o == null || o.ref(t)), "current" in o.ref && (o.ref.current = t));
39
- }, y = (o) => {
40
- e = o;
35
+ { element: t, instance: o }
36
+ ), r) ? r(o) : null;
37
+ }, m = (t, o) => {
38
+ t && t.ref && (f(t.ref) && t?.ref(o), "current" in t.ref && (t.ref.current = o));
39
+ }, k = (t) => {
40
+ n = t;
41
41
  };
42
42
  export {
43
43
  m as callbackOriginRef,
44
44
  N as findDOMNode_,
45
- y as setCreateRoot
45
+ k as setCreateRoot
46
46
  };
@@ -0,0 +1,21 @@
1
+ import a from "lodash/isFunction";
2
+ import f from "lodash/throttle";
3
+ function h(s, t) {
4
+ const r = [].concat(s).filter(Boolean);
5
+ if (!(r.length && a(t))) return () => {
6
+ };
7
+ const n = f((...e) => {
8
+ t(...e);
9
+ }), o = new ResizeObserver(n);
10
+ return r.forEach((e, i, c) => {
11
+ o.observe(e);
12
+ }), () => {
13
+ r.forEach((e, i, c) => {
14
+ o.unobserve(e);
15
+ }), o.disconnect(), n.cancel();
16
+ };
17
+ }
18
+ export {
19
+ h as default,
20
+ h as resizeObserver
21
+ };