@varlet/ui 2.0.1 → 2.0.3-alpha.1665825802777

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 (64) hide show
  1. package/es/image/Image.js +4 -2
  2. package/es/image/props.js +3 -0
  3. package/es/varlet.esm.js +6 -1
  4. package/highlight/attributes.json +7 -3
  5. package/highlight/tags.json +1 -0
  6. package/highlight/web-types.json +22 -16
  7. package/lib/image/Image.js +4 -2
  8. package/lib/image/props.js +3 -0
  9. package/package.json +5 -5
  10. package/types/actionSheet.d.ts +7 -0
  11. package/types/appBar.d.ts +7 -0
  12. package/types/backTop.d.ts +5 -0
  13. package/types/badge.d.ts +5 -0
  14. package/types/bottomNavigation.d.ts +5 -0
  15. package/types/bottomNavigationItem.d.ts +10 -0
  16. package/types/button.d.ts +5 -0
  17. package/types/card.d.ts +11 -0
  18. package/types/cell.d.ts +8 -0
  19. package/types/checkbox.d.ts +7 -0
  20. package/types/checkboxGroup.d.ts +5 -0
  21. package/types/chip.d.ts +7 -0
  22. package/types/col.d.ts +5 -0
  23. package/types/collapse.d.ts +5 -0
  24. package/types/collapseItem.d.ts +7 -0
  25. package/types/countdown.d.ts +7 -2
  26. package/types/datePicker.d.ts +30 -0
  27. package/types/dialog.d.ts +6 -1
  28. package/types/divider.d.ts +5 -0
  29. package/types/form.d.ts +5 -0
  30. package/types/image.d.ts +1 -0
  31. package/types/imagePreview.d.ts +7 -1
  32. package/types/indexAnchor.d.ts +5 -0
  33. package/types/indexBar.d.ts +5 -0
  34. package/types/input.d.ts +6 -0
  35. package/types/list.d.ts +8 -0
  36. package/types/loading.d.ts +6 -0
  37. package/types/menu.d.ts +6 -1
  38. package/types/option.d.ts +5 -0
  39. package/types/pagination.d.ts +6 -0
  40. package/types/picker.d.ts +7 -0
  41. package/types/popup.d.ts +5 -0
  42. package/types/progress.d.ts +5 -0
  43. package/types/pullRefresh.d.ts +5 -0
  44. package/types/radio.d.ts +7 -0
  45. package/types/radioGroup.d.ts +5 -0
  46. package/types/row.d.ts +5 -0
  47. package/types/select.d.ts +6 -0
  48. package/types/skeleton.d.ts +5 -0
  49. package/types/slider.d.ts +9 -0
  50. package/types/snackbar.d.ts +6 -1
  51. package/types/space.d.ts +5 -0
  52. package/types/step.d.ts +5 -0
  53. package/types/steps.d.ts +5 -0
  54. package/types/sticky.d.ts +5 -0
  55. package/types/styleProvider.d.ts +5 -0
  56. package/types/swipe.d.ts +11 -0
  57. package/types/swipeItem.d.ts +5 -0
  58. package/types/tab.d.ts +5 -0
  59. package/types/tabItem.d.ts +5 -0
  60. package/types/table.d.ts +6 -0
  61. package/types/tabs.d.ts +5 -0
  62. package/types/tabsItems.d.ts +5 -0
  63. package/types/uploader.d.ts +5 -0
  64. package/umd/varlet.js +1 -1
package/es/image/Image.js CHANGED
@@ -12,8 +12,8 @@ import { normalizeClass as _normalizeClass, normalizeStyle as _normalizeStyle, r
12
12
 
13
13
  var _withScopeId = n => (_pushScopeId(""), n = n(), _popScopeId(), n);
14
14
 
15
- var _hoisted_1 = ["alt", "lazy-error", "lazy-loading"];
16
- var _hoisted_2 = ["alt", "src"];
15
+ var _hoisted_1 = ["alt", "title", "lazy-error", "lazy-loading"];
16
+ var _hoisted_2 = ["alt", "title", "src"];
17
17
  export function render(_ctx, _cache) {
18
18
  var _directive_lazy = _resolveDirective("lazy");
19
19
 
@@ -30,6 +30,7 @@ export function render(_ctx, _cache) {
30
30
  key: 0,
31
31
  class: _normalizeClass(_ctx.n('image')),
32
32
  alt: _ctx.alt,
33
+ title: _ctx.title,
33
34
  "lazy-error": _ctx.error,
34
35
  "lazy-loading": _ctx.loading,
35
36
  style: _normalizeStyle({
@@ -50,6 +51,7 @@ export function render(_ctx, _cache) {
50
51
  key: 1,
51
52
  class: _normalizeClass(_ctx.n('image')),
52
53
  alt: _ctx.alt,
54
+ title: _ctx.title,
53
55
  style: _normalizeStyle({
54
56
  objectFit: _ctx.fit
55
57
  }),
package/es/image/props.js CHANGED
@@ -14,6 +14,9 @@ export var props = {
14
14
  alt: {
15
15
  type: String
16
16
  },
17
+ title: {
18
+ type: String
19
+ },
17
20
  width: {
18
21
  type: [String, Number]
19
22
  },
package/es/varlet.esm.js CHANGED
@@ -7488,6 +7488,9 @@ var uc = {
7488
7488
  alt: {
7489
7489
  type: String
7490
7490
  },
7491
+ title: {
7492
+ type: String
7493
+ },
7491
7494
  width: {
7492
7495
  type: [String, Number]
7493
7496
  },
@@ -7528,7 +7531,7 @@ var uc = {
7528
7531
  }, {
7529
7532
  n: dc,
7530
7533
  classes: vc
7531
- } = _("image"), fc = ["alt", "lazy-error", "lazy-loading"], cc = ["alt", "src"];
7534
+ } = _("image"), fc = ["alt", "title", "lazy-error", "lazy-loading"], cc = ["alt", "title", "src"];
7532
7535
  function mc(e, n) {
7533
7536
  var r = je("lazy"), a = je("ripple");
7534
7537
  return Ce((w(), M(
@@ -7547,6 +7550,7 @@ function mc(e, n) {
7547
7550
  key: 0,
7548
7551
  class: m(e.n("image")),
7549
7552
  alt: e.alt,
7553
+ title: e.title,
7550
7554
  "lazy-error": e.error,
7551
7555
  "lazy-loading": e.loading,
7552
7556
  style: K({
@@ -7571,6 +7575,7 @@ function mc(e, n) {
7571
7575
  key: 1,
7572
7576
  class: m(e.n("image")),
7573
7577
  alt: e.alt,
7578
+ title: e.title,
7574
7579
  style: K({
7575
7580
  objectFit: e.fit
7576
7581
  }),
@@ -745,7 +745,11 @@
745
745
  },
746
746
  "var-image/alt": {
747
747
  "type": "string",
748
- "description": "替代文本 默认值:-"
748
+ "description": "替代文本,和 `img` 标签原生属性一致 默认值:-"
749
+ },
750
+ "var-image/title": {
751
+ "type": "string",
752
+ "description": "图片描述性文字,和 `img` 标签原生属性一致 默认值:-"
749
753
  },
750
754
  "var-image/width": {
751
755
  "type": "string | number",
@@ -1712,8 +1716,8 @@
1712
1716
  "description": "是否禁用选项卡 默认值:false"
1713
1717
  },
1714
1718
  "var-tab-item/name": {
1715
- "type": "string | number",
1716
- "description": "视图的名字 默认值:index"
1719
+ "type": "string \\",
1720
+ "description": "视图的名字 默认值:number_"
1717
1721
  },
1718
1722
  "var-table/full-width": {
1719
1723
  "type": "string | number",
@@ -279,6 +279,7 @@
279
279
  "src",
280
280
  "fit",
281
281
  "alt",
282
+ "title",
282
283
  "width",
283
284
  "height",
284
285
  "radius",
@@ -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": "2.0.0",
4
+ "version": "2.0.2",
5
5
  "name": "VARLET",
6
6
  "contributions": {
7
7
  "html": {
@@ -1328,15 +1328,7 @@
1328
1328
  "slots": [
1329
1329
  {
1330
1330
  "name": "default",
1331
- "description": "面板的内容"
1332
- },
1333
- {
1334
- "name": "title",
1335
- "description": "面板的标题"
1336
- },
1337
- {
1338
- "name": "icon",
1339
- "description": "自定义右侧 icon"
1331
+ "description": "折叠面板的内容"
1340
1332
  }
1341
1333
  ]
1342
1334
  },
@@ -2213,7 +2205,16 @@
2213
2205
  },
2214
2206
  {
2215
2207
  "name": "alt",
2216
- "description": "替代文本",
2208
+ "description": "替代文本,和 `img` 标签原生属性一致",
2209
+ "default": "-",
2210
+ "value": {
2211
+ "type": "string",
2212
+ "kind": "expression"
2213
+ }
2214
+ },
2215
+ {
2216
+ "name": "title",
2217
+ "description": "图片描述性文字,和 `img` 标签原生属性一致",
2217
2218
  "default": "-",
2218
2219
  "value": {
2219
2220
  "type": "string",
@@ -2532,7 +2533,7 @@
2532
2533
  "slots": [
2533
2534
  {
2534
2535
  "name": "default",
2535
- "description": "自定义索引字符"
2536
+ "description": "索引栏内容"
2536
2537
  }
2537
2538
  ]
2538
2539
  },
@@ -4716,7 +4717,7 @@
4716
4717
  "slots": [
4717
4718
  {
4718
4719
  "name": "default",
4719
- "description": "step 的内容"
4720
+ "description": "steps 的内容"
4720
4721
  }
4721
4722
  ]
4722
4723
  },
@@ -4906,7 +4907,12 @@
4906
4907
  "name": "var-swipe-item",
4907
4908
  "attributes": [],
4908
4909
  "events": [],
4909
- "slots": []
4910
+ "slots": [
4911
+ {
4912
+ "name": "default",
4913
+ "description": "轮播项内容"
4914
+ }
4915
+ ]
4910
4916
  },
4911
4917
  {
4912
4918
  "name": "var-switch",
@@ -5073,9 +5079,9 @@
5073
5079
  {
5074
5080
  "name": "name",
5075
5081
  "description": "视图的名字",
5076
- "default": "index",
5082
+ "default": "number_",
5077
5083
  "value": {
5078
- "type": "string | number",
5084
+ "type": "string \\",
5079
5085
  "kind": "expression"
5080
5086
  }
5081
5087
  }
@@ -25,8 +25,8 @@ var {
25
25
 
26
26
  var _withScopeId = n => ((0, _vue.pushScopeId)(""), n = n(), (0, _vue.popScopeId)(), n);
27
27
 
28
- var _hoisted_1 = ["alt", "lazy-error", "lazy-loading"];
29
- var _hoisted_2 = ["alt", "src"];
28
+ var _hoisted_1 = ["alt", "title", "lazy-error", "lazy-loading"];
29
+ var _hoisted_2 = ["alt", "title", "src"];
30
30
 
31
31
  function render(_ctx, _cache) {
32
32
  var _directive_lazy = (0, _vue.resolveDirective)("lazy");
@@ -44,6 +44,7 @@ function render(_ctx, _cache) {
44
44
  key: 0,
45
45
  class: (0, _vue.normalizeClass)(_ctx.n('image')),
46
46
  alt: _ctx.alt,
47
+ title: _ctx.title,
47
48
  "lazy-error": _ctx.error,
48
49
  "lazy-loading": _ctx.loading,
49
50
  style: (0, _vue.normalizeStyle)({
@@ -64,6 +65,7 @@ function render(_ctx, _cache) {
64
65
  key: 1,
65
66
  class: (0, _vue.normalizeClass)(_ctx.n('image')),
66
67
  alt: _ctx.alt,
68
+ title: _ctx.title,
67
69
  style: (0, _vue.normalizeStyle)({
68
70
  objectFit: _ctx.fit
69
71
  }),
@@ -19,6 +19,9 @@ var props = {
19
19
  alt: {
20
20
  type: String
21
21
  },
22
+ title: {
23
+ type: String
24
+ },
22
25
  width: {
23
26
  type: [String, Number]
24
27
  },
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@varlet/ui",
3
- "version": "2.0.1",
3
+ "version": "2.0.3-alpha.1665825802777",
4
4
  "description": "A material like components library",
5
5
  "module": "es/index.js",
6
6
  "main": "lib/index.js",
@@ -46,16 +46,16 @@
46
46
  },
47
47
  "dependencies": {
48
48
  "@popperjs/core": "^2.11.6",
49
- "@varlet/icons": "2.0.1",
50
- "@varlet/shared": "2.0.1",
49
+ "@varlet/icons": "2.0.3-alpha.1665825802777",
50
+ "@varlet/shared": "2.0.3-alpha.1665825802777",
51
51
  "dayjs": "^1.10.4",
52
52
  "decimal.js": "^10.2.1"
53
53
  },
54
54
  "devDependencies": {
55
55
  "@types/jest": "^26.0.15",
56
56
  "@types/node": "^18.7.18",
57
- "@varlet/cli": "2.0.1",
58
- "@varlet/touch-emulator": "2.0.1",
57
+ "@varlet/cli": "2.0.3-alpha.1665825802777",
58
+ "@varlet/touch-emulator": "2.0.3-alpha.1665825802777",
59
59
  "@vue/runtime-core": "3.2.25",
60
60
  "@vue/test-utils": "^2.0.2",
61
61
  "clipboard": "^2.0.6",
@@ -1,5 +1,6 @@
1
1
  import type { App, TeleportProps } from 'vue'
2
2
  import { VarComponent, BasicAttributes } from './varComponent'
3
+ import { VNode } from 'vue'
3
4
 
4
5
  export interface ActionSheetProps extends BasicAttributes {
5
6
  actions?: ActionItem[]
@@ -50,6 +51,12 @@ export interface ActionSheetOptions {
50
51
 
51
52
  export class ActionSheetComponent extends VarComponent {
52
53
  $props: ActionSheetProps
54
+
55
+ $slots: {
56
+ default(): VNode[]
57
+ title(): VNode[]
58
+ actions(): VNode[]
59
+ }
53
60
  }
54
61
 
55
62
  export type ActionSheetActions = ActionItem | 'close'
package/types/appBar.d.ts CHANGED
@@ -1,4 +1,5 @@
1
1
  import { VarComponent, BasicAttributes } from './varComponent'
2
+ import { VNode } from 'vue'
2
3
 
3
4
  export type AppBarTitlePosition = 'left' | 'center' | 'right'
4
5
 
@@ -12,6 +13,12 @@ export interface AppBarProps extends BasicAttributes {
12
13
 
13
14
  export class AppBar extends VarComponent {
14
15
  $props: AppBarProps
16
+
17
+ $slots: {
18
+ default(): VNode[]
19
+ left(): VNode[]
20
+ right(): VNode[]
21
+ }
15
22
  }
16
23
 
17
24
  export class _AppBarComponent extends AppBar {}
@@ -1,4 +1,5 @@
1
1
  import { VarComponent, BasicAttributes } from './varComponent'
2
+ import { VNode } from 'vue'
2
3
 
3
4
  export interface BackTopProps extends BasicAttributes {
4
5
  visibilityHeight?: number | string
@@ -11,6 +12,10 @@ export interface BackTopProps extends BasicAttributes {
11
12
 
12
13
  export class BackTop extends VarComponent {
13
14
  $props: BackTopProps
15
+
16
+ $slots: {
17
+ default(): VNode[]
18
+ }
14
19
  }
15
20
 
16
21
  export class _BackTopComponent extends BackTop {}
package/types/badge.d.ts CHANGED
@@ -1,4 +1,5 @@
1
1
  import { VarComponent, BasicAttributes, Type as BadgeType } from './varComponent'
2
+ import { VNode } from 'vue'
2
3
 
3
4
  export type BadgePosition = 'right-top' | 'right-bottom' | 'left-top' | 'left-bottom'
4
5
 
@@ -17,6 +18,10 @@ export interface BadgeProps extends BasicAttributes {
17
18
 
18
19
  export class Badge extends VarComponent {
19
20
  $props: BadgeProps
21
+
22
+ $slots: {
23
+ default(): VNode[]
24
+ }
20
25
  }
21
26
 
22
27
  export class _BadgeComponent extends Badge {}
@@ -1,5 +1,6 @@
1
1
  import { VarComponent, BasicAttributes } from './varComponent'
2
2
  import { ButtonProps } from './button'
3
+ import { VNode } from 'vue'
3
4
 
4
5
  export interface BottomNavigationProps extends BasicAttributes {
5
6
  active?: number | string
@@ -18,6 +19,10 @@ export interface BottomNavigationProps extends BasicAttributes {
18
19
 
19
20
  export class BottomNavigation extends VarComponent {
20
21
  $props: BottomNavigationProps
22
+
23
+ $slots: {
24
+ fab(): VNode[]
25
+ }
21
26
  }
22
27
 
23
28
  export class _BottomNavigationComponent extends BottomNavigation {}
@@ -1,5 +1,6 @@
1
1
  import { VarComponent, BasicAttributes } from './varComponent'
2
2
  import { BadgeProps } from './badge'
3
+ import { VNode } from 'vue'
3
4
 
4
5
  export interface BottomNavigationItemProps extends BasicAttributes {
5
6
  name?: string
@@ -10,8 +11,17 @@ export interface BottomNavigationItemProps extends BasicAttributes {
10
11
  onClick?: (active: string | number) => void
11
12
  }
12
13
 
14
+ export interface BottomNavigationItemIcon {
15
+ active: boolean
16
+ }
17
+
13
18
  export class BottomNavigationItem extends VarComponent {
14
19
  $props: BottomNavigationItemProps
20
+
21
+ $slots: {
22
+ default(): VNode[]
23
+ icon(data: BottomNavigationItemIcon): VNode[]
24
+ }
15
25
  }
16
26
 
17
27
  export class _BottomNavigationItemComponent extends BottomNavigationItem {}
package/types/button.d.ts CHANGED
@@ -1,5 +1,6 @@
1
1
  import { VarComponent, BasicAttributes, Type as ButtonType, Size as ButtonSize } from './varComponent'
2
2
  import { LoadingType, LoadingSize } from './loading'
3
+ import { VNode } from 'vue'
3
4
 
4
5
  export { ButtonType, ButtonSize }
5
6
 
@@ -26,6 +27,10 @@ export interface ButtonProps extends BasicAttributes {
26
27
 
27
28
  export class Button extends VarComponent {
28
29
  $props: ButtonProps
30
+
31
+ $slots: {
32
+ default(): VNode[]
33
+ }
29
34
  }
30
35
 
31
36
  export class _ButtonComponent extends Button {}
package/types/card.d.ts CHANGED
@@ -1,4 +1,5 @@
1
1
  import { VarComponent, BasicAttributes } from './varComponent'
2
+ import { VNode } from 'vue'
2
3
 
3
4
  export type CardFit = 'fill' | 'contain' | 'cover' | 'none' | 'scale-down'
4
5
 
@@ -24,6 +25,16 @@ export interface CardProps extends BasicAttributes {
24
25
 
25
26
  export class Card extends VarComponent {
26
27
  $props: CardProps
28
+
29
+ $slots: {
30
+ image(): VNode[]
31
+ title(): VNode[]
32
+ subtitle(): VNode[]
33
+ description(): VNode[]
34
+ extra(): VNode[]
35
+ 'close-button'(): VNode[]
36
+ 'floating-content'(): VNode[]
37
+ }
27
38
  }
28
39
 
29
40
  export class _CardComponent extends Card {}
package/types/cell.d.ts CHANGED
@@ -1,4 +1,5 @@
1
1
  import { VarComponent, BasicAttributes } from './varComponent'
2
+ import { VNode } from 'vue'
2
3
 
3
4
  export interface CellProps extends BasicAttributes {
4
5
  title?: string | number
@@ -13,6 +14,13 @@ export interface CellProps extends BasicAttributes {
13
14
 
14
15
  export class Cell extends VarComponent {
15
16
  $props: CellProps
17
+
18
+ $slots: {
19
+ default(): VNode[]
20
+ icon(): VNode[]
21
+ description(): VNode[]
22
+ extra(): VNode[]
23
+ }
16
24
  }
17
25
 
18
26
  export class _CellComponent extends Cell {}
@@ -1,4 +1,5 @@
1
1
  import { VarComponent, BasicAttributes } from './varComponent'
2
+ import { VNode } from 'vue'
2
3
 
3
4
  export type CheckboxValidateTriggers = 'onChange'
4
5
 
@@ -22,6 +23,12 @@ export interface CheckboxProps extends BasicAttributes {
22
23
  export class Checkbox extends VarComponent {
23
24
  $props: CheckboxProps
24
25
 
26
+ $slots: {
27
+ default(): VNode[]
28
+ 'checked-icon'(): VNode[]
29
+ 'unchecked-icon'(): VNode[]
30
+ }
31
+
25
32
  validate(): Promise<boolean>
26
33
 
27
34
  resetValidation(): void
@@ -1,4 +1,5 @@
1
1
  import { VarComponent, BasicAttributes, Direction as CheckboxGroupDirection } from './varComponent'
2
+ import { VNode } from 'vue'
2
3
 
3
4
  export type CheckboxGroupValidateTrigger = 'onChange'
4
5
 
@@ -17,6 +18,10 @@ export interface CheckboxGroupProps extends BasicAttributes {
17
18
  export class CheckboxGroup extends VarComponent {
18
19
  $props: CheckboxGroupProps
19
20
 
21
+ $slots: {
22
+ default(): VNode[]
23
+ }
24
+
20
25
  validate(): Promise<boolean>
21
26
 
22
27
  resetValidation(): void
package/types/chip.d.ts CHANGED
@@ -1,4 +1,5 @@
1
1
  import { VarComponent, BasicAttributes, Type as ChipType, Size as ChipSize } from './varComponent'
2
+ import { VNode } from 'vue'
2
3
 
3
4
  export { ChipType, ChipSize }
4
5
 
@@ -17,6 +18,12 @@ export interface ChipProps extends BasicAttributes {
17
18
 
18
19
  export class Chip extends VarComponent {
19
20
  $props: ChipProps
21
+
22
+ $slots: {
23
+ default(): VNode[]
24
+ left(): VNode[]
25
+ right(): VNode[]
26
+ }
20
27
  }
21
28
 
22
29
  export class _ChipComponent extends Chip {}
package/types/col.d.ts CHANGED
@@ -1,4 +1,5 @@
1
1
  import { VarComponent, BasicAttributes } from './varComponent'
2
+ import { VNode } from 'vue'
2
3
 
3
4
  export type ColSizeDescriptor = {
4
5
  span?: number | string
@@ -21,6 +22,10 @@ export interface ColProps extends BasicAttributes {
21
22
 
22
23
  export class Col extends VarComponent {
23
24
  $props: ColProps
25
+
26
+ $slots: {
27
+ default(): VNode[]
28
+ }
24
29
  }
25
30
 
26
31
  export class _ColComponent extends Col {}
@@ -1,4 +1,5 @@
1
1
  import { VarComponent, BasicAttributes } from './varComponent'
2
+ import { VNode } from 'vue'
2
3
 
3
4
  export type CollapseModelValue = null | string | number | Array<string | number>
4
5
 
@@ -12,6 +13,10 @@ export interface CollapseProps extends BasicAttributes {
12
13
 
13
14
  export class Collapse extends VarComponent {
14
15
  $props: CollapseProps
16
+
17
+ $slots: {
18
+ default(): VNode[]
19
+ }
15
20
  }
16
21
 
17
22
  export class _CollapseComponent extends Collapse {}
@@ -1,4 +1,5 @@
1
1
  import { VarComponent, BasicAttributes } from './varComponent'
2
+ import { VNode } from 'vue'
2
3
 
3
4
  export interface CollapseItemProps extends BasicAttributes {
4
5
  name?: string | number
@@ -9,6 +10,12 @@ export interface CollapseItemProps extends BasicAttributes {
9
10
 
10
11
  export class CollapseItem extends VarComponent {
11
12
  $props: CollapseItemProps
13
+
14
+ $slots: {
15
+ default(): VNode[]
16
+ title(): VNode[]
17
+ icon(): VNode[]
18
+ }
12
19
  }
13
20
 
14
21
  export class _CollapseItemComponent extends CollapseItem {}
@@ -1,6 +1,7 @@
1
1
  import { VarComponent, BasicAttributes } from './varComponent'
2
+ import { VNode } from 'vue'
2
3
 
3
- export type TimeData = {
4
+ export interface CountdownTimeData {
4
5
  days: number
5
6
  hours: number
6
7
  minutes: number
@@ -13,12 +14,16 @@ export interface CountdownProps extends BasicAttributes {
13
14
  format?: string
14
15
  autoStart?: boolean
15
16
  onEnd?: () => void
16
- onChange?: (value: TimeData) => void
17
+ onChange?: (value: CountdownTimeData) => void
17
18
  }
18
19
 
19
20
  export class Countdown extends VarComponent {
20
21
  $props: CountdownProps
21
22
 
23
+ $slots: {
24
+ default(data: CountdownTimeData): VNode[]
25
+ }
26
+
22
27
  start(): void
23
28
 
24
29
  pause(): void
@@ -1,4 +1,5 @@
1
1
  import { VarComponent, BasicAttributes } from './varComponent'
2
+ import { VNode } from 'vue'
2
3
 
3
4
  export type DatePickerType = 'date' | 'month'
4
5
 
@@ -22,8 +23,37 @@ export interface DatePickerProps extends BasicAttributes {
22
23
  'onUpdate:modelValue'?: (value: string | string[]) => void
23
24
  }
24
25
 
26
+ export interface DatePickerYear {
27
+ year: string
28
+ }
29
+
30
+ export interface DatePickerMonth extends DatePickerYear {
31
+ month: string
32
+ }
33
+
34
+ export interface DatePickerDate extends DatePickerMonth {
35
+ date: string
36
+ week: string
37
+ }
38
+
39
+ export interface DatePickerRange {
40
+ choose: [string, string]
41
+ }
42
+
43
+ export interface DatePickerMultiple {
44
+ choose: Array<string>
45
+ }
46
+
25
47
  export class DatePicker extends VarComponent {
26
48
  $props: DatePickerProps
49
+
50
+ $slots: {
51
+ year(data: DatePickerYear): VNode[]
52
+ month(data: DatePickerMonth): VNode[]
53
+ date(data: DatePickerDate): VNode[]
54
+ range(data: DatePickerRange): VNode[]
55
+ multiple(data: DatePickerMultiple): VNode[]
56
+ }
27
57
  }
28
58
 
29
59
  export class _DatePickerComponent extends DatePicker {}
package/types/dialog.d.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  import { VarComponent, BasicAttributes } from './varComponent'
2
- import type { App, TeleportProps } from 'vue'
2
+ import type { App, TeleportProps, VNode } from 'vue'
3
3
 
4
4
  export type DialogTypeMessageAlign = 'left' | 'center' | 'right'
5
5
 
@@ -38,6 +38,11 @@ export interface DialogProps extends BasicAttributes {
38
38
 
39
39
  export class DialogComponent extends VarComponent {
40
40
  $props: DialogProps
41
+
42
+ $slots: {
43
+ default(): VNode[]
44
+ title(): VNode[]
45
+ }
41
46
  }
42
47
 
43
48
  export type DialogActions = 'confirm' | 'cancel' | 'close'
@@ -1,4 +1,5 @@
1
1
  import { VarComponent, BasicAttributes } from './varComponent'
2
+ import { VNode } from 'vue'
2
3
 
3
4
  export interface DividerProps extends BasicAttributes {
4
5
  inset?: boolean | number
@@ -10,6 +11,10 @@ export interface DividerProps extends BasicAttributes {
10
11
 
11
12
  export class Divider extends VarComponent {
12
13
  $props: DividerProps
14
+
15
+ $slots: {
16
+ default(): VNode[]
17
+ }
13
18
  }
14
19
 
15
20
  export class _DividerComponent extends Divider {}
package/types/form.d.ts CHANGED
@@ -1,4 +1,5 @@
1
1
  import { VarComponent, BasicAttributes } from './varComponent'
2
+ import { VNode } from 'vue'
2
3
 
3
4
  export interface FormProps extends BasicAttributes {
4
5
  disabled?: boolean
@@ -8,6 +9,10 @@ export interface FormProps extends BasicAttributes {
8
9
  export class Form extends VarComponent {
9
10
  $props: FormProps
10
11
 
12
+ $slots: {
13
+ default(): VNode[]
14
+ }
15
+
11
16
  validate(): Promise<boolean>
12
17
 
13
18
  resetValidation(): void