{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "text",
  "title": "Text",
  "description": "Semantic plain UI text with atomic tokenized typography recipes, measurable line boxes, and composition-owned wrapping and truncation.",
  "type": "registry:ui",
  "meta": {
    "library": "@ds-mo/ui",
    "distribution": "npm",
    "storybook": "https://zainadeel.github.io/compomo/?path=/story/text",
    "source": "src/wc/components/Text/Text.tsx",
    "intentStatus": "complete",
    "intent": {
      "audience": "general",
      "status": "stable",
      "summary": "Semantic plain UI text with atomic tokenized typography recipes, measurable line boxes, and composition-owned wrapping and truncation.",
      "useWhen": [
        "Plain UI text needs a complete design-system typography recipe.",
        "Headings, paragraphs, labels, or inline phrasing need native HTML semantics independent from their visual scale.",
        "A component needs a stable measurable text box aligned to shared typography metrics.",
        "Changing numeric values need tabular glyph widths."
      ],
      "avoidWhen": [
        "Content is markdown, rich prose, or an arbitrary nested document structure.",
        "The element is interactive; use the correct native or design-system control and compose Text only for its label.",
        "Individual font metrics must be overridden instead of selecting an existing complete variant.",
        "Typography alone would be used to repair an incorrect heading hierarchy."
      ],
      "alternatives": [
        {
          "when": "Predictable text geometry is pending while content loads.",
          "component": "component:ds-skeleton",
          "reason": "Skeleton owns aria-hidden loading geometry aligned to Text line metrics."
        },
        {
          "when": "Compact static metadata or semantic status needs a contained treatment.",
          "component": "component:ds-tag",
          "reason": "Tag owns compact labelled metadata and intent surfaces."
        }
      ],
      "commonlyComposedWith": [
        "component:ds-icon",
        "component:ds-card-setting",
        "component:ds-field",
        "component:ds-button-filled"
      ],
      "accessibility": [
        "Choose the native element from document meaning and hierarchy; choose the visual variant independently.",
        "Composition authors preserve logical h1–h6 order regardless of visual size.",
        "Visible content and the selected native element provide accessible meaning; avoid redundant roles and labels.",
        "Use label semantics and its for association only for a real form control.",
        "When truncating essential content, the owner provides an accessible way to obtain the omitted text.",
        "Tertiary and quaternary foregrounds are restricted to text inside genuinely inactive or disabled UI, or to purely decorative content whose removal would not change meaning; quaternary is the fainter tier, and aria-hidden alone does not exempt meaningful visible text from contrast requirements.",
        "Underline link text by default. Brand-blue links may omit the resting underline when color already supplies the affordance.",
        "Use dotted underline for hidden or supplemental interaction such as a tooltip; the owning trigger must provide focus, keyboard interaction, and accessible tooltip semantics."
      ],
      "states": [
        "A variant is atomic: font size, line height, weight, and letter spacing stay together and are not overridden by consumers.",
        "Emphasis selects the supported stronger recipe for local hierarchy; it does not independently mean selected or active.",
        "Omitted color inherits currentColor without imposing a host color declaration, so an owning component may apply its semantic foreground directly without depending on stylesheet order. Explicit semantic aliases or CSS-variable references are used when Text has an independent color role.",
        "Prefer the owning control's isInactive or native disabled state over manually selecting tertiary or quaternary so visual treatment and inactive semantics remain synchronized.",
        "Line truncation and wrapping require an owner-supplied width constraint and content-aware composition decision.",
        "Solid underline is the default link affordance; brand-blue links may omit it at rest. Solid and dotted underlines share the tokenized decoration thickness and offset. Dotted underline communicates hidden or supplemental interaction such as a tooltip. Decoration does not make Text interactive by itself.",
        "Tabular numbers are for changing numeric values or aligned numeric columns where stable glyph width matters.",
        "Shimmer is reserved for visible generating/loading status text whose owner provides status semantics; reduced motion keeps static readable text."
      ],
      "responsiveBehavior": [
        "The composition owns width, wrapping, truncation, alignment, and any responsive variant change.",
        "Text preserves complete token recipes and does not scale fluidly or infer breakpoints."
      ],
      "frameworkCaveats": {
        "customElements": [
          "Set as explicitly for inline text, headings, and labels; omitted as renders a paragraph."
        ],
        "react": [
          "Keep semantic as choices aligned with the rendered document hierarchy rather than component styling."
        ],
        "angular": [
          "Use the for prop only when Text renders a label associated with a real control ID."
        ]
      },
      "references": [
        {
          "label": "Storybook examples",
          "path": "src/wc/components/Text/Text.stories.ts"
        },
        {
          "label": "Typography contract",
          "path": "AGENTS.md"
        }
      ]
    },
    "api": {
      "props": {
        "align": {
          "type": "TextAlign | undefined",
          "resolvedType": "\"center\" | \"left\" | \"right\" | undefined",
          "attribute": "align",
          "required": false,
          "mutable": false
        },
        "as": {
          "type": "TextElement",
          "resolvedType": "\"div\" | \"h1\" | \"h2\" | \"h3\" | \"h4\" | \"h5\" | \"h6\" | \"label\" | \"p\" | \"span\"",
          "attribute": "as",
          "default": "'p'",
          "required": false,
          "mutable": false
        },
        "color": {
          "type": "TextColor",
          "resolvedType": "\"ai\" | \"brand\" | \"caution\" | \"inherit\" | \"negative\" | \"on-bold\" | \"on-strong\" | \"positive\" | \"primary\" | \"quaternary\" | \"secondary\" | \"tertiary\" | \"warning\" | `var(--${string})`",
          "attribute": "color",
          "default": "'inherit'",
          "required": false,
          "mutable": false,
          "description": "Semantic foreground color token or CSS variable. `tertiary` and the\nstill-fainter `quaternary` are restricted to genuinely inactive/disabled\nUI content or purely decorative content; prefer the owning control's\ninactive state whenever one exists."
        },
        "decoration": {
          "type": "TextDecoration | undefined",
          "resolvedType": "\"dotted-underline\" | \"none\" | \"underline\" | undefined",
          "attribute": "decoration",
          "required": false,
          "mutable": false,
          "description": "Link underline or dotted hidden-interaction affordance; does not add semantics."
        },
        "emphasis": {
          "type": "boolean",
          "resolvedType": "boolean",
          "attribute": "emphasis",
          "default": "false",
          "required": false,
          "mutable": false,
          "description": "Heavier weight + tighter letter-spacing for the variant.\n`false` (default): one step below emphasis (display semibold, title/body\nmedium, caption medium).\n`true`: display bold, title/caption semibold, body medium."
        },
        "fontFeature": {
          "type": "TextFontFeature",
          "resolvedType": "\"normal\" | \"tabular-nums\"",
          "attribute": "font-feature",
          "default": "'normal'",
          "required": false,
          "mutable": false
        },
        "for": {
          "type": "string | undefined",
          "resolvedType": "string | undefined",
          "attribute": "for",
          "required": false,
          "mutable": false,
          "description": "Maps to `for` attribute on <label> elements."
        },
        "italic": {
          "type": "boolean",
          "resolvedType": "boolean",
          "attribute": "italic",
          "default": "false",
          "required": false,
          "mutable": false
        },
        "lineTruncation": {
          "type": "LineTruncation",
          "resolvedType": "\"1\" | \"2\" | \"3\" | \"4\" | \"5\" | \"none\" | 1 | 2 | 3 | 4 | 5",
          "attribute": "line-truncation",
          "default": "'none'",
          "required": false,
          "mutable": false
        },
        "shimmer": {
          "type": "boolean",
          "resolvedType": "boolean",
          "attribute": "shimmer",
          "default": "false",
          "required": false,
          "mutable": false,
          "description": "Animate the visible glyphs with the shared loading shimmer treatment."
        },
        "textId": {
          "type": "string | undefined",
          "resolvedType": "string | undefined",
          "attribute": "text-id",
          "required": false,
          "mutable": false,
          "description": "Forwarded to the inner element (e.g. aria-labelledby targets)."
        },
        "variant": {
          "type": "TextVariant",
          "resolvedType": "\"text-body-large\" | \"text-body-medium\" | \"text-body-small\" | \"text-caption\" | \"text-display-medium\" | \"text-display-small\" | \"text-title-large\" | \"text-title-medium\" | \"text-title-small\"",
          "attribute": "variant",
          "default": "'text-body-medium'",
          "required": false,
          "mutable": false
        },
        "wrap": {
          "type": "TextWrap | undefined",
          "resolvedType": "\"balance\" | \"nowrap\" | \"pretty\" | \"wrap\" | undefined",
          "attribute": "wrap",
          "required": false,
          "mutable": false
        }
      },
      "events": [],
      "methods": [],
      "slots": []
    },
    "props": {
      "align": {
        "type": "TextAlign | undefined",
        "resolvedType": "\"center\" | \"left\" | \"right\" | undefined",
        "attribute": "align",
        "required": false,
        "mutable": false
      },
      "as": {
        "type": "TextElement",
        "resolvedType": "\"div\" | \"h1\" | \"h2\" | \"h3\" | \"h4\" | \"h5\" | \"h6\" | \"label\" | \"p\" | \"span\"",
        "attribute": "as",
        "default": "'p'",
        "required": false,
        "mutable": false
      },
      "color": {
        "type": "TextColor",
        "resolvedType": "\"ai\" | \"brand\" | \"caution\" | \"inherit\" | \"negative\" | \"on-bold\" | \"on-strong\" | \"positive\" | \"primary\" | \"quaternary\" | \"secondary\" | \"tertiary\" | \"warning\" | `var(--${string})`",
        "attribute": "color",
        "default": "'inherit'",
        "required": false,
        "mutable": false,
        "description": "Semantic foreground color token or CSS variable. `tertiary` and the\nstill-fainter `quaternary` are restricted to genuinely inactive/disabled\nUI content or purely decorative content; prefer the owning control's\ninactive state whenever one exists."
      },
      "decoration": {
        "type": "TextDecoration | undefined",
        "resolvedType": "\"dotted-underline\" | \"none\" | \"underline\" | undefined",
        "attribute": "decoration",
        "required": false,
        "mutable": false,
        "description": "Link underline or dotted hidden-interaction affordance; does not add semantics."
      },
      "emphasis": {
        "type": "boolean",
        "resolvedType": "boolean",
        "attribute": "emphasis",
        "default": "false",
        "required": false,
        "mutable": false,
        "description": "Heavier weight + tighter letter-spacing for the variant.\n`false` (default): one step below emphasis (display semibold, title/body\nmedium, caption medium).\n`true`: display bold, title/caption semibold, body medium."
      },
      "fontFeature": {
        "type": "TextFontFeature",
        "resolvedType": "\"normal\" | \"tabular-nums\"",
        "attribute": "font-feature",
        "default": "'normal'",
        "required": false,
        "mutable": false
      },
      "for": {
        "type": "string | undefined",
        "resolvedType": "string | undefined",
        "attribute": "for",
        "required": false,
        "mutable": false,
        "description": "Maps to `for` attribute on <label> elements."
      },
      "italic": {
        "type": "boolean",
        "resolvedType": "boolean",
        "attribute": "italic",
        "default": "false",
        "required": false,
        "mutable": false
      },
      "lineTruncation": {
        "type": "LineTruncation",
        "resolvedType": "\"1\" | \"2\" | \"3\" | \"4\" | \"5\" | \"none\" | 1 | 2 | 3 | 4 | 5",
        "attribute": "line-truncation",
        "default": "'none'",
        "required": false,
        "mutable": false
      },
      "shimmer": {
        "type": "boolean",
        "resolvedType": "boolean",
        "attribute": "shimmer",
        "default": "false",
        "required": false,
        "mutable": false,
        "description": "Animate the visible glyphs with the shared loading shimmer treatment."
      },
      "textId": {
        "type": "string | undefined",
        "resolvedType": "string | undefined",
        "attribute": "text-id",
        "required": false,
        "mutable": false,
        "description": "Forwarded to the inner element (e.g. aria-labelledby targets)."
      },
      "variant": {
        "type": "TextVariant",
        "resolvedType": "\"text-body-large\" | \"text-body-medium\" | \"text-body-small\" | \"text-caption\" | \"text-display-medium\" | \"text-display-small\" | \"text-title-large\" | \"text-title-medium\" | \"text-title-small\"",
        "attribute": "variant",
        "default": "'text-body-medium'",
        "required": false,
        "mutable": false
      },
      "wrap": {
        "type": "TextWrap | undefined",
        "resolvedType": "\"balance\" | \"nowrap\" | \"pretty\" | \"wrap\" | undefined",
        "attribute": "wrap",
        "required": false,
        "mutable": false
      }
    },
    "events": [],
    "methods": [],
    "slots": [],
    "exports": {
      "customElement": "ds-text",
      "react": "DsText",
      "vue": "DsText",
      "angular": "DsText"
    },
    "consumption": {
      "install": "npm install @ds-mo/ui @ds-mo/tokens @ds-mo/icons",
      "cssSetup": "import '@ds-mo/tokens';\nimport '@ds-mo/tokens/reset';\nimport '@ds-mo/tokens/globals';",
      "customElements": {
        "import": "import '@ds-mo/ui/dist/components/ds-text.js';",
        "example": "<ds-text></ds-text>"
      },
      "react": {
        "import": "import { DsText } from '@ds-mo/ui/react';",
        "example": "<DsText />"
      },
      "vue": {
        "import": "import { DsText } from '@ds-mo/ui/vue';",
        "example": "<DsText />"
      },
      "angular": {
        "import": "import { DsText } from '@ds-mo/ui/angular/ds-text';",
        "example": "<ds-text></ds-text>"
      },
      "peerDependencies": {
        "required": [
          "@ds-mo/tokens ^6.5.0",
          "@ds-mo/icons ^7.0.0"
        ],
        "frameworks": "Custom Elements; React 18/19 wrappers; Vue 3 wrappers; Angular 19-22 standalone adapters."
      }
    }
  },
  "dependencies": [
    "@ds-mo/ui",
    "@ds-mo/tokens"
  ],
  "registryDependencies": [],
  "files": [
    {
      "path": "src/wc/components/Text/Text.css",
      "content": "@import '../../utils/typography.css';\n@import '../../utils/shimmer.css';\n\n:host {\n  box-sizing: border-box;\n  max-width: 100%;\n  min-width: 0;\n  margin: 0;\n  padding: 0;\n  border: 0;\n  font-family: var(--typography-font-family-ui);\n}\n\n:host(:where(.ds-text--inline-box)) {\n  display: inline-block;\n}\n\n:host(:where(.ds-text--block-box)) {\n  display: block;\n  width: 100%;\n}\n\n/*\n * The host is the measurable typography box. The semantic inner element fills\n * it and inherits every text metric without adding margins, padding, or its own\n * line-height strut. One rendered line therefore measures exactly one token\n * line-height; N lines measure N × that token.\n */\n.ds-text__element {\n  display: block;\n  box-sizing: border-box;\n  width: 100%;\n  min-width: 0;\n  margin: 0;\n  padding: 0;\n  border: 0;\n  font: inherit;\n  line-height: inherit;\n  letter-spacing: inherit;\n  color: inherit;\n  text-transform: inherit;\n  text-align: inherit;\n  text-decoration: inherit;\n  text-underline-offset: inherit;\n  font-style: inherit;\n  font-variant-numeric: inherit;\n  font-feature-settings: inherit;\n  -webkit-user-select: inherit;\n  user-select: inherit;\n  white-space: inherit;\n  text-wrap: inherit;\n  overflow-wrap: inherit;\n  word-break: inherit;\n  /* Consumer truncation on the host (PanelNav, ChartLegend, …) must reach the\n     text node — overflow/text-overflow are not inherited by default. */\n  overflow: inherit;\n  text-overflow: inherit;\n}\n\n/* ── Truncation ─────────────────────────────────────────────────────────── */\n\n:host(.ds-text--truncate-1) {\n  overflow: hidden;\n}\n\n:host(.ds-text--truncate-1) .ds-text__element {\n  overflow: hidden;\n  text-overflow: ellipsis;\n  white-space: nowrap;\n}\n\n:host(.ds-text--truncate-2),\n:host(.ds-text--truncate-3),\n:host(.ds-text--truncate-4),\n:host(.ds-text--truncate-5) {\n  overflow: hidden;\n}\n\n:host(.ds-text--truncate-2) .ds-text__element,\n:host(.ds-text--truncate-3) .ds-text__element,\n:host(.ds-text--truncate-4) .ds-text__element,\n:host(.ds-text--truncate-5) .ds-text__element {\n  display: -webkit-box;\n  -webkit-box-orient: vertical;\n  overflow: hidden;\n  text-overflow: ellipsis;\n  word-break: break-word;\n}\n\n:host(.ds-text--truncate-2) .ds-text__element { -webkit-line-clamp: 2; }\n:host(.ds-text--truncate-3) .ds-text__element { -webkit-line-clamp: 3; }\n:host(.ds-text--truncate-4) .ds-text__element { -webkit-line-clamp: 4; }\n:host(.ds-text--truncate-5) .ds-text__element { -webkit-line-clamp: 5; }\n\n/* ── Wrap ───────────────────────────────────────────────────────────────── */\n\n:host(.ds-text--nowrap),\n:host(.ds-text--nowrap) .ds-text__element {\n  white-space: nowrap;\n  word-break: normal;\n  overflow: hidden;\n  text-overflow: ellipsis;\n  min-width: 0;\n}\n\n:host(.ds-text--balance),\n:host(.ds-text--balance) .ds-text__element { text-wrap: balance; }\n\n:host(.ds-text--pretty),\n:host(.ds-text--pretty) .ds-text__element { text-wrap: pretty; }\n\n/* ── Color ──────────────────────────────────────────────────────────────── */\n\n:host(.ds-text--color-primary)   { color: var(--color-foreground-primary); }\n:host(.ds-text--color-secondary) { color: var(--color-foreground-secondary); }\n:host(.ds-text--color-tertiary)  { color: var(--color-foreground-tertiary); }\n:host(.ds-text--color-quaternary) { color: var(--color-foreground-quaternary); }\n:host(.ds-text--color-brand)     { color: var(--color-foreground-bold-brand); }\n:host(.ds-text--color-negative)  { color: var(--color-foreground-bold-negative); }\n:host(.ds-text--color-positive)  { color: var(--color-foreground-bold-positive); }\n:host(.ds-text--color-warning)   { color: var(--color-foreground-bold-warning); }\n:host(.ds-text--color-caution)   { color: var(--color-foreground-bold-caution); }\n:host(.ds-text--color-ai)        { color: var(--color-foreground-bold-ai); }\n:host(.ds-text--color-on-strong) { color: var(--color-foreground-on-strong-background-primary); }\n:host(.ds-text--color-on-bold)   { color: var(--color-foreground-on-bold-background-primary); }\n/*\n * The inherit state intentionally has no declaration. `color` inherits\n * naturally, while omitting a host rule lets an owning component apply a\n * semantic token directly to ds-text without depending on stylesheet order.\n */\n\n/* ── Decorations ─────────────────────────────────────────────────────────── */\n\n:host(.ds-text--decoration-underline),\n:host(.ds-text--decoration-dotted-underline) {\n  text-decoration-color: var(--ds-text-decoration-color, var(--color-foreground-tertiary));\n  text-decoration-thickness: var(--ds-text-decoration-thickness, var(--dimension-stroke-width-012));\n  text-underline-offset: var(--ds-text-decoration-offset, var(--dimension-space-025));\n}\n\n:host(.ds-text--decoration-underline) {\n  text-decoration-line: underline;\n}\n\n:host(.ds-text--decoration-dotted-underline) {\n  text-decoration-line: underline;\n  text-decoration-style: dotted;\n}\n\n/* ── Style ──────────────────────────────────────────────────────────────── */\n\n:host(.ds-text--italic) { font-style: italic; }\n\n:host(.ds-text--font-feature-tabular-nums) {\n  font-variant-numeric: tabular-nums;\n  font-feature-settings: 'tnum';\n}\n\n/* ── Align ──────────────────────────────────────────────────────────────── */\n\n:host(.ds-text--align-left)   { text-align: left; }\n:host(.ds-text--align-center) { text-align: center; }\n:host(.ds-text--align-right)  { text-align: right; }\n",
      "type": "registry:ui"
    },
    {
      "path": "src/wc/components/Text/Text.tsx",
      "content": "import { Component, Prop, h, Host } from '@stencil/core';\nimport { textDisplayClass, textVariantClass } from './text-utils';\nimport type {\n  TextAlign,\n  TextColor,\n  TextDecoration,\n  TextElement,\n  TextFontFeature,\n  TextVariant,\n  LineTruncation,\n  TextWrap,\n} from './text-types';\n\n@Component({\n  tag: 'ds-text',\n  styleUrl: 'Text.css',\n  scoped: true,\n})\nexport class Text {\n  @Prop() variant: TextVariant = 'text-body-medium';\n  /**\n   * Heavier weight + tighter letter-spacing for the variant.\n   * `false` (default): one step below emphasis (display semibold, title/body\n   * medium, caption medium).\n   * `true`: display bold, title/caption semibold, body medium.\n   */\n  @Prop() emphasis: boolean = false;\n  /**\n   * Semantic foreground color token or CSS variable. `tertiary` and the\n   * still-fainter `quaternary` are restricted to genuinely inactive/disabled\n   * UI content or purely decorative content; prefer the owning control's\n   * inactive state whenever one exists.\n   */\n  @Prop() color: TextColor = 'inherit';\n  /** Link underline or dotted hidden-interaction affordance; does not add semantics. */\n  @Prop() decoration: TextDecoration | undefined;\n  @Prop() italic: boolean = false;\n  /** Animate the visible glyphs with the shared loading shimmer treatment. */\n  @Prop() shimmer: boolean = false;\n  @Prop() align: TextAlign | undefined;\n  @Prop() lineTruncation: LineTruncation = 'none';\n  @Prop() wrap: TextWrap | undefined;\n  @Prop() fontFeature: TextFontFeature = 'normal';\n  @Prop() as: TextElement = 'p';\n  /** Maps to `for` attribute on <label> elements. */\n  @Prop() for: string | undefined;\n  /** Forwarded to the inner element (e.g. aria-labelledby targets). */\n  @Prop() textId: string | undefined;\n\n  render() {\n    // Polymorphic element: TSX treats a variable tag as a component, so a\n    // dynamic intrinsic element name must be cast to `any` to render.\n    // eslint-disable-next-line @typescript-eslint/no-explicit-any\n    const Tag = this.as as any;\n    const isCustomColor = (c: TextColor) => typeof c === 'string' && c.startsWith('var(--');\n    const truncationLines = Number(this.lineTruncation);\n\n    const cls: Record<string, boolean> = {\n      'ds-text': true,\n      [textDisplayClass(this.as)]: true,\n      [textVariantClass(this.variant)]: true,\n      'ds-text--emphasis': this.emphasis,\n      'ds-text--regular': !this.emphasis,\n      'ds-text--nowrap': this.wrap === 'nowrap',\n      'ds-text--balance': this.wrap === 'balance',\n      'ds-text--pretty': this.wrap === 'pretty',\n      'ds-text--truncate-1': truncationLines === 1 && this.wrap !== 'nowrap',\n      'ds-text--truncate-2': truncationLines === 2 && this.wrap !== 'nowrap',\n      'ds-text--truncate-3': truncationLines === 3 && this.wrap !== 'nowrap',\n      'ds-text--truncate-4': truncationLines === 4 && this.wrap !== 'nowrap',\n      'ds-text--truncate-5': truncationLines === 5 && this.wrap !== 'nowrap',\n      'ds-text--color-primary':   this.color === 'primary',\n      'ds-text--color-secondary': this.color === 'secondary',\n      'ds-text--color-tertiary':  this.color === 'tertiary',\n      'ds-text--color-quaternary': this.color === 'quaternary',\n      'ds-text--color-brand':     this.color === 'brand',\n      'ds-text--color-negative':  this.color === 'negative',\n      'ds-text--color-positive':  this.color === 'positive',\n      'ds-text--color-warning':   this.color === 'warning',\n      'ds-text--color-caution':   this.color === 'caution',\n      'ds-text--color-ai':        this.color === 'ai',\n      'ds-text--color-on-strong': this.color === 'on-strong',\n      'ds-text--color-on-bold':   this.color === 'on-bold',\n      'ds-text--color-inherit':   this.color === 'inherit',\n      'ds-text--decoration-underline':        this.decoration === 'underline',\n      'ds-text--decoration-dotted-underline': this.decoration === 'dotted-underline',\n      'ds-text--italic': this.italic,\n      'ds-text--align-left':   this.align === 'left',\n      'ds-text--align-center': this.align === 'center',\n      'ds-text--align-right':  this.align === 'right',\n      'ds-text--font-feature-tabular-nums': this.fontFeature === 'tabular-nums',\n    };\n\n    const style = this.color && isCustomColor(this.color)\n      ? { color: this.color as string }\n      : undefined;\n\n    const extraProps: Record<string, string> = {};\n    if (this.as === 'label' && this.for) extraProps['for'] = this.for;\n    if (this.textId) extraProps['id'] = this.textId;\n\n    return (\n      <Host class={cls} style={style}>\n        <Tag\n          class={{\n            'ds-text__element': true,\n            'ds-shimmer-text': this.shimmer,\n          }}\n          {...extraProps}\n        >\n          <slot />\n        </Tag>\n      </Host>\n    );\n  }\n}\n",
      "type": "registry:ui"
    },
    {
      "path": "src/wc/components/Text/text-types.ts",
      "content": "export type TextVariant =\n  | 'text-display-medium'\n  | 'text-display-small'\n  | 'text-title-large'\n  | 'text-title-medium'\n  | 'text-title-small'\n  | 'text-body-large'\n  | 'text-body-medium'\n  | 'text-body-small'\n  | 'text-caption';\n\nexport type TextColorToken =\n  | 'primary' | 'secondary' | 'tertiary' | 'quaternary'\n  | 'brand' | 'negative' | 'positive' | 'warning' | 'caution' | 'ai'\n  | 'on-strong' | 'on-bold' | 'inherit';\n\nexport type TextColor = TextColorToken | `var(--${string})`;\nexport type TextDecoration = 'none' | 'underline' | 'dotted-underline';\nexport type TextAlign = 'left' | 'center' | 'right';\nexport type LineTruncation = 1 | 2 | 3 | 4 | 5 | '1' | '2' | '3' | '4' | '5' | 'none';\nexport type TextWrap = 'wrap' | 'nowrap' | 'balance' | 'pretty';\nexport type TextElement = 'p' | 'span' | 'div' | 'label' | 'h1' | 'h2' | 'h3' | 'h4' | 'h5' | 'h6';\nexport type TextFontFeature = 'normal' | 'tabular-nums';\n",
      "type": "registry:ui"
    },
    {
      "path": "src/wc/components/Text/text-utils.ts",
      "content": "import type { TextElement, TextVariant } from './text-types';\n\n/** `text-body-medium` → `ds-text--body-medium` */\nexport function textVariantClass(variant: TextVariant): string {\n  return `ds-text--${variant.replace(/^text-/, '')}`;\n}\n\n/** Inline semantics get a measurable inline box; paragraphs/headings get a block box. */\nexport function textDisplayClass(element: TextElement): string {\n  return element === 'span' || element === 'label'\n    ? 'ds-text--inline-box'\n    : 'ds-text--block-box';\n}\n",
      "type": "registry:ui"
    }
  ]
}
