ProgressUpload
ImplementedPer-file upload row: file icon + name + size, an inline status-colored bar (not composed of ProgressBar — composition refactor tracked), a percent/status readout, and ghost-button Cancel/Retry actions gated on status. uploading/done/error/paused states; error renders a role='alert' message and paused differentiates with a warning-tinted bar.
patterns/molecules/progressupload.htmlPer-file upload row: file icon + truncated name + size, an inline progress bar with status-driven colors, and Cancel/Retry actions gated on status. Announces via aria-live for every status except done.
ProgressUpload
Molecule — Status & feedback
status="uploading" (default): teal→blue gradient fill, percent readout, cancel available while onCancel is provided.
This component supports light and dark mode.
ProgressUpload — done
Molecule — Status & feedback
status="done": success fill, "Done" readout, both action buttons hidden regardless of handlers.
ProgressUpload — error
Molecule — Status & feedback
status="error": error fill, role="alert" message, Retry (DS Button ghost) when onRetry is provided.
Upload failed. Retry or cancel.
ProgressUpload — paused
Molecule — Status & feedback
status="paused": warning-tinted fill, "Paused" readout, polite live region, cancel still available.
Usage
import { ProgressUpload } from '@epasslive/design-system'
<ProgressUpload
fileName="poster.png"
fileSize="2.4 MB"
progress={42}
status="uploading"
onCancel={abort}
/>
// Error — Retry (ghost Button) + role="alert" message
<ProgressUpload fileName="poster.png" progress={12} status="error" onRetry={restart} />Accessibility
- Root is
role="group"labelledUpload: {fileName}; the track carriesrole="progressbar"+ the value triple, witharia-live="polite"for every status except done (uploading, paused and error all announce), androle="alert"on failure. - Localize every user-visible string via the label props (
cancelLabel/retryLabel/doneLabel/errorLabel/pausedLabel/uploadAriaPrefix) — they default to English. TranslatedprogressUpload.*values live in the DS i18n catalogs (i18n/en.json, i18n/fr.json); the component never reads the catalog itself (Toast/Alert label-prop convention). - The uploading gradient has the same WCAG 1.4.11 contrast gap as ProgressBar (one gradient end < 3:1 per theme) — tracked defect, do not cite as compliant.
- For a plain labeled/unlabeled bar, see ProgressBar. This molecule currently re-implements its own inline bar rather than composing ProgressBar (composition refactor tracked).
fileName*stringFile name — group label + title tooltip.
progress*numberPercent 0–100, clamped (non-finite → 0). Exposed as data-progress-percent.
status"uploading" | "done" | "error" | "paused"uploadingDrives fill color, actions, and live-region behavior. No "queued" state exists.
fileSizestringHuman-readable size (e.g. "2.4 MB").
onCancel() => voidShows the cancel button; hidden once status="done".
onRetry() => voidShows retry when status="error".
cancelLabelstringCancel uploadAccessible name for cancel — pass a localized string (i18n key progressUpload.cancel).
retryLabelstringRetry uploadAccessible name for retry — pass a localized string (i18n key progressUpload.retry).
doneLabelstringDoneStatus text shown instead of the percent when status="done" (i18n key progressUpload.done).
errorLabelstringUpload failed. Retry or cancel.Message announced via role="alert" on error (i18n key progressUpload.error).
pausedLabelstringPausedStatus text shown instead of the percent when status="paused" (i18n key progressUpload.paused).
uploadAriaPrefixstringUpload:Group aria-label renders as `${uploadAriaPrefix} ${fileName}` (i18n key progressUpload.ariaPrefix).
classNamestringAdditional CSS classes.
idstringStable root id (useId-generated by default).
Props
ProgressUpload
fileNamestring—Name of the file being uploaded (group label + title tooltip).
progressnumber—Progress percentage, clamped 0-100 (non-finite clamps to 0).
status'uploading' | 'done' | 'error' | 'paused''uploading'Upload state driving bar color, actions and live-region behavior — exactly these four, no 'queued'.
fileSizestring—Human-readable size (e.g. '2.4 MB').
onCancel() => void—Shows the Cancel button when provided (hidden once status='done').
onRetry() => void—Shows Retry when status='error'.
cancelLabelstring'Cancel upload'Accessible name for cancel (i18n key progressUpload.cancel).
retryLabelstring'Retry upload'Accessible name for retry (i18n key progressUpload.retry).
doneLabelstring'Done'Status text shown instead of the percent when done (i18n key progressUpload.done).
errorLabelstring'Upload failed. Retry or cancel.'Message announced via role='alert' on error (i18n key progressUpload.error).
pausedLabelstring'Paused'Status text shown instead of the percent when paused (i18n key progressUpload.paused).
uploadAriaPrefixstring'Upload:'Group aria-label renders as `{uploadAriaPrefix} {fileName}` (i18n key progressUpload.ariaPrefix).
classNamestring—Additional CSS classes.
idstringauto (useId)Stable root id.
<ProgressUpload />Accessibility
ARIA
1 ruleType
1 ruleUsage
Import
import { ProgressUpload } from "@epasslive/design-system"Example 1
<ProgressUpload fileName="poster.png" fileSize="2.4 MB" progress={42} status="uploading" onCancel={abort} />Example 2
<ProgressUpload fileName="poster.png" progress={12} status="error" onRetry={restart} cancelLabel="Annuler" retryLabel="Réessayer" errorLabel="Échec du téléversement." />Anti-patterns
— Do not pass status='queued' — the union is uploading/done/error/paused
— Do not hand-roll the Cancel link — it is a ghost Button atom with a 44px tap target