@varlet/ui 3.3.16 → 3.5.0-alpha.1726249557629

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 (56) hide show
  1. package/es/auto-complete/AutoComplete.mjs +361 -0
  2. package/es/auto-complete/AutoCompleteSfc.css +0 -0
  3. package/es/auto-complete/autoComplete.css +1 -0
  4. package/es/auto-complete/index.mjs +11 -0
  5. package/es/auto-complete/props.mjs +63 -0
  6. package/es/auto-complete/provide.mjs +0 -0
  7. package/es/auto-complete/style/index.mjs +11 -0
  8. package/es/checkbox/props.mjs +1 -1
  9. package/es/checkbox-group/CheckboxGroup.mjs +3 -5
  10. package/es/checkbox-group/props.mjs +5 -2
  11. package/es/counter/props.mjs +1 -1
  12. package/es/field-decorator/FieldDecorator.mjs +8 -8
  13. package/es/field-decorator/props.mjs +1 -1
  14. package/es/index.bundle.mjs +7 -1
  15. package/es/index.mjs +6 -1
  16. package/es/input/Input.mjs +12 -13
  17. package/es/input/props.mjs +22 -3
  18. package/es/menu-option/MenuOption.mjs +5 -2
  19. package/es/menu-option/menuOption.css +1 -1
  20. package/es/menu-select/MenuSelect.mjs +4 -5
  21. package/es/menu-select/props.mjs +13 -3
  22. package/es/radio/props.mjs +1 -1
  23. package/es/radio-group/RadioGroup.mjs +4 -6
  24. package/es/radio-group/props.mjs +5 -2
  25. package/es/select/Select.mjs +3 -5
  26. package/es/select/props.mjs +5 -2
  27. package/es/slider/props.mjs +1 -1
  28. package/es/style.css +1 -1
  29. package/es/style.mjs +1 -0
  30. package/es/switch/props.mjs +1 -1
  31. package/es/tooltip/Tooltip.mjs +5 -1
  32. package/es/tooltip/props.mjs +1 -0
  33. package/es/uploader/props.mjs +1 -1
  34. package/es/utils/components.mjs +30 -9
  35. package/es/varlet.esm.js +14219 -13843
  36. package/highlight/web-types.en-US.json +268 -30
  37. package/highlight/web-types.zh-CN.json +270 -32
  38. package/lib/style.css +1 -1
  39. package/lib/varlet.cjs.js +15305 -14844
  40. package/package.json +9 -8
  41. package/types/autoComplete.d.ts +84 -0
  42. package/types/checkbox.d.ts +3 -3
  43. package/types/checkboxGroup.d.ts +1 -1
  44. package/types/counter.d.ts +1 -1
  45. package/types/index.d.ts +2 -0
  46. package/types/input.d.ts +2 -1
  47. package/types/radio.d.ts +1 -1
  48. package/types/radioGroup.d.ts +1 -1
  49. package/types/rate.d.ts +1 -1
  50. package/types/select.d.ts +1 -1
  51. package/types/slider.d.ts +1 -1
  52. package/types/styleVars.d.ts +1 -0
  53. package/types/switch.d.ts +1 -1
  54. package/types/tooltip.d.ts +1 -0
  55. package/types/uploader.d.ts +1 -1
  56. package/umd/varlet.js +8 -8
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "$schema": "https://raw.githubusercontent.com/JetBrains/web-types/master/schema/web-types.json",
3
3
  "framework": "vue",
4
- "version": "3.3.16",
4
+ "version": "3.5.0-alpha.1726249557629",
5
5
  "name": "VARLET",
6
6
  "contributions": {
7
7
  "html": {
@@ -300,6 +300,235 @@
300
300
  }
301
301
  ]
302
302
  },
303
+ {
304
+ "name": "var-auto-complete",
305
+ "attributes": [
306
+ {
307
+ "name": "v-model",
308
+ "description": "绑定的值",
309
+ "default": "-",
310
+ "value": {
311
+ "type": "string",
312
+ "kind": "expression"
313
+ }
314
+ },
315
+ {
316
+ "name": "variant",
317
+ "description": "输入框风格, 可选值为 `standard` `outlined`",
318
+ "default": "standard",
319
+ "value": {
320
+ "type": "string",
321
+ "kind": "expression"
322
+ }
323
+ },
324
+ {
325
+ "name": "size",
326
+ "description": "输入框尺寸,可选值 `normal` `small`",
327
+ "default": "normal",
328
+ "value": {
329
+ "type": "string",
330
+ "kind": "expression"
331
+ }
332
+ },
333
+ {
334
+ "name": "placeholder",
335
+ "description": "占位符",
336
+ "default": "-",
337
+ "value": {
338
+ "type": "string",
339
+ "kind": "expression"
340
+ }
341
+ },
342
+ {
343
+ "name": "options",
344
+ "description": "指定可选项",
345
+ "default": "[]",
346
+ "value": {
347
+ "type": "AutoCompleteOption[]",
348
+ "kind": "expression"
349
+ }
350
+ },
351
+ {
352
+ "name": "label-key",
353
+ "description": "作为 label 唯一标识的键名",
354
+ "default": "label",
355
+ "value": {
356
+ "type": "string",
357
+ "kind": "expression"
358
+ }
359
+ },
360
+ {
361
+ "name": "value-key",
362
+ "description": "作为 value 唯一标识的键名",
363
+ "default": "value",
364
+ "value": {
365
+ "type": "string",
366
+ "kind": "expression"
367
+ }
368
+ },
369
+ {
370
+ "name": "maxlength",
371
+ "description": "最大长度",
372
+ "default": "-",
373
+ "value": {
374
+ "type": "string | number",
375
+ "kind": "expression"
376
+ }
377
+ },
378
+ {
379
+ "name": "readonly",
380
+ "description": "是否只读",
381
+ "default": "false",
382
+ "value": {
383
+ "type": "boolean",
384
+ "kind": "expression"
385
+ }
386
+ },
387
+ {
388
+ "name": "disabled",
389
+ "description": "是否禁用",
390
+ "default": "false",
391
+ "value": {
392
+ "type": "boolean",
393
+ "kind": "expression"
394
+ }
395
+ },
396
+ {
397
+ "name": "validate-trigger",
398
+ "description": "触发验证的时机,可选值为 `onFocus` `onBlur` `onChange` `onClick` `onClear` `onInput`",
399
+ "default": "['onInput', 'onClear', 'onChange']",
400
+ "value": {
401
+ "type": "AutoCompleteValidateTrigger[]",
402
+ "kind": "expression"
403
+ }
404
+ },
405
+ {
406
+ "name": "rules",
407
+ "description": "验证规则,返回 `true` 表示验证通过,其余的值则转换为文本作为用户提示",
408
+ "default": "-",
409
+ "value": {
410
+ "type": "Array<(v: string) => any>",
411
+ "kind": "expression"
412
+ }
413
+ },
414
+ {
415
+ "name": "enterkeyhint",
416
+ "description": "定制回车键样式,参见 [MDN](https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/enterkeyhint)",
417
+ "default": "-",
418
+ "value": {
419
+ "type": "string",
420
+ "kind": "expression"
421
+ }
422
+ },
423
+ {
424
+ "name": "clearable",
425
+ "description": "是否可清除",
426
+ "default": "false",
427
+ "value": {
428
+ "type": "boolean",
429
+ "kind": "expression"
430
+ }
431
+ },
432
+ {
433
+ "name": "line",
434
+ "description": "是否显示分割线",
435
+ "default": "true",
436
+ "value": {
437
+ "type": "boolean",
438
+ "kind": "expression"
439
+ }
440
+ },
441
+ {
442
+ "name": "hint",
443
+ "description": "是否使用占位符作为提示",
444
+ "default": "true",
445
+ "value": {
446
+ "type": "boolean",
447
+ "kind": "expression"
448
+ }
449
+ },
450
+ {
451
+ "name": "text-color",
452
+ "description": "文字颜色",
453
+ "default": "-",
454
+ "value": {
455
+ "type": "string",
456
+ "kind": "expression"
457
+ }
458
+ },
459
+ {
460
+ "name": "focus-color",
461
+ "description": "聚焦时的主要颜色",
462
+ "default": "-",
463
+ "value": {
464
+ "type": "string",
465
+ "kind": "expression"
466
+ }
467
+ },
468
+ {
469
+ "name": "blur-color",
470
+ "description": "失焦时的主要颜色",
471
+ "default": "-",
472
+ "value": {
473
+ "type": "string",
474
+ "kind": "expression"
475
+ }
476
+ },
477
+ {
478
+ "name": "get-show",
479
+ "description": "根据输入值决定是否显示菜单",
480
+ "default": "-",
481
+ "value": {
482
+ "type": "(v: string) => boolean",
483
+ "kind": "expression"
484
+ }
485
+ }
486
+ ],
487
+ "events": [
488
+ {
489
+ "name": "focus",
490
+ "description": "聚焦时触发"
491
+ },
492
+ {
493
+ "name": "blur",
494
+ "description": "失焦时触发"
495
+ },
496
+ {
497
+ "name": "click",
498
+ "description": "点击时触发"
499
+ },
500
+ {
501
+ "name": "clear",
502
+ "description": "清除时触发"
503
+ },
504
+ {
505
+ "name": "input",
506
+ "description": "输入时触发"
507
+ },
508
+ {
509
+ "name": "change",
510
+ "description": "更新时触发"
511
+ }
512
+ ],
513
+ "slots": [
514
+ {
515
+ "name": "prepend-icon",
516
+ "description": "前置图标"
517
+ },
518
+ {
519
+ "name": "append-icon",
520
+ "description": "后置图标"
521
+ },
522
+ {
523
+ "name": "clear-icon",
524
+ "description": "清除图标"
525
+ },
526
+ {
527
+ "name": "extra-message",
528
+ "description": "附加信息"
529
+ }
530
+ ]
531
+ },
303
532
  {
304
533
  "name": "var-avatar",
305
534
  "attributes": [
@@ -1560,10 +1789,10 @@
1560
1789
  },
1561
1790
  {
1562
1791
  "name": "rules",
1563
- "description": "验证规则,返回 `true` 表示验证通过,其余的值则转换为文本作为用户提示",
1792
+ "description": "验证规则,返回 `true` 表示验证通过,其它类型的值将转换为文本作为用户提示。自 `3.5.0` 开始支持 [Zod 验证](#/zh-CN/zodValidation)",
1564
1793
  "default": "-",
1565
1794
  "value": {
1566
- "type": "Array<(value: any) => any>",
1795
+ "type": "(v: string) => any | ZodType | Array<(v: string) => any | ZodType>",
1567
1796
  "kind": "expression"
1568
1797
  }
1569
1798
  }
@@ -1630,7 +1859,7 @@
1630
1859
  {
1631
1860
  "name": "options",
1632
1861
  "description": "指定可选项",
1633
- "default": "-",
1862
+ "default": "[]",
1634
1863
  "value": {
1635
1864
  "type": "CheckboxGroupOption[]",
1636
1865
  "kind": "expression"
@@ -1656,10 +1885,10 @@
1656
1885
  },
1657
1886
  {
1658
1887
  "name": "rules",
1659
- "description": "验证规则,返回 `true` 表示验证通过,其余的值则转换为文本作为用户提示",
1888
+ "description": "验证规则,返回 `true` 表示验证通过,其它类型的值将转换为文本作为用户提示。自 `3.5.0` 开始支持 [Zod 验证](#/zh-CN/zodValidation)",
1660
1889
  "default": "-",
1661
1890
  "value": {
1662
- "type": "Array<(value: any[]) => any>",
1891
+ "type": "(v: string) => any | ZodType | Array<(v: string) => any | ZodType>",
1663
1892
  "kind": "expression"
1664
1893
  }
1665
1894
  }
@@ -2283,16 +2512,16 @@
2283
2512
  "description": "触发验证的时机,可选值为 `onInputChange` `onLazyChange` `onIncrement` `onDecrement`",
2284
2513
  "default": "['onIncrement', 'onDecrement', 'onInputChange', 'onLazyChange']",
2285
2514
  "value": {
2286
- "type": "ValidateTriggers[]",
2515
+ "type": "CounterValidateTrigger[]",
2287
2516
  "kind": "expression"
2288
2517
  }
2289
2518
  },
2290
2519
  {
2291
2520
  "name": "rules",
2292
- "description": "验证规则,返回 `true` 表示验证通过,其余的值则转换为文本作为用户提示",
2521
+ "description": "验证规则,返回 `true` 表示验证通过,其它类型的值将转换为文本作为用户提示。自 `3.5.0` 开始支持 [Zod 验证](#/zh-CN/zodValidation)",
2293
2522
  "default": "-",
2294
2523
  "value": {
2295
- "type": "Array<(value: number) => any>",
2524
+ "type": "(v: string) => any | ZodType | Array<(v: string) => any | ZodType>",
2296
2525
  "kind": "expression"
2297
2526
  }
2298
2527
  }
@@ -4016,16 +4245,16 @@
4016
4245
  "description": "触发验证的时机,可选值为 `onFocus` `onBlur` `onChange` `onClick` `onClear` `onInput`",
4017
4246
  "default": "['onInput', 'onClear']",
4018
4247
  "value": {
4019
- "type": "ValidateTriggers[]",
4248
+ "type": "InputValidateTrigger[]",
4020
4249
  "kind": "expression"
4021
4250
  }
4022
4251
  },
4023
4252
  {
4024
4253
  "name": "rules",
4025
- "description": "验证规则,返回 `true` 表示验证通过,其余的值则转换为文本作为用户提示",
4254
+ "description": "验证规则,返回 `true` 表示验证通过,其它类型的值将转换为文本作为用户提示。自 `3.5.0` 开始支持 [Zod 验证](#/zh-CN/zodValidation)",
4026
4255
  "default": "-",
4027
4256
  "value": {
4028
- "type": "Array<(v: string) => any>",
4257
+ "type": "(v: string) => any | ZodType | Array<(v: string) => any | ZodType>",
4029
4258
  "kind": "expression"
4030
4259
  }
4031
4260
  },
@@ -4840,7 +5069,7 @@
4840
5069
  {
4841
5070
  "name": "options",
4842
5071
  "description": "指定可选项",
4843
- "default": "-",
5072
+ "default": "[]",
4844
5073
  "value": {
4845
5074
  "type": "MenuSelectOption[]",
4846
5075
  "kind": "expression"
@@ -5842,10 +6071,10 @@
5842
6071
  },
5843
6072
  {
5844
6073
  "name": "rules",
5845
- "description": "验证规则,返回 `true` 表示验证通过,其余的值则转换为文本作为用户提示",
6074
+ "description": "验证规则,返回 `true` 表示验证通过,其它类型的值将转换为文本作为用户提示。自 `3.5.0` 开始支持 [Zod 验证](#/zh-CN/zodValidation)",
5846
6075
  "default": "-",
5847
6076
  "value": {
5848
- "type": "Array<(value: any) => any>",
6077
+ "type": "(v: string) => any | ZodType | Array<(v: string) => any | ZodType>",
5849
6078
  "kind": "expression"
5850
6079
  }
5851
6080
  }
@@ -5899,7 +6128,7 @@
5899
6128
  {
5900
6129
  "name": "options",
5901
6130
  "description": "指定可选项",
5902
- "default": "-",
6131
+ "default": "[]",
5903
6132
  "value": {
5904
6133
  "type": "RadioGroupOption[]",
5905
6134
  "kind": "expression"
@@ -5925,10 +6154,10 @@
5925
6154
  },
5926
6155
  {
5927
6156
  "name": "rules",
5928
- "description": "验证规则,返回 `true` 表示验证通过,其余的值则转换为文本作为用户提示",
6157
+ "description": "验证规则,返回 `true` 表示验证通过,其它类型的值将转换为文本作为用户提示。自 `3.5.0` 开始支持 [Zod 验证](#/zh-CN/zodValidation)",
5929
6158
  "default": "-",
5930
6159
  "value": {
5931
- "type": "Array<(value: any) => any>",
6160
+ "type": "(v: string) => any | ZodType | Array<(v: string) => any | ZodType>",
5932
6161
  "kind": "expression"
5933
6162
  }
5934
6163
  }
@@ -6113,10 +6342,10 @@
6113
6342
  },
6114
6343
  {
6115
6344
  "name": "rules",
6116
- "description": "验证规则,返回 `true` 表示验证通过,其余的值则转换为文本作为用户提示",
6345
+ "description": "验证规则,返回 `true` 表示验证通过,其它类型的值将转换为文本作为用户提示。自 `3.5.0` 开始支持 [Zod 验证](#/zh-CN/zodValidation)",
6117
6346
  "default": "-",
6118
6347
  "value": {
6119
- "type": "Array<(v: number) => any>",
6348
+ "type": "(v: string) => any | ZodType | Array<(v: string) => any | ZodType>",
6120
6349
  "kind": "expression"
6121
6350
  }
6122
6351
  }
@@ -6389,7 +6618,7 @@
6389
6618
  {
6390
6619
  "name": "options",
6391
6620
  "description": "指定可选项",
6392
- "default": "-",
6621
+ "default": "[]",
6393
6622
  "value": {
6394
6623
  "type": "SelectOption[]",
6395
6624
  "kind": "expression"
@@ -6418,16 +6647,16 @@
6418
6647
  "description": "触发验证的时机,可选值为 `onFocus` `onBlur` `onChange` `onClick` `onClear` `onClose`",
6419
6648
  "default": "['onChange', 'onClear', 'onClose']",
6420
6649
  "value": {
6421
- "type": "ValidateTriggers[]",
6650
+ "type": "SelectValidateTrigger[]",
6422
6651
  "kind": "expression"
6423
6652
  }
6424
6653
  },
6425
6654
  {
6426
6655
  "name": "rules",
6427
- "description": "验证规则,返回 `true` 表示验证通过,其余的值则转换为文本作为用户提示",
6656
+ "description": "验证规则,返回 `true` 表示验证通过,其它类型的值将转换为文本作为用户提示。自 `3.5.0` 开始支持 [Zod 验证](#/zh-CN/zodValidation)",
6428
6657
  "default": "-",
6429
6658
  "value": {
6430
- "type": "Array<(v: any | any[]) => any>",
6659
+ "type": "(v: string) => any | ZodType | Array<(v: string) => any | ZodType>",
6431
6660
  "kind": "expression"
6432
6661
  }
6433
6662
  }
@@ -6741,10 +6970,10 @@
6741
6970
  },
6742
6971
  {
6743
6972
  "name": "rules",
6744
- "description": "校验规则",
6973
+ "description": "验证规则,返回 `true` 表示验证通过,其它类型的值将转换为文本作为用户提示。自 `3.5.0` 开始支持 [Zod 验证](#/zh-CN/zodValidation)",
6745
6974
  "default": "-",
6746
6975
  "value": {
6747
- "type": "Array<(v: number | number[]) => any>",
6976
+ "type": "(v: string) => any | ZodType | Array<(v: string) => any | ZodType>",
6748
6977
  "kind": "expression"
6749
6978
  }
6750
6979
  }
@@ -7450,10 +7679,10 @@
7450
7679
  },
7451
7680
  {
7452
7681
  "name": "rules",
7453
- "description": "校验规则",
7682
+ "description": "验证规则,返回 `true` 表示验证通过,其它类型的值将转换为文本作为用户提示。自 `3.5.0` 开始支持 [Zod 验证](#/zh-CN/zodValidation)",
7454
7683
  "default": "-",
7455
7684
  "value": {
7456
- "type": "Array<(value: any) => any>",
7685
+ "type": "(v: string) => any | ZodType | Array<(v: string) => any | ZodType>",
7457
7686
  "kind": "expression"
7458
7687
  }
7459
7688
  },
@@ -7471,7 +7700,7 @@
7471
7700
  "description": "触发验证的时机,可选值为 `onChange` `onLazyChange`",
7472
7701
  "default": "['onChange', 'onLazyChange']",
7473
7702
  "value": {
7474
- "type": "ValidateTriggers[]",
7703
+ "type": "SwitchValidateTrigger[]",
7475
7704
  "kind": "expression"
7476
7705
  }
7477
7706
  },
@@ -7983,6 +8212,15 @@
7983
8212
  "kind": "expression"
7984
8213
  }
7985
8214
  },
8215
+ {
8216
+ "name": "text-color",
8217
+ "description": "文字颜色",
8218
+ "default": "-",
8219
+ "value": {
8220
+ "type": "string",
8221
+ "kind": "expression"
8222
+ }
8223
+ },
7986
8224
  {
7987
8225
  "name": "type",
7988
8226
  "description": "类型,可选值为 `default` `primary` `info` `success` `warning` `danger`",
@@ -8268,16 +8506,16 @@
8268
8506
  "description": "触发验证的时机, 可选值为 `onChange` `onRemove`",
8269
8507
  "default": "['onChange', 'onRemove']",
8270
8508
  "value": {
8271
- "type": "ValidateTriggers[]",
8509
+ "type": "UploaderValidateTrigger[]",
8272
8510
  "kind": "expression"
8273
8511
  }
8274
8512
  },
8275
8513
  {
8276
8514
  "name": "rules",
8277
- "description": "验证规则,返回 `true` 表示验证通过,其余的值则转换为文本作为用户提示",
8515
+ "description": "验证规则,返回 `true` 表示验证通过,其它类型的值将转换为文本作为用户提示。自 `3.5.0` 开始支持 [Zod 验证](#/zh-CN/zodValidation)",
8278
8516
  "default": "-",
8279
8517
  "value": {
8280
- "type": "Array<(v: VarFile, u: VarFileUtils) => any>",
8518
+ "type": "(v: string) => any | ZodType | Array<(v: string) => any | ZodType>",
8281
8519
  "kind": "expression"
8282
8520
  }
8283
8521
  }