@opengov/form-renderer 0.0.1-beta5 → 0.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.
@@ -0,0 +1 @@
1
+ export default function FormRenderer(): import("react/jsx-runtime").JSX.Element;
@@ -1,7 +1,14 @@
1
- import { Meta, StoryObj } from '@storybook/react';
2
- declare const meta: Meta;
1
+ import { StoryObj } from '@storybook/react';
2
+ import { default as FormRenderer } from '../src';
3
+ declare const meta: {
4
+ title: string;
5
+ component: typeof FormRenderer;
6
+ tags: string[];
7
+ parameters: {
8
+ layout: string;
9
+ };
10
+ args: {};
11
+ };
3
12
  export default meta;
4
13
  type Story = StoryObj<typeof meta>;
5
- export declare const Compound: Story;
6
- export declare const WithDefaultValues: Story;
7
- export declare const UsingReactHookForms: Story;
14
+ export declare const Basic: Story;
package/package.json CHANGED
@@ -1,20 +1,20 @@
1
1
  {
2
2
  "name": "@opengov/form-renderer",
3
- "version": "0.0.1-beta5",
3
+ "version": "0.0.1",
4
4
  "description": "OpenGov Smart Forms form renderer",
5
5
  "type": "module",
6
6
  "files": [
7
7
  "dist"
8
8
  ],
9
- "main": "./dist/lib.umd.cjs",
10
- "module": "./dist/lib.js",
9
+ "main": "./dist/lib.umd.js",
10
+ "module": "./dist/lib.mjs",
11
11
  "exports": {
12
12
  ".": {
13
- "import": "./dist/lib.js",
13
+ "import": "./dist/lib.mjs",
14
14
  "require": "./dist/lib.umd.cjs"
15
15
  }
16
16
  },
17
- "types": "dist/form-builder/src/index.d.ts",
17
+ "types": "dist/index.d.ts",
18
18
  "scripts": {
19
19
  "test": "jest",
20
20
  "lint": "eslint .",
@@ -22,28 +22,9 @@
22
22
  },
23
23
  "author": "OpenGov",
24
24
  "license": "UNLICENSED",
25
- "dependencies": {
26
- "@mdi/js": "^7.4.47",
27
- "@mdi/react": "^1.6.1",
28
- "@mui/icons-material": "^6.1.1",
29
- "date-fns": "^4.1.0"
30
- },
25
+ "dependencies": {},
26
+ "devDependencies": {},
31
27
  "peerDependencies": {
32
- "@mui/material": ">= 5.0.0",
33
- "@mui/x-date-pickers": ">= 7.0.0",
34
- "@opengov/capital-mui-theme": ">= 32.0.0",
35
- "react": ">= 16.8.0",
36
- "react-dom": ">= 16.8.0",
37
- "react-hook-form": ">= 7.0.0"
38
- },
39
- "devDependencies": {
40
- "@emotion/react": "^11.13.3",
41
- "@emotion/styled": "^11.13.0",
42
- "@mui/material": "^6.1.1",
43
- "@mui/x-date-pickers": "^7.22.0",
44
- "@opengov/capital-mui-theme": "^36.0.0-beta.1",
45
- "react": "^18.3.1",
46
- "react-dom": "^18.3.1",
47
- "react-hook-form": "^7.53.1"
28
+ "react": "^18.3.1"
48
29
  }
49
30
  }
@@ -1,19 +0,0 @@
1
- import { default as React } from 'react';
2
- import { LayoutState } from './LayoutContext';
3
- import { SxProps } from '@mui/material';
4
- interface FormShellProps {
5
- children: React.ReactNode;
6
- onSubmit: (data: any) => void;
7
- layout?: LayoutState;
8
- sx?: SxProps;
9
- }
10
- export declare function FormShell({ children, onSubmit, layout, sx }: FormShellProps): import("react/jsx-runtime").JSX.Element;
11
- interface FormProviderProps {
12
- children: React.ReactNode;
13
- onSubmit?: (data: any) => void;
14
- layout?: LayoutState;
15
- formOptions?: any;
16
- sx?: SxProps;
17
- }
18
- declare function FormProvider({ children, onSubmit, layout, formOptions, sx }: FormProviderProps): import("react/jsx-runtime").JSX.Element;
19
- export default FormProvider;
@@ -1,14 +0,0 @@
1
- import { default as React, ReactNode } from 'react';
2
- export interface LayoutState {
3
- }
4
- interface FormLayoutContextProps {
5
- layout: LayoutState;
6
- }
7
- declare const FormLayoutContext: React.Context<FormLayoutContextProps | undefined>;
8
- interface FormLayoutProviderProps {
9
- children: ReactNode;
10
- layout?: LayoutState;
11
- }
12
- export declare const FormLayoutProvider: React.FC<FormLayoutProviderProps>;
13
- export declare const useFormLayout: () => LayoutState;
14
- export default FormLayoutContext;
@@ -1,3 +0,0 @@
1
- import { GeneralInputProps } from './types';
2
- declare function CheckboxInput({ name, label, sx, disabled, rules, ...rest }: GeneralInputProps): import("react/jsx-runtime").JSX.Element;
3
- export default CheckboxInput;
@@ -1,3 +0,0 @@
1
- import { GeneralInputProps } from './types';
2
- declare function DateInput({ name, rules, sx, ...rest }: GeneralInputProps): import("react/jsx-runtime").JSX.Element;
3
- export default DateInput;
@@ -1,8 +0,0 @@
1
- interface FormFieldLabelProps {
2
- children: React.ReactNode;
3
- internal: boolean;
4
- required: boolean;
5
- helpText?: string;
6
- }
7
- export default function FormFieldLabel({ children, internal, required, helpText }: FormFieldLabelProps): import("react/jsx-runtime").JSX.Element;
8
- export {};
@@ -1,3 +0,0 @@
1
- import { TextFieldProps } from '@mui/material';
2
- import { GeneralInputProps } from './types';
3
- export default function NumberInput(props: Omit<GeneralInputProps & TextFieldProps, 'type'>): import("react/jsx-runtime").JSX.Element;
@@ -1,7 +0,0 @@
1
- import { GeneralInputProps } from './types';
2
- export default function SelectInput({ name, label, options, sx, disabled, rules, ...rest }: GeneralInputProps & {
3
- options: Array<{
4
- displayValue: string;
5
- key: string;
6
- }>;
7
- }): import("react/jsx-runtime").JSX.Element;
@@ -1,4 +0,0 @@
1
- import { TextFieldProps } from '@mui/material';
2
- import { GeneralInputProps } from './types';
3
- declare function TextInput({ name, label, rules, sx, ...rest }: GeneralInputProps & TextFieldProps): import("react/jsx-runtime").JSX.Element;
4
- export default TextInput;
@@ -1,8 +0,0 @@
1
- import { SxProps } from '@mui/material';
2
- export interface GeneralInputProps {
3
- name: string;
4
- label: string | JSX.Element;
5
- sx?: SxProps;
6
- disabled?: boolean;
7
- rules: any;
8
- }
package/dist/index.d.ts DELETED
@@ -1,9 +0,0 @@
1
- import { default as Checkbox } from './fields/Checkbox';
2
- import { default as DateInput } from './fields/DateInput';
3
- import { default as TextInput } from './fields/TextInput';
4
- import { default as NumberInput } from './fields/NumberInput';
5
- import { default as Select } from './fields/Select';
6
- import { default as FormFieldLabel } from './fields/FormFieldLabel';
7
- import { default as FormProvider } from './FormProvider';
8
- export { FormProvider, FormFieldLabel, Checkbox, DateInput, TextInput, NumberInput, Select };
9
- export default function FormRenderer(): import("react/jsx-runtime").JSX.Element;
File without changes
File without changes
File without changes