@unicom-cloud/ui 0.8.101 → 0.8.103

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 (141) hide show
  1. package/Badge.js +7 -54
  2. package/Copy.js +6 -5
  3. package/LiquidFill.js +6 -5
  4. package/List.js +1 -1
  5. package/Marquee.js +6 -5
  6. package/QrCode.js +6 -5
  7. package/Tooltip.js +3 -4
  8. package/Tour.js +6 -5
  9. package/anchor/Anchor.js +12 -12
  10. package/anchor/util.js +10 -10
  11. package/back-top/index.js +7 -7
  12. package/badge/index.js +109 -162
  13. package/card/index.js +63 -43
  14. package/color-picker/InputHex.js +3 -4
  15. package/color-picker/InputRgb.js +7 -8
  16. package/color-picker/Palette.js +3 -4
  17. package/color-picker/Panel.js +3 -4
  18. package/color-picker/colors.js +5 -5
  19. package/color-picker/hooks/useColorPicker.js +3 -4
  20. package/color-picker/utils.js +14 -15
  21. package/components/common/space/index.js +24 -24
  22. package/components/common/utils/PqbCSSTransition.js +1 -1
  23. package/components/common/utils/constant.js +6 -3
  24. package/components/common/utils/reactDOM.js +6 -4
  25. package/components/common/utils/{scrollIntoView.js → scrollIntoViewIfNeeded.js} +1 -1
  26. package/components/common/utils/setPrimaryColor.js +18 -18
  27. package/components/common/utils/setTheme.js +8 -9
  28. package/copy/index.js +4 -3
  29. package/dist/scroll-into-view-if-needed/compute/index.js +126 -0
  30. package/dist/scroll-into-view-if-needed/smooth/index.js +70 -0
  31. package/dist/scroll-into-view-if-needed/src/index.js +19 -19
  32. package/form/FormItem.js +69 -65
  33. package/form/context.js +6 -7
  34. package/grid/Col-.js +86 -0
  35. package/grid/Col.js +156 -73
  36. package/grid/Grid.js +71 -67
  37. package/grid/Row.js +53 -44
  38. package/grid/index.js +13 -13
  39. package/index.js +639 -662
  40. package/input/Textarea.js +1 -1
  41. package/input/autoSizeTextAreaHeight.js +7 -7
  42. package/liquid-fill/index.js +6 -5
  43. package/liquid-fill/interface.js +1 -0
  44. package/list/index.js +1 -1
  45. package/marquee/index.js +141 -223
  46. package/marquee/interface.js +1 -0
  47. package/marquee-/index.js +260 -0
  48. package/marquee-/interface.js +1 -0
  49. package/menu/Item.js +9 -9
  50. package/package.json +1 -1
  51. package/qr-code/index.js +6 -5
  52. package/splitter/SplitBar.js +81 -79
  53. package/splitter/Splitter.js +70 -78
  54. package/splitter/hooks/useResizable.js +9 -18
  55. package/splitter/hooks/useResize.js +10 -10
  56. package/splitter/hooks/useSizes.js +28 -28
  57. package/statistic/index.js +10 -10
  58. package/style.css +1 -1
  59. package/table/Table.js +369 -370
  60. package/table/hook/useThResizable.js +6 -5
  61. package/table/th-resizable/index.js +13 -12
  62. package/time-picker/util.js +8 -8
  63. package/tooltip/index.js +1 -2
  64. package/tour/index.js +6 -5
  65. package/tour/interface.js +1 -0
  66. package/tree/NodeList.js +1 -1
  67. package/types/common/utils/constant.d.ts +1 -0
  68. package/types/common/utils/scrollIntoViewIfNeeded.d.ts +4 -0
  69. package/types/common/utils/tree.d.ts +1 -0
  70. package/types/common/utils/tween.d.ts +1 -0
  71. package/types/pc/anchor/util.d.ts +1 -1
  72. package/types/pc/badge/interface.d.ts +2 -0
  73. package/types/pc/card/interface.d.ts +8 -0
  74. package/types/pc/color-picker/hooks/useColorPicker.d.ts +7 -2
  75. package/types/pc/color-picker/utils.d.ts +6 -1
  76. package/types/pc/config-provider/interface.d.ts +8 -8
  77. package/types/pc/form/FormItem.d.ts +1 -1
  78. package/types/pc/grid/Col-.d.ts +4 -0
  79. package/types/pc/grid/Col.d.ts +3 -2
  80. package/types/pc/grid/Grid.d.ts +2 -2
  81. package/types/pc/grid/Item.d.ts +3 -3
  82. package/types/pc/grid/Row.d.ts +3 -2
  83. package/types/pc/grid/hook/useResponsiveState.d.ts +2 -2
  84. package/types/pc/grid/interface.d.ts +13 -7
  85. package/types/pc/index.d.ts +4 -4
  86. package/types/pc/liquid-fill/index.d.ts +2 -113
  87. package/types/pc/liquid-fill/interface.d.ts +113 -0
  88. package/types/pc/marquee/index.d.ts +3 -60
  89. package/types/pc/marquee/interface.d.ts +95 -0
  90. package/types/pc/marquee-/index.d.ts +8 -0
  91. package/types/pc/marquee-/interface.d.ts +56 -0
  92. package/types/pc/qr-code/index.d.ts +1 -31
  93. package/types/pc/qr-code/interface.d.ts +26 -33
  94. package/types/pc/splitter/SplitBar.d.ts +0 -1
  95. package/types/pc/splitter/hooks/useResizable.d.ts +0 -1
  96. package/types/pc/splitter/hooks/useResize.d.ts +1 -2
  97. package/types/pc/splitter/interface.d.ts +0 -8
  98. package/types/pc/tour/index.d.ts +2 -45
  99. package/types/pc/tour/interface.d.ts +46 -0
  100. package/types/pc/upload/interface.d.ts +1 -0
  101. package/types/pc/utils/constant.d.ts +1 -2
  102. package/types/pc/utils/dayjs.d.ts +2 -1
  103. package/types/pc/utils/index.d.ts +2 -5
  104. package/types/pc/utils/responsiveObserve.d.ts +8 -4
  105. package/types/pc/utils/scrollIntoViewIfNeeded.d.ts +3 -0
  106. package/types/pc/utils/tree.d.ts +2 -1
  107. package/types/pc/utils/tween.d.ts +1 -1
  108. package/typography/Ellipsis.js +6 -5
  109. package/typography/Operations.js +6 -5
  110. package/upload/request.js +12 -13
  111. package/upload/request_.js +2 -3
  112. package/utils/constant.js +5 -5
  113. package/utils/dayjs.js +13 -12
  114. package/utils/index.js +261 -284
  115. package/utils/responsiveObserve.js +32 -25
  116. package/utils/scrollIntoViewIfNeeded.js +12 -0
  117. package/utils/tree.js +11 -9
  118. package/utils/tween.js +5 -5
  119. package/version/index.js +1 -1
  120. package/components/common/utils/convertToDurationBasedOnTimeUnits.js +0 -6
  121. package/dist/compute-scroll-into-view/src/index.js +0 -126
  122. package/dist/tinycolor/chunk/BOzCVdr0.js +0 -182
  123. package/dist/tinycolor/customize/index.js +0 -12
  124. package/dist/tinycolor/src/conversion.js +0 -143
  125. package/dist/tinycolor/src/css-color-names.js +0 -153
  126. package/dist/tinycolor/src/format-input.js +0 -77
  127. package/dist/tinycolor/src/index.js +0 -388
  128. package/dist/tinycolor/src/util.js +0 -32
  129. package/types/common/utils/convertToDurationBasedOnTimeUnits.d.ts +0 -3
  130. package/types/common/utils/scrollIntoView.d.ts +0 -4
  131. package/types/common/utils/tinycolor.d.ts +0 -1
  132. package/types/pc/utils/color.d.ts +0 -1
  133. package/types/pc/utils/computeScrollIntoView.d.ts +0 -1
  134. package/types/pc/utils/convertToDurationBasedOnTimeUnits.d.ts +0 -3
  135. package/types/pc/utils/scrollIntoView.d.ts +0 -3
  136. package/types/pc/utils/tinycolor.d.ts +0 -1
  137. package/utils/color.js +0 -4
  138. package/utils/computeScrollIntoView.js +0 -6
  139. package/utils/convertToDurationBasedOnTimeUnits.js +0 -6
  140. package/utils/scrollIntoView.js +0 -6
  141. package/utils/tinycolor.js +0 -29
@@ -1,10 +1,9 @@
1
1
  import { useState as b, useEffect as a } from "react";
2
+ import "@unicom-cloud/utils/date";
2
3
  import "@unicom-cloud/utils/case-name";
3
4
  import "@unicom-cloud/utils/class-name";
4
- import "../../dist/tinycolor/chunk/BOzCVdr0.js";
5
5
  import "@unicom-cloud/utils/constant/ui";
6
6
  import "../../utils/contextHolder.js";
7
- import "@unicom-cloud/utils/dayjs";
8
7
  import "@unicom-cloud/utils/clipboard-copy";
9
8
  import "../../components/common/utils/dayjs.js";
10
9
  import "../../components/common/utils/dom.js";
@@ -40,17 +39,19 @@ import "../../dist/react-transition-group/src/SwitchTransition.js";
40
39
  import "../../dist/react-transition-group/chunk/CPfP7aNL.js";
41
40
  import "../../dist/react-transition-group/src/TransitionGroup.js";
42
41
  import "../../components/common/utils/reactDOM.js";
42
+ import "uuid";
43
43
  import "@unicom-cloud/utils/file/saveAs";
44
44
  import "@unicom-cloud/utils/screenfull";
45
+ import "@unicom-cloud/utils/tinycolor";
46
+ import "@unicom-cloud/utils/ui-color";
45
47
  import "@unicom-cloud/utils/constant/ui.js";
46
48
  import "react-is";
47
49
  import "@unicom-cloud/utils/tree";
48
50
  import { isArray as C } from "@unicom-cloud/utils/is";
49
- import "uuid";
50
51
  import "../../dist/validate/src/index.js";
51
52
  import "@unicom-cloud/utils/constant/keyboardCode";
52
53
  import z from "../th-resizable/index.js";
53
- function Rt(f = {}, c = []) {
54
+ function Ht(f = {}, c = []) {
54
55
  const { columns: u } = f ?? {}, [d, m] = b(o(u));
55
56
  function h(t, i) {
56
57
  return {
@@ -81,5 +82,5 @@ function Rt(f = {}, c = []) {
81
82
  };
82
83
  }
83
84
  export {
84
- Rt as default
85
+ Ht as default
85
86
  };
@@ -1,12 +1,11 @@
1
1
  import { jsx as h, jsxs as M, Fragment as P } from "react/jsx-runtime";
2
2
  import { useRef as s, useContext as X, useEffect as j } from "react";
3
3
  import "../../config-provider/ConfigProvider.js";
4
+ import "@unicom-cloud/utils/date";
4
5
  import "@unicom-cloud/utils/case-name";
5
6
  import z from "@unicom-cloud/utils/class-name";
6
- import "../../dist/tinycolor/chunk/BOzCVdr0.js";
7
7
  import "@unicom-cloud/utils/constant/ui";
8
8
  import "../../utils/contextHolder.js";
9
- import "@unicom-cloud/utils/dayjs";
10
9
  import "@unicom-cloud/utils/clipboard-copy";
11
10
  import "../../components/common/utils/dayjs.js";
12
11
  import { off as g, on as C } from "../../components/common/utils/dom.js";
@@ -41,19 +40,21 @@ import "../../dist/react-transition-group/src/SwitchTransition.js";
41
40
  import "../../dist/react-transition-group/chunk/CPfP7aNL.js";
42
41
  import "../../dist/react-transition-group/src/TransitionGroup.js";
43
42
  import "../../components/common/utils/reactDOM.js";
43
+ import "uuid";
44
44
  import "@unicom-cloud/utils/file/saveAs";
45
45
  import "@unicom-cloud/utils/screenfull";
46
+ import "@unicom-cloud/utils/tinycolor";
47
+ import "@unicom-cloud/utils/ui-color";
46
48
  import "@unicom-cloud/utils/constant/ui.js";
47
49
  import "react-is";
48
50
  import "@unicom-cloud/utils/tree";
49
51
  import { isFunction as E, isPlainObject as T } from "@unicom-cloud/utils/is";
50
- import "uuid";
51
52
  import "../../dist/validate/src/index.js";
52
53
  import "@unicom-cloud/utils/constant/keyboardCode";
53
54
  import { defaultComponent as D } from "../constant.js";
54
55
  /* empty css */
55
56
  import F from "../../config-provider/context.js";
56
- function Bt(b) {
57
+ function Ut(b) {
57
58
  let {
58
59
  className: r,
59
60
  children: u,
@@ -63,27 +64,27 @@ function Bt(b) {
63
64
  } = b;
64
65
  const v = D.header.th, f = s(null), x = s(null), o = s({}), { getPrefixCls: R } = X(F), a = R?.("table-th-resizable");
65
66
  function l(t) {
66
- o.current.boundingClientRect = f.current.getBoundingClientRect(), o.current.pageX = t?.pageX ?? 0, n(), N();
67
+ o.current.boundingClientRect = f.current.getBoundingClientRect(), o.current.pageX = t?.pageX ?? 0, p(), N();
67
68
  }
68
69
  function e(t) {
69
- n();
70
+ p();
70
71
  }
71
72
  function m(t) {
72
- let p = o.current.boundingClientRect.width + ((t?.pageX ?? 0) - o.current.pageX);
73
- p < 0 || (T(i) && (i.width = p), c?.({
73
+ let n = o.current.boundingClientRect.width + ((t?.pageX ?? 0) - o.current.pageX);
74
+ n < 0 || (T(i) && (i.width = n), c?.({
74
75
  column: i,
75
- width: p,
76
+ width: n,
76
77
  widthOrigin: o.current.boundingClientRect.width
77
78
  }));
78
79
  }
79
80
  function N(t) {
80
81
  C(document, "mousemove", m), C(document, "mouseup", e);
81
82
  }
82
- function n(t) {
83
+ function p(t) {
83
84
  g(document, "mousemove", m), g(document, "mouseup", e);
84
85
  }
85
86
  r = z(r, a), j(() => (l(), m(), e(), () => {
86
- n();
87
+ p();
87
88
  }), []);
88
89
  let d = u;
89
90
  return E(c) && (d = /* @__PURE__ */ M(P, { children: [
@@ -99,5 +100,5 @@ function Bt(b) {
99
100
  ] })), /* @__PURE__ */ h(v, { ref: f, ...w, className: r, children: d });
100
101
  }
101
102
  export {
102
- Bt as default
103
+ Ut as default
103
104
  };
@@ -1,15 +1,15 @@
1
1
  import { Tween as i } from "../dist/tween/src/tween.js";
2
- import { quartInOut as l } from "../dist/tween/src/easing.js";
2
+ import l from "../dist/tween/src/easing.js";
3
3
  import { isDayjs as m } from "dayjs";
4
- import { dayjs as f, methods as e } from "../components/common/utils/dayjs.js";
4
+ import { dayjs as f, methods as a } from "../components/common/utils/dayjs.js";
5
5
  function y(o) {
6
6
  const t = ["H", "h", "m", "s", "a", "A"], s = [];
7
- let a = !1;
7
+ let e = !1;
8
8
  return t.forEach((r) => {
9
- o.indexOf(r) !== -1 && (s.push(r), (r === "a" || r === "A") && (a = !0));
9
+ o.indexOf(r) !== -1 && (s.push(r), (r === "a" || r === "A") && (e = !0));
10
10
  }), {
11
11
  list: s,
12
- use12Hours: a
12
+ use12Hours: e
13
13
  };
14
14
  }
15
15
  const c = /* @__PURE__ */ new Map();
@@ -24,16 +24,16 @@ function h(o, t, s) {
24
24
  onUpdate: (r) => {
25
25
  o.scrollTop = r.scrollTop;
26
26
  },
27
- easing: l
27
+ easing: l.quartInOut
28
28
  }).start();
29
29
  })
30
30
  );
31
31
  }
32
32
  function g(o) {
33
- const t = f(), s = t.year(), a = t.month(), r = t.date();
33
+ const t = f(), s = t.year(), e = t.month(), r = t.date();
34
34
  if (m(o)) {
35
35
  let n = o;
36
- return n = e.set(n, "year", s), n = e.set(n, "month", a), n = e.set(n, "date", r), n;
36
+ return n = a.set(n, "year", s), n = a.set(n, "month", e), n = a.set(n, "date", r), n;
37
37
  }
38
38
  return o;
39
39
  }
package/tooltip/index.js CHANGED
@@ -1,6 +1,5 @@
1
1
  import { jsx as p } from "react/jsx-runtime";
2
- import "../dist/tinycolor/chunk/BOzCVdr0.js";
3
- import { TinyColor as F } from "../dist/tinycolor/src/index.js";
2
+ import F from "@unicom-cloud/utils/tinycolor";
4
3
  import I from "lodash/isFunction";
5
4
  import { forwardRef as S, useContext as j, useRef as z, useImperativeHandle as B, useMemo as W } from "react";
6
5
  import "../config-provider/ConfigProvider.js";
package/tour/index.js CHANGED
@@ -17,12 +17,11 @@ import "@unicom-cloud/utils/constant";
17
17
  import "lodash/debounce";
18
18
  import wt from "../icon-hover/index.js";
19
19
  import R from "../space/index.js";
20
+ import "@unicom-cloud/utils/date";
20
21
  import "@unicom-cloud/utils/case-name";
21
22
  import u from "@unicom-cloud/utils/class-name";
22
- import "../dist/tinycolor/chunk/BOzCVdr0.js";
23
23
  import "@unicom-cloud/utils/constant/ui";
24
24
  import "../utils/contextHolder.js";
25
- import "@unicom-cloud/utils/dayjs";
26
25
  import "@unicom-cloud/utils/clipboard-copy";
27
26
  import "../components/common/utils/dayjs.js";
28
27
  import "@unicom-cloud/utils/file/fileToURL";
@@ -53,13 +52,15 @@ import "../dist/react-transition-group/src/SwitchTransition.js";
53
52
  import "../dist/react-transition-group/chunk/CPfP7aNL.js";
54
53
  import "../dist/react-transition-group/src/TransitionGroup.js";
55
54
  import { resizeObserver as yt } from "../components/common/utils/resizeObserver.js";
55
+ import "uuid";
56
56
  import "@unicom-cloud/utils/file/saveAs";
57
57
  import "@unicom-cloud/utils/screenfull";
58
+ import "@unicom-cloud/utils/tinycolor";
59
+ import "@unicom-cloud/utils/ui-color";
58
60
  import "@unicom-cloud/utils/constant/ui.js";
59
61
  import "react-is";
60
62
  import "@unicom-cloud/utils/tree";
61
63
  import "@unicom-cloud/utils/is";
62
- import "uuid";
63
64
  import "../dist/validate/src/index.js";
64
65
  import $t from "../config-provider/context.js";
65
66
  const xt = {
@@ -74,7 +75,7 @@ const xt = {
74
75
  zIndex: 1e3,
75
76
  current: 0
76
77
  };
77
- function Me(L) {
78
+ function Ee(L) {
78
79
  const { getPrefixCls: X, componentConfig: Y, rtl: kt } = ct($t), K = gt(
79
80
  L,
80
81
  xt,
@@ -306,5 +307,5 @@ function Me(L) {
306
307
  );
307
308
  }
308
309
  export {
309
- Me as default
310
+ Ee as default
310
311
  };
@@ -0,0 +1 @@
1
+
package/tree/NodeList.js CHANGED
@@ -1,6 +1,6 @@
1
1
  import { jsx as x } from "react/jsx-runtime";
2
2
  import { forwardRef as M, useRef as y, useMemo as p, useImperativeHandle as R, createElement as D } from "react";
3
- import { scrollIntoView as V } from "../components/common/utils/scrollIntoView.js";
3
+ import { scrollIntoView as V } from "../components/common/utils/scrollIntoViewIfNeeded.js";
4
4
  import b from "../virtual-list/VirtualList.js";
5
5
  import I from "./Node.js";
6
6
  function H(n) {
@@ -1,2 +1,3 @@
1
1
  export declare const CSS_VARIABLE_ELEMENT: HTMLElement;
2
2
  export declare const NOOP: () => void;
3
+ export { UI_PC_KEY, UI_PC_THEME_DARK_CLASS_NAME, } from '@unicom-cloud/utils/constant/ui';
@@ -0,0 +1,4 @@
1
+ import scrollIntoViewIfNeeded, { compute, Options, scrollIntoViewIfNeededSmooth, smoothScrollIntoViewIfNeeded } from '@unicom-cloud/scroll-into-view-if-needed';
2
+ declare function scrollIntoView(node: HTMLElement, options?: Options): void;
3
+ export { compute, scrollIntoView, scrollIntoViewIfNeeded, scrollIntoViewIfNeededSmooth, smoothScrollIntoViewIfNeeded, };
4
+ export default scrollIntoView;
@@ -0,0 +1 @@
1
+ export { default, findNodeBy, getChildWithParentBy, getItemBy, getItemBy2, getItemBy3, getItemByID, getLabelFromDictionaryByValue, searchTree, default as tree, } from '@unicom-cloud/utils/tree';
@@ -0,0 +1 @@
1
+ export { default, easing, default as Tween } from '@unicom-cloud/tween';
@@ -1,5 +1,5 @@
1
1
  export declare function findNode(dom: HTMLElement | Document, selector: string): HTMLElement | null;
2
- export declare function slide(el: HTMLElement, top: number, cb: Function): void;
2
+ export declare function slide(el: HTMLElement, top: number, cb: () => void): void;
3
3
  export declare function getContainer(targetContainer?: string | HTMLElement | Window): HTMLElement | Window | null;
4
4
  export declare function getContainerElement(scrollContainer: HTMLElement | Window): HTMLElement;
5
5
  export declare function getScrollParent(element: any): any;
@@ -4,6 +4,8 @@ import { Omit } from '../utils/type';
4
4
  * @title Ribbon
5
5
  */
6
6
  export interface RibbonProps {
7
+ style?: CSSProperties;
8
+ className?: string | string[];
7
9
  /**
8
10
  * @zh 缎带徽标的文本
9
11
  * @en Text of the ribbon badge
@@ -6,6 +6,14 @@ import { Omit } from '../utils/type';
6
6
  export interface CardProps extends Omit<HTMLAttributes<HTMLDivElement>, 'title' | 'className'> {
7
7
  style?: CSSProperties;
8
8
  className?: string | string[];
9
+ /**
10
+ * @zh 头部 className
11
+ */
12
+ headerClassName?: string | string[];
13
+ /**
14
+ * @zh 身体部 className
15
+ */
16
+ bodyClassName?: string | string[];
9
17
  children?: ReactNode;
10
18
  id?: string;
11
19
  /**
@@ -20,10 +20,15 @@ export declare const useColorPicker: (props: UseColorPickerProps) => {
20
20
  popupVisible: boolean;
21
21
  color: {
22
22
  hsv: HSV;
23
- rgb: import("@unicom-cloud/tinycolor").Numberify<import("@unicom-cloud/tinycolor").RGBA>;
23
+ rgb: {
24
+ r: number;
25
+ g: number;
26
+ b: number;
27
+ a: number | undefined;
28
+ };
24
29
  hex: string;
25
30
  };
26
- alpha: number;
31
+ alpha: number | undefined;
27
32
  onHsvChange: (_value: HSV) => void;
28
33
  onAlphaChange: (_value: number) => void;
29
34
  onVisibleChange: (newVisible: any) => void;
@@ -11,7 +11,12 @@ export declare const formatRgba: (r: number, g: number, b: number, a: number) =>
11
11
  export declare const formatHex: (r: number, g: number, b: number, a: number) => string;
12
12
  export declare const getColorFromHsv: (hsv: HSV) => {
13
13
  hsv: HSV;
14
- rgb: import("@unicom-cloud/tinycolor").Numberify<import("@unicom-cloud/tinycolor").RGBA>;
14
+ rgb: {
15
+ r: number;
16
+ g: number;
17
+ b: number;
18
+ a: number | undefined;
19
+ };
15
20
  hex: string;
16
21
  };
17
22
  export declare const getRandomId: () => string;
@@ -14,11 +14,11 @@ import { CarouselProps } from '../carousel/interface';
14
14
  import { CascaderProps } from '../cascader/interface';
15
15
  import { CheckboxProps } from '../checkbox/interface';
16
16
  import { CollapseProps } from '../collapse/interface';
17
- import { ColorPickerProps } from '../color-picker';
17
+ import { ColorPickerProps } from '../color-picker/interface';
18
18
  import { CommentProps } from '../comment/interface';
19
19
  import { PickerProps as DatePickerCommonProps } from '../date-picker/interface';
20
20
  import { DescriptionsProps } from '../descriptions/interface';
21
- import { DetailsProps } from '../details';
21
+ import { DetailsProps } from '../details/interface';
22
22
  import { DividerProps } from '../divider/interface';
23
23
  import { DrawerProps } from '../drawer/interface';
24
24
  import { DropdownButtonProps, DropdownProps } from '../dropdown/interface';
@@ -32,11 +32,11 @@ import { InputTagProps } from '../input-tag/interface';
32
32
  import { InputProps } from '../input/interface';
33
33
  import { LayoutProps } from '../layout/interface';
34
34
  import { LinkProps } from '../link/interface';
35
- import { LiquidFillProps } from '../liquid-fill';
35
+ import { LiquidFillProps } from '../liquid-fill/interface';
36
36
  import { ListItemProps, ListProps } from '../list/interface';
37
- import type { LoadingProps } from '../loading';
37
+ import type { LoadingProps } from '../loading/interface';
38
38
  import { Locale } from '../locale/interface';
39
- import type { MarqueeProps } from '../marquee';
39
+ import type { MarqueeProps } from '../marquee/interface';
40
40
  import { MentionsProps } from '../mentions/interface';
41
41
  import { MenuProps } from '../menu/interface';
42
42
  import { ModalProps } from '../modal/interface';
@@ -45,7 +45,7 @@ import { PaginationProps } from '../pagination/interface';
45
45
  import { PopconfirmProps } from '../popconfirm/interface';
46
46
  import { PopoverProps } from '../popover/interface';
47
47
  import { ProgressProps } from '../progress/interface';
48
- import { QRCodeProps } from '../qr-code';
48
+ import { QRCodeProps } from '../qr-code/interface';
49
49
  import { RadioGroupProps, RadioProps } from '../radio/interface';
50
50
  import { RateProps } from '../rate/interface';
51
51
  import { ResizeBoxProps } from '../resize-box/interface';
@@ -66,12 +66,12 @@ import { TagProps } from '../tag/interface';
66
66
  import { PickerProps as TimePickerCommonProps } from '../time-picker/interface';
67
67
  import { TimelineItemProps, TimelineProps } from '../timeline/interface';
68
68
  import { TooltipProps } from '../tooltip/interface';
69
- import { TourProps } from '../tour';
69
+ import { TourProps } from '../tour/interface';
70
70
  import { TransferProps } from '../transfer/interface';
71
71
  import { TreeSelectProps } from '../tree-select/interface';
72
72
  import { TreeProps } from '../tree/interface';
73
73
  import { TriggerProps } from '../trigger/interface';
74
- import { TypographyEllipsisProps, type TypographyProps } from '../typography';
74
+ import { TypographyEllipsisProps, type TypographyProps } from '../typography/interface';
75
75
  import { UploadProps } from '../upload/interface';
76
76
  import { Omit } from '../utils/type';
77
77
  import { VerificationCodeProps } from '../verification-code/interface';
@@ -1,6 +1,6 @@
1
1
  import React from 'react';
2
+ import { Row } from '../grid';
2
3
  import { FormItemProps, KeyType } from './interface';
3
- declare const Row: React.ForwardRefExoticComponent<import("..").RowProps & React.RefAttributes<unknown>>;
4
4
  declare const _default: <FormData = any, FieldValue = FormData[keyof FormData], FieldKey extends KeyType = keyof FormData>(props: FormItemProps<FormData, FieldValue, FieldKey> & {
5
5
  ref?: React.Ref<(typeof Row)["prototype"]>;
6
6
  }) => React.ReactElement;
@@ -0,0 +1,4 @@
1
+ import { ColProps } from './interface';
2
+ declare const Col: import("react").ForwardRefExoticComponent<ColProps & import("react").RefAttributes<unknown>>;
3
+ export default Col;
4
+ export type { ColProps };
@@ -1,4 +1,5 @@
1
+ import React from 'react';
1
2
  import { ColProps } from './interface';
2
- declare const ColComponent: import("react").ForwardRefExoticComponent<ColProps & import("react").RefAttributes<unknown>>;
3
- export default ColComponent;
3
+ declare const Col: React.ForwardRefExoticComponent<ColProps & React.RefAttributes<HTMLDivElement>>;
4
+ export default Col;
4
5
  export type { ColProps };
@@ -1,5 +1,5 @@
1
1
  import React from 'react';
2
2
  import { GridProps } from './interface';
3
- declare const GridComponent: React.ForwardRefExoticComponent<GridProps & React.RefAttributes<unknown>>;
4
- export default GridComponent;
3
+ declare const Grid: React.ForwardRefExoticComponent<GridProps & React.RefAttributes<unknown>>;
4
+ export default Grid;
5
5
  export type { GridProps };
@@ -1,8 +1,8 @@
1
1
  import React from 'react';
2
2
  import { GridItemProps } from './interface';
3
- declare const ForwardRefGridItem: React.ForwardRefExoticComponent<GridItemProps & React.RefAttributes<unknown>>;
4
- declare const GridItemComponent: typeof ForwardRefGridItem & {
3
+ declare const GridItemForwardRef: React.ForwardRefExoticComponent<GridItemProps & React.RefAttributes<unknown>>;
4
+ declare const GridItem: typeof GridItemForwardRef & {
5
5
  __PQB_GRID_ITEM__: boolean;
6
6
  };
7
- export default GridItemComponent;
7
+ export default GridItem;
8
8
  export type { GridItemProps };
@@ -1,4 +1,5 @@
1
+ import React from 'react';
1
2
  import { RowProps } from './interface';
2
- declare const RowComponent: import("react").ForwardRefExoticComponent<RowProps & import("react").RefAttributes<unknown>>;
3
- export default RowComponent;
3
+ declare const Row: React.ForwardRefExoticComponent<RowProps & React.RefAttributes<HTMLDivElement>>;
4
+ export default Row;
4
5
  export type { RowProps };
@@ -1,2 +1,2 @@
1
- import { ResponsiveValue } from '../interface';
2
- export declare const useResponsiveState: (val: number | ResponsiveValue, defaultValue: number, fallbackToXs?: boolean) => number;
1
+ import { type GridUnitProps } from '../interface';
2
+ export declare const useResponsiveState: (val: GridUnitProps, defaultValue: number, fallbackToXs?: boolean) => number;
@@ -121,6 +121,7 @@ export interface ColProps extends Omit<HTMLAttributes<HTMLDivElement>, 'classNam
121
121
  */
122
122
  flex?: FlexType;
123
123
  }
124
+ export type GridUnitProps = number | ResponsiveValue | undefined;
124
125
  /**
125
126
  * @title Grid
126
127
  */
@@ -132,19 +133,24 @@ export interface GridProps extends Omit<HTMLAttributes<HTMLDivElement>, 'classNa
132
133
  * @en Number of columns displayed in each row
133
134
  * @defaultValue 24
134
135
  */
135
- cols?: number | ResponsiveValue;
136
+ cols?: GridUnitProps;
136
137
  /**
137
- * @zh 行与行之间的间距
138
+ * @zh 间距
139
+ * @defaultValue 0
140
+ */
141
+ gap?: GridUnitProps | number[];
142
+ /**
143
+ * @zh 行与行之间的间距(优先级高于 gap)
138
144
  * @en The space in row-to-row
139
145
  * @defaultValue 0
140
146
  */
141
- rowGap?: number | ResponsiveValue;
147
+ rowGap?: GridUnitProps;
142
148
  /**
143
- * @zh 列与列之间的间距
149
+ * @zh 列与列之间的间距(优先级高于 gap)
144
150
  * @en The space in column-to-column
145
151
  * @defaultValue 0
146
152
  */
147
- colGap?: number | ResponsiveValue;
153
+ colGap?: GridUnitProps;
148
154
  /**
149
155
  * @zh 是否折叠
150
156
  * @en Whether to collapsed
@@ -169,13 +175,13 @@ export interface GridItemProps extends Omit<HTMLAttributes<HTMLDivElement>, 'cla
169
175
  * @en Number of grids spanned
170
176
  * @defaultValue 1
171
177
  */
172
- span?: number | ResponsiveValue;
178
+ span?: GridUnitProps;
173
179
  /**
174
180
  * @zh 左侧的间隔格数
175
181
  * @en Number of grids on the left
176
182
  * @defaultValue 0
177
183
  */
178
- offset?: number | ResponsiveValue;
184
+ offset?: GridUnitProps;
179
185
  /**
180
186
  * @zh 是否是后缀元素
181
187
  * @en Is it a suffix element
@@ -79,13 +79,13 @@ export type { ContentProps, FooterProps, HeaderProps, LayoutProps, SiderProps, }
79
79
  export { default as Link } from './link';
80
80
  export type { LinkProps } from './link/interface';
81
81
  export { default as LiquidFill } from './liquid-fill';
82
- export type { LiquidFillProps } from './liquid-fill';
82
+ export type { LiquidFillProps } from './liquid-fill/interface';
83
83
  export { default as List, ListItem } from './list';
84
84
  export type { ListItemMetaProps, ListItemProps, ListProps, } from './list/interface';
85
85
  export { default as Loading } from './loading';
86
86
  export type { LoadingProps } from './loading/interface';
87
87
  export { default as Marquee } from './marquee';
88
- export type { MarqueeProps } from './marquee';
88
+ export type { MarqueeProps } from './marquee/interface';
89
89
  export { default as Mentions } from './mentions';
90
90
  export type { MentionsProps } from './mentions/interface';
91
91
  export { default as Menu, MenuItem, MenuItemGroup, MenuSubMenu, SubMenu, } from './menu';
@@ -109,7 +109,7 @@ export type { PortalProps, PortalWrapperProps } from './portal/interface';
109
109
  export { default as Progress } from './progress';
110
110
  export type { ProgressProps } from './progress/interface';
111
111
  export { default as QRCode } from './qr-code';
112
- export type { QRCodeProps } from './qr-code';
112
+ export type { QRCodeProps } from './qr-code/interface';
113
113
  export { default as Radio, RadioGroup, RadioGroupBlock, RadioGroupContext, } from './radio';
114
114
  export type { RadioGroupProps, RadioProps } from './radio/interface';
115
115
  export { default as Rate } from './rate';
@@ -155,7 +155,7 @@ export type { TimelineItemProps, TimelineProps } from './timeline/interface';
155
155
  export { default as Tooltip } from './tooltip';
156
156
  export type { TooltipProps } from './tooltip/interface';
157
157
  export { default as Tour } from './tour';
158
- export type { TourProps } from './tour';
158
+ export type { TourProps } from './tour/interface';
159
159
  export { default as Transfer } from './transfer';
160
160
  export type { TransferItemProps, TransferProps } from './transfer/interface';
161
161
  export { default as Tree, TreeNode } from './tree';
@@ -1,115 +1,4 @@
1
- import React, { type CSSProperties } from 'react';
2
- /**
3
- * 颜色配置类型,支持纯色和渐变色
4
- */
5
- type ColorType = string | {
6
- /** 渐变起始颜色 */
7
- from: string;
8
- /** 渐变结束颜色 */
9
- to: string;
10
- /**
11
- * 渐变方向
12
- * @default 'vertical' 垂直渐变
13
- */
14
- direction?: 'horizontal' | 'vertical';
15
- };
16
- /**
17
- * 水球填充组件的属性接口
18
- */
19
- export interface LiquidFillProps {
20
- /** 自定义容器样式 */
21
- style?: CSSProperties;
22
- /** 自定义类名 */
23
- className?: string | string[];
24
- /**
25
- * 当前填充比例 (0-1)
26
- * @default 0.5
27
- */
28
- value: number;
29
- /**
30
- * 组件尺寸 (像素)
31
- * @default 200
32
- */
33
- size?: number;
34
- /**
35
- * 字体大小
36
- * @default size * 0.15
37
- */
38
- fontSize?: number | string;
39
- /**
40
- * 波浪颜色,支持纯色或渐变色
41
- * @default 'rgb(var(--pqb-blue-6))'
42
- */
43
- waveColor?: ColorType;
44
- /**
45
- * 背景颜色,支持纯色或渐变色
46
- * @default 'var(--pqb-color-neutral-1)'
47
- */
48
- backgroundColor?: ColorType;
49
- /**
50
- * 文字颜色
51
- * @default 'var(--pqb-color-neutral-8)'
52
- */
53
- textColor?: string;
54
- /**
55
- * 是否显示百分比
56
- * @default true
57
- */
58
- showPercent?: boolean;
59
- /**
60
- * 动画持续时间(毫秒)
61
- * @default 2000
62
- */
63
- duration?: number;
64
- /**
65
- * 波浪数量
66
- * @default 3
67
- */
68
- waveCount?: number;
69
- /**
70
- * 波浪振幅
71
- * @default 10
72
- */
73
- waveAmplitude?: number;
74
- /**
75
- * 内层边框颜色
76
- * @default 'var(--pqb-color-neutral-4)'
77
- */
78
- borderColor?: string;
79
- /**
80
- * 内层边框宽度
81
- * @default 2
82
- */
83
- borderWidth?: number;
84
- /**
85
- * 外层边框颜色(默认使用内层边框颜色但透明度30%)
86
- */
87
- outerBorderColor?: string;
88
- /**
89
- * 外层边框宽度
90
- * @default 0(不显示)
91
- */
92
- outerBorderWidth?: number;
93
- /**
94
- * 内外层边框间距
95
- * @default 2
96
- */
97
- borderGap?: number;
98
- /**
99
- * 百分比显示的小数位数
100
- * @default 0(整数)
101
- */
102
- decimalPlaces?: number;
103
- /**
104
- * 百分号相对于数字的缩放比例
105
- * @default 0.5
106
- */
107
- percentFontScale?: number;
108
- /**
109
- * 波浪速度变化系数(值越大速度差异越大)
110
- * @default 0.5
111
- */
112
- waveSpeedVariation?: number;
113
- }
1
+ import React from 'react';
2
+ import type { LiquidFillProps } from './interface';
114
3
  declare const LiquidFill: React.FC<LiquidFillProps>;
115
4
  export default LiquidFill;