@varlet/ui 3.9.0 → 3.10.0

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": "3.9.0",
3
+ "version": "3.10.0",
4
4
  "description": "A Vue3 component library based on Material Design 2 and 3, supporting mobile and desktop.",
5
5
  "keywords": [
6
6
  "Vue3",
@@ -44,9 +44,9 @@
44
44
  "@popperjs/core": "^2.11.6",
45
45
  "dayjs": "^1.10.4",
46
46
  "decimal.js": "^10.2.1",
47
- "@varlet/icons": "3.9.0",
48
- "@varlet/shared": "3.9.0",
49
- "@varlet/use": "3.9.0"
47
+ "@varlet/icons": "3.10.0",
48
+ "@varlet/shared": "3.10.0",
49
+ "@varlet/use": "3.10.0"
50
50
  },
51
51
  "devDependencies": {
52
52
  "@types/node": "^18.7.18",
@@ -62,9 +62,9 @@
62
62
  "vue": "3.5.13",
63
63
  "vue-router": "4.5.0",
64
64
  "zod": "^3.23.8",
65
- "@varlet/cli": "3.9.0",
66
- "@varlet/ui": "3.9.0",
67
- "@varlet/touch-emulator": "3.9.0"
65
+ "@varlet/cli": "3.10.0",
66
+ "@varlet/ui": "3.10.0",
67
+ "@varlet/touch-emulator": "3.10.0"
68
68
  },
69
69
  "peerDependencies": {
70
70
  "vue": "^3.2.0"
package/types/index.d.ts CHANGED
@@ -74,6 +74,7 @@ export * from './result'
74
74
  export * from './ripple'
75
75
  export * from './row'
76
76
  export * from './select'
77
+ export * from './signature'
77
78
  export * from './skeleton'
78
79
  export * from './slider'
79
80
  export * from './snackbar'
@@ -169,6 +170,7 @@ declare module 'vue' {
169
170
  VarResult: typeof import('@varlet/ui')['_ResultComponent']
170
171
  VarRow: typeof import('@varlet/ui')['_RowComponent']
171
172
  VarSelect: typeof import('@varlet/ui')['_SelectComponent']
173
+ VarSignature: typeof import('@varlet/ui')['_SignatureComponent']
172
174
  VarSkeleton: typeof import('@varlet/ui')['_SkeletonComponent']
173
175
  VarSlider: typeof import('@varlet/ui')['_SliderComponent']
174
176
  VarSnackbar: typeof import('@varlet/ui')['_SnackbarComponent']
@@ -0,0 +1,26 @@
1
+ import { BasicAttributes, ListenerProp, SetPropsDefaults, VarComponent } from './varComponent'
2
+
3
+ export declare const signatureProps: Record<keyof SignatureProps, any>
4
+
5
+ export type SignatureDataUrlType = 'png' | 'jpg'
6
+
7
+ export interface SignatureProps extends BasicAttributes {
8
+ lineWidth?: number
9
+ strokeStyle?: string
10
+ dataUrlType?: SignatureDataUrlType
11
+ onStart?: ListenerProp<() => void>
12
+ onEnd?: ListenerProp<() => void>
13
+ onSigning?: ListenerProp<() => void>
14
+ }
15
+
16
+ export class Signature extends VarComponent {
17
+ static setPropsDefaults: SetPropsDefaults<SignatureProps>
18
+
19
+ $props: SignatureProps
20
+
21
+ confirm(): string
22
+
23
+ reset(): void
24
+ }
25
+
26
+ export class _SignatureComponent extends Signature {}
@@ -1,30 +1,33 @@
1
1
  import { VNode } from 'vue'
2
2
  import { BasicAttributes, SetPropsDefaults, VarComponent } from './varComponent'
3
3
 
4
- export declare const skeletonProps: Record<keyof SkeletonProps, any>
5
-
6
- export interface SkeletonProps extends BasicAttributes {
7
- loading?: boolean
8
- title?: boolean
9
- avatar?: boolean
10
- card?: boolean
11
- fullscreen?: boolean
12
- fullscreenZIndex?: string | number
13
- titleWidth?: string | number
14
- avatarSize?: string | number
15
- cardHeight?: string | number
16
- rows?: string | number
17
- rowsWidth?: (string | number)[]
4
+ export type SignatureType = 'png' | 'jpg'
5
+
6
+ export declare const signatureProps: Record<keyof SignatureProps, any>
7
+
8
+ export interface SignatureProps extends BasicAttributes {
9
+ modelValue?: string
10
+ lineWidth?: number
11
+ strokeStyle?: string
12
+ type?: SignatureType
13
+ unsupportText?: string
14
+ customClass?: string
15
+ height?: number | string
16
+ validateTrigger?: string[]
17
+ rules?: Array<(v: string) => any>
18
18
  }
19
19
 
20
- export class Skeleton extends VarComponent {
21
- static setPropsDefaults: SetPropsDefaults<SkeletonProps>
20
+ export class Signature extends VarComponent {
21
+ static setPropsDefaults: SetPropsDefaults<SignatureProps>
22
22
 
23
- $props: SkeletonProps
23
+ $props: SignatureProps
24
24
 
25
25
  $slots: {
26
26
  default(): VNode[]
27
27
  }
28
+
29
+ clear(): void
30
+ confirm(): void
28
31
  }
29
32
 
30
- export class _SkeletonComponent extends Skeleton {}
33
+ export class _SignatureComponent extends Signature {}
@@ -575,6 +575,10 @@ interface BaseStyleVars {
575
575
  '--option-font-size'?: string
576
576
  '--option-selected-background'?: string
577
577
  '--option-text-color'?: string
578
+ '--signature-height'?: string
579
+ '--signature-background-color'?: string
580
+ '--signature-stroke-color'?: string
581
+ '--signature-border-radius'?: string
578
582
  '--skeleton-content-padding'?: string
579
583
  '--skeleton-card-height'?: string
580
584
  '--skeleton-card-border-radius'?: string