Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
This PR migrates the next-gen Asset component to Spectrum 2 styles and updates Storybook accordingly.
Motivation and context
This PR migrates the Asset component from first-gen to the second-gen architecture, following the established pattern of separating core component logic from Spectrum-specific implementation.
Changes:
What changed
First-gen:
first-gen/packages/asset/src/Asset.ts- Remains unchanged for backward compatibilityCore (Base):
second-gen/packages/core/components/asset/Asset.base.ts- Updates shared functionalitiessecond-gen/packages/core/components/asset/Asset.types.ts- Creates types file for size and static color variantssecond-gen/packages/core/components/asset/index.ts- Imports and exports typesSecond-gen:
second-gen/packages/swc/components/asset/Asset.ts- Updates render method to accommodate classessecond-gen/packages/swc/components/asset/asset.css- Adds CSS fromspectrum-csssecond-gen/packages/swc/components/asset/stories/asset.stories.ts- Adds comprehensive story coverageRelated issue(s)
Screenshots (if appropriate)
Author's checklist
Reviewer's checklist
patch,minor, ormajorfeatures (Note: I did not add a changeset, I wasn't sure that this was set up for barebones and didn't see any for progress circle or badge, but I'm happy to add one if I'm mistaken!)Manual review test cases
Run second-gen Storybook:
Storybook functionality:
Documentation:
First-gen verification (use the PR preview or run locally):
yarn start # or yarn docs:startCode review checklist:
Device review