ono-react-element 0.0.0

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 (112) hide show
  1. package/dist/es/AutoSliderList-DqaQhmce.js +106 -0
  2. package/dist/es/AvatarCrop-DzGw2FVQ.js +225 -0
  3. package/dist/es/Button-CdxyXFF4.js +72 -0
  4. package/dist/es/Card3D-sf3zmiHk.js +41 -0
  5. package/dist/es/Checkbox-BN7rT73n.js +62 -0
  6. package/dist/es/InjunctiveBox-CmZg4sIq.js +39 -0
  7. package/dist/es/Input-wORRaL9-.js +301 -0
  8. package/dist/es/List-B9mP7VjN.js +35 -0
  9. package/dist/es/MenuButton-CuOdVlg0.js +62 -0
  10. package/dist/es/Message-BMimz-k2.js +219 -0
  11. package/dist/es/Modal-BAJOEXRd.js +154 -0
  12. package/dist/es/Pagination-BtmtUkVw.js +110 -0
  13. package/dist/es/PortalRenderer-8Iur-eZp.js +38 -0
  14. package/dist/es/Radio-BmSpqdK8.js +113 -0
  15. package/dist/es/SvgImg-Bcmzdjzl.js +38 -0
  16. package/dist/es/Switch-hGQGZVO2.js +110 -0
  17. package/dist/es/TemplateDialog-DuURiDPX.js +75 -0
  18. package/dist/es/Toast-CkC8zQdq.js +174 -0
  19. package/dist/es/Tooltip-C_gPojr9.js +94 -0
  20. package/dist/es/VirtualList-D8M5JJ-W.js +160 -0
  21. package/dist/es/Waterfall-BXE2_5Sj.js +131 -0
  22. package/dist/es/dependencies-DWmdjl5u.js +25491 -0
  23. package/dist/es/hooks-Bj-aT2k8.js +159 -0
  24. package/dist/es/index.js +227 -0
  25. package/dist/es/utils-ziqvBIOU.js +567 -0
  26. package/dist/index.css +1 -0
  27. package/dist/types/components/AutoSliderList/AutoSliderList.d.ts +2 -0
  28. package/dist/types/components/AutoSliderList/index.d.ts +2 -0
  29. package/dist/types/components/AutoSliderList/types.d.ts +23 -0
  30. package/dist/types/components/AvatarCrop/AvatarCanvas.d.ts +2 -0
  31. package/dist/types/components/AvatarCrop/AvatarCrop.d.ts +13 -0
  32. package/dist/types/components/AvatarCrop/index.d.ts +1 -0
  33. package/dist/types/components/AvatarCrop/types.d.ts +42 -0
  34. package/dist/types/components/Button/Button.d.ts +2 -0
  35. package/dist/types/components/Button/index.d.ts +2 -0
  36. package/dist/types/components/Button/types.d.ts +20 -0
  37. package/dist/types/components/Card3D/Card3D.d.ts +12 -0
  38. package/dist/types/components/Card3D/index.d.ts +1 -0
  39. package/dist/types/components/Checkbox/Checkbox.d.ts +2 -0
  40. package/dist/types/components/Checkbox/index.d.ts +2 -0
  41. package/dist/types/components/Checkbox/types.d.ts +12 -0
  42. package/dist/types/components/InjunctiveBox/InjunctiveBox.d.ts +18 -0
  43. package/dist/types/components/InjunctiveBox/index.d.ts +1 -0
  44. package/dist/types/components/Input/Input.d.ts +2 -0
  45. package/dist/types/components/Input/Textarea.d.ts +2 -0
  46. package/dist/types/components/Input/index.d.ts +2 -0
  47. package/dist/types/components/Input/types.d.ts +46 -0
  48. package/dist/types/components/List/AwaitList.d.ts +3 -0
  49. package/dist/types/components/List/List.d.ts +3 -0
  50. package/dist/types/components/List/index.d.ts +2 -0
  51. package/dist/types/components/List/types.d.ts +11 -0
  52. package/dist/types/components/MenuButton/MenuButton.d.ts +2 -0
  53. package/dist/types/components/MenuButton/index.d.ts +1 -0
  54. package/dist/types/components/MenuButton/types.d.ts +8 -0
  55. package/dist/types/components/Message/Message.d.ts +8 -0
  56. package/dist/types/components/Message/index.d.ts +1 -0
  57. package/dist/types/components/Message/types.d.ts +20 -0
  58. package/dist/types/components/Message/utils.d.ts +23 -0
  59. package/dist/types/components/Modal/Modal.d.ts +2 -0
  60. package/dist/types/components/Modal/index.d.ts +1 -0
  61. package/dist/types/components/Modal/types.d.ts +27 -0
  62. package/dist/types/components/Pagination/Pagination.d.ts +2 -0
  63. package/dist/types/components/Pagination/index.d.ts +1 -0
  64. package/dist/types/components/Pagination/types.d.ts +20 -0
  65. package/dist/types/components/PortalRenderer/PortalRenderer.d.ts +2 -0
  66. package/dist/types/components/PortalRenderer/index.d.ts +1 -0
  67. package/dist/types/components/Radio/Radio.d.ts +2 -0
  68. package/dist/types/components/Radio/RadioGroup.d.ts +2 -0
  69. package/dist/types/components/Radio/index.d.ts +2 -0
  70. package/dist/types/components/Radio/types.d.ts +26 -0
  71. package/dist/types/components/Select/Option.d.ts +2 -0
  72. package/dist/types/components/Select/Select.d.ts +2 -0
  73. package/dist/types/components/Select/index.d.ts +1 -0
  74. package/dist/types/components/Select/types.d.ts +30 -0
  75. package/dist/types/components/SvgImg/SvgImg.d.ts +10 -0
  76. package/dist/types/components/SvgImg/index.d.ts +1 -0
  77. package/dist/types/components/Switch/Switch.d.ts +2 -0
  78. package/dist/types/components/Switch/index.d.ts +1 -0
  79. package/dist/types/components/Switch/types.d.ts +18 -0
  80. package/dist/types/components/TemplateDialog/TemplateDialog.d.ts +2 -0
  81. package/dist/types/components/TemplateDialog/index.d.ts +1 -0
  82. package/dist/types/components/TemplateDialog/types.d.ts +19 -0
  83. package/dist/types/components/Toast/Toast.d.ts +7 -0
  84. package/dist/types/components/Toast/index.d.ts +1 -0
  85. package/dist/types/components/Toast/types.d.ts +19 -0
  86. package/dist/types/components/Tooltip/Tooltip.d.ts +2 -0
  87. package/dist/types/components/Tooltip/index.d.ts +1 -0
  88. package/dist/types/components/Tooltip/types.d.ts +15 -0
  89. package/dist/types/components/VirtualList/EstimatedVirtualList.d.ts +2 -0
  90. package/dist/types/components/VirtualList/index.d.ts +2 -0
  91. package/dist/types/components/VirtualList/types.d.ts +35 -0
  92. package/dist/types/components/Waterfall/Waterfall.d.ts +2 -0
  93. package/dist/types/components/Waterfall/index.d.ts +2 -0
  94. package/dist/types/components/Waterfall/types.d.ts +23 -0
  95. package/dist/types/components/index.d.ts +21 -0
  96. package/dist/types/hooks/index.d.ts +7 -0
  97. package/dist/types/hooks/useClickOutSide.d.ts +9 -0
  98. package/dist/types/hooks/useCountdown.d.ts +1 -0
  99. package/dist/types/hooks/useEventListener.d.ts +8 -0
  100. package/dist/types/hooks/useGetElementSize.d.ts +5 -0
  101. package/dist/types/hooks/useKeyPress.d.ts +12 -0
  102. package/dist/types/hooks/useTheme.d.ts +8 -0
  103. package/dist/types/hooks/useThemePro.d.ts +11 -0
  104. package/dist/types/index.d.ts +8 -0
  105. package/dist/types/utils/colorUtils.d.ts +33 -0
  106. package/dist/types/utils/common.d.ts +96 -0
  107. package/dist/types/utils/fileFormatConversion.d.ts +10 -0
  108. package/dist/types/utils/formatTimeUtils.d.ts +6 -0
  109. package/dist/types/utils/viewTransitionUtils.d.ts +9 -0
  110. package/dist/umd/index.css +1 -0
  111. package/dist/umd/index.umd.cjs +298 -0
  112. package/package.json +49 -0
@@ -0,0 +1,42 @@
1
+ import { Dispatch, JSX, SetStateAction } from 'react';
2
+ type imageStateType = {
3
+ w: number;
4
+ h: number;
5
+ t: number;
6
+ l: number;
7
+ };
8
+ export interface AvatarBaseProps {
9
+ imageFile: File | string;
10
+ cvsW?: number | string;
11
+ maskBG?: string;
12
+ border?: string;
13
+ wheelScale?: number;
14
+ }
15
+ export interface AvatarCanvasProps extends AvatarBaseProps {
16
+ maskInfo: {
17
+ w: number;
18
+ l: number;
19
+ };
20
+ setMaskInfo: Dispatch<SetStateAction<{
21
+ w: number;
22
+ l: number;
23
+ }>>;
24
+ setCtx: Dispatch<SetStateAction<CanvasRenderingContext2D | undefined>>;
25
+ imageStartState: imageStateType;
26
+ setImageStartState: Dispatch<SetStateAction<imageStateType>>;
27
+ imageState: imageStateType;
28
+ setImageState: Dispatch<SetStateAction<imageStateType>>;
29
+ }
30
+ export interface AvatarCropProps extends AvatarBaseProps {
31
+ children?: ({ handleConfirm, handleReduction }: {
32
+ handleConfirm: AvatarCropConfirmMethod;
33
+ handleReduction: (onReductionSuccess?: () => void) => void;
34
+ }) => JSX.Element;
35
+ }
36
+ export type UpdateStateMethod = <T>(state: Partial<T>, setState: React.Dispatch<React.SetStateAction<T>>) => void;
37
+ export type AvatarCropConfirmMethod = (handleSave: (avatarData: string | Blob) => void, options?: {
38
+ imageSaveType: 'png' | 'jpeg' | 'webp';
39
+ dataSaveType: 'base64' | 'blob';
40
+ quality: number;
41
+ }) => void;
42
+ export {};
@@ -0,0 +1,2 @@
1
+ import { ButtonProps } from './types';
2
+ export declare const Button: ({ onClick, children, disabled, loading, plain, shape, htmlType, type, className, style, icon }: ButtonProps) => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,2 @@
1
+ export { Button } from './Button';
2
+ export * from './types';
@@ -0,0 +1,20 @@
1
+ import { CSSProperties, ReactNode } from 'react';
2
+ export type ButtonType = 'primary' | 'info' | 'success' | 'warning' | 'danger' | 'default';
3
+ export type ButtonHtmlType = 'button' | 'submit' | 'reset';
4
+ export type ButtonShapeType = 'circle' | 'round' | 'default';
5
+ export interface ButtonProps {
6
+ htmlType?: ButtonHtmlType;
7
+ type?: ButtonType;
8
+ icon?: ReactNode;
9
+ shape?: ButtonShapeType;
10
+ plain?: boolean;
11
+ disabled?: boolean | (() => boolean);
12
+ loading?: boolean | {
13
+ delay?: number;
14
+ icon?: ReactNode;
15
+ };
16
+ children: ReactNode;
17
+ className?: string;
18
+ style?: CSSProperties;
19
+ onClick?: (e: React.MouseEvent<HTMLButtonElement>) => void;
20
+ }
@@ -0,0 +1,12 @@
1
+ interface Card3DProps {
2
+ src?: string;
3
+ scale?: number;
4
+ shadow?: string;
5
+ enlarge?: boolean;
6
+ xRange?: [number, number];
7
+ yRange?: [number, number];
8
+ children?: React.ReactNode;
9
+ borderRadius?: number | string;
10
+ }
11
+ export declare const Card3D: ({ src, children, enlarge, scale, shadow, xRange, yRange, borderRadius }: Card3DProps) => import("react/jsx-runtime").JSX.Element;
12
+ export {};
@@ -0,0 +1 @@
1
+ export { Card3D } from './Card3D';
@@ -0,0 +1,2 @@
1
+ import { CheckboxProps } from './types';
2
+ export declare const Checkbox: ({ id, style, checked, onChange, className, indeterminate, checkedColor, indeterminateStyle, indeterminateColor }: CheckboxProps) => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,2 @@
1
+ export { Checkbox } from './Checkbox';
2
+ export * from './types';
@@ -0,0 +1,12 @@
1
+ import { ChangeEvent, CSSProperties } from 'react';
2
+ export type CheckboxProps = {
3
+ id?: string;
4
+ checked: boolean;
5
+ className?: string;
6
+ style?: CSSProperties;
7
+ checkedColor?: string;
8
+ indeterminate?: boolean;
9
+ indeterminateColor?: string;
10
+ indeterminateStyle?: 'line' | 'border';
11
+ onChange: (e: ChangeEvent<HTMLInputElement>) => void;
12
+ };
@@ -0,0 +1,18 @@
1
+ import { CSSProperties, ReactNode } from 'react';
2
+ interface BoxProps {
3
+ className?: string;
4
+ style?: CSSProperties;
5
+ content: ReactNode | ((onClose: (onDestroy?: () => void) => void) => ReactNode);
6
+ onClick?: (e: React.MouseEvent) => void;
7
+ onDoubleClick?: (e: React.MouseEvent) => void;
8
+ onContextMenu?: (e: React.MouseEvent) => void;
9
+ onMouseDown?: (e: React.MouseEvent) => void;
10
+ onMouseUp?: (e: React.MouseEvent) => void;
11
+ onMouseEnter?: (e: React.MouseEvent) => void;
12
+ onMouseLeave?: (e: React.MouseEvent) => void;
13
+ onMouseMove?: (e: React.MouseEvent) => void;
14
+ isSingle?: boolean;
15
+ isClickBoxToClose?: boolean;
16
+ }
17
+ export declare const injunctiveBox: (options: BoxProps) => HTMLDivElement;
18
+ export {};
@@ -0,0 +1 @@
1
+ export { injunctiveBox } from './InjunctiveBox';
@@ -0,0 +1,2 @@
1
+ import { InputProps } from './types';
2
+ export declare const OnoInput: ({ id, name, max, min, maxLength, minLength, type, className, defaultValue, placeholder, readonly, autocomplete, autofocus, form, disabled, clearable, showPassword, prepend, append, prefix, suffix, showCount, border, boxShadow, value, onChange, onFocus, onBlur, onClear }: InputProps) => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,2 @@
1
+ import { TextareaProps } from './types';
2
+ export declare const OnoTextarea: ({ id, name, rows, maxLength, minLength, className, placeholder, readonly, resize, autocomplete, autofocus, form, disabled, autoSize, showCount, border, boxShadow, value, onChange }: TextareaProps) => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,2 @@
1
+ export { OnoInput } from './Input';
2
+ export { OnoTextarea } from './Textarea';
@@ -0,0 +1,46 @@
1
+ import { ChangeEvent, ReactNode } from 'react';
2
+ interface InputBaseProps {
3
+ id?: string;
4
+ className?: string;
5
+ name?: string;
6
+ defaultValue?: string;
7
+ placeholder?: string;
8
+ readonly?: boolean;
9
+ autofocus?: boolean;
10
+ autocomplete?: string;
11
+ form?: string;
12
+ maxLength?: number;
13
+ minLength?: number;
14
+ disabled?: boolean;
15
+ showCount?: boolean;
16
+ border?: string;
17
+ boxShadow?: string;
18
+ value?: string;
19
+ }
20
+ export interface InputProps extends InputBaseProps {
21
+ max?: number;
22
+ min?: number;
23
+ type?: HTMLInputElement['type'];
24
+ showPassword?: boolean;
25
+ clearable?: boolean;
26
+ prepend?: ReactNode;
27
+ append?: ReactNode;
28
+ prefix?: ReactNode;
29
+ suffix?: ReactNode;
30
+ onClear?: () => void;
31
+ onChange?: (event: ChangeEvent<HTMLInputElement>) => void;
32
+ onFocus?: (event: ChangeEvent<HTMLInputElement>) => void;
33
+ onBlur?: (event: ChangeEvent<HTMLInputElement>) => void;
34
+ }
35
+ export interface TextareaProps extends InputBaseProps {
36
+ rows?: number;
37
+ resize?: boolean;
38
+ autoSize?: boolean | {
39
+ minRows?: number;
40
+ maxRows?: number;
41
+ };
42
+ onChange?: (event: ChangeEvent<HTMLTextAreaElement>) => void;
43
+ onFocus?: (event: ChangeEvent<HTMLTextAreaElement>) => void;
44
+ onBlur?: (event: ChangeEvent<HTMLTextAreaElement>) => void;
45
+ }
46
+ export {};
@@ -0,0 +1,3 @@
1
+ import { ReactNode } from 'react';
2
+ import { AwaitListProps } from './types';
3
+ export declare const AwaitList: <T>({ list, children, fallback, deps, insertBetweenDom }: AwaitListProps<T>) => ReactNode | ReactNode[];
@@ -0,0 +1,3 @@
1
+ import { ReactNode } from 'react';
2
+ import { ListProps } from './types';
3
+ export declare const List: <T>({ list, children, fallback, insertBetweenDom }: ListProps<T>) => ReactNode;
@@ -0,0 +1,2 @@
1
+ export { AwaitList } from './AwaitList';
2
+ export { List } from './List';
@@ -0,0 +1,11 @@
1
+ import { DependencyList, ReactNode } from 'react';
2
+ export interface ListProps<T> {
3
+ list: T[] | (() => T[]);
4
+ children: (item: T, index: number) => ReactNode;
5
+ fallback?: ReactNode | ReactNode[];
6
+ insertBetweenDom?: (i: number) => ReactNode;
7
+ }
8
+ export interface AwaitListProps<T> extends Omit<ListProps<T>, 'list'> {
9
+ list: T[] | (() => T[]) | (() => Promise<T[]>);
10
+ deps?: DependencyList;
11
+ }
@@ -0,0 +1,2 @@
1
+ import { MenuButtonProps } from './types';
2
+ export declare const MenuButton: ({ active, onchange, w, duration, clr, bgc }: MenuButtonProps) => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1 @@
1
+ export { MenuButton } from './MenuButton';
@@ -0,0 +1,8 @@
1
+ export interface MenuButtonProps {
2
+ w?: string;
3
+ clr?: string;
4
+ bgc?: string;
5
+ active?: boolean;
6
+ duration?: number;
7
+ onchange?: (bl: boolean) => void;
8
+ }
@@ -0,0 +1,8 @@
1
+ import { MessageProps } from './types';
2
+ export declare const message: {
3
+ info: (props: string | MessageProps) => void;
4
+ success: (props: string | MessageProps) => void;
5
+ warning: (props: string | MessageProps) => void;
6
+ error: (props: string | MessageProps) => void;
7
+ loading: (props: string | MessageProps) => void;
8
+ };
@@ -0,0 +1 @@
1
+ export { message } from './Message';
@@ -0,0 +1,20 @@
1
+ import { ReactNode } from 'react';
2
+ export type MessageType = 'success' | 'error' | 'info' | 'warning' | 'loading';
3
+ export interface OnoMessageProps {
4
+ id: string;
5
+ plain?: boolean;
6
+ instancesKey?: string;
7
+ type: MessageType;
8
+ duration?: number;
9
+ message: ReactNode | ((icon: ReactNode, closeButton?: ReactNode) => ReactNode);
10
+ speed?: number;
11
+ offset?: number;
12
+ showClose?: boolean;
13
+ zIndex?: number;
14
+ onClose?: () => void;
15
+ destroy: (onDestroy?: () => void) => void;
16
+ }
17
+ export type MessageSignificantProps = Omit<OnoMessageProps, 'id' | 'instancesKey' | 'plain' | 'offset' | 'zIndex' | 'destroy'>;
18
+ export type MessageProps = Omit<OnoMessageProps, 'id' | 'type' | 'destroy' | 'instancesKey'> & {
19
+ key?: string;
20
+ };
@@ -0,0 +1,23 @@
1
+ import { JSX, ReactNode } from 'react';
2
+ interface OffsetOptionsType {
3
+ topOffset: number;
4
+ height: number;
5
+ bottomOffset: number;
6
+ }
7
+ interface InstanceType {
8
+ id: string;
9
+ key: string;
10
+ reactNode: ReactNode;
11
+ props: unknown;
12
+ offsetOptions: OffsetOptionsType;
13
+ destroy: (onDestroy?: () => void) => void;
14
+ }
15
+ export declare const createInstancesList: <T extends {
16
+ instancesKey?: string;
17
+ }>(Component: (props: T) => JSX.Element, props: Omit<T, "id" | "destroy">, idPrefix?: string) => InstanceType[];
18
+ export declare const deleteCurrentInstance: (id: string) => void;
19
+ export declare const changeCurrentInstanceOffsetOptions: (id: string, offsetOptions: OffsetOptionsType) => void;
20
+ export declare const getPreviousTopOffset: (id: string) => number;
21
+ export declare const getPreviousBottomOffset: (id: string) => number;
22
+ export declare const getSameKeyInstanceProps: (key: string) => unknown;
23
+ export {};
@@ -0,0 +1,2 @@
1
+ import { ModalBoxProps } from './types';
2
+ export declare const Modal: (options: ModalBoxProps) => (onDestroy?: (() => void) | undefined) => void;
@@ -0,0 +1 @@
1
+ export { Modal } from './Modal';
@@ -0,0 +1,27 @@
1
+ import { FC, ReactNode } from 'react';
2
+ export type ModalBoxProps = {
3
+ title?: ReactNode;
4
+ icon?: ReactNode;
5
+ content?: ReactNode;
6
+ okText?: string;
7
+ cancelText?: string;
8
+ isLoading?: boolean;
9
+ position?: {
10
+ x: number;
11
+ y: number;
12
+ };
13
+ confirmDisabled?: boolean;
14
+ cancelDisabled?: boolean;
15
+ onConfirm?: () => void | Promise<void>;
16
+ onCancel?: () => void | Promise<void>;
17
+ mask?: boolean;
18
+ maskClosable?: boolean;
19
+ width?: string | number;
20
+ btnClr?: string;
21
+ footer?: (({ OkBtn, CancelBtn, handleClose }: {
22
+ OkBtn: FC;
23
+ CancelBtn: FC;
24
+ handleClose: () => void;
25
+ }) => ReactNode) | null;
26
+ modalBody?: (handleClose: () => void) => ReactNode;
27
+ };
@@ -0,0 +1,2 @@
1
+ import { PaginationProps } from './types';
2
+ export declare const Pagination: ({ firstBtn, lastBtn, currentPage, total, prevBtn, nextBtn, styles, className, children, onChange, pageBtnClassName, pageBtnActiveClassName, hiddenNextBtnOnLastPage, hiddenPrevBtnOnFirstPage }: PaginationProps) => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1 @@
1
+ export { Pagination } from './Pagination';
@@ -0,0 +1,20 @@
1
+ import { CSSProperties, ReactNode } from 'react';
2
+ export interface PaginationProps {
3
+ firstBtn?: ReactNode;
4
+ lastBtn?: ReactNode;
5
+ currentPage: number;
6
+ total: number;
7
+ prevBtn?: ReactNode | ((isActive: boolean) => ReactNode);
8
+ nextBtn?: ReactNode | ((isActive: boolean) => ReactNode);
9
+ className?: string;
10
+ styles?: CSSProperties;
11
+ pageBtnClassName?: string;
12
+ children?: ({ page, isActive }: {
13
+ page: number;
14
+ isActive: boolean;
15
+ }) => ReactNode;
16
+ pageBtnActiveClassName?: string;
17
+ hiddenPrevBtnOnFirstPage?: boolean;
18
+ hiddenNextBtnOnLastPage?: boolean;
19
+ onChange: (page: number) => void;
20
+ }
@@ -0,0 +1,2 @@
1
+ import { JSX } from 'react';
2
+ export declare const portalRenderer: <T>(Component: (props: T) => JSX.Element, props: Omit<T, "destroy">, id?: string, rootId?: string) => (onDestroy?: () => void) => void;
@@ -0,0 +1 @@
1
+ export { portalRenderer } from './PortalRenderer';
@@ -0,0 +1,2 @@
1
+ import { RadioProps } from './types';
2
+ export declare const Radio: <T>({ name, value, style, checked, onChange, children, className, radioW, radioGap, checkedColor, unCheckedColor, disabled }: RadioProps<T>) => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,2 @@
1
+ import { RadioGroupProps } from './types';
2
+ export declare const RadioGroup: <T>({ name, style, options, onChange, className, radioW, radioGap, labelPosition, checkedColor, unCheckedColor, value: selectedValue }: RadioGroupProps<T>) => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,2 @@
1
+ export { Radio } from './Radio';
2
+ export { RadioGroup } from './RadioGroup';
@@ -0,0 +1,26 @@
1
+ import { CSSProperties, ReactNode } from 'react';
2
+ type RadioItemType<T> = {
3
+ value: T;
4
+ label: string;
5
+ disabled?: boolean | ((value: T) => boolean);
6
+ };
7
+ export interface RadioProps<T> {
8
+ value: T;
9
+ name?: string;
10
+ checked: boolean;
11
+ className?: string;
12
+ disabled?: boolean;
13
+ children?: ReactNode;
14
+ style?: CSSProperties;
15
+ checkedColor?: string;
16
+ unCheckedColor?: string;
17
+ radioW?: number | string;
18
+ radioGap?: number | string;
19
+ onChange: (e: React.ChangeEvent<HTMLInputElement>) => void;
20
+ }
21
+ export interface RadioGroupProps<T> extends Omit<RadioProps<T>, 'children' | 'checked' | 'onChange' | 'disabled'> {
22
+ options: RadioItemType<T>[];
23
+ labelPosition?: 'left' | 'right';
24
+ onChange: (value: T) => void;
25
+ }
26
+ export {};
@@ -0,0 +1,2 @@
1
+ import { OptionProps } from './types';
2
+ export declare const OnoOption: ({ label, value, disabled, onChange, optionRender, currentValue }: OptionProps) => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,2 @@
1
+ import { SelectProps } from './types';
2
+ export declare const OnoSelect: ({ options, defaultValue, placeholder, inputBorder, isShowArrow, disabled, clearable, selectClassName, optionsClassName, filterable, notFoundContent, optionRender, onClear, onChange, filterMethod }: SelectProps) => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1 @@
1
+ export { OnoSelect } from './Select';
@@ -0,0 +1,30 @@
1
+ import { ReactNode } from 'react';
2
+ export interface SelectOption {
3
+ label: string;
4
+ value: string | number;
5
+ disabled?: boolean;
6
+ }
7
+ export interface SelectProps {
8
+ options: SelectOption[];
9
+ defaultValue?: string | number;
10
+ placeholder?: string;
11
+ isShowArrow?: boolean;
12
+ inputBorder?: string;
13
+ disabled?: boolean;
14
+ clearable?: boolean;
15
+ selectClassName?: string;
16
+ optionsClassName?: string;
17
+ filterable?: boolean;
18
+ notFoundContent?: ReactNode;
19
+ labelRender?: (option: SelectOption) => ReactNode;
20
+ optionRender?: (option: SelectOption, isSelected: boolean) => ReactNode;
21
+ onClear?: () => void;
22
+ onChange?: (value: string | number) => void;
23
+ filterMethod?: (keyword: string, options: SelectOption[]) => SelectOption[];
24
+ }
25
+ export interface OptionProps extends SelectOption {
26
+ currentValue: string;
27
+ showOptionEntries?: number;
28
+ onChange?: (value: string | number) => void;
29
+ optionRender?: (option: SelectOption, isSelected: boolean) => ReactNode;
30
+ }
@@ -0,0 +1,10 @@
1
+ interface SvgImgProps {
2
+ w?: number | string;
3
+ h?: number | string;
4
+ className?: string;
5
+ src: string;
6
+ clr?: string;
7
+ onClick?: (e: React.MouseEvent<HTMLDivElement>) => void;
8
+ }
9
+ export declare const SvgImg: ({ w, h, src, clr, className, onClick }: SvgImgProps) => import("react/jsx-runtime").JSX.Element;
10
+ export {};
@@ -0,0 +1 @@
1
+ export { SvgImg } from './SvgImg';
@@ -0,0 +1,2 @@
1
+ import { SwitchProps } from './types';
2
+ export declare const Switch: ({ id, text, style, color, checked, onChange, name, className, disabled }: SwitchProps) => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1 @@
1
+ export { Switch } from './Switch';
@@ -0,0 +1,18 @@
1
+ import { ChangeEvent, CSSProperties, ReactNode } from 'react';
2
+ export interface SwitchProps {
3
+ id?: string;
4
+ name?: string;
5
+ checked: boolean;
6
+ disabled?: boolean;
7
+ className?: string;
8
+ style?: CSSProperties;
9
+ text?: {
10
+ active: ReactNode;
11
+ inactive: ReactNode;
12
+ };
13
+ color?: string | {
14
+ active: string;
15
+ inactive: string;
16
+ };
17
+ onChange?: (bl: boolean, e: ChangeEvent<HTMLInputElement>) => void;
18
+ }
@@ -0,0 +1,2 @@
1
+ import { TemplateDialogProps } from './types';
2
+ export declare const TemplateDialog: ({ children, animation, className, duration, style, maskColor, disableContextMenu, clickMaskClose, dialogClose }: TemplateDialogProps) => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1 @@
1
+ export { TemplateDialog } from './TemplateDialog';
@@ -0,0 +1,19 @@
1
+ import { CSSProperties, ReactNode } from 'react';
2
+ export interface TemplateDialogProps {
3
+ children: ReactNode | ((enhancedDialogClose: () => void) => ReactNode);
4
+ animation?: {
5
+ type: 'zoom';
6
+ element: HTMLElement;
7
+ } | {
8
+ type: 'fade';
9
+ direction?: 'top-center' | 'left-center';
10
+ startPosition: string;
11
+ };
12
+ duration?: number;
13
+ className?: string;
14
+ style?: CSSProperties;
15
+ maskColor?: string;
16
+ disableContextMenu?: boolean;
17
+ clickMaskClose?: boolean;
18
+ dialogClose: () => void;
19
+ }
@@ -0,0 +1,7 @@
1
+ import { PromiseOptionsType, ToastProps } from './types';
2
+ export declare const toast: {
3
+ success: (message: string | Omit<ToastProps, "type">) => void;
4
+ error: (message: string | Omit<ToastProps, "type">) => void;
5
+ warning: (message: string | Omit<ToastProps, "type">) => void;
6
+ promise: (promise: Promise<string> | (() => Promise<string>), options: PromiseOptionsType) => void;
7
+ };
@@ -0,0 +1 @@
1
+ export { toast } from './Toast';
@@ -0,0 +1,19 @@
1
+ import { CSSProperties } from 'react';
2
+ export type MessageType = 'success' | 'error' | 'warning' | 'promise';
3
+ export type PromiseOptionsType = {
4
+ success: string | ((message: string) => string);
5
+ error?: string | ((message: string) => string);
6
+ loading: string;
7
+ };
8
+ export interface ToastProps {
9
+ type: MessageType;
10
+ message: string | Promise<string> | (() => Promise<string>);
11
+ duration?: number;
12
+ zIndex?: number;
13
+ className?: string;
14
+ speed?: number;
15
+ style?: CSSProperties;
16
+ isUseEnterAnimation?: boolean;
17
+ promiseOptions?: PromiseOptionsType;
18
+ toastList: any[];
19
+ }
@@ -0,0 +1,2 @@
1
+ import { TooltipProps } from './types';
2
+ export declare const Tooltip: ({ children, content, onOpenChange, trigger, placement, popperOptions, className, style, isShowArrow, sameWidth, autoAdjustOverflow }: TooltipProps) => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1 @@
1
+ export { Tooltip } from './Tooltip';
@@ -0,0 +1,15 @@
1
+ import { Options, Placement } from '@popperjs/core';
2
+ import { CSSProperties, ReactNode } from 'react';
3
+ export interface TooltipProps {
4
+ content?: ReactNode | (() => ReactNode);
5
+ children: ReactNode | (() => ReactNode);
6
+ trigger?: 'hover' | 'click' | 'focus' | 'contextmenu';
7
+ placement?: Placement;
8
+ isShowArrow?: boolean;
9
+ className?: string;
10
+ style?: CSSProperties;
11
+ sameWidth?: boolean;
12
+ autoAdjustOverflow?: boolean;
13
+ popperOptions?: Partial<Options>;
14
+ onOpenChange?: (isVisible: boolean) => void;
15
+ }
@@ -0,0 +1,2 @@
1
+ import { VirtualListProps } from './types';
2
+ export declare const EstimatedVirtualList: import('react').MemoExoticComponent<({ containerClassName, dataSource, containerStyle, onEndCallback, refreshSpeed, wrapperClassName, wrapperStyle, estimatedSize, updateDataSourceScroll2Top, direction }: VirtualListProps) => import("react/jsx-runtime").JSX.Element>;
@@ -0,0 +1,2 @@
1
+ export { EstimatedVirtualList } from './EstimatedVirtualList';
2
+ export { createDataSource } from './types';
@@ -0,0 +1,35 @@
1
+ import { CSSProperties, ReactNode } from 'react';
2
+ export type VirtualListDataSource = {
3
+ id: number;
4
+ data: ReactNode;
5
+ };
6
+ export type VirtualListProps = {
7
+ containerClassName?: string;
8
+ containerStyle?: CSSProperties;
9
+ refreshSpeed?: number;
10
+ estimatedSize?: number | (() => number);
11
+ wrapperClassName?: string;
12
+ wrapperStyle?: CSSProperties;
13
+ direction?: 'vertical' | 'horizontal';
14
+ dataSource: VirtualListDataSource[];
15
+ updateDataSourceScroll2Top?: boolean;
16
+ onEndCallback?: () => void;
17
+ };
18
+ export type virtualListState = {
19
+ viewSize: number;
20
+ startIndex: number;
21
+ listSize: number;
22
+ renderCount: number;
23
+ prevLen: number;
24
+ };
25
+ export type virtualListItemInfo = {
26
+ start: number;
27
+ index: number;
28
+ end: number;
29
+ size: number;
30
+ dSize: number;
31
+ };
32
+ export declare const createDataSource: <T>(dataList: T[], dom: (data: T, index: number) => ReactNode) => {
33
+ id: number;
34
+ data: ReactNode;
35
+ }[];
@@ -0,0 +1,2 @@
1
+ import { WaterfallProps } from './types';
2
+ export declare const Waterfall: ({ options, pageSize, children, request, reloadData, className, style, updateData, loading, bottomThreshold }: WaterfallProps) => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,2 @@
1
+ export type { ImageItem } from './types';
2
+ export { Waterfall } from './Waterfall';