{
  "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-tree-item/mds-tree-item.tsx",
      "encapsulation": "shadow",
      "tag": "mds-tree-item",
      "docs": "",
      "docsTags": [
        {
          "name": "slot",
          "text": "- Add `mds-tree-item` element/s."
        },
        {
          "name": "slot",
          "text": "action - Add `mds-button`, `mds-icon` or other types component and HTML element/s."
        },
        {
          "name": "part",
          "text": "actions-container - Selects the wrapper of the container of the actions."
        },
        {
          "name": "part",
          "text": "actions-list - Selects the container of the actions."
        },
        {
          "name": "parent",
          "text": "mds-tree mds-tree-item"
        }
      ],
      "usage": {
        "1. Description": "The `<mds-tree-item>` web component is the node primitive of the Magma Design System tree view: it represents a single labeled, expandable/collapsible entry inside an [`<mds-tree>`](../mds-tree/AGENTS.md) and is also the recursive container for its own descendants. It replaces the role of an `<li>` within a nested disclosure list.\n\n#### Semantic Behavior\n\n- **Compound child only**: It must be a direct slot child of `<mds-tree>` (first-level nodes) or of another `<mds-tree-item>` (nested nodes). It is not used standalone, and the default slot is reserved for further `<mds-tree-item>` children - not arbitrary content.\n- **Parent-driven defaults**: The parent `<mds-tree>` writes `toggle`, `togglePosition`, `appearance` and `truncate` onto its descendant items when it loads and onto the items that arrive later (overwriting their own values), and `expanded` when it is set; `actions` is inherited from the nearest ancestor that sets it. These props are therefore orchestrated by the tree rather than set per-item. First-level items receive `depth = 0`.\n- **Self-managed expansion**: Clicking the toggle or label flips `expanded`, swaps the toggle icon, and animates the children container; on collapse it emits `mdsTreeItemCollapse`. Both buttons carry `aria-expanded` on an item with children (or `async`); a leaf has none. The item is a `listitem`, its children a nested `list`, and the children of a closed branch are out of the tab order.\n- **Asynchronous expansion**: While `async` is set, an expand click does not open the node - it shows a spinner and emits `mdsTreeItemExpand` so the application can lazy-load children; the application then calls the public `expand()` method to finalize opening. Without `async`, opening emits no event.\n- **Bubbled events**: `mdsTreeItemExpand` and `mdsTreeItemCollapse` both carry `{ element }` (the host item) so the tree or application can react to node lifecycle.\n- **Leaf vs. branch**: It detects whether it contains nested items (again whenever they change, so a branch loaded on demand gets its toggle) and whether it has slotted actions, adjusting the connector/branch rendering and actions visibility accordingly.\n- **Public method**: `expand()` opens the node and clears the awaiting state (used to resolve async loads).\n\n#### Properties & Visual Configurations\n\n- **`toggle`**: Picks the disclosure affordance - `chevron` (default arrow) or `folder` (closed/open folder icons that swap as the user opens and closes the node). Normally inherited from the parent tree for visual consistency.\n- **`actions`**: Controls when slotted `action` controls appear - `auto` reveals them on hover, `visible` keeps them always shown. Place those controls in the named `action` slot.\n- **`async`**: Enable when a node's children are loaded on demand; pair it with a listener on `mdsTreeItemExpand` and a call to `expand()` once data is ready.\n- **`expanded`**: Mutable open/closed state; set it directly to pre-open a node, but expect the parent tree to override it when the whole tree expands or collapses.\n- **`truncate`**: Governs label overflow (`word`, `all`, `none`); `all` enables multi-line clamping. Usually inherited from the tree.\n- **`icon`**: Optional leading icon rendered inside the label button, independent of the toggle affordance.\n- **`depth`**: Internal/parent-assigned; drives branch-line decoration and should not normally be set by consumers.\n",
        "2. Examples": "Correct and idiomatic ways to use the `<mds-tree-item>` component, ordered from most common to most specialized. The examples assume a working knowledge of the compound parent [`<mds-tree>`](../mds-tree/AGENTS.md) and the shared component rules in [`agents/conventions.md`](../../../../agents/conventions.md).\n\n#### Basic Node Inside a Tree\n\nThe minimal form: a labeled item nested inside its parent `<mds-tree>`. The tree orchestrates `toggle`, `truncate`, and `actions` for all descendants, so you rarely need to set them per item.\n\n```html\n<mds-tree>\n  <mds-tree-item label=\"Documenti\"></mds-tree-item>\n  <mds-tree-item label=\"Immagini\"></mds-tree-item>\n  <mds-tree-item label=\"Video\"></mds-tree-item>\n</mds-tree>\n```\n\n#### Nested Hierarchy\n\nPlace `<mds-tree-item>` elements in the default slot of another `<mds-tree-item>` to build a hierarchy. The component detects nested children automatically and renders the branch connector.\n\n```html\n<mds-tree>\n  <mds-tree-item label=\"Ufficio Tecnico\">\n    <mds-tree-item label=\"Pratiche edilizie\">\n      <mds-tree-item label=\"Domanda 2024-001\"></mds-tree-item>\n      <mds-tree-item label=\"Domanda 2024-002\"></mds-tree-item>\n    </mds-tree-item>\n    <mds-tree-item label=\"Concessioni\"></mds-tree-item>\n  </mds-tree-item>\n  <mds-tree-item label=\"Ragioneria\"></mds-tree-item>\n</mds-tree>\n```\n\n#### Pre-Opened Node\n\nSet `expanded` to open a node on first render. Useful for landing pages where a specific branch should already be visible.\n\n```html\n<mds-tree>\n  <mds-tree-item label=\"Pratiche in corso\" expanded>\n    <mds-tree-item label=\"Richiesta #1042\"></mds-tree-item>\n    <mds-tree-item label=\"Richiesta #1043\"></mds-tree-item>\n  </mds-tree-item>\n  <mds-tree-item label=\"Archivio\"></mds-tree-item>\n</mds-tree>\n```\n\n#### Node with a Leading Icon\n\nUse the `icon` prop to add an icon before the label text. Reference icons by their slug - no `.svg` extension. The icon is independent of the toggle affordance.\n\n```html\n<mds-tree>\n  <mds-tree-item label=\"Segreteria\" icon=\"mi/baseline/desk\">\n    <mds-tree-item label=\"Genoveffo Baci\" icon=\"mi/baseline/person\"></mds-tree-item>\n    <mds-tree-item label=\"Donaldo Trombetta\" icon=\"mi/baseline/person\"></mds-tree-item>\n  </mds-tree-item>\n  <mds-tree-item label=\"Archivio\" icon=\"mi/baseline/archive\"></mds-tree-item>\n</mds-tree>\n```\n\n#### Folder Toggle Style\n\nWhen the tree uses `toggle=\"folder\"`, each item swaps between a closed-folder and open-folder icon as it expands. Set `toggle` on the parent `<mds-tree>` and all items inherit it automatically: the tree writes its own value (default `chevron`) onto every item when it loads and onto the items added later, so a `toggle` set on a single item is overwritten. The icon follows the branch however it opens: a click, `expand()` or the tree's `expanded`.\n\n```html\n<mds-tree toggle=\"folder\">\n  <mds-tree-item label=\"Modulistica\">\n    <mds-tree-item label=\"Modulo A\"></mds-tree-item>\n    <mds-tree-item label=\"Modulo B\"></mds-tree-item>\n  </mds-tree-item>\n</mds-tree>\n```\n\n#### Per-Item Action Controls\n\nSlot `<mds-button>` or `<mds-icon>` elements into the `action` slot to attach contextual controls to a node. Use the `actions` prop (inherited from the tree) to choose when they appear: `\"auto\"` shows them on hover, `\"visible\"` keeps them always visible.\n\n```html\n<mds-tree actions=\"auto\">\n  <mds-tree-item label=\"Contratto 2024\">\n    <mds-button\n      slot=\"action\"\n      icon=\"mi/baseline/attach-file\"\n      variant=\"primary\"\n      tone=\"text\"\n      title=\"Allega documento\"\n    ></mds-button>\n    <mds-button\n      slot=\"action\"\n      icon=\"mi/baseline/more-vert\"\n      variant=\"primary\"\n      tone=\"text\"\n      title=\"Altre opzioni\"\n    ></mds-button>\n    <mds-tree-item label=\"Allegato 1\"></mds-tree-item>\n  </mds-tree-item>\n</mds-tree>\n```\n\n#### Asynchronous (Lazy-Load) Node\n\nSet `async` on a node when its children must be fetched on demand. On expand the item shows a spinner on its toggle and emits `mdsTreeItemExpand`; call `expand()` on the element once data is ready to finalize opening. The toggle (and so the spinner) shows only if the item already had child items at first render; children appended later do not add it. After resolving, set `async` to `undefined` (or remove the attribute) so subsequent toggles work synchronously.\n\n```html\n<mds-tree>\n  <mds-tree-item async label=\"Dipendenti\" icon=\"mi/baseline/group\" id=\"dept-node\">\n    <!-- children injected after fetch -->\n  </mds-tree-item>\n</mds-tree>\n\n<script>\n  document.getElementById('dept-node').addEventListener(\n    'mdsTreeItemExpand',\n    async (event) => {\n      const node = event.detail.element;\n      if (!node.async) return;\n      const people = await fetchDepartmentPeople();\n      people.forEach((name) => {\n        const item = document.createElement('mds-tree-item');\n        item.label = name;\n        item.icon = 'mi/baseline/person';\n        node.appendChild(item);\n      });\n      await node.expand();\n      node.async = undefined;\n    },\n  );\n</script>\n```\n\n#### Reacting to Expand and Collapse Events\n\nListen to `mdsTreeItemExpand` and `mdsTreeItemCollapse` to keep external state (e.g. a sidebar breadcrumb or a selection store) in sync. `mdsTreeItemCollapse` fires whenever an item closes; `mdsTreeItemExpand` fires only for items marked `async`, when they are asked to open. Both events carry `{ element }` - the host `<mds-tree-item>` - so you can read its `label` or any other prop.\n\n```html\n<mds-tree id=\"struttura-tree\">\n  <mds-tree-item label=\"Ufficio A\">\n    <mds-tree-item label=\"Sezione 1\"></mds-tree-item>\n  </mds-tree-item>\n</mds-tree>\n\n<script>\n  // emitted only by items marked async\n  document.getElementById('struttura-tree').addEventListener('mdsTreeItemExpand', (event) => {\n    console.log('Espanso:', event.detail.element.label);\n  });\n  document.getElementById('struttura-tree').addEventListener('mdsTreeItemCollapse', (event) => {\n    console.log('Compresso:', event.detail.element.label);\n  });\n</script>\n```\n\n#### Multi-Line Label with Clamping\n\nSet `truncate=\"all\"` on the tree (it overwrites the items' own value) to allow multi-line text with clamping controlled by the tree's public `--mds-tree-line-clamp`. Use this for long file paths or descriptive labels.\n\n```html\n<mds-tree truncate=\"all\">\n  <mds-tree-item label=\"Delibera di Giunta Comunale n. 42 del 15 marzo 2024 - approvazione bilancio\">\n  </mds-tree-item>\n  <mds-tree-item label=\"Verbale seduta straordinaria del Consiglio Comunale del 22 aprile 2024\">\n  </mds-tree-item>\n</mds-tree>\n```\n\n#### CSS Customization\n\n`mds-tree-item` has no public CSS custom property: the colours of its label, branch and toggle, its spacing and its transitions follow the semantic roles, so they stay compatible with dark mode and high-contrast. Shape the items with their props (`icon`, and the `toggle`, `toggle-position`, `appearance` and `truncate` the tree passes down), the public `--mds-tree-line-clamp` of the parent `mds-tree` and the two documented parts below.\n\n```css\n.archivio-tree mds-tree {\n  --mds-tree-line-clamp: 3;\n}\n```\n\n#### Styling the Actions Container via Shadow Parts\n\nUse `::part(actions-container)` and `::part(actions-list)` to style the wrapper and inner list of action controls. They are the only documented parts - do not target other internal parts.\n\n```css\nmds-tree-item::part(actions-container) {\n  background: rgb(var(--magma-wash-soft));\n  border-radius: var(--magma-radius-md);\n}\n\nmds-tree-item::part(actions-list) {\n  gap: calc(var(--spacing) * 200);\n}\n```\n",
        "3. Mistakes": "Common incorrect uses of `<mds-tree-item>`. 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 Default Slot for Arbitrary Content\n\nThe default slot accepts only `<mds-tree-item>` children. Slotting arbitrary HTML (text, icons, buttons) into the default slot does not produce a label or a nested item - use the `label` prop for text and the `action` slot for action controls.\n\n```html\n<!-- INCORRECT -->\n<mds-tree-item>\n  <span>Documenti</span>\n  <mds-button icon=\"mi/baseline/add\" title=\"Aggiungi documento\"></mds-button>\n</mds-tree-item>\n\n<!-- CORRECT -->\n<mds-tree-item label=\"Documenti\">\n  <mds-button\n    slot=\"action\"\n    icon=\"mi/baseline/add\"\n    title=\"Aggiungi documento\"\n    variant=\"primary\"\n    tone=\"text\"\n  ></mds-button>\n</mds-tree-item>\n```\n\n#### Do Not Use the `action` Slot for Child Nodes\n\nThe `action` slot is for contextual controls (buttons, icons). Putting a `<mds-tree-item>` in the `action` slot removes it from the expand/collapse tree hierarchy and breaks branch rendering.\n\n```html\n<!-- INCORRECT -->\n<mds-tree-item label=\"Cartella\">\n  <mds-tree-item slot=\"action\" label=\"Figlio\"></mds-tree-item>\n</mds-tree-item>\n\n<!-- CORRECT -->\n<mds-tree-item label=\"Cartella\">\n  <mds-tree-item label=\"Figlio\"></mds-tree-item>\n</mds-tree-item>\n```\n\n#### Do Not Set `expanded=\"false\"` to Close a Node\n\nStencil reads the exact string `\"false\"` as `false`, so the node renders closed, but the attribute stays on the element: the chevron, styled on the attribute, points open, and presence checks (`hasAttribute('expanded')`) read the node as open. Remove the attribute (or set the property to `undefined`) to close.\n\n```html\n<!-- INCORRECT -->\n<mds-tree-item label=\"Archivio\" expanded=\"false\"></mds-tree-item>\n\n<!-- CORRECT -->\n<mds-tree-item label=\"Archivio\"></mds-tree-item>\n```\n\n#### Do Not Use `mds-tree-item` Outside a Tree Context\n\n`<mds-tree-item>` is a compound child - it must be a direct slot child of `<mds-tree>` or of another `<mds-tree-item>`. Using it in isolation removes the branch context, depth assignments, and coordinated expand/collapse behavior.\n\n```html\n<!-- INCORRECT -->\n<div class=\"my-list\">\n  <mds-tree-item label=\"Voce 1\"></mds-tree-item>\n  <mds-tree-item label=\"Voce 2\"></mds-tree-item>\n</div>\n\n<!-- CORRECT -->\n<mds-tree>\n  <mds-tree-item label=\"Voce 1\"></mds-tree-item>\n  <mds-tree-item label=\"Voce 2\"></mds-tree-item>\n</mds-tree>\n```\n\n#### Do Not Set `depth` Manually\n\n`depth` is an internal prop set by the parent `<mds-tree>`: it marks first-level items with `0`, which removes their branch connector lines (indentation comes from the nesting, not from `depth`). A hand-set value is useless at best, and a `0` on a nested item strips the connectors from the wrong level.\n\n```html\n<!-- INCORRECT -->\n<mds-tree>\n  <mds-tree-item label=\"Primo livello\" depth=\"0\">\n    <mds-tree-item label=\"Secondo livello\" depth=\"1\"></mds-tree-item>\n  </mds-tree-item>\n</mds-tree>\n\n<!-- CORRECT -->\n<mds-tree>\n  <mds-tree-item label=\"Primo livello\">\n    <mds-tree-item label=\"Secondo livello\"></mds-tree-item>\n  </mds-tree-item>\n</mds-tree>\n```\n\n#### Do Not Pierce the Shadow DOM to Style Internals\n\n`mds-tree-item` has no public CSS custom property: the only supported customization surface is its props, the two documented shadow parts (`actions-container`, `actions-list`) and the public `--mds-tree-line-clamp` of the parent `mds-tree`. Targeting internal classes via `>>>`, `/deep/`, or undocumented `::part()` names couples your code to implementation details that can change on any minor release.\n\n```css\n/* INCORRECT */\nmds-tree-item >>> .label-action {\n  font-weight: bold;\n}\nmds-tree-item::part(toggle-icon) {\n  color: red;\n}\n\n/* CORRECT */\nmds-tree-item::part(actions-list) {\n  gap: calc(var(--spacing) * 200);\n}\n```\n\n#### Do Not Call `expand()` Instead of Handling Async Correctly\n\n`expand()` is the public method for resolving an async load - it opens the node and clears the spinner. Calling it immediately on the `mdsTreeItemExpand` event (before data is fetched) opens an empty branch and discards the loading affordance. Always await the data before calling `expand()`.\n\n```html\n<!-- INCORRECT -->\n<script>\n  node.addEventListener('mdsTreeItemExpand', (event) => {\n    event.detail.element.expand(); // opens immediately, before data arrives\n    fetchChildren().then((data) => { /* too late */ });\n  });\n</script>\n\n<!-- CORRECT -->\n<script>\n  node.addEventListener('mdsTreeItemExpand', async (event) => {\n    const el = event.detail.element;\n    if (!el.async) return;\n    const data = await fetchChildren();\n    data.forEach((name) => {\n      const child = document.createElement('mds-tree-item');\n      child.label = name;\n      el.appendChild(child);\n    });\n    await el.expand();\n    el.async = undefined;\n  });\n</script>\n```\n"
      },
      "props": [
        {
          "name": "actions",
          "type": "\"auto\" | \"visible\" | undefined",
          "complexType": {
            "original": "TreeActions",
            "resolved": "\"auto\" | \"visible\" | undefined",
            "references": {
              "TreeActions": {
                "location": "import",
                "path": "@type/tree",
                "id": "src/type/tree.ts::TreeActions",
                "referenceLocation": "TreeActions"
              }
            }
          },
          "mutable": false,
          "attr": "actions",
          "reflectToAttr": true,
          "docs": "Show actions on the tree item on hover or by default.",
          "docsTags": [],
          "values": [
            {
              "value": "auto",
              "type": "string"
            },
            {
              "value": "visible",
              "type": "string"
            },
            {
              "type": "undefined"
            }
          ],
          "optional": true,
          "required": false,
          "getter": false,
          "setter": false
        },
        {
          "name": "appearance",
          "type": "\"depth\" | \"none\" | undefined",
          "complexType": {
            "original": "TreeAppearance",
            "resolved": "\"depth\" | \"none\" | undefined",
            "references": {
              "TreeAppearance": {
                "location": "import",
                "path": "@type/tree",
                "id": "src/type/tree.ts::TreeAppearance",
                "referenceLocation": "TreeAppearance"
              }
            }
          },
          "mutable": false,
          "attr": "appearance",
          "reflectToAttr": true,
          "docs": "Reflects the parent tree appearance (set by mds-tree); drives the depth/none\nlayout without :host-context",
          "docsTags": [],
          "values": [
            {
              "value": "depth",
              "type": "string"
            },
            {
              "value": "none",
              "type": "string"
            },
            {
              "type": "undefined"
            }
          ],
          "optional": true,
          "required": false,
          "getter": false,
          "setter": false
        },
        {
          "name": "async",
          "type": "boolean | undefined",
          "complexType": {
            "original": "boolean",
            "resolved": "boolean | undefined",
            "references": {}
          },
          "mutable": false,
          "attr": "async",
          "reflectToAttr": true,
          "docs": "Loads the children on demand: a click on the closed item shows a spinner and emits\n`mdsTreeItemExpand` instead of opening it; call `expand()` once the children are in place",
          "docsTags": [],
          "values": [
            {
              "type": "boolean"
            },
            {
              "type": "undefined"
            }
          ],
          "optional": true,
          "required": false,
          "getter": false,
          "setter": false
        },
        {
          "name": "depth",
          "type": "number | undefined",
          "complexType": {
            "original": "number",
            "resolved": "number | undefined",
            "references": {}
          },
          "mutable": false,
          "attr": "depth",
          "reflectToAttr": true,
          "docs": "Specifies the tree branch depth. Internal: used by CSS to remove branch lines on first-level elements.",
          "docsTags": [],
          "values": [
            {
              "type": "number"
            },
            {
              "type": "undefined"
            }
          ],
          "optional": true,
          "required": false,
          "getter": false,
          "setter": false
        },
        {
          "name": "expanded",
          "type": "boolean | undefined",
          "complexType": {
            "original": "boolean",
            "resolved": "boolean | undefined",
            "references": {}
          },
          "mutable": true,
          "attr": "expanded",
          "reflectToAttr": true,
          "docs": "Specifies if the tree is expanded.",
          "docsTags": [],
          "values": [
            {
              "type": "boolean"
            },
            {
              "type": "undefined"
            }
          ],
          "optional": true,
          "required": false,
          "getter": false,
          "setter": false
        },
        {
          "name": "icon",
          "type": "string | undefined",
          "complexType": {
            "original": "string",
            "resolved": "string | undefined",
            "references": {}
          },
          "mutable": false,
          "attr": "icon",
          "reflectToAttr": false,
          "docs": "The icon displayed in the button",
          "docsTags": [],
          "values": [
            {
              "type": "string"
            },
            {
              "type": "undefined"
            }
          ],
          "optional": true,
          "required": false,
          "getter": false,
          "setter": false
        },
        {
          "name": "label",
          "type": "string",
          "complexType": {
            "original": "string",
            "resolved": "string",
            "references": {}
          },
          "mutable": false,
          "attr": "label",
          "reflectToAttr": false,
          "docs": "Specifies the label of the tree item",
          "docsTags": [],
          "values": [
            {
              "type": "string"
            }
          ],
          "optional": false,
          "required": false,
          "getter": false,
          "setter": false
        },
        {
          "name": "toggle",
          "type": "\"chevron\" | \"folder\" | undefined",
          "complexType": {
            "original": "TreeIcon",
            "resolved": "\"chevron\" | \"folder\" | undefined",
            "references": {
              "TreeIcon": {
                "location": "import",
                "path": "@type/tree",
                "id": "src/type/tree.ts::TreeIcon",
                "referenceLocation": "TreeIcon"
              }
            }
          },
          "mutable": false,
          "attr": "toggle",
          "reflectToAttr": true,
          "docs": "Specifies the icon of the element",
          "docsTags": [],
          "values": [
            {
              "value": "chevron",
              "type": "string"
            },
            {
              "value": "folder",
              "type": "string"
            },
            {
              "type": "undefined"
            }
          ],
          "optional": true,
          "required": false,
          "getter": false,
          "setter": false
        },
        {
          "name": "togglePosition",
          "type": "\"left\" | \"right\" | undefined",
          "complexType": {
            "original": "ButtonIconPositionType",
            "resolved": "\"left\" | \"right\" | undefined",
            "references": {
              "ButtonIconPositionType": {
                "location": "import",
                "path": "@type/button",
                "id": "src/type/button.ts::ButtonIconPositionType",
                "referenceLocation": "ButtonIconPositionType"
              }
            }
          },
          "mutable": false,
          "attr": "toggle-position",
          "reflectToAttr": true,
          "docs": "Reflects the parent tree toggle icon position (set by mds-tree); drives the\ntoggle-icon layout without :host-context",
          "docsTags": [],
          "values": [
            {
              "value": "left",
              "type": "string"
            },
            {
              "value": "right",
              "type": "string"
            },
            {
              "type": "undefined"
            }
          ],
          "optional": true,
          "required": false,
          "getter": false,
          "setter": false
        },
        {
          "name": "truncate",
          "type": "\"all\" | \"none\" | \"word\" | undefined",
          "complexType": {
            "original": "TypographyTruncateType",
            "resolved": "\"all\" | \"none\" | \"word\" | undefined",
            "references": {
              "TypographyTruncateType": {
                "location": "import",
                "path": "@type/text",
                "id": "src/type/text.ts::TypographyTruncateType",
                "referenceLocation": "TypographyTruncateType"
              }
            }
          },
          "mutable": false,
          "attr": "truncate",
          "reflectToAttr": true,
          "docs": "Truncate the text of the element on one single line.",
          "docsTags": [
            {
              "name": "default",
              "text": "'word'"
            }
          ],
          "default": "'word'",
          "values": [
            {
              "value": "all",
              "type": "string"
            },
            {
              "value": "none",
              "type": "string"
            },
            {
              "value": "word",
              "type": "string"
            },
            {
              "type": "undefined"
            }
          ],
          "optional": true,
          "required": false,
          "getter": false,
          "setter": false
        }
      ],
      "methods": [
        {
          "name": "expand",
          "returns": {
            "type": "Promise<void>",
            "docs": ""
          },
          "complexType": {
            "signature": "() => Promise<void>",
            "parameters": [],
            "references": {
              "Promise": {
                "location": "global",
                "id": "global::Promise"
              }
            },
            "return": "Promise<void>"
          },
          "signature": "expand() => Promise<void>",
          "parameters": [],
          "docs": "Expands the tree item, revealing its children.",
          "docsTags": []
        },
        {
          "name": "refreshActions",
          "returns": {
            "type": "Promise<void>",
            "docs": ""
          },
          "complexType": {
            "signature": "() => Promise<void>",
            "parameters": [],
            "references": {
              "Promise": {
                "location": "global",
                "id": "global::Promise"
              }
            },
            "return": "Promise<void>"
          },
          "signature": "refreshActions() => Promise<void>",
          "parameters": [],
          "docs": "`internal` Re-resolves the effective actions; called by mds-tree when its own\nactions changes so items that inherit it stay in sync.",
          "docsTags": []
        }
      ],
      "events": [
        {
          "event": "mdsTreeItemCollapse",
          "detail": "MdsTreeItemEventDetail",
          "bubbles": true,
          "complexType": {
            "original": "MdsTreeItemEventDetail",
            "resolved": "MdsTreeItemEventDetail",
            "references": {
              "MdsTreeItemEventDetail": {
                "location": "import",
                "path": "./meta/event-detail",
                "id": "src/components/mds-tree-item/meta/event-detail.ts::MdsTreeItemEventDetail",
                "referenceLocation": "MdsTreeItemEventDetail"
              }
            }
          },
          "cancelable": true,
          "composed": true,
          "docs": "Emits when the item closes, once its children have finished hiding",
          "docsTags": []
        },
        {
          "event": "mdsTreeItemExpand",
          "detail": "MdsTreeItemEventDetail",
          "bubbles": true,
          "complexType": {
            "original": "MdsTreeItemEventDetail",
            "resolved": "MdsTreeItemEventDetail",
            "references": {
              "MdsTreeItemEventDetail": {
                "location": "import",
                "path": "./meta/event-detail",
                "id": "src/components/mds-tree-item/meta/event-detail.ts::MdsTreeItemEventDetail",
                "referenceLocation": "MdsTreeItemEventDetail"
              }
            }
          },
          "cancelable": true,
          "composed": true,
          "docs": "Emits when the user opens an `async` item, to load its children: opening any other item emits\nnothing",
          "docsTags": []
        }
      ],
      "listeners": [],
      "styles": [
        {
          "name": "--mds-tree-item-actions-border-radius",
          "annotation": "prop",
          "docs": "Inherits the border-radius used for tree action containers.",
          "visibility": "internal"
        },
        {
          "name": "--mds-tree-item-actions-gap",
          "annotation": "prop",
          "docs": "Spacing between tree item action elements.",
          "visibility": "internal"
        },
        {
          "name": "--mds-tree-item-branch-border-color",
          "annotation": "prop",
          "docs": "The border color of the branch connector for the item.",
          "visibility": "internal"
        },
        {
          "name": "--mds-tree-item-branch-border-radius",
          "annotation": "prop",
          "docs": "The border-radius applied to the branch connector.",
          "visibility": "internal"
        },
        {
          "name": "--mds-tree-item-branch-border-size",
          "annotation": "prop",
          "docs": "The thickness of the branch connector line.",
          "visibility": "internal"
        },
        {
          "name": "--mds-tree-item-branch-dot-default-color",
          "annotation": "prop",
          "docs": "Default color of the branch dot indicator.",
          "visibility": "internal"
        },
        {
          "name": "--mds-tree-item-branch-dot-expanded-color",
          "annotation": "prop",
          "docs": "Color of the branch dot when expanded.",
          "visibility": "internal"
        },
        {
          "name": "--mds-tree-item-label-default-background",
          "annotation": "prop",
          "docs": "Background color of the label in default state.",
          "visibility": "internal"
        },
        {
          "name": "--mds-tree-item-label-hover-background",
          "annotation": "prop",
          "docs": "Background color of the label in hover state.",
          "visibility": "internal"
        },
        {
          "name": "--mds-tree-item-label-icon-default-color",
          "annotation": "prop",
          "docs": "Default icon color inside the label.",
          "visibility": "internal"
        },
        {
          "name": "--mds-tree-item-label-icon-hover-color",
          "annotation": "prop",
          "docs": "Icon color inside the label when hovering.",
          "visibility": "internal"
        },
        {
          "name": "--mds-tree-item-line-clamp",
          "annotation": "prop",
          "docs": "Defines the number of lines before text is truncated.",
          "visibility": "internal"
        },
        {
          "name": "--mds-tree-item-toggle-gap",
          "annotation": "prop",
          "docs": "Spacing between the label and the toggle control.",
          "visibility": "internal"
        },
        {
          "name": "--mds-tree-item-toggle-icon-async-background",
          "annotation": "prop",
          "docs": "Background color for async-loading toggle icons.",
          "visibility": "internal"
        },
        {
          "name": "--mds-tree-item-toggle-icon-async-color",
          "annotation": "prop",
          "docs": "Icon color for async-loading toggles.",
          "visibility": "internal"
        },
        {
          "name": "--mds-tree-item-toggle-icon-chevron-default-background",
          "annotation": "prop",
          "docs": "Background for the default chevron toggle.",
          "visibility": "internal"
        },
        {
          "name": "--mds-tree-item-toggle-icon-chevron-default-color",
          "annotation": "prop",
          "docs": "Icon color for the default chevron toggle.",
          "visibility": "internal"
        },
        {
          "name": "--mds-tree-item-toggle-icon-chevron-expanded-background",
          "annotation": "prop",
          "docs": "Background for the expanded chevron toggle.",
          "visibility": "internal"
        },
        {
          "name": "--mds-tree-item-toggle-icon-chevron-expanded-color",
          "annotation": "prop",
          "docs": "Icon color for the expanded chevron toggle.",
          "visibility": "internal"
        },
        {
          "name": "--mds-tree-item-toggle-icon-folder-default-background",
          "annotation": "prop",
          "docs": "Background for the default folder toggle.",
          "visibility": "internal"
        },
        {
          "name": "--mds-tree-item-toggle-icon-folder-default-color",
          "annotation": "prop",
          "docs": "Icon color for the default folder toggle.",
          "visibility": "internal"
        },
        {
          "name": "--mds-tree-item-toggle-icon-folder-expanded-background",
          "annotation": "prop",
          "docs": "Background for the expanded folder toggle.",
          "visibility": "internal"
        },
        {
          "name": "--mds-tree-item-toggle-icon-folder-expanded-color",
          "annotation": "prop",
          "docs": "Icon color for the expanded folder toggle.",
          "visibility": "internal"
        },
        {
          "name": "--mds-tree-item-toggle-icon-position-right-default-background",
          "annotation": "prop",
          "docs": "Background for right-positioned toggle in default state.",
          "visibility": "internal"
        },
        {
          "name": "--mds-tree-item-toggle-icon-position-right-default-color",
          "annotation": "prop",
          "docs": "Icon color for right-positioned toggle in default state.",
          "visibility": "internal"
        },
        {
          "name": "--mds-tree-item-toggle-icon-position-right-expanded-background",
          "annotation": "prop",
          "docs": "Background for right-positioned toggle in expanded state.",
          "visibility": "internal"
        },
        {
          "name": "--mds-tree-item-toggle-icon-position-right-expanded-color",
          "annotation": "prop",
          "docs": "Icon color for right-positioned toggle in expanded state.",
          "visibility": "internal"
        },
        {
          "name": "--mds-tree-item-toggle-size",
          "annotation": "prop",
          "docs": "Size of the toggle control.",
          "visibility": "internal"
        },
        {
          "name": "--mds-tree-item-transition-duration",
          "annotation": "prop",
          "docs": "Transition duration for tree item animation.",
          "visibility": "internal"
        },
        {
          "name": "--mds-tree-item-transition-timing-function",
          "annotation": "prop",
          "docs": "Transition easing function for tree item animation.",
          "visibility": "internal"
        }
      ],
      "slots": [
        {
          "name": "",
          "docs": "Add `mds-tree-item` element/s."
        },
        {
          "name": "action",
          "docs": "Add `mds-button`, `mds-icon` or other types component and HTML element/s."
        }
      ],
      "parts": [
        {
          "name": "actions-container",
          "docs": "Selects the wrapper of the container of the actions."
        },
        {
          "name": "actions-list",
          "docs": "Selects the container of the actions."
        }
      ],
      "states": [],
      "dependents": [],
      "dependencies": [
        "mds-button"
      ],
      "dependencyGraph": {
        "mds-tree-item": [
          "mds-button"
        ],
        "mds-button": [
          "mds-icon",
          "mds-spinner",
          "mds-text"
        ]
      },
      "storybook": "ui-tree-tree-item--docs"
    }
  ]
}
