@kth/style 0.16.0 → 0.16.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json
CHANGED
|
@@ -44,10 +44,20 @@ $secondary-border-width: math.div(1rem, 16);
|
|
|
44
44
|
}
|
|
45
45
|
|
|
46
46
|
> button::after {
|
|
47
|
-
@include icons.icon-search;
|
|
48
47
|
width: 1.5rem;
|
|
49
48
|
height: 1.5rem;
|
|
50
49
|
background-color: var(--color-secondary);
|
|
51
50
|
}
|
|
51
|
+
|
|
52
|
+
> button:not(.loading)::after {
|
|
53
|
+
@include icons.icon-search;
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
> button.loading::after {
|
|
57
|
+
@include icons.icon-spinner;
|
|
58
|
+
content: "";
|
|
59
|
+
display: block;
|
|
60
|
+
margin: auto;
|
|
61
|
+
}
|
|
52
62
|
}
|
|
53
63
|
}
|
|
@@ -17,6 +17,7 @@ $icon-new-window-500: url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fw
|
|
|
17
17
|
$icon-search: url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%2220%22%20height%3D%2220%22%20fill%3D%22none%22%3E%3Cpath%20fill%3D%22%23212121%22%20d%3D%22m15.89%2016.647-4.964-4.963a4.96%204.96%200%200%201-1.37.735c-.498.174-1.01.26-1.54.26-1.3%200-2.404-.454-3.314-1.364C3.792%2010.405%203.337%209.3%203.337%208S3.792%205.598%204.7%204.687c.91-.911%202.015-1.366%203.314-1.366s2.403.455%203.314%201.365c.911.91%201.366%202.015%201.366%203.315%200%20.545-.089%201.066-.268%201.563a4.993%204.993%200%200%201-.727%201.346l4.963%204.963-.774.774Zm-7.874-5.05c1.004%200%201.855-.35%202.551-1.046.697-.696%201.045-1.547%201.045-2.551%200-1.004-.348-1.855-1.045-2.551-.696-.697-1.547-1.045-2.551-1.045-1.004%200-1.855.348-2.551%201.045C4.768%206.145%204.42%206.996%204.42%208c0%201.004.348%201.855%201.045%202.551.696.697%201.547%201.045%202.551%201.045Z%22%2F%3E%3C%2Fsvg%3E");
|
|
18
18
|
$icon-sort-asc: url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%2220%22%20height%3D%2220%22%20fill%3D%22none%22%3E%3Cpath%20fill%3D%22%23212121%22%20d%3D%22M15.833%2014.167h2.5L15%2017.5l-3.333-3.333h2.5V2.5h1.666v11.667Zm-14.166%200H10v1.666H1.667v-1.666ZM5%204.167v1.666H1.667V4.167H5Zm-3.333%205H7.5v1.666H1.667V9.167Z%22%2F%3E%3C%2Fsvg%3E");
|
|
19
19
|
$icon-sort-desc: url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%2220%22%20height%3D%2220%22%20fill%3D%22none%22%3E%3Cpath%20fill%3D%22%23212121%22%20d%3D%22M15.833%205.833h2.5L15%202.5l-3.333%203.333h2.5V17.5h1.666V5.833ZM1.667%2014.167H10v1.666H1.667v-1.666ZM5%204.167v1.666H1.667V4.167H5Zm-3.333%205H7.5v1.666H1.667V9.167Z%22%2F%3E%3C%2Fsvg%3E");
|
|
20
|
+
$icon-spinner: url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%2220%22%20height%3D%2220%22%20fill%3D%22none%22%3E%3Cpath%20fill%3D%22%23000%22%20d%3D%22M17%2010a7%207%200%201%200-7%207v-1.75A5.25%205.25%200%201%201%2015.25%2010H17Z%22%2F%3E%3C%2Fsvg%3E");
|
|
20
21
|
$icon-star-off: url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%2220%22%20height%3D%2220%22%20fill%3D%22none%22%3E%3Cpath%20fill%3D%22%23212121%22%20d%3D%22M7.333%2014.896%2010%2013.312l2.688%201.584-.709-3%202.313-1.98-3.063-.27L10%206.792%208.77%209.646l-3.062.27%202.334%201.98-.709%203ZM5.063%2018l1.312-5.542L2%208.73l5.75-.5L10%203l2.25%205.25%205.75.48-4.375%203.728L14.938%2018%2010%2015.062%205.062%2018Z%22%2F%3E%3C%2Fsvg%3E");
|
|
21
22
|
$icon-star-on: url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%2220%22%20height%3D%2220%22%20fill%3D%22none%22%3E%3Cpath%20fill%3D%22%23212121%22%20d%3D%22m5.063%2018%201.312-5.542L2%208.73l5.75-.5L10%203l2.25%205.25%205.75.48-4.375%203.728L14.938%2018%2010%2015.062%205.062%2018Z%22%2F%3E%3C%2Fsvg%3E");
|
|
22
23
|
$icon-thumbs_up: url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%2220%22%20height%3D%2220%22%20fill%3D%22none%22%3E%3Cpath%20fill%3D%22%23212121%22%20d%3D%22M14.876%2017.289h-9.53V7.099l5.925-5.925.798.537c.248.174.439.398.572.672.133.273.172.559.117.857l-.021.049-.777%203.81h5.435c.474%200%20.88.17%201.22.51.34.34.51.747.51%201.22v.883c0%20.12-.01.229-.032.328-.02.1-.055.2-.103.3l-2.51%205.902c-.142.315-.358.568-.65.76-.29.191-.61.287-.954.287ZM7%2015.559h7.876l2.51-5.847V8.83H9.922l.96-4.819L7%207.894v7.666ZM5.346%207.1v1.73H2.5v6.73h2.846v1.73H.77V7.099h4.575Z%22%2F%3E%3C%2Fsvg%3E");
|
package/scss/tokens/icons.scss
CHANGED
|
@@ -1,5 +1,12 @@
|
|
|
1
1
|
@use "./icons-raw.scss" as raw;
|
|
2
2
|
|
|
3
|
+
// TODO: move it somewhere else?
|
|
4
|
+
@keyframes spin {
|
|
5
|
+
to {
|
|
6
|
+
transform: rotate(1turn);
|
|
7
|
+
}
|
|
8
|
+
}
|
|
9
|
+
|
|
3
10
|
@mixin with-icon($icon, $size: 1.25rem) {
|
|
4
11
|
// We use this variable to avoid sending the same data twice to the users
|
|
5
12
|
--icon: #{$icon};
|
|
@@ -79,3 +86,8 @@
|
|
|
79
86
|
@mixin icon-new-window-500 {
|
|
80
87
|
@include with-icon(raw.$icon-new-window-500);
|
|
81
88
|
}
|
|
89
|
+
|
|
90
|
+
@mixin icon-spinner {
|
|
91
|
+
@include with-icon(raw.$icon-spinner);
|
|
92
|
+
animation: spin 750ms infinite linear;
|
|
93
|
+
}
|