@ioca/react 1.5.29 → 1.5.30
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/css/index.css +1 -1
- package/lib/es/components/checkbox/checkbox.js +1 -1
- package/lib/es/components/form/useForm.js +3 -4
- package/lib/es/components/input/input.js +2 -2
- package/lib/es/components/input/number.js +3 -5
- package/lib/es/components/input/range.js +2 -2
- package/lib/es/components/input/textarea.js +1 -1
- package/lib/es/components/modal/hookModal.js +11 -1
- package/lib/es/components/modal/modal.js +24 -16
- package/lib/es/components/pill/pill.js +2 -2
- package/lib/es/components/select/options.js +5 -7
- package/lib/es/components/select/select.js +4 -8
- package/lib/es/index.js +1 -2
- package/lib/index.js +276 -275
- package/lib/types/components/form/useForm.d.ts +1 -1
- package/lib/types/components/modal/type.d.ts +1 -1
- package/lib/types/components/pill/type.d.ts +1 -0
- package/lib/types/index.d.ts +1 -2
- package/package.json +1 -1
- package/lib/es/components/card/card.js +0 -12
- package/lib/es/components/card/index.js +0 -5
- package/lib/types/components/card/card.d.ts +0 -6
- package/lib/types/components/card/index.d.ts +0 -5
- package/lib/types/components/card/type.d.ts +0 -13
|
@@ -10,7 +10,7 @@ declare class IFormInstance {
|
|
|
10
10
|
set(field: any, value?: any): void;
|
|
11
11
|
delete(field: string): void;
|
|
12
12
|
clear(): void;
|
|
13
|
-
validate(field?: string): Promise<
|
|
13
|
+
validate(field?: string): Promise<false | Record<string, any>>;
|
|
14
14
|
}
|
|
15
15
|
declare function useForm(form?: IFormInstance): IFormInstance;
|
|
16
16
|
|
|
@@ -6,7 +6,7 @@ interface IModal extends Omit<HTMLAttributes<HTMLDivElement>, "title"> {
|
|
|
6
6
|
visible?: boolean;
|
|
7
7
|
title?: ReactNode;
|
|
8
8
|
footer?: ReactNode;
|
|
9
|
-
closable?: boolean;
|
|
9
|
+
closable?: boolean | (() => boolean | Promise<boolean>);
|
|
10
10
|
hideCloseButton?: boolean;
|
|
11
11
|
hideBackdrop?: boolean;
|
|
12
12
|
backdropClosable?: boolean;
|
|
@@ -14,6 +14,7 @@ interface IPill extends Omit<HTMLAttributes<HTMLDivElement>, "onChange" | "value
|
|
|
14
14
|
validator?: (value: any) => boolean | Promise<boolean>;
|
|
15
15
|
format?: (value: any) => any;
|
|
16
16
|
onUpdate?: (newValue: any, oldValue: any, type: "delete" | "create" | "update") => void | Promise<boolean>;
|
|
17
|
+
hideCreate?: boolean;
|
|
17
18
|
renderItem?: (context: {
|
|
18
19
|
value: any;
|
|
19
20
|
index: number;
|
package/lib/types/index.d.ts
CHANGED
|
@@ -1,10 +1,8 @@
|
|
|
1
1
|
export { default as Affix } from './components/affix/affix.js';
|
|
2
2
|
export { default as Badge } from './components/badge/badge.js';
|
|
3
3
|
export { default as Button } from './components/button/button.js';
|
|
4
|
-
export { default as Card } from './components/card/card.js';
|
|
5
4
|
export { default as Checkbox } from './components/checkbox/checkbox.js';
|
|
6
5
|
export { default as Collapse } from './components/collapse/collapse.js';
|
|
7
|
-
export { default as Pill } from './components/pill/pill.js';
|
|
8
6
|
export { default as Datagrid } from './components/datagrid/datagrid.js';
|
|
9
7
|
export { default as Description } from './components/description/description.js';
|
|
10
8
|
export { default as Drawer } from './components/drawer/drawer.js';
|
|
@@ -24,6 +22,7 @@ export { default as ColorPicker } from './components/picker/colors/index.js';
|
|
|
24
22
|
export { default as TimePicker } from './components/picker/time/index.js';
|
|
25
23
|
export { default as DateRange } from './components/picker/daterange/daterange.js';
|
|
26
24
|
export { default as DatePicker } from './components/picker/dates/index.js';
|
|
25
|
+
export { default as Pill } from './components/pill/pill.js';
|
|
27
26
|
export { default as Popconfirm } from './components/popconfirm/popconfirm.js';
|
|
28
27
|
export { default as Popup } from './components/popup/popup.js';
|
|
29
28
|
export { default as Progress } from './components/progress/progress.js';
|
package/package.json
CHANGED
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import { jsxs, jsx } from 'react/jsx-runtime';
|
|
2
|
-
import classNames from 'classnames';
|
|
3
|
-
|
|
4
|
-
const Card = (props) => {
|
|
5
|
-
const { hideShadow, border, className, children, header, footer, ...restProps } = props;
|
|
6
|
-
return (jsxs("div", { className: classNames("i-card", className, {
|
|
7
|
-
shadow: !hideShadow,
|
|
8
|
-
"i-card-bordered": border,
|
|
9
|
-
}), ...restProps, children: [header && jsx("div", { className: 'i-card-header', children: header }), children && jsx("div", { className: 'i-card-content', children: children }), footer && jsx("div", { className: 'i-card-footer', children: footer })] }));
|
|
10
|
-
};
|
|
11
|
-
|
|
12
|
-
export { Card as default };
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import { HTMLAttributes, CSSProperties, ReactNode } from 'react';
|
|
2
|
-
|
|
3
|
-
interface ICard extends HTMLAttributes<HTMLDivElement> {
|
|
4
|
-
hideShadow?: boolean;
|
|
5
|
-
border?: boolean;
|
|
6
|
-
style?: CSSProperties;
|
|
7
|
-
className?: string;
|
|
8
|
-
children?: ReactNode;
|
|
9
|
-
header?: ReactNode;
|
|
10
|
-
footer?: ReactNode;
|
|
11
|
-
}
|
|
12
|
-
|
|
13
|
-
export type { ICard };
|