{
  "version": "0.2.0-preview.1",
  "content_digest": "70ac710f4d22dce040e7ac593379ba8aca9dcb59a0b9c0f839819cae0e2bb721",
  "status": "preview",
  "authority": {
    "repository": "cloakedinc/design",
    "path": "packages/design-system",
    "catalog": "packages/design-system/catalog.json",
    "status": "preview"
  },
  "provenance": {
    "repo": "cloakedinc/automation",
    "commit": "f96f416e1c3bfbfaffcd155a88b87b18b8bb25f1",
    "path": "packages/design-system",
    "imported_spec_status": "approved"
  },
  "adaptations": [
    {
      "id": "button-content-gap",
      "status": "preview",
      "description": "Use the specification's 4px content gap instead of the inherited 8px implementation gap."
    },
    {
      "id": "keyboard-focus",
      "status": "preview",
      "description": "Add visible Button and Input keyboard focus and an overridable inset focus default for shared button resets, including FAQ cards and ListItem rows."
    },
    {
      "id": "supporting-text-contrast",
      "status": "preview",
      "description": "Map light secondary text to the existing grey-04-strong primitive for readable helper text on white and cream."
    },
    {
      "id": "danger-text-contrast",
      "status": "preview",
      "description": "Separate readable danger text/borders from destructive fills; preserve the primary danger-button fill and label pair."
    },
    {
      "id": "preview-status",
      "status": "preview",
      "description": "Local components, specs and token adaptations await human sign-off; upstream approved status is provenance only."
    },
    {
      "id": "motion-comparison-accessibility",
      "status": "preview",
      "description": "Preserve the original MotionShowcase comparisons while requiring explicit replay, responding to live reduced-motion changes, and keeping duration tracks usable on small screens."
    },
    {
      "id": "list-item-ownership",
      "status": "preview",
      "description": "List owns listitem wrappers for its content rows, while section labels stay outside the row count and standalone rows retain their existing semantics."
    },
    {
      "id": "card-delta-text-contrast",
      "status": "preview",
      "description": "Mix Card.Delta foregrounds from 60% existing tone solid and 40% primary text for readable contrast in both themes; preserve the four original tone fills."
    },
    {
      "id": "carousel-keyboard-access",
      "status": "preview",
      "description": "Keep all native-scrolling carousel slide controls exposed to assistive technology and keyboard navigation; pause autoplay while focus is inside the carousel."
    }
  ],
  "id": "textarea",
  "name": "Textarea",
  "category": "Forms",
  "summary": "A controlled multiline form field with configurable rows, semantic surfaces, and native length constraints.",
  "documentation": {
    "summary": "A controlled multiline form field with configurable rows, semantic surfaces, and native length constraints.",
    "guidance": [
      {
        "heading": "Overview",
        "body": "The multiline free-text control — token-styled to match `Input` but sized in `rows`."
      },
      {
        "heading": "When to use",
        "body": "Reach for `Textarea` when the answer is open-ended and can run past one line — notes, a\nremoval-request message, freeform feedback. Size the resting height with `rows` and cap entry\nwith `maxLength`.\n\n-   Editing a **single-line value** (a name, email, URL, short query)? Use `Input` — it's the\n    same visual treatment on one line.\n-   Wrap it in `Field` for a label and helper/error copy. The Field's `error` turns this box red\n    on its own; `invalid` is the escape hatch for a box with no `Field` around it.\n\nIn-app it backs the Playlist home feedback card (`HomeFeedbackCard`)."
      }
    ],
    "usage": [],
    "examples": [],
    "source": "packages/design-system/src/components/forms/Textarea/Textarea.mdx",
    "status": "local-preview",
    "note": "Guidance is read from local documentation, originally imported from the frozen source. Platform assertions in guidance are not parity verification."
  },
  "source": {
    "path": "packages/design-system/src/components/forms/Textarea/Textarea.tsx",
    "code": "import React from 'react';\nimport { cn } from '../../../utilities';\nimport { useFieldControl, type FieldControlProps } from '../../../hooks/FieldContext';\nimport styles from './Textarea.module.scss';\n\nconst DEFAULT_PLACEHOLDER = 'Enter details';\n\nexport type TextareaSurface = 'default' | 'raised';\n\n/**\n * Props for `Textarea`. The box never auto-grows: `rows` sets the starting height and\n * the user can drag it taller, bounded below by the stylesheet's `min-height`.\n */\nexport interface TextareaProps extends FieldControlProps {\n    /** Text to render. Controlled — the field shows this and nothing else. */\n    value: string;\n    /** Called with the new text, not the change event. */\n    onChange?: (value: string) => void;\n    /** Placeholder text. Defaults to `Enter details`. */\n    placeholder?: string;\n    /** Container background treatment. */\n    surface?: TextareaSurface;\n    /** Accessible name when no visible label is associated with the field. */\n    ariaLabel?: string;\n    /** Starting visible line count. Defaults to 4. */\n    rows?: number;\n    /** Maximum number of characters accepted. */\n    maxLength?: number;\n    /** Field name used when the surrounding form submits. */\n    name?: string;\n    /** Called when the field takes focus. */\n    onFocus?: () => void;\n    /** Called when the field loses focus. */\n    onBlur?: () => void;\n    className?: string;\n    /** Test id on the `<textarea>` itself. */\n    testId?: string;\n}\n\n/**\n * Renders a token-styled multi-line text field. It carries no label or message of its own —\n * wrap it in `Field` for those, and the Field's `error` drives the invalid treatment here.\n */\nexport function Textarea({\n    value,\n    onChange,\n    placeholder,\n    surface = 'default',\n    invalid,\n    disabled,\n    required,\n    ariaLabel,\n    ariaDescribedBy,\n    ariaLabelledBy,\n    rows = 4,\n    maxLength,\n    name,\n    id,\n    onFocus,\n    onBlur,\n    className,\n    testId,\n}: TextareaProps) {\n    const field = useFieldControl({ id, disabled, required, invalid, ariaDescribedBy, ariaLabelledBy });\n\n    return (\n        <div className={cn(styles.root, className)}>\n            <textarea\n                className={cn(styles.field, styles[`surface-${surface}`])}\n                data-invalid={field.invalid || undefined}\n                value={value}\n                onChange={event => onChange?.(event.target.value)}\n                placeholder={placeholder ?? DEFAULT_PLACEHOLDER}\n                disabled={field.disabled}\n                required={field.required}\n                rows={rows}\n                maxLength={maxLength}\n                name={name}\n                id={field.id}\n                onFocus={onFocus}\n                onBlur={onBlur}\n                aria-label={ariaLabel}\n                aria-labelledby={field.ariaLabelledBy}\n                aria-invalid={field.invalid || undefined}\n                aria-describedby={field.ariaDescribedBy}\n                data-testid={testId}\n            />\n        </div>\n    );\n}\n"
  },
  "spec": {
    "$schema": "../../../specs/component-spec.schema.json",
    "identity": {
      "name": "Textarea",
      "status": "preview",
      "version": "2.0.0",
      "summary": "A controlled multiline form field with configurable rows, semantic surfaces, and native length constraints."
    },
    "parts": [
      {
        "id": "root",
        "label": "Root",
        "description": "Carries the caller's class around the multiline field."
      },
      {
        "id": "field",
        "label": "Multiline field",
        "description": "Native textarea that owns value, rows, form, focus, validation, and disabled semantics."
      },
      {
        "id": "placeholder",
        "label": "Placeholder",
        "description": "Temporary hint shown only while the field is empty."
      }
    ],
    "allowedDesignChoices": {
      "variants": {
        "base": {
          "label": "Base",
          "description": "One multiline treatment configured through the independent surface axis."
        }
      },
      "sizes": {},
      "surfaces": {
        "default": {
          "label": "Default",
          "description": "Uses the semantic input container."
        },
        "raised": {
          "label": "Raised",
          "description": "Uses the raised surface when placed directly on the page canvas."
        }
      }
    },
    "variants": [
      {
        "id": "base",
        "label": "Base",
        "description": "Multiline native field with row-driven content capacity.",
        "platforms": [
          "ios",
          "android",
          "web"
        ]
      }
    ],
    "sizes": [],
    "measurements": [
      {
        "id": "minimum-height",
        "label": "Minimum field height",
        "kind": "exact",
        "token": "--cds-size-120",
        "value": 120,
        "unit": "px",
        "appliesTo": [
          "field"
        ]
      },
      {
        "id": "vertical-padding",
        "label": "Vertical field padding",
        "kind": "exact",
        "token": "--cds-space-20",
        "value": 20,
        "unit": "px",
        "appliesTo": [
          "field"
        ]
      },
      {
        "id": "horizontal-padding",
        "label": "Horizontal field padding",
        "kind": "exact",
        "token": "--cds-space-24",
        "value": 24,
        "unit": "px",
        "appliesTo": [
          "field"
        ]
      },
      {
        "id": "corner-radius",
        "label": "Field corner radius",
        "kind": "exact",
        "token": "--cds-radius-md",
        "value": 16,
        "unit": "px",
        "appliesTo": [
          "field"
        ]
      }
    ],
    "layout": {
      "alignment": "Text begins at the field's top-leading content inset; the enclosing Field's error message aligns below.",
      "flow": "One multiline native field.",
      "notes": [
        "Rows may increase the resting height but never reduce it below the approved minimum.",
        "Use Field for a persistent label and helper copy."
      ]
    },
    "typographyAndColor": {
      "typography": [
        {
          "label": "Field text",
          "description": "Use the body ramp for entered text and placeholders.",
          "token": "--cds-type-body-size"
        }
      ],
      "colors": [
        {
          "label": "Default surface",
          "description": "Use the semantic input container.",
          "token": "--cds-input-container"
        },
        {
          "label": "Raised surface",
          "description": "Use the raised semantic surface.",
          "token": "--cds-bg-surface"
        },
        {
          "label": "Entered text",
          "description": "Use primary text emphasis.",
          "token": "--cds-text-primary"
        },
        {
          "label": "Placeholder",
          "description": "Use secondary text emphasis at full opacity.",
          "token": "--cds-text-secondary"
        },
        {
          "label": "Validation",
          "description": "Use the solid danger role for invalid border and copy.",
          "token": "--cds-status-danger-solid"
        }
      ]
    },
    "states": [
      {
        "id": "empty",
        "label": "Empty",
        "description": "Shows the explicit or default placeholder."
      },
      {
        "id": "filled",
        "label": "Filled",
        "description": "Shows controlled multiline content in primary text."
      },
      {
        "id": "focused",
        "label": "Focused",
        "description": "Accepts multiline editing. Draws no focus ring: the runtime is a touch-only WebView with no keyboard navigation, and the caret plus the on-screen keyboard already mark the active field."
      },
      {
        "id": "invalid",
        "label": "Invalid",
        "description": "Shows the danger border and invalid semantics. The corrective message belongs to the enclosing Field."
      },
      {
        "id": "disabled",
        "label": "Disabled",
        "description": "Blocks editing and dims the field."
      }
    ],
    "behavior": [
      {
        "label": "Controlled editing",
        "description": "Request each next string value while the parent owns rendered content."
      },
      {
        "label": "Rows",
        "description": "Use the native rows value to express expected content capacity without replacing the minimum geometry."
      },
      {
        "label": "Length constraint",
        "description": "Forward maxLength to native editing and form semantics."
      },
      {
        "label": "Resize",
        "description": "Allow vertical web resizing only; never permit horizontal resizing to break the form width."
      }
    ],
    "accessibility": [
      {
        "label": "Accessible name",
        "description": "Associate a visible Field label or provide an accessible label for standalone usage."
      },
      {
        "label": "Validation",
        "description": "Expose required, disabled, invalid, and described-by state through the native textarea."
      },
      {
        "label": "Placeholder",
        "description": "Never use placeholder copy as the only persistent label for a complex form."
      }
    ],
    "contentAdaptation": [
      {
        "label": "Long content",
        "description": "Wrap and vertically scroll long content while preserving the control width."
      },
      {
        "label": "Capacity cues",
        "description": "Choose rows and maxLength from the expected answer rather than shrinking all multiline fields to one line."
      }
    ],
    "motionHaptics": {
      "motion": [
        {
          "label": "Focus and validation",
          "description": "Change focus and error indication without moving entered content."
        }
      ],
      "haptics": [
        {
          "label": "No intrinsic feedback",
          "description": "Typing, focus, and validation do not request design-system haptics."
        }
      ]
    },
    "platformDifferences": [
      {
        "platforms": [
          "web"
        ],
        "description": "Web exposes a vertical drag-resize affordance; iOS and Android rely on intrinsic text-view scrolling and layout.",
        "rationale": "Pointer resizing is useful in Storybook and desktop web contexts but is not a native mobile interaction."
      }
    ]
  },
  "spec_source": "packages/design-system/src/components/forms/Textarea/Textarea.spec.json",
  "guidance_source": {
    "path": "packages/design-system/src/components/forms/Textarea/Textarea.mdx",
    "code": "import { Meta, Canvas, Controls } from '@storybook/addon-docs/blocks';\nimport { ComponentSpec } from '../../../../.storybook/blocks';\nimport * as Stories from './Textarea.stories';\nimport textareaSpec from './Textarea.spec.json';\n\n<Meta of={Stories} />\n\n# Textarea\n\nThe multiline free-text control — token-styled to match `Input` but sized in `rows`.\n\n<Canvas of={Stories.Playground} />\n\n## When to use\n\nReach for `Textarea` when the answer is open-ended and can run past one line — notes, a\nremoval-request message, freeform feedback. Size the resting height with `rows` and cap entry\nwith `maxLength`.\n\n-   Editing a **single-line value** (a name, email, URL, short query)? Use `Input` — it's the\n    same visual treatment on one line.\n-   Wrap it in `Field` for a label and helper/error copy. The Field's `error` turns this box red\n    on its own; `invalid` is the escape hatch for a box with no `Field` around it.\n\nIn-app it backs the Playlist home feedback card (`HomeFeedbackCard`).\n\n<Canvas of={Stories.WithField} />\n\n## Design Guidelines\n\n<ComponentSpec spec={textareaSpec} />\n\n## Props\n\n<Controls of={Stories.Playground} />\n"
  },
  "props": [
    {
      "name": "value",
      "type": "string",
      "declared_type": "string",
      "required": true,
      "description": "Text to render. Controlled — the field shows this and nothing else.",
      "source": {
        "path": "packages/design-system/src/components/forms/Textarea/Textarea.tsx",
        "line": 16
      }
    },
    {
      "name": "onChange",
      "type": "((value: string) => void) | undefined",
      "declared_type": "(value: string) => void",
      "required": false,
      "description": "Called with the new text, not the change event.",
      "source": {
        "path": "packages/design-system/src/components/forms/Textarea/Textarea.tsx",
        "line": 18
      }
    },
    {
      "name": "placeholder",
      "type": "string | undefined",
      "declared_type": "string",
      "required": false,
      "description": "Placeholder text. Defaults to `Enter details`.",
      "source": {
        "path": "packages/design-system/src/components/forms/Textarea/Textarea.tsx",
        "line": 20
      }
    },
    {
      "name": "surface",
      "type": "TextareaSurface | undefined",
      "declared_type": "TextareaSurface",
      "required": false,
      "description": "Container background treatment.",
      "source": {
        "path": "packages/design-system/src/components/forms/Textarea/Textarea.tsx",
        "line": 22
      },
      "values": [
        "default",
        "raised"
      ],
      "values_complete": true,
      "default": "'default'",
      "default_kind": "source-expression"
    },
    {
      "name": "ariaLabel",
      "type": "string | undefined",
      "declared_type": "string",
      "required": false,
      "description": "Accessible name when no visible label is associated with the field.",
      "source": {
        "path": "packages/design-system/src/components/forms/Textarea/Textarea.tsx",
        "line": 24
      }
    },
    {
      "name": "rows",
      "type": "number | undefined",
      "declared_type": "number",
      "required": false,
      "description": "Starting visible line count. Defaults to 4.",
      "source": {
        "path": "packages/design-system/src/components/forms/Textarea/Textarea.tsx",
        "line": 26
      },
      "default": "4",
      "default_kind": "source-expression"
    },
    {
      "name": "maxLength",
      "type": "number | undefined",
      "declared_type": "number",
      "required": false,
      "description": "Maximum number of characters accepted.",
      "source": {
        "path": "packages/design-system/src/components/forms/Textarea/Textarea.tsx",
        "line": 28
      }
    },
    {
      "name": "name",
      "type": "string | undefined",
      "declared_type": "string",
      "required": false,
      "description": "Field name used when the surrounding form submits.",
      "source": {
        "path": "packages/design-system/src/components/forms/Textarea/Textarea.tsx",
        "line": 30
      }
    },
    {
      "name": "onFocus",
      "type": "(() => void) | undefined",
      "declared_type": "() => void",
      "required": false,
      "description": "Called when the field takes focus.",
      "source": {
        "path": "packages/design-system/src/components/forms/Textarea/Textarea.tsx",
        "line": 32
      }
    },
    {
      "name": "onBlur",
      "type": "(() => void) | undefined",
      "declared_type": "() => void",
      "required": false,
      "description": "Called when the field loses focus.",
      "source": {
        "path": "packages/design-system/src/components/forms/Textarea/Textarea.tsx",
        "line": 34
      }
    },
    {
      "name": "className",
      "type": "string | undefined",
      "declared_type": "string",
      "required": false,
      "description": "",
      "source": {
        "path": "packages/design-system/src/components/forms/Textarea/Textarea.tsx",
        "line": 35
      }
    },
    {
      "name": "testId",
      "type": "string | undefined",
      "declared_type": "string",
      "required": false,
      "description": "Test id on the `<textarea>` itself.",
      "source": {
        "path": "packages/design-system/src/components/forms/Textarea/Textarea.tsx",
        "line": 37
      }
    },
    {
      "name": "id",
      "type": "string | undefined",
      "declared_type": "string",
      "required": false,
      "description": "DOM id the control renders, which the Field's label points at.",
      "source": {
        "path": "packages/design-system/src/hooks/FieldContext.ts",
        "line": 22
      }
    },
    {
      "name": "disabled",
      "type": "boolean | undefined",
      "declared_type": "boolean",
      "required": false,
      "description": "Blocks interaction and dims the control.",
      "source": {
        "path": "packages/design-system/src/hooks/FieldContext.ts",
        "line": 24
      },
      "values": [
        false,
        true
      ],
      "values_complete": true
    },
    {
      "name": "required",
      "type": "boolean | undefined",
      "declared_type": "boolean",
      "required": false,
      "description": "Marks the control required for native form semantics.",
      "source": {
        "path": "packages/design-system/src/hooks/FieldContext.ts",
        "line": 26
      },
      "values": [
        false,
        true
      ],
      "values_complete": true
    },
    {
      "name": "invalid",
      "type": "boolean | undefined",
      "declared_type": "boolean",
      "required": false,
      "description": "Paints the invalid treatment and announces the control as invalid. A Field supplies\nthis from its own `error`; set it directly only for a control with no Field around it.",
      "source": {
        "path": "packages/design-system/src/hooks/FieldContext.ts",
        "line": 31
      },
      "values": [
        false,
        true
      ],
      "values_complete": true
    },
    {
      "name": "ariaDescribedBy",
      "type": "string | undefined",
      "declared_type": "string",
      "required": false,
      "description": "Ids of the helper or error copy describing the control, supplied by a parent Field.",
      "source": {
        "path": "packages/design-system/src/hooks/FieldContext.ts",
        "line": 33
      }
    },
    {
      "name": "ariaLabelledBy",
      "type": "string | undefined",
      "declared_type": "string",
      "required": false,
      "description": "Id of the visible label naming the control, supplied by a parent Field.",
      "source": {
        "path": "packages/design-system/src/hooks/FieldContext.ts",
        "line": 35
      }
    }
  ],
  "prop_shapes": {},
  "examples": [],
  "tokens": [
    {
      "name": "--cds-size-120",
      "light": "120px",
      "dark": "120px"
    },
    {
      "name": "--cds-space-20",
      "light": "20px",
      "dark": "20px"
    },
    {
      "name": "--cds-space-24",
      "light": "24px",
      "dark": "24px"
    },
    {
      "name": "--cds-radius-md",
      "light": "16px",
      "dark": "16px"
    },
    {
      "name": "--cds-type-body-size",
      "light": "1rem",
      "dark": "1rem"
    },
    {
      "name": "--cds-input-container",
      "light": "#f3f1ed",
      "dark": "#232321"
    },
    {
      "name": "--cds-bg-surface",
      "light": "#ffffff",
      "dark": "#1b1b18"
    },
    {
      "name": "--cds-text-primary",
      "light": "#141410",
      "dark": "#f3f1ed"
    },
    {
      "name": "--cds-text-secondary",
      "light": "#646260",
      "dark": "#ffffff99"
    },
    {
      "name": "--cds-status-danger-solid",
      "light": "#b83100",
      "dark": "#b83100"
    }
  ],
  "visual_reference": {
    "stories": [
      {
        "id": "cloaked-design-system-forms-textarea--playground",
        "name": "Playground",
        "title": "Cloaked Design System/Forms/Textarea",
        "exportName": "Playground",
        "source_path": "packages/design-system/src/components/forms/Textarea/Textarea.stories.tsx",
        "source_digest": "09cd3ed3467c053180e906f9c9fecdcf23f9deedd502583fcad754a0ede34092",
        "status": "preview",
        "local_url": "/storybook/iframe.html?id=cloaked-design-system-forms-textarea--playground&viewMode=story"
      },
      {
        "id": "cloaked-design-system-forms-textarea--with-field",
        "name": "With Field",
        "title": "Cloaked Design System/Forms/Textarea",
        "exportName": "WithField",
        "source_path": "packages/design-system/src/components/forms/Textarea/Textarea.stories.tsx",
        "source_digest": "09cd3ed3467c053180e906f9c9fecdcf23f9deedd502583fcad754a0ede34092",
        "status": "preview",
        "local_url": "/storybook/iframe.html?id=cloaked-design-system-forms-textarea--with-field&viewMode=story"
      },
      {
        "id": "cloaked-design-system-forms-textarea--raised-on-canvas",
        "name": "Raised On Canvas",
        "title": "Cloaked Design System/Forms/Textarea",
        "exportName": "RaisedOnCanvas",
        "source_path": "packages/design-system/src/components/forms/Textarea/Textarea.stories.tsx",
        "source_digest": "09cd3ed3467c053180e906f9c9fecdcf23f9deedd502583fcad754a0ede34092",
        "status": "preview",
        "local_url": "/storybook/iframe.html?id=cloaked-design-system-forms-textarea--raised-on-canvas&viewMode=story"
      },
      {
        "id": "cloaked-design-system-forms-textarea--invalid-in-field",
        "name": "Invalid In Field",
        "title": "Cloaked Design System/Forms/Textarea",
        "exportName": "InvalidInField",
        "source_path": "packages/design-system/src/components/forms/Textarea/Textarea.stories.tsx",
        "source_digest": "09cd3ed3467c053180e906f9c9fecdcf23f9deedd502583fcad754a0ede34092",
        "status": "preview",
        "local_url": "/storybook/iframe.html?id=cloaked-design-system-forms-textarea--invalid-in-field&viewMode=story"
      },
      {
        "id": "cloaked-design-system-forms-textarea--filled",
        "name": "Filled",
        "title": "Cloaked Design System/Forms/Textarea",
        "exportName": "Filled",
        "source_path": "packages/design-system/src/components/forms/Textarea/Textarea.stories.tsx",
        "source_digest": "09cd3ed3467c053180e906f9c9fecdcf23f9deedd502583fcad754a0ede34092",
        "status": "preview",
        "local_url": "/storybook/iframe.html?id=cloaked-design-system-forms-textarea--filled&viewMode=story"
      },
      {
        "id": "cloaked-design-system-forms-textarea--disabled",
        "name": "Disabled",
        "title": "Cloaked Design System/Forms/Textarea",
        "exportName": "Disabled",
        "source_path": "packages/design-system/src/components/forms/Textarea/Textarea.stories.tsx",
        "source_digest": "09cd3ed3467c053180e906f9c9fecdcf23f9deedd502583fcad754a0ede34092",
        "status": "preview",
        "local_url": "/storybook/iframe.html?id=cloaked-design-system-forms-textarea--disabled&viewMode=story"
      },
      {
        "id": "cloaked-design-system-forms-textarea--state-matrix",
        "name": "State Matrix",
        "title": "Cloaked Design System/Forms/Textarea",
        "exportName": "StateMatrix",
        "source_path": "packages/design-system/src/components/forms/Textarea/Textarea.stories.tsx",
        "source_digest": "09cd3ed3467c053180e906f9c9fecdcf23f9deedd502583fcad754a0ede34092",
        "status": "preview",
        "local_url": "/storybook/iframe.html?id=cloaked-design-system-forms-textarea--state-matrix&viewMode=story"
      },
      {
        "id": "cloaked-design-system-forms-textarea--long-content",
        "name": "Long Content",
        "title": "Cloaked Design System/Forms/Textarea",
        "exportName": "LongContent",
        "source_path": "packages/design-system/src/components/forms/Textarea/Textarea.stories.tsx",
        "source_digest": "09cd3ed3467c053180e906f9c9fecdcf23f9deedd502583fcad754a0ede34092",
        "status": "preview",
        "local_url": "/storybook/iframe.html?id=cloaked-design-system-forms-textarea--long-content&viewMode=story"
      },
      {
        "id": "cloaked-design-system-forms-textarea--dark-theme",
        "name": "Dark Theme",
        "title": "Cloaked Design System/Forms/Textarea",
        "exportName": "DarkTheme",
        "source_path": "packages/design-system/src/components/forms/Textarea/Textarea.stories.tsx",
        "source_digest": "09cd3ed3467c053180e906f9c9fecdcf23f9deedd502583fcad754a0ede34092",
        "status": "preview",
        "local_url": "/storybook/iframe.html?id=cloaked-design-system-forms-textarea--dark-theme&viewMode=story"
      }
    ],
    "name": "Textarea",
    "id": "textarea",
    "category": "Forms"
  },
  "stories": [
    {
      "id": "cloaked-design-system-forms-textarea--playground",
      "name": "Playground",
      "title": "Cloaked Design System/Forms/Textarea",
      "exportName": "Playground",
      "source_path": "packages/design-system/src/components/forms/Textarea/Textarea.stories.tsx",
      "source_digest": "09cd3ed3467c053180e906f9c9fecdcf23f9deedd502583fcad754a0ede34092",
      "status": "preview",
      "local_url": "/storybook/iframe.html?id=cloaked-design-system-forms-textarea--playground&viewMode=story"
    },
    {
      "id": "cloaked-design-system-forms-textarea--with-field",
      "name": "With Field",
      "title": "Cloaked Design System/Forms/Textarea",
      "exportName": "WithField",
      "source_path": "packages/design-system/src/components/forms/Textarea/Textarea.stories.tsx",
      "source_digest": "09cd3ed3467c053180e906f9c9fecdcf23f9deedd502583fcad754a0ede34092",
      "status": "preview",
      "local_url": "/storybook/iframe.html?id=cloaked-design-system-forms-textarea--with-field&viewMode=story"
    },
    {
      "id": "cloaked-design-system-forms-textarea--raised-on-canvas",
      "name": "Raised On Canvas",
      "title": "Cloaked Design System/Forms/Textarea",
      "exportName": "RaisedOnCanvas",
      "source_path": "packages/design-system/src/components/forms/Textarea/Textarea.stories.tsx",
      "source_digest": "09cd3ed3467c053180e906f9c9fecdcf23f9deedd502583fcad754a0ede34092",
      "status": "preview",
      "local_url": "/storybook/iframe.html?id=cloaked-design-system-forms-textarea--raised-on-canvas&viewMode=story"
    },
    {
      "id": "cloaked-design-system-forms-textarea--invalid-in-field",
      "name": "Invalid In Field",
      "title": "Cloaked Design System/Forms/Textarea",
      "exportName": "InvalidInField",
      "source_path": "packages/design-system/src/components/forms/Textarea/Textarea.stories.tsx",
      "source_digest": "09cd3ed3467c053180e906f9c9fecdcf23f9deedd502583fcad754a0ede34092",
      "status": "preview",
      "local_url": "/storybook/iframe.html?id=cloaked-design-system-forms-textarea--invalid-in-field&viewMode=story"
    },
    {
      "id": "cloaked-design-system-forms-textarea--filled",
      "name": "Filled",
      "title": "Cloaked Design System/Forms/Textarea",
      "exportName": "Filled",
      "source_path": "packages/design-system/src/components/forms/Textarea/Textarea.stories.tsx",
      "source_digest": "09cd3ed3467c053180e906f9c9fecdcf23f9deedd502583fcad754a0ede34092",
      "status": "preview",
      "local_url": "/storybook/iframe.html?id=cloaked-design-system-forms-textarea--filled&viewMode=story"
    },
    {
      "id": "cloaked-design-system-forms-textarea--disabled",
      "name": "Disabled",
      "title": "Cloaked Design System/Forms/Textarea",
      "exportName": "Disabled",
      "source_path": "packages/design-system/src/components/forms/Textarea/Textarea.stories.tsx",
      "source_digest": "09cd3ed3467c053180e906f9c9fecdcf23f9deedd502583fcad754a0ede34092",
      "status": "preview",
      "local_url": "/storybook/iframe.html?id=cloaked-design-system-forms-textarea--disabled&viewMode=story"
    },
    {
      "id": "cloaked-design-system-forms-textarea--state-matrix",
      "name": "State Matrix",
      "title": "Cloaked Design System/Forms/Textarea",
      "exportName": "StateMatrix",
      "source_path": "packages/design-system/src/components/forms/Textarea/Textarea.stories.tsx",
      "source_digest": "09cd3ed3467c053180e906f9c9fecdcf23f9deedd502583fcad754a0ede34092",
      "status": "preview",
      "local_url": "/storybook/iframe.html?id=cloaked-design-system-forms-textarea--state-matrix&viewMode=story"
    },
    {
      "id": "cloaked-design-system-forms-textarea--long-content",
      "name": "Long Content",
      "title": "Cloaked Design System/Forms/Textarea",
      "exportName": "LongContent",
      "source_path": "packages/design-system/src/components/forms/Textarea/Textarea.stories.tsx",
      "source_digest": "09cd3ed3467c053180e906f9c9fecdcf23f9deedd502583fcad754a0ede34092",
      "status": "preview",
      "local_url": "/storybook/iframe.html?id=cloaked-design-system-forms-textarea--long-content&viewMode=story"
    },
    {
      "id": "cloaked-design-system-forms-textarea--dark-theme",
      "name": "Dark Theme",
      "title": "Cloaked Design System/Forms/Textarea",
      "exportName": "DarkTheme",
      "source_path": "packages/design-system/src/components/forms/Textarea/Textarea.stories.tsx",
      "source_digest": "09cd3ed3467c053180e906f9c9fecdcf23f9deedd502583fcad754a0ede34092",
      "status": "preview",
      "local_url": "/storybook/iframe.html?id=cloaked-design-system-forms-textarea--dark-theme&viewMode=story"
    }
  ],
  "stories_source": {
    "path": "packages/design-system/src/components/forms/Textarea/Textarea.stories.tsx",
    "code": "import React from 'react';\nimport type { Meta, StoryObj } from '@storybook/react-vite';\nimport { VStack } from '../../layout/VStack/VStack';\nimport { disabledControl, selectArgType } from '../../../storybook/controlOptions';\nimport { Field } from '../Field/Field';\nimport { Textarea, type TextareaSurface } from './Textarea';\n\nconst TEXTAREA_SURFACES = ['default', 'raised'] as const satisfies readonly TextareaSurface[];\n\nconst meta: Meta<typeof Textarea> = {\n    title: 'Cloaked Design System/Forms/Textarea',\n    component: Textarea,\n    parameters: {\n        a11y: { test: 'error' },\n        stage: 'form-control',\n        docs: {\n            description: {\n                component:\n                    'The multiline free-text form control — token-styled to match `Input` but sized in `rows`. ' +\n                    'Use it for open-ended entry like notes or a removal-request message; use `Input` for single-line ' +\n                    'values. Cap length with `maxLength`. Pair with `Field` for a label and helper/error copy; only ' +\n                    'pass the standalone `error` prop when used outside `Field`.',\n            },\n        },\n    },\n    args: {\n        value: '',\n        ariaLabel: 'Notes',\n        testId: 'textarea-story',\n    },\n    argTypes: {\n        surface: {\n            ...selectArgType(TEXTAREA_SURFACES),\n            description: 'Field background: `default` on a page, `raised` on an already-elevated surface.',\n        },\n        onChange: { ...disabledControl, description: 'Called with the next string value on every edit.' },\n        value: { control: 'text', description: 'Current field value.' },\n        placeholder: { control: 'text', description: 'Placeholder shown while empty (defaults to \"Enter details\").' },\n        invalid: {\n            control: 'boolean',\n            description: 'Paints the invalid ring. A parent Field sets this from its own `error`.',\n        },\n        rows: { control: 'number', description: 'Visible row count driving the resting height.' },\n        maxLength: { control: 'number', description: 'Maximum characters the field accepts.' },\n        disabled: { control: 'boolean', description: 'Blocks editing and dims the field.' },\n    },\n};\nexport default meta;\ntype Story = StoryObj<typeof Textarea>;\n\nexport const Playground: Story = {};\n\nexport const WithField: Story = {\n    parameters: {\n        docs: { description: { story: 'Wrapped in `Field` so the label and helper text come from the field.' } },\n    },\n    render: () => (\n        <Field label='Notes' helperText='Add anything the automation should know.'>\n            <Textarea value='' testId='textarea-with-field' />\n        </Field>\n    ),\n};\n\nexport const RaisedOnCanvas: Story = {\n    parameters: {\n        stage: 'page',\n        docs: {\n            description: {\n                story: 'The `raised` white box on the cream page canvas, where the `default` cream fill would disappear. Every other story shows `default` on the white surface it is built for.',\n            },\n        },\n    },\n    args: { value: 'Raised surface note', surface: 'raised', testId: 'textarea-surface-raised' },\n};\n\nexport const InvalidInField: Story = {\n    parameters: {\n        docs: { description: { story: 'Field owns the message; the box turns red through context.' } },\n    },\n    render: args => (\n        <Field label='Notes' error='Details are required.'>\n            <Textarea {...args} />\n        </Field>\n    ),\n    args: { testId: 'textarea-error' },\n};\n\nexport const Filled: Story = {\n    parameters: { docs: { description: { story: 'Resting state with content entered.' } } },\n    args: { value: 'Please remove my information from this broker listing.', testId: 'textarea-filled' },\n};\n\nexport const Disabled: Story = {\n    parameters: { docs: { description: { story: 'Disabled field cannot be edited.' } } },\n    args: { value: 'Locked details', disabled: true, testId: 'textarea-disabled' },\n};\n\nexport const StateMatrix: Story = {\n    parameters: { docs: { description: { story: 'Empty, filled, error, and disabled fields side by side.' } } },\n    render: () => (\n        <VStack gap={16}>\n            <Textarea value='' ariaLabel='Empty notes' testId='textarea-matrix-empty' />\n            <Textarea\n                value='Please remove my information from this broker listing.'\n                ariaLabel='Filled notes'\n                testId='textarea-matrix-filled'\n            />\n            <Textarea value='' ariaLabel='Error notes' invalid testId='textarea-matrix-error' />\n            <Textarea value='Locked details' ariaLabel='Disabled notes' disabled testId='textarea-matrix-disabled' />\n        </VStack>\n    ),\n};\n\nexport const LongContent: Story = {\n    parameters: {\n        docs: {\n            description: { story: 'Long multiline content wraps and scrolls without changing the field treatment.' },\n        },\n    },\n    args: {\n        value: 'This longer note shows how multiline content wraps, scrolls, and keeps the same input treatment on a compact mobile surface.',\n        ariaLabel: 'Long notes',\n        testId: 'textarea-long-content',\n    },\n};\n\nexport const DarkTheme: Story = {\n    globals: { theme: 'dark' },\n    parameters: { docs: { description: { story: 'Field and error tokens on the dark theme.' } } },\n    render: () => (\n        <VStack gap={16}>\n            <Textarea value='Dark theme note' ariaLabel='Filled notes' testId='textarea-dark-filled' />\n            <Textarea value='' ariaLabel='Error notes' invalid testId='textarea-dark-error' />\n        </VStack>\n    ),\n};\n"
  },
  "links": {
    "human": "/component-textarea",
    "json": "/data/components/textarea.json",
    "markdown": "/data/components/textarea.md",
    "storybook": "/storybook/?path=/story/cloaked-design-system-forms-textarea--playground"
  },
  "contract_status": "preview",
  "contract_kind": "source-derived",
  "approval": "required",
  "api": {
    "method": "typescript-type-checker",
    "typescript_version": "5.9.3",
    "public_export": "Textarea",
    "public_path": "Textarea",
    "import_path": "@cloakedinc/design-system",
    "root_kind": "component",
    "entrypoints": [
      {
        "name": "Textarea",
        "signature": 1,
        "visibility": "public",
        "source": {
          "path": "packages/design-system/src/components/forms/Textarea/Textarea.tsx",
          "line": 44
        },
        "props_type": "TextareaProps",
        "props": [
          {
            "name": "value",
            "type": "string",
            "declared_type": "string",
            "required": true,
            "description": "Text to render. Controlled — the field shows this and nothing else.",
            "source": {
              "path": "packages/design-system/src/components/forms/Textarea/Textarea.tsx",
              "line": 16
            }
          },
          {
            "name": "onChange",
            "type": "((value: string) => void) | undefined",
            "declared_type": "(value: string) => void",
            "required": false,
            "description": "Called with the new text, not the change event.",
            "source": {
              "path": "packages/design-system/src/components/forms/Textarea/Textarea.tsx",
              "line": 18
            }
          },
          {
            "name": "placeholder",
            "type": "string | undefined",
            "declared_type": "string",
            "required": false,
            "description": "Placeholder text. Defaults to `Enter details`.",
            "source": {
              "path": "packages/design-system/src/components/forms/Textarea/Textarea.tsx",
              "line": 20
            }
          },
          {
            "name": "surface",
            "type": "TextareaSurface | undefined",
            "declared_type": "TextareaSurface",
            "required": false,
            "description": "Container background treatment.",
            "source": {
              "path": "packages/design-system/src/components/forms/Textarea/Textarea.tsx",
              "line": 22
            },
            "values": [
              "default",
              "raised"
            ],
            "values_complete": true,
            "default": "'default'",
            "default_kind": "source-expression"
          },
          {
            "name": "ariaLabel",
            "type": "string | undefined",
            "declared_type": "string",
            "required": false,
            "description": "Accessible name when no visible label is associated with the field.",
            "source": {
              "path": "packages/design-system/src/components/forms/Textarea/Textarea.tsx",
              "line": 24
            }
          },
          {
            "name": "rows",
            "type": "number | undefined",
            "declared_type": "number",
            "required": false,
            "description": "Starting visible line count. Defaults to 4.",
            "source": {
              "path": "packages/design-system/src/components/forms/Textarea/Textarea.tsx",
              "line": 26
            },
            "default": "4",
            "default_kind": "source-expression"
          },
          {
            "name": "maxLength",
            "type": "number | undefined",
            "declared_type": "number",
            "required": false,
            "description": "Maximum number of characters accepted.",
            "source": {
              "path": "packages/design-system/src/components/forms/Textarea/Textarea.tsx",
              "line": 28
            }
          },
          {
            "name": "name",
            "type": "string | undefined",
            "declared_type": "string",
            "required": false,
            "description": "Field name used when the surrounding form submits.",
            "source": {
              "path": "packages/design-system/src/components/forms/Textarea/Textarea.tsx",
              "line": 30
            }
          },
          {
            "name": "onFocus",
            "type": "(() => void) | undefined",
            "declared_type": "() => void",
            "required": false,
            "description": "Called when the field takes focus.",
            "source": {
              "path": "packages/design-system/src/components/forms/Textarea/Textarea.tsx",
              "line": 32
            }
          },
          {
            "name": "onBlur",
            "type": "(() => void) | undefined",
            "declared_type": "() => void",
            "required": false,
            "description": "Called when the field loses focus.",
            "source": {
              "path": "packages/design-system/src/components/forms/Textarea/Textarea.tsx",
              "line": 34
            }
          },
          {
            "name": "className",
            "type": "string | undefined",
            "declared_type": "string",
            "required": false,
            "description": "",
            "source": {
              "path": "packages/design-system/src/components/forms/Textarea/Textarea.tsx",
              "line": 35
            }
          },
          {
            "name": "testId",
            "type": "string | undefined",
            "declared_type": "string",
            "required": false,
            "description": "Test id on the `<textarea>` itself.",
            "source": {
              "path": "packages/design-system/src/components/forms/Textarea/Textarea.tsx",
              "line": 37
            }
          },
          {
            "name": "id",
            "type": "string | undefined",
            "declared_type": "string",
            "required": false,
            "description": "DOM id the control renders, which the Field's label points at.",
            "source": {
              "path": "packages/design-system/src/hooks/FieldContext.ts",
              "line": 22
            }
          },
          {
            "name": "disabled",
            "type": "boolean | undefined",
            "declared_type": "boolean",
            "required": false,
            "description": "Blocks interaction and dims the control.",
            "source": {
              "path": "packages/design-system/src/hooks/FieldContext.ts",
              "line": 24
            },
            "values": [
              false,
              true
            ],
            "values_complete": true
          },
          {
            "name": "required",
            "type": "boolean | undefined",
            "declared_type": "boolean",
            "required": false,
            "description": "Marks the control required for native form semantics.",
            "source": {
              "path": "packages/design-system/src/hooks/FieldContext.ts",
              "line": 26
            },
            "values": [
              false,
              true
            ],
            "values_complete": true
          },
          {
            "name": "invalid",
            "type": "boolean | undefined",
            "declared_type": "boolean",
            "required": false,
            "description": "Paints the invalid treatment and announces the control as invalid. A Field supplies\nthis from its own `error`; set it directly only for a control with no Field around it.",
            "source": {
              "path": "packages/design-system/src/hooks/FieldContext.ts",
              "line": 31
            },
            "values": [
              false,
              true
            ],
            "values_complete": true
          },
          {
            "name": "ariaDescribedBy",
            "type": "string | undefined",
            "declared_type": "string",
            "required": false,
            "description": "Ids of the helper or error copy describing the control, supplied by a parent Field.",
            "source": {
              "path": "packages/design-system/src/hooks/FieldContext.ts",
              "line": 33
            }
          },
          {
            "name": "ariaLabelledBy",
            "type": "string | undefined",
            "declared_type": "string",
            "required": false,
            "description": "Id of the visible label naming the control, supplied by a parent Field.",
            "source": {
              "path": "packages/design-system/src/hooks/FieldContext.ts",
              "line": 35
            }
          }
        ],
        "branches": [],
        "constraints": [],
        "extraction_status": "extracted"
      }
    ],
    "type_sources": [
      {
        "path": "packages/design-system/src/components/forms/Textarea/Textarea.tsx",
        "line": 8,
        "name": "TextareaSurface",
        "code": "export type TextareaSurface = 'default' | 'raised';"
      },
      {
        "path": "packages/design-system/src/components/forms/Textarea/Textarea.tsx",
        "line": 14,
        "name": "TextareaProps",
        "code": "export interface TextareaProps extends FieldControlProps {\n    /** Text to render. Controlled — the field shows this and nothing else. */\n    value: string;\n    /** Called with the new text, not the change event. */\n    onChange?: (value: string) => void;\n    /** Placeholder text. Defaults to `Enter details`. */\n    placeholder?: string;\n    /** Container background treatment. */\n    surface?: TextareaSurface;\n    /** Accessible name when no visible label is associated with the field. */\n    ariaLabel?: string;\n    /** Starting visible line count. Defaults to 4. */\n    rows?: number;\n    /** Maximum number of characters accepted. */\n    maxLength?: number;\n    /** Field name used when the surrounding form submits. */\n    name?: string;\n    /** Called when the field takes focus. */\n    onFocus?: () => void;\n    /** Called when the field loses focus. */\n    onBlur?: () => void;\n    className?: string;\n    /** Test id on the `<textarea>` itself. */\n    testId?: string;\n}"
      },
      {
        "path": "packages/design-system/src/hooks/FieldContext.ts",
        "line": 20,
        "name": "FieldControlProps",
        "code": "export interface FieldControlProps {\n    /** DOM id the control renders, which the Field's label points at. */\n    id?: string;\n    /** Blocks interaction and dims the control. */\n    disabled?: boolean;\n    /** Marks the control required for native form semantics. */\n    required?: boolean;\n    /**\n     * Paints the invalid treatment and announces the control as invalid. A Field supplies\n     * this from its own `error`; set it directly only for a control with no Field around it.\n     */\n    invalid?: boolean;\n    /** Ids of the helper or error copy describing the control, supplied by a parent Field. */\n    ariaDescribedBy?: string;\n    /** Id of the visible label naming the control, supplied by a parent Field. */\n    ariaLabelledBy?: string;\n}"
      }
    ],
    "defaults_policy": "Only explicit destructured parameter initializers are extracted. Other runtime defaults remain in implementation source."
  },
  "platforms": {
    "implemented": [
      "web"
    ],
    "native": "Imported design guidance only; no native implementation or parity verification in this preview.",
    "react": {
      "implementation": "local",
      "status": "preview",
      "parity": "web-reference"
    },
    "vue": {
      "implementation": "absent",
      "parity": "not-verified",
      "status": "reference-only"
    },
    "swift": {
      "implementation": "absent",
      "parity": "not-verified",
      "status": "reference-only"
    },
    "kotlin": {
      "implementation": "absent",
      "parity": "not-verified",
      "status": "reference-only"
    }
  },
  "missing_facts": [
    {
      "code": "human-review-pending",
      "detail": "This local preview has no recorded human design or engineering sign-off."
    },
    {
      "code": "platform-parity-unverified",
      "detail": "Vue, Swift and Kotlin implementations are absent from this package; platform parity has not been verified."
    },
    {
      "code": "figma-mapping-unverified",
      "detail": "No current component-level Figma node and immutable revision have been verified for this contract."
    }
  ],
  "review": {
    "local_status": "not-reviewed",
    "source_approval": null,
    "imported_spec_status": "approved",
    "spec_origin": "imported-adapted",
    "local_spec_source_status": "approved",
    "imported_source_revision": "f96f416e1c3bfbfaffcd155a88b87b18b8bb25f1",
    "note": "Inherited specification status is provenance, not approval of the current local implementation or extracted contract."
  }
}
