@grasp-labs/ds-react-components 0.22.1 → 0.23.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.
|
@@ -2,8 +2,12 @@ import { ComponentProps } from 'react';
|
|
|
2
2
|
import { DayPicker, Locale } from 'react-day-picker';
|
|
3
3
|
type DayPickerClassNamesConfig = Pick<ComponentProps<typeof DayPicker>, "classNames" | "modifiersClassNames">;
|
|
4
4
|
export type DatePickerProps = {
|
|
5
|
-
/**
|
|
6
|
-
|
|
5
|
+
/** Optional id (auto-generated if not provided) */
|
|
6
|
+
id?: string;
|
|
7
|
+
/** Name of the input */
|
|
8
|
+
name?: string;
|
|
9
|
+
/** Whether the textbox is disabled */
|
|
10
|
+
disabled?: boolean;
|
|
7
11
|
/** Date displayed in trigger button, when date is selected */
|
|
8
12
|
selectedDate: Date | null;
|
|
9
13
|
/** Locale used to display texts of date-picker in correct language and present date with correct format */
|
|
@@ -18,6 +22,8 @@ export type DatePickerProps = {
|
|
|
18
22
|
className?: string;
|
|
19
23
|
/** Config for class names used to override default styles of calendar */
|
|
20
24
|
dayPickerClassNames?: DayPickerClassNamesConfig;
|
|
25
|
+
/** Determines if input is invalid */
|
|
26
|
+
"aria-invalid"?: boolean;
|
|
21
27
|
/** Callback function called when the date is changed */
|
|
22
28
|
onSelectedDateChange: (selectedDate: Date | null) => void;
|
|
23
29
|
};
|
|
@@ -27,5 +33,5 @@ export type DatePickerProps = {
|
|
|
27
33
|
* @param props - The props for the DatePicker component
|
|
28
34
|
* @returns The rendered date-picker
|
|
29
35
|
*/
|
|
30
|
-
export declare const DatePicker: ({
|
|
36
|
+
export declare const DatePicker: ({ id, name, disabled, selectedDate, locale, minDate, maxDate, defaultMonth, className, dayPickerClassNames, onSelectedDateChange, ...props }: DatePickerProps) => import("react/jsx-runtime").JSX.Element;
|
|
31
37
|
export {};
|