@cyberpunk-vue/components 1.13.4 → 1.13.6

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.
@@ -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').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').PickerModelValue>;
22
+ readonly default: null;
23
+ };
24
+ readonly type: {
25
+ readonly type: import('vue').PropType<import('./date-picker').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').PickerSize>;
74
+ readonly default: "md";
75
+ };
76
+ readonly shape: {
77
+ readonly type: import('vue').PropType<import('./date-picker').PickerShape>;
78
+ readonly default: "clip";
79
+ };
80
+ readonly variant: {
81
+ readonly type: import('vue').PropType<import('./date-picker').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').DisabledTimeResolver>;
114
+ readonly default: undefined;
115
+ };
116
+ readonly disabledMinutes: {
117
+ readonly type: import('vue').PropType<import('./date-picker').DisabledTimeResolver>;
118
+ readonly default: undefined;
119
+ };
120
+ readonly disabledSeconds: {
121
+ readonly type: import('vue').PropType<import('./date-picker').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').PickerShortcut[]>;
142
+ readonly default: () => never[];
143
+ };
144
+ readonly defaultValue: {
145
+ readonly type: import('vue').PropType<import('./date-picker').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').PickerModelValue) => void;
160
+ "update:modelValue": (_value: import('./date-picker').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').PickerModelValue>;
166
+ readonly default: null;
167
+ };
168
+ readonly type: {
169
+ readonly type: import('vue').PropType<import('./date-picker').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').PickerSize>;
218
+ readonly default: "md";
219
+ };
220
+ readonly shape: {
221
+ readonly type: import('vue').PropType<import('./date-picker').PickerShape>;
222
+ readonly default: "clip";
223
+ };
224
+ readonly variant: {
225
+ readonly type: import('vue').PropType<import('./date-picker').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').DisabledTimeResolver>;
258
+ readonly default: undefined;
259
+ };
260
+ readonly disabledMinutes: {
261
+ readonly type: import('vue').PropType<import('./date-picker').DisabledTimeResolver>;
262
+ readonly default: undefined;
263
+ };
264
+ readonly disabledSeconds: {
265
+ readonly type: import('vue').PropType<import('./date-picker').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').PickerShortcut[]>;
286
+ readonly default: () => never[];
287
+ };
288
+ readonly defaultValue: {
289
+ readonly type: import('vue').PropType<import('./date-picker').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').PickerModelValue) => any) | undefined;
304
+ "onUpdate:modelValue"?: ((_value: import('./date-picker').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').PickerType;
312
+ readonly color: string;
313
+ readonly variant: import('./date-picker').PickerVariant;
314
+ readonly disabled: boolean;
315
+ readonly shape: import('./date-picker').PickerShape;
316
+ readonly placeholder: string;
317
+ readonly modelValue: import('./date-picker').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 startPlaceholder: string;
327
+ readonly endPlaceholder: string;
328
+ readonly rangeSeparator: string;
329
+ readonly editable: boolean;
330
+ readonly disabledDate: (date: Date) => boolean;
331
+ readonly disabledHours: import('./date-picker').DisabledTimeResolver;
332
+ readonly disabledMinutes: import('./date-picker').DisabledTimeResolver;
333
+ readonly disabledSeconds: import('./date-picker').DisabledTimeResolver;
334
+ readonly hourStep: number;
335
+ readonly minuteStep: number;
336
+ readonly secondStep: number;
337
+ readonly showSeconds: boolean;
338
+ readonly shortcuts: import('./date-picker').PickerShortcut[];
339
+ readonly defaultValue: import('./date-picker').PickerValueItem;
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,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';