@ioca/react 1.1.3 → 1.1.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,6 +1,6 @@
1
1
  import * as react_jsx_runtime from 'react/jsx-runtime';
2
2
  import * as react from 'react';
3
- import { HTMLAttributes, ReactNode, CSSProperties, ForwardRefExoticComponent, RefAttributes, ButtonHTMLAttributes, AnchorHTMLAttributes, ChangeEvent, InputHTMLAttributes, MouseEvent, TextareaHTMLAttributes, FC, Ref } from 'react';
3
+ import { HTMLAttributes, ReactNode, CSSProperties, ForwardRefExoticComponent, RefAttributes, ButtonHTMLAttributes, AnchorHTMLAttributes, ChangeEvent, KeyboardEvent, InputHTMLAttributes, MouseEvent, TextareaHTMLAttributes, FC, Ref } from 'react';
4
4
  import { LinkProps } from 'react-router-dom';
5
5
  import { Dayjs } from 'dayjs';
6
6
  import { ListProps } from 'rc-virtual-list';
@@ -48,7 +48,7 @@ interface BaseButtonProps {
48
48
  flat?: boolean;
49
49
  outline?: boolean;
50
50
  square?: boolean;
51
- size?: "small" | "normal" | "large" | "extreme";
51
+ size?: "mini" | "small" | "normal" | "large" | "extreme";
52
52
  disabled?: boolean;
53
53
  block?: boolean;
54
54
  round?: boolean;
@@ -113,7 +113,7 @@ interface BaseInput extends TValidate {
113
113
  border?: boolean;
114
114
  tip?: ReactNode;
115
115
  onChange?: (value: any, e?: ChangeEvent<HTMLInputElement | HTMLTextAreaElement>) => void;
116
- onEnter?: () => void;
116
+ onEnter?: (e: KeyboardEvent) => void;
117
117
  }
118
118
  type TPosition = "top" | "right" | "left" | "bottom";
119
119
 
@@ -398,6 +398,7 @@ interface IForm extends HTMLAttributes<HTMLFormElement> {
398
398
  };
399
399
  initialValues?: Record<string, any>;
400
400
  width?: string | number;
401
+ onEnter?: (values: Record<string, any>, form: IFormInstance) => void;
401
402
  }
402
403
  interface IField {
403
404
  name?: string;
@@ -434,6 +435,8 @@ interface IImage extends HTMLAttributes<HTMLImageElement> {
434
435
  lazyload?: boolean;
435
436
  fallback?: ReactNode;
436
437
  fit?: any;
438
+ cover?: ReactNode;
439
+ coverClass?: string;
437
440
  usePreview?: boolean;
438
441
  }
439
442
  interface IImageList extends Omit<IImage, "src" | "alt"> {
@@ -484,6 +487,11 @@ interface IMessage {
484
487
  }
485
488
 
486
489
  declare function message(config: IMessage | ReactNode): () => void;
490
+ declare namespace message {
491
+ var error: (content: ReactNode) => () => void;
492
+ var success: (content: ReactNode) => () => void;
493
+ var warning: (content: ReactNode) => () => void;
494
+ }
487
495
 
488
496
  declare function useModal(): {
489
497
  open: (props: IModal) => void;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ioca/react",
3
- "version": "1.1.3",
3
+ "version": "1.1.4",
4
4
  "type": "module",
5
5
  "scripts": {
6
6
  "dev": "vite",