# KptUpdate (kpt-update) An app update row: the icon in a `kpt-loader variant="ring"`, the name, a status line ("12.3 MB of 24 MB") and a button whose label follows the state. Texts cross-fade when the state changes; the ring goes from waiting to progress to the result. Import: `import { KptUpdate } from '@konce-pt/angular';` The component downloads nothing - the app owns the state, the byte counts and what an action does. ## States (`status`) - `pending` (default) - waiting (queued, or for the user's decision): the ring loops, the line says `update.pending`, the button `update.update` - `downloading` - with `total` the ring draws `loaded / total` and the line shows both sizes in the unit of the total ("0.4 MB of 24 MB"); without `total` the ring loops and the line shows `loaded` (or `update.downloading`). Button: `update.cancel` - `success` - the ring closes and releases the icon; line `update.success`, button `update.open` - `error` - the ring retracts and a badge pops on the icon; line `update.error`, button `update.retry` ## Inputs - `name`: string (required) - `status`: KptUpdateStatus (default 'pending') - `loaded`, `total`: number | null (bytes) - formatted with `Intl` in the interface language - `size`: string (default '5.5rem') - the ring size (the `size` of `kpt-loader`) - `color`: KptLoaderColor (default 'info') - the ring and the icon tile; a theme role or a CSS colour - `showAction`: boolean (default true) - `pendingText`, `downloadingText`, `successText`, `errorText` - override the line/status texts - `updateLabel`, `cancelLabel`, `openLabel`, `retryLabel` - override the button labels ## Outputs - `action`: KptUpdateAction - 'update' | 'cancel' | 'open' | 'retry', chosen by the state at the moment of the click ## Content The icon: ``, an inline SVG or `kpt-icon`. An ``/`` fills the rounded tile; without content the tile shows the `download` icon. ## Example ## Tokens The tile is a gradient from the `color` role to `--kpt-color-success`, the icon on it in `--kpt-color--contrast`, with `--kpt-shadow-sm`. Text: `--kpt-font-weight-semibold` (name), `--kpt-font-size-sm` and `--kpt-color-text-muted` (line). Gaps: `--kpt-space-1`, `--kpt-space-4`. ## Accessibility A visually hidden `role="status"` region holds "name: state" and announces each state change - not every byte (the line is `aria-hidden`). While downloading with a known total the ring is a `role="progressbar"` named by the state text. The button is a real `kpt-button`; during the cross-fade the leaving label is `aria-hidden`. With `provideKptMotion({ enabled: false })` or "reduce motion" texts change without the cross-fade.