@unicom-cloud/ui 0.8.98 → 0.8.100

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 (180) hide show
  1. package/Anchor.js +3 -1
  2. package/Badge.js +54 -7
  3. package/Copy.js +49 -2
  4. package/Flex.js +12 -0
  5. package/Grid.js +1 -1
  6. package/LiquidFill.js +60 -2
  7. package/Marquee.js +62 -0
  8. package/QrCode.js +14 -9
  9. package/Segmented.js +11 -0
  10. package/Space.js +14 -6
  11. package/Splitter.js +6 -0
  12. package/Tag.js +3 -2
  13. package/Tour.js +14 -9
  14. package/alert/index.js +38 -39
  15. package/anchor/index.js +5 -3
  16. package/badge/index.js +174 -80
  17. package/collapse/Collapse.js +54 -48
  18. package/components/common/space/index.js +90 -106
  19. package/copy/index.js +83 -35
  20. package/flex/index.js +59 -0
  21. package/flex/interface.js +34 -0
  22. package/flex/utils.js +13 -0
  23. package/grid/{GridItem.js → Item.js} +15 -15
  24. package/grid/index.js +1 -1
  25. package/index.js +490 -477
  26. package/input/Button.js +39 -34
  27. package/input/Textarea.js +108 -104
  28. package/liquid-fill/index.js +256 -2
  29. package/marquee/index.js +283 -0
  30. package/menu/Item.js +17 -16
  31. package/package.json +1 -1
  32. package/qr-code/index.js +54 -36
  33. package/rate/index.js +8 -8
  34. package/segmented/index.js +225 -0
  35. package/space/index.js +28 -29
  36. package/spin/index.js +75 -62
  37. package/splitter/Panel.js +39 -0
  38. package/splitter/SplitBar.js +157 -0
  39. package/splitter/Splitter.js +139 -0
  40. package/splitter/hooks/useEvent.js +12 -0
  41. package/splitter/hooks/useItems.js +26 -0
  42. package/splitter/hooks/useResizable.js +26 -0
  43. package/splitter/hooks/useResize.js +68 -0
  44. package/splitter/hooks/useSizes.js +60 -0
  45. package/splitter/index.js +7 -0
  46. package/splitter/interface.js +1 -0
  47. package/style.css +1 -1
  48. package/table/Table.js +1 -1
  49. package/table/hook/useThResizable.js +72 -26
  50. package/table/tbody/Td.js +80 -77
  51. package/table/th-resizable/index.js +92 -35
  52. package/tag/index.js +42 -41
  53. package/tooltip/index.js +89 -82
  54. package/tour/index.js +110 -89
  55. package/types/common/hooks/useMergeProps.d.ts +1 -1
  56. package/types/common/space/index.d.ts +7 -5
  57. package/types/common/space/interface.d.ts +29 -16
  58. package/types/pc/affix/interface.d.ts +0 -2
  59. package/types/pc/alert/index.d.ts +2 -2
  60. package/types/pc/anchor/index.d.ts +2 -1
  61. package/types/pc/anchor/interface.d.ts +0 -2
  62. package/types/pc/auto-complete/interface.d.ts +0 -6
  63. package/types/pc/avatar/interface.d.ts +0 -4
  64. package/types/pc/badge/index.d.ts +4 -4
  65. package/types/pc/badge/interface.d.ts +26 -0
  66. package/types/pc/breadcrumb/interface.d.ts +0 -3
  67. package/types/pc/carousel/interface.d.ts +2 -6
  68. package/types/pc/cascader/interface.d.ts +6 -18
  69. package/types/pc/checkbox/interface.d.ts +0 -1
  70. package/types/pc/collapse/interface.d.ts +4 -2
  71. package/types/pc/color-picker/interface.d.ts +0 -2
  72. package/types/pc/config-provider/interface.d.ts +16 -14
  73. package/types/pc/copy/interface.d.ts +2 -1
  74. package/types/pc/date-picker/RangePicker.d.ts +1 -1
  75. package/types/pc/date-picker/interface.d.ts +0 -17
  76. package/types/pc/descriptions/interface.d.ts +0 -1
  77. package/types/pc/drawer/interface.d.ts +0 -7
  78. package/types/pc/dropdown/interface.d.ts +0 -1
  79. package/types/pc/flex/index.d.ts +9 -0
  80. package/types/pc/flex/interface.d.ts +61 -0
  81. package/types/pc/flex/utils.d.ts +9 -0
  82. package/types/pc/form/interface.d.ts +9 -22
  83. package/types/pc/form/util.d.ts +1 -1
  84. package/types/pc/grid/index.d.ts +3 -3
  85. package/types/pc/grid/interface.d.ts +1 -6
  86. package/types/pc/image/interface.d.ts +0 -13
  87. package/types/pc/index.d.ts +16 -6
  88. package/types/pc/input/Textarea.d.ts +2 -6
  89. package/types/pc/input/interface.d.ts +5 -13
  90. package/types/pc/input-number/interface.d.ts +0 -4
  91. package/types/pc/input-tag/interface.d.ts +0 -13
  92. package/types/pc/layout/interface.d.ts +0 -1
  93. package/types/pc/link/interface.d.ts +0 -1
  94. package/types/pc/liquid-fill/index.d.ts +114 -1
  95. package/types/pc/list/interface.d.ts +0 -4
  96. package/types/pc/marquee/index.d.ts +61 -0
  97. package/types/pc/menu/context.d.ts +1 -1
  98. package/types/pc/menu/interface.d.ts +0 -8
  99. package/types/pc/message/interface.d.ts +0 -2
  100. package/types/pc/modal/interface.d.ts +0 -5
  101. package/types/pc/notification/interface.d.ts +0 -1
  102. package/types/pc/pagination/interface.d.ts +0 -2
  103. package/types/pc/popconfirm/interface.d.ts +8 -10
  104. package/types/pc/popover/interface.d.ts +0 -1
  105. package/types/pc/progress/interface.d.ts +0 -3
  106. package/types/pc/qr-code/index.d.ts +1 -1
  107. package/types/pc/rate/index.d.ts +2 -2
  108. package/types/pc/resize-box/interface.d.ts +1 -7
  109. package/types/pc/segmented/index.d.ts +8 -0
  110. package/types/pc/segmented/interface.d.ts +88 -0
  111. package/types/pc/select/interface.d.ts +0 -12
  112. package/types/pc/select-view/interface.d.ts +0 -7
  113. package/types/pc/slider/interface.d.ts +0 -4
  114. package/types/pc/space/index.d.ts +4 -1
  115. package/types/pc/space/interface.d.ts +6 -10
  116. package/types/pc/spin/interface.d.ts +4 -1
  117. package/types/pc/splitter/Panel.d.ts +8 -0
  118. package/types/pc/splitter/SplitBar.d.ts +21 -0
  119. package/types/pc/splitter/Splitter.d.ts +4 -0
  120. package/types/pc/splitter/hooks/useEvent.d.ts +3 -0
  121. package/types/pc/splitter/hooks/useItems.d.ts +10 -0
  122. package/types/pc/splitter/hooks/useResizable.d.ts +8 -0
  123. package/types/pc/splitter/hooks/useResize.d.ts +4 -0
  124. package/types/pc/splitter/hooks/useSizes.d.ts +5 -0
  125. package/types/pc/splitter/index.d.ts +8 -0
  126. package/types/pc/splitter/interface.d.ts +213 -0
  127. package/types/pc/statistic/interface.d.ts +0 -4
  128. package/types/pc/steps/interface.d.ts +0 -3
  129. package/types/pc/table/hook/useThResizable.d.ts +2 -2
  130. package/types/pc/table/interface.d.ts +4 -15
  131. package/types/pc/tabs/interface.d.ts +0 -7
  132. package/types/pc/tag/index.d.ts +2 -0
  133. package/types/pc/tag/interface.d.ts +0 -1
  134. package/types/pc/time-picker/interface.d.ts +0 -7
  135. package/types/pc/tooltip/interface.d.ts +4 -1
  136. package/types/pc/tour/index.d.ts +6 -1
  137. package/types/pc/transfer/interface.d.ts +2 -9
  138. package/types/pc/tree/interface.d.ts +2 -8
  139. package/types/pc/tree-select/interface.d.ts +0 -8
  140. package/types/pc/trigger/interface.d.ts +0 -5
  141. package/types/pc/typography/EditContent.d.ts +2 -1
  142. package/types/pc/typography/interface.d.ts +45 -30
  143. package/types/pc/upload/interface.d.ts +6 -11
  144. package/types/pc/utils/index.d.ts +1 -0
  145. package/types/pc/utils/names.d.ts +24 -0
  146. package/types/pc/utils/toArray.d.ts +7 -0
  147. package/types/pc/verification-code/interface.d.ts +0 -2
  148. package/types/pc/watermark/interface.d.ts +0 -2
  149. package/typography/Base.js +73 -73
  150. package/typography/EditContent.js +43 -33
  151. package/typography/Ellipsis.js +117 -184
  152. package/typography/Operations.js +97 -49
  153. package/typography/useCssEllipsis.js +7 -6
  154. package/utils/index.js +117 -115
  155. package/utils/names.js +16 -0
  156. package/utils/toArray.js +12 -0
  157. package/version/index.js +1 -1
  158. package/_virtual/_commonjsHelpers.js +0 -6
  159. package/_virtual/index.js +0 -7
  160. package/_virtual/index2.js +0 -4
  161. package/liquid-fill/LiquidFill.js +0 -226
  162. package/liquid-fill/LiquidFill2.js +0 -3
  163. package/space-/index.js +0 -93
  164. package/types/common/utils/color.d.ts +0 -1
  165. package/types/common/utils/computeScrollIntoView.d.ts +0 -1
  166. package/types/common/utils/index.d.ts +0 -45
  167. package/types/common/utils/math.d.ts +0 -1
  168. package/types/common/utils/reactTransitionGroup.d.ts +0 -1
  169. package/types/common/utils/tree.d.ts +0 -1
  170. package/types/common/utils/tween.d.ts +0 -1
  171. package/types/common/utils/uuid.d.ts +0 -1
  172. package/types/common/utils/validate.d.ts +0 -1
  173. package/types/pc/liquid-fill/LiquidFill.d.ts +0 -115
  174. package/types/pc/liquid-fill/LiquidFill2.d.ts +0 -1
  175. package/types/pc/space-/index.d.ts +0 -6
  176. package/types/pc/space-/interface.d.ts +0 -38
  177. /package/{space- → components/common/space}/toArray.js +0 -0
  178. /package/{space- → segmented}/interface.js +0 -0
  179. /package/types/{pc/space- → common/space}/toArray.d.ts +0 -0
  180. /package/types/pc/grid/{GridItem.d.ts → Item.d.ts} +0 -0
package/tour/index.js CHANGED
@@ -1,32 +1,38 @@
1
- import { jsxs as d, Fragment as it, jsx as s } from "react/jsx-runtime";
2
- import nt from "@unicom-cloud/icons/IconUiClose";
3
- import st from "lodash/merge";
4
- import { useContext as lt, useState as C, useRef as F, useEffect as h } from "react";
5
- import { createPortal as pt } from "react-dom";
1
+ import { jsxs as d, Fragment as pt, jsx as s } from "react/jsx-runtime";
2
+ import lt from "@unicom-cloud/icons/IconUiClose";
3
+ import { useContext as ct, useState as C, useRef as F, useEffect as h } from "react";
4
+ import { createPortal as mt } from "react-dom";
6
5
  import D from "../button/index.js";
7
6
  import "../config-provider/ConfigProvider.js";
8
- import ct from "../icon-hover/index.js";
9
- import z from "../space/index.js";
7
+ import "lodash/isEqualWith";
8
+ import "../components/common/utils/is.js";
9
+ import { Escape as at, ArrowRight as ft, ArrowLeft as dt } from "@unicom-cloud/utils/constant/keyboardCode";
10
+ import "lodash/isNumber";
11
+ import "lodash/merge";
12
+ import { on as ht, off as ut } from "../components/common/utils/dom.js";
13
+ import "../components/common/hooks/useIntersectionObserver.js";
14
+ import gt from "../components/common/hooks/useMergeProps.js";
15
+ import "../components/common/utils/reactDOM.js";
16
+ import "@unicom-cloud/utils/constant";
17
+ import "lodash/debounce";
18
+ import wt from "../icon-hover/index.js";
19
+ import R from "../space/index.js";
10
20
  import "@unicom-cloud/utils/case-name";
11
- import k from "@unicom-cloud/utils/class-name";
21
+ import u from "@unicom-cloud/utils/class-name";
12
22
  import "../dist/tinycolor/chunk/BOzCVdr0.js";
13
23
  import "@unicom-cloud/utils/constant/ui";
14
24
  import "../utils/contextHolder.js";
15
25
  import "@unicom-cloud/utils/dayjs";
16
26
  import "@unicom-cloud/utils/clipboard-copy";
17
27
  import "../components/common/utils/dayjs.js";
18
- import { on as mt, off as at } from "../components/common/utils/dom.js";
19
28
  import "@unicom-cloud/utils/file/fileToURL";
20
29
  import "lodash/escapeRegExp";
21
30
  import "lodash/isArray";
22
- import "lodash/isNumber";
23
31
  import "lodash/isString";
24
- import { intersectionObserver as ft } from "../components/common/utils/intersectionObserver.js";
25
- import "../components/common/utils/is.js";
32
+ import { intersectionObserver as vt } from "../components/common/utils/intersectionObserver.js";
26
33
  import "lodash/camelCase";
27
34
  import "lodash/capitalize";
28
35
  import "lodash/cloneDeep";
29
- import "lodash/debounce";
30
36
  import "lodash/get";
31
37
  import "lodash/has";
32
38
  import "lodash/kebabCase";
@@ -40,77 +46,92 @@ import "lodash/uniq";
40
46
  import "lodash/upperFirst";
41
47
  import "@unicom-cloud/utils/math";
42
48
  import "lodash/isPlainObject";
43
- import { mutationObserver as dt } from "../components/common/utils/mutationObserver.js";
49
+ import { mutationObserver as bt } from "../components/common/utils/mutationObserver.js";
44
50
  import "../dist/react-transition-group/src/CSSTransition.js";
45
51
  import "../dist/react-transition-group/src/ReplaceTransition.js";
46
52
  import "../dist/react-transition-group/src/SwitchTransition.js";
47
53
  import "../dist/react-transition-group/chunk/CPfP7aNL.js";
48
54
  import "../dist/react-transition-group/src/TransitionGroup.js";
49
- import "../components/common/utils/reactDOM.js";
50
- import { resizeObserver as ht } from "../components/common/utils/resizeObserver.js";
55
+ import { resizeObserver as yt } from "../components/common/utils/resizeObserver.js";
51
56
  import "@unicom-cloud/utils/file/saveAs";
52
57
  import "@unicom-cloud/utils/screenfull";
53
58
  import "@unicom-cloud/utils/constant/ui.js";
59
+ import "react-is";
54
60
  import "@unicom-cloud/utils/tree";
55
61
  import "@unicom-cloud/utils/is";
56
62
  import "uuid";
57
63
  import "../dist/validate/src/index.js";
58
- import { Escape as ut, ArrowRight as gt, ArrowLeft as wt } from "@unicom-cloud/utils/constant/keyboardCode";
59
- import vt from "../config-provider/context.js";
60
- function Pe(L) {
61
- const { getPrefixCls: X, componentConfig: Y, rtl: bt } = lt(vt);
62
- let {
63
- steps: n = [],
64
- open: N = !1,
65
- onClose: K,
66
- mask: U = !0,
67
- maskClosable: _ = !0,
68
- type: u = "default",
69
- placement: g = "bottom",
70
- arrow: G = !0,
71
- closable: J = !0,
72
- zIndex: P = 1e3,
73
- current: S = 0,
74
- onFinish: Q,
64
+ import $t from "../config-provider/context.js";
65
+ const xt = {
66
+ steps: [],
67
+ open: !1,
68
+ mask: !0,
69
+ maskClosable: !0,
70
+ type: "default",
71
+ placement: "bottom",
72
+ arrow: !0,
73
+ closable: !0,
74
+ zIndex: 1e3,
75
+ current: 0
76
+ };
77
+ function Me(L) {
78
+ const { getPrefixCls: X, componentConfig: Y, rtl: kt } = ct($t), K = gt(
79
+ L,
80
+ xt,
81
+ Y?.Tour
82
+ ), {
83
+ style: U,
84
+ className: _,
85
+ steps: n,
86
+ open: N,
87
+ onClose: G,
88
+ mask: J,
89
+ maskClosable: Q,
90
+ type: g,
91
+ placement: w,
92
+ arrow: V,
93
+ closable: Z,
94
+ zIndex: P,
95
+ current: S,
96
+ onFinish: tt,
75
97
  onStepChange: O,
76
- ...yt
77
- } = st({}, Y?.Tour, L);
78
- const o = X?.("tour"), [r, H] = C(S), [e, j] = C(null), [W, V] = C(g), [f, I] = C(N), E = F(null), c = F(null), M = `0 0 0 ${Math.max(window.innerWidth, window.innerHeight)}px var(--pqb-mask-bg-color),0 0 15px 0 var(--pqb-mask-bg-color)`, l = typeof n[r]?.target == "string" ? document.querySelector(n[r].target) : n[r]?.target, w = () => {
98
+ ...Ct
99
+ } = K, o = X?.("tour"), [r, H] = C(S), [e, j] = C(null), [W, et] = C(w), [f, I] = C(N), M = F(null), c = F(null), E = `0 0 0 ${Math.max(window.innerWidth, window.innerHeight)}px var(--pqb-mask-bg-color),0 0 15px 0 var(--pqb-mask-bg-color)`, p = typeof n[r]?.target == "string" ? document.querySelector(n[r].target) : n[r]?.target, v = () => {
79
100
  let t;
80
- if (l ? t = l.getBoundingClientRect() : t = new DOMRect(
101
+ if (p ? t = p.getBoundingClientRect() : t = new DOMRect(
81
102
  window.innerWidth / 2 - (c.current?.offsetWidth ?? 0) / 2,
82
103
  window.innerHeight / 2 - (c.current?.offsetHeight ?? 0) / 2,
83
104
  c.current?.offsetWidth,
84
105
  c.current?.offsetHeight
85
- ), j(t), l) {
106
+ ), j(t), p) {
86
107
  const i = c.current;
87
- if (!i) return g;
88
- const m = i.offsetWidth, a = i.offsetHeight, v = 10, b = t.top - a - v > 0, y = t.bottom + a + v < window.innerHeight, $ = t.left - m - v > 0, x = t.right + m + v < window.innerWidth;
89
- let p = n[r]?.placement || g;
90
- return p === "top" && !b ? p = y ? "bottom" : $ ? "left" : x ? "right" : "bottom" : p === "bottom" && !y ? p = b ? "top" : $ ? "left" : x ? "right" : "top" : p === "left" && !$ ? p = x ? "right" : b ? "top" : y ? "bottom" : "right" : p === "right" && !x && (p = $ ? "left" : b ? "top" : y ? "bottom" : "left"), V(p), p;
108
+ if (!i) return w;
109
+ const m = i.offsetWidth, a = i.offsetHeight, b = 10, y = t.top - a - b > 0, $ = t.bottom + a + b < window.innerHeight, x = t.left - m - b > 0, k = t.right + m + b < window.innerWidth;
110
+ let l = n[r]?.placement || w;
111
+ return l === "top" && !y ? l = $ ? "bottom" : x ? "left" : k ? "right" : "bottom" : l === "bottom" && !$ ? l = y ? "top" : x ? "left" : k ? "right" : "top" : l === "left" && !x ? l = k ? "right" : y ? "top" : $ ? "bottom" : "right" : l === "right" && !k && (l = x ? "left" : y ? "top" : $ ? "bottom" : "left"), et(l), l;
91
112
  }
92
- return g;
93
- }, R = () => {
94
- I(!1), K?.();
113
+ return w;
114
+ }, z = () => {
115
+ I(!1), G?.();
95
116
  }, T = () => {
96
117
  if (r < n.length - 1) {
97
118
  const t = r + 1;
98
119
  H(t), O?.(t);
99
120
  } else
100
- Z();
121
+ ot();
101
122
  }, q = () => {
102
123
  if (r > 0) {
103
124
  const t = r - 1;
104
125
  H(t), O?.(t);
105
126
  }
106
- }, Z = () => {
107
- I(!1), Q?.();
108
- }, tt = (t) => {
109
- _ && t.target === E.current && R();
110
- }, et = () => {
127
+ }, ot = () => {
128
+ I(!1), tt?.();
129
+ }, rt = (t) => {
130
+ Q && t.target === M.current && z();
131
+ }, it = () => {
111
132
  if (!e || !c.current)
112
133
  return { top: 0, left: 0 };
113
- if (!l) return {
134
+ if (!p) return {
114
135
  top: e.top,
115
136
  left: e.left
116
137
  };
@@ -152,37 +173,37 @@ function Pe(L) {
152
173
  j(null);
153
174
  return;
154
175
  }
155
- w();
156
- }, [f, r, n.length, l]), h(() => {
176
+ v();
177
+ }, [f, r, n.length, p]), h(() => {
157
178
  function t(i) {
158
- f && (i.key === ut.key ? R() : i.key === gt.key ? T() : i.key === wt.key && q());
179
+ f && (i.key === at.key ? z() : i.key === ft.key ? T() : i.key === dt.key && q());
159
180
  }
160
- return mt(window, "keydown", t), () => {
161
- at(window, "keydown", t);
181
+ return ht(window, "keydown", t), () => {
182
+ ut(window, "keydown", t);
162
183
  };
163
184
  }, [f, r, n.length]), h(() => {
164
- const t = ht([document.body, l], () => {
165
- w();
166
- }), i = ft([l], () => {
167
- w();
168
- }), m = dt([l], () => {
169
- w();
185
+ const t = yt([document.body, p], () => {
186
+ v();
187
+ }), i = vt([p], () => {
188
+ v();
189
+ }), m = bt([p], () => {
190
+ v();
170
191
  });
171
192
  return () => {
172
193
  t(), i(), m();
173
194
  };
174
- }, [l]), !f || !n.length || r >= n.length)
195
+ }, [p]), !f || !n.length || r >= n.length)
175
196
  return null;
176
- const A = n[r], ot = r > 0, rt = r < n.length - 1, B = et();
177
- return pt(
178
- /* @__PURE__ */ d(it, { children: [
197
+ const A = n[r], nt = r > 0, st = r < n.length - 1, B = it();
198
+ return mt(
199
+ /* @__PURE__ */ d(pt, { children: [
179
200
  /* @__PURE__ */ s(
180
201
  "div",
181
202
  {
182
- ref: E,
183
- className: `${o}-mask`,
184
- style: { zIndex: P },
185
- onClick: tt
203
+ ref: M,
204
+ className: u(`${o}-mask`, _),
205
+ style: { ...U, zIndex: P },
206
+ onClick: rt
186
207
  }
187
208
  ),
188
209
  e && /* @__PURE__ */ s(
@@ -197,7 +218,7 @@ function Pe(L) {
197
218
  height: e.height,
198
219
  zIndex: P + 1,
199
220
  pointerEvents: "none",
200
- boxShadow: U ? M : void 0
221
+ boxShadow: J ? E : void 0
201
222
  }
202
223
  }
203
224
  ),
@@ -205,9 +226,9 @@ function Pe(L) {
205
226
  "div",
206
227
  {
207
228
  ref: c,
208
- className: k(
229
+ className: u(
209
230
  `${o}-popover`,
210
- `${o}-popover-${u}`,
231
+ `${o}-popover-${g}`,
211
232
  `${o}-popover-${W}`
212
233
  ),
213
234
  style: {
@@ -215,46 +236,46 @@ function Pe(L) {
215
236
  top: `${B.top + window.scrollY}px`,
216
237
  left: `${B.left + window.scrollX}px`,
217
238
  zIndex: P + 2,
218
- boxShadow: l ? void 0 : M
239
+ boxShadow: p ? void 0 : E
219
240
  },
220
241
  children: [
221
- G && l && /* @__PURE__ */ s(
242
+ V && p && /* @__PURE__ */ s(
222
243
  "div",
223
244
  {
224
- className: k(
245
+ className: u(
225
246
  `${o}-arrow`,
226
247
  `${o}-arrow-${W}`
227
248
  )
228
249
  }
229
250
  ),
230
251
  /* @__PURE__ */ d("div", { className: `${o}-content`, children: [
231
- J && /* @__PURE__ */ s(ct, { className: `${o}-close`, onClick: R, children: /* @__PURE__ */ s(nt, {}) }),
252
+ Z && /* @__PURE__ */ s(wt, { className: `${o}-close`, onClick: z, children: /* @__PURE__ */ s(lt, {}) }),
232
253
  /* @__PURE__ */ s("div", { className: `${o}-header`, children: /* @__PURE__ */ s("div", { className: `${o}-title`, children: A.title }) }),
233
254
  /* @__PURE__ */ s("div", { className: `${o}-body`, children: /* @__PURE__ */ s("div", { className: `${o}-description`, children: A.description }) }),
234
255
  /* @__PURE__ */ d(
235
- z,
256
+ R,
236
257
  {
237
258
  className: `${o}-footer`,
238
259
  justifyContent: "space-between",
239
260
  alignItems: "center",
240
261
  children: [
241
- /* @__PURE__ */ s(z, { className: `${o}-indicator`, children: n.map((t, i) => /* @__PURE__ */ s(
262
+ /* @__PURE__ */ s(R, { className: `${o}-indicator`, children: n.map((t, i) => /* @__PURE__ */ s(
242
263
  "div",
243
264
  {
244
- className: k(
265
+ className: u(
245
266
  `${o}-dot`,
246
267
  i === r && `${o}-dot-active`
247
268
  )
248
269
  },
249
270
  i
250
271
  )) }),
251
- /* @__PURE__ */ d(z, { children: [
252
- ot && /* @__PURE__ */ s(
272
+ /* @__PURE__ */ d(R, { children: [
273
+ nt && /* @__PURE__ */ s(
253
274
  D,
254
275
  {
255
276
  className: `${o}-prev-btn`,
256
277
  size: "mini",
257
- type: u === "primary" ? "secondary" : "primary",
278
+ type: g === "primary" ? "secondary" : "primary",
258
279
  onClick: q,
259
280
  children: "上一步"
260
281
  }
@@ -262,14 +283,14 @@ function Pe(L) {
262
283
  /* @__PURE__ */ s(
263
284
  D,
264
285
  {
265
- className: k(
286
+ className: u(
266
287
  `${o}-next-btn`,
267
- `${o}-next-btn-${u}`
288
+ `${o}-next-btn-${g}`
268
289
  ),
269
290
  size: "mini",
270
- type: u === "primary" ? "primary" : "secondary",
291
+ type: g === "primary" ? "primary" : "secondary",
271
292
  onClick: T,
272
- children: rt ? "下一步" : "完成"
293
+ children: st ? "下一步" : "完成"
273
294
  }
274
295
  )
275
296
  ] })
@@ -285,5 +306,5 @@ function Pe(L) {
285
306
  );
286
307
  }
287
308
  export {
288
- Pe as default
309
+ Me as default
289
310
  };
@@ -1,5 +1,5 @@
1
1
  export interface MergePropsOptions {
2
2
  _ignorePropsFromGlobal?: boolean;
3
3
  }
4
- declare function useMergeProps<PropsType>(componentProps: PropsType & MergePropsOptions, defaultProps: Partial<PropsType>, globalComponentConfig?: Partial<PropsType> | undefined): PropsType;
4
+ declare function useMergeProps<PropsType extends Record<string, any>>(componentProps: PropsType & MergePropsOptions, defaultProps: Partial<PropsType>, globalComponentConfig?: Partial<PropsType> | undefined): PropsType;
5
5
  export default useMergeProps;
@@ -1,7 +1,9 @@
1
- import { RefAttributes } from 'react';
2
- import { JSX } from 'react/jsx-dev-runtime';
3
- import type { SpaceProps } from './interface';
4
- declare const Space: import("react").ForwardRefExoticComponent<SpaceProps & RefAttributes<HTMLDivElement>>;
5
- declare const SpaceVertical: import("react").ForwardRefExoticComponent<Omit<JSX.IntrinsicAttributes & SpaceProps & RefAttributes<HTMLDivElement>, "ref"> & RefAttributes<HTMLDivElement>>;
1
+ import React from 'react';
2
+ import { SpaceGap, SpaceProps } from './interface';
3
+ declare const Space: React.ForwardRefExoticComponent<SpaceProps & React.RefAttributes<unknown>> & {
4
+ Vertical: typeof SpaceVertical;
5
+ };
6
+ declare const SpaceVertical: React.ForwardRefExoticComponent<SpaceProps & React.RefAttributes<unknown>>;
6
7
  export { SpaceVertical };
7
8
  export default Space;
9
+ export type { SpaceGap, SpaceProps };
@@ -1,5 +1,6 @@
1
1
  import { CSSProperties, ReactNode } from 'react';
2
2
  export type SpaceGap = 'mini' | 'small' | 'medium' | 'large' | number;
3
+ export type AlignItemsProps = 'start' | 'end' | 'center' | 'baseline';
3
4
  /**
4
5
  * @title Space
5
6
  */
@@ -7,20 +8,34 @@ export interface SpaceProps {
7
8
  style?: CSSProperties;
8
9
  className?: string | string[];
9
10
  /**
10
- * @zh 布局是否为内联
11
+ * @zh 交叉轴方向对齐方式
12
+ * @en Alignment of items
13
+ */
14
+ align?: AlignItemsProps;
15
+ /**
16
+ * @zh 属性 align 的别名
11
17
  */
12
- inline?: boolean;
18
+ alignItems?: AlignItemsProps;
13
19
  /**
14
- * @zh 间距方向
15
- * @en The space direction
20
+ * @zh 主轴方向上对齐方式
21
+ * @en Alignment of items
22
+ */
23
+ justifyContent?: 'start' | 'end' | 'center' | 'baseline' | 'space-between';
24
+ /**
25
+ * @zh 方向
26
+ * @en The direction
16
27
  * @defaultValue horizontal
17
28
  */
18
29
  direction?: 'vertical' | 'horizontal';
19
30
  /**
20
- * @zh 间距。
21
- * @en The space gap.
31
+ * @zh 尺寸。
32
+ * @en The space size.
22
33
  * @defaultValue small
23
34
  */
35
+ size?: SpaceGap | SpaceGap[];
36
+ /**
37
+ * @zh 属性 size 的别名
38
+ */
24
39
  gap?: SpaceGap | SpaceGap[];
25
40
  /**
26
41
  * @zh 环绕类型的间距,用于折行的场景。
@@ -28,19 +43,17 @@ export interface SpaceProps {
28
43
  */
29
44
  wrap?: boolean;
30
45
  /**
31
- * @zh 主轴方向上对齐方式
32
- * @en Alignment of items
46
+ * @zh 设置分隔符
47
+ * @en Set separator
33
48
  */
34
- justifyContent?: 'start' | 'end' | 'center' | 'baseline' | 'space-between';
49
+ split?: ReactNode;
35
50
  /**
36
- * @zh 交叉轴方向对齐方式
37
- * @en Alignment of items
38
- * @defaultValue direction === 'horizontal' 时默认值为 'center';
51
+ * @zh 包裹元素
39
52
  */
40
- alignItems?: 'start' | 'end' | 'center' | 'baseline';
53
+ children?: ReactNode;
41
54
  /**
42
- * @zh 设置分隔符
43
- * @en Set separator
55
+ * @zh 是否启用RTL模式
56
+ * @en Whether to enable RTL mode
44
57
  */
45
- children?: ReactNode;
58
+ rtl?: boolean;
46
59
  }
@@ -8,14 +8,12 @@ export interface AffixProps {
8
8
  /**
9
9
  * @zh 给 `fixed` 的元素设置 className。
10
10
  * @en ClassName of the fixed element.
11
- * @version 2.8.0
12
11
  */
13
12
  affixClassName?: string | string[];
14
13
  /**
15
14
  * @zh
16
15
  * 给 `fixed` 的元素设置 style,注意不要设置 `position` `top` `width` `height`, 因为这几个属性是在元素 fixed 时候用于定位的。
17
16
  * @en Style of the fixed elements. Don't set `position` `top` `width` `height` attributes as they are used for positioning when the element is fixed.
18
- * @version 2.8.0
19
17
  */
20
18
  affixStyle?: CSSProperties;
21
19
  /**
@@ -1,4 +1,4 @@
1
1
  import { AlertProps } from './interface';
2
- declare const AlertComponent: import("react").ForwardRefExoticComponent<AlertProps & import("react").RefAttributes<unknown>>;
3
- export default AlertComponent;
2
+ declare const Alert: import("react").ForwardRefExoticComponent<AlertProps & import("react").RefAttributes<unknown>>;
3
+ export default Alert;
4
4
  export type { AlertProps };
@@ -1,4 +1,5 @@
1
1
  import Anchor, { AnchorLink } from './Anchor';
2
- export { AnchorLink };
2
+ import { findNode } from './util';
3
+ export { AnchorLink, findNode as findAnchorLinkNode };
3
4
  export default Anchor;
4
5
  export type { AnchorProps } from './interface';
@@ -15,7 +15,6 @@ export interface AnchorProps {
15
15
  * @zh 方向
16
16
  * @en Direction
17
17
  * @defaultValue vertical
18
- * @version 2.51.0
19
18
  */
20
19
  direction?: 'vertical' | 'horizontal';
21
20
  /**
@@ -77,7 +76,6 @@ export interface AnchorProps {
77
76
  */
78
77
  lineless?: boolean;
79
78
  /**
80
- * @version 2.22.0
81
79
  * @zh 容器中基准线的位置相对容器顶部的偏移量,在没有设置的时候,取值为滚动容器高度的一半。当锚点到达或离开基准线的时候会更新锚点的状态。
82
80
  * @en The offset of the baseline relative to the top of the container.
83
81
  * The value is half of the height of the scrolling container if not specified.
@@ -57,7 +57,6 @@ export interface AutoCompleteProps extends PartialSelectProps {
57
57
  /**
58
58
  * @zh 状态
59
59
  * @en Status
60
- * @version 2.45.0
61
60
  */
62
61
  status?: 'error' | 'warning';
63
62
  /**
@@ -68,14 +67,12 @@ export interface AutoCompleteProps extends PartialSelectProps {
68
67
  /**
69
68
  * @zh 是否处于加载状态。
70
69
  * @en Whether the component is loading data.
71
- * @version 2.10.0
72
70
  */
73
71
  loading?: boolean;
74
72
  /**
75
73
  * @zh 自定义触发元素
76
74
  * @en Custom trigger element
77
75
  * @defaultValue <Input />
78
- * @version `() => ReactElement` in 2.31.0
79
76
  */
80
77
  triggerElement?: ReactElement | (({ value }: {
81
78
  value: any;
@@ -98,7 +95,6 @@ export interface AutoCompleteProps extends PartialSelectProps {
98
95
  /**
99
96
  * @zh 按下回车键的回调
100
97
  * @en Callback when Enter is pressed
101
- * @version `activeOption` in 2.25.1
102
98
  */
103
99
  onPressEnter?: (e: any, activeOption?: OptionInfo) => void;
104
100
  /**
@@ -114,13 +110,11 @@ export interface AutoCompleteProps extends PartialSelectProps {
114
110
  /**
115
111
  * @zh 传递虚拟滚动属性。
116
112
  * @en Virtual scroll properties.
117
- * @version 2.2.0
118
113
  */
119
114
  virtualListProps?: AvailableVirtualListProps;
120
115
  /**
121
116
  * @zh 传递 Input 组件的属性。
122
117
  * @en Properties of Input component.
123
- * @version 2.10.0
124
118
  */
125
119
  inputProps?: Partial<InputProps>;
126
120
  }
@@ -71,25 +71,21 @@ export interface AvatarGroupProps {
71
71
  /**
72
72
  * @zh 头像组内的头像 `z-index` 递增,默认是递减。
73
73
  * @en Whether `z-index` of the avatars in group are in ascending order. The default is in descending order.
74
- * @version 2.3.0
75
74
  */
76
75
  zIndexAscend?: boolean;
77
76
  /**
78
77
  * @zh 头像组最多显示的头像数量,多余头像将以 `+x` 的形式展示。
79
78
  * @en The maximum number of avatars displayed in the avatar group. The rest of avatars will be displayed as a `+x`.
80
- * @version 2.4.0
81
79
  */
82
80
  maxCount?: number;
83
81
  /**
84
82
  * @zh 多余头像样式。
85
83
  * @en Style for `+x`.
86
- * @version 2.4.0
87
84
  */
88
85
  maxStyle?: CSSProperties;
89
86
  /**
90
87
  * @zh 多余头像气泡的 `TriggerProps`。
91
88
  * @en `TriggerProps` for popover around `+x`.
92
- * @version 2.4.0
93
89
  */
94
90
  maxPopoverTriggerProps?: TriggerProps;
95
91
  }
@@ -1,8 +1,8 @@
1
1
  import Count from './Count';
2
2
  import { BadgeProps } from './interface';
3
- declare const BadgeComponent: import("react").ForwardRefExoticComponent<BadgeProps & import("react").RefAttributes<unknown>>;
4
- declare const BADGE_COLORS: string[];
5
- declare const BADGE_STATUS: string[];
3
+ declare const Badge: import("react").ForwardRefExoticComponent<BadgeProps & import("react").RefAttributes<unknown>>;
4
+ declare const BADGE_COLORS: readonly ["red", "orangered", "orange", "gold", "lime", "green", "cyan", "primary", "purple", "magenta", "gray"];
5
+ declare const BADGE_STATUS: readonly ["default", "processing", "success", "warning", "error"];
6
6
  export { BADGE_COLORS, BADGE_STATUS, Count as BadgeCount };
7
- export default BadgeComponent;
7
+ export default Badge;
8
8
  export type { BadgeProps };
@@ -1,5 +1,26 @@
1
1
  import { CSSProperties, HTMLAttributes, ReactNode } from 'react';
2
2
  import { Omit } from '../utils/type';
3
+ /**
4
+ * @title Ribbon
5
+ */
6
+ export interface RibbonProps {
7
+ /**
8
+ * @zh 缎带徽标的文本
9
+ * @en Text of the ribbon badge
10
+ */
11
+ text?: ReactNode;
12
+ /**
13
+ * @zh 缎带徽标的放置位置
14
+ * @en Placement of the ribbon badge
15
+ * @defaultValue 'end'
16
+ */
17
+ placement?: 'start' | 'end';
18
+ /**
19
+ * @zh 缎带徽标的颜色
20
+ * @en Color of the ribbon badge
21
+ */
22
+ color?: string;
23
+ }
3
24
  /**
4
25
  * @title Badge
5
26
  */
@@ -62,5 +83,10 @@ export interface BadgeProps extends Omit<HTMLAttributes<HTMLElement>, 'className
62
83
  * @en Set badge as a status dot
63
84
  */
64
85
  status?: 'default' | 'processing' | 'success' | 'warning' | 'error';
86
+ /**
87
+ * @zh 缎带徽标配置
88
+ * @en Ribbon badge configuration
89
+ */
90
+ ribbon?: RibbonProps;
65
91
  children?: ReactNode;
66
92
  }
@@ -58,19 +58,16 @@ export interface BreadCrumbItemProps extends CustomHTMLElement {
58
58
  /**
59
59
  * @zh 超链接地址
60
60
  * @en href
61
- * @version 2.40.0
62
61
  */
63
62
  href?: string;
64
63
  /**
65
64
  * @zh 点击回调
66
65
  * @en click callback
67
- * @version 2.40.0
68
66
  */
69
67
  onClick?: (e: any) => void;
70
68
  /**
71
69
  * @zh 标签名,可以是 html 标签或是组件
72
70
  * @en Configure the outermost label, which can be an html label or a component
73
- * @version 2.40.0
74
71
  * @defaultValue div
75
72
  */
76
73
  tagName?: string | React.FC<any> | React.ComponentClass<any>;