From 88e31ed3fe91721c52f06c241508ef31ae6fcba6 Mon Sep 17 00:00:00 2001 From: Elain T Date: Tue, 19 Dec 2023 10:04:57 -0600 Subject: [PATCH] feat(design)!: shard sidebar component (#2670) BREAKING CHANGE: `DaffSidebarModule` has moved to its own package. Update imports to `@daffodil/design/sidebar` --- .../core/sidebar/actions/sidebar.actions.ts | 2 +- .../sidebar-viewport.component.spec.ts | 2 +- .../sidebar-viewport.component.ts | 2 +- .../effects/sidebar-routing-mode.effects.ts | 18 +++--------------- .../helpers/computeDeepestSidebarMode.ts | 3 +-- .../src/app/core/sidebar/reducers/index.ts | 2 +- .../core/sidebar/reducers/sidebar.reducer.ts | 2 +- .../src/app/core/sidebar/sidebar.module.ts | 2 +- .../sidebar-viewport.component.spec.ts | 4 ++-- .../sidebar/sidebar.component.spec.ts | 6 +++--- .../containers/sidebar/sidebar.component.ts | 2 +- .../src/app/core/sidebar/sidebar.module.ts | 6 ++---- .../core/template/template/template.module.ts | 2 +- apps/design-land/src/app/app.module.ts | 2 +- .../sidebar-viewport.component.spec.ts | 2 +- .../sidebar-viewport.component.ts | 4 ++-- .../sidebar-viewport.module.ts | 6 ++---- libs/design/scss/theme.scss | 4 +--- .../{src/molecules => }/sidebar/README.md | 0 .../src/basic-sidebar/basic-sidebar.module.ts | 2 +- .../over-and-under-sidebars.module.ts | 2 +- .../side-fixed-sidebar.module.ts | 6 ++---- .../sidebar-with-sticky-content.module.ts | 6 ++---- libs/design/sidebar/ng-package.json | 9 +++++++++ .../animation/sidebar-animation-state.spec.ts | 0 .../src}/animation/sidebar-animation-state.ts | 0 .../src}/animation/sidebar-animation-width.ts | 0 .../src}/animation/sidebar-animation.ts | 0 .../sidebar-viewport-animation-state.ts | 4 ++-- .../src}/helper/_variables.scss | 0 .../src}/helper/sidebar-mode.ts | 0 .../src}/helper/sidebar-side.ts | 0 libs/design/sidebar/src/index.ts | 1 + .../sidebar => sidebar/src}/public_api.ts | 0 .../sidebar-footer.component.scss | 0 .../sidebar-footer.component.spec.ts | 0 .../sidebar-footer/sidebar-footer.component.ts | 0 .../sidebar-header-action.directive.spec.ts | 0 .../sidebar-header-action.directive.ts | 0 .../sidebar-header-title.directive.spec.ts | 0 .../sidebar-header-title.directive.ts | 0 .../sidebar-header.component.html | 0 .../sidebar-header.component.scss | 2 +- .../sidebar-header.component.spec.ts | 0 .../sidebar-header/sidebar-header.component.ts | 6 ------ .../sidebar => sidebar/src}/sidebar-theme.scss | 12 +++++++++++- .../helper/has-parent-viewport.ts | 0 .../src}/sidebar-viewport/nav-placement.ts | 0 .../scroll-token/scroll.token.ts | 0 .../sidebar-viewport.component.html | 0 .../sidebar-viewport.component.scss | 0 .../sidebar-viewport.component.spec.ts | 7 ++++--- .../sidebar-viewport.component.ts | 0 .../sidebar-viewport/specs/defaults.spec.ts | 3 ++- .../utils/backdrop-interactable.spec.ts | 0 .../utils/backdrop-interactable.ts | 0 .../sidebar-viewport/utils/content-pad.spec.ts | 0 .../src}/sidebar-viewport/utils/content-pad.ts | 0 .../utils/content-shift.spec.ts | 0 .../sidebar-viewport/utils/content-shift.ts | 0 .../utils/viewport-height.spec.ts | 0 .../sidebar-viewport/utils/viewport-height.ts | 0 .../sidebar => sidebar/src}/sidebar.module.ts | 3 ++- .../src}/sidebar/is-opening.ts | 0 .../src}/sidebar/sidebar.component.html | 0 .../src}/sidebar/sidebar.component.scss | 0 .../src}/sidebar/sidebar.component.spec.ts | 0 .../src}/sidebar/sidebar.component.ts | 5 +++-- .../sidebar-viewport-theme.scss | 16 ---------------- libs/design/src/public_api.ts | 1 - 70 files changed, 67 insertions(+), 89 deletions(-) rename libs/design/{src/molecules => }/sidebar/README.md (100%) create mode 100644 libs/design/sidebar/ng-package.json rename libs/design/{src/molecules/sidebar => sidebar/src}/animation/sidebar-animation-state.spec.ts (100%) rename libs/design/{src/molecules/sidebar => sidebar/src}/animation/sidebar-animation-state.ts (100%) rename libs/design/{src/molecules/sidebar => sidebar/src}/animation/sidebar-animation-width.ts (100%) rename libs/design/{src/molecules/sidebar => sidebar/src}/animation/sidebar-animation.ts (100%) rename libs/design/{src/molecules/sidebar => sidebar/src}/animation/sidebar-viewport-animation-state.ts (80%) rename libs/design/{src/molecules/sidebar => sidebar/src}/helper/_variables.scss (100%) rename libs/design/{src/molecules/sidebar => sidebar/src}/helper/sidebar-mode.ts (100%) rename libs/design/{src/molecules/sidebar => sidebar/src}/helper/sidebar-side.ts (100%) create mode 100644 libs/design/sidebar/src/index.ts rename libs/design/{src/molecules/sidebar => sidebar/src}/public_api.ts (100%) rename libs/design/{src/molecules/sidebar => sidebar/src}/sidebar-footer/sidebar-footer.component.scss (100%) rename libs/design/{src/molecules/sidebar => sidebar/src}/sidebar-footer/sidebar-footer.component.spec.ts (100%) rename libs/design/{src/molecules/sidebar => sidebar/src}/sidebar-footer/sidebar-footer.component.ts (100%) rename libs/design/{src/molecules/sidebar => sidebar/src}/sidebar-header/sidebar-header-action/sidebar-header-action.directive.spec.ts (100%) rename libs/design/{src/molecules/sidebar => sidebar/src}/sidebar-header/sidebar-header-action/sidebar-header-action.directive.ts (100%) rename libs/design/{src/molecules/sidebar => sidebar/src}/sidebar-header/sidebar-header-title/sidebar-header-title.directive.spec.ts (100%) rename libs/design/{src/molecules/sidebar => sidebar/src}/sidebar-header/sidebar-header-title/sidebar-header-title.directive.ts (100%) rename libs/design/{src/molecules/sidebar => sidebar/src}/sidebar-header/sidebar-header.component.html (100%) rename libs/design/{src/molecules/sidebar => sidebar/src}/sidebar-header/sidebar-header.component.scss (93%) rename libs/design/{src/molecules/sidebar => sidebar/src}/sidebar-header/sidebar-header.component.spec.ts (100%) rename libs/design/{src/molecules/sidebar => sidebar/src}/sidebar-header/sidebar-header.component.ts (78%) rename libs/design/{src/molecules/sidebar/sidebar => sidebar/src}/sidebar-theme.scss (63%) rename libs/design/{src/molecules/sidebar => sidebar/src}/sidebar-viewport/helper/has-parent-viewport.ts (100%) rename libs/design/{src/molecules/sidebar => sidebar/src}/sidebar-viewport/nav-placement.ts (100%) rename libs/design/{src/molecules/sidebar => sidebar/src}/sidebar-viewport/scroll-token/scroll.token.ts (100%) rename libs/design/{src/molecules/sidebar => sidebar/src}/sidebar-viewport/sidebar-viewport.component.html (100%) rename libs/design/{src/molecules/sidebar => sidebar/src}/sidebar-viewport/sidebar-viewport.component.scss (100%) rename libs/design/{src/molecules/sidebar => sidebar/src}/sidebar-viewport/sidebar-viewport.component.spec.ts (99%) rename libs/design/{src/molecules/sidebar => sidebar/src}/sidebar-viewport/sidebar-viewport.component.ts (100%) rename libs/design/{src/molecules/sidebar => sidebar/src}/sidebar-viewport/specs/defaults.spec.ts (95%) rename libs/design/{src/molecules/sidebar => sidebar/src}/sidebar-viewport/utils/backdrop-interactable.spec.ts (100%) rename libs/design/{src/molecules/sidebar => sidebar/src}/sidebar-viewport/utils/backdrop-interactable.ts (100%) rename libs/design/{src/molecules/sidebar => sidebar/src}/sidebar-viewport/utils/content-pad.spec.ts (100%) rename libs/design/{src/molecules/sidebar => sidebar/src}/sidebar-viewport/utils/content-pad.ts (100%) rename libs/design/{src/molecules/sidebar => sidebar/src}/sidebar-viewport/utils/content-shift.spec.ts (100%) rename libs/design/{src/molecules/sidebar => sidebar/src}/sidebar-viewport/utils/content-shift.ts (100%) rename libs/design/{src/molecules/sidebar => sidebar/src}/sidebar-viewport/utils/viewport-height.spec.ts (100%) rename libs/design/{src/molecules/sidebar => sidebar/src}/sidebar-viewport/utils/viewport-height.ts (100%) rename libs/design/{src/molecules/sidebar => sidebar/src}/sidebar.module.ts (95%) rename libs/design/{src/molecules/sidebar => sidebar/src}/sidebar/is-opening.ts (100%) rename libs/design/{src/molecules/sidebar => sidebar/src}/sidebar/sidebar.component.html (100%) rename libs/design/{src/molecules/sidebar => sidebar/src}/sidebar/sidebar.component.scss (100%) rename libs/design/{src/molecules/sidebar => sidebar/src}/sidebar/sidebar.component.spec.ts (100%) rename libs/design/{src/molecules/sidebar => sidebar/src}/sidebar/sidebar.component.ts (99%) delete mode 100644 libs/design/src/molecules/sidebar/sidebar-viewport/sidebar-viewport-theme.scss diff --git a/apps/daffio/src/app/core/sidebar/actions/sidebar.actions.ts b/apps/daffio/src/app/core/sidebar/actions/sidebar.actions.ts index fde854414e..948cf1ec26 100644 --- a/apps/daffio/src/app/core/sidebar/actions/sidebar.actions.ts +++ b/apps/daffio/src/app/core/sidebar/actions/sidebar.actions.ts @@ -1,6 +1,6 @@ import { Action } from '@ngrx/store'; -import { DaffSidebarMode } from '@daffodil/design'; +import { DaffSidebarMode } from '@daffodil/design/sidebar'; export enum SidebarActionTypes { ToggleSidebarAction = '[Daffio-Sidebar] Toggle Sidebar Action', diff --git a/apps/daffio/src/app/core/sidebar/containers/sidebar-viewport/sidebar-viewport.component.spec.ts b/apps/daffio/src/app/core/sidebar/containers/sidebar-viewport/sidebar-viewport.component.spec.ts index 5939d2fed5..0d633f1b50 100644 --- a/apps/daffio/src/app/core/sidebar/containers/sidebar-viewport/sidebar-viewport.component.spec.ts +++ b/apps/daffio/src/app/core/sidebar/containers/sidebar-viewport/sidebar-viewport.component.spec.ts @@ -19,7 +19,7 @@ import { DaffSidebarModule, DaffSidebarViewportComponent, DaffSidebarComponent, -} from '@daffodil/design'; +} from '@daffodil/design/sidebar'; import { DaffioSidebarViewportContainer } from './sidebar-viewport.component'; import { diff --git a/apps/daffio/src/app/core/sidebar/containers/sidebar-viewport/sidebar-viewport.component.ts b/apps/daffio/src/app/core/sidebar/containers/sidebar-viewport/sidebar-viewport.component.ts index 7567e6889d..8805c8ed8d 100644 --- a/apps/daffio/src/app/core/sidebar/containers/sidebar-viewport/sidebar-viewport.component.ts +++ b/apps/daffio/src/app/core/sidebar/containers/sidebar-viewport/sidebar-viewport.component.ts @@ -11,7 +11,7 @@ import { DaffioDoc } from 'apps/daffio/src/app/docs/models/doc'; import { DaffioDocsService } from 'apps/daffio/src/app/docs/services/docs.service'; import { Observable } from 'rxjs'; -import { DaffSidebarMode } from '@daffodil/design'; +import { DaffSidebarMode } from '@daffodil/design/sidebar'; import { DaffioGuideList } from '../../../../docs/models/guide-list'; import { diff --git a/apps/daffio/src/app/core/sidebar/effects/sidebar-routing-mode.effects.ts b/apps/daffio/src/app/core/sidebar/effects/sidebar-routing-mode.effects.ts index 286764f02a..7600b381c5 100644 --- a/apps/daffio/src/app/core/sidebar/effects/sidebar-routing-mode.effects.ts +++ b/apps/daffio/src/app/core/sidebar/effects/sidebar-routing-mode.effects.ts @@ -6,33 +6,22 @@ import { ofType, } from '@ngrx/effects'; import { - ROUTER_NAVIGATION, ROUTER_NAVIGATED, RouterNavigatedAction, } from '@ngrx/router-store'; import { Action } from '@ngrx/store'; import { Observable, - of, - asyncScheduler, combineLatest, } from 'rxjs'; -import { - switchMap, - delay, - map, - tap, -} from 'rxjs/operators'; +import { map } from 'rxjs/operators'; -import { - DaffBreakpoints, - DaffSidebarModeEnum, -} from '@daffodil/design'; +import { DaffBreakpoints } from '@daffodil/design'; +import { DaffSidebarModeEnum } from '@daffodil/design/sidebar'; import * as SidebarActions from '../actions/sidebar.actions'; import { computeDeepestSidebarMode } from '../helpers/computeDeepestSidebarMode'; - @Injectable() export class DaffioSidebarRoutingModeEffects { constructor( @@ -40,7 +29,6 @@ export class DaffioSidebarRoutingModeEffects { private breakpointsObserver: BreakpointObserver, ) { } - changeModeWhenVisitingConfiguredRoute$ = createEffect(() => (): Observable => combineLatest( this.actions$.pipe(ofType(ROUTER_NAVIGATED)), this.breakpointsObserver.observe(DaffBreakpoints.TABLET), diff --git a/apps/daffio/src/app/core/sidebar/helpers/computeDeepestSidebarMode.ts b/apps/daffio/src/app/core/sidebar/helpers/computeDeepestSidebarMode.ts index 5d0c4bf526..f021bbae87 100644 --- a/apps/daffio/src/app/core/sidebar/helpers/computeDeepestSidebarMode.ts +++ b/apps/daffio/src/app/core/sidebar/helpers/computeDeepestSidebarMode.ts @@ -1,7 +1,6 @@ import { ActivatedRouteSnapshot } from '@angular/router'; -import { DaffSidebarMode } from '@daffodil/design'; - +import { DaffSidebarMode } from '@daffodil/design/sidebar'; export const computeDeepestSidebarMode = (snapshot: ActivatedRouteSnapshot): DaffSidebarMode => { if(snapshot.firstChild){ diff --git a/apps/daffio/src/app/core/sidebar/reducers/index.ts b/apps/daffio/src/app/core/sidebar/reducers/index.ts index f7572ed99f..f903265d01 100644 --- a/apps/daffio/src/app/core/sidebar/reducers/index.ts +++ b/apps/daffio/src/app/core/sidebar/reducers/index.ts @@ -5,7 +5,7 @@ import { MemoizedSelector, } from '@ngrx/store'; -import { DaffSidebarMode } from '@daffodil/design'; +import { DaffSidebarMode } from '@daffodil/design/sidebar'; import * as fromDaffioSidebar from './sidebar.reducer'; diff --git a/apps/daffio/src/app/core/sidebar/reducers/sidebar.reducer.ts b/apps/daffio/src/app/core/sidebar/reducers/sidebar.reducer.ts index 76362820bf..512ee207f5 100644 --- a/apps/daffio/src/app/core/sidebar/reducers/sidebar.reducer.ts +++ b/apps/daffio/src/app/core/sidebar/reducers/sidebar.reducer.ts @@ -1,4 +1,4 @@ -import { DaffSidebarMode } from '@daffodil/design'; +import { DaffSidebarMode } from '@daffodil/design/sidebar'; import { SidebarActionTypes, diff --git a/apps/daffio/src/app/core/sidebar/sidebar.module.ts b/apps/daffio/src/app/core/sidebar/sidebar.module.ts index 00e7cdaf6a..ba4c3a7d7a 100644 --- a/apps/daffio/src/app/core/sidebar/sidebar.module.ts +++ b/apps/daffio/src/app/core/sidebar/sidebar.module.ts @@ -2,8 +2,8 @@ import { CommonModule } from '@angular/common'; import { NgModule } from '@angular/core'; import { RouterModule } from '@angular/router'; -import { DaffSidebarModule } from '@daffodil/design'; import { DaffButtonModule } from '@daffodil/design/button'; +import { DaffSidebarModule } from '@daffodil/design/sidebar'; import { DaffioSidebarViewportContainer } from './containers/sidebar-viewport/sidebar-viewport.component'; import { DaffioSidebarStateModule } from './sidebar.state.module'; diff --git a/apps/demo/src/app/core/sidebar/containers/sidebar-viewport/sidebar-viewport.component.spec.ts b/apps/demo/src/app/core/sidebar/containers/sidebar-viewport/sidebar-viewport.component.spec.ts index af3094927c..31d6798291 100644 --- a/apps/demo/src/app/core/sidebar/containers/sidebar-viewport/sidebar-viewport.component.spec.ts +++ b/apps/demo/src/app/core/sidebar/containers/sidebar-viewport/sidebar-viewport.component.spec.ts @@ -18,8 +18,8 @@ import { DaffSidebarModule, DaffSidebarSide, DaffSidebarViewportComponent, -} from '@daffodil/design'; -import { DaffSidebarMode } from '@daffodil/design'; + DaffSidebarMode, +} from '@daffodil/design/sidebar'; import { SidebarViewportContainer } from './sidebar-viewport.component'; import { diff --git a/apps/demo/src/app/core/sidebar/containers/sidebar/sidebar.component.spec.ts b/apps/demo/src/app/core/sidebar/containers/sidebar/sidebar.component.spec.ts index 749a69c55d..1dc601afc2 100644 --- a/apps/demo/src/app/core/sidebar/containers/sidebar/sidebar.component.spec.ts +++ b/apps/demo/src/app/core/sidebar/containers/sidebar/sidebar.component.spec.ts @@ -10,12 +10,12 @@ import { FontAwesomeModule } from '@fortawesome/angular-fontawesome'; import { provideMockStore } from '@ngrx/store/testing'; import { of } from 'rxjs'; +import { DaffLinkSetModule } from '@daffodil/design'; +import { DaffLoadingIconModule } from '@daffodil/design/loading-icon'; import { DaffSidebarModule, DaffSidebarComponent, - DaffLinkSetModule, -} from '@daffodil/design'; -import { DaffLoadingIconModule } from '@daffodil/design/loading-icon'; +} from '@daffodil/design/sidebar'; import { DaffNavigationTree } from '@daffodil/navigation'; import { DaffNavigationLoad } from '@daffodil/navigation/state'; import { diff --git a/apps/demo/src/app/core/sidebar/containers/sidebar/sidebar.component.ts b/apps/demo/src/app/core/sidebar/containers/sidebar/sidebar.component.ts index 7385beeb2c..fb7a5662a3 100644 --- a/apps/demo/src/app/core/sidebar/containers/sidebar/sidebar.component.ts +++ b/apps/demo/src/app/core/sidebar/containers/sidebar/sidebar.component.ts @@ -15,7 +15,7 @@ import { DaffSidebarSide, DaffSidebarMode, DaffSidebarComponent, -} from '@daffodil/design'; +} from '@daffodil/design/sidebar'; import { DaffNavigationTree } from '@daffodil/navigation'; import { DaffNavigationFacade, diff --git a/apps/demo/src/app/core/sidebar/sidebar.module.ts b/apps/demo/src/app/core/sidebar/sidebar.module.ts index 33f2670ef5..61f38fead8 100644 --- a/apps/demo/src/app/core/sidebar/sidebar.module.ts +++ b/apps/demo/src/app/core/sidebar/sidebar.module.ts @@ -3,11 +3,9 @@ import { NgModule } from '@angular/core'; import { RouterModule } from '@angular/router'; import { FontAwesomeModule } from '@fortawesome/angular-fontawesome'; -import { - DaffSidebarModule, - DaffLinkSetModule, -} from '@daffodil/design'; +import { DaffLinkSetModule } from '@daffodil/design'; import { DaffLoadingIconModule } from '@daffodil/design/loading-icon'; +import { DaffSidebarModule } from '@daffodil/design/sidebar'; import { DaffNavigationStateModule } from '@daffodil/navigation/state'; import { SidebarListComponent } from './components/sidebar-list/sidebar-list.component'; diff --git a/apps/demo/src/app/core/template/template/template.module.ts b/apps/demo/src/app/core/template/template/template.module.ts index 74437a8f48..c12e8b9d94 100644 --- a/apps/demo/src/app/core/template/template/template.module.ts +++ b/apps/demo/src/app/core/template/template/template.module.ts @@ -1,7 +1,7 @@ import { NgModule } from '@angular/core'; import { RouterModule } from '@angular/router'; -import { DaffSidebarModule } from '@daffodil/design'; +import { DaffSidebarModule } from '@daffodil/design/sidebar'; import { TemplateComponent } from './template.component'; import { NewsletterModule } from '../../../newsletter/newsletter.module'; diff --git a/apps/design-land/src/app/app.module.ts b/apps/design-land/src/app/app.module.ts index 4ed52bbd92..e2ac1c7103 100644 --- a/apps/design-land/src/app/app.module.ts +++ b/apps/design-land/src/app/app.module.ts @@ -5,13 +5,13 @@ import { BrowserAnimationsModule } from '@angular/platform-browser/animations'; import { FontAwesomeModule } from '@fortawesome/angular-fontawesome'; import { - DaffSidebarModule, DaffLinkSetModule, DAFF_THEME_INITIALIZER, DaffNavbarModule, } from '@daffodil/design'; import { DaffArticleModule } from '@daffodil/design/article'; import { DaffButtonModule } from '@daffodil/design/button'; +import { DaffSidebarModule } from '@daffodil/design/sidebar'; import { DaffThemeSwitchButtonModule } from '@daffodil/theme-switch'; import { DesignLandAppRoutingModule } from './app-routing.module'; diff --git a/apps/design-land/src/app/core/sidebar-viewport/sidebar-viewport.component.spec.ts b/apps/design-land/src/app/core/sidebar-viewport/sidebar-viewport.component.spec.ts index e45e24a77b..555845ba7c 100644 --- a/apps/design-land/src/app/core/sidebar-viewport/sidebar-viewport.component.spec.ts +++ b/apps/design-land/src/app/core/sidebar-viewport/sidebar-viewport.component.spec.ts @@ -13,7 +13,7 @@ import { DaffSidebarModule, DaffSidebarViewportComponent, DaffSidebarComponent, -} from '@daffodil/design'; +} from '@daffodil/design/sidebar'; import { DesignLandSidebarViewportComponent } from './sidebar-viewport.component'; diff --git a/apps/design-land/src/app/core/sidebar-viewport/sidebar-viewport.component.ts b/apps/design-land/src/app/core/sidebar-viewport/sidebar-viewport.component.ts index f9ec5a610e..fbf4ead7fd 100644 --- a/apps/design-land/src/app/core/sidebar-viewport/sidebar-viewport.component.ts +++ b/apps/design-land/src/app/core/sidebar-viewport/sidebar-viewport.component.ts @@ -10,11 +10,11 @@ import { Observable, } from 'rxjs'; +import { DaffBreakpoints } from '@daffodil/design'; import { - DaffBreakpoints, DaffSidebarMode, DaffSidebarModeEnum, -} from '@daffodil/design'; +} from '@daffodil/design/sidebar'; @Component({ selector: 'design-land-sidebar-viewport', diff --git a/apps/design-land/src/app/core/sidebar-viewport/sidebar-viewport.module.ts b/apps/design-land/src/app/core/sidebar-viewport/sidebar-viewport.module.ts index 428a5eef8e..c6aa912ceb 100644 --- a/apps/design-land/src/app/core/sidebar-viewport/sidebar-viewport.module.ts +++ b/apps/design-land/src/app/core/sidebar-viewport/sidebar-viewport.module.ts @@ -4,12 +4,10 @@ import { RouterModule } from '@angular/router'; import { FontAwesomeModule } from '@fortawesome/angular-fontawesome'; import { DaffLogoModule } from '@daffodil/branding'; -import { - DaffNavbarModule, - DaffSidebarModule, -} from '@daffodil/design'; +import { DaffNavbarModule } from '@daffodil/design'; import { DaffArticleModule } from '@daffodil/design/article'; import { DaffButtonModule } from '@daffodil/design/button'; +import { DaffSidebarModule } from '@daffodil/design/sidebar'; import { DaffThemeSwitchButtonModule } from '@daffodil/theme-switch'; import { DesignLandSidebarViewportComponent } from './sidebar-viewport.component'; diff --git a/libs/design/scss/theme.scss b/libs/design/scss/theme.scss index 5c70366e2d..2d535567f1 100644 --- a/libs/design/scss/theme.scss +++ b/libs/design/scss/theme.scss @@ -37,8 +37,7 @@ @use '../src/molecules/navbar/navbar-theme' as navbar; @use '../notification/src/notification-theme' as notification; @use '../src/molecules/paginator/paginator-theme' as paginator; -@use '../src/molecules/sidebar/sidebar/sidebar-theme' as sidebar; -@use '../src/molecules/sidebar/sidebar-viewport/sidebar-viewport-theme' as sidebar-viewport; +@use '../sidebar/src/sidebar-theme' as sidebar; @use '../scss/state/skeleton/mixins' as skeleton; @use '../tree/src/tree-theme' as tree; @@ -81,6 +80,5 @@ @include notification.daff-notification-theme($theme); @include paginator.daff-paginator-theme($theme); @include sidebar.daff-sidebar-theme($theme); - @include sidebar-viewport.daff-sidebar-viewport-theme($theme); @include tree.daff-tree-theme($theme); } diff --git a/libs/design/src/molecules/sidebar/README.md b/libs/design/sidebar/README.md similarity index 100% rename from libs/design/src/molecules/sidebar/README.md rename to libs/design/sidebar/README.md diff --git a/libs/design/sidebar/examples/src/basic-sidebar/basic-sidebar.module.ts b/libs/design/sidebar/examples/src/basic-sidebar/basic-sidebar.module.ts index 8f99ec5dfa..88bf7fdeca 100644 --- a/libs/design/sidebar/examples/src/basic-sidebar/basic-sidebar.module.ts +++ b/libs/design/sidebar/examples/src/basic-sidebar/basic-sidebar.module.ts @@ -1,10 +1,10 @@ import { NgModule } from '@angular/core'; import { - DaffSidebarModule, DaffNavbarModule, DaffLinkSetModule, } from '@daffodil/design'; +import { DaffSidebarModule } from '@daffodil/design/sidebar'; import { BasicSidebarComponent } from './basic-sidebar.component'; diff --git a/libs/design/sidebar/examples/src/over-and-under-sidebars/over-and-under-sidebars.module.ts b/libs/design/sidebar/examples/src/over-and-under-sidebars/over-and-under-sidebars.module.ts index 606d10845e..21ee4dd179 100644 --- a/libs/design/sidebar/examples/src/over-and-under-sidebars/over-and-under-sidebars.module.ts +++ b/libs/design/sidebar/examples/src/over-and-under-sidebars/over-and-under-sidebars.module.ts @@ -3,11 +3,11 @@ import { ReactiveFormsModule } from '@angular/forms'; import { FontAwesomeModule } from '@fortawesome/angular-fontawesome'; import { - DaffSidebarModule, DaffNavbarModule, DaffLinkSetModule, } from '@daffodil/design'; import { DaffButtonModule } from '@daffodil/design/button'; +import { DaffSidebarModule } from '@daffodil/design/sidebar'; import { OverandUnderSidebarsComponent } from './over-and-under-sidebars.component'; diff --git a/libs/design/sidebar/examples/src/side-fixed-sidebar/side-fixed-sidebar.module.ts b/libs/design/sidebar/examples/src/side-fixed-sidebar/side-fixed-sidebar.module.ts index 4217e13ea2..f23e6e4360 100644 --- a/libs/design/sidebar/examples/src/side-fixed-sidebar/side-fixed-sidebar.module.ts +++ b/libs/design/sidebar/examples/src/side-fixed-sidebar/side-fixed-sidebar.module.ts @@ -1,10 +1,8 @@ import { CommonModule } from '@angular/common'; import { NgModule } from '@angular/core'; -import { - DaffNavbarModule, - DaffSidebarModule, -} from '@daffodil/design'; +import { DaffNavbarModule } from '@daffodil/design'; +import { DaffSidebarModule } from '@daffodil/design/sidebar'; import { SideFixedSidebarComponent } from './side-fixed-sidebar.component'; diff --git a/libs/design/sidebar/examples/src/sidebar-with-sticky-content/sidebar-with-sticky-content.module.ts b/libs/design/sidebar/examples/src/sidebar-with-sticky-content/sidebar-with-sticky-content.module.ts index 76447dc951..8a6af7a8b1 100644 --- a/libs/design/sidebar/examples/src/sidebar-with-sticky-content/sidebar-with-sticky-content.module.ts +++ b/libs/design/sidebar/examples/src/sidebar-with-sticky-content/sidebar-with-sticky-content.module.ts @@ -1,9 +1,7 @@ import { NgModule } from '@angular/core'; -import { - DaffNavbarModule, - DaffSidebarModule, -} from '@daffodil/design'; +import { DaffNavbarModule } from '@daffodil/design'; +import { DaffSidebarModule } from '@daffodil/design/sidebar'; import { SidebarWithStickyContentComponent } from './sidebar-with-sticky-content.component'; diff --git a/libs/design/sidebar/ng-package.json b/libs/design/sidebar/ng-package.json new file mode 100644 index 0000000000..284851ebc1 --- /dev/null +++ b/libs/design/sidebar/ng-package.json @@ -0,0 +1,9 @@ +{ + "$schema": "../../../node_modules/ng-packagr/ng-package.schema.json", + "dest": "../../dist/design/sidebar", + "deleteDestPath": false, + "lib": { + "entryFile": "src/index.ts", + "styleIncludePaths": ["../src/scss"] + } +} \ No newline at end of file diff --git a/libs/design/src/molecules/sidebar/animation/sidebar-animation-state.spec.ts b/libs/design/sidebar/src/animation/sidebar-animation-state.spec.ts similarity index 100% rename from libs/design/src/molecules/sidebar/animation/sidebar-animation-state.spec.ts rename to libs/design/sidebar/src/animation/sidebar-animation-state.spec.ts diff --git a/libs/design/src/molecules/sidebar/animation/sidebar-animation-state.ts b/libs/design/sidebar/src/animation/sidebar-animation-state.ts similarity index 100% rename from libs/design/src/molecules/sidebar/animation/sidebar-animation-state.ts rename to libs/design/sidebar/src/animation/sidebar-animation-state.ts diff --git a/libs/design/src/molecules/sidebar/animation/sidebar-animation-width.ts b/libs/design/sidebar/src/animation/sidebar-animation-width.ts similarity index 100% rename from libs/design/src/molecules/sidebar/animation/sidebar-animation-width.ts rename to libs/design/sidebar/src/animation/sidebar-animation-width.ts diff --git a/libs/design/src/molecules/sidebar/animation/sidebar-animation.ts b/libs/design/sidebar/src/animation/sidebar-animation.ts similarity index 100% rename from libs/design/src/molecules/sidebar/animation/sidebar-animation.ts rename to libs/design/sidebar/src/animation/sidebar-animation.ts diff --git a/libs/design/src/molecules/sidebar/animation/sidebar-viewport-animation-state.ts b/libs/design/sidebar/src/animation/sidebar-viewport-animation-state.ts similarity index 80% rename from libs/design/src/molecules/sidebar/animation/sidebar-viewport-animation-state.ts rename to libs/design/sidebar/src/animation/sidebar-viewport-animation-state.ts index e2881e5cc7..9aead622c3 100644 --- a/libs/design/src/molecules/sidebar/animation/sidebar-viewport-animation-state.ts +++ b/libs/design/sidebar/src/animation/sidebar-viewport-animation-state.ts @@ -1,6 +1,6 @@ +import { AnimationStateWithParams } from '@daffodil/design'; + import { DaffSidebarAnimationStates } from './sidebar-animation'; -import { DaffSidebarAnimationState } from './sidebar-animation-state'; -import { AnimationStateWithParams } from '../../../core/public_api'; export type DaffSidebarViewportAnimationState = DaffSidebarAnimationStates.OPEN | DaffSidebarAnimationStates.CLOSED; diff --git a/libs/design/src/molecules/sidebar/helper/_variables.scss b/libs/design/sidebar/src/helper/_variables.scss similarity index 100% rename from libs/design/src/molecules/sidebar/helper/_variables.scss rename to libs/design/sidebar/src/helper/_variables.scss diff --git a/libs/design/src/molecules/sidebar/helper/sidebar-mode.ts b/libs/design/sidebar/src/helper/sidebar-mode.ts similarity index 100% rename from libs/design/src/molecules/sidebar/helper/sidebar-mode.ts rename to libs/design/sidebar/src/helper/sidebar-mode.ts diff --git a/libs/design/src/molecules/sidebar/helper/sidebar-side.ts b/libs/design/sidebar/src/helper/sidebar-side.ts similarity index 100% rename from libs/design/src/molecules/sidebar/helper/sidebar-side.ts rename to libs/design/sidebar/src/helper/sidebar-side.ts diff --git a/libs/design/sidebar/src/index.ts b/libs/design/sidebar/src/index.ts new file mode 100644 index 0000000000..4aaf8f92ed --- /dev/null +++ b/libs/design/sidebar/src/index.ts @@ -0,0 +1 @@ +export * from './public_api'; diff --git a/libs/design/src/molecules/sidebar/public_api.ts b/libs/design/sidebar/src/public_api.ts similarity index 100% rename from libs/design/src/molecules/sidebar/public_api.ts rename to libs/design/sidebar/src/public_api.ts diff --git a/libs/design/src/molecules/sidebar/sidebar-footer/sidebar-footer.component.scss b/libs/design/sidebar/src/sidebar-footer/sidebar-footer.component.scss similarity index 100% rename from libs/design/src/molecules/sidebar/sidebar-footer/sidebar-footer.component.scss rename to libs/design/sidebar/src/sidebar-footer/sidebar-footer.component.scss diff --git a/libs/design/src/molecules/sidebar/sidebar-footer/sidebar-footer.component.spec.ts b/libs/design/sidebar/src/sidebar-footer/sidebar-footer.component.spec.ts similarity index 100% rename from libs/design/src/molecules/sidebar/sidebar-footer/sidebar-footer.component.spec.ts rename to libs/design/sidebar/src/sidebar-footer/sidebar-footer.component.spec.ts diff --git a/libs/design/src/molecules/sidebar/sidebar-footer/sidebar-footer.component.ts b/libs/design/sidebar/src/sidebar-footer/sidebar-footer.component.ts similarity index 100% rename from libs/design/src/molecules/sidebar/sidebar-footer/sidebar-footer.component.ts rename to libs/design/sidebar/src/sidebar-footer/sidebar-footer.component.ts diff --git a/libs/design/src/molecules/sidebar/sidebar-header/sidebar-header-action/sidebar-header-action.directive.spec.ts b/libs/design/sidebar/src/sidebar-header/sidebar-header-action/sidebar-header-action.directive.spec.ts similarity index 100% rename from libs/design/src/molecules/sidebar/sidebar-header/sidebar-header-action/sidebar-header-action.directive.spec.ts rename to libs/design/sidebar/src/sidebar-header/sidebar-header-action/sidebar-header-action.directive.spec.ts diff --git a/libs/design/src/molecules/sidebar/sidebar-header/sidebar-header-action/sidebar-header-action.directive.ts b/libs/design/sidebar/src/sidebar-header/sidebar-header-action/sidebar-header-action.directive.ts similarity index 100% rename from libs/design/src/molecules/sidebar/sidebar-header/sidebar-header-action/sidebar-header-action.directive.ts rename to libs/design/sidebar/src/sidebar-header/sidebar-header-action/sidebar-header-action.directive.ts diff --git a/libs/design/src/molecules/sidebar/sidebar-header/sidebar-header-title/sidebar-header-title.directive.spec.ts b/libs/design/sidebar/src/sidebar-header/sidebar-header-title/sidebar-header-title.directive.spec.ts similarity index 100% rename from libs/design/src/molecules/sidebar/sidebar-header/sidebar-header-title/sidebar-header-title.directive.spec.ts rename to libs/design/sidebar/src/sidebar-header/sidebar-header-title/sidebar-header-title.directive.spec.ts diff --git a/libs/design/src/molecules/sidebar/sidebar-header/sidebar-header-title/sidebar-header-title.directive.ts b/libs/design/sidebar/src/sidebar-header/sidebar-header-title/sidebar-header-title.directive.ts similarity index 100% rename from libs/design/src/molecules/sidebar/sidebar-header/sidebar-header-title/sidebar-header-title.directive.ts rename to libs/design/sidebar/src/sidebar-header/sidebar-header-title/sidebar-header-title.directive.ts diff --git a/libs/design/src/molecules/sidebar/sidebar-header/sidebar-header.component.html b/libs/design/sidebar/src/sidebar-header/sidebar-header.component.html similarity index 100% rename from libs/design/src/molecules/sidebar/sidebar-header/sidebar-header.component.html rename to libs/design/sidebar/src/sidebar-header/sidebar-header.component.html diff --git a/libs/design/src/molecules/sidebar/sidebar-header/sidebar-header.component.scss b/libs/design/sidebar/src/sidebar-header/sidebar-header.component.scss similarity index 93% rename from libs/design/src/molecules/sidebar/sidebar-header/sidebar-header.component.scss rename to libs/design/sidebar/src/sidebar-header/sidebar-header.component.scss index 52d9774d90..5448d09318 100644 --- a/libs/design/src/molecules/sidebar/sidebar-header/sidebar-header.component.scss +++ b/libs/design/sidebar/src/sidebar-header/sidebar-header.component.scss @@ -1,4 +1,4 @@ -@use '../../../../scss/typography' as t; +@use '../../../scss/typography' as t; .daff-sidebar-header { display: flex; diff --git a/libs/design/src/molecules/sidebar/sidebar-header/sidebar-header.component.spec.ts b/libs/design/sidebar/src/sidebar-header/sidebar-header.component.spec.ts similarity index 100% rename from libs/design/src/molecules/sidebar/sidebar-header/sidebar-header.component.spec.ts rename to libs/design/sidebar/src/sidebar-header/sidebar-header.component.spec.ts diff --git a/libs/design/src/molecules/sidebar/sidebar-header/sidebar-header.component.ts b/libs/design/sidebar/src/sidebar-header/sidebar-header.component.ts similarity index 78% rename from libs/design/src/molecules/sidebar/sidebar-header/sidebar-header.component.ts rename to libs/design/sidebar/src/sidebar-header/sidebar-header.component.ts index 58c7d09280..83a7949b7d 100644 --- a/libs/design/src/molecules/sidebar/sidebar-header/sidebar-header.component.ts +++ b/libs/design/sidebar/src/sidebar-header/sidebar-header.component.ts @@ -2,14 +2,8 @@ import { Component, HostBinding, ChangeDetectionStrategy, - Output, - EventEmitter, - Input, ViewEncapsulation, - ContentChild, - ElementRef, } from '@angular/core'; -import { faTimes } from '@fortawesome/free-solid-svg-icons'; @Component({ selector: 'daff-sidebar-header', diff --git a/libs/design/src/molecules/sidebar/sidebar/sidebar-theme.scss b/libs/design/sidebar/src/sidebar-theme.scss similarity index 63% rename from libs/design/src/molecules/sidebar/sidebar/sidebar-theme.scss rename to libs/design/sidebar/src/sidebar-theme.scss index 2f6677d9cd..b8c5f9d81a 100644 --- a/libs/design/src/molecules/sidebar/sidebar/sidebar-theme.scss +++ b/libs/design/sidebar/src/sidebar-theme.scss @@ -1,4 +1,4 @@ -@use '../../../../scss/core'; +@use '../../scss/core'; @mixin daff-sidebar-theme($theme) { $base: core.daff-map-deep-get($theme, 'core.base'); @@ -9,4 +9,14 @@ background: $base; color: $font-color; } + + .daff-sidebar-viewport { + background: $base; + color: $base-contrast; + + &__content { + background: $base; + color: $base-contrast; + } + } } diff --git a/libs/design/src/molecules/sidebar/sidebar-viewport/helper/has-parent-viewport.ts b/libs/design/sidebar/src/sidebar-viewport/helper/has-parent-viewport.ts similarity index 100% rename from libs/design/src/molecules/sidebar/sidebar-viewport/helper/has-parent-viewport.ts rename to libs/design/sidebar/src/sidebar-viewport/helper/has-parent-viewport.ts diff --git a/libs/design/src/molecules/sidebar/sidebar-viewport/nav-placement.ts b/libs/design/sidebar/src/sidebar-viewport/nav-placement.ts similarity index 100% rename from libs/design/src/molecules/sidebar/sidebar-viewport/nav-placement.ts rename to libs/design/sidebar/src/sidebar-viewport/nav-placement.ts diff --git a/libs/design/src/molecules/sidebar/sidebar-viewport/scroll-token/scroll.token.ts b/libs/design/sidebar/src/sidebar-viewport/scroll-token/scroll.token.ts similarity index 100% rename from libs/design/src/molecules/sidebar/sidebar-viewport/scroll-token/scroll.token.ts rename to libs/design/sidebar/src/sidebar-viewport/scroll-token/scroll.token.ts diff --git a/libs/design/src/molecules/sidebar/sidebar-viewport/sidebar-viewport.component.html b/libs/design/sidebar/src/sidebar-viewport/sidebar-viewport.component.html similarity index 100% rename from libs/design/src/molecules/sidebar/sidebar-viewport/sidebar-viewport.component.html rename to libs/design/sidebar/src/sidebar-viewport/sidebar-viewport.component.html diff --git a/libs/design/src/molecules/sidebar/sidebar-viewport/sidebar-viewport.component.scss b/libs/design/sidebar/src/sidebar-viewport/sidebar-viewport.component.scss similarity index 100% rename from libs/design/src/molecules/sidebar/sidebar-viewport/sidebar-viewport.component.scss rename to libs/design/sidebar/src/sidebar-viewport/sidebar-viewport.component.scss diff --git a/libs/design/src/molecules/sidebar/sidebar-viewport/sidebar-viewport.component.spec.ts b/libs/design/sidebar/src/sidebar-viewport/sidebar-viewport.component.spec.ts similarity index 99% rename from libs/design/src/molecules/sidebar/sidebar-viewport/sidebar-viewport.component.spec.ts rename to libs/design/sidebar/src/sidebar-viewport/sidebar-viewport.component.spec.ts index e3db70f728..4f15830c44 100644 --- a/libs/design/src/molecules/sidebar/sidebar-viewport/sidebar-viewport.component.spec.ts +++ b/libs/design/sidebar/src/sidebar-viewport/sidebar-viewport.component.spec.ts @@ -12,12 +12,13 @@ import { import { By } from '@angular/platform-browser'; import { NoopAnimationsModule } from '@angular/platform-browser/animations'; -import { DaffNavPlacement } from './nav-placement'; -import { DaffSidebarViewportComponent } from './sidebar-viewport.component'; import { DaffBackdropComponent, DaffBackdropModule, -} from '../../backdrop/public_api'; +} from '@daffodil/design'; + +import { DaffNavPlacement } from './nav-placement'; +import { DaffSidebarViewportComponent } from './sidebar-viewport.component'; import { DaffSidebarComponent } from '../sidebar/sidebar.component'; @Component({ template: ` diff --git a/libs/design/src/molecules/sidebar/sidebar-viewport/sidebar-viewport.component.ts b/libs/design/sidebar/src/sidebar-viewport/sidebar-viewport.component.ts similarity index 100% rename from libs/design/src/molecules/sidebar/sidebar-viewport/sidebar-viewport.component.ts rename to libs/design/sidebar/src/sidebar-viewport/sidebar-viewport.component.ts diff --git a/libs/design/src/molecules/sidebar/sidebar-viewport/specs/defaults.spec.ts b/libs/design/sidebar/src/sidebar-viewport/specs/defaults.spec.ts similarity index 95% rename from libs/design/src/molecules/sidebar/sidebar-viewport/specs/defaults.spec.ts rename to libs/design/sidebar/src/sidebar-viewport/specs/defaults.spec.ts index c6e9abe574..668110b44b 100644 --- a/libs/design/src/molecules/sidebar/sidebar-viewport/specs/defaults.spec.ts +++ b/libs/design/sidebar/src/sidebar-viewport/specs/defaults.spec.ts @@ -6,8 +6,9 @@ import { } from '@angular/core/testing'; import { NoopAnimationsModule } from '@angular/platform-browser/animations'; +import { DaffBackdropModule } from '@daffodil/design'; + import { DaffSidebarViewportComponent } from './../sidebar-viewport.component'; -import { DaffBackdropModule } from '../../../backdrop/public_api'; import { DaffSidebarAnimationStates } from '../../animation/sidebar-animation'; import { DaffSidebarComponent } from '../../sidebar/sidebar.component'; diff --git a/libs/design/src/molecules/sidebar/sidebar-viewport/utils/backdrop-interactable.spec.ts b/libs/design/sidebar/src/sidebar-viewport/utils/backdrop-interactable.spec.ts similarity index 100% rename from libs/design/src/molecules/sidebar/sidebar-viewport/utils/backdrop-interactable.spec.ts rename to libs/design/sidebar/src/sidebar-viewport/utils/backdrop-interactable.spec.ts diff --git a/libs/design/src/molecules/sidebar/sidebar-viewport/utils/backdrop-interactable.ts b/libs/design/sidebar/src/sidebar-viewport/utils/backdrop-interactable.ts similarity index 100% rename from libs/design/src/molecules/sidebar/sidebar-viewport/utils/backdrop-interactable.ts rename to libs/design/sidebar/src/sidebar-viewport/utils/backdrop-interactable.ts diff --git a/libs/design/src/molecules/sidebar/sidebar-viewport/utils/content-pad.spec.ts b/libs/design/sidebar/src/sidebar-viewport/utils/content-pad.spec.ts similarity index 100% rename from libs/design/src/molecules/sidebar/sidebar-viewport/utils/content-pad.spec.ts rename to libs/design/sidebar/src/sidebar-viewport/utils/content-pad.spec.ts diff --git a/libs/design/src/molecules/sidebar/sidebar-viewport/utils/content-pad.ts b/libs/design/sidebar/src/sidebar-viewport/utils/content-pad.ts similarity index 100% rename from libs/design/src/molecules/sidebar/sidebar-viewport/utils/content-pad.ts rename to libs/design/sidebar/src/sidebar-viewport/utils/content-pad.ts diff --git a/libs/design/src/molecules/sidebar/sidebar-viewport/utils/content-shift.spec.ts b/libs/design/sidebar/src/sidebar-viewport/utils/content-shift.spec.ts similarity index 100% rename from libs/design/src/molecules/sidebar/sidebar-viewport/utils/content-shift.spec.ts rename to libs/design/sidebar/src/sidebar-viewport/utils/content-shift.spec.ts diff --git a/libs/design/src/molecules/sidebar/sidebar-viewport/utils/content-shift.ts b/libs/design/sidebar/src/sidebar-viewport/utils/content-shift.ts similarity index 100% rename from libs/design/src/molecules/sidebar/sidebar-viewport/utils/content-shift.ts rename to libs/design/sidebar/src/sidebar-viewport/utils/content-shift.ts diff --git a/libs/design/src/molecules/sidebar/sidebar-viewport/utils/viewport-height.spec.ts b/libs/design/sidebar/src/sidebar-viewport/utils/viewport-height.spec.ts similarity index 100% rename from libs/design/src/molecules/sidebar/sidebar-viewport/utils/viewport-height.spec.ts rename to libs/design/sidebar/src/sidebar-viewport/utils/viewport-height.spec.ts diff --git a/libs/design/src/molecules/sidebar/sidebar-viewport/utils/viewport-height.ts b/libs/design/sidebar/src/sidebar-viewport/utils/viewport-height.ts similarity index 100% rename from libs/design/src/molecules/sidebar/sidebar-viewport/utils/viewport-height.ts rename to libs/design/sidebar/src/sidebar-viewport/utils/viewport-height.ts diff --git a/libs/design/src/molecules/sidebar/sidebar.module.ts b/libs/design/sidebar/src/sidebar.module.ts similarity index 95% rename from libs/design/src/molecules/sidebar/sidebar.module.ts rename to libs/design/sidebar/src/sidebar.module.ts index d4f234e545..052c20a1f0 100644 --- a/libs/design/src/molecules/sidebar/sidebar.module.ts +++ b/libs/design/sidebar/src/sidebar.module.ts @@ -2,13 +2,14 @@ import { A11yModule } from '@angular/cdk/a11y'; import { CommonModule } from '@angular/common'; import { NgModule } from '@angular/core'; +import { DaffBackdropModule } from '@daffodil/design'; + import { DaffSidebarComponent } from './sidebar/sidebar.component'; import { DaffSidebarFooterComponent } from './sidebar-footer/sidebar-footer.component'; import { DaffSidebarHeaderActionDirective } from './sidebar-header/sidebar-header-action/sidebar-header-action.directive'; import { DaffSidebarHeaderTitleDirective } from './sidebar-header/sidebar-header-title/sidebar-header-title.directive'; import { DaffSidebarHeaderComponent } from './sidebar-header/sidebar-header.component'; import { DaffSidebarViewportComponent } from './sidebar-viewport/sidebar-viewport.component'; -import { DaffBackdropModule } from '../backdrop/backdrop.module'; @NgModule({ imports: [ diff --git a/libs/design/src/molecules/sidebar/sidebar/is-opening.ts b/libs/design/sidebar/src/sidebar/is-opening.ts similarity index 100% rename from libs/design/src/molecules/sidebar/sidebar/is-opening.ts rename to libs/design/sidebar/src/sidebar/is-opening.ts diff --git a/libs/design/src/molecules/sidebar/sidebar/sidebar.component.html b/libs/design/sidebar/src/sidebar/sidebar.component.html similarity index 100% rename from libs/design/src/molecules/sidebar/sidebar/sidebar.component.html rename to libs/design/sidebar/src/sidebar/sidebar.component.html diff --git a/libs/design/src/molecules/sidebar/sidebar/sidebar.component.scss b/libs/design/sidebar/src/sidebar/sidebar.component.scss similarity index 100% rename from libs/design/src/molecules/sidebar/sidebar/sidebar.component.scss rename to libs/design/sidebar/src/sidebar/sidebar.component.scss diff --git a/libs/design/src/molecules/sidebar/sidebar/sidebar.component.spec.ts b/libs/design/sidebar/src/sidebar/sidebar.component.spec.ts similarity index 100% rename from libs/design/src/molecules/sidebar/sidebar/sidebar.component.spec.ts rename to libs/design/sidebar/src/sidebar/sidebar.component.spec.ts diff --git a/libs/design/src/molecules/sidebar/sidebar/sidebar.component.ts b/libs/design/sidebar/src/sidebar/sidebar.component.ts similarity index 99% rename from libs/design/src/molecules/sidebar/sidebar/sidebar.component.ts rename to libs/design/sidebar/src/sidebar/sidebar.component.ts index e2607a8861..f7fd760f00 100644 --- a/libs/design/src/molecules/sidebar/sidebar/sidebar.component.ts +++ b/libs/design/sidebar/src/sidebar/sidebar.component.ts @@ -19,11 +19,12 @@ import { import { fromEvent } from 'rxjs'; import { filter } from 'rxjs/operators'; -import { isOpening } from './is-opening'; import { daffFocusableElementsSelector, DaffFocusStackService, -} from '../../../core/focus/public_api'; +} from '@daffodil/design'; + +import { isOpening } from './is-opening'; import { daffSidebarAnimations } from '../animation/sidebar-animation'; import { DaffSidebarAnimationState, diff --git a/libs/design/src/molecules/sidebar/sidebar-viewport/sidebar-viewport-theme.scss b/libs/design/src/molecules/sidebar/sidebar-viewport/sidebar-viewport-theme.scss deleted file mode 100644 index 46c43a179d..0000000000 --- a/libs/design/src/molecules/sidebar/sidebar-viewport/sidebar-viewport-theme.scss +++ /dev/null @@ -1,16 +0,0 @@ -@use '../../../../scss/core'; - -@mixin daff-sidebar-viewport-theme($theme) { - $base: core.daff-map-deep-get($theme, 'core.base'); - $base-contrast: core.daff-map-deep-get($theme, "core.base-contrast"); - - .daff-sidebar-viewport { - background: $base; - color: $base-contrast; - - &__content { - background: $base; - color: $base-contrast; - } - } -} diff --git a/libs/design/src/public_api.ts b/libs/design/src/public_api.ts index 34852d1374..3aeb92dfb3 100644 --- a/libs/design/src/public_api.ts +++ b/libs/design/src/public_api.ts @@ -27,7 +27,6 @@ export * from './molecules/modal/public_api'; export * from './molecules/navbar/public_api'; export * from './molecules/paginator/public_api'; export * from './molecules/qty-dropdown/public_api'; -export * from './molecules/sidebar/public_api'; export * from './molecules/hero/public_api'; export * from './molecules/feature/public_api'; export * from './molecules/card/public_api';