Skip to content

v2.0.0-beta.7 (gen2)

Pre-release
Pre-release

Choose a tag to compare

@Rajdeepc Rajdeepc released this 10 Nov 04:13
· 18 commits to main since this release
33abf3e

This beta rebuilds <swc-upload-attachment> and brings a batch of accessibility and contrast fixes.

type="media" now composes <swc-card> internally instead of hand-rolled surface markup, reusing its slots and grid machinery. The public slot API (thumbnail, badge, title, subtitle, actions) is unchanged. Two new attributes come with it: progress (0-100) shows a progress overlay while an upload is in flight, delayed by a second so a fast upload does not flash the loading state, and size (m or l) picks a 64px or 96px tile. <swc-card> also gained --swc-card-base-grid-template-rows for overriding its media, content, and footer row tracks.

Also in this release: <swc-tabs> now links tabs added after the initial render to their panels and clears stale aria-controls and aria-labelledby references; static-white and static-black secondary and outline <swc-button> labels and <swc-close-button> icons now use opaque white or black for better contrast; and <swc-prompt-field>'s attachment strip received a broad pass over its scroll chevrons, paging, focus handling, and edge fades.

⚠️ Important: two changes need action if you are already on the beta.

  • The default size of <swc-avatar> changed from 500 (40px) to 100 (24px), matching 1st-gen and React Spectrum S2. Set size="500" to keep the previous default, or size="75" for 20px. Invalid values now fall back to 100.
  • Several <swc-upload-attachment> custom properties were removed or merged, because type="media" sizing is driven by size now. --swc-upload-attachment-preview-size is removed in favor of size; the thumbnail inline and block size properties are merged into --swc-upload-attachment-card-thumbnail-size; and the dismiss icon inline and block size properties are merged into --swc-upload-attachment-dismiss-icon-size.

Thanks to @aramos-adobe, @cdransf, @rise-erpelding, @rubencarvalho, and @miwha-adobe!

Install: npm i @adobe/spectrum-wc@2.0.0-beta.7

Full changelog · Compare with 2.0.0-beta.6