@unicom-cloud/ui 0.8.98 → 0.8.100

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (180) hide show
  1. package/Anchor.js +3 -1
  2. package/Badge.js +54 -7
  3. package/Copy.js +49 -2
  4. package/Flex.js +12 -0
  5. package/Grid.js +1 -1
  6. package/LiquidFill.js +60 -2
  7. package/Marquee.js +62 -0
  8. package/QrCode.js +14 -9
  9. package/Segmented.js +11 -0
  10. package/Space.js +14 -6
  11. package/Splitter.js +6 -0
  12. package/Tag.js +3 -2
  13. package/Tour.js +14 -9
  14. package/alert/index.js +38 -39
  15. package/anchor/index.js +5 -3
  16. package/badge/index.js +174 -80
  17. package/collapse/Collapse.js +54 -48
  18. package/components/common/space/index.js +90 -106
  19. package/copy/index.js +83 -35
  20. package/flex/index.js +59 -0
  21. package/flex/interface.js +34 -0
  22. package/flex/utils.js +13 -0
  23. package/grid/{GridItem.js → Item.js} +15 -15
  24. package/grid/index.js +1 -1
  25. package/index.js +490 -477
  26. package/input/Button.js +39 -34
  27. package/input/Textarea.js +108 -104
  28. package/liquid-fill/index.js +256 -2
  29. package/marquee/index.js +283 -0
  30. package/menu/Item.js +17 -16
  31. package/package.json +1 -1
  32. package/qr-code/index.js +54 -36
  33. package/rate/index.js +8 -8
  34. package/segmented/index.js +225 -0
  35. package/space/index.js +28 -29
  36. package/spin/index.js +75 -62
  37. package/splitter/Panel.js +39 -0
  38. package/splitter/SplitBar.js +157 -0
  39. package/splitter/Splitter.js +139 -0
  40. package/splitter/hooks/useEvent.js +12 -0
  41. package/splitter/hooks/useItems.js +26 -0
  42. package/splitter/hooks/useResizable.js +26 -0
  43. package/splitter/hooks/useResize.js +68 -0
  44. package/splitter/hooks/useSizes.js +60 -0
  45. package/splitter/index.js +7 -0
  46. package/splitter/interface.js +1 -0
  47. package/style.css +1 -1
  48. package/table/Table.js +1 -1
  49. package/table/hook/useThResizable.js +72 -26
  50. package/table/tbody/Td.js +80 -77
  51. package/table/th-resizable/index.js +92 -35
  52. package/tag/index.js +42 -41
  53. package/tooltip/index.js +89 -82
  54. package/tour/index.js +110 -89
  55. package/types/common/hooks/useMergeProps.d.ts +1 -1
  56. package/types/common/space/index.d.ts +7 -5
  57. package/types/common/space/interface.d.ts +29 -16
  58. package/types/pc/affix/interface.d.ts +0 -2
  59. package/types/pc/alert/index.d.ts +2 -2
  60. package/types/pc/anchor/index.d.ts +2 -1
  61. package/types/pc/anchor/interface.d.ts +0 -2
  62. package/types/pc/auto-complete/interface.d.ts +0 -6
  63. package/types/pc/avatar/interface.d.ts +0 -4
  64. package/types/pc/badge/index.d.ts +4 -4
  65. package/types/pc/badge/interface.d.ts +26 -0
  66. package/types/pc/breadcrumb/interface.d.ts +0 -3
  67. package/types/pc/carousel/interface.d.ts +2 -6
  68. package/types/pc/cascader/interface.d.ts +6 -18
  69. package/types/pc/checkbox/interface.d.ts +0 -1
  70. package/types/pc/collapse/interface.d.ts +4 -2
  71. package/types/pc/color-picker/interface.d.ts +0 -2
  72. package/types/pc/config-provider/interface.d.ts +16 -14
  73. package/types/pc/copy/interface.d.ts +2 -1
  74. package/types/pc/date-picker/RangePicker.d.ts +1 -1
  75. package/types/pc/date-picker/interface.d.ts +0 -17
  76. package/types/pc/descriptions/interface.d.ts +0 -1
  77. package/types/pc/drawer/interface.d.ts +0 -7
  78. package/types/pc/dropdown/interface.d.ts +0 -1
  79. package/types/pc/flex/index.d.ts +9 -0
  80. package/types/pc/flex/interface.d.ts +61 -0
  81. package/types/pc/flex/utils.d.ts +9 -0
  82. package/types/pc/form/interface.d.ts +9 -22
  83. package/types/pc/form/util.d.ts +1 -1
  84. package/types/pc/grid/index.d.ts +3 -3
  85. package/types/pc/grid/interface.d.ts +1 -6
  86. package/types/pc/image/interface.d.ts +0 -13
  87. package/types/pc/index.d.ts +16 -6
  88. package/types/pc/input/Textarea.d.ts +2 -6
  89. package/types/pc/input/interface.d.ts +5 -13
  90. package/types/pc/input-number/interface.d.ts +0 -4
  91. package/types/pc/input-tag/interface.d.ts +0 -13
  92. package/types/pc/layout/interface.d.ts +0 -1
  93. package/types/pc/link/interface.d.ts +0 -1
  94. package/types/pc/liquid-fill/index.d.ts +114 -1
  95. package/types/pc/list/interface.d.ts +0 -4
  96. package/types/pc/marquee/index.d.ts +61 -0
  97. package/types/pc/menu/context.d.ts +1 -1
  98. package/types/pc/menu/interface.d.ts +0 -8
  99. package/types/pc/message/interface.d.ts +0 -2
  100. package/types/pc/modal/interface.d.ts +0 -5
  101. package/types/pc/notification/interface.d.ts +0 -1
  102. package/types/pc/pagination/interface.d.ts +0 -2
  103. package/types/pc/popconfirm/interface.d.ts +8 -10
  104. package/types/pc/popover/interface.d.ts +0 -1
  105. package/types/pc/progress/interface.d.ts +0 -3
  106. package/types/pc/qr-code/index.d.ts +1 -1
  107. package/types/pc/rate/index.d.ts +2 -2
  108. package/types/pc/resize-box/interface.d.ts +1 -7
  109. package/types/pc/segmented/index.d.ts +8 -0
  110. package/types/pc/segmented/interface.d.ts +88 -0
  111. package/types/pc/select/interface.d.ts +0 -12
  112. package/types/pc/select-view/interface.d.ts +0 -7
  113. package/types/pc/slider/interface.d.ts +0 -4
  114. package/types/pc/space/index.d.ts +4 -1
  115. package/types/pc/space/interface.d.ts +6 -10
  116. package/types/pc/spin/interface.d.ts +4 -1
  117. package/types/pc/splitter/Panel.d.ts +8 -0
  118. package/types/pc/splitter/SplitBar.d.ts +21 -0
  119. package/types/pc/splitter/Splitter.d.ts +4 -0
  120. package/types/pc/splitter/hooks/useEvent.d.ts +3 -0
  121. package/types/pc/splitter/hooks/useItems.d.ts +10 -0
  122. package/types/pc/splitter/hooks/useResizable.d.ts +8 -0
  123. package/types/pc/splitter/hooks/useResize.d.ts +4 -0
  124. package/types/pc/splitter/hooks/useSizes.d.ts +5 -0
  125. package/types/pc/splitter/index.d.ts +8 -0
  126. package/types/pc/splitter/interface.d.ts +213 -0
  127. package/types/pc/statistic/interface.d.ts +0 -4
  128. package/types/pc/steps/interface.d.ts +0 -3
  129. package/types/pc/table/hook/useThResizable.d.ts +2 -2
  130. package/types/pc/table/interface.d.ts +4 -15
  131. package/types/pc/tabs/interface.d.ts +0 -7
  132. package/types/pc/tag/index.d.ts +2 -0
  133. package/types/pc/tag/interface.d.ts +0 -1
  134. package/types/pc/time-picker/interface.d.ts +0 -7
  135. package/types/pc/tooltip/interface.d.ts +4 -1
  136. package/types/pc/tour/index.d.ts +6 -1
  137. package/types/pc/transfer/interface.d.ts +2 -9
  138. package/types/pc/tree/interface.d.ts +2 -8
  139. package/types/pc/tree-select/interface.d.ts +0 -8
  140. package/types/pc/trigger/interface.d.ts +0 -5
  141. package/types/pc/typography/EditContent.d.ts +2 -1
  142. package/types/pc/typography/interface.d.ts +45 -30
  143. package/types/pc/upload/interface.d.ts +6 -11
  144. package/types/pc/utils/index.d.ts +1 -0
  145. package/types/pc/utils/names.d.ts +24 -0
  146. package/types/pc/utils/toArray.d.ts +7 -0
  147. package/types/pc/verification-code/interface.d.ts +0 -2
  148. package/types/pc/watermark/interface.d.ts +0 -2
  149. package/typography/Base.js +73 -73
  150. package/typography/EditContent.js +43 -33
  151. package/typography/Ellipsis.js +117 -184
  152. package/typography/Operations.js +97 -49
  153. package/typography/useCssEllipsis.js +7 -6
  154. package/utils/index.js +117 -115
  155. package/utils/names.js +16 -0
  156. package/utils/toArray.js +12 -0
  157. package/version/index.js +1 -1
  158. package/_virtual/_commonjsHelpers.js +0 -6
  159. package/_virtual/index.js +0 -7
  160. package/_virtual/index2.js +0 -4
  161. package/liquid-fill/LiquidFill.js +0 -226
  162. package/liquid-fill/LiquidFill2.js +0 -3
  163. package/space-/index.js +0 -93
  164. package/types/common/utils/color.d.ts +0 -1
  165. package/types/common/utils/computeScrollIntoView.d.ts +0 -1
  166. package/types/common/utils/index.d.ts +0 -45
  167. package/types/common/utils/math.d.ts +0 -1
  168. package/types/common/utils/reactTransitionGroup.d.ts +0 -1
  169. package/types/common/utils/tree.d.ts +0 -1
  170. package/types/common/utils/tween.d.ts +0 -1
  171. package/types/common/utils/uuid.d.ts +0 -1
  172. package/types/common/utils/validate.d.ts +0 -1
  173. package/types/pc/liquid-fill/LiquidFill.d.ts +0 -115
  174. package/types/pc/liquid-fill/LiquidFill2.d.ts +0 -1
  175. package/types/pc/space-/index.d.ts +0 -6
  176. package/types/pc/space-/interface.d.ts +0 -38
  177. /package/{space- → components/common/space}/toArray.js +0 -0
  178. /package/{space- → segmented}/interface.js +0 -0
  179. /package/types/{pc/space- → common/space}/toArray.d.ts +0 -0
  180. /package/types/pc/grid/{GridItem.d.ts → Item.d.ts} +0 -0
package/space-/index.js DELETED
@@ -1,93 +0,0 @@
1
- import { jsx as c, jsxs as M } from "react/jsx-runtime";
2
- import P from "lodash/isArray";
3
- import R from "lodash/isNumber";
4
- import { forwardRef as $, useContext as V, Fragment as b } from "react";
5
- import "../config-provider/ConfigProvider.js";
6
- import j from "../components/common/hooks/useMergeProps.js";
7
- import k from "@unicom-cloud/utils/class-name";
8
- import D from "./toArray.js";
9
- import F from "../config-provider/context.js";
10
- const H = {
11
- size: "small",
12
- direction: "horizontal"
13
- };
14
- function O(s, m) {
15
- const { getPrefixCls: N, componentConfig: C, rtl: g } = V(F), v = j(
16
- s,
17
- H,
18
- C?.Space
19
- ), {
20
- className: S,
21
- style: x,
22
- children: w,
23
- size: i,
24
- direction: a,
25
- align: B,
26
- wrap: l,
27
- split: p,
28
- ...z
29
- } = v, e = N?.("space-"), d = B || (a === "horizontal" ? "center" : ""), A = k(
30
- e,
31
- {
32
- [`${e}-${a}`]: a,
33
- [`${e}-align-${d}`]: d,
34
- [`${e}-wrap`]: l,
35
- [`${e}-rtl`]: g
36
- },
37
- S
38
- );
39
- function f(t) {
40
- if (R(t))
41
- return t;
42
- switch (t) {
43
- case "mini":
44
- return 4;
45
- case "small":
46
- return 8;
47
- case "medium":
48
- return 16;
49
- case "large":
50
- return 24;
51
- default:
52
- return 8;
53
- }
54
- }
55
- const h = D(w);
56
- function L(t) {
57
- const n = h.length === t + 1, o = g ? "marginLeft" : "marginRight";
58
- if (typeof i == "string" || typeof i == "number") {
59
- const r = f(i);
60
- return l ? n ? { marginBottom: r } : {
61
- [`${o}`]: r,
62
- marginBottom: r
63
- } : n ? {} : {
64
- [a === "vertical" ? "marginBottom" : o]: r
65
- };
66
- }
67
- if (P(i)) {
68
- const r = f(i[0]), u = f(i[1]);
69
- return l ? n ? { marginBottom: u } : {
70
- [`${o}`]: r,
71
- marginBottom: u
72
- } : a === "vertical" ? { marginBottom: u } : { [`${o}`]: r };
73
- }
74
- }
75
- return /* @__PURE__ */ c("div", { ref: m, className: A, style: x, ...z, children: h.map((t, n) => {
76
- const o = t?.key || n, r = p != null && n > 0;
77
- return /* @__PURE__ */ M(b, { children: [
78
- r && /* @__PURE__ */ c("div", { className: `${e}-item-split`, children: p }),
79
- /* @__PURE__ */ c("div", { className: `${e}-item`, style: L(n), children: t })
80
- ] }, o);
81
- }) });
82
- }
83
- const y = $(O);
84
- y.displayName = "Space-";
85
- function q(s, m) {
86
- return /* @__PURE__ */ c(y, { ref: m, ...s, direction: "vertical", children: s.children });
87
- }
88
- const E = $(q);
89
- E.displayName = "SpaceVertical-";
90
- export {
91
- E as SpaceVertical,
92
- y as default
93
- };
@@ -1 +0,0 @@
1
- export { uiColor as color } from "@unicom-cloud/tinycolor";
@@ -1 +0,0 @@
1
- export { compute, default as computeScrollIntoView, default, } from '@unicom-cloud/compute-scroll-into-view';
@@ -1,45 +0,0 @@
1
- export * from './caseName';
2
- export * from './className';
3
- export * from './color';
4
- export * from './computeScrollIntoView';
5
- export * from './constant';
6
- export * from './convertToDurationBasedOnTimeUnits';
7
- export * from './copy';
8
- export * from './dayjs';
9
- export * from './dom';
10
- export * from './fileToURL';
11
- export * from './fillNBSP';
12
- export * from './findScrollParent';
13
- export * from './getHighlightText';
14
- export * from './getHotkeyHandler';
15
- export * from './getStringLength';
16
- export * from './include';
17
- export * from './intersectionObserver';
18
- export * from './is';
19
- export * from './lodash';
20
- export * from './math';
21
- export * from './mergedToString';
22
- export * from './mergeProps';
23
- export * from './mutationObserver';
24
- export * from './omit';
25
- export * from './pad';
26
- export * from './pick';
27
- export * from './PqbCSSTransition';
28
- export * from './reactDOM';
29
- export * from './reactTransitionGroup';
30
- export * from './resizeObserver';
31
- export * from './saveAs';
32
- export * from './screenfull';
33
- export * from './scrollIntoView';
34
- export * from './setDarkTheme';
35
- export * from './setPrimaryColor';
36
- export * from './style';
37
- export * from './throttleByRaf';
38
- export * from './tinycolor';
39
- export * from './tree';
40
- export * from './tween';
41
- export * from './type';
42
- export * from './uuid';
43
- export * from './validate';
44
- export * from './warning';
45
- export { keyboardCode } from './keyboardCode';
@@ -1 +0,0 @@
1
- export { default, div, default as math, minus, plus, times, } from '@unicom-cloud/utils/math';
@@ -1 +0,0 @@
1
- export { CSSTransition, default, default as reactTransitionGroup, ReplaceTransition, SwitchTransition, Transition, TransitionGroup, } from '@unicom-cloud/react-transition-group';
@@ -1 +0,0 @@
1
- export { default, findNodeBy, getChildWithParentBy, getItemBy, getItemBy2, getItemBy3, getItemByID, getLabelFromDictionaryByValue, default as tree, } from '@unicom-cloud/utils/tree';
@@ -1 +0,0 @@
1
- export { default, easing, default as tween } from '@unicom-cloud/tween';
@@ -1 +0,0 @@
1
- export { v4 as uuid, v4 as uuidv4 } from 'uuid';
@@ -1 +0,0 @@
1
- export { DefaultValidateMessage, Schema, default as validate, } from '@unicom-cloud/validate';
@@ -1,115 +0,0 @@
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.7
106
- */
107
- percentFontScale?: number;
108
- /**
109
- * 波浪速度变化系数(值越大速度差异越大)
110
- * @default 0.5
111
- */
112
- waveSpeedVariation?: number;
113
- }
114
- declare const LiquidFill: React.FC<LiquidFillProps>;
115
- export default LiquidFill;
@@ -1 +0,0 @@
1
- export {};
@@ -1,6 +0,0 @@
1
- import { SpaceProps, SpaceSize } from './interface';
2
- declare const Space: import("react").ForwardRefExoticComponent<SpaceProps & import("react").RefAttributes<unknown>>;
3
- declare const SpaceVertical: import("react").ForwardRefExoticComponent<SpaceProps & import("react").RefAttributes<unknown>>;
4
- export { SpaceVertical };
5
- export default Space;
6
- export type { SpaceProps, SpaceSize };
@@ -1,38 +0,0 @@
1
- import { CSSProperties, ReactNode } from 'react';
2
- export type SpaceSize = 'mini' | 'small' | 'medium' | 'large' | number;
3
- /**
4
- * @title Space
5
- */
6
- export interface SpaceProps {
7
- style?: CSSProperties;
8
- className?: string | string[];
9
- /**
10
- * @zh 对齐方式
11
- * @en Alignment of items
12
- */
13
- align?: 'start' | 'end' | 'center' | 'baseline';
14
- /**
15
- * @zh 间距方向
16
- * @en The space direction
17
- * @defaultValue horizontal
18
- */
19
- direction?: 'vertical' | 'horizontal';
20
- /**
21
- * @zh 尺寸。( `2.15.0` 开始支持数组形式 )
22
- * @en The space size. ( Array format add in `2.15.0` )
23
- * @defaultValue small
24
- */
25
- size?: SpaceSize | SpaceSize[];
26
- /**
27
- * @zh 环绕类型的间距,用于折行的场景。
28
- * @en Whether to wrap line automatic
29
- */
30
- wrap?: boolean;
31
- /**
32
- * @zh 设置分隔符
33
- * @en Set separator
34
- * @version 2.22.0
35
- */
36
- split?: ReactNode;
37
- children?: ReactNode;
38
- }
File without changes
File without changes
File without changes
File without changes