@mitcsutt/kiln-forms
Version:
Kiln forms: typed React forms on TanStack Form, in component or JSON schema mode, rendered through kiln-ui
28 lines (27 loc) • 957 B
TypeScript
import { type RatingFieldProps as UiRatingFieldProps } from '@mitcsutt/kiln-ui';
import type { ControlledKeys } from '../internal/controlledKeys.js';
import { type CommonFieldProps } from '../../../hooks/useFieldBinding.js';
export interface FormRatingFieldProps extends Omit<UiRatingFieldProps, ControlledKeys>, CommonFieldProps<number | null> {
}
/**
* A star rating bound to a `number` path. Clearing it writes `null`.
*
* @remarks
* It renders kiln-ui's {@link RatingField | RatingField}.
*
* @example In a schema
* ```json
* {
* "kind": "rating",
* "name": "rating",
* "label": "How was your crossing?"
* }
* ```
*
* @value `number | null`
* @empty `null`
*
* @privateRemarks
* A star rating bound to a `number` path (§7.2 `rating`). Clearing emits `null`.
*/
export declare const FormRatingField: import("../../../kit/contracts.js").FieldDef<import("../../../kit/contracts.js").ExactContract<number>, FormRatingFieldProps>;