@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
@@ -1,131 +1,129 @@
1
- import { jsx as t, jsxs as h, Fragment as G } from "react/jsx-runtime";
2
- import J from "@unicom-cloud/icons/IconUiExclamationCircleFill";
3
- import V from "lodash/isFunction";
4
- import K from "lodash/isNil";
5
- import { forwardRef as Q, useContext as X, useState as Y, useImperativeHandle as Z, useEffect as _ } from "react";
6
- import k from "../button/index.js";
1
+ import { jsx as n, jsxs as f, Fragment as D } from "react/jsx-runtime";
2
+ import G from "@unicom-cloud/icons/IconUiExclamationCircleFill";
3
+ import x from "lodash/isFunction";
4
+ import J from "lodash/isNil";
5
+ import { forwardRef as K, useContext as Q, useState as X, useImperativeHandle as Y, useEffect as Z } from "react";
6
+ import b from "../button/index.js";
7
7
  import "../config-provider/ConfigProvider.js";
8
- import oo from "../components/common/hooks/useMergeProps.js";
9
- import eo from "../components/common/hooks/useMergeValue.js";
10
- import no from "../tooltip/index.js";
11
- import to from "@unicom-cloud/utils/class-name";
12
- import io from "../config-provider/context.js";
13
- const ro = {
8
+ import _ from "../components/common/hooks/useMergeProps.js";
9
+ import oo from "../components/common/hooks/useMergeValue.js";
10
+ import eo from "../tooltip/index.js";
11
+ import no from "@unicom-cloud/utils/class-name";
12
+ import to from "../config-provider/context.js";
13
+ const io = {
14
14
  position: "top",
15
15
  okType: "primary",
16
- icon: /* @__PURE__ */ t(J, {}),
16
+ icon: /* @__PURE__ */ n(G, {}),
17
17
  blurToHide: !0,
18
18
  unmountOnExit: !0,
19
19
  trigger: "click",
20
20
  escToClose: !0
21
21
  };
22
- function so(y, C) {
23
- const { getPrefixCls: a, locale: P, componentConfig: p, rtl: $ } = X(io), o = oo(
24
- y,
25
- ro,
26
- p == null ? void 0 : p.Popconfirm
22
+ function ro(N, u) {
23
+ const { getPrefixCls: V, locale: d, componentConfig: T, rtl: k } = Q(to), t = _(
24
+ N,
25
+ io,
26
+ T?.Popconfirm
27
27
  ), {
28
- style: v,
29
- className: E,
30
- children: m,
31
- position: H,
32
- getPopupContainer: B,
33
- blurToHide: F,
34
- unmountOnExit: O,
35
- trigger: j,
36
- escToClose: w,
37
- onVisibleChange: f,
38
- triggerProps: r,
39
- title: u,
40
- icon: g,
41
- okText: z,
42
- cancelText: I,
43
- okType: L,
44
- okButtonProps: M,
45
- cancelButtonProps: S,
46
- content: s,
47
- ...R
48
- } = o, [d, U] = eo(!1, {
49
- defaultValue: o.defaultPopupVisible,
50
- value: o.popupVisible
51
- }), [x, c] = Y(!1), e = a == null ? void 0 : a("popconfirm"), N = !K(s), T = (n) => {
52
- "popupVisible" in o || U(n), r && r.onVisibleChange && r.onVisibleChange(n), f == null || f(n);
53
- }, l = () => {
54
- T(!1);
55
- }, W = (n) => {
56
- var i;
57
- l(), (i = o.onCancel) == null || i.call(o, n);
58
- }, q = (n) => {
59
- var b;
60
- const i = (b = o.onOk) == null ? void 0 : b.call(o, n);
61
- i != null && i.then && (c(!0), i.then(
28
+ style: y,
29
+ className: $,
30
+ children: l,
31
+ position: v,
32
+ getPopupContainer: E,
33
+ blurToHide: H,
34
+ unmountOnExit: B,
35
+ trigger: F,
36
+ escToClose: O,
37
+ onVisibleChange: j,
38
+ triggerProps: i,
39
+ title: p,
40
+ icon: C,
41
+ okText: w,
42
+ cancelText: z,
43
+ okType: I,
44
+ okButtonProps: L,
45
+ cancelButtonProps: M,
46
+ content: r,
47
+ ...S
48
+ } = t, [a, R] = oo(!1, {
49
+ defaultValue: t.defaultPopupVisible,
50
+ value: t.popupVisible
51
+ }), [h, s] = X(!1), o = V?.("popconfirm"), g = !J(r), P = (e) => {
52
+ "popupVisible" in t || R(e), i && i.onVisibleChange && i.onVisibleChange(e), j?.(e);
53
+ }, c = () => {
54
+ P(!1);
55
+ }, U = (e) => {
56
+ c(), t.onCancel?.(e);
57
+ }, W = (e) => {
58
+ const m = t.onOk?.(e);
59
+ m?.then && (s(!0), m.then(
62
60
  () => {
63
- l();
61
+ c();
64
62
  },
65
- (D) => {
66
- c(!1), console.error(D);
63
+ (A) => {
64
+ s(!1), console.error(A);
67
65
  }
68
- )), i || l();
69
- }, A = () => {
70
- const n = /* @__PURE__ */ h(G, { children: [
71
- /* @__PURE__ */ t(k, { onClick: W, size: "mini", ...S, children: I || P.Popconfirm.cancelText }),
72
- /* @__PURE__ */ t(
73
- k,
66
+ )), m || c();
67
+ }, q = () => {
68
+ const e = /* @__PURE__ */ f(D, { children: [
69
+ /* @__PURE__ */ n(b, { onClick: U, size: "mini", ...M, children: z || d.Popconfirm.cancelText }),
70
+ /* @__PURE__ */ n(
71
+ b,
74
72
  {
75
- loading: x,
76
- onClick: q,
73
+ loading: h,
74
+ onClick: W,
77
75
  size: "mini",
78
- type: L,
79
- ...M,
80
- children: z || P.Popconfirm.okText
76
+ type: I,
77
+ ...L,
78
+ children: w || d.Popconfirm.okText
81
79
  }
82
80
  )
83
81
  ] });
84
- return /* @__PURE__ */ h("div", { className: `${e}-wrapper`, children: [
85
- /* @__PURE__ */ h("div", { className: `${e}-title`, children: [
86
- g && /* @__PURE__ */ t("span", { className: `${e}-title-icon`, children: g }),
87
- /* @__PURE__ */ t("div", { className: `${e}-title-text`, children: V(u) ? u() : u })
82
+ return /* @__PURE__ */ f("div", { className: `${o}-wrapper`, children: [
83
+ /* @__PURE__ */ f("div", { className: `${o}-title`, children: [
84
+ C && /* @__PURE__ */ n("span", { className: `${o}-title-icon`, children: C }),
85
+ /* @__PURE__ */ n("div", { className: `${o}-title-text`, children: x(p) ? p() : p })
88
86
  ] }),
89
- N && /* @__PURE__ */ t("div", { className: `${e}-inner-content`, children: V(s) ? s() : s }),
90
- /* @__PURE__ */ t("div", { className: `${e}-btn`, children: n })
87
+ g && /* @__PURE__ */ n("div", { className: `${o}-inner-content`, children: x(r) ? r() : r }),
88
+ /* @__PURE__ */ n("div", { className: `${o}-btn`, children: e })
91
89
  ] });
92
90
  };
93
- return Z(C, () => ({
94
- close: l
95
- })), _(() => (!d && x && c(!1), () => {
96
- c(!1);
97
- }), [d]), /* @__PURE__ */ t(
98
- no,
91
+ return Y(u, () => ({
92
+ close: c
93
+ })), Z(() => (!a && h && s(!1), () => {
94
+ s(!1);
95
+ }), [a]), /* @__PURE__ */ n(
96
+ eo,
99
97
  {
100
- ...R,
101
- ref: C,
98
+ ...S,
99
+ ref: u,
102
100
  style: {
103
101
  maxWidth: 350,
104
- ...v
102
+ ...y
105
103
  },
106
- className: to(E, {
107
- [`${e}-rtl`]: $,
108
- [`${e}-has-content`]: N
104
+ className: no($, {
105
+ [`${o}-rtl`]: k,
106
+ [`${o}-has-content`]: g
109
107
  }),
110
- prefixCls: e,
111
- getPopupContainer: B,
112
- position: H,
113
- trigger: j,
114
- escToClose: w,
115
- popupVisible: d,
116
- content: A,
117
- unmountOnExit: O,
118
- blurToHide: F,
108
+ prefixCls: o,
109
+ getPopupContainer: E,
110
+ position: v,
111
+ trigger: F,
112
+ escToClose: O,
113
+ popupVisible: a,
114
+ content: q,
115
+ unmountOnExit: B,
116
+ blurToHide: H,
119
117
  popupHoverStay: !0,
120
- triggerProps: r,
121
- onVisibleChange: T,
122
- childrenPrefix: e,
123
- children: typeof m == "string" ? /* @__PURE__ */ t("span", { children: m }) : m
118
+ triggerProps: i,
119
+ onVisibleChange: P,
120
+ childrenPrefix: o,
121
+ children: typeof l == "string" ? /* @__PURE__ */ n("span", { children: l }) : l
124
122
  }
125
123
  );
126
124
  }
127
- const co = Q(so);
128
- co.displayName = "Popconfirm";
125
+ const so = K(ro);
126
+ so.displayName = "Popconfirm";
129
127
  export {
130
- co as default
128
+ so as default
131
129
  };
package/popover/index.js CHANGED
@@ -1,46 +1,46 @@
1
1
  import { jsxs as j, jsx as e } from "react/jsx-runtime";
2
- import c from "lodash/isFunction";
2
+ import m from "lodash/isFunction";
3
3
  import { forwardRef as O, useContext as R } from "react";
4
4
  import "../config-provider/ConfigProvider.js";
5
5
  import T from "../components/common/hooks/useMergeProps.js";
6
6
  import w from "../tooltip/index.js";
7
7
  import F from "@unicom-cloud/utils/class-name";
8
- import { isEmptyReactNode as u } from "../components/common/utils/is.js";
8
+ import { isEmptyReactNode as a } from "../components/common/utils/is.js";
9
9
  import H from "../config-provider/context.js";
10
10
  const M = {
11
11
  position: "top",
12
12
  trigger: "hover",
13
13
  unmountOnExit: !0
14
14
  };
15
- function S(d, f) {
16
- const { getPrefixCls: t, componentConfig: n, rtl: g } = R(H), m = T(
17
- d,
15
+ function S(c, u) {
16
+ const { getPrefixCls: d, componentConfig: f, rtl: g } = R(H), p = T(
17
+ c,
18
18
  M,
19
- n == null ? void 0 : n.Popover
19
+ f?.Popover
20
20
  ), {
21
- style: h,
22
- className: v,
23
- children: r,
24
- position: C,
21
+ style: C,
22
+ className: h,
23
+ children: t,
24
+ position: v,
25
25
  getPopupContainer: x,
26
- trigger: N,
27
- defaultPopupVisible: P,
26
+ trigger: P,
27
+ defaultPopupVisible: N,
28
28
  popupVisible: b,
29
- triggerProps: i,
29
+ triggerProps: n,
30
30
  unmountOnExit: y,
31
31
  onVisibleChange: V,
32
- content: s,
33
- title: p,
32
+ content: r,
33
+ title: i,
34
34
  ...$
35
- } = m, o = t == null ? void 0 : t("popover"), l = c(p) ? p() : p, a = c(s) ? s() : s, E = u(l, !0) && u(a, !0) ? null : /* @__PURE__ */ j(
35
+ } = p, o = d?.("popover"), s = m(i) ? i() : i, l = m(r) ? r() : r, E = a(s, !0) && a(l, !0) ? null : /* @__PURE__ */ j(
36
36
  "div",
37
37
  {
38
38
  className: F(`${o}-inner`, {
39
39
  [`${o}-inner-rtl`]: g
40
40
  }),
41
41
  children: [
42
- l ? /* @__PURE__ */ e("div", { className: `${o}-title`, children: l }) : null,
43
- /* @__PURE__ */ e("div", { className: `${o}-inner-content`, children: a })
42
+ s ? /* @__PURE__ */ e("div", { className: `${o}-title`, children: s }) : null,
43
+ /* @__PURE__ */ e("div", { className: `${o}-inner-content`, children: l })
44
44
  ]
45
45
  }
46
46
  );
@@ -48,25 +48,25 @@ function S(d, f) {
48
48
  w,
49
49
  {
50
50
  ...$,
51
- ref: f,
51
+ ref: u,
52
52
  style: {
53
53
  maxWidth: 350,
54
- ...h
54
+ ...C
55
55
  },
56
- className: v,
56
+ className: h,
57
57
  prefixCls: o,
58
58
  getPopupContainer: x,
59
- position: C,
60
- trigger: N,
59
+ position: v,
60
+ trigger: P,
61
61
  content: E,
62
62
  popupHoverStay: !0,
63
63
  unmountOnExit: y,
64
- triggerProps: i,
65
- defaultPopupVisible: P,
66
- onVisibleChange: V || (i ? i.onVisibleChange : void 0),
64
+ triggerProps: n,
65
+ defaultPopupVisible: N,
66
+ onVisibleChange: V || (n ? n.onVisibleChange : void 0),
67
67
  childrenPrefix: o,
68
- ..."popupVisible" in m ? { popupVisible: b } : {},
69
- children: typeof r == "string" ? /* @__PURE__ */ e("span", { children: r }) : r
68
+ ..."popupVisible" in p ? { popupVisible: b } : {},
69
+ children: typeof t == "string" ? /* @__PURE__ */ e("span", { children: t }) : t
70
70
  }
71
71
  );
72
72
  }
package/portal/Portal.js CHANGED
@@ -1,15 +1,14 @@
1
- import a, { useEffect as n, useImperativeHandle as c } from "react";
2
- import { createPortal as f } from "react-dom";
3
- import u from "../components/common/hooks/useForceUpdate.js";
4
- function m(e, r) {
5
- var t;
6
- const o = u();
7
- return n(() => (setTimeout(() => {
8
- o();
1
+ import o, { useEffect as a, useImperativeHandle as n } from "react";
2
+ import { createPortal as c } from "react-dom";
3
+ import f from "../components/common/hooks/useForceUpdate.js";
4
+ function u(e, t) {
5
+ const r = f();
6
+ return a(() => (setTimeout(() => {
7
+ r();
9
8
  }, 0), () => {
10
- }), []), c(r, () => ({})), f(e.children, ((t = e.getContainer) == null ? void 0 : t.call(e)) || document.body);
9
+ }), []), n(t, () => ({})), c(e.children, e.getContainer?.() || document.body);
11
10
  }
12
- const P = a.forwardRef(m);
11
+ const l = o.forwardRef(u);
13
12
  export {
14
- P as default
13
+ l as default
15
14
  };
package/progress/index.js CHANGED
@@ -1,10 +1,10 @@
1
- import { jsxs as C, jsx as i } from "react/jsx-runtime";
2
- import { forwardRef as P, useContext as $ } from "react";
1
+ import { jsxs as w, jsx as i } from "react/jsx-runtime";
2
+ import { forwardRef as y, useContext as $ } from "react";
3
3
  import "../config-provider/ConfigProvider.js";
4
4
  import k from "../components/common/hooks/useMergeProps.js";
5
5
  import N from "@unicom-cloud/utils/class-name";
6
6
  import { omit as S } from "../components/common/utils/omit.js";
7
- import c from "./CircleProgress.js";
7
+ import m from "./CircleProgress.js";
8
8
  import T from "./LineProgess.js";
9
9
  import { StepProgress as W } from "./StepProgress.js";
10
10
  import b from "../config-provider/context.js";
@@ -15,37 +15,37 @@ const j = {
15
15
  percent: 0,
16
16
  size: "default"
17
17
  };
18
- function z(f, h) {
19
- const { getPrefixCls: l, componentConfig: a, rtl: d } = $(b), t = k(
20
- f,
18
+ function z(a, f) {
19
+ const { getPrefixCls: c, componentConfig: h, rtl: d } = $(b), t = k(
20
+ a,
21
21
  j,
22
- a == null ? void 0 : a.Progress
22
+ h?.Progress
23
23
  ), {
24
24
  className: u,
25
- style: x,
26
- size: p,
27
- width: o,
28
- strokeWidth: n,
29
- steps: g,
30
- percent: w,
31
- ...y
32
- } = t, s = g && t.type !== "circle" ? "steps" : t.type, r = l == null ? void 0 : l("progress"), e = "status" in t ? t.status : w >= 100 ? "success" : "normal", m = { width: o };
33
- return p === "mini" && s === "line" && (m.width = o || 16, m.height = o || 16), /* @__PURE__ */ C(
25
+ style: g,
26
+ size: l,
27
+ width: s,
28
+ strokeWidth: p,
29
+ steps: C,
30
+ percent: x,
31
+ ...P
32
+ } = t, e = C && t.type !== "circle" ? "steps" : t.type, r = c?.("progress"), o = "status" in t ? t.status : x >= 100 ? "success" : "normal", n = { width: s };
33
+ return l === "mini" && e === "line" && (n.width = s || 16, n.height = s || 16), /* @__PURE__ */ w(
34
34
  "div",
35
35
  {
36
- ref: h,
36
+ ref: f,
37
37
  className: N(
38
38
  r,
39
- `${r}-${s}`,
40
- `${r}-${p}`,
39
+ `${r}-${e}`,
40
+ `${r}-${l}`,
41
41
  {
42
- [`${r}-is-${e}`]: e !== "normal",
42
+ [`${r}-is-${o}`]: o !== "normal",
43
43
  [`${r}-rtl`]: d
44
44
  },
45
45
  u
46
46
  ),
47
- style: { ...m, ...x },
48
- ...S(y, [
47
+ style: { ...n, ...g },
48
+ ...S(P, [
49
49
  "type",
50
50
  "animation",
51
51
  "status",
@@ -58,42 +58,42 @@ function z(f, h) {
58
58
  "bufferColor"
59
59
  ]),
60
60
  children: [
61
- s === "steps" && /* @__PURE__ */ i(
61
+ e === "steps" && /* @__PURE__ */ i(
62
62
  W,
63
63
  {
64
64
  ...t,
65
- type: s,
66
- status: e,
65
+ type: e,
66
+ status: o,
67
67
  prefixCls: r
68
68
  }
69
69
  ),
70
- s === "circle" && /* @__PURE__ */ i(
71
- c,
70
+ e === "circle" && /* @__PURE__ */ i(
71
+ m,
72
72
  {
73
73
  width: t.width,
74
74
  ...t,
75
75
  pathStrokeColor: t.trailColor,
76
- status: e,
76
+ status: o,
77
77
  prefixCls: r
78
78
  }
79
79
  ),
80
- s === "line" && (p === "mini" ? /* @__PURE__ */ i(
81
- c,
80
+ e === "line" && (l === "mini" ? /* @__PURE__ */ i(
81
+ m,
82
82
  {
83
83
  pathStrokeColor: t.trailColor,
84
84
  ...t,
85
- pathStrokeWidth: n || 4,
86
- width: o || 16,
87
- strokeWidth: n || 4,
85
+ pathStrokeWidth: p || 4,
86
+ width: s || 16,
87
+ strokeWidth: p || 4,
88
88
  prefixCls: r,
89
- status: e
89
+ status: o
90
90
  }
91
- ) : /* @__PURE__ */ i(T, { ...t, status: e, prefixCls: r }))
91
+ ) : /* @__PURE__ */ i(T, { ...t, status: o, prefixCls: r }))
92
92
  ]
93
93
  }
94
94
  );
95
95
  }
96
- const R = P(z);
96
+ const R = y(z);
97
97
  R.displayName = "Progress";
98
98
  export {
99
99
  R as default
@@ -0,0 +1,99 @@
1
+ import { jsx as r } from "react/jsx-runtime";
2
+ import Q from "lodash/merge";
3
+ import { QRCodeCanvas as R, QRCodeSVG as h } from "qrcode.react";
4
+ import { useContext as z } from "react";
5
+ import "../config-provider/ConfigProvider.js";
6
+ import "@unicom-cloud/utils/case-name";
7
+ import N from "@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 S from "../config-provider/context.js";
54
+ const bo = (e) => {
55
+ const { getPrefixCls: s, componentConfig: n } = z(S), {
56
+ value: f,
57
+ renderAs: t = "svg",
58
+ size: o = 160,
59
+ bordered: m = !0,
60
+ errorLevel: a = "M",
61
+ fgColor: c = "#000000",
62
+ bgColor: d = "#ffffff",
63
+ marginSize: l = 0,
64
+ imageSettings: C,
65
+ className: g,
66
+ style: v
67
+ } = Q({}, n?.QRCode, e), i = s?.("qrcode"), u = o - (m ? 12 : 0), x = () => {
68
+ const p = {
69
+ value: f,
70
+ size: u,
71
+ level: a,
72
+ fgColor: c,
73
+ bgColor: d,
74
+ marginSize: l,
75
+ imageSettings: C
76
+ };
77
+ return t === "canvas" ? /* @__PURE__ */ r(R, { ...p }) : /* @__PURE__ */ r(h, { ...p });
78
+ };
79
+ return /* @__PURE__ */ r(
80
+ "div",
81
+ {
82
+ className: N(
83
+ i,
84
+ m && `${i}-bordered`,
85
+ g,
86
+ `qrcode-${t}`
87
+ ),
88
+ style: {
89
+ width: o,
90
+ height: o,
91
+ ...v
92
+ },
93
+ children: x()
94
+ }
95
+ );
96
+ };
97
+ export {
98
+ bo as default
99
+ };
@@ -0,0 +1 @@
1
+