@yh-ui/components 0.1.27 → 0.1.29

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,7 +1,7 @@
1
1
  <script setup>
2
2
  import { ref, computed, watch, onMounted } from "vue";
3
3
  import dayjs from "../../dayjs";
4
- import isoWeekPlugin from "dayjs/esm/plugin/isoWeek/index.js";
4
+ import isoWeekPlugin from "dayjs/plugin/isoWeek.js";
5
5
  import { useNamespace, useLocale } from "@yh-ui/hooks";
6
6
  import { useComponentTheme } from "@yh-ui/theme";
7
7
  import {
@@ -153,10 +153,24 @@ declare const __VLS_component: import("vue").DefineComponent<import("vue").Extra
153
153
  };
154
154
  set: (unit: import("dayjs").UnitType, value: number) => Dayjs;
155
155
  get: (unit: import("dayjs").UnitType) => number;
156
- add: (value: number, unit?: import("dayjs").ManipulateType) => Dayjs;
157
- subtract: (value: number, unit?: import("dayjs").ManipulateType) => Dayjs;
158
- startOf: (unit: import("dayjs").OpUnitType) => Dayjs;
159
- endOf: (unit: import("dayjs").OpUnitType) => Dayjs;
156
+ add: {
157
+ (value: number, unit?: import("dayjs").ManipulateType): Dayjs;
158
+ (value: number, unit: import("dayjs").QUnitType): Dayjs;
159
+ };
160
+ subtract: {
161
+ (value: number, unit?: import("dayjs").ManipulateType): Dayjs;
162
+ (value: number, unit: import("dayjs").QUnitType): Dayjs;
163
+ };
164
+ startOf: {
165
+ (unit: import("dayjs").OpUnitType): Dayjs;
166
+ (unit: import("dayjs").OpUnitType | "isoWeek"): Dayjs;
167
+ (unit: import("dayjs").QUnitType | import("dayjs").OpUnitType): Dayjs;
168
+ };
169
+ endOf: {
170
+ (unit: import("dayjs").OpUnitType): Dayjs;
171
+ (unit: import("dayjs").OpUnitType | "isoWeek"): Dayjs;
172
+ (unit: import("dayjs").QUnitType | import("dayjs").OpUnitType): Dayjs;
173
+ };
160
174
  format: (template?: string) => string;
161
175
  diff: (date?: import("dayjs").ConfigType, unit?: import("dayjs").QUnitType | import("dayjs").OpUnitType, float?: boolean) => number;
162
176
  valueOf: () => number;
@@ -167,13 +181,43 @@ declare const __VLS_component: import("vue").DefineComponent<import("vue").Extra
167
181
  toISOString: () => string;
168
182
  toString: () => string;
169
183
  utcOffset: () => number;
170
- isBefore: (date?: import("dayjs").ConfigType, unit?: import("dayjs").OpUnitType) => boolean;
171
- isSame: (date?: import("dayjs").ConfigType, unit?: import("dayjs").OpUnitType) => boolean;
172
- isAfter: (date?: import("dayjs").ConfigType, unit?: import("dayjs").OpUnitType) => boolean;
184
+ isBefore: {
185
+ (date?: import("dayjs").ConfigType, unit?: import("dayjs").OpUnitType): boolean;
186
+ (date?: import("dayjs").ConfigType, unit?: import("dayjs").OpUnitType | "isoWeek"): boolean;
187
+ (date?: import("dayjs").ConfigType, unit?: import("dayjs").QUnitType): boolean;
188
+ };
189
+ isSame: {
190
+ (date?: import("dayjs").ConfigType, unit?: import("dayjs").OpUnitType): boolean;
191
+ (date?: import("dayjs").ConfigType, unit?: import("dayjs").OpUnitType | "isoWeek"): boolean;
192
+ (date?: import("dayjs").ConfigType, unit?: import("dayjs").QUnitType): boolean;
193
+ };
194
+ isAfter: {
195
+ (date?: import("dayjs").ConfigType, unit?: import("dayjs").OpUnitType): boolean;
196
+ (date?: import("dayjs").ConfigType, unit?: import("dayjs").OpUnitType | "isoWeek"): boolean;
197
+ (date?: import("dayjs").ConfigType, unit?: import("dayjs").QUnitType): boolean;
198
+ };
173
199
  locale: {
174
200
  (): string;
175
201
  (preset: string | ILocale, object?: Partial<ILocale>): Dayjs;
176
202
  };
203
+ isBetween: (a: import("dayjs").ConfigType, b: import("dayjs").ConfigType, c?: import("dayjs").OpUnitType | null, d?: "()" | "[]" | "[)" | "(]") => boolean;
204
+ week: {
205
+ (): number;
206
+ (value: number): Dayjs;
207
+ };
208
+ isoWeekYear: () => number;
209
+ isoWeek: {
210
+ (): number;
211
+ (value: number): Dayjs;
212
+ };
213
+ isoWeekday: {
214
+ (): number;
215
+ (value: number): Dayjs;
216
+ };
217
+ quarter: {
218
+ (): number;
219
+ (quarter: number): Dayjs;
220
+ };
177
221
  }, Dayjs | {
178
222
  clone: () => Dayjs;
179
223
  isValid: () => boolean;
@@ -211,10 +255,24 @@ declare const __VLS_component: import("vue").DefineComponent<import("vue").Extra
211
255
  };
212
256
  set: (unit: import("dayjs").UnitType, value: number) => Dayjs;
213
257
  get: (unit: import("dayjs").UnitType) => number;
214
- add: (value: number, unit?: import("dayjs").ManipulateType) => Dayjs;
215
- subtract: (value: number, unit?: import("dayjs").ManipulateType) => Dayjs;
216
- startOf: (unit: import("dayjs").OpUnitType) => Dayjs;
217
- endOf: (unit: import("dayjs").OpUnitType) => Dayjs;
258
+ add: {
259
+ (value: number, unit?: import("dayjs").ManipulateType): Dayjs;
260
+ (value: number, unit: import("dayjs").QUnitType): Dayjs;
261
+ };
262
+ subtract: {
263
+ (value: number, unit?: import("dayjs").ManipulateType): Dayjs;
264
+ (value: number, unit: import("dayjs").QUnitType): Dayjs;
265
+ };
266
+ startOf: {
267
+ (unit: import("dayjs").OpUnitType): Dayjs;
268
+ (unit: import("dayjs").OpUnitType | "isoWeek"): Dayjs;
269
+ (unit: import("dayjs").QUnitType | import("dayjs").OpUnitType): Dayjs;
270
+ };
271
+ endOf: {
272
+ (unit: import("dayjs").OpUnitType): Dayjs;
273
+ (unit: import("dayjs").OpUnitType | "isoWeek"): Dayjs;
274
+ (unit: import("dayjs").QUnitType | import("dayjs").OpUnitType): Dayjs;
275
+ };
218
276
  format: (template?: string) => string;
219
277
  diff: (date?: import("dayjs").ConfigType, unit?: import("dayjs").QUnitType | import("dayjs").OpUnitType, float?: boolean) => number;
220
278
  valueOf: () => number;
@@ -225,13 +283,43 @@ declare const __VLS_component: import("vue").DefineComponent<import("vue").Extra
225
283
  toISOString: () => string;
226
284
  toString: () => string;
227
285
  utcOffset: () => number;
228
- isBefore: (date?: import("dayjs").ConfigType, unit?: import("dayjs").OpUnitType) => boolean;
229
- isSame: (date?: import("dayjs").ConfigType, unit?: import("dayjs").OpUnitType) => boolean;
230
- isAfter: (date?: import("dayjs").ConfigType, unit?: import("dayjs").OpUnitType) => boolean;
286
+ isBefore: {
287
+ (date?: import("dayjs").ConfigType, unit?: import("dayjs").OpUnitType): boolean;
288
+ (date?: import("dayjs").ConfigType, unit?: import("dayjs").OpUnitType | "isoWeek"): boolean;
289
+ (date?: import("dayjs").ConfigType, unit?: import("dayjs").QUnitType): boolean;
290
+ };
291
+ isSame: {
292
+ (date?: import("dayjs").ConfigType, unit?: import("dayjs").OpUnitType): boolean;
293
+ (date?: import("dayjs").ConfigType, unit?: import("dayjs").OpUnitType | "isoWeek"): boolean;
294
+ (date?: import("dayjs").ConfigType, unit?: import("dayjs").QUnitType): boolean;
295
+ };
296
+ isAfter: {
297
+ (date?: import("dayjs").ConfigType, unit?: import("dayjs").OpUnitType): boolean;
298
+ (date?: import("dayjs").ConfigType, unit?: import("dayjs").OpUnitType | "isoWeek"): boolean;
299
+ (date?: import("dayjs").ConfigType, unit?: import("dayjs").QUnitType): boolean;
300
+ };
231
301
  locale: {
232
302
  (): string;
233
303
  (preset: string | ILocale, object?: Partial<ILocale>): Dayjs;
234
304
  };
305
+ isBetween: (a: import("dayjs").ConfigType, b: import("dayjs").ConfigType, c?: import("dayjs").OpUnitType | null, d?: "()" | "[]" | "[)" | "(]") => boolean;
306
+ week: {
307
+ (): number;
308
+ (value: number): Dayjs;
309
+ };
310
+ isoWeekYear: () => number;
311
+ isoWeek: {
312
+ (): number;
313
+ (value: number): Dayjs;
314
+ };
315
+ isoWeekday: {
316
+ (): number;
317
+ (value: number): Dayjs;
318
+ };
319
+ quarter: {
320
+ (): number;
321
+ (quarter: number): Dayjs;
322
+ };
235
323
  }>;
236
324
  /** 当前选中的日期对象 (Dayjs - 单选模式) */
237
325
  selectedDate: import("vue").Ref<{
@@ -271,10 +359,24 @@ declare const __VLS_component: import("vue").DefineComponent<import("vue").Extra
271
359
  };
272
360
  set: (unit: import("dayjs").UnitType, value: number) => Dayjs;
273
361
  get: (unit: import("dayjs").UnitType) => number;
274
- add: (value: number, unit?: import("dayjs").ManipulateType) => Dayjs;
275
- subtract: (value: number, unit?: import("dayjs").ManipulateType) => Dayjs;
276
- startOf: (unit: import("dayjs").OpUnitType) => Dayjs;
277
- endOf: (unit: import("dayjs").OpUnitType) => Dayjs;
362
+ add: {
363
+ (value: number, unit?: import("dayjs").ManipulateType): Dayjs;
364
+ (value: number, unit: import("dayjs").QUnitType): Dayjs;
365
+ };
366
+ subtract: {
367
+ (value: number, unit?: import("dayjs").ManipulateType): Dayjs;
368
+ (value: number, unit: import("dayjs").QUnitType): Dayjs;
369
+ };
370
+ startOf: {
371
+ (unit: import("dayjs").OpUnitType): Dayjs;
372
+ (unit: import("dayjs").OpUnitType | "isoWeek"): Dayjs;
373
+ (unit: import("dayjs").QUnitType | import("dayjs").OpUnitType): Dayjs;
374
+ };
375
+ endOf: {
376
+ (unit: import("dayjs").OpUnitType): Dayjs;
377
+ (unit: import("dayjs").OpUnitType | "isoWeek"): Dayjs;
378
+ (unit: import("dayjs").QUnitType | import("dayjs").OpUnitType): Dayjs;
379
+ };
278
380
  format: (template?: string) => string;
279
381
  diff: (date?: import("dayjs").ConfigType, unit?: import("dayjs").QUnitType | import("dayjs").OpUnitType, float?: boolean) => number;
280
382
  valueOf: () => number;
@@ -285,13 +387,43 @@ declare const __VLS_component: import("vue").DefineComponent<import("vue").Extra
285
387
  toISOString: () => string;
286
388
  toString: () => string;
287
389
  utcOffset: () => number;
288
- isBefore: (date?: import("dayjs").ConfigType, unit?: import("dayjs").OpUnitType) => boolean;
289
- isSame: (date?: import("dayjs").ConfigType, unit?: import("dayjs").OpUnitType) => boolean;
290
- isAfter: (date?: import("dayjs").ConfigType, unit?: import("dayjs").OpUnitType) => boolean;
390
+ isBefore: {
391
+ (date?: import("dayjs").ConfigType, unit?: import("dayjs").OpUnitType): boolean;
392
+ (date?: import("dayjs").ConfigType, unit?: import("dayjs").OpUnitType | "isoWeek"): boolean;
393
+ (date?: import("dayjs").ConfigType, unit?: import("dayjs").QUnitType): boolean;
394
+ };
395
+ isSame: {
396
+ (date?: import("dayjs").ConfigType, unit?: import("dayjs").OpUnitType): boolean;
397
+ (date?: import("dayjs").ConfigType, unit?: import("dayjs").OpUnitType | "isoWeek"): boolean;
398
+ (date?: import("dayjs").ConfigType, unit?: import("dayjs").QUnitType): boolean;
399
+ };
400
+ isAfter: {
401
+ (date?: import("dayjs").ConfigType, unit?: import("dayjs").OpUnitType): boolean;
402
+ (date?: import("dayjs").ConfigType, unit?: import("dayjs").OpUnitType | "isoWeek"): boolean;
403
+ (date?: import("dayjs").ConfigType, unit?: import("dayjs").QUnitType): boolean;
404
+ };
291
405
  locale: {
292
406
  (): string;
293
407
  (preset: string | ILocale, object?: Partial<ILocale>): Dayjs;
294
408
  };
409
+ isBetween: (a: import("dayjs").ConfigType, b: import("dayjs").ConfigType, c?: import("dayjs").OpUnitType | null, d?: "()" | "[]" | "[)" | "(]") => boolean;
410
+ week: {
411
+ (): number;
412
+ (value: number): Dayjs;
413
+ };
414
+ isoWeekYear: () => number;
415
+ isoWeek: {
416
+ (): number;
417
+ (value: number): Dayjs;
418
+ };
419
+ isoWeekday: {
420
+ (): number;
421
+ (value: number): Dayjs;
422
+ };
423
+ quarter: {
424
+ (): number;
425
+ (quarter: number): Dayjs;
426
+ };
295
427
  } | undefined, Dayjs | {
296
428
  clone: () => Dayjs;
297
429
  isValid: () => boolean;
@@ -329,10 +461,24 @@ declare const __VLS_component: import("vue").DefineComponent<import("vue").Extra
329
461
  };
330
462
  set: (unit: import("dayjs").UnitType, value: number) => Dayjs;
331
463
  get: (unit: import("dayjs").UnitType) => number;
332
- add: (value: number, unit?: import("dayjs").ManipulateType) => Dayjs;
333
- subtract: (value: number, unit?: import("dayjs").ManipulateType) => Dayjs;
334
- startOf: (unit: import("dayjs").OpUnitType) => Dayjs;
335
- endOf: (unit: import("dayjs").OpUnitType) => Dayjs;
464
+ add: {
465
+ (value: number, unit?: import("dayjs").ManipulateType): Dayjs;
466
+ (value: number, unit: import("dayjs").QUnitType): Dayjs;
467
+ };
468
+ subtract: {
469
+ (value: number, unit?: import("dayjs").ManipulateType): Dayjs;
470
+ (value: number, unit: import("dayjs").QUnitType): Dayjs;
471
+ };
472
+ startOf: {
473
+ (unit: import("dayjs").OpUnitType): Dayjs;
474
+ (unit: import("dayjs").OpUnitType | "isoWeek"): Dayjs;
475
+ (unit: import("dayjs").QUnitType | import("dayjs").OpUnitType): Dayjs;
476
+ };
477
+ endOf: {
478
+ (unit: import("dayjs").OpUnitType): Dayjs;
479
+ (unit: import("dayjs").OpUnitType | "isoWeek"): Dayjs;
480
+ (unit: import("dayjs").QUnitType | import("dayjs").OpUnitType): Dayjs;
481
+ };
336
482
  format: (template?: string) => string;
337
483
  diff: (date?: import("dayjs").ConfigType, unit?: import("dayjs").QUnitType | import("dayjs").OpUnitType, float?: boolean) => number;
338
484
  valueOf: () => number;
@@ -343,13 +489,43 @@ declare const __VLS_component: import("vue").DefineComponent<import("vue").Extra
343
489
  toISOString: () => string;
344
490
  toString: () => string;
345
491
  utcOffset: () => number;
346
- isBefore: (date?: import("dayjs").ConfigType, unit?: import("dayjs").OpUnitType) => boolean;
347
- isSame: (date?: import("dayjs").ConfigType, unit?: import("dayjs").OpUnitType) => boolean;
348
- isAfter: (date?: import("dayjs").ConfigType, unit?: import("dayjs").OpUnitType) => boolean;
492
+ isBefore: {
493
+ (date?: import("dayjs").ConfigType, unit?: import("dayjs").OpUnitType): boolean;
494
+ (date?: import("dayjs").ConfigType, unit?: import("dayjs").OpUnitType | "isoWeek"): boolean;
495
+ (date?: import("dayjs").ConfigType, unit?: import("dayjs").QUnitType): boolean;
496
+ };
497
+ isSame: {
498
+ (date?: import("dayjs").ConfigType, unit?: import("dayjs").OpUnitType): boolean;
499
+ (date?: import("dayjs").ConfigType, unit?: import("dayjs").OpUnitType | "isoWeek"): boolean;
500
+ (date?: import("dayjs").ConfigType, unit?: import("dayjs").QUnitType): boolean;
501
+ };
502
+ isAfter: {
503
+ (date?: import("dayjs").ConfigType, unit?: import("dayjs").OpUnitType): boolean;
504
+ (date?: import("dayjs").ConfigType, unit?: import("dayjs").OpUnitType | "isoWeek"): boolean;
505
+ (date?: import("dayjs").ConfigType, unit?: import("dayjs").QUnitType): boolean;
506
+ };
349
507
  locale: {
350
508
  (): string;
351
509
  (preset: string | ILocale, object?: Partial<ILocale>): Dayjs;
352
510
  };
511
+ isBetween: (a: import("dayjs").ConfigType, b: import("dayjs").ConfigType, c?: import("dayjs").OpUnitType | null, d?: "()" | "[]" | "[)" | "(]") => boolean;
512
+ week: {
513
+ (): number;
514
+ (value: number): Dayjs;
515
+ };
516
+ isoWeekYear: () => number;
517
+ isoWeek: {
518
+ (): number;
519
+ (value: number): Dayjs;
520
+ };
521
+ isoWeekday: {
522
+ (): number;
523
+ (value: number): Dayjs;
524
+ };
525
+ quarter: {
526
+ (): number;
527
+ (quarter: number): Dayjs;
528
+ };
353
529
  } | undefined>;
354
530
  /** 切换月份 (delta: 1 或 -1) */
355
531
  moveMonth: (delta: number) => void;
@@ -5,19 +5,19 @@ Object.defineProperty(exports, "__esModule", {
5
5
  });
6
6
  exports.parseDate = exports.generateCalendar = exports.formatDate = exports.DEFAULT_FORMATS = void 0;
7
7
  var _dayjs = _interopRequireDefault(require("../../dayjs.cjs"));
8
- var _index = _interopRequireDefault(require("dayjs/esm/plugin/isBetween/index.js"));
9
- var _index2 = _interopRequireDefault(require("dayjs/esm/plugin/weekOfYear/index.js"));
10
- var _index3 = _interopRequireDefault(require("dayjs/esm/plugin/isoWeek/index.js"));
11
- var _index4 = _interopRequireDefault(require("dayjs/esm/plugin/quarterOfYear/index.js"));
12
- var _index5 = _interopRequireDefault(require("dayjs/esm/plugin/advancedFormat/index.js"));
13
- var _index6 = _interopRequireDefault(require("dayjs/esm/plugin/customParseFormat/index.js"));
8
+ var _isBetween = _interopRequireDefault(require("dayjs/plugin/isBetween.js"));
9
+ var _weekOfYear = _interopRequireDefault(require("dayjs/plugin/weekOfYear.js"));
10
+ var _isoWeek = _interopRequireDefault(require("dayjs/plugin/isoWeek.js"));
11
+ var _quarterOfYear = _interopRequireDefault(require("dayjs/plugin/quarterOfYear.js"));
12
+ var _advancedFormat = _interopRequireDefault(require("dayjs/plugin/advancedFormat.js"));
13
+ var _customParseFormat = _interopRequireDefault(require("dayjs/plugin/customParseFormat.js"));
14
14
  function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
15
- _dayjs.default.extend(_index.default);
16
- _dayjs.default.extend(_index2.default);
17
- _dayjs.default.extend(_index3.default);
18
- _dayjs.default.extend(_index4.default);
19
- _dayjs.default.extend(_index5.default);
20
- _dayjs.default.extend(_index6.default);
15
+ _dayjs.default.extend(_isBetween.default);
16
+ _dayjs.default.extend(_weekOfYear.default);
17
+ _dayjs.default.extend(_isoWeek.default);
18
+ _dayjs.default.extend(_quarterOfYear.default);
19
+ _dayjs.default.extend(_advancedFormat.default);
20
+ _dayjs.default.extend(_customParseFormat.default);
21
21
  const DEFAULT_FORMATS = exports.DEFAULT_FORMATS = {
22
22
  date: "YYYY-MM-DD",
23
23
  datetime: "YYYY-MM-DD HH:mm:ss",
@@ -1,10 +1,10 @@
1
1
  import dayjs from "../../dayjs.mjs";
2
- import isBetweenPlugin from "dayjs/esm/plugin/isBetween/index.js";
3
- import weekOfYearPlugin from "dayjs/esm/plugin/weekOfYear/index.js";
4
- import isoWeekPlugin from "dayjs/esm/plugin/isoWeek/index.js";
5
- import quarterOfYearPlugin from "dayjs/esm/plugin/quarterOfYear/index.js";
6
- import advancedFormatPlugin from "dayjs/esm/plugin/advancedFormat/index.js";
7
- import customParseFormatPlugin from "dayjs/esm/plugin/customParseFormat/index.js";
2
+ import isBetweenPlugin from "dayjs/plugin/isBetween.js";
3
+ import weekOfYearPlugin from "dayjs/plugin/weekOfYear.js";
4
+ import isoWeekPlugin from "dayjs/plugin/isoWeek.js";
5
+ import quarterOfYearPlugin from "dayjs/plugin/quarterOfYear.js";
6
+ import advancedFormatPlugin from "dayjs/plugin/advancedFormat.js";
7
+ import customParseFormatPlugin from "dayjs/plugin/customParseFormat.js";
8
8
  dayjs.extend(isBetweenPlugin);
9
9
  dayjs.extend(weekOfYearPlugin);
10
10
  dayjs.extend(isoWeekPlugin);
@@ -1,9 +1,9 @@
1
1
  <script setup>
2
2
  import { ref, computed, watch } from "vue";
3
3
  import dayjs from "../../dayjs";
4
- import isBetweenPlugin from "dayjs/esm/plugin/isBetween/index.js";
5
- import isoWeekPlugin from "dayjs/esm/plugin/isoWeek/index.js";
6
- import quarterOfYearPlugin from "dayjs/esm/plugin/quarterOfYear/index.js";
4
+ import isBetweenPlugin from "dayjs/plugin/isBetween.js";
5
+ import isoWeekPlugin from "dayjs/plugin/isoWeek.js";
6
+ import quarterOfYearPlugin from "dayjs/plugin/quarterOfYear.js";
7
7
  import { useNamespace } from "@yh-ui/hooks";
8
8
  import { useComponentTheme } from "@yh-ui/theme";
9
9
  import { YhTooltip } from "../../tooltip";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@yh-ui/components",
3
- "version": "0.1.27",
3
+ "version": "0.1.29",
4
4
  "description": "YH-UI Vue 3 Components",
5
5
  "type": "module",
6
6
  "sideEffects": [
@@ -36,10 +36,10 @@
36
36
  "dependencies": {
37
37
  "@webcontainer/api": "^1.6.1",
38
38
  "@floating-ui/dom": "^1.7.4",
39
- "@yh-ui/hooks": "^0.1.27",
40
- "@yh-ui/locale": "^0.1.27",
41
- "@yh-ui/theme": "^0.1.27",
42
- "@yh-ui/utils": "^0.1.27",
39
+ "@yh-ui/hooks": "^0.1.29",
40
+ "@yh-ui/locale": "^0.1.29",
41
+ "@yh-ui/theme": "^0.1.29",
42
+ "@yh-ui/utils": "^0.1.29",
43
43
  "async-validator": "^4.2.5",
44
44
  "dayjs": "^1.11.19",
45
45
  "markdown-it": "^14.1.1",