@pisell/date-picker 1.0.52 → 1.0.54
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/es/PisellDateRangePicker/index.d.ts +6 -0
- package/es/PisellDateRangePicker/index.js +3 -1
- package/es/PisellDateRangePicker/index.less +11 -0
- package/es/internals/utils/date-fields-utils.d.ts +1 -1
- package/lib/PisellDateRangePicker/index.d.ts +6 -0
- package/lib/PisellDateRangePicker/index.js +3 -1
- package/lib/PisellDateRangePicker/index.less +11 -0
- package/lib/internals/utils/date-fields-utils.d.ts +1 -1
- package/package.json +2 -2
|
@@ -55,6 +55,12 @@ export interface PisellDateRangePickerProps {
|
|
|
55
55
|
okButtonProps?: ButtonProps;
|
|
56
56
|
/** cancel 按钮 props */
|
|
57
57
|
cancelButtonProps?: ButtonProps;
|
|
58
|
+
/**
|
|
59
|
+
* CSS media query when `Mobile` mode will be changed to `Desktop`.
|
|
60
|
+
* @default '@media (pointer: fine)'
|
|
61
|
+
* @example '@media (min-width: 720px)' or theme.breakpoints.up("sm")
|
|
62
|
+
*/
|
|
63
|
+
desktopModeMediaQuery?: string;
|
|
58
64
|
}
|
|
59
65
|
declare const PisellDateRangePicker: (props: PisellDateRangePickerProps) => JSX.Element;
|
|
60
66
|
export default PisellDateRangePicker;
|
|
@@ -52,7 +52,8 @@ var PisellDateRangePicker = function PisellDateRangePicker(props) {
|
|
|
52
52
|
defaultCalendarMonth = props.defaultCalendarMonth,
|
|
53
53
|
okButtonProps = props.okButtonProps,
|
|
54
54
|
cancelButtonProps = props.cancelButtonProps,
|
|
55
|
-
onDateChange = props.onDateChange
|
|
55
|
+
onDateChange = props.onDateChange,
|
|
56
|
+
desktopModeMediaQuery = props.desktopModeMediaQuery;
|
|
56
57
|
var _useState = useState(propsOpen !== null && propsOpen !== void 0 ? propsOpen : false),
|
|
57
58
|
_useState2 = _slicedToArray(_useState, 2),
|
|
58
59
|
open = _useState2[0],
|
|
@@ -131,6 +132,7 @@ var PisellDateRangePicker = function PisellDateRangePicker(props) {
|
|
|
131
132
|
// defaultValue={defaultValue}
|
|
132
133
|
// key={`${_value?.[0]?.valueOf()}-${_value?.[1]?.valueOf()}`}
|
|
133
134
|
, {
|
|
135
|
+
desktopModeMediaQuery: desktopModeMediaQuery,
|
|
134
136
|
onMonthChange: onMonthChange,
|
|
135
137
|
minDate: minDate,
|
|
136
138
|
maxDate: maxDate,
|
|
@@ -5,7 +5,7 @@ export declare const splitDateRangeSections: (sections: RangeFieldSection[]) =>
|
|
|
5
5
|
};
|
|
6
6
|
export declare const removeLastSeparator: (dateSections: RangeFieldSection[]) => (RangeFieldSection | {
|
|
7
7
|
separator: null;
|
|
8
|
-
dateName: "
|
|
8
|
+
dateName: "start" | "end";
|
|
9
9
|
value: string;
|
|
10
10
|
format: string;
|
|
11
11
|
maxLength: number | null;
|
|
@@ -55,6 +55,12 @@ export interface PisellDateRangePickerProps {
|
|
|
55
55
|
okButtonProps?: ButtonProps;
|
|
56
56
|
/** cancel 按钮 props */
|
|
57
57
|
cancelButtonProps?: ButtonProps;
|
|
58
|
+
/**
|
|
59
|
+
* CSS media query when `Mobile` mode will be changed to `Desktop`.
|
|
60
|
+
* @default '@media (pointer: fine)'
|
|
61
|
+
* @example '@media (min-width: 720px)' or theme.breakpoints.up("sm")
|
|
62
|
+
*/
|
|
63
|
+
desktopModeMediaQuery?: string;
|
|
58
64
|
}
|
|
59
65
|
declare const PisellDateRangePicker: (props: PisellDateRangePickerProps) => JSX.Element;
|
|
60
66
|
export default PisellDateRangePicker;
|
|
@@ -75,7 +75,8 @@ var PisellDateRangePicker = (props) => {
|
|
|
75
75
|
defaultCalendarMonth,
|
|
76
76
|
okButtonProps,
|
|
77
77
|
cancelButtonProps,
|
|
78
|
-
onDateChange
|
|
78
|
+
onDateChange,
|
|
79
|
+
desktopModeMediaQuery
|
|
79
80
|
} = props;
|
|
80
81
|
const [open, setOpen] = (0, import_react.useState)(propsOpen ?? false);
|
|
81
82
|
(0, import_react.useEffect)(() => {
|
|
@@ -150,6 +151,7 @@ var PisellDateRangePicker = (props) => {
|
|
|
150
151
|
/* @__PURE__ */ import_react.default.createElement(
|
|
151
152
|
import_DateRangePicker.DateRangePicker,
|
|
152
153
|
{
|
|
154
|
+
desktopModeMediaQuery,
|
|
153
155
|
onMonthChange,
|
|
154
156
|
minDate,
|
|
155
157
|
maxDate,
|
|
@@ -5,7 +5,7 @@ export declare const splitDateRangeSections: (sections: RangeFieldSection[]) =>
|
|
|
5
5
|
};
|
|
6
6
|
export declare const removeLastSeparator: (dateSections: RangeFieldSection[]) => (RangeFieldSection | {
|
|
7
7
|
separator: null;
|
|
8
|
-
dateName: "
|
|
8
|
+
dateName: "start" | "end";
|
|
9
9
|
value: string;
|
|
10
10
|
format: string;
|
|
11
11
|
maxLength: number | null;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pisell/date-picker",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.54",
|
|
4
4
|
"sideEffects": [
|
|
5
5
|
"*.less"
|
|
6
6
|
],
|
|
@@ -26,7 +26,7 @@
|
|
|
26
26
|
"antd": "^5.5.0",
|
|
27
27
|
"react": "^18.0.0",
|
|
28
28
|
"react-dom": "^18.0.0",
|
|
29
|
-
"@pisell/utils": "1.0.
|
|
29
|
+
"@pisell/utils": "1.0.20"
|
|
30
30
|
},
|
|
31
31
|
"files": [
|
|
32
32
|
"es",
|