@capillarytech/blaze-ui 5.2.1 → 5.3.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/.DS_Store +0 -0
- package/CapCondition/index.js +0 -1
- package/CapCondition/index.js.map +1 -1
- package/CapDatePicker/index.d.ts.map +1 -1
- package/CapDatePicker/index.js +0 -1
- package/CapDatePicker/index.js.map +1 -1
- package/CapDateRangePicker/README.md +159 -0
- package/CapDateRangePicker/index.d.ts +11 -0
- package/CapDateRangePicker/index.d.ts.map +1 -0
- package/CapDateRangePicker/index.js +768 -7300
- package/CapDateRangePicker/index.js.map +1 -1
- package/CapDateRangePicker/types.d.ts +142 -0
- package/CapDateRangePicker/types.d.ts.map +1 -0
- package/CapEmptyDivWithBorder/index.js +9 -647
- package/CapEmptyDivWithBorder/index.js.map +1 -1
- package/CapMobileDateRangePicker/index.js +847 -7131
- package/CapMobileDateRangePicker/index.js.map +1 -1
- package/index.d.ts +2 -2
- package/index.d.ts.map +1 -1
- package/index.js +281 -133
- package/index.js.map +1 -1
- package/package.json +1 -1
- package/styles/_variables.scss +8 -0
- package/CapEmptyDivWithBorder/index.d.ts +0 -12
- package/CapEmptyDivWithBorder/index.d.ts.map +0 -1
- package/CapEmptyDivWithBorder/types.d.ts +0 -26
- package/CapEmptyDivWithBorder/types.d.ts.map +0 -1
|
@@ -0,0 +1,142 @@
|
|
|
1
|
+
import type { RangePickerProps } from 'antd-v5/es/date-picker';
|
|
2
|
+
import type { Dayjs } from 'dayjs';
|
|
3
|
+
import React from 'react';
|
|
4
|
+
export type CapDateRangePickerSize = 'small' | 'default' | 'large';
|
|
5
|
+
export type RangeValue = [Dayjs | null, Dayjs | null] | null;
|
|
6
|
+
export interface CapDateRangePickerProps extends Omit<RangePickerProps, 'value' | 'defaultValue' | 'onChange' | 'popupClassName' | 'popupStyle' | 'getPopupContainer' | 'size' | 'separator'> {
|
|
7
|
+
/**
|
|
8
|
+
* Size of the date range picker
|
|
9
|
+
* @default 'large'
|
|
10
|
+
*/
|
|
11
|
+
size?: CapDateRangePickerSize;
|
|
12
|
+
/**
|
|
13
|
+
* Timezone string (e.g., 'America/New_York')
|
|
14
|
+
* @default 'UTC'
|
|
15
|
+
*/
|
|
16
|
+
timezone?: string;
|
|
17
|
+
/**
|
|
18
|
+
* Whether to show timezone information in the footer
|
|
19
|
+
* @default false
|
|
20
|
+
*/
|
|
21
|
+
showTimezone?: boolean;
|
|
22
|
+
/**
|
|
23
|
+
* Selected date range value
|
|
24
|
+
*/
|
|
25
|
+
value?: RangeValue;
|
|
26
|
+
/**
|
|
27
|
+
* Default selected date range value
|
|
28
|
+
*/
|
|
29
|
+
defaultValue?: RangeValue;
|
|
30
|
+
/**
|
|
31
|
+
* Callback when date range changes
|
|
32
|
+
* @param dates - Array of [startDate, endDate] as Dayjs objects or null
|
|
33
|
+
* @param dateStrings - Array of [startDateString, endDateString]
|
|
34
|
+
*/
|
|
35
|
+
onChange?: (dates: RangeValue, dateStrings: [string, string]) => void;
|
|
36
|
+
/**
|
|
37
|
+
* Custom class name for the popup/dropdown (v6 API)
|
|
38
|
+
*/
|
|
39
|
+
popupClassName?: string;
|
|
40
|
+
/**
|
|
41
|
+
* Custom style for the popup/dropdown (v6 API)
|
|
42
|
+
*/
|
|
43
|
+
popupStyle?: React.CSSProperties;
|
|
44
|
+
/**
|
|
45
|
+
* Container for the popup (v6 API)
|
|
46
|
+
*/
|
|
47
|
+
getPopupContainer?: (triggerNode: HTMLElement) => HTMLElement;
|
|
48
|
+
/**
|
|
49
|
+
* Custom separator between start and end inputs
|
|
50
|
+
*/
|
|
51
|
+
separator?: React.ReactNode;
|
|
52
|
+
/**
|
|
53
|
+
* Render extra footer in calendar panel
|
|
54
|
+
*/
|
|
55
|
+
renderExtraFooter?: () => React.ReactNode;
|
|
56
|
+
/**
|
|
57
|
+
* Custom class name for the popup/dropdown
|
|
58
|
+
* @deprecated Use `popupClassName` instead. Will be removed in next major version.
|
|
59
|
+
*/
|
|
60
|
+
dropdownClassName?: string;
|
|
61
|
+
/**
|
|
62
|
+
* Custom style for the popup/dropdown
|
|
63
|
+
* @deprecated Use `popupStyle` instead. Will be removed in next major version.
|
|
64
|
+
*/
|
|
65
|
+
dropdownStyle?: React.CSSProperties;
|
|
66
|
+
/**
|
|
67
|
+
* Container for the calendar dropdown
|
|
68
|
+
* @deprecated Use `getPopupContainer` instead. Will be removed in next major version.
|
|
69
|
+
*/
|
|
70
|
+
getCalendarContainer?: (triggerNode: HTMLElement) => HTMLElement;
|
|
71
|
+
/**
|
|
72
|
+
* Initial start date (moment or dayjs)
|
|
73
|
+
* @deprecated Use `defaultValue` instead. Will be removed in next major version.
|
|
74
|
+
*/
|
|
75
|
+
initialStartDate?: Dayjs | null;
|
|
76
|
+
/**
|
|
77
|
+
* Initial end date (moment or dayjs)
|
|
78
|
+
* @deprecated Use `defaultValue` instead. Will be removed in next major version.
|
|
79
|
+
*/
|
|
80
|
+
initialEndDate?: Dayjs | null;
|
|
81
|
+
/**
|
|
82
|
+
* Whether to show calendar only (no input fields)
|
|
83
|
+
* @deprecated This feature may not be fully supported with antd RangePicker.
|
|
84
|
+
*/
|
|
85
|
+
showCalendarOnly?: boolean;
|
|
86
|
+
/**
|
|
87
|
+
* Whether to allow year navigation
|
|
88
|
+
* @deprecated Antd RangePicker has built-in year/month navigation. This prop is no longer needed.
|
|
89
|
+
*/
|
|
90
|
+
allowYearNavigation?: boolean;
|
|
91
|
+
/**
|
|
92
|
+
* Whether to hide the calendar popup
|
|
93
|
+
* @deprecated Use `open={false}` instead. Will be removed in next major version.
|
|
94
|
+
*/
|
|
95
|
+
hideCalendar?: boolean;
|
|
96
|
+
/**
|
|
97
|
+
* Root class for popup container lookup
|
|
98
|
+
* @deprecated Use `getPopupContainer` instead. Will be removed in next major version.
|
|
99
|
+
*/
|
|
100
|
+
rootClass?: string;
|
|
101
|
+
/**
|
|
102
|
+
* Minimum selectable date (string format)
|
|
103
|
+
* @deprecated Use `minDate` (dayjs) or `disabledDate` instead. Will be removed in next major version.
|
|
104
|
+
*/
|
|
105
|
+
minDateString?: string;
|
|
106
|
+
/**
|
|
107
|
+
* Custom input icon
|
|
108
|
+
* @deprecated Use `suffixIcon` instead. Will be removed in next major version.
|
|
109
|
+
*/
|
|
110
|
+
customInputIcon?: React.ReactNode;
|
|
111
|
+
/**
|
|
112
|
+
* Custom arrow icon between date inputs
|
|
113
|
+
* @deprecated Use `separator` instead. Will be removed in next major version.
|
|
114
|
+
*/
|
|
115
|
+
customArrowIcon?: React.ReactNode;
|
|
116
|
+
/**
|
|
117
|
+
* Display format for date strings
|
|
118
|
+
* @deprecated Use `format` instead. Will be removed in next major version.
|
|
119
|
+
*/
|
|
120
|
+
displayFormat?: string;
|
|
121
|
+
/**
|
|
122
|
+
* Callback when focus changes
|
|
123
|
+
* @deprecated Use `onOpenChange` instead. Will be removed in next major version.
|
|
124
|
+
*/
|
|
125
|
+
onFocusChange?: (focusedInput: string | null) => void;
|
|
126
|
+
/**
|
|
127
|
+
* Function to check if a day is blocked
|
|
128
|
+
* @deprecated Use `disabledDate` instead. Will be removed in next major version.
|
|
129
|
+
*/
|
|
130
|
+
isDayBlocked?: (day: Dayjs) => boolean;
|
|
131
|
+
/**
|
|
132
|
+
* Minimum number of nights for range selection
|
|
133
|
+
* @deprecated Use `disabledDate` for custom range validation. Will be removed in next major version.
|
|
134
|
+
*/
|
|
135
|
+
minimumNights?: number;
|
|
136
|
+
/**
|
|
137
|
+
* Whether to auto-focus the end date
|
|
138
|
+
* @deprecated Use `autoFocus` instead. Will be removed in next major version.
|
|
139
|
+
*/
|
|
140
|
+
autoFocusEndDate?: boolean;
|
|
141
|
+
}
|
|
142
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../components/CapDateRangePicker/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MA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