## class: `WyTitlebar`, `wy-titlebar`

Header title bar for dialogs.

### Fields

| Name             | Type           | Default                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                             | Description                                                                                       | Inherited From |
| ---------------- | -------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------- | -------------- |
| `header`         | `boolean`      | `false`                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                             | Whether the titlebar is wrapped in a header.                                                      |                |
| `floating`       | `boolean`      | `false`                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                             | Whether the wrapped header titlebar is floating.                                                  |                |
| `outer`          | `boolean`      | `false`                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                             | Whether the wrapped header titlebar should be treated with outer padding and outer border radius. |                |
| `trashed`        | `boolean`      | `false`                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                             | Use trashed visual style for the titlebar text.                                                   |                |
| `size`           | `"md" \| "lg"` | `"md"`                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              | Size of the titlebar. Defaults to \`md\`.                                                         |                |
| `wrapping`       | `boolean`      | `false`                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                             | Allow titlebar layout to wrap.                                                                    |                |
| `resizeObserver` |                | ``new ResizeObserver(() => { const iconSlotWidth = this.iconSlotRef.value?.offsetWidth \|\| 0; const actionsSlotWidth = this.actionsSlotRef.value?.offsetWidth \|\| 0; const maxSlotWidth = Math.max(iconSlotWidth, actionsSlotWidth); if (this.iconFillRef.value) { this.iconFillRef.value.dataset.fill = iconSlotWidth < maxSlotWidth ? `${maxSlotWidth - iconSlotWidth}` : "0"; } if (this.actionsFillRef.value) { this.actionsFillRef.value.dataset.fill = actionsSlotWidth < maxSlotWidth ? `${maxSlotWidth - actionsSlotWidth}` : "0"; } })`` |                                                                                                   |                |

### Attributes

| Name       | Field    | Inherited From |
| ---------- | -------- | -------------- |
| `header`   | header   |                |
| `floating` | floating |                |
| `outer`    | outer    |                |
| `trashed`  | trashed  |                |
| `size`     | size     |                |
| `wrapping` | wrapping |                |

### CSS Parts

| Name                        | Description                                                      |
| --------------------------- | ---------------------------------------------------------------- |
| `wy-titlebar`               | Wrapper for the titlebar.                                        |
| `wy-titlebar-lg`            | Wrapper when size is \`lg\`.                                     |
| `wy-titlebar-icon`          | The icon in the first section.                                   |
| `wy-titlebar-title`         | The title text in the middle section.                            |
| `wy-titlebar-actions`       | The actions in the last section.                                 |
| `wy-titlebar-section`       | Normal section; the middle section.                              |
| `wy-titlebar-buttons`       | Sections with buttons; the icon section and the actions section. |
| `wy-titlebar-buttons-first` | Button section placed in the first section.                      |
| `wy-titlebar-buttons-last`  | Button section placed in the last section.                       |
| `wy-header`                 | Outer wrapper when titlebar is defined as header.                |
| `wy-header-floating`        | Applies floating positioning to wy-header.                       |
| `wy-header-outer`           | Applies outer paddings for wy-header.                            |

### Slots

| Name            | Description                                      |
| --------------- | ------------------------------------------------ |
| `first`         | The first section, which contains \`icon\`.      |
| `middle`        | The middle section, which contains \`title\`.    |
| `last`          | The last section, which contains \`actions\`.    |
| `icon`          | Icon, avatar or button in the \`first\` section. |
| `title-section` | Title in the \`middle\` section.                 |
| `title`         | Text in the \`title\`.                           |
| `actions`       | Action buttons in the \`last\` section.          |

<details><summary>Private API</summary>

### Fields

| Name             | Privacy   | Type               | Default                           | Description | Inherited From |
| ---------------- | --------- | ------------------ | --------------------------------- | ----------- | -------------- |
| `exportParts`    | protected |                    | `new ShadowPartsController(this)` |             |                |
| `iconSlotRef`    | protected | `Ref<HTMLElement>` |                                   |             |                |
| `actionsSlotRef` | protected | `Ref<HTMLElement>` |                                   |             |                |
| `iconFillRef`    | protected | `Ref<HTMLElement>` |                                   |             |                |
| `actionsFillRef` | protected | `Ref<HTMLElement>` |                                   |             |                |

</details>

<hr/>

## class: `WyTitlebarText`, `wy-titlebar-text`

Title text for title bar.

### Fields

| Name      | Type      | Default | Description | Inherited From |
| --------- | --------- | ------- | ----------- | -------------- |
| `trashed` | `boolean` | `false` |             |                |

### Attributes

| Name      | Field   | Inherited From |
| --------- | ------- | -------------- |
| `trashed` | trashed |                |

### CSS Parts

| Name                       | Description                             |
| -------------------------- | --------------------------------------- |
| `wy-titlebar-text`         | Truncated title text.                   |
| `wy-titlebar-text-trashed` | State text style when title is trashed. |

### Slots

| Name | Description         |
| ---- | ------------------- |
|      | Text for the title. |

<details><summary>Private API</summary>

### Fields

| Name          | Privacy   | Type | Default                           | Description | Inherited From |
| ------------- | --------- | ---- | --------------------------------- | ----------- | -------------- |
| `exportParts` | protected |      | `new ShadowPartsController(this)` |             |                |

</details>

<hr/>

## Exports

| Kind                        | Name               | Declaration    | Module                           | Package |
| --------------------------- | ------------------ | -------------- | -------------------------------- | ------- |
| `js`                        | `WyTitlebar`       | WyTitlebar     | lib/components/ui/wy-titlebar.ts |         |
| `custom-element-definition` | `wy-titlebar`      | WyTitlebar     | lib/components/ui/wy-titlebar.ts |         |
| `js`                        | `WyTitlebarText`   | WyTitlebarText | lib/components/ui/wy-titlebar.ts |         |
| `custom-element-definition` | `wy-titlebar-text` | WyTitlebarText | lib/components/ui/wy-titlebar.ts |         |
