{
  "timestamp": "2026-11-19T09:33:56",
  "compiler": {
    "name": "@stencil/core",
    "version": "4.45.4",
    "typescriptVersion": "5.8.3"
  },
  "storybook": "https://magma-design-system.github.io/magma/storybook/",
  "studio": "https://magma-design-system.github.io/magma/studio/",
  "components": [
    {
      "filePath": "src/components/mds-hr/mds-hr.tsx",
      "encapsulation": "shadow",
      "tag": "mds-hr",
      "docs": "This is a web-component from Maggioli Design System [Magma](https://magma.maggiolicloud.it), built with StencilJS, TypeScript, Storybook. It's based on the web-component standard and it's designed to be agnostic from the JavaScript framework you are using.",
      "docsTags": [
        {
          "name": "category",
          "text": "structure"
        }
      ],
      "usage": {
        "1. Description": "The `<mds-hr>` web component is the horizontal rule of the Magma Design System. It is a purely presentational separator that replaces the native `<hr>` element, rendering a thin themed divider line to split content into visual sections.\n\n#### Semantic Behavior\n\n- **No interactivity**: The component has no props, slots, events, or state; it is decorative and takes no part in focus order, form association, or keyboard interaction.\n- **Full-width line**: It always spans the full inline width of its container and is sized purely by layout context.\n- **Theme-aware color**: The rule is painted with the `wash-strong` neutral role and adapts automatically between light and dark preference themes, so it stays legible without configuration.\n\n#### Properties & Visual Configurations\n\n`<mds-hr>` exposes no props. Visual variation is achieved entirely through standard utility classes on the host - for example overriding the background color with a semantic color utility (`class=\"bg-border-default\"`) - rather than through component-specific attributes.\n",
        "2. Examples": "Correct and idiomatic ways to use the `<mds-hr>` component, ordered from most common to most specialized. The examples assume a working knowledge of the shared component rules in [`agents/conventions.md`](../../../../agents/conventions.md).\n\n#### Default Divider\n\nThe simplest use - no attributes required. Drop it between content blocks to draw a full-width neutral rule that adapts automatically to light and dark themes.\n\n```html\n<section>\n  <mds-text typography=\"h4\">Dati personali</mds-text>\n  <mds-text typography=\"paragraph\">Nome, cognome e data di nascita.</mds-text>\n</section>\n\n<mds-hr></mds-hr>\n\n<section>\n  <mds-text typography=\"h4\">Dati di contatto</mds-text>\n  <mds-text typography=\"paragraph\">Indirizzo e-mail e numero di telefono.</mds-text>\n</section>\n```\n\n#### Divider Inside a Card\n\nUse `<mds-hr>` to split regions inside a compound component such as `<mds-card>`. It stretches to the full width of its parent slot, so no extra sizing is needed.\n\n```html\n<mds-card>\n  <mds-card-header slot=\"header\">\n    <mds-text typography=\"h6\">Riepilogo ordine</mds-text>\n  </mds-card-header>\n  <mds-card-content slot=\"content\">\n    <mds-text typography=\"paragraph\">Articolo 1 - Servizio annuale</mds-text>\n    <mds-hr></mds-hr>\n    <mds-text typography=\"paragraph\">Articolo 2 - Supporto prioritario</mds-text>\n  </mds-card-content>\n</mds-card>\n```\n\n#### Color Tint via Utility Class\n\n`<mds-hr>` exposes no CSS custom properties. To change the line color, apply a semantic color utility class (`bg-<role>`) directly on the host element. Use `rgb(var(--magma-<role>))` values in CSS only when no matching utility class exists.\n\n```html\n<!-- Stronger neutral rule -->\n<mds-hr class=\"bg-border-default\"></mds-hr>\n\n<!-- Branded primary tint -->\n<mds-hr class=\"bg-accent-border\"></mds-hr>\n```\n\n#### Divider Inside a Form\n\nUse `<mds-hr>` to visually group related form fields without adding semantic structure (use `<fieldset>` for the semantic grouping; `<mds-hr>` is purely presentational).\n\n```html\n<form>\n  <mds-input-field label=\"Nome\">\n    <mds-input name=\"nome\"></mds-input>\n  </mds-input-field>\n  <mds-input-field label=\"Cognome\">\n    <mds-input name=\"cognome\"></mds-input>\n  </mds-input-field>\n\n  <mds-hr></mds-hr>\n\n  <mds-input-field label=\"E-mail\">\n    <mds-input name=\"email\" type=\"email\"></mds-input>\n  </mds-input-field>\n</form>\n```\n\n#### Width Constraint via Parent Layout\n\n`<mds-hr>` always fills `width: 100%` of its container. To produce an inset or centered rule, constrain it through the parent's padding or a wrapping element - do not apply `width` inline on the component itself.\n\n```html\n<div style=\"padding-inline: 2rem;\">\n  <mds-hr></mds-hr>\n</div>\n```\n",
        "3. Mistakes": "Common incorrect uses of `<mds-hr>`. Each entry pairs the wrong form with the right one and a one-line reason. System-wide rules (boolean-as-string, shadow piercing, Tailwind color utilities, raw native event listening) live in [`agents/mistakes.md`](../../../../agents/mistakes.md) - they apply here too but are not repeated.\n\n#### Do Not Use the Raw `<hr>` Element\n\nThe native `<hr>` element does not pick up Magma tokens, so it renders with browser-default styling that does not adapt to themes or high-contrast preferences. Replace it with `<mds-hr>` inside any Magma-themed page.\n\n```html\n<!-- INCORRECT -->\n<hr />\n\n<!-- CORRECT -->\n<mds-hr></mds-hr>\n```\n\n#### Do Not Set `width` or `height` Directly on the Component\n\n`<mds-hr>` manages its own `width: 100%` and `height: 1px` internally. Overriding these via inline styles or CSS produces inconsistent results across layouts and breaks the visual system contract. Use parent padding to create inset rules instead.\n\n```html\n<!-- INCORRECT -->\n<mds-hr style=\"width: 50%; height: 2px;\"></mds-hr>\n\n<!-- CORRECT -->\n<div style=\"padding-inline: 2rem;\">\n  <mds-hr></mds-hr>\n</div>\n```\n\n#### Do Not Pierce Shadow DOM to Change the Line Color\n\n`<mds-hr>` exposes no `::part()` surface and no `--mds-hr-*` CSS custom properties. Targeting its `:host` internals via `>>>` or `/deep/` will break on updates. Apply a semantic color utility class (`bg-<role>`) on the host element instead.\n\n```css\n/* INCORRECT */\nmds-hr >>> :host {\n  background-color: red;\n}\n\n/* CORRECT */\n```\n\n```html\n<mds-hr class=\"bg-border-default\"></mds-hr>\n```\n\n#### Do Not Slot Content Into `<mds-hr>`\n\n`<mds-hr>` is an empty presentational rule with no slot. Any children placed inside the tags are silently ignored and do not render.\n\n```html\n<!-- INCORRECT -->\n<mds-hr>\n  <span>oppure</span>\n</mds-hr>\n\n<!-- CORRECT -->\n<mds-text typography=\"caption\" class=\"text-center\">oppure</mds-text>\n<mds-hr></mds-hr>\n```\n\n#### Do Not Use `<mds-separator>` as a Horizontal Rule\n\n[`mds-separator`](../mds-separator/AGENTS.md) is a **vertical** divider intended for inline or flex contexts such as toolbars and breadcrumbs. Using it to separate stacked content blocks produces incorrect orientation and layout.\n\n```html\n<!-- INCORRECT -->\n<section>Sezione A</section>\n<mds-separator></mds-separator>\n<section>Sezione B</section>\n\n<!-- CORRECT -->\n<section>Sezione A</section>\n<mds-hr></mds-hr>\n<section>Sezione B</section>\n```\n"
      },
      "props": [],
      "methods": [],
      "events": [],
      "listeners": [],
      "styles": [],
      "slots": [],
      "parts": [],
      "states": [],
      "dependents": [],
      "dependencies": [],
      "dependencyGraph": {},
      "storybook": "ui-hr--docs"
    }
  ]
}
