@rjsf/chakra-ui 4.2.2 → 5.0.0-beta.2

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.
Files changed (58) hide show
  1. package/README.md +4 -4
  2. package/dist/AddButton/AddButton.d.ts +2 -3
  3. package/dist/AltDateTimeWidget/AltDateTimeWidget.d.ts +1 -1
  4. package/dist/ArrayFieldItemTemplate/ArrayFieldItemTemplate.d.ts +3 -0
  5. package/dist/ArrayFieldItemTemplate/index.d.ts +2 -0
  6. package/dist/ArrayFieldTemplate/ArrayFieldTemplate.d.ts +1 -1
  7. package/dist/BaseInputTemplate/BaseInputTemplate.d.ts +3 -0
  8. package/dist/BaseInputTemplate/index.d.ts +2 -0
  9. package/dist/ChakraFrameProvider.d.ts +1 -1
  10. package/dist/CheckboxWidget/CheckboxWidget.d.ts +1 -1
  11. package/dist/CheckboxesWidget/CheckboxesWidget.d.ts +1 -1
  12. package/dist/DescriptionField/DescriptionField.d.ts +2 -2
  13. package/dist/ErrorList/ErrorList.d.ts +1 -1
  14. package/dist/FieldTemplate/FieldTemplate.d.ts +1 -1
  15. package/dist/FieldTemplate/WrapIfAdditional.d.ts +4 -13
  16. package/dist/Form/Form.d.ts +2 -2
  17. package/dist/IconButton/IconButton.d.ts +4 -10
  18. package/dist/ObjectFieldTemplate/ObjectFieldTemplate.d.ts +1 -1
  19. package/dist/RadioWidget/RadioWidget.d.ts +1 -1
  20. package/dist/RangeWidget/RangeWidget.d.ts +2 -2
  21. package/dist/SelectWidget/SelectWidget.d.ts +1 -1
  22. package/dist/SubmitButton/SubmitButton.d.ts +2 -2
  23. package/dist/Templates/Templates.d.ts +20 -0
  24. package/dist/Templates/index.d.ts +2 -0
  25. package/dist/TextareaWidget/TextareaWidget.d.ts +2 -2
  26. package/dist/Theme/Theme.d.ts +2 -2
  27. package/dist/TitleField/TitleField.d.ts +2 -2
  28. package/dist/UpDownWidget/UpDownWidget.d.ts +1 -1
  29. package/dist/Widgets/Widgets.d.ts +8 -17
  30. package/dist/chakra-ui.cjs.development.js +420 -541
  31. package/dist/chakra-ui.cjs.development.js.map +1 -1
  32. package/dist/chakra-ui.cjs.production.min.js +1 -1
  33. package/dist/chakra-ui.cjs.production.min.js.map +1 -1
  34. package/dist/chakra-ui.esm.js +343 -483
  35. package/dist/chakra-ui.esm.js.map +1 -1
  36. package/dist/chakra-ui.umd.development.js +421 -544
  37. package/dist/chakra-ui.umd.development.js.map +1 -1
  38. package/dist/chakra-ui.umd.production.min.js +1 -1
  39. package/dist/chakra-ui.umd.production.min.js.map +1 -1
  40. package/dist/index.d.ts +4 -7
  41. package/dist/utils.d.ts +1 -4
  42. package/package.json +47 -34
  43. package/dist/ColorWidget/ColorWidget.d.ts +0 -3
  44. package/dist/ColorWidget/index.d.ts +0 -2
  45. package/dist/DateTimeWidget/DateTimeWidget.d.ts +0 -3
  46. package/dist/DateTimeWidget/index.d.ts +0 -2
  47. package/dist/DateWidget/DateWidget.d.ts +0 -3
  48. package/dist/DateWidget/index.d.ts +0 -2
  49. package/dist/EmailWidget/EmailWidget.d.ts +0 -3
  50. package/dist/EmailWidget/index.d.ts +0 -2
  51. package/dist/Fields/Fields.d.ts +0 -6
  52. package/dist/Fields/index.d.ts +0 -2
  53. package/dist/PasswordWidget/PasswordWidget.d.ts +0 -3
  54. package/dist/PasswordWidget/index.d.ts +0 -2
  55. package/dist/TextWidget/TextWidget.d.ts +0 -3
  56. package/dist/TextWidget/index.d.ts +0 -2
  57. package/dist/URLWidget/URLWidget.d.ts +0 -3
  58. package/dist/URLWidget/index.d.ts +0 -2
package/README.md CHANGED
@@ -16,7 +16,7 @@
16
16
  <p align="center">
17
17
  Chakra UI theme, fields and widgets for <a href="https://github.com/rjsf-team/react-jsonschema-form/"><code>react-jsonschema-form</code></a>.
18
18
  <br />
19
- <a href="https://react-jsonschema-form.readthedocs.io/en/latest/"><strong>Explore the docs »</strong></a>
19
+ <a href="https://react-jsonschema-form.readthedocs.io/en/stable/"><strong>Explore the docs »</strong></a>
20
20
  <br />
21
21
  <br />
22
22
  <a href="https://rjsf-team.github.io/react-jsonschema-form/">View Playground</a>
@@ -67,7 +67,7 @@ Exports `chakra-ui` theme, fields and widgets for `react-jsonschema-form`.
67
67
  - `framer-motion >= 5.0.0`
68
68
  - `@rjsf/core >= 2.0.0`
69
69
 
70
- Refer to the [rjsf installation guide](https://react-jsonschema-form.readthedocs.io/en/latest/#installation) and [chakra-ui installation guide](https://chakra-ui.com/docs/getting-started#installation) and for more details.
70
+ Refer to the [rjsf installation guide](https://react-jsonschema-form.readthedocs.io/en/stable/#installation) and [chakra-ui installation guide](https://chakra-ui.com/docs/getting-started#installation) and for more details.
71
71
 
72
72
  ---
73
73
 
@@ -102,7 +102,7 @@ const Form = withTheme(ChakraUITheme);
102
102
 
103
103
  ## Optional Chakra UI Theme properties
104
104
 
105
- - To pass additional properties to widgets, see this [guide](https://react-jsonschema-form.readthedocs.io/en/latest/form-customization/#object-additional-properties).
105
+ - To pass additional properties to widgets, see this [guide](https://react-jsonschema-form.readthedocs.io/en/stable/form-customization/#object-additional-properties).
106
106
 
107
107
  You can use `ChakraProvider`, to customize the components at a theme level.\
108
108
  And, `uiSchema` allows for the use of a `"chakra"` `"ui:option"` to customize the styling of the form widgets.
@@ -135,7 +135,7 @@ See the [open issues](https://github.com/rjsf-team/react-jsonschema-form/issues)
135
135
 
136
136
  ## Contributing
137
137
 
138
- Read our [contributors' guide](https://react-jsonschema-form.readthedocs.io/en/latest/contributing/) to get started.
138
+ Read our [contributors' guide](https://react-jsonschema-form.readthedocs.io/en/stable/contributing/) to get started.
139
139
 
140
140
  <!-- CONTACT -->
141
141
 
@@ -1,5 +1,4 @@
1
1
  import React from "react";
2
- import { AddButtonProps } from "@rjsf/core";
3
- import { ButtonProps } from "@chakra-ui/react";
4
- declare const AddButton: React.FC<AddButtonProps & ButtonProps>;
2
+ import { IconButtonProps } from "@rjsf/utils";
3
+ declare const AddButton: React.ComponentType<IconButtonProps>;
5
4
  export default AddButton;
@@ -1,4 +1,4 @@
1
- import { WidgetProps } from "@rjsf/core";
1
+ import { WidgetProps } from "@rjsf/utils";
2
2
  declare const AltDateTimeWidget: {
3
3
  (props: WidgetProps): JSX.Element;
4
4
  defaultProps: {
@@ -0,0 +1,3 @@
1
+ import { ArrayFieldTemplateItemType } from "@rjsf/utils";
2
+ declare const ArrayFieldItemTemplate: (props: ArrayFieldTemplateItemType) => JSX.Element;
3
+ export default ArrayFieldItemTemplate;
@@ -0,0 +1,2 @@
1
+ export { default } from "./ArrayFieldItemTemplate";
2
+ export * from "./ArrayFieldItemTemplate";
@@ -1,3 +1,3 @@
1
- import { ArrayFieldTemplateProps } from "@rjsf/core";
1
+ import { ArrayFieldTemplateProps } from "@rjsf/utils";
2
2
  declare const ArrayFieldTemplate: (props: ArrayFieldTemplateProps) => JSX.Element;
3
3
  export default ArrayFieldTemplate;
@@ -0,0 +1,3 @@
1
+ import { WidgetProps } from "@rjsf/utils";
2
+ declare const BaseInputTemplate: (props: WidgetProps) => JSX.Element;
3
+ export default BaseInputTemplate;
@@ -0,0 +1,2 @@
1
+ export { default } from "./BaseInputTemplate";
2
+ export * from "./BaseInputTemplate";
@@ -1 +1 @@
1
- export declare const __createChakraFrameProvider: (props: any) => ({ document, }: any) => JSX.Element;
1
+ export declare const __createChakraFrameProvider: (props: any) => ({ document }: any) => JSX.Element;
@@ -1,3 +1,3 @@
1
- import { WidgetProps } from "@rjsf/core";
1
+ import { WidgetProps } from "@rjsf/utils";
2
2
  declare const CheckboxWidget: (props: WidgetProps) => JSX.Element;
3
3
  export default CheckboxWidget;
@@ -1,3 +1,3 @@
1
- import { WidgetProps } from "@rjsf/core";
1
+ import { WidgetProps } from "@rjsf/utils";
2
2
  declare const CheckboxesWidget: (props: WidgetProps) => JSX.Element;
3
3
  export default CheckboxesWidget;
@@ -1,3 +1,3 @@
1
- import { FieldProps } from "@rjsf/core";
2
- declare const DescriptionField: ({ description, id }: FieldProps) => JSX.Element | null;
1
+ import { DescriptionFieldProps } from "@rjsf/utils";
2
+ declare const DescriptionField: ({ description, id }: DescriptionFieldProps) => JSX.Element | null;
3
3
  export default DescriptionField;
@@ -1,3 +1,3 @@
1
- import { ErrorListProps } from "@rjsf/core";
1
+ import { ErrorListProps } from "@rjsf/utils";
2
2
  declare const ErrorList: ({ errors }: ErrorListProps) => JSX.Element;
3
3
  export default ErrorList;
@@ -1,3 +1,3 @@
1
- import { FieldTemplateProps } from "@rjsf/core";
1
+ import { FieldTemplateProps } from "@rjsf/utils";
2
2
  declare const FieldTemplate: (props: FieldTemplateProps) => JSX.Element;
3
3
  export default FieldTemplate;
@@ -1,16 +1,7 @@
1
- import * as React from "react";
2
- import { JSONSchema7 } from "json-schema";
3
- interface WrapIfAdditionalProps {
1
+ import React from "react";
2
+ import { FieldTemplateProps } from "@rjsf/utils";
3
+ declare type WrapIfAdditionalProps = {
4
4
  children: React.ReactElement;
5
- classNames: string;
6
- disabled: boolean;
7
- id: string;
8
- label: string;
9
- onDropPropertyClick: (index: string) => (event?: any) => void;
10
- onKeyChange: (index: string) => (event?: any) => void;
11
- readonly: boolean;
12
- required: boolean;
13
- schema: JSONSchema7;
14
- }
5
+ } & Pick<FieldTemplateProps, "classNames" | "disabled" | "id" | "label" | "onDropPropertyClick" | "onKeyChange" | "readonly" | "required" | "schema" | "registry">;
15
6
  declare const WrapIfAdditional: (props: WrapIfAdditionalProps) => JSX.Element;
16
7
  export default WrapIfAdditional;
@@ -1,4 +1,4 @@
1
+ import { ComponentType } from "react";
1
2
  import { FormProps } from "@rjsf/core";
2
- import { ComponentClass, FunctionComponent } from "react";
3
- declare const Form: ComponentClass<FormProps<any>> | FunctionComponent<FormProps<any>>;
3
+ declare const Form: ComponentType<FormProps>;
4
4
  export default Form;
@@ -1,17 +1,11 @@
1
1
  import React from "react";
2
- import { IconButtonProps as ChakraIconButtonProps } from "@chakra-ui/react";
3
- declare const mappings: {
4
- remove: JSX.Element;
5
- plus: JSX.Element;
6
- "arrow-up": JSX.Element;
7
- "arrow-down": JSX.Element;
8
- };
9
- declare type IconButtonProps = Omit<ChakraIconButtonProps, "aria-label" | "icon"> & {
10
- icon: keyof typeof mappings;
11
- };
2
+ import { IconButtonProps } from "@rjsf/utils";
12
3
  /**
13
4
  * props used in Template:
14
5
  * icon, tabIndex, disabled, onClick
15
6
  */
16
7
  declare const ChakraIconButton: React.MemoExoticComponent<(props: IconButtonProps) => JSX.Element>;
17
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,3 +1,3 @@
1
- import { ObjectFieldTemplateProps } from "@rjsf/core";
1
+ import { ObjectFieldTemplateProps } from "@rjsf/utils";
2
2
  declare const ObjectFieldTemplate: (props: ObjectFieldTemplateProps) => JSX.Element;
3
3
  export default ObjectFieldTemplate;
@@ -1,3 +1,3 @@
1
- import { WidgetProps } from "@rjsf/core";
1
+ import { WidgetProps } from "@rjsf/utils";
2
2
  declare const RadioWidget: ({ id, schema, options, value, required, disabled, readonly, label, onChange, onBlur, onFocus, uiSchema, }: WidgetProps) => JSX.Element;
3
3
  export default RadioWidget;
@@ -1,3 +1,3 @@
1
- import { WidgetProps } from "@rjsf/core";
2
- declare const RangeWidget: ({ value, readonly, disabled, onBlur, onFocus, options, schema, uiSchema, onChange, label, id, }: WidgetProps) => JSX.Element;
1
+ import { WidgetProps } from "@rjsf/utils";
2
+ declare const RangeWidget: ({ value, readonly, disabled, onBlur, onFocus, options, schema, uiSchema, onChange, label, id, registry, }: WidgetProps) => JSX.Element;
3
3
  export default RangeWidget;
@@ -1,3 +1,3 @@
1
- import { WidgetProps } from "@rjsf/core";
1
+ import { WidgetProps } from "@rjsf/utils";
2
2
  declare const SelectWidget: (props: WidgetProps) => JSX.Element;
3
3
  export default SelectWidget;
@@ -1,3 +1,3 @@
1
- import { WidgetProps } from "@rjsf/core";
2
- declare const SubmitButton: ({ uiSchema }: WidgetProps) => JSX.Element | null;
1
+ import { SubmitButtonProps } from "@rjsf/utils";
2
+ declare const SubmitButton: ({ uiSchema }: SubmitButtonProps) => JSX.Element | null;
3
3
  export default SubmitButton;
@@ -0,0 +1,20 @@
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;
@@ -0,0 +1,2 @@
1
+ export { default } from "./Templates";
2
+ export * from "./Templates";
@@ -1,3 +1,3 @@
1
- import { WidgetProps } from "@rjsf/core";
2
- declare const TextareaWidget: ({ id, placeholder, value, label, disabled, autofocus, readonly, onBlur, onFocus, onChange, options, schema, uiSchema, required, rawErrors, }: WidgetProps) => JSX.Element;
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
3
  export default TextareaWidget;
@@ -1,3 +1,3 @@
1
- import { ThemeProps } from "../utils";
2
- declare const Theme: ThemeProps;
1
+ import { WithThemeProps } from "@rjsf/core";
2
+ declare const Theme: WithThemeProps;
3
3
  export default Theme;
@@ -1,3 +1,3 @@
1
- import { FieldProps } from "@rjsf/core";
2
- declare const TitleField: ({ title }: FieldProps) => JSX.Element;
1
+ import { TitleFieldProps } from "@rjsf/utils";
2
+ declare const TitleField: ({ id, title }: TitleFieldProps) => JSX.Element;
3
3
  export default TitleField;
@@ -1,3 +1,3 @@
1
- import { WidgetProps } from "@rjsf/core";
1
+ import { WidgetProps } from "@rjsf/utils";
2
2
  declare const UpDownWidget: (props: WidgetProps) => JSX.Element;
3
3
  export default UpDownWidget;
@@ -1,7 +1,6 @@
1
- /// <reference types="@rjsf/core" />
2
1
  declare const widgets: {
3
2
  AltDateTimeWidget: {
4
- (props: import("@rjsf/core").WidgetProps): JSX.Element;
3
+ (props: import("@rjsf/utils").WidgetProps<any, any>): JSX.Element;
5
4
  defaultProps: {
6
5
  showTime: boolean;
7
6
  autofocus: boolean;
@@ -24,20 +23,12 @@ declare const widgets: {
24
23
  };
25
24
  };
26
25
  };
27
- CheckboxWidget: (props: import("@rjsf/core").WidgetProps) => JSX.Element;
28
- CheckboxesWidget: (props: import("@rjsf/core").WidgetProps) => JSX.Element;
29
- ColorWidget: (props: import("@rjsf/core").WidgetProps) => JSX.Element;
30
- DateWidget: (props: import("@rjsf/core").WidgetProps) => JSX.Element;
31
- DateTimeWidget: (props: import("@rjsf/core").WidgetProps) => JSX.Element;
32
- EmailWidget: (props: import("@rjsf/core").WidgetProps) => JSX.Element;
33
- PasswordWidget: (props: import("@rjsf/core").WidgetProps) => JSX.Element;
34
- RadioWidget: ({ id, schema, options, value, required, disabled, readonly, label, onChange, onBlur, onFocus, uiSchema, }: import("@rjsf/core").WidgetProps) => JSX.Element;
35
- RangeWidget: ({ value, readonly, disabled, onBlur, onFocus, options, schema, uiSchema, onChange, label, id, }: import("@rjsf/core").WidgetProps) => JSX.Element;
36
- SelectWidget: (props: import("@rjsf/core").WidgetProps) => JSX.Element;
37
- TextareaWidget: ({ id, placeholder, value, label, disabled, autofocus, readonly, onBlur, onFocus, onChange, options, schema, uiSchema, required, rawErrors, }: import("@rjsf/core").WidgetProps) => JSX.Element;
38
- TextWidget: (props: import("@rjsf/core").WidgetProps) => JSX.Element;
39
- UpDownWidget: (props: import("@rjsf/core").WidgetProps) => JSX.Element;
40
- URLWidget: (props: import("@rjsf/core").WidgetProps) => JSX.Element;
41
- SubmitButton: ({ uiSchema }: import("@rjsf/core").WidgetProps) => JSX.Element | null;
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;
42
33
  };
43
34
  export default widgets;