Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adjust components to new icon set #675

Merged
merged 1 commit into from
Nov 30, 2023
Merged
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
1 change: 0 additions & 1 deletion packages/uui-button/lib/uui-button.element.ts
Original file line number Diff line number Diff line change
Expand Up @@ -322,7 +322,6 @@ export class UUIButtonElement extends FormControlMixin(
}
#icon-check,
#icon-wrong {
fill: currentColor;
display: grid;
place-items: center;
width: 1.5em;
Expand Down
6 changes: 3 additions & 3 deletions packages/uui-checkbox/lib/uui-checkbox.element.ts
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ export class UUICheckboxElement extends UUIBooleanInputElement {
height: 1em;
line-height: 0;
transition: fill 120ms, opacity 120ms;
fill: var(--uui-color-selected-contrast);
color: var(--uui-color-selected-contrast);
opacity: 0;
}

Expand Down Expand Up @@ -166,13 +166,13 @@ export class UUICheckboxElement extends UUIBooleanInputElement {
background-color: var(--uui-color-disabled);
}
:host([disabled]) #ticker #icon-check {
fill: var(--uui-color-disabled-contrast);
color: var(--uui-color-disabled-contrast);
}
:host([disabled]) label:active #ticker {
animation: ${UUIHorizontalShakeAnimationValue};
}
:host([disabled]) input:checked + #ticker #icon-check {
fill: var(--uui-color-disabled-contrast);
color: var(--uui-color-disabled-contrast);
}
`,
];
Expand Down
2 changes: 1 addition & 1 deletion packages/uui-color-swatch/lib/uui-color-swatch.element.ts
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ export class UUIColorSwatchElement extends LabelMixin(
this.value})"></div>
<div
class="color-swatch__check"
style="fill: var(--uui-swatch-color, ${this.color ?? this.value})">
style="color: var(--uui-swatch-color, ${this.color ?? this.value})">
${iconCheck}
</div>
</div>
Expand Down
32 changes: 16 additions & 16 deletions packages/uui-toggle/lib/uui-toggle.element.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import { defineElement } from '@umbraco-ui/uui-base/lib/registration';
import { UUIBooleanInputElement } from '@umbraco-ui/uui-boolean-input/lib';
import {
iconCheck,
iconWrong,
iconRemove,
} from '@umbraco-ui/uui-icon-registry-essential/lib/svgs';
import { css, html } from 'lit';

Expand Down Expand Up @@ -39,8 +39,8 @@ export class UUIToggleElement extends UUIBooleanInputElement {
renderCheckbox() {
return html`
<div id="slider">
<div id="icon-check">${iconCheck}</div>
<div id="icon-wrong">${iconWrong}</div>
<div id="icon-checked">${iconCheck}</div>
<div id="icon-unchecked">${iconRemove}</div>
</div>
`;
}
Expand Down Expand Up @@ -102,29 +102,29 @@ export class UUIToggleElement extends UUIBooleanInputElement {
background-color: var(--uui-color-selected-emphasis);
}

#icon-check,
#icon-wrong {
#icon-checked,
#icon-unchecked {
position: absolute;
vertical-align: middle;
width: 1em;
height: 1em;
line-height: 0;
transition: fill 120ms;
transition: color 120ms;
}

#icon-check {
#icon-checked {
margin-left: -0.5em;
left: calc(var(--uui-toggle-size) * 0.5);
fill: var(--uui-color-interactive);
color: var(--uui-color-interactive);
}

#icon-wrong {
#icon-unchecked {
margin-right: -0.5em;
right: calc(var(--uui-toggle-size) * 0.5);
fill: var(--uui-color-interactive);
color: var(--uui-color-interactive);
}
input:checked ~ #slider #icon-check {
fill: var(--uui-color-selected-contrast);
input:checked ~ #slider #icon-checked {
color: var(--uui-color-selected-contrast);
}

#slider::after {
Expand Down Expand Up @@ -164,14 +164,14 @@ export class UUIToggleElement extends UUIBooleanInputElement {
:host([disabled]) #slider::after {
background-color: var(--uui-color-disabled);
}
:host([disabled]) #slider #icon-wrong {
fill: var(--uui-color-disabled-contrast);
:host([disabled]) #slider #icon-unchecked {
color: var(--uui-color-disabled-contrast);
}
:host([disabled]) label:active #slider {
animation: ${UUIHorizontalShakeAnimationValue};
}
:host([disabled]) input:checked #slider #icon-check {
fill: var(--uui-color-disabled-contrast);
:host([disabled]) input:checked #slider #icon-checked {
color: var(--uui-color-disabled-contrast);
}

:host(:not([pristine]):invalid) #slider,
Expand Down