@varlet/ui 3.15.2 → 3.16.0-alpha.1778498431663

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 (43) hide show
  1. package/README.md +0 -1
  2. package/README.zh-CN.md +0 -1
  3. package/es/action-sheet/style/index.mjs +1 -1
  4. package/es/card/Card.mjs +26 -4
  5. package/es/card/card.css +1 -1
  6. package/es/card/props.mjs +2 -0
  7. package/es/card/style/index.mjs +1 -0
  8. package/es/index.bundle.mjs +7 -1
  9. package/es/index.mjs +6 -1
  10. package/es/otp-input/OtpInput.mjs +424 -0
  11. package/es/otp-input/OtpInputSfc.css +0 -0
  12. package/es/otp-input/index.mjs +12 -0
  13. package/es/otp-input/otpInput.css +1 -0
  14. package/es/otp-input/props.mjs +78 -0
  15. package/es/otp-input/style/index.mjs +7 -0
  16. package/es/paper/Paper.mjs +23 -6
  17. package/es/paper/paper.css +1 -1
  18. package/es/paper/props.mjs +2 -0
  19. package/es/paper/style/index.mjs +1 -0
  20. package/es/style.mjs +1 -0
  21. package/es/themes/dark/index.mjs +3 -2
  22. package/es/themes/dark/otpInput.mjs +10 -0
  23. package/es/themes/md3-dark/card.mjs +1 -0
  24. package/es/themes/md3-dark/index.mjs +3 -2
  25. package/es/themes/md3-dark/otpInput.mjs +10 -0
  26. package/es/themes/md3-dark/paper.mjs +1 -0
  27. package/es/themes/md3-light/card.mjs +1 -0
  28. package/es/themes/md3-light/index.mjs +3 -2
  29. package/es/themes/md3-light/otpInput.mjs +10 -0
  30. package/es/themes/md3-light/paper.mjs +1 -0
  31. package/es/varlet.css +1 -1
  32. package/es/varlet.esm.js +6994 -6583
  33. package/highlight/web-types.en-US.json +237 -1
  34. package/highlight/web-types.zh-CN.json +237 -1
  35. package/lib/varlet.cjs.js +2280 -1775
  36. package/lib/varlet.css +1 -1
  37. package/package.json +7 -7
  38. package/types/card.d.ts +4 -0
  39. package/types/index.d.ts +2 -0
  40. package/types/otpInput.d.ts +68 -0
  41. package/types/paper.d.ts +4 -0
  42. package/types/styleVars.d.ts +7 -0
  43. package/umd/varlet.js +7 -7
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@varlet/ui",
3
- "version": "3.15.2",
3
+ "version": "3.16.0-alpha.1778498431663",
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.15.2",
48
- "@varlet/shared": "3.15.2",
49
- "@varlet/use": "3.15.2"
47
+ "@varlet/icons": "3.16.0-alpha.1778498431663",
48
+ "@varlet/shared": "3.16.0-alpha.1778498431663",
49
+ "@varlet/use": "3.16.0-alpha.1778498431663"
50
50
  },
51
51
  "devDependencies": {
52
52
  "@types/node": "^20.19.0",
@@ -62,9 +62,9 @@
62
62
  "vue": "3.5.21",
63
63
  "vue-router": "4.5.1",
64
64
  "zod": "^3.23.8",
65
- "@varlet/cli": "3.15.2",
66
- "@varlet/ui": "3.15.2",
67
- "@varlet/touch-emulator": "3.15.2"
65
+ "@varlet/cli": "3.16.0-alpha.1778498431663",
66
+ "@varlet/touch-emulator": "3.16.0-alpha.1778498431663",
67
+ "@varlet/ui": "3.16.0-alpha.1778498431663"
68
68
  },
69
69
  "peerDependencies": {
70
70
  "vue": "^3.2.0"
package/types/card.d.ts CHANGED
@@ -9,8 +9,12 @@ export type CardLayout = 'row' | 'column'
9
9
 
10
10
  export type CardVariant = 'standard' | 'outlined' | 'filled'
11
11
 
12
+ export type CardSurface = 'low'
13
+
12
14
  export interface CardProps extends BasicAttributes {
13
15
  variant?: CardVariant
16
+ surface?: CardSurface
17
+ hoverable?: boolean
14
18
  src?: string
15
19
  fit?: CardFit
16
20
  imageHeight?: string | number
package/types/index.d.ts CHANGED
@@ -60,6 +60,7 @@ export * from './menu'
60
60
  export * from './menuOption'
61
61
  export * from './menuSelect'
62
62
  export * from './option'
63
+ export * from './otpInput'
63
64
  export * from './overlay'
64
65
  export * from './pagination'
65
66
  export * from './paper'
@@ -157,6 +158,7 @@ declare module 'vue' {
157
158
  VarMenuOption: typeof import('@varlet/ui')['_MenuOptionComponent']
158
159
  VarMenuSelect: typeof import('@varlet/ui')['_MenuSelectComponent']
159
160
  VarOption: typeof import('@varlet/ui')['_OptionComponent']
161
+ VarOtpInput: typeof import('@varlet/ui')['_OtpInputComponent']
160
162
  VarOverlay: typeof import('@varlet/ui')['_OverlayComponent']
161
163
  VarPagination: typeof import('@varlet/ui')['_PaginationComponent']
162
164
  VarPaper: typeof import('@varlet/ui')['_PaperComponent']
@@ -0,0 +1,68 @@
1
+ import { VNode } from 'vue'
2
+ import {
3
+ BasicAttributes,
4
+ ListenerProp,
5
+ Rules as OtpInputRules,
6
+ SetPropsDefaults,
7
+ VarComponent,
8
+ Variant as OtpInputVariant,
9
+ } from './varComponent'
10
+
11
+ export declare const otpInputProps: Record<keyof OtpInputProps, any>
12
+
13
+ export type OtpInputType = 'digit' | 'text' | 'alphanumeric'
14
+
15
+ export type OtpInputValidateTrigger = 'onInput' | 'onClick' | 'onPaste' | 'onComplete'
16
+
17
+ export interface OtpInputProps extends BasicAttributes {
18
+ modelValue?: string
19
+ length?: string | number
20
+ type?: OtpInputType
21
+ variant?: OtpInputVariant
22
+ mask?: boolean
23
+ maskSymbol?: string
24
+ cellHeight?: string | number
25
+ cellMaxWidth?: string | number
26
+ textColor?: string
27
+ focusColor?: string
28
+ blurColor?: string
29
+ disabled?: boolean
30
+ readonly?: boolean
31
+ autofocus?: boolean
32
+ gutter?: string | number
33
+ validateTrigger?: OtpInputValidateTrigger[]
34
+ rules?: OtpInputRules
35
+ allowPaste?: boolean
36
+ pasteTransform?: (value: string) => string
37
+ onInput?: ListenerProp<(value: string) => void>
38
+ onClick?: ListenerProp<(e: Event) => void>
39
+ onPaste?: ListenerProp<(value: string, e: ClipboardEvent) => void>
40
+ onComplete?: ListenerProp<(value: string) => void>
41
+ 'onUpdate:modelValue'?: ListenerProp<(value: string) => void>
42
+ }
43
+
44
+ export interface OtpInputSeparatorData {
45
+ index: number
46
+ }
47
+
48
+ export class OtpInput extends VarComponent {
49
+ static setPropsDefaults: SetPropsDefaults<OtpInputProps>
50
+
51
+ $props: OtpInputProps
52
+
53
+ $slots: {
54
+ separator(data: OtpInputSeparatorData): VNode[]
55
+ }
56
+
57
+ focus(index?: number): void
58
+
59
+ blur(): void
60
+
61
+ reset(): void
62
+
63
+ validate(): Promise<boolean>
64
+
65
+ resetValidation(): void
66
+ }
67
+
68
+ export class _OtpInputComponent extends OtpInput {}
package/types/paper.d.ts CHANGED
@@ -3,6 +3,8 @@ import { BasicAttributes, ListenerProp, SetPropsDefaults, VarComponent } from '.
3
3
 
4
4
  export declare const paperProps: Record<keyof PaperProps, any>
5
5
 
6
+ export type PaperSurface = 'low'
7
+
6
8
  export interface PaperProps extends BasicAttributes {
7
9
  elevation?: boolean | number | string
8
10
  ripple?: boolean
@@ -11,6 +13,8 @@ export interface PaperProps extends BasicAttributes {
11
13
  height?: string | number
12
14
  round?: boolean
13
15
  inline?: boolean
16
+ surface?: PaperSurface
17
+ hoverable?: boolean
14
18
  onClick?: ListenerProp<(e: Event) => void>
15
19
  }
16
20
 
@@ -158,6 +158,7 @@ interface BaseStyleVars {
158
158
  '--button-normal-font-size'?: string
159
159
  '--button-large-font-size'?: string
160
160
  '--card-background'?: string
161
+ '--card-surface-low-background'?: string
161
162
  '--card-filled-background'?: string
162
163
  '--card-padding'?: string
163
164
  '--card-border-radius'?: string
@@ -496,6 +497,11 @@ interface BaseStyleVars {
496
497
  '--menu-option-selected-background'?: string
497
498
  '--menu-option-text-color'?: string
498
499
  '--menu-option-disabled-color'?: string
500
+ '--otp-input-gutter'?: string
501
+ '--otp-input-cell-height'?: string
502
+ '--otp-input-cell-max-width'?: string
503
+ '--otp-input-input-font-size'?: string
504
+ '--otp-input-separator-color'?: string
499
505
  '--overlay-background-color'?: string
500
506
  '--pagination-text-color'?: string
501
507
  '--pagination-font-size'?: string
@@ -517,6 +523,7 @@ interface BaseStyleVars {
517
523
  '--pagination-size-padding'?: string
518
524
  '--pagination-quick-jumper-margin'?: string
519
525
  '--paper-background'?: string
526
+ '--paper-surface-low-background'?: string
520
527
  '--paper-border-radius'?: string
521
528
  '--picker-background'?: string
522
529
  '--picker-toolbar-height'?: string