Skip to content
Merged
Show file tree
Hide file tree
Changes from 3 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
1 change: 0 additions & 1 deletion src/components/input/themes/shared/input.bootstrap.scss
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,6 @@ $theme: $bootstrap;
border-radius: var-get($theme, 'border-border-radius');
padding-inline: pad-inline(8px, 10px, 14px);
padding-block: pad-block(4px, 6px, 8px);
color: var-get($theme, 'idle-text-color');
background: transparent;
box-shadow: none;
z-index: 1;
Expand Down
33 changes: 31 additions & 2 deletions src/components/input/themes/shared/input.common.scss
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,10 @@

$theme: $base;

[part~='input'] {
color: var-get($theme, 'idle-text-color');
}

[part='prefix'] {
color: var-get($theme, 'input-prefix-color');
background: var-get($theme, 'input-prefix-background');
Expand All @@ -14,6 +18,10 @@ $theme: $base;
}

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

[part='prefix'] {
color: var-get($theme, 'input-prefix-color--filled');
background: var-get($theme, 'input-prefix-background--filled');
Expand Down Expand Up @@ -43,6 +51,22 @@ $theme: $base;
}
}

:host(:not([readonly],[disabled]):hover) {
[part~='filled'] {
[part~='input'] {
color: var-get($theme, 'filled-text-hover-color');
}
}
}

:host(:not([readonly],[disabled]):focus-within) {
[part~='filled'] {
[part~='input'] {
color: var-get($theme, 'focused-text-color');
}
}
}

:host(:focus-within) {
[part='prefix'] {
color: var-get($theme, 'input-prefix-color--focused');
Expand Down Expand Up @@ -81,7 +105,12 @@ $theme: $base;
:host(:disabled),
:host([disabled]) {
[part~='input']::placeholder {
color: var-get($theme, 'disabled-text-color');
color: var-get($theme, 'disabled-placeholder-color');
}

[part='prefix'],
[part='suffix'] {
background: inherit;
}
}

Expand All @@ -98,4 +127,4 @@ $theme: $base;
::slotted([slot='prefix']) {
padding-inline: var(--affix-padding);
}
}
}
10 changes: 10 additions & 0 deletions src/components/input/themes/shared/input.fluent.scss
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,16 @@ $theme: $fluent;
pointer-events: none;
z-index: 1;
}

[part='prefix']:first-child {
border-start-start-radius: calc(var-get($theme, 'border-border-radius') - rem(1px));
border-end-start-radius: calc(var-get($theme, 'border-border-radius') - rem(1px));
}

[part='suffix']:last-child {
border-start-end-radius: calc(var-get($theme, 'border-border-radius') - rem(1px));
border-end-end-radius: calc(var-get($theme, 'border-border-radius') - rem(1px));
}
}

[part~='input'] {
Expand Down
23 changes: 2 additions & 21 deletions src/components/input/themes/shared/input.indigo.scss
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ $transition-duration: .25s;
}

[part='prefix'] {
border-start-start-radius: var-get($theme, 'border-border-radius');
border-start-start-radius: var-get($theme, 'box-border-radius');
grid-area: 1 / 1;

::slotted(*) {
Expand All @@ -49,7 +49,7 @@ $transition-duration: .25s;
}

[part='suffix'] {
border-start-end-radius: var-get($theme, 'border-border-radius');
border-start-end-radius: var-get($theme, 'box-border-radius');
grid-area: 1 / 3;

::slotted(*) {
Expand Down Expand Up @@ -91,7 +91,6 @@ $transition-duration: .25s;
[part~='input'] {
@include type-style('body-2');

color: var-get($theme, 'idle-text-color');
font-size: rem(12px);
line-height: rem(16px);
background: initial;
Expand All @@ -115,20 +114,8 @@ $transition-duration: .25s;
}
}

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

:host(:not([disabled],[readonly]):hover),
:host(:not([disabled])[readonly][role='combobox']:hover) {
[part~='filled'] {
[part~='input'] {
color: var-get($theme, 'filled-text-hover-color');
}
}

[part^='container'] {
background: var-get($theme, 'box-background-hover');
border-color: var-get($theme, 'hover-bottom-line-color');
Expand All @@ -155,12 +142,6 @@ $transition-duration: .25s;
[part='label'] {
color: var-get($theme, 'focused-secondary-color');
}

[part~='filled'] {
[part~='input'] {
color: var-get($theme, 'focused-text-color');
}
}
}

:host(:not([aria-haspopup='dialog'],[role='combobox'],[disabled])[readonly]) {
Expand Down
9 changes: 7 additions & 2 deletions src/components/input/themes/shared/input.material.scss
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ input:placeholder-shown + [part='notch'] [part='label'],
}

[part='start'] {
border-start-start-radius: var-get($theme, 'border-border-radius');
border-start-start-radius: var-get($theme, 'box-border-radius');
justify-content: flex-start;
grid-area: 1 / 1;

Expand Down Expand Up @@ -113,7 +113,7 @@ input:placeholder-shown + [part='notch'] [part='label'],
}

[part='end'] {
border-start-end-radius: var-get($theme, 'border-border-radius');
border-start-end-radius: var-get($theme, 'box-border-radius');
justify-content: flex-end;
grid-area: 1 / 4;

Expand Down Expand Up @@ -282,6 +282,7 @@ input:placeholder-shown + [part='notch'] [part='label'],
[part~='container'] {
background: var-get($theme, 'box-disabled-background');
border-color: var-get($theme, 'disabled-border-color');
border-block-end-color: var-get( $theme, 'disabled-bottom-line-color');
border-bottom-style: dashed;
}
}
Expand Down Expand Up @@ -610,6 +611,10 @@ input:placeholder-shown + [part='notch'] [part='label'],
border-color: var-get($theme, 'disabled-border-color');
}

[part~='container'] {
background: var-get($theme, 'border-disabled-background');
}

input:placeholder-shown + [part='notch'],
[part~='filled'] + [part='notch'] {
@extend %floated-styles;
Expand Down
20 changes: 10 additions & 10 deletions src/components/textarea/themes/shared/textarea.bootstrap.scss
Original file line number Diff line number Diff line change
Expand Up @@ -38,10 +38,10 @@ $theme: $bootstrap;
[part~='prefixed'] {
[part~='prefix'] {
border-block-width: rem(1px);
border-inline-width: 0;
border-style: solid;
border-color: var-get($theme, 'border-color');
overflow: hidden;
border-inline-width: 0;
border: {
start: {
start-radius: var-get($theme, 'border-border-radius');
Expand All @@ -67,10 +67,10 @@ $theme: $bootstrap;
[part~='suffixed'] {
[part~='suffix'] {
border-block-width: rem(1px);
border-inline-width: 0;
border-style: solid;
border-color: var-get($theme, 'border-color');
overflow: hidden;
border-inline-width: 0;
border: {
start: {
end-radius: var-get($theme, 'border-border-radius');
Expand Down Expand Up @@ -164,22 +164,22 @@ textarea {
box-shadow: none;
}

::slotted([slot='suffix']) {
border-inline-end: rem(1px) solid var(--disabled-border-color);
}

::slotted([slot='prefix']) {
border-inline-start: rem(1px) solid var(--disabled-border-color);
}

::slotted([slot='suffix']) {
border-inline-end: rem(1px) solid var(--disabled-border-color);
}
}

:host(:not([disabled])),
:host(:not(:disabled)) {
::slotted([slot='suffix']) {
border-inline-end: rem(1px) solid var(--border-color);
::slotted([slot='prefix']) {
border-inline-start: rem(1px) solid var(--border-color);
}

::slotted([slot='prefix']) {
border-inline-start: rem(1px) solid var(--border-color);
::slotted([slot='suffix']) {
border-inline-end: rem(1px) solid var(--border-color);
}
}
32 changes: 32 additions & 0 deletions src/components/textarea/themes/shared/textarea.common.scss
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,10 @@ $theme: $base;
}
}

[part~='input'] {
color: var-get($theme, 'idle-text-color');
}

[part~='filled'] {
[part~='input'] {
color: var-get($theme, 'filled-text-color');
Expand Down Expand Up @@ -69,6 +73,34 @@ textarea {
}
}

:host(:not([readonly]):hover) {
[part~='filled'] {
[part~='input'] {
color: var-get($theme, 'filled-text-hover-color');
}
}
}

:host(:not([readonly]):focus-within) {
[part~='prefix'],
[part~='filled'][part~='prefix'] {
color: var-get($theme, 'input-prefix-color--focused');
background: var-get($theme, 'input-prefix-background--focused');
}

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

[part~='filled'] {
[part~='input'] {
color: var-get($theme, 'focused-text-color');
}
}
}

:host(:not([disabled],[readonly]):state(ig-invalid)),
:host(:not(:disabled,[readonly]):state(ig-invalid)) {
::part(helper-text) {
Expand Down
10 changes: 10 additions & 0 deletions src/components/textarea/themes/shared/textarea.fluent.scss
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,16 @@ $border-size: rem(1px);
pointer-events: none;
z-index: 1;
}

[part='prefix']:first-child {
border-start-start-radius: calc(var-get($theme, 'border-border-radius') - rem(1px));
border-end-start-radius: calc(var-get($theme, 'border-border-radius') - rem(1px));
}

[part='suffix']:last-child {
border-start-end-radius: calc(var-get($theme, 'border-border-radius') - rem(1px));
border-end-end-radius: calc(var-get($theme, 'border-border-radius') - rem(1px));
}
}


Expand Down
20 changes: 3 additions & 17 deletions src/components/textarea/themes/shared/textarea.indigo.scss
Original file line number Diff line number Diff line change
Expand Up @@ -29,10 +29,6 @@ $theme: $indigo;
border-color: var-get($theme, 'hover-bottom-line-color');
}
}

textarea {
color: var-get($theme, 'filled-text-hover-color');
}
}

:host(:focus-within),
Expand All @@ -42,18 +38,14 @@ $theme: $indigo;
}

[part~='container'] {
background: var-get($theme, 'box-background-hover');
background: var-get($theme, 'box-background-focus');
caret-color: var-get($theme, 'focused-bottom-line-color');

&::after {
border-block-end-color: var-get($theme, 'focused-bottom-line-color');
transition: all .25s $out-cubic;
}
}

textarea {
color: var-get($theme, 'focused-text-color');
}
}

[part~='label'] {
Expand Down Expand Up @@ -97,12 +89,6 @@ textarea {
}
}

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

[part~='prefixed'] textarea {
padding-inline-start: 0;
}
Expand All @@ -113,13 +99,13 @@ textarea {

[part~='prefixed'] {
[part~='prefix'] {
border-start-start-radius: var-get($theme, 'border-border-radius');
border-start-start-radius: var-get($theme, 'box-border-radius');
}
}

[part~='suffixed'] {
[part~='suffix'] {
border-start-end-radius: var-get($theme, 'border-border-radius');
border-start-end-radius: var-get($theme, 'box-border-radius');
}
}

Expand Down
Loading