@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.
Files changed (197) hide show
  1. package/App.js +7 -0
  2. package/BackTop.js +2 -4
  3. package/Calendar.js +2 -2
  4. package/ColorPicker.js +15 -14
  5. package/Constant.js +4 -0
  6. package/Copy.js +4 -3
  7. package/Countdown.js +25 -0
  8. package/Grid.js +8 -10
  9. package/LiquidFill.js +4 -3
  10. package/List.js +7 -6
  11. package/Marquee.js +4 -3
  12. package/Modal.js +4 -2
  13. package/PageHeader.js +3 -2
  14. package/QrCode.js +4 -3
  15. package/RowCol.js +8 -0
  16. package/Segmented.js +14 -4
  17. package/Statistic.js +5 -4
  18. package/Tour.js +4 -3
  19. package/Transfer.js +4 -2
  20. package/anchor/Link.js +1 -1
  21. package/app/App.js +26 -0
  22. package/app/context.js +9 -0
  23. package/app/index.js +9 -0
  24. package/app/interface.js +1 -0
  25. package/app/useApp.js +8 -0
  26. package/avatar/Group.js +1 -1
  27. package/back-top/index.js +44 -56
  28. package/button/index.js +52 -51
  29. package/calendar/Lunar.js +71 -0
  30. package/calendar/index.js +11 -11
  31. package/cascader/base/node.js +22 -20
  32. package/cascader/base/store.js +10 -10
  33. package/cascader/util.js +29 -27
  34. package/color-picker/Mode.js +8 -7
  35. package/color-picker/hooks/useColorPicker.js +56 -55
  36. package/color-picker/index.js +49 -48
  37. package/color-picker/utils.js +58 -57
  38. package/components/common/empty/index.js +2 -2
  39. package/components/common/flex/index.js +64 -55
  40. package/components/common/flex/interface.js +6 -6
  41. package/components/common/hooks/useInterval.js +6 -6
  42. package/components/common/icons/file/index.js +13 -11
  43. package/components/common/space/index.js +53 -53
  44. package/components/common/utils/dayjs.js +114 -126
  45. package/components/common/utils/is.js +98 -104
  46. package/components/common/utils/setDir.js +12 -0
  47. package/components/common/utils/setTheme.js +13 -13
  48. package/components/common/utils/toArray.js +7 -5
  49. package/config-provider/ConfigProvider.js +32 -30
  50. package/constant/index.js +4 -0
  51. package/copy/index.js +2 -1
  52. package/countdown/index.js +113 -0
  53. package/countdown/interface.js +1 -0
  54. package/countdown/util.js +29 -0
  55. package/descriptions/index.js +45 -45
  56. package/divider/index.js +28 -20
  57. package/dropdown/Button.js +1 -1
  58. package/empty/index.js +1 -1
  59. package/flex/index.js +30 -29
  60. package/form/FormItem.js +126 -122
  61. package/grid/Grid.js +56 -90
  62. package/grid/Item.js +44 -65
  63. package/grid/context.js +2 -6
  64. package/grid/index.js +6 -8
  65. package/grid/util.js +6 -44
  66. package/hooks/useResponsiveState.js +54 -0
  67. package/index.js +614 -605
  68. package/input/Button.js +12 -12
  69. package/input/Group.js +11 -12
  70. package/input/Input.js +112 -102
  71. package/input/InputElement.js +25 -24
  72. package/input/Search.js +24 -24
  73. package/layout/Sider.js +1 -1
  74. package/liquid-fill/index.js +4 -3
  75. package/list/Item.js +21 -21
  76. package/list/index.js +53 -52
  77. package/marquee/index.js +20 -19
  78. package/marquee-/index.js +4 -3
  79. package/mentions/util.js +9 -8
  80. package/modal/Confirm.js +17 -17
  81. package/modal/Modal.js +247 -237
  82. package/modal/index.js +4 -2
  83. package/modal/use-modal/index.js +2 -2
  84. package/package.json +1 -1
  85. package/page-header/index.js +57 -56
  86. package/pagination/Pagination.js +89 -92
  87. package/qr-code/index.js +4 -3
  88. package/radio/Group.js +1 -1
  89. package/row-col/Col-.js +88 -0
  90. package/row-col/Col.js +159 -0
  91. package/row-col/Row.js +73 -0
  92. package/row-col/context.js +5 -0
  93. package/row-col/index.js +11 -0
  94. package/row-col/interface.js +1 -0
  95. package/segmented/index.js +257 -206
  96. package/select/Select.js +191 -191
  97. package/select/util.js +50 -50
  98. package/select-view/Core.js +31 -28
  99. package/space/index.js +15 -13
  100. package/splitter/SplitBar.js +44 -46
  101. package/statistic/index.js +56 -55
  102. package/statistic/interface.js +4 -1
  103. package/style.css +1 -1
  104. package/table/Table.js +198 -210
  105. package/table/hook/useColumns.js +27 -26
  106. package/table/hook/useStickyClassNames.js +9 -8
  107. package/table/hook/useThResizable.js +4 -3
  108. package/table/th-resizable/index.js +2 -2
  109. package/table/thead/index.js +18 -16
  110. package/time-picker/util.js +20 -30
  111. package/timeline/Item.js +1 -1
  112. package/tour/index.js +4 -3
  113. package/transfer/index.js +93 -91
  114. package/trigger/index.js +66 -66
  115. package/types/common/development/interface.d.ts +3 -3
  116. package/types/common/flex/index.d.ts +3 -9
  117. package/types/common/flex/interface.d.ts +15 -4
  118. package/types/common/space/index.d.ts +3 -5
  119. package/types/common/space/interface.d.ts +2 -0
  120. package/types/common/utils/dayjs.d.ts +3 -1
  121. package/types/common/utils/is.d.ts +3 -4
  122. package/types/common/utils/setDir.d.ts +2 -0
  123. package/types/pc/app/App.d.ts +6 -0
  124. package/types/pc/app/context.d.ts +4 -0
  125. package/types/pc/app/index.d.ts +5 -0
  126. package/types/pc/app/interface.d.ts +17 -0
  127. package/types/pc/app/useApp.d.ts +3 -0
  128. package/types/pc/back-top/interface.d.ts +4 -17
  129. package/types/pc/button/interface.d.ts +2 -2
  130. package/types/pc/calendar/Lunar.d.ts +17 -0
  131. package/types/pc/calendar/index.d.ts +1 -1
  132. package/types/pc/config-provider/interface.d.ts +17 -12
  133. package/types/pc/constant/index.d.ts +1 -0
  134. package/types/pc/countdown/interface.d.ts +65 -0
  135. package/types/pc/countdown/util.d.ts +7 -0
  136. package/types/pc/divider/interface.d.ts +1 -0
  137. package/types/pc/flex/index.d.ts +8 -6
  138. package/types/pc/flex/interface.d.ts +3 -10
  139. package/types/pc/form/FormItem.d.ts +1 -1
  140. package/types/pc/form/interface.d.ts +1 -1
  141. package/types/pc/grid/Grid.d.ts +2 -4
  142. package/types/pc/grid/Item.d.ts +1 -5
  143. package/types/pc/grid/context.d.ts +4 -15
  144. package/types/pc/grid/index.d.ts +4 -6
  145. package/types/pc/grid/interface.d.ts +14 -142
  146. package/types/pc/grid/util.d.ts +1 -10
  147. package/types/pc/hooks/useResponsiveState.d.ts +3 -0
  148. package/types/pc/index.d.ts +10 -4
  149. package/types/pc/input/Button.d.ts +2 -2
  150. package/types/pc/list/interface.d.ts +2 -1
  151. package/types/pc/message/index.d.ts +1 -9
  152. package/types/pc/message/interface.d.ts +8 -0
  153. package/types/pc/message/useMessage.d.ts +1 -2
  154. package/types/pc/modal/Modal.d.ts +1 -0
  155. package/types/pc/modal/config.d.ts +1 -2
  156. package/types/pc/modal/index.d.ts +2 -1
  157. package/types/pc/modal/interface.d.ts +17 -5
  158. package/types/pc/notification/index.d.ts +2 -9
  159. package/types/pc/notification/interface.d.ts +7 -0
  160. package/types/pc/notification/useNotification.d.ts +1 -2
  161. package/types/pc/pagination/PageOption.d.ts +0 -1
  162. package/types/pc/pagination/interface.d.ts +5 -6
  163. package/types/pc/{grid → row-col}/Col-.d.ts +1 -1
  164. package/types/pc/{grid → row-col}/Col.d.ts +1 -2
  165. package/types/pc/{grid → row-col}/Row.d.ts +1 -2
  166. package/types/pc/row-col/context.d.ts +6 -0
  167. package/types/pc/row-col/index.d.ts +7 -0
  168. package/types/pc/row-col/interface.d.ts +112 -0
  169. package/types/pc/segmented/index.d.ts +3 -7
  170. package/types/pc/segmented/interface.d.ts +38 -5
  171. package/types/pc/select-view/Core.d.ts +1 -8
  172. package/types/pc/select-view/index.d.ts +1 -8
  173. package/types/pc/select-view/interface.d.ts +9 -2
  174. package/types/pc/space/index.d.ts +5 -7
  175. package/types/pc/space/interface.d.ts +3 -10
  176. package/types/pc/statistic/index.d.ts +1 -1
  177. package/types/pc/statistic/interface.d.ts +1 -49
  178. package/types/pc/utils/is.d.ts +1 -1
  179. package/types/pc/utils/names.d.ts +422 -111
  180. package/types/pc/utils/responsiveObserve.d.ts +8 -8
  181. package/typography/Ellipsis.js +5 -4
  182. package/typography/Operations.js +4 -3
  183. package/utils/dayjs.js +13 -11
  184. package/utils/index.js +245 -244
  185. package/utils/is.js +65 -66
  186. package/utils/names.js +309 -150
  187. package/utils/responsiveObserve.js +43 -36
  188. package/version/index.js +1 -1
  189. package/grid/Col-.js +0 -86
  190. package/grid/Col.js +0 -169
  191. package/grid/Row.js +0 -96
  192. package/grid/hook/useResponsiveState.js +0 -38
  193. package/statistic/Countdown.js +0 -56
  194. package/statistic/util.js +0 -33
  195. package/types/pc/grid/hook/useResponsiveState.d.ts +0 -2
  196. package/types/pc/statistic/util.d.ts +0 -1
  197. /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: typeof FlexVertical;
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: string;
5
- small: string;
6
- medium: string;
7
- large: string;
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 { SpaceGap, SpaceProps } from './interface';
2
- declare const SpaceVertical: import("react").ForwardRefExoticComponent<SpaceProps & import("react").RefAttributes<HTMLDivElement>>;
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
- displayName: string;
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 };
@@ -49,3 +49,5 @@ export interface SpaceProps {
49
49
  */
50
50
  rtl?: boolean;
51
51
  }
52
+ export interface SpaceVerticalProps extends Omit<SpaceProps, 'direction'> {
53
+ }
@@ -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 getDayjsValue(time: string | Dayjs, format: string | string[], utcOffset?: number, timezone?: string): originDayjs.Dayjs | (originDayjs.Dayjs | undefined)[] | undefined;
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 { Dayjs } from 'dayjs';
3
- import { isAsyncMode as isReactAsyncMode, isConcurrentMode as isReactConcurrentMode, 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';
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, isReactAsyncMode, isReactComponent, isReactConcurrentMode, 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, };
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,2 @@
1
+ export default setDir;
2
+ export function setDir(params: any): void;
@@ -0,0 +1,6 @@
1
+ import type { AppProps } from './interface';
2
+ declare function App(props: AppProps): import("react/jsx-runtime").JSX.Element;
3
+ declare namespace App {
4
+ var displayName: string;
5
+ }
6
+ export default App;
@@ -0,0 +1,4 @@
1
+ import React from 'react';
2
+ import { useAppProps } from './interface';
3
+ declare const AppContext: React.Context<useAppProps>;
4
+ export default AppContext;
@@ -0,0 +1,5 @@
1
+ import type { AppComponentType } from './interface';
2
+ import useApp from './useApp';
3
+ declare const App: AppComponentType;
4
+ export { useApp };
5
+ export default App;
@@ -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
+ }
@@ -0,0 +1,3 @@
1
+ import { useAppProps } from './interface';
2
+ declare function useApp(): useAppProps;
3
+ export default useApp;
@@ -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 default
24
+ * @defaultValue medium
25
25
  */
26
- size?: 'mini' | 'small' | 'default' | 'large';
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 { ColProps, GridItemProps, GridProps, RowProps } from '../grid/interface';
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
- 'Avatar.Group'?: AvatarGroupProps;
87
+ AvatarGroup?: AvatarGroupProps;
86
88
  Anchor?: AnchorProps;
87
- 'Anchor.Link'?: AnchorLinkProps;
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
- 'Dropdown.Button'?: DropdownButtonProps;
107
+ DropdownButton?: DropdownButtonProps;
106
108
  Empty?: EmptyProps;
107
109
  Typography?: TypographyProps;
108
- 'Typography.Ellipsis'?: TypographyEllipsisProps;
110
+ TypographyEllipsis?: TypographyEllipsisProps;
109
111
  Form?: FormProps;
110
- 'Grid.Row'?: RowProps;
111
- 'Grid.Col'?: ColProps;
112
+ Row?: RowProps;
113
+ Col?: ColProps;
112
114
  Grid?: GridProps;
113
- 'Grid.Item'?: GridItemProps;
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
- 'List.Item'?: ListItemProps;
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
- 'Radio.Group'?: RadioGroupProps;
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
- 'Timeline.Item'?: TimelineItemProps;
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
+ }
@@ -0,0 +1,7 @@
1
+ /**
2
+ * 格式化毫秒数为日期字符串
3
+ * @param millisecond 剩余毫秒数
4
+ * @param format 格式字符串
5
+ * @returns 格式化后的字符串
6
+ */
7
+ export declare function getDateString(millisecond: number, format: string): string;
@@ -6,6 +6,7 @@ export interface DividerProps {
6
6
  children?: ReactNode;
7
7
  style?: CSSProperties;
8
8
  className?: string | string[];
9
+ textStyle?: CSSProperties;
9
10
  /**
10
11
  * @zh 分割线的类型,是水平还是竖直,分别对应 `horizontal` 和 `vertical`
11
12
  * @en Two types are available: `horizontal` and `vertical`
@@ -1,9 +1,11 @@
1
1
  import React from 'react';
2
- import { FlexProps } from './interface';
3
- declare const FlexVertical: React.ForwardRefExoticComponent<FlexProps & React.RefAttributes<HTMLDivElement>>;
4
- interface FlexInterface extends React.ForwardRefExoticComponent<FlexProps & React.RefAttributes<HTMLDivElement>> {
5
- Vertical: typeof FlexVertical;
6
- }
7
- declare const Flex: FlexInterface;
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 { CSSProperties } from 'react';
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 { Row } from '../grid';
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 '../grid/Col';
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 = {
@@ -1,5 +1,3 @@
1
- import React from 'react';
2
- import { GridProps } from './interface';
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 };
@@ -1,8 +1,4 @@
1
- import React from 'react';
2
1
  import { GridItemProps } from './interface';
3
- declare const GridItemForwardRef: React.ForwardRefExoticComponent<GridItemProps & React.RefAttributes<unknown>>;
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 { GridItemData } from './interface';
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
- overflow?: boolean;
9
- collapsed?: boolean;
10
- displayIndexList?: number[];
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 {};
@@ -1,12 +1,10 @@
1
- import Col from './Col';
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, Col as GridCol, Item as GridItem, Row as GridRow, Row };
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';