@unicom-cloud/ui 0.8.73 → 0.8.75

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 (306) hide show
  1. package/Affix.js +2 -2
  2. package/Alert.js +3 -3
  3. package/AutoComplete.js +2 -2
  4. package/BackTop.js +4 -4
  5. package/Badge.js +3 -3
  6. package/Breadcrumb.js +3 -3
  7. package/Button.js +2 -2
  8. package/Calendar.js +3 -3
  9. package/Card.js +2 -2
  10. package/Carousel.js +2 -2
  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 +2 -2
  16. package/ConfigProvider.js +1 -1
  17. package/Copy.js +3 -3
  18. package/DatePicker.js +1 -1
  19. package/Descriptions.js +2 -2
  20. package/Divider.js +2 -2
  21. package/Draggable.js +2 -2
  22. package/Dropdown.js +2 -2
  23. package/Empty.js +2 -2
  24. package/Icon.js +2 -2
  25. package/IconHover.js +2 -2
  26. package/Image.js +1 -1
  27. package/InputNumber.js +2 -2
  28. package/Layout.js +2 -2
  29. package/Link.js +2 -2
  30. package/List.js +2 -2
  31. package/Mentions.js +2 -2
  32. package/Menu.js +1 -1
  33. package/Message.js +4 -4
  34. package/Modal.js +1 -1
  35. package/Notice.js +2 -2
  36. package/Notification.js +4 -4
  37. package/OverflowEllipsis.js +2 -2
  38. package/PageHeader.js +2 -2
  39. package/Popconfirm.js +2 -2
  40. package/Popover.js +2 -2
  41. package/Progress.js +2 -2
  42. package/Radio.js +1 -1
  43. package/Rate.js +2 -2
  44. package/ResizeBox.js +2 -2
  45. package/Result.js +2 -2
  46. package/SelectView.js +1 -1
  47. package/Skeleton.js +2 -2
  48. package/Slider.js +2 -2
  49. package/Space.js +2 -2
  50. package/SpeechSynthesis.js +4 -4
  51. package/Spin.js +2 -2
  52. package/Statistic.js +3 -3
  53. package/Steps.js +2 -2
  54. package/Switch.js +4 -4
  55. package/Table.js +1 -1
  56. package/Tabs.js +1 -1
  57. package/Tag.js +2 -2
  58. package/Tooltip.js +3 -3
  59. package/Transfer.js +2 -2
  60. package/Tree.js +1 -1
  61. package/Trigger.js +3 -3
  62. package/affix/index.js +2 -2
  63. package/alert/index.js +9 -9
  64. package/anchor/Anchor.js +26 -26
  65. package/anchor/Link.js +2 -2
  66. package/anchor/util.js +1 -1
  67. package/auto-complete/index.js +2 -2
  68. package/avatar/Avatar.js +2 -2
  69. package/avatar/Group.js +2 -2
  70. package/back-top/index.js +11 -11
  71. package/badge/Count.js +7 -7
  72. package/badge/index.js +9 -9
  73. package/breadcrumb/Item.js +6 -6
  74. package/breadcrumb/index.js +3 -3
  75. package/button/Group.js +2 -2
  76. package/button/index.js +2 -2
  77. package/calendar/Month.js +2 -2
  78. package/calendar/Year.js +1 -1
  79. package/calendar/index.js +4 -4
  80. package/card/Grid.js +5 -5
  81. package/card/Meta.js +4 -4
  82. package/card/index.js +2 -2
  83. package/carousel/Arrow.js +2 -2
  84. package/carousel/Indicator.js +6 -6
  85. package/carousel/index.js +2 -2
  86. package/cascader/Cascader.js +3 -3
  87. package/cascader/index.js +1 -1
  88. package/cascader/util.js +1 -1
  89. package/checkbox/Checkbox.js +3 -3
  90. package/checkbox/Group.js +3 -3
  91. package/checkbox/index.js +1 -1
  92. package/chunk/{oHDWCJnz.js → 0mWCmQHr.js} +3 -3
  93. package/chunk/{UDX9U6M7.js → B8hkFIar.js} +3 -3
  94. package/chunk/BFmckYou.js +25 -0
  95. package/chunk/{Cj2SQJiO.js → BJ9_azwQ.js} +487 -487
  96. package/chunk/{Dg0M2OmF.js → BViFMHr-.js} +5 -5
  97. package/chunk/BbqvFW5R.js +927 -0
  98. package/chunk/{uKZyjtff.js → BhBEMwvI.js} +21 -20
  99. package/chunk/{Bj4EV0eG.js → BpYX5PN4.js} +1 -1
  100. package/chunk/{B7hulkj9.js → BxZ39GzB.js} +2 -2
  101. package/chunk/C9XYyypq.js +713 -0
  102. package/chunk/CIkPwQlq.js +6 -0
  103. package/chunk/{uH6uxyao.js → CPlPBkN7.js} +2 -2
  104. package/chunk/CUFsOxJ2.js +10 -0
  105. package/chunk/CWlklVfi.js +257 -0
  106. package/chunk/{Ey4YJCkX.js → D0Dlbc2g.js} +2 -1
  107. package/chunk/{DejjIa3N.js → DFcz9ZPP.js} +35 -35
  108. package/chunk/{AwZqeapI.js → DRTWRsgI.js} +1 -1
  109. package/chunk/{D2LLXZQX.js → DeCsZrXb.js} +4 -4
  110. package/chunk/{DpoumMDw.js → DohlrJ4S.js} +1 -1
  111. package/chunk/DskaI8QL.js +25 -0
  112. package/chunk/{7HDzVe32.js → Dv6USvVF.js} +4 -4
  113. package/chunk/{DJDOFlqC.js → EL5Jmjgr.js} +2 -2
  114. package/chunk/{CiY7w1ZO.js → WVoGhvMI.js} +3 -3
  115. package/chunk/{BJ1soa2K.js → uEGHykhe.js} +18 -18
  116. package/collapse/Collapse.js +3 -3
  117. package/collapse/Item.js +4 -4
  118. package/collapse/index.js +1 -1
  119. package/color-picker/ControlBar.js +2 -2
  120. package/color-picker/InputAlpha.js +1 -1
  121. package/color-picker/InputHex.js +7 -7
  122. package/color-picker/InputRgb.js +6 -6
  123. package/color-picker/Palette.js +5 -5
  124. package/color-picker/Panel.js +4 -4
  125. package/color-picker/colors.js +7 -12
  126. package/color-picker/index.js +20 -20
  127. package/color-picker/utils.js +1 -1
  128. package/comment/index.js +6 -6
  129. package/config-provider/ConfigProvider.js +2 -2
  130. package/config-provider/context.js +1 -1
  131. package/config-provider/index.js +2 -2
  132. package/copy/index.js +16 -16
  133. package/date-picker/Picker.js +2 -2
  134. package/date-picker/PickerRange.js +3 -3
  135. package/date-picker/index.js +1 -1
  136. package/descriptions/index.js +2 -2
  137. package/divider/index.js +5 -5
  138. package/draggable/Item.js +1 -1
  139. package/draggable/index.js +9 -9
  140. package/drawer/Drawer.js +3 -3
  141. package/dropdown/Button.js +1 -1
  142. package/dropdown/index.js +2 -2
  143. package/empty/index.js +2 -2
  144. package/form/Control.js +1 -1
  145. package/form/Form.js +2 -2
  146. package/form/FormItem.js +3 -3
  147. package/form/FormLabel.js +9 -9
  148. package/form/context.js +1 -1
  149. package/grid/Col.js +2 -2
  150. package/grid/Row.js +2 -2
  151. package/grid/grid-item.js +2 -2
  152. package/grid/grid.js +8 -8
  153. package/icon/index.js +11 -11
  154. package/icon-hover/index.js +2 -2
  155. package/image/Image.js +4 -4
  156. package/image/ImageFooter.js +2 -2
  157. package/image/ImagePreview.js +5 -5
  158. package/image/ImagePreviewArrow.js +4 -4
  159. package/image/ImagePreviewGroup.js +1 -1
  160. package/image/ImagePreviewToolbar.js +1 -1
  161. package/image/TriggerForToolbar.js +4 -4
  162. package/image/index.js +1 -1
  163. package/index.js +586 -592
  164. package/input/Group.js +4 -4
  165. package/input/Input.js +45 -45
  166. package/input/InputElement.js +2 -2
  167. package/input/Password.js +2 -2
  168. package/input/Search.js +2 -2
  169. package/input/Textarea.js +2 -2
  170. package/input-number/index.js +2 -2
  171. package/input-tag/InputTag.js +4 -4
  172. package/layout/Content.js +2 -2
  173. package/layout/Footer.js +5 -5
  174. package/layout/Header.js +4 -4
  175. package/layout/Sider.js +2 -2
  176. package/layout/index.js +2 -2
  177. package/link/index.js +5 -5
  178. package/list/Item.js +2 -2
  179. package/list/Meta.js +4 -4
  180. package/list/index.js +2 -2
  181. package/mentions/index.js +2 -2
  182. package/menu/Item.js +5 -5
  183. package/menu/ItemGroup.js +1 -1
  184. package/menu/Menu.js +3 -3
  185. package/menu/OverflowWrap.js +2 -2
  186. package/menu/index.js +2 -2
  187. package/message/index.js +4 -4
  188. package/message/useMessage.js +1 -1
  189. package/modal/Confirm.js +2 -2
  190. package/modal/Modal.js +4 -4
  191. package/modal/index.js +1 -1
  192. package/notice/index.js +2 -2
  193. package/notification/index.js +4 -4
  194. package/notification/useNotification.js +1 -1
  195. package/overflow-ellipsis/OverflowItem.js +6 -6
  196. package/overflow-ellipsis/index.js +8 -8
  197. package/package.json +1 -1
  198. package/page-header/index.js +2 -2
  199. package/pagination/PageItem.js +2 -2
  200. package/pagination/PageJumper.js +1 -1
  201. package/pagination/PageOption.js +1 -1
  202. package/pagination/Pagination.js +23 -23
  203. package/picker/Input.js +7 -7
  204. package/picker/InputRange.js +9 -9
  205. package/popconfirm/index.js +2 -2
  206. package/popover/index.js +2 -2
  207. package/progress/CircleProgress.js +7 -7
  208. package/progress/LineProgess.js +1 -1
  209. package/progress/StepProgress.js +7 -7
  210. package/progress/index.js +8 -8
  211. package/radio/Group.js +3 -3
  212. package/radio/Radio.js +3 -3
  213. package/radio/index.js +2 -2
  214. package/rate/index.js +2 -2
  215. package/resize-box/ResizeTrigger.js +10 -10
  216. package/resize-box/Split.js +12 -12
  217. package/resize-box/SplitGroup.js +2 -2
  218. package/resize-box/index.js +2 -2
  219. package/result/index.js +9 -9
  220. package/select/Option.js +2 -2
  221. package/select/Select.js +3 -3
  222. package/select-view/Core.js +27 -27
  223. package/select-view/index.js +1 -1
  224. package/skeleton/Image.js +4 -4
  225. package/skeleton/Text.js +7 -7
  226. package/skeleton/index.js +2 -2
  227. package/slider/Button.js +2 -2
  228. package/slider/Dot.js +5 -5
  229. package/slider/Input.js +12 -12
  230. package/slider/Tick.js +6 -6
  231. package/slider/index.js +2 -2
  232. package/space/index.js +12 -12
  233. package/speech-synthesis/index.js +4 -4
  234. package/spin/DotLoading.js +1 -1
  235. package/spin/index.js +2 -2
  236. package/statistic/Countdown.js +7 -7
  237. package/statistic/index.js +20 -20
  238. package/steps/Step.js +1 -1
  239. package/steps/index.js +2 -2
  240. package/style/variables.less +375 -710
  241. package/style.css +1 -1
  242. package/switch/index.js +4 -4
  243. package/table/Table.js +4 -4
  244. package/table/index.js +4 -4
  245. package/tabs/Tab.js +3 -3
  246. package/tabs/TabContent.js +3 -3
  247. package/tabs/TabPane.js +2 -2
  248. package/tabs/index.js +2 -2
  249. package/tag/index.js +6 -6
  250. package/time-picker/Picker.js +2 -2
  251. package/time-picker/TimeColumn.js +7 -7
  252. package/time-picker/TimePicker.js +23 -23
  253. package/time-picker/util.js +5 -5
  254. package/timeline/Item.js +2 -2
  255. package/timeline/Timeline.js +2 -2
  256. package/tooltip/index.js +3 -3
  257. package/transfer/Item.js +3 -3
  258. package/transfer/List.js +3 -3
  259. package/transfer/index.js +2 -2
  260. package/tree/Animation.js +3 -3
  261. package/tree/Node.js +4 -4
  262. package/tree/NodeList.js +1 -1
  263. package/tree/Tree.js +3 -3
  264. package/tree/index.js +1 -1
  265. package/tree-select/Select.js +2 -2
  266. package/trigger/index.js +3 -3
  267. package/types/color-picker/colors.d.ts +1 -1
  268. package/types/config-provider/interface.d.ts +0 -1
  269. package/types/utils/color.d.ts +1 -1
  270. package/types/utils/constant.d.ts +1 -1
  271. package/types/utils/index.d.ts +1 -0
  272. package/types/utils/setDarkTheme.d.ts +4 -0
  273. package/typography/Base.js +2 -2
  274. package/typography/EditContent.js +1 -1
  275. package/typography/Ellipsis.js +14 -15
  276. package/typography/Paragraph.js +6 -6
  277. package/typography/Typography.js +5 -5
  278. package/typography/index.js +12 -13
  279. package/upload/TriggerNode.js +2 -2
  280. package/upload/Upload.js +5 -5
  281. package/upload/Uploader.js +2 -2
  282. package/upload/request.js +1 -1
  283. package/upload/request_.js +1 -1
  284. package/utils/PqbCSSTransition.js +1 -1
  285. package/utils/className.js +3 -3
  286. package/utils/color.js +2 -116
  287. package/utils/constant.js +3 -2
  288. package/utils/contextHolder.js +1 -1
  289. package/utils/copy.js +4 -4
  290. package/utils/dom.js +1 -1
  291. package/utils/fileToURL.js +1 -1
  292. package/utils/index.js +303 -309
  293. package/utils/reactTransitionGroup.js +1 -1
  294. package/utils/saveAs.js +1 -1
  295. package/utils/setDarkTheme.js +7 -0
  296. package/utils/tinycolor.js +13 -13
  297. package/utils/tween.js +1 -1
  298. package/verification-code/VerificationCode.js +7 -7
  299. package/version/index.js +1 -1
  300. package/watermark/Watermark.js +6 -6
  301. package/chunk/B0UZ1Ee2.js +0 -257
  302. package/chunk/Byd0ztYY.js +0 -724
  303. package/chunk/CCVU-Kst.js +0 -770
  304. package/chunk/CTxjmYmx.js +0 -19
  305. package/chunk/D0ZWT7db.js +0 -5
  306. package/chunk/JPPo5nY_.js +0 -9
@@ -0,0 +1,7 @@
1
+ import { s as r } from "../chunk/DskaI8QL.js";
2
+ import { r as o } from "../chunk/DskaI8QL.js";
3
+ export {
4
+ r as default,
5
+ o as removeDarkTheme,
6
+ r as setDarkTheme
7
+ };
@@ -1,8 +1,8 @@
1
- import { a as u, y as x, e as R, d as C, j as h, a as y, k as v, S as d, N as f, n as j, R as k, b as I, C as S, H as $, T as A, l as B, A as D, p as M, W as N, w as O } from "../chunk/CCVU-Kst.js";
2
- function m(b = [34797, 15747172]) {
1
+ import { c as u, y as x, e as R, d as y, j as C, c as h, k as v, S as d, N as f, n as j, a as k, b as I, C as M, H as S, T as $, l as A, A as B, p as D, W as N, w as O } from "../chunk/BbqvFW5R.js";
2
+ function m(g = [34797, 15747172]) {
3
3
  return (s = 1) => {
4
- const a = b, o = Math.log(256) / Math.log(2), g = a[0] >>> o * 2 & 255, T = a[0] >>> o * 1 & 255, n = a[0] >>> o * 0 & 255, r = a[1] >>> o * 2 & 255, e = a[1] >>> o * 1 & 255, t = a[1] >>> o * 0 & 255, l = r - (r - g) * s, c = e - (e - T) * s, i = t - (t - n) * s;
5
- return `rgb(${l},${c},${i})`;
4
+ const a = g, o = Math.log(256) / Math.log(2), n = a[0] >>> o * 2 & 255, b = a[0] >>> o * 1 & 255, T = a[0] >>> o * 0 & 255, e = a[1] >>> o * 2 & 255, r = a[1] >>> o * 1 & 255, t = a[1] >>> o * 0 & 255, c = e - (e - n) * s, l = r - (r - b) * s, i = t - (t - T) * s;
5
+ return `rgb(${c},${l},${i})`;
6
6
  };
7
7
  }
8
8
  export {
@@ -10,21 +10,21 @@ export {
10
10
  x as cmykToRgb,
11
11
  R as colorNames,
12
12
  m as compareColorByRange,
13
- C as convertDecimalToHex,
14
- h as convertHexToDecimal,
15
- y as default,
13
+ y as convertDecimalToHex,
14
+ C as convertHexToDecimal,
15
+ h as default,
16
16
  v as hslToRgb,
17
17
  d as hsvToRgb,
18
18
  f as inputToRGB,
19
19
  j as isValidCSSUnit,
20
20
  k as numberInputToObject,
21
21
  I as parseIntFromHex,
22
- S as rgbToCmyk,
23
- $ as rgbToHex,
24
- A as rgbToHsl,
25
- B as rgbToHsv,
26
- D as rgbToRgb,
27
- M as rgbaToArgbHex,
22
+ M as rgbToCmyk,
23
+ S as rgbToHex,
24
+ $ as rgbToHsl,
25
+ A as rgbToHsv,
26
+ B as rgbToRgb,
27
+ D as rgbaToArgbHex,
28
28
  N as rgbaToHex,
29
29
  O as stringInputToObject
30
30
  };
package/utils/tween.js CHANGED
@@ -1,4 +1,4 @@
1
- import { I as s, x as t, I as f } from "../chunk/uKZyjtff.js";
1
+ import { y as s, x as t, y as f } from "../chunk/BhBEMwvI.js";
2
2
  export {
3
3
  s as default,
4
4
  t as easing,
@@ -1,9 +1,9 @@
1
1
  import { jsx as R, jsxs as b } from "react/jsx-runtime";
2
2
  import w, { forwardRef as N, useContext as F, useRef as j, createElement as z } from "react";
3
- import { a as D } from "../chunk/Byd0ztYY.js";
3
+ import { a as D } from "../chunk/C9XYyypq.js";
4
4
  import { u as E } from "../chunk/BFTV6myl.js";
5
5
  import K from "../input/InputElement.js";
6
- import { m as p } from "../chunk/JPPo5nY_.js";
6
+ import { p as u } from "../chunk/CUFsOxJ2.js";
7
7
  import { useVerificationCode as L } from "../hooks/useVerificationCode.js";
8
8
  const M = {
9
9
  length: 6
@@ -25,19 +25,19 @@ function C(g, _) {
25
25
  return /* @__PURE__ */ R(
26
26
  "div",
27
27
  {
28
- className: p(`${i}`, e.className, {
28
+ className: u(`${i}`, e.className, {
29
29
  [`${i}-rtl`]: o.rtl
30
30
  }),
31
31
  style: e.style,
32
32
  children: P.map((O, r) => {
33
- const { onChange: m, onClick: V, onPaste: k, onKeyDown: I, ...u } = x(r);
33
+ const { onChange: m, onClick: V, onPaste: k, onKeyDown: I, ...p } = x(r);
34
34
  return /* @__PURE__ */ b(w.Fragment, { children: [
35
35
  /* @__PURE__ */ z(
36
36
  K,
37
37
  {
38
38
  disabled: e.disabled,
39
39
  readOnly: e.readOnly,
40
- className: p(n, `${i}-input`, {
40
+ className: u(n, `${i}-input`, {
41
41
  [`${n}-size-${l}`]: l,
42
42
  [`${n}-${f}`]: f,
43
43
  [`${n}-disabled`]: v,
@@ -46,8 +46,8 @@ function C(g, _) {
46
46
  ref: (t) => {
47
47
  c.current[r] = t == null ? void 0 : t.dom;
48
48
  },
49
- ...u,
50
- key: u.key,
49
+ ...p,
50
+ key: p.key,
51
51
  onClick: e.readOnly ? void 0 : V,
52
52
  onPaste: e.readOnly ? void 0 : k,
53
53
  onKeyDown: e.readOnly ? void 0 : I,
package/version/index.js CHANGED
@@ -1,4 +1,4 @@
1
- const I = "2025-04-08 13:24:33", t = "1744089873940", E = "2.66.0";
1
+ const I = "2025-04-14 15:51:30", t = "1744617090178", E = "2.66.0";
2
2
  export {
3
3
  E as VERSION,
4
4
  I as VERSION_BUILD_DATE,
@@ -1,9 +1,9 @@
1
1
  import { jsx as l } from "react/jsx-runtime";
2
2
  import { forwardRef as g, useContext as u, useRef as p, useCallback as d, useEffect as C } from "react";
3
- import { a as h } from "../chunk/Byd0ztYY.js";
3
+ import { a as h } from "../chunk/C9XYyypq.js";
4
4
  import { useWatermark as x } from "../hooks/useWatermark.js";
5
5
  import { u as k } from "../chunk/BFTV6myl.js";
6
- import { m as w } from "../chunk/JPPo5nY_.js";
6
+ import { p as w } from "../chunk/CUFsOxJ2.js";
7
7
  const y = {}, N = [
8
8
  "zIndex",
9
9
  "width",
@@ -16,21 +16,21 @@ const y = {}, N = [
16
16
  "offset",
17
17
  "getContainer"
18
18
  ];
19
- function O(m, S) {
19
+ function O(c, S) {
20
20
  var f;
21
21
  const r = u(h), t = k(
22
- m,
22
+ c,
23
23
  y,
24
24
  (f = r.componentConfig) == null ? void 0 : f.Watermark
25
25
  ), n = p(), o = d(() => {
26
26
  var e;
27
27
  return n.current || ((e = t.getContainer) == null ? void 0 : e.call(t));
28
- }, [n.current, t.getContainer]), i = N.reduce((e, a) => (a in t && (e[a] = t[a]), e), {}), { setWatermark: c } = x({
28
+ }, [n.current, t.getContainer]), i = N.reduce((e, a) => (a in t && (e[a] = t[a]), e), {}), { setWatermark: m } = x({
29
29
  ...i,
30
30
  getContainer: o
31
31
  });
32
32
  C(() => {
33
- c({
33
+ m({
34
34
  ...i,
35
35
  getContainer: o
36
36
  });
package/chunk/B0UZ1Ee2.js DELETED
@@ -1,257 +0,0 @@
1
- import { jsxs as w, jsx as r } from "react/jsx-runtime";
2
- import U from "@unicom-cloud/icons/IconUiCaretLeft";
3
- import L from "@unicom-cloud/icons/IconUiCaretRight";
4
- import V from "lodash/isFunction";
5
- import M, { useContext as K, useRef as A, createContext as B } from "react";
6
- import { a as T, I as S } from "./Byd0ztYY.js";
7
- import { u as q } from "./BFTV6myl.js";
8
- import { u as D } from "./DeV0v__J.js";
9
- import { m } from "./JPPo5nY_.js";
10
- import { o as G } from "./BKKEev13.js";
11
- import { u as J } from "./Cj2SQJiO.js";
12
- import { u as Q } from "./XTEsYGuF.js";
13
- import { off as W, on as X } from "../utils/dom.js";
14
- function Y(f, u) {
15
- var I;
16
- const { getPrefixCls: g } = K(T), o = K(j), $ = Q(), {
17
- children: s,
18
- name: a,
19
- header: H,
20
- className: E,
21
- style: b,
22
- contentStyle: N,
23
- extra: y,
24
- disabled: c,
25
- destroyOnHide: v,
26
- expandIcon: C,
27
- showExpandIcon: P = !0,
28
- ...R
29
- } = f, i = A(null), p = A(null), n = g("collapse-item"), d = ((I = o.activeKeys) == null ? void 0 : I.indexOf(a)) > -1, x = P ? "expandIcon" in f ? C : o.expandIcon : null, h = (e, t) => {
30
- var O;
31
- if (c)
32
- return;
33
- const { triggerRegion: l } = o;
34
- (t === (l === "icon" ? 0 : l === "header" ? 1 : 2) || // When triggerRegion is set to header, clicking icon should trigger onChange as well
35
- l === "header" && [0, 1].includes(t)) && ((O = o.onToggle) == null || O.call(o, a, e));
36
- };
37
- return /* @__PURE__ */ w(
38
- "div",
39
- {
40
- ref: u,
41
- ...R,
42
- className: m(
43
- n,
44
- {
45
- [`${n}-active`]: d,
46
- [`${n}-no-icon`]: !x,
47
- [`${n}-disabled`]: c
48
- },
49
- E
50
- ),
51
- style: b,
52
- children: [
53
- /* @__PURE__ */ w(
54
- "div",
55
- {
56
- role: "button",
57
- "aria-disabled": c,
58
- "aria-expanded": d,
59
- "data-active-region": o.triggerRegion,
60
- tabIndex: c ? -1 : 0,
61
- className: m(
62
- `${n}-header`,
63
- `${n}-header-${o.expandIconPosition}`,
64
- {
65
- [`${n}-header-disabled`]: c
66
- }
67
- ),
68
- onClick: (e) => h(e, 2),
69
- ...$({
70
- onPressEnter: (e) => {
71
- !c && o.onToggle(a, e);
72
- }
73
- }),
74
- children: [
75
- x && /* @__PURE__ */ r(
76
- S,
77
- {
78
- prefix: n,
79
- disabled: c,
80
- className: m({
81
- [`${n}-icon-hover-right`]: o.expandIconPosition === "right",
82
- [`${n}-header-icon-right`]: o.expandIconPosition === "right"
83
- }),
84
- onClick: (e) => h(e, 0),
85
- children: /* @__PURE__ */ r(
86
- "span",
87
- {
88
- className: m(`${n}-header-icon`, {
89
- [`${n}-header-icon-down`]: d
90
- }),
91
- children: x
92
- }
93
- )
94
- }
95
- ),
96
- /* @__PURE__ */ r(
97
- "div",
98
- {
99
- className: `${n}-header-title`,
100
- onClick: (e) => h(e, 1),
101
- children: H
102
- }
103
- ),
104
- y && /* @__PURE__ */ r(
105
- "div",
106
- {
107
- className: `${n}-header-extra`,
108
- onClick: (e) => {
109
- e.stopPropagation();
110
- },
111
- children: y
112
- }
113
- )
114
- ]
115
- }
116
- ),
117
- /* @__PURE__ */ r(
118
- J,
119
- {
120
- nodeRef: i,
121
- in: d,
122
- addEndListener: (e) => {
123
- W(i.current, "transitionend", e), X(i.current, "transitionend", e);
124
- },
125
- mountOnEnter: "destroyOnHide" in f ? v : o.destroyOnHide || o.lazyload,
126
- unmountOnExit: "destroyOnHide" in f ? v : o.destroyOnHide,
127
- onEnter: (e) => {
128
- const t = i.current;
129
- t.style.height = "0", t.style.display = "block";
130
- },
131
- onEntering: (e) => {
132
- const t = i.current, l = p.current;
133
- t.style.height = `${Math.max(t.scrollHeight, l.scrollHeight)}px`;
134
- },
135
- onEntered: (e) => {
136
- const t = i.current;
137
- t.style.height = "auto";
138
- },
139
- onExit: (e) => {
140
- const t = i.current, l = p.current;
141
- t.offsetHeight, l.offsetHeight, t.style.display = "block", t.style.height = `${t.offsetHeight}px`, t.style.height = `${Math.max(t.offsetHeight, l.offsetHeight)}px`, t.offsetHeight, l.offsetHeight;
142
- },
143
- onExiting: (e) => {
144
- const t = i.current;
145
- t.style.height = "0";
146
- },
147
- onExited: (e) => {
148
- const t = i.current;
149
- t.style.display = "none", t.style.height = "auto";
150
- },
151
- children: /* @__PURE__ */ r(
152
- "div",
153
- {
154
- ref: i,
155
- role: "region",
156
- className: m(`${n}-content`, {
157
- [`${n}-content-expanded`]: d
158
- }),
159
- children: /* @__PURE__ */ r(
160
- "div",
161
- {
162
- ref: p,
163
- style: N,
164
- className: `${n}-content-box`,
165
- children: s
166
- }
167
- )
168
- }
169
- )
170
- }
171
- )
172
- ]
173
- }
174
- );
175
- }
176
- const z = M.forwardRef(
177
- Y
178
- );
179
- z.displayName = "CollapseItem";
180
- const k = (f, u) => {
181
- const g = [].concat(f);
182
- return u ? g.slice(0, 1) : g;
183
- }, Z = {
184
- bordered: !0,
185
- lazyload: !0,
186
- expandIconPosition: "left"
187
- }, j = B({
188
- expandIconPosition: "left",
189
- expandIcon: /* @__PURE__ */ r(L, {}),
190
- activeKeys: [],
191
- onToggle: () => {
192
- }
193
- });
194
- function _(f, u) {
195
- const { getPrefixCls: g, componentConfig: o, rtl: $ } = K(T), s = q(
196
- f,
197
- Z,
198
- o == null ? void 0 : o.Collapse
199
- ), [a, H] = D([], {
200
- defaultValue: "defaultActiveKey" in s ? k(s.defaultActiveKey, s.accordion) : void 0,
201
- value: "activeKey" in s ? k(s.activeKey, s.accordion) : void 0
202
- }), {
203
- children: E,
204
- className: b,
205
- style: N,
206
- bordered: y,
207
- lazyload: c,
208
- expandIcon: v,
209
- expandIconPosition: C,
210
- destroyOnHide: P,
211
- accordion: R,
212
- triggerRegion: i,
213
- onChange: p,
214
- ...n
215
- } = s, d = g("collapse"), x = (h, I) => {
216
- let e = [...a || []];
217
- const t = a == null ? void 0 : a.indexOf(h);
218
- t > -1 ? e.splice(t, 1) : R ? e = [h] : e.push(h), "activeKey" in s || H(e), V(p) && p(h, e, I);
219
- };
220
- return /* @__PURE__ */ r(
221
- j.Provider,
222
- {
223
- value: {
224
- activeKeys: a,
225
- triggerRegion: i,
226
- lazyload: c,
227
- destroyOnHide: P,
228
- expandIconPosition: C,
229
- onToggle: x,
230
- expandIcon: "expandIcon" in s ? v : C === "right" ? /* @__PURE__ */ r(U, {}) : /* @__PURE__ */ r(L, {})
231
- },
232
- children: /* @__PURE__ */ r(
233
- "div",
234
- {
235
- ref: u,
236
- ...G(n, ["activeKey", "defaultActiveKey"]),
237
- className: m(
238
- d,
239
- `${d}-${y ? "border" : "borderless"}`,
240
- { [`${d}-rtl`]: $ },
241
- b
242
- ),
243
- style: N,
244
- children: E
245
- }
246
- )
247
- }
248
- );
249
- }
250
- const ee = M.forwardRef(_), F = ee;
251
- F.displayName = "Collapse";
252
- F.Item = z;
253
- export {
254
- F as C,
255
- z as I,
256
- j as a
257
- };