@norges-domstoler/dds-components 0.0.8 → 0.0.12
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/assets/fonts/IBMPlexSans-Italic.woff +0 -0
- package/dist/assets/fonts/IBMPlexSans-Italic.woff2 +0 -0
- package/dist/assets/fonts/IBMPlexSans-Light.woff +0 -0
- package/dist/assets/fonts/IBMPlexSans-Light.woff2 +0 -0
- package/dist/assets/fonts/IBMPlexSans-LightItalic.woff +0 -0
- package/dist/assets/fonts/IBMPlexSans-LightItalic.woff2 +0 -0
- package/dist/assets/fonts/IBMPlexSans-Regular.woff +0 -0
- package/dist/assets/fonts/IBMPlexSans-Regular.woff2 +0 -0
- package/dist/assets/fonts/IBMPlexSans-SemiBold.woff +0 -0
- package/dist/assets/fonts/IBMPlexSans-SemiBold.woff2 +0 -0
- package/dist/assets/fonts/IBMPlexSans-SemiBoldItalic.woff +0 -0
- package/dist/assets/fonts/IBMPlexSans-SemiBoldItalic.woff2 +0 -0
- package/dist/components/Breadcrumbs/Breadcrumbs.d.ts +0 -1
- package/dist/components/Button/Button.styles.d.ts +0 -1
- package/dist/components/Card/Card.d.ts +0 -1
- package/dist/components/Card/CardAccordion/CardAccordionBody.d.ts +0 -1
- package/dist/components/Card/CardAccordion/CardAccordionHeader.d.ts +0 -1
- package/dist/components/Checkbox/Checkbox.styles.d.ts +0 -1
- package/dist/components/Datepicker/Datepicker.d.ts +8 -0
- package/dist/components/Datepicker/index.d.ts +1 -0
- package/dist/components/DescriptionList/DescriptionListDesc.d.ts +0 -1
- package/dist/components/DescriptionList/DescriptionListTerm.d.ts +0 -1
- package/dist/components/GlobalMessage/GlobalMessage.d.ts +0 -1
- package/dist/components/List/List.d.ts +0 -1
- package/dist/components/LocalMessage/LocalMessage.d.ts +0 -1
- package/dist/components/Pagination/Pagination.d.ts +2 -0
- package/dist/components/RadioButton/RadioButton.styles.d.ts +0 -1
- package/dist/components/Search/Search.d.ts +0 -1
- package/dist/components/Select/Select.styles.d.ts +0 -1
- package/dist/components/Table/Row.d.ts +0 -1
- package/dist/components/TextInput/TextInput.d.ts +5 -4
- package/dist/components/TextInput/TextInput.styles.d.ts +6 -10
- package/dist/components/TextInput/TextInput.tokens.d.ts +2 -38
- package/dist/components/TextInput/TextInput.types.d.ts +2 -6
- package/dist/components/Typography/Typography.d.ts +0 -1
- package/dist/helpers/Input/Input.styles.d.ts +8 -0
- package/dist/helpers/Input/Input.tokens.d.ts +71 -0
- package/dist/helpers/Input/Input.types.d.ts +10 -0
- package/dist/helpers/Input/index.d.ts +3 -0
- package/dist/helpers/{inputFieldStylingBase.d.ts → Input/inputFieldStylingBase.d.ts} +0 -0
- package/dist/helpers/InputMessage/InputMessage.d.ts +0 -1
- package/dist/index.css +20 -354
- package/dist/index.d.ts +2 -0
- package/dist/index.es.css +20 -354
- package/dist/index.es.js +551 -444
- package/dist/index.js +551 -443
- package/dist/styles/fontStyles.css +60 -0
- package/package.json +2 -1
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
@@ -2,7 +2,6 @@ import { ButtonAppearance, ButtonPurpose, ButtonProps } from './Button.types';
|
|
|
2
2
|
import { OverridableComponent } from '@material-ui/core/OverridableComponent';
|
|
3
3
|
import { IconWrapper } from '../../helpers/IconWrapper';
|
|
4
4
|
import { SvgIconTypeMap } from '@material-ui/core/SvgIcon';
|
|
5
|
-
import '../../styles/fontStyles.css';
|
|
6
5
|
export declare const buttonContentStyle: (purpose: ButtonPurpose, appearance: ButtonAppearance, label?: string | undefined, Icon?: OverridableComponent<SvgIconTypeMap<Record<string, unknown>, "svg">> | undefined) => import("styled-components").FlattenSimpleInterpolation;
|
|
7
6
|
declare type ButtonContentProps = Pick<ButtonProps, 'purpose' | 'appearance' | 'size' | 'label' | 'Icon' | 'iconPosition' | 'fullWidth' | 'loading'>;
|
|
8
7
|
export declare const ButtonContent: import("styled-components").StyledComponent<"span", any, ButtonContentProps, never>;
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { AnchorHTMLAttributes, HTMLAttributes } from 'react';
|
|
2
|
-
import '../../styles/fontStyles.css';
|
|
3
2
|
export declare type CardColor = 'filledDark' | 'filledLight' | 'strokeDark' | 'strokeLight';
|
|
4
3
|
export declare type CardType = 'info' | 'navigation';
|
|
5
4
|
export declare type CardProps = {
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { CheckboxProps } from './Checkbox.types';
|
|
2
|
-
import '../../styles/fontStyles.css';
|
|
3
2
|
export declare const CustomCheckbox: import("styled-components").StyledComponent<"span", any, {}, never>;
|
|
4
3
|
export declare const Input: import("styled-components").StyledComponent<"input", any, {
|
|
5
4
|
type: import("react").HTMLInputTypeAttribute;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { InputProps } from '../../helpers/Input';
|
|
2
|
+
export declare type DatepickerProps = InputProps;
|
|
3
|
+
export declare const Datepicker: import("react").ForwardRefExoticComponent<{
|
|
4
|
+
label?: string | undefined;
|
|
5
|
+
width?: string | undefined;
|
|
6
|
+
tip?: string | undefined;
|
|
7
|
+
errorMessage?: string | undefined;
|
|
8
|
+
} & import("react").InputHTMLAttributes<HTMLInputElement> & import("react").RefAttributes<HTMLInputElement>>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './Datepicker';
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { HTMLAttributes } from 'react';
|
|
2
2
|
import { OverridableComponent } from '@material-ui/core/OverridableComponent';
|
|
3
3
|
import { SvgIconTypeMap } from '@material-ui/core';
|
|
4
|
-
import '../../styles/fontStyles.css';
|
|
5
4
|
export declare type DescriptionListDescProps = {
|
|
6
5
|
Icon?: OverridableComponent<SvgIconTypeMap<Record<string, unknown>, 'svg'>>;
|
|
7
6
|
} & HTMLAttributes<HTMLElement>;
|
|
@@ -1,4 +1,3 @@
|
|
|
1
1
|
import { HTMLAttributes } from 'react';
|
|
2
|
-
import '../../styles/fontStyles.css';
|
|
3
2
|
export declare type DescriptionListTermProps = HTMLAttributes<HTMLElement>;
|
|
4
3
|
export declare const DescriptionListTerm: import("react").ForwardRefExoticComponent<DescriptionListTermProps & import("react").RefAttributes<HTMLElement>>;
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { HTMLAttributes } from 'react';
|
|
2
2
|
import { TypographyBodyType } from '../Typography';
|
|
3
|
-
import '../../styles/fontStyles.css';
|
|
4
3
|
export declare type ListType = 'ordered' | 'unordered';
|
|
5
4
|
export declare type ListTypographyType = TypographyBodyType | 'inherit';
|
|
6
5
|
export declare type ListProps = {
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { HTMLAttributes } from 'react';
|
|
2
2
|
import * as CSS from 'csstype';
|
|
3
|
-
import '../../styles/fontStyles.css';
|
|
4
3
|
export declare type LocalMessagePurpose = 'info' | 'warning' | 'danger' | 'confidential' | 'success' | 'tips';
|
|
5
4
|
export declare type LocalMessageLayout = 'horisontal' | 'vertical';
|
|
6
5
|
export declare type LocalMessageProps = {
|
|
@@ -8,6 +8,7 @@ export declare type PaginationProps = {
|
|
|
8
8
|
withCounter?: boolean;
|
|
9
9
|
withSelect?: boolean;
|
|
10
10
|
selectOptions?: SelectOption[];
|
|
11
|
+
onSelectOptionChange?: (option: SelectOption | null) => void;
|
|
11
12
|
smallScreen?: boolean;
|
|
12
13
|
onChange?: (event: React.MouseEvent<HTMLButtonElement, MouseEvent>, page: number) => void;
|
|
13
14
|
} & Omit<HTMLAttributes<HTMLElement>, 'onChange'>;
|
|
@@ -19,6 +20,7 @@ export declare const Pagination: import("react").ForwardRefExoticComponent<{
|
|
|
19
20
|
withCounter?: boolean | undefined;
|
|
20
21
|
withSelect?: boolean | undefined;
|
|
21
22
|
selectOptions?: SelectOption[] | undefined;
|
|
23
|
+
onSelectOptionChange?: ((option: SelectOption | null) => void) | undefined;
|
|
22
24
|
smallScreen?: boolean | undefined;
|
|
23
25
|
onChange?: ((event: React.MouseEvent<HTMLButtonElement, MouseEvent>, page: number) => void) | undefined;
|
|
24
26
|
} & Omit<HTMLAttributes<HTMLElement>, "onChange"> & import("react").RefAttributes<HTMLElement>>;
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { RadioButtonProps } from './RadioButton.types';
|
|
2
|
-
import '../../styles/fontStyles.css';
|
|
3
2
|
export declare const CustomRadioButton: import("styled-components").StyledComponent<"span", any, {}, never>;
|
|
4
3
|
export declare const Input: import("styled-components").StyledComponent<"input", any, {
|
|
5
4
|
type: import("react").HTMLInputTypeAttribute;
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import React, { ButtonHTMLAttributes, InputHTMLAttributes, MouseEvent } from 'react';
|
|
2
|
-
import '../../styles/fontStyles.css';
|
|
3
2
|
export declare type SearchSize = 'small' | 'medium' | 'large';
|
|
4
3
|
declare type ButtonProps = {
|
|
5
4
|
onClick: (event: MouseEvent<HTMLButtonElement>) => void;
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { Styles } from 'react-select';
|
|
2
2
|
import { IconWrapper } from '../../helpers/IconWrapper';
|
|
3
|
-
import '../../styles/fontStyles.css';
|
|
4
3
|
export declare const prefix = "dds-select";
|
|
5
4
|
export declare const Label: import("styled-components").StyledComponent<import("react").ForwardRefExoticComponent<import("../Typography").TypographyProps & import("react").RefAttributes<HTMLElement>>, any, {}, never>;
|
|
6
5
|
declare type StyledContainerProps = {
|
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
export declare const TextInput: React.ForwardRefExoticComponent<{
|
|
3
|
-
label?: string | undefined;
|
|
4
3
|
multiline?: boolean | undefined;
|
|
5
|
-
tip?: string | undefined;
|
|
6
|
-
width?: string | undefined;
|
|
7
|
-
errorMessage?: string | undefined;
|
|
8
4
|
className?: string | undefined;
|
|
9
5
|
style?: React.CSSProperties | undefined;
|
|
6
|
+
} & {
|
|
7
|
+
label?: string | undefined;
|
|
8
|
+
width?: string | undefined;
|
|
9
|
+
tip?: string | undefined;
|
|
10
|
+
errorMessage?: string | undefined;
|
|
10
11
|
} & React.InputHTMLAttributes<HTMLInputElement> & React.InputHTMLAttributes<HTMLTextAreaElement> & React.RefAttributes<HTMLInputElement>>;
|
|
@@ -1,13 +1,9 @@
|
|
|
1
1
|
import { TextInputProps } from './TextInput.types';
|
|
2
|
-
import '../../
|
|
3
|
-
declare
|
|
4
|
-
export declare const
|
|
5
|
-
export declare const TextArea: import("styled-components").StyledComponent<"textarea", any, GeneralInputProps, never>;
|
|
6
|
-
export declare const FlexContainer: import("styled-components").StyledComponent<"div", any, {}, never>;
|
|
2
|
+
import { StyledInputProps } from '../../helpers/Input';
|
|
3
|
+
export declare const TextArea: import("styled-components").StyledComponent<"textarea", any, StyledInputProps, never>;
|
|
4
|
+
export declare const MessageContainer: import("styled-components").StyledComponent<"div", any, {}, never>;
|
|
7
5
|
declare type LabelProps = Pick<TextInputProps, 'multiline' | 'disabled' | 'readOnly'>;
|
|
8
|
-
export declare const Label: import("styled-components").StyledComponent<import("react").ForwardRefExoticComponent<import("../Typography").TypographyProps & import("react").RefAttributes<HTMLElement>>, any, LabelProps, never>;
|
|
9
|
-
declare type
|
|
10
|
-
export declare const
|
|
11
|
-
declare type InputFieldContainerProps = Pick<TextInputProps, 'multiline' | 'label'>;
|
|
12
|
-
export declare const InputFieldContainer: import("styled-components").StyledComponent<"div", any, InputFieldContainerProps, never>;
|
|
6
|
+
export declare const Label: import("styled-components").StyledComponent<import("react").ForwardRefExoticComponent<import("../Typography").TypographyProps & import("react").RefAttributes<HTMLElement>>, any, import("../../helpers/Input").StyledLabelProps & LabelProps, never>;
|
|
7
|
+
declare type InputContainerProps = Pick<TextInputProps, 'multiline' | 'label'>;
|
|
8
|
+
export declare const InputContainer: import("styled-components").StyledComponent<"div", any, InputContainerProps, never>;
|
|
13
9
|
export {};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { CSSObject } from 'styled-components';
|
|
2
|
-
export declare const
|
|
2
|
+
export declare const textInputTokens: {
|
|
3
3
|
general: {
|
|
4
4
|
input: {
|
|
5
5
|
borderRadius: string;
|
|
@@ -33,20 +33,7 @@ export declare const inputTokens: {
|
|
|
33
33
|
};
|
|
34
34
|
};
|
|
35
35
|
};
|
|
36
|
-
base: CSSObject;
|
|
37
36
|
focusColor: string;
|
|
38
|
-
withLabel: {
|
|
39
|
-
base: CSSObject;
|
|
40
|
-
};
|
|
41
|
-
noLabel: {
|
|
42
|
-
base: CSSObject;
|
|
43
|
-
};
|
|
44
|
-
readOnly: {
|
|
45
|
-
base: CSSObject;
|
|
46
|
-
};
|
|
47
|
-
disabled: {
|
|
48
|
-
base: CSSObject;
|
|
49
|
-
};
|
|
50
37
|
multiline: {
|
|
51
38
|
base: CSSObject;
|
|
52
39
|
withLabel: {
|
|
@@ -56,32 +43,9 @@ export declare const inputTokens: {
|
|
|
56
43
|
base: CSSObject;
|
|
57
44
|
};
|
|
58
45
|
};
|
|
59
|
-
error: {
|
|
60
|
-
base: CSSObject;
|
|
61
|
-
hover: {
|
|
62
|
-
base: CSSObject;
|
|
63
|
-
};
|
|
64
|
-
focus: {
|
|
65
|
-
base: CSSObject;
|
|
66
|
-
};
|
|
67
|
-
};
|
|
68
46
|
label: {
|
|
69
|
-
base: CSSObject;
|
|
70
47
|
multiline: {
|
|
71
|
-
base:
|
|
72
|
-
backgroundColor: string;
|
|
73
|
-
padding: string;
|
|
74
|
-
};
|
|
75
|
-
};
|
|
76
|
-
hover: {
|
|
77
|
-
base: {
|
|
78
|
-
color: string;
|
|
79
|
-
};
|
|
80
|
-
};
|
|
81
|
-
focus: {
|
|
82
|
-
base: {
|
|
83
|
-
color: string;
|
|
84
|
-
};
|
|
48
|
+
base: CSSObject;
|
|
85
49
|
};
|
|
86
50
|
};
|
|
87
51
|
wrapper: {
|
|
@@ -1,11 +1,7 @@
|
|
|
1
1
|
import React, { InputHTMLAttributes } from 'react';
|
|
2
|
-
import
|
|
2
|
+
import { InputProps } from '../../helpers/Input';
|
|
3
3
|
export declare type TextInputProps = {
|
|
4
|
-
label?: string;
|
|
5
4
|
multiline?: boolean;
|
|
6
|
-
tip?: string;
|
|
7
|
-
width?: CSS.WidthProperty<string>;
|
|
8
|
-
errorMessage?: string;
|
|
9
5
|
className?: string;
|
|
10
6
|
style?: React.CSSProperties;
|
|
11
|
-
} &
|
|
7
|
+
} & InputProps & InputHTMLAttributes<HTMLTextAreaElement>;
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { HTMLAttributes, ElementType, AnchorHTMLAttributes, LabelHTMLAttributes } from 'react';
|
|
2
2
|
import { CSSObject } from 'styled-components';
|
|
3
3
|
import { TypographyType } from './Typography.types';
|
|
4
|
-
import '../../styles/fontStyles.css';
|
|
5
4
|
export declare function isTextColor(color: string): color is TextColor;
|
|
6
5
|
export declare const getTextColor: (color: TextColor | string) => string;
|
|
7
6
|
export declare type TextColor = 'interactive' | 'primary' | 'danger' | 'warning' | 'success' | 'onLight' | 'onDark' | 'gray1' | 'gray2' | 'gray3' | 'gray4' | 'gray5' | 'gray6' | 'gray7' | 'gray8' | 'gray9';
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { InputProps, StyledInputProps, StyledLabelProps } from './Input.types';
|
|
2
|
+
export declare const inputStyling: ({ readOnly, errorMessage, label, disabled }: StyledInputProps) => import("styled-components").FlattenInterpolation<import("styled-components").ThemeProps<any>>;
|
|
3
|
+
export declare const Input: import("styled-components").StyledComponent<"input", any, StyledInputProps, never>;
|
|
4
|
+
export declare const SingleLineLabel: import("styled-components").StyledComponent<import("react").ForwardRefExoticComponent<import("../../components/Typography").TypographyProps & import("react").RefAttributes<HTMLElement>>, any, StyledLabelProps, never>;
|
|
5
|
+
export declare const InputContainer: import("styled-components").StyledComponent<"div", any, {}, never>;
|
|
6
|
+
declare type OuterInputContainerProps = Pick<InputProps, 'width'>;
|
|
7
|
+
export declare const OuterInputContainer: import("styled-components").StyledComponent<"div", any, OuterInputContainerProps, never>;
|
|
8
|
+
export {};
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
import { CSSObject } from 'styled-components';
|
|
2
|
+
export declare const inputTokens: {
|
|
3
|
+
general: {
|
|
4
|
+
input: {
|
|
5
|
+
borderRadius: string;
|
|
6
|
+
borderWidth: string;
|
|
7
|
+
borderColor: string;
|
|
8
|
+
textColor: string;
|
|
9
|
+
font: {
|
|
10
|
+
lineHeight: any;
|
|
11
|
+
fontSize: string;
|
|
12
|
+
letterSpacing: any;
|
|
13
|
+
fontFamily: any;
|
|
14
|
+
fontWeight: any;
|
|
15
|
+
fontStyle: any;
|
|
16
|
+
};
|
|
17
|
+
hover: {
|
|
18
|
+
backgroundColor: string;
|
|
19
|
+
borderColor: string;
|
|
20
|
+
borderWidth: string;
|
|
21
|
+
};
|
|
22
|
+
focus: {
|
|
23
|
+
borderColor: string;
|
|
24
|
+
borderWidth: string;
|
|
25
|
+
};
|
|
26
|
+
};
|
|
27
|
+
label: {
|
|
28
|
+
hover: {
|
|
29
|
+
textColor: string;
|
|
30
|
+
};
|
|
31
|
+
focus: {
|
|
32
|
+
textColor: string;
|
|
33
|
+
};
|
|
34
|
+
};
|
|
35
|
+
};
|
|
36
|
+
base: CSSObject;
|
|
37
|
+
focusColor: string;
|
|
38
|
+
withLabel: {
|
|
39
|
+
base: CSSObject;
|
|
40
|
+
};
|
|
41
|
+
noLabel: {
|
|
42
|
+
base: CSSObject;
|
|
43
|
+
};
|
|
44
|
+
readOnly: {
|
|
45
|
+
base: CSSObject;
|
|
46
|
+
};
|
|
47
|
+
disabled: {
|
|
48
|
+
base: CSSObject;
|
|
49
|
+
};
|
|
50
|
+
error: {
|
|
51
|
+
base: CSSObject;
|
|
52
|
+
hover: {
|
|
53
|
+
base: CSSObject;
|
|
54
|
+
};
|
|
55
|
+
focus: {
|
|
56
|
+
base: CSSObject;
|
|
57
|
+
};
|
|
58
|
+
};
|
|
59
|
+
label: {
|
|
60
|
+
base: CSSObject;
|
|
61
|
+
hover: {
|
|
62
|
+
base: CSSObject;
|
|
63
|
+
};
|
|
64
|
+
focus: {
|
|
65
|
+
base: CSSObject;
|
|
66
|
+
};
|
|
67
|
+
disabled: {
|
|
68
|
+
base: CSSObject;
|
|
69
|
+
};
|
|
70
|
+
};
|
|
71
|
+
};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { InputHTMLAttributes } from 'react';
|
|
2
|
+
import * as CSS from 'csstype';
|
|
3
|
+
export declare type InputProps = {
|
|
4
|
+
label?: string;
|
|
5
|
+
width?: CSS.WidthProperty<string>;
|
|
6
|
+
tip?: string;
|
|
7
|
+
errorMessage?: string;
|
|
8
|
+
} & InputHTMLAttributes<HTMLInputElement>;
|
|
9
|
+
export declare type StyledInputProps = Pick<InputProps, 'readOnly' | 'errorMessage' | 'label' | 'disabled'>;
|
|
10
|
+
export declare type StyledLabelProps = Pick<InputProps, 'disabled'>;
|
|
File without changes
|