docs: group web-ui components by purpose

This commit is contained in:
Gabriel20xx committed 2026-10-16 14:53:27 +00:00
1 parent 6be3f90afa
commit 521603188d
1 file changed
+49 -17
+49 -17
View File
@@ -28,34 +28,66 @@ The single source of truth for code reused across every project in this workspac
### Public `web-ui` components
These are the complete Svelte component exports from `packages/web-ui/src/lib/index.ts` (22 components):
These are the complete Svelte component exports from `packages/web-ui/src/lib/index.ts` (22 components), grouped by purpose.
#### Layout and navigation
| Component | Includes |
|---|---|
| `AppShell` | Application layout that composes the header, notification stack, theme, and primary-color handling. |
| `Header` | Branded application header with navigation, icons, actions, profile/settings menus, and logout. |
#### Buttons and controls
| Component | Includes |
|---|---|
| `Button` | Button with primary, secondary, outline, ghost, and danger variants; multiple sizes and full-width mode. |
| `Pagination` | Page navigation and page-size selection with total/item counts. |
| `PrimaryColorPicker` | Per-project primary-color selector backed by the shared color persistence helpers. |
#### Dialogs
| Component | Includes |
|---|---|
| `AboutDialog` | About modal with application branding, description, version, links, and custom content. |
| `AppShell` | Application layout that composes the header, notification stack, theme, and primary-color handling. |
| `AuthPage` | Login, first-time setup, password-reset, and optional TOTP authentication flows. |
| `Badge` | Small inline label with default, primary, success, warning, and danger variants. |
| `Button` | Button with primary, secondary, outline, ghost, and danger variants; multiple sizes and full-width mode. |
| `Card` | Styled content section for grouping application content. |
| `Dialog` | Generic modal dialog with title, description, body, footer, and bindable open state. |
| `EmptyState` | Empty-content message with an inbox icon, title, and description. |
| `Header` | Branded application header with navigation, icons, actions, profile/settings menus, and logout. |
| `MediaPlayer` | Audio/video player with playback, seeking, volume, quality, fullscreen, keyboard controls, and custom end controls. |
| `MediaPlayerControls` | Reusable media controls for playback, seeking, volume, quality, fullscreen, optional graph toggling, and custom end controls. |
| `Metric` | Labeled metric/value display with optional detail and semantic variants. |
| `NotificationStack` | Global stack of dismissible success, error, warning, and informational notifications. |
| `Pagination` | Page navigation and page-size selection with total/item counts. |
| `PrimaryColorPicker` | Per-project primary-color selector backed by the shared color persistence helpers. |
| `ProfileDialog` | Profile username/email/password editing and TOTP settings. |
| `SectionTitle` | Section heading with optional description. |
| `SettingsDialog` | Generic settings modal with custom content or a default empty-settings message. |
#### Content and data display
| Component | Includes |
|---|---|
| `Badge` | Small inline label with default, primary, success, warning, and danger variants. |
| `Card` | Styled content section for grouping application content. |
| `EmptyState` | Empty-content message with an inbox icon, title, and description. |
| `Metric` | Labeled metric/value display with optional detail and semantic variants. |
| `SectionTitle` | Section heading with optional description. |
#### Feedback and status
| Component | Includes |
|---|---|
| `NotificationStack` | Global stack of dismissible success, error, warning, and informational notifications. |
| `StatusDialog` | Detailed service health/readiness status modal with refresh support. |
| `StatusWidget` | Header-friendly health/readiness indicator that polls `/healthz` and `/ready` and opens `StatusDialog`. |
#### Media
| Component | Includes |
|---|---|
| `MediaPlayer` | Audio/video player with playback, seeking, volume, quality, fullscreen, keyboard controls, and custom end controls. |
| `MediaPlayerControls` | Reusable media controls for playback, seeking, volume, quality, fullscreen, optional graph toggling, and custom end controls. |
#### Accounts and access
| Component | Includes |
|---|---|
| `AuthPage` | Login, first-time setup, password-reset, and optional TOTP authentication flows. |
| `ProfileDialog` | Profile username/email/password editing and TOTP settings. |
| `TotpSettings` | TOTP status, setup, enable, and disable controls. |
| `UserManagement` | Role-aware user administration with listing, creation, editing, deletion, role assignment, and pagination. |
This inventory describes the public component API only; the package also exports notification helpers, primary-color helpers, and TypeScript types. When a public component is added, removed, renamed, or materially changes responsibility, update this table in the same change as `packages/web-ui/src/lib/index.ts`. Keep the table aligned with that barrel file, and do not add internal or generated components to it.
This inventory describes the public component API only; the package also exports notification helpers, primary-color helpers, and TypeScript types. When a public component is added, removed, renamed, or materially changes responsibility, update the matching category table in the same change as `packages/web-ui/src/lib/index.ts`. Keep the tables aligned with that barrel file, place each component in the category that matches its primary purpose, and do not add internal or generated components to them.
The `web-ui` components don't import `$app/state`, `$lib` stores, or a project-specific API — applications provide those through props and callbacks.