@unicom-cloud/ui 0.8.99 → 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 (293) hide show
  1. package/Anchor.js +3 -1
  2. package/Badge.js +7 -6
  3. package/Copy.js +49 -2
  4. package/Details.js +13 -2
  5. package/Divider.js +3 -2
  6. package/Flex.js +22 -0
  7. package/Grid.js +1 -1
  8. package/LiquidFill.js +3 -2
  9. package/Loading.js +16 -3
  10. package/Marquee.js +3 -2
  11. package/QrCode.js +3 -2
  12. package/Space.js +3 -3
  13. package/Splitter.js +5 -5
  14. package/SuspenseFallbackTest.js +2 -4
  15. package/Tag.js +3 -2
  16. package/Tour.js +3 -2
  17. package/alert/index.js +61 -64
  18. package/anchor/index.js +5 -3
  19. package/back-top/index.js +32 -33
  20. package/badge/index.js +19 -18
  21. package/calendar/index.js +85 -84
  22. package/components/common/development/index.js +44 -29
  23. package/components/common/empty/index.js +35 -23
  24. package/components/common/flex/index.js +64 -0
  25. package/components/common/flex/interface.js +9 -0
  26. package/components/common/higher-order/with-speech-synthesis/index.js +79 -55
  27. package/components/common/space/index.js +71 -91
  28. package/components/common/suspense-fallback-test/index.js +16 -0
  29. package/components/common/utils/toArray.js +12 -0
  30. package/copy/index.js +83 -35
  31. package/details/index.js +102 -62
  32. package/divider/index.js +27 -21
  33. package/empty/index.js +13 -13
  34. package/flex/index.js +47 -0
  35. package/flex/interface.js +1 -0
  36. package/grid/{GridItem.js → Item.js} +15 -15
  37. package/grid/index.js +1 -1
  38. package/icon/interface.js +1 -0
  39. package/icon-hover/interface.js +1 -0
  40. package/index.js +610 -599
  41. package/input/Button.js +39 -34
  42. package/input/Textarea.js +108 -104
  43. package/liquid-fill/index.js +3 -2
  44. package/loading/index.js +72 -53
  45. package/loading/interface.js +1 -0
  46. package/marquee/index.js +3 -2
  47. package/modal/Modal.js +73 -74
  48. package/package.json +1 -1
  49. package/portal/interface.js +1 -0
  50. package/qr-code/index.js +3 -2
  51. package/segmented/index.js +113 -105
  52. package/space/index.js +41 -35
  53. package/speech-synthesis/interface.js +1 -0
  54. package/spin/index.js +75 -62
  55. package/splitter/Panel.js +39 -0
  56. package/splitter/SplitBar.js +157 -0
  57. package/splitter/Splitter.js +135 -0
  58. package/splitter/hooks/useEvent.js +12 -0
  59. package/splitter/hooks/useItems.js +26 -0
  60. package/splitter/hooks/useResizable.js +26 -0
  61. package/splitter/hooks/useResize.js +68 -0
  62. package/splitter/hooks/useSizes.js +60 -0
  63. package/splitter/index.js +6 -115
  64. package/style.css +1 -1
  65. package/suspense-fallback-test/index.js +2 -11
  66. package/suspense-fallback-test/interface.js +1 -0
  67. package/table/Table.js +38 -38
  68. package/table/hook/useThResizable.js +72 -26
  69. package/table/tbody/Td.js +80 -77
  70. package/table/th-resizable/index.js +92 -35
  71. package/tag/index.js +42 -41
  72. package/tooltip/index.js +89 -82
  73. package/tour/index.js +5 -6
  74. package/trigger/index.js +67 -70
  75. package/types/common/development/index.d.ts +7 -1
  76. package/types/common/development/interface.d.ts +22 -0
  77. package/types/common/empty/index.d.ts +2 -1
  78. package/types/common/flex/index.d.ts +14 -0
  79. package/types/common/flex/interface.d.ts +62 -0
  80. package/types/common/higher-order/with-speech-synthesis/index.d.ts +6 -1
  81. package/types/common/higher-order/with-speech-synthesis/interface.d.ts +13 -0
  82. package/types/common/space/index.d.ts +4 -3
  83. package/types/common/space/interface.d.ts +10 -18
  84. package/types/common/suspense-fallback-test/index.d.ts +7 -0
  85. package/types/common/suspense-fallback-test/interface.d.ts +1 -0
  86. package/types/common/utils/PqbCSSTransition.d.ts +1 -1
  87. package/types/common/utils/toArray.d.ts +13 -0
  88. package/types/pc/affix/interface.d.ts +0 -2
  89. package/types/pc/alert/index.d.ts +3 -2
  90. package/types/pc/alert/interface.d.ts +7 -1
  91. package/types/pc/anchor/index.d.ts +2 -1
  92. package/types/pc/anchor/interface.d.ts +0 -2
  93. package/types/pc/auto-complete/interface.d.ts +0 -6
  94. package/types/pc/avatar/interface.d.ts +0 -4
  95. package/types/pc/badge/Count.d.ts +1 -1
  96. package/types/pc/breadcrumb/Item.d.ts +1 -1
  97. package/types/pc/breadcrumb/interface.d.ts +0 -3
  98. package/types/pc/calendar/Month.d.ts +1 -1
  99. package/types/pc/calendar/WeekList.d.ts +1 -1
  100. package/types/pc/calendar/Year.d.ts +1 -1
  101. package/types/pc/calendar/header/Panel.d.ts +1 -1
  102. package/types/pc/calendar/header/index.d.ts +1 -1
  103. package/types/pc/calendar/index.d.ts +1 -1
  104. package/types/pc/calendar/interface.d.ts +2 -1
  105. package/types/pc/carousel/interface.d.ts +2 -6
  106. package/types/pc/cascader/interface.d.ts +7 -19
  107. package/types/pc/cascader/panel/List.d.ts +1 -1
  108. package/types/pc/cascader/panel/Option.d.ts +1 -1
  109. package/types/pc/cascader/panel/Search.d.ts +1 -1
  110. package/types/pc/checkbox/Group.d.ts +2 -2
  111. package/types/pc/checkbox/GroupBlock.d.ts +1 -1
  112. package/types/pc/checkbox/IconCheck.d.ts +1 -1
  113. package/types/pc/checkbox/interface.d.ts +0 -1
  114. package/types/pc/collapse/interface.d.ts +0 -2
  115. package/types/pc/color-picker/InputRgb.d.ts +1 -1
  116. package/types/pc/color-picker/Palette.d.ts +1 -1
  117. package/types/pc/color-picker/interface.d.ts +0 -2
  118. package/types/pc/config-provider/ConfigProvider.d.ts +1 -1
  119. package/types/pc/config-provider/interface.d.ts +17 -17
  120. package/types/pc/copy/index.d.ts +1 -1
  121. package/types/pc/copy/interface.d.ts +2 -1
  122. package/types/pc/date-picker/interface.d.ts +0 -17
  123. package/types/pc/date-picker/panel/Body.d.ts +1 -1
  124. package/types/pc/date-picker/panel/Footer.d.ts +1 -1
  125. package/types/pc/date-picker/panel/Header.d.ts +1 -1
  126. package/types/pc/date-picker/panel/WeekList.d.ts +1 -1
  127. package/types/pc/date-picker/panel/date/index.d.ts +1 -1
  128. package/types/pc/date-picker/panel/month/index.d.ts +1 -1
  129. package/types/pc/date-picker/panel/quarter/index.d.ts +1 -1
  130. package/types/pc/date-picker/panel/range/index.d.ts +1 -1
  131. package/types/pc/date-picker/panel/week/index.d.ts +1 -1
  132. package/types/pc/date-picker/panel/year/index.d.ts +1 -1
  133. package/types/pc/descriptions/index.d.ts +1 -1
  134. package/types/pc/descriptions/interface.d.ts +0 -1
  135. package/types/pc/details/index.d.ts +3 -2
  136. package/types/pc/details/interface.d.ts +16 -0
  137. package/types/pc/development/index.d.ts +2 -1
  138. package/types/pc/development/interface.d.ts +15 -0
  139. package/types/pc/divider/index.d.ts +7 -2
  140. package/types/pc/draggable/Item.d.ts +1 -1
  141. package/types/pc/draggable/index.d.ts +1 -1
  142. package/types/pc/drawer/interface.d.ts +0 -7
  143. package/types/pc/dropdown/interface.d.ts +0 -1
  144. package/types/pc/flex/index.d.ts +9 -0
  145. package/types/pc/flex/interface.d.ts +16 -0
  146. package/types/pc/form/Control.d.ts +1 -1
  147. package/types/pc/form/FormList.d.ts +1 -1
  148. package/types/pc/form/IconSymbol.d.ts +1 -1
  149. package/types/pc/form/interface.d.ts +9 -22
  150. package/types/pc/form/util.d.ts +1 -1
  151. package/types/pc/grid/index.d.ts +3 -3
  152. package/types/pc/grid/interface.d.ts +1 -6
  153. package/types/pc/icon/addFromIconFontCn.d.ts +1 -7
  154. package/types/pc/icon/index.d.ts +2 -7
  155. package/types/pc/icon/interface.d.ts +13 -0
  156. package/types/pc/icon-hover/index.d.ts +2 -8
  157. package/types/pc/icon-hover/interface.d.ts +8 -0
  158. package/types/pc/image/ImageFooter.d.ts +1 -1
  159. package/types/pc/image/ImagePreviewArrow.d.ts +1 -1
  160. package/types/pc/image/TriggerForToolbar.d.ts +1 -1
  161. package/types/pc/image/interface.d.ts +0 -13
  162. package/types/pc/index.d.ts +63 -50
  163. package/types/pc/input/Textarea.d.ts +2 -6
  164. package/types/pc/input/interface.d.ts +5 -13
  165. package/types/pc/input-number/interface.d.ts +0 -4
  166. package/types/pc/input-tag/interface.d.ts +0 -13
  167. package/types/pc/layout/interface.d.ts +0 -1
  168. package/types/pc/link/interface.d.ts +0 -1
  169. package/types/pc/list/interface.d.ts +0 -4
  170. package/types/pc/loading/index.d.ts +4 -3
  171. package/types/pc/loading/interface.d.ts +6 -0
  172. package/types/pc/menu/Indent.d.ts +1 -1
  173. package/types/pc/menu/OverflowWrap.d.ts +1 -1
  174. package/types/pc/menu/interface.d.ts +0 -8
  175. package/types/pc/menu/sub-menu/Inline.d.ts +1 -1
  176. package/types/pc/menu/sub-menu/Pop.d.ts +1 -1
  177. package/types/pc/message/interface.d.ts +0 -2
  178. package/types/pc/modal/interface.d.ts +0 -5
  179. package/types/pc/notification/interface.d.ts +0 -1
  180. package/types/pc/overflow-ellipsis/OverflowItem.d.ts +1 -1
  181. package/types/pc/overflow-ellipsis/index.d.ts +1 -1
  182. package/types/pc/pagination/PageItem.d.ts +3 -3
  183. package/types/pc/pagination/PageJumper.d.ts +1 -1
  184. package/types/pc/pagination/PageOption.d.ts +1 -1
  185. package/types/pc/pagination/interface.d.ts +0 -2
  186. package/types/pc/popconfirm/interface.d.ts +8 -10
  187. package/types/pc/popover/interface.d.ts +0 -1
  188. package/types/pc/portal/Portal.d.ts +2 -6
  189. package/types/pc/portal/index.d.ts +2 -9
  190. package/types/pc/portal/interface.d.ts +14 -0
  191. package/types/pc/progress/CircleProgress.d.ts +1 -1
  192. package/types/pc/progress/LineProgess.d.ts +1 -1
  193. package/types/pc/progress/StepProgress.d.ts +1 -1
  194. package/types/pc/progress/interface.d.ts +0 -3
  195. package/types/pc/radio/Group.d.ts +2 -2
  196. package/types/pc/radio/GroupBlock.d.ts +1 -1
  197. package/types/pc/radio/Radio.d.ts +1 -1
  198. package/types/pc/resize-box/ResizeTrigger.d.ts +1 -1
  199. package/types/pc/resize-box/interface.d.ts +1 -7
  200. package/types/pc/result/403.d.ts +1 -1
  201. package/types/pc/result/404.d.ts +1 -1
  202. package/types/pc/result/500.d.ts +1 -1
  203. package/types/pc/segmented/interface.d.ts +6 -6
  204. package/types/pc/select/interface.d.ts +0 -12
  205. package/types/pc/select-view/interface.d.ts +0 -7
  206. package/types/pc/skeleton/Image.d.ts +1 -1
  207. package/types/pc/skeleton/Text.d.ts +2 -1
  208. package/types/pc/slider/Button.d.ts +1 -1
  209. package/types/pc/slider/Input.d.ts +1 -1
  210. package/types/pc/slider/Tick.d.ts +1 -1
  211. package/types/pc/slider/interface.d.ts +0 -4
  212. package/types/pc/space/index.d.ts +7 -5
  213. package/types/pc/speech-synthesis/index.d.ts +3 -1
  214. package/types/pc/speech-synthesis/interface.d.ts +7 -0
  215. package/types/pc/spin/DotLoading.d.ts +1 -1
  216. package/types/pc/spin/interface.d.ts +4 -1
  217. package/types/pc/splitter/Panel.d.ts +8 -0
  218. package/types/pc/splitter/SplitBar.d.ts +21 -0
  219. package/types/pc/splitter/Splitter.d.ts +4 -0
  220. package/types/pc/splitter/hooks/useEvent.d.ts +3 -0
  221. package/types/pc/splitter/hooks/useItems.d.ts +10 -0
  222. package/types/pc/splitter/hooks/useResizable.d.ts +8 -0
  223. package/types/pc/splitter/hooks/useResize.d.ts +4 -0
  224. package/types/pc/splitter/hooks/useSizes.d.ts +5 -0
  225. package/types/pc/splitter/index.d.ts +8 -3
  226. package/types/pc/splitter/interface.d.ts +181 -38
  227. package/types/pc/statistic/interface.d.ts +0 -4
  228. package/types/pc/steps/interface.d.ts +0 -3
  229. package/types/pc/suspense-fallback-test/index.d.ts +2 -3
  230. package/types/pc/suspense-fallback-test/interface.d.ts +2 -0
  231. package/types/pc/table/ColGroup.d.ts +1 -1
  232. package/types/pc/table/hook/useThResizable.d.ts +2 -2
  233. package/types/pc/table/interface.d.ts +4 -15
  234. package/types/pc/table/summary/Cell.d.ts +1 -1
  235. package/types/pc/table/summary/Row.d.ts +1 -1
  236. package/types/pc/table/tbody/Td.d.ts +1 -1
  237. package/types/pc/table/tbody/index.d.ts +1 -1
  238. package/types/pc/table/tfoot/index.d.ts +1 -1
  239. package/types/pc/table/th-resizable/index.d.ts +1 -1
  240. package/types/pc/table/thead/Column.d.ts +1 -1
  241. package/types/pc/table/thead/index.d.ts +1 -1
  242. package/types/pc/tabs/TabContent.d.ts +1 -1
  243. package/types/pc/tabs/interface.d.ts +0 -7
  244. package/types/pc/tabs/tab-header/DropdownIcon.d.ts +1 -1
  245. package/types/pc/tabs/tab-header/TabInk.d.ts +1 -1
  246. package/types/pc/tabs/tab-header/TabNavIcon.d.ts +1 -1
  247. package/types/pc/tag/index.d.ts +2 -0
  248. package/types/pc/tag/interface.d.ts +0 -1
  249. package/types/pc/time-picker/Picker.d.ts +1 -1
  250. package/types/pc/time-picker/RangePicker.d.ts +1 -1
  251. package/types/pc/time-picker/TimeColumn.d.ts +1 -1
  252. package/types/pc/time-picker/TimePicker.d.ts +1 -1
  253. package/types/pc/time-picker/index.d.ts +1 -1
  254. package/types/pc/time-picker/interface.d.ts +0 -7
  255. package/types/pc/tooltip/interface.d.ts +4 -1
  256. package/types/pc/transfer/Item.d.ts +1 -1
  257. package/types/pc/transfer/List.d.ts +1 -1
  258. package/types/pc/transfer/interface.d.ts +2 -9
  259. package/types/pc/tree/Animation.d.ts +1 -1
  260. package/types/pc/tree/interface.d.ts +2 -8
  261. package/types/pc/tree-select/interface.d.ts +0 -8
  262. package/types/pc/trigger/interface.d.ts +0 -5
  263. package/types/pc/typography/EditContent.d.ts +2 -1
  264. package/types/pc/typography/Operations.d.ts +1 -1
  265. package/types/pc/typography/interface.d.ts +45 -30
  266. package/types/pc/upload/interface.d.ts +6 -11
  267. package/types/pc/upload/list/index.d.ts +1 -1
  268. package/types/pc/utils/index.d.ts +1 -0
  269. package/types/pc/utils/names.d.ts +6 -0
  270. package/types/pc/utils/toArray.d.ts +3 -0
  271. package/types/pc/verification-code/VerificationCode.d.ts +1 -1
  272. package/types/pc/verification-code/interface.d.ts +0 -2
  273. package/types/pc/virtual-list/VirtualList.d.ts +2 -38
  274. package/types/pc/virtual-list/index.d.ts +2 -1
  275. package/types/pc/virtual-list/interface.d.ts +56 -0
  276. package/types/pc/watermark/Watermark.d.ts +1 -1
  277. package/types/pc/watermark/interface.d.ts +0 -2
  278. package/typography/Base.js +73 -73
  279. package/typography/EditContent.js +43 -33
  280. package/typography/Ellipsis.js +117 -184
  281. package/typography/Operations.js +97 -49
  282. package/typography/useCssEllipsis.js +7 -6
  283. package/utils/index.js +117 -115
  284. package/utils/names.js +4 -0
  285. package/utils/toArray.js +5 -0
  286. package/version/index.js +1 -1
  287. package/virtual-list/interface.js +1 -0
  288. package/components/common/space/toArray.js +0 -11
  289. package/loading/style/index.module.less.js +0 -4
  290. package/types/common/space/toArray.d.ts +0 -3
  291. package/types/pc/suspense-fallback-test/style/index.d.ts +0 -1
  292. /package/{suspense-fallback-test/style/index.less.js → development/interface.js} +0 -0
  293. /package/types/pc/grid/{GridItem.d.ts → Item.d.ts} +0 -0
package/details/index.js CHANGED
@@ -1,81 +1,121 @@
1
- import { jsxs as a, jsx as o } from "react/jsx-runtime";
2
- import v from "@unicom-cloud/icons/IconUiCheckCircleFill";
3
- import F from "@unicom-cloud/icons/IconUiCloseCircleFill";
4
- import P from "@unicom-cloud/icons/IconUiDown";
5
- import b from "@unicom-cloud/icons/IconUiExclamationCircleFill";
6
- import c from "@unicom-cloud/icons/IconUiInfoCircleFill";
7
- import { forwardRef as j, useContext as S, useState as k } from "react";
1
+ import { jsxs as p, jsx as o } from "react/jsx-runtime";
2
+ import b from "@unicom-cloud/icons/IconUiCheckCircleFill";
3
+ import j from "@unicom-cloud/icons/IconUiCloseCircleFill";
4
+ import T from "@unicom-cloud/icons/IconUiDown";
5
+ import M from "@unicom-cloud/icons/IconUiExclamationCircleFill";
6
+ import f from "@unicom-cloud/icons/IconUiInfoCircleFill";
7
+ import { forwardRef as R, useContext as _, useState as q, useEffect as z } from "react";
8
8
  import "../config-provider/ConfigProvider.js";
9
- import E from "../components/common/hooks/useMergeProps.js";
10
- import m from "@unicom-cloud/utils/class-name";
11
- import M from "../config-provider/context.js";
12
- const R = {
9
+ import "lodash/isEqualWith";
10
+ import "../components/common/utils/is.js";
11
+ import "@unicom-cloud/utils/constant/keyboardCode";
12
+ import "lodash/isNumber";
13
+ import "lodash/merge";
14
+ import "../components/common/utils/dom.js";
15
+ import "../components/common/hooks/useIntersectionObserver.js";
16
+ import A from "../components/common/hooks/useMergeProps.js";
17
+ import "../components/common/utils/reactDOM.js";
18
+ import "@unicom-cloud/utils/constant";
19
+ import B from "../components/common/hooks/useUpdateEffect.js";
20
+ import "lodash/debounce";
21
+ import d from "@unicom-cloud/utils/class-name";
22
+ import G from "../config-provider/context.js";
23
+ const H = {
13
24
  type: "default"
14
25
  };
15
- function T(p, f) {
16
- const { getPrefixCls: d, componentConfig: u, rtl: C } = S(M), N = E(
17
- p,
18
- R,
19
- u?.Details
26
+ function J(u, C) {
27
+ const { getPrefixCls: N, componentConfig: $, rtl: g } = _(G), v = A(
28
+ u,
29
+ H,
30
+ $?.Details
20
31
  ), {
21
- style: $,
22
- className: g,
23
- type: t,
24
- title: s,
25
- content: r,
26
- icon: x,
27
- banner: h,
28
- ...y
29
- } = N, e = d?.("details"), [I, w] = k({}), n = x || {
30
- default: /* @__PURE__ */ o(c, {}),
31
- info: /* @__PURE__ */ o(c, {}),
32
- success: /* @__PURE__ */ o(v, {}),
33
- warning: /* @__PURE__ */ o(b, {}),
34
- error: /* @__PURE__ */ o(F, {})
35
- }[t], D = m(
32
+ style: h,
33
+ className: x,
34
+ type: s = "default",
35
+ title: l,
36
+ content: c,
37
+ icon: y,
38
+ banner: D,
39
+ open: t,
40
+ defaultOpen: I,
41
+ onOpen: U,
42
+ onClose: w,
43
+ ...F
44
+ } = v, e = N?.("details"), [k, a] = q({ open: !!I }), n = t === void 0 ? k.open : t, m = y || {
45
+ default: /* @__PURE__ */ o(f, {}),
46
+ info: /* @__PURE__ */ o(f, {}),
47
+ success: /* @__PURE__ */ o(b, {}),
48
+ warning: /* @__PURE__ */ o(M, {}),
49
+ error: /* @__PURE__ */ o(j, {})
50
+ }[s], E = d(
36
51
  e,
37
- `${e}-${t}`,
52
+ `${e}-${s}`,
38
53
  {
39
- [`${e}-banner`]: h,
40
- [`${e}-rtl`]: C
54
+ [`${e}-banner`]: D,
55
+ [`${e}-rtl`]: g
41
56
  },
42
- g
57
+ x
43
58
  );
44
- return /* @__PURE__ */ a(
59
+ B(() => (n ? U?.() : w?.(), () => {
60
+ }), [n]), z(() => {
61
+ if (t !== void 0)
62
+ return a((r) => {
63
+ const i = { ...r };
64
+ return i.open = t, i;
65
+ }), () => {
66
+ };
67
+ }, [t]);
68
+ const O = (r) => {
69
+ if (t !== void 0) {
70
+ r.preventDefault();
71
+ return;
72
+ }
73
+ const i = r.target;
74
+ a((S) => ({
75
+ ...S,
76
+ open: i.open
77
+ }));
78
+ }, P = (r) => {
79
+ t !== void 0 && r.preventDefault();
80
+ };
81
+ return /* @__PURE__ */ p(
45
82
  "details",
46
83
  {
47
- ref: f,
48
- style: $,
49
- className: D,
84
+ ref: C,
85
+ style: h,
86
+ className: E,
50
87
  role: "details",
51
- onToggle: (i) => {
52
- i.target?.open, w((U) => {
53
- const l = { ...U };
54
- return l.open = i.target?.open, l;
55
- });
56
- },
57
- ...y,
88
+ open: n,
89
+ onToggle: O,
90
+ ...F,
58
91
  children: [
59
- /* @__PURE__ */ a("summary", { className: `${e}-summary-wrapper`, children: [
60
- n && /* @__PURE__ */ o("div", { className: `${e}-icon`, children: n }),
61
- s && /* @__PURE__ */ o("div", { className: `${e}-title`, children: s }),
62
- /* @__PURE__ */ o(
63
- P,
64
- {
65
- className: m(
66
- `${e}-collapse-icon`,
67
- I.open && `${e}-collapse-icon-open`
92
+ /* @__PURE__ */ p(
93
+ "summary",
94
+ {
95
+ className: `${e}-summary-wrapper`,
96
+ onClick: P,
97
+ children: [
98
+ m && /* @__PURE__ */ o("div", { className: `${e}-icon`, children: m }),
99
+ l && /* @__PURE__ */ o("div", { className: `${e}-title`, children: l }),
100
+ /* @__PURE__ */ o(
101
+ T,
102
+ {
103
+ className: d(
104
+ `${e}-collapse-icon`,
105
+ n && `${e}-collapse-icon-open`
106
+ )
107
+ }
68
108
  )
69
- }
70
- )
71
- ] }),
72
- /* @__PURE__ */ o("div", { className: `${e}-content-wrapper`, children: r && /* @__PURE__ */ o("div", { className: `${e}-content`, children: r }) })
109
+ ]
110
+ }
111
+ ),
112
+ /* @__PURE__ */ o("div", { className: `${e}-content-wrapper`, children: c && /* @__PURE__ */ o("div", { className: `${e}-content`, children: c }) })
73
113
  ]
74
114
  }
75
115
  );
76
116
  }
77
- const _ = j(T);
78
- _.displayName = "Details";
117
+ const K = R(J);
118
+ K.displayName = "Details";
79
119
  export {
80
- _ as default
120
+ K as default
81
121
  };
package/divider/index.js CHANGED
@@ -1,41 +1,47 @@
1
1
  import { jsx as s } from "react/jsx-runtime";
2
- import { forwardRef as x, useContext as $ } from "react";
2
+ import { forwardRef as l, useContext as v } from "react";
3
3
  import "../config-provider/ConfigProvider.js";
4
- import u from "../components/common/hooks/useMergeProps.js";
4
+ import N from "../components/common/hooks/useMergeProps.js";
5
5
  import C from "@unicom-cloud/utils/class-name";
6
- import N from "../config-provider/context.js";
7
- const h = {
6
+ import h from "../config-provider/context.js";
7
+ const y = {
8
8
  type: "horizontal",
9
9
  orientation: "center"
10
10
  };
11
- function v(i, n) {
12
- const { getPrefixCls: a, componentConfig: m } = $(N), l = u(
13
- i,
14
- h,
15
- m?.Divider
16
- ), { children: e, style: p, className: c, type: r, orientation: o, ...f } = l, t = a?.("divider"), d = C(
11
+ function D(r, o) {
12
+ const { getPrefixCls: m, componentConfig: p } = v(h), d = N(
13
+ r,
14
+ y,
15
+ p?.Divider
16
+ ), { children: e, style: f, className: x, type: n, orientation: i, ...$ } = d, t = m?.("divider"), u = C(
17
17
  t,
18
- `${t}-${r}`,
18
+ `${t}-${n}`,
19
19
  {
20
20
  [`${t}-with-text`]: e,
21
- [`${t}-with-text-${o}`]: e && o
21
+ [`${t}-with-text-${i}`]: e && i
22
22
  },
23
- c
23
+ x
24
24
  );
25
25
  return /* @__PURE__ */ s(
26
26
  "div",
27
27
  {
28
28
  role: "separator",
29
- ref: n,
30
- className: d,
31
- style: p,
32
- ...f,
33
- children: e && r === "horizontal" ? /* @__PURE__ */ s("span", { className: `${t}-text ${t}-text-${o}`, children: e }) : null
29
+ ref: o,
30
+ className: u,
31
+ style: f,
32
+ ...$,
33
+ children: e && n === "horizontal" ? /* @__PURE__ */ s("span", { className: `${t}-text ${t}-text-${i}`, children: e }) : null
34
34
  }
35
35
  );
36
36
  }
37
- const g = x(v);
38
- g.displayName = "Divider";
37
+ const a = l(
38
+ D
39
+ );
40
+ a.displayName = "Divider";
41
+ const c = l((r, o) => /* @__PURE__ */ s(a, { ref: o, type: "vertical", ...r }));
42
+ c.displayName = "DividerVertical";
43
+ a.Vertical = c;
39
44
  export {
40
- g as default
45
+ c as DividerVertical,
46
+ a as default
41
47
  };
package/empty/index.js CHANGED
@@ -1,23 +1,23 @@
1
- import { jsx as f } from "react/jsx-runtime";
2
- import { memo as a, forwardRef as c, useContext as l } from "react";
3
- import y from "../components/common/empty/index.js";
1
+ import { jsx as a } from "react/jsx-runtime";
2
+ import { memo as f, forwardRef as c, useContext as l } from "react";
3
+ import { Empty as y } from "../components/common/empty/index.js";
4
4
  import "../config-provider/ConfigProvider.js";
5
5
  import C from "../components/common/hooks/useMergeProps.js";
6
6
  import x from "../config-provider/context.js";
7
- function g(o, t) {
7
+ function E(o, t) {
8
8
  const {
9
- getPrefixCls: r,
10
- locale: e,
11
- componentConfig: m
9
+ getPrefixCls: m,
10
+ locale: r,
11
+ componentConfig: e
12
12
  } = l(x), p = C(
13
13
  o,
14
14
  {},
15
- m?.Empty
16
- ), { ...n } = p, s = r?.("empty"), i = e.Empty.noData;
17
- return /* @__PURE__ */ f(y, { ref: t, prefixCls: s, description: i, ...n });
15
+ e?.Empty
16
+ ), { ...n } = p, s = m?.("empty"), i = r.Empty.noData;
17
+ return /* @__PURE__ */ a(y, { ref: t, prefixCls: s, description: i, ...n });
18
18
  }
19
- const u = a(c(g));
20
- u.displayName = "Empty";
19
+ const g = f(c(E));
20
+ g.displayName = "Empty";
21
21
  export {
22
- u as default
22
+ g as default
23
23
  };
package/flex/index.js ADDED
@@ -0,0 +1,47 @@
1
+ import { jsx as e } from "react/jsx-runtime";
2
+ import { forwardRef as m, useContext as x } from "react";
3
+ import d from "../components/common/flex/index.js";
4
+ import "../config-provider/ConfigProvider.js";
5
+ import "lodash/isEqualWith";
6
+ import "../components/common/utils/is.js";
7
+ import "@unicom-cloud/utils/constant/keyboardCode";
8
+ import "lodash/isNumber";
9
+ import "lodash/merge";
10
+ import "../components/common/utils/dom.js";
11
+ import "../components/common/hooks/useIntersectionObserver.js";
12
+ import C from "../components/common/hooks/useMergeProps.js";
13
+ import "../components/common/utils/reactDOM.js";
14
+ import "@unicom-cloud/utils/constant";
15
+ import "lodash/debounce";
16
+ import F from "@unicom-cloud/utils/class-name";
17
+ import u from "../config-provider/context.js";
18
+ const N = {
19
+ children: void 0
20
+ }, r = m(
21
+ (o, t) => {
22
+ const { getPrefixCls: s, componentConfig: p, rtl: l } = x(u), n = C(
23
+ o,
24
+ N,
25
+ p?.Flex
26
+ ), { className: a, ...c } = n, f = s?.("flex");
27
+ return /* @__PURE__ */ e(
28
+ d,
29
+ {
30
+ ref: t,
31
+ className: F(f, a),
32
+ rtl: l,
33
+ ...c
34
+ }
35
+ );
36
+ }
37
+ );
38
+ r.displayName = "Flex";
39
+ const i = m((o, t) => /* @__PURE__ */ e(r, { ref: t, direction: "column", ...o }));
40
+ i.displayName = "FlexVertical";
41
+ const B = Object.assign(r, {
42
+ Vertical: i
43
+ });
44
+ export {
45
+ i as FlexVertical,
46
+ B as default
47
+ };
@@ -0,0 +1 @@
1
+
@@ -15,27 +15,27 @@ const U = {
15
15
  span: 1
16
16
  };
17
17
  function W($, g) {
18
- const { getPrefixCls: G, componentConfig: _, rtl: y } = p(K), i = q(
18
+ const { getPrefixCls: _, componentConfig: y, rtl: S } = p(K), a = q(
19
19
  $,
20
20
  U,
21
- _?.["Grid.GridItem"]
21
+ y?.["Grid.Item"]
22
22
  ), {
23
- children: a,
24
- className: S,
23
+ children: i,
24
+ className: G,
25
25
  style: v,
26
26
  offset: N,
27
27
  span: D,
28
28
  __index__: s
29
- } = i, r = p(A), { collectItemData: R, removeItemData: E } = p(
29
+ } = a, n = p(A), { collectItemData: R, removeItemData: E } = p(
30
30
  H
31
- ), { colGap: f, cols: l, displayIndexList: P, overflow: u } = r, d = C(N, 0), n = C(D, 1), x = G?.("grid-item"), w = P?.includes(s), M = {
31
+ ), { colGap: f, cols: l, displayIndexList: P, overflow: u } = n, d = C(N, 0), r = C(D, 1), x = _?.("grid-item"), w = P?.includes(s), M = {
32
32
  [`${x}`]: !0,
33
- [`${x}-rtl`]: y
34
- }, b = z(M, S), e = c(() => J(r.cols, {
35
- suffix: !!i.suffix,
36
- span: n,
33
+ [`${x}-rtl`]: S
34
+ }, b = z(M, G), e = c(() => J(n.cols, {
35
+ suffix: !!a.suffix,
36
+ span: r,
37
37
  offset: d
38
- }), [r.cols, i.suffix, n, d]);
38
+ }), [n.cols, a.suffix, r, d]);
39
39
  k(() => (R(s, e), () => {
40
40
  E(s);
41
41
  }), [s, e]);
@@ -47,8 +47,8 @@ function W($, g) {
47
47
  }, [e, f]), L = c(() => {
48
48
  const { suffix: t, span: o } = e;
49
49
  return t ? `${l - o + 1}` : `span ${o}`;
50
- }, [e, l]), j = !w || n === 0 ? { display: "none" } : {}, B = {
51
- gridColumn: `${L} / span ${n}`,
50
+ }, [e, l]), j = !w || r === 0 ? { display: "none" } : {}, B = {
51
+ gridColumn: `${L} / span ${r}`,
52
52
  ...F,
53
53
  ...j
54
54
  };
@@ -61,7 +61,7 @@ function W($, g) {
61
61
  ...B,
62
62
  ...v
63
63
  },
64
- children: Q(a) ? a({ overflow: u }) : m.Children.map(a, (t) => t && r.collapsed && m.isValidElement(t) && !T(t.type) ? m.cloneElement(t, {
64
+ children: Q(i) ? i({ overflow: u }) : m.Children.map(i, (t) => t && n.collapsed && m.isValidElement(t) && !T(t.type) ? m.cloneElement(t, {
65
65
  overflow: u,
66
66
  ...t.props
67
67
  }) : t)
@@ -69,7 +69,7 @@ function W($, g) {
69
69
  );
70
70
  }
71
71
  const X = V(W), I = X;
72
- I.displayName = "GridItem";
72
+ I.displayName = "Grid.Item";
73
73
  I.__PQB_GRID_ITEM__ = !0;
74
74
  export {
75
75
  I as default
package/grid/index.js CHANGED
@@ -1,6 +1,6 @@
1
1
  import m from "./Col.js";
2
2
  import r from "./Grid.js";
3
- import t from "./GridItem.js";
3
+ import t from "./Item.js";
4
4
  import i from "./Row.js";
5
5
  const o = r;
6
6
  o.Col = m;
@@ -0,0 +1 @@
1
+
@@ -0,0 +1 @@
1
+