Skip to content

Commit a58203f

Browse files
committed
refactor(input/validator): use input theme for validator and address latest input comments
1 parent 7a5d67e commit a58203f

19 files changed

+46
-165
lines changed

src/components/input/themes/shared/input.bootstrap.scss

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -155,12 +155,6 @@ $theme: $bootstrap;
155155
}
156156
}
157157

158-
[part~='filled'] {
159-
[part~='input'] {
160-
color: var-get($theme, 'input-prefix-color--filled');
161-
}
162-
}
163-
164158
[part~='prefixed'] [part='prefix'],
165159
[part~='suffixed'] [part='suffix'] {
166160
::slotted(*) {
@@ -190,6 +184,18 @@ $theme: $bootstrap;
190184
}
191185
}
192186

187+
:host([type='search']) {
188+
[part^='container'] {
189+
background: var-get($theme, 'search-background');
190+
box-shadow: var-get($theme, 'search-resting-elevation');
191+
border-radius: var-get($theme, 'search-border-radius');
192+
193+
&:focus-within {
194+
background: var-get($theme, 'search-background');
195+
}
196+
}
197+
}
198+
193199
:host(:disabled),
194200
:host([disabled]) {
195201
[part='prefix'],

src/components/input/themes/shared/input.common.scss

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,10 @@ $theme: $base;
6868
}
6969

7070
:host(:focus-within) {
71+
[part^='container'] {
72+
caret-color: var-get($theme, 'focused-text-color');
73+
}
74+
7175
[part='prefix'] {
7276
color: var-get($theme, 'input-prefix-color--focused');
7377
background: var-get($theme, 'input-prefix-background--focused');

src/components/input/themes/shared/input.fluent.scss

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,6 @@ $theme: $fluent;
9090
}
9191

9292
[part~='input'] {
93-
color: var-get($theme, 'idle-text-color');
9493
background: initial;
9594
font-size: rem(14px);
9695
padding-inline: pad-inline(rem(8px));

src/components/input/themes/shared/input.indigo.scss

Lines changed: 19 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -167,7 +167,25 @@ $transition-duration: .25s;
167167
}
168168
}
169169

170-
:host([type='search']) {
170+
:host([type='search']:not([disabled])) {
171+
[part^='container'] {
172+
background: var-get($theme, 'search-background');
173+
box-shadow: var-get($theme, 'search-resting-elevation');
174+
border-radius: var-get($theme, 'search-border-radius');
175+
176+
&:focus-within,
177+
&:focus-within:hover {
178+
background: var-get($theme, 'box-background-focus');
179+
}
180+
}
181+
182+
&:focus-within,
183+
&:focus-within:hover {
184+
[part^='container'] {
185+
background: var-get($theme, 'box-background-focus');
186+
}
187+
}
188+
171189
%suffix-preffix {
172190
padding-inline: pad-inline(rem(6px), rem(8px), rem(10px));
173191
}

src/components/input/themes/shared/input.material.scss

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -281,8 +281,7 @@ input:placeholder-shown + [part='notch'] [part='label'],
281281
:host(:not([outlined]):disabled) {
282282
[part~='container'] {
283283
background: var-get($theme, 'box-disabled-background');
284-
border-color: var-get($theme, 'disabled-border-color');
285-
border-block-end-color: var-get( $theme, 'disabled-bottom-line-color');
284+
border-block-end-color: var-get($theme, 'disabled-bottom-line-color');
286285
border-bottom-style: dashed;
287286
}
288287
}
@@ -303,6 +302,11 @@ input:placeholder-shown + [part='notch'] [part='label'],
303302
}
304303
}
305304
}
305+
306+
[part='prefix'],
307+
[part='suffix'] {
308+
max-height: 100%;
309+
}
306310
}
307311

308312
:host(:not([readonly])[type='search']:hover),

src/components/validation-container/themes/dark/_themes.scss

Lines changed: 0 additions & 7 deletions
This file was deleted.

src/components/validation-container/themes/dark/validator.bootstrap.scss

Lines changed: 0 additions & 9 deletions
This file was deleted.

src/components/validation-container/themes/dark/validator.fluent.scss

Lines changed: 0 additions & 9 deletions
This file was deleted.

src/components/validation-container/themes/dark/validator.indigo.scss

Lines changed: 0 additions & 9 deletions
This file was deleted.

src/components/validation-container/themes/dark/validator.material.scss

Lines changed: 0 additions & 9 deletions
This file was deleted.

0 commit comments

Comments
 (0)