* Theme switcher exposed both icon's accessible name, even if only one icon was shown. This change properly removes the icon.
* fix hydration error and use resolvedTheme instead of theme
* ♻️ Use tooltip for theme-switcher button
* 🎉 Replace sun/moon icon with theme-icon
---------
Co-authored-by: Halvor Haugan <halvor.haugan@nav.no>
Co-authored-by: Ken <ken.aleksander@gmail.com>
* 🎉 Extract JSX for examples
* ✨ Added new jsx-data to examples-code
* 🏷️ Synced sanity-types
* 🐛 Make sure to remove trailing semicolon
* 🎉 Show compact code for examples and templates
* 📝 Adjust texts for expanding collapsed code-views
* 🎉 Add support for implicit return examples
* 🐛 Make sure to ignore nested return-statements
* 📝 Updates to expand/collapse texts in code-examples
* 🔥 Removed redundant boolean flag
* ♿ Chat ol-tag now has role presentation
* 🔥 Removed now redundant ol>li syntax for chat list
* 🔥 Removed now redundant list-reset css in chat
* 🔥 Removed now redundant list-reset css in chat in darkside
* 📝 Changeset
* 📝 Update changeset
* Delete .changeset/new-gifts-add.md
* Add designsystem front page skeleton
* Add heading and ingress
* Add getting started with design/development link cards
* Implement first working version of "layers" component
* Add an initial attempt at hover styling for ds layers component
* Refactor DS Landing page into separate components
* Add a change log section to ds landing page
* Add AkselByNumbers module
* Get real change log entries from Sanity
* Multiple changes made by pair-design-gramming with Sjur
* Updated sanity schemes
* Add missing contrast colors/variants for link and the typography components
* Use data-color for AkselByNumbers
* Use data-color and slightly tweak padding for PromoTag
* Re-add arrow to ChangeLogNews LinkCard
* Tweaks to LinkCard, using more square icon backgrounds (compared to round backgrounds before) with large border radius, and changing the icon color to subtle
* Per discussion with Ken, removing new contrast variant/textColor option, so as not to break old version of components. Replacing it with CSS for now, but may re-add it later by giving sensible fallbacks in old ds-versions
* Move layers overview styling to a separate CSS-file
* Adjustments for mobile view
* Make all content on the designsystem front page editable in Sanity
* Further adaption to smaller screen sizes
* Handle promoTag being null
* Remove old patches to link and typography to support contrast variants. Will do this manually through CSS variables for now.
* Remove overrides from link-card css, and using local overrides instead
* Remove commented-out code
* Actually use Sanity data
* Update url
* Move getting started files to a sub-folder
* Move change log files to a sub-folder
* Move aksel-by-numbers files to a sub-folder
* Move ds layers overview files to a sub-folder
* Move support section files to a sub-folder
* Migrate to use new LinkCard component instead of the local one. Had to use Box to add background to the icon, as that has been removed from the component.
* Reverse changes made to this out-dated component, as this code no longer uses it.
* 🚚 Moved data-fetch for changelog to sub-component
* 💄 More spacing between promo and title
* 💄 Removed max-width for layers-panel
* ♻️ Inline gettingstarted-components
* ♻️ Use PageBlock for maxWidth handling
* ♻️ Use LinkCards for mobile layers view
* ♻️ Respect content-type for changelog
* ✨ Use new animated arrow for promo-link
* ♻️ Return notfound if data-loading fails
* 💄 Soft support card bg
* 🐛 Sync teal colors
* 💄 Use last changelog-card as a static link to changelog
* Update aksel.nav.no/website/app/dev/(designsystemet)/designsystemet/page.tsx
Co-authored-by: Halvor Haugan <83693529+HalvorHaugan@users.noreply.github.com>
* Make layers links larger (20px)
* Change support cards to LinkCards
* Aksel by numbers: Change css to css modules
* ChangeLogNews: Change css to css modules
* DS Layers Overview: Change css to css modules
* PromoTag: Change css to css modules
* DSLandingPageHeading: Change css to css modules
* Attempt to add OG image and description
* Suggested typing change from Julian
* Update aksel.nav.no/website/sanity/schema/documents/designsystem-forside.tsx
* Handle null value as well
* Update aksel.nav.no/website/app/dev/(designsystemet)/designsystemet/_ui/change-log/ChangeLogNews.tsx
Co-authored-by: Halvor Haugan <83693529+HalvorHaugan@users.noreply.github.com>
* Update aksel.nav.no/website/app/dev/(designsystemet)/designsystemet/_ui/change-log/ChangeLogNews.tsx
Co-authored-by: Halvor Haugan <83693529+HalvorHaugan@users.noreply.github.com>
* Update aksel.nav.no/website/app/dev/(designsystemet)/designsystemet/_ui/promo-tag/PromoTag.module.css
Co-authored-by: Ken <26967723+KenAJoh@users.noreply.github.com>
* Update aksel.nav.no/website/app/dev/(designsystemet)/designsystemet/_ui/page-heading/DSLandingPageHeading.module.css
Co-authored-by: Ken <26967723+KenAJoh@users.noreply.github.com>
* Can remove css by adding the color token, now that we use BoxNew to add the icon background
* Remove code that was copied from Figma, but does nothing
* Add correct focus styling to PromoTag
* Overriding LinkCard is no longer necessary.
* Filtrer vekk aksel_ds_forside dokumenttypen fra toppnivå i Sanity
* Use semantic colors in PromoTag. Needed to disable eslint-rule because the linter does not find aksel-tokens
* Update aksel.nav.no/website/app/dev/(designsystemet)/designsystemet/_ui/ds-layers-overview/DSLayersOverview.tsx
* Add position: relative to layers link to fix positioning bug in Safari for the rhombus. Also removed redundant/duplicate :last-of-type selector.
* Only show focus-outline for layers links, not the rhombus and the dotted line
* Use same :hover and :focus-visible highlighting for the dotted line and rhombus for all layers links
---------
Co-authored-by: Ken <26967723+KenAJoh@users.noreply.github.com>
Co-authored-by: Ken <ken.aleksander@gmail.com>
Co-authored-by: Halvor Haugan <83693529+HalvorHaugan@users.noreply.github.com>
* schema for editorialStaff
* 🚚 editorial_staff_teams -> writers
also make it soft-enabled during transition period (hidden + allow incomplete)
* missing rename
* 💄 Flex-start align arrow in LinkCard
* 🐛 Center-align title when no description and footer is set
* 🔥 Removed redundant changesets since component is not yet released
* 📝 Modify story to show flex-start alignment of arrow
* 🎉 Small switch now 20px high for darkside
* 💄 Dynamic loader-size based on checked and switch-size
* 💄 Small size switch for legacy css
* 📝 Changeset
* ⚰️ Add depcation-warning in stylelint-config
* 📝 Changeset
* 🐛 Loader-icon was not centered
* Update @navikt/aksel-stylelint/src/deprecations.ts
Co-authored-by: Halvor Haugan <83693529+HalvorHaugan@users.noreply.github.com>
* Update .changeset/hip-walls-itch.md
* Update .changeset/flat-numbers-kiss.md
---------
Co-authored-by: Halvor Haugan <83693529+HalvorHaugan@users.noreply.github.com>
* ✨ Allow disabling new theme switch and darkside for spesific stories
* 🐛 Change default-value to false
* 🐛 Make sure to force light-mode when showing legacy-stories
* ✨ LinkCard boilerplate
* ✨ Initial setup copying code over from website
* :WIP: Story update
* ⚡ Working mouseevent solution
* 🎉 Standalone card utilities
* 🚚 Moved LinkAnchor utility to separate file
* 💄 Add card css
* 💄 Grid-layout
* 🐛 visited text had wrong color
* 💄 Adjust animations
* 📝 Image sub-component docs
* 📝 LinkCard Stories
* 💄 Add support for data.colors
* 📝 Support chromatic-view
* 📝 Ajust story-example
* 🏷️ Export LinkCard component trough package.json
* 🏷️ Setup sub-component exports
* 🚚 Extract utils into util-dir
* 🚚 Extract LinkAnchor CSS
* ✨ Added LinkCard and LinkAnchor support for legacy
* 📝 Added LinkCard to CSS mappings
* ✨ Add size-prop to title and description
* 📝 Added stories for sizing-prop added to title and description
* ✨ Added size-support in Description
* 📝 Changeset
* ♻️ Update general sizing for type based on LinkCard size
* 📝 Adde uu-demo for testing
* 🐛 Resolve Modal-story bug
* ♻️ Re-write nested CSS in legacy to support postcss
* 📝 JSDoc
* 🐛 Add use-client
* 🎉 Implemented LinkCard Primitive
* ⚰️ Remove LinkCardPrimitive experiment
* 🎉 Compose onClick-events in Anchor util
* 🐛 Remove old stories
* 🏷️ Require href when not using asChild
* Update @navikt/core/react/src/link-card/LinkCard.tsx
Co-authored-by: Halvor Haugan <83693529+HalvorHaugan@users.noreply.github.com>
* ♻️ Code review cleanup
* 🚚 Move isTextSelected util
* [Examples] Linkcard examples (#3886)
* 📝 LinkCard example code
* ♻️ Avoid rendering arrow when hasArrow is false
* ♻️ Make user add their own img-tag in LinkCard
* 🐛 Allow image to define its own with do avoid CLS when loading
* 🐛 Legacy CSS for linkcard was not synced with darkside
* 📝 More examples
* 📝 Update examples
* 📝 Add example for umami-logging
* ♻️ hasArrow -> arrow
* ♻️ Clean up unused word wrapping css
* 🐛 Center icon when only title is used
* 📝 Added jsdoc directly on sub-components
* 🚚 Moved LinkPanel to deprecated status
* 📝 Added new stories to chromatic
* Update @navikt/core/css/link-card.css
Co-authored-by: Halvor Haugan <83693529+HalvorHaugan@users.noreply.github.com>
* Update @navikt/core/css/link-card.css
Co-authored-by: Halvor Haugan <83693529+HalvorHaugan@users.noreply.github.com>
* Update @navikt/core/css/darkside/link-card.darkside.css
Co-authored-by: Halvor Haugan <83693529+HalvorHaugan@users.noreply.github.com>
* 📝 En -> nb
* 🐛 Use static images to avoid false hits from chromatic
* ⏪ Undo current Link-card css changes
---------
Co-authored-by: Halvor Haugan <83693529+HalvorHaugan@users.noreply.github.com>
* :ai: Vibe-code periode status generation
* 📝 Document timeline example
* 📝 Add aria-controls to example
* 🎉 Example periods are more static now
* Update aksel.nav.no/website/pages/eksempler/timeline-intern/dynamic.tsx
Co-authored-by: Halvor Haugan <83693529+HalvorHaugan@users.noreply.github.com>
---------
Co-authored-by: Halvor Haugan <83693529+HalvorHaugan@users.noreply.github.com>
* 🚧 initial conversion++
* Hero + color animation
* 🚧 infinitely loading?
* 🚧 loading 2/?
* ✨ GpFrontpageCard
* typing++
* regen query types
* disable turbopack
* animations work in dark & light, but if you toggle they get out of sync
* sync animations
* tone down the lines
* page + gpfrontpagecard
* move + use godPraksisPictogram
* 🚧 frontpageLatest
* convert the masonry stuff (wip)
* wip cards (masonry)
* wip cards (masonry)
* wip cards (masonry)
* mostly complete masonry
* cleanup
* tweak widths, better hierarchy with pageblock
* fix broken cube animation
* do not add stylelint rules in this PR
* bit of css insanity to block out the cube animation further down
* use LinkCard for latest news
* hero heading spacing and line height
* colors (gradient and cube) + heroText responsive size
* cube strokes respect pauseAnimation & mobile & responsive icons in gp
* working context state for pausing animations
* LinkCard usage++
* card transition animation fix
* use SEO image (opengraph)
* link fixes (use our Link with as={NextLink})
* design review fixes (#3816)
* minor gradient CSS tweak
* missing border-radius clip on gp og image
* Update Hero.tsx
Co-authored-by: Ken <26967723+KenAJoh@users.noreply.github.com>
* Update Highlight.tsx
Co-authored-by: Ken <26967723+KenAJoh@users.noreply.github.com>
* Update GpFrontpageCard.tsx
Co-authored-by: Ken <26967723+KenAJoh@users.noreply.github.com>
* Update GpFrontpageCard.tsx
Co-authored-by: Ken <26967723+KenAJoh@users.noreply.github.com>
* Update landingpage.module.css
Co-authored-by: Ken <26967723+KenAJoh@users.noreply.github.com>
* PR comment fixes
* sync jsdom dep across workspaces
* ♻️ move and rename components to make more sense
* ♻️
* use non legacy Image + alt texts
* semantic html++ (li inside ul)
* LinkCard can be non-heading
* redundant screenreader info
* simplify shouldStopAnimation a fair bit
* useMemo
* copy cube to /dev/_ui/
* cleanup css
* remove unused CSS use globals.css data- attrib
* use hgrid
* add metadata/OG + minor css cleanup
* use existing LinkCardAnchor + tweak margin for it
* use Layout Component + rename variable
* update:sanity-schema
* improved typing
* type GpFrontpageCard
* redundant className
* LinkCard tweaks
* ♻️ broken file import + 🔥 comment
* better comment to explain hardcoded color values
* add missing type from query
* comments + og title
* fix highlighted cards alignment
* typing++
* 🚧 typing...
* good typing
* update query
* sort might fail if publishedAt is missing, but it should be
* typing++
* typing++
* 🐛 Div -> section for highlighted articles
---------
Co-authored-by: Ken <26967723+KenAJoh@users.noreply.github.com>
Co-authored-by: Ken <ken.aleksander@gmail.com>
* ✨ Now auto-scrolls to examples when navigated to
* ♻️ Always scroll, even when example was already selected
* Update aksel.nav.no/website/app/_ui/kode-eksempler/KodeEksempler.provider.tsx
Co-authored-by: Halvor Haugan <83693529+HalvorHaugan@users.noreply.github.com>
* 🐛 Avoid re-focusing example from side-effects
---------
Co-authored-by: Halvor Haugan <83693529+HalvorHaugan@users.noreply.github.com>
- Justerte kontrast på fargen 600 (4.51:1 i Leonardo), noen farger er endret.
- La inne MetaPurple i DS Leonardo-fil. Det førte til små justeringer av fargene.
* 🎉 Allow for unique hardcoded pages to appear in global search
* 🐛 Code cleanup
* 📝 Use page metadata for search metadata in routing config
* 🐛 Resolve null-check type error
* 🎉 Rename border-radius tokens to radius with number-naming
* 🔥 Remove border-radius token from darkside tailwind config
* 🚚 Rename border-radius tokens
* 🏷️ Text-icon renamed to text-decoration
* ♻️ Update auto-migration to new decoration token
* ♻️ Migrate text-icon -> text-decoration in components
* ♻️ Allow migrating to default tailwind rounded-tag from legacy aksel-token
* 🔥 Removed throw error for using legacy border-radius token i box
* 📝 Update types to allow for legacy and updated border-radius
* ♻️ Allow for use of both legacy and updated radius token in box
* ♻️ Updated Box-migration to support space-delimited prop-values
* 📝 Changeset
* 📝 Darkside changelog
* 🐛 Add missing manual token-docs
* 🐛 Resolve not updated import after radius filename change
* Delete .changeset/big-goats-report-5.md
* ✨ Support space-separated radius tokens in primitives migration
* ♻️ Temp support legacy radius toke for darkside system
* ✨ Introduce ImageAsThemedSvg for SVG handling in ImageAsSvg.tsx
* 💄 Update background color for dark mode in DesignsystemetOverview.module.css
* 🎉 Use 'themed' thumbnails for ds-pages
* 💄 Change background color to var(--ax-bg-neutral-soft) in DesignsystemetOverview.module.css
* 💄 Move tag to top of overview-card
* 📝 yarn lock sync
* 💄 Tone down overview thumbnail preview
* 🔥 Remove arrow from overview cards
* ♻️ Show arrow on LinkCard
* ✨ Introduce `Studio` component in `Studio.tsx` and `page.tsx` for admin interface
* ♻️ Move Admin and tooling to app-router.
* 🔥 Remove `[[...index]].js` from `legacy-admin` directory
* ♻️ Update sanity to v3.86.1
* 🐛 Setup non-working presentation-mode for sanity
* ✨ Update resolver
* 🎉 Added iframe support for preview in tandem with presentation-mode
* ✨ Integrate `stegaClean` in multiple components for consistent data handling
* 🎉 Render exit draft button
* ✨ Allow for better admin controls and preview
* 🔒 Upgrade insecure requests in production-builds
* 🐛 Update next-sanity to resolve SanityClient type mismatch
* 🐛 Update sanity to 3.87 to fix mismatching sanityclient types
* 🐛 Clean iframe URL to avoid using encoded data, causing errors since url is to long
* ♻️ Use server actions to disable preview mode to stay on page after reload
* 🔥 Remove unused lint-command
* ♻️ Refactor `syncPosition` to use `useCallback` in `CompareImagesProvider`
* ♻️ Refactor dependencies in `GlobalSearchProvider` effect and debounce function
* ♻️ Refactor exports to use type syntax in multiple components
* ♻️ Refactor `articlesMap` access in `page.tsx` to use dot notation
* 🐛 Ignore autogenerated sanity types
* ♻️ Refactor selectedRange rendering in `input-range.tsx`, `input-single.tsx`, and `two-digit-year.tsx`
* ♻️ Refactor `updateConsent` to use `useCallback` in `CookieProvider.tsx`
* 🩹 Ignore lint warning for assignment in expressions
* ♻️ Avoid variable re-assignent in while-loops
* Init new tokens page
* Add token display for (most of) color tokens. Still need a real display example for opaque++.
* Add TableOfContents
* Improve category handling of tokens and add space, radius and shadow
Less reduce and format category on backend
* Fix shadow token example
* Re-introduce role filtering
* Custom sorting for different token types
* Added placeholder comments with text "TODO: Sjur fyller ut" for all (hopefully?) tokens
* Sort token categories
* Add breakpoint tokens
* Make comments a bit smaller in line with the design
* Add font tokens
* Simplify token example code (DRY-principle)
* Remove fallback-comment and add a small gap between token name + rawValue and the comment
* Do not show rawValue for color tokens, as we do not want to encourage using them directly
* Fix issue where we could potentially return undefined from sorting function
* Add breakpoint groups for easily selecting mobile or desktop first media queries
* Simplify how we generate the display value for breakpoint tokens
* Ignore global-color and opacity tokens when generating token config. These will not be displayed on the webpage.
* Fix ToC import after change from main
* Move Tokens toolbar/filter/search to /components
* Add naive token search
* Extract Color token example
* Extract Shadow token example
* Extract Breakpoint token example
* Extract Radius token example
* Extract Space token example
* Extract Font token example
* Refactor TokenExample wrappers
* Extract TokenPreview
* Extract token categories config
* Extract TokenEntry - the presentation of an individual token
* Extract TokenCategory - a collection of of tokens, like background color, radius og font tokens
* Move function for sorting tokens to a util-file
* Don't add Chips wrapper if the category has no roles
* Extract chips for selecting roles
* [Token-docs] Static semantic colors with comments (#3661)
* ✨ Config to create files
* ✨ Config to create files
* ✨ Add semantic role token configurations for info, accent, and danger colors
* 🔧 Refactor semantic role token configuration for consistency
* Add config for token roles and categories. This eliminates the need for some sorting and prettifying of text for titles
* Beskrivelse av tokens på config.ts (#3692)
* Show role descriptions and accept markdown in descriptions for categories, roles and tokens
* This link shouldn't have been pushed
* Tokenbeskrivelse til tokens i mappa /semantic-roles (#3700)
* Update meta-lime.tokens.ts
* Tokenbeskrivelse for accent, brand-beige, brand-blue, brand-magenta og danger.
* Tokenbeskrivelse til info, meta-purple, neutral, success og warning.
* Update @navikt/core/tokens/darkside/tokens/colors/semantic-roles/brand-beige.tokens.ts
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
* Update @navikt/core/tokens/darkside/tokens/colors/semantic-roles/brand-blue.tokens.ts
* Update @navikt/core/tokens/darkside/tokens/colors/semantic-roles/warning.tokens.ts
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
* Apply suggestions from code review
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
* Update @navikt/core/tokens/darkside/tokens/colors/semantic-roles/accent.tokens.ts
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
* Update @navikt/core/tokens/darkside/tokens/colors/semantic-roles/brand-beige.tokens.ts
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
* Update @navikt/core/tokens/darkside/tokens/colors/semantic-roles/brand-beige.tokens.ts
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
* Update @navikt/core/tokens/darkside/tokens/colors/semantic-roles/neutral.tokens.ts
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
* Update @navikt/core/tokens/darkside/tokens/colors/semantic-roles/brand-blue.tokens.ts
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
* Update @navikt/core/tokens/darkside/tokens/colors/semantic-roles/brand-magenta.tokens.ts
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
* Update @navikt/core/tokens/darkside/tokens/colors/semantic-roles/brand-magenta.tokens.ts
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
* Update @navikt/core/tokens/darkside/tokens/colors/semantic-roles/brand-blue.tokens.ts
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
* Update @navikt/core/tokens/darkside/tokens/colors/semantic-roles/danger.tokens.ts
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
* Update @navikt/core/tokens/darkside/tokens/colors/semantic-roles/success.tokens.ts
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
* Update @navikt/core/tokens/darkside/tokens/colors/semantic-roles/meta-purple.tokens.ts
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
* Update @navikt/core/tokens/darkside/tokens/colors/semantic-roles/meta-lime.tokens.ts
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
* Update @navikt/core/tokens/darkside/tokens/colors/semantic-roles/accent.tokens.ts
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
* Update @navikt/core/tokens/darkside/tokens/colors/semantic-roles/info.tokens.ts
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
---------
Co-authored-by: Ken <26967723+KenAJoh@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
* Migrate new tokens page to app router. Changed border and background colors without checking much, so may need to go through those later. Layout is also a bit messed up.
* Add ToC on tokens page
* Layout fixes
* Show "Send feedback" button
* Rename tokens-page.tsx -> TokensPage.tsx
* Use proper type for tokens on TokenPage
* Move search query to url params to allow for use on server side rendered page
* Improve token search by using Fuse
* Filter TableOfContents based on search results
* Add background for opaque tokens. Kinda weak determination that the token is opaque, so that may have to be improved.
* Update tokens to use new darkside tokens as appdir uses this CSS
* Remove default color presentation. Rather log the unknown category for debugging purposes.
* Add functionality for switching between JS and CSS tokens
* Align CopyButton better with text
* Fix search onSubmit, so it does not clear the input
* Use simple Search variant
* Hard-code page header for non-Sanity token-page
* Move darkside tokens page to correct slug (grunnleggende/styling/tokens-darkside) and include it in the left-hand menu
* Filter token roles chips based on search results, so we don't show chips for the roles that has no results
* Token search should ignore where in the results the hits are located, as there are no long texts. A hit is a hit!
* Change multiple instances of Record to just add an "id" property to the objects and place them in an array for easier interaction in the code
* Filter out placeholder token comments and remove placeholder category descriptions
* Move filtering out of the render function
* Add subheadings for roles, and move descriptions to under the subheadings. Also remove chips if there are only one.
* Adjust spacing for tokens list (distance between heading + description vs those and the following list)
* Update aksel.nav.no/website/components/token-docs/token/example/TokenEntry.tsx
Co-authored-by: Ken <26967723+KenAJoh@users.noreply.github.com>
* Update aksel.nav.no/website/components/token-docs/token/example/TokenEntry.tsx
Co-authored-by: Ken <26967723+KenAJoh@users.noreply.github.com>
* Added comments to semantic-root.tokens.ts
* We omit comments for radius, breakpoint, font and space tokens, so comment needs to be optional
* Clarify shadow token use in comment
* Add EmptyStateCard when no tokens are shown
* Vertically center TokenPreview
* Fine-tune search thresholds to provide better results for typos
* Properly define a "root" role for unique tokens and show heading and description. The actual name may be changed later.
* Add support for LESS and SASS tokens as well
* Formatting (line-length)
* Stop setting selected role automatically if filtering causes only one role to be shown. We now remove the chips in this case and always show a heading and description instead.
* Remove "mobile first"/"desktop first" from displayed breakpoint token value, because it hinders copying the text. The same need is covered by the new role heading instead.
* Fix copy-pasted label for TokenFormatSelector
* Refine spacing in line with new Figma sketches to better group content
* Remove "Stabil" tag and "Last updated" text because they do not make sense here. They always apply to the latest version, and then we might have to document outdated tokens somewhere.
* Clean up tokens-darkside page.tsx: remove unnecessary generateStaticParams() and remove awaiting unused params
* Move type into token-docs folder as it is only used there
* Proper typography for token comment
* Reset selected role when searching
* Use static metadata for tokens page, as we don't have any sanity data/parent to receive data from
* Move new tokens page to the "darkside" category
* Remove TODO in description of Meta Purple
* Make Token role Chips neutral to not steal too much attention
* Fix issue where selecting a chip was reverted after half a second, so changed the useEffect to only react to the actual changed search query instead
* Fixed missing gap in mobile view
* Fix bug where changing to another format and back to CSS caused the token name to disappear
* Proper "eyebrow" above page heading (Changed styling -> grunnleggende and color)
* Co-locate tokens page components in app dir
* Use correct heading color for H1
* Update to new darkside tokens
* No longer used
* Add the vk-error class to fallback examples for tokens (where category, group, etc. is unknown) and log a warning in the console
* Add a name to the tokens role chips list, so we inform the user about what they filter
* Disable autocomplete, like for other search fields on the website (main- and icon search)
* Add the correct gap between categories
* Do not use heading tags for token examples to avoid messing with accessibility
* Translate category titles
* Fine-tune search weighting. Still needs more adjustments - likely sorting results, as a "similar result" can now appear before a direct result.
E.g. "avstand" -> Background colors with "standard" in a comment appears before the "Avstand" category tokens.
* Adjust scroll margin so search field is not shown for top category
* Hide token preview from assistive technology
* Add links to Slack and GitHub to "no tokens" block
---------
Co-authored-by: Ken <26967723+KenAJoh@users.noreply.github.com>
Co-authored-by: Sjur <82579704+sjur-gr@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
* 🎉 Added umamiTrack function
* 🚚 Use new umamiTrack function to do manual tracking
* 🚚 Use manual umami tracking onClick for links and logging
* 🏷️ Stronger typing
* 🚚 Manually track URL for navigation events
* 🐛 Use empty object in non-descriptive umamiTrack events
* ⚡ Re-enable Umami
* Update aksel.nav.no/website/app/_ui/umami/Umami.log.tsx
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
* 📈 Track navigation events in `GpChip` and simplify URL handling in `page`
---------
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
* ✨ feat: Add GOD_PRAKSIS_ALL_TEMA_QUERY and related types for improved data fetching
🎨 style: Update globals.css to enhance accessibility for skip links
📝 docs: Enhance theme.d.ts with new data-text-prose attribute for prose text styling
🎉 feat: Implement HeroCube component for visual representation in the hero section
🎨 style: Create Hero.module.css for styling the hero components
🎉 feat: Develop GodPraksisIntroHero component for the hero section
🎉 feat: Create TemaHero component for displaying theme navigation
🎉 feat: Implement HeroCardList for rendering theme cards
🎉 feat: Add HeroIntro component for displaying theme title and description
🎉 feat: Create HeroSelectButton for toggling theme selection
🎉 feat: Build page.tsx to fetch and display themes with the new components
* 🚚 Port over linkcard
* 💄 Replicate gp figma card
* 🎉 Synced hero
* ✨ Implemented GP frontpage
* 🔍 Add god-praksis metadata
* 🎉 Fetch and parse svg from sanity
* 🎉 Update use of linkcard on gp-pages
* 🎉 Use LinkCard on overview-pages
* Update aksel.nav.no/website/app/dev/(god-praksis)/god-praksis/page.tsx
* Update aksel.nav.no/website/app/dev/(god-praksis)/god-praksis/page.tsx
* 🐛 Clean up linkcard types
* ✨ Added data-fetching for tema-pages
* ✨ Gp-hero is now a self-fetching component
* ✨ Migrated state-handling for hero-banner
* ✨ Migrated CSS and interactions for HeroModule
* 🎉 Implemented chip-navigation logic
* 🐛 margin-animation did not work
* 🐛 Used undefined 'open' value
* ⚡ Optimize article mapping
* 📝 Add better metadata to categories
* ✨ Render articles as LinkCard
* ⚡ Fix URL parameter handling in GodPrakisChipsNavigationButton and add prefetch on hover
* 🐛 Chips nav had duplicate data
* 💄 Synced layout with Figma
* 🔍 Added metadata
* 🎨 Refactor padding in search form and improve header logo visibility based on screen size
💄 Add icon styling for GodPraksisHeroButton and create GodPraksisTaxonomyTag component
* 🐛 Add spacing below hero description
* 🐛 Remove spacing from description when no element below
* 🐛 Use data-attrb since last-child selector cant work
* 💄 Use new linear gradient for darkmode hero banner
* 🐛 Add missing focus-markings, word break for title
* 🐛 Use updated colors for fallback image
* [Appdir] God praksis article page Part 1 (#3743)
* 🎉 Scaffolding for gp article pages
* 🐛 Add spacing top to non-first child headings
* ✨ Implemented SystemPanel component
* ✨ Added sanity login check to outdated panel
* [Appdir] God praksis article page Part 2 (#3746)
* ✨ Added authors
* 📝 Formatting
* ✨ Added related articles content
* ♻️ Refactor UnderTemaLink to inline implementation with NextLink
* ✨ Integrate EditorPanel into multiple components and remove unused styles
* 🔍 Add metadata to page
* 🔥 Remove TOC from GP pages
* 🐛 Remove duplicate outdated panel render
* ✨ Add GodPraksisFeedback component with context and states for user feedback
* ✨ Added form-state and validation clientside
* ✨ Added RCS auth
* ♻️ Optimize slack-user lookup, inline inside action
* ✨ Refactor GodPraksisFeedback components and enhance page layout with relevant articles
* 💄 Remove bg from bilde-caption
* 💄 Fix list layout
* 🐛 Editorpanel dir had extra space
* Update aksel.nav.no/website/app/_ui/toc/TableOfContents.tsx
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
---------
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
* 🐛 Avoid getting updated types for legacy-implementation
* 💄 Move related links
* Update aksel.nav.no/website/app/_ui/toc/TableOfContents.tsx
* Update aksel.nav.no/website/app/dev/(god-praksis)/god-praksis/artikler/[slug]/page.tsx
---------
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
---------
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
* ✨ feat: Add GOD_PRAKSIS_ALL_TEMA_QUERY and related types for improved data fetching
🎨 style: Update globals.css to enhance accessibility for skip links
📝 docs: Enhance theme.d.ts with new data-text-prose attribute for prose text styling
🎉 feat: Implement HeroCube component for visual representation in the hero section
🎨 style: Create Hero.module.css for styling the hero components
🎉 feat: Develop GodPraksisIntroHero component for the hero section
🎉 feat: Create TemaHero component for displaying theme navigation
🎉 feat: Implement HeroCardList for rendering theme cards
🎉 feat: Add HeroIntro component for displaying theme title and description
🎉 feat: Create HeroSelectButton for toggling theme selection
🎉 feat: Build page.tsx to fetch and display themes with the new components
* 🚚 Port over linkcard
* 💄 Replicate gp figma card
* 🎉 Synced hero
* ✨ Implemented GP frontpage
* 🔍 Add god-praksis metadata
* 🎉 Fetch and parse svg from sanity
* 🎉 Update use of linkcard on gp-pages
* 🎉 Use LinkCard on overview-pages
* Update aksel.nav.no/website/app/dev/(god-praksis)/god-praksis/page.tsx
* Update aksel.nav.no/website/app/dev/(god-praksis)/god-praksis/page.tsx
* ✨ Added theming-support to appdir
* 📝 Added changelog docs for theme class change
* ♻️ Use inline head to set local styles instead of css-modules
* ✨ Setup overview-page
* 🐛 Use inline styles instead of Head element from nextjs
* WIP: V1 list view
* 💄 Align overview heading with regular page heading
* 🐛 Moved margin-bottom to top for overview grid
* 🎉 Add overview toggle for component pages
* 🎉 Added overview-pages to sidebar
* 🎉 Added routing support for overview pages
* 🎉 Setup staticparams and metadata for overview-pages
* 🚚 Moved overview components out to now dir
* ✨ Added overview support for komponenter, templates and grunnleggende
* 🔥 Removed unused sanity-field
* 🐛 Hide fallback-svg
* 🐛 Fix misspelling
* 🎉 Added Iconpage filtering and navigation
* 🎉 Added modal view
* 🐛 Fixed searchParams type
* 🎉 Added empty-state
* 🔥 Removed forced use-client for emptystate
* 🎉 Support svg fetch
* 🔥 Refactor IconPage components and remove unused sidepanel
* 🎉 Added links
* 📝 Added metadata
* 🐛 Resolve impure css module class
* 🐛 Fix iconName validation logic in IconPage component
* 🎨 Improve layout and styling in IconPage components
* 🎨 Update HStack component to use 'as="ul"' for semantic HTML
* ✨ Added icon-page to sidebar
* Update aksel.nav.no/website/app/dev/(designsystemet)/_ui/sidebar/Sidebar.util.ts
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
* Update aksel.nav.no/website/app/dev/(designsystemet)/_ui/icon-page/IconPage.button.tsx
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
* ⚡ Added zod-validation and debounce to search
* 🏷️ Resolved updated types
* ⚡ Use clientside updates for icon-page
---------
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
* ✨ Added theming-support to appdir
* 📝 Added changelog docs for theme class change
* ♻️ Use inline head to set local styles instead of css-modules
* ✨ Setup overview-page
* 🐛 Use inline styles instead of Head element from nextjs
* WIP: V1 list view
* 💄 Align overview heading with regular page heading
* 🐛 Moved margin-bottom to top for overview grid
* 🎉 Add overview toggle for component pages
* 🎉 Added overview-pages to sidebar
* 🎉 Added routing support for overview pages
* 🎉 Setup staticparams and metadata for overview-pages
* 🚚 Moved overview components out to now dir
* ✨ Added overview support for komponenter, templates and grunnleggende
* 🔥 Removed unused sanity-field
* 🐛 Hide fallback-svg
* 🐛 Fix misspelling
* ✨ Setup appdir cookie-banner view
* 🎉 Moved cookie-handling to server-actions
* 🐛 Remove impure css module use
* 🐛 Use forced dynamic to allow consent-banner
* 📝 Add docs
* 🎉 Moved consent doc-page
* ♻️ Rename cookie-actions to use 'action'-suffix
* ✨ Added theming-support to appdir
* 📝 Added changelog docs for theme class change
* ♻️ Use inline head to set local styles instead of css-modules
* ✨ Setup overview-page
* 🐛 Use inline styles instead of Head element from nextjs
* WIP: V1 list view
* 💄 Align overview heading with regular page heading
* 🐛 Moved margin-bottom to top for overview grid
* 🎉 Add overview toggle for component pages
* 🎉 Added overview-pages to sidebar
* 🎉 Added routing support for overview pages
* 🎉 Setup staticparams and metadata for overview-pages
* 🚚 Moved overview components out to now dir
* ✨ Added overview support for komponenter, templates and grunnleggende
* 🔥 Removed unused sanity-field
* 🐛 Hide fallback-svg
* 🐛 Fix misspelling
* Update aksel.nav.no/website/app/dev/(designsystemet)/_ui/sidebar/Sidebar.tsx
* 🐛 Could not create overview-pages for grunnleggende or templates
* Remove unused CSS that causes issues when Combobox' ToggleListButton is skipped
This code removed wrapping of chips if ToggleListButton is hidden, and will only ever apply to the button otherwise. That does not need a flex layout.
* Add changeset
* ✨ Added theming-support to appdir
* 📝 Added changelog docs for theme class change
* ♻️ Use inline head to set local styles instead of css-modules
* 🐛 Use inline styles instead of Head element from nextjs
* 🚧 box migration scaffolding
* 🚚 boxnew -> darkside/boxnew
* 🚧 wip
* 🚧 working single substitution (pending lookup in replacements)
* ✅ working test
* import rename in output test
* ✅ import rename + tests
* use config comments, better import example
* commentblock function (append to string output) + update tests (failing)
* 🚧 almost good... needs to respect renamed imports
* ✅ passing tests
* ♻️ organize some utils
* 🧪 Added more tests
* cast JSXIdentifier type
* pass idempotency tests
* also refactor the usage when renaming a function
---------
Co-authored-by: Ken <ken.aleksander@gmail.com>
* ♻️ Update TOC feedback, add layout padding bottom
* 🐛 Added missing type
* 🐛 Fix missing spacing in intro-section
* 🎉 Added metadata for changelog view support in mønster pages
* 🎨 Refactor layout styles and enhance sidebar button animations
* 🎉 Added SEO support
* 🐛 Add page SEO image to start of image list
* 🔥 Remove reduntant early exit code
* 🐛 Open feedback in new tab
* 🐛 Update footer to use responsive layout
* 🐛 Moved theme-colors to viewmport config
* 🐛 Show mobile-menu earlier
* 🐛 Use local schema in sanity-typegen
* 📝 Typo
* ✨ Implemented codeblock header and codeblock
* ✨ Can now toggle betweem different code-views
* 🐛 Use Theme component to get color-scheme in CSS
* 💄 Updated padding, use custom theme
* ✨ Implemented custom prism-theme
* ✨ Use new prism-theme for propsseksjon
* 🎉 Use new codeblock for single code view
* 🐛 Add hover-effect for expander button
* ✨ Added provider and navigation support
* WIP: Add codeview block
* ✨ Enhance KodeEksempler with Suspense, toolbar, and improved props handling
* 🎨 Refactor CodeBlock component by removing unnecessary Theme wrapper and improving className handling
* ✨ Use local styles for kodeexample module
* 🐛 Add useclient
* 🐛 Use local css variable since css counter breaks at random
* ✨ Set up page-slug query logic
* ♻️ Inline TableOfContents in smaller modules
* 🎨 Refactor TableOfContents styles and update component structure
* 🎨 Enhance TableOfContents styles and structure for improved responsiveness and clarity
* ✨ Enhance TableOfContents component with feedback and changelog links; refactor queries for improved data handling
* 🚚 Co-localized layout in grouped ui dir
* ✨ Extract schema types from sanity
* 🐛 Update sidebar types to use new sanity schema-types
Bug: icon was marked as "new tab" but the icon for new tab is an box with the arrow stopping at the border. Having the new tab synonym here will cause missunderstandings.
Bug: icon was marked as "new tab" but the icon for new tab is an box with the arrow stopping at the border. Having the new tab synonym here will cause missunderstandings.
* root layout
* ✨ Added draftmode
* ✨ Setup boilerplate
* ✨ Setup grouping-dir
* ✨ Implemented header
* 💄 Made header sticky
* 🔒 Content security policy updated
* 🚚 Moved favicon to appdir
* 🔥 restore old frontpage
* 🚚 Moved sidebar to appdir
* ✨ Implemented sidebar loading
* ✨ Doc lyout
* 🐛 Add id for skiplink
* ✨ Added new footer
* 💄 Move skiplink further away
* 💄 Add more padding bottom sidebar
* ✨ Refactor header and sidebar components for improved layout and structure
* 📝 Uncomment some code
* 🔥 Removed user server directive from component and layouts
* 🐛 Center footer
* 🐛 Re-added support for chromatic connect
* 🔥 removed browser-token
* Update aksel.nav.no/website/app/_ui/footer/Footer.tsx
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
* [Aksel.nav.no] Ported over global search to app-router (#3663)
* 🚚 Moved search-code closer to app router
* ✨ Added button and modal
* ⚡ Initial loading for recent articles
* ⚡ Query data from the server
* ✨ Generates parsed search-results
* ⚡ Added debounce
* ✨ Render hits
* ♻️ Limit articles for each field to 20
* 🐛 Revert form-layout to initial view
* 🐛 Build searchindex before website
* ✨ Pre-select text when re-opening search
* ✨ Enhance global search UI with improved layout and styling
* ✨ Refactor global search components to improve search functionality and UI
* ✨ Improve global search functionality and UI responsiveness
* ✨ Update global search UI and functionality with improved input handling and styling
* ✨ Refactor global search dialog and add Kbd component for keyboard shortcuts
* ⚡ removed reduntant suspense
* ✨ Refactor global search components for improved styling and functionality
* ✨ Refactor global search results rendering for improved performance and readability
* ✨ Update global search dialog and form for improved styling and accessibility
* ✨ Refactor global search components for improved layout and styling
* ✨ Refactor GlobalSearchHitCollection for improved styling and accessibility
* 🎨 Update global search configuration and styles for improved clarity and aesthetics
* 🎨 Update layout and styles for global search components for improved aesthetics and readability
* ✨ Refactor global search utilities and update styles for improved clarity and maintainability
* 🔧 Refactor global search queries and implement caching for improved performance and data retrieval
* ⚡ Preload cache for search
* 🔧 Refactor fetchArticles function to improve caching logic and remove unnecessary logging
* 🔥 Removed user server directive from component
* 🔥 Removed comments
* ⚡ Explicitly declare server-only component
* Update aksel.nav.no/website/app/_ui/global-search/GlobalSearch.fetch.ts
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
* Update aksel.nav.no/website/app/_ui/global-search/GlobalSearch.fetch.ts
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
* 📝 Rename sanitiezedata
---------
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
* [Aksel.nav.no] Move Aksel-brand theme into app-router for use (#3668)
* 💄 Added global aksel-theme tokens
* ✨ Implement new Aksel-brand for theming
* [Aksel.nav.no] Updated MobileMenu for new ds-pages (#3670)
* 💄 Added global aksel-theme tokens
* ✨ Implement new Aksel-brand for theming
* ✨ Initial setup mobile-menu
* ✨ V1 mobile-menu component
* 💄 Update mobile navigation and global search responsiveness; adjust overlay color opacity
* 💄 Refine modal backdrop animation timing and opacity for smoother transitions
* 💄 Adjust pressed-sidebar state
---------
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
* 📝 Reposition sanity fields
* ✨ Added new standalone-category to sanity docs
* ✨ Added validation to make sure standalone articles dont overlap with sections
* 🐛 Always error out if using standalone articles until implemented
* 🔥 Removed temp removal of feature
* 🐛 Check for undefined slug
* [Aksel.nav.no] Implemented support for new lvl 1 articles (#3658)
* ✨ Added support for new lvl 1 articles
* 🧪 Added tests for new sidebar
* 🔥 Removed breadcrumb from WithSidebar layout
* 🐛 Revert to prod dataset
* ✨ Setup darkside migration
* ✨ Can now convert primitives spacing
* 🧪 Added more tests
* 📝 Docs for utils
* 📝 Changeset
* 📝 Typos
* [Darkside] ✨ Added migration for css, less and scss (#3598)
* ✨ Added migration for css, less and scsss
* Update @navikt/aksel/src/codemod/migrations.ts
* ✨ Make old px spacing space-1
* ✨ Use esbuild to inline local references
* ✨ Added js migration to space-tokens (#3600)
* ✨ Setup first iteration of token translation object
* ✨ Started mapping old to new tokens
* ♻️ Simplified repalcement logic
* ✨ Added tests for token-migration
* ✨ Replaces old token with new reference
* ✨ Handle overrides of tokens
* 🧪 Global messages storage
* 📝 Added migration
* 🐛 Initialize message list
* ✨ Customizable results messaging
* ✨ Customizable results messaging
* 🐛 Use replacement, not ref
* 📝 Only document found legacy-tokens, dont rename them
* 📝 Better comments
* ✨ Added context to remaining token updates
* ✨ Added comments to unsupported token
* ✨ Format comments better, remove duplicates
* 📝 Success message if no legacy-tokens found
* 🐛 Return updated source files
* 🐛 Reference valid replacement
* 🔥 Removed comments
* ✨ Added better messaging
* ✨ Better messaging structure
* 🧪 Added more tests
* 🧪 Tests for less, scss, css and js tokens
* 🐛 CSS hits were shown as scss and less hits
* 📝 Format messages better
* 📝 Format messages better
* ✨ Added js-migrations template
* Update test runner
* 🐛 Revert mistakes
* 🐛 Resolve testing rig
* ✨ Js token migration
* 📝 Better docs for JS migration
* 📝 Added missing lineshift
* ✨ Tooling setup
* ✨ Tooling setup with enquirer
* ✨ Tooling setup with enquirer
* ✨ Set up inquirier and enquirer to promt user for tasks
* ✨ Get legacy-data
* ✨ Now formats and prints progress
* ✨ Now formats and prints progress
* ⚡ Smarter scanning of updated tokens
* ⚡ Refactored status-code
* ✨ Now prints remaining files
* ✨ Smarter tailwind-regex
* 📝 Tell user we are scanning the files
* ✨ Moved transforms to new darkside location
* 🚚 Moved tests for js transforms
* 📝 Updated prettier config to ignore new test-files
* 📝 Moved css, less, scss tests
* 🐛 Resolved tests not running properly on less,scss setup
* WIP: tailwind config migration
* 📝 Added tailwind config for border-radius
* ✨ Strictly match tailwind-classes
* ♻️ Convert status obj to class
* ♻️ Compact regex parsing
* ♻️ Simplified regex-handling for new token lookup
* ✨ Added support for component tokens
* ⚡ Optimize lineNumber task
* 🐛 Inline regex-probe
* 🐛 Remove old merged code
* 🐛 Fix regex escape-characters
* Update @navikt/aksel/src/darkside/index.ts
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
* 🐛 Fix token-tests
* ✨ Now prints with token-name
* ♻️ Move files
* ♻️ Move printing to TokenStatus class
* ✨ Add comments to printout
* 🐛 Handle word boundaries
* ⚡ Pre-generate the regexes
* 🧪 More regex-tests
* 🧪 More regex-tests
* ⚡ Use built-in regexes
* ⚡ Only run codeshift on relevant files
* 🐛 No print for codemod status update
* ⚡ Only run codeshift on relevant files
* 📝 Added extra space
* 📝 Exit after codemod
* 📝 Removed temp logging
* 🐛 Await codeshift execution
* 🧪 Added tests for not imported JS-tokens
* ✨ Implemented tailwind migration code
* 🧪 @apply tests for tailwind transform
* 🐛 Handle spaces better for tailwind config
* 🐛 Handle prefixing of tailwind config correctly
* 🐛 Handles cases where empty collection was passed
* 🐛 makes sure to clean up match before parsing
* 🧪 More tailwind-codemod tests
* ⚰️ Removed moved code, renamed darkside -> spacing for migrations
* ♻️ Config cleanup part 1
* ♻️ Config cleanup part 2
* ♻️ Refactored runner
* ✨ Added run all migraitons task
* 🐛 Use destrucutred taskname
* 📝 Better naming
* 📝 More spesific import docs
* 🐛 Print filename correctly when token contains special characters
* 🐛 Update spacing migrations paths
* 🐛 Added new spacing-tokens to legacy config
* ✨ Initialize status directly in constructor
* ⬆️ yarn lock sync
---------
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
* 🐛 Handle cases where to is defined and from is undefined
* 🐛 Fix missing state-option when selecting ranged datepicker values
* Update @navikt/core/react/src/date/datepicker/DatePicker.stories.tsx
* Update @navikt/core/react/src/date/datepicker/DatePicker.stories.tsx
* 🧪 Added tests for new ranged-datepicker logic
* 🐛 Typo
* 🎨 Adjust padding in alert styles for consistency
* 🎨 Update chat bubble padding for improved consistency
* 🎨 Standardize padding in date and modal styles for consistency
* 🎨 Refactor padding in error summary styles for improved consistency
* 🎨 Adjust padding in file upload styles for improved consistency
* 🎨 Update padding in file upload styles for improved consistency
* 🎨 Adjust transition duration and padding for form progress and summary styles
* 🎨 Update padding in guide panel styles for improved consistency
* 📝 Changeset
Endret i darkmode
Brand Blue og Success, 100 - 400, endret saturation til 100.
Accent, 100 - 400, endret saturation til 60.
Alle farger 600, endret til kontraststop til 4.52:1. Bug, noen farger havnet under 4.5:1.
Alle farger 1000, endret saturation til 100.
* 🚧 umami test script
* 🚧 CSP for umami
* 🚧 test data-tag, set no auto tracking
* ♻️ make consentBanner more self contained
* 🚧 working implementation for consent modal
* ♻️ move ConsentBanner to website-modules + small changes
* use typescript-cookies over localStorage API
* Copy Nav.no consent text
* better name for cookie
* 🚧 crude complex consent object
* Update aksel.nav.no/website/components/website-modules/ConsentBanner.tsx
Co-authored-by: Ken <26967723+KenAJoh@users.noreply.github.com>
* classify traffic better (umami)
* Update aksel.nav.no/website/components/website-modules/ConsentBanner.tsx
Co-authored-by: Ken <26967723+KenAJoh@users.noreply.github.com>
* link to our own personvernerklering + disable modal on that specific page
* use same conditions for all showModal() triggers
* update comment
* limit cookie to specific subdomain (prevent it getting sent by clients to other *.nav.no pages
* remove the MutationObserver, but keep query param to disable banner (for tests)
* bypass banner in e2e tests
* store "no action" consent data in sessionStorage
* 🚧 change to in document flow style banner (no more modal)
* 📱 responsive consent banner++
* website: set cookie domain dynamically (from serving site)
* hardcode /side/personvernerklaering
* 🚧 placeholder cookie preferences box
* cookie preferences box++
* dokmøte plenumsendringer
* move page personvernserklaering
* make the cookie preference form functional
* ♿ add missing aria-labelledby target
* re-enable banner on e2e search tests
* Add explanation to organic and polluted traffic
* extract consent state into custom hook
* PR review changes
* ✨ Serverside-check for cookie consent
* banner set tracking id from env var
* remove unused url param check
* env var toggle for PRODUCTION
use this to inject code scripts clientside, do stuff during build or anything else really! (better to use this than NODE_ENV)
---------
Co-authored-by: Ken <26967723+KenAJoh@users.noreply.github.com>
Co-authored-by: Lars Eirik Korsgaard Hansen <71271458+larseirikhansen@users.noreply.github.com>
Co-authored-by: Ken <ken.aleksander@gmail.com>
* ✨ Setup darkside migration
* ✨ Can now convert primitives spacing
* 🧪 Added more tests
* 📝 Docs for utils
* 📝 Changeset
* 📝 Typos
* [Darkside] ✨ Added migration for css, less and scss (#3598)
* ✨ Added migration for css, less and scsss
* Update @navikt/aksel/src/codemod/migrations.ts
* ✨ Make old px spacing space-1
* ✨ Use esbuild to inline local references
* ✨ Added js migration to space-tokens (#3600)
* ♻️ Use eslint-bundle as main build for CLI
* ♻️ Add mappings exports in ds-css, avoid using esbuild
* 💄 Update background Header
* 💄 Update popover padding for smaller screens
* 💄 Adjusted borders
* 💄 Uses Alpha-tokens for zebra-stripes in Table
* 💄 Stronger border for hovered timeline items, transparent track bg
* 💄 Transparent lines for Tabs to contrast colored bg
* 💄 New icons for Table-sorting
* 💄 Selected exoanded item now has accent colors
* 💄 Keeps border-color for active state in search-button
* 💄 Removed hover-color change on checked radio
* 💄 Only non-responsive or left-static guidepanels shrink on tablet or below
* 📝 Changeset
* 🚚 -hover tokens are now soft-hover
* ✨ Added soft-pressed token
* 💄 Use new soft-pressed token where applicable
* 💄 Default colored text is now 1000, strong replaced by subtle
* 🏷️ Updated primitive types for new text-tokens
* 🚚 Migrated old text-role-strong color to text-role-default
* 🚚 Migrated referansesider to new text-colors
* 🚚 Referansesider uses new soft-hover token
* 🐛 Fallback to updated accent-color
* [Darkside] Removed 'base' as neutral role replacement (#3556)
* ♻️ Remove default-scale as replacement for neutral in config
* 🧪 Setup chromatic-run for complete build
* 🚚 Text migrated
* 🚚 Text icon migrated
* 🚚 Text contrast migrated
* 🚚 bg soft migrated to neutral
* 🚚 bg moderate migrated to neutral
* 🚚 bg strong migrated to neutral
* 🚚 border default migrated to neutral
* 🚚 border subtle migrated to neutral
* 🚚 border strong migrated to neutral
* ⬅️ Revert chromatic preview
* 🚚 Migrated referansesider to new neutral scale
* 🚚 Use named brand and meta-colors
* 🚚 Referansesider uses new brand-names token
* 💄 Update background Header
* 💄 Update popover padding for smaller screens
* 💄 Adjusted borders
* 💄 Uses Alpha-tokens for zebra-stripes in Table
* 💄 Stronger border for hovered timeline items, transparent track bg
* 💄 Transparent lines for Tabs to contrast colored bg
* 💄 New icons for Table-sorting
* 💄 Selected exoanded item now has accent colors
* 💄 Keeps border-color for active state in search-button
* 💄 Removed hover-color change on checked radio
* 💄 Only non-responsive or left-static guidepanels shrink on tablet or below
* 📝 Changeset
* 🚚 -hover tokens are now soft-hover
* ✨ Added soft-pressed token
* 💄 Use new soft-pressed token where applicable
* 💄 Default colored text is now 1000, strong replaced by subtle
* 🏷️ Updated primitive types for new text-tokens
* 🚚 Migrated old text-role-strong color to text-role-default
* 🚚 Migrated referansesider to new text-colors
* 🚚 Referansesider uses new soft-hover token
* 🐛 Fallback to updated accent-color
* [Darkside] Removed 'base' as neutral role replacement (#3556)
* ♻️ Remove default-scale as replacement for neutral in config
* 🧪 Setup chromatic-run for complete build
* 🚚 Text migrated
* 🚚 Text icon migrated
* 🚚 Text contrast migrated
* 🚚 bg soft migrated to neutral
* 🚚 bg moderate migrated to neutral
* 🚚 bg strong migrated to neutral
* 🚚 border default migrated to neutral
* 🚚 border subtle migrated to neutral
* 🚚 border strong migrated to neutral
* ⬅️ Revert chromatic preview
* 🚚 Migrated referansesider to new neutral scale
* 💄 Update background Header
* 💄 Update popover padding for smaller screens
* 💄 Adjusted borders
* 💄 Uses Alpha-tokens for zebra-stripes in Table
* 💄 Stronger border for hovered timeline items, transparent track bg
* 💄 Transparent lines for Tabs to contrast colored bg
* 💄 New icons for Table-sorting
* 💄 Selected exoanded item now has accent colors
* 💄 Keeps border-color for active state in search-button
* 💄 Removed hover-color change on checked radio
* 💄 Only non-responsive or left-static guidepanels shrink on tablet or below
* 📝 Changeset
* 🚚 -hover tokens are now soft-hover
* ✨ Added soft-pressed token
* 💄 Use new soft-pressed token where applicable
* 🚚 Referansesider uses new soft-hover token
* 💄 Update background Header
* 💄 Update popover padding for smaller screens
* 💄 Adjusted borders
* 💄 Uses Alpha-tokens for zebra-stripes in Table
* 💄 Stronger border for hovered timeline items, transparent track bg
* 💄 Transparent lines for Tabs to contrast colored bg
* 💄 New icons for Table-sorting
* 💄 Selected exoanded item now has accent colors
* 💄 Keeps border-color for active state in search-button
* 💄 Removed hover-color change on checked radio
* 💄 Only non-responsive or left-static guidepanels shrink on tablet or below
* 📝 Changeset
* 🚚 -hover tokens are now soft-hover
* 🚚 Referansesider uses new soft-hover token
* 💄 Update background Header
* 💄 Update popover padding for smaller screens
* 💄 Adjusted borders
* 💄 Uses Alpha-tokens for zebra-stripes in Table
* 💄 Stronger border for hovered timeline items, transparent track bg
* 💄 Transparent lines for Tabs to contrast colored bg
* 💄 New icons for Table-sorting
* 💄 Selected exoanded item now has accent colors
* 💄 Keeps border-color for active state in search-button
* 💄 Removed hover-color change on checked radio
* 💄 Only non-responsive or left-static guidepanels shrink on tablet or below
* 📝 Changeset
* 💄 Stepper text-colors
* 💄 Adjusted paddings form-summary
* 💄 Alpha-border formsummary
* 🐛 Re-added animation to formprogress
* 💄 moderate active state for button
* ♻️ Copybutton re-uses button-component
* 💄 Updated shadow for lightmode
* 🔥 Removed comments CopyButton
* 📝 Added bw-compatibility for CopyButton
* 🐛 Added default-size for legacy CopyButton
* 🐛 Boolean flipped so that legacy wrapper were used on wrong state
* 🐛 Boolean flipped so that legacy wrapper were used on wrong state
* 🐛 Now accounts for custom icons in legacy CopyButton
* Getting started converting ActivityPlan to Aksel components
* Refactor ActivityColumn
* attempt to add Theme (from local path)
* 🚧
* 🐛 minify strips navds-r-p?
* use correct react package (local) and use padding prop
* correctly use the Theme wrapper in ThemeProvider
* Refactored MainCard
* Make ActivityCard more similar to "the real deal".
* Reduce column padding
* use Link component
* add missing href to links in sykepenger
* remove generic seletors on root
* dark mode for sykepengericon (also use tokens)
* Fixes console warnings
* Added activity view for activity plan reference page
* Design review changes
* Add HelpText to columns
* Add focus indicator for activity cards
* Minor css tuning
* 🐛 Blogg did not sort latest articles by publishDate
* [Actions] ⚡ Optimize workflows (#3480)
* 🚚 Moved auth-token, fetch less history
* ♻️ Use composite actions for workflow
* 🐛 Checkout before running composite workflow
* 🚚 Move composite actions to separate dir
* ♻️ Pass token to composite action
* 📝 Better test names
* ⚡ Optimize chromatic workflow
* ⚰️ Removed old and broken redeploy action
* ⚡ Optimized website-build
* ♻️ Use composite actions for prod and dev build
* ⚡ Reduced e2e tests by 40%
* ⚡ Improved sandbox testing
* ⚡ Update search-tests
* 🐛 Disable invalid example-demos
* 🐛 Wait for search completion
* 📝 removed old env input
* 🐛 Moved vars out to input
* 🐛 Don't ignore inputs for if-tests
* 🐛 Check input for truuthynes
* test: Run sharded playwright
* 🐛 Removed sharded workflow
* ⚡ Update re-use of actions
* 🐛 Keep full git-history for chroamtic
* Update .github/workflows/chromatic.yml
Co-authored-by: Lars Eirik Korsgaard Hansen <71271458+larseirikhansen@users.noreply.github.com>
* Update .github/workflows/referansesider-spa-deploy.yml
Co-authored-by: Lars Eirik Korsgaard Hansen <71271458+larseirikhansen@users.noreply.github.com>
* Update .github/workflows/ci.yml
Co-authored-by: Lars Eirik Korsgaard Hansen <71271458+larseirikhansen@users.noreply.github.com>
* Update .github/workflows/ci.yml
Co-authored-by: Lars Eirik Korsgaard Hansen <71271458+larseirikhansen@users.noreply.github.com>
* Update .github/workflows/ci.yml
Co-authored-by: Lars Eirik Korsgaard Hansen <71271458+larseirikhansen@users.noreply.github.com>
* Update .github/workflows/ci.yml
Co-authored-by: Lars Eirik Korsgaard Hansen <71271458+larseirikhansen@users.noreply.github.com>
* Update .github/workflows/ci.yml
Co-authored-by: Lars Eirik Korsgaard Hansen <71271458+larseirikhansen@users.noreply.github.com>
* Update .github/workflows/ci.yml
Co-authored-by: Lars Eirik Korsgaard Hansen <71271458+larseirikhansen@users.noreply.github.com>
* 📝 Typo
* 📝 Typoo
* ⚡ Use built-in report for playwright
* 🐛 Use html-reporter, not list
---------
Co-authored-by: Lars Eirik Korsgaard Hansen <71271458+larseirikhansen@users.noreply.github.com>
* [Darkside] P 1/3 ♻️ Updated `default` scale to replace `neutral`-scale (#3487)
* ✨ Added new space tokens
* 🚚 Updated spacing-definitions
* ✨ Added new space-tokens to old system
* ✨ Added support for new space tokens i primitives
* 🔥 Removed space-tokens from tailwindcss
* 📝 Removed old comments
* [Darkside] Spacing -> Space update for CSS (#3478)
* 🚚 Migrated to new space-token
* 📝 Add docs for temp spacing
* 🐛 Add missing token-prefix to docs
* 🐛 Remove old tests
* 🐛 Added legacy-spacing support for primitives when using new theme-stystem
* ♻️ Move neutral-scale -> default scale
* ♻️ New box now supports updated default tokens
* ♻️ Default -> Soft token
* 📝 Update js-doc
* [Darkside] P 2/3 ♻️ Global/Meta-token naming, bumped role-scale (#3499)
* 💄 Text and border-tokens for roles bumped up
* 📝 Update global and meta-colors to numbers, removed hover color on accordion/button
* [Darkside] P 3/3 ♻️ Old neutral-scale now uses default-scale (#3488)
* ♻️ Use default-tokens for old neutral-scale
* 🐛 Fixed missing token migrations
* ♻️ role default -> role-soft
* ♻️ Re-structure order and texts for GP section (#3492)
* ♻️ Re-structure order and texts for GP section
* 📝 Avoids extra capitalization for names
* Added script to check version-sync between workspace (#3486)
* ✨ Added script for verifying dep-versions across workspace
* ✨ Added script for verifying dep-versions across workspace
* ✨ Added script for verifying dep-versions across workspace
* ✨ Added script for verifying dep-versions across workspace
* ✨ Added script for verifying dep-versions across workspace
* 📝 Better texts
* 📝 Better texts
* 📝 Added comments
* 📝 Updated minoer package-differences
* 📝 Upgraded stylelint
* 📝 Upgraded babel-loader
* 📝 Add ^ to ds-css versionsing across repo
* ♻️ Small refactor to reduce use of forEach
* Table: Removed border-bottom for HeaderCell used in ExpandableRow (#3503)
* Use HeaderCell for name in expandable table example
* 🐛 Removed border-bottom for HeaderCell used inside ExpandableRow
---------
Co-authored-by: Ken <ken.aleksander@gmail.com>
* Version Packages (#3505)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
* ♻️ Removed raised-tokens from darkside roles
* 💄 Incremental layout and list-view update on Produktbloggen
* 🐛 Added missing 'li'-tag for list-item in blogglist
* [Table] ExpandableRow `contentGutter`-prop (#3507)
* ✨ New prop contentGutter for ExpandableRow component
* ✨ Added new prop-support in darkside CSS
* 📝 changeset
* Update @navikt/core/react/src/table/ExpandableRow.tsx
Co-authored-by: Halvor Haugan <83693529+HalvorHaugan@users.noreply.github.com>
---------
Co-authored-by: Halvor Haugan <83693529+HalvorHaugan@users.noreply.github.com>
* 🐛 Third bloggpost was sliced from view on frontpage
* ⬆️ Bump vite from 5.4.8 to 5.4.12 in /examples/referansesider (#3516)
* ⬆️ Bump vite from 5.4.8 to 5.4.12 in /examples/referansesider
Bumps [vite](https://github.com/vitejs/vite/tree/HEAD/packages/vite) from 5.4.8 to 5.4.12.
- [Release notes](https://github.com/vitejs/vite/releases)
- [Changelog](https://github.com/vitejs/vite/blob/v5.4.12/packages/vite/CHANGELOG.md)
- [Commits](https://github.com/vitejs/vite/commits/v5.4.12/packages/vite)
---
updated-dependencies:
- dependency-name: vite
dependency-type: direct:development
...
Signed-off-by: dependabot[bot] <support@github.com>
* Repo-bump vite
* 🔀 Yarn lock
---------
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Ken <ken.aleksander@gmail.com>
* 📝 Added new sidebar category for /komponenter
* always render the maxSelected message when isMultiSelect (#3506)
* always render the maxSelected message when isMultiSelect
* also check if maxSelected is set
* Changeset
* Update .changeset/swift-readers-check.md
---------
Co-authored-by: Lars Eirik Korsgaard Hansen <71271458+larseirikhansen@users.noreply.github.com>
Co-authored-by: Ken <26967723+KenAJoh@users.noreply.github.com>
* 💄 Error borders uses danger-strong consistently (#3512)
* ♻️Fix#3451 scaling for 400% zoom (#3514)
* 🐛 Using 'loader' inside 'icon'-prop broke layout caused by position absolute (#3515)
* [Darkside] Quality assurance P1 (#3510)
* 💄 Adjustments 1
* 💄 Bumped default strong scale
* 💄 Bumped secondary neutral border
* 💄 Reduced text-color change on hover
* 🐛 Resolved border and focus logic for combobox
* 🐛 Fix icon sizing for buttons
* 💄 Use tertiary-buttons for datepicker caption
* Update @navikt/core/react/src/chips/Toggle.tsx
* 💄 QA updates combobox darkside (#3511)
* Update swift-readers-check.md
* Version Packages (#3509)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
* Update LICENSE
* [Darkside] Updated Focus design for Checkbox, Radio and Switch (#3513)
* 💄 Focus-outline now around item checkbox,radio
* 🐛 Resolved small and indeterminate-state
* 💄 updated focus-markings for switch
* Update @navikt/core/css/darkside/form/radio-checkbox.darkside.css
* 🐛 Hide new indeterminate node from old checkbox
* [Darkside] Quality assurance P4 (#3518)
* 💄 Adjust bg transparency
* 💄 Default border now same scale as roles
* [Darkside] Quality assurance P5 (border-radius and font-weight) (#3519)
* 💄 Update border-radius based on Figma
* 💄 More border-radius adjustments
* 💄 Bolder medium+ headings
* [Darkside] Updated focus-outline (#3520)
* 💄 Updated focus-outline
* 🧪 Added legacy-support for deprecated files
* 🐛 Account for legacy files in count
* [Darkside] Quality assurance P6 (Fileupload) (#3524)
* 📝 Update FileUpload CSS-artifacts
* 🐛 Synced release-text with updated role-colors
* ✨ New icons for sorting (#3528)
* Theming for sykepenge icon
* 🐛 Use correct global token for darkside JS
* Updated SykepengerIcon to be one shape
* Changed text color to subtle
* Layout fixes
* Refactor activity modal and improve rendering of activity details
* Remove the decorator from the activity plan reference page to reduce complexity
It is not necessary to show off dark mode, and it introduces some problems we need to solve.
Will keep the code, so we can re-introduce it later if we want.
* remove route listing, redirect index.tsx to aktivitetsplan
* re-add the switcher
* resulotions for ds-react, and tweak spacing for header
* Fill out more activity details
* remove unused files + fix up some old tokens
* Darker modal backdrop
* Make JobInterestBox stand out more in dark mode
* Adjust heading size to better preserve hierarchy, although the modal header should have been larger instead (not supported)
* Add gap for better responsiveness on mobile
* Revert to secondary button to not conflict with other primaries. May revisit this later
* Increased Page.Block gutter tokens
* Background softA is now working, so we don't need to check for which is the active theme
* Better responsiveness
* Add "Add new activity" modal
* Reduce texts for responsiveness
* Make "save" button narrower
* 🚧 test deploy cache-invalidation
* 👷 test again
* 💄 remove border under ThemeSwitch
* Delete .changeset/late-hotels-try.md
* Delete @navikt/core/css/darkside/primitives/page.darkside.css
* Revert "Delete @navikt/core/css/darkside/primitives/page.darkside.css"
This reverts commit e1d683898a.
* undo the change that will be done on main
---------
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: Vegard Haugstvedt <it.vegard@gmail.com>
Co-authored-by: Ken <ken.aleksander@gmail.com>
Co-authored-by: Ken <26967723+KenAJoh@users.noreply.github.com>
Co-authored-by: Lars Eirik Korsgaard Hansen <71271458+larseirikhansen@users.noreply.github.com>
Co-authored-by: Halvor Haugan <83693529+HalvorHaugan@users.noreply.github.com>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
* Accordion: change: do animation similar to ExpansionCard
* changeset
* change: comment expansioncard -> accordion
* don't need changeset for unreleased code
* 🚧 attempt to smooth out expansion of accordion
* working animation
* Update @navikt/core/css/darkside/accordion.darkside.css
Co-authored-by: Ken <26967723+KenAJoh@users.noreply.github.com>
* accordion: remove border-bottom on content, add on item
* Update @navikt/core/css/darkside/accordion.darkside.css
Co-authored-by: Ken <26967723+KenAJoh@users.noreply.github.com>
* Accordion: only set box-shadow line for indented items
---------
Co-authored-by: Ken <26967723+KenAJoh@users.noreply.github.com>
* 💄 Focus-outline now around item checkbox,radio
* 🐛 Resolved small and indeterminate-state
* 💄 updated focus-markings for switch
* Update @navikt/core/css/darkside/form/radio-checkbox.darkside.css
* 🐛 Hide new indeterminate node from old checkbox
* Use HeaderCell for name in expandable table example
* 🐛 Removed border-bottom for HeaderCell used inside ExpandableRow
---------
Co-authored-by: Ken <ken.aleksander@gmail.com>
* ✨ Added new space tokens
* 🚚 Updated spacing-definitions
* ✨ Added new space-tokens to old system
* ✨ Added support for new space tokens i primitives
* 🔥 Removed space-tokens from tailwindcss
* 📝 Removed old comments
* [Darkside] Spacing -> Space update for CSS (#3478)
* 🚚 Migrated to new space-token
* 📝 Add docs for temp spacing
* 🐛 Add missing token-prefix to docs
* 🐛 Remove old tests
* 🐛 Added legacy-spacing support for primitives when using new theme-stystem
* ♻️ Move neutral-scale -> default scale
* ♻️ New box now supports updated default tokens
* ♻️ Default -> Soft token
* 📝 Update js-doc
* [Darkside] P 2/3 ♻️ Global/Meta-token naming, bumped role-scale (#3499)
* 💄 Text and border-tokens for roles bumped up
* 📝 Update global and meta-colors to numbers, removed hover color on accordion/button
* [Darkside] P 3/3 ♻️ Old neutral-scale now uses default-scale (#3488)
* ♻️ Use default-tokens for old neutral-scale
* 🐛 Fixed missing token migrations
* ♻️ role default -> role-soft
* 📝 Better naming for heading in richtext editor
* ♻️ Better syntax for publish-action
* ♻️ Refactored publication-flow plugin
* 🚚 Moved quality-assurance texts
* ♻️ Better handling of verification flow
* 🐛 Fixed verification without publish action
* 🐛 Check for permissions before assuming publish will work
* ✨ Added new space tokens
* 🚚 Updated spacing-definitions
* ✨ Added new space-tokens to old system
* ✨ Added support for new space tokens i primitives
* 🔥 Removed space-tokens from tailwindcss
* 📝 Removed old comments
* [Darkside] Spacing -> Space update for CSS (#3478)
* 🚚 Migrated to new space-token
* 📝 Add docs for temp spacing
* 🐛 Add missing token-prefix to docs
* 🐛 Remove old tests
* 🐛 Added legacy-spacing support for primitives when using new theme-stystem
* 📝 Updated JSDOC
* Automatically add JSDoc with default values to nb.ts
* Added jscodeshift to devDeps
* 🐛 Use same jscodeshift versions
* 🐛 Use same types for jscodeshift
---------
Co-authored-by: Ken <ken.aleksander@gmail.com>
* WIP
* WIP CompareImages
* ✨ Handle more keys
* ♻️ Re-use positioning code
* 💄 Adjust for width
* ✨ Added sanity schema
* 💄 Moved focus to box, allow handle to overflow leftside by 1 px
* ✨ Added bg and alt-text support
* 🐛 Change env back to production
* Check loading prop for showing spinner, not widthOverride.
Making this change because widthOverride sometimes gets set to 0 (should also be fixed), meaning this check fails as "falsy".
* Prevent setting width to 0 while showing spinner, to avoid issue in Modals
Checking that width is truthy (not zero) will avoid issue where widthOverride gets set to 0 because the button is not yet rendered.
* Add changeset
* Replace width calculation with just visually hiding label + icon and absolutely positioning the loading icon.
* Update @navikt/core/react/src/button/Button.tsx
* add story for bug case
* We no longer use buttonRef/mergedRef internally, so removed them and set ref directly
* Update @navikt/core/css/button.css
Co-authored-by: Ken <26967723+KenAJoh@users.noreply.github.com>
* Hiding everything except loading spinner is more robust than hiding every specific item.
* In loading-state, the button icon will no longer be able to be the only child (hidden), because of the loader icon. Instead checks for no label.
Could consider :not(:has(:is(.navds-button__icon, .navds-loader))) as well, to be more robust, but it might be overkill.
* Much simpler/easier to read
* Don't need to destructure style, only to add it along with rest.
* Should destructure onKeyUp from props, instead of having it added through filteredProps and then overridden afterwards.
* Quick and easy conversion for darkside
* Unnecessary :is after refactoring
---------
Co-authored-by: Julian Nymark <julian.nymark@nav.no>
Co-authored-by: Ken <26967723+KenAJoh@users.noreply.github.com>
* 💄 New ToggleGroup design
* 🐛 Removed hover-state from selected togglegroup in forced-colors mode
* 💄 Add px-gap to elements
* 🐛 Hide divider on both sides when selected
* change: add story to demonstrate buggy textarea behaviour inside modal
* use lodash debounce with our own default value for wait
* Revert "use lodash debounce with our own default value for wait"
This reverts commit 7638297765.
* change: add leading to debounce + use it in TextareaAutoSize
* changeset
* changeset + co-author
Co-authored-by: Halvor Haugan <halvor.haugan@nav.no>
---------
Co-authored-by: Halvor Haugan <halvor.haugan@nav.no>
* change: support icon in ErrorMessage + warning icon for textarea error
* change: ignore icon on old CSS + tweaks
* change: do not nest in old css
* wip commit (works nicely)
* clean up css for errormessage, remove it from form.css
* 🐛 tweaks + use icon in Search
* use icon for the rest of our form components
* backport new css to old form.css
* 🔥 remove unnecessary specification bump
* cleaner example story
* changeset
* ♻️ icon -> showIcon
* make flex & gap opt-in with 'icon'
* change: inline ErrorMessageIcon
* change: nest css more
* revert test changes (utility in multiple variants on one for DOM diffing, but probably no longer useful)
* debloat changeset
* mention form components in changeset
* change: typo in changeset
* change: typo in changeset
* ✨ Solves issue where programatic focus to fix error would show dropdown list and hide error
* 🚚 Moved onclick listener for open-state to input, not wrapper
* Update .changeset/forty-rules-ring.md
* change: timeline periods
* update stories for timeline
* change: Timeline pin update
* change: crude variable renaming (--a- -> --ax-)
also likely done with zoom buttons,
a bit of popover styling fix
* change: popover z-index bump
* change: remove unnecessary CSS state :active
* change: z-index fix, correct token usage
* change: remove @supports not selector(:focus-visible)
* change: use proper tokens
* change: can't get focus on popover
* change: remove arrow from popover consumers
* change: only render arrow div when !themeContext
* 💄 Use smaller offset without arrow, use subtleA border for popover
* 💄 Adjusted popover tokens for timeline
---------
Co-authored-by: Ken <ken.aleksander@gmail.com>
* ✨ Added darkmode-support to Tag
* 🐛 Update spacing-tokens to new format
* ✨ Added darkmode-support to Tag
* 💄 use canvas-color for text on filled forced color text
* ♻️ Use classNames for tag colors, not data-attrb
* 🐛 Old Tag-css supports new names
* V1 of CSS bundler
* V1 of CSS bundler
* ♻️ Added target checking for browser
* ♻️ Remove built in variables added by lightningcss
* Setup bundling of darkside
* 🐛 Fix path resolving in bundle script
* Setup bundling for index
* 🚚 Re-order layering
* ✨ Filter for only components in bundle
* 🚚 Moved token-definition
* 🔥 Removed index.css copy
* ✨ Global build
* ✨ form and primitives build
* ✨ Component build
* ✨ Build versions dir for new setup
* :test_tupe: Added tests for bundle
* 🚚 Move bundle file to config
* 📝 Comments
* ✨ Allow import of darkside directly under ds-css
* 🐛 Use relative import for CSS in storybook
* [Darkside] Updated input-bg in darkmode, added token for opacity (#3441)
* [Darkside]: Update bg-input to be darker in darkmode
* Added opacity-token
* Use token for disabled opacity
* Update @navikt/core/css/darkside/button.darkside.css
* ♻️ De-dupe reading of index.css
* ♻️ Use regex to remove - and space instead of lodash
* 🥅 Throw when bundler fails
* Update @navikt/core/css/config/bundle.darkside.ts
Co-authored-by: Halvor Haugan <83693529+HalvorHaugan@users.noreply.github.com>
* Update @navikt/core/css/config/bundle.darkside.ts
Co-authored-by: Halvor Haugan <83693529+HalvorHaugan@users.noreply.github.com>
* 🏷️ Updated opacity-tokens types, resolved import conflict
---------
Co-authored-by: Halvor Haugan <83693529+HalvorHaugan@users.noreply.github.com>
* ✨ Updated exports to allow better darkside support
* ✨ Setup less and scss support for darkside
* ✨ Added static build for tokens
* ✨ Token-config exports
* 🐛 Resolved import conflicts between tailwind and css
* 🐛 Resolved import conflicts between tailwind and css
* ♻️ Refactor Token-setup for better typing
* ♻️ WIP resolve import conflicts2
* ♻️ Avoid importing JSON in react from tokens
* 🐛 Resolve updated imports in referansesider after refactor
* Update @navikt/core/tokens/.gitignore
* Update @navikt/core/tokens/types.ts
Co-authored-by: Halvor Haugan <83693529+HalvorHaugan@users.noreply.github.com>
* 🐛 Removed prefix 'ax' when generating static tokens for js
* 🐛 Resolved export syntax to support less, scss and JS
* 📝 Updated JSDoc to link directly to types
* Update @navikt/core/tokens/darkside/figma/figma-config.types.ts
Co-authored-by: Halvor Haugan <83693529+HalvorHaugan@users.noreply.github.com>
* ♻️ Use colorRole-array as bases for Role array
---------
Co-authored-by: Halvor Haugan <83693529+HalvorHaugan@users.noreply.github.com>
- Merged LanguageProvider into Provider, while also changing the API a bit to make it easier to use (with the help of TS).
- Updated tests for `useI18n()` according to changes in API.
- Chips.Removable: Removed prop `removeLabel`.
- DatePicker/MonthPicker: Added new `translations` prop and deprecated `locale` prop.
- Search: Deprecated prop `clearButtonLabel`.
- Textarea: Deprecated prop `i18n`.
- Timeline: Deprecated prop `axisLabelTemplates`.
- nb/nn/en.ts:
- Arranged the top level keys alphabetically.
- Merged `close` in Modal and DatePicker and put it under the `global` key.
- Changed Search.clear from "Clear" to "Clear field" to make it more... clear 😅
- Removed Combobox.clear since the clear button has been removed.
- Made them importable from `@navikt/ds-react`
* GuidePanel initial CSS rewrite
* ✨ new illustration
* change: layout
* change: add speechbubble arrow
* change: dark mode raised for speechbubble arrow
* change: correct stroke path color (actually fill) of path in svg
* change: fine tuned SVG with padding and overlapping paths
* change: exception CSS for FF rendering of speech bubble tail
* change: hardcode calculation as whole pixel value remove FF custom CSS
* change: convert BEM modifiers to simpler CSS data-attributes
* change: display:none for speech bubble tail on old token system
* change: refactor old css to use the attribute selectors
* change: noSVG example (see default story for side-by-side)
* change: rewrite to using only SVG for speechbubble
* change: only looks good in lightmode, no token support / hardcoded
* :refactor: Updated Guidepanel CSS to use SVG
* 🔥 Remove old commented CSS
* 🐛 Fixed cases where mediaqueries would target nesten element instead of itself
* 🗑️ Cleanup of unused code
---------
Co-authored-by: Ken <ken.aleksander@gmail.com>
* ✨ Added darkmode support to table
* 📝 Added comments
* 📝 Added todo
* :refactor: Avoid use of custom animate height function
* :refactor: Use Alpha-token on hover-selected
* :refactor: Remove redundant token-use
* Update @navikt/core/css/table.css
* ♻️ Reverted to animate-component for table animation
* 📝 Overlap comments
* WIP: update primitives prefixing
* ♻️ Use updated prefix in primitives ts-code
* ♻️ Use updated token-prefix in css
* ♻️ Use updated tokens in primitives css utilities
* 🔥 Removed backwards-compat with old stack CSS
* [Darkside] Primtives prop-support (#3423)
* :refactor: Support primitives with new theme
* :refactor: Use sub-component for new Box update
* ♻️ Update support for new and old theme in Page and Box
* ♻️ Resolve instances where tokens were not correctly named for theme-support
* ♻️ Avoid exposing component before necesarry
* ♻️ Avoid having to import figma-types in ds-react
* ♻️ Using camelCase on tokens breaks primtives. Now uses kebab-case
* 🔥 Removed comment used as notes
* Update @navikt/core/react/src/layout/page/Page.tsx
Co-authored-by: Halvor Haugan <83693529+HalvorHaugan@users.noreply.github.com>
* Update @navikt/core/react/src/layout/box/Box.tsx
Co-authored-by: Halvor Haugan <83693529+HalvorHaugan@users.noreply.github.com>
* ♻️ Remove redundant prefix const
* ♻️ remove redundant T-suffix on types
* ♻️ Better previews on hover when checking token-props
---------
Co-authored-by: Halvor Haugan <83693529+HalvorHaugan@users.noreply.github.com>
* ♻️ More fine-grained exception-testing for use of old props in Box
---------
Co-authored-by: Halvor Haugan <83693529+HalvorHaugan@users.noreply.github.com>
* 🚧 wip
* [Darkside] ErrorSummary updated CSS (#3331)
* First run for errorsummary css update
* Added nesting
* [Darkside] Fileupload CSS update (#3343)
* ✨ Updated Dropzone with darkmode
* ♻️ Added nesting for root
* ♻️ ac -> acx prefix for interla tokens
* ♻️ Removed reduntant token
* ♻️ More nesting
* 💄 Align overlay on drag better
* ⚰️ Removed test-code
* 💄 Update hover-border for dropzone
* 🐛 Removed border-color update on hover in disabled state
* ♻️ Use bg input on area, use border default
* [Darkside] Link CSS update (#3353)
* ✨ Darkmode-support for existing link-component
* :refactor: Adjusted line offsets and thickness
* [Darkside] ExpansionCard CSS update (#3338)
* 💄 Initial css-update expansioncard
* 📝 Added sub-headers
* 💫 Button animation
* ✨ Added data attrb for open-state
* 💫 Updated content animation
* ♻️ Added nesting
* ♻️ Better nesting of rules
* ♻️ Use outline for hover border
* ♻️ Use border as default outline
* 🔥 Remove redundant border css
* 🔥 Removed divider transition, unused state attributes in react
* [aksel.nav.no] Update examples of Page (#3349)
* Changesets: Run yarn as part of create-version
* Combobox: Fix issue where using arrow keys in list would make the entire page scroll (#3364)
* [Darkside] FormSummary updated CSS (#3345)
* :refactor: Use updated CSS for darkside
* 💄 Replace accent bg with info bg
* [Docs] Use NAV-dekorator for Page examples (#3362)
* [aksel.nav.no] Update examples of Page
* comment
* comment + rename + style->class
* fix
* 📝 Use NAV-dekorator for Page-examples
* 🚚 Moved content to separate __parts location
* :refactor: Updated examples
* Update aksel.nav.no/website/components/website-modules/examples/__parts/PageDemoContent.tsx
Co-authored-by: Halvor Haugan <83693529+HalvorHaugan@users.noreply.github.com>
* 🐛 Use correct import syntax for parts
* 📝 Add description to page-block default story
* 💄 Removed spacing from all typo-headings in demo
* 🐛 Removed react import from content part
---------
Co-authored-by: Halvor Haugan <halvor.haugan@nav.no>
Co-authored-by: Halvor Haugan <83693529+HalvorHaugan@users.noreply.github.com>
* Git hooks that notify when yarn.lock have changed (#3361)
* 💄 first pass css updates
* 🎨 nest CSS
* Datepicker: 💄 css layer changes & remove extra border
* 🔥 remove resolved todo
* 💄 border radius for caption buttons
* 🎨 drastically simplify focus outline
* change: make button selector less wildcardy
* change: outline smaller for rdp-cell buttons
* change: width large enough to show 4 characters in year caption
* change: match design for range middle selected
* change: remove redundant error CSS
* change: remove unused CSS
* change: un-shuffle css import ordering for date.css
* change: remove unused CSS
* change: week buttons & day button active
* change: use secondary-neutral button for weeknumber buttons
* change: same selector for month and day buttons, active state
* 🐛 Fixed weeknumber as the button broke old datepicker
* change: remove double border on captions, active state on disabled
* ♻️ Updated weeknumber to be barkw-compat with old system
* 🚚 Moved date-import further up
---------
Co-authored-by: Ken <26967723+KenAJoh@users.noreply.github.com>
Co-authored-by: Halvor Haugan <83693529+HalvorHaugan@users.noreply.github.com>
Co-authored-by: Halvor Haugan <halvor.haugan@nav.no>
Co-authored-by: Ken <ken.aleksander@gmail.com>
Hid buttons from screen readers since you can't tab to them anyways. Moved sr-only text on clear button to title attr. Removed sr-only text on toggle list button. Removed prop toggleListButtonLabel.
* Prevent active text being announced waaay too many times.
* Add changeset
* New attempt at consistently reduced status messages on "copy" click
* Remove aria-relevant and aria-atomic to make announcement consistent between Safari and other browsers
* When single select on combobox, remove the gap between the input and the selected value.
* ♻️ Updated spacing between options and input in Combobox
* 📝 Changeset
* Revert darkside update
* ♻️ Update darkside combobox
* :refactor: Make gap something we add, not remove for chips based on type
* Update .changeset/yellow-days-rhyme.md
Co-authored-by: Halvor Haugan <83693529+HalvorHaugan@users.noreply.github.com>
* :refactor: Only add margin-left when only-child
---------
Co-authored-by: Ken <ken.aleksander@gmail.com>
Co-authored-by: Ken <26967723+KenAJoh@users.noreply.github.com>
Co-authored-by: Halvor Haugan <83693529+HalvorHaugan@users.noreply.github.com>
- [Darkside]: Use shadow-dialog token in components, use subtle-border in combobox list
- [Darkside]: FileSummary nesten items border
- [Darkside]: Adjusted ExpansionCard padding
- [Darkside]: ActionMenu uses new Radio-design
- [Darkside]: Added shadow-token to system
* :refactor: Added darkmode-support to Stepper
* :refactor: Restructure Stepper to support darkmode and nesting
* 🐛 text-decoration now changes on hover
* :refactor: Line before non-interactive step now has border-neutral
* ✨ Added brandvolume support in theme-component
* 📝 Added brandvolume story to readmore
* ✨ Added large size to readmore
* ✨ Added darkmode support for Readmore
* :refactor: Updated CSS syntax
* 🐛 Fixed brandvolume stories
* ✨ Implemented brandvolume in ReadMore
* ✨ Added large-variant of readmore to OG readmore
* :refactor: Use tokens and calc to handle volume
* 🐛 Added text-accent-strong on hover to high brandvolume
* 🐛 Avoid adjusting readmore body when size is large
* 📝 CHangeset
* Update @navikt/core/react/src/provider/theme/AkselTheme.tsx
Co-authored-by: Halvor Haugan <83693529+HalvorHaugan@users.noreply.github.com>
* Update @navikt/core/react/src/provider/theme/AkselTheme.tsx
Co-authored-by: Halvor Haugan <83693529+HalvorHaugan@users.noreply.github.com>
---------
Co-authored-by: Halvor Haugan <83693529+HalvorHaugan@users.noreply.github.com>
* ✨ Added darkmode support in react for internalheader
* :refactor: Support darkmode theming for internalheader
* 💄 Added bottom border to header, divider now subtleA
* 🐛 Remove hover,active effect in static title
* :refactor: Remove redundant :is for button
* :refactor: use padding shorthand
* 💄 Improved hover-effect on forced-color buttons, added story
* 🐛 Revert back to is button syntax
* :refactor: Updated List css to support darkmode
* ♻️ nest some CSS
* 🐛 Updated stories
* 🐛 Removed removed story from chromatic view
* :refactor: Removed color-override on list-markers
* :refactor: Set icon-color to currentColor
* :refactor: Removed currentColor from icon
---------
Co-authored-by: Julian Nymark <julian.nymark@nav.no>
* :refactor: Initial loader update
* :refactor: Re-added support for inverted
* :refactor: Added nesting to loader
* 🐛 Foreground now scales the same as background track
* Updated checkbox css
* bug: Added correct icon-color for readonly checkbox
* Form-css: Updated form.css and fieldset.css with new tokens
* Added radio dot support
* use 4px border-radius, use border-strong for error
* Error-state updated for checked checkbox
* Updated 'dot'-color for readonly radio
* Updated radio-design
* Added disabled-stories for checkbox and radio
* Radio story with checked and error
* Updated foced-colors support for radio
* Use border-syntax instead of box-shadow
* Removed old code
* Updated checked color to accent-strong-pressed for radio
* Adjusted Error-colors for radio/checkbox
* 💄 Radio can now be checked and have Error
* ♻️ Use hoverA bg for hover
* ♻️ Readio readonly now matches figma
* [Darkside] Migrated typo to new CSS
* memo: Added comments
* change: Implemented accordion header and content
* change: Added lines
* feat: added todo
* change: Fixed layering issues with lines
* change: Avoid animation on initial render
* change: Removed comments
* change: moved icon state into nesting
* change: Added alpha-background for icon, updated fontweight
* change: Added forced-colors support
* Removed use op --open class
* Removed old grid centering
* Top, bottom line is now alpha
* Fixed animation
* bug: Revert to transparent bg
* deprecation: Added tags to accordion props that are to be removed
* removed deprecation for accordion headingSize prop
* Updated implementation of line in accordion
* Remove position relative in accordion content
* Implemented size-update for accordion
* bug: removed old comment
* Clarify comments
* Removed redundant header class
* Re-added className in accordionHeader
* Use new tokens in copybutton
* Updated animation
* updated to nested syntax
* Updated text-color on hover
* Added subheading for sectioning
* removed background none
* sanity config cleanup
* removed extra const for type
* re-organized admin tools and fixed types
* Removed no longer needed custom actions for translations
* Simplified publication plugin
* Removed extra logic in publish action
* synced SEO-updates
* lock sync
* bug: Removed old index export
* Show AddNewValue button in Combobox based on searchTerm instead of value, so it is displayed when autocompleting words
* Highlight matching text in FilteredOptions
* Add changeset
* Move styling to combobox.css instead of inline JS
* Ensure label options are read as one text, even when highlighting search matches.
This only seemed to be a problem in testing library, so we should be able to remove this if they fix this in their calculation of accessible name.
* Update changeset to a minor version
* Re-introduce controlled value in storybook examples to not change Chromatic snapshots
* change: Updated actionmenu examples
* change: Removed flipAlignment prop for better alignment
* change: Removed defaultOpen-prop from ActionMenu
* change: Moved rootElement prop to component root
* change: Added support for use inside Modal
* change: Use MenuPortalProps instead of Pick
* feat: Added build for darkside
* feat: Implemented darkside-tokens in tailwind-build
* change: Code cleanup and syntax simplification
* change: Moved color-token extraction to start of file
* memo: Moved comment
* change: Updated actionmenu examples
* change: Removed flipAlignment prop for better alignment
* change: Removed defaultOpen-prop from ActionMenu
* change: Moved rootElement prop to component root
* change: Added support for use inside Modal
* change: Use MenuPortalProps instead of Pick
* change: Revert to using Pick for prop inheritance
* change: Menucontext uses required definition of rootElement
[darkside] Updated naming transform to support alpha-tokens
[darkside] Updated input-token to use opacity
[darkside] Added alpha-tokens to global config
[darkside] Now auto-generates the alpha-values
[darkside] Added semantic role tokens using alpha-values
bug: removed tempfile added by vitest
* bug: Some icons that should be ignored were fetched and caused exceptions
* change: Added some comments
* change: Better math for icon-check
* change: Better messaging
* Update @navikt/aksel-icons/config/figma/index.ts
Co-authored-by: Halvor Haugan <83693529+HalvorHaugan@users.noreply.github.com>
---------
Co-authored-by: Halvor Haugan <83693529+HalvorHaugan@users.noreply.github.com>
* Add support for PageUp and PageDown in Combobox.FilteredOptions
* Remove console.log statements
* Add test for PageDown/PageUp
* Open FilteredOptions when pressing PageDown
* Prevent scrolling from moving the whole page
* Consistently scroll to the active element in useVirtualFocus by using useLayoutEffect
It seems like doing it with the state update sometimes encounters a race condition preventing the scrolling.
This removes the need for a private function handling index update and scrolling, simplifying the code.
* Updated test to fit new options order
* Prevent "Home" and "End" in Combobox from scrolling as well
* Add changeset
* Update @navikt/core/react/src/form/combobox/FilteredOptions/useVirtualFocus.ts
Co-authored-by: Ken <26967723+KenAJoh@users.noreply.github.com>
* useEffect seems to work the same way, and works better for SSR
* Removed code that did nothing
* Added the same check we have for PageDown, etc. Unsure if it is neccessary.
* Change behaviour for "Home" to move focus to the first element instead of Input
* Once we changed virtualFocus.moveFocusToTop to move focus to first element instead of the Input, we now need another function to move it to the Input where applicable.
* Update .changeset/tasty-cats-hear.md
Co-authored-by: Ken <26967723+KenAJoh@users.noreply.github.com>
---------
Co-authored-by: Ken <26967723+KenAJoh@users.noreply.github.com>
* Disable autocomplete in Combobox to "fix" issue where autocomplete is broken in Firefox on Android
The bug is that after three "correct" characters are entered in a row, the autocomplete inserts the third character incorrectly, messing up the text in the input.
This also happens in other implementations of autocomple, like W3C's ARIA Authoring Practices Guide combobox with inline autocomple.
* Add changeset
* Use type checking instead of useEffect to prevent client code from running server side
For versjonering bruker vi løsningen [Changesets](https://github.com/changesets/changesets) for [versjonering](https://semver.org/) og publisering av pakker.
Vi bruker [Changesets](https://github.com/changesets/changesets) for [versjonering](https://semver.org/) og publisering av pakker.
## Howto
## Lage ny versjon
- For å lage en ny versjons-entry:`yarn changeset`
- Velg pakkene som skal versjoneres med `arrowkeys` + `Space`
1.`yarn changeset`
2. Svar på spørsmålene som kommer opp:
`🦋 Which packages would you like to include?`
Trykk `Space` for å velge pakkene som skal versjoneres, for så trykke`Enter` for å gå videre.
Trykk `Space` for å velge pakkene som skal versjoneres, trykk så`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`
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`
Trykk `Enter` for å gå videre _eller_ velg pakkene som skal minor-bumpes med `arrowkeys` + `Space`.
Hvis du ikke velger major eller minor, så blir pakkene få en patch-bump
Hvis du ikke velger major eller minor, så vil pakkene få en patch-bump.
- Commit og push.
`Please enter a summary for this change`
Skriv inn en kort beskrivelse av endringen på formatet `<Komponent>: <gitmoji?> <Beskrivelse>`, f.eks. "Button: ✨ Add feature xyz".
3. 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
Alle base-pakkene våre har `fixed versjonering`. Dette betyr at en bump på en av disse vil bumpe alle til samme versjon
- Most of our CSS is re-written. This includes renaming all `.navds`-classNames to `.aksel`. This will affect most custom overrides targeting `.navds`-classes.
As we strongly recommend avoiding custom
overrides where possible, we would like to encourage opening an
issue if you find that you have to override our CSS to achieve
something! It's these cases we want to know about so that we can fix
them for everyone.
### Removed component-tokens
All component-spesific tokens are no longer supported. That means all tokens like these from `Button` are removed:
```css
--ac-button-primary-bg
--ac-button-primary-text
--ac-button-primary-hover-bg
--ac-button-primary-active-bg
```
All component-based tokens are prefixed with `--ac`, so a global search in your codebase should find all of them.
## Tailwind CSS
Since our Tailwind CSS config is tied to our tokens, most changes made to the tokens will affect the Tailwind CSS config.
We have decided to prefix all our classes with `ax-` in the new config, so it should be possible to use both packages at the same time. We will develop tooling to hopefuly make the migrations easier in the future.
### Removed classes
z-index, maxWidth and spacing classes are removed from the new config.
## React
We have made some updates to `@navikt/ds-react` that you should be aware of before testing.
### Accordion
#### Props
- `variant` is deprecated and will be removed in the future. We have not implemented it in the new system.
- `headingSize` is deprecated and will be removed in the future. Accordion-size medium now equals `small` heading, and size small equals `xsmall` heading.
#### Structural changes
`<Accordion.Content/>` now has an extra nested `div` to allow for better animations. Custom CSS might break.
### Datepicker
Weeknumber-button uses our own button-component, and no longer a
custom button.
### GuidePanel
Component got a complete overhaul. Custom overrides might break.
### Popover, HelpText
`arrow`-prop is removed. All of our floating dialog-elements except for `Tooltip` now comes without arrow.
If you have custom `offset`-values, you might have to update them to accommodate this.
### Pagination
Button now uses our own button-component and `variant="tertiary-neutral".
### Primitives
Given that these are closely tied to our tokens, you will most
likely have to update parts of them to test the new system.
All primitives using our current `spacing`-tokens now has
the new <code>space</code>-tokens. You can use the old tokens while
testing, but the full release will remove them from the prop-list
<Markdown>
{`
\`\`\`diff
- <HStack gap="4">
+ <HStack gap="space-16">
\`\`\`
`}
</Markdown>
#### Page
`background`-prop is removed. Now just uses `bg-default`-token.
#### Box
Since `<Box />` is directly tied to our tokens, we
now offer `<Box.New />` as a temporary altenative. This
component is based on our new tokens and can use the backgrounds,
borders, border-radius and shadows from the new system. When the full release comes, we will update `<Box />` to use the new system, and provide tooling to handle this migration.
**All instances of `<Box />` will break when using the new system if:**
import { Markdown, Meta } from "@storybook/blocks";
<Meta title="Docs/Become a Pilot team/2.Setup" />
# Setup
## Clean project
For new projects, setup is just as easy as before, but now requires a `Theme`-component to be wrapped around your app.
The component acts as a local feature-flag for the new implementation, with the added benefit of being able to switch between light and dark mode for you.
Steps:
- 1. Import new CSS `@navikt/ds-css/darkside`
- 2. Import `Theme`-component from `@navikt/ds-react/Theme`
- 3. Wrap your app in the `Theme`-component. You do not have to set the theme, as you can manually handle theme switching with other tools like `next-themes`.
```tsx
import "@navikt/ds-css/darkside";
import { Theme } from "@navikt/ds-react/Theme";
export const App = () => (
<Theme theme="light">
<YourApp />
</Theme>
);
```
### Only Tokens/CSS
If you are not using any of our React-components, you can still switch between themes by setting `class="light"` or `class="dark"` on your root-element.
## Theme switching
The `Theme`-component has a `theme`-prop that can be set to either `light` or `dark`. This only sets a `class` on the element of `light` or `dark` (in addition to a `aksel-theme` class), and the rest is handled by the CSS.
You have the option of using `hasBackground` (defaults to true) to make `Theme` include a built on default background.
Since theme-switching often is framework-spesific, we have not included a theme-toggle component or advanced logic for cookies/localstorage.
You will have to implement this yourself using a custom setup, or use a library like [next-themes](https://github.com/pacocoursey/next-themes).
We will continue to work on the whole `Theme` ecosystem, and might include more features in the future to handle this built in.
### Theme-switch component
This is context-based for what fits your application, but there are some general patterns you can follow.
- **Light or Dark-mode**: Here you can use a simple Switch-component, or a Tertiary-button to toggle between them.
- **Light, Dark or System-mode**: Here you can use a ToggleGroup or Select-component.
```tsx
isLightMode ? (
<Button
variant="tertiary-neutral"
icon={<SunIcon title="Switch to dark theme" />}
/>
) : (
<Button
variant="tertiary-neutral"
icon={<MoonIcon title="Switch to light theme" />}
/>
);
```
## I just want to test the new tokens
Since you can use the new tokens alongside the old tokens, you can start by importing the new tokens as you would the old system.
```css
@import "@navikt/ds-tokens/darkside-css";
```
For SCSS, Less and JS they are also available under the paths
```
@navikt/ds-tokens/darkside-scss
@navikt/ds-tokens/darkside-less
@navikt/ds-tokens/darkside-js
```
**Note: To support theming, scss, less and js tokens are all now based on `css-variables`. This means you will have to import the css-version from `darkside-css` alongside them for everything to work.**
## I want to test the new React-changes
For the new system to work with our components, you will have to use the new `Theme`-component, and import the new CSS from `@navikt/ds-css/darkside`
```tsx
import "@navikt/ds-css/darkside";
import { Theme } from "@navikt/ds-react/Theme";
export const App = () => (
<Theme theme="light">
<YourApp />
</Theme>
);
```
You will have to check on all your custom overrides when making this switch.
### Partial update
You can migrate parts of your application to use the new CSS classes without having to migrate everything at once.
```tsx
// Old setup
import "@navikt/ds-css/darkside";
// New setup
import "@navikt/ds-css/darkside";
import { Theme } from "@navikt/ds-react/Theme";
export const App = () => (
<div>
<StillOnOldCSSComponent>
/* Only this part of your app now uses new styling */
<Theme>
<YourApp />
</Theme>
</div>
);
```
You will have to check on all your custom overrides when making this switch.
## I have to make some custom changes in darkmode
Since our implementation is based on CSS, you can easily make custom adjustments where necessary.
- **Border radius**: Now named just `radius`, and t-shirt sizing is replace with numbers reflecting the pixel value.
- **Text-icon**: Now named `text-decoration` to better reflect its usecases.
Migration-code trough the `@navikt/aksel` package has been updated to handle this change when migrating from legacy CSS to the new CSS.
As for the border-radius update, we have added fallback-support for the old `border-radius`-tokens, so you can use both the new and old tokens at the same time for now.
## v7.18 (02.04.25)
`<Theme />`-component no longer defaults to `light`-theme className when no theme is provided.
This change is made to make it possible to handle 'light' and 'dark' themes in a more flexible way. You can manually set `className="light"` (or dark) on any html-element higher in the hierarchy, and the `<Theme />`-component will not override this.
One of the cases where this is needed is with `next-themes` where defaulting to light, and changing to dark based on `useTheme`-hook from `next-themes` leads to hydratiob errors.
## v7.16 (03.03.25)
To allow loading old and new CSS files that the same time, we have now renamed all classes to start with `.aksel` instead of `.navds`.
Every React component has this now feature-flagged behind using the new `Theme`-component.
- **With `<Theme />`**: All components uses `.aksel`-classes internally.
- **Without `<Theme />`**: All components uses `.navds`-classes internally like before.
This means you can now migrate parts of your application to use the new CSS classes without having to migrate everything at once.
We are looking for teams wanting to test our new theming implementation and darkmode before we go live with them later in 2025.
## What is a pilot team?
- A pilot team is a team that tests new implementations before they are released.
- The team will test the new implementation in a real-world scenario and provide us with feedback.
- The feedback will be used to improve the implementation before it replaces the old system.
As a pilot team, we want close communication to get
feedback on the changes. We want to know all the unclear and bad parts
of our implementations, so that we can fix them all up before the big release.
## Who are we mainly looking for?
We are focusing on applications meant for our internal systems and services for now. This line is often a little blurry,
but in short, all the public facing applications including those using "Dekoratøren" will not be considered internal.
Support for "Dekoratøren" is quite far down the road at the moment.
For teams wanting to test the new implementation, there are some key points to consider:
- You _probably_ want to be in the earlier stages of developing a new product or service (to more easily test something in isolation).
- You can test _any_ smaller subset of the new system as it's not an "all or nothing" ordeal. This could be: design tokens, darkmode, updated CSS or a combination of these.
- You have the capacity to test and provide feedback on the new implementation (You'll be saving Nav countless hours for every hour spent!).
Everyone is welcome to test the new implementation, but for some larger applications, it might be a bit early to adopt the new system. Keep in mind that there might be breaking changes as we go,
and we won't have all tooling ready for adoption yet so you might have to do some manual work.
## How to give feedback
We welcome all forms of feedback:
- **Issues**: [Open an issue on Github](https://github.com/navikt/aksel/issues)
- **Disussions**: [Start a discussion](https://github.com/navikt/aksel/discussions/categories/darkside).
- **Slack**: [Reach out to us on Slack #Aksel-designsystemet](https://nav-it.slack.com/archives/C7NE7A8UF)
## What's new?
- **Design tokens**: A complete re-write of our design tokens to allow for dark mode.
- **Dark mode**: A new dark mode implementation.
- **Updated CSS**: Now uses new tokens, built-in CSS-layers support and most components are re-written.
- **Updated Tailwind CSS config**: Now uses new tokens, now comes with built-in `ax`-prefix for easier separation between Aksel and your own config.
- **Updated components**: Components use the new tokens and CSS.
- **New Theme-component**: A new `<Theme/>`-component to handle the theming-switch locally.
- **Updated documentation**: Updated documentation for the new implementation.
## Documentation
As we go, we will add more documentation to help you get started with the new implementation.
- [Design i light og dark-mode](https://aksel.nav.no/god-praksis/artikler/design-i-dark-mode-og-light-mode)
### Demo page
We have a demo page to show off some of the new features and tokens. [You can find it here](https://aksel-referansesider.ansatt.dev.nav.no/aktivitetsplan/).
We recommend using "inspect-tool" in browser to get a feel for the new tokens and CSS.
## How testing could affect your application
All the changes are **opt in**, meaning you can choose to use nothing, some parts of the new implementation, or go all-in.
You will still be able to recieve updates to the old implementation while we are in the testing phase.
### Tokens
We have made a complete re-write of our design tokens to allow for dark mode.
This includes new backgrounds, text-colors, border-colors and updated spacing-tokens.
- All tokens have a new prefix `--ax` to avoid conflicts with old tokens.
- You will be able to use the new tokens at the same time as the old tokens.
- All background, text-colors and border-colors have new names and "concepts" to learn. Migration will not be a quick one to one with old system.
- New spacing tokens are now named `space` and based on `px` values (most devs think and deal in `px` values first, no more on-the-fly mental arithmetic! WYSIWYG).
### CSS
We have updated our CSS to be based on the new tokens for theming.
- Most of our CSS is re-written.
- All custom overrides targeting `.navds`-classes might have to be updated locally.
- Component-based tokens are no longer avaliable.
### Tailwind CSS
We have made a new Tailwind CSS config based on the new tokens. Based on previous iterations, we have decided to try prefixing all our classes with `ax-`.
While this will be a little more verbose, it makes it easier to separate your own config from ours, and hopefully makes it easier to maintain.
### React components
We have made some prop-changes to some components to facilitate the new theming and updated CSS. You can read more about them under `migration` in the sidebar.
We have hidden the changes behind a "feature-flag", so you will have to use the new `<Theme/>`-component when testing the new CSS.
<Meta title="Docs/Become a Pilot team/4.Tokens" />
# Tokens
## Spacing scale
We have updated our spacing-scale to now be named `space` and for the values to reflect 1-1 the px-value.
To migrate old `--a-spacing-X`-tokens, you can just take the value and 4x it to get the new `--ax-space-X`-token.
```diff
// Old
--a-spacing-4: 1rem;
// New
--ax-space-16: 1rem;
```
```css
--ax-space-0: 0rem;
--ax-space-1: 0.0625rem;
--ax-space-2: 0.125rem;
--ax-space-4: 0.25rem;
--ax-space-6: 0.375rem;
--ax-space-8: 0.5rem;
--ax-space-12: 0.75rem;
--ax-space-16: 1rem;
--ax-space-20: 1.25rem;
--ax-space-24: 1.5rem;
--ax-space-28: 1.75rem;
--ax-space-32: 2rem;
--ax-space-36: 2.25rem;
--ax-space-40: 2.5rem;
--ax-space-44: 2.75rem;
--ax-space-48: 3rem;
--ax-space-56: 3.5rem;
--ax-space-64: 4rem;
--ax-space-72: 4.5rem;
--ax-space-80: 5rem;
--ax-space-96: 6rem;
--ax-space-128: 8rem;
```
## Global tokens
Our global colors are Neutral, Accent, Success, Info, Warning, Danger, Brand-magenta, Brand-beige, Brand-blue, Meta-purple and Meta-lime.
Beside `neutral` that has a `000`-token,
all other color-tokens are named after the following pattern:
```css
--ax-[role]-000 // Neutral only
--ax-[role]-100
--ax-[role]-100A
--ax-[role]-200
--ax-[role]-200A
--ax-[role]-300
--ax-[role]-300A
--ax-[role]-400
--ax-[role]-400A
--ax-[role]-500
--ax-[role]-600
--ax-[role]-700
--ax-[role]-800
--ax-[role]-900
--ax-[role]-1000
```
## Semantic tokens
We have two sets of semantic tokens, one for unique cases and one for all the roles.
```css
// Unique tokens
--ax-bg-default // Main page background.
--ax-bg-input // Background for input-fields.
--ax-bg-overlay // Background for overlays like Modal.
--ax-bg-sunken // Background for sunken sections to highlight ex. Cards.
--ax-bg-raised // Background for raised elements, like cards or dialogs.
--ax-text-logo // Nav-logo color.
--ax-border-focus // Outline-color for focus-states.
```
For the remaning tokens, they are equal between all the global roles. This means that if you know the token for one role, you know it for all the roles.
```css
// Backgrounds
// Soft is used for subtle backgrounds without state.
--ax-bg-[role]-soft
--ax-bg-[role]-softA
// Moderate is used for subtle elements, with the option for states.
// Should be used with a border in most cases to separate from the background.
// Think Secondary-buttons, Alerts
--ax-bg-[role]-moderate
--ax-bg-[role]-moderateA
--ax-bg-[role]-moderate-hover
--ax-bg-[role]-moderate-hoverA
--ax-bg-[role]-moderate-pressed
--ax-bg-[role]-moderate-pressedA
// Strong is used for elements that should stand out, with the option for states.
// Think Primary-buttons, Checkbox, Chips
// Text on strong should use contrast version of the color.
--ax-bg-[role]-strong
--ax-bg-[role]-strong-hover
--ax-bg-[role]-strong-pressed
// Text
--ax-text-[role]
--ax-text-[role]-subtle
--ax-text-[role]-icon
--ax-text-[role]-contrast
// Borders
--ax-border-[role]
--ax-border-[role]-subtle
--ax-border-[role]-subtleA
--ax-border-[role]-strong
```
### Example use
```css
.alert--success {
background-color: var(--ax-bg-success-moderate);
border: var(--ax-border-success);
}
.alert--info {
background-color: var(--ax-bg-info-moderate);
border: var(--ax-border-info);
}
```
## Shadows
We now have only one shadow-token:
```css
--ax-shadow-dialog
```
## Z-index
We have removed the `--a-z-index`-tokens.
## Font-tokens, breakpoints etc
The remaining tokens are kept the same as the old system, but now with updated prefix.
@@ -4,14 +4,14 @@ import AkselThumbnail from "./assets/aksel-thumbnail.png";
import Components from "./assets/components.png";
import Setup from "./assets/setup.png";
<Meta title="Getting started" />
<Meta title="Docs/Getting started" />
<div className="sb-container">
<div className='sb-section-title'>
# Getting started
Aksel is the toolbox for product development <a href="https://aksel.nav.no"target="_blank">@NAV</a> (Norwegian Labour and Welfare Administration)
Aksel is the toolbox for product development <a href="https://aksel.nav.no"target="_blank">@Nav</a> (Norwegian Labour and Welfare Administration)
This includes a designsystem, best practices for product-development, principles for user-experience and a blog. <a href="https://aksel.nav.no/god-praksis/artikler/om-aksel" target="_blank">
Read more about Aksel.</a>
@@ -30,7 +30,7 @@ import Setup from "./assets/setup.png";
target="_blank"
className="sb-link"
>Website</a></h3>
<p className="sb-section-item-paragraph">Includes everything you need to get started building and developing digital products for NAV today.</p>
<p className="sb-section-item-paragraph">Includes everything you need to get started building and developing digital products for Nav today.</p>
</div>
<div className="sb-section-item">
@@ -136,34 +136,34 @@ import Setup from "./assets/setup.png";
800+ open source icons made by Aksel, NAVs designsystem-team
800+ open source icons made by Aksel, Nav's designsystemteam.
- Designed for 24x24px
- Available in React and SVG
@@ -30,7 +30,7 @@ Tip: Use the `title` prop for accessible icons.
### Sizing
Each icons `width` and `height` is default `1em`. This allows you to use the native `fontSize`-prop to adjust sizing. We recommend using at least 1.5rem/24px for best possible visual representation.
Each icon's `width` and `height` is default `1em`. This allows you to use the native `fontSize`-prop to adjust sizing. We recommend using at least 1.5rem/24px for the best possible visual representation.
`Icons (${svgFiles.length}) and configs (${ymlFiles.length}) written to directory does not match the expected amount of icons located in Figma (${publishedIconComponents.length}).\nThis is most likely caused by duplicate icon names from figma.`,
Pluginen gir deg mulighet til å se gjennom og hente ut alle ikonene i fra ikonpakken `@navikt/aksel-icons`. Du slipper da å hente nye oppdateringer fra Figma Community.
Pluginen gir deg mulighet til å se gjennom og hente ut alle ikonene fra ikonpakken `@navikt/aksel-icons`. Du slipper da å hente nye oppdateringer fra Figma Community.
Referer til [ikon-dokumentasjonen](https://aksel.nav.no/ikoner) for å se alle ikonene.
Gå til [ikon-dokumentasjonen](https://aksel.nav.no/ikoner) for å se alle ikonene.
Har du ønsker om nye ikoner, eller ønsker å bidra med å lage nye, lag et issue på [GitHub-repoet for designsystemet](https://github.com/navikt/aksel).
Loaded 100 of 3463 files, more files were not shown because too many files have changed in this diff.
Show more
Reference in new issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.