{
  "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",
  "contract_status": "preview",
  "contract_kind": "source-derived",
  "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."
  },
  "approval": "required",
  "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_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"
  },
  "specification": {
    "$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."
      }
    ]
  },
  "specification_source": "packages/design-system/src/components/forms/Textarea/Textarea.spec.json",
  "guidance": {
    "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."
  },
  "links": {
    "human": "/component-textarea",
    "json": "/data/visual/components/textarea.json",
    "storybook": "/storybook/?path=/story/cloaked-design-system-forms-textarea--playground"
  }
}
