diff --git a/packages/badge/src/Badge.ts b/packages/badge/src/Badge.ts index 5f3cda8bc4..c107a02d7a 100644 --- a/packages/badge/src/Badge.ts +++ b/packages/badge/src/Badge.ts @@ -46,17 +46,14 @@ export const BADGE_VARIANTS = [ 'cyan', 'blue', ] as const; -export type BadgeVariant = typeof BADGE_VARIANTS[number]; -export const FIXED_VALUES_DEPRECATED = ['top', 'bottom', 'left', 'right']; +export type BadgeVariant = (typeof BADGE_VARIANTS)[number]; export const FIXED_VALUES = [ 'inline-start', 'inline-end', 'block-start', 'block-end', ] as const; -export type FixedValues = - | typeof FIXED_VALUES[number] - | typeof FIXED_VALUES_DEPRECATED[number]; +export type FixedValues = (typeof FIXED_VALUES)[number]; /** * @element sp-badge @@ -82,18 +79,6 @@ export class Badge extends SizedMixin( public set fixed(fixed: FixedValues | undefined) { if (fixed === this.fixed) return; const oldValue = this.fixed; - if (window.__swc.DEBUG) { - if (fixed && FIXED_VALUES_DEPRECATED.includes(fixed)) { - window.__swc.warn( - this, - `The following values for "fixed" in <${this.localName}> have been deprecated. They will be removed in a future release.`, - 'https://opensource.adobe.com/spectrum-web-components/components/badge/#fixed', - { - issues: [...FIXED_VALUES_DEPRECATED], - } - ); - } - } this._fixed = fixed; if (fixed) { this.setAttribute('fixed', fixed); diff --git a/packages/badge/src/badge.css b/packages/badge/src/badge.css index 371e03c297..d974407ca3 100644 --- a/packages/badge/src/badge.css +++ b/packages/badge/src/badge.css @@ -18,28 +18,6 @@ governing permissions and limitations under the License. align-items: center; } -/* Marked as deprecated, remove in a future release */ - -:host([fixed='left']) { - border-end-start-radius: 0; - border-start-start-radius: 0; /* .spectrum-Badge--fixed-inline-start */ -} - -:host([fixed='right']) { - border-end-end-radius: 0; - border-start-end-radius: 0; /* .spectrum-Badge--fixed-inline-end */ -} - -:host([fixed='top']) { - border-start-end-radius: 0; - border-start-start-radius: 0; /* .spectrum-Badge--fixed-block-start */ -} - -:host([fixed='bottom']) { - border-end-end-radius: 0; - border-end-start-radius: 0; /* .spectrum-Badge--fixed-block-end */ -} - /* cascade badge's size to its icon */ :host([size='xs']) { diff --git a/packages/badge/test/badge.test.ts b/packages/badge/test/badge.test.ts index 95e098899f..6ff770e187 100644 --- a/packages/badge/test/badge.test.ts +++ b/packages/badge/test/badge.test.ts @@ -21,23 +21,19 @@ import { testForLitDevWarnings } from '../../../test/testing-helpers.js'; describe('Badge', () => { testForLitDevWarnings( async () => - await fixture( - html` - - - Icon and label - - ` - ) + await fixture(html` + + + Icon and label + + `) ); it('manages `fixed` attribute', async () => { - const el = await fixture( - html` - Label only - ` - ); + const el = await fixture(html` + Label only + `); expect(el.fixed).to.be.undefined; @@ -76,16 +72,14 @@ describe('Badge', () => { }); it('loads default badge accessibly', async () => { - const el = await fixture( - html` - - - Icon and label - - ` - ); + const el = await fixture(html` + + + Icon and label + + `); await elementUpdated(el); @@ -93,16 +87,14 @@ describe('Badge', () => { expect(consoleWarnStub.called).to.be.false; }); it('warns in Dev Mode when sent an incorrect `variant`', async () => { - const el = await fixture( - html` - - - Icon and label - - ` - ); + const el = await fixture(html` + + + Icon and label + + `); await elementUpdated(el); @@ -120,33 +112,5 @@ describe('Badge', () => { }, }); }); - it('warns in Dev Mode when sent a deprecated value for `fixed`', async () => { - const el = await fixture( - html` - - - Icon and label - - ` - ); - - await elementUpdated(el); - - expect(consoleWarnStub.called).to.be.true; - const spyCall = consoleWarnStub.getCall(0); - expect( - (spyCall.args.at(0) as string).includes('"fixed"'), - 'confirm fixed-centric message' - ).to.be.true; - expect(spyCall.args.at(-1), 'confirm `data` shape').to.deep.equal({ - data: { - localName: 'sp-badge', - type: 'api', - level: 'default', - }, - }); - }); }); });