@norges-domstoler/dds-components 5.2.0-beta.2 → 5.3.1

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.
Files changed (100) hide show
  1. package/README.md +14 -3
  2. package/dist/cjs/components/DescriptionList/DescriptionList.tokens.d.ts +70 -0
  3. package/dist/cjs/components/InternalHeader/InternalHeader.styles.d.ts +1 -1
  4. package/dist/cjs/components/InternalHeader/InternalHeader.tokens.d.ts +39 -27
  5. package/dist/cjs/components/Modal/Modal.tokens.d.ts +0 -6
  6. package/dist/cjs/components/Modal/ModalBody.d.ts +6 -1
  7. package/dist/cjs/components/OverflowMenu/OverflowMenu.tokens.d.ts +25 -10
  8. package/dist/cjs/components/ScrollableContainer/ScrollableContainer.d.ts +7 -0
  9. package/dist/cjs/components/ScrollableContainer/ScrollableContainer.stories.d.ts +15 -0
  10. package/dist/cjs/components/ScrollableContainer/ScrollableContainer.tokens.d.ts +25 -0
  11. package/dist/cjs/components/ScrollableContainer/Scrollbar.d.ts +7 -0
  12. package/dist/cjs/components/ScrollableContainer/index.d.ts +3 -0
  13. package/dist/cjs/components/ScrollableContainer/scrollbarStyling.d.ts +26 -0
  14. package/dist/cjs/components/Select/Select.tokens.d.ts +0 -3
  15. package/dist/cjs/components/Tooltip/Tooltip.d.ts +1 -1
  16. package/dist/cjs/helpers/styling/index.d.ts +0 -1
  17. package/dist/cjs/icons/tsx/closeSmall.d.ts +2 -0
  18. package/dist/cjs/icons/tsx/index.d.ts +1 -0
  19. package/dist/cjs/index.d.ts +1 -0
  20. package/dist/cjs/index.js +1322 -1100
  21. package/dist/components/Card/CardAccordion/CardAccordion.js +3 -8
  22. package/dist/components/Checkbox/Checkbox.js +3 -7
  23. package/dist/components/Checkbox/CheckboxGroup.js +3 -7
  24. package/dist/components/Datepicker/Datepicker.js +3 -7
  25. package/dist/components/DescriptionList/DescriptionList.js +6 -3
  26. package/dist/components/DescriptionList/DescriptionList.tokens.d.ts +70 -0
  27. package/dist/components/DescriptionList/DescriptionList.tokens.js +60 -0
  28. package/dist/components/DescriptionList/DescriptionListDesc.js +2 -2
  29. package/dist/components/DescriptionList/DescriptionListGroup.js +4 -4
  30. package/dist/components/Drawer/Drawer.js +15 -17
  31. package/dist/components/Drawer/DrawerGroup.js +7 -12
  32. package/dist/components/InternalHeader/InternalHeader.js +2 -2
  33. package/dist/components/InternalHeader/InternalHeader.styles.d.ts +1 -1
  34. package/dist/components/InternalHeader/InternalHeader.styles.js +17 -11
  35. package/dist/components/InternalHeader/InternalHeader.tokens.d.ts +39 -27
  36. package/dist/components/InternalHeader/InternalHeader.tokens.js +48 -80
  37. package/dist/components/InternalHeader/NavigationItem.js +4 -2
  38. package/dist/components/Modal/Modal.js +3 -9
  39. package/dist/components/Modal/Modal.tokens.d.ts +0 -6
  40. package/dist/components/Modal/Modal.tokens.js +0 -10
  41. package/dist/components/Modal/ModalBody.d.ts +6 -1
  42. package/dist/components/Modal/ModalBody.js +13 -13
  43. package/dist/components/OverflowMenu/OverflowMenu.js +6 -4
  44. package/dist/components/OverflowMenu/OverflowMenu.tokens.d.ts +25 -10
  45. package/dist/components/OverflowMenu/OverflowMenu.tokens.js +33 -45
  46. package/dist/components/OverflowMenu/OverflowMenuGroup.js +3 -7
  47. package/dist/components/OverflowMenu/OverflowMenuItem.js +7 -3
  48. package/dist/components/Pagination/Pagination.js +1 -1
  49. package/dist/components/Popover/PopoverGroup.js +3 -7
  50. package/dist/components/RadioButton/RadioButton.js +3 -8
  51. package/dist/components/RadioButton/RadioButtonGroup.js +3 -6
  52. package/dist/components/ScrollableContainer/ScrollableContainer.d.ts +7 -0
  53. package/dist/components/ScrollableContainer/ScrollableContainer.js +47 -0
  54. package/dist/components/ScrollableContainer/ScrollableContainer.stories.d.ts +15 -0
  55. package/dist/components/ScrollableContainer/ScrollableContainer.tokens.d.ts +25 -0
  56. package/dist/components/ScrollableContainer/ScrollableContainer.tokens.js +36 -0
  57. package/dist/components/ScrollableContainer/Scrollbar.d.ts +7 -0
  58. package/dist/components/ScrollableContainer/Scrollbar.js +178 -0
  59. package/dist/components/ScrollableContainer/index.d.ts +3 -0
  60. package/dist/components/ScrollableContainer/scrollbarStyling.d.ts +26 -0
  61. package/dist/components/ScrollableContainer/scrollbarStyling.js +40 -0
  62. package/dist/components/Search/Search.js +3 -7
  63. package/dist/components/Select/Select.js +41 -10
  64. package/dist/components/Select/Select.styles.js +7 -4
  65. package/dist/components/Select/Select.tokens.d.ts +0 -3
  66. package/dist/components/Select/Select.tokens.js +6 -18
  67. package/dist/components/Spinner/Spinner.js +3 -8
  68. package/dist/components/Table/SortCell.js +1 -1
  69. package/dist/components/Table/Table.js +2 -2
  70. package/dist/components/Table/TableWrapper.js +3 -3
  71. package/dist/components/Tabs/TabList.js +4 -7
  72. package/dist/components/Tabs/Tabs.js +11 -13
  73. package/dist/components/TextInput/CharCounter.js +3 -7
  74. package/dist/components/TextInput/TextInput.js +3 -6
  75. package/dist/components/TextInput/TextInput.styles.js +2 -2
  76. package/dist/components/TextInput/TextInput.tokens.js +1 -1
  77. package/dist/components/ToggleButton/ToggleButton.js +3 -7
  78. package/dist/components/ToggleButton/ToggleButtonGroup.js +3 -7
  79. package/dist/components/Tooltip/Tooltip.d.ts +1 -1
  80. package/dist/components/Tooltip/Tooltip.js +10 -14
  81. package/dist/helpers/styling/focusVisible.js +3 -2
  82. package/dist/helpers/styling/index.d.ts +0 -1
  83. package/dist/icons/tsx/closeSmall.d.ts +2 -0
  84. package/dist/icons/tsx/closeSmall.js +25 -0
  85. package/dist/icons/tsx/index.d.ts +1 -0
  86. package/dist/index.d.ts +1 -0
  87. package/dist/index.js +4 -0
  88. package/package.json +2 -4
  89. package/dist/cjs/components/DescriptionList/DescriptionListDesc.tokens.d.ts +0 -7
  90. package/dist/cjs/components/DescriptionList/DescriptionListGroup.tokens.d.ts +0 -4
  91. package/dist/cjs/components/DescriptionList/DescriptionListTerm.tokens.d.ts +0 -13
  92. package/dist/cjs/helpers/styling/scrollbarStyling.d.ts +0 -3
  93. package/dist/components/DescriptionList/DescriptionListDesc.tokens.d.ts +0 -7
  94. package/dist/components/DescriptionList/DescriptionListDesc.tokens.js +0 -22
  95. package/dist/components/DescriptionList/DescriptionListGroup.tokens.d.ts +0 -4
  96. package/dist/components/DescriptionList/DescriptionListGroup.tokens.js +0 -11
  97. package/dist/components/DescriptionList/DescriptionListTerm.tokens.d.ts +0 -13
  98. package/dist/components/DescriptionList/DescriptionListTerm.tokens.js +0 -27
  99. package/dist/helpers/styling/scrollbarStyling.d.ts +0 -3
  100. package/dist/helpers/styling/scrollbarStyling.js +0 -8
package/README.md CHANGED
@@ -2,9 +2,9 @@
2
2
 
3
3
  [![Version](https://img.shields.io/npm/v/@norges-domstoler/dds-components)](https://www.npmjs.com/package/@norges-domstoler/dds-components)
4
4
 
5
- React UI komponenter til bruk i Domstolenes tjenester.
5
+ React UI komponenter til bruk i domstolenes tjenester.
6
6
 
7
- Sjekk ut [Domstolenes designsystem Elsa](https://design.domstol.no/) og [Storybook](https://domstolene.github.io/designsystem) for mer dokumentasjon og demoer.
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
- - IconWrapper
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
 
@@ -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,5 +1,5 @@
1
1
  import { InternalHeaderProps } from './InternalHeader.types';
2
- export declare const Wrapper: import("styled-components").StyledComponent<"div", any, {}, never>;
2
+ export declare const OuterContainer: import("styled-components").StyledComponent<"div", any, {}, never>;
3
3
  declare type BannerProps = {
4
4
  hasContextMenu?: boolean;
5
5
  };
@@ -1,40 +1,52 @@
1
- import { CSSObject } from 'styled-components';
2
1
  export declare const internalHeaderTokens: {
3
- wrapper: {
4
- base: CSSObject;
2
+ navLink: {
3
+ base: {
4
+ color: string;
5
+ textDecoration: string;
6
+ backgroundColor: string;
7
+ padding: string;
8
+ font: {
9
+ lineHeight: any;
10
+ fontSize: string;
11
+ letterSpacing: any;
12
+ fontFamily: any;
13
+ fontWeight: any;
14
+ fontStyle: any;
15
+ };
16
+ };
17
+ hover: {
18
+ color: string;
19
+ };
20
+ active: {
21
+ color: string;
22
+ };
23
+ current: {
24
+ color: string;
25
+ backgroundColor: string;
26
+ };
27
+ };
28
+ outerContainer: {
29
+ backgroundColor: string;
5
30
  };
6
31
  applicationNameWrapper: {
7
- base: CSSObject;
32
+ padding: string;
8
33
  };
9
34
  lovisaWrapper: {
10
- base: CSSObject;
35
+ padding: string;
36
+ borderRight: string;
11
37
  };
12
38
  banner: {
13
- base: CSSObject;
14
- contextMenuSpacing: string;
15
- };
16
- bannerLeft: {
17
- base: CSSObject;
39
+ borderBottom: string;
40
+ paddingRight: string;
41
+ hasContextMenu: {
42
+ paddingRight: string;
43
+ };
18
44
  };
19
45
  navigation: {
20
- base: CSSObject;
21
- };
22
- navigationLink: {
23
- base: CSSObject;
24
- hover: {
25
- base: CSSObject;
26
- };
27
- active: {
28
- base: CSSObject;
29
- };
30
- focus: {
31
- base: CSSObject;
32
- };
33
- current: {
34
- base: CSSObject;
35
- };
46
+ borderBottom: string;
36
47
  };
37
48
  contextGroup: {
38
- base: CSSObject;
49
+ right: string;
50
+ top: string;
39
51
  };
40
52
  };
@@ -10,10 +10,4 @@ export declare const modalTokens: {
10
10
  actionsContainer: {
11
11
  base: CSSObject;
12
12
  };
13
- bodyScrollable: {
14
- base: CSSObject;
15
- focus: {
16
- base: CSSObject;
17
- };
18
- };
19
13
  };
@@ -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>, "className" | "id"> & {
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>>;
@@ -1,22 +1,37 @@
1
- import { CSSObject } from 'styled-components';
2
1
  export declare const overflowMenuTokens: {
3
2
  container: {
4
- base: CSSObject;
3
+ border: string;
4
+ backgroundColor: string;
5
+ borderRadius: string;
5
6
  };
6
- link: {
7
- base: CSSObject;
8
- active: {
9
- base: CSSObject;
7
+ element: {
8
+ base: {
9
+ color: string;
10
+ textDecoration: string;
11
+ backgroundColor: string;
12
+ padding: string;
13
+ gap: string;
14
+ font: {
15
+ lineHeight: any;
16
+ fontSize: string;
17
+ letterSpacing: any;
18
+ fontFamily: any;
19
+ fontWeight: any;
20
+ fontStyle: any;
21
+ };
10
22
  };
23
+ };
24
+ link: {
11
25
  hover: {
12
- base: CSSObject;
26
+ color: string;
13
27
  };
14
- focus: {
15
- base: CSSObject;
28
+ active: {
29
+ color: string;
16
30
  };
17
31
  };
18
32
  divider: {
19
- base: CSSObject;
33
+ marginRight: string;
34
+ marginLeft: string;
20
35
  };
21
36
  offset: number;
22
37
  };
@@ -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,3 @@
1
+ export * from './Scrollbar';
2
+ export * from './ScrollableContainer';
3
+ export * from './scrollbarStyling';
@@ -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
+ };
@@ -100,9 +100,6 @@ export declare const selectTokens: {
100
100
  hover: {
101
101
  base: CSSObject;
102
102
  };
103
- icon: {
104
- base: CSSObject;
105
- };
106
103
  };
107
104
  indicatorsContainer: {
108
105
  withLabel: {
@@ -16,7 +16,7 @@ export declare type TooltipProps = BaseComponentProps<HTMLDivElement, {
16
16
  tooltipId?: string;
17
17
  } & PickedHTMLAttributes, Omit<HTMLAttributes<HTMLDivElement>, 'children' | keyof PickedHTMLAttributes>>;
18
18
  export declare const Tooltip: React.ForwardRefExoticComponent<{
19
- htmlProps?: Omit<React.HTMLAttributes<HTMLDivElement>, "style" | "onMouseLeave" | "onMouseOver" | "children"> | undefined;
19
+ htmlProps?: Omit<React.HTMLAttributes<HTMLDivElement>, "style" | "onMouseLeave" | "onMouseOver" | "children"> | undefined; /**`id` for tooltip. */
20
20
  } & Pick<Omit<React.HTMLAttributes<HTMLDivElement>, "style" | "onMouseLeave" | "onMouseOver" | "children">, "className" | "id"> & {
21
21
  /**Innhold i tooltip. */
22
22
  text: string;
@@ -5,4 +5,3 @@ export * from './hover';
5
5
  export * from './focus';
6
6
  export * from './danger';
7
7
  export * from './hideInput';
8
- export * from './scrollbarStyling';
@@ -0,0 +1,2 @@
1
+ import { SvgProps } from '../utils/propTypes';
2
+ export declare function CloseSmallIcon(props: SvgProps): JSX.Element;
@@ -28,6 +28,7 @@ export * from './chevronLeft';
28
28
  export * from './chevronRight';
29
29
  export * from './chevronUp';
30
30
  export * from './close';
31
+ export * from './closeSmall';
31
32
  export * from './closeCircled';
32
33
  export * from './cloud';
33
34
  export * from './collapse';
@@ -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';