@unicom-cloud/ui 0.8.100 → 0.8.101

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 (188) hide show
  1. package/Details.js +13 -2
  2. package/Divider.js +3 -2
  3. package/Flex.js +14 -4
  4. package/Loading.js +16 -3
  5. package/Space.js +3 -3
  6. package/Splitter.js +4 -3
  7. package/SuspenseFallbackTest.js +2 -4
  8. package/alert/index.js +60 -62
  9. package/back-top/index.js +32 -33
  10. package/calendar/index.js +85 -84
  11. package/components/common/development/index.js +44 -29
  12. package/components/common/empty/index.js +35 -23
  13. package/components/common/flex/index.js +64 -0
  14. package/components/common/flex/interface.js +9 -0
  15. package/components/common/higher-order/with-speech-synthesis/index.js +79 -55
  16. package/components/common/space/index.js +71 -91
  17. package/components/common/suspense-fallback-test/index.js +16 -0
  18. package/components/common/utils/toArray.js +12 -0
  19. package/details/index.js +102 -62
  20. package/divider/index.js +27 -21
  21. package/empty/index.js +13 -13
  22. package/flex/index.js +43 -55
  23. package/flex/interface.js +1 -34
  24. package/icon/interface.js +1 -0
  25. package/icon-hover/interface.js +1 -0
  26. package/index.js +537 -536
  27. package/loading/index.js +72 -53
  28. package/loading/interface.js +1 -0
  29. package/modal/Modal.js +73 -74
  30. package/package.json +1 -1
  31. package/portal/interface.js +1 -0
  32. package/segmented/index.js +47 -47
  33. package/space/index.js +41 -35
  34. package/speech-synthesis/interface.js +1 -0
  35. package/splitter/Splitter.js +85 -89
  36. package/splitter/hooks/useItems.js +1 -1
  37. package/splitter/index.js +5 -4
  38. package/style.css +1 -1
  39. package/suspense-fallback-test/index.js +2 -11
  40. package/suspense-fallback-test/interface.js +1 -0
  41. package/table/Table.js +38 -38
  42. package/trigger/index.js +67 -70
  43. package/types/common/development/index.d.ts +7 -1
  44. package/types/common/development/interface.d.ts +22 -0
  45. package/types/common/empty/index.d.ts +2 -1
  46. package/types/common/flex/index.d.ts +14 -0
  47. package/types/common/flex/interface.d.ts +62 -0
  48. package/types/common/higher-order/with-speech-synthesis/index.d.ts +6 -1
  49. package/types/common/higher-order/with-speech-synthesis/interface.d.ts +13 -0
  50. package/types/common/space/index.d.ts +4 -4
  51. package/types/common/space/interface.d.ts +10 -18
  52. package/types/common/suspense-fallback-test/index.d.ts +7 -0
  53. package/types/common/suspense-fallback-test/interface.d.ts +1 -0
  54. package/types/common/utils/PqbCSSTransition.d.ts +1 -1
  55. package/types/common/utils/toArray.d.ts +13 -0
  56. package/types/pc/alert/index.d.ts +2 -1
  57. package/types/pc/alert/interface.d.ts +7 -1
  58. package/types/pc/badge/Count.d.ts +1 -1
  59. package/types/pc/breadcrumb/Item.d.ts +1 -1
  60. package/types/pc/calendar/Month.d.ts +1 -1
  61. package/types/pc/calendar/WeekList.d.ts +1 -1
  62. package/types/pc/calendar/Year.d.ts +1 -1
  63. package/types/pc/calendar/header/Panel.d.ts +1 -1
  64. package/types/pc/calendar/header/index.d.ts +1 -1
  65. package/types/pc/calendar/index.d.ts +1 -1
  66. package/types/pc/calendar/interface.d.ts +2 -1
  67. package/types/pc/cascader/interface.d.ts +1 -1
  68. package/types/pc/cascader/panel/List.d.ts +1 -1
  69. package/types/pc/cascader/panel/Option.d.ts +1 -1
  70. package/types/pc/cascader/panel/Search.d.ts +1 -1
  71. package/types/pc/checkbox/Group.d.ts +2 -2
  72. package/types/pc/checkbox/GroupBlock.d.ts +1 -1
  73. package/types/pc/checkbox/IconCheck.d.ts +1 -1
  74. package/types/pc/color-picker/InputRgb.d.ts +1 -1
  75. package/types/pc/color-picker/Palette.d.ts +1 -1
  76. package/types/pc/config-provider/ConfigProvider.d.ts +1 -1
  77. package/types/pc/config-provider/interface.d.ts +4 -0
  78. package/types/pc/copy/index.d.ts +1 -1
  79. package/types/pc/date-picker/panel/Body.d.ts +1 -1
  80. package/types/pc/date-picker/panel/Footer.d.ts +1 -1
  81. package/types/pc/date-picker/panel/Header.d.ts +1 -1
  82. package/types/pc/date-picker/panel/WeekList.d.ts +1 -1
  83. package/types/pc/date-picker/panel/date/index.d.ts +1 -1
  84. package/types/pc/date-picker/panel/month/index.d.ts +1 -1
  85. package/types/pc/date-picker/panel/quarter/index.d.ts +1 -1
  86. package/types/pc/date-picker/panel/range/index.d.ts +1 -1
  87. package/types/pc/date-picker/panel/week/index.d.ts +1 -1
  88. package/types/pc/date-picker/panel/year/index.d.ts +1 -1
  89. package/types/pc/descriptions/index.d.ts +1 -1
  90. package/types/pc/details/index.d.ts +3 -2
  91. package/types/pc/details/interface.d.ts +16 -0
  92. package/types/pc/development/index.d.ts +2 -1
  93. package/types/pc/development/interface.d.ts +15 -0
  94. package/types/pc/divider/index.d.ts +7 -2
  95. package/types/pc/draggable/Item.d.ts +1 -1
  96. package/types/pc/draggable/index.d.ts +1 -1
  97. package/types/pc/flex/index.d.ts +4 -4
  98. package/types/pc/flex/interface.d.ts +8 -53
  99. package/types/pc/form/Control.d.ts +1 -1
  100. package/types/pc/form/FormList.d.ts +1 -1
  101. package/types/pc/form/IconSymbol.d.ts +1 -1
  102. package/types/pc/icon/addFromIconFontCn.d.ts +1 -7
  103. package/types/pc/icon/index.d.ts +2 -7
  104. package/types/pc/icon/interface.d.ts +13 -0
  105. package/types/pc/icon-hover/index.d.ts +2 -8
  106. package/types/pc/icon-hover/interface.d.ts +8 -0
  107. package/types/pc/image/ImageFooter.d.ts +1 -1
  108. package/types/pc/image/ImagePreviewArrow.d.ts +1 -1
  109. package/types/pc/image/TriggerForToolbar.d.ts +1 -1
  110. package/types/pc/index.d.ts +60 -51
  111. package/types/pc/loading/index.d.ts +4 -3
  112. package/types/pc/loading/interface.d.ts +6 -0
  113. package/types/pc/menu/Indent.d.ts +1 -1
  114. package/types/pc/menu/OverflowWrap.d.ts +1 -1
  115. package/types/pc/menu/sub-menu/Inline.d.ts +1 -1
  116. package/types/pc/menu/sub-menu/Pop.d.ts +1 -1
  117. package/types/pc/overflow-ellipsis/OverflowItem.d.ts +1 -1
  118. package/types/pc/overflow-ellipsis/index.d.ts +1 -1
  119. package/types/pc/pagination/PageItem.d.ts +3 -3
  120. package/types/pc/pagination/PageJumper.d.ts +1 -1
  121. package/types/pc/pagination/PageOption.d.ts +1 -1
  122. package/types/pc/portal/Portal.d.ts +2 -6
  123. package/types/pc/portal/index.d.ts +2 -9
  124. package/types/pc/portal/interface.d.ts +14 -0
  125. package/types/pc/progress/CircleProgress.d.ts +1 -1
  126. package/types/pc/progress/LineProgess.d.ts +1 -1
  127. package/types/pc/progress/StepProgress.d.ts +1 -1
  128. package/types/pc/radio/Group.d.ts +2 -2
  129. package/types/pc/radio/GroupBlock.d.ts +1 -1
  130. package/types/pc/radio/Radio.d.ts +1 -1
  131. package/types/pc/resize-box/ResizeTrigger.d.ts +1 -1
  132. package/types/pc/result/403.d.ts +1 -1
  133. package/types/pc/result/404.d.ts +1 -1
  134. package/types/pc/result/500.d.ts +1 -1
  135. package/types/pc/segmented/interface.d.ts +6 -6
  136. package/types/pc/skeleton/Image.d.ts +1 -1
  137. package/types/pc/skeleton/Text.d.ts +2 -1
  138. package/types/pc/slider/Button.d.ts +1 -1
  139. package/types/pc/slider/Input.d.ts +1 -1
  140. package/types/pc/slider/Tick.d.ts +1 -1
  141. package/types/pc/space/index.d.ts +6 -5
  142. package/types/pc/speech-synthesis/index.d.ts +3 -1
  143. package/types/pc/speech-synthesis/interface.d.ts +7 -0
  144. package/types/pc/spin/DotLoading.d.ts +1 -1
  145. package/types/pc/splitter/index.d.ts +5 -4
  146. package/types/pc/splitter/interface.d.ts +16 -16
  147. package/types/pc/suspense-fallback-test/index.d.ts +2 -3
  148. package/types/pc/suspense-fallback-test/interface.d.ts +2 -0
  149. package/types/pc/table/ColGroup.d.ts +1 -1
  150. package/types/pc/table/summary/Cell.d.ts +1 -1
  151. package/types/pc/table/summary/Row.d.ts +1 -1
  152. package/types/pc/table/tbody/Td.d.ts +1 -1
  153. package/types/pc/table/tbody/index.d.ts +1 -1
  154. package/types/pc/table/tfoot/index.d.ts +1 -1
  155. package/types/pc/table/th-resizable/index.d.ts +1 -1
  156. package/types/pc/table/thead/Column.d.ts +1 -1
  157. package/types/pc/table/thead/index.d.ts +1 -1
  158. package/types/pc/tabs/TabContent.d.ts +1 -1
  159. package/types/pc/tabs/tab-header/DropdownIcon.d.ts +1 -1
  160. package/types/pc/tabs/tab-header/TabInk.d.ts +1 -1
  161. package/types/pc/tabs/tab-header/TabNavIcon.d.ts +1 -1
  162. package/types/pc/time-picker/Picker.d.ts +1 -1
  163. package/types/pc/time-picker/RangePicker.d.ts +1 -1
  164. package/types/pc/time-picker/TimeColumn.d.ts +1 -1
  165. package/types/pc/time-picker/TimePicker.d.ts +1 -1
  166. package/types/pc/time-picker/index.d.ts +1 -1
  167. package/types/pc/transfer/Item.d.ts +1 -1
  168. package/types/pc/transfer/List.d.ts +1 -1
  169. package/types/pc/tree/Animation.d.ts +1 -1
  170. package/types/pc/typography/Operations.d.ts +1 -1
  171. package/types/pc/upload/list/index.d.ts +1 -1
  172. package/types/pc/utils/toArray.d.ts +1 -5
  173. package/types/pc/verification-code/VerificationCode.d.ts +1 -1
  174. package/types/pc/virtual-list/VirtualList.d.ts +2 -38
  175. package/types/pc/virtual-list/index.d.ts +2 -1
  176. package/types/pc/virtual-list/interface.d.ts +56 -0
  177. package/types/pc/watermark/Watermark.d.ts +1 -1
  178. package/utils/index.js +1 -1
  179. package/utils/toArray.js +3 -10
  180. package/version/index.js +1 -1
  181. package/virtual-list/interface.js +1 -0
  182. package/components/common/space/toArray.js +0 -11
  183. package/flex/utils.js +0 -13
  184. package/loading/style/index.module.less.js +0 -4
  185. package/types/common/space/toArray.d.ts +0 -3
  186. package/types/pc/flex/utils.d.ts +0 -9
  187. package/types/pc/suspense-fallback-test/style/index.d.ts +0 -1
  188. /package/{suspense-fallback-test/style/index.less.js → development/interface.js} +0 -0
package/trigger/index.js CHANGED
@@ -1,4 +1,4 @@
1
- import { jsx as P, jsxs as xe } from "react/jsx-runtime";
1
+ import { jsx as P, jsxs as De } from "react/jsx-runtime";
2
2
  import no from "../dist/react-transition-group/src/CSSTransition.js";
3
3
  import "../dist/react-transition-group/src/ReplaceTransition.js";
4
4
  import "../dist/react-transition-group/src/SwitchTransition.js";
@@ -6,18 +6,18 @@ import "../dist/react-transition-group/chunk/CPfP7aNL.js";
6
6
  import "../dist/react-transition-group/src/TransitionGroup.js";
7
7
  import ro from "lodash/isArray";
8
8
  import D from "lodash/isFunction";
9
- import { forwardRef as io, useContext as so, useRef as L, useState as uo, Children as Me, useCallback as Se, cloneElement as Oe, useImperativeHandle as co, useLayoutEffect as lo, useEffect as g, Fragment as po } from "react";
9
+ import { forwardRef as io, useContext as so, useRef as L, useState as uo, Children as xe, useCallback as Me, cloneElement as Se, useImperativeHandle as co, useLayoutEffect as lo, useEffect as g, Fragment as po } from "react";
10
10
  import { createPortal as ao } from "react-dom";
11
11
  import "../config-provider/ConfigProvider.js";
12
12
  import R from "@unicom-cloud/utils/class-name";
13
- import { on as G, off as J, getScrollElements as fo, isScrollElement as mo, contains as ve } from "../components/common/utils/dom.js";
13
+ import { on as G, off as J, getScrollElements as fo, isScrollElement as mo, contains as Oe } from "../components/common/utils/dom.js";
14
14
  import { supportRef as go } from "../components/common/utils/is.js";
15
- import { Esc as be } from "@unicom-cloud/utils/constant/keyboardCode";
15
+ import { Esc as ve } from "@unicom-cloud/utils/constant/keyboardCode";
16
16
  import { mergeProps as yo } from "../components/common/utils/mergeProps.js";
17
17
  import { pickDataAttributes as To } from "../components/common/utils/pick.js";
18
18
  import { callbackOriginRef as Co, findDOMNode_ as Po } from "../components/common/utils/reactDOM.js";
19
19
  import { resizeObserver as Z } from "../components/common/utils/resizeObserver.js";
20
- import { throttleByRaf as Ne } from "../components/common/utils/throttleByRaf.js";
20
+ import { throttleByRaf as be } from "../components/common/utils/throttleByRaf.js";
21
21
  import ho, { getBoundingClientRect as Eo } from "./getPopupStyle.js";
22
22
  import wo from "../config-provider/context.js";
23
23
  import { isPlainObject as ee } from "@unicom-cloud/utils/is";
@@ -73,25 +73,22 @@ function So(d, $) {
73
73
  const y = so(wo), { getPrefixCls: x, zIndex: T, rtl: A } = y, i = u(d), {
74
74
  children: oe,
75
75
  style: te,
76
- className: $e,
76
+ className: Ne,
77
77
  arrowProps: _,
78
78
  disabled: M,
79
- popup: ne,
79
+ popup: $e,
80
80
  classNames: z,
81
81
  duration: ke,
82
- unmountOnExit: re,
82
+ unmountOnExit: ne,
83
83
  alignPoint: He,
84
84
  autoAlignPopupWidth: Ie,
85
85
  position: Le,
86
86
  childrenPrefix: h,
87
87
  showArrow: _e,
88
- popupStyle: ie,
88
+ popupStyle: re,
89
89
  __onExit: Be,
90
90
  __onExited: Ve
91
- } = i;
92
- if (!ne)
93
- return null;
94
- const se = oe || oe === 0, a = L(null), S = L(null), ue = L(null), ce = L(null), t = L({
91
+ } = i, ie = oe || oe === 0, a = L(null), S = L(null), se = L(null), ue = L(null), t = L({
95
92
  rootElement: void 0,
96
93
  triggerDestoried: !1,
97
94
  // 标志 popup 是否被销毁
@@ -119,15 +116,15 @@ function So(d, $) {
119
116
  }, 0);
120
117
  }
121
118
  };
122
- I() && !M ? (l.onMouseEnter = We, l.onMouseLeave = ye, U() && (l.onClick = Te), He && (l.onMouseMove = Xe), ze() || (Q.onMouseEnter = Ue, Q.onMouseLeave = je)) : (l.onMouseEnter = w("onMouseEnter"), l.onMouseLeave = w("onMouseLeave")), pe() && !M ? (l.onContextMenu = qe, l.onClick = Te) : l.onContextMenu = w("onContextMenu"), le() && !M ? l.onClick = Ge : l.onClick = l.onClick || w("onClick"), X() && !M ? (l.onFocus = Je, ae() && (l.onBlur = Ze)) : (l.onFocus = w("onFocus"), l.onBlur = w("onBlur")), M ? l.onKeyDown = w("onKeyDown") : l.onKeyDown = Ke;
123
- const k = V(), H = Me.only(ne());
119
+ I() && !M ? (l.onMouseEnter = We, l.onMouseLeave = ge, U() && (l.onClick = ye), He && (l.onMouseMove = Xe), ze() || (Q.onMouseEnter = Ue, Q.onMouseLeave = je)) : (l.onMouseEnter = w("onMouseEnter"), l.onMouseLeave = w("onMouseLeave")), le() && !M ? (l.onContextMenu = qe, l.onClick = ye) : l.onContextMenu = w("onContextMenu"), ce() && !M ? l.onClick = Ge : l.onClick = l.onClick || w("onClick"), X() && !M ? (l.onFocus = Je, pe() && (l.onBlur = Ze)) : (l.onFocus = w("onFocus"), l.onBlur = w("onBlur")), M ? l.onKeyDown = w("onKeyDown") : l.onKeyDown = Ke;
120
+ const k = V(), H = xe.only($e?.());
124
121
  k.props.className && (l.className = k.props.className), h && s && (l.className = R(l.className, `${h}-open`)), X() && (l.tabIndex = M ? -1 : 0);
125
122
  const v = x?.("trigger"), Re = R(
126
123
  v,
127
124
  h,
128
125
  `${v}-position-${Le}`,
129
126
  { [`${v}-rtl`]: A },
130
- $e
127
+ Ne
131
128
  );
132
129
  function u(e) {
133
130
  const { componentConfig: o } = y ?? {};
@@ -144,13 +141,13 @@ function So(d, $) {
144
141
  );
145
142
  return t.current.rootElement = e, e;
146
143
  }
147
- const W = Se(
148
- Ne(() => {
144
+ const W = Me(
145
+ be(() => {
149
146
  N();
150
147
  }),
151
148
  [s]
152
149
  );
153
- function le() {
150
+ function ce() {
154
151
  const { trigger: e } = u(["trigger"]);
155
152
  return [].concat(e).indexOf("click") > -1;
156
153
  }
@@ -162,7 +159,7 @@ function So(d, $) {
162
159
  const { trigger: e } = u(["trigger"]);
163
160
  return [].concat(e).indexOf("hover") > -1;
164
161
  }
165
- function pe() {
162
+ function le() {
166
163
  const { trigger: e } = u(["trigger"]);
167
164
  return [].concat(e).indexOf("contextMenu") > -1;
168
165
  }
@@ -173,19 +170,19 @@ function So(d, $) {
173
170
  return I() && !u(["popupHoverStay"]).popupHoverStay;
174
171
  }
175
172
  function U() {
176
- if (le() || pe()) {
173
+ if (ce() || le()) {
177
174
  const { clickToClose: e = !0 } = u(["clickToClose"]);
178
175
  return e;
179
176
  }
180
177
  return I() && i.clickToClose;
181
178
  }
182
- function ae() {
179
+ function pe() {
183
180
  return X() && u(["blurToHide"]).blurToHide;
184
181
  }
185
182
  function Ye() {
186
183
  t.current.updatePositionTimeoutID && (t.current.updatePositionTimeoutID.cancel ? t.current.updatePositionTimeoutID.cancel() : (clearTimeout(t.current.updatePositionTimeoutID), t.current.updatePositionTimeoutID = null)), E();
187
184
  }
188
- function fe(e) {
185
+ function ae(e) {
189
186
  const o = a.current;
190
187
  if (!o)
191
188
  return {};
@@ -195,7 +192,7 @@ function So(d, $) {
195
192
  ]);
196
193
  let c = n && t.current.arrowStyle?.top || 0, p = n && t.current.arrowStyle?.left || 0;
197
194
  c = c ? `${c}px` : "", p = p ? `${p}px` : "";
198
- const we = {
195
+ const Ee = {
199
196
  top: `${p || "50%"} 100% 0`,
200
197
  tl: `${p || "15px"} 100% 0`,
201
198
  tr: `${p || `${o.clientWidth - 15}px`} 100% 0`,
@@ -211,17 +208,17 @@ function So(d, $) {
211
208
  };
212
209
  if (r && r.indexOf("zoom") > -1)
213
210
  return {
214
- transformOrigin: we[e]
211
+ transformOrigin: Ee[e]
215
212
  };
216
213
  if (r === "slideDynamicOrigin") {
217
- let De = "0% 0%";
218
- return ["top", "tl", "tr"].indexOf(e) > -1 && (De = "100% 100%"), {
219
- transformOrigin: De
214
+ let we = "0% 0%";
215
+ return ["top", "tl", "tr"].indexOf(e) > -1 && (we = "100% 100%"), {
216
+ transformOrigin: we
220
217
  };
221
218
  }
222
219
  return {};
223
220
  }
224
- function de() {
221
+ function fe() {
225
222
  if (u(["classNames"]).classNames !== "slideDynamicOrigin")
226
223
  return "";
227
224
  switch (t.current.realPosition) {
@@ -254,7 +251,7 @@ function So(d, $) {
254
251
  const p = c || i.position;
255
252
  return t.current.realPosition = p, {
256
253
  ...n,
257
- ...fe(p)
254
+ ...ae(p)
258
255
  };
259
256
  }
260
257
  function C(e) {
@@ -266,7 +263,7 @@ function So(d, $) {
266
263
  e();
267
264
  }, 0);
268
265
  }
269
- const B = Se(Ne(C), [
266
+ const B = Me(be(C), [
270
267
  s
271
268
  ]);
272
269
  function N(e = 0, o) {
@@ -288,7 +285,7 @@ function So(d, $) {
288
285
  }
289
286
  function f(e, o = 0, n) {
290
287
  const r = u(["onVisibleChange", "popupVisible"]);
291
- e !== s ? me(o, () => {
288
+ e !== s ? de(o, () => {
292
289
  r.onVisibleChange?.(e), "popupVisible" in r ? n?.() : (O((c) => {
293
290
  const p = { ...c };
294
291
  return p.popupVisible = !!e, p;
@@ -299,7 +296,7 @@ function So(d, $) {
299
296
  }, 0));
300
297
  }) : n?.();
301
298
  }
302
- function me(e, o) {
299
+ function de(e, o) {
303
300
  e ? (E(), t.current.delayTimeoutID = setTimeout(() => {
304
301
  o(), E();
305
302
  }, e)) : o();
@@ -307,18 +304,18 @@ function So(d, $) {
307
304
  function E() {
308
305
  t.current.delayTimeoutID && (clearTimeout(t.current.delayTimeoutID), t.current.delayTimeoutID = null);
309
306
  }
310
- function ge(e) {
307
+ function me(e) {
311
308
  const o = u(["onClickOutside", "clickOutsideToClose"]);
312
- let n = ve(a.current, e.target);
313
- n ||= ve(b(), e.target), n ||= !!t.current.hasPopupMouseDown, n || (o.onClickOutside?.(), o.clickOutsideToClose && (ae() || I() || f(!1)));
309
+ let n = Oe(a.current, e.target);
310
+ n ||= Oe(b(), e.target), n ||= !!t.current.hasPopupMouseDown, n || (o.onClickOutside?.(), o.clickOutsideToClose && (pe() || I() || f(!1)));
314
311
  }
315
312
  function Ke(e) {
316
313
  const o = e.key;
317
- m("onKeyDown", e), o === be.key && Qe(e);
314
+ m("onKeyDown", e), o === ve.key && Qe(e);
318
315
  }
319
316
  function Qe(e) {
320
317
  const { escToClose: o } = u(["escToClose"]);
321
- o && e && e.key === be.key && s && f(!1);
318
+ o && e && e.key === ve.key && s && f(!1);
322
319
  }
323
320
  function We(e) {
324
321
  const { mouseEnterDelay: o } = u(["mouseEnterDelay"]);
@@ -327,7 +324,7 @@ function So(d, $) {
327
324
  function Xe(e) {
328
325
  m("onMouseMove", e), q(e), s && B();
329
326
  }
330
- function ye(e) {
327
+ function ge(e) {
331
328
  const { mouseLeaveDelay: o } = u(["mouseLeaveDelay"]);
332
329
  E(), m("onMouseLeave", e), Ae() && s && f(!1, o || 0);
333
330
  }
@@ -335,7 +332,7 @@ function So(d, $) {
335
332
  E();
336
333
  }
337
334
  function je(e) {
338
- ye(e);
335
+ ge(e);
339
336
  }
340
337
  function q(e) {
341
338
  u(["alignPoint"]).alignPoint && (t.current.mouseLocation = {
@@ -346,7 +343,7 @@ function So(d, $) {
346
343
  function qe(e) {
347
344
  e.preventDefault(), m("onContextMenu", e), q(e), s ? u(["alignPoint"]).alignPoint && B() : f(!0, 0);
348
345
  }
349
- function Te(e) {
346
+ function ye(e) {
350
347
  s && (t.current.mousedownToHide = !0), m("onClick", e), U() && s && f(!s, 0);
351
348
  }
352
349
  function Ge(e) {
@@ -361,13 +358,13 @@ function So(d, $) {
361
358
  function Ze(e) {
362
359
  f(!1, 200, () => m("onBlur", e));
363
360
  }
364
- function Ce() {
361
+ function Te() {
365
362
  s && u(["autoFixPosition"]).autoFixPosition && N();
366
363
  }
367
364
  function V() {
368
365
  const { children: e } = i, o = e, n = o && typeof o != "string" && o.type;
369
366
  let r = e;
370
- if (["string", "number"].indexOf(typeof e) > -1 || Me.count(e) > 1)
367
+ if (["string", "number"].indexOf(typeof e) > -1 || xe.count(e) > 1)
371
368
  r = /* @__PURE__ */ P("span", { children: e });
372
369
  else if (o && n && (n.__PQB_BUTTON === !0 || n.__PQB_CHECKBOX === !0 || n.__PQB_SWITCH === !0 || n.__PQB_RADIO === !0 || n === "button") && o.props.disabled) {
373
370
  const { picked: c, omitted: p } = xo(o.props.style, [
@@ -385,7 +382,7 @@ function So(d, $) {
385
382
  {
386
383
  className: o.props?.className,
387
384
  style: { display: "inline-block", ...c, cursor: "not-allowed" },
388
- children: Oe(o, {
385
+ children: Se(o, {
389
386
  style: {
390
387
  ...p,
391
388
  pointerEvents: "none"
@@ -407,7 +404,7 @@ function So(d, $) {
407
404
  n(c), r(c);
408
405
  } : n || r;
409
406
  }
410
- function Pe() {
407
+ function Ce() {
411
408
  const e = u(["containerScrollToClose", "updateOnScroll"]);
412
409
  e.containerScrollToClose ? f(!1) : e.updateOnScroll && N();
413
410
  }
@@ -416,12 +413,12 @@ function So(d, $) {
416
413
  b()
417
414
  // refPopupContainer.current.parentNode as HTMLElement,
418
415
  ), Array.isArray(t.current.scrollElements) && (i.containerScrollToClose && S.current?.parentNode === document.body && t.current.scrollElements.indexOf(document.body) === -1 && mo(document.documentElement) && t.current.scrollElements.push(window), t.current.scrollElements.forEach((e) => {
419
- G(e, "scroll", Pe);
416
+ G(e, "scroll", Ce);
420
417
  })));
421
418
  }
422
- function he() {
419
+ function Pe() {
423
420
  t.current.scrollElements && (t.current.scrollElements.forEach((e) => {
424
- J(e, "scroll", Pe);
421
+ J(e, "scroll", Ce);
425
422
  }), t.current.scrollElements = null);
426
423
  }
427
424
  co($, () => ({
@@ -432,20 +429,20 @@ function So(d, $) {
432
429
  },
433
430
  getChild: V,
434
431
  getPopupStyle: j,
435
- getTransformTranslate: de,
436
- getTransformOrigin: fe,
432
+ getTransformTranslate: fe,
433
+ getTransformOrigin: ae,
437
434
  updateThrottleByRaf: B,
438
435
  update: C,
439
436
  updatePopupStyle: C,
440
437
  updatePopupPosition: N,
441
438
  handleUpdatePosition: W,
442
439
  setPopupVisible: f,
443
- delayToDo: me
440
+ delayToDo: de
444
441
  })), lo(() => (C(), () => {
445
442
  }), [
446
443
  a.current,
444
+ se.current,
447
445
  ue.current,
448
- ce.current,
449
446
  t.current.rootElement
450
447
  ]), g(() => {
451
448
  const e = S.current?.parentNode, o = Z([e], N);
@@ -453,12 +450,12 @@ function So(d, $) {
453
450
  o();
454
451
  };
455
452
  }, [S.current?.parentNode]), g(() => {
456
- const e = a.current, o = Z([e], Ce);
453
+ const e = a.current, o = Z([e], Te);
457
454
  return () => {
458
455
  o();
459
456
  };
460
457
  }, [a.current]), g(() => {
461
- const e = t.current.rootElement, o = Z([e], Ce);
458
+ const e = t.current.rootElement, o = Z([e], Te);
462
459
  return () => {
463
460
  o();
464
461
  };
@@ -474,8 +471,8 @@ function So(d, $) {
474
471
  i.alignPoint,
475
472
  i.boundaryDistance,
476
473
  i.position
477
- ]), g(() => (s && (i.updateOnScroll || i.containerScrollToClose ? eo() : (N(), he())), () => {
478
- he();
474
+ ]), g(() => (s && (i.updateOnScroll || i.containerScrollToClose ? eo() : (N(), Pe())), () => {
475
+ Pe();
479
476
  }), [
480
477
  s,
481
478
  i.updateOnScroll,
@@ -490,8 +487,8 @@ function So(d, $) {
490
487
  // 2. 点击label标签,会触发对应input元素的点击事件,导致触发clickOutside,隐藏popup。
491
488
  capture: ee(e) ? e.capture : !1
492
489
  };
493
- return s && (G(n, "mousedown", ge, r), G(window, "resize", W)), () => {
494
- J(n, "mousedown", ge, r), J(window, "resize", W);
490
+ return s && (G(n, "mousedown", me, r), G(window, "resize", W)), () => {
491
+ J(n, "mousedown", me, r), J(window, "resize", W);
495
492
  };
496
493
  }, [s]), g(() => ("defaultPopupVisible" in i && O((e) => {
497
494
  const o = { ...e };
@@ -504,7 +501,7 @@ function So(d, $) {
504
501
  }), [K]), g(() => () => {
505
502
  Ye();
506
503
  }, []);
507
- const oo = se && Oe(k, {
504
+ const oo = ie && Se(k, {
508
505
  ...l,
509
506
  ref: go(k) ? (e) => {
510
507
  t.current.child = e, Co(k, e);
@@ -515,13 +512,13 @@ function So(d, $) {
515
512
  in: !!s,
516
513
  timeout: ke,
517
514
  classNames: z,
518
- unmountOnExit: re,
515
+ unmountOnExit: ne,
519
516
  appear: !0,
520
517
  mountOnEnter: !0,
521
518
  onEnter: () => {
522
519
  t.current.triggerDestoried = !1;
523
520
  const e = a.current;
524
- e && (e.style.display = "initial", e.style.pointerEvents = "none", z === "slideDynamicOrigin" && (e.style.transform = de()), C());
521
+ e && (e.style.display = "initial", e.style.pointerEvents = "none", z === "slideDynamicOrigin" && (e.style.transform = fe()), C());
525
522
  },
526
523
  onEntering: () => {
527
524
  const e = a.current;
@@ -537,13 +534,13 @@ function So(d, $) {
537
534
  },
538
535
  onExited: () => {
539
536
  const e = a.current;
540
- e && (e.style.display = "none", re && (t.current.triggerDestoried = !0), O((o) => {
537
+ e && (e.style.display = "none", ne && (t.current.triggerDestoried = !0), O((o) => {
541
538
  const n = { ...o };
542
539
  return n.popupStyle = {}, n;
543
540
  }), Ve?.(e));
544
541
  },
545
542
  nodeRef: a,
546
- children: /* @__PURE__ */ xe(
543
+ children: /* @__PURE__ */ De(
547
544
  "span",
548
545
  {
549
546
  ref: a,
@@ -560,25 +557,25 @@ function So(d, $) {
560
557
  ...Q,
561
558
  className: Re,
562
559
  children: [
563
- ee(ie) ? /* @__PURE__ */ P(
560
+ ee(re) ? /* @__PURE__ */ P(
564
561
  H.type,
565
562
  {
566
563
  ref: H.ref,
567
564
  ...H.props,
568
- style: { ...H.props.style, ...ie }
565
+ style: { ...H.props.style, ...re }
569
566
  }
570
567
  ) : H,
571
568
  (_e || _) && /* @__PURE__ */ P(
572
569
  "div",
573
570
  {
574
- ref: ue,
571
+ ref: se,
575
572
  className: R(`${v}-arrow-container`, {
576
573
  [`${h}-arrow-container`]: h
577
574
  }),
578
575
  children: /* @__PURE__ */ P(
579
576
  "div",
580
577
  {
581
- ref: ce,
578
+ ref: ue,
582
579
  ..._,
583
580
  className: R(
584
581
  `${v}-arrow`,
@@ -597,8 +594,8 @@ function So(d, $) {
597
594
  )
598
595
  }
599
596
  );
600
- let F, Ee = s;
601
- if (Ee ||= !!a.current && !t.current.triggerDestoried, Ee) {
597
+ let F, he = s;
598
+ if (he ||= !!a.current && !t.current.triggerDestoried, he) {
602
599
  const e = i.getPopupContainer || y.getPopupContainer;
603
600
  if (D(e)) {
604
601
  const o = e(b());
@@ -609,7 +606,7 @@ function So(d, $) {
609
606
  ));
610
607
  }
611
608
  }
612
- return se && (F = /* @__PURE__ */ xe(po, { children: [
609
+ return ie && (F = /* @__PURE__ */ De(po, { children: [
613
610
  oo,
614
611
  F
615
612
  ] })), F;
@@ -1,2 +1,8 @@
1
+ import type { DevelopmentProps } from './interface';
2
+ /**
3
+ * 开发占位组件
4
+ * @description 用于展示未开发完成的功能区块,支持自定义图片/图标和提示文字
5
+ */
6
+ declare const Development: import("react").ForwardRefExoticComponent<DevelopmentProps & import("react").RefAttributes<HTMLDivElement>>;
1
7
  export default Development;
2
- declare const Development: import("react").ForwardRefExoticComponent<Omit<any, "ref"> & import("react").RefAttributes<any>>;
8
+ export type { DevelopmentProps };
@@ -0,0 +1,22 @@
1
+ import React from 'react';
2
+ /**
3
+ * Development 组件的属性类型定义
4
+ * @property {string} [url] - 图片 URL,如果有则显示图片而不是图标
5
+ * @property {React.ReactNode} [icon] - 自定义图标,会覆盖默认的等待图标
6
+ * @property {string} [label] - 提示文字,默认为"等待开发"
7
+ * @property {string} [tip] - 提示文字别名,优先级低于 label
8
+ * @property {string} [className] - 根节点类名
9
+ * @property {string} [imgClassName] - 图片类名
10
+ * @property {string} [iconClassName] - 图标类名
11
+ * @property {string} [labelClassName] - 文字标签类名
12
+ */
13
+ export interface DevelopmentProps {
14
+ url?: string;
15
+ icon?: React.ReactNode;
16
+ label?: string;
17
+ tip?: string;
18
+ className?: string;
19
+ imgClassName?: string;
20
+ iconClassName?: string;
21
+ labelClassName?: string;
22
+ }
@@ -1,4 +1,5 @@
1
+ import React from 'react';
1
2
  import type { EmptyProps } from './interface';
2
- declare const Empty: import("react").MemoExoticComponent<import("react").ForwardRefExoticComponent<EmptyProps & import("react").RefAttributes<unknown>>>;
3
+ export declare const Empty: React.MemoExoticComponent<React.ForwardRefExoticComponent<EmptyProps & React.RefAttributes<HTMLDivElement>>>;
3
4
  export default Empty;
4
5
  export type { EmptyProps };
@@ -0,0 +1,14 @@
1
+ import React from 'react';
2
+ import { type FlexProps } from './interface';
3
+ /**
4
+ * Flex 布局组件主体
5
+ */
6
+ declare const Flex: React.ForwardRefExoticComponent<FlexProps & React.RefAttributes<HTMLElement>> & {
7
+ Vertical: typeof FlexVertical;
8
+ };
9
+ /**
10
+ * 垂直布局组件
11
+ */
12
+ declare const FlexVertical: React.ForwardRefExoticComponent<FlexProps & React.RefAttributes<HTMLElement>>;
13
+ export { FlexVertical };
14
+ export default Flex;
@@ -0,0 +1,62 @@
1
+ import React from 'react';
2
+ export type GapProperty = 'gap' | 'rowGap' | 'columnGap';
3
+ export declare const GAP_SIZE_MAP: {
4
+ mini: string;
5
+ small: string;
6
+ medium: string;
7
+ large: string;
8
+ };
9
+ export type SizeType = keyof typeof GAP_SIZE_MAP;
10
+ export type GapType = SizeType | React.CSSProperties['gap'];
11
+ /**
12
+ * @title Flex
13
+ * @description Flex布局组件属性
14
+ */
15
+ export interface FlexProps extends React.HTMLAttributes<HTMLElement> {
16
+ /**
17
+ * @zh 布局方向
18
+ */
19
+ direction?: React.CSSProperties['flexDirection'];
20
+ /**
21
+ * @zh 换行方式
22
+ * @en Flex wrap style
23
+ */
24
+ wrap?: boolean | React.CSSProperties['flexWrap'];
25
+ /**
26
+ * @zh 主轴对齐方式
27
+ * @en Justify content alignment
28
+ */
29
+ justify?: React.CSSProperties['justifyContent'];
30
+ /**
31
+ * @zh 交叉轴对齐方式
32
+ * @en Align items alignment
33
+ */
34
+ align?: React.CSSProperties['alignItems'];
35
+ /**
36
+ * @zh flex属性
37
+ * @en Flex property
38
+ */
39
+ flex?: React.CSSProperties['flex'];
40
+ /**
41
+ * @zh 间距大小
42
+ * @en Gap size
43
+ * @default small
44
+ * @values 'mini', 'small', 'medium', 'large', string, number
45
+ */
46
+ gap?: GapType;
47
+ /**
48
+ * @zh 自定义渲染元素
49
+ * @en Custom component type
50
+ */
51
+ component?: React.ElementType;
52
+ /**
53
+ * @zh 是否启用RTL模式
54
+ * @en Whether to enable RTL mode
55
+ */
56
+ rtl?: boolean;
57
+ /**
58
+ * @zh 子元素
59
+ * @en Children elements
60
+ */
61
+ children: React.ReactNode;
62
+ }
@@ -1,2 +1,7 @@
1
+ import React from 'react';
2
+ import type { SpeechSynthesisHandles, SpeechSynthesisProps } from './interface';
3
+ declare const withSpeechSynthesis: {
4
+ <P extends object>(WrappedComponent: React.ComponentType<P>): React.MemoExoticComponent<React.ForwardRefExoticComponent<React.PropsWithoutRef<SpeechSynthesisProps & P> & React.RefAttributes<SpeechSynthesisHandles>>>;
5
+ displayName: string;
6
+ };
1
7
  export default withSpeechSynthesis;
2
- declare function withSpeechSynthesis(WrappedComponent: any): import("react").MemoExoticComponent<import("react").ForwardRefExoticComponent<Omit<any, "ref"> & import("react").RefAttributes<any>>>;
@@ -0,0 +1,13 @@
1
+ export interface SpeechSynthesisProps {
2
+ useButton?: boolean;
3
+ buttonProps?: Record<string, any>;
4
+ getText?: () => string;
5
+ text?: string;
6
+ iconProps?: Record<string, any>;
7
+ }
8
+ export interface SpeechSynthesisHandles {
9
+ cancel: () => void;
10
+ speak: () => void;
11
+ pause: () => void;
12
+ resume: () => void;
13
+ }
@@ -1,9 +1,9 @@
1
- import React from 'react';
2
1
  import { SpaceGap, SpaceProps } from './interface';
3
- declare const Space: React.ForwardRefExoticComponent<SpaceProps & React.RefAttributes<unknown>> & {
4
- Vertical: typeof SpaceVertical;
2
+ declare const SpaceVertical: import("react").ForwardRefExoticComponent<SpaceProps & import("react").RefAttributes<HTMLDivElement>>;
3
+ declare const Space: import("react").ForwardRefExoticComponent<SpaceProps & import("react").RefAttributes<HTMLDivElement>> & {
4
+ displayName: string;
5
+ Vertical: import("react").ForwardRefExoticComponent<SpaceProps & import("react").RefAttributes<HTMLDivElement>>;
5
6
  };
6
- declare const SpaceVertical: React.ForwardRefExoticComponent<SpaceProps & React.RefAttributes<unknown>>;
7
7
  export { SpaceVertical };
8
8
  export default Space;
9
9
  export type { SpaceGap, SpaceProps };
@@ -1,35 +1,30 @@
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';
4
- /**
5
- * @title Space
6
- */
3
+ export type AlignItems = 'start' | 'end' | 'center' | 'baseline';
4
+ export type JustifyContent = 'start' | 'end' | 'center' | 'baseline' | 'space-between';
5
+ export type Direction = 'vertical' | 'horizontal';
7
6
  export interface SpaceProps {
8
7
  style?: CSSProperties;
9
8
  className?: string | string[];
10
9
  /**
11
10
  * @zh 交叉轴方向对齐方式
12
- * @en Alignment of items
13
11
  */
14
- align?: AlignItemsProps;
12
+ align?: AlignItems;
15
13
  /**
16
14
  * @zh 属性 align 的别名
17
15
  */
18
- alignItems?: AlignItemsProps;
16
+ alignItems?: AlignItems;
19
17
  /**
20
18
  * @zh 主轴方向上对齐方式
21
- * @en Alignment of items
22
19
  */
23
- justifyContent?: 'start' | 'end' | 'center' | 'baseline' | 'space-between';
20
+ justifyContent?: JustifyContent;
24
21
  /**
25
22
  * @zh 方向
26
- * @en The direction
27
23
  * @defaultValue horizontal
28
24
  */
29
- direction?: 'vertical' | 'horizontal';
25
+ direction?: Direction;
30
26
  /**
31
- * @zh 尺寸。
32
- * @en The space size.
27
+ * @zh 尺寸
33
28
  * @defaultValue small
34
29
  */
35
30
  size?: SpaceGap | SpaceGap[];
@@ -38,22 +33,19 @@ export interface SpaceProps {
38
33
  */
39
34
  gap?: SpaceGap | SpaceGap[];
40
35
  /**
41
- * @zh 环绕类型的间距,用于折行的场景。
42
- * @en Whether to wrap line automatic
36
+ * @zh 是否自动折行
43
37
  */
44
38
  wrap?: boolean;
45
39
  /**
46
40
  * @zh 设置分隔符
47
- * @en Set separator
48
41
  */
49
42
  split?: ReactNode;
50
43
  /**
51
- * @zh 包裹元素
44
+ * @zh 子元素
52
45
  */
53
46
  children?: ReactNode;
54
47
  /**
55
48
  * @zh 是否启用RTL模式
56
- * @en Whether to enable RTL mode
57
49
  */
58
50
  rtl?: boolean;
59
51
  }