@norges-domstoler/dds-components 0.0.19 → 0.0.20

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
@@ -40,11 +40,14 @@ Tilgjengelige komponenter:
40
40
 
41
41
  - Breadcrumbs
42
42
  - Button
43
+ - Card (inkludert CardAccordion)
43
44
  - Checkbox
45
+ - Datepicker
44
46
  - DescriptionList
45
47
  - Divider
46
48
  - GlobalMessage
47
49
  - IconWrapper
50
+ - InternaHeader
48
51
  - List
49
52
  - LocalMessage
50
53
  - Pagination
@@ -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
+ } & HTMLAttributes<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';
@@ -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,5 @@ 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';