mirror of
https://github.com/navikt/aksel.git
synced 2026-11-27 07:04:05 +00:00
Compare commits
8
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
e1d4cd8f49 | ||
|
|
b5620a7fd7 | ||
|
|
0055f3c056 | ||
|
|
359c1cc32f | ||
|
|
98ff7b6732 | ||
|
|
b658ad5898 | ||
|
|
422ff402a5 | ||
|
|
d7f59797e9 |
No files matched your search
@@ -1,5 +0,0 @@
|
||||
---
|
||||
"@navikt/ds-react": patch
|
||||
---
|
||||
|
||||
Popover and other floating components: Dismiss when focus leaves the overlay and its trigger, including inside web components.
|
||||
@@ -1,5 +0,0 @@
|
||||
---
|
||||
"@navikt/ds-react": patch
|
||||
---
|
||||
|
||||
Switch: `<Switch />` elements inside a `<Fieldset />` with `readOnly` now share a single padlock in the group legend instead of displaying one per switch. Each switch retains screen-reader text indicating its read-only state, and standalone switches keep their individual padlocks.
|
||||
@@ -1,5 +1,7 @@
|
||||
# @navikt/aksel-icons
|
||||
|
||||
## 8.23.2
|
||||
|
||||
## 8.23.1
|
||||
|
||||
## 8.23.0
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@navikt/aksel-icons",
|
||||
"version": "8.23.1",
|
||||
"version": "8.23.2",
|
||||
"author": "Aksel | Nav",
|
||||
"homepage": "https://aksel.nav.no/ikoner",
|
||||
"repository": {
|
||||
@@ -96,6 +96,6 @@
|
||||
"tsx": "^4.23.15",
|
||||
"typescript": "6.0.3",
|
||||
"unified": "11.0.5",
|
||||
"vitest": "5.1.0"
|
||||
"vitest": "5.1.1"
|
||||
}
|
||||
}
|
||||
@@ -1,5 +1,7 @@
|
||||
# @navikt/aksel-stylelint
|
||||
|
||||
## 8.23.2
|
||||
|
||||
## 8.23.1
|
||||
|
||||
## 8.23.0
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@navikt/aksel-stylelint",
|
||||
"version": "8.23.1",
|
||||
"version": "8.23.2",
|
||||
"type": "module",
|
||||
"engines": {
|
||||
"node": ">=18.12.0"
|
||||
@@ -43,8 +43,8 @@
|
||||
"dev": "yarn watch:lint"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@navikt/ds-css": "^8.23.1",
|
||||
"@navikt/ds-tokens": "^8.23.1",
|
||||
"@navikt/ds-css": "^8.23.2",
|
||||
"@navikt/ds-tokens": "^8.23.2",
|
||||
"concurrently": "10.0.6",
|
||||
"postcss-selector-parser": "^7.1.7",
|
||||
"postcss-value-parser": "^4.2.0",
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
# @navikt/aksel
|
||||
|
||||
## 8.23.2
|
||||
|
||||
## 8.23.1
|
||||
|
||||
## 8.23.0
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@navikt/aksel",
|
||||
"version": "8.23.1",
|
||||
"version": "8.23.2",
|
||||
"description": "Aksel command line interface. Codemods and other utilities for Aksel users.",
|
||||
"author": "Aksel | Nav designsystem team",
|
||||
"license": "MIT",
|
||||
@@ -56,9 +56,9 @@
|
||||
"@types/is-git-clean": "1.1.2",
|
||||
"@types/jscodeshift": "17.3.0",
|
||||
"@types/lodash": "4.17.25",
|
||||
"rimraf": "6.1.3",
|
||||
"rimraf": "6.1.4",
|
||||
"typescript": "6.0.3",
|
||||
"vitest": "5.1.0"
|
||||
"vitest": "5.1.1"
|
||||
},
|
||||
"sideEffects": false,
|
||||
"engines": {
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
# @navikt/ds-css
|
||||
|
||||
## 8.23.2
|
||||
|
||||
## 8.23.1
|
||||
|
||||
### Patch Changes
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@navikt/ds-css",
|
||||
"version": "8.23.1",
|
||||
"version": "8.23.2",
|
||||
"description": "CSS for Nav Designsystem",
|
||||
"author": "Aksel | Nav designsystem team",
|
||||
"keywords": [
|
||||
@@ -32,7 +32,7 @@
|
||||
"css:get-version": "node config/get-version.js"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@navikt/ds-tokens": "^8.23.1",
|
||||
"@navikt/ds-tokens": "^8.23.2",
|
||||
"browserslist": "^4.28.7",
|
||||
"esbuild": "^0.28.2",
|
||||
"fast-glob": "3.3.3",
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
border-radius: var(--ax-radius-12);
|
||||
border: 1px solid var(--ax-border-neutral-subtleA);
|
||||
box-shadow: var(--ax-shadow-dialog);
|
||||
/* stylelint-disable-next-line csstools/value-no-unknown-custom-properties */
|
||||
/* stylelint-disable-next-line csstools/value-no-unknown-custom-properties -- Set at runtime by Floating UI */
|
||||
transform-origin: var(--__axc-action-menu-content-transform-origin);
|
||||
transition:
|
||||
transform 100ms cubic-bezier(0.25, 0.46, 0.45, 0.94) allow-discrete,
|
||||
@@ -45,7 +45,7 @@
|
||||
padding-block: var(--__axc-action-menu-content-p-block);
|
||||
padding-inline: var(--__axc-action-menu-content-p-inline);
|
||||
overflow: auto;
|
||||
/* stylelint-disable-next-line csstools/value-no-unknown-custom-properties */
|
||||
/* stylelint-disable-next-line csstools/value-no-unknown-custom-properties -- Set at runtime by Floating UI */
|
||||
max-height: var(--__axc-action-menu-content-available-height);
|
||||
}
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/* stylelint-disable csstools/value-no-unknown-custom-properties */
|
||||
/* stylelint-disable no-duplicate-selectors */
|
||||
/* stylelint-disable csstools/value-no-unknown-custom-properties -- --__axc-data-table-nested-depth is set at runtime */
|
||||
/* stylelint-disable no-duplicate-selectors -- Preview stylesheet groups rules by feature section */
|
||||
|
||||
.aksel-data-grid {
|
||||
flex-grow: 1;
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
border-radius: var(--ax-radius-8);
|
||||
border: 1px solid var(--ax-border-neutral-subtleA);
|
||||
box-shadow: var(--ax-shadow-dialog);
|
||||
/* stylelint-disable-next-line csstools/value-no-unknown-custom-properties */
|
||||
/* stylelint-disable-next-line csstools/value-no-unknown-custom-properties -- Set at runtime by Floating UI */
|
||||
transform-origin: var(--__axc-floating-transform-origin);
|
||||
transition: opacity 150ms ease allow-discrete;
|
||||
|
||||
@@ -30,7 +30,7 @@
|
||||
max-width: min(95vw, 640px);
|
||||
animation-duration: 160ms;
|
||||
animation-timing-function: cubic-bezier(0.16, 1, 0.3, 1);
|
||||
/* stylelint-disable-next-line csstools/value-no-unknown-custom-properties */
|
||||
/* stylelint-disable-next-line csstools/value-no-unknown-custom-properties -- Set at runtime by Floating UI */
|
||||
max-height: calc(var(--__axc-floating-available-height) - 4px);
|
||||
}
|
||||
|
||||
|
||||
@@ -92,7 +92,7 @@
|
||||
}
|
||||
|
||||
&[data-nested-dialog-open="true"] {
|
||||
/* stylelint-disable-next-line csstools/value-no-unknown-custom-properties */
|
||||
/* stylelint-disable-next-line csstools/value-no-unknown-custom-properties -- Set at runtime by DialogPopupInternal */
|
||||
transform: translateY(calc(1rem * var(--__axc-nested-level) * -1)) scale(calc(1 - 0.02 * var(--__axc-nested-level)));
|
||||
}
|
||||
|
||||
@@ -109,7 +109,7 @@
|
||||
left: 0;
|
||||
right: 0;
|
||||
bottom: 0;
|
||||
/* stylelint-disable-next-line declaration-block-no-redundant-longhand-properties */
|
||||
/* stylelint-disable-next-line declaration-block-no-redundant-longhand-properties -- Explicit sides keep top: auto override clear */
|
||||
top: auto;
|
||||
margin-block: 0;
|
||||
}
|
||||
@@ -162,7 +162,7 @@
|
||||
height: auto;
|
||||
|
||||
&[data-nested-dialog-open="true"] {
|
||||
/* stylelint-disable-next-line csstools/value-no-unknown-custom-properties */
|
||||
/* stylelint-disable-next-line csstools/value-no-unknown-custom-properties -- Set at runtime by DialogPopupInternal */
|
||||
transform: translateY(calc(1rem * var(--__axc-nested-level) * -1)) scale(calc(1 - 0.02 * var(--__axc-nested-level)));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -130,9 +130,9 @@
|
||||
************************************************/
|
||||
|
||||
.aksel-combo-box__popup {
|
||||
/* stylelint-disable-next-line csstools/value-no-unknown-custom-properties */
|
||||
/* stylelint-disable-next-line csstools/value-no-unknown-custom-properties -- Set at runtime by Floating UI */
|
||||
min-width: var(--__axc-floating-anchor-width);
|
||||
/* stylelint-disable-next-line csstools/value-no-unknown-custom-properties */
|
||||
/* stylelint-disable-next-line csstools/value-no-unknown-custom-properties -- Set at runtime by Floating UI */
|
||||
max-height: calc(var(--__axc-floating-available-height) - 4px);
|
||||
background-color: var(--ax-bg-raised);
|
||||
padding: 1px;
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
/* stylelint-disable aksel/design-token-exists */
|
||||
.aksel-combobox__wrapper {
|
||||
--__axc-combobox-icon-size: 1.5rem;
|
||||
--__axc-combobox-wrapper-inner-padding: var(--ax-space-8);
|
||||
@@ -242,7 +241,7 @@
|
||||
/* dropdown & non selectable dropdown items */
|
||||
|
||||
.aksel-combobox__list {
|
||||
/* stylelint-disable-next-line csstools/value-no-unknown-custom-properties */
|
||||
/* stylelint-disable-next-line csstools/value-no-unknown-custom-properties -- Set at runtime by Floating UI */
|
||||
width: var(--__axc-floating-anchor-width);
|
||||
overflow: clip;
|
||||
border: 1px solid var(--ax-border-neutral-subtleA);
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
.aksel-textarea__input {
|
||||
/* stylelint-disable-next-line csstools/value-no-unknown-custom-properties */
|
||||
/* stylelint-disable-next-line csstools/value-no-unknown-custom-properties -- Set at runtime by TextareaAutoSize */
|
||||
height: var(--__axc-textarea-height);
|
||||
appearance: none;
|
||||
padding: var(--ax-space-8);
|
||||
|
||||
@@ -26,7 +26,7 @@
|
||||
display: inline;
|
||||
|
||||
& > svg {
|
||||
/* stylelint-disable-next-line plugin/declaration-block-no-ignored-properties */
|
||||
/* stylelint-disable-next-line plugin/declaration-block-no-ignored-properties -- <svg> is a replaced element so vertical margin applies with display: inline */
|
||||
margin: 0.1em 0.1em -0.1em;
|
||||
transform: translateY(0.05em);
|
||||
display: inline;
|
||||
|
||||
@@ -45,7 +45,7 @@
|
||||
top: 0;
|
||||
bottom: 0;
|
||||
right: 0;
|
||||
/* stylelint-disable-next-line declaration-block-no-redundant-longhand-properties */
|
||||
/* stylelint-disable-next-line declaration-block-no-redundant-longhand-properties -- Preserves dialog-polyfill longhand side declarations */
|
||||
left: 0;
|
||||
}
|
||||
|
||||
@@ -110,7 +110,7 @@
|
||||
top: 0;
|
||||
bottom: 0;
|
||||
right: 0;
|
||||
/* stylelint-disable-next-line declaration-block-no-redundant-longhand-properties */
|
||||
/* stylelint-disable-next-line declaration-block-no-redundant-longhand-properties -- Preserves dialog-polyfill longhand side declarations */
|
||||
left: 0;
|
||||
}
|
||||
|
||||
|
||||
@@ -1,5 +1,19 @@
|
||||
# @navikt/ds-react
|
||||
|
||||
## 8.23.2
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Popover and other floating components: Dismiss when focus leaves the overlay and its trigger, including inside web components. ([#5559](https://github.com/navikt/aksel/pull/5559))
|
||||
|
||||
- Select: Prevent opening by clicking label when `readOnly` on Mac+Chrome ([#5595](https://github.com/navikt/aksel/pull/5595))
|
||||
|
||||
- Switch: `<Switch />` elements inside a `<Fieldset />` with `readOnly` now share a single padlock in the group legend instead of displaying one per switch. Each switch retains screen-reader text indicating its read-only state, and standalone switches keep their individual padlocks. ([#5583](https://github.com/navikt/aksel/pull/5583))
|
||||
|
||||
- Updated dependencies []:
|
||||
- @navikt/ds-tokens@8.23.2
|
||||
- @navikt/aksel-icons@8.23.2
|
||||
|
||||
## 8.23.1
|
||||
|
||||
### Patch Changes
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@navikt/ds-react",
|
||||
"version": "8.23.1",
|
||||
"version": "8.23.2",
|
||||
"description": "React components from the Norwegian Labour and Welfare Administration.",
|
||||
"author": "Aksel, a team part of the Norwegian Labour and Welfare Administration.",
|
||||
"license": "MIT",
|
||||
@@ -788,8 +788,8 @@
|
||||
"dependencies": {
|
||||
"@floating-ui/react": "0.27.20",
|
||||
"@floating-ui/react-dom": "^2.1.9",
|
||||
"@navikt/aksel-icons": "^8.23.1",
|
||||
"@navikt/ds-tokens": "^8.23.1",
|
||||
"@navikt/aksel-icons": "^8.23.2",
|
||||
"@navikt/ds-tokens": "^8.23.2",
|
||||
"date-fns": "^4.0.0",
|
||||
"react-day-picker": "10.0.2"
|
||||
},
|
||||
@@ -809,12 +809,12 @@
|
||||
"jsdom": "30.1.3",
|
||||
"react": "19.3.1",
|
||||
"react-dom": "19.3.1",
|
||||
"rimraf": "6.1.3",
|
||||
"rimraf": "6.1.4",
|
||||
"swr": "^2.4.2",
|
||||
"tsc-alias": "1.9.10",
|
||||
"tsx": "^4.23.15",
|
||||
"typescript": "6.0.3",
|
||||
"vitest": "5.1.0"
|
||||
"vitest": "5.1.1"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"@types/react": "^17.0.30 || ^18 || ^19",
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import type { Meta } from "@storybook/react-vite";
|
||||
import React, { useRef, useState } from "react";
|
||||
import { expect, userEvent, within } from "storybook/test";
|
||||
import { expect, userEvent, waitFor, within } from "storybook/test";
|
||||
import { ComboboxSingle } from "./Combobox";
|
||||
import { ComboboxFilter } from "./filter/ComboboxFilter";
|
||||
import { ComboboxList } from "./list/ComboboxList";
|
||||
@@ -102,6 +102,60 @@ FocusWithRef.play = async ({ canvasElement }) => {
|
||||
await expect(combobox).toHaveFocus();
|
||||
};
|
||||
|
||||
export const CloseBehavior = () => (
|
||||
<>
|
||||
<button type="button">Knapp før</button>
|
||||
<BaseCombobox />
|
||||
<button type="button">Knapp etter</button>
|
||||
</>
|
||||
);
|
||||
CloseBehavior.play = async ({ canvasElement }) => {
|
||||
const canvas = within(canvasElement);
|
||||
const trigger = await canvas.findByRole("combobox", { name: "Velg land" });
|
||||
const buttonAfter = canvas.getByRole("button", { name: "Knapp etter" });
|
||||
|
||||
// Focus trigger when closing is triggered by pressing Esc,
|
||||
// or by other actions in the combobox (like selecting an option).
|
||||
// Don't override focus when combobox closes for other reasons,
|
||||
// like tabbing or clicking outside.
|
||||
|
||||
await userEvent.click(trigger);
|
||||
const filter = canvas.getByRole("combobox", { name: "Filtrer" });
|
||||
expect(filter).toHaveFocus();
|
||||
await userEvent.type(filter, "Norge");
|
||||
expect(filter).toHaveValue("Norge");
|
||||
await userEvent.keyboard("{Escape}");
|
||||
expect(filter).toHaveValue("");
|
||||
expect(filter).toHaveFocus();
|
||||
expect(trigger).toHaveAttribute("aria-expanded", "true");
|
||||
await userEvent.keyboard("{Escape}");
|
||||
expect(trigger).toHaveFocus();
|
||||
expect(trigger).toHaveAttribute("aria-expanded", "false");
|
||||
|
||||
await userEvent.click(trigger);
|
||||
await userEvent.click(canvas.getByRole("option", { name: "Finland" }));
|
||||
expect(trigger).toHaveFocus();
|
||||
expect(trigger).toHaveAttribute("aria-expanded", "false");
|
||||
|
||||
await userEvent.click(trigger);
|
||||
expect(canvas.getByRole("combobox", { name: "Filtrer" })).toHaveFocus();
|
||||
await userEvent.tab({ shift: true });
|
||||
expect(trigger).toHaveFocus();
|
||||
expect(trigger).toHaveAttribute("aria-expanded", "false");
|
||||
|
||||
await userEvent.click(trigger);
|
||||
expect(canvas.getByRole("combobox", { name: "Filtrer" })).toHaveFocus();
|
||||
await userEvent.tab();
|
||||
await waitFor(() => expect(buttonAfter).toHaveFocus());
|
||||
expect(trigger).toHaveAttribute("aria-expanded", "false");
|
||||
|
||||
await userEvent.click(trigger);
|
||||
expect(canvas.getByRole("combobox", { name: "Filtrer" })).toHaveFocus();
|
||||
await userEvent.click(buttonAfter);
|
||||
expect(buttonAfter).toHaveFocus();
|
||||
expect(trigger).toHaveAttribute("aria-expanded", "false");
|
||||
};
|
||||
|
||||
let optionMemoTestRenderCnt = 0;
|
||||
const optionMemoTestRenderFn = (
|
||||
optOrGroup: (typeof groupedOptions)[number],
|
||||
|
||||
@@ -19,7 +19,11 @@ function ComboboxOverlay({ children, mobileHeader }: ComboboxOverlayProps) {
|
||||
|
||||
if (isMobile) {
|
||||
return (
|
||||
<ComboboxModal open={rootContext.open} onOpenChange={rootContext.setOpen}>
|
||||
<ComboboxModal
|
||||
open={rootContext.open}
|
||||
onOpenChange={rootContext.setOpen}
|
||||
triggerRef={rootContext.triggerRef}
|
||||
>
|
||||
{mobileHeader}
|
||||
{children}
|
||||
</ComboboxModal>
|
||||
@@ -50,6 +54,11 @@ function ComboboxOverlay({ children, mobileHeader }: ComboboxOverlayProps) {
|
||||
}
|
||||
rootContext.setOpen(false);
|
||||
}}
|
||||
onEscapeKeyDown={(event) => {
|
||||
if (!event.defaultPrevented) {
|
||||
rootContext.triggerRef.current?.focus();
|
||||
}
|
||||
}}
|
||||
enabled={rootContext.open}
|
||||
>
|
||||
<Floating.Content
|
||||
@@ -70,6 +79,7 @@ type ComboboxModalProps = {
|
||||
children: React.ReactNode;
|
||||
open: boolean;
|
||||
onOpenChange: (open: boolean) => void;
|
||||
triggerRef: React.RefObject<HTMLElement | null>;
|
||||
};
|
||||
|
||||
function subscribeToResize(callback: () => void) {
|
||||
@@ -81,7 +91,12 @@ function getVisualViewportHeight() {
|
||||
return visualViewport?.height; // Takes into account virtual keyboard etc.
|
||||
}
|
||||
|
||||
function ComboboxModal({ children, open, onOpenChange }: ComboboxModalProps) {
|
||||
function ComboboxModal({
|
||||
children,
|
||||
open,
|
||||
onOpenChange,
|
||||
triggerRef,
|
||||
}: ComboboxModalProps) {
|
||||
const visualViewportHeight = useSyncExternalStore(
|
||||
subscribeToResize,
|
||||
getVisualViewportHeight,
|
||||
@@ -125,7 +140,13 @@ function ComboboxModal({ children, open, onOpenChange }: ComboboxModalProps) {
|
||||
|
||||
return (
|
||||
<Dialog size="small" open={open} onOpenChange={onOpenChange}>
|
||||
<Dialog.Popup className="aksel-combo-box__modal" position="fullscreen">
|
||||
<Dialog.Popup
|
||||
className="aksel-combo-box__modal"
|
||||
position="fullscreen"
|
||||
// Manually set what to focus after closing, because FocusBoundary errorously registrers
|
||||
// the filter input as previously focused element since we focus it immediately on open.
|
||||
returnFocusTo={triggerRef}
|
||||
>
|
||||
<div
|
||||
ref={ref}
|
||||
className="aksel-combo-box__modal-inner"
|
||||
|
||||
@@ -127,13 +127,7 @@ export function ComboboxRoot<
|
||||
>
|
||||
<ComboboxRootContextProvider
|
||||
open={open}
|
||||
setOpen={useCallback((newOpen) => {
|
||||
setOpen(newOpen);
|
||||
if (!newOpen) {
|
||||
// queueMicrotask is needed when closing with close button in Dialog
|
||||
queueMicrotask(() => triggerRef.current?.focus());
|
||||
}
|
||||
}, [])}
|
||||
setOpen={setOpen}
|
||||
triggerRef={triggerRef}
|
||||
options={options}
|
||||
value={value}
|
||||
|
||||
@@ -2,7 +2,7 @@ import React, { type SelectHTMLAttributes, forwardRef } from "react";
|
||||
import { ChevronDownIcon } from "@navikt/aksel-icons";
|
||||
import { BodyShort, ErrorMessage, Label } from "../../typography";
|
||||
import { omit } from "../../utils-external";
|
||||
import { cl } from "../../utils/helpers";
|
||||
import { cl, composeEventHandlers } from "../../utils/helpers";
|
||||
import { ReadOnlyIconWithTitle } from "../ReadOnlyIcon";
|
||||
import { type FormFieldProps, useFormField } from "../useFormField";
|
||||
|
||||
@@ -87,6 +87,13 @@ export const Select = forwardRef<HTMLSelectElement, SelectProps>(
|
||||
event.preventDefault();
|
||||
}
|
||||
},
|
||||
onClick: composeEventHandlers(
|
||||
props.onClick,
|
||||
(event: React.MouseEvent<HTMLSelectElement>) => {
|
||||
// Chrome on Mac does not trigger onMouseDown when clicking the label
|
||||
event.preventDefault();
|
||||
},
|
||||
),
|
||||
};
|
||||
|
||||
return (
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
# @navikt/ds-tailwind
|
||||
|
||||
## 8.23.2
|
||||
|
||||
## 8.23.1
|
||||
|
||||
## 8.23.0
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@navikt/ds-tailwind",
|
||||
"version": "8.23.1",
|
||||
"version": "8.23.2",
|
||||
"description": "Tailwind config based on @navikt/ds-tokens",
|
||||
"author": "Aksel | Nav designsystem team",
|
||||
"keywords": [
|
||||
@@ -28,12 +28,12 @@
|
||||
},
|
||||
"homepage": "https://aksel.nav.no/grunnleggende/kode/tailwind/",
|
||||
"devDependencies": {
|
||||
"@navikt/ds-tokens": "^8.23.1",
|
||||
"@navikt/ds-tokens": "^8.23.2",
|
||||
"@types/node": "^24.10.9",
|
||||
"tailwindcss": "^4.3.3",
|
||||
"tsx": "^4.23.15",
|
||||
"typescript": "6.0.3",
|
||||
"vitest": "5.1.0"
|
||||
"vitest": "5.1.1"
|
||||
},
|
||||
"publishConfig": {
|
||||
"access": "public",
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
# @navikt/ds-tokens
|
||||
|
||||
## 8.23.2
|
||||
|
||||
## 8.23.1
|
||||
|
||||
## 8.23.0
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@navikt/ds-tokens",
|
||||
"version": "8.23.1",
|
||||
"version": "8.23.2",
|
||||
"description": "Design-tokens for Nav designsystem",
|
||||
"author": "Aksel | Nav designsystem team",
|
||||
"keywords": [
|
||||
@@ -43,7 +43,7 @@
|
||||
"style-dictionary": "^5.5.5",
|
||||
"tsx": "^4.23.15",
|
||||
"typescript": "6.0.3",
|
||||
"vitest": "5.1.0"
|
||||
"vitest": "5.1.1"
|
||||
},
|
||||
"publishConfig": {
|
||||
"access": "public",
|
||||
|
||||
@@ -1,5 +1,15 @@
|
||||
# Changelog
|
||||
|
||||
## 8.23.2
|
||||
|
||||
### @navikt/ds-react
|
||||
|
||||
- Popover and other floating components: Dismiss when focus leaves the overlay and its trigger, including inside web components. ([#5559](https://github.com/navikt/aksel/pull/5559))
|
||||
|
||||
- Select: Prevent opening by clicking label when `readOnly` on Mac+Chrome ([#5595](https://github.com/navikt/aksel/pull/5595))
|
||||
|
||||
- Switch: `<Switch />` elements inside a `<Fieldset />` with `readOnly` now share a single padlock in the group legend instead of displaying one per switch. Each switch retains screen-reader text indicating its read-only state, and standalone switches keep their individual padlocks. ([#5583](https://github.com/navikt/aksel/pull/5583))
|
||||
|
||||
## 8.23.1
|
||||
|
||||
### @navikt/ds-css
|
||||
|
||||
@@ -11,11 +11,11 @@
|
||||
"sanity:update": "yarn workspace website update:sanity"
|
||||
},
|
||||
"dependencies": {
|
||||
"@navikt/aksel": "^8.23.1",
|
||||
"@navikt/aksel-icons": "^8.23.1",
|
||||
"@navikt/ds-css": "^8.23.1",
|
||||
"@navikt/ds-react": "^8.23.1",
|
||||
"@navikt/ds-tailwind": "^8.23.1",
|
||||
"@navikt/ds-tokens": "^8.23.1"
|
||||
"@navikt/aksel": "^8.23.2",
|
||||
"@navikt/aksel-icons": "^8.23.2",
|
||||
"@navikt/ds-css": "^8.23.2",
|
||||
"@navikt/ds-react": "^8.23.2",
|
||||
"@navikt/ds-tailwind": "^8.23.2",
|
||||
"@navikt/ds-tokens": "^8.23.2"
|
||||
}
|
||||
}
|
||||
@@ -19,18 +19,18 @@
|
||||
"@sanity/client": "7.27.0",
|
||||
"@sanity/code-input": "7.3.16",
|
||||
"@sanity/color-input": "6.1.10",
|
||||
"@sanity/image-url": "2.1.1",
|
||||
"@sanity/image-url": "2.2.0",
|
||||
"@sanity/locale-nb-no": "1.1.39",
|
||||
"@sanity/preview-url-secret": "4.1.5",
|
||||
"@sanity/table": "3.1.21",
|
||||
"@sanity/vision": "6.17.0",
|
||||
"@sanity/vision": "6.24.0",
|
||||
"date-fns": "^4.0.0",
|
||||
"lodash": "4.18.1",
|
||||
"react": "19.3.1",
|
||||
"react-dom": "19.3.1",
|
||||
"react-rx": "^5.1.1",
|
||||
"react-rx": "7.1.0",
|
||||
"rxjs": "^7.8.2",
|
||||
"sanity": "6.17.0",
|
||||
"sanity": "6.24.0",
|
||||
"sanity-plugin-iframe-pane": "5.0.43",
|
||||
"sanity-plugin-media": "6.6.3",
|
||||
"sanity-plugin-references": "1.2.0",
|
||||
@@ -41,12 +41,12 @@
|
||||
"@sanity/blueprints": "0.34.1",
|
||||
"@sanity/export": "7.1.1",
|
||||
"@sanity/functions": "1.11.0",
|
||||
"@sanity/schema": "6.17.0",
|
||||
"@sanity/schema": "6.24.0",
|
||||
"@types/lodash": "4.17.25",
|
||||
"@types/react": "19.2.14",
|
||||
"tsx": "^4.23.15",
|
||||
"typescript": "6.0.3",
|
||||
"vitest": "5.1.0"
|
||||
"vitest": "5.1.1"
|
||||
},
|
||||
"exports": {
|
||||
"./schema": {
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
position: relative;
|
||||
max-width: 1920px;
|
||||
|
||||
/* stylelint-disable-next-line csstools/value-no-unknown-custom-properties */
|
||||
/* stylelint-disable-next-line csstools/value-no-unknown-custom-properties -- Defined in globals.css */
|
||||
min-height: calc(100vh - var(--website-header-sticky-height));
|
||||
}
|
||||
|
||||
|
||||
+1
-1
@@ -72,7 +72,7 @@
|
||||
}
|
||||
|
||||
.iconPageSidebar {
|
||||
/* stylelint-disable-next-line csstools/value-no-unknown-custom-properties */
|
||||
/* stylelint-disable-next-line csstools/value-no-unknown-custom-properties -- Defined in globals.css */
|
||||
top: calc(var(--website-header-sticky-height) + var(--ax-space-24));
|
||||
position: sticky;
|
||||
height: min-content;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/* stylelint-disable csstools/value-no-unknown-custom-properties */
|
||||
/* stylelint-disable csstools/value-no-unknown-custom-properties -- Uses --website-header-sticky-height from globals.css */
|
||||
.navList {
|
||||
position: relative;
|
||||
flex-shrink: 0;
|
||||
@@ -20,7 +20,7 @@
|
||||
max-height: calc(100vh - var(--website-header-sticky-height));
|
||||
overscroll-behavior: contain;
|
||||
|
||||
/* stylelint-disable-next-line media-feature-range-notation */
|
||||
/* stylelint-disable-next-line media-feature-range-notation -- Website supports modern media query range syntax */
|
||||
@media (width < 1024px) {
|
||||
display: none;
|
||||
}
|
||||
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
/* stylelint-disable csstools/value-no-unknown-custom-properties */
|
||||
/* stylelint-disable csstools/value-no-unknown-custom-properties -- Uses --website-header-sticky-height from globals.css */
|
||||
.monthSpacer {
|
||||
height: var(--ax-space-12);
|
||||
}
|
||||
|
||||
+1
-1
@@ -17,7 +17,7 @@
|
||||
|
||||
.showMoreCollapsed {
|
||||
margin-bottom: 0;
|
||||
mask-image: linear-gradient(rgba(0 0 0/1), rgba(0 0 0/1) 30%, rgba(0 0 0/ 0) calc(100% - var(--ax-space-16)));
|
||||
mask-image: linear-gradient(rgb(0 0 0 / 1), rgb(0 0 0 / 1) 30%, rgb(0 0 0 / 0) calc(100% - var(--ax-space-16)));
|
||||
}
|
||||
|
||||
.showMoreExpanded {
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/* stylelint-disable csstools/value-no-unknown-custom-properties */
|
||||
/* stylelint-disable csstools/value-no-unknown-custom-properties -- Uses --website-hero-selector-x/y set inline by Hero provider */
|
||||
.godPraksisHero {
|
||||
border-radius: var(--ax-radius-12);
|
||||
border: 1px solid var(--ax-border-brand-blue-subtleA);
|
||||
|
||||
@@ -21,7 +21,6 @@
|
||||
pointer-events: none;
|
||||
|
||||
& svg {
|
||||
/* stylelint-disable-next-line csstools/value-no-unknown-custom-properties */
|
||||
color: var(--cube-stroke-color-light);
|
||||
|
||||
& path {
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/* stylelint-disable csstools/value-no-unknown-custom-properties */
|
||||
/* stylelint-disable csstools/value-no-unknown-custom-properties -- Uses --website-font-mono from globals.css and runtime --line */
|
||||
|
||||
.codeBlock {
|
||||
background: var(--ax-bg-default);
|
||||
|
||||
@@ -35,12 +35,12 @@
|
||||
background-color: var(--image-bg, transparent);
|
||||
|
||||
&[data-position="left"] {
|
||||
/* stylelint-disable-next-line csstools/value-no-unknown-custom-properties */
|
||||
/* stylelint-disable-next-line csstools/value-no-unknown-custom-properties -- Set at runtime by CompareImages provider */
|
||||
clip-path: inset(0 var(--image-clip-1) 0 0);
|
||||
}
|
||||
|
||||
&[data-position="right"] {
|
||||
/* stylelint-disable-next-line csstools/value-no-unknown-custom-properties */
|
||||
/* stylelint-disable-next-line csstools/value-no-unknown-custom-properties -- Set at runtime by CompareImages provider */
|
||||
clip-path: inset(0 0 0 var(--image-clip-2));
|
||||
}
|
||||
}
|
||||
@@ -63,7 +63,7 @@
|
||||
transition: opacity 0.2s ease-in-out;
|
||||
transform: translate3d(-50%, 0, 0);
|
||||
|
||||
/* stylelint-disable-next-line csstools/value-no-unknown-custom-properties */
|
||||
/* stylelint-disable-next-line csstools/value-no-unknown-custom-properties -- Set at runtime by CompareImages provider */
|
||||
left: var(--image-clip-2);
|
||||
|
||||
&[data-dragging="true"] {
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/* stylelint-disable media-feature-range-notation */
|
||||
/* stylelint-disable media-feature-range-notation -- Website supports modern media query range syntax */
|
||||
.searchForm {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/* stylelint-disable csstools/value-no-unknown-custom-properties */
|
||||
/* stylelint-disable csstools/value-no-unknown-custom-properties -- Uses website custom properties defined in globals.css */
|
||||
.header {
|
||||
background-color: var(--ax-bg-default);
|
||||
top: 0;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/* stylelint-disable csstools/value-no-unknown-custom-properties */
|
||||
/* stylelint-disable csstools/value-no-unknown-custom-properties -- --website-svg-size is set inline by ImageAsSvg */
|
||||
.imageAsModule {
|
||||
width: var(--website-svg-size);
|
||||
height: var(--website-svg-size);
|
||||
|
||||
@@ -25,10 +25,10 @@
|
||||
.kodeExampleIframe {
|
||||
display: block;
|
||||
width: 100%;
|
||||
/* stylelint-disable-next-line csstools/value-no-unknown-custom-properties */
|
||||
/* stylelint-disable-next-line csstools/value-no-unknown-custom-properties -- Defined in globals.css */
|
||||
max-height: calc(100vh - var(--website-header-sticky-height) - 20px);
|
||||
background-color: var(--ax-bg-default);
|
||||
/* stylelint-disable-next-line csstools/value-no-unknown-custom-properties */
|
||||
/* stylelint-disable-next-line csstools/value-no-unknown-custom-properties -- Defined in globals.css */
|
||||
scroll-margin-block-start: calc(var(--website-header-sticky-height) + 3rem);
|
||||
|
||||
/* Prevent the iframe from covering up the resize handle in Safari */
|
||||
|
||||
@@ -47,6 +47,6 @@
|
||||
}
|
||||
|
||||
.propsSeksjonCode {
|
||||
/* stylelint-disable-next-line csstools/value-no-unknown-custom-properties */
|
||||
/* stylelint-disable-next-line csstools/value-no-unknown-custom-properties -- Defined in globals.css */
|
||||
font-family: var(--website-font-mono);
|
||||
}
|
||||
@@ -1,4 +1,4 @@
|
||||
/* stylelint-disable csstools/value-no-unknown-custom-properties */
|
||||
/* stylelint-disable csstools/value-no-unknown-custom-properties -- Uses website brand tokens defined in globals.css */
|
||||
.promoTag {
|
||||
border-radius: var(--ax-radius-12);
|
||||
width: fit-content;
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
display: none;
|
||||
min-width: 12.5rem;
|
||||
height: fit-content;
|
||||
/* stylelint-disable-next-line csstools/value-no-unknown-custom-properties */
|
||||
/* stylelint-disable-next-line csstools/value-no-unknown-custom-properties -- Defined in globals.css */
|
||||
top: calc(var(--website-header-sticky-height) + var(--ax-space-24));
|
||||
|
||||
&[data-variant="subtle"] {
|
||||
@@ -50,13 +50,11 @@
|
||||
|
||||
.tocShadowTop {
|
||||
top: 0;
|
||||
/* stylelint-disable-next-line csstools/value-no-unknown-custom-properties */
|
||||
background: linear-gradient(180deg, var(--aksel-toc-fade-shadow-color), transparent);
|
||||
}
|
||||
|
||||
.tocShadowBottom {
|
||||
bottom: 0;
|
||||
/* stylelint-disable-next-line csstools/value-no-unknown-custom-properties */
|
||||
background: linear-gradient(0deg, var(--aksel-toc-fade-shadow-color), transparent);
|
||||
}
|
||||
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
border-radius: var(--ax-radius-2);
|
||||
background-color: var(--ax-bg-neutral-softA);
|
||||
padding: var(--ax-space-2) var(--ax-space-4);
|
||||
/* stylelint-disable-next-line csstools/value-no-unknown-custom-properties */
|
||||
/* stylelint-disable-next-line csstools/value-no-unknown-custom-properties -- Defined in globals.css */
|
||||
font-family: var(--website-font-mono);
|
||||
display: inline;
|
||||
box-shadow: inset 0 0 0 1px var(--ax-border-neutral-subtleA);
|
||||
@@ -22,6 +22,7 @@
|
||||
.typoList {
|
||||
max-width: 600px;
|
||||
|
||||
/* stylelint-disable-next-line aksel/no-class-override -- Adjacent sibling selector adjusts .typoList margin, not Aksel classes */
|
||||
:global(.aksel-body-long.aksel-typo--spacing) + & {
|
||||
margin-top: -1rem;
|
||||
}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/* stylelint-disable aksel/design-token-no-global-override */
|
||||
/* stylelint-disable aksel/design-token-no-global-override -- Defines custom aksel.nav.no brand theme overrides */
|
||||
|
||||
@import "./layer-order.css";
|
||||
@import "../tailwind-snapshot.css" layer(tw-snapshot);
|
||||
|
||||
@@ -36,7 +36,7 @@
|
||||
"@navikt/oasis": "4.2.2",
|
||||
"@portabletext/react": "^8.0.1",
|
||||
"@sanity/client": "7.27.0",
|
||||
"@sanity/image-url": "2.1.1",
|
||||
"@sanity/image-url": "2.2.0",
|
||||
"@slack/web-api": "^8.0.0",
|
||||
"aksel-sanity-studio": "workspace:*",
|
||||
"codesandbox-import-utils": "^2.2.3",
|
||||
@@ -75,9 +75,9 @@
|
||||
"@babel/traverse": "^7.27.4",
|
||||
"@google-cloud/bigquery": "^9.6.1",
|
||||
"@playwright/test": "1.61.1",
|
||||
"@portabletext/block-tools": "^6.0.7",
|
||||
"@portabletext/block-tools": "^6.0.8",
|
||||
"@portabletext/markdown": "^2.5.1",
|
||||
"@sanity/schema": "6.17.0",
|
||||
"@sanity/schema": "6.24.0",
|
||||
"@types/jscodeshift": "17.3.0",
|
||||
"@types/jsdom": "^27.0.0",
|
||||
"@types/lodash": "4.17.25",
|
||||
@@ -98,6 +98,6 @@
|
||||
"sitemapper": "^4.1.6",
|
||||
"tsx": "^4.23.15",
|
||||
"typescript": "6.0.3",
|
||||
"vitest": "5.1.0"
|
||||
"vitest": "5.1.1"
|
||||
}
|
||||
}
|
||||
@@ -108,7 +108,7 @@ object {
|
||||
display: block;
|
||||
|
||||
/* 2 */
|
||||
/* stylelint-disable-next-line plugin/declaration-block-no-ignored-properties */
|
||||
/* stylelint-disable-next-line plugin/declaration-block-no-ignored-properties -- Kept from Tailwind Preflight snapshot for replaced elements */
|
||||
vertical-align: middle;
|
||||
}
|
||||
|
||||
|
||||
@@ -11,9 +11,9 @@
|
||||
"preview": "vite preview"
|
||||
},
|
||||
"dependencies": {
|
||||
"@navikt/aksel-icons": "^8.23.1",
|
||||
"@navikt/ds-css": "^8.23.1",
|
||||
"@navikt/ds-react": "^8.23.1",
|
||||
"@navikt/aksel-icons": "^8.23.2",
|
||||
"@navikt/ds-css": "^8.23.2",
|
||||
"@navikt/ds-react": "^8.23.2",
|
||||
"fuse.js": "7.4.2",
|
||||
"react": "19.3.1",
|
||||
"react-dom": "19.3.1"
|
||||
|
||||
@@ -19,9 +19,9 @@
|
||||
"devDependencies": {
|
||||
"@modelcontextprotocol/inspector": "^2.11.0",
|
||||
"@modelcontextprotocol/sdk": "^1.32.0",
|
||||
"@navikt/aksel": "^8.23.1",
|
||||
"@navikt/aksel-icons": "^8.23.1",
|
||||
"@navikt/ds-tokens": "^8.23.1",
|
||||
"@navikt/aksel": "^8.23.2",
|
||||
"@navikt/aksel-icons": "^8.23.2",
|
||||
"@navikt/ds-tokens": "^8.23.2",
|
||||
"@sanity/client": "7.27.0",
|
||||
"@types/express": "^5.0.3",
|
||||
"@types/node": "^24.10.9",
|
||||
@@ -31,7 +31,7 @@
|
||||
"prom-client": "^15.1.3",
|
||||
"tsdown": "^0.23.0",
|
||||
"typescript": "6.0.3",
|
||||
"vitest": "5.1.0",
|
||||
"vitest": "5.1.1",
|
||||
"zod": "^4.6.5"
|
||||
}
|
||||
}
|
||||
@@ -20,9 +20,9 @@
|
||||
"typescript": "6.0.3"
|
||||
},
|
||||
"dependencies": {
|
||||
"@navikt/aksel-icons": "^8.23.1",
|
||||
"@navikt/ds-css": "^8.23.1",
|
||||
"@navikt/ds-react": "^8.23.1",
|
||||
"@navikt/aksel-icons": "^8.23.2",
|
||||
"@navikt/ds-css": "^8.23.2",
|
||||
"@navikt/ds-react": "^8.23.2",
|
||||
"react": "19.3.1"
|
||||
}
|
||||
}
|
||||
+5
-5
@@ -11,7 +11,7 @@
|
||||
"dev": "yarn workspace aksel.nav.no dev",
|
||||
"lint": "yarn lint:oxlint && yarn lint:css && yarn lint:versions",
|
||||
"lint:oxlint": "yarn oxlint --deny-warnings",
|
||||
"lint:css": "yarn stylelint '@navikt/**/*.css'",
|
||||
"lint:css": "yarn stylelint '**/*.css' '**/.storybook/**/*.css'",
|
||||
"lint:versions": "node tooling/scripts/in-sync-versions.mts",
|
||||
"storybook": "WITH_WEBSITE=true storybook dev -p 6006",
|
||||
"storybook:aksel": "WITH_WEBSITE=true storybook dev -c aksel.nav.no/website/.storybook -p 6007",
|
||||
@@ -87,9 +87,9 @@
|
||||
"@types/node": "^24.10.9",
|
||||
"@types/react": "19.2.14",
|
||||
"@types/react-dom": "19.2.3",
|
||||
"@vitest/browser": "5.1.0",
|
||||
"@vitest/browser-playwright": "5.1.0",
|
||||
"@vitest/coverage-v8": "5.1.0",
|
||||
"@vitest/browser": "5.1.1",
|
||||
"@vitest/browser-playwright": "5.1.1",
|
||||
"@vitest/coverage-v8": "5.1.1",
|
||||
"chromatic": "18.0.1",
|
||||
"cross-env": "^10.1.0",
|
||||
"eslint": "^9.39.2",
|
||||
@@ -114,7 +114,7 @@
|
||||
"typescript-language-server": "6.0.3",
|
||||
"vite": "^8.3.5",
|
||||
"vite-plugin-turbosnap": "^1.0.3",
|
||||
"vitest": "5.1.0"
|
||||
"vitest": "5.1.1"
|
||||
},
|
||||
"packageManager": "yarn@4.18.0"
|
||||
}
|
||||
@@ -14,6 +14,10 @@ const tokensPath = resolve(
|
||||
);
|
||||
|
||||
export default {
|
||||
reportNeedlessDisables: true,
|
||||
reportInvalidScopeDisables: true,
|
||||
reportDescriptionlessDisables: true,
|
||||
reportUnscopedDisables: true,
|
||||
overrides: [
|
||||
{
|
||||
files: ["@navikt/core/css/**/*"],
|
||||
@@ -44,7 +48,6 @@ export default {
|
||||
"stylelint-declaration-block-no-ignored-properties",
|
||||
],
|
||||
rules: {
|
||||
"declaration-property-value-no-unknown": true,
|
||||
"plugin/declaration-block-no-ignored-properties": true,
|
||||
"no-descending-specificity": null,
|
||||
"selector-class-pattern": null,
|
||||
@@ -52,7 +55,6 @@ export default {
|
||||
"keyframes-name-pattern": null,
|
||||
"function-url-quotes": null,
|
||||
"property-no-vendor-prefix": null,
|
||||
"comment-empty-line-before": null,
|
||||
"alpha-value-notation": "number",
|
||||
"media-feature-range-notation": "prefix",
|
||||
"import-notation": "string",
|
||||
@@ -81,10 +83,10 @@ export default {
|
||||
},
|
||||
ignoreFiles: [
|
||||
"**/dist/**",
|
||||
"**/@navikt/codemod/**",
|
||||
"**/.next/**",
|
||||
"**/storybook-static/**",
|
||||
"**/@navikt/aksel/**",
|
||||
"**/examples/**",
|
||||
"plugin.js",
|
||||
"**/tailwind4.css",
|
||||
],
|
||||
};
|
||||
@@ -14,7 +14,7 @@
|
||||
"flat": "6.0.1",
|
||||
"mlly": "1.8.2",
|
||||
"tar": "^7.5.22",
|
||||
"vitest": "5.1.0"
|
||||
"vitest": "5.1.1"
|
||||
},
|
||||
"scripts": {
|
||||
"run:analyze-npm-action": "yarn clean && concurrently \"yarn pack-remote && tsx ./src/runners/analyze-package.ts --remote --out trunk-results.json\" \"yarn pack-local && tsx ./src/runners/analyze-package.ts --out branch-results.json\"",
|
||||
|
||||
Reference in new issue
Block a user