@norges-domstoler/dds-components 0.0.30 → 1.0.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/dist/components/Modal/Modal.d.ts +15 -0
- package/dist/components/Modal/Modal.tokens.d.ts +19 -0
- package/dist/components/Modal/ModalActions.d.ts +3 -0
- package/dist/components/Modal/ModalBody.d.ts +7 -0
- package/dist/components/Modal/index.d.ts +3 -0
- package/dist/helpers/Backdrop/Backdrop.d.ts +5 -0
- package/dist/helpers/Backdrop/Backdrop.utils.d.ts +2 -0
- package/dist/helpers/Backdrop/index.d.ts +2 -0
- package/dist/helpers/color.d.ts +6 -0
- package/dist/helpers/styling/index.d.ts +1 -0
- package/dist/helpers/styling/visibilityTransition.d.ts +1 -0
- package/dist/hooks/index.d.ts +2 -0
- package/dist/hooks/useFocusTrap.d.ts +1 -0
- package/dist/hooks/useMountTransition.d.ts +1 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.es.js +1040 -765
- package/dist/index.js +1042 -764
- package/dist/utils/getScrollbarSize.d.ts +1 -0
- package/dist/utils/index.d.ts +1 -0
- package/package.json +10 -9
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { HTMLAttributes, ReactNode, RefObject } from 'react';
|
|
2
|
+
export declare type ModalProps = {
|
|
3
|
+
onClose?: () => void;
|
|
4
|
+
isOpen?: boolean;
|
|
5
|
+
parentElement?: HTMLElement;
|
|
6
|
+
header?: string | ReactNode;
|
|
7
|
+
triggerRef?: RefObject<HTMLElement>;
|
|
8
|
+
} & HTMLAttributes<HTMLDivElement>;
|
|
9
|
+
export declare const Modal: import("react").ForwardRefExoticComponent<{
|
|
10
|
+
onClose?: (() => void) | undefined;
|
|
11
|
+
isOpen?: boolean | undefined;
|
|
12
|
+
parentElement?: HTMLElement | undefined;
|
|
13
|
+
header?: string | ReactNode;
|
|
14
|
+
triggerRef?: RefObject<HTMLElement> | undefined;
|
|
15
|
+
} & HTMLAttributes<HTMLDivElement> & import("react").RefAttributes<HTMLDivElement>>;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { CSSObject } from 'styled-components';
|
|
2
|
+
export declare const modalTokens: {
|
|
3
|
+
base: CSSObject;
|
|
4
|
+
focus: {
|
|
5
|
+
base: CSSObject;
|
|
6
|
+
};
|
|
7
|
+
contentContainer: {
|
|
8
|
+
base: CSSObject;
|
|
9
|
+
};
|
|
10
|
+
actionsContainer: {
|
|
11
|
+
base: CSSObject;
|
|
12
|
+
};
|
|
13
|
+
bodyScrollable: {
|
|
14
|
+
base: CSSObject;
|
|
15
|
+
focus: {
|
|
16
|
+
base: CSSObject;
|
|
17
|
+
};
|
|
18
|
+
};
|
|
19
|
+
};
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { HTMLAttributes } from 'react';
|
|
2
|
+
export declare type ModalBodyProps = {
|
|
3
|
+
scrollable?: boolean;
|
|
4
|
+
} & HTMLAttributes<HTMLDivElement>;
|
|
5
|
+
export declare const ModalBody: import("react").ForwardRefExoticComponent<{
|
|
6
|
+
scrollable?: boolean | undefined;
|
|
7
|
+
} & HTMLAttributes<HTMLDivElement> & import("react").RefAttributes<HTMLDivElement>>;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
export declare type ColorAlphaFormat = 'hex8' | 'decimal';
|
|
2
|
+
export declare const convertAlpha: (value: number | string, typeFrom: ColorAlphaFormat, typeTo: ColorAlphaFormat) => string | number | undefined;
|
|
3
|
+
export declare const hexToRGBA: (hex: string) => string;
|
|
4
|
+
export declare const addAlphaToRGB: (rgb: string, alpha: number | string) => string;
|
|
5
|
+
export declare const RGBToHex: (value: string) => string;
|
|
6
|
+
export declare const changeRGBAAlpha: (value: string, alpha: number) => string;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const visibilityTransition: (open: boolean) => import("styled-components").FlattenSimpleInterpolation;
|
package/dist/hooks/index.d.ts
CHANGED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function useFocusTrap<T extends HTMLElement>(active: boolean): import("react").RefObject<T>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const useMountTransition: (isMounted: boolean, unmountDelay: number) => boolean;
|
package/dist/index.d.ts
CHANGED