@netu-si/netu-react-dsf-components 1.0.7 → 1.0.9

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.
@@ -0,0 +1,53 @@
1
+ import React from 'react';
2
+ import '../../resources/css/dsf.main.min.css';
3
+ import { UseFormRegisterReturn } from 'react-hook-form';
4
+ export interface DSFDatePickerInputProps {
5
+ /**
6
+ * Called when the date changes
7
+ */
8
+ onChange?: (e: React.ChangeEvent<HTMLInputElement>) => void;
9
+ /**
10
+ * Called when the input field is blurred
11
+ */
12
+ onBlur?: (e: React.FocusEvent<HTMLInputElement>) => void;
13
+ /**
14
+ * Called when the input field is focused
15
+ */
16
+ onFocus?: (e: React.FocusEvent<HTMLInputElement>) => void;
17
+ /**
18
+ * When the form field is controlled, this sets the value of date
19
+ */
20
+ value?: string;
21
+ }
22
+ export interface DSFDatePickerProps {
23
+ /**
24
+ * ID of the component
25
+ */
26
+ id: string;
27
+ /**
28
+ * Input label
29
+ */
30
+ label: string;
31
+ /**
32
+ * Hint text to assist the user with input
33
+ */
34
+ hint?: string;
35
+ /**
36
+ * Error text to be displayed when validation fails
37
+ */
38
+ errorText?: string;
39
+ register: UseFormRegisterReturn;
40
+ visualSize?: number;
41
+ inputProps?: DSFDatePickerInputProps;
42
+ }
43
+ /**
44
+ * DSFDatePicker Component
45
+ *
46
+ * A reusable date picker component that provides a label, hint, and error handling.
47
+ * It is designed to integrate with forms and maintain consistency with other components in the design system.
48
+ */
49
+ declare const DSFDatePicker: {
50
+ ({ id, label, hint, errorText, register, visualSize, inputProps }: DSFDatePickerProps): React.JSX.Element;
51
+ displayName: string;
52
+ };
53
+ export default DSFDatePicker;
@@ -0,0 +1 @@
1
+ export { default, DSFDatePickerProps } from './DSFDatePicker';
@@ -1,8 +1,11 @@
1
- import React, { FC } from 'react';
1
+ import React from 'react';
2
2
  import '../../resources/css/dsf.main.min.css';
3
3
  export interface DSFFieldSetProps {
4
4
  legend: React.ReactNode;
5
5
  children?: React.ReactNode;
6
6
  }
7
- declare const DSFFieldSet: FC<DSFFieldSetProps>;
7
+ declare const DSFFieldSet: {
8
+ ({ legend, children }: DSFFieldSetProps): React.JSX.Element;
9
+ displayName: string;
10
+ };
8
11
  export default DSFFieldSet;
@@ -30,3 +30,4 @@ export { default as DSFCookies } from './DSFCookies';
30
30
  export { default as DSFCookiesV3 } from './DSFCookiesV3';
31
31
  export { default as DSFSummaryList, DSFSummaryListItem, DSFSummaryListProps } from './DSFSummaryList';
32
32
  export { default as DSFWarningText } from './DSFWarningText';
33
+ export { default as DSFDatePicker, DSFDatePickerProps } from './DSFDatePicker';