@cube-dev/ui-kit 0.7.6 → 0.7.7

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.
@@ -4,6 +4,9 @@ export interface CubeRootProps extends BaseProps {
4
4
  tokens?: {
5
5
  [key: string]: string;
6
6
  };
7
+ bodyStyles?: {
8
+ [key: string]: string;
9
+ };
7
10
  fonts?: boolean;
8
11
  publicUrl?: string;
9
12
  router?: any;
@@ -5,15 +5,21 @@ export declare type CubeFieldWrapperProps = {
5
5
  as: string;
6
6
  labelPosition: LabelPosition;
7
7
  label?: string;
8
+ labelStyles?: Styles;
8
9
  styles?: Styles;
10
+ /** Whether the input is required */
9
11
  isRequired?: boolean;
12
+ /** Whether the input is disabled */
10
13
  isDisabled?: boolean;
11
- labelStyles?: Styles;
12
14
  necessityIndicator?: NecessityIndicator;
13
15
  labelProps?: any;
14
16
  fieldProps?: any;
17
+ /** Custom message for the field. It will be placed below the label and the input */
15
18
  message?: string | ReactNode;
19
+ /** Styles for the message */
16
20
  messageStyles?: Styles;
21
+ /** The description for the field. It will be placed below the label */
22
+ description?: string;
17
23
  Component?: JSX.Element;
18
24
  validationState?: ValidationState;
19
25
  requiredMark?: boolean;
@@ -19,6 +19,8 @@ export interface CubeFieldProps extends OptionalFieldBaseProps {
19
19
  form?: CubeFormInstance;
20
20
  /** The message for the field or text for the error */
21
21
  message?: string;
22
+ /** The description for the field */
23
+ description?: ReactNode;
22
24
  /** Tooltip for the label that explains something. */
23
25
  tooltip?: ReactNode;
24
26
  /** Field name. It's used as a key the form data. */
@@ -2,6 +2,7 @@ import { FormHTMLAttributes } from 'react';
2
2
  import { CubeFormInstance, CubeFormData } from './useForm';
3
3
  import { BaseProps, ContainerStyleProps } from '../../types';
4
4
  import { FormBaseProps } from '../../../shared';
5
+ import { Styles } from '../../../styles/types';
5
6
  export declare const FormContext: import("react").Context<{}>;
6
7
  export declare function useFormProps(props: any): any;
7
8
  export interface CubeFormProps extends FormBaseProps, BaseProps, ContainerStyleProps, Pick<FormHTMLAttributes<HTMLFormElement>, 'action' | 'autoComplete' | 'encType' | 'method' | 'target'> {
@@ -19,6 +20,8 @@ export interface CubeFormProps extends FormBaseProps, BaseProps, ContainerStyleP
19
20
  onSubmitFailed?: (any?: any) => void | Promise<any>;
20
21
  /** Set form instance created by useForm */
21
22
  form?: CubeFormInstance;
23
+ /** The size of the side area with labels. Only for `labelPosition="side"` */
24
+ labelWidth?: Styles['width'];
22
25
  }
23
26
  /**
24
27
  * Forms allow users to enter data that can be submitted while providing alignment and styling for form fields.