@rjsf/chakra-ui 5.0.0-beta.9 → 5.0.1

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/dist/index.d.ts CHANGED
@@ -1,92 +1,27 @@
1
- /// <reference types="react" />
2
- import * as React from 'react';
3
1
  import { ComponentType } from 'react';
4
2
  import { FormProps, ThemeProps } from '@rjsf/core';
5
- import * as _rjsf_utils from '@rjsf/utils';
6
- import { IconButtonProps, FieldErrorProps, FieldHelpProps, UiSchema } from '@rjsf/utils';
3
+ import { StrictRJSFSchema, RJSFSchema, FormContextType, TemplatesType, RegistryWidgetsType, UiSchema } from '@rjsf/utils';
7
4
  import { ChakraProps } from '@chakra-ui/react';
8
5
 
9
- declare const Form: ComponentType<FormProps>;
6
+ declare function generateForm<T = any, S extends StrictRJSFSchema = RJSFSchema, F extends FormContextType = any>(): ComponentType<FormProps<T, S, F>>;
7
+ declare const _default$3: ComponentType<FormProps<any, RJSFSchema, any>>;
10
8
 
11
- declare function MoveDownButton(props: IconButtonProps): JSX.Element;
12
- declare function MoveUpButton(props: IconButtonProps): JSX.Element;
13
- declare function RemoveButton(props: IconButtonProps): JSX.Element;
9
+ declare function generateTemplates<T = any, S extends StrictRJSFSchema = RJSFSchema, F extends FormContextType = any>(): Partial<TemplatesType<T, S, F>>;
10
+ declare const _default$2: Partial<TemplatesType<any, RJSFSchema, any>>;
14
11
 
15
- /** The `FieldErrorTemplate` component renders the errors local to the particular field
16
- *
17
- * @param props - The `FieldErrorProps` for the errors being rendered
18
- */
19
- declare function FieldErrorTemplate(props: FieldErrorProps): JSX.Element | null;
12
+ declare function generateTheme<T = any, S extends StrictRJSFSchema = RJSFSchema, F extends FormContextType = any>(): ThemeProps<T, S, F>;
13
+ declare const _default$1: ThemeProps<any, RJSFSchema, any>;
20
14
 
21
- /** The `FieldHelpTemplate` component renders any help desired for a field
22
- *
23
- * @param props - The `FieldHelpProps` to be rendered
24
- */
25
- declare function FieldHelpTemplate(props: FieldHelpProps): JSX.Element | null;
26
-
27
- declare const _default: {
28
- ArrayFieldItemTemplate: (props: _rjsf_utils.ArrayFieldTemplateItemType<any, any>) => JSX.Element;
29
- ArrayFieldTemplate: (props: _rjsf_utils.ArrayFieldTemplateProps<any, any>) => JSX.Element;
30
- BaseInputTemplate: (props: _rjsf_utils.WidgetProps<any, any>) => JSX.Element;
31
- ButtonTemplates: {
32
- AddButton: React.ComponentType<_rjsf_utils.IconButtonProps<any, any>>;
33
- MoveDownButton: typeof MoveDownButton;
34
- MoveUpButton: typeof MoveUpButton;
35
- RemoveButton: typeof RemoveButton;
36
- SubmitButton: ({ uiSchema }: _rjsf_utils.SubmitButtonProps<any, any>) => JSX.Element | null;
37
- };
38
- DescriptionFieldTemplate: ({ description, id }: _rjsf_utils.DescriptionFieldProps<any, any>) => JSX.Element | null;
39
- ErrorListTemplate: ({ errors }: _rjsf_utils.ErrorListProps<any, any>) => JSX.Element;
40
- FieldErrorTemplate: typeof FieldErrorTemplate;
41
- FieldHelpTemplate: typeof FieldHelpTemplate;
42
- FieldTemplate: (props: _rjsf_utils.FieldTemplateProps<any, any>) => JSX.Element;
43
- ObjectFieldTemplate: (props: _rjsf_utils.ObjectFieldTemplateProps<any, any>) => JSX.Element;
44
- TitleFieldTemplate: ({ id, title }: _rjsf_utils.TitleFieldProps<any, any>) => JSX.Element;
45
- };
46
-
47
- declare const Theme: ThemeProps;
48
-
49
- declare const widgets: {
50
- AltDateTimeWidget: {
51
- (props: _rjsf_utils.WidgetProps<any, any>): JSX.Element;
52
- defaultProps: {
53
- showTime: boolean;
54
- autofocus: boolean;
55
- disabled: boolean;
56
- readonly: boolean;
57
- options: {
58
- yearsRange: number[];
59
- };
60
- };
61
- };
62
- AltDateWidget: {
63
- (props: any): JSX.Element;
64
- defaultProps: {
65
- autofocus: boolean;
66
- disabled: boolean;
67
- readonly: boolean;
68
- showTime: boolean;
69
- options: {
70
- yearsRange: number[];
71
- };
72
- };
73
- };
74
- CheckboxWidget: (props: _rjsf_utils.WidgetProps<any, any>) => JSX.Element;
75
- CheckboxesWidget: (props: _rjsf_utils.WidgetProps<any, any>) => JSX.Element;
76
- RadioWidget: ({ id, schema, options, value, required, disabled, readonly, label, onChange, onBlur, onFocus, uiSchema, }: _rjsf_utils.WidgetProps<any, any>) => JSX.Element;
77
- RangeWidget: ({ value, readonly, disabled, onBlur, onFocus, options, schema, uiSchema, onChange, label, id, registry, }: _rjsf_utils.WidgetProps<any, any>) => JSX.Element;
78
- SelectWidget: (props: _rjsf_utils.WidgetProps<any, any>) => JSX.Element;
79
- TextareaWidget: ({ id, placeholder, value, label, disabled, autofocus, readonly, onBlur, onFocus, onChange, options, schema, uiSchema, required, rawErrors, registry, }: _rjsf_utils.WidgetProps<any, any>) => JSX.Element;
80
- UpDownWidget: (props: _rjsf_utils.WidgetProps<any, any>) => JSX.Element;
81
- };
15
+ declare function generateWidgets<T = any, S extends StrictRJSFSchema = RJSFSchema, F extends FormContextType = any>(): RegistryWidgetsType<T, S, F>;
16
+ declare const _default: RegistryWidgetsType<any, RJSFSchema, any>;
82
17
 
83
18
  declare const __createChakraFrameProvider: (props: any) => ({ document }: any) => JSX.Element;
84
19
 
85
20
  interface ChakraUiSchema extends Omit<UiSchema, "ui:options"> {
86
21
  "ui:options"?: ChakraUiOptions;
87
22
  }
88
- declare type ChakraUiOptions = UiSchema["ui:options"] & {
23
+ type ChakraUiOptions = UiSchema["ui:options"] & {
89
24
  chakra?: ChakraProps;
90
25
  };
91
26
 
92
- export { Form, _default as Templates, Theme, ChakraUiSchema as UiSchema, widgets as Widgets, __createChakraFrameProvider, Form as default };
27
+ export { _default$3 as Form, _default$2 as Templates, _default$1 as Theme, ChakraUiSchema as UiSchema, _default as Widgets, __createChakraFrameProvider, _default$3 as default, generateForm, generateTemplates, generateTheme, generateWidgets };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rjsf/chakra-ui",
3
- "version": "5.0.0-beta.9",
3
+ "version": "5.0.1",
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",
@@ -32,8 +32,9 @@
32
32
  "peerDependencies": {
33
33
  "@chakra-ui/icons": ">=1.1.1",
34
34
  "@chakra-ui/react": ">=1.7.3",
35
- "@rjsf/core": "^5.0.0-beta.1",
36
- "@rjsf/utils": "^5.0.0-beta.1",
35
+ "@rjsf/core": "^5.0.0",
36
+ "@rjsf/utils": "^5.0.0",
37
+ "chakra-react-select": ">=3.3.8",
37
38
  "framer-motion": ">=5.6.0",
38
39
  "react": "^16.14.0 || >=17"
39
40
  },
@@ -49,34 +50,34 @@
49
50
  ],
50
51
  "license": "Apache-2.0",
51
52
  "devDependencies": {
52
- "@babel/core": "^7.18.13",
53
+ "@babel/core": "^7.20.12",
53
54
  "@babel/plugin-proposal-class-properties": "^7.18.6",
54
- "@babel/plugin-transform-modules-commonjs": "^7.18.6",
55
- "@babel/preset-env": "^7.18.10",
55
+ "@babel/plugin-transform-modules-commonjs": "^7.20.11",
56
+ "@babel/preset-env": "^7.20.2",
56
57
  "@babel/preset-react": "^7.18.6",
57
58
  "@chakra-ui/icons": "^1.1.1",
58
59
  "@chakra-ui/react": "^1.7.3",
59
60
  "@emotion/jest": "^11.10.0",
60
- "@emotion/react": "^11.10.0",
61
- "@emotion/styled": "^11.10.0",
62
- "@rjsf/core": "^5.0.0-beta.9",
63
- "@rjsf/utils": "^5.0.0-beta.9",
64
- "@rjsf/validator-ajv6": "^5.0.0-beta.9",
61
+ "@emotion/react": "^11.10.5",
62
+ "@emotion/styled": "^11.10.5",
63
+ "@rjsf/core": "^5.0.1",
64
+ "@rjsf/utils": "^5.0.1",
65
+ "@rjsf/validator-ajv8": "^5.0.1",
65
66
  "@types/react": "^17.0.37",
66
67
  "@types/react-dom": "^17.0.11",
67
68
  "@types/react-test-renderer": "^17.0.1",
68
- "dts-cli": "^1.6.0",
69
- "eslint": "^8.23.0",
69
+ "chakra-react-select": "^3.3.8",
70
+ "dts-cli": "^1.6.3",
71
+ "eslint": "^8.31.0",
70
72
  "framer-motion": "^5.6.0",
71
- "jest-watch-typeahead": "^2.1.1",
73
+ "jest-watch-typeahead": "^2.2.1",
72
74
  "react": "^17.0.2",
73
75
  "react-dom": "^17.0.2",
74
76
  "react-test-renderer": "^17.0.2",
75
- "rimraf": "^3.0.2"
77
+ "rimraf": "^4.0.4"
76
78
  },
77
79
  "dependencies": {
78
- "chakra-react-select": "^3.3.8",
79
- "react-select": "^5.4.0"
80
+ "react-select": "^5.7.0"
80
81
  },
81
- "gitHead": "6a0a58190ff616344d80c558a755cda1835954f6"
82
+ "gitHead": "3a44e46656913a0bcb8b3f540115301fad77be08"
82
83
  }