straw-ui-vue 0.1.42 → 0.1.43
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/dist/components/st-cascade/types/st-cascade.d.ts +43 -43
- package/dist/components/st-date-picker/date-utils.d.ts +186 -0
- package/dist/components/st-date-picker/desktop/st-date-picker-desktop.d.ts +49 -0
- package/dist/components/st-date-picker/desktop/st-date-picker-panel.d.ts +34 -0
- package/dist/components/st-date-picker/desktop/st-datetime-picker-desktop.d.ts +45 -0
- package/dist/components/st-date-picker/desktop/st-datetime-picker-panel.d.ts +46 -0
- package/dist/components/st-date-picker/desktop/st-time-picker-desktop.d.ts +52 -0
- package/dist/components/st-date-picker/desktop/st-time-picker-panel.d.ts +44 -0
- package/dist/components/st-date-picker/desktop/types/index.d.ts +6 -0
- package/dist/components/st-date-picker/desktop/types/st-date-picker-desktop.d.ts +91 -0
- package/dist/components/st-date-picker/desktop/types/st-date-picker-panel.d.ts +70 -0
- package/dist/components/st-date-picker/desktop/types/st-datetime-picker-desktop.d.ts +92 -0
- package/dist/components/st-date-picker/desktop/types/st-datetime-picker-panel.d.ts +115 -0
- package/dist/components/st-date-picker/desktop/types/st-time-picker-desktop.d.ts +106 -0
- package/dist/components/st-date-picker/desktop/types/st-time-picker-panel.d.ts +86 -0
- package/dist/components/st-date-picker/index.d.ts +2792 -119
- package/dist/components/st-date-picker/phone/st-date-picker-phone.d.ts +43 -0
- package/dist/components/st-date-picker/phone/st-datetime-picker-phone.d.ts +49 -0
- package/dist/components/st-date-picker/phone/st-time-picker-phone.d.ts +52 -0
- package/dist/components/st-date-picker/phone/types/index.d.ts +3 -0
- package/dist/components/st-date-picker/phone/types/st-date-picker-phone.d.ts +44 -0
- package/dist/components/st-date-picker/phone/types/st-datetime-picker-phone.d.ts +51 -0
- package/dist/components/st-date-picker/phone/types/st-time-picker-phone.d.ts +44 -0
- package/dist/components/st-date-picker/picker-classes.d.ts +37 -0
- package/dist/components/st-date-picker/shortcuts.d.ts +18 -0
- package/dist/components/st-date-picker/st-date-picker.d.ts +9 -22
- package/dist/components/st-date-picker/st-datetime-picker.d.ts +29 -0
- package/dist/components/st-date-picker/st-picker-cell-grid.d.ts +20 -0
- package/dist/components/st-date-picker/st-picker-cell.d.ts +31 -0
- package/dist/components/st-date-picker/st-picker-footer.d.ts +37 -0
- package/dist/components/st-date-picker/st-picker-grid.d.ts +20 -0
- package/dist/components/st-date-picker/st-picker-header.d.ts +37 -0
- package/dist/components/st-date-picker/st-picker-quick-row.d.ts +11 -0
- package/dist/components/st-date-picker/st-picker-tabs.d.ts +22 -0
- package/dist/components/st-date-picker/st-picker-time-column.d.ts +12 -0
- package/dist/components/st-date-picker/st-picker-time-columns.d.ts +17 -0
- package/dist/components/st-date-picker/st-picker-trigger.d.ts +27 -0
- package/dist/components/st-date-picker/st-picker-week.d.ts +7 -0
- package/dist/components/st-date-picker/st-picker-wheel-column.d.ts +13 -0
- package/dist/components/st-date-picker/st-picker-wheel.d.ts +23 -0
- package/dist/components/st-date-picker/st-time-picker.d.ts +29 -0
- package/dist/components/st-date-picker/types/index.d.ts +9 -2
- package/dist/components/st-date-picker/types/st-date-picker.d.ts +33 -103
- package/dist/components/st-date-picker/types/st-datetime-picker.d.ts +33 -0
- package/dist/components/st-date-picker/types/st-picker-atoms.d.ts +485 -0
- package/dist/components/st-date-picker/types/st-picker-shared.d.ts +154 -0
- package/dist/components/st-date-picker/types/st-time-picker.d.ts +32 -0
- package/dist/components/st-date-picker/usePickerDate.d.ts +86 -0
- package/dist/components/st-date-picker/usePickerModel.d.ts +28 -0
- package/dist/components/st-date-picker/usePickerTime.d.ts +59 -0
- package/dist/components/st-dialog/desktop/st-dialog-desktop-group.d.ts +18 -0
- package/dist/components/st-dialog/desktop/st-dialog-desktop.d.ts +32 -0
- package/dist/components/st-dialog/desktop/types/index.d.ts +2 -0
- package/dist/components/st-dialog/desktop/types/st-dialog-desktop-group.d.ts +21 -0
- package/dist/components/st-dialog/desktop/types/st-dialog-desktop.d.ts +25 -0
- package/dist/components/st-dialog/index.d.ts +418 -6
- package/dist/components/st-dialog/phone/st-dialog-phone-group.d.ts +22 -0
- package/dist/components/st-dialog/phone/st-dialog-phone.d.ts +31 -0
- package/dist/components/st-dialog/phone/types/index.d.ts +2 -0
- package/dist/components/st-dialog/phone/types/st-dialog-phone-group.d.ts +18 -0
- package/dist/components/st-dialog/phone/types/st-dialog-phone.d.ts +18 -0
- package/dist/components/st-dialog/st-dialog-group.d.ts +4 -2
- package/dist/components/st-dialog/st-dialog.d.ts +2 -0
- package/dist/components/st-dialog/types/index.d.ts +13 -10
- package/dist/components/st-dialog/types/st-dialog-group.d.ts +31 -24
- package/dist/components/st-dialog/types/st-dialog.d.ts +89 -76
- package/dist/components/st-drawer/desktop/st-drawer-desktop-group.d.ts +27 -0
- package/dist/components/st-drawer/desktop/st-drawer-desktop.d.ts +30 -0
- package/dist/components/st-drawer/desktop/types/index.d.ts +2 -0
- package/dist/components/st-drawer/desktop/types/st-drawer-desktop-group.d.ts +26 -0
- package/dist/components/st-drawer/desktop/types/st-drawer-desktop.d.ts +15 -0
- package/dist/components/st-drawer/index.d.ts +478 -8
- package/dist/components/st-drawer/phone/st-drawer-phone-group.d.ts +28 -0
- package/dist/components/st-drawer/phone/st-drawer-phone.d.ts +31 -0
- package/dist/components/st-drawer/phone/types/index.d.ts +2 -0
- package/dist/components/st-drawer/phone/types/st-drawer-phone-group.d.ts +28 -0
- package/dist/components/st-drawer/phone/types/st-drawer-phone.d.ts +18 -0
- package/dist/components/st-drawer/st-drawer-group.d.ts +3 -1
- package/dist/components/st-drawer/st-drawer.d.ts +3 -1
- package/dist/components/st-drawer/types/index.d.ts +13 -9
- package/dist/components/st-drawer/types/st-drawer-group.d.ts +30 -32
- package/dist/components/st-drawer/types/st-drawer.d.ts +93 -72
- package/dist/components/st-menu/index.d.ts +6 -6
- package/dist/components/st-menu/st-menu-item.d.ts +1 -1
- package/dist/components/st-select/index.d.ts +6 -6
- package/dist/components/st-select/st-select-container.d.ts +1 -1
- package/dist/components/st-table/types/st-table-group.d.ts +1 -1
- package/dist/components/st-table/useTableDrag.d.ts +3 -1
- package/dist/global.d.ts +217 -190
- package/dist/index.d.ts +61 -9
- package/dist/straw-ui.js +10632 -5514
- package/dist/types.d.ts +1 -3
- package/dist/utils/back-stack.d.ts +26 -0
- package/dist/utils.js +1 -1
- package/package.json +1 -1
- package/dist/components/st-date-picker/st-date-picker-panel.d.ts +0 -24
- package/dist/components/st-date-picker/types/st-date-picker-panel.d.ts +0 -62
- package/dist/components/st-datetime-picker/index.d.ts +0 -206
- package/dist/components/st-datetime-picker/st-datetime-picker-panel.d.ts +0 -25
- package/dist/components/st-datetime-picker/st-datetime-picker.d.ts +0 -43
- package/dist/components/st-datetime-picker/types/index.d.ts +0 -2
- package/dist/components/st-datetime-picker/types/st-datetime-picker-panel.d.ts +0 -64
- package/dist/components/st-datetime-picker/types/st-datetime-picker.d.ts +0 -103
- package/dist/components/st-time-picker/index.d.ts +0 -232
- package/dist/components/st-time-picker/st-time-picker-panel.d.ts +0 -33
- package/dist/components/st-time-picker/st-time-picker.d.ts +0 -46
- package/dist/components/st-time-picker/types/index.d.ts +0 -4
- package/dist/components/st-time-picker/types/st-time-picker-panel.d.ts +0 -52
- package/dist/components/st-time-picker/types/st-time-picker-shared.d.ts +0 -25
- package/dist/components/st-time-picker/types/st-time-picker.d.ts +0 -78
|
@@ -1,43 +1,43 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
StCascadeDesktopEmits,
|
|
3
|
-
StCascadeDesktopProps,
|
|
4
|
-
StCascadeDesktopSlots,
|
|
5
|
-
} from '../desktop/types/st-cascade-desktop.d.ts';
|
|
6
|
-
import type { StCascadePhoneEmits, StCascadePhoneProps, StCascadePhoneSlots } from '../phone/types/st-cascade-phone.d.ts';
|
|
7
|
-
import type { DeviceType } from '../../../types/device.d.ts';
|
|
8
|
-
|
|
9
|
-
/**
|
|
10
|
-
* StCascade 组件属性接口(简易入口:按设备端分发至桌面端/移动端预封装组件)
|
|
11
|
-
* */
|
|
12
|
-
export interface StCascadeProps extends StCascadeDesktopProps, StCascadePhoneProps {
|
|
13
|
-
/** 设备类型 */
|
|
14
|
-
deviceType?: DeviceType | 'auto';
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
/**
|
|
18
|
-
* StCascade 组件插槽接口
|
|
19
|
-
* */
|
|
20
|
-
export interface StCascadeSlots extends StCascadeDesktopSlots, StCascadePhoneSlots {}
|
|
21
|
-
|
|
22
|
-
/**
|
|
23
|
-
* StCascade 组件事件接口
|
|
24
|
-
* */
|
|
25
|
-
export interface StCascadeEmits extends StCascadeDesktopEmits, StCascadePhoneEmits {}
|
|
26
|
-
|
|
27
|
-
/**
|
|
28
|
-
* StCascade 组件暴露的方法接口
|
|
29
|
-
* */
|
|
30
|
-
export interface StCascadeExpose {
|
|
31
|
-
/** 聚焦触发输入框 */
|
|
32
|
-
focus: () => void;
|
|
33
|
-
/** 失焦触发输入框 */
|
|
34
|
-
blur: () => void;
|
|
35
|
-
/** 清空选中值 */
|
|
36
|
-
clear: () => void;
|
|
37
|
-
/** 打开面板/抽屉 */
|
|
38
|
-
open: () => void;
|
|
39
|
-
/** 关闭面板/抽屉 */
|
|
40
|
-
close: () => void;
|
|
41
|
-
}
|
|
42
|
-
|
|
43
|
-
export {};
|
|
1
|
+
import type {
|
|
2
|
+
StCascadeDesktopEmits,
|
|
3
|
+
StCascadeDesktopProps,
|
|
4
|
+
StCascadeDesktopSlots,
|
|
5
|
+
} from '../desktop/types/st-cascade-desktop.d.ts';
|
|
6
|
+
import type { StCascadePhoneEmits, StCascadePhoneProps, StCascadePhoneSlots } from '../phone/types/st-cascade-phone.d.ts';
|
|
7
|
+
import type { DeviceType } from '../../../types/device.d.ts';
|
|
8
|
+
|
|
9
|
+
/**
|
|
10
|
+
* StCascade 组件属性接口(简易入口:按设备端分发至桌面端/移动端预封装组件)
|
|
11
|
+
* */
|
|
12
|
+
export interface StCascadeProps extends StCascadeDesktopProps, StCascadePhoneProps {
|
|
13
|
+
/** 设备类型 */
|
|
14
|
+
deviceType?: DeviceType | 'auto';
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
/**
|
|
18
|
+
* StCascade 组件插槽接口
|
|
19
|
+
* */
|
|
20
|
+
export interface StCascadeSlots extends StCascadeDesktopSlots, StCascadePhoneSlots {}
|
|
21
|
+
|
|
22
|
+
/**
|
|
23
|
+
* StCascade 组件事件接口
|
|
24
|
+
* */
|
|
25
|
+
export interface StCascadeEmits extends StCascadeDesktopEmits, StCascadePhoneEmits {}
|
|
26
|
+
|
|
27
|
+
/**
|
|
28
|
+
* StCascade 组件暴露的方法接口
|
|
29
|
+
* */
|
|
30
|
+
export interface StCascadeExpose {
|
|
31
|
+
/** 聚焦触发输入框 */
|
|
32
|
+
focus: () => void;
|
|
33
|
+
/** 失焦触发输入框 */
|
|
34
|
+
blur: () => void;
|
|
35
|
+
/** 清空选中值 */
|
|
36
|
+
clear: () => void;
|
|
37
|
+
/** 打开面板/抽屉 */
|
|
38
|
+
open: () => void;
|
|
39
|
+
/** 关闭面板/抽屉 */
|
|
40
|
+
close: () => void;
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
export {};
|
|
@@ -0,0 +1,186 @@
|
|
|
1
|
+
import { StPickerRangeValue, StPickerTimeColumnItem, StPickerTimeParts, StPickerValue } from './types/st-picker-shared.d.ts';
|
|
2
|
+
/** 星期表头,周日起始,与日历栅格同序 */
|
|
3
|
+
export declare const weekDayLabels: string[];
|
|
4
|
+
/** 年代面板跨度:4×3 共 12 年 */
|
|
5
|
+
export declare const DECADE_SPAN = 12;
|
|
6
|
+
/**
|
|
7
|
+
* 按格式串格式化日期
|
|
8
|
+
* @param date - 日期,空值返回空串
|
|
9
|
+
* @param format - 格式串,支持 YYYY / YY / MM / M / DD / D / HH / H / mm / m / ss / s
|
|
10
|
+
* */
|
|
11
|
+
export declare function formatDate(date: Date | null | undefined, format?: string): string;
|
|
12
|
+
/**
|
|
13
|
+
* 宽松解析输入为 Date
|
|
14
|
+
* 接受 Date 实例与 `2026-1-5`、`2026-01-05 09:30` 等分隔符不敏感的字面串,解析失败返回 null
|
|
15
|
+
* @param value - 待解析值
|
|
16
|
+
* */
|
|
17
|
+
export declare function parseDate(value: Date | string | null | undefined): Date | null;
|
|
18
|
+
/**
|
|
19
|
+
* 归一化为绑定值:字符串解析为 Date,其余原样返回
|
|
20
|
+
* */
|
|
21
|
+
export declare function toValueDate(value: StPickerValue): Date | null;
|
|
22
|
+
/**
|
|
23
|
+
* 归一化区间绑定值
|
|
24
|
+
* */
|
|
25
|
+
export declare function toRangeDates(value: StPickerRangeValue | null | undefined): [Date | null, Date | null];
|
|
26
|
+
/**
|
|
27
|
+
* 当天零点
|
|
28
|
+
* */
|
|
29
|
+
export declare function startOfDay(date: Date): Date;
|
|
30
|
+
/**
|
|
31
|
+
* 同一天判定
|
|
32
|
+
* */
|
|
33
|
+
export declare function isSameDay(a: Date | null | undefined, b: Date | null | undefined): boolean;
|
|
34
|
+
/**
|
|
35
|
+
* 同月判定
|
|
36
|
+
* */
|
|
37
|
+
export declare function isSameMonth(a: Date, b: Date): boolean;
|
|
38
|
+
/**
|
|
39
|
+
* 日粒度比较:同日返回 0,a 早返回 -1
|
|
40
|
+
* */
|
|
41
|
+
export declare function compareDay(a: Date, b: Date): number;
|
|
42
|
+
/**
|
|
43
|
+
* 日期偏移天数
|
|
44
|
+
* */
|
|
45
|
+
export declare function addDays(date: Date, days: number): Date;
|
|
46
|
+
/**
|
|
47
|
+
* 月天数
|
|
48
|
+
* */
|
|
49
|
+
export declare function getDaysInMonth(year: number, month: number): number;
|
|
50
|
+
/**
|
|
51
|
+
* 日期偏移月数
|
|
52
|
+
* 越界吸附到目标月月末(1月31日 +1月 = 2月28/29日)
|
|
53
|
+
* */
|
|
54
|
+
export declare function addMonths(date: Date, months: number): Date;
|
|
55
|
+
/**
|
|
56
|
+
* 当月第一天
|
|
57
|
+
* */
|
|
58
|
+
export declare function firstOfMonth(date: Date): Date;
|
|
59
|
+
/**
|
|
60
|
+
* 当月最后一天
|
|
61
|
+
* */
|
|
62
|
+
export declare function lastOfMonth(date: Date): Date;
|
|
63
|
+
/**
|
|
64
|
+
* 所在周起始日
|
|
65
|
+
* @param weekStartsOn - 周首日序号,0 为周日
|
|
66
|
+
* */
|
|
67
|
+
export declare function startOfWeek(date: Date, weekStartsOn?: number): Date;
|
|
68
|
+
/**
|
|
69
|
+
* 年代起始年(12 年一档)
|
|
70
|
+
* */
|
|
71
|
+
export declare function startOfDecade(year: number): number;
|
|
72
|
+
/**
|
|
73
|
+
* 日历栅格:以周为首行起点铺开 6 行 × 7 列,含越月填充日
|
|
74
|
+
* */
|
|
75
|
+
export declare function createMonthMatrix(year: number, month: number): Date[];
|
|
76
|
+
/**
|
|
77
|
+
* 年代面板年份列表(12 项)
|
|
78
|
+
* */
|
|
79
|
+
export declare function createDecadeYears(decadeStart: number): number[];
|
|
80
|
+
/**
|
|
81
|
+
* 日期夹取到 [min, max] 区间
|
|
82
|
+
* */
|
|
83
|
+
export declare function clampDate(date: Date, min?: Date | null, max?: Date | null): Date;
|
|
84
|
+
/**
|
|
85
|
+
* Date → 时刻分量
|
|
86
|
+
* */
|
|
87
|
+
export declare function toTimeParts(date: Date | null | undefined, fallback?: StPickerTimeParts): StPickerTimeParts;
|
|
88
|
+
/**
|
|
89
|
+
* 时刻分量写回日期(保留原日期部分)
|
|
90
|
+
* */
|
|
91
|
+
export declare function applyTimeParts(date: Date, parts: StPickerTimeParts): Date;
|
|
92
|
+
/**
|
|
93
|
+
* 时刻分量格式化为文本
|
|
94
|
+
* @param format - 默认按时分秒可见性推导
|
|
95
|
+
* */
|
|
96
|
+
export declare function formatTimeParts(parts: StPickerTimeParts, showSecond?: boolean, format?: string): string;
|
|
97
|
+
/**
|
|
98
|
+
* 时刻分量的一日内秒数,用于跨列约束比较
|
|
99
|
+
* */
|
|
100
|
+
export declare function timeToSeconds(parts: StPickerTimeParts): number;
|
|
101
|
+
/**
|
|
102
|
+
* 解析时间字面串为时刻分量
|
|
103
|
+
* @param text - `09:30`、`9:30:15` 等宽松写法
|
|
104
|
+
* @param showSecond - 是否要求秒段
|
|
105
|
+
* */
|
|
106
|
+
export declare function parseTimeText(text: string, showSecond?: boolean): StPickerTimeParts | null;
|
|
107
|
+
/**
|
|
108
|
+
* 生成步长序列:如 buildStepValues(60, 15) → [0, 15, 30, 45]
|
|
109
|
+
* */
|
|
110
|
+
export declare function buildStepValues(total: number, step: number): number[];
|
|
111
|
+
/**
|
|
112
|
+
* 生成时间列选项
|
|
113
|
+
* @param total - 量程上限(不含)
|
|
114
|
+
* @param step - 步长
|
|
115
|
+
* @param isDisabled - 禁用判定
|
|
116
|
+
* */
|
|
117
|
+
export declare function createTimeItems(total: number, step: number, isDisabled?: (value: number) => boolean): StPickerTimeColumnItem[];
|
|
118
|
+
/**
|
|
119
|
+
* 取步长序列中不小于 value 的首项,无解时回退到最大合法项
|
|
120
|
+
* 用于「向内最近吸附」:当前值与约束冲突时落到最近合法值
|
|
121
|
+
* */
|
|
122
|
+
export declare function snapUpToStep(values: number[], value: number): number | null;
|
|
123
|
+
/**
|
|
124
|
+
* 日期区间是否为完整两端
|
|
125
|
+
* */
|
|
126
|
+
export declare function isFullRange(range: [Date | null, Date | null]): range is [Date, Date];
|
|
127
|
+
/**
|
|
128
|
+
* 端点倒挂自动交换
|
|
129
|
+
* */
|
|
130
|
+
export declare function normalizeRange(range: [Date | null, Date | null]): [Date | null, Date | null];
|
|
131
|
+
/**
|
|
132
|
+
* 时刻区间倒挂自动交换
|
|
133
|
+
* */
|
|
134
|
+
export declare function normalizeTimeRange<T extends StPickerTimeParts | null>(range: [T, T]): [T, T];
|
|
135
|
+
/**
|
|
136
|
+
* 区间日数(含两端)
|
|
137
|
+
* */
|
|
138
|
+
export declare function rangeDayCount(range: [Date | null, Date | null]): number;
|
|
139
|
+
/**
|
|
140
|
+
* 最近 n 天(含今天)
|
|
141
|
+
* */
|
|
142
|
+
export declare function recentDays(count: number): StPickerRangeValue;
|
|
143
|
+
/**
|
|
144
|
+
* 本周(周日起算)
|
|
145
|
+
* */
|
|
146
|
+
export declare function thisWeek(): StPickerRangeValue;
|
|
147
|
+
/**
|
|
148
|
+
* 本月
|
|
149
|
+
* */
|
|
150
|
+
export declare function thisMonth(): StPickerRangeValue;
|
|
151
|
+
/**
|
|
152
|
+
* 今天
|
|
153
|
+
* */
|
|
154
|
+
export declare function today(): Date;
|
|
155
|
+
/**
|
|
156
|
+
* 明天
|
|
157
|
+
* */
|
|
158
|
+
export declare function tomorrow(): Date;
|
|
159
|
+
/**
|
|
160
|
+
* 本周末(下一个周六,今天即周六时取本周六)
|
|
161
|
+
* */
|
|
162
|
+
export declare function upcomingWeekend(): Date;
|
|
163
|
+
/**
|
|
164
|
+
* 内部 Date → 对外绑定值
|
|
165
|
+
* 未传 valueFormat 时回吐 Date 副本,避免把内部引用交给调用方
|
|
166
|
+
* */
|
|
167
|
+
export declare function toBoundValue(date: Date | null | undefined, valueFormat?: string): StPickerValue;
|
|
168
|
+
/**
|
|
169
|
+
* 内部区间 → 对外绑定值,两端皆空时返回 null
|
|
170
|
+
* */
|
|
171
|
+
export declare function toBoundRange(range: [Date | null, Date | null], valueFormat?: string): StPickerRangeValue | null;
|
|
172
|
+
/**
|
|
173
|
+
* 快捷预设携带的时刻值 → 时刻分量
|
|
174
|
+
* 接受 `09:30` 字面串与 Date 两种写法
|
|
175
|
+
* */
|
|
176
|
+
export declare function toPartsValue(value: StPickerValue): StPickerTimeParts | null;
|
|
177
|
+
/**
|
|
178
|
+
* 时刻分量 → Date
|
|
179
|
+
* 纯时间字段没有日期语义,落到以今天(或指定基准日)为零点的 Date 上
|
|
180
|
+
* */
|
|
181
|
+
export declare function partsToDate(parts: StPickerTimeParts, base?: Date | null): Date;
|
|
182
|
+
/**
|
|
183
|
+
* 时刻分量 → 对外绑定值
|
|
184
|
+
* 传 format 时输出字面串,否则输出 Date
|
|
185
|
+
* */
|
|
186
|
+
export declare function toBoundParts(parts: StPickerTimeParts | null, format?: string): StPickerValue;
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import { StDatePickerDesktopExpose, StDatePickerDesktopProps, StDatePickerDesktopSlots } from './types/st-date-picker-desktop.d.ts';
|
|
2
|
+
import { StPickerRangeValue, StPickerValue } from '../types/st-picker-shared.d.ts';
|
|
3
|
+
type __VLS_Props = StDatePickerDesktopProps;
|
|
4
|
+
type __VLS_Slots = StDatePickerDesktopSlots;
|
|
5
|
+
type __VLS_ModelProps = {
|
|
6
|
+
modelValue?: StPickerValue | StPickerRangeValue | null;
|
|
7
|
+
};
|
|
8
|
+
type __VLS_PublicProps = __VLS_Props & __VLS_ModelProps;
|
|
9
|
+
declare const __VLS_base: import('vue').DefineComponent<__VLS_PublicProps, StDatePickerDesktopExpose, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
10
|
+
clear: () => any;
|
|
11
|
+
change: (value: StPickerValue | StPickerRangeValue) => any;
|
|
12
|
+
visibleChange: (visible: boolean) => any;
|
|
13
|
+
"update:modelValue": (value: StPickerValue | StPickerRangeValue) => any;
|
|
14
|
+
}, string, import('vue').PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
|
|
15
|
+
onClear?: () => any;
|
|
16
|
+
onChange?: (value: StPickerValue | StPickerRangeValue) => any;
|
|
17
|
+
onVisibleChange?: (visible: boolean) => any;
|
|
18
|
+
"onUpdate:modelValue"?: (value: StPickerValue | StPickerRangeValue) => any;
|
|
19
|
+
}>, {
|
|
20
|
+
size: StSize;
|
|
21
|
+
icon: string;
|
|
22
|
+
range: boolean;
|
|
23
|
+
separator: string;
|
|
24
|
+
disabled: boolean;
|
|
25
|
+
placeholder: string;
|
|
26
|
+
clearable: boolean;
|
|
27
|
+
format: string;
|
|
28
|
+
showClear: boolean;
|
|
29
|
+
shortcuts: import('../index.ts').StPickerShortcut[];
|
|
30
|
+
minDate: Date | string | null;
|
|
31
|
+
maxDate: Date | string | null;
|
|
32
|
+
disabledDate: (date: Date) => boolean;
|
|
33
|
+
maxSpan: number;
|
|
34
|
+
marks: ((date: Date) => boolean) | Date[];
|
|
35
|
+
showFooter: boolean;
|
|
36
|
+
showTodayLink: boolean;
|
|
37
|
+
valueFormat: string;
|
|
38
|
+
startPlaceholder: string;
|
|
39
|
+
endPlaceholder: string;
|
|
40
|
+
closeOnSelect: boolean;
|
|
41
|
+
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
|
|
42
|
+
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
43
|
+
declare const _default: typeof __VLS_export;
|
|
44
|
+
export default _default;
|
|
45
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
46
|
+
new (): {
|
|
47
|
+
$slots: S;
|
|
48
|
+
};
|
|
49
|
+
};
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { StDatePickerPanelExpose, StDatePickerPanelProps, StDatePickerPanelSlots } from './types/st-date-picker-panel.d.ts';
|
|
2
|
+
import { StPickerShortcut } from '../types/st-picker-shared.d.ts';
|
|
3
|
+
type __VLS_Slots = StDatePickerPanelSlots;
|
|
4
|
+
declare const __VLS_base: import('vue').DefineComponent<StDatePickerPanelProps, StDatePickerPanelExpose, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
5
|
+
clear: () => any;
|
|
6
|
+
select: (date: Date) => any;
|
|
7
|
+
rangePreview: (range: [Date, Date]) => any;
|
|
8
|
+
selectRange: (range: [Date, Date]) => any;
|
|
9
|
+
}, string, import('vue').PublicProps, Readonly<StDatePickerPanelProps> & Readonly<{
|
|
10
|
+
onClear?: () => any;
|
|
11
|
+
onSelect?: (date: Date) => any;
|
|
12
|
+
onRangePreview?: (range: [Date, Date]) => any;
|
|
13
|
+
onSelectRange?: (range: [Date, Date]) => any;
|
|
14
|
+
}>, {
|
|
15
|
+
value: Date | null;
|
|
16
|
+
range: boolean;
|
|
17
|
+
showClear: boolean;
|
|
18
|
+
clearText: string;
|
|
19
|
+
keyboard: boolean;
|
|
20
|
+
shortcuts: StPickerShortcut[];
|
|
21
|
+
rangeValue: [Date | null, Date | null];
|
|
22
|
+
marks: ((date: Date) => boolean) | Date[];
|
|
23
|
+
showFooter: boolean;
|
|
24
|
+
showTodayLink: boolean;
|
|
25
|
+
cellSize: import('../index.ts').StPickerCellSize;
|
|
26
|
+
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
|
|
27
|
+
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
28
|
+
declare const _default: typeof __VLS_export;
|
|
29
|
+
export default _default;
|
|
30
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
31
|
+
new (): {
|
|
32
|
+
$slots: S;
|
|
33
|
+
};
|
|
34
|
+
};
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import { StDateTimePickerDesktopExpose, StDateTimePickerDesktopProps, StDateTimePickerDesktopSlots } from './types/st-datetime-picker-desktop.d.ts';
|
|
2
|
+
import { StPickerRangeValue, StPickerValue } from '../types/st-picker-shared.d.ts';
|
|
3
|
+
type __VLS_Props = StDateTimePickerDesktopProps;
|
|
4
|
+
type __VLS_Slots = StDateTimePickerDesktopSlots;
|
|
5
|
+
type __VLS_ModelProps = {
|
|
6
|
+
modelValue?: StPickerValue | StPickerRangeValue | null;
|
|
7
|
+
};
|
|
8
|
+
type __VLS_PublicProps = __VLS_Props & __VLS_ModelProps;
|
|
9
|
+
declare const __VLS_base: import('vue').DefineComponent<__VLS_PublicProps, StDateTimePickerDesktopExpose, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
10
|
+
clear: () => any;
|
|
11
|
+
change: (value: StPickerValue | StPickerRangeValue) => any;
|
|
12
|
+
visibleChange: (visible: boolean) => any;
|
|
13
|
+
"update:modelValue": (value: StPickerValue | StPickerRangeValue) => any;
|
|
14
|
+
}, string, import('vue').PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
|
|
15
|
+
onClear?: () => any;
|
|
16
|
+
onChange?: (value: StPickerValue | StPickerRangeValue) => any;
|
|
17
|
+
onVisibleChange?: (visible: boolean) => any;
|
|
18
|
+
"onUpdate:modelValue"?: (value: StPickerValue | StPickerRangeValue) => any;
|
|
19
|
+
}>, {
|
|
20
|
+
size: StSize;
|
|
21
|
+
icon: string;
|
|
22
|
+
range: boolean;
|
|
23
|
+
separator: string;
|
|
24
|
+
disabled: boolean;
|
|
25
|
+
placeholder: string;
|
|
26
|
+
clearable: boolean;
|
|
27
|
+
confirmText: string;
|
|
28
|
+
format: string;
|
|
29
|
+
showClear: boolean;
|
|
30
|
+
shortcuts: import('../index.ts').StPickerShortcut[];
|
|
31
|
+
showFooter: boolean;
|
|
32
|
+
valueFormat: string;
|
|
33
|
+
startPlaceholder: string;
|
|
34
|
+
endPlaceholder: string;
|
|
35
|
+
dateConfig: import('../index.ts').StPickerDateAxisConfig;
|
|
36
|
+
timeConfig: import('../index.ts').StPickerTimeAxisConfig;
|
|
37
|
+
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
|
|
38
|
+
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
39
|
+
declare const _default: typeof __VLS_export;
|
|
40
|
+
export default _default;
|
|
41
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
42
|
+
new (): {
|
|
43
|
+
$slots: S;
|
|
44
|
+
};
|
|
45
|
+
};
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import { StDateTimePickerPanelExpose, StDateTimePickerPanelProps, StDateTimePickerPanelSlots } from './types/st-datetime-picker-panel.d.ts';
|
|
2
|
+
import { StPickerShortcut } from '../types/st-picker-shared.d.ts';
|
|
3
|
+
type __VLS_Slots = StDateTimePickerPanelSlots;
|
|
4
|
+
declare const __VLS_base: import('vue').DefineComponent<StDateTimePickerPanelProps, StDateTimePickerPanelExpose, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
5
|
+
clear: () => any;
|
|
6
|
+
confirm: (date: Date) => any;
|
|
7
|
+
confirmRange: (range: [Date, Date]) => any;
|
|
8
|
+
}, string, import('vue').PublicProps, Readonly<StDateTimePickerPanelProps> & Readonly<{
|
|
9
|
+
onClear?: () => any;
|
|
10
|
+
onConfirm?: (date: Date) => any;
|
|
11
|
+
onConfirmRange?: (range: [Date, Date]) => any;
|
|
12
|
+
}>, {
|
|
13
|
+
value: Date | null;
|
|
14
|
+
range: boolean;
|
|
15
|
+
disabled: boolean;
|
|
16
|
+
confirmText: string;
|
|
17
|
+
format: string;
|
|
18
|
+
showClear: boolean;
|
|
19
|
+
shortcuts: StPickerShortcut[];
|
|
20
|
+
rangeValue: [Date | null, Date | null];
|
|
21
|
+
marks: ((date: Date) => boolean) | Date[];
|
|
22
|
+
showFooter: boolean;
|
|
23
|
+
cellSize: "pc" | "compact";
|
|
24
|
+
showHour: boolean;
|
|
25
|
+
showMinute: boolean;
|
|
26
|
+
showSecond: boolean;
|
|
27
|
+
hourStep: number;
|
|
28
|
+
minuteStep: number;
|
|
29
|
+
secondStep: number;
|
|
30
|
+
minTime: string | null;
|
|
31
|
+
maxTime: string | null;
|
|
32
|
+
startText: string;
|
|
33
|
+
endText: string;
|
|
34
|
+
timeFormat: string;
|
|
35
|
+
dateText: string;
|
|
36
|
+
timeText: string;
|
|
37
|
+
timeSize: "pc" | "compact";
|
|
38
|
+
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
|
|
39
|
+
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
40
|
+
declare const _default: typeof __VLS_export;
|
|
41
|
+
export default _default;
|
|
42
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
43
|
+
new (): {
|
|
44
|
+
$slots: S;
|
|
45
|
+
};
|
|
46
|
+
};
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
import { StTimePickerDesktopExpose, StTimePickerDesktopProps, StTimePickerDesktopSlots } from './types/st-time-picker-desktop.d.ts';
|
|
2
|
+
import { StPickerRangeValue, StPickerValue } from '../types/st-picker-shared.d.ts';
|
|
3
|
+
type __VLS_Props = StTimePickerDesktopProps;
|
|
4
|
+
type __VLS_Slots = StTimePickerDesktopSlots;
|
|
5
|
+
type __VLS_ModelProps = {
|
|
6
|
+
modelValue?: StPickerValue | StPickerRangeValue | null;
|
|
7
|
+
};
|
|
8
|
+
type __VLS_PublicProps = __VLS_Props & __VLS_ModelProps;
|
|
9
|
+
declare const __VLS_base: import('vue').DefineComponent<__VLS_PublicProps, StTimePickerDesktopExpose, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
10
|
+
clear: () => any;
|
|
11
|
+
change: (value: string | Date | [string | Date, string | Date]) => any;
|
|
12
|
+
visibleChange: (visible: boolean) => any;
|
|
13
|
+
"update:modelValue": (value: StPickerValue | StPickerRangeValue) => any;
|
|
14
|
+
}, string, import('vue').PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
|
|
15
|
+
onClear?: () => any;
|
|
16
|
+
onChange?: (value: string | Date | [string | Date, string | Date]) => any;
|
|
17
|
+
onVisibleChange?: (visible: boolean) => any;
|
|
18
|
+
"onUpdate:modelValue"?: (value: StPickerValue | StPickerRangeValue) => any;
|
|
19
|
+
}>, {
|
|
20
|
+
size: StSize;
|
|
21
|
+
footer: boolean;
|
|
22
|
+
icon: string;
|
|
23
|
+
range: boolean;
|
|
24
|
+
separator: string;
|
|
25
|
+
disabled: boolean;
|
|
26
|
+
placeholder: string;
|
|
27
|
+
date: Date | null;
|
|
28
|
+
clearable: boolean;
|
|
29
|
+
format: string;
|
|
30
|
+
showClear: boolean;
|
|
31
|
+
shortcuts: import('../index.ts').StPickerShortcut[];
|
|
32
|
+
valueFormat: string;
|
|
33
|
+
startPlaceholder: string;
|
|
34
|
+
endPlaceholder: string;
|
|
35
|
+
closeOnSelect: boolean;
|
|
36
|
+
showHour: boolean;
|
|
37
|
+
showMinute: boolean;
|
|
38
|
+
showSecond: boolean;
|
|
39
|
+
hourStep: number;
|
|
40
|
+
minuteStep: number;
|
|
41
|
+
secondStep: number;
|
|
42
|
+
minTime: string | null;
|
|
43
|
+
maxTime: string | null;
|
|
44
|
+
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
|
|
45
|
+
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
46
|
+
declare const _default: typeof __VLS_export;
|
|
47
|
+
export default _default;
|
|
48
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
49
|
+
new (): {
|
|
50
|
+
$slots: S;
|
|
51
|
+
};
|
|
52
|
+
};
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import { StTimePickerPanelExpose, StTimePickerPanelProps, StTimePickerPanelSlots } from './types/st-time-picker-panel.d.ts';
|
|
2
|
+
import { StPickerShortcut, StPickerTimeParts } from '../types/st-picker-shared.d.ts';
|
|
3
|
+
type __VLS_Slots = StTimePickerPanelSlots;
|
|
4
|
+
declare const __VLS_base: import('vue').DefineComponent<StTimePickerPanelProps, StTimePickerPanelExpose, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
5
|
+
clear: () => any;
|
|
6
|
+
select: (parts: StPickerTimeParts) => any;
|
|
7
|
+
confirm: () => any;
|
|
8
|
+
selectRange: (range: [StPickerTimeParts, StPickerTimeParts]) => any;
|
|
9
|
+
}, string, import('vue').PublicProps, Readonly<StTimePickerPanelProps> & Readonly<{
|
|
10
|
+
onClear?: () => any;
|
|
11
|
+
onSelect?: (parts: StPickerTimeParts) => any;
|
|
12
|
+
onConfirm?: () => any;
|
|
13
|
+
onSelectRange?: (range: [StPickerTimeParts, StPickerTimeParts]) => any;
|
|
14
|
+
}>, {
|
|
15
|
+
size: import('../index.ts').StPickerTimeSize;
|
|
16
|
+
value: StPickerTimeParts | null;
|
|
17
|
+
footer: boolean;
|
|
18
|
+
range: boolean;
|
|
19
|
+
disabled: boolean;
|
|
20
|
+
date: Date | null;
|
|
21
|
+
confirmText: string;
|
|
22
|
+
showClear: boolean;
|
|
23
|
+
clearText: string;
|
|
24
|
+
shortcuts: StPickerShortcut[];
|
|
25
|
+
rangeValue: [StPickerTimeParts | null, StPickerTimeParts | null];
|
|
26
|
+
showHour: boolean;
|
|
27
|
+
showMinute: boolean;
|
|
28
|
+
showSecond: boolean;
|
|
29
|
+
hourStep: number;
|
|
30
|
+
minuteStep: number;
|
|
31
|
+
secondStep: number;
|
|
32
|
+
minTime: string | null;
|
|
33
|
+
maxTime: string | null;
|
|
34
|
+
startText: string;
|
|
35
|
+
endText: string;
|
|
36
|
+
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
|
|
37
|
+
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
38
|
+
declare const _default: typeof __VLS_export;
|
|
39
|
+
export default _default;
|
|
40
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
41
|
+
new (): {
|
|
42
|
+
$slots: S;
|
|
43
|
+
};
|
|
44
|
+
};
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
export * from './st-date-picker-panel.d.ts';
|
|
2
|
+
export * from './st-date-picker-desktop.d.ts';
|
|
3
|
+
export * from './st-time-picker-panel.d.ts';
|
|
4
|
+
export * from './st-time-picker-desktop.d.ts';
|
|
5
|
+
export * from './st-datetime-picker-panel.d.ts';
|
|
6
|
+
export * from './st-datetime-picker-desktop.d.ts';
|
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
import type { ClassValue, StyleValue, VNodeChild } from 'vue';
|
|
2
|
+
import type { StSize } from '../../../types/size.d.ts';
|
|
3
|
+
import type {
|
|
4
|
+
StPickerClassNames,
|
|
5
|
+
StPickerDateConstraintProps,
|
|
6
|
+
StPickerRangeValue,
|
|
7
|
+
StPickerShortcut,
|
|
8
|
+
StPickerValue,
|
|
9
|
+
} from '../../types/st-picker-shared.d.ts';
|
|
10
|
+
|
|
11
|
+
/** StDatePickerDesktop 桌面端属性 */
|
|
12
|
+
export interface StDatePickerDesktopProps extends StPickerDateConstraintProps, StPickerClassNames {
|
|
13
|
+
/** 区间模式 */
|
|
14
|
+
range?: boolean;
|
|
15
|
+
/** 触发器尺寸 */
|
|
16
|
+
size?: StSize;
|
|
17
|
+
/** 触发器后缀图标类名 */
|
|
18
|
+
icon?: string;
|
|
19
|
+
/** 是否禁用 */
|
|
20
|
+
disabled?: boolean;
|
|
21
|
+
/** 是否可清空 */
|
|
22
|
+
clearable?: boolean;
|
|
23
|
+
/** 显示格式 */
|
|
24
|
+
format?: string;
|
|
25
|
+
/** 绑定值格式,缺省时回吐 Date */
|
|
26
|
+
valueFormat?: string;
|
|
27
|
+
/** 区间两端连接符 */
|
|
28
|
+
separator?: string;
|
|
29
|
+
/** 单点占位文本 */
|
|
30
|
+
placeholder?: string;
|
|
31
|
+
/** 区间开始端占位文本 */
|
|
32
|
+
startPlaceholder?: string;
|
|
33
|
+
/** 区间结束端占位文本 */
|
|
34
|
+
endPlaceholder?: string;
|
|
35
|
+
/** 日期格小圆点标记 */
|
|
36
|
+
marks?: ((date: Date) => boolean) | Date[];
|
|
37
|
+
/** 快捷预设 */
|
|
38
|
+
shortcuts?: StPickerShortcut[];
|
|
39
|
+
/** 是否显示面板底部工具条 */
|
|
40
|
+
showFooter?: boolean;
|
|
41
|
+
/** 面板底部是否显示清除 */
|
|
42
|
+
showClear?: boolean;
|
|
43
|
+
/** 面板底部是否显示今天直达 */
|
|
44
|
+
showTodayLink?: boolean;
|
|
45
|
+
/** 选择完成后是否自动收起浮层 */
|
|
46
|
+
closeOnSelect?: boolean;
|
|
47
|
+
/** 浮层容器类名 */
|
|
48
|
+
popoverClass?: ClassValue;
|
|
49
|
+
/** 浮层容器样式 */
|
|
50
|
+
popoverStyle?: StyleValue;
|
|
51
|
+
/** 触发器类名 */
|
|
52
|
+
triggerClass?: ClassValue;
|
|
53
|
+
/** 触发器样式 */
|
|
54
|
+
triggerStyle?: StyleValue;
|
|
55
|
+
/** 类名 */
|
|
56
|
+
class?: ClassValue;
|
|
57
|
+
/** 样式 */
|
|
58
|
+
style?: StyleValue;
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
/** StDatePickerDesktop 事件 */
|
|
62
|
+
export interface StDatePickerDesktopEmits {
|
|
63
|
+
/** 绑定值改变 */
|
|
64
|
+
change: [value: StPickerValue | StPickerRangeValue | null];
|
|
65
|
+
/** 清空 */
|
|
66
|
+
clear: [];
|
|
67
|
+
/** 浮层显隐改变 */
|
|
68
|
+
visibleChange: [visible: boolean];
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
/** StDatePickerDesktop 插槽 */
|
|
72
|
+
export interface StDatePickerDesktopSlots {
|
|
73
|
+
/** 触发器前缀 */
|
|
74
|
+
prefix?: () => VNodeChild;
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
/** StDatePickerDesktop 暴露方法 */
|
|
78
|
+
export interface StDatePickerDesktopExpose {
|
|
79
|
+
/** 聚焦触发器 */
|
|
80
|
+
focus: () => void;
|
|
81
|
+
/** 失焦触发器 */
|
|
82
|
+
blur: () => void;
|
|
83
|
+
/** 清空 */
|
|
84
|
+
clear: () => void;
|
|
85
|
+
/** 打开浮层 */
|
|
86
|
+
open: () => void;
|
|
87
|
+
/** 收起浮层 */
|
|
88
|
+
close: () => void;
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
export {};
|