@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
@@ -3,7 +3,7 @@ import Y from "@unicom-cloud/icons/IconUiClose";
3
3
  import Z from "lodash/isFunction";
4
4
  import _, { useState as ee, useRef as I, useImperativeHandle as te, useEffect as O } from "react";
5
5
  import { u as oe } from "../chunk/BYdIoY50.js";
6
- import { I as ne } from "../chunk/CQvM33Vg.js";
6
+ import { I as ne } from "../chunk/C9oo3EJI.js";
7
7
  import k from "@unicom-cloud/utils/class-name";
8
8
  import { f as re } from "../chunk/CftuXmo_.js";
9
9
  import "../chunk/ClM74To2.js";
package/input/Password.js CHANGED
@@ -2,7 +2,7 @@ import "react/jsx-runtime";
2
2
  import "@unicom-cloud/icons/IconUiEye";
3
3
  import "@unicom-cloud/icons/IconUiEyeInvisible";
4
4
  import "react";
5
- import "../chunk/CQvM33Vg.js";
5
+ import "../chunk/C9oo3EJI.js";
6
6
  import "../chunk/BYdIoY50.js";
7
7
  import "../chunk/CXPOj2uy.js";
8
8
  import "@unicom-cloud/utils/class-name";
package/input/Search.js CHANGED
@@ -4,7 +4,7 @@ import "@unicom-cloud/icons/IconUiSearch";
4
4
  import "lodash/isPlainObject";
5
5
  import "react";
6
6
  import "../button/index.js";
7
- import "../chunk/CQvM33Vg.js";
7
+ import "../chunk/C9oo3EJI.js";
8
8
  import "../chunk/CXPOj2uy.js";
9
9
  import "@unicom-cloud/utils/class-name";
10
10
  import "../chunk/BKKEev13.js";
package/input/Textarea.js CHANGED
@@ -1,7 +1,7 @@
1
1
  import "react/jsx-runtime";
2
2
  import "@unicom-cloud/icons/IconUiClose";
3
3
  import "react";
4
- import "../chunk/CQvM33Vg.js";
4
+ import "../chunk/C9oo3EJI.js";
5
5
  import "../chunk/B2yFlXke.js";
6
6
  import "../chunk/CXPOj2uy.js";
7
7
  import "@unicom-cloud/utils/class-name";
package/input/index.js CHANGED
@@ -1,14 +1,15 @@
1
1
  import e from "./Input.js";
2
- import { InputNumber as p, InputPassword as u, InputSearch as o, InputTextArea as n, InputTextArea as f, formatValue as m } from "./Input.js";
3
- import { default as x } from "./Group.js";
4
- import { default as l } from "../input-tag/InputTag.js";
2
+ import { InputButton as a, InputNumber as p, InputPassword as o, InputSearch as n, InputTextArea as I, InputTextArea as f, formatValue as m } from "./Input.js";
3
+ import { default as s } from "./Group.js";
4
+ import { default as d } from "../input-tag/InputTag.js";
5
5
  export {
6
- x as InputGroup,
6
+ a as InputButton,
7
+ s as InputGroup,
7
8
  p as InputNumber,
8
- u as InputPassword,
9
- o as InputSearch,
10
- l as InputTag,
11
- n as InputTextArea,
9
+ o as InputPassword,
10
+ n as InputSearch,
11
+ d as InputTag,
12
+ I as InputTextArea,
12
13
  f as TextArea,
13
14
  e as default,
14
15
  m as formatValue
@@ -5,7 +5,7 @@ import "@unicom-cloud/icons/IconUiPlus";
5
5
  import "@unicom-cloud/icons/IconUiUp";
6
6
  import "lodash/isNumber";
7
7
  import "react";
8
- import "../chunk/CQvM33Vg.js";
8
+ import "../chunk/C9oo3EJI.js";
9
9
  import "../chunk/BFTV6myl.js";
10
10
  import { InputNumber as I } from "../input/Input.js";
11
11
  import "@unicom-cloud/utils/class-name";
@@ -3,7 +3,7 @@ import Ge from "@unicom-cloud/icons/IconUiClose";
3
3
  import { b as Ke } from "../chunk/BJ9_azwQ.js";
4
4
  import Te from "lodash/isArray";
5
5
  import Ce, { useContext as qe, useRef as C, useState as Xe, useImperativeHandle as Ye, useMemo as Je, useEffect as Qe } from "react";
6
- import { a as Ze, I as et } from "../chunk/CQvM33Vg.js";
6
+ import { a as Ze, I as et } from "../chunk/C9oo3EJI.js";
7
7
  import tt from "../draggable/index.js";
8
8
  import { u as ot } from "../chunk/BFTV6myl.js";
9
9
  import { u as be } from "../chunk/CXPOj2uy.js";
@@ -18,10 +18,10 @@ import "../chunk/ClM74To2.js";
18
18
  import { Backspace as it } from "@unicom-cloud/utils/constant/keyboardCode";
19
19
  import { o as ut } from "../chunk/BKKEev13.js";
20
20
  import { P as ye } from "../chunk/NPajzdOv.js";
21
- import { isPlainObject as Pe } from "@unicom-cloud/utils/is";
21
+ import { isPlainObject as Ve } from "@unicom-cloud/utils/is";
22
22
  const X = 300, pt = "responsive", ft = `__input_${Math.random().toFixed(10).slice(2)}`, T = (n) => n == null, M = (n) => {
23
23
  n.target.tagName !== "INPUT" && n.preventDefault();
24
- }, Ie = (n) => Te(n) ? n.map((c) => Pe(c) ? {
24
+ }, Ie = (n) => Te(n) ? n.map((c) => Ve(c) ? {
25
25
  ...c,
26
26
  label: "label" in c ? c.label : c.value,
27
27
  value: c.value,
@@ -30,30 +30,30 @@ const X = 300, pt = "responsive", ft = `__input_${Math.random().toFixed(10).slic
30
30
  label: c,
31
31
  value: c
32
32
  }) : [], dt = (n) => {
33
- const c = C(0), d = C(n.length);
33
+ const c = C(0), f = C(n.length);
34
34
  return Qe(() => {
35
- c.current = n.length === 0 && d.current > 0 ? X : 0, d.current = n.length;
35
+ c.current = n.length === 0 && f.current > 0 ? X : 0, f.current = n.length;
36
36
  }, [n]), c;
37
37
  }, $e = ({
38
38
  prefixCls: n,
39
39
  children: c,
40
- animation: d
41
- }) => /* @__PURE__ */ i("div", { className: `${n}-inner`, children: d ? /* @__PURE__ */ i(Ke, { component: null, children: c }) : c }), mt = {
40
+ animation: f
41
+ }) => /* @__PURE__ */ i("div", { className: `${n}-inner`, children: f ? /* @__PURE__ */ i(Ke, { component: null, children: c }) : c }), mt = {
42
42
  animation: !0,
43
- validate: (n, c) => n && c.every((d) => d.value !== n)
43
+ validate: (n, c) => n && c.every((f) => f.value !== n)
44
44
  };
45
45
  function gt(n, c) {
46
46
  const {
47
- getPrefixCls: d,
48
- size: Ve,
47
+ getPrefixCls: f,
48
+ size: we,
49
49
  componentConfig: E,
50
50
  rtl: Y
51
- } = qe(Ze), f = ot(
51
+ } = qe(Ze), d = ot(
52
52
  n,
53
53
  mt,
54
54
  E == null ? void 0 : E.InputTag
55
55
  ), {
56
- className: we,
56
+ className: Pe,
57
57
  style: Se,
58
58
  placeholder: De,
59
59
  error: Re,
@@ -65,20 +65,20 @@ function gt(n, c) {
65
65
  disableInput: Ee,
66
66
  animation: J,
67
67
  saveOnBlur: ke,
68
- dragToSort: xe,
68
+ dragToSort: ze,
69
69
  icon: N,
70
70
  prefix: Q,
71
71
  suffix: Z,
72
72
  addBefore: ee,
73
73
  addAfter: te,
74
74
  tokenSeparators: k,
75
- validate: P,
75
+ validate: V,
76
76
  renderTag: oe,
77
77
  tagClassName: ae,
78
78
  maxTagCount: m,
79
- onInputChange: x,
80
- onKeyDown: z,
81
- onPaste: O,
79
+ onInputChange: z,
80
+ onKeyDown: O,
81
+ onPaste: x,
82
82
  onChange: F,
83
83
  onFocus: j,
84
84
  onBlur: H,
@@ -86,13 +86,13 @@ function gt(n, c) {
86
86
  onRemove: L,
87
87
  onClear: B,
88
88
  onClick: re,
89
- ...ze
90
- } = f, o = d("input-tag"), V = "size" in f ? f.size : Ve, b = typeof m == "object" ? m.count : m, y = C(), U = C(null), G = C(), [w, se] = Xe(!1), [a, Oe] = be([], {
91
- defaultValue: "defaultValue" in f ? Ie(f.defaultValue) : void 0,
92
- value: "value" in f ? Ie(f.value) : void 0
89
+ ...Oe
90
+ } = d, o = f == null ? void 0 : f("input-tag"), w = "size" in d ? d.size : we, b = typeof m == "object" ? m.count : m, y = C(), U = C(null), G = C(), [P, se] = Xe(!1), [a, xe] = be([], {
91
+ defaultValue: "defaultValue" in d ? Ie(d.defaultValue) : void 0,
92
+ value: "value" in d ? Ie(d.value) : void 0
93
93
  }), [I, S] = be("", {
94
- value: f.inputValue
95
- }), Fe = dt(a), je = !!(xe && !g && !h);
94
+ value: d.inputValue
95
+ }), Fe = dt(a), je = !!(ze && !g && !h);
96
96
  Ye(c, () => {
97
97
  var e, t;
98
98
  return {
@@ -102,7 +102,7 @@ function gt(n, c) {
102
102
  };
103
103
  }, []);
104
104
  const $ = (e, t) => {
105
- h || g || ("value" in f || Oe(e), F == null || F(Me ? e : e.map((r) => r == null ? void 0 : r.value), t));
105
+ h || g || ("value" in d || xe(e), F == null || F(Me ? e : e.map((r) => r == null ? void 0 : r.value), t));
106
106
  }, ne = (e, t, r) => {
107
107
  L == null || L(e, t, r), $(
108
108
  [...a.slice(0, t), ...a.slice(t + 1)],
@@ -126,7 +126,7 @@ function gt(n, c) {
126
126
  ])
127
127
  ), le = async () => {
128
128
  try {
129
- const e = typeof P == "function" ? await P(I, a) : !0;
129
+ const e = typeof V == "function" ? await V(I, a) : !0;
130
130
  e && ($(
131
131
  a.concat({
132
132
  value: e === !0 ? I : e,
@@ -179,7 +179,7 @@ function gt(n, c) {
179
179
  const t = typeof m == "object" && m.render ? m.render : () => /* @__PURE__ */ _("span", { className: `${o}-tag-ellipsis`, children: [
180
180
  "+",
181
181
  e
182
- ] }), r = Pe(m) && m.popoverProps;
182
+ ] }), r = Ve(m) && m.popoverProps;
183
183
  return /* @__PURE__ */ i(
184
184
  st,
185
185
  {
@@ -204,7 +204,7 @@ function gt(n, c) {
204
204
  const r = [];
205
205
  await Promise.all(
206
206
  t.map(async (s) => {
207
- const l = s ? typeof P == "function" ? await P(s, a) : !0 : !1;
207
+ const l = s ? typeof V == "function" ? await V(s, a) : !0 : !1;
208
208
  l && r.push({
209
209
  value: l === !0 ? s : l,
210
210
  label: s
@@ -216,11 +216,11 @@ function gt(n, c) {
216
216
  }, pe = _e && !h && !g && a.length ? /* @__PURE__ */ i(
217
217
  et,
218
218
  {
219
- size: V,
219
+ size: w,
220
220
  className: `${o}-clear-icon`,
221
221
  onClick: (e) => {
222
222
  var t;
223
- e.stopPropagation(), $([], "clear"), w || (t = y.current) == null || t.focus(), B == null || B();
223
+ e.stopPropagation(), $([], "clear"), P || (t = y.current) == null || t.focus(), B == null || B();
224
224
  },
225
225
  children: N && N.clearIcon || /* @__PURE__ */ i(Ge, {})
226
226
  },
@@ -251,7 +251,7 @@ function gt(n, c) {
251
251
  at,
252
252
  {
253
253
  autoComplete: "off",
254
- size: V,
254
+ size: w,
255
255
  disabled: fe,
256
256
  readOnly: g,
257
257
  ref: y,
@@ -273,40 +273,40 @@ function gt(n, c) {
273
273
  },
274
274
  value: I,
275
275
  onChange: (e, t) => {
276
- x == null || x(e, t), t.nativeEvent.inputType !== "insertFromPaste" && ue(e), U.current ? S("") : S(e);
276
+ z == null || z(e, t), t.nativeEvent.inputType !== "insertFromPaste" && ue(e), U.current ? S("") : S(e);
277
277
  },
278
278
  onKeyDown: (e) => {
279
- He(e), z == null || z(e);
279
+ He(e), O == null || O(e);
280
280
  },
281
281
  onPaste: (e) => {
282
- O == null || O(e), ue(e.clipboardData.getData("text"));
282
+ x == null || x(e), ue(e.clipboardData.getData("text"));
283
283
  }
284
284
  }
285
285
  )
286
286
  },
287
287
  ft
288
288
  )
289
- ], We = !T(Q), de = !T(Z) || !T(pe), me = !T(ee), ge = !T(te), D = me || ge, ve = f.status || (Re ? "error" : void 0), he = A(o, {
290
- [`${o}-size-${V}`]: V,
289
+ ], We = !T(Q), de = !T(Z) || !T(pe), me = !T(ee), ge = !T(te), D = me || ge, ve = d.status || (Re ? "error" : void 0), he = A(o, {
290
+ [`${o}-size-${w}`]: w,
291
291
  [`${o}-disabled`]: h,
292
292
  [`${o}-${ve}`]: ve,
293
- [`${o}-focus`]: w,
293
+ [`${o}-focus`]: P,
294
294
  [`${o}-readonly`]: g,
295
295
  [`${o}-has-suffix`]: de,
296
296
  [`${o}-has-placeholder`]: !a.length,
297
297
  [`${o}-rtl`]: Y
298
- }), R = { style: Se, className: we }, Ne = /* @__PURE__ */ i(
298
+ }), R = { style: Se, className: Pe }, Ne = /* @__PURE__ */ i(
299
299
  "div",
300
300
  {
301
- ...ut(ze, ["status", "size", "defaultValue", "value", "inputValue"]),
301
+ ...ut(Oe, ["status", "size", "defaultValue", "value", "inputValue"]),
302
302
  ...D ? {} : R,
303
303
  className: D ? he : A(he, R.className),
304
304
  onMouseDown: (e) => {
305
- w && M(e);
305
+ P && M(e);
306
306
  },
307
307
  onClick: (e) => {
308
308
  var t;
309
- !w && ((t = y.current) == null || t.focus()), re && re(e);
309
+ !P && ((t = y.current) == null || t.focus()), re && re(e);
310
310
  },
311
311
  ref: D ? void 0 : G,
312
312
  children: /* @__PURE__ */ _("div", { className: `${o}-view`, children: [
package/layout/Content.js CHANGED
@@ -1,13 +1,13 @@
1
1
  import { jsx as c } from "react/jsx-runtime";
2
2
  import { forwardRef as f, useContext as i } from "react";
3
- import { a as l } from "../chunk/CQvM33Vg.js";
3
+ import { a as l } from "../chunk/C9oo3EJI.js";
4
4
  import p from "@unicom-cloud/utils/class-name";
5
- function C(t, o) {
6
- const { className: s, children: e, ...n } = t, { getPrefixCls: a } = i(l), r = a("layout-content"), m = p(r, s);
7
- return /* @__PURE__ */ c("main", { ref: o, ...n, className: m, children: e });
5
+ function u(o, n) {
6
+ const { className: s, children: a, ...e } = o, { getPrefixCls: t } = i(l), m = t == null ? void 0 : t("layout-content"), r = p(m, s);
7
+ return /* @__PURE__ */ c("main", { ref: n, ...e, className: r, children: a });
8
8
  }
9
- const u = f(C);
10
- u.displayName = "LayoutContent";
9
+ const C = f(u);
10
+ C.displayName = "LayoutContent";
11
11
  export {
12
- u as default
12
+ C as default
13
13
  };
package/layout/Footer.js CHANGED
@@ -1,13 +1,13 @@
1
- import { jsx as f } from "react/jsx-runtime";
2
- import { forwardRef as c, useContext as l } from "react";
3
- import { a as i } from "../chunk/CQvM33Vg.js";
1
+ import { jsx as c } from "react/jsx-runtime";
2
+ import { forwardRef as f, useContext as l } from "react";
3
+ import { a as i } from "../chunk/C9oo3EJI.js";
4
4
  import p from "@unicom-cloud/utils/class-name";
5
- function u(o, t) {
6
- const { className: e, children: s, ...r } = o, { getPrefixCls: a } = l(i), m = a("layout-footer"), n = p(m, e);
7
- return /* @__PURE__ */ f("footer", { ref: t, ...r, className: n, children: s });
5
+ function u(t, s) {
6
+ const { className: e, children: r, ...a } = t, { getPrefixCls: o } = l(i), m = o == null ? void 0 : o("layout-footer"), n = p(m, e);
7
+ return /* @__PURE__ */ c("footer", { ref: s, ...a, className: n, children: r });
8
8
  }
9
- const x = c(u);
10
- x.displayName = "LayoutFooter";
9
+ const N = f(u);
10
+ N.displayName = "LayoutFooter";
11
11
  export {
12
- x as default
12
+ N as default
13
13
  };
package/layout/Header.js CHANGED
@@ -1,12 +1,12 @@
1
1
  import { jsx as c } from "react/jsx-runtime";
2
- import { forwardRef as f, useContext as l } from "react";
3
- import { a as i } from "../chunk/CQvM33Vg.js";
4
- import d from "@unicom-cloud/utils/class-name";
5
- function p(e, a) {
6
- const { getPrefixCls: s } = l(i), { className: o, children: r, ...t } = e, m = s("layout-header"), n = d(m, o);
7
- return /* @__PURE__ */ c("header", { ref: a, ...t, className: n, children: r });
2
+ import { forwardRef as d, useContext as f } from "react";
3
+ import { a as l } from "../chunk/C9oo3EJI.js";
4
+ import i from "@unicom-cloud/utils/class-name";
5
+ function p(a, o) {
6
+ const { getPrefixCls: e } = f(l), { className: s, children: r, ...t } = a, m = e == null ? void 0 : e("layout-header"), n = i(m, s);
7
+ return /* @__PURE__ */ c("header", { ref: o, ...t, className: n, children: r });
8
8
  }
9
- const u = f(p);
9
+ const u = d(p);
10
10
  u.displayName = "LayoutHeader";
11
11
  export {
12
12
  u as default
package/layout/Sider.js CHANGED
@@ -1,15 +1,15 @@
1
- import { jsx as n, jsxs as K } from "react/jsx-runtime";
2
- import j from "@unicom-cloud/icons/IconUiLeft";
3
- import q from "@unicom-cloud/icons/IconUiRight";
4
- import X from "lodash/isArray";
5
- import w from "lodash/isNumber";
6
- import { createContext as Y, forwardRef as Z, useContext as ee, useState as re, useRef as A, useEffect as F, useMemo as te } from "react";
7
- import { a as ie } from "../chunk/CQvM33Vg.js";
1
+ import { jsx as n, jsxs as X } from "react/jsx-runtime";
2
+ import q from "@unicom-cloud/icons/IconUiLeft";
3
+ import A from "@unicom-cloud/icons/IconUiRight";
4
+ import Y from "lodash/isArray";
5
+ import y from "lodash/isNumber";
6
+ import { createContext as Z, forwardRef as P, useContext as ee, useState as re, useRef as F, useEffect as H, useMemo as te } from "react";
7
+ import { a as ie } from "../chunk/C9oo3EJI.js";
8
8
  import { u as se } from "../chunk/CXPOj2uy.js";
9
9
  import oe from "../resize-box/index.js";
10
- import H from "@unicom-cloud/utils/class-name";
11
- import { responsiveMap as ne, responsiveObserve as L } from "../utils/responsiveObserve.js";
12
- const le = Y({
10
+ import L from "@unicom-cloud/utils/class-name";
11
+ import { responsiveMap as ne, responsiveObserve as V } from "../utils/responsiveObserve.js";
12
+ const le = Z({
13
13
  siderCollapsed: !1,
14
14
  collapsedWidth: 64
15
15
  }), ae = /* @__PURE__ */ (() => {
@@ -17,74 +17,74 @@ const le = Y({
17
17
  return (m = "") => (i += 1, `${m}${i}`);
18
18
  })();
19
19
  function ce(i, m) {
20
- var T;
20
+ var j;
21
21
  const {
22
- children: D,
23
- className: E,
24
- style: G,
25
- theme: y = "light",
22
+ children: E,
23
+ className: G,
24
+ style: O,
25
+ theme: R = "light",
26
26
  trigger: f,
27
- reverseArrow: R,
27
+ reverseArrow: W,
28
28
  collapsedWidth: r = 48,
29
29
  width: g = 200,
30
30
  collapsible: h,
31
31
  resizeDirections: c,
32
32
  onSiderMount: v,
33
- onSiderUnmount: C,
34
- breakpoint: W,
35
- onBreakpoint: O,
33
+ onSiderUnmount: $,
34
+ breakpoint: _,
35
+ onBreakpoint: Q,
36
36
  onCollapse: d,
37
37
  resizeBoxProps: t = {}
38
- } = i, _ = ae("pqb-sider-"), { getPrefixCls: P } = ee(ie), s = P("layout-sider"), [e, I] = se(!1, {
38
+ } = i, I = ae("pqb-sider-"), { getPrefixCls: b } = ee(ie), s = b == null ? void 0 : b("layout-sider"), [e, k] = se(!1, {
39
39
  value: "collapsed" in i ? i.collapsed : void 0,
40
40
  defaultValue: i.defaultCollapsed
41
- }), $ = w(g) ? `${g}px` : String(g), Q = w(r) ? `${r}` : String(r), [p, k] = re(
42
- e ? Q : $
43
- ), b = A(null), M = A(null);
44
- M.current = {
45
- breakpoint: W,
41
+ }), C = y(g) ? `${g}px` : String(g), U = y(r) ? `${r}` : String(r), [p, M] = re(
42
+ e ? U : C
43
+ ), N = F(null), T = F(null);
44
+ T.current = {
45
+ breakpoint: _,
46
46
  collapsed: e,
47
47
  onCollapse: d,
48
- onBreakpoint: O
49
- }, F(() => (v == null || v(_), h && W in ne && (b.current = L.subscribe(
48
+ onBreakpoint: Q
49
+ }, H(() => (v == null || v(I), h && _ in ne && (N.current = V.subscribe(
50
50
  (o, l) => {
51
- const { breakpoint: a, collapsed: J, onCollapse: N, onBreakpoint: S } = M.current;
51
+ const { breakpoint: a, collapsed: K, onCollapse: x, onBreakpoint: w } = T.current;
52
52
  if (!l || l === a) {
53
53
  const u = !o[a];
54
- u !== J && (I(u), N == null || N(u, "responsive")), S == null || S(u);
54
+ u !== K && (k(u), x == null || x(u, "responsive")), w == null || w(u);
55
55
  }
56
56
  }
57
57
  )), () => {
58
- C == null || C(_), b.current && L.unsubscribe(b.current);
59
- }), []), F(() => {
60
- const o = w(r) ? `${r}px` : String(r);
61
- k(e ? o : $);
62
- }, [e, $, r]);
63
- const x = c && X(c) || ((T = t.directions) == null ? void 0 : T.length), U = x ? oe : "aside", z = () => {
64
- const o = f || (e ? R ? /* @__PURE__ */ n(j, {}) : /* @__PURE__ */ n(q, {}) : R ? /* @__PURE__ */ n(q, {}) : /* @__PURE__ */ n(j, {}));
58
+ $ == null || $(I), N.current && V.unsubscribe(N.current);
59
+ }), []), H(() => {
60
+ const o = y(r) ? `${r}px` : String(r);
61
+ M(e ? o : C);
62
+ }, [e, C, r]);
63
+ const S = c && Y(c) || ((j = t.directions) == null ? void 0 : j.length), z = S ? oe : "aside", B = () => {
64
+ const o = f || (e ? W ? /* @__PURE__ */ n(q, {}) : /* @__PURE__ */ n(A, {}) : W ? /* @__PURE__ */ n(A, {}) : /* @__PURE__ */ n(q, {}));
65
65
  return h && f !== null ? /* @__PURE__ */ n(
66
66
  "div",
67
67
  {
68
68
  style: { width: p },
69
- className: H(`${s}-trigger`, {
70
- [`${s}-trigger-light`]: y === "light"
69
+ className: L(`${s}-trigger`, {
70
+ [`${s}-trigger-light`]: R === "light"
71
71
  }),
72
72
  onClick: () => {
73
- I(!e), d == null || d(!e, "clickTrigger");
73
+ k(!e), d == null || d(!e, "clickTrigger");
74
74
  },
75
75
  children: o
76
76
  }
77
77
  ) : null;
78
- }, B = te(() => x ? {
78
+ }, J = te(() => S ? {
79
79
  component: "aside",
80
80
  ...t,
81
81
  width: p,
82
82
  directions: c,
83
83
  onMoving: (o, l) => {
84
84
  var a;
85
- k(`${l.width}px`), (a = t == null ? void 0 : t.onMoving) == null || a.call(t, o, l);
85
+ M(`${l.width}px`), (a = t == null ? void 0 : t.onMoving) == null || a.call(t, o, l);
86
86
  }
87
- } : {}, [x, c, p, t]);
87
+ } : {}, [S, c, p, t]);
88
88
  return /* @__PURE__ */ n(
89
89
  le.Provider,
90
90
  {
@@ -92,37 +92,37 @@ function ce(i, m) {
92
92
  siderCollapsed: e,
93
93
  collapsedWidth: r
94
94
  },
95
- children: /* @__PURE__ */ K(
96
- U,
95
+ children: /* @__PURE__ */ X(
96
+ z,
97
97
  {
98
98
  ref: m,
99
99
  style: {
100
100
  width: p,
101
- ...G
101
+ ...O
102
102
  },
103
- className: H(
103
+ className: L(
104
104
  s,
105
105
  {
106
- [`${s}-light`]: y === "light",
106
+ [`${s}-light`]: R === "light",
107
107
  [`${s}-has-trigger`]: f !== null && h,
108
108
  [`${s}-collapsed`]: e
109
109
  },
110
- E
110
+ G
111
111
  ),
112
- ...B,
112
+ ...J,
113
113
  children: [
114
- /* @__PURE__ */ n("div", { className: `${s}-children`, children: D }),
115
- z()
114
+ /* @__PURE__ */ n("div", { className: `${s}-children`, children: E }),
115
+ B()
116
116
  ]
117
117
  }
118
118
  )
119
119
  }
120
120
  );
121
121
  }
122
- const de = Z(ce), V = de;
123
- V.displayName = "LayoutSider";
124
- V.__PQB_SIGN__ = "sider";
122
+ const de = P(ce), D = de;
123
+ D.displayName = "LayoutSider";
124
+ D.__PQB_SIGN__ = "sider";
125
125
  export {
126
126
  le as SiderContext,
127
- V as default
127
+ D as default
128
128
  };
package/layout/index.js CHANGED
@@ -1,43 +1,43 @@
1
- import { jsx as g } from "react/jsx-runtime";
2
- import i from "lodash/get";
3
- import p, { forwardRef as x, useContext as _, useState as F } from "react";
4
- import { a as H } from "../chunk/CQvM33Vg.js";
5
- import { u as P } from "../chunk/BFTV6myl.js";
6
- import R from "@unicom-cloud/utils/class-name";
7
- import h from "./Content.js";
8
- import w from "./Footer.js";
9
- import M from "./Header.js";
10
- import $ from "./Sider.js";
11
- function b(u, f) {
12
- const { getPrefixCls: c, componentConfig: e } = _(H), d = P(
13
- u,
1
+ import { jsx as _ } from "react/jsx-runtime";
2
+ import p from "lodash/get";
3
+ import u, { forwardRef as g, useContext as x, useState as F } from "react";
4
+ import { a as H } from "../chunk/C9oo3EJI.js";
5
+ import { u as R } from "../chunk/BFTV6myl.js";
6
+ import h from "@unicom-cloud/utils/class-name";
7
+ import w from "./Content.js";
8
+ import M from "./Footer.js";
9
+ import $ from "./Header.js";
10
+ import b from "./Sider.js";
11
+ function j(f, c) {
12
+ const { getPrefixCls: e, componentConfig: r } = x(H), d = R(
13
+ f,
14
14
  {},
15
- e == null ? void 0 : e.Layout
16
- ), { className: l, hasSider: n, children: y, ...C } = d, [r, a] = F([]), m = c("layout"), L = R(
17
- m,
15
+ r == null ? void 0 : r.Layout
16
+ ), { className: y, hasSider: a, children: l, ...C } = d, [s, m] = F([]), i = e == null ? void 0 : e("layout"), L = h(
17
+ i,
18
18
  {
19
- [`${m}-has-sider`]: typeof n == "boolean" ? n : r.length > 0
19
+ [`${i}-has-sider`]: typeof a == "boolean" ? a : s.length > 0
20
20
  },
21
- l
21
+ y
22
22
  );
23
- return /* @__PURE__ */ g("section", { ref: f, ...C, className: L, children: p.Children.map(y, (o) => {
24
- const S = i(o, "type.__PQB_SIGN__") || i(o, "props.sign");
25
- return o && S === "sider" ? p.cloneElement(o, {
26
- onSiderMount: (s) => a([...r, s]),
27
- onSiderUnmount: (s) => a(r.filter((N) => N !== s))
23
+ return /* @__PURE__ */ _("section", { ref: c, ...C, className: L, children: u.Children.map(l, (o) => {
24
+ const S = p(o, "type.__PQB_SIGN__") || p(o, "props.sign");
25
+ return o && S === "sider" ? u.cloneElement(o, {
26
+ onSiderMount: (n) => m([...s, n]),
27
+ onSiderUnmount: (n) => m(s.filter((N) => N !== n))
28
28
  }) : o;
29
29
  }) });
30
30
  }
31
- const j = x(b), t = j;
31
+ const B = g(j), t = B;
32
32
  t.displayName = "Layout";
33
- t.Sider = $;
34
- t.Header = M;
35
- t.Footer = w;
36
- t.Content = h;
33
+ t.Sider = b;
34
+ t.Header = $;
35
+ t.Footer = M;
36
+ t.Content = w;
37
37
  export {
38
- h as LayoutContent,
39
- w as LayoutFooter,
40
- M as LayoutHeader,
41
- $ as LayoutSider,
38
+ w as LayoutContent,
39
+ M as LayoutFooter,
40
+ $ as LayoutHeader,
41
+ b as LayoutSider,
42
42
  t as default
43
43
  };