@netu-si/netu-react-dsf-components 0.0.14 → 1.0.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 (76) hide show
  1. package/dist/cjs/components/DSFBackLink/DSFBackLink.d.ts +4 -6
  2. package/dist/cjs/components/DSFBeforeMainContainer/DSFBeforeMainContainer.d.ts +4 -10
  3. package/dist/cjs/components/DSFBodyEndContainer/DSFBodyEndContainer.d.ts +0 -3
  4. package/dist/cjs/components/DSFBodyStartContainer/DSFBodyStartContainer.d.ts +0 -3
  5. package/dist/cjs/components/DSFButton/DSFButton.d.ts +0 -1
  6. package/dist/cjs/components/DSFCookies/DSFCookies.d.ts +2 -9
  7. package/dist/cjs/components/DSFCookiesV3/DSFCookies.d.ts +15 -0
  8. package/dist/cjs/components/DSFCookiesV3/index.d.ts +1 -0
  9. package/dist/cjs/components/DSFDateInput/DSFDateInput.d.ts +28 -49
  10. package/dist/cjs/components/DSFErrorSummary/DSFErrorSummary.d.ts +2 -9
  11. package/dist/cjs/components/DSFErrorSummary/index.d.ts +1 -1
  12. package/dist/cjs/components/DSFFooter/DSFFooter.d.ts +3 -8
  13. package/dist/cjs/components/DSFHeader/DSFHeader.d.ts +18 -8
  14. package/dist/cjs/components/DSFHeader/DSFHeaderOld.d.ts +29 -0
  15. package/dist/cjs/components/DSFInput/index.d.ts +1 -1
  16. package/dist/cjs/components/DSFInputField/DSFInputField.d.ts +5 -13
  17. package/dist/cjs/components/DSFLoadingBox/DSFLoadingBox.d.ts +0 -3
  18. package/dist/cjs/components/DSFMain/DSFMain.d.ts +0 -4
  19. package/dist/cjs/components/DSFPage/DSFPage.d.ts +7 -12
  20. package/dist/cjs/components/DSFPanel/DSFPanel.d.ts +1 -5
  21. package/dist/cjs/components/DSFPanel/index.d.ts +1 -1
  22. package/dist/cjs/components/DSFRadio/DSFRadio.d.ts +2 -0
  23. package/dist/cjs/components/DSFSelect/DSFSelect.d.ts +1 -8
  24. package/dist/cjs/components/DSFSkipLink/DSFSkipLink.d.ts +0 -4
  25. package/dist/cjs/components/DSFSummaryList/DSFSummaryList.d.ts +12 -0
  26. package/dist/cjs/components/DSFSummaryList/index.d.ts +1 -0
  27. package/dist/cjs/components/DSFTable/DSFTable.d.ts +0 -5
  28. package/dist/cjs/components/DSFTextArea/DSFTextArea.d.ts +11 -0
  29. package/dist/cjs/components/DSFTextArea/index.d.ts +1 -0
  30. package/dist/cjs/components/DSFUserSignOut/DSFUserSignOut.d.ts +1 -6
  31. package/dist/cjs/components/DSFWarningText/DSFWarningText.d.ts +7 -0
  32. package/dist/cjs/components/DSFWarningText/index.d.ts +1 -0
  33. package/dist/cjs/components/index.d.ts +7 -3
  34. package/dist/cjs/index.js +1 -1
  35. package/dist/cjs/index.js.map +1 -1
  36. package/dist/cjs/lib/WebComponentProvider.d.ts +5 -0
  37. package/dist/cjs/lib/customComponents.d.ts +9 -0
  38. package/dist/esm/components/DSFBackLink/DSFBackLink.d.ts +4 -6
  39. package/dist/esm/components/DSFBeforeMainContainer/DSFBeforeMainContainer.d.ts +4 -10
  40. package/dist/esm/components/DSFBodyEndContainer/DSFBodyEndContainer.d.ts +0 -3
  41. package/dist/esm/components/DSFBodyStartContainer/DSFBodyStartContainer.d.ts +0 -3
  42. package/dist/esm/components/DSFButton/DSFButton.d.ts +0 -1
  43. package/dist/esm/components/DSFCookies/DSFCookies.d.ts +2 -9
  44. package/dist/esm/components/DSFCookiesV3/DSFCookies.d.ts +15 -0
  45. package/dist/esm/components/DSFCookiesV3/index.d.ts +1 -0
  46. package/dist/esm/components/DSFDateInput/DSFDateInput.d.ts +28 -49
  47. package/dist/esm/components/DSFErrorSummary/DSFErrorSummary.d.ts +2 -9
  48. package/dist/esm/components/DSFErrorSummary/index.d.ts +1 -1
  49. package/dist/esm/components/DSFFooter/DSFFooter.d.ts +3 -8
  50. package/dist/esm/components/DSFHeader/DSFHeader.d.ts +18 -8
  51. package/dist/esm/components/DSFHeader/DSFHeaderOld.d.ts +29 -0
  52. package/dist/esm/components/DSFInput/index.d.ts +1 -1
  53. package/dist/esm/components/DSFInputField/DSFInputField.d.ts +5 -13
  54. package/dist/esm/components/DSFLoadingBox/DSFLoadingBox.d.ts +0 -3
  55. package/dist/esm/components/DSFMain/DSFMain.d.ts +0 -4
  56. package/dist/esm/components/DSFPage/DSFPage.d.ts +7 -12
  57. package/dist/esm/components/DSFPanel/DSFPanel.d.ts +1 -5
  58. package/dist/esm/components/DSFPanel/index.d.ts +1 -1
  59. package/dist/esm/components/DSFRadio/DSFRadio.d.ts +2 -0
  60. package/dist/esm/components/DSFSelect/DSFSelect.d.ts +1 -8
  61. package/dist/esm/components/DSFSkipLink/DSFSkipLink.d.ts +0 -4
  62. package/dist/esm/components/DSFSummaryList/DSFSummaryList.d.ts +12 -0
  63. package/dist/esm/components/DSFSummaryList/index.d.ts +1 -0
  64. package/dist/esm/components/DSFTable/DSFTable.d.ts +0 -5
  65. package/dist/esm/components/DSFTextArea/DSFTextArea.d.ts +11 -0
  66. package/dist/esm/components/DSFTextArea/index.d.ts +1 -0
  67. package/dist/esm/components/DSFUserSignOut/DSFUserSignOut.d.ts +1 -6
  68. package/dist/esm/components/DSFWarningText/DSFWarningText.d.ts +7 -0
  69. package/dist/esm/components/DSFWarningText/index.d.ts +1 -0
  70. package/dist/esm/components/index.d.ts +7 -3
  71. package/dist/esm/index.js +1 -1
  72. package/dist/esm/index.js.map +1 -1
  73. package/dist/esm/lib/WebComponentProvider.d.ts +5 -0
  74. package/dist/esm/lib/customComponents.d.ts +9 -0
  75. package/dist/index.d.ts +127 -171
  76. package/package.json +14 -15
@@ -5,10 +5,11 @@
5
5
  */
6
6
  import React from 'react';
7
7
  import '../../resources/css/dsf.main.min.css';
8
- import { LinkProps } from 'react-router-dom';
9
- export interface DSFBackLinkProps extends LinkProps {
8
+ export interface DSFBackLinkProps {
9
+ linkComponent: any;
10
10
  onBackClick?: () => void;
11
11
  label?: string;
12
+ href?: string;
12
13
  }
13
14
  /**
14
15
  * Use the back link component to help users go back to the previous page in a multi-page transaction.
@@ -17,10 +18,7 @@ export interface DSFBackLinkProps extends LinkProps {
17
18
  * - https://gov-cy.github.io/govcy-design-system-docs/components/back_link
18
19
  */
19
20
  declare const DSFBackLink: {
20
- ({ label, onBackClick, ...props }: DSFBackLinkProps): React.JSX.Element;
21
- defaultProps: {
22
- to: string;
23
- };
21
+ ({ label, href, onBackClick, linkComponent: Link }: DSFBackLinkProps): React.JSX.Element;
24
22
  displayName: string;
25
23
  };
26
24
  export default DSFBackLink;
@@ -1,13 +1,7 @@
1
- import React from 'react';
1
+ import React, { ReactNode } from 'react';
2
2
  import '../../resources/css/dsf.main.min.css';
3
- export interface DSFBeforeMainContainerProps {
4
- children: React.ReactNode;
3
+ interface Props {
4
+ children: ReactNode;
5
5
  }
6
- declare const DSFBeforeMainContainer: {
7
- ({ children }: DSFBeforeMainContainerProps): React.JSX.Element;
8
- defaultProps: {
9
- children: undefined;
10
- };
11
- displayName: string;
12
- };
6
+ declare const DSFBeforeMainContainer: React.FC<Props>;
13
7
  export default DSFBeforeMainContainer;
@@ -5,9 +5,6 @@ export interface DSFBodyEndContainerProps {
5
5
  }
6
6
  declare const DSFBodyEndContainer: {
7
7
  ({ children }: DSFBodyEndContainerProps): React.JSX.Element;
8
- defaultProps: {
9
- children: undefined;
10
- };
11
8
  displayName: string;
12
9
  };
13
10
  export default DSFBodyEndContainer;
@@ -5,9 +5,6 @@ export interface DSFBodyStartContainerProps {
5
5
  }
6
6
  declare const DSFBodyStartContainer: {
7
7
  ({ children }: DSFBodyStartContainerProps): React.JSX.Element;
8
- defaultProps: {
9
- children: undefined;
10
- };
11
8
  displayName: string;
12
9
  };
13
10
  export default DSFBodyStartContainer;
@@ -12,7 +12,6 @@ export interface DSFButtonProps extends React.DetailedHTMLProps<React.ButtonHTML
12
12
  }
13
13
  declare const DSFButton: {
14
14
  ({ children, id, type, className, ...props }: DSFButtonProps): React.JSX.Element;
15
- defaultProps: {};
16
15
  displayName: string;
17
16
  };
18
17
  export default DSFButton;
@@ -2,6 +2,7 @@ import React from 'react';
2
2
  import '../../resources/css/dsf.main.min.css';
3
3
  import '../../resources/css/custom.css';
4
4
  export interface DSFCookiesProps {
5
+ linkComponent: React.ComponentType<any>;
5
6
  cookiesDescription: string;
6
7
  cookiesMoreUrl: string;
7
8
  cookiesMoreText: string;
@@ -11,15 +12,7 @@ export interface DSFCookiesProps {
11
12
  newTab?: boolean;
12
13
  }
13
14
  declare const DSFCookies: {
14
- ({ cookiesDescription, cookiesMoreUrl, cookiesMoreText, cookiesAcceptText, cookiesAcceptHandler, hasScroll, newTab, }: DSFCookiesProps): React.JSX.Element;
15
- defaultProps: {
16
- cookiesDescription: undefined;
17
- cookiesMoreUrl: undefined;
18
- cookiesMoreText: undefined;
19
- cookiesAcceptText: undefined;
20
- hasScroll: boolean;
21
- newTab: boolean;
22
- };
15
+ ({ linkComponent: Link, cookiesDescription, cookiesMoreUrl, cookiesMoreText, cookiesAcceptText, cookiesAcceptHandler, hasScroll, newTab, }: DSFCookiesProps): React.JSX.Element;
23
16
  displayName: string;
24
17
  };
25
18
  export default DSFCookies;
@@ -0,0 +1,15 @@
1
+ import React from 'react';
2
+ import '../../resources/css/dsf.main.min.css';
3
+ import '../../resources/css/custom.css';
4
+ export interface DSFCookiesProps {
5
+ cookiesDescription: React.ReactNode;
6
+ cookiesTitle: string;
7
+ cookiesAcceptText: string;
8
+ cookiesRejectText: string;
9
+ cookiesAcceptRejectHandler: (accepted: boolean) => void;
10
+ }
11
+ declare const DSFCookies: {
12
+ ({ cookiesDescription, cookiesTitle, cookiesAcceptText, cookiesRejectText, cookiesAcceptRejectHandler, }: DSFCookiesProps): React.JSX.Element;
13
+ displayName: string;
14
+ };
15
+ export default DSFCookies;
@@ -0,0 +1 @@
1
+ export { default } from './DSFCookies';
@@ -3,9 +3,33 @@ import { UseFormRegisterReturn } from 'react-hook-form';
3
3
  import '../../resources/css/dsf.main.min.css';
4
4
  import { DSFInputProps } from '../DSFInput/DSFInput';
5
5
  interface InputRefObject {
6
- day: RefObject<HTMLInputElement>;
7
- month: RefObject<HTMLInputElement>;
8
- year: RefObject<HTMLInputElement>;
6
+ day: RefObject<HTMLInputElement | HTMLSelectElement>;
7
+ month: RefObject<HTMLInputElement | HTMLSelectElement>;
8
+ year: RefObject<HTMLInputElement | HTMLSelectElement>;
9
+ }
10
+ export interface DSFDateInputInputProps {
11
+ /**
12
+ * Called when the day, month or year changes
13
+ */
14
+ onChange?: (e: React.ChangeEvent<HTMLInputElement | HTMLSelectElement>, key: string) => void;
15
+ /**
16
+ * Called when the day, month or year fields are blurred
17
+ * (does not get called when moving between inputs in the same datefield)
18
+ */
19
+ onBlur?: (e: React.FocusEvent<HTMLInputElement | HTMLSelectElement>, key: string) => void;
20
+ /**
21
+ * Called when the day, month or year fields are focussed
22
+ * (does not get called when moving between inputs in the same datefield)
23
+ */
24
+ onFocus?: (e: React.FocusEvent<HTMLInputElement | HTMLSelectElement>, key: string) => void;
25
+ /**
26
+ * When the form field is controlled, this sets the value of the day, month and year inputs
27
+ */
28
+ value?: {
29
+ day?: string;
30
+ month?: string;
31
+ year?: string;
32
+ };
9
33
  }
10
34
  export interface DSFDateInputProps {
11
35
  register: UseFormRegisterReturn;
@@ -56,55 +80,10 @@ export interface DSFDateInputProps {
56
80
  /**
57
81
  * General input props including event handlers and value for all inputs
58
82
  */
59
- inputProps?: {
60
- /**
61
- * Called when the day, month or year changes
62
- */
63
- onChange?: (e: React.ChangeEvent<HTMLInputElement>, key: string) => void;
64
- /**
65
- * Called when the day, month or year fields are blurred
66
- * (does not get called when moving between inputs in the same datefield)
67
- */
68
- onBlur?: (e: React.FocusEvent<HTMLInputElement>, key: string) => void;
69
- /**
70
- * Called when the day, month or year fields are focussed
71
- * (does not get called when moving between inputs in the same datefield)
72
- */
73
- onFocus?: (e: React.FocusEvent<HTMLInputElement>, key: string) => void;
74
- /**
75
- * When the form field is controlled, this sets the value of the day, month and year inputs
76
- */
77
- value?: {
78
- day?: string;
79
- month?: string;
80
- year?: string;
81
- };
82
- };
83
+ inputProps?: DSFDateInputInputProps;
83
84
  }
84
85
  declare const DSFDateInput: {
85
86
  ({ register, id, label, hint, errorText, labels, refs, inputProps, inputs, defaultValues, }: DSFDateInputProps): React.JSX.Element;
86
87
  displayName: string;
87
- defaultProps: {
88
- inputProps: {};
89
- hint: undefined;
90
- errorText: undefined;
91
- labels: {
92
- day: string;
93
- month: string;
94
- year: string;
95
- };
96
- defaultValues: {
97
- day: undefined;
98
- month: undefined;
99
- year: undefined;
100
- };
101
- inputs: {
102
- day: undefined;
103
- month: undefined;
104
- year: undefined;
105
- };
106
- refs: undefined;
107
- register: undefined;
108
- };
109
88
  };
110
89
  export default DSFDateInput;
@@ -7,18 +7,11 @@ export interface DSFErrorSummaryProps {
7
7
  heading?: string;
8
8
  /** Array of errors with text and target element name to scroll into view when clicked */
9
9
  errors?: {
10
+ href?: string;
10
11
  targetName?: string;
11
12
  text?: string;
12
13
  }[];
13
14
  isInfo?: boolean;
14
15
  }
15
- declare const DSFErrorSummary: {
16
- ({ onHandleErrorClick, heading, errors, isInfo, }: DSFErrorSummaryProps): React.JSX.Element;
17
- defaultProps: {
18
- errors: never[];
19
- heading: string;
20
- onHandleErrorClick: undefined;
21
- isInfo: undefined;
22
- };
23
- };
16
+ declare const DSFErrorSummary: ({ onHandleErrorClick, heading, errors, isInfo, }: DSFErrorSummaryProps) => React.JSX.Element;
24
17
  export default DSFErrorSummary;
@@ -1 +1 @@
1
- export { default } from "./DSFErrorSummary";
1
+ export { default, DSFErrorSummaryProps } from './DSFErrorSummary';
@@ -2,6 +2,7 @@ import React from 'react';
2
2
  import '../../resources/css/custom.css';
3
3
  import '../../resources/css/dsf.main.min.css';
4
4
  export interface DSFFooterProps {
5
+ linkComponent: any;
5
6
  privacyStatementUrl?: string;
6
7
  cookiePolicyUrl?: string;
7
8
  accessibilityStatementUrl?: string;
@@ -11,16 +12,10 @@ export interface DSFFooterProps {
11
12
  cyprusRepublicText?: string;
12
13
  hasScroll?: boolean;
13
14
  newTab?: boolean;
15
+ version?: string;
14
16
  }
15
17
  declare const DSFFooter: {
16
- ({ privacyStatementUrl, cookiePolicyUrl, accessibilityStatementUrl, privacyStatementText, cookiePolicyText, accessibilityStatementText, cyprusRepublicText, hasScroll, newTab, }: DSFFooterProps): React.JSX.Element;
17
- defaultProps: {
18
- privacyStatementUrl: undefined;
19
- cookiePolicyUrl: undefined;
20
- accessibilityStatementUrl: undefined;
21
- hasScroll: boolean;
22
- newTab: boolean;
23
- };
18
+ ({ linkComponent: Link, privacyStatementUrl, cookiePolicyUrl, accessibilityStatementUrl, privacyStatementText, cookiePolicyText, accessibilityStatementText, cyprusRepublicText, version, hasScroll, newTab, }: DSFFooterProps): React.JSX.Element;
24
19
  displayName: string;
25
20
  };
26
21
  export default DSFFooter;
@@ -1,28 +1,38 @@
1
- import React, { ChangeEvent, MouseEventHandler } from 'react';
1
+ import React, { MouseEventHandler } from 'react';
2
2
  import '../../resources/css/dsf.main.min.css';
3
3
  import '../../resources/css/custom.css';
4
+ import { DSFUserSignOutProps } from '../DSFUserSignOut/DSFUserSignOut';
4
5
  export type NavMenuItem = {
5
6
  label: string;
6
7
  href: string;
7
8
  onClick?: () => void;
9
+ subItems?: NavMenuItem[];
8
10
  };
9
11
  export interface DSFHeaderProps {
12
+ linkComponent: any;
10
13
  headerTitle: string;
11
14
  showLang?: boolean;
12
15
  menu?: NavMenuItem[];
13
16
  logoUrl?: string;
14
- languageHandler?: (event: ChangeEvent<HTMLSelectElement>) => void;
17
+ languageHandler?: (locale: string) => void;
15
18
  onLogoClickHandler?: MouseEventHandler<HTMLAnchorElement>;
19
+ langOptions?: LanguageItem[];
16
20
  defaultValue?: string | null;
21
+ currentLang?: string;
17
22
  showLogo?: boolean;
23
+ showSignin?: boolean;
24
+ showSignout?: boolean;
25
+ signoutParams?: DSFUserSignOutProps;
26
+ user?: any;
27
+ showSearch?: boolean;
28
+ showMenu?: boolean;
18
29
  }
30
+ export type LanguageItem = {
31
+ label: string;
32
+ value: string;
33
+ };
19
34
  declare const DSFHeader: {
20
- ({ headerTitle, menu, logoUrl, onLogoClickHandler, showLang, languageHandler, defaultValue, showLogo, }: DSFHeaderProps): React.JSX.Element;
21
- defaultProps: {
22
- showLang: boolean;
23
- menu: undefined;
24
- headerTitle: string;
25
- };
35
+ ({ linkComponent: NavLink, headerTitle, menu, logoUrl, onLogoClickHandler, showLang, languageHandler, langOptions, defaultValue, currentLang, showLogo, showSignin, showSignout, signoutParams, showSearch, showMenu, }: DSFHeaderProps): React.JSX.Element;
26
36
  displayName: string;
27
37
  };
28
38
  export default DSFHeader;
@@ -0,0 +1,29 @@
1
+ import React, { ChangeEvent, MouseEventHandler } from 'react';
2
+ import '../../resources/css/dsf.main.min.css';
3
+ import '../../resources/css/custom.css';
4
+ export type NavMenuItem = {
5
+ label: string;
6
+ href: string;
7
+ onClick?: () => void;
8
+ };
9
+ export interface DSFHeaderProps {
10
+ linkComponent: any;
11
+ headerTitle: string;
12
+ showLang?: boolean;
13
+ menu?: NavMenuItem[];
14
+ logoUrl?: string;
15
+ languageHandler?: (event: ChangeEvent<HTMLSelectElement>) => void;
16
+ onLogoClickHandler?: MouseEventHandler<HTMLAnchorElement>;
17
+ langOptions?: LanguageItem[];
18
+ defaultValue?: string | null;
19
+ showLogo?: boolean;
20
+ }
21
+ export type LanguageItem = {
22
+ label: string;
23
+ value: string;
24
+ };
25
+ declare const DSFHeaderOld: {
26
+ ({ linkComponent: NavLink, headerTitle, menu, logoUrl, onLogoClickHandler, showLang, languageHandler, langOptions, defaultValue, showLogo, }: DSFHeaderProps): React.JSX.Element;
27
+ displayName: string;
28
+ };
29
+ export default DSFHeaderOld;
@@ -1 +1 @@
1
- export { default } from "./DSFInput";
1
+ export { default, DSFInputProps } from './DSFInput';
@@ -2,30 +2,22 @@ import React from 'react';
2
2
  import '../../resources/css/dsf.main.min.css';
3
3
  import { DSFInputProps } from '../DSFInput/DSFInput';
4
4
  import { UseFormRegisterReturn } from 'react-hook-form';
5
+ import { DSFTextAreaProps } from '../DSFTextArea/DSFTextArea';
5
6
  export interface DSFInputFieldProps {
6
7
  label: string;
7
8
  hint?: React.ReactNode;
8
9
  underRadio?: boolean;
9
10
  id: string;
10
- inputProps?: DSFInputProps;
11
- input?: DSFInputProps;
11
+ inputProps?: DSFInputProps | DSFTextAreaProps;
12
12
  meta: {
13
13
  error?: string | string[];
14
14
  touched?: boolean;
15
15
  };
16
+ type?: 'text' | 'textarea';
17
+ rows?: number | undefined;
16
18
  visualSize?: number;
17
19
  errorId?: string;
18
20
  register?: UseFormRegisterReturn;
19
21
  }
20
- declare const DSFInputField: {
21
- ({ meta, label, id, children, hint, inputProps, visualSize, errorId, register, underRadio, ...props }: any): React.JSX.Element;
22
- defaultProps: {
23
- hint: undefined;
24
- errorId: undefined;
25
- visualSize: undefined;
26
- inputProps: undefined;
27
- register: undefined;
28
- meta: {};
29
- };
30
- };
22
+ declare const DSFInputField: React.FC<DSFInputFieldProps>;
31
23
  export default DSFInputField;
@@ -8,9 +8,6 @@ export interface DSFLoadingBoxProps {
8
8
  }
9
9
  declare const DSFLoadingBox: {
10
10
  ({ loading, withinBox, loadingText, children }: DSFLoadingBoxProps): React.JSX.Element;
11
- defaultProps: {
12
- children: undefined;
13
- };
14
11
  displayName: string;
15
12
  };
16
13
  export default DSFLoadingBox;
@@ -6,10 +6,6 @@ export interface DSFMainProps {
6
6
  }
7
7
  declare const DSFMain: {
8
8
  ({ id, children }: DSFMainProps): React.JSX.Element;
9
- defaultProps: {
10
- id: string;
11
- children: undefined;
12
- };
13
9
  displayName: string;
14
10
  };
15
11
  export default DSFMain;
@@ -9,7 +9,7 @@ export interface DSFPageProps {
9
9
  /**
10
10
  * Page contents
11
11
  */
12
- children?: React.ReactNode;
12
+ children: React.ReactNode;
13
13
  /**
14
14
  * ID for page content
15
15
  */
@@ -43,7 +43,12 @@ export interface DSFPageProps {
43
43
  * Override the default page cookies component.
44
44
  */
45
45
  cookies?: React.ReactNode;
46
+ lang?: string;
46
47
  }
48
+ interface IDSFPageContext {
49
+ lang?: string;
50
+ }
51
+ export declare const DSFPageContext: React.Context<IDSFPageContext>;
47
52
  /**
48
53
  * Use the back link component to help users go back to the previous page in a multi-page transaction.
49
54
  *
@@ -51,17 +56,7 @@ export interface DSFPageProps {
51
56
  * - https://design-system.service.gov.uk/components/back-link/
52
57
  */
53
58
  declare const DSFPage: {
54
- ({ id, children, header, footer, bodyStartContainer: bodyStartContainerContent, bodyEndContainer: bodyEndContainerContent, beforeMainContainer: beforeChildren, sideBar: sideBar, cookies: cookies, }: DSFPageProps): React.JSX.Element;
55
- defaultProps: {
56
- children: undefined;
57
- id: string;
58
- header: React.JSX.Element;
59
- footer: undefined;
60
- cookies: undefined;
61
- beforeMainContainer: undefined;
62
- bodyStartContainer: undefined;
63
- bodyEndContainer: undefined;
64
- };
59
+ ({ id, children, header, footer, bodyStartContainer: bodyStartContainerContent, bodyEndContainer: bodyEndContainerContent, beforeMainContainer: beforeChildren, sideBar: sideBar, cookies: cookies, lang, }: DSFPageProps): React.JSX.Element;
65
60
  displayName: string;
66
61
  };
67
62
  export default DSFPage;
@@ -14,11 +14,7 @@ export interface DSFPanelProps {
14
14
  children?: React.ReactNode;
15
15
  }
16
16
  declare const DSFPanel: {
17
- ({ title, type, children, ...props }: DSFPanelProps): React.JSX.Element;
18
- defaultProps: {
19
- children: undefined;
20
- type: PanelEnum;
21
- };
17
+ ({ title, type, children }: DSFPanelProps): React.JSX.Element;
22
18
  displayName: string;
23
19
  };
24
20
  export default DSFPanel;
@@ -1 +1 @@
1
- export { default } from "./DSFPanel";
1
+ export { default, PanelEnum } from './DSFPanel';
@@ -5,8 +5,10 @@ export interface DSFRadioProps extends React.InputHTMLAttributes<HTMLInputElemen
5
5
  hint?: React.ReactNode;
6
6
  children: React.ReactNode;
7
7
  collapsed?: {
8
+ hasError: boolean;
8
9
  node?: React.ReactNode;
9
10
  className: string;
11
+ visible?: boolean;
10
12
  };
11
13
  className?: string;
12
14
  inline?: boolean;
@@ -14,12 +14,5 @@ export interface DSFSelectProps {
14
14
  defaultLabel?: string;
15
15
  visualSize?: number;
16
16
  }
17
- declare const DSFSelect: {
18
- ({ children, inputProps, label, hint, id, meta, defaultValue, defaultLabel, visualSize, }: DSFSelectProps): React.JSX.Element;
19
- defaultProps: {
20
- inputProps: {};
21
- meta: {};
22
- hint: undefined;
23
- };
24
- };
17
+ declare const DSFSelect: ({ children, inputProps, label, hint, id, meta, defaultValue, defaultLabel, visualSize, }: DSFSelectProps) => React.JSX.Element;
25
18
  export default DSFSelect;
@@ -6,10 +6,6 @@ export interface DSFSkipLinkProps {
6
6
  }
7
7
  declare const DSFSkipLink: {
8
8
  ({ href, children }: DSFSkipLinkProps): React.JSX.Element;
9
- defaultProps: {
10
- children: string;
11
- href: string;
12
- };
13
9
  displayName: string;
14
10
  };
15
11
  export default DSFSkipLink;
@@ -0,0 +1,12 @@
1
+ import React, { FC } from 'react';
2
+ import '../../resources/css/dsf.main.min.css';
3
+ export interface DSFSummaryListItem {
4
+ key: String;
5
+ value: React.ReactNode;
6
+ actions?: React.ReactNode;
7
+ }
8
+ export interface DSFSummaryListProps {
9
+ data: DSFSummaryListItem[];
10
+ }
11
+ declare const DSFSummaryList: FC<DSFSummaryListProps>;
12
+ export default DSFSummaryList;
@@ -0,0 +1 @@
1
+ export { default, DSFSummaryListItem, DSFSummaryListProps } from './DSFSummaryList';
@@ -9,11 +9,6 @@ export interface DSFTableProps {
9
9
  }
10
10
  declare const DSFTable: {
11
11
  ({ columns, rowData, hideNumberingColumn, id, inputProps }: DSFTableProps): React.JSX.Element;
12
- defaultProps: {
13
- columns: never[];
14
- rowData: never[];
15
- hideNumberingColumn: boolean;
16
- };
17
12
  displayName: string;
18
13
  };
19
14
  export interface DSFTableColumn {
@@ -0,0 +1,11 @@
1
+ import React from 'react';
2
+ import '../../resources/css/dsf.main.min.css';
3
+ import { UseFormRegisterReturn } from 'react-hook-form';
4
+ export interface DSFTextAreaProps extends React.TextareaHTMLAttributes<HTMLTextAreaElement> {
5
+ id?: string;
6
+ error?: boolean;
7
+ errorId?: string;
8
+ register?: UseFormRegisterReturn;
9
+ }
10
+ declare const DSFTextArea: React.ForwardRefExoticComponent<DSFTextAreaProps & React.RefAttributes<HTMLTextAreaElement>>;
11
+ export default DSFTextArea;
@@ -0,0 +1 @@
1
+ export { default, DSFTextAreaProps } from './DSFTextArea';
@@ -6,10 +6,5 @@ export interface DSFUserSignOutProps {
6
6
  onClick?: () => void;
7
7
  href: string;
8
8
  }
9
- declare const DSFUserSignOut: {
10
- ({ label, fullName, onClick, href }: DSFUserSignOutProps): React.JSX.Element;
11
- defaultProps: {
12
- href: string;
13
- };
14
- };
9
+ declare const DSFUserSignOut: ({ label, fullName, onClick, href }: DSFUserSignOutProps) => React.JSX.Element;
15
10
  export default DSFUserSignOut;
@@ -0,0 +1,7 @@
1
+ import React, { FC } from 'react';
2
+ import '../../resources/css/dsf.main.min.css';
3
+ export interface DSFWarningTextProps {
4
+ text: React.ReactNode;
5
+ }
6
+ declare const DSFWarningText: FC<DSFWarningTextProps>;
7
+ export default DSFWarningText;
@@ -0,0 +1 @@
1
+ export { default } from './DSFWarningText';
@@ -2,11 +2,12 @@ export { default as DSFBackLink } from './DSFBackLink';
2
2
  export { default as DSFButton } from './DSFButton';
3
3
  export { default as DSFCheckbox } from './DSFCheckbox';
4
4
  export { default as DSFDateInput, DSFDateInputProps as DSFDateInputProps } from './DSFDateInput';
5
- export { default as DSFErrorSummary } from './DSFErrorSummary';
5
+ export { default as DSFErrorSummary, DSFErrorSummaryProps } from './DSFErrorSummary';
6
6
  export { default as DSFInputField } from './DSFInputField';
7
- export { default as DSFInput } from './DSFInput';
7
+ export { default as DSFInput, DSFInputProps } from './DSFInput';
8
+ export { default as DSFTextArea, DSFTextAreaProps } from './DSFTextArea';
8
9
  export { default as DSFSelect } from './DSFSelect';
9
- export { default as DSFPanel } from './DSFPanel';
10
+ export { default as DSFPanel, PanelEnum as DSFPanelEnum } from './DSFPanel';
10
11
  export { default as DSFLabel } from './DSFLabel';
11
12
  export { default as DSFErrorText } from './DSFErrorText';
12
13
  export { default as DSFHintText } from './DSFHintText';
@@ -26,3 +27,6 @@ export { default as DSFUserSignOut } from './DSFUserSignOut';
26
27
  export { default as DSFPage } from './DSFPage';
27
28
  export { default as DSFFileUpload } from './DSFFileUpload';
28
29
  export { default as DSFCookies } from './DSFCookies';
30
+ export { default as DSFCookiesV3 } from './DSFCookiesV3';
31
+ export { default as DSFSummaryList, DSFSummaryListItem, DSFSummaryListProps } from './DSFSummaryList';
32
+ export { default as DSFWarningText } from './DSFWarningText';