Skip to content

Commit

Permalink
feat(design)!: shard navbar component (#2700)
Browse files Browse the repository at this point in the history
BREAKING CHANGE: `DaffNavbarModule` has moved to its own package. Update imports to `@daffodil/design/navbar`
  • Loading branch information
xelaint committed Jan 2, 2024
1 parent 8b355a1 commit de9ae3e
Show file tree
Hide file tree
Showing 26 changed files with 35 additions and 27 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ import { CommonModule } from '@angular/common';
import { NgModule } from '@angular/core';
import { RouterModule } from '@angular/router';

import { DaffNavbarModule } from '@daffodil/design';
import { DaffContainerModule } from '@daffodil/design/container';
import { DaffNavbarModule } from '@daffodil/design/navbar';

import { DaffioHeaderComponent } from './header/header.component';
import { DaffioHeaderItemDirective } from './header-item/header-item.directive';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ import {
} from '@angular/core/testing';
import { By } from '@angular/platform-browser';

import { DaffNavbarModule } from '@daffodil/design';
import { DaffContainerModule } from '@daffodil/design/container';
import { DaffNavbarModule } from '@daffodil/design/navbar';

import { DaffioHeaderComponent } from './header.component';

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import { By } from '@angular/platform-browser';
import { Router } from '@angular/router';
import { RouterTestingModule } from '@angular/router/testing';

import { DaffNavbarModule } from '@daffodil/design';
import { DaffNavbarModule } from '@daffodil/design/navbar';

import { DemoHeaderComponent } from './header.component';

Expand Down
2 changes: 1 addition & 1 deletion apps/demo/src/app/core/header/header.module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ import { NgModule } from '@angular/core';
import { RouterModule } from '@angular/router';
import { FontAwesomeModule } from '@fortawesome/angular-fontawesome';

import { DaffNavbarModule } from '@daffodil/design';
import { DaffButtonModule } from '@daffodil/design/button';
import { DaffNavbarModule } from '@daffodil/design/navbar';

import { DemoHeaderComponent } from './components/header/header.component';
import { DemoHeaderContainer } from './containers/header/header.component';
Expand Down
6 changes: 2 additions & 4 deletions apps/design-land/src/app/app.module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,11 @@ import { BrowserModule } from '@angular/platform-browser';
import { BrowserAnimationsModule } from '@angular/platform-browser/animations';
import { FontAwesomeModule } from '@fortawesome/angular-fontawesome';

import {
DAFF_THEME_INITIALIZER,
DaffNavbarModule,
} from '@daffodil/design';
import { DAFF_THEME_INITIALIZER } from '@daffodil/design';
import { DaffArticleModule } from '@daffodil/design/article';
import { DaffButtonModule } from '@daffodil/design/button';
import { DaffLinkSetModule } from '@daffodil/design/link-set';
import { DaffNavbarModule } from '@daffodil/design/navbar';
import { DaffSidebarModule } from '@daffodil/design/sidebar';
import { DaffThemeSwitchButtonModule } from '@daffodil/theme-switch';

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@ import { RouterModule } from '@angular/router';
import { FontAwesomeModule } from '@fortawesome/angular-fontawesome';

import { DaffLogoModule } from '@daffodil/branding';
import { DaffNavbarModule } from '@daffodil/design';
import { DaffArticleModule } from '@daffodil/design/article';
import { DaffButtonModule } from '@daffodil/design/button';
import { DaffNavbarModule } from '@daffodil/design/navbar';
import { DaffSidebarModule } from '@daffodil/design/sidebar';
import { DaffThemeSwitchButtonModule } from '@daffodil/theme-switch';

Expand Down
2 changes: 1 addition & 1 deletion apps/design-land/src/app/navbar/navbar.module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ import { CommonModule } from '@angular/common';
import { NgModule } from '@angular/core';
import { RouterModule } from '@angular/router';

import { DaffNavbarModule } from '@daffodil/design';
import { DaffArticleModule } from '@daffodil/design/article';
import { DaffNavbarModule } from '@daffodil/design/navbar';

import { DesignLandNavbarRoutingModule } from './navbar-routing.module';
import { DesignLandNavbarComponent } from './navbar.component';
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import { CommonModule } from '@angular/common';
import { NgModule } from '@angular/core';

import { DaffNavbarModule } from '@daffodil/design';
import { DaffButtonModule } from '@daffodil/design/button';
import { DaffContainerModule } from '@daffodil/design/container';
import { DaffNavbarModule } from '@daffodil/design/navbar';

import { BasicNavbarComponent } from './basic-navbar.component';

Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import { CommonModule } from '@angular/common';
import { NgModule } from '@angular/core';

import { DaffNavbarModule } from '@daffodil/design';
import { DaffButtonModule } from '@daffodil/design/button';
import { DaffContainerModule } from '@daffodil/design/container';
import { DaffNavbarModule } from '@daffodil/design/navbar';

import { ContainedNavbarComponent } from './contained-navbar.component';

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ import { CommonModule } from '@angular/common';
import { NgModule } from '@angular/core';
import { ReactiveFormsModule } from '@angular/forms';

import { DaffNavbarModule } from '@daffodil/design';
import { DaffButtonModule } from '@daffodil/design/button';
import { DaffNavbarModule } from '@daffodil/design/navbar';

import { NavbarThemingComponent } from './navbar-theming.component';

Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import { CommonModule } from '@angular/common';
import { NgModule } from '@angular/core';

import { DaffNavbarModule } from '@daffodil/design';
import { DaffButtonModule } from '@daffodil/design/button';
import { DaffNavbarModule } from '@daffodil/design/navbar';

import { RaisedNavbarComponent } from './raised-navbar.component';

Expand Down
9 changes: 9 additions & 0 deletions libs/design/navbar/ng-package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{
"$schema": "../../../node_modules/ng-packagr/ng-package.schema.json",
"dest": "../../dist/design/navbar",
"deleteDestPath": false,
"lib": {
"entryFile": "src/index.ts",
"styleIncludePaths": ["../src/scss"]
}
}
1 change: 1 addition & 0 deletions libs/design/navbar/src/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
export * from './public_api';
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
@use 'sass:map';
@use '../../../scss/core';
@use '../../../scss/theming';
@use '../../scss/core';
@use '../../scss/theming';

@mixin daff-navbar-theme-variant($color) {
background: $color;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { NgModule } from '@angular/core';

import { DaffNavbarComponent } from './navbar.component';
import { DaffNavbarComponent } from './navbar/navbar.component';

@NgModule({
declarations: [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,9 @@ import {
} from '@angular/core/testing';
import { By } from '@angular/platform-browser';

import { DaffPalette } from '@daffodil/design';

import { DaffNavbarComponent } from './navbar.component';
import { DaffPalette } from '../../core/colorable/public_api';

@Component({ template: '<nav daff-navbar [color]="color" [raised]="raised"></ nav>' })
class WrapperComponent {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ import {
import {
DaffColorable,
daffColorMixin,
} from '../../core/colorable/public_api';
import { daffManageContainerLayoutMixin } from '../../core/manage-container-layout/public_api';
daffManageContainerLayoutMixin,
} from '@daffodil/design';

/**
* An _elementRef is needed for the Colorable mixin
Expand Down
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
export { DaffNavbarModule } from './navbar.module';
export * from './navbar.component';
export * from './navbar/navbar.component';
2 changes: 1 addition & 1 deletion libs/design/scss/theme.scss
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
@use '../media-gallery/src/media-gallery-theme' as media-gallery;
@use '../menu/src/menu-theme' as menu;
@use '../modal/src/modal-theme' as modal;
@use '../src/molecules/navbar/navbar-theme' as navbar;
@use '../navbar/src/navbar-theme' as navbar;
@use '../notification/src/notification-theme' as notification;
@use '../src/molecules/paginator/paginator-theme' as paginator;
@use '../sidebar/src/sidebar-theme' as sidebar;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { NgModule } from '@angular/core';

import { DaffNavbarModule } from '@daffodil/design';
import { DaffLinkSetModule } from '@daffodil/design/link-set';
import { DaffNavbarModule } from '@daffodil/design/navbar';
import { DaffSidebarModule } from '@daffodil/design/sidebar';

import { BasicSidebarComponent } from './basic-sidebar.component';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@ import { NgModule } from '@angular/core';
import { ReactiveFormsModule } from '@angular/forms';
import { FontAwesomeModule } from '@fortawesome/angular-fontawesome';

import { DaffNavbarModule } from '@daffodil/design';
import { DaffButtonModule } from '@daffodil/design/button';
import { DaffLinkSetModule } from '@daffodil/design/link-set';
import { DaffNavbarModule } from '@daffodil/design/navbar';
import { DaffSidebarModule } from '@daffodil/design/sidebar';

import { OverandUnderSidebarsComponent } from './over-and-under-sidebars.component';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { CommonModule } from '@angular/common';
import { NgModule } from '@angular/core';

import { DaffNavbarModule } from '@daffodil/design';
import { DaffNavbarModule } from '@daffodil/design/navbar';
import { DaffSidebarModule } from '@daffodil/design/sidebar';

import { SideFixedSidebarComponent } from './side-fixed-sidebar.component';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { NgModule } from '@angular/core';

import { DaffNavbarModule } from '@daffodil/design';
import { DaffNavbarModule } from '@daffodil/design/navbar';
import { DaffSidebarModule } from '@daffodil/design/sidebar';

import { SidebarWithStickyContentComponent } from './sidebar-with-sticky-content.component';
Expand Down
1 change: 0 additions & 1 deletion libs/design/src/public_api.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ export * from './molecules/backdrop/public_api';
export * from './molecules/button-set/public_api';
export * from './molecules/image-gallery/public_api';
export * from './molecules/image-list/public_api';
export * from './molecules/navbar/public_api';
export * from './molecules/paginator/public_api';
export * from './molecules/qty-dropdown/public_api';
export * from './molecules/feature/public_api';
Expand Down

0 comments on commit de9ae3e

Please sign in to comment.