@veritree/ui 0.14.0 → 0.15.0
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/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@veritree/ui",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.15.0",
|
|
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
|
|