@unicom-cloud/ui 0.8.81 → 0.8.82

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 (262) hide show
  1. package/Affix.js +1 -1
  2. package/Alert.js +1 -1
  3. package/AutoComplete.js +2 -2
  4. package/BackTop.js +2 -2
  5. package/Badge.js +1 -1
  6. package/Breadcrumb.js +2 -2
  7. package/Button.js +1 -1
  8. package/Calendar.js +2 -2
  9. package/Card.js +1 -1
  10. package/Carousel.js +1 -1
  11. package/Cascader.js +1 -1
  12. package/Checkbox.js +1 -1
  13. package/Collapse.js +1 -1
  14. package/ColorPicker.js +2 -2
  15. package/Comment.js +1 -1
  16. package/ConfigProvider.js +5 -4
  17. package/Copy.js +1 -1
  18. package/DatePicker.js +7 -7
  19. package/Descriptions.js +1 -1
  20. package/Divider.js +1 -1
  21. package/Draggable.js +1 -1
  22. package/Dropdown.js +1 -1
  23. package/Empty.js +1 -1
  24. package/Icon.js +1 -1
  25. package/IconHover.js +1 -1
  26. package/Image.js +1 -1
  27. package/InputNumber.js +1 -1
  28. package/Layout.js +1 -1
  29. package/Link.js +1 -1
  30. package/List.js +2 -2
  31. package/Mentions.js +2 -2
  32. package/Menu.js +1 -1
  33. package/Message.js +1 -1
  34. package/Modal.js +1 -1
  35. package/Notice.js +1 -1
  36. package/Notification.js +5 -5
  37. package/OverflowEllipsis.js +1 -1
  38. package/PageHeader.js +1 -1
  39. package/Pagination.js +1 -1
  40. package/Popconfirm.js +1 -1
  41. package/Popover.js +1 -1
  42. package/Progress.js +1 -1
  43. package/Radio.js +1 -1
  44. package/Rate.js +1 -1
  45. package/ResizeBox.js +1 -1
  46. package/Result.js +1 -1
  47. package/Select.js +1 -1
  48. package/Skeleton.js +1 -1
  49. package/Slider.js +1 -1
  50. package/Space.js +1 -1
  51. package/SpeechSynthesis.js +1 -1
  52. package/Spin.js +1 -1
  53. package/Statistic.js +2 -2
  54. package/Steps.js +1 -1
  55. package/Switch.js +1 -1
  56. package/Table.js +1 -1
  57. package/Tabs.js +1 -1
  58. package/Tag.js +1 -1
  59. package/Tooltip.js +1 -1
  60. package/Transfer.js +2 -2
  61. package/Tree.js +1 -1
  62. package/TreeSelect.js +1 -1
  63. package/Trigger.js +1 -1
  64. package/Typography.js +1 -1
  65. package/affix/index.js +60 -57
  66. package/alert/index.js +53 -53
  67. package/anchor/Anchor.js +72 -72
  68. package/anchor/Link.js +27 -27
  69. package/anchor/util.js +1 -1
  70. package/auto-complete/index.js +2 -2
  71. package/avatar/Avatar.js +31 -31
  72. package/avatar/Group.js +25 -25
  73. package/back-top/index.js +30 -30
  74. package/badge/index.js +37 -37
  75. package/breadcrumb/index.js +26 -26
  76. package/button/Group.js +7 -7
  77. package/button/index.js +29 -29
  78. package/calendar/index.js +2 -2
  79. package/card/Grid.js +12 -12
  80. package/card/Meta.js +17 -17
  81. package/card/index.js +44 -44
  82. package/carousel/Arrow.js +19 -19
  83. package/carousel/Indicator.js +25 -25
  84. package/carousel/index.js +77 -77
  85. package/cascader/Cascader.js +2 -2
  86. package/cascader/index.js +1 -1
  87. package/cascader/util.js +1 -1
  88. package/checkbox/Checkbox.js +2 -2
  89. package/checkbox/Group.js +2 -2
  90. package/checkbox/GroupBlock.js +2 -2
  91. package/checkbox/index.js +2 -2
  92. package/chunk/{yLRv5RIK.js → CQI1gsQs.js} +181 -181
  93. package/chunk/CmMehQON.js +1464 -0
  94. package/chunk/Cplu5dtQ.js +730 -0
  95. package/chunk/{C5X4hOkx.js → D0338Pbq.js} +80 -80
  96. package/chunk/{DYspELhF.js → DXDbeIai.js} +223 -223
  97. package/chunk/{DEiyXzBZ.js → DfrB26fI.js} +63 -63
  98. package/chunk/{BG7YGUsx.js → dKvAiKxr.js} +119 -119
  99. package/chunk/{BNevupAU.js → uKZyjtff.js} +5 -4
  100. package/chunk/{DLBfXSnU.js → w221i0nK.js} +2872 -2871
  101. package/collapse/Collapse.js +2 -2
  102. package/collapse/Item.js +2 -2
  103. package/collapse/index.js +1 -1
  104. package/color-picker/ControlBar.js +36 -36
  105. package/color-picker/InputAlpha.js +11 -11
  106. package/color-picker/InputHex.js +24 -24
  107. package/color-picker/InputRgb.js +23 -23
  108. package/color-picker/Palette.js +18 -18
  109. package/color-picker/Panel.js +2 -2
  110. package/color-picker/index.js +2 -2
  111. package/comment/index.js +31 -31
  112. package/config-provider/ConfigProvider.js +5 -4
  113. package/config-provider/context.js +2 -2
  114. package/config-provider/index.js +4 -3
  115. package/copy/index.js +28 -28
  116. package/date-picker/Picker.js +276 -276
  117. package/date-picker/{PickerRange.js → RangePicker.js} +2 -2
  118. package/date-picker/index.js +26 -27
  119. package/descriptions/index.js +33 -33
  120. package/divider/index.js +12 -12
  121. package/draggable/index.js +23 -23
  122. package/drawer/Drawer.js +81 -81
  123. package/dropdown/Button.js +1 -1
  124. package/dropdown/index.js +56 -56
  125. package/empty/index.js +1 -1
  126. package/form/Form.js +76 -76
  127. package/form/FormItem.js +64 -64
  128. package/grid/Col.js +53 -53
  129. package/grid/Row.js +34 -34
  130. package/grid/grid-item.js +29 -29
  131. package/grid/grid.js +50 -50
  132. package/icon/index.js +20 -19
  133. package/icon-hover/index.js +1 -1
  134. package/image/Image.js +86 -86
  135. package/image/ImagePreview.js +2 -2
  136. package/image/ImagePreviewArrow.js +22 -22
  137. package/image/ImagePreviewGroup.js +1 -1
  138. package/image/index.js +1 -1
  139. package/index.js +410 -408
  140. package/input/Group.js +8 -8
  141. package/input/Input.js +322 -322
  142. package/input/InputElement.js +1 -1
  143. package/input/Password.js +1 -1
  144. package/input/Search.js +1 -1
  145. package/input/Textarea.js +1 -1
  146. package/input-number/index.js +1 -1
  147. package/input-tag/InputTag.js +40 -40
  148. package/layout/Content.js +7 -7
  149. package/layout/Footer.js +9 -9
  150. package/layout/Header.js +7 -7
  151. package/layout/Sider.js +55 -55
  152. package/layout/index.js +32 -32
  153. package/link/index.js +35 -35
  154. package/list/Item.js +29 -29
  155. package/list/Meta.js +12 -12
  156. package/list/index.js +2 -2
  157. package/mentions/index.js +2 -2
  158. package/menu/Menu.js +2 -2
  159. package/menu/OverflowWrap.js +1 -1
  160. package/menu/index.js +2 -2
  161. package/message/index.js +1 -1
  162. package/message/useMessage.js +1 -1
  163. package/modal/Confirm.js +2 -2
  164. package/modal/Modal.js +2 -2
  165. package/modal/index.js +1 -1
  166. package/notice/index.js +1 -1
  167. package/notification/index.js +5 -5
  168. package/notification/useNotification.js +1 -1
  169. package/overflow-ellipsis/OverflowItem.js +12 -12
  170. package/overflow-ellipsis/index.js +24 -24
  171. package/package.json +1 -1
  172. package/page-header/index.js +38 -38
  173. package/pagination/PageItem.js +16 -16
  174. package/pagination/PageJumper.js +1 -1
  175. package/pagination/PageOption.js +2 -2
  176. package/pagination/Pagination.js +2 -2
  177. package/pagination/index.js +1 -1
  178. package/picker/Input.js +69 -69
  179. package/picker/InputRange.js +111 -111
  180. package/popconfirm/index.js +61 -61
  181. package/popover/index.js +35 -35
  182. package/progress/index.js +22 -22
  183. package/radio/Group.js +2 -2
  184. package/radio/GroupBlock.js +2 -2
  185. package/radio/Radio.js +2 -2
  186. package/radio/index.js +2 -2
  187. package/rate/index.js +49 -49
  188. package/resize-box/ResizeTrigger.js +34 -34
  189. package/resize-box/Split.js +56 -56
  190. package/resize-box/SplitGroup.js +55 -55
  191. package/resize-box/index.js +51 -51
  192. package/result/index.js +41 -41
  193. package/select/Option.js +1 -1
  194. package/select/Select.js +2 -2
  195. package/select/index.js +2 -2
  196. package/select/util.js +1 -1
  197. package/select-view/Core.js +125 -125
  198. package/skeleton/index.js +20 -20
  199. package/slider/Button.js +57 -57
  200. package/slider/index.js +116 -116
  201. package/space/index.js +46 -44
  202. package/speech-synthesis/index.js +1 -1
  203. package/spin/DotLoading.js +10 -10
  204. package/spin/index.js +44 -44
  205. package/statistic/Countdown.js +34 -34
  206. package/statistic/index.js +67 -67
  207. package/steps/index.js +55 -55
  208. package/style.css +1 -1
  209. package/switch/index.js +54 -54
  210. package/table/Table.js +3 -3
  211. package/table/index.js +1 -1
  212. package/tabs/Tab.js +2 -2
  213. package/tabs/TabContent.js +2 -2
  214. package/tabs/TabPane.js +12 -12
  215. package/tabs/index.js +2 -2
  216. package/tag/index.js +45 -45
  217. package/time-picker/Picker.js +76 -76
  218. package/time-picker/TimePicker.js +136 -136
  219. package/time-picker/index.js +8 -8
  220. package/time-picker/util.js +5 -5
  221. package/timeline/Item.js +47 -47
  222. package/timeline/Timeline.js +41 -41
  223. package/tooltip/index.js +29 -29
  224. package/transfer/Item.js +2 -2
  225. package/transfer/List.js +2 -2
  226. package/transfer/index.js +2 -2
  227. package/tree/Animation.js +2 -2
  228. package/tree/Node.js +2 -2
  229. package/tree/NodeList.js +1 -1
  230. package/tree/Tree.js +2 -2
  231. package/tree/index.js +1 -1
  232. package/tree-select/List.js +1 -1
  233. package/tree-select/Select.js +2 -2
  234. package/tree-select/index.js +2 -2
  235. package/trigger/index.js +60 -60
  236. package/types/config-provider/ConfigProvider.d.ts +2 -2
  237. package/types/config-provider/context.d.ts +1 -1
  238. package/types/date-picker/index.d.ts +8 -9
  239. package/types/date-picker/interface.d.ts +9 -9
  240. package/types/index.d.ts +1 -1
  241. package/types/picker/Input.d.ts +2 -2
  242. package/types/space/index.d.ts +2 -1
  243. package/types/utils/names.d.ts +1 -1
  244. package/typography/Base.js +53 -53
  245. package/typography/Ellipsis.js +9 -8
  246. package/typography/Operations.js +28 -28
  247. package/typography/Paragraph.js +8 -8
  248. package/typography/Typography.js +7 -7
  249. package/typography/index.js +1 -1
  250. package/upload/TriggerNode.js +47 -47
  251. package/upload/Upload.js +184 -184
  252. package/utils/contextHolder.js +3 -3
  253. package/utils/index.js +13 -13
  254. package/utils/names.js +1 -1
  255. package/utils/setPrimaryColor.js +18 -13
  256. package/utils/tween.js +1 -1
  257. package/verification-code/VerificationCode.js +49 -49
  258. package/version/index.js +1 -1
  259. package/watermark/Watermark.js +24 -24
  260. package/chunk/CQvM33Vg.js +0 -724
  261. package/chunk/yhU2zeeu.js +0 -1461
  262. /package/types/date-picker/{PickerRange.d.ts → RangePicker.d.ts} +0 -0
@@ -6,7 +6,7 @@ import "lodash/isArray";
6
6
  import "lodash/isPlainObject";
7
7
  import "lodash/isUndefined";
8
8
  import "react";
9
- import "../chunk/CQvM33Vg.js";
9
+ import "../chunk/Cplu5dtQ.js";
10
10
  import "../chunk/BFTV6myl.js";
11
11
  import "../chunk/VSe_Wq1g.js";
12
12
  import "../chunk/a3hR6zLw.js";
@@ -17,7 +17,7 @@ import "../chunk/tamGhTJp.js";
17
17
  import "../chunk/ClqoGc3r.js";
18
18
  import "./context.js";
19
19
  import "../chunk/CC---6jO.js";
20
- import { P as q } from "../chunk/yhU2zeeu.js";
20
+ import { P as q } from "../chunk/CmMehQON.js";
21
21
  import "./util.js";
22
22
  export {
23
23
  q as default
@@ -1,50 +1,49 @@
1
1
  import { jsx as r } from "react/jsx-runtime";
2
- import k, { useRef as P, useImperativeHandle as d } from "react";
3
- import p from "./Picker.js";
4
- import { P as u, D as f, Q as l, W as y, Y as N, M as $ } from "../chunk/yhU2zeeu.js";
5
- function c(s, i) {
6
- function o(n, m) {
7
- const t = P();
8
- return d(m, () => ({
2
+ import { forwardRef as s, useRef as d, useImperativeHandle as p } from "react";
3
+ import u from "./Picker.js";
4
+ import { P as f, M as l, D as y, Y as N, W, Q as $ } from "../chunk/CmMehQON.js";
5
+ function i(m, t) {
6
+ function k(P, n) {
7
+ const o = d();
8
+ return p(n, () => ({
9
9
  focus() {
10
10
  var e, a;
11
- (a = (e = t.current) == null ? void 0 : e.focus) == null || a.call(e);
11
+ (a = (e = o.current) == null ? void 0 : e.focus) == null || a.call(e);
12
12
  },
13
13
  blur() {
14
14
  var e, a;
15
- (a = (e = t.current) == null ? void 0 : e.blur) == null || a.call(e);
15
+ (a = (e = o.current) == null ? void 0 : e.blur) == null || a.call(e);
16
16
  }
17
- })), /* @__PURE__ */ r(p, { ...n, ref: t, picker: s, mode: i.mode });
17
+ })), /* @__PURE__ */ r(u, { ...P, ref: o, picker: m, mode: t.mode });
18
18
  }
19
- return o.displayName = i.displayName, k.forwardRef(o);
19
+ return k.displayName = t.displayName, s(k);
20
20
  }
21
- const W = c(/* @__PURE__ */ r(f, {}), {
21
+ const c = i(/* @__PURE__ */ r(y, {}), {
22
22
  displayName: "DatePicker",
23
23
  mode: "date"
24
- }), h = c(/* @__PURE__ */ r($, {}), {
24
+ }), h = i(/* @__PURE__ */ r(l, {}), {
25
25
  displayName: "MonthPicker",
26
26
  mode: "month"
27
- }), D = c(/* @__PURE__ */ r(N, {}), {
27
+ }), M = i(/* @__PURE__ */ r(N, {}), {
28
28
  displayName: "YearPicker",
29
29
  mode: "year"
30
- }), M = c(/* @__PURE__ */ r(y, {}), {
30
+ }), Q = i(/* @__PURE__ */ r(W, {}), {
31
31
  displayName: "WeekPicker",
32
32
  mode: "week"
33
- }), Q = c(/* @__PURE__ */ r(l, {}), {
33
+ }), Y = i(/* @__PURE__ */ r($, {}), {
34
34
  displayName: "QuarterPicker",
35
35
  mode: "quarter"
36
- }), R = u, g = Object.assign(W, {
37
- MonthPicker: h,
38
- YearPicker: D,
39
- WeekPicker: M,
40
- QuarterPicker: Q,
41
- RangePicker: R
42
36
  });
37
+ c.MonthPicker = h;
38
+ c.YearPicker = M;
39
+ c.WeekPicker = Q;
40
+ c.QuarterPicker = Y;
41
+ c.RangePicker = f;
43
42
  export {
44
43
  h as MonthPicker,
45
- Q as QuarterPicker,
46
- R as RangePicker,
47
- M as WeekPicker,
48
- D as YearPicker,
49
- g as default
44
+ Y as QuarterPicker,
45
+ f as RangePicker,
46
+ Q as WeekPicker,
47
+ M as YearPicker,
48
+ c as default
50
49
  };
@@ -1,58 +1,58 @@
1
1
  import { jsxs as c, jsx as r } from "react/jsx-runtime";
2
- import C from "lodash/isArray";
2
+ import I from "lodash/isArray";
3
3
  import V from "lodash/isNumber";
4
4
  import q from "lodash/isPlainObject";
5
5
  import { useContext as B, useState as G, useRef as J, useEffect as K, Fragment as x } from "react";
6
- import { a as Q } from "../chunk/CQvM33Vg.js";
6
+ import { a as Q } from "../chunk/Cplu5dtQ.js";
7
7
  import { u as U } from "../chunk/BFTV6myl.js";
8
8
  import W from "@unicom-cloud/utils/class-name";
9
- import { responsiveObserve as P, responsiveArray as k } from "../utils/responsiveObserve.js";
10
- const z = (f) => C(f) ? f.reduce((h, p) => h + (p.span || 1), 0) : 0, X = {
9
+ import { responsiveObserve as k, responsiveArray as z } from "../utils/responsiveObserve.js";
10
+ const P = (f) => I(f) ? f.reduce((p, m) => p + (m.span || 1), 0) : 0, X = {
11
11
  layout: "horizontal",
12
12
  column: 3,
13
13
  tableLayout: "auto"
14
14
  };
15
15
  function Y(f) {
16
16
  const {
17
- getPrefixCls: h,
18
- componentConfig: p,
19
- rtl: I,
17
+ getPrefixCls: p,
18
+ componentConfig: m,
19
+ rtl: w,
20
20
  size: d
21
- } = B(Q), w = U(
21
+ } = B(Q), D = U(
22
22
  f,
23
23
  X,
24
- p == null ? void 0 : p.Descriptions
24
+ m == null ? void 0 : m.Descriptions
25
25
  ), {
26
- style: D,
27
- className: L,
28
- column: m,
26
+ style: L,
27
+ className: O,
28
+ column: u,
29
29
  title: v,
30
30
  data: b,
31
- border: O,
31
+ border: j,
32
32
  labelStyle: y,
33
33
  valueStyle: $,
34
34
  colon: N,
35
- layout: u,
36
- size: g,
37
- tableLayout: j
38
- } = w, s = h("descriptions"), [A, E] = G(), S = J(null);
39
- K(() => (S.current = P.subscribe((n) => {
40
- for (let t = 0; t < k.length; t++) {
41
- const e = k[t];
35
+ layout: h,
36
+ size: S,
37
+ tableLayout: C
38
+ } = D, s = p == null ? void 0 : p("descriptions"), [A, E] = G(), g = J(null);
39
+ K(() => (g.current = k.subscribe((n) => {
40
+ for (let t = 0; t < z.length; t++) {
41
+ const e = z[t];
42
42
  if (n[e]) {
43
43
  E(e);
44
44
  break;
45
45
  }
46
46
  }
47
47
  }), () => {
48
- P.unsubscribe(S.current);
48
+ k.unsubscribe(g.current);
49
49
  }), []);
50
50
  let a = 3;
51
- q(m) && (a = m[A] || 3), V(m) && m > 0 && (a = m);
51
+ q(u) && (a = u[A] || 3), V(u) && u > 0 && (a = u);
52
52
  const o = [];
53
- if (C(b) && b.length > 0 && a) {
53
+ if (I(b) && b.length > 0 && a) {
54
54
  b.forEach((e) => {
55
- const i = o[o.length - 1], l = z(i);
55
+ const i = o[o.length - 1], l = P(i);
56
56
  l === 0 ? o.push([
57
57
  {
58
58
  ...e,
@@ -68,7 +68,7 @@ function Y(f) {
68
68
  span: e.span ? e.span + l > a ? a - l : e.span : 1
69
69
  });
70
70
  });
71
- const n = o[o.length - 1], t = z(n);
71
+ const n = o[o.length - 1], t = P(n);
72
72
  t < a && (n[n.length - 1].span = n[n.length - 1].span + a - t);
73
73
  }
74
74
  function F(n, t) {
@@ -159,20 +159,20 @@ function Y(f) {
159
159
  }) }, t);
160
160
  }
161
161
  function R(n, t) {
162
- return u === "inline-vertical" || u === "inline-horizontal" ? M(n, t) : u === "vertical" ? F(n, t) : H(n, t);
162
+ return h === "inline-vertical" || h === "inline-horizontal" ? M(n, t) : h === "vertical" ? F(n, t) : H(n, t);
163
163
  }
164
164
  const T = W(
165
165
  s,
166
166
  {
167
- [`${s}-border`]: O,
168
- [`${s}-layout-${u}`]: u,
169
- [`${s}-size-${g || d}`]: g || d,
170
- [`${s}-table-layout-fixed`]: j === "fixed",
171
- [`${s}-rtl`]: I
167
+ [`${s}-border`]: j,
168
+ [`${s}-layout-${h}`]: h,
169
+ [`${s}-size-${S || d}`]: S || d,
170
+ [`${s}-table-layout-fixed`]: C === "fixed",
171
+ [`${s}-rtl`]: w
172
172
  },
173
- L
173
+ O
174
174
  );
175
- return /* @__PURE__ */ c("div", { className: T, style: D, children: [
175
+ return /* @__PURE__ */ c("div", { className: T, style: L, children: [
176
176
  v && /* @__PURE__ */ r("div", { className: `${s}-title`, children: v }),
177
177
  /* @__PURE__ */ r("div", { className: `${s}-body`, children: /* @__PURE__ */ r("table", { className: `${s}-table`, cellPadding: 0, cellSpacing: 0, children: /* @__PURE__ */ r("tbody", { children: o.map((n, t) => R(n, t)) }) }) })
178
178
  ] });
package/divider/index.js CHANGED
@@ -1,20 +1,20 @@
1
1
  import { jsx as i } from "react/jsx-runtime";
2
- import { forwardRef as x, useContext as $ } from "react";
3
- import { a as u } from "../chunk/CQvM33Vg.js";
2
+ import { forwardRef as $, useContext as u } from "react";
3
+ import { a as x } from "../chunk/Cplu5dtQ.js";
4
4
  import { u as N } from "../chunk/BFTV6myl.js";
5
5
  import h from "@unicom-cloud/utils/class-name";
6
6
  const v = {
7
7
  type: "horizontal",
8
8
  orientation: "center"
9
9
  };
10
- function C(a, n) {
11
- const { getPrefixCls: l, componentConfig: r } = $(u), m = N(
12
- a,
10
+ function y(n, l) {
11
+ const { getPrefixCls: o, componentConfig: r } = u(x), m = N(
12
+ n,
13
13
  v,
14
14
  r == null ? void 0 : r.Divider
15
- ), { children: e, style: c, className: p, type: o, orientation: s, ...d } = m, t = l("divider"), f = h(
15
+ ), { children: e, style: c, className: p, type: a, orientation: s, ...d } = m, t = o == null ? void 0 : o("divider"), f = h(
16
16
  t,
17
- `${t}-${o}`,
17
+ `${t}-${a}`,
18
18
  {
19
19
  [`${t}-with-text`]: e,
20
20
  [`${t}-with-text-${s}`]: e && s
@@ -25,16 +25,16 @@ function C(a, n) {
25
25
  "div",
26
26
  {
27
27
  role: "separator",
28
- ref: n,
28
+ ref: l,
29
29
  className: f,
30
30
  style: c,
31
31
  ...d,
32
- children: e && o === "horizontal" ? /* @__PURE__ */ i("span", { className: `${t}-text ${t}-text-${s}`, children: e }) : null
32
+ children: e && a === "horizontal" ? /* @__PURE__ */ i("span", { className: `${t}-text ${t}-text-${s}`, children: e }) : null
33
33
  }
34
34
  );
35
35
  }
36
- const y = x(C);
37
- y.displayName = "Divider";
36
+ const D = $(y);
37
+ D.displayName = "Divider";
38
38
  export {
39
- y as default
39
+ D as default
40
40
  };
@@ -1,29 +1,29 @@
1
- import { jsx as l } from "react/jsx-runtime";
2
- import x, { useContext as I, useState as C } from "react";
3
- import { a as D } from "../chunk/CQvM33Vg.js";
4
- import N from "@unicom-cloud/utils/class-name";
5
- import h from "./Item.js";
6
- function R(m) {
7
- const { getPrefixCls: c } = I(D), r = c("draggable"), {
1
+ import { jsx as m } from "react/jsx-runtime";
2
+ import x, { useContext as I, useState as D } from "react";
3
+ import { a as N } from "../chunk/Cplu5dtQ.js";
4
+ import h from "@unicom-cloud/utils/class-name";
5
+ import v from "./Item.js";
6
+ function R(c) {
7
+ const { getPrefixCls: t } = I(N), a = t == null ? void 0 : t("draggable"), {
8
8
  className: i,
9
- children: f,
10
- direction: p = "vertical",
11
- onIndexChange: t,
12
- itemWrapperStyle: d
13
- } = m, [g, a] = C(null);
14
- return /* @__PURE__ */ l("div", { className: N(r, i), children: x.Children.map(f, (u, e) => /* @__PURE__ */ l(
15
- h,
9
+ children: p,
10
+ direction: d = "vertical",
11
+ onIndexChange: e,
12
+ itemWrapperStyle: f
13
+ } = c, [u, n] = D(null);
14
+ return /* @__PURE__ */ m("div", { className: h(a, i), children: x.Children.map(p, (g, r) => /* @__PURE__ */ m(
15
+ v,
16
16
  {
17
- style: d,
18
- prefixCls: r,
19
- direction: p,
20
- onDragStart: () => a(e),
21
- onDragEnd: () => a(null),
22
- onDrop: (v, n) => {
23
- const o = g, s = n === "left" || n === "top" ? e : e + 1;
24
- o !== s && (t == null || t(s, o));
17
+ style: f,
18
+ prefixCls: a,
19
+ direction: d,
20
+ onDragStart: () => n(r),
21
+ onDragEnd: () => n(null),
22
+ onDrop: (C, o) => {
23
+ const s = u, l = o === "left" || o === "top" ? r : r + 1;
24
+ s !== l && (e == null || e(l, s));
25
25
  },
26
- children: u
26
+ children: g
27
27
  }
28
28
  )) });
29
29
  }
package/drawer/Drawer.js CHANGED
@@ -1,13 +1,13 @@
1
- import { jsxs as b, Fragment as ve, jsx as n } from "react/jsx-runtime";
1
+ import { jsxs as v, Fragment as ge, jsx as n } from "react/jsx-runtime";
2
2
  import Ie from "@unicom-cloud/icons/IconUiClose";
3
- import Pe from "lodash/isFunction";
4
- import $e, { useContext as Be, useRef as K, useState as d, useCallback as Ee, useMemo as De, useImperativeHandle as Re, useEffect as U } from "react";
5
- import _ from "../button/index.js";
6
- import { a as Se, I as Oe, b as A } from "../chunk/CQvM33Vg.js";
3
+ import $e from "lodash/isFunction";
4
+ import Be, { useContext as Pe, useRef as U, useState as u, useCallback as Ee, useMemo as De, useImperativeHandle as Re, useEffect as _ } from "react";
5
+ import A from "../button/index.js";
6
+ import { a as Se, I as Oe, b as J } from "../chunk/Cplu5dtQ.js";
7
7
  import { u as Te } from "../chunk/BFTV6myl.js";
8
8
  import { u as ze } from "../chunk/DU1RCDfh.js";
9
9
  import Fe from "../portal/index.js";
10
- import { P as J } from "../chunk/NPajzdOv.js";
10
+ import { P as Q } from "../chunk/NPajzdOv.js";
11
11
  import g from "@unicom-cloud/utils/class-name";
12
12
  import { isServerRendering as je, contains as He } from "../utils/dom.js";
13
13
  import { Esc as Me } from "@unicom-cloud/utils/constant/keyboardCode";
@@ -24,12 +24,12 @@ const We = {
24
24
  mountOnEnter: !0,
25
25
  getPopupContainer: () => document.body
26
26
  };
27
- function qe(Q, V) {
28
- var S, O, T, z, F, j, H, M, Z, L, W, q;
29
- const u = Be(Se), { locale: w, getPrefixCls: X, componentConfig: m, rtl: Y } = u, t = Te(
30
- Q,
27
+ function qe(V, X) {
28
+ var O, T, z, F, j, H, M, Z, L, W, q, G;
29
+ const m = Pe(Se), { locale: i, getPrefixCls: p, componentConfig: f, rtl: Y } = m, t = Te(
30
+ V,
31
31
  We,
32
- m == null ? void 0 : m.Drawer
32
+ f == null ? void 0 : f.Drawer
33
33
  ), {
34
34
  style: ee,
35
35
  className: te,
@@ -38,74 +38,74 @@ function qe(Q, V) {
38
38
  maskStyle: re,
39
39
  headerStyle: se,
40
40
  bodyStyle: ie,
41
- title: p,
42
- footer: l,
41
+ title: h,
42
+ footer: a,
43
43
  okText: le,
44
44
  cancelText: ae,
45
45
  width: ce,
46
46
  height: de,
47
- placement: c,
48
- mask: f,
47
+ placement: d,
48
+ mask: x,
49
49
  visible: r,
50
50
  closable: ue,
51
51
  maskClosable: me,
52
52
  confirmLoading: pe,
53
- mountOnEnter: h,
54
- unmountOnExit: v,
55
- afterOpen: x,
56
- afterClose: C,
57
- getPopupContainer: a,
53
+ mountOnEnter: C,
54
+ unmountOnExit: I,
55
+ afterOpen: k,
56
+ afterClose: y,
57
+ getPopupContainer: c,
58
58
  escToExit: fe,
59
- getChildrenPopupContainer: I,
59
+ getChildrenPopupContainer: $,
60
60
  okButtonProps: he,
61
61
  cancelButtonProps: xe,
62
- zIndex: P,
63
- closeIcon: $,
62
+ zIndex: B,
63
+ closeIcon: P,
64
64
  ...Ce
65
- } = t, i = K(null), B = K(null), [ke, ye] = d(!1), [k, Ne] = d(), o = X("drawer"), [E, y] = d(!1), [Ke, D] = d(!1), R = /* @__PURE__ */ b(ve, { children: [
66
- ((S = t.cancelButton) == null ? void 0 : S.visible) !== !1 && /* @__PURE__ */ n(
67
- _,
65
+ } = t, l = U(null), E = U(null), [ke, ye] = u(!1), [N, Ne] = u(), o = p == null ? void 0 : p("drawer"), [D, b] = u(!1), [Ke, R] = u(!1), S = /* @__PURE__ */ v(ge, { children: [
66
+ ((O = t.cancelButton) == null ? void 0 : O.visible) !== !1 && /* @__PURE__ */ n(
67
+ A,
68
68
  {
69
69
  onClick: t.onCancel,
70
70
  ...xe,
71
- ...(O = t.cancelButton) == null ? void 0 : O.props,
72
- children: ((z = (T = t.cancelButton) == null ? void 0 : T.props) == null ? void 0 : z.children) || ((F = t.cancelButton) == null ? void 0 : F.label) || ((j = t.cancelButton) == null ? void 0 : j.text) || ae || w.Drawer.cancelText
71
+ ...(T = t.cancelButton) == null ? void 0 : T.props,
72
+ children: ((F = (z = t.cancelButton) == null ? void 0 : z.props) == null ? void 0 : F.children) || ((j = t.cancelButton) == null ? void 0 : j.label) || ((H = t.cancelButton) == null ? void 0 : H.text) || ae || (i == null ? void 0 : i.Drawer.cancelText)
73
73
  }
74
74
  ),
75
- ((H = t.okButton) == null ? void 0 : H.visible) !== !1 && /* @__PURE__ */ n(
76
- _,
75
+ ((M = t.okButton) == null ? void 0 : M.visible) !== !1 && /* @__PURE__ */ n(
76
+ A,
77
77
  {
78
78
  type: "primary",
79
79
  loading: pe,
80
80
  onClick: t.onOk,
81
81
  ...he,
82
- ...(M = t.okButton) == null ? void 0 : M.props,
83
- children: ((L = (Z = t.okButton) == null ? void 0 : Z.props) == null ? void 0 : L.children) || ((W = t.okButton) == null ? void 0 : W.label) || ((q = t.okButton) == null ? void 0 : q.text) || le || w.Drawer.okText
82
+ ...(Z = t.okButton) == null ? void 0 : Z.props,
83
+ children: ((W = (L = t.okButton) == null ? void 0 : L.props) == null ? void 0 : W.children) || ((q = t.okButton) == null ? void 0 : q.label) || ((G = t.okButton) == null ? void 0 : G.text) || le || (i == null ? void 0 : i.Drawer.okText)
84
84
  }
85
85
  )
86
- ] }), N = Ee(() => {
87
- const e = a == null ? void 0 : a();
86
+ ] }), w = Ee(() => {
87
+ const e = c == null ? void 0 : c();
88
88
  return Le(e) || document.body;
89
- }, [a]), be = De(() => !je && N() === document.body, [
89
+ }, [c]), be = De(() => !je && w() === document.body, [
90
90
  ke,
91
- N()
91
+ w()
92
92
  // 潘启宝修改于2024年11月 4日 星期一 21时22分11秒 CST
93
93
  ]);
94
- ze(N, { hidden: (r || E) && f }), Re(V, () => i.current), U(() => {
94
+ ze(w, { hidden: (r || D) && x }), Re(X, () => l.current), _(() => {
95
95
  r && t.getPopupContainer && ye(!0);
96
- }, []), U(() => {
96
+ }, []), _(() => {
97
97
  var e, s;
98
- r && He(document.body, i.current) && ((s = (e = i.current) == null ? void 0 : e.focus) == null || s.call(e));
98
+ r && He(document.body, l.current) && ((s = (e = l.current) == null ? void 0 : e.focus) == null || s.call(e));
99
99
  }, [r]);
100
- const ge = () => {
100
+ const we = () => {
101
101
  var e;
102
- if (r && k === void 0 && i.current) {
103
- const s = +((e = window.getComputedStyle(i.current, null)) == null ? void 0 : e.zIndex);
102
+ if (r && N === void 0 && l.current) {
103
+ const s = +((e = window.getComputedStyle(l.current, null)) == null ? void 0 : e.zIndex);
104
104
  isNaN(s) || Ne(s + 1);
105
105
  }
106
- }, we = /* @__PURE__ */ b("div", { className: `${o}-scroll`, tabIndex: -1, children: [
107
- p !== null && /* @__PURE__ */ n("div", { className: `${o}-header`, style: se, children: /* @__PURE__ */ n("div", { className: `${o}-header-title`, children: p }) }),
108
- ue && ($ !== void 0 ? /* @__PURE__ */ n("span", { onClick: t.onCancel, className: `${o}-close-icon`, children: $ }) : /* @__PURE__ */ n(
106
+ }, ve = /* @__PURE__ */ v("div", { className: `${o}-scroll`, tabIndex: -1, children: [
107
+ h !== null && /* @__PURE__ */ n("div", { className: `${o}-header`, style: se, children: /* @__PURE__ */ n("div", { className: `${o}-header-title`, children: h }) }),
108
+ ue && (P !== void 0 ? /* @__PURE__ */ n("span", { onClick: t.onCancel, className: `${o}-close-icon`, children: P }) : /* @__PURE__ */ n(
109
109
  Oe,
110
110
  {
111
111
  onClick: t.onCancel,
@@ -117,61 +117,61 @@ function qe(Q, V) {
117
117
  "div",
118
118
  {
119
119
  ref: (e) => {
120
- B.current = e, ge();
120
+ E.current = e, we();
121
121
  },
122
122
  style: ie,
123
123
  className: g(`${o}-content`, {
124
- [`${o}-content-nofooter`]: l === null,
125
- [`${o}-content-noheader`]: p === null
124
+ [`${o}-content-nofooter`]: a === null,
125
+ [`${o}-content-noheader`]: h === null
126
126
  }),
127
127
  children: /* @__PURE__ */ n(
128
- A,
128
+ J,
129
129
  {
130
- ...u,
130
+ ...m,
131
131
  childrenName: "Drawer",
132
- zIndex: k || 1050,
133
- getPopupContainer: (e) => typeof I == "function" ? I(e) : B.current,
132
+ zIndex: N || 1050,
133
+ getPopupContainer: (e) => typeof $ == "function" ? $(e) : E.current,
134
134
  children: ne
135
135
  }
136
136
  )
137
137
  }
138
138
  ),
139
- l !== null && /* @__PURE__ */ n("div", { className: `${o}-footer`, children: Pe(l) ? l(R) : l || R })
139
+ a !== null && /* @__PURE__ */ n("div", { className: `${o}-footer`, children: $e(a) ? a(S) : a || S })
140
140
  ] });
141
141
  return /* @__PURE__ */ n(
142
142
  Fe,
143
143
  {
144
- forceRender: !h,
144
+ forceRender: !C,
145
145
  visible: r,
146
- getContainer: a,
147
- children: /* @__PURE__ */ b(
146
+ getContainer: c,
147
+ children: /* @__PURE__ */ v(
148
148
  "div",
149
149
  {
150
150
  ...Ze(Ce, ["onCancel", "onOk"]),
151
- ref: i,
151
+ ref: l,
152
152
  onKeyDown: (e) => {
153
- var G;
154
- e.key === Me.key && fe && r && ((G = t.onCancel) == null || G.call(t, e));
153
+ var K;
154
+ e.key === Me.key && fe && r && ((K = t.onCancel) == null || K.call(t, e));
155
155
  },
156
156
  className: g(
157
157
  `${o}-wrapper`,
158
158
  {
159
- [`${o}-no-mask`]: !f,
159
+ [`${o}-no-mask`]: !x,
160
160
  [`${o}-wrapper-hide`]: !r
161
161
  },
162
162
  oe
163
163
  ),
164
- style: be ? { position: "fixed", zIndex: P } : { zIndex: P || "inherit", position: "absolute" },
164
+ style: be ? { position: "fixed", zIndex: B } : { zIndex: B || "inherit", position: "absolute" },
165
165
  children: [
166
- f ? /* @__PURE__ */ n(
167
- J,
166
+ x ? /* @__PURE__ */ n(
167
+ Q,
168
168
  {
169
169
  in: r,
170
170
  appear: !0,
171
171
  timeout: 300,
172
172
  classNames: "fadeInStandard",
173
- mountOnEnter: h,
174
- unmountOnExit: v,
173
+ mountOnEnter: C,
174
+ unmountOnExit: I,
175
175
  children: /* @__PURE__ */ n(
176
176
  "div",
177
177
  {
@@ -179,14 +179,14 @@ function qe(Q, V) {
179
179
  style: re,
180
180
  onClick: (e) => {
181
181
  var s;
182
- !E && me && ((s = t.onCancel) == null || s.call(t, e));
182
+ !D && me && ((s = t.onCancel) == null || s.call(t, e));
183
183
  }
184
184
  }
185
185
  )
186
186
  }
187
187
  ) : null,
188
188
  /* @__PURE__ */ n(
189
- J,
189
+ Q,
190
190
  {
191
191
  in: r,
192
192
  appear: !0,
@@ -196,37 +196,37 @@ function qe(Q, V) {
196
196
  bottom: "slideBottom",
197
197
  left: "slideLeft",
198
198
  right: "slideRight"
199
- }[c],
200
- mountOnEnter: h,
201
- unmountOnExit: v,
199
+ }[d],
200
+ mountOnEnter: C,
201
+ unmountOnExit: I,
202
202
  onEnter: (e) => {
203
- e && (e.parentNode.style.display = "block", y(!1));
203
+ e && (e.parentNode.style.display = "block", b(!1));
204
204
  },
205
205
  onEntered: () => {
206
- D(!0), x == null || x();
206
+ R(!0), k == null || k();
207
207
  },
208
208
  onExit: () => {
209
- D(!1), y(!0);
209
+ R(!1), b(!0);
210
210
  },
211
211
  onExited: (e) => {
212
- e && (y(!1), e.parentNode.style.display = "", C == null || C());
212
+ e && (b(!1), e.parentNode.style.display = "", y == null || y());
213
213
  },
214
214
  children: /* @__PURE__ */ n(
215
215
  "div",
216
216
  {
217
217
  className: g(o, te, { [`${o}-rtl`]: Y }),
218
218
  style: Object.assign(
219
- c === "left" || c === "right" ? { width: ce } : { height: de },
220
- { [c]: 0 },
219
+ d === "left" || d === "right" ? { width: ce } : { height: de },
220
+ { [d]: 0 },
221
221
  ee
222
222
  ),
223
223
  children: /* @__PURE__ */ n("div", { className: `${o}-inner`, children: /* @__PURE__ */ n(
224
- A,
224
+ J,
225
225
  {
226
- ...u,
226
+ ...m,
227
227
  childrenName: "Drawer",
228
- zIndex: k || 1050,
229
- children: we
228
+ zIndex: N || 1050,
229
+ children: ve
230
230
  }
231
231
  ) })
232
232
  }
@@ -239,7 +239,7 @@ function qe(Q, V) {
239
239
  }
240
240
  );
241
241
  }
242
- const Ge = $e.forwardRef(qe);
242
+ const Ge = Be.forwardRef(qe);
243
243
  Ge.displayName = "Drawer";
244
244
  export {
245
245
  Ge as default
@@ -3,7 +3,7 @@ import "@unicom-cloud/icons/IconUiMore";
3
3
  import "react";
4
4
  import { DropdownButton as f } from "./index.js";
5
5
  import "../button/index.js";
6
- import "../chunk/CQvM33Vg.js";
6
+ import "../chunk/Cplu5dtQ.js";
7
7
  import "../chunk/BFTV6myl.js";
8
8
  import "../chunk/ClqoGc3r.js";
9
9
  export {