@arbeidstilsynet/design-react 0.5.0 → 0.7.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,5 +1,30 @@
1
+ import { HTMLAttributes, ReactNode } from 'react';
1
2
  import { DefaultProps } from '../../types';
2
- import { HTMLAttributes } from 'react';
3
- export interface HeaderProps extends DefaultProps<HTMLDivElement>, HTMLAttributes<HTMLDivElement> {
3
+ export interface HeaderProps extends DefaultProps<HTMLElement>, HTMLAttributes<HTMLElement> {
4
+ /**
5
+ * Navigation links to be displayed in the navbar (desktop) and menu (mobile).
6
+ *
7
+ * On desktop viewports, links appear in the `Header.Navbar` component.
8
+ * On mobile viewports, links are automatically shown in the `Header.Menu` dropdown
9
+ * above any custom menu controls.
10
+ *
11
+ * NB: for proper SPA navigation, pass an array of link components (e.g. `<NextLink>`) from the routing library, instead of Link from the design system.
12
+ *
13
+ * @example
14
+ * ```tsx
15
+ * <Header links={[
16
+ * <Link key="home" href="/">Hjem</Link>,
17
+ * <Link key="about" href="/about">Om oss</Link>,
18
+ * ]}>
19
+ * ...
20
+ * </Header>
21
+ * ```
22
+ */
23
+ links?: ReactNode[];
24
+ /**
25
+ * Compound component children.
26
+ * Typically includes `Header.Title`, `Header.Navbar`, and `Header.Menu`.
27
+ */
28
+ children?: ReactNode;
4
29
  }
5
- export declare function Header({ ref, className, children, ...rest }: Readonly<HeaderProps>): import("react/jsx-runtime").JSX.Element;
30
+ export declare function Header({ ref, className, children, links, ...rest }: Readonly<HeaderProps>): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,8 @@
1
+ import { ReactNode, RefObject } from 'react';
2
+ export interface HeaderContextValue {
3
+ /** Navigation links to be shown in navbar (desktop) and menu (mobile) */
4
+ links: ReactNode[];
5
+ /** Reference to the header element for positioning calculations */
6
+ headerRef: RefObject<HTMLElement | null>;
7
+ }
8
+ export declare const HeaderContext: import('react').Context<HeaderContextValue>;
@@ -0,0 +1,24 @@
1
+ import { HTMLAttributes, ReactNode } from 'react';
2
+ import { DefaultProps } from '../../types';
3
+ export interface HeaderIllustrationProps extends DefaultProps<HTMLDivElement>, HTMLAttributes<HTMLDivElement> {
4
+ /**
5
+ * Illustration content, typically an image or icon.
6
+ * This element is hidden on mobile viewports.
7
+ */
8
+ children: ReactNode;
9
+ }
10
+ /**
11
+ * Decorative illustration shown next to the logo in the header.
12
+ * **Hidden on mobile viewports** to save space.
13
+ *
14
+ * Use for decorative branding images that are not essential for navigation.
15
+ * For the main logo that should always be visible, use `Header.Logo` instead.
16
+ *
17
+ * @example
18
+ * ```tsx
19
+ * <Header.Illustration>
20
+ * <img src="/illustration.svg" alt="" />
21
+ * </Header.Illustration>
22
+ * ```
23
+ */
24
+ export declare function HeaderIllustration({ className, children, ...rest }: Readonly<HeaderIllustrationProps>): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,25 @@
1
+ import { HTMLAttributes, ReactNode } from 'react';
2
+ import { DefaultProps } from '../../types';
3
+ export interface HeaderLogoProps extends DefaultProps<HTMLDivElement>, HTMLAttributes<HTMLDivElement> {
4
+ /**
5
+ * Logo content, typically a link wrapping the app logo/name.
6
+ * This element is always visible on all viewport sizes.
7
+ */
8
+ children: ReactNode;
9
+ }
10
+ /**
11
+ * Main logo/app name in the header. Always visible on all viewport sizes.
12
+ *
13
+ * Typically contains a `Link` component wrapping a logo image or app name.
14
+ * Unlike `Header.Illustration`, this element remains visible on mobile.
15
+ *
16
+ * @example
17
+ * ```tsx
18
+ * <Header.Logo>
19
+ * <Link href="/">
20
+ * <img src="/logo.svg" alt="App Name" />
21
+ * </Link>
22
+ * </Header.Logo>
23
+ * ```
24
+ */
25
+ export declare function HeaderLogo({ className, children, ...rest }: Readonly<HeaderLogoProps>): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,57 @@
1
+ import { HTMLAttributes, ReactNode } from 'react';
2
+ import { DefaultProps } from '../../types';
3
+ export interface HeaderMenuProps extends DefaultProps<HTMLDivElement>, HTMLAttributes<HTMLDivElement> {
4
+ /**
5
+ * Content for the menu button on desktop.
6
+ * Typically a user name or menu title.
7
+ */
8
+ triggerContent: ReactNode;
9
+ /**
10
+ * Text for the menu button on mobile.
11
+ * @default "Meny".
12
+ */
13
+ mobileMenuText?: string;
14
+ /**
15
+ * Text for the close button in mobile dropdown view.
16
+ * @default "Lukk"
17
+ */
18
+ closeButtonText?: ReactNode;
19
+ /**
20
+ * Custom menu controls to display in the dropdown.
21
+ * On mobile viewport these appear between navigation links and the close button in the menu.
22
+ * A `<Divider />` is automatically added between navigation links and custom controls.
23
+ *
24
+ * @example
25
+ * ```tsx
26
+ * <Header.Menu triggerContent="Ola Nordmann">
27
+ * <ProfileMenuItem />
28
+ * <Divider />
29
+ * <Switch label="Mørk modus" position="end" />
30
+ * </Header.Menu>
31
+ * ```
32
+ */
33
+ children?: ReactNode;
34
+ }
35
+ /**
36
+ * Dropdown menu for the header with user controls and navigation (on mobile).
37
+ *
38
+ * On **desktop**: Shows a dropdown trigger with `triggerContent` that opens a menu
39
+ * containing only the custom children (menu controls).
40
+ *
41
+ * On **mobile**: Shows a hamburger menu button that opens a full-width dropdown
42
+ * containing both navigation links (from parent `Header`) and custom children.
43
+ *
44
+ * The component is responsible for the dropdown behavior and styling.
45
+ * You control what appears in the menu through the `children` prop.
46
+ *
47
+ * @example
48
+ * ```tsx
49
+ * <Header.Menu triggerContent="Ola Nordmann" closeButtonText="Lukk">
50
+ * <ProfileLink />
51
+ * <InboxLink />
52
+ * <Divider />
53
+ * <Switch label="Mørk modus" position="end" />
54
+ * </Header.Menu>
55
+ * ```
56
+ */
57
+ export declare function HeaderMenu({ className, children, triggerContent, mobileMenuText, closeButtonText, ...rest }: Readonly<HeaderMenuProps>): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,17 @@
1
+ import { HTMLAttributes } from 'react';
2
+ import { DefaultProps } from '../../types';
3
+ export interface HeaderMenuRowProps extends DefaultProps<HTMLElement>, HTMLAttributes<HTMLElement> {
4
+ padded?: boolean;
5
+ }
6
+ /**
7
+ * Menu row that serves as a wrapper around a link in the header menu.
8
+ * Supports an icon, badge and custom styling.
9
+ */
10
+ export declare function HeaderMenuRow({ className, padded, ...rest }: Readonly<HeaderMenuRowProps>): import("react/jsx-runtime").JSX.Element;
11
+ export interface HeaderMenuIconProps extends DefaultProps<HTMLDivElement>, HTMLAttributes<HTMLDivElement> {
12
+ }
13
+ export declare function HeaderMenuIcon({ className, ...rest }: Readonly<HeaderMenuIconProps>): import("react/jsx-runtime").JSX.Element;
14
+ export interface HeaderMenuBadgeProps extends DefaultProps<HTMLDivElement>, HTMLAttributes<HTMLDivElement> {
15
+ color?: "info" | "warning" | "success" | "danger";
16
+ }
17
+ export declare function HeaderMenuBadge({ className, color, ...rest }: Readonly<HeaderMenuBadgeProps>): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,21 @@
1
+ import { HTMLAttributes } from 'react';
2
+ import { DefaultProps } from '../../types';
3
+ export interface HeaderNavbarProps extends DefaultProps<HTMLElement>, HTMLAttributes<HTMLElement> {
4
+ }
5
+ /**
6
+ * Navigation bar showing links in the header.
7
+ * **Hidden on mobile viewports** - links are moved to `Header.Menu` instead.
8
+ *
9
+ * Automatically receives navigation links from the parent `Header` component
10
+ * via context. The links are styled as header navigation links.
11
+ *
12
+ * @example
13
+ * ```tsx
14
+ * <Header links={[<Link href="/">Home</Link>, <Link href="/about">About</Link>]}>
15
+ * <Header.Title>...</Header.Title>
16
+ * <Header.Navbar />
17
+ * <Header.Menu>...</Header.Menu>
18
+ * </Header>
19
+ * ```
20
+ */
21
+ export declare function HeaderNavbar({ className, ...rest }: Readonly<HeaderNavbarProps>): import("react/jsx-runtime").JSX.Element;
@@ -1,12 +1,32 @@
1
1
  import { HTMLAttributes, ReactNode } from 'react';
2
2
  import { DefaultProps } from '../../types';
3
- import { LinkItem } from './headerTitleLinks';
4
3
  export interface HeaderTitleProps extends DefaultProps<HTMLDivElement>, HTMLAttributes<HTMLDivElement> {
5
- logo?: ReactNode;
6
- appName: string;
7
- userName: string;
8
- links?: LinkItem[];
9
- controls?: ReactNode[];
10
- children?: ReactNode;
4
+ /**
5
+ * Title content, typically containing `Header.Illustration` and `Header.Logo`.
6
+ *
7
+ * @example
8
+ * ```tsx
9
+ * <Header.Title>
10
+ * <Header.Illustration>{illustrationImage}</Header.Illustration>
11
+ * <Header.Logo><Link href="/">{logoImage}</Link></Header.Logo>
12
+ * </Header.Title>
13
+ * ```
14
+ */
15
+ children: ReactNode;
11
16
  }
12
- export declare function HeaderTitle({ className, logo, appName, userName, links, controls, children, ...rest }: Readonly<HeaderTitleProps>): import("react/jsx-runtime").JSX.Element;
17
+ /**
18
+ * Container for the header's branding area containing illustration and logo.
19
+ * Typically placed as the first child of `Header`.
20
+ *
21
+ * Use `Header.Illustration` for decorative images (hidden on mobile) and
22
+ * `Header.Logo` for the main logo/app name (always visible).
23
+ *
24
+ * @example
25
+ * ```tsx
26
+ * <Header.Title>
27
+ * <Header.Illustration>{illustrationImage}</Header.Illustration>
28
+ * <Header.Logo><Link href="/">{logoImage}</Link></Header.Logo>
29
+ * </Header.Title>
30
+ * ```
31
+ */
32
+ export declare function HeaderTitle({ className, children, ...rest }: Readonly<HeaderTitleProps>): import("react/jsx-runtime").JSX.Element;
@@ -1,35 +1,104 @@
1
1
  import { Header as HeaderParent } from './header';
2
+ import { HeaderIllustration } from './headerIllustration';
3
+ import { HeaderLogo } from './headerLogo';
4
+ import { HeaderMenu } from './headerMenu';
5
+ import { HeaderMenuBadge, HeaderMenuIcon, HeaderMenuRow } from './headerMenuRow';
6
+ import { HeaderNavbar } from './headerNavbar';
2
7
  import { HeaderTitle } from './headerTitle';
3
8
  /**
4
- * Header component for the design system.
5
- * It includes the primary title section along with optional search and links sections.
9
+ * Compound component for building responsive application headers.
6
10
  *
7
- * The primary Title section (`Header.Title`) displays the system name, user information, and navigation links.
8
- * You can pass in a list of user controls (like a theme switcher) to be displayed in a dropdown.
11
+ * Header provides a flexible structure with automatic responsive behavior:
12
+ * - **Desktop**: Shows title area, navigation bar, and dropdown menu
13
+ * - **Mobile**: Shows logo only, with navigation links moved to hamburger menu
9
14
  *
10
- * For the navigation links, you can either provide an array of link items via the `links` prop,
11
- * or you can customize the links by passing your own components as children to `Header.Title`.
12
- * Make sure that the children you provide are valid React elements and accept className props for proper styling.
15
+ * ## Subcomponents
16
+ *
17
+ * - `Header.Title` - Container for branding area (illustration + logo)
18
+ * - `Header.Illustration` - Decorative image (hidden on mobile)
19
+ * - `Header.Logo` - Main logo/app name (always visible)
20
+ * - `Header.Navbar` - Navigation links (hidden on mobile, shown in desktop)
21
+ * - `Header.Menu` - Dropdown menu with custom controls
22
+ * - `Header.MenuRow` - Wrapper for individual menu items in the dropdown
23
+ * - `Header.MenuIcon` - Icon for menu items
24
+ * - `Header.MenuBadge` - Badge for menu items
25
+ *
26
+ * ## Links prop
27
+ *
28
+ * For proper SPA navigation, pass an array of link components (e.g. `<NextLink>`) from the routing library, instead of Link from the design system.
29
+ * These will automatically receive classnames through Slot for styling.
30
+ *
31
+ * ## Usage
13
32
  *
14
- * Example usage for Next.js Link components:
15
33
  * ```tsx
16
- * import Link from "next/link";
17
- *
18
- * <Header>
19
- * <Header.Title
20
- * appName="My Application"
21
- * userName="John Doe"
22
- * >
23
- * <Link href="/">Home</Link>
24
- * <Link href="/about">About</Link>
25
- * </Header.Title>
34
+ * const links = [
35
+ * <Link key="home" href="/">Hjem</Link>,
36
+ * <Link key="about" href="/about">Om oss</Link>,
37
+ * ];
38
+ *
39
+ * <Header links={links}>
40
+ * <Link href="/" aria-label="Link til hjem">
41
+ * <Header.Title>
42
+ * <Header.Illustration>
43
+ * <img src="/illustration.svg" alt="App Name" />
44
+ * </Header.Illustration>
45
+ * <Header.Logo style={{ fontFamily: "Literata" }}>
46
+ * Fagsystem
47
+ * </Header.Logo>
48
+ * </Header.Title>
49
+ * </Link>
50
+ * <Header.Navbar />
51
+ * <Header.Menu triggerContent="Ola Nordmann" closeButtonText="Lukk">
52
+ * <Header.MenuRow>
53
+ * <Link href="#">
54
+ * <Header.MenuIcon>
55
+ * <PersonCircleIcon aria-label="Profil ikon" />
56
+ * </Header.MenuIcon>
57
+ * <span>Profil</span>
58
+ * </Link>
59
+ * </Header.MenuRow>
60
+ * <Header.MenuRow>
61
+ * <Link href="#">
62
+ * <Header.MenuIcon>
63
+ * <InboxIcon aria-label="Innboks ikon" />
64
+ * </Header.MenuIcon>
65
+ * <span>Innboks</span>
66
+ * <Header.MenuBadge color="warning">19</Header.MenuBadge>
67
+ * </Link>
68
+ * </Header.MenuRow>
69
+ * <Header.MenuRow>
70
+ * <Link href="#">
71
+ * <Header.MenuIcon>
72
+ * <TasklistIcon aria-label="Gjøremål ikon" />
73
+ * </Header.MenuIcon>
74
+ * <span>Gjøremål</span>
75
+ * <Header.MenuBadge color="info">19</Header.MenuBadge>
76
+ * </Link>
77
+ * </Header.MenuRow>
78
+ * <Divider />
79
+ * <div style={{ padding: "var(--ds-size-2) var(--ds-size-4)" }}>
80
+ * <Switch label="Mørk modus" position="end" />
81
+ * </div>
82
+ * </Header.Menu>
26
83
  * </Header>
27
84
  * ```
28
85
  */
29
86
  declare const Header: typeof HeaderParent & {
30
87
  Title: typeof HeaderTitle;
88
+ Illustration: typeof HeaderIllustration;
89
+ Logo: typeof HeaderLogo;
90
+ Navbar: typeof HeaderNavbar;
91
+ Menu: typeof HeaderMenu;
92
+ MenuRow: typeof HeaderMenuRow;
93
+ MenuIcon: typeof HeaderMenuIcon;
94
+ MenuBadge: typeof HeaderMenuBadge;
31
95
  };
32
96
  export type { HeaderProps } from './header';
97
+ export { HeaderContext } from './headerContext';
98
+ export type { HeaderIllustrationProps } from './headerIllustration';
99
+ export type { HeaderLogoProps } from './headerLogo';
100
+ export type { HeaderMenuProps } from './headerMenu';
101
+ export type { HeaderMenuBadgeProps, HeaderMenuIconProps, HeaderMenuRowProps, } from './headerMenuRow';
102
+ export type { HeaderNavbarProps } from './headerNavbar';
33
103
  export type { HeaderTitleProps } from './headerTitle';
34
- export { Header, HeaderTitle };
35
- export { HeaderDefaultLogo } from './headerDefaultLogo';
104
+ export { Header, HeaderIllustration, HeaderLogo, HeaderMenu, HeaderMenuBadge, HeaderMenuIcon, HeaderMenuRow, HeaderNavbar, HeaderTitle, };
@@ -0,0 +1,4 @@
1
+ export declare function HeaderStoriesIllustration(): import("react/jsx-runtime").JSX.Element;
2
+ export declare namespace HeaderStoriesIllustration {
3
+ var displayName: string;
4
+ }
@@ -0,0 +1,4 @@
1
+ export declare function HeaderStoriesTitle(): import("react/jsx-runtime").JSX.Element;
2
+ export declare namespace HeaderStoriesTitle {
3
+ var displayName: string;
4
+ }
@@ -1,2 +1,2 @@
1
1
  export type * from '@digdir/designsystemet-react';
2
- export { Alert, Avatar, Badge, BadgePosition, Breadcrumbs, BreadcrumbsItem, BreadcrumbsLink, BreadcrumbsList, Button, Card, CardBlock, Checkbox, Chip, ChipButton, ChipCheckbox, ChipRadio, ChipRemovable, Combobox, ComboboxEmpty, ComboboxOption, Details, DetailsContent, DetailsSummary, Dialog, DialogBlock, DialogTrigger, DialogTriggerContext, Divider, Dropdown, DropdownButton, DropdownHeading, DropdownItem, DropdownList, DropdownTrigger, DropdownTriggerContext, ErrorSummary, ErrorSummaryHeading, ErrorSummaryItem, ErrorSummaryLink, ErrorSummaryList, EXPERIMENTAL_Suggestion, EXPERIMENTAL_SuggestionClear, EXPERIMENTAL_SuggestionEmpty, EXPERIMENTAL_SuggestionInput, EXPERIMENTAL_SuggestionList, EXPERIMENTAL_SuggestionOption, Field, FieldAffix, FieldAffixes, FieldCounter, FieldDescription, Fieldset, FieldsetDescription, FieldsetLegend, Heading, Input, Label, Link, List, ListItem, ListOrdered, ListUnordered, omit, Pagination, PaginationButton, PaginationItem, PaginationList, Paragraph, Popover, PopoverTrigger, PopoverTriggerContext, Radio, RovingFocusItem, RovingFocusRoot, Search, SearchButton, SearchClear, SearchInput, Select, SelectOptgroup, SelectOption, Skeleton, SkipLink, Spinner, Switch, Table, TableBody, TableCell, TableFoot, TableHead, TableHeaderCell, TableRow, Tabs, TabsList, TabsPanel, TabsTab, Tag, Textarea, Textfield, ToggleGroup, ToggleGroupItem, Tooltip, useCheckboxGroup, useDebounceCallback, useIsomorphicLayoutEffect, useMediaQuery, usePagination, useRadioGroup, useSynchronizedAnimation, ValidationMessage, } from '@digdir/designsystemet-react';
2
+ export { Alert, Avatar, Badge, BadgePosition, Breadcrumbs, BreadcrumbsItem, BreadcrumbsLink, BreadcrumbsList, Button, Card, CardBlock, Checkbox, Chip, ChipButton, ChipCheckbox, ChipRadio, ChipRemovable, Combobox, ComboboxEmpty, ComboboxOption, Details, DetailsContent, DetailsSummary, Dialog, DialogBlock, DialogTrigger, DialogTriggerContext, Divider, Dropdown, DropdownButton, DropdownHeading, DropdownItem, DropdownList, DropdownTrigger, DropdownTriggerContext, ErrorSummary, ErrorSummaryHeading, ErrorSummaryItem, ErrorSummaryLink, ErrorSummaryList, EXPERIMENTAL_AvatarStack, EXPERIMENTAL_Suggestion, EXPERIMENTAL_SuggestionClear, EXPERIMENTAL_SuggestionEmpty, EXPERIMENTAL_SuggestionInput, EXPERIMENTAL_SuggestionList, EXPERIMENTAL_SuggestionOption, Field, FieldAffix, FieldAffixes, FieldCounter, FieldDescription, Fieldset, FieldsetDescription, FieldsetLegend, Heading, Input, Label, Link, List, ListItem, ListOrdered, ListUnordered, omit, Pagination, PaginationButton, PaginationItem, PaginationList, Paragraph, Popover, PopoverTrigger, PopoverTriggerContext, Radio, RovingFocusItem, RovingFocusRoot, Search, SearchButton, SearchClear, SearchInput, Select, SelectOptgroup, SelectOption, Skeleton, SkipLink, Spinner, Switch, Table, TableBody, TableCell, TableFoot, TableHead, TableHeaderCell, TableRow, Tabs, TabsList, TabsPanel, TabsTab, Tag, Textarea, Textfield, ToggleGroup, ToggleGroupItem, Tooltip, useCheckboxGroup, useDebounceCallback, useIsomorphicLayoutEffect, useMediaQuery, usePagination, useRadioGroup, useSynchronizedAnimation, ValidationMessage, } from '@digdir/designsystemet-react';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@arbeidstilsynet/design-react",
3
- "version": "0.5.0",
3
+ "version": "0.7.0",
4
4
  "description": "React implementation of Designsystemet",
5
5
  "author": "Arbeidstilsynet",
6
6
  "repository": {
@@ -30,41 +30,41 @@
30
30
  "react-dom": "^19.1.0"
31
31
  },
32
32
  "dependencies": {
33
- "@digdir/designsystemet-react": "1.9.0",
34
- "@digdir/designsystemet-types": "1.9.0",
35
- "@navikt/aksel-icons": "^7.37.0",
33
+ "@digdir/designsystemet-react": "1.11.0",
34
+ "@digdir/designsystemet-types": "1.11.0",
35
+ "@navikt/aksel-icons": "^7.40.0",
36
36
  "@radix-ui/react-slot": "^1.2.4",
37
37
  "clsx": "^2.1.1",
38
- "react-dropzone": "^14.3.8"
38
+ "react-dropzone": "^14.4.0"
39
39
  },
40
40
  "devDependencies": {
41
41
  "@eslint/js": "9.39.2",
42
- "@storybook/addon-docs": "10.1.11",
43
- "@storybook/addon-vitest": "10.1.11",
44
- "@storybook/react-vite": "10.1.11",
42
+ "@storybook/addon-docs": "10.2.4",
43
+ "@storybook/addon-vitest": "10.2.4",
44
+ "@storybook/react-vite": "10.2.4",
45
45
  "@testing-library/dom": "10.4.1",
46
46
  "@testing-library/jest-dom": "6.9.1",
47
- "@testing-library/react": "16.3.1",
47
+ "@testing-library/react": "16.3.2",
48
48
  "@testing-library/user-event": "14.6.1",
49
49
  "@types/eslint-plugin-jsx-a11y": "6.10.1",
50
- "@types/node": "24.10.4",
51
- "@types/react": "19.2.7",
50
+ "@types/node": "24.10.10",
51
+ "@types/react": "19.2.10",
52
52
  "@types/react-dom": "19.2.3",
53
- "@vitejs/plugin-react": "5.1.2",
53
+ "@vitejs/plugin-react": "5.1.3",
54
54
  "babel-plugin-react-compiler": "1.0.0",
55
55
  "eslint": "9.39.2",
56
56
  "eslint-config-prettier": "10.1.8",
57
57
  "eslint-plugin-jsx-a11y": "6.10.2",
58
58
  "eslint-plugin-react-hooks": "7.0.1",
59
- "eslint-plugin-storybook": "10.1.11",
60
- "jsdom": "27.4.0",
61
- "react": "19.2.3",
62
- "react-dom": "19.2.3",
59
+ "eslint-plugin-storybook": "10.2.4",
60
+ "jsdom": "28.0.0",
61
+ "react": "19.2.4",
62
+ "react-dom": "19.2.4",
63
63
  "typescript": "5.9.3",
64
- "typescript-eslint": "8.51.0",
65
- "vite": "7.3.0",
64
+ "typescript-eslint": "8.54.0",
65
+ "vite": "7.3.1",
66
66
  "vite-plugin-dts": "4.5.4",
67
- "@arbeidstilsynet/design-css": "0.5.0"
67
+ "@arbeidstilsynet/design-css": "0.7.0"
68
68
  },
69
69
  "scripts": {
70
70
  "build": "vite build",
@@ -1,5 +0,0 @@
1
- export interface HeaderDefaultLogoProps extends React.SVGProps<SVGSVGElement> {
2
- width?: number;
3
- height?: number;
4
- }
5
- export declare function HeaderDefaultLogo({ width, height, }: Readonly<HeaderDefaultLogoProps>): import("react/jsx-runtime").JSX.Element;
@@ -1,14 +0,0 @@
1
- import { HTMLAttributes, ReactNode } from 'react';
2
- import { DefaultProps } from '../../types';
3
- import { LinkItem } from './headerTitleLinks';
4
- export interface DropdownItem {
5
- label: string;
6
- href: string;
7
- }
8
- export interface HeaderTitleDropdownProps extends DefaultProps<HTMLDivElement>, HTMLAttributes<HTMLDivElement> {
9
- controls?: ReactNode[];
10
- links?: LinkItem[];
11
- userName?: string;
12
- children?: ReactNode;
13
- }
14
- export declare function HeaderTitleDropdown({ className, controls, links, userName, children, ...rest }: Readonly<HeaderTitleDropdownProps>): import("react/jsx-runtime").JSX.Element;
@@ -1,11 +0,0 @@
1
- import { HTMLAttributes, ReactNode } from 'react';
2
- import { DefaultProps } from '../../types';
3
- export interface LinkItem {
4
- label: string;
5
- href: string;
6
- }
7
- export interface HeaderTitleLinksProps extends DefaultProps<HTMLDivElement>, HTMLAttributes<HTMLDivElement> {
8
- links?: LinkItem[];
9
- children?: ReactNode;
10
- }
11
- export declare function HeaderTitleLinks({ className, links, children, ...rest }: Readonly<HeaderTitleLinksProps>): import("react/jsx-runtime").JSX.Element;
@@ -1,7 +0,0 @@
1
- import { HTMLAttributes, ReactNode } from 'react';
2
- import { DefaultProps } from '../../types';
3
- export interface HeaderTitleLogoProps extends DefaultProps<HTMLDivElement>, HTMLAttributes<HTMLDivElement> {
4
- logo: ReactNode;
5
- appName: string;
6
- }
7
- export declare function HeaderTitleLogo({ className, logo, appName, ...rest }: Readonly<HeaderTitleLogoProps>): import("react/jsx-runtime").JSX.Element;