@cyberpunk-vue/components 1.13.6 → 1.13.8

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.
@@ -1,9 +1,245 @@
1
1
  /**
2
2
  * CpDatePicker 日期选择器
3
3
  *
4
- * 支持日期、多日期、周、月、年以及范围选择,浮层使用自动定位。
4
+ * 可嵌入日期面板,年份置于左侧,月份置于右侧。
5
5
  */
6
6
  export declare const CpDatePicker: import('../utils').SFCWithInstall<{
7
+ new (...args: any[]): import('vue').CreateComponentPublicInstanceWithMixins<Readonly<import('vue').ExtractPropTypes<{
8
+ readonly modelValue: {
9
+ readonly type: import('vue').PropType<import('.').DatePickerValue>;
10
+ readonly default: null;
11
+ };
12
+ readonly valueFormat: {
13
+ readonly type: StringConstructor;
14
+ readonly default: "";
15
+ };
16
+ readonly title: {
17
+ readonly type: StringConstructor;
18
+ readonly default: "选择日期";
19
+ };
20
+ readonly showAdjacentMonths: {
21
+ readonly type: BooleanConstructor;
22
+ readonly default: true;
23
+ };
24
+ readonly viewMode: {
25
+ readonly type: import('vue').PropType<import('.').DatePickerViewMode>;
26
+ readonly default: "day";
27
+ };
28
+ readonly defaultValue: {
29
+ readonly type: import('vue').PropType<Exclude<import('.').DatePickerValue, null | undefined>>;
30
+ readonly default: undefined;
31
+ };
32
+ readonly min: {
33
+ readonly type: import('vue').PropType<Exclude<import('.').DatePickerValue, null | undefined>>;
34
+ readonly default: undefined;
35
+ };
36
+ readonly max: {
37
+ readonly type: import('vue').PropType<Exclude<import('.').DatePickerValue, null | undefined>>;
38
+ readonly default: undefined;
39
+ };
40
+ readonly disabledDate: {
41
+ readonly type: import('vue').PropType<(date: Date) => boolean>;
42
+ readonly default: undefined;
43
+ };
44
+ readonly color: {
45
+ readonly type: StringConstructor;
46
+ readonly default: "";
47
+ };
48
+ readonly disabled: {
49
+ readonly type: BooleanConstructor;
50
+ readonly default: false;
51
+ };
52
+ }>> & Readonly<{
53
+ onChange?: ((_value: import('.').DatePickerValue) => any) | undefined;
54
+ "onUpdate:modelValue"?: ((_value: import('.').DatePickerValue) => any) | undefined;
55
+ "onUpdate:month"?: ((month: number) => any) | undefined;
56
+ "onUpdate:year"?: ((year: number) => any) | undefined;
57
+ "onUpdate:viewMode"?: ((mode: import('.').DatePickerViewMode) => any) | undefined;
58
+ }>, {
59
+ goToday: () => void;
60
+ setViewDate: (date: import('dayjs').Dayjs) => void;
61
+ }, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
62
+ change: (_value: import('.').DatePickerValue) => void;
63
+ "update:modelValue": (_value: import('.').DatePickerValue) => void;
64
+ "update:month": (month: number) => void;
65
+ "update:year": (year: number) => void;
66
+ "update:viewMode": (mode: import('.').DatePickerViewMode) => void;
67
+ }, import('vue').PublicProps, {
68
+ readonly color: string;
69
+ readonly disabled: boolean;
70
+ readonly title: string;
71
+ readonly modelValue: import('.').DatePickerValue;
72
+ readonly min: string | number | Date;
73
+ readonly max: string | number | Date;
74
+ readonly valueFormat: string;
75
+ readonly showAdjacentMonths: boolean;
76
+ readonly viewMode: import('.').DatePickerViewMode;
77
+ readonly defaultValue: string | number | Date;
78
+ readonly disabledDate: (date: Date) => boolean;
79
+ }, true, {}, {}, import('vue').GlobalComponents, import('vue').GlobalDirectives, string, {}, HTMLElement, import('vue').ComponentProvideOptions, {
80
+ P: {};
81
+ B: {};
82
+ D: {};
83
+ C: {};
84
+ M: {};
85
+ Defaults: {};
86
+ }, Readonly<import('vue').ExtractPropTypes<{
87
+ readonly modelValue: {
88
+ readonly type: import('vue').PropType<import('.').DatePickerValue>;
89
+ readonly default: null;
90
+ };
91
+ readonly valueFormat: {
92
+ readonly type: StringConstructor;
93
+ readonly default: "";
94
+ };
95
+ readonly title: {
96
+ readonly type: StringConstructor;
97
+ readonly default: "选择日期";
98
+ };
99
+ readonly showAdjacentMonths: {
100
+ readonly type: BooleanConstructor;
101
+ readonly default: true;
102
+ };
103
+ readonly viewMode: {
104
+ readonly type: import('vue').PropType<import('.').DatePickerViewMode>;
105
+ readonly default: "day";
106
+ };
107
+ readonly defaultValue: {
108
+ readonly type: import('vue').PropType<Exclude<import('.').DatePickerValue, null | undefined>>;
109
+ readonly default: undefined;
110
+ };
111
+ readonly min: {
112
+ readonly type: import('vue').PropType<Exclude<import('.').DatePickerValue, null | undefined>>;
113
+ readonly default: undefined;
114
+ };
115
+ readonly max: {
116
+ readonly type: import('vue').PropType<Exclude<import('.').DatePickerValue, null | undefined>>;
117
+ readonly default: undefined;
118
+ };
119
+ readonly disabledDate: {
120
+ readonly type: import('vue').PropType<(date: Date) => boolean>;
121
+ readonly default: undefined;
122
+ };
123
+ readonly color: {
124
+ readonly type: StringConstructor;
125
+ readonly default: "";
126
+ };
127
+ readonly disabled: {
128
+ readonly type: BooleanConstructor;
129
+ readonly default: false;
130
+ };
131
+ }>> & Readonly<{
132
+ onChange?: ((_value: import('.').DatePickerValue) => any) | undefined;
133
+ "onUpdate:modelValue"?: ((_value: import('.').DatePickerValue) => any) | undefined;
134
+ "onUpdate:month"?: ((month: number) => any) | undefined;
135
+ "onUpdate:year"?: ((year: number) => any) | undefined;
136
+ "onUpdate:viewMode"?: ((mode: import('.').DatePickerViewMode) => any) | undefined;
137
+ }>, {
138
+ goToday: () => void;
139
+ setViewDate: (date: import('dayjs').Dayjs) => void;
140
+ }, {}, {}, {}, {
141
+ readonly color: string;
142
+ readonly disabled: boolean;
143
+ readonly title: string;
144
+ readonly modelValue: import('.').DatePickerValue;
145
+ readonly min: string | number | Date;
146
+ readonly max: string | number | Date;
147
+ readonly valueFormat: string;
148
+ readonly showAdjacentMonths: boolean;
149
+ readonly viewMode: import('.').DatePickerViewMode;
150
+ readonly defaultValue: string | number | Date;
151
+ readonly disabledDate: (date: Date) => boolean;
152
+ }>;
153
+ __isFragment?: never;
154
+ __isTeleport?: never;
155
+ __isSuspense?: never;
156
+ } & import('vue').ComponentOptionsBase<Readonly<import('vue').ExtractPropTypes<{
157
+ readonly modelValue: {
158
+ readonly type: import('vue').PropType<import('.').DatePickerValue>;
159
+ readonly default: null;
160
+ };
161
+ readonly valueFormat: {
162
+ readonly type: StringConstructor;
163
+ readonly default: "";
164
+ };
165
+ readonly title: {
166
+ readonly type: StringConstructor;
167
+ readonly default: "选择日期";
168
+ };
169
+ readonly showAdjacentMonths: {
170
+ readonly type: BooleanConstructor;
171
+ readonly default: true;
172
+ };
173
+ readonly viewMode: {
174
+ readonly type: import('vue').PropType<import('.').DatePickerViewMode>;
175
+ readonly default: "day";
176
+ };
177
+ readonly defaultValue: {
178
+ readonly type: import('vue').PropType<Exclude<import('.').DatePickerValue, null | undefined>>;
179
+ readonly default: undefined;
180
+ };
181
+ readonly min: {
182
+ readonly type: import('vue').PropType<Exclude<import('.').DatePickerValue, null | undefined>>;
183
+ readonly default: undefined;
184
+ };
185
+ readonly max: {
186
+ readonly type: import('vue').PropType<Exclude<import('.').DatePickerValue, null | undefined>>;
187
+ readonly default: undefined;
188
+ };
189
+ readonly disabledDate: {
190
+ readonly type: import('vue').PropType<(date: Date) => boolean>;
191
+ readonly default: undefined;
192
+ };
193
+ readonly color: {
194
+ readonly type: StringConstructor;
195
+ readonly default: "";
196
+ };
197
+ readonly disabled: {
198
+ readonly type: BooleanConstructor;
199
+ readonly default: false;
200
+ };
201
+ }>> & Readonly<{
202
+ onChange?: ((_value: import('.').DatePickerValue) => any) | undefined;
203
+ "onUpdate:modelValue"?: ((_value: import('.').DatePickerValue) => any) | undefined;
204
+ "onUpdate:month"?: ((month: number) => any) | undefined;
205
+ "onUpdate:year"?: ((year: number) => any) | undefined;
206
+ "onUpdate:viewMode"?: ((mode: import('.').DatePickerViewMode) => any) | undefined;
207
+ }>, {
208
+ goToday: () => void;
209
+ setViewDate: (date: import('dayjs').Dayjs) => void;
210
+ }, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
211
+ change: (_value: import('.').DatePickerValue) => void;
212
+ "update:modelValue": (_value: import('.').DatePickerValue) => void;
213
+ "update:month": (month: number) => void;
214
+ "update:year": (year: number) => void;
215
+ "update:viewMode": (mode: import('.').DatePickerViewMode) => void;
216
+ }, string, {
217
+ readonly color: string;
218
+ readonly disabled: boolean;
219
+ readonly title: string;
220
+ readonly modelValue: import('.').DatePickerValue;
221
+ readonly min: string | number | Date;
222
+ readonly max: string | number | Date;
223
+ readonly valueFormat: string;
224
+ readonly showAdjacentMonths: boolean;
225
+ readonly viewMode: import('.').DatePickerViewMode;
226
+ readonly defaultValue: string | number | Date;
227
+ readonly disabledDate: (date: Date) => boolean;
228
+ }, {}, string, {}, import('vue').GlobalComponents, import('vue').GlobalDirectives, string, import('vue').ComponentProvideOptions> & import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps & (new () => {
229
+ $slots: {
230
+ header?(_: {
231
+ selected: Date | undefined;
232
+ viewDate: Date;
233
+ }): any;
234
+ day?(_: {
235
+ cell: import('.').DatePickerDayCell;
236
+ }): any;
237
+ actions?(_: {
238
+ today: () => void;
239
+ }): any;
240
+ };
241
+ })>;
242
+ export declare const CpDatePickerSelect: import('../utils').SFCWithInstall<{
7
243
  new (...args: any[]): import('vue').CreateComponentPublicInstanceWithMixins<Readonly<import('vue').ExtractPropTypes<{
8
244
  readonly modelValue: {
9
245
  readonly type: import('vue').PropType<import('.').PickerModelValue>;
@@ -174,11 +410,12 @@ export declare const CpDatePicker: import('../utils').SFCWithInstall<{
174
410
  readonly placement: import('@floating-ui/dom').Placement;
175
411
  readonly confirm: boolean | undefined;
176
412
  readonly valueFormat: string;
413
+ readonly defaultValue: import('.').PickerValueItem;
414
+ readonly disabledDate: (date: Date) => boolean;
177
415
  readonly startPlaceholder: string;
178
416
  readonly endPlaceholder: string;
179
417
  readonly rangeSeparator: string;
180
418
  readonly editable: boolean;
181
- readonly disabledDate: (date: Date) => boolean;
182
419
  readonly disabledHours: import('.').DisabledTimeResolver;
183
420
  readonly disabledMinutes: import('.').DisabledTimeResolver;
184
421
  readonly disabledSeconds: import('.').DisabledTimeResolver;
@@ -187,7 +424,6 @@ export declare const CpDatePicker: import('../utils').SFCWithInstall<{
187
424
  readonly secondStep: number;
188
425
  readonly showSeconds: boolean;
189
426
  readonly shortcuts: import('.').PickerShortcut[];
190
- readonly defaultValue: import('.').PickerValueItem;
191
427
  readonly defaultTime: string | [string, string];
192
428
  readonly unlinkPanels: boolean;
193
429
  }, true, {}, {}, import('vue').GlobalComponents, import('vue').GlobalDirectives, string, {}, HTMLDivElement, import('vue').ComponentProvideOptions, {
@@ -360,11 +596,12 @@ export declare const CpDatePicker: import('../utils').SFCWithInstall<{
360
596
  readonly placement: import('@floating-ui/dom').Placement;
361
597
  readonly confirm: boolean | undefined;
362
598
  readonly valueFormat: string;
599
+ readonly defaultValue: import('.').PickerValueItem;
600
+ readonly disabledDate: (date: Date) => boolean;
363
601
  readonly startPlaceholder: string;
364
602
  readonly endPlaceholder: string;
365
603
  readonly rangeSeparator: string;
366
604
  readonly editable: boolean;
367
- readonly disabledDate: (date: Date) => boolean;
368
605
  readonly disabledHours: import('.').DisabledTimeResolver;
369
606
  readonly disabledMinutes: import('.').DisabledTimeResolver;
370
607
  readonly disabledSeconds: import('.').DisabledTimeResolver;
@@ -373,7 +610,6 @@ export declare const CpDatePicker: import('../utils').SFCWithInstall<{
373
610
  readonly secondStep: number;
374
611
  readonly showSeconds: boolean;
375
612
  readonly shortcuts: import('.').PickerShortcut[];
376
- readonly defaultValue: import('.').PickerValueItem;
377
613
  readonly defaultTime: string | [string, string];
378
614
  readonly unlinkPanels: boolean;
379
615
  }>;
@@ -550,11 +786,12 @@ export declare const CpDatePicker: import('../utils').SFCWithInstall<{
550
786
  readonly placement: import('@floating-ui/dom').Placement;
551
787
  readonly confirm: boolean | undefined;
552
788
  readonly valueFormat: string;
789
+ readonly defaultValue: import('.').PickerValueItem;
790
+ readonly disabledDate: (date: Date) => boolean;
553
791
  readonly startPlaceholder: string;
554
792
  readonly endPlaceholder: string;
555
793
  readonly rangeSeparator: string;
556
794
  readonly editable: boolean;
557
- readonly disabledDate: (date: Date) => boolean;
558
795
  readonly disabledHours: import('.').DisabledTimeResolver;
559
796
  readonly disabledMinutes: import('.').DisabledTimeResolver;
560
797
  readonly disabledSeconds: import('.').DisabledTimeResolver;
@@ -563,7 +800,6 @@ export declare const CpDatePicker: import('../utils').SFCWithInstall<{
563
800
  readonly secondStep: number;
564
801
  readonly showSeconds: boolean;
565
802
  readonly shortcuts: import('.').PickerShortcut[];
566
- readonly defaultValue: import('.').PickerValueItem;
567
803
  readonly defaultTime: string | [string, string];
568
804
  readonly unlinkPanels: boolean;
569
805
  }, {}, string, {}, import('vue').GlobalComponents, import('vue').GlobalDirectives, string, import('vue').ComponentProvideOptions> & import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps & (new () => {
@@ -581,5 +817,8 @@ export declare const CpDatePicker: import('../utils').SFCWithInstall<{
581
817
  };
582
818
  })>;
583
819
  export default CpDatePicker;
820
+ export * from './src/date-picker';
821
+ export * from './src/date-picker-select';
584
822
  export * from './src/picker';
585
823
  export type { DatePickerInstance } from './src/instance';
824
+ export type { DatePickerSelectInstance } from './src/select-instance';
@@ -82,15 +82,15 @@ declare const __VLS_component: import('vue').DefineComponent<import('vue').Extra
82
82
  readonly default: undefined;
83
83
  };
84
84
  readonly size: {
85
- readonly type: import('vue').PropType<import('./date-picker').PickerSize>;
85
+ readonly type: import('vue').PropType<import('./date-picker-select').PickerSize>;
86
86
  readonly default: "md";
87
87
  };
88
88
  readonly shape: {
89
- readonly type: import('vue').PropType<import('./date-picker').PickerShape>;
89
+ readonly type: import('vue').PropType<import('./date-picker-select').PickerShape>;
90
90
  readonly default: "clip";
91
91
  };
92
92
  readonly variant: {
93
- readonly type: import('vue').PropType<import('./date-picker').PickerVariant>;
93
+ readonly type: import('vue').PropType<import('./date-picker-select').PickerVariant>;
94
94
  readonly default: "outline";
95
95
  };
96
96
  readonly color: {
@@ -122,15 +122,15 @@ declare const __VLS_component: import('vue').DefineComponent<import('vue').Extra
122
122
  readonly default: undefined;
123
123
  };
124
124
  readonly disabledHours: {
125
- readonly type: import('vue').PropType<import('./date-picker').DisabledTimeResolver>;
125
+ readonly type: import('vue').PropType<import('./date-picker-select').DisabledTimeResolver>;
126
126
  readonly default: undefined;
127
127
  };
128
128
  readonly disabledMinutes: {
129
- readonly type: import('vue').PropType<import('./date-picker').DisabledTimeResolver>;
129
+ readonly type: import('vue').PropType<import('./date-picker-select').DisabledTimeResolver>;
130
130
  readonly default: undefined;
131
131
  };
132
132
  readonly disabledSeconds: {
133
- readonly type: import('vue').PropType<import('./date-picker').DisabledTimeResolver>;
133
+ readonly type: import('vue').PropType<import('./date-picker-select').DisabledTimeResolver>;
134
134
  readonly default: undefined;
135
135
  };
136
136
  readonly hourStep: {
@@ -150,11 +150,11 @@ declare const __VLS_component: import('vue').DefineComponent<import('vue').Extra
150
150
  readonly default: true;
151
151
  };
152
152
  readonly shortcuts: {
153
- readonly type: import('vue').PropType<import('./date-picker').PickerShortcut[]>;
153
+ readonly type: import('vue').PropType<import('./date-picker-select').PickerShortcut[]>;
154
154
  readonly default: () => never[];
155
155
  };
156
156
  readonly defaultValue: {
157
- readonly type: import('vue').PropType<import('./date-picker').PickerValueItem>;
157
+ readonly type: import('vue').PropType<import('./date-picker-select').PickerValueItem>;
158
158
  readonly default: undefined;
159
159
  };
160
160
  readonly defaultTime: {
@@ -237,15 +237,15 @@ declare const __VLS_component: import('vue').DefineComponent<import('vue').Extra
237
237
  readonly default: undefined;
238
238
  };
239
239
  readonly size: {
240
- readonly type: import('vue').PropType<import('./date-picker').PickerSize>;
240
+ readonly type: import('vue').PropType<import('./date-picker-select').PickerSize>;
241
241
  readonly default: "md";
242
242
  };
243
243
  readonly shape: {
244
- readonly type: import('vue').PropType<import('./date-picker').PickerShape>;
244
+ readonly type: import('vue').PropType<import('./date-picker-select').PickerShape>;
245
245
  readonly default: "clip";
246
246
  };
247
247
  readonly variant: {
248
- readonly type: import('vue').PropType<import('./date-picker').PickerVariant>;
248
+ readonly type: import('vue').PropType<import('./date-picker-select').PickerVariant>;
249
249
  readonly default: "outline";
250
250
  };
251
251
  readonly color: {
@@ -277,15 +277,15 @@ declare const __VLS_component: import('vue').DefineComponent<import('vue').Extra
277
277
  readonly default: undefined;
278
278
  };
279
279
  readonly disabledHours: {
280
- readonly type: import('vue').PropType<import('./date-picker').DisabledTimeResolver>;
280
+ readonly type: import('vue').PropType<import('./date-picker-select').DisabledTimeResolver>;
281
281
  readonly default: undefined;
282
282
  };
283
283
  readonly disabledMinutes: {
284
- readonly type: import('vue').PropType<import('./date-picker').DisabledTimeResolver>;
284
+ readonly type: import('vue').PropType<import('./date-picker-select').DisabledTimeResolver>;
285
285
  readonly default: undefined;
286
286
  };
287
287
  readonly disabledSeconds: {
288
- readonly type: import('vue').PropType<import('./date-picker').DisabledTimeResolver>;
288
+ readonly type: import('vue').PropType<import('./date-picker-select').DisabledTimeResolver>;
289
289
  readonly default: undefined;
290
290
  };
291
291
  readonly hourStep: {
@@ -305,11 +305,11 @@ declare const __VLS_component: import('vue').DefineComponent<import('vue').Extra
305
305
  readonly default: true;
306
306
  };
307
307
  readonly shortcuts: {
308
- readonly type: import('vue').PropType<import('./date-picker').PickerShortcut[]>;
308
+ readonly type: import('vue').PropType<import('./date-picker-select').PickerShortcut[]>;
309
309
  readonly default: () => never[];
310
310
  };
311
311
  readonly defaultValue: {
312
- readonly type: import('vue').PropType<import('./date-picker').PickerValueItem>;
312
+ readonly type: import('vue').PropType<import('./date-picker-select').PickerValueItem>;
313
313
  readonly default: undefined;
314
314
  };
315
315
  readonly defaultTime: {
@@ -333,9 +333,9 @@ declare const __VLS_component: import('vue').DefineComponent<import('vue').Extra
333
333
  readonly format: string;
334
334
  readonly type: PickerType;
335
335
  readonly color: string;
336
- readonly variant: import('./date-picker').PickerVariant;
336
+ readonly variant: import('./date-picker-select').PickerVariant;
337
337
  readonly disabled: boolean;
338
- readonly shape: import('./date-picker').PickerShape;
338
+ readonly shape: import('./date-picker-select').PickerShape;
339
339
  readonly placeholder: string;
340
340
  readonly modelValue: PickerModelValue;
341
341
  readonly readonly: boolean;
@@ -346,20 +346,20 @@ declare const __VLS_component: import('vue').DefineComponent<import('vue').Extra
346
346
  readonly placement: Placement;
347
347
  readonly confirm: boolean | undefined;
348
348
  readonly valueFormat: string;
349
+ readonly defaultValue: import('./date-picker-select').PickerValueItem;
350
+ readonly disabledDate: (date: Date) => boolean;
349
351
  readonly startPlaceholder: string;
350
352
  readonly endPlaceholder: string;
351
353
  readonly rangeSeparator: string;
352
354
  readonly editable: boolean;
353
- readonly disabledDate: (date: Date) => boolean;
354
- readonly disabledHours: import('./date-picker').DisabledTimeResolver;
355
- readonly disabledMinutes: import('./date-picker').DisabledTimeResolver;
356
- readonly disabledSeconds: import('./date-picker').DisabledTimeResolver;
355
+ readonly disabledHours: import('./date-picker-select').DisabledTimeResolver;
356
+ readonly disabledMinutes: import('./date-picker-select').DisabledTimeResolver;
357
+ readonly disabledSeconds: import('./date-picker-select').DisabledTimeResolver;
357
358
  readonly hourStep: number;
358
359
  readonly minuteStep: number;
359
360
  readonly secondStep: number;
360
361
  readonly showSeconds: boolean;
361
- readonly shortcuts: import('./date-picker').PickerShortcut[];
362
- readonly defaultValue: import('./date-picker').PickerValueItem;
362
+ readonly shortcuts: import('./date-picker-select').PickerShortcut[];
363
363
  readonly defaultTime: string | [string, string];
364
364
  readonly unlinkPanels: boolean;
365
365
  }, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {