Some checks failed
App Prod-Parity E2E Dispatch / dispatch (push) Failing after 10s
CD Storybook UI / build (push) Failing after 3m25s
CD Storybook UI / dispatch (push) Has been skipped
CD deploy main / website-changed-files (push) Successful in 18m8s
CI Agent Skills / changed-files-check (push) Successful in 18m9s
CI Create App E2E minimal / changed-files-check (push) Successful in 24s
CI Create App / changed-files-check (push) Successful in 26s
CI Docs / changed-files-check (push) Successful in 26s
CI Emails / changed-files-check (push) Successful in 28s
CI Example App Hello World / changed-files-check (push) Successful in 23s
CI Front / changed-files-check (push) Has been skipped
CI Example App Postcard / changed-files-check (push) Successful in 27s
CI UI / changed-files-check (push) Has been skipped
CI Utils Test / changed-files-check (push) Successful in 45s
CI Twenty Apps / discover (push) Successful in 1m3s
CD deploy main / deploy-main (push) Failing after 3s
CI Agent Skills / agent-skills-validate (push) Has been skipped
CI Create App / create-app-test (lint) (push) Has been skipped
CI Emails / emails-test (push) Has been skipped
CI Front / front-task (lingui:compile) (push) Has been skipped
CI Front / front-task (lint) (push) Has been skipped
CI Example App Postcard / example-app-postcard (push) Has been skipped
CI UI / ui-task (lint) (push) Has been skipped
CI UI / ui-task (pack-size) (push) Has been skipped
CI UI / ui-task (size) (push) Has been skipped
CI UI / ui-task (test) (push) Has been skipped
CI UI / ui-task (typecheck) (push) Has been skipped
CI Utils Test / utils-test (push) Has been skipped
CI Twenty Apps / ${{ matrix.app.name }} (push) Has been skipped
CI Emails / ci-emails-status-check (push) Successful in 2s
CI Example App Hello World / ci-example-app-hello-world-status-check (push) Successful in 2s
CI Example App Postcard / ci-example-app-postcard-status-check (push) Successful in 3s
CI UI / ui-sb-test (push) Has been skipped
CI Utils Test / ci-utils-test-status-check (push) Successful in 2s
CI Twenty Apps / ci-twenty-apps-status-check (push) Successful in 2s
CI UI / ci-ui-status-check (push) Successful in 2s
CI Desktop / desktop (push) Failing after 1m8s
Push docs to Crowdin / Push documentation to Crowdin (push) Failing after 55s
Push translations to Crowdin / Extract and upload translations (push) Failing after 5s
Push website translations to Crowdin / Extract and upload website translations (push) Failing after 5s
CI Create App / create-app-test (test) (push) Has been skipped
CI Create App / create-app-test (typecheck) (push) Has been skipped
CI Docs / docs-lint (push) Has been skipped
CI Example App Hello World / example-app-hello-world (push) Has been skipped
CI Front / front-task (lingui:extract) (push) Has been skipped
CI Front / front-task (test) (push) Has been skipped
CI Front / front-task (typecheck) (push) Has been skipped
CI UI / ui-sb-build (push) Failing after 1m32s
CI Twenty Apps / ${{ matrix.app.name }} (${{ matrix.server-source }}) (push) Has been skipped
CI Agent Skills / agent-skills-publish (push) Has been skipped
CI Create App / ci-create-app-status-check (push) Successful in 2s
CI Agent Skills / agent-skills-remote-source (push) Has been skipped
CI Create App E2E minimal / create-app-e2e-minimal (push) Has been cancelled
CI E2E Main / e2e-test (push) Has been cancelled
CI Front / front-sb-build (push) Has been cancelled
CI Front / front-build (push) Has been cancelled
CI Create App E2E minimal / ci-create-app-e2e-minimal-status-check (push) Has been cancelled
CI E2E Main / ci-e2e-main-status-check (push) Has been cancelled
CI E2E Main / notify-main-ci-failure (push) Has been cancelled
CI E2E Main / qa-scout-comment (push) Has been cancelled
CI Front / front-sb-test (push) Has been cancelled
CI Front / front-sb-screenshots (push) Has been cancelled
CI Front / ci-front-status-check (push) Has been cancelled
DPA Sub-Processor Sync / sync-subprocessors (push) Failing after 3s
AI Catalog Sync / sync-catalog (push) Failing after 2s
196 lines
8.7 KiB
Plaintext
196 lines
8.7 KiB
Plaintext
{/*
|
|
* _____ _
|
|
*|_ _|_ _____ _ __ | |_ _ _
|
|
* | | \ \ /\ / / _ \ '_ \| __| | | | Auto-generated file
|
|
* | | \ V V / __/ | | | |_| |_| | DO NOT EDIT - changes will be overwritten
|
|
* |_| \_/\_/ \___|_| |_|\__|\__, | Generated by: npx nx generate:ui twenty-docs
|
|
* |___/
|
|
*
|
|
* This file is generated from the documentation data in packages/twenty-ui/generated.
|
|
* To update it, edit the component prop types or design tokens in twenty-ui and run:
|
|
* npx nx generate:ui twenty-docs
|
|
*/}
|
|
|
|
### Field.Root
|
|
|
|
<ParamField body="Root.actionsRef" type="RefObject<FieldRootActions | null>">
|
|
A ref to imperative actions.
|
|
- `validate`: Validates the field when called.
|
|
</ParamField>
|
|
|
|
<ParamField body="Root.className" type="string | ((state: FieldRootState) => string | undefined)">
|
|
CSS class applied to the element, or a function that
|
|
returns a class based on the component's state.
|
|
</ParamField>
|
|
|
|
<ParamField body="Root.dirty" type="boolean">
|
|
Whether the field's value has been changed from its initial value.
|
|
Useful when the field state is controlled by an external library.
|
|
</ParamField>
|
|
|
|
<ParamField body="Root.disabled" type="boolean" default="false">
|
|
Whether the component should ignore user interaction.
|
|
Takes precedence over the `disabled` prop on the `<Field.Control>` component.
|
|
</ParamField>
|
|
|
|
<ParamField body="Root.invalid" type="boolean">
|
|
Whether the field is invalid.
|
|
Useful when the field state is controlled by an external library.
|
|
</ParamField>
|
|
|
|
<ParamField body="Root.name" type="string">
|
|
Identifies the field when a form is submitted.
|
|
Takes precedence over the `name` prop on the `<Field.Control>` component.
|
|
</ParamField>
|
|
|
|
<ParamField body="Root.render" type="ReactElement<unknown, string | JSXElementConstructor<any>> | ComponentRenderFn<HTMLProps, FieldRootState>">
|
|
Allows you to replace the component's HTML element
|
|
with a different tag, or compose it with another component.
|
|
|
|
Accepts a `ReactElement` or a function that returns the element to render.
|
|
</ParamField>
|
|
|
|
<ParamField body="Root.style" type="CSSProperties | ((state: FieldRootState) => CSSProperties | undefined)">
|
|
Style applied to the element, or a function that
|
|
returns a style object based on the component's state.
|
|
</ParamField>
|
|
|
|
<ParamField body="Root.touched" type="boolean">
|
|
Whether the field has been touched.
|
|
Useful when the field state is controlled by an external library.
|
|
</ParamField>
|
|
|
|
<ParamField body="Root.validate" type="((value: unknown, formValues: Record<string, any>) => string | void | string[] | Promise<string | void | string[] | null> | null)">
|
|
A function for custom validation. Return a string or an array of strings with
|
|
the error message(s) if the value is invalid. Returning nothing, `null`, an empty
|
|
string, or an empty array means the value is valid.
|
|
Asynchronous functions are supported, but they do not prevent form submission
|
|
when using `validationMode="onSubmit"`.
|
|
</ParamField>
|
|
|
|
<ParamField body="Root.validationDebounceTime" type="number" default="0">
|
|
How long to wait between `validate` callbacks if
|
|
`validationMode="onChange"` is used. Specified in milliseconds.
|
|
</ParamField>
|
|
|
|
<ParamField body="Root.validationMode" type=""onBlur" | "onChange" | "onSubmit"" default="onSubmit">
|
|
Determines when the field should be validated.
|
|
This takes precedence over the `validationMode` prop on `<Form>`.
|
|
|
|
- `onSubmit`: triggers validation when the form is submitted, and re-validates on change after submission.
|
|
- `onBlur`: triggers validation when the control loses focus.
|
|
- `onChange`: triggers validation on every change to the control value.
|
|
</ParamField>
|
|
|
|
### Field.Label
|
|
|
|
<ParamField body="Label.className" type="string | ((state: FieldLabelState) => string | undefined)">
|
|
CSS class applied to the element, or a function that
|
|
returns a class based on the component's state.
|
|
</ParamField>
|
|
|
|
<ParamField body="Label.nativeLabel" type="boolean" default="true">
|
|
Whether the component renders a native `<label>` element when replacing it via the `render` prop.
|
|
Set to `false` if the rendered element is not a label (for example, `<div>`).
|
|
|
|
This is useful to avoid inheriting label behaviors on `<button>` controls (such as `<Select.Trigger>` and `<Combobox.Trigger>`), including avoiding `:hover` on the button when hovering the label, and preventing clicks on the label from firing on the button.
|
|
</ParamField>
|
|
|
|
<ParamField body="Label.render" type="ReactElement<unknown, string | JSXElementConstructor<any>> | ComponentRenderFn<HTMLProps, FieldLabelState>">
|
|
Allows you to replace the component's HTML element
|
|
with a different tag, or compose it with another component.
|
|
|
|
Accepts a `ReactElement` or a function that returns the element to render.
|
|
</ParamField>
|
|
|
|
<ParamField body="Label.style" type="CSSProperties | ((state: FieldLabelState) => CSSProperties | undefined)">
|
|
Style applied to the element, or a function that
|
|
returns a style object based on the component's state.
|
|
</ParamField>
|
|
|
|
### Field.Control
|
|
|
|
<ParamField body="Control.className" type="string | ((state: FieldControlState) => string | undefined)">
|
|
CSS class applied to the element, or a function that
|
|
returns a class based on the component's state.
|
|
</ParamField>
|
|
|
|
<ParamField body="Control.defaultValue" type="string | number | readonly string[]">
|
|
|
|
</ParamField>
|
|
|
|
<ParamField body="Control.onValueChange" type="((value: string, eventDetails: { reason: "none"; event: Event; cancel: () => void; allowPropagation: () => void; isCanceled: boolean; isPropagationAllowed: boolean; trigger: Element | undefined; }) => void)">
|
|
Callback fired when the `value` changes. Use when controlled.
|
|
</ParamField>
|
|
|
|
<ParamField body="Control.render" type="ReactElement<unknown, string | JSXElementConstructor<any>> | ComponentRenderFn<HTMLProps, FieldControlState>">
|
|
Allows you to replace the component's HTML element
|
|
with a different tag, or compose it with another component.
|
|
|
|
Accepts a `ReactElement` or a function that returns the element to render.
|
|
</ParamField>
|
|
|
|
<ParamField body="Control.style" type="CSSProperties | ((state: FieldControlState) => CSSProperties | undefined)">
|
|
Style applied to the element, or a function that
|
|
returns a style object based on the component's state.
|
|
</ParamField>
|
|
|
|
### Field.Description
|
|
|
|
<ParamField body="Description.className" type="string | ((state: FieldDescriptionState) => string | undefined)">
|
|
CSS class applied to the element, or a function that
|
|
returns a class based on the component's state.
|
|
</ParamField>
|
|
|
|
<ParamField body="Description.render" type="ReactElement<unknown, string | JSXElementConstructor<any>> | ComponentRenderFn<HTMLProps, FieldDescriptionState>">
|
|
Allows you to replace the component's HTML element
|
|
with a different tag, or compose it with another component.
|
|
|
|
Accepts a `ReactElement` or a function that returns the element to render.
|
|
</ParamField>
|
|
|
|
<ParamField body="Description.style" type="CSSProperties | ((state: FieldDescriptionState) => CSSProperties | undefined)">
|
|
Style applied to the element, or a function that
|
|
returns a style object based on the component's state.
|
|
</ParamField>
|
|
|
|
### Field.Error
|
|
|
|
<ParamField body="Error.className" type="string | ((state: FieldErrorState) => string | undefined)">
|
|
CSS class applied to the element, or a function that
|
|
returns a class based on the component's state.
|
|
</ParamField>
|
|
|
|
<ParamField body="Error.match" type="boolean | keyof ValidityState">
|
|
Determines whether to show the error message according to the field's
|
|
[ValidityState](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState).
|
|
Specifying `true` will always show the error message, and lets external libraries
|
|
control the visibility.
|
|
</ParamField>
|
|
|
|
<ParamField body="Error.render" type="ReactElement<unknown, string | JSXElementConstructor<any>> | ComponentRenderFn<HTMLProps, FieldErrorState>">
|
|
Allows you to replace the component's HTML element
|
|
with a different tag, or compose it with another component.
|
|
|
|
Accepts a `ReactElement` or a function that returns the element to render.
|
|
</ParamField>
|
|
|
|
<ParamField body="Error.style" type="CSSProperties | ((state: FieldErrorState) => CSSProperties | undefined)">
|
|
Style applied to the element, or a function that
|
|
returns a style object based on the component's state.
|
|
</ParamField>
|
|
|
|
### Field.Validity
|
|
|
|
<ParamField body="Validity.children" type="(state: FieldValidityState) => ReactNode" required>
|
|
A function that accepts the field validity state as an argument.
|
|
|
|
```jsx
|
|
<Field.Validity>
|
|
{(validity) => {
|
|
return <div>...</div>
|
|
}}
|
|
</Field.Validity>
|
|
```
|
|
</ParamField>
|