{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "tile",
  "type": "registry:ui",
  "title": "<ui-tile>",
  "description": "Carbon `Tile` / `ClickableTile` (`cds-tile`, `cds-clickable-tile`): a `$layer` box — 16px padding, no border, no shadow, at least 64 × 128px — so it follows the `<ui-layer>` it sits on. Copied from @purpurabog/ui 2.3.0; the package is the maintained source, this copy is yours to change. Icons from the Carbon Design System (Apache-2.0, © IBM Corp.; see THIRD-PARTY-NOTICES.md in the package).",
  "dependencies": [
    "lit@^3.3.0"
  ],
  "registryDependencies": [
    "@kanok-ui/checkbox",
    "@kanok-ui/radio",
    "@kanok-ui/shared-element",
    "@kanok-ui/shared-events",
    "@kanok-ui/shared-field",
    "@kanok-ui/shared-localize",
    "@kanok-ui/shared-navigate",
    "@kanok-ui/tokens"
  ],
  "files": [
    {
      "path": "src/primitives/tile/expandable-tile.ts",
      "type": "registry:ui",
      "target": "components/ui/primitives/tile/expandable-tile.ts",
      "content": "import { LitElement, html, css } from 'lit';\nimport { customElement, property } from 'lit/decorators.js';\nimport { uid } from '../shared/field.ts';\nimport type { ExpandedDetail } from '../shared/events.ts';\nimport { UiElement } from '../shared/element.ts';\n\n/**\n * Tile that reveals more content (Carbon `ExpandableTile`: a layer tile, chevron in the bottom-end corner), built on the WAI-ARIA disclosure\n * pattern: the always-visible summary is a real `<button>` with `aria-expanded` /\n * `aria-controls`, so Enter/Space toggle and screen readers announce the state.\n *\n * Interactive content belongs in the default (expanded) slot, never in the summary,\n * because the summary sits inside the button.\n *\n * @cssprop --ui-card-border / --ui-card-radius - Border and corners, as the cards (default none and square; Kanok: a hairline, 12px)\n * @cssprop --ui-card-background - Its fill (default `--ui-surface-1`; Kanok paper: a cool grey that sets it apart from the page, no border)\n * @slot summary - Always visible (text only)\n * @slot - Revealed content\n * @fires ui-before-toggle - Cancelable; detail: { expanded } — the state about to be applied\n * @fires ui-toggle - detail: { expanded }\n * @csspart summary - The always-visible button row\n * @csspart chevron - The arrow icon\n * @csspart content - The expandable body\n * @cssprop --ui-focus-offset - `outline-offset` of its focus ring (default -2px: inside; Kanok: 2px outside)\n */\n@customElement('ui-expandable-tile')\nexport class UiExpandableTile extends UiElement {\n    /** `el.focus()` lands on the control inside. */\n    static override readonly shadowRootOptions: ShadowRootInit = { ...LitElement.shadowRootOptions, delegatesFocus: true };\n\n    static override readonly styles = css`\n        :host {\n            display: block;\n            color: var(--ui-ink);\n            font: var(--ui-font-body-sm);\n            line-height: 18px;\n            letter-spacing: var(--ui-tracking-body);\n        }\n\n        /* Carbon .cds--tile--expandable: a layer tile, 16px padding, no border, layer-hover on hover (at once: Carbon\n           moves only its height); on a part rather than :host so a page-wide CSS reset can't remove it */\n        .base {\n            position: relative;\n            box-sizing: border-box;\n            min-height: 64px;\n            padding: var(--ui-space-md);\n            outline: var(--ui-focus-width, 2px) solid transparent;\n            outline-offset: var(--ui-focus-offset, -2px);\n            border: var(--ui-card-border, none); /* the card settings: Carbon none and square, Kanok a hairline and 12px */\n            border-radius: var(--ui-card-radius, 0);\n            background-color: var(--ui-card-background, var(--ui-surface-1));\n        }\n\n        .base:hover {\n            background-color: var(--ui-ghost-hover);\n        }\n\n        /* the ring goes round the whole tile, on :focus (a click too) as Carbon */\n        .base:has(.summary:focus) {\n            outline-color: var(--ui-focus);\n        }\n\n        /* a mouse or touch focus shows no ring in a design that sets --ui-pointer-focus (Kanok: keyboard only) */\n        .base:has(.summary:focus:not(:focus-visible)) {\n            outline-color: var(--ui-pointer-focus, var(--ui-focus));\n        }\n\n        /* at least 32px, so with the padding the tile is Carbon's 64px and the button is never empty */\n        .summary {\n            display: block;\n            width: 100%;\n            min-height: 32px;\n            margin: 0;\n            padding: 0;\n            border: none;\n            outline: none;\n            background: transparent;\n            color: inherit;\n            font: inherit;\n            letter-spacing: inherit;\n            text-align: start;\n            cursor: pointer;\n        }\n\n        /* Carbon .cds--tile__chevron: a 48px square in the tile's bottom-end corner, the 16px icon centred */\n        .chevron {\n            position: absolute;\n            inset-block-end: 0;\n            inset-inline-end: 0;\n            box-sizing: border-box;\n            width: 48px;\n            height: 48px;\n            padding: var(--ui-space-md);\n            fill: var(--ui-icon-primary);\n        }\n\n        @media (prefers-reduced-motion: no-preference) {\n            .chevron {\n                transition: transform var(--ui-duration-moderate) var(--ui-easing); /* Carbon fast-02, 110ms */\n            }\n        }\n\n        :host([expanded]) .chevron {\n            transform: rotate(180deg);\n        }\n\n        /* Carbon .cds--tile-content__below-the-fold: fades in for 110ms as it opens (closing, the tile shuts at once) */\n        .content {\n            transition:\n                opacity var(--ui-duration-moderate) var(--ui-easing),\n                visibility var(--ui-duration-moderate) var(--ui-easing);\n        }\n\n        @starting-style {\n            .content {\n                opacity: 0;\n                visibility: hidden;\n            }\n        }\n\n        .content[hidden] {\n            display: none;\n        }\n\n        @media (forced-colors: active) {\n            .base {\n                border: 1px solid CanvasText;\n            }\n\n            .chevron {\n                fill: CanvasText;\n            }\n        }\n    `;\n\n    @property({ type: Boolean, reflect: true }) expanded = false;\n\n    private readonly contentId = uid('ui-expandable-tile');\n\n    toggle(force = !this.expanded) {\n        if (force === this.expanded) return;\n        const before = new CustomEvent('ui-before-toggle', {\n            detail: { expanded: force },\n            bubbles: true,\n            composed: true,\n            cancelable: true,\n        });\n        if (!this.dispatchEvent(before)) return;\n        this.expanded = force;\n        this.dispatchEvent(new CustomEvent('ui-toggle', { detail: { expanded: force }, bubbles: true, composed: true }));\n    }\n\n    override render() {\n        return html`<div class=\"base\">\n            <button\n                class=\"summary\"\n                part=\"summary\"\n                type=\"button\"\n                aria-expanded=${this.expanded ? 'true' : 'false'}\n                aria-controls=${this.contentId}\n                @click=${() => this.toggle()}\n            >\n                <slot name=\"summary\"></slot>\n                <svg class=\"chevron\" part=\"chevron\" viewBox=\"0 0 16 16\" aria-hidden=\"true\">\n                    <path d=\"M8 11 3 6l.7-.7L8 9.6l4.3-4.3.7.7z\" />\n                </svg>\n            </button>\n            <div class=\"content\" part=\"content\" id=${this.contentId} ?hidden=${!this.expanded}>\n                <slot></slot>\n            </div>\n        </div>`;\n    }\n}\n\nexport interface UiExpandableTileEventMap extends HTMLElementEventMap {\n    'ui-toggle': CustomEvent<ExpandedDetail>;\n    'ui-before-toggle': CustomEvent<ExpandedDetail>;\n}\n\n/** Typed listeners for UiExpandableTile's events (declaration merging with the class). */\nexport interface UiExpandableTile {\n    addEventListener<K extends keyof UiExpandableTileEventMap>(type: K, listener: (this: UiExpandableTile, event: UiExpandableTileEventMap[K]) => unknown, options?: boolean | AddEventListenerOptions): void;\n    addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;\n    removeEventListener<K extends keyof UiExpandableTileEventMap>(type: K, listener: (this: UiExpandableTile, event: UiExpandableTileEventMap[K]) => unknown, options?: boolean | EventListenerOptions): void;\n    removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;\n}\n\ndeclare global {\n    interface HTMLElementTagNameMap {\n        'ui-expandable-tile': UiExpandableTile;\n    }\n}\n"
    },
    {
      "path": "src/primitives/tile/radio-tile.ts",
      "type": "registry:ui",
      "target": "components/ui/primitives/tile/radio-tile.ts",
      "content": "import { css, html } from 'lit';\nimport { customElement } from 'lit/decorators.js';\nimport { UiRadio } from '../radio/radio.ts';\nimport { markStyles, tileChrome } from './selection-tiles-shared.ts';\n\n/**\n * A radio option rendered as a tile (Carbon `RadioTile`). Put several in a `<ui-radio-group>`, which provides the\n * radiogroup role, arrow-key navigation, form value, required / readonly / warn handling.\n * As Carbon, the check mark shows only on the chosen tile.\n *\n * @cssprop --ui-tile-border-color - Border of an unchosen tile (default transparent; Kanok: a hairline); `--ui-card-radius` its corners\n * @cssprop --ui-card-background - Its fill (default `--ui-surface-1`; Kanok paper: a cool grey that sets it apart from the page, no border)\n * @cssprop --ui-tile-selected-border - Border of the chosen tile (default `--ui-layer-selected-inverse`; Kanok: primary blue); `--ui-tile-selected-mark` its check mark (default `--ui-icon-primary`)\n * @cssprop --ui-tile-selected-background - Fill of the chosen tile (default `--ui-card-background`; Kanok: soft highlight wash)\n * @cssprop --ui-tile-mark-space - End padding kept clear for the mark (default 48px, Carbon's); e.g. 16px lets the content run under the mark in the top-end corner (beyond Carbon)\n * @slot - Tile content (title, description…)\n */\n@customElement('ui-radio-tile')\nexport class UiRadioTile extends UiRadio {\n    // one CSSResult, as UiRadio's styles\n    static override readonly styles = css`\n            ${markStyles}\n\n            :host {\n                display: block;\n                outline: none;\n            }\n\n            /* the tile is drawn by this part, not :host, so a page-wide CSS reset can't remove its padding and border */\n            .base {\n                ${tileChrome}\n            }\n\n            :host(:not([disabled], [data-group-disabled]):hover) .base {\n                background-color: var(--ui-ghost-hover);\n            }\n\n            :host([checked]) .base {\n                border-color: var(--ui-tile-selected-border, var(--ui-layer-selected-inverse));\n                background-color: var(--ui-tile-selected-background, var(--ui-highlight, var(--ui-card-background)));\n            }\n\n            :host([checked]:not([disabled], [data-group-disabled]):hover) .base {\n                background-color: var(--ui-tile-selected-hover, var(--ui-tile-selected-background, var(--ui-highlight, var(--ui-card-background))));\n            }\n\n            /* Carbon: .cds--tile-input:focus + .cds--tile (a click too) */\n            :host(:focus) .base {\n                outline-color: var(--ui-focus);\n            }\n\n            /* a mouse or touch focus shows no ring in a design that sets --ui-pointer-focus (Kanok: keyboard only) */\n            :host(:focus:not(:focus-visible)) .base {\n                outline-color: var(--ui-pointer-focus, var(--ui-focus));\n            }\n\n            :host([data-invalid]) .base {\n                border: 2px solid var(--ui-error);\n            }\n\n            .mark {\n                opacity: 0;\n                fill: var(--ui-tile-selected-mark, var(--ui-icon-primary));\n            }\n\n            :host([checked]) .mark {\n                opacity: 1;\n            }\n\n            :host([disabled]) .base,\n            :host([data-group-disabled]) .base {\n                color: var(--ui-ink-disabled);\n                cursor: not-allowed;\n                background-color: var(--ui-card-background, var(--ui-surface-1));\n            }\n\n            :host([checked][disabled]) .base,\n            :host([checked][data-group-disabled]) .base {\n                border-color: var(--ui-border-disabled);\n                background-color: var(--ui-card-background, var(--ui-surface-1));\n            }\n\n            :host([disabled]) .mark,\n            :host([data-group-disabled]) .mark {\n                fill: var(--ui-icon-disabled);\n            }\n\n            :host([data-group-readonly]) .base {\n                cursor: default;\n                background-color: var(--ui-card-background, var(--ui-surface-1));\n            }\n\n            @media (forced-colors: active) {\n                :host([checked]) .base {\n                    border: 2px solid Highlight;\n                }\n\n                .mark {\n                    fill: CanvasText;\n                }\n            }\n        `;\n\n    override render() {\n        // Carbon's CheckmarkFilled (16), hidden until chosen\n        return html`<div class=\"base\">\n            <svg class=\"mark\" part=\"mark\" viewBox=\"0 0 16 16\" aria-hidden=\"true\">\n                <path d=\"M8 1C4.1 1 1 4.1 1 8s3.1 7 7 7 7-3.1 7-7-3.1-7-7-7zM7 11 4.3 8.3l.9-.8L7 9.3l4-3.9.9.8L7 11z\" />\n            </svg>\n            <slot></slot>\n        </div>`;\n    }\n}\n\ndeclare global {\n    interface HTMLElementTagNameMap {\n        'ui-radio-tile': UiRadioTile;\n    }\n}\n"
    },
    {
      "path": "src/primitives/tile/selectable-tile.ts",
      "type": "registry:ui",
      "target": "components/ui/primitives/tile/selectable-tile.ts",
      "content": "import { css, html } from 'lit';\nimport { customElement } from 'lit/decorators.js';\nimport { UiCheckbox } from '../checkbox/checkbox.ts';\nimport { markStyles, tileChrome } from './selection-tiles-shared.ts';\n\n/**\n * A checkbox rendered as a tile (Carbon `SelectableTile`). Same API and form behaviour as\n * `<ui-checkbox>` — a real checkbox inside, so Space toggles, the value is submitted, and\n * `required` / `readonly` / `warn` / ui-checkbox-group all work. The mark is Carbon's checkbox icon.\n *\n * @cssprop --ui-tile-border-color - Border of an unchosen tile (default transparent; Kanok: a hairline); `--ui-card-radius` its corners\n * @cssprop --ui-card-background - Its fill (default `--ui-surface-1`; Kanok paper: a cool grey that sets it apart from the page, no border)\n * @cssprop --ui-tile-selected-border - Border of the chosen tile (default `--ui-layer-selected-inverse`; Kanok: primary blue); `--ui-tile-selected-mark` its check mark (default `--ui-icon-primary`)\n * @cssprop --ui-tile-selected-background - Fill of the chosen tile (default `--ui-card-background`; Kanok: soft highlight wash)\n * @cssprop --ui-tile-mark-space - End padding kept clear for the mark (default 48px, Carbon's); e.g. 16px lets the content run under the mark in the top-end corner (beyond Carbon)\n * @slot - Tile content (title, description…)\n */\n@customElement('ui-selectable-tile')\nexport class UiSelectableTile extends UiCheckbox {\n    /** Carbon's selectable tile is focusable with tabindex=\"0\", so Safari focuses it on click and Tab reaches it. */\n    protected override readonly controlTabIndex = '0';\n\n    static override readonly styles = [\n        ...UiCheckbox.styles,\n        markStyles,\n        css`\n            label {\n                ${tileChrome}\n                width: 100%;\n            }\n\n            :host(:not([data-disabled], [data-readonly])) label:hover {\n                background-color: var(--ui-ghost-hover);\n            }\n\n            :host([checked]) label {\n                border-color: var(--ui-tile-selected-border, var(--ui-layer-selected-inverse));\n                background-color: var(--ui-tile-selected-background, var(--ui-highlight, var(--ui-card-background)));\n            }\n\n            :host([checked]:not([data-disabled], [data-readonly])) label:hover {\n                background-color: var(--ui-tile-selected-hover, var(--ui-tile-selected-background, var(--ui-highlight, var(--ui-card-background))));\n            }\n\n            :host([checked]) .mark {\n                fill: var(--ui-tile-selected-mark, var(--ui-icon-primary));\n            }\n\n            /* Ring the whole tile on :focus (a click too, as Carbon), not the small mark */\n            label:has(input:focus) {\n                outline-color: var(--ui-focus);\n            }\n\n            /* a mouse or touch focus shows no ring in a design that sets --ui-pointer-focus (Kanok: keyboard only) */\n            label:has(input:focus:not(:focus-visible)) {\n                outline-color: var(--ui-pointer-focus, var(--ui-focus));\n            }\n\n            input,\n            .mark {\n                position: absolute;\n                top: var(--ui-space-md);\n                inset-inline-start: auto;\n                inset-inline-end: var(--ui-space-md);\n                margin: 0;\n            }\n\n            /* the native box stays clickable under the mark but invisible */\n            input {\n                width: 16px;\n                height: 16px;\n                opacity: 0;\n            }\n\n            .invalid,\n            :host([data-group-invalid]) label {\n                border: 2px solid var(--ui-error);\n            }\n\n            :host([data-disabled]) label {\n                background-color: var(--ui-card-background, var(--ui-surface-1));\n            }\n\n            :host([data-disabled][checked]) label {\n                border-color: var(--ui-border-disabled);\n                background-color: var(--ui-card-background, var(--ui-surface-1));\n            }\n\n            :host([data-disabled]) .mark {\n                fill: var(--ui-icon-disabled);\n            }\n\n            :host([data-readonly]) label {\n                cursor: default;\n            }\n\n            .error,\n            .warn,\n            .helper {\n                padding-inline-start: 0;\n            }\n\n            @media (forced-colors: active) {\n                .mark {\n                    fill: CanvasText;\n                }\n            }\n        `,\n    ];\n\n    /** Carbon's Checkbox / CheckboxCheckedFilled icons (32 grid at 16px) in place of the drawn box. */\n    protected override renderBox() {\n        return this.checked\n            ? html`<svg class=\"mark\" part=\"box\" viewBox=\"0 0 32 32\" aria-hidden=\"true\">\n                  <path d=\"M26 4H6a2 2 0 0 0-2 2v20a2 2 0 0 0 2 2h20a2 2 0 0 0 2-2V6a2 2 0 0 0-2-2zM14 21.5l-5-4.957L10.59 15 14 18.346 21.409 11 23 12.577z\" />\n              </svg>`\n            : html`<svg class=\"mark\" part=\"box\" viewBox=\"0 0 32 32\" aria-hidden=\"true\">\n                  <path d=\"M26 4H6a2 2 0 0 0-2 2v20a2 2 0 0 0 2 2h20a2 2 0 0 0 2-2V6a2 2 0 0 0-2-2zM6 26V6h20v20z\" />\n              </svg>`;\n    }\n}\n\ndeclare global {\n    interface HTMLElementTagNameMap {\n        'ui-selectable-tile': UiSelectableTile;\n    }\n}\n"
    },
    {
      "path": "src/primitives/tile/selection-tiles-shared.ts",
      "type": "registry:ui",
      "target": "components/ui/primitives/tile/selection-tiles-shared.ts",
      "content": "import { css } from 'lit';\n\n/**\n * Carbon `.cds--tile--selectable`: a layer tile, a transparent 1px border, 16px padding with 48px at the end for the\n * mark (`--ui-tile-mark-space`, beyond Carbon: less lets the content run under the mark), 64px tall.\n */\nexport const tileChrome = css`\n    position: relative;\n    display: block;\n    box-sizing: border-box;\n    min-height: 64px;\n    padding: var(--ui-space-md) var(--ui-tile-mark-space, calc(var(--ui-space-md) * 2 + 16px)) var(--ui-space-md) var(--ui-space-md);\n    /* Carbon: no visible border until chosen, square; a design can outline and round the tile (--ui-tile-border-color, --ui-card-radius) */\n    border: 1px solid var(--ui-tile-border-color, transparent);\n    border-radius: var(--ui-card-radius, 0);\n    outline: var(--ui-focus-width, 2px) solid transparent;\n    outline-offset: var(--ui-focus-offset, -2px);\n    background-color: var(--ui-card-background, var(--ui-surface-1));\n    color: var(--ui-ink);\n    font: var(--ui-font-body-sm);\n    line-height: 18px;\n    letter-spacing: var(--ui-tracking-body);\n    cursor: pointer;\n    transition: all var(--ui-duration-moderate-01) var(--ui-easing); /* Carbon .cds--tile--selectable: every property, moderate-01 */\n`;\n\n/** The 16px mark in the top-end corner (Carbon .cds--tile__checkmark: 16px from the padding edge). */\nexport const markStyles = css`\n    .mark {\n        position: absolute;\n        top: var(--ui-space-md);\n        inset-inline-end: var(--ui-space-md);\n        width: 16px;\n        height: 16px;\n        z-index: 1; /* above the content, which runs under it with a small --ui-tile-mark-space */\n        pointer-events: none; /* a click still lands on the (invisible) input below, as before */\n        fill: var(--ui-icon-secondary);\n        transition: all var(--ui-duration-moderate) var(--ui-easing); /* Carbon .cds--tile__checkmark: every property, fast-02 */\n    }\n`;\n"
    },
    {
      "path": "src/primitives/tile/selection-tiles.ts",
      "type": "registry:ui",
      "target": "components/ui/primitives/tile/selection-tiles.ts",
      "content": "// One element per file in this folder; this module is the entry point (package export, React wrappers, index).\nexport * from './radio-tile.ts';\nexport * from './selectable-tile.ts';\n"
    },
    {
      "path": "src/primitives/tile/tile.ts",
      "type": "registry:ui",
      "target": "components/ui/primitives/tile/tile.ts",
      "content": "import { LitElement, html, css, nothing } from 'lit';\nimport { customElement, property } from 'lit/decorators.js';\nimport { srOnlyStyles } from '../shared/field.ts';\nimport { LocalizeController } from '../shared/localize.ts';\nimport { UiElement } from '../shared/element.ts';\nimport { followLink } from '../shared/navigate.ts';\n\n/**\n * Carbon `Tile` / `ClickableTile` (`cds-tile`, `cds-clickable-tile`): a `$layer` box — 16px padding,\n * no border, no shadow, at least 64 × 128px — so it follows the `<ui-layer>` it sits on.\n *\n * With `href` the whole tile becomes one link (a single tab stop, the link text is the\n * tile's text; hover `layer-hover`). Don't put other interactive controls inside a linked tile.\n * As Carbon, a linked tile has no icon unless you give it one (`slot=\"icon\"`, 20px in the corner).\n *\n * @slot - Tile content\n * @slot icon - A linked tile's icon (e.g. an arrow), 20px, 12px from the bottom-end corner\n * @csspart base - The container (`<div>` or `<a>`)\n * @fires ui-navigate - detail: { href } (cancelable) on a plain click of the link; cancel it to route client-side (README: SPA router)\n * @cssprop --ui-card-radius - Corner radius (default 0; Kanok: 12px)\n * @cssprop --ui-card-border - Border (default none; Kanok: a hairline)\n * @cssprop --ui-card-background - Its fill (default `--ui-surface-1`; Kanok paper: a cool grey that sets it apart from the page, no border)\n * @cssprop --ui-focus-offset - `outline-offset` of its focus ring (default -2px: inside; Kanok: 2px outside)\n */\n@customElement('ui-tile')\nexport class UiTile extends UiElement {\n    static override readonly shadowRootOptions: ShadowRootInit = {\n        ...LitElement.shadowRootOptions,\n        delegatesFocus: true,\n    };\n\n    static override readonly styles = [srOnlyStyles, css`\n        :host {\n            display: block;\n        }\n\n        /* Carbon .cds--tile: body-compact-01, 16px padding, layer background, 64px tall and 128px wide at least */\n        .tile {\n            position: relative;\n            display: block;\n            box-sizing: border-box;\n            height: 100%;\n            min-height: 64px;\n            min-width: 128px;\n            padding: var(--ui-space-md);\n            /* Carbon: square and borderless (the layer colour sets it apart); --ui-card-* let a design round and outline it */\n            border: var(--ui-card-border, none);\n            border-radius: var(--ui-card-radius, var(--ui-radius-none));\n            outline: var(--ui-focus-width, 2px) solid transparent;\n            outline-offset: var(--ui-focus-offset, -2px);\n            background-color: var(--ui-card-background, var(--ui-surface-1));\n            color: var(--ui-ink);\n            font: var(--ui-font-body-sm);\n            line-height: 18px;\n            letter-spacing: var(--ui-tracking-body);\n            text-decoration: none;\n        }\n\n        a.tile {\n            cursor: pointer;\n            transition: all var(--ui-duration-moderate-01) var(--ui-easing); /* Carbon .cds--tile--clickable: every property, moderate-01 */\n        }\n\n        a.tile:hover {\n            background-color: var(--ui-ghost-hover);\n        }\n\n        /* Carbon: the focus ring follows :focus (a click too) */\n        a.tile:focus {\n            outline-color: var(--ui-focus);\n        }\n\n        /* a mouse or touch focus shows no ring in a design that sets --ui-pointer-focus (Kanok: keyboard only) */\n        a.tile:focus:not(:focus-visible) {\n            outline-color: var(--ui-pointer-focus, var(--ui-focus));\n        }\n\n        .disabled {\n            color: var(--ui-ink-disabled);\n            cursor: not-allowed;\n        }\n\n        ::slotted([slot='icon']) {\n            position: absolute;\n            inset-block-end: 12px;\n            inset-inline-end: 12px;\n            width: 20px;\n            height: 20px;\n            fill: var(--ui-icon-interactive);\n        }\n\n        .disabled ::slotted([slot='icon']) {\n            display: none;\n        }\n\n        @media (forced-colors: active) {\n            .tile {\n                border: 1px solid CanvasText;\n            }\n        }\n    `];\n\n    /** Makes the whole tile a link. */\n    @property() href = '';\n\n    @property() target: '_self' | '_blank' = '_self';\n\n    /** A linked tile that can't be followed right now (Carbon `ClickableTile disabled`): plain text, no link. */\n    @property({ type: Boolean, reflect: true }) disabled = false;\n\n    private readonly localize = new LocalizeController(this);\n    override render() {\n        if (!this.href) {\n            return html`<div class=\"tile\" part=\"base\"><slot></slot></div>`;\n        }\n        if (this.disabled) {\n            return html`<div class=\"tile disabled\" part=\"base\" aria-disabled=\"true\"><slot></slot><slot name=\"icon\"></slot></div>`;\n        }\n        const external = this.target === '_blank';\n        // tabindex=\"0\" as Carbon's clickable tile: without it Safari neither focuses the tile on click nor stops on it with Tab\n        return html`\n            <a\n                class=\"tile\"\n                part=\"base\"\n                href=${this.href}\n                target=${this.target}\n                rel=${external ? 'noopener noreferrer' : nothing}\n                tabindex=\"0\"\n                @click=${followLink}\n            >\n                <slot></slot>\n                ${external ? html`<span class=\"sr-only\">${this.localize.t.common.opensInNewTab}</span>` : nothing}\n                <slot name=\"icon\"></slot>\n            </a>\n        `;\n    }\n}\n\ndeclare global {\n    interface HTMLElementTagNameMap {\n        'ui-tile': UiTile;\n    }\n}\n"
    }
  ]
}
