@norges-domstoler/dds-components 1.2.0 → 2.2.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.
Files changed (57) hide show
  1. package/dist/components/Button/Button.d.ts +2 -1
  2. package/dist/components/Button/Button.types.d.ts +2 -2
  3. package/dist/components/Card/Card.d.ts +17 -5
  4. package/dist/components/Card/CardAccordion/CardAccordionBody.d.ts +2 -2
  5. package/dist/components/Checkbox/Checkbox.d.ts +1 -0
  6. package/dist/components/Checkbox/Checkbox.styles.d.ts +1 -0
  7. package/dist/components/Datepicker/Datepicker.d.ts +3 -1
  8. package/dist/components/DescriptionList/DescriptionListDesc.d.ts +2 -2
  9. package/dist/components/DescriptionList/DescriptionListGroup.d.ts +2 -2
  10. package/dist/components/Drawer/Drawer.d.ts +4 -4
  11. package/dist/components/GlobalMessage/GlobalMessage.tokens.d.ts +9 -3
  12. package/dist/components/InputMessage/InputMessage.d.ts +10 -0
  13. package/dist/{helpers → components}/InputMessage/InputMessage.tokens.d.ts +0 -1
  14. package/dist/components/InputMessage/index.d.ts +1 -0
  15. package/dist/components/InternalHeader/InternalHeader.d.ts +1 -0
  16. package/dist/components/InternalHeader/InternalHeader.styles.d.ts +1 -0
  17. package/dist/components/InternalHeader/InternalHeader.types.d.ts +2 -2
  18. package/dist/components/LocalMessage/LocalMessage.d.ts +2 -2
  19. package/dist/components/LocalMessage/LocalMessage.tokens.d.ts +20 -7
  20. package/dist/components/OverflowMenu/OverflowMenu.d.ts +1 -0
  21. package/dist/components/OverflowMenu/OverflowMenu.types.d.ts +3 -3
  22. package/dist/components/OverflowMenu/OverflowMenuItem.d.ts +4 -4
  23. package/dist/components/Pagination/Pagination.d.ts +8 -5
  24. package/dist/components/Popover/Popover.d.ts +10 -10
  25. package/dist/components/RadioButton/RadioButton.d.ts +1 -0
  26. package/dist/components/RadioButton/RadioButton.styles.d.ts +1 -0
  27. package/dist/components/RadioButton/RadioButtonGroup.d.ts +1 -1
  28. package/dist/components/Select/Select.d.ts +5 -10
  29. package/dist/components/Select/Select.styles.d.ts +2 -2
  30. package/dist/components/Select/Select.tokens.d.ts +2 -1
  31. package/dist/components/SkipToContent/SkipToContent.d.ts +2 -2
  32. package/dist/components/SkipToContent/SkipToContent.tokens.d.ts +6 -0
  33. package/dist/components/Spinner/Spinner.d.ts +1 -1
  34. package/dist/components/TextInput/TextInput.d.ts +1 -1
  35. package/dist/components/TextInput/TextInput.styles.d.ts +1 -0
  36. package/dist/components/TextInput/TextInput.tokens.d.ts +2 -1
  37. package/dist/components/ToggleButton/ToggleButton.d.ts +11 -0
  38. package/dist/components/ToggleButton/ToggleButton.tokens.d.ts +22 -0
  39. package/dist/components/ToggleButton/ToggleButtonGroup.d.ts +9 -0
  40. package/dist/components/ToggleButton/index.d.ts +2 -0
  41. package/dist/components/Tooltip/Tooltip.tokens.d.ts +0 -7
  42. package/dist/helpers/Chevron/AnimatedChevronUpDown.d.ts +3 -2
  43. package/dist/helpers/IconWrapper/IconWrapper.d.ts +3 -3
  44. package/dist/helpers/Input/Input.styles.d.ts +1 -0
  45. package/dist/helpers/Input/Input.types.d.ts +1 -1
  46. package/dist/helpers/RequiredMarker.d.ts +1 -0
  47. package/dist/helpers/styling/hideInput.d.ts +7 -0
  48. package/dist/helpers/styling/index.d.ts +1 -0
  49. package/dist/hooks/index.d.ts +1 -1
  50. package/dist/hooks/useFloatPosition.d.ts +25 -0
  51. package/dist/hooks/useFocusTrap.d.ts +1 -0
  52. package/dist/index.d.ts +2 -0
  53. package/dist/index.es.js +14591 -17604
  54. package/dist/index.js +14554 -17564
  55. package/package.json +19 -16
  56. package/dist/helpers/InputMessage/InputMessage.d.ts +0 -9
  57. package/dist/hooks/useReactPopper.d.ts +0 -12
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  export declare const Button: import("react").ForwardRefExoticComponent<{
2
3
  size?: import("./Button.types").ButtonSize | undefined;
3
4
  label?: string | undefined;
@@ -9,6 +10,6 @@ export declare const Button: import("react").ForwardRefExoticComponent<{
9
10
  loading?: boolean | undefined;
10
11
  className?: string | undefined;
11
12
  style?: import("react").CSSProperties | undefined;
12
- Icon?: import("@material-ui/core/OverridableComponent").OverridableComponent<import("@material-ui/core").SvgIconTypeMap<Record<string, unknown>, "svg">> | undefined;
13
+ Icon?: import("@mui/material/OverridableComponent").OverridableComponent<import("@mui/material").SvgIconTypeMap<Record<string, unknown>, "svg">> | undefined;
13
14
  fullWidth?: boolean | undefined;
14
15
  } & import("react").ButtonHTMLAttributes<HTMLButtonElement> & import("react").RefAttributes<HTMLButtonElement>>;
@@ -1,5 +1,5 @@
1
- import { SvgIconTypeMap } from '@material-ui/core/SvgIcon';
2
- import { OverridableComponent } from '@material-ui/core/OverridableComponent';
1
+ import { SvgIconTypeMap } from '@mui/material/SvgIcon';
2
+ import { OverridableComponent } from '@mui/material/OverridableComponent';
3
3
  import React, { ButtonHTMLAttributes } from 'react';
4
4
  export declare type ButtonPurpose = 'primary' | 'secondary' | 'danger';
5
5
  export declare type ButtonSize = 'tiny' | 'small' | 'medium' | 'large';
@@ -1,8 +1,20 @@
1
- import { AnchorHTMLAttributes, HTMLAttributes } from 'react';
1
+ import { AnchorHTMLAttributes, HTMLAttributes, RefObject } from 'react';
2
2
  export declare type CardColor = 'filledDark' | 'filledLight' | 'strokeDark' | 'strokeLight';
3
3
  export declare type CardType = 'info' | 'navigation' | 'expandable';
4
- export declare type CardProps = {
4
+ export declare type InfoCardProps = {
5
5
  color?: CardColor;
6
- cardType?: CardType;
7
- } & (HTMLAttributes<HTMLDivElement> | AnchorHTMLAttributes<HTMLAnchorElement>);
8
- export declare const Card: import("react").ForwardRefExoticComponent<CardProps & import("react").RefAttributes<HTMLDivElement>>;
6
+ cardType: 'info';
7
+ cardRef?: RefObject<HTMLDivElement>;
8
+ } & HTMLAttributes<HTMLDivElement>;
9
+ export declare type NavigationCardProps = {
10
+ color?: CardColor;
11
+ cardType: 'navigation';
12
+ cardRef?: RefObject<HTMLAnchorElement>;
13
+ } & AnchorHTMLAttributes<HTMLAnchorElement>;
14
+ export declare type ExpandableCardProps = {
15
+ color?: CardColor;
16
+ cardType: 'expandable';
17
+ cardRef?: RefObject<HTMLDivElement>;
18
+ } & HTMLAttributes<HTMLDivElement>;
19
+ export declare type CardProps = InfoCardProps | NavigationCardProps | ExpandableCardProps;
20
+ export declare const Card: (props: CardProps) => JSX.Element;
@@ -3,10 +3,10 @@ import * as CSS from 'csstype';
3
3
  export declare type CardAccordionBodyProps = {
4
4
  isExpanded?: boolean;
5
5
  headerId?: string;
6
- paddingTop?: CSS.PaddingTopProperty<string>;
6
+ paddingTop?: CSS.Property.PaddingTop<string>;
7
7
  } & HTMLAttributes<HTMLDivElement>;
8
8
  export declare const CardAccordionBody: import("react").ForwardRefExoticComponent<{
9
9
  isExpanded?: boolean | undefined;
10
10
  headerId?: string | undefined;
11
- paddingTop?: string | undefined;
11
+ paddingTop?: CSS.Property.PaddingTop<string> | undefined;
12
12
  } & HTMLAttributes<HTMLDivElement> & import("react").RefAttributes<HTMLDivElement>>;
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  export declare const Checkbox: import("react").ForwardRefExoticComponent<{
2
3
  label?: string | undefined;
3
4
  error?: boolean | undefined;
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  import { CheckboxProps } from './Checkbox.types';
2
3
  export declare const CustomCheckbox: import("styled-components").StyledComponent<"span", any, {}, never>;
3
4
  export declare const Input: import("styled-components").StyledComponent<"input", any, {
@@ -1,8 +1,10 @@
1
+ /// <reference types="react" />
1
2
  import { InputProps } from '../../helpers/Input';
3
+ import * as CSS from 'csstype';
2
4
  export declare type DatepickerProps = InputProps;
3
5
  export declare const Datepicker: import("react").ForwardRefExoticComponent<{
4
6
  label?: string | undefined;
5
- width?: string | undefined;
7
+ width?: CSS.Property.Width<string> | undefined;
6
8
  tip?: string | undefined;
7
9
  errorMessage?: string | undefined;
8
10
  } & import("react").InputHTMLAttributes<HTMLInputElement> & import("react").RefAttributes<HTMLInputElement>>;
@@ -1,6 +1,6 @@
1
1
  import { HTMLAttributes } from 'react';
2
- import { OverridableComponent } from '@material-ui/core/OverridableComponent';
3
- import { SvgIconTypeMap } from '@material-ui/core';
2
+ import { OverridableComponent } from '@mui/material/OverridableComponent';
3
+ import { SvgIconTypeMap } from '@mui/material';
4
4
  export declare type DescriptionListDescProps = {
5
5
  Icon?: OverridableComponent<SvgIconTypeMap<Record<string, unknown>, 'svg'>>;
6
6
  } & HTMLAttributes<HTMLElement>;
@@ -1,8 +1,8 @@
1
1
  import { HTMLAttributes } from 'react';
2
2
  import * as CSS from 'csstype';
3
3
  export declare type DescriptionListGroupProps = {
4
- margin?: CSS.MarginProperty<string>;
4
+ margin?: CSS.Property.Margin<string>;
5
5
  } & HTMLAttributes<HTMLDivElement>;
6
6
  export declare const DescriptionListGroup: import("react").ForwardRefExoticComponent<{
7
- margin?: string | undefined;
7
+ margin?: CSS.Property.Margin<string> | undefined;
8
8
  } & HTMLAttributes<HTMLDivElement> & import("react").RefAttributes<HTMLDivElement>>;
@@ -1,11 +1,11 @@
1
1
  import { HTMLAttributes, ReactNode, RefObject } from 'react';
2
- import { WidthProperty, MinWidthProperty, MaxWidthProperty } from 'csstype';
2
+ import { Property } from 'csstype';
3
3
  export declare type DrawerSize = 'small' | 'large';
4
4
  export declare type DrawerPlacement = 'left' | 'right';
5
5
  export declare type WidthProps = {
6
- minWidth?: MinWidthProperty<string>;
7
- maxWidth?: MaxWidthProperty<string>;
8
- width?: WidthProperty<string>;
6
+ minWidth?: Property.MinWidth<string>;
7
+ maxWidth?: Property.MaxWidth<string>;
8
+ width?: Property.Width<string>;
9
9
  };
10
10
  export declare type DrawerProps = {
11
11
  isOpen?: boolean;
@@ -21,15 +21,21 @@ export declare const globalMessageTokens: {
21
21
  icon: {
22
22
  marginRight: string;
23
23
  info: {
24
- icon: import("@material-ui/core/OverridableComponent").OverridableComponent<import("@material-ui/core").SvgIconTypeMap<{}, "svg">>;
24
+ icon: import("@mui/material/OverridableComponent").OverridableComponent<import("@mui/material").SvgIconTypeMap<{}, "svg">> & {
25
+ muiName: string;
26
+ };
25
27
  color: string;
26
28
  };
27
29
  danger: {
28
- icon: import("@material-ui/core/OverridableComponent").OverridableComponent<import("@material-ui/core").SvgIconTypeMap<{}, "svg">>;
30
+ icon: import("@mui/material/OverridableComponent").OverridableComponent<import("@mui/material").SvgIconTypeMap<{}, "svg">> & {
31
+ muiName: string;
32
+ };
29
33
  color: string;
30
34
  };
31
35
  warning: {
32
- icon: import("@material-ui/core/OverridableComponent").OverridableComponent<import("@material-ui/core").SvgIconTypeMap<{}, "svg">>;
36
+ icon: import("@mui/material/OverridableComponent").OverridableComponent<import("@mui/material").SvgIconTypeMap<{}, "svg">> & {
37
+ muiName: string;
38
+ };
33
39
  color: string;
34
40
  };
35
41
  };
@@ -0,0 +1,10 @@
1
+ import { HTMLAttributes } from 'react';
2
+ export declare type InputMessageType = 'error' | 'tip';
3
+ export declare type InputMessageProps = {
4
+ message: string;
5
+ messageType: InputMessageType;
6
+ } & HTMLAttributes<HTMLDivElement>;
7
+ export declare const InputMessage: import("react").ForwardRefExoticComponent<{
8
+ message: string;
9
+ messageType: InputMessageType;
10
+ } & HTMLAttributes<HTMLDivElement> & import("react").RefAttributes<HTMLDivElement>>;
@@ -2,7 +2,6 @@ import { CSSObject } from 'styled-components';
2
2
  export declare const inputMessageTokens: {
3
3
  padding: string;
4
4
  base: CSSObject;
5
- defaultMaxWidth: string;
6
5
  tip: {
7
6
  base: CSSObject;
8
7
  };
@@ -0,0 +1 @@
1
+ export * from './InputMessage';
@@ -1,2 +1,3 @@
1
+ /// <reference types="react" />
1
2
  import { InternalHeaderProps } from './InternalHeader.types';
2
3
  export declare const InternalHeader: ({ applicationName, smallScreen, navigationElements, contextMenuElements, currentPageHref, userProps, onCurrentPageChange, ...rest }: InternalHeaderProps) => JSX.Element;
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  import { InternalHeaderProps } from './InternalHeader.types';
2
3
  export declare const Wrapper: import("styled-components").StyledComponent<"div", any, {}, never>;
3
4
  declare type BannerProps = {
@@ -1,5 +1,5 @@
1
- import { OverridableComponent } from '@material-ui/core/OverridableComponent';
2
- import { SvgIconTypeMap } from '@material-ui/core/SvgIcon';
1
+ import { OverridableComponent } from '@mui/material/OverridableComponent';
2
+ import { SvgIconTypeMap } from '@mui/material/SvgIcon';
3
3
  import { AnchorHTMLAttributes, ButtonHTMLAttributes, HTMLAttributes } from 'react';
4
4
  export declare type NavigationLinkProps = {
5
5
  href: string;
@@ -7,7 +7,7 @@ export declare type LocalMessageProps = {
7
7
  purpose?: LocalMessagePurpose;
8
8
  closable?: boolean;
9
9
  onClose?: () => void;
10
- width?: CSS.WidthProperty<string>;
10
+ width?: CSS.Property.Width<string>;
11
11
  layout?: LocalMessageLayout;
12
12
  } & HTMLAttributes<HTMLDivElement>;
13
13
  export declare const LocalMessage: import("react").ForwardRefExoticComponent<{
@@ -15,6 +15,6 @@ export declare const LocalMessage: import("react").ForwardRefExoticComponent<{
15
15
  purpose?: LocalMessagePurpose | undefined;
16
16
  closable?: boolean | undefined;
17
17
  onClose?: (() => void) | undefined;
18
- width?: string | undefined;
18
+ width?: CSS.Property.Width<string> | undefined;
19
19
  layout?: LocalMessageLayout | undefined;
20
20
  } & HTMLAttributes<HTMLDivElement> & import("react").RefAttributes<HTMLDivElement>>;
@@ -1,8 +1,9 @@
1
1
  import { CSSObject } from 'styled-components';
2
+ import * as CSS from 'csstype';
2
3
  export declare const localMessageTokens: {
3
4
  container: {
4
5
  base: CSSObject;
5
- defaultWidth: string;
6
+ defaultWidth: CSS.Property.Width<string>;
6
7
  info: {
7
8
  base: CSSObject;
8
9
  };
@@ -40,27 +41,39 @@ export declare const localMessageTokens: {
40
41
  icon: {
41
42
  marginRight: string;
42
43
  info: {
43
- icon: import("@material-ui/core/OverridableComponent").OverridableComponent<import("@material-ui/core").SvgIconTypeMap<{}, "svg">>;
44
+ icon: import("@mui/material/OverridableComponent").OverridableComponent<import("@mui/material").SvgIconTypeMap<{}, "svg">> & {
45
+ muiName: string;
46
+ };
44
47
  color: string;
45
48
  };
46
49
  danger: {
47
- icon: import("@material-ui/core/OverridableComponent").OverridableComponent<import("@material-ui/core").SvgIconTypeMap<{}, "svg">>;
50
+ icon: import("@mui/material/OverridableComponent").OverridableComponent<import("@mui/material").SvgIconTypeMap<{}, "svg">> & {
51
+ muiName: string;
52
+ };
48
53
  color: string;
49
54
  };
50
55
  warning: {
51
- icon: import("@material-ui/core/OverridableComponent").OverridableComponent<import("@material-ui/core").SvgIconTypeMap<{}, "svg">>;
56
+ icon: import("@mui/material/OverridableComponent").OverridableComponent<import("@mui/material").SvgIconTypeMap<{}, "svg">> & {
57
+ muiName: string;
58
+ };
52
59
  color: string;
53
60
  };
54
61
  success: {
55
- icon: import("@material-ui/core/OverridableComponent").OverridableComponent<import("@material-ui/core").SvgIconTypeMap<{}, "svg">>;
62
+ icon: import("@mui/material/OverridableComponent").OverridableComponent<import("@mui/material").SvgIconTypeMap<{}, "svg">> & {
63
+ muiName: string;
64
+ };
56
65
  color: string;
57
66
  };
58
67
  tips: {
59
- icon: import("@material-ui/core/OverridableComponent").OverridableComponent<import("@material-ui/core").SvgIconTypeMap<{}, "svg">>;
68
+ icon: import("@mui/material/OverridableComponent").OverridableComponent<import("@mui/material").SvgIconTypeMap<{}, "svg">> & {
69
+ muiName: string;
70
+ };
60
71
  color: string;
61
72
  };
62
73
  confidential: {
63
- icon: import("@material-ui/core/OverridableComponent").OverridableComponent<import("@material-ui/core").SvgIconTypeMap<{}, "svg">>;
74
+ icon: import("@mui/material/OverridableComponent").OverridableComponent<import("@mui/material").SvgIconTypeMap<{}, "svg">> & {
75
+ muiName: string;
76
+ };
64
77
  color: string;
65
78
  };
66
79
  };
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  import { OverflowMenuContextItem, OverflowMenuNavItem } from '.';
2
3
  declare type ContainerProps = {
3
4
  isOpen?: boolean;
@@ -1,6 +1,6 @@
1
- import { SvgIconTypeMap } from '@material-ui/core';
2
- import { OverridableComponent } from '@material-ui/core/OverridableComponent';
3
- import { Placement } from '../../hooks/useReactPopper';
1
+ import { SvgIconTypeMap } from '@mui/material';
2
+ import { OverridableComponent } from '@mui/material/OverridableComponent';
3
+ import { Placement } from '../../hooks/useFloatPosition';
4
4
  import { AnchorHTMLAttributes, ButtonHTMLAttributes, HTMLAttributes, RefObject } from 'react';
5
5
  export declare type OverflowMenuContextItem = {
6
6
  title: string;
@@ -1,6 +1,6 @@
1
- import { AnchorHTMLAttributes, ButtonHTMLAttributes, HTMLAttributes, Dispatch, SetStateAction } from 'react';
2
- import { OverridableComponent } from '@material-ui/core/OverridableComponent';
3
- import { SvgIconTypeMap } from '@material-ui/core/SvgIcon';
1
+ import React, { AnchorHTMLAttributes, ButtonHTMLAttributes, HTMLAttributes, Dispatch, SetStateAction } from 'react';
2
+ import { OverridableComponent } from '@mui/material/OverridableComponent';
3
+ import { SvgIconTypeMap } from '@mui/material/SvgIcon';
4
4
  import { IconWrapper } from '../../helpers/IconWrapper';
5
5
  export declare const Span: import("styled-components").StyledComponent<"span", any, {}, never>;
6
6
  export declare const Link: import("styled-components").StyledComponent<"a", any, {}, never>;
@@ -14,4 +14,4 @@ export declare type OverflowMenuItemProps = {
14
14
  index?: number;
15
15
  isMenuClosed?: boolean;
16
16
  } & (AnchorHTMLAttributes<HTMLAnchorElement> | ButtonHTMLAttributes<HTMLButtonElement> | HTMLAttributes<HTMLSpanElement>);
17
- export declare const OverflowMenuItem: import("react").ForwardRefExoticComponent<OverflowMenuItemProps & import("react").RefAttributes<HTMLAnchorElement>>;
17
+ export declare const OverflowMenuItem: React.ForwardRefExoticComponent<OverflowMenuItemProps & React.RefAttributes<HTMLAnchorElement>>;
@@ -1,5 +1,8 @@
1
1
  import { HTMLAttributes } from 'react';
2
- import { SelectOption } from '../Select';
2
+ export declare type PaginationOption = {
3
+ label: string;
4
+ value: number;
5
+ };
3
6
  export declare type PaginationProps = {
4
7
  itemsAmount: number;
5
8
  defaultItemsPerPage?: number;
@@ -7,8 +10,8 @@ export declare type PaginationProps = {
7
10
  withPagination?: boolean;
8
11
  withCounter?: boolean;
9
12
  withSelect?: boolean;
10
- selectOptions?: SelectOption[];
11
- onSelectOptionChange?: (option: SelectOption | null) => void;
13
+ selectOptions?: PaginationOption[];
14
+ onSelectOptionChange?: (option: PaginationOption | null) => void;
12
15
  smallScreen?: boolean;
13
16
  onChange?: (event: React.MouseEvent<HTMLButtonElement, MouseEvent>, page: number) => void;
14
17
  } & Omit<HTMLAttributes<HTMLElement>, 'onChange'>;
@@ -19,8 +22,8 @@ export declare const Pagination: import("react").ForwardRefExoticComponent<{
19
22
  withPagination?: boolean | undefined;
20
23
  withCounter?: boolean | undefined;
21
24
  withSelect?: boolean | undefined;
22
- selectOptions?: SelectOption[] | undefined;
23
- onSelectOptionChange?: ((option: SelectOption | null) => void) | undefined;
25
+ selectOptions?: PaginationOption[] | undefined;
26
+ onSelectOptionChange?: ((option: PaginationOption | null) => void) | undefined;
24
27
  smallScreen?: boolean | undefined;
25
28
  onChange?: ((event: React.MouseEvent<HTMLButtonElement, MouseEvent>, page: number) => void) | undefined;
26
29
  } & Omit<HTMLAttributes<HTMLElement>, "onChange"> & import("react").RefAttributes<HTMLElement>>;
@@ -1,13 +1,13 @@
1
- import { HTMLAttributes, ReactNode, RefObject } from 'react';
2
- import { Placement } from '../../hooks';
3
1
  import * as CSS from 'csstype';
2
+ import { HTMLAttributes, ReactNode } from 'react';
3
+ import { Placement } from '../../hooks';
4
4
  export declare type PopoverSizeProps = {
5
- width?: CSS.WidthProperty<string>;
6
- height?: CSS.HeightProperty<string>;
7
- minWidth?: CSS.MinWidthProperty<string>;
8
- minHeight?: CSS.MinHeightProperty<string>;
9
- maxWidth?: CSS.MaxWidthProperty<string>;
10
- maxHeight?: CSS.MaxHeightProperty<string>;
5
+ width?: CSS.Property.Width<string>;
6
+ height?: CSS.Property.Height<string>;
7
+ minWidth?: CSS.Property.MinWidth<string>;
8
+ minHeight?: CSS.Property.MinHeight<string>;
9
+ maxWidth?: CSS.Property.MaxWidth<string>;
10
+ maxHeight?: CSS.Property.MaxHeight<string>;
11
11
  };
12
12
  export declare type PopoverProps = {
13
13
  title?: string | ReactNode;
@@ -15,7 +15,7 @@ export declare type PopoverProps = {
15
15
  onCloseButtonBlur?: () => void;
16
16
  isOpen?: boolean;
17
17
  withCloseButton?: boolean;
18
- anchorElement?: RefObject<HTMLElement>;
18
+ anchorElement?: HTMLElement;
19
19
  placement?: Placement;
20
20
  offset?: number;
21
21
  sizeProps?: PopoverSizeProps;
@@ -26,7 +26,7 @@ export declare const Popover: import("react").ForwardRefExoticComponent<{
26
26
  onCloseButtonBlur?: (() => void) | undefined;
27
27
  isOpen?: boolean | undefined;
28
28
  withCloseButton?: boolean | undefined;
29
- anchorElement?: RefObject<HTMLElement> | undefined;
29
+ anchorElement?: HTMLElement | undefined;
30
30
  placement?: Placement | undefined;
31
31
  offset?: number | undefined;
32
32
  sizeProps?: PopoverSizeProps | undefined;
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  export declare const RadioButton: import("react").ForwardRefExoticComponent<{
2
3
  label?: string | undefined;
3
4
  disabled?: boolean | undefined;
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  import { RadioButtonProps } from './RadioButton.types';
2
3
  export declare const CustomRadioButton: import("styled-components").StyledComponent<"span", any, {}, never>;
3
4
  export declare const Input: import("styled-components").StyledComponent<"input", any, {
@@ -12,7 +12,7 @@ export declare type RadioButtonGroupProps = {
12
12
  groupId?: string;
13
13
  children?: React.ReactNode;
14
14
  required?: boolean;
15
- onChange?: (event: ChangeEvent<HTMLInputElement>, value: any) => void;
15
+ onChange?: (event: ChangeEvent<HTMLInputElement>, value: unknown) => void;
16
16
  className?: string;
17
17
  style?: React.CSSProperties;
18
18
  } & Omit<HTMLAttributes<HTMLDivElement>, 'onChange'>;
@@ -2,21 +2,16 @@ import * as CSS from 'csstype';
2
2
  import React from 'react';
3
3
  import { GroupBase, Props as ReactSelectProps, SelectInstance } from 'react-select';
4
4
  export declare function searchFilter(text: string, search: string): boolean;
5
- export declare type SelectOption = {
6
- label: string;
7
- value: string | number;
8
- data?: unknown;
9
- };
10
- export declare type SelectProps<IsMulti extends boolean> = {
5
+ export declare type SelectProps<TOption, IsMulti extends boolean> = {
11
6
  label?: string;
12
7
  required?: boolean;
13
8
  readOnly?: boolean;
14
9
  errorMessage?: string;
15
10
  tip?: string;
16
- width?: CSS.WidthProperty<string>;
11
+ width?: CSS.Property.Width<string>;
17
12
  className?: string;
18
13
  style?: React.CSSProperties;
19
- } & ReactSelectProps<SelectOption, IsMulti, GroupBase<SelectOption>>;
20
- declare type ForwardRefType<IsMulti extends boolean> = React.ForwardedRef<SelectInstance<SelectOption, IsMulti, GroupBase<SelectOption>>>;
21
- export declare const Select: <IsMulti extends boolean = false>({ id, label, errorMessage, tip, required, readOnly, options, isMulti, value, defaultValue, width, closeMenuOnSelect, className, style, isDisabled, isClearable, placeholder, ...rest }: SelectProps<IsMulti>, ref: ForwardRefType<IsMulti>) => JSX.Element;
14
+ } & ReactSelectProps<TOption, IsMulti, GroupBase<TOption>>;
15
+ declare type ForwardRefType<TOption, IsMulti extends boolean> = React.ForwardedRef<SelectInstance<TOption, IsMulti, GroupBase<TOption>>>;
16
+ export declare const Select: <TOption, IsMulti extends boolean = false>({ id, label, errorMessage, tip, required, readOnly, options, isMulti, value, defaultValue, width, closeMenuOnSelect, className, style, isDisabled, isClearable, placeholder, ...rest }: SelectProps<TOption, IsMulti>, ref: ForwardRefType<TOption, IsMulti>) => JSX.Element;
22
17
  export {};
@@ -1,6 +1,6 @@
1
+ /// <reference types="react" />
1
2
  import { GroupBase, StylesConfig } from 'react-select';
2
3
  import { IconWrapper } from '../../helpers/IconWrapper';
3
- import { SelectOption } from './Select';
4
4
  export declare const prefix = "dds-select";
5
5
  export declare const Label: import("styled-components").StyledComponent<import("react").ForwardRefExoticComponent<import("../Typography").TypographyProps & import("react").RefAttributes<HTMLElement>>, any, {}, never>;
6
6
  declare type StyledContainerProps = {
@@ -15,5 +15,5 @@ export declare const Wrapper: import("styled-components").StyledComponent<"div",
15
15
  width?: string | number | undefined;
16
16
  }, never>;
17
17
  export declare const SelectedIconWrapper: import("styled-components").StyledComponent<typeof IconWrapper, any, {}, never>;
18
- export declare const CustomStyles: Partial<StylesConfig<SelectOption, boolean, GroupBase<SelectOption>>>;
18
+ export declare const getCustomStyles: <TOption>() => Partial<StylesConfig<TOption, boolean, GroupBase<TOption>>>;
19
19
  export {};
@@ -1,9 +1,10 @@
1
1
  import { CSSObject } from 'styled-components';
2
+ import * as CSS from 'csstype';
2
3
  export declare const multiValueContainerMinHeight: string;
3
4
  export declare const selectTokens: {
4
5
  container: {
5
6
  base: CSSObject;
6
- defaultWidth: string;
7
+ defaultWidth: CSS.Property.Width<string>;
7
8
  hover: {
8
9
  base: CSSObject;
9
10
  };
@@ -3,10 +3,10 @@ import * as CSS from 'csstype';
3
3
  export declare type SkipToContentProps = {
4
4
  text?: string;
5
5
  href: string;
6
- top?: CSS.TopProperty<string | number>;
6
+ top?: CSS.Property.Top<string | number>;
7
7
  } & HTMLAttributes<HTMLAnchorElement>;
8
8
  export declare const SkipToContent: import("react").ForwardRefExoticComponent<{
9
9
  text?: string | undefined;
10
10
  href: string;
11
- top?: CSS.TopProperty<string | number> | undefined;
11
+ top?: CSS.Property.Top<string | number> | undefined;
12
12
  } & HTMLAttributes<HTMLAnchorElement> & import("react").RefAttributes<HTMLAnchorElement>>;
@@ -2,6 +2,12 @@ import { CSSObject } from 'styled-components';
2
2
  export declare const skipToContentTokens: {
3
3
  link: {
4
4
  base: CSSObject;
5
+ hover: {
6
+ base: CSSObject;
7
+ };
8
+ focus: {
9
+ base: CSSObject;
10
+ };
5
11
  focusOutline: {
6
12
  color: string;
7
13
  width: string;
@@ -3,6 +3,6 @@ import * as CSS from 'csstype';
3
3
  import { TextColor } from '../Typography';
4
4
  export declare type SpinnerProps = {
5
5
  color?: TextColor | string;
6
- size?: CSS.WidthProperty<string>;
6
+ size?: CSS.Property.Width<string>;
7
7
  } & HTMLAttributes<SVGElement>;
8
8
  export declare function Spinner({ size, color, ...rest }: SpinnerProps): JSX.Element;
@@ -5,7 +5,7 @@ export declare const TextInput: React.ForwardRefExoticComponent<{
5
5
  style?: React.CSSProperties | undefined;
6
6
  } & {
7
7
  label?: string | undefined;
8
- width?: string | undefined;
8
+ width?: import("csstype").Property.Width<string> | undefined;
9
9
  tip?: string | undefined;
10
10
  errorMessage?: string | undefined;
11
11
  } & React.InputHTMLAttributes<HTMLInputElement> & React.InputHTMLAttributes<HTMLTextAreaElement> & React.RefAttributes<HTMLInputElement>>;
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  import { TextInputProps } from './TextInput.types';
2
3
  export declare const TextArea: import("styled-components").StyledComponent<"textarea", any, Pick<import("../../helpers/Input").InputProps, "label" | "readOnly" | "disabled"> & {
3
4
  hasErrorMessage: boolean;
@@ -1,4 +1,5 @@
1
1
  import { CSSObject } from 'styled-components';
2
+ import * as CSS from 'csstype';
2
3
  export declare const textInputTokens: {
3
4
  general: {
4
5
  input: {
@@ -49,7 +50,7 @@ export declare const textInputTokens: {
49
50
  };
50
51
  };
51
52
  wrapper: {
52
- defaultWidth: string;
53
+ defaultWidth: CSS.Property.Width<string>;
53
54
  };
54
55
  container: {
55
56
  multiline: {
@@ -0,0 +1,11 @@
1
+ import { SvgIconTypeMap } from '@mui/material';
2
+ import { OverridableComponent } from '@mui/material/OverridableComponent';
3
+ import { InputHTMLAttributes } from 'react';
4
+ export declare type ToggleButtonProps = {
5
+ label?: string;
6
+ Icon?: OverridableComponent<SvgIconTypeMap<Record<string, unknown>, 'svg'>>;
7
+ } & InputHTMLAttributes<HTMLInputElement>;
8
+ export declare const ToggleButton: import("react").ForwardRefExoticComponent<{
9
+ label?: string | undefined;
10
+ Icon?: OverridableComponent<SvgIconTypeMap<Record<string, unknown>, "svg">> | undefined;
11
+ } & InputHTMLAttributes<HTMLInputElement> & import("react").RefAttributes<HTMLInputElement>>;
@@ -0,0 +1,22 @@
1
+ import { CSSObject } from 'styled-components';
2
+ export declare const toggleButtonTokens: {
3
+ base: CSSObject;
4
+ hover: {
5
+ base: CSSObject;
6
+ };
7
+ focus: {
8
+ base: CSSObject;
9
+ };
10
+ checked: {
11
+ base: CSSObject;
12
+ hover: {
13
+ base: CSSObject;
14
+ };
15
+ };
16
+ group: {
17
+ base: CSSObject;
18
+ };
19
+ container: {
20
+ base: CSSObject;
21
+ };
22
+ };
@@ -0,0 +1,9 @@
1
+ import { HTMLAttributes } from 'react';
2
+ declare type Direction = 'row' | 'column';
3
+ export declare type ToggleButtonGroupProps = {
4
+ direction?: Direction;
5
+ label?: string;
6
+ labelId?: string;
7
+ } & HTMLAttributes<HTMLDivElement>;
8
+ export declare const ToggleButtonGroup: ({ children, direction, label, labelId, ...props }: ToggleButtonGroupProps) => JSX.Element;
9
+ export {};
@@ -0,0 +1,2 @@
1
+ export * from './ToggleButton';
2
+ export * from './ToggleButtonGroup';
@@ -11,11 +11,4 @@ export declare const tooltipTokens: {
11
11
  fill: string;
12
12
  };
13
13
  };
14
- arrowPlacementTemplate: {
15
- top: string;
16
- bottom: string;
17
- left: string;
18
- right: string;
19
- };
20
- offset: number;
21
14
  };
@@ -1,8 +1,9 @@
1
+ /// <reference types="react" />
1
2
  import * as CSS from 'csstype';
2
3
  declare type SvgChevronProps = {
3
4
  isUp?: boolean;
4
- height?: CSS.HeightProperty<string>;
5
- width?: CSS.WidthProperty<string>;
5
+ height?: CSS.Property.Height<string>;
6
+ width?: CSS.Property.Width<string>;
6
7
  };
7
8
  export declare const AnimatedChevronUpDown: ({ isUp, height, width }: SvgChevronProps) => JSX.Element;
8
9
  export {};