Skip to content

Commit b7e71f5

Browse files
authored
Adjust components to new icon set (#675)
1 parent c18d5c4 commit b7e71f5

File tree

4 files changed

+20
-21
lines changed

4 files changed

+20
-21
lines changed

packages/uui-button/lib/uui-button.element.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -322,7 +322,6 @@ export class UUIButtonElement extends FormControlMixin(
322322
}
323323
#icon-check,
324324
#icon-wrong {
325-
fill: currentColor;
326325
display: grid;
327326
place-items: center;
328327
width: 1.5em;

packages/uui-checkbox/lib/uui-checkbox.element.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ export class UUICheckboxElement extends UUIBooleanInputElement {
100100
height: 1em;
101101
line-height: 0;
102102
transition: fill 120ms, opacity 120ms;
103-
fill: var(--uui-color-selected-contrast);
103+
color: var(--uui-color-selected-contrast);
104104
opacity: 0;
105105
}
106106
@@ -166,13 +166,13 @@ export class UUICheckboxElement extends UUIBooleanInputElement {
166166
background-color: var(--uui-color-disabled);
167167
}
168168
:host([disabled]) #ticker #icon-check {
169-
fill: var(--uui-color-disabled-contrast);
169+
color: var(--uui-color-disabled-contrast);
170170
}
171171
:host([disabled]) label:active #ticker {
172172
animation: ${UUIHorizontalShakeAnimationValue};
173173
}
174174
:host([disabled]) input:checked + #ticker #icon-check {
175-
fill: var(--uui-color-disabled-contrast);
175+
color: var(--uui-color-disabled-contrast);
176176
}
177177
`,
178178
];

packages/uui-color-swatch/lib/uui-color-swatch.element.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@ export class UUIColorSwatchElement extends LabelMixin(
110110
this.value})"></div>
111111
<div
112112
class="color-swatch__check"
113-
style="fill: var(--uui-swatch-color, ${this.color ?? this.value})">
113+
style="color: var(--uui-swatch-color, ${this.color ?? this.value})">
114114
${iconCheck}
115115
</div>
116116
</div>

packages/uui-toggle/lib/uui-toggle.element.ts

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import { defineElement } from '@umbraco-ui/uui-base/lib/registration';
66
import { UUIBooleanInputElement } from '@umbraco-ui/uui-boolean-input/lib';
77
import {
88
iconCheck,
9-
iconWrong,
9+
iconRemove,
1010
} from '@umbraco-ui/uui-icon-registry-essential/lib/svgs';
1111
import { css, html } from 'lit';
1212

@@ -39,8 +39,8 @@ export class UUIToggleElement extends UUIBooleanInputElement {
3939
renderCheckbox() {
4040
return html`
4141
<div id="slider">
42-
<div id="icon-check">${iconCheck}</div>
43-
<div id="icon-wrong">${iconWrong}</div>
42+
<div id="icon-checked">${iconCheck}</div>
43+
<div id="icon-unchecked">${iconRemove}</div>
4444
</div>
4545
`;
4646
}
@@ -102,29 +102,29 @@ export class UUIToggleElement extends UUIBooleanInputElement {
102102
background-color: var(--uui-color-selected-emphasis);
103103
}
104104
105-
#icon-check,
106-
#icon-wrong {
105+
#icon-checked,
106+
#icon-unchecked {
107107
position: absolute;
108108
vertical-align: middle;
109109
width: 1em;
110110
height: 1em;
111111
line-height: 0;
112-
transition: fill 120ms;
112+
transition: color 120ms;
113113
}
114114
115-
#icon-check {
115+
#icon-checked {
116116
margin-left: -0.5em;
117117
left: calc(var(--uui-toggle-size) * 0.5);
118-
fill: var(--uui-color-interactive);
118+
color: var(--uui-color-interactive);
119119
}
120120
121-
#icon-wrong {
121+
#icon-unchecked {
122122
margin-right: -0.5em;
123123
right: calc(var(--uui-toggle-size) * 0.5);
124-
fill: var(--uui-color-interactive);
124+
color: var(--uui-color-interactive);
125125
}
126-
input:checked ~ #slider #icon-check {
127-
fill: var(--uui-color-selected-contrast);
126+
input:checked ~ #slider #icon-checked {
127+
color: var(--uui-color-selected-contrast);
128128
}
129129
130130
#slider::after {
@@ -164,14 +164,14 @@ export class UUIToggleElement extends UUIBooleanInputElement {
164164
:host([disabled]) #slider::after {
165165
background-color: var(--uui-color-disabled);
166166
}
167-
:host([disabled]) #slider #icon-wrong {
168-
fill: var(--uui-color-disabled-contrast);
167+
:host([disabled]) #slider #icon-unchecked {
168+
color: var(--uui-color-disabled-contrast);
169169
}
170170
:host([disabled]) label:active #slider {
171171
animation: ${UUIHorizontalShakeAnimationValue};
172172
}
173-
:host([disabled]) input:checked #slider #icon-check {
174-
fill: var(--uui-color-disabled-contrast);
173+
:host([disabled]) input:checked #slider #icon-checked {
174+
color: var(--uui-color-disabled-contrast);
175175
}
176176
177177
:host(:not([pristine]):invalid) #slider,

0 commit comments

Comments
 (0)