Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
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
9 changes: 4 additions & 5 deletions src/components/date-picker/themes/dark/_themes.scss
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
@use 'sass:map';
@use 'styles/utilities' as *;
@use 'igniteui-theming/sass/themes/schemas/components/dark/calendar' as *;
@use 'igniteui-theming/sass/themes/schemas/components/dark/input-group' as input-theme;

$material: map.merge(digest-schema($dark-material-calendar), digest-schema(input-theme.$dark-material-input-group));
$bootstrap: map.merge(digest-schema($dark-bootstrap-calendar), digest-schema(input-theme.$dark-bootstrap-input-group));
$fluent: map.merge(digest-schema($dark-fluent-calendar), digest-schema(input-theme.$dark-fluent-input-group));
$indigo: map.merge(digest-schema($dark-indigo-calendar), digest-schema(input-theme.$dark-indigo-input-group));
$material: digest-schema($dark-material-calendar);
$bootstrap: digest-schema($dark-bootstrap-calendar);
$fluent: digest-schema($dark-fluent-calendar);
$indigo: digest-schema($dark-indigo-calendar);
Comment on lines +5 to +8
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

I believe the reason why we were merging the themes here is so that CSS variables are available to style the date picker component from the outside as a single unit. We need to verify if we're not introducing breaking changes by doing this.

Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,8 @@

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

igc-dialog[open]::part(base) {
box-shadow: var(--ig-elevation-7);
}
Comment on lines +8 to +10
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Um, shouldn't this be read from the schemas instead of being hard coded?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

there are no datepicker elevations in the schemas

}
9 changes: 4 additions & 5 deletions src/components/date-picker/themes/light/_themes.scss
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
@use 'sass:map';
@use 'styles/utilities' as *;
@use 'igniteui-theming/sass/themes/schemas/components/light/calendar' as *;
@use 'igniteui-theming/sass/themes/schemas/components/light/input-group' as input-theme;

$base: digest-schema($light-calendar);
$material: map.merge(digest-schema($material-calendar), digest-schema(input-theme.$material-input-group));
$bootstrap: map.merge(digest-schema($bootstrap-calendar), digest-schema(input-theme.$bootstrap-input-group));
$fluent: map.merge(digest-schema($fluent-calendar), digest-schema(input-theme.$fluent-input-group));
$indigo: map.merge(digest-schema($indigo-calendar), digest-schema(input-theme.$indigo-input-group));
$material: digest-schema($material-calendar);
$bootstrap: digest-schema($bootstrap-calendar);
$fluent: digest-schema($fluent-calendar);
$indigo: digest-schema($indigo-calendar);
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
@use 'styles/utilities' as *;
@use '../light/themes' as *;
@use '../../../input/themes/light/themes' as input-theme;

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

:host {
igc-dialog {
Expand All @@ -10,14 +12,6 @@ $theme: $bootstrap;
}
}

igc-dialog::part(base) {
border: rem(1px) solid var-get($theme, 'border-color');
}

igc-focus-trap {
box-shadow: 0 0 0 rem(1px) var-get($theme, 'border-color');
}

[part~='label'] {
@include type-style('body-1');

Expand All @@ -31,7 +25,7 @@ $theme: $bootstrap;
::part(helper-text) {
@include type-style('body-2');

color: var-get($theme, 'helper-text-color');
color: var-get($input-theme, 'helper-text-color');
grid-auto-rows: minmax(rem(20px), auto);
padding-inline-start: 0;
margin-block-start: rem(4px)
Expand All @@ -42,7 +36,7 @@ $theme: $bootstrap;
igc-date-time-input::part(container),
igc-date-time-input::part(prefix),
igc-date-time-input::part(suffix) {
background: var-get($theme, 'border-disabled-background');
background: var-get($input-theme, 'border-disabled-background');
}
}

Expand Down
23 changes: 11 additions & 12 deletions src/components/date-picker/themes/shared/date-picker.common.scss
Original file line number Diff line number Diff line change
Expand Up @@ -7,22 +7,20 @@ $input-theme: input-theme.$material;

:host {
--component-size: var(--ig-size, #{var-get($theme, 'default-size')});
--date-picker-border-color: #{var-get($theme, 'border-color')};

igc-dialog {
box-shadow: none;
border: none;

[part='actions'] {
border: none;
}

igc-calendar {
box-shadow: none;
}
}

igc-dialog[open]::part(base) {
box-shadow: var(--ig-elevation-24);
border: rem(1px) solid var(--date-picker-border-color);
}

igc-dialog::part(content),
Expand All @@ -32,7 +30,7 @@ $input-theme: input-theme.$material;

igc-dialog::part(footer) {
background: var-get($theme, 'content-background');
border-block-start: rem(1px) solid var-get($theme, 'actions-divider-color');
border-block-start: none;
}

igc-focus-trap {
Expand All @@ -42,6 +40,7 @@ $input-theme: input-theme.$material;

border-radius: var-get($theme, 'border-radius');
background: var-get($theme, 'content-background');
box-shadow: 0 0 0 rem(1px) var(--date-picker-border-color);
}

igc-popover::part(container) {
Expand All @@ -56,18 +55,18 @@ $input-theme: input-theme.$material;
::part(helper-text) {
@include type-style('caption');

color: var-get($theme, 'helper-text-color');
color: var-get($input-theme, 'helper-text-color');
grid-auto-rows: minmax(rem(18px), auto);
margin-block-start: rem(4px);
padding-inline: pad-inline(rem(14px), rem(16px), rem(18px));
}
}

:host(:not([readonly])) {
--affix-color: #{var-get($theme, 'input-prefix-color')};
--affix-color: #{var-get($input-theme, 'input-prefix-color')};

igc-date-time-input[readonly] {
--affix-color: #{var-get($theme, 'input-prefix-color')};
--affix-color: #{var-get($input-theme, 'input-prefix-color')};

&::part(prefix),
&::part(suffix) {
Expand All @@ -82,22 +81,22 @@ $input-theme: input-theme.$material;
}

igc-input:focus-within {
--affix-color: #{var-get($theme, 'input-prefix-color--focused')};
--affix-color: #{var-get($input-theme, 'input-prefix-color--focused')};

&::part(filled) {
--affix-color: #{var-get($theme, 'input-prefix-color--focused')};
--affix-color: #{var-get($input-theme, 'input-prefix-color--focused')};
}
}

::part(filled) {
--affix-color: #{var-get($theme, 'input-prefix-color--filled')};
--affix-color: #{var-get($input-theme, 'input-prefix-color--filled')};
}
}

:host(:not([disabled])[invalid]),
:host(:not(:disabled)[invalid]) {
::part(helper-text) {
color: var-get($theme, 'error-secondary-color');
color: var-get($input-theme, 'error-secondary-color');
}
}

Expand Down
12 changes: 7 additions & 5 deletions src/components/date-picker/themes/shared/date-picker.fluent.scss
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
@use 'styles/utilities' as *;
@use '../light/themes' as *;
@use '../../../input/themes/light/themes' as input-theme;

$theme: $fluent;
$input-theme: input-theme.$fluent;

:host {
igc-dialog[open]::part(base) {
Expand All @@ -15,7 +17,7 @@ $theme: $fluent;
::part(helper-text) {
@include type-style('caption');

color: var-get($theme, 'helper-text-color');
color: var-get($input-theme, 'helper-text-color');
grid-auto-rows: minmax(rem(18px), auto);
margin-block-start: rem(5px);
padding-inline-start: 0;
Expand All @@ -24,7 +26,7 @@ $theme: $fluent;

:host([required]) {
[part='label']::after {
color: var-get($theme, 'error-secondary-color');
color: var-get($input-theme, 'error-secondary-color');
}
}

Expand All @@ -37,20 +39,20 @@ $theme: $fluent;

:host(:not([invalid])[readonly]:hover) {
igc-date-time-input::part(container) {
border-color: var-get($theme, 'border-color');
border-color: var-get($input-theme, 'border-color');
}
}

:host(:not([invalid])[readonly]:focus-within) {
igc-date-time-input::part(container) {
border-color: var-get($theme, 'focused-border-color');
border-color: var-get($input-theme, 'focused-border-color');
}
}

:host(:disabled),
:host([disabled]) {
[part='label']::after {
color: var-get($theme, 'disabled-text-color');
color: var-get($input-theme, 'disabled-text-color');
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,6 @@ $input-theme: input-theme.$indigo;
igc-dialog[open]::part(base) {
border-radius: rem(6px);
box-shadow: var(--ig-elevation-5);
border: rem(1px) solid var-get($theme, 'border-color');
}

igc-focus-trap {
box-shadow: 0 0 0 rem(1px) var-get($theme, 'border-color');
}

[part~='label'] {
Expand All @@ -24,7 +19,7 @@ $input-theme: input-theme.$indigo;
::part(helper-text) {
@include type-style('caption');

color: var-get($theme, 'helper-text-color');
color: var-get($input-theme, 'helper-text-color');
grid-auto-rows: minmax(rem(15px), auto);
padding-inline-start: 0;
}
Expand All @@ -38,7 +33,7 @@ $input-theme: input-theme.$indigo;

:host(:not([invalid])[readonly]) {
igc-date-time-input::part(container) {
border-color: var-get($theme, 'disabled-text-color');
border-color: var-get($input-theme, 'disabled-text-color');
}
}

Expand Down
24 changes: 13 additions & 11 deletions src/components/date-picker/themes/shared/date-picker.material.scss
Original file line number Diff line number Diff line change
@@ -1,17 +1,19 @@
@use 'styles/utilities' as *;
@use '../light/themes' as *;
@use '../../../input/themes/light/themes' as input-theme;

$theme: $material;
$input-theme: input-theme.$material;

:host(:not([invalid])[outlined][readonly]:hover) {
igc-date-time-input::part(start),
igc-date-time-input::part(end),
igc-date-time-input::part(filler) {
border-color: var-get($theme, 'border-color');
border-color: var-get($input-theme, 'border-color');
}

igc-date-time-input::part(notch) {
border-bottom-color: var-get($theme, 'border-color');
border-bottom-color: var-get($input-theme, 'border-color');
}
}

Expand All @@ -20,38 +22,38 @@ $theme: $material;
&::part(start),
&::part(end),
&::part(filler) {
border-color: var-get($theme, 'focused-border-color');
border-color: var-get($input-theme, 'focused-border-color');
}

&::part(notch) {
border-bottom-color: var-get($theme, 'focused-border-color');
border-bottom-color: var-get($input-theme, 'focused-border-color');
}
}
}

:host(:not([outlined],[disabled])[readonly]) {
igc-date-time-input::part(container) {
background: var-get($theme, 'box-background-focus');
background: var-get($input-theme, 'box-background-focus');
}
}

:host(:not([outlined],[invalid])[readonly]) {
igc-date-time-input:hover {
&::part(container) {
border-bottom-color: var-get($theme, 'idle-bottom-line-color');
border-bottom-color: var-get($input-theme, 'idle-bottom-line-color');

&::after {
background: var-get($theme, 'idle-bottom-line-color');
background: var-get($input-theme, 'idle-bottom-line-color');
}
}
}

igc-date-time-input:focus-within {
&::part(container) {
border-bottom-color: var-get($theme, 'focused-bottom-line-color');
border-bottom-color: var-get($input-theme, 'focused-bottom-line-color');

&::after {
background: var-get($theme, 'focused-bottom-line-color');
background: var-get($input-theme, 'focused-bottom-line-color');
}
}
}
Expand All @@ -61,10 +63,10 @@ $theme: $material;
igc-date-time-input:hover,
igc-date-time-input:focus-within {
&::part(container) {
border-color: var-get($theme, 'error-secondary-color');
border-color: var-get($input-theme, 'error-secondary-color');

&::after {
border-color: var-get($theme, 'error-secondary-color');
border-color: var-get($input-theme, 'error-secondary-color');
}
}
}
Expand Down