@opengov/form-renderer 0.1.6 → 0.2.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.
@@ -1,3 +1,4 @@
1
+ import { TypographyProps } from '@mui/material';
1
2
  interface FormFieldLabelProps {
2
3
  children: React.ReactNode;
3
4
  internal?: boolean;
@@ -7,6 +8,7 @@ interface FormFieldLabelProps {
7
8
  readonly?: boolean;
8
9
  deleted?: boolean;
9
10
  isSection?: boolean;
11
+ variant?: TypographyProps['variant'];
10
12
  }
11
- export default function FormFieldLabel({ children, internal, required, helpText, isCalculated, readonly, deleted, isSection, }: FormFieldLabelProps): import("react/jsx-runtime").JSX.Element;
13
+ export default function FormFieldLabel({ children, internal, required, helpText, isCalculated, readonly, deleted, isSection, variant, }: FormFieldLabelProps): import("react/jsx-runtime").JSX.Element;
12
14
  export {};
@@ -0,0 +1,11 @@
1
+ import { SxProps } from '@mui/material';
2
+ export type LabelWithChildrenProps = {
3
+ label: string | JSX.Element;
4
+ error?: string;
5
+ childId?: string;
6
+ dataTestId?: string;
7
+ children: React.ReactNode;
8
+ sx?: SxProps;
9
+ isFormControl?: boolean;
10
+ };
11
+ export default function LabelWithChildren({ label, error, childId, dataTestId, sx, children, isFormControl, }: LabelWithChildrenProps): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,7 @@
1
+ import { LabelWithChildrenProps } from './LabelWithChildren';
2
+ export default function ReadOnlyField({ label, text, asHTML, sx, error, startAdornment, endAdornment, }: Omit<LabelWithChildrenProps, 'children' | 'childId'> & {
3
+ text?: string;
4
+ asHTML?: boolean;
5
+ startAdornment?: React.ReactNode;
6
+ endAdornment?: React.ReactNode;
7
+ }): import("react/jsx-runtime").JSX.Element;
package/dist/index.d.ts CHANGED
@@ -4,7 +4,8 @@ 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 ReadOnlyField, LabelWithChildren } from './fields/LabeledField/LabeledField';
7
+ import { default as ReadOnlyField } from './fields/ReadOnlyField';
8
+ import { default as LabelWithChildren } from './fields/ReadOnlyField/LabelWithChildren';
8
9
  import { default as ErrorMessage } from './fields/ErrorMessage';
9
10
  import { default as FormFieldLabel } from './fields/FormFieldLabel';
10
11
  import { default as RendererProvider } from './renderer/RendererProvider';