@veritree/ui 0.86.0 → 0.87.1
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/mixins/form-control.js +4 -0
- package/package.json +2 -2
- package/src/components/Form/VTInput.vue +7 -0
- package/src/components/Form/VTInputDate.vue +11 -1
- package/src/components/Form/VTInputNumber.vue +6 -0
- package/src/components/Form/VTInputRanger.vue +10 -0
- package/src/components/Listbox/VTListboxTrigger.vue +9 -4
package/mixins/form-control.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@veritree/ui",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.87.1",
|
|
4
4
|
"description": "veritree ui library",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "index.js",
|
|
@@ -16,7 +16,7 @@
|
|
|
16
16
|
"release-any-branch": "np --no-tests --no-2fa --any-branch"
|
|
17
17
|
},
|
|
18
18
|
"dependencies": {
|
|
19
|
-
"@floating-ui/dom": "^1.6.
|
|
19
|
+
"@floating-ui/dom": "^1.6.12",
|
|
20
20
|
"@linusborg/vue-simple-portal": "^0.1.5",
|
|
21
21
|
"@sum.cumo/vue-datepicker": "^4.0.0",
|
|
22
22
|
"@veritree/icons": "^0.62.0",
|
|
@@ -1,7 +1,13 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<VTPopover>
|
|
3
3
|
<VTPopoverTrigger ref="trigger">
|
|
4
|
-
<button
|
|
4
|
+
<button
|
|
5
|
+
:id="id"
|
|
6
|
+
:class="classComputed"
|
|
7
|
+
:data-testid="dataTestid"
|
|
8
|
+
:disabled="disabled"
|
|
9
|
+
@click.prevent
|
|
10
|
+
>
|
|
5
11
|
<span v-if="valueModel">{{ valueModelFormatted }}</span>
|
|
6
12
|
<span class="text-gray-500" v-else>{{ format }}</span>
|
|
7
13
|
<span
|
|
@@ -66,6 +72,10 @@ export default {
|
|
|
66
72
|
},
|
|
67
73
|
|
|
68
74
|
props: {
|
|
75
|
+
dataTestid: {
|
|
76
|
+
type: String,
|
|
77
|
+
default: null,
|
|
78
|
+
},
|
|
69
79
|
disabledDates: {
|
|
70
80
|
type: [Function, Object],
|
|
71
81
|
default: null,
|
|
@@ -4,7 +4,9 @@
|
|
|
4
4
|
currencySymbol
|
|
5
5
|
}}</span>
|
|
6
6
|
<input
|
|
7
|
+
:id="id"
|
|
7
8
|
v-model="valueFormatted"
|
|
9
|
+
:data-testid="dataTestid"
|
|
8
10
|
:disabled="disabled"
|
|
9
11
|
:inputmode="inputmode"
|
|
10
12
|
:placeholder="placeholder"
|
|
@@ -35,6 +37,10 @@ export default {
|
|
|
35
37
|
},
|
|
36
38
|
|
|
37
39
|
props: {
|
|
40
|
+
dataTestid: {
|
|
41
|
+
type: String,
|
|
42
|
+
default: null,
|
|
43
|
+
},
|
|
38
44
|
currency: {
|
|
39
45
|
type: String,
|
|
40
46
|
default: 'USD',
|
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<div class="range-slider" :style="style">
|
|
3
3
|
<input
|
|
4
|
+
:id="id"
|
|
4
5
|
v-model.number="computedValue"
|
|
6
|
+
:data-testid="dataTestid"
|
|
5
7
|
:min="min"
|
|
6
8
|
:max="max"
|
|
7
9
|
:step="step"
|
|
@@ -24,6 +26,14 @@ export default {
|
|
|
24
26
|
},
|
|
25
27
|
|
|
26
28
|
props: {
|
|
29
|
+
id: {
|
|
30
|
+
type: String,
|
|
31
|
+
default: null,
|
|
32
|
+
},
|
|
33
|
+
dataTestid: {
|
|
34
|
+
type: String,
|
|
35
|
+
default: null,
|
|
36
|
+
},
|
|
27
37
|
value: {
|
|
28
38
|
type: [Number, String],
|
|
29
39
|
default: 0,
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<button
|
|
3
|
-
:id="
|
|
3
|
+
:id="idComputed"
|
|
4
|
+
:data-testid="dataTestid"
|
|
4
5
|
:class="triggerClassComputed"
|
|
5
6
|
:disabled="isDisabled"
|
|
6
7
|
:aria-expanded="expanded"
|
|
@@ -47,6 +48,10 @@ export default {
|
|
|
47
48
|
inject: ['apiListbox'],
|
|
48
49
|
|
|
49
50
|
props: {
|
|
51
|
+
dataTestid: {
|
|
52
|
+
type: String,
|
|
53
|
+
default: null,
|
|
54
|
+
},
|
|
50
55
|
role: {
|
|
51
56
|
type: String,
|
|
52
57
|
default: 'combobox',
|
|
@@ -69,8 +74,8 @@ export default {
|
|
|
69
74
|
},
|
|
70
75
|
|
|
71
76
|
computed: {
|
|
72
|
-
|
|
73
|
-
return `listbox-trigger-${this.apiListbox().id}`;
|
|
77
|
+
idComputed() {
|
|
78
|
+
return this.id || `listbox-trigger-${this.apiListbox().id}`;
|
|
74
79
|
},
|
|
75
80
|
|
|
76
81
|
componentContent() {
|
|
@@ -115,7 +120,7 @@ export default {
|
|
|
115
120
|
el: this.$el,
|
|
116
121
|
cancel: this.cancel,
|
|
117
122
|
focus: this.focus,
|
|
118
|
-
id: this.
|
|
123
|
+
id: this.idComputed,
|
|
119
124
|
};
|
|
120
125
|
|
|
121
126
|
this.apiListbox().registerTrigger(trigger);
|