@opengov/form-renderer 0.1.1 → 0.1.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.
@@ -1,3 +1,4 @@
1
- export default function ErrorMessage({ error }: {
1
+ export default function ErrorMessage({ error, id }: {
2
2
  error?: string;
3
+ id?: string;
3
4
  }): import("react/jsx-runtime").JSX.Element;
@@ -1,19 +1,17 @@
1
1
  import { SxProps } from '@mui/material';
2
- export declare function LabelWithChildren({ label, error, childId, dataTestId, sx, children, }: {
2
+ type LabelWithChildrenProps = {
3
3
  label: string | JSX.Element;
4
4
  error?: string;
5
5
  childId?: string;
6
6
  dataTestId?: string;
7
7
  children: React.ReactNode;
8
8
  sx?: SxProps;
9
- }): import("react/jsx-runtime").JSX.Element;
10
- export default function LabeledField({ label, value, childId, asHTML, sx, error, startAdornment, endAdornment, }: {
11
- label: string | JSX.Element;
12
- value?: string;
13
- childId?: string;
9
+ };
10
+ export declare function LabelWithChildren({ label, error, childId, dataTestId, sx, children }: LabelWithChildrenProps): import("react/jsx-runtime").JSX.Element;
11
+ export default function ReadOnlyField({ label, text, asHTML, sx, error, startAdornment, endAdornment, }: Omit<LabelWithChildrenProps, 'children' | 'childId'> & {
12
+ text?: string;
14
13
  asHTML?: boolean;
15
- sx?: SxProps;
16
- error?: string;
17
14
  startAdornment?: React.ReactNode;
18
15
  endAdornment?: React.ReactNode;
19
16
  }): import("react/jsx-runtime").JSX.Element;
17
+ export {};
package/dist/index.d.ts CHANGED
@@ -4,7 +4,7 @@ import { default as TextInput } from './fields/Text/TextInput';
4
4
  import { default as NumberInput } from './fields/Number/NumberInput';
5
5
  import { default as CalculatedNumber } from './fields/CalculatedNumber/CalculatedNumber';
6
6
  import { default as DropdownInput } from './fields/Dropdown/Dropdown';
7
- import { default as LabeledField } from './fields/LabeledField/LabeledField';
7
+ import { default as ReadOnlyField, LabelWithChildren } from './fields/LabeledField/LabeledField';
8
8
  import { default as ErrorMessage } from './fields/ErrorMessage';
9
9
  import { default as FormFieldLabel } from './fields/FormFieldLabel';
10
10
  import { default as RendererProvider } from './renderer/RendererProvider';
@@ -12,4 +12,4 @@ import { default as Form } from './renderer/Form';
12
12
  import { default as Section } from './renderer/Section';
13
13
  import { default as Field } from './renderer/Field';
14
14
  import { default as defaultFieldTypes, defaultRules } from './fields/defaultFields';
15
- export { RendererProvider, Form, Section, Field, FormFieldLabel, CheckboxInput, DateInput, TextInput, NumberInput, CalculatedNumber, DropdownInput, LabeledField, ErrorMessage, defaultFieldTypes, defaultRules, };
15
+ export { RendererProvider, Form, Section, Field, FormFieldLabel, CheckboxInput, DateInput, TextInput, NumberInput, CalculatedNumber, DropdownInput, ReadOnlyField, LabelWithChildren, ErrorMessage, defaultFieldTypes, defaultRules, };