@netu-si/netu-react-dsf-components 0.0.1
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/LICENSE +21 -0
- package/README.md +29 -0
- package/dist/cjs/assets/index-b6796621.css +16 -0
- package/dist/cjs/components/DSFBackLink/DSFBackLink.d.ts +8 -0
- package/dist/cjs/components/DSFBackLink/index.d.ts +1 -0
- package/dist/cjs/components/DSFBeforeMainContainer/DSFBeforeMainContainer.d.ts +13 -0
- package/dist/cjs/components/DSFBeforeMainContainer/index.d.ts +1 -0
- package/dist/cjs/components/DSFBodyEndContainer/DSFBodyEndContainer.d.ts +13 -0
- package/dist/cjs/components/DSFBodyEndContainer/index.d.ts +1 -0
- package/dist/cjs/components/DSFBodyStartContainer/DSFBodyStartContainer.d.ts +13 -0
- package/dist/cjs/components/DSFBodyStartContainer/index.d.ts +1 -0
- package/dist/cjs/components/DSFButton/DSFButton.d.ts +14 -0
- package/dist/cjs/components/DSFButton/DSFInputField.d.ts +15 -0
- package/dist/cjs/components/DSFButton/index.d.ts +1 -0
- package/dist/cjs/components/DSFCheckbox/DSFCheckbox.d.ts +22 -0
- package/dist/cjs/components/DSFCheckbox/index.d.ts +1 -0
- package/dist/cjs/components/DSFDateInput/DSFDateInput.d.ts +83 -0
- package/dist/cjs/components/DSFDateInput/Input.d.ts +49 -0
- package/dist/cjs/components/DSFDateInput/index.d.ts +1 -0
- package/dist/cjs/components/DSFDateInput2/DSFDateInput2.d.ts +56 -0
- package/dist/cjs/components/DSFDateInput2/index.d.ts +1 -0
- package/dist/cjs/components/DSFErrorSummary/DSFErrorSummary.d.ts +15 -0
- package/dist/cjs/components/DSFErrorSummary/index.d.ts +1 -0
- package/dist/cjs/components/DSFErrorText/DSFErrorText.d.ts +9 -0
- package/dist/cjs/components/DSFErrorText/index.d.ts +1 -0
- package/dist/cjs/components/DSFFieldSet/DSFFieldSet.d.ts +8 -0
- package/dist/cjs/components/DSFFieldSet/index.d.ts +1 -0
- package/dist/cjs/components/DSFFileUpload/DSFFileUpload.d.ts +15 -0
- package/dist/cjs/components/DSFFileUpload/index.d.ts +1 -0
- package/dist/cjs/components/DSFFooter/DSFFooter.d.ts +17 -0
- package/dist/cjs/components/DSFFooter/index.d.ts +1 -0
- package/dist/cjs/components/DSFFormGroup/DSFFormGroup.d.ts +17 -0
- package/dist/cjs/components/DSFFormGroup/index.d.ts +1 -0
- package/dist/cjs/components/DSFHeader/DSFHeader.d.ts +21 -0
- package/dist/cjs/components/DSFHeader/index.d.ts +1 -0
- package/dist/cjs/components/DSFHintText/DSFHintText.d.ts +9 -0
- package/dist/cjs/components/DSFHintText/index.d.ts +1 -0
- package/dist/cjs/components/DSFInput/DSFInput.d.ts +11 -0
- package/dist/cjs/components/DSFInput/index.d.ts +1 -0
- package/dist/cjs/components/DSFInputField/DSFInputField.d.ts +21 -0
- package/dist/cjs/components/DSFInputField/index.d.ts +1 -0
- package/dist/cjs/components/DSFLabel/DSFLabel.d.ts +8 -0
- package/dist/cjs/components/DSFLabel/index.d.ts +1 -0
- package/dist/cjs/components/DSFLoadingBox/DSFLoadingBox.d.ts +9 -0
- package/dist/cjs/components/DSFLoadingBox/index.d.ts +1 -0
- package/dist/cjs/components/DSFMain/DSFMain.d.ts +13 -0
- package/dist/cjs/components/DSFMain/index.d.ts +1 -0
- package/dist/cjs/components/DSFPanel/DSFPanel.d.ts +10 -0
- package/dist/cjs/components/DSFPanel/index.d.ts +1 -0
- package/dist/cjs/components/DSFRadio/DSFRadio.d.ts +16 -0
- package/dist/cjs/components/DSFRadio/index.d.ts +1 -0
- package/dist/cjs/components/DSFSelect/DSFSelect.d.ts +15 -0
- package/dist/cjs/components/DSFSelect/index.d.ts +1 -0
- package/dist/cjs/components/DSFSkipLink/DSFSkipLink.d.ts +15 -0
- package/dist/cjs/components/DSFSkipLink/index.d.ts +1 -0
- package/dist/cjs/components/DSFTable/DSFTable.d.ts +12 -0
- package/dist/cjs/components/DSFTable/index.d.ts +1 -0
- package/dist/cjs/components/DSFTextInput/DSFTextInput.d.ts +13 -0
- package/dist/cjs/components/DSFTextInput/index.d.ts +1 -0
- package/dist/cjs/components/DSFUserSignOut/DSFUserSignOut.d.ts +9 -0
- package/dist/cjs/components/DSFUserSignOut/index.d.ts +1 -0
- package/dist/cjs/components/index.d.ts +25 -0
- package/dist/cjs/index.d.ts +1 -0
- package/dist/cjs/index.js +2 -0
- package/dist/cjs/index.js.map +1 -0
- package/dist/cjs/lib/utils.d.ts +1 -0
- package/dist/cjs/stories/Button.d.ts +29 -0
- package/dist/cjs/stories/Header.d.ts +13 -0
- package/dist/cjs/stories/Page.d.ts +3 -0
- package/dist/cjs/stories/Page.stories.d.ts +13 -0
- package/dist/esm/assets/index-b6796621.css +16 -0
- package/dist/esm/components/DSFBackLink/DSFBackLink.d.ts +8 -0
- package/dist/esm/components/DSFBackLink/index.d.ts +1 -0
- package/dist/esm/components/DSFBeforeMainContainer/DSFBeforeMainContainer.d.ts +13 -0
- package/dist/esm/components/DSFBeforeMainContainer/index.d.ts +1 -0
- package/dist/esm/components/DSFBodyEndContainer/DSFBodyEndContainer.d.ts +13 -0
- package/dist/esm/components/DSFBodyEndContainer/index.d.ts +1 -0
- package/dist/esm/components/DSFBodyStartContainer/DSFBodyStartContainer.d.ts +13 -0
- package/dist/esm/components/DSFBodyStartContainer/index.d.ts +1 -0
- package/dist/esm/components/DSFButton/DSFButton.d.ts +14 -0
- package/dist/esm/components/DSFButton/DSFInputField.d.ts +15 -0
- package/dist/esm/components/DSFButton/index.d.ts +1 -0
- package/dist/esm/components/DSFCheckbox/DSFCheckbox.d.ts +22 -0
- package/dist/esm/components/DSFCheckbox/index.d.ts +1 -0
- package/dist/esm/components/DSFDateInput/DSFDateInput.d.ts +83 -0
- package/dist/esm/components/DSFDateInput/Input.d.ts +49 -0
- package/dist/esm/components/DSFDateInput/index.d.ts +1 -0
- package/dist/esm/components/DSFDateInput2/DSFDateInput2.d.ts +56 -0
- package/dist/esm/components/DSFDateInput2/index.d.ts +1 -0
- package/dist/esm/components/DSFErrorSummary/DSFErrorSummary.d.ts +15 -0
- package/dist/esm/components/DSFErrorSummary/index.d.ts +1 -0
- package/dist/esm/components/DSFErrorText/DSFErrorText.d.ts +9 -0
- package/dist/esm/components/DSFErrorText/index.d.ts +1 -0
- package/dist/esm/components/DSFFieldSet/DSFFieldSet.d.ts +8 -0
- package/dist/esm/components/DSFFieldSet/index.d.ts +1 -0
- package/dist/esm/components/DSFFileUpload/DSFFileUpload.d.ts +15 -0
- package/dist/esm/components/DSFFileUpload/index.d.ts +1 -0
- package/dist/esm/components/DSFFooter/DSFFooter.d.ts +17 -0
- package/dist/esm/components/DSFFooter/index.d.ts +1 -0
- package/dist/esm/components/DSFFormGroup/DSFFormGroup.d.ts +17 -0
- package/dist/esm/components/DSFFormGroup/index.d.ts +1 -0
- package/dist/esm/components/DSFHeader/DSFHeader.d.ts +21 -0
- package/dist/esm/components/DSFHeader/index.d.ts +1 -0
- package/dist/esm/components/DSFHintText/DSFHintText.d.ts +9 -0
- package/dist/esm/components/DSFHintText/index.d.ts +1 -0
- package/dist/esm/components/DSFInput/DSFInput.d.ts +11 -0
- package/dist/esm/components/DSFInput/index.d.ts +1 -0
- package/dist/esm/components/DSFInputField/DSFInputField.d.ts +21 -0
- package/dist/esm/components/DSFInputField/index.d.ts +1 -0
- package/dist/esm/components/DSFLabel/DSFLabel.d.ts +8 -0
- package/dist/esm/components/DSFLabel/index.d.ts +1 -0
- package/dist/esm/components/DSFLoadingBox/DSFLoadingBox.d.ts +9 -0
- package/dist/esm/components/DSFLoadingBox/index.d.ts +1 -0
- package/dist/esm/components/DSFMain/DSFMain.d.ts +13 -0
- package/dist/esm/components/DSFMain/index.d.ts +1 -0
- package/dist/esm/components/DSFPanel/DSFPanel.d.ts +10 -0
- package/dist/esm/components/DSFPanel/index.d.ts +1 -0
- package/dist/esm/components/DSFRadio/DSFRadio.d.ts +16 -0
- package/dist/esm/components/DSFRadio/index.d.ts +1 -0
- package/dist/esm/components/DSFSelect/DSFSelect.d.ts +15 -0
- package/dist/esm/components/DSFSelect/index.d.ts +1 -0
- package/dist/esm/components/DSFSkipLink/DSFSkipLink.d.ts +15 -0
- package/dist/esm/components/DSFSkipLink/index.d.ts +1 -0
- package/dist/esm/components/DSFTable/DSFTable.d.ts +12 -0
- package/dist/esm/components/DSFTable/index.d.ts +1 -0
- package/dist/esm/components/DSFTextInput/DSFTextInput.d.ts +13 -0
- package/dist/esm/components/DSFTextInput/index.d.ts +1 -0
- package/dist/esm/components/DSFUserSignOut/DSFUserSignOut.d.ts +9 -0
- package/dist/esm/components/DSFUserSignOut/index.d.ts +1 -0
- package/dist/esm/components/index.d.ts +25 -0
- package/dist/esm/index.d.ts +1 -0
- package/dist/esm/index.js +2 -0
- package/dist/esm/index.js.map +1 -0
- package/dist/esm/lib/utils.d.ts +1 -0
- package/dist/esm/stories/Button.d.ts +29 -0
- package/dist/esm/stories/Header.d.ts +13 -0
- package/dist/esm/stories/Page.d.ts +3 -0
- package/dist/esm/stories/Page.stories.d.ts +13 -0
- package/dist/index.d.ts +344 -0
- package/dist/types.d.ts +16 -0
- package/package.json +92 -0
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { FC } from 'react';
|
|
2
|
+
import '../../resources/css/dsf.main.min.css';
|
|
3
|
+
import { LinkProps } from 'react-router-dom';
|
|
4
|
+
export interface DSFBackLinkProps extends LinkProps {
|
|
5
|
+
onBackClick?: () => void;
|
|
6
|
+
}
|
|
7
|
+
declare const DSFBackLink: FC<DSFBackLinkProps>;
|
|
8
|
+
export default DSFBackLink;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default } from "./DSFBackLink";
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import '../../resources/css/dsf.main.min.css';
|
|
3
|
+
export interface DSFBeforeMainContainerProps {
|
|
4
|
+
children: React.ReactNode;
|
|
5
|
+
}
|
|
6
|
+
declare const DSFBeforeMainContainer: {
|
|
7
|
+
({ children }: DSFBeforeMainContainerProps): React.JSX.Element;
|
|
8
|
+
defaultProps: {
|
|
9
|
+
children: undefined;
|
|
10
|
+
};
|
|
11
|
+
displayName: string;
|
|
12
|
+
};
|
|
13
|
+
export default DSFBeforeMainContainer;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default } from './DSFBeforeMainContainer';
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import '../../resources/css/dsf.main.min.css';
|
|
3
|
+
export interface DSFBodyEndContainerProps {
|
|
4
|
+
children?: React.ReactNode;
|
|
5
|
+
}
|
|
6
|
+
declare const DSFBodyEndContainer: {
|
|
7
|
+
({ children }: DSFBodyEndContainerProps): React.JSX.Element;
|
|
8
|
+
defaultProps: {
|
|
9
|
+
children: undefined;
|
|
10
|
+
};
|
|
11
|
+
displayName: string;
|
|
12
|
+
};
|
|
13
|
+
export default DSFBodyEndContainer;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default } from './DSFBodyEndContainer';
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import '../../resources/css/dsf.main.min.css';
|
|
3
|
+
export interface DSFBodyStartContainerProps {
|
|
4
|
+
children: React.ReactNode;
|
|
5
|
+
}
|
|
6
|
+
declare const DSFBodyStartContainer: {
|
|
7
|
+
({ children }: DSFBodyStartContainerProps): React.JSX.Element;
|
|
8
|
+
defaultProps: {
|
|
9
|
+
children: undefined;
|
|
10
|
+
};
|
|
11
|
+
displayName: string;
|
|
12
|
+
};
|
|
13
|
+
export default DSFBodyStartContainer;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default } from './DSFBodyStartContainer';
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import React, { FC } from 'react';
|
|
2
|
+
import '../../resources/css/dsf.main.min.css';
|
|
3
|
+
export interface DSFButtonProps extends React.DetailedHTMLProps<React.ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement> {
|
|
4
|
+
/**
|
|
5
|
+
* Id of the button
|
|
6
|
+
*/
|
|
7
|
+
id: string;
|
|
8
|
+
/**
|
|
9
|
+
* React Node to be displayed on the button, can be a string or any other react node
|
|
10
|
+
*/
|
|
11
|
+
children: React.ReactNode;
|
|
12
|
+
}
|
|
13
|
+
declare const DSFButton: FC<DSFButtonProps>;
|
|
14
|
+
export default DSFButton;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { FC } from "react";
|
|
2
|
+
import "../../resources/css/dsf.main.min.css";
|
|
3
|
+
import { DSFInputProps } from "../DSFInput/DSFInput";
|
|
4
|
+
export interface DSFInputFieldProps {
|
|
5
|
+
label: string;
|
|
6
|
+
hint?: string;
|
|
7
|
+
id: string;
|
|
8
|
+
inputProps?: DSFInputProps;
|
|
9
|
+
meta: {
|
|
10
|
+
error?: string | string[];
|
|
11
|
+
touched?: boolean;
|
|
12
|
+
};
|
|
13
|
+
}
|
|
14
|
+
declare const DSFInputField: FC<DSFInputFieldProps>;
|
|
15
|
+
export default DSFInputField;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default } from "./DSFButton";
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import '../../resources/css/dsf.main.min.css';
|
|
3
|
+
export interface DSFCheckboxProps extends React.InputHTMLAttributes<HTMLInputElement> {
|
|
4
|
+
/**
|
|
5
|
+
* React Node to be displayed on the button, can be a string or any other react node
|
|
6
|
+
*/
|
|
7
|
+
id?: string;
|
|
8
|
+
/**
|
|
9
|
+
* Hint text
|
|
10
|
+
*/
|
|
11
|
+
hint?: React.ReactNode;
|
|
12
|
+
/**
|
|
13
|
+
* React Node to be displayed as label, can be a combination of compnents
|
|
14
|
+
*/
|
|
15
|
+
children: React.ReactNode;
|
|
16
|
+
/**
|
|
17
|
+
* Custom style class to be added in the checkbox
|
|
18
|
+
*/
|
|
19
|
+
className?: string;
|
|
20
|
+
}
|
|
21
|
+
declare const DSFCheckbox: React.ForwardRefExoticComponent<DSFCheckboxProps & React.RefAttributes<HTMLInputElement>>;
|
|
22
|
+
export default DSFCheckbox;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default } from "./DSFCheckbox";
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
import '../../resources/css/dsf.main.min.css';
|
|
2
|
+
import React, { RefObject } from 'react';
|
|
3
|
+
import { DSFInputProps } from '../DSFInput/DSFInput';
|
|
4
|
+
interface InputRefObject {
|
|
5
|
+
day: RefObject<HTMLInputElement>;
|
|
6
|
+
month: RefObject<HTMLInputElement>;
|
|
7
|
+
year: RefObject<HTMLInputElement>;
|
|
8
|
+
}
|
|
9
|
+
export interface DSFDateInputProps {
|
|
10
|
+
/**
|
|
11
|
+
* ID of the component
|
|
12
|
+
*/
|
|
13
|
+
id: string;
|
|
14
|
+
/**
|
|
15
|
+
* Input label
|
|
16
|
+
*/
|
|
17
|
+
label: string;
|
|
18
|
+
/**
|
|
19
|
+
* Hint text
|
|
20
|
+
*/
|
|
21
|
+
hint?: string;
|
|
22
|
+
/**
|
|
23
|
+
* Error text to be shown
|
|
24
|
+
*/
|
|
25
|
+
errorText?: string;
|
|
26
|
+
/**
|
|
27
|
+
* Refs to the individual input elements for day, month, year
|
|
28
|
+
*/
|
|
29
|
+
refs?: InputRefObject;
|
|
30
|
+
/**
|
|
31
|
+
* Overrides the labels for each input
|
|
32
|
+
*/
|
|
33
|
+
labels?: {
|
|
34
|
+
day: string;
|
|
35
|
+
month: string;
|
|
36
|
+
year: string;
|
|
37
|
+
};
|
|
38
|
+
/**
|
|
39
|
+
* Native input attributes to be added to each date input
|
|
40
|
+
*/
|
|
41
|
+
inputs?: {
|
|
42
|
+
day?: DSFInputProps;
|
|
43
|
+
month?: DSFInputProps;
|
|
44
|
+
year?: DSFInputProps;
|
|
45
|
+
};
|
|
46
|
+
/**
|
|
47
|
+
* Initialize each input with specific values
|
|
48
|
+
*/
|
|
49
|
+
defaultValues?: {
|
|
50
|
+
day?: string;
|
|
51
|
+
month?: string;
|
|
52
|
+
year?: string;
|
|
53
|
+
};
|
|
54
|
+
/**
|
|
55
|
+
* General input props including event handlers and value for all inputs
|
|
56
|
+
*/
|
|
57
|
+
inputProps?: {
|
|
58
|
+
/**
|
|
59
|
+
* Called when the day, month or year changes
|
|
60
|
+
*/
|
|
61
|
+
onChange?: (e: React.ChangeEvent<HTMLInputElement>, key: string) => void;
|
|
62
|
+
/**
|
|
63
|
+
* Called when the day, month or year fields are blurred
|
|
64
|
+
* (does not get called when moving between inputs in the same datefield)
|
|
65
|
+
*/
|
|
66
|
+
onBlur?: (e: React.FocusEvent<HTMLInputElement>, key: string) => void;
|
|
67
|
+
/**
|
|
68
|
+
* Called when the day, month or year fields are focussed
|
|
69
|
+
* (does not get called when moving between inputs in the same datefield)
|
|
70
|
+
*/
|
|
71
|
+
onFocus?: (e: React.FocusEvent<HTMLInputElement>, key: string) => void;
|
|
72
|
+
/**
|
|
73
|
+
* When the form field is controlled, this sets the value of the day, month and year inputs
|
|
74
|
+
*/
|
|
75
|
+
value?: {
|
|
76
|
+
day?: string;
|
|
77
|
+
month?: string;
|
|
78
|
+
year?: string;
|
|
79
|
+
};
|
|
80
|
+
};
|
|
81
|
+
}
|
|
82
|
+
declare const DSFDateInput: React.FC<DSFDateInputProps>;
|
|
83
|
+
export default DSFDateInput;
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import DSFInput, { DSFInputProps as BaseInputProps } from '../DSFInput/DSFInput';
|
|
3
|
+
type InputsType = {
|
|
4
|
+
[key: string]: BaseInputProps | undefined;
|
|
5
|
+
day?: BaseInputProps;
|
|
6
|
+
month?: BaseInputProps;
|
|
7
|
+
year?: BaseInputProps;
|
|
8
|
+
};
|
|
9
|
+
export interface DateInputProps {
|
|
10
|
+
id: string;
|
|
11
|
+
names?: {
|
|
12
|
+
day?: string;
|
|
13
|
+
month?: string;
|
|
14
|
+
year?: string;
|
|
15
|
+
};
|
|
16
|
+
defaultValues?: {
|
|
17
|
+
day?: string;
|
|
18
|
+
month?: string;
|
|
19
|
+
year?: string;
|
|
20
|
+
};
|
|
21
|
+
/**
|
|
22
|
+
* Custom props to pass down to the input fields
|
|
23
|
+
*/
|
|
24
|
+
inputs?: InputsType;
|
|
25
|
+
value?: {
|
|
26
|
+
day?: string;
|
|
27
|
+
month?: string;
|
|
28
|
+
year?: string;
|
|
29
|
+
};
|
|
30
|
+
labels?: {
|
|
31
|
+
day?: string;
|
|
32
|
+
month?: string;
|
|
33
|
+
year?: string;
|
|
34
|
+
};
|
|
35
|
+
/**
|
|
36
|
+
* This comes from the multiInputInput HOC and is needed to track all 3 inputs
|
|
37
|
+
*/
|
|
38
|
+
refs?: (refs: {
|
|
39
|
+
day?: React.Ref<typeof DSFInput>;
|
|
40
|
+
month?: React.Ref<typeof DSFInput>;
|
|
41
|
+
year?: React.Ref<typeof DSFInput>;
|
|
42
|
+
}) => void;
|
|
43
|
+
onChange?: (e: React.ChangeEvent<HTMLInputElement>, key: string) => void;
|
|
44
|
+
onBlur?: (e: React.FocusEvent<HTMLInputElement>, key: string) => void;
|
|
45
|
+
onFocus?: (e: React.FocusEvent<HTMLInputElement>, key: string) => void;
|
|
46
|
+
error?: boolean;
|
|
47
|
+
}
|
|
48
|
+
declare const _default: any;
|
|
49
|
+
export default _default;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default, DSFDateInputProps } from './DSFDateInput';
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
import '../../resources/css/dsf.main.min.css';
|
|
2
|
+
import React, { RefObject } from 'react';
|
|
3
|
+
import { DSFInputProps } from '../DSFInput/DSFInput';
|
|
4
|
+
interface InputRefObject {
|
|
5
|
+
day: RefObject<HTMLInputElement>;
|
|
6
|
+
month: RefObject<HTMLInputElement>;
|
|
7
|
+
year: RefObject<HTMLInputElement>;
|
|
8
|
+
}
|
|
9
|
+
export interface DSFDateInput2Props {
|
|
10
|
+
id: string;
|
|
11
|
+
label: string;
|
|
12
|
+
hint?: string;
|
|
13
|
+
errorText?: string;
|
|
14
|
+
refs?: InputRefObject;
|
|
15
|
+
labels?: {
|
|
16
|
+
day: string;
|
|
17
|
+
month: string;
|
|
18
|
+
year: string;
|
|
19
|
+
};
|
|
20
|
+
inputs?: {
|
|
21
|
+
day?: DSFInputProps;
|
|
22
|
+
month?: DSFInputProps;
|
|
23
|
+
year?: DSFInputProps;
|
|
24
|
+
};
|
|
25
|
+
defaultValues?: {
|
|
26
|
+
day?: string;
|
|
27
|
+
month?: string;
|
|
28
|
+
year?: string;
|
|
29
|
+
};
|
|
30
|
+
inputProps?: {
|
|
31
|
+
/**
|
|
32
|
+
* Called when the day, month or year changes
|
|
33
|
+
*/
|
|
34
|
+
onChange?: (e: React.ChangeEvent<HTMLInputElement>, key: string) => void;
|
|
35
|
+
/**
|
|
36
|
+
* Called when the day, month or year fields are blurred
|
|
37
|
+
* (does not get called when moving between inputs in the same datefield)
|
|
38
|
+
*/
|
|
39
|
+
onBlur?: (e: React.FocusEvent<HTMLInputElement>, key: string) => void;
|
|
40
|
+
/**
|
|
41
|
+
* Called when the day, month or year fields are focussed
|
|
42
|
+
* (does not get called when moving between inputs in the same datefield)
|
|
43
|
+
*/
|
|
44
|
+
onFocus?: (e: React.FocusEvent<HTMLInputElement>, key: string) => void;
|
|
45
|
+
/**
|
|
46
|
+
* When the form field is controlled, this sets the value of the day, month and year inputs
|
|
47
|
+
*/
|
|
48
|
+
value?: {
|
|
49
|
+
day?: string;
|
|
50
|
+
month?: string;
|
|
51
|
+
year?: string;
|
|
52
|
+
};
|
|
53
|
+
};
|
|
54
|
+
}
|
|
55
|
+
declare const DSFDateInput2: React.FC<DSFDateInput2Props>;
|
|
56
|
+
export default DSFDateInput2;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default } from './DSFDateInput2';
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { FC } from 'react';
|
|
2
|
+
import '../../resources/css/dsf.main.min.css';
|
|
3
|
+
export interface DSFErrorSummaryProps {
|
|
4
|
+
/** onClick function to scroll the target element into view */
|
|
5
|
+
onHandleErrorClick?: (targetName: string) => void;
|
|
6
|
+
/** Heading text */
|
|
7
|
+
heading?: string;
|
|
8
|
+
/** Array of errors with text and target element name to scroll into view when clicked */
|
|
9
|
+
errors?: {
|
|
10
|
+
targetName?: string;
|
|
11
|
+
text?: string;
|
|
12
|
+
}[];
|
|
13
|
+
}
|
|
14
|
+
declare const DSFErrorSummary: FC<DSFErrorSummaryProps>;
|
|
15
|
+
export default DSFErrorSummary;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default } from "./DSFErrorSummary";
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import React, { FC } from 'react';
|
|
2
|
+
import '../../resources/css/dsf.main.min.css';
|
|
3
|
+
export interface DSFErrorTextProps {
|
|
4
|
+
id?: string;
|
|
5
|
+
className?: string;
|
|
6
|
+
children: React.ReactNode;
|
|
7
|
+
}
|
|
8
|
+
declare const DSFErrorText: FC<DSFErrorTextProps>;
|
|
9
|
+
export default DSFErrorText;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default } from './DSFErrorText';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default } from './DSFFieldSet';
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import '../../resources/css/dsf.main.min.css';
|
|
3
|
+
export interface DSFFileUploadProps extends React.InputHTMLAttributes<HTMLInputElement> {
|
|
4
|
+
id: string;
|
|
5
|
+
meta: {
|
|
6
|
+
error?: string | string[];
|
|
7
|
+
touched?: boolean;
|
|
8
|
+
};
|
|
9
|
+
label: string;
|
|
10
|
+
hint?: string;
|
|
11
|
+
onChange?: React.ChangeEventHandler<HTMLInputElement>;
|
|
12
|
+
acceptedFormats?: string;
|
|
13
|
+
}
|
|
14
|
+
declare const DSFFileUpload: React.ForwardRefExoticComponent<DSFFileUploadProps & React.RefAttributes<HTMLInputElement>>;
|
|
15
|
+
export default DSFFileUpload;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default } from './DSFFileUpload';
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import '../../resources/css/dsf.main.min.css';
|
|
3
|
+
export interface DSFFooterProps {
|
|
4
|
+
privacyStatementUrl?: string;
|
|
5
|
+
cookiePolicyUrl?: string;
|
|
6
|
+
accessibilityStatementUrl?: string;
|
|
7
|
+
}
|
|
8
|
+
declare const DSFFooter: {
|
|
9
|
+
({ privacyStatementUrl, cookiePolicyUrl, accessibilityStatementUrl }: DSFFooterProps): React.JSX.Element;
|
|
10
|
+
defaultProps: {
|
|
11
|
+
privacyStatementUrl: undefined;
|
|
12
|
+
cookiePolicyUrl: undefined;
|
|
13
|
+
accessibilityStatementUrl: undefined;
|
|
14
|
+
};
|
|
15
|
+
displayName: string;
|
|
16
|
+
};
|
|
17
|
+
export default DSFFooter;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default } from './DSFFooter';
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import '../../resources/css/dsf.main.min.css';
|
|
3
|
+
export interface DSFFormGroupProps {
|
|
4
|
+
label?: string;
|
|
5
|
+
name: string;
|
|
6
|
+
error?: string;
|
|
7
|
+
hint?: string;
|
|
8
|
+
children?: React.ReactNode;
|
|
9
|
+
}
|
|
10
|
+
export interface IFormGroupContext {
|
|
11
|
+
error?: string;
|
|
12
|
+
errorId: string;
|
|
13
|
+
childrenCount: number;
|
|
14
|
+
}
|
|
15
|
+
export declare const FormGroupContext: React.Context<IFormGroupContext>;
|
|
16
|
+
declare const DSFFormGroup: React.FC<DSFFormGroupProps>;
|
|
17
|
+
export default DSFFormGroup;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default } from './DSFFormGroup';
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import '../../resources/css/dsf.main.min.css';
|
|
3
|
+
export type NavMenuItem = {
|
|
4
|
+
label: string;
|
|
5
|
+
href: string;
|
|
6
|
+
};
|
|
7
|
+
export interface DSFHeaderProps {
|
|
8
|
+
headerTitle: string;
|
|
9
|
+
showLang?: boolean;
|
|
10
|
+
menu?: NavMenuItem[];
|
|
11
|
+
}
|
|
12
|
+
declare const DSFHeader: {
|
|
13
|
+
({ headerTitle, menu, showLang }: DSFHeaderProps): React.JSX.Element;
|
|
14
|
+
defaultProps: {
|
|
15
|
+
showLang: boolean;
|
|
16
|
+
menu: undefined;
|
|
17
|
+
headerTitle: string;
|
|
18
|
+
};
|
|
19
|
+
displayName: string;
|
|
20
|
+
};
|
|
21
|
+
export default DSFHeader;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default } from './DSFHeader';
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import React, { FC } from 'react';
|
|
2
|
+
import '../../resources/css/dsf.main.min.css';
|
|
3
|
+
export interface DSFHintTextProps {
|
|
4
|
+
id?: string;
|
|
5
|
+
children: React.ReactNode;
|
|
6
|
+
className?: string;
|
|
7
|
+
}
|
|
8
|
+
declare const DSFHintText: FC<DSFHintTextProps>;
|
|
9
|
+
export default DSFHintText;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default } from './DSFHintText';
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import '../../resources/css/dsf.main.min.css';
|
|
3
|
+
export interface DSFInputProps extends React.InputHTMLAttributes<HTMLInputElement> {
|
|
4
|
+
id?: string;
|
|
5
|
+
error?: boolean;
|
|
6
|
+
visualSize?: number;
|
|
7
|
+
errorId?: string;
|
|
8
|
+
register?: (rules?: any) => void;
|
|
9
|
+
}
|
|
10
|
+
declare const DSFInput: React.ForwardRefExoticComponent<DSFInputProps & React.RefAttributes<HTMLInputElement>>;
|
|
11
|
+
export default DSFInput;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default } from "./DSFInput";
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import React, { FC } from 'react';
|
|
2
|
+
import '../../resources/css/dsf.main.min.css';
|
|
3
|
+
import { DSFInputProps } from '../DSFInput/DSFInput';
|
|
4
|
+
import { UseFormRegisterReturn } from 'react-hook-form';
|
|
5
|
+
export interface DSFInputFieldProps {
|
|
6
|
+
label: string;
|
|
7
|
+
hint?: React.ReactNode;
|
|
8
|
+
underRadio?: boolean;
|
|
9
|
+
id: string;
|
|
10
|
+
inputProps?: DSFInputProps;
|
|
11
|
+
input?: DSFInputProps;
|
|
12
|
+
meta: {
|
|
13
|
+
error?: string | string[];
|
|
14
|
+
touched?: boolean;
|
|
15
|
+
};
|
|
16
|
+
visualSize?: number;
|
|
17
|
+
errorId?: string;
|
|
18
|
+
register?: UseFormRegisterReturn;
|
|
19
|
+
}
|
|
20
|
+
declare const DSFInputField: FC<DSFInputFieldProps>;
|
|
21
|
+
export default DSFInputField;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default } from './DSFInputField';
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import React, { FC } from 'react';
|
|
2
|
+
import '../../resources/css/dsf.main.min.css';
|
|
3
|
+
export interface DSFLabelProps extends React.DetailedHTMLProps<React.LabelHTMLAttributes<HTMLLabelElement>, HTMLLabelElement> {
|
|
4
|
+
label: string;
|
|
5
|
+
htmlFor?: string;
|
|
6
|
+
}
|
|
7
|
+
declare const DSFLabel: FC<DSFLabelProps>;
|
|
8
|
+
export default DSFLabel;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default } from './DSFLabel';
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import '../../resources/css/dsf.main.min.css';
|
|
3
|
+
export interface DSFLoadingBoxProps {
|
|
4
|
+
loading: boolean;
|
|
5
|
+
spinnerColor?: string;
|
|
6
|
+
children?: React.ReactNode;
|
|
7
|
+
}
|
|
8
|
+
declare const DSFLoadingBox: React.FC<DSFLoadingBoxProps>;
|
|
9
|
+
export default DSFLoadingBox;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default } from './DSFLoadingBox';
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import '../../resources/css/dsf.main.min.css';
|
|
3
|
+
export interface DSFMainProps {
|
|
4
|
+
children: React.ReactNode;
|
|
5
|
+
}
|
|
6
|
+
declare const DSFMain: {
|
|
7
|
+
({ children }: DSFMainProps): React.JSX.Element;
|
|
8
|
+
defaultProps: {
|
|
9
|
+
children: undefined;
|
|
10
|
+
};
|
|
11
|
+
displayName: string;
|
|
12
|
+
};
|
|
13
|
+
export default DSFMain;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default } from './DSFMain';
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import React, { FC } from "react";
|
|
2
|
+
import "../../resources/css/dsf.main.min.css";
|
|
3
|
+
export interface DSFPanelProps {
|
|
4
|
+
/** Panel title text */
|
|
5
|
+
title: string;
|
|
6
|
+
/** Panel body text */
|
|
7
|
+
children?: React.ReactNode;
|
|
8
|
+
}
|
|
9
|
+
declare const DSFPanel: FC<DSFPanelProps>;
|
|
10
|
+
export default DSFPanel;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default } from "./DSFPanel";
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import '../../resources/js/bootstrap.bundle.min.js';
|
|
3
|
+
import '../../resources/js/app.min.js';
|
|
4
|
+
import '../../resources/css/dsf.main.min.css';
|
|
5
|
+
export interface DSFRadioProps extends React.InputHTMLAttributes<HTMLInputElement> {
|
|
6
|
+
hint?: React.ReactNode;
|
|
7
|
+
children: React.ReactNode;
|
|
8
|
+
collapsed?: {
|
|
9
|
+
node?: React.ReactNode;
|
|
10
|
+
className: string;
|
|
11
|
+
};
|
|
12
|
+
className?: string;
|
|
13
|
+
inline?: boolean;
|
|
14
|
+
}
|
|
15
|
+
declare const DSFRadio: React.ForwardRefExoticComponent<DSFRadioProps & React.RefAttributes<HTMLInputElement>>;
|
|
16
|
+
export default DSFRadio;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default } from './DSFRadio';
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import React, { FC } from 'react';
|
|
2
|
+
import '../../resources/css/dsf.main.min.css';
|
|
3
|
+
export interface DSFSelectProps {
|
|
4
|
+
label: string;
|
|
5
|
+
hint?: React.ReactNode;
|
|
6
|
+
id: string;
|
|
7
|
+
inputProps?: React.SelectHTMLAttributes<HTMLSelectElement>;
|
|
8
|
+
meta: {
|
|
9
|
+
error?: string | string[];
|
|
10
|
+
touched?: boolean;
|
|
11
|
+
};
|
|
12
|
+
children: React.ReactNode;
|
|
13
|
+
}
|
|
14
|
+
declare const DSFSelect: FC<DSFSelectProps>;
|
|
15
|
+
export default DSFSelect;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default } from "./DSFSelect";
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import '../../resources/css/dsf.main.min.css';
|
|
3
|
+
export interface DSFSkipLinkProps {
|
|
4
|
+
href?: string;
|
|
5
|
+
children?: React.ReactNode;
|
|
6
|
+
}
|
|
7
|
+
declare const DSFSkipLink: {
|
|
8
|
+
({ href, children }: DSFSkipLinkProps): React.JSX.Element;
|
|
9
|
+
defaultProps: {
|
|
10
|
+
children: string;
|
|
11
|
+
href: string;
|
|
12
|
+
};
|
|
13
|
+
displayName: string;
|
|
14
|
+
};
|
|
15
|
+
export default DSFSkipLink;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default } from './DSFSkipLink';
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import '../../resources/css/dsf.main.min.css';
|
|
3
|
+
interface TableColumn {
|
|
4
|
+
header: string;
|
|
5
|
+
type?: 'text' | 'number';
|
|
6
|
+
}
|
|
7
|
+
export interface DSFTableProps {
|
|
8
|
+
columns: TableColumn[];
|
|
9
|
+
rowData: (string | number)[][];
|
|
10
|
+
}
|
|
11
|
+
declare const DSFTable: React.FC<DSFTableProps>;
|
|
12
|
+
export default DSFTable;
|