@norges-domstoler/dds-components 7.0.1 → 7.2.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.
- package/README.md +2 -0
- package/dist/cjs/components/Button/Button.stories.d.ts +3 -3
- package/dist/cjs/components/Checkbox/Checkbox.stories.d.ts +3 -3
- package/dist/cjs/components/Grid/Grid.context.d.ts +6 -0
- package/dist/cjs/components/Grid/Grid.d.ts +24 -0
- package/dist/cjs/components/Grid/Grid.stories.d.ts +8 -0
- package/dist/cjs/components/Grid/Grid.tokens.d.ts +82 -0
- package/dist/cjs/components/Grid/Grid.utils.d.ts +3 -0
- package/dist/cjs/components/Grid/GridChild.d.ts +24 -0
- package/dist/cjs/components/Grid/index.d.ts +2 -0
- package/dist/cjs/components/ProgressTracker/ProgressTracker.context.d.ts +6 -0
- package/dist/cjs/components/ProgressTracker/ProgressTracker.d.ts +12 -0
- package/dist/cjs/components/ProgressTracker/ProgressTracker.stories.d.ts +40 -0
- package/dist/cjs/components/ProgressTracker/ProgressTracker.tokens.d.ts +69 -0
- package/dist/cjs/components/ProgressTracker/ProgressTrackerItem.d.ts +24 -0
- package/dist/cjs/components/ProgressTracker/index.d.ts +1 -0
- package/dist/cjs/components/RadioButton/RadioButton.stories.d.ts +3 -3
- package/dist/cjs/components/Search/Search.d.ts +2 -2
- package/dist/cjs/components/Search/Search.stories.d.ts +7 -1
- package/dist/cjs/components/Search/Search.tokens.d.ts +4 -1
- package/dist/cjs/components/Table/Cell.d.ts +1 -1
- package/dist/cjs/components/Table/Table.d.ts +4 -0
- package/dist/cjs/components/Table/Table.stories.d.ts +7 -0
- package/dist/cjs/components/Table/Table.tokens.d.ts +72 -0
- package/dist/cjs/components/Tooltip/Tooltip.stories.d.ts +2 -2
- package/dist/cjs/components/Typography/Label/Label.d.ts +6 -2
- package/dist/cjs/components/Typography/Label/Label.stories.d.ts +2 -0
- package/dist/cjs/index.d.ts +2 -1
- package/dist/cjs/index.js +1232 -964
- package/dist/components/Breadcrumbs/Breadcrumb.js +7 -0
- package/dist/components/Button/Button.stories.d.ts +3 -3
- package/dist/components/Checkbox/Checkbox.js +5 -5
- package/dist/components/Checkbox/Checkbox.stories.d.ts +3 -3
- package/dist/components/Datepicker/Datepicker.js +6 -5
- package/dist/components/Drawer/Drawer.js +7 -7
- package/dist/components/GlobalMessage/GlobalMessage.js +7 -0
- package/dist/components/Grid/Grid.context.d.ts +6 -0
- package/dist/components/Grid/Grid.context.js +12 -0
- package/dist/components/Grid/Grid.d.ts +24 -0
- package/dist/components/Grid/Grid.js +61 -0
- package/dist/components/Grid/Grid.stories.d.ts +8 -0
- package/dist/components/Grid/Grid.tokens.d.ts +82 -0
- package/dist/components/Grid/Grid.tokens.js +89 -0
- package/dist/components/Grid/Grid.utils.d.ts +3 -0
- package/dist/components/Grid/Grid.utils.js +24 -0
- package/dist/components/Grid/GridChild.d.ts +24 -0
- package/dist/components/Grid/GridChild.js +46 -0
- package/dist/components/Grid/index.d.ts +2 -0
- package/dist/components/InputMessage/InputMessage.js +7 -0
- package/dist/components/InternalHeader/InternalHeader.js +7 -0
- package/dist/components/LocalMessage/LocalMessage.js +7 -0
- package/dist/components/Modal/Modal.js +2 -2
- package/dist/components/Pagination/Pagination.js +7 -0
- package/dist/components/Popover/Popover.js +7 -0
- package/dist/components/ProgressTracker/ProgressTracker.context.d.ts +6 -0
- package/dist/components/ProgressTracker/ProgressTracker.context.js +10 -0
- package/dist/components/ProgressTracker/ProgressTracker.d.ts +12 -0
- package/dist/components/ProgressTracker/ProgressTracker.js +93 -0
- package/dist/components/ProgressTracker/ProgressTracker.stories.d.ts +40 -0
- package/dist/components/ProgressTracker/ProgressTracker.tokens.d.ts +69 -0
- package/dist/components/ProgressTracker/ProgressTracker.tokens.js +80 -0
- package/dist/components/ProgressTracker/ProgressTrackerItem.d.ts +24 -0
- package/dist/components/ProgressTracker/ProgressTrackerItem.js +168 -0
- package/dist/components/ProgressTracker/index.d.ts +1 -0
- package/dist/components/RadioButton/RadioButton.js +3 -3
- package/dist/components/RadioButton/RadioButton.stories.d.ts +3 -3
- package/dist/components/Search/Search.d.ts +2 -2
- package/dist/components/Search/Search.js +36 -28
- package/dist/components/Search/Search.stories.d.ts +7 -1
- package/dist/components/Search/Search.tokens.d.ts +4 -1
- package/dist/components/Search/Search.tokens.js +6 -2
- package/dist/components/Select/Select.js +6 -12
- package/dist/components/Table/Cell.d.ts +1 -1
- package/dist/components/Table/Cell.js +6 -4
- package/dist/components/Table/Row.js +12 -5
- package/dist/components/Table/SortCell.js +8 -11
- package/dist/components/Table/Table.d.ts +4 -0
- package/dist/components/Table/Table.js +8 -3
- package/dist/components/Table/Table.stories.d.ts +7 -0
- package/dist/components/Table/Table.tokens.d.ts +72 -0
- package/dist/components/Table/Table.tokens.js +69 -0
- package/dist/components/Tag/Tag.js +7 -0
- package/dist/components/TextInput/CharCounter.js +7 -0
- package/dist/components/TextInput/TextInput.js +8 -7
- package/dist/components/ToggleBar/ToggleBar.js +7 -0
- package/dist/components/ToggleButton/ToggleButtonGroup.js +7 -0
- package/dist/components/Tooltip/Tooltip.stories.d.ts +2 -2
- package/dist/components/Typography/Label/Label.d.ts +6 -2
- package/dist/components/Typography/Label/Label.js +13 -5
- package/dist/components/Typography/Label/Label.stories.d.ts +2 -0
- package/dist/index.d.ts +2 -1
- package/dist/index.js +3 -2
- package/package.json +1 -1
- package/dist/cjs/components/Stepper/Step.d.ts +0 -20
- package/dist/cjs/components/Stepper/Stepper.context.d.ts +0 -6
- package/dist/cjs/components/Stepper/Stepper.d.ts +0 -11
- package/dist/cjs/components/Stepper/Stepper.stories.d.ts +0 -25
- package/dist/cjs/components/Stepper/Stepper.tokens.d.ts +0 -39
- package/dist/cjs/components/Stepper/index.d.ts +0 -2
- package/dist/cjs/components/Table/Cell.tokens.d.ts +0 -31
- package/dist/cjs/components/Table/Row.tokens.d.ts +0 -32
- package/dist/components/Stepper/Step.d.ts +0 -20
- package/dist/components/Stepper/Step.js +0 -118
- package/dist/components/Stepper/Stepper.context.d.ts +0 -6
- package/dist/components/Stepper/Stepper.context.js +0 -10
- package/dist/components/Stepper/Stepper.d.ts +0 -11
- package/dist/components/Stepper/Stepper.js +0 -66
- package/dist/components/Stepper/Stepper.stories.d.ts +0 -25
- package/dist/components/Stepper/Stepper.tokens.d.ts +0 -39
- package/dist/components/Stepper/Stepper.tokens.js +0 -49
- package/dist/components/Stepper/index.d.ts +0 -2
- package/dist/components/Table/Cell.tokens.d.ts +0 -31
- package/dist/components/Table/Cell.tokens.js +0 -60
- package/dist/components/Table/Row.tokens.d.ts +0 -32
- package/dist/components/Table/Row.tokens.js +0 -73
package/README.md
CHANGED
|
@@ -48,6 +48,7 @@ Tilgjengelige komponenter:
|
|
|
48
48
|
- Divider
|
|
49
49
|
- Drawer
|
|
50
50
|
- GlobalMessage
|
|
51
|
+
- Grid
|
|
51
52
|
- Icon
|
|
52
53
|
- InputMessage
|
|
53
54
|
- InternaHeader
|
|
@@ -57,6 +58,7 @@ Tilgjengelige komponenter:
|
|
|
57
58
|
- OverflowMenu
|
|
58
59
|
- Pagination
|
|
59
60
|
- Popover
|
|
61
|
+
- ProgressTracker
|
|
60
62
|
- RadioButton
|
|
61
63
|
- Scrollbar
|
|
62
64
|
- Search
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { ButtonProps } from '.';
|
|
2
2
|
declare const _default: {
|
|
3
3
|
title: string;
|
|
4
|
-
component: import("react").ForwardRefExoticComponent<Pick<Omit<import("react").ButtonHTMLAttributes<HTMLButtonElement>, "
|
|
4
|
+
component: import("react").ForwardRefExoticComponent<Pick<Omit<import("react").ButtonHTMLAttributes<HTMLButtonElement>, "type" | "onFocus" | "onBlur" | "onClick">, "id" | "className"> & {
|
|
5
5
|
size?: import("./Button.types").ButtonSize | undefined;
|
|
6
6
|
label?: string | undefined;
|
|
7
7
|
purpose?: import("./Button.types").ButtonPurpose | undefined;
|
|
@@ -13,12 +13,12 @@ declare const _default: {
|
|
|
13
13
|
href?: string | undefined;
|
|
14
14
|
target?: string | undefined;
|
|
15
15
|
} & {
|
|
16
|
+
type?: "button" | "submit" | "reset" | undefined;
|
|
16
17
|
onFocus?: import("react").FocusEventHandler<HTMLButtonElement> | undefined;
|
|
17
18
|
onBlur?: import("react").FocusEventHandler<HTMLButtonElement> | undefined;
|
|
18
19
|
onClick?: import("react").MouseEventHandler<HTMLButtonElement> | undefined;
|
|
19
|
-
type?: "button" | "submit" | "reset" | undefined;
|
|
20
20
|
} & {
|
|
21
|
-
htmlProps?: Omit<import("react").ButtonHTMLAttributes<HTMLButtonElement>, "
|
|
21
|
+
htmlProps?: Omit<import("react").ButtonHTMLAttributes<HTMLButtonElement>, "type" | "onFocus" | "onBlur" | "onClick"> | undefined;
|
|
22
22
|
} & import("react").RefAttributes<HTMLButtonElement>>;
|
|
23
23
|
argTypes: {
|
|
24
24
|
label: {
|
|
@@ -1,23 +1,23 @@
|
|
|
1
1
|
import { CheckboxProps } from '.';
|
|
2
2
|
declare const _default: {
|
|
3
3
|
title: string;
|
|
4
|
-
component: import("react").ForwardRefExoticComponent<Pick<Omit<import("react").InputHTMLAttributes<HTMLInputElement>, "defaultChecked" | "defaultValue" | "aria-describedby" | "onBlur" | "onChange" | "
|
|
4
|
+
component: import("react").ForwardRefExoticComponent<Pick<Omit<import("react").InputHTMLAttributes<HTMLInputElement>, "name" | "defaultChecked" | "defaultValue" | "aria-describedby" | "onBlur" | "onChange" | "value" | "checked">, "id" | "className"> & {
|
|
5
5
|
label?: string | undefined;
|
|
6
6
|
error?: boolean | undefined;
|
|
7
7
|
disabled?: boolean | undefined;
|
|
8
8
|
readOnly?: boolean | undefined;
|
|
9
9
|
indeterminate?: boolean | undefined;
|
|
10
10
|
} & {
|
|
11
|
+
name?: string | undefined;
|
|
11
12
|
defaultChecked?: boolean | undefined;
|
|
12
13
|
defaultValue?: string | number | readonly string[] | undefined;
|
|
13
14
|
'aria-describedby'?: string | undefined;
|
|
14
15
|
onBlur?: import("react").FocusEventHandler<HTMLInputElement> | undefined;
|
|
15
16
|
onChange?: import("react").ChangeEventHandler<HTMLInputElement> | undefined;
|
|
16
|
-
name?: string | undefined;
|
|
17
17
|
value?: string | number | readonly string[] | undefined;
|
|
18
18
|
checked?: boolean | undefined;
|
|
19
19
|
} & {
|
|
20
|
-
htmlProps?: Omit<import("react").InputHTMLAttributes<HTMLInputElement>, "defaultChecked" | "defaultValue" | "aria-describedby" | "onBlur" | "onChange" | "
|
|
20
|
+
htmlProps?: Omit<import("react").InputHTMLAttributes<HTMLInputElement>, "name" | "defaultChecked" | "defaultValue" | "aria-describedby" | "onBlur" | "onChange" | "value" | "checked"> | undefined;
|
|
21
21
|
} & import("react").RefAttributes<HTMLInputElement>>;
|
|
22
22
|
argTypes: {
|
|
23
23
|
label: {
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { BaseComponentPropsWithChildren } from '../../types';
|
|
2
|
+
import { Property } from 'csstype';
|
|
3
|
+
import { HTMLAttributes } from 'react';
|
|
4
|
+
declare type MaxWidthGrid = {
|
|
5
|
+
xs?: Property.MaxWidth;
|
|
6
|
+
sm?: Property.MaxWidth;
|
|
7
|
+
md?: Property.MaxWidth;
|
|
8
|
+
lg?: Property.MaxWidth;
|
|
9
|
+
xl?: Property.MaxWidth;
|
|
10
|
+
};
|
|
11
|
+
declare type BaseGridProps = {
|
|
12
|
+
/**Maksimal bredde. Gjøres per brekkepunkt. */
|
|
13
|
+
maxWidth?: MaxWidthGrid;
|
|
14
|
+
} & Pick<HTMLAttributes<HTMLElement>, 'style'>;
|
|
15
|
+
declare type GridDivProps = BaseComponentPropsWithChildren<HTMLDivElement, {
|
|
16
|
+
/**HTML tag som returneres. */
|
|
17
|
+
as: 'div';
|
|
18
|
+
} & BaseGridProps>;
|
|
19
|
+
declare type GridFormProps = BaseComponentPropsWithChildren<HTMLFormElement, {
|
|
20
|
+
as: 'form';
|
|
21
|
+
} & BaseGridProps>;
|
|
22
|
+
export declare type GridProps = GridDivProps | GridFormProps;
|
|
23
|
+
export declare const Grid: (props: GridProps) => JSX.Element;
|
|
24
|
+
export {};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { GridProps } from '.';
|
|
2
|
+
declare const _default: {
|
|
3
|
+
title: string;
|
|
4
|
+
component: (props: GridProps) => JSX.Element;
|
|
5
|
+
};
|
|
6
|
+
export default _default;
|
|
7
|
+
export declare const PageExample: (args: GridProps) => JSX.Element;
|
|
8
|
+
export declare const JustRelativeColumns: (args: GridProps) => JSX.Element;
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
export declare const gridTokens: {
|
|
2
|
+
0: {
|
|
3
|
+
grid: {
|
|
4
|
+
columns: number;
|
|
5
|
+
gap: string;
|
|
6
|
+
marginLeft: string;
|
|
7
|
+
marginRight: string;
|
|
8
|
+
};
|
|
9
|
+
columns: {
|
|
10
|
+
firstHalf: {
|
|
11
|
+
gridColumn: string;
|
|
12
|
+
};
|
|
13
|
+
secondHalf: {
|
|
14
|
+
gridColumn: string;
|
|
15
|
+
};
|
|
16
|
+
};
|
|
17
|
+
};
|
|
18
|
+
1: {
|
|
19
|
+
grid: {
|
|
20
|
+
columns: number;
|
|
21
|
+
gap: string;
|
|
22
|
+
marginLeft: string;
|
|
23
|
+
marginRight: string;
|
|
24
|
+
};
|
|
25
|
+
columns: {
|
|
26
|
+
firstHalf: {
|
|
27
|
+
gridColumn: string;
|
|
28
|
+
};
|
|
29
|
+
secondHalf: {
|
|
30
|
+
gridColumn: string;
|
|
31
|
+
};
|
|
32
|
+
};
|
|
33
|
+
};
|
|
34
|
+
2: {
|
|
35
|
+
grid: {
|
|
36
|
+
columns: number;
|
|
37
|
+
gap: string;
|
|
38
|
+
marginLeft: string;
|
|
39
|
+
marginRight: string;
|
|
40
|
+
};
|
|
41
|
+
columns: {
|
|
42
|
+
firstHalf: {
|
|
43
|
+
gridColumn: string;
|
|
44
|
+
};
|
|
45
|
+
secondHalf: {
|
|
46
|
+
gridColumn: string;
|
|
47
|
+
};
|
|
48
|
+
};
|
|
49
|
+
};
|
|
50
|
+
3: {
|
|
51
|
+
grid: {
|
|
52
|
+
columns: number;
|
|
53
|
+
gap: string;
|
|
54
|
+
marginLeft: string;
|
|
55
|
+
marginRight: string;
|
|
56
|
+
};
|
|
57
|
+
columns: {
|
|
58
|
+
firstHalf: {
|
|
59
|
+
gridColumn: string;
|
|
60
|
+
};
|
|
61
|
+
secondHalf: {
|
|
62
|
+
gridColumn: string;
|
|
63
|
+
};
|
|
64
|
+
};
|
|
65
|
+
};
|
|
66
|
+
4: {
|
|
67
|
+
grid: {
|
|
68
|
+
columns: number;
|
|
69
|
+
gap: string;
|
|
70
|
+
marginLeft: string;
|
|
71
|
+
marginRight: string;
|
|
72
|
+
};
|
|
73
|
+
columns: {
|
|
74
|
+
firstHalf: {
|
|
75
|
+
gridColumn: string;
|
|
76
|
+
};
|
|
77
|
+
secondHalf: {
|
|
78
|
+
gridColumn: string;
|
|
79
|
+
};
|
|
80
|
+
};
|
|
81
|
+
};
|
|
82
|
+
};
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { Property } from 'csstype';
|
|
2
|
+
import { BaseComponentPropsWithChildren } from '../../types';
|
|
3
|
+
import { HTMLAttributes } from 'react';
|
|
4
|
+
export declare const isRelativeGridColumn: (type: ColumnsOccupied | undefined) => type is RelativeColumnsOccupied;
|
|
5
|
+
export declare const isGridColumn: (type: ColumnsOccupied | undefined) => type is GridColumnPerScreenSize;
|
|
6
|
+
declare type RelativeColumnsOccupied = 'all' | 'firstHalf' | 'secondHalf';
|
|
7
|
+
declare type GridColumnPerScreenSize = {
|
|
8
|
+
xs: Property.GridColumn;
|
|
9
|
+
sm: Property.GridColumn;
|
|
10
|
+
md: Property.GridColumn;
|
|
11
|
+
lg: Property.GridColumn;
|
|
12
|
+
xl: Property.GridColumn;
|
|
13
|
+
};
|
|
14
|
+
export declare type ColumnsOccupied = RelativeColumnsOccupied | GridColumnPerScreenSize;
|
|
15
|
+
export declare type GridChildProps = BaseComponentPropsWithChildren<HTMLDivElement, {
|
|
16
|
+
/**hvilke kolonner innholdet skal okkupere. Tar inn enten en string med relativ definisjon eller et objekt med egentilpassede `grid-column` CSS verdi definert for hver brekkepunkt. */
|
|
17
|
+
columnsOccupied?: ColumnsOccupied;
|
|
18
|
+
/**Plassering av innholdet på x-aksen. */
|
|
19
|
+
justifySelf?: Property.JustifySelf;
|
|
20
|
+
/**Hvilke rader innholdet skal okkupere. */
|
|
21
|
+
gridRow?: Property.GridRow;
|
|
22
|
+
}> & Pick<HTMLAttributes<HTMLElement>, 'style'>;
|
|
23
|
+
export declare const GridChild: (props: GridChildProps) => JSX.Element;
|
|
24
|
+
export {};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { ForwardRefExoticComponent } from 'react';
|
|
2
|
+
import { BaseComponentPropsWithChildren } from '../../types';
|
|
3
|
+
import { ProgressTrackerItem } from './ProgressTrackerItem';
|
|
4
|
+
declare type ProgressTrackerProps = BaseComponentPropsWithChildren<HTMLDivElement, {
|
|
5
|
+
/** Indeksen til det aktive steget. */
|
|
6
|
+
activeStep?: number;
|
|
7
|
+
}>;
|
|
8
|
+
declare type ProgressTrackerComponent = ForwardRefExoticComponent<ProgressTrackerProps> & {
|
|
9
|
+
Item: typeof ProgressTrackerItem;
|
|
10
|
+
};
|
|
11
|
+
export declare const ProgressTracker: ProgressTrackerComponent;
|
|
12
|
+
export {};
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
declare const _default: {
|
|
2
|
+
title: string;
|
|
3
|
+
component: import("react").ForwardRefExoticComponent<Pick<import("react").HTMLAttributes<HTMLDivElement>, "id" | "className"> & {
|
|
4
|
+
activeStep?: number | undefined;
|
|
5
|
+
} & {
|
|
6
|
+
children?: import("react").ReactNode;
|
|
7
|
+
} & {
|
|
8
|
+
htmlProps?: import("react").HTMLAttributes<HTMLDivElement> | undefined;
|
|
9
|
+
}> & {
|
|
10
|
+
Item: (props: ({
|
|
11
|
+
onClick: (index: number) => void;
|
|
12
|
+
} & Pick<import("react").HTMLAttributes<HTMLButtonElement>, "id" | "className"> & {
|
|
13
|
+
active?: boolean | undefined;
|
|
14
|
+
completed?: boolean | undefined;
|
|
15
|
+
disabled?: boolean | undefined;
|
|
16
|
+
icon?: import("../../icons/utils").SvgIcon | undefined;
|
|
17
|
+
index?: number | undefined;
|
|
18
|
+
} & {
|
|
19
|
+
children?: import("react").ReactNode;
|
|
20
|
+
} & {
|
|
21
|
+
htmlProps?: import("react").HTMLAttributes<HTMLButtonElement> | undefined;
|
|
22
|
+
}) | ({
|
|
23
|
+
onClick?: undefined;
|
|
24
|
+
} & Pick<import("react").HTMLAttributes<HTMLDivElement>, "id" | "className"> & {
|
|
25
|
+
active?: boolean | undefined;
|
|
26
|
+
completed?: boolean | undefined;
|
|
27
|
+
disabled?: boolean | undefined;
|
|
28
|
+
icon?: import("../../icons/utils").SvgIcon | undefined;
|
|
29
|
+
index?: number | undefined;
|
|
30
|
+
} & {
|
|
31
|
+
children?: import("react").ReactNode;
|
|
32
|
+
} & {
|
|
33
|
+
htmlProps?: import("react").HTMLAttributes<HTMLDivElement> | undefined;
|
|
34
|
+
})) => JSX.Element;
|
|
35
|
+
};
|
|
36
|
+
};
|
|
37
|
+
export default _default;
|
|
38
|
+
export declare const Overview: () => JSX.Element;
|
|
39
|
+
export declare const WithIcons: () => JSX.Element;
|
|
40
|
+
export declare const NonClickable: () => JSX.Element;
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
import { IconSize } from '../Icon';
|
|
2
|
+
export declare const progressTrackerTokens: {
|
|
3
|
+
itemsWrapper: {
|
|
4
|
+
gap: string;
|
|
5
|
+
};
|
|
6
|
+
itemContentWrapper: {
|
|
7
|
+
gap: string;
|
|
8
|
+
};
|
|
9
|
+
connector: {
|
|
10
|
+
color: string;
|
|
11
|
+
height: string;
|
|
12
|
+
width: string;
|
|
13
|
+
};
|
|
14
|
+
itemNumber: {
|
|
15
|
+
size: string;
|
|
16
|
+
borderWidth: string;
|
|
17
|
+
iconSize: IconSize;
|
|
18
|
+
fontSize: string;
|
|
19
|
+
active: {
|
|
20
|
+
borderColor: string;
|
|
21
|
+
color: string;
|
|
22
|
+
backgroundColor: string;
|
|
23
|
+
};
|
|
24
|
+
completed: {
|
|
25
|
+
borderColor: string;
|
|
26
|
+
color: string;
|
|
27
|
+
backgroundColor: string;
|
|
28
|
+
hover: {
|
|
29
|
+
borderColor: string;
|
|
30
|
+
color: string;
|
|
31
|
+
backgroundColor: string;
|
|
32
|
+
};
|
|
33
|
+
};
|
|
34
|
+
inactive: {
|
|
35
|
+
borderColor: string;
|
|
36
|
+
color: string;
|
|
37
|
+
backgroundColor: string;
|
|
38
|
+
hover: {
|
|
39
|
+
borderColor: string;
|
|
40
|
+
color: string;
|
|
41
|
+
backgroundColor: string;
|
|
42
|
+
};
|
|
43
|
+
};
|
|
44
|
+
disabled: {
|
|
45
|
+
borderColor: string;
|
|
46
|
+
color: string;
|
|
47
|
+
backgroundColor: string;
|
|
48
|
+
};
|
|
49
|
+
};
|
|
50
|
+
itemText: {
|
|
51
|
+
fontFamily: string;
|
|
52
|
+
fontSize: string;
|
|
53
|
+
active: {
|
|
54
|
+
color: string;
|
|
55
|
+
textDecoration: string;
|
|
56
|
+
};
|
|
57
|
+
inactive: {
|
|
58
|
+
color: string;
|
|
59
|
+
textDecoration: string;
|
|
60
|
+
hover: {
|
|
61
|
+
textDecoration: string;
|
|
62
|
+
};
|
|
63
|
+
};
|
|
64
|
+
disabled: {
|
|
65
|
+
color: string;
|
|
66
|
+
textDecoration: string;
|
|
67
|
+
};
|
|
68
|
+
};
|
|
69
|
+
};
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { SvgIcon } from '../../icons/utils';
|
|
2
|
+
import { BaseComponentPropsWithChildren } from '../../types';
|
|
3
|
+
declare type BaseItemProps = {
|
|
4
|
+
/** Om steget er valgt eller ikke. Settes av konsument. */
|
|
5
|
+
active?: boolean;
|
|
6
|
+
/** Om steget er ferdig eller ikke. Settes av konsument. */
|
|
7
|
+
completed?: boolean;
|
|
8
|
+
/** Om steget skal være disabled. Settes av konsument.
|
|
9
|
+
* @default false
|
|
10
|
+
*/
|
|
11
|
+
disabled?: boolean;
|
|
12
|
+
/** Ikon som skal vises istedenfor stegnummeret. Settes av konument. */
|
|
13
|
+
icon?: SvgIcon;
|
|
14
|
+
/** Indeksen til steget. NB! Denne settes automatisk av `<ProgressTracker />` og skal ikke settes manuelt. */
|
|
15
|
+
index?: number;
|
|
16
|
+
};
|
|
17
|
+
declare type ProgressTrackerItemProps = ({
|
|
18
|
+
/** Click-handler som gjør det mulig for bruker å klikke på steget for å navigere. Valgfri. */
|
|
19
|
+
onClick: (index: number) => void;
|
|
20
|
+
} & BaseComponentPropsWithChildren<HTMLButtonElement, BaseItemProps>) | ({
|
|
21
|
+
onClick?: undefined;
|
|
22
|
+
} & BaseComponentPropsWithChildren<HTMLDivElement, BaseItemProps>);
|
|
23
|
+
export declare const ProgressTrackerItem: (props: ProgressTrackerItemProps) => JSX.Element;
|
|
24
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './ProgressTracker';
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import { RadioButtonProps } from '.';
|
|
2
2
|
declare const _default: {
|
|
3
3
|
title: string;
|
|
4
|
-
component: import("react").ForwardRefExoticComponent<Pick<Omit<import("react").InputHTMLAttributes<HTMLInputElement>, "
|
|
4
|
+
component: import("react").ForwardRefExoticComponent<Pick<Omit<import("react").InputHTMLAttributes<HTMLInputElement>, "name" | "aria-describedby" | "onChange" | "value" | "checked" | "readOnly" | "required">, "id" | "className"> & {
|
|
5
5
|
label?: string | undefined;
|
|
6
6
|
disabled?: boolean | undefined;
|
|
7
7
|
error?: boolean | undefined;
|
|
8
8
|
} & {
|
|
9
|
+
name?: string | undefined;
|
|
9
10
|
'aria-describedby'?: string | undefined;
|
|
10
11
|
onChange?: import("react").ChangeEventHandler<HTMLInputElement> | undefined;
|
|
11
|
-
name?: string | undefined;
|
|
12
12
|
value?: string | number | readonly string[] | undefined;
|
|
13
13
|
checked?: boolean | undefined;
|
|
14
14
|
readOnly?: boolean | undefined;
|
|
@@ -16,7 +16,7 @@ declare const _default: {
|
|
|
16
16
|
} & {
|
|
17
17
|
children?: import("react").ReactNode;
|
|
18
18
|
} & {
|
|
19
|
-
htmlProps?: Omit<import("react").InputHTMLAttributes<HTMLInputElement>, "
|
|
19
|
+
htmlProps?: Omit<import("react").InputHTMLAttributes<HTMLInputElement>, "name" | "aria-describedby" | "onChange" | "value" | "checked" | "readOnly" | "required"> | undefined;
|
|
20
20
|
} & import("react").RefAttributes<HTMLInputElement>>;
|
|
21
21
|
argTypes: {
|
|
22
22
|
label: {
|
|
@@ -6,13 +6,13 @@ declare type ButtonProps = {
|
|
|
6
6
|
label?: string;
|
|
7
7
|
loading?: boolean;
|
|
8
8
|
} & ButtonHTMLAttributes<HTMLButtonElement>;
|
|
9
|
-
export declare type SearchProps = Pick<BaseInputProps, 'tip'> & {
|
|
9
|
+
export declare type SearchProps = Pick<BaseInputProps, 'tip' | 'label'> & {
|
|
10
10
|
/**Størrelsen på komponenten. */
|
|
11
11
|
componentSize?: SearchSize;
|
|
12
12
|
/**Props for søkeknappen. */
|
|
13
13
|
buttonProps?: ButtonProps;
|
|
14
14
|
} & InputHTMLAttributes<HTMLInputElement>;
|
|
15
|
-
export declare const Search: import("react").ForwardRefExoticComponent<Pick<BaseInputProps, "tip"> & {
|
|
15
|
+
export declare const Search: import("react").ForwardRefExoticComponent<Pick<BaseInputProps, "label" | "tip"> & {
|
|
16
16
|
/**Størrelsen på komponenten. */
|
|
17
17
|
componentSize?: SearchSize | undefined;
|
|
18
18
|
/**Props for søkeknappen. */
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { SearchProps } from './Search';
|
|
2
2
|
declare const _default: {
|
|
3
3
|
title: string;
|
|
4
|
-
component: import("react").ForwardRefExoticComponent<Pick<import("../../helpers").InputProps, "tip"> & {
|
|
4
|
+
component: import("react").ForwardRefExoticComponent<Pick<import("../../helpers").InputProps, "label" | "tip"> & {
|
|
5
5
|
componentSize?: import("./Search").SearchSize | undefined;
|
|
6
6
|
buttonProps?: ({
|
|
7
7
|
onClick: (event: import("react").MouseEvent<HTMLButtonElement, MouseEvent>) => void;
|
|
@@ -15,6 +15,11 @@ declare const _default: {
|
|
|
15
15
|
type: string;
|
|
16
16
|
};
|
|
17
17
|
};
|
|
18
|
+
label: {
|
|
19
|
+
control: {
|
|
20
|
+
type: string;
|
|
21
|
+
};
|
|
22
|
+
};
|
|
18
23
|
};
|
|
19
24
|
parameters: {
|
|
20
25
|
controls: {
|
|
@@ -24,5 +29,6 @@ declare const _default: {
|
|
|
24
29
|
};
|
|
25
30
|
export default _default;
|
|
26
31
|
export declare const Overview: (args: SearchProps) => JSX.Element;
|
|
32
|
+
export declare const OverviewSizes: (args: SearchProps) => JSX.Element;
|
|
27
33
|
export declare const Default: (args: SearchProps) => JSX.Element;
|
|
28
34
|
export declare const WithButton: (args: SearchProps) => JSX.Element;
|
|
@@ -4,7 +4,7 @@ export declare type TableCellLayout = 'left' | 'right' | 'center' | 'text and ic
|
|
|
4
4
|
export declare type TableCellProps = {
|
|
5
5
|
/**Type celle. Returnerer enten `<td>` eller `<th>`. */
|
|
6
6
|
type?: TableCellType;
|
|
7
|
-
/**Layout av innholdet i cellen. 'tekst and icon' legger
|
|
7
|
+
/**Layout av innholdet i cellen. 'tekst and icon' legger `gap` mellom barna og andre barnet i cellen. */
|
|
8
8
|
layout?: TableCellLayout;
|
|
9
9
|
} & (TdHTMLAttributes<HTMLTableCellElement> | ThHTMLAttributes<HTMLTableCellElement>);
|
|
10
10
|
export declare const Cell: import("react").ForwardRefExoticComponent<TableCellProps & import("react").RefAttributes<HTMLTableCellElement>>;
|
|
@@ -5,10 +5,14 @@ export declare type TableProps = {
|
|
|
5
5
|
density?: TableDensity;
|
|
6
6
|
/**Spesifiserer om cellene i `<Head>` skal bli sticky ved scrolling. */
|
|
7
7
|
stickyHeader?: boolean;
|
|
8
|
+
/**Legger skillelinjer mellom radene. */
|
|
9
|
+
withDividers?: boolean;
|
|
8
10
|
} & HTMLAttributes<HTMLTableElement>;
|
|
9
11
|
export declare const Table: import("react").ForwardRefExoticComponent<{
|
|
10
12
|
/**Spesifiserer hvor romslige cellene i tabellen skal være. */
|
|
11
13
|
density?: TableDensity | undefined;
|
|
12
14
|
/**Spesifiserer om cellene i `<Head>` skal bli sticky ved scrolling. */
|
|
13
15
|
stickyHeader?: boolean | undefined;
|
|
16
|
+
/**Legger skillelinjer mellom radene. */
|
|
17
|
+
withDividers?: boolean | undefined;
|
|
14
18
|
} & HTMLAttributes<HTMLTableElement> & import("react").RefAttributes<HTMLTableElement>>;
|
|
@@ -4,6 +4,7 @@ declare const _default: {
|
|
|
4
4
|
component: import("react").ForwardRefExoticComponent<{
|
|
5
5
|
density?: import("./Table").TableDensity | undefined;
|
|
6
6
|
stickyHeader?: boolean | undefined;
|
|
7
|
+
withDividers?: boolean | undefined;
|
|
7
8
|
} & import("react").HTMLAttributes<HTMLTableElement> & import("react").RefAttributes<HTMLTableElement>>;
|
|
8
9
|
argTypes: {
|
|
9
10
|
stickyHeader: {
|
|
@@ -11,10 +12,16 @@ declare const _default: {
|
|
|
11
12
|
type: string;
|
|
12
13
|
};
|
|
13
14
|
};
|
|
15
|
+
withDividers: {
|
|
16
|
+
control: {
|
|
17
|
+
type: string;
|
|
18
|
+
};
|
|
19
|
+
};
|
|
14
20
|
};
|
|
15
21
|
};
|
|
16
22
|
export default _default;
|
|
17
23
|
export declare const Default: (args: TableProps) => JSX.Element;
|
|
24
|
+
export declare const withDividers: (args: TableProps) => JSX.Element;
|
|
18
25
|
export declare const Focusable: (args: TableProps) => JSX.Element;
|
|
19
26
|
export declare const Compact: (args: TableProps) => JSX.Element;
|
|
20
27
|
export declare const StickyHeader: (args: TableProps) => JSX.Element;
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
export declare const tableTokens: {
|
|
2
|
+
row: {
|
|
3
|
+
base: {
|
|
4
|
+
color: string;
|
|
5
|
+
font: {
|
|
6
|
+
lineHeight: any;
|
|
7
|
+
fontSize: string;
|
|
8
|
+
letterSpacing: any;
|
|
9
|
+
fontFamily: any;
|
|
10
|
+
fontWeight: any;
|
|
11
|
+
fontStyle: any;
|
|
12
|
+
};
|
|
13
|
+
};
|
|
14
|
+
body: {
|
|
15
|
+
odd: {
|
|
16
|
+
backgroundColor: string;
|
|
17
|
+
};
|
|
18
|
+
even: {
|
|
19
|
+
backgroundColor: string;
|
|
20
|
+
};
|
|
21
|
+
hover: {
|
|
22
|
+
backgroundColor: string;
|
|
23
|
+
};
|
|
24
|
+
selected: {
|
|
25
|
+
backgroundColor: string;
|
|
26
|
+
};
|
|
27
|
+
mode: {
|
|
28
|
+
sum: {
|
|
29
|
+
font: {
|
|
30
|
+
lineHeight: any;
|
|
31
|
+
fontSize: string;
|
|
32
|
+
letterSpacing: any;
|
|
33
|
+
fontFamily: any;
|
|
34
|
+
fontWeight: any;
|
|
35
|
+
fontStyle: any;
|
|
36
|
+
};
|
|
37
|
+
borderTop: string;
|
|
38
|
+
borderBottom: string;
|
|
39
|
+
backgroundColor: string;
|
|
40
|
+
};
|
|
41
|
+
};
|
|
42
|
+
withDividers: {
|
|
43
|
+
borderBottom: string;
|
|
44
|
+
};
|
|
45
|
+
};
|
|
46
|
+
};
|
|
47
|
+
cell: {
|
|
48
|
+
density: {
|
|
49
|
+
normal: {
|
|
50
|
+
padding: string;
|
|
51
|
+
};
|
|
52
|
+
compact: {
|
|
53
|
+
padding: string;
|
|
54
|
+
};
|
|
55
|
+
};
|
|
56
|
+
head: {
|
|
57
|
+
backgroundColor: string;
|
|
58
|
+
};
|
|
59
|
+
sort: {
|
|
60
|
+
gap: string;
|
|
61
|
+
icon: {
|
|
62
|
+
marginInlineStart: string;
|
|
63
|
+
};
|
|
64
|
+
};
|
|
65
|
+
layout: {
|
|
66
|
+
textAndIcon: {
|
|
67
|
+
gap: string;
|
|
68
|
+
marginRight: string;
|
|
69
|
+
};
|
|
70
|
+
};
|
|
71
|
+
};
|
|
72
|
+
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { TooltipProps } from '.';
|
|
2
2
|
declare const _default: {
|
|
3
3
|
title: string;
|
|
4
|
-
component: import("react").ForwardRefExoticComponent<Pick<Omit<import("react").HTMLAttributes<HTMLDivElement>, "
|
|
4
|
+
component: import("react").ForwardRefExoticComponent<Pick<Omit<import("react").HTMLAttributes<HTMLDivElement>, "style" | "children" | "onMouseLeave" | "onMouseOver">, "id" | "className"> & {
|
|
5
5
|
text: string;
|
|
6
6
|
placement?: import("../..").Placement | undefined;
|
|
7
7
|
children: import("react").ReactElement<any, string | import("react").JSXElementConstructor<any>> & import("react").RefAttributes<HTMLElement>;
|
|
@@ -12,7 +12,7 @@ declare const _default: {
|
|
|
12
12
|
onMouseLeave?: import("react").MouseEventHandler<HTMLDivElement> | undefined;
|
|
13
13
|
onMouseOver?: import("react").MouseEventHandler<HTMLDivElement> | undefined;
|
|
14
14
|
} & {
|
|
15
|
-
htmlProps?: Omit<import("react").HTMLAttributes<HTMLDivElement>, "
|
|
15
|
+
htmlProps?: Omit<import("react").HTMLAttributes<HTMLDivElement>, "style" | "children" | "onMouseLeave" | "onMouseOver"> | undefined;
|
|
16
16
|
} & import("react").RefAttributes<HTMLDivElement>>;
|
|
17
17
|
argTypes: {
|
|
18
18
|
text: {
|
|
@@ -2,8 +2,12 @@ import { LabelHTMLAttributes } from 'react';
|
|
|
2
2
|
import { BaseComponentPropsWithChildren } from '../../../types';
|
|
3
3
|
import { BaseTypographyProps } from '../Typography';
|
|
4
4
|
declare type PickedHTMLAttributes = Pick<LabelHTMLAttributes<HTMLLabelElement>, 'htmlFor'>;
|
|
5
|
-
|
|
6
|
-
|
|
5
|
+
declare type BaseLabelProps = {
|
|
6
|
+
/** Spesifiserer om input etiketten er knyttet til er påkrevd; påvirker styling. */
|
|
7
|
+
showRequiredStyling?: boolean;
|
|
8
|
+
};
|
|
9
|
+
export declare type LabelProps = BaseComponentPropsWithChildren<HTMLLabelElement, BaseLabelProps & BaseTypographyProps & PickedHTMLAttributes, Omit<LabelHTMLAttributes<HTMLLabelElement>, keyof PickedHTMLAttributes>>;
|
|
10
|
+
export declare const Label: import("react").ForwardRefExoticComponent<Pick<Omit<LabelHTMLAttributes<HTMLLabelElement>, "htmlFor">, "className" | "id"> & BaseLabelProps & {
|
|
7
11
|
withMargins?: boolean | undefined;
|
|
8
12
|
} & {
|
|
9
13
|
children?: import("react").ReactNode;
|
|
@@ -5,6 +5,8 @@ declare type StoryTProps = {
|
|
|
5
5
|
declare const _default: {
|
|
6
6
|
title: string;
|
|
7
7
|
component: import("react").ForwardRefExoticComponent<Pick<Omit<import("react").LabelHTMLAttributes<HTMLLabelElement>, "htmlFor">, "id" | "className"> & {
|
|
8
|
+
showRequiredStyling?: boolean | undefined;
|
|
9
|
+
} & {
|
|
8
10
|
withMargins?: boolean | undefined;
|
|
9
11
|
} & {
|
|
10
12
|
children?: import("react").ReactNode;
|
package/dist/cjs/index.d.ts
CHANGED
|
@@ -36,5 +36,6 @@ export * from './components/VisuallyHidden';
|
|
|
36
36
|
export * from './components/ScrollableContainer';
|
|
37
37
|
export * from './icons/tsx';
|
|
38
38
|
export * from './components/ToggleBar';
|
|
39
|
-
export * from './components/
|
|
39
|
+
export * from './components/Grid';
|
|
40
|
+
export * from './components/ProgressTracker';
|
|
40
41
|
export * from './hooks';
|