@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.
- package/dist/cjs/components/DSFBackLink/DSFBackLink.d.ts +4 -6
- package/dist/cjs/components/DSFBeforeMainContainer/DSFBeforeMainContainer.d.ts +4 -10
- package/dist/cjs/components/DSFBodyEndContainer/DSFBodyEndContainer.d.ts +0 -3
- package/dist/cjs/components/DSFBodyStartContainer/DSFBodyStartContainer.d.ts +0 -3
- package/dist/cjs/components/DSFButton/DSFButton.d.ts +0 -1
- package/dist/cjs/components/DSFCookies/DSFCookies.d.ts +2 -9
- package/dist/cjs/components/DSFCookiesV3/DSFCookies.d.ts +15 -0
- package/dist/cjs/components/DSFCookiesV3/index.d.ts +1 -0
- package/dist/cjs/components/DSFDateInput/DSFDateInput.d.ts +28 -49
- package/dist/cjs/components/DSFErrorSummary/DSFErrorSummary.d.ts +2 -9
- package/dist/cjs/components/DSFErrorSummary/index.d.ts +1 -1
- package/dist/cjs/components/DSFFooter/DSFFooter.d.ts +3 -8
- package/dist/cjs/components/DSFHeader/DSFHeader.d.ts +18 -8
- package/dist/cjs/components/DSFHeader/DSFHeaderOld.d.ts +29 -0
- package/dist/cjs/components/DSFInput/index.d.ts +1 -1
- package/dist/cjs/components/DSFInputField/DSFInputField.d.ts +5 -13
- package/dist/cjs/components/DSFLoadingBox/DSFLoadingBox.d.ts +0 -3
- package/dist/cjs/components/DSFMain/DSFMain.d.ts +0 -4
- package/dist/cjs/components/DSFPage/DSFPage.d.ts +7 -12
- package/dist/cjs/components/DSFPanel/DSFPanel.d.ts +1 -5
- package/dist/cjs/components/DSFPanel/index.d.ts +1 -1
- package/dist/cjs/components/DSFRadio/DSFRadio.d.ts +2 -0
- package/dist/cjs/components/DSFSelect/DSFSelect.d.ts +1 -8
- package/dist/cjs/components/DSFSkipLink/DSFSkipLink.d.ts +0 -4
- package/dist/cjs/components/DSFSummaryList/DSFSummaryList.d.ts +12 -0
- package/dist/cjs/components/DSFSummaryList/index.d.ts +1 -0
- package/dist/cjs/components/DSFTable/DSFTable.d.ts +0 -5
- package/dist/cjs/components/DSFTextArea/DSFTextArea.d.ts +11 -0
- package/dist/cjs/components/DSFTextArea/index.d.ts +1 -0
- package/dist/cjs/components/DSFUserSignOut/DSFUserSignOut.d.ts +1 -6
- package/dist/cjs/components/DSFWarningText/DSFWarningText.d.ts +7 -0
- package/dist/cjs/components/DSFWarningText/index.d.ts +1 -0
- package/dist/cjs/components/index.d.ts +7 -3
- package/dist/cjs/index.js +1 -1
- package/dist/cjs/index.js.map +1 -1
- package/dist/cjs/lib/WebComponentProvider.d.ts +5 -0
- package/dist/cjs/lib/customComponents.d.ts +9 -0
- package/dist/esm/components/DSFBackLink/DSFBackLink.d.ts +4 -6
- package/dist/esm/components/DSFBeforeMainContainer/DSFBeforeMainContainer.d.ts +4 -10
- package/dist/esm/components/DSFBodyEndContainer/DSFBodyEndContainer.d.ts +0 -3
- package/dist/esm/components/DSFBodyStartContainer/DSFBodyStartContainer.d.ts +0 -3
- package/dist/esm/components/DSFButton/DSFButton.d.ts +0 -1
- package/dist/esm/components/DSFCookies/DSFCookies.d.ts +2 -9
- package/dist/esm/components/DSFCookiesV3/DSFCookies.d.ts +15 -0
- package/dist/esm/components/DSFCookiesV3/index.d.ts +1 -0
- package/dist/esm/components/DSFDateInput/DSFDateInput.d.ts +28 -49
- package/dist/esm/components/DSFErrorSummary/DSFErrorSummary.d.ts +2 -9
- package/dist/esm/components/DSFErrorSummary/index.d.ts +1 -1
- package/dist/esm/components/DSFFooter/DSFFooter.d.ts +3 -8
- package/dist/esm/components/DSFHeader/DSFHeader.d.ts +18 -8
- package/dist/esm/components/DSFHeader/DSFHeaderOld.d.ts +29 -0
- package/dist/esm/components/DSFInput/index.d.ts +1 -1
- package/dist/esm/components/DSFInputField/DSFInputField.d.ts +5 -13
- package/dist/esm/components/DSFLoadingBox/DSFLoadingBox.d.ts +0 -3
- package/dist/esm/components/DSFMain/DSFMain.d.ts +0 -4
- package/dist/esm/components/DSFPage/DSFPage.d.ts +7 -12
- package/dist/esm/components/DSFPanel/DSFPanel.d.ts +1 -5
- package/dist/esm/components/DSFPanel/index.d.ts +1 -1
- package/dist/esm/components/DSFRadio/DSFRadio.d.ts +2 -0
- package/dist/esm/components/DSFSelect/DSFSelect.d.ts +1 -8
- package/dist/esm/components/DSFSkipLink/DSFSkipLink.d.ts +0 -4
- package/dist/esm/components/DSFSummaryList/DSFSummaryList.d.ts +12 -0
- package/dist/esm/components/DSFSummaryList/index.d.ts +1 -0
- package/dist/esm/components/DSFTable/DSFTable.d.ts +0 -5
- package/dist/esm/components/DSFTextArea/DSFTextArea.d.ts +11 -0
- package/dist/esm/components/DSFTextArea/index.d.ts +1 -0
- package/dist/esm/components/DSFUserSignOut/DSFUserSignOut.d.ts +1 -6
- package/dist/esm/components/DSFWarningText/DSFWarningText.d.ts +7 -0
- package/dist/esm/components/DSFWarningText/index.d.ts +1 -0
- package/dist/esm/components/index.d.ts +7 -3
- package/dist/esm/index.js +1 -1
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/lib/WebComponentProvider.d.ts +5 -0
- package/dist/esm/lib/customComponents.d.ts +9 -0
- package/dist/index.d.ts +127 -171
- 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
|
-
|
|
9
|
-
|
|
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,
|
|
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
|
-
|
|
4
|
-
children:
|
|
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
|
|
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, {
|
|
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?: (
|
|
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
|
|
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;
|
|
@@ -9,7 +9,7 @@ export interface DSFPageProps {
|
|
|
9
9
|
/**
|
|
10
10
|
* Page contents
|
|
11
11
|
*/
|
|
12
|
-
children
|
|
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
|
|
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
|
|
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;
|
|
@@ -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 @@
|
|
|
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';
|