Skip to content
Merged
Show file tree
Hide file tree
Changes from 16 commits
Commits
Show all changes
17 commits
Select commit Hold shift + click to select a range
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
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.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@
"globby": "^14.1.0",
"husky": "^9.1.7",
"ig-typedoc-theme": "^6.2.2",
"igniteui-theming": "^19.0.0",
"igniteui-theming": "^19.1.1",
"keep-a-changelog": "^2.6.2",
"lint-staged": "^16.1.2",
"lit-analyzer": "^2.0.3",
Expand Down
8 changes: 8 additions & 0 deletions src/components/file-input/themes/dark/_themes.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
@use 'sass:map';
@use 'styles/utilities' as *;
@use 'igniteui-theming/sass/themes/schemas/components/dark/file-input' as *;

$material: digest-schema($dark-material-file-input);
$bootstrap: digest-schema($dark-bootstrap-file-input);
$fluent: digest-schema($dark-fluent-file-input);
$indigo: digest-schema($dark-indigo-file-input);
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
@use 'styles/utilities' as *;
@use 'themes' as *;
@use '../light/themes' as light;

$theme: $bootstrap;

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

$theme: $fluent;

:host {
@include css-vars-from-theme(diff(light.$base, $theme), 'ig');
}

:host(:is(igc-file-input)) {
[part~='file-names'] {
color: var(--ig-file-names-foreground, #fff)
}
}
9 changes: 9 additions & 0 deletions src/components/file-input/themes/dark/file-input.indigo.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
@use 'styles/utilities' as *;
@use 'themes' as *;
@use '../light/themes' as light;

$theme: $indigo;

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

$theme: $material;

:host {
@include css-vars-from-theme(diff(light.$base, $theme), 'ig');
}

:host(:is(igc-file-input)) {
[part~='file-names'] {
color: var(--ig-file-names-foreground, #fff)
}
}
44 changes: 42 additions & 2 deletions src/components/file-input/themes/file-input.base.scss
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
@use 'styles/utilities' as *;
@use '../../input/themes/light/themes' as *;
@use 'light/themes' as file-input;

$theme: $base;
$theme-file-input: file-input.$base;

:host(:is(igc-file-input)) {
[part~='file-parts'] {
Expand All @@ -23,7 +25,8 @@ $theme: $base;
max-height: var-get($theme, 'size');
height: 100%;
grid-area: 1 / 3;

background: var-get($theme-file-input, 'file-names-background');

> span {
@include ellipsis();
}
Expand Down Expand Up @@ -57,6 +60,42 @@ $theme: $base;
[part~='suffix'] {
grid-area: 1 / 4;
}

[part~='filled']
[part~='file-names'] {
color: var-get($theme-file-input, 'file-names-foreground--filled');
background: var-get($theme-file-input, 'file-names-background--filled')
}

[part~='container']:focus-within {
[part~='file-names'] {
color: var-get($theme-file-input, 'file-names-foreground--focused');
background: var-get($theme-file-input, 'file-names-background--focused')
}
}

[part~='file-selector-button'] igc-button {
--foreground: #{var-get($theme-file-input, 'file-selector-button-foreground')};
--disabled-foreground: #{var-get($theme-file-input, 'file-selector-button-foreground--disabled')};
--background: #{var-get($theme-file-input, 'file-selector-button-background')};
--disabled-background: #{var-get($theme-file-input, 'file-selector-button-background--disabled')};
--hover-foreground: var(--foreground);
--active-foreground: var(--foreground);
--hover-background: var(--background);
--active-background: var(--background);
}

[part~='filled']
[part~='file-selector-button'] igc-button {
--foreground: #{var-get($theme-file-input, 'file-selector-button-foreground--filled')};
--background: #{var-get($theme-file-input, 'file-selector-button-background--filled')};
}

[part~='container']:focus-within
[part~='file-selector-button'] igc-button {
--foreground: #{var-get($theme-file-input, 'file-selector-button-foreground--focused')};
--background: #{var-get($theme-file-input, 'file-selector-button-background--focused')};
}
}

:host(:not(:disabled)) {
Expand All @@ -69,6 +108,7 @@ $theme: $base;
:host(:is(igc-file-input):disabled),
:host(:is(igc-file-input)[disabled]) {
[part~='file-names'] {
color: var-get($theme, 'disabled-text-color');
color: var-get($theme-file-input, 'file-names-foreground--disabled');
background: var-get($theme-file-input, 'file-names-background--disabled')
}
}
9 changes: 9 additions & 0 deletions src/components/file-input/themes/light/_themes.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
@use 'sass:map';
@use 'styles/utilities' as *;
@use 'igniteui-theming/sass/themes/schemas/components/light/file-input' as *;

$base: digest-schema($light-file-input);
$material: digest-schema($material-file-input);
$bootstrap: digest-schema($bootstrap-file-input);
$fluent: digest-schema($fluent-file-input);
$indigo: digest-schema($indigo-file-input);
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
@use 'styles/utilities' as *;
@use 'themes' as *;

$theme: $bootstrap;

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

$theme: $fluent;

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

:host(:is(igc-file-input)) {
[part~='file-names'] {
color: var(--ig-file-names-foreground, #000)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Shouldn't this come from the $theme? I see this repeated in all files and it doesn't sit right.

}
}
8 changes: 8 additions & 0 deletions src/components/file-input/themes/light/file-input.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(diff($base, $theme), 'ig');
}
14 changes: 14 additions & 0 deletions src/components/file-input/themes/light/file-input.material.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
@use 'styles/utilities' as *;
@use 'themes' as *;

$theme: $material;

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

:host(:is(igc-file-input)) {
[part~='file-names'] {
color: var(--ig-file-names-foreground, #000)
}
}
6 changes: 6 additions & 0 deletions src/components/file-input/themes/light/file-input.shared.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
@use 'styles/utilities' as *;
@use 'themes' as *;

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

$theme: $bootstrap;
$theme-file-input: file-input.$bootstrap;

:host(:focus-within) {
--border-color: #{var-get($theme, 'focused-border-color')};
Expand All @@ -12,17 +14,6 @@ $theme: $bootstrap;
}

[part~='file-selector-button'] igc-button {
--foreground: #{var-get($theme, 'input-prefix-color')};
--background: #{var-get($theme, 'input-prefix-background')};
--hover-foreground: var(--foreground);
--hover-background: var(--background);
--active-foreground: var(--foreground);
--active-background: var(--background);
--focus-visible-foreground: var(--foreground);
--focus-visible-background: var(--background);
--disabled-foreground: #{var-get($theme, 'disabled-text-color')};
--disabled-background: #{var-get($theme, 'border-disabled-background')};

&::part(base) {
font-size: var(--input-font);
transition: border 0.15s ease-out;
Expand All @@ -46,7 +37,7 @@ $theme: $bootstrap;
font-size: var(--input-font);
padding-inline: pad-inline(8px, 12px, 16px);
padding-block: pad-block(4px, 6px, 8px);
color: var-get($theme, 'idle-text-color');
color: var-get($theme-file-input, 'file-names-foreground');
border: 1px solid var-get($theme, 'border-color');
border-start-end-radius: var-get($theme, 'border-border-radius');
border-end-end-radius: var-get($theme, 'border-border-radius');
Expand Down Expand Up @@ -85,24 +76,25 @@ $theme: $bootstrap;
:host(:not([disabled])[invalid]) {
--input-border-color: #{var-get($theme, 'error-secondary-color')};

[part~='container'] {
box-shadow: 0 0 0 rem(4px) var-get($theme, 'error-shadow-color');
}

[part='prefix'],
[part='suffix'],
[part~='file-names'] {
border-color: var-get($theme, 'error-secondary-color');
}
}

:host(:not([disabled])[invalid]:focus-within) {
[part~='container'] {
box-shadow: 0 0 0 rem(4px) var-get($theme, 'error-shadow-color');
}
}

:host(:disabled),
:host([disabled]) {
--input-border-color: #{var-get($theme, 'disabled-border-color')};

[part~='file-names'] {
color: var-get($theme, 'disabled-text-color');
background: var-get($theme, 'border-disabled-background');
color: var-get($theme-file-input, 'file-names-foreground--disabled');
border-color: var-get($theme, 'disabled-border-color');
}

Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,14 @@
@use 'styles/utilities' as *;
@use '../../../input/themes/light/themes' as *;
@use '../light/themes' as file-input;

$theme: $indigo;
$theme-file-input: file-input.$indigo;

[part='file-names'] {
@include type-style('body-2');

color: var-get($theme, 'idle-text-color');
color: var-get($theme-file-input, 'file-names-foreground');
font-size: rem(12px);
line-height: rem(16px);
}
21 changes: 21 additions & 0 deletions src/components/file-input/themes/themes.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,17 @@ import { css } from 'lit';
import type { Themes } from '../../../theming/types.js';
import { all as inputThemes } from '../../input/themes/themes.js';

// Dark Overrides
import { styles as bootstrapDark } from './dark/file-input.bootstrap.css.js';
import { styles as fluentDark } from './dark/file-input.fluent.css.js';
import { styles as indigoDark } from './dark/file-input.indigo.css.js';
import { styles as materialDark } from './dark/file-input.material.css.js';
// Light Overrides
import { styles as bootstrapLight } from './light/file-input.bootstrap.css.js';
import { styles as fluentLight } from './light/file-input.fluent.css.js';
import { styles as indigoLight } from './light/file-input.indigo.css.js';
import { styles as materialLight } from './light/file-input.material.css.js';
import { styles as shared } from './light/file-input.shared.css.js';
// Shared Styles
import { styles as bootstrap } from './shared/file-input.bootstrap.css.js';
import { styles as fluent } from './shared/file-input.fluent.css.js';
Expand All @@ -11,44 +22,54 @@ import { styles as material } from './shared/file-input.material.css.js';

const light = {
shared: css`
${shared}
${inputThemes.light.shared!}
`,
bootstrap: css`
${bootstrap}
${bootstrapLight}
${inputThemes.light.bootstrap!}
`,
material: css`
${material}
${materialLight}
${inputThemes.light.material!}
`,
indigo: css`
${indigo}
${indigoLight}
${inputThemes.light.indigo!}
`,
fluent: css`
${fluent}
${fluentLight}
${inputThemes.light.fluent!}
`,
};

const dark = {
shared: css`
${shared}
${inputThemes.dark.shared!}
`,
bootstrap: css`
${bootstrap}
${bootstrapDark}
${inputThemes.dark.bootstrap!}
`,
material: css`
${material}
${materialDark}
${inputThemes.dark.material!}
`,
indigo: css`
${indigo}
${indigoDark}
${inputThemes.dark.indigo!}
`,
fluent: css`
${fluent}
${fluentDark}
${inputThemes.dark.fluent!}
`,
};
Expand Down
Loading