# Entity Management — Exported CSS Parts

Reference for the shadow `part`s exposed by `foundation-entity-management`
(`entities.template.ts`), and the inner parts forwarded up through nested
shadow boundaries via `exportparts`.

All selectors below are used against the host element from a consuming
stylesheet, e.g. with the `rapid` prefix:

```css
rapid-entity-management::part(create-button-control) { … }
```

## Forwarded parts (nested custom elements)

Each of these elements is a shadow host with its own inner parts. It is
exposed via `part`, and its inner parts are forwarded via `exportparts` using
the convention `<element-role>-<inner-part>`.

| Element | Exposed as `part` | Forwarded inner parts (`::part(…)`) |
|---|---|---|
| Create / add button | `create-button` | `create-button-control`, `create-button-content` |
| Edit button | `edit-button` | `edit-button-control`, `edit-button-content` |
| Delete button | `delete-button` | `delete-button-control`, `delete-button-content` |
| Custom-action button | `custom-action-button` | `custom-action-button-control`, `custom-action-button-content` |
| CSV export button | `export-button` | `export-button-control`, `export-button-content` |
| Filter button | `filter-button` | `filter-button-control`, `filter-button-content` |
| Filters modal | `filters-modal` | `filters-modal-dialog`, `filters-modal-content`, `filters-modal-content-container`, `filters-modal-top`, `filters-modal-bottom`, `filters-modal-close-icon`, `filters-modal-reset-size-icon` |
| Edit modal | `edit-modal` | `edit-modal-dialog`, `edit-modal-content`, `edit-modal-content-container`, `edit-modal-top`, `edit-modal-bottom`, `edit-modal-close-icon`, `edit-modal-reset-size-icon` |
| Form (`foundation-form`) | `form` | `form-approval-modal`, `form-csv-upload`, `form-user-actions` |
| Filters (`foundation-filters`) | `filters` | `filters-container`, `filters-container-body`, `filters-container-forms`, `filters-actions`, `filters-persistence-controls-container` |
| Search bar | `search-bar` | `search-bar-label` |
| Grid (via `entity-list`) | — | `grid` |

### Notes

- **Custom-action button** is rendered inside a `repeat`, so `custom-action-button`
  (and its forwarded parts) match **all** custom-action buttons — style them as a group.
- **Grid** is forwarded through **two** shadow boundaries:
  `rapid-grid-pro` carries `part="grid"` inside `entity-list`, and `entity-list`
  re-exports it with `exportparts="grid"`. `::part(grid)` targets the grid **host**
  element, not ag-grid's internal rows/cells.

## Native parts (no forwarding needed)

These `part`s are declared directly on plain elements in the entity-management
shadow root, so they are already exposed to consumers with no `exportparts`:

| Part | Element |
|---|---|
| `before-header`, `header`, `after-header` | header slots |
| `before-footer`, `footer`, `after-footer` | footer slots |
| `custom-buttons-wrapper`, `custom-buttons-wrapper-<position>` | `<section>` |
| `custom-buttons`, `custom-buttons-<position>` | `<nav>` |
| `crud-buttons-wrapper`, `crud-buttons-wrapper-<position>`, `crud-buttons-wrapper-column` | `<section>` |
| `crud-buttons`, `crud-buttons-<position>` | `<nav>` |

`<position>` resolves to `top` / `bottom` / `column` per `CrudMenuPosition`.

## Not forwarded (and why)

- **`search-bar` control / listbox / selected-value** — these live in a nested
  combobox that `<rapid-search-bar>` does not itself re-export, so they are not
  reachable at the search-bar boundary. Forwarding them would require an
  `exportparts` change **inside** the search-bar component (a separate package).
- **`ai-criteria-search`** — declares no parts of its own, so there is nothing
  to forward.

## Convention

Exposed part names are namespaced by the element's role (`<element>-<inner-part>`),
matching the existing pattern used by `settings-modal` and `multiselect` in the
codebase.
