Skip to content

Improve Component Themes #15729

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

Open
wants to merge 64 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
64 commits
Select commit Hold shift + click to select a range
053be33
feat(avatar): improve avatar theme (#15480)
didimmova Mar 10, 2025
71490d1
Merge branch 'master' into didimmova/improve-component-themes
didimmova Mar 10, 2025
3cc0fa5
Merge remote-tracking branch 'origin/master' into didimmova/improve-c…
didimmova Mar 18, 2025
e293e63
Merge branch 'master' into didimmova/improve-component-themes
didimmova Mar 18, 2025
6c10951
Merge remote-tracking branch 'origin/master' into didimmova/improve-c…
didimmova Mar 25, 2025
76fd5f3
feat(badge): improve badge theme (#15487)
didimmova Apr 14, 2025
2291ffd
feat(expansion-panel): improve expansion-panel theme (#15651)
didimmova Apr 15, 2025
5c8f2e2
feat(dialog): update dialog theme to use adaptive-contrast function (…
didimmova Apr 15, 2025
8af1720
feat(combo): improve combo theme (#15631)
didimmova Apr 15, 2025
9105a94
feat(action-strip): update text contrast function (#15620)
didimmova Apr 15, 2025
7c09f00
feat(card): improve card theme (#15516)
didimmova Apr 15, 2025
6fbbd55
feat(bottom-nav): improve bottom-nav theme (#15489)
didimmova Apr 15, 2025
6256b70
feat(banner): improve banner theme (#15488)
didimmova Apr 15, 2025
81216db
feat(navbar): improve navbar theme (#15660)
didimmova Apr 15, 2025
563b70d
feat(navdrawer): improve navdrawer theme (#15662)
didimmova Apr 15, 2025
85ee24f
feat(tree): improve tree theme (#15717)
didimmova Apr 16, 2025
8d62677
feat(time-picker): improve time-picker theme (#15712)
didimmova Apr 16, 2025
6b85f7d
feat(snackbar): improve snackbar theme (#15683)
didimmova Apr 16, 2025
96d7878
feat(splitter): improve splitter theme (#15684)
didimmova Apr 16, 2025
a357ce6
feat(toast): improve toast theme (#15713)
didimmova Apr 16, 2025
1082f8c
Merge branch 'master' into didimmova/improve-component-themes
didimmova Apr 16, 2025
0faaa6f
Merge branch 'master' into didimmova/improve-component-themes
didimmova Apr 17, 2025
7fcee0e
improve checkbox theme and add missing properties (#15533)
didimmova Apr 17, 2025
846fbde
feat(switch): improve switch theme (#15699)
didimmova Apr 17, 2025
b3fa2a6
feat(chip): improve chip custom theme functions (#15619)
didimmova Apr 17, 2025
05dab17
feat(radio): improve radio theme (#15680)
didimmova Apr 17, 2025
08c8533
Merge remote-tracking branch 'origin/master' into didimmova/improve-c…
didimmova Apr 22, 2025
0048844
feat(button-group): improve button group theme (#15501)
didimmova Apr 25, 2025
9e27e8e
feat(carousel): improve carousel theme and add missed properties (#15…
didimmova Apr 25, 2025
b3ce5c6
feat(dropdown): improve dropdown theme (#15647)
didimmova Apr 25, 2025
59b5fed
feat(grid): improve grid theme (#15722)
didimmova Apr 25, 2025
86cf951
feat(grid-summary): improve grid-summary theme (#15723)
didimmova Apr 25, 2025
ed6244d
feat(grid-toolbar): improve grid-toolbar-theme (#15724)
didimmova Apr 25, 2025
a04f481
feat(list): improve list theme (#15654)
didimmova Apr 25, 2025
32a5f37
feat(slider): improve slider theme (#15743)
didimmova Apr 25, 2025
fc6ec35
feat(stepper): improve stepper theme (#15687)
didimmova Apr 25, 2025
2189c67
feat(tabs): improve tabs theme (#15709)
didimmova Apr 25, 2025
99151c1
feat(icon-button): improve icon-button themes (#15737)
didimmova Apr 25, 2025
94255de
feat(query-builder): improve query-builder theme (#15675)
didimmova Apr 25, 2025
08e27a2
feat(select): improve select theme (#15682)
didimmova Apr 25, 2025
750e6b6
Merge remote-tracking branch 'origin/19.2.x' into didimmova/improve-c…
didimmova Apr 25, 2025
0b696a4
feat(input-group): improve input-group theme (#15728)
didimmova Apr 28, 2025
981ad3d
feat(button): improve button themes and separate theme functions (#15…
didimmova Apr 28, 2025
65f019e
feat(calendar): improve calendar custom theme functions (#15510)
didimmova Apr 30, 2025
0627563
Merge branch 'master' into didimmova/improve-component-themes
simeonoff Apr 30, 2025
42efd1a
feat(components): remove meta from themes and use adaptive-contrast (…
didimmova Apr 30, 2025
b79b29d
Merge branch 'master' into didimmova/improve-component-themes
didimmova May 7, 2025
9074b16
feat(navbar): fix icon colors theming not working
didimmova May 7, 2025
a209805
feat(navbar): update hover-icon-color condition
didimmova May 7, 2025
9c3a013
feat(themes): update button themes and remove alpha where it's 1
didimmova May 13, 2025
c8a9e95
feat(buttons): additional button changes
didimmova May 13, 2025
3bef106
feat(select): fix select focus toggle button in material
didimmova May 13, 2025
c36a7f4
feat(tabs): bind active colors and indicator color
didimmova May 13, 2025
aca2903
feat(theming): bump theming version and fix navbar
didimmova May 20, 2025
c05d3d3
feat(input-group): use logic only if the background is not transparent
didimmova May 21, 2025
66326b9
feat(input-group): update inputs computed styles
didimmova May 21, 2025
d3fffde
feat(input-group): update disabled states
didimmova May 21, 2025
d4f255c
feat(tabs): update tabs theme
didimmova May 21, 2025
ad4bdfa
Merge branch 'master' into didimmova/improve-component-themes
didimmova May 22, 2025
82e22fe
feat(button): update button themes
didimmova May 23, 2025
861bc47
feat(icon-button): update themes
didimmova May 27, 2025
93c99f4
feat(calendar): update calendar theme functions
didimmova May 27, 2025
f646f7e
Merge branch 'master' into didimmova/improve-component-themes
didimmova Jun 9, 2025
85dcf89
chore(custom-strategy): delete duplicated code
didimmova Jun 9, 2025
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
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ export class TemplateWrapperComponent {

public templateFunctions: TemplateFunction[] = [];
public templateRendered = new Subject<HTMLElement>();

private childParts: WeakMap<HTMLElement, RootPart> = new WeakMap();

/**
Expand All @@ -28,7 +27,7 @@ export class TemplateWrapperComponent {
public templateRefs: QueryList<TemplateRef<any>>;

constructor(private cdr: ChangeDetectorRef) { }

protected litRender(container: HTMLElement, templateFunc: (arg: any) => TemplateResult, arg: any) {
const part = render(templateFunc(arg), container);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,10 +41,9 @@
}

$theme: digest-schema($action-strip-schema);
$meta: map.get($theme, '_meta');

@if not($icon-color) and $actions-background {
$icon-color: text-contrast($actions-background);
$icon-color: adaptive-contrast(var(--actions-background));
}

@if not($actions-border-radius) {
Expand All @@ -58,10 +57,6 @@
icon-color: $icon-color,
delete-action: $delete-action,
actions-border-radius: $actions-border-radius,
theme: map.get($schema, '_meta', 'theme'),
_meta: map.merge(if($meta, $meta, ()), (
variant: map.get($schema, '_meta', 'theme')
)),
));
}

Expand All @@ -71,7 +66,7 @@
@mixin action-strip($theme) {
@include css-vars($theme);

$variant: map.get($theme, '_meta', 'variant');
$variant: map.get($theme, '_meta', 'theme');
$icon-button-size: map.get((
'material': rem(36px),
'fluent': rem(32px),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,10 +41,13 @@
}

$theme: digest-schema($avatar-schema);
$meta: map.get($theme, '_meta');

@if not($color) and $background {
$color: text-contrast($background);
$color: adaptive-contrast(var(--background));
}

@if not($icon-color) and $background {
$icon-color: adaptive-contrast(var(--background));
}

@return extend($theme, (
Expand All @@ -54,10 +57,6 @@
icon-color: $icon-color,
border-radius: $border-radius,
size: $size,
theme: map.get($schema, '_meta', 'theme'),
_meta: map.merge(if($meta, $meta, ()), (
variant: map.get($schema, '_meta', 'theme')
)),
));
}

Expand All @@ -67,8 +66,8 @@
@mixin avatar($theme) {
@include css-vars($theme);

$variant: map.get($theme, '_meta', 'variant');
$variant: map.get($theme, '_meta', 'theme');

%igx-avatar-display {
@include sizable();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,14 +48,13 @@
}

$theme: digest-schema($badge-schema);
$meta: map.get($theme, '_meta');

@if not($icon-color) and $background-color {
$icon-color: text-contrast($background-color);
$icon-color: adaptive-contrast(var(--background-color));
}

@if not($text-color) and $background-color {
$text-color: text-contrast($background-color);
$text-color: adaptive-contrast(var(--background-color));
}

@if not($shadow) {
Expand All @@ -71,10 +70,6 @@
border-radius: $border-radius,
background-color: $background-color,
shadow: $shadow,
theme: map.get($schema, '_meta', 'theme'),
_meta: map.merge(if($meta, $meta, ()), (
variant: map.get($schema, '_meta', 'theme'),
)),
));
}

Expand All @@ -84,7 +79,7 @@
@mixin badge($theme) {
@include css-vars($theme);

$variant: map.get($theme, '_meta', 'variant');
$variant: map.get($theme, '_meta', 'theme');

%igx-badge-display {
--size: #{rem(22px)};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,10 +43,13 @@
}

$theme: digest-schema($banner-schema);
$meta: map.get($theme, '_meta');

@if not($banner-message-color) and $banner-background {
$banner-message-color: text-contrast($banner-background);
$banner-message-color: adaptive-contrast(var(--banner-background));
}

@if not($banner-illustration-color) and $banner-background {
$banner-illustration-color: adaptive-contrast(var(--banner-background));
}

@return extend($theme, (
Expand All @@ -57,10 +60,6 @@
banner-border-color: $banner-border-color,
banner-illustration-color: $banner-illustration-color,
border-radius: $border-radius,
theme: map.get($schema, '_meta', 'theme'),
_meta: map.merge(if($meta, $meta, ()), (
variant: map.get($schema, '_meta', 'theme')
)),
));
}

Expand All @@ -69,7 +68,7 @@
/// @param {Map} $theme - The theme used to style the component.
@mixin banner($theme) {
@include css-vars($theme);
$variant: map.get($theme, '_meta', 'variant');
$variant: map.get($theme, '_meta', 'theme');

%igx-banner-host {
igx-expansion-panel-body {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,42 +51,36 @@

$theme: digest-schema($bottom-nav-schema);

$meta: map.get($theme, '_meta');

@if not($label-color) and $background {
@if meta.type-of($background) == 'color' {
$label-color: text-contrast($background);
}
@if not($label-color) and not($icon-color) and $background {
$label-color: adaptive-contrast(var(--background));
}

@if not($icon-color) and $label-color {
@if meta.type-of($label-color) == 'color' {
$icon-color: $label-color;
}
$icon-color: $label-color;
}

@if not($label-color) and $icon-color {
$label-color: $icon-color;
}

@if not($icon-disabled-color) and not($label-disabled-color) and $label-color {
$label-disabled-color: adaptive-contrast(var(--background));
}

@if not($icon-disabled-color) and $label-disabled-color {
@if meta.type-of($label-disabled-color) == 'color' {
$icon-disabled-color: $label-disabled-color;
}
$icon-disabled-color: $label-disabled-color;
}

@if not($label-disabled-color) and $icon-disabled-color {
@if meta.type-of($icon-disabled-color) == 'color' {
$label-disabled-color: $icon-disabled-color;
}
$label-disabled-color: $icon-disabled-color;
}

@if not($icon-selected-color) and $label-selected-color {
@if meta.type-of($background) == 'color' {
$icon-selected-color: $label-selected-color;
}
$icon-selected-color: $label-selected-color;
}

@if not($icon-color) and $background {
@if meta.type-of($background) == 'color' {
$icon-color: text-contrast($background);
}
@if not($label-selected-color) and $icon-selected-color {
$label-selected-color: $icon-selected-color;
}

@if not($shadow) {
Expand All @@ -105,11 +99,6 @@
label-disabled-color: $label-disabled-color,
border-color: $border-color,
shadow: $shadow,
theme: map.get($schema, '_meta', 'theme'),
_meta: map.merge(if($meta, $meta, ()), (
variant: map.get($schema, '_meta', 'theme'),
theme-variant: map.get($schema, '_meta', 'variant')
)),
));
}

Expand All @@ -119,7 +108,7 @@
@mixin bottom-nav($theme) {
@include css-vars($theme);

$variant: map.get($theme, '_meta', 'variant');
$variant: map.get($theme, '_meta', 'theme');
$menu-height: rem(56px);
$item-min-width: rem(80px);
$item-max-width: rem(168px);
Expand Down
Loading
Loading