Compare commits

..
Author SHA1 Message Date
github-actions[bot]andgithub-actions[bot] e2a9d027dc Version Packages (#1749)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2023-01-17 10:32:23 +01:00
Ken 22dfd8e603 :sparkled: Prop for posisjonering av toptekst i Chat (#1748)
* :sparkled: Prop for posisjonering av toptekst i Chat

* 📝 changeset

* 📝 Docs

* 📝 Demo

* 🎨 fliptoptext -> toptextPosition
2023-01-17 10:26:14 +01:00
Ken 53d1947311 📝 Tekstendringer sanity profilside 2023-01-17 09:39:38 +01:00
Ken d4e7c47772 🎨 Sanity feedback preview 2023-01-17 07:37:20 +01:00
Ken e191dffdf8 🔥 Fjernet dårlige editor-navn 2023-01-16 09:12:05 +01:00
Ken 7e0ee60d47 🔥 Fjernet dårlige editor-navn 2023-01-16 08:57:11 +01:00
github-actions[bot]andgithub-actions[bot] 4ecaeb9d04 Version Packages (#1746)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2023-01-13 16:03:31 +01:00
Ken 8e5c554431 ⬆️ Bump @floating-ui/react 2023-01-13 15:56:12 +01:00
Ken 727be0a98b 🔥 Fjernet snowfall fra forside 2023-01-13 15:15:47 +01:00
github-actions[bot]andgithub-actions[bot] 4c2e44ced1 Version Packages (#1745)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2023-01-13 15:07:11 +01:00
Ken 2fd1dd443f 🔥 Fjernet ubrukt kode forside 2023-01-13 14:41:06 +01:00
Ken a6c3391237 📝 changeset 2023-01-13 14:38:45 +01:00
KenandKenAJoh 5ede88a188 Ikonsynk Figma (#1739)
Co-authored-by: KenAJoh <KenAJoh@users.noreply.github.com>
2023-01-13 14:38:05 +01:00
Ken 2785593d20 ⬆️ Yarn lock update 2023-01-13 12:38:54 +01:00
Ken a37c743547 🐛 Bedre logging av temavisninger 2023-01-12 09:36:02 +01:00
Ken 6f0e18c3cf 🐛 E2E tester feilet grunnet aria-hidden 2023-01-12 09:18:10 +01:00
Ken bdfaa54e81 ♿ Gjemte til-toppen knapp for skjermleser 2023-01-12 08:27:03 +01:00
Ken 595796af6c 📝 Oppdatert grunnleggnde config 2023-01-12 06:50:16 +01:00
Ken c85b34e86f 🐛 Fikset henting av sider for testing i e2e! 2023-01-10 10:41:17 +01:00
Ken fc46b5a97b 🔍 Sitemap har nå lastmod-attr 2023-01-10 09:50:10 +01:00
Ken c7fcf57fdf :map: Google search-index ignorerer priority i sitemap 2023-01-10 08:28:21 +01:00
Ken 560d8bd1e8 🔍 Bedre robots.txt 2023-01-10 08:21:32 +01:00
Ken 7a53de186e 📝 1 Artikler -> 1 Artikkel 2023-01-09 13:48:57 +01:00
Ken 4feb798b25 🐛 God-praksis feilet ved visning av god-praksis sider 2023-01-09 12:53:54 +01:00
Ken c713b469f0 🔥 Fjernet ubrukt import Temaview 2023-01-09 12:40:42 +01:00
Ken 676392a5c4 🐛 Nye tema uten sider brakk sanity 2023-01-09 12:39:02 +01:00
Ken c049e08555 🎨 Sanity config refactor 2023-01-09 11:51:33 +01:00
github-actions[bot]andgithub-actions[bot] d8c898db8c Version Packages (#1738)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2023-01-09 11:05:24 +01:00
Ken 8a1ef5e7e2 🐛 Radio fikk ikke error-farge grunnet indeterminate (#1737) 2023-01-09 10:59:01 +01:00
Lars Hansen 293594235a #aksel til #Aksel 2023-01-05 15:28:57 +01:00
Lars Hansen a54d97591e Merge remote-tracking branch 'origin/master' 2023-01-05 15:28:09 +01:00
Lars Hansen dc2e7fb766 endre lenke fra #aksel og #designsystem til #aksel-designsystemet 2023-01-05 15:23:32 +01:00
Ken 53df42df22 📝 Fikset lenker til #aksel slack etter arkivering 2023-01-05 14:53:36 +01:00
Ken 5b9840524c ✅ Fikset date-test 2023-01-03 10:16:36 +01:00
Ken 0d6ddfd95e 🐛 Profilvisning sanity 2023-01-03 10:05:38 +01:00
Ken 0394e819ba ⚰️ Fjernet trello og algolia-integrasjon 2023-01-03 09:50:46 +01:00
Ken 67fc9ad560 🐛 La til kode-lenker igjen 2022-12-22 21:49:44 +01:00
Ken 8fe5c88eba 🐛 Preview låste seg på komponentsider 2022-12-22 17:11:43 +01:00
Ken 1fbcf78745 🎨 Hue-tilpassning i header på komponentsider 2022-12-22 16:35:13 +01:00
Ken 83dc3236e8 🎨 resolver dokument-ref for alle artikkel-sider 2022-12-22 16:12:57 +01:00
Ken 7503c7fa7f ✨ Feedback integrert på artikkelsider i sanity
🎨 Feedback-dokument

🎨 Sender nå feedback til sanity

🎨 Preview for feedback
2022-12-22 15:08:53 +01:00
Ken e668181690 ✨ Intro-lenker komponentsider 2022-12-21 21:07:05 +01:00
Ken 353dff3da5 🎨 localstorage for animasjons-stopp 2022-12-21 19:02:11 +01:00
Ken a11993a155 🔥 2022-12-21 15:23:06 +01:00
Ken 7b53b7670f ♿ play/pause knapp forside 2022-12-21 15:18:08 +01:00
Ken 0aaa0c4e10 📝 Klarspråk 2022-12-21 14:45:11 +01:00
Ken ea5e1f768c 🎨 Feedback-dokument 2022-12-21 14:31:49 +01:00
Ken e6b16e9b31 🐛 Fikset imports i script 2022-12-21 14:24:43 +01:00
Ken 1029d42163 Merge branch 'next' 2022-12-21 13:52:59 +01:00
Ken fba5140d8b 🚚 Flyttet scripts 2022-12-21 13:52:14 +01:00
Kai Erik Schieren fe72f32dbb ✨ moved backup (#1735) 2022-12-21 13:46:13 +01:00
Ken 6a0890b42b 💄 Kube på god-praksis forside 2022-12-21 13:13:24 +01:00
Ken 320f45a775 💄 Bedre beta-visning på komponentoversikt 2022-12-21 12:44:12 +01:00
Ken 3feb2283a4 🐛 Fikset kode-eksempler resizing 2022-12-21 12:16:59 +01:00
Ken c3b416a3cb 🎨 Deprecated-tag i sidebar sist 2022-12-21 10:10:23 +01:00
Ken 36fba1a33b 🐛 Riktig publiserings-logikk 2022-12-21 09:59:37 +01:00
Ken a9e080f892 📝 Ikonoppdatering 2022-12-20 19:16:54 +01:00
Ken 0dc8eb7a1e Ikonsynk Figma (#1730) 2022-12-20 19:15:49 +01:00
Ken 70fd78c926 🔍 Bedre scroll logging 2022-12-20 18:18:15 +01:00
Ken dbc5e7dc07 💄 Mindre gap introcards forside 2022-12-20 17:07:44 +01:00
Ken 4b0b8e4ae4 🐛 Fjernet gammel internal kategori 2022-12-20 16:33:12 +01:00
Ken 57e7e1ecc4 🐛 Forsøk på fix for flaky e2e tester 2022-12-20 16:25:17 +01:00
Ken 9534fe2540 ⚰️ fjernet limits for hva redirects kan løse 2022-12-20 16:02:23 +01:00
Ken 44683d38f1 🎨 La til ny kategori: interne 2022-12-20 16:00:42 +01:00
Ken 23c976e5d2 🐛 Fjernet sidecar fra aksel 2022-12-20 15:26:01 +01:00
Ken 9ea823d630 🐛 Fikset import 2022-12-20 15:14:36 +01:00
Ken 65c65a6637 🎨 Fikset OG-bilde grunnleggende, migrerings-script 2022-12-20 15:05:53 +01:00
ef2a2a9c49 Visuelle oppdateringer Aksel + nytt sanity-studio (#1734)
Co-authored-by: Kai Erik Schieren <kai.schieren@soprasteria.com>
Co-authored-by: Kai Erik Schieren <111572054+kschieren@users.noreply.github.com>
2022-12-20 14:00:20 +01:00
Ken 3f63fd7fb6 🐛 Backup funket ikke 2022-12-20 12:21:06 +01:00
Ken 6fe9788444 🐛 Button submittet form i table 2022-12-16 12:47:35 +01:00
Ken 10c6545885 🐛 Fikset e2e tester 2022-12-15 16:11:31 +01:00
Ken 2e76272a35 🐛 Fikset preview fra dev->prod 2022-12-15 15:44:20 +01:00
Ken 803a7a4d0f ♿ Fokusmarkering relatert innhold-cards 2022-12-15 14:18:10 +01:00
Ken d8b7e69788 📝 Datepicker i modal demo 2022-12-15 11:07:55 +01:00
Ken 097ef18910 ✨ Kan nå toggle lukking av modal med ESC 2022-12-15 10:57:03 +01:00
Ken bb081354fc ✨ Komponentvisning fra next -> prod 2022-12-15 10:10:29 +01:00
Ken edc08c6f8a 🐛 Fikset standalone-sider som fikk 404 2022-12-13 12:48:09 +01:00
Ken fc3577baf4 🐛 Fikset lenker på safari 2022-12-13 09:37:29 +01:00
Ken f02250ab75 🔧 Redirect fra /storybook til chromatic-instans 2022-12-11 21:00:00 +01:00
Ken 1af80dcc1b 🐛 ConfirmationPanel nå wrappet med divog ikke p 2022-12-06 15:00:45 +01:00
Ken 373f40d968 🐛 Fikset keyboard-event error i monthpicker 2022-12-06 14:07:09 +01:00
Ken 75609e1b09 🐛 Fikset duplikat className i dateinput 2022-12-04 18:39:32 +01:00
Ken ea9bb63d0a 🚚 temp url for migrering av ds sider 2022-12-03 17:46:48 +01:00
Ken a148b08eb5 🔥 Fjernet nissehatt 2022-12-03 17:29:02 +01:00
Ken 1ca7e746e1 💄 xmas etter 10 sec 2022-12-03 15:50:26 +01:00
Ken 535ed17d36 🐛 Fikset backup-script 2022-12-03 15:12:19 +01:00
Ken 8df1bc26a0 🐛 Fikser deploy-error grunnet duplikerte pakker 2022-12-02 21:11:54 +01:00
Kai Erik Schieren 1b15ab146a 🔥 remove cl 2022-12-02 15:33:17 +01:00
Kai Erik Schieren 0868b7d716 🚧 add buttons to dialogs 2022-12-02 15:31:01 +01:00
Ken 618d8d3de1 🔥 Fjernet ubrukt prop for TemaCard 2022-12-02 15:21:25 +01:00
Ken e9831b4e2a ⬆️ Oppdatert til next.sanity v3 2022-12-02 15:16:17 +01:00
Ken b0aa3ce0e7 🔥 Console.log 2022-12-02 15:14:15 +01:00
Ken 4fa62f5d64 🏷️ Sanity-typer 2022-12-02 15:05:32 +01:00
Ken 350e929bd2 🐛 Gjemme temp felt for aksel_tema 2022-12-02 14:24:07 +01:00
Ken 64d178ea36 Merge branch 'next' of https://github.com/navikt/Designsystemet into next 2022-12-02 14:02:08 +01:00
Ken cb3decf3bd 👽 Migrert til nye preview 2022-12-02 13:58:45 +01:00
Ken d66d009fe8 👽 Migrert alle sider til nye preview-løsning 2022-12-02 13:30:45 +01:00
Ken 5974a77140 👽 Migrert god-praksis forside 2022-12-02 13:07:42 +01:00
Ken 68b4444bb1 ✨ Tema bruker nå en slug for url-håndtering 2022-12-02 13:02:18 +01:00
Kai Erik Schieren fc7d16b64b 🔥 cleanup 2022-12-02 11:43:07 +01:00
Kai Erik Schieren 08a893c29a 🚧 update dialogs 2022-12-02 11:25:04 +01:00
Kai Erik Schieren 8d181e7a92 🚧 publish dialog 2022-12-02 10:51:12 +01:00
Ken ab1c0849f4 👽 Migrert 3/7 sider til ny next-sanity verson (ds-forside) 2022-12-02 10:32:05 +01:00
Ken 96098e532f 👽 Migrert 2/7 sider til ny next-sanity verson 2022-12-02 10:15:07 +01:00
Ken 0b14ef50e9 🎨 editor-previews 2022-12-01 22:05:47 +01:00
Ken 262f8bf5d2 🎨 bedre editor-preview 2022-12-01 17:56:04 +01:00
Ken f18a2dde8f Merge branch 'next' of https://github.com/navikt/Designsystemet into next 2022-12-01 17:29:32 +01:00
Ken 2e48c97b50 🎨 Custom tema-view2 2022-12-01 17:29:22 +01:00
Ken 8bf2b8f322 🎨 Oppdatert deskstruct for god-praksis 2022-12-01 15:33:57 +01:00
Kai Erik Schieren ceb7b231b5 ✨ add draft status badge 2022-12-01 15:19:19 +01:00
Kai Erik Schieren f7f304b33d ♻️ add includedSchemas as param 2022-12-01 14:37:53 +01:00
Kai Erik Schieren 151484afd3 🚧 ✨ update info action 2022-12-01 14:23:56 +01:00
Ken 7ae6969b35 Merge branch 'next' of https://github.com/navikt/Designsystemet into next 2022-12-01 14:20:34 +01:00
Ken 65cfd8b459 📝 Oppdatert felt-tekster 2022-12-01 14:20:26 +01:00
Kai Erik Schieren 3c9405b718 🔥 remove publishaction 2022-12-01 13:33:16 +01:00
Kai Erik Schieren 48b347e814 🚧 focusAction wip 2022-12-01 13:14:32 +01:00
Ken 59de2d7992 🎨 Oppdatert field-struktur 2022-12-01 13:10:57 +01:00
Ken 0166c17985 🎨 Oppdatert inputfelt med counter 2022-12-01 12:49:27 +01:00
Ken 57b1de13a9 🎨 Sanity-ikoner 2022-12-01 10:17:04 +01:00
Ken 52104b0f23 🐛 Fikset url-feil 2022-11-30 21:39:31 +01:00
Ken 564a6b4b90 ✨ Preview for artikler 2022-11-30 21:32:50 +01:00
Ken d43a4bfbdb ✨ God-praksis visning 2022-11-30 20:52:19 +01:00
Ken 1e647bffc6 ✨ Generisk Pane med teller 2022-11-30 19:49:52 +01:00
Ken 986c43ead3 Merge branch 'master' into next 2022-11-30 17:07:00 +01:00
Ken ea4fffdeba 🔥 Fjernet referanser til slug_v2 2022-11-30 17:06:35 +01:00
Ken c14e9c346b Merge branch 'next' 2022-11-30 16:07:43 +01:00
Kai Erik Schieren d3dd96d2d4 🚧 godkjenn innhold wip 2022-11-30 15:54:52 +01:00
Ken b5fd3dd734 📝 console endring 2022-11-30 15:44:38 +01:00
Ken 6979811e67 ⚰️ Fjernet isMigrated felt 2022-11-30 15:18:14 +01:00
Andreas Nordahl 82ab82889d update cdn-upload action (#1725) 2022-11-30 15:16:32 +01:00
Ken 0b978693d6 ⚰️ Fjernet tmp slug_v2 2022-11-30 14:36:07 +01:00
Ken feabc168d7 🐛 Fikset build-error 2022-11-30 14:31:22 +01:00
Ken 759c12eeef Merge branch 'next' of https://github.com/navikt/Designsystemet into next 2022-11-30 14:26:25 +01:00
Ken e3bc4f99a0 🎨 Slug-migrerings script 2022-11-30 14:26:07 +01:00
Kai Erik Schieren 8c31007854 🐛 only use custom badges for included schemas 2022-11-30 14:23:12 +01:00
Kai Erik Schieren cf80626256 🚧 publication flow approve content set verified 2022-11-30 14:17:21 +01:00
Ken cbcfecbe72 🎨 Slug-migrerings script 2022-11-30 14:10:22 +01:00
Ken a1ae58d041 🚚 Oppdatert struktur for god-praksis migrering 2022-11-30 14:08:27 +01:00
Ken a6cf7c1f25 Merge branch 'next' of https://github.com/navikt/Designsystemet into next 2022-11-30 12:46:11 +01:00
Ken a31a969863 🚚 oppdatert slug for alle god-praksis artikler 2022-11-30 12:44:58 +01:00
Ken 19504b0d32 🚧 god-praksis migrerings-script 2022-11-30 12:43:38 +01:00
Kai Erik Schieren 920a037b47 🚧 publication flow approve content wip 2022-11-30 12:16:23 +01:00
Ken 568f55e4be 🏷️ Sanity-typer 2022-11-30 10:38:39 +01:00
Kai Erik Schieren 53cbedf041 ✨ add discardChanges to publication-flow 2022-11-30 10:33:57 +01:00
Kai Erik Schieren cb356c23dc ✨ add restore to publication flow 2022-11-30 10:28:20 +01:00
Kai Erik Schieren 8f76acc776 🔥 delete console logs 2022-11-30 10:21:34 +01:00
Ken d0269a84c0 Merge branch 'next' of https://github.com/navikt/Designsystemet into next 2022-11-30 10:19:45 +01:00
Ken e36206197d 🧱 v2 slug-felt for migrering av god-praksis 2022-11-30 10:19:35 +01:00
Kai Erik Schieren 5e6bb7e016 ✨ ✏️ add duplicate to publication-flow
and fix some typos
2022-11-30 10:18:34 +01:00
Ken 15ed6b0f2f 🎉 Ny god-praksis pages struktur 2022-11-30 10:09:57 +01:00
Kai Erik Schieren 16142657ec ✨ add delete to publication-flow 2022-11-30 10:09:23 +01:00
Kai Erik Schieren a5b50f4cef ✨ add unpublish to publication-flow 2022-11-30 09:57:05 +01:00
Kai Erik Schieren 796b7ac49f 🧱 create plugin structure 2022-11-30 09:45:20 +01:00
Kai Erik Schieren 9bafc3e218 💬 update custom badges 2022-11-30 09:14:36 +01:00
Ken 72c04454e5 🐛 Fikset sitemap 2022-11-29 23:15:28 +01:00
Ken dc4ad88427 🎨 Fjernet task-analytics fra admin-visning 2022-11-29 21:31:02 +01:00
Ken 00ecf7c67c 🐛 Fikset forsidelenke for blogger 2022-11-29 21:18:02 +01:00
Ken 83f8127570 🐛 Fikset e2e for migrering 2022-11-29 21:00:52 +01:00
Ken b6017ea5cf Merge branch 'next' 2022-11-29 20:46:32 +01:00
Ken b96036d14a 🚚 Oppdatert blogg-url er 2022-11-29 20:44:50 +01:00
Kai Erik Schieren d0fafb41b3 ♻️ custom badge 2022-11-29 18:51:28 +01:00
Ken ddf8f65499 🎨 Begynt på god-praksis struktur 2022-11-29 17:06:39 +01:00
Ken 31aa6243ef ✨ Bedre kategorisering og avatar 2022-11-29 16:34:19 +01:00
Ken afca0f481a ✨ Prinsippsider 2022-11-29 15:58:01 +01:00
Ken 2ffc2c22dc ✨ Bloggsider 2022-11-29 15:47:37 +01:00
Ken d8100c1589 🐛 Statusbadge 2022-11-29 15:35:40 +01:00
Ken a4cce95171 Merge branch 'next' of https://github.com/navikt/Designsystemet into next 2022-11-29 15:34:06 +01:00
Ken 01ab8e5741 ✨ profilside 2022-11-29 15:33:39 +01:00
Kai Erik Schieren dd1a961dd2 ✨ custom article status badge 2022-11-29 15:21:02 +01:00
Ken 11520ce468 ✨ Oppdatert deskstruct 2022-11-29 15:14:38 +01:00
Ken 20c8f9204b ✨ Ny navigasjon for komponentsider i sanity 2022-11-29 14:15:38 +01:00
Ken 0074bfd5fb 🐛 Fikset sanity-backup 2022-11-29 12:41:01 +01:00
Kai Erik Schieren a0504f4e57 use lastVerified 2022-11-29 12:12:03 +01:00
Kai Erik Schieren 7bcac33423 🚧 custom publish 2022-11-29 12:07:39 +01:00
Ken a6feaea201 🐛 Fikset sanity-backup 2022-11-29 11:56:06 +01:00
Ken 9c6cf8c811 📝 Popover docs 2022-11-29 11:34:57 +01:00
Kai Erik Schieren 592e0ccae9 🚧 set up custom publish 2022-11-29 11:04:41 +01:00
Ken f2f44ad2d7 🔥 Fjernet påbegynt kategori-løsning 2022-11-29 10:50:23 +01:00
Ken 322077fff8 Merge branch 'next' of https://github.com/navikt/Designsystemet into next 2022-11-29 09:19:30 +01:00
Ken 5eaf729cc4 🎉 Påbegynt ny navigasjon ds 2022-11-29 09:19:17 +01:00
Kai Erik Schieren f285477a6c 🚧 updateInfo refactor ++ 2022-11-29 08:18:12 +01:00
Ken 16f693cee9 🚚 Migert alle sanity-dokumenter 2022-11-28 20:04:58 +01:00
Ken 2a7198e02b 🚚 Migrert blogg-mal 2022-11-28 19:11:10 +01:00
Ken 98b4f4e76a 🐛 Fikset schema-error 2022-11-28 18:07:18 +01:00
Kai Erik Schieren cf397f2522 🔥 cleanup 2022-11-28 16:44:19 +01:00
Kai Erik Schieren 7f1305c639 🚧 updateInfo wip 2022-11-28 16:41:19 +01:00
Ken 5964775a8e 🐛 Fikset typer 2022-11-28 16:31:47 +01:00
Ken f1ea4ee1e0 🚚 Migrert over ds_artikkel 2022-11-28 15:36:09 +01:00
Ken cc24357a9e 🔥 linting 2022-11-28 15:21:43 +01:00
Ken 53406e54a9 🐛 Viser nå task-analytics på alle sider 2022-11-28 15:17:26 +01:00
Ken 39faa2b945 🚚 Migrert aksel_artikkel 2022-11-28 15:09:43 +01:00
Ken 02e5978664 🔥 Cleanup ds_artikkel 2022-11-28 14:52:10 +01:00
Ken fa20f601df 🎨 Flyttet task-analytics til sidemaler 2022-11-28 14:38:38 +01:00
Ken 132ee94235 🎨 Task-analytics 2022-11-28 13:20:15 +01:00
Ken fa5aa175ab 🔥 Fjernet kode for bruk_tab 2022-11-28 11:52:49 +01:00
Ken cf8833c885 🎨 Bedre slug 2022-11-27 20:27:28 +01:00
Ken a37f42b28a 🚚 Migrert slug-håndtering 2022-11-27 18:29:58 +01:00
Ken b8e797bc92 🚚 Migrert moduler for dokumenter 2022-11-27 18:02:04 +01:00
Ken c248cb2a57 ⚡ Minsket first load med 120kB, eksempler med 50% 2022-11-27 13:48:02 +01:00
Ken 2a748c7903 🏷️ Sanity-typer 2022-11-27 13:25:56 +01:00
Ken 2f2cbc16ca 🔥 Fjernet gammel artikkelmal 2022-11-27 13:22:27 +01:00
Ken c0b8928ece 🏷️ rename innholdsfelt komponentsider 2022-11-27 12:43:38 +01:00
Ken 50fe0e785b 🚚 Migrert komponent-artikkel 2022-11-27 12:31:58 +01:00
Ken b2d31aed46 🚚 Migrert ds-schemas 2022-11-26 22:48:27 +01:00
9fdf2cd4df Sync next-branch med master (#1724)
Co-authored-by: Ken <KenAJoh@users.noreply.github.com>
Co-authored-by: Kai Erik Schieren <kai.schieren@soprasteria.com>
2022-11-26 21:02:29 +01:00
Ken 02aa151153 ♿ Fikser siteimprove-error 2022-11-25 14:39:58 +01:00
Ken a472fc4793 🔥 Fjernet utkommentert kode 2022-11-25 14:27:13 +01:00
Ken fdab54742f ⚡ Lazy-loading av bilder i komponent-oversikt 2022-11-25 14:26:42 +01:00
Ken 53230c1d67 🐛 Fikset border-width bug i button 2022-11-25 13:19:22 +01:00
Ken d6dfdff964 📝 Oppdatert beta tekster 2022-11-25 10:28:28 +01:00
Ken 2feb10005c 💄 Skeleton-visning for ikonside 2022-11-25 10:19:26 +01:00
github-actions[bot]andgithub-actions[bot] 1994f3ec97 Version Packages (#1723)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2022-11-25 09:35:40 +01:00
KenandKenAJoh e4b6237e1b Ikonsynk Figma (#1719)
Co-authored-by: KenAJoh <KenAJoh@users.noreply.github.com>
2022-11-25 09:33:00 +01:00
Ken a326f5ab57 🏷️ Sanity typer 2022-11-24 17:54:44 +01:00
Ken a1d18dbb6c 🔥 Fjernet gammel table-løsning for sanity 2022-11-24 17:53:43 +01:00
Ken 409ce29179 ✨ La til muligheten til å velge layout-strategi for datepicker-popover 2022-11-24 17:35:58 +01:00
Ken 08c8a07e94 🐛 Fikset tabell-sanity 2022-11-24 15:31:35 +01:00
Ken 701ca3f285 💩 Deprecation-warning on Detail 2022-11-24 14:37:49 +01:00
Ken e874406491 💄 Subtle tabell-header sanity 2022-11-24 14:27:18 +01:00
Ken b1516dad35 🐛 Fikset tabell-sanity 2022-11-24 14:26:05 +01:00
Ken 9bd629ca87 🎨 Ny tabell-komponent for migrering 2022-11-24 14:11:28 +01:00
Ken 960246f2f3 🎨 Migrering-løsning for sanity tabell 2022-11-24 14:03:10 +01:00
Ken e07467b66c 🐛 Fikset click-event for datepicker/monthpicker 2022-11-24 11:19:26 +01:00
Ken 23259595b3 Boilerplate navno-pakke (#1721) 2022-11-22 19:03:07 +01:00
github-actions[bot]andgithub-actions[bot] 5151313833 Version Packages (#1722)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2022-11-22 18:46:30 +01:00
Ken 45977bf71d ✨ Linter ubrukte css-selektorer 2022-11-22 17:17:08 +01:00
Ken e8007328db 🐛 Css-tokens 2022-11-22 17:10:37 +01:00
Ken 92f0fee402 🎨 sanity-typer 2022-11-21 15:35:43 +01:00
Ken d347deb05f 🔥 Fjernet gammel sanity-script 2022-11-21 14:39:19 +01:00
Ken f138652789 v2.0.0: Tokens og fontlasting (#1718) 2022-11-21 14:21:53 +01:00
Ken ec81f52cfc ✨ html-plugin storybook 2022-11-21 12:34:47 +01:00
github-actions[bot]andgithub-actions[bot] f9aecb4242 Version Packages (#1720)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2022-11-21 11:30:02 +01:00
Vebjørn NordbyandKen d9352982d4 [BUG] parentSelector returneres ikke selv om den er definert (#1717)
Co-authored-by: Ken <ken.aleksander@gmail.com>
2022-11-21 11:25:26 +01:00
Ken 328f33c913 🐛 Fikset changeset config 2022-11-19 17:12:15 +01:00
Ken 67fd406396 📝 Bedre build-logging 2022-11-19 15:20:34 +01:00
Ken 41320584a3 📝 Build loging 2022-11-19 15:03:40 +01:00
Ken ac838681f1 🔥 Fjernet next-eksempel 2022-11-19 14:48:13 +01:00
Ken 3f17539e17 🧑‍💻 lint-staged for raskere linting 2022-11-18 21:44:45 +01:00
Ken 633856677f 🎨 lint-staged 2022-11-18 21:41:51 +01:00
Ken 5aa3026561 ⚡ Raskere tester og build 2022-11-18 21:32:29 +01:00
Ken 90eb056b1c ⬆️ yarn lock 2022-11-18 14:55:00 +01:00
Ken 581c26953e Revert "🌐 Fonter med latin-extended"
This reverts commit 0b0d87a5db.
2022-11-18 14:54:28 +01:00
Ken 0b0d87a5db 🌐 Fonter med latin-extended 2022-11-18 12:58:26 +01:00
Ken 7ef1be47b7 📝 Changeset 2022-11-16 15:29:46 +01:00
Ken dde30617e3 💄 Toggle-small gap 2022-11-16 15:29:03 +01:00
Ken 609678667f 🔥 Fjernet console.log 2022-11-16 09:46:42 +01:00
Ken 180ecd89bf 🎨 defaultMonth/Year prop 2022-11-15 12:15:09 +01:00
Ken 635b0859b8 defaultMonth/Year prop 2022-11-15 12:13:02 +01:00
Ken 10cbe105bc 🐛 Redirect funker nå med æøå 2022-11-12 21:20:11 +01:00
Ken f97eed8396 📝 Hide redirects from sanity search 2022-11-12 20:03:33 +01:00
Ken 119d9df7b5 📝 Sanity types 2022-11-12 19:45:02 +01:00
Ken 846d18cd23 🎨 Dynamic redirects 2022-11-12 19:40:14 +01:00
Ken 833c35cbbc 🐛 Headings i alert scrollet ikke ved linking 2022-11-11 12:43:35 +01:00
Ken 08353f50b5 💄 tema-lenker 2022-11-11 11:34:55 +01:00
Ken fba81fb4eb 🐛 Fikset tags komponentoversikt 2022-11-10 12:00:49 +01:00
Ken 9d9c6e9bfa 🐛 Fikset tags komponentoversikt 2022-11-10 11:07:34 +01:00
Ken 4dad81714f 🎨 Oppdatert tilbakemeldingsform for personvern 2022-11-09 13:19:34 +01:00
Ken 8e9135149b 🐛 Datepicker funket ikke i shadow-dom (open)
🐛 Datepicker funket ikke i shadow-dom

📝 Changeset@
2022-11-08 15:06:02 +01:00
KenandKenAJoh 852b53d6b9 Ikonsynk Figma (#1713)
Co-authored-by: KenAJoh <KenAJoh@users.noreply.github.com>
2022-11-08 09:34:22 +01:00
github-actions[bot]andgithub-actions[bot] ede1f5858a Version Packages (#1711)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2022-11-04 14:50:55 +01:00
Ken ad9e7165bb 💚 dispatch cdn-publish 2022-11-04 14:46:55 +01:00
Kenandolejorgenbakken 77302a30b8 Ikonsynk Figma (#1709)
Co-authored-by: olejorgenbakken <olejorgenbakken@users.noreply.github.com>
2022-11-04 14:45:15 +01:00
Andreas Nordahl 0ef12ef601 upload font files to cdn (#1710) 2022-11-04 14:29:56 +01:00
Ken 4174f9a7b4 📝 Patch-version 2022-11-02 23:37:19 +01:00
Ken 608f158d70 🐛 Datepicker validation error var flipped 2022-11-02 22:40:36 +01:00
Ken 34d41ecc78 📝 Patch-version 2022-11-02 20:42:21 +01:00
Ken 7e62365a60 🔥 Fjernet flaky e2e test 2022-11-02 19:29:52 +01:00
Ken 8565f410a1 💄 Nye tags i sidebar 2022-11-02 18:16:42 +01:00
Ken 46d70820df 📝 Version-bump 2022-11-02 18:09:27 +01:00
github-actions[bot]andgithub-actions[bot] 67e66ffe02 Version Packages (#1707)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2022-11-02 16:29:26 +01:00
Ken e19bf67b33 [FEATURE] Tag varianter (#1684) 2022-11-02 16:25:31 +01:00
Ken 97c5f60e91 Chips (#1668) 2022-11-02 16:20:42 +01:00
Ken ea5293c28d ⬆️ Patch-versjon 2022-11-02 10:57:45 +01:00
Ken 6a58efa9a9 changeset 2022-11-02 10:55:34 +01:00
Ken c95f33679e 💚 Fikset timezones for jest-tester
✨ Timekeeper-demo

✨ timezone for jest-tester
2022-11-02 10:53:19 +01:00
Ken b52a5e02a0 ✨ Patch-versjoner 2022-11-01 23:57:38 +01:00
Ken ab3ef0d34b ✨ Validering i Date-komponenter
🐛 Date-formats skaper problemer for ranged-input

🐛 UX tweaks for inputs

🐛 Fikset weekendValidation

🎨 Custom input-format

🎨 validation api

🎉 range-validation

🎨 Export validation-types

🎨 Datepicker-validation

🎨 monthpicker validation

🎨 Småbugs med disabled datepicker

💄 reversert capitalization i månedsnavn
2022-11-01 23:54:27 +01:00
Ken 69798f6ee2 🔥 Fjernet flaky e2e test 2022-11-01 11:00:35 +01:00
Ken ee14586beb ⬆️ yarn-lock 2022-11-01 10:40:34 +01:00
Ken 82470ba669 🐛 Synket dropdown med Figma 2022-11-01 10:18:40 +01:00
github-actions[bot]andgithub-actions[bot] 6286f0e8e6 Version Packages (#1705)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2022-10-31 13:34:55 +01:00
Ken 3c08651df2 ✨ Changeset 2022-10-31 13:26:02 +01:00
Ken e6d55fdcd6 changeset 2022-10-31 13:24:57 +01:00
Ken 8c445f020c 💚 Flere workers for e2e testing 2022-10-31 12:07:11 +01:00
Ken 78a76bac5d 🎉 Migrert aksel-website repo (#1704) 2022-10-31 11:44:38 +01:00
Ken 75b334af61 Merge branch 'master' of https://github.com/navikt/Designsystemet 2022-10-28 17:29:58 +02:00
Ken 5d98c50b80 🐛 Fikset eksempel 2022-10-28 17:28:30 +02:00
github-actions[bot]andgithub-actions[bot] 27803fd37c Version Packages (#1703)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2022-10-28 17:27:39 +02:00
Ken 1bdb7e3777 📝 changeset 2022-10-28 17:23:09 +02:00
Andreas NordahlandKen 20bcc28cb0 provider with modal config (#1702)
Co-authored-by: Ken <ken.aleksander@gmail.com>
2022-10-28 17:14:39 +02:00
github-actions[bot]andgithub-actions[bot] f43ec5c48c Version Packages (#1701)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2022-10-28 16:13:41 +02:00
Ken 40f0b3340d changeset 2022-10-28 15:58:32 +02:00
Ken 1f023a84be Repo-cleanup (#1700) 2022-10-28 10:59:24 +02:00
Ken f170a2201c 💚 ci-build 2022-10-27 14:32:50 +02:00
github-actions[bot]andgithub-actions[bot] 7df8ee5dd3 Version Packages (#1698)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2022-10-27 14:26:50 +02:00
Ken 713ccfb2eb 💚 auto-pr navn 2022-10-27 14:25:08 +02:00
Ken 99c35f4aed 💚 git token 2022-10-27 14:19:20 +02:00
Ken 981f41c047 💚 deploy key 2022-10-27 14:06:44 +02:00
Ken 330e7867e1 💚 fjernet git-user 2022-10-27 13:27:01 +02:00
Ken 82ed5ff3f0 💚 git user 2022-10-27 13:23:02 +02:00
Ken 17cf7f4ac2 💚 riktig release token 2022-10-27 13:12:34 +02:00
Ken decd2bac2a 💚 chromatic workflow 2022-10-27 12:44:15 +02:00
Ken 0a13a225c1 💚 bedre workflow hooks 2022-10-27 12:25:42 +02:00
Ken 69a7dc76d9 Merge branch 'master' of https://github.com/navikt/Designsystemet 2022-10-27 12:09:42 +02:00
Ken 433687a967 🐛 Bygger ikoner ved chromatic-tester 2022-10-27 12:06:33 +02:00
Ken febf6543b9 gitignore 2022-10-27 11:57:34 +02:00
KenandKenAJoh aa506975b4 [FIX] Ikonsynk Figma (#1692)
Co-authored-by: KenAJoh <KenAJoh@users.noreply.github.com>
2022-10-27 11:47:59 +02:00
Ken cb3201a788 🔨 Clean script 2022-10-27 10:14:44 +02:00
Ken 0f70394cf4 📝 Kontakt oss readme 2022-10-27 10:04:34 +02:00
Ken b26cb5ef51 📝 Readme 2022-10-27 09:53:52 +02:00
Ken d66e6c7c94 📝 Contributing 2022-10-27 09:20:22 +02:00
Ken 48ed9934e6 💚 2022-10-26 23:20:15 +02:00
Ken dec60f90b4 💚 Disabled immutable yarn installs 2022-10-26 23:03:38 +02:00
Ken 9aa756b76e 🎨 changeset config 2022-10-26 22:09:19 +02:00
Ken 50573701ef 🔥 Cleanup etter workflow-oppdatering 2022-10-26 19:07:45 +02:00
Ken 79509fc900 💚 yarn lock 2022-10-26 18:49:30 +02:00
Ken 976083c4c1 changelogs 2022-10-26 18:49:13 +02:00
Ken b95fc33649 changeset 2022-10-26 18:47:35 +02:00
Ken 57ca52a5de 💚 yarn lock 2022-10-26 18:34:01 +02:00
Ken 03fe9dec02 changeset version 2022-10-26 18:31:41 +02:00
Ken 5af875d981 changeset 2022-10-26 18:29:50 +02:00
Ken e452a003c1 💚 delete npmrc 2022-10-26 18:27:15 +02:00
Ken 651757a5f1 💚 yarn lock 2022-10-26 18:10:34 +02:00
Ken 7d064772ad updated versions 2022-10-26 18:07:39 +02:00
Ken dd92454d05 changeset 2022-10-26 18:06:55 +02:00
Ken c43611c06c 🎨 skipper rebuild 2022-10-26 17:50:38 +02:00
Ken 1e580ae25e 🎨 riktig fil å slette 2022-10-26 17:48:05 +02:00
Ken dcef32d47f 🎨 riktig token 2022-10-26 17:38:03 +02:00
Ken 7e311cef06 🎨 Install og npmrc 2022-10-26 17:35:14 +02:00
Ken 051b11d035 🎨 Stop comment on push 2022-10-26 17:28:51 +02:00
Ken b6900e2da4 merge master 2022-10-26 17:26:17 +02:00
Ken 841ed3529e rename workflow 2022-10-26 17:24:54 +02:00
Ken 71bde5a24c Ny release / CI-workflow 🎉 (#1690) 2022-10-26 17:18:32 +02:00
Ken e48f29153b Lerna versionbump [ci skip] 2022-10-26 14:29:23 +02:00
Ken 7960fbb256 🐛 Fjernet console.log 2022-10-26 14:08:51 +02:00
github-actions[bot] 02268671f3 Lerna versionbump [ci skip] 2022-10-26 12:05:10 +00:00
Ken 6486beb4a3 [FIX] 🚑 useId feiler 2022-10-26 13:51:42 +02:00
github-actions[bot] 017e8f6217 Lerna versionbump [ci skip] 2022-10-26 09:58:07 +00:00
Ken c57ae5fd05 [FIX] 🐛 DatepickerInput hadde ikke error-markering (#1689) 2022-10-26 11:46:42 +02:00
Ken cdd2fb3cd2 🚨 2022-10-25 16:44:11 +02:00
Ken 82d9372289 🔥 gitignore fjernet kode 2022-10-25 16:43:06 +02:00
Ken 248c9bbf64 [FIX] 💚 yarn lock 2022-10-25 16:35:11 +02:00
Ken 00cef8cedf [FIX] Cleanup-icons (#1687) 2022-10-25 16:31:50 +02:00
github-actions[bot] 12a0a4baaa Lerna versionbump [ci skip] 2022-10-25 13:55:55 +00:00
Ken f4a02ee052 [FIX] 🐛 Fikset window-bug i jest (#1688) 2022-10-25 15:41:32 +02:00
github-actions[bot] b9ae29f7e4 Lerna versionbump [ci skip] 2022-10-24 18:00:39 +00:00
Ken cad7341208 [FIX] 🐛 Datepicker rerender (#1686) 2022-10-24 19:47:33 +02:00
Ken 82e7036142 💄 Prettier-config for CSS (#1685) 2022-10-24 13:09:25 +02:00
Ken a531474076 ✨ Tailwind-migration codemod 2022-10-21 21:09:58 +02:00
Ken 616f0ac391 ✨ Tailwind-migration 2022-10-21 20:48:30 +02:00
Ken c021865342 Merge branch 'master' of https://github.com/navikt/Designsystemet 2022-10-21 18:45:31 +02:00
Ken 8fc2d63815 🎨 Storybook docs 2022-10-21 18:42:14 +02:00
github-actions[bot] 0d4ce0107a Lerna versionbump [ci skip] 2022-10-21 16:33:43 +00:00
KenandKenAJoh 3e9c8e9fc3 [FIX] Ikonsynk Figma (#1681)
Co-authored-by: KenAJoh <KenAJoh@users.noreply.github.com>
2022-10-21 18:21:30 +02:00
Ken d7ba63fdde 💄 Datepicker disabled-styling 2022-10-21 15:40:45 +02:00
github-actions[bot] 917abc8b9c Lerna versionbump [ci skip] 2022-10-21 11:32:12 +00:00
Ken 95f0da7140 [FIX] 🐛 Fikset css-kompilering for less, href med disabled 2022-10-21 13:19:08 +02:00
Ken 81b479eb11 ✨ Placeholder-kode for migrering av tokens til v2 (#1682) 2022-10-21 10:36:23 +02:00
Ken ab084c93a6 💚 yarn sync 2022-10-21 10:23:47 +02:00
Ken 5634f955ff Merge branch 'master' of https://github.com/navikt/Designsystemet 2022-10-21 10:23:29 +02:00
github-actions[bot] ed3c7b9ad3 Lerna versionbump [ci skip] 2022-10-21 08:19:18 +00:00
Ken dc440b356f 💚 yarn sync 2022-10-21 10:19:00 +02:00
Ken 84fe0fba63 [FIX] Justeringer Datepicker/Monthpicker (#1679) 2022-10-21 10:06:45 +02:00
github-actions[bot] ab0c3432e6 Lerna versionbump [ci skip] 2022-10-20 08:39:15 +00:00
Ken 23f70d4ae0 [FIX] 🎨 Button submittet Form i datepicker 2022-10-20 10:24:10 +02:00
github-actions[bot] d59eda2dcd Lerna versionbump [ci skip] 2022-10-19 10:21:34 +00:00
Andreas NordahlandKen 1c55312a1e [fix] styling in shadow dom (#1670)
Co-authored-by: Ken <ken.aleksander@gmail.com>
2022-10-19 12:10:14 +02:00
github-actions[bot] 2bfbe6f5b1 Lerna versionbump [ci skip] 2022-10-19 08:54:21 +00:00
Ken 02ba20c315 [FIX] Ikonsynk Figma (#1669) 2022-10-19 10:40:39 +02:00
github-actions[bot] ba3666a0e6 Lerna versionbump [ci skip] 2022-10-19 07:01:26 +00:00
Ken c5be69a9fb [FIX] ✨ Date/Monthpicker features (#1674) 2022-10-19 08:49:01 +02:00
Ken f0f74b87a4 [FIX] 🐛 Button disabled fungerte ikke med as-prop (#1677) 2022-10-19 08:48:16 +02:00
Andreas Nordahl fc81812ff8 add shadow-dom example (#1673) 2022-10-18 17:03:43 +02:00
Andreas Nordahl 83762fd85e remove unused smooth-scroll.css (#1671) 2022-10-18 11:17:16 +02:00
Andreas Nordahl 6a1b3c387e remove datepicker flakiness by defining today (#1672) 2022-10-18 11:16:53 +02:00
Ken 8c40785bc1 [FIX] 🚑 Button-farge 2022-10-18 11:14:09 +02:00
Ken 965ba7c3d0 💚 Bedre tekster for chromatic-workflow 2022-10-14 20:48:48 +02:00
github-actions[bot] d94ace2aee Lerna versionbump [ci skip] 2022-10-14 13:36:07 +00:00
Ken db2f776f42 [FIX] 🎨 Bedre imports for date-fns 2022-10-14 15:17:44 +02:00
Ken d2959f0bb5 ⬆️ flyttet deps til riktig pakke 2022-10-14 10:45:34 +02:00
Ken 0a40b4054f ⬆️ yarn lock 2022-10-14 10:41:38 +02:00
Ken 5f65cfc5b7 ⬆️ removed extend 2022-10-14 10:40:57 +02:00
Ken 8010a117f1 ⬆️ lerna updated 2022-10-14 10:38:59 +02:00
Ken 4adaa8ee18 ⬆️ husky updated 2022-10-14 10:37:00 +02:00
Ken 2ebe2735bb ⬆️ yarn lock sync 2022-10-14 10:28:23 +02:00
github-actions[bot] d94a0e9c78 Lerna versionbump [ci skip] 2022-10-13 12:23:28 +00:00
Ken 4ea393ecdc [fix] 🚸 Bedre tooltip-feilmelding 2022-10-13 14:11:39 +02:00
github-actions[bot] 5179b09e67 Lerna versionbump [ci skip] 2022-10-13 11:35:42 +00:00
Ken 619b6b5459 [FIX] 🎨 Helptext med riktekst (#1660) 2022-10-13 13:24:46 +02:00
dependabot[bot] 9ea0384254 ⬆️ Bump terser from 4.8.0 to 4.8.1 (#1658)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-10-13 10:05:04 +02:00
github-actions[bot] b224ef6810 Lerna versionbump [ci skip] 2022-10-12 14:20:09 +00:00
Bjørn Harbo Dahle 4e7766789c [Fix] Add user defined overlayClassname (#1654) 2022-10-12 16:06:03 +02:00
github-actions[bot] e2b31808c0 Lerna versionbump [ci skip] 2022-10-12 09:25:01 +00:00
Ken 58df6f75aa [FIX] 🚑 Fikset brukket table-styling 2022-10-12 11:13:38 +02:00
Ken 0a48a4ed17 Merge branch 'master' of https://github.com/navikt/Designsystemet 2022-10-12 11:10:20 +02:00
Ken c093e6668e [FIX] 🚑 Fikset brukket table-styling 2022-10-12 11:09:27 +02:00
github-actions[bot] 933119ea56 Lerna versionbump [ci skip] 2022-10-12 07:57:15 +00:00
Ken 4a2afb9b79 [FIX] 💄 DateInput knapp hadde feil farge 2022-10-12 09:44:57 +02:00
Ken 0081a2c224 [FIX] 🚑 Tooltip feilet veld dynamiskt innhold 2022-10-12 09:38:36 +02:00
Ken ad34640601 [FIX] 🚑 Tooltip rendres uansett tekstlengde 2022-10-12 09:33:32 +02:00
Ken f7df3e5b08 [FIX] 🚑 Tooltip rendres uansett tekstlengde 2022-10-12 09:32:31 +02:00
github-actions[bot] eba46bf4cd Lerna versionbump [ci skip] 2022-10-11 17:09:12 +00:00
Ken cc227e775f [fix] ✏️ Datepicker docs 2022-10-11 18:56:45 +02:00
github-actions[bot] 4bee31771d Lerna versionbump [ci skip] 2022-10-11 13:31:03 +00:00
Ken dd9f88d886 [FIX] 💄 Spacing guidepaneler 2022-10-11 15:17:35 +02:00
Ken e6d82ad04b [FIX] 💄 Pagination xsmall alignment 2022-10-11 15:09:06 +02:00
Ken 9e7a926fe9 [FIX] 💄 Pagination xsmall feil-alignet 2022-10-11 15:08:26 +02:00
github-actions[bot] ef79af2b4a Lerna versionbump [ci skip] 2022-10-11 12:38:04 +00:00
Ken fae51638b1 [fix] 🔥 Console.log 2022-10-11 14:25:14 +02:00
Ken 8983650075 :memo:Issue-templates 2022-10-11 13:39:17 +02:00
github-actions[bot] 7777df7b7d Lerna versionbump [ci skip] 2022-10-11 11:28:44 +00:00
Ken a8d726d6a5 [FIX] 🎨 usemonthPicker export 2022-10-11 13:03:37 +02:00
Ken 4baad26b5f [FIX]🎨 Monthpicker export 2022-10-11 13:01:57 +02:00
github-actions[bot] c548ba399e Lerna versionbump [ci skip] 2022-10-11 09:45:11 +00:00
Ken d4be8674e8 [FIX] 🚑 react useId 2022-10-11 11:34:02 +02:00
Ken 1989371a68 [FIX] 🚑 useId React-18 2022-10-11 11:32:39 +02:00
github-actions[bot] 0b4909dd85 Lerna versionbump [ci skip] 2022-10-11 09:17:55 +00:00
Ken 7bffd4020e [FIX] 🚑 Fikset mode datepicker 2022-10-11 11:06:28 +02:00
Ken 7034f8faa2 💚 Node-16 støtte i workflows 2022-10-11 10:27:03 +02:00
Ken de6961cb1d 💚 Node-16 støtte i workflows 2022-10-11 10:27:03 +02:00
github-actions[bot] baf905d76c Lerna versionbump [ci skip] 2022-10-11 08:08:38 +00:00
Ken 373810f5f4 [FIX] ♿ aria-linking confirmationpanel 2022-10-11 09:53:59 +02:00
Ken 19a9fa7034 [Feature] ⬆️ lockfile 2022-10-11 09:47:56 +02:00
KenandKai Erik Schieren 6a06999761 [Feature] Datepicker & Monthpicker (#1630)
Co-authored-by: Kai Erik Schieren <kai.schieren@soprasteria.com>
2022-10-11 09:23:30 +02:00
github-actions[bot] 1c13cb1728 Lerna versionbump [ci skip] 2022-10-10 16:35:29 +00:00
larseirikhansen 9662155dde [FIX] Add aria-hidden to same tag as display-attribute (#1649) 2022-10-10 18:22:25 +02:00
github-actions[bot] e91e307177 Lerna versionbump [ci skip] 2022-10-10 13:29:23 +00:00
Martin BerglundandKen 225e882eae [FIX] Fallback på font-family i body (#1647)
Co-authored-by: Ken <26967723+KenAJoh@users.noreply.github.com>
2022-10-10 15:19:22 +02:00
github-actions[bot] 77c4833c42 Lerna versionbump [ci skip] 2022-10-08 16:32:06 +00:00
Ken fbced203b1 [FIX]💄 Nested-accordion arrow brakk 2022-10-08 18:22:04 +02:00
Ken fff3d22f1a [FIX]💄 For lav kontrast toptext Chat 2022-10-08 18:12:18 +02:00
Ken c5689ab543 [FIX] Comment textarea autosize 2022-10-08 18:08:54 +02:00
larseirikhansen d1edf960e6 [FIX] Textarea counter color (#1646) 2022-10-08 18:03:49 +02:00
Ken 64ec281fb2 🎨 Optional add type button (#1645) 2022-10-04 09:54:57 +02:00
github-actions[bot] 9c9174d3a6 Lerna versionbump [ci skip] 2022-09-30 11:53:13 +00:00
Ken 51dcf4f60a [FIX] 🎨 Fikset typer og story for CopyToClipboard (#1643) 2022-09-30 13:11:21 +02:00
github-actions[bot] f3929075e3 Lerna versionbump [ci skip] 2022-09-22 12:30:20 +00:00
larseirikhansen 943a39d30d [FIX] Expandale table line (#1642)
* yarn lock update
* remove expanded cell border bottom
* merge master
2022-09-22 14:20:28 +02:00
github-actions[bot] 85518226c6 Lerna versionbump [ci skip] 2022-09-22 09:11:32 +00:00
Ken 6a7f14e71c [fix] yarn lock fix 2022-09-22 10:58:39 +02:00
Andreas Nordahl 9b3efc6e1f [fix] table row hover prop to disable hover style (#1640) 2022-09-22 10:50:16 +02:00
github-actions[bot] b6d65ad805 Lerna versionbump [ci skip] 2022-09-20 07:31:42 +00:00
Andreas Nordahl 7ab5e10f57 [fix] expose colSpan prop in ExpandableRow (#1641) 2022-09-20 09:20:02 +02:00
github-actions[bot] 6f3aa4690f Lerna versionbump [ci skip] 2022-09-19 09:09:42 +00:00
Ken f4ff216e45 [fix] Definert maksbredde på HelpText (#1638) 2022-09-19 10:59:32 +02:00
github-actions[bot] 01a6f250da Lerna versionbump [ci skip] 2022-09-12 13:22:25 +00:00
KenandMartin Berglund 1ccc97d8e5 [FEATURE] Stepper med interactive, completed-option (#1626)
Co-authored-by: Martin Berglund <martin.berglund@nav.no>
2022-09-12 15:07:18 +02:00
github-actions[bot] ed2537dc58 Lerna versionbump [ci skip] 2022-09-07 07:01:21 +00:00
Ken 16b7176fe3 [FIX]Toggle-group fix for label (#1635) 2022-09-07 08:50:19 +02:00
github-actions[bot] f2eab3f636 Lerna versionbump [ci skip] 2022-09-06 09:50:14 +00:00
Ken 00747ac364 [FIX] Oppdatert typer for TextField (#1634)
* oppdatert typer for textfield

* yarn lock fix
2022-09-06 11:34:46 +02:00
github-actions[bot] ad3f7e174c Lerna versionbump [ci skip] 2022-08-29 13:29:36 +00:00
Ken 4708688b02 [FIX] Fikset onClick for Dropdown-items (#1632) 2022-08-29 15:18:31 +02:00
github-actions[bot] 940e1255f1 Lerna versionbump [ci skip] 2022-08-26 13:54:08 +00:00
larseirikhansen c8b041154e [FIX] Optional name-prop for <Chat/> (#1629) 2022-08-26 15:40:01 +02:00
github-actions[bot] 7da8246ce3 Lerna versionbump [ci skip] 2022-08-26 09:45:49 +00:00
Ken 38bccf08eb [FIX] Minsket padding-right for Select 2022-08-26 11:32:21 +02:00
Ken ed817bf04c Fikset flikker og update-bug for popover (#1627)
* Test for fix i popover

* Lerna versionbump [ci skip]

* ryddet i testkode

* ryddet i testkode 2

* yarn lock

* Lerna versionbump [ci skip]

* yarn lock
2022-08-25 14:36:48 +02:00
Ken 4f8d6f8fa1 Update README.md 2022-08-24 09:25:52 +02:00
Ken d13b7b19c9 Update README.md 2022-08-24 09:21:17 +02:00
Ken 2e7535037c Update README.md 2022-08-24 08:51:35 +02:00
github-actions[bot] 5b8290e77e Lerna versionbump [ci skip] 2022-08-23 15:43:48 +00:00
Ken a19cad1bce [feature] reversert workflow comparator for release 2022-08-23 17:32:24 +02:00
Ken 8b8e59349b [feature] Fikset workflow for publisering (#1624) 2022-08-23 16:35:10 +02:00
Kai Erik SchierenandKai Erik Schieren f87d020db2 [feature] add closeOnSelect on dropdown (#1623)
Co-authored-by: Kai Erik Schieren <kschieren@Kais-MacBook-Pro.local>
2022-08-23 16:10:20 +02:00
Ken 91cb70c5a3 Fikset fixed versjonering (#1621) 2022-08-23 15:23:00 +02:00
Kai Erik Schieren eda041ec74 Update CONTRIBUTING.md (#1622) 2022-08-23 14:05:41 +02:00
Ken d875804d2b fikset versjoner 2022-08-22 15:17:16 +02:00
github-actions[bot] 6b77a04e12 Lerna versionbump [ci skip] 2022-08-22 13:02:35 +00:00
Tanet Trimas 3f18280557 [feature] Event ved lukking av dropdown (#1620) 2022-08-22 14:48:40 +02:00
github-actions[bot] 1b9c7b90ff Lerna versionbump [ci skip] 2022-08-18 08:05:45 +00:00
Ken 1ef6ebafd4 [FIX] Update readme 2022-08-18 09:55:28 +02:00
Ken 058969c0f0 Lerna versionbump [ci skip] 2022-08-18 08:57:56 +02:00
Ken 8f43b09205 Fikset errormessage docs 2022-08-18 08:57:39 +02:00
155c556fea Designsystemet v1.0.0 (#1535)
Co-authored-by: Andreas Nordahl <andnorda@gmail.com>
Co-authored-by: Ken <ken.aleksander@gmail.com>
Co-authored-by: Martin Berglund <martin.berglund@nav.no>
Co-authored-by: larseirikhansen <71271458+larseirikhansen@users.noreply.github.com>
2022-08-18 08:15:21 +02:00
Ken 151ec81036 Pusset opp bug-reports 2022-08-17 10:39:37 +02:00
github-actions[bot] c5d52a4c9a Lerna versionbump [ci skip]
- @navikt/ds-css@0.18.29
2022-08-17 08:25:30 +00:00
Ken 6ef57ee106 [FIX] Fikset Select issue ved bruk i Intern-header (#1616) 2022-08-17 10:12:24 +02:00
github-actions[bot] dd2167dab5 Lerna versionbump [ci skip]
- @navikt/ds-react@0.19.27
 - @navikt/ds-react-internal@0.14.28
2022-08-11 08:44:24 +00:00
larseirikhansen 0c179d92af [fix] React modal style (#1615)
* version bump

* added custom styling to react modal

* use prop 'style' to avoid breaking changes

* update modal story
2022-08-11 10:32:41 +02:00
github-actions[bot] abace10750 Lerna versionbump [ci skip]
- @navikt/ds-react@0.19.26
 - @navikt/ds-react-internal@0.14.27
2022-08-09 13:16:39 +00:00
Andreas Nordahl 03949990b1 [fix] bump radix-ui to 1.0 (#1613) 2022-08-09 15:04:23 +02:00
github-actions[bot] bdb777df0c Lerna versionbump [ci skip]
- @navikt/ds-css@0.18.28
 - @navikt/ds-tailwind@0.2.9
 - @navikt/ds-tokens@0.9.8
2022-08-09 09:13:09 +00:00
Andreas Nordahl 5d2ed071e1 [fix] update lockfile (#1611) 2022-08-09 10:59:03 +02:00
Andreas Nordahl e152c92bf4 [fix] generate types for js tokens (#1610) 2022-08-09 10:42:31 +02:00
Ken 840b4dddd3 fjernet favikon for storybook 2022-07-18 10:39:15 +02:00
github-actions[bot] 136ab3aa97 Lerna versionbump [ci skip]
- @navikt/ds-icons@0.8.20
 - @navikt/ds-react@0.19.25
 - @navikt/ds-react-internal@0.14.26
2022-07-18 08:21:56 +00:00
KenandKenAJoh 6b9ecd239a [FIX] Ikonsynk Figma (#1607)
Co-authored-by: KenAJoh <KenAJoh@users.noreply.github.com>
2022-07-18 10:11:50 +02:00
github-actions[bot] 0b8f9a9d4b Lerna versionbump [ci skip]
- @navikt/ds-react@0.19.24
 - @navikt/ds-react-internal@0.14.25
2022-07-15 12:32:56 +00:00
André Roaldseth 4611a9e806 [fix] Støtt React 18 via react-modal 3.15.1 (#1606) 2022-07-15 14:22:28 +02:00
Ken fe19e8390e [fix]react-modal reactv18 peerdep 2022-07-15 14:21:16 +02:00
Ken 9a91e9b3d2 oppdatert checkbox story 2022-07-11 13:01:47 +02:00
github-actions[bot] 147fb90550 Lerna versionbump [ci skip]
- @navikt/ds-react@0.19.23
 - @navikt/ds-react-internal@0.14.24
2022-07-11 10:23:53 +00:00
Karl O 4007711cf3 [fix] export default illutration for guide panel (#1598) 2022-07-11 12:12:32 +02:00
github-actions[bot] c4259221c1 Lerna versionbump [ci skip]
- @navikt/ds-icons@0.8.19
 - @navikt/ds-react@0.19.22
 - @navikt/ds-react-internal@0.14.23
2022-07-07 13:30:42 +00:00
KenandKenAJoh 45ffd93728 [FIX] Ikonsynk Figma (#1589)
Co-authored-by: KenAJoh <KenAJoh@users.noreply.github.com>
2022-07-07 15:17:59 +02:00
Ken 346e45b153 GuidePanel illustrasjon kan brukes på samme måte som Ikoner (#1599) 2022-07-06 15:06:43 +02:00
github-actions[bot] 8f1e628f8d Lerna versionbump [ci skip]
- @navikt/ds-css@0.18.27
 - @navikt/ds-react@0.19.21
 - @navikt/ds-react-internal@0.14.22
2022-07-06 12:03:37 +00:00
Ken 2807bc28e8 [fix] yarn lock 2022-07-06 13:49:57 +02:00
Andreas Nordahl 2c2db2e657 [fix] alert pixel perfect sync (#1594) 2022-07-06 13:40:05 +02:00
KenandAndreas Nordahl 2734b90d0f [FIX] La til errorId i checkbox-props (#1596)
* omit errorid

* la til errorId i checkbox props

* some unit tests

Co-authored-by: Andreas Nordahl <andnorda@gmail.com>
2022-07-06 13:38:48 +02:00
github-actions[bot] 88e8a71412 Lerna versionbump [ci skip]
- @navikt/ds-react@0.19.20
 - @navikt/ds-react-internal@0.14.21
2022-07-06 07:59:40 +00:00
Karl O e1222ac0e1 [fix] accordion header submits forms (#1597) 2022-07-06 09:50:01 +02:00
github-actions[bot] 43251ae7c3 Lerna versionbump [ci skip]
- @navikt/ds-css@0.18.26
 - @navikt/ds-react@0.19.19
 - @navikt/ds-react-internal@0.14.20
2022-07-04 11:30:15 +00:00
Andreas Nordahl eeb9f5ab71 [fix] pixel perfect accordion sync (#1592) 2022-07-04 13:19:45 +02:00
github-actions[bot] c148d01d16 Lerna versionbump [ci skip]
- @navikt/ds-codemod@1.0.2
 - @navikt/ds-css@0.18.25
2022-07-04 09:13:20 +00:00
Andreas Nordahl c83c410078 [fix] read-more with two children (#1591) 2022-07-04 11:02:20 +02:00
Ken ef166f1184 Codemod for Pagination (#1590) 2022-07-01 13:40:01 +02:00
github-actions[bot] c1baf84e74 Lerna versionbump [ci skip]
- @navikt/ds-icons@0.8.18
 - @navikt/ds-react@0.19.18
 - @navikt/ds-react-internal@0.14.19
2022-06-30 15:07:26 +00:00
KenandKenAJoh 031a8dc639 [FIX] Ikonsynk Figma (#1588)
Co-authored-by: KenAJoh <KenAJoh@users.noreply.github.com>
2022-06-30 16:57:08 +02:00
github-actions[bot] 31a37c5f70 Lerna versionbump [ci skip]
- @navikt/ds-css@0.18.24
2022-06-30 14:31:24 +00:00
Ken a353175d9c [FIX] Linkpanel spacing justering (#1587) 2022-06-30 16:21:56 +02:00
Ken 1800ef9dda Storybook html-plugin 2022-06-30 10:01:19 +02:00
Ken 1419955277 yarn lock 2022-06-30 09:53:01 +02:00
larseirikhansen ffdb9e1f4a flex: 'start' and 'end' have mixed support (#1585) 2022-06-30 09:36:15 +02:00
github-actions[bot] 0826fcf332 Lerna versionbump [ci skip]
- @navikt/ds-css@0.18.23
2022-06-29 12:28:48 +00:00
Ken b53acac3dc [FIX] Stepper postcss-warning hotfix (#1583) 2022-06-29 14:19:11 +02:00
github-actions[bot] c47048cc2d Lerna versionbump [ci skip]
- @navikt/ds-css@0.18.22
 - @navikt/ds-react@0.19.17
 - @navikt/ds-react-internal@0.14.18
2022-06-29 12:03:17 +00:00
Ken 1fb51c159a [FIX] Search-komponent figma-synk (#1582) 2022-06-29 13:51:28 +02:00
github-actions[bot] 7596f3f5dc Lerna versionbump [ci skip]
- @navikt/ds-css@0.18.21
 - @navikt/ds-tailwind@0.2.8
 - @navikt/ds-tokens@0.9.7
2022-06-29 09:46:48 +00:00
github-actions[bot]andKenAJoh 21179b08d7 [FIX] Tokens sync Figma (#1581)
Co-authored-by: KenAJoh <KenAJoh@users.noreply.github.com>
2022-06-29 11:35:26 +02:00
github-actions[bot] 4f437d4e15 Lerna versionbump [ci skip]
- @navikt/ds-css@0.18.20
 - @navikt/ds-react@0.19.16
 - @navikt/ds-react-internal@0.14.17
2022-06-29 09:29:56 +00:00
4aa0312095 [FIX] Stepper horizontal (#1507)
Co-authored-by: Martin Berglund <martin.berglund@nav.no>
Co-authored-by: Ken <ken.aleksander@gmail.com>
2022-06-29 11:20:35 +02:00
github-actions[bot] 15636896bd Lerna versionbump [ci skip]
- @navikt/ds-css@0.18.19
 - @navikt/ds-react@0.19.15
 - @navikt/ds-react-internal@0.14.16
2022-06-28 09:54:00 +00:00
Ken 431864c317 [FIX] Search darkmode-token hotfix (#1579) 2022-06-28 11:43:33 +02:00
Ken 31098d64a8 [FIX] Select style hotfix (#1580) 2022-06-28 11:43:12 +02:00
github-actions[bot] 8a156988fc Lerna versionbump [ci skip]
- @navikt/ds-css@0.18.18
2022-06-27 10:19:57 +00:00
Ken df704ee2ec [FIX] justify-self stretch for confirmation-panel (#1578) 2022-06-27 12:09:49 +02:00
github-actions[bot] 17f4c35e77 Lerna versionbump [ci skip]
- @navikt/ds-codemod@1.0.1
 - @navikt/ds-css@0.18.17
2022-06-27 09:49:57 +00:00
Ken 3a112a31ea [FIX] Oppdatert loader styling basert på figma (#1576) 2022-06-27 11:38:38 +02:00
Ken 3d12dba46b Update README.md 2022-06-24 08:37:03 +02:00
Ken 7a75d45c7e Tabs codemod (#1575) 2022-06-24 07:58:50 +02:00
Ken 279b61f5c1 Codemod for SpeechBubble -> Chat (#1574) 2022-06-22 11:34:39 +02:00
Ken c6c886184c Codemod-pakke for videreutvikling (#1573) 2022-06-21 19:36:43 +02:00
github-actions[bot] fe6bc395c2 Lerna versionbump [ci skip]
- @navikt/ds-css@0.18.16
2022-06-21 09:46:52 +00:00
Ken c8f8e59d78 [fix] fikset accordion bg 2022-06-21 11:27:44 +02:00
github-actions[bot] ef6c597021 Lerna versionbump [ci skip]
- @navikt/ds-css@0.18.15
 - @navikt/ds-react@0.19.14
 - @navikt/ds-tailwind@0.2.7
 - @navikt/ds-tokens@0.9.6
 - @navikt/ds-react-internal@0.14.15
2022-06-17 08:10:37 +00:00
Ken bc5df7f004 [FIX] Textarea hotfix 2022-06-17 09:57:51 +02:00
Ken 1fcc39c2aa [FIX] Fjernet gamle shadow-tokens (#1572) 2022-06-17 09:54:55 +02:00
github-actions[bot] 92febc6e0c Lerna versionbump [ci skip]
- @navikt/ds-css@0.18.14
 - @navikt/ds-react@0.19.13
 - @navikt/ds-react-internal@0.14.14
2022-06-16 10:20:38 +00:00
Ken caa4a41df2 [FIX] Form-field styling (#1566) 2022-06-16 12:11:21 +02:00
github-actions[bot] e6dfbb7a4f Lerna versionbump [ci skip]
- @navikt/ds-css@0.18.13
2022-06-16 10:02:35 +00:00
Ken d59f8970cc [FIX] updated readme 2022-06-16 11:52:19 +02:00
Ken d631913e77 fikset error-summary list-style 2022-06-16 11:30:43 +02:00
github-actions[bot] 28f994a757 Lerna versionbump [ci skip]
- @navikt/ds-react-internal@0.14.13
2022-06-16 09:05:07 +00:00
Ken e1b383122c [FIX] Placement på Dropdown.Menu (#1569) 2022-06-16 10:53:37 +02:00
github-actions[bot] f47cfdcb9e Lerna versionbump [ci skip]
- @navikt/ds-css@0.18.12
 - @navikt/ds-react@0.19.12
 - @navikt/ds-react-internal@0.14.12
2022-06-15 13:46:56 +00:00
Ken dc3a09b0c0 [FIX] Fikset loader background-bleed + inverted-synk med Figma (#1565) 2022-06-15 15:37:47 +02:00
Ken 594a2df49b [FIX] Justert confirmation-panel for Figma-synk (#1564) 2022-06-15 15:37:16 +02:00
github-actions[bot] bf41d8f181 Lerna versionbump [ci skip]
- @navikt/ds-react@0.19.11
 - @navikt/ds-react-internal@0.14.11
2022-06-15 13:13:00 +00:00
Ken 0345b8d045 [FIX] Oppdatert Errorsummary for UU (#1563) 2022-06-15 15:03:02 +02:00
github-actions[bot] ff89d6e4e8 Lerna versionbump [ci skip]
- @navikt/ds-css@0.18.11
2022-06-14 18:03:19 +00:00
Ken dea62ab969 [FIX] Errorsummary css justering (#1562) 2022-06-14 19:53:24 +02:00
Ken 25dbcce053 Flere storybook oppdateringer (#1561) 2022-06-14 13:21:50 +02:00
github-actions[bot] 3e0e9ad15c Lerna versionbump [ci skip]
- @navikt/ds-css@0.18.10
 - @navikt/ds-react@0.19.10
 - @navikt/ds-react-internal@0.14.10
2022-06-14 08:24:26 +00:00
Ken bfd929a324 [FIX] Loader oppdatering (#1554) 2022-06-14 10:13:02 +02:00
Ken 50922a3206 Storybook update (#1560) 2022-06-14 09:45:25 +02:00
github-actions[bot] 2817353f8e Lerna versionbump [ci skip]
- @navikt/ds-css@0.18.9
2022-06-13 10:19:48 +00:00
Ken 1f3dca06d7 [FIX] Storybook updates, <Link>-ikon fix (#1555)
* helptext story

* popover stories

* panel story

* link story

* lint

* oppdatert link css

* modal story

* tag-story

* bedre modal og tag story

* yarn lock

* tester modal visning
2022-06-13 12:04:32 +02:00
github-actions[bot] e586812ddf Lerna versionbump [ci skip]
- @navikt/ds-css@0.18.8
 - @navikt/ds-react@0.19.9
 - @navikt/ds-react-internal@0.14.9
2022-06-13 09:39:15 +00:00
Ken 05fc7c6ab7 [FIX] Textarea synk figma (#1553)
* textarea figma synk

* minRow story

* fjernet animasjon

* yarn lock
2022-06-13 11:24:10 +02:00
Ken ad9381b169 yarn lock 2022-06-13 09:03:01 +02:00
github-actions[bot] adfdfceef3 Lerna versionbump [ci skip]
- @navikt/ds-icons@0.8.17
 - @navikt/ds-react@0.19.8
 - @navikt/ds-css-internal@0.7.7
 - @navikt/ds-react-internal@0.14.8
2022-06-10 14:43:56 +00:00
Kenandandnorda d7c7ed36f4 [fix] Ikoner synket fra figma (#1552)
Co-authored-by: andnorda <andnorda@users.noreply.github.com>
2022-06-10 16:31:25 +02:00
Andreas Nordahl de5890947b [fix] update copy to clipboard to match figma (#1550) 2022-06-10 16:31:04 +02:00
github-actions[bot] 08d9780c97 Lerna versionbump [ci skip]
- @navikt/ds-css-internal@0.7.6
2022-06-10 14:29:10 +00:00
Andreas Nordahl d627093560 [fix] updated dropdown paddings (#1551) 2022-06-10 16:17:09 +02:00
Ken 6f3126857a Button stories 2022-06-09 14:17:43 +02:00
github-actions[bot] 731cae82c3 Lerna versionbump [ci skip]
- @navikt/ds-css@0.18.7
 - @navikt/ds-react@0.19.7
 - @navikt/ds-react-internal@0.14.7
2022-06-09 08:29:40 +00:00
Andreas Nordahl 3440d2f0f7 [fix] Typo sync (#1548)
* add error message component

* add uppercase detail

* dont default detail to bold

* dot before fieldset error message
2022-06-09 10:19:11 +02:00
github-actions[bot] 49c3be36a8 Lerna versionbump [ci skip]
- @navikt/ds-css@0.18.6
 - @navikt/ds-icons@0.8.16
 - @navikt/ds-react@0.19.6
 - @navikt/ds-tailwind@0.2.6
 - @navikt/ds-tokens@0.9.5
 - @navikt/ds-css-internal@0.7.5
 - @navikt/ds-react-internal@0.14.6
2022-06-08 13:16:33 +00:00
Andreas Nordahl 00370a1f61 [fix] internal header updates (#1547)
* WIP

* dropdown border color sync
2022-06-08 15:06:23 +02:00
Ken a171f9b312 [FIX] GPR fix 2022-06-08 15:00:51 +02:00
github-actions[bot] d05f495d6c Lerna versionbump [ci skip]
- @navikt/ds-css@0.18.5
 - @navikt/ds-tailwind@0.2.5
 - @navikt/ds-tokens@0.9.4
2022-06-08 12:55:56 +00:00
github-actions[bot]andandnorda c2df47b776 [fix] Tokens synket fra figma (#1546)
Co-authored-by: andnorda <andnorda@users.noreply.github.com>
2022-06-08 14:45:57 +02:00
github-actions[bot] e8ee773bd8 Lerna versionbump [ci skip]
- @navikt/ds-css@0.18.4
 - @navikt/ds-tailwind@0.2.4
 - @navikt/ds-tokens@0.9.3
2022-06-08 12:44:38 +00:00
github-actions[bot]andandnorda 7f7475eae5 [fix] Tokens synket fra figma (#1545)
Co-authored-by: andnorda <andnorda@users.noreply.github.com>
2022-06-08 14:33:21 +02:00
1677 changed files with 75652 additions and 17624 deletions

No files matched your search

+39
View File
@@ -0,0 +1,39 @@
# Changesets
For versjonering bruker vi løsningen [Changesets](https://github.com/changesets/changesets) for [versjonering](https://semver.org/) og publisering av pakker.
## Howto
- For å lage en ny versjons-entry: `yarn changeset`
- Velg pakkene som skal versjoneres med `arrowkeys` + `Space`
`🦋 Which packages would you like to include?`
Trykk `Space` for å velge pakkene som skal versjoneres, for så trykke `Enter` for å gå videre.
`🦋 Which packages should have a major bump?`
Trykk `Enter` for å gå videre _*eller*_ velg pakkene som skal marjor-bumpes med `arrowkeys` + `Space`
`🦋 Which packages should have a minor bump?`
Trykk `Enter` for å gå videre _*eller*_ velg pakkene som skal marjor-bumpes med `arrowkeys` + `Space`
Hvis du ikke velger major eller minor, så blir pakkene få en patch-bump
- Commit og push.
## Fixed versjonering
Alle base-pakkene våre har `fixed versjonering`. Dette tilsier at en bump på en av disse vil bumpe alle til samme versjon
```sh
"@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"
```
+29
View File
@@ -0,0 +1,29 @@
{
"$schema": "https://unpkg.com/@changesets/config@2.2.0/schema.json",
"changelog": [
"@changesets/changelog-github",
{ "repo": "navikt/Designsystemet" }
],
"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"
]
],
"linked": [],
"access": "public",
"baseBranch": "master",
"updateInternalDependencies": "patch",
"ignore": ["shadow-dom", "aksel.nav.no", "@navikt/ds-navno"],
"___experimentalUnsafeOptions_WILL_CHANGE_IN_PATCH": {
"updateInternalDependents": "always"
}
}
+5 -18
View File
@@ -3,25 +3,12 @@ name: Bug Report
about: Meld inn bugs eller feil
title: "[BUG]"
labels: "bug \U0001F41B"
assignees: ''
assignees: ""
---
## Hvilken av tjenestene våre gjelder det?
## Hva er feilen/problemet?
<!--
Sett en x i type pakke det gjelder:
- [x] type
-->
- [ ] `Komponenter`
- [ ] `Stiler`
- [ ] `Ikoner`
- [ ] `Annet`
## Beskriv feilen/problemet
<!--
> Beskriv hva slags problem(er) som oppstår
> Hva forventet du skulle oppstå?
@@ -31,7 +18,7 @@ assignees: ''
(skriv her.)
## Steg for å reprodusere problemet
## Steg for å reprodusere problemet (valgfri)
<!--
1. Steg en
@@ -41,11 +28,11 @@ assignees: ''
(skriv her.)
## Eksempel/Tilleggsinformasjon
## Eksempel/Tilleggsinformasjon (valgfri)
<!--
Screenshots eller kodesnippets
Legg gjerne ved ekstrainfo som nettleser, desktop/mobil etc
Legg gjerne ved ekstrainfo som nettleser eller desktop/mobil hvis det er relevant.
-->
```
+6 -7
View File
@@ -1,24 +1,23 @@
---
name: Feature Request
about: Foreslå noe nytt for designsystemet
about: Foreslå noe nytt!
title: "[NEW]"
labels: new ✨
assignees: ''
assignees: ""
---
## Beskriv forespørselen
## Hva?
(skriv her.)
## Hvilken funksjon vil dette har for bruker?
## Hva løser dette?
(skriv her.)
## Eksempler/Tilleggsinformasjon
## Eksempler/Info
<!--
Del gjerne eksempel av lignende løsninger som er i bruk idag, URL/Screenshots etc.
Del gjerne eksempel av lignende løsninger som er i bruk idag, URL/Screenshots etc.
Link gjerne til relaterte issues her også.
-->
+68
View File
@@ -0,0 +1,68 @@
name: Deploy aksel.dev.nav.no
on:
workflow_dispatch:
push:
branches:
- next
env:
IMAGE: ghcr.io/navikt/designsystemet
jobs:
build_and_deploy:
name: Build and deploy to dev-gcp
runs-on: ubuntu-20.04
steps:
- uses: actions/setup-node@v1
with:
node-version: "14"
- uses: actions/checkout@v2
with:
ref: "next"
- 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
- name: Restore cache
uses: actions/cache@v3
with:
path: "**/node_modules"
key: ${{ runner.os }}-dev-${{ github.sha }}
restore-keys: |
${{ runner.os }}-dev-
- name: Install dependencies
run: yarn
- name: Build application
run: |
yarn boot
yarn docgen
yarn workspace aksel.nav.no build:next
- name: Login to GitHub Container Registry
uses: docker/login-action@ab80d026d4753220c4243394c07c7d80f9638d06 # Use commit-sha1 instead of tag for security concerns
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- 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 }}
- name: Deploy to dev-gcp
uses: nais/deploy/actions/deploy@master
env:
APIKEY: ${{ secrets.NAIS_DEPLOY_APIKEY }}
RESOURCE: aksel.nav.no/nais-dev.yaml
CLUSTER: dev-gcp
IMAGE: ${{ env.DOCKER_TAG }}
+78
View File
@@ -0,0 +1,78 @@
name: Deploy aksel.nav.no
on:
push:
branches:
- master
paths:
- "aksel.nav.no/**"
env:
IMAGE: ghcr.io/navikt/designsystemet
jobs:
build_and_deploy:
name: Build and deploy to prod-gcp
runs-on: ubuntu-20.04
steps:
- uses: actions/setup-node@v1
with:
node-version: "14"
- uses: actions/checkout@v2
- 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
- name: Restore cache
uses: actions/cache@v3
with:
path: "**/node_modules"
key: ${{ runner.os }}-prod-${{ github.sha }}
restore-keys: |
${{ runner.os }}-prod-
- name: Install dependencies
run: yarn
- name: build packages
run: |
yarn boot
yarn docgen
- name: Tests
run: yarn workspace aksel.nav.no test
- name: E2E
run: NEXT_PUBLIC_TEST=true yarn workspace website e2e
- name: Update sanity sync
run: yarn workspace aksel.nav.no sanity:update
- name: Build application
run: yarn workspace aksel.nav.no build:next
- name: Login to GitHub Container Registry
uses: docker/login-action@ab80d026d4753220c4243394c07c7d80f9638d06 # Use commit-sha1 instead of tag for security concerns
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- 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
- name: Push docker image
run: |
docker push ${{ env.DOCKER_TAG }}
- name: Deploy to prod-gcp
uses: nais/deploy/actions/deploy@master
env:
APIKEY: ${{ secrets.NAIS_DEPLOY_APIKEY }}
RESOURCE: aksel.nav.no/nais-prod.yaml
CLUSTER: prod-gcp
IMAGE: ${{ env.DOCKER_TAG }}
+41
View File
@@ -0,0 +1,41 @@
name: Redeploy image to for aksel.nav.no
on:
workflow_dispatch:
inputs:
tag:
description: "Docker image tag"
required: true
default: ""
dry:
description: "Dry-run"
required: true
default: "false"
env:
IMAGE: ghcr.io/navikt/designsystemet
jobs:
redeploy:
name: Redeploy image
runs-on: ubuntu-20.04
steps:
- uses: actions/setup-node@v1
with:
node-version: "14"
- uses: actions/checkout@v2
- name: Login to GitHub Container Registry
uses: docker/login-action@ab80d026d4753220c4243394c07c7d80f9638d06 # Use commit-sha1 instead of tag for security concerns
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Create docker image tag
run: echo "DOCKER_TAG=${{ env.IMAGE }}:${{ github.event.inputs.tag }}" >> $GITHUB_ENV
- name: Deploy to prod-gcp
uses: nais/deploy/actions/deploy@master
env:
APIKEY: ${{ secrets.NAIS_DEPLOY_APIKEY }}
RESOURCE: aksel.nav.no/nais-prod.yaml
CLUSTER: prod-gcp
IMAGE: ${{ env.DOCKER_TAG }}
DRY_RUN: ${{ github.event.inputs.dry }}
+38
View File
@@ -0,0 +1,38 @@
name: Backup sanity dateset to gcp
on:
workflow_dispatch:
schedule:
# 12.00 every 3 days
- cron: "0 0 */3 * *"
jobs:
execute:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 0 # Required to retrieve git history
- uses: actions/setup-node@v1
with:
node-version: 14
- name: Restore cache
uses: actions/cache@v3
with:
path: "**/node_modules"
key: ${{ runner.os }}-build-${{ github.sha }}
restore-keys: |
${{ runner.os }}-build-
- name: Install dependencies
run: cd aksel.nav.no/website && yarn
- name: Export dataset
run: cd aksel.nav.no/website && SANITY_TOKEN=${{secrets.SANITY_DATASET_EDITOR_TOKEN}} yarn backup
- name: Upload GCP bucket
uses: "google-github-actions/auth@v0"
with:
credentials_json: "${{ secrets.gcp_credentials_prod }}"
- uses: "google-github-actions/upload-cloud-storage@v0"
with:
path: ./aksel.nav.no/website
destination: "aksel-website-prod/backups"
glob: "backup-*.tar.gz"
-99
View File
@@ -1,99 +0,0 @@
# This workflow will run tests using node and then publish a package to GitHub Packages when a release is created
# For more information see: https://help.github.com/actions/language-and-framework-guides/publishing-nodejs-packages
name: Build -> Test -> Publish
on:
push:
branches: [master]
pull_request:
branches: [master]
workflow_dispatch:
jobs:
test-build:
if: "!contains(github.event.head_commit.message, '[ci skip]')"
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 0 # Required to retrieve git history
- uses: actions/setup-node@v1
with:
node-version: 14
- name: Node-modules cache
uses: actions/cache@v2
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: Boot
run: yarn boot
- name: Eslint and Stylelint
run: yarn lint
- name: Test
run: yarn test
publish-npm:
needs: test-build
runs-on: ubuntu-latest
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_AUTOMATION }}
if: github.event_name == 'push' && contains(github.event.head_commit.message, '[fix]') || contains(github.event.head_commit.message, '[feature]') || contains(github.event.head_commit.message, '[breaking]')
steps:
- uses: actions/checkout@v2
with:
fetch-depth: "0"
token: ${{secrets.GIT_REPO}}
- uses: actions/setup-node@v2
with:
registry-url: https://registry.npmjs.org
node-version: 14
- name: Node-modules cache
uses: actions/cache@v2
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 --frozen-lockfile
- name: Boot
run: yarn boot
- name: Generate docs
run: yarn docgen
- name: Setup github connection for auth
run: |
git config --global user.email "github-actions[bot]@users.noreply.github.com"
git config --global user.name "github-actions[bot]"
git remote set-url origin https://github-actions[bot]:$NAV_DS_TOKEN@github.com/$GITHUB_REPOSITORY.git
env:
NAV_DS_TOKEN: ${{secrets.GIT_REPO}}
- name: Update changed packages with PATCH
if: "contains(github.event.head_commit.message, '[fix]')"
run: yarn lerna version patch --include-merged-tags --yes
- name: Update changed packages with MINOR
if: "contains(github.event.head_commit.message, '[feature]')"
run: yarn lerna version minor --include-merged-tags --yes
- name: Update changed packages with MAJOR
if: "contains(github.event.head_commit.message, '[breaking]')"
run: yarn lerna version major --include-merged-tags --yes
- name: Publish to NPM registry
run: yarn lerna publish --no-verify-access from-package --yes
- name: Create a .npmrc file for the github package repository
uses: FerLuisxd/create-npmrc@3
with:
org_name: navikt
env:
AUTH_TOKEN: ${{secrets.GIT_REPO}}
- name: Publish to Github registry
run: |
yarn lerna publish --registry https://npm.pkg.github.com from-package --yes
+38 -55
View File
@@ -1,46 +1,58 @@
name: Chromatic
name: Visual Regression Tests
on:
push:
branches: [master]
branches:
- "master"
paths:
- "@navikt/**"
pull_request:
branches: [master]
branches: [master, next]
paths:
- "@navikt/**"
jobs:
chromatic-pr:
if: "!contains(github.event.head_commit.message, '[ci skip]') && github.event_name != 'push'"
visual_regression_test:
name: "visual regression test (chromatic)"
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
with:
fetch-depth: 0
- uses: actions/setup-node@v1
- uses: actions/setup-node@v3
with:
node-version: 14
- name: Node-modules cache
uses: actions/cache@v2
id: node-cache
node-version: 16.13.0
cache: yarn
- name: Restore cache
uses: actions/cache@v3
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: Boot
key: ${{ runner.os }}-visual-regression-test-${{ github.sha }}
restore-keys: |
${{ runner.os }}-visual-regression-test-
- name: Install dependencies
run: yarn
- name: Build packages
run: yarn boot
- name: run chromatic
- name: Chromatic
uses: chromaui/action@v1
id: chromatic_tests
continue-on-error: true
with:
autoAcceptChanges: "master"
token: ${{ secrets.GITHUB_TOKEN }}
projectToken: x3xqdfgkujg
exitZeroOnChanges: false
env:
STORYBOOK_GITHUB_SHA: ${{ github.sha }}
- name: replace storybook url
if: "!contains(github.event.head_commit.message, '[ci skip]') && github.event_name != 'push'"
uses: frabert/replace-string-action@v2.0
id: storybook_url
with:
@@ -49,12 +61,14 @@ jobs:
replace-with: ""
- name: Get commit sha
if: "!contains(github.event.head_commit.message, '[ci skip]') && github.event_name != 'push'"
id: vars
shell: bash
run: |
echo "::set-output name=sha_short::$(git rev-parse --short HEAD)"
- name: Find Comment
if: "!contains(github.event.head_commit.message, '[ci skip]') && github.event_name != 'push'"
uses: peter-evans/find-comment@v1
id: fc
with:
@@ -63,7 +77,7 @@ jobs:
body-includes: Chromatic build-output
- name: Create or update comment
if: steps.chromatic_tests.outcome == 'success'
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
with:
comment-id: ${{ steps.fc.outputs.comment-id }}
@@ -73,13 +87,13 @@ jobs:
- :clipboard: [Review](${{steps.chromatic_tests.outputs.url}})
- :tada: [Storybook preview](${{steps.storybook_url.outputs.replaced}})
- :white_check_mark: SUCCESS :white_check_mark:
- :white_check_mark: No changes detected :white_check_mark:
commit: `${{ steps.vars.outputs.sha_short }}`
edit-mode: replace
- name: Create or update failed comment
if: steps.chromatic_tests.outcome != 'success'
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
with:
comment-id: ${{ steps.fc.outputs.comment-id }}
@@ -89,38 +103,7 @@ jobs:
- :clipboard: [Review](${{steps.chromatic_tests.outputs.url}})
- :tada: [Storybook preview](${{steps.storybook_url.outputs.replaced}})
- :no_entry_sign: FAILED :no_entry_sign:, review endringer.
- :no_entry_sign: Changes detected :no_entry_sign:, review endringer.
commit: `${{ steps.vars.outputs.sha_short }}`
edit-mode: replace
chromatic-push:
if: "!contains(github.event.head_commit.message, '[ci skip]') && github.event_name == 'push'"
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 0
- uses: actions/setup-node@v1
with:
node-version: 14
- name: Node-modules cache
uses: actions/cache@v2
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: Boot
run: yarn boot
- name: run chromatic
uses: chromaui/action@v1
with:
token: ${{ secrets.GITHUB_TOKEN }}
projectToken: x3xqdfgkujg
autoAcceptChanges: true
+44
View File
@@ -0,0 +1,44 @@
name: CI
on:
push:
branches:
- master
- next
pull_request:
workflow_dispatch:
jobs:
build:
name: "Validate build"
if: "!contains(github.event.head_commit.message, '[ci skip]')"
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- uses: actions/setup-node@v3
with:
node-version: 16.13.0
cache: yarn
- name: Restore cache
uses: actions/cache@v3
with:
path: "**/node_modules"
key: ${{ runner.os }}-test-${{ github.sha }}
restore-keys: |
${{ runner.os }}-test
- name: Install dependencies
run: yarn
- name: Boot (build packages)
run: yarn boot
- name: Lint
run: yarn lint
- name: Test
run: yarn test
+71
View File
@@ -0,0 +1,71 @@
# 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: [master, next]
pull_request:
# The branches below must be a subset of the branches above
branches: [master]
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
+53
View File
@@ -0,0 +1,53 @@
name: E2E / Playwright Tests
on:
push:
branches: [master, next]
paths:
- "aksel.nav.no/**"
pull_request:
branches: [master, next]
paths:
- "aksel.nav.no/**"
jobs:
playwright:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 16
- 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
- name: Restore cache
uses: actions/cache@v3
with:
path: "**/node_modules"
key: ${{ runner.os }}-e2e-${{ github.sha }}
restore-keys: |
${{ runner.os }}-e2e-
- name: Install dependencies
run: yarn
- name: build packages
run: |
yarn boot
yarn docgen
- name: Install Playwright Browsers
run: npx playwright install --with-deps
- name: Run Playwright tests
run: yarn workspace website e2e:full
- uses: actions/upload-artifact@v3
if: always()
with:
name: playwright-report
path: aksel.nav.no/website/playwright-report/
retention-days: 10
+30
View File
@@ -0,0 +1,30 @@
name: "push-to-cdn"
on:
workflow_dispatch:
push:
branches:
- "master"
paths:
- "fonts/**"
jobs:
upload:
runs-on: ubuntu-latest
permissions:
contents: "read"
id-token: "write"
steps:
- uses: "actions/checkout@v3"
- id: upload
uses: navikt/frontend/actions/cdn-upload/v1@main
with:
cdn-team-name: aksel
source: ./fonts
destination: "" # uploads folder to team root
- run: echo uploaded file ${{ steps.upload.outputs.uploaded }}
shell: bash
+67
View File
@@ -0,0 +1,67 @@
name: Release
on:
push:
branches:
- master
workflow_dispatch:
concurrency: ${{ github.workflow }}-${{ github.ref }}
jobs:
build:
name: "Release packages"
if: "!contains(github.event.head_commit.message, '[ci skip]')"
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- uses: actions/setup-node@v3
with:
node-version: 16.13.0
cache: yarn
- name: Restore cache
uses: actions/cache@v3
with:
path: "**/node_modules"
key: ${{ runner.os }}-prod-${{ github.sha }}
restore-keys: |
${{ runner.os }}-prod
- name: Install dependencies
run: yarn
- name: Create release Pull Request or publish to NPM
id: changesets
uses: changesets/action@v1
with:
version: yarn version
publish: yarn release
env:
NPM_TOKEN: ${{ secrets.NPM_AUTOMATION }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NODE_AUTH_TOKEN: ${{ secrets.NPM_AUTOMATION }}
- name: Creating .npmrc
run: |
cat << EOF > "$HOME/.npmrc"
@navikt:registry=https://npm.pkg.github.com
//npm.pkg.github.com/:_authToken=$NPM_TOKEN
EOF
env:
NPM_TOKEN: ${{ secrets.GIT_REPO }}
- name: Publish to GPR
if: steps.changesets.outputs.published == 'true'
id: changesets-gpr
uses: changesets/action@v1
with:
publish: yarn changeset publish
createGithubReleases: false
env:
NPM_TOKEN: ${{ secrets.NPM_AUTOMATION }}
GITHUB_TOKEN: ${{ secrets.GIT_REPO }}
NODE_AUTH_TOKEN: ${{ secrets.NPM_AUTOMATION }}
+7 -7
View File
@@ -1,20 +1,20 @@
name: Update Icons
on:
# schedule:
# - cron: 0 0 * * *
# schedule:
# - cron: 0 0 * * *
workflow_dispatch:
jobs:
update:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v1
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 14
- name: Node-modules cache
uses: actions/cache@v2
uses: actions/cache@v3
id: node-cache
with:
path: "**/node_modules"
@@ -26,7 +26,7 @@ jobs:
if: steps.node-cache.outputs.cache-hit == 'true'
run: yarn postinstall
- name: Update Icons
run: yarn update:icons
run: yarn workspace @navikt/ds-icons update
env:
FIGMA_TOKEN: ${{ secrets.FIGMA_IKONER_API }}
- name: Create Pull Request
@@ -39,4 +39,4 @@ jobs:
author: ${{ github.actor }} <${{ github.actor }}@users.noreply.github.com>
signoff: false
delete-branch: true
title: "[FIX] Ikonsynk Figma"
title: "Ikonsynk Figma"
+5 -5
View File
@@ -7,12 +7,12 @@ jobs:
update:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v1
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 14
- name: Node-modules cache
uses: actions/cache@v2
uses: actions/cache@v3
id: node-cache
with:
path: "**/node_modules"
@@ -24,7 +24,7 @@ jobs:
if: steps.node-cache.outputs.cache-hit == 'true'
run: yarn postinstall
- name: Update tokens
run: yarn update:tokens
run: yarn workspace @navikt/ds-tokens update
env:
FIGMA_TOKEN: ${{ secrets.FIGMA_IKONER_API }}
- name: Create Pull Request
@@ -33,7 +33,7 @@ jobs:
token: ${{ secrets.GITHUB_TOKEN }}
branch: figma-tokens-sync
delete-branch: true
title: "[FEATURE] Tokens sync Figma"
title: "Tokens sync Figma"
commit-message: "Tokens synket fra figma"
committer: GitHub <noreply@github.com>
signoff: false
+28 -3
View File
@@ -107,8 +107,8 @@ utilities/**/css
*/static/*.zip
*/static/png
@navikt/core/icons/NAV-ikonpakke-png.zip
@navikt/core/icons/NAV-ikonpakke-svg.zip
@navikt/icons/NAV-ikonpakke-png.zip
@navikt/icons/NAV-ikonpakke-svg.zip
*/**/NAV-ikonpakke-png.zip
*/**/NAV-ikonpakke-svg.zip
@@ -116,6 +116,7 @@ react-docgen.json
react-docgen-docs.json
cjs
esm
@navikt/community/navno/css
.vercel
_docs.json
@@ -125,4 +126,28 @@ _docs.json
!.yarn/plugins
!.yarn/releases
!.yarn/sdks
!.yarn/versions
!.yarn/versions
*/icons/src
*/icons/png
*/core/icons
/storybook-static
# Aksel.nav.no
.next
!*/website/lib/
!*/website/public/
!aksel.nav.no/**/*.d.ts
!*/sanity/lib/
!*/sanity/static/
out
videos
sanity/scripts/renameField.js
tmp.json
/test-results/
/playwright-report/
/playwright/.cache/
playwright-report/
/test-results/
backup-*.tar.gz
sitemap-urls.json
*.tar.gz
+12 -6
View File
@@ -1,10 +1,12 @@
#!/bin/sh
#!/usr/bin/env sh
if [ -z "$husky_skip_init" ]; then
debug () {
[ "$HUSKY_DEBUG" = "1" ] && echo "husky (debug) - $1"
if [ "$HUSKY_DEBUG" = "1" ]; then
echo "husky (debug) - $1"
fi
}
readonly hook_name="$(basename "$0")"
readonly hook_name="$(basename -- "$0")"
debug "starting $hook_name..."
if [ "$HUSKY" = "0" ]; then
@@ -17,14 +19,18 @@ if [ -z "$husky_skip_init" ]; then
. ~/.huskyrc
fi
export readonly husky_skip_init=1
readonly husky_skip_init=1
export husky_skip_init
sh -e "$0" "$@"
exitCode="$?"
if [ $exitCode != 0 ]; then
echo "husky - $hook_name hook exited with code $exitCode (error)"
exit $exitCode
fi
exit 0
if [ $exitCode = 127 ]; then
echo "husky - command not found in PATH=$PATH"
fi
exit $exitCode
fi
+1 -1
View File
@@ -1,4 +1,4 @@
#!/bin/sh
. "$(dirname $0)/_/husky.sh"
yarn pretty-quick --staged
yarn pretty-quick --staged && yarn lint-staged
-4
View File
@@ -1,4 +0,0 @@
#!/bin/sh
. "$(dirname $0)/_/husky.sh"
yarn lint
+2
View File
@@ -0,0 +1,2 @@
**/nais-dev.yaml
**/nais-prod.yaml
-12
View File
@@ -1,12 +0,0 @@
import { Meta, Canvas } from "@storybook/addon-docs";
<Meta title="ds-react(deprecated)/intro" />
# Utdaterte pakker
På sikt vil komponentene under bli flyttet ut av ds-react eller erstattes av andre komponenter
- PageHeader -> @navikt/ds-react-navno
- MicroCard -> @navikt/ds-react-navno
- StepIndicator -> Horisontal `<Stepper />`
+4
View File
@@ -15,3 +15,7 @@
.rowgap[data-theme="dark"] {
background-color: #262626;
}
.rowgap-wrap {
flex-wrap: wrap;
}
+2 -1
View File
@@ -11,13 +11,14 @@ module.exports = {
};
return config;
},
staticDirs: ["./public"],
devServer: {
stats: "errors-only",
},
stories: () => [...getStories(), "./*.stories.mdx"],
addons: [
"@storybook/addon-docs",
"@storybook/addon-a11y",
"@whitespace/storybook-addon-html",
{
name: "@storybook/addon-storysource",
options: {
+6
View File
@@ -1,6 +1,12 @@
import { addons } from "@storybook/addons";
import NavTheme from "./theme.js";
/* import logoUrl from "./public/logo.svg"; */
addons.setConfig({
theme: NavTheme,
});
/* const link = document.createElement("link");
link.setAttribute("rel", "shortcut icon");
link.setAttribute("href", logoUrl);
document.head.appendChild(link); */
+38 -1
View File
@@ -7,10 +7,47 @@ export const parameters = {
options: {
storySort: {
method: "",
order: ["ds-icons", "ds-react", ["Default"]],
order: ["Intro", "ds-icons", "ds-react", ["form"], ["Default"]],
locales: "",
},
},
viewMode: "docs",
layout: "centered",
backgrounds: {
default: "Canvas",
values: [
{
name: "Canvas",
value: "#ffffff",
},
{
name: "Darkmode",
value: "#262626",
},
],
},
};
export const globalTypes = {
theme: {
name: "Theme",
description: "Global theme for components",
defaultValue: "light",
toolbar: {
icon: "circlehollow",
items: [
{ value: "light", icon: "circlehollow", title: "light" },
{ value: "dark", icon: "circle", title: "dark" },
],
showName: true,
},
},
};
export const withTheme = (StoryFn, context) => (
<div data-theme={context.parameters.theme || context.globals.theme} lang="no">
<StoryFn />
</div>
);
export const decorators = [withTheme];
+20
View File
@@ -0,0 +1,20 @@
<svg
xmlns="http://www.w3.org/2000/svg"
width="44"
height="44"
fill="none"
viewBox="0 0 44 44"
>
<path
fill="rgba(153, 196, 221, 1)"
fill-rule="evenodd"
d="M9.07 3.03A10.33 10.33 0 0 1 16.37 0h17.3C39.37 0 44 4.62 44 10.33v17.3c0 2.73-1.09 5.36-3.03 7.3l-6.04 6.04a10.33 10.33 0 0 1-7.3 3.03h-17.3C4.63 44 0 39.38 0 33.67v-17.3c0-2.73 1.09-5.36 3.03-7.3l6.04-6.04Z"
clip-rule="evenodd"
></path>
<path
fill="rgba(0, 36, 58, 1)"
fill-rule="evenodd"
d="M12.96 6.92a4.82 4.82 0 0 1 3.42-1.42h17.29a4.83 4.83 0 0 1 4.83 4.83v17.29a4.8 4.8 0 0 1-1.42 3.42l-.37.37-6.65 6.65a1.5 1.5 0 1 1-2.12-2.12l6.64-6.64v-.01c.72-.72.72-1.87 0-2.59L17.3 9.42a1.83 1.83 0 0 0-2.6 0l-6.64 6.64a1.5 1.5 0 1 1-2.12-2.12l7.02-7.02Zm22.54 3.41v13.05L20.62 8.5h13.05c1 0 1.83.82 1.83 1.83ZM20.06 26.06a1.5 1.5 0 0 0-2.12-2.12l-11 11a1.5 1.5 0 1 0 2.12 2.12l11-11Z"
clip-rule="evenodd"
></path>
</svg>

After

Width:  |  Height:  |  Size: 925 B

+17 -1
View File
@@ -1,6 +1,22 @@
import { create } from "@storybook/theming";
/* import logoUrl from "./public/logo.svg"; */
export default create({
/* brandImage: process.env.NODE_ENV === "production" ? logoUrl : "/logo.svg", */
base: "light",
brandTitle: "NAV Designsystem",
// 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",
});
+39
View File
@@ -0,0 +1,39 @@
import { Meta, Canvas } from "@storybook/addon-docs";
<Meta title="Intro/Velkommen" />
# Aksel, NAVs designsystem
- [Dokumentasjon](https://aksel.nav.no/designsystem)
- [Komponenter](https://aksel.nav.no/designsystem/side/oversikt-komponenter)
## Kom i gang
### Kjernepakke
```bash
yarn add @navikt/ds-react @navikt/ds-css
```
### Interne-flater
```bash
yarn add @navikt/ds-react-internal @navikt/ds-css-internal
```
### Ikonpakke
```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>;
```
+1
View File
@@ -6,6 +6,7 @@ module.exports = (baseConfig) => {
use: ["style-loader", "css-loader"],
include: [
path.resolve(__dirname, "../node_modules/@navikt/core/css/index.css"),
path.resolve(__dirname, "../node_modules/@navikt/internal/css/index.css"),
],
});
baseConfig.config.resolve.alias = {
+2
View File
@@ -1,3 +1,5 @@
enableImmutableInstalls: false
nodeLinker: node-modules
plugins:
+9
View File
@@ -0,0 +1,9 @@
*.d.ts
*.js
bin/*.js
*.js.map
!transforms/**/__testfixtures__/**/*.js
!transforms/**/tests/**/*.output.js
!transforms/**/tests/**/*.input.js
transforms/**/tests/**/*.test.js
!jest.config.js
+77
View File
@@ -0,0 +1,77 @@
# @navikt/ds-codemod
## 2.0.15
## 2.0.14
## 2.0.13
## 2.0.12
## 2.0.11
## 2.0.10
## 2.0.9
## 2.0.8
## 2.0.7
## 2.0.6
## 2.0.5
## 2.0.4
## 2.0.3
## 2.0.2
## 2.0.1
## 2.0.0
### Major Changes
- [`6b96e4833`](https://github.com/navikt/Designsystemet/commit/6b96e48330c2e013a1acee85cefccd9ccc1aece4) Thanks [@KenAJoh](https://github.com/KenAJoh)! - v2: Tokens update and font-loading
## 1.5.10
## 1.5.9
## 1.5.8
## 1.5.7
## 1.5.6
## 1.5.5
## 1.5.4
## 1.5.3
## 1.5.2
## 1.5.1
## 1.5.0
## 1.4.4
## 1.4.3
## 1.4.2
## 1.4.1
## 1.4.0
## 1.3.39
### Patch Changes
- [`40f0b3340`](https://github.com/navikt/Designsystemet/commit/40f0b3340d01bf85fecc04f2f3a8e8b2acf996f1) Thanks [@KenAJoh](https://github.com/KenAJoh)! - Bump for latest-tag
## 1.3.38
+170
View File
@@ -0,0 +1,170 @@
# Aksel Codemods
Collection of Codemods for easier migration between breaking changes in NAVs designsystem-packages.
## Usage
Codemod runs code-transformations programmatically in your project. This helps when migrating breaking changes without spending hours doing it manually.
NOTE: This codemod only supports fairly "default" usage of components. Components used with dynamic imports, styled-components, non-default imports (ex `import * as DS from "@navikt/ds-react"` or `from "@navikt/ds-react/cjs"`) can lead to bugs when using codemod.
```javascript
npx @navikt/ds-codemod <migration> <path>
```
migraton - name of migraton, see available migraton below.
path - files or directory to transform
```sh
--dry Do a dry-run, no code will be edited
--print Prints the changed output for comparison
--force Runs even if there are uncommited changes (use with caution)
```
## V1 -> V2
V2.0.0 updated the token-prefix of all tokens + names of all semantic-colors. The migrations below helps when migrating from the formats css, scss, less and js.
### css-tokens (--navds format)
`npx @navikt/ds-codemod v2/css src`
When having redefined a token, you will need to manually find and replace these instances after the codemod-run. A global search for `--v2-migration__` will show all found instances where you had redefined a token.
```diff
.example{
- color: var(--navds-global-color-gray-900);
+ color: var(--a-gray-900);
- --navds-semantic-color-text: red;
+ --v2-migration__navds-semantic-color-text: red;
}
```
### sass/scss-tokens ($navds format)
`npx @navikt/ds-codemod v2/sass src`
```diff
.example{
- color: $navds-global-color-gray-900;
+ color: $a-gray-900;
}
```
### less-tokens (@navds format)
`npx @navikt/ds-codemod v2/less src`
```diff
.example{
- color: @navds-global-color-gray-900;
+ color: @a-gray-900;
}
```
### js-tokens
`npx @navikt/ds-codemod v2/js src`
```diff
- import { NavdsGlobalColorGray900 } from "@navikt/ds-tokens";
+ import { AGray900 } from "@navikt/ds-tokens";
const styled = styled.p`
- color: ${NavdsGlobalColorGray900};
+ color: ${AGray900};
`
```
## Beta (0.19.x) -> v1
`npx @navikt/ds-codemod v1/preset src`
### preset
Combines all avaliable codemods for migrating from beta -> v1. This transform should only be ran once.
Includes these transforms
- v1/tabs
- v1/chat
- v1/pagination
### tabs
`npx @navikt/ds-codemod v1/tabs src`
```diff
<Tabs
defaultValue="logg"
onChange={(x) => console.log(x)}
- loop
+ iconPosition="left"
>
<Tabs.List
- loop
>
<Tabs.Tab
value="logg"
label="logg"
- iconPosition="left"
/>
</Tabs.List>
<Tabs.Panel value="logg">TabPanel for Logg-tab</Tabs.Panel>
</Tabs>
```
### chat
`npx @navikt/ds-codemodmod v1/chat src`
```diff
-<SpeechBubble
+<Chat
- illustration={<Illustration />}
- topText="Ola Normann 01.01.21 14:00"
- illustrationBgColor="blue"
+ avatar={<Illustration />}
+ name="Ola Normann 01.01.21 14:00"
+ avatarBgColor="blue"
backgroundColor="red"
>
- <SpeechBubble.Bubble>
+ <Chat.Bubble>
Aute minim nisi sunt mollit duis sunt nulla minim non proident.
- </SpeechBubble.Bubble>
+ </Chat.Bubble>
-</SpeechBubble>
+</Chat>
```
### pagination
`npx @navikt/ds-codemod v1/pagination src`
This codemod should only be ran once, since the size-scale will keep decreasing for each subsequent iteration.
```diff
-<Pagiation />
+<Pagiation size="small"/>
-<Pagiation size="medium"/>
+<Pagiation size="small"/>
-<Pagiation size="small"/>
+<Pagiation size="xsmall"/>
```
## License
[MIT](https://github.com/navikt/Designsystemet/blob/master/LICENCE)
#
Inspired by both MUI and NEXT
- [NEXT](https://nextjs.org/docs/advanced-features/codemods)
- [MUI](https://github.com/mui/material-ui/tree/master/packages/mui-codemod)
+36
View File
@@ -0,0 +1,36 @@
import meow, { AnyFlags } from "meow";
import { migrate } from "./migrate";
import { cliConfig } from "./config";
const help = `
Usage
$ npx @navikt/ds-codemod ${cliConfig.args
.map((arg) => `<${arg.name}>`)
.join(" ")}
${cliConfig.args.map((arg) => `${arg.name}\t${arg.description}`).join("\n ")}
Options
${Object.entries(cliConfig.flags)
.map(([name, val]: [string, any]) => `--${name}\t${val.description}`)
.join("\n ")}
`;
const { input, flags } = meow({
description: cliConfig.description,
flags: Object.fromEntries(
Object.entries(cliConfig.flags).map(
([name, flag]: [string, any]): [string, AnyFlags] => [
name,
{
alias: flag.alias,
type: flag.type,
},
]
)
),
help,
});
export async function run() {
await migrate(input[0], input[1], flags);
}
+37
View File
@@ -0,0 +1,37 @@
const createCLIConfig = (config: any) => config;
export const cliConfig = createCLIConfig({
description: "Migrations for NAV designsystem solutions",
args: [
{
name: "migration",
description:
"One of the choices from https://github.com/navikt/Designsystemet/blob/master/%40navikt/codemod/README.md",
},
{
name: "path",
description:
"Files or directory to transform. Can be a glob like src/**.css",
},
],
flags: {
dry: {
alias: "d",
description: "Dry run, no changes will be made to files",
type: "boolean",
},
print: {
alias: "p",
description: "Print transformed files",
type: "boolean",
},
force: {
alias: "f",
description: "Forcibly run migrations without checking git-changes",
type: "boolean",
},
},
});
export const DS_MIGRATION_COMMENT =
"ds-codemod: Unable to migrate the following expression. Please upgrade manually.";
+5
View File
@@ -0,0 +1,5 @@
#!/usr/bin/env node
const { run } = require("./cli");
run();
+140
View File
@@ -0,0 +1,140 @@
import fs from "fs";
import path from "path";
import * as jscodeshift from "jscodeshift/src/Runner";
import chalk from "chalk";
import isGitClean from "is-git-clean";
import globby from "globby";
export interface MigrateOptions {
dry?: boolean;
print?: boolean;
force?: boolean;
}
const migrationsMap = [
{
name: "v1/preset: Runs all codemods for beta to v1 migration",
value: "v1/preset",
path: "v1.0.0/preset",
},
{
name: "v1/pagination: Fixes breaking API-changes from <Pagination /> component",
value: "v1/pagination",
path: "v1.0.0/pagination",
},
{
name: "v1/tabs: Fixes breaking API-changes from <Tabs /> component",
value: "v1/tabs",
path: "v1.0.0/tabs",
},
{
name: "v1/chat: Fixes breaking API-changes from <SpeechBubble /> (now <Chat/>) component",
value: "v1/chat",
path: "v1.0.0/chat",
},
{
name: "v2/css: Fixes css-variables",
value: "v2/css",
path: "v2.0.0/update-css-tokens/update-css-tokens",
},
{
name: "v2/js: Fixes js-variables",
value: "v2/js",
path: "v2.0.0/update-js-tokens/update-js-tokens",
},
{
name: "v2/sass: Fixes sass-variables",
value: "v2/sass",
path: "v2.0.0/update-sass-tokens/update-sass-tokens",
},
{
name: "v2/less: Fixes less-variables",
value: "v2/less",
path: "v2.0.0/update-less-tokens/update-less-tokens",
},
];
export async function migrate(
migration: string,
files: string,
options: MigrateOptions = {}
) {
const foundMigration = migrationsMap.find((x) => x.value === migration);
const migrationFile = path.join(
__dirname,
`../transforms/${foundMigration.path}.js`
);
try {
if (!fs.existsSync(migrationFile)) {
throw new Error(`No migration found for ${migration}`);
}
if (!files) throw new Error(`No path provided for migration`);
if (!options.dry) {
checkGitStatus(options.force);
}
const filepaths = globby.sync(files, { cwd: process.cwd() });
if (filepaths.length === 0) {
throw new Error(`No files found for ${files}`);
}
// eslint-disable-next-line no-console
console.log(chalk.green("Running migration:"), migration);
await jscodeshift.run(migrationFile, filepaths, {
babel: true,
ignorePattern: [
"**/node_modules/**",
"**/.next/**",
"**/build/**",
"**/dist/**",
],
extensions: "tsx,ts,jsx,js",
parser: "tsx",
verbose: 2,
runInBand: true,
silent: false,
stdin: false,
...options,
});
} catch (error) {
console.error(error);
process.exit(1);
}
}
export function checkGitStatus(force?: boolean) {
let clean = false;
let errorMessage = "Unable to determine if git directory is clean";
try {
clean = isGitClean.sync(process.cwd());
errorMessage = "Git directory is not clean";
} catch (err: any) {
if (err && err.stderr && err.stderr.indexOf("Not a git repository") >= 0) {
clean = true;
}
}
if (!clean) {
/* eslint-disable no-console */
if (force) {
console.log(`WARNING: ${errorMessage}. Forcibly continuing.`);
} else {
console.log("Thank you for using @navikt/ds-codemod!");
console.log(
chalk.yellow(
"\nBut before we continue, please stash or commit your git changes."
)
);
console.log(
"\nYou may use the --force flag to override this safety check."
);
process.exit(1);
}
}
}
+10
View File
@@ -0,0 +1,10 @@
import { deleteSync } from "del";
deleteSync([
"utils/**/*.js",
"bin/**/*.js",
"transforms/**/*.js",
"!transforms/**/__testfixtures__",
"!transforms/**/tests/*.input.*",
"!transforms/**/tests/*.output.*",
]);
+8
View File
@@ -0,0 +1,8 @@
const customJestConfig = {
testMatch: ["**/__tests__/**/*.js", "**/tests/*.test.js"],
verbose: true,
rootDir: "./transforms",
};
// createJestConfig is exported in this way to ensure that next/jest can load the Next.js config which is async
module.exports = customJestConfig;
+64
View File
@@ -0,0 +1,64 @@
{
"name": "@navikt/ds-codemod",
"version": "2.0.15",
"description": "Aksel codemods for NAVs designsystem",
"author": "Aksel | NAV designsystem team",
"license": "MIT",
"keywords": [
"react",
"codemod",
"jscodeshift"
],
"files": [
"transforms/**/*.js",
"utils/**/*.js",
"bin/*.js",
"lib/**/*.js",
"lib/cra-to-next/gitignore",
"tokens-map.mjs"
],
"scripts": {
"build": "yarn clean && tsc -p tsconfig.json",
"dev": "yarn clean && tsc --watch -p tsconfig.json",
"start": "./bin/cli.js",
"test": "yarn build && jest",
"test:watch": "jest --watch",
"clean": "node clean.mjs"
},
"bin": "./bin/ds-codemod.js",
"repository": {
"type": "git",
"url": "git+https://github.com/navikt/Designsystemet.git",
"directory": "@navikt/codemod"
},
"homepage": "https://github.com/navikt/Designsystemet/tree/master/@navikt/codemod",
"dependencies": {
"chalk": "4.1.0",
"cheerio": "1.0.0-rc.9",
"execa": "4.0.3",
"globby": "11.0.1",
"inquirer": "7.3.3",
"is-git-clean": "1.1.0",
"jest": "^29.0.0",
"jscodeshift": "0.13.1",
"jscodeshift-add-imports": "1.0.10",
"lodash": "4.17.21",
"meow": "7.0.1",
"prettier": "2.7.1"
},
"devDependencies": {
"@babel/preset-env": "^7.0.0",
"@types/jest": "^29.0.0",
"@types/jscodeshift": "0.11.5",
"@types/react": "^18.0.0",
"del": "7.0.0",
"typescript": "^4.8.0"
},
"sideEffects": false,
"engines": {
"node": ">=12.0.0"
},
"publishConfig": {
"access": "public"
}
}
+368
View File
@@ -0,0 +1,368 @@
/* prettier-ignore */
const tokens = [
["--navds-semantic-color-text-inverted", "--a-text-on-inverted"],
["--navds-semantic-color-text-muted", "--a-text-subtle"],
["--navds-semantic-color-text", "--a-text-default"],
["--navds-semantic-color-feedback-danger-text", "--a-text-danger"],
["--navds-semantic-color-link-visited", "--a-text-visited"],
["--navds-semantic-color-link", "--a-text-action"],
["--navds-spacing-32", "--a-spacing-32"],
["--navds-spacing-24", "--a-spacing-24"],
["--navds-spacing-20", "--a-spacing-20"],
["--navds-spacing-18", "--a-spacing-18"],
["--navds-spacing-16", "--a-spacing-16"],
["--navds-spacing-14", "--a-spacing-14"],
["--navds-spacing-12", "--a-spacing-12"],
["--navds-spacing-11", "--a-spacing-11"],
["--navds-spacing-10", "--a-spacing-10"],
["--navds-spacing-9", "--a-spacing-9"],
["--navds-spacing-8", "--a-spacing-8"],
["--navds-spacing-7", "--a-spacing-7"],
["--navds-spacing-6", "--a-spacing-6"],
["--navds-spacing-5", "--a-spacing-5"],
["--navds-spacing-4", "--a-spacing-4"],
["--navds-spacing-3", "--a-spacing-3"],
["--navds-spacing-2", "--a-spacing-2"],
["--navds-spacing-1", "--a-spacing-1"],
["--navds-global-color-purple-900", "--a-purple-900"],
["--navds-global-color-purple-800", "--a-purple-800"],
["--navds-global-color-purple-700", "--a-purple-700"],
["--navds-global-color-purple-600", "--a-purple-600"],
["--navds-global-color-purple-500", "--a-purple-500"],
["--navds-global-color-purple-400", "--a-purple-400"],
["--navds-global-color-purple-300", "--a-purple-300"],
["--navds-global-color-purple-200", "--a-purple-200"],
["--navds-global-color-purple-100", "--a-purple-100"],
["--navds-global-color-purple-50", "--a-purple-50"],
["--navds-global-color-orange-900", "--a-orange-900"],
["--navds-global-color-orange-800", "--a-orange-800"],
["--navds-global-color-orange-700", "--a-orange-700"],
["--navds-global-color-orange-600", "--a-orange-600"],
["--navds-global-color-orange-500", "--a-orange-500"],
["--navds-global-color-orange-400", "--a-orange-400"],
["--navds-global-color-orange-300", "--a-orange-300"],
["--navds-global-color-orange-200", "--a-orange-200"],
["--navds-global-color-orange-100", "--a-orange-100"],
["--navds-global-color-orange-50", "--a-orange-50"],
["--navds-global-color-limegreen-900", "--a-limegreen-900"],
["--navds-global-color-limegreen-800", "--a-limegreen-800"],
["--navds-global-color-limegreen-700", "--a-limegreen-700"],
["--navds-global-color-limegreen-600", "--a-limegreen-600"],
["--navds-global-color-limegreen-500", "--a-limegreen-500"],
["--navds-global-color-limegreen-400", "--a-limegreen-400"],
["--navds-global-color-limegreen-300", "--a-limegreen-300"],
["--navds-global-color-limegreen-200", "--a-limegreen-200"],
["--navds-global-color-limegreen-100", "--a-limegreen-100"],
["--navds-global-color-limegreen-50", "--a-limegreen-50"],
["--navds-global-color-lightblue-900", "--a-lightblue-900"],
["--navds-global-color-lightblue-800", "--a-lightblue-800"],
["--navds-global-color-lightblue-700", "--a-lightblue-700"],
["--navds-global-color-lightblue-600", "--a-lightblue-600"],
["--navds-global-color-lightblue-500", "--a-lightblue-500"],
["--navds-global-color-lightblue-400", "--a-lightblue-400"],
["--navds-global-color-lightblue-300", "--a-lightblue-300"],
["--navds-global-color-lightblue-200", "--a-lightblue-200"],
["--navds-global-color-lightblue-100", "--a-lightblue-100"],
["--navds-global-color-lightblue-50", "--a-lightblue-50"],
["--navds-global-color-green-900", "--a-green-900"],
["--navds-global-color-green-800", "--a-green-800"],
["--navds-global-color-green-700", "--a-green-700"],
["--navds-global-color-green-600", "--a-green-600"],
["--navds-global-color-green-500", "--a-green-500"],
["--navds-global-color-green-400", "--a-green-400"],
["--navds-global-color-green-300", "--a-green-300"],
["--navds-global-color-green-200", "--a-green-200"],
["--navds-global-color-green-100", "--a-green-100"],
["--navds-global-color-green-50", "--a-green-50"],
["--navds-global-color-deepblue-900", "--a-deepblue-900"],
["--navds-global-color-deepblue-800", "--a-deepblue-800"],
["--navds-global-color-deepblue-700", "--a-deepblue-700"],
["--navds-global-color-deepblue-600", "--a-deepblue-600"],
["--navds-global-color-deepblue-500", "--a-deepblue-500"],
["--navds-global-color-deepblue-400", "--a-deepblue-400"],
["--navds-global-color-deepblue-300", "--a-deepblue-300"],
["--navds-global-color-deepblue-200", "--a-deepblue-200"],
["--navds-global-color-deepblue-100", "--a-deepblue-100"],
["--navds-global-color-deepblue-50", "--a-deepblue-50"],
["--navds-global-color-red-900", "--a-red-900"],
["--navds-global-color-red-800", "--a-red-800"],
["--navds-global-color-red-700", "--a-red-700"],
["--navds-global-color-red-600", "--a-red-600"],
["--navds-global-color-red-500", "--a-red-500"],
["--navds-global-color-red-400", "--a-red-400"],
["--navds-global-color-red-300", "--a-red-300"],
["--navds-global-color-red-200", "--a-red-200"],
["--navds-global-color-red-100", "--a-red-100"],
["--navds-global-color-red-50", "--a-red-50"],
["--navds-global-color-blue-900", "--a-blue-900"],
["--navds-global-color-blue-800", "--a-blue-800"],
["--navds-global-color-blue-700", "--a-blue-700"],
["--navds-global-color-blue-600", "--a-blue-600"],
["--navds-global-color-blue-500", "--a-blue-500"],
["--navds-global-color-blue-400", "--a-blue-400"],
["--navds-global-color-blue-300", "--a-blue-300"],
["--navds-global-color-blue-200", "--a-blue-200"],
["--navds-global-color-blue-100", "--a-blue-100"],
["--navds-global-color-blue-50", "--a-blue-50"],
["--navds-global-color-gray-900", "--a-gray-900"],
["--navds-global-color-gray-800", "--a-gray-800"],
["--navds-global-color-gray-700", "--a-gray-700"],
["--navds-global-color-gray-600", "--a-gray-600"],
["--navds-global-color-gray-500", "--a-gray-500"],
["--navds-global-color-gray-400", "--a-gray-400"],
["--navds-global-color-gray-300", "--a-gray-300"],
["--navds-global-color-gray-200", "--a-gray-200"],
["--navds-global-color-gray-100", "--a-gray-100"],
["--navds-global-color-gray-50", "--a-gray-50"],
["--navds-global-color-nav-red", "--a-nav-red"],
["--navds-global-color-white", "--a-white"],
["--navds-global-color-transparent", "--a-transparent"],
["--navds-border-radius-full", "--a-border-radius-full"],
["--navds-border-radius-xlarge", "--a-border-radius-xlarge"],
["--navds-border-radius-large", "--a-border-radius-large"],
["--navds-border-radius-medium", "--a-border-radius-medium"],
["--navds-border-radius-small", "--a-border-radius-small"],
["--navds-z-index-tooltip", "--a-z-index-tooltip"],
["--navds-z-index-focus", "--a-z-index-focus"],
["--navds-z-index-popover", "--a-z-index-popover"],
["--navds-z-index-modal", "--a-z-index-modal"],
["--navds-font-weight-regular", "--a-font-weight-regular"],
["--navds-font-weight-bold", "--a-font-weight-bold"],
["--navds-font-size-small", "--a-font-size-small"],
["--navds-font-size-medium", "--a-font-size-medium"],
["--navds-font-size-large", "--a-font-size-large"],
["--navds-font-size-xlarge", "--a-font-size-xlarge"],
["--navds-font-size-heading-xsmall", "--a-font-size-heading-xsmall"],
["--navds-font-size-heading-small", "--a-font-size-heading-small"],
["--navds-font-size-heading-medium", "--a-font-size-heading-medium"],
["--navds-font-size-heading-large", "--a-font-size-heading-large"],
["--navds-font-size-heading-xlarge", "--a-font-size-heading-xlarge"],
["--navds-font-size-heading-2xlarge", "--a-font-size-heading-2xlarge"],
["--navds-font-line-height-medium", "--a-font-line-height-medium"],
["--navds-font-line-height-large", "--a-font-line-height-large"],
["--navds-font-line-height-xlarge", "--a-font-line-height-xlarge"],
["--navds-font-line-height-heading-xsmall","--a-font-line-height-heading-xsmall"],
["--navds-font-line-height-heading-small","--a-font-line-height-heading-small"],
["--navds-font-line-height-heading-medium","--a-font-line-height-heading-medium"],
["--navds-font-line-height-heading-large","--a-font-line-height-heading-large"],
["--navds-font-line-height-heading-xlarge","--a-font-line-height-heading-xlarge"],
["--navds-font-line-height-heading-2xlarge","--a-font-line-height-heading-2xlarge"],
["--navds-font-family", "--a-font-family"],
["--navds-semantic-color-feedback-info-icon", "--a-icon-info"],
["--navds-semantic-color-feedback-warning-icon", "--a-icon-warning"],
["--navds-semantic-color-feedback-danger-icon", "--a-icon-danger"],
["--navds-semantic-color-feedback-success-icon", "--a-icon-success"],
["--navds-semantic-color-feedback-info-background", "--a-surface-info-subtle"],
["--navds-semantic-color-feedback-warning-background", "--a-surface-warning-subtle"],
["--navds-semantic-color-interaction-danger-selected", "--a-surface-danger-active"],
["--navds-semantic-color-interaction-danger-hover", "--a-surface-danger-hover"],
["--navds-semantic-color-interaction-danger", "--a-surface-danger"],
["--navds-semantic-color-feedback-danger-background", "--a-surface-danger-subtle"],
["--navds-semantic-color-feedback-success-background", "--a-surface-success-subtle"],
["--navds-semantic-color-interaction-primary-hover-subtle","--a-surface-action-subtle-hover"],
["--navds-semantic-color-interaction-primary-selected","--a-surface-action-selected"],
["--navds-semantic-color-interaction-primary-hover","--a-surface-action-hover"],
["--navds-semantic-color-interaction-primary", "--a-surface-action"],
["--navds-semantic-color-canvas-background-inverted", "--a-surface-inverted"],
["--navds-semantic-color-component-background-inverted", "--a-surface-inverted"],
["--navds-semantic-color-component-background-alternate", "--a-surface-subtle"],
["--navds-semantic-color-component-background-light", "--a-surface-default"],
["--navds-semantic-color-canvas-background-light", "--a-bg-default"],
["--navds-semantic-color-canvas-background", "--a-bg-subtle"],
["--navds-semantic-color-border-inverted", "--a-border-on-inverted"],
["--navds-semantic-color-border-muted", "--a-border-default"],
["--navds-semantic-color-border", "--a-border-strong"],
["--navds-semantic-color-focus-inverted", "--a-border-focus-on-inverted"],
["--navds-semantic-color-focus", "--a-border-focus"],
["--navds-semantic-color-feedback-info-border", "--a-border-info"],
["--navds-semantic-color-feedback-warning-border", "--a-border-warning"],
["--navds-semantic-color-feedback-danger-border", "--a-border-danger"],
["--navds-semantic-color-feedback-success-border", "--a-border-success"],
["--navds-semantic-color-divider", "--a-border-divider"],
["--navds-shadow-focus-inverted", "--a-shadow-focus-inverted"],
["--navds-shadow-focus", "--a-shadow-focus"],
["--navds-shadow-xsmall", "--a-shadow-xsmall"],
["--navds-shadow-small", "--a-shadow-small"],
["--navds-shadow-medium", "--a-shadow-medium"],
["--navds-shadow-large", "--a-shadow-large"],
["--navds-shadow-xlarge", "--a-shadow-xlarge"],
/* Components */
["--navds-modal-color-overlay", "--a-surface-backdrop"],
["--navds-accordion-color-border", "--a-border-strong"],
["--navds-accordion-color-text-hover", "--a-surface-action"],
["--navds-accordion-color-border-hover", "--a-surface-action"],
["--navds-accordion-color-background-open", "--a-surface-action-subtle"],
["--navds-alert-color-error-border", "--a-border-danger"],
["--navds-alert-color-error-background", "--a-surface-danger-subtle"],
["--navds-alert-color-warning-border", "--a-border-warning"],
["--navds-alert-color-warning-background", "--a-surface-warning-subtle"],
["--navds-alert-color-info-border", "--a-border-info"],
["--navds-alert-color-info-background", "--a-surface-info-subtle"],
["--navds-alert-color-success-border", "--a-border-success"],
["--navds-alert-color-success-background", "--a-surface-success-subtle"],
["--navds-alert-color-border", "--a-border-default"],
["--navds-chat-color-avatar-background", "--a-bg-subtle"],
["--navds-chat-color-background", "--a-bg-subtle"],
["--navds-chat-color-avatar", "--a-text-default"],
["--navds-guide-panel-color-illustration-background", "--a-surface-action-subtle"],
["--navds-guide-panel-color-background", "--a-surface-default"],
["--navds-guide-panel-color-border", "--a-border-action"],
["--navds-error-summary-color-background", "--a-surface-default"],
["--navds-error-summary-color-border", "--a-border-danger"],
["--navds-confirmation-panel-color-background-checked", "--a-surface-success-subtle"],
["--navds-confirmation-panel-color-background-error", "--a-surface-danger-subtle"],
["--navds-confirmation-panel-color-border-checked", "--a-border-success"],
["--navds-confirmation-panel-color-border-error", "--a-border-danger"],
["--navds-confirmation-panel-color-background", "--a-surface-warning-subtle"],
["--navds-confirmation-panel-color-border", "--a-border-warning"],
["--navds-radio-checkbox-color-background-hover", "--a-surface-action-subtle"],
["--navds-radio-checkbox-color-background-checked", "--a-surface-action"],
["--navds-radio-checkbox-color-shadow-hover", "--a-surface-action"],
["--navds-radio-checkbox-color-shadow-checked", "--a-surface-action"],
["--navds-radio-checkbox-color-shadow-error", "--a-surface-danger"],
["--navds-radio-checkbox-color-label-hover", "--a-surface-action"],
["--navds-radio-checkbox-color-background", "--a-surface-default"],
["--navds-radio-checkbox-color-text", "--a-text-default"],
["--navds-radio-checkbox-color-shadow", "--a-border-strong"],
["--navds-select-color-border-hover", "--a-surface-action"],
["--navds-select-color-border-error", "--a-surface-danger"],
["--navds-select-color-shadow-error", "--a-surface-danger"],
["--navds-select-color-border-disabled","--a-gray-400"],
["--navds-select-color-background-disabled", "--a-surface-subtle"],
["--navds-switch-color-label-hover", "--a-surface-action"],
["--navds-select-color-background", "--a-surface-default"],
["--navds-select-color-border", "--a-border-strong"],
["--navds-switch-color-label", "--a-text-default"],
["--navds-switch-color-track-background-hover-checked", "--a-icon-success"],
["--navds-switch-color-track-shadow-inner-focus", "--a-surface-default"],
["--navds-switch-color-track-background-checked", "--a-border-success"],
["--navds-switch-color-track-background-hover", "--a-surface-neutral-hover"],
["--navds-switch-color-track-background", "--a-surface-neutral"],
["--navds-switch-color-thumb-icon-checked", "--a-border-success"],
["--navds-switch-color-thumb-loader-checked", "--a-border-success"],
["--navds-switch-color-thumb-icon", "--a-icon-subtle"],
["--navds-switch-color-thumb", "--a-surface-default"],
["--navds-textarea-color-counter-text-error", "--a-surface-danger"],
["--navds-textarea-color-border-hover", "--a-surface-action"],
["--navds-textarea-color-border-error", "--a-surface-danger"],
["--navds-textarea-color-shadow-error", "--a-surface-danger"],
["--navds-textarea-color-counter-text", "--a-text-subtle"],
["--navds-textarea-color-text-disabled", "--a-text-default"],
["--navds-textarea-color-border-disabled", "--a-gray-400"],
["--navds-textarea-color-background-disabled", "--a-surface-subtle"],
["--navds-textarea-color-background", "--a-surface-default"],
["--navds-textarea-color-border", "--a-border-strong"],
["--navds-help-text-color-popover-background", "--a-surface-info-subtle"],
["--navds-help-text-color-background-hover", "--a-surface-action"],
["--navds-help-text-color-background-focus", "--a-surface-action"],
["--navds-help-text-color-shadow-hover", "--a-surface-action"],
["--navds-help-text-color-hover", "--a-surface-default"],
["--navds-help-text-color-focus", "--a-surface-default"],
["--navds-help-text-color", "--a-surface-action"],
["--navds-link-color-text-focus", "--a-text-on-action"],
["--navds-link-color-text-active", "--a-text-on-action"],
["--navds-link-color-text", "--a-text-action"],
["--navds-link-color-icon", "--a-icon-action"],
["--navds-link-color-icon-focus", "--a-icon-on-action"],
["--navds-link-color-background-focus", "--a-border-focus"],
["--navds-link-color-background-active", "--a-border-focus"],
["--navds-link-color-on-info-background", "--a-text-default"],
["--navds-link-color-on-error-background", "--a-text-default"],
["--navds-loader-color-neutral-foreground", "--a-border-default"],
["--navds-loader-color-interaction-foreground", "--a-surface-action"],
["--navds-loader-color-inverted-foreground", "--a-surface-default"],
["--navds-loader-color-transparent-background", "--a-surface-transparent"],
["--navds-loader-color-foreground", "--a-border-default"],
["--navds-loader-color-background", "--a-surface-active"],
["--navds-modal-color-background", "--a-surface-default"],
["--navds-pagination-color-text-selected", "--a-text-on-action"],
["--navds-pagination-color-background-selected", "--a-surface-action-selected"],
["--navds-popover-color-background", "--a-surface-default"],
["--navds-popover-color-border", "--a-border-default"],
["--navds-tag-color-info-background", "--a-surface-info-subtle"],
["--navds-tag-color-info-border", "--a-border-info"],
["--navds-tag-color-warning-background", "--a-surface-warning-subtle"],
["--navds-tag-color-warning-border", "--a-border-warning"],
["--navds-tag-color-success-background", "--a-surface-success-subtle"],
["--navds-tag-color-success-border", "--a-border-success"],
["--navds-tag-color-error-background", "--a-surface-danger-subtle"],
["--navds-tag-color-error-border", "--a-border-danger"],
["--navds-tag-color-border", "--a-border-default"],
["--navds-tag-color-background", "--a-surface-subtle"],
["--navds-toggle-group-color-background-hover", "--a-surface-action-subtle"],
["--navds-toggle-group-color-text-hover", "--a-surface-action"],
["--navds-toggle-group-color-background-pressed", "--a-surface-action-selected"],
["--navds-toggle-group-color-text-pressed", "--a-text-on-action"],
["--navds-toggle-group-color-background", "--a-surface-default"],
["--navds-toggle-group-color-text", "--a-text-default"],
["--navds-toggle-group-color-border", "--a-border-divider"],
["--navds-panel-color-background", "--a-surface-default"],
["--navds-panel-color-border", "--a-border-default"],
["--navds-link-panel-color-border-hover", "--a-surface-action"],
["--navds-link-panel-color-title-hover", "--a-text-action"],
["--navds-link-panel-color-text", "--a-text-default"],
["--navds-table-row-color-background-selected-hover", "--a-surface-action-subtle-hover"],
["--navds-table-row-color-background-hover", "--a-bg-subtle"],
["--navds-table-row-color-background-selected", "--a-surface-action-subtle"],
["--navds-table-row-color-background-zebra", "--a-surface-subtle"],
["--navds-table-cell-color-border-hover", "--a-border-strong"],
["--navds-table-cell-color-border", "--a-border-default"],
["--navds-button-color-primary-background-hover", "--a-surface-action-hover"],
["--navds-button-color-primary-background-active", "--a-surface-action-active"],
["--navds-button-color-primary-border-focus", "--a-surface-default"],
["--navds-button-color-primary-text", "--a-text-on-action"],
["--navds-button-color-primary-background", "--a-surface-action"],
["--navds-button-color-secondary-border-focus-active-hover", "--a-surface-default"],
["--navds-button-color-secondary-text-hover", "--a-text-action"],
["--navds-button-color-secondary-text-active", "--a-text-on-action"],
["--navds-button-color-secondary-background-hover", "--a-surface-action-subtle-hover"],
["--navds-button-color-secondary-background-active", "--a-surface-action-active"],
["--navds-button-color-secondary-border", "--a-border-action"],
["--navds-button-color-secondary-text", "--a-text-action"],
["--navds-button-color-secondary-background", "--a-surface-default"],
["--navds-button-color-tertiary-background-hover", "--a-surface-action-subtle-hover"],
["--navds-button-color-tertiary-border-focus", "--a-border-action"],
["--navds-button-color-tertiary-border-active", "--a-surface-default"],
["--navds-button-color-tertiary-background-active", "--a-surface-action-active"],
["--navds-button-color-tertiary-text-active", "--a-text-on-action"],
["--navds-button-color-tertiary-text", "--a-text-action"],
["--navds-button-color-danger-background-hover", "--a-surface-danger-hover"],
["--navds-button-color-danger-background-active", "--a-surface-danger-active"],
["--navds-button-color-danger-border-focus", "--a-surface-default"],
["--navds-button-color-danger-background", "--a-surface-danger"],
["--navds-button-color-danger-text", "--a-text-on-danger"],
["--navds-error-message-color-text", "--a-text-danger"],
["--navds-search-color-border-hover", "--a-border-action"],
["--navds-search-color-clear-hover", "--a-text-action"],
["--navds-search-color-border-error", "--a-border-danger"],
["--navds-search-color-text", "--a-text-default"],
["--navds-search-color-border", "--a-border-default"],
["--navds-text-field-color-border-hover", "--a-border-action"],
["--navds-text-field-color-border-error", "--a-border-danger"],
["--navds-text-field-color-shadow-error", "--a-border-danger"],
["--navds-text-field-color-border-disabled", "--a-gray-400"],
["--navds-text-field-color-background-disabled", "--a-surface-subtle"],
["--navds-text-field-color-placeholder-text", "--a-text-subtle"],
["--navds-text-field-color-text-disabled", "--a-text-default"],
["--navds-text-field-color-text", "--a-text-default"],
["--navds-text-field-color-background", "--a-surface-default"],
["--navds-text-field-color-border", "--a-border-default"],
["--navds-dropdown-menu-color", "--a-text-default"],
["--navdsi-dropdown-item-color-text", "--a-text-action"],
["--navdsi-dropdown-item-color-background-hover", "--a-surface-action-subtle-hover"],
["--navdsi-dropdown-item-color-background-active", "--a-surface-action-active"],
["--navds-dropdown-item-color-focus", "--a-border-focus"],
["--navdsi-header-color-text", "--a-text-on-inverted"],
["--navdsi-header-color-background", "--a-surface-inverted"],
["--navdsi-header-color-border", "--a-gray-600"],
["--navdsi-header-color-hover", "--a-surface-inverted-hover"],
["--navdsi-header-color-active", "--a-surface-inverted-active"],
["--navds-button-icon-adjustment", "--ac-button-icon-margin"]
]
module.exports = { tokens };
@@ -0,0 +1,18 @@
import renameProps from "../../utils/rename-props";
/**
* @param {import('jscodeshift').FileInfo} file
* @param {import('jscodeshift').API} api
*/
export default function transformer(file, api, options) {
const j = api.jscodeshift;
const root = j(file.source);
const printOptions = options.printOptions;
return renameProps({
root,
componentName: options.component,
props: { [options.from]: options.to },
}).toSource(printOptions);
}
@@ -0,0 +1,17 @@
import { check } from "../../../utils/check";
const migration = "rename-prop";
const fixtures = ["rename"];
for (const fixture of fixtures) {
check(__dirname, {
fixture,
migration,
extension: "js",
options: {
component: "SpeechBubble",
from: "illustration",
to: "avatar",
},
});
}
@@ -0,0 +1,8 @@
/* eslint-disable react/jsx-no-undef */
export const Page = () => {
return (
<SpeechBubble illustration={<Illustration />}>
<div />
</SpeechBubble>
);
};
@@ -0,0 +1,8 @@
/* eslint-disable react/jsx-no-undef */
export const Page = () => {
return (
<SpeechBubble avatar={<Illustration />}>
<div />
</SpeechBubble>
);
};
@@ -0,0 +1,26 @@
import { SpeechBubble, Button } from "@navikt/ds-react";
/* eslint-disable react/jsx-no-undef */
export const Page = () => {
return (
<SpeechBubble
illustration={<Illustration />}
topText="Ola Normann 01.01.21 14:00"
backgroundColor="red"
illustrationBgColor="blue"
{...testProps}
>
<SpeechBubble.Bubble {...testProps}>
Aute minim nisi sunt mollit duis sunt nulla minim non proident.
</SpeechBubble.Bubble>
<SpeechBubble.Bubble>
Eu fugiat esse fugiat Lorem culpa nulla mollit tempor incididunt aute
do.
</SpeechBubble.Bubble>
<SpeechBubble.Bubble>
Adipisicing laborum est eu laborum est sit in commodo enim sint laboris
labore nisi ut.
</SpeechBubble.Bubble>
</SpeechBubble>
);
};
@@ -0,0 +1,26 @@
import { Chat, Button } from "@navikt/ds-react";
/* eslint-disable react/jsx-no-undef */
export const Page = () => {
return (
<Chat
avatar={<Illustration />}
name="Ola Normann 01.01.21 14:00"
backgroundColor="red"
avatarBgColor="blue"
{...testProps}
>
<Chat.Bubble {...testProps}>
Aute minim nisi sunt mollit duis sunt nulla minim non proident.
</Chat.Bubble>
<Chat.Bubble>
Eu fugiat esse fugiat Lorem culpa nulla mollit tempor incididunt aute
do.
</Chat.Bubble>
<Chat.Bubble>
Adipisicing laborum est eu laborum est sit in commodo enim sint laboris
labore nisi ut.
</Chat.Bubble>
</Chat>
);
};
@@ -0,0 +1,25 @@
import { Chat, Button } from "@navikt/ds-react";
/* eslint-disable react/jsx-no-undef */
export const Page = () => {
return (
<Chat
avatar={<Illustration />}
name="Ola Normann 01.01.21 14:00"
backgroundColor="red"
avatarBgColor="blue"
>
<Chat.Bubble>
Aute minim nisi sunt mollit duis sunt nulla minim non proident.
</Chat.Bubble>
<Chat.Bubble>
Eu fugiat esse fugiat Lorem culpa nulla mollit tempor incididunt aute
do.
</Chat.Bubble>
<Chat.Bubble>
Adipisicing laborum est eu laborum est sit in commodo enim sint laboris
labore nisi ut.
</Chat.Bubble>
</Chat>
);
};
@@ -0,0 +1,25 @@
import { Chat, Button } from "@navikt/ds-react";
/* eslint-disable react/jsx-no-undef */
export const Page = () => {
return (
<Chat
avatar={<Illustration />}
name="Ola Normann 01.01.21 14:00"
backgroundColor="red"
avatarBgColor="blue"
>
<Chat.Bubble>
Aute minim nisi sunt mollit duis sunt nulla minim non proident.
</Chat.Bubble>
<Chat.Bubble>
Eu fugiat esse fugiat Lorem culpa nulla mollit tempor incididunt aute
do.
</Chat.Bubble>
<Chat.Bubble>
Adipisicing laborum est eu laborum est sit in commodo enim sint laboris
labore nisi ut.
</Chat.Bubble>
</Chat>
);
};
@@ -0,0 +1,44 @@
import { SpeechBubble, Button } from "@navikt/ds-react";
/* eslint-disable react/jsx-no-undef */
export const Page = () => {
return (
<div>
<SpeechBubble
illustration={<Illustration />}
topText="Ola Normann 01.01.21 14:00"
backgroundColor="red"
illustrationBgColor="blue"
>
<SpeechBubble.Bubble>
Aute minim nisi sunt mollit duis sunt nulla minim non proident.
</SpeechBubble.Bubble>
<SpeechBubble.Bubble>
Eu fugiat esse fugiat Lorem culpa nulla mollit tempor incididunt aute
do.
</SpeechBubble.Bubble>
<SpeechBubble.Bubble>
Adipisicing laborum est eu laborum est sit in commodo enim sint
laboris labore nisi ut.
</SpeechBubble.Bubble>
</SpeechBubble>
<SpeechBubble
illustration={<Illustration />}
topText="Ola Normann 01.01.21 14:00"
backgroundColor="red"
illustrationBgColor="blue"
>
<SpeechBubble.Bubble>
Aute minim nisi sunt mollit duis sunt nulla minim non proident.
</SpeechBubble.Bubble>
<SpeechBubble.Bubble>
Eu fugiat esse fugiat Lorem culpa nulla mollit tempor incididunt aute
do.
</SpeechBubble.Bubble>
<SpeechBubble.Bubble>
Adipisicing laborum est eu laborum est sit in commodo enim sint
laboris labore nisi ut.
</SpeechBubble.Bubble>
</SpeechBubble>
</div>
);
};
@@ -0,0 +1,44 @@
import { Chat, Button } from "@navikt/ds-react";
/* eslint-disable react/jsx-no-undef */
export const Page = () => {
return (
<div>
<Chat
avatar={<Illustration />}
name="Ola Normann 01.01.21 14:00"
backgroundColor="red"
avatarBgColor="blue"
>
<Chat.Bubble>
Aute minim nisi sunt mollit duis sunt nulla minim non proident.
</Chat.Bubble>
<Chat.Bubble>
Eu fugiat esse fugiat Lorem culpa nulla mollit tempor incididunt aute
do.
</Chat.Bubble>
<Chat.Bubble>
Adipisicing laborum est eu laborum est sit in commodo enim sint
laboris labore nisi ut.
</Chat.Bubble>
</Chat>
<Chat
avatar={<Illustration />}
name="Ola Normann 01.01.21 14:00"
backgroundColor="red"
avatarBgColor="blue"
>
<Chat.Bubble>
Aute minim nisi sunt mollit duis sunt nulla minim non proident.
</Chat.Bubble>
<Chat.Bubble>
Eu fugiat esse fugiat Lorem culpa nulla mollit tempor incididunt aute
do.
</Chat.Bubble>
<Chat.Bubble>
Adipisicing laborum est eu laborum est sit in commodo enim sint
laboris labore nisi ut.
</Chat.Bubble>
</Chat>
</div>
);
};
@@ -0,0 +1,44 @@
import { SpeechBubble as DsBubble, Button } from "@navikt/ds-react";
/* eslint-disable react/jsx-no-undef */
export const Page = () => {
return (
<div>
<DsBubble
illustration={<Illustration />}
topText="Ola Normann 01.01.21 14:00"
backgroundColor="red"
illustrationBgColor="blue"
>
<DsBubble.Bubble>
Aute minim nisi sunt mollit duis sunt nulla minim non proident.
</DsBubble.Bubble>
<DsBubble.Bubble>
Eu fugiat esse fugiat Lorem culpa nulla mollit tempor incididunt aute
do.
</DsBubble.Bubble>
<DsBubble.Bubble>
Adipisicing laborum est eu laborum est sit in commodo enim sint
laboris labore nisi ut.
</DsBubble.Bubble>
</DsBubble>
<DsBubble
illustration={<Illustration />}
topText="Ola Normann 01.01.21 14:00"
backgroundColor="red"
illustrationBgColor="blue"
>
<DsBubble.Bubble>
Aute minim nisi sunt mollit duis sunt nulla minim non proident.
</DsBubble.Bubble>
<DsBubble.Bubble>
Eu fugiat esse fugiat Lorem culpa nulla mollit tempor incididunt aute
do.
</DsBubble.Bubble>
<DsBubble.Bubble>
Adipisicing laborum est eu laborum est sit in commodo enim sint
laboris labore nisi ut.
</DsBubble.Bubble>
</DsBubble>
</div>
);
};
@@ -0,0 +1,44 @@
import { Chat as DsBubble, Button } from "@navikt/ds-react";
/* eslint-disable react/jsx-no-undef */
export const Page = () => {
return (
<div>
<DsBubble
avatar={<Illustration />}
name="Ola Normann 01.01.21 14:00"
backgroundColor="red"
avatarBgColor="blue"
>
<DsBubble.Bubble>
Aute minim nisi sunt mollit duis sunt nulla minim non proident.
</DsBubble.Bubble>
<DsBubble.Bubble>
Eu fugiat esse fugiat Lorem culpa nulla mollit tempor incididunt aute
do.
</DsBubble.Bubble>
<DsBubble.Bubble>
Adipisicing laborum est eu laborum est sit in commodo enim sint
laboris labore nisi ut.
</DsBubble.Bubble>
</DsBubble>
<DsBubble
avatar={<Illustration />}
name="Ola Normann 01.01.21 14:00"
backgroundColor="red"
avatarBgColor="blue"
>
<DsBubble.Bubble>
Aute minim nisi sunt mollit duis sunt nulla minim non proident.
</DsBubble.Bubble>
<DsBubble.Bubble>
Eu fugiat esse fugiat Lorem culpa nulla mollit tempor incididunt aute
do.
</DsBubble.Bubble>
<DsBubble.Bubble>
Adipisicing laborum est eu laborum est sit in commodo enim sint
laboris labore nisi ut.
</DsBubble.Bubble>
</DsBubble>
</div>
);
};
@@ -0,0 +1,18 @@
import { Pagination, Button } from "@navikt/ds-react";
export const Demo = () => {
return (
<div>
<Pagination
size="small"
onPageChange={setPage}
data-version="v1"
{...testProps}
/>
<Pagination size="small" onPageChange={setPage} data-version="v1" />
<Pagination size="xsmall" onPageChange={setPage} data-version="v1" />
<Pagination onPageChange={setPage} />
<Pagination size="small" onPageChange={setPage} />
</div>
);
};
@@ -0,0 +1,18 @@
import { Pagination, Button } from "@navikt/ds-react";
export const Demo = () => {
return (
<div>
<Pagination
size="small"
onPageChange={setPage}
data-version="v1"
{...testProps}
/>
<Pagination size="small" onPageChange={setPage} data-version="v1" />
<Pagination size="xsmall" onPageChange={setPage} data-version="v1" />
<Pagination size="small" onPageChange={setPage} data-version="v1" />
<Pagination size="xsmall" onPageChange={setPage} data-version="v1" />
</div>
);
};
@@ -0,0 +1,11 @@
import { Pagination as DsPagination, Button } from "@navikt/ds-react";
export const Demo = () => {
return (
<div>
<DsPagination onPageChange={setPage} />
<DsPagination size="medium" onPageChange={setPage} />
<DsPagination size="small" onPageChange={setPage} />
</div>
);
};
@@ -0,0 +1,11 @@
import { Pagination as DsPagination, Button } from "@navikt/ds-react";
export const Demo = () => {
return (
<div>
<DsPagination size="small" onPageChange={setPage} data-version="v1" />
<DsPagination size="small" onPageChange={setPage} data-version="v1" />
<DsPagination size="xsmall" onPageChange={setPage} data-version="v1" />
</div>
);
};
@@ -0,0 +1,11 @@
import { Pagination, Button } from "@navikt/ds-react";
export const Demo = () => {
return (
<div>
<Pagination onPageChange={setPage} />
<Pagination size="medium" onPageChange={setPage} />
<Pagination size="small" onPageChange={setPage} />
</div>
);
};
@@ -0,0 +1,11 @@
import { Pagination, Button } from "@navikt/ds-react";
export const Demo = () => {
return (
<div>
<Pagination size="small" onPageChange={setPage} data-version="v1" />
<Pagination size="small" onPageChange={setPage} data-version="v1" />
<Pagination size="xsmall" onPageChange={setPage} data-version="v1" />
</div>
);
};
@@ -0,0 +1,25 @@
import { Tabs } from "@navikt/ds-react";
const TabComp = () => {
return (
/* prettier-ignore */
<div>
<Tabs defaultValue="logg" onChange={(x) => console.log(x)} {...testProps}>
<Tabs.List loop={false} {...testProps}>
<Tabs.Tab value="logg" iconPosition={props.left} label="logg" {...testProps}/>
<Tabs.Tab value="logg2" iconPosition="top" label="logg2medlangtekst" />
</Tabs.List>
<Tabs.Panel value="logg">TabPanel for Logg-tab</Tabs.Panel>
<Tabs.Panel value="logg2">TabPanel for Inbox-tab</Tabs.Panel>
</Tabs>
<Tabs defaultValue="logg" onChange={(x) => console.log(x)}>
<Tabs.List>
<Tabs.Tab value="logg" label="logg" />
<Tabs.Tab value="logg2" label="logg2medlangtekst" />
</Tabs.List>
<Tabs.Panel value="logg">TabPanel for Logg-tab</Tabs.Panel>
<Tabs.Panel value="logg2">TabPanel for Inbox-tab</Tabs.Panel>
</Tabs>
</div>
);
};
@@ -0,0 +1,30 @@
import { Tabs } from "@navikt/ds-react";
const TabComp = () => {
return (
/* prettier-ignore */
<div>
<Tabs
defaultValue="logg"
onChange={(x) => console.log(x)}
{...testProps}
loop={false}
iconPosition={props.left}>
<Tabs.List {...testProps}>
<Tabs.Tab value="logg" label="logg" {...testProps} />
<Tabs.Tab value="logg2" label="logg2medlangtekst" />
</Tabs.List>
<Tabs.Panel value="logg">TabPanel for Logg-tab</Tabs.Panel>
<Tabs.Panel value="logg2">TabPanel for Inbox-tab</Tabs.Panel>
</Tabs>
<Tabs defaultValue="logg" onChange={(x) => console.log(x)}>
<Tabs.List>
<Tabs.Tab value="logg" label="logg" />
<Tabs.Tab value="logg2" label="logg2medlangtekst" />
</Tabs.List>
<Tabs.Panel value="logg">TabPanel for Logg-tab</Tabs.Panel>
<Tabs.Panel value="logg2">TabPanel for Inbox-tab</Tabs.Panel>
</Tabs>
</div>
);
};
@@ -0,0 +1,19 @@
import { Tabs } from "@navikt/ds-react";
const TabComp = () => {
return (
/* prettier-ignore */
<Tabs
defaultValue="logg"
onChange={(x) => console.log(x)}
loop
iconPosition="left">
<Tabs.List>
<Tabs.Tab value="logg" label="logg" />
<Tabs.Tab value="logg2" label="logg2medlangtekst" />
</Tabs.List>
<Tabs.Panel value="logg">TabPanel for Logg-tab</Tabs.Panel>
<Tabs.Panel value="logg2">TabPanel for Inbox-tab</Tabs.Panel>
</Tabs>
);
};
@@ -0,0 +1,19 @@
import { Tabs } from "@navikt/ds-react";
const TabComp = () => {
return (
/* prettier-ignore */
<Tabs
defaultValue="logg"
onChange={(x) => console.log(x)}
loop
iconPosition="left">
<Tabs.List>
<Tabs.Tab value="logg" label="logg" />
<Tabs.Tab value="logg2" label="logg2medlangtekst" />
</Tabs.List>
<Tabs.Panel value="logg">TabPanel for Logg-tab</Tabs.Panel>
<Tabs.Panel value="logg2">TabPanel for Inbox-tab</Tabs.Panel>
</Tabs>
);
};
@@ -0,0 +1,15 @@
import { Tabs } from "@navikt/ds-react";
const TabComp = () => {
return (
/* prettier-ignore */
<Tabs defaultValue="logg" onChange={(x) => console.log(x)}>
<Tabs.List loop>
<Tabs.Tab value="logg" iconPosition="left" label="logg" />
<Tabs.Tab value="logg2" iconPosition="top" label="logg2medlangtekst" />
</Tabs.List>
<Tabs.Panel value="logg">TabPanel for Logg-tab</Tabs.Panel>
<Tabs.Panel value="logg2">TabPanel for Inbox-tab</Tabs.Panel>
</Tabs>
);
};
@@ -0,0 +1,19 @@
import { Tabs } from "@navikt/ds-react";
const TabComp = () => {
return (
/* prettier-ignore */
<Tabs
defaultValue="logg"
onChange={(x) => console.log(x)}
loop
iconPosition="left">
<Tabs.List>
<Tabs.Tab value="logg" label="logg" />
<Tabs.Tab value="logg2" label="logg2medlangtekst" />
</Tabs.List>
<Tabs.Panel value="logg">TabPanel for Logg-tab</Tabs.Panel>
<Tabs.Panel value="logg2">TabPanel for Inbox-tab</Tabs.Panel>
</Tabs>
);
};
@@ -0,0 +1,10 @@
export {};
jest.autoMockOff();
const defineTest = require("jscodeshift/dist/testUtils").defineTest;
const tests = ["props", "complete", "idempotent", "renamed"];
for (const test of tests) {
defineTest(__dirname, "chat", null, `chat/${test}`);
}
@@ -0,0 +1,10 @@
export {};
jest.autoMockOff();
const defineTest = require("jscodeshift/dist/testUtils").defineTest;
const tests = ["size", "import", "idempotent"];
for (const test of tests) {
defineTest(__dirname, "pagination", null, `pagination/${test}`);
}
@@ -0,0 +1,10 @@
export {};
jest.autoMockOff();
const defineTest = require("jscodeshift/dist/testUtils").defineTest;
const tests = ["props", "idempotent", "complete"];
for (const test of tests) {
defineTest(__dirname, "tabs", null, `tabs/${test}`);
}
+68
View File
@@ -0,0 +1,68 @@
import renameProps from "../../utils/rename-props";
/**
* @param {import('jscodeshift').FileInfo} file
* @param {import('jscodeshift').API} api
*/
export default function transformer(file, api, options) {
const j = api.jscodeshift;
let localName = "SpeechBubble";
const root = j(file.source);
/* Finds and replaces import from SpeechBubble -> Chat */
root
.find(j.ImportDeclaration)
.filter((path) => path.node.source.value === "@navikt/ds-react")
.forEach((imp) => {
imp.value.specifiers.forEach((x) => {
if (x.imported.name === "SpeechBubble") {
if (x.local.name !== x.imported.name) {
localName = x.local.name;
x.imported.name = "Chat";
} else {
x.imported.name = "Chat";
x.local.name = "Chat";
}
}
});
});
if (j(file.source).findJSXElements(localName)) {
renameProps({
root,
componentName: localName,
props: {
illustrationBgColor: "avatarBgColor",
illustration: "avatar",
topText: "name",
},
});
/* Find and replace name of all <SpeechBubble />*/
const compRoot = root.find(j.JSXElement, {
openingElement: { name: { name: localName } },
});
compRoot.forEach((x) => {
if (localName !== "SpeechBubble") return;
x.node.openingElement.name.name = "Chat";
x.node.closingElement.name.name = "Chat";
});
/* Need to handle dot-notations differently */
const child = root.find(j.JSXElement);
child.forEach((x) => {
if (
x.value.openingElement.name.type === "JSXMemberExpression" &&
x.value.openingElement.name.object.name === "SpeechBubble"
) {
x.value.openingElement.name.object.name = "Chat";
x.value.closingElement.name.object.name = "Chat";
}
});
}
return root.toSource(options.printOptions);
}
@@ -0,0 +1,83 @@
/**
* @param {import('jscodeshift').FileInfo} file
* @param {import('jscodeshift').API} api
*/
export default function transformer(file, api, options) {
const j = api.jscodeshift;
let localName = "Pagination";
const root = j(file.source);
function addMigrationTag(node) {
const attributes = node.openingElement.attributes;
const isMigrated = attributes.find(
(node) =>
node.type === "JSXAttribute" &&
node.name.name === "data-version" &&
node.value.value === "v1"
);
if (!isMigrated) {
attributes.push(
j.jsxAttribute(j.jsxIdentifier("data-version"), j.literal("v1"))
);
}
}
/* https://github.com/mui/material-ui/blob/master/packages/mui-codemod/src/v5.0.0/variant-prop.js */
function addExplicitStandardProp(node) {
const attributes = node.openingElement.attributes;
const variant = attributes.find(
(node) => node.type === "JSXAttribute" && node.name.name === "size"
);
if (!variant) {
attributes.unshift(
j.jsxAttribute(j.jsxIdentifier("size"), j.literal("small"))
);
addMigrationTag(node);
}
}
/* Finds locally used name for Pagination */
root
.find(j.ImportDeclaration)
.filter((path) => path.node.source.value === "@navikt/ds-react")
.forEach((imp) => {
imp.value.specifiers.forEach((x) => {
if (
x.imported.name === "Pagination" &&
x.local.name !== x.imported.name
) {
localName = x.local.name;
}
});
});
if (j(file.source).findJSXElements(localName)) {
root.findJSXElements(`${localName}`).forEach((parent) => {
const skip = !!parent.value.openingElement?.attributes.find(
(x) => x.name.name === "data-version" && x.value.value === "v1"
);
parent.value.openingElement?.attributes.forEach((x, index) => {
let didUpdate = false;
if (x.name?.name === "size" && x.type === "JSXAttribute" && !skip) {
/* addExplicitStandardProp */
if (x.value.value === "medium") {
x.value = j.literal("small");
didUpdate = true;
} else if (x.value.value === "small") {
x.value = j.literal("xsmall");
didUpdate = true;
}
didUpdate && addMigrationTag(parent.value);
}
});
addExplicitStandardProp(parent.value);
});
}
return root.toSource(options.printOptions);
}
@@ -0,0 +1,15 @@
import transformTabs from "./tabs";
import transformChat from "./chat";
import transformPagination from "./pagination";
/**
* @param {import('jscodeshift').FileInfo} file
* @param {import('jscodeshift').API} api
*/
export default function transformer(file, api, options) {
file.source = transformTabs(file, api, options);
file.source = transformChat(file, api, options);
file.source = transformPagination(file, api, options);
return file.source;
}
+83
View File
@@ -0,0 +1,83 @@
import renameProps from "../../utils/rename-props";
/**
* @param {import('jscodeshift').FileInfo} file
* @param {import('jscodeshift').API} api
*/
export default function transformer(file, api, options) {
const j = api.jscodeshift;
let localName = "Tabs";
let iconPositionProp = null;
const root = j(file.source);
/* Finds used name for Tabs component */
root
.find(j.ImportDeclaration)
.filter((path) => path.node.source.value === "@navikt/ds-react")
.forEach((imp) => {
imp.value.specifiers.forEach((x) => {
if (x.imported.name === "Tabs" && x.local.name !== x.imported.name) {
localName = x.local.name;
}
});
});
if (j(file.source).findJSXElements(localName)) {
renameProps({
root,
componentName: `${localName}.List`,
props: {
loop: "null",
},
});
root.findJSXElements(`${localName}`).forEach((parent) => {
parent.value.children.forEach((el) => {
const openingEl = el.openingElement;
if (openingEl?.name && openingEl.name.type === "JSXMemberExpression") {
if (
openingEl.name.object.name === localName &&
openingEl.name.property.name === "List"
) {
/* Move loop-prop */
el.openingElement.attributes.forEach((x, index) => {
if (x.name?.name === "loop" && x.type === "JSXAttribute") {
parent.value.openingElement.attributes.push(x);
delete el.openingElement.attributes[index];
}
});
/* Find and move iconPosition-prop to <Tabs/> */
el.children.forEach((tab) => {
const tabEl = tab.openingElement;
if (tabEl?.name && tabEl.name.type === "JSXMemberExpression") {
if (
tabEl.name.object.name === localName &&
tabEl.name.property.name === "Tab"
) {
tabEl?.attributes.forEach((x, index) => {
if (
x.name?.name === "iconPosition" &&
x.type === "JSXAttribute"
) {
if (!iconPositionProp) {
iconPositionProp = x;
}
delete tabEl.attributes[index];
}
});
}
}
});
}
}
});
iconPositionProp &&
parent.value.openingElement.attributes.push(iconPositionProp);
iconPositionProp = null;
});
}
return root.toSource(options.printOptions);
}
@@ -0,0 +1,7 @@
.test {
color: var(--navds-global-color-blue-100);
color: var(--navds-global-color-red-100);
--navds-global-color-red-100: var(--navds-global-color-green-100);
--navds-global-color-blue-100: red;
}
@@ -0,0 +1,16 @@
const StyledDiv = styled`
--navds-global-color-red-100: var(--navds-global-color-green-100);
--navds-global-color-blue-100: red;
.test{
color: var(--navds-global-color-blue-100);
}
`;
<style>
{`
.test{
color: var(--navds-global-color-blue-100);
}
`}
</style>;
@@ -0,0 +1,7 @@
.test {
color: var(--a-blue-100);
color: var(--a-red-100);
--v2-migration__navds-global-color-red-100: var(--a-green-100);
--v2-migration__navds-global-color-blue-100: red;
}
@@ -0,0 +1,16 @@
const StyledDiv = styled`
--v2-migration__navds-global-color-red-100: var(--a-green-100);
--v2-migration__navds-global-color-blue-100: red;
.test{
color: var(--a-blue-100);
}
`;
<style>
{`
.test{
color: var(--a-blue-100);
}
`}
</style>;
@@ -0,0 +1,18 @@
import { check } from "../../../../utils/check";
const migration = "update-css-tokens";
const fixtures = ["complete"];
for (const fixture of fixtures) {
check(__dirname, {
fixture,
migration,
extension: "js",
});
check(__dirname, {
fixture,
migration,
extension: "css",
});
}
@@ -0,0 +1,22 @@
import { tokens } from "../../../tokens-map.mjs";
/**
* @param {import('jscodeshift').FileInfo} file
* @param {import('jscodeshift').API} api
*/
export default function transformer(file, api) {
let src = file.source;
tokens.forEach((tok) => {
// eslint-disable-next-line no-useless-concat
const rgx = new RegExp("(" + `${tok[0]}:` + ")", "gm");
src = src.replace(rgx, `--v2-migration${tok[0].replace("--", "__")}:`);
});
tokens.forEach((tok) => {
const rgx = new RegExp("(" + tok[0] + ")", "gm");
src = src.replace(rgx, tok[1]);
});
return src;
}
@@ -0,0 +1,88 @@
import styled from "styled-components";
import {
NavdsGlobalColorBlue400 as abc132,
NavdsGlobalColorGray100,
NavdsGlobalColorGray400,
NavdsSemanticColorLink,
} from "@navikt/ds-tokens/dist/tokens";
import { BodyShort } from "@navikt/ds-react";
const StyledNavLink = styled(NavLink)`
border-bottom: 5px solid white;
color: inherit;
text-align: center;
text-decoration: none;
width: 100%;
padding-top: 1rem;
padding-bottom: 1rem;
text-overflow: ellipsis;
overflow: hidden;
white-space: nowrap;
padding-left: 5px;
padding-right: 5px;
:hover {
border-bottom: 5px solid ${abc132};
p {
color: ${NavdsSemanticColorLink};
}
}
&.active {
background-color: ${NavdsGlobalColorGray100};
border-bottom: 5px solid ${NavdsSemanticColorLink};
.typo-normal {
font-weight: bold;
}
}
`;
const StyledLenketekst = styled(BodyShort)`
text-overflow: ellipsis;
overflow: hidden;
white-space: nowrap;
`;
const StyledTekst = styled(BodyShort)`
border-bottom: 5px solid white;
color: ${NavdsGlobalColorGray400};
text-align: center;
text-decoration: none;
width: 100%;
padding-top: 1rem;
padding-bottom: 1rem;
text-overflow: ellipsis;
overflow: hidden;
white-space: nowrap;
padding-left: 5px;
padding-right: 5px;
`;
const Fane = ({ side, behandlingId, index, deaktivert }) => {
const { gåTilUrl } = useApp();
const fanenavn = side.navn;
return (
<>
{deaktivert && (
<StyledTekst size={"small"}>
{index + 1}. {fanenavn}
</StyledTekst>
)}
{!deaktivert && (
<StyledNavLink
key={side.navn}
to={`/behandling/${behandlingId}/${side.href}`}
onClick={(e) => {
e.preventDefault();
gåTilUrl(`/behandling/${behandlingId}/${side.href}`);
}}
>
<StyledLenketekst size={"small"}>
{index + 1}. {fanenavn}
</StyledLenketekst>
</StyledNavLink>
)}
</>
);
};
export default Fane;
@@ -0,0 +1,88 @@
import styled from "styled-components";
import {
ABlue400,
AGray100,
AGray400,
ATextAction,
} from "@navikt/ds-tokens/dist/tokens";
import { BodyShort } from "@navikt/ds-react";
const StyledNavLink = styled(NavLink)`
border-bottom: 5px solid white;
color: inherit;
text-align: center;
text-decoration: none;
width: 100%;
padding-top: 1rem;
padding-bottom: 1rem;
text-overflow: ellipsis;
overflow: hidden;
white-space: nowrap;
padding-left: 5px;
padding-right: 5px;
:hover {
border-bottom: 5px solid ${ABlue400};
p {
color: ${ATextAction};
}
}
&.active {
background-color: ${AGray100};
border-bottom: 5px solid ${ATextAction};
.typo-normal {
font-weight: bold;
}
}
`;
const StyledLenketekst = styled(BodyShort)`
text-overflow: ellipsis;
overflow: hidden;
white-space: nowrap;
`;
const StyledTekst = styled(BodyShort)`
border-bottom: 5px solid white;
color: ${AGray400};
text-align: center;
text-decoration: none;
width: 100%;
padding-top: 1rem;
padding-bottom: 1rem;
text-overflow: ellipsis;
overflow: hidden;
white-space: nowrap;
padding-left: 5px;
padding-right: 5px;
`;
const Fane = ({ side, behandlingId, index, deaktivert }) => {
const { gåTilUrl } = useApp();
const fanenavn = side.navn;
return (
<>
{deaktivert && (
<StyledTekst size={"small"}>
{index + 1}. {fanenavn}
</StyledTekst>
)}
{!deaktivert && (
<StyledNavLink
key={side.navn}
to={`/behandling/${behandlingId}/${side.href}`}
onClick={(e) => {
e.preventDefault();
gåTilUrl(`/behandling/${behandlingId}/${side.href}`);
}}
>
<StyledLenketekst size={"small"}>
{index + 1}. {fanenavn}
</StyledLenketekst>
</StyledNavLink>
)}
</>
);
};
export default Fane;
@@ -0,0 +1,12 @@
import { check } from "../../../../utils/check";
const migration = "update-js-tokens";
const fixtures = ["complete"];
for (const fixture of fixtures) {
check(__dirname, {
fixture,
migration,
extension: "js",
});
}
@@ -0,0 +1,67 @@
import type { JSCodeshift } from "jscodeshift";
import {
getImportSpecifier,
getImportSpecifierName,
renameImportSpecifier,
} from "../../../utils/imports";
import { translateToken } from "../../../utils/translate-token";
import { tokens } from "../../../tokens-map.mjs";
/**
* @param {import('jscodeshift').FileInfo} file
* @param {import('jscodeshift').API} api
*/
export default function transformer(file: JSCodeshift, api) {
let src = file.source;
const j = api.jscodeshift as JSCodeshift;
let root = j(file.source);
const jsImport = root.find(j.ImportDeclaration).filter((x) => {
return ["@navikt/ds-tokens/dist/tokens"].includes(
x.node.source.value as string
);
});
if (!jsImport) {
return src;
}
tokens.forEach((x) => {
const name = translateToken(x[0], "js");
const out = translateToken(x[1], "js");
let foundName: string = "";
getImportSpecifier(j, root, name, "@navikt/ds-tokens/dist/tokens").forEach(
(x) => (foundName = x.node.imported.name)
);
if (name === foundName) {
const localName =
getImportSpecifierName(
j,
root,
name,
"@navikt/ds-tokens/dist/tokens"
) || name;
renameImportSpecifier(
j,
root,
name,
out,
"@navikt/ds-tokens/dist/tokens"
);
let code = root.toSource();
const rgx = new RegExp("(" + localName + ")", "gm");
code = code.replace(rgx, out);
root = j(code);
}
});
return root.toSource();
}
@@ -0,0 +1,26 @@
.filtersMenu {
box-shadow: @navds-global-color-blue-200 inset 0 0 0 8px;
border-radius: 0.2em;
background-color: white;
}
.filterExplanationHighlight {
background-color: @navds-global-color-green-100;
border: 1px solid @navds-global-color-green-500;
transition: all 0.4s linear;
}
.lenkepanelNavno {
border: 1px solid @navds-semantic-color-link;
.navds-link-panel__content {
display: flex;
}
.navds-link-panel__title,
.navds-link-panel__chevron {
color: @navds-semantic-color-link;
}
background-color: @navds-global-color-gray-600;
}
@@ -0,0 +1,26 @@
.filtersMenu {
box-shadow: @a-blue-200 inset 0 0 0 8px;
border-radius: 0.2em;
background-color: white;
}
.filterExplanationHighlight {
background-color: @a-green-100;
border: 1px solid @a-green-500;
transition: all 0.4s linear;
}
.lenkepanelNavno {
border: 1px solid @a-text-action;
.navds-link-panel__content {
display: flex;
}
.navds-link-panel__title,
.navds-link-panel__chevron {
color: @a-text-action;
}
background-color: @a-gray-600;
}
@@ -0,0 +1,12 @@
import { check } from "../../../../utils/check";
const migration = "update-less-tokens";
const fixtures = ["complete"];
for (const fixture of fixtures) {
check(__dirname, {
fixture,
migration,
extension: "less",
});
}
@@ -0,0 +1,19 @@
import { translateToken } from "../../../utils/translate-token";
import { tokens } from "../../../tokens-map.mjs";
/**
* @param {import('jscodeshift').FileInfo} file
* @param {import('jscodeshift').API} api
*/
export default function transformer(file, api) {
let src = file.source;
tokens.forEach((tok) => {
const lessToken = translateToken(tok[0], "less");
const rgx = new RegExp("(\\" + lessToken + ")", "gm");
src = src.replace(rgx, translateToken(tok[1], "less"));
});
return src;
}
@@ -0,0 +1,30 @@
.filtersMenu {
box-shadow: common.$navds-global-color-blue-200 inset 0 0 0 8px;
border-radius: 0.2em;
background-color: white;
}
.filterExplanationHighlight {
background-color: common.$navds-global-color-green-100;
border: 1px solid common.$navds-global-color-green-500;
transition: all 0.4s linear;
}
.lenkepanelNavno {
&:global(.navds-link-panel) {
border: 1px solid common.$navds-semantic-color-link;
}
:global {
.navds-link-panel__content {
display: flex;
}
.navds-link-panel__title,
.navds-link-panel__chevron {
color: common.$navds-semantic-color-link;
}
}
background-color: common.$navds-global-color-gray-600;
}
@@ -0,0 +1,30 @@
.filtersMenu {
box-shadow: common.$a-blue-200 inset 0 0 0 8px;
border-radius: 0.2em;
background-color: white;
}
.filterExplanationHighlight {
background-color: common.$a-green-100;
border: 1px solid common.$a-green-500;
transition: all 0.4s linear;
}
.lenkepanelNavno {
&:global(.navds-link-panel) {
border: 1px solid common.$a-text-action;
}
:global {
.navds-link-panel__content {
display: flex;
}
.navds-link-panel__title,
.navds-link-panel__chevron {
color: common.$a-text-action;
}
}
background-color: common.$a-gray-600;
}
@@ -0,0 +1,12 @@
import { check } from "../../../../utils/check";
const migration = "update-sass-tokens";
const fixtures = ["complete"];
for (const fixture of fixtures) {
check(__dirname, {
fixture,
migration,
extension: "scss",
});
}
@@ -0,0 +1,19 @@
import { translateToken } from "../../../utils/translate-token";
import { tokens } from "../../../tokens-map.mjs";
/**
* @param {import('jscodeshift').FileInfo} file
* @param {import('jscodeshift').API} api
*/
export default function transformer(file, api) {
let src = file.source;
tokens.forEach((tok) => {
const scssToken = translateToken(tok[0], "scss");
const rgx = new RegExp("(\\" + scssToken + ")", "gm");
src = src.replace(rgx, translateToken(tok[1], "scss"));
});
return src;
}
+14
View File
@@ -0,0 +1,14 @@
{
"compilerOptions": {
"module": "commonjs",
"sourceMap": false,
"esModuleInterop": true,
"target": "es2015",
"downlevelIteration": true,
"preserveWatchOutput": true,
"declaration": false,
"types": ["@types/jscodeshift", "node", "jest"]
},
"include": ["**/*.ts"],
"exclude": ["node_modules", "dist", "jest.config.js"]
}
+47
View File
@@ -0,0 +1,47 @@
import fs from "node:fs";
import path from "node:path";
import prettier from "prettier";
const applyTransform = require("jscodeshift/dist/testUtils").applyTransform;
interface TestT {
fixture: string;
migration: string;
extension?: "js" | "scss" | "less" | "css";
options?: { [option: string]: any };
}
export function check(
dirName: string,
{ fixture, migration, extension = "js", options = {} }: TestT
) {
describe(migration, () => {
it(fixture, async () => {
const fixtureDir = path.join(dirName);
const inputPath = path.join(fixtureDir, `${fixture}.input.${extension}`);
const parser = extension;
const source = fs.readFileSync(inputPath, "utf8");
const expected = fs.readFileSync(
path.join(fixtureDir, `${fixture}.output.${extension}`),
"utf8"
);
// Assumes transform is one level up from tests directory
const module = await import(path.join(dirName, "..", migration));
const output = applyTransform({ ...module, parser: "tsx" }, options, {
source,
});
// Format output and expected with prettier for white spaces and line breaks consistency
expect(
prettier.format(output, {
parser: parser === "js" ? "typescript" : parser,
})
).toBe(
prettier.format(expected, {
parser: parser === "js" ? "typescript" : parser,
})
);
});
});
}
+37
View File
@@ -0,0 +1,37 @@
import core, { Collection } from "jscodeshift";
export function getImportSpecifier(
j: core.JSCodeshift,
source: Collection<any>,
specifier: string,
sourcePath: string
) {
return source
.find(j.ImportDeclaration)
.filter((path) => path.node.source.value === sourcePath)
.find(j.ImportSpecifier)
.filter((path) => path.value.imported.name === specifier);
}
export function renameImportSpecifier(
j: core.JSCodeshift,
source: Collection<any>,
specifier: string,
newSpecifier: string,
sourcePath: string
) {
getImportSpecifier(j, source, specifier, sourcePath).replaceWith(
j.importSpecifier(j.identifier(newSpecifier))
);
}
export function getImportSpecifierName(
j: core.JSCodeshift,
source: Collection<any>,
specifier: string,
sourcePath: string
) {
const specifiers = getImportSpecifier(j, source, specifier, sourcePath);
return specifiers.length > 0 ? specifiers.nodes()[0]!.local!.name : null;
}
+12
View File
@@ -0,0 +1,12 @@
export default function renameProps({ root, componentName, props }) {
return root.findJSXElements(componentName).forEach((path) => {
path.node.openingElement.attributes.forEach((node) => {
if (
node.type === "JSXAttribute" &&
Object.keys(props).includes(node.name.name)
) {
node.name.name = props[node.name.name];
}
});
});
}
@@ -0,0 +1,36 @@
import { translateToken } from "../translate-token";
export {};
jest.autoMockOff();
const tokens = [
{
name: "--navds-global-color-red-100",
scss: "$navds-global-color-red-100",
less: "@navds-global-color-red-100",
js: "NavdsGlobalColorRed100",
},
{
name: "--a-blue-100",
scss: "$a-blue-100",
less: "@a-blue-100",
js: "ABlue100",
},
];
describe("Translating tokens to correct format", () => {
test("To scss", () => {
tokens.forEach((x) =>
expect(translateToken(x.name, "scss")).toEqual(x.scss)
);
});
test("To less", () => {
tokens.forEach((x) =>
expect(translateToken(x.name, "less")).toEqual(x.less)
);
});
test("To js", () => {
tokens.forEach((x) => expect(translateToken(x.name, "js")).toEqual(x.js));
});
});
+15
View File
@@ -0,0 +1,15 @@
import _ from "lodash";
export const translateToken = (token: string, type: "scss" | "less" | "js") => {
switch (type) {
case "scss":
return token.replace("--", "$");
case "less":
return token.replace("--", "@");
case "js":
return _.startCase(token).split(" ").join("");
default:
return token;
}
};
+16
View File
@@ -0,0 +1,16 @@
const template = require("./template");
module.exports = {
typescript: true,
ref: true,
icon: false,
titleProp: false,
svgProps: {
focusable: false,
role: "img",
},
/* replaceAttrValues: {
"#262626": "currentColor",
}, */
template,
};
+38
View File
@@ -0,0 +1,38 @@
# NAV React-components for nav.no
## Installation
Install `@navikt/ds-navno` with yarn
```bash
yarn add @navikt/ds-navno
```
Install `@navikt/ds-navno` with npm
```bash
npm install @navikt/ds-navno
```
## Usage
Remember to also import @navikt/ds-navno/css to apply styling!
```javascript
import "@navikt/ds-navno/css";
import { PageHeader } from "@navikt/ds-navno";
function App() {
return <PageHeader />;
}
```
## Learn more
- [Designsystem documentation](https://aksel.nav.no/designsystem)
- [Component-docs](https://aksel.nav.no/designsystem/side/oversikt-komponenter)
- [Storybook](https://master--5f801fb2aea7820022de2936.chromatic.com/)
## License
[MIT](https://github.com/navikt/Designsystemet/blob/master/LICENCE)
Loaded 100 of 1677 files, more files were not shown because too many files have changed in this diff. Show more