@dinofront/design_system 1.16.0 → 1.17.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.
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
import { ReactNode } from 'react';
|
|
2
2
|
import { BaseProps } from '../../types';
|
|
3
3
|
export type DatePickerSize = 'lg' | 'md' | 'sm';
|
|
4
|
+
/** Mirrors SelectV2's `menuPlacement` surface (react-select's own union). */
|
|
5
|
+
export type DatePickerMenuPlacement = 'auto' | 'bottom' | 'top';
|
|
4
6
|
export interface DateRange {
|
|
5
7
|
start: Date | null;
|
|
6
8
|
end: Date | null;
|
|
@@ -40,6 +42,11 @@ export interface DatePickerProps extends BaseProps {
|
|
|
40
42
|
excludeDates?: Date[];
|
|
41
43
|
/** Arbitrary per-day predicate, evaluated alongside `minDate`/`maxDate`/`excludeDates`. Days it rejects render disabled. */
|
|
42
44
|
filterDate?: (date: Date) => boolean;
|
|
45
|
+
/** Which side the calendar popover opens on. `'auto'` (default) measures the
|
|
46
|
+
* popover against the space below the trigger on open and flips upward only
|
|
47
|
+
* when it doesn't fit and there's more room above; `'top'`/`'bottom'` force
|
|
48
|
+
* the side regardless of available space. Same surface as SelectV2. */
|
|
49
|
+
menuPlacement?: DatePickerMenuPlacement;
|
|
43
50
|
/** Switch the trigger to the danger border/ring styles. */
|
|
44
51
|
error?: boolean;
|
|
45
52
|
/** Message rendered below the control; also switches the trigger to the danger styles. */
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
export { DatePicker } from './DatePicker';
|
|
2
|
-
export type { DatePickerProps, DatePickerSize, DateRange } from './DatePicker.types';
|
|
2
|
+
export type { DatePickerProps, DatePickerSize, DatePickerMenuPlacement, DateRange, } from './DatePicker.types';
|