Skip to content
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

refactor(input): bind dark themes to shadow root #940

Merged
merged 63 commits into from
Oct 23, 2023
Merged
Show file tree
Hide file tree
Changes from 61 commits
Commits
Show all changes
63 commits
Select commit Hold shift + click to select a range
eb97fa9
refactor(input): bind dark themes to shadow root
simeonoff Oct 6, 2023
436b413
refactor(expansion-panel): bind dark themes to component
simeonoff Oct 6, 2023
dca436c
refactor(icon): bind dark themes to shadow root
simeonoff Oct 9, 2023
834bce8
refactor(rating): consume colors from schema
desig9stein Oct 9, 2023
5d7dd9e
refactor(select): dark themes and file structure.
desig9stein Oct 9, 2023
81a9c8b
refactor(slider): dark themes and file structure.
desig9stein Oct 9, 2023
da4e9f6
refactor(list): bind dark themes to shadowRoot
simeonoff Oct 9, 2023
65fad57
Merge branch 'simeonoff/refactor-dark-themes' of github.com:IgniteUI/…
simeonoff Oct 9, 2023
931a4ae
deps(theming): bump to latest version
simeonoff Oct 9, 2023
a41b1ec
refactor(nav-drawer): bind dark themes to shadowRoot
simeonoff Oct 9, 2023
6502e2b
refactor(badge): bind dark themes to shadowRoot
SisIvanova Oct 10, 2023
0528cab
refactor(snackbar): dark themes and file structure.
desig9stein Oct 10, 2023
661e861
refactor(stepper): dark themes and file structure.
desig9stein Oct 10, 2023
6cceed2
refactor(tabs): dark themes and file structure.
desig9stein Oct 10, 2023
6b0075a
refactor(tabs): remove unnecessary variables include
desig9stein Oct 10, 2023
0b816e2
refactor(button): bind dark themes to shadowRoot
SisIvanova Oct 10, 2023
62e0a5a
refactor(navbar): bind dark themes to shadowRoot
simeonoff Oct 10, 2023
9dd4851
refactor(*): cleanup unnecessary variables imports.
desig9stein Oct 10, 2023
bffa761
refactor(toast): dark themes and file structure.
desig9stein Oct 10, 2023
d59cd4c
refactor(tree): dark themes and file structure.
desig9stein Oct 10, 2023
da750c2
refactor(radio): bind dark themes to shadowRoot
simeonoff Oct 10, 2023
365bfbd
refactor(card): bind dark themes to shadowRoot
SisIvanova Oct 10, 2023
9baaf4e
fix(badge/button): duplicated styles
SisIvanova Oct 10, 2023
ed97254
Merge branch 'simeonoff/refactor-dark-themes' of github.com:IgniteUI/…
simeonoff Oct 10, 2023
aff04a6
Merge branch 'simeonoff/refactor-dark-themes' of github.com:IgniteUI/…
simeonoff Oct 10, 2023
f8a7b5a
refactor(checkbox/switch): bind dark themes to shadowRoot
SisIvanova Oct 10, 2023
112b343
refactor(chip): bind dark themes to shadowRoot
SisIvanova Oct 10, 2023
bf284d7
refactor(dialog): bind dark themes to shadowRoot
SisIvanova Oct 10, 2023
bd5cf69
refactor(combo): bind dark themes to shadowRoot
SisIvanova Oct 11, 2023
82f9a53
refactor(card): remove leftovers
SisIvanova Oct 11, 2023
45db617
refactor(progress-bar): dark themes and file structure.
desig9stein Oct 11, 2023
472e031
refactor(progress-bar): cleanup
desig9stein Oct 11, 2023
d5385d2
refactor(progress-bar): consume colors from schema
desig9stein Oct 11, 2023
47aa45a
refactor(dropdown): bind dark themes to shadowRoot
SisIvanova Oct 11, 2023
2ee76ed
fix(tree): fix a bug related to the disabled colors
desig9stein Oct 11, 2023
8b790bf
refactor(button-group): consume colors from schema
desig9stein Oct 12, 2023
8d73644
refactor(tree): remove duplicated code and update theme variants
desig9stein Oct 12, 2023
80fb8e5
refactor(icon-button): consume colors from schemas & refactor dark th…
SisIvanova Oct 15, 2023
ccdeda8
refactor(calendar): dark themes and file structure.
desig9stein Oct 16, 2023
2d1ccec
refactor(calendar): fix @use import
desig9stein Oct 16, 2023
8c3b736
Merge branch 'master' into simeonoff/refactor-dark-themes
simeonoff Oct 17, 2023
22b565d
deps(theming): bump to latest beta
simeonoff Oct 17, 2023
77f5d78
refactor(textarea): bind dark themes to shadowRoot
SisIvanova Oct 18, 2023
9c5cc45
fix(combo): wrong imports in combo header & item
SisIvanova Oct 18, 2023
b3dba43
Merge branch 'master' into simeonoff/refactor-dark-themes
simeonoff Oct 19, 2023
793e3d9
fix(tabs): headers padding
desig9stein Oct 19, 2023
31e5fe6
fix(toast): fix material padding and remove unused sass:map import
desig9stein Oct 19, 2023
5106967
fix(btn-group): dark themes issues
SisIvanova Oct 19, 2023
ff62786
style(themes): order imports alphabetically
simeonoff Oct 19, 2023
8f5a5fd
Merge branch 'simeonoff/refactor-dark-themes' of github.com:IgniteUI/…
simeonoff Oct 19, 2023
d68959a
Merge branch 'master' into simeonoff/refactor-dark-themes
simeonoff Oct 19, 2023
4b30e28
fix(list): wrong header colors
SisIvanova Oct 20, 2023
1212f91
fix(*): lint errors
SisIvanova Oct 20, 2023
2642885
fix(select): clear imports
desig9stein Oct 20, 2023
106a0e8
fix(list): material & fluent header styles
SisIvanova Oct 20, 2023
cc06501
fix(select): dark theme colors for dropdown
desig9stein Oct 20, 2023
fa3517b
Merge branch 'master' into simeonoff/refactor-dark-themes
simeonoff Oct 23, 2023
7461d3d
deps(theming): bump to latest beta
simeonoff Oct 23, 2023
413e9f0
refactor(tree): fix tree-item themes
simeonoff Oct 23, 2023
d8e88a3
fix(build, test): Ignore CSS in JS files in coverage
rkaraivanov Oct 23, 2023
120e772
chore(test, coverage): Skip the themes directories
rkaraivanov Oct 23, 2023
85e9059
fix(button): use box shadow color from schema
SisIvanova Oct 23, 2023
f362ad3
deps(theming): bump to 3.3.0
simeonoff Oct 23, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
8 changes: 4 additions & 4 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 5 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,10 @@
"build:typescript": "tsc",
"build:styles": "node scripts/build-styles.mjs",
"build:watch": "npm run build:styles && concurrently -k -r \"npm:watch-scss\" \"npm:watch-ts\"",
"build:docs:md": "web-component-analyzer \"src/**/*.ts\" --outDir docs/md",
"build:docs:json": "web-component-analyzer \"src/**/*.ts\" --format json --outDir docs/json",
"build:docs:schema": "web-component-analyzer src --format json --outFile custom-elements.json",
"build:docs:vscode-schema": "web-component-analyzer src --format vscode --outFile vscode-html-custom-data.json",
"build:docs:md": "web-component-analyzer \"src/**/!(*.spec|*.css).ts\" --outDir docs/md",
"build:docs:json": "web-component-analyzer \"src/**/!(*.spec|*.css).ts\" --format json --outDir docs/json",
"build:docs:schema": "web-component-analyzer \"src/**/!(*.spec|*.css).ts\" --format json --outFile custom-elements.json",
"build:docs:vscode-schema": "web-component-analyzer \"src/**/!(*.spec|*.css).ts\" --format vscode --outFile vscode-html-custom-data.json",
"build:meta": "node scripts/build-stories.js",
"watch-meta": "node scripts/stories-watcher.js ",
"watch-scss": "node scripts/styles-watcher.mjs",
Expand Down Expand Up @@ -82,7 +82,7 @@
"eslint-plugin-storybook": "^0.6.15",
"globby": "^13.2.2",
"husky": "^8.0.3",
"igniteui-theming": "^3.2.0",
"igniteui-theming": "^3.3.0-beta.2",
"igniteui-typedoc-theme": "^3.1.0",
"keep-a-changelog": "^2.4.1",
"lint-staged": "^15.0.1",
Expand Down
2 changes: 1 addition & 1 deletion scripts/build-styles.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ export async function buildThemes() {

for (const sassFile of paths) {
const result = renderSass(sassFile, {
outputStyle: 'compressed',
style: 'compressed',
loadPaths: ['node_modules', 'src']
});

Expand Down
2 changes: 1 addition & 1 deletion scripts/sass.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ const renderSass = sass.compileAsync;

async function sassToCss(sassFile) {
const result = await renderSass(sassFile, {
outputStyle: 'compressed',
style: 'compressed',
loadPaths: ['node_modules', 'src']
});

Expand Down
2 changes: 1 addition & 1 deletion src/components/accordion/themes/accordion.base.scss
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
@use 'styles/utilities/index' as *;
@use 'styles/utilities' as *;

:host {
::slotted(igc-expansion-panel) {
Expand Down
1 change: 0 additions & 1 deletion src/components/avatar/themes/dark/_themes.scss
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
@use 'sass:map';
@use 'styles/utilities' as *;
@use 'igniteui-theming/sass/themes/schemas/components/dark/avatar' as *;

Expand Down
1 change: 0 additions & 1 deletion src/components/avatar/themes/dark/avatar.bootstrap.scss
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
@use 'sass:map';
@use 'styles/utilities' as *;
@use 'themes' as *;

Expand Down
1 change: 0 additions & 1 deletion src/components/avatar/themes/dark/avatar.fluent.scss
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
@use 'sass:map';
@use 'styles/utilities' as *;
@use 'themes' as *;

Expand Down
3 changes: 1 addition & 2 deletions src/components/avatar/themes/dark/avatar.indigo.scss
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
@use 'sass:map';
@use '../../../../styles/utilities' as *;
@use 'styles/utilities' as *;
@use 'themes' as *;

$theme: $indigo;
Expand Down
1 change: 0 additions & 1 deletion src/components/avatar/themes/dark/avatar.material.scss
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
@use 'sass:map';
@use 'styles/utilities' as *;
@use 'themes' as *;

Expand Down
1 change: 0 additions & 1 deletion src/components/avatar/themes/light/_themes.scss
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
@use 'sass:map';
@use 'styles/utilities' as *;
@use 'igniteui-theming/sass/themes/schemas/components/light/avatar' as *;

Expand Down
1 change: 0 additions & 1 deletion src/components/avatar/themes/light/avatar.bootstrap.scss
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
@use 'sass:map';
@use 'styles/utilities' as *;
@use 'themes' as *;

Expand Down
1 change: 0 additions & 1 deletion src/components/avatar/themes/light/avatar.fluent.scss
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
@use 'sass:map';
@use 'styles/utilities' as *;
@use 'themes' as *;

Expand Down
1 change: 0 additions & 1 deletion src/components/avatar/themes/light/avatar.indigo.scss
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
@use 'sass:map';
@use 'styles/utilities' as *;
@use 'themes' as *;

Expand Down
1 change: 0 additions & 1 deletion src/components/avatar/themes/light/avatar.material.scss
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
@use 'sass:map';
@use 'styles/utilities' as *;
@use 'themes' as *;

Expand Down
2 changes: 0 additions & 2 deletions src/components/avatar/themes/shared/avatar.bootstrap.scss
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
@use 'sass:map';
@use 'styles/utilities' as *;
@use '../light/themes' as *;

Expand All @@ -23,4 +22,3 @@ $theme: $bootstrap;
:host([shape='circle']) [part='base'] {
border-radius: calc(var-get($theme, 'size') / 2);
}

2 changes: 0 additions & 2 deletions src/components/avatar/themes/shared/avatar.fluent.scss
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
@use 'sass:map';
@use 'styles/utilities' as *;
@use '../light/themes' as *;

Expand All @@ -23,4 +22,3 @@ $theme: $fluent;
:host([shape='circle']) [part='base'] {
border-radius: calc(var-get($theme, 'size') / 2);
}

2 changes: 0 additions & 2 deletions src/components/avatar/themes/shared/avatar.indigo.scss
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
@use 'sass:map';
@use 'styles/utilities' as *;
@use '../light/themes' as *;

Expand All @@ -23,4 +22,3 @@ $theme: $indigo;
:host([shape='circle']) [part='base'] {
border-radius: calc(var-get($theme, 'size') / 2);
}

1 change: 0 additions & 1 deletion src/components/avatar/themes/shared/avatar.material.scss
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
@use 'sass:map';
@use 'styles/utilities' as *;
@use '../light/themes' as *;

Expand Down
6 changes: 3 additions & 3 deletions src/components/badge/badge.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import { LitElement, html } from 'lit';
import { property } from 'lit/decorators.js';

import { styles } from './themes/light/badge.base.css.js';
import { styles as bootstrap } from './themes/light/badge.bootstrap.css.js';
import { styles } from './themes/badge.base.css.js';
import { all } from './themes/themes.js';
import { themes } from '../../theming/theming-decorator.js';
import { registerComponent } from '../common/definitions/register.js';

Expand All @@ -16,7 +16,7 @@ import { registerComponent } from '../common/definitions/register.js';
*
* @csspart base - The base wrapper of the badge.
*/
@themes({ light: { bootstrap }, dark: { bootstrap } })
@themes(all)
export default class IgcBadgeComponent extends LitElement {
public static readonly tagName = 'igc-badge';
public static override styles = styles;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,7 @@
@use 'styles/common/component';
@use 'styles/utilities' as *;
@use 'themes' as *;

$theme: $material;

:host {
@include css-vars-from-theme($theme, 'ig-badge');

--size: #{rem(22px)};
--_badge-size: var(--size);

Expand All @@ -30,10 +25,6 @@ $theme: $material;
font-weight: inherit;
}

::slotted(igc-icon) {
color: var-get($theme, 'icon-color');
}

::slotted(*) {
--size: calc(var(--_badge-size) / 2) !important;

Expand All @@ -44,11 +35,6 @@ $theme: $material;
padding: calc(var(--size) / 8) calc(var(--size) / 5.5);
}

:host([variant='primary']) {
background: var-get($theme, 'background-color');
color: var-get($theme, 'text-color');
}

:host([variant='info']) {
background: color(info, 500);
color: contrast-color(info, 500);
Expand All @@ -73,12 +59,3 @@ $theme: $material;
:host([outlined][shape='rounded']) [part='base'] {
border-radius: calc(var(--size) * 2);
}

:host([shape='square']),
:host([outlined][shape='square']) [part='base'] {
border-radius: var-get($theme, 'border-radius');
}

:host([outlined]) [part='base'] {
box-shadow: inset 0 0 0 rem(2px) var-get($theme, 'border-color');
}
6 changes: 2 additions & 4 deletions src/components/badge/themes/dark/badge.bootstrap.scss
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,6 @@

$theme: $bootstrap;

@mixin theme() {
igc-badge {
@include css-vars-from-theme($theme, 'ig-badge');
}
:host {
@include css-vars-from-theme($theme, 'ig-badge');
}
8 changes: 8 additions & 0 deletions src/components/badge/themes/dark/badge.fluent.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
@use 'styles/utilities' as *;
@use 'themes' as *;

$theme: $fluent;

:host {
@include css-vars-from-theme($theme, 'ig-badge');
}
8 changes: 8 additions & 0 deletions src/components/badge/themes/dark/badge.indigo.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
@use 'styles/utilities' as *;
@use 'themes' as *;

$theme: $indigo;

:host {
@include css-vars-from-theme($theme, 'ig-badge');
}
8 changes: 8 additions & 0 deletions src/components/badge/themes/dark/badge.material.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
@use 'styles/utilities' as *;
@use 'themes' as *;

$theme: $material;

:host {
@include css-vars-from-theme($theme, 'ig-badge');
}
13 changes: 0 additions & 13 deletions src/components/badge/themes/light/badge.bootstrap.scss
Original file line number Diff line number Diff line change
Expand Up @@ -6,16 +6,3 @@ $theme: $bootstrap;
:host {
@include css-vars-from-theme($theme, 'ig-badge');
}

::slotted(igc-icon) {
color: var-get($theme, 'icon-color');
}

:host([shape='square']),
:host([outlined][shape='square']) [part='base'] {
border-radius: var-get($theme, 'border-radius');
}

:host([outlined]) [part='base'] {
box-shadow: inset 0 0 0 rem(1px) var-get($theme, 'border-color');
}
8 changes: 8 additions & 0 deletions src/components/badge/themes/light/badge.fluent.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
@use 'styles/utilities' as *;
@use 'themes' as *;

$theme: $fluent;

:host {
@include css-vars-from-theme($theme, 'ig-badge');
}
8 changes: 8 additions & 0 deletions src/components/badge/themes/light/badge.indigo.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
@use 'styles/utilities' as *;
@use 'themes' as *;

$theme: $indigo;

:host {
@include css-vars-from-theme($theme, 'ig-badge');
}
8 changes: 8 additions & 0 deletions src/components/badge/themes/light/badge.material.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
@use 'styles/utilities' as *;
@use 'themes' as *;

$theme: $material;

:host {
@include css-vars-from-theme($theme, 'ig-badge');
}
22 changes: 22 additions & 0 deletions src/components/badge/themes/shared/badge.bootstrap.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
@use 'styles/utilities' as *;
@use '../light/themes' as *;

$theme: $bootstrap;

::slotted(igc-icon) {
color: var-get($theme, 'icon-color');
}

:host([variant='primary']) {
background: var-get($theme, 'background-color');
color: var-get($theme, 'text-color');
}

:host([shape='square']),
:host([outlined][shape='square']) [part='base'] {
border-radius: var-get($theme, 'border-radius');
}

:host([outlined]) [part='base'] {
box-shadow: inset 0 0 0 rem(1px) var-get($theme, 'border-color');
}
22 changes: 22 additions & 0 deletions src/components/badge/themes/shared/badge.fluent.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
@use 'styles/utilities' as *;
@use '../light/themes' as *;

$theme: $fluent;

::slotted(igc-icon) {
color: var-get($theme, 'icon-color');
}

:host([variant='primary']) {
background: var-get($theme, 'background-color');
color: var-get($theme, 'text-color');
}

:host([shape='square']),
:host([outlined][shape='square']) [part='base'] {
border-radius: var-get($theme, 'border-radius');
}

:host([outlined]) [part='base'] {
box-shadow: inset 0 0 0 rem(2px) var-get($theme, 'border-color');
}
22 changes: 22 additions & 0 deletions src/components/badge/themes/shared/badge.indigo.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
@use 'styles/utilities' as *;
@use '../light/themes' as *;

$theme: $indigo;

::slotted(igc-icon) {
color: var-get($theme, 'icon-color');
}

:host([variant='primary']) {
background: var-get($theme, 'background-color');
color: var-get($theme, 'text-color');
}

:host([shape='square']),
:host([outlined][shape='square']) [part='base'] {
border-radius: var-get($theme, 'border-radius');
}

:host([outlined]) [part='base'] {
box-shadow: inset 0 0 0 rem(2px) var-get($theme, 'border-color');
}
22 changes: 22 additions & 0 deletions src/components/badge/themes/shared/badge.material.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
@use 'styles/utilities' as *;
@use '../light/themes' as *;

$theme: $material;

::slotted(igc-icon) {
color: var-get($theme, 'icon-color');
}

:host([variant='primary']) {
background: var-get($theme, 'background-color');
color: var-get($theme, 'text-color');
}

:host([shape='square']),
:host([outlined][shape='square']) [part='base'] {
border-radius: var-get($theme, 'border-radius');
}

:host([outlined]) [part='base'] {
box-shadow: inset 0 0 0 rem(2px) var-get($theme, 'border-color');
}
Loading
Loading