@caron/caron
Advanced tools
| import React, { ForwardRefExoticComponent } from 'react'; | ||
| export interface ResizeProps { | ||
| onResize?: (entry: ResizeObserverEntry[]) => void; | ||
| children?: React.ReactNode | ForwardRefExoticComponent<any>; | ||
| } | ||
| declare const _default: React.ForwardRefExoticComponent<ResizeProps & React.RefAttributes<unknown>>; | ||
| export default _default; |
| import React from 'react'; | ||
| import { BackTopProps } from './type'; | ||
| import './style/index.less'; | ||
| declare const _default: React.MemoExoticComponent<React.ForwardRefExoticComponent<BackTopProps & { | ||
| children?: React.ReactNode; | ||
| } & React.RefAttributes<unknown>>>; | ||
| export default _default; |
| /// <reference types="react" /> | ||
| import './style.less'; | ||
| declare const Demo1: () => JSX.Element; | ||
| export default Demo1; |
| import BackTop from './backtop'; | ||
| export default BackTop; |
| /// <reference types="react" /> | ||
| export interface BackTopProps { | ||
| style?: React.CSSProperties; | ||
| className?: string; | ||
| /** | ||
| * @description 当滚动到这个高度时,显示返回顶部按钮。 | ||
| * @defaultValue 400 | ||
| */ | ||
| visibleHeight?: number; | ||
| /** | ||
| * @description 设置需要监听其滚动事件的元素,值为一个返回对应 `DOM` 元素的函数。 | ||
| * @defaultValue () => window | ||
| */ | ||
| target?: () => HTMLElement | Window; | ||
| /** | ||
| * @description 点击返回顶部时的回调函数。 | ||
| */ | ||
| onClick?: () => void; | ||
| /** | ||
| * @description 滚动到顶部的缓动方式类型 | ||
| * @defaultValue easeInOut | ||
| */ | ||
| easing?: string; | ||
| /** | ||
| * @description 滚动到顶部的时间。 | ||
| * @defaultValue 400 | ||
| */ | ||
| duration?: number; | ||
| } |
| /// <reference types="react" /> | ||
| import { CalendarProps } from './type'; | ||
| import './style/index.less'; | ||
| declare const Calendar: (props: CalendarProps) => JSX.Element; | ||
| export default Calendar; |
| import Calendar from './calendar'; | ||
| export default Calendar; |
| export interface CalendarProps { | ||
| } |
| import { Dayjs } from 'dayjs'; | ||
| export declare function generateMonthData(day: Dayjs): { | ||
| day: Dayjs; | ||
| isCurrentMonth: boolean; | ||
| }[]; |
| /// <reference types="react" /> | ||
| declare const Demo1: () => JSX.Element; | ||
| export default Demo1; |
| /// <reference types="react" /> | ||
| declare const Demo1: () => JSX.Element; | ||
| export default Demo1; |
| /// <reference types="react" /> | ||
| import './index.less'; | ||
| import { DividerProps } from './type'; | ||
| declare const Divider: (props: DividerProps) => JSX.Element; | ||
| export default Divider; |
| import React from 'react'; | ||
| export interface DividerProps { | ||
| /** | ||
| * @description: 分割线文字的位置 | ||
| * @default: center | ||
| * @type: 'left' | 'right' | 'center' | ||
| */ | ||
| position?: 'left' | 'right' | 'center'; | ||
| /** | ||
| * @description: 分割线文字 | ||
| * @default: '' | ||
| * @type: string | React.ReactNode; | ||
| */ | ||
| children?: string | React.ReactNode; | ||
| /** | ||
| * @description: 分割线类型 | ||
| * @default: horizontal | ||
| * @type: 'horizontal' | 'vertical' | ||
| */ | ||
| type?: 'horizontal' | 'vertical'; | ||
| style?: React.CSSProperties; | ||
| className?: string; | ||
| } |
| /// <reference types="react" /> | ||
| declare const Demo1: () => JSX.Element; | ||
| export default Demo1; |
| /// <reference types="react" /> | ||
| declare const Demo2: () => JSX.Element; | ||
| export default Demo2; |
| /// <reference types="react" /> | ||
| import { DropdownProps } from './type'; | ||
| import './style/index.less'; | ||
| declare const Dropdown: (baseProps: DropdownProps) => JSX.Element; | ||
| export default Dropdown; |
| import Dropdown from './dropdown'; | ||
| export default Dropdown; |
| /// <reference types="react" /> | ||
| import { TriggerProps } from '../Trigger/type'; | ||
| export interface DropdownProps extends TriggerProps { | ||
| children?: React.ReactNode; | ||
| /** | ||
| * @description 下拉框的内容 | ||
| */ | ||
| droplist?: React.ReactNode; | ||
| } |
| /// <reference types="react" /> | ||
| declare const Demo1: () => JSX.Element; | ||
| export default Demo1; |
| import React from 'react'; | ||
| import { FormProps } from './type'; | ||
| import './style/index.less'; | ||
| declare const FormComponent: React.ForwardRefExoticComponent<FormProps & React.RefAttributes<unknown>>; | ||
| export default FormComponent; |
| /// <reference types="react" /> | ||
| import { FormStore } from './formStore'; | ||
| export declare const formContext: import("react").Context<FormStore>; |
| /// <reference types="react" /> | ||
| import { FormItemProps } from './type'; | ||
| declare const FormItem: (baseProps: FormItemProps) => JSX.Element; | ||
| export default FormItem; |
| import { FormFields, FieldType, UFieldType } from './type'; | ||
| export declare class FormStore { | ||
| formFields: FormFields; | ||
| penddingQueue: (() => void)[]; | ||
| isSchedule: boolean; | ||
| onChange: { | ||
| [key: string]: () => void; | ||
| }; | ||
| defaultFormValue: FormFields; | ||
| hooks: { | ||
| onUpdated: ((fields: Record<string, any>) => void)[]; | ||
| }; | ||
| id: number; | ||
| constructor(defaultFormValue: {}, { onUpdated }: { | ||
| onUpdated: any; | ||
| }); | ||
| formatField(name: string, field: UFieldType): FieldType; | ||
| registerField(name: string, field: UFieldType, onChange: () => void): void; | ||
| unRegisterField(name: string): void; | ||
| clearFields(): void; | ||
| resetFields(): void; | ||
| setFields(object: FormFields): void; | ||
| setField(name: any, value: UFieldType | FieldType, batch_Update?: boolean): void; | ||
| setFieldsValue(object: FormFields): void; | ||
| setFieldValue(name: string, value: any, status?: 'pending' | 'success' | 'error', batch_Update?: boolean): void; | ||
| update(name: any, batch_Update: any): void; | ||
| getFieldsValue(): {}; | ||
| getFields(): FormFields; | ||
| getField(name: string): FieldType; | ||
| getFieldValue(name: string): any; | ||
| batchUpdate(name: any): void; | ||
| validateFieldValue(name: any, batch_Update?: boolean): boolean; | ||
| validateFields(): boolean; | ||
| submit(): Promise<unknown>; | ||
| } |
| import Form from './form'; | ||
| export default Form; |
| /// <reference types="react" /> | ||
| export type STATUS = 'pending' | 'success' | 'error'; | ||
| export interface FormFields { | ||
| [key: string]: FieldType; | ||
| } | ||
| export type FieldType = UFieldType & { | ||
| status?: STATUS; | ||
| message?: string; | ||
| }; | ||
| export interface Rule { | ||
| validator: RegExp | ((value: any) => boolean); | ||
| message: string; | ||
| } | ||
| export interface UFieldType { | ||
| value: any; | ||
| rules?: Rule[]; | ||
| required?: boolean; | ||
| type: 'default' | 'form'; | ||
| } | ||
| export interface FormProps { | ||
| style?: React.CSSProperties; | ||
| className?: string; | ||
| initialValues?: { | ||
| [key: string]: any; | ||
| }; | ||
| children: React.ReactElement | React.ReactElement[]; | ||
| onUpdated?: (values: { | ||
| [key: string]: any; | ||
| }) => void; | ||
| onReset?: () => void; | ||
| onClear?: () => void; | ||
| } | ||
| export interface FormItemProps { | ||
| style?: React.CSSProperties; | ||
| className?: string; | ||
| name: string; | ||
| label: string; | ||
| required?: boolean; | ||
| rules?: Rule[]; | ||
| trigger?: 'onChange' | 'onBlur'; | ||
| children: React.ReactElement; | ||
| validateTrigger?: 'onChange' | 'onBlur'; | ||
| } |
| import { FormStore } from './formStore'; | ||
| export default function useFormStore(initialValues: Record<string, any>, { onUpdated }: { | ||
| onUpdated: any; | ||
| }): FormStore[]; |
| import { FormStore } from './formStore'; | ||
| import { Rule } from './type'; | ||
| export default function useRegister(formStore: FormStore, name: string, rules: Rule[], required: boolean): void; |
| /// <reference types="react" /> | ||
| declare const Demo1: () => JSX.Element; | ||
| export default Demo1; |
| /// <reference types="react" /> | ||
| declare const Demo1: () => JSX.Element; | ||
| export default Demo1; |
| /// <reference types="react" /> | ||
| declare const Demo3: () => JSX.Element; | ||
| export default Demo3; |
| /// <reference types="react" /> | ||
| declare const Demo4: () => JSX.Element; | ||
| export default Demo4; |
| /// <reference types="react" /> | ||
| declare const Demo5: () => JSX.Element; | ||
| export default Demo5; |
| /// <reference types="react" /> | ||
| declare const Demo6: () => JSX.Element; | ||
| export default Demo6; |
| import Input from './input'; | ||
| export default Input; |
| import React from 'react'; | ||
| import { InputComponentProps, RefInputType } from './type'; | ||
| declare const InputComponent: React.ForwardRefExoticComponent<InputComponentProps & React.RefAttributes<RefInputType>>; | ||
| export default InputComponent; |
| import React, { ForwardRefExoticComponent } from 'react'; | ||
| import { InputProps, RefInputType } from './type'; | ||
| import './style/index.less'; | ||
| import Password from './password'; | ||
| type InputType = ForwardRefExoticComponent<InputProps & React.RefAttributes<RefInputType>> & { | ||
| Password: typeof Password; | ||
| }; | ||
| declare const InputElement: InputType; | ||
| export default InputElement; |
| import React from 'react'; | ||
| import { InputPasswordProps, RefInputType } from './type'; | ||
| declare const Password: React.ForwardRefExoticComponent<InputPasswordProps & React.RefAttributes<RefInputType>>; | ||
| export default Password; |
| import { CSSProperties, InputHTMLAttributes, ReactNode } from 'react'; | ||
| export interface InputProps extends Omit<InputHTMLAttributes<HTMLInputElement>, 'onChange' | 'prefix' | 'className' | 'size' | 'height' | 'maxLength'> { | ||
| style?: CSSProperties; | ||
| className?: string; | ||
| /** | ||
| * @description 默认值 | ||
| * @defaultValue '' | ||
| */ | ||
| defaultValue?: string; | ||
| /** | ||
| * @description 提示文本 | ||
| * @defaultValue '' | ||
| */ | ||
| placeholder?: string; | ||
| /** | ||
| * @description 输入回调 | ||
| * @defaultValue () => {} | ||
| */ | ||
| onChange?: (value: string, e: any) => void; | ||
| /** | ||
| * @description 输入框的值,受控模式 | ||
| * @defaultValue '' | ||
| */ | ||
| value?: string; | ||
| /** | ||
| * @description 输入框前添加元素 | ||
| * @defaultValue '' | ||
| */ | ||
| addBefore?: ReactNode; | ||
| /** | ||
| * @description 输入框后添加元素 | ||
| * @defaultValue '' | ||
| */ | ||
| addAfter?: ReactNode; | ||
| /** | ||
| * @description 添加前缀文字或者图标 | ||
| * @defaultValue '' | ||
| */ | ||
| prefix?: ReactNode; | ||
| /** | ||
| * @description 添加后缀文字或者图标 | ||
| * @defaultValue '' | ||
| */ | ||
| suffix?: ReactNode; | ||
| /** | ||
| * @description 按下回车键的回调 | ||
| * @defaultValue () => {} | ||
| */ | ||
| onPressEnter?: (e: any) => void; | ||
| /** | ||
| * @description 输入框最大输入的长度 | ||
| * @defaultValue | ||
| */ | ||
| maxLength?: number | { | ||
| length: number; | ||
| errorOnly?: boolean; | ||
| }; | ||
| /** | ||
| * @description 是否禁用 | ||
| * @defaultValue false | ||
| */ | ||
| disabled?: boolean; | ||
| /** | ||
| * @description 输入框的尺寸 | ||
| * @defaultValue 'default' | ||
| */ | ||
| size?: 'mini' | 'small' | 'default' | 'large'; | ||
| /** | ||
| * @description 配合 `maxLength`,显示字数统计 | ||
| * @defaultValue false | ||
| */ | ||
| showWordLimit?: boolean; | ||
| } | ||
| export interface InputComponentProps extends InputProps { | ||
| prefixCls?: string; | ||
| hasParent?: boolean; | ||
| autoFitWidth?: boolean | { | ||
| delay: number | ((width: number, prevWidth: number) => number); | ||
| }; | ||
| } | ||
| export type RefInputType = { | ||
| /** 使输入框失去焦点 */ | ||
| blur: () => void; | ||
| /** 使输入框获取焦点 */ | ||
| focus: () => void; | ||
| /** input dom元素 */ | ||
| dom: HTMLInputElement; | ||
| }; | ||
| export interface InputPasswordProps extends InputProps { | ||
| /** | ||
| * @description 是否显示切换密码可见状态的按钮 | ||
| * @defaultValue false | ||
| */ | ||
| visibilityToggle?: boolean; | ||
| /** | ||
| * @description 初始是否显示 | ||
| * @defaultValue false | ||
| */ | ||
| defaultVisibility?: boolean; | ||
| /** | ||
| * @description 是否显示 | ||
| * @defaultValue false | ||
| */ | ||
| visibility?: boolean; | ||
| /** | ||
| * @description visibility 改变时触发 | ||
| * @defaultValue () => {} | ||
| */ | ||
| onVisibilityChange?: (visibility: boolean) => void; | ||
| } |
| /// <reference types="react" /> | ||
| import { MenuProps } from './type'; | ||
| type MenuContextProps = Pick<MenuProps, 'mode' | 'theme' | 'selectedKeys' | 'openKeys' | 'collapse' | 'inDropdown' | 'triggerProps'> & { | ||
| id?: string; | ||
| prefixCls?: string; | ||
| onClickMenuItem?: (key: string, event: any) => void; | ||
| onClickSubMenu?: (key: string, level: number, type: 'pop' | 'inline') => void; | ||
| collectInlineMenuKeys?: (key: string, unmount?: boolean) => void; | ||
| }; | ||
| declare const MenuContext: import("react").Context<MenuContextProps>; | ||
| export default MenuContext; |
| /// <reference types="react" /> | ||
| import './demo1.less'; | ||
| declare const Demo1: () => JSX.Element; | ||
| export default Demo1; |
| /// <reference types="react" /> | ||
| import './demo1.less'; | ||
| declare const Demo2: () => JSX.Element; | ||
| export default Demo2; |
| /// <reference types="react" /> | ||
| import './demo1.less'; | ||
| declare const Demo3: () => JSX.Element; | ||
| export default Demo3; |
| import Menu from './menu'; | ||
| export default Menu; |
| /// <reference types="react" /> | ||
| import { MenuItemProps } from './type'; | ||
| declare const Item: { | ||
| (props: MenuItemProps): JSX.Element; | ||
| menuType: string; | ||
| }; | ||
| export default Item; |
| import React from 'react'; | ||
| import { MenuProps } from './type'; | ||
| import './style/index.less'; | ||
| declare const Menu: { | ||
| (baseProps: MenuProps): JSX.Element; | ||
| Item: { | ||
| (props: import("./type").MenuItemProps): JSX.Element; | ||
| menuType: string; | ||
| }; | ||
| SubMenu: React.ForwardRefExoticComponent<import("./type").MenuSubMenuProps & React.RefAttributes<unknown>>; | ||
| defaultProps: { | ||
| isMenu: boolean; | ||
| }; | ||
| }; | ||
| export default Menu; |
| import React from 'react'; | ||
| import { MenuSubMenuProps } from '../type'; | ||
| declare const SubMenuComponent: React.ForwardRefExoticComponent<MenuSubMenuProps & React.RefAttributes<unknown>>; | ||
| export default SubMenuComponent; |
| /// <reference types="react" /> | ||
| import { MenuSubMenuProps } from '../type'; | ||
| declare const SubMenuInline: (props: MenuSubMenuProps & { | ||
| forwardedRef; | ||
| }) => JSX.Element; | ||
| export default SubMenuInline; |
| /// <reference types="react" /> | ||
| import { MenuSubMenuProps } from '../type'; | ||
| declare const SubMenuPop: (props: MenuSubMenuProps & { | ||
| forwardedRef; | ||
| }) => JSX.Element; | ||
| export default SubMenuPop; |
| import { HTMLAttributes, ReactNode } from 'react'; | ||
| import { TriggerProps } from '../Trigger/type'; | ||
| export interface MenuProps extends Omit<HTMLAttributes<HTMLDivElement>, 'className'> { | ||
| children?: React.ReactNode; | ||
| className?: string; | ||
| prefixCls?: string; | ||
| style?: React.CSSProperties; | ||
| inDropdown?: boolean; | ||
| /** | ||
| * @description 菜单风格 | ||
| * @defaultValue light | ||
| */ | ||
| theme?: 'light' | 'dark'; | ||
| /** | ||
| * @description 菜单类型,目前支持垂直(vertical)、水平菜单(horizontal)、弹出(pop) | ||
| * @defaultValue vertical | ||
| */ | ||
| mode?: 'vertical' | 'horizontal' | 'pop' | 'popButton'; | ||
| /** | ||
| * @description 初始选中的菜单项 key 数组 | ||
| * @defaultValue [] | ||
| */ | ||
| defaultSelectedKeys?: string[]; | ||
| /** | ||
| * @description 选中的菜单项 key 数组(受控模式) | ||
| * @defaultValue [] | ||
| */ | ||
| selectedKeys?: string[]; | ||
| /** | ||
| * @description 菜单选项是否可选 | ||
| * @defaultValue true | ||
| */ | ||
| selectable?: boolean; | ||
| /** | ||
| * @description 展开的子菜单 key 数组(受控模式) | ||
| */ | ||
| openKeys?: string[]; | ||
| /** | ||
| * @description 初始展开的子菜单 key 数组 | ||
| */ | ||
| defaultOpenKeys?: string[]; | ||
| /** | ||
| * @description 开启手风琴效果 | ||
| * @defaultValue false | ||
| */ | ||
| accordion?: boolean; | ||
| /** | ||
| * @description 点击子菜单标题的回调 | ||
| */ | ||
| onClickSubMenu?: (key: string, openKeys: string[], keyPath: string[]) => void; | ||
| /** | ||
| * @description 点击菜单项的回调 | ||
| */ | ||
| onClickMenuItem?: (key: string, event: any, keyPath: string[]) => any; | ||
| /** | ||
| * @description 是否水平折叠收起菜单 | ||
| * @default false | ||
| */ | ||
| collapse?: boolean; | ||
| /** | ||
| * @description 弹出模式下可接受所有 `Trigger` 的 `Props` | ||
| */ | ||
| triggerProps?: Partial<TriggerProps>; | ||
| } | ||
| export interface MenuSubMenuProps { | ||
| level?: number; | ||
| children?: React.ReactNode; | ||
| className?: string; | ||
| style?: React.CSSProperties; | ||
| key: string; | ||
| _key?: string; | ||
| /** | ||
| * @description 子菜单的标题 | ||
| */ | ||
| title: string | ReactNode; | ||
| /** | ||
| * @description 子菜单的图标 | ||
| */ | ||
| icon?: ReactNode; | ||
| /** | ||
| * @description 弹出模式下可接受所有 `Trigger` 的 `Props` | ||
| */ | ||
| triggerProps?: Partial<TriggerProps>; | ||
| } | ||
| export interface MenuItemProps extends Omit<HTMLAttributes<HTMLElement>, 'className'> { | ||
| children?: React.ReactNode; | ||
| className?: string; | ||
| style?: React.CSSProperties; | ||
| key: string; | ||
| _key?: string; | ||
| onClick?: (e: any) => void; | ||
| wrapper?: string | React.FC<any> | React.ComponentClass<any>; | ||
| /** | ||
| * @description 菜单项禁止选中 | ||
| * @defaultValue false | ||
| */ | ||
| disabled?: boolean; | ||
| } |
| import React from 'react'; | ||
| export declare const processChilren: (children: React.ReactNode, props: any) => any; | ||
| export declare function isChildrenSelected(children: any, keys: string[]): boolean; |
| import React, { PropsWithChildren } from 'react'; | ||
| import { RadioGroupContextProps, RadioGroupProps } from './type'; | ||
| export declare const RadioGroupContext: React.Context<RadioGroupContextProps>; | ||
| declare function Group(baseProps: PropsWithChildren<RadioGroupProps>): JSX.Element; | ||
| declare namespace Group { | ||
| var displayName: string; | ||
| } | ||
| export default Group; |
| import Radio from './radio'; | ||
| export default Radio; |
| import React from 'react'; | ||
| import { RadioProps } from './type'; | ||
| import './style/index.less'; | ||
| import Group from './group'; | ||
| declare const Radio: { | ||
| (baseProps: RadioProps): JSX.Element; | ||
| displayName: string; | ||
| GroupContext: React.Context<import("./type").RadioGroupContextProps>; | ||
| Group: typeof Group; | ||
| }; | ||
| export default Radio; |
| import { ChangeEvent, HTMLAttributes, ReactNode } from 'react'; | ||
| export interface RadioProps<T = any> extends Omit<HTMLAttributes<HTMLLabelElement>, 'children' | 'className' | 'onChange'> { | ||
| style?: React.CSSProperties; | ||
| className?: string; | ||
| /** | ||
| * @description 是否禁用 | ||
| * @default false | ||
| */ | ||
| disabled?: boolean; | ||
| /** | ||
| * @description 控件的value值 | ||
| * @default - | ||
| */ | ||
| value?: T; | ||
| /** | ||
| * @description 是否选中 | ||
| * @default false | ||
| */ | ||
| checked?: boolean; | ||
| /** | ||
| * @description 初始是否选中 | ||
| * @default false | ||
| */ | ||
| defaultChecked?: boolean; | ||
| /** | ||
| * @description 选中状态发生变化时的回调函数 | ||
| * @default - | ||
| */ | ||
| onChange?: (checked: boolean, event: ChangeEvent) => void; | ||
| children?: ReactNode | ((value: { | ||
| checked: boolean; | ||
| }) => ReactNode); | ||
| } | ||
| export interface RadioGroupProps { | ||
| style?: React.CSSProperties; | ||
| className?: string; | ||
| disabled?: boolean; | ||
| /** | ||
| * @description `Radio` 的 name | ||
| * @default - | ||
| */ | ||
| name?: string; | ||
| /** | ||
| * @description `Radio` 的 类型 | ||
| * @default 'radio' | ||
| */ | ||
| type?: 'radio' | 'button'; | ||
| onChange?: (value: any, event: ChangeEvent) => void; | ||
| /** | ||
| * @description 默认选中的值 | ||
| * @default - | ||
| */ | ||
| defaultValue?: any; | ||
| /** | ||
| * @description 选中的值(受控) | ||
| * @default - | ||
| */ | ||
| value?: any; | ||
| } | ||
| export interface RadioGroupContextProps { | ||
| type: 'radio' | 'button'; | ||
| value?: any; | ||
| disabled?: boolean; | ||
| name?: string; | ||
| onChangeValue?: (value: any, event: ChangeEvent) => void; | ||
| group?: boolean; | ||
| } |
| import Rate from './rate'; | ||
| export default Rate; |
| /// <reference types="react" /> | ||
| import { RateProps } from './type'; | ||
| import './style/index.less'; | ||
| declare const Rate: (baseProps: RateProps) => JSX.Element; | ||
| export default Rate; |
| import React, { CSSProperties, ReactNode } from 'react'; | ||
| export interface RateProps { | ||
| style?: CSSProperties; | ||
| className?: string | string[]; | ||
| /** | ||
| * @description 默认值 | ||
| * @default 0 | ||
| */ | ||
| defaultValue?: number; | ||
| /** | ||
| * @description 自定义字符 | ||
| * @default starIcon | ||
| */ | ||
| character?: React.ReactNode | ((index: number) => ReactNode); | ||
| /** | ||
| * @description 星的总数 | ||
| * @default 5 | ||
| */ | ||
| count?: number; | ||
| /** | ||
| * @description 选中的星的个数(受控) | ||
| * @default 5 | ||
| */ | ||
| value?: number; | ||
| /** | ||
| * @description 是否允许半选 | ||
| * @default false | ||
| */ | ||
| allowHalf?: boolean; | ||
| /** | ||
| * @description 是否允许清除 | ||
| * @default false | ||
| */ | ||
| allowClear?: boolean; | ||
| /** | ||
| * @description 是否只读,无法进行交互 | ||
| * @default false | ||
| */ | ||
| readOnly?: boolean; | ||
| /** | ||
| * @description 是否禁用 | ||
| * @default false | ||
| */ | ||
| disabled?: boolean; | ||
| /** | ||
| * @description 选中时的回调 | ||
| * @default - | ||
| */ | ||
| onChange?: (value: number) => void; | ||
| /** | ||
| * @description 鼠标移入时的回调 | ||
| * @default - | ||
| */ | ||
| onHoverChange?: (value: number) => void; | ||
| } |
| /// <reference types="react" /> | ||
| export default function Demo1(): JSX.Element; |
| /// <reference types="react" /> | ||
| declare const Demo2: () => JSX.Element; | ||
| export default Demo2; |
| /// <reference types="react" /> | ||
| import { TooltipProps } from './type'; | ||
| import './style/index.less'; | ||
| declare const Tooltip: (props: TooltipProps) => JSX.Element; | ||
| export default Tooltip; |
| import { CSSProperties } from 'react'; | ||
| import { TriggerProps } from '../Trigger/type'; | ||
| export interface TooltipProps { | ||
| style?: CSSProperties; | ||
| className?: string | string[]; | ||
| /** | ||
| * @description 触发方式 | ||
| * @default hover | ||
| */ | ||
| trigger?: TriggerProps['trigger']; | ||
| children: React.ReactNode; | ||
| /** | ||
| * @description 提示内容 | ||
| * @default '' | ||
| */ | ||
| content: React.ReactNode; | ||
| /** | ||
| * @description 弹出框挂载的节点 | ||
| * @default document.body | ||
| */ | ||
| getPopupContainer?: (node: HTMLElement) => Element; | ||
| /** | ||
| * @description 弹出框的方位,有 12 个方位可供选择 | ||
| * @defaultValue top | ||
| */ | ||
| position?: 'top' | 'tl' | 'tr' | 'bottom' | 'bl' | 'br' | 'left' | 'lt' | 'lb' | 'right' | 'rt' | 'rb'; | ||
| /** | ||
| * @description 弹出框的背景颜色 | ||
| * @default - | ||
| */ | ||
| color?: string; | ||
| /** | ||
| * @description 迷你尺寸 | ||
| * @default false | ||
| */ | ||
| mini?: boolean; | ||
| } |
| import { FC } from 'react'; | ||
| declare const Demo1: FC; | ||
| export default Demo1; |
| import { FC } from 'react'; | ||
| declare const Demo1: FC; | ||
| export default Demo1; |
| import { FC } from 'react'; | ||
| declare const Demo3: FC; | ||
| export default Demo3; |
| import { CSSProperties } from 'react'; | ||
| import { MouseLocationType, TriggerProps } from './type'; | ||
| type ReturnType = { | ||
| style?: CSSProperties; | ||
| arrowStyle?: CSSProperties; | ||
| realPosition?: TriggerProps['position']; | ||
| }; | ||
| declare const _default: (props: TriggerProps, content: HTMLElement, child: HTMLElement, mountContainer: Element, mouseLocation: MouseLocationType) => ReturnType; | ||
| export default _default; |
| import React, { MouseEvent, PropsWithChildren } from 'react'; | ||
| import { CSSProperties, PureComponent, ReactNode } from 'react'; | ||
| import { globalConfigContext } from '../GlobalConfig/Index'; | ||
| import { getDOMPos } from '../utils/dom'; | ||
| import { MouseLocationType, TriggerProps } from './type'; | ||
| import './style/index.less'; | ||
| interface TriggerState { | ||
| popupVisible: boolean; | ||
| popupStyle: CSSProperties; | ||
| } | ||
| export type EventsByTriggerNeedType = 'onClick' | 'onMouseEnter' | 'onMouseLeave' | 'onMouseMove' | 'onFocus' | 'onBlur' | 'onContextMenu' | 'onKeyDown'; | ||
| declare class Trigger extends PureComponent<TriggerProps, TriggerState> { | ||
| static displayName: string; | ||
| context: React.ContextType<typeof globalConfigContext>; | ||
| popupOpen: boolean; | ||
| isDidMount: boolean; | ||
| unMount: boolean; | ||
| mouseLocation: MouseLocationType; | ||
| arrowStyle: CSSProperties; | ||
| childrenDom: any; | ||
| delayTimer: any; | ||
| hasPopupMouseDown: boolean; | ||
| popupContainer: any; | ||
| handleClickOutside: boolean; | ||
| realPosition: string; | ||
| mouseDownTimeout: any; | ||
| triggerRef: React.RefObject<HTMLElement>; | ||
| childrenDomSize: ReturnType<typeof getDOMPos>; | ||
| getMergedProps(baseProps?: any): PropsWithChildren<TriggerProps>; | ||
| constructor(props: TriggerProps); | ||
| static getDerivedStateFromProps(nextProps: any, prevState: any): { | ||
| popupVisible: any; | ||
| }; | ||
| componentDidMount(): void; | ||
| componentDidUpdate(_prevProps: Readonly<TriggerProps>): void; | ||
| onClickOutside: (e: any) => void; | ||
| getPopupStyle(): any; | ||
| showPopup: (callback?: () => void) => void; | ||
| update: { | ||
| (...args: any[]): void; | ||
| cancel(): void; | ||
| }; | ||
| getContainer: () => HTMLDivElement; | ||
| getTransformTranslate: () => "" | "scaleY(0.9) translateY(-4px)" | "scaleY(0.9) translateY(4px)"; | ||
| rafId: number; | ||
| appendToContainer(node: HTMLDivElement): void; | ||
| isPopupHoverHide: () => boolean; | ||
| isTrigger: (trigerName: TriggerProps['trigger']) => boolean; | ||
| isClickToHide: () => boolean; | ||
| /** | ||
| * 获取children,如果是string或number类型 | ||
| * 当 children 中的元素 disabled 时,不能正确触发 hover 等事件,所以当监测到对应 | ||
| * 组件有 disabled 时,给元素加一层 span,处理事件,模拟样式 | ||
| * @returns | ||
| */ | ||
| getChild: () => React.ReactNode; | ||
| triggerPropsEvent: (eventName: EventsByTriggerNeedType, e?: any) => void; | ||
| triggerOriginEvent: (event: EventsByTriggerNeedType, e?: any) => () => void; | ||
| clearDelayTimer(): void; | ||
| delayToDo: (cb: () => void, delay?: number) => void; | ||
| setPopupVisible(visible: boolean, delay?: number, cb?: () => void): void; | ||
| onMouseEnter: (e: any) => void; | ||
| onMouseLeave: (e: any) => void; | ||
| onPopupMouseEnter: () => void; | ||
| onPopupMouseLeave: (e: any) => void; | ||
| setMouseLocation: (e: MouseEvent) => void; | ||
| onClick: (e: any) => void; | ||
| onContextMenu: (e: any) => void; | ||
| onPopupMouseDown: () => void; | ||
| hideContextMenu: (e: any) => void; | ||
| render(): ReactNode; | ||
| } | ||
| export default Trigger; |
| import { PropsWithChildren } from 'react'; | ||
| interface PortalProps { | ||
| getContainer: () => HTMLElement; | ||
| } | ||
| declare const Portal: (props: PropsWithChildren<PortalProps>) => import("react").ReactPortal; | ||
| export default Portal; |
| import { CSSProperties, HTMLAttributes, ReactNode } from 'react'; | ||
| export interface TriggerProps { | ||
| className?: string | string[]; | ||
| /** | ||
| * @description 设置弹出框开启或关闭 | ||
| * @default - | ||
| */ | ||
| popupVisible?: boolean; | ||
| /** | ||
| * @description 默认弹出关闭还是开启 | ||
| * @default - | ||
| */ | ||
| defaultPopupVisible?: boolean; | ||
| /** | ||
| * @description 设置弹出内容所插入的父元素 | ||
| * @default - | ||
| */ | ||
| getPopupContainer?: (node: HTMLElement) => Element; | ||
| children?: ReactNode; | ||
| /** | ||
| * @description 动画类名 | ||
| * @defaultValue fadeId | ||
| */ | ||
| classNames?: string; | ||
| /** | ||
| * @description 动画过渡时间 | ||
| * @defaultValue 200 | ||
| */ | ||
| duration?: number | { | ||
| exit?: number; | ||
| enter?: number; | ||
| appear?: number; | ||
| }; | ||
| /** | ||
| * @description 隐藏后是否销毁 DOM 结构 | ||
| * @defaultValue true | ||
| */ | ||
| unmountOnExit?: boolean; | ||
| /** | ||
| * @description 弹出位置,一共有 12 个方位可供选择 | ||
| * @defaultValue bottom | ||
| */ | ||
| position?: 'top' | 'tl' | 'tr' | 'bottom' | 'bl' | 'br' | 'left' | 'lt' | 'lb' | 'right' | 'rt' | 'rb'; | ||
| /** | ||
| * @description 触发方式 | ||
| * @defaultValue hover | ||
| */ | ||
| trigger?: 'hover' | 'click' | 'focus' | 'contextMenu' | Array<'hover' | 'click' | 'focus' | 'contextMenu'>; | ||
| /** | ||
| * @description mouseenter 触发延时的毫秒数 | ||
| * @defaultValue 100 | ||
| */ | ||
| mouseEnterDelay?: number; | ||
| /** | ||
| * @description 是否在鼠标移出触发节点,移入弹出框时保留弹出框。 | ||
| * @defaultValue true | ||
| */ | ||
| popupHoverStay?: boolean; | ||
| /** | ||
| * @description 是否禁用 | ||
| * @defaultValue false | ||
| */ | ||
| disabled?: boolean; | ||
| /** | ||
| * @description 是否能通过点击触发节点来关闭弹出框 | ||
| * @defaultValue true | ||
| */ | ||
| clickToClose?: boolean; | ||
| /** | ||
| * @description 点击触发节点和弹出框以外的区域的回调。 | ||
| */ | ||
| onClickOutside?: () => void; | ||
| /** | ||
| * @description 是否在点击空白处(触发节点和弹出框以外的区域)时关闭弹出层。 关闭时会触发 `onVisibleChange`。 | ||
| * @defaultValue true | ||
| */ | ||
| clickOutsideToClose?: boolean; | ||
| /** | ||
| * @description 在该元素上执行 clickOutside,触发弹出框关闭 | ||
| * @defaultValue () => window.document | ||
| */ | ||
| getDocument?: () => Element; | ||
| /** | ||
| * @description mouseleave 触发延时的毫秒数 | ||
| * @defaultValue 100 | ||
| */ | ||
| mouseLeaveDelay?: number; | ||
| /** | ||
| * @description 弹出层跟随鼠标位置 | ||
| * @en The popup will align mouse position | ||
| */ | ||
| alignPoint?: boolean; | ||
| /** | ||
| * @description 弹出框(内部)的样式 | ||
| * @defaultValue - | ||
| */ | ||
| popupStyle?: CSSProperties; | ||
| /** | ||
| * @description 是否根据空间自动调整弹出框的位置 | ||
| * @defaultValue true | ||
| */ | ||
| autoFitPosition?: boolean; | ||
| /** | ||
| * @description 弹出框(外部)的样式 | ||
| * @defaultValue - | ||
| */ | ||
| style?: CSSProperties; | ||
| /** | ||
| * @description 弹出框的内容 | ||
| * @defaultValue - | ||
| */ | ||
| popup?: () => ReactNode; | ||
| /** | ||
| * @description | ||
| * 调整弹出框的位置,有四个属性值,`left`, `right`, `top`, `bottom`,分别表示向该方向移动几个像素。 | ||
| * 具体可查看 [示例](/react/components/trigger#设置弹窗位置偏移量) | ||
| * @defaultValue {} | ||
| */ | ||
| popupAlign?: { | ||
| left?: number | [number, number]; | ||
| right?: number | [number, number]; | ||
| top?: number | [number, number]; | ||
| bottom?: number | [number, number]; | ||
| }; | ||
| /** | ||
| * @description 显示或隐藏时触发的回调 | ||
| * @defaultValue - | ||
| */ | ||
| onVisibleChange?: (visible: boolean) => void; | ||
| /** | ||
| * @description 是否展示箭头元素 | ||
| * @defaultValue false | ||
| */ | ||
| showArrow?: boolean; | ||
| childrenPrefix?: string; | ||
| /** | ||
| * @description 箭头元素的所有 html 参数 | ||
| * @defaultValue - | ||
| */ | ||
| arrowProps?: HTMLAttributes<HTMLDivElement>; | ||
| } | ||
| export type MouseLocationType = { | ||
| clientX: number; | ||
| clientY: number; | ||
| }; |
| export declare function sliceArr<T>(arr: T[], len: number): T[][]; |
| export type Rect = { | ||
| width: number; | ||
| height: number; | ||
| top: number; | ||
| left: number; | ||
| bottom: number; | ||
| right: number; | ||
| pageTop: number; | ||
| pageLeft: number; | ||
| center: { | ||
| x: number; | ||
| y: number; | ||
| }; | ||
| }; | ||
| export declare const on: (element: any, event: string, handler: EventListener | EventListenerObject | Function, options?: boolean | AddEventListenerOptions) => void; | ||
| export declare const off: (element: any, event: string, handler: EventListener | EventListenerObject | Function, options?: boolean | AddEventListenerOptions) => void; | ||
| export declare function getDOMPos(dom: HTMLElement): Partial<Rect>; | ||
| export declare function contains(parent: Element, child: Element): boolean; |
| import { ChangeEventHandler, CompositionEventHandler, KeyboardEventHandler } from 'react'; | ||
| import { InputProps } from '../../Input/type'; | ||
| export default function useComposition({ value, maxLength, onChange, onKeyDown, onPressEnter, beforeTriggerValueChangeCallback, }: { | ||
| value: string; | ||
| maxLength: number; | ||
| onChange: InputProps['onChange']; | ||
| onKeyDown: InputProps['onKeyDown']; | ||
| onPressEnter: InputProps['onPressEnter']; | ||
| beforeTriggerValueChangeCallback?: (value: string) => boolean; | ||
| }): { | ||
| compositionValue: string; | ||
| triggerValueChangeCallback: typeof onChange; | ||
| compositionHandler: CompositionEventHandler<HTMLInputElement | HTMLTextAreaElement>; | ||
| valueChangeHandler: ChangeEventHandler<HTMLInputElement | HTMLTextAreaElement>; | ||
| keyDownHandler: KeyboardEventHandler<HTMLInputElement | HTMLTextAreaElement>; | ||
| }; |
| declare const _default: {}; | ||
| export default _default; |
| export declare function isFunction(obj: any): obj is (...args: any[]) => any; |
| export declare const Enter: { | ||
| key: string; | ||
| code: number; | ||
| }; | ||
| export declare const Esc: { | ||
| key: string; | ||
| code: number; | ||
| }; | ||
| export declare const Backspace: { | ||
| key: string; | ||
| code: number; | ||
| }; | ||
| export declare const Tab: { | ||
| key: string; | ||
| code: number; | ||
| }; | ||
| export declare const Space: { | ||
| key: string; | ||
| code: number; | ||
| }; | ||
| export declare const ArrowUp: { | ||
| key: string; | ||
| code: number; | ||
| }; | ||
| export declare const ArrowDown: { | ||
| key: string; | ||
| code: number; | ||
| }; | ||
| export declare const ArrowLeft: { | ||
| key: string; | ||
| code: number; | ||
| }; | ||
| export declare const ArrowRight: { | ||
| key: string; | ||
| code: number; | ||
| }; |
| export default function mergeProps<P>(componentProps: P, defaultProps: Partial<P>, globalComponentProps?: Partial<P>): P; |
| export default function (cb: (...args: any[]) => void): { | ||
| (...args: any[]): void; | ||
| cancel(): void; | ||
| }; |
| import React, { ForwardRefExoticComponent } from 'react'; | ||
| export interface ResizeProps { | ||
| onResize?: (entry: ResizeObserverEntry[]) => void; | ||
| children?: React.ReactNode | ForwardRefExoticComponent<any>; | ||
| } | ||
| declare const _default: React.ForwardRefExoticComponent<ResizeProps & React.RefAttributes<unknown>>; | ||
| export default _default; |
| import React from 'react'; | ||
| import { BackTopProps } from './type'; | ||
| import './style/index.less'; | ||
| declare const _default: React.MemoExoticComponent<React.ForwardRefExoticComponent<BackTopProps & { | ||
| children?: React.ReactNode; | ||
| } & React.RefAttributes<unknown>>>; | ||
| export default _default; |
| /// <reference types="react" /> | ||
| import './style.less'; | ||
| declare const Demo1: () => JSX.Element; | ||
| export default Demo1; |
| import BackTop from './backtop'; | ||
| export default BackTop; |
| /// <reference types="react" /> | ||
| export interface BackTopProps { | ||
| style?: React.CSSProperties; | ||
| className?: string; | ||
| /** | ||
| * @description 当滚动到这个高度时,显示返回顶部按钮。 | ||
| * @defaultValue 400 | ||
| */ | ||
| visibleHeight?: number; | ||
| /** | ||
| * @description 设置需要监听其滚动事件的元素,值为一个返回对应 `DOM` 元素的函数。 | ||
| * @defaultValue () => window | ||
| */ | ||
| target?: () => HTMLElement | Window; | ||
| /** | ||
| * @description 点击返回顶部时的回调函数。 | ||
| */ | ||
| onClick?: () => void; | ||
| /** | ||
| * @description 滚动到顶部的缓动方式类型 | ||
| * @defaultValue easeInOut | ||
| */ | ||
| easing?: string; | ||
| /** | ||
| * @description 滚动到顶部的时间。 | ||
| * @defaultValue 400 | ||
| */ | ||
| duration?: number; | ||
| } |
| /// <reference types="react" /> | ||
| import { CalendarProps } from './type'; | ||
| import './style/index.less'; | ||
| declare const Calendar: (props: CalendarProps) => JSX.Element; | ||
| export default Calendar; |
| import Calendar from './calendar'; | ||
| export default Calendar; |
| export interface CalendarProps { | ||
| } |
| import { Dayjs } from 'dayjs'; | ||
| export declare function generateMonthData(day: Dayjs): { | ||
| day: Dayjs; | ||
| isCurrentMonth: boolean; | ||
| }[]; |
| /// <reference types="react" /> | ||
| declare const Demo1: () => JSX.Element; | ||
| export default Demo1; |
| /// <reference types="react" /> | ||
| declare const Demo1: () => JSX.Element; | ||
| export default Demo1; |
| /// <reference types="react" /> | ||
| import './index.less'; | ||
| import { DividerProps } from './type'; | ||
| declare const Divider: (props: DividerProps) => JSX.Element; | ||
| export default Divider; |
| import React from 'react'; | ||
| export interface DividerProps { | ||
| /** | ||
| * @description: 分割线文字的位置 | ||
| * @default: center | ||
| * @type: 'left' | 'right' | 'center' | ||
| */ | ||
| position?: 'left' | 'right' | 'center'; | ||
| /** | ||
| * @description: 分割线文字 | ||
| * @default: '' | ||
| * @type: string | React.ReactNode; | ||
| */ | ||
| children?: string | React.ReactNode; | ||
| /** | ||
| * @description: 分割线类型 | ||
| * @default: horizontal | ||
| * @type: 'horizontal' | 'vertical' | ||
| */ | ||
| type?: 'horizontal' | 'vertical'; | ||
| style?: React.CSSProperties; | ||
| className?: string; | ||
| } |
| /// <reference types="react" /> | ||
| declare const Demo1: () => JSX.Element; | ||
| export default Demo1; |
| /// <reference types="react" /> | ||
| declare const Demo2: () => JSX.Element; | ||
| export default Demo2; |
| /// <reference types="react" /> | ||
| import { DropdownProps } from './type'; | ||
| import './style/index.less'; | ||
| declare const Dropdown: (baseProps: DropdownProps) => JSX.Element; | ||
| export default Dropdown; |
| import Dropdown from './dropdown'; | ||
| export default Dropdown; |
| /// <reference types="react" /> | ||
| import { TriggerProps } from '../Trigger/type'; | ||
| export interface DropdownProps extends TriggerProps { | ||
| children?: React.ReactNode; | ||
| /** | ||
| * @description 下拉框的内容 | ||
| */ | ||
| droplist?: React.ReactNode; | ||
| } |
| /// <reference types="react" /> | ||
| declare const Demo1: () => JSX.Element; | ||
| export default Demo1; |
| import React from 'react'; | ||
| import { FormProps } from './type'; | ||
| import './style/index.less'; | ||
| declare const FormComponent: React.ForwardRefExoticComponent<FormProps & React.RefAttributes<unknown>>; | ||
| export default FormComponent; |
| /// <reference types="react" /> | ||
| import { FormStore } from './formStore'; | ||
| export declare const formContext: import("react").Context<FormStore>; |
| /// <reference types="react" /> | ||
| import { FormItemProps } from './type'; | ||
| declare const FormItem: (baseProps: FormItemProps) => JSX.Element; | ||
| export default FormItem; |
| import { FormFields, FieldType, UFieldType } from './type'; | ||
| export declare class FormStore { | ||
| formFields: FormFields; | ||
| penddingQueue: (() => void)[]; | ||
| isSchedule: boolean; | ||
| onChange: { | ||
| [key: string]: () => void; | ||
| }; | ||
| defaultFormValue: FormFields; | ||
| hooks: { | ||
| onUpdated: ((fields: Record<string, any>) => void)[]; | ||
| }; | ||
| id: number; | ||
| constructor(defaultFormValue: {}, { onUpdated }: { | ||
| onUpdated: any; | ||
| }); | ||
| formatField(name: string, field: UFieldType): FieldType; | ||
| registerField(name: string, field: UFieldType, onChange: () => void): void; | ||
| unRegisterField(name: string): void; | ||
| clearFields(): void; | ||
| resetFields(): void; | ||
| setFields(object: FormFields): void; | ||
| setField(name: any, value: UFieldType | FieldType, batch_Update?: boolean): void; | ||
| setFieldsValue(object: FormFields): void; | ||
| setFieldValue(name: string, value: any, status?: 'pending' | 'success' | 'error', batch_Update?: boolean): void; | ||
| update(name: any, batch_Update: any): void; | ||
| getFieldsValue(): {}; | ||
| getFields(): FormFields; | ||
| getField(name: string): FieldType; | ||
| getFieldValue(name: string): any; | ||
| batchUpdate(name: any): void; | ||
| validateFieldValue(name: any, batch_Update?: boolean): boolean; | ||
| validateFields(): boolean; | ||
| submit(): Promise<unknown>; | ||
| } |
| import Form from './form'; | ||
| export default Form; |
| /// <reference types="react" /> | ||
| export type STATUS = 'pending' | 'success' | 'error'; | ||
| export interface FormFields { | ||
| [key: string]: FieldType; | ||
| } | ||
| export type FieldType = UFieldType & { | ||
| status?: STATUS; | ||
| message?: string; | ||
| }; | ||
| export interface Rule { | ||
| validator: RegExp | ((value: any) => boolean); | ||
| message: string; | ||
| } | ||
| export interface UFieldType { | ||
| value: any; | ||
| rules?: Rule[]; | ||
| required?: boolean; | ||
| type: 'default' | 'form'; | ||
| } | ||
| export interface FormProps { | ||
| style?: React.CSSProperties; | ||
| className?: string; | ||
| initialValues?: { | ||
| [key: string]: any; | ||
| }; | ||
| children: React.ReactElement | React.ReactElement[]; | ||
| onUpdated?: (values: { | ||
| [key: string]: any; | ||
| }) => void; | ||
| onReset?: () => void; | ||
| onClear?: () => void; | ||
| } | ||
| export interface FormItemProps { | ||
| style?: React.CSSProperties; | ||
| className?: string; | ||
| name: string; | ||
| label: string; | ||
| required?: boolean; | ||
| rules?: Rule[]; | ||
| trigger?: 'onChange' | 'onBlur'; | ||
| children: React.ReactElement; | ||
| validateTrigger?: 'onChange' | 'onBlur'; | ||
| } |
| import { FormStore } from './formStore'; | ||
| export default function useFormStore(initialValues: Record<string, any>, { onUpdated }: { | ||
| onUpdated: any; | ||
| }): FormStore[]; |
| import { FormStore } from './formStore'; | ||
| import { Rule } from './type'; | ||
| export default function useRegister(formStore: FormStore, name: string, rules: Rule[], required: boolean): void; |
| /// <reference types="react" /> | ||
| declare const Demo1: () => JSX.Element; | ||
| export default Demo1; |
| /// <reference types="react" /> | ||
| declare const Demo1: () => JSX.Element; | ||
| export default Demo1; |
| /// <reference types="react" /> | ||
| declare const Demo3: () => JSX.Element; | ||
| export default Demo3; |
| /// <reference types="react" /> | ||
| declare const Demo4: () => JSX.Element; | ||
| export default Demo4; |
| /// <reference types="react" /> | ||
| declare const Demo5: () => JSX.Element; | ||
| export default Demo5; |
| /// <reference types="react" /> | ||
| declare const Demo6: () => JSX.Element; | ||
| export default Demo6; |
| import Input from './input'; | ||
| export default Input; |
| import React from 'react'; | ||
| import { InputComponentProps, RefInputType } from './type'; | ||
| declare const InputComponent: React.ForwardRefExoticComponent<InputComponentProps & React.RefAttributes<RefInputType>>; | ||
| export default InputComponent; |
| import React, { ForwardRefExoticComponent } from 'react'; | ||
| import { InputProps, RefInputType } from './type'; | ||
| import './style/index.less'; | ||
| import Password from './password'; | ||
| type InputType = ForwardRefExoticComponent<InputProps & React.RefAttributes<RefInputType>> & { | ||
| Password: typeof Password; | ||
| }; | ||
| declare const InputElement: InputType; | ||
| export default InputElement; |
| import React from 'react'; | ||
| import { InputPasswordProps, RefInputType } from './type'; | ||
| declare const Password: React.ForwardRefExoticComponent<InputPasswordProps & React.RefAttributes<RefInputType>>; | ||
| export default Password; |
| import { CSSProperties, InputHTMLAttributes, ReactNode } from 'react'; | ||
| export interface InputProps extends Omit<InputHTMLAttributes<HTMLInputElement>, 'onChange' | 'prefix' | 'className' | 'size' | 'height' | 'maxLength'> { | ||
| style?: CSSProperties; | ||
| className?: string; | ||
| /** | ||
| * @description 默认值 | ||
| * @defaultValue '' | ||
| */ | ||
| defaultValue?: string; | ||
| /** | ||
| * @description 提示文本 | ||
| * @defaultValue '' | ||
| */ | ||
| placeholder?: string; | ||
| /** | ||
| * @description 输入回调 | ||
| * @defaultValue () => {} | ||
| */ | ||
| onChange?: (value: string, e: any) => void; | ||
| /** | ||
| * @description 输入框的值,受控模式 | ||
| * @defaultValue '' | ||
| */ | ||
| value?: string; | ||
| /** | ||
| * @description 输入框前添加元素 | ||
| * @defaultValue '' | ||
| */ | ||
| addBefore?: ReactNode; | ||
| /** | ||
| * @description 输入框后添加元素 | ||
| * @defaultValue '' | ||
| */ | ||
| addAfter?: ReactNode; | ||
| /** | ||
| * @description 添加前缀文字或者图标 | ||
| * @defaultValue '' | ||
| */ | ||
| prefix?: ReactNode; | ||
| /** | ||
| * @description 添加后缀文字或者图标 | ||
| * @defaultValue '' | ||
| */ | ||
| suffix?: ReactNode; | ||
| /** | ||
| * @description 按下回车键的回调 | ||
| * @defaultValue () => {} | ||
| */ | ||
| onPressEnter?: (e: any) => void; | ||
| /** | ||
| * @description 输入框最大输入的长度 | ||
| * @defaultValue | ||
| */ | ||
| maxLength?: number | { | ||
| length: number; | ||
| errorOnly?: boolean; | ||
| }; | ||
| /** | ||
| * @description 是否禁用 | ||
| * @defaultValue false | ||
| */ | ||
| disabled?: boolean; | ||
| /** | ||
| * @description 输入框的尺寸 | ||
| * @defaultValue 'default' | ||
| */ | ||
| size?: 'mini' | 'small' | 'default' | 'large'; | ||
| /** | ||
| * @description 配合 `maxLength`,显示字数统计 | ||
| * @defaultValue false | ||
| */ | ||
| showWordLimit?: boolean; | ||
| } | ||
| export interface InputComponentProps extends InputProps { | ||
| prefixCls?: string; | ||
| hasParent?: boolean; | ||
| autoFitWidth?: boolean | { | ||
| delay: number | ((width: number, prevWidth: number) => number); | ||
| }; | ||
| } | ||
| export type RefInputType = { | ||
| /** 使输入框失去焦点 */ | ||
| blur: () => void; | ||
| /** 使输入框获取焦点 */ | ||
| focus: () => void; | ||
| /** input dom元素 */ | ||
| dom: HTMLInputElement; | ||
| }; | ||
| export interface InputPasswordProps extends InputProps { | ||
| /** | ||
| * @description 是否显示切换密码可见状态的按钮 | ||
| * @defaultValue false | ||
| */ | ||
| visibilityToggle?: boolean; | ||
| /** | ||
| * @description 初始是否显示 | ||
| * @defaultValue false | ||
| */ | ||
| defaultVisibility?: boolean; | ||
| /** | ||
| * @description 是否显示 | ||
| * @defaultValue false | ||
| */ | ||
| visibility?: boolean; | ||
| /** | ||
| * @description visibility 改变时触发 | ||
| * @defaultValue () => {} | ||
| */ | ||
| onVisibilityChange?: (visibility: boolean) => void; | ||
| } |
| /// <reference types="react" /> | ||
| import { MenuProps } from './type'; | ||
| type MenuContextProps = Pick<MenuProps, 'mode' | 'theme' | 'selectedKeys' | 'openKeys' | 'collapse' | 'inDropdown' | 'triggerProps'> & { | ||
| id?: string; | ||
| prefixCls?: string; | ||
| onClickMenuItem?: (key: string, event: any) => void; | ||
| onClickSubMenu?: (key: string, level: number, type: 'pop' | 'inline') => void; | ||
| collectInlineMenuKeys?: (key: string, unmount?: boolean) => void; | ||
| }; | ||
| declare const MenuContext: import("react").Context<MenuContextProps>; | ||
| export default MenuContext; |
| /// <reference types="react" /> | ||
| import './demo1.less'; | ||
| declare const Demo1: () => JSX.Element; | ||
| export default Demo1; |
| /// <reference types="react" /> | ||
| import './demo1.less'; | ||
| declare const Demo2: () => JSX.Element; | ||
| export default Demo2; |
| /// <reference types="react" /> | ||
| import './demo1.less'; | ||
| declare const Demo3: () => JSX.Element; | ||
| export default Demo3; |
| import Menu from './menu'; | ||
| export default Menu; |
| /// <reference types="react" /> | ||
| import { MenuItemProps } from './type'; | ||
| declare const Item: { | ||
| (props: MenuItemProps): JSX.Element; | ||
| menuType: string; | ||
| }; | ||
| export default Item; |
| import React from 'react'; | ||
| import { MenuProps } from './type'; | ||
| import './style/index.less'; | ||
| declare const Menu: { | ||
| (baseProps: MenuProps): JSX.Element; | ||
| Item: { | ||
| (props: import("./type").MenuItemProps): JSX.Element; | ||
| menuType: string; | ||
| }; | ||
| SubMenu: React.ForwardRefExoticComponent<import("./type").MenuSubMenuProps & React.RefAttributes<unknown>>; | ||
| defaultProps: { | ||
| isMenu: boolean; | ||
| }; | ||
| }; | ||
| export default Menu; |
| import React from 'react'; | ||
| import { MenuSubMenuProps } from '../type'; | ||
| declare const SubMenuComponent: React.ForwardRefExoticComponent<MenuSubMenuProps & React.RefAttributes<unknown>>; | ||
| export default SubMenuComponent; |
| /// <reference types="react" /> | ||
| import { MenuSubMenuProps } from '../type'; | ||
| declare const SubMenuInline: (props: MenuSubMenuProps & { | ||
| forwardedRef; | ||
| }) => JSX.Element; | ||
| export default SubMenuInline; |
| /// <reference types="react" /> | ||
| import { MenuSubMenuProps } from '../type'; | ||
| declare const SubMenuPop: (props: MenuSubMenuProps & { | ||
| forwardedRef; | ||
| }) => JSX.Element; | ||
| export default SubMenuPop; |
| import { HTMLAttributes, ReactNode } from 'react'; | ||
| import { TriggerProps } from '../Trigger/type'; | ||
| export interface MenuProps extends Omit<HTMLAttributes<HTMLDivElement>, 'className'> { | ||
| children?: React.ReactNode; | ||
| className?: string; | ||
| prefixCls?: string; | ||
| style?: React.CSSProperties; | ||
| inDropdown?: boolean; | ||
| /** | ||
| * @description 菜单风格 | ||
| * @defaultValue light | ||
| */ | ||
| theme?: 'light' | 'dark'; | ||
| /** | ||
| * @description 菜单类型,目前支持垂直(vertical)、水平菜单(horizontal)、弹出(pop) | ||
| * @defaultValue vertical | ||
| */ | ||
| mode?: 'vertical' | 'horizontal' | 'pop' | 'popButton'; | ||
| /** | ||
| * @description 初始选中的菜单项 key 数组 | ||
| * @defaultValue [] | ||
| */ | ||
| defaultSelectedKeys?: string[]; | ||
| /** | ||
| * @description 选中的菜单项 key 数组(受控模式) | ||
| * @defaultValue [] | ||
| */ | ||
| selectedKeys?: string[]; | ||
| /** | ||
| * @description 菜单选项是否可选 | ||
| * @defaultValue true | ||
| */ | ||
| selectable?: boolean; | ||
| /** | ||
| * @description 展开的子菜单 key 数组(受控模式) | ||
| */ | ||
| openKeys?: string[]; | ||
| /** | ||
| * @description 初始展开的子菜单 key 数组 | ||
| */ | ||
| defaultOpenKeys?: string[]; | ||
| /** | ||
| * @description 开启手风琴效果 | ||
| * @defaultValue false | ||
| */ | ||
| accordion?: boolean; | ||
| /** | ||
| * @description 点击子菜单标题的回调 | ||
| */ | ||
| onClickSubMenu?: (key: string, openKeys: string[], keyPath: string[]) => void; | ||
| /** | ||
| * @description 点击菜单项的回调 | ||
| */ | ||
| onClickMenuItem?: (key: string, event: any, keyPath: string[]) => any; | ||
| /** | ||
| * @description 是否水平折叠收起菜单 | ||
| * @default false | ||
| */ | ||
| collapse?: boolean; | ||
| /** | ||
| * @description 弹出模式下可接受所有 `Trigger` 的 `Props` | ||
| */ | ||
| triggerProps?: Partial<TriggerProps>; | ||
| } | ||
| export interface MenuSubMenuProps { | ||
| level?: number; | ||
| children?: React.ReactNode; | ||
| className?: string; | ||
| style?: React.CSSProperties; | ||
| key: string; | ||
| _key?: string; | ||
| /** | ||
| * @description 子菜单的标题 | ||
| */ | ||
| title: string | ReactNode; | ||
| /** | ||
| * @description 子菜单的图标 | ||
| */ | ||
| icon?: ReactNode; | ||
| /** | ||
| * @description 弹出模式下可接受所有 `Trigger` 的 `Props` | ||
| */ | ||
| triggerProps?: Partial<TriggerProps>; | ||
| } | ||
| export interface MenuItemProps extends Omit<HTMLAttributes<HTMLElement>, 'className'> { | ||
| children?: React.ReactNode; | ||
| className?: string; | ||
| style?: React.CSSProperties; | ||
| key: string; | ||
| _key?: string; | ||
| onClick?: (e: any) => void; | ||
| wrapper?: string | React.FC<any> | React.ComponentClass<any>; | ||
| /** | ||
| * @description 菜单项禁止选中 | ||
| * @defaultValue false | ||
| */ | ||
| disabled?: boolean; | ||
| } |
| import React from 'react'; | ||
| export declare const processChilren: (children: React.ReactNode, props: any) => any; | ||
| export declare function isChildrenSelected(children: any, keys: string[]): boolean; |
| import React, { PropsWithChildren } from 'react'; | ||
| import { RadioGroupContextProps, RadioGroupProps } from './type'; | ||
| export declare const RadioGroupContext: React.Context<RadioGroupContextProps>; | ||
| declare function Group(baseProps: PropsWithChildren<RadioGroupProps>): JSX.Element; | ||
| declare namespace Group { | ||
| var displayName: string; | ||
| } | ||
| export default Group; |
| import Radio from './radio'; | ||
| export default Radio; |
| import React from 'react'; | ||
| import { RadioProps } from './type'; | ||
| import './style/index.less'; | ||
| import Group from './group'; | ||
| declare const Radio: { | ||
| (baseProps: RadioProps): JSX.Element; | ||
| displayName: string; | ||
| GroupContext: React.Context<import("./type").RadioGroupContextProps>; | ||
| Group: typeof Group; | ||
| }; | ||
| export default Radio; |
| import { ChangeEvent, HTMLAttributes, ReactNode } from 'react'; | ||
| export interface RadioProps<T = any> extends Omit<HTMLAttributes<HTMLLabelElement>, 'children' | 'className' | 'onChange'> { | ||
| style?: React.CSSProperties; | ||
| className?: string; | ||
| /** | ||
| * @description 是否禁用 | ||
| * @default false | ||
| */ | ||
| disabled?: boolean; | ||
| /** | ||
| * @description 控件的value值 | ||
| * @default - | ||
| */ | ||
| value?: T; | ||
| /** | ||
| * @description 是否选中 | ||
| * @default false | ||
| */ | ||
| checked?: boolean; | ||
| /** | ||
| * @description 初始是否选中 | ||
| * @default false | ||
| */ | ||
| defaultChecked?: boolean; | ||
| /** | ||
| * @description 选中状态发生变化时的回调函数 | ||
| * @default - | ||
| */ | ||
| onChange?: (checked: boolean, event: ChangeEvent) => void; | ||
| children?: ReactNode | ((value: { | ||
| checked: boolean; | ||
| }) => ReactNode); | ||
| } | ||
| export interface RadioGroupProps { | ||
| style?: React.CSSProperties; | ||
| className?: string; | ||
| disabled?: boolean; | ||
| /** | ||
| * @description `Radio` 的 name | ||
| * @default - | ||
| */ | ||
| name?: string; | ||
| /** | ||
| * @description `Radio` 的 类型 | ||
| * @default 'radio' | ||
| */ | ||
| type?: 'radio' | 'button'; | ||
| onChange?: (value: any, event: ChangeEvent) => void; | ||
| /** | ||
| * @description 默认选中的值 | ||
| * @default - | ||
| */ | ||
| defaultValue?: any; | ||
| /** | ||
| * @description 选中的值(受控) | ||
| * @default - | ||
| */ | ||
| value?: any; | ||
| } | ||
| export interface RadioGroupContextProps { | ||
| type: 'radio' | 'button'; | ||
| value?: any; | ||
| disabled?: boolean; | ||
| name?: string; | ||
| onChangeValue?: (value: any, event: ChangeEvent) => void; | ||
| group?: boolean; | ||
| } |
| import Rate from './rate'; | ||
| export default Rate; |
| /// <reference types="react" /> | ||
| import { RateProps } from './type'; | ||
| import './style/index.less'; | ||
| declare const Rate: (baseProps: RateProps) => JSX.Element; | ||
| export default Rate; |
| import React, { CSSProperties, ReactNode } from 'react'; | ||
| export interface RateProps { | ||
| style?: CSSProperties; | ||
| className?: string | string[]; | ||
| /** | ||
| * @description 默认值 | ||
| * @default 0 | ||
| */ | ||
| defaultValue?: number; | ||
| /** | ||
| * @description 自定义字符 | ||
| * @default starIcon | ||
| */ | ||
| character?: React.ReactNode | ((index: number) => ReactNode); | ||
| /** | ||
| * @description 星的总数 | ||
| * @default 5 | ||
| */ | ||
| count?: number; | ||
| /** | ||
| * @description 选中的星的个数(受控) | ||
| * @default 5 | ||
| */ | ||
| value?: number; | ||
| /** | ||
| * @description 是否允许半选 | ||
| * @default false | ||
| */ | ||
| allowHalf?: boolean; | ||
| /** | ||
| * @description 是否允许清除 | ||
| * @default false | ||
| */ | ||
| allowClear?: boolean; | ||
| /** | ||
| * @description 是否只读,无法进行交互 | ||
| * @default false | ||
| */ | ||
| readOnly?: boolean; | ||
| /** | ||
| * @description 是否禁用 | ||
| * @default false | ||
| */ | ||
| disabled?: boolean; | ||
| /** | ||
| * @description 选中时的回调 | ||
| * @default - | ||
| */ | ||
| onChange?: (value: number) => void; | ||
| /** | ||
| * @description 鼠标移入时的回调 | ||
| * @default - | ||
| */ | ||
| onHoverChange?: (value: number) => void; | ||
| } |
| /// <reference types="react" /> | ||
| export default function Demo1(): JSX.Element; |
| /// <reference types="react" /> | ||
| declare const Demo2: () => JSX.Element; | ||
| export default Demo2; |
| /// <reference types="react" /> | ||
| import { TooltipProps } from './type'; | ||
| import './style/index.less'; | ||
| declare const Tooltip: (props: TooltipProps) => JSX.Element; | ||
| export default Tooltip; |
| import { CSSProperties } from 'react'; | ||
| import { TriggerProps } from '../Trigger/type'; | ||
| export interface TooltipProps { | ||
| style?: CSSProperties; | ||
| className?: string | string[]; | ||
| /** | ||
| * @description 触发方式 | ||
| * @default hover | ||
| */ | ||
| trigger?: TriggerProps['trigger']; | ||
| children: React.ReactNode; | ||
| /** | ||
| * @description 提示内容 | ||
| * @default '' | ||
| */ | ||
| content: React.ReactNode; | ||
| /** | ||
| * @description 弹出框挂载的节点 | ||
| * @default document.body | ||
| */ | ||
| getPopupContainer?: (node: HTMLElement) => Element; | ||
| /** | ||
| * @description 弹出框的方位,有 12 个方位可供选择 | ||
| * @defaultValue top | ||
| */ | ||
| position?: 'top' | 'tl' | 'tr' | 'bottom' | 'bl' | 'br' | 'left' | 'lt' | 'lb' | 'right' | 'rt' | 'rb'; | ||
| /** | ||
| * @description 弹出框的背景颜色 | ||
| * @default - | ||
| */ | ||
| color?: string; | ||
| /** | ||
| * @description 迷你尺寸 | ||
| * @default false | ||
| */ | ||
| mini?: boolean; | ||
| } |
| import { FC } from 'react'; | ||
| declare const Demo1: FC; | ||
| export default Demo1; |
| import { FC } from 'react'; | ||
| declare const Demo1: FC; | ||
| export default Demo1; |
| import { FC } from 'react'; | ||
| declare const Demo3: FC; | ||
| export default Demo3; |
| import { CSSProperties } from 'react'; | ||
| import { MouseLocationType, TriggerProps } from './type'; | ||
| type ReturnType = { | ||
| style?: CSSProperties; | ||
| arrowStyle?: CSSProperties; | ||
| realPosition?: TriggerProps['position']; | ||
| }; | ||
| declare const _default: (props: TriggerProps, content: HTMLElement, child: HTMLElement, mountContainer: Element, mouseLocation: MouseLocationType) => ReturnType; | ||
| export default _default; |
| import React, { MouseEvent, PropsWithChildren } from 'react'; | ||
| import { CSSProperties, PureComponent, ReactNode } from 'react'; | ||
| import { globalConfigContext } from '../GlobalConfig/Index'; | ||
| import { getDOMPos } from '../utils/dom'; | ||
| import { MouseLocationType, TriggerProps } from './type'; | ||
| import './style/index.less'; | ||
| interface TriggerState { | ||
| popupVisible: boolean; | ||
| popupStyle: CSSProperties; | ||
| } | ||
| export type EventsByTriggerNeedType = 'onClick' | 'onMouseEnter' | 'onMouseLeave' | 'onMouseMove' | 'onFocus' | 'onBlur' | 'onContextMenu' | 'onKeyDown'; | ||
| declare class Trigger extends PureComponent<TriggerProps, TriggerState> { | ||
| static displayName: string; | ||
| context: React.ContextType<typeof globalConfigContext>; | ||
| popupOpen: boolean; | ||
| isDidMount: boolean; | ||
| unMount: boolean; | ||
| mouseLocation: MouseLocationType; | ||
| arrowStyle: CSSProperties; | ||
| childrenDom: any; | ||
| delayTimer: any; | ||
| hasPopupMouseDown: boolean; | ||
| popupContainer: any; | ||
| handleClickOutside: boolean; | ||
| realPosition: string; | ||
| mouseDownTimeout: any; | ||
| triggerRef: React.RefObject<HTMLElement>; | ||
| childrenDomSize: ReturnType<typeof getDOMPos>; | ||
| getMergedProps(baseProps?: any): PropsWithChildren<TriggerProps>; | ||
| constructor(props: TriggerProps); | ||
| static getDerivedStateFromProps(nextProps: any, prevState: any): { | ||
| popupVisible: any; | ||
| }; | ||
| componentDidMount(): void; | ||
| componentDidUpdate(_prevProps: Readonly<TriggerProps>): void; | ||
| onClickOutside: (e: any) => void; | ||
| getPopupStyle(): any; | ||
| showPopup: (callback?: () => void) => void; | ||
| update: { | ||
| (...args: any[]): void; | ||
| cancel(): void; | ||
| }; | ||
| getContainer: () => HTMLDivElement; | ||
| getTransformTranslate: () => "" | "scaleY(0.9) translateY(-4px)" | "scaleY(0.9) translateY(4px)"; | ||
| rafId: number; | ||
| appendToContainer(node: HTMLDivElement): void; | ||
| isPopupHoverHide: () => boolean; | ||
| isTrigger: (trigerName: TriggerProps['trigger']) => boolean; | ||
| isClickToHide: () => boolean; | ||
| /** | ||
| * 获取children,如果是string或number类型 | ||
| * 当 children 中的元素 disabled 时,不能正确触发 hover 等事件,所以当监测到对应 | ||
| * 组件有 disabled 时,给元素加一层 span,处理事件,模拟样式 | ||
| * @returns | ||
| */ | ||
| getChild: () => React.ReactNode; | ||
| triggerPropsEvent: (eventName: EventsByTriggerNeedType, e?: any) => void; | ||
| triggerOriginEvent: (event: EventsByTriggerNeedType, e?: any) => () => void; | ||
| clearDelayTimer(): void; | ||
| delayToDo: (cb: () => void, delay?: number) => void; | ||
| setPopupVisible(visible: boolean, delay?: number, cb?: () => void): void; | ||
| onMouseEnter: (e: any) => void; | ||
| onMouseLeave: (e: any) => void; | ||
| onPopupMouseEnter: () => void; | ||
| onPopupMouseLeave: (e: any) => void; | ||
| setMouseLocation: (e: MouseEvent) => void; | ||
| onClick: (e: any) => void; | ||
| onContextMenu: (e: any) => void; | ||
| onPopupMouseDown: () => void; | ||
| hideContextMenu: (e: any) => void; | ||
| render(): ReactNode; | ||
| } | ||
| export default Trigger; |
| import { PropsWithChildren } from 'react'; | ||
| interface PortalProps { | ||
| getContainer: () => HTMLElement; | ||
| } | ||
| declare const Portal: (props: PropsWithChildren<PortalProps>) => import("react").ReactPortal; | ||
| export default Portal; |
| import { CSSProperties, HTMLAttributes, ReactNode } from 'react'; | ||
| export interface TriggerProps { | ||
| className?: string | string[]; | ||
| /** | ||
| * @description 设置弹出框开启或关闭 | ||
| * @default - | ||
| */ | ||
| popupVisible?: boolean; | ||
| /** | ||
| * @description 默认弹出关闭还是开启 | ||
| * @default - | ||
| */ | ||
| defaultPopupVisible?: boolean; | ||
| /** | ||
| * @description 设置弹出内容所插入的父元素 | ||
| * @default - | ||
| */ | ||
| getPopupContainer?: (node: HTMLElement) => Element; | ||
| children?: ReactNode; | ||
| /** | ||
| * @description 动画类名 | ||
| * @defaultValue fadeId | ||
| */ | ||
| classNames?: string; | ||
| /** | ||
| * @description 动画过渡时间 | ||
| * @defaultValue 200 | ||
| */ | ||
| duration?: number | { | ||
| exit?: number; | ||
| enter?: number; | ||
| appear?: number; | ||
| }; | ||
| /** | ||
| * @description 隐藏后是否销毁 DOM 结构 | ||
| * @defaultValue true | ||
| */ | ||
| unmountOnExit?: boolean; | ||
| /** | ||
| * @description 弹出位置,一共有 12 个方位可供选择 | ||
| * @defaultValue bottom | ||
| */ | ||
| position?: 'top' | 'tl' | 'tr' | 'bottom' | 'bl' | 'br' | 'left' | 'lt' | 'lb' | 'right' | 'rt' | 'rb'; | ||
| /** | ||
| * @description 触发方式 | ||
| * @defaultValue hover | ||
| */ | ||
| trigger?: 'hover' | 'click' | 'focus' | 'contextMenu' | Array<'hover' | 'click' | 'focus' | 'contextMenu'>; | ||
| /** | ||
| * @description mouseenter 触发延时的毫秒数 | ||
| * @defaultValue 100 | ||
| */ | ||
| mouseEnterDelay?: number; | ||
| /** | ||
| * @description 是否在鼠标移出触发节点,移入弹出框时保留弹出框。 | ||
| * @defaultValue true | ||
| */ | ||
| popupHoverStay?: boolean; | ||
| /** | ||
| * @description 是否禁用 | ||
| * @defaultValue false | ||
| */ | ||
| disabled?: boolean; | ||
| /** | ||
| * @description 是否能通过点击触发节点来关闭弹出框 | ||
| * @defaultValue true | ||
| */ | ||
| clickToClose?: boolean; | ||
| /** | ||
| * @description 点击触发节点和弹出框以外的区域的回调。 | ||
| */ | ||
| onClickOutside?: () => void; | ||
| /** | ||
| * @description 是否在点击空白处(触发节点和弹出框以外的区域)时关闭弹出层。 关闭时会触发 `onVisibleChange`。 | ||
| * @defaultValue true | ||
| */ | ||
| clickOutsideToClose?: boolean; | ||
| /** | ||
| * @description 在该元素上执行 clickOutside,触发弹出框关闭 | ||
| * @defaultValue () => window.document | ||
| */ | ||
| getDocument?: () => Element; | ||
| /** | ||
| * @description mouseleave 触发延时的毫秒数 | ||
| * @defaultValue 100 | ||
| */ | ||
| mouseLeaveDelay?: number; | ||
| /** | ||
| * @description 弹出层跟随鼠标位置 | ||
| * @en The popup will align mouse position | ||
| */ | ||
| alignPoint?: boolean; | ||
| /** | ||
| * @description 弹出框(内部)的样式 | ||
| * @defaultValue - | ||
| */ | ||
| popupStyle?: CSSProperties; | ||
| /** | ||
| * @description 是否根据空间自动调整弹出框的位置 | ||
| * @defaultValue true | ||
| */ | ||
| autoFitPosition?: boolean; | ||
| /** | ||
| * @description 弹出框(外部)的样式 | ||
| * @defaultValue - | ||
| */ | ||
| style?: CSSProperties; | ||
| /** | ||
| * @description 弹出框的内容 | ||
| * @defaultValue - | ||
| */ | ||
| popup?: () => ReactNode; | ||
| /** | ||
| * @description | ||
| * 调整弹出框的位置,有四个属性值,`left`, `right`, `top`, `bottom`,分别表示向该方向移动几个像素。 | ||
| * 具体可查看 [示例](/react/components/trigger#设置弹窗位置偏移量) | ||
| * @defaultValue {} | ||
| */ | ||
| popupAlign?: { | ||
| left?: number | [number, number]; | ||
| right?: number | [number, number]; | ||
| top?: number | [number, number]; | ||
| bottom?: number | [number, number]; | ||
| }; | ||
| /** | ||
| * @description 显示或隐藏时触发的回调 | ||
| * @defaultValue - | ||
| */ | ||
| onVisibleChange?: (visible: boolean) => void; | ||
| /** | ||
| * @description 是否展示箭头元素 | ||
| * @defaultValue false | ||
| */ | ||
| showArrow?: boolean; | ||
| childrenPrefix?: string; | ||
| /** | ||
| * @description 箭头元素的所有 html 参数 | ||
| * @defaultValue - | ||
| */ | ||
| arrowProps?: HTMLAttributes<HTMLDivElement>; | ||
| } | ||
| export type MouseLocationType = { | ||
| clientX: number; | ||
| clientY: number; | ||
| }; |
| export declare function sliceArr<T>(arr: T[], len: number): T[][]; |
| export type Rect = { | ||
| width: number; | ||
| height: number; | ||
| top: number; | ||
| left: number; | ||
| bottom: number; | ||
| right: number; | ||
| pageTop: number; | ||
| pageLeft: number; | ||
| center: { | ||
| x: number; | ||
| y: number; | ||
| }; | ||
| }; | ||
| export declare const on: (element: any, event: string, handler: EventListener | EventListenerObject | Function, options?: boolean | AddEventListenerOptions) => void; | ||
| export declare const off: (element: any, event: string, handler: EventListener | EventListenerObject | Function, options?: boolean | AddEventListenerOptions) => void; | ||
| export declare function getDOMPos(dom: HTMLElement): Partial<Rect>; | ||
| export declare function contains(parent: Element, child: Element): boolean; |
| import { ChangeEventHandler, CompositionEventHandler, KeyboardEventHandler } from 'react'; | ||
| import { InputProps } from '../../Input/type'; | ||
| export default function useComposition({ value, maxLength, onChange, onKeyDown, onPressEnter, beforeTriggerValueChangeCallback, }: { | ||
| value: string; | ||
| maxLength: number; | ||
| onChange: InputProps['onChange']; | ||
| onKeyDown: InputProps['onKeyDown']; | ||
| onPressEnter: InputProps['onPressEnter']; | ||
| beforeTriggerValueChangeCallback?: (value: string) => boolean; | ||
| }): { | ||
| compositionValue: string; | ||
| triggerValueChangeCallback: typeof onChange; | ||
| compositionHandler: CompositionEventHandler<HTMLInputElement | HTMLTextAreaElement>; | ||
| valueChangeHandler: ChangeEventHandler<HTMLInputElement | HTMLTextAreaElement>; | ||
| keyDownHandler: KeyboardEventHandler<HTMLInputElement | HTMLTextAreaElement>; | ||
| }; |
| declare const _default: {}; | ||
| export default _default; |
| export declare function isFunction(obj: any): obj is (...args: any[]) => any; |
| export declare const Enter: { | ||
| key: string; | ||
| code: number; | ||
| }; | ||
| export declare const Esc: { | ||
| key: string; | ||
| code: number; | ||
| }; | ||
| export declare const Backspace: { | ||
| key: string; | ||
| code: number; | ||
| }; | ||
| export declare const Tab: { | ||
| key: string; | ||
| code: number; | ||
| }; | ||
| export declare const Space: { | ||
| key: string; | ||
| code: number; | ||
| }; | ||
| export declare const ArrowUp: { | ||
| key: string; | ||
| code: number; | ||
| }; | ||
| export declare const ArrowDown: { | ||
| key: string; | ||
| code: number; | ||
| }; | ||
| export declare const ArrowLeft: { | ||
| key: string; | ||
| code: number; | ||
| }; | ||
| export declare const ArrowRight: { | ||
| key: string; | ||
| code: number; | ||
| }; |
| export default function mergeProps<P>(componentProps: P, defaultProps: Partial<P>, globalComponentProps?: Partial<P>): P; |
| export default function (cb: (...args: any[]) => void): { | ||
| (...args: any[]): void; | ||
| cancel(): void; | ||
| }; |
| import React, { ForwardRefExoticComponent } from 'react'; | ||
| export interface ResizeProps { | ||
| onResize?: (entry: ResizeObserverEntry[]) => void; | ||
| children?: React.ReactNode | ForwardRefExoticComponent<any>; | ||
| } | ||
| declare const _default: React.ForwardRefExoticComponent<ResizeProps & React.RefAttributes<unknown>>; | ||
| export default _default; |
| import React from 'react'; | ||
| import { BackTopProps } from './type'; | ||
| import './style/index.less'; | ||
| declare const _default: React.MemoExoticComponent<React.ForwardRefExoticComponent<BackTopProps & { | ||
| children?: React.ReactNode; | ||
| } & React.RefAttributes<unknown>>>; | ||
| export default _default; |
| /// <reference types="react" /> | ||
| import './style.less'; | ||
| declare const Demo1: () => JSX.Element; | ||
| export default Demo1; |
| import BackTop from './backtop'; | ||
| export default BackTop; |
| /// <reference types="react" /> | ||
| export interface BackTopProps { | ||
| style?: React.CSSProperties; | ||
| className?: string; | ||
| /** | ||
| * @description 当滚动到这个高度时,显示返回顶部按钮。 | ||
| * @defaultValue 400 | ||
| */ | ||
| visibleHeight?: number; | ||
| /** | ||
| * @description 设置需要监听其滚动事件的元素,值为一个返回对应 `DOM` 元素的函数。 | ||
| * @defaultValue () => window | ||
| */ | ||
| target?: () => HTMLElement | Window; | ||
| /** | ||
| * @description 点击返回顶部时的回调函数。 | ||
| */ | ||
| onClick?: () => void; | ||
| /** | ||
| * @description 滚动到顶部的缓动方式类型 | ||
| * @defaultValue easeInOut | ||
| */ | ||
| easing?: string; | ||
| /** | ||
| * @description 滚动到顶部的时间。 | ||
| * @defaultValue 400 | ||
| */ | ||
| duration?: number; | ||
| } |
| /// <reference types="react" /> | ||
| import { CalendarProps } from './type'; | ||
| import './style/index.less'; | ||
| declare const Calendar: (props: CalendarProps) => JSX.Element; | ||
| export default Calendar; |
| import Calendar from './calendar'; | ||
| export default Calendar; |
| export interface CalendarProps { | ||
| } |
| import { Dayjs } from 'dayjs'; | ||
| export declare function generateMonthData(day: Dayjs): { | ||
| day: Dayjs; | ||
| isCurrentMonth: boolean; | ||
| }[]; |
| /// <reference types="react" /> | ||
| declare const Demo1: () => JSX.Element; | ||
| export default Demo1; |
| /// <reference types="react" /> | ||
| declare const Demo1: () => JSX.Element; | ||
| export default Demo1; |
| /// <reference types="react" /> | ||
| import './index.less'; | ||
| import { DividerProps } from './type'; | ||
| declare const Divider: (props: DividerProps) => JSX.Element; | ||
| export default Divider; |
| import React from 'react'; | ||
| export interface DividerProps { | ||
| /** | ||
| * @description: 分割线文字的位置 | ||
| * @default: center | ||
| * @type: 'left' | 'right' | 'center' | ||
| */ | ||
| position?: 'left' | 'right' | 'center'; | ||
| /** | ||
| * @description: 分割线文字 | ||
| * @default: '' | ||
| * @type: string | React.ReactNode; | ||
| */ | ||
| children?: string | React.ReactNode; | ||
| /** | ||
| * @description: 分割线类型 | ||
| * @default: horizontal | ||
| * @type: 'horizontal' | 'vertical' | ||
| */ | ||
| type?: 'horizontal' | 'vertical'; | ||
| style?: React.CSSProperties; | ||
| className?: string; | ||
| } |
| /// <reference types="react" /> | ||
| declare const Demo1: () => JSX.Element; | ||
| export default Demo1; |
| /// <reference types="react" /> | ||
| declare const Demo2: () => JSX.Element; | ||
| export default Demo2; |
| /// <reference types="react" /> | ||
| import { DropdownProps } from './type'; | ||
| import './style/index.less'; | ||
| declare const Dropdown: (baseProps: DropdownProps) => JSX.Element; | ||
| export default Dropdown; |
| import Dropdown from './dropdown'; | ||
| export default Dropdown; |
| /// <reference types="react" /> | ||
| import { TriggerProps } from '../Trigger/type'; | ||
| export interface DropdownProps extends TriggerProps { | ||
| children?: React.ReactNode; | ||
| /** | ||
| * @description 下拉框的内容 | ||
| */ | ||
| droplist?: React.ReactNode; | ||
| } |
| /// <reference types="react" /> | ||
| declare const Demo1: () => JSX.Element; | ||
| export default Demo1; |
| import React from 'react'; | ||
| import { FormProps } from './type'; | ||
| import './style/index.less'; | ||
| declare const FormComponent: React.ForwardRefExoticComponent<FormProps & React.RefAttributes<unknown>>; | ||
| export default FormComponent; |
| /// <reference types="react" /> | ||
| import { FormStore } from './formStore'; | ||
| export declare const formContext: import("react").Context<FormStore>; |
| /// <reference types="react" /> | ||
| import { FormItemProps } from './type'; | ||
| declare const FormItem: (baseProps: FormItemProps) => JSX.Element; | ||
| export default FormItem; |
| import { FormFields, FieldType, UFieldType } from './type'; | ||
| export declare class FormStore { | ||
| formFields: FormFields; | ||
| penddingQueue: (() => void)[]; | ||
| isSchedule: boolean; | ||
| onChange: { | ||
| [key: string]: () => void; | ||
| }; | ||
| defaultFormValue: FormFields; | ||
| hooks: { | ||
| onUpdated: ((fields: Record<string, any>) => void)[]; | ||
| }; | ||
| id: number; | ||
| constructor(defaultFormValue: {}, { onUpdated }: { | ||
| onUpdated: any; | ||
| }); | ||
| formatField(name: string, field: UFieldType): FieldType; | ||
| registerField(name: string, field: UFieldType, onChange: () => void): void; | ||
| unRegisterField(name: string): void; | ||
| clearFields(): void; | ||
| resetFields(): void; | ||
| setFields(object: FormFields): void; | ||
| setField(name: any, value: UFieldType | FieldType, batch_Update?: boolean): void; | ||
| setFieldsValue(object: FormFields): void; | ||
| setFieldValue(name: string, value: any, status?: 'pending' | 'success' | 'error', batch_Update?: boolean): void; | ||
| update(name: any, batch_Update: any): void; | ||
| getFieldsValue(): {}; | ||
| getFields(): FormFields; | ||
| getField(name: string): FieldType; | ||
| getFieldValue(name: string): any; | ||
| batchUpdate(name: any): void; | ||
| validateFieldValue(name: any, batch_Update?: boolean): boolean; | ||
| validateFields(): boolean; | ||
| submit(): Promise<unknown>; | ||
| } |
| import Form from './form'; | ||
| export default Form; |
| /// <reference types="react" /> | ||
| export type STATUS = 'pending' | 'success' | 'error'; | ||
| export interface FormFields { | ||
| [key: string]: FieldType; | ||
| } | ||
| export type FieldType = UFieldType & { | ||
| status?: STATUS; | ||
| message?: string; | ||
| }; | ||
| export interface Rule { | ||
| validator: RegExp | ((value: any) => boolean); | ||
| message: string; | ||
| } | ||
| export interface UFieldType { | ||
| value: any; | ||
| rules?: Rule[]; | ||
| required?: boolean; | ||
| type: 'default' | 'form'; | ||
| } | ||
| export interface FormProps { | ||
| style?: React.CSSProperties; | ||
| className?: string; | ||
| initialValues?: { | ||
| [key: string]: any; | ||
| }; | ||
| children: React.ReactElement | React.ReactElement[]; | ||
| onUpdated?: (values: { | ||
| [key: string]: any; | ||
| }) => void; | ||
| onReset?: () => void; | ||
| onClear?: () => void; | ||
| } | ||
| export interface FormItemProps { | ||
| style?: React.CSSProperties; | ||
| className?: string; | ||
| name: string; | ||
| label: string; | ||
| required?: boolean; | ||
| rules?: Rule[]; | ||
| trigger?: 'onChange' | 'onBlur'; | ||
| children: React.ReactElement; | ||
| validateTrigger?: 'onChange' | 'onBlur'; | ||
| } |
| import { FormStore } from './formStore'; | ||
| export default function useFormStore(initialValues: Record<string, any>, { onUpdated }: { | ||
| onUpdated: any; | ||
| }): FormStore[]; |
| import { FormStore } from './formStore'; | ||
| import { Rule } from './type'; | ||
| export default function useRegister(formStore: FormStore, name: string, rules: Rule[], required: boolean): void; |
| /// <reference types="react" /> | ||
| declare const Demo1: () => JSX.Element; | ||
| export default Demo1; |
| /// <reference types="react" /> | ||
| declare const Demo1: () => JSX.Element; | ||
| export default Demo1; |
| /// <reference types="react" /> | ||
| declare const Demo3: () => JSX.Element; | ||
| export default Demo3; |
| /// <reference types="react" /> | ||
| declare const Demo4: () => JSX.Element; | ||
| export default Demo4; |
| /// <reference types="react" /> | ||
| declare const Demo5: () => JSX.Element; | ||
| export default Demo5; |
| /// <reference types="react" /> | ||
| declare const Demo6: () => JSX.Element; | ||
| export default Demo6; |
| import Input from './input'; | ||
| export default Input; |
| import React from 'react'; | ||
| import { InputComponentProps, RefInputType } from './type'; | ||
| declare const InputComponent: React.ForwardRefExoticComponent<InputComponentProps & React.RefAttributes<RefInputType>>; | ||
| export default InputComponent; |
| import React, { ForwardRefExoticComponent } from 'react'; | ||
| import { InputProps, RefInputType } from './type'; | ||
| import './style/index.less'; | ||
| import Password from './password'; | ||
| type InputType = ForwardRefExoticComponent<InputProps & React.RefAttributes<RefInputType>> & { | ||
| Password: typeof Password; | ||
| }; | ||
| declare const InputElement: InputType; | ||
| export default InputElement; |
| import React from 'react'; | ||
| import { InputPasswordProps, RefInputType } from './type'; | ||
| declare const Password: React.ForwardRefExoticComponent<InputPasswordProps & React.RefAttributes<RefInputType>>; | ||
| export default Password; |
| import { CSSProperties, InputHTMLAttributes, ReactNode } from 'react'; | ||
| export interface InputProps extends Omit<InputHTMLAttributes<HTMLInputElement>, 'onChange' | 'prefix' | 'className' | 'size' | 'height' | 'maxLength'> { | ||
| style?: CSSProperties; | ||
| className?: string; | ||
| /** | ||
| * @description 默认值 | ||
| * @defaultValue '' | ||
| */ | ||
| defaultValue?: string; | ||
| /** | ||
| * @description 提示文本 | ||
| * @defaultValue '' | ||
| */ | ||
| placeholder?: string; | ||
| /** | ||
| * @description 输入回调 | ||
| * @defaultValue () => {} | ||
| */ | ||
| onChange?: (value: string, e: any) => void; | ||
| /** | ||
| * @description 输入框的值,受控模式 | ||
| * @defaultValue '' | ||
| */ | ||
| value?: string; | ||
| /** | ||
| * @description 输入框前添加元素 | ||
| * @defaultValue '' | ||
| */ | ||
| addBefore?: ReactNode; | ||
| /** | ||
| * @description 输入框后添加元素 | ||
| * @defaultValue '' | ||
| */ | ||
| addAfter?: ReactNode; | ||
| /** | ||
| * @description 添加前缀文字或者图标 | ||
| * @defaultValue '' | ||
| */ | ||
| prefix?: ReactNode; | ||
| /** | ||
| * @description 添加后缀文字或者图标 | ||
| * @defaultValue '' | ||
| */ | ||
| suffix?: ReactNode; | ||
| /** | ||
| * @description 按下回车键的回调 | ||
| * @defaultValue () => {} | ||
| */ | ||
| onPressEnter?: (e: any) => void; | ||
| /** | ||
| * @description 输入框最大输入的长度 | ||
| * @defaultValue | ||
| */ | ||
| maxLength?: number | { | ||
| length: number; | ||
| errorOnly?: boolean; | ||
| }; | ||
| /** | ||
| * @description 是否禁用 | ||
| * @defaultValue false | ||
| */ | ||
| disabled?: boolean; | ||
| /** | ||
| * @description 输入框的尺寸 | ||
| * @defaultValue 'default' | ||
| */ | ||
| size?: 'mini' | 'small' | 'default' | 'large'; | ||
| /** | ||
| * @description 配合 `maxLength`,显示字数统计 | ||
| * @defaultValue false | ||
| */ | ||
| showWordLimit?: boolean; | ||
| } | ||
| export interface InputComponentProps extends InputProps { | ||
| prefixCls?: string; | ||
| hasParent?: boolean; | ||
| autoFitWidth?: boolean | { | ||
| delay: number | ((width: number, prevWidth: number) => number); | ||
| }; | ||
| } | ||
| export type RefInputType = { | ||
| /** 使输入框失去焦点 */ | ||
| blur: () => void; | ||
| /** 使输入框获取焦点 */ | ||
| focus: () => void; | ||
| /** input dom元素 */ | ||
| dom: HTMLInputElement; | ||
| }; | ||
| export interface InputPasswordProps extends InputProps { | ||
| /** | ||
| * @description 是否显示切换密码可见状态的按钮 | ||
| * @defaultValue false | ||
| */ | ||
| visibilityToggle?: boolean; | ||
| /** | ||
| * @description 初始是否显示 | ||
| * @defaultValue false | ||
| */ | ||
| defaultVisibility?: boolean; | ||
| /** | ||
| * @description 是否显示 | ||
| * @defaultValue false | ||
| */ | ||
| visibility?: boolean; | ||
| /** | ||
| * @description visibility 改变时触发 | ||
| * @defaultValue () => {} | ||
| */ | ||
| onVisibilityChange?: (visibility: boolean) => void; | ||
| } |
| /// <reference types="react" /> | ||
| import { MenuProps } from './type'; | ||
| type MenuContextProps = Pick<MenuProps, 'mode' | 'theme' | 'selectedKeys' | 'openKeys' | 'collapse' | 'inDropdown' | 'triggerProps'> & { | ||
| id?: string; | ||
| prefixCls?: string; | ||
| onClickMenuItem?: (key: string, event: any) => void; | ||
| onClickSubMenu?: (key: string, level: number, type: 'pop' | 'inline') => void; | ||
| collectInlineMenuKeys?: (key: string, unmount?: boolean) => void; | ||
| }; | ||
| declare const MenuContext: import("react").Context<MenuContextProps>; | ||
| export default MenuContext; |
| /// <reference types="react" /> | ||
| import './demo1.less'; | ||
| declare const Demo1: () => JSX.Element; | ||
| export default Demo1; |
| /// <reference types="react" /> | ||
| import './demo1.less'; | ||
| declare const Demo2: () => JSX.Element; | ||
| export default Demo2; |
| /// <reference types="react" /> | ||
| import './demo1.less'; | ||
| declare const Demo3: () => JSX.Element; | ||
| export default Demo3; |
| import Menu from './menu'; | ||
| export default Menu; |
| /// <reference types="react" /> | ||
| import { MenuItemProps } from './type'; | ||
| declare const Item: { | ||
| (props: MenuItemProps): JSX.Element; | ||
| menuType: string; | ||
| }; | ||
| export default Item; |
| import React from 'react'; | ||
| import { MenuProps } from './type'; | ||
| import './style/index.less'; | ||
| declare const Menu: { | ||
| (baseProps: MenuProps): JSX.Element; | ||
| Item: { | ||
| (props: import("./type").MenuItemProps): JSX.Element; | ||
| menuType: string; | ||
| }; | ||
| SubMenu: React.ForwardRefExoticComponent<import("./type").MenuSubMenuProps & React.RefAttributes<unknown>>; | ||
| defaultProps: { | ||
| isMenu: boolean; | ||
| }; | ||
| }; | ||
| export default Menu; |
| import React from 'react'; | ||
| import { MenuSubMenuProps } from '../type'; | ||
| declare const SubMenuComponent: React.ForwardRefExoticComponent<MenuSubMenuProps & React.RefAttributes<unknown>>; | ||
| export default SubMenuComponent; |
| /// <reference types="react" /> | ||
| import { MenuSubMenuProps } from '../type'; | ||
| declare const SubMenuInline: (props: MenuSubMenuProps & { | ||
| forwardedRef; | ||
| }) => JSX.Element; | ||
| export default SubMenuInline; |
| /// <reference types="react" /> | ||
| import { MenuSubMenuProps } from '../type'; | ||
| declare const SubMenuPop: (props: MenuSubMenuProps & { | ||
| forwardedRef; | ||
| }) => JSX.Element; | ||
| export default SubMenuPop; |
| import { HTMLAttributes, ReactNode } from 'react'; | ||
| import { TriggerProps } from '../Trigger/type'; | ||
| export interface MenuProps extends Omit<HTMLAttributes<HTMLDivElement>, 'className'> { | ||
| children?: React.ReactNode; | ||
| className?: string; | ||
| prefixCls?: string; | ||
| style?: React.CSSProperties; | ||
| inDropdown?: boolean; | ||
| /** | ||
| * @description 菜单风格 | ||
| * @defaultValue light | ||
| */ | ||
| theme?: 'light' | 'dark'; | ||
| /** | ||
| * @description 菜单类型,目前支持垂直(vertical)、水平菜单(horizontal)、弹出(pop) | ||
| * @defaultValue vertical | ||
| */ | ||
| mode?: 'vertical' | 'horizontal' | 'pop' | 'popButton'; | ||
| /** | ||
| * @description 初始选中的菜单项 key 数组 | ||
| * @defaultValue [] | ||
| */ | ||
| defaultSelectedKeys?: string[]; | ||
| /** | ||
| * @description 选中的菜单项 key 数组(受控模式) | ||
| * @defaultValue [] | ||
| */ | ||
| selectedKeys?: string[]; | ||
| /** | ||
| * @description 菜单选项是否可选 | ||
| * @defaultValue true | ||
| */ | ||
| selectable?: boolean; | ||
| /** | ||
| * @description 展开的子菜单 key 数组(受控模式) | ||
| */ | ||
| openKeys?: string[]; | ||
| /** | ||
| * @description 初始展开的子菜单 key 数组 | ||
| */ | ||
| defaultOpenKeys?: string[]; | ||
| /** | ||
| * @description 开启手风琴效果 | ||
| * @defaultValue false | ||
| */ | ||
| accordion?: boolean; | ||
| /** | ||
| * @description 点击子菜单标题的回调 | ||
| */ | ||
| onClickSubMenu?: (key: string, openKeys: string[], keyPath: string[]) => void; | ||
| /** | ||
| * @description 点击菜单项的回调 | ||
| */ | ||
| onClickMenuItem?: (key: string, event: any, keyPath: string[]) => any; | ||
| /** | ||
| * @description 是否水平折叠收起菜单 | ||
| * @default false | ||
| */ | ||
| collapse?: boolean; | ||
| /** | ||
| * @description 弹出模式下可接受所有 `Trigger` 的 `Props` | ||
| */ | ||
| triggerProps?: Partial<TriggerProps>; | ||
| } | ||
| export interface MenuSubMenuProps { | ||
| level?: number; | ||
| children?: React.ReactNode; | ||
| className?: string; | ||
| style?: React.CSSProperties; | ||
| key: string; | ||
| _key?: string; | ||
| /** | ||
| * @description 子菜单的标题 | ||
| */ | ||
| title: string | ReactNode; | ||
| /** | ||
| * @description 子菜单的图标 | ||
| */ | ||
| icon?: ReactNode; | ||
| /** | ||
| * @description 弹出模式下可接受所有 `Trigger` 的 `Props` | ||
| */ | ||
| triggerProps?: Partial<TriggerProps>; | ||
| } | ||
| export interface MenuItemProps extends Omit<HTMLAttributes<HTMLElement>, 'className'> { | ||
| children?: React.ReactNode; | ||
| className?: string; | ||
| style?: React.CSSProperties; | ||
| key: string; | ||
| _key?: string; | ||
| onClick?: (e: any) => void; | ||
| wrapper?: string | React.FC<any> | React.ComponentClass<any>; | ||
| /** | ||
| * @description 菜单项禁止选中 | ||
| * @defaultValue false | ||
| */ | ||
| disabled?: boolean; | ||
| } |
| import React from 'react'; | ||
| export declare const processChilren: (children: React.ReactNode, props: any) => any; | ||
| export declare function isChildrenSelected(children: any, keys: string[]): boolean; |
| import React, { PropsWithChildren } from 'react'; | ||
| import { RadioGroupContextProps, RadioGroupProps } from './type'; | ||
| export declare const RadioGroupContext: React.Context<RadioGroupContextProps>; | ||
| declare function Group(baseProps: PropsWithChildren<RadioGroupProps>): JSX.Element; | ||
| declare namespace Group { | ||
| var displayName: string; | ||
| } | ||
| export default Group; |
| import Radio from './radio'; | ||
| export default Radio; |
| import React from 'react'; | ||
| import { RadioProps } from './type'; | ||
| import './style/index.less'; | ||
| import Group from './group'; | ||
| declare const Radio: { | ||
| (baseProps: RadioProps): JSX.Element; | ||
| displayName: string; | ||
| GroupContext: React.Context<import("./type").RadioGroupContextProps>; | ||
| Group: typeof Group; | ||
| }; | ||
| export default Radio; |
| import { ChangeEvent, HTMLAttributes, ReactNode } from 'react'; | ||
| export interface RadioProps<T = any> extends Omit<HTMLAttributes<HTMLLabelElement>, 'children' | 'className' | 'onChange'> { | ||
| style?: React.CSSProperties; | ||
| className?: string; | ||
| /** | ||
| * @description 是否禁用 | ||
| * @default false | ||
| */ | ||
| disabled?: boolean; | ||
| /** | ||
| * @description 控件的value值 | ||
| * @default - | ||
| */ | ||
| value?: T; | ||
| /** | ||
| * @description 是否选中 | ||
| * @default false | ||
| */ | ||
| checked?: boolean; | ||
| /** | ||
| * @description 初始是否选中 | ||
| * @default false | ||
| */ | ||
| defaultChecked?: boolean; | ||
| /** | ||
| * @description 选中状态发生变化时的回调函数 | ||
| * @default - | ||
| */ | ||
| onChange?: (checked: boolean, event: ChangeEvent) => void; | ||
| children?: ReactNode | ((value: { | ||
| checked: boolean; | ||
| }) => ReactNode); | ||
| } | ||
| export interface RadioGroupProps { | ||
| style?: React.CSSProperties; | ||
| className?: string; | ||
| disabled?: boolean; | ||
| /** | ||
| * @description `Radio` 的 name | ||
| * @default - | ||
| */ | ||
| name?: string; | ||
| /** | ||
| * @description `Radio` 的 类型 | ||
| * @default 'radio' | ||
| */ | ||
| type?: 'radio' | 'button'; | ||
| onChange?: (value: any, event: ChangeEvent) => void; | ||
| /** | ||
| * @description 默认选中的值 | ||
| * @default - | ||
| */ | ||
| defaultValue?: any; | ||
| /** | ||
| * @description 选中的值(受控) | ||
| * @default - | ||
| */ | ||
| value?: any; | ||
| } | ||
| export interface RadioGroupContextProps { | ||
| type: 'radio' | 'button'; | ||
| value?: any; | ||
| disabled?: boolean; | ||
| name?: string; | ||
| onChangeValue?: (value: any, event: ChangeEvent) => void; | ||
| group?: boolean; | ||
| } |
| import Rate from './rate'; | ||
| export default Rate; |
| /// <reference types="react" /> | ||
| import { RateProps } from './type'; | ||
| import './style/index.less'; | ||
| declare const Rate: (baseProps: RateProps) => JSX.Element; | ||
| export default Rate; |
| import React, { CSSProperties, ReactNode } from 'react'; | ||
| export interface RateProps { | ||
| style?: CSSProperties; | ||
| className?: string | string[]; | ||
| /** | ||
| * @description 默认值 | ||
| * @default 0 | ||
| */ | ||
| defaultValue?: number; | ||
| /** | ||
| * @description 自定义字符 | ||
| * @default starIcon | ||
| */ | ||
| character?: React.ReactNode | ((index: number) => ReactNode); | ||
| /** | ||
| * @description 星的总数 | ||
| * @default 5 | ||
| */ | ||
| count?: number; | ||
| /** | ||
| * @description 选中的星的个数(受控) | ||
| * @default 5 | ||
| */ | ||
| value?: number; | ||
| /** | ||
| * @description 是否允许半选 | ||
| * @default false | ||
| */ | ||
| allowHalf?: boolean; | ||
| /** | ||
| * @description 是否允许清除 | ||
| * @default false | ||
| */ | ||
| allowClear?: boolean; | ||
| /** | ||
| * @description 是否只读,无法进行交互 | ||
| * @default false | ||
| */ | ||
| readOnly?: boolean; | ||
| /** | ||
| * @description 是否禁用 | ||
| * @default false | ||
| */ | ||
| disabled?: boolean; | ||
| /** | ||
| * @description 选中时的回调 | ||
| * @default - | ||
| */ | ||
| onChange?: (value: number) => void; | ||
| /** | ||
| * @description 鼠标移入时的回调 | ||
| * @default - | ||
| */ | ||
| onHoverChange?: (value: number) => void; | ||
| } |
| /// <reference types="react" /> | ||
| export default function Demo1(): JSX.Element; |
| /// <reference types="react" /> | ||
| declare const Demo2: () => JSX.Element; | ||
| export default Demo2; |
| /// <reference types="react" /> | ||
| import { TooltipProps } from './type'; | ||
| import './style/index.less'; | ||
| declare const Tooltip: (props: TooltipProps) => JSX.Element; | ||
| export default Tooltip; |
| import { CSSProperties } from 'react'; | ||
| import { TriggerProps } from '../Trigger/type'; | ||
| export interface TooltipProps { | ||
| style?: CSSProperties; | ||
| className?: string | string[]; | ||
| /** | ||
| * @description 触发方式 | ||
| * @default hover | ||
| */ | ||
| trigger?: TriggerProps['trigger']; | ||
| children: React.ReactNode; | ||
| /** | ||
| * @description 提示内容 | ||
| * @default '' | ||
| */ | ||
| content: React.ReactNode; | ||
| /** | ||
| * @description 弹出框挂载的节点 | ||
| * @default document.body | ||
| */ | ||
| getPopupContainer?: (node: HTMLElement) => Element; | ||
| /** | ||
| * @description 弹出框的方位,有 12 个方位可供选择 | ||
| * @defaultValue top | ||
| */ | ||
| position?: 'top' | 'tl' | 'tr' | 'bottom' | 'bl' | 'br' | 'left' | 'lt' | 'lb' | 'right' | 'rt' | 'rb'; | ||
| /** | ||
| * @description 弹出框的背景颜色 | ||
| * @default - | ||
| */ | ||
| color?: string; | ||
| /** | ||
| * @description 迷你尺寸 | ||
| * @default false | ||
| */ | ||
| mini?: boolean; | ||
| } |
| import { FC } from 'react'; | ||
| declare const Demo1: FC; | ||
| export default Demo1; |
| import { FC } from 'react'; | ||
| declare const Demo1: FC; | ||
| export default Demo1; |
| import { FC } from 'react'; | ||
| declare const Demo3: FC; | ||
| export default Demo3; |
| import { CSSProperties } from 'react'; | ||
| import { MouseLocationType, TriggerProps } from './type'; | ||
| type ReturnType = { | ||
| style?: CSSProperties; | ||
| arrowStyle?: CSSProperties; | ||
| realPosition?: TriggerProps['position']; | ||
| }; | ||
| declare const _default: (props: TriggerProps, content: HTMLElement, child: HTMLElement, mountContainer: Element, mouseLocation: MouseLocationType) => ReturnType; | ||
| export default _default; |
| import React, { MouseEvent, PropsWithChildren } from 'react'; | ||
| import { CSSProperties, PureComponent, ReactNode } from 'react'; | ||
| import { globalConfigContext } from '../GlobalConfig/Index'; | ||
| import { getDOMPos } from '../utils/dom'; | ||
| import { MouseLocationType, TriggerProps } from './type'; | ||
| import './style/index.less'; | ||
| interface TriggerState { | ||
| popupVisible: boolean; | ||
| popupStyle: CSSProperties; | ||
| } | ||
| export type EventsByTriggerNeedType = 'onClick' | 'onMouseEnter' | 'onMouseLeave' | 'onMouseMove' | 'onFocus' | 'onBlur' | 'onContextMenu' | 'onKeyDown'; | ||
| declare class Trigger extends PureComponent<TriggerProps, TriggerState> { | ||
| static displayName: string; | ||
| context: React.ContextType<typeof globalConfigContext>; | ||
| popupOpen: boolean; | ||
| isDidMount: boolean; | ||
| unMount: boolean; | ||
| mouseLocation: MouseLocationType; | ||
| arrowStyle: CSSProperties; | ||
| childrenDom: any; | ||
| delayTimer: any; | ||
| hasPopupMouseDown: boolean; | ||
| popupContainer: any; | ||
| handleClickOutside: boolean; | ||
| realPosition: string; | ||
| mouseDownTimeout: any; | ||
| triggerRef: React.RefObject<HTMLElement>; | ||
| childrenDomSize: ReturnType<typeof getDOMPos>; | ||
| getMergedProps(baseProps?: any): PropsWithChildren<TriggerProps>; | ||
| constructor(props: TriggerProps); | ||
| static getDerivedStateFromProps(nextProps: any, prevState: any): { | ||
| popupVisible: any; | ||
| }; | ||
| componentDidMount(): void; | ||
| componentDidUpdate(_prevProps: Readonly<TriggerProps>): void; | ||
| onClickOutside: (e: any) => void; | ||
| getPopupStyle(): any; | ||
| showPopup: (callback?: () => void) => void; | ||
| update: { | ||
| (...args: any[]): void; | ||
| cancel(): void; | ||
| }; | ||
| getContainer: () => HTMLDivElement; | ||
| getTransformTranslate: () => "" | "scaleY(0.9) translateY(-4px)" | "scaleY(0.9) translateY(4px)"; | ||
| rafId: number; | ||
| appendToContainer(node: HTMLDivElement): void; | ||
| isPopupHoverHide: () => boolean; | ||
| isTrigger: (trigerName: TriggerProps['trigger']) => boolean; | ||
| isClickToHide: () => boolean; | ||
| /** | ||
| * 获取children,如果是string或number类型 | ||
| * 当 children 中的元素 disabled 时,不能正确触发 hover 等事件,所以当监测到对应 | ||
| * 组件有 disabled 时,给元素加一层 span,处理事件,模拟样式 | ||
| * @returns | ||
| */ | ||
| getChild: () => React.ReactNode; | ||
| triggerPropsEvent: (eventName: EventsByTriggerNeedType, e?: any) => void; | ||
| triggerOriginEvent: (event: EventsByTriggerNeedType, e?: any) => () => void; | ||
| clearDelayTimer(): void; | ||
| delayToDo: (cb: () => void, delay?: number) => void; | ||
| setPopupVisible(visible: boolean, delay?: number, cb?: () => void): void; | ||
| onMouseEnter: (e: any) => void; | ||
| onMouseLeave: (e: any) => void; | ||
| onPopupMouseEnter: () => void; | ||
| onPopupMouseLeave: (e: any) => void; | ||
| setMouseLocation: (e: MouseEvent) => void; | ||
| onClick: (e: any) => void; | ||
| onContextMenu: (e: any) => void; | ||
| onPopupMouseDown: () => void; | ||
| hideContextMenu: (e: any) => void; | ||
| render(): ReactNode; | ||
| } | ||
| export default Trigger; |
| import { PropsWithChildren } from 'react'; | ||
| interface PortalProps { | ||
| getContainer: () => HTMLElement; | ||
| } | ||
| declare const Portal: (props: PropsWithChildren<PortalProps>) => import("react").ReactPortal; | ||
| export default Portal; |
| import { CSSProperties, HTMLAttributes, ReactNode } from 'react'; | ||
| export interface TriggerProps { | ||
| className?: string | string[]; | ||
| /** | ||
| * @description 设置弹出框开启或关闭 | ||
| * @default - | ||
| */ | ||
| popupVisible?: boolean; | ||
| /** | ||
| * @description 默认弹出关闭还是开启 | ||
| * @default - | ||
| */ | ||
| defaultPopupVisible?: boolean; | ||
| /** | ||
| * @description 设置弹出内容所插入的父元素 | ||
| * @default - | ||
| */ | ||
| getPopupContainer?: (node: HTMLElement) => Element; | ||
| children?: ReactNode; | ||
| /** | ||
| * @description 动画类名 | ||
| * @defaultValue fadeId | ||
| */ | ||
| classNames?: string; | ||
| /** | ||
| * @description 动画过渡时间 | ||
| * @defaultValue 200 | ||
| */ | ||
| duration?: number | { | ||
| exit?: number; | ||
| enter?: number; | ||
| appear?: number; | ||
| }; | ||
| /** | ||
| * @description 隐藏后是否销毁 DOM 结构 | ||
| * @defaultValue true | ||
| */ | ||
| unmountOnExit?: boolean; | ||
| /** | ||
| * @description 弹出位置,一共有 12 个方位可供选择 | ||
| * @defaultValue bottom | ||
| */ | ||
| position?: 'top' | 'tl' | 'tr' | 'bottom' | 'bl' | 'br' | 'left' | 'lt' | 'lb' | 'right' | 'rt' | 'rb'; | ||
| /** | ||
| * @description 触发方式 | ||
| * @defaultValue hover | ||
| */ | ||
| trigger?: 'hover' | 'click' | 'focus' | 'contextMenu' | Array<'hover' | 'click' | 'focus' | 'contextMenu'>; | ||
| /** | ||
| * @description mouseenter 触发延时的毫秒数 | ||
| * @defaultValue 100 | ||
| */ | ||
| mouseEnterDelay?: number; | ||
| /** | ||
| * @description 是否在鼠标移出触发节点,移入弹出框时保留弹出框。 | ||
| * @defaultValue true | ||
| */ | ||
| popupHoverStay?: boolean; | ||
| /** | ||
| * @description 是否禁用 | ||
| * @defaultValue false | ||
| */ | ||
| disabled?: boolean; | ||
| /** | ||
| * @description 是否能通过点击触发节点来关闭弹出框 | ||
| * @defaultValue true | ||
| */ | ||
| clickToClose?: boolean; | ||
| /** | ||
| * @description 点击触发节点和弹出框以外的区域的回调。 | ||
| */ | ||
| onClickOutside?: () => void; | ||
| /** | ||
| * @description 是否在点击空白处(触发节点和弹出框以外的区域)时关闭弹出层。 关闭时会触发 `onVisibleChange`。 | ||
| * @defaultValue true | ||
| */ | ||
| clickOutsideToClose?: boolean; | ||
| /** | ||
| * @description 在该元素上执行 clickOutside,触发弹出框关闭 | ||
| * @defaultValue () => window.document | ||
| */ | ||
| getDocument?: () => Element; | ||
| /** | ||
| * @description mouseleave 触发延时的毫秒数 | ||
| * @defaultValue 100 | ||
| */ | ||
| mouseLeaveDelay?: number; | ||
| /** | ||
| * @description 弹出层跟随鼠标位置 | ||
| * @en The popup will align mouse position | ||
| */ | ||
| alignPoint?: boolean; | ||
| /** | ||
| * @description 弹出框(内部)的样式 | ||
| * @defaultValue - | ||
| */ | ||
| popupStyle?: CSSProperties; | ||
| /** | ||
| * @description 是否根据空间自动调整弹出框的位置 | ||
| * @defaultValue true | ||
| */ | ||
| autoFitPosition?: boolean; | ||
| /** | ||
| * @description 弹出框(外部)的样式 | ||
| * @defaultValue - | ||
| */ | ||
| style?: CSSProperties; | ||
| /** | ||
| * @description 弹出框的内容 | ||
| * @defaultValue - | ||
| */ | ||
| popup?: () => ReactNode; | ||
| /** | ||
| * @description | ||
| * 调整弹出框的位置,有四个属性值,`left`, `right`, `top`, `bottom`,分别表示向该方向移动几个像素。 | ||
| * 具体可查看 [示例](/react/components/trigger#设置弹窗位置偏移量) | ||
| * @defaultValue {} | ||
| */ | ||
| popupAlign?: { | ||
| left?: number | [number, number]; | ||
| right?: number | [number, number]; | ||
| top?: number | [number, number]; | ||
| bottom?: number | [number, number]; | ||
| }; | ||
| /** | ||
| * @description 显示或隐藏时触发的回调 | ||
| * @defaultValue - | ||
| */ | ||
| onVisibleChange?: (visible: boolean) => void; | ||
| /** | ||
| * @description 是否展示箭头元素 | ||
| * @defaultValue false | ||
| */ | ||
| showArrow?: boolean; | ||
| childrenPrefix?: string; | ||
| /** | ||
| * @description 箭头元素的所有 html 参数 | ||
| * @defaultValue - | ||
| */ | ||
| arrowProps?: HTMLAttributes<HTMLDivElement>; | ||
| } | ||
| export type MouseLocationType = { | ||
| clientX: number; | ||
| clientY: number; | ||
| }; |
| export declare function sliceArr<T>(arr: T[], len: number): T[][]; |
| export type Rect = { | ||
| width: number; | ||
| height: number; | ||
| top: number; | ||
| left: number; | ||
| bottom: number; | ||
| right: number; | ||
| pageTop: number; | ||
| pageLeft: number; | ||
| center: { | ||
| x: number; | ||
| y: number; | ||
| }; | ||
| }; | ||
| export declare const on: (element: any, event: string, handler: EventListener | EventListenerObject | Function, options?: boolean | AddEventListenerOptions) => void; | ||
| export declare const off: (element: any, event: string, handler: EventListener | EventListenerObject | Function, options?: boolean | AddEventListenerOptions) => void; | ||
| export declare function getDOMPos(dom: HTMLElement): Partial<Rect>; | ||
| export declare function contains(parent: Element, child: Element): boolean; |
| import { ChangeEventHandler, CompositionEventHandler, KeyboardEventHandler } from 'react'; | ||
| import { InputProps } from '../../Input/type'; | ||
| export default function useComposition({ value, maxLength, onChange, onKeyDown, onPressEnter, beforeTriggerValueChangeCallback, }: { | ||
| value: string; | ||
| maxLength: number; | ||
| onChange: InputProps['onChange']; | ||
| onKeyDown: InputProps['onKeyDown']; | ||
| onPressEnter: InputProps['onPressEnter']; | ||
| beforeTriggerValueChangeCallback?: (value: string) => boolean; | ||
| }): { | ||
| compositionValue: string; | ||
| triggerValueChangeCallback: typeof onChange; | ||
| compositionHandler: CompositionEventHandler<HTMLInputElement | HTMLTextAreaElement>; | ||
| valueChangeHandler: ChangeEventHandler<HTMLInputElement | HTMLTextAreaElement>; | ||
| keyDownHandler: KeyboardEventHandler<HTMLInputElement | HTMLTextAreaElement>; | ||
| }; |
| declare const _default: {}; | ||
| export default _default; |
| export declare function isFunction(obj: any): obj is (...args: any[]) => any; |
| export declare const Enter: { | ||
| key: string; | ||
| code: number; | ||
| }; | ||
| export declare const Esc: { | ||
| key: string; | ||
| code: number; | ||
| }; | ||
| export declare const Backspace: { | ||
| key: string; | ||
| code: number; | ||
| }; | ||
| export declare const Tab: { | ||
| key: string; | ||
| code: number; | ||
| }; | ||
| export declare const Space: { | ||
| key: string; | ||
| code: number; | ||
| }; | ||
| export declare const ArrowUp: { | ||
| key: string; | ||
| code: number; | ||
| }; | ||
| export declare const ArrowDown: { | ||
| key: string; | ||
| code: number; | ||
| }; | ||
| export declare const ArrowLeft: { | ||
| key: string; | ||
| code: number; | ||
| }; | ||
| export declare const ArrowRight: { | ||
| key: string; | ||
| code: number; | ||
| }; |
| export default function mergeProps<P>(componentProps: P, defaultProps: Partial<P>, globalComponentProps?: Partial<P>): P; |
| export default function (cb: (...args: any[]) => void): { | ||
| (...args: any[]): void; | ||
| cancel(): void; | ||
| }; |
@@ -1,5 +0,5 @@ | ||
| import { FC } from 'react'; | ||
| import './index.less'; | ||
| import React from 'react'; | ||
| import { ButtonProps } from './type'; | ||
| declare const Button: FC<ButtonProps>; | ||
| export default Button; | ||
| declare const _default: React.ForwardRefExoticComponent<ButtonProps & React.RefAttributes<unknown>>; | ||
| export default _default; |
@@ -26,7 +26,7 @@ import { ReactNode } from 'react'; | ||
| */ | ||
| width?: Number; | ||
| width?: number; | ||
| /** | ||
| * @description 高度 | ||
| */ | ||
| height?: Number; | ||
| height?: number; | ||
| /** | ||
@@ -36,3 +36,3 @@ * @description 禁用状态 | ||
| */ | ||
| disabled?: Boolean; | ||
| disabled?: boolean; | ||
| /** | ||
@@ -47,3 +47,3 @@ * @description 按钮形状 | ||
| */ | ||
| dashed?: Boolean; | ||
| dashed?: boolean; | ||
| /** | ||
@@ -53,3 +53,3 @@ * @description 加载状态 | ||
| */ | ||
| loading?: Boolean; | ||
| loading?: boolean; | ||
| /** | ||
@@ -62,3 +62,3 @@ * @description 图标按钮 | ||
| */ | ||
| style?: Object; | ||
| style?: ButtonStyle; | ||
| /** | ||
@@ -65,0 +65,0 @@ * @description 按钮点击回调事件 |
@@ -0,2 +1,3 @@ | ||
| /// <reference types="react" /> | ||
| declare const Demo: () => JSX.Element; | ||
| export default Demo; |
@@ -0,2 +1,3 @@ | ||
| /// <reference types="react" /> | ||
| declare const Demo: () => JSX.Element; | ||
| export default Demo; |
@@ -0,2 +1,3 @@ | ||
| /// <reference types="react" /> | ||
| declare const Demo: () => JSX.Element; | ||
| export default Demo; |
@@ -1,5 +0,1 @@ | ||
| import React from 'react'; | ||
| import { CheckboxProps } from './type'; | ||
| import './Index.less'; | ||
| declare const _default: React.ForwardRefExoticComponent<CheckboxProps & React.RefAttributes<unknown>>; | ||
| export default _default; | ||
| export { default as default } from './Checkbox'; |
@@ -1,2 +0,2 @@ | ||
| import { HTMLAttributes, ReactNode } from 'react'; | ||
| import { ChangeEvent, HTMLAttributes, ReactNode } from 'react'; | ||
| export interface CheckboxProps extends Omit<HTMLAttributes<HTMLLabelElement>, 'children' | 'className' | 'onChange'> { | ||
@@ -16,2 +16,6 @@ style?: React.CSSProperties; | ||
| /** | ||
| * @description 半选状态 | ||
| */ | ||
| indeterminate?: boolean; | ||
| /** | ||
| * @description 是否默认选中 | ||
@@ -35,3 +39,39 @@ * @default false | ||
| value?: string | number; | ||
| children?: ReactNode; | ||
| children?: ReactNode | ((value: { | ||
| checked: boolean; | ||
| indeterminate: boolean; | ||
| }) => ReactNode); | ||
| } | ||
| export interface CheckboxGroupProps { | ||
| style?: React.CSSProperties; | ||
| className?: string; | ||
| /** | ||
| * @description 是否禁用 | ||
| * @default false | ||
| */ | ||
| /** | ||
| * @zh 可选项 | ||
| * @en Specifies options | ||
| */ | ||
| options?: ((string | number) | { | ||
| label: ReactNode; | ||
| value: string | number; | ||
| disabled?: boolean; | ||
| })[]; | ||
| disabled?: boolean; | ||
| /** | ||
| * @description 默认选中的值 | ||
| * @default - | ||
| */ | ||
| defaultValue?: string[]; | ||
| /** | ||
| * @description 选中的值(受控) | ||
| * @default - | ||
| */ | ||
| value?: (string | number)[]; | ||
| /** | ||
| * @zh 变化时的回调函数 | ||
| * @en Callback when the state changes | ||
| */ | ||
| onChange?: (value: (string | number)[], e: ChangeEvent<HTMLInputElement>) => void; | ||
| } |
@@ -24,3 +24,8 @@ import { ReactNode } from 'react'; | ||
| toggleMode?: () => void; | ||
| /** | ||
| * @description trigger 获取弹出层容器 | ||
| */ | ||
| getPopupContainer: (triggerNode: HTMLElement) => HTMLElement; | ||
| zIndex?: number; | ||
| } | ||
| export type { GlobalConfigProps }; |
+12
-0
@@ -6,2 +6,14 @@ export { default as Button } from './Button/Index'; | ||
| export { default as Skeleton } from './Skeleton/Index'; | ||
| export { default as BackTop } from './BackTop/'; | ||
| export { default as Dropdown } from './Dropdown'; | ||
| export { default as Menu } from './Menu'; | ||
| export { default as Input } from './Input'; | ||
| export { default as Tooltip } from './Tooltip'; | ||
| export { default as Calendar } from './Calendar'; | ||
| export { default as Trigger } from './Trigger'; | ||
| export { default as Rate } from './Rate'; | ||
| export { default as Radio } from './Radio'; | ||
| export { default as Form } from './Form'; | ||
| export { default as Divider } from './Divider'; | ||
| export { default as Checkbox } from './CheckBox/Index'; | ||
| import './styles/common.less'; |
@@ -0,1 +1,2 @@ | ||
| /// <reference types="react" /> | ||
| import { INotificationProps } from './type'; | ||
@@ -2,0 +3,0 @@ import './index.less'; |
@@ -0,2 +1,3 @@ | ||
| /// <reference types="react" /> | ||
| declare const _default: () => JSX.Element; | ||
| export default _default; |
@@ -0,2 +1,3 @@ | ||
| /// <reference types="react" /> | ||
| declare const _default: () => JSX.Element; | ||
| export default _default; |
@@ -0,2 +1,3 @@ | ||
| /// <reference types="react" /> | ||
| declare const _default: () => JSX.Element; | ||
| export default _default; |
@@ -1,5 +0,5 @@ | ||
| import { FC } from 'react'; | ||
| import './index.less'; | ||
| import React from 'react'; | ||
| import { ButtonProps } from './type'; | ||
| declare const Button: FC<ButtonProps>; | ||
| export default Button; | ||
| declare const _default: React.ForwardRefExoticComponent<ButtonProps & React.RefAttributes<unknown>>; | ||
| export default _default; |
@@ -26,7 +26,7 @@ import { ReactNode } from 'react'; | ||
| */ | ||
| width?: Number; | ||
| width?: number; | ||
| /** | ||
| * @description 高度 | ||
| */ | ||
| height?: Number; | ||
| height?: number; | ||
| /** | ||
@@ -36,3 +36,3 @@ * @description 禁用状态 | ||
| */ | ||
| disabled?: Boolean; | ||
| disabled?: boolean; | ||
| /** | ||
@@ -47,3 +47,3 @@ * @description 按钮形状 | ||
| */ | ||
| dashed?: Boolean; | ||
| dashed?: boolean; | ||
| /** | ||
@@ -53,3 +53,3 @@ * @description 加载状态 | ||
| */ | ||
| loading?: Boolean; | ||
| loading?: boolean; | ||
| /** | ||
@@ -62,3 +62,3 @@ * @description 图标按钮 | ||
| */ | ||
| style?: Object; | ||
| style?: ButtonStyle; | ||
| /** | ||
@@ -65,0 +65,0 @@ * @description 按钮点击回调事件 |
@@ -0,2 +1,3 @@ | ||
| /// <reference types="react" /> | ||
| declare const Demo: () => JSX.Element; | ||
| export default Demo; |
@@ -0,2 +1,3 @@ | ||
| /// <reference types="react" /> | ||
| declare const Demo: () => JSX.Element; | ||
| export default Demo; |
@@ -0,2 +1,3 @@ | ||
| /// <reference types="react" /> | ||
| declare const Demo: () => JSX.Element; | ||
| export default Demo; |
@@ -1,5 +0,1 @@ | ||
| import React from 'react'; | ||
| import { CheckboxProps } from './type'; | ||
| import './Index.less'; | ||
| declare const _default: React.ForwardRefExoticComponent<CheckboxProps & React.RefAttributes<unknown>>; | ||
| export default _default; | ||
| export { default as default } from './Checkbox'; |
@@ -1,2 +0,2 @@ | ||
| import { HTMLAttributes, ReactNode } from 'react'; | ||
| import { ChangeEvent, HTMLAttributes, ReactNode } from 'react'; | ||
| export interface CheckboxProps extends Omit<HTMLAttributes<HTMLLabelElement>, 'children' | 'className' | 'onChange'> { | ||
@@ -16,2 +16,6 @@ style?: React.CSSProperties; | ||
| /** | ||
| * @description 半选状态 | ||
| */ | ||
| indeterminate?: boolean; | ||
| /** | ||
| * @description 是否默认选中 | ||
@@ -35,3 +39,39 @@ * @default false | ||
| value?: string | number; | ||
| children?: ReactNode; | ||
| children?: ReactNode | ((value: { | ||
| checked: boolean; | ||
| indeterminate: boolean; | ||
| }) => ReactNode); | ||
| } | ||
| export interface CheckboxGroupProps { | ||
| style?: React.CSSProperties; | ||
| className?: string; | ||
| /** | ||
| * @description 是否禁用 | ||
| * @default false | ||
| */ | ||
| /** | ||
| * @zh 可选项 | ||
| * @en Specifies options | ||
| */ | ||
| options?: ((string | number) | { | ||
| label: ReactNode; | ||
| value: string | number; | ||
| disabled?: boolean; | ||
| })[]; | ||
| disabled?: boolean; | ||
| /** | ||
| * @description 默认选中的值 | ||
| * @default - | ||
| */ | ||
| defaultValue?: string[]; | ||
| /** | ||
| * @description 选中的值(受控) | ||
| * @default - | ||
| */ | ||
| value?: (string | number)[]; | ||
| /** | ||
| * @zh 变化时的回调函数 | ||
| * @en Callback when the state changes | ||
| */ | ||
| onChange?: (value: (string | number)[], e: ChangeEvent<HTMLInputElement>) => void; | ||
| } |
@@ -24,3 +24,8 @@ import { ReactNode } from 'react'; | ||
| toggleMode?: () => void; | ||
| /** | ||
| * @description trigger 获取弹出层容器 | ||
| */ | ||
| getPopupContainer: (triggerNode: HTMLElement) => HTMLElement; | ||
| zIndex?: number; | ||
| } | ||
| export type { GlobalConfigProps }; |
+12
-0
@@ -6,2 +6,14 @@ export { default as Button } from './Button/Index'; | ||
| export { default as Skeleton } from './Skeleton/Index'; | ||
| export { default as BackTop } from './BackTop/'; | ||
| export { default as Dropdown } from './Dropdown'; | ||
| export { default as Menu } from './Menu'; | ||
| export { default as Input } from './Input'; | ||
| export { default as Tooltip } from './Tooltip'; | ||
| export { default as Calendar } from './Calendar'; | ||
| export { default as Trigger } from './Trigger'; | ||
| export { default as Rate } from './Rate'; | ||
| export { default as Radio } from './Radio'; | ||
| export { default as Form } from './Form'; | ||
| export { default as Divider } from './Divider'; | ||
| export { default as Checkbox } from './CheckBox/Index'; | ||
| import './styles/common.less'; |
@@ -0,1 +1,2 @@ | ||
| /// <reference types="react" /> | ||
| import { INotificationProps } from './type'; | ||
@@ -2,0 +3,0 @@ import './index.less'; |
@@ -0,2 +1,3 @@ | ||
| /// <reference types="react" /> | ||
| declare const _default: () => JSX.Element; | ||
| export default _default; |
@@ -0,2 +1,3 @@ | ||
| /// <reference types="react" /> | ||
| declare const _default: () => JSX.Element; | ||
| export default _default; |
@@ -0,2 +1,3 @@ | ||
| /// <reference types="react" /> | ||
| declare const _default: () => JSX.Element; | ||
| export default _default; |
+825
-14
@@ -1,3 +0,14 @@ | ||
| import React, { ReactNode, FC } from 'react'; | ||
| /// <reference types="react" /> | ||
| import React$1, { ReactNode, FC, CSSProperties, HTMLAttributes, InputHTMLAttributes, ForwardRefExoticComponent, PureComponent, PropsWithChildren, MouseEvent, ChangeEvent } from 'react'; | ||
| interface ButtonStyle { | ||
| width?: string; | ||
| height?: string; | ||
| borderRadius?: string; | ||
| border?: string; | ||
| cursor?: string; | ||
| background?: string; | ||
| color?: string; | ||
| opacity?: string; | ||
| } | ||
| type ButtonProps = { | ||
@@ -17,7 +28,7 @@ children?: ReactNode; | ||
| */ | ||
| width?: Number; | ||
| width?: number; | ||
| /** | ||
| * @description 高度 | ||
| */ | ||
| height?: Number; | ||
| height?: number; | ||
| /** | ||
@@ -27,3 +38,3 @@ * @description 禁用状态 | ||
| */ | ||
| disabled?: Boolean; | ||
| disabled?: boolean; | ||
| /** | ||
@@ -38,3 +49,3 @@ * @description 按钮形状 | ||
| */ | ||
| dashed?: Boolean; | ||
| dashed?: boolean; | ||
| /** | ||
@@ -44,3 +55,3 @@ * @description 加载状态 | ||
| */ | ||
| loading?: Boolean; | ||
| loading?: boolean; | ||
| /** | ||
@@ -53,3 +64,3 @@ * @description 图标按钮 | ||
| */ | ||
| style?: Object; | ||
| style?: ButtonStyle; | ||
| /** | ||
@@ -61,6 +72,6 @@ * @description 按钮点击回调事件 | ||
| declare const Button: FC<ButtonProps>; | ||
| declare const _default$1: React$1.ForwardRefExoticComponent<ButtonProps & React$1.RefAttributes<unknown>>; | ||
| interface ILazyLoadProps { | ||
| children: React.ReactNode; | ||
| children: React$1.ReactNode; | ||
| /** | ||
@@ -100,5 +111,10 @@ * @description 类名 | ||
| toggleMode?: () => void; | ||
| /** | ||
| * @description trigger 获取弹出层容器 | ||
| */ | ||
| getPopupContainer: (triggerNode: HTMLElement) => HTMLElement; | ||
| zIndex?: number; | ||
| } | ||
| declare const globalConfigContext: React.Context<GlobalConfigProps>; | ||
| declare const globalConfigContext: React$1.Context<GlobalConfigProps>; | ||
| declare const GlobalConfigProvider: (props: Partial<GlobalConfigProps>) => JSX.Element; | ||
@@ -143,3 +159,3 @@ | ||
| className?: string; | ||
| style?: React.CSSProperties; | ||
| style?: React$1.CSSProperties; | ||
| size?: 'large' | 'small' | 'default'; | ||
@@ -161,4 +177,4 @@ shape?: 'circle' | 'square' | 'round' | 'default'; | ||
| className?: string; | ||
| style?: React.CSSProperties; | ||
| children?: React.ReactNode; | ||
| style?: React$1.CSSProperties; | ||
| children?: React$1.ReactNode; | ||
| paragraph?: boolean; | ||
@@ -176,2 +192,797 @@ title?: boolean; | ||
| export { Button, GlobalConfigProvider, LazyLoad, Notification, Skeleton, globalConfigContext }; | ||
| interface BackTopProps { | ||
| style?: React.CSSProperties; | ||
| className?: string; | ||
| /** | ||
| * @description 当滚动到这个高度时,显示返回顶部按钮。 | ||
| * @defaultValue 400 | ||
| */ | ||
| visibleHeight?: number; | ||
| /** | ||
| * @description 设置需要监听其滚动事件的元素,值为一个返回对应 `DOM` 元素的函数。 | ||
| * @defaultValue () => window | ||
| */ | ||
| target?: () => HTMLElement | Window; | ||
| /** | ||
| * @description 点击返回顶部时的回调函数。 | ||
| */ | ||
| onClick?: () => void; | ||
| /** | ||
| * @description 滚动到顶部的缓动方式类型 | ||
| * @defaultValue easeInOut | ||
| */ | ||
| easing?: string; | ||
| /** | ||
| * @description 滚动到顶部的时间。 | ||
| * @defaultValue 400 | ||
| */ | ||
| duration?: number; | ||
| } | ||
| declare const _default: React$1.MemoExoticComponent<React$1.ForwardRefExoticComponent<BackTopProps & { | ||
| children?: React$1.ReactNode; | ||
| } & React$1.RefAttributes<unknown>>>; | ||
| interface TriggerProps { | ||
| className?: string | string[]; | ||
| /** | ||
| * @description 设置弹出框开启或关闭 | ||
| * @default - | ||
| */ | ||
| popupVisible?: boolean; | ||
| /** | ||
| * @description 默认弹出关闭还是开启 | ||
| * @default - | ||
| */ | ||
| defaultPopupVisible?: boolean; | ||
| /** | ||
| * @description 设置弹出内容所插入的父元素 | ||
| * @default - | ||
| */ | ||
| getPopupContainer?: (node: HTMLElement) => Element; | ||
| children?: ReactNode; | ||
| /** | ||
| * @description 动画类名 | ||
| * @defaultValue fadeId | ||
| */ | ||
| classNames?: string; | ||
| /** | ||
| * @description 动画过渡时间 | ||
| * @defaultValue 200 | ||
| */ | ||
| duration?: number | { | ||
| exit?: number; | ||
| enter?: number; | ||
| appear?: number; | ||
| }; | ||
| /** | ||
| * @description 隐藏后是否销毁 DOM 结构 | ||
| * @defaultValue true | ||
| */ | ||
| unmountOnExit?: boolean; | ||
| /** | ||
| * @description 弹出位置,一共有 12 个方位可供选择 | ||
| * @defaultValue bottom | ||
| */ | ||
| position?: 'top' | 'tl' | 'tr' | 'bottom' | 'bl' | 'br' | 'left' | 'lt' | 'lb' | 'right' | 'rt' | 'rb'; | ||
| /** | ||
| * @description 触发方式 | ||
| * @defaultValue hover | ||
| */ | ||
| trigger?: 'hover' | 'click' | 'focus' | 'contextMenu' | Array<'hover' | 'click' | 'focus' | 'contextMenu'>; | ||
| /** | ||
| * @description mouseenter 触发延时的毫秒数 | ||
| * @defaultValue 100 | ||
| */ | ||
| mouseEnterDelay?: number; | ||
| /** | ||
| * @description 是否在鼠标移出触发节点,移入弹出框时保留弹出框。 | ||
| * @defaultValue true | ||
| */ | ||
| popupHoverStay?: boolean; | ||
| /** | ||
| * @description 是否禁用 | ||
| * @defaultValue false | ||
| */ | ||
| disabled?: boolean; | ||
| /** | ||
| * @description 是否能通过点击触发节点来关闭弹出框 | ||
| * @defaultValue true | ||
| */ | ||
| clickToClose?: boolean; | ||
| /** | ||
| * @description 点击触发节点和弹出框以外的区域的回调。 | ||
| */ | ||
| onClickOutside?: () => void; | ||
| /** | ||
| * @description 是否在点击空白处(触发节点和弹出框以外的区域)时关闭弹出层。 关闭时会触发 `onVisibleChange`。 | ||
| * @defaultValue true | ||
| */ | ||
| clickOutsideToClose?: boolean; | ||
| /** | ||
| * @description 在该元素上执行 clickOutside,触发弹出框关闭 | ||
| * @defaultValue () => window.document | ||
| */ | ||
| getDocument?: () => Element; | ||
| /** | ||
| * @description mouseleave 触发延时的毫秒数 | ||
| * @defaultValue 100 | ||
| */ | ||
| mouseLeaveDelay?: number; | ||
| /** | ||
| * @description 弹出层跟随鼠标位置 | ||
| * @en The popup will align mouse position | ||
| */ | ||
| alignPoint?: boolean; | ||
| /** | ||
| * @description 弹出框(内部)的样式 | ||
| * @defaultValue - | ||
| */ | ||
| popupStyle?: CSSProperties; | ||
| /** | ||
| * @description 是否根据空间自动调整弹出框的位置 | ||
| * @defaultValue true | ||
| */ | ||
| autoFitPosition?: boolean; | ||
| /** | ||
| * @description 弹出框(外部)的样式 | ||
| * @defaultValue - | ||
| */ | ||
| style?: CSSProperties; | ||
| /** | ||
| * @description 弹出框的内容 | ||
| * @defaultValue - | ||
| */ | ||
| popup?: () => ReactNode; | ||
| /** | ||
| * @description | ||
| * 调整弹出框的位置,有四个属性值,`left`, `right`, `top`, `bottom`,分别表示向该方向移动几个像素。 | ||
| * 具体可查看 [示例](/react/components/trigger#设置弹窗位置偏移量) | ||
| * @defaultValue {} | ||
| */ | ||
| popupAlign?: { | ||
| left?: number | [number, number]; | ||
| right?: number | [number, number]; | ||
| top?: number | [number, number]; | ||
| bottom?: number | [number, number]; | ||
| }; | ||
| /** | ||
| * @description 显示或隐藏时触发的回调 | ||
| * @defaultValue - | ||
| */ | ||
| onVisibleChange?: (visible: boolean) => void; | ||
| /** | ||
| * @description 是否展示箭头元素 | ||
| * @defaultValue false | ||
| */ | ||
| showArrow?: boolean; | ||
| childrenPrefix?: string; | ||
| /** | ||
| * @description 箭头元素的所有 html 参数 | ||
| * @defaultValue - | ||
| */ | ||
| arrowProps?: HTMLAttributes<HTMLDivElement>; | ||
| } | ||
| type MouseLocationType = { | ||
| clientX: number; | ||
| clientY: number; | ||
| }; | ||
| interface DropdownProps extends TriggerProps { | ||
| children?: React.ReactNode; | ||
| /** | ||
| * @description 下拉框的内容 | ||
| */ | ||
| droplist?: React.ReactNode; | ||
| } | ||
| declare const Dropdown: (baseProps: DropdownProps) => JSX.Element; | ||
| interface MenuProps extends Omit<HTMLAttributes<HTMLDivElement>, 'className'> { | ||
| children?: React.ReactNode; | ||
| className?: string; | ||
| prefixCls?: string; | ||
| style?: React.CSSProperties; | ||
| inDropdown?: boolean; | ||
| /** | ||
| * @description 菜单风格 | ||
| * @defaultValue light | ||
| */ | ||
| theme?: 'light' | 'dark'; | ||
| /** | ||
| * @description 菜单类型,目前支持垂直(vertical)、水平菜单(horizontal)、弹出(pop) | ||
| * @defaultValue vertical | ||
| */ | ||
| mode?: 'vertical' | 'horizontal' | 'pop' | 'popButton'; | ||
| /** | ||
| * @description 初始选中的菜单项 key 数组 | ||
| * @defaultValue [] | ||
| */ | ||
| defaultSelectedKeys?: string[]; | ||
| /** | ||
| * @description 选中的菜单项 key 数组(受控模式) | ||
| * @defaultValue [] | ||
| */ | ||
| selectedKeys?: string[]; | ||
| /** | ||
| * @description 菜单选项是否可选 | ||
| * @defaultValue true | ||
| */ | ||
| selectable?: boolean; | ||
| /** | ||
| * @description 展开的子菜单 key 数组(受控模式) | ||
| */ | ||
| openKeys?: string[]; | ||
| /** | ||
| * @description 初始展开的子菜单 key 数组 | ||
| */ | ||
| defaultOpenKeys?: string[]; | ||
| /** | ||
| * @description 开启手风琴效果 | ||
| * @defaultValue false | ||
| */ | ||
| accordion?: boolean; | ||
| /** | ||
| * @description 点击子菜单标题的回调 | ||
| */ | ||
| onClickSubMenu?: (key: string, openKeys: string[], keyPath: string[]) => void; | ||
| /** | ||
| * @description 点击菜单项的回调 | ||
| */ | ||
| onClickMenuItem?: (key: string, event: any, keyPath: string[]) => any; | ||
| /** | ||
| * @description 是否水平折叠收起菜单 | ||
| * @default false | ||
| */ | ||
| collapse?: boolean; | ||
| /** | ||
| * @description 弹出模式下可接受所有 `Trigger` 的 `Props` | ||
| */ | ||
| triggerProps?: Partial<TriggerProps>; | ||
| } | ||
| interface MenuSubMenuProps { | ||
| level?: number; | ||
| children?: React.ReactNode; | ||
| className?: string; | ||
| style?: React.CSSProperties; | ||
| key: string; | ||
| _key?: string; | ||
| /** | ||
| * @description 子菜单的标题 | ||
| */ | ||
| title: string | ReactNode; | ||
| /** | ||
| * @description 子菜单的图标 | ||
| */ | ||
| icon?: ReactNode; | ||
| /** | ||
| * @description 弹出模式下可接受所有 `Trigger` 的 `Props` | ||
| */ | ||
| triggerProps?: Partial<TriggerProps>; | ||
| } | ||
| interface MenuItemProps extends Omit<HTMLAttributes<HTMLElement>, 'className'> { | ||
| children?: React.ReactNode; | ||
| className?: string; | ||
| style?: React.CSSProperties; | ||
| key: string; | ||
| _key?: string; | ||
| onClick?: (e: any) => void; | ||
| wrapper?: string | React.FC<any> | React.ComponentClass<any>; | ||
| /** | ||
| * @description 菜单项禁止选中 | ||
| * @defaultValue false | ||
| */ | ||
| disabled?: boolean; | ||
| } | ||
| declare const Menu: { | ||
| (baseProps: MenuProps): JSX.Element; | ||
| Item: { | ||
| (props: MenuItemProps): JSX.Element; | ||
| menuType: string; | ||
| }; | ||
| SubMenu: React$1.ForwardRefExoticComponent<MenuSubMenuProps & React$1.RefAttributes<unknown>>; | ||
| defaultProps: { | ||
| isMenu: boolean; | ||
| }; | ||
| }; | ||
| interface InputProps extends Omit<InputHTMLAttributes<HTMLInputElement>, 'onChange' | 'prefix' | 'className' | 'size' | 'height' | 'maxLength'> { | ||
| style?: CSSProperties; | ||
| className?: string; | ||
| /** | ||
| * @description 默认值 | ||
| * @defaultValue '' | ||
| */ | ||
| defaultValue?: string; | ||
| /** | ||
| * @description 提示文本 | ||
| * @defaultValue '' | ||
| */ | ||
| placeholder?: string; | ||
| /** | ||
| * @description 输入回调 | ||
| * @defaultValue () => {} | ||
| */ | ||
| onChange?: (value: string, e: any) => void; | ||
| /** | ||
| * @description 输入框的值,受控模式 | ||
| * @defaultValue '' | ||
| */ | ||
| value?: string; | ||
| /** | ||
| * @description 输入框前添加元素 | ||
| * @defaultValue '' | ||
| */ | ||
| addBefore?: ReactNode; | ||
| /** | ||
| * @description 输入框后添加元素 | ||
| * @defaultValue '' | ||
| */ | ||
| addAfter?: ReactNode; | ||
| /** | ||
| * @description 添加前缀文字或者图标 | ||
| * @defaultValue '' | ||
| */ | ||
| prefix?: ReactNode; | ||
| /** | ||
| * @description 添加后缀文字或者图标 | ||
| * @defaultValue '' | ||
| */ | ||
| suffix?: ReactNode; | ||
| /** | ||
| * @description 按下回车键的回调 | ||
| * @defaultValue () => {} | ||
| */ | ||
| onPressEnter?: (e: any) => void; | ||
| /** | ||
| * @description 输入框最大输入的长度 | ||
| * @defaultValue | ||
| */ | ||
| maxLength?: number | { | ||
| length: number; | ||
| errorOnly?: boolean; | ||
| }; | ||
| /** | ||
| * @description 是否禁用 | ||
| * @defaultValue false | ||
| */ | ||
| disabled?: boolean; | ||
| /** | ||
| * @description 输入框的尺寸 | ||
| * @defaultValue 'default' | ||
| */ | ||
| size?: 'mini' | 'small' | 'default' | 'large'; | ||
| /** | ||
| * @description 配合 `maxLength`,显示字数统计 | ||
| * @defaultValue false | ||
| */ | ||
| showWordLimit?: boolean; | ||
| } | ||
| type RefInputType = { | ||
| /** 使输入框失去焦点 */ | ||
| blur: () => void; | ||
| /** 使输入框获取焦点 */ | ||
| focus: () => void; | ||
| /** input dom元素 */ | ||
| dom: HTMLInputElement; | ||
| }; | ||
| interface InputPasswordProps extends InputProps { | ||
| /** | ||
| * @description 是否显示切换密码可见状态的按钮 | ||
| * @defaultValue false | ||
| */ | ||
| visibilityToggle?: boolean; | ||
| /** | ||
| * @description 初始是否显示 | ||
| * @defaultValue false | ||
| */ | ||
| defaultVisibility?: boolean; | ||
| /** | ||
| * @description 是否显示 | ||
| * @defaultValue false | ||
| */ | ||
| visibility?: boolean; | ||
| /** | ||
| * @description visibility 改变时触发 | ||
| * @defaultValue () => {} | ||
| */ | ||
| onVisibilityChange?: (visibility: boolean) => void; | ||
| } | ||
| declare const Password: React$1.ForwardRefExoticComponent<InputPasswordProps & React$1.RefAttributes<RefInputType>>; | ||
| type InputType = ForwardRefExoticComponent<InputProps & React$1.RefAttributes<RefInputType>> & { | ||
| Password: typeof Password; | ||
| }; | ||
| declare const InputElement: InputType; | ||
| interface TooltipProps { | ||
| style?: CSSProperties; | ||
| className?: string | string[]; | ||
| /** | ||
| * @description 触发方式 | ||
| * @default hover | ||
| */ | ||
| trigger?: TriggerProps['trigger']; | ||
| children: React.ReactNode; | ||
| /** | ||
| * @description 提示内容 | ||
| * @default '' | ||
| */ | ||
| content: React.ReactNode; | ||
| /** | ||
| * @description 弹出框挂载的节点 | ||
| * @default document.body | ||
| */ | ||
| getPopupContainer?: (node: HTMLElement) => Element; | ||
| /** | ||
| * @description 弹出框的方位,有 12 个方位可供选择 | ||
| * @defaultValue top | ||
| */ | ||
| position?: 'top' | 'tl' | 'tr' | 'bottom' | 'bl' | 'br' | 'left' | 'lt' | 'lb' | 'right' | 'rt' | 'rb'; | ||
| /** | ||
| * @description 弹出框的背景颜色 | ||
| * @default - | ||
| */ | ||
| color?: string; | ||
| /** | ||
| * @description 迷你尺寸 | ||
| * @default false | ||
| */ | ||
| mini?: boolean; | ||
| } | ||
| declare const Tooltip: (props: TooltipProps) => JSX.Element; | ||
| interface CalendarProps { | ||
| } | ||
| declare const Calendar: (props: CalendarProps) => JSX.Element; | ||
| type Rect = { | ||
| width: number; | ||
| height: number; | ||
| top: number; | ||
| left: number; | ||
| bottom: number; | ||
| right: number; | ||
| pageTop: number; | ||
| pageLeft: number; | ||
| center: { | ||
| x: number; | ||
| y: number; | ||
| }; | ||
| }; | ||
| declare function getDOMPos(dom: HTMLElement): Partial<Rect>; | ||
| interface TriggerState { | ||
| popupVisible: boolean; | ||
| popupStyle: CSSProperties; | ||
| } | ||
| type EventsByTriggerNeedType = 'onClick' | 'onMouseEnter' | 'onMouseLeave' | 'onMouseMove' | 'onFocus' | 'onBlur' | 'onContextMenu' | 'onKeyDown'; | ||
| declare class Trigger extends PureComponent<TriggerProps, TriggerState> { | ||
| static displayName: string; | ||
| context: React$1.ContextType<typeof globalConfigContext>; | ||
| popupOpen: boolean; | ||
| isDidMount: boolean; | ||
| unMount: boolean; | ||
| mouseLocation: MouseLocationType; | ||
| arrowStyle: CSSProperties; | ||
| childrenDom: any; | ||
| delayTimer: any; | ||
| hasPopupMouseDown: boolean; | ||
| popupContainer: any; | ||
| handleClickOutside: boolean; | ||
| realPosition: string; | ||
| mouseDownTimeout: any; | ||
| triggerRef: React$1.RefObject<HTMLElement>; | ||
| childrenDomSize: ReturnType<typeof getDOMPos>; | ||
| getMergedProps(baseProps?: any): PropsWithChildren<TriggerProps>; | ||
| constructor(props: TriggerProps); | ||
| static getDerivedStateFromProps(nextProps: any, prevState: any): { | ||
| popupVisible: any; | ||
| }; | ||
| componentDidMount(): void; | ||
| componentDidUpdate(_prevProps: Readonly<TriggerProps>): void; | ||
| onClickOutside: (e: any) => void; | ||
| getPopupStyle(): any; | ||
| showPopup: (callback?: () => void) => void; | ||
| update: { | ||
| (...args: any[]): void; | ||
| cancel(): void; | ||
| }; | ||
| getContainer: () => HTMLDivElement; | ||
| getTransformTranslate: () => "" | "scaleY(0.9) translateY(-4px)" | "scaleY(0.9) translateY(4px)"; | ||
| rafId: number; | ||
| appendToContainer(node: HTMLDivElement): void; | ||
| isPopupHoverHide: () => boolean; | ||
| isTrigger: (trigerName: TriggerProps['trigger']) => boolean; | ||
| isClickToHide: () => boolean; | ||
| /** | ||
| * 获取children,如果是string或number类型 | ||
| * 当 children 中的元素 disabled 时,不能正确触发 hover 等事件,所以当监测到对应 | ||
| * 组件有 disabled 时,给元素加一层 span,处理事件,模拟样式 | ||
| * @returns | ||
| */ | ||
| getChild: () => React$1.ReactNode; | ||
| triggerPropsEvent: (eventName: EventsByTriggerNeedType, e?: any) => void; | ||
| triggerOriginEvent: (event: EventsByTriggerNeedType, e?: any) => () => void; | ||
| clearDelayTimer(): void; | ||
| delayToDo: (cb: () => void, delay?: number) => void; | ||
| setPopupVisible(visible: boolean, delay?: number, cb?: () => void): void; | ||
| onMouseEnter: (e: any) => void; | ||
| onMouseLeave: (e: any) => void; | ||
| onPopupMouseEnter: () => void; | ||
| onPopupMouseLeave: (e: any) => void; | ||
| setMouseLocation: (e: MouseEvent) => void; | ||
| onClick: (e: any) => void; | ||
| onContextMenu: (e: any) => void; | ||
| onPopupMouseDown: () => void; | ||
| hideContextMenu: (e: any) => void; | ||
| render(): ReactNode; | ||
| } | ||
| interface RateProps { | ||
| style?: CSSProperties; | ||
| className?: string | string[]; | ||
| /** | ||
| * @description 默认值 | ||
| * @default 0 | ||
| */ | ||
| defaultValue?: number; | ||
| /** | ||
| * @description 自定义字符 | ||
| * @default starIcon | ||
| */ | ||
| character?: React$1.ReactNode | ((index: number) => ReactNode); | ||
| /** | ||
| * @description 星的总数 | ||
| * @default 5 | ||
| */ | ||
| count?: number; | ||
| /** | ||
| * @description 选中的星的个数(受控) | ||
| * @default 5 | ||
| */ | ||
| value?: number; | ||
| /** | ||
| * @description 是否允许半选 | ||
| * @default false | ||
| */ | ||
| allowHalf?: boolean; | ||
| /** | ||
| * @description 是否允许清除 | ||
| * @default false | ||
| */ | ||
| allowClear?: boolean; | ||
| /** | ||
| * @description 是否只读,无法进行交互 | ||
| * @default false | ||
| */ | ||
| readOnly?: boolean; | ||
| /** | ||
| * @description 是否禁用 | ||
| * @default false | ||
| */ | ||
| disabled?: boolean; | ||
| /** | ||
| * @description 选中时的回调 | ||
| * @default - | ||
| */ | ||
| onChange?: (value: number) => void; | ||
| /** | ||
| * @description 鼠标移入时的回调 | ||
| * @default - | ||
| */ | ||
| onHoverChange?: (value: number) => void; | ||
| } | ||
| declare const Rate: (baseProps: RateProps) => JSX.Element; | ||
| interface RadioProps<T = any> extends Omit<HTMLAttributes<HTMLLabelElement>, 'children' | 'className' | 'onChange'> { | ||
| style?: React.CSSProperties; | ||
| className?: string; | ||
| /** | ||
| * @description 是否禁用 | ||
| * @default false | ||
| */ | ||
| disabled?: boolean; | ||
| /** | ||
| * @description 控件的value值 | ||
| * @default - | ||
| */ | ||
| value?: T; | ||
| /** | ||
| * @description 是否选中 | ||
| * @default false | ||
| */ | ||
| checked?: boolean; | ||
| /** | ||
| * @description 初始是否选中 | ||
| * @default false | ||
| */ | ||
| defaultChecked?: boolean; | ||
| /** | ||
| * @description 选中状态发生变化时的回调函数 | ||
| * @default - | ||
| */ | ||
| onChange?: (checked: boolean, event: ChangeEvent) => void; | ||
| children?: ReactNode | ((value: { | ||
| checked: boolean; | ||
| }) => ReactNode); | ||
| } | ||
| interface RadioGroupProps { | ||
| style?: React.CSSProperties; | ||
| className?: string; | ||
| disabled?: boolean; | ||
| /** | ||
| * @description `Radio` 的 name | ||
| * @default - | ||
| */ | ||
| name?: string; | ||
| /** | ||
| * @description `Radio` 的 类型 | ||
| * @default 'radio' | ||
| */ | ||
| type?: 'radio' | 'button'; | ||
| onChange?: (value: any, event: ChangeEvent) => void; | ||
| /** | ||
| * @description 默认选中的值 | ||
| * @default - | ||
| */ | ||
| defaultValue?: any; | ||
| /** | ||
| * @description 选中的值(受控) | ||
| * @default - | ||
| */ | ||
| value?: any; | ||
| } | ||
| interface RadioGroupContextProps { | ||
| type: 'radio' | 'button'; | ||
| value?: any; | ||
| disabled?: boolean; | ||
| name?: string; | ||
| onChangeValue?: (value: any, event: ChangeEvent) => void; | ||
| group?: boolean; | ||
| } | ||
| declare function Group(baseProps: PropsWithChildren<RadioGroupProps>): JSX.Element; | ||
| declare namespace Group { | ||
| var displayName: string; | ||
| } | ||
| declare const Radio: { | ||
| (baseProps: RadioProps): JSX.Element; | ||
| displayName: string; | ||
| GroupContext: React$1.Context<RadioGroupContextProps>; | ||
| Group: typeof Group; | ||
| }; | ||
| interface FormProps { | ||
| style?: React.CSSProperties; | ||
| className?: string; | ||
| initialValues?: { | ||
| [key: string]: any; | ||
| }; | ||
| children: React.ReactElement | React.ReactElement[]; | ||
| onUpdated?: (values: { | ||
| [key: string]: any; | ||
| }) => void; | ||
| onReset?: () => void; | ||
| onClear?: () => void; | ||
| } | ||
| declare const FormComponent: React$1.ForwardRefExoticComponent<FormProps & React$1.RefAttributes<unknown>>; | ||
| interface DividerProps { | ||
| /** | ||
| * @description: 分割线文字的位置 | ||
| * @default: center | ||
| * @type: 'left' | 'right' | 'center' | ||
| */ | ||
| position?: 'left' | 'right' | 'center'; | ||
| /** | ||
| * @description: 分割线文字 | ||
| * @default: '' | ||
| * @type: string | React.ReactNode; | ||
| */ | ||
| children?: string | React$1.ReactNode; | ||
| /** | ||
| * @description: 分割线类型 | ||
| * @default: horizontal | ||
| * @type: 'horizontal' | 'vertical' | ||
| */ | ||
| type?: 'horizontal' | 'vertical'; | ||
| style?: React$1.CSSProperties; | ||
| className?: string; | ||
| } | ||
| declare const Divider: (props: DividerProps) => JSX.Element; | ||
| interface CheckboxProps extends Omit<HTMLAttributes<HTMLLabelElement>, 'children' | 'className' | 'onChange'> { | ||
| style?: React.CSSProperties; | ||
| className?: string; | ||
| /** | ||
| * @description 是否禁用 | ||
| * @default false | ||
| */ | ||
| disabled?: boolean; | ||
| /** | ||
| * @description 是否选中 | ||
| * @default false | ||
| */ | ||
| checked?: boolean; | ||
| /** | ||
| * @description 半选状态 | ||
| */ | ||
| indeterminate?: boolean; | ||
| /** | ||
| * @description 是否默认选中 | ||
| * @default false | ||
| */ | ||
| defaultChecked?: boolean; | ||
| /** | ||
| * @description 选中状态变化时触发 | ||
| * @param checked 选中状态 | ||
| * @param event 事件对象 | ||
| * @default - | ||
| * @return - | ||
| * @example onChange={(checked, event) => {}} | ||
| */ | ||
| onChange?: (checked: boolean, event: React.ChangeEvent<HTMLInputElement>) => void; | ||
| /** | ||
| * @description 复选框的值 | ||
| * @default - | ||
| */ | ||
| value?: string | number; | ||
| children?: ReactNode | ((value: { | ||
| checked: boolean; | ||
| indeterminate: boolean; | ||
| }) => ReactNode); | ||
| } | ||
| interface CheckboxGroupProps { | ||
| style?: React.CSSProperties; | ||
| className?: string; | ||
| /** | ||
| * @description 是否禁用 | ||
| * @default false | ||
| */ | ||
| /** | ||
| * @zh 可选项 | ||
| * @en Specifies options | ||
| */ | ||
| options?: ((string | number) | { | ||
| label: ReactNode; | ||
| value: string | number; | ||
| disabled?: boolean; | ||
| })[]; | ||
| disabled?: boolean; | ||
| /** | ||
| * @description 默认选中的值 | ||
| * @default - | ||
| */ | ||
| defaultValue?: string[]; | ||
| /** | ||
| * @description 选中的值(受控) | ||
| * @default - | ||
| */ | ||
| value?: (string | number)[]; | ||
| /** | ||
| * @zh 变化时的回调函数 | ||
| * @en Callback when the state changes | ||
| */ | ||
| onChange?: (value: (string | number)[], e: ChangeEvent<HTMLInputElement>) => void; | ||
| } | ||
| declare const CheckboxGroup: FC<PropsWithChildren<CheckboxGroupProps>>; | ||
| interface ForwardRefCheckboxType extends React$1.ForwardRefExoticComponent<React$1.PropsWithoutRef<CheckboxProps> & React$1.RefAttributes<unknown>> { | ||
| (props: React$1.PropsWithChildren & { | ||
| ref?: React$1.Ref<unknown>; | ||
| }): React$1.ReactElement; | ||
| Group: typeof CheckboxGroup; | ||
| } | ||
| declare const CheckboxComponent: ForwardRefCheckboxType; | ||
| export { _default as BackTop, _default$1 as Button, Calendar, CheckboxComponent as Checkbox, Divider, Dropdown, FormComponent as Form, GlobalConfigProvider, InputElement as Input, LazyLoad, Menu, Notification, Radio, Rate, Skeleton, Tooltip, Trigger, globalConfigContext }; |
@@ -1,5 +0,5 @@ | ||
| import { FC } from 'react'; | ||
| import './index.less'; | ||
| import React from 'react'; | ||
| import { ButtonProps } from './type'; | ||
| declare const Button: FC<ButtonProps>; | ||
| export default Button; | ||
| declare const _default: React.ForwardRefExoticComponent<ButtonProps & React.RefAttributes<unknown>>; | ||
| export default _default; |
@@ -26,7 +26,7 @@ import { ReactNode } from 'react'; | ||
| */ | ||
| width?: Number; | ||
| width?: number; | ||
| /** | ||
| * @description 高度 | ||
| */ | ||
| height?: Number; | ||
| height?: number; | ||
| /** | ||
@@ -36,3 +36,3 @@ * @description 禁用状态 | ||
| */ | ||
| disabled?: Boolean; | ||
| disabled?: boolean; | ||
| /** | ||
@@ -47,3 +47,3 @@ * @description 按钮形状 | ||
| */ | ||
| dashed?: Boolean; | ||
| dashed?: boolean; | ||
| /** | ||
@@ -53,3 +53,3 @@ * @description 加载状态 | ||
| */ | ||
| loading?: Boolean; | ||
| loading?: boolean; | ||
| /** | ||
@@ -62,3 +62,3 @@ * @description 图标按钮 | ||
| */ | ||
| style?: Object; | ||
| style?: ButtonStyle; | ||
| /** | ||
@@ -65,0 +65,0 @@ * @description 按钮点击回调事件 |
@@ -0,2 +1,3 @@ | ||
| /// <reference types="react" /> | ||
| declare const Demo: () => JSX.Element; | ||
| export default Demo; |
@@ -0,2 +1,3 @@ | ||
| /// <reference types="react" /> | ||
| declare const Demo: () => JSX.Element; | ||
| export default Demo; |
@@ -0,2 +1,3 @@ | ||
| /// <reference types="react" /> | ||
| declare const Demo: () => JSX.Element; | ||
| export default Demo; |
@@ -1,5 +0,1 @@ | ||
| import React from 'react'; | ||
| import { CheckboxProps } from './type'; | ||
| import './Index.less'; | ||
| declare const _default: React.ForwardRefExoticComponent<CheckboxProps & React.RefAttributes<unknown>>; | ||
| export default _default; | ||
| export { default as default } from './Checkbox'; |
@@ -1,2 +0,2 @@ | ||
| import { HTMLAttributes, ReactNode } from 'react'; | ||
| import { ChangeEvent, HTMLAttributes, ReactNode } from 'react'; | ||
| export interface CheckboxProps extends Omit<HTMLAttributes<HTMLLabelElement>, 'children' | 'className' | 'onChange'> { | ||
@@ -16,2 +16,6 @@ style?: React.CSSProperties; | ||
| /** | ||
| * @description 半选状态 | ||
| */ | ||
| indeterminate?: boolean; | ||
| /** | ||
| * @description 是否默认选中 | ||
@@ -35,3 +39,39 @@ * @default false | ||
| value?: string | number; | ||
| children?: ReactNode; | ||
| children?: ReactNode | ((value: { | ||
| checked: boolean; | ||
| indeterminate: boolean; | ||
| }) => ReactNode); | ||
| } | ||
| export interface CheckboxGroupProps { | ||
| style?: React.CSSProperties; | ||
| className?: string; | ||
| /** | ||
| * @description 是否禁用 | ||
| * @default false | ||
| */ | ||
| /** | ||
| * @zh 可选项 | ||
| * @en Specifies options | ||
| */ | ||
| options?: ((string | number) | { | ||
| label: ReactNode; | ||
| value: string | number; | ||
| disabled?: boolean; | ||
| })[]; | ||
| disabled?: boolean; | ||
| /** | ||
| * @description 默认选中的值 | ||
| * @default - | ||
| */ | ||
| defaultValue?: string[]; | ||
| /** | ||
| * @description 选中的值(受控) | ||
| * @default - | ||
| */ | ||
| value?: (string | number)[]; | ||
| /** | ||
| * @zh 变化时的回调函数 | ||
| * @en Callback when the state changes | ||
| */ | ||
| onChange?: (value: (string | number)[], e: ChangeEvent<HTMLInputElement>) => void; | ||
| } |
@@ -24,3 +24,8 @@ import { ReactNode } from 'react'; | ||
| toggleMode?: () => void; | ||
| /** | ||
| * @description trigger 获取弹出层容器 | ||
| */ | ||
| getPopupContainer: (triggerNode: HTMLElement) => HTMLElement; | ||
| zIndex?: number; | ||
| } | ||
| export type { GlobalConfigProps }; |
+12
-0
@@ -6,2 +6,14 @@ export { default as Button } from './Button/Index'; | ||
| export { default as Skeleton } from './Skeleton/Index'; | ||
| export { default as BackTop } from './BackTop/'; | ||
| export { default as Dropdown } from './Dropdown'; | ||
| export { default as Menu } from './Menu'; | ||
| export { default as Input } from './Input'; | ||
| export { default as Tooltip } from './Tooltip'; | ||
| export { default as Calendar } from './Calendar'; | ||
| export { default as Trigger } from './Trigger'; | ||
| export { default as Rate } from './Rate'; | ||
| export { default as Radio } from './Radio'; | ||
| export { default as Form } from './Form'; | ||
| export { default as Divider } from './Divider'; | ||
| export { default as Checkbox } from './CheckBox/Index'; | ||
| import './styles/common.less'; |
@@ -0,1 +1,2 @@ | ||
| /// <reference types="react" /> | ||
| import { INotificationProps } from './type'; | ||
@@ -2,0 +3,0 @@ import './index.less'; |
@@ -0,2 +1,3 @@ | ||
| /// <reference types="react" /> | ||
| declare const _default: () => JSX.Element; | ||
| export default _default; |
@@ -0,2 +1,3 @@ | ||
| /// <reference types="react" /> | ||
| declare const _default: () => JSX.Element; | ||
| export default _default; |
@@ -0,2 +1,3 @@ | ||
| /// <reference types="react" /> | ||
| declare const _default: () => JSX.Element; | ||
| export default _default; |
+18
-11
| { | ||
| "name": "@caron/caron", | ||
| "version": "1.0.2", | ||
| "version": "1.0.3", | ||
| "description": "caron Component library for PC", | ||
@@ -18,3 +18,4 @@ "authors": { | ||
| "build": "rollup -c ./rollup.config.js", | ||
| "test": "echo \"Error: no test specified\" && exit 1" | ||
| "test": "echo \"Error: no test specified\" && exit 1", | ||
| "createTemp": "create-temp" | ||
| }, | ||
@@ -28,3 +29,2 @@ "files": [ | ||
| "license": "ISC", | ||
| "dependencies": {}, | ||
| "peerDependencies": { | ||
@@ -37,18 +37,22 @@ "react": "17", | ||
| "@ant-design/icons": "^4.7.0", | ||
| "@arco-design/color": "^0.4.0", | ||
| "@babel/plugin-transform-runtime": "^7.18.10", | ||
| "@babel/preset-react": "^7.18.6", | ||
| "@caron/caron": "workspace:*", | ||
| "@caron/caron-temp-cli": "workspace:*", | ||
| "@caron/caron-hooks": "^1.0.0", | ||
| "autoprefixer": "^10.4.13", | ||
| "classnames": "^2.3.2", | ||
| "core-js": "^3.24.1", | ||
| "cssnano": "^5.1.14", | ||
| "dayjs": "^1.11.4", | ||
| "dumi-theme-default": "^1.1.23", | ||
| "easy-bezier-animation": "^0.0.3", | ||
| "esbuild": "^0.15.5", | ||
| "less": "^4.1.3", | ||
| "lodash": "^4.17.21", | ||
| "postcss-import": "^15.0.0", | ||
| "react": "17", | ||
| "react-dom": "17", | ||
| "@caron/caron": "workspace:*", | ||
| "@arco-design/color": "^0.4.0", | ||
| "autoprefixer": "^10.4.13", | ||
| "cssnano": "^5.1.14", | ||
| "dumi-theme-default": "^1.1.23", | ||
| "esbuild": "^0.15.5", | ||
| "postcss-import": "^15.0.0", | ||
| "react-transition-group": "^4.4.5", | ||
| "rollup": "^2.78.0", | ||
@@ -76,3 +80,6 @@ "rollup-plugin-babel": "^4.4.0", | ||
| "last 3 iOS versions" | ||
| ] | ||
| ], | ||
| "dependencies": { | ||
| "@caron/caron-hooks": "^1.0.0" | ||
| } | ||
| } |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
URL strings
Supply chain riskPackage contains fragments of external URLs or IP addresses, which the package may be accessing at runtime.
595029
230.61%369
161.7%7872
193.4%3
50%36
12.5%50
1150%1
Infinity%+ Added
+ Added