@varlet/ui 2.9.6 → 2.10.0-alpha.1682067841655

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 (45) hide show
  1. package/es/fab/Fab.mjs +3 -5
  2. package/es/field-decorator/FieldDecorator.mjs +196 -0
  3. package/es/field-decorator/FieldDecoratorSfc.css +0 -0
  4. package/es/field-decorator/fieldDecorator.css +1 -0
  5. package/es/field-decorator/props.mjs +81 -0
  6. package/es/field-decorator/style/index.mjs +4 -0
  7. package/es/icon/icon.css +1 -1
  8. package/es/index.bundle.mjs +1 -1
  9. package/es/index.mjs +1 -1
  10. package/es/input/Input.mjs +173 -161
  11. package/es/input/input.css +1 -1
  12. package/es/input/props.mjs +7 -33
  13. package/es/input/style/index.mjs +2 -1
  14. package/es/menu/usePopover.mjs +2 -2
  15. package/es/option/Option.mjs +0 -3
  16. package/es/option/option.css +1 -1
  17. package/es/select/Select.mjs +104 -145
  18. package/es/select/props.mjs +7 -33
  19. package/es/select/select.css +1 -1
  20. package/es/select/style/index.mjs +1 -0
  21. package/es/snackbar/Snackbar.mjs +1 -0
  22. package/es/snackbar/core.mjs +4 -0
  23. package/es/snackbar/index.mjs +18 -3
  24. package/es/snackbar/props.mjs +1 -1
  25. package/es/snackbar/style/index.mjs +1 -1
  26. package/es/sticky/Sticky.mjs +2 -2
  27. package/es/style.css +1 -1
  28. package/es/swipe/Swipe.mjs +1 -1
  29. package/es/tabs/Tabs.mjs +1 -1
  30. package/es/themes/dark/fieldDecorator.mjs +4 -0
  31. package/es/themes/dark/index.mjs +2 -2
  32. package/es/themes/dark/select.mjs +0 -2
  33. package/es/utils/components.mjs +42 -9
  34. package/es/varlet.esm.js +6876 -6683
  35. package/highlight/web-types.en-US.json +23 -1
  36. package/highlight/web-types.zh-CN.json +41 -1
  37. package/lib/style.css +1 -1
  38. package/lib/varlet.cjs.js +1200 -979
  39. package/package.json +6 -6
  40. package/types/input.d.ts +5 -1
  41. package/types/select.d.ts +5 -1
  42. package/types/snackbar.d.ts +6 -1
  43. package/types/varComponent.d.ts +2 -0
  44. package/umd/varlet.js +5 -5
  45. package/es/themes/dark/input.mjs +0 -4
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@varlet/ui",
3
- "version": "2.9.6",
3
+ "version": "2.10.0-alpha.1682067841655",
4
4
  "description": "A material like components library",
5
5
  "main": "lib/varlet.cjs.js",
6
6
  "module": "es/index.mjs",
@@ -46,9 +46,9 @@
46
46
  "@popperjs/core": "^2.11.6",
47
47
  "dayjs": "^1.10.4",
48
48
  "decimal.js": "^10.2.1",
49
- "@varlet/icons": "2.9.6",
50
- "@varlet/use": "2.9.6",
51
- "@varlet/shared": "2.9.6"
49
+ "@varlet/icons": "2.10.0-alpha.1682067841655",
50
+ "@varlet/use": "2.10.0-alpha.1682067841655",
51
+ "@varlet/shared": "2.10.0-alpha.1682067841655"
52
52
  },
53
53
  "devDependencies": {
54
54
  "@types/jest": "^26.0.15",
@@ -63,8 +63,8 @@
63
63
  "typescript": "^4.4.4",
64
64
  "vue": "3.2.47",
65
65
  "vue-router": "4.1.6",
66
- "@varlet/cli": "2.9.6",
67
- "@varlet/touch-emulator": "2.9.6"
66
+ "@varlet/cli": "2.10.0-alpha.1682067841655",
67
+ "@varlet/touch-emulator": "2.10.0-alpha.1682067841655"
68
68
  },
69
69
  "browserslist": [
70
70
  "Chrome >= 54",
package/types/input.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import { VarComponent, BasicAttributes, ListenerProp } from './varComponent'
1
+ import { VarComponent, BasicAttributes, ListenerProp, Variant as InputVariant } from './varComponent'
2
2
  import { VNode } from 'vue'
3
3
 
4
4
  export declare const inputProps: Record<string, any>
@@ -7,9 +7,13 @@ export type InputValidateTrigger = 'onFocus' | 'onBlur' | 'onChange' | 'onClick'
7
7
 
8
8
  export type InputType = 'text' | 'password' | 'number' | 'tel' | 'email'
9
9
 
10
+ export type InputSize = 'small' | 'normal'
11
+
10
12
  export interface InputProps extends BasicAttributes {
11
13
  modelValue?: string
12
14
  type?: InputType
15
+ size?: InputSize
16
+ variant?: InputVariant
13
17
  textarea?: boolean
14
18
  rows?: string | number
15
19
  placeholder?: string
package/types/select.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import { VarComponent, BasicAttributes, ListenerProp } from './varComponent'
1
+ import { VarComponent, BasicAttributes, ListenerProp, Variant as SelectVariant } from './varComponent'
2
2
  import { VNode } from 'vue'
3
3
 
4
4
  export declare const selectProps: Record<string, any>
@@ -7,8 +7,12 @@ export type SelectValidateTrigger = 'onFocus' | 'onBlur' | 'onChange' | 'onClick
7
7
 
8
8
  export type SelectTextAlign = 'left' | 'right' | 'center'
9
9
 
10
+ export type SelectSize = 'small' | 'normal'
11
+
10
12
  export interface SelectProps extends BasicAttributes {
11
13
  modelValue?: any
14
+ variant?: SelectVariant
15
+ size?: SelectSize
12
16
  placeholder?: string
13
17
  multiple?: boolean
14
18
  offsetY?: number | string
@@ -8,9 +8,13 @@ export type SnackbarType = 'success' | 'warning' | 'info' | 'error' | 'loading'
8
8
 
9
9
  export declare const snackbarProps: Record<string, any>
10
10
 
11
+ export type SlotType = string | VNode | (() => VNode)
12
+
11
13
  export interface SnackbarProps extends BasicAttributes {
12
14
  type?: SnackbarType
13
- content?: string
15
+ content?: SlotType
16
+ icon?: SlotType
17
+ action?: SlotType
14
18
  position?: SnackbarPosition
15
19
  loadingType?: LoadingType
16
20
  loadingSize?: LoadingSize
@@ -35,6 +39,7 @@ export class SnackbarComponent extends VarComponent {
35
39
 
36
40
  $slots: {
37
41
  default(): VNode[]
42
+ icon(): VNode[]
38
43
  action(): VNode[]
39
44
  }
40
45
  }
@@ -12,6 +12,8 @@ export type Size = 'normal' | 'mini' | 'small' | 'large'
12
12
 
13
13
  export type Direction = 'horizontal' | 'vertical'
14
14
 
15
+ export type Variant = 'outlined' | 'standard'
16
+
15
17
  export type ListenerProp<F> = F | F[]
16
18
 
17
19
  export interface BasicAttributes {