@norges-domstoler/dds-components 5.2.0-beta.1 → 5.3.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 +14 -3
- package/dist/assets/svg/calendar_today.svg.js +1 -1
- package/dist/cjs/components/DescriptionList/DescriptionList.tokens.d.ts +70 -0
- package/dist/cjs/components/Modal/Modal.tokens.d.ts +0 -6
- package/dist/cjs/components/Modal/ModalBody.d.ts +6 -1
- package/dist/cjs/components/ScrollableContainer/ScrollableContainer.d.ts +7 -0
- package/dist/cjs/components/ScrollableContainer/ScrollableContainer.stories.d.ts +15 -0
- package/dist/cjs/components/ScrollableContainer/ScrollableContainer.tokens.d.ts +25 -0
- package/dist/cjs/components/ScrollableContainer/Scrollbar.d.ts +7 -0
- package/dist/cjs/components/ScrollableContainer/index.d.ts +3 -0
- package/dist/cjs/components/ScrollableContainer/scrollbarStyling.d.ts +26 -0
- package/dist/cjs/components/Select/Select.tokens.d.ts +0 -3
- package/dist/cjs/helpers/styling/index.d.ts +0 -1
- package/dist/cjs/icons/tsx/closeSmall.d.ts +2 -0
- package/dist/cjs/icons/tsx/index.d.ts +1 -0
- package/dist/cjs/index.d.ts +1 -0
- package/dist/cjs/index.js +951 -626
- package/dist/components/Datepicker/Datepicker.js +1 -1
- package/dist/components/DescriptionList/DescriptionList.js +6 -3
- package/dist/components/DescriptionList/DescriptionList.tokens.d.ts +70 -0
- package/dist/components/DescriptionList/DescriptionList.tokens.js +60 -0
- package/dist/components/DescriptionList/DescriptionListDesc.js +2 -2
- package/dist/components/DescriptionList/DescriptionListGroup.js +4 -4
- package/dist/components/Drawer/Drawer.js +12 -10
- package/dist/components/List/List.js +1 -1
- package/dist/components/Modal/Modal.tokens.d.ts +0 -6
- package/dist/components/Modal/Modal.tokens.js +0 -10
- package/dist/components/Modal/ModalBody.d.ts +6 -1
- package/dist/components/Modal/ModalBody.js +13 -13
- package/dist/components/OverflowMenu/OverflowMenu.js +3 -3
- package/dist/components/Pagination/Pagination.js +1 -1
- package/dist/components/ScrollableContainer/ScrollableContainer.d.ts +7 -0
- package/dist/components/ScrollableContainer/ScrollableContainer.js +47 -0
- package/dist/components/ScrollableContainer/ScrollableContainer.stories.d.ts +15 -0
- package/dist/components/ScrollableContainer/ScrollableContainer.tokens.d.ts +25 -0
- package/dist/components/ScrollableContainer/ScrollableContainer.tokens.js +36 -0
- package/dist/components/ScrollableContainer/Scrollbar.d.ts +7 -0
- package/dist/components/ScrollableContainer/Scrollbar.js +178 -0
- package/dist/components/ScrollableContainer/index.d.ts +3 -0
- package/dist/components/ScrollableContainer/scrollbarStyling.d.ts +26 -0
- package/dist/components/ScrollableContainer/scrollbarStyling.js +40 -0
- package/dist/components/Select/Select.js +38 -3
- package/dist/components/Select/Select.styles.js +7 -4
- package/dist/components/Select/Select.tokens.d.ts +0 -3
- package/dist/components/Select/Select.tokens.js +6 -18
- package/dist/components/Table/SortCell.js +1 -1
- package/dist/components/Table/Table.js +2 -2
- package/dist/components/Table/TableWrapper.js +3 -3
- package/dist/components/Tabs/TabList.js +2 -2
- package/dist/components/TextInput/TextInput.styles.js +2 -2
- package/dist/components/TextInput/TextInput.tokens.js +1 -1
- package/dist/helpers/styling/focusVisible.js +3 -2
- package/dist/helpers/styling/index.d.ts +0 -1
- package/dist/icons/tsx/closeSmall.d.ts +2 -0
- package/dist/icons/tsx/closeSmall.js +25 -0
- package/dist/icons/tsx/index.d.ts +1 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.js +4 -0
- package/package.json +2 -4
- package/dist/cjs/components/DescriptionList/DescriptionListDesc.tokens.d.ts +0 -7
- package/dist/cjs/components/DescriptionList/DescriptionListGroup.tokens.d.ts +0 -4
- package/dist/cjs/components/DescriptionList/DescriptionListTerm.tokens.d.ts +0 -13
- package/dist/cjs/helpers/styling/scrollbarStyling.d.ts +0 -3
- package/dist/components/DescriptionList/DescriptionListDesc.tokens.d.ts +0 -7
- package/dist/components/DescriptionList/DescriptionListDesc.tokens.js +0 -22
- package/dist/components/DescriptionList/DescriptionListGroup.tokens.d.ts +0 -4
- package/dist/components/DescriptionList/DescriptionListGroup.tokens.js +0 -11
- package/dist/components/DescriptionList/DescriptionListTerm.tokens.d.ts +0 -13
- package/dist/components/DescriptionList/DescriptionListTerm.tokens.js +0 -27
- package/dist/helpers/styling/scrollbarStyling.d.ts +0 -3
- package/dist/helpers/styling/scrollbarStyling.js +0 -8
package/README.md
CHANGED
|
@@ -2,9 +2,9 @@
|
|
|
2
2
|
|
|
3
3
|
[](https://www.npmjs.com/package/@norges-domstoler/dds-components)
|
|
4
4
|
|
|
5
|
-
React UI komponenter til bruk i
|
|
5
|
+
React UI komponenter til bruk i domstolenes tjenester.
|
|
6
6
|
|
|
7
|
-
Sjekk ut [
|
|
7
|
+
Sjekk ut [Elsa - domstolenes designsystem](https://design.domstol.no/) og [ Elsa Storybook](https://domstolene.github.io/designsystem) for mer dokumentasjon og demoer.
|
|
8
8
|
|
|
9
9
|
## 📦 Installasjon
|
|
10
10
|
|
|
@@ -40,24 +40,35 @@ Tilgjengelige komponenter:
|
|
|
40
40
|
- Button
|
|
41
41
|
- Card (inkludert CardAccordion)
|
|
42
42
|
- Checkbox
|
|
43
|
+
- Chip
|
|
43
44
|
- Datepicker
|
|
44
45
|
- DescriptionList
|
|
45
46
|
- Divider
|
|
47
|
+
- Drawer
|
|
46
48
|
- GlobalMessage
|
|
47
|
-
-
|
|
49
|
+
- Icon
|
|
50
|
+
- InputMessage
|
|
48
51
|
- InternaHeader
|
|
49
52
|
- List
|
|
50
53
|
- LocalMessage
|
|
54
|
+
- Modal
|
|
55
|
+
- OverflowMenu
|
|
51
56
|
- Pagination
|
|
52
57
|
- Popover
|
|
53
58
|
- RadioButton
|
|
59
|
+
- Scrollbar
|
|
54
60
|
- Search
|
|
55
61
|
- Select
|
|
56
62
|
- SkipToContent
|
|
57
63
|
- Spinner
|
|
58
64
|
- Table
|
|
65
|
+
- Tabs
|
|
66
|
+
- Tag
|
|
59
67
|
- TextInput
|
|
68
|
+
- ToggleButton
|
|
69
|
+
- Tooltip
|
|
60
70
|
- Typography
|
|
71
|
+
- VisuallyHidden
|
|
61
72
|
|
|
62
73
|
## ⏫ Release av ny versjon
|
|
63
74
|
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
var img = "data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' height='24px' viewBox='0 0 24 24' width='24px'
|
|
1
|
+
var img = "data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' height='24px' viewBox='0 0 24 24' width='24px'%3e%3cpath d='M0 0h24v24H0V0z' fill='none'/%3e%3cpath d='M20 3h-1V1h-2v2H7V1H5v2H4c-1.1 0-2 .9-2 2v16c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm0 18H4V10h16v11zm0-13H4V5h16v3z' fill='%233a4146' /%3e%3c/svg%3e";
|
|
2
2
|
var CalendarIcon = img;
|
|
3
3
|
|
|
4
4
|
export { CalendarIcon as default };
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
export declare const descriptionListTokens: {
|
|
2
|
+
term: {
|
|
3
|
+
appearance: {
|
|
4
|
+
small: {
|
|
5
|
+
font: {
|
|
6
|
+
lineHeight: any;
|
|
7
|
+
fontSize: string;
|
|
8
|
+
letterSpacing: any;
|
|
9
|
+
fontFamily: any;
|
|
10
|
+
fontWeight: any;
|
|
11
|
+
fontStyle: any;
|
|
12
|
+
};
|
|
13
|
+
color: string;
|
|
14
|
+
lineHeight: any;
|
|
15
|
+
fontSize: string;
|
|
16
|
+
letterSpacing: any;
|
|
17
|
+
fontFamily: any;
|
|
18
|
+
fontWeight: any;
|
|
19
|
+
fontStyle: any;
|
|
20
|
+
};
|
|
21
|
+
bold: {
|
|
22
|
+
font: {
|
|
23
|
+
lineHeight: any;
|
|
24
|
+
fontSize: string;
|
|
25
|
+
letterSpacing: any;
|
|
26
|
+
fontFamily: any;
|
|
27
|
+
fontWeight: any;
|
|
28
|
+
fontStyle: any;
|
|
29
|
+
};
|
|
30
|
+
lineHeight: any;
|
|
31
|
+
fontSize: string;
|
|
32
|
+
letterSpacing: any;
|
|
33
|
+
fontFamily: any;
|
|
34
|
+
fontWeight: number;
|
|
35
|
+
fontStyle: any;
|
|
36
|
+
color: string;
|
|
37
|
+
};
|
|
38
|
+
};
|
|
39
|
+
firstOfType: {
|
|
40
|
+
marginTop: string;
|
|
41
|
+
};
|
|
42
|
+
};
|
|
43
|
+
desc: {
|
|
44
|
+
base: {
|
|
45
|
+
font: {
|
|
46
|
+
lineHeight: any;
|
|
47
|
+
fontSize: string;
|
|
48
|
+
letterSpacing: any;
|
|
49
|
+
fontFamily: any;
|
|
50
|
+
fontWeight: any;
|
|
51
|
+
fontStyle: any;
|
|
52
|
+
};
|
|
53
|
+
gap: string;
|
|
54
|
+
color: string;
|
|
55
|
+
};
|
|
56
|
+
lastChild: {
|
|
57
|
+
marginBottom: string;
|
|
58
|
+
};
|
|
59
|
+
};
|
|
60
|
+
list: {
|
|
61
|
+
beforeNextTerm: {
|
|
62
|
+
marginTop: string;
|
|
63
|
+
};
|
|
64
|
+
};
|
|
65
|
+
group: {
|
|
66
|
+
base: {
|
|
67
|
+
margin: string;
|
|
68
|
+
};
|
|
69
|
+
};
|
|
70
|
+
};
|
|
@@ -1,13 +1,18 @@
|
|
|
1
1
|
import { BaseComponentPropsWithChildren } from '../../types';
|
|
2
|
+
import { Property } from 'csstype';
|
|
2
3
|
export declare type ModalBodyProps = BaseComponentPropsWithChildren<HTMLDivElement, {
|
|
3
4
|
/**Gjør at innholdet kan scrolles. Det må eventuelt settes (max)bredde og (max)høyde styling på både denne subkomponenten og `<Modal />`. */
|
|
4
5
|
scrollable?: boolean;
|
|
6
|
+
/**Høyde på container. */
|
|
7
|
+
height?: Property.Height;
|
|
5
8
|
}>;
|
|
6
9
|
export declare const ModalBody: import("react").ForwardRefExoticComponent<{
|
|
7
10
|
htmlProps?: import("react").HTMLAttributes<HTMLDivElement> | undefined;
|
|
8
|
-
} & Pick<import("react").HTMLAttributes<HTMLDivElement>, "
|
|
11
|
+
} & Pick<import("react").HTMLAttributes<HTMLDivElement>, "id" | "className"> & {
|
|
9
12
|
/**Gjør at innholdet kan scrolles. Det må eventuelt settes (max)bredde og (max)høyde styling på både denne subkomponenten og `<Modal />`. */
|
|
10
13
|
scrollable?: boolean | undefined;
|
|
14
|
+
/**Høyde på container. */
|
|
15
|
+
height?: Property.Height<0 | (string & {})> | undefined;
|
|
11
16
|
} & {
|
|
12
17
|
children?: import("react").ReactNode;
|
|
13
18
|
} & import("react").RefAttributes<HTMLDivElement>>;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { BaseComponentPropsWithChildren } from '../../types';
|
|
2
|
+
import { Property } from 'csstype';
|
|
3
|
+
export declare type ScrollableContainerProps = BaseComponentPropsWithChildren<HTMLDivElement, {
|
|
4
|
+
/**Høyde på innholdscontainer. */
|
|
5
|
+
contentHeight?: Property.Height;
|
|
6
|
+
}>;
|
|
7
|
+
export declare const ScrollableContainer: (props: ScrollableContainerProps) => JSX.Element;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { ScrollableContainerProps } from '.';
|
|
2
|
+
declare const _default: {
|
|
3
|
+
title: string;
|
|
4
|
+
component: (props: ScrollableContainerProps) => JSX.Element;
|
|
5
|
+
argTypes: {
|
|
6
|
+
contentHeight: {
|
|
7
|
+
control: {
|
|
8
|
+
type: string;
|
|
9
|
+
};
|
|
10
|
+
};
|
|
11
|
+
};
|
|
12
|
+
};
|
|
13
|
+
export default _default;
|
|
14
|
+
export declare const Default: (args: ScrollableContainerProps) => JSX.Element;
|
|
15
|
+
export declare const JustScrollbar: () => JSX.Element;
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
export declare const scrollbarWidthNumberPx = 10;
|
|
2
|
+
export declare const scrollbarTokens: {
|
|
3
|
+
minThumbHeightPx: number;
|
|
4
|
+
track: {
|
|
5
|
+
backgroundColor: string;
|
|
6
|
+
borderRadius: string;
|
|
7
|
+
width: string;
|
|
8
|
+
};
|
|
9
|
+
thumb: {
|
|
10
|
+
base: {
|
|
11
|
+
backgroundColor: string;
|
|
12
|
+
borderRadius: string;
|
|
13
|
+
width: string;
|
|
14
|
+
};
|
|
15
|
+
hover: {
|
|
16
|
+
backgroundColor: string;
|
|
17
|
+
};
|
|
18
|
+
};
|
|
19
|
+
content: {
|
|
20
|
+
paddingRight: string;
|
|
21
|
+
};
|
|
22
|
+
outerContainer: {
|
|
23
|
+
padding: string;
|
|
24
|
+
};
|
|
25
|
+
};
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { RefObject } from 'react';
|
|
2
|
+
import { BaseComponentProps } from '../../types';
|
|
3
|
+
export declare type ScrollbarProps = BaseComponentProps<HTMLDivElement, {
|
|
4
|
+
/** Ref til container med innholdet som skal scrolles. */
|
|
5
|
+
contentRef?: RefObject<HTMLDivElement>;
|
|
6
|
+
}>;
|
|
7
|
+
export declare const Scrollbar: (props: ScrollbarProps) => JSX.Element | null;
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* CSS-in-JS scrollbar styling til bruk der det ikke passer å bruke dedikerte komponenter. Inkluderer styling for webkit pseudo-elementer og for Firefox.
|
|
3
|
+
*/
|
|
4
|
+
export declare const scrollbarStyling: {
|
|
5
|
+
webkit: {
|
|
6
|
+
'&::-webkit-scrollbar': {
|
|
7
|
+
width: string;
|
|
8
|
+
height: string;
|
|
9
|
+
};
|
|
10
|
+
'&::-webkit-scrollbar-track': {
|
|
11
|
+
background: string;
|
|
12
|
+
borderRadius: string;
|
|
13
|
+
};
|
|
14
|
+
'&::-webkit-scrollbar-thumb': {
|
|
15
|
+
background: string;
|
|
16
|
+
borderRadius: string;
|
|
17
|
+
};
|
|
18
|
+
};
|
|
19
|
+
'&::-webkit-scrollbar-thumb:hover': {
|
|
20
|
+
background: string;
|
|
21
|
+
};
|
|
22
|
+
firefox: {
|
|
23
|
+
scrollbarColor: string;
|
|
24
|
+
scrollbarWidth: string;
|
|
25
|
+
};
|
|
26
|
+
};
|
package/dist/cjs/index.d.ts
CHANGED
|
@@ -33,5 +33,6 @@ export * from './components/Tabs';
|
|
|
33
33
|
export * from './components/Tag';
|
|
34
34
|
export * from './components/Chip';
|
|
35
35
|
export * from './components/VisuallyHidden';
|
|
36
|
+
export * from './components/ScrollableContainer';
|
|
36
37
|
export * from './icons/tsx';
|
|
37
38
|
export * from './components/Stepper';
|