Skip to content

Commit 499786a

Browse files
authored
Feat: update style to match new icon style (#904)
1 parent cd598e8 commit 499786a

File tree

4 files changed

+51
-23
lines changed

4 files changed

+51
-23
lines changed

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

+10-5
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,15 @@ export class UUICaretElement extends LitElement {
2525
}
2626

2727
render() {
28-
return html`<svg viewBox="0 0 512 512">
29-
<path d="M 255.125 400.35 L 88.193 188.765 H 422.055 Z"></path>
28+
return html`<svg
29+
xmlns="http://www.w3.org/2000/svg"
30+
viewBox="0 0 24 24"
31+
fill="none"
32+
stroke="currentColor"
33+
stroke-width="3"
34+
stroke-linecap="round"
35+
stroke-linejoin="round">
36+
<path d="m4 9 8 8 8-8"></path>
3037
</svg>`;
3138
}
3239

@@ -39,10 +46,8 @@ export class UUICaretElement extends LitElement {
3946
}
4047
4148
svg {
42-
fill: currentColor;
4349
transform-origin: 50% 50%;
44-
transition: transform 280ms cubic-bezier(0.17, -0.88, 0.82, 1.84); /* Julia's beloved easing */
45-
}
50+
transition: transform 100ms cubic-bezier(0.1, 0, 0.9, 1);
4651
4752
:host([open]) svg {
4853
transform: rotate(180deg);

packages/uui-symbol-expand/lib/uui-symbol-expand.element.ts

+10-4
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,15 @@ export class UUISymbolExpandElement extends LitElement {
1818
public open = false;
1919

2020
render() {
21-
return html`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512">
22-
<path d="M 255.125 400.35 L 88.193 188.765 H 422.055 Z"></path>
21+
return html`<svg
22+
xmlns="http://www.w3.org/2000/svg"
23+
viewBox="0 0 24 24"
24+
fill="none"
25+
stroke="currentColor"
26+
stroke-width="3"
27+
stroke-linecap="round"
28+
stroke-linejoin="round">
29+
<path d="m4 9 8 8 8-8"></path>
2330
</svg>`;
2431
}
2532

@@ -32,10 +39,9 @@ export class UUISymbolExpandElement extends LitElement {
3239
}
3340
3441
svg {
35-
fill: currentColor;
3642
transform: rotate(-90deg);
3743
transform-origin: 50% 50%;
38-
transition: transform 120ms ease-in-out;
44+
transition: transform 100ms cubic-bezier(0.1, 0, 0.9, 1);
3945
width: 100%;
4046
height: 100%;
4147
}

packages/uui-symbol-sort/lib/uui-symbol-sort.element.ts

+30-14
Original file line numberDiff line numberDiff line change
@@ -19,14 +19,31 @@ export class UUISymbolSortElement extends ActiveMixin(LitElement) {
1919
public descending = false;
2020

2121
render() {
22-
return html`<svg
22+
return html` <svg
2323
id="up"
2424
xmlns="http://www.w3.org/2000/svg"
25-
viewBox="0 0 512 512">
26-
<path d="M 255.125 400.35 L 88.193 188.765 H 422.055 Z"></path>
25+
width="24"
26+
height="24"
27+
viewBox="0 0 24 24"
28+
fill="none"
29+
stroke="currentColor"
30+
stroke-width="3"
31+
stroke-linecap="round"
32+
stroke-linejoin="round">
33+
<path d="m4 9 8 8 8-8"></path>
2734
</svg>
28-
<svg id="down" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512">
29-
<path d="M 255.125 400.35 L 88.193 188.765 H 422.055 Z"></path>
35+
<svg
36+
id="down"
37+
xmlns="http://www.w3.org/2000/svg"
38+
width="24"
39+
height="24"
40+
viewBox="0 0 24 24"
41+
fill="none"
42+
stroke="currentColor"
43+
stroke-width="3"
44+
stroke-linecap="round"
45+
stroke-linejoin="round">
46+
<path d="m4 9 8 8 8-8"></path>
3047
</svg>`;
3148
}
3249

@@ -35,39 +52,38 @@ export class UUISymbolSortElement extends ActiveMixin(LitElement) {
3552
:host {
3653
position: relative;
3754
display: inline-block;
38-
width: 0.8em;
55+
width: 0.9em;
3956
height: 1em;
40-
vertical-align: middle;
57+
//vertical-align: middle;
4158
pointer-events: none;
4259
}
4360
4461
svg {
4562
position: absolute;
4663
left: 0;
4764
top: 50%;
48-
width: 0.8em;
49-
fill: currentColor;
65+
width: 0.9em;
5066
transform-origin: 50% 50%;
5167
transition:
5268
transform 120ms ease-in-out,
5369
opacity 120ms,
5470
margin-top 240ms;
5571
opacity: 0;
56-
margin-top: -0.5em;
72+
margin-top: -8em;
5773
}
5874
5975
#up {
6076
transform: rotate(180deg);
61-
margin-top: -0.7em;
77+
margin-top: -1.05em;
6278
}
6379
#down {
64-
margin-top: -0.3em;
80+
margin-top: -0.55em;
6581
}
6682
:host([active]) #up {
67-
margin-top: calc(-0.5em - (0.2em * var(--uui-symbol-sort-hover, 0)));
83+
margin-top: calc(-0.8em - (0.25em * var(--uui-symbol-sort-hover, 0)));
6884
}
6985
:host([active]) #down {
70-
margin-top: calc(-0.5em + (0.2em * var(--uui-symbol-sort-hover, 0)));
86+
margin-top: calc(-0.8em + (0.25em * var(--uui-symbol-sort-hover, 0)));
7187
}
7288
7389
:host(:hover) {

packages/uui-table/lib/uui-table.story.ts

+1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
import '.';
22
import './uui-table-advanced-example';
33
import '@umbraco-ui/uui-box/lib';
4+
import '@umbraco-ui/uui-symbol-sort/lib';
45

56
import { Meta, Story } from '@storybook/web-components';
67
import { html } from 'lit';

0 commit comments

Comments
 (0)