Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions .changeset/gen2-2-0-0-major.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
'@adobe/spectrum-wc': major
'@spectrum-web-components/core': major
---

Gen2 2.0.0 milestone. Establishes the 2.0.0 major line for the 2nd-gen component set; beta releases are cut as `2.0.0-beta.N` via Changesets pre-release mode.
112 changes: 112 additions & 0 deletions .changeset/pre.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,112 @@
{
"mode": "pre",
"tag": "beta",
"initialVersions": {
"@spectrum-web-components/1st-gen": "0.0.9",
"@spectrum-web-components/accordion": "1.12.1",
"@spectrum-web-components/action-bar": "1.12.1",
"@spectrum-web-components/action-button": "1.12.1",
"@spectrum-web-components/action-group": "1.12.1",
"@spectrum-web-components/action-menu": "1.12.1",
"@spectrum-web-components/alert-banner": "1.12.1",
"@spectrum-web-components/alert-dialog": "1.12.1",
"@spectrum-web-components/asset": "1.12.1",
"@spectrum-web-components/avatar": "1.12.1",
"@spectrum-web-components/badge": "1.12.1",
"@spectrum-web-components/breadcrumbs": "1.12.1",
"@spectrum-web-components/button": "1.12.1",
"@spectrum-web-components/button-group": "1.12.1",
"@spectrum-web-components/card": "1.12.1",
"@spectrum-web-components/checkbox": "1.12.1",
"@spectrum-web-components/clear-button": "1.12.1",
"@spectrum-web-components/close-button": "1.12.1",
"@spectrum-web-components/coachmark": "1.12.1",
"@spectrum-web-components/color-area": "1.12.1",
"@spectrum-web-components/color-field": "1.12.1",
"@spectrum-web-components/color-handle": "1.12.1",
"@spectrum-web-components/color-loupe": "1.12.1",
"@spectrum-web-components/color-slider": "1.12.1",
"@spectrum-web-components/color-wheel": "1.12.1",
"@spectrum-web-components/combobox": "1.12.1",
"@spectrum-web-components/contextual-help": "1.12.1",
"@spectrum-web-components/dialog": "1.12.1",
"@spectrum-web-components/divider": "1.12.1",
"@spectrum-web-components/dropzone": "1.12.1",
"@spectrum-web-components/field-group": "1.12.1",
"@spectrum-web-components/field-label": "1.12.1",
"@spectrum-web-components/help-text": "1.12.1",
"@spectrum-web-components/icon": "1.12.1",
"@spectrum-web-components/icons": "1.12.1",
"@spectrum-web-components/icons-ui": "1.12.1",
"@spectrum-web-components/icons-workflow": "1.12.1",
"@spectrum-web-components/iconset": "1.12.1",
"@spectrum-web-components/illustrated-message": "1.12.1",
"@spectrum-web-components/infield-button": "1.12.1",
"@spectrum-web-components/link": "1.12.1",
"@spectrum-web-components/menu": "1.12.1",
"@spectrum-web-components/meter": "1.12.1",
"@spectrum-web-components/modal": "1.12.1",
"@spectrum-web-components/number-field": "1.12.1",
"@spectrum-web-components/overlay": "1.12.1",
"@spectrum-web-components/picker": "1.12.1",
"@spectrum-web-components/picker-button": "1.12.1",
"@spectrum-web-components/popover": "1.12.1",
"@spectrum-web-components/progress-bar": "1.12.1",
"@spectrum-web-components/progress-circle": "1.12.1",
"@spectrum-web-components/radio": "1.12.1",
"@spectrum-web-components/search": "1.12.1",
"@spectrum-web-components/sidenav": "1.12.1",
"@spectrum-web-components/slider": "1.12.1",
"@spectrum-web-components/split-view": "1.12.1",
"@spectrum-web-components/status-light": "1.12.1",
"@spectrum-web-components/swatch": "1.12.1",
"@spectrum-web-components/switch": "1.12.1",
"@spectrum-web-components/table": "1.12.1",
"@spectrum-web-components/tabs": "1.12.1",
"@spectrum-web-components/tags": "1.12.1",
"@spectrum-web-components/textfield": "1.12.1",
"@spectrum-web-components/thumbnail": "1.12.1",
"@spectrum-web-components/toast": "1.12.1",
"@spectrum-web-components/tooltip": "1.12.1",
"@spectrum-web-components/top-nav": "1.12.1",
"@spectrum-web-components/tray": "1.12.1",
"@spectrum-web-components/underlay": "1.12.1",
"@spectrum-web-components/custom-vars-viewer": "1.12.1",
"documentation": "1.2.12",
"@spectrum-web-components/story-decorator": "1.12.1",
"swc-templates": "1.2.0",
"@types/swc": "1.2.0",
"@spectrum-web-components/vrt-compare": "1.12.1",
"@spectrum-web-components/base": "1.12.1",
"@spectrum-web-components/bundle": "1.12.1",
"@spectrum-web-components/grid": "1.12.1",
"@spectrum-web-components/opacity-checkerboard": "1.12.1",
"@spectrum-web-components/reactive-controllers": "1.12.1",
"@spectrum-web-components/shared": "1.12.1",
"@spectrum-web-components/styles": "1.12.1",
"@spectrum-web-components/theme": "1.12.1",
"@spectrum-web-components/truncated": "1.12.1",
"@spectrum-web-components/2nd-gen": "0.0.1",
"@spectrum-web-components/core": "1.0.0",
"@adobe/spectrum-wc": "1.0.0",
"@adobe/postcss-token": "0.0.2",
"@adobe/swc-tokens": "0.2.0",
"swc-vscode-token": "0.0.1",
"@adobe/vite-global-elements-css": "0.0.1",
"@spectrum-web-components/eslint-plugin": "1.12.1",
"@spectrum-web-components/stylelint-header-plugin": "1.12.1"
},
"changesets": [
"accordion-2nd-gen-and-deprecations",
"action-button-2nd-gen-migration",
"button-group-migration",
"fix-action-menu-submenu-mobile-tray",
"gen2-2-0-0-major",
"illustrated-message-actions-slot",
"light-beers-roll",
"link-2nd-gen-migration",
"meter-2nd-gen-migration",
"placement-controller-core",
"silver-mice-pay"
]
}
77 changes: 72 additions & 5 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,19 @@ on:
description: 'NPM dist-tag (e.g., latest, beta, snapshot)'
required: false
default: 'next'
scope:
description: 'Packages to publish: all (1st-gen + 2nd-gen) or 2nd-gen (core + @adobe/spectrum-wc only)'
required: false
type: choice
default: all
options:
- all
- 2nd-gen
dry_run:
description: 'Dry run: build, version, and pack but use npm publish --dry-run (no registry writes). Only applies to the 2nd-gen scope.'
required: false
type: boolean
default: false
pull_request:
types: [labeled, synchronize]
push:
Expand Down Expand Up @@ -49,8 +62,11 @@ jobs:
HAS_1ST_GEN=false
for file in .changeset/*.md; do
if [ "$(basename "$file")" != "README.md" ]; then
PACKAGES=$(grep -oP "@spectrum-web-components/[a-z-]+" "$file")
NON_CORE=$(echo "$PACKAGES" | grep -v "^@spectrum-web-components/core$")
# `|| true` keeps `set -e` from aborting when grep finds no match
# (e.g. a changeset that references only @spectrum-web-components/core,
# or only @adobe/spectrum-wc with no @spectrum-web-components/* package).
PACKAGES=$(grep -oP "@spectrum-web-components/[a-z-]+" "$file" || true)
NON_CORE=$(echo "$PACKAGES" | grep -v "^@spectrum-web-components/core$" || true)
if [ -n "$NON_CORE" ]; then
HAS_1ST_GEN=true
break
Expand Down Expand Up @@ -95,6 +111,7 @@ jobs:
env:
EVENT_NAME: ${{ github.event_name }}
INPUT_TAG: ${{ github.event.inputs.tag }}
INPUT_SCOPE: ${{ github.event.inputs.scope }}
run: |
if [ "$EVENT_NAME" == "pull_request" ]; then
# PRs with the snapshot-release label always use snapshot-test
Expand All @@ -107,18 +124,32 @@ jobs:
WORKFLOW_TAG="next"
fi

# Publish scope only applies to manual runs; everything else publishes all packages
if [ "$EVENT_NAME" == "workflow_dispatch" ] && [ "$INPUT_SCOPE" == "2nd-gen" ]; then
WORKFLOW_SCOPE="2nd-gen"
else
WORKFLOW_SCOPE="all"
fi

echo "tag=$WORKFLOW_TAG" >> $GITHUB_OUTPUT
echo "scope=$WORKFLOW_SCOPE" >> $GITHUB_OUTPUT
echo "Using npm tag: $WORKFLOW_TAG"
echo "Publish scope: $WORKFLOW_SCOPE"

- name: Validate release tag
env:
TAG: ${{ steps.extract-tag.outputs.tag }}
SCOPE: ${{ steps.extract-tag.outputs.scope }}
GIT_REF: ${{ github.ref }}
run: |
if [ "$TAG" == "latest" ] && [ "$GIT_REF" != "refs/heads/main" ]; then
echo "ERROR: Cannot publish 'latest' from non-main branch"
exit 1
fi
if [ "$SCOPE" == "2nd-gen" ] && [ "$TAG" == "latest" ]; then
echo "ERROR: 2nd-gen-only scope does not support the 'latest' tag; use a pre-release tag such as 'beta'"
exit 1
fi

- name: Verify OIDC token and configure NPM authentication
id: npm-auth
Expand All @@ -139,12 +170,19 @@ jobs:
run: yarn build

- name: Generate custom elements manifests
if: steps.extract-tag.outputs.scope != '2nd-gen'
run: yarn workspace @spectrum-web-components/1st-gen custom-element-json

- name: Confirm build artifacts
if: steps.extract-tag.outputs.scope != '2nd-gen'
run: yarn workspace @spectrum-web-components/1st-gen build:confirm

# For scope=2nd-gen we publish the versions already committed on the
# pre-release branch (e.g. 2.0.0-beta.N from Changesets pre mode). Running
# `changeset version --snapshot` here would overwrite those with a
# timestamped snapshot, so the step is skipped for the 2nd-gen scope.
- name: Version packages
if: steps.extract-tag.outputs.scope != '2nd-gen'
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
TAG: ${{ steps.extract-tag.outputs.tag }}
Expand Down Expand Up @@ -172,7 +210,7 @@ jobs:
yarn build

- name: Publish all packages
if: steps.npm-auth.outcome == 'success'
if: steps.npm-auth.outcome == 'success' && steps.extract-tag.outputs.scope != '2nd-gen'
env:
NODE_AUTH_TOKEN: ${{ secrets.ADOBE_BOT_NPM_TOKEN }}
TAG: ${{ steps.extract-tag.outputs.tag }}
Expand All @@ -187,12 +225,39 @@ jobs:
yarn changeset publish --no-git-tag --tag $TAG
fi

- name: Publish 2nd-gen packages only
if: steps.npm-auth.outcome == 'success' && steps.extract-tag.outputs.scope == '2nd-gen'
env:
NODE_AUTH_TOKEN: ${{ secrets.ADOBE_BOT_NPM_TOKEN }}
TAG: ${{ steps.extract-tag.outputs.tag }}
DRY_RUN: ${{ github.event.inputs.dry_run }}
run: |
set -euo pipefail
# Publish ONLY the 2nd-gen packages, leaving 1st-gen untouched even if
# 1st-gen changesets are present in this run (they stay unpublished and
# continue to release as `next` from the normal main pipeline).
#
# `yarn pack` resolves the workspace: protocol and honors each package's
# files field, producing a publishable tarball. `npm publish` then selects
# the correct auth automatically, matching how `changeset publish` behaves:
# - @spectrum-web-components/core -> OIDC trusted publishing
# - @adobe/spectrum-wc -> npm token (from ~/.npmrc)
PUBLISH_FLAGS="--tag $TAG --access public"
if [ "$DRY_RUN" == "true" ]; then
PUBLISH_FLAGS="$PUBLISH_FLAGS --dry-run"
echo "::notice::DRY RUN - packing only, no packages will be published to npm"
fi
yarn workspace @spectrum-web-components/core pack --out /tmp/swc-core.tgz
yarn workspace @adobe/spectrum-wc pack --out /tmp/swc-wc.tgz
npm publish /tmp/swc-core.tgz $PUBLISH_FLAGS
npm publish /tmp/swc-wc.tgz $PUBLISH_FLAGS

- name: Build React wrappers
if: needs.check-changesets.outputs.has_1st_gen_changesets == 'true'
if: needs.check-changesets.outputs.has_1st_gen_changesets == 'true' && steps.extract-tag.outputs.scope != '2nd-gen'
run: yarn workspace @spectrum-web-components/1st-gen build:react

- name: Publish React wrappers
if: needs.check-changesets.outputs.has_1st_gen_changesets == 'true'
if: needs.check-changesets.outputs.has_1st_gen_changesets == 'true' && steps.extract-tag.outputs.scope != '2nd-gen'
env:
TAG: ${{ steps.extract-tag.outputs.tag }}
run: |
Expand Down Expand Up @@ -236,6 +301,7 @@ jobs:
if: always()
env:
TAG: ${{ steps.extract-tag.outputs.tag }}
SCOPE: ${{ steps.extract-tag.outputs.scope }}
EVENT_NAME: ${{ github.event_name }}
PR_NUMBER: ${{ github.event.pull_request.number }}
PR_TITLE: ${{ github.event.pull_request.title }}
Expand Down Expand Up @@ -267,6 +333,7 @@ jobs:
echo "| **Trigger** | Manual dispatch |" >> $GITHUB_STEP_SUMMARY
echo "| **Branch** | \`${REF_NAME}\` |" >> $GITHUB_STEP_SUMMARY
echo "| **NPM tag** | \`${TAG}\` |" >> $GITHUB_STEP_SUMMARY
echo "| **Scope** | \`${SCOPE}\` |" >> $GITHUB_STEP_SUMMARY
echo "| **Actor** | @${ACTOR} |" >> $GITHUB_STEP_SUMMARY
else
echo "| Field | Value |" >> $GITHUB_STEP_SUMMARY
Expand Down
19 changes: 19 additions & 0 deletions 1st-gen/packages/accordion/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,24 @@
# Change Log

## 1.12.2-beta.0

### Patch Changes

- [#6268](https://github.com/adobe/spectrum-web-components/pull/6268) [`abe7cbd`](https://github.com/adobe/spectrum-web-components/commit/abe7cbdf7af837633e223ba033e08560111c95ce) Thanks [@rise-erpelding](https://github.com/rise-erpelding)! - **feat(accordion):** Add 2nd-gen `<swc-accordion>` and `<swc-accordion-item>` with Spectrum 2-oriented behavior. Key changes from 1st-gen `<sp-accordion>` / `<sp-accordion-item>`:
- Core `AccordionBase` / `AccordionItemBase` with public API: `allow-multiple`, `level`, `size`, `density`, `quiet`, host `disabled`, item `open` / `disabled`, slotted heading (`slot="label"`), optional `slot="actions"`, and cancellable `swc-accordion-item-toggle`
- APG-aligned accessibility: `<h*>` wrapping a native header `<button>`, `aria-expanded` / `aria-controls`, `role="region"` + `aria-labelledby`, closed panels use `aria-hidden="true"` plus CSS collapse (not HTML `hidden`; supports `calc-size()` height animation), disabled items use `aria-disabled` on the header and `inert` on the panel (no roving `tabindex` or arrow-key header navigation)
- Space on the header calls `preventDefault()` and toggles without scrolling overflow containers (SWC-1487)
- Controlled `open` is frozen while the host or item is disabled (imperative assignment cannot expand or collapse)

**chore(accordion):** Add Spectrum 2 deprecation warnings in dev mode on 1st-gen accordion for `label`, item `level`, and host `focus()`, with matching tests.

- Updated dependencies []:
- @spectrum-web-components/icon@1.12.2-beta.0
- @spectrum-web-components/icons-ui@1.12.2-beta.0
- @spectrum-web-components/base@1.12.2-beta.0
- @spectrum-web-components/reactive-controllers@1.12.2-beta.0
- @spectrum-web-components/shared@1.12.2-beta.0

## 1.12.1

### Patch Changes
Expand Down
12 changes: 6 additions & 6 deletions 1st-gen/packages/accordion/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@spectrum-web-components/accordion",
"version": "1.12.1",
"version": "1.12.2-beta.0",
"description": "",
"license": "Apache-2.0",
"author": "Adobe",
Expand Down Expand Up @@ -64,11 +64,11 @@
],
"types": "./src/index.d.ts",
"dependencies": {
"@spectrum-web-components/base": "1.12.1",
"@spectrum-web-components/icon": "1.12.1",
"@spectrum-web-components/icons-ui": "1.12.1",
"@spectrum-web-components/reactive-controllers": "1.12.1",
"@spectrum-web-components/shared": "1.12.1"
"@spectrum-web-components/base": "1.12.2-beta.0",
"@spectrum-web-components/icon": "1.12.2-beta.0",
"@spectrum-web-components/icons-ui": "1.12.2-beta.0",
"@spectrum-web-components/reactive-controllers": "1.12.2-beta.0",
"@spectrum-web-components/shared": "1.12.2-beta.0"
},
"keywords": [
"design-system",
Expand Down
12 changes: 12 additions & 0 deletions 1st-gen/packages/action-bar/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,17 @@
# Change Log

## 1.12.2-beta.0

### Patch Changes

- Updated dependencies []:
- @spectrum-web-components/action-group@1.12.2-beta.0
- @spectrum-web-components/popover@1.12.2-beta.0
- @spectrum-web-components/button@1.12.2-beta.0
- @spectrum-web-components/field-label@1.12.2-beta.0
- @spectrum-web-components/base@1.12.2-beta.0
- @spectrum-web-components/shared@1.12.2-beta.0

## 1.12.1

### Patch Changes
Expand Down
14 changes: 7 additions & 7 deletions 1st-gen/packages/action-bar/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@spectrum-web-components/action-bar",
"version": "1.12.1",
"version": "1.12.2-beta.0",
"description": "",
"license": "Apache-2.0",
"author": "Adobe",
Expand Down Expand Up @@ -54,12 +54,12 @@
],
"types": "./src/index.d.ts",
"dependencies": {
"@spectrum-web-components/action-group": "1.12.1",
"@spectrum-web-components/base": "1.12.1",
"@spectrum-web-components/button": "1.12.1",
"@spectrum-web-components/field-label": "1.12.1",
"@spectrum-web-components/popover": "1.12.1",
"@spectrum-web-components/shared": "1.12.1"
"@spectrum-web-components/action-group": "1.12.2-beta.0",
"@spectrum-web-components/base": "1.12.2-beta.0",
"@spectrum-web-components/button": "1.12.2-beta.0",
"@spectrum-web-components/field-label": "1.12.2-beta.0",
"@spectrum-web-components/popover": "1.12.2-beta.0",
"@spectrum-web-components/shared": "1.12.2-beta.0"
},
"keywords": [
"design-system",
Expand Down
Loading
Loading