@norges-domstoler/dds-components 0.0.5 → 0.0.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.
- package/README.md +10 -3
- package/dist/components/Breadcrumbs/{breadcrumbTokens.d.ts → Breadcrumb.tokens.d.ts} +0 -0
- package/dist/components/Button/Button.d.ts +7 -8
- package/dist/components/Button/{buttonTokens.d.ts → Button.tokens.d.ts} +0 -0
- package/dist/components/Checkbox/{checkboxTokens.d.ts → Checkbox.tokens.d.ts} +0 -0
- package/dist/components/Checkbox/{checkboxGroupTokens.d.ts → CheckboxGroup.tokens.d.ts} +0 -0
- package/dist/components/DescriptionList/DescriptionList.d.ts +8 -0
- package/dist/components/DescriptionList/DescriptionListDesc.d.ts +9 -0
- package/dist/components/DescriptionList/DescriptionListDesc.tokens.d.ts +7 -0
- package/dist/components/DescriptionList/DescriptionListGroup.d.ts +8 -0
- package/dist/components/DescriptionList/DescriptionListGroup.tokens.d.ts +4 -0
- package/dist/components/DescriptionList/DescriptionListTerm.d.ts +3 -0
- package/dist/components/DescriptionList/DescriptionListTerm.tokens.d.ts +13 -0
- package/dist/components/DescriptionList/index.d.ts +4 -0
- package/dist/components/Divider/Divider.d.ts +0 -1
- package/dist/components/Divider/{dividerTokens.d.ts → Divider.tokens.d.ts} +0 -0
- package/dist/components/GlobalMessage/{globalMessageTokens.d.ts → GlobalMessage.tokens.d.ts} +0 -0
- package/dist/components/List/List.d.ts +12 -0
- package/dist/components/List/List.tokens.d.ts +16 -0
- package/dist/components/List/ListItem.d.ts +3 -0
- package/dist/components/List/ListItem.tokens.d.ts +5 -0
- package/dist/components/List/index.d.ts +2 -0
- package/dist/components/LocalMessage/{localMessageTokens.d.ts → LocalMessage.tokens.d.ts} +0 -0
- package/dist/components/Pagination/{paginationTokens.d.ts → Pagination.tokens.d.ts} +0 -0
- package/dist/components/RadioButton/{radioButtonTokens.d.ts → RadioButton.tokens.d.ts} +0 -0
- package/dist/components/RadioButton/{radioButtonGroupTokens.d.ts → RadioButtonGroup.tokens.d.ts} +0 -0
- package/dist/components/Search/{searchTokens.d.ts → Search.tokens.d.ts} +0 -0
- package/dist/components/Select/{selectTokens.d.ts → Select.tokens.d.ts} +0 -0
- package/dist/components/Spinner/Spinner.d.ts +7 -0
- package/dist/components/Spinner/Spinner.tokens.d.ts +6 -0
- package/dist/components/Spinner/index.d.ts +1 -0
- package/dist/components/Table/Cell.d.ts +2 -2
- package/dist/components/Table/{cellTokens.d.ts → Cell.tokens.d.ts} +0 -0
- package/dist/components/Table/Foot.d.ts +3 -0
- package/dist/components/Table/{rowTokens.d.ts → Row.tokens.d.ts} +0 -0
- package/dist/components/Table/index.d.ts +1 -0
- package/dist/components/TextInput/{charCounterTokens.d.ts → CharCounter.tokens.d.ts} +0 -0
- package/dist/components/TextInput/{textInputTokens.d.ts → TextInput.tokens.d.ts} +0 -0
- package/dist/components/Typography/Typography.d.ts +11 -2
- package/dist/components/Typography/{typographyTokens.d.ts → Typography.tokens.d.ts} +15 -1
- package/dist/components/Typography/Typography.types.d.ts +7 -0
- package/dist/components/Typography/index.d.ts +1 -0
- package/dist/helpers/InputMessage/{inputMessageTokens.d.ts → InputMessage.tokens.d.ts} +0 -0
- package/dist/index.d.ts +3 -0
- package/dist/index.es.js +989 -669
- package/dist/index.js +998 -668
- package/package.json +7 -3
- package/dist/helpers/Spinner.d.ts +0 -15
package/README.md
CHANGED
|
@@ -6,12 +6,12 @@ _biblioteket er under arbeid_
|
|
|
6
6
|
|
|
7
7
|
React UI komponenter til bruk i Domstolenes tjenester.
|
|
8
8
|
|
|
9
|
-
Sjekk ut [Domstolenes designsystem
|
|
9
|
+
Sjekk ut [Domstolenes designsystem Elsa](https://design.domstol.no/) og [Storybook](https://domstolene.github.io/designsystem) for mer dokumentasjon og demoer.
|
|
10
10
|
|
|
11
11
|
## Installasjon
|
|
12
12
|
|
|
13
13
|
```sh
|
|
14
|
-
npm install @norges-domstoler/dds-components
|
|
14
|
+
npm install @norges-domstoler/dds-components
|
|
15
15
|
```
|
|
16
16
|
|
|
17
17
|
## Bruk
|
|
@@ -34,17 +34,24 @@ render(<App />, document.getElementById('root'));
|
|
|
34
34
|
|
|
35
35
|
## Komponenter
|
|
36
36
|
|
|
37
|
-
|
|
37
|
+
Sjekk [komponentstatus](https://design.domstol.no/987b33f71/p/438035-komponenter/b/160db9) for oppdatert status.
|
|
38
|
+
|
|
39
|
+
Tilgjengelige komponenter:
|
|
38
40
|
|
|
39
41
|
- Breadcrumbs
|
|
40
42
|
- Button
|
|
41
43
|
- Checkbox
|
|
44
|
+
- DescriptionList
|
|
45
|
+
- Divider
|
|
42
46
|
- GlobalMessage
|
|
43
47
|
- IconWrapper
|
|
48
|
+
- List
|
|
44
49
|
- LocalMessage
|
|
50
|
+
- Pagination
|
|
45
51
|
- RadioButton
|
|
46
52
|
- Search
|
|
47
53
|
- Select
|
|
54
|
+
- Spinner
|
|
48
55
|
- Table
|
|
49
56
|
- TextInput
|
|
50
57
|
- Typography
|
|
File without changes
|
|
@@ -2,15 +2,15 @@ import React, { ButtonHTMLAttributes } from 'react';
|
|
|
2
2
|
import { SvgIconTypeMap } from '@material-ui/core/SvgIcon';
|
|
3
3
|
import { OverridableComponent } from '@material-ui/core/OverridableComponent';
|
|
4
4
|
export declare type ButtonPurpose = 'primary' | 'secondary' | 'danger';
|
|
5
|
-
declare type
|
|
6
|
-
declare type
|
|
7
|
-
declare type IconPosition = 'left' | 'right';
|
|
5
|
+
export declare type ButtonSize = 'small' | 'medium' | 'large';
|
|
6
|
+
export declare type ButtonAppearance = 'filled' | 'ghost' | 'rounded' | 'borderless';
|
|
7
|
+
export declare type IconPosition = 'left' | 'right';
|
|
8
8
|
export declare type ButtonProps = {
|
|
9
|
-
size?:
|
|
9
|
+
size?: ButtonSize;
|
|
10
10
|
label?: string;
|
|
11
11
|
purpose?: ButtonPurpose;
|
|
12
12
|
iconPosition?: IconPosition;
|
|
13
|
-
appearance?:
|
|
13
|
+
appearance?: ButtonAppearance;
|
|
14
14
|
href?: string;
|
|
15
15
|
target?: string;
|
|
16
16
|
loading?: boolean;
|
|
@@ -20,11 +20,11 @@ export declare type ButtonProps = {
|
|
|
20
20
|
fullWidth?: boolean;
|
|
21
21
|
} & ButtonHTMLAttributes<HTMLButtonElement>;
|
|
22
22
|
export declare const Button: React.ForwardRefExoticComponent<{
|
|
23
|
-
size?:
|
|
23
|
+
size?: ButtonSize | undefined;
|
|
24
24
|
label?: string | undefined;
|
|
25
25
|
purpose?: ButtonPurpose | undefined;
|
|
26
26
|
iconPosition?: IconPosition | undefined;
|
|
27
|
-
appearance?:
|
|
27
|
+
appearance?: ButtonAppearance | undefined;
|
|
28
28
|
href?: string | undefined;
|
|
29
29
|
target?: string | undefined;
|
|
30
30
|
loading?: boolean | undefined;
|
|
@@ -33,4 +33,3 @@ export declare const Button: React.ForwardRefExoticComponent<{
|
|
|
33
33
|
Icon?: OverridableComponent<SvgIconTypeMap<{}, "svg">> | undefined;
|
|
34
34
|
fullWidth?: boolean | undefined;
|
|
35
35
|
} & React.ButtonHTMLAttributes<HTMLButtonElement> & React.RefAttributes<HTMLButtonElement>>;
|
|
36
|
-
export {};
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { HTMLAttributes } from 'react';
|
|
2
|
+
export declare type DescriptionListAppearance = 'small' | 'bold';
|
|
3
|
+
export declare type DescriptionListProps = {
|
|
4
|
+
appearance?: DescriptionListAppearance;
|
|
5
|
+
} & HTMLAttributes<HTMLDListElement>;
|
|
6
|
+
export declare const DescriptionList: import("react").ForwardRefExoticComponent<{
|
|
7
|
+
appearance?: DescriptionListAppearance | undefined;
|
|
8
|
+
} & HTMLAttributes<HTMLDListElement> & import("react").RefAttributes<HTMLDListElement>>;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { HTMLAttributes } from 'react';
|
|
2
|
+
import { OverridableComponent } from '@material-ui/core/OverridableComponent';
|
|
3
|
+
import { SvgIconTypeMap } from '@material-ui/core';
|
|
4
|
+
export declare type DescriptionListDescProps = {
|
|
5
|
+
Icon?: OverridableComponent<SvgIconTypeMap<{}, 'svg'>>;
|
|
6
|
+
} & HTMLAttributes<HTMLElement>;
|
|
7
|
+
export declare const DescriptionListDesc: import("react").ForwardRefExoticComponent<{
|
|
8
|
+
Icon?: OverridableComponent<SvgIconTypeMap<{}, "svg">> | undefined;
|
|
9
|
+
} & HTMLAttributes<HTMLElement> & import("react").RefAttributes<HTMLElement>>;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { HTMLAttributes } from 'react';
|
|
2
|
+
import * as CSS from 'csstype';
|
|
3
|
+
export declare type DescriptionListGroupProps = {
|
|
4
|
+
margin?: CSS.MarginProperty<string>;
|
|
5
|
+
} & HTMLAttributes<HTMLDivElement>;
|
|
6
|
+
export declare const DescriptionListGroup: import("react").ForwardRefExoticComponent<{
|
|
7
|
+
margin?: string | undefined;
|
|
8
|
+
} & HTMLAttributes<HTMLDivElement> & import("react").RefAttributes<HTMLDivElement>>;
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import { HTMLAttributes } from 'react';
|
|
2
|
+
export declare type DescriptionListTermProps = {} & HTMLAttributes<HTMLElement>;
|
|
3
|
+
export declare const DescriptionListTerm: import("react").ForwardRefExoticComponent<HTMLAttributes<HTMLElement> & import("react").RefAttributes<HTMLElement>>;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { CSSObject } from 'styled-components';
|
|
2
|
+
export declare const descriptionListTermTokens: {
|
|
3
|
+
appearance: {
|
|
4
|
+
small: {
|
|
5
|
+
base: CSSObject;
|
|
6
|
+
};
|
|
7
|
+
bold: {
|
|
8
|
+
base: CSSObject;
|
|
9
|
+
};
|
|
10
|
+
};
|
|
11
|
+
unwrappedTopAndBottomSpace: string;
|
|
12
|
+
unwrappedBetweenSpace: string;
|
|
13
|
+
};
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { HTMLAttributes } from 'react';
|
|
2
2
|
export declare type DividerColor = 'primary' | 'primaryLighter';
|
|
3
|
-
export declare type DividerDirection = 'horisontal' | 'vertical';
|
|
4
3
|
export declare type DividerProps = {
|
|
5
4
|
color?: DividerColor;
|
|
6
5
|
} & HTMLAttributes<HTMLHRElement>;
|
|
File without changes
|
package/dist/components/GlobalMessage/{globalMessageTokens.d.ts → GlobalMessage.tokens.d.ts}
RENAMED
|
File without changes
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { HTMLAttributes } from 'react';
|
|
2
|
+
import { TypographyBodyType } from '../Typography';
|
|
3
|
+
export declare type ListType = 'ordered' | 'unordered';
|
|
4
|
+
export declare type ListTypographyType = TypographyBodyType | 'inherit';
|
|
5
|
+
export declare type ListProps = {
|
|
6
|
+
listType?: ListType;
|
|
7
|
+
typographyType?: ListTypographyType;
|
|
8
|
+
} & HTMLAttributes<HTMLUListElement | HTMLOListElement>;
|
|
9
|
+
export declare const List: import("react").ForwardRefExoticComponent<{
|
|
10
|
+
listType?: ListType | undefined;
|
|
11
|
+
typographyType?: ListTypographyType | undefined;
|
|
12
|
+
} & HTMLAttributes<HTMLUListElement | HTMLOListElement> & import("react").RefAttributes<HTMLUListElement | HTMLOListElement>>;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { CSSObject } from 'styled-components';
|
|
2
|
+
export declare const listTokens: {
|
|
3
|
+
base: CSSObject;
|
|
4
|
+
spaceLeft: string;
|
|
5
|
+
sizes: {
|
|
6
|
+
bodySans01: CSSObject;
|
|
7
|
+
bodySans02: CSSObject;
|
|
8
|
+
bodySans03: CSSObject;
|
|
9
|
+
bodySans04: CSSObject;
|
|
10
|
+
bodySerif01: CSSObject;
|
|
11
|
+
bodySerif02: CSSObject;
|
|
12
|
+
bodySerif03: CSSObject;
|
|
13
|
+
bodySerif04: CSSObject;
|
|
14
|
+
inherit: CSSObject;
|
|
15
|
+
};
|
|
16
|
+
};
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
package/dist/components/RadioButton/{radioButtonGroupTokens.d.ts → RadioButtonGroup.tokens.d.ts}
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './Spinner';
|
|
@@ -4,5 +4,5 @@ export declare type TableCellLayout = 'left' | 'right' | 'center' | 'text and ic
|
|
|
4
4
|
export declare type TableCellProps = {
|
|
5
5
|
type?: TableCellType;
|
|
6
6
|
layout?: TableCellLayout;
|
|
7
|
-
} & (TdHTMLAttributes<
|
|
8
|
-
export declare const Cell: import("react").ForwardRefExoticComponent<TableCellProps & import("react").RefAttributes<
|
|
7
|
+
} & (TdHTMLAttributes<HTMLTableCellElement> | ThHTMLAttributes<HTMLTableCellElement>);
|
|
8
|
+
export declare const Cell: import("react").ForwardRefExoticComponent<TableCellProps & import("react").RefAttributes<HTMLTableCellElement>>;
|
|
File without changes
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import { HTMLAttributes } from 'react';
|
|
2
|
+
export declare type FootProps = {} & HTMLAttributes<HTMLTableSectionElement>;
|
|
3
|
+
export declare const Foot: import("react").ForwardRefExoticComponent<HTMLAttributes<HTMLTableSectionElement> & import("react").RefAttributes<HTMLTableSectionElement>>;
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
@@ -1,6 +1,13 @@
|
|
|
1
1
|
import { HTMLAttributes, ElementType, AnchorHTMLAttributes, LabelHTMLAttributes } from 'react';
|
|
2
|
-
|
|
3
|
-
|
|
2
|
+
import { CSSObject } from 'styled-components';
|
|
3
|
+
import { TypographyType } from './Typography.types';
|
|
4
|
+
export declare function isTextColor(color: string): color is TextColor;
|
|
5
|
+
export declare const getTextColor: (color: TextColor | string) => string;
|
|
6
|
+
export declare type TextColor = 'interactive' | 'primary' | 'danger' | 'warning' | 'success' | 'onLight' | 'onDark' | 'gray1' | 'gray2' | 'gray3' | 'gray4' | 'gray5' | 'gray6' | 'gray7' | 'gray8' | 'gray9';
|
|
7
|
+
export declare type TypographyInteractionProps = {
|
|
8
|
+
hover?: CSSObject;
|
|
9
|
+
active?: CSSObject;
|
|
10
|
+
};
|
|
4
11
|
export declare type TypographyProps = {
|
|
5
12
|
typographyType?: TypographyType;
|
|
6
13
|
as?: ElementType;
|
|
@@ -8,7 +15,9 @@ export declare type TypographyProps = {
|
|
|
8
15
|
color?: TextColor | string;
|
|
9
16
|
bold?: boolean;
|
|
10
17
|
italic?: boolean;
|
|
18
|
+
underline?: boolean;
|
|
11
19
|
withMargins?: boolean;
|
|
20
|
+
interactionProps?: TypographyInteractionProps;
|
|
12
21
|
target?: string;
|
|
13
22
|
} & (HTMLAttributes<HTMLElement> | LabelHTMLAttributes<HTMLLabelElement> | AnchorHTMLAttributes<HTMLAnchorElement>);
|
|
14
23
|
export declare const Typography: import("react").ForwardRefExoticComponent<TypographyProps & import("react").RefAttributes<HTMLElement>>;
|
|
@@ -5,8 +5,19 @@ export declare const textColors: {
|
|
|
5
5
|
danger: string;
|
|
6
6
|
success: string;
|
|
7
7
|
warning: string;
|
|
8
|
-
|
|
8
|
+
onLight: string;
|
|
9
|
+
onDark: string;
|
|
10
|
+
gray1: string;
|
|
11
|
+
gray2: string;
|
|
12
|
+
gray3: string;
|
|
13
|
+
gray4: string;
|
|
14
|
+
gray5: string;
|
|
15
|
+
gray6: string;
|
|
16
|
+
gray7: string;
|
|
17
|
+
gray8: string;
|
|
18
|
+
gray9: string;
|
|
9
19
|
};
|
|
20
|
+
export declare const textColorsArray: string[];
|
|
10
21
|
export declare const typographyTokens: {
|
|
11
22
|
selection: {
|
|
12
23
|
base: CSSObject;
|
|
@@ -206,5 +217,8 @@ export declare const typographyTokens: {
|
|
|
206
217
|
italic: {
|
|
207
218
|
base: CSSObject;
|
|
208
219
|
};
|
|
220
|
+
underline: {
|
|
221
|
+
base: CSSObject;
|
|
222
|
+
};
|
|
209
223
|
};
|
|
210
224
|
};
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
export declare type TypographyBodySansType = 'bodySans01' | 'bodySans02' | 'bodySans03' | 'bodySans04';
|
|
2
|
+
export declare type TypographyBodySerifType = 'bodySerif01' | 'bodySerif02' | 'bodySerif03' | 'bodySerif04';
|
|
3
|
+
export declare type TypographyBodyType = TypographyBodySansType | TypographyBodySerifType;
|
|
4
|
+
export declare type TypographyHeadingType = 'headingSans01' | 'headingSans02' | 'headingSans03' | 'headingSans04' | 'headingSans05' | 'headingSans06' | 'headingSans07' | 'headingSans08';
|
|
5
|
+
export declare type TypographyLeadType = 'leadSans01' | 'leadSans02' | 'leadSans03' | 'leadSans04' | 'leadSans05';
|
|
6
|
+
export declare type TypographySupportingType = 'supportingStyleLabel01' | 'supportingStyleInputText01' | 'supportingStyleInputText02' | 'supportingStyleInputText03' | 'supportingStyleHelperText01' | 'supportingStylePlaceholderText01' | 'supportingStyleTiny01';
|
|
7
|
+
export declare type TypographyType = 'a' | TypographyHeadingType | TypographyBodyType | TypographyLeadType | TypographySupportingType;
|
|
File without changes
|
package/dist/index.d.ts
CHANGED
|
@@ -14,3 +14,6 @@ export * from './components/Breadcrumbs';
|
|
|
14
14
|
export * from './helpers/IconWrapper';
|
|
15
15
|
export * from './components/Pagination';
|
|
16
16
|
export * from './components/Divider';
|
|
17
|
+
export * from './components/List';
|
|
18
|
+
export * from './components/DescriptionList';
|
|
19
|
+
export * from './components/Spinner';
|