* 💄 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
feat: Avoid caching config for color-tokens
feat: Remove use of leonardo, hardcode global config
feat: Update 100-400 scale for darkmode
feat: Update 500-1000 scale for global colors
* feat: Updated to sanity 3.59
* bug: Sanity updated icon and media types, so everything broke
* bug: Fallback to default media in article previews if everything is normal
* Combobox: 💄 tweak the visibility of chevron
* Combobox: 💄 dim visibility of icons for readonly datepicker, select, and combobox
* Combobox: 💄 dim visibility of icons for readonly datepicker, select, and combobox
* changeset
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
// TODO: Convert to new format: https://eslint.org/docs/latest/use/configure/migration-guide
/**
* TODO:
* - Convert to new format (v9): https://eslint.org/docs/latest/use/configure/migration-guide
* - Look into opinionated stylistic plugin
* - Replace @typescript-eslint/recommended with @typescript-eslint/recommended-type-checked
* - We should add "plugin:react/jsx-runtime", but not sure if this will cause problems for projects not using the new JSX transform
* - Consider adding the rule "id-length"
*/
/**
* V9 migration WIP
* - eslint-plugin-storybook does not support v9 yet: https://github.com/storybookjs/eslint-plugin-storybook/issues/157
* - eslint-plugin-testing-library does not support v9 yet: https://github.com/testing-library/eslint-plugin-testing-library/issues?q=is%3Aissue+is%3Aopen+v9
* - @vitest/eslint-plugin supports v9, just need to replace @vitest/legacy-recommended: https://github.com/vitest-dev/eslint-plugin-vitest?tab=readme-ov-file#usage
* - Looks like @typescript-eslint/eslint-plugin and @typescript-eslint/parser can both be replaced by just typescript-eslint in v9: https://typescript-eslint.io/getting-started#step-2-configuration
*/
module.exports={
env:{
browser:true,
@@ -8,15 +23,13 @@ module.exports = {
extends:[
"eslint:recommended",
"plugin:react/recommended",
//"plugin:react/jsx-runtime", // Not sure if this will cause problems for projects not using the new JSX transform
"plugin:react-hooks/recommended",
"plugin:jsx-a11y/recommended",
"plugin:import/recommended",
"plugin:import/typescript",
"plugin:storybook/recommended",
// TODO: Look into opinionated stylistic plugin
// TODO: Replace @typescript-eslint/recommended with @typescript-eslint/recommended-type-checked
],
/* Allows eslint-plugin-react to detect installed react-version */
settings:{react:{version:"detect"}},
rules:{
"import/no-unresolved":"off",
@@ -26,12 +39,6 @@ module.exports = {
],
"array-callback-return":"error",
"object-shorthand":"error",
// TODO: Consider adding the rule "id-length"
// Temporary:
"react/prop-types":"off",
"react/display-name":"off",
"import/no-named-as-default":"off",
// "import/no-cycle": [1],
"no-else-return":"error",
"no-console":[
"warn",
@@ -53,7 +60,12 @@ module.exports = {
],
},
],
/* Temporarily turned off until code is updated */
- Most of our CSS is re-written. This could potentially affect most custom overrides targeting `.navds`-classes.
- You will not be able to use the old CSS and the new CSS at the same time.
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.
## 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, Tooltip
`arrow`-prop is removed. All of our floating dialog-elements now come 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 `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`
- 3. Wrap your app in the `Theme`-component. You do not have to set the theme, but it defaults to `light`.
```tsx
import "@navikt/ds-css/darkside";
import { Theme } from "@navikt/ds-react";
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`, 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 `ds-css/darkside`
```tsx
import "@navikt/ds-css/darkside;";
import { Theme } from "@navikt/ds-react";
export const App = () => (
<Theme theme="light">
<YourApp />
</Theme>
);
```
You will not be able to use the old CSS and the new CSS at the same time.
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.
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 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)
## 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 inn.
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.
### 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.
- You will not be able to use the old CSS and the new CSS at the same time.
- Component-based tokens are no longer avaliable.
### 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).
- Chore: Manually bump version to sync npm and github-releases ([`aa7c2d9`](https://github.com/navikt/aksel/commit/aa7c2d9598434d6304432daa20e0a1eeedd03b1b))
Loaded 100 of 853 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.