@varlet/ui 2.21.0 → 2.22.0-alpha.1705845515578

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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@varlet/ui",
3
- "version": "2.21.0",
3
+ "version": "2.22.0-alpha.1705845515578",
4
4
  "description": "A material like components library",
5
5
  "main": "lib/varlet.cjs.js",
6
6
  "module": "es/index.mjs",
@@ -48,9 +48,9 @@
48
48
  "@popperjs/core": "^2.11.6",
49
49
  "dayjs": "^1.10.4",
50
50
  "decimal.js": "^10.2.1",
51
- "@varlet/icons": "2.21.0",
52
- "@varlet/shared": "2.21.0",
53
- "@varlet/use": "2.21.0"
51
+ "@varlet/icons": "2.22.0-alpha.1705845515578",
52
+ "@varlet/shared": "2.22.0-alpha.1705845515578",
53
+ "@varlet/use": "2.22.0-alpha.1705845515578"
54
54
  },
55
55
  "devDependencies": {
56
56
  "@vue/runtime-core": "3.4.3",
@@ -66,9 +66,9 @@
66
66
  "typescript": "^5.1.5",
67
67
  "vue": "3.4.3",
68
68
  "vue-router": "4.2.0",
69
- "@varlet/touch-emulator": "2.21.0",
70
- "@varlet/cli": "2.21.0",
71
- "@varlet/ui": "2.21.0"
69
+ "@varlet/cli": "2.22.0-alpha.1705845515578",
70
+ "@varlet/ui": "2.22.0-alpha.1705845515578",
71
+ "@varlet/touch-emulator": "2.22.0-alpha.1705845515578"
72
72
  },
73
73
  "scripts": {
74
74
  "dev": "varlet-cli dev",
package/types/form.d.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  import { VarComponent, BasicAttributes, ListenerProp, SetPropsDefaults } from './varComponent'
2
- import { ComputedRef, VNode, Ref } from 'vue'
2
+ import type { ComputedRef, Ref, VNode } from 'vue'
3
3
 
4
4
  export declare const formProps: Record<keyof FormProps, any>
5
5
 
@@ -29,6 +29,7 @@ export class IndexBar extends VarComponent {
29
29
 
30
30
  $slots: {
31
31
  default(): VNode[]
32
+ 'anchor-name'(anchorName: string): VNode[]
32
33
  }
33
34
 
34
35
  scrollTo: (index: number | string, options?: IndexBarScrollToOptions) => void
package/types/rate.d.ts CHANGED
@@ -21,7 +21,7 @@ export interface RateProps extends BasicAttributes {
21
21
  readonly?: boolean
22
22
  clearable?: boolean
23
23
  ripple?: boolean
24
- rules?: Array<(value: any) => any>
24
+ rules?: Array<(value: number) => any>
25
25
  onChange?: ListenerProp<(value: number) => void>
26
26
  'onUpdate:modelValue'?: ListenerProp<(value: number) => void>
27
27
  }
@@ -1027,6 +1027,8 @@ export interface StyleVars {
1027
1027
  snackbarContentPadding?: string
1028
1028
  '--snackbar-action-margin'?: string
1029
1029
  snackbarActionMargin?: string
1030
+ '--snackbar-icon-margin'?: string
1031
+ snackbarIconMargin?: string
1030
1032
  '--snackbar-vertical-action-margin'?: string
1031
1033
  snackbarVerticalActionMargin?: string
1032
1034
  '--space-size-mini-y'?: string
package/types/switch.d.ts CHANGED
@@ -2,6 +2,8 @@ import { VarComponent, BasicAttributes, ListenerProp, SetPropsDefaults } from '.
2
2
 
3
3
  export declare const switchProps: Record<keyof SwitchProps, any>
4
4
 
5
+ export type SwitchValidateTrigger = 'onChange' | 'onLazyChange'
6
+
5
7
  export interface SwitchProps extends BasicAttributes {
6
8
  modelValue?: any
7
9
  activeValue?: any
@@ -14,10 +16,13 @@ export interface SwitchProps extends BasicAttributes {
14
16
  loadingColor?: string
15
17
  closeColor?: string
16
18
  size?: string | number
19
+ lazyChange?: boolean
20
+ validateTrigger?: Array<SwitchValidateTrigger>
17
21
  rules?: Array<(value: any) => any>
18
22
  onClick?: ListenerProp<(event: Event) => void>
19
- onChange?: ListenerProp<(value: boolean) => void>
20
- 'onUpdate:modelValue'?: ListenerProp<(value: boolean) => void>
23
+ onChange?: ListenerProp<(value: any) => void>
24
+ 'onUpdate:modelValue'?: ListenerProp<(value: any) => void>
25
+ onBeforeChange?: ListenerProp<(value: any, change: (value: any) => void) => void>
21
26
  }
22
27
 
23
28
  export class Switch extends VarComponent {