Skip to content

Commit 22ad7d2

Browse files
committed
Merge remote-tracking branch 'origin/rkaraivanov/refactor-validation-behavior' into rkaraivanov/refactor-validation-behavior
2 parents 5590ee1 + 2c25b00 commit 22ad7d2

File tree

4 files changed

+65
-0
lines changed

4 files changed

+65
-0
lines changed

src/components/date-picker/themes/shared/date-picker.bootstrap.scss

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,18 @@ $theme: $bootstrap;
4040
}
4141
}
4242

43+
:host(:not([disabled],[readonly]):state(ig-invalid)) {
44+
igc-date-time-input::part(input) {
45+
border-color: var-get($theme, 'error-secondary-color');
46+
}
47+
48+
igc-date-time-input:focus-within {
49+
&::part(input) {
50+
box-shadow: 0 0 0 rem(4px) var-get($theme, 'error-shadow-color');
51+
}
52+
}
53+
}
54+
4355
[part='actions'] {
4456
min-height: #{sizable(rem(47px), rem(54px), rem(64px))};
4557
}

src/components/date-picker/themes/shared/date-picker.fluent.scss

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,20 @@ $theme: $fluent;
3737
}
3838
}
3939

40+
:host(:not([disabled],[readonly]):state(ig-invalid)) {
41+
igc-date-time-input::part(container) {
42+
&::before {
43+
box-shadow: inset 0 0 0 var(--input-border-size) var-get($theme, 'error-secondary-color');
44+
}
45+
}
46+
47+
igc-date-time-input:focus-within {
48+
&::part(container)::before {
49+
box-shadow: inset 0 0 0 calc(var(--input-border-size) + #{rem(1px)}) var-get($theme, 'error-secondary-color');
50+
}
51+
}
52+
}
53+
4054
:host(:disabled),
4155
:host([disabled]) {
4256
[part='label']::after {

src/components/date-picker/themes/shared/date-picker.indigo.scss

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,14 @@ $input-theme: input-theme.$indigo;
4444
::part(helper-text) {
4545
color: var-get($input-theme, 'helper-text-color');
4646
}
47+
48+
igc-date-time-input::part(container) {
49+
border-color: var-get($theme, 'error-secondary-color');
50+
51+
&::after {
52+
background: var-get($theme, 'error-secondary-color');
53+
}
54+
}
4755
}
4856

4957
[part='actions'] {

src/components/date-picker/themes/shared/date-picker.material.scss

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,3 +56,34 @@ $theme: $material;
5656
}
5757
}
5858
}
59+
60+
:host(:not([outlined],[disabled],[readonly]):state(ig-invalid)) {
61+
igc-date-time-input::part(label) {
62+
color: var-get($theme, 'error-secondary-color');
63+
}
64+
65+
igc-date-time-input::part(container),
66+
igc-date-time-input:focus-within::part(container) {
67+
border-color: var-get($theme, 'error-secondary-color');
68+
69+
&::after {
70+
background: var-get($theme, 'error-secondary-color');
71+
}
72+
}
73+
}
74+
75+
:host(:not([disabled],[readonly])[outlined]:state(ig-invalid)) {
76+
igc-date-time-input::part(label) {
77+
color: var-get($theme, 'error-secondary-color');
78+
}
79+
80+
igc-date-time-input::part(start),
81+
igc-date-time-input::part(end),
82+
igc-date-time-input::part(filler) {
83+
border-color: var-get($theme, 'error-secondary-color');
84+
}
85+
86+
&::part(notch) {
87+
border-bottom-color: var-get($theme, 'error-secondary-color');
88+
}
89+
}

0 commit comments

Comments
 (0)