{
  "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-bibliography/mds-bibliography.tsx",
      "encapsulation": "shadow",
      "tag": "mds-bibliography",
      "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": "content"
        }
      ],
      "usage": {
        "1. Description": "The `<mds-bibliography>` web component renders a single citation entry formatted according to a recognized academic style. It is a presentational component that takes structured metadata (author, title, publisher, date, location, URL) and composes it into a styled, correctly-punctuated reference line, replacing the manual assembly of a bibliography string.\n\n#### Semantic Behavior\n\n- **Citation formatting**: The `format` prop drives the entire output - field ordering, punctuation, separators, author-name abbreviation, and date layout. Switching formats re-composes the same metadata rather than just restyling it.\n- **Author parsing**: `author` is parsed, not displayed verbatim. Names are split on commas into multiple authors, first/last names are detected by position (first name first: `Mario Rossi`; the spaces around each name are ignored), and composite first or last names can be grouped with single or double quotation marks (e.g. `'Jhon Arthur' Doe`). Each author is then abbreviated per the active format (APA initials, MLA full first name).\n- **Date handling**: `date` accepts an ISO string or a numeric timestamp and renders inside a semantic `<time>` element; an invalid date renders as an empty date (APA keeps empty parentheses), and month names are localized in Italian.\n- **Link vs. plain title**: When both `name` and `url` are set, the title renders as a link (`target=\"_blank\"`) carrying the `rel` value; with `name` alone it renders as plain emphasized text, and without `name` there is no title at all.\n- **No slots**: Content is built entirely from props; the component does not project slotted children.\n\n#### Properties & Visual Configurations\n\n- **`format`** selects the citation standard (`'apa'`, `'mla'`, `'turabian'`) and is the primary behavioral switch; pick it to match the referencing convention required by the document. APA puts the date in parentheses right after the authors, MLA/Turabian place the date at the end, and each applies its own punctuation between location, publisher, and date.\n- **`rel`** sets the relationship attribute applied to the generated title link (`'external'` or `'author'`); it only takes effect when the title is rendered as a hyperlink.\n\n#### Other behavioral props\n\n- **`typography`** and **`variant`** set the text role and styling of the rendered citation; they affect appearance only, not the citation structure.\n",
        "2. Examples": "Correct and idiomatic ways to use the `<mds-bibliography>` component, ordered from most common to most specialized. The examples assume a working knowledge of the variant / tone ladders documented in [`agents/variants.md`](../../../../agents/variants.md) and the shared component rules in [`agents/conventions.md`](../../../../agents/conventions.md).\n\n#### Basic APA Citation (Default Format)\n\nThe default `format` is `'apa'`. Supply author, date, name, location, and publisher to produce a correctly punctuated APA reference line. APA places the date in parentheses immediately after the author list.\n\n```html\n<mds-bibliography\n  author=\"Mario Rossi\"\n  date=\"2021-03-15\"\n  name=\"Fondamenti di diritto amministrativo\"\n  location=\"Milano\"\n  publisher=\"Maggioli Editore\"\n></mds-bibliography>\n```\n\n#### APA Citation With a Linked Title\n\nWhen both `name` and `url` are provided the title renders as a hyperlink opening in a new tab. The `rel` prop defaults to `'external'`; change it to `'author'` only when the URL points to an author profile.\n\n```html\n<mds-bibliography\n  author=\"Mario Rossi\"\n  date=\"2021-03-15\"\n  name=\"Fondamenti di diritto amministrativo\"\n  location=\"Milano\"\n  publisher=\"Maggioli Editore\"\n  url=\"https://www.maggioli.com/catalogo/fondamenti\"\n></mds-bibliography>\n```\n\n#### MLA Format\n\nSet `format=\"mla\"` for Modern Language Association style. The date moves to the end, after the publisher, and author names are formatted with the full first name rather than initials.\n\n```html\n<mds-bibliography\n  format=\"mla\"\n  author=\"Mario Rossi\"\n  date=\"2021-03-15\"\n  name=\"Fondamenti di diritto amministrativo\"\n  location=\"Milano\"\n  publisher=\"Maggioli Editore\"\n></mds-bibliography>\n```\n\n#### Turabian Format\n\n`format=\"turabian\"` follows the Kate Turabian style - same field order and punctuation as MLA when a publisher is given; without a publisher, the location ends with a comma instead of a period.\n\n```html\n<mds-bibliography\n  format=\"turabian\"\n  author=\"Mario Rossi\"\n  date=\"2021-03-15\"\n  name=\"Fondamenti di diritto amministrativo\"\n  location=\"Milano\"\n  publisher=\"Maggioli Editore\"\n></mds-bibliography>\n```\n\n#### Multiple Authors\n\nSeparate multiple authors with a comma, writing each name first name first; a space after the comma is fine. Composite first or last names that contain spaces must be wrapped in single or double quotation marks so the parser groups them correctly. The component joins authors with the format-appropriate separator (APA and Turabian: `&`, MLA: `e`).\n\n```html\n<!-- Two authors, both single-word first and last names -->\n<mds-bibliography\n  author=\"Mario Rossi, Luigi Verdi\"\n  date=\"2019-06-01\"\n  name=\"Gestione del territorio\"\n  publisher=\"Giuffre Editore\"\n></mds-bibliography>\n\n<!-- Composite first name and composite last name -->\n<mds-bibliography\n  author=\"'Maria Grazia' Bianchi, Enrico 'De Luca'\"\n  date=\"2020-11-20\"\n  name=\"Appalti pubblici\"\n  publisher=\"Il Sole 24 Ore\"\n></mds-bibliography>\n```\n\n#### Date From a Numeric Timestamp\n\n`date` accepts either an ISO date string or a numeric Unix timestamp (milliseconds as a string). The component parses both forms identically and renders the result inside a semantic `<time>` element.\n\n```html\n<!-- ISO string -->\n<mds-bibliography\n  author=\"Luca Ferrari\"\n  date=\"2018-09-10\"\n  name=\"Intelligenza artificiale e diritto\"\n  publisher=\"Giuffre Editore\"\n></mds-bibliography>\n\n<!-- Numeric timestamp (milliseconds) -->\n<mds-bibliography\n  author=\"Luca Ferrari\"\n  date=\"1536537600000\"\n  name=\"Intelligenza artificiale e diritto\"\n  publisher=\"Giuffre Editore\"\n></mds-bibliography>\n```\n\n#### Adjusting Typography\n\nThe `typography` prop controls the text role (`'caption'`, `'detail'` [default], `'label'`, `'option'`, `'paragraph'`, `'tip'`). Use `variant` to apply a style variant inside that role. Change these when the citation must match its surrounding body copy.\n\n```html\n<!-- Use paragraph size inside a long-form article -->\n<mds-bibliography\n  format=\"apa\"\n  author=\"Francesca Conti\"\n  date=\"2022-05-18\"\n  name=\"Sociologia del lavoro pubblico\"\n  publisher=\"Laterza\"\n  typography=\"paragraph\"\n  variant=\"read\"\n></mds-bibliography>\n```\n\n#### Styling Customization\n\nStyle the link color through the public `--mds-bibliography-color` CSS custom property; the underline colors are not public and follow the theme. Use semantic color roles via `rgb(var(--magma-<role>))` so dark mode and high-contrast modes keep working.\n\n```css\n.riferimenti mds-bibliography {\n  --mds-bibliography-color: rgb(var(--magma-accent-fg));\n}\n```\n",
        "3. Mistakes": "Common incorrect uses of `<mds-bibliography>`. 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 Slot Content - The Component Has No Slots\n\n`<mds-bibliography>` builds its output entirely from props; it has no default slot and no named slots. Any children placed inside the tag are ignored.\n\n```html\n<!-- INCORRECT -->\n<mds-bibliography>\n  Rossi, M. (2021). <em>Fondamenti di diritto amministrativo</em>. Maggioli Editore.\n</mds-bibliography>\n\n<!-- CORRECT -->\n<mds-bibliography\n  author=\"Mario Rossi\"\n  date=\"2021-03-15\"\n  name=\"Fondamenti di diritto amministrativo\"\n  publisher=\"Maggioli Editore\"\n></mds-bibliography>\n```\n\n#### Do Not Use `url` Without `name`\n\nWhen `name` is absent the component renders no title element, so `url` has nowhere to attach and the hyperlink is never created. Always supply `name` together with `url`.\n\n```html\n<!-- INCORRECT -->\n<mds-bibliography\n  author=\"Giulia Bianchi\"\n  date=\"2020-06-01\"\n  url=\"https://www.maggioli.com/catalogo/appalti\"\n></mds-bibliography>\n\n<!-- CORRECT -->\n<mds-bibliography\n  author=\"Giulia Bianchi\"\n  date=\"2020-06-01\"\n  name=\"Appalti pubblici: guida pratica\"\n  url=\"https://www.maggioli.com/catalogo/appalti\"\n></mds-bibliography>\n```\n\n#### Do Not Pass an Author Array as a JavaScript Array Literal in HTML\n\nThe `author` prop expects a plain comma-separated string. In HTML the bracket or JSON syntax is not a supported format, even where the parser happens to read it. Set from JavaScript, an array is read as one author per entry, but the prop is typed as a string: prefer the comma-separated form there too.\n\n```html\n<!-- INCORRECT -->\n<mds-bibliography\n  author=\"['Mario Rossi', 'Luigi Verdi']\"\n  name=\"Gestione del territorio\"\n></mds-bibliography>\n\n<!-- CORRECT -->\n<mds-bibliography\n  author=\"Mario Rossi,Luigi Verdi\"\n  name=\"Gestione del territorio\"\n></mds-bibliography>\n```\n\n#### Do Not Use `rel` Without a URL\n\nThe `rel` attribute only takes effect when the title is rendered as a hyperlink (i.e. when both `name` and `url` are set). Setting `rel=\"author\"` alone has no semantic effect and may confuse automated link checkers that scan for `rel` on anchors.\n\n```html\n<!-- INCORRECT -->\n<mds-bibliography\n  author=\"Enrico 'De Luca'\"\n  name=\"Sociologia delle organizzazioni\"\n  rel=\"author\"\n></mds-bibliography>\n\n<!-- CORRECT -->\n<mds-bibliography\n  author=\"Enrico 'De Luca'\"\n  name=\"Sociologia delle organizzazioni\"\n  url=\"https://www.maggioli.com/catalogo/sociologia\"\n  rel=\"author\"\n></mds-bibliography>\n```\n\n#### Do Not Invent a `format` Value Outside the Three Accepted Styles\n\nOnly `'apa'`, `'mla'`, and `'turabian'` are valid. Passing an unrecognised string leaves the format branch unmatched and renders only the author portion (no date, title, location, or publisher).\n\n```html\n<!-- INCORRECT -->\n<mds-bibliography\n  format=\"chicago\"\n  author=\"Francesca Conti\"\n  name=\"Sociologia del lavoro pubblico\"\n></mds-bibliography>\n\n<!-- CORRECT -->\n<mds-bibliography\n  format=\"turabian\"\n  author=\"Francesca Conti\"\n  name=\"Sociologia del lavoro pubblico\"\n></mds-bibliography>\n```\n\n#### Customize via Documented CSS Vars, Not Internal Selectors\n\nThe supported customization surface is the public `--mds-bibliography-color` CSS custom property. Targeting the `.link` class or other internals via shadow-piercing selectors or undocumented `::part()` names couples your code to the implementation and will break on minor releases.\n\n```css\n/* INCORRECT */\nmds-bibliography >>> .link {\n  color: blue;\n}\nmds-bibliography::part(link) {\n  text-decoration: none;\n}\n\n/* CORRECT */\n.sezione-riferimenti mds-bibliography {\n  --mds-bibliography-color: rgb(var(--magma-accent-fg));\n}\n```\n"
      },
      "props": [
        {
          "name": "author",
          "type": "string | undefined",
          "complexType": {
            "original": "string",
            "resolved": "string | undefined",
            "references": {}
          },
          "mutable": false,
          "attr": "author",
          "reflectToAttr": false,
          "docs": "Specifies one or more authors, as a string.\nFirst name and Last name: \"Jhon Doe\",\nyou can wrap first name or last name to crop them correctly: \"'Jhon Arthur' Doe\", \"'Jhon Arthur' 'Doe Jhonson'\",\nand for multiple authors, separated by commas, \"'Jhon Arthur' 'Doe Jhonson', 'Mike Collins', Erik 'Ross Anderson'\",\nyou can use single or double quotation marks for composite names",
          "docsTags": [],
          "values": [
            {
              "type": "string"
            },
            {
              "type": "undefined"
            }
          ],
          "optional": true,
          "required": false,
          "getter": false,
          "setter": false
        },
        {
          "name": "date",
          "type": "string | undefined",
          "complexType": {
            "original": "string",
            "resolved": "string | undefined",
            "references": {}
          },
          "mutable": false,
          "attr": "date",
          "reflectToAttr": false,
          "docs": "Specifies the date of the bibliography",
          "docsTags": [
            {
              "name": "description",
              "text": "It's in ISO format (YYYY-MM-DD)."
            },
            {
              "name": "example",
              "text": "'2025-06-15'"
            }
          ],
          "values": [
            {
              "type": "string"
            },
            {
              "type": "undefined"
            }
          ],
          "optional": true,
          "required": false,
          "getter": false,
          "setter": false
        },
        {
          "name": "format",
          "type": "\"apa\" | \"mla\" | \"turabian\"",
          "complexType": {
            "original": "BibliographyFormatType",
            "resolved": "\"apa\" | \"mla\" | \"turabian\"",
            "references": {
              "BibliographyFormatType": {
                "location": "import",
                "path": "./meta/types",
                "id": "src/components/mds-bibliography/meta/types.ts::BibliographyFormatType",
                "referenceLocation": "BibliographyFormatType"
              }
            }
          },
          "mutable": false,
          "attr": "format",
          "reflectToAttr": false,
          "docs": "Specifies the bibliography format to rapresent the bibliography content",
          "docsTags": [
            {
              "name": "default",
              "text": "'apa'"
            }
          ],
          "default": "'apa'",
          "values": [
            {
              "value": "apa",
              "type": "string"
            },
            {
              "value": "mla",
              "type": "string"
            },
            {
              "value": "turabian",
              "type": "string"
            }
          ],
          "optional": false,
          "required": false,
          "getter": false,
          "setter": false
        },
        {
          "name": "location",
          "type": "string | undefined",
          "complexType": {
            "original": "string",
            "resolved": "string | undefined",
            "references": {}
          },
          "mutable": false,
          "attr": "location",
          "reflectToAttr": false,
          "docs": "Specifies the location of the bibliography",
          "docsTags": [],
          "values": [
            {
              "type": "string"
            },
            {
              "type": "undefined"
            }
          ],
          "optional": true,
          "required": false,
          "getter": false,
          "setter": false
        },
        {
          "name": "name",
          "type": "string | undefined",
          "complexType": {
            "original": "string",
            "resolved": "string | undefined",
            "references": {}
          },
          "mutable": false,
          "attr": "name",
          "reflectToAttr": false,
          "docs": "Specifies the name of the bibliography",
          "docsTags": [],
          "values": [
            {
              "type": "string"
            },
            {
              "type": "undefined"
            }
          ],
          "optional": true,
          "required": false,
          "getter": false,
          "setter": false
        },
        {
          "name": "publisher",
          "type": "string | undefined",
          "complexType": {
            "original": "string",
            "resolved": "string | undefined",
            "references": {}
          },
          "mutable": false,
          "attr": "publisher",
          "reflectToAttr": false,
          "docs": "Specifies the publisher of the bibliography",
          "docsTags": [],
          "values": [
            {
              "type": "string"
            },
            {
              "type": "undefined"
            }
          ],
          "optional": true,
          "required": false,
          "getter": false,
          "setter": false
        },
        {
          "name": "rel",
          "type": "\"author\" | \"external\"",
          "complexType": {
            "original": "BibliographyRelationshipType",
            "resolved": "\"author\" | \"external\"",
            "references": {
              "BibliographyRelationshipType": {
                "location": "import",
                "path": "./meta/types",
                "id": "src/components/mds-bibliography/meta/types.ts::BibliographyRelationshipType",
                "referenceLocation": "BibliographyRelationshipType"
              }
            }
          },
          "mutable": false,
          "attr": "rel",
          "reflectToAttr": false,
          "docs": "Specifies relationship between the current document and the URL",
          "docsTags": [
            {
              "name": "default",
              "text": "'external'"
            }
          ],
          "default": "'external'",
          "values": [
            {
              "value": "author",
              "type": "string"
            },
            {
              "value": "external",
              "type": "string"
            }
          ],
          "optional": false,
          "required": false,
          "getter": false,
          "setter": false
        },
        {
          "name": "typography",
          "type": "\"caption\" | \"detail\" | \"label\" | \"option\" | \"paragraph\" | \"tip\"",
          "complexType": {
            "original": "TypographyInfoType | TypographyReadType",
            "resolved": "\"caption\" | \"detail\" | \"label\" | \"option\" | \"paragraph\" | \"tip\"",
            "references": {
              "TypographyInfoType": {
                "location": "import",
                "path": "@type/typography",
                "id": "src/type/typography.ts::TypographyInfoType",
                "referenceLocation": "TypographyInfoType"
              },
              "TypographyReadType": {
                "location": "import",
                "path": "@type/typography",
                "id": "src/type/typography.ts::TypographyReadType",
                "referenceLocation": "TypographyReadType"
              }
            }
          },
          "mutable": false,
          "attr": "typography",
          "reflectToAttr": false,
          "docs": "Specifies the font typography of the element",
          "docsTags": [
            {
              "name": "default",
              "text": "'detail'"
            }
          ],
          "default": "'detail'",
          "values": [
            {
              "value": "caption",
              "type": "string"
            },
            {
              "value": "detail",
              "type": "string"
            },
            {
              "value": "label",
              "type": "string"
            },
            {
              "value": "option",
              "type": "string"
            },
            {
              "value": "paragraph",
              "type": "string"
            },
            {
              "value": "tip",
              "type": "string"
            }
          ],
          "optional": false,
          "required": false,
          "getter": false,
          "setter": false
        },
        {
          "name": "url",
          "type": "string | undefined",
          "complexType": {
            "original": "string",
            "resolved": "string | undefined",
            "references": {}
          },
          "mutable": false,
          "attr": "url",
          "reflectToAttr": false,
          "docs": "Specifies the URL of the bibliography",
          "docsTags": [],
          "values": [
            {
              "type": "string"
            },
            {
              "type": "undefined"
            }
          ],
          "optional": true,
          "required": false,
          "getter": false,
          "setter": false
        },
        {
          "name": "variant",
          "type": "\"code\" | \"info\" | \"read\" | \"title\" | undefined",
          "complexType": {
            "original": "TypographyVariants",
            "resolved": "\"code\" | \"info\" | \"read\" | \"title\" | undefined",
            "references": {
              "TypographyVariants": {
                "location": "import",
                "path": "@type/typography",
                "id": "src/type/typography.ts::TypographyVariants",
                "referenceLocation": "TypographyVariants"
              }
            }
          },
          "mutable": false,
          "attr": "variant",
          "reflectToAttr": false,
          "docs": "Specifies the variant for `typography`",
          "docsTags": [],
          "values": [
            {
              "value": "code",
              "type": "string"
            },
            {
              "value": "info",
              "type": "string"
            },
            {
              "value": "read",
              "type": "string"
            },
            {
              "value": "title",
              "type": "string"
            },
            {
              "type": "undefined"
            }
          ],
          "optional": true,
          "required": false,
          "getter": false,
          "setter": false
        }
      ],
      "methods": [],
      "events": [],
      "listeners": [],
      "styles": [
        {
          "name": "--mds-bibliography-color",
          "annotation": "prop",
          "docs": "Sets the text color of the component",
          "visibility": "public"
        },
        {
          "name": "--mds-bibliography-text-decoration",
          "annotation": "prop",
          "docs": "Sets the text decoration color of the link",
          "visibility": "internal"
        },
        {
          "name": "--mds-bibliography-text-decoration-hover",
          "annotation": "prop",
          "docs": "Sets the text decoration color of the link when the mouse is over it",
          "visibility": "internal"
        }
      ],
      "slots": [],
      "parts": [],
      "states": [],
      "dependents": [],
      "dependencies": [
        "mds-text"
      ],
      "dependencyGraph": {
        "mds-bibliography": [
          "mds-text"
        ]
      },
      "storybook": "ui-bibliography--docs"
    }
  ]
}
