From 88b0b9679a14dc31008b4492789e7643cefad434 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Philippe=20Lafreni=C3=A8re?= <53181414+PhilippeLafreniere18@users.noreply.github.com> Date: Thu, 22 Sep 2022 16:07:41 -0400 Subject: [PATCH] fix(theming): fix global core import (#1103) * fix(theming): fix global core import * fix(demo): fix demo app tooltip options --- demo/src/app/app.component.scss | 2 ++ demo/src/app/app.module.ts | 9 +++++++++ gulpfile.js | 2 +- packages/core/src/style/theming.scss | 2 -- packages/core/src/style/typography.scss | 2 ++ 5 files changed, 14 insertions(+), 3 deletions(-) diff --git a/demo/src/app/app.component.scss b/demo/src/app/app.component.scss index 173be8a94d..d787f941c5 100644 --- a/demo/src/app/app.component.scss +++ b/demo/src/app/app.component.scss @@ -38,3 +38,5 @@ mat-sidenav { mat-sidenav-content { padding: 10px; } + +:ng-deep .mat-tooltip-hide { display: none!important; } // temporary fix (https://github.com/angular/components/issues/24614) diff --git a/demo/src/app/app.module.ts b/demo/src/app/app.module.ts index f29893d720..587ad94422 100644 --- a/demo/src/app/app.module.ts +++ b/demo/src/app/app.module.ts @@ -51,6 +51,14 @@ import { AppContextModule } from './context/context/context.module'; import { AppRoutingModule } from './app-routing.module'; import { AppComponent } from './app.component'; import { IgoCoreModule, LanguageService } from '@igo2/core'; +import { MatTooltipDefaultOptions, MAT_TOOLTIP_DEFAULT_OPTIONS } from '@angular/material/tooltip'; + +export const defaultTooltipOptions: MatTooltipDefaultOptions = { + showDelay: 500, + hideDelay: 0, + touchendHideDelay: 0, + disableTooltipInteractivity: true +}; @NgModule({ declarations: [AppComponent], @@ -111,6 +119,7 @@ import { IgoCoreModule, LanguageService } from '@igo2/core'; ], providers: [ {provide: APP_INITIALIZER, useFactory: appInitializerFactory, deps: [LanguageService], multi: true}, + { provide: MAT_TOOLTIP_DEFAULT_OPTIONS, useValue: defaultTooltipOptions } ], bootstrap: [AppComponent] }) diff --git a/gulpfile.js b/gulpfile.js index bab7fee6f8..7a0ff25271 100644 --- a/gulpfile.js +++ b/gulpfile.js @@ -174,8 +174,8 @@ gulp.task('core:concatStyles', done => { gulp .src([ './packages/core/src/style/setup.scss', - './packages/core/src/style/all.theming.scss', './packages/core/src/style/typography.scss', + './packages/core/src/style/all.theming.scss', './packages/core/src/style/foreground.scss', './packages/core/src/style/theming.scss', './packages/core/src/style/core.theming.scss', diff --git a/packages/core/src/style/theming.scss b/packages/core/src/style/theming.scss index a9bc557ba0..7209264211 100644 --- a/packages/core/src/style/theming.scss +++ b/packages/core/src/style/theming.scss @@ -1,7 +1,5 @@ @import './material.font'; @mixin igo-theming($theme, $typography) { - @include mat.core($typography); - @include igo-core-theming($theme, $typography); } diff --git a/packages/core/src/style/typography.scss b/packages/core/src/style/typography.scss index 63b465290c..bed1b74599 100644 --- a/packages/core/src/style/typography.scss +++ b/packages/core/src/style/typography.scss @@ -13,3 +13,5 @@ $igo-typography: mat.define-typography-config( $button: mat.define-typography-level(13px, 13px, 500), $input: mat.define-typography-level(14px, 1.25, 400) ); + +@include mat.core($igo-typography);