@arbeidstilsynet/design-react 0.12.4 → 0.12.6

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.
Files changed (31) hide show
  1. package/dist/index.js +56 -86
  2. package/dist/index.js.map +1 -1
  3. package/dist/src/components/filepicker/filepicker.d.ts +1 -1
  4. package/dist/src/components/filepicker/filepickerContext.d.ts +1 -1
  5. package/dist/src/components/filepicker/filepickerDropzone.d.ts +1 -1
  6. package/dist/src/components/filepicker/filepickerErrors.d.ts +1 -1
  7. package/dist/src/components/filepicker/filepickerFiles.d.ts +3 -2
  8. package/dist/src/components/header/header.d.ts +1 -1
  9. package/dist/src/components/header/headerContext.d.ts +1 -1
  10. package/dist/src/components/header/headerIllustration.d.ts +1 -1
  11. package/dist/src/components/header/headerLogo.d.ts +1 -1
  12. package/dist/src/components/header/headerMenu.d.ts +1 -1
  13. package/dist/src/components/header/headerMenuRow.d.ts +3 -3
  14. package/dist/src/components/header/headerNavbar.d.ts +1 -1
  15. package/dist/src/components/header/headerTitle.d.ts +1 -1
  16. package/dist/src/components/header/stories-helpers/headerStoriesIllustration.d.ts +1 -1
  17. package/dist/src/components/header/stories-helpers/headerStoriesTitle.d.ts +1 -1
  18. package/dist/src/components/lightdarkimage/index.d.ts +1 -1
  19. package/dist/src/components/logo/logoblack.d.ts +1 -1
  20. package/dist/src/components/logo/logogreen.d.ts +1 -1
  21. package/dist/src/components/logo/logowhite.d.ts +1 -1
  22. package/dist/src/components/steps/steps.d.ts +1 -1
  23. package/dist/src/components/steps/stepsStep.d.ts +1 -1
  24. package/dist/src/components/steps/stepsStepDescription.d.ts +1 -1
  25. package/dist/src/components/steps/stepsStepDetails.d.ts +1 -1
  26. package/dist/src/components/steps/stepsStepMark.d.ts +1 -1
  27. package/dist/src/components/steps/stepsStepTitle.d.ts +1 -1
  28. package/dist/src/docs-components/CssAttributes.d.ts +7 -0
  29. package/dist/src/docs-components/CssVariables.d.ts +5 -1
  30. package/dist/src/docs-components/DoDont.d.ts +15 -0
  31. package/package.json +18 -18
@@ -103,4 +103,4 @@ export interface HeaderMenuProps extends DefaultProps<HTMLDivElement>, HTMLAttri
103
103
  * </Header.Menu>
104
104
  * ```
105
105
  */
106
- export declare function HeaderMenu({ className, children, triggerContent, mobileMenuText, closeButtonText, ...rest }: Readonly<HeaderMenuProps>): React.JSX.Element;
106
+ export declare function HeaderMenu({ className, children, triggerContent, mobileMenuText, closeButtonText, ...rest }: Readonly<HeaderMenuProps>): import('react').JSX.Element;
@@ -7,11 +7,11 @@ export interface HeaderMenuRowProps extends DefaultProps<HTMLElement>, HTMLAttri
7
7
  * Menu row that serves as a wrapper around a link in the header menu.
8
8
  * Supports an icon, badge and custom styling.
9
9
  */
10
- export declare function HeaderMenuRow({ className, padded, ...rest }: Readonly<HeaderMenuRowProps>): React.JSX.Element;
10
+ export declare function HeaderMenuRow({ className, padded, ...rest }: Readonly<HeaderMenuRowProps>): import('react').JSX.Element;
11
11
  export interface HeaderMenuIconProps extends DefaultProps<HTMLDivElement>, HTMLAttributes<HTMLDivElement> {
12
12
  }
13
- export declare function HeaderMenuIcon({ className, ...rest }: Readonly<HeaderMenuIconProps>): React.JSX.Element;
13
+ export declare function HeaderMenuIcon({ className, ...rest }: Readonly<HeaderMenuIconProps>): import('react').JSX.Element;
14
14
  export interface HeaderMenuBadgeProps extends DefaultProps<HTMLDivElement>, HTMLAttributes<HTMLDivElement> {
15
15
  color?: "info" | "warning" | "success" | "danger";
16
16
  }
17
- export declare function HeaderMenuBadge({ className, color, ...rest }: Readonly<HeaderMenuBadgeProps>): React.JSX.Element;
17
+ export declare function HeaderMenuBadge({ className, color, ...rest }: Readonly<HeaderMenuBadgeProps>): import('react').JSX.Element;
@@ -18,4 +18,4 @@ export interface HeaderNavbarProps extends DefaultProps<HTMLElement>, HTMLAttrib
18
18
  * </Header>
19
19
  * ```
20
20
  */
21
- export declare function HeaderNavbar({ className, ...rest }: Readonly<HeaderNavbarProps>): React.JSX.Element;
21
+ export declare function HeaderNavbar({ className, ...rest }: Readonly<HeaderNavbarProps>): import('react').JSX.Element;
@@ -29,4 +29,4 @@ export interface HeaderTitleProps extends DefaultProps<HTMLDivElement>, HTMLAttr
29
29
  * </Header.Title>
30
30
  * ```
31
31
  */
32
- export declare function HeaderTitle({ className, children, ...rest }: Readonly<HeaderTitleProps>): React.JSX.Element;
32
+ export declare function HeaderTitle({ className, children, ...rest }: Readonly<HeaderTitleProps>): import('react').JSX.Element;
@@ -1,4 +1,4 @@
1
- export declare function HeaderStoriesIllustration(): React.JSX.Element;
1
+ export declare function HeaderStoriesIllustration(): import('react').JSX.Element;
2
2
  export declare namespace HeaderStoriesIllustration {
3
3
  var displayName: string;
4
4
  }
@@ -1,4 +1,4 @@
1
- export declare function HeaderStoriesTitle(): React.JSX.Element;
1
+ export declare function HeaderStoriesTitle(): import('react').JSX.Element;
2
2
  export declare namespace HeaderStoriesTitle {
3
3
  var displayName: string;
4
4
  }
@@ -15,4 +15,4 @@ export interface LightDarkImageProps extends DefaultProps<HTMLSpanElement>, Omit
15
15
  * <LightDarkImage light={<LogoBlack />} dark={<LogoWhite />} />
16
16
  * ```
17
17
  */
18
- export declare function LightDarkImage({ className, light, dark, ...rest }: Readonly<LightDarkImageProps>): React.JSX.Element;
18
+ export declare function LightDarkImage({ className, light, dark, ...rest }: Readonly<LightDarkImageProps>): import('react').JSX.Element;
@@ -1,2 +1,2 @@
1
1
  import { SVGProps } from 'react';
2
- export declare const LogoBlack: ({ width }: SVGProps<SVGSVGElement>) => React.JSX.Element;
2
+ export declare const LogoBlack: ({ width }: SVGProps<SVGSVGElement>) => import('react').JSX.Element;
@@ -1,2 +1,2 @@
1
1
  import { SVGProps } from 'react';
2
- export declare const LogoGreen: ({ width }: SVGProps<SVGSVGElement>) => React.JSX.Element;
2
+ export declare const LogoGreen: ({ width }: SVGProps<SVGSVGElement>) => import('react').JSX.Element;
@@ -1,2 +1,2 @@
1
1
  import { SVGProps } from 'react';
2
- export declare const LogoWhite: ({ width }: SVGProps<SVGSVGElement>) => React.JSX.Element;
2
+ export declare const LogoWhite: ({ width }: SVGProps<SVGSVGElement>) => import('react').JSX.Element;
@@ -24,4 +24,4 @@ export interface StepsProps extends DefaultProps<HTMLOListElement>, HTMLAttribut
24
24
  */
25
25
  "data-state"?: "complete";
26
26
  }
27
- export declare function Steps({ className, ...rest }: Readonly<StepsProps>): React.JSX.Element;
27
+ export declare function Steps({ className, ...rest }: Readonly<StepsProps>): import('react').JSX.Element;
@@ -19,4 +19,4 @@ export interface StepsStepProps extends DefaultProps<HTMLLIElement>, HTMLAttribu
19
19
  */
20
20
  "data-state"?: "complete" | "incomplete";
21
21
  }
22
- export declare function StepsStep({ className, ...rest }: Readonly<StepsStepProps>): React.JSX.Element;
22
+ export declare function StepsStep({ className, ...rest }: Readonly<StepsStepProps>): import('react').JSX.Element;
@@ -2,4 +2,4 @@ import { HTMLAttributes } from 'react';
2
2
  import { DefaultProps } from '../../types';
3
3
  export interface StepsStepDescriptionProps extends DefaultProps<HTMLElement>, HTMLAttributes<HTMLElement> {
4
4
  }
5
- export declare function StepsStepDescription({ className, ...rest }: Readonly<StepsStepDescriptionProps>): React.JSX.Element;
5
+ export declare function StepsStepDescription({ className, ...rest }: Readonly<StepsStepDescriptionProps>): import('react').JSX.Element;
@@ -2,4 +2,4 @@ import { HTMLAttributes } from 'react';
2
2
  import { DefaultProps } from '../../types';
3
3
  export interface StepsStepDetailsProps extends DefaultProps<HTMLElement>, HTMLAttributes<HTMLElement> {
4
4
  }
5
- export declare function StepsStepDetails({ className, ...rest }: Readonly<StepsStepDetailsProps>): React.JSX.Element;
5
+ export declare function StepsStepDetails({ className, ...rest }: Readonly<StepsStepDetailsProps>): import('react').JSX.Element;
@@ -22,4 +22,4 @@ export interface StepsStepMarkProps extends DefaultProps<HTMLElement>, HTMLAttri
22
22
  * - `"info"`: filled dot with an info (!) icon.
23
23
  * - Any other palette value: filled dot in that colour with no icon.
24
24
  */
25
- export declare function StepsStepMark({ className, ...rest }: Readonly<StepsStepMarkProps>): React.JSX.Element;
25
+ export declare function StepsStepMark({ className, ...rest }: Readonly<StepsStepMarkProps>): import('react').JSX.Element;
@@ -2,4 +2,4 @@ import { HTMLAttributes } from 'react';
2
2
  import { DefaultProps } from '../../types';
3
3
  export interface StepsStepTitleProps extends DefaultProps<HTMLElement>, HTMLAttributes<HTMLElement> {
4
4
  }
5
- export declare function StepsStepTitle({ className, ...rest }: Readonly<StepsStepTitleProps>): React.JSX.Element;
5
+ export declare function StepsStepTitle({ className, ...rest }: Readonly<StepsStepTitleProps>): import('react').JSX.Element;
@@ -0,0 +1,7 @@
1
+ type CssAttributesProps = {
2
+ css: string;
3
+ /** Attribute names (without `data-`) to leave out of the table. */
4
+ exclude?: string[];
5
+ } & React.HTMLAttributes<HTMLTableElement>;
6
+ export declare function CssAttributes({ css, exclude, className, ...rest }: CssAttributesProps): import('react').JSX.Element;
7
+ export {};
@@ -1,5 +1,9 @@
1
1
  type CssVariablesProps = {
2
2
  css: string;
3
+ /** Only variables starting with this prefix are listed, e.g. `--dsc-` for Designsystemet components. */
4
+ prefix?: string;
5
+ /** Set to `false` when a heading right above already names the table. */
6
+ caption?: string | false;
3
7
  } & React.HTMLAttributes<HTMLTableElement>;
4
- export declare function CssVariables({ css, className, ...rest }: CssVariablesProps): React.JSX.Element;
8
+ export declare function CssVariables({ css, prefix, caption, className, ...rest }: CssVariablesProps): import('react').JSX.Element;
5
9
  export {};
@@ -0,0 +1,15 @@
1
+ import { Story } from '@storybook/addon-docs/blocks';
2
+ import { ComponentProps, ReactNode } from 'react';
3
+ type DoDontProps = {
4
+ /** The story showing the example. */
5
+ of: ComponentProps<typeof Story>["of"];
6
+ variant: "do" | "dont";
7
+ /** Description of the example. */
8
+ children?: ReactNode;
9
+ };
10
+ /**
11
+ * Shows a "do" or "don't" example from a story, with a description.
12
+ * Place several in a `<div className="dodont-row">` to show them side by side.
13
+ */
14
+ export declare function DoDont({ of, variant, children }: DoDontProps): import('react').JSX.Element;
15
+ export {};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@arbeidstilsynet/design-react",
3
- "version": "0.12.4",
3
+ "version": "0.12.6",
4
4
  "description": "React implementation of Designsystemet",
5
5
  "license": "MIT",
6
6
  "author": "Arbeidstilsynet",
@@ -26,31 +26,31 @@
26
26
  "dependencies": {
27
27
  "@digdir/designsystemet-react": "1.23.0",
28
28
  "@digdir/designsystemet-types": "1.23.0",
29
- "@navikt/aksel-icons": "^8.19.0",
30
- "@radix-ui/react-slot": "^1.4.0",
29
+ "@navikt/aksel-icons": "^8.23.2",
30
+ "@radix-ui/react-slot": "^1.5.0",
31
31
  "clsx": "^2.1.1",
32
- "react-dropzone": "^20.1.2"
32
+ "react-dropzone": "^20.2.1"
33
33
  },
34
34
  "devDependencies": {
35
- "@arbeidstilsynet/design-css": "0.12.4",
36
- "@storybook/addon-docs": "10.6.1",
37
- "@storybook/addon-vitest": "10.6.1",
38
- "@storybook/react-vite": "10.6.1",
35
+ "@arbeidstilsynet/design-css": "0.12.6",
36
+ "@storybook/addon-docs": "10.6.9",
37
+ "@storybook/addon-vitest": "10.6.9",
38
+ "@storybook/react-vite": "10.6.9",
39
39
  "@testing-library/dom": "10.4.2",
40
- "@testing-library/jest-dom": "7.0.1",
40
+ "@testing-library/jest-dom": "8.0.0",
41
41
  "@testing-library/react": "16.3.3",
42
- "@testing-library/user-event": "14.6.7",
43
- "@types/node": "24.19.0",
44
- "@types/react": "19.3.0",
42
+ "@testing-library/user-event": "14.6.13",
43
+ "@types/node": "26.6.11",
44
+ "@types/react": "19.3.3",
45
45
  "@types/react-dom": "19.3.0",
46
46
  "@typescript/typescript6": "6.0.2",
47
- "happy-dom": "20.14.6",
48
- "react": "19.3.0",
49
- "react-dom": "19.3.0",
50
- "react-toastify": "11.1.0",
51
- "storybook": "10.6.1",
47
+ "happy-dom": "21.0.4",
48
+ "react": "19.3.1",
49
+ "react-dom": "19.3.1",
50
+ "react-toastify": "11.2.0",
51
+ "storybook": "10.6.9",
52
52
  "typescript": "7.0.2",
53
- "vite": "8.3.4",
53
+ "vite": "8.4.0",
54
54
  "vite-plugin-dts": "5.1.2"
55
55
  },
56
56
  "peerDependencies": {