From dc22055e98f22b1719bbf1d0b384cb77d2759f20 Mon Sep 17 00:00:00 2001 From: Elain T Date: Thu, 13 Jun 2024 15:41:08 -0600 Subject: [PATCH] feat(design): remove deprecated DaffButtonSetComponent from @daffodil/design (#2861) BREAKING CHANGE: DaffButtonSetComponent has been removed from @daffodil/design. You should add your own custom styling for groups of buttons. --- .../add-to-cart-notification.component.html | 2 +- .../add-to-cart-notification.module.ts | 2 - .../app/core/footer/footer.component.spec.ts | 2 - libs/design/README.md | 1 - .../design/src/molecules/button-set/README.md | 15 ----- .../button-set/button-set.component.scss | 27 --------- .../button-set/button-set.component.spec.ts | 55 ------------------- .../button-set/button-set.component.ts | 23 -------- .../molecules/button-set/button-set.module.ts | 13 ----- .../src/molecules/button-set/public_api.ts | 2 - libs/design/src/public_api.ts | 1 - 11 files changed, 1 insertion(+), 142 deletions(-) delete mode 100644 libs/design/src/molecules/button-set/README.md delete mode 100644 libs/design/src/molecules/button-set/button-set.component.scss delete mode 100644 libs/design/src/molecules/button-set/button-set.component.spec.ts delete mode 100644 libs/design/src/molecules/button-set/button-set.component.ts delete mode 100644 libs/design/src/molecules/button-set/button-set.module.ts delete mode 100644 libs/design/src/molecules/button-set/public_api.ts diff --git a/apps/demo/src/app/cart/components/add-to-cart-notification/components/add-to-cart-notification/add-to-cart-notification.component.html b/apps/demo/src/app/cart/components/add-to-cart-notification/components/add-to-cart-notification/add-to-cart-notification.component.html index 52cc53edfe..ca889e744c 100644 --- a/apps/demo/src/app/cart/components/add-to-cart-notification/components/add-to-cart-notification/add-to-cart-notification.component.html +++ b/apps/demo/src/app/cart/components/add-to-cart-notification/components/add-to-cart-notification/add-to-cart-notification.component.html @@ -10,7 +10,7 @@ -
+
diff --git a/apps/demo/src/app/cart/components/add-to-cart-notification/components/add-to-cart-notification/add-to-cart-notification.module.ts b/apps/demo/src/app/cart/components/add-to-cart-notification/components/add-to-cart-notification/add-to-cart-notification.module.ts index 83161935f3..b27b863917 100644 --- a/apps/demo/src/app/cart/components/add-to-cart-notification/components/add-to-cart-notification/add-to-cart-notification.module.ts +++ b/apps/demo/src/app/cart/components/add-to-cart-notification/components/add-to-cart-notification/add-to-cart-notification.module.ts @@ -2,7 +2,6 @@ import { CommonModule } from '@angular/common'; import { NgModule } from '@angular/core'; import { FontAwesomeModule } from '@fortawesome/angular-fontawesome'; -import { DaffButtonSetModule } from '@daffodil/design'; import { DaffButtonModule } from '@daffodil/design/button'; import { DaffLoadingIconModule } from '@daffodil/design/loading-icon'; @@ -18,7 +17,6 @@ import { ProductAddedModule } from '../product-added/product-added.module'; ProceedToCheckoutModule, ProductAddedModule, DaffLoadingIconModule, - DaffButtonSetModule, DaffButtonModule, FontAwesomeModule, ], diff --git a/apps/demo/src/app/core/footer/footer.component.spec.ts b/apps/demo/src/app/core/footer/footer.component.spec.ts index d04033604d..9d80b2c967 100644 --- a/apps/demo/src/app/core/footer/footer.component.spec.ts +++ b/apps/demo/src/app/core/footer/footer.component.spec.ts @@ -7,7 +7,6 @@ import { By } from '@angular/platform-browser'; import { RouterTestingModule } from '@angular/router/testing'; import { FontAwesomeModule } from '@fortawesome/angular-fontawesome'; -import { DaffButtonSetModule } from '@daffodil/design'; import { DaffContainerModule } from '@daffodil/design/container'; import { DaffListModule } from '@daffodil/design/list'; @@ -26,7 +25,6 @@ describe('FooterComponent', () => { RouterTestingModule, DaffContainerModule, DaffListModule, - DaffButtonSetModule, FontAwesomeModule, ], }) diff --git a/libs/design/README.md b/libs/design/README.md index 11bc0f635c..c6ce018f29 100644 --- a/libs/design/README.md +++ b/libs/design/README.md @@ -44,7 +44,6 @@ Refer to the [Upgrade Guide](./guides/upgrading.md). * [Accordion](./src/molecules/accordion/README.md) * [Article](./src/molecules/article/README.md) * [Backdrop](./src/molecules/backdrop/README.md) -* [Button Set](./src/molecules/button-set/README.md) * [Callout](./src/molecules/callout/README.md) * [Card](./src/molecules/card/README.md) * [Feature](./src/molecules/feature/README.md) diff --git a/libs/design/src/molecules/button-set/README.md b/libs/design/src/molecules/button-set/README.md deleted file mode 100644 index a8d420c548..0000000000 --- a/libs/design/src/molecules/button-set/README.md +++ /dev/null @@ -1,15 +0,0 @@ -# Button Set (deprecated) - -> The button set will be deprecated in v1.0.0 in favor of allowing endusers to determine how a set of buttons should be displayed. - -The button set component is used when there are two or more buttons grouped together in a row. - -## Usage - -``` - - - - - -``` diff --git a/libs/design/src/molecules/button-set/button-set.component.scss b/libs/design/src/molecules/button-set/button-set.component.scss deleted file mode 100644 index f456a57829..0000000000 --- a/libs/design/src/molecules/button-set/button-set.component.scss +++ /dev/null @@ -1,27 +0,0 @@ -@use '../../../scss/layout'; - -.daff-button-set { - display: flex; - flex-direction: column; - flex-wrap: wrap; - - @include layout.breakpoint(mobile) { - flex-direction: row; - } - - > * { - margin: 0 0 5px; - - &:last-child { - margin: 0; - } - - @include layout.breakpoint(mobile) { - margin: 0 5px 0 0; - - &:last-child { - margin: 0; - } - } - } -} diff --git a/libs/design/src/molecules/button-set/button-set.component.spec.ts b/libs/design/src/molecules/button-set/button-set.component.spec.ts deleted file mode 100644 index ca5402755a..0000000000 --- a/libs/design/src/molecules/button-set/button-set.component.spec.ts +++ /dev/null @@ -1,55 +0,0 @@ -import { - Component, - DebugElement, -} from '@angular/core'; -import { - waitForAsync, - ComponentFixture, - TestBed, -} from '@angular/core/testing'; -import { By } from '@angular/platform-browser'; - -import { DaffButtonSetComponent } from './button-set.component'; - -@Component ({ - template: ``, -}) - -class WrapperComponent {} - -describe('DaffButtonSetComponent', () => { - let fixture: ComponentFixture; - let de: DebugElement; - let wrapper: WrapperComponent; - let component: DaffButtonSetComponent; - - beforeEach(waitForAsync(() => { - TestBed.configureTestingModule({ - declarations: [ - DaffButtonSetComponent, - WrapperComponent, - ], - }) - .compileComponents(); - })); - - beforeEach(() => { - fixture = TestBed.createComponent(WrapperComponent); - wrapper = fixture.componentInstance; - de = fixture.debugElement.query(By.css('daff-button-set')); - component = de.componentInstance; - fixture.detectChanges(); - }); - - it('should create', () => { - expect(wrapper).toBeTruthy(); - }); - - describe('', () => { - it('should add a class of "daff-button-set" to the host element', () => { - expect(de.classes).toEqual(jasmine.objectContaining({ - 'daff-button-set': true, - })); - }); - }); -}); diff --git a/libs/design/src/molecules/button-set/button-set.component.ts b/libs/design/src/molecules/button-set/button-set.component.ts deleted file mode 100644 index 11ccdd0357..0000000000 --- a/libs/design/src/molecules/button-set/button-set.component.ts +++ /dev/null @@ -1,23 +0,0 @@ -import { - Component, - ViewEncapsulation, - HostBinding, - ChangeDetectionStrategy, -} from '@angular/core'; - -/** - * @deprecated in v1.0.0 - */ -@Component({ - selector: 'daff-button-set', - template: '', - styleUrls: ['./button-set.component.scss'], - encapsulation: ViewEncapsulation.None, - changeDetection: ChangeDetectionStrategy.OnPush, -}) -export class DaffButtonSetComponent { - /** - * @docs-private - */ - @HostBinding('class.daff-button-set') class = true; -} diff --git a/libs/design/src/molecules/button-set/button-set.module.ts b/libs/design/src/molecules/button-set/button-set.module.ts deleted file mode 100644 index 30ec4ff99b..0000000000 --- a/libs/design/src/molecules/button-set/button-set.module.ts +++ /dev/null @@ -1,13 +0,0 @@ -import { NgModule } from '@angular/core'; - -import { DaffButtonSetComponent } from './button-set.component'; - -@NgModule({ - declarations: [ - DaffButtonSetComponent, - ], - exports: [ - DaffButtonSetComponent, - ], -}) -export class DaffButtonSetModule { } diff --git a/libs/design/src/molecules/button-set/public_api.ts b/libs/design/src/molecules/button-set/public_api.ts deleted file mode 100644 index a3d7ea5d8b..0000000000 --- a/libs/design/src/molecules/button-set/public_api.ts +++ /dev/null @@ -1,2 +0,0 @@ -export * from './button-set.component'; -export { DaffButtonSetModule } from './button-set.module'; diff --git a/libs/design/src/public_api.ts b/libs/design/src/public_api.ts index 750b884566..f8b9657e00 100644 --- a/libs/design/src/public_api.ts +++ b/libs/design/src/public_api.ts @@ -15,7 +15,6 @@ export * from './atoms/form/radio/public_api'; export * from './atoms/form/form-label/public_api'; // Molecules -export * from './molecules/button-set/public_api'; export * from './molecules/image-gallery/public_api'; export * from './molecules/image-list/public_api'; export * from './molecules/qty-dropdown/public_api';