diff --git a/packages/react/src/components/field/field-root.tsx b/packages/react/src/components/field/field-root.tsx index 5ae4268a57..8c03a7619e 100644 --- a/packages/react/src/components/field/field-root.tsx +++ b/packages/react/src/components/field/field-root.tsx @@ -12,6 +12,7 @@ export interface FieldRootProps extends HTMLProps<'div'>, FieldRootBaseProps {} export const FieldRoot = forwardRef((props, ref) => { const [useFieldProps, localProps] = createSplitProps()(props, [ 'id', + 'ids', 'disabled', 'invalid', 'readOnly', diff --git a/packages/solid/src/components/field/field-root.tsx b/packages/solid/src/components/field/field-root.tsx index f084e7561c..0538881cc9 100644 --- a/packages/solid/src/components/field/field-root.tsx +++ b/packages/solid/src/components/field/field-root.tsx @@ -10,6 +10,7 @@ export interface FieldRootProps extends HTMLProps<'div'>, FieldRootBaseProps {} export const FieldRoot = (props: FieldRootProps) => { const [useFieldProps, localProps] = createSplitProps()(props, [ 'id', + 'ids', 'disabled', 'invalid', 'readOnly', diff --git a/packages/vue/src/components/field/field.types.ts b/packages/vue/src/components/field/field.types.ts index 2be9330a13..6ccd55eb2d 100644 --- a/packages/vue/src/components/field/field.types.ts +++ b/packages/vue/src/components/field/field.types.ts @@ -1,8 +1,20 @@ +export interface ElementIds { + root?: string + control?: string + label?: string + errorText?: string + helperText?: string +} + export interface RootProps { /** * The id of the field. */ id?: string + /** + * The ids of the field parts. + */ + ids?: ElementIds /** * Indicates whether the field is required. */ diff --git a/packages/vue/src/components/field/use-field.ts b/packages/vue/src/components/field/use-field.ts index cbee4f4bcb..ea25e5f502 100644 --- a/packages/vue/src/components/field/use-field.ts +++ b/packages/vue/src/components/field/use-field.ts @@ -1,14 +1,7 @@ import { ariaAttr, dataAttr, getWindow } from '@zag-js/dom-query' import { type HTMLAttributes, computed, onBeforeUnmount, onMounted, reactive, ref } from 'vue' import { parts } from './field.anatomy' - -export interface ElementIds { - root?: string - control?: string - label?: string - errorText?: string - helperText?: string -} +import type { ElementIds } from './field.types' export interface UseFieldProps { /**