@rjsf/chakra-ui 5.0.0-beta.2 → 5.0.0-beta.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.
- package/README.md +2 -0
- package/dist/index.d.ts +78 -8
- package/package.json +6 -6
- package/dist/AddButton/AddButton.d.ts +0 -4
- package/dist/AddButton/index.d.ts +0 -2
- package/dist/AltDateTimeWidget/AltDateTimeWidget.d.ts +0 -14
- package/dist/AltDateTimeWidget/index.d.ts +0 -2
- package/dist/AltDateWidget/AltDateWidget.d.ts +0 -13
- package/dist/AltDateWidget/index.d.ts +0 -2
- package/dist/ArrayFieldItemTemplate/ArrayFieldItemTemplate.d.ts +0 -3
- package/dist/ArrayFieldItemTemplate/index.d.ts +0 -2
- package/dist/ArrayFieldTemplate/ArrayFieldTemplate.d.ts +0 -3
- package/dist/ArrayFieldTemplate/index.d.ts +0 -2
- package/dist/BaseInputTemplate/BaseInputTemplate.d.ts +0 -3
- package/dist/BaseInputTemplate/index.d.ts +0 -2
- package/dist/ChakraFrameProvider.d.ts +0 -1
- package/dist/CheckboxWidget/CheckboxWidget.d.ts +0 -3
- package/dist/CheckboxWidget/index.d.ts +0 -2
- package/dist/CheckboxesWidget/CheckboxesWidget.d.ts +0 -3
- package/dist/CheckboxesWidget/index.d.ts +0 -2
- package/dist/CssReset.d.ts +0 -23
- package/dist/DescriptionField/DescriptionField.d.ts +0 -3
- package/dist/DescriptionField/index.d.ts +0 -2
- package/dist/ErrorList/ErrorList.d.ts +0 -3
- package/dist/ErrorList/index.d.ts +0 -2
- package/dist/FieldTemplate/FieldTemplate.d.ts +0 -3
- package/dist/FieldTemplate/WrapIfAdditional.d.ts +0 -7
- package/dist/FieldTemplate/index.d.ts +0 -2
- package/dist/Form/Form.d.ts +0 -4
- package/dist/Form/index.d.ts +0 -2
- package/dist/IconButton/IconButton.d.ts +0 -11
- package/dist/IconButton/index.d.ts +0 -2
- package/dist/ObjectFieldTemplate/ObjectFieldTemplate.d.ts +0 -3
- package/dist/ObjectFieldTemplate/index.d.ts +0 -2
- package/dist/RadioWidget/RadioWidget.d.ts +0 -3
- package/dist/RadioWidget/index.d.ts +0 -2
- package/dist/RangeWidget/RangeWidget.d.ts +0 -3
- package/dist/RangeWidget/index.d.ts +0 -2
- package/dist/SelectWidget/SelectWidget.d.ts +0 -3
- package/dist/SelectWidget/index.d.ts +0 -2
- package/dist/SubmitButton/SubmitButton.d.ts +0 -3
- package/dist/SubmitButton/index.d.ts +0 -2
- package/dist/Templates/Templates.d.ts +0 -20
- package/dist/Templates/index.d.ts +0 -2
- package/dist/TextareaWidget/TextareaWidget.d.ts +0 -3
- package/dist/TextareaWidget/index.d.ts +0 -2
- package/dist/Theme/Theme.d.ts +0 -3
- package/dist/Theme/index.d.ts +0 -2
- package/dist/TitleField/TitleField.d.ts +0 -3
- package/dist/TitleField/index.d.ts +0 -2
- package/dist/UpDownWidget/UpDownWidget.d.ts +0 -3
- package/dist/UpDownWidget/index.d.ts +0 -2
- package/dist/Widgets/Widgets.d.ts +0 -34
- package/dist/Widgets/index.d.ts +0 -2
- package/dist/utils.d.ts +0 -13
package/README.md
CHANGED
|
@@ -38,6 +38,8 @@
|
|
|
38
38
|
- [Prerequisites](#prerequisites)
|
|
39
39
|
- [Installation](#installation)
|
|
40
40
|
- [Usage](#usage)
|
|
41
|
+
- [Optional Chakra UI Theme properties](#optional-chakra-ui-theme-properties)
|
|
42
|
+
- [Custom Chakra uiSchema Chakra Property](#custom-chakra-uischema-chakra-property)
|
|
41
43
|
- [Roadmap](#roadmap)
|
|
42
44
|
- [Contributing](#contributing)
|
|
43
45
|
- [Contact](#contact)
|
package/dist/index.d.ts
CHANGED
|
@@ -1,8 +1,78 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import * as React from 'react';
|
|
3
|
+
import { ComponentType } from 'react';
|
|
4
|
+
import { FormProps, WithThemeProps } from '@rjsf/core';
|
|
5
|
+
import * as _rjsf_utils from '@rjsf/utils';
|
|
6
|
+
import { IconButtonProps, UiSchema } from '@rjsf/utils';
|
|
7
|
+
import { ChakraProps } from '@chakra-ui/react';
|
|
8
|
+
|
|
9
|
+
declare const Form: ComponentType<FormProps>;
|
|
10
|
+
|
|
11
|
+
declare function MoveDownButton(props: IconButtonProps): JSX.Element;
|
|
12
|
+
declare function MoveUpButton(props: IconButtonProps): JSX.Element;
|
|
13
|
+
declare function RemoveButton(props: IconButtonProps): JSX.Element;
|
|
14
|
+
|
|
15
|
+
declare const _default: {
|
|
16
|
+
ArrayFieldItemTemplate: (props: _rjsf_utils.ArrayFieldTemplateItemType<any, any>) => JSX.Element;
|
|
17
|
+
ArrayFieldTemplate: (props: _rjsf_utils.ArrayFieldTemplateProps<any, any>) => JSX.Element;
|
|
18
|
+
BaseInputTemplate: (props: _rjsf_utils.WidgetProps<any, any>) => JSX.Element;
|
|
19
|
+
ButtonTemplates: {
|
|
20
|
+
AddButton: React.ComponentType<_rjsf_utils.IconButtonProps>;
|
|
21
|
+
MoveDownButton: typeof MoveDownButton;
|
|
22
|
+
MoveUpButton: typeof MoveUpButton;
|
|
23
|
+
RemoveButton: typeof RemoveButton;
|
|
24
|
+
SubmitButton: ({ uiSchema }: _rjsf_utils.SubmitButtonProps<any, any>) => JSX.Element | null;
|
|
25
|
+
};
|
|
26
|
+
DescriptionFieldTemplate: ({ description, id }: _rjsf_utils.DescriptionFieldProps<any, any>) => JSX.Element | null;
|
|
27
|
+
ErrorListTemplate: ({ errors }: _rjsf_utils.ErrorListProps<any, any>) => JSX.Element;
|
|
28
|
+
FieldTemplate: (props: _rjsf_utils.FieldTemplateProps<any, any>) => JSX.Element;
|
|
29
|
+
ObjectFieldTemplate: (props: _rjsf_utils.ObjectFieldTemplateProps<any, any>) => JSX.Element;
|
|
30
|
+
TitleFieldTemplate: ({ id, title }: _rjsf_utils.TitleFieldProps<any, any>) => JSX.Element;
|
|
31
|
+
};
|
|
32
|
+
|
|
33
|
+
declare const Theme: WithThemeProps;
|
|
34
|
+
|
|
35
|
+
declare const widgets: {
|
|
36
|
+
AltDateTimeWidget: {
|
|
37
|
+
(props: _rjsf_utils.WidgetProps<any, any>): JSX.Element;
|
|
38
|
+
defaultProps: {
|
|
39
|
+
showTime: boolean;
|
|
40
|
+
autofocus: boolean;
|
|
41
|
+
disabled: boolean;
|
|
42
|
+
readonly: boolean;
|
|
43
|
+
options: {
|
|
44
|
+
yearsRange: number[];
|
|
45
|
+
};
|
|
46
|
+
};
|
|
47
|
+
};
|
|
48
|
+
AltDateWidget: {
|
|
49
|
+
(props: any): JSX.Element;
|
|
50
|
+
defaultProps: {
|
|
51
|
+
autofocus: boolean;
|
|
52
|
+
disabled: boolean;
|
|
53
|
+
readonly: boolean;
|
|
54
|
+
showTime: boolean;
|
|
55
|
+
options: {
|
|
56
|
+
yearsRange: number[];
|
|
57
|
+
};
|
|
58
|
+
};
|
|
59
|
+
};
|
|
60
|
+
CheckboxWidget: (props: _rjsf_utils.WidgetProps<any, any>) => JSX.Element;
|
|
61
|
+
CheckboxesWidget: (props: _rjsf_utils.WidgetProps<any, any>) => JSX.Element;
|
|
62
|
+
RadioWidget: ({ id, schema, options, value, required, disabled, readonly, label, onChange, onBlur, onFocus, uiSchema, }: _rjsf_utils.WidgetProps<any, any>) => JSX.Element;
|
|
63
|
+
RangeWidget: ({ value, readonly, disabled, onBlur, onFocus, options, schema, uiSchema, onChange, label, id, registry, }: _rjsf_utils.WidgetProps<any, any>) => JSX.Element;
|
|
64
|
+
SelectWidget: (props: _rjsf_utils.WidgetProps<any, any>) => JSX.Element;
|
|
65
|
+
TextareaWidget: ({ id, placeholder, value, label, disabled, autofocus, readonly, onBlur, onFocus, onChange, options, schema, uiSchema, required, rawErrors, registry, }: _rjsf_utils.WidgetProps<any, any>) => JSX.Element;
|
|
66
|
+
UpDownWidget: (props: _rjsf_utils.WidgetProps<any, any>) => JSX.Element;
|
|
67
|
+
};
|
|
68
|
+
|
|
69
|
+
declare const __createChakraFrameProvider: (props: any) => ({ document }: any) => JSX.Element;
|
|
70
|
+
|
|
71
|
+
interface ChakraUiSchema extends Omit<UiSchema, "ui:options"> {
|
|
72
|
+
"ui:options"?: ChakraUiOptions;
|
|
73
|
+
}
|
|
74
|
+
declare type ChakraUiOptions = UiSchema["ui:options"] & {
|
|
75
|
+
chakra?: ChakraProps;
|
|
76
|
+
};
|
|
77
|
+
|
|
78
|
+
export { Form, _default as Templates, Theme, ChakraUiSchema as UiSchema, widgets as Widgets, __createChakraFrameProvider, Form as default };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rjsf/chakra-ui",
|
|
3
|
-
"version": "5.0.0-beta.
|
|
3
|
+
"version": "5.0.0-beta.4",
|
|
4
4
|
"description": "Chakra UI theme, fields, and widgets for react-jsonschema-form",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"module": "dist/chakra-ui.esm.js",
|
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
],
|
|
11
11
|
"scripts": {
|
|
12
12
|
"start": "dts watch",
|
|
13
|
-
"build": "rimraf dist && dts build --format cjs,esm,umd",
|
|
13
|
+
"build": "rimraf dist && dts build --rollupTypes --format cjs,esm,umd",
|
|
14
14
|
"cs-check": "prettier -l \"{src,test}/**/*.ts?(x)\"",
|
|
15
15
|
"cs-format": "prettier \"{src,test}/**/*.ts?(x)\" --write",
|
|
16
16
|
"lint": "eslint src test",
|
|
@@ -59,9 +59,9 @@
|
|
|
59
59
|
"@emotion/jest": "^11.10.0",
|
|
60
60
|
"@emotion/react": "^11.10.0",
|
|
61
61
|
"@emotion/styled": "^11.10.0",
|
|
62
|
-
"@rjsf/core": "^5.0.0-beta.
|
|
63
|
-
"@rjsf/utils": "^5.0.0-beta.
|
|
64
|
-
"@rjsf/validator-ajv6": "^5.0.0-beta.
|
|
62
|
+
"@rjsf/core": "^5.0.0-beta.4",
|
|
63
|
+
"@rjsf/utils": "^5.0.0-beta.4",
|
|
64
|
+
"@rjsf/validator-ajv6": "^5.0.0-beta.4",
|
|
65
65
|
"@types/react": "^17.0.37",
|
|
66
66
|
"@types/react-dom": "^17.0.11",
|
|
67
67
|
"@types/react-test-renderer": "^17.0.1",
|
|
@@ -78,5 +78,5 @@
|
|
|
78
78
|
"chakra-react-select": "^3.3.8",
|
|
79
79
|
"react-select": "^5.4.0"
|
|
80
80
|
},
|
|
81
|
-
"gitHead": "
|
|
81
|
+
"gitHead": "3c19f461eb25cc33dec8bf2cc2fc458d4de4cf23"
|
|
82
82
|
}
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import { WidgetProps } from "@rjsf/utils";
|
|
2
|
-
declare const AltDateTimeWidget: {
|
|
3
|
-
(props: WidgetProps): JSX.Element;
|
|
4
|
-
defaultProps: {
|
|
5
|
-
showTime: boolean;
|
|
6
|
-
autofocus: boolean;
|
|
7
|
-
disabled: boolean;
|
|
8
|
-
readonly: boolean;
|
|
9
|
-
options: {
|
|
10
|
-
yearsRange: number[];
|
|
11
|
-
};
|
|
12
|
-
};
|
|
13
|
-
};
|
|
14
|
-
export default AltDateTimeWidget;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare const __createChakraFrameProvider: (props: any) => ({ document }: any) => JSX.Element;
|
package/dist/CssReset.d.ts
DELETED
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
*
|
|
3
|
-
* The reason we need this is for ChakraProvider styling in Playground.
|
|
4
|
-
* The User Developer would be responsible for styling with ChakraProvider in their app.
|
|
5
|
-
*
|
|
6
|
-
* Exact duplicate of `@chakra-ui/react`'s `CSSReset` component. Except for the following:
|
|
7
|
-
*
|
|
8
|
-
```css
|
|
9
|
-
input {
|
|
10
|
-
border-width: revert;
|
|
11
|
-
border-color: revert;
|
|
12
|
-
border-style: revert;
|
|
13
|
-
}
|
|
14
|
-
.array-item > hr {
|
|
15
|
-
margin-top: 16px;
|
|
16
|
-
margin-bottom: 16px;
|
|
17
|
-
}
|
|
18
|
-
```
|
|
19
|
-
|
|
20
|
-
It is located at the bottom of the styles string.
|
|
21
|
-
*/
|
|
22
|
-
export declare const CSSReset: () => JSX.Element;
|
|
23
|
-
export default CSSReset;
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import React from "react";
|
|
2
|
-
import { FieldTemplateProps } from "@rjsf/utils";
|
|
3
|
-
declare type WrapIfAdditionalProps = {
|
|
4
|
-
children: React.ReactElement;
|
|
5
|
-
} & Pick<FieldTemplateProps, "classNames" | "disabled" | "id" | "label" | "onDropPropertyClick" | "onKeyChange" | "readonly" | "required" | "schema" | "registry">;
|
|
6
|
-
declare const WrapIfAdditional: (props: WrapIfAdditionalProps) => JSX.Element;
|
|
7
|
-
export default WrapIfAdditional;
|
package/dist/Form/Form.d.ts
DELETED
package/dist/Form/index.d.ts
DELETED
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import React from "react";
|
|
2
|
-
import { IconButtonProps } from "@rjsf/utils";
|
|
3
|
-
/**
|
|
4
|
-
* props used in Template:
|
|
5
|
-
* icon, tabIndex, disabled, onClick
|
|
6
|
-
*/
|
|
7
|
-
declare const ChakraIconButton: React.MemoExoticComponent<(props: IconButtonProps) => JSX.Element>;
|
|
8
|
-
export default ChakraIconButton;
|
|
9
|
-
export declare function MoveDownButton(props: IconButtonProps): JSX.Element;
|
|
10
|
-
export declare function MoveUpButton(props: IconButtonProps): JSX.Element;
|
|
11
|
-
export declare function RemoveButton(props: IconButtonProps): JSX.Element;
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
|
-
import { MoveDownButton, MoveUpButton, RemoveButton } from "../IconButton";
|
|
3
|
-
declare const _default: {
|
|
4
|
-
ArrayFieldItemTemplate: (props: import("@rjsf/utils").ArrayFieldTemplateItemType<any, any>) => JSX.Element;
|
|
5
|
-
ArrayFieldTemplate: (props: import("@rjsf/utils").ArrayFieldTemplateProps<any, any>) => JSX.Element;
|
|
6
|
-
BaseInputTemplate: (props: import("@rjsf/utils").WidgetProps<any, any>) => JSX.Element;
|
|
7
|
-
ButtonTemplates: {
|
|
8
|
-
AddButton: import("react").ComponentType<import("@rjsf/utils").IconButtonProps>;
|
|
9
|
-
MoveDownButton: typeof MoveDownButton;
|
|
10
|
-
MoveUpButton: typeof MoveUpButton;
|
|
11
|
-
RemoveButton: typeof RemoveButton;
|
|
12
|
-
SubmitButton: ({ uiSchema }: import("@rjsf/utils").SubmitButtonProps<any, any>) => JSX.Element | null;
|
|
13
|
-
};
|
|
14
|
-
DescriptionFieldTemplate: ({ description, id }: import("@rjsf/utils").DescriptionFieldProps<any, any>) => JSX.Element | null;
|
|
15
|
-
ErrorListTemplate: ({ errors }: import("@rjsf/utils").ErrorListProps<any, any>) => JSX.Element;
|
|
16
|
-
FieldTemplate: (props: import("@rjsf/utils").FieldTemplateProps<any, any>) => JSX.Element;
|
|
17
|
-
ObjectFieldTemplate: (props: import("@rjsf/utils").ObjectFieldTemplateProps<any, any>) => JSX.Element;
|
|
18
|
-
TitleFieldTemplate: ({ id, title }: import("@rjsf/utils").TitleFieldProps<any, any>) => JSX.Element;
|
|
19
|
-
};
|
|
20
|
-
export default _default;
|
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
import { WidgetProps } from "@rjsf/utils";
|
|
2
|
-
declare const TextareaWidget: ({ id, placeholder, value, label, disabled, autofocus, readonly, onBlur, onFocus, onChange, options, schema, uiSchema, required, rawErrors, registry, }: WidgetProps) => JSX.Element;
|
|
3
|
-
export default TextareaWidget;
|
package/dist/Theme/Theme.d.ts
DELETED
package/dist/Theme/index.d.ts
DELETED
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
declare const widgets: {
|
|
2
|
-
AltDateTimeWidget: {
|
|
3
|
-
(props: import("@rjsf/utils").WidgetProps<any, any>): JSX.Element;
|
|
4
|
-
defaultProps: {
|
|
5
|
-
showTime: boolean;
|
|
6
|
-
autofocus: boolean;
|
|
7
|
-
disabled: boolean;
|
|
8
|
-
readonly: boolean;
|
|
9
|
-
options: {
|
|
10
|
-
yearsRange: number[];
|
|
11
|
-
};
|
|
12
|
-
};
|
|
13
|
-
};
|
|
14
|
-
AltDateWidget: {
|
|
15
|
-
(props: any): JSX.Element;
|
|
16
|
-
defaultProps: {
|
|
17
|
-
autofocus: boolean;
|
|
18
|
-
disabled: boolean;
|
|
19
|
-
readonly: boolean;
|
|
20
|
-
showTime: boolean;
|
|
21
|
-
options: {
|
|
22
|
-
yearsRange: number[];
|
|
23
|
-
};
|
|
24
|
-
};
|
|
25
|
-
};
|
|
26
|
-
CheckboxWidget: (props: import("@rjsf/utils").WidgetProps<any, any>) => JSX.Element;
|
|
27
|
-
CheckboxesWidget: (props: import("@rjsf/utils").WidgetProps<any, any>) => JSX.Element;
|
|
28
|
-
RadioWidget: ({ id, schema, options, value, required, disabled, readonly, label, onChange, onBlur, onFocus, uiSchema, }: import("@rjsf/utils").WidgetProps<any, any>) => JSX.Element;
|
|
29
|
-
RangeWidget: ({ value, readonly, disabled, onBlur, onFocus, options, schema, uiSchema, onChange, label, id, registry, }: import("@rjsf/utils").WidgetProps<any, any>) => JSX.Element;
|
|
30
|
-
SelectWidget: (props: import("@rjsf/utils").WidgetProps<any, any>) => JSX.Element;
|
|
31
|
-
TextareaWidget: ({ id, placeholder, value, label, disabled, autofocus, readonly, onBlur, onFocus, onChange, options, schema, uiSchema, required, rawErrors, registry, }: import("@rjsf/utils").WidgetProps<any, any>) => JSX.Element;
|
|
32
|
-
UpDownWidget: (props: import("@rjsf/utils").WidgetProps<any, any>) => JSX.Element;
|
|
33
|
-
};
|
|
34
|
-
export default widgets;
|
package/dist/Widgets/index.d.ts
DELETED
package/dist/utils.d.ts
DELETED
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import { ChakraProps } from "@chakra-ui/react";
|
|
2
|
-
import { UiSchema } from "@rjsf/utils";
|
|
3
|
-
export interface ChakraUiSchema extends Omit<UiSchema, "ui:options"> {
|
|
4
|
-
"ui:options"?: ChakraUiOptions;
|
|
5
|
-
}
|
|
6
|
-
declare type ChakraUiOptions = UiSchema["ui:options"] & {
|
|
7
|
-
chakra?: ChakraProps;
|
|
8
|
-
};
|
|
9
|
-
interface GetChakraProps {
|
|
10
|
-
uiSchema?: ChakraUiSchema;
|
|
11
|
-
}
|
|
12
|
-
export declare function getChakra({ uiSchema }: GetChakraProps): ChakraProps;
|
|
13
|
-
export {};
|