Skip to content

Commit

Permalink
feat(design)!: shard hero component (#2675)
Browse files Browse the repository at this point in the history
BREAKING CHANGE: `DaffHeroModule` has moved to its own package. Update imports to `@daffodil/design/hero`
  • Loading branch information
xelaint committed Dec 20, 2023
1 parent 142e1c1 commit bfd8cc5
Show file tree
Hide file tree
Showing 30 changed files with 35 additions and 25 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@ import { CommonModule } from '@angular/common';
import { NgModule } from '@angular/core';
import { RouterModule } from '@angular/router';

import { DaffHeroModule } from '@daffodil/design';
import { DaffButtonModule } from '@daffodil/design/button';
import { DaffContainerModule } from '@daffodil/design/container';
import { DaffHeroModule } from '@daffodil/design/hero';
import { DaffImageModule } from '@daffodil/design/image';

import { DaffioHomeHeroComponent } from './home-hero.component';
Expand Down
2 changes: 1 addition & 1 deletion apps/daffio/src/app/content/not-found/not-found.module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@ import { NgModule } from '@angular/core';
import { FormsModule } from '@angular/forms';
import { RouterModule } from '@angular/router';

import { DaffHeroModule } from '@daffodil/design';
import { DaffButtonModule } from '@daffodil/design/button';
import { DaffContainerModule } from '@daffodil/design/container';
import { DaffHeroModule } from '@daffodil/design/hero';

import { DaffioNotFoundComponent } from './component/not-found.component';
import { DaffioNotFoundRoutingModule } from './not-found-routing.module';
Expand Down
2 changes: 1 addition & 1 deletion apps/daffio/src/app/content/support/support.module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@ import { NgModule } from '@angular/core';
import { FormsModule } from '@angular/forms';
import { RouterModule } from '@angular/router';

import { DaffHeroModule } from '@daffodil/design';
import { DaffButtonModule } from '@daffodil/design/button';
import { DaffContainerModule } from '@daffodil/design/container';
import { DaffHeroModule } from '@daffodil/design/hero';

import { DaffioSupportComponent } from './component/support.component';
import { DaffioSupportRoutingModule } from './support-routing.module';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@ import { CommonModule } from '@angular/common';
import { NgModule } from '@angular/core';
import { RouterModule } from '@angular/router';

import { DaffHeroModule } from '@daffodil/design';
import { DaffButtonModule } from '@daffodil/design/button';
import { DaffContainerModule } from '@daffodil/design/container';
import { DaffHeroModule } from '@daffodil/design/hero';

import { DaffioWhyPwaHeroComponent } from './why-pwa-hero.component';

Expand Down
2 changes: 1 addition & 1 deletion libs/design/guides/getting-started.md
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ import { NgModule } from '@angular/core';
import { BrowserModule } from '@angular/platform-browser';

import { AppComponent } from './app.component';
import { DaffHeroModule } from '@daffodil/design';
import { DaffHeroModule } from '@daffodil/design/hero';

@NgModule({
imports: [
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ import { NgModule } from '@angular/core';
import { ReactiveFormsModule } from '@angular/forms';
import { FontAwesomeModule } from '@fortawesome/angular-fontawesome';

import { DaffHeroModule } from '@daffodil/design';
import { DaffButtonModule } from '@daffodil/design/button';
import { DaffHeroModule } from '@daffodil/design/hero';

import { CompactHeroComponent } from './compact-hero.component';

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

import { DaffHeroModule } from '@daffodil/design';
import { DaffButtonModule } from '@daffodil/design/button';
import { DaffContainerModule } from '@daffodil/design/container';
import { DaffHeroModule } from '@daffodil/design/hero';

import { HeroTextAlignmentComponent } from './hero-text-alignment.component';

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ import { NgModule } from '@angular/core';
import { ReactiveFormsModule } from '@angular/forms';
import { FontAwesomeModule } from '@fortawesome/angular-fontawesome';

import { DaffHeroModule } from '@daffodil/design';
import { DaffButtonModule } from '@daffodil/design/button';
import { DaffHeroModule } from '@daffodil/design/hero';

import { HeroThemingComponent } from './hero-theming.component';

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

import { DaffHeroModule } from '@daffodil/design';
import { DaffButtonModule } from '@daffodil/design/button';
import { DaffContainerModule } from '@daffodil/design/container';
import { DaffHeroModule } from '@daffodil/design/hero';

import { HeroWithGridComponent } from './hero-with-grid.component';

Expand Down
9 changes: 9 additions & 0 deletions libs/design/hero/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/hero",
"deleteDestPath": false,
"lib": {
"entryFile": "src/index.ts",
"styleIncludePaths": ["../src/scss"]
}
}
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-hero-theme-variant($color) {
background: $color;
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
@use '../../../../scss/typography' as t;
@use '../../../../scss/layout';
@use '../../../scss/typography' as t;
@use '../../../scss/layout';

.daff-hero {
$root: &;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,16 @@ import {
} from '@angular/core/testing';
import { By } from '@angular/platform-browser';

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

import {
DaffHeroComponent,
DaffHeroLayout,
DaffHeroSize,
} from './hero.component';
import { DaffPalette } from '../../../core/colorable/public_api';
import { DaffTextAlignment } from '../../../core/text-alignable/text-alignable';

@Component({
template: `<daff-hero [layout]="layout" [size]="size" [color]="color" [textAlignment]="textAlignment" [compact]="compact"></daff-hero>`,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,18 +8,16 @@ import {
Renderer2,
} from '@angular/core';

import { daffArticleEncapsulatedMixin } from '../../../core/article-encapsulated/public_api';
import {
daffColorMixin,
daffArticleEncapsulatedMixin,
DaffColorable,
} from '../../../core/colorable/public_api';
import {
daffColorMixin,
DaffCompactable,
daffCompactableMixin,
} from '../../../core/compactable/public_api';
import { daffManageContainerLayoutMixin } from '../../../core/manage-container-layout/public_api';
import { DaffTextAlignable } from '../../../core/text-alignable/text-alignable';
import { daffTextAlignmentMixin } from '../../../core/text-alignable/text-alignable-mixin';
daffManageContainerLayoutMixin,
DaffTextAlignable,
daffTextAlignmentMixin,
} from '@daffodil/design';

/**
* @deprecated See {@link DaffTextAlignable}
Expand Down
1 change: 1 addition & 0 deletions libs/design/hero/src/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
export * from './public_api';
File renamed without changes.
2 changes: 1 addition & 1 deletion libs/design/scss/theme.scss
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
@use '../accordion/src/accordion-theme' as accordion;
@use '../callout/src/callout-theme' as callout;
@use '../card/src/card-theme' as card;
@use '../src/molecules/hero/hero-theme' as hero;
@use '../hero/src/hero-theme' as hero;
@use '../src/molecules/list/list/list-theme' as list;
@use '../src/molecules/media-gallery/media-gallery-theme' as media-gallery;
@use '../src/molecules/menu/menu-theme' as menu;
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 @@ -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/hero/public_api';
export * from './molecules/feature/public_api';

// Core
Expand Down

0 comments on commit bfd8cc5

Please sign in to comment.