@varlet/ui 2.1.0 → 2.2.0-alpha.1667670228109
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/CHANGELOG.md +1885 -1885
- package/es/checkbox/checkbox.css +1 -1
- package/es/counter/Counter.js +5 -5
- package/es/counter/counter.css +1 -1
- package/es/form/index.js +4 -0
- package/es/form-details/FormDetails.js +39 -8
- package/es/form-details/formDetails.css +1 -1
- package/es/form-details/props.js +1 -1
- package/es/index.d.ts +1 -1
- package/es/input/Input.js +3 -3
- package/es/input/input.css +1 -1
- package/es/locale/en-US.d.ts +5 -5
- package/es/locale/zh-CN.d.ts +5 -5
- package/es/radio/radio.css +1 -1
- package/es/select/select.css +1 -1
- package/es/style.css +1 -1
- package/es/themes/dark/index.d.ts +5 -5
- package/es/uploader/Uploader.js +2 -2
- package/es/varlet.esm.js +1971 -1933
- package/highlight/attributes.json +820 -0
- package/highlight/tags.json +265 -30
- package/highlight/web-types.json +3344 -1050
- package/json/area.json +10706 -10706
- package/lib/checkbox/checkbox.css +1 -1
- package/lib/counter/Counter.js +5 -5
- package/lib/counter/counter.css +1 -1
- package/lib/date-picker/src/day-picker-panel.js +13 -13
- package/lib/date-picker/src/month-picker-panel.js +11 -11
- package/lib/date-picker/src/year-picker-panel.js +3 -3
- package/lib/form/index.js +6 -0
- package/lib/form-details/FormDetails.js +38 -7
- package/lib/form-details/formDetails.css +1 -1
- package/lib/form-details/props.js +1 -1
- package/lib/index.d.ts +1 -1
- package/lib/input/Input.js +3 -3
- package/lib/input/input.css +1 -1
- package/lib/locale/en-US.d.ts +5 -5
- package/lib/locale/zh-CN.d.ts +5 -5
- package/lib/radio/radio.css +1 -1
- package/lib/select/select.css +1 -1
- package/lib/style.css +1 -1
- package/lib/themes/dark/index.d.ts +5 -5
- package/lib/uploader/Uploader.js +2 -2
- package/package.json +5 -5
- package/types/form.d.ts +28 -1
- package/types/formDetails.d.ts +12 -0
- package/types/index.d.ts +2 -0
- package/types/lazy.d.ts +5 -5
- package/types/ripple.d.ts +5 -5
- package/types/varDirective.d.ts +12 -12
- package/umd/varlet.js +7 -7
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { StyleVars } from '../../../types'
|
|
2
|
-
|
|
3
|
-
declare const dark: StyleVars
|
|
4
|
-
|
|
5
|
-
export default dark
|
|
1
|
+
import { StyleVars } from '../../../types'
|
|
2
|
+
|
|
3
|
+
declare const dark: StyleVars
|
|
4
|
+
|
|
5
|
+
export default dark
|
package/lib/uploader/Uploader.js
CHANGED
|
@@ -134,10 +134,10 @@ function render(_ctx, _cache) {
|
|
|
134
134
|
/* CLASS */
|
|
135
135
|
), (0, _vue.createVNode)(_component_var_form_details, {
|
|
136
136
|
"error-message": _ctx.errorMessage,
|
|
137
|
-
"
|
|
137
|
+
"extra-message": _ctx.maxlengthText
|
|
138
138
|
}, null, 8
|
|
139
139
|
/* PROPS */
|
|
140
|
-
, ["error-message", "
|
|
140
|
+
, ["error-message", "extra-message"]), (0, _vue.createVNode)(_component_var_popup, {
|
|
141
141
|
class: (0, _vue.normalizeClass)(_ctx.n('preview')),
|
|
142
142
|
"var-uploader-cover": "",
|
|
143
143
|
position: "center",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@varlet/ui",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.2.0-alpha.1667670228109",
|
|
4
4
|
"description": "A material like components library",
|
|
5
5
|
"module": "es/index.js",
|
|
6
6
|
"main": "lib/index.js",
|
|
@@ -46,8 +46,8 @@
|
|
|
46
46
|
},
|
|
47
47
|
"dependencies": {
|
|
48
48
|
"@popperjs/core": "^2.11.6",
|
|
49
|
-
"@varlet/icons": "2.
|
|
50
|
-
"@varlet/shared": "2.
|
|
49
|
+
"@varlet/icons": "2.2.0-alpha.1667670228109",
|
|
50
|
+
"@varlet/shared": "2.2.0-alpha.1667670228109",
|
|
51
51
|
"dayjs": "^1.10.4",
|
|
52
52
|
"decimal.js": "^10.2.1"
|
|
53
53
|
},
|
|
@@ -55,8 +55,8 @@
|
|
|
55
55
|
"@types/jest": "^26.0.15",
|
|
56
56
|
"@types/lodash-es": "^4.17.6",
|
|
57
57
|
"@types/node": "^18.7.18",
|
|
58
|
-
"@varlet/cli": "2.
|
|
59
|
-
"@varlet/touch-emulator": "2.
|
|
58
|
+
"@varlet/cli": "2.2.0-alpha.1667670228109",
|
|
59
|
+
"@varlet/touch-emulator": "2.2.0-alpha.1667670228109",
|
|
60
60
|
"@vue/runtime-core": "3.2.25",
|
|
61
61
|
"@vue/test-utils": "^2.0.2",
|
|
62
62
|
"clipboard": "^2.0.6",
|
package/types/form.d.ts
CHANGED
|
@@ -1,5 +1,16 @@
|
|
|
1
1
|
import { VarComponent, BasicAttributes } from './varComponent'
|
|
2
|
-
import { VNode } from 'vue'
|
|
2
|
+
import { ComputedRef, VNode, Ref } from 'vue'
|
|
3
|
+
|
|
4
|
+
export interface FormValidation {
|
|
5
|
+
validate(): Promise<boolean>
|
|
6
|
+
resetValidation(): void
|
|
7
|
+
reset(): void
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
export interface FormProvider {
|
|
11
|
+
disabled: ComputedRef<boolean>
|
|
12
|
+
readonly: ComputedRef<boolean>
|
|
13
|
+
}
|
|
3
14
|
|
|
4
15
|
export interface FormProps extends BasicAttributes {
|
|
5
16
|
disabled?: boolean
|
|
@@ -7,6 +18,22 @@ export interface FormProps extends BasicAttributes {
|
|
|
7
18
|
}
|
|
8
19
|
|
|
9
20
|
export class Form extends VarComponent {
|
|
21
|
+
static useForm(): {
|
|
22
|
+
form: FormProvider | null
|
|
23
|
+
|
|
24
|
+
bindForm: ((formValidation: FormValidation) => void) | null
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
static useValidation(): {
|
|
28
|
+
errorMessage: Ref<string>
|
|
29
|
+
|
|
30
|
+
validate(rules: any, value: any, apis?: any): Promise<boolean>
|
|
31
|
+
|
|
32
|
+
resetValidation(): void
|
|
33
|
+
|
|
34
|
+
validateWithTrigger<T>(validateTrigger: T[], trigger: T, rules: any, value: any, apis?: any): Promise<void>
|
|
35
|
+
}
|
|
36
|
+
|
|
10
37
|
$props: FormProps
|
|
11
38
|
|
|
12
39
|
$slots: {
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { VarComponent, BasicAttributes } from './varComponent'
|
|
2
|
+
|
|
3
|
+
export interface FormDetailsProps extends BasicAttributes {
|
|
4
|
+
errorMessage?: string
|
|
5
|
+
extraMessage?: string
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
export class FormDetails extends VarComponent {
|
|
9
|
+
$props: FormDetailsProps
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
export class _FormDetailsComponent extends FormDetails {}
|
package/types/index.d.ts
CHANGED
|
@@ -23,6 +23,7 @@ export * from './datePicker'
|
|
|
23
23
|
export * from './dialog'
|
|
24
24
|
export * from './divider'
|
|
25
25
|
export * from './form'
|
|
26
|
+
export * from './formDetails'
|
|
26
27
|
export * from './icon'
|
|
27
28
|
export * from './image'
|
|
28
29
|
export * from './imagePreview'
|
|
@@ -91,6 +92,7 @@ declare module 'vue' {
|
|
|
91
92
|
VarDialog: typeof import('@varlet/ui')['_DialogComponent']
|
|
92
93
|
VarDivider: typeof import('@varlet/ui')['_DividerComponent']
|
|
93
94
|
VarForm: typeof import('@varlet/ui')['_FormComponent']
|
|
95
|
+
VarFormDetails: typeof import('@varlet/ui')['_FormDetailsComponent']
|
|
94
96
|
VarIcon: typeof import('@varlet/ui')['_IconComponent']
|
|
95
97
|
VarImage: typeof import('@varlet/ui')['_ImageComponent']
|
|
96
98
|
VarImagePreview: typeof import('@varlet/ui')['_ImagePreviewComponent']
|
package/types/lazy.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { VarDirective } from './varDirective'
|
|
2
|
-
|
|
3
|
-
export class Lazy extends VarDirective {}
|
|
4
|
-
|
|
5
|
-
export class _LazyComponent extends Lazy {}
|
|
1
|
+
import { VarDirective } from './varDirective'
|
|
2
|
+
|
|
3
|
+
export class Lazy extends VarDirective {}
|
|
4
|
+
|
|
5
|
+
export class _LazyComponent extends Lazy {}
|
package/types/ripple.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { VarDirective } from './varDirective'
|
|
2
|
-
|
|
3
|
-
export class Ripple extends VarDirective {}
|
|
4
|
-
|
|
5
|
-
export class _RippleComponent extends Ripple {}
|
|
1
|
+
import { VarDirective } from './varDirective'
|
|
2
|
+
|
|
3
|
+
export class Ripple extends VarDirective {}
|
|
4
|
+
|
|
5
|
+
export class _RippleComponent extends Ripple {}
|
package/types/varDirective.d.ts
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import type { App } from 'vue'
|
|
2
|
-
import { DirectiveBinding } from '@vue/runtime-core'
|
|
3
|
-
|
|
4
|
-
export class VarDirective {
|
|
5
|
-
static install(app: App): void
|
|
6
|
-
|
|
7
|
-
static mounted(el: HTMLElement, binding: DirectiveBinding): void
|
|
8
|
-
|
|
9
|
-
static updated(el: HTMLElement, binding: DirectiveBinding): void
|
|
10
|
-
|
|
11
|
-
static unmounted(el: HTMLElement, binding: DirectiveBinding): void
|
|
12
|
-
}
|
|
1
|
+
import type { App } from 'vue'
|
|
2
|
+
import { DirectiveBinding } from '@vue/runtime-core'
|
|
3
|
+
|
|
4
|
+
export class VarDirective {
|
|
5
|
+
static install(app: App): void
|
|
6
|
+
|
|
7
|
+
static mounted(el: HTMLElement, binding: DirectiveBinding): void
|
|
8
|
+
|
|
9
|
+
static updated(el: HTMLElement, binding: DirectiveBinding): void
|
|
10
|
+
|
|
11
|
+
static unmounted(el: HTMLElement, binding: DirectiveBinding): void
|
|
12
|
+
}
|