@norges-domstoler/dds-components 0.0.26 → 0.0.27
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/Checkbox/CheckboxGroup.d.ts +2 -1
- package/dist/components/Checkbox/CheckboxGroupContext.d.ts +9 -0
- package/dist/components/RadioButton/RadioButtonGroupContext.d.ts +1 -0
- package/dist/components/TextInput/CharCounter.d.ts +3 -2
- package/dist/components/TextInput/TextInput.styles.d.ts +3 -2
- package/dist/components/Typography/Typography.d.ts +1 -2
- package/dist/components/Typography/Typography.types.d.ts +1 -0
- package/dist/helpers/Input/Input.styles.d.ts +4 -2
- package/dist/helpers/Input/Input.types.d.ts +3 -1
- package/dist/helpers/InputMessage/InputMessage.d.ts +6 -6
- package/dist/helpers/styling/index.d.ts +1 -0
- package/dist/helpers/styling/removeButtonStyling.d.ts +1 -0
- package/dist/index.es.js +334 -209
- package/dist/index.js +334 -209
- package/dist/utils/idGenerator.d.ts +3 -0
- package/dist/utils/index.d.ts +1 -0
- package/package.json +1 -1
|
@@ -5,10 +5,11 @@ export declare type CheckboxGroupProps = {
|
|
|
5
5
|
direction?: Direction;
|
|
6
6
|
groupId?: string;
|
|
7
7
|
errorMessage?: string;
|
|
8
|
+
tip?: string;
|
|
8
9
|
required?: boolean;
|
|
9
10
|
className?: string;
|
|
10
11
|
children?: React.ReactNode;
|
|
11
12
|
style?: React.CSSProperties;
|
|
12
13
|
} & HTMLAttributes<HTMLDivElement>;
|
|
13
|
-
export declare const CheckboxGroup: ({ label, direction, errorMessage, required, groupId, children, className, style, ...rest }: CheckboxGroupProps) => JSX.Element;
|
|
14
|
+
export declare const CheckboxGroup: ({ label, direction, errorMessage, tip, required, groupId, children, className, style, ...rest }: CheckboxGroupProps) => JSX.Element;
|
|
14
15
|
export {};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
export interface CheckboxGroup {
|
|
3
|
+
error?: boolean;
|
|
4
|
+
errorMessageId?: string;
|
|
5
|
+
uniqueGroupId?: string;
|
|
6
|
+
tipId?: string;
|
|
7
|
+
}
|
|
8
|
+
export declare const CheckboxGroupContext: React.Context<Nullable<CheckboxGroup>>;
|
|
9
|
+
export declare const useCheckboxGroup: () => Nullable<CheckboxGroup>;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
+
import { HTMLAttributes } from 'react';
|
|
1
2
|
declare type Props = {
|
|
2
3
|
current: number;
|
|
3
4
|
max: number;
|
|
4
|
-
}
|
|
5
|
-
declare function CharCounter({ current, max }: Props): JSX.Element;
|
|
5
|
+
} & HTMLAttributes<HTMLDivElement>;
|
|
6
|
+
declare function CharCounter({ current, max, id, ...rest }: Props): JSX.Element;
|
|
6
7
|
export default CharCounter;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { TextInputProps } from './TextInput.types';
|
|
2
|
-
|
|
3
|
-
|
|
2
|
+
export declare const TextArea: import("styled-components").StyledComponent<"textarea", any, Pick<import("../../helpers/Input").InputProps, "label" | "readOnly" | "disabled"> & {
|
|
3
|
+
hasErrorMessage: boolean;
|
|
4
|
+
}, never>;
|
|
4
5
|
export declare const MessageContainer: import("styled-components").StyledComponent<"div", any, {}, never>;
|
|
5
6
|
declare type LabelProps = Pick<TextInputProps, 'multiline' | 'disabled' | 'readOnly'>;
|
|
6
7
|
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>;
|
|
@@ -1,9 +1,8 @@
|
|
|
1
1
|
import { HTMLAttributes, ElementType, AnchorHTMLAttributes, LabelHTMLAttributes } from 'react';
|
|
2
2
|
import { CSSObject } from 'styled-components';
|
|
3
|
-
import { TypographyType } from './Typography.types';
|
|
3
|
+
import { TypographyType, TextColor } from './Typography.types';
|
|
4
4
|
export declare function isTextColor(color: string): color is TextColor;
|
|
5
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
6
|
export declare type TypographyInteractionProps = {
|
|
8
7
|
hover?: CSSObject;
|
|
9
8
|
active?: CSSObject;
|
|
@@ -5,3 +5,4 @@ export declare type TypographyHeadingType = 'headingSans01' | 'headingSans02' |
|
|
|
5
5
|
export declare type TypographyLeadType = 'leadSans01' | 'leadSans02' | 'leadSans03' | 'leadSans04' | 'leadSans05';
|
|
6
6
|
export declare type TypographySupportingType = 'supportingStyleLabel01' | 'supportingStyleInputText01' | 'supportingStyleInputText02' | 'supportingStyleInputText03' | 'supportingStyleHelperText01' | 'supportingStylePlaceholderText01' | 'supportingStyleTiny01';
|
|
7
7
|
export declare type TypographyType = 'a' | TypographyHeadingType | TypographyBodyType | TypographyLeadType | TypographySupportingType;
|
|
8
|
+
export declare type TextColor = 'interactive' | 'primary' | 'danger' | 'warning' | 'success' | 'onLight' | 'onDark' | 'gray1' | 'gray2' | 'gray3' | 'gray4' | 'gray5' | 'gray6' | 'gray7' | 'gray8' | 'gray9';
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
import { InputProps, StyledInputProps, StyledLabelProps } from './Input.types';
|
|
2
|
-
export declare const inputStyling: ({ readOnly,
|
|
3
|
-
export declare const Input: import("styled-components").StyledComponent<"input", any,
|
|
2
|
+
export declare const inputStyling: ({ readOnly, label, disabled, hasErrorMessage }: StyledInputProps) => import("styled-components").FlattenInterpolation<import("styled-components").ThemeProps<any>>;
|
|
3
|
+
export declare const Input: import("styled-components").StyledComponent<"input", any, Pick<InputProps, "readOnly" | "label" | "disabled"> & {
|
|
4
|
+
hasErrorMessage: boolean;
|
|
5
|
+
}, never>;
|
|
4
6
|
export declare const SingleLineLabel: import("styled-components").StyledComponent<import("react").ForwardRefExoticComponent<import("../../components/Typography").TypographyProps & import("react").RefAttributes<HTMLElement>>, any, StyledLabelProps, never>;
|
|
5
7
|
export declare const InputContainer: import("styled-components").StyledComponent<"div", any, {}, never>;
|
|
6
8
|
declare type OuterInputContainerProps = Pick<InputProps, 'width'>;
|
|
@@ -6,5 +6,7 @@ export declare type InputProps = {
|
|
|
6
6
|
tip?: string;
|
|
7
7
|
errorMessage?: string;
|
|
8
8
|
} & InputHTMLAttributes<HTMLInputElement>;
|
|
9
|
-
export declare type StyledInputProps = Pick<InputProps, 'readOnly' | '
|
|
9
|
+
export declare type StyledInputProps = Pick<InputProps, 'readOnly' | 'label' | 'disabled'> & {
|
|
10
|
+
hasErrorMessage: boolean;
|
|
11
|
+
};
|
|
10
12
|
export declare type StyledLabelProps = Pick<InputProps, 'disabled'>;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { HTMLAttributes } from 'react';
|
|
2
2
|
declare type MessageType = 'error' | 'tip';
|
|
3
|
-
declare
|
|
3
|
+
export declare const InputMessage: import("react").ForwardRefExoticComponent<{
|
|
4
4
|
message: string;
|
|
5
5
|
messageType: MessageType;
|
|
6
|
-
maxWidth?:
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
export
|
|
6
|
+
maxWidth?: string | undefined;
|
|
7
|
+
messageId?: string | undefined;
|
|
8
|
+
} & HTMLAttributes<HTMLDivElement> & import("react").RefAttributes<HTMLDivElement>>;
|
|
9
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './removeButtonStyling';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const removeButtonStyling: import("styled-components").FlattenSimpleInterpolation;
|