Compare commits

..
Author SHA1 Message Date
github-actions[bot]andgithub-actions[bot] a98bfb7a90 Version Packages (#3618)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2025-03-03 10:43:25 +01:00
Ken 6728754503 P1: [Darkside] Primitives spacing -> space migrations (#3597)
* ✨ 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
2025-03-03 10:37:32 +01:00
github-actions[bot]andgithub-actions[bot] bf76336dc7 Version Packages (#3613)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2025-02-27 15:00:34 +01:00
Ken 06fecf2af1 🐛 Changed outline-offset to -3px in tabpanel 2025-02-27 14:58:51 +01:00
Ken 6ffebc72c7 🐛 Now hides global tokens from publishing in Figma 2025-02-25 11:36:08 +01:00
github-actions[bot]andgithub-actions[bot] c633deb3e7 Version Packages (#3604)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2025-02-24 11:01:35 +01:00
Ken 441d8b732c 💄 Bumped bg-raised token to neutral-200 in darkmode. 2025-02-24 09:54:15 +01:00
github-actions[bot]andgithub-actions[bot] 2a4465a051 Version Packages (#3603)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2025-02-20 16:24:29 +01:00
Ken b77dbe0cad 🐛 Datepicker now checks that from/to dates are actually another day (#3602)
* 🐛 Datepicker now checks that from/to dates are actually another day

* 🐛 Wraps fromY/to dates in startOfDay to handle timezone differences
2025-02-20 16:17:08 +01:00
52 changed files with 1142 additions and 113 deletions

No files matched your search

+8
View File
@@ -1,5 +1,13 @@
# @navikt/aksel-icons
## 7.15.0
## 7.14.3
## 7.14.2
## 7.14.1
## 7.14.0
### Minor Changes
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "@navikt/aksel-icons",
"version": "7.14.0",
"version": "7.15.0",
"author": "Aksel | Nav",
"homepage": "https://aksel.nav.no/ikoner",
"repository": {
+8
View File
@@ -1,5 +1,13 @@
# @navikt/aksel-stylelint
## 7.15.0
## 7.14.3
## 7.14.2
## 7.14.1
## 7.14.0
## 7.13.0
+3 -3
View File
@@ -1,6 +1,6 @@
{
"name": "@navikt/aksel-stylelint",
"version": "7.14.0",
"version": "7.15.0",
"author": "Aksel | Nav",
"homepage": "https://aksel.nav.no/grunnleggende/kode/stylelint",
"repository": {
@@ -35,8 +35,8 @@
"dev": "yarn watch:lint"
},
"devDependencies": {
"@navikt/ds-css": "^7.14.0",
"@navikt/ds-tokens": "^7.14.0",
"@navikt/ds-css": "^7.15.0",
"@navikt/ds-tokens": "^7.15.0",
"concurrently": "9.0.1",
"postcss-selector-parser": "^6.0.13",
"postcss-value-parser": "^4.2.0",
+34
View File
@@ -1,5 +1,39 @@
# @navikt/aksel
## 7.15.0
### Minor Changes
- CLI: Added primitives migration to new space-tokens. Run `npx @navikt/aksel migration primitive-spacing` to start migrating now. This update is supported for old and new (darkside) system. ([#3597](https://github.com/navikt/aksel/pull/3597))
- CLI: Added js/ts migration to new space-tokens. Run `npx @navikt/aksel migration token-spacing-js` to start migrating now. This update is supported for old and new (darkside) system. ([#3597](https://github.com/navikt/aksel/pull/3597))
### Patch Changes
- Updated dependencies []:
- @navikt/ds-css@7.15.0
## 7.14.3
### Patch Changes
- Updated dependencies [[`06fecf2`](https://github.com/navikt/aksel/commit/06fecf2af1972a5d06ea452fc5b7431b064e1fc0)]:
- @navikt/ds-css@7.14.3
## 7.14.2
### Patch Changes
- Updated dependencies []:
- @navikt/ds-css@7.14.2
## 7.14.1
### Patch Changes
- Updated dependencies []:
- @navikt/ds-css@7.14.1
## 7.14.0
### Patch Changes
+2 -2
View File
@@ -1,6 +1,6 @@
{
"name": "@navikt/aksel",
"version": "7.14.0",
"version": "7.15.0",
"description": "Aksel command line interface. Handles css-imports, codemods and more",
"author": "Aksel | Nav designsystem team",
"license": "MIT",
@@ -29,7 +29,7 @@
},
"homepage": "https://aksel.nav.no/grunnleggende/kode/kommandolinje",
"dependencies": {
"@navikt/ds-css": "^7.14.0",
"@navikt/ds-css": "^7.15.0",
"axios": "1.7.4",
"chalk": "4.1.0",
"clipboardy": "^2.3.0",
+20
View File
@@ -97,6 +97,26 @@ export const migrations: {
"Remember to update use of `variant`-prop to match previous use of colors. If needed the component exposes css-variables for custom overrides",
},
],
darkside: [
{
description:
"Updates all Primitives to use new `space`-tokens. (Works with old and new system)",
value: "primitive-spacing",
path: "darkside/primitives-spacing/spacing",
},
{
description:
"Updates css, scss and less-variables to use new `space`-tokens. (Works with old and new system)",
value: "token-spacing",
path: "darkside/token-spacing/spacing",
},
{
description:
"Updates js-tokens to use new `space`-tokens. (Works with old and new system)",
value: "token-spacing-js",
path: "darkside/token-spacing-js/spacing",
},
],
};
export function getMigrationPath(str: string) {
@@ -0,0 +1,168 @@
import type {
API,
ASTPath,
FileInfo,
ImportDeclaration,
JSXElement,
JSXOpeningElement,
} from "jscodeshift";
/**
* Finds a component import, accounting for sub-components and aliases.
* Returns the local name of the component. If the component is not found, returns null.
*/
function findComponentImport(input: {
j: API["j"];
file: FileInfo;
name: string;
packageType?: "react" | "tokens";
}) {
const { j, file, name: _name, packageType = "react" } = input;
/* Account for sub-components */
const name = _name.includes(".") ? _name.split(".")[0] : _name;
const root = j(file.source);
let foundName: string | null = null;
root.find(j.ImportDeclaration).forEach((path) => {
if (packageType === "react" && !isAkselReactImport(path)) {
return;
}
if (packageType === "tokens" && !isAkselTokensImport(path)) {
return;
}
path.node.specifiers.forEach((specifier) => {
if (
specifier.type === "ImportSpecifier" &&
specifier.imported.name === name
) {
foundName = specifier.local
? specifier.local.name
: specifier.imported.name;
}
});
});
return foundName;
}
/**
* Finds a JSX element in the AST, accounting for sub-components.
*/
function findJSXElement(input: {
root: ReturnType<API["j"]>;
j: API["j"];
name: string;
originalName: string;
}) {
const { root, j, name, originalName } = input;
const isSubComponent = originalName.includes(".");
const openingElement = (
isSubComponent
? {
name: {
type: "JSXMemberExpression",
object: {
name,
},
property: {
name: originalName.split(".")[1],
},
},
}
: {
name: {
type: "JSXIdentifier",
name,
},
}
) as JSXOpeningElement;
return root.find(j.JSXElement, {
openingElement,
});
}
/**
* Finds a prop in a JSX element.
*/
function findProp(input: {
j: API["j"];
path: ASTPath<JSXElement>;
name: string;
}) {
const { j, path, name } = input;
return j(path).find(j.JSXAttribute, {
name: {
name,
},
});
}
/**
* Checks if an import is from @navikt/ds-react.
*/
function isAkselReactImport(path: ASTPath<ImportDeclaration>) {
const importSource = path.node.source.value;
return (
typeof importSource === "string" &&
importSource.startsWith("@navikt/ds-react")
);
}
/**
* Checks if an import is from @navikt/ds-tokens.
*/
function isAkselTokensImport(path: ASTPath<ImportDeclaration>) {
const importSource = path.node.source.value;
return (
typeof importSource === "string" &&
importSource.startsWith("@navikt/ds-tokens")
);
}
/**
* Maps old spacing-token values to new space-tokens
*/
const legacySpacingTokenMap = new Map<string, string>([
["32", "128"],
["24", "96"],
["20", "80"],
["18", "72"],
["16", "64"],
["14", "56"],
["12", "48"],
["11", "44"],
["10", "40"],
["9", "36"],
["8", "32"],
["7", "28"],
["6", "24"],
["5", "20"],
["4", "16"],
["3", "12"],
["2", "8"],
["1-alt", "6"],
["1", "4"],
["05", "2"],
["0", "0"],
]);
function convertSpacingToSpace(spacing: string): string | null {
return legacySpacingTokenMap.get(spacing) || null;
}
export {
findComponentImport,
findJSXElement,
findProp,
convertSpacingToSpace,
legacySpacingTokenMap,
};
@@ -0,0 +1,113 @@
import type { API, FileInfo } from "jscodeshift";
import { getLineTerminator } from "../../../utils/lineterminator";
import {
findComponentImport,
findJSXElement,
findProp,
legacySpacingTokenMap,
} from "../darkside.utils";
export default function transformer(file: FileInfo, api: API) {
const j = api.jscodeshift;
const root = j(file.source);
/**
* Migrate Primitives to `space` from `spacing`
*/
const primitives = [
"Box",
"Box.New",
"BoxNew",
"Hgrid",
"Stack",
"HStack",
"VStack",
"Bleed",
];
const affectedProps = [
"padding",
"paddingInline",
"paddingBlock",
"margin",
"marginInline",
"marginBlock",
"inset",
"top",
"right",
"bottom",
"left",
"gap",
];
for (const primitive of primitives) {
const name = findComponentImport({ file, j, name: primitive });
if (!name) {
continue;
}
findJSXElement({
root,
j,
name,
originalName: primitive,
}).forEach((path) => {
for (const prop of affectedProps) {
findProp({ j, path, name: prop }).forEach((attr) => {
const attrValue = attr.value.value;
if (attrValue.type === "StringLiteral") {
/* padding="32" */
attrValue.value = convertSpacingToSpace(attrValue.value);
} else if (attrValue.type === "JSXExpressionContainer") {
/* padding={{xs: "16", sm: "32"}} */
const expression = attrValue.expression;
if (expression.type === "ObjectExpression") {
/* xs, md, sm */
expression.properties.forEach((property) => {
if (property.type === "ObjectProperty") {
if (property.value.type === "StringLiteral") {
property.value.value = convertSpacingToSpace(
property.value.value,
);
}
}
});
}
}
});
}
});
}
return root.toSource(getLineTerminator(file.source));
}
/**
* Takes an old valid spacing-token and returns the new converted space-token
* oldValue: "8", "8 10", "8 auto", "auto auto", "full px"
* @returns "space-32", "space-32 space-40"
*/
function convertSpacingToSpace(oldValue: string): string {
const spacingTokens = oldValue.split(" ");
const newSpacing = [];
for (const spacingToken of spacingTokens) {
if (spacingToken === "px") {
/* We replace "px" with new `space-1` */
newSpacing.push(`space-1`);
} else if (
["auto", "full", "px"].includes(spacingToken) ||
spacingToken.startsWith("space-")
) {
newSpacing.push(spacingToken);
} else if (!legacySpacingTokenMap.get(spacingToken)) {
console.warn(`Possibly invalid spacing token found: ${spacingToken}\n`);
newSpacing.push(spacingToken);
} else {
newSpacing.push(`space-${legacySpacingTokenMap.get(spacingToken)}`);
}
}
return newSpacing.join(" ");
}
@@ -0,0 +1,13 @@
import { Box } from "@navikt/ds-react/Box";
export const Demo = () => (
<Box
before="before"
marginInline={{ xs: "auto", sm: "24", md: "32 11" }}
padding="24"
paddingInline="12 32"
after="after"
>
<div>ELEMENT</div>
</Box>
);
@@ -0,0 +1,13 @@
import { Box } from "@navikt/ds-react/Box";
export const Demo = () => (
<Box
before="before"
marginInline={{ xs: "auto", sm: "space-96", md: "space-128 space-44" }}
padding="space-96"
paddingInline="space-48 space-128"
after="after"
>
<div>ELEMENT</div>
</Box>
);
@@ -0,0 +1,13 @@
import { Box } from "@navikt/ds-react";
export const Demo = () => (
<Box
before="before"
marginInline={{ xs: "auto", sm: "space-96", md: "space-128 space-44" }}
padding="space-96"
paddingInline="space-48 space-128"
after="after"
>
<div>ELEMENT</div>
</Box>
);
@@ -0,0 +1,13 @@
import { Box } from "@navikt/ds-react";
export const Demo = () => (
<Box
before="before"
marginInline={{ xs: "auto", sm: "space-96", md: "space-128 space-44" }}
padding="space-96"
paddingInline="space-48 space-128"
after="after"
>
<div>ELEMENT</div>
</Box>
);
@@ -0,0 +1,13 @@
import { Box } from "@navikt/ds-react";
export const Demo = () => (
<Box
before="before"
marginInline={{ xs: "auto", sm: "24", md: "32 11" }}
padding="24"
paddingInline="12 32"
after="after"
>
<div>ELEMENT</div>
</Box>
);
@@ -0,0 +1,13 @@
import { Box } from "@navikt/ds-react";
export const Demo = () => (
<Box
before="before"
marginInline={{ xs: "auto", sm: "space-96", md: "space-128 space-44" }}
padding="space-96"
paddingInline="space-48 space-128"
after="after"
>
<div>ELEMENT</div>
</Box>
);
@@ -0,0 +1,13 @@
import { Box as DSBOX } from "@navikt/ds-react";
export const Demo = () => (
<DSBOX
before="before"
marginInline={{ xs: "auto", sm: "24", md: "32 11" }}
padding="24"
paddingInline="12 32"
after="after"
>
<div>ELEMENT</div>
</DSBOX>
);
@@ -0,0 +1,13 @@
import { Box as DSBOX } from "@navikt/ds-react";
export const Demo = () => (
<DSBOX
before="before"
marginInline={{ xs: "auto", sm: "space-96", md: "space-128 space-44" }}
padding="space-96"
paddingInline="space-48 space-128"
after="after"
>
<div>ELEMENT</div>
</DSBOX>
);
@@ -0,0 +1,19 @@
import { check } from "../../../../utils/check";
const migration = "spacing";
const fixtures = [
"import",
"valueAsObject",
"importAlias",
"subComponent",
"idempotent",
"directImport",
];
for (const fixture of fixtures) {
check(__dirname, {
fixture,
migration,
extension: "js",
});
}
@@ -0,0 +1,13 @@
import { Box } from "@navikt/ds-react";
export const Demo = () => (
<Box.New
before="before"
marginInline={{ xs: "auto", sm: "24", md: "32 11" }}
padding="24"
paddingInline="12 32"
after="after"
>
<div>ELEMENT</div>
</Box.New>
);
@@ -0,0 +1,13 @@
import { Box } from "@navikt/ds-react";
export const Demo = () => (
<Box.New
before="before"
marginInline={{ xs: "auto", sm: "space-96", md: "space-128 space-44" }}
padding="space-96"
paddingInline="space-48 space-128"
after="after"
>
<div>ELEMENT</div>
</Box.New>
);
@@ -0,0 +1,13 @@
import { Box } from "@navikt/ds-react";
export const Demo = () => (
<Box
before="before"
marginInline={{ xs: "auto", sm: mdValue, md: getMdValue() }}
padding="24"
paddingInline="12 32"
after="after"
>
<div>ELEMENT</div>
</Box>
);
@@ -0,0 +1,13 @@
import { Box } from "@navikt/ds-react";
export const Demo = () => (
<Box
before="before"
marginInline={{ xs: "auto", sm: mdValue, md: getMdValue() }}
padding="space-96"
paddingInline="space-48 space-128"
after="after"
>
<div>ELEMENT</div>
</Box>
);
@@ -0,0 +1,33 @@
import type { API, FileInfo } from "jscodeshift";
import { getLineTerminator } from "../../../utils/lineterminator";
import { translateToken } from "../../../utils/translate-token";
import { findComponentImport, legacySpacingTokenMap } from "../darkside.utils";
export default function transformer(file: FileInfo, api: API) {
const j = api.jscodeshift;
let root = j(file.source);
legacySpacingTokenMap.forEach((newVar, oldVar) => {
const oldCSSVar = translateToken(`--a-spacing-${oldVar}`, "js");
const newCSSVar = translateToken(`--a-space-${newVar}`, "js");
const name = findComponentImport({
file,
j,
name: oldCSSVar,
packageType: "tokens",
});
if (!name) {
return;
}
let code = root.toSource(getLineTerminator(file.source));
const rgx = new RegExp("(" + oldCSSVar + ")", "gm");
code = code.replace(rgx, newCSSVar);
root = j(code);
});
return root.toSource(getLineTerminator(file.source));
}
@@ -0,0 +1,88 @@
import styled from "styled-components";
import {
ASpacing16 as abc132,
ASpacing32,
ASpacing8,
ASpacing1Alt,
} from "@navikt/ds-tokens/dist/tokens";
import { BodyShort } from "@navikt/ds-react";
const StyledNavLink = styled(NavLink)`
border-bottom: 5px solid white;
color: inherit;
text-align: center;
text-decoration: none;
width: 100%;
padding-top: 1rem;
padding-bottom: 1rem;
text-overflow: ellipsis;
overflow: hidden;
white-space: nowrap;
padding-left: 5px;
padding-right: 5px;
:hover {
border-bottom: 5px solid ${abc132};
p {
color: ${ASpacing1Alt};
}
}
&.active {
background-color: ${ASpacing32};
border-bottom: 5px solid ${ASpacing8};
.typo-normal {
font-weight: bold;
}
}
`;
const StyledLenketekst = styled(BodyShort)`
text-overflow: ellipsis;
overflow: hidden;
white-space: nowrap;
`;
const StyledTekst = styled(BodyShort)`
border-bottom: 5px solid white;
color: ${NavdsGlobalColorGray400};
text-align: center;
text-decoration: none;
width: 100%;
padding-top: 1rem;
padding-bottom: 1rem;
text-overflow: ellipsis;
overflow: hidden;
white-space: nowrap;
padding-left: 5px;
padding-right: 5px;
`;
const Fane = ({ side, behandlingId, index, deaktivert }) => {
const { gåTilUrl } = useApp();
const fanenavn = side.navn;
return (
<>
{deaktivert && (
<StyledTekst size={"small"}>
{index + 1}. {fanenavn}
</StyledTekst>
)}
{!deaktivert && (
<StyledNavLink
key={side.navn}
to={`/behandling/${behandlingId}/${side.href}`}
onClick={(e) => {
e.preventDefault();
gåTilUrl(`/behandling/${behandlingId}/${side.href}`);
}}
>
<StyledLenketekst size={"small"}>
{index + 1}. {fanenavn}
</StyledLenketekst>
</StyledNavLink>
)}
</>
);
};
export default Fane;
@@ -0,0 +1,88 @@
import styled from "styled-components";
import {
ASpace64 as abc132,
ASpace128,
ASpace32,
ASpace6,
} from "@navikt/ds-tokens/dist/tokens";
import { BodyShort } from "@navikt/ds-react";
const StyledNavLink = styled(NavLink)`
border-bottom: 5px solid white;
color: inherit;
text-align: center;
text-decoration: none;
width: 100%;
padding-top: 1rem;
padding-bottom: 1rem;
text-overflow: ellipsis;
overflow: hidden;
white-space: nowrap;
padding-left: 5px;
padding-right: 5px;
:hover {
border-bottom: 5px solid ${abc132};
p {
color: ${ASpace6};
}
}
&.active {
background-color: ${ASpace128};
border-bottom: 5px solid ${ASpace32};
.typo-normal {
font-weight: bold;
}
}
`;
const StyledLenketekst = styled(BodyShort)`
text-overflow: ellipsis;
overflow: hidden;
white-space: nowrap;
`;
const StyledTekst = styled(BodyShort)`
border-bottom: 5px solid white;
color: ${NavdsGlobalColorGray400};
text-align: center;
text-decoration: none;
width: 100%;
padding-top: 1rem;
padding-bottom: 1rem;
text-overflow: ellipsis;
overflow: hidden;
white-space: nowrap;
padding-left: 5px;
padding-right: 5px;
`;
const Fane = ({ side, behandlingId, index, deaktivert }) => {
const { gåTilUrl } = useApp();
const fanenavn = side.navn;
return (
<>
{deaktivert && (
<StyledTekst size={"small"}>
{index + 1}. {fanenavn}
</StyledTekst>
)}
{!deaktivert && (
<StyledNavLink
key={side.navn}
to={`/behandling/${behandlingId}/${side.href}`}
onClick={(e) => {
e.preventDefault();
gåTilUrl(`/behandling/${behandlingId}/${side.href}`);
}}
>
<StyledLenketekst size={"small"}>
{index + 1}. {fanenavn}
</StyledLenketekst>
</StyledNavLink>
)}
</>
);
};
export default Fane;
@@ -0,0 +1,12 @@
import { check } from "../../../../utils/check";
const migration = "spacing";
const fixtures = ["complete"];
for (const fixture of fixtures) {
check(__dirname, {
fixture,
migration,
extension: "js",
});
}
@@ -0,0 +1,28 @@
import type { FileInfo } from "jscodeshift";
import { translateToken } from "../../../utils/translate-token";
import { legacySpacingTokenMap } from "../darkside.utils";
export default function transformer(file: FileInfo) {
let src = file.source;
legacySpacingTokenMap.forEach((newVar, oldVar) => {
const oldCSSVar = `--a-spacing-${oldVar}`;
const newCSSVar = `--a-space-${newVar}`;
const CSSRgx = new RegExp("(" + oldCSSVar + ")", "gm");
const SCSSRgx = new RegExp(
"(\\" + translateToken(oldCSSVar, "scss") + ")",
"gm",
);
const LESSRgx = new RegExp(
"(" + translateToken(oldCSSVar, "less") + ")",
"gm",
);
src = src.replace(CSSRgx, newCSSVar);
src = src.replace(SCSSRgx, translateToken(newCSSVar, "scss"));
src = src.replace(LESSRgx, translateToken(newCSSVar, "less"));
});
return src;
}
@@ -0,0 +1,7 @@
.test {
margin: var(--a-spacing-4);
padding: var(--a-spacing-16);
padding: var(--a-spacing-0);
padding: var(--a-spacing-1-alt);
padding: var(--a-spacing-05);
}
@@ -0,0 +1,7 @@
.test {
margin: @a-spacing-4;
padding: @a-spacing-16;
padding: @a-spacing-0;
padding: @a-spacing-1-alt;
padding: @a-spacing-05;
}
@@ -0,0 +1,7 @@
.test {
margin: $a-spacing-4;
padding: $a-spacing-16;
padding: $a-spacing-0;
padding: common.$a-spacing-1-alt;
padding: common.$a-spacing-05;
}
@@ -0,0 +1,7 @@
.test {
margin: var(--a-space-16);
padding: var(--a-space-64);
padding: var(--a-space-0);
padding: var(--a-space-6);
padding: var(--a-space-2);
}
@@ -0,0 +1,7 @@
.test {
margin: @a-space-16;
padding: @a-space-64;
padding: @a-space-0;
padding: @a-space-6;
padding: @a-space-2;
}
@@ -0,0 +1,7 @@
.test {
margin: $a-space-16;
padding: $a-space-64;
padding: $a-space-0;
padding: common.$a-space-6;
padding: common.$a-space-2;
}
@@ -0,0 +1,24 @@
import { check } from "../../../../utils/check";
const migration = "spacing";
const fixtures = ["complete"];
for (const fixture of fixtures) {
check(__dirname, {
fixture,
migration,
extension: "css",
});
check(__dirname, {
fixture,
migration,
extension: "scss",
});
check(__dirname, {
fixture,
migration,
extension: "less",
});
}
+12
View File
@@ -1,5 +1,17 @@
# @navikt/ds-css
## 7.15.0
## 7.14.3
### Patch Changes
- Darkside: Changed outline-offset for tabpanel from -4px to -3px. ([`06fecf2`](https://github.com/navikt/aksel/commit/06fecf2af1972a5d06ea452fc5b7431b064e1fc0))
## 7.14.2
## 7.14.1
## 7.14.0
### Minor Changes
+1 -1
View File
@@ -127,7 +127,7 @@
.navds-tabs__tabpanel:focus-visible {
outline: 3px solid var(--ax-border-focus);
outline-offset: -4px;
outline-offset: -3px;
}
@media (forced-colors: active) {
+4 -3
View File
@@ -1,6 +1,6 @@
{
"name": "@navikt/ds-css",
"version": "7.14.0",
"version": "7.15.0",
"description": "CSS for Nav Designsystem",
"author": "Aksel | Nav designsystem team",
"keywords": [
@@ -28,7 +28,7 @@
"test": "yarn build && vitest run"
},
"devDependencies": {
"@navikt/ds-tokens": "^7.14.0",
"@navikt/ds-tokens": "^7.15.0",
"@types/clean-css": "4.2.11",
"autoprefixer": "^10.4.20",
"browserslist": "^4.24.2",
@@ -57,6 +57,7 @@
".": "./dist/index.css",
"./dist/*": "./dist/*",
"./darkside": "./dist/darkside/index.css",
"./tokens.json": "./tokens.json"
"./tokens.json": "./tokens.json",
"./config/_mappings": "./config/_mappings.js"
}
}
+34
View File
@@ -1,5 +1,39 @@
# @navikt/ds-react
## 7.15.0
### Patch Changes
- Updated dependencies []:
- @navikt/ds-tokens@7.15.0
- @navikt/aksel-icons@7.15.0
## 7.14.3
### Patch Changes
- Updated dependencies []:
- @navikt/ds-tokens@7.14.3
- @navikt/aksel-icons@7.14.3
## 7.14.2
### Patch Changes
- Updated dependencies [[`441d8b7`](https://github.com/navikt/aksel/commit/441d8b732cb4820e6fe37ad87200c5b5eb31e5cf)]:
- @navikt/ds-tokens@7.14.2
- @navikt/aksel-icons@7.14.2
## 7.14.1
### Patch Changes
- Datepicker: Fixed regression where some fromDate/toDate instances lead to that date ending up as disabled. ([#3602](https://github.com/navikt/aksel/pull/3602))
- Updated dependencies []:
- @navikt/ds-tokens@7.14.1
- @navikt/aksel-icons@7.14.1
## 7.14.0
### Minor Changes
+3 -3
View File
@@ -1,6 +1,6 @@
{
"name": "@navikt/ds-react",
"version": "7.14.0",
"version": "7.15.0",
"description": "React components from the Norwegian Labour and Welfare Administration.",
"author": "Aksel, a team part of the Norwegian Labour and Welfare Administration.",
"license": "MIT",
@@ -625,8 +625,8 @@
"dependencies": {
"@floating-ui/react": "0.25.4",
"@floating-ui/react-dom": "^2.0.9",
"@navikt/aksel-icons": "^7.14.0",
"@navikt/ds-tokens": "^7.14.0",
"@navikt/aksel-icons": "^7.15.0",
"@navikt/ds-tokens": "^7.15.0",
"clsx": "^2.1.0",
"date-fns": "^4.0.0",
"react-day-picker": "9.5.0"
@@ -1,4 +1,9 @@
import { isThisMonth, setYear } from "date-fns";
import {
differenceInCalendarDays,
isThisMonth,
setYear,
startOfDay,
} from "date-fns";
export const dateIsInCurrentMonth = (
date: Date,
@@ -11,3 +16,20 @@ export const dateIsInCurrentMonth = (
export function isValidDate(day?: Date): boolean {
return !!(day && !Number.isNaN(day.getTime()) && day.getFullYear() > 999);
}
export function isDateOutsideRange({
day,
fromDate,
toDate,
}: {
day: Date;
fromDate?: Date;
toDate?: Date;
}): boolean {
const isDateAfter =
toDate && differenceInCalendarDays(day, startOfDay(toDate)) > 0;
const isDateBefore =
fromDate && differenceInCalendarDays(startOfDay(fromDate), day) > 0;
return isDateAfter || isDateBefore || false;
}
@@ -1,5 +1,6 @@
import { startOfMonth, startOfYear } from "date-fns";
import { describe, expect, test } from "vitest";
import { isDateOutsideRange } from "./check-dates";
import { clampDisplayMonth, clampDisplayYear } from "./clamp-dates";
describe("clampDisplayMonth", () => {
@@ -71,3 +72,85 @@ describe("clampDisplayYear", () => {
).toEqual(startOfYear(month));
});
});
describe("isDateOutsideRange", () => {
test("returns false when day is within range", () => {
const day = new Date(2023, 5, 15);
const fromDate = new Date(2023, 0, 1);
const toDate = new Date(2023, 11, 31);
expect(isDateOutsideRange({ day, fromDate, toDate })).toBe(false);
});
test("returns true when day is after toDate", () => {
const day = new Date(2024, 0, 1);
const fromDate = new Date(2023, 0, 1);
const toDate = new Date(2023, 11, 31);
expect(isDateOutsideRange({ day, fromDate, toDate })).toBe(true);
});
test("returns true when day is before fromDate", () => {
const day = new Date(2022, 11, 31);
const fromDate = new Date(2023, 0, 1);
const toDate = new Date(2023, 11, 31);
expect(isDateOutsideRange({ day, fromDate, toDate })).toBe(true);
});
test("returns false when fromDate and toDate are not provided", () => {
const day = new Date(2023, 5, 15);
expect(isDateOutsideRange({ day })).toBe(false);
});
test("returns true when only toDate is provided and day is after toDate", () => {
const day = new Date(2024, 0, 1);
const toDate = new Date(2023, 11, 31);
expect(isDateOutsideRange({ day, toDate })).toBe(true);
});
test("returns false when only toDate is provided and day is before toDate", () => {
const day = new Date(2023, 5, 15);
const toDate = new Date(2023, 11, 31);
expect(isDateOutsideRange({ day, toDate })).toBe(false);
});
test("returns true when only fromDate is provided and day is before fromDate", () => {
const day = new Date(2022, 11, 31);
const fromDate = new Date(2023, 0, 1);
expect(isDateOutsideRange({ day, fromDate })).toBe(true);
});
test("returns false when only fromDate is provided and day is after fromDate", () => {
const day = new Date(2023, 5, 15);
const fromDate = new Date(2023, 0, 1);
expect(isDateOutsideRange({ day, fromDate })).toBe(false);
});
test("returns false when day is identical to fromDate", () => {
const day = new Date(2023, 0, 1);
const fromDate = new Date(2023, 0, 1);
expect(isDateOutsideRange({ day, fromDate })).toBe(false);
});
test("returns false when day is identical to toDate", () => {
const day = new Date(2023, 11, 31);
const toDate = new Date(2023, 11, 31);
expect(isDateOutsideRange({ day, toDate })).toBe(false);
});
test("returns false when day is identical to both fromDate and toDate", () => {
const day = new Date(2023, 5, 15);
const fromDate = new Date(2023, 5, 15);
const toDate = new Date(2023, 5, 15);
expect(isDateOutsideRange({ day, fromDate, toDate })).toBe(false);
});
});
@@ -5,7 +5,11 @@ export {
parseDate,
} from "./parse-date";
export { disableDate } from "./dates-disabled";
export { dateIsInCurrentMonth, isValidDate } from "./check-dates";
export {
dateIsInCurrentMonth,
isValidDate,
isDateOutsideRange,
} from "./check-dates";
export { isMatch, isDateInRange } from "./is-match";
export { clampDisplayMonth, clampDisplayYear } from "./clamp-dates";
export { getMonthOptions, getYearOptions } from "./dropdown-options";
@@ -1,12 +1,12 @@
import cl from "clsx";
import { isAfter, isBefore, isWeekend } from "date-fns";
import { isWeekend } from "date-fns";
import React, { useCallback } from "react";
import { ClassNames, DayPicker, dateMatchModifiers } from "react-day-picker";
import { Show } from "../../../layout/responsive";
import { omit } from "../../../util";
import { useDateLocale } from "../../../util/i18n/i18n.hooks";
import { getLocaleFromString } from "../../Date.locale";
import { clampDisplayMonth } from "../../date-utils";
import { clampDisplayMonth, isDateOutsideRange } from "../../date-utils";
import {
ConditionalModeProps,
DatePickerDefaultProps,
@@ -141,15 +141,10 @@ const ReactDayPicker = ({
}}
className={cl("navds-date", className)}
disabled={(day) => {
const isOutside =
(toDate && isAfter(day, toDate)) ||
(fromDate && isBefore(day, fromDate)) ||
false;
return (
(disableWeekends && isWeekend(day)) ||
dateMatchModifiers(day, disabled) ||
isOutside
isDateOutsideRange({ day, fromDate, toDate })
);
}}
weekStartsOn={1}
+8
View File
@@ -1,5 +1,13 @@
# @navikt/ds-tailwind
## 7.15.0
## 7.14.3
## 7.14.2
## 7.14.1
## 7.14.0
## 7.13.0
+2 -2
View File
@@ -1,6 +1,6 @@
{
"name": "@navikt/ds-tailwind",
"version": "7.14.0",
"version": "7.15.0",
"description": "Tailwind config based on @navikt/ds-tokens",
"author": "Aksel | Nav designsystem team",
"keywords": [
@@ -25,7 +25,7 @@
"directory": "@navikt/core/tailwind"
},
"devDependencies": {
"@navikt/ds-tokens": "^7.14.0",
"@navikt/ds-tokens": "^7.15.0",
"color": "4.2.3",
"lodash": "^4.17.21",
"tailwindcss": "^3.3.3",
+12
View File
@@ -1,5 +1,17 @@
# @navikt/ds-tokens
## 7.15.0
## 7.14.3
## 7.14.2
### Patch Changes
- Darkside: :lipstick: Bumped `bg-raised` token to `neutral-200` in darkmode. ([`441d8b7`](https://github.com/navikt/aksel/commit/441d8b732cb4820e6fe37ad87200c5b5eb31e5cf))
## 7.14.1
## 7.14.0
## 7.13.0
@@ -86,7 +86,8 @@ export class AkselVariablesInterface {
this.Figma.setVariableMetadata(variable, {
codeSyntax: token.code,
description: token.comment ?? "",
hiddenFromPublishing: collection.hiddenFromPublishing,
/* We always hide global colors from publishing in figma */
hiddenFromPublishing: true,
scopes: token.scopes,
});
}
@@ -42,7 +42,7 @@ export function semanticRootTokens(theme: ColorTheme) {
value:
theme === "light"
? "{ax.neutral.000.value}"
: "{ax.neutral.100.value}",
: "{ax.neutral.200.value}",
type: "color",
group: "background",
},
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "@navikt/ds-tokens",
"version": "7.14.0",
"version": "7.15.0",
"description": "Design-tokens for Nav designsystem",
"author": "Aksel | Nav designsystem team",
"keywords": [
+79 -63
View File
@@ -1,24 +1,40 @@
# Changelog
## 7.15
### @navikt/aksel
- CLI: Added primitives migration to new space-tokens. Run `npx @navikt/aksel migration primitive-spacing` to start migrating now. This update is supported for old and new (darkside) system. ([#3597](https://github.com/navikt/aksel/pull/3597))
- CLI: Added js/ts migration to new space-tokens. Run `npx @navikt/aksel migration token-spacing-js` to start migrating now. This update is supported for old and new (darkside) system. ([#3597](https://github.com/navikt/aksel/pull/3597))
## 7.14
### @navikt/ds-react
- DatePicker: Refactored locally to support `react-day-picker v9`. No external API has been changed. ([#3525](https://github.com/navikt/aksel/pull/3525))
- Datepicker: Fixed regression where some fromDate/toDate instances lead to that date ending up as disabled. ([#3602](https://github.com/navikt/aksel/pull/3602))
- MonthPicker: Refactored locally and no longer depends on `react-day-picker v9`. No external API has been changed. ([#3525](https://github.com/navikt/aksel/pull/3525))
* DatePicker: Refactored locally to support `react-day-picker v9`. No external API has been changed. ([#3525](https://github.com/navikt/aksel/pull/3525))
- Dependencies: `react-day-picker` bumped to `v9.5.0`. ([#3525](https://github.com/navikt/aksel/pull/3525))
* MonthPicker: Refactored locally and no longer depends on `react-day-picker v9`. No external API has been changed. ([#3525](https://github.com/navikt/aksel/pull/3525))
- Dependencies: `date-fns` bumped to `^4.0.0`. ([#3525](https://github.com/navikt/aksel/pull/3525))
* Dependencies: `react-day-picker` bumped to `v9.5.0`. ([#3525](https://github.com/navikt/aksel/pull/3525))
* Darkside: Added 'arrow' back to Tooltip. ([#3589](https://github.com/navikt/aksel/pull/3589))
* Dependencies: `date-fns` bumped to `^4.0.0`. ([#3525](https://github.com/navikt/aksel/pull/3525))
- Darkside: Added 'arrow' back to Tooltip. ([#3589](https://github.com/navikt/aksel/pull/3589))
### @navikt/ds-tokens
- Darkside: :lipstick: Bumped `bg-raised` token to `neutral-200` in darkmode. ([`441d8b7`](https://github.com/navikt/aksel/commit/441d8b732cb4820e6fe37ad87200c5b5eb31e5cf))
### @navikt/ds-css
- DatePicker: Updated `date.css` to support `react-day-picker v9`. ([#3525](https://github.com/navikt/aksel/pull/3525))
- Darkside: Changed outline-offset for tabpanel from -4px to -3px. ([`06fecf2`](https://github.com/navikt/aksel/commit/06fecf2af1972a5d06ea452fc5b7431b064e1fc0))
* Darkside: Added 'arrow' back to Tooltip. ([#3589](https://github.com/navikt/aksel/pull/3589))
* DatePicker: Updated `date.css` to support `react-day-picker v9`. ([#3525](https://github.com/navikt/aksel/pull/3525))
- Darkside: Added 'arrow' back to Tooltip. ([#3589](https://github.com/navikt/aksel/pull/3589))
### @navikt/aksel-icons
@@ -196,6 +212,10 @@
## 7.5
### @navikt/aksel
- Chore: Manually bump version to sync npm and github-releases ([`aa7c2d9`](https://github.com/navikt/aksel/commit/aa7c2d9598434d6304432daa20e0a1eeedd03b1b))
### @navikt/ds-react
- Allow RC versions of React 19 through peerDependencies ([#3391](https://github.com/navikt/aksel/pull/3391))
@@ -210,10 +230,6 @@
- Combobox: Fix issue where using arrow keys in list would make the entire page scroll ([#3364](https://github.com/navikt/aksel/pull/3364))
### @navikt/aksel
- Chore: Manually bump version to sync npm and github-releases ([`aa7c2d9`](https://github.com/navikt/aksel/commit/aa7c2d9598434d6304432daa20e0a1eeedd03b1b))
### @navikt/aksel-icons
- Icons: 🎉 Added FileJpeg, FilePng and MedicalThermometer. ([#3332](https://github.com/navikt/aksel/pull/3332))
@@ -360,6 +376,10 @@
## 6.16
### @navikt/aksel
- Aksel-CLI: Bump jscodeshift-add-imports to 1.0.11. ([#3099](https://github.com/navikt/aksel/pull/3099))
### @navikt/ds-react
- Combobox :children_crossing: single select now hides selected value when typing, onBlur clears input ([#3124](https://github.com/navikt/aksel/pull/3124))
@@ -396,10 +416,6 @@
- Modal: Added scroll shadows ([#3083](https://github.com/navikt/aksel/pull/3083))
### @navikt/aksel
- Aksel-CLI: Bump jscodeshift-add-imports to 1.0.11. ([#3099](https://github.com/navikt/aksel/pull/3099))
### @navikt/aksel-icons
- Icons: Updated Clipboard icons. ([#3113](https://github.com/navikt/aksel/pull/3113))
@@ -572,6 +588,10 @@
## 6.6
### @navikt/aksel
- Aksel CLI: Fjernet deprecated komponenter fra css oversikt. ([#2860](https://github.com/navikt/aksel/pull/2860))
### @navikt/ds-react
- Spacer: Er nå `span` (tidligere `div`). ([#2874](https://github.com/navikt/aksel/pull/2874))
@@ -584,10 +604,6 @@
- :sparkles: Ny komponent FormSummary ([#2802](https://github.com/navikt/aksel/pull/2802))
### @navikt/aksel
- Aksel CLI: Fjernet deprecated komponenter fra css oversikt. ([#2860](https://github.com/navikt/aksel/pull/2860))
## 6.5
### @navikt/ds-react
@@ -680,6 +696,10 @@
## 6.0
### @navikt/aksel
- Chat: Fjernet deprecated props `backgroundColor` og `avatarBgColor`. Bruk prop `variant` som erstatning. ([#2623](https://github.com/navikt/aksel/pull/2623))
### @navikt/ds-react
- Chat: Fjernet deprecated props `backgroundColor` og `avatarBgColor`. Bruk prop `variant` som erstatning. ([#2623](https://github.com/navikt/aksel/pull/2623))
@@ -702,16 +722,16 @@
* SSR: ds-react og aksel-icons støtter nå `use client` og kan brukes i nextjs app-router uten lokal re-eksportering. ([#2623](https://github.com/navikt/aksel/pull/2623))
### @navikt/ds-tailwind
- Tokens: La til nytt brekkpunkt `2xl` for `1440px`. Alle primitives er oppdatert for å reflektere oppdateringen. Brukere av Tailwind vil måtte sjekke at overskriving av `screen: "2xl"` ikke brekker app. ([#2623](https://github.com/navikt/aksel/pull/2623))
### @navikt/ds-tokens
- Tokens: La til nytt brekkpunkt `2xl` for `1440px`. Alle primitives er oppdatert for å reflektere oppdateringen. Brukere av Tailwind vil måtte sjekke at overskriving av `screen: "2xl"` ikke brekker app. ([#2623](https://github.com/navikt/aksel/pull/2623))
- Tokens: Fjernet token `--a-z-index-modal` da den ikke lengre blir konsumert i systemet. ([#2623](https://github.com/navikt/aksel/pull/2623))
### @navikt/ds-tailwind
- Tokens: La til nytt brekkpunkt `2xl` for `1440px`. Alle primitives er oppdatert for å reflektere oppdateringen. Brukere av Tailwind vil måtte sjekke at overskriving av `screen: "2xl"` ikke brekker app. ([#2623](https://github.com/navikt/aksel/pull/2623))
### @navikt/ds-css
- Tokens: La til nytt brekkpunkt `2xl` for `1440px`. Alle primitives er oppdatert for å reflektere oppdateringen. Brukere av Tailwind vil måtte sjekke at overskriving av `screen: "2xl"` ikke brekker app. ([#2623](https://github.com/navikt/aksel/pull/2623))
@@ -724,20 +744,16 @@
- Textarea: Fjernet div med klassen navds-textarea\_\_wrapper ([#2623](https://github.com/navikt/aksel/pull/2623))
### @navikt/aksel
- Chat: Fjernet deprecated props `backgroundColor` og `avatarBgColor`. Bruk prop `variant` som erstatning. ([#2623](https://github.com/navikt/aksel/pull/2623))
### @navikt/aksel-stylelint
- Textarea: Fjernet div med klassen navds-textarea\_\_wrapper ([#2623](https://github.com/navikt/aksel/pull/2623))
### @navikt/aksel-icons
- ESM: ds-react og aksel-icons støtter nå native ESM 🎉 ([#2623](https://github.com/navikt/aksel/pull/2623))
* SSR: ds-react og aksel-icons støtter nå `use client` og kan brukes i nextjs app-router uten lokal re-eksportering. ([#2623](https://github.com/navikt/aksel/pull/2623))
### @navikt/aksel-stylelint
- Textarea: Fjernet div med klassen navds-textarea\_\_wrapper ([#2623](https://github.com/navikt/aksel/pull/2623))
## 5.18
### @navikt/ds-react
@@ -860,14 +876,14 @@
- ExpansionCard: Divider mellom header og innhold ([#2566](https://github.com/navikt/aksel/pull/2566))
### @navikt/aksel-stylelint
- Stylelint: Støtter nå stylelint v16 ([#2591](https://github.com/navikt/aksel/pull/2591))
### @navikt/aksel-icons
- Ikoner: Oppdatert ikonpakke med diverse bugdfixes og oppdateringer av stroke ([#2538](https://github.com/navikt/aksel/pull/2538))
### @navikt/aksel-stylelint
- Stylelint: Støtter nå stylelint v16 ([#2591](https://github.com/navikt/aksel/pull/2591))
## 5.11
### @navikt/ds-react
@@ -1411,16 +1427,16 @@
* Fikset klassenavn brukt for popover i Datepicker og Monthpicker ([PR](https://github.com/navikt/aksel/pull/2041))
### @navikt/ds-tokens
- Shadow-tokens er oppdatert til mer tydeligere varianter ([PR](https://github.com/navikt/aksel/pull/2041))
### @navikt/ds-tailwind
- Shadow-tokens er oppdatert ([PR](https://github.com/navikt/aksel/pull/2041))
- Oppdatert text-subtle og icon-subtle tokens til 700-skala (tidligere 600). ([PR](https://github.com/navikt/aksel/pull/2036))
### @navikt/ds-tokens
- Shadow-tokens er oppdatert til mer tydeligere varianter ([PR](https://github.com/navikt/aksel/pull/2041))
### @navikt/ds-css
- :lipstick: Chat: fjernet border, satt avatar svg til 24x24px, byttet om "subtle" og "neutral" ([#2077](https://github.com/navikt/aksel/pull/2077))
@@ -1475,16 +1491,16 @@
- Accordion: La til `indent`-prop ([PR](https://github.com/navikt/aksel/pull/2027))
### @navikt/ds-tailwind
- :tada: Fargetokens for datavisualisering. ([PR](https://github.com/navikt/aksel/pull/2032))
### @navikt/ds-tokens
- :tada: Fargetokens for datavisualisering. ([PR](https://github.com/navikt/aksel/pull/2032))
- Oppdatert text-subtle og icon-subtle tokens til 700-skala (tidligere 600). ([PR](https://github.com/navikt/aksel/pull/2036))
### @navikt/ds-tailwind
- :tada: Fargetokens for datavisualisering. ([PR](https://github.com/navikt/aksel/pull/2032))
### @navikt/ds-css
- Readmore: setter nå eksplisitt color for å ikke arve text-subtle fra parent. ([PR](https://github.com/navikt/aksel/pull/2049))
@@ -1495,16 +1511,22 @@
- Alle description-felter på fieldsets har nå `text-subtle` som farge. ([PR](https://github.com/navikt/aksel/pull/2036))
### @navikt/aksel-stylelint
- Deprecated klassenavn `navds-chips--icon-left` ([PR](https://github.com/navikt/aksel/pull/2035))
### @navikt/aksel-icons
- Nye ikoner `ChevronRightLast` og `ChevronLeftLast` ([PR](https://github.com/navikt/aksel/pull/2054))
### @navikt/aksel-stylelint
- Deprecated klassenavn `navds-chips--icon-left` ([PR](https://github.com/navikt/aksel/pull/2035))
## 4.0
### @navikt/aksel
- Codemod for migrering av Datepicker/Monthpicker ut av Beta. `npx @navikt/aksel codemod v4-date` ([PR](https://github.com/navikt/aksel/pull/2026))
- Codemods for migrering fra `@navikt/ds-react-internal` til `@navikt/ds-react` [Guide](https://aksel.nav.no/grunnleggende/kode/migrering#h3b8538e1981d) ([PR](https://github.com/navikt/aksel/pull/2026))
### @navikt/ds-react
- Datepicker og Monthpicker er ute av beta. [Guide](https://aksel.nav.no/grunnleggende/kode/migrering#h4ef68ae743b0) ([PR](https://github.com/navikt/aksel/pull/2026))
@@ -1521,12 +1543,6 @@
- Styling for flyttede komponenter finnes nå på CDN [Guide](https://aksel.nav.no/grunnleggende/kode/css-import)
### @navikt/aksel
- Codemod for migrering av Datepicker/Monthpicker ut av Beta. `npx @navikt/aksel codemod v4-date` ([PR](https://github.com/navikt/aksel/pull/2026))
- Codemods for migrering fra `@navikt/ds-react-internal` til `@navikt/ds-react` [Guide](https://aksel.nav.no/grunnleggende/kode/migrering#h3b8538e1981d) ([PR](https://github.com/navikt/aksel/pull/2026))
## 3.4
### @navikt/ds-react
@@ -1609,6 +1625,10 @@
## 2.9
### @navikt/aksel
- :truck: Flyttet Codemods fra `@navikt/ds-codemods` -> `@navikt/aksel`. `@navikt/ds-codemods` regnes nå som deprecated ([PR](https://github.com/navikt/aksel/pull/1952))
### @navikt/ds-react
- ExpansionCard: Støtter nå `aria-labelledby` i tillegg til `aria-label` ([PR](https://github.com/navikt/aksel/pull/1944))
@@ -1617,10 +1637,6 @@
- CSS nå tilgjengelig som separate filer: Kan lastest fra CDN, minified-versjoner tilgjengelig ([PR](https://github.com/navikt/aksel/pull/1941))
### @navikt/aksel
- :truck: Flyttet Codemods fra `@navikt/ds-codemods` -> `@navikt/aksel`. `@navikt/ds-codemods` regnes nå som deprecated ([PR](https://github.com/navikt/aksel/pull/1952))
### @navikt/aksel-icons
- Oppdatert Statusikoner til å være tydeligere og mer konsistente. ([PR](https://github.com/navikt/aksel/pull/1959))
@@ -1709,14 +1725,14 @@
- List: Refaktorert nestede lister
### @navikt/ds-tailwind
- Breakpoint-tokens er lagt til. Overskriver native tailwind-breakpoints ([PR](https://github.com/navikt/aksel/pull/1832))
### @navikt/ds-tokens
- Breakpoint-tokens lagt til ([PR](https://github.com/navikt/aksel/pull/1832))
### @navikt/ds-tailwind
- Breakpoint-tokens er lagt til. Overskriver native tailwind-breakpoints ([PR](https://github.com/navikt/aksel/pull/1832))
## 2.4
### @navikt/ds-react
@@ -1809,11 +1825,11 @@
* Fonter blir bruk i all typografi blir nå lastet fra CDN
### @navikt/ds-tailwind
### @navikt/ds-tokens
- Alle token er oppdatert til nytt format. ([Guide](https://aksel.nav.no/grunnleggende/kode/migrering#h76f47744d112))
### @navikt/ds-tokens
### @navikt/ds-tailwind
- Alle token er oppdatert til nytt format. ([Guide](https://aksel.nav.no/grunnleggende/kode/migrering#h76f47744d112))
+5 -5
View File
@@ -15,10 +15,10 @@
"playroom"
],
"dependencies": {
"@navikt/aksel-icons": "^7.14.0",
"@navikt/ds-css": "^7.14.0",
"@navikt/ds-react": "^7.14.0",
"@navikt/ds-tailwind": "^7.14.0",
"@navikt/ds-tokens": "^7.14.0"
"@navikt/aksel-icons": "^7.15.0",
"@navikt/ds-css": "^7.15.0",
"@navikt/ds-react": "^7.15.0",
"@navikt/ds-tailwind": "^7.15.0",
"@navikt/ds-tokens": "^7.15.0"
}
}
+17 -17
View File
@@ -3675,7 +3675,7 @@ __metadata:
languageName: node
linkType: hard
"@navikt/aksel-icons@npm:^7.14.0, @navikt/aksel-icons@workspace:@navikt/aksel-icons":
"@navikt/aksel-icons@npm:^7.15.0, @navikt/aksel-icons@workspace:@navikt/aksel-icons":
version: 0.0.0-use.local
resolution: "@navikt/aksel-icons@workspace:@navikt/aksel-icons"
dependencies:
@@ -3706,8 +3706,8 @@ __metadata:
version: 0.0.0-use.local
resolution: "@navikt/aksel-stylelint@workspace:@navikt/aksel-stylelint"
dependencies:
"@navikt/ds-css": "npm:^7.14.0"
"@navikt/ds-tokens": "npm:^7.14.0"
"@navikt/ds-css": "npm:^7.15.0"
"@navikt/ds-tokens": "npm:^7.15.0"
concurrently: "npm:9.0.1"
postcss-selector-parser: "npm:^6.0.13"
postcss-value-parser: "npm:^4.2.0"
@@ -3722,7 +3722,7 @@ __metadata:
version: 0.0.0-use.local
resolution: "@navikt/aksel@workspace:@navikt/aksel"
dependencies:
"@navikt/ds-css": "npm:^7.14.0"
"@navikt/ds-css": "npm:^7.15.0"
axios: "npm:1.7.4"
chalk: "npm:4.1.0"
clipboardy: "npm:^2.3.0"
@@ -3743,11 +3743,11 @@ __metadata:
languageName: unknown
linkType: soft
"@navikt/ds-css@npm:*, @navikt/ds-css@npm:^7.14.0, @navikt/ds-css@workspace:@navikt/core/css":
"@navikt/ds-css@npm:*, @navikt/ds-css@npm:^7.15.0, @navikt/ds-css@workspace:@navikt/core/css":
version: 0.0.0-use.local
resolution: "@navikt/ds-css@workspace:@navikt/core/css"
dependencies:
"@navikt/ds-tokens": "npm:^7.14.0"
"@navikt/ds-tokens": "npm:^7.15.0"
"@types/clean-css": "npm:4.2.11"
autoprefixer: "npm:^10.4.20"
browserslist: "npm:^4.24.2"
@@ -3767,14 +3767,14 @@ __metadata:
languageName: unknown
linkType: soft
"@navikt/ds-react@npm:*, @navikt/ds-react@npm:^7.14.0, @navikt/ds-react@workspace:@navikt/core/react":
"@navikt/ds-react@npm:*, @navikt/ds-react@npm:^7.15.0, @navikt/ds-react@workspace:@navikt/core/react":
version: 0.0.0-use.local
resolution: "@navikt/ds-react@workspace:@navikt/core/react"
dependencies:
"@floating-ui/react": "npm:0.25.4"
"@floating-ui/react-dom": "npm:^2.0.9"
"@navikt/aksel-icons": "npm:^7.14.0"
"@navikt/ds-tokens": "npm:^7.14.0"
"@navikt/aksel-icons": "npm:^7.15.0"
"@navikt/ds-tokens": "npm:^7.15.0"
"@testing-library/dom": "npm:10.4.0"
"@testing-library/jest-dom": "npm:^6.6.3"
"@testing-library/react": "npm:^16.1.0"
@@ -3805,11 +3805,11 @@ __metadata:
languageName: unknown
linkType: soft
"@navikt/ds-tailwind@npm:^7.14.0, @navikt/ds-tailwind@workspace:@navikt/core/tailwind":
"@navikt/ds-tailwind@npm:^7.15.0, @navikt/ds-tailwind@workspace:@navikt/core/tailwind":
version: 0.0.0-use.local
resolution: "@navikt/ds-tailwind@workspace:@navikt/core/tailwind"
dependencies:
"@navikt/ds-tokens": "npm:^7.14.0"
"@navikt/ds-tokens": "npm:^7.15.0"
color: "npm:4.2.3"
lodash: "npm:^4.17.21"
tailwindcss: "npm:^3.3.3"
@@ -3819,7 +3819,7 @@ __metadata:
languageName: unknown
linkType: soft
"@navikt/ds-tokens@npm:^7.14.0, @navikt/ds-tokens@workspace:@navikt/core/tokens":
"@navikt/ds-tokens@npm:^7.15.0, @navikt/ds-tokens@workspace:@navikt/core/tokens":
version: 0.0.0-use.local
resolution: "@navikt/ds-tokens@workspace:@navikt/core/tokens"
dependencies:
@@ -7621,11 +7621,11 @@ __metadata:
version: 0.0.0-use.local
resolution: "aksel.nav.no@workspace:aksel.nav.no"
dependencies:
"@navikt/aksel-icons": "npm:^7.14.0"
"@navikt/ds-css": "npm:^7.14.0"
"@navikt/ds-react": "npm:^7.14.0"
"@navikt/ds-tailwind": "npm:^7.14.0"
"@navikt/ds-tokens": "npm:^7.14.0"
"@navikt/aksel-icons": "npm:^7.15.0"
"@navikt/ds-css": "npm:^7.15.0"
"@navikt/ds-react": "npm:^7.15.0"
"@navikt/ds-tailwind": "npm:^7.15.0"
"@navikt/ds-tokens": "npm:^7.15.0"
languageName: unknown
linkType: soft