Compare commits

..
Author SHA1 Message Date
github-actions[bot]andgithub-actions[bot] a882a8a389 Version Packages (#2807)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2024-03-20 13:26:51 +01:00
Ken d1606d358a 🐛 useDatepicker håndterer isInvalid validation riktig (#2809)
* 🐛 useDatepicker håndterer isInvalid validation riktig nå

* Update @navikt/core/react/src/date/hooks/useDatepicker.tsx

* Update @navikt/core/react/src/date/hooks/useDatepicker.tsx
2024-03-20 13:21:05 +01:00
Ken bb87837632 🧪 Bump timeout and retry of dateStr testing 2024-03-20 12:33:56 +01:00
Halvor Haugan 9c8b2301ed FileUpload.Dropzone: Fiks feil med duplisert id (#2805) 2024-03-20 12:31:08 +01:00
Ken 54ba483d2d ✅ Oppdatert Chromatic-tester
✅ Oppdatert dropdown-tester

🐛 satt dropdown-story til open

✅ Oppdatert errorsummary-tester

✅ Oppdatert fieldset-tester
2024-03-20 11:51:46 +01:00
github-actions[bot]andgithub-actions[bot] 85f5458c06 Version Packages (#2804)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2024-03-20 09:51:54 +01:00
Halvor Haugan 19abec80f7 FileUpload: Fiks feil ved import av json (#2803) 2024-03-20 09:46:45 +01:00
Julian NymarkandHalvor Haugan b2ddce5279 📝 Search docs review (#2797)
Co-authored-by: Halvor Haugan <halvor.haugan@nav.no>
2024-03-19 15:39:12 +01:00
github-actions[bot]andgithub-actions[bot] bd7c945158 Version Packages (#2799)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2024-03-19 15:07:37 +01:00
Ken ca24684a25 🐛 Dropzone med disabled stoppet ikke filopplasting (#2798)
inputfelt settes nå til disabled ved bruk av prop for å unngå dette
2024-03-19 15:02:06 +01:00
Julian Nymark 1564363985 💄 break-normal on body text, but break-all on types, as they… (#2790)
* 💄 break-normal on body text, but break-all on types, as they get long and complicated without spaces

* 🔥 remove break-normal, as it's the default
2024-03-19 14:58:58 +01:00
Ken ca8d36e885 🔥 Fjernet UX-tweaks card på forside
Kode er kommentert ut fra forside, men vil være lett tilgjengelig hvis vi ønsker å legge til fremtidige undersøkelser
2024-03-19 14:43:00 +01:00
github-actions[bot]andgithub-actions[bot] 8efc6c58be Version Packages (#2794)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2024-03-19 14:00:30 +01:00
2ea2a91a37 Combobox complex options (#2716)
* Remove unused function

* Support for complex options, using objects with label and value instead of strings

* Better typing for isTextInSelectedOptions value (boolean instead of truthy/falsy)

* Stricter value type: Only accept string values. This will work better with the allowNewValues prop, and simplify returning a value from onToggleSelected.

* More JSDoc

* Add test for complex options with label and value

* Add example for complex options on the aksel-website

* yarn.lock

* Remove other properties than label and value from Combobox options in Storybook-examples, as we have limited the format for now

* Array.includes does not work with objects, so should use isInList utility function. Fixes missing checkmark for selected items in FilteredOptions.

* Add changeset

* Remove navds-dependencies in playroom that break playwright tests. These are outdated/unsynced, and will be inherited from parent package.json instead.

* Do not try to remove an undefined option

* "it" is from jest. Use "test" instead.

* Update @navikt/core/react/src/form/combobox/FilteredOptions/filteredOptionsContext.tsx

Co-authored-by: Halvor Haugan <83693529+HalvorHaugan@users.noreply.github.com>

* Update @navikt/core/react/src/form/combobox/FilteredOptions/filteredOptionsContext.tsx

Co-authored-by: Halvor Haugan <83693529+HalvorHaugan@users.noreply.github.com>

* Update @navikt/core/react/src/form/combobox/Input/Input.tsx

Co-authored-by: Halvor Haugan <83693529+HalvorHaugan@users.noreply.github.com>

* Update @navikt/core/react/src/form/combobox/types.ts

Co-authored-by: Halvor Haugan <83693529+HalvorHaugan@users.noreply.github.com>

* Raise change level to minor, to signal the new feature

* Spread props instead of adding them separately

* JSDoc @returns doesn't do anything without a value specified, and neither of these return a value

* Options are used for multiple features, so will just skip specifying them

* Doesn't need a guaranteed unique ID for storybook examples. Use hard-coded instead.

* selectedOptions is a list of strings anyhow, so should just use the value

* More realistic example for complex options, where the option label is larger, and the SelectedOptions label uses a short code (the value)

Also made the isInList function better, by checking both label and value when checking ComboboxOptions. Pass just the value or just the label if you only want to check either of them.

* Add tests for mapToComboboxOptionArray (renamed from mapFromStringArrayToComboboxOptionArray)

* Add test for toComboboxOption and use this function in mapToComboboxOptionArray

* Update combobox unit test for complex options to use a more realistic example

* Don't say anything about what might be added in the future. That doesn't belong in the documentation

* Oppdater beskrivelsen for complex options-eksempelet (var kopiert fra annet eksempel)

* Fix Storybook example bug where de-selecting a value selected it an extra time

* Fix example

* Remove listing options because it breaks with allowNewValues

* Revert earlier change that always showed selected values in FilteredOptions, even if it didn't match the search text. This broke autocomplete.

* Remove unneccessary optional check

* yarn.lock

* Don't need to use toLocaleLowerCase

---------

Co-authored-by: Ken <26967723+KenAJoh@users.noreply.github.com>
Co-authored-by: Halvor Haugan <83693529+HalvorHaugan@users.noreply.github.com>
2024-03-19 13:47:13 +01:00
Halvor HauganandKen aebba20fd4 🆙 Minor-oppgradering av deps (#2795)
Co-authored-by: Ken <ken.aleksander@gmail.com>
2024-03-18 18:51:11 +01:00
Ken 5ce4b4ea79 📱 Tilpasset aksel-header for 320px (#2793) 2024-03-17 15:27:43 +01:00
Ken 548d9bb169 💄 Bedre eksempel for logg-ut i dropdown (#2792) 2024-03-17 15:27:33 +01:00
25e0d15d67 Ny komponent FileUpload (#2504)
---------

Co-authored-by: Ken <ken.aleksander@gmail.com>
Co-authored-by: Halvor Haugan <halvor.haugan@nav.no>
2024-03-15 12:54:35 +01:00
Halvor Haugan 98f6d7dde4 Forbedret beskrivelse for ref i prop-tabell (#2791) 2024-03-15 10:04:09 +01:00
6ac605dd48 Version Packages (#2775)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: Ken <26967723+KenAJoh@users.noreply.github.com>
2024-03-14 16:15:40 +01:00
Ken d293d44b30 Fikset CDN deploy av Aksel og designsystem assets (#2789)
* 🐛 Oppdatert assetprefix

* 🐛 Fikset cdn asset upload
2024-03-14 16:05:09 +01:00
Julian Nymark 5754a08f6c 👷 update workflow for prod (new NAV CDN) 2024-03-14 14:20:08 +01:00
Julian Nymark 924c63324c 👷 swap team aksel for team designsystem (used elsewhere within NAIS) 2024-03-14 14:11:20 +01:00
Julian Nymark b78b818fea 👷 update workflow (new NAV CDN) 2024-03-14 14:00:44 +01:00
Ken dc5ea3b842 [Ikoner] Nytt ikon OpenSource (#2787)
* 🎉 Oppdatert ikonpakke

* 📝 changeset
2024-03-13 18:59:41 +01:00
Halvor Haugan bd315a239b [aksel.nav.no] Fiks link til token-guide (#2786) 2024-03-13 15:53:59 +01:00
Julian NymarkandKen <ken.aleksander@gmail.com>, Halvor 4469c641ed 💄 pretty up the props box on aksel.nav.no + typos (#2729)
* 💄 pretty up the props box on aksel.nav.no + typos

- also update some props docs here & there

* ♻️ pull out component, lazy() it

* 🔥 remove testing css

* 🎨 add fallback with <Suspense>

* 💬 correct @default strings

* 💄 spacing in Props table

* 🔥 @note is not a real JSDoc tag

* ✨ docgen extracts example, render fancy example box

* ✨ pretty @return and @params

* 💄 improve table layout / CSS

* 💄 + update CopyButton & Combobox jsdoc.

* 📝 update jsdoc

* 🎨 Oppdatert layout og visning av prop-table

* 🎨 use more semantic html, better nested <dl>

* ♿ add h4 to prop items

* 👷 use production sanity data

* ♿ revert nested <dl> so Axe tests pass

* 🏷️ correct some types for tsc to pass

* ♿ change from div -> ul

* 👷 commit lockfile

* 💄 make ul bottom rounded and align type with it\'s code block

* ♿ set language tag for props written in english

* 🏷️ type improvements for props section

* 🙈 update .gitignore

* 📝 jsdoc update

* 💄 props section

* ♻️ rename and less indentation (continues > ifs)

* 💄 style changes for Prop section

- breakpoint fail fix
- breakpoint col / row flex for prop fields
- padding tweaks

* 📝 update example jsdoc

---------

Co-authored-by: Ken <ken.aleksander@gmail.com>, Halvor <halvor.haugan@nav.no>
2024-03-12 13:59:35 +01:00
Halvor Haugan b15218e1cb Oppdatering av eksempler på Textarea (#2784) 2024-03-12 09:11:18 +01:00
Ken 73a69f7048 🎉 Fikset search-bug der for god score fjernet resultat (#2783) 2024-03-11 12:48:02 +01:00
Halvor Haugan 7dcd58ff76 Select: Justert eksempler, JSDOC og stories (#2782) 2024-03-11 11:04:49 +01:00
Halvor Haugan 2f3c99f5f6 Justering av eksempel på Table med TextField (#2780) 2024-03-08 09:35:00 +01:00
KenandJulian Nymark 8835291a78 [Aksel.nav.no] Auth på Aksel (#2757)
* 🎉 Satt opp boilerplate for auth på Aksel

* 🎉 Auth boilerplate

* 🎨 Demo-setup for å teste auth i dev

* 🚚 Flyttet auth til getserversideprops

* 🔥 Fjernet authprovider fra _app

* 🐛 revalidate er ikke valid key for getserversideprops i nextjs

* 🚚 rename auth-dir

* 🔥 Fjernet auth types

* 🎉 Auth for api

* 🎨 Oppdatert workflows med token

* 🔥 Fjernet testing av auth på god-praksis sider

* 🎨 La til sidecar på prod-deploy

* 🐛 only return boolean in Promise<boolean>

* ⬆️ Migrert til @navikt/oasis

* 🏷️ Satt typer til strict for å kjøre tester

* ⬆️ Yarn lock

---------

Co-authored-by: Julian Nymark <julian.nymark@nav.no>
2024-03-06 11:53:30 +01:00
Halvor Haugan 2971129d1f Oppgrader eslint-plugin-storybook (#2777) 2024-03-05 16:34:36 +01:00
Ken 9915cf8232 🔥 Fjernet muligheten til å sette seg som anonym i sanity
Nye forfattere blir anbefalt å bruke et alias eller bare fornavn hvis man ønsker.

Ingen er satt som anonym i dag, slik at dette ikke vil påvirke noen forfattere
2024-03-05 14:34:20 +01:00
Halvor Haugan fa00774b0d Forberedelse for Storybook 8 (#2776) 2024-03-05 14:33:58 +01:00
Ken 966de79621 [aksel.nav.no] Migrert editor-felt til variant med email (#2760)
* 🎨 Satt opp migrering for editorsider

* 🎨 Oppdatert initialvalues for mail og oppretting av nye artikler

* 📝 Description på email-field

* Update aksel.nav.no/website/sanity/schema/documents/editors.tsx

* Update aksel.nav.no/website/sanity/schema/documents/editors.tsx

* Update aksel.nav.no/website/sanity/schema/documents/editors.tsx

* 🎨 Bedre validering av nav-mail i sanity

* 🐛 Feilet etter ts oppdatering
2024-03-05 13:35:48 +01:00
KenandHalvor Haugan 0ce2300f92 [aksel.nav.no] Satt strict -> true i tsconfig (#2766)
* 🏷️ sanity-video typer

* 🏷️ Typer storybook

* 🏷️ Typer usecheckauth

* 🏷️ Typer formateddate

* 🏷️ Typer useSanityDate

* 🏷️ Typer footerlink

* 🏷️ Typer ny gp

* 🏷️ Typer layout

* 🏷️ Typer logging

* 🏷️ Typer logging av href

* 🏷️ Typer codeexamples

* 🏷️ Typer sanity-modules

* 🏷️ Typer for alle sanity-modules

* 🏷️ Typer resolvers

* 🏷️ Typer serach

* 🏷️ Typer search

* 🏷️ Typer useToc

* 🏷️ Typer _app

* 🏷️ Typer pages

* 🔥 Fjernet buildlogs fra tsc

* ⬇️ Reversert til gammel logging av lenker

* Update aksel.nav.no/website/pages/eksempler/timeline-intern/aria-controls.tsx

Co-authored-by: Halvor Haugan <83693529+HalvorHaugan@users.noreply.github.com>

* 🏷️ Bruker satisifies for array-type sjekk

* 🏷️ Forenklet typer

---------

Co-authored-by: Halvor Haugan <83693529+HalvorHaugan@users.noreply.github.com>
2024-03-05 11:46:10 +01:00
Halvor Haugan 08e9876176 Sandbox: Alltid bruk siste versjon av DS-pakkene (#2774) 2024-03-04 14:10:36 +01:00
Ken 331b4c4c00 🎉 Nytt ikon archive@ (#2772) 2024-03-04 14:10:04 +01:00
Halvor Haugan 2b6e9c8798 Oppdater stories for Link (#2770) 2024-03-01 20:00:18 +01:00
Ken 4065ee3987 💄 UXTweaks-hero på forside bruker Amber-farger
Designer ønsket å gjøre hero mer tydelig da dagens 'violet' forsvant mellom elementene
2024-02-29 19:33:30 +01:00
github-actions[bot]andgithub-actions[bot] 59756f32f7 Version Packages (#2764)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2024-02-29 12:21:22 +01:00
Halvor Haugan 9510327abe Link: Fjern hover-farge (#2767) 2024-02-28 15:18:25 +01:00
Christian Skrøvseth 356119e074 Modal: Fiks lukking ved slipp av museknapp på backdrop (#2752) 2024-02-27 15:02:02 +01:00
Halvor Haugan 3d2eab4fda Modal: fiks fokus bug i Safari + endre title på lukkeknappen (#2688) 2024-02-27 09:48:26 +01:00
Halvor Haugan 299c5f1db4 [aksel.nav.no] 🔨 Bytt ut cp med copyfiles (#2753) 2024-02-26 13:28:46 +01:00
Halvor Haugan 6267d0c7fb [aksel.nav.no] 🆙 Oppgradert start-server-and-test (#2759) 2024-02-26 13:26:59 +01:00
Halvor Haugan 44ba2ef7e8 [aksel.nav.no] 🚨 Ikke tillat @ts-ignore (#2758) 2024-02-26 13:07:30 +01:00
Ken 002f6a1b9e [Sanity] Oppdatert sanity minor (#2733)
* 🎉 Oppdatert sanity

* 🐛 Oppdatert import av deprecated desktool i sanity

* ⬆️ yarn sync

* 🐛 IntentButton var oppdatert i ny sanity-versjon
2024-02-26 10:43:00 +01:00
Halvor Haugan 124c28eb0e Oppdatering av eksempler på TextField (#2754) 2024-02-26 10:05:46 +01:00
Halvor Haugan ae7d4d5f07 Oppgradering av deps (#2756) 2024-02-26 09:07:11 +01:00
github-actions[bot]andgithub-actions[bot] bb5dd32357 Version Packages (#2746)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2024-02-21 15:27:30 +01:00
Ken 9581fb33f2 📝 Oppdatert changeset for ny v6.1 release 2024-02-21 15:24:26 +01:00
KenandHalvor Haugan 884bf0c997 [V6 minor] Oppdatert exports av komponenter for å støtte nextjs app router (#2745)
* 🚚 Oppdatert names-exports for expansioncard

* 🚚 Accordion

* 🚚 Alert

* 🚚 Button

* 🚚 Chat

* 🚚 Chips

* 🚚 CopyButton

* 🚚 Date components

* 🚚 Dropdown

* 🚚 Guidepanel

* 🚚 Helptext

* 🚚 InternalHeader

* 🚚 Primitives

* 🚚 Link

* 🚚 LinkPanel

* 🚚 List

* 🚚 Loader

* 🚚 Modal

* 🚚 Portal

* 🚚 Pagination

* 🚚 Popover

* 🚚 Provider

* 🚚 ReadMore

* 🚚 Skeleton

* 🚚 Stepper

* 🚚 Table

* 🚚 Tag

* 🚚 Timeline

* 🚚 ToggleGroup

* 🚚 Tooltip

* 🚚 Typography

* 🚚 Utils

* 🚚 Flyttet forms-komponenter inn i egne mapper

* 🚚 Oppdatert exports for alle skjemakomponenter

* 📝 Oppdatert exports av forms i package.json

* 🐛 Fikset regresjoner etter flytting av filer og exports

* 🐛 Manglet export av errorsummaryitem

* 🐛 Manglet export av search.button

* 🐛 Stories manglet riktig import

* 📝 changeset

* 🐛 Tester var ikke oppdatert med imports

* Update .storybook/main.ts

* 📝 Oppdatert package.json description

* 🎨 Oppdatert export til default-export

* 🐛 Exports av komponenter brakk for utils, combobox

* 🎨 Oppdatert eksempler for next appdir

* 🎨 Oppdatert astro-eksempel

* 📝 Client component test i use client scope

* 📝 Changelogs skrev use client feil

* 🐛 rename fieldset

* 🐛 rename Fieldset -> fieldset

* 🐛 Merge fra main brakk combobox tester og stories med feil import

* Update .changeset/silent-meals-watch-copy.md

---------

Co-authored-by: Halvor Haugan <83693529+HalvorHaugan@users.noreply.github.com>
2024-02-21 15:20:26 +01:00
c0c812b77b 🏷️ fix types for modal issue (#2744)
* 🏷️ fix types for modal issue

* liten style justering

* Tester!

* changeset

* tester test

* tester test 2

* tester test 3

* Revert experiments, add proper tests

* fix Portal.stories.tsx

* 🏷️ Endret rekkefølge på modal conditional-typer for bedre feilmelding

* revert rekkefølge

* testkode

---------

Co-authored-by: Halvor Haugan <halvor.haugan@nav.no>
Co-authored-by: Ken <ken.aleksander@gmail.com>
2024-02-21 13:37:28 +01:00
Julian Nymark fd4358df31 ♻️ update several stories (#2740)
* ♻️ update several stories

* ♻️ textarea

* ♻️ remove unused props + radio, search, select, monthpicker

* ♻️ text-field
2024-02-20 16:35:29 +01:00
Halvor Haugan bf77c03cd8 Modal: Ikke opphev scroll lock ved lukking av nesta modal (#2743) 2024-02-20 15:55:19 +01:00
Ken 91e34e8ad8 [aksel.nav.no] Oppdatert til nextjs v14 (#2737)
* 🚚 Nextjs v14 støtter ikke route-names med default. renamet til demo

* 🎉 Nextjs canary-release for fungrende v14 + middleware

* 🐛 canary-version hadde feil syntax

* 🔥 Fjernet github-pattern fra image-config i next.config.js

* ⬆️ yarn sync
2024-02-19 19:58:11 +01:00
Ken 15f88a104f 🐛 Tester på nettside ble prøvd kjørt i feil workspace 2024-02-19 16:12:50 +01:00
Ken 5100662ea7 ⚡ Skrevet om Jest til Vitest (#2723)
* ⚡ Bruker vitest for Aksel cli

* ⚡ Tokens bruker vitest

* 🔥 Fjernet ubrukte dependencies fra aksel cli

* ♻️ Aksel icons vitest

* ♻️ React bruker vitest

* 🔥 Fjernet ubrukte dependencies

* ⚡ Ser nå hvilken workspace som kjører tester

* ⚡ Vitest på aksel.nav.no

* 🎉 Vitest for aksel

* 🐛 Fikset eslint-feil for vitetest

* 🔥 Fjernet happy-dom

* 🎉 Stylelint bruker native node test-runner og ikke jest lengre

* 🎨 Migrert nye Tabs/ToggleGroup-tester til vitest
2024-02-19 16:03:48 +01:00
github-actions[bot]andgithub-actions[bot] bea55aa8bc Version Packages (#2742)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2024-02-19 15:05:24 +01:00
Ken 7585351483 🐛 Manglende export av _docs.json brakk oppdaterting av sanity-data 2024-02-19 14:51:27 +01:00
KenandHalvor Haugan 636c1ad49b [V6] Major-release (#2623)
* [V6] Deprecated Grid og ContentContainer (#2622)

* 🔥 Fjernet grid css

* 🔥 Fjernet grid tsx

* 🔥 Fjernet content-container fra systemet

* 🐛 la til deprecatePrefix-tag for stylelint

* 📝 Changeset

* Textarea: Fjern wrapper (#2635)

* [V6] Chat-props deprecation (#2631)

* 🎨 Satt opp codemod boilerplate for chat deprecation

* 🐛 v5 -> v6 i codemod

* 🧪 Tester for alias-import av chat

* 🧪 idempotent codemod-test

* 🔥 Fjernet deprecated props fra Chat

* 📝 Changeset

* 📝 Bedre advarsel i chat-codemod

* 📝 v6-migration update

* 🧪 Tester vanlig import av Chat

* 📝 Oppdatert tekster i codemod

* 🔥 Fjernet return fra removeProps

* Update @navikt/aksel/src/codemod/migrations.ts

* [V6] 1440px breakpoint (#2632)

* ✨ La til nytt brekkpunkt 1440px

* 🎉 Bleed støtter 2xl breakpoint

* 🎉 Bleed box 2xl breakpoint

* 🎉 hgrid 2xl breakpoint

* 🎉 resterende primitives støtter 1440px

* 📝 tailwind migreringsdocs

* 🔥 Fjernet navno-mal fra chromatic snapshot

* 📝 Changeset

* 🐛 2xl hgrid css brakk

* 📝 Oppdatert changset med tailwind-ref

* Update @navikt/core/react/src/layout/bleed/Bleed.tsx

* Update @navikt/core/react/src/layout/bleed/Bleed.tsx

* 📝 Mer konsekvent story for breakpoints i box

* 🐛 JSDOC for Bleed matcher nå syntax

* [V6] Fjernet z-index-modal token  (#2637)

* 🔥 Fjernet zindex-modal token

* 📝 Oppdatert docs

* 📝 Changeset

* [V6] ErrorSummary magic (#2642)

* ♻️ Flyttet li-tag fra ErrorSummary-parent til child

* 🏷️ Bedre typer

* 🔒 Heading er nå required i ErrorSummary

* 🎨 Egen prop for ErrorSummary fokus

* 📝 Changeset

* 🎨 Bedre fokushåndtering i ErrorSummary

* ♻️ focusTarget -> focusTargetRef

* 📝 Fikset jsdoc

* 📝 Migreringstekst

* 📝 changeset

* 📝 Migration-text

* 📝 JSDoc-staving

* 📝 Oppdatert migreringsguide for z-index + tailwind

* 🐛 Fikset bruk av z-modal i tailwind

* 🔥 Fjernet openOnFocus-prop fra date

* [V6] Modal: strengere prop-typer (#2718)

* 🎨 SortState i Table har nå none tilgjengelig (#2726)

* [V6] Oppdatert bruk av action-farger (#2717)

* 💄 Button secondary hover

* 💄 Radio/Checkbox action-farger

* :WIP: combobox action-farger

* 🐛 Tilpasset hover-farge på checkbox i confirmationpanel

* 💄 copybutton hover-text action

* 💄 dropdown, helptext hover-text

* 💄 link og linkpanel actionsfarger

* 💄 Search action-farger

* 💄 select action-farger

* 💄 Stepper action

* 💄 Textarea action

* 💄 Textarea og textfield colors

* 🐛 Riktig hover-bakgrunn på combobox selected option

* 📝 Changeset

* 📝 changeset tokens

* 📝 Dokumentert nye tokens

* [V6] Native ESM-støtte 🎉  (#2677)

* 🎨 Fungerende cjs/esm bundle med use-client

* 🎨 Oppdatert dir-output i for esm

* ⬆️ Bump date-fns og react-day-picker

* 🎨 oppdatert date-fns imports

* 🐛 Endret bruk av reat-day-picker i monthpicker

* 🐛 Fikset rendring av button i Datepicker-row

* ♻️ Bruker date-fns imports ssom støtter v2 og v3

* ⬆️ Synced date-fns versions

* ✨ Astro testmiljø

* 📝 Changeset

* 🎨 Skriver packagejson med type for esm

* 🔥 Fjernet .yarn/* fra astro

* 🎨 La til .yarn i gitignore for astro

* ⏪ Bruker riktig ds-react versjon

* ⬆️ Lik tsconfig som ds-react i aksel-icons

* 🐛 La tilbake provernance

* 🐛 Undo Day/Row fix fra main

* 🔥 Fjernet mulighet til å laste date-fns v2

* 🔥 Fjernet fs-extra dependency

* 🐛 Fikset feil versjon på core/react

* [V6] React-pakker støtter nå native SSR ved å bruke `use-client` 🎉  (#2707)

* 🎉 use-client blir lagt til på export av ds-react og aksel-icons

* 🎉 La til nextjs med appdir for testing

* ⚡ Tom yarn.lock med i git

* 📝 changeset

* 📝 Oppdatert migration-guide

* Update @navikt/aksel-icons/config/index-template.js

* 🐛 Async-lasting av date-fns er nå v3 esm compliant

v3 av date-fns støtter ikke default export/import, noe som brakk async-lasting da vi brukte .default

* Search: Ekskluder 'type' fra SearchProps (#2736)

* 🎉 Ny token icon-action-hover

* 🔥 Fjernet v6-endringer for ErrorSummary. Endringer vil bli gjort i en senere major-versjon

* OverridableComponent: Fikset feil som tillot vilkårlige props (#2739)

* 🔥 Fjernet migration.md

---------

Co-authored-by: Halvor Haugan <83693529+HalvorHaugan@users.noreply.github.com>
2024-02-19 14:03:17 +01:00
github-actions[bot]andgithub-actions[bot] aa438a998f Version Packages (#2741)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2024-02-19 11:34:15 +01:00
Ken 74216b6bc9 🎉 Fikset regresjon ved bruk av portal i tooltip (#2738) 2024-02-19 11:31:26 +01:00
674 changed files with 46202 additions and 31654 deletions

No files matched your search

+2 -2
View File
@@ -46,7 +46,8 @@ module.exports = {
},
{
files: ["**/*.test.*", "**/__tests__/*"],
extends: ["plugin:jest/recommended", "plugin:testing-library/react"],
plugins: ["vitest"],
extends: ["plugin:vitest/recommended", "plugin:testing-library/react"],
},
{
@@ -71,7 +72,6 @@ module.exports = {
"error",
"aksel.nav.no/website/pages/",
],
"@typescript-eslint/ban-ts-comment": "off", // Temporary
},
},
{
+1 -1
View File
@@ -21,7 +21,7 @@ add links to project-tasks, slack discussions etc here
- Check that only needed components and types are exported from `@navikt/core/react/src/index.ts`
- Add JSDoc to component (see other components for reference)
- Create storybook-stories for relevant component variations and compositions. Stories are used for [visual regression testing](https://www.chromatic.com/docs/), so make sure they are complete.
- Is the component sufficiently complex to warrant tests? Add some unit-tests for jest.
- Is the component sufficiently complex to warrant tests? Add some unit-tests for vitest.
#### Component-updates 🎉
+10 -11
View File
@@ -14,10 +14,15 @@ jobs:
contents: "read"
id-token: "write"
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: "20"
- uses: actions/checkout@v3
cache: yarn
- name: set-env for yarn install to @navikt scope
shell: bash
run: echo "NPM_AUTH_TOKEN=${{ secrets.READER_TOKEN }}" >> $GITHUB_ENV
- name: add tokens to .env
run: |
echo "SANITY_WRITE_KEY=${{ secrets.SANITY_FEEDBACK_WRITE_KEY }}" >> aksel.nav.no/website/.env
@@ -29,14 +34,6 @@ jobs:
run: |
echo "User-agent: *\nDisallow: /" > aksel.nav.no/website/public/robots.txt
- 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
@@ -46,11 +43,13 @@ jobs:
yarn workspace aksel.nav.no build:next
- name: Upload static files to NAV CDN
uses: navikt/frontend/actions/cdn-upload/v1@main
uses: nais/deploy/actions/cdn-upload/v2@master
with:
cdn-team-name: aksel
team: designsystem
source: ./aksel.nav.no/website/.next/static
destination: "/website/_next"
project_id: ${{ vars.NAIS_MANAGEMENT_PROJECT_ID }}
identity_provider: ${{ secrets.NAIS_WORKLOAD_IDENTITY_PROVIDER }}
- name: Get complete tag
run: echo "TAG=DEV-$( date +%s )" >> $GITHUB_ENV
+19 -21
View File
@@ -14,22 +14,20 @@ jobs:
name: Update component data
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: "20"
- uses: actions/checkout@v3
cache: yarn
- name: set-env for yarn install to @navikt scope
shell: bash
run: echo "NPM_AUTH_TOKEN=${{ secrets.READER_TOKEN }}" >> $GITHUB_ENV
- name: add tokens to .env
run: |
echo "SANITY_WRITE_KEY=${{ secrets.SANITY_FEEDBACK_WRITE_KEY }}" >> 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
@@ -49,10 +47,16 @@ jobs:
contents: "read"
id-token: "write"
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: "20"
- uses: actions/checkout@v3
cache: yarn
- name: set-env for yarn install to @navikt scope
shell: bash
run: echo "NPM_AUTH_TOKEN=${{ secrets.READER_TOKEN }}" >> $GITHUB_ENV
- name: add tokens to .env
run: |
echo "SANITY_WRITE_KEY=${{ secrets.SANITY_FEEDBACK_WRITE_KEY }}" >> aksel.nav.no/website/.env
@@ -60,14 +64,6 @@ jobs:
echo "SANITY_PRIVATE_NO_DRAFTS=${{ secrets.SANITY_PRIVATE_NO_DRAFTS }}" >> aksel.nav.no/website/.env
echo "USE_CDN_ASSETS=true" >> aksel.nav.no/website/.env
- name: Restore cache
uses: actions/cache@v3
with:
path: "**/node_modules"
key: ${{ runner.os }}-prod-${{ github.sha }}
restore-keys: |
${{ runner.os }}-prod-
- name: Install dependencies
run: yarn
@@ -75,17 +71,19 @@ jobs:
run: yarn boot
- name: Tests
run: yarn workspace aksel.nav.no test
run: yarn workspace website test
- name: Build application
run: yarn workspace aksel.nav.no build:next
- name: Upload static files to NAV CDN
uses: navikt/frontend/actions/cdn-upload/v1@main
uses: nais/deploy/actions/cdn-upload/v2@master
with:
cdn-team-name: aksel
team: designsystem
source: ./aksel.nav.no/website/.next/static
destination: "/website/_next"
project_id: ${{ vars.NAIS_MANAGEMENT_PROJECT_ID }}
identity_provider: ${{ secrets.NAIS_WORKLOAD_IDENTITY_PROVIDER }}
- name: Get complete tag
run: echo "TAG=PROD-$( date +%s )" >> $GITHUB_ENV
+5 -7
View File
@@ -11,17 +11,15 @@ jobs:
- uses: actions/checkout@v3
with:
fetch-depth: 0 # Required to retrieve git history
- uses: actions/setup-node@v3
with:
node-version: "20"
cache: yarn
- name: set-env for yarn install to @navikt scope
shell: bash
run: echo "NPM_AUTH_TOKEN=${{ secrets.READER_TOKEN }}" >> $GITHUB_ENV
- 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
+3 -8
View File
@@ -24,14 +24,9 @@ jobs:
with:
node-version: "20"
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: set-env for yarn install to @navikt scope
shell: bash
run: echo "NPM_AUTH_TOKEN=${{ secrets.READER_TOKEN }}" >> $GITHUB_ENV
- name: Install dependencies
run: yarn
+4 -8
View File
@@ -19,6 +19,10 @@ jobs:
- uses: actions/setup-node@v3
with:
node-version: "20"
cache: yarn
- name: set-env for yarn install to @navikt scope
shell: bash
run: echo "NPM_AUTH_TOKEN=${{ secrets.READER_TOKEN }}" >> $GITHUB_ENV
- name: add tokens to .env
run: |
@@ -26,14 +30,6 @@ jobs:
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
+4 -2
View File
@@ -20,11 +20,13 @@ jobs:
- uses: "actions/checkout@v3"
- id: upload
uses: navikt/frontend/actions/cdn-upload/v1@main
uses: nais/deploy/actions/cdn-upload/v2@master
with:
cdn-team-name: aksel
team: aksel
source: ./fonts
destination: "" # uploads folder to team root
project_id: ${{ vars.NAIS_MANAGEMENT_PROJECT_ID }}
identity_provider: ${{ secrets.NAIS_WORKLOAD_IDENTITY_PROVIDER }}
- run: echo uploaded file ${{ steps.upload.outputs.uploaded }}
shell: bash
+11 -12
View File
@@ -30,19 +30,14 @@ jobs:
with:
node-version: "20"
cache: yarn
- name: set-env for yarn install to @navikt scope
shell: bash
run: echo "NPM_AUTH_TOKEN=${{ secrets.READER_TOKEN }}" >> $GITHUB_ENV
- uses: denoland/setup-deno@v1
with:
deno-version: v1.x
- 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
@@ -85,11 +80,13 @@ jobs:
- name: Upload updated icon.zip to NAV CDN
if: steps.changesets.outputs.published == 'true'
uses: navikt/frontend/actions/cdn-upload/v1@main
uses: nais/deploy/actions/cdn-upload/v2@master
with:
cdn-team-name: aksel
team: aksel
source: ./@navikt/aksel-icons/aksel-icons.zip
destination: "/icons/zip"
project_id: ${{ vars.NAIS_MANAGEMENT_PROJECT_ID }}
identity_provider: ${{ secrets.NAIS_WORKLOAD_IDENTITY_PROVIDER }}
- name: Get @navikt/ds-css version
run: |
@@ -99,8 +96,10 @@ jobs:
- name: Upload CSS to NAV CDN
if: steps.changesets.outputs.published == 'true'
uses: navikt/frontend/actions/cdn-upload/v1@main
uses: nais/deploy/actions/cdn-upload/v2@master
with:
cdn-team-name: aksel
team: aksel
source: ./@navikt/core/css/dist/version/${{env.version}}
destination: "@navikt/ds-css"
project_id: ${{ vars.NAIS_MANAGEMENT_PROJECT_ID }}
identity_provider: ${{ secrets.NAIS_WORKLOAD_IDENTITY_PROVIDER }}
File renamed without changes.
+2 -7
View File
@@ -4,10 +4,7 @@ import turbosnap from "vite-plugin-turbosnap";
export default {
staticDirs: ["./public"],
stories: () => [
"../@navikt/**/*.stories.@(js|jsx|ts|tsx|mdx)",
"./*.stories.mdx",
],
stories: () => ["../@navikt/**/*.stories.@(js|jsx|ts|tsx|mdx)", "./*.mdx"],
addons: [
"@storybook/addon-a11y",
"@xfinx/storybook-addon-html",
@@ -29,14 +26,12 @@ export default {
},
},
},
"storybook-addon-pseudo-states",
],
framework: {
name: "@storybook/react-vite",
options: {},
},
features: {
storyStoreV7: true,
},
docs: {
autodocs: "tag",
},
+6
View File
@@ -2,6 +2,12 @@ enableImmutableInstalls: false
nodeLinker: node-modules
npmScopes:
navikt:
npmAlwaysAuth: true
npmAuthToken: "${NPM_AUTH_TOKEN:-}"
npmRegistryServer: "https://npm.pkg.github.com"
plugins:
- path: .yarn/plugins/@yarnpkg/plugin-workspace-tools.cjs
spec: "@yarnpkg/plugin-workspace-tools"
+32
View File
@@ -1,5 +1,37 @@
# @navikt/aksel-icons
## 6.3.3
## 6.3.2
## 6.3.1
## 6.3.0
## 6.2.0
### Minor Changes
- Ikoner: Nytt ikon `archive` ([#2772](https://github.com/navikt/aksel/pull/2772))
- Ikoner: Nytt ikon `opensource` ([#2787](https://github.com/navikt/aksel/pull/2787))
## 6.1.1
## 6.1.0
## 6.0.0
### Major Changes
- ESM: ds-react og aksel-icons støtter nå native ESM 🎉 ([#2623](https://github.com/navikt/aksel/pull/2623))
### Minor Changes
- SSR: ds-react og aksel-icons støtter nå `use client` og kan brukes i nextjs app-router uten lokal re-eksportering. ([#2623](https://github.com/navikt/aksel/pull/2623))
## 5.18.3
## 5.18.2
## 5.18.1
@@ -1,7 +1,8 @@
const fastglob = require("fast-glob");
const path = require("path");
const jsYaml = require("js-yaml");
const fs = require("fs");
import fastglob from "fast-glob";
import fs from "fs";
import jsYaml from "js-yaml";
import path from "path";
import { describe, expect, test } from "vitest";
const basePath = path.resolve(__dirname, "../icons");
@@ -11,7 +12,7 @@ const ymlList = fastglob
describe(`Each icons YML-config is valid`, () => {
ymlList.forEach((file) => {
it(`${file} has valid YML-config`, () => {
test(`${file} has valid YML-config`, () => {
const ymlData = jsYaml.load(fs.readFileSync(`${basePath}/${file}`), {
schema: jsYaml.JSON_SCHEMA,
});
@@ -1,5 +1,6 @@
const fastglob = require("fast-glob");
const path = require("path");
import fastglob from "fast-glob";
import path from "path";
import { describe, expect, test } from "vitest";
const basePath = path.resolve(__dirname, "../icons");
@@ -12,7 +13,7 @@ const ymlList = fastglob
.map((fileN) => path.basename(fileN));
describe(`Each SVG-file has a matching YML file`, () => {
it(`must have a corresponding YML file`, () => {
test(`must have a corresponding YML file`, () => {
expect(
ymlList
.map((yml) => yml.replace(".yml", ".svg"))
@@ -22,7 +23,7 @@ describe(`Each SVG-file has a matching YML file`, () => {
});
describe(`Each YML-file has a matching SVG file`, () => {
it(`must have a corresponding SVG file`, () => {
test(`must have a corresponding SVG file`, () => {
expect(
svgList
.map((svg) => svg.replace(".svg", ".yml"))
@@ -1,3 +1,4 @@
import { describe, expect, test } from "vitest";
import { parseIcon } from "../config/parse-svg";
describe(`SVG should be correctly parsed`, () => {
@@ -27,7 +28,7 @@ describe(`SVG should be correctly parsed`, () => {
</svg>
`;
it("a", () => {
test("a", () => {
expect(parseIcon(simpleSvg)).toEqual(simpleSvgResult);
expect(parseIcon(advancedSvg)).toEqual(advancedSvgResult);
});
@@ -4,6 +4,7 @@ import { select, selectAll } from "hast-util-select";
import { basename } from "path";
import parse from "rehype-parse";
import { unified } from "unified";
import { describe, expect, test } from "vitest";
const basePath = "./icons";
@@ -18,39 +19,44 @@ describe(`Each icons has a valid code`, () => {
.use(parse, { fragment: true, space: "svg" })
.parse(readFileSync(`${basePath}/${file}`));
it(`has valid attributes on root-node`, () => {
const properties = Object.keys(
select(":root", iconAst).properties,
).sort();
test(`has valid attributes on root-node`, () => {
const root = select(":root", iconAst);
const properties =
root && root.properties ? Object.keys(root.properties).sort() : [];
expect(properties).toStrictEqual(
["viewBox", "xmlns", "height", "width", "fill"].sort(),
);
});
it(`has valid xml-attr`, () => {
const xmlns = select(":root", iconAst).properties.xmlns;
test(`has valid xml-attr`, () => {
const root = select(":root", iconAst);
const xmlns = root && root.properties ? root.properties.xmlns : null;
expect(xmlns).toBe("http://www.w3.org/2000/svg");
});
it(`has valid viewbox`, () => {
const viewbox = select(":root", iconAst).properties.viewBox;
test(`has valid viewbox`, () => {
const root = select(":root", iconAst);
const viewbox =
root && root.properties ? root.properties.viewBox : null;
expect(viewbox).toBe("0 0 24 24");
});
it(`root fill is none`, () => {
const fill = select(":root", iconAst).properties.fill;
test(`root fill is none`, () => {
const root = select(":root", iconAst);
const fill = root && root.properties ? root.properties.fill : null;
expect(fill).toBe("none");
});
it(`has valid width and height`, () => {
const width = select(":root", iconAst).properties.width;
const height = select(":root", iconAst).properties.height;
test(`has valid width and height`, () => {
const root = select(":root", iconAst);
const width = root && root.properties ? root.properties.width : null;
const height = root && root.properties ? root.properties.height : null;
expect(width).toBe("24");
expect(height).toBe("24");
});
it(`has valid stroke`, () => {
test(`has valid stroke`, () => {
const nodes = selectAll("*", iconAst);
nodes.forEach((n) => {
@@ -59,7 +65,7 @@ describe(`Each icons has a valid code`, () => {
});
});
it(`has valid stroke-width`, () => {
test(`has valid stroke-width`, () => {
const nodes = selectAll("*", iconAst);
nodes.forEach((n) => {
n.properties?.strokeWidth &&
+1
View File
@@ -25,6 +25,7 @@ const template = (variables, { tpl }) => {
};
return tpl`
"use client";
${imports};
${variables.interfaces};
@@ -6,5 +6,8 @@
"ui": "dist/index.html",
"capabilities": [],
"enableProposedApi": false,
"editorType": ["figma", "figjam"]
"editorType": ["figma", "figjam"],
"networkAccess": {
"allowedDomains": ["none"]
}
}
+3
View File
@@ -0,0 +1,3 @@
<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
<path fill-rule="evenodd" clip-rule="evenodd" d="M3.25 4C3.25 3.58579 3.58579 3.25 4 3.25H20C20.4142 3.25 20.75 3.58579 20.75 4V8C20.75 8.41421 20.4142 8.75 20 8.75H19.75V19C19.75 19.9665 18.9665 20.75 18 20.75H6C5.0335 20.75 4.25 19.9665 4.25 19V8.75H4C3.58579 8.75 3.25 8.41421 3.25 8V4ZM5.75 8.75H18.25V19C18.25 19.1381 18.1381 19.25 18 19.25H6C5.86193 19.25 5.75 19.1381 5.75 19V8.75ZM4.75 4.75V7.25H19.25V4.75H4.75ZM14 13.25C14.4142 13.25 14.75 12.9142 14.75 12.5C14.75 12.0858 14.4142 11.75 14 11.75H10C9.58579 11.75 9.25 12.0858 9.25 12.5C9.25 12.9142 9.58579 13.25 10 13.25H14Z" fill="#23262A"/>
</svg>

After

Width:  |  Height:  |  Size: 707 B

+10
View File
@@ -0,0 +1,10 @@
name: Archive
category: Interface
sub_category: Communication
keywords:
- arkiv
- box
- boks
variant: Stroke
updated_at: 22.02.2024
created_at: 22.02.2024
@@ -0,0 +1,3 @@
<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
<path fill-rule="evenodd" clip-rule="evenodd" d="M4 3.25C3.58579 3.25 3.25 3.58579 3.25 4V7.5C3.25 7.91421 3.58579 8.25 4 8.25H20C20.4142 8.25 20.75 7.91421 20.75 7.5V4C20.75 3.58579 20.4142 3.25 20 3.25H4ZM19.5 9.25C19.6381 9.25 19.75 9.36193 19.75 9.5V19C19.75 19.9665 18.9665 20.75 18 20.75H6C5.0335 20.75 4.25 19.9665 4.25 19V9.5C4.25 9.36193 4.36193 9.25 4.5 9.25H19.5ZM14.75 12.5C14.75 12.9142 14.4142 13.25 14 13.25H10C9.58579 13.25 9.25 12.9142 9.25 12.5C9.25 12.0858 9.58579 11.75 10 11.75H14C14.4142 11.75 14.75 12.0858 14.75 12.5Z" fill="#23262A"/>
</svg>

After

Width:  |  Height:  |  Size: 663 B

+10
View File
@@ -0,0 +1,10 @@
name: ArchiveFill
category: Interface
sub_category: Communication
keywords:
- arkiv
- box
- boks
variant: Fill
updated_at: 22.02.2024
created_at: 22.02.2024
@@ -13,5 +13,5 @@ keywords:
- reload
- oppdater
variant: Stroke
updated_at: 04.12.2023
updated_at: 14.02.2024
created_at: 07.03.2023
+1 -1
View File
@@ -9,5 +9,5 @@ keywords:
- nivå
- innrykk
variant: Stroke
updated_at: 04.12.2023
updated_at: 16.01.2024
created_at: 04.12.2023
+1 -1
View File
@@ -13,5 +13,5 @@ keywords:
- forward
- videresend
variant: Stroke
updated_at: 04.12.2023
updated_at: 23.02.2024
created_at: 07.03.2023
@@ -13,5 +13,5 @@ keywords:
- oppfrisking
- oppdatering
variant: Stroke
updated_at: 04.12.2023
updated_at: 29.02.2024
created_at: 07.03.2023
+1 -1
View File
@@ -9,5 +9,5 @@ keywords:
- sortering
- sorting
variant: Stroke
updated_at: 04.12.2023
updated_at: 22.02.2024
created_at: 07.03.2023
+1 -1
View File
@@ -15,5 +15,5 @@ keywords:
- Sammenføye
- Kildekontroll
variant: Stroke
updated_at: 04.12.2023
updated_at: 18.01.2024
created_at: 07.03.2023
@@ -5,5 +5,5 @@ keywords:
- ned
- down
variant: Stroke
updated_at: 04.12.2023
updated_at: 25.01.2024
created_at: 07.03.2023
@@ -5,5 +5,5 @@ keywords:
- left
- venstre
variant: Stroke
updated_at: 04.12.2023
updated_at: 11.03.2024
created_at: 07.03.2023
@@ -5,5 +5,5 @@ keywords:
- opp
- up
variant: Stroke
updated_at: 04.12.2023
updated_at: 25.01.2024
created_at: 07.03.2023
+1 -1
View File
@@ -8,5 +8,5 @@ keywords:
- Utvide/skjule
- vise/skjule
variant: Stroke
updated_at: 04.12.2023
updated_at: 04.03.2024
created_at: 07.03.2023
+1 -1
View File
@@ -15,5 +15,5 @@ keywords:
- markup-språk
- kildekode
variant: Stroke
updated_at: 04.12.2023
updated_at: 01.03.2024
created_at: 07.03.2023
+1 -1
View File
@@ -7,5 +7,5 @@ keywords:
- downloading
- last ned
variant: Stroke
updated_at: 04.12.2023
updated_at: 08.03.2024
created_at: 07.03.2023
+1 -1
View File
@@ -5,5 +5,5 @@ keywords:
- trapp
- rulletrapp
variant: Stroke
updated_at: 04.12.2023
updated_at: 12.03.2024
created_at: 07.03.2023
+1 -1
View File
@@ -9,5 +9,5 @@ keywords:
- open
- åpne
variant: Stroke
updated_at: 04.12.2023
updated_at: 24.01.2024
created_at: 07.03.2023
+1 -1
View File
@@ -13,5 +13,5 @@ keywords:
- fremdrift
- nedtelling
variant: Stroke
updated_at: 04.12.2023
updated_at: 21.02.2024
created_at: 07.03.2023
@@ -13,5 +13,5 @@ keywords:
- fremdrift
- nedtelling
variant: Stroke
updated_at: 04.12.2023
updated_at: 22.01.2024
created_at: 07.03.2023
@@ -13,5 +13,5 @@ keywords:
- fremdrift
- nedtelling
variant: Stroke
updated_at: 04.12.2023
updated_at: 16.01.2024
created_at: 07.03.2023
+1 -1
View File
@@ -8,5 +8,5 @@ keywords:
- replace
- new version
variant: Stroke
updated_at: 04.12.2023
updated_at: 18.01.2024
created_at: 07.03.2023
+3
View File
@@ -0,0 +1,3 @@
<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
<path fill-rule="evenodd" clip-rule="evenodd" d="M6.06458 4.26481C7.76736 2.95822 9.85369 2.25 12 2.25C14.1463 2.25 16.2326 2.95821 17.9354 4.2648C19.6382 5.57139 20.8623 7.40334 21.4178 9.47651C21.9733 11.5497 21.8292 13.7482 21.0078 15.7312C20.1865 17.7141 18.7338 19.3706 16.875 20.4437C16.7027 20.5432 16.498 20.5702 16.3059 20.5187C16.1138 20.4672 15.9499 20.3415 15.8505 20.1692L12.7005 14.7133C12.601 14.541 12.5741 14.3363 12.6256 14.1442C12.677 13.952 12.8027 13.7882 12.975 13.6887C13.3468 13.4741 13.6373 13.1428 13.8016 12.7462C13.9658 12.3496 13.9947 11.9099 13.8836 11.4953C13.7725 11.0807 13.5276 10.7143 13.1871 10.453C12.8465 10.1916 12.4293 10.05 12 10.05C11.5707 10.05 11.1535 10.1916 10.8129 10.453C10.4724 10.7143 10.2275 11.0807 10.1164 11.4953C10.0053 11.9099 10.0342 12.3496 10.1984 12.7462C10.3627 13.1428 10.6533 13.4741 11.025 13.6887C11.1973 13.7882 11.323 13.952 11.3744 14.1442C11.4259 14.3363 11.399 14.541 11.2995 14.7133L8.14952 20.1692C8.05007 20.3415 7.88625 20.4672 7.69412 20.5187C7.50198 20.5702 7.29727 20.5432 7.125 20.4437C5.26625 19.3706 3.81354 17.7141 2.99218 15.7312C2.17082 13.7482 2.02672 11.5497 2.58223 9.47652C3.13773 7.40334 4.3618 5.5714 6.06458 4.26481ZM12 3.75C10.1839 3.75 8.41854 4.34926 6.97772 5.45484C5.53691 6.56041 4.50116 8.11052 4.03112 9.86474C3.56107 11.619 3.683 13.4793 4.378 15.1571C4.97686 16.6029 5.97237 17.8436 7.24256 18.7401L9.66674 14.5413C9.29868 14.2034 9.00613 13.7874 8.81262 13.3203C8.52199 12.6186 8.471 11.8407 8.66756 11.1071C8.86412 10.3735 9.29725 9.72526 9.89978 9.26293C10.5023 8.8006 11.2405 8.55 12 8.55C12.7595 8.55 13.4977 8.8006 14.1002 9.26293C14.7028 9.72526 15.1359 10.3735 15.3324 11.1071C15.529 11.8407 15.478 12.6186 15.1874 13.3203C14.9939 13.7874 14.7013 14.2034 14.3333 14.5413L16.7574 18.7401C18.0276 17.8436 19.0231 16.6029 19.622 15.1571C20.317 13.4793 20.4389 11.619 19.9689 9.86474C19.4988 8.11052 18.4631 6.56041 17.0223 5.45483C15.5815 4.34926 13.8161 3.75 12 3.75Z" fill="#23262A"/>
</svg>

After

Width:  |  Height:  |  Size: 2.0 KiB

+19
View File
@@ -0,0 +1,19 @@
name: OpenSource
category: Development
sub_category: Development
keywords:
- location
- tracking
- identification
- signaling
- broadcasting
- detection
- lokalisering
- sporing
- identifikasjon
- signalisering
- kringkasting
- deteksjon
variant: Stroke
updated_at: 08.03.2024
created_at: 07.03.2023
@@ -0,0 +1,3 @@
<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
<path fill-rule="evenodd" clip-rule="evenodd" d="M6.06458 4.26481C7.76736 2.95822 9.85369 2.25 12 2.25C14.1463 2.25 16.2326 2.95821 17.9354 4.2648C19.6382 5.57139 20.8623 7.40334 21.4178 9.47651C21.9733 11.5497 21.8292 13.7482 21.0078 15.7312C20.1865 17.7141 18.7338 19.3706 16.875 20.4437C16.7027 20.5432 16.498 20.5702 16.3059 20.5187C16.1138 20.4672 15.9499 20.3415 15.8505 20.1692L12.7005 14.7133C12.601 14.541 12.5741 14.3363 12.6256 14.1442C12.677 13.952 12.8027 13.7882 12.975 13.6887C13.3468 13.4741 13.6373 13.1428 13.8016 12.7462C13.9658 12.3496 13.9947 11.9099 13.8836 11.4953C13.7725 11.0807 13.5276 10.7143 13.1871 10.453C12.8465 10.1916 12.4293 10.05 12 10.05C11.5707 10.05 11.1535 10.1916 10.8129 10.453C10.4724 10.7143 10.2275 11.0807 10.1164 11.4953C10.0053 11.9099 10.0342 12.3496 10.1984 12.7462C10.3627 13.1428 10.6533 13.4741 11.025 13.6887C11.1973 13.7882 11.323 13.952 11.3744 14.1442C11.4259 14.3363 11.399 14.541 11.2995 14.7133L8.14952 20.1692C8.05007 20.3415 7.88625 20.4672 7.69412 20.5187C7.50198 20.5702 7.29727 20.5432 7.125 20.4437C5.26625 19.3706 3.81354 17.7141 2.99218 15.7312C2.17082 13.7482 2.02672 11.5497 2.58223 9.47652C3.13773 7.40334 4.3618 5.5714 6.06458 4.26481Z" fill="#23262A"/>
</svg>

After

Width:  |  Height:  |  Size: 1.3 KiB

@@ -0,0 +1,19 @@
name: OpenSourceFill
category: Development
sub_category: Development
keywords:
- location
- tracking
- identification
- signaling
- broadcasting
- detection
- lokalisering
- sporing
- identifikasjon
- signalisering
- kringkasting
- deteksjon
variant: Fill
updated_at: 08.03.2024
created_at: 07.03.2023
+1 -1
View File
@@ -9,5 +9,5 @@ keywords:
- hidden
- show/hide
variant: Stroke
updated_at: 04.12.2023
updated_at: 18.01.2024
created_at: 07.03.2023
+1 -1
View File
@@ -1,3 +1,3 @@
<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
<path fill-rule="evenodd" clip-rule="evenodd" d="M12.4445 6.61612C12.679 6.3817 12.9969 6.25 13.3284 6.25H17.5C17.6381 6.25 17.75 6.36193 17.75 6.5V10.6716C17.75 11.0031 17.6183 11.321 17.3839 11.5555L9.17678 19.7626C9.07915 19.8602 8.92086 19.8602 8.82322 19.7626L4.23744 15.1768C4.13981 15.0791 4.13981 14.9209 4.23744 14.8232L12.4445 6.61612ZM13.3284 4.75C12.5991 4.75 11.8996 5.03973 11.3839 5.55546L3.17678 13.7626C2.49336 14.446 2.49336 15.554 3.17678 16.2374L7.76256 20.8232C8.44598 21.5066 9.55402 21.5066 10.2374 20.8232L18.4445 12.6161C18.9603 12.1004 19.25 11.4009 19.25 10.6716V6.5C19.25 5.5335 18.4665 4.75 17.5 4.75H13.3284ZM14.5 11C15.3284 11 16 10.3284 16 9.5C16 8.67157 15.3284 8 14.5 8C13.6716 8 13 8.67157 13 9.5C13 10.3284 13.6716 11 14.5 11Z" fill="#23262A"/>
<path fill-rule="evenodd" clip-rule="evenodd" d="M13.4403 5.61612C13.6748 5.3817 13.9927 5.25 14.3242 5.25H18.4958C18.6339 5.25 18.7458 5.36193 18.7458 5.5V9.67157C18.7458 10.0031 18.6141 10.321 18.3797 10.5555L10.1726 18.7626C10.0749 18.8602 9.91664 18.8602 9.81901 18.7626L5.23323 14.1768C5.1356 14.0791 5.1356 13.9209 5.23323 13.8232L13.4403 5.61612ZM14.3242 3.75C13.5949 3.75 12.8954 4.03973 12.3797 4.55546L4.17257 12.7626C3.48915 13.446 3.48915 14.554 4.17257 15.2374L8.75835 19.8232C9.44177 20.5066 10.5498 20.5066 11.2332 19.8232L19.4403 11.6161C19.9561 11.1004 20.2458 10.4009 20.2458 9.67157V5.5C20.2458 4.5335 19.4623 3.75 18.4958 3.75H14.3242ZM15.4958 10C16.3242 10 16.9958 9.32843 16.9958 8.5C16.9958 7.67157 16.3242 7 15.4958 7C14.6674 7 13.9958 7.67157 13.9958 8.5C13.9958 9.32843 14.6674 10 15.4958 10Z" fill="#23262A"/>
</svg>

Before

Width:  |  Height:  |  Size: 884 B

After

Width:  |  Height:  |  Size: 940 B

+1 -1
View File
@@ -12,5 +12,5 @@ keywords:
- organisering
- identifisering
variant: Stroke
updated_at: 12.12.2023
updated_at: 13.03.2024
created_at: 07.03.2023
+1 -1
View File
@@ -1,3 +1,3 @@
<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
<path fill-rule="evenodd" clip-rule="evenodd" d="M13.3284 4.75C12.5991 4.75 11.8996 5.03973 11.3839 5.55546L3.17678 13.7626C2.49336 14.446 2.49336 15.554 3.17678 16.2374L7.76256 20.8232C8.44598 21.5066 9.55402 21.5066 10.2374 20.8232L18.4445 12.6161C18.9603 12.1004 19.25 11.4009 19.25 10.6716V6.5C19.25 5.5335 18.4665 4.75 17.5 4.75H13.3284ZM14.5 11C15.3284 11 16 10.3284 16 9.5C16 8.67157 15.3284 8 14.5 8C13.6716 8 13 8.67157 13 9.5C13 10.3284 13.6716 11 14.5 11Z" fill="#23262A"/>
<path fill-rule="evenodd" clip-rule="evenodd" d="M14.3242 3.75C13.5949 3.75 12.8954 4.03973 12.3797 4.55546L4.17257 12.7626C3.48915 13.446 3.48915 14.554 4.17257 15.2374L8.75835 19.8232C9.44177 20.5066 10.5498 20.5066 11.2332 19.8232L19.4403 11.6161C19.9561 11.1004 20.2458 10.4009 20.2458 9.67157V5.5C20.2458 4.5335 19.4623 3.75 18.4958 3.75H14.3242ZM15.4958 10C16.3242 10 16.9958 9.32843 16.9958 8.5C16.9958 7.67157 16.3242 7 15.4958 7C14.6674 7 13.9958 7.67157 13.9958 8.5C13.9958 9.32843 14.6674 10 15.4958 10Z" fill="#23262A"/>
</svg>

Before

Width:  |  Height:  |  Size: 588 B

After

Width:  |  Height:  |  Size: 636 B

+1 -1
View File
@@ -12,5 +12,5 @@ keywords:
- organisering
- identifisering
variant: Fill
updated_at: 12.12.2023
updated_at: 13.03.2024
created_at: 07.03.2023
+1 -1
View File
@@ -6,5 +6,5 @@ keywords:
- vektløfting
- tungt
variant: Stroke
updated_at: 04.12.2023
updated_at: 11.03.2024
created_at: 07.03.2023
+21 -23
View File
@@ -1,6 +1,6 @@
{
"name": "@navikt/aksel-icons",
"version": "5.18.2",
"version": "6.3.3",
"author": "Aksel | NAV",
"homepage": "https://aksel.nav.no/ikoner",
"repository": {
@@ -20,24 +20,28 @@
"access": "public",
"provenance": true
},
"sideEffects": [
"*.svg"
],
"sideEffects": false,
"license": "MIT",
"main": "./dist/react/cjs/index.js",
"module": "./dist/react/esm/index.js",
"typings": "./dist/react/esm/index.d.ts",
"exports": {
".": {
"types": "./dist/react/esm/index.d.ts",
"import": "./dist/react/esm/index.js",
"require": "./dist/react/cjs/index.js"
"import": {
"types": "./dist/react/esm/index.d.ts",
"default": "./dist/react/esm/index.js"
},
"require": {
"types": "./dist/react/cjs/index.d.ts",
"default": "./dist/react/cjs/index.js"
}
},
"./svg/*.svg": "./dist/svg/*.svg",
"./metadata": {
"types": "./dist/metadata.d.ts",
"default": "./dist/metadata.js"
}
},
"./svg/*.svg": "./dist/svg/*.svg",
"./package.json": "./package.json"
},
"typesVersions": {
"*": {
@@ -55,10 +59,12 @@
"parse-svg": "node -e 'require(\"./config/parse-svg.js\").main()'",
"copy": "copyfiles util/* src",
"update-metadata": "node config/metadata.js",
"build": "yarn copy && yarn create-icons && concurrently \"tsc\" \"tsc -p tsconfig.esm.json\" && node config/cleanTypes.js && yarn update-metadata && yarn parse-svg",
"test": "NODE_OPTIONS=--experimental-vm-modules jest",
"write-packagejson": "echo '{\"type\": \"module\"}' > dist/react/esm/package.json",
"build": "yarn copy && yarn create-icons && concurrently \"tsc\" \"tsc -p tsconfig.esm.json && tsc-alias -p tsconfig.esm.json && yarn write-packagejson\" && node config/cleanTypes.js && yarn update-metadata && yarn parse-svg",
"fetch-new:icons": "node config/figma/index.mjs",
"zip:icons": "node config/zip.js"
"zip:icons": "node config/zip.js",
"test": "vitest run",
"test:watch": "vitest watch"
},
"devDependencies": {
"@svgr/cli": "6.5.1",
@@ -69,22 +75,14 @@
"dotenv": "^10.0.0",
"fast-glob": "3.2.11",
"hast-util-select": "5.0.5",
"jest": "^29.0.0",
"js-yaml": "^4.1.0",
"lodash.camelcase": "4.3.0",
"lodash.startcase": "4.4.0",
"react": "^18.0.0",
"rehype-parse": "8.0.4",
"tsc-alias": "1.8.8",
"typescript": "^5.1.6",
"unified": "10.1.2"
},
"jest": {
"transformIgnorePatterns": [
"node_modules/unified/*"
],
"testMatch": [
"**/__tests__/*.js",
"**/__tests__/*.mjs"
]
"unified": "10.1.2",
"vitest": "^1.2.2"
}
}
+5 -1
View File
@@ -3,7 +3,11 @@
"compilerOptions": {
"outDir": "./dist/react/esm",
"module": "esnext",
"sourceMap": false,
"sourceMap": true,
"declaration": true
},
"tsc-alias": {
"resolveFullPaths": true,
"verbose": false
}
}
+3 -1
View File
@@ -3,7 +3,9 @@
"compilerOptions": {
"outDir": "./dist/react/cjs",
"module": "commonjs",
"skipLibCheck": true
"skipLibCheck": true,
"declaration": true,
"sourceMap": true
},
"exclude": ["./util", "./__tests__", "**/*.stories.*"],
"include": ["./src"]
+22
View File
@@ -1,5 +1,27 @@
# @navikt/aksel-stylelint
## 6.3.3
## 6.3.2
## 6.3.1
## 6.3.0
## 6.2.0
## 6.1.1
## 6.1.0
## 6.0.0
### Major Changes
- Textarea: Fjernet div med klassen navds-textarea\_\_wrapper ([#2623](https://github.com/navikt/aksel/pull/2623))
## 5.18.3
## 5.18.2
## 5.18.1
+6 -18
View File
@@ -1,6 +1,6 @@
{
"name": "@navikt/aksel-stylelint",
"version": "5.18.2",
"version": "6.3.3",
"author": "Aksel | NAV",
"homepage": "https://aksel.nav.no/grunnleggende/kode/stylelint",
"repository": {
@@ -26,7 +26,7 @@
"/dist"
],
"scripts": {
"test": "jest",
"test": "yarn build && node --import tsx --test ./dist/**/*.test.js",
"copy-css": "node -e \"require('fs').copyFileSync('../core/css/dist/index.css','dist/index.css')\"",
"copy-tokens": "node -e \"require('fs').copyFileSync('../core/css/tokens.json','dist/tokens.json')\"",
"copy": "yarn copy-css && yarn copy-tokens",
@@ -35,26 +35,14 @@
"dev": "yarn watch:lint"
},
"devDependencies": {
"@navikt/ds-css": "^5.18.2",
"@navikt/ds-tokens": "^5.18.2",
"@types/jest": "^29.0.0",
"@navikt/ds-css": "^6.3.3",
"@navikt/ds-tokens": "^6.3.3",
"concurrently": "7.2.1",
"copyfiles": "2.4.1",
"jest": "^29.0.0",
"jest-preset-stylelint": "^6.1.0",
"postcss-selector-parser": "^6.0.13",
"postcss-value-parser": "^4.2.0",
"stylelint": "^14.8.5",
"ts-jest": "^29.0.0",
"stylelint-test-rule-node": "^0.2.1",
"tsx": "^4.7.1",
"typescript": "^5.1.6"
},
"jest": {
"preset": "jest-preset-stylelint",
"testMatch": [
"**/*.test.ts"
],
"transform": {
"^.+\\.ts?$": "ts-jest"
}
}
}
@@ -50,4 +50,14 @@ export const deprecations: DeprecatedList = [
message:
"There is no 1:1 replacement for this, the size will depend on the 'poster' prop and the viewport width",
},
{
classes: ["navds-grid", "navds-content-container"],
deprecatePrefix: true,
message:
"Components were replaced by `HGrid` and `Page.Block` in version 6",
},
{
classes: ["navds-textarea__wrapper"],
message: "Removed in v6.0.0",
},
];
@@ -1,7 +1,7 @@
import { getTestRule } from "jest-preset-stylelint";
import { testRule } from "stylelint-test-rule-node";
import rule, { messages } from ".";
getTestRule()({
testRule({
plugins: ["./dist/index.js"],
ruleName: rule.ruleName,
config: true,
@@ -1,7 +1,7 @@
import { getTestRule } from "jest-preset-stylelint";
import { testRule } from "stylelint-test-rule-node";
import rule, { messages } from ".";
getTestRule()({
testRule({
plugins: ["./dist/index.js"],
ruleName: rule.ruleName,
config: true,
@@ -1,7 +1,7 @@
import { getTestRule } from "jest-preset-stylelint";
import { testRule } from "stylelint-test-rule-node";
import rule, { messages } from ".";
getTestRule()({
testRule({
plugins: ["./dist/index.js"],
ruleName: rule.ruleName,
config: true,
@@ -1,7 +1,7 @@
import { getTestRule } from "jest-preset-stylelint";
import { testRule } from "stylelint-test-rule-node";
import rule, { messages } from ".";
getTestRule()({
testRule({
plugins: ["./dist/index.js"],
ruleName: rule.ruleName,
config: true,
@@ -1,8 +1,8 @@
import { getTestRule } from "jest-preset-stylelint";
import { testRule } from "stylelint-test-rule-node";
import rule, { messages } from ".";
import { deprecations } from "../../deprecations";
getTestRule()({
testRule({
plugins: ["./dist/index.js"],
ruleName: rule.ruleName,
config: true,
@@ -1,7 +1,7 @@
import { getTestRule } from "jest-preset-stylelint";
import { testRule } from "stylelint-test-rule-node";
import rule, { messages } from ".";
getTestRule()({
testRule({
plugins: ["./dist/index.js"],
ruleName: rule.ruleName,
config: true,
+1 -1
View File
@@ -6,7 +6,7 @@
"target": "es2020",
"preserveWatchOutput": true,
"declaration": false,
"types": ["node", "jest", "@types/jest"],
"types": ["node"],
"outDir": "dist",
"rootDir": "./src",
"resolveJsonModule": true,
+67
View File
@@ -1,5 +1,72 @@
# @navikt/aksel
## 6.3.3
### Patch Changes
- Updated dependencies []:
- @navikt/ds-css@6.3.3
## 6.3.2
### Patch Changes
- Updated dependencies []:
- @navikt/ds-css@6.3.2
## 6.3.1
### Patch Changes
- Updated dependencies []:
- @navikt/ds-css@6.3.1
## 6.3.0
### Patch Changes
- Updated dependencies [[`25e0d15d6`](https://github.com/navikt/aksel/commit/25e0d15d67cebd36ee58aa3b7d9f1c7104d92de6)]:
- @navikt/ds-css@6.3.0
## 6.2.0
### Patch Changes
- Updated dependencies []:
- @navikt/ds-css@6.2.0
## 6.1.1
### Patch Changes
- Updated dependencies [[`9510327ab`](https://github.com/navikt/aksel/commit/9510327abe96142943c6e92bd7c7da93a9721fd5), [`3d2eab4fd`](https://github.com/navikt/aksel/commit/3d2eab4fda07cac8071822e1f8e8fc5f69e7d234)]:
- @navikt/ds-css@6.1.1
## 6.1.0
### Patch Changes
- Updated dependencies []:
- @navikt/ds-css@6.1.0
## 6.0.0
### Major Changes
- Chat: Fjernet deprecated props `backgroundColor` og `avatarBgColor`. Bruk prop `variant` som erstatning. ([#2623](https://github.com/navikt/aksel/pull/2623))
### Patch Changes
- Updated dependencies [[`636c1ad49`](https://github.com/navikt/aksel/commit/636c1ad49b8afde54b0a1105fecdc6d47f333522), [`636c1ad49`](https://github.com/navikt/aksel/commit/636c1ad49b8afde54b0a1105fecdc6d47f333522), [`636c1ad49`](https://github.com/navikt/aksel/commit/636c1ad49b8afde54b0a1105fecdc6d47f333522), [`636c1ad49`](https://github.com/navikt/aksel/commit/636c1ad49b8afde54b0a1105fecdc6d47f333522), [`636c1ad49`](https://github.com/navikt/aksel/commit/636c1ad49b8afde54b0a1105fecdc6d47f333522)]:
- @navikt/ds-css@6.0.0
## 5.18.3
### Patch Changes
- Updated dependencies []:
- @navikt/ds-css@5.18.3
## 5.18.2
### Patch Changes
-8
View File
@@ -1,8 +0,0 @@
const config = {
transform: { "^.+\\.js?$": "ts-jest", "^.+\\.ts?$": "ts-jest" },
testMatch: ["**/tests/*.test.ts"],
verbose: true,
rootDir: ".",
};
module.exports = config;
+6 -9
View File
@@ -1,6 +1,6 @@
{
"name": "@navikt/aksel",
"version": "5.18.2",
"version": "6.3.3",
"description": "Aksel command line interface. Handles css-imports, codemods and more",
"author": "Aksel | NAV designsystem team",
"license": "MIT",
@@ -18,8 +18,8 @@
"clean": "rimraf dist",
"build": "yarn clean && tsc -p tsconfig.json",
"dev": "tsc --watch -p tsconfig.json",
"test": "yarn build && NODE_OPTIONS=--experimental-vm-modules yarn jest",
"test:watch": "NODE_OPTIONS=--experimental-vm-modules yarn jest --watch"
"test": "vitest run",
"test:watch": "vitest watch"
},
"bin": "./dist/index.js",
"repository": {
@@ -29,7 +29,7 @@
},
"homepage": "https://aksel.nav.no/grunnleggende/kode/kommandolinje",
"dependencies": {
"@navikt/ds-css": "5.18.2",
"@navikt/ds-css": "6.3.3",
"axios": "1.6.0",
"chalk": "4.1.0",
"clipboardy": "^2.3.0",
@@ -44,12 +44,9 @@
"react-scanner": "^1.1.0"
},
"devDependencies": {
"@types/inquirer": "^9.0.3",
"@types/jest": "^29.0.0",
"jest": "^29.0.0",
"rimraf": "3.0.2",
"ts-jest": "^29.0.0",
"typescript": "^5.1.6"
"typescript": "^5.1.6",
"vitest": "^1.2.2"
},
"sideEffects": false,
"engines": {
+10
View File
@@ -87,6 +87,16 @@ export const migrations: {
path: "v4.0.0/date/date",
},
],
"v6.0.0": [
{
description:
"Removes `backgroundColor` and `avatarBgColor` properties from `Chat` and `Chat.Bubble`",
value: "v6-chat",
path: "v6.0.0/chat/chat",
warning:
"Remember to update use of `variant`-prop to match previous use of colors. If needed the component exposes css-variables for custom overrides",
},
],
};
export function getMigrationPath(str: string) {
@@ -1,5 +1,6 @@
import fs from "fs";
import path from "path";
import { describe, expect, test } from "vitest";
import { getMigrationNames, getMigrationPath } from "../migrations";
describe("migrations", () => {
@@ -0,0 +1,75 @@
import { getLineTerminator } from "../../../utils/lineterminator";
/**
* @param {import('jscodeshift').FileInfo} file
* @param {import('jscodeshift').API} api
*/
export default function transformer(file, api) {
const j = api.jscodeshift;
let localName = "Chat";
const root = j(file.source);
/* Finds used name for Chat 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 === "Chat" && x.local.name !== x.imported.name) {
localName = x.local.name;
}
});
});
root
.find(j.JSXElement, {
openingElement: {
name: {
name: localName,
},
},
})
.forEach((path) => {
j(path)
.find(j.JSXAttribute, {
name: {
name: "backgroundColor",
},
})
.remove();
j(path)
.find(j.JSXAttribute, {
name: {
name: "avatarBgColor",
},
})
.remove();
});
root
.find(j.JSXElement, {
openingElement: {
name: {
type: "JSXMemberExpression",
object: {
name: localName,
},
property: {
name: "Bubble",
},
},
},
})
.forEach((path) => {
j(path)
.find(j.JSXAttribute, {
name: {
name: "backgroundColor",
},
})
.remove();
});
return root.toSource(getLineTerminator(file.source));
}
@@ -0,0 +1,12 @@
import { check } from "../../../../utils/check";
const migration = "chat";
const fixtures = ["import-alias", "idempotent"];
for (const fixture of fixtures) {
check(__dirname, {
fixture,
migration,
extension: "js",
});
}
@@ -0,0 +1,17 @@
import {
Chat,
Button,
} from "@navikt/ds-react";
export const Demo = () => (
<Chat avatar="ON" name="Ola Normann" timestamp="01.01.21 14:00">
<Chat.Bubble>
Aute minim nisi sunt mollit duis sunt nulla minim non proident.
</Chat.Bubble>
<Chat.Bubble>Tempor fugiat amet eu sint in in ullamco.</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,17 @@
import {
Chat,
Button,
} from "@navikt/ds-react";
export const Demo = () => (
<Chat avatar="ON" name="Ola Normann" timestamp="01.01.21 14:00">
<Chat.Bubble>
Aute minim nisi sunt mollit duis sunt nulla minim non proident.
</Chat.Bubble>
<Chat.Bubble>Tempor fugiat amet eu sint in in ullamco.</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,17 @@
import {
Chat as DsChat,
Button,
} from "@navikt/ds-react";
export const Demo = () => (
<DsChat avatar="ON" name="Ola Normann" backgroundColor="#321" timestamp="01.01.21 14:00" avatarBgColor="#123" >
<DsChat.Bubble>
Aute minim nisi sunt mollit duis sunt nulla minim non proident.
</DsChat.Bubble>
<DsChat.Bubble backgroundColor="#fff">Tempor fugiat amet eu sint in in ullamco.</DsChat.Bubble>
<DsChat.Bubble backgroundColor="#111">
Adipisicing laborum est eu laborum est sit in commodo enim sint laboris
labore nisi ut.
</DsChat.Bubble>
</DsChat>
);
@@ -0,0 +1,17 @@
import {
Chat as DsChat,
Button,
} from "@navikt/ds-react";
export const Demo = () => (
<DsChat avatar="ON" name="Ola Normann" timestamp="01.01.21 14:00">
<DsChat.Bubble>
Aute minim nisi sunt mollit duis sunt nulla minim non proident.
</DsChat.Bubble>
<DsChat.Bubble>Tempor fugiat amet eu sint in in ullamco.</DsChat.Bubble>
<DsChat.Bubble>
Adipisicing laborum est eu laborum est sit in commodo enim sint laboris
labore nisi ut.
</DsChat.Bubble>
</DsChat>
);
@@ -0,0 +1,17 @@
import {
Chat,
Button,
} from "@navikt/ds-react";
export const Demo = () => (
<Chat avatar="ON" name="Ola Normann" backgroundColor="#321" timestamp="01.01.21 14:00" avatarBgColor="#123" >
<Chat.Bubble>
Aute minim nisi sunt mollit duis sunt nulla minim non proident.
</Chat.Bubble>
<Chat.Bubble backgroundColor="#fff">Tempor fugiat amet eu sint in in ullamco.</Chat.Bubble>
<Chat.Bubble backgroundColor="#111">
Adipisicing laborum est eu laborum est sit in commodo enim sint laboris
labore nisi ut.
</Chat.Bubble>
</Chat>
);
@@ -0,0 +1,17 @@
import {
Chat,
Button,
} from "@navikt/ds-react";
export const Demo = () => (
<Chat avatar="ON" name="Ola Normann" timestamp="01.01.21 14:00">
<Chat.Bubble>
Aute minim nisi sunt mollit duis sunt nulla minim non proident.
</Chat.Bubble>
<Chat.Bubble>Tempor fugiat amet eu sint in in ullamco.</Chat.Bubble>
<Chat.Bubble>
Adipisicing laborum est eu laborum est sit in commodo enim sint laboris
labore nisi ut.
</Chat.Bubble>
</Chat>
);
+2 -1
View File
@@ -2,6 +2,7 @@ import { applyTransform } from "jscodeshift/dist/testUtils";
import fs from "node:fs";
import path from "node:path";
import prettier from "prettier";
import { describe, expect, test } from "vitest";
interface TestT {
fixture: string;
@@ -15,7 +16,7 @@ export function check(
{ fixture, migration, extension = "js", options = {} }: TestT,
) {
describe(migration, () => {
it(fixture, async () => {
test(fixture, async () => {
const fixtureDir = path.join(dirName);
const inputPath = path.join(fixtureDir, `${fixture}.input.${extension}`);
const parser = extension;
@@ -1,7 +1,6 @@
import { describe, expect, test } from "vitest";
import { translateToken } from "../translate-token";
jest.autoMockOff();
const tokens = [
{
name: "--navds-global-color-red-100",
+4 -3
View File
@@ -6,12 +6,13 @@
"target": "es2015",
"preserveWatchOutput": true,
"declaration": false,
"types": ["node", "jest"],
"types": ["node"],
"outDir": "dist",
"rootDir": "./src",
"resolveJsonModule": true,
"allowJs": true
"allowJs": true,
"skipLibCheck": true
},
"include": ["src/**/*.ts"],
"exclude": ["node_modules", "dist", "jest.config.js", "**/tests/**"]
"exclude": ["node_modules", "dist", "**/tests/**"]
}
+40
View File
@@ -1,5 +1,45 @@
# @navikt/ds-css
## 6.3.3
## 6.3.2
## 6.3.1
## 6.3.0
### Minor Changes
- FileUpload: Ny komponent `FileUpload` for å håndtere opplasting av filer, Dropzone og fil-visning ([#2504](https://github.com/navikt/aksel/pull/2504))
## 6.2.0
## 6.1.1
### Patch Changes
- Link: Fjern hover-farge ([#2767](https://github.com/navikt/aksel/pull/2767))
- Modal: Får nå fokus når åpnes i Safari ([#2688](https://github.com/navikt/aksel/pull/2688))
## 6.1.0
## 6.0.0
### Major Changes
- Tokens: La til nytt brekkpunkt `2xl` for `1440px`. Alle primitives er oppdatert for å reflektere oppdateringen. Brukere av Tailwind vil måtte sjekke at overskriving av `screen: "2xl"` ikke brekker app. ([#2623](https://github.com/navikt/aksel/pull/2623))
- Grid, ContentContainer: Komponenter er fjernet fra systemet. [Se migreringsguide](https://aksel.nav.no/grunnleggende/kode/migrering#dd2cfa9fb1d1). ([#2623](https://github.com/navikt/aksel/pull/2623))
- CSS: Oppdatert bruk av action-farger i systemet. Dette påvirker komponentene: Button, CopyButton, Dropdown, Combobox, ConfirmationPanel, Radio, Checkbox, Search, Select, TextField, Textarea, Helptext, LinkPanel, Link, ReadMore, Stepper og Tabs. Endringen skal ikke brekke noe så lenge man ikke har overskrevet farger manuelt. ([#2623](https://github.com/navikt/aksel/pull/2623))
- Tokens: Nye tokens `--a-text-action-hover`,`--a-icon-action-hover` og `--a-border-action-hover` ([#2623](https://github.com/navikt/aksel/pull/2623))
- Textarea: Fjernet div med klassen navds-textarea\_\_wrapper ([#2623](https://github.com/navikt/aksel/pull/2623))
## 5.18.3
## 5.18.2
## 5.18.1
+2
View File
@@ -130,6 +130,7 @@
background-color: var(--ac-button-primary-bg, var(--__ac-button-primary-bg, var(--a-surface-action)));
color: var(--ac-button-primary-text, var(--__ac-button-primary-text, var(--a-text-on-action)));
}
@media (forced-colors: active) {
.navds-button.navds-button--primary {
background-color: highlight;
@@ -227,6 +228,7 @@
--ac-button-secondary-hover-bg,
var(--__ac-button-secondary-hover-bg, var(--a-surface-action-subtle-hover))
);
box-shadow: inset 0 0 0 2px var(--ac-button-secondary-hover-border, var(--a-border-action-hover));
}
.navds-button--secondary:focus-visible {
+5
View File
@@ -120,6 +120,11 @@ const StyleMappings = {
dependencies: [typoCss],
},
{ component: "Fieldset", main: formCss, dependencies: [typoCss] },
{
component: "FileUpload",
main: formCss,
dependencies: [typoCss, "button.css", "loader.css", "link.css"],
},
{ component: "Grid", main: "grid.css", dependencies: [typoCss] },
{
component: "GuidePanel",
-17
View File
@@ -1,17 +0,0 @@
:root,
:host {
--navds-content-container-max-width: 79.5rem;
}
.navds-content-container {
margin-left: auto;
margin-right: auto;
max-width: var(--navds-content-container-max-width);
padding: var(--a-spacing-4);
}
@media (min-width: 448px) {
.navds-content-container {
padding: var(--a-spacing-6);
}
}
+1 -1
View File
@@ -145,7 +145,7 @@
}
.navds-copybutton--action:hover {
color: var(--ac-copybutton-action-hover-text, var(--__ac-copybutton-action-text, var(--a-text-action)));
color: var(--ac-copybutton-action-hover-text, var(--__ac-copybutton-action-text, var(--a-text-action-hover)));
background-color: var(--ac-copybutton-action-hover-bg, var(--__ac-copybutton-bg-hover, var(--a-surface-hover)));
}
+1
View File
@@ -50,6 +50,7 @@
.navds-dropdown__item:hover {
background-color: var(--ac-dropdown-item-hover-bg, var(--a-surface-action-subtle-hover));
color: var(--ac-dropdown-item-hover-text, var(--a-text-action-hover));
}
.navds-dropdown__item:active {
+1 -10
View File
@@ -92,9 +92,6 @@
}
.navds-combobox__wrapper-inner:has(.navds-combobox__input:focus-visible) {
box-shadow:
0 0 0 1px var(--a-surface-default) inset,
var(--a-shadow-focus);
box-shadow: var(--a-shadow-focus);
outline: 3px solid transparent;
outline-offset: 2px;
@@ -113,9 +110,6 @@
}
.navds-combobox__wrapper-inner:has(.navds-combobox__input:focus) {
box-shadow:
0 0 0 1px var(--a-surface-default) inset,
var(--a-shadow-focus);
box-shadow: var(--a-shadow-focus);
outline: 3px solid transparent;
outline-offset: 2px;
@@ -129,9 +123,6 @@
@supports not selector(:has) {
.navds-combobox--focused .navds-combobox__wrapper-inner {
box-shadow:
0 0 0 1px var(--a-surface-default) inset,
var(--a-shadow-focus);
box-shadow: var(--a-shadow-focus);
outline: 3px solid transparent;
outline-offset: 2px;
@@ -310,7 +301,7 @@
.navds-combobox__list-item--focus,
.navds-combobox__list--with-hover
.navds-combobox__list-item:not([data-no-focus="true"], .navds-combobox__list-item--new-option):hover {
.navds-combobox__list-item:where(:not([data-no-focus="true"], .navds-combobox__list-item--new-option)):hover {
background-color: var(--ac-combobox-list-item-hover-bg, var(--a-surface-hover));
cursor: pointer;
border-left: 4px solid var(--ac-combobox-list-item-hover-border-left, var(--a-border-strong));
@@ -25,6 +25,10 @@
background-color: var(--ac-confirmation-panel-error-bg, var(--a-surface-danger-subtle));
}
.navds-confirmation-panel--error .navds-checkbox__input:hover:not(:disabled) + .navds-checkbox__label {
color: var(--a-text-default);
}
@media (forced-colors: active) {
.navds-confirmation-panel__inner::before {
content: "";
+8 -2
View File
@@ -9,11 +9,17 @@
padding: var(--a-spacing-3);
}
.navds-error-summary:focus-visible {
box-shadow: var(--a-shadow-focus);
.navds-error-summary__heading:focus {
outline: none;
}
.navds-error-summary:focus-visible,
.navds-error-summary:has(.navds-error-summary__heading:focus-visible) {
box-shadow:
0 0 0 1px var(--a-border-on-inverted),
0 0 0 4px var(--a-border-focus);
}
@supports not selector(:focus-visible) {
.navds-error-summary:focus {
box-shadow: var(--a-shadow-focus);
+230
View File
@@ -0,0 +1,230 @@
/**
* Makes it easier for user to use FileItem in semantic lists
*/
.navds-file-upload :is(ul, li) {
list-style: none;
margin: 0;
padding: 0;
}
/**
* FileUpload.Dropzone
*/
.navds-dropzone__area {
--__ac-dropzone-background: var(--a-surface-subtle);
--__ac-dropzone-text-color: var(--a-text-default);
--__ac-dropzone-padding: var(--a-spacing-6);
--__ac-dropzone-icon-padding: var(--a-spacing-2);
--__ac-dropzone-animation-length-long: 0.6s;
--__ac-dropzone-animation-length-short: 250ms;
--__ac-dropzone-animation-ease-out: cubic-bezier(0.3, 1, 0.3, 1);
--__ac-dropzone-animation-over-under: cubic-bezier(0.3, 1.4, 0.3, 1);
position: relative;
width: 100%;
display: flex;
align-items: center;
flex-direction: column;
gap: var(--a-spacing-4);
text-align: center;
padding: var(--__ac-dropzone-padding);
outline: 1px dashed var(--a-border-subtle);
outline-offset: -1px;
border-radius: var(--a-border-radius-large);
background-color: var(--__ac-dropzone-background);
color: var(--__ac-dropzone-text-color);
transition: background-color var(--__ac-dropzone-animation-length-short) var(--__ac-dropzone-animation-ease-out);
cursor: pointer;
}
.navds-dropzone__area:hover {
box-shadow: inset 0 2px 4px 1px rgb(11 11 11/ 0.05);
outline-color: var(--a-border-default);
}
.navds-dropzone--disabled > .navds-dropzone__area:hover {
outline-color: var(--a-border-subtle);
box-shadow: initial;
cursor: default;
}
.navds-dropzone--dragging > .navds-dropzone__area {
--__ac-dropzone-background: var(--a-surface-action-subtle-hover);
}
.navds-dropzone--dragging > .navds-dropzone__area::after {
outline: 1px dashed var(--a-border-subtle);
outline-offset: -1px;
color: var(--a-text-action-selected);
background-color: var(--a-surface-hover);
content: "";
inset: 0;
position: absolute;
-webkit-backdrop-filter: blur(8px);
backdrop-filter: blur(8px);
box-shadow: inset 0 2px 7px 3px rgb(11 11 11/ 0.1);
border-radius: var(--a-border-radius-large);
animation: akselDropzoneDragoverAnimation var(--__ac-dropzone-animation-length-short) var(--__ac-dropzone-animation-ease-out);
}
@keyframes akselDropzoneDragoverAnimation {
0% {
-webkit-backdrop-filter: blur(0);
backdrop-filter: blur(0);
background-color: var(--a-surface-transparent);
}
70% {
-webkit-backdrop-filter: blur(8px);
backdrop-filter: blur(8px);
}
100% {
background-color: var(--a-surface-hover);
}
}
.navds-dropzone__area-icon {
display: grid;
padding: var(--__ac-dropzone-icon-padding);
visibility: hidden;
}
.navds-dropzone--error:where(:not(.navds-dropzone--dragging)) > .navds-dropzone__area {
outline-color: var(--a-surface-danger);
outline-width: 2px;
}
.navds-dropzone__area:hover > .navds-dropzone__area-button {
color: var(--ac-button-secondary-hover-text, var(--__ac-button-secondary-hover-text, var(--a-text-action-on-action-subtle)));
background-color: var(
--ac-button-secondary-hover-bg,
var(--__ac-button-secondary-hover-bg, var(--a-surface-action-subtle-hover))
);
}
.navds-dropzone__area:active .navds-dropzone__area-button {
color: var(--ac-button-secondary-active-text, var(--__ac-button-secondary-active-text, var(--a-text-on-action)));
background-color: var(--ac-button-secondary-active-bg, var(--__ac-button-secondary-active-bg, var(--a-surface-action-active)));
box-shadow: none;
}
.navds-dropzone__area-release {
top: var(--__ac-dropzone-padding);
display: grid;
position: absolute;
z-index: 1;
pointer-events: none;
transition:
top var(--__ac-dropzone-animation-length-long) var(--__ac-dropzone-animation-over-under),
transform var(--__ac-dropzone-animation-length-long) var(--__ac-dropzone-animation-over-under);
}
.navds-dropzone__area-release__icon {
display: grid;
padding: var(--__ac-dropzone-icon-padding);
border-radius: var(--a-border-radius-full);
background-color: var(--a-surface-neutral-subtle);
transition:
background-color 300ms var(--__ac-dropzone-animation-ease-out),
font-size 300ms var(--__ac-dropzone-animation-ease-out);
font-size: 1.5rem;
}
.navds-dropzone--dragging .navds-dropzone__area-release > .navds-dropzone__area-release__icon {
background-color: transparent;
font-size: 2rem;
}
.navds-dropzone__area-release__text {
visibility: hidden;
}
.navds-dropzone--dragging .navds-dropzone__area-release > .navds-dropzone__area-release__text {
transition: visibility var(--__ac-dropzone-animation-length-long) var(--__ac-dropzone-animation-over-under);
visibility: visible;
}
.navds-dropzone--dragging .navds-dropzone__area-release {
color: var(--a-text-action-selected);
top: 50%;
transform: translateY(-50%);
}
.navds-dropzone__area-disabled {
color: var(--a-text-subtle);
display: flex;
align-items: center;
flex-direction: column;
gap: var(--a-spacing-2);
}
/**
* FileUpload.Item
*/
.navds-file-item__inner {
outline: 1px solid var(--a-border-subtle);
outline-offset: -1px;
transition: outline-color 250ms cubic-bezier(0, 0.3, 0.15, 1);
border-radius: var(--a-border-radius-large);
padding: var(--a-spacing-3);
display: flex;
gap: var(--a-spacing-3);
align-items: flex-start;
}
.navds-file-item--error > .navds-file-item__inner {
outline: 2px solid var(--a-surface-danger);
}
.navds-file-item__icon {
background-color: var(--a-surface-neutral-subtle);
color: var(--a-icon-default);
border-radius: var(--a-border-radius-xlarge);
min-height: 3rem;
min-width: 3rem;
display: grid;
place-content: center;
transition: background-color 250ms cubic-bezier(0, 0.3, 0.15, 1);
}
.navds-file-item__icon--loading {
background-color: transparent;
}
.navds-file-item__file-info {
word-break: break-word;
}
.navds-file-item__button {
margin-left: auto;
}
.navds-file-item__error {
color: var(--a-text-danger);
display: grid;
transition-property: grid-template-rows, padding-top;
transition-duration: 250ms;
transition-timing-function: cubic-bezier(0, 0.3, 0.15, 1);
overflow: hidden;
grid-template-rows: 0fr;
}
.navds-file-item--error .navds-file-item__error {
grid-template-rows: 1fr;
padding-top: var(--a-spacing-1);
}
.navds-file-item__error-content > svg {
flex-shrink: 0;
height: 1rem;
margin-top: 0.1rem;
}
.navds-file-item__error-content {
min-height: 0;
display: flex;
gap: var(--a-spacing-1);
}
+4 -2
View File
@@ -18,13 +18,15 @@
}
.navds-form-field .navds-error-message,
.navds-fieldset .navds-error-message {
.navds-fieldset .navds-error-message,
.navds-file-item .navds-error-message {
display: flex;
gap: var(--a-spacing-2);
}
.navds-form-field .navds-error-message::before,
.navds-fieldset .navds-error-message::before {
.navds-fieldset .navds-error-message::before,
.navds-file-item .navds-error-message::before {
content: "•";
}
+1
View File
@@ -2,6 +2,7 @@
Order matters; rearrange with care
*/
@import "fieldset.css";
@import "file-upload.css";
@import "form.css";
@import "error-summary.css";
@import "confirmation-panel.css";
+18 -18
View File
@@ -94,7 +94,7 @@
.navds-checkbox__input:hover:focus-visible + .navds-checkbox__label::before,
.navds-radio__input:hover:focus-visible + .navds-radio__label::before {
box-shadow:
0 0 0 2px var(--ac-radio-checkbox-action, var(--a-surface-action)),
0 0 0 2px var(--ac-radio-checkbox-action, var(--a-surface-action-hover)),
0 0 0 4px var(--a-border-focus);
}
@@ -102,16 +102,11 @@
.navds-checkbox__input:hover:focus + .navds-checkbox__label::before,
.navds-radio__input:hover:focus + .navds-radio__label::before {
box-shadow:
0 0 0 2px var(--ac-radio-checkbox-action, var(--a-surface-action)),
0 0 0 2px var(--ac-radio-checkbox-action, var(--a-surface-action-hover)),
0 0 0 4px var(--a-border-focus);
}
}
.navds-checkbox__input:indeterminate + .navds-checkbox__label::before {
box-shadow: 0 0 0 2px var(--ac-radio-checkbox-action, var(--a-surface-action));
background-color: var(--ac-radio-checkbox-action, var(--a-surface-action));
}
.navds-checkbox__input:indeterminate + .navds-checkbox__label::after {
content: "";
position: absolute;
@@ -128,9 +123,14 @@
transform: translate(0.25rem, -50%);
}
.navds-checkbox__input:checked + .navds-checkbox__label::before {
box-shadow: 0 0 0 2px var(--ac-radio-checkbox-action, var(--a-surface-action));
background-color: var(--ac-radio-checkbox-action, var(--a-surface-action));
.navds-checkbox__input:where(:checked, :indeterminate) + .navds-checkbox__label::before {
box-shadow: 0 0 0 2px var(--ac-radio-checkbox-action, var(--a-surface-action-selected));
background-color: var(--ac-radio-checkbox-action, var(--a-surface-action-selected));
}
.navds-checkbox__input:where(:checked, :indeterminate):hover + .navds-checkbox__label::before {
box-shadow: 0 0 0 2px var(--ac-radio-checkbox-action, var(--a-surface-action-selected-hover));
background-color: var(--ac-radio-checkbox-action, var(--a-surface-action-selected-hover));
}
.navds-checkbox__input:where(:not(:checked)) + .navds-checkbox__label > .navds-checkbox__icon {
@@ -166,7 +166,7 @@
.navds-checkbox__input:indeterminate:focus-visible + .navds-checkbox__label::before,
.navds-checkbox__input:checked:focus-visible + .navds-checkbox__label::before {
box-shadow:
0 0 0 1px var(--ac-radio-checkbox-action, var(--a-surface-action)),
0 0 0 1px var(--ac-radio-checkbox-action, var(--a-surface-action-selected)),
0 0 0 2px var(--ac-radio-checkbox-bg, var(--a-surface-default)),
0 0 0 4px var(--a-border-focus);
}
@@ -175,7 +175,7 @@
.navds-checkbox__input:indeterminate:focus + .navds-checkbox__label::before,
.navds-checkbox__input:checked:focus + .navds-checkbox__label::before {
box-shadow:
0 0 0 1px var(--ac-radio-checkbox-action, var(--a-surface-action)),
0 0 0 1px var(--ac-radio-checkbox-action, var(--a-surface-action-selected)),
0 0 0 2px var(--ac-radio-checkbox-bg, var(--a-surface-default)),
0 0 0 4px var(--a-border-focus);
}
@@ -183,14 +183,14 @@
.navds-radio__input:checked + .navds-radio__label::before {
box-shadow:
0 0 0 2px var(--ac-radio-checkbox-action, var(--a-surface-action)),
0 0 0 2px var(--ac-radio-checkbox-action, var(--a-surface-action-selected)),
inset 0 0 0 2px var(--ac-radio-checkbox-bg, var(--a-surface-default));
background-color: var(--ac-radio-checkbox-action, var(--a-surface-action));
background-color: var(--ac-radio-checkbox-action, var(--a-surface-action-selected));
}
.navds-radio__input:checked:focus-visible + .navds-radio__label::before {
box-shadow:
0 0 0 2px var(--ac-radio-checkbox-action, var(--a-surface-action)),
0 0 0 2px var(--ac-radio-checkbox-action, var(--a-surface-action-selected)),
inset 0 0 0 2px var(--ac-radio-checkbox-bg, var(--a-surface-default)),
0 0 0 4px var(--a-border-focus);
}
@@ -206,19 +206,19 @@
.navds-checkbox__input:hover:not(:disabled) + .navds-checkbox__label,
.navds-radio__input:hover:not(:disabled) + .navds-radio__label {
color: var(--ac-radio-checkbox-action, var(--a-surface-action));
color: var(--ac-radio-checkbox-action, var(--a-surface-action-hover));
}
.navds-checkbox__input:hover:not(:disabled):not(:checked):not(:indeterminate):not(:focus-visible)
+ .navds-checkbox__label::before,
.navds-radio__input:hover:not(:disabled):not(:checked):not(:focus-visible) + .navds-radio__label::before {
box-shadow: 0 0 0 2px var(--ac-radio-checkbox-action, var(--a-surface-action));
box-shadow: 0 0 0 2px var(--ac-radio-checkbox-action, var(--a-surface-action-hover));
}
@supports not selector(:focus-visible) {
.navds-checkbox__input:hover:not(:disabled):not(:checked):not(:indeterminate):not(:focus) + .navds-checkbox__label::before,
.navds-radio__input:hover:not(:disabled):not(:checked):not(:focus) + .navds-radio__label::before {
box-shadow: 0 0 0 2px var(--ac-radio-checkbox-action, var(--a-surface-action));
box-shadow: 0 0 0 2px var(--ac-radio-checkbox-action, var(--a-surface-action-hover));
}
}
+7 -7
View File
@@ -95,7 +95,7 @@
}
.navds-search__button-clear:hover {
color: var(--ac-search-clear-icon-hover, var(--__ac-search-clear-icon-hover, var(--a-text-action)));
color: var(--ac-search-clear-icon-hover, var(--__ac-search-clear-icon-hover, var(--a-text-action-hover)));
}
.navds-search__button-clear:focus-visible {
@@ -134,12 +134,12 @@
0 -1px 0 0 var(--ac-search-button-border, var(--__ac-search-button-border, var(--a-border-default))) inset;
}
.navds-search__button-search.navds-button--secondary:hover {
.navds-search__button-search.navds-button--secondary:where(:hover, :active) {
box-shadow:
-1px 0 0 0 var(--ac-search-button-border-hover, var(--__ac-search-button-border-hover, var(--a-border-action))) inset,
0 1px 0 0 var(--ac-search-button-border-hover, var(--__ac-search-button-border-hover, var(--a-border-action))) inset,
0 -1px 0 0 var(--ac-search-button-border-hover, var(--__ac-search-button-border-hover, var(--a-border-action))) inset,
-1px 0 0 0 var(--ac-search-button-border-hover, var(--__ac-search-button-border-hover, var(--a-border-action)));
-1px 0 0 0 var(--ac-search-button-border-hover, var(--__ac-search-button-border-hover, var(--a-border-action-hover))) inset,
0 1px 0 0 var(--ac-search-button-border-hover, var(--__ac-search-button-border-hover, var(--a-border-action-hover))) inset,
0 -1px 0 0 var(--ac-search-button-border-hover, var(--__ac-search-button-border-hover, var(--a-border-action-hover))) inset,
-1px 0 0 0 var(--ac-search-button-border-hover, var(--__ac-search-button-border-hover, var(--a-border-action-hover)));
z-index: 1;
}
@@ -155,7 +155,7 @@
.navds-search__button-search.navds-button--secondary:focus-visible:hover {
box-shadow:
0 0 0 1px var(--ac-search-button-border-hover, var(--__ac-search-button-border-hover, var(--a-border-action))) inset,
0 0 0 1px var(--ac-search-button-border-hover, var(--__ac-search-button-border-hover, var(--a-border-action-hover))) inset,
var(--a-shadow-focus);
}
+2 -1
View File
@@ -29,12 +29,13 @@
}
.navds-select__input:hover {
border-color: var(--ac-select-hover-bg, var(--a-border-action));
border-color: var(--ac-select-hover-border, var(--a-border-action-hover));
cursor: pointer;
}
.navds-select__input:focus-visible {
outline: none;
border-color: var(--ac-select-active-border, var(--a-border-action-selected));
box-shadow: var(--a-shadow-focus);
}
+2 -1
View File
@@ -41,13 +41,14 @@
}
.navds-text-field__input:hover {
border-color: var(--ac-textfield-hover-border, var(--__ac-textfield-hover-border, var(--a-border-action)));
border-color: var(--ac-textfield-hover-border, var(--__ac-textfield-hover-border, var(--a-border-action-hover)));
}
.navds-text-field__input:focus-visible {
outline: 2px solid transparent;
outline-offset: 2px;
box-shadow: var(--a-shadow-focus);
border-color: var(--ac-textfield-active-border, var(--a-border-action-selected));
}
@supports not selector(:focus-visible) {
+6 -14
View File
@@ -20,18 +20,9 @@
--__ac-textarea-counter-error-text: initial;
}
.navds-textarea__wrapper {
--__ac-textarea-height: initial;
position: relative;
min-width: 100%;
}
.navds-textarea__input:first-child {
height: var(--__ac-textarea-height);
}
.navds-textarea__input {
/* stylelint-disable-next-line csstools/value-no-unknown-custom-properties */
height: var(--__ac-textarea-height);
appearance: none;
padding: var(--a-spacing-2);
background-color: var(--ac-textarea-bg, var(--__ac-textarea-bg, var(--a-surface-default)));
@@ -48,13 +39,14 @@
}
.navds-textarea__input:hover {
border-color: var(--ac-textarea-hover-border, var(--__ac-textarea-hover-border, var(--a-border-action)));
border-color: var(--ac-textarea-hover-border, var(--__ac-textarea-hover-border, var(--a-border-action-hover)));
}
.navds-textarea__input:focus-visible {
outline: 2px solid transparent;
outline-offset: 2px;
box-shadow: var(--a-shadow-focus);
border-color: var(--ac-textarea-active-border, var(--a-border-action-selected));
}
@supports not selector(:focus-visible) {
@@ -70,7 +62,7 @@
}
.navds-textarea__counter {
margin-top: var(--a-spacing-05);
margin-top: -0.375rem;
color: var(--ac-textarea-counter-text, var(--__ac-textarea-counter-text, var(--a-text-subtle)));
}
@@ -82,7 +74,7 @@
display: none;
}
.navds-textarea__wrapper:focus-within .navds-textarea__sr-counter {
.navds-textarea__input:focus ~ .navds-textarea__sr-counter {
display: initial;
}
-217
View File
@@ -1,217 +0,0 @@
/**************************
* .navds-grid *
**************************/
.navds-grid {
display: grid;
grid-template-columns: repeat(12, minmax(0, 1fr));
grid-gap: var(--a-spacing-4);
}
@media (min-width: 448px) {
.navds-grid {
grid-gap: var(--a-spacing-6);
}
}
/**************************
* .navds-grid__cell *
**************************/
.navds-grid__cell--xs-1 {
grid-column: span 1;
}
.navds-grid__cell--xs-2 {
grid-column: span 2;
}
.navds-grid__cell--xs-3 {
grid-column: span 3;
}
.navds-grid__cell--xs-4 {
grid-column: span 4;
}
.navds-grid__cell--xs-5 {
grid-column: span 5;
}
.navds-grid__cell--xs-6 {
grid-column: span 6;
}
.navds-grid__cell--xs-7 {
grid-column: span 7;
}
.navds-grid__cell--xs-8 {
grid-column: span 8;
}
.navds-grid__cell--xs-9 {
grid-column: span 9;
}
.navds-grid__cell--xs-10 {
grid-column: span 10;
}
.navds-grid__cell--xs-11 {
grid-column: span 11;
}
.navds-grid__cell--xs-12 {
grid-column: span 12;
}
@media (min-width: 448px) {
.navds-grid__cell--sm-1 {
grid-column: span 1;
}
.navds-grid__cell--sm-2 {
grid-column: span 2;
}
.navds-grid__cell--sm-3 {
grid-column: span 3;
}
.navds-grid__cell--sm-4 {
grid-column: span 4;
}
.navds-grid__cell--sm-5 {
grid-column: span 5;
}
.navds-grid__cell--sm-6 {
grid-column: span 6;
}
.navds-grid__cell--sm-7 {
grid-column: span 7;
}
.navds-grid__cell--sm-8 {
grid-column: span 8;
}
.navds-grid__cell--sm-9 {
grid-column: span 9;
}
.navds-grid__cell--sm-10 {
grid-column: span 10;
}
.navds-grid__cell--sm-11 {
grid-column: span 11;
}
.navds-grid__cell--sm-12 {
grid-column: span 12;
}
}
@media (min-width: 648px) {
.navds-grid__cell--md-1 {
grid-column: span 1;
}
.navds-grid__cell--md-2 {
grid-column: span 2;
}
.navds-grid__cell--md-3 {
grid-column: span 3;
}
.navds-grid__cell--md-4 {
grid-column: span 4;
}
.navds-grid__cell--md-5 {
grid-column: span 5;
}
.navds-grid__cell--md-6 {
grid-column: span 6;
}
.navds-grid__cell--md-7 {
grid-column: span 7;
}
.navds-grid__cell--md-8 {
grid-column: span 8;
}
.navds-grid__cell--md-9 {
grid-column: span 9;
}
.navds-grid__cell--md-10 {
grid-column: span 10;
}
.navds-grid__cell--md-11 {
grid-column: span 11;
}
.navds-grid__cell--md-12 {
grid-column: span 12;
}
}
@media (min-width: 960px) {
.navds-grid__cell--lg-1 {
grid-column: span 1;
}
.navds-grid__cell--lg-2 {
grid-column: span 2;
}
.navds-grid__cell--lg-3 {
grid-column: span 3;
}
.navds-grid__cell--lg-4 {
grid-column: span 4;
}
.navds-grid__cell--lg-5 {
grid-column: span 5;
}
.navds-grid__cell--lg-6 {
grid-column: span 6;
}
.navds-grid__cell--lg-7 {
grid-column: span 7;
}
.navds-grid__cell--lg-8 {
grid-column: span 8;
}
.navds-grid__cell--lg-9 {
grid-column: span 9;
}
.navds-grid__cell--lg-10 {
grid-column: span 10;
}
.navds-grid__cell--lg-11 {
grid-column: span 11;
}
.navds-grid__cell--lg-12 {
grid-column: span 12;
}
}
+5
View File
@@ -53,6 +53,11 @@
.navds-help-text__button:where(:hover, :focus-visible, [aria-expanded="true"]) > .navds-help-text__icon--filled {
display: inherit;
color: var(--ac-help-text-button-hover-color, var(--a-surface-action-hover));
}
.navds-help-text__button[aria-expanded="true"] > .navds-help-text__icon--filled {
color: var(--ac-help-text-button-active-color, var(--a-surface-action-active));
}
@supports not selector(:focus-visible) {
-2
View File
@@ -1,11 +1,9 @@
@charset "UTF-8";
@import "baseline/index.css";
@import "typography.css";
@import "grid.css";
@import "accordion.css";
@import "alert.css";
@import "button.css";
@import "content-container.css";
@import "chat.css";
@import "chips.css";
@import "copybutton.css";
Loaded 100 of 674 files, more files were not shown because too many files have changed in this diff. Show more