@norges-domstoler/dds-components 3.0.0 → 4.0.1

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 (65) hide show
  1. package/dist/components/Breadcrumbs/Breadcrumb.d.ts +3 -4
  2. package/dist/components/Breadcrumbs/Breadcrumbs.d.ts +2 -3
  3. package/dist/components/Breadcrumbs/Breadcrumbs.stories.d.ts +2 -3
  4. package/dist/components/Button/Button.d.ts +2 -3
  5. package/dist/components/Button/Button.stories.d.ts +2 -3
  6. package/dist/components/Card/CardAccordion/CardAccordion.d.ts +2 -3
  7. package/dist/components/Card/CardAccordion/CardAccordionBody.d.ts +2 -3
  8. package/dist/components/Card/CardAccordion/CardAccordionHeader.d.ts +2 -3
  9. package/dist/components/Checkbox/Checkbox.d.ts +2 -3
  10. package/dist/components/Checkbox/Checkbox.stories.d.ts +2 -3
  11. package/dist/components/Checkbox/CheckboxGroup.d.ts +5 -4
  12. package/dist/components/Checkbox/CheckboxGroup.stories.d.ts +1 -1
  13. package/dist/components/Chip/Chip.d.ts +2 -3
  14. package/dist/components/Chip/Chip.stories.d.ts +2 -3
  15. package/dist/components/DescriptionList/DescriptionList.d.ts +2 -3
  16. package/dist/components/DescriptionList/DescriptionList.stories.d.ts +2 -3
  17. package/dist/components/DescriptionList/DescriptionListDesc.d.ts +2 -3
  18. package/dist/components/DescriptionList/DescriptionListGroup.d.ts +2 -3
  19. package/dist/components/Divider/Divider.d.ts +2 -3
  20. package/dist/components/Divider/Divider.stories.d.ts +2 -3
  21. package/dist/components/Drawer/Drawer.d.ts +2 -3
  22. package/dist/components/Drawer/Drawer.stories.d.ts +2 -3
  23. package/dist/components/GlobalMessage/GlobalMessage.d.ts +2 -3
  24. package/dist/components/GlobalMessage/GlobalMessage.stories.d.ts +2 -3
  25. package/dist/components/InputMessage/InputMessage.d.ts +2 -4
  26. package/dist/components/InputMessage/InputMessage.stories.d.ts +2 -3
  27. package/dist/components/InternalHeader/InternalHeader.styles.d.ts +2 -3
  28. package/dist/components/List/List.d.ts +2 -3
  29. package/dist/components/List/List.stories.d.ts +2 -3
  30. package/dist/components/LocalMessage/LocalMessage.d.ts +2 -3
  31. package/dist/components/LocalMessage/LocalMessage.stories.d.ts +2 -3
  32. package/dist/components/Modal/Modal.d.ts +2 -3
  33. package/dist/components/Modal/Modal.stories.d.ts +2 -3
  34. package/dist/components/Modal/ModalBody.d.ts +2 -3
  35. package/dist/components/OverflowMenu/OverflowMenu.d.ts +2 -3
  36. package/dist/components/OverflowMenu/OverflowMenu.stories.d.ts +2 -3
  37. package/dist/components/Pagination/Pagination.d.ts +2 -3
  38. package/dist/components/Pagination/Pagination.stories.d.ts +2 -3
  39. package/dist/components/Popover/Popover.d.ts +2 -3
  40. package/dist/components/Popover/Popover.stories.d.ts +2 -3
  41. package/dist/components/RadioButton/RadioButton.d.ts +2 -3
  42. package/dist/components/RadioButton/RadioButton.stories.d.ts +2 -3
  43. package/dist/components/RadioButton/RadioButtonGroup.d.ts +1 -1
  44. package/dist/components/RadioButton/RadioButtonGroup.stories.d.ts +1 -1
  45. package/dist/components/Select/MultiSelect.stories.d.ts +1 -1
  46. package/dist/components/Select/Select.d.ts +10 -3
  47. package/dist/components/Select/Select.stories.d.ts +3 -7
  48. package/dist/components/SkipToContent/SkipToContent.d.ts +2 -3
  49. package/dist/components/SkipToContent/SkipToContent.stories.d.ts +2 -3
  50. package/dist/components/Tabs/Tab.d.ts +2 -3
  51. package/dist/components/Tabs/TabPanel.d.ts +2 -3
  52. package/dist/components/Tabs/Tabs.d.ts +4 -5
  53. package/dist/components/Tag/Tag.d.ts +2 -3
  54. package/dist/components/Tag/Tag.stories.d.ts +2 -3
  55. package/dist/components/ToggleButton/ToggleButton.d.ts +2 -3
  56. package/dist/components/ToggleButton/ToggleButton.stories.d.ts +2 -3
  57. package/dist/components/Tooltip/Tooltip.d.ts +3 -4
  58. package/dist/components/Tooltip/Tooltip.stories.d.ts +2 -4
  59. package/dist/components/Typography/Typography.d.ts +12 -10
  60. package/dist/index.es.js +466 -342
  61. package/dist/index.js +465 -340
  62. package/dist/types/BaseComponentProps.d.ts +17 -267
  63. package/dist/types/utils.d.ts +8 -0
  64. package/dist/utils/idGenerator.d.ts +1 -1
  65. package/package.json +9 -9
@@ -1,4 +1,3 @@
1
- import { AnchorHTMLAttributes } from 'react';
2
- import { TypographyProps } from '../Typography';
3
- export declare type BreadcrumbProps = TypographyProps & AnchorHTMLAttributes<HTMLAnchorElement>;
4
- export declare const Breadcrumb: import("react").ForwardRefExoticComponent<BreadcrumbProps & import("react").RefAttributes<HTMLAnchorElement>>;
1
+ import { AnchorHTMLAttributes, HTMLAttributes } from 'react';
2
+ export declare type BreadcrumbProps = HTMLAttributes<HTMLSpanElement> | AnchorHTMLAttributes<HTMLAnchorElement>;
3
+ export declare const Breadcrumb: import("react").ForwardRefExoticComponent<BreadcrumbProps & import("react").RefAttributes<HTMLElement>>;
@@ -5,9 +5,8 @@ export declare type BreadcrumbsProps = BaseComponentPropsWithChildren<HTMLElemen
5
5
  smallScreen?: boolean;
6
6
  }>;
7
7
  export declare const Breadcrumbs: import("react").ForwardRefExoticComponent<{
8
- id?: string | undefined;
9
- htmlProps?: Omit<import("react").HTMLAttributes<HTMLElement>, "id"> | undefined;
10
- } & {
8
+ htmlProps?: import("react").HTMLAttributes<HTMLElement> | undefined;
9
+ } & Pick<import("react").HTMLAttributes<HTMLElement>, "className" | "id"> & {
11
10
  /** Spesifiserer om versjonen for små skjermer skal vises; den viser `<Breadcrumb />` kun til den forrige siden. */
12
11
  smallScreen?: boolean | undefined;
13
12
  } & {
@@ -3,9 +3,8 @@ import { BreadcrumbsProps } from '.';
3
3
  declare const _default: {
4
4
  title: string;
5
5
  component: import("react").ForwardRefExoticComponent<{
6
- id?: string | undefined;
7
- htmlProps?: Omit<import("react").HTMLAttributes<HTMLElement>, "id"> | undefined;
8
- } & {
6
+ htmlProps?: import("react").HTMLAttributes<HTMLElement> | undefined;
7
+ } & Pick<import("react").HTMLAttributes<HTMLElement>, "id" | "className"> & {
9
8
  smallScreen?: boolean | undefined;
10
9
  } & {
11
10
  children?: import("react").ReactNode;
@@ -1,8 +1,7 @@
1
1
  /// <reference types="react" />
2
2
  export declare const Button: import("react").ForwardRefExoticComponent<{
3
- id?: string | undefined;
4
- htmlProps?: Omit<Omit<import("react").ButtonHTMLAttributes<HTMLButtonElement>, "onClick" | "onFocus" | "onBlur">, "id"> | undefined;
5
- } & {
3
+ htmlProps?: Omit<import("react").ButtonHTMLAttributes<HTMLButtonElement>, "onClick" | "onFocus" | "onBlur"> | undefined;
4
+ } & Pick<Omit<import("react").ButtonHTMLAttributes<HTMLButtonElement>, "onClick" | "onFocus" | "onBlur">, "id" | "className"> & {
6
5
  size?: import("./Button.types").ButtonSize | undefined;
7
6
  label?: string | undefined;
8
7
  purpose?: import("./Button.types").ButtonPurpose | undefined;
@@ -3,9 +3,8 @@ import { ButtonProps } from '.';
3
3
  declare const _default: {
4
4
  title: string;
5
5
  component: import("react").ForwardRefExoticComponent<{
6
- id?: string | undefined;
7
- htmlProps?: Omit<Omit<import("react").ButtonHTMLAttributes<HTMLButtonElement>, "onFocus" | "onBlur" | "onClick">, "id"> | undefined;
8
- } & {
6
+ htmlProps?: Omit<import("react").ButtonHTMLAttributes<HTMLButtonElement>, "onFocus" | "onBlur" | "onClick"> | undefined;
7
+ } & Pick<Omit<import("react").ButtonHTMLAttributes<HTMLButtonElement>, "onFocus" | "onBlur" | "onClick">, "id" | "className"> & {
9
8
  size?: import("./Button.types").ButtonSize | undefined;
10
9
  label?: string | undefined;
11
10
  purpose?: import("./Button.types").ButtonPurpose | undefined;
@@ -5,9 +5,8 @@ export declare type CardAccordionProps = BaseComponentPropsWithChildren<HTMLDivE
5
5
  isExpanded?: boolean;
6
6
  }>;
7
7
  export declare const CardAccordion: import("react").ForwardRefExoticComponent<{
8
- id?: string | undefined;
9
- htmlProps?: Omit<import("react").HTMLAttributes<HTMLDivElement>, "id"> | undefined;
10
- } & {
8
+ htmlProps?: import("react").HTMLAttributes<HTMLDivElement> | undefined;
9
+ } & Pick<import("react").HTMLAttributes<HTMLDivElement>, "id" | "className"> & {
11
10
  /**Spesifiserer om body skal være utvidet ved innlastning. */
12
11
  isExpanded?: boolean | undefined;
13
12
  } & {
@@ -10,9 +10,8 @@ export declare type CardAccordionBodyProps = BaseComponentPropsWithChildren<HTML
10
10
  paddingTop?: Property.PaddingTop<string>;
11
11
  }>;
12
12
  export declare const CardAccordionBody: import("react").ForwardRefExoticComponent<{
13
- id?: string | undefined;
14
- htmlProps?: Omit<import("react").HTMLAttributes<HTMLDivElement>, "id"> | undefined;
15
- } & {
13
+ htmlProps?: import("react").HTMLAttributes<HTMLDivElement> | undefined;
14
+ } & Pick<import("react").HTMLAttributes<HTMLDivElement>, "className" | "id"> & {
16
15
  /** **OBS!** denne propen blir satt automatisk av forelder. Forteller komponenten om den skal utvides. */
17
16
  isExpanded?: boolean | undefined;
18
17
  /** **OBS!** denne propen blir satt automatisk av forelder. Forteller `id` til `<CardAccordionHeader />`. */
@@ -9,9 +9,8 @@ export declare type CardAccordionHeaderProps = BaseComponentPropsWithChildren<HT
9
9
  bodyId?: string;
10
10
  }, ButtonHTMLAttributes<HTMLButtonElement>>;
11
11
  export declare const CardAccordionHeader: import("react").ForwardRefExoticComponent<{
12
- id?: string | undefined;
13
- htmlProps?: Omit<ButtonHTMLAttributes<HTMLButtonElement>, "id"> | undefined;
14
- } & {
12
+ htmlProps?: ButtonHTMLAttributes<HTMLButtonElement> | undefined;
13
+ } & Pick<ButtonHTMLAttributes<HTMLButtonElement>, "className" | "id"> & {
15
14
  /** **OBS!** denne propen blir satt automatisk av forelder. Forteller body er utvidet. */
16
15
  isExpanded?: boolean | undefined;
17
16
  /** **OBS!** denne propen blir satt automatisk av forelder. Callback for å styre utvidelse og sammentrukking. */
@@ -1,8 +1,7 @@
1
1
  /// <reference types="react" />
2
2
  export declare const Checkbox: import("react").ForwardRefExoticComponent<{
3
- id?: string | undefined;
4
- htmlProps?: Omit<Omit<import("react").InputHTMLAttributes<HTMLInputElement>, "aria-describedby" | "name" | "checked" | "onChange">, "id"> | undefined;
5
- } & {
3
+ htmlProps?: Omit<import("react").InputHTMLAttributes<HTMLInputElement>, "aria-describedby" | "name" | "checked" | "onChange"> | undefined;
4
+ } & Pick<Omit<import("react").InputHTMLAttributes<HTMLInputElement>, "aria-describedby" | "name" | "checked" | "onChange">, "id" | "className"> & {
6
5
  label?: string | undefined;
7
6
  error?: boolean | undefined;
8
7
  disabled?: boolean | undefined;
@@ -3,9 +3,8 @@ import { CheckboxProps } from '.';
3
3
  declare const _default: {
4
4
  title: string;
5
5
  component: import("react").ForwardRefExoticComponent<{
6
- id?: string | undefined;
7
- htmlProps?: Omit<Omit<import("react").InputHTMLAttributes<HTMLInputElement>, "aria-describedby" | "onChange" | "name" | "checked">, "id"> | undefined;
8
- } & {
6
+ htmlProps?: Omit<import("react").InputHTMLAttributes<HTMLInputElement>, "aria-describedby" | "onChange" | "name" | "checked"> | undefined;
7
+ } & Pick<Omit<import("react").InputHTMLAttributes<HTMLInputElement>, "aria-describedby" | "onChange" | "name" | "checked">, "id" | "className"> & {
9
8
  label?: string | undefined;
10
9
  error?: boolean | undefined;
11
10
  disabled?: boolean | undefined;
@@ -1,6 +1,7 @@
1
- import { HTMLAttributes } from 'react';
1
+ /// <reference types="react" />
2
+ import { BaseComponentPropsWithChildren } from '../../types';
2
3
  declare type Direction = 'column' | 'row';
3
- export declare type CheckboxGroupProps = {
4
+ export declare type CheckboxGroupProps = BaseComponentPropsWithChildren<HTMLDivElement, {
4
5
  /**Ledetekst for gruppen. */
5
6
  label?: string;
6
7
  /**Retningen barna gjengis i. */
@@ -12,6 +13,6 @@ export declare type CheckboxGroupProps = {
12
13
  tip?: string;
13
14
  /**Indikerer at det er påkrevd å velge minst ett alternativ. Innebærer visuell endring. **OBS!** `required` må i tillegg gis til `<Checkbox />` manuelt. */
14
15
  required?: boolean;
15
- } & HTMLAttributes<HTMLDivElement>;
16
- export declare const CheckboxGroup: ({ label, direction, errorMessage, tip, required, groupId, children, className, style, ...rest }: CheckboxGroupProps) => JSX.Element;
16
+ }>;
17
+ export declare const CheckboxGroup: ({ label, direction, errorMessage, tip, required, groupId, children, id, className, htmlProps, ...rest }: CheckboxGroupProps) => JSX.Element;
17
18
  export {};
@@ -2,7 +2,7 @@
2
2
  import { CheckboxGroupProps } from '.';
3
3
  declare const _default: {
4
4
  title: string;
5
- component: ({ label, direction, errorMessage, tip, required, groupId, children, className, style, ...rest }: CheckboxGroupProps) => JSX.Element;
5
+ component: ({ label, direction, errorMessage, tip, required, groupId, children, id, className, htmlProps, ...rest }: CheckboxGroupProps) => JSX.Element;
6
6
  argTypes: {
7
7
  label: {
8
8
  control: {
@@ -7,9 +7,8 @@ export declare type ChipProps = BaseComponentProps<HTMLDivElement, {
7
7
  onClose?: () => void;
8
8
  }>;
9
9
  export declare const Chip: import("react").ForwardRefExoticComponent<{
10
- id?: string | undefined;
11
- htmlProps?: Omit<import("react").HTMLAttributes<HTMLDivElement>, "id"> | undefined;
12
- } & {
10
+ htmlProps?: import("react").HTMLAttributes<HTMLDivElement> | undefined;
11
+ } & Pick<import("react").HTMLAttributes<HTMLDivElement>, "className" | "id"> & {
13
12
  /** Teksten som vises i komponenten. */
14
13
  text?: string | undefined;
15
14
  /** Ekstra logikk når `<Chip />` lukkes. */
@@ -3,9 +3,8 @@ import { ChipProps } from '.';
3
3
  declare const _default: {
4
4
  title: string;
5
5
  component: import("react").ForwardRefExoticComponent<{
6
- id?: string | undefined;
7
- htmlProps?: Omit<import("react").HTMLAttributes<HTMLDivElement>, "id"> | undefined;
8
- } & {
6
+ htmlProps?: import("react").HTMLAttributes<HTMLDivElement> | undefined;
7
+ } & Pick<import("react").HTMLAttributes<HTMLDivElement>, "id" | "className"> & {
9
8
  text?: string | undefined;
10
9
  onClose?: (() => void) | undefined;
11
10
  } & import("react").RefAttributes<HTMLDivElement>>;
@@ -6,9 +6,8 @@ export declare type DescriptionListProps = BaseComponentPropsWithChildren<HTMLDL
6
6
  appearance?: DescriptionListAppearance;
7
7
  }>;
8
8
  export declare const DescriptionList: import("react").ForwardRefExoticComponent<{
9
- id?: string | undefined;
10
- htmlProps?: Omit<import("react").HTMLAttributes<HTMLDListElement>, "id"> | undefined;
11
- } & {
9
+ htmlProps?: import("react").HTMLAttributes<HTMLDListElement> | undefined;
10
+ } & Pick<import("react").HTMLAttributes<HTMLDListElement>, "id" | "className"> & {
12
11
  /**Påvirker tekst styling. */
13
12
  appearance?: DescriptionListAppearance | undefined;
14
13
  } & {
@@ -3,9 +3,8 @@ import { DescriptionListProps } from '.';
3
3
  declare const _default: {
4
4
  title: string;
5
5
  component: import("react").ForwardRefExoticComponent<{
6
- id?: string | undefined;
7
- htmlProps?: Omit<import("react").HTMLAttributes<HTMLDListElement>, "id"> | undefined;
8
- } & {
6
+ htmlProps?: import("react").HTMLAttributes<HTMLDListElement> | undefined;
7
+ } & Pick<import("react").HTMLAttributes<HTMLDListElement>, "id" | "className"> & {
9
8
  appearance?: import("./DescriptionList").DescriptionListAppearance | undefined;
10
9
  } & {
11
10
  children?: import("react").ReactNode;
@@ -7,9 +7,8 @@ export declare type DescriptionListDescProps = BaseComponentPropsWithChildren<HT
7
7
  Icon?: OverridableComponent<SvgIconTypeMap<Record<string, unknown>, 'svg'>>;
8
8
  }>;
9
9
  export declare const DescriptionListDesc: import("react").ForwardRefExoticComponent<{
10
- id?: string | undefined;
11
- htmlProps?: Omit<import("react").HTMLAttributes<HTMLElement>, "id"> | undefined;
12
- } & {
10
+ htmlProps?: import("react").HTMLAttributes<HTMLElement> | undefined;
11
+ } & Pick<import("react").HTMLAttributes<HTMLElement>, "className" | "id"> & {
13
12
  /**Ikon som vises ved siden av teksten. */
14
13
  Icon?: OverridableComponent<SvgIconTypeMap<Record<string, unknown>, "svg">> | undefined;
15
14
  } & {
@@ -6,9 +6,8 @@ export declare type DescriptionListGroupProps = BaseComponentPropsWithChildren<H
6
6
  margin?: Property.Margin<string>;
7
7
  }>;
8
8
  export declare const DescriptionListGroup: import("react").ForwardRefExoticComponent<{
9
- id?: string | undefined;
10
- htmlProps?: Omit<import("react").HTMLAttributes<HTMLDivElement>, "id"> | undefined;
11
- } & {
9
+ htmlProps?: import("react").HTMLAttributes<HTMLDivElement> | undefined;
10
+ } & Pick<import("react").HTMLAttributes<HTMLDivElement>, "id" | "className"> & {
12
11
  /**Custom margin. */
13
12
  margin?: Property.Margin<string> | undefined;
14
13
  } & {
@@ -6,9 +6,8 @@ export declare type DividerProps = BaseComponentProps<HTMLHRElement, {
6
6
  color?: DividerColor;
7
7
  }>;
8
8
  export declare const Divider: import("react").ForwardRefExoticComponent<{
9
- id?: string | undefined;
10
- htmlProps?: Omit<import("react").HTMLAttributes<HTMLHRElement>, "id"> | undefined;
11
- } & {
9
+ htmlProps?: import("react").HTMLAttributes<HTMLHRElement> | undefined;
10
+ } & Pick<import("react").HTMLAttributes<HTMLHRElement>, "id" | "className"> & {
12
11
  /** Farge på horisontal linje. */
13
12
  color?: DividerColor | undefined;
14
13
  } & import("react").RefAttributes<HTMLHRElement>>;
@@ -3,9 +3,8 @@ import { DividerProps } from '.';
3
3
  declare const _default: {
4
4
  title: string;
5
5
  component: import("react").ForwardRefExoticComponent<{
6
- id?: string | undefined;
7
- htmlProps?: Omit<import("react").HTMLAttributes<HTMLHRElement>, "id"> | undefined;
8
- } & {
6
+ htmlProps?: import("react").HTMLAttributes<HTMLHRElement> | undefined;
7
+ } & Pick<import("react").HTMLAttributes<HTMLHRElement>, "id" | "className"> & {
9
8
  color?: import("./Divider").DividerColor | undefined;
10
9
  } & import("react").RefAttributes<HTMLHRElement>>;
11
10
  argTypes: {};
@@ -27,9 +27,8 @@ export declare type DrawerProps = BaseComponentPropsWithChildren<HTMLDivElement,
27
27
  triggerRef?: RefObject<HTMLElement>;
28
28
  }>;
29
29
  export declare const Drawer: import("react").ForwardRefExoticComponent<{
30
- id?: string | undefined;
31
- htmlProps?: Omit<import("react").HTMLAttributes<HTMLDivElement>, "id"> | undefined;
32
- } & {
30
+ htmlProps?: import("react").HTMLAttributes<HTMLDivElement> | undefined;
31
+ } & Pick<import("react").HTMLAttributes<HTMLDivElement>, "className" | "id"> & {
33
32
  /**Størrelsen på `<Drawer />`. */
34
33
  size?: DrawerSize | undefined;
35
34
  /** Plasseringen til `<Drawer />`. */
@@ -3,9 +3,8 @@ import { DrawerProps } from '.';
3
3
  declare const _default: {
4
4
  title: string;
5
5
  component: import("react").ForwardRefExoticComponent<{
6
- id?: string | undefined;
7
- htmlProps?: Omit<import("react").HTMLAttributes<HTMLDivElement>, "id"> | undefined;
8
- } & {
6
+ htmlProps?: import("react").HTMLAttributes<HTMLDivElement> | undefined;
7
+ } & Pick<import("react").HTMLAttributes<HTMLDivElement>, "id" | "className"> & {
9
8
  size?: import("./Drawer").DrawerSize | undefined;
10
9
  placement?: import("./Drawer").DrawerPlacement | undefined;
11
10
  header?: import("react").ReactNode;
@@ -12,9 +12,8 @@ export declare type GlobalMessageProps = BaseComponentPropsWithChildren<HTMLDivE
12
12
  onClose?: () => void;
13
13
  }>;
14
14
  export declare const GlobalMessage: import("react").ForwardRefExoticComponent<{
15
- id?: string | undefined;
16
- htmlProps?: Omit<import("react").HTMLAttributes<HTMLDivElement>, "id"> | undefined;
17
- } & {
15
+ htmlProps?: import("react").HTMLAttributes<HTMLDivElement> | undefined;
16
+ } & Pick<import("react").HTMLAttributes<HTMLDivElement>, "id" | "className"> & {
18
17
  /**Meldingen som vises til brukeren. Brukes kun når meldingen er en `string`. */
19
18
  message?: string | undefined;
20
19
  /**Formålet med meldingen. Påvirker styling. */
@@ -3,9 +3,8 @@ import { GlobalMessageProps } from './GlobalMessage';
3
3
  declare const _default: {
4
4
  title: string;
5
5
  component: import("react").ForwardRefExoticComponent<{
6
- id?: string | undefined;
7
- htmlProps?: Omit<import("react").HTMLAttributes<HTMLDivElement>, "id"> | undefined;
8
- } & {
6
+ htmlProps?: import("react").HTMLAttributes<HTMLDivElement> | undefined;
7
+ } & Pick<import("react").HTMLAttributes<HTMLDivElement>, "id" | "className"> & {
9
8
  message?: string | undefined;
10
9
  purpose?: import("./GlobalMessage").GlobalMessagePurpose | undefined;
11
10
  closable?: boolean | undefined;
@@ -8,10 +8,8 @@ export declare type InputMessageProps = BaseComponentProps<HTMLDivElement, {
8
8
  messageType: InputMessageType;
9
9
  }>;
10
10
  export declare const InputMessage: import("react").ForwardRefExoticComponent<{
11
- id?: string | undefined;
12
- /** Formålet med meldingen. Påvirker styling. */
13
- htmlProps?: Omit<import("react").HTMLAttributes<HTMLDivElement>, "id"> | undefined;
14
- } & {
11
+ htmlProps?: import("react").HTMLAttributes<HTMLDivElement> | undefined;
12
+ } & Pick<import("react").HTMLAttributes<HTMLDivElement>, "className" | "id"> & {
15
13
  /** Meldingen som vises til brukeren. */
16
14
  message: string;
17
15
  /** Formålet med meldingen. Påvirker styling. */
@@ -3,9 +3,8 @@ import { InputMessageProps } from '.';
3
3
  declare const _default: {
4
4
  title: string;
5
5
  component: import("react").ForwardRefExoticComponent<{
6
- id?: string | undefined;
7
- htmlProps?: Omit<import("react").HTMLAttributes<HTMLDivElement>, "id"> | undefined;
8
- } & {
6
+ htmlProps?: import("react").HTMLAttributes<HTMLDivElement> | undefined;
7
+ } & Pick<import("react").HTMLAttributes<HTMLDivElement>, "id" | "className"> & {
9
8
  message: string;
10
9
  messageType: import("./InputMessage").InputMessageType;
11
10
  } & import("react").RefAttributes<HTMLDivElement>>;
@@ -13,9 +13,8 @@ declare type NavListProps = Pick<InternalHeaderProps, 'smallScreen'>;
13
13
  export declare const NavigationList: import("styled-components").StyledComponent<"ul", any, NavListProps, never>;
14
14
  export declare const ContextMenuGroup: import("styled-components").StyledComponent<"div", any, {}, never>;
15
15
  export declare const StyledOverflowMenu: import("styled-components").StyledComponent<import("react").ForwardRefExoticComponent<{
16
- id?: string | undefined;
17
- htmlProps?: Omit<import("react").HTMLAttributes<HTMLDivElement>, "id"> | undefined;
18
- } & {
16
+ htmlProps?: import("react").HTMLAttributes<HTMLDivElement> | undefined;
17
+ } & Pick<import("react").HTMLAttributes<HTMLDivElement>, "className" | "id"> & {
19
18
  items?: import("../OverflowMenu").OverflowMenuContextItem[] | undefined;
20
19
  userProps?: ({
21
20
  name: string;
@@ -10,9 +10,8 @@ export declare type ListProps = BaseComponentPropsWithChildren<HTMLUListElement
10
10
  typographyType?: ListTypographyType;
11
11
  }>;
12
12
  export declare const List: import("react").ForwardRefExoticComponent<{
13
- id?: string | undefined;
14
- htmlProps?: Omit<import("react").HTMLAttributes<HTMLUListElement | HTMLOListElement>, "id"> | undefined;
15
- } & {
13
+ htmlProps?: import("react").HTMLAttributes<HTMLUListElement | HTMLOListElement> | undefined;
14
+ } & Pick<import("react").HTMLAttributes<HTMLUListElement | HTMLOListElement>, "id" | "className"> & {
16
15
  /**Spesifiserer om komponenten skal returnere `<ul />` (punktliste) eller `<ol />` (nummerert liste). */
17
16
  listType?: ListType | undefined;
18
17
  /**Spesifiserer typografi for listen. Komponenten arver i utgangspunktet fra forelder, men hvis forelder stiller ikke med relevant styling må det velges `TypographyBodyType` som brukes i `<body>` ellers på siden. */
@@ -3,9 +3,8 @@ import { ListProps } from '.';
3
3
  declare const _default: {
4
4
  title: string;
5
5
  component: import("react").ForwardRefExoticComponent<{
6
- id?: string | undefined;
7
- htmlProps?: Omit<import("react").HTMLAttributes<HTMLOListElement | HTMLUListElement>, "id"> | undefined;
8
- } & {
6
+ htmlProps?: import("react").HTMLAttributes<HTMLOListElement | HTMLUListElement> | undefined;
7
+ } & Pick<import("react").HTMLAttributes<HTMLOListElement | HTMLUListElement>, "id" | "className"> & {
9
8
  listType?: import("./List").ListType | undefined;
10
9
  typographyType?: import("./List").ListTypographyType | undefined;
11
10
  } & {
@@ -18,9 +18,8 @@ export declare type LocalMessageProps = BaseComponentPropsWithChildren<HTMLDivEl
18
18
  width?: Property.Width<string>;
19
19
  }>;
20
20
  export declare const LocalMessage: import("react").ForwardRefExoticComponent<{
21
- id?: string | undefined;
22
- htmlProps?: Omit<import("react").HTMLAttributes<HTMLDivElement>, "id"> | undefined;
23
- } & {
21
+ htmlProps?: import("react").HTMLAttributes<HTMLDivElement> | undefined;
22
+ } & Pick<import("react").HTMLAttributes<HTMLDivElement>, "id" | "className"> & {
24
23
  /**Meldingen som vises til brukeren. Brukes kun når meldingen er string. */
25
24
  message?: string | undefined;
26
25
  /**Formålet med meldingen. Påvirker styling. */
@@ -3,9 +3,8 @@ import { LocalMessageProps } from './LocalMessage';
3
3
  declare const _default: {
4
4
  title: string;
5
5
  component: import("react").ForwardRefExoticComponent<{
6
- id?: string | undefined;
7
- htmlProps?: Omit<import("react").HTMLAttributes<HTMLDivElement>, "id"> | undefined;
8
- } & {
6
+ htmlProps?: import("react").HTMLAttributes<HTMLDivElement> | undefined;
7
+ } & Pick<import("react").HTMLAttributes<HTMLDivElement>, "id" | "className"> & {
9
8
  message?: string | undefined;
10
9
  purpose?: import("./LocalMessage").LocalMessagePurpose | undefined;
11
10
  closable?: boolean | undefined;
@@ -13,9 +13,8 @@ export declare type ModalProps = BaseComponentPropsWithChildren<HTMLDivElement,
13
13
  triggerRef?: RefObject<HTMLElement>;
14
14
  }>;
15
15
  export declare const Modal: import("react").ForwardRefExoticComponent<{
16
- id?: string | undefined;
17
- htmlProps?: Omit<import("react").HTMLAttributes<HTMLDivElement>, "id"> | undefined;
18
- } & {
16
+ htmlProps?: import("react").HTMLAttributes<HTMLDivElement> | undefined;
17
+ } & Pick<import("react").HTMLAttributes<HTMLDivElement>, "className" | "id"> & {
19
18
  /**Spesifiserer om modal skal vises. */
20
19
  isOpen?: boolean | undefined;
21
20
  /**Funksjon kjørt ved lukking; Settes hvis modal skal være lukkbar. Legger en lukkeknapp i hjørnet og kjøres ved Esc-trykk, lukkeknappklikk og museklikk utenfor. */
@@ -3,9 +3,8 @@ import { ModalProps } from '.';
3
3
  declare const _default: {
4
4
  title: string;
5
5
  component: import("react").ForwardRefExoticComponent<{
6
- id?: string | undefined;
7
- htmlProps?: Omit<import("react").HTMLAttributes<HTMLDivElement>, "id"> | undefined;
8
- } & {
6
+ htmlProps?: import("react").HTMLAttributes<HTMLDivElement> | undefined;
7
+ } & Pick<import("react").HTMLAttributes<HTMLDivElement>, "id" | "className"> & {
9
8
  isOpen?: boolean | undefined;
10
9
  onClose?: (() => void) | undefined;
11
10
  parentElement?: HTMLElement | undefined;
@@ -5,9 +5,8 @@ export declare type ModalBodyProps = BaseComponentPropsWithChildren<HTMLDivEleme
5
5
  scrollable?: boolean;
6
6
  }>;
7
7
  export declare const ModalBody: import("react").ForwardRefExoticComponent<{
8
- id?: string | undefined;
9
- htmlProps?: Omit<import("react").HTMLAttributes<HTMLDivElement>, "id"> | undefined;
10
- } & {
8
+ htmlProps?: import("react").HTMLAttributes<HTMLDivElement> | undefined;
9
+ } & Pick<import("react").HTMLAttributes<HTMLDivElement>, "className" | "id"> & {
11
10
  /**Gjør at innholdet kan scrolles. Det må eventuelt settes (max)bredde og (max)høyde styling på både denne subkomponenten og `<Modal />`. */
12
11
  scrollable?: boolean | undefined;
13
12
  } & {
@@ -6,9 +6,8 @@ declare type ContainerProps = {
6
6
  export declare const Container: import("styled-components").StyledComponent<"div", any, ContainerProps, never>;
7
7
  export declare const OverflowMenuList: import("styled-components").StyledComponent<"ul", any, {}, never>;
8
8
  export declare const OverflowMenu: import("react").ForwardRefExoticComponent<{
9
- id?: string | undefined;
10
- htmlProps?: Omit<import("react").HTMLAttributes<HTMLDivElement>, "id"> | undefined;
11
- } & {
9
+ htmlProps?: import("react").HTMLAttributes<HTMLDivElement> | undefined;
10
+ } & Pick<import("react").HTMLAttributes<HTMLDivElement>, "className" | "id"> & {
12
11
  items?: OverflowMenuContextItem[] | undefined;
13
12
  userProps?: ({
14
13
  name: string;
@@ -3,9 +3,8 @@ import { OverflowMenuProps, OverflowMenuContextItem, OverflowMenuNavItem } from
3
3
  declare const _default: {
4
4
  title: string;
5
5
  component: import("react").ForwardRefExoticComponent<{
6
- id?: string | undefined;
7
- htmlProps?: Omit<import("react").HTMLAttributes<HTMLDivElement>, "id"> | undefined;
8
- } & {
6
+ htmlProps?: import("react").HTMLAttributes<HTMLDivElement> | undefined;
7
+ } & Pick<import("react").HTMLAttributes<HTMLDivElement>, "id" | "className"> & {
9
8
  items?: OverflowMenuContextItem[] | undefined;
10
9
  userProps?: ({
11
10
  name: string;
@@ -27,9 +27,8 @@ export declare type PaginationProps = BaseComponentProps<HTMLElement, {
27
27
  smallScreen?: boolean;
28
28
  }, Omit<HTMLAttributes<HTMLElement>, 'onChange'>>;
29
29
  export declare const Pagination: import("react").ForwardRefExoticComponent<{
30
- id?: string | undefined;
31
- htmlProps?: Omit<Omit<HTMLAttributes<HTMLElement>, "onChange">, "id"> | undefined;
32
- } & {
30
+ htmlProps?: Omit<HTMLAttributes<HTMLElement>, "onChange"> | undefined;
31
+ } & Pick<Omit<HTMLAttributes<HTMLElement>, "onChange">, "className" | "id"> & {
33
32
  /**Totalt antall elementer å paginere. */
34
33
  itemsAmount: number;
35
34
  /**Antall elementer per side ved innlastning av komponenten. */
@@ -3,9 +3,8 @@ import { PaginationProps } from '.';
3
3
  declare const _default: {
4
4
  title: string;
5
5
  component: import("react").ForwardRefExoticComponent<{
6
- id?: string | undefined;
7
- htmlProps?: Omit<Omit<import("react").HTMLAttributes<HTMLElement>, "onChange">, "id"> | undefined;
8
- } & {
6
+ htmlProps?: Omit<import("react").HTMLAttributes<HTMLElement>, "onChange"> | undefined;
7
+ } & Pick<Omit<import("react").HTMLAttributes<HTMLElement>, "onChange">, "id" | "className"> & {
9
8
  itemsAmount: number;
10
9
  defaultItemsPerPage?: number | undefined;
11
10
  defaultActivePage?: number | undefined;
@@ -31,9 +31,8 @@ export declare type PopoverProps = BaseComponentPropsWithChildren<HTMLDivElement
31
31
  sizeProps?: PopoverSizeProps;
32
32
  }>;
33
33
  export declare const Popover: import("react").ForwardRefExoticComponent<{
34
- id?: string | undefined;
35
- htmlProps?: Omit<import("react").HTMLAttributes<HTMLDivElement>, "id"> | undefined;
36
- } & {
34
+ htmlProps?: import("react").HTMLAttributes<HTMLDivElement> | undefined;
35
+ } & Pick<import("react").HTMLAttributes<HTMLDivElement>, "className" | "id"> & {
37
36
  /**Tittel. */
38
37
  title?: string | ReactNode;
39
38
  /** **OBS!** Propen settes automatisk av `<PopoverGroup />`. Spesifiserer om `<Popover />` skal vises. */
@@ -4,9 +4,8 @@ import { Placement } from '../../hooks';
4
4
  declare const _default: {
5
5
  title: string;
6
6
  component: import("react").ForwardRefExoticComponent<{
7
- id?: string | undefined;
8
- htmlProps?: Omit<import("react").HTMLAttributes<HTMLDivElement>, "id"> | undefined;
9
- } & {
7
+ htmlProps?: import("react").HTMLAttributes<HTMLDivElement> | undefined;
8
+ } & Pick<import("react").HTMLAttributes<HTMLDivElement>, "id" | "className"> & {
10
9
  title?: import("react").ReactNode;
11
10
  isOpen?: boolean | undefined;
12
11
  withCloseButton?: boolean | undefined;
@@ -1,8 +1,7 @@
1
1
  /// <reference types="react" />
2
2
  export declare const RadioButton: import("react").ForwardRefExoticComponent<{
3
- id?: string | undefined;
4
- htmlProps?: Omit<Omit<import("react").InputHTMLAttributes<HTMLInputElement>, "name" | "readOnly" | "checked" | "value" | "required" | "onChange" | "aria-describedby">, "id"> | undefined;
5
- } & {
3
+ htmlProps?: Omit<import("react").InputHTMLAttributes<HTMLInputElement>, "name" | "readOnly" | "checked" | "value" | "required" | "onChange" | "aria-describedby"> | undefined;
4
+ } & Pick<Omit<import("react").InputHTMLAttributes<HTMLInputElement>, "name" | "readOnly" | "checked" | "value" | "required" | "onChange" | "aria-describedby">, "id" | "className"> & {
6
5
  label?: string | undefined;
7
6
  disabled?: boolean | undefined;
8
7
  error?: boolean | undefined;
@@ -3,9 +3,8 @@ import { RadioButtonProps } from '.';
3
3
  declare const _default: {
4
4
  title: string;
5
5
  component: import("react").ForwardRefExoticComponent<{
6
- id?: string | undefined;
7
- htmlProps?: Omit<Omit<import("react").InputHTMLAttributes<HTMLInputElement>, "aria-describedby" | "onChange" | "name" | "value" | "checked" | "readOnly" | "required">, "id"> | undefined;
8
- } & {
6
+ htmlProps?: Omit<import("react").InputHTMLAttributes<HTMLInputElement>, "aria-describedby" | "onChange" | "name" | "value" | "checked" | "readOnly" | "required"> | undefined;
7
+ } & Pick<Omit<import("react").InputHTMLAttributes<HTMLInputElement>, "aria-describedby" | "onChange" | "name" | "value" | "checked" | "readOnly" | "required">, "id" | "className"> & {
9
8
  label?: string | undefined;
10
9
  disabled?: boolean | undefined;
11
10
  error?: boolean | undefined;
@@ -25,5 +25,5 @@ export declare type RadioButtonGroupProps<T extends string | number> = BaseCompo
25
25
  /**custom id for for gruppen, knytter `label` til gruppen via `aria-label`. */
26
26
  groupId?: string;
27
27
  }, Omit<HTMLAttributes<HTMLDivElement>, 'onChange'>>;
28
- export declare const RadioButtonGroup: <T extends string | number = string>({ name, label, groupId, errorMessage, tip, disabled, readOnly, direction, value, children, required, onChange, id, htmlProps, ...rest }: RadioButtonGroupProps<T>) => JSX.Element;
28
+ export declare const RadioButtonGroup: <T extends string | number = string>({ name, label, groupId, errorMessage, tip, disabled, readOnly, direction, value, children, required, onChange, id, className, htmlProps, ...rest }: RadioButtonGroupProps<T>) => JSX.Element;
29
29
  export {};
@@ -2,7 +2,7 @@
2
2
  import { RadioButtonGroupProps } from '.';
3
3
  declare const _default: {
4
4
  title: string;
5
- component: <T extends string | number = string>({ name, label, groupId, errorMessage, tip, disabled, readOnly, direction, value, children, required, onChange, id, htmlProps, ...rest }: RadioButtonGroupProps<T>) => JSX.Element;
5
+ component: <T extends string | number = string>({ name, label, groupId, errorMessage, tip, disabled, readOnly, direction, value, children, required, onChange, id, className, htmlProps, ...rest }: RadioButtonGroupProps<T>) => JSX.Element;
6
6
  argTypes: {
7
7
  label: {
8
8
  control: {
@@ -2,7 +2,7 @@
2
2
  import { SelectProps } from './Select';
3
3
  declare const _default: {
4
4
  title: string;
5
- component: <TOption, IsMulti extends boolean = false>({ id, label, errorMessage, tip, required, readOnly, options, isMulti, value, defaultValue, width, closeMenuOnSelect, className, style, isDisabled, isClearable, placeholder, ...rest }: SelectProps<TOption, IsMulti>, ref: ((instance: import("react-select").SelectInstance<TOption, IsMulti, import("react-select").GroupBase<TOption>> | null) => void) | import("react").MutableRefObject<import("react-select").SelectInstance<TOption, IsMulti, import("react-select").GroupBase<TOption>> | null> | null) => JSX.Element;
5
+ component: <TOption extends Record<string, unknown>, IsMulti extends boolean = false>({ id, label, errorMessage, tip, required, readOnly, options, isMulti, value, defaultValue, width, closeMenuOnSelect, className, style, isDisabled, isClearable, placeholder, ...rest }: SelectProps<TOption, IsMulti>, ref: ((instance: import("react-select").SelectInstance<TOption, IsMulti, import("react-select").GroupBase<TOption>> | null) => void) | import("react").MutableRefObject<import("react-select").SelectInstance<TOption, IsMulti, import("react-select").GroupBase<TOption>> | null> | null) => JSX.Element;
6
6
  argTypes: {
7
7
  label: {
8
8
  control: {