@unicom-cloud/ui 0.8.81 → 0.8.83

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 (280) 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/Input.js +11 -10
  28. package/InputNumber.js +1 -1
  29. package/Layout.js +1 -1
  30. package/Link.js +1 -1
  31. package/List.js +2 -2
  32. package/Mentions.js +2 -2
  33. package/Menu.js +1 -1
  34. package/Message.js +1 -1
  35. package/Modal.js +1 -1
  36. package/Notice.js +1 -1
  37. package/Notification.js +5 -5
  38. package/OverflowEllipsis.js +1 -1
  39. package/PageHeader.js +1 -1
  40. package/Pagination.js +1 -1
  41. package/Popconfirm.js +1 -1
  42. package/Popover.js +1 -1
  43. package/Progress.js +1 -1
  44. package/Radio.js +1 -1
  45. package/Rate.js +1 -1
  46. package/ResizeBox.js +1 -1
  47. package/Result.js +1 -1
  48. package/Select.js +1 -1
  49. package/Skeleton.js +1 -1
  50. package/Slider.js +1 -1
  51. package/Space.js +1 -1
  52. package/SpeechSynthesis.js +1 -1
  53. package/Spin.js +1 -1
  54. package/Statistic.js +2 -2
  55. package/Steps.js +1 -1
  56. package/Switch.js +1 -1
  57. package/Table.js +1 -1
  58. package/Tabs.js +1 -1
  59. package/Tag.js +1 -1
  60. package/Tooltip.js +1 -1
  61. package/Transfer.js +2 -2
  62. package/Tree.js +1 -1
  63. package/TreeSelect.js +1 -1
  64. package/Trigger.js +1 -1
  65. package/Typography.js +1 -1
  66. package/affix/index.js +60 -57
  67. package/alert/index.js +53 -53
  68. package/anchor/Anchor.js +72 -72
  69. package/anchor/Link.js +27 -27
  70. package/anchor/util.js +1 -1
  71. package/auto-complete/index.js +2 -2
  72. package/avatar/Avatar.js +31 -31
  73. package/avatar/Group.js +25 -25
  74. package/back-top/index.js +30 -30
  75. package/badge/index.js +37 -37
  76. package/breadcrumb/index.js +26 -26
  77. package/button/Group.js +7 -7
  78. package/button/index.js +29 -29
  79. package/calendar/index.js +2 -2
  80. package/card/Grid.js +12 -12
  81. package/card/Meta.js +17 -17
  82. package/card/index.js +44 -44
  83. package/carousel/Arrow.js +19 -19
  84. package/carousel/Indicator.js +25 -25
  85. package/carousel/index.js +77 -77
  86. package/cascader/Cascader.js +2 -2
  87. package/cascader/index.js +1 -1
  88. package/cascader/util.js +1 -1
  89. package/checkbox/Checkbox.js +2 -2
  90. package/checkbox/Group.js +2 -2
  91. package/checkbox/GroupBlock.js +2 -2
  92. package/checkbox/index.js +2 -2
  93. package/chunk/B6r8jPCd.js +6 -0
  94. package/chunk/{DLBfXSnU.js → BmulTYLW.js} +2880 -2878
  95. package/chunk/C9oo3EJI.js +692 -0
  96. package/chunk/{C5X4hOkx.js → CVSWh4ZZ.js} +80 -80
  97. package/chunk/DILUZgXW.js +1464 -0
  98. package/chunk/DSRHFFrc.js +53 -0
  99. package/chunk/{yLRv5RIK.js → DdJVL_4g.js} +181 -181
  100. package/chunk/{DYspELhF.js → DlHiTTJO.js} +223 -223
  101. package/chunk/{BG7YGUsx.js → R-uQJib2.js} +119 -119
  102. package/chunk/{DEiyXzBZ.js → ev6oHWqY.js} +63 -63
  103. package/chunk/{BNevupAU.js → uKZyjtff.js} +5 -4
  104. package/collapse/Collapse.js +2 -2
  105. package/collapse/Item.js +2 -2
  106. package/collapse/index.js +1 -1
  107. package/color-picker/ControlBar.js +36 -36
  108. package/color-picker/InputAlpha.js +11 -11
  109. package/color-picker/InputHex.js +24 -24
  110. package/color-picker/InputRgb.js +23 -23
  111. package/color-picker/Palette.js +18 -18
  112. package/color-picker/Panel.js +2 -2
  113. package/color-picker/index.js +2 -2
  114. package/comment/index.js +31 -31
  115. package/config-provider/ConfigProvider.js +5 -3
  116. package/config-provider/context.js +2 -2
  117. package/config-provider/index.js +4 -3
  118. package/copy/index.js +28 -28
  119. package/date-picker/Picker.js +276 -276
  120. package/date-picker/{PickerRange.js → RangePicker.js} +2 -2
  121. package/date-picker/index.js +26 -27
  122. package/descriptions/index.js +33 -33
  123. package/divider/index.js +12 -12
  124. package/draggable/index.js +23 -23
  125. package/drawer/Drawer.js +81 -81
  126. package/dropdown/Button.js +1 -1
  127. package/dropdown/index.js +56 -56
  128. package/empty/index.js +1 -1
  129. package/form/Form.js +76 -76
  130. package/form/FormItem.js +64 -64
  131. package/form/context.js +1 -1
  132. package/grid/Col.js +53 -53
  133. package/grid/Row.js +34 -34
  134. package/grid/grid-item.js +29 -29
  135. package/grid/grid.js +50 -50
  136. package/icon/index.js +20 -19
  137. package/icon-hover/index.js +1 -1
  138. package/image/Image.js +86 -86
  139. package/image/ImagePreview.js +2 -2
  140. package/image/ImagePreviewArrow.js +22 -22
  141. package/image/ImagePreviewGroup.js +1 -1
  142. package/image/index.js +1 -1
  143. package/index.js +498 -493
  144. package/input/Button.js +11 -0
  145. package/input/Group.js +8 -8
  146. package/input/Input.js +488 -434
  147. package/input/InputElement.js +1 -1
  148. package/input/Password.js +1 -1
  149. package/input/Search.js +1 -1
  150. package/input/Textarea.js +1 -1
  151. package/input/index.js +9 -8
  152. package/input-number/index.js +1 -1
  153. package/input-tag/InputTag.js +40 -40
  154. package/layout/Content.js +7 -7
  155. package/layout/Footer.js +9 -9
  156. package/layout/Header.js +7 -7
  157. package/layout/Sider.js +55 -55
  158. package/layout/index.js +32 -32
  159. package/link/index.js +35 -35
  160. package/list/Item.js +29 -29
  161. package/list/Meta.js +12 -12
  162. package/list/index.js +2 -2
  163. package/mentions/index.js +2 -2
  164. package/menu/Menu.js +2 -2
  165. package/menu/OverflowWrap.js +1 -1
  166. package/menu/index.js +2 -2
  167. package/message/index.js +1 -1
  168. package/message/useMessage.js +1 -1
  169. package/modal/Confirm.js +2 -2
  170. package/modal/Modal.js +2 -2
  171. package/modal/index.js +1 -1
  172. package/notice/index.js +1 -1
  173. package/notification/index.js +5 -5
  174. package/notification/useNotification.js +1 -1
  175. package/overflow-ellipsis/OverflowItem.js +12 -12
  176. package/overflow-ellipsis/index.js +24 -24
  177. package/package.json +1 -1
  178. package/page-header/index.js +38 -38
  179. package/pagination/PageItem.js +16 -16
  180. package/pagination/PageJumper.js +1 -1
  181. package/pagination/PageOption.js +2 -2
  182. package/pagination/Pagination.js +2 -2
  183. package/pagination/index.js +1 -1
  184. package/picker/Input.js +69 -69
  185. package/picker/InputRange.js +111 -111
  186. package/popconfirm/index.js +61 -61
  187. package/popover/index.js +35 -35
  188. package/progress/index.js +22 -22
  189. package/radio/Group.js +2 -2
  190. package/radio/GroupBlock.js +2 -2
  191. package/radio/Radio.js +2 -2
  192. package/radio/index.js +2 -2
  193. package/rate/index.js +49 -49
  194. package/resize-box/ResizeTrigger.js +34 -34
  195. package/resize-box/Split.js +56 -56
  196. package/resize-box/SplitGroup.js +55 -55
  197. package/resize-box/index.js +51 -51
  198. package/result/index.js +41 -41
  199. package/select/Option.js +1 -1
  200. package/select/Select.js +2 -2
  201. package/select/index.js +2 -2
  202. package/select/util.js +1 -1
  203. package/select-view/Core.js +125 -125
  204. package/skeleton/index.js +20 -20
  205. package/slider/Button.js +57 -57
  206. package/slider/index.js +116 -116
  207. package/space/index.js +46 -44
  208. package/speech-synthesis/index.js +1 -1
  209. package/spin/DotLoading.js +10 -10
  210. package/spin/index.js +44 -44
  211. package/statistic/Countdown.js +34 -34
  212. package/statistic/index.js +67 -67
  213. package/steps/index.js +55 -55
  214. package/style.css +1 -1
  215. package/switch/index.js +54 -54
  216. package/table/Table.js +3 -3
  217. package/table/index.js +1 -1
  218. package/tabs/Tab.js +2 -2
  219. package/tabs/TabContent.js +2 -2
  220. package/tabs/TabPane.js +12 -12
  221. package/tabs/index.js +2 -2
  222. package/tag/index.js +45 -45
  223. package/time-picker/Picker.js +76 -76
  224. package/time-picker/TimePicker.js +136 -136
  225. package/time-picker/index.js +8 -8
  226. package/time-picker/util.js +5 -5
  227. package/timeline/Item.js +47 -47
  228. package/timeline/Timeline.js +41 -41
  229. package/tooltip/index.js +29 -29
  230. package/transfer/Item.js +2 -2
  231. package/transfer/List.js +2 -2
  232. package/transfer/index.js +2 -2
  233. package/tree/Animation.js +2 -2
  234. package/tree/Node.js +2 -2
  235. package/tree/NodeList.js +1 -1
  236. package/tree/Tree.js +2 -2
  237. package/tree/index.js +1 -1
  238. package/tree-select/List.js +1 -1
  239. package/tree-select/Select.js +2 -2
  240. package/tree-select/index.js +2 -2
  241. package/trigger/index.js +60 -60
  242. package/types/config-provider/ConfigProvider.d.ts +2 -2
  243. package/types/config-provider/context.d.ts +1 -1
  244. package/types/date-picker/index.d.ts +8 -9
  245. package/types/date-picker/interface.d.ts +9 -9
  246. package/types/index.d.ts +2 -2
  247. package/types/input/Button.d.ts +5 -0
  248. package/types/input/Input.d.ts +4 -1
  249. package/types/input/interface.d.ts +7 -0
  250. package/types/picker/Input.d.ts +2 -2
  251. package/types/space/index.d.ts +2 -1
  252. package/types/utils/index.d.ts +1 -0
  253. package/types/utils/names.d.ts +1 -1
  254. package/types/utils/setTheme.d.ts +2 -0
  255. package/typography/Base.js +53 -53
  256. package/typography/Ellipsis.js +10 -8
  257. package/typography/Operations.js +28 -28
  258. package/typography/Paragraph.js +8 -8
  259. package/typography/Typography.js +7 -7
  260. package/typography/index.js +1 -1
  261. package/upload/TriggerNode.js +47 -47
  262. package/upload/Upload.js +184 -184
  263. package/upload/request.js +1 -1
  264. package/upload/request_.js +1 -1
  265. package/utils/constant.js +1 -1
  266. package/utils/contextHolder.js +3 -3
  267. package/utils/dom.js +1 -1
  268. package/utils/index.js +116 -114
  269. package/utils/names.js +1 -1
  270. package/utils/setDarkTheme.js +23 -22
  271. package/utils/setPrimaryColor.js +22 -16
  272. package/utils/setTheme.js +9 -0
  273. package/utils/tween.js +1 -1
  274. package/verification-code/VerificationCode.js +49 -49
  275. package/version/index.js +1 -1
  276. package/watermark/Watermark.js +24 -24
  277. package/chunk/CQvM33Vg.js +0 -724
  278. package/chunk/D0ZWT7db.js +0 -5
  279. package/chunk/yhU2zeeu.js +0 -1461
  280. /package/types/date-picker/{PickerRange.d.ts → RangePicker.d.ts} +0 -0
package/form/FormItem.js CHANGED
@@ -1,36 +1,36 @@
1
1
  import { jsx as i, jsxs as q, Fragment as pe } from "react/jsx-runtime";
2
- import L, { forwardRef as ue, useContext as x, useState as W, useRef as fe, useEffect as be, useMemo as G, createElement as K, cloneElement as B } from "react";
3
- import ge from "lodash/isArray";
4
- import he from "lodash/isFunction";
5
- import y from "lodash/isPlainObject";
6
- import w from "lodash/isUndefined";
7
- import { a as Ce } from "../chunk/CQvM33Vg.js";
2
+ import L, { forwardRef as ue, useContext as N, useState as W, useRef as fe, useEffect as be, useMemo as G, createElement as K, cloneElement as B } from "react";
3
+ import he from "lodash/isArray";
4
+ import ge from "lodash/isFunction";
5
+ import v from "lodash/isPlainObject";
6
+ import F from "lodash/isUndefined";
7
+ import { a as Ce } from "../chunk/C9oo3EJI.js";
8
8
  import Y from "../grid/index.js";
9
9
  import { u as ye } from "../chunk/BFTV6myl.js";
10
10
  import { P as ve } from "../chunk/NPajzdOv.js";
11
- import v from "@unicom-cloud/utils/class-name";
11
+ import w from "@unicom-cloud/utils/class-name";
12
12
  import { o as we } from "../chunk/BKKEev13.js";
13
- import I from "./Control.js";
13
+ import S from "./Control.js";
14
14
  import Fe from "./FormLabel.js";
15
15
  import { FormItemContext as J, FormListContext as $e, FormContext as Q } from "./context.js";
16
16
  import { VALIDATE_STATUS as T } from "./interface.js";
17
- import { formatValidateMsg as xe } from "./util.js";
18
- const Ie = Y.Row, X = Y.Col, Ne = ({
19
- prefixCls: g,
20
- help: h,
17
+ import { formatValidateMsg as Ie } from "./util.js";
18
+ const Ne = Y.Row, X = Y.Col, Se = ({
19
+ prefixCls: h,
20
+ help: g,
21
21
  errors: e,
22
- warnings: N
22
+ warnings: C
23
23
  }) => {
24
- const C = e.map((p, d) => {
24
+ const y = e.map((p, d) => {
25
25
  if (p)
26
26
  return /* @__PURE__ */ i("div", { role: "alert", children: p.message }, d);
27
27
  }), c = [];
28
- N.map((p, d) => {
28
+ C.map((p, d) => {
29
29
  c.push(
30
- /* @__PURE__ */ i("div", { role: "alert", className: `${g}-message-help-warning`, children: p }, d)
30
+ /* @__PURE__ */ i("div", { role: "alert", className: `${h}-message-help-warning`, children: p }, d)
31
31
  );
32
32
  });
33
- const m = !w(h) || !!c.length, u = m || !!C.length;
33
+ const m = !F(g) || !!c.length, u = m || !!y.length;
34
34
  return u && /* @__PURE__ */ i(
35
35
  ve,
36
36
  {
@@ -42,24 +42,24 @@ const Ie = Y.Row, X = Y.Col, Ne = ({
42
42
  children: /* @__PURE__ */ i(
43
43
  "div",
44
44
  {
45
- className: v(`${g}-message`, {
46
- [`${g}-message-help`]: m
45
+ className: w(`${h}-message`, {
46
+ [`${h}-message-help`]: m
47
47
  }),
48
- children: w(h) ? /* @__PURE__ */ q(pe, { children: [
49
- C.length > 0 && C,
48
+ children: F(g) ? /* @__PURE__ */ q(pe, { children: [
49
+ y.length > 0 && y,
50
50
  c.length > 0 && c
51
- ] }) : h
51
+ ] }) : g
52
52
  }
53
53
  )
54
54
  }
55
55
  );
56
- }, Se = {
56
+ }, xe = {
57
57
  trigger: "onChange",
58
58
  triggerPropName: "value"
59
- }, Pe = (g, h) => {
59
+ }, ke = (h, g) => {
60
60
  var U, _, z;
61
- const e = ye(g, Se), { getPrefixCls: N, prefixCls: C } = x(Ce), c = x(J), m = x($e), [u, p] = W(null), [d, A] = W(null), r = x(Q), l = r.prefixCls || N("form"), D = e.layout || r.layout, Z = e.labelAlign || r.labelAlign, S = fe(!1), ee = (s, t = {}) => {
62
- if (S.current)
61
+ const e = ye(h, xe), { getPrefixCls: C, prefixCls: y } = N(Ce), c = N(J), m = N($e), [u, p] = W(null), [d, A] = W(null), r = N(Q), l = r.prefixCls || (C == null ? void 0 : C("form")), D = e.layout || r.layout, Z = e.labelAlign || r.labelAlign, x = fe(!1), ee = (s, t = {}) => {
62
+ if (x.current)
63
63
  return;
64
64
  const { errors: a, warnings: f } = t || {};
65
65
  p((b) => {
@@ -69,83 +69,83 @@ const Ie = Y.Row, X = Y.Col, Ne = ({
69
69
  const o = { ...b || {} };
70
70
  return f && f.length ? o[s] = f : delete o[s], o;
71
71
  });
72
- }, re = y(e.noStyle) && e.noStyle.showErrorTip && c.updateFormItem ? c.updateFormItem : ee;
73
- be(() => (S.current = !1, () => {
74
- S.current = !0, p(null), A(null);
72
+ }, re = v(e.noStyle) && e.noStyle.showErrorTip && c.updateFormItem ? c.updateFormItem : ee;
73
+ be(() => (x.current = !1, () => {
74
+ x.current = !0, p(null), A(null);
75
75
  }), []);
76
76
  const te = {
77
77
  ...r,
78
- validateMessages: r.validateMessages && xe(r.validateMessages, {
78
+ validateMessages: r.validateMessages && Ie(r.validateMessages, {
79
79
  label: e.label
80
80
  }),
81
81
  prefixCls: l,
82
82
  updateFormItem: re,
83
83
  disabled: "disabled" in e ? e.disabled : r.disabled
84
- }, { label: M, extra: j, className: oe, style: le, validateStatus: F, hidden: se, ...ne } = e, ie = v(`${l}-label-item`, {
84
+ }, { label: M, extra: j, className: oe, style: le, validateStatus: $, hidden: se, ...ne } = e, ie = w(`${l}-label-item`, {
85
85
  [`${l}-label-item-left`]: Z === "left"
86
- }), R = u ? Object.values(u) : [], P = d ? Object.values(d).reduce((s, t) => s.concat(t), []) : [], $ = G(() => {
87
- if (F)
88
- return F;
86
+ }), R = u ? Object.values(u) : [], k = d ? Object.values(d).reduce((s, t) => s.concat(t), []) : [], I = G(() => {
87
+ if ($)
88
+ return $;
89
89
  if (R.length)
90
90
  return T.error;
91
- if (P.length)
91
+ if (k.length)
92
92
  return T.warning;
93
- }, [u, d, F]), V = G(() => !w(e.help) || P.length > 0, [e.help, d]), ae = v(
93
+ }, [u, d, $]), V = G(() => !F(e.help) || k.length > 0, [e.help, d]), ae = w(
94
94
  `${l}-item`,
95
95
  {
96
- [`${l}-item-error`]: V || !F && $ === T.error,
97
- [`${l}-item-status-${$}`]: $,
96
+ [`${l}-item-error`]: V || !$ && I === T.error,
97
+ [`${l}-item-status-${I}`]: I,
98
98
  [`${l}-item-has-help`]: V,
99
99
  [`${l}-item-hidden`]: se,
100
- [`${l}-item-has-feedback`]: $ && e.hasFeedback
100
+ [`${l}-item-has-feedback`]: I && e.hasFeedback
101
101
  },
102
102
  `${l}-layout-${D}`,
103
103
  oe
104
104
  ), O = () => {
105
105
  var f, b;
106
106
  const { field: s, children: t } = e, a = "disabled" in e ? e.disabled : r.disabled;
107
- if (he(t)) {
107
+ if (ge(t)) {
108
108
  const { key: o, ...n } = e ?? {};
109
109
  return /* @__PURE__ */ K(
110
- I,
110
+ S,
111
111
  {
112
112
  disabled: a,
113
113
  ...n,
114
114
  key: s || o,
115
115
  _key: s || o
116
116
  },
117
- (...E) => t(
118
- ...E
117
+ (...P) => t(
118
+ ...P
119
119
  )
120
120
  );
121
121
  }
122
- if (ge(t)) {
123
- const o = L.Children.map(t, (n, E) => {
124
- const H = y(n) && n.key || E, de = y(n) && "disabled" in n.props, ce = !w(a) && !de ? { key: H, disabled: a } : { key: H };
125
- return y(n) ? B(n, ce) : n;
122
+ if (he(t)) {
123
+ const o = L.Children.map(t, (n, P) => {
124
+ const H = v(n) && n.key || P, de = v(n) && "disabled" in n.props, ce = !F(a) && !de ? { key: H, disabled: a } : { key: H };
125
+ return v(n) ? B(n, ce) : n;
126
126
  });
127
- return /* @__PURE__ */ i(I, { ...e, field: void 0, children: o });
127
+ return /* @__PURE__ */ i(S, { ...e, field: void 0, children: o });
128
128
  }
129
129
  if (L.Children.count(t) == 1) {
130
130
  if (s) {
131
131
  const o = ((f = m == null ? void 0 : m.getItemKey) == null ? void 0 : f.call(m, s)) || s;
132
- return /* @__PURE__ */ K(I, { disabled: a, ...e, key: o, _key: o }, t);
132
+ return /* @__PURE__ */ K(S, { disabled: a, ...e, key: o, _key: o }, t);
133
133
  }
134
- if (y(t)) {
134
+ if (v(t)) {
135
135
  if ((b = t.type) != null && b.isFormControl)
136
136
  return t;
137
- const n = !("disabled" in t.props) && !w(a) ? { disabled: a } : null;
138
- return /* @__PURE__ */ i(I, { ...e, field: void 0, children: n ? B(t, n) : t });
137
+ const n = !("disabled" in t.props) && !F(a) ? { disabled: a } : null;
138
+ return /* @__PURE__ */ i(S, { ...e, field: void 0, children: n ? B(t, n) : t });
139
139
  }
140
140
  }
141
141
  return t;
142
- }, me = J, k = {
142
+ }, me = J, E = {
143
143
  ...r
144
144
  };
145
- return e.noStyle || (k.wrapperCol = void 0, k.labelCol = void 0), /* @__PURE__ */ i(Q.Provider, { value: k, children: /* @__PURE__ */ i(me.Provider, { value: te, children: e.noStyle ? O() : /* @__PURE__ */ q(
146
- Ie,
145
+ return e.noStyle || (E.wrapperCol = void 0, E.labelCol = void 0), /* @__PURE__ */ i(Q.Provider, { value: E, children: /* @__PURE__ */ i(me.Provider, { value: te, children: e.noStyle ? O() : /* @__PURE__ */ q(
146
+ Ne,
147
147
  {
148
- ref: h,
148
+ ref: g,
149
149
  ...we(ne, [
150
150
  "tooltip",
151
151
  "children",
@@ -184,7 +184,7 @@ const Ie = Y.Row, X = Y.Col, Ne = ({
184
184
  X,
185
185
  {
186
186
  ...e.labelCol || r.labelCol,
187
- className: v(
187
+ className: w(
188
188
  ie,
189
189
  (U = e.labelCol) == null ? void 0 : U.className,
190
190
  (_ = r.labelCol) == null ? void 0 : _.className,
@@ -198,7 +198,7 @@ const Ie = Y.Row, X = Y.Col, Ne = ({
198
198
  tooltip: e.tooltip,
199
199
  htmlFor: e.field && ((z = r == null ? void 0 : r.getFormElementId) == null ? void 0 : z.call(r, e.field)),
200
200
  label: M,
201
- prefix: C,
201
+ prefix: y,
202
202
  requiredSymbol: "requiredSymbol" in e ? e.requiredSymbol : r.requiredSymbol,
203
203
  required: e.required,
204
204
  rules: e.rules,
@@ -210,19 +210,19 @@ const Ie = Y.Row, X = Y.Col, Ne = ({
210
210
  /* @__PURE__ */ q(
211
211
  X,
212
212
  {
213
- className: v(`${l}-item-wrapper`, {
213
+ className: w(`${l}-item-wrapper`, {
214
214
  [`${l}-item-wrapper-flex`]: !e.wrapperCol && !r.wrapperCol
215
215
  }),
216
216
  ...e.wrapperCol || r.wrapperCol,
217
217
  children: [
218
218
  O(),
219
219
  /* @__PURE__ */ i(
220
- Ne,
220
+ Se,
221
221
  {
222
222
  prefixCls: l,
223
223
  help: e.help,
224
224
  errors: R,
225
- warnings: P
225
+ warnings: k
226
226
  }
227
227
  ),
228
228
  j && /* @__PURE__ */ i("div", { className: `${l}-extra`, children: j })
@@ -232,8 +232,8 @@ const Ie = Y.Row, X = Y.Col, Ne = ({
232
232
  ]
233
233
  }
234
234
  ) }) });
235
- }, ke = ue(Pe);
236
- ke.displayName = "FormItem";
235
+ }, Ee = ue(ke);
236
+ Ee.displayName = "FormItem";
237
237
  export {
238
- ke as default
238
+ Ee as default
239
239
  };
package/form/context.js CHANGED
@@ -1,5 +1,5 @@
1
1
  import { createContext as t } from "react";
2
- import { N as e } from "../chunk/D0ZWT7db.js";
2
+ import { N as e } from "../chunk/B6r8jPCd.js";
3
3
  import "@unicom-cloud/utils/constant/ui";
4
4
  const i = t({
5
5
  layout: "horizontal",
package/grid/Col.js CHANGED
@@ -1,85 +1,85 @@
1
1
  import { jsx as F } from "react/jsx-runtime";
2
2
  import H from "lodash/isNumber";
3
3
  import T from "lodash/isPlainObject";
4
- import { forwardRef as q, useContext as S, useMemo as C } from "react";
5
- import { a as D } from "../chunk/CQvM33Vg.js";
6
- import { u as I } from "../chunk/BFTV6myl.js";
7
- import J from "@unicom-cloud/utils/class-name";
8
- import { RowContext as K } from "./context.js";
9
- const Q = {
4
+ import { forwardRef as q, useContext as w, useMemo as D } from "react";
5
+ import { a as I } from "../chunk/C9oo3EJI.js";
6
+ import { u as J } from "../chunk/BFTV6myl.js";
7
+ import K from "@unicom-cloud/utils/class-name";
8
+ import { RowContext as Q } from "./context.js";
9
+ const U = {
10
10
  span: 24
11
11
  };
12
- function v(i) {
12
+ function A(i) {
13
13
  return typeof i == "string" && /\d+[px|%|em|rem|]{1}/.test(i) ? `0 0 ${i}` : i;
14
14
  }
15
- function U(i, w) {
16
- const { getPrefixCls: A, componentConfig: f, rtl: G } = S(D), L = I(
15
+ function W(i, G) {
16
+ const { getPrefixCls: l, componentConfig: a, rtl: L } = w(I), M = J(
17
17
  i,
18
- Q,
19
- f == null ? void 0 : f["Grid.Col"]
20
- ), { gutter: p, div: $ } = S(K), {
21
- className: M,
22
- style: N,
23
- children: O,
18
+ U,
19
+ a == null ? void 0 : a["Grid.Col"]
20
+ ), { gutter: p, div: f } = w(Q), {
21
+ className: N,
22
+ style: O,
23
+ children: P,
24
24
  span: V,
25
- offset: a,
26
- order: u,
27
- pull: c,
28
- push: m,
29
- xs: x,
25
+ offset: u,
26
+ order: c,
27
+ pull: m,
28
+ push: x,
29
+ xs: y,
30
30
  sm: g,
31
- md: y,
32
- lg: h,
33
- xl: P,
34
- xxl: b,
35
- xxxl: j,
36
- flex: e,
31
+ md: h,
32
+ lg: b,
33
+ xl: j,
34
+ xxl: R,
35
+ xxxl: S,
36
+ flex: d,
37
37
  ...k
38
- } = L;
38
+ } = M;
39
39
  function z(r, o) {
40
- const R = { xs: x, sm: g, md: y, lg: h, xl: P, xxl: b, xxxl: j };
41
- return Object.keys(R).forEach((n) => {
42
- const t = R[n];
40
+ const v = { xs: y, sm: g, md: h, lg: b, xl: j, xxl: R, xxxl: S };
41
+ return Object.keys(v).forEach((n) => {
42
+ const t = v[n];
43
43
  H(t) ? t >= 0 && (o[`${r}-${n}-${t}`] = !0) : T(t) && (o[`${r}-${n}-${t.span}`] = t.span, o[`${r}-${n}-offset-${t.offset}`] = t.offset, o[`${r}-${n}-order-${t.order}`] = t.order, o[`${r}-${n}-pull-${t.pull}`] = t.pull, o[`${r}-${n}-push-${t.push}`] = t.push);
44
44
  }), o;
45
45
  }
46
- const s = A("col");
47
- let d = {
48
- [`${s}`]: !$,
49
- [`${s}-order-${u}`]: u,
50
- [`${s}-${V}`]: !$ && !x && !g && !y && !h && !P && !b && !j,
51
- [`${s}-offset-${a}`]: a,
52
- [`${s}-pull-${c}`]: c,
53
- [`${s}-push-${m}`]: m,
54
- [`${s}-rtl`]: G
46
+ const s = l == null ? void 0 : l("col");
47
+ let e = {
48
+ [`${s}`]: !f,
49
+ [`${s}-order-${c}`]: c,
50
+ [`${s}-${V}`]: !f && !y && !g && !h && !b && !j && !R && !S,
51
+ [`${s}-offset-${u}`]: u,
52
+ [`${s}-pull-${m}`]: m,
53
+ [`${s}-push-${x}`]: x,
54
+ [`${s}-rtl`]: L
55
55
  };
56
- d = z(s, d);
57
- const B = J(e ? s : d, M), l = {};
58
- if (Array.isArray(p) && !$) {
56
+ e = z(s, e);
57
+ const B = K(d ? s : e, N), $ = {};
58
+ if (Array.isArray(p) && !f) {
59
59
  const r = p[0] && p[0] / 2 || 0, o = p[1] && p[1] / 2 || 0;
60
- r && (l.paddingLeft = r, l.paddingRight = r), o && (l.paddingTop = o, l.paddingBottom = o);
60
+ r && ($.paddingLeft = r, $.paddingRight = r), o && ($.paddingTop = o, $.paddingBottom = o);
61
61
  }
62
- const E = C(
63
- () => v(e) ? { flex: v(e) } : {},
64
- [e]
62
+ const E = D(
63
+ () => A(d) ? { flex: A(d) } : {},
64
+ [d]
65
65
  );
66
66
  return /* @__PURE__ */ F(
67
67
  "div",
68
68
  {
69
- ref: w,
69
+ ref: G,
70
70
  ...k,
71
71
  style: {
72
- ...N,
73
- ...l,
72
+ ...O,
73
+ ...$,
74
74
  ...E
75
75
  },
76
76
  className: B,
77
- children: O
77
+ children: P
78
78
  }
79
79
  );
80
80
  }
81
- const W = q(U);
82
- W.displayName = "Col";
81
+ const X = q(W);
82
+ X.displayName = "Col";
83
83
  export {
84
- W as default
84
+ X as default
85
85
  };
package/grid/Row.js CHANGED
@@ -1,22 +1,22 @@
1
- import { jsx as g } from "react/jsx-runtime";
2
- import { forwardRef as S, useContext as z, useState as G, useRef as H, useEffect as V } from "react";
3
- import { a as B } from "../chunk/CQvM33Vg.js";
1
+ import { jsx as d } from "react/jsx-runtime";
2
+ import { forwardRef as z, useContext as G, useState as H, useRef as P, useEffect as V } from "react";
3
+ import { a as B } from "../chunk/C9oo3EJI.js";
4
4
  import { u as E } from "../chunk/BFTV6myl.js";
5
5
  import L from "@unicom-cloud/utils/class-name";
6
6
  import { o as M } from "../chunk/BKKEev13.js";
7
- import { responsiveObserve as x, responsiveArray as d } from "../utils/responsiveObserve.js";
7
+ import { responsiveObserve as x, responsiveArray as b } from "../utils/responsiveObserve.js";
8
8
  import { RowContext as O } from "./context.js";
9
9
  const T = {
10
10
  gutter: 0,
11
11
  align: "start",
12
12
  justify: "start"
13
13
  };
14
- function q(b, A) {
15
- const { getPrefixCls: j, componentConfig: i, rtl: v } = z(B), R = E(
16
- b,
14
+ function q(A, j) {
15
+ const { getPrefixCls: i, componentConfig: a, rtl: v } = G(B), R = E(
16
+ A,
17
17
  T,
18
- i == null ? void 0 : i["Grid.Row"]
19
- ), { className: w, style: $, children: C, div: a, align: u, justify: m, gutter: r, ...N } = R, [h, P] = G({
18
+ a == null ? void 0 : a["Grid.Row"]
19
+ ), { className: w, style: $, children: N, div: n, align: l, justify: p, gutter: r, ...h } = R, [C, k] = H({
20
20
  xs: !0,
21
21
  sm: !0,
22
22
  md: !0,
@@ -24,19 +24,19 @@ function q(b, A) {
24
24
  xl: !0,
25
25
  xxl: !0,
26
26
  xxxl: !0
27
- }), p = H();
28
- V(() => (p.current = x.subscribe((t) => {
29
- (!Array.isArray(r) && typeof r == "object" || Array.isArray(r) && (typeof r[0] == "object" || typeof r[1] == "object")) && P(t);
27
+ }), y = P();
28
+ V(() => (y.current = x.subscribe((t) => {
29
+ (!Array.isArray(r) && typeof r == "object" || Array.isArray(r) && (typeof r[0] == "object" || typeof r[1] == "object")) && k(t);
30
30
  }), () => {
31
- x.unsubscribe(p.current);
31
+ x.unsubscribe(y.current);
32
32
  }), []);
33
- function y(t) {
33
+ function g(t) {
34
34
  let e = 0;
35
35
  if (typeof t == "object")
36
- for (let f = 0; f < d.length; f++) {
37
- const l = d[f];
38
- if (h[l] && t[l] !== void 0) {
39
- e = t[l];
36
+ for (let m = 0; m < b.length; m++) {
37
+ const f = b[m];
38
+ if (C[f] && t[f] !== void 0) {
39
+ e = t[f];
40
40
  break;
41
41
  }
42
42
  }
@@ -44,42 +44,42 @@ function q(b, A) {
44
44
  e = t;
45
45
  return e;
46
46
  }
47
- const s = j("row"), k = L(
47
+ const s = i == null ? void 0 : i("row"), S = L(
48
48
  {
49
- [`${s}`]: !a,
50
- [`${s}-align-${u}`]: u,
51
- [`${s}-justify-${m}`]: m,
49
+ [`${s}`]: !n,
50
+ [`${s}-align-${l}`]: l,
51
+ [`${s}-justify-${p}`]: p,
52
52
  [`${s}-rtl`]: v
53
53
  },
54
54
  w
55
- ), o = {}, n = y(
55
+ ), o = {}, c = g(
56
56
  Array.isArray(r) ? r[0] : r
57
- ), c = y(Array.isArray(r) ? r[1] : 0);
58
- if ((n || c) && !a) {
59
- const t = -n / 2, e = -c / 2;
57
+ ), u = g(Array.isArray(r) ? r[1] : 0);
58
+ if ((c || u) && !n) {
59
+ const t = -c / 2, e = -u / 2;
60
60
  t && (o.marginLeft = t, o.marginRight = t), e && (o.marginTop = e, o.marginBottom = e);
61
61
  }
62
- return /* @__PURE__ */ g(
62
+ return /* @__PURE__ */ d(
63
63
  "div",
64
64
  {
65
- ref: A,
66
- ...M(N, ["gutter"]),
65
+ ref: j,
66
+ ...M(h, ["gutter"]),
67
67
  style: {
68
68
  ...$,
69
69
  ...o
70
70
  },
71
- className: k,
72
- children: /* @__PURE__ */ g(
71
+ className: S,
72
+ children: /* @__PURE__ */ d(
73
73
  O.Provider,
74
74
  {
75
- value: { gutter: [n, c], div: a },
76
- children: C
75
+ value: { gutter: [c, u], div: n },
76
+ children: N
77
77
  }
78
78
  )
79
79
  }
80
80
  );
81
81
  }
82
- const D = S(q);
82
+ const D = z(q);
83
83
  D.displayName = "Row";
84
84
  export {
85
85
  D as default
package/grid/grid-item.js CHANGED
@@ -1,23 +1,23 @@
1
1
  import { jsx as Q } from "react/jsx-runtime";
2
2
  import T from "lodash/isFunction";
3
3
  import V from "lodash/isString";
4
- import c, { forwardRef as k, useContext as l, useMemo as u, useEffect as q } from "react";
5
- import { a as z } from "../chunk/CQvM33Vg.js";
4
+ import l, { forwardRef as k, useContext as u, useMemo as d, useEffect as q } from "react";
5
+ import { a as z } from "../chunk/C9oo3EJI.js";
6
6
  import { u as A } from "../chunk/BFTV6myl.js";
7
7
  import H from "@unicom-cloud/utils/class-name";
8
8
  import { GridContext as J, GridDataCollectorContext as K } from "./context.js";
9
- import { u as I } from "../chunk/xAb6ZgqS.js";
9
+ import { u as G } from "../chunk/xAb6ZgqS.js";
10
10
  import { resolveItemData as L } from "./util.js";
11
11
  const U = {
12
12
  suffix: !1,
13
13
  offset: 0,
14
14
  span: 1
15
15
  };
16
- function W(_, g) {
17
- const { getPrefixCls: S, componentConfig: a, rtl: v } = l(z), f = A(
18
- _,
16
+ function W(S, g) {
17
+ const { getPrefixCls: a, componentConfig: f, rtl: v } = u(z), m = A(
18
+ S,
19
19
  U,
20
- a == null ? void 0 : a["Grid.GridItem"]
20
+ f == null ? void 0 : f["Grid.GridItem"]
21
21
  ), {
22
22
  children: i,
23
23
  className: y,
@@ -25,51 +25,51 @@ function W(_, g) {
25
25
  offset: D,
26
26
  span: R,
27
27
  __index__: o
28
- } = f, r = l(J), { collectItemData: E, removeItemData: P } = l(
28
+ } = m, r = u(J), { collectItemData: E, removeItemData: w } = u(
29
29
  K
30
- ), { colGap: m, cols: d, displayIndexList: p, overflow: x } = r, C = I(D, 0), n = I(R, 1), $ = S("grid-item"), w = p == null ? void 0 : p.includes(o), M = {
31
- [`${$}`]: !0,
32
- [`${$}-rtl`]: v
33
- }, b = H(M, y), e = u(() => L(r.cols, {
34
- suffix: !!f.suffix,
30
+ ), { colGap: p, cols: x, displayIndexList: c, overflow: $ } = r, I = G(D, 0), n = G(R, 1), C = a == null ? void 0 : a("grid-item"), M = c == null ? void 0 : c.includes(o), b = {
31
+ [`${C}`]: !0,
32
+ [`${C}-rtl`]: v
33
+ }, F = H(b, y), e = d(() => L(r.cols, {
34
+ suffix: !!m.suffix,
35
35
  span: n,
36
- offset: C
37
- }), [r.cols, f.suffix, n, C]);
36
+ offset: I
37
+ }), [r.cols, m.suffix, n, I]);
38
38
  q(() => (E(o, e), () => {
39
- P(o);
39
+ w(o);
40
40
  }), [o, e]);
41
- const F = u(() => {
41
+ const P = d(() => {
42
42
  const { offset: t, span: s } = e;
43
43
  return t > 0 ? {
44
- marginLeft: `calc((${`(100% - ${m * (s - 1)}px) / ${s}`} * ${t}) + ${m * t}px)`
44
+ marginLeft: `calc((${`(100% - ${p * (s - 1)}px) / ${s}`} * ${t}) + ${p * t}px)`
45
45
  } : {};
46
- }, [e, m]), j = u(() => {
46
+ }, [e, p]), j = d(() => {
47
47
  const { suffix: t, span: s } = e;
48
- return t ? `${d - s + 1}` : `span ${s}`;
49
- }, [e, d]), B = !w || n === 0 ? { display: "none" } : {}, O = {
48
+ return t ? `${x - s + 1}` : `span ${s}`;
49
+ }, [e, x]), B = !M || n === 0 ? { display: "none" } : {}, O = {
50
50
  gridColumn: `${j} / span ${n}`,
51
- ...F,
51
+ ...P,
52
52
  ...B
53
53
  };
54
54
  return /* @__PURE__ */ Q(
55
55
  "div",
56
56
  {
57
57
  ref: g,
58
- className: b,
58
+ className: F,
59
59
  style: {
60
60
  ...O,
61
61
  ...N
62
62
  },
63
- children: T(i) ? i({ overflow: x }) : c.Children.map(i, (t) => t && r.collapsed && c.isValidElement(t) && !V(t.type) ? c.cloneElement(t, {
64
- overflow: x,
63
+ children: T(i) ? i({ overflow: $ }) : l.Children.map(i, (t) => t && r.collapsed && l.isValidElement(t) && !V(t.type) ? l.cloneElement(t, {
64
+ overflow: $,
65
65
  ...t.props
66
66
  }) : t)
67
67
  }
68
68
  );
69
69
  }
70
- const X = k(W), G = X;
71
- G.displayName = "GridItem";
72
- G.__PQB_GRID_ITEM__ = !0;
70
+ const X = k(W), _ = X;
71
+ _.displayName = "GridItem";
72
+ _.__PQB_GRID_ITEM__ = !0;
73
73
  export {
74
- G as default
74
+ _ as default
75
75
  };