@cyberpunk-vue/components 1.13.5 → 1.13.7

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.
Files changed (31) hide show
  1. package/dist/date-picker/index.d.ts +824 -0
  2. package/dist/date-picker/src/base-picker.vue.d.ts +376 -0
  3. package/dist/date-picker/src/date-picker-select.d.ts +657 -0
  4. package/dist/date-picker/src/date-picker-select.vue.d.ts +349 -0
  5. package/dist/date-picker/src/date-picker.d.ts +154 -0
  6. package/dist/date-picker/src/date-picker.vue.d.ts +149 -0
  7. package/dist/date-picker/src/date-utils.d.ts +28 -0
  8. package/dist/date-picker/src/instance.d.ts +2 -0
  9. package/dist/date-picker/src/picker.d.ts +1 -0
  10. package/dist/date-picker/src/select-instance.d.ts +2 -0
  11. package/dist/date-time-picker/index.d.ts +586 -0
  12. package/dist/date-time-picker/src/date-time-picker.d.ts +179 -0
  13. package/dist/date-time-picker/src/date-time-picker.vue.d.ts +349 -0
  14. package/dist/date-time-picker/src/instance.d.ts +2 -0
  15. package/dist/dialog/index.d.ts +15 -0
  16. package/dist/dialog/src/dialog.d.ts +24 -0
  17. package/dist/dialog/src/dialog.vue.d.ts +9 -0
  18. package/dist/index.cjs +1 -1
  19. package/dist/index.d.ts +3 -0
  20. package/dist/index.mjs +4460 -2687
  21. package/dist/table/index.d.ts +61 -5
  22. package/dist/table/src/table.d.ts +87 -2
  23. package/dist/table/src/table.vue.d.ts +36 -3
  24. package/dist/table-column/index.d.ts +51 -6
  25. package/dist/table-column/src/table-column.d.ts +39 -1
  26. package/dist/table-column/src/table-column.vue.d.ts +30 -3
  27. package/dist/time-picker/index.d.ts +583 -0
  28. package/dist/time-picker/src/instance.d.ts +2 -0
  29. package/dist/time-picker/src/time-picker.d.ts +178 -0
  30. package/dist/time-picker/src/time-picker.vue.d.ts +346 -0
  31. package/package.json +5 -4
@@ -0,0 +1,349 @@
1
+ declare function __VLS_template(): {
2
+ attrs: Partial<{}>;
3
+ slots: {
4
+ prefix?(_: {}): any;
5
+ suffix?(_: {}): any;
6
+ cell?(_: {
7
+ cell: import('./date-picker-select').PickerCell;
8
+ }): any;
9
+ footer?(_: {
10
+ confirm: (false & (() => void)) | (true & (() => void));
11
+ cancel: () => void;
12
+ clear: (event?: MouseEvent) => void;
13
+ }): any;
14
+ };
15
+ refs: {};
16
+ rootEl: HTMLDivElement;
17
+ };
18
+ type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
19
+ declare const __VLS_component: import('vue').DefineComponent<import('vue').ExtractPropTypes<{
20
+ readonly modelValue: {
21
+ readonly type: import('vue').PropType<import('./date-picker-select').PickerModelValue>;
22
+ readonly default: null;
23
+ };
24
+ readonly type: {
25
+ readonly type: import('vue').PropType<import('./date-picker-select').PickerType>;
26
+ readonly default: "date";
27
+ };
28
+ readonly format: {
29
+ readonly type: StringConstructor;
30
+ readonly default: "";
31
+ };
32
+ readonly valueFormat: {
33
+ readonly type: StringConstructor;
34
+ readonly default: "";
35
+ };
36
+ readonly placeholder: {
37
+ readonly type: StringConstructor;
38
+ readonly default: "";
39
+ };
40
+ readonly startPlaceholder: {
41
+ readonly type: StringConstructor;
42
+ readonly default: "开始";
43
+ };
44
+ readonly endPlaceholder: {
45
+ readonly type: StringConstructor;
46
+ readonly default: "结束";
47
+ };
48
+ readonly rangeSeparator: {
49
+ readonly type: StringConstructor;
50
+ readonly default: " - ";
51
+ };
52
+ readonly disabled: {
53
+ readonly type: BooleanConstructor;
54
+ readonly default: false;
55
+ };
56
+ readonly readonly: {
57
+ readonly type: BooleanConstructor;
58
+ readonly default: false;
59
+ };
60
+ readonly editable: {
61
+ readonly type: BooleanConstructor;
62
+ readonly default: false;
63
+ };
64
+ readonly clearable: {
65
+ readonly type: BooleanConstructor;
66
+ readonly default: true;
67
+ };
68
+ readonly confirm: {
69
+ readonly type: import('vue').PropType<boolean | undefined>;
70
+ readonly default: undefined;
71
+ };
72
+ readonly size: {
73
+ readonly type: import('vue').PropType<import('./date-picker-select').PickerSize>;
74
+ readonly default: "md";
75
+ };
76
+ readonly shape: {
77
+ readonly type: import('vue').PropType<import('./date-picker-select').PickerShape>;
78
+ readonly default: "clip";
79
+ };
80
+ readonly variant: {
81
+ readonly type: import('vue').PropType<import('./date-picker-select').PickerVariant>;
82
+ readonly default: "outline";
83
+ };
84
+ readonly color: {
85
+ readonly type: StringConstructor;
86
+ readonly default: "";
87
+ };
88
+ readonly inactiveColor: {
89
+ readonly type: StringConstructor;
90
+ readonly default: "";
91
+ };
92
+ readonly placeholderColor: {
93
+ readonly type: StringConstructor;
94
+ readonly default: "";
95
+ };
96
+ readonly width: {
97
+ readonly type: import('vue').PropType<string | number>;
98
+ readonly default: "";
99
+ };
100
+ readonly placement: {
101
+ readonly type: import('vue').PropType<import('@floating-ui/dom').Placement>;
102
+ readonly default: "bottom-start";
103
+ };
104
+ readonly teleportTo: {
105
+ readonly type: import('vue').PropType<string | HTMLElement>;
106
+ readonly default: "body";
107
+ };
108
+ readonly disabledDate: {
109
+ readonly type: import('vue').PropType<(date: Date) => boolean>;
110
+ readonly default: undefined;
111
+ };
112
+ readonly disabledHours: {
113
+ readonly type: import('vue').PropType<import('./date-picker-select').DisabledTimeResolver>;
114
+ readonly default: undefined;
115
+ };
116
+ readonly disabledMinutes: {
117
+ readonly type: import('vue').PropType<import('./date-picker-select').DisabledTimeResolver>;
118
+ readonly default: undefined;
119
+ };
120
+ readonly disabledSeconds: {
121
+ readonly type: import('vue').PropType<import('./date-picker-select').DisabledTimeResolver>;
122
+ readonly default: undefined;
123
+ };
124
+ readonly hourStep: {
125
+ readonly type: NumberConstructor;
126
+ readonly default: 1;
127
+ };
128
+ readonly minuteStep: {
129
+ readonly type: NumberConstructor;
130
+ readonly default: 1;
131
+ };
132
+ readonly secondStep: {
133
+ readonly type: NumberConstructor;
134
+ readonly default: 1;
135
+ };
136
+ readonly showSeconds: {
137
+ readonly type: BooleanConstructor;
138
+ readonly default: true;
139
+ };
140
+ readonly shortcuts: {
141
+ readonly type: import('vue').PropType<import('./date-picker-select').PickerShortcut[]>;
142
+ readonly default: () => never[];
143
+ };
144
+ readonly defaultValue: {
145
+ readonly type: import('vue').PropType<import('./date-picker-select').PickerValueItem>;
146
+ readonly default: undefined;
147
+ };
148
+ readonly defaultTime: {
149
+ readonly type: import('vue').PropType<string | [string, string]>;
150
+ readonly default: undefined;
151
+ };
152
+ readonly unlinkPanels: {
153
+ readonly type: BooleanConstructor;
154
+ readonly default: false;
155
+ };
156
+ }>, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
157
+ clear: () => void;
158
+ blur: (event?: FocusEvent | undefined) => void;
159
+ change: (_value: import('./date-picker-select').PickerModelValue) => void;
160
+ "update:modelValue": (_value: import('./date-picker-select').PickerModelValue) => void;
161
+ focus: (event?: FocusEvent | undefined) => void;
162
+ visibleChange: (visible: boolean) => void;
163
+ }, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<{
164
+ readonly modelValue: {
165
+ readonly type: import('vue').PropType<import('./date-picker-select').PickerModelValue>;
166
+ readonly default: null;
167
+ };
168
+ readonly type: {
169
+ readonly type: import('vue').PropType<import('./date-picker-select').PickerType>;
170
+ readonly default: "date";
171
+ };
172
+ readonly format: {
173
+ readonly type: StringConstructor;
174
+ readonly default: "";
175
+ };
176
+ readonly valueFormat: {
177
+ readonly type: StringConstructor;
178
+ readonly default: "";
179
+ };
180
+ readonly placeholder: {
181
+ readonly type: StringConstructor;
182
+ readonly default: "";
183
+ };
184
+ readonly startPlaceholder: {
185
+ readonly type: StringConstructor;
186
+ readonly default: "开始";
187
+ };
188
+ readonly endPlaceholder: {
189
+ readonly type: StringConstructor;
190
+ readonly default: "结束";
191
+ };
192
+ readonly rangeSeparator: {
193
+ readonly type: StringConstructor;
194
+ readonly default: " - ";
195
+ };
196
+ readonly disabled: {
197
+ readonly type: BooleanConstructor;
198
+ readonly default: false;
199
+ };
200
+ readonly readonly: {
201
+ readonly type: BooleanConstructor;
202
+ readonly default: false;
203
+ };
204
+ readonly editable: {
205
+ readonly type: BooleanConstructor;
206
+ readonly default: false;
207
+ };
208
+ readonly clearable: {
209
+ readonly type: BooleanConstructor;
210
+ readonly default: true;
211
+ };
212
+ readonly confirm: {
213
+ readonly type: import('vue').PropType<boolean | undefined>;
214
+ readonly default: undefined;
215
+ };
216
+ readonly size: {
217
+ readonly type: import('vue').PropType<import('./date-picker-select').PickerSize>;
218
+ readonly default: "md";
219
+ };
220
+ readonly shape: {
221
+ readonly type: import('vue').PropType<import('./date-picker-select').PickerShape>;
222
+ readonly default: "clip";
223
+ };
224
+ readonly variant: {
225
+ readonly type: import('vue').PropType<import('./date-picker-select').PickerVariant>;
226
+ readonly default: "outline";
227
+ };
228
+ readonly color: {
229
+ readonly type: StringConstructor;
230
+ readonly default: "";
231
+ };
232
+ readonly inactiveColor: {
233
+ readonly type: StringConstructor;
234
+ readonly default: "";
235
+ };
236
+ readonly placeholderColor: {
237
+ readonly type: StringConstructor;
238
+ readonly default: "";
239
+ };
240
+ readonly width: {
241
+ readonly type: import('vue').PropType<string | number>;
242
+ readonly default: "";
243
+ };
244
+ readonly placement: {
245
+ readonly type: import('vue').PropType<import('@floating-ui/dom').Placement>;
246
+ readonly default: "bottom-start";
247
+ };
248
+ readonly teleportTo: {
249
+ readonly type: import('vue').PropType<string | HTMLElement>;
250
+ readonly default: "body";
251
+ };
252
+ readonly disabledDate: {
253
+ readonly type: import('vue').PropType<(date: Date) => boolean>;
254
+ readonly default: undefined;
255
+ };
256
+ readonly disabledHours: {
257
+ readonly type: import('vue').PropType<import('./date-picker-select').DisabledTimeResolver>;
258
+ readonly default: undefined;
259
+ };
260
+ readonly disabledMinutes: {
261
+ readonly type: import('vue').PropType<import('./date-picker-select').DisabledTimeResolver>;
262
+ readonly default: undefined;
263
+ };
264
+ readonly disabledSeconds: {
265
+ readonly type: import('vue').PropType<import('./date-picker-select').DisabledTimeResolver>;
266
+ readonly default: undefined;
267
+ };
268
+ readonly hourStep: {
269
+ readonly type: NumberConstructor;
270
+ readonly default: 1;
271
+ };
272
+ readonly minuteStep: {
273
+ readonly type: NumberConstructor;
274
+ readonly default: 1;
275
+ };
276
+ readonly secondStep: {
277
+ readonly type: NumberConstructor;
278
+ readonly default: 1;
279
+ };
280
+ readonly showSeconds: {
281
+ readonly type: BooleanConstructor;
282
+ readonly default: true;
283
+ };
284
+ readonly shortcuts: {
285
+ readonly type: import('vue').PropType<import('./date-picker-select').PickerShortcut[]>;
286
+ readonly default: () => never[];
287
+ };
288
+ readonly defaultValue: {
289
+ readonly type: import('vue').PropType<import('./date-picker-select').PickerValueItem>;
290
+ readonly default: undefined;
291
+ };
292
+ readonly defaultTime: {
293
+ readonly type: import('vue').PropType<string | [string, string]>;
294
+ readonly default: undefined;
295
+ };
296
+ readonly unlinkPanels: {
297
+ readonly type: BooleanConstructor;
298
+ readonly default: false;
299
+ };
300
+ }>> & Readonly<{
301
+ onClear?: (() => any) | undefined;
302
+ onBlur?: ((event?: FocusEvent | undefined) => any) | undefined;
303
+ onChange?: ((_value: import('./date-picker-select').PickerModelValue) => any) | undefined;
304
+ "onUpdate:modelValue"?: ((_value: import('./date-picker-select').PickerModelValue) => any) | undefined;
305
+ onFocus?: ((event?: FocusEvent | undefined) => any) | undefined;
306
+ onVisibleChange?: ((visible: boolean) => any) | undefined;
307
+ }>, {
308
+ readonly size: import('@cyberpunk-vue/hooks').Size;
309
+ readonly width: string | number;
310
+ readonly format: string;
311
+ readonly type: import('./date-picker-select').PickerType;
312
+ readonly color: string;
313
+ readonly variant: import('./date-picker-select').PickerVariant;
314
+ readonly disabled: boolean;
315
+ readonly shape: import('./date-picker-select').PickerShape;
316
+ readonly placeholder: string;
317
+ readonly modelValue: import('./date-picker-select').PickerModelValue;
318
+ readonly readonly: boolean;
319
+ readonly clearable: boolean;
320
+ readonly placeholderColor: string;
321
+ readonly inactiveColor: string;
322
+ readonly teleportTo: string | HTMLElement;
323
+ readonly placement: import('@floating-ui/dom').Placement;
324
+ readonly confirm: boolean | undefined;
325
+ readonly valueFormat: string;
326
+ readonly defaultValue: import('./date-picker-select').PickerValueItem;
327
+ readonly disabledDate: (date: Date) => boolean;
328
+ readonly startPlaceholder: string;
329
+ readonly endPlaceholder: string;
330
+ readonly rangeSeparator: string;
331
+ readonly editable: boolean;
332
+ readonly disabledHours: import('./date-picker-select').DisabledTimeResolver;
333
+ readonly disabledMinutes: import('./date-picker-select').DisabledTimeResolver;
334
+ readonly disabledSeconds: import('./date-picker-select').DisabledTimeResolver;
335
+ readonly hourStep: number;
336
+ readonly minuteStep: number;
337
+ readonly secondStep: number;
338
+ readonly showSeconds: boolean;
339
+ readonly shortcuts: import('./date-picker-select').PickerShortcut[];
340
+ readonly defaultTime: string | [string, string];
341
+ readonly unlinkPanels: boolean;
342
+ }, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, HTMLDivElement>;
343
+ declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
344
+ export default _default;
345
+ type __VLS_WithTemplateSlots<T, S> = T & {
346
+ new (): {
347
+ $slots: S;
348
+ };
349
+ };
@@ -0,0 +1,154 @@
1
+ import { ExtractPropTypes, PropType } from 'vue';
2
+ export type DatePickerValue = string | number | Date | null | undefined;
3
+ export type DatePickerViewMode = 'day' | 'month' | 'year';
4
+ export interface DatePickerDayCell {
5
+ /** 单元格日期 */
6
+ date: Date;
7
+ /** 展示数字 */
8
+ label: string;
9
+ /** 是否属于当前月份 */
10
+ currentMonth: boolean;
11
+ /** 是否为今天 */
12
+ today: boolean;
13
+ /** 是否选中 */
14
+ selected: boolean;
15
+ /** 是否禁用 */
16
+ disabled: boolean;
17
+ }
18
+ /**
19
+ * CpDatePicker 组件 Props 定义
20
+ *
21
+ * @description 赛博朋克风格日期面板。参考 Vuetify DatePicker 的 header / controls / month grid 分层,年份选择置于左侧,月份置于右侧,更符合中文日期选择习惯。
22
+ *
23
+ * @example
24
+ * ```vue
25
+ * <CpDatePicker v-model="date" value-format="YYYY-MM-DD" show-adjacent-months />
26
+ * ```
27
+ *
28
+ * @slots
29
+ * - `day` - 自定义日期单元格内容
30
+ * - `header` - 自定义顶部标题区
31
+ * - `actions` - 自定义底部操作区
32
+ *
33
+ * @exposes
34
+ * - `goToday` - 跳转并选中今天
35
+ * - `setViewDate` - 设置当前展示年月
36
+ * @category 表单组件
37
+ * @displayName CpDatePicker 日期面板
38
+ */
39
+ export declare const datePickerProps: {
40
+ /**
41
+ * 绑定值 (v-model)
42
+ * @default null
43
+ */
44
+ readonly modelValue: {
45
+ readonly type: PropType<DatePickerValue>;
46
+ readonly default: null;
47
+ };
48
+ /**
49
+ * 输出值格式。为空时输出 Date;传入 `timestamp` 时输出时间戳。
50
+ * @default ''
51
+ */
52
+ readonly valueFormat: {
53
+ readonly type: StringConstructor;
54
+ readonly default: "";
55
+ };
56
+ /**
57
+ * 标题文本
58
+ * @default '选择日期'
59
+ */
60
+ readonly title: {
61
+ readonly type: StringConstructor;
62
+ readonly default: "选择日期";
63
+ };
64
+ /**
65
+ * 是否显示相邻月份日期
66
+ * @default true
67
+ */
68
+ readonly showAdjacentMonths: {
69
+ readonly type: BooleanConstructor;
70
+ readonly default: true;
71
+ };
72
+ /**
73
+ * 初始视图模式
74
+ * @default 'day'
75
+ */
76
+ readonly viewMode: {
77
+ readonly type: PropType<DatePickerViewMode>;
78
+ readonly default: "day";
79
+ };
80
+ /**
81
+ * 默认展示日期
82
+ * @default undefined
83
+ */
84
+ readonly defaultValue: {
85
+ readonly type: PropType<Exclude<DatePickerValue, null | undefined>>;
86
+ readonly default: undefined;
87
+ };
88
+ /**
89
+ * 最小可选日期
90
+ * @default undefined
91
+ */
92
+ readonly min: {
93
+ readonly type: PropType<Exclude<DatePickerValue, null | undefined>>;
94
+ readonly default: undefined;
95
+ };
96
+ /**
97
+ * 最大可选日期
98
+ * @default undefined
99
+ */
100
+ readonly max: {
101
+ readonly type: PropType<Exclude<DatePickerValue, null | undefined>>;
102
+ readonly default: undefined;
103
+ };
104
+ /**
105
+ * 禁用日期判断函数
106
+ */
107
+ readonly disabledDate: {
108
+ readonly type: PropType<(date: Date) => boolean>;
109
+ readonly default: undefined;
110
+ };
111
+ /**
112
+ * 自定义主题色
113
+ * @default ''
114
+ */
115
+ readonly color: {
116
+ readonly type: StringConstructor;
117
+ readonly default: "";
118
+ };
119
+ /**
120
+ * 是否禁用整个面板
121
+ * @default false
122
+ */
123
+ readonly disabled: {
124
+ readonly type: BooleanConstructor;
125
+ readonly default: false;
126
+ };
127
+ };
128
+ export type DatePickerProps = ExtractPropTypes<typeof datePickerProps>;
129
+ /**
130
+ * CpDatePicker 组件事件定义
131
+ */
132
+ export declare const datePickerEmits: {
133
+ /**
134
+ * v-model 更新事件
135
+ */
136
+ 'update:modelValue': (_value: DatePickerValue) => boolean;
137
+ /**
138
+ * 值变化事件
139
+ */
140
+ change: (_value: DatePickerValue) => boolean;
141
+ /**
142
+ * 展示月份变化事件
143
+ */
144
+ 'update:month': (month: number) => boolean;
145
+ /**
146
+ * 展示年份变化事件
147
+ */
148
+ 'update:year': (year: number) => boolean;
149
+ /**
150
+ * 视图模式变化事件
151
+ */
152
+ 'update:viewMode': (mode: DatePickerViewMode) => boolean;
153
+ };
154
+ export type DatePickerEmits = typeof datePickerEmits;
@@ -0,0 +1,149 @@
1
+ import { DatePickerDayCell, DatePickerViewMode, DatePickerValue } from './date-picker';
2
+ import { Dayjs } from './date-utils';
3
+ declare function setViewDate(date: Dayjs): void;
4
+ declare function goToday(): void;
5
+ declare function __VLS_template(): {
6
+ attrs: Partial<{}>;
7
+ slots: {
8
+ header?(_: {
9
+ selected: Date | undefined;
10
+ viewDate: Date;
11
+ }): any;
12
+ day?(_: {
13
+ cell: DatePickerDayCell;
14
+ }): any;
15
+ actions?(_: {
16
+ today: typeof goToday;
17
+ }): any;
18
+ };
19
+ refs: {};
20
+ rootEl: HTMLElement;
21
+ };
22
+ type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
23
+ declare const __VLS_component: import('vue').DefineComponent<import('vue').ExtractPropTypes<{
24
+ readonly modelValue: {
25
+ readonly type: import('vue').PropType<DatePickerValue>;
26
+ readonly default: null;
27
+ };
28
+ readonly valueFormat: {
29
+ readonly type: StringConstructor;
30
+ readonly default: "";
31
+ };
32
+ readonly title: {
33
+ readonly type: StringConstructor;
34
+ readonly default: "选择日期";
35
+ };
36
+ readonly showAdjacentMonths: {
37
+ readonly type: BooleanConstructor;
38
+ readonly default: true;
39
+ };
40
+ readonly viewMode: {
41
+ readonly type: import('vue').PropType<DatePickerViewMode>;
42
+ readonly default: "day";
43
+ };
44
+ readonly defaultValue: {
45
+ readonly type: import('vue').PropType<Exclude<DatePickerValue, null | undefined>>;
46
+ readonly default: undefined;
47
+ };
48
+ readonly min: {
49
+ readonly type: import('vue').PropType<Exclude<DatePickerValue, null | undefined>>;
50
+ readonly default: undefined;
51
+ };
52
+ readonly max: {
53
+ readonly type: import('vue').PropType<Exclude<DatePickerValue, null | undefined>>;
54
+ readonly default: undefined;
55
+ };
56
+ readonly disabledDate: {
57
+ readonly type: import('vue').PropType<(date: Date) => boolean>;
58
+ readonly default: undefined;
59
+ };
60
+ readonly color: {
61
+ readonly type: StringConstructor;
62
+ readonly default: "";
63
+ };
64
+ readonly disabled: {
65
+ readonly type: BooleanConstructor;
66
+ readonly default: false;
67
+ };
68
+ }>, {
69
+ /** @description 跳转并选中今天 */
70
+ goToday: typeof goToday;
71
+ /** @description 设置当前展示年月 */
72
+ setViewDate: typeof setViewDate;
73
+ }, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
74
+ change: (_value: DatePickerValue) => void;
75
+ "update:modelValue": (_value: DatePickerValue) => void;
76
+ "update:month": (month: number) => void;
77
+ "update:year": (year: number) => void;
78
+ "update:viewMode": (mode: DatePickerViewMode) => void;
79
+ }, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<{
80
+ readonly modelValue: {
81
+ readonly type: import('vue').PropType<DatePickerValue>;
82
+ readonly default: null;
83
+ };
84
+ readonly valueFormat: {
85
+ readonly type: StringConstructor;
86
+ readonly default: "";
87
+ };
88
+ readonly title: {
89
+ readonly type: StringConstructor;
90
+ readonly default: "选择日期";
91
+ };
92
+ readonly showAdjacentMonths: {
93
+ readonly type: BooleanConstructor;
94
+ readonly default: true;
95
+ };
96
+ readonly viewMode: {
97
+ readonly type: import('vue').PropType<DatePickerViewMode>;
98
+ readonly default: "day";
99
+ };
100
+ readonly defaultValue: {
101
+ readonly type: import('vue').PropType<Exclude<DatePickerValue, null | undefined>>;
102
+ readonly default: undefined;
103
+ };
104
+ readonly min: {
105
+ readonly type: import('vue').PropType<Exclude<DatePickerValue, null | undefined>>;
106
+ readonly default: undefined;
107
+ };
108
+ readonly max: {
109
+ readonly type: import('vue').PropType<Exclude<DatePickerValue, null | undefined>>;
110
+ readonly default: undefined;
111
+ };
112
+ readonly disabledDate: {
113
+ readonly type: import('vue').PropType<(date: Date) => boolean>;
114
+ readonly default: undefined;
115
+ };
116
+ readonly color: {
117
+ readonly type: StringConstructor;
118
+ readonly default: "";
119
+ };
120
+ readonly disabled: {
121
+ readonly type: BooleanConstructor;
122
+ readonly default: false;
123
+ };
124
+ }>> & Readonly<{
125
+ onChange?: ((_value: DatePickerValue) => any) | undefined;
126
+ "onUpdate:modelValue"?: ((_value: DatePickerValue) => any) | undefined;
127
+ "onUpdate:month"?: ((month: number) => any) | undefined;
128
+ "onUpdate:year"?: ((year: number) => any) | undefined;
129
+ "onUpdate:viewMode"?: ((mode: DatePickerViewMode) => any) | undefined;
130
+ }>, {
131
+ readonly color: string;
132
+ readonly disabled: boolean;
133
+ readonly title: string;
134
+ readonly modelValue: DatePickerValue;
135
+ readonly min: string | number | Date;
136
+ readonly max: string | number | Date;
137
+ readonly valueFormat: string;
138
+ readonly showAdjacentMonths: boolean;
139
+ readonly viewMode: DatePickerViewMode;
140
+ readonly defaultValue: string | number | Date;
141
+ readonly disabledDate: (date: Date) => boolean;
142
+ }, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, HTMLElement>;
143
+ declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
144
+ export default _default;
145
+ type __VLS_WithTemplateSlots<T, S> = T & {
146
+ new (): {
147
+ $slots: S;
148
+ };
149
+ };
@@ -0,0 +1,28 @@
1
+ import { default as dayjs, Dayjs } from 'dayjs';
2
+ import { PickerModelValue, PickerType, PickerValueItem } from './picker';
3
+ export { dayjs };
4
+ export type { Dayjs };
5
+ export declare const DATE_FORMAT = "YYYY-MM-DD";
6
+ export declare const MONTH_FORMAT = "YYYY-MM";
7
+ export declare const YEAR_FORMAT = "YYYY";
8
+ export declare const TIME_FORMAT = "HH:mm:ss";
9
+ export declare const TIME_MINUTE_FORMAT = "HH:mm";
10
+ export declare const DATETIME_FORMAT = "YYYY-MM-DD HH:mm:ss";
11
+ export declare function isRangeType(type: PickerType): boolean;
12
+ export declare function isMultipleType(type: PickerType): boolean;
13
+ export declare function hasDatePanel(type: PickerType): boolean;
14
+ export declare function hasTimePanel(type: PickerType): boolean;
15
+ export declare function isMonthType(type: PickerType): boolean;
16
+ export declare function isYearType(type: PickerType): boolean;
17
+ export declare function getDefaultFormat(type: PickerType, showSeconds?: boolean): string;
18
+ export declare function toDayjs(value: PickerValueItem | null | undefined, format?: string, type?: PickerType): Dayjs | null;
19
+ export declare function normalizeModelValue(value: PickerModelValue, format: string | undefined, type: PickerType): Dayjs[];
20
+ export declare function applyTime(date: Dayjs, time: Dayjs): Dayjs;
21
+ export declare function parseTime(value: string | undefined, fallback?: Dayjs): Dayjs;
22
+ export declare function outputValue(date: Dayjs, valueFormat: string): PickerValueItem;
23
+ export declare function outputModelValue(dates: Dayjs[], type: PickerType, valueFormat: string): PickerModelValue;
24
+ export declare function isSameByType(a: Dayjs, b: Dayjs, type: PickerType): boolean;
25
+ export declare function isBetweenDay(date: Dayjs, start: Dayjs, end: Dayjs): boolean;
26
+ export declare function sortRange(dates: Dayjs[]): Dayjs[];
27
+ export declare function buildSteppedNumbers(max: number, step: number): number[];
28
+ export declare function padTime(value: number): string;
@@ -0,0 +1,2 @@
1
+ import { default as DatePicker } from './date-picker.vue';
2
+ export type DatePickerInstance = InstanceType<typeof DatePicker> & unknown;
@@ -0,0 +1 @@
1
+ export * from './date-picker-select';
@@ -0,0 +1,2 @@
1
+ import { default as DatePickerSelect } from './date-picker-select.vue';
2
+ export type DatePickerSelectInstance = InstanceType<typeof DatePickerSelect> & unknown;