@veritree/ui 0.13.0 → 0.15.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/index.js
CHANGED
|
@@ -33,6 +33,7 @@ import VTInput from "./src/components/Input/VTInput.vue";
|
|
|
33
33
|
import VTInputDate from "./src/components/Input/VTInputDate.vue";
|
|
34
34
|
import VTInputFile from "./src/components/Input/VTInputFile.vue";
|
|
35
35
|
import VTInputUpload from "./src/components/Input/VTInputUpload.vue";
|
|
36
|
+
import VTProgressBar from "./src/components/ProgressBar/VTProgressBar.vue";
|
|
36
37
|
|
|
37
38
|
import VTTextarea from "./src/components/Textarea/VTTextarea.vue";
|
|
38
39
|
|
|
@@ -103,6 +104,7 @@ export {
|
|
|
103
104
|
VTInputDate,
|
|
104
105
|
VTInputFile,
|
|
105
106
|
VTInputUpload,
|
|
107
|
+
VTProgressBar,
|
|
106
108
|
VTTextarea,
|
|
107
109
|
VTModal,
|
|
108
110
|
VTAccordion,
|
package/nuxt.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@veritree/ui",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.15.1",
|
|
4
4
|
"description": "veritree ui library",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "index.js",
|
|
@@ -11,6 +11,8 @@
|
|
|
11
11
|
"access": "public"
|
|
12
12
|
},
|
|
13
13
|
"dependencies": {
|
|
14
|
+
"@linusborg/vue-simple-portal": "^0.1.5",
|
|
14
15
|
"@veritree/icons": "^0.19.0"
|
|
15
|
-
}
|
|
16
|
+
},
|
|
17
|
+
"devDependencies": {}
|
|
16
18
|
}
|
|
@@ -1,23 +1,30 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
2
|
+
<Portal>
|
|
3
|
+
<div
|
|
4
|
+
v-if="visible"
|
|
5
|
+
:id="id"
|
|
6
|
+
:class="{
|
|
7
|
+
Dialog: headless,
|
|
8
|
+
'fixed inset-0 z-50 grid grid-cols-1 grid-rows-1 p-4 md:p-8': !headless,
|
|
9
|
+
}"
|
|
10
|
+
aria-modal="true"
|
|
11
|
+
@click="onClick"
|
|
12
|
+
>
|
|
13
|
+
<slot></slot>
|
|
14
|
+
</div>
|
|
15
|
+
</Portal>
|
|
14
16
|
</template>
|
|
15
17
|
|
|
16
18
|
<script>
|
|
17
|
-
import {
|
|
19
|
+
import { Portal } from '@linusborg/vue-simple-portal';
|
|
20
|
+
import { genId } from '../../utils/ids';
|
|
18
21
|
|
|
19
22
|
export default {
|
|
20
|
-
name:
|
|
23
|
+
name: 'VTDialog',
|
|
24
|
+
|
|
25
|
+
components: {
|
|
26
|
+
Portal,
|
|
27
|
+
},
|
|
21
28
|
|
|
22
29
|
provide() {
|
|
23
30
|
return {
|
|
@@ -56,7 +63,7 @@ export default {
|
|
|
56
63
|
},
|
|
57
64
|
|
|
58
65
|
model: {
|
|
59
|
-
prop:
|
|
66
|
+
prop: 'visible',
|
|
60
67
|
},
|
|
61
68
|
|
|
62
69
|
props: {
|
|
@@ -115,8 +122,8 @@ export default {
|
|
|
115
122
|
|
|
116
123
|
emit() {
|
|
117
124
|
this.$nextTick(() => {
|
|
118
|
-
this.$emit(
|
|
119
|
-
this.$emit(
|
|
125
|
+
this.$emit('input', false);
|
|
126
|
+
this.$emit('hidden');
|
|
120
127
|
});
|
|
121
128
|
},
|
|
122
129
|
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
:id="id"
|
|
5
5
|
:class="{
|
|
6
6
|
'Drawer-header': headless,
|
|
7
|
-
'flex items-center justify-between': !headless,
|
|
7
|
+
'mb-8 flex items-center justify-between gap-3': !headless,
|
|
8
8
|
}"
|
|
9
9
|
>
|
|
10
10
|
<slot></slot>
|
|
@@ -13,14 +13,14 @@
|
|
|
13
13
|
|
|
14
14
|
<script>
|
|
15
15
|
export default {
|
|
16
|
-
name:
|
|
16
|
+
name: 'VTDrawerHeader',
|
|
17
17
|
|
|
18
|
-
inject: [
|
|
18
|
+
inject: ['api'],
|
|
19
19
|
|
|
20
20
|
props: {
|
|
21
21
|
as: {
|
|
22
22
|
type: String,
|
|
23
|
-
default:
|
|
23
|
+
default: 'header',
|
|
24
24
|
},
|
|
25
25
|
},
|
|
26
26
|
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
:id="id"
|
|
5
5
|
:class="{
|
|
6
6
|
'Drawer-title': headless,
|
|
7
|
-
'
|
|
7
|
+
'text-2xl font-semibold': !headless,
|
|
8
8
|
}"
|
|
9
9
|
>
|
|
10
10
|
<slot></slot>
|
|
@@ -13,14 +13,14 @@
|
|
|
13
13
|
|
|
14
14
|
<script>
|
|
15
15
|
export default {
|
|
16
|
-
name:
|
|
16
|
+
name: 'VTDrawerTitle',
|
|
17
17
|
|
|
18
|
-
inject: [
|
|
18
|
+
inject: ['api'],
|
|
19
19
|
|
|
20
20
|
props: {
|
|
21
21
|
as: {
|
|
22
22
|
type: String,
|
|
23
|
-
default:
|
|
23
|
+
default: 'div',
|
|
24
24
|
},
|
|
25
25
|
},
|
|
26
26
|
|
|
@@ -48,7 +48,7 @@ export default {
|
|
|
48
48
|
const dialog = document.getElementById(this.api().id);
|
|
49
49
|
|
|
50
50
|
if (dialog) {
|
|
51
|
-
dialog.setAttribute(
|
|
51
|
+
dialog.setAttribute('aria-labelledby', this.id);
|
|
52
52
|
}
|
|
53
53
|
},
|
|
54
54
|
},
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div
|
|
3
|
+
:class="[
|
|
4
|
+
headless
|
|
5
|
+
? 'progress-bar'
|
|
6
|
+
: 'relative min-h-[10px] w-full overflow-hidden rounded-full bg-gray-200',
|
|
7
|
+
]"
|
|
8
|
+
role="progressbar"
|
|
9
|
+
aria-valuemin="0"
|
|
10
|
+
aria-valuemax="100"
|
|
11
|
+
:aria-valuenow="value"
|
|
12
|
+
:aria-label="label"
|
|
13
|
+
>
|
|
14
|
+
<div
|
|
15
|
+
:class="[
|
|
16
|
+
headless
|
|
17
|
+
? 'progress-bar__indicator'
|
|
18
|
+
: 'absolute left-0 h-full bg-secondary-300',
|
|
19
|
+
]"
|
|
20
|
+
:style="{ width: `${value}%` }"
|
|
21
|
+
></div>
|
|
22
|
+
</div>
|
|
23
|
+
</template>
|
|
24
|
+
|
|
25
|
+
<script>
|
|
26
|
+
export default {
|
|
27
|
+
props: {
|
|
28
|
+
headless: {
|
|
29
|
+
type: Boolean,
|
|
30
|
+
default: false,
|
|
31
|
+
},
|
|
32
|
+
label: {
|
|
33
|
+
type: String,
|
|
34
|
+
default: null,
|
|
35
|
+
},
|
|
36
|
+
value: {
|
|
37
|
+
type: [String, Number],
|
|
38
|
+
default: 0,
|
|
39
|
+
},
|
|
40
|
+
},
|
|
41
|
+
};
|
|
42
|
+
</script>
|