@pisell/date-picker 3.0.1 → 3.0.2

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pisell/date-picker",
3
- "version": "3.0.1",
3
+ "version": "3.0.2",
4
4
  "sideEffects": [
5
5
  "*.less"
6
6
  ],
@@ -1,83 +0,0 @@
1
- import { Dayjs } from 'dayjs';
2
- import React from 'react';
3
- import { ButtonProps } from 'antd';
4
- import { PopperPlacementType } from '@mui/base/Popper/Popper.types';
5
- import { PresetType } from '../Shortcuts';
6
- import 'dayjs/locale/zh-cn';
7
- import 'dayjs/locale/en';
8
- import 'dayjs/locale/zh-tw';
9
- import './index.less';
10
- export interface PisellDateRangePickerProps {
11
- /** 再次选择日期时是否清除结束时间 */
12
- clearEndOnSelection?: boolean;
13
- /** 日期选择确认回调 */
14
- onChange?: (day: (Dayjs | null)[] | string) => void;
15
- /** 日期改变回调 此处只为了组件外拿到当前日期项进行状态操作 通常情况下只使用onChange来拿value */
16
- onDateChange?: (day: (Dayjs | null)[]) => void;
17
- /** 日期选择值 */
18
- value?: Dayjs[] | string;
19
- /** 日期选择默认值 */
20
- defaultValue?: Dayjs[];
21
- /** 快捷选择项 */
22
- presets?: PresetType[];
23
- /** 类名 */
24
- className?: string;
25
- /** 是否显示时间选择 这里参数为antd TimePickerProps */
26
- showTime?: boolean | {
27
- defaultValue: Dayjs;
28
- [key: string]: any;
29
- }[];
30
- /** 占位符 */
31
- placeholder?: string;
32
- /** 是否禁用日期 */
33
- disabledDate?: (day: Dayjs, position: 'start' | 'end', value: Dayjs[]) => boolean;
34
- /** 日期格式 */
35
- format?: string;
36
- /** 后缀图标 */
37
- suffixIcon?: React.ReactNode;
38
- /** 是否显示边框 */
39
- bordered?: boolean;
40
- /** 是否打开日期选择 */
41
- open?: boolean;
42
- /** 关闭回调 */
43
- onClose?: () => void;
44
- /** 打开回调 */
45
- onOpen?: () => void;
46
- /** 弹窗宽度 */
47
- popupWidth?: number;
48
- /** 最小日期 */
49
- minDate?: Dayjs;
50
- /** 最大日期 */
51
- maxDate?: Dayjs;
52
- /** 月份切换事件 */
53
- onMonthChange?: (value: Dayjs) => void;
54
- /** 额外的弹出日历 className */
55
- popupClassName?: string;
56
- /** 默认显示月份 */
57
- defaultCalendarMonth?: Dayjs;
58
- /** ok 按钮 props */
59
- okButtonProps?: ButtonProps;
60
- /** cancel 按钮 props */
61
- cancelButtonProps?: ButtonProps;
62
- /**
63
- * CSS media query when `Mobile` mode will be changed to `Desktop`.
64
- * @default '@media (pointer: fine)'
65
- * @example '@media (min-width: 720px)' or theme.breakpoints.up("sm")
66
- */
67
- desktopModeMediaQuery?: string;
68
- style?: React.CSSProperties;
69
- /** 是否展示清除按钮 */
70
- allowClear?: boolean;
71
- /** true 将弹窗当前DOM层次结构下 false 追加到body */
72
- disablePortal?: boolean;
73
- /** 弹窗放置位置 */
74
- placement?: PopperPlacementType;
75
- /** 输入框只读 */
76
- inputReadOnly: boolean;
77
- /** 使用快捷筛选时返回快捷字符串 */
78
- returnShortcutString?: boolean;
79
- isHideCustomSelect?: boolean;
80
- endDateDays?: number;
81
- }
82
- declare const PisellDateRangePicker: (props: PisellDateRangePickerProps) => JSX.Element;
83
- export default PisellDateRangePicker;
@@ -1,3 +0,0 @@
1
- import './index.less';
2
- declare const Toolbar: (props: any) => JSX.Element | null;
3
- export default Toolbar;
@@ -1,83 +0,0 @@
1
- import { Dayjs } from 'dayjs';
2
- import React from 'react';
3
- import { ButtonProps } from 'antd';
4
- import { PopperPlacementType } from '@mui/base/Popper/Popper.types';
5
- import { PresetType } from '../Shortcuts';
6
- import 'dayjs/locale/zh-cn';
7
- import 'dayjs/locale/en';
8
- import 'dayjs/locale/zh-tw';
9
- import './index.less';
10
- export interface PisellDateRangePickerProps {
11
- /** 再次选择日期时是否清除结束时间 */
12
- clearEndOnSelection?: boolean;
13
- /** 日期选择确认回调 */
14
- onChange?: (day: (Dayjs | null)[] | string) => void;
15
- /** 日期改变回调 此处只为了组件外拿到当前日期项进行状态操作 通常情况下只使用onChange来拿value */
16
- onDateChange?: (day: (Dayjs | null)[]) => void;
17
- /** 日期选择值 */
18
- value?: Dayjs[] | string;
19
- /** 日期选择默认值 */
20
- defaultValue?: Dayjs[];
21
- /** 快捷选择项 */
22
- presets?: PresetType[];
23
- /** 类名 */
24
- className?: string;
25
- /** 是否显示时间选择 这里参数为antd TimePickerProps */
26
- showTime?: boolean | {
27
- defaultValue: Dayjs;
28
- [key: string]: any;
29
- }[];
30
- /** 占位符 */
31
- placeholder?: string;
32
- /** 是否禁用日期 */
33
- disabledDate?: (day: Dayjs, position: 'start' | 'end', value: Dayjs[]) => boolean;
34
- /** 日期格式 */
35
- format?: string;
36
- /** 后缀图标 */
37
- suffixIcon?: React.ReactNode;
38
- /** 是否显示边框 */
39
- bordered?: boolean;
40
- /** 是否打开日期选择 */
41
- open?: boolean;
42
- /** 关闭回调 */
43
- onClose?: () => void;
44
- /** 打开回调 */
45
- onOpen?: () => void;
46
- /** 弹窗宽度 */
47
- popupWidth?: number;
48
- /** 最小日期 */
49
- minDate?: Dayjs;
50
- /** 最大日期 */
51
- maxDate?: Dayjs;
52
- /** 月份切换事件 */
53
- onMonthChange?: (value: Dayjs) => void;
54
- /** 额外的弹出日历 className */
55
- popupClassName?: string;
56
- /** 默认显示月份 */
57
- defaultCalendarMonth?: Dayjs;
58
- /** ok 按钮 props */
59
- okButtonProps?: ButtonProps;
60
- /** cancel 按钮 props */
61
- cancelButtonProps?: ButtonProps;
62
- /**
63
- * CSS media query when `Mobile` mode will be changed to `Desktop`.
64
- * @default '@media (pointer: fine)'
65
- * @example '@media (min-width: 720px)' or theme.breakpoints.up("sm")
66
- */
67
- desktopModeMediaQuery?: string;
68
- style?: React.CSSProperties;
69
- /** 是否展示清除按钮 */
70
- allowClear?: boolean;
71
- /** true 将弹窗当前DOM层次结构下 false 追加到body */
72
- disablePortal?: boolean;
73
- /** 弹窗放置位置 */
74
- placement?: PopperPlacementType;
75
- /** 输入框只读 */
76
- inputReadOnly: boolean;
77
- /** 使用快捷筛选时返回快捷字符串 */
78
- returnShortcutString?: boolean;
79
- isHideCustomSelect?: boolean;
80
- endDateDays?: number;
81
- }
82
- declare const PisellDateRangePicker: (props: PisellDateRangePickerProps) => JSX.Element;
83
- export default PisellDateRangePicker;
@@ -1,3 +0,0 @@
1
- import './index.less';
2
- declare const Toolbar: (props: any) => JSX.Element | null;
3
- export default Toolbar;