@unicom-cloud/ui 0.8.106 → 0.8.108
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.
- package/App.js +7 -0
- package/BackTop.js +2 -4
- package/Calendar.js +2 -2
- package/ColorPicker.js +15 -14
- package/Constant.js +4 -0
- package/Copy.js +4 -3
- package/Countdown.js +25 -0
- package/Grid.js +8 -10
- package/LiquidFill.js +4 -3
- package/List.js +7 -6
- package/Marquee.js +4 -3
- package/Modal.js +4 -2
- package/PageHeader.js +3 -2
- package/QrCode.js +4 -3
- package/RowCol.js +8 -0
- package/Segmented.js +14 -4
- package/Statistic.js +5 -4
- package/Tour.js +4 -3
- package/Transfer.js +4 -2
- package/anchor/Link.js +1 -1
- package/app/App.js +26 -0
- package/app/context.js +9 -0
- package/app/index.js +9 -0
- package/app/interface.js +1 -0
- package/app/useApp.js +8 -0
- package/avatar/Group.js +1 -1
- package/back-top/index.js +44 -56
- package/button/index.js +52 -51
- package/calendar/Lunar.js +71 -0
- package/calendar/index.js +11 -11
- package/cascader/base/node.js +22 -20
- package/cascader/base/store.js +10 -10
- package/cascader/util.js +29 -27
- package/color-picker/Mode.js +8 -7
- package/color-picker/hooks/useColorPicker.js +56 -55
- package/color-picker/index.js +49 -48
- package/color-picker/utils.js +58 -57
- package/components/common/empty/index.js +2 -2
- package/components/common/flex/index.js +64 -55
- package/components/common/flex/interface.js +6 -6
- package/components/common/hooks/useInterval.js +6 -6
- package/components/common/icons/file/index.js +13 -11
- package/components/common/space/index.js +53 -53
- package/components/common/utils/dayjs.js +114 -126
- package/components/common/utils/is.js +98 -104
- package/components/common/utils/setDir.js +12 -0
- package/components/common/utils/setTheme.js +13 -13
- package/components/common/utils/toArray.js +7 -5
- package/config-provider/ConfigProvider.js +32 -30
- package/constant/index.js +4 -0
- package/copy/index.js +2 -1
- package/countdown/index.js +113 -0
- package/countdown/interface.js +1 -0
- package/countdown/util.js +29 -0
- package/descriptions/index.js +45 -45
- package/divider/index.js +28 -20
- package/dropdown/Button.js +1 -1
- package/empty/index.js +1 -1
- package/flex/index.js +30 -29
- package/form/FormItem.js +126 -122
- package/grid/Grid.js +56 -90
- package/grid/Item.js +44 -65
- package/grid/context.js +2 -6
- package/grid/index.js +6 -8
- package/grid/util.js +6 -44
- package/hooks/useResponsiveState.js +54 -0
- package/index.js +614 -605
- package/input/Button.js +12 -12
- package/input/Group.js +11 -12
- package/input/Input.js +112 -102
- package/input/InputElement.js +25 -24
- package/input/Search.js +24 -24
- package/layout/Sider.js +1 -1
- package/liquid-fill/index.js +4 -3
- package/list/Item.js +21 -21
- package/list/index.js +53 -52
- package/marquee/index.js +20 -19
- package/marquee-/index.js +4 -3
- package/mentions/util.js +9 -8
- package/modal/Confirm.js +17 -17
- package/modal/Modal.js +247 -237
- package/modal/index.js +4 -2
- package/modal/use-modal/index.js +2 -2
- package/package.json +1 -1
- package/page-header/index.js +57 -56
- package/pagination/Pagination.js +89 -92
- package/qr-code/index.js +4 -3
- package/radio/Group.js +1 -1
- package/row-col/Col-.js +88 -0
- package/row-col/Col.js +159 -0
- package/row-col/Row.js +73 -0
- package/row-col/context.js +5 -0
- package/row-col/index.js +11 -0
- package/row-col/interface.js +1 -0
- package/segmented/index.js +257 -206
- package/select/Select.js +191 -191
- package/select/util.js +50 -50
- package/select-view/Core.js +31 -28
- package/space/index.js +15 -13
- package/splitter/SplitBar.js +44 -46
- package/statistic/index.js +56 -55
- package/statistic/interface.js +4 -1
- package/style.css +1 -1
- package/table/Table.js +198 -210
- package/table/hook/useColumns.js +27 -26
- package/table/hook/useStickyClassNames.js +9 -8
- package/table/hook/useThResizable.js +4 -3
- package/table/th-resizable/index.js +2 -2
- package/table/thead/index.js +18 -16
- package/time-picker/util.js +20 -30
- package/timeline/Item.js +1 -1
- package/tour/index.js +4 -3
- package/transfer/index.js +93 -91
- package/trigger/index.js +66 -66
- package/types/common/development/interface.d.ts +3 -3
- package/types/common/flex/index.d.ts +3 -9
- package/types/common/flex/interface.d.ts +15 -4
- package/types/common/space/index.d.ts +3 -5
- package/types/common/space/interface.d.ts +2 -0
- package/types/common/utils/dayjs.d.ts +3 -1
- package/types/common/utils/is.d.ts +3 -4
- package/types/common/utils/setDir.d.ts +2 -0
- package/types/pc/app/App.d.ts +6 -0
- package/types/pc/app/context.d.ts +4 -0
- package/types/pc/app/index.d.ts +5 -0
- package/types/pc/app/interface.d.ts +17 -0
- package/types/pc/app/useApp.d.ts +3 -0
- package/types/pc/back-top/interface.d.ts +4 -17
- package/types/pc/button/interface.d.ts +2 -2
- package/types/pc/calendar/Lunar.d.ts +17 -0
- package/types/pc/calendar/index.d.ts +1 -1
- package/types/pc/config-provider/interface.d.ts +17 -12
- package/types/pc/constant/index.d.ts +1 -0
- package/types/pc/countdown/interface.d.ts +65 -0
- package/types/pc/countdown/util.d.ts +7 -0
- package/types/pc/divider/interface.d.ts +1 -0
- package/types/pc/flex/index.d.ts +8 -6
- package/types/pc/flex/interface.d.ts +3 -10
- package/types/pc/form/FormItem.d.ts +1 -1
- package/types/pc/form/interface.d.ts +1 -1
- package/types/pc/grid/Grid.d.ts +2 -4
- package/types/pc/grid/Item.d.ts +1 -5
- package/types/pc/grid/context.d.ts +4 -15
- package/types/pc/grid/index.d.ts +4 -6
- package/types/pc/grid/interface.d.ts +14 -142
- package/types/pc/grid/util.d.ts +1 -10
- package/types/pc/hooks/useResponsiveState.d.ts +3 -0
- package/types/pc/index.d.ts +10 -4
- package/types/pc/input/Button.d.ts +2 -2
- package/types/pc/list/interface.d.ts +2 -1
- package/types/pc/message/index.d.ts +1 -9
- package/types/pc/message/interface.d.ts +8 -0
- package/types/pc/message/useMessage.d.ts +1 -2
- package/types/pc/modal/Modal.d.ts +1 -0
- package/types/pc/modal/config.d.ts +1 -2
- package/types/pc/modal/index.d.ts +2 -1
- package/types/pc/modal/interface.d.ts +17 -5
- package/types/pc/notification/index.d.ts +2 -9
- package/types/pc/notification/interface.d.ts +7 -0
- package/types/pc/notification/useNotification.d.ts +1 -2
- package/types/pc/pagination/PageOption.d.ts +0 -1
- package/types/pc/pagination/interface.d.ts +5 -6
- package/types/pc/{grid → row-col}/Col-.d.ts +1 -1
- package/types/pc/{grid → row-col}/Col.d.ts +1 -2
- package/types/pc/{grid → row-col}/Row.d.ts +1 -2
- package/types/pc/row-col/context.d.ts +6 -0
- package/types/pc/row-col/index.d.ts +7 -0
- package/types/pc/row-col/interface.d.ts +112 -0
- package/types/pc/segmented/index.d.ts +3 -7
- package/types/pc/segmented/interface.d.ts +38 -5
- package/types/pc/select-view/Core.d.ts +1 -8
- package/types/pc/select-view/index.d.ts +1 -8
- package/types/pc/select-view/interface.d.ts +9 -2
- package/types/pc/space/index.d.ts +5 -7
- package/types/pc/space/interface.d.ts +3 -10
- package/types/pc/statistic/index.d.ts +1 -1
- package/types/pc/statistic/interface.d.ts +1 -49
- package/types/pc/utils/is.d.ts +1 -1
- package/types/pc/utils/names.d.ts +422 -111
- package/types/pc/utils/responsiveObserve.d.ts +8 -8
- package/typography/Ellipsis.js +5 -4
- package/typography/Operations.js +4 -3
- package/utils/dayjs.js +13 -11
- package/utils/index.js +245 -244
- package/utils/is.js +65 -66
- package/utils/names.js +309 -150
- package/utils/responsiveObserve.js +43 -36
- package/version/index.js +1 -1
- package/grid/Col-.js +0 -86
- package/grid/Col.js +0 -169
- package/grid/Row.js +0 -96
- package/grid/hook/useResponsiveState.js +0 -38
- package/statistic/Countdown.js +0 -56
- package/statistic/util.js +0 -33
- package/types/pc/grid/hook/useResponsiveState.d.ts +0 -2
- package/types/pc/statistic/util.d.ts +0 -1
- /package/types/pc/{statistic/Countdown.d.ts → countdown/index.d.ts} +0 -0
|
@@ -1,14 +1,8 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import { type FlexProps } from './interface';
|
|
3
|
-
|
|
4
|
-
* Flex 布局组件主体
|
|
5
|
-
*/
|
|
2
|
+
import { type FlexProps, type FlexVerticalProps } from './interface';
|
|
3
|
+
declare const FlexVertical: React.ForwardRefExoticComponent<FlexVerticalProps & React.RefAttributes<HTMLElement>>;
|
|
6
4
|
declare const Flex: React.ForwardRefExoticComponent<FlexProps & React.RefAttributes<HTMLElement>> & {
|
|
7
|
-
Vertical:
|
|
5
|
+
Vertical: React.ForwardRefExoticComponent<FlexVerticalProps & React.RefAttributes<HTMLElement>>;
|
|
8
6
|
};
|
|
9
|
-
/**
|
|
10
|
-
* 垂直布局组件
|
|
11
|
-
*/
|
|
12
|
-
declare const FlexVertical: React.ForwardRefExoticComponent<FlexProps & React.RefAttributes<HTMLElement>>;
|
|
13
7
|
export { FlexVertical };
|
|
14
8
|
export default Flex;
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
export type GapProperty = 'gap' | 'rowGap' | 'columnGap';
|
|
3
3
|
export declare const GAP_SIZE_MAP: {
|
|
4
|
-
mini:
|
|
5
|
-
small:
|
|
6
|
-
medium:
|
|
7
|
-
large:
|
|
4
|
+
mini: number;
|
|
5
|
+
small: number;
|
|
6
|
+
medium: number;
|
|
7
|
+
large: number;
|
|
8
8
|
};
|
|
9
9
|
export type SizeType = keyof typeof GAP_SIZE_MAP;
|
|
10
10
|
export type GapType = SizeType | React.CSSProperties['gap'];
|
|
@@ -13,6 +13,10 @@ export type GapType = SizeType | React.CSSProperties['gap'];
|
|
|
13
13
|
* @description Flex布局组件属性
|
|
14
14
|
*/
|
|
15
15
|
export interface FlexProps extends React.HTMLAttributes<HTMLElement> {
|
|
16
|
+
/**
|
|
17
|
+
* @zh 元素的行为类似于行级元素并且它的内容根据弹性盒模型布局。
|
|
18
|
+
*/
|
|
19
|
+
inline?: boolean;
|
|
16
20
|
/**
|
|
17
21
|
* @zh 布局方向
|
|
18
22
|
*/
|
|
@@ -60,3 +64,10 @@ export interface FlexProps extends React.HTMLAttributes<HTMLElement> {
|
|
|
60
64
|
*/
|
|
61
65
|
children: React.ReactNode;
|
|
62
66
|
}
|
|
67
|
+
export interface FlexVerticalProps extends Omit<FlexProps, 'direction'> {
|
|
68
|
+
/**
|
|
69
|
+
* @zh 垂直布局(正序或倒序)
|
|
70
|
+
* @en vertical layout
|
|
71
|
+
*/
|
|
72
|
+
direction?: 'column' | 'column-reverse';
|
|
73
|
+
}
|
|
@@ -1,9 +1,7 @@
|
|
|
1
|
-
import {
|
|
2
|
-
declare const SpaceVertical: import("react").ForwardRefExoticComponent<
|
|
1
|
+
import { SpaceProps, type SpaceVerticalProps } from './interface';
|
|
2
|
+
declare const SpaceVertical: import("react").ForwardRefExoticComponent<SpaceVerticalProps & import("react").RefAttributes<HTMLDivElement>>;
|
|
3
3
|
declare const Space: import("react").ForwardRefExoticComponent<SpaceProps & import("react").RefAttributes<HTMLDivElement>> & {
|
|
4
|
-
|
|
5
|
-
Vertical: import("react").ForwardRefExoticComponent<SpaceProps & import("react").RefAttributes<HTMLDivElement>>;
|
|
4
|
+
Vertical: import("react").ForwardRefExoticComponent<SpaceVerticalProps & import("react").RefAttributes<HTMLDivElement>>;
|
|
6
5
|
};
|
|
7
6
|
export { SpaceVertical };
|
|
8
7
|
export default Space;
|
|
9
|
-
export type { SpaceGap, SpaceProps };
|
|
@@ -13,7 +13,9 @@ export declare function getNow(utcOffset?: number, timezone?: string): originDay
|
|
|
13
13
|
export declare function toTimezone(time: Dayjs, utcOffset?: number, timezone?: string, local?: boolean): Dayjs;
|
|
14
14
|
export declare function toLocal(time: Dayjs, utcOffset?: number, timezone?: string): Dayjs;
|
|
15
15
|
export declare function getTimeFormat(format: string): string;
|
|
16
|
-
export declare function
|
|
16
|
+
export declare function formatValue(time: string | Dayjs, format?: string | undefined): originDayjs.Dayjs;
|
|
17
|
+
export declare function getRealTime(time: string | Dayjs, format: string, utcOffset: number | undefined, timezone: string | undefined): originDayjs.Dayjs;
|
|
18
|
+
export declare function getDayjsValue(time: number | string | Date | Dayjs | undefined, format: string | string[], utcOffset?: number, timezone?: string): originDayjs.Dayjs | (originDayjs.Dayjs | undefined)[] | undefined;
|
|
17
19
|
export declare function getValueWithTime(date: Dayjs, time?: Dayjs): Dayjs;
|
|
18
20
|
export declare function getSortedDayjsArray(values?: Dayjs[]): originDayjs.Dayjs[] | undefined;
|
|
19
21
|
export declare function isDayjsChange(prevValue: Dayjs | undefined, currentValue: Dayjs | undefined): boolean | originDayjs.Dayjs;
|
|
@@ -1,11 +1,10 @@
|
|
|
1
1
|
import { isArguments, isArray, isArrayBuffer, isArrayLike, isArrayLikeObject, isBlob, isBoolean, isBuffer, isColor, isColor2, isDate, isElement, isEmpty, isEmptyArray, isEmptyObject, isEmptyValue, isEqual, isEqualWith, isError, isFile, isFinite, isFunction, isInteger, isJSON, isLength, isMap, isMatch, isMatchWith, isNaN, isNative, isNil, isNull, isNumber, isObject, isObjectLike, isPlainObject, isPromise, isReadableByteStreamControllerSupported, isReadableStream, isReadableStreamDefaultControllerSupported, isReadableStreamSupported, isReadableStreamSymbolAsyncIteratorSupported, isRegExp, isSafeInteger, isSet, isString, isSymbol, isTypedArray, isUndefined, isValidColor, isWeakMap, isWeakSet } from '@unicom-cloud/utils/is';
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
2
|
+
import { isDayjs } from 'dayjs';
|
|
3
|
+
import { isContextConsumer as isReactContextConsumer, isContextProvider as isReactContextProvider, isElement as isReactElement, isForwardRef as isReactForwardRef, isFragment as isReactFragment, isLazy as isReactLazy, isMemo as isReactMemo, isPortal as isReactPortal, isProfiler as isReactProfiler, isStrictMode as isReactStrictMode, isSuspense as isReactSuspense, isValidElementType as isReactValidElementType } from 'react-is';
|
|
4
4
|
declare function isNullOrUndefined(obj: any): boolean;
|
|
5
5
|
declare function isEmptyReactNode(content: any, trim?: boolean): boolean;
|
|
6
6
|
declare function isExist(obj: any): boolean;
|
|
7
7
|
declare function isWindow(el: any): el is Window;
|
|
8
|
-
declare function isDayjs(time: any): time is Dayjs;
|
|
9
8
|
declare const isReactComponent: (element: any) => boolean;
|
|
10
9
|
declare const isClassComponent: (element: any) => boolean;
|
|
11
10
|
declare const isDOMElement: (element: any) => boolean;
|
|
@@ -15,4 +14,4 @@ declare const isForwardRefReact: (object: any) => boolean;
|
|
|
15
14
|
declare const supportRef: (element: any) => boolean;
|
|
16
15
|
declare const isSupportRef: (element: any) => boolean;
|
|
17
16
|
declare function is32Bit(c: string): boolean | 0 | undefined;
|
|
18
|
-
export { is32Bit, isArguments, isArray, isArrayBuffer, isArrayLike, isArrayLikeObject, isBlob, isBoolean, isBuffer, isClassComponent, isColor, isColor2, isDate, isDayjs, isDOMElement, isElement, isEmpty, isEmptyArray, isEmptyObject, isEmptyReactNode, isEmptyValue, isEqual, isEqualWith, isError, isExist, isFile, isFinite, isForwardRefReact, isFunction, isInteger, isJSON, isLength, isMap, isMatch, isMatchWith, isNaN, isNative, isNil, isNull, isNullOrUndefined, isNumber, isObject, isObjectLike, isPlainObject, isPromise, isReact18, isReact19,
|
|
17
|
+
export { is32Bit, isArguments, isArray, isArrayBuffer, isArrayLike, isArrayLikeObject, isBlob, isBoolean, isBuffer, isClassComponent, isColor, isColor2, isDate, isDayjs, isDOMElement, isElement, isEmpty, isEmptyArray, isEmptyObject, isEmptyReactNode, isEmptyValue, isEqual, isEqualWith, isError, isExist, isFile, isFinite, isForwardRefReact, isFunction, isInteger, isJSON, isLength, isMap, isMatch, isMatchWith, isNaN, isNative, isNil, isNull, isNullOrUndefined, isNumber, isObject, isObjectLike, isPlainObject, isPromise, isReact18, isReact19, isReactComponent, isReactContextConsumer, isReactContextProvider, isReactElement, isReactForwardRef, isReactFragment, isReactLazy, isReactMemo, isReactPortal, isReactProfiler, isReactStrictMode, isReactSuspense, isReactValidElementType, isReadableByteStreamControllerSupported, isReadableStream, isReadableStreamDefaultControllerSupported, isReadableStreamSupported, isReadableStreamSymbolAsyncIteratorSupported, isRegExp, isSafeInteger, isSet, isString, isSupportRef, isSymbol, isTypedArray, isUndefined, isValidColor, isWeakMap, isWeakSet, isWindow, supportRef, };
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import React, { ReactNode } from 'react';
|
|
2
|
+
import type { ConfigProps as MessageConfigProps, MessageHookReturnType } from '../message/interface';
|
|
3
|
+
import type { ModalHookReturnType } from '../modal/interface';
|
|
4
|
+
import type { ConfigProps as NotificationConfigProps, NotificationHookReturnType } from '../notification/interface';
|
|
5
|
+
export interface AppProps {
|
|
6
|
+
message?: MessageConfigProps;
|
|
7
|
+
notification?: NotificationConfigProps;
|
|
8
|
+
children?: ReactNode;
|
|
9
|
+
}
|
|
10
|
+
export interface useAppProps {
|
|
11
|
+
message: MessageHookReturnType;
|
|
12
|
+
notification: NotificationHookReturnType;
|
|
13
|
+
modal: ModalHookReturnType;
|
|
14
|
+
}
|
|
15
|
+
export interface AppComponentType extends React.FC<AppProps> {
|
|
16
|
+
useApp: () => useAppProps;
|
|
17
|
+
}
|
|
@@ -17,26 +17,13 @@ export interface BackTopProps {
|
|
|
17
17
|
* @defaultValue () => window
|
|
18
18
|
*/
|
|
19
19
|
target?: () => HTMLElement | Window;
|
|
20
|
+
/**
|
|
21
|
+
* @zh 是否平滑滚动
|
|
22
|
+
*/
|
|
23
|
+
smooth?: boolean;
|
|
20
24
|
/**
|
|
21
25
|
* @zh 点击返回顶部时的回调函数。
|
|
22
26
|
* @en Callback when you click to return to the top.
|
|
23
27
|
*/
|
|
24
28
|
onClick?: () => void;
|
|
25
|
-
/**
|
|
26
|
-
* @zh 是否使用Tween缓动库,注:当元素的css属性scroll-behavior: smooth;时,将不使用Tween缓动库
|
|
27
|
-
* @defaultValue true
|
|
28
|
-
*/
|
|
29
|
-
tween?: boolean;
|
|
30
|
-
/**
|
|
31
|
-
* @zh 滚动到顶部的缓动方式类型
|
|
32
|
-
* @en Scroll to the top of the easing method type
|
|
33
|
-
* @defaultValue quartOut
|
|
34
|
-
*/
|
|
35
|
-
easing?: Function | string;
|
|
36
|
-
/**
|
|
37
|
-
* @zh 滚动到顶部的时间。
|
|
38
|
-
* @en Duration to scroll to the top
|
|
39
|
-
* @defaultValue 400
|
|
40
|
-
*/
|
|
41
|
-
duration?: number;
|
|
42
29
|
}
|
|
@@ -21,9 +21,9 @@ export interface BaseButtonProps {
|
|
|
21
21
|
/**
|
|
22
22
|
* @zh 按钮的尺寸
|
|
23
23
|
* @en Size of the button
|
|
24
|
-
* @defaultValue
|
|
24
|
+
* @defaultValue medium
|
|
25
25
|
*/
|
|
26
|
-
size?: 'mini' | 'small' | '
|
|
26
|
+
size?: 'mini' | 'small' | 'medium' | 'large' | 'default';
|
|
27
27
|
/**
|
|
28
28
|
* @zh 按钮形状,`circle` - 圆形, `round` - 全圆角, `square` - 长方形
|
|
29
29
|
* @en Three button shapes are available: `circle`, `round` and `square`
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import type { CalendarProps } from './interface';
|
|
2
|
+
export interface CalendarLunarProps extends CalendarProps {
|
|
3
|
+
/**
|
|
4
|
+
* @zh 自定义节假日,公历或者农历,例如 festival: { lunar: { '2-27': '潘启宝农历生日' }, solar: { '11-22': '潘星移生日' }, }
|
|
5
|
+
*/
|
|
6
|
+
festival: {
|
|
7
|
+
solar: {
|
|
8
|
+
[key: string]: string;
|
|
9
|
+
};
|
|
10
|
+
lunar: Record<string, string>;
|
|
11
|
+
};
|
|
12
|
+
}
|
|
13
|
+
declare function LunarComponent(props: CalendarLunarProps): import("react/jsx-runtime").JSX.Element;
|
|
14
|
+
declare namespace LunarComponent {
|
|
15
|
+
var displayName: string;
|
|
16
|
+
}
|
|
17
|
+
export default LunarComponent;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
+
import { CalendarProps } from './interface';
|
|
1
2
|
import Month from './Month';
|
|
2
3
|
import Year from './Year';
|
|
3
|
-
import { CalendarProps } from './interface';
|
|
4
4
|
declare function Calendar(baseProps: CalendarProps): import("react/jsx-runtime").JSX.Element;
|
|
5
5
|
declare namespace Calendar {
|
|
6
6
|
var displayName: string;
|
|
@@ -16,6 +16,7 @@ import { CheckboxProps } from '../checkbox/interface';
|
|
|
16
16
|
import { CollapseProps } from '../collapse/interface';
|
|
17
17
|
import { ColorPickerProps } from '../color-picker/interface';
|
|
18
18
|
import { CommentProps } from '../comment/interface';
|
|
19
|
+
import type { CountdownProps } from '../countdown';
|
|
19
20
|
import { PickerProps as DatePickerCommonProps } from '../date-picker/interface';
|
|
20
21
|
import { DescriptionsProps } from '../descriptions/interface';
|
|
21
22
|
import { DetailsProps } from '../details/interface';
|
|
@@ -25,7 +26,7 @@ import { DropdownButtonProps, DropdownProps } from '../dropdown/interface';
|
|
|
25
26
|
import { EmptyProps } from '../empty/interface';
|
|
26
27
|
import type { FlexProps } from '../flex/interface';
|
|
27
28
|
import { FormProps } from '../form/interface';
|
|
28
|
-
import {
|
|
29
|
+
import { GridItemProps, GridProps } from '../grid/interface';
|
|
29
30
|
import { ImageProps } from '../image/interface';
|
|
30
31
|
import { InputNumberProps } from '../input-number/interface';
|
|
31
32
|
import { InputTagProps } from '../input-tag/interface';
|
|
@@ -50,6 +51,7 @@ import { RadioGroupProps, RadioProps } from '../radio/interface';
|
|
|
50
51
|
import { RateProps } from '../rate/interface';
|
|
51
52
|
import { ResizeBoxProps } from '../resize-box/interface';
|
|
52
53
|
import { ResultProps } from '../result/interface';
|
|
54
|
+
import type { ColProps, RowProps } from '../row-col/interface';
|
|
53
55
|
import type { SegmentedProps } from '../segmented/interface';
|
|
54
56
|
import { SelectProps } from '../select/interface';
|
|
55
57
|
import { SkeletonProps } from '../skeleton/interface';
|
|
@@ -82,9 +84,9 @@ export type ComponentConfig = {
|
|
|
82
84
|
Alert?: AlertProps;
|
|
83
85
|
AutoComplete?: AutoCompleteProps;
|
|
84
86
|
Avatar?: AvatarProps;
|
|
85
|
-
|
|
87
|
+
AvatarGroup?: AvatarGroupProps;
|
|
86
88
|
Anchor?: AnchorProps;
|
|
87
|
-
|
|
89
|
+
AnchorLink?: AnchorLinkProps;
|
|
88
90
|
BackTop?: BackTopProps;
|
|
89
91
|
Badge?: BadgeProps;
|
|
90
92
|
Breadcrumb?: BreadcrumbProps;
|
|
@@ -102,15 +104,17 @@ export type ComponentConfig = {
|
|
|
102
104
|
Divider?: DividerProps;
|
|
103
105
|
Drawer?: DrawerProps;
|
|
104
106
|
Dropdown?: DropdownProps;
|
|
105
|
-
|
|
107
|
+
DropdownButton?: DropdownButtonProps;
|
|
106
108
|
Empty?: EmptyProps;
|
|
107
109
|
Typography?: TypographyProps;
|
|
108
|
-
|
|
110
|
+
TypographyEllipsis?: TypographyEllipsisProps;
|
|
109
111
|
Form?: FormProps;
|
|
110
|
-
|
|
111
|
-
|
|
112
|
+
Row?: RowProps;
|
|
113
|
+
Col?: ColProps;
|
|
112
114
|
Grid?: GridProps;
|
|
113
|
-
|
|
115
|
+
GridItem?: GridItemProps;
|
|
116
|
+
GridRow?: RowProps;
|
|
117
|
+
GridCol?: ColProps;
|
|
114
118
|
Image?: ImageProps;
|
|
115
119
|
Input?: InputProps;
|
|
116
120
|
InputNumber?: InputNumberProps;
|
|
@@ -120,7 +124,7 @@ export type ComponentConfig = {
|
|
|
120
124
|
Layout?: LayoutProps;
|
|
121
125
|
Link?: LinkProps;
|
|
122
126
|
List?: ListProps;
|
|
123
|
-
|
|
127
|
+
ListItem?: ListItemProps;
|
|
124
128
|
Mentions?: MentionsProps;
|
|
125
129
|
Menu?: MenuProps;
|
|
126
130
|
Modal?: ModalProps;
|
|
@@ -130,7 +134,7 @@ export type ComponentConfig = {
|
|
|
130
134
|
Popover?: PopoverProps;
|
|
131
135
|
Progress?: ProgressProps;
|
|
132
136
|
Radio?: RadioProps;
|
|
133
|
-
|
|
137
|
+
RadioGroup?: RadioGroupProps;
|
|
134
138
|
Rate?: RateProps;
|
|
135
139
|
ResizeBox?: ResizeBoxProps;
|
|
136
140
|
Result?: ResultProps;
|
|
@@ -140,6 +144,7 @@ export type ComponentConfig = {
|
|
|
140
144
|
Space?: SpaceProps;
|
|
141
145
|
Spin?: SpinProps;
|
|
142
146
|
Statistic?: StatisticProps;
|
|
147
|
+
Countdown?: CountdownProps;
|
|
143
148
|
Steps?: StepsProps;
|
|
144
149
|
Switch?: SwitchProps;
|
|
145
150
|
Table?: TableProps;
|
|
@@ -148,7 +153,7 @@ export type ComponentConfig = {
|
|
|
148
153
|
TriggerProps?: TriggerProps;
|
|
149
154
|
Tag?: TagProps;
|
|
150
155
|
Timeline?: TimelineProps;
|
|
151
|
-
|
|
156
|
+
TimelineItem?: TimelineItemProps;
|
|
152
157
|
TimePicker?: TimePickerCommonProps;
|
|
153
158
|
Tooltip?: TooltipProps;
|
|
154
159
|
Transfer?: TransferProps;
|
|
@@ -208,7 +213,7 @@ export interface ConfigProviderProps {
|
|
|
208
213
|
* @en The parent node of the global popup.
|
|
209
214
|
* @defaultValue () => document.body
|
|
210
215
|
*/
|
|
211
|
-
getPopupContainer?: (node: HTMLElement) => Element;
|
|
216
|
+
getPopupContainer?: (node: HTMLElement) => Element | null;
|
|
212
217
|
/**
|
|
213
218
|
* @zh 全局的加载中图标,作用于所有组件。
|
|
214
219
|
* @en Global loading icon.
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export const COLS: 24;
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
import { Dayjs } from 'dayjs';
|
|
2
|
+
import { CSSProperties, ReactNode } from 'react';
|
|
3
|
+
/**
|
|
4
|
+
* @title Countdown
|
|
5
|
+
*/
|
|
6
|
+
export interface CountdownProps {
|
|
7
|
+
/**
|
|
8
|
+
* @zh 自定义样式
|
|
9
|
+
* @en Custom style
|
|
10
|
+
*/
|
|
11
|
+
style?: CSSProperties;
|
|
12
|
+
/**
|
|
13
|
+
* @zh 自定义类名
|
|
14
|
+
* @en Custom class name
|
|
15
|
+
*/
|
|
16
|
+
className?: string | string[];
|
|
17
|
+
/**
|
|
18
|
+
* @zh 数值的样式
|
|
19
|
+
* @en The css style of statistic's value
|
|
20
|
+
*/
|
|
21
|
+
styleValue?: CSSProperties;
|
|
22
|
+
/**
|
|
23
|
+
* @zh 数值的标题
|
|
24
|
+
* @en The title element
|
|
25
|
+
*/
|
|
26
|
+
title?: string | ReactNode;
|
|
27
|
+
/**
|
|
28
|
+
* @zh 倒计时的时间
|
|
29
|
+
* @en To set value
|
|
30
|
+
*/
|
|
31
|
+
value?: number | string | Date | Dayjs;
|
|
32
|
+
/**
|
|
33
|
+
* @zh [dayjs](https://github.com/iamkun/dayjs)'s format
|
|
34
|
+
* @en [dayjs](https://github.com/iamkun/dayjs)'s format
|
|
35
|
+
* @defaultValue HH:mm:ss
|
|
36
|
+
*/
|
|
37
|
+
format?: string;
|
|
38
|
+
/**
|
|
39
|
+
* @zh 自定义 render 函数。`valueDiff` 表示两个时间的时间差,`formattedDiff` 表示格式化后的时间差,
|
|
40
|
+
* @en Custom render function, the input parameter is the result formatted by `dayjs`
|
|
41
|
+
*/
|
|
42
|
+
renderFormat?: (valueDiff: number, formattedDiff: string) => ReactNode;
|
|
43
|
+
/**
|
|
44
|
+
* @zh 倒计时完成后触发的回调
|
|
45
|
+
* @en Callback at the end of the countdown
|
|
46
|
+
*/
|
|
47
|
+
onFinish?: () => void;
|
|
48
|
+
/**
|
|
49
|
+
* @zh 是否开始倒计时,默认为 `true`,可以通过设置该值控制倒计时的时机
|
|
50
|
+
* @en Whether to start the countdown
|
|
51
|
+
* @defaultValue true
|
|
52
|
+
*/
|
|
53
|
+
start?: boolean;
|
|
54
|
+
/**
|
|
55
|
+
* @zh 禁用自带样式
|
|
56
|
+
* @en Disable default style
|
|
57
|
+
*/
|
|
58
|
+
noStyle?: boolean;
|
|
59
|
+
/**
|
|
60
|
+
* @zh 是否循环倒计时
|
|
61
|
+
* @en Whether to loop the countdown
|
|
62
|
+
* @defaultValue false
|
|
63
|
+
*/
|
|
64
|
+
loop?: boolean;
|
|
65
|
+
}
|
package/types/pc/flex/index.d.ts
CHANGED
|
@@ -1,9 +1,11 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import { FlexProps } from './interface';
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
declare const Flex:
|
|
2
|
+
import type { FlexProps, FlexVerticalProps } from './interface';
|
|
3
|
+
/**
|
|
4
|
+
* 垂直布局组件
|
|
5
|
+
*/
|
|
6
|
+
declare const FlexVertical: React.FC<FlexVerticalProps>;
|
|
7
|
+
declare const Flex: React.ForwardRefExoticComponent<FlexProps & React.RefAttributes<HTMLElement>> & {
|
|
8
|
+
Vertical: React.FC<FlexVerticalProps>;
|
|
9
|
+
};
|
|
8
10
|
export { FlexVertical };
|
|
9
11
|
export default Flex;
|
|
@@ -1,16 +1,9 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import type { FlexProps as CommonFlexProps, GapType, SizeType } from '../../common/flex/interface';
|
|
1
|
+
import type { FlexProps as CommonFlexProps, FlexVerticalProps as CommonFlexVerticalProps, GapType, SizeType } from '../../common/flex/interface';
|
|
3
2
|
export type { GapType, SizeType };
|
|
4
3
|
/**
|
|
5
4
|
* @title Flex
|
|
6
5
|
*/
|
|
7
6
|
export interface FlexProps extends CommonFlexProps {
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
*/
|
|
11
|
-
className?: string;
|
|
12
|
-
/**
|
|
13
|
-
* 自定义样式
|
|
14
|
-
*/
|
|
15
|
-
style?: CSSProperties;
|
|
7
|
+
}
|
|
8
|
+
export interface FlexVerticalProps extends CommonFlexVerticalProps {
|
|
16
9
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import
|
|
2
|
+
import Row from '../row-col';
|
|
3
3
|
import { FormItemProps, KeyType } from './interface';
|
|
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"]>;
|
|
@@ -2,7 +2,7 @@ import { Options as ScrollIntoViewOptions } from '@unicom-cloud/scroll-into-view
|
|
|
2
2
|
import { ValidateMessagesTemplateType } from '@unicom-cloud/validate/types';
|
|
3
3
|
import React, { CSSProperties, FormHTMLAttributes, HTMLAttributes, ReactElement, ReactNode } from 'react';
|
|
4
4
|
import { JSX } from 'react/jsx-runtime';
|
|
5
|
-
import { ColProps } from '../
|
|
5
|
+
import type { ColProps } from '../row-col/interface';
|
|
6
6
|
import { TooltipProps } from '../tooltip/interface';
|
|
7
7
|
import Store from './store';
|
|
8
8
|
export type IndexedObject = {
|
package/types/pc/grid/Grid.d.ts
CHANGED
|
@@ -1,5 +1,3 @@
|
|
|
1
|
-
import
|
|
2
|
-
|
|
3
|
-
declare const Grid: React.ForwardRefExoticComponent<GridProps & React.RefAttributes<unknown>>;
|
|
1
|
+
import type { GridProps } from './interface';
|
|
2
|
+
declare const Grid: import("react").ForwardRefExoticComponent<GridProps & import("react").RefAttributes<unknown>>;
|
|
4
3
|
export default Grid;
|
|
5
|
-
export type { GridProps };
|
package/types/pc/grid/Item.d.ts
CHANGED
|
@@ -1,8 +1,4 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
1
|
import { GridItemProps } from './interface';
|
|
3
|
-
declare const
|
|
4
|
-
declare const GridItem: typeof GridItemForwardRef & {
|
|
5
|
-
__PQB_GRID_ITEM__: boolean;
|
|
6
|
-
};
|
|
2
|
+
declare const GridItem: import("react").ForwardRefExoticComponent<GridItemProps & import("react").RefAttributes<unknown>>;
|
|
7
3
|
export default GridItem;
|
|
8
4
|
export type { GridItemProps };
|
|
@@ -1,19 +1,8 @@
|
|
|
1
|
-
import {
|
|
2
|
-
type RowContextType = {
|
|
3
|
-
gutter?: [number, number];
|
|
4
|
-
div?: boolean;
|
|
5
|
-
};
|
|
6
|
-
export declare const RowContext: import("react").Context<RowContextType>;
|
|
1
|
+
import type { GridProps } from './interface';
|
|
7
2
|
type GridContextType = {
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
cols?: number;
|
|
12
|
-
colGap?: number;
|
|
3
|
+
cols?: GridProps['cols'];
|
|
4
|
+
rowGap?: GridProps['rowGap'];
|
|
5
|
+
colGap?: GridProps['colGap'];
|
|
13
6
|
};
|
|
14
7
|
export declare const GridContext: import("react").Context<GridContextType>;
|
|
15
|
-
export declare const GridDataCollectorContext: import("react").Context<Readonly<{
|
|
16
|
-
collectItemData?: (index: number, itemData: GridItemData) => void;
|
|
17
|
-
removeItemData?: (index: number) => void;
|
|
18
|
-
}>>;
|
|
19
8
|
export {};
|
package/types/pc/grid/index.d.ts
CHANGED
|
@@ -1,12 +1,10 @@
|
|
|
1
|
-
import Col from '
|
|
1
|
+
import Row, { Col } from '../row-col';
|
|
2
2
|
import OriginGrid from './Grid';
|
|
3
3
|
import Item from './Item';
|
|
4
|
-
import Row from './Row';
|
|
5
4
|
declare const Grid: typeof OriginGrid & {
|
|
6
|
-
Col: typeof Col;
|
|
7
|
-
Row: typeof Row;
|
|
8
5
|
Item: typeof Item;
|
|
6
|
+
Row: typeof Row;
|
|
7
|
+
Col: typeof Col;
|
|
9
8
|
};
|
|
10
|
-
export { Col
|
|
9
|
+
export { Col as GridCol, Item as GridItem, Row as GridRow };
|
|
11
10
|
export default Grid;
|
|
12
|
-
export type { ColProps, GridProps, ResponsiveValue, RowProps, } from './interface';
|