@norges-domstoler/dds-components 0.0.18 → 0.0.22

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 CHANGED
@@ -2,8 +2,6 @@
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
- _biblioteket er under arbeid_
6
-
7
5
  React UI komponenter til bruk i Domstolenes tjenester.
8
6
 
9
7
  Sjekk ut [Domstolenes designsystem Elsa](https://design.domstol.no/) og [Storybook](https://domstolene.github.io/designsystem) for mer dokumentasjon og demoer.
@@ -40,17 +38,21 @@ Tilgjengelige komponenter:
40
38
 
41
39
  - Breadcrumbs
42
40
  - Button
41
+ - Card (inkludert CardAccordion)
43
42
  - Checkbox
43
+ - Datepicker
44
44
  - DescriptionList
45
45
  - Divider
46
46
  - GlobalMessage
47
47
  - IconWrapper
48
+ - InternaHeader
48
49
  - List
49
50
  - LocalMessage
50
51
  - Pagination
51
52
  - RadioButton
52
53
  - Search
53
54
  - Select
55
+ - SkipToContent
54
56
  - Spinner
55
57
  - Table
56
58
  - TextInput
@@ -0,0 +1,2 @@
1
+ import { InternalHeaderProps } from './InternalHeader.types';
2
+ export declare const InternalHeader: ({ applicationName, smallScreen, navigationElements, contextMenuElements, currentPageHref, userProps, onCurrentPageChange, ...rest }: InternalHeaderProps) => JSX.Element;
@@ -0,0 +1,28 @@
1
+ import { InternalHeaderProps } from './InternalHeader.types';
2
+ import { IconWrapper } from '../../helpers/IconWrapper';
3
+ export declare const Wrapper: import("styled-components").StyledComponent<"div", any, {}, never>;
4
+ export declare const BannerWrapper: import("styled-components").StyledComponent<"div", any, {}, never>;
5
+ export declare const BannerLeftWrapper: import("styled-components").StyledComponent<"div", any, {}, never>;
6
+ export declare const ApplicationNameWrapper: import("styled-components").StyledComponent<"div", any, {}, never>;
7
+ export declare const LovisaWrapper: import("styled-components").StyledComponent<"div", any, {}, never>;
8
+ export declare const Navigation: import("styled-components").StyledComponent<"nav", any, {}, never>;
9
+ declare type NavListProps = Pick<InternalHeaderProps, 'smallScreen'>;
10
+ export declare const NavigationList: import("styled-components").StyledComponent<"ul", any, NavListProps, never>;
11
+ export declare const NavigationListItem: import("styled-components").StyledComponent<"li", any, {}, never>;
12
+ declare type StyledNavigationListProps = {
13
+ isCurrent?: boolean;
14
+ };
15
+ export declare const NavigationLink: import("styled-components").StyledComponent<"a", any, StyledNavigationListProps, never>;
16
+ declare type ContextMenuWrapperProps = {
17
+ closed?: boolean;
18
+ };
19
+ export declare const ContextMenuWrapper: import("styled-components").StyledComponent<"div", any, ContextMenuWrapperProps, never>;
20
+ export declare const ContextMenuList: import("styled-components").StyledComponent<"ul", any, {}, never>;
21
+ export declare const ContextMenuListItem: import("styled-components").StyledComponent<"li", any, {}, never>;
22
+ export declare const ContextMenuElement: import("styled-components").StyledComponent<"span", any, {}, never>;
23
+ export declare const ContextMenuLink: import("styled-components").StyledComponent<"a", any, {}, never>;
24
+ export declare const StyledDivider: import("styled-components").StyledComponent<import("react").ForwardRefExoticComponent<{
25
+ color?: import("../Divider").DividerColor | undefined;
26
+ } & import("react").HTMLAttributes<HTMLHRElement> & import("react").RefAttributes<HTMLHRElement>>, any, {}, never>;
27
+ export declare const StyledIconWrapper: import("styled-components").StyledComponent<typeof IconWrapper, any, {}, never>;
28
+ export {};
@@ -0,0 +1,58 @@
1
+ import { CSSObject } from 'styled-components';
2
+ export declare const internalHeaderTokens: {
3
+ wrapper: {
4
+ base: CSSObject;
5
+ };
6
+ applicationNameWrapper: {
7
+ base: CSSObject;
8
+ };
9
+ lovisaWrapper: {
10
+ base: CSSObject;
11
+ };
12
+ banner: {
13
+ base: CSSObject;
14
+ };
15
+ bannerLeft: {
16
+ base: CSSObject;
17
+ };
18
+ navigation: {
19
+ base: CSSObject;
20
+ };
21
+ navigationLink: {
22
+ base: CSSObject;
23
+ hover: {
24
+ base: CSSObject;
25
+ };
26
+ active: {
27
+ base: CSSObject;
28
+ };
29
+ focus: {
30
+ base: CSSObject;
31
+ };
32
+ current: {
33
+ base: CSSObject;
34
+ };
35
+ };
36
+ contextMenu: {
37
+ base: CSSObject;
38
+ spaceFromButtonTop: string;
39
+ };
40
+ contextMenuLink: {
41
+ base: CSSObject;
42
+ hover: {
43
+ base: CSSObject;
44
+ };
45
+ active: {
46
+ base: CSSObject;
47
+ };
48
+ focus: {
49
+ base: CSSObject;
50
+ };
51
+ };
52
+ contextMenuDivider: {
53
+ base: CSSObject;
54
+ };
55
+ icon: {
56
+ base: CSSObject;
57
+ };
58
+ };
@@ -0,0 +1,26 @@
1
+ import { OverridableComponent } from '@material-ui/core/OverridableComponent';
2
+ import { SvgIconTypeMap } from '@material-ui/core/SvgIcon';
3
+ import { AnchorHTMLAttributes, ButtonHTMLAttributes, HTMLAttributes } from 'react';
4
+ export declare type NavigationLinkProps = {
5
+ href: string;
6
+ title: string;
7
+ } & AnchorHTMLAttributes<HTMLAnchorElement>;
8
+ export declare type ContextMenuElementProps = {
9
+ title: string;
10
+ href?: string;
11
+ Icon?: OverridableComponent<SvgIconTypeMap<Record<string, unknown>, 'svg'>>;
12
+ onClick?: () => void;
13
+ } & (AnchorHTMLAttributes<HTMLAnchorElement> | ButtonHTMLAttributes<HTMLButtonElement>);
14
+ export declare type InternaHeaderUserProps = {
15
+ name: string;
16
+ href?: string;
17
+ };
18
+ export declare type InternalHeaderProps = {
19
+ applicationName?: string;
20
+ smallScreen?: boolean;
21
+ userProps?: InternaHeaderUserProps;
22
+ navigationElements?: NavigationLinkProps[];
23
+ contextMenuElements?: ContextMenuElementProps[];
24
+ currentPageHref?: string;
25
+ onCurrentPageChange?: () => void;
26
+ } & HTMLAttributes<HTMLDivElement>;
@@ -0,0 +1,2 @@
1
+ export * from './InternalHeader';
2
+ export * from './InternalHeader.types';
@@ -0,0 +1,12 @@
1
+ import { HTMLAttributes } from 'react';
2
+ import * as CSS from 'csstype';
3
+ export declare type SkipToContentProps = {
4
+ text?: string;
5
+ href: string;
6
+ top?: CSS.TopProperty<string | number>;
7
+ } & HTMLAttributes<HTMLAnchorElement>;
8
+ export declare const SkipToContent: import("react").ForwardRefExoticComponent<{
9
+ text?: string | undefined;
10
+ href: string;
11
+ top?: CSS.TopProperty<string | number> | undefined;
12
+ } & HTMLAttributes<HTMLAnchorElement> & import("react").RefAttributes<HTMLAnchorElement>>;
@@ -0,0 +1,13 @@
1
+ import { CSSObject } from 'styled-components';
2
+ export declare const skipToContentTokens: {
3
+ link: {
4
+ base: CSSObject;
5
+ focusOutline: {
6
+ color: string;
7
+ width: string;
8
+ };
9
+ };
10
+ wrapper: {
11
+ base: CSSObject;
12
+ };
13
+ };
@@ -0,0 +1 @@
1
+ export * from './SkipToContent';
@@ -1,10 +1,13 @@
1
+ import { MouseEvent } from 'react';
1
2
  import { TableCellProps } from './Cell';
2
3
  export declare type SortOrder = 'ascending' | 'descending' | 'none';
3
4
  export declare type SortCellProps = {
4
5
  isSorted?: boolean;
5
6
  sortOrder?: SortOrder;
7
+ onClick: (event: MouseEvent<HTMLButtonElement>) => void;
6
8
  } & Omit<TableCellProps, 'type'>;
7
9
  export declare const SortCell: import("react").ForwardRefExoticComponent<{
8
10
  isSorted?: boolean | undefined;
9
11
  sortOrder?: SortOrder | undefined;
12
+ onClick: (event: MouseEvent<HTMLButtonElement>) => void;
10
13
  } & Omit<TableCellProps, "type"> & import("react").RefAttributes<HTMLTableHeaderCellElement>>;
@@ -0,0 +1 @@
1
+ export declare const inputFieldStylingBase: () => import("styled-components").FlattenSimpleInterpolation;
package/dist/index.d.ts CHANGED
@@ -18,4 +18,6 @@ export * from './components/List';
18
18
  export * from './components/DescriptionList';
19
19
  export * from './components/Spinner';
20
20
  export * from './components/Card';
21
+ export * from './components/InternalHeader';
21
22
  export * from './components/Datepicker';
23
+ export * from './components/SkipToContent';