@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
@@ -0,0 +1,113 @@
1
+ import type { CSSProperties } from 'react';
2
+ /**
3
+ * 颜色配置类型,支持纯色和渐变色
4
+ */
5
+ export 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,61 +1,4 @@
1
- import React, { type CSSProperties, type ReactNode } from 'react';
2
- export interface MarqueeProps {
3
- /**
4
- * 运动内容(支持文本或React节点)
5
- * @example
6
- * <Marquee>这是运动内容</Marquee>
7
- */
8
- children?: ReactNode;
9
- /**
10
- * 运动速度(像素/秒)
11
- * @default 50
12
- * @range 1-200
13
- */
14
- speed?: number;
15
- /**
16
- * 运动方向
17
- * @default 'left'
18
- * @enum ['left', 'right', 'up', 'down']
19
- */
20
- direction?: 'left' | 'right' | 'up' | 'down';
21
- /**
22
- * 鼠标悬停时是否暂停
23
- * @default false
24
- */
25
- pauseOnHover?: boolean;
26
- /**
27
- * 是否显示边缘渐变遮罩
28
- * @default true
29
- */
30
- gradient?: boolean;
31
- /**
32
- * 循环次数(0表示无限循环)
33
- * @default 0
34
- * @example
35
- * <Marquee loop={3}>循环3次</Marquee>
36
- */
37
- loop?: number;
38
- /**
39
- * 循环完成回调(仅在loop>0时触发)
40
- */
41
- onComplete?: () => void;
42
- /**
43
- * 自定义类名
44
- */
45
- className?: string;
46
- /**
47
- * 自定义样式
48
- */
49
- style?: CSSProperties;
50
- /**
51
- * 渐变遮罩尺寸(像素)
52
- * @default 50
53
- */
54
- gradientSize?: number;
55
- }
56
- /**
57
- * 跑马灯组件
58
- * 实现所有方向完美无缝循环运动
59
- */
60
- declare const Marquee: React.FC<MarqueeProps>;
1
+ import React from 'react';
2
+ import type { MarqueeProps } from './interface';
3
+ declare const Marquee: React.ForwardRefExoticComponent<MarqueeProps & React.RefAttributes<HTMLDivElement>>;
61
4
  export default Marquee;
@@ -0,0 +1,95 @@
1
+ import { CSSProperties, ReactNode, type AnimationEventHandler } from 'react';
2
+ /**
3
+ * @title Marquee
4
+ */
5
+ export interface MarqueeProps {
6
+ style?: CSSProperties;
7
+ className?: string | string[];
8
+ /**
9
+ * @zh 是否自动用子元素的副本填充空白空间
10
+ * @en Whether to automatically fill blank space with copies of child elements
11
+ * @defaultValue false
12
+ */
13
+ autoFill?: boolean;
14
+ /**
15
+ * @zh 是否播放跑马灯
16
+ * @en Whether to play the marquee
17
+ * @defaultValue true
18
+ */
19
+ play?: boolean;
20
+ /**
21
+ * @zh 悬停时是否暂停
22
+ * @en Whether to pause on hover
23
+ * @defaultValue false
24
+ */
25
+ pauseOnHover?: boolean;
26
+ /**
27
+ * @zh 点击时是否暂停
28
+ * @en Whether to pause on click
29
+ * @defaultValue false
30
+ */
31
+ pauseOnClick?: boolean;
32
+ /**
33
+ * @zh 跑马灯滑动方向
34
+ * @en Marquee scroll direction
35
+ * @defaultValue left
36
+ */
37
+ direction?: 'left' | 'right' | 'up' | 'down';
38
+ /**
39
+ * @zh 速度(像素/秒)
40
+ * @en Scroll speed (pixels/second)
41
+ * @defaultValue 50
42
+ */
43
+ speed?: number;
44
+ /**
45
+ * @zh 动画延迟时间(秒)
46
+ * @en Animation delay time (seconds)
47
+ * @defaultValue 0
48
+ */
49
+ delay?: number;
50
+ /**
51
+ * @zh 循环次数,0表示无限循环
52
+ * @en Number of loops, 0 means infinite loop
53
+ * @defaultValue 0
54
+ */
55
+ loop?: number;
56
+ /**
57
+ * @zh 渐变遮罩配置,false表示不显示
58
+ * @en Gradient overlay configuration, false means not shown
59
+ * @defaultValue false
60
+ */
61
+ gradient?: false | {
62
+ /**
63
+ * @zh 渐变颜色
64
+ * @en Gradient color
65
+ * @defaultValue white
66
+ */
67
+ color?: string;
68
+ /**
69
+ * @zh 渐变尺寸
70
+ * @en Gradient size
71
+ * @defaultValue 50
72
+ */
73
+ size?: number | string;
74
+ };
75
+ /**
76
+ * @zh 子元素
77
+ * @en Children elements
78
+ */
79
+ children?: ReactNode;
80
+ /**
81
+ * @zh 动画完成时的回调(仅在loop不为0时调用)
82
+ * @en Callback when animation completes (only called when loop is not 0)
83
+ */
84
+ onFinish?: AnimationEventHandler<HTMLDivElement>;
85
+ /**
86
+ * @zh 每次循环完成时的回调
87
+ * @en Callback when each cycle completes
88
+ */
89
+ onCycleComplete?: AnimationEventHandler<HTMLDivElement>;
90
+ /**
91
+ * @zh 组件挂载后的回调
92
+ * @en Callback after component mounts
93
+ */
94
+ onMount?: () => void;
95
+ }
@@ -0,0 +1,8 @@
1
+ import React from 'react';
2
+ import type { MarqueeProps } from './interface';
3
+ /**
4
+ * 跑马灯组件
5
+ * 实现所有方向完美无缝循环运动
6
+ */
7
+ declare const Marquee: React.FC<MarqueeProps>;
8
+ export default Marquee;
@@ -0,0 +1,56 @@
1
+ import { ReactNode, type CSSProperties } from 'react';
2
+ /**
3
+ * @title MarqueeProps
4
+ */
5
+ export interface MarqueeProps {
6
+ /**
7
+ * 运动内容(支持文本或React节点)
8
+ * @example
9
+ * <Marquee>这是运动内容</Marquee>
10
+ */
11
+ children?: ReactNode;
12
+ /**
13
+ * 运动速度(像素/秒)
14
+ * @default 50
15
+ * @range 1-200
16
+ */
17
+ speed?: number;
18
+ /**
19
+ * 运动方向
20
+ * @default 'left'
21
+ * @enum ['left', 'right', 'up', 'down']
22
+ */
23
+ direction?: 'left' | 'right' | 'up' | 'down';
24
+ /**
25
+ * 鼠标悬停时是否暂停
26
+ * @default false
27
+ */
28
+ pauseOnHover?: boolean;
29
+ /**
30
+ * 是否显示边缘渐变遮罩,设置为 false 将隐藏
31
+ * @default { size: 50; color: 0xffffff }
32
+ */
33
+ gradient?: {
34
+ size: number;
35
+ color: string;
36
+ } | boolean;
37
+ /**
38
+ * 循环次数(0表示无限循环)
39
+ * @default 0
40
+ * @example
41
+ * <Marquee loop={3}>循环3次</Marquee>
42
+ */
43
+ loop?: number;
44
+ /**
45
+ * 循环完成回调(仅在loop>0时触发)
46
+ */
47
+ onComplete?: () => void;
48
+ /**
49
+ * 自定义类名
50
+ */
51
+ className?: string;
52
+ /**
53
+ * 自定义样式
54
+ */
55
+ style?: CSSProperties;
56
+ }
@@ -1,34 +1,4 @@
1
1
  import React from 'react';
2
- export interface QRCodeProps {
3
- /** 二维码内容 (必填) */
4
- value: string;
5
- /** 渲染模式 */
6
- renderAs?: 'svg' | 'canvas';
7
- /** 二维码尺寸(像素) */
8
- size?: number;
9
- /** 是否显示边框 */
10
- bordered?: boolean;
11
- /** 容错级别 */
12
- errorLevel?: 'L' | 'M' | 'Q' | 'H';
13
- /** 前景色(二维码点颜色) */
14
- fgColor?: string;
15
- /** 背景色 */
16
- bgColor?: string;
17
- /** 边距大小(像素) */
18
- marginSize?: number;
19
- /** 中心图标设置 */
20
- imageSettings?: {
21
- src: string;
22
- height: number;
23
- width: number;
24
- excavate: boolean;
25
- x?: number;
26
- y?: number;
27
- };
28
- /** 自定义类名 */
29
- className?: string;
30
- /** 自定义样式 */
31
- style?: React.CSSProperties;
32
- }
2
+ import type { QRCodeProps } from './interface';
33
3
  declare const QRCode: React.FC<QRCodeProps>;
34
4
  export default QRCode;
@@ -1,39 +1,32 @@
1
+ import type React from 'react';
1
2
  export interface QRCodeProps {
2
- /**
3
- * 二维码内容
4
- */
5
- value?: string;
6
- /**
7
- * 二维码尺寸(像素)
8
- * @default 160
9
- */
3
+ /** 二维码内容 (必填) */
4
+ value: string;
5
+ /** 渲染模式 */
6
+ renderAs?: 'svg' | 'canvas';
7
+ /** 二维码尺寸(像素) */
10
8
  size?: number;
11
- /**
12
- * 二维码颜色
13
- * @default '#000000'
14
- */
15
- color?: string;
16
- /**
17
- * 二维码背景色
18
- * @default '#ffffff'
19
- */
20
- bgColor?: string;
21
- /**
22
- * 是否有边框
23
- * @default true
24
- */
9
+ /** 是否显示边框 */
25
10
  bordered?: boolean;
26
- /**
27
- * 容错级别
28
- * @default 'M'
29
- */
11
+ /** 容错级别 */
30
12
  errorLevel?: 'L' | 'M' | 'Q' | 'H';
31
- /**
32
- * 自定义样式
33
- */
34
- style?: React.CSSProperties;
35
- /**
36
- * 自定义类名
37
- */
13
+ /** 前景色(二维码点颜色) */
14
+ fgColor?: string;
15
+ /** 背景色 */
16
+ bgColor?: string;
17
+ /** 边距大小(像素) */
18
+ marginSize?: number;
19
+ /** 中心图标设置 */
20
+ imageSettings?: {
21
+ src: string;
22
+ height: number;
23
+ width: number;
24
+ excavate: boolean;
25
+ x?: number;
26
+ y?: number;
27
+ };
28
+ /** 自定义类名 */
38
29
  className?: string;
30
+ /** 自定义样式 */
31
+ style?: React.CSSProperties;
39
32
  }
@@ -3,7 +3,6 @@ export interface SplitBarProps {
3
3
  index: number;
4
4
  active: boolean;
5
5
  prefixCls?: string;
6
- resizable: boolean;
7
6
  startCollapsible: boolean;
8
7
  endCollapsible: boolean;
9
8
  onOffsetStart: (index: number) => void;
@@ -1,6 +1,5 @@
1
1
  import type { ItemType } from './useItems';
2
2
  export type ResizableInfo = {
3
- resizable: boolean;
4
3
  startCollapsible: boolean;
5
4
  endCollapsible: boolean;
6
5
  };
@@ -1,4 +1,3 @@
1
1
  import type { ItemType } from './useItems';
2
- import type { ResizableInfo } from './useResizable';
3
- declare function useResize(items: ItemType[], resizableInfos: ResizableInfo[], percentSizes: number[], containerSize: number | undefined, updateSizes: (sizes: number[]) => void, isRTL: boolean | undefined): readonly [(index: number) => void, (index: number, offset: number) => number[], () => void, (index: number, type: "start" | "end") => number[], number | undefined];
2
+ declare function useResize(items: ItemType[], percentSizes: number[], containerSize: number | undefined, updateSizes: (sizes: number[]) => void, isRTL: boolean | undefined): readonly [(index: number) => void, (index: number, offset: number) => number[], () => void, (index: number, type: "start" | "end") => number[], number | undefined];
4
3
  export default useResize;
@@ -92,12 +92,6 @@ export interface PanelProps {
92
92
  /** @zh 结束边是否可折叠 */
93
93
  end?: boolean;
94
94
  };
95
- /**
96
- * @zh 是否可调整大小
97
- * @defaultValue true
98
- * @en Whether resizable
99
- */
100
- resizable?: boolean;
101
95
  /**
102
96
  * @zh 默认尺寸(像素或百分比字符串)
103
97
  * @en Default size (pixels or percentage string)
@@ -192,8 +186,6 @@ export interface UseCollapsible {
192
186
  * 可调整大小信息接口
193
187
  */
194
188
  export interface ResizableInfo {
195
- /** @zh 是否可调整大小 */
196
- resizable: boolean;
197
189
  /** @zh 起始边是否可折叠 */
198
190
  startCollapsible: boolean;
199
191
  /** @zh 结束边是否可折叠 */
@@ -1,47 +1,4 @@
1
- import { CSSProperties } from 'react';
2
- type Placement = 'top' | 'bottom' | 'left' | 'right';
3
- type TourType = 'default' | 'primary';
4
- export interface TourStep {
5
- /** 目标元素 (选择器字符串或DOM元素) */
6
- target: string | HTMLElement;
7
- /** 标题内容 */
8
- title?: React.ReactNode;
9
- /** 描述内容 */
10
- description?: React.ReactNode;
11
- /** 初始弹出位置 (会自动调整) */
12
- placement?: Placement;
13
- }
14
- export interface TourProps {
15
- /** 自定义样式 */
16
- style?: CSSProperties;
17
- /** 自定义类名 */
18
- className?: string | string[];
19
- /** 引导步骤数组 */
20
- steps: TourStep[];
21
- /** 是否显示引导 */
22
- open?: boolean;
23
- /** 关闭回调 */
24
- onClose?: () => void;
25
- /** 是否显示遮罩 */
26
- mask?: boolean;
27
- /** 点击遮罩是否关闭 */
28
- maskClosable?: boolean;
29
- /** 引导类型 (default/primary) */
30
- type?: TourType;
31
- /** 默认弹出位置 */
32
- placement?: Placement;
33
- /** 是否显示箭头 */
34
- arrow?: boolean;
35
- /** 是否显示关闭按钮 */
36
- closable?: boolean;
37
- /** 层级 */
38
- zIndex?: number;
39
- /** 当前步骤索引 */
40
- current?: number;
41
- /** 完成回调 */
42
- onFinish?: () => void;
43
- /** 步骤改变回调 */
44
- onStepChange?: (current: number) => void;
45
- }
1
+ import React from 'react';
2
+ import type { TourProps } from './interface';
46
3
  declare function Tour(baseProps: TourProps): React.ReactElement | null;
47
4
  export default Tour;
@@ -0,0 +1,46 @@
1
+ import type React from 'react';
2
+ import type { CSSProperties } from 'react';
3
+ export type Placement = 'top' | 'bottom' | 'left' | 'right';
4
+ export type TourType = 'default' | 'primary';
5
+ export interface TourStep {
6
+ /** 目标元素 (选择器字符串或DOM元素) */
7
+ target: string | HTMLElement;
8
+ /** 标题内容 */
9
+ title?: React.ReactNode;
10
+ /** 描述内容 */
11
+ description?: React.ReactNode;
12
+ /** 初始弹出位置 (会自动调整) */
13
+ placement?: Placement;
14
+ }
15
+ export interface TourProps {
16
+ /** 自定义样式 */
17
+ style?: CSSProperties;
18
+ /** 自定义类名 */
19
+ className?: string | string[];
20
+ /** 引导步骤数组 */
21
+ steps: TourStep[];
22
+ /** 是否显示引导 */
23
+ open?: boolean;
24
+ /** 关闭回调 */
25
+ onClose?: () => void;
26
+ /** 是否显示遮罩 */
27
+ mask?: boolean;
28
+ /** 点击遮罩是否关闭 */
29
+ maskClosable?: boolean;
30
+ /** 引导类型 (default/primary) */
31
+ type?: TourType;
32
+ /** 默认弹出位置 */
33
+ placement?: Placement;
34
+ /** 是否显示箭头 */
35
+ arrow?: boolean;
36
+ /** 是否显示关闭按钮 */
37
+ closable?: boolean;
38
+ /** 层级 */
39
+ zIndex?: number;
40
+ /** 当前步骤索引 */
41
+ current?: number;
42
+ /** 完成回调 */
43
+ onFinish?: () => void;
44
+ /** 步骤改变回调 */
45
+ onStepChange?: (current: number) => void;
46
+ }
@@ -256,6 +256,7 @@ export interface UploadListProps {
256
256
  renderUploadItem?: (originNode: ReactNode, file: UploadItem, fileList: UploadItem[]) => ReactNode;
257
257
  renderUploadList?: (fileList: UploadItem[], uploadListProps: Omit<UploadListProps, 'renderUploadList'>) => ReactNode;
258
258
  prefixCls?: string;
259
+ onChange?: (o: object) => void;
259
260
  }
260
261
  /**
261
262
  * @title UploadItem
@@ -1,4 +1,3 @@
1
- export { UI_PC_KEY, UI_PC_THEME_DARK_CLASS_NAME, } from '@unicom-cloud/utils/constant/ui';
2
- export { NOOP } from '../../common/utils/constant';
1
+ export { NOOP, UI_PC_KEY, UI_PC_THEME_DARK_CLASS_NAME, } from '../../common/utils/constant';
3
2
  export declare function newArray(length: number): any[];
4
3
  export declare function pickTriggerPropsFromRest(rest: object): Pick<object, never>;
@@ -1 +1,2 @@
1
- export { dayjs, getDayjsValue, getNow, getSortedDayjsArray, getTimeFormat, getValueWithTime, isDayjsArrayChange, isDayjsChange, isValidTimeString, methods, timezoneToOffset, toLocal, toTimezone, } from '../../common/utils/dayjs';
1
+ export * from '../../common/utils/dayjs';
2
+ export { default } from '../../common/utils/dayjs';
@@ -1,10 +1,8 @@
1
+ export * from '@unicom-cloud/utils/date';
1
2
  export * from './caseName';
2
3
  export * from './className';
3
- export * from './color';
4
- export * from './computeScrollIntoView';
5
4
  export * from './constant';
6
5
  export * from './contextHolder';
7
- export * from './convertToDurationBasedOnTimeUnits';
8
6
  export * from './copy';
9
7
  export * from './dayjs';
10
8
  export * from './dom';
@@ -33,13 +31,12 @@ export * from './resizeObserver';
33
31
  export * from './responsiveObserve';
34
32
  export * from './saveAs';
35
33
  export * from './screenfull';
36
- export * from './scrollIntoView';
34
+ export * from './scrollIntoViewIfNeeded';
37
35
  export * from './setDarkTheme';
38
36
  export * from './setPrimaryColor';
39
37
  export * from './setTheme';
40
38
  export * from './style';
41
39
  export * from './throttleByRaf';
42
- export * from './tinycolor';
43
40
  export * from './toArray';
44
41
  export * from './tree';
45
42
  export * from './tween';
@@ -1,12 +1,16 @@
1
1
  export type Breakpoint = 'xxxl' | 'xxl' | 'xl' | 'lg' | 'md' | 'sm' | 'xs';
2
- export type BreakpointMap = Partial<Record<Breakpoint, string>>;
2
+ export type BreakpointMap = Record<Breakpoint, string>;
3
3
  export type ScreenMap = Partial<Record<Breakpoint, boolean>>;
4
4
  export declare const responsiveArray: Breakpoint[];
5
5
  export declare const responsiveMap: BreakpointMap;
6
- type SubscribeFunc = (screens: ScreenMap, breakpointChecked: Breakpoint) => void;
6
+ type SubscribeFunc = (screens: ScreenMap, breakpointChecked: Breakpoint | null) => void;
7
+ type MatchHandler = {
8
+ mql: MediaQueryList;
9
+ listener: (this: MediaQueryList, ev: MediaQueryListEvent) => void;
10
+ };
7
11
  declare const responsiveObserve: {
8
- matchHandlers: {};
9
- dispatch(pointMap: ScreenMap, breakpointChecked: Breakpoint): boolean;
12
+ matchHandlers: Record<string, MatchHandler>;
13
+ dispatch(pointMap: ScreenMap, breakpointChecked: Breakpoint | null): boolean;
10
14
  subscribe(func: SubscribeFunc): string;
11
15
  unsubscribe(token: string): void;
12
16
  unregister(): void;
@@ -0,0 +1,3 @@
1
+ import scrollIntoView, { compute, scrollIntoViewIfNeeded, scrollIntoViewIfNeededSmooth, smoothScrollIntoViewIfNeeded } from '../../common/utils/scrollIntoViewIfNeeded';
2
+ export { compute, scrollIntoView, scrollIntoViewIfNeeded, scrollIntoViewIfNeededSmooth, smoothScrollIntoViewIfNeeded, };
3
+ export default scrollIntoView;
@@ -1 +1,2 @@
1
- export { default, findNodeBy, getChildWithParentBy, getItemBy, getItemBy2, getItemBy3, getItemByID, getLabelFromDictionaryByValue, } from '@unicom-cloud/utils/tree';
1
+ export * from '../../common/utils/tree';
2
+ export { default } from '../../common/utils/tree';
@@ -1 +1 @@
1
- export { default, easing, default as tween } from '@unicom-cloud/tween';
1
+ export { default, easing, Tween } from '../../common/utils/tween';