@unicom-cloud/ui 0.8.96 → 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 (303) hide show
  1. package/Affix.js +1 -1
  2. package/Carousel.js +1 -1
  3. package/LiquidFill.js +4 -0
  4. package/OverflowEllipsis.js +1 -1
  5. package/PageHeader.js +1 -1
  6. package/QrCode.js +57 -0
  7. package/Tour.js +63 -0
  8. package/Trigger.js +1 -1
  9. package/_virtual/_commonjsHelpers.js +6 -0
  10. package/_virtual/index.js +7 -0
  11. package/_virtual/index2.js +4 -0
  12. package/affix/index.js +70 -72
  13. package/alert/index.js +56 -56
  14. package/anchor/Anchor.js +55 -55
  15. package/anchor/Link.js +34 -34
  16. package/anchor/util.js +5 -5
  17. package/auto-complete/index.js +116 -122
  18. package/avatar/Avatar.js +33 -33
  19. package/avatar/Group.js +26 -26
  20. package/back-top/index.js +58 -61
  21. package/badge/index.js +46 -46
  22. package/breadcrumb/Item.js +42 -43
  23. package/breadcrumb/index.js +47 -47
  24. package/button/Group.js +6 -6
  25. package/button/index.js +91 -91
  26. package/calendar/Month.js +75 -75
  27. package/calendar/Year.js +35 -35
  28. package/calendar/header/index.js +25 -25
  29. package/calendar/index.js +103 -103
  30. package/card/Grid.js +8 -8
  31. package/card/Meta.js +16 -16
  32. package/card/index.js +49 -49
  33. package/carousel/Arrow.js +19 -19
  34. package/carousel/Indicator.js +26 -26
  35. package/carousel/index.js +108 -108
  36. package/cascader/Cascader.js +178 -191
  37. package/cascader/base/node.js +133 -136
  38. package/cascader/base/store.js +82 -85
  39. package/cascader/panel/List.js +125 -129
  40. package/cascader/panel/Search.js +79 -81
  41. package/cascader/util.js +13 -13
  42. package/checkbox/Checkbox.js +94 -96
  43. package/checkbox/Group.js +54 -56
  44. package/checkbox/GroupBlock.js +28 -29
  45. package/collapse/Collapse.js +45 -45
  46. package/collapse/Item.js +53 -55
  47. package/color-picker/ControlBar.js +43 -43
  48. package/color-picker/InputAlpha.js +12 -12
  49. package/color-picker/InputHex.js +30 -31
  50. package/color-picker/InputRgb.js +24 -24
  51. package/color-picker/Palette.js +18 -18
  52. package/color-picker/Panel.js +122 -125
  53. package/color-picker/hooks/useColorPicker.js +85 -88
  54. package/color-picker/hooks/useControlBlock.js +38 -40
  55. package/color-picker/index.js +47 -47
  56. package/comment/index.js +29 -29
  57. package/components/common/higher-order/with-speech-synthesis/index.js +37 -40
  58. package/components/common/hooks/useId.js +8 -8
  59. package/components/common/hooks/useInView.js +16 -16
  60. package/components/common/hooks/useIntersectionObserver.js +1 -1
  61. package/components/common/hooks/useKeyboardEvent.js +9 -10
  62. package/components/common/hooks/useOverflowHidden.js +1 -4
  63. package/components/common/hooks/usePersistCallback.js +7 -7
  64. package/components/common/hooks/useStateCallback.js +9 -10
  65. package/components/common/hooks/useWindowSize.js +8 -8
  66. package/components/common/space/index.js +9 -7
  67. package/components/common/utils/convertToDurationBasedOnTimeUnits.js +6 -0
  68. package/components/common/utils/dom.js +27 -29
  69. package/components/common/utils/findScrollParent.js +17 -0
  70. package/components/common/utils/intersectionObserver.js +21 -0
  71. package/components/common/utils/is.js +99 -109
  72. package/components/common/utils/mutationObserver.js +19 -0
  73. package/components/common/utils/reactDOM.js +34 -34
  74. package/components/common/utils/resizeObserver.js +21 -0
  75. package/copy/index.js +38 -40
  76. package/date-picker/Picker.js +290 -295
  77. package/date-picker/RangePicker.js +367 -372
  78. package/date-picker/index.js +33 -35
  79. package/date-picker/panel/Body.js +46 -47
  80. package/date-picker/panel/Header.js +33 -33
  81. package/date-picker/panel/Shortcut.js +31 -31
  82. package/date-picker/panel/date/index.js +85 -85
  83. package/date-picker/panel/month/index.js +59 -59
  84. package/date-picker/panel/quarter/index.js +67 -70
  85. package/date-picker/panel/range/index.js +101 -101
  86. package/date-picker/panel/year/index.js +39 -39
  87. package/date-picker/util.js +17 -18
  88. package/descriptions/index.js +62 -62
  89. package/details/index.js +53 -55
  90. package/development/index.js +9 -9
  91. package/dist/tinycolor/chunk/BOzCVdr0.js +1 -1
  92. package/dist/validate/src/index.js +5 -5
  93. package/dist/validate/src/util.js +1 -1
  94. package/divider/index.js +21 -21
  95. package/draggable/Item.js +35 -35
  96. package/draggable/index.js +22 -22
  97. package/drawer/Drawer.js +142 -147
  98. package/dropdown/Button.js +48 -48
  99. package/dropdown/index.js +88 -92
  100. package/empty/index.js +16 -16
  101. package/form/Control.js +211 -225
  102. package/form/Form.js +109 -113
  103. package/form/FormItem.js +118 -120
  104. package/form/FormList.js +60 -66
  105. package/form/FormProvider.js +31 -34
  106. package/form/hook/useContext.js +17 -19
  107. package/form/hook/useState.js +22 -23
  108. package/form/hook/useWatch.js +26 -27
  109. package/form/promisify.js +14 -18
  110. package/form/store.js +304 -316
  111. package/form/util.js +14 -15
  112. package/grid/Col.js +64 -64
  113. package/grid/Grid.js +51 -51
  114. package/grid/GridItem.js +48 -48
  115. package/grid/Row.js +39 -39
  116. package/hooks/useVerificationCode.js +41 -43
  117. package/hooks/useWatermark.js +89 -92
  118. package/icon/index.js +23 -24
  119. package/icon-hover/index.js +16 -16
  120. package/icons/file.js +11 -11
  121. package/image/Image.js +140 -141
  122. package/image/ImagePreview.js +252 -255
  123. package/image/ImagePreviewArrow.js +25 -25
  124. package/image/ImagePreviewGroup.js +62 -62
  125. package/image/util/getScale.js +25 -28
  126. package/index.js +684 -675
  127. package/input/Button.js +48 -50
  128. package/input/Group.js +9 -9
  129. package/input/Input.js +145 -154
  130. package/input/InputElement.js +108 -115
  131. package/input/Password.js +38 -38
  132. package/input/Search.js +51 -55
  133. package/input/Textarea.js +80 -81
  134. package/input/useComposition.js +23 -23
  135. package/input-number/decimal.js +59 -62
  136. package/input-number/index.js +139 -141
  137. package/input-tag/InputTag.js +222 -230
  138. package/layout/Content.js +6 -6
  139. package/layout/Footer.js +8 -8
  140. package/layout/Header.js +7 -7
  141. package/layout/Sider.js +88 -90
  142. package/layout/index.js +30 -30
  143. package/link/index.js +45 -46
  144. package/liquid-fill/LiquidFill.js +189 -0
  145. package/liquid-fill/LiquidFill2.js +3 -0
  146. package/liquid-fill/index.js +4 -0
  147. package/liquid-fill/interface.js +1 -0
  148. package/list/Item.js +28 -28
  149. package/list/Meta.js +12 -12
  150. package/list/index.js +146 -148
  151. package/mentions/index.js +75 -76
  152. package/menu/Item.js +58 -58
  153. package/menu/Menu.js +125 -127
  154. package/menu/OverflowWrap.js +39 -40
  155. package/menu/sub-menu/Inline.js +45 -45
  156. package/menu/util.js +26 -28
  157. package/message/index.js +96 -99
  158. package/message/useMessage.js +26 -27
  159. package/modal/Confirm.js +47 -49
  160. package/modal/Modal.js +250 -257
  161. package/modal/use-modal/Hook.js +26 -28
  162. package/modal/use-modal/index.js +46 -49
  163. package/notice/index.js +89 -90
  164. package/notification/index.js +60 -65
  165. package/notification/withNotification.js +35 -35
  166. package/overflow-ellipsis/OverflowItem.js +19 -20
  167. package/overflow-ellipsis/index.js +45 -46
  168. package/package.json +1 -1
  169. package/page-header/index.js +45 -45
  170. package/pagination/PageItem.js +87 -91
  171. package/pagination/PageJumper.js +40 -41
  172. package/pagination/PageOption.js +31 -35
  173. package/pagination/Pagination.js +162 -163
  174. package/picker/Input.js +90 -96
  175. package/picker/InputRange.js +115 -122
  176. package/popconfirm/index.js +98 -100
  177. package/popover/index.js +28 -28
  178. package/portal/Portal.js +10 -11
  179. package/progress/index.js +36 -36
  180. package/qr-code/index.js +99 -0
  181. package/qr-code/interface.js +1 -0
  182. package/radio/Group.js +48 -48
  183. package/radio/GroupBlock.js +32 -33
  184. package/radio/Radio.js +62 -64
  185. package/rate/index.js +88 -88
  186. package/resize-box/ResizeTrigger.js +39 -39
  187. package/resize-box/Split.js +92 -96
  188. package/resize-box/SplitGroup.js +116 -122
  189. package/resize-box/index.js +112 -115
  190. package/result/index.js +44 -44
  191. package/select/Option.js +53 -56
  192. package/select/Select.js +365 -381
  193. package/select/util.js +95 -99
  194. package/select-view/Core.js +159 -160
  195. package/skeleton/index.js +23 -23
  196. package/slider/Button.js +84 -92
  197. package/slider/Input.js +47 -49
  198. package/slider/Tick.js +28 -31
  199. package/slider/index.js +107 -107
  200. package/space/index.js +26 -26
  201. package/space-/index.js +51 -51
  202. package/spin/DotLoading.js +8 -8
  203. package/spin/index.js +47 -47
  204. package/statistic/Countdown.js +37 -37
  205. package/statistic/index.js +58 -58
  206. package/steps/Step.js +42 -42
  207. package/steps/index.js +54 -54
  208. package/style.css +1 -1
  209. package/switch/index.js +77 -78
  210. package/table/ColGroup.js +36 -37
  211. package/table/Table.js +447 -450
  212. package/table/hook/useExpand.js +24 -24
  213. package/table/hook/useRowSelection.js +62 -62
  214. package/table/summary/Row.js +16 -17
  215. package/table/tbody/Td.js +119 -118
  216. package/table/tbody/Tr.js +119 -121
  217. package/table/tbody/index.js +62 -63
  218. package/table/th-resizable/index.js +30 -30
  219. package/table/thead/Column.js +148 -148
  220. package/table/thead/index.js +87 -88
  221. package/tabs/Tab.js +55 -55
  222. package/tabs/TabContent.js +8 -8
  223. package/tabs/TabPane.js +15 -15
  224. package/tabs/hook/useHeaderScroll.js +36 -36
  225. package/tabs/tab-header/TabInk.js +31 -33
  226. package/tabs/tab-header/TabNavIcon.js +34 -35
  227. package/tabs/tab-header/index.js +192 -195
  228. package/tag/index.js +94 -97
  229. package/time-picker/Picker.js +167 -172
  230. package/time-picker/RangePicker.js +28 -28
  231. package/time-picker/TimePicker.js +146 -146
  232. package/timeline/Item.js +46 -46
  233. package/timeline/Timeline.js +52 -52
  234. package/tooltip/index.js +89 -95
  235. package/tour/index.js +289 -0
  236. package/transfer/Item.js +54 -54
  237. package/transfer/List.js +134 -136
  238. package/transfer/index.js +91 -91
  239. package/tree/Animation.js +49 -52
  240. package/tree/Node.js +114 -122
  241. package/tree/NodeList.js +51 -51
  242. package/tree/Tree.js +386 -393
  243. package/tree-select/List.js +71 -72
  244. package/tree-select/Select.js +135 -143
  245. package/tree-select/hook/useKeyCache.js +39 -39
  246. package/tree-select/hook/useStateValue.js +12 -12
  247. package/trigger/getPopupStyle.js +60 -61
  248. package/trigger/index.js +337 -346
  249. package/types/common/space/interface.d.ts +1 -1
  250. package/types/common/utils/convertToDurationBasedOnTimeUnits.d.ts +3 -0
  251. package/types/common/utils/findScrollParent.d.ts +2 -0
  252. package/types/common/utils/index.d.ts +5 -0
  253. package/types/common/utils/intersectionObserver.d.ts +2 -0
  254. package/types/common/utils/mutationObserver.d.ts +2 -0
  255. package/types/common/utils/resizeObserver.d.ts +2 -0
  256. package/types/pc/index.d.ts +3 -0
  257. package/types/pc/liquid-fill/LiquidFill.d.ts +30 -0
  258. package/types/pc/liquid-fill/LiquidFill2.d.ts +1 -0
  259. package/types/pc/liquid-fill/index.d.ts +4 -0
  260. package/types/pc/liquid-fill/interface.d.ts +0 -0
  261. package/types/pc/qr-code/index.d.ts +34 -0
  262. package/types/pc/qr-code/interface.d.ts +39 -0
  263. package/types/pc/table/interface.d.ts +2 -2
  264. package/types/pc/tour/index.d.ts +42 -0
  265. package/types/pc/utils/convertToDurationBasedOnTimeUnits.d.ts +3 -0
  266. package/types/pc/utils/findScrollParent.d.ts +2 -0
  267. package/types/pc/utils/index.d.ts +5 -0
  268. package/types/pc/utils/intersectionObserver.d.ts +2 -0
  269. package/types/pc/utils/mutationObserver.d.ts +2 -0
  270. package/types/pc/utils/names.d.ts +18 -0
  271. package/types/pc/utils/resizeObserver.d.ts +2 -0
  272. package/typography/Base.js +79 -81
  273. package/typography/EditContent.js +30 -33
  274. package/typography/Ellipsis.js +77 -73
  275. package/typography/Operations.js +50 -52
  276. package/typography/Paragraph.js +7 -7
  277. package/typography/Typography.js +7 -7
  278. package/typography/useEllipsis.js +105 -106
  279. package/upload/TriggerNode.js +69 -76
  280. package/upload/Upload.js +84 -87
  281. package/upload/Uploader.js +115 -118
  282. package/upload/list/PictureItem.js +61 -71
  283. package/upload/list/TextItem.js +61 -67
  284. package/upload/list/UploadProgress.js +42 -49
  285. package/upload/list/index.js +48 -49
  286. package/upload/request_.js +37 -38
  287. package/upload/util.js +39 -39
  288. package/utils/convertToDurationBasedOnTimeUnits.js +6 -0
  289. package/utils/findScrollParent.js +4 -0
  290. package/utils/index.js +281 -278
  291. package/utils/intersectionObserver.js +4 -0
  292. package/utils/mutationObserver.js +4 -0
  293. package/utils/names.js +12 -0
  294. package/utils/resizeObserver.js +4 -0
  295. package/verification-code/VerificationCode.js +50 -51
  296. package/version/index.js +1 -1
  297. package/virtual-list/VirtualList.js +243 -244
  298. package/virtual-list/util/item.js +3 -4
  299. package/watermark/Watermark.js +27 -31
  300. package/components/common/utils/resizeObserverEffect.js +0 -23
  301. package/types/common/utils/resizeObserverEffect.d.ts +0 -2
  302. package/types/pc/utils/resizeObserverEffect.d.ts +0 -2
  303. package/utils/resizeObserverEffect.js +0 -4
package/Affix.js CHANGED
@@ -9,7 +9,7 @@ import "./components/common/hooks/useMergeProps.js";
9
9
  import "@unicom-cloud/utils/class-name";
10
10
  import "./components/common/utils/dom.js";
11
11
  import "./components/common/utils/is.js";
12
- import "./components/common/utils/resizeObserverEffect.js";
12
+ import "./components/common/utils/resizeObserver.js";
13
13
  import "./components/common/utils/throttleByRaf.js";
14
14
  import "./config-provider/context.js";
15
15
  import { default as h } from "./affix/index.js";
package/Carousel.js CHANGED
@@ -5,7 +5,7 @@ import "./components/common/hooks/useInterval.js";
5
5
  import "./components/common/hooks/useMergeProps.js";
6
6
  import "@unicom-cloud/utils/class-name";
7
7
  import "./components/common/utils/omit.js";
8
- import "./components/common/utils/resizeObserverEffect.js";
8
+ import "./components/common/utils/resizeObserver.js";
9
9
  import "./components/common/utils/warning.js";
10
10
  import "./carousel/Arrow.js";
11
11
  import "./carousel/Indicator.js";
package/LiquidFill.js ADDED
@@ -0,0 +1,4 @@
1
+ import { default as o } from "./liquid-fill/LiquidFill.js";
2
+ export {
3
+ o as default
4
+ };
@@ -2,7 +2,7 @@ import "react/jsx-runtime";
2
2
  import "react";
3
3
  import "./config-provider/ConfigProvider.js";
4
4
  import "@unicom-cloud/utils/class-name";
5
- import "./components/common/utils/resizeObserverEffect.js";
5
+ import "./components/common/utils/resizeObserver.js";
6
6
  import "./overflow-ellipsis/OverflowItem.js";
7
7
  import "./config-provider/context.js";
8
8
  import { default as d } from "./overflow-ellipsis/index.js";
package/PageHeader.js CHANGED
@@ -9,7 +9,7 @@ import "./components/common/hooks/useMergeProps.js";
9
9
  import "./icon-hover/index.js";
10
10
  import "@unicom-cloud/utils/class-name";
11
11
  import "./components/common/utils/omit.js";
12
- import "./components/common/utils/resizeObserverEffect.js";
12
+ import "./components/common/utils/resizeObserver.js";
13
13
  import "./config-provider/context.js";
14
14
  import { default as g } from "./page-header/index.js";
15
15
  export {
package/QrCode.js ADDED
@@ -0,0 +1,57 @@
1
+ import "react/jsx-runtime";
2
+ import "lodash/merge";
3
+ import "qrcode.react";
4
+ import "react";
5
+ import "./config-provider/ConfigProvider.js";
6
+ import "@unicom-cloud/utils/case-name";
7
+ import "@unicom-cloud/utils/class-name";
8
+ import "./dist/tinycolor/chunk/BOzCVdr0.js";
9
+ import "@unicom-cloud/utils/constant/ui";
10
+ import "./utils/contextHolder.js";
11
+ import "@unicom-cloud/utils/dayjs";
12
+ import "@unicom-cloud/utils/clipboard-copy";
13
+ import "./components/common/utils/dayjs.js";
14
+ import "./components/common/utils/dom.js";
15
+ import "@unicom-cloud/utils/file/fileToURL";
16
+ import "lodash/escapeRegExp";
17
+ import "lodash/isArray";
18
+ import "lodash/isNumber";
19
+ import "lodash/isString";
20
+ import "lodash/isFunction";
21
+ import "lodash/throttle";
22
+ import "./components/common/utils/is.js";
23
+ import "lodash/camelCase";
24
+ import "lodash/capitalize";
25
+ import "lodash/cloneDeep";
26
+ import "lodash/debounce";
27
+ import "lodash/get";
28
+ import "lodash/has";
29
+ import "lodash/kebabCase";
30
+ import "lodash/mergeWith";
31
+ import "lodash/set";
32
+ import "lodash/setWith";
33
+ import "lodash/snakeCase";
34
+ import "lodash/startCase";
35
+ import "lodash/uniq";
36
+ import "lodash/upperFirst";
37
+ import "@unicom-cloud/utils/math";
38
+ import "lodash/isPlainObject";
39
+ import "./dist/react-transition-group/src/CSSTransition.js";
40
+ import "./dist/react-transition-group/src/ReplaceTransition.js";
41
+ import "./dist/react-transition-group/src/SwitchTransition.js";
42
+ import "./dist/react-transition-group/chunk/CPfP7aNL.js";
43
+ import "./dist/react-transition-group/src/TransitionGroup.js";
44
+ import "./components/common/utils/reactDOM.js";
45
+ import "@unicom-cloud/utils/file/saveAs";
46
+ import "@unicom-cloud/utils/screenfull";
47
+ import "@unicom-cloud/utils/constant/ui.js";
48
+ import "@unicom-cloud/utils/tree";
49
+ import "@unicom-cloud/utils/is";
50
+ import "uuid";
51
+ import "./dist/validate/src/index.js";
52
+ import "@unicom-cloud/utils/constant/keyboardCode";
53
+ import "./config-provider/context.js";
54
+ import { default as ro } from "./qr-code/index.js";
55
+ export {
56
+ ro as default
57
+ };
package/Tour.js ADDED
@@ -0,0 +1,63 @@
1
+ import "react/jsx-runtime";
2
+ import "@unicom-cloud/icons/IconUiClose";
3
+ import "lodash/merge";
4
+ import "react";
5
+ import "react-dom";
6
+ import "./button/index.js";
7
+ import "./config-provider/ConfigProvider.js";
8
+ import "./icon-hover/index.js";
9
+ import "./space/index.js";
10
+ import "@unicom-cloud/utils/case-name";
11
+ import "@unicom-cloud/utils/class-name";
12
+ import "./dist/tinycolor/chunk/BOzCVdr0.js";
13
+ import "@unicom-cloud/utils/constant/ui";
14
+ import "./utils/contextHolder.js";
15
+ import "@unicom-cloud/utils/dayjs";
16
+ import "@unicom-cloud/utils/clipboard-copy";
17
+ import "./components/common/utils/dayjs.js";
18
+ import "./components/common/utils/dom.js";
19
+ import "@unicom-cloud/utils/file/fileToURL";
20
+ import "lodash/escapeRegExp";
21
+ import "lodash/isArray";
22
+ import "lodash/isNumber";
23
+ import "lodash/isString";
24
+ import "./components/common/utils/intersectionObserver.js";
25
+ import "./components/common/utils/is.js";
26
+ import "lodash/camelCase";
27
+ import "lodash/capitalize";
28
+ import "lodash/cloneDeep";
29
+ import "lodash/debounce";
30
+ import "lodash/get";
31
+ import "lodash/has";
32
+ import "lodash/kebabCase";
33
+ import "lodash/mergeWith";
34
+ import "lodash/set";
35
+ import "lodash/setWith";
36
+ import "lodash/snakeCase";
37
+ import "lodash/startCase";
38
+ import "lodash/throttle";
39
+ import "lodash/uniq";
40
+ import "lodash/upperFirst";
41
+ import "@unicom-cloud/utils/math";
42
+ import "lodash/isPlainObject";
43
+ import "./components/common/utils/mutationObserver.js";
44
+ import "./dist/react-transition-group/src/CSSTransition.js";
45
+ import "./dist/react-transition-group/src/ReplaceTransition.js";
46
+ import "./dist/react-transition-group/src/SwitchTransition.js";
47
+ import "./dist/react-transition-group/chunk/CPfP7aNL.js";
48
+ import "./dist/react-transition-group/src/TransitionGroup.js";
49
+ import "./components/common/utils/reactDOM.js";
50
+ import "./components/common/utils/resizeObserver.js";
51
+ import "@unicom-cloud/utils/file/saveAs";
52
+ import "@unicom-cloud/utils/screenfull";
53
+ import "@unicom-cloud/utils/constant/ui.js";
54
+ import "@unicom-cloud/utils/tree";
55
+ import "@unicom-cloud/utils/is";
56
+ import "uuid";
57
+ import "./dist/validate/src/index.js";
58
+ import "@unicom-cloud/utils/constant/keyboardCode";
59
+ import "./config-provider/context.js";
60
+ import { default as fo } from "./tour/index.js";
61
+ export {
62
+ fo as default
63
+ };
package/Trigger.js CHANGED
@@ -16,7 +16,7 @@ import "@unicom-cloud/utils/constant/keyboardCode";
16
16
  import "./components/common/utils/mergeProps.js";
17
17
  import "./components/common/utils/pick.js";
18
18
  import "./components/common/utils/reactDOM.js";
19
- import "./components/common/utils/resizeObserverEffect.js";
19
+ import "./components/common/utils/resizeObserver.js";
20
20
  import "./components/common/utils/throttleByRaf.js";
21
21
  import "./trigger/getPopupStyle.js";
22
22
  import "./config-provider/context.js";
@@ -0,0 +1,6 @@
1
+ function e(t) {
2
+ return t && t.__esModule && Object.prototype.hasOwnProperty.call(t, "default") ? t.default : t;
3
+ }
4
+ export {
5
+ e as getDefaultExportFromCjs
6
+ };
@@ -0,0 +1,7 @@
1
+ import { getDefaultExportFromCjs as r } from "./_commonjsHelpers.js";
2
+ import { __require as o } from "../node_modules/prop-types/index.js";
3
+ var p = /* @__PURE__ */ o();
4
+ const s = /* @__PURE__ */ r(p);
5
+ export {
6
+ s as default
7
+ };
@@ -0,0 +1,4 @@
1
+ var p = { exports: {} };
2
+ export {
3
+ p as __module
4
+ };
package/affix/index.js CHANGED
@@ -1,22 +1,22 @@
1
- import { jsxs as k, jsx as h } from "react/jsx-runtime";
2
- import N from "lodash/isFunction";
3
- import q from "lodash/isPlainObject";
4
- import G from "lodash/isUndefined";
5
- import { forwardRef as J, useContext as K, useState as Q, useRef as b, useMemo as V, useCallback as X, useEffect as m, useImperativeHandle as Y } from "react";
1
+ import { jsxs as $, jsx as y } from "react/jsx-runtime";
2
+ import R from "lodash/isFunction";
3
+ import k from "lodash/isPlainObject";
4
+ import q from "lodash/isUndefined";
5
+ import { forwardRef as G, useContext as J, useState as K, useRef as w, useMemo as Q, useCallback as V, useEffect as u, useImperativeHandle as X } from "react";
6
6
  import "../config-provider/ConfigProvider.js";
7
- import Z from "../components/common/hooks/useIsomorphicLayoutEffect.js";
8
- import P from "../components/common/hooks/useMergeProps.js";
9
- import v from "@unicom-cloud/utils/class-name";
10
- import { getScrollElements as tt, on as A, off as p } from "../components/common/utils/dom.js";
7
+ import Y from "../components/common/hooks/useIsomorphicLayoutEffect.js";
8
+ import Z from "../components/common/hooks/useMergeProps.js";
9
+ import z from "@unicom-cloud/utils/class-name";
10
+ import { getScrollElements as tt, on as E, off as a } from "../components/common/utils/dom.js";
11
11
  import { isWindow as et } from "../components/common/utils/is.js";
12
- import { resizeObserverEffect as rt } from "../components/common/utils/resizeObserverEffect.js";
12
+ import { resizeObserver as rt } from "../components/common/utils/resizeObserver.js";
13
13
  import { throttleByRaf as ot } from "../components/common/utils/throttleByRaf.js";
14
14
  import st from "../config-provider/context.js";
15
- function nt(i) {
16
- return et(i) ? {
15
+ function nt(n) {
16
+ return et(n) ? {
17
17
  top: 0,
18
18
  bottom: window.innerHeight
19
- } : i instanceof HTMLElement ? i.getBoundingClientRect() : {
19
+ } : n instanceof HTMLElement ? n.getBoundingClientRect() : {
20
20
  top: 0,
21
21
  bottom: 0
22
22
  };
@@ -24,38 +24,37 @@ function nt(i) {
24
24
  const it = {
25
25
  offsetTop: 0
26
26
  };
27
- function ft(i, H) {
28
- const { getPrefixCls: d, componentConfig: x, rtl: O } = K(st), U = P(
29
- i,
27
+ function ft(n, F) {
28
+ const { getPrefixCls: M, componentConfig: v, rtl: H } = J(st), O = Z(
29
+ n,
30
30
  it,
31
- x == null ? void 0 : x.Affix
31
+ v?.Affix
32
32
  ), {
33
- className: _,
34
- style: B,
35
- affixClassName: I,
36
- affixStyle: C,
37
- offsetTop: l,
38
- offsetBottom: f,
39
- target: S,
40
- targetContainer: u,
41
- children: j,
42
- onChange: y,
43
- ...D
44
- } = U, [g, T] = Q({
33
+ className: P,
34
+ style: U,
35
+ affixClassName: _,
36
+ affixStyle: h,
37
+ offsetTop: f,
38
+ offsetBottom: i,
39
+ target: m,
40
+ targetContainer: c,
41
+ children: B,
42
+ onChange: p,
43
+ ...I
44
+ } = O, [d, C] = K({
45
45
  status: "MEASURE_DONE",
46
46
  isFixed: !1,
47
47
  sizeStyles: {},
48
48
  fixedStyles: {}
49
- }), { isFixed: R, sizeStyles: L, fixedStyles: W } = g, z = b(R), F = d == null ? void 0 : d("affix"), $ = v(
50
- { [F]: R, [`${F}-rtl`]: O },
51
- I
52
- ), r = b(null), o = b(null), w = V(() => {
53
- var n, c;
49
+ }), { isFixed: x, sizeStyles: j, fixedStyles: D } = d, N = w(x), b = M?.("affix"), L = z(
50
+ { [b]: x, [`${b}-rtl`]: H },
51
+ _
52
+ ), r = w(null), o = w(null), g = Q(() => {
54
53
  let e = null;
55
- return N(S) ? e = S() : e = ((c = (n = tt(r.current)) == null ? void 0 : n.at) == null ? void 0 : c.call(n, -1)) || window, e;
56
- }, [r.current, S]), t = X(
54
+ return R(m) ? e = m() : e = tt(r.current)?.at?.(-1) || window, e;
55
+ }, [r.current, m]), t = V(
57
56
  ot(() => {
58
- T({
57
+ C({
59
58
  status: "MEASURE_START",
60
59
  isFixed: !1,
61
60
  fixedStyles: {},
@@ -64,68 +63,67 @@ function ft(i, H) {
64
63
  }),
65
64
  []
66
65
  );
67
- return Z(() => {
68
- const { status: e } = g;
66
+ return Y(() => {
67
+ const { status: e } = d;
69
68
  if (e !== "MEASURE_START" || !r.current || !o.current)
70
69
  return;
71
- const n = G(f) ? "top" : "bottom", c = r.current.getBoundingClientRect(), a = nt(o.current);
72
- let s = !1, E = {};
73
- n === "top" ? (s = c.top - a.top < (l || 0), E = s ? {
70
+ const W = q(i) ? "top" : "bottom", A = r.current.getBoundingClientRect(), l = nt(o.current);
71
+ let s = !1, S = {};
72
+ W === "top" ? (s = A.top - l.top < (f || 0), S = s ? {
74
73
  position: "fixed",
75
- top: a.top + (l || 0)
76
- } : {}) : (s = a.bottom - c.bottom < (f || 0), E = s ? {
74
+ top: l.top + (f || 0)
75
+ } : {}) : (s = l.bottom - A.bottom < (i || 0), S = s ? {
77
76
  position: "fixed",
78
- bottom: window.innerHeight - a.bottom + (f || 0)
77
+ bottom: window.innerHeight - l.bottom + (i || 0)
79
78
  } : {});
80
- const M = s ? {
79
+ const T = s ? {
81
80
  width: r.current.offsetWidth,
82
81
  height: r.current.offsetHeight
83
82
  } : {};
84
- T({
83
+ C({
85
84
  status: "MEASURE_DONE",
86
85
  isFixed: s,
87
- sizeStyles: M,
88
- fixedStyles: { ...E, ...M }
89
- }), s !== z.current && (z.current = s, N(y) && y(s));
90
- }, [g, f, l, y]), m(() => (t(), () => {
91
- var e;
92
- (e = t == null ? void 0 : t.cancel) == null || e.call(t);
93
- }), [w, u, f, l, t]), m(() => {
94
- if (o.current = w, o.current)
95
- return A(o.current, "scroll", t), A(o.current, "resize", t), () => {
96
- p(o.current, "scroll", t), p(o.current, "resize", t);
86
+ sizeStyles: T,
87
+ fixedStyles: { ...S, ...T }
88
+ }), s !== N.current && (N.current = s, R(p) && p(s));
89
+ }, [d, i, f, p]), u(() => (t(), () => {
90
+ t?.cancel?.();
91
+ }), [g, c, i, f, t]), u(() => {
92
+ if (o.current = g, o.current)
93
+ return E(o.current, "scroll", t), E(o.current, "resize", t), () => {
94
+ a(o.current, "scroll", t), a(o.current, "resize", t);
97
95
  };
98
- }, [w, t]), m(() => {
99
- const e = N(u) ? u() : null;
100
- return o.current !== window && e ? (A(e, "scroll", t), () => {
101
- p(e, "scroll", t);
96
+ }, [g, t]), u(() => {
97
+ const e = R(c) ? c() : null;
98
+ return o.current !== window && e ? (E(e, "scroll", t), () => {
99
+ a(e, "scroll", t);
102
100
  }) : () => {
103
- p(e, "scroll", t);
101
+ a(e, "scroll", t);
104
102
  };
105
- }, [u, t]), Y(H, () => ({
103
+ }, [c, t]), X(F, () => ({
106
104
  updatePosition: t,
107
105
  getRootDOMNode: () => r.current
108
- })), m(() => {
106
+ })), u(() => {
109
107
  const e = rt([r.current], t);
110
108
  return () => {
111
109
  e();
112
110
  };
113
- }, [r.current]), /* @__PURE__ */ k("div", { className: v(_), style: B, ref: r, ...D, children: [
114
- R && /* @__PURE__ */ h("div", { style: L }),
115
- /* @__PURE__ */ h(
111
+ }, [r.current]), /* @__PURE__ */ $("div", { className: z(P), style: U, ref: r, ...I, children: [
112
+ x && /* @__PURE__ */ y("div", { style: j }),
113
+ /* @__PURE__ */ y(
116
114
  "div",
117
115
  {
118
- className: $,
116
+ className: L,
119
117
  style: {
120
- ...W,
121
- ...q(C) ? C : {}
118
+ ...D,
119
+ ...k(h) ? h : {}
122
120
  },
123
- children: j || /* @__PURE__ */ h("span", {})
121
+ children: B || /* @__PURE__ */ y("span", {})
124
122
  }
125
123
  )
126
124
  ] });
127
125
  }
128
- const ct = J(
126
+ const ct = G(
129
127
  ft
130
128
  );
131
129
  ct.displayName = "Affix";
package/alert/index.js CHANGED
@@ -1,10 +1,10 @@
1
- import { jsx as e, jsxs as d } from "react/jsx-runtime";
2
- import P from "@unicom-cloud/icons/IconUiCheckCircleFill";
3
- import R from "@unicom-cloud/icons/IconUiClose";
4
- import T from "@unicom-cloud/icons/IconUiCloseCircleFill";
5
- import _ from "@unicom-cloud/icons/IconUiExclamationCircleFill";
6
- import f from "@unicom-cloud/icons/IconUiInfoCircleFill";
7
- import { forwardRef as g, useRef as q, useContext as z, useState as H } from "react";
1
+ import { jsx as e, jsxs as c } from "react/jsx-runtime";
2
+ import j from "@unicom-cloud/icons/IconUiCheckCircleFill";
3
+ import k from "@unicom-cloud/icons/IconUiClose";
4
+ import R from "@unicom-cloud/icons/IconUiCloseCircleFill";
5
+ import T from "@unicom-cloud/icons/IconUiExclamationCircleFill";
6
+ import a from "@unicom-cloud/icons/IconUiInfoCircleFill";
7
+ import { forwardRef as _, useRef as q, useContext as z, useState as H } from "react";
8
8
  import "../config-provider/ConfigProvider.js";
9
9
  import M from "../components/common/hooks/useMergeProps.js";
10
10
  import O from "@unicom-cloud/utils/class-name";
@@ -14,80 +14,80 @@ const D = {
14
14
  showIcon: !0,
15
15
  type: "default"
16
16
  };
17
- function G(u, r) {
18
- r || (r = q());
19
- const { getPrefixCls: t, componentConfig: l, rtl: N } = z(B), c = M(
20
- u,
17
+ function G(m, n) {
18
+ n ||= q();
19
+ const { getPrefixCls: p, componentConfig: f, rtl: d } = z(B), l = M(
20
+ m,
21
21
  D,
22
- l == null ? void 0 : l.Alert
22
+ f?.Alert
23
23
  ), {
24
- style: b,
25
- className: h,
26
- action: a,
27
- type: m,
28
- title: n,
29
- content: p,
30
- icon: $,
31
- showIcon: C,
32
- closable: I,
33
- closeable: x,
34
- afterClose: i,
35
- onClose: s,
24
+ style: u,
25
+ className: C,
26
+ action: s,
27
+ type: i,
28
+ title: t,
29
+ content: r,
30
+ icon: N,
31
+ showIcon: b,
32
+ closable: h,
33
+ closeable: $,
34
+ afterClose: x,
35
+ onClose: I,
36
36
  closeElement: v,
37
37
  banner: w,
38
- ...y
39
- } = c, o = t == null ? void 0 : t("alert"), [U, A] = H(!0), E = $ || {
40
- default: /* @__PURE__ */ e(f, {}),
41
- info: /* @__PURE__ */ e(f, {}),
42
- success: /* @__PURE__ */ e(P, {}),
43
- warning: /* @__PURE__ */ e(_, {}),
44
- error: /* @__PURE__ */ e(T, {})
45
- }[m];
46
- function F(k) {
47
- A(!1), s == null || s(k);
38
+ ...g
39
+ } = l, o = p?.("alert"), [y, U] = H(!0), A = N || {
40
+ default: /* @__PURE__ */ e(a, {}),
41
+ info: /* @__PURE__ */ e(a, {}),
42
+ success: /* @__PURE__ */ e(j, {}),
43
+ warning: /* @__PURE__ */ e(T, {}),
44
+ error: /* @__PURE__ */ e(R, {})
45
+ }[i];
46
+ function E(S) {
47
+ U(!1), I?.(S);
48
48
  }
49
- const S = O(
49
+ const F = O(
50
50
  o,
51
- `${o}-${m}`,
51
+ `${o}-${i}`,
52
52
  {
53
- [`${o}-with-title`]: n,
53
+ [`${o}-with-title`]: t,
54
54
  [`${o}-banner`]: w,
55
- [`${o}-rtl`]: N
55
+ [`${o}-rtl`]: d
56
56
  },
57
- h
58
- ), j = "closeable" in c ? x : I;
57
+ C
58
+ ), P = "closeable" in l ? $ : h;
59
59
  return /* @__PURE__ */ e(
60
60
  V,
61
61
  {
62
- in: U,
62
+ in: y,
63
63
  timeout: 300,
64
64
  classNames: "zoomInTop",
65
65
  unmountOnExit: !0,
66
66
  onExited: () => {
67
- i == null || i();
67
+ x?.();
68
68
  },
69
- children: /* @__PURE__ */ d(
69
+ children: /* @__PURE__ */ c(
70
70
  "div",
71
71
  {
72
- ref: r,
73
- style: b,
74
- className: S,
72
+ ref: n,
73
+ style: u,
74
+ className: F,
75
75
  role: "alert",
76
- ...y,
76
+ ...g,
77
77
  children: [
78
- C && /* @__PURE__ */ e("div", { className: `${o}-icon-wrapper`, children: E }),
79
- /* @__PURE__ */ d("div", { className: `${o}-content-wrapper`, children: [
80
- n && /* @__PURE__ */ e("div", { className: `${o}-title`, children: n }),
81
- p && /* @__PURE__ */ e("div", { className: `${o}-content`, children: p })
78
+ b && /* @__PURE__ */ e("div", { className: `${o}-icon-wrapper`, children: A }),
79
+ /* @__PURE__ */ c("div", { className: `${o}-content-wrapper`, children: [
80
+ t && /* @__PURE__ */ e("div", { className: `${o}-title`, children: t }),
81
+ r && /* @__PURE__ */ e("div", { className: `${o}-content`, children: r })
82
82
  ] }),
83
- a && /* @__PURE__ */ e("div", { className: `${o}-action`, children: a }),
84
- j && /* @__PURE__ */ e(
83
+ s && /* @__PURE__ */ e("div", { className: `${o}-action`, children: s }),
84
+ P && /* @__PURE__ */ e(
85
85
  "button",
86
86
  {
87
87
  type: "button",
88
- onClick: F,
88
+ onClick: E,
89
89
  className: `${o}-close-btn`,
90
- children: v || /* @__PURE__ */ e(R, {})
90
+ children: v || /* @__PURE__ */ e(k, {})
91
91
  }
92
92
  )
93
93
  ]
@@ -96,7 +96,7 @@ function G(u, r) {
96
96
  }
97
97
  );
98
98
  }
99
- const J = g(G);
99
+ const J = _(G);
100
100
  J.displayName = "Alert";
101
101
  export {
102
102
  J as default