Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
b906ca469d | ||
|
|
ed9286f75b | ||
|
|
445f6b8309 | ||
|
|
27dacfdbe9 | ||
|
|
b8b7ad142d | ||
|
|
29b244e69b | ||
|
|
6f2325bbb3 | ||
|
|
9f575b76b8 | ||
|
|
4e05993427 | ||
|
|
85a7521197 | ||
|
|
f635be70d0 | ||
|
|
b675a5b9ba | ||
|
|
cc842113c3 | ||
|
|
f36d4c46d7 | ||
|
|
d7bd84f6ee | ||
|
|
c33702bf08 | ||
|
|
57efe4b8ae | ||
|
|
b0da33c366 | ||
|
|
c67e051bdc | ||
|
|
960a08247c | ||
|
|
b1a1a896d5 | ||
|
|
596b94ffae | ||
|
|
273a0cd78f | ||
|
|
9ab920a288 | ||
|
|
03cdeff3a0 | ||
|
|
a8160ada1c | ||
|
|
efad85b383 | ||
|
|
51a71b6efc | ||
|
|
5cd03cb969 | ||
|
|
cfb692d62a | ||
|
|
7e789158ce | ||
|
|
a8ad03de7d | ||
|
|
627f9f7f01 | ||
|
|
3b1c8c7666 | ||
|
|
84506691af | ||
|
|
be647e2ada | ||
|
|
1698137b96 | ||
|
|
02d7f91eff | ||
|
|
5b78f71884 | ||
|
|
54a43cf924 | ||
|
|
6fcbb72a6f | ||
|
|
b69f30f69b | ||
|
|
265e105fd0 | ||
|
|
8d934e0931 | ||
|
|
6981fbccff | ||
|
|
bfee5a822e | ||
|
|
58ed3b5367 | ||
|
|
00b3dd7d59 | ||
|
|
90db7dd0c1 | ||
|
|
b6d0304d5a | ||
|
|
de0a797e09 | ||
|
|
c4eaf0f350 | ||
|
|
fb9897e6a0 | ||
|
|
3438b5d7e7 | ||
|
|
3583062824 | ||
|
|
2993f809ad | ||
|
|
fe25e1fdf2 | ||
|
|
5cda39ce19 | ||
|
|
6cb25e44de | ||
|
|
5812d6ee87 | ||
|
|
a402777c70 | ||
|
|
d4064bd461 | ||
|
|
1c482e03b8 | ||
|
|
608e1f3944 | ||
|
|
107d6f3d93 | ||
|
|
09d41e9b6d | ||
|
|
ebacbddd44 | ||
|
|
e58b072c84 | ||
|
|
e7cb3753a0 | ||
|
|
7486ba11f9 | ||
|
|
cf01a6e162 | ||
|
|
a67f95433f | ||
|
|
dd03078e33 | ||
|
|
72321e3846 | ||
|
|
1cd8ac93ed | ||
|
|
48d6f14103 | ||
|
|
44da7fcdc6 | ||
|
|
e68ab5cb2c | ||
|
|
c721b392f9 | ||
|
|
1d0d0ce665 | ||
|
|
9d02940543 | ||
|
|
7ff63a2c63 | ||
|
|
49f33a78d8 | ||
|
|
06aaec70f0 | ||
|
|
5fbf230e47 | ||
|
|
53265c247e | ||
|
|
d78f33df79 | ||
|
|
4375c55ab6 | ||
|
|
0de8238ecf | ||
|
|
647b14a238 | ||
|
|
64901adccb | ||
|
|
49ddb2094c | ||
|
|
8a5f209735 | ||
|
|
d3bd1202ed | ||
|
|
4bf6027518 | ||
|
|
c8e203c523 | ||
|
|
267799ca0e | ||
|
|
42934af3a1 | ||
|
|
eff8a902c5 | ||
|
|
d34a8f45ef | ||
|
|
d1ceb40439 | ||
|
|
e033b34c3b | ||
|
|
de3991d0f0 | ||
|
|
9641215506 | ||
|
|
8a82e1c1f6 | ||
|
|
a2dfc8699b | ||
|
|
492cfc1801 | ||
|
|
9ca5932fed | ||
|
|
5950673fbf | ||
|
|
5b42ff07ee | ||
|
|
09ba52ea76 | ||
|
|
a82bccf707 | ||
|
|
89ae778c24 | ||
|
|
5b2669d35d | ||
|
|
8a82bb4a96 | ||
|
|
7871e0f95c | ||
|
|
3182888a07 | ||
|
|
f2742da085 | ||
|
|
92721aefa0 | ||
|
|
e6fdfdc9b4 | ||
|
|
93975bc935 | ||
|
|
3a0dac3997 | ||
|
|
1d43710af0 | ||
|
|
6df7c78e3c | ||
|
|
476d79e487 | ||
|
|
238a715c92 | ||
|
|
0fadd33e3e | ||
|
|
eadc0bce13 | ||
|
|
678db9b11b | ||
|
|
e3027cc196 | ||
|
|
ac0fd790e3 | ||
|
|
c344c9beb4 | ||
|
|
5cb5dea4ff | ||
|
|
054c63b161 | ||
|
|
f60ba32f97 | ||
|
|
54811b394d | ||
|
|
c6b0570c4c | ||
|
|
8baa1ab0b4 | ||
|
|
06ceeb3e6f | ||
|
|
02f19858c7 | ||
|
|
799e26a628 | ||
|
|
f5e5843916 | ||
|
|
4b8ed30554 | ||
|
|
28430f1345 | ||
|
|
d242325863 | ||
|
|
ae70bfa719 | ||
|
|
0aef861622 | ||
|
|
525b021e0f | ||
|
|
761344c34e | ||
|
|
a67f61c33f | ||
|
|
b05958863b | ||
|
|
883ae00dfa | ||
|
|
6eb8a79092 | ||
|
|
718b3204d8 | ||
|
|
45970ac0fb | ||
|
|
fe5e8ada74 | ||
|
|
3e625a5cb5 | ||
|
|
edc3495ce6 | ||
|
|
2520bc7ff5 | ||
|
|
44446e753a | ||
|
|
4156326752 | ||
|
|
23970486ed | ||
|
|
a8f1069650 | ||
|
|
f9c8320b74 | ||
|
|
c4839a12ed | ||
|
|
60f64d7f70 | ||
|
|
e32dbe5c5d | ||
|
|
de36269582 | ||
|
|
6cb6c52770 | ||
|
|
a877d24ed0 | ||
|
|
a1b6332fa1 | ||
|
|
99c08b8e4a | ||
|
|
d39ed906c6 | ||
|
|
3b31bd3d75 | ||
|
|
b1625ba388 | ||
|
|
269d06c277 | ||
|
|
0c56273f3b | ||
|
|
ab6a96aed7 | ||
|
|
9ee8a72082 | ||
|
|
c2e5a92d8e | ||
|
|
6059aa59aa | ||
|
|
b877ada408 | ||
|
|
4e339f183e | ||
|
|
1d62bf26ff | ||
|
|
da0fbc3299 | ||
|
|
9f59e67e2a | ||
|
|
ed7aafcac8 | ||
|
|
dfbbe92a63 | ||
|
|
42b5af64ab | ||
|
|
329119fa04 | ||
|
|
0fc80f45cb | ||
|
|
337b9fda13 | ||
|
|
659e835da9 | ||
|
|
e10f4375b1 | ||
|
|
9a8bb26c36 | ||
|
|
69aea38784 | ||
|
|
8f16d1571e | ||
|
|
e2265c9a78 | ||
|
|
925aa7a140 | ||
|
|
7c17e40cac | ||
|
|
3c8889ea88 | ||
|
|
e060961050 | ||
|
|
18aa4ee7fb | ||
|
|
f44edd76a2 | ||
|
|
1fa636bdd5 | ||
|
|
44a75acb6b | ||
|
|
550faee900 | ||
|
|
88b6174b0b | ||
|
|
fbf016b3bd | ||
|
|
09fa503b98 | ||
|
|
f5688485f5 | ||
|
|
6385c4686e | ||
|
|
30068dca3f | ||
|
|
3aa04d2375 | ||
|
|
91343563c9 | ||
|
|
d5c8112339 | ||
|
|
e6cc9d1b4f | ||
|
|
db8c38a094 | ||
|
|
35041e64eb | ||
|
|
690422d824 | ||
|
|
b54bebd308 | ||
|
|
8db194170c | ||
|
|
7b42f536aa | ||
|
|
b2f796d681 | ||
|
|
17d92c9ed5 | ||
|
|
7bae5dce88 | ||
|
|
6aca0a4b6a | ||
|
|
4f7fde22a3 | ||
|
|
0dad69a8df | ||
|
|
c028f36e2b | ||
|
|
988fb36619 | ||
|
|
f61cd88627 | ||
|
|
7d62019a13 | ||
|
|
83e3a1131a | ||
|
|
895bdc08e5 | ||
|
|
3c991e13d1 | ||
|
|
0c24d57c6c | ||
|
|
0f0041b71e | ||
|
|
da40cc405c | ||
|
|
c135cbe642 | ||
|
|
2a2e9edbd7 | ||
|
|
d22d6049e8 | ||
|
|
f9bea26a29 | ||
|
|
239017b07a | ||
|
|
7615dbbb54 | ||
|
|
4034eea298 | ||
|
|
68501b4c8a | ||
|
|
61c4114214 | ||
|
|
b958d41a20 | ||
|
|
c3905aa2f8 | ||
|
|
812a2347a0 | ||
|
|
deb1c151bb | ||
|
|
784d17165d | ||
|
|
1a894829f0 | ||
|
|
e06a76b5c5 | ||
|
|
18d6f63e3e | ||
|
|
4953e6725e | ||
|
|
5533fbd5a3 | ||
|
|
2c54cd077b | ||
|
|
c84efa5ee9 | ||
|
|
9f3bcb8974 | ||
|
|
c8375ba46f | ||
|
|
288cef591a | ||
|
|
aa3b4c22d6 | ||
|
|
46af5defd9 | ||
|
|
30eee0dac4 | ||
|
|
76b3a65572 | ||
|
|
cb7a78e20c | ||
|
|
475e994f49 | ||
|
|
53c98181c3 | ||
|
|
444e905e01 | ||
|
|
b7a97339f8 | ||
|
|
1ac0f25420 | ||
|
|
29ddcd59e7 | ||
|
|
6d6267fe01 | ||
|
|
ee38a55837 | ||
|
|
b86ccc4f7f | ||
|
|
9a98f0eae4 | ||
|
|
affcab14c3 | ||
|
|
d51b0238d5 | ||
|
|
c818a92355 | ||
|
|
e8ecf309a9 | ||
|
|
060d4f3c7c | ||
|
|
1871038837 | ||
|
|
5e79234eff | ||
|
|
b8bebace11 | ||
|
|
14379a02c3 | ||
|
|
d716ebbc40 | ||
|
|
f1c4c46ebb | ||
|
|
9d2cd9e7ff | ||
|
|
2fe5a0a0e2 | ||
|
|
db3846f5cd | ||
|
|
fa2ead912a | ||
|
|
11e9b9bef2 | ||
|
|
6f53b33e69 | ||
|
|
166ee5feb3 | ||
|
|
c29d2aba1b | ||
|
|
2568fe70b1 | ||
|
|
8790c5997e | ||
|
|
5b12778c96 | ||
|
|
3edb149b01 | ||
|
|
8c85590099 | ||
|
|
029d3c7719 | ||
|
|
7019898c09 | ||
|
|
36f4f5646a | ||
|
|
27b2b4a11c | ||
|
|
9c0174e206 | ||
|
|
b99a29f805 | ||
|
|
c03d53d5aa | ||
|
|
30330473b1 | ||
|
|
b1e18fd724 | ||
|
|
5b458c2d52 | ||
|
|
6450922b32 | ||
|
|
f6e3840cde | ||
|
|
1afdee453f | ||
|
|
1c7734fb09 | ||
|
|
9816c4f3a9 | ||
|
|
c40bf79a46 | ||
|
|
b1cf8e4724 | ||
|
|
4578693878 | ||
|
|
297aef13ad | ||
|
|
d5c040d24f | ||
|
|
250d6c55b6 | ||
|
|
de69c6c18b | ||
|
|
657b7f3f3e | ||
|
|
00697c7581 | ||
|
|
a556ac6d44 | ||
|
|
32c7228504 | ||
|
|
ff001f2bcf | ||
|
|
048dc285eb | ||
|
|
ecd58dd7d3 | ||
|
|
2845342468 | ||
|
|
6682be1c8e | ||
|
|
dfe923582a | ||
|
|
d6e2705700 | ||
|
|
f0d9a8853f | ||
|
|
19a8c46378 | ||
|
|
e5edad201a | ||
|
|
ecd6241e57 | ||
|
|
6ab0935a1f | ||
|
|
ac0595135e | ||
|
|
29928ef32e | ||
|
|
9b4c7d972c | ||
|
|
f003fd38f7 | ||
|
|
86cdc9cb70 | ||
|
|
dac31f6dda | ||
|
|
85353d2c4f | ||
|
|
cd927bdc46 | ||
|
|
fcec29fd60 | ||
|
|
2704279107 | ||
|
|
46cbb4ba87 | ||
|
|
63fdacf0f8 | ||
|
|
b5c8a94378 | ||
|
|
212194964c | ||
|
|
d151cf4c07 | ||
|
|
44ba7a3a79 | ||
|
|
d94a636dc4 | ||
|
|
36ae2e5005 | ||
|
|
ed8e284540 | ||
|
|
262d59cf98 | ||
|
|
57705de77c | ||
|
|
4ec35a01ca | ||
|
|
6113e6e59f | ||
|
|
7f3f025db2 | ||
|
|
44671abb5f | ||
|
|
2eb358ad88 | ||
|
|
6bdc02761b | ||
|
|
f52ef19be2 | ||
|
|
989a97a8bc | ||
|
|
8de6ba22c3 | ||
|
|
f664370826 | ||
|
|
55b5856183 | ||
|
|
5a72a62190 | ||
|
|
d89eaccd44 | ||
|
|
7cffc0bf12 | ||
|
|
8d4966c83f | ||
|
|
edcc4e5071 | ||
|
|
a5821578a0 | ||
|
|
7ff8ce7e3b | ||
|
|
fa0c07e04a | ||
|
|
e97b31ea94 | ||
|
|
d1549cb5ff | ||
|
|
01bcbbf1ff | ||
|
|
41fd9e7b25 | ||
|
|
e468f9d93e | ||
|
|
ccd9e73446 | ||
|
|
eb2c7ab777 | ||
|
|
0ccee41b7c | ||
|
|
865a19c681 | ||
|
|
eabad5af35 | ||
|
|
7ab07f3f46 | ||
|
|
5ead5f9cde | ||
|
|
1fb56a32d0 | ||
|
|
1609604073 | ||
|
|
f862aa9c2e | ||
|
|
c88632d92c | ||
|
|
70bf09a4d6 | ||
|
|
0cce29182b | ||
|
|
a7b619dd18 | ||
|
|
945ea68414 | ||
|
|
9e5b5a461f | ||
|
|
66dc7e41ed | ||
|
|
8fce648c79 | ||
|
|
f85a2bd834 | ||
|
|
6812a18a34 | ||
|
|
34f421835c | ||
|
|
9c495cf503 | ||
|
|
721a315f67 | ||
|
|
d508423406 | ||
|
|
c9c8bf72e8 | ||
|
|
d9bb32ace0 | ||
|
|
6082485287 | ||
|
|
2b2b3aa819 | ||
|
|
5628f1c4dd | ||
|
|
b5666ed040 | ||
|
|
72aa6325ed | ||
|
|
e1f2a46ae0 | ||
|
|
489c6678d2 | ||
|
|
be4a951962 | ||
|
|
1276b4d7ef | ||
|
|
8880b0dfb5 | ||
|
|
bfe60a9a62 | ||
|
|
9c70200962 | ||
|
|
33aef230b0 | ||
|
|
88243f76de | ||
|
|
c00112e3e6 | ||
|
|
3c66b00c24 | ||
|
|
db8303af42 | ||
|
|
5fbd2e1814 | ||
|
|
c1360da7d7 | ||
|
|
de2a3990dc | ||
|
|
46433118b2 | ||
|
|
de861e469c | ||
|
|
85697be305 | ||
|
|
ae64920a34 | ||
|
|
36fb35533d | ||
|
|
3709e432bb | ||
|
|
c6077a03fa | ||
|
|
c6d51a0190 | ||
|
|
777d94b3d4 | ||
|
|
7ace69f215 | ||
|
|
6724bb8f71 | ||
|
|
59253e992f | ||
|
|
91b6e0be18 | ||
|
|
02f5c29723 | ||
|
|
2221b2e01d | ||
|
|
b31b1b3533 | ||
|
|
ff8bcb870e | ||
|
|
0a7e6311de | ||
|
|
961d97ef0d | ||
|
|
f2477e772d | ||
|
|
bad960be56 | ||
|
|
c53e3a050b | ||
|
|
d9e40b71b1 | ||
|
|
c1828f992f | ||
|
|
522bb95ddb | ||
|
|
7ab690d210 | ||
|
|
859d5d6407 | ||
|
|
de741ce8a8 | ||
|
|
918d21c3ba | ||
|
|
121a678fa0 | ||
|
|
576790a2ff | ||
|
|
6609631f46 | ||
|
|
3e7beb6765 | ||
|
|
a22ac3eb78 | ||
|
|
7c37e3af56 | ||
|
|
9703f082f1 | ||
|
|
18005f89a2 | ||
|
|
8a4321ebd3 | ||
|
|
28938dd4a6 | ||
|
|
bb3a431e2a | ||
|
|
00e787a400 | ||
|
|
04215daf7e | ||
|
|
2c722e3a7d | ||
|
|
8d511c90f1 | ||
|
|
8be270c8c5 | ||
|
|
426f4d54a1 | ||
|
|
8ff68266c8 | ||
|
|
224d894488 | ||
|
|
b265dcaa42 | ||
|
|
dbb35fa10f | ||
|
|
a8956bfe0d | ||
|
|
7065175d84 | ||
|
|
34eb101902 | ||
|
|
d31ed4cb6c | ||
|
|
7f21fd7700 | ||
|
|
082765df58 | ||
|
|
b0fd72ebfc | ||
|
|
13afd5da41 | ||
|
|
1f37816e72 | ||
|
|
5c3f4e4bc7 | ||
|
|
31bc51ac01 | ||
|
|
2ee29881a5 | ||
|
|
29711bf44d | ||
|
|
ed2ad43915 | ||
|
|
c02c0a585a | ||
|
|
ca680926fe | ||
|
|
8b84c24610 | ||
|
|
52a37f949f | ||
|
|
a4fd1dd227 | ||
|
|
a11aa34bf9 | ||
|
|
4da85498e5 | ||
|
|
6cee85ce9a | ||
|
|
c95480c724 | ||
|
|
185349e9b5 | ||
|
|
60d325fcc5 | ||
|
|
ccbaa18df9 | ||
|
|
853f2ae760 | ||
|
|
411bb36c32 | ||
|
|
2bfd685ca1 | ||
|
|
4d24fa2c07 | ||
|
|
b305323f31 | ||
|
|
0b21e96448 | ||
|
|
70d89690bd | ||
|
|
bae6c74116 | ||
|
|
27532dfe53 | ||
|
|
9f2957436d | ||
|
|
5c5c860a03 | ||
|
|
622b48fc1a | ||
|
|
5a6f5d4c81 | ||
|
|
2f6135c1a6 | ||
|
|
0da0b63e1d | ||
|
|
7d9517cf90 | ||
|
|
c1d6ae8e5c | ||
|
|
de291a9722 | ||
|
|
08006cc04b | ||
|
|
ba7c057f8c | ||
|
|
59d32e52c4 | ||
|
|
2d116c3a27 | ||
|
|
1c5e06438c | ||
|
|
0790797340 | ||
|
|
e8b5b44f28 | ||
|
|
0ff40cecbf | ||
|
|
dcb4d2ca4b | ||
|
|
70d88ef3b0 | ||
|
|
40da0e4113 | ||
|
|
61ffd8a08f | ||
|
|
a201abc29b | ||
|
|
e505506655 | ||
|
|
d02e9db739 | ||
|
|
996f49cd82 | ||
|
|
e582380724 | ||
|
|
2d8b66fa4c | ||
|
|
3c544d2771 | ||
|
|
b575816e73 | ||
|
|
71d30afab1 | ||
|
|
d488b83738 | ||
|
|
c6952576ff | ||
|
|
1c5db8dacf | ||
|
|
ac1e69b342 | ||
|
|
a10285a50d | ||
|
|
2843a6cc56 | ||
|
|
ac3187de75 | ||
|
|
647b749535 | ||
|
|
2c7e86503f | ||
|
|
4abe46455a | ||
|
|
8893b5c82d | ||
|
|
19b16fff75 | ||
|
|
2f1974d7bf | ||
|
|
b07972d7dd | ||
|
|
f962bc7816 |
No files matched your search
@@ -30,10 +30,8 @@ Alle base-pakkene våre har `fixed versjonering`. Dette tilsier at en bump på e
|
||||
```sh
|
||||
"@navikt/ds-react",
|
||||
"@navikt/ds-css",
|
||||
"@navikt/ds-icons",
|
||||
"@navikt/aksel-icons",
|
||||
"@navikt/ds-tokens",
|
||||
"@navikt/ds-tailwind",
|
||||
"@navikt/ds-css-internal",
|
||||
"@navikt/ds-react-internal",
|
||||
"@navikt/ds-codemod"
|
||||
```
|
||||
@@ -1,24 +1,26 @@
|
||||
{
|
||||
"$schema": "https://unpkg.com/@changesets/config@2.2.0/schema.json",
|
||||
"changelog": ["@changesets/changelog-github", { "repo": "navikt/aksel" }],
|
||||
"changelog": [
|
||||
"@svitejs/changesets-changelog-github-compact",
|
||||
{ "repo": "navikt/aksel" }
|
||||
],
|
||||
"commit": false,
|
||||
"fixed": [
|
||||
[
|
||||
"@navikt/ds-react",
|
||||
"@navikt/ds-css",
|
||||
"@navikt/ds-icons",
|
||||
"@navikt/ds-tokens",
|
||||
"@navikt/ds-tailwind",
|
||||
"@navikt/ds-css-internal",
|
||||
"@navikt/ds-react-internal",
|
||||
"@navikt/ds-codemod"
|
||||
"@navikt/aksel-icons",
|
||||
"@navikt/aksel",
|
||||
"@navikt/aksel-stylelint"
|
||||
]
|
||||
],
|
||||
"linked": [],
|
||||
"access": "public",
|
||||
"baseBranch": "main",
|
||||
"updateInternalDependencies": "patch",
|
||||
"ignore": ["shadow-dom", "aksel.nav.no", "@navikt/ds-navno"],
|
||||
"ignore": ["shadow-dom", "aksel.nav.no", "aksel-icons-figma-plugin"],
|
||||
|
||||
"___experimentalUnsafeOptions_WILL_CHANGE_IN_PATCH": {
|
||||
"updateInternalDependents": "always"
|
||||
|
||||
@@ -3,7 +3,7 @@ description: Send et ønske om en eller flere nye komponenter
|
||||
title: "[Ny komponent]: "
|
||||
labels: ["nytt ✨", "forespørsel 🥰", "komponenter 🧩"]
|
||||
assignees:
|
||||
- olejorgenbakken
|
||||
- KenAJoh
|
||||
body:
|
||||
- type: markdown
|
||||
attributes:
|
||||
|
||||
@@ -3,7 +3,7 @@ description: Send et ønske om et eller flere nye ikoner
|
||||
title: "[Nytt ikon]: "
|
||||
labels: ["nytt ✨", "ikoner 🖼", "forespørsel 🥰"]
|
||||
assignees:
|
||||
- olejorgenbakken
|
||||
- KenAJoh
|
||||
body:
|
||||
- type: markdown
|
||||
attributes:
|
||||
|
||||
@@ -3,7 +3,7 @@ description: Send inn innspill til komponent
|
||||
title: "[Innspill til komponent]: "
|
||||
labels: ["forespørsel 🥰", "komponenter 🧩", "nytt ✨", "beta 🧪"]
|
||||
assignees:
|
||||
- olejorgenbakken
|
||||
- KenAJoh
|
||||
body:
|
||||
- type: markdown
|
||||
attributes:
|
||||
|
||||
@@ -3,7 +3,7 @@ description: Send inn innspill til ikon
|
||||
title: "[Tilbakemelding på ikon]: "
|
||||
labels: ["forespørsel 🥰", "ikoner 🖼️"]
|
||||
assignees:
|
||||
- olejorgenbakken
|
||||
- KenAJoh
|
||||
body:
|
||||
- type: markdown
|
||||
attributes:
|
||||
|
||||
@@ -0,0 +1,44 @@
|
||||
### Description
|
||||
|
||||
<!-- PR description/motivation
|
||||
add links to project-tasks, slack discussions etc here
|
||||
-->
|
||||
|
||||
### Change summary
|
||||
|
||||
<!-- Short summary of changes in PR
|
||||
- added variant x
|
||||
- fixed bug in y
|
||||
-->
|
||||
|
||||
### PR Checklist 📝 (Remove fields after check!)
|
||||
|
||||
#### New component? ✨
|
||||
|
||||
- Check that component-styling is correctly configured in `@navikt/core/css/config/_mappings.js`. This is needed for correct build and CDN upload.
|
||||
- Check that styling is correctly exported from `@navikt/core/css/index.css`
|
||||
- Check that correct tokens for component is documented in `@navikt/core/css/tokens.json`
|
||||
- Check that only needed components and types are exported from `@navikt/core/react/src/index.ts`
|
||||
- Add JSDoc to component (see other components for reference)
|
||||
- Create storybook-stories for relevant component variations and compositions. Stories are used for [visual regression testing](https://www.chromatic.com/docs/), so make sure they are complete.
|
||||
- Is the component sufficiently complex to warrant tests? Add some unit-tests for jest.
|
||||
|
||||
#### Component-updates 🎉
|
||||
|
||||
- Revalidate if everything under `New component` is still accounted for
|
||||
- Deprecating/removing a CSS class? Add it to `@navikt/aksel-stylelint/src/deprecations.ts` with a suitable description. This helps stylelint-users keep their code clean and bug-free.
|
||||
|
||||
#### Documentation 📝
|
||||
|
||||
- Add/update component-demos for component `aksel.nav.no/website/pages/eksempler`
|
||||
- Create/Update documentation in sanity if needed
|
||||
Note: Props, tokens and examples only updates to sanity on merge to main
|
||||
|
||||
#### Versioning 🏷️
|
||||
|
||||
- Run `yarn changeset` to generate a version-entry for change.
|
||||
- - Bug/hotfix: Patch
|
||||
- - New feature: Minor
|
||||
- - Breaking change: Major
|
||||
- Adding breaking changes? Consider adding a codemod for easier migration.
|
||||
- Breaking changes also needs documentation under "Migration"-page on website
|
||||
@@ -5,41 +5,14 @@ on:
|
||||
branches:
|
||||
- next
|
||||
|
||||
env:
|
||||
IMAGE: ghcr.io/navikt/aksel
|
||||
|
||||
jobs:
|
||||
snyk-monitor:
|
||||
name: monitor dependencies
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v3
|
||||
- name: Run Snyk to check for vulnerabilities
|
||||
continue-on-error: true
|
||||
uses: snyk/actions/node@master
|
||||
env:
|
||||
SNYK_TOKEN: ${{ secrets.SNYK_TOKEN }}
|
||||
with:
|
||||
command: monitor
|
||||
args: --org=designsystemet --severity-threshold=high
|
||||
snyk-test:
|
||||
name: analyze dependencies
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v3
|
||||
- name: Run Snyk to check for vulnerabilities
|
||||
uses: snyk/actions/node@master
|
||||
continue-on-error: true
|
||||
env:
|
||||
SNYK_TOKEN: ${{ secrets.SNYK_TOKEN }}
|
||||
with:
|
||||
command: test
|
||||
args: --org=designsystemet --severity-threshold=high
|
||||
build_and_deploy:
|
||||
name: Build and deploy to dev-gcp
|
||||
runs-on: ubuntu-20.04
|
||||
permissions:
|
||||
packages: "write"
|
||||
contents: "read"
|
||||
id-token: "write"
|
||||
steps:
|
||||
- uses: actions/setup-node@v3
|
||||
with:
|
||||
@@ -48,9 +21,13 @@ jobs:
|
||||
- name: add tokens to .env
|
||||
run: |
|
||||
echo "SANITY_WRITE_KEY=${{ secrets.SANITY_FEEDBACK_WRITE_KEY }}" >> aksel.nav.no/website/.env
|
||||
echo "SENTRY_AUTH_TOKEN=${{ secrets.SENTRY_AUTH_TOKEN }}" >> aksel.nav.no/website/.env
|
||||
echo "SANITY_PREVIEW_TOKEN=${{ secrets.SANITY_PREVIEW_TOKEN }}" >> aksel.nav.no/website/.env
|
||||
echo "SANITY_PRIVATE_NO_DRAFTS=${{ secrets.SANITY_PRIVATE_NO_DRAFTS }}" >> aksel.nav.no/website/.env
|
||||
echo "USE_CDN_ASSETS=true" >> aksel.nav.no/website/.env
|
||||
|
||||
- name: Hide page from search engines
|
||||
run: |
|
||||
echo "User-agent: *\nDisallow: /" > aksel.nav.no/website/public/robots.txt
|
||||
|
||||
- name: Restore cache
|
||||
uses: actions/cache@v3
|
||||
@@ -68,21 +45,24 @@ jobs:
|
||||
yarn boot
|
||||
yarn workspace aksel.nav.no build:next
|
||||
|
||||
- name: Login to GitHub Container Registry
|
||||
uses: docker/login-action@f4ef78c080cd8ba55a85445d5b36e214a81df20a # Use commit-sha1 instead of tag for security concerns
|
||||
- name: Upload static files to NAV CDN
|
||||
uses: navikt/frontend/actions/cdn-upload/v1@main
|
||||
with:
|
||||
registry: ghcr.io
|
||||
username: ${{ github.actor }}
|
||||
password: ${{ secrets.GITHUB_TOKEN }}
|
||||
cdn-team-name: aksel
|
||||
source: ./aksel.nav.no/website/.next/static
|
||||
destination: "/website/_next"
|
||||
|
||||
- name: Get complete tag
|
||||
run: echo "TAG=DEV-$( date +%s )" >> $GITHUB_ENV
|
||||
- name: Create docker image tags
|
||||
run: echo "DOCKER_TAG=${{ env.IMAGE }}:${{ env.TAG }}" >> $GITHUB_ENV
|
||||
- name: Build docker image
|
||||
run: docker build -t ${{ env.DOCKER_TAG }} . -f aksel.nav.no/Dockerfile
|
||||
- name: Push docker image
|
||||
run: |
|
||||
docker push ${{ env.DOCKER_TAG }}
|
||||
|
||||
- uses: nais/docker-build-push@v0
|
||||
id: docker-push
|
||||
with:
|
||||
team: designsystem
|
||||
push_image: true
|
||||
dockerfile: aksel.nav.no/Dockerfile
|
||||
project_id: ${{ vars.NAIS_MANAGEMENT_PROJECT_ID }}
|
||||
identity_provider: ${{ secrets.NAIS_WORKLOAD_IDENTITY_PROVIDER }}
|
||||
|
||||
- name: Deploy to dev-gcp
|
||||
uses: nais/deploy/actions/deploy@master
|
||||
@@ -90,4 +70,4 @@ jobs:
|
||||
APIKEY: ${{ secrets.NAIS_DEPLOY_APIKEY }}
|
||||
RESOURCE: aksel.nav.no/nais-dev.yaml
|
||||
CLUSTER: dev-gcp
|
||||
IMAGE: ${{ env.DOCKER_TAG }}
|
||||
IMAGE: ${{ steps.docker-push.outputs.image }}
|
||||
@@ -10,34 +10,6 @@ env:
|
||||
IMAGE: ghcr.io/navikt/aksel
|
||||
|
||||
jobs:
|
||||
snyk-monitor:
|
||||
name: monitor dependencies
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v3
|
||||
- name: Run Snyk to check for vulnerabilities
|
||||
continue-on-error: true
|
||||
uses: snyk/actions/node@master
|
||||
env:
|
||||
SNYK_TOKEN: ${{ secrets.SNYK_TOKEN }}
|
||||
with:
|
||||
command: monitor
|
||||
args: --org=designsystemet --severity-threshold=high
|
||||
snyk-test:
|
||||
name: analyze dependencies
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v3
|
||||
- name: Run Snyk to check for vulnerabilities
|
||||
uses: snyk/actions/node@master
|
||||
continue-on-error: true
|
||||
env:
|
||||
SNYK_TOKEN: ${{ secrets.SNYK_TOKEN }}
|
||||
with:
|
||||
command: test
|
||||
args: --org=designsystemet --severity-threshold=high
|
||||
sync_data_with_sanity:
|
||||
name: Update component data
|
||||
runs-on: ubuntu-latest
|
||||
@@ -72,6 +44,10 @@ jobs:
|
||||
build_and_deploy:
|
||||
name: Build and deploy to prod-gcp
|
||||
runs-on: ubuntu-latest
|
||||
permissions:
|
||||
packages: "write"
|
||||
contents: "read"
|
||||
id-token: "write"
|
||||
steps:
|
||||
- uses: actions/setup-node@v3
|
||||
with:
|
||||
@@ -80,9 +56,9 @@ jobs:
|
||||
- name: add tokens to .env
|
||||
run: |
|
||||
echo "SANITY_WRITE_KEY=${{ secrets.SANITY_FEEDBACK_WRITE_KEY }}" >> aksel.nav.no/website/.env
|
||||
echo "SENTRY_AUTH_TOKEN=${{ secrets.SENTRY_AUTH_TOKEN }}" >> aksel.nav.no/website/.env
|
||||
echo "SANITY_PREVIEW_TOKEN=${{ secrets.SANITY_PREVIEW_TOKEN }}" >> aksel.nav.no/website/.env
|
||||
echo "SANITY_PRIVATE_NO_DRAFTS=${{ secrets.SANITY_PRIVATE_NO_DRAFTS }}" >> aksel.nav.no/website/.env
|
||||
echo "USE_CDN_ASSETS=true" >> aksel.nav.no/website/.env
|
||||
|
||||
- name: Restore cache
|
||||
uses: actions/cache@v3
|
||||
@@ -104,18 +80,25 @@ jobs:
|
||||
- name: Build application
|
||||
run: yarn workspace aksel.nav.no build:next
|
||||
|
||||
- name: Login to GitHub Container Registry
|
||||
uses: docker/login-action@f4ef78c080cd8ba55a85445d5b36e214a81df20a # Use commit-sha1 instead of tag for security concerns
|
||||
- name: Upload static files to NAV CDN
|
||||
uses: navikt/frontend/actions/cdn-upload/v1@main
|
||||
with:
|
||||
registry: ghcr.io
|
||||
username: ${{ github.actor }}
|
||||
password: ${{ secrets.GITHUB_TOKEN }}
|
||||
cdn-team-name: aksel
|
||||
source: ./aksel.nav.no/website/.next/static
|
||||
destination: "/website/_next"
|
||||
|
||||
- name: Get complete tag
|
||||
run: echo "TAG=$( date +%s )" >> $GITHUB_ENV
|
||||
- name: Create docker image tags
|
||||
run: echo "DOCKER_TAG=${{ env.IMAGE }}:${{ env.TAG }}" >> $GITHUB_ENV
|
||||
- name: Build docker image
|
||||
run: docker build -t ${{ env.DOCKER_TAG }} . -f aksel.nav.no/Dockerfile
|
||||
run: echo "TAG=PROD-$( date +%s )" >> $GITHUB_ENV
|
||||
|
||||
- uses: nais/docker-build-push@v0
|
||||
id: docker-push
|
||||
with:
|
||||
team: designsystem
|
||||
push_image: true
|
||||
dockerfile: aksel.nav.no/Dockerfile
|
||||
project_id: ${{ vars.NAIS_MANAGEMENT_PROJECT_ID }}
|
||||
identity_provider: ${{ secrets.NAIS_WORKLOAD_IDENTITY_PROVIDER }}
|
||||
|
||||
- name: Wait for e2e-tests to succeed
|
||||
uses: lewagon/wait-on-check-action@v1.2.0
|
||||
with:
|
||||
@@ -123,9 +106,6 @@ jobs:
|
||||
check-name: "Smoketest Aksel"
|
||||
repo-token: ${{ secrets.GITHUB_TOKEN }}
|
||||
wait-interval: 10
|
||||
- name: Push docker image
|
||||
run: |
|
||||
docker push ${{ env.DOCKER_TAG }}
|
||||
|
||||
- name: Deploy to prod-gcp
|
||||
uses: nais/deploy/actions/deploy@master
|
||||
@@ -133,4 +113,4 @@ jobs:
|
||||
APIKEY: ${{ secrets.NAIS_DEPLOY_APIKEY }}
|
||||
RESOURCE: aksel.nav.no/nais-prod.yaml
|
||||
CLUSTER: prod-gcp
|
||||
IMAGE: ${{ env.DOCKER_TAG }}
|
||||
IMAGE: ${{ steps.docker-push.outputs.image }}
|
||||
@@ -15,6 +15,10 @@ jobs:
|
||||
visual_regression_test:
|
||||
name: "visual regression test (chromatic)"
|
||||
runs-on: ubuntu-latest
|
||||
permissions:
|
||||
issues: write
|
||||
pull-requests: write
|
||||
contents: write
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
with:
|
||||
@@ -54,7 +58,7 @@ jobs:
|
||||
|
||||
- name: replace storybook url
|
||||
if: "!contains(github.event.head_commit.message, '[ci skip]') && github.event_name != 'push'"
|
||||
uses: frabert/replace-string-action@v2.0
|
||||
uses: frabert/replace-string-action@v2
|
||||
id: storybook_url
|
||||
with:
|
||||
pattern: "(iframe.html)"
|
||||
@@ -70,33 +74,33 @@ jobs:
|
||||
|
||||
- name: Find Comment
|
||||
if: "!contains(github.event.head_commit.message, '[ci skip]') && github.event_name != 'push'"
|
||||
uses: peter-evans/find-comment@v1
|
||||
uses: peter-evans/find-comment@v2
|
||||
id: fc
|
||||
with:
|
||||
issue-number: ${{ github.event.pull_request.number }}
|
||||
comment-author: "github-actions[bot]"
|
||||
body-includes: github-comment-finder
|
||||
body-includes: Storybook demo
|
||||
|
||||
- name: Create or update comment
|
||||
if: steps.chromatic_tests.outcome == 'success' && !contains(github.event.head_commit.message, '[ci skip]') && github.event_name != 'push'
|
||||
uses: peter-evans/create-or-update-comment@v1
|
||||
uses: peter-evans/create-or-update-comment@v3
|
||||
with:
|
||||
comment-id: ${{ steps.fc.outputs.comment-id }}
|
||||
issue-number: ${{ github.event.pull_request.number }}
|
||||
body: |
|
||||
### [<img id="github-comment-finder" src="https://raw.githubusercontent.com/storybookjs/brand/main/logo/logo-storybook-inverse.svg" height="32"/>](${{steps.storybook_url.outputs.replaced}})
|
||||
## [Storybook demo](${{steps.storybook_url.outputs.replaced}})
|
||||
|
||||
[${{ steps.vars.outputs.sha_short }}](https://github.com/navikt/aksel/commit/${{ steps.vars.outputs.sha_short }}) | ${{steps.chromatic_tests.outputs.componentCount}} komponenter | ${{steps.chromatic_tests.outputs.specCount}} stories
|
||||
edit-mode: replace
|
||||
|
||||
- name: Create or update failed comment
|
||||
if: steps.chromatic_tests.outcome != 'success' && !contains(github.event.head_commit.message, '[ci skip]') && github.event_name != 'push'
|
||||
uses: peter-evans/create-or-update-comment@v1
|
||||
uses: peter-evans/create-or-update-comment@v3
|
||||
with:
|
||||
comment-id: ${{ steps.fc.outputs.comment-id }}
|
||||
issue-number: ${{ github.event.pull_request.number }}
|
||||
body: |
|
||||
### [<img id="github-comment-finder" src="https://raw.githubusercontent.com/storybookjs/brand/main/logo/logo-storybook-inverse.svg" height="32"/>](${{steps.storybook_url.outputs.replaced}})
|
||||
## [Storybook demo](${{steps.storybook_url.outputs.replaced}})
|
||||
|
||||
### [Endringer til review](${{steps.chromatic_tests.outputs.url}}): ${{steps.chromatic_tests.outputs.changeCount}}
|
||||
|
||||
|
||||
@@ -13,6 +13,8 @@ jobs:
|
||||
name: "Validate build"
|
||||
if: "!contains(github.event.head_commit.message, '[ci skip]')"
|
||||
runs-on: ubuntu-latest
|
||||
permissions:
|
||||
pull-requests: "write"
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
with:
|
||||
|
||||
@@ -1,71 +0,0 @@
|
||||
# For most projects, this workflow file will not need changing; you simply need
|
||||
# to commit it to your repository.
|
||||
#
|
||||
# You may wish to alter this file to override the set of languages analyzed,
|
||||
# or to provide custom queries or build logic.
|
||||
#
|
||||
# ******** NOTE ********
|
||||
# We have attempted to detect the languages in your repository. Please check
|
||||
# the `language` matrix defined below to confirm you have the correct set of
|
||||
# supported CodeQL languages.
|
||||
#
|
||||
name: "CodeQL"
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [main, next]
|
||||
pull_request:
|
||||
# The branches below must be a subset of the branches above
|
||||
branches: [main]
|
||||
schedule:
|
||||
- cron: "41 8 * * 6"
|
||||
|
||||
jobs:
|
||||
analyze:
|
||||
name: Analyze
|
||||
runs-on: ubuntu-latest
|
||||
permissions:
|
||||
actions: read
|
||||
contents: read
|
||||
security-events: write
|
||||
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
language: ["javascript"]
|
||||
# CodeQL supports [ 'cpp', 'csharp', 'go', 'java', 'javascript', 'python', 'ruby' ]
|
||||
# Learn more about CodeQL language support at https://aka.ms/codeql-docs/language-support
|
||||
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v3
|
||||
|
||||
# Initializes the CodeQL tools for scanning.
|
||||
- name: Initialize CodeQL
|
||||
uses: github/codeql-action/init@v2
|
||||
with:
|
||||
languages: ${{ matrix.language }}
|
||||
# If you wish to specify custom queries, you can do so here or in a config file.
|
||||
# By default, queries listed here will override any specified in a config file.
|
||||
# Prefix the list here with "+" to use these queries and those in the config file.
|
||||
|
||||
# Details on CodeQL's query packs refer to : https://docs.github.com/en/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/configuring-code-scanning#using-queries-in-ql-packs
|
||||
# queries: security-extended,security-and-quality
|
||||
|
||||
# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
|
||||
# If this step fails, then you should remove it and run the build manually (see below)
|
||||
- name: Autobuild
|
||||
uses: github/codeql-action/autobuild@v2
|
||||
|
||||
# ℹ️ Command-line programs to run using the OS shell.
|
||||
# 📚 See https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstepsrun
|
||||
|
||||
# If the Autobuild fails above, remove it and uncomment the following three lines.
|
||||
# modify them (or add more) to build your code if your project, please refer to the EXAMPLE below for guidance.
|
||||
|
||||
# - run: |
|
||||
# echo "Run, Build Application using script"
|
||||
# ./location_of_script_within_repo/buildscript.sh
|
||||
|
||||
- name: Perform CodeQL Analysis
|
||||
uses: github/codeql-action/analyze@v2
|
||||
@@ -13,7 +13,7 @@ jobs:
|
||||
playwright:
|
||||
runs-on: ubuntu-latest
|
||||
container:
|
||||
image: mcr.microsoft.com/playwright:v1.30.0-focal
|
||||
image: mcr.microsoft.com/playwright:v1.35.1-jammy
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- uses: actions/setup-node@v3
|
||||
@@ -23,7 +23,6 @@ jobs:
|
||||
- name: add tokens to .env
|
||||
run: |
|
||||
echo "SANITY_WRITE_KEY=${{ secrets.SANITY_FEEDBACK_WRITE_KEY }}" >> aksel.nav.no/website/.env
|
||||
echo "SENTRY_AUTH_TOKEN=${{ secrets.SENTRY_AUTH_TOKEN }}" >> aksel.nav.no/website/.env
|
||||
echo "SANITY_PREVIEW_TOKEN=${{ secrets.SANITY_PREVIEW_TOKEN }}" >> aksel.nav.no/website/.env
|
||||
echo "SANITY_PRIVATE_NO_DRAFTS=${{ secrets.SANITY_PRIVATE_NO_DRAFTS }}" >> aksel.nav.no/website/.env
|
||||
|
||||
|
||||
@@ -11,8 +11,13 @@ concurrency: ${{ github.workflow }}-${{ github.ref }}
|
||||
jobs:
|
||||
build:
|
||||
name: "Release packages"
|
||||
if: "!contains(github.event.head_commit.message, '[ci skip]')"
|
||||
if: ${{!contains(github.event.head_commit.message, '[ci skip]')}}
|
||||
runs-on: ubuntu-latest
|
||||
permissions:
|
||||
id-token: "write"
|
||||
contents: "write"
|
||||
packages: "write"
|
||||
pull-requests: "write"
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
with:
|
||||
@@ -23,6 +28,10 @@ jobs:
|
||||
node-version: 16.13.0
|
||||
cache: yarn
|
||||
|
||||
- uses: denoland/setup-deno@v1
|
||||
with:
|
||||
deno-version: v1.x
|
||||
|
||||
- name: Restore cache
|
||||
uses: actions/cache@v3
|
||||
with:
|
||||
@@ -40,6 +49,7 @@ jobs:
|
||||
with:
|
||||
version: yarn version
|
||||
publish: yarn release
|
||||
createGithubReleases: false
|
||||
env:
|
||||
NPM_TOKEN: ${{ secrets.NPM_AUTOMATION }}
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
@@ -65,3 +75,29 @@ jobs:
|
||||
NPM_TOKEN: ${{ secrets.NPM_AUTOMATION }}
|
||||
GITHUB_TOKEN: ${{ secrets.GIT_REPO }}
|
||||
NODE_AUTH_TOKEN: ${{ secrets.NPM_AUTOMATION }}
|
||||
|
||||
- name: Generate icon.zip
|
||||
if: steps.changesets.outputs.published == 'true'
|
||||
run: yarn zip:icons
|
||||
|
||||
- name: Upload updated icon.zip to NAV CDN
|
||||
if: steps.changesets.outputs.published == 'true'
|
||||
uses: navikt/frontend/actions/cdn-upload/v1@main
|
||||
with:
|
||||
cdn-team-name: aksel
|
||||
source: ./@navikt/aksel-icons/aksel-icons.zip
|
||||
destination: "/icons/zip"
|
||||
|
||||
- name: Get @navikt/ds-css version
|
||||
run: |
|
||||
VERSION=$(yarn css:get-version)
|
||||
echo "version=$VERSION" >> $GITHUB_ENV
|
||||
echo "Version of @navikt/ds-css: ${{ env.version }}"
|
||||
|
||||
- name: Upload CSS to NAV CDN
|
||||
if: steps.changesets.outputs.published == 'true'
|
||||
uses: navikt/frontend/actions/cdn-upload/v1@main
|
||||
with:
|
||||
cdn-team-name: aksel
|
||||
source: ./@navikt/core/css/dist/version/${{env.version}}
|
||||
destination: "@navikt/ds-css"
|
||||
@@ -14,7 +14,7 @@ jobs:
|
||||
name: Smoketest Aksel
|
||||
runs-on: ubuntu-latest
|
||||
container:
|
||||
image: mcr.microsoft.com/playwright:v1.30.0-focal
|
||||
image: mcr.microsoft.com/playwright:v1.35.1-jammy
|
||||
steps:
|
||||
- uses: actions/setup-node@v3
|
||||
with:
|
||||
@@ -23,7 +23,6 @@ jobs:
|
||||
- name: add tokens to .env
|
||||
run: |
|
||||
echo "SANITY_WRITE_KEY=${{ secrets.SANITY_FEEDBACK_WRITE_KEY }}" >> aksel.nav.no/website/.env
|
||||
echo "SENTRY_AUTH_TOKEN=${{ secrets.SENTRY_AUTH_TOKEN }}" >> aksel.nav.no/website/.env
|
||||
echo "SANITY_PREVIEW_TOKEN=${{ secrets.SANITY_PREVIEW_TOKEN }}" >> aksel.nav.no/website/.env
|
||||
echo "SANITY_PRIVATE_NO_DRAFTS=${{ secrets.SANITY_PRIVATE_NO_DRAFTS }}" >> aksel.nav.no/website/.env
|
||||
|
||||
|
||||
@@ -1,42 +0,0 @@
|
||||
name: Update Icons
|
||||
|
||||
on:
|
||||
# schedule:
|
||||
# - cron: 0 0 * * *
|
||||
workflow_dispatch:
|
||||
|
||||
jobs:
|
||||
update:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- uses: actions/setup-node@v3
|
||||
with:
|
||||
node-version: 14
|
||||
- name: Node-modules cache
|
||||
uses: actions/cache@v3
|
||||
id: node-cache
|
||||
with:
|
||||
path: "**/node_modules"
|
||||
key: ${{ runner.os }}-modules-${{ hashFiles('**/yarn.lock') }}
|
||||
- name: install
|
||||
if: steps.node-cache.outputs.cache-hit != 'true'
|
||||
run: yarn install
|
||||
- name: postinstall
|
||||
if: steps.node-cache.outputs.cache-hit == 'true'
|
||||
run: yarn postinstall
|
||||
- name: Update Icons
|
||||
run: yarn workspace @navikt/ds-icons update
|
||||
env:
|
||||
FIGMA_TOKEN: ${{ secrets.FIGMA_IKONER_API }}
|
||||
- name: Create Pull Request
|
||||
uses: peter-evans/create-pull-request@v3
|
||||
with:
|
||||
token: ${{ secrets.GIT_REPO }}
|
||||
commit-message: "Ikoner synket fra figma"
|
||||
branch: figma-icons-sync
|
||||
committer: GitHub <noreply@github.com>
|
||||
author: ${{ github.actor }} <${{ github.actor }}@users.noreply.github.com>
|
||||
signoff: false
|
||||
delete-branch: true
|
||||
title: "Ikonsynk Figma"
|
||||
@@ -1,39 +0,0 @@
|
||||
name: Update tokens
|
||||
|
||||
on:
|
||||
workflow_dispatch:
|
||||
|
||||
jobs:
|
||||
update:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- uses: actions/setup-node@v3
|
||||
with:
|
||||
node-version: 14
|
||||
- name: Node-modules cache
|
||||
uses: actions/cache@v3
|
||||
id: node-cache
|
||||
with:
|
||||
path: "**/node_modules"
|
||||
key: ${{ runner.os }}-modules-${{ hashFiles('**/yarn.lock') }}
|
||||
- name: install
|
||||
if: steps.node-cache.outputs.cache-hit != 'true'
|
||||
run: yarn install
|
||||
- name: postinstall
|
||||
if: steps.node-cache.outputs.cache-hit == 'true'
|
||||
run: yarn postinstall
|
||||
- name: Update tokens
|
||||
run: yarn workspace @navikt/ds-tokens update
|
||||
env:
|
||||
FIGMA_TOKEN: ${{ secrets.FIGMA_IKONER_API }}
|
||||
- name: Create Pull Request
|
||||
uses: peter-evans/create-pull-request@v3
|
||||
with:
|
||||
token: ${{ secrets.GITHUB_TOKEN }}
|
||||
branch: figma-tokens-sync
|
||||
delete-branch: true
|
||||
title: "Tokens sync Figma"
|
||||
commit-message: "Tokens synket fra figma"
|
||||
committer: GitHub <noreply@github.com>
|
||||
signoff: false
|
||||
@@ -150,4 +150,5 @@ playwright-report/
|
||||
/test-results/
|
||||
backup-*.tar.gz
|
||||
sitemap-urls.json
|
||||
*.tar.gz
|
||||
*.tar.gz
|
||||
searchindex.json
|
||||
|
After Width: | Height: | Size: 10 KiB |
|
After Width: | Height: | Size: 285 KiB |
|
After Width: | Height: | Size: 388 KiB |
@@ -0,0 +1,175 @@
|
||||
import { Meta } from "@storybook/blocks";
|
||||
|
||||
import AkselThumbnail from "./assets/aksel-thumbnail.png";
|
||||
import Setup from "./assets/setup.png";
|
||||
import Components from "./assets/components.png";
|
||||
|
||||
<Meta title="Getting started" />
|
||||
|
||||
<div className="sb-container">
|
||||
<div className='sb-section-title'>
|
||||
|
||||
# Getting started
|
||||
|
||||
Aksel is the toolbox for product development <a href="https://aksel.nav.no"target="_blank">@NAV</a> (Norwegian Labour and Welfare Administration)
|
||||
|
||||
This includes a designsystem, best practices for product-development, principles for user-experience and a blog. <a href="https://aksel.nav.no/god-praksis/artikler/om-aksel" target="_blank">
|
||||
Read more about Aksel.</a>
|
||||
|
||||
</div>
|
||||
<div className="sb-section">
|
||||
<div className="sb-section-item">
|
||||
<img
|
||||
src={AkselThumbnail}
|
||||
alt="Aksel-thumbnail"
|
||||
aria-hidden
|
||||
/>
|
||||
|
||||
<h3 className="sb-section-item-heading"><a
|
||||
href="https://aksel.nav.no"
|
||||
target="_blank"
|
||||
className="sb-link"
|
||||
>Website</a></h3>
|
||||
<p className="sb-section-item-paragraph">Includes everything you need to get started building and developing digital products for NAV today.</p>
|
||||
|
||||
</div>
|
||||
<div className="sb-section-item">
|
||||
<img
|
||||
src={Setup}
|
||||
alt="Setup-thumbnail"
|
||||
aria-hidden
|
||||
/>
|
||||
|
||||
<h3 className="sb-section-item-heading"><a
|
||||
href="https://aksel.nav.no/grunnleggende/introduksjon/kom-i-gang-med-kodepakkene"
|
||||
target="_blank"
|
||||
className="sb-link"
|
||||
>Setup</a></h3>
|
||||
<p className="sb-section-item-paragraph">Get started developing using our solutions. How to install, setup and use our React, CSS and Icons.</p>
|
||||
|
||||
</div>
|
||||
<div className="sb-section-item">
|
||||
<img
|
||||
src={Components}
|
||||
alt="Components-thumbnail"
|
||||
aria-hidden
|
||||
/>
|
||||
|
||||
<h3 className="sb-section-item-heading"><a
|
||||
href="https://aksel.nav.no/komponenter"
|
||||
target="_blank"
|
||||
className="sb-link"
|
||||
>Components</a></h3>
|
||||
<p className="sb-section-item-paragraph">Browse trough 40+ components with examples, do and don't, props and accessibility information.</p>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div className="sb-container">
|
||||
<div className='sb-section-title'>
|
||||
## More than just a component library
|
||||
|
||||
Aksel offers tools that makes developing frontend-applications easier.
|
||||
|
||||
</div>
|
||||
|
||||
<div className="sb-section">
|
||||
<div className="sb-section-item">
|
||||
|
||||
<h3 className="sb-section-item-heading"><a
|
||||
href="https://aksel.nav.no/ikoner"
|
||||
target="_blank"
|
||||
className="sb-link"
|
||||
>Icons</a></h3>
|
||||
<p className="sb-section-item-paragraph">We provide an icon library with 800+ open-source icons.</p>
|
||||
|
||||
</div>
|
||||
<div className="sb-section-item">
|
||||
|
||||
<h3 className="sb-section-item-heading"><a
|
||||
href="https://aksel.nav.no/grunnleggende/styling/design-tokens"
|
||||
target="_blank"
|
||||
className="sb-link"
|
||||
>Tokens</a></h3>
|
||||
<p className="sb-section-item-paragraph">Colors, spacing, shadows and more. All available for CSS, SASS, Less and JS.</p>
|
||||
|
||||
</div>
|
||||
<div className="sb-section-item">
|
||||
|
||||
|
||||
<h3 className="sb-section-item-heading"><a
|
||||
href="https://aksel.nav.no/grunnleggende/kode/stylelint"
|
||||
target="_blank"
|
||||
className="sb-link"
|
||||
>Stylelint</a></h3>
|
||||
<p className="sb-section-item-paragraph">Using our Stylelint-plugin helps keep your code free from bugs and makes adopting updates safer.</p>
|
||||
|
||||
</div>
|
||||
<div className="sb-section-item">
|
||||
<h3 className="sb-section-item-heading"><a
|
||||
href="https://aksel.nav.no/grunnleggende/kode/tailwind"
|
||||
target="_blank"
|
||||
className="sb-link"
|
||||
>Tailwind</a></h3>
|
||||
<p className="sb-section-item-paragraph">Our tokens made available as a simple tailwind-config.</p>
|
||||
</div>
|
||||
<div className="sb-section-item">
|
||||
<h3 className="sb-section-item-heading"><a
|
||||
href="https://aksel.nav.no/grunnleggende/kode/kommandolinje"
|
||||
target="_blank"
|
||||
className="sb-link"
|
||||
>CLI</a></h3>
|
||||
<p className="sb-section-item-paragraph">CLI for codemods and advanced CSS-imports</p>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<style>
|
||||
{`
|
||||
.sb-container {
|
||||
margin-bottom: 48px;
|
||||
}
|
||||
|
||||
.sb-section {
|
||||
width: 100%;
|
||||
display: grid;
|
||||
grid-template-columns: repeat(3, 1fr);
|
||||
grid-gap: var(--a-spacing-6);
|
||||
}
|
||||
|
||||
.sb-link{
|
||||
text-decoration: underline;
|
||||
color: var(--a-text-default);
|
||||
}
|
||||
|
||||
img {
|
||||
object-fit: cover;
|
||||
padding-bottom: var(--a-spacing-5);
|
||||
border-radius: 8px;
|
||||
}
|
||||
|
||||
.sb-section-title {
|
||||
margin-bottom: var(--a-spacing-8);
|
||||
}
|
||||
|
||||
|
||||
|
||||
.sb-section-item-heading {
|
||||
padding-bottom: var(--a-spacing-1);
|
||||
margin: 0 !important;
|
||||
}
|
||||
|
||||
.sb-section-item-paragraph {
|
||||
margin: 0;
|
||||
padding-bottom: var(--a-spacing-3);
|
||||
}
|
||||
|
||||
@media screen and (max-width: 768px) {
|
||||
.sb-section {
|
||||
grid-template-columns: repeat(1, 1fr);
|
||||
}
|
||||
}
|
||||
`}
|
||||
</style>
|
||||
@@ -1,33 +0,0 @@
|
||||
import { loadCsf } from "@storybook/csf-tools";
|
||||
import { readFileSync } from "fs";
|
||||
|
||||
module.exports = (indexers) => {
|
||||
const csfIndexer = async (fileName: string, opts) => {
|
||||
const code = readFileSync(fileName, "utf-8").toString();
|
||||
return loadCsf(code, { ...opts, fileName }).parse();
|
||||
};
|
||||
|
||||
const exampleIndexer = async (fileName: string, opts) => {
|
||||
let code = readFileSync(fileName, "utf-8").toString();
|
||||
|
||||
code = code.replace("export const args =", "const args =");
|
||||
|
||||
code += `\nexport default { title: "Eksempler/${fileName
|
||||
.split("pages/eksempler/")[1]
|
||||
.replace(".tsx", "")}" };\n`;
|
||||
|
||||
return loadCsf(code, { ...opts, fileName }).parse();
|
||||
};
|
||||
|
||||
return [
|
||||
...(indexers || []),
|
||||
{
|
||||
test: /(stories|story)\.[tj]sx?$/,
|
||||
indexer: csfIndexer,
|
||||
},
|
||||
{
|
||||
test: /pages\/eksempler\/|(".+")|(.+.tsx)$/,
|
||||
indexer: exampleIndexer,
|
||||
},
|
||||
];
|
||||
};
|
||||
@@ -1,36 +0,0 @@
|
||||
import { Meta, Canvas } from "@storybook/addon-docs";
|
||||
|
||||
<Meta title="Intro" />
|
||||
|
||||
# Aksel, NAVs designsystem
|
||||
|
||||
- [Dokumentasjon](https://aksel.nav.no/komponenter)
|
||||
|
||||
### Core
|
||||
|
||||
```bash
|
||||
yarn add @navikt/ds-react @navikt/ds-css
|
||||
```
|
||||
|
||||
### Interne-flater
|
||||
|
||||
```bash
|
||||
yarn add @navikt/ds-react-internal @navikt/ds-css-internal
|
||||
```
|
||||
|
||||
### Ikoner
|
||||
|
||||
```bash
|
||||
yarn add @navikt/ds-icons
|
||||
```
|
||||
|
||||
### Bruk
|
||||
|
||||
```jsx
|
||||
import { Heading } from "@navikt/ds-react";
|
||||
import "@navikt/ds-css";
|
||||
|
||||
<Heading level="1" size="xlarge">
|
||||
Sidetitel
|
||||
</Heading>;
|
||||
```
|
||||
@@ -13,19 +13,9 @@
|
||||
|
||||
.colgap[data-theme="dark"],
|
||||
.rowgap[data-theme="dark"] {
|
||||
background-color: #262626;
|
||||
background-color: var(--a-gray-900);
|
||||
}
|
||||
|
||||
.rowgap-wrap {
|
||||
flex-wrap: wrap;
|
||||
}
|
||||
|
||||
.css-warning {
|
||||
position: absolute;
|
||||
top: 1rem;
|
||||
right: 1rem;
|
||||
border-radius: 6px;
|
||||
padding: 1.5rem;
|
||||
background-color: var(--a-surface-warning-subtle);
|
||||
border: 1px solid var(--a-border-warning);
|
||||
}
|
||||
@@ -1,81 +0,0 @@
|
||||
const storyIndexers = require("./indexer");
|
||||
|
||||
const path = require("path");
|
||||
const { mergeConfig } = require("vite");
|
||||
|
||||
module.exports = {
|
||||
storyIndexers,
|
||||
devServer: {
|
||||
stats: "errors-only",
|
||||
},
|
||||
staticDirs: ["./public"],
|
||||
|
||||
stories: () => [
|
||||
"../@navikt/**/*.stories.@(js|jsx|ts|tsx|mdx)",
|
||||
"./*.stories.mdx",
|
||||
...(process.env.STORYBOOK_STORIES === "all"
|
||||
? [
|
||||
"../aksel.nav.no/website/components/**/*.stories.tsx",
|
||||
"../aksel.nav.no/website/pages/eksempler/**/*.tsx",
|
||||
]
|
||||
: []),
|
||||
],
|
||||
addons: [
|
||||
"@storybook/addon-a11y",
|
||||
"@whitespace/storybook-addon-html",
|
||||
{
|
||||
name: "@storybook/addon-storysource",
|
||||
options: {
|
||||
loaderOptions: {
|
||||
injectStoryParameters: false,
|
||||
},
|
||||
},
|
||||
},
|
||||
{
|
||||
name: "@storybook/addon-essentials",
|
||||
options: {
|
||||
actions: false,
|
||||
controls: {
|
||||
hideNoControlsWarning: true,
|
||||
},
|
||||
},
|
||||
},
|
||||
],
|
||||
framework: {
|
||||
name: "@storybook/react-vite",
|
||||
options: {},
|
||||
},
|
||||
features: {
|
||||
storyStoreV7: true,
|
||||
},
|
||||
docs: {
|
||||
autodocs: "tag",
|
||||
},
|
||||
typescript: {
|
||||
check: false,
|
||||
checkOptions: {},
|
||||
reactDocgen: false,
|
||||
},
|
||||
async viteFinal(config) {
|
||||
return mergeConfig(config, {
|
||||
define: { "process.env": {} },
|
||||
resolve: {
|
||||
alias: [
|
||||
/*
|
||||
// Example
|
||||
{
|
||||
find: "@components",
|
||||
replacement: path.resolve(__dirname, "./src/components"),
|
||||
}, */
|
||||
{
|
||||
find: "components",
|
||||
replacement: path.resolve(
|
||||
__dirname,
|
||||
"../aksel.nav.no/website/components"
|
||||
),
|
||||
},
|
||||
],
|
||||
},
|
||||
});
|
||||
},
|
||||
};
|
||||
@@ -0,0 +1,45 @@
|
||||
module.exports = {
|
||||
staticDirs: ["./public"],
|
||||
|
||||
stories: () => [
|
||||
"../@navikt/**/*.stories.@(js|jsx|ts|tsx|mdx)",
|
||||
"./*.stories.mdx",
|
||||
],
|
||||
addons: [
|
||||
"@storybook/addon-a11y",
|
||||
"@whitespace/storybook-addon-html",
|
||||
"@storybook/addon-interactions",
|
||||
{
|
||||
name: "@storybook/addon-storysource",
|
||||
options: {
|
||||
loaderOptions: {
|
||||
injectStoryParameters: false,
|
||||
},
|
||||
},
|
||||
},
|
||||
{
|
||||
name: "@storybook/addon-essentials",
|
||||
options: {
|
||||
actions: false,
|
||||
controls: {
|
||||
hideNoControlsWarning: true,
|
||||
},
|
||||
},
|
||||
},
|
||||
],
|
||||
framework: {
|
||||
name: "@storybook/react-vite",
|
||||
options: {},
|
||||
},
|
||||
features: {
|
||||
storyStoreV7: true,
|
||||
},
|
||||
docs: {
|
||||
autodocs: "tag",
|
||||
},
|
||||
typescript: {
|
||||
check: false,
|
||||
checkOptions: {},
|
||||
reactDocgen: false,
|
||||
},
|
||||
};
|
||||
@@ -1,6 +0,0 @@
|
||||
import { addons } from "@storybook/addons";
|
||||
import AkselTheme from "./theme.js";
|
||||
|
||||
addons.setConfig({
|
||||
theme: AkselTheme,
|
||||
});
|
||||
@@ -0,0 +1,6 @@
|
||||
import { addons } from "@storybook/manager-api";
|
||||
import AkselTheme from "./theme.js";
|
||||
|
||||
addons.setConfig({
|
||||
theme: AkselTheme,
|
||||
});
|
||||
@@ -1,3 +0,0 @@
|
||||
<script>
|
||||
window.global = window;
|
||||
</script>
|
||||
@@ -1,13 +1,11 @@
|
||||
import "@navikt/ds-css/index.css";
|
||||
import "@navikt/ds-css-internal/index.css";
|
||||
import "./layout.css";
|
||||
|
||||
export const parameters = {
|
||||
options: {
|
||||
storySort: {
|
||||
method: "",
|
||||
method: "alphabetical",
|
||||
order: ["Intro", "ds-react", ["form"], ["Default"], "ds-icons"],
|
||||
locales: "",
|
||||
},
|
||||
},
|
||||
layout: "centered",
|
||||
@@ -19,7 +17,7 @@ export const parameters = {
|
||||
},
|
||||
{
|
||||
name: "Darkmode",
|
||||
value: "#262626",
|
||||
value: "#23262a",
|
||||
},
|
||||
],
|
||||
},
|
||||
@@ -28,7 +26,6 @@ export const parameters = {
|
||||
export const globalTypes = {
|
||||
theme: {
|
||||
name: "Theme",
|
||||
description: "Global theme for components",
|
||||
toolbar: {
|
||||
icon: "circlehollow",
|
||||
items: [
|
||||
@@ -41,20 +38,12 @@ export const globalTypes = {
|
||||
};
|
||||
|
||||
export const withTheme = (StoryFn, context) => {
|
||||
const foundCss =
|
||||
context.parameters.fileName.startsWith("./@navikt") &&
|
||||
document.querySelector('[data-vite-dev-id$="dist/tw.css"]');
|
||||
return (
|
||||
<div
|
||||
data-theme={context.parameters.theme || context.globals.theme || "light"}
|
||||
lang="no"
|
||||
id="root"
|
||||
>
|
||||
{foundCss && (
|
||||
<div className="css-warning">
|
||||
OBS! Ser ut som CSS fra aksel.nav.no er lastet. Refresh siden!
|
||||
</div>
|
||||
)}
|
||||
<StoryFn />
|
||||
</div>
|
||||
);
|
||||
|
||||
@@ -4,19 +4,5 @@ import logoUrl from "./public/logo.svg";
|
||||
export default create({
|
||||
brandImage: logoUrl,
|
||||
base: "light",
|
||||
// Typography
|
||||
fontBase: '"Source Sans Pro", sans-serif',
|
||||
fontCode: "monospace",
|
||||
|
||||
// Text colors
|
||||
textColor: "#262626",
|
||||
textInverseColor: "rgba(255,255,255,0.9)",
|
||||
|
||||
colorSecondary: "rgba(0, 36, 58, 1)",
|
||||
colorPrimary: "rgba(153, 196, 221, 1)",
|
||||
|
||||
barTextColor: "rgba(0, 91, 130, 1)",
|
||||
barSelectedColor: "rgba(0, 36, 58, 1)",
|
||||
|
||||
brandTitle: "Aksel",
|
||||
});
|
||||
@@ -0,0 +1,5 @@
|
||||
dist
|
||||
src
|
||||
svgtest
|
||||
core-icons
|
||||
*.zip
|
||||
@@ -0,0 +1,16 @@
|
||||
const template = require("./config/template");
|
||||
|
||||
module.exports = {
|
||||
typescript: true,
|
||||
ref: true,
|
||||
icon: true,
|
||||
titleProp: true,
|
||||
svgProps: {
|
||||
focusable: false,
|
||||
role: "img",
|
||||
},
|
||||
replaceAttrValues: {
|
||||
"#23262A": "currentColor",
|
||||
},
|
||||
template,
|
||||
};
|
||||
@@ -0,0 +1,161 @@
|
||||
# @navikt/aksel-icons
|
||||
|
||||
## 5.3.5
|
||||
|
||||
## 5.3.4
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- :bug: SVG import map er nå riktig path ([#2250](https://github.com/navikt/aksel/pull/2250))
|
||||
|
||||
## 5.3.3
|
||||
|
||||
## 5.3.2
|
||||
|
||||
## 5.3.1
|
||||
|
||||
## 5.3.0
|
||||
|
||||
## 5.2.1
|
||||
|
||||
## 5.2.0
|
||||
|
||||
### Minor Changes
|
||||
|
||||
- Ikoner: Oppdatert ikonpakke ([#2197](https://github.com/navikt/aksel/pull/2197))
|
||||
|
||||
## 5.1.0
|
||||
|
||||
## 5.0.3
|
||||
|
||||
## 5.0.2
|
||||
|
||||
## 5.0.1
|
||||
|
||||
## 5.0.0
|
||||
|
||||
## 4.12.1
|
||||
|
||||
## 4.12.0
|
||||
|
||||
## 4.11.2
|
||||
|
||||
## 4.11.1
|
||||
|
||||
## 4.11.0
|
||||
|
||||
## 4.10.2
|
||||
|
||||
## 4.10.1
|
||||
|
||||
## 4.10.0
|
||||
|
||||
## 4.9.1
|
||||
|
||||
## 4.9.0
|
||||
|
||||
## 4.8.0
|
||||
|
||||
## 4.7.4
|
||||
|
||||
## 4.7.3
|
||||
|
||||
## 4.7.2
|
||||
|
||||
## 4.7.1
|
||||
|
||||
## 4.7.0
|
||||
|
||||
## 4.6.1
|
||||
|
||||
## 4.6.0
|
||||
|
||||
## 4.5.0
|
||||
|
||||
## 4.4.2
|
||||
|
||||
## 4.4.1
|
||||
|
||||
## 4.1.5
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Nye ikoner `ChevronRightLast` og `ChevronLeftLast` ([PR](https://github.com/navikt/aksel/pull/2054))
|
||||
|
||||
## 3.2.3
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Nye ikoner `FileParagraph` og `FilePlus` ([PR](https://github.com/navikt/aksel/pull/1998))
|
||||
|
||||
## 2.9.8
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Oppdatert Statusikoner til å være tydeligere og mer konsistente. ([PR](https://github.com/navikt/aksel/pull/1959))
|
||||
|
||||
## 2.9.7
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Fikset `CheckmarkIcon`-bug
|
||||
|
||||
## 2.9.6
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Fikset `CheckmarkCircleIcon`-bug ([PR](https://github.com/navikt/aksel/pull/1956))
|
||||
|
||||
## 2.9.3
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Nye ikoner `BulletList` og `NumberList` ([PR](https://github.com/navikt/aksel/pull/1950))
|
||||
|
||||
## 2.8.15
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- :tada: Nye ikoner `HandKnot` og `HandKnotFilled` ([PR](https://github.com/navikt/aksel/pull/1928))
|
||||
|
||||
## 2.8.13
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Oppdatert `InformationSquare`-ikon ([PR](https://github.com/navikt/aksel/pull/1921))
|
||||
|
||||
## 2.8.11
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Oppdatert `VideoSlack`, `Questionmark` og `Information`-ikoner ([PR](https://github.com/navikt/aksel/pull/1909))
|
||||
|
||||
## 2.8.8
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Nye ikoner `VideoSlash` og `VideoSlashFill`
|
||||
|
||||
## 2.8.4
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Fikset Sourcemap-bug
|
||||
|
||||
## 2.7.7
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Nye ikoner `CaretUpDownFilledDown`, `CaretUpDownFilledUp`, `CloudDown`, `CloudDownFill`, `CloudUp`, `CloudUpFill`, `HddDown`, `HddDownFill`, `HddUp`, `HddUpFill`, `Inbox`, `InboxDown`, `InboxDownFill`, `InboxFill`, `InboxUp`, `InboxUpFill`, `ShoppingBasket`, `ShoppingBasketFill`
|
||||
|
||||
## 2.7.4
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Nye ikoner, `CaretDownFill`, `CaretLeft`, `CaretLeftFill`, `CaretLeftRight`, `CaretLeftRightFill`, `CaretRight`, `CaretRightFill`, `CaretUpDownFill`, `CaretUpFill`, `Escalator`, `Moon`, `MoonFill`. Fjernet `EscalatorStroke` ([PR](https://github.com/navikt/aksel/pull/1852))
|
||||
|
||||
## 2.7.0
|
||||
|
||||
### Minor Changes
|
||||
|
||||
- Ny ikonpakke med for core icons 3! `@navikt/aksel-icons` ([PR](https://github.com/navikt/aksel/pull/1847))
|
||||
@@ -0,0 +1,59 @@
|
||||
# Aksel icons - Bidrag
|
||||
|
||||
## Foreslå nye ikoner
|
||||
|
||||
Om du ikke finner et ikonet du leter etter kan du [åpne et issue på github](https://github.com/navikt/aksel/issues/new?labels=nytt+✨%2Cikoner+🖼%2Cforespørsel+🥰&template&template=new-icon.yaml&title=%5BNytt+ikon%5D%3A+).
|
||||
|
||||
## Oppdatere ikon
|
||||
|
||||
Hvis du tenker et ikon fortjener en oppdatering eller er utdatert kan [du foreslå det her.](https://github.com/navikt/aksel/issues/new?labels=forespørsel+🥰&template=update-icon.yml&title=%5BInnspill+til+ikon%5D%3A+)
|
||||
|
||||
## Legge til nye ikoner selv
|
||||
|
||||
Hvis du selv ønsker å legge til nye ikoner kan du kopiere filenes fra `/template` og legge de inn i `/icons` med egen data. Alle ikonene har naming-format `PascalCase`. Alle ikonene har 1 SVG-fil og 1 tilhørende YML-fil.
|
||||
|
||||
### Svg
|
||||
|
||||
- Sizing, width og height må være 24x24: `width="24" height="24" `
|
||||
- Viewbox: `viewBox="0 0 24 24"`
|
||||
- Fill på path: `fill="#23262A"`
|
||||
|
||||
### Yml
|
||||
|
||||
```yml
|
||||
name: Template # Samme som filnavn
|
||||
category: Template category # Hovedkategori
|
||||
sub_category: Sub category # Underkategori
|
||||
keywords: # Samling med søkeord
|
||||
- template1
|
||||
- template2
|
||||
- template3
|
||||
variant: Stroke # Stroke eller Fill
|
||||
updated_at: 02.01.2023 # Dato for siste oppdatering
|
||||
created_at: 01.01.2023 # Dato for opprettelse
|
||||
```
|
||||
|
||||
### Publisere oppdatering
|
||||
|
||||
Når du har lagt til nye ikoner kan du opprette en pull request. Denne vil bli automatisk testet og så gått gjennom av Aksel-teamet.
|
||||
Legg gjerne til en `changeset` ved å kjøre `yarn changeset` i terminalen. Dette vil gi oss bedre oversikt over hva som er endret i endringslogger og automatisk bumpe pakke-versjonen ved merge.
|
||||
|
||||
#### Teste nytt ikon
|
||||
|
||||
Hvis du ønsker å teste om alt stemmer, både i `svg` og `yml` før du lager en PR kan du kjøre `yarn && cd navikt/aksel-icons && yarn test` i terminalen lokalt.
|
||||
|
||||
## Design av nye ikoner
|
||||
|
||||
### Generelt
|
||||
|
||||
- Designet følger Keyline-malen (under assets i figma-pakken).
|
||||
- Alle lag og grupper skal bruke `#23262A` for stroke og fill.
|
||||
|
||||
### Stroke (linje)
|
||||
|
||||
- Ikonet må bestå av kun linjer
|
||||
- Linjene skal være 1.5px, center-aligned
|
||||
|
||||
### Fill (fylt)
|
||||
|
||||
- Ikoner hvor shapes kan fylles, bør fylles
|
||||
@@ -0,0 +1,66 @@
|
||||
# Aksel icons
|
||||
|
||||
800+ open source icons made by Aksel, NAVs designsystem-team
|
||||
|
||||
- Designed for 24x24px
|
||||
- Available in React and SVG
|
||||
- Accessible with use of `title`-prop
|
||||
- Suffixed with `Icon`
|
||||
|
||||
## Install
|
||||
|
||||
```bash
|
||||
yarn add @navikt/aksel-icons
|
||||
npm install @navikt/aksel-icons
|
||||
```
|
||||
|
||||
## Use
|
||||
|
||||
For previous users of `@navikt/ds-icons`, this package utilizes the same API. The only difference is that the icons are suffixed with `Icon` to avoid naming conflicts and visual changes to the icons themselves.
|
||||
|
||||
```jsx
|
||||
import { StarIcon } from "@navikt/aksel-icons";
|
||||
|
||||
function App() {
|
||||
return <StarIcon title="star" fontSize="1.5rem" />;
|
||||
}
|
||||
```
|
||||
|
||||
Tip: Use the `title` prop for accessible icons.
|
||||
|
||||
### Sizing
|
||||
|
||||
Each icons `width` and `height` is default `1em`. This allows you to use the native `fontSize`-prop to adjust sizing. We recommend using at least 1.5rem/24px for best possible visual representation.
|
||||
|
||||
```jsx
|
||||
<StarIcon fontSize="1.5rem" />
|
||||
```
|
||||
|
||||
### Direct svg-import
|
||||
|
||||
All icons are available in raw SVG-format behind `/svg`. Note that svg-files do not have the suffix `Icon`.
|
||||
|
||||
```js
|
||||
import StarIcon from "@navikt/aksel-icons/svg/Star.svg";
|
||||
```
|
||||
|
||||
If using typescript, TS might complain about not finding types related to the svg-format. Add a `*.d.ts` file with this declaration to fix this. (This was copied from next/image-types/global.d.ts since next solves this internally, but should work elsewhere)
|
||||
|
||||
```ts
|
||||
declare module "*.svg" {
|
||||
/**
|
||||
* Use `any` to avoid conflicts with
|
||||
* `@svgr/webpack` plugin or
|
||||
* `babel-plugin-inline-react-svg` plugin.
|
||||
*/
|
||||
const content: any;
|
||||
|
||||
export default content;
|
||||
}
|
||||
```
|
||||
|
||||
## [Learn more](https://aksel.nav.no/ikoner)
|
||||
|
||||
## License
|
||||
|
||||
[MIT](https://github.com/navikt/aksel/blob/main/LICENSE)
|
||||
@@ -0,0 +1,34 @@
|
||||
const fastglob = require("fast-glob");
|
||||
const path = require("path");
|
||||
const jsYaml = require("js-yaml");
|
||||
const fs = require("fs");
|
||||
|
||||
const basePath = path.resolve(__dirname, "../icons");
|
||||
|
||||
const ymlList = fastglob
|
||||
.sync("*.yml", { cwd: basePath })
|
||||
.map((fileN) => path.basename(fileN));
|
||||
|
||||
describe(`Each icons YML-config is valid`, () => {
|
||||
ymlList.forEach((file) => {
|
||||
it(`${file} has valid YML-config`, () => {
|
||||
const ymlData = jsYaml.load(fs.readFileSync(`${basePath}/${file}`), {
|
||||
schema: jsYaml.JSON_SCHEMA,
|
||||
});
|
||||
expect(ymlData.name).toBeTruthy();
|
||||
expect(ymlData.category).toBeTruthy();
|
||||
expect(ymlData.sub_category).toBeTruthy();
|
||||
expect(ymlData.keywords).toBeTruthy();
|
||||
expect(ymlData.variant).toBeTruthy();
|
||||
expect(ymlData.keywords.length).toBeGreaterThan(0);
|
||||
expect(ymlData.updated_at).toBeTruthy();
|
||||
expect(isDate(ymlData.updated_at)).toBeTruthy();
|
||||
expect(ymlData.created_at).toBeTruthy();
|
||||
expect(isDate(ymlData.created_at)).toBeTruthy();
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
function isDate(dateStr) {
|
||||
return !isNaN(new Date(dateStr.split(".").reverse().join(".")).getDate());
|
||||
}
|
||||
@@ -0,0 +1,32 @@
|
||||
const fastglob = require("fast-glob");
|
||||
const path = require("path");
|
||||
|
||||
const basePath = path.resolve(__dirname, "../icons");
|
||||
|
||||
const svgList = fastglob
|
||||
.sync("*.svg", { cwd: basePath })
|
||||
.map((fileN) => path.basename(fileN));
|
||||
|
||||
const ymlList = fastglob
|
||||
.sync("*.yml", { cwd: basePath })
|
||||
.map((fileN) => path.basename(fileN));
|
||||
|
||||
describe(`Each SVG-file has a matching YML file`, () => {
|
||||
it(`must have a corresponding YML file`, () => {
|
||||
expect(
|
||||
ymlList
|
||||
.map((yml) => yml.replace(".yml", ".svg"))
|
||||
.filter((file) => !svgList.includes(file))
|
||||
).toStrictEqual([]);
|
||||
});
|
||||
});
|
||||
|
||||
describe(`Each YML-file has a matching SVG file`, () => {
|
||||
it(`must have a corresponding SVG file`, () => {
|
||||
expect(
|
||||
svgList
|
||||
.map((svg) => svg.replace(".svg", ".yml"))
|
||||
.filter((file) => !ymlList.includes(file))
|
||||
).toStrictEqual([]);
|
||||
});
|
||||
});
|
||||
@@ -0,0 +1,71 @@
|
||||
import { basename } from "path";
|
||||
import { unified } from "unified";
|
||||
import parse from "rehype-parse";
|
||||
import fastglob from "fast-glob";
|
||||
import { readFileSync } from "fs";
|
||||
import { select, selectAll } from "hast-util-select";
|
||||
|
||||
const basePath = "./icons";
|
||||
|
||||
const svgList = fastglob
|
||||
.sync("*.svg", { cwd: basePath })
|
||||
.map((fileN) => basename(fileN));
|
||||
|
||||
describe(`Each icons has a valid code`, () => {
|
||||
svgList.forEach((file) => {
|
||||
describe(`${file} has valid code`, () => {
|
||||
const iconAst = unified()
|
||||
.use(parse, { fragment: true, space: "svg" })
|
||||
.parse(readFileSync(`${basePath}/${file}`));
|
||||
|
||||
it(`has valid attributes on root-node`, () => {
|
||||
const properties = Object.keys(
|
||||
select(":root", iconAst).properties
|
||||
).sort();
|
||||
|
||||
expect(properties).toStrictEqual(
|
||||
["viewBox", "xmlns", "height", "width", "fill"].sort()
|
||||
);
|
||||
});
|
||||
|
||||
it(`has valid xml-attr`, () => {
|
||||
const xmlns = select(":root", iconAst).properties.xmlns;
|
||||
expect(xmlns).toBe("http://www.w3.org/2000/svg");
|
||||
});
|
||||
|
||||
it(`has valid viewbox`, () => {
|
||||
const viewbox = select(":root", iconAst).properties.viewBox;
|
||||
expect(viewbox).toBe("0 0 24 24");
|
||||
});
|
||||
|
||||
it(`root fill is none`, () => {
|
||||
const fill = select(":root", iconAst).properties.fill;
|
||||
expect(fill).toBe("none");
|
||||
});
|
||||
|
||||
it(`has valid width and height`, () => {
|
||||
const width = select(":root", iconAst).properties.width;
|
||||
const height = select(":root", iconAst).properties.height;
|
||||
expect(width).toBe("24");
|
||||
expect(height).toBe("24");
|
||||
});
|
||||
|
||||
it(`has valid stroke`, () => {
|
||||
const nodes = selectAll("*", iconAst);
|
||||
|
||||
nodes.forEach((n) => {
|
||||
n.properties?.stroke &&
|
||||
expect(n.properties.stroke).toEqual("#23262A");
|
||||
});
|
||||
});
|
||||
|
||||
it(`has valid stroke-width`, () => {
|
||||
const nodes = selectAll("*", iconAst);
|
||||
nodes.forEach((n) => {
|
||||
n.properties?.strokeWidth &&
|
||||
expect(n.properties?.strokeWidth).toEqual("1.5");
|
||||
});
|
||||
});
|
||||
});
|
||||
});
|
||||
});
|
||||
@@ -0,0 +1,22 @@
|
||||
/**
|
||||
* Fikser https://github.com/navikt/aksel/issues/1758
|
||||
*/
|
||||
|
||||
const fs = require("fs");
|
||||
|
||||
const basePath = "./dist/react/esm";
|
||||
|
||||
const files = fs.readdirSync(basePath).filter((x) => x.endsWith(".d.ts"));
|
||||
|
||||
files.forEach((file) => {
|
||||
let data = fs.readFileSync(`${basePath}/${file}`).toString().split("\n");
|
||||
|
||||
data = data.map((x) => {
|
||||
return x.includes("React.ForwardRefExoticComponent")
|
||||
? x.split(":")[0] +
|
||||
`: React.ForwardRefExoticComponent<React.SVGProps<SVGSVGElement> & SVGRProps & React.RefAttributes<SVGSVGElement>>;`
|
||||
: x;
|
||||
});
|
||||
|
||||
fs.writeFileSync(`${basePath}/${file}`, data.join("\n"));
|
||||
});
|
||||
@@ -0,0 +1,59 @@
|
||||
const file_key = "wEdyFjCQSBR3U7FvrMbPXa";
|
||||
|
||||
export const fetchIcons = async () => {
|
||||
const data = await fetch(
|
||||
`https://api.figma.com/v1/files/${file_key}/components`,
|
||||
{
|
||||
headers: {
|
||||
"Content-type": "application/json",
|
||||
"X-FIGMA-TOKEN": process.env.FIGMA_TOKEN,
|
||||
},
|
||||
}
|
||||
)
|
||||
.then((x) => x.json())
|
||||
.catch((e) => {
|
||||
throw e.message;
|
||||
});
|
||||
|
||||
if (!data?.meta?.components || data?.meta?.components.length === 0) {
|
||||
throw new Error("Fant ingen publiserte ikoner");
|
||||
}
|
||||
|
||||
return data?.meta?.components;
|
||||
};
|
||||
|
||||
export const fetchDownloadUrls = async (idArray) => {
|
||||
const urls = { images: null };
|
||||
|
||||
for (let ids of idArray) {
|
||||
await fetch(
|
||||
`https://api.figma.com/v1/images/${file_key}/?ids=${ids}&format=svg`,
|
||||
{
|
||||
headers: {
|
||||
"Content-type": "application/json",
|
||||
"X-FIGMA-TOKEN": process.env.FIGMA_TOKEN,
|
||||
},
|
||||
}
|
||||
)
|
||||
.then((x) => x.json())
|
||||
.then((x) => {
|
||||
urls.images = {
|
||||
...urls.images,
|
||||
...x.images,
|
||||
};
|
||||
})
|
||||
.catch((e) => {
|
||||
throw e.message;
|
||||
});
|
||||
}
|
||||
return urls;
|
||||
};
|
||||
|
||||
export const fetchIcon = async (url) => {
|
||||
return await fetch(url)
|
||||
.then((x) => x.text())
|
||||
.catch((e) => {
|
||||
console.log("Error fetching icon: ", e.message);
|
||||
throw e.message;
|
||||
});
|
||||
};
|
||||
@@ -0,0 +1,15 @@
|
||||
import startCase from "lodash.startcase";
|
||||
import camelCase from "lodash.camelCase";
|
||||
|
||||
export const resolveName = (icon) => {
|
||||
const isVariant = icon.name.startsWith("Variant=");
|
||||
|
||||
if (isVariant) {
|
||||
const variant = icon.name.replace("Variant=", "").replace("Stroke", "");
|
||||
const actualName = icon["containing_frame"]?.["containingStateGroup"]?.name;
|
||||
const name = `${actualName}${variant}`;
|
||||
return `${startCase(camelCase(name)).replace(/ /g, "")}.svg`;
|
||||
}
|
||||
|
||||
return `${startCase(camelCase(icon.name)).replace(/ /g, "")}.svg`;
|
||||
};
|
||||
@@ -0,0 +1,64 @@
|
||||
import { config } from "dotenv";
|
||||
import { fetchIcons, fetchDownloadUrls, fetchIcon } from "./fetch-icons.mjs";
|
||||
import { makeConfig } from "./make-configs.mjs";
|
||||
import { existsSync, writeFileSync, mkdirSync, rmSync, readdirSync } from "fs";
|
||||
import { resolve } from "path";
|
||||
import { resolveName } from "./icon-name.mjs";
|
||||
import { paginate } from "./paginate.mjs";
|
||||
config();
|
||||
/* https://www.figma.com/file/wEdyFjCQSBR3U7FvrMbPXa/Core-Icons-Next?node-id=277%3A1221&t=mUJzFvnsceYYXNL5-0 */
|
||||
|
||||
const iconFolder = "./icons";
|
||||
|
||||
if (!process.env.FIGMA_TOKEN) {
|
||||
throw new Error("FIGMA_TOKEN not set in .env");
|
||||
}
|
||||
|
||||
async function main() {
|
||||
let icons = await fetchIcons();
|
||||
|
||||
const totalIcons = icons.length;
|
||||
|
||||
const { images } = await fetchDownloadUrls(
|
||||
paginate(
|
||||
icons.map((x) => x.node_id),
|
||||
400
|
||||
).map((x) => x.join(","))
|
||||
);
|
||||
|
||||
if (existsSync(iconFolder)) {
|
||||
rmSync(iconFolder, { recursive: true, force: true });
|
||||
}
|
||||
|
||||
mkdirSync(iconFolder);
|
||||
|
||||
console.log(`Laster ned ${Object.keys(images).length} ikoner`);
|
||||
|
||||
for (const [key, value] of Object.entries(images)) {
|
||||
const icon = await fetchIcon(value).catch((e) => {
|
||||
throw e;
|
||||
});
|
||||
await new Promise((r) => setTimeout(r, 20));
|
||||
|
||||
icon &&
|
||||
writeFileSync(
|
||||
resolve(iconFolder, resolveName(icons.find((x) => x.node_id === key))),
|
||||
icon,
|
||||
{
|
||||
encoding: "utf8",
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
makeConfig(icons, iconFolder);
|
||||
|
||||
readdirSync(iconFolder, (_, files) => {
|
||||
if (files.length * 2 !== totalIcons) {
|
||||
throw new Error(`Ikoner mangler!`);
|
||||
}
|
||||
});
|
||||
|
||||
console.log(`Success! ${Object.keys(images).length} ikoner lastet ned`);
|
||||
}
|
||||
|
||||
main();
|
||||
@@ -0,0 +1,36 @@
|
||||
import { writeFileSync } from "fs";
|
||||
import jsYaml from "js-yaml";
|
||||
import { resolve } from "path";
|
||||
import { resolveName } from "./icon-name.mjs";
|
||||
|
||||
export const makeConfig = (icons, folder) => {
|
||||
icons.forEach((icon) => {
|
||||
const config = {
|
||||
name: resolveName(icon).replace(".svg", ""),
|
||||
category: icon.containing_frame.pageName,
|
||||
sub_category: icon.containing_frame.name,
|
||||
keywords: [...icon.description.split(",").map((x) => x.trim())],
|
||||
variant: icon.name.includes("Variant=")
|
||||
? icon.name.replace("Variant=", "")
|
||||
: "Stroke",
|
||||
updated_at: new Date(icon.updated_at)
|
||||
.toISOString()
|
||||
.split("T")[0]
|
||||
.split("-")
|
||||
.reverse()
|
||||
.join("."),
|
||||
created_at: new Date(icon.created_at)
|
||||
.toISOString()
|
||||
.split("T")[0]
|
||||
.split("-")
|
||||
.reverse()
|
||||
.join("."),
|
||||
};
|
||||
|
||||
const yml = jsYaml.dump(config, { noRefs: true, skipInvalid: false });
|
||||
|
||||
writeFileSync(resolve(folder, `${config.name}.yml`), yml, {
|
||||
encoding: "utf8",
|
||||
});
|
||||
});
|
||||
};
|
||||
@@ -0,0 +1,9 @@
|
||||
export function paginate(arr, size) {
|
||||
return arr.reduce((acc, val, i) => {
|
||||
let idx = Math.floor(i / size);
|
||||
let page = acc[idx] || (acc[idx] = []);
|
||||
page.push(val);
|
||||
|
||||
return acc;
|
||||
}, []);
|
||||
}
|
||||
@@ -0,0 +1,12 @@
|
||||
const path = require("path");
|
||||
|
||||
const defaultIndexTemplate = (paths) => {
|
||||
const exportEntries = paths.map((filePath) => {
|
||||
const basename = path.basename(filePath, path.extname(filePath));
|
||||
return `export { default as ${basename}Icon } from './${basename}'`;
|
||||
});
|
||||
|
||||
return exportEntries.join("\n");
|
||||
};
|
||||
|
||||
module.exports = defaultIndexTemplate;
|
||||
@@ -0,0 +1,50 @@
|
||||
const fastglob = require("fast-glob");
|
||||
const path = require("path");
|
||||
const jsYaml = require("js-yaml");
|
||||
const fs = require("fs");
|
||||
|
||||
const basePath = path.resolve(__dirname, "../icons");
|
||||
|
||||
const ymlList = fastglob
|
||||
.sync("*.yml", { cwd: basePath })
|
||||
.map((fileN) => path.basename(fileN));
|
||||
|
||||
const metadata = {};
|
||||
|
||||
ymlList.forEach((file) => {
|
||||
const ymlData = jsYaml.load(fs.readFileSync(`${basePath}/${file}`), {
|
||||
schema: jsYaml.JSON_SCHEMA,
|
||||
});
|
||||
const iconName = file.replace(".yml", "");
|
||||
metadata[iconName] = { id: iconName, ...ymlData };
|
||||
});
|
||||
|
||||
fs.writeFileSync(
|
||||
path.resolve(__dirname, "../dist/metadata.js"),
|
||||
`const metadata = ${JSON.stringify(metadata)};\n\n module.exports = metadata;`
|
||||
);
|
||||
|
||||
fs.writeFileSync(
|
||||
path.resolve(__dirname, "../dist/metadata.mjs"),
|
||||
`const metadata = ${JSON.stringify(metadata)};\n\n export default metadata;`
|
||||
);
|
||||
|
||||
fs.writeFileSync(
|
||||
path.resolve(__dirname, "../dist/metadata.d.ts"),
|
||||
`export type AkselIcon = {
|
||||
id: string;
|
||||
name: string;
|
||||
category: string;
|
||||
sub_category: "Time",
|
||||
keywords: string[];
|
||||
variant: "stroke" | "fill";
|
||||
updated_at: Date;
|
||||
created_at: Date;
|
||||
}
|
||||
|
||||
declare const metadata: {
|
||||
[iconId: string]: AkselIcon;
|
||||
};
|
||||
|
||||
export default metadata;`
|
||||
);
|
||||
@@ -0,0 +1,62 @@
|
||||
const AdmZip = require("adm-zip");
|
||||
const {
|
||||
existsSync,
|
||||
readFileSync,
|
||||
mkdirSync,
|
||||
rmSync,
|
||||
copyFileSync,
|
||||
} = require("fs");
|
||||
const path = require("path");
|
||||
const fastGlob = require("fast-glob");
|
||||
const jsYaml = require("js-yaml");
|
||||
|
||||
const iconFolder = "./core-icons";
|
||||
|
||||
async function generateFile() {
|
||||
if (existsSync(iconFolder)) {
|
||||
rmSync(iconFolder, { recursive: true, force: true });
|
||||
}
|
||||
mkdirSync(iconFolder);
|
||||
|
||||
const basePath = path.resolve(__dirname, "../icons");
|
||||
|
||||
const ymlList = fastGlob
|
||||
.sync("*.yml", { cwd: basePath })
|
||||
.map((fileN) => path.basename(fileN));
|
||||
const categories = new Map();
|
||||
|
||||
ymlList.forEach((file) => {
|
||||
const ymlData = jsYaml.load(readFileSync(`${basePath}/${file}`), {
|
||||
schema: jsYaml.JSON_SCHEMA,
|
||||
});
|
||||
categories.set(
|
||||
ymlData.category,
|
||||
categories.get(ymlData.category)
|
||||
? [...categories.get(ymlData.category), ymlData.name]
|
||||
: [ymlData.name]
|
||||
);
|
||||
});
|
||||
|
||||
categories.forEach((value, key) => {
|
||||
mkdirSync(`${iconFolder}/${key}`);
|
||||
value.forEach((icon) =>
|
||||
copyFileSync(
|
||||
`${basePath}/${icon}.svg`,
|
||||
`${iconFolder}/${key}/${icon}.svg`
|
||||
)
|
||||
);
|
||||
});
|
||||
}
|
||||
|
||||
async function createZipArchive() {
|
||||
const zip = new AdmZip();
|
||||
const outputFile = "aksel-icons.zip";
|
||||
|
||||
await generateFile();
|
||||
|
||||
zip.addLocalFolder("./core-icons");
|
||||
zip.writeZip(outputFile);
|
||||
console.log(`Created ${outputFile} successfully`);
|
||||
}
|
||||
|
||||
createZipArchive();
|
||||
@@ -0,0 +1,26 @@
|
||||
# Logs
|
||||
logs
|
||||
*.log
|
||||
npm-debug.log*
|
||||
yarn-debug.log*
|
||||
yarn-error.log*
|
||||
pnpm-debug.log*
|
||||
lerna-debug.log*
|
||||
|
||||
node_modules
|
||||
dist
|
||||
dist-ssr
|
||||
*.local
|
||||
|
||||
# Editor directories and files
|
||||
.vscode/*
|
||||
!.vscode/extensions.json
|
||||
.idea
|
||||
.DS_Store
|
||||
*.suo
|
||||
*.ntvs*
|
||||
*.njsproj
|
||||
*.sln
|
||||
*.sw?
|
||||
!src
|
||||
!*.d.ts
|
||||
@@ -0,0 +1,22 @@
|
||||

|
||||
|
||||
# Aksel Icons plugin
|
||||
|
||||
Pluginen gir deg mulighet til å se gjennom og hente ut alle ikonene i fra ikonpakken `@navikt/aksel-icons`. Du slipper da å hente nye oppdateringer fra Figma Community.
|
||||
|
||||
Referer til [ikon-dokumentasjonen](https://aksel.nav.no/ikoner) for å se alle ikonene.
|
||||
Har du ønsker om nye ikoner, eller ønsker å bidra med å lage nye, lag et issue på [GitHub-repoet for designsystemet](https://github.com/navikt/aksel).
|
||||
|
||||
## Quickstart
|
||||
|
||||
- `yarn dev` for development
|
||||
- `yarn build` for production-build
|
||||
|
||||
### Test with Figma
|
||||
|
||||
- Open `Figma` -> `Plugins` -> `Development` -> `Import plugin from manifest...` and choose `manifest.json` file from this repo.
|
||||
|
||||
### Publish to Figma
|
||||
|
||||
- Open `Figma` -> `Plugins` -> `Find more plugins` -> `Publish new versions`
|
||||
(requires publish-access)
|
||||
@@ -0,0 +1,10 @@
|
||||
{
|
||||
"name": "Aksel Icons",
|
||||
"id": "1221057403873975172",
|
||||
"api": "1.0.0",
|
||||
"main": "dist/plugin.js",
|
||||
"ui": "dist/index.html",
|
||||
"capabilities": [],
|
||||
"enableProposedApi": false,
|
||||
"editorType": ["figma", "figjam"]
|
||||
}
|
||||
@@ -0,0 +1,35 @@
|
||||
{
|
||||
"name": "aksel-icons-figma-plugin",
|
||||
"private": true,
|
||||
"version": "1.0.0",
|
||||
"type": "module",
|
||||
"scripts": {
|
||||
"dev": "vite -c ./vite.config.ui.ts",
|
||||
"build:icon-plugin": "tsc && npm run build:ui && npm run build:plugin",
|
||||
"build:ui": "vite build -c ./vite.config.ui.ts --emptyOutDir",
|
||||
"build:plugin": "vite build -c ./vite.config.plugin.ts",
|
||||
"preview": "vite preview"
|
||||
},
|
||||
"dependencies": {
|
||||
"@navikt/ds-css": "*",
|
||||
"@navikt/ds-react": "*",
|
||||
"fuse.js": "^6.6.2",
|
||||
"react": "^18.0.0",
|
||||
"react-dom": "^18.0.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@figma/plugin-typings": "^1.62.0",
|
||||
"@svgr/core": "^6.5.1",
|
||||
"@types/node": "^18.15.11",
|
||||
"@types/postcss-url": "^10.0.0",
|
||||
"@types/react": "^18.0.0",
|
||||
"@types/react-dom": "^18.0.0",
|
||||
"@vitejs/plugin-react": "^3.1.0",
|
||||
"postcss": "^8.4.0",
|
||||
"postcss-url": "^10.1.3",
|
||||
"typescript": "^4.8.0",
|
||||
"vite": "^4.2.0",
|
||||
"vite-plugin-singlefile": "^0.13.3",
|
||||
"vite-plugin-svgr": "^2.4.0"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,31 @@
|
||||
/* eslint-disable import/no-anonymous-default-export */
|
||||
import fs from "fs";
|
||||
import { Plugin } from "vite";
|
||||
|
||||
function svgToDataURL(svgStr: string) {
|
||||
const encoded = encodeURIComponent(svgStr)
|
||||
.replace(/'/g, "%27")
|
||||
.replace(/"/g, "%22");
|
||||
|
||||
const header = "data:image/svg+xml,";
|
||||
const dataUrl = header + encoded;
|
||||
|
||||
return dataUrl;
|
||||
}
|
||||
|
||||
export default function (): Plugin {
|
||||
return {
|
||||
name: "vite-inline-svg",
|
||||
enforce: "pre",
|
||||
|
||||
async load(id) {
|
||||
const [path, query] = id.split("?", 2);
|
||||
|
||||
if (!path.endsWith(".svg")) return;
|
||||
if (query !== "inline") return;
|
||||
|
||||
const svg = await fs.promises.readFile(path, "utf-8");
|
||||
return `export default "${svgToDataURL(svg)}"`;
|
||||
},
|
||||
};
|
||||
}
|
||||
@@ -0,0 +1,50 @@
|
||||
import { createFilter, FilterPattern } from "@rollup/pluginutils";
|
||||
import type { Config } from "@svgr/core";
|
||||
import fs from "fs";
|
||||
import type { Plugin } from "vite";
|
||||
import { transformWithEsbuild } from "vite";
|
||||
|
||||
export interface ViteSvgrOptions {
|
||||
svgrOptions?: Config;
|
||||
esbuildOptions?: Parameters<typeof transformWithEsbuild>[2];
|
||||
exclude?: FilterPattern;
|
||||
include?: FilterPattern;
|
||||
}
|
||||
|
||||
export default function viteSvgr({
|
||||
svgrOptions,
|
||||
esbuildOptions,
|
||||
include = "**/*.svg?component",
|
||||
exclude,
|
||||
}: ViteSvgrOptions = {}): Plugin {
|
||||
const filter = createFilter(include, exclude);
|
||||
|
||||
return {
|
||||
name: "vite-svgr-component",
|
||||
|
||||
async transform(code, id) {
|
||||
if (filter(id)) {
|
||||
const { transform } = await import("@svgr/core");
|
||||
const svgCode = await fs.promises.readFile(
|
||||
id.replace(/\?.*$/, ""),
|
||||
"utf8"
|
||||
);
|
||||
|
||||
const componentCode = await transform(svgCode, svgrOptions, {
|
||||
filePath: id,
|
||||
caller: { previousExport: null },
|
||||
});
|
||||
|
||||
const res = await transformWithEsbuild(componentCode, id, {
|
||||
loader: "jsx",
|
||||
...esbuildOptions,
|
||||
});
|
||||
|
||||
return {
|
||||
code: res.code,
|
||||
map: null,
|
||||
};
|
||||
}
|
||||
},
|
||||
};
|
||||
}
|
||||
|
After Width: | Height: | Size: 24 KiB |
|
After Width: | Height: | Size: 14 KiB |
|
After Width: | Height: | Size: 1.4 KiB |
@@ -0,0 +1,4 @@
|
||||
<svg width="32" height="32" viewBox="0 0 170 170" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path fill-rule="evenodd" clip-rule="evenodd" d="M2.07318 54.5734C-0.692218 51.806 -0.690888 47.3204 2.07614 44.5546L38.6019 8.04512C38.7787 7.8684 38.9576 7.69433 39.1387 7.52295L39.1205 7.50476C42.7235 3.90124 47.1588 1.63753 51.8075 0.71364C53.8316 0.243049 55.9182 1.07479e-05 58.0297 1.01387e-05L142.517 0C157.695 5.55246e-06 170 12.3065 170 27.4874V111.958C170 113.916 169.791 115.852 169.386 117.737C168.522 122.523 166.241 127.103 162.542 130.803L162.533 130.794C162.342 130.997 162.148 131.197 161.95 131.395L125.425 167.925C122.659 170.692 118.174 170.692 115.408 167.925C112.642 165.158 112.642 160.673 115.408 157.906L151.933 121.376C153.698 119.61 154.917 117.4 155.48 115.008C155.999 111.779 155.014 108.355 152.525 105.866L64.1955 17.5236C61.632 14.9597 58.0865 13.9765 54.7698 14.574C52.4605 15.1572 50.3292 16.3547 48.6162 18.0669L12.0905 54.5764C9.32349 57.3422 4.83857 57.3409 2.07318 54.5734ZM80.8759 14.1688L155.833 89.1374V27.4874C155.833 20.1317 149.871 14.1688 142.517 14.1688L80.8759 14.1688Z" fill="#004367"/>
|
||||
<path d="M2.07466 167.925C-0.691554 165.158 -0.691554 160.673 2.07466 157.906L65.8247 94.1468C68.5909 91.3801 73.0758 91.3801 75.842 94.1468C78.6082 96.9134 78.6082 101.399 75.842 104.166L12.092 167.925C9.32579 170.692 4.84087 170.692 2.07466 167.925Z" fill="#004367"/>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 1.4 KiB |
@@ -0,0 +1,21 @@
|
||||
/* eslint-disable no-restricted-globals */
|
||||
/* eslint-disable no-undef */
|
||||
import * as Networker from "monorepo-networker";
|
||||
import { NetworkMessages } from "@common/network/messages";
|
||||
import { NetworkSide } from "@common/network/sides";
|
||||
|
||||
export const initializeNetwork = Networker.createInitializer({
|
||||
messagesRegistry: NetworkMessages.registry,
|
||||
|
||||
initTransports: function (register) {
|
||||
register(NetworkSide.PLUGIN, NetworkSide.UI, (message) => {
|
||||
// @ts-ignore
|
||||
figma.ui.postMessage(message);
|
||||
});
|
||||
|
||||
register(NetworkSide.UI, NetworkSide.PLUGIN, (message) => {
|
||||
// @ts-ignore
|
||||
parent.postMessage({ pluginMessage: message }, "*");
|
||||
});
|
||||
},
|
||||
});
|
||||
@@ -0,0 +1,21 @@
|
||||
import { CreateRectMessage } from "@common/network/messages/CreateRectMessage";
|
||||
import { HelloMessage } from "@common/network/messages/HelloMessage";
|
||||
import { PingMessage } from "@common/network/messages/PingMessage";
|
||||
import { NetworkSide } from "@common/network/sides";
|
||||
import * as Networker from "monorepo-networker";
|
||||
|
||||
export namespace NetworkMessages {
|
||||
export const registry = new Networker.MessageTypeRegistry();
|
||||
|
||||
export const PING = registry.register(new PingMessage("ping"));
|
||||
|
||||
export const HELLO_PLUGIN = registry.register(
|
||||
new HelloMessage(NetworkSide.PLUGIN)
|
||||
);
|
||||
|
||||
export const HELLO_UI = registry.register(new HelloMessage(NetworkSide.UI));
|
||||
|
||||
export const CREATE_RECT = registry.register(
|
||||
new CreateRectMessage("create-rect")
|
||||
);
|
||||
}
|
||||
@@ -0,0 +1,42 @@
|
||||
/* eslint-disable no-undef */
|
||||
import { NetworkSide } from "@common/network/sides";
|
||||
import * as Networker from "monorepo-networker";
|
||||
|
||||
interface Payload {
|
||||
width: number;
|
||||
height: number;
|
||||
}
|
||||
|
||||
export class CreateRectMessage extends Networker.MessageType<Payload> {
|
||||
public receivingSide(): Networker.Side {
|
||||
return NetworkSide.PLUGIN;
|
||||
}
|
||||
|
||||
public handle(payload: Payload, from: Networker.Side): void {
|
||||
// @ts-ignore
|
||||
if (figma.editorType === "figma") {
|
||||
// @ts-ignore
|
||||
const rect = figma.createRectangle();
|
||||
rect.x = 0;
|
||||
rect.y = 0;
|
||||
rect.name = "Plugin Rectangle # " + Math.floor(Math.random() * 9999);
|
||||
rect.fills = [
|
||||
{
|
||||
type: "SOLID",
|
||||
color: {
|
||||
r: Math.random(),
|
||||
g: Math.random(),
|
||||
b: Math.random(),
|
||||
},
|
||||
},
|
||||
];
|
||||
rect.resize(payload.width, payload.height);
|
||||
// @ts-ignore
|
||||
figma.currentPage.appendChild(rect);
|
||||
// @ts-ignore
|
||||
figma.viewport.scrollAndZoomIntoView([rect]);
|
||||
// @ts-ignore
|
||||
figma.closePlugin();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,19 @@
|
||||
import * as Networker from "monorepo-networker";
|
||||
|
||||
interface Payload {
|
||||
text: string;
|
||||
}
|
||||
|
||||
export class HelloMessage extends Networker.MessageType<Payload> {
|
||||
constructor(private side: Networker.Side) {
|
||||
super("hello-" + side.getName());
|
||||
}
|
||||
|
||||
receivingSide(): Networker.Side {
|
||||
return this.side;
|
||||
}
|
||||
|
||||
handle(payload: Payload, from: Networker.Side) {
|
||||
console.log(`${from.getName()} said "${payload.text}"`);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,17 @@
|
||||
import * as Networker from "monorepo-networker";
|
||||
import { NetworkSide } from "@common/network/sides";
|
||||
|
||||
interface Payload {}
|
||||
|
||||
type Response = string;
|
||||
|
||||
export class PingMessage extends Networker.MessageType<Payload, Response> {
|
||||
receivingSide(): Networker.Side {
|
||||
return NetworkSide.PLUGIN;
|
||||
}
|
||||
|
||||
handle(payload: Payload, from: Networker.Side): string {
|
||||
console.log(from.getName(), "has pinged us!");
|
||||
return `Pong, ${from.getName()}!`;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,24 @@
|
||||
/* eslint-disable no-undef */
|
||||
import * as Networker from "monorepo-networker";
|
||||
|
||||
export namespace NetworkSide {
|
||||
export const PLUGIN = Networker.Side.register(
|
||||
new Networker.Side<MessageEvent<any>>("Plugin", {
|
||||
// @ts-ignore
|
||||
attachListener: (callback) => figma.ui.on("message", callback),
|
||||
// @ts-ignore
|
||||
detachListener: (callback) => figma.ui.off("message", callback),
|
||||
})
|
||||
);
|
||||
|
||||
export const UI = Networker.Side.register(
|
||||
new Networker.Side("UI", {
|
||||
shouldHandle: (event) => event.data?.pluginId != null,
|
||||
messageGetter: (event) => event.data.pluginMessage,
|
||||
attachListener: (callback) =>
|
||||
window.addEventListener("message", callback),
|
||||
detachListener: (callback) =>
|
||||
window.removeEventListener("message", callback),
|
||||
})
|
||||
);
|
||||
}
|
||||
@@ -0,0 +1,48 @@
|
||||
/* eslint-disable no-undef */
|
||||
|
||||
figma.showUI(__html__, { width: 480, height: 600 });
|
||||
|
||||
figma.ui.onmessage = (msg) => {
|
||||
if (msg.type === "create-icon") {
|
||||
const nodes = [];
|
||||
|
||||
const icon = figma.createNodeFromSvg(msg.svg);
|
||||
icon.name = msg.name;
|
||||
icon.resize(msg.size, msg.size);
|
||||
nodes.push(icon);
|
||||
|
||||
figma.currentPage.appendChild(icon);
|
||||
|
||||
figma.viewport.scrollAndZoomIntoView(nodes);
|
||||
|
||||
figma.ui.postMessage({
|
||||
type: "create-icon",
|
||||
message: `Created ${msg.name} icon}`,
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
// https://github.com/figma/plugin-samples#icon-drag-and-drop
|
||||
figma.on("drop", (event) => {
|
||||
const { files, node } = event;
|
||||
|
||||
if (files.length > 0 && files[0].type === "image/svg+xml") {
|
||||
files[0].getTextAsync().then((text) => {
|
||||
const newNode = figma.createNodeFromSvg(text);
|
||||
newNode.name = `${files[0].name.replace(".svg", "")}Icon`;
|
||||
newNode.resize(24, 24);
|
||||
|
||||
// We can only append page nodes to documents
|
||||
if ("appendChild" in node && node.type !== "DOCUMENT") {
|
||||
node.appendChild(newNode);
|
||||
}
|
||||
|
||||
newNode.x = event.x;
|
||||
newNode.y = event.y;
|
||||
|
||||
figma.currentPage.selection = [newNode];
|
||||
});
|
||||
|
||||
return false;
|
||||
}
|
||||
});
|
||||
@@ -0,0 +1,193 @@
|
||||
import { Heading, Search, ToggleGroup } from "@navikt/ds-react";
|
||||
import Fuse from "fuse.js";
|
||||
import { useEffect, useMemo, useState } from "react";
|
||||
import * as Icons from "../../../";
|
||||
import meta from "../../../dist/metadata";
|
||||
import "./app.css";
|
||||
import { categorizeIcons, getFillIcon } from "./utils";
|
||||
|
||||
const fuseStroke = new Fuse(
|
||||
Object.values(meta).filter((x) => x.variant.toLowerCase() === "stroke"),
|
||||
{
|
||||
threshold: 0.2,
|
||||
keys: [
|
||||
{ name: "name", weight: 3 },
|
||||
{ name: "category", weight: 2 },
|
||||
{ name: "sub_category", weight: 2 },
|
||||
{ name: "keywords", weight: 3 },
|
||||
{ name: "variant", weight: 1 },
|
||||
],
|
||||
shouldSort: false,
|
||||
}
|
||||
);
|
||||
|
||||
const fuseFill = new Fuse(getFillIcon(Object.values(meta)), {
|
||||
threshold: 0.2,
|
||||
keys: [
|
||||
{ name: "name", weight: 3 },
|
||||
{ name: "category", weight: 2 },
|
||||
{ name: "sub_category", weight: 2 },
|
||||
{ name: "keywords", weight: 3 },
|
||||
{ name: "variant", weight: 1 },
|
||||
],
|
||||
shouldSort: false,
|
||||
});
|
||||
|
||||
const App = () => {
|
||||
const [query, setQuery] = useState("");
|
||||
const [toggle, setToggle] = useState<"stroke" | "fill">("stroke");
|
||||
|
||||
const [strokeIcons] = useState(
|
||||
Object.values(meta).filter((x) => x.variant.toLowerCase() === "stroke")
|
||||
);
|
||||
|
||||
const [fillIcons] = useState(getFillIcon(Object.values(meta)));
|
||||
|
||||
const categories = useMemo(() => {
|
||||
if (toggle === "fill") {
|
||||
return categorizeIcons(
|
||||
query
|
||||
? fuseFill.search(query).map((result) => result.item as any)
|
||||
: fillIcons
|
||||
);
|
||||
}
|
||||
return categorizeIcons(
|
||||
query
|
||||
? fuseStroke.search(query).map((result) => result.item as any)
|
||||
: strokeIcons
|
||||
);
|
||||
}, [toggle, query, strokeIcons, fillIcons]);
|
||||
|
||||
const onCreate = (id: string, name: string) => {
|
||||
let svg = document.getElementById(id)?.outerHTML;
|
||||
let size = 24;
|
||||
// eslint-disable-next-line no-restricted-globals
|
||||
parent.postMessage(
|
||||
{
|
||||
pluginMessage: {
|
||||
type: "create-icon",
|
||||
svg,
|
||||
size,
|
||||
name,
|
||||
},
|
||||
},
|
||||
"*"
|
||||
);
|
||||
};
|
||||
|
||||
useEffect(() => {
|
||||
const dragEvent = (e) => {
|
||||
// Don't proceed if the item was dropped inside the plugin window.
|
||||
if (e.view.length === 0) {
|
||||
return;
|
||||
}
|
||||
|
||||
const file = new File([e.target.innerHTML], `${e.target.id}.svg`, {
|
||||
type: "image/svg+xml",
|
||||
});
|
||||
|
||||
window.parent.postMessage(
|
||||
{
|
||||
pluginDrop: {
|
||||
clientX: e.clientX,
|
||||
clientY: e.clientY,
|
||||
files: [file],
|
||||
name: e.target.id,
|
||||
},
|
||||
},
|
||||
"*"
|
||||
);
|
||||
};
|
||||
|
||||
const icons = document.getElementsByClassName("icon-classname");
|
||||
for (const icon of icons) {
|
||||
icon.addEventListener("dragend", dragEvent);
|
||||
}
|
||||
|
||||
return () => {
|
||||
for (const icon of icons) {
|
||||
icon.removeEventListener("dragend", dragEvent);
|
||||
}
|
||||
};
|
||||
}, [categories]);
|
||||
|
||||
return (
|
||||
<main tabIndex={-1} className="wrapper">
|
||||
<form onSubmit={(e) => e.preventDefault()} className="form">
|
||||
<div className="form-togglegroup">
|
||||
<ToggleGroup
|
||||
value={toggle}
|
||||
onChange={(v) => setToggle(v as any)}
|
||||
variant="neutral"
|
||||
>
|
||||
<ToggleGroup.Item value="stroke">Stroke</ToggleGroup.Item>
|
||||
<ToggleGroup.Item value="fill">Fill</ToggleGroup.Item>
|
||||
</ToggleGroup>
|
||||
</div>
|
||||
<div className="form-search">
|
||||
<Search
|
||||
variant="simple"
|
||||
label="Ikonsøk"
|
||||
style={{ border: "none" }}
|
||||
placeholder="Søk"
|
||||
autoComplete="off"
|
||||
onChange={setQuery}
|
||||
value={query}
|
||||
clearButton={false}
|
||||
/>
|
||||
</div>
|
||||
</form>
|
||||
|
||||
<div className="categories">
|
||||
{categories.map((cat) => {
|
||||
return (
|
||||
<div key={cat.category}>
|
||||
<Heading level="2" size="small" spacing>
|
||||
{cat.category}
|
||||
</Heading>
|
||||
<div className="sub-categories">
|
||||
{cat.sub_categories.map((sub) => {
|
||||
return (
|
||||
<div key={sub.sub_category}>
|
||||
<Heading level="3" size="xsmall" className="sub-heading">
|
||||
{sub.sub_category}
|
||||
</Heading>
|
||||
<div className="icons-wrapper">
|
||||
{sub.icons.map((i) => {
|
||||
const T = Icons[`${i.id}Icon`];
|
||||
if (T === undefined) {
|
||||
console.log(i);
|
||||
return null;
|
||||
}
|
||||
return (
|
||||
<button
|
||||
key={i.id}
|
||||
id={i.id}
|
||||
onClick={() => {
|
||||
onCreate(`icon-id-${i.id}`, `${i.id}Icon`);
|
||||
}}
|
||||
draggable="true"
|
||||
className="icon-classname icon-button"
|
||||
>
|
||||
<T
|
||||
font-size="2rem"
|
||||
title={i.id}
|
||||
id={`icon-id-${i.id}`}
|
||||
/>
|
||||
</button>
|
||||
);
|
||||
})}
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
})}
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
})}
|
||||
</div>
|
||||
</main>
|
||||
);
|
||||
};
|
||||
|
||||
export default App;
|
||||
@@ -0,0 +1,79 @@
|
||||
@import "@navikt/ds-css";
|
||||
|
||||
.wrapper {
|
||||
background-color: var(--a-bg-default);
|
||||
}
|
||||
|
||||
.form {
|
||||
border-bottom: 1px solid var(--a-border-subtle);
|
||||
position: sticky;
|
||||
top: 0;
|
||||
z-index: 20;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
height: fit-content;
|
||||
width: 100%;
|
||||
gap: 1rem;
|
||||
padding-block: 0.5rem;
|
||||
padding-inline: 1rem;
|
||||
background-color: var(--a-bg-default);
|
||||
}
|
||||
|
||||
.form-togglegroup {
|
||||
min-width: 10rem;
|
||||
}
|
||||
|
||||
.form-search {
|
||||
display: flex;
|
||||
gap: 0.5rem;
|
||||
align-items: center;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.categories {
|
||||
display: grid;
|
||||
width: 100%;
|
||||
place-content: start;
|
||||
gap: 2rem;
|
||||
padding: 1.5rem;
|
||||
}
|
||||
|
||||
.sub-categories {
|
||||
display: grid;
|
||||
width: 100%;
|
||||
gap: 0.5rem;
|
||||
}
|
||||
|
||||
.sub-heading {
|
||||
color: var(--a-text-subtle);
|
||||
margin-bottom: 0.25rem;
|
||||
}
|
||||
|
||||
.icons-wrapper {
|
||||
gap: 0.125rem;
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
}
|
||||
|
||||
.icon-button {
|
||||
min-height: 3rem;
|
||||
min-width: 3rem;
|
||||
border-radius: var(--a-border-radius-small);
|
||||
display: grid;
|
||||
place-content: center;
|
||||
background-color: var(--a-surface-default);
|
||||
cursor: pointer;
|
||||
border: none;
|
||||
}
|
||||
|
||||
.icon-button:hover {
|
||||
background-color: var(--a-surface-hover);
|
||||
}
|
||||
|
||||
.icon-button:active {
|
||||
background-color: var(--a-surface-neutral-subtle-hover);
|
||||
}
|
||||
|
||||
.icon-button:focus-visible {
|
||||
outline: 2px solid var(--a-border-focus);
|
||||
}
|
||||
@@ -0,0 +1,12 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||
<title>Aksel icons</title>
|
||||
</head>
|
||||
<body>
|
||||
<div id="root"></div>
|
||||
<script type="module" src="./main.tsx"></script>
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,9 @@
|
||||
import React from "react";
|
||||
import ReactDOM from "react-dom/client";
|
||||
import App from "./App";
|
||||
|
||||
ReactDOM.createRoot(document.getElementById("root") as HTMLElement).render(
|
||||
<React.StrictMode>
|
||||
<App />
|
||||
</React.StrictMode>
|
||||
);
|
||||
@@ -0,0 +1,56 @@
|
||||
import meta from "@navikt/aksel-icons/metadata";
|
||||
|
||||
const subCategorizeIcons = (
|
||||
icons: (typeof meta)[1][]
|
||||
): { sub_category: string; icons: (typeof meta)[1][] }[] => {
|
||||
const categories: { sub_category: string; icons: (typeof meta)[1][] }[] = [];
|
||||
|
||||
for (const icon of icons) {
|
||||
const i = categories.findIndex(
|
||||
({ sub_category }) => icon.sub_category === sub_category
|
||||
);
|
||||
i !== -1
|
||||
? categories[i].icons.push(icon)
|
||||
: categories.push({ sub_category: icon.sub_category, icons: [icon] });
|
||||
}
|
||||
return categories.sort((a, b) =>
|
||||
a.sub_category.localeCompare(b.sub_category)
|
||||
);
|
||||
};
|
||||
|
||||
export const categorizeIcons = (
|
||||
icons: (typeof meta)[1][]
|
||||
): {
|
||||
category: string;
|
||||
sub_categories: { sub_category: string; icons: (typeof meta)[1][] }[];
|
||||
}[] => {
|
||||
const categories: {
|
||||
category: string;
|
||||
icons: (typeof meta)[1][];
|
||||
}[] = [];
|
||||
|
||||
for (const icon of icons) {
|
||||
const i = categories.findIndex(
|
||||
({ category }) => icon.category === category
|
||||
);
|
||||
i !== -1
|
||||
? categories[i].icons.push(icon)
|
||||
: categories.push({ category: icon.category, icons: [icon] });
|
||||
}
|
||||
return categories
|
||||
.sort((a, b) => a.category.localeCompare(b.category))
|
||||
.map((x) => ({ ...x, sub_categories: subCategorizeIcons(x.icons) }));
|
||||
};
|
||||
|
||||
const noFill = (icon: (typeof meta)[1], icons: (typeof meta)[1][]) => {
|
||||
const foundFill = icons.find(
|
||||
(x) => x.name.endsWith("Fill") && x.name.replace("Fill", "") === icon.name
|
||||
);
|
||||
return !foundFill;
|
||||
};
|
||||
|
||||
export const getFillIcon = (icons: (typeof meta)[1][]) => {
|
||||
return icons.filter(
|
||||
(x, _, z) => x.variant.toLowerCase() === "fill" || noFill(x, z)
|
||||
);
|
||||
};
|
||||
@@ -0,0 +1,30 @@
|
||||
/// <reference types="vite/client" />
|
||||
|
||||
declare module "*.svg?component" {
|
||||
import * as React from "react";
|
||||
|
||||
const ReactComponent: React.FunctionComponent<
|
||||
React.ComponentProps<"svg"> & { title?: string }
|
||||
>;
|
||||
|
||||
export default ReactComponent;
|
||||
}
|
||||
|
||||
declare module "**/metadata.mjs" {
|
||||
export type AkselIcon = {
|
||||
id: string;
|
||||
name: string;
|
||||
category: string;
|
||||
sub_category: "Time";
|
||||
keywords: string[];
|
||||
variant: "stroke" | "fill";
|
||||
updated_at: Date;
|
||||
created_at: Date;
|
||||
};
|
||||
|
||||
declare const metadata: {
|
||||
[iconId: string]: AkselIcon;
|
||||
};
|
||||
|
||||
export default metadata;
|
||||
}
|
||||
@@ -0,0 +1,30 @@
|
||||
{
|
||||
"compilerOptions": {
|
||||
"target": "ESNext",
|
||||
"module": "CommonJS",
|
||||
"allowJs": false,
|
||||
"skipLibCheck": true,
|
||||
"esModuleInterop": true,
|
||||
"moduleResolution": "Node",
|
||||
"resolveJsonModule": true,
|
||||
"isolatedModules": false,
|
||||
"noEmit": true,
|
||||
"jsx": "react-jsx",
|
||||
"lib": ["DOM", "DOM.Iterable", "ESNext"],
|
||||
"rootDir": ".",
|
||||
"baseUrl": ".",
|
||||
"outDir": "dist/",
|
||||
"sourceMap": false,
|
||||
"noImplicitAny": false,
|
||||
"types": ["@figma/plugin-typings"]
|
||||
},
|
||||
"include": [
|
||||
"src/**/*.d.ts",
|
||||
"src/**/*.d.ts",
|
||||
"src/**/*.ts",
|
||||
"src/**/*.tsx",
|
||||
"src/**/*.js",
|
||||
"src/**/*.jsx"
|
||||
],
|
||||
"exclude": ["src/common/**/*"]
|
||||
}
|
||||
@@ -0,0 +1,13 @@
|
||||
{
|
||||
"compilerOptions": {
|
||||
"composite": true,
|
||||
"module": "ESNext",
|
||||
"moduleResolution": "Node",
|
||||
"allowSyntheticDefaultImports": true
|
||||
},
|
||||
"include": [
|
||||
"vite.config.plugin.ts",
|
||||
"vite.config.ui.ts",
|
||||
"./scripts/vite/*.ts"
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1,17 @@
|
||||
import path from "path";
|
||||
import { defineConfig } from "vite";
|
||||
import { viteSingleFile } from "vite-plugin-singlefile";
|
||||
|
||||
export default defineConfig({
|
||||
plugins: [viteSingleFile()],
|
||||
build: {
|
||||
lib: {
|
||||
name: "Aksel Icons",
|
||||
entry: path.resolve(__dirname, "./src/plugin/plugin.ts"),
|
||||
fileName: "plugin",
|
||||
formats: ["es"],
|
||||
},
|
||||
emptyOutDir: false,
|
||||
outDir: path.resolve(__dirname, "./dist"),
|
||||
},
|
||||
});
|
||||
@@ -0,0 +1,25 @@
|
||||
import { defineConfig } from "vite";
|
||||
import path from "path";
|
||||
|
||||
import { viteSingleFile } from "vite-plugin-singlefile";
|
||||
import react from "@vitejs/plugin-react";
|
||||
|
||||
import inlineSvg from "./scripts/vite/vite-inline-svg";
|
||||
import svgComponent from "./scripts/vite/vite-svgr-component";
|
||||
|
||||
// https://vitejs.dev/config/
|
||||
export default defineConfig({
|
||||
plugins: [react(), svgComponent(), inlineSvg(), viteSingleFile()],
|
||||
root: path.resolve(__dirname, "./src/ui/"),
|
||||
build: {
|
||||
outDir: path.resolve(__dirname, "./dist"),
|
||||
rollupOptions: {
|
||||
input: {
|
||||
ui: path.relative(__dirname, "./src/ui/index.html"),
|
||||
},
|
||||
output: {
|
||||
entryFileNames: "[name].js",
|
||||
},
|
||||
},
|
||||
},
|
||||
});
|
||||
@@ -0,0 +1,64 @@
|
||||
import * as AkselIcons from "@navikt/aksel-icons";
|
||||
import { StarFillIcon } from "@navikt/aksel-icons";
|
||||
import type { Meta, StoryObj } from "@storybook/react";
|
||||
import React from "react";
|
||||
|
||||
const meta = {
|
||||
title: "aksel-icons/Icons",
|
||||
} satisfies Meta<typeof StarFillIcon>;
|
||||
|
||||
export default meta;
|
||||
type Story = StoryObj<typeof meta>;
|
||||
|
||||
export const Icons: Story = {
|
||||
render: () => {
|
||||
return (
|
||||
<div className="icons">
|
||||
{Object.entries(AkselIcons).map(([key, Value]) => (
|
||||
<React.Fragment key={key}>
|
||||
<Value fontSize="3rem" aria-hidden title={key} />
|
||||
</React.Fragment>
|
||||
))}
|
||||
<style>
|
||||
{`
|
||||
.icons{
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
}
|
||||
`}
|
||||
</style>
|
||||
</div>
|
||||
);
|
||||
},
|
||||
};
|
||||
|
||||
export const IconsInverted: Story = {
|
||||
render: () => {
|
||||
return (
|
||||
<div className="icons">
|
||||
{Object.entries(AkselIcons).map(([key, Value]) => (
|
||||
<React.Fragment key={key}>
|
||||
<Value
|
||||
fontSize="3rem"
|
||||
aria-hidden
|
||||
title={key}
|
||||
className="icon-color"
|
||||
/>
|
||||
</React.Fragment>
|
||||
))}
|
||||
<style>
|
||||
{`
|
||||
.icons{
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
background: var(--a-gray-900);
|
||||
}
|
||||
.icon-color{
|
||||
color: var(--a-icon-on-inverted);
|
||||
}
|
||||
`}
|
||||
</style>
|
||||
</div>
|
||||
);
|
||||
},
|
||||
};
|
||||
@@ -0,0 +1,3 @@
|
||||
<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path fill-rule="evenodd" clip-rule="evenodd" d="M6.38832 3.62499C6.15657 3.69144 5.9709 3.86524 5.88931 4.0921C5.80771 4.31895 5.84014 4.5712 5.97647 4.77004L8.36835 8.25872L8.11301 8.33194L5.79544 6.68857C5.60958 6.55678 5.3739 6.51662 5.15489 6.57942L3.23236 7.13069C2.97861 7.20346 2.7818 7.40426 2.71414 7.65943C2.64649 7.91459 2.71796 8.18653 2.90233 8.37546L5.97257 11.5216C7.44996 13.0355 9.63928 13.6159 11.6727 13.0329L20.337 10.5484C21.3272 10.2645 21.5682 8.97202 20.747 8.35025L19.1525 7.14299C17.9605 6.24051 16.4131 5.95191 14.976 6.36402L13.4288 6.80766L8.98964 3.21187C8.79947 3.05782 8.5461 3.00626 8.31084 3.07372L6.38832 3.62499ZM8.17996 9.87319L9.26244 9.5628L9.55282 9.98633C9.78704 10.328 10.2539 10.415 10.5955 10.1808C10.9371 9.94658 11.0242 9.47976 10.79 9.13813L7.80203 4.78006L8.34893 4.62324L12.7881 8.21903C12.9783 8.37308 13.2316 8.42464 13.4669 8.35719L15.3894 7.80591C16.3728 7.52394 17.4315 7.72141 18.247 8.33889L19.4429 9.24433L11.2592 11.591C9.75627 12.0219 8.13808 11.5929 7.04609 10.4739L4.85284 8.22648L5.22184 8.12067L7.53941 9.76404C7.72527 9.89583 7.96095 9.93599 8.17996 9.87319ZM9.81056 17.4392C9.7791 17.4038 9.74692 17.3691 9.71403 17.335C10.473 16.6649 11.8213 15.75 13.4998 15.75C16.5856 15.75 18.2498 17.9142 18.2498 20C18.2498 20.4142 18.5856 20.75 18.9998 20.75C19.414 20.75 19.7498 20.4142 19.7498 20C19.7498 17.0858 17.414 14.25 13.4998 14.25C11.0483 14.25 9.2246 15.7083 8.41735 16.4919C7.99415 16.3357 7.52002 16.25 7 16.25C5.79648 16.25 4.83873 16.7088 4.18944 17.4392C3.55242 18.1559 3.25 19.0902 3.25 20C3.25 20.4142 3.58579 20.75 4 20.75C4.41421 20.75 4.75 20.4142 4.75 20C4.75 19.4098 4.94758 18.8441 5.31056 18.4358C5.66127 18.0412 6.20352 17.75 7 17.75C7.79648 17.75 8.33873 18.0412 8.68944 18.4358C9.05242 18.8441 9.25 19.4098 9.25 20C9.25 20.4142 9.58579 20.75 10 20.75C10.4142 20.75 10.75 20.4142 10.75 20C10.75 19.0902 10.4476 18.1559 9.81056 17.4392Z" fill="#23262A"/>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 2.0 KiB |
@@ -0,0 +1,10 @@
|
||||
name: Airplane
|
||||
category: Transportation
|
||||
sub_category: Vehicles
|
||||
keywords:
|
||||
- fly
|
||||
- reise
|
||||
- travel
|
||||
variant: Stroke
|
||||
updated_at: 19.08.2023
|
||||
created_at: 07.03.2023
|
||||
@@ -0,0 +1,3 @@
|
||||
<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path fill-rule="evenodd" clip-rule="evenodd" d="M6.38826 3.62505C6.15652 3.6915 5.97084 3.8653 5.88925 4.09216C5.80765 4.31901 5.84009 4.57126 5.97641 4.7701L8.36829 8.25878L8.11295 8.332L5.79538 6.68863C5.60952 6.55684 5.37384 6.51668 5.15483 6.57948L3.23231 7.13075C2.97855 7.20352 2.78174 7.40432 2.71408 7.65949C2.64643 7.91465 2.7179 8.18659 2.90227 8.37552L5.97251 11.5216C7.4499 13.0355 9.63922 13.616 11.6726 13.0329L20.337 10.5485C21.3271 10.2645 21.5682 8.97208 20.7469 8.35031L19.1524 7.14305C17.9604 6.24057 16.4131 5.95197 14.9759 6.36408L13.4288 6.80772L8.98958 3.21193C8.79941 3.05788 8.54604 3.00632 8.31078 3.07377L6.38826 3.62505ZM10.0595 15.2359C9.8993 15.3303 9.90495 15.561 10.0577 15.6671C10.3786 15.8898 10.6712 16.1496 10.9317 16.4427C11.8431 17.4679 12.2501 18.7711 12.2501 20L12.25 20.0141C12.249 20.1747 12.3791 20.3143 12.5393 20.303C13.0023 20.2704 13.455 20.25 13.8625 20.25C15.61 20.25 18.1887 20.6258 18.844 20.7258C18.9487 20.7418 19.0543 20.7555 19.1579 20.7333C19.4962 20.6608 19.7499 20.36 19.7499 20C19.7499 17.0858 17.4141 14.25 13.4999 14.25C12.1367 14.25 10.9677 14.7009 10.0595 15.2359ZM4.18944 17.4392C4.83873 16.7088 5.79648 16.25 7 16.25C8.20352 16.25 9.16127 16.7088 9.81056 17.4392C10.4476 18.1559 10.75 19.0902 10.75 20C10.75 20.3184 10.5516 20.5905 10.2716 20.6993C10.0998 20.7661 9.91096 20.7245 9.73237 20.6789C9.19197 20.5408 7.94182 20.25 7 20.25C6.05818 20.25 4.80803 20.5408 4.26763 20.6789C4.08904 20.7245 3.90023 20.7661 3.72842 20.6993C3.44845 20.5905 3.25 20.3184 3.25 20C3.25 19.0902 3.55242 18.1559 4.18944 17.4392Z" fill="#23262A"/>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 1.7 KiB |
@@ -0,0 +1,10 @@
|
||||
name: AirplaneFill
|
||||
category: Transportation
|
||||
sub_category: Vehicles
|
||||
keywords:
|
||||
- fly
|
||||
- reise
|
||||
- travel
|
||||
variant: Fill
|
||||
updated_at: 19.08.2023
|
||||
created_at: 07.03.2023
|
||||
@@ -0,0 +1,3 @@
|
||||
<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path fill-rule="evenodd" clip-rule="evenodd" d="M6 17.75C5.58579 17.75 5.25 17.4142 5.25 17L5.25 4C5.25 3.58579 5.58579 3.25 6 3.25H10C10.4142 3.25 10.75 3.58579 10.75 4L10.75 17C10.75 17.4142 10.4142 17.75 10 17.75H6ZM6.75 16.25H9.25L9.25 4.75L6.75 4.75L6.75 16.25ZM3.25 20C3.25 19.5858 3.58579 19.25 4 19.25L20 19.25C20.4142 19.25 20.75 19.5858 20.75 20C20.75 20.4142 20.4142 20.75 20 20.75H4C3.58579 20.75 3.25 20.4142 3.25 20ZM13.25 17C13.25 17.4142 13.5858 17.75 14 17.75H18C18.4142 17.75 18.75 17.4142 18.75 17V10C18.75 9.58579 18.4142 9.25 18 9.25H14C13.5858 9.25 13.25 9.58579 13.25 10V17ZM17.25 16.25H14.75V10.75H17.25V16.25Z" fill="#23262A"/>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 757 B |
@@ -0,0 +1,19 @@
|
||||
name: AlignBottom
|
||||
category: Interface
|
||||
sub_category: Design
|
||||
keywords:
|
||||
- positioning
|
||||
- arrangement
|
||||
- layout
|
||||
- design
|
||||
- composition
|
||||
- formatting
|
||||
- posisjonering
|
||||
- ordning
|
||||
- layout
|
||||
- design
|
||||
- sammensetning
|
||||
- formatering
|
||||
variant: Stroke
|
||||
updated_at: 19.08.2023
|
||||
created_at: 07.03.2023
|
||||
@@ -0,0 +1,3 @@
|
||||
<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path fill-rule="evenodd" clip-rule="evenodd" d="M6 17.75C5.58579 17.75 5.25 17.4142 5.25 17L5.25 4C5.25 3.58579 5.58579 3.25 6 3.25H10C10.4142 3.25 10.75 3.58579 10.75 4L10.75 17C10.75 17.4142 10.4142 17.75 10 17.75H6ZM3.25 20C3.25 19.5858 3.58579 19.25 4 19.25L20 19.25C20.4142 19.25 20.75 19.5858 20.75 20C20.75 20.4142 20.4142 20.75 20 20.75H4C3.58579 20.75 3.25 20.4142 3.25 20ZM13.25 17C13.25 17.4142 13.5858 17.75 14 17.75H18C18.4142 17.75 18.75 17.4142 18.75 17V10C18.75 9.58579 18.4142 9.25 18 9.25H14C13.5858 9.25 13.25 9.58579 13.25 10V17Z" fill="#23262A"/>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 672 B |
@@ -0,0 +1,19 @@
|
||||
name: AlignBottomFill
|
||||
category: Interface
|
||||
sub_category: Design
|
||||
keywords:
|
||||
- positioning
|
||||
- arrangement
|
||||
- layout
|
||||
- design
|
||||
- composition
|
||||
- formatting
|
||||
- posisjonering
|
||||
- ordning
|
||||
- layout
|
||||
- design
|
||||
- sammensetning
|
||||
- formatering
|
||||
variant: Fill
|
||||
updated_at: 19.08.2023
|
||||
created_at: 07.03.2023
|
||||
@@ -0,0 +1,3 @@
|
||||
<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path fill-rule="evenodd" clip-rule="evenodd" d="M12 3.25C12.4142 3.25 12.75 3.58579 12.75 4V5.25H18.5C18.9142 5.25 19.25 5.58579 19.25 6V10C19.25 10.4142 18.9142 10.75 18.5 10.75H12.75V13.25H15.5C15.9142 13.25 16.25 13.5858 16.25 14V18C16.25 18.4142 15.9142 18.75 15.5 18.75H12.75V20C12.75 20.4142 12.4142 20.75 12 20.75C11.5858 20.75 11.25 20.4142 11.25 20V18.75H8.5C8.08579 18.75 7.75 18.4142 7.75 18V14C7.75 13.5858 8.08579 13.25 8.5 13.25H11.25V10.75H5.5C5.08579 10.75 4.75 10.4142 4.75 10V6C4.75 5.58579 5.08579 5.25 5.5 5.25H11.25V4C11.25 3.58579 11.5858 3.25 12 3.25ZM11.25 14.75H9.25V17.25H11.25V14.75ZM12.75 17.25H14.75V14.75H12.75V17.25ZM6.25 6.75H11.25V9.25H6.25V6.75ZM12.75 6.75V9.25H17.75V6.75H12.75Z" fill="#23262A"/>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 836 B |
@@ -0,0 +1,19 @@
|
||||
name: AlignCenter
|
||||
category: Interface
|
||||
sub_category: Design
|
||||
keywords:
|
||||
- positioning
|
||||
- arrangement
|
||||
- layout
|
||||
- design
|
||||
- composition
|
||||
- formatting
|
||||
- posisjonering
|
||||
- ordning
|
||||
- layout
|
||||
- design
|
||||
- sammensetning
|
||||
- formatering
|
||||
variant: Stroke
|
||||
updated_at: 19.08.2023
|
||||
created_at: 07.03.2023
|
||||
@@ -0,0 +1,3 @@
|
||||
<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path fill-rule="evenodd" clip-rule="evenodd" d="M12 3.25C12.4142 3.25 12.75 3.58579 12.75 4V5.25H18.5C18.9142 5.25 19.25 5.58579 19.25 6V10C19.25 10.4142 18.9142 10.75 18.5 10.75H12.75V13.25H15.5C15.9142 13.25 16.25 13.5858 16.25 14V18C16.25 18.4142 15.9142 18.75 15.5 18.75H12.75V20C12.75 20.4142 12.4142 20.75 12 20.75C11.5858 20.75 11.25 20.4142 11.25 20V18.75H8.5C8.08579 18.75 7.75 18.4142 7.75 18V14C7.75 13.5858 8.08579 13.25 8.5 13.25H11.25V10.75H5.5C5.08579 10.75 4.75 10.4142 4.75 10V6C4.75 5.58579 5.08579 5.25 5.5 5.25H11.25V4C11.25 3.58579 11.5858 3.25 12 3.25Z" fill="#23262A"/>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 697 B |
@@ -0,0 +1,19 @@
|
||||
name: AlignCenterFill
|
||||
category: Interface
|
||||
sub_category: Design
|
||||
keywords:
|
||||
- positioning
|
||||
- arrangement
|
||||
- layout
|
||||
- design
|
||||
- composition
|
||||
- formatting
|
||||
- posisjonering
|
||||
- ordning
|
||||
- layout
|
||||
- design
|
||||
- sammensetning
|
||||
- formatering
|
||||
variant: Fill
|
||||
updated_at: 19.08.2023
|
||||
created_at: 07.03.2023
|
||||
@@ -0,0 +1,3 @@
|
||||
<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path fill-rule="evenodd" clip-rule="evenodd" d="M4 3.25C4.41421 3.25 4.75 3.58579 4.75 4V20C4.75 20.4142 4.41421 20.75 4 20.75C3.58579 20.75 3.25 20.4142 3.25 20V4C3.25 3.58579 3.58579 3.25 4 3.25ZM6.25 6C6.25 5.58579 6.58579 5.25 7 5.25H20C20.4142 5.25 20.75 5.58579 20.75 6V10C20.75 10.4142 20.4142 10.75 20 10.75H7C6.58579 10.75 6.25 10.4142 6.25 10V6ZM7.75 6.75V9.25H19.25V6.75H7.75ZM7 13.25C6.58579 13.25 6.25 13.5858 6.25 14V18C6.25 18.4142 6.58579 18.75 7 18.75H14C14.4142 18.75 14.75 18.4142 14.75 18V14C14.75 13.5858 14.4142 13.25 14 13.25H7ZM7.75 17.25V14.75H13.25V17.25H7.75Z" fill="#23262A"/>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 709 B |
@@ -0,0 +1,19 @@
|
||||
name: AlignLeft
|
||||
category: Interface
|
||||
sub_category: Design
|
||||
keywords:
|
||||
- positioning
|
||||
- arrangement
|
||||
- layout
|
||||
- design
|
||||
- composition
|
||||
- formatting
|
||||
- posisjonering
|
||||
- ordning
|
||||
- layout
|
||||
- design
|
||||
- sammensetning
|
||||
- formatering
|
||||
variant: Stroke
|
||||
updated_at: 19.08.2023
|
||||
created_at: 07.03.2023
|
||||
@@ -0,0 +1,3 @@
|
||||
<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path fill-rule="evenodd" clip-rule="evenodd" d="M4 3.25C4.41421 3.25 4.75 3.58579 4.75 4V20C4.75 20.4142 4.41421 20.75 4 20.75C3.58579 20.75 3.25 20.4142 3.25 20V4C3.25 3.58579 3.58579 3.25 4 3.25ZM6.25 6C6.25 5.58579 6.58579 5.25 7 5.25H20C20.4142 5.25 20.75 5.58579 20.75 6V10C20.75 10.4142 20.4142 10.75 20 10.75H7C6.58579 10.75 6.25 10.4142 6.25 10V6ZM7 13.25C6.58579 13.25 6.25 13.5858 6.25 14V18C6.25 18.4142 6.58579 18.75 7 18.75H14C14.4142 18.75 14.75 18.4142 14.75 18V14C14.75 13.5858 14.4142 13.25 14 13.25H7Z" fill="#23262A"/>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 642 B |
@@ -0,0 +1,19 @@
|
||||
name: AlignLeftFill
|
||||
category: Interface
|
||||
sub_category: Design
|
||||
keywords:
|
||||
- positioning
|
||||
- arrangement
|
||||
- layout
|
||||
- design
|
||||
- composition
|
||||
- formatting
|
||||
- posisjonering
|
||||
- ordning
|
||||
- layout
|
||||
- design
|
||||
- sammensetning
|
||||
- formatering
|
||||
variant: Fill
|
||||
updated_at: 19.08.2023
|
||||
created_at: 07.03.2023
|
||||
@@ -0,0 +1,3 @@
|
||||
<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path fill-rule="evenodd" clip-rule="evenodd" d="M6 19.25C5.58579 19.25 5.25 18.9142 5.25 18.5L5.25 12.75H4C3.58579 12.75 3.25 12.4142 3.25 12C3.25 11.5858 3.58579 11.25 4 11.25H5.25L5.25 5.5C5.25 5.08579 5.58579 4.75 6 4.75H10C10.4142 4.75 10.75 5.08579 10.75 5.5V11.25H13.25V8.5C13.25 8.08579 13.5858 7.75 14 7.75L18 7.75C18.4142 7.75 18.75 8.08579 18.75 8.5V11.25H20C20.4142 11.25 20.75 11.5858 20.75 12C20.75 12.4142 20.4142 12.75 20 12.75H18.75V15.5C18.75 15.9142 18.4142 16.25 18 16.25H14C13.5858 16.25 13.25 15.9142 13.25 15.5V12.75H10.75V18.5C10.75 18.9142 10.4142 19.25 10 19.25H6ZM14.75 12.75V14.75H17.25V12.75L14.75 12.75ZM17.25 11.25V9.25H14.75V11.25L17.25 11.25ZM6.75 17.75L6.75 12.75H9.25V17.75H6.75ZM9.25 6.25V11.25H6.75L6.75 6.25L9.25 6.25Z" fill="#23262A"/>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 878 B |
@@ -0,0 +1,19 @@
|
||||
name: AlignMiddle
|
||||
category: Interface
|
||||
sub_category: Design
|
||||
keywords:
|
||||
- positioning
|
||||
- arrangement
|
||||
- layout
|
||||
- design
|
||||
- composition
|
||||
- formatting
|
||||
- posisjonering
|
||||
- ordning
|
||||
- layout
|
||||
- design
|
||||
- sammensetning
|
||||
- formatering
|
||||
variant: Stroke
|
||||
updated_at: 19.08.2023
|
||||
created_at: 07.03.2023
|
||||
@@ -0,0 +1,3 @@
|
||||
<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path fill-rule="evenodd" clip-rule="evenodd" d="M6 19.25C5.58579 19.25 5.25 18.9142 5.25 18.5L5.25 12.75H4C3.58579 12.75 3.25 12.4142 3.25 12C3.25 11.5858 3.58579 11.25 4 11.25H5.25L5.25 5.5C5.25 5.08579 5.58579 4.75 6 4.75H10C10.4142 4.75 10.75 5.08579 10.75 5.5V11.25H13.25V8.5C13.25 8.08579 13.5858 7.75 14 7.75L18 7.75C18.4142 7.75 18.75 8.08579 18.75 8.5V11.25H20C20.4142 11.25 20.75 11.5858 20.75 12C20.75 12.4142 20.4142 12.75 20 12.75H18.75V15.5C18.75 15.9142 18.4142 16.25 18 16.25H14C13.5858 16.25 13.25 15.9142 13.25 15.5V12.75H10.75V18.5C10.75 18.9142 10.4142 19.25 10 19.25H6Z" fill="#23262A"/>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 712 B |
@@ -0,0 +1,19 @@
|
||||
name: AlignMiddleFill
|
||||
category: Interface
|
||||
sub_category: Design
|
||||
keywords:
|
||||
- positioning
|
||||
- arrangement
|
||||
- layout
|
||||
- design
|
||||
- composition
|
||||
- formatting
|
||||
- posisjonering
|
||||
- ordning
|
||||
- layout
|
||||
- design
|
||||
- sammensetning
|
||||
- formatering
|
||||
variant: Fill
|
||||
updated_at: 19.08.2023
|
||||
created_at: 07.03.2023
|
||||
@@ -0,0 +1,3 @@
|
||||
<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path fill-rule="evenodd" clip-rule="evenodd" d="M20 20.75C19.5858 20.75 19.25 20.4142 19.25 20L19.25 4C19.25 3.58579 19.5858 3.25 20 3.25C20.4142 3.25 20.75 3.58579 20.75 4L20.75 20C20.75 20.4142 20.4142 20.75 20 20.75ZM17.75 10C17.75 10.4142 17.4142 10.75 17 10.75L4 10.75C3.58579 10.75 3.25 10.4142 3.25 10V6C3.25 5.58579 3.58579 5.25 4 5.25L17 5.25C17.4142 5.25 17.75 5.58579 17.75 6V10ZM16.25 9.25V6.75L4.75 6.75L4.75 9.25L16.25 9.25ZM17 18.75C17.4142 18.75 17.75 18.4142 17.75 18V14C17.75 13.5858 17.4142 13.25 17 13.25L10 13.25C9.58579 13.25 9.25 13.5858 9.25 14L9.25 18C9.25 18.4142 9.58579 18.75 10 18.75L17 18.75ZM16.25 14.75V17.25L10.75 17.25L10.75 14.75L16.25 14.75Z" fill="#23262A"/>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 800 B |
@@ -0,0 +1,19 @@
|
||||
name: AlignRight
|
||||
category: Interface
|
||||
sub_category: Design
|
||||
keywords:
|
||||
- positioning
|
||||
- arrangement
|
||||
- layout
|
||||
- design
|
||||
- composition
|
||||
- formatting
|
||||
- posisjonering
|
||||
- ordning
|
||||
- layout
|
||||
- design
|
||||
- sammensetning
|
||||
- formatering
|
||||
variant: Stroke
|
||||
updated_at: 19.08.2023
|
||||
created_at: 07.03.2023
|
||||