@unicom-cloud/ui 0.8.57 → 0.8.59
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/Affix.js +15 -15
- package/Alert.js +5 -5
- package/Anchor.js +1 -1
- package/AutoComplete.js +28 -28
- package/Avatar.js +11 -11
- package/BackTop.js +28 -28
- package/Badge.js +10 -10
- package/Breadcrumb.js +6 -6
- package/Button.js +11 -10
- package/Calendar.js +8 -8
- package/Card.js +3 -3
- package/Carousel.js +7 -7
- package/Cascader.js +1 -1
- package/Checkbox.js +1 -1
- package/Collapse.js +1 -1
- package/ColorPicker.js +582 -11
- package/Comment.js +7 -7
- package/ConfigProvider.js +2 -2
- package/Copy.js +6 -6
- package/DatePicker.js +14 -12
- package/Descriptions.js +3 -3
- package/Divider.js +3 -3
- package/Draggable.js +12 -12
- package/Drawer.js +1 -1
- package/Dropdown.js +5 -5
- package/Empty.js +3 -3
- package/Form.js +1410 -10
- package/Grid.js +14 -14
- package/Icon.js +2 -2
- package/IconHover.js +2 -2
- package/Image.js +1 -1
- package/Input.js +2 -2
- package/InputNumber.js +8 -8
- package/InputTag.js +1 -1
- package/Layout.js +8 -8
- package/Link.js +13 -13
- package/List.js +21 -21
- package/Mentions.js +30 -30
- package/Menu.js +1 -1
- package/Message.js +3 -3
- package/Modal.js +1 -1
- package/Notice.js +3 -3
- package/Notification.js +4 -4
- package/OverflowEllipsis.js +9 -9
- package/PageHeader.js +10 -10
- package/Pagination.js +1 -1
- package/Picker.js +1 -1
- package/Popconfirm.js +5 -5
- package/Popover.js +7 -7
- package/Portal.js +1 -1
- package/Progress.js +15 -15
- package/Radio.js +2 -2
- package/Rate.js +10 -10
- package/ResizeBox.js +10 -11
- package/Result.js +11 -11
- package/Select.js +1 -1
- package/SelectView.js +40 -41
- package/Skeleton.js +4 -4
- package/Slider.js +9 -9
- package/Space.js +12 -12
- package/SpeechSynthesis.js +1 -1
- package/Spin.js +11 -11
- package/Statistic.js +43 -43
- package/Steps.js +5 -5
- package/Switch.js +15 -16
- package/Table.js +17 -17
- package/Tabs.js +1 -1
- package/Tag.js +5 -5
- package/TimePicker.js +38 -38
- package/Timeline.js +1 -1
- package/Tooltip.js +9 -9
- package/Transfer.js +26 -26
- package/Tree.js +1 -1
- package/TreeSelect.js +1 -1
- package/Trigger.js +11 -11
- package/Typography.js +1 -1
- package/Upload.js +4 -1
- package/VerificationCode.js +1 -1
- package/Version.js +1 -1
- package/VirtualList.js +1 -1
- package/Watermark.js +1 -1
- package/chunk/{m_kOQCiU.js → -LZOUh53.js} +1 -1
- package/chunk/{CXNW5Y2a.js → -jdfq71f.js} +1 -1
- package/chunk/{CkAOsst1.js → 4-gvEY5y.js} +30 -30
- package/chunk/{DQXq1QT0.js → B0GOLsj_.js} +1 -1
- package/chunk/{BMvZCjSU.js → B16KHtX-.js} +16 -16
- package/chunk/{CggcswbO.js → B2vORJQ8.js} +19 -15
- package/chunk/{BCk8e9fj.js → B7Zsp3gO.js} +1 -1
- package/chunk/B8QV6E2b.js +34 -0
- package/chunk/{BeM2hfks.js → BBVjSFnw.js} +27 -23
- package/chunk/{1mEO29GP.js → BDjXkzNj.js} +1 -1
- package/chunk/{BuEC_zcc.js → BEDYCG-I.js} +31 -31
- package/chunk/{B45v5S9k.js → BHn4xgbv.js} +1 -1
- package/chunk/{CF3Telny.js → BJ_7JTqC.js} +3 -3
- package/chunk/{BM6dpkeM.js → BLSiP_gg.js} +1 -1
- package/chunk/{9Gh1afjL.js → BMJfSSLX.js} +1 -1
- package/chunk/{DBJ8d0o0.js → BNHrEI0Y.js} +31 -31
- package/chunk/{BP7xX86Q.js → BPZ-6HKJ.js} +131 -134
- package/chunk/{DxNRWF67.js → BVLwPZis.js} +11 -11
- package/chunk/{BpwDupra.js → BYhtrDV3.js} +9 -9
- package/chunk/{D6mVoX-C.js → B_nfMl0e.js} +1 -1
- package/chunk/{BWx1cVT_.js → BcS17Pzy.js} +1 -1
- package/chunk/Bdh4XVuf.js +1487 -0
- package/chunk/{BkHxm4sv.js → BdiEwtQO.js} +1 -1
- package/chunk/{DDda6s72.js → BjSHZA0m.js} +6 -6
- package/chunk/{C7Okdv4u.js → Bpug_KxP.js} +1 -1
- package/chunk/BzPkh4Zv.js +11 -0
- package/chunk/{CwXmtKib.js → C1D7T29r.js} +35 -35
- package/chunk/{DYZzQ2uT.js → C1u_ckwU.js} +1 -1
- package/chunk/C1xMmQIZ.js +468 -0
- package/chunk/C2lIz2F9.js +60 -0
- package/chunk/{Be7oeWU8.js → C43Hv2Bl.js} +1 -1
- package/chunk/{CR4u270n.js → C5AQWbC4.js} +79 -79
- package/chunk/{fqgc8r6C.js → C9vsih_D.js} +1 -1
- package/chunk/CANaGbGR.js +154 -0
- package/chunk/{BA02BFUV.js → CAfR2wLq.js} +1 -1
- package/chunk/{CcX2pBUh.js → CAfecMDF.js} +1 -1
- package/chunk/{BHK9zpXn.js → CKp4rZnD.js} +1 -1
- package/chunk/CTxjmYmx.js +19 -0
- package/chunk/{BqxwlITu.js → CV2Aqv9q.js} +1 -1
- package/chunk/{bsawGxt8.js → CYdarMv9.js} +1 -1
- package/chunk/{DafaH1Qt.js → C_S5Mdvd.js} +43 -44
- package/chunk/{DkIjpuBZ.js → Cbd50gx8.js} +11 -11
- package/chunk/{D5p8q9Pa.js → CbiWdbr_.js} +12 -12
- package/chunk/{cUuQh7L_.js → CmB-TL7C.js} +1 -1
- package/chunk/{BbYzi8M0.js → CuOl4X0X.js} +4 -4
- package/chunk/{BHLTzWzi.js → D-ER56Sf.js} +1 -1
- package/chunk/{BK1FKNAX.js → D-aYnb6u.js} +1 -1
- package/chunk/{DalIRWr7.js → D2HkyI6A.js} +9 -9
- package/chunk/D3NFxdmG.js +518 -0
- package/chunk/{C2fspJbE.js → D3xQFJcO.js} +1 -1
- package/chunk/{Lk60-jkf.js → DApXtulb.js} +4 -0
- package/chunk/{sl8s35SK.js → DJcEys80.js} +1 -1
- package/chunk/{B1S1OEw6.js → DLIm6rRJ.js} +1 -1
- package/chunk/{C95ipQ6b.js → DOWEHtqM.js} +1 -1
- package/chunk/{aM2ePYrq.js → DSGRHf-1.js} +132 -132
- package/chunk/{D9TqtOhq.js → DT37l12z.js} +1 -1
- package/chunk/{B6fn5y_s.js → DW-B7npC.js} +1 -1
- package/chunk/D_-UD4vO.js +119 -0
- package/chunk/{Dtnux4qL.js → D_MTFBb0.js} +1 -1
- package/chunk/{WkB0MERB.js → DhBo0pPJ.js} +27 -27
- package/chunk/DmUhn9ib.js +961 -0
- package/chunk/{Bny52uiG.js → DpfUGhi4.js} +10 -10
- package/chunk/{DhLbnw3R.js → Dx_5J4fO.js} +1 -1
- package/chunk/{B9PsJar0.js → Dy487FZ1.js} +1 -1
- package/chunk/{D6RTBH4C.js → IooeSKJJ.js} +10 -10
- package/chunk/Kbr6FzOG.js +745 -0
- package/chunk/{CwjaGytU.js → RMBPs_Ry.js} +32 -32
- package/chunk/Uz-rNulO.js +98 -0
- package/chunk/V6euPXVB.js +1025 -0
- package/chunk/{Bv8ZRDFt.js → YIlBPVAs.js} +14 -14
- package/chunk/{DPvnQJ-H.js → cDZI_t6o.js} +1 -1
- package/chunk/{C-w9pFY-.js → cZiP8FvM.js} +3 -3
- package/chunk/{DJmWXheU.js → eK7lxdak.js} +8 -8
- package/chunk/{Dg2DmtzA.js → gIbzjQ-X.js} +5 -6
- package/chunk/{CPl52AZh.js → sScV-J56.js} +1 -1
- package/chunk/{BbI3gqVr.js → wI2I1qb0.js} +1 -1
- package/hooks/index.js +32 -32
- package/hooks/use-verification-code.js +23 -22
- package/hooks/use-watermark.js +2 -1
- package/hooks/useComputedState.js +2 -1
- package/hooks/useCreate.js +2 -1
- package/hooks/useForceUpdate.js +2 -1
- package/hooks/useId.js +2 -1
- package/hooks/useInView.js +5 -4
- package/hooks/useIntersectionObserver.js +11 -11
- package/hooks/useIsFirstRender.js +2 -1
- package/hooks/useIsomorphicLayoutEffect.js +2 -1
- package/hooks/useKeyboardEvent.js +3 -2
- package/hooks/useMedia.js +2 -1
- package/hooks/useMergeProps.js +2 -1
- package/hooks/useMergeValue.js +4 -3
- package/hooks/useOverflowHidden.js +2 -1
- package/hooks/useOverrideRef.js +2 -1
- package/hooks/usePersistCallback.js +2 -1
- package/hooks/usePrevious.js +2 -1
- package/hooks/useRefs.js +2 -1
- package/hooks/useResizeObserver.js +2 -1
- package/hooks/useStateCallback.js +2 -1
- package/hooks/useStateWithPromise.js +2 -1
- package/hooks/useUpdateEffect.js +2 -1
- package/hooks/useWatch.js +3 -2
- package/hooks/useWindowSize.js +2 -1
- package/icons.js +35 -35
- package/index.js +484 -376
- package/locale/en-US.js +3 -11
- package/locale/tr-TR.js +3 -11
- package/package.json +1 -1
- package/style.css +1 -1
- package/types/anchor/Anchor.d.ts +1 -1
- package/types/button/index.d.ts +3 -2
- package/types/color-picker/hooks/useColorPicker.d.ts +1 -1
- package/types/color-picker/hooks/useControlBlock.d.ts +1 -1
- package/types/config-provider/interface.d.ts +1 -0
- package/types/date-picker/PickerRange.d.ts +1 -1
- package/types/hooks/use-verification-code/index.d.ts +2 -1
- package/types/hooks/use-watermark/index.d.ts +2 -1
- package/types/hooks/useComputedState.d.ts +2 -2
- package/types/hooks/useCreate.d.ts +2 -1
- package/types/hooks/useForceUpdate.d.ts +2 -1
- package/types/hooks/useId.d.ts +2 -1
- package/types/hooks/useInView.d.ts +1 -1
- package/types/hooks/useIntersectionObserver.d.ts +1 -1
- package/types/hooks/useIsFirstRender.d.ts +2 -1
- package/types/hooks/useIsomorphicLayoutEffect.d.ts +1 -1
- package/types/hooks/useKeyboardEvent.d.ts +2 -2
- package/types/hooks/useMedia.d.ts +1 -1
- package/types/hooks/useMergeProps.d.ts +2 -1
- package/types/hooks/useMergeValue.d.ts +2 -1
- package/types/hooks/useOverflowHidden.d.ts +2 -2
- package/types/hooks/useOverrideRef.d.ts +2 -1
- package/types/hooks/usePersistCallback.d.ts +2 -1
- package/types/hooks/usePrevious.d.ts +2 -1
- package/types/hooks/useRefs.d.ts +2 -1
- package/types/hooks/useResizeObserver.d.ts +2 -1
- package/types/hooks/useStateCallback.d.ts +1 -1
- package/types/hooks/useStateWithPromise.d.ts +1 -1
- package/types/hooks/useUpdateEffect.d.ts +2 -1
- package/types/hooks/useWatch.d.ts +2 -1
- package/types/hooks/useWindowSize.d.ts +1 -1
- package/types/image/interface.d.ts +1 -1
- package/types/index.d.ts +13 -22
- package/types/table/interface.d.ts +3 -1
- package/types/upload/Upload.d.ts +2 -1
- package/types/upload/index.d.ts +3 -1
- package/types/upload/request_.d.ts +3 -0
- package/types/utils/caseName.d.ts +2 -0
- package/types/utils/fileToURL.d.ts +2 -0
- package/types/utils/fillNBSP.d.ts +1 -1
- package/types/utils/index.d.ts +37 -0
- package/types/utils/is.d.ts +2 -2
- package/types/utils/lodash.d.ts +4 -0
- package/types/utils/scrollIntoView.d.ts +2 -1
- package/types/version/index.d.ts +1 -1
- package/utils/CSSTransition.js +1 -1
- package/utils/caseName.js +20 -0
- package/utils/className.js +1 -1
- package/utils/contextHolder.js +1 -1
- package/utils/fileToURL.js +4 -0
- package/utils/index.js +219 -0
- package/utils/is.js +95 -93
- package/utils/keyCode.js +10 -46
- package/utils/lodash.js +8 -0
- package/utils/mergedToString.js +11 -10
- package/utils/reactDOM.js +1 -1
- package/utils/saveAs.js +1 -1
- package/utils/scrollIntoView.js +8 -7
- package/chunk/5pZ3ayqs.js +0 -29
- package/chunk/Bl-ODC57.js +0 -945
- package/chunk/BlKc_pDZ.js +0 -678
- package/chunk/CiEln_Q1.js +0 -517
- package/chunk/CiZVOdJ3.js +0 -122
- package/chunk/DMWMrXg1.js +0 -964
- package/chunk/DUxWiN2U.js +0 -1465
- package/chunk/Dbk4DVhB.js +0 -855
- package/chunk/Do1aMgY3.js +0 -12
- package/chunk/HlP8inLK.js +0 -1796
- package/chunk/V_IcWDFx.js +0 -49
- /package/types/utils/{mergeProp.d.ts → mergeProps.d.ts} +0 -0
- /package/utils/{mergeProp.js → mergeProps.js} +0 -0
package/types/anchor/Anchor.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import Link from './Link';
|
|
3
2
|
import type { AnchorProps } from './interface';
|
|
3
|
+
import Link from './Link';
|
|
4
4
|
declare const ForwardRefAnchor: React.ForwardRefExoticComponent<AnchorProps & {
|
|
5
5
|
children?: React.ReactNode | undefined;
|
|
6
6
|
} & React.RefAttributes<unknown>>;
|
package/types/button/index.d.ts
CHANGED
|
@@ -3,14 +3,15 @@ import Group from './Group';
|
|
|
3
3
|
import type { ButtonProps } from './interface';
|
|
4
4
|
declare const ForwardRefButton: React.ForwardRefExoticComponent<Partial<{
|
|
5
5
|
htmlType?: "button" | "submit" | "reset";
|
|
6
|
-
} & import("./interface").BaseButtonProps & Omit<React.ButtonHTMLAttributes<any>, "className" | "
|
|
6
|
+
} & import("./interface").BaseButtonProps & Omit<React.ButtonHTMLAttributes<any>, "className" | "onClick" | "type"> & {
|
|
7
7
|
href: string;
|
|
8
8
|
target?: string;
|
|
9
9
|
anchorProps?: React.HTMLProps<HTMLAnchorElement>;
|
|
10
|
-
} & Omit<React.AnchorHTMLAttributes<any>, "className" | "
|
|
10
|
+
} & Omit<React.AnchorHTMLAttributes<any>, "className" | "onClick" | "type">> & React.RefAttributes<unknown>>;
|
|
11
11
|
declare const ButtonComponent: typeof ForwardRefButton & {
|
|
12
12
|
__PQB_BUTTON: boolean;
|
|
13
13
|
Group: typeof Group;
|
|
14
14
|
};
|
|
15
|
+
export { Group as ButtonGroup };
|
|
15
16
|
export default ButtonComponent;
|
|
16
17
|
export type { ButtonProps };
|
|
@@ -2,7 +2,7 @@ interface ControlBlockParams {
|
|
|
2
2
|
value: [number, number];
|
|
3
3
|
onChange: (value: [number, number]) => void;
|
|
4
4
|
}
|
|
5
|
-
export declare
|
|
5
|
+
export declare const useControlBlock: ({ value, onChange }: ControlBlockParams) => {
|
|
6
6
|
active: boolean;
|
|
7
7
|
blockRef: import("react").MutableRefObject<HTMLDivElement | undefined>;
|
|
8
8
|
handlerRef: import("react").MutableRefObject<HTMLDivElement | undefined>;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { RangePickerHandle } from './interface';
|
|
2
|
-
declare const PickerComponent: import("react").ForwardRefExoticComponent<import("./interface").BaseRangePickerProps & import("
|
|
2
|
+
declare const PickerComponent: import("react").ForwardRefExoticComponent<import("./interface").BaseRangePickerProps & import("..").Omit<import("./interface").PickerProps, "onChange" | "onSelect" | "onOk" | "inputProps" | "defaultPickerValue" | "pickerValue" | "onPickerValueChange"> & import("react").RefAttributes<RangePickerHandle>>;
|
|
3
3
|
export default PickerComponent;
|
|
@@ -1,2 +1,3 @@
|
|
|
1
1
|
import { VerificationCodeOptions, VerificationCodeReturnType } from './interface';
|
|
2
|
-
export
|
|
2
|
+
export declare function useVerificationCode(props: VerificationCodeOptions): VerificationCodeReturnType;
|
|
3
|
+
export default useVerificationCode;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import { ComponentState, PropsWithoutRef } from 'react';
|
|
2
2
|
type Dependency<T> = PropsWithoutRef<T> | ComponentState;
|
|
3
|
-
export
|
|
4
|
-
export
|
|
3
|
+
export declare function useComputedState<T>(computed: () => any, deps: Dependency<T>[]): any;
|
|
4
|
+
export default useComputedState;
|
|
@@ -1 +1,2 @@
|
|
|
1
|
-
export
|
|
1
|
+
export declare function useCreate(fn: any): void;
|
|
2
|
+
export default useCreate;
|
|
@@ -1 +1,2 @@
|
|
|
1
|
-
export
|
|
1
|
+
export declare function useForceUpdate(): import("react").DispatchWithoutAction;
|
|
2
|
+
export default useForceUpdate;
|
package/types/hooks/useId.d.ts
CHANGED
|
@@ -1 +1,2 @@
|
|
|
1
|
-
export
|
|
1
|
+
export declare function useId(prefix: string): string | undefined;
|
|
2
|
+
export default useId;
|
|
@@ -4,7 +4,7 @@ interface UserInViewProps extends IntersectionObserverInit {
|
|
|
4
4
|
unobserverOnEnter?: boolean;
|
|
5
5
|
target?: Element;
|
|
6
6
|
}
|
|
7
|
-
declare function useInView(props: UserInViewProps): {
|
|
7
|
+
export declare function useInView(props: UserInViewProps): {
|
|
8
8
|
inView: boolean | undefined;
|
|
9
9
|
observer: IntersectionObserver | undefined;
|
|
10
10
|
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export declare const supportIntersectionObserver: boolean;
|
|
2
|
-
declare function useIntersectionObserver(callback: IntersectionObserverCallback, options?: IntersectionObserverInit): {
|
|
2
|
+
export declare function useIntersectionObserver(callback: IntersectionObserverCallback, options?: IntersectionObserverInit): {
|
|
3
3
|
observer: IntersectionObserver | undefined;
|
|
4
4
|
cor: (elem: Element) => void;
|
|
5
5
|
dor: () => void;
|
|
@@ -1 +1,2 @@
|
|
|
1
|
-
export
|
|
1
|
+
export declare function useIsFirstRender(): boolean;
|
|
2
|
+
export default useIsFirstRender;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { KeyboardEventHandler } from 'react';
|
|
2
2
|
type CallBackEventType = 'onPressEnter' | 'onArrowUp' | 'onArrowLeft' | 'onArrowRight' | 'onArrowDown';
|
|
3
|
-
export
|
|
3
|
+
export declare function useKeyboardEvent(props?: {
|
|
4
4
|
onKeyDown?: KeyboardEventHandler;
|
|
5
5
|
}): (callbacks: { [key in CallBackEventType]?: (e: any) => void; }) => {
|
|
6
6
|
onKeyDown(e: any): void;
|
|
7
7
|
};
|
|
8
|
-
export
|
|
8
|
+
export default useKeyboardEvent;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
declare const useMedia: (query: string, defaultState?: boolean) => boolean;
|
|
1
|
+
export declare const useMedia: (query: string, defaultState?: boolean) => boolean;
|
|
2
2
|
export default useMedia;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
export type MergePropsOptions = {
|
|
2
2
|
_ignorePropsFromGlobal?: boolean;
|
|
3
3
|
};
|
|
4
|
-
export
|
|
4
|
+
export declare function useMergeProps<PropsType>(componentProps: PropsType & MergePropsOptions, defaultProps: Partial<PropsType>, globalComponentConfig: Partial<PropsType> | undefined): PropsType;
|
|
5
|
+
export default useMergeProps;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
export
|
|
2
|
+
export declare function useMergeValue<T>(defaultStateValue: T, props?: {
|
|
3
3
|
defaultValue?: T;
|
|
4
4
|
value?: T;
|
|
5
5
|
}): [T, React.Dispatch<React.SetStateAction<T>>, T];
|
|
6
|
+
export default useMergeValue;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
interface Option {
|
|
2
2
|
hidden: boolean;
|
|
3
3
|
}
|
|
4
|
-
export
|
|
5
|
-
export
|
|
4
|
+
export declare function useOverflowHidden(getContainer: () => HTMLElement, { hidden }: Option): (() => void)[];
|
|
5
|
+
export default useOverflowHidden;
|
|
@@ -1 +1,2 @@
|
|
|
1
|
-
export
|
|
1
|
+
export declare function usePersistCallback<T extends (...args: any[]) => any>(fn: T): T;
|
|
2
|
+
export default usePersistCallback;
|
|
@@ -1,2 +1,3 @@
|
|
|
1
1
|
import { ComponentState, PropsWithoutRef } from 'react';
|
|
2
|
-
export
|
|
2
|
+
export declare function usePrevious<T>(value: PropsWithoutRef<T> | ComponentState): undefined;
|
|
3
|
+
export default usePrevious;
|
package/types/hooks/useRefs.d.ts
CHANGED
|
@@ -1 +1,2 @@
|
|
|
1
|
-
export
|
|
1
|
+
export declare function useRefs<T>(defaultValue?: T[]): [T[], (node: T, index?: number) => void];
|
|
2
|
+
export default useRefs;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
export
|
|
1
|
+
export declare function useResizeObserver(onResize: (entry: ResizeObserverEntry[]) => void): {
|
|
2
2
|
currentOr: ResizeObserver | undefined;
|
|
3
3
|
cor: (elem: Element) => void;
|
|
4
4
|
dor: () => void;
|
|
5
5
|
};
|
|
6
|
+
export default useResizeObserver;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { SetStateAction } from 'react';
|
|
2
2
|
type Callback<T> = (value?: T) => void;
|
|
3
3
|
type DispatchWithCallback<T> = (value: T, callback?: Callback<T>) => void;
|
|
4
|
-
declare function useStateCallback<T>(initialState: T | (() => T)): [T, DispatchWithCallback<SetStateAction<T>>];
|
|
4
|
+
export declare function useStateCallback<T>(initialState: T | (() => T)): [T, DispatchWithCallback<SetStateAction<T>>];
|
|
5
5
|
export default useStateCallback;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
declare function useStateWithPromise<T>(defaultVal: T): [T, (updater: any) => Promise<T>];
|
|
1
|
+
export declare function useStateWithPromise<T>(defaultVal: T): [T, (updater: any) => Promise<T>];
|
|
2
2
|
export default useStateWithPromise;
|
|
@@ -1,2 +1,3 @@
|
|
|
1
1
|
import { ComponentState, PropsWithoutRef } from 'react';
|
|
2
|
-
export
|
|
2
|
+
export declare function useWatch<T>(value: PropsWithoutRef<T> | ComponentState, callback: (value: any, prevValue: any) => void): void;
|
|
3
|
+
export default useWatch;
|
|
@@ -42,7 +42,7 @@ export interface ImagePreviewProps {
|
|
|
42
42
|
}
|
|
43
43
|
export type PartialImagePreviewProps = Partial<ImagePreviewProps>;
|
|
44
44
|
export interface ImagePreviewGroupProps extends Omit<PartialImagePreviewProps, 'src'> {
|
|
45
|
-
srcList?: string[];
|
|
45
|
+
srcList?: undefined | string[];
|
|
46
46
|
current?: number;
|
|
47
47
|
defaultCurrent?: number;
|
|
48
48
|
infinite?: boolean;
|
package/types/index.d.ts
CHANGED
|
@@ -1,24 +1,12 @@
|
|
|
1
|
-
export { default as computeScrollIntoView } from "@unicom-cloud/compute-scroll-into-view";
|
|
2
|
-
export { default as scrollIntoViewIfNeeded } from "@unicom-cloud/scroll-into-view-if-needed";
|
|
3
|
-
export { default as caseName } from "@unicom-cloud/utils/case-name";
|
|
4
|
-
export { default as className } from "@unicom-cloud/utils/class-name";
|
|
5
|
-
export { default as clipboardCopy } from "@unicom-cloud/utils/clipboard-copy";
|
|
6
|
-
export { default as saveAs } from "@unicom-cloud/utils/file/saveAs";
|
|
7
|
-
export { default as math } from "@unicom-cloud/utils/math";
|
|
8
|
-
export { default as screenfull } from "@unicom-cloud/utils/screenfull";
|
|
9
|
-
export { default as validate } from "@unicom-cloud/utils/validate";
|
|
10
|
-
export * from "@unicom-cloud/utils/is";
|
|
11
1
|
export * from "./hooks";
|
|
12
|
-
export * from "./utils
|
|
2
|
+
export * from "./utils";
|
|
13
3
|
export { default as Affix } from "./affix";
|
|
14
4
|
export { default as Alert } from "./alert";
|
|
15
5
|
export { default as Anchor } from "./anchor";
|
|
16
6
|
export { default as AutoComplete } from "./auto-complete";
|
|
17
7
|
export { default as Avatar } from "./avatar";
|
|
18
8
|
export { default as BackTop } from "./back-top";
|
|
19
|
-
export { default as Badge } from "./badge";
|
|
20
9
|
export { default as Breadcrumb } from "./breadcrumb";
|
|
21
|
-
export { default as Button } from "./button";
|
|
22
10
|
export { default as Calendar } from "./calendar";
|
|
23
11
|
export { default as Card } from "./card";
|
|
24
12
|
export { default as Carousel } from "./carousel";
|
|
@@ -34,9 +22,6 @@ export { default as Drawer } from "./drawer";
|
|
|
34
22
|
export { default as Dropdown } from "./dropdown";
|
|
35
23
|
export { default as Empty } from "./empty";
|
|
36
24
|
export { default as Form } from "./form";
|
|
37
|
-
export { default as Grid } from "./grid";
|
|
38
|
-
export { default as Col } from "./grid/Col";
|
|
39
|
-
export { default as Row } from "./grid/Row";
|
|
40
25
|
export { default as Icon } from "./icon";
|
|
41
26
|
export { default as Image } from "./image";
|
|
42
27
|
export { default as Input } from "./input";
|
|
@@ -84,12 +69,18 @@ export { default as Tree } from "./tree";
|
|
|
84
69
|
export { default as TreeSelect } from "./tree-select";
|
|
85
70
|
export { default as Trigger } from "./trigger";
|
|
86
71
|
export { default as Typography } from "./typography";
|
|
87
|
-
export { default as Upload } from "./upload";
|
|
88
72
|
export { default as VerificationCode } from "./verification-code";
|
|
89
|
-
export { default as
|
|
73
|
+
export { default as version } from "./version";
|
|
90
74
|
export { default as Watermark } from "./watermark";
|
|
91
|
-
export {
|
|
92
|
-
export {
|
|
93
|
-
export { default as
|
|
94
|
-
export { default as
|
|
75
|
+
export { compute, default as computeScrollIntoView } from "@unicom-cloud/compute-scroll-into-view";
|
|
76
|
+
export { CSSTransition, ReplaceTransition, SwitchTransition, Transition, TransitionGroup, default as transitionGroup } from "@unicom-cloud/react-transition-group";
|
|
77
|
+
export { default as scrollIntoView, default as scrollIntoViewIfNeeded } from "@unicom-cloud/scroll-into-view-if-needed";
|
|
78
|
+
export { default as TinyColor, convertDecimalToHex, convertHexToDecimal, hslToRgb, hsvToRgb, numberInputToObject, parseIntFromHex, rgbToHex, rgbToHsl, rgbToHsv, rgbToRgb, rgbaToArgbHex, rgbaToHex } from "@unicom-cloud/tinycolor";
|
|
79
|
+
export { easing, default as tween } from "@unicom-cloud/tween";
|
|
80
|
+
export { v4 as uuid, v4 as uuidv4 } from "@unicom-cloud/uuid";
|
|
81
|
+
export { DefaultValidateMessage, Schema, default as validate } from "@unicom-cloud/validate";
|
|
82
|
+
export { default as Badge, COLORS as BadgeCOLORS, STATUS as BadgeSTATUS } from "./badge";
|
|
83
|
+
export { default as Button, ButtonGroup } from "./button";
|
|
95
84
|
export { ConfigConsumer, ConfigContext, default as ConfigProvider } from "./config-provider";
|
|
85
|
+
export { Col, default as Grid, GridItem, Row } from "./grid";
|
|
86
|
+
export { default as Upload, UploadList, STATUS as UploadSTATUS } from "./upload";
|
|
@@ -139,7 +139,9 @@ export interface ColumnProps<T = any> {
|
|
|
139
139
|
onFilter?: (value: any, row: any) => any;
|
|
140
140
|
fixed?: 'left' | 'right';
|
|
141
141
|
onHeaderCell?: (column: any, index: any) => RowCallbackProps;
|
|
142
|
-
onCell?: (record: any,
|
|
142
|
+
onCell?: (record: any, trIndex: any, column: any, other: {
|
|
143
|
+
rowKey: undefined | string;
|
|
144
|
+
}) => RowCallbackProps;
|
|
143
145
|
children?: ColumnProps<T>[];
|
|
144
146
|
rowSpan?: number;
|
|
145
147
|
colSpan?: number;
|
package/types/upload/Upload.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import { type UploadInstance, type UploadItem, type UploadProps } from './interface';
|
|
2
|
+
import { STATUS, type UploadInstance, type UploadItem, type UploadProps } from './interface';
|
|
3
3
|
export type UploadState = {
|
|
4
4
|
uploadState: {
|
|
5
5
|
[key: string]: UploadItem;
|
|
@@ -8,5 +8,6 @@ export type UploadState = {
|
|
|
8
8
|
declare const UploadRef: React.ForwardRefExoticComponent<UploadProps & {
|
|
9
9
|
children?: React.ReactNode | undefined;
|
|
10
10
|
} & React.RefAttributes<UploadInstance>>;
|
|
11
|
+
export { STATUS };
|
|
11
12
|
export default UploadRef;
|
|
12
13
|
export { UploadItem, UploadProps };
|
package/types/upload/index.d.ts
CHANGED
|
@@ -1,3 +1,5 @@
|
|
|
1
|
-
import Upload from './Upload';
|
|
1
|
+
import Upload, { STATUS } from './Upload';
|
|
2
|
+
import UploadList from './list';
|
|
3
|
+
export { STATUS, UploadList };
|
|
2
4
|
export default Upload;
|
|
3
5
|
export type { RequestOptions, UploadInstance, UploadItem, UploadListProps, UploadProps, UploadRequestReturn, UploadStatus, } from './interface';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export default function (str: any): any;
|
|
1
|
+
export default function fillNBSP(str: any): any;
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
export { add, div, divide, default as math, minus, multiply, plus, subtract, times, } from '@unicom-cloud/utils/math';
|
|
2
|
+
export { default as screenfull } from '@unicom-cloud/utils/screenfull';
|
|
3
|
+
export { colorPresets, colors, generate, generateDark, getRgbArrayString, grayPresets, palette, paletteDark, default as uiColor, } from '@unicom-cloud/utils/ui/color';
|
|
4
|
+
export * from './constant';
|
|
5
|
+
export * from './dayjs';
|
|
6
|
+
export * from './dom';
|
|
7
|
+
export * from './is';
|
|
8
|
+
export * from './lodash';
|
|
9
|
+
export * from './names';
|
|
10
|
+
export * from './pad';
|
|
11
|
+
export * from './pick';
|
|
12
|
+
export * from './raf';
|
|
13
|
+
export * from './reactDOM';
|
|
14
|
+
export * from './responsiveObserve';
|
|
15
|
+
export * from './style';
|
|
16
|
+
export * from './type';
|
|
17
|
+
export { default as className } from './className';
|
|
18
|
+
export { default as ContextHolderElement } from './contextHolder';
|
|
19
|
+
export { default as clipboardCopy, default as copy } from './copy';
|
|
20
|
+
export { default as PqbCSSTransition } from './CSSTransition';
|
|
21
|
+
export { default as fileToURL } from './fileToURL';
|
|
22
|
+
export { default as fillNBSP } from './fillNBSP';
|
|
23
|
+
export { default as getHighlightText } from './getHighlightText';
|
|
24
|
+
export { default as getHotkeyHandler } from './getHotkeyHandler';
|
|
25
|
+
export { default as getStringLength } from './getStringLength';
|
|
26
|
+
export { default as include } from './include';
|
|
27
|
+
export { default as mergedToString } from './mergedToString';
|
|
28
|
+
export { default as mergeProps } from './mergeProps';
|
|
29
|
+
export { default as omit } from './omit';
|
|
30
|
+
export { default as pick } from './pick';
|
|
31
|
+
export { default as responsiveObserve } from './responsiveObserve';
|
|
32
|
+
export { default as saveAs } from './saveAs';
|
|
33
|
+
export { default as scrollIntoView } from './scrollIntoView';
|
|
34
|
+
export { default as throttleByRaf } from './throttleByRaf';
|
|
35
|
+
export { default as throttleByRafV2 } from './throttleByRafV2';
|
|
36
|
+
export { default as warning } from './warning';
|
|
37
|
+
export * as keyboardCode from './keyCode';
|
package/types/utils/is.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
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, isReadableByteStreamControllerSupported, isReadableStream, isReadableStreamSupported, isReadableStreamSymbolAsyncIteratorSupported, isRegExp, isSafeInteger, isSet, isString, isSymbol, isTypedArray, isUndefined, isWeakMap, isWeakSet } from '@unicom-cloud/utils/is';
|
|
2
1
|
import { Dayjs } from 'dayjs';
|
|
2
|
+
export * from '@unicom-cloud/utils/is';
|
|
3
3
|
export declare function isNullOrUndefined(obj: any): boolean;
|
|
4
4
|
export declare function isEmptyReactNode(content: any, trim?: boolean): boolean;
|
|
5
5
|
export declare function isExist(obj: any): boolean;
|
|
@@ -10,5 +10,5 @@ export declare const isClassComponent: (element: any) => boolean;
|
|
|
10
10
|
export declare const isDOMElement: (element: any) => boolean;
|
|
11
11
|
export declare const isReact18: boolean;
|
|
12
12
|
export declare const isReact19: boolean;
|
|
13
|
+
export declare const isForwardRefReact: (object: any) => any;
|
|
13
14
|
export declare const supportRef: (element: any) => boolean;
|
|
14
|
-
export { 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, isReadableByteStreamControllerSupported, isReadableStream, isReadableStreamSupported, isReadableStreamSymbolAsyncIteratorSupported, isRegExp, isSafeInteger, isSet, isString, isSymbol, isTypedArray, isUndefined, isWeakMap, isWeakSet, };
|
package/types/version/index.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export declare const version = "2.64.
|
|
1
|
+
export declare const version = "2.64.1";
|
|
2
2
|
export default version;
|
package/utils/CSSTransition.js
CHANGED
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import p from "lodash/camelCase.js";
|
|
2
|
+
import s from "lodash/capitalize.js";
|
|
3
|
+
import f from "lodash/kebabCase.js";
|
|
4
|
+
import n from "lodash/snakeCase.js";
|
|
5
|
+
import C from "lodash/startCase.js";
|
|
6
|
+
import N from "lodash/upperFirst.js";
|
|
7
|
+
function x(m) {
|
|
8
|
+
const o = f(m), r = s(m), e = p(m), t = n(m), a = C(m), i = N(e);
|
|
9
|
+
return {
|
|
10
|
+
kebabCaseName: o,
|
|
11
|
+
capitalizeName: r,
|
|
12
|
+
camelCaseName: e,
|
|
13
|
+
snakeCaseName: t,
|
|
14
|
+
startCaseName: a,
|
|
15
|
+
ComponentCaseName: i
|
|
16
|
+
};
|
|
17
|
+
}
|
|
18
|
+
export {
|
|
19
|
+
x as default
|
|
20
|
+
};
|
package/utils/className.js
CHANGED
package/utils/contextHolder.js
CHANGED