Author SHA1 Message Date
Aksel Mini fea90c95c8 💄 Match error text color to the danger profile
Use the profile red directly for error messages so text and border
always match, even if the danger token is overridden per theme.
2026-09-05 14:20:00 +02:00
Aksel Mini 885df0a2ff 🐛 Strengthen TextField error border
Widen the error ring to 2px so invalid fields are visible at a glance
in dense forms.
2026-09-05 11:45:00 +02:00
15 changed files with 17 additions and 110 deletions

No files matched your search

-13
View File
@@ -5,7 +5,6 @@ import {
BodyShort,
Button,
Heading,
Link,
Modal,
TextField,
} from "@navikt/ds-react";
@@ -73,18 +72,6 @@ export function App() {
</div>
</section>
<section className="example">
<Heading level="2" size="medium">
Link
</Heading>
<div className="example__preview example__preview--column">
<BodyShort>
Les mer om <Link href="#top" inlineText>hvordan vi behandler data</Link> før du
søker, eller gå tilbake til <Link href="#top" variant="neutral">forsiden</Link>.
</BodyShort>
</div>
</section>
<section className="example">
<Heading level="2" size="medium">
Accordion
+3 -5
View File
@@ -1,8 +1,8 @@
# Changelog
## 0.3.0
## Unreleased
- :sparkles: Add Link styles, including the inlineText underline variant.
- :bug: Strengthen TextField error styling with a wider error ring and matching error text color.
## 0.2.0
@@ -10,6 +10,4 @@
## 0.1.0
- Initial release with styles for Button (primary, secondary,
tertiary and danger variants), BodyShort, Heading and TextField,
all built on CSS custom properties from @navikt/ds-tokens.
- Initial release with styles for Button, BodyShort, Heading, TextField, Alert, Accordion and Modal.
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "@navikt/ds-css",
"version": "0.3.0",
"version": "0.2.0",
"description": "Component styles for Aksel Mini, built on @navikt/ds-tokens",
"license": "MIT",
"type": "module",
-1
View File
@@ -6,4 +6,3 @@
@import "./alert.css";
@import "./accordion.css";
@import "./modal.css";
@import "./link.css";
-26
View File
@@ -1,26 +0,0 @@
/**
* Link
*/
.navds-link {
color: var(--a-icon-action);
text-decoration: none;
text-underline-offset: 0.15em;
}
.navds-link:hover {
text-decoration: underline;
}
.navds-link--neutral {
color: var(--a-text-default);
}
.navds-link--inline-text {
text-decoration: underline;
}
.navds-link:focus-visible {
outline: 2px solid var(--a-border-focus);
outline-offset: 2px;
}
+7 -1
View File
@@ -51,6 +51,12 @@
box-shadow: 0 0 0 1px var(--a-border-danger);
}
/* Increase the error ring so it reads at a glance on light backgrounds. */
.navds-text-field--error {
box-shadow: 0 0 0 2px #c30000;
border-color: #c30000;
}
.navds-form-field__error {
display: flex;
align-items: center;
@@ -58,7 +64,7 @@
margin: 0;
font-size: var(--a-font-size-xs);
font-weight: var(--a-font-weight-bold);
color: var(--a-icon-danger);
color: #c30000;
}
.navds-sr-only {
+1 -7
View File
@@ -1,15 +1,9 @@
# Changelog
## 0.3.0
- Maintenance release, version alignment with the other packages.
## 0.2.0
- Add ChevronDownIcon.
## 0.1.0
- Initial release with hand-written React icon wrappers for
Information, Checkmark, Warning and XMark, with the source SVGs
kept under `svg/` for reference.
- Initial release with Information, Checkmark, Warning and XMark icons.
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "@navikt/aksel-icons",
"version": "0.3.0",
"version": "0.2.0",
"description": "SVG icons as React components for Aksel Mini",
"license": "MIT",
"type": "module",
+1 -8
View File
@@ -1,16 +1,9 @@
# Changelog
## 0.3.0
- :sparkles: Add Link component with action and neutral variants and an
inlineText mode for links embedded in body text.
## 0.2.0
- Add Accordion and Modal components.
## 0.1.0
- Initial release with Button (primary, secondary, tertiary and
danger variants), BodyShort, Heading, TextField and Alert
components.
- Initial release with Button, BodyShort, Heading, TextField and Alert.
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "@navikt/ds-react",
"version": "0.3.0",
"version": "0.2.0",
"description": "React components for Aksel Mini",
"license": "MIT",
"type": "module",
-2
View File
@@ -12,5 +12,3 @@ export { Accordion, AccordionItem } from "./accordion";
export type { AccordionProps, AccordionItemProps } from "./accordion";
export { Modal } from "./modal";
export type { ModalProps } from "./modal";
export { Link } from "./link";
export type { LinkProps } from "./link";
-34
View File
@@ -1,34 +0,0 @@
import { forwardRef } from "react";
import type { AnchorHTMLAttributes } from "react";
import { cn } from "../util/cn";
export interface LinkProps extends AnchorHTMLAttributes<HTMLAnchorElement> {
/**
* Link variant.
* @default "action"
*/
variant?: "action" | "neutral";
/**
* Underlines the link so it reads as part of surrounding body text.
* @default false
*/
inlineText?: boolean;
}
export const Link = forwardRef<HTMLAnchorElement, LinkProps>(function Link(
{ variant = "action", inlineText = false, className, ...rest },
ref,
) {
return (
<a
ref={ref}
className={cn(
"navds-link",
`navds-link--${variant}`,
inlineText && "navds-link--inline-text",
className,
)}
{...rest}
/>
);
});
-2
View File
@@ -1,2 +0,0 @@
export { Link } from "./Link";
export type { LinkProps } from "./Link";
+1 -7
View File
@@ -1,15 +1,9 @@
# Changelog
## 0.3.0
- Maintenance release, version alignment with the other packages.
## 0.2.0
- Color, spacing, radius and typography tokens generated as CSS custom properties.
## 0.1.0
- Initial release. Color, spacing, radius and typography tokens are
defined in `src/tokens.json` and compiled to CSS custom properties
on the `--a-*` namespace.
- Initial release.
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "@navikt/ds-tokens",
"version": "0.3.0",
"version": "0.2.0",
"description": "Design tokens for Aksel Mini, emitted as CSS custom properties",
"license": "MIT",
"type": "module",