@ioca/react 1.2.6 → 1.2.8

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.
@@ -301,7 +301,9 @@ interface IEditor {
301
301
  width?: string | number;
302
302
  height?: string | number;
303
303
  autosize?: boolean;
304
- controls?: string[] | "simple" | "all";
304
+ richPaste?: boolean;
305
+ controls?: string[] | "simple" | "all" | "none";
306
+ border?: boolean;
305
307
  onInput?: (html: string, e: FormEvent<HTMLDivElement>) => void;
306
308
  }
307
309
  interface RefEditor {
@@ -311,7 +313,7 @@ interface RefEditor {
311
313
 
312
314
  declare const Editor: (props: IEditor) => react_jsx_runtime.JSX.Element;
313
315
 
314
- interface IFlex {
316
+ interface IFlex extends HTMLAttributes<HTMLElement> {
315
317
  as?: keyof JSX.IntrinsicElements;
316
318
  align?: string;
317
319
  justify?: string;
@@ -319,12 +321,9 @@ interface IFlex {
319
321
  direction?: any;
320
322
  wrap?: any;
321
323
  columns?: string | number;
322
- style?: CSSProperties;
323
- className?: string;
324
- children?: ReactNode;
325
324
  }
326
325
 
327
- declare const Flex: (props: IFlex) => react_jsx_runtime.JSX.Element;
326
+ declare const Flex: React.FC<IFlex>;
328
327
 
329
328
  declare class IFormInstance {
330
329
  readonly id?: string;
@@ -483,15 +482,29 @@ interface IMessage {
483
482
  closable?: boolean;
484
483
  timer?: ReturnType<typeof setTimeout>;
485
484
  className?: string;
485
+ close?: () => void;
486
486
  onShow?: () => void;
487
487
  onHide?: () => void;
488
488
  }
489
489
 
490
- declare function message(config: IMessage | ReactNode): () => void;
490
+ declare function message(config: IMessage | ReactNode): {
491
+ instance: IMessage;
492
+ close: () => void;
493
+ };
491
494
  declare namespace message {
492
- var error: (content: ReactNode) => () => void;
493
- var success: (content: ReactNode) => () => void;
494
- var warning: (content: ReactNode) => () => void;
495
+ var error: (content: ReactNode) => {
496
+ instance: IMessage;
497
+ close: () => void;
498
+ };
499
+ var success: (content: ReactNode) => {
500
+ instance: IMessage;
501
+ close: () => void;
502
+ };
503
+ var warning: (content: ReactNode) => {
504
+ instance: IMessage;
505
+ close: () => void;
506
+ };
507
+ var one: (config: IMessage) => void;
495
508
  }
496
509
 
497
510
  declare function useModal(): {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ioca/react",
3
- "version": "1.2.6",
3
+ "version": "1.2.8",
4
4
  "type": "module",
5
5
  "scripts": {
6
6
  "dev": "vite",