@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.
- package/dist/components/Breadcrumbs/Breadcrumb.d.ts +3 -4
- package/dist/components/Breadcrumbs/Breadcrumbs.d.ts +2 -3
- package/dist/components/Breadcrumbs/Breadcrumbs.stories.d.ts +2 -3
- package/dist/components/Button/Button.d.ts +2 -3
- package/dist/components/Button/Button.stories.d.ts +2 -3
- package/dist/components/Card/CardAccordion/CardAccordion.d.ts +2 -3
- package/dist/components/Card/CardAccordion/CardAccordionBody.d.ts +2 -3
- package/dist/components/Card/CardAccordion/CardAccordionHeader.d.ts +2 -3
- package/dist/components/Checkbox/Checkbox.d.ts +2 -3
- package/dist/components/Checkbox/Checkbox.stories.d.ts +2 -3
- package/dist/components/Checkbox/CheckboxGroup.d.ts +5 -4
- package/dist/components/Checkbox/CheckboxGroup.stories.d.ts +1 -1
- package/dist/components/Chip/Chip.d.ts +2 -3
- package/dist/components/Chip/Chip.stories.d.ts +2 -3
- package/dist/components/DescriptionList/DescriptionList.d.ts +2 -3
- package/dist/components/DescriptionList/DescriptionList.stories.d.ts +2 -3
- package/dist/components/DescriptionList/DescriptionListDesc.d.ts +2 -3
- package/dist/components/DescriptionList/DescriptionListGroup.d.ts +2 -3
- package/dist/components/Divider/Divider.d.ts +2 -3
- package/dist/components/Divider/Divider.stories.d.ts +2 -3
- package/dist/components/Drawer/Drawer.d.ts +2 -3
- package/dist/components/Drawer/Drawer.stories.d.ts +2 -3
- package/dist/components/GlobalMessage/GlobalMessage.d.ts +2 -3
- package/dist/components/GlobalMessage/GlobalMessage.stories.d.ts +2 -3
- package/dist/components/InputMessage/InputMessage.d.ts +2 -4
- package/dist/components/InputMessage/InputMessage.stories.d.ts +2 -3
- package/dist/components/InternalHeader/InternalHeader.styles.d.ts +2 -3
- package/dist/components/List/List.d.ts +2 -3
- package/dist/components/List/List.stories.d.ts +2 -3
- package/dist/components/LocalMessage/LocalMessage.d.ts +2 -3
- package/dist/components/LocalMessage/LocalMessage.stories.d.ts +2 -3
- package/dist/components/Modal/Modal.d.ts +2 -3
- package/dist/components/Modal/Modal.stories.d.ts +2 -3
- package/dist/components/Modal/ModalBody.d.ts +2 -3
- package/dist/components/OverflowMenu/OverflowMenu.d.ts +2 -3
- package/dist/components/OverflowMenu/OverflowMenu.stories.d.ts +2 -3
- package/dist/components/Pagination/Pagination.d.ts +2 -3
- package/dist/components/Pagination/Pagination.stories.d.ts +2 -3
- package/dist/components/Popover/Popover.d.ts +2 -3
- package/dist/components/Popover/Popover.stories.d.ts +2 -3
- package/dist/components/RadioButton/RadioButton.d.ts +2 -3
- package/dist/components/RadioButton/RadioButton.stories.d.ts +2 -3
- package/dist/components/RadioButton/RadioButtonGroup.d.ts +1 -1
- package/dist/components/RadioButton/RadioButtonGroup.stories.d.ts +1 -1
- package/dist/components/Select/MultiSelect.stories.d.ts +1 -1
- package/dist/components/Select/Select.d.ts +10 -3
- package/dist/components/Select/Select.stories.d.ts +3 -7
- package/dist/components/SkipToContent/SkipToContent.d.ts +2 -3
- package/dist/components/SkipToContent/SkipToContent.stories.d.ts +2 -3
- package/dist/components/Tabs/Tab.d.ts +2 -3
- package/dist/components/Tabs/TabPanel.d.ts +2 -3
- package/dist/components/Tabs/Tabs.d.ts +4 -5
- package/dist/components/Tag/Tag.d.ts +2 -3
- package/dist/components/Tag/Tag.stories.d.ts +2 -3
- package/dist/components/ToggleButton/ToggleButton.d.ts +2 -3
- package/dist/components/ToggleButton/ToggleButton.stories.d.ts +2 -3
- package/dist/components/Tooltip/Tooltip.d.ts +3 -4
- package/dist/components/Tooltip/Tooltip.stories.d.ts +2 -4
- package/dist/components/Typography/Typography.d.ts +12 -10
- package/dist/index.es.js +466 -342
- package/dist/index.js +465 -340
- package/dist/types/BaseComponentProps.d.ts +17 -267
- package/dist/types/utils.d.ts +8 -0
- package/dist/utils/idGenerator.d.ts +1 -1
- package/package.json +9 -9
|
@@ -1,8 +1,15 @@
|
|
|
1
1
|
import { Property } from 'csstype';
|
|
2
2
|
import React from 'react';
|
|
3
3
|
import { GroupBase, Props as ReactSelectProps, SelectInstance } from 'react-select';
|
|
4
|
+
import { WithRequiredIf } from '../../types/utils';
|
|
5
|
+
export declare type SelectOption<TValue = unknown> = {
|
|
6
|
+
label: string | number;
|
|
7
|
+
value: TValue;
|
|
8
|
+
};
|
|
9
|
+
export declare const createSelectOptions: <TValue extends string | number>(...args: TValue[]) => SelectOption<TValue>[];
|
|
4
10
|
export declare function searchFilter(text: string, search: string): boolean;
|
|
5
|
-
|
|
11
|
+
declare type WrappedReactSelectProps<TOption extends Record<string, unknown>, IsMulti extends boolean, Group extends GroupBase<TOption>> = WithRequiredIf<TOption extends SelectOption ? false : true, ReactSelectProps<TOption, IsMulti, Group>, 'getOptionLabel' | 'getOptionValue'>;
|
|
12
|
+
export declare type SelectProps<TOption extends Record<string, unknown>, IsMulti extends boolean> = {
|
|
6
13
|
/**Ledetekst for nedtrekkslisten. */
|
|
7
14
|
label?: string;
|
|
8
15
|
/**Gir required styling. **OBS!** støtter ikke DOM `required` attributt. */
|
|
@@ -19,7 +26,7 @@ export declare type SelectProps<TOption, IsMulti extends boolean> = {
|
|
|
19
26
|
className?: string;
|
|
20
27
|
/** Inline styling. */
|
|
21
28
|
style?: React.CSSProperties;
|
|
22
|
-
} &
|
|
29
|
+
} & WrappedReactSelectProps<TOption, IsMulti, GroupBase<TOption>>;
|
|
23
30
|
declare type ForwardRefType<TOption, IsMulti extends boolean> = React.ForwardedRef<SelectInstance<TOption, IsMulti, GroupBase<TOption>>>;
|
|
24
|
-
export declare const Select: <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: ForwardRefType<TOption, IsMulti>) => JSX.Element;
|
|
31
|
+
export declare const Select: <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: ForwardRefType<TOption, IsMulti>) => JSX.Element;
|
|
25
32
|
export {};
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
import { SelectProps } from '.';
|
|
2
|
+
import { SelectOption, SelectProps } from '.';
|
|
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: {
|
|
@@ -62,11 +62,7 @@ declare const _default: {
|
|
|
62
62
|
};
|
|
63
63
|
};
|
|
64
64
|
export default _default;
|
|
65
|
-
declare type
|
|
66
|
-
label: string;
|
|
67
|
-
value: string;
|
|
68
|
-
};
|
|
69
|
-
declare type SingleSelectProps = SelectProps<Option, false>;
|
|
65
|
+
declare type SingleSelectProps = SelectProps<SelectOption, false>;
|
|
70
66
|
export declare const Overview: (args: SingleSelectProps) => JSX.Element;
|
|
71
67
|
export declare const Default: (args: SingleSelectProps) => JSX.Element;
|
|
72
68
|
export declare const WithLabel: (args: SingleSelectProps) => JSX.Element;
|
|
@@ -10,9 +10,8 @@ export declare type SkipToContentProps = BaseComponentProps<HTMLAnchorElement, {
|
|
|
10
10
|
top?: Property.Top<string | number>;
|
|
11
11
|
}>;
|
|
12
12
|
export declare const SkipToContent: import("react").ForwardRefExoticComponent<{
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
} & {
|
|
13
|
+
htmlProps?: import("react").HTMLAttributes<HTMLAnchorElement> | undefined;
|
|
14
|
+
} & Pick<import("react").HTMLAttributes<HTMLAnchorElement>, "className" | "id"> & {
|
|
16
15
|
/** Teksten som vises i lenka. */
|
|
17
16
|
text?: string | undefined;
|
|
18
17
|
/**Spesifiserer hvor det skal hoppes til via `id`-attributtet til innholdet. */
|
|
@@ -3,9 +3,8 @@ import { SkipToContentProps } from '.';
|
|
|
3
3
|
declare const _default: {
|
|
4
4
|
title: string;
|
|
5
5
|
component: import("react").ForwardRefExoticComponent<{
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
} & {
|
|
6
|
+
htmlProps?: import("react").HTMLAttributes<HTMLAnchorElement> | undefined;
|
|
7
|
+
} & Pick<import("react").HTMLAttributes<HTMLAnchorElement>, "id" | "className"> & {
|
|
9
8
|
text?: string | undefined;
|
|
10
9
|
href: string;
|
|
11
10
|
top?: import("csstype").Property.Top<string | number> | undefined;
|
|
@@ -18,9 +18,8 @@ export declare type TabProps = BaseComponentPropsWithChildren<HTMLButtonElement,
|
|
|
18
18
|
index?: number;
|
|
19
19
|
} & Pick<ButtonHTMLAttributes<HTMLButtonElement>, 'onClick' | 'onKeyDown'>, Omit<ButtonHTMLAttributes<HTMLButtonElement>, 'onClick' | 'onKeyDown'>>;
|
|
20
20
|
export declare const Tab: import("react").ForwardRefExoticComponent<{
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
} & {
|
|
21
|
+
htmlProps?: Omit<ButtonHTMLAttributes<HTMLButtonElement>, "onKeyDown" | "onClick"> | undefined;
|
|
22
|
+
} & Pick<Omit<ButtonHTMLAttributes<HTMLButtonElement>, "onKeyDown" | "onClick">, "className" | "id"> & {
|
|
24
23
|
/**Spesifiserer om fanen er aktiv. */
|
|
25
24
|
active?: boolean | undefined;
|
|
26
25
|
/** Ikon. */
|
|
@@ -5,9 +5,8 @@ export declare type TabPanelProps = BaseComponentPropsWithChildren<HTMLDivElemen
|
|
|
5
5
|
active?: boolean;
|
|
6
6
|
}>;
|
|
7
7
|
export declare const TabPanel: import("react").ForwardRefExoticComponent<{
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
} & {
|
|
8
|
+
htmlProps?: import("react").HTMLAttributes<HTMLDivElement> | undefined;
|
|
9
|
+
} & Pick<import("react").HTMLAttributes<HTMLDivElement>, "className" | "id"> & {
|
|
11
10
|
/** Spesifiserer om panelet skal vises basert på aktiv fane. */
|
|
12
11
|
active?: boolean | undefined;
|
|
13
12
|
} & {
|
|
@@ -2,7 +2,7 @@ import { HTMLAttributes } from 'react';
|
|
|
2
2
|
import { BaseComponentPropsWithChildren, Direction } from '../../types';
|
|
3
3
|
import { Property } from 'csstype';
|
|
4
4
|
export declare type TabsProps = BaseComponentPropsWithChildren<HTMLDivElement, {
|
|
5
|
-
/** Indeksen til den aktive fanen. */
|
|
5
|
+
/** Indeksen til den aktive fanen. **OBS!** Ved å sette denne vil brukere aldri kunne endre tab uten at du også registrerer en `onChange`-lytter for å ta vare på aktiv tab utenfor komponenten. */
|
|
6
6
|
activeTab?: number;
|
|
7
7
|
/** Ekstra logikk ved endring av aktiv fane. */
|
|
8
8
|
onChange?: (index: number) => void;
|
|
@@ -12,10 +12,9 @@ export declare type TabsProps = BaseComponentPropsWithChildren<HTMLDivElement, {
|
|
|
12
12
|
tabWidth?: Property.Width;
|
|
13
13
|
}, Omit<HTMLAttributes<HTMLDivElement>, 'onChange'>>;
|
|
14
14
|
export declare const Tabs: import("react").ForwardRefExoticComponent<{
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
/** Indeksen til den aktive fanen. */
|
|
15
|
+
htmlProps?: Omit<HTMLAttributes<HTMLDivElement>, "onChange"> | undefined;
|
|
16
|
+
} & Pick<Omit<HTMLAttributes<HTMLDivElement>, "onChange">, "className" | "id"> & {
|
|
17
|
+
/** Indeksen til den aktive fanen. **OBS!** Ved å sette denne vil brukere aldri kunne endre tab uten at du også registrerer en `onChange`-lytter for å ta vare på aktiv tab utenfor komponenten. */
|
|
19
18
|
activeTab?: number | undefined;
|
|
20
19
|
/** Ekstra logikk ved endring av aktiv fane. */
|
|
21
20
|
onChange?: ((index: number) => void) | undefined;
|
|
@@ -8,9 +8,8 @@ export declare type TagProps = BaseComponentProps<HTMLSpanElement, {
|
|
|
8
8
|
purpose?: TagPurpose;
|
|
9
9
|
}>;
|
|
10
10
|
export declare const Tag: import("react").ForwardRefExoticComponent<{
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
} & {
|
|
11
|
+
htmlProps?: import("react").HTMLAttributes<HTMLSpanElement> | undefined;
|
|
12
|
+
} & Pick<import("react").HTMLAttributes<HTMLSpanElement>, "id" | "className"> & {
|
|
14
13
|
/**Tekst som vises i `<Tag />.` */
|
|
15
14
|
text?: string | undefined;
|
|
16
15
|
/**Formål med status eller kategorisering. Påvirker styling. */
|
|
@@ -3,9 +3,8 @@ import { TagProps } from '.';
|
|
|
3
3
|
declare const _default: {
|
|
4
4
|
title: string;
|
|
5
5
|
component: import("react").ForwardRefExoticComponent<{
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
} & {
|
|
6
|
+
htmlProps?: import("react").HTMLAttributes<HTMLSpanElement> | undefined;
|
|
7
|
+
} & Pick<import("react").HTMLAttributes<HTMLSpanElement>, "id" | "className"> & {
|
|
9
8
|
text?: string | undefined;
|
|
10
9
|
purpose?: import("./Tag").TagPurpose | undefined;
|
|
11
10
|
} & import("react").RefAttributes<HTMLSpanElement>>;
|
|
@@ -9,9 +9,8 @@ export declare type ToggleButtonProps = BaseComponentProps<HTMLInputElement, {
|
|
|
9
9
|
Icon?: OverridableComponent<SvgIconTypeMap<Record<string, unknown>, 'svg'>>;
|
|
10
10
|
}, InputHTMLAttributes<HTMLInputElement>>;
|
|
11
11
|
export declare const ToggleButton: import("react").ForwardRefExoticComponent<{
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
} & {
|
|
12
|
+
htmlProps?: InputHTMLAttributes<HTMLInputElement> | undefined;
|
|
13
|
+
} & Pick<InputHTMLAttributes<HTMLInputElement>, "className" | "id"> & {
|
|
15
14
|
/**Ledetekst for inputelementet. */
|
|
16
15
|
label?: string | undefined;
|
|
17
16
|
/** Ikon. */
|
|
@@ -3,9 +3,8 @@ import { ToggleButtonProps } from '.';
|
|
|
3
3
|
declare const _default: {
|
|
4
4
|
title: string;
|
|
5
5
|
component: import("react").ForwardRefExoticComponent<{
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
} & {
|
|
6
|
+
htmlProps?: import("react").InputHTMLAttributes<HTMLInputElement> | undefined;
|
|
7
|
+
} & Pick<import("react").InputHTMLAttributes<HTMLInputElement>, "id" | "className"> & {
|
|
9
8
|
label?: string | undefined;
|
|
10
9
|
Icon?: import("@mui/material/OverridableComponent").OverridableComponent<import("@mui/material").SvgIconTypeMap<Record<string, unknown>, "svg">> | undefined;
|
|
11
10
|
} & import("react").RefAttributes<HTMLInputElement>>;
|
|
@@ -2,7 +2,7 @@ import React, { HTMLAttributes } from 'react';
|
|
|
2
2
|
import { Placement } from '../../hooks';
|
|
3
3
|
import { BaseComponentProps } from '../../types';
|
|
4
4
|
declare type AnchorElement = React.ReactElement & React.RefAttributes<HTMLElement>;
|
|
5
|
-
declare type PickedHTMLAttributes = Pick<HTMLAttributes<HTMLDivElement>, 'style' | 'onMouseLeave' | 'onMouseOver'
|
|
5
|
+
declare type PickedHTMLAttributes = Pick<HTMLAttributes<HTMLDivElement>, 'style' | 'onMouseLeave' | 'onMouseOver'>;
|
|
6
6
|
export declare type TooltipProps = BaseComponentProps<HTMLDivElement, {
|
|
7
7
|
/**Innhold i tooltip. */
|
|
8
8
|
text: string;
|
|
@@ -16,9 +16,8 @@ export declare type TooltipProps = BaseComponentProps<HTMLDivElement, {
|
|
|
16
16
|
tooltipId?: string;
|
|
17
17
|
} & PickedHTMLAttributes, Omit<HTMLAttributes<HTMLDivElement>, 'children' | keyof PickedHTMLAttributes>>;
|
|
18
18
|
export declare const Tooltip: React.ForwardRefExoticComponent<{
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
} & {
|
|
19
|
+
htmlProps?: Omit<React.HTMLAttributes<HTMLDivElement>, "style" | "onMouseLeave" | "onMouseOver" | "children"> | undefined;
|
|
20
|
+
} & Pick<Omit<React.HTMLAttributes<HTMLDivElement>, "style" | "onMouseLeave" | "onMouseOver" | "children">, "className" | "id"> & {
|
|
22
21
|
/**Innhold i tooltip. */
|
|
23
22
|
text: string;
|
|
24
23
|
/**Plassering i forhold til anchor-elementet. */
|
|
@@ -3,16 +3,14 @@ import { TooltipProps } from '.';
|
|
|
3
3
|
declare const _default: {
|
|
4
4
|
title: string;
|
|
5
5
|
component: import("react").ForwardRefExoticComponent<{
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
} & {
|
|
6
|
+
htmlProps?: Omit<import("react").HTMLAttributes<HTMLDivElement>, "children" | "style" | "onMouseLeave" | "onMouseOver"> | undefined;
|
|
7
|
+
} & Pick<Omit<import("react").HTMLAttributes<HTMLDivElement>, "children" | "style" | "onMouseLeave" | "onMouseOver">, "id" | "className"> & {
|
|
9
8
|
text: string;
|
|
10
9
|
placement?: import("../../hooks").Placement | undefined;
|
|
11
10
|
children: import("react").ReactElement<any, string | import("react").JSXElementConstructor<any>> & import("react").RefAttributes<HTMLElement>;
|
|
12
11
|
delay?: number | undefined;
|
|
13
12
|
tooltipId?: string | undefined;
|
|
14
13
|
} & {
|
|
15
|
-
className?: string | undefined;
|
|
16
14
|
style?: import("react").CSSProperties | undefined;
|
|
17
15
|
onMouseLeave?: import("react").MouseEventHandler<HTMLDivElement> | undefined;
|
|
18
16
|
onMouseOver?: import("react").MouseEventHandler<HTMLDivElement> | undefined;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { ElementType, PropsWithChildren, HTMLAttributes, AnchorHTMLAttributes } from 'react';
|
|
2
2
|
import { CSSObject } from 'styled-components';
|
|
3
3
|
import { TextColor, OtherTypographyType, AnchorTypographyType, LabelTypographyType } from './Typography.types';
|
|
4
|
+
import { BaseComponentProps } from '../../types';
|
|
4
5
|
export declare function isTextColor(color: string): color is TextColor;
|
|
5
6
|
export declare const getTextColor: (color: TextColor | string) => string;
|
|
6
7
|
export declare type TypographyInteractionProps = {
|
|
@@ -22,24 +23,25 @@ declare type BaseTypographyProps = PropsWithChildren<{
|
|
|
22
23
|
underline?: boolean;
|
|
23
24
|
/**Støtte for å enkelt kunne endre på hover- og active-styling. Bruk `@dds-design-tokens` til farger osv. */
|
|
24
25
|
interactionProps?: TypographyInteractionProps;
|
|
25
|
-
}>;
|
|
26
|
-
declare type AnchorTypographyProps = BaseTypographyProps & {
|
|
27
|
-
/**Styling basert på det typografiske utvalget definert i Figma. Returnerer default HTML tag for hver type. **OBS!** Ved bruk av `'a'` er det flere tilgjengelige props, se under. */
|
|
28
|
-
typographyType?: AnchorTypographyType;
|
|
26
|
+
}> & Pick<HTMLAttributes<HTMLElement>, 'style'>;
|
|
27
|
+
declare type AnchorTypographyProps = BaseComponentProps<HTMLAnchorElement, BaseTypographyProps & {
|
|
29
28
|
href?: string | undefined;
|
|
30
29
|
/** Spesifiserer om lenka er ekstern ved `typographyType='a'` eller `as='a'`.*/
|
|
31
30
|
externalLink?: boolean;
|
|
32
31
|
/**nativ `target`-prop ved `typographyType='a'`. */
|
|
33
32
|
target?: string;
|
|
34
|
-
}
|
|
35
|
-
declare type LabelTypographyProps = BaseTypographyProps
|
|
33
|
+
}, AnchorHTMLAttributes<HTMLAnchorElement>>;
|
|
34
|
+
declare type LabelTypographyProps = BaseComponentProps<HTMLLabelElement, BaseTypographyProps, HTMLAttributes<HTMLLabelElement>>;
|
|
35
|
+
declare type OtherTypographyProps = BaseComponentProps<HTMLElement, BaseTypographyProps, HTMLAttributes<HTMLElement>>;
|
|
36
|
+
export declare type TypographyProps = ({
|
|
37
|
+
/**Styling basert på det typografiske utvalget definert i Figma. Returnerer default HTML tag for hver type. **OBS!** Ved bruk av `'a'` er det flere tilgjengelige props, se under. */
|
|
38
|
+
typographyType?: AnchorTypographyType;
|
|
39
|
+
} & AnchorTypographyProps) | ({
|
|
36
40
|
/**Styling basert på det typografiske utvalget definert i Figma. Returnerer default HTML tag for hver type. **OBS!** Ved bruk av `'a'` er det flere tilgjengelige props, se under. */
|
|
37
41
|
typographyType?: LabelTypographyType;
|
|
38
|
-
} &
|
|
39
|
-
declare type OtherTypographyProps = BaseTypographyProps & {
|
|
42
|
+
} & LabelTypographyProps) | ({
|
|
40
43
|
/**Styling basert på det typografiske utvalget definert i Figma. Returnerer default HTML tag for hver type. **OBS!** Ved bruk av `'a'` er det flere tilgjengelige props, se under. */
|
|
41
44
|
typographyType?: OtherTypographyType;
|
|
42
|
-
} &
|
|
43
|
-
export declare type TypographyProps = AnchorTypographyProps | LabelTypographyProps | OtherTypographyProps;
|
|
45
|
+
} & OtherTypographyProps);
|
|
44
46
|
export declare const Typography: import("react").ForwardRefExoticComponent<TypographyProps & import("react").RefAttributes<HTMLElement>>;
|
|
45
47
|
export {};
|