{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "number-field",
  "title": "NumberField",
  "description": "A labeled number input on the Field contract: pass `label`, and `error` from your server action or client check.",
  "dependencies": [
    "@base-ui/react@^1.8.0"
  ],
  "registryDependencies": [
    "@ouro/field",
    "@ouro/lib-control-ref",
    "@ouro/lib-env",
    "@ouro/lib-touch-target",
    "@ouro/lib-use-dev-messages",
    "@ouro/lib-use-field",
    "@ouro/lib-use-media-query"
  ],
  "files": [
    {
      "path": "registry/ouro/components/ouro/number-field/number-field-styles.ts",
      "content": "export { groupClass, inputClass, scrubClass, stepperClass };\n\n// Class strings for NumberField, apart from the component so its file exports only\n// components (React Fast Refresh). Class strings are literal so the app's Tailwind finds\n// them when it compiles.\n\n/**\n * The box around the steppers and the input: Field's control look (44px tall with a 16px\n * font on phones, stepping down from `sm` with a fine pointer), with the focus outline on\n * the box while the input has keyboard focus. Its height is one unprefixed class that reads\n * a variable.\n *\n * @internal\n * @claim \"The box around the steppers and\" registry/ouro/components/ouro/number-field/number-field.test.tsx verify:testExists(registry/ouro/components/ouro/number-field/number-field.test.tsx::NumberField looks > uses a 16px font and a 44px box on narrow screens, stepping down with a mouse on wider screens)\n * @claim \"The box around the steppers and\" registry/ouro/components/ouro/number-field/number-field.test.tsx verify:testExists(registry/ouro/components/ouro/number-field/number-field.test.tsx::NumberField looks > outlines the box when the input has keyboard focus)\n * @claim \"The box around the steppers and\" registry/ouro/components/ouro/number-field/number-field.touch.test.tsx verify:testExists(registry/ouro/components/ouro/number-field/number-field.touch.test.tsx::is 44px tall with 16px text, and its steppers have a 44px hit area, also on a landscape phone)\n */\nconst groupClass =\n  \"relative m-0 box-border flex w-full min-w-0 items-stretch h-(--ouro-control-h) p-0 \" +\n  \"[--ouro-control-h:calc(var(--spacing)*11)] sm:pointer-fine:[--ouro-control-h:calc(var(--spacing)*9)] \" +\n  \"rounded-ouro-md border border-solid border-input bg-transparent text-base text-foreground sm:pointer-fine:text-sm \" +\n  \"outline-ring outline-offset-2 has-[input:focus-visible]:outline-2 has-[input:focus-visible]:outline-solid \" +\n  \"transition-[border-color] duration-(--ouro-duration-fast) ease-[ease] \" +\n  \"has-[input[aria-invalid=true]]:border-destructive has-[input:disabled]:opacity-50 \" +\n  \"dark:bg-input/30\";\n\n/**\n * The input between the steppers: borderless, centered, in tabular figures.\n *\n * @internal\n */\nconst inputClass =\n  \"m-0 box-border block h-full min-w-0 flex-1 border-0 bg-transparent px-2 py-0 text-center tabular-nums \" +\n  \"text-[length:inherit] text-inherit font-[inherit] outline-none placeholder:text-muted-foreground \" +\n  \"disabled:cursor-not-allowed\";\n\n/**\n * A stepper: a square as tall as the inside of the box, at either end, with a press that\n * darkens it, rounded to the box's corners. On a touch screen its `TouchTarget` takes taps\n * over 44px. Disabled at the limit.\n *\n * @internal\n * @claim \"On a touch screen its `TouchTarget`\" registry/ouro/components/ouro/number-field/number-field.touch.test.tsx verify:testExists(registry/ouro/components/ouro/number-field/number-field.touch.test.tsx::is 44px tall with 16px text, and its steppers have a 44px hit area, also on a landscape phone)\n */\nconst stepperClass =\n  \"press relative m-0 box-border flex aspect-square h-full shrink-0 items-center justify-center border-0 p-0 \" +\n  \"bg-transparent text-muted-foreground cursor-pointer select-none [-webkit-tap-highlight-color:transparent] \" +\n  \"not-active:pointer-fine:hover:bg-accent pointer-fine:hover:text-accent-foreground not-data-disabled:active:bg-[color-mix(in_oklab,var(--accent)_85%,var(--foreground))] not-data-disabled:active:text-accent-foreground \" +\n  \"focus-visible:outline-2 focus-visible:-outline-offset-2 focus-visible:outline-ring focus-visible:outline-solid \" +\n  \"first:rounded-s-[calc(var(--radius-ouro-md)-1px)] last:rounded-e-[calc(var(--radius-ouro-md)-1px)] \" +\n  \"data-disabled:cursor-not-allowed data-disabled:opacity-50 data-disabled:pointer-fine:hover:bg-transparent [&_svg]:size-4\";\n\n/**\n * The label's scrub area: drag it sideways with a mouse to change the value.\n *\n * @internal\n */\nconst scrubClass = \"justify-self-start cursor-ew-resize select-none data-disabled:cursor-default [&_label]:cursor-[inherit]\";\n",
      "type": "registry:ui",
      "target": "@components/ouro/number-field/number-field-styles.ts"
    },
    {
      "path": "registry/ouro/components/ouro/number-field/number-field.tsx",
      "content": "\"use client\";\n\nimport { NumberField as BaseNumberField } from \"@base-ui/react/number-field\";\nimport type { JSX, ReactElement, ReactNode, Ref } from \"react\";\nimport { Field } from \"@/registry/ouro/components/ouro/field/field\";\nimport { contractWarnings } from \"@/registry/ouro/components/ouro/field/field-styles\";\nimport { FieldOwnerContext, useField, useFormErrors, type ReadonlyErrorMessages } from \"@/registry/ouro/lib/ouro/use-field\";\nimport { useDevWarnings } from \"@/registry/ouro/lib/ouro/use-dev-messages\";\nimport { useMediaQuery } from \"@/registry/ouro/lib/ouro/use-media-query\";\nimport { controlRef } from \"@/registry/ouro/lib/ouro/control-ref\";\nimport { TouchTarget } from \"@/registry/ouro/lib/ouro/touch-target\";\nimport { groupClass, inputClass, scrubClass, stepperClass } from \"@/registry/ouro/components/ouro/number-field/number-field-styles\";\n\n/** Props for {@link NumberField}. */\nexport interface NumberFieldProps {\n  /**\n   * What the number is, shown above the field and read as its name. Required: every control\n   * needs a name. To hide it visually, keep it and add `hideLabel`. Drag it sideways with a\n   * mouse to change the value.\n   * @claim \"Required: every control needs a name\" registry/ouro/components/ouro/number-field/number-field.test-d.ts verify:fileLine(registry/ouro/components/ouro/number-field/number-field.test-d.ts, /expectTypeOf<\\{\\sdefaultValue:\\s4\\s\\}>\\(\\)\\.not\\.toExtend<NumberFieldProps>/)\n   */\n  label: string;\n  /** Hides the label visually; screen readers still read it as the field's name. */\n  hideLabel?: boolean | undefined;\n  /** Supporting text under the label, read after the label through `aria-describedby`. */\n  description?: ReactNode | undefined;\n  /**\n   * What is wrong, from your server action or client check. The message (or several, as a\n   * list) shows under the field, which gets `aria-invalid`. A message is text or a React node (one with a link); an empty string or array means valid.\n   */\n  error?: ReadonlyErrorMessages | undefined;\n  /** The field must be filled: it gets `aria-required`, and the label a marker. */\n  required?: boolean | undefined;\n  /** Disables the field and its steppers, and fades it. */\n  disabled?: boolean | undefined;\n  /** People can read and copy the value but not change it. */\n  readOnly?: boolean | undefined;\n  /** The form field name the number submits under, as a plain number (`4.5`, not `$4.50`). */\n  name?: string | undefined;\n  /** The value, when you control it; `null` is empty. */\n  value?: number | null | undefined;\n  /** The starting value, when the field keeps its own; `null` is empty. */\n  defaultValue?: number | null | undefined;\n  /** Called with the new number as it changes, or `null` when the field is emptied. */\n  onValueChange?: ((value: number | null) => void) | undefined;\n  /**\n   * Called when the value settles: on blur after typing, when a stepper or scrub is released, and with each key press. Use it to save.\n   *\n   * @claim \"Called when the value settles: on\" registry/ouro/components/ouro/number-field/number-field.test.tsx verify:testExists(registry/ouro/components/ouro/number-field/number-field.test.tsx::NumberField > steps by step with the arrow keys and parses typed text on blur)\n   * @claim \"Called when the value settles: on\" https://base-ui.com/react/components/number-field verify:urlOk(https://base-ui.com/react/components/number-field)\n   */\n  onValueCommitted?: ((value: number | null) => void) | undefined;\n  /**\n   * The lowest value; the steppers stop there. A minimum of 0 or more also gives phones a\n   * number keypad: iOS's keypads have no minus key, so a field that takes negatives (no\n   * `min`, or a negative one) gets the full keyboard.\n   * @claim \"A minimum of 0 or more\" registry/ouro/components/ouro/number-field/number-field.test.tsx verify:testExists(registry/ouro/components/ouro/number-field/number-field.test.tsx::NumberField > steps with its buttons, within min and max)\n   * @claim \"A minimum of 0 or more\" registry/ouro/components/ouro/number-field/number-field.test.tsx verify:fileLine(registry/ouro/components/ouro/number-field/number-field.test.tsx, /\\[\"integers\\sfrom\\s1\",\\s\\{\\smin:\\s1\\s\\},\\s\"numeric\"\\]/)\n   * @claim \"The lowest value; the steppers stop\" registry/ouro/components/ouro/number-field/number-field.test.tsx verify:testExists(registry/ouro/components/ouro/number-field/number-field.test.tsx::NumberField > steps with its buttons, within min and max)\n   */\n  min?: number | undefined;\n  /**\n   * The highest value; the steppers stop there.\n   *\n   * @claim \"The highest value; the steppers stop\" registry/ouro/components/ouro/number-field/number-field.test.tsx verify:testExists(registry/ouro/components/ouro/number-field/number-field.test.tsx::NumberField > steps with its buttons, within min and max)\n   */\n  max?: number | undefined;\n  /** The amount the steppers, the arrow keys and a scrub change the value by. @default 1 */\n  step?: number | undefined;\n  /** The step for Page Up, Page Down and Shift with an arrow key. @default 10 */\n  largeStep?: number | undefined;\n  /**\n   * How the number shows, as `Intl.NumberFormat` options: `{ style: \"currency\", currency: \"USD\" }`\n   * shows `$4.50`, `{ style: \"percent\" }` shows `15%`, `{ maximumFractionDigits: 2 }` rounds.\n   * The form still submits the plain number.\n   */\n  format?: Intl.NumberFormatOptions | undefined;\n  /** The locale for `format` and for parsing what people type. @default the browser's */\n  locale?: Intl.LocalesArgument | undefined;\n  /** An example shown while the field is empty. It is not a label; pass `label`. */\n  placeholder?: string | undefined;\n  /**\n   * The name of the button that lowers the value, as visually hidden text and not an\n   * `aria-label`, so a test's label lookup for the field finds the field alone. Translate it with your app.\n   * @default \"Decrease\"\n   */\n  decrementLabel?: string | undefined;\n  /**\n   * The name of the button that raises the value, as visually hidden text and not an\n   * `aria-label`. Translate it with your app.\n   * @default \"Increase\"\n   */\n  incrementLabel?: string | undefined;\n  /**\n   * Layout only: margins, width, grid placement (`mt-4`, `col-span-2`). Appearance classes\n   * warn in development; style fields in your theme.\n   */\n  className?: string | undefined;\n  /** The input element. */\n  ref?: Ref<HTMLInputElement> | undefined;\n\n  /** Not a prop. Ouro UI uses `error`: `<NumberField error=\"Required.\">`. */\n  errorMessage?: { 'Use <NumberField error=\"Required.\">': never };\n  /** Not a prop. Ouro UI uses `description`: `<NumberField description=\"...\">`. */\n  helperText?: { 'Use <NumberField description=\"...\">': never };\n  /** Not a prop. `error` marks the field invalid: `<NumberField error=\"What is wrong\">`. */\n  isInvalid?: { 'Use <NumberField error=\"What is wrong\">': never };\n  /** Not a prop. `error` marks the field invalid: `<NumberField error=\"What is wrong\">`. */\n  invalid?: { 'Use <NumberField error=\"What is wrong\">': never };\n  /** Not a prop. Ouro UI uses `required`: `<NumberField required>`. */\n  isRequired?: { 'Use <NumberField required>': never };\n  /** Not a prop. Ouro UI uses `disabled`: `<NumberField disabled>`. */\n  isDisabled?: { 'Use <NumberField disabled>': never };\n  /** Not a prop. Ouro UI uses `readOnly`: `<NumberField readOnly>`. */\n  isReadOnly?: { 'Use <NumberField readOnly>': never };\n  /** Not a prop. Ouro UI uses `min`: `<NumberField min={1}>`. */\n  minValue?: { 'Use <NumberField min={1}>': never };\n  /** Not a prop. Ouro UI uses `max`: `<NumberField max={10}>`. */\n  maxValue?: { 'Use <NumberField max={10}>': never };\n  /** Not a prop. NumberField reports the number itself: `<NumberField onValueChange={(value) => …}>`. */\n  onChange?: { 'Use <NumberField onValueChange={(value) => ...}>': never };\n  /** Not a prop. Ouro UI uses `format`: `<NumberField format={{ style: \"percent\" }}>`. */\n  formatOptions?: { 'Use <NumberField format={{ style: \"percent\" }}>': never };\n  /** Not a prop. Rounding is a format option: `<NumberField format={{ maximumFractionDigits: 2 }}>`. */\n  precision?: { 'Use <NumberField format={{ maximumFractionDigits: 2 }}>': never };\n  /** Not a prop. Currency is a format option: `<NumberField format={{ style: \"currency\", currency: \"USD\" }}>`. */\n  currency?: { 'Use <NumberField format={{ style: \"currency\", currency: \"USD\" }}>': never };\n  /**\n   * Not a prop. NumberField is always a number field; for text use `TextField`.\n   *\n   * @claim \"NumberField is always a number field\" registry/ouro/components/ouro/number-field/number-field.test-d.ts verify:fileLine(registry/ouro/components/ouro/number-field/number-field.test-d.ts, /^type\\sGuess\\s=/)\n   * @claim \"NumberField is always a number field\" registry/ouro/components/ouro/number-field/number-field.tsx verify:fileLine(registry/ouro/components/ouro/number-field/number-field.tsx, /type\\?:\\s\\{\\s'NumberField\\sis\\salways\\sa\\snumber;\\sfor\\stext\\suse\\s<TextField>':\\snever\\s\\};/)\n   */\n  type?: { 'NumberField is always a number; for text use <TextField>': never };\n}\n\n/**\n * Icons drawn in the text color at 16px, like the other Ouro icons.\n *\n * @claim \"Icons drawn in the text color\" registry/ouro/components/ouro/number-field/number-field.tsx verify:fileLine(registry/ouro/components/ouro/number-field/number-field.tsx, /viewBox=\"0\\s0\\s16\\s16\"/)\n * @claim \"Icons drawn in the text color\" registry/ouro/components/ouro/number-field/number-field.tsx verify:fileLine(registry/ouro/components/ouro/number-field/number-field.tsx, /stroke=\"currentColor\"/)\n */\n/** Marks the hidden input Base UI submits the number with. */\nconst markInput = controlRef(\"number-field\", \"hidden-input\");\n\nfunction Icon({ children }: { children: ReactNode }): JSX.Element {\n  return (\n    <svg aria-hidden=\"true\" viewBox=\"0 0 16 16\" fill=\"none\" stroke=\"currentColor\" strokeWidth=\"1.5\" strokeLinecap=\"round\">\n      {children}\n    </svg>\n  );\n}\n\n/**\n * A labeled number input on the Field contract: pass `label`, and `error` from your server\n * action or client check. It parses what people type in their locale, shows the value with\n * `format` (currency, percent, units), steps with its buttons and the arrow keys, and changes\n * the value when the label is dragged sideways with a mouse.\n * The steppers take taps over 44px on touch screens. The form submits the plain number.\n *\n * It picks the phone keyboard itself: the keypad with a decimal separator when `min` is 0 or\n * more and the field takes fractions (a fractional `step`, or a `format` with fraction digits,\n * such as a currency), the digits-only keypad when `min` is 0 or more and it takes whole\n * numbers, and the full keyboard when it takes negatives, since iOS's keypads have no minus key.\n *\n * Use `TextField` with `inputMode=\"numeric\"` instead for digit codes such as a PIN or a ZIP\n * code, and `Slider` when an approximate value in a range is enough.\n *\n * @group Forms\n * @see https://ui.ouroboros.bot/docs/number-field\n *\n * @example\n * <NumberField label=\"Servings\" name=\"servings\" defaultValue={4} min={1} max={24} />\n * <NumberField label=\"Price\" name=\"price\" min={0} format={{ style: \"currency\", currency: \"USD\" }} step={0.5} />\n * @claim \"The steppers take taps over 44px\" registry/ouro/components/ouro/number-field/number-field.touch.test.tsx verify:testExists(registry/ouro/components/ouro/number-field/number-field.touch.test.tsx::is 44px tall with 16px text, and its steppers have a 44px hit area, also on a landscape phone)\n * @claim \"It picks the phone keyboard itself\" registry/ouro/components/ouro/number-field/number-field.test.tsx verify:fileLine(registry/ouro/components/ouro/number-field/number-field.test.tsx, /\\[\"half\\ssteps\\sfrom\\s0\",\\s\\{\\smin:\\s0,\\sstep:\\s0\\.5\\s\\},\\s\"decimal\"\\]/)\n */\nexport function NumberField(props: NumberFieldProps): JSX.Element {\n  const {\n    label,\n    hideLabel,\n    description,\n    error,\n    required,\n    disabled,\n    readOnly,\n    name,\n    value,\n    defaultValue,\n    onValueChange,\n    onValueCommitted,\n    min,\n    max,\n    step,\n    largeStep,\n    format,\n    locale,\n    placeholder,\n    decrementLabel = \"Decrease\",\n    incrementLabel = \"Increase\",\n    className,\n    ref,\n    // Guard props (hint types), dropped here so they never reach the DOM.\n    errorMessage,\n    helperText,\n    isInvalid,\n    invalid,\n    isRequired,\n    isDisabled,\n    isReadOnly,\n    minValue,\n    maxValue,\n    onChange,\n    formatOptions,\n    precision,\n    currency,\n    type,\n  } = props;\n  const form = useFormErrors();\n  // A change drops a Form error for this name, as typing does in a text field.\n  const handleValueChange = (next: number | null) => {\n    if (name !== undefined) form?.clear(name);\n    onValueChange?.(next);\n  };\n\n  useDevWarnings(\n    \"NumberField\",\n    process.env.NODE_ENV !== \"production\"\n      ? () => [\n          ...contractWarnings(\"NumberField\", { errorMessage, helperText, isInvalid, invalid, isRequired, isDisabled }),\n          isReadOnly !== undefined && [\"isReadOnly is not a prop\", \"<NumberField readOnly>\"],\n          minValue !== undefined && [\"minValue is not a prop\", `<NumberField min={${String(minValue)}}>`],\n          maxValue !== undefined && [\"maxValue is not a prop\", `<NumberField max={${String(maxValue)}}>`],\n          onChange !== undefined && [\"onChange is not a prop\", \"<NumberField onValueChange={(value) => …}>\"],\n          formatOptions !== undefined && [\n            \"formatOptions is not a prop\",\n            `<NumberField format={{ ${Object.entries(formatOptions as object)\n              .map(([key, option]) => `${key}: ${JSON.stringify(option)}`)\n              .join(\", \")} }}>`,\n          ],\n          precision !== undefined && [\"precision is not a prop\", `<NumberField format={{ maximumFractionDigits: ${String(precision)} }}>`],\n          currency !== undefined && [\"currency is not a prop\", `<NumberField format={{ style: \"currency\", currency: \"${String(currency)}\" }}>`],\n          type !== undefined && [\"type is not a prop; NumberField is always a number\", `<NumberField label=\"${label}\">`],\n        ]\n      : /* istanbul ignore next @preserve -- production only */ undefined,\n  );\n\n  // Scrubbing is a mouse gesture (it locks the pointer); on a touch screen the label stays a\n  // plain label, so a finger that lands on it still scrolls the page. The server renders the\n  // scrub area and the client drops it on hydration.\n  const scrubbable = useMediaQuery(\"(pointer: fine)\", true);\n\n  const owner = {\n    name: \"NumberField\",\n    data: \"number-field\",\n    frame: (labelNode: ReactElement, rest: ReactNode) => (\n      <BaseNumberField.Root\n        value={value}\n        defaultValue={defaultValue ?? undefined}\n        onValueChange={(next) => handleValueChange(next)}\n        onValueCommitted={onValueCommitted && ((next) => onValueCommitted(next))}\n        min={min}\n        max={max}\n        step={step}\n        largeStep={largeStep}\n        format={format}\n        locale={locale}\n        required={required}\n        readOnly={readOnly}\n        inputRef={markInput}\n        className=\"contents\"\n      >\n        {scrubbable ? (\n          <BaseNumberField.ScrubArea data-ouro-number-field-scrub=\"\" className={scrubClass}>\n            {labelNode}\n          </BaseNumberField.ScrubArea>\n        ) : (\n          labelNode\n        )}\n        {rest}\n      </BaseNumberField.Root>\n    ),\n  };\n\n  return (\n    <FieldOwnerContext.Provider value={owner}>\n      <Field\n        label={label}\n        hideLabel={hideLabel}\n        description={description}\n        error={error}\n        required={required}\n        disabled={disabled}\n        name={name}\n        className={className}\n      >\n        <NumberFieldGroup\n          inputRef={ref}\n          inputMode={phoneKeyboard(min, step, format, locale)}\n          required={required}\n          placeholder={placeholder}\n          decrementLabel={decrementLabel}\n          incrementLabel={incrementLabel}\n        />\n      </Field>\n    </FieldOwnerContext.Provider>\n  );\n}\n\n/**\n * The phone keyboard for the field: `decimal` for fractions and `numeric` for whole numbers\n * when nothing below 0 is allowed, and `text` otherwise, since iOS's number keypads have no\n * minus key. Base UI's own choice depends on the platform, so the field sets it.\n * @claim \"The phone keyboard for the field\" registry/ouro/components/ouro/number-field/number-field.test.tsx verify:fileLine(registry/ouro/components/ouro/number-field/number-field.test.tsx, /\\[\"half\\ssteps\\sfrom\\s0\",\\s\\{\\smin:\\s0,\\sstep:\\s0\\.5\\s\\},\\s\"decimal\"\\]/)\n * @claim \"The phone keyboard for the field\" registry/ouro/components/ouro/number-field/number-field.test.tsx verify:fileLine(registry/ouro/components/ouro/number-field/number-field.test.tsx, /\\[\"integers\\sfrom\\s1\",\\s\\{\\smin:\\s1\\s\\},\\s\"numeric\"\\]/)\n */\nfunction phoneKeyboard(\n  min: number | undefined,\n  step: number | undefined,\n  format: Intl.NumberFormatOptions | undefined,\n  locale: Intl.LocalesArgument | undefined,\n): \"decimal\" | \"numeric\" | \"text\" {\n  if (min === undefined || min < 0) return \"text\";\n  const fractionalStep = step !== undefined && !Number.isInteger(step);\n  const fractionalFormat = format !== undefined && new Intl.NumberFormat(locale, format).resolvedOptions().maximumFractionDigits! > 0;\n  return fractionalStep || fractionalFormat ? \"decimal\" : \"numeric\";\n}\n\n/** The steppers and the input, inside the Field, where they read its server-known description ids. */\nfunction NumberFieldGroup({\n  inputRef,\n  inputMode,\n  required,\n  placeholder,\n  decrementLabel,\n  incrementLabel,\n}: {\n  inputRef: Ref<HTMLInputElement> | undefined;\n  inputMode: \"decimal\" | \"numeric\" | \"text\";\n  required: boolean | undefined;\n  placeholder: string | undefined;\n  decrementLabel: string;\n  incrementLabel: string;\n}): JSX.Element {\n  const field = useField()!;\n  // Ouro's own invalid state (the error prop or the Form's error for this name), not Base UI's,\n  // which would count it as a failed check and block the next submit.\n  const invalid = field.invalid;\n  // Each stepper drops the aria-label Base UI gives it, since its hidden text names it. The render arrows stay inline: Base UI warns about a render function named with a capital, and a minifier can rename a named one to any name.\n  return (\n    <BaseNumberField.Group data-ouro-number-field-group=\"\" className={groupClass}>\n      <BaseNumberField.Decrement data-ouro-decrement=\"\" data-ouro-control=\"number-field\" data-ouro-part=\"decrement\" render={(props) => <button {...props} aria-label={undefined} />} className={stepperClass}>\n        <TouchTarget />\n        <Icon>\n          <path d=\"M3.5 8h9\" />\n        </Icon>\n        <span className=\"sr-only\">{decrementLabel}</span>\n      </BaseNumberField.Decrement>\n      <BaseNumberField.Input\n        ref={inputRef}\n        data-ouro-control=\"number-field\"\n        data-ouro-part=\"input\"\n        inputMode={inputMode}\n        placeholder={placeholder}\n        aria-required={required || undefined}\n        aria-describedby={field.describedBy}\n        {...(invalid ? { \"aria-invalid\": true } : {})}\n        className={inputClass}\n      />\n      <BaseNumberField.Increment data-ouro-increment=\"\" data-ouro-control=\"number-field\" data-ouro-part=\"increment\" render={(props) => <button {...props} aria-label={undefined} />} className={stepperClass}>\n        <TouchTarget />\n        <Icon>\n          <path d=\"M3.5 8h9M8 3.5v9\" />\n        </Icon>\n        <span className=\"sr-only\">{incrementLabel}</span>\n      </BaseNumberField.Increment>\n    </BaseNumberField.Group>\n  );\n}\n",
      "type": "registry:ui",
      "target": "@components/ouro/number-field/number-field.tsx"
    }
  ],
  "docs": "A labeled number input on the Field contract: pass `label`, and `error` from your server action or client check. Import: import { NumberField } from \"@/components/ouro/number-field/number-field\", with @/components replaced by your components alias (aliases.components in components.json, such as ~/components). Also installed: field, the helpers they import in lib/ouro. Needs ouro-base in your stylesheet: add that item once per app, from the same place as this one, if you have not. Docs: https://ui.ouroboros.bot/docs/number-field.md Ouro UI v1.3.257.",
  "type": "registry:ui"
}