Skip to content

feat(fluent theme): Initial implementation #5336

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 54 commits into from
Aug 26, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
54 commits
Select commit Hold shift + click to select a range
965b330
feat(fluent theme): Initial commit
Jul 5, 2019
d770003
feat(fluent theme): Adding function to handle multiple map merges
Jul 8, 2019
e492cd6
feat(fluent theme): Adding theme styles for chp,drop-down and button …
Jul 8, 2019
7db8015
Merge branch 'master' into fluent-theme
simeonoff Jul 9, 2019
ace65ff
feat(fluent theme): Combo/dropdown theme
Jul 9, 2019
7012cf7
Merge remote-tracking branch 'IGX/fluent-theme' into fluent-theme
Jul 9, 2019
808b53e
feat(fluent theme): adding fluent switch theme and fix some drop-down…
Jul 10, 2019
d31bb6e
Merge branch 'master' of https://github.com/IgniteUI/igniteui-angular…
Jul 10, 2019
e6b7f5c
feat(fluent theme): Adding fluent radio and checkbox themes
Jul 10, 2019
50829df
feat(fluent theme): Fix some issues in fluent button/checkbox/radio t…
Jul 10, 2019
42f6a56
Merge branch 'master' of https://github.com/IgniteUI/igniteui-angular…
Jul 11, 2019
abccc38
feat(fluent theme): Adding fluent theme for slider component
Jul 11, 2019
9b32efe
Merge branch 'master' of https://github.com/IgniteUI/igniteui-angular…
Jul 11, 2019
5ce8ee7
feat(fluent theme): initial commit fot fluent input
Jul 12, 2019
fbcf11e
Merge branch 'master' of https://github.com/IgniteUI/igniteui-angular…
Jul 12, 2019
b74ee55
feat(fluent theme): improve fluent input theme
Jul 12, 2019
c9dc5cf
style(fluent theme): Merge master and fix all conflicts comming from …
Jul 15, 2019
0ec2655
style(fluent theme): enhance fluent theme
Jul 15, 2019
6500e80
refactor(typography): fix how typography is scoped
simeonoff Jul 15, 2019
429b860
Merge branch 'fluent-theme' of https://github.com/IgniteUI/igniteui-a…
simeonoff Jul 15, 2019
497d629
Merge branch 'fluent-theme' of https://github.com/IgniteUI/igniteui-a…
Jul 15, 2019
a2a3df4
style(fluent theme): Enhance component fluent themes
Jul 16, 2019
144c0a2
style(fluent theme): Enhance input fluent themes
Jul 17, 2019
070cf26
style(fluent theme): merge master in current branch
Jul 17, 2019
17d062b
style(fluent theme): Adding dialog fluent theme
Jul 17, 2019
2241668
style(fluent theme): change chip fluent theme
Jul 18, 2019
ccdfdfc
style(fluent theme): Adding dark fluent
Jul 18, 2019
c02b5c8
style(fluent theme): Merge master and Fix conflict
Jul 18, 2019
d7935b2
style(fluent theme): Fix some lint errors
Jul 18, 2019
47684d3
style(fluent theme): Adding sass doc for dark fluent theme
Jul 19, 2019
721afbc
style(fluent theme): Fix themes docs
Jul 19, 2019
e11989a
Merge branch 'master' into fluent-theme
simeonoff Jul 23, 2019
47d4efb
docs(theme): update schema docs for the fluent theme
simeonoff Jul 26, 2019
44359ca
refactor(theme): add fluent presets
simeonoff Jul 26, 2019
9195d39
fix(theme): some component themes don't work with fluent dark
simeonoff Jul 29, 2019
ebe5972
Merge branch 'master' into fluent-theme
simeonoff Jul 30, 2019
e26a992
feat(Fluent theme): updateing the change log
Aug 2, 2019
54d8e0b
Merge master and fix a conflict
Aug 12, 2019
10ffcbd
Merge branch 'master' into fluent-theme
simeonoff Aug 14, 2019
e7d0c6f
Merge branch 'master' into fluent-theme
Lipata Aug 15, 2019
863c46a
Merge branch 'master' into fluent-theme
zdrawku Aug 16, 2019
faf9104
Merge branch 'master' into fluent-theme
kdinev Aug 18, 2019
54a9b2f
Merge branch 'master' of https://github.com/IgniteUI/igniteui-angular…
Aug 20, 2019
4a8ace8
Run only grid tests
Aug 20, 2019
1be97ce
Remove fdescribe to run all tests
Aug 21, 2019
7730344
Merge branch 'master' into fluent-theme
kdinev Aug 21, 2019
4e8c731
Merge branch 'master' of https://github.com/IgniteUI/igniteui-angular…
Aug 23, 2019
4ca2368
test(grid): Fix failing tests
Aug 23, 2019
b08f60f
Merge branch 'master' into fluent-theme
simeonoff Aug 23, 2019
767761f
Merge branch 'master' into fluent-theme
simeonoff Aug 23, 2019
7a04d37
Merge branch 'master' into fluent-theme
simeonoff Aug 26, 2019
f7047da
Merge branch 'master' of https://github.com/IgniteUI/igniteui-angular…
Aug 26, 2019
d34d1dd
fix(chip): rename prop names
Aug 26, 2019
05e8f46
fix(chip): fix duplicated import
Aug 26, 2019
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 22 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,28 @@ All notable changes for each version of this project will be documented in this
## 8.1.0

### New Features

##### New theme
Ignite UI for angular now have a new theme that mimics the Microsoft Fluent design as much as possible.
In order to use the theme you have to use one of the following mixins:
`igx-fluent-theme` and `igx-fluent-dark-theme`

We also added two new pallets that go with the new theme, `$fluent-word-palette` and `$fluent-excel-palette`.

This is an example of how you can use the new theme.

```scss
// Light version
.fluent-word-theme {
@include igx-fluent-theme($fluent-word-palette);
}

// Dark version
.fluent-excel-dark-theme {
@include igx-fluent-dark-theme($fluent-excel-palette);
}
```

- `IgxBottomNav` now supports an `igx-tab` declaration mode. When in this mode, panels declarations are not accepted and tab items' content is not rendered.
- You can use this mode to apply directives on the tab items - for example to achieve routing navigation.
- You are allowed to customize tab items with labels, icons and even templates.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<ng-container *ngIf="!isHeader">
<igx-checkbox [checked]="selected" disableRipple="true" [disableTransitions]="disableTransitions" [tabindex]="-1" (click)="disableCheck($event)" class="igx-combo__checkbox"></igx-checkbox>
</ng-container>
<ng-content></ng-content>
<ng-content></ng-content>
Original file line number Diff line number Diff line change
Expand Up @@ -111,22 +111,24 @@
@return #fff;
}

/// Retrieves a contrast text color for a given color from a color palette.
/// Converts a rgba color to a hexidecimal color.
/// @access public
/// @group Palettes
/// @param {Map} $palette - The source palette map.
/// @param {string} $color - The target color from the color palette.
/// @param {number|variant} $variant - The target color shade from the color palette.
/// @requires igx-color
/// @requires text-contrast
/// @requires hexrgba
/// @returns {Color} [#fff] - Returns white if now palette, color and/or variant matches found.
@function igx-contrast-color($palette, $color, $variant: 500) {
$_color: igx-color($palette, $color, $variant);
@if $_color {
@return text-contrast(hexrgba($_color));
/// @requires {function} to-string
/// @param {Color} $rgba - The rgba color to convert.
/// @param {Color} $background - The background color to convert against.
/// @return {Color} - The hexidecimal representation of the rgba value.
@function hexrgba($rgba, $background: #fff) {
@if type-of($rgba) == color {
$red: red($rgba);
$green: green($rgba);
$blue: blue($rgba);
$a: alpha($rgba);
$r: floor($a * $red + (1 - $a) * red($background));
$g: floor($a * $green + (1 - $a) * green($background));
$b: floor($a * $blue + (1 - $a) * blue($background));
@return rgb($r, $g, $b);
}
@return #fff;
@return $rgba;
}

/// Returns a contrast color for a passed color.
Expand All @@ -138,7 +140,7 @@
@if type-of($color) == 'color' {
$lightContrast: contrast($color, white);
$darkContrast: contrast($color, black);

@if ($lightContrast > $darkContrast) {
@return white;
} @else {
Expand All @@ -148,6 +150,24 @@
@return $color;
}

/// Retrieves a contrast text color for a given color from a color palette.
/// @access public
/// @group Palettes
/// @param {Map} $palette - The source palette map.
/// @param {string} $color - The target color from the color palette.
/// @param {number|variant} $variant - The target color shade from the color palette.
/// @requires igx-color
/// @requires text-contrast
/// @requires hexrgba
/// @returns {Color} [#fff] - Returns white if now palette, color and/or variant matches found.
@function igx-contrast-color($palette, $color, $variant: 500) {
$_color: igx-color($palette, $color, $variant);
@if $_color {
@return text-contrast(hexrgba($_color));
}
@return #fff;
}

/// Test if `$value` is a valid direction.
/// @access private
/// @param {*} $value - The value to test.
Expand Down Expand Up @@ -198,54 +218,34 @@
@return $sign + $result;
}

/// Converts a rgba color to a hexidecimal color.
/// @access public
/// @requires {function} to-string
/// @param {Color} $rgba - The rgba color to convert.
/// @param {Color} $background - The background color to convert against.
/// @return {Color} - The hexidecimal representation of the rgba value.
@function hexrgba($rgba, $background: #fff) {
@if type-of($rgba) == color {
$red: red($rgba);
$green: green($rgba);
$blue: blue($rgba);
$a: alpha($rgba);
$r: floor($a * $red + (1 - $a) * red($background));
$g: floor($a * $green + (1 - $a) * green($background));
$b: floor($a * $blue + (1 - $a) * blue($background));
@return rgb($r, $g, $b);
}
@return $rgba;
}

/// Extends a Map object with the properties of another Map object.
/// @access private
/// @param {Map...} $maps - The source map to get extended.
/// @returns {Map} - Returns the merged maps.
@function extend($maps...) {
$result: ();

@each $map in $maps {
$result: map-merge($result, map-clean($map));
}

@return $result;
}

/// Removes all null key-value pairs from the map
/// @access private
/// @param {Map} $map - The target map to be cleaned.
/// @returns {Map} - Returns a clean map.
@function map-clean($map) {
$result: ();

@each $key, $value in $map {
@if($value) != null {
$result: map-merge($result, (
#{$key}: $value
));
}
}

@return $result;
}

/// Extends a Map object with the properties of another Map object.
/// @access private
/// @param {Map...} $maps - The source map to get extended.
/// @returns {Map} - Returns the merged maps.
@function extend($maps...) {
$result: ();

@each $map in $maps {
$result: map-merge($result, map-clean($map));
}

@return $result;
}
Expand Down Expand Up @@ -309,7 +309,7 @@
$warn: #fbb13c,
$error: #ff134a,
$grays: #000,
$surface: #fff,
$surface: #fff
) {
$saturations: (50, 100, 200, 300, 400, 500, 600, 700, 800, 900, 'A100', 'A200', 'A400', 'A700');
$shades: (50: .02, 100: .04, 200: .08, 300: .12, 400: .26, 500: .38, 600: .54, 700: .62, 800: .74, 900: .87);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,29 @@
/// @author <a href="https://github.com/simeonoff" target="_blank">Simeon Simeonoff</a>
////

/// Help debug sass maps.
/// @access privet
/// @example scss - Sample usage
/// input[type="checkbox"] {
/// @include hide-default();
/// }

//@mixin debug-map($map) {
// @at-root {
// @debug-map {
// __toString__: inspect($map);
// __length__: length($map);
// __keys__: map-keys($map);
//
// __properties__ {
// @each $key, $value in $map {
// #{$key}: inspect($value);
// }
// }
// }
// }
//}

/// Hides the element from the DOM.
/// @access public
/// @example scss - Sample usage
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -142,12 +142,10 @@
) {
$message: map-get($categories, 'message');

@include igx-scope('.igx-typography') {
%igx-banner__text {
@include igx-type-style($type-scale, $message) {
margin-top: 0;
margin-bottom: 0;
}
%igx-banner__text {
@include igx-type-style($type-scale, $message) {
margin-top: 0;
margin-bottom: 0;
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
$background: null,
$idle-item-color: null,
$active-item-color: null,
$shadow: null,
$shadow: null
) {
$name: 'igx-bottom-nav';
$bottom-nav-schema: map-get($schema, $name);
Expand Down Expand Up @@ -75,8 +75,6 @@
@mixin igx-bottom-nav($theme) {
@include igx-root-css-vars($theme);

// @debug $theme;

$menu-height: 56px;
$item-min-width: 80px;
$item-max-width: 168px;
Expand Down Expand Up @@ -193,11 +191,9 @@
@mixin igx-bottom-nav-typography($type-scale, $categories: (label: 'caption')) {
$label: map-get($categories, 'label');

@include igx-scope('.igx-typography') {
%igx-tab-label {
@include igx-type-style($type-scale, $label) {
margin: 0
}
%igx-tab-label {
@include igx-type-style($type-scale, $label) {
margin: 0
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@
$item-selected-text-color: null,
$item-selected-background: null,
$item-selected-border-color: null,
$item-selected-hover-background: null,
$item-selected-hover-background: null
) {
$name: 'igx-button-group';
$button-group-schema: map-get($schema, $name);
Expand Down Expand Up @@ -149,19 +149,17 @@
$group-item-min-width: 24px;
$group-item-border-thickness: 1px;
$group-items-margin: rem(10px, 16px);
$transition: all 140ms $ease-in-out-quad;

%igx-group-display {
display: flex;
box-shadow: --var($theme, 'shadow');
transition: all 140ms $ease-in-out-quad;
transition: $transition;
border-radius: --var($theme, 'border-radius')
}

%igx-group-item {
&%igx-button--flat {
border-radius: 0;
}

@include ellipsis();
border: $group-item-border-thickness solid --var($theme, 'item-border-color');
color: --var($theme, 'item-text-color');
background: --var($theme, 'item-background');
Expand All @@ -175,13 +173,19 @@
user-select: none;
position: relative;
z-index: 0;
@include ellipsis();
transition: $transition;

&:not(:nth-child(0)) {
margin-left: -1px;
&%igx-button--flat {
border-radius: 0;
}

%igx-icon-display {
color: currentColor;
}

&:not(:nth-child(0)) {
margin-left: -1px;
}

&:first-of-type {
border-radius: --var($theme, 'border-radius') 0 0 --var($theme, 'border-radius');
Expand All @@ -199,6 +203,10 @@

&:hover,
&:focus {
%igx-icon-display {
color: currentColor;
}

color: --var($theme, 'item-hover-text-color');
background: --var($theme, 'item-hover-background');
z-index: 1;
Expand Down
Loading