@veritree/ui 0.19.2-2 → 0.20.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/nuxt.js +23 -27
- package/package.json +4 -5
- package/src/components/Button/VTButton.vue +1 -0
- package/src/components/Dialog/VTDialog.vue +3 -2
- package/src/components/Disclosure/VTDisclosureDetails.vue +1 -1
- package/src/components/Drawer/VTDrawer.vue +16 -9
- package/src/components/Drawer/VTDrawerClose.vue +5 -5
package/nuxt.js
CHANGED
|
@@ -1,30 +1,26 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { fileURLToPath } from 'node:url';
|
|
1
|
+
import { join } from 'path';
|
|
3
2
|
|
|
4
3
|
const components = [
|
|
5
|
-
'
|
|
6
|
-
'
|
|
7
|
-
'
|
|
8
|
-
'
|
|
9
|
-
'
|
|
10
|
-
'
|
|
11
|
-
'
|
|
12
|
-
'
|
|
13
|
-
'
|
|
14
|
-
'
|
|
15
|
-
'
|
|
16
|
-
'
|
|
17
|
-
'
|
|
18
|
-
]
|
|
4
|
+
'src/components/Alert',
|
|
5
|
+
'src/components/Avatar',
|
|
6
|
+
'src/components/Button',
|
|
7
|
+
'src/components/Drawer',
|
|
8
|
+
'src/components/Dialog',
|
|
9
|
+
'src/components/Disclosure',
|
|
10
|
+
'src/components/DropdownMenu',
|
|
11
|
+
'src/components/Form',
|
|
12
|
+
'src/components/Listbox',
|
|
13
|
+
'src/components/Image',
|
|
14
|
+
'src/components/Popover',
|
|
15
|
+
'src/components/ProgressBar',
|
|
16
|
+
'src/components/Tabs',
|
|
17
|
+
]
|
|
19
18
|
|
|
20
|
-
export default
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
},
|
|
29
|
-
},
|
|
30
|
-
});
|
|
19
|
+
export default function () {
|
|
20
|
+
this.nuxt.hook('components:dirs', dirs => {
|
|
21
|
+
// Add ./components dir to the list
|
|
22
|
+
components.forEach((component) => {
|
|
23
|
+
dirs.push(join(__dirname, component))
|
|
24
|
+
});
|
|
25
|
+
})
|
|
26
|
+
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@veritree/ui",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.20.0",
|
|
4
4
|
"description": "veritree ui library",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "index.js",
|
|
@@ -11,9 +11,8 @@
|
|
|
11
11
|
"access": "public"
|
|
12
12
|
},
|
|
13
13
|
"dependencies": {
|
|
14
|
-
"@
|
|
14
|
+
"@linusborg/vue-simple-portal": "^0.1.5",
|
|
15
|
+
"@veritree/icons": "^0.19.0"
|
|
15
16
|
},
|
|
16
|
-
"devDependencies": {
|
|
17
|
-
"@nuxt/kit": "^3.0.0-rc.12"
|
|
18
|
-
}
|
|
17
|
+
"devDependencies": {}
|
|
19
18
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<
|
|
2
|
+
<Portal>
|
|
3
3
|
<div
|
|
4
4
|
v-if="visible"
|
|
5
5
|
:id="id"
|
|
@@ -12,10 +12,11 @@
|
|
|
12
12
|
>
|
|
13
13
|
<slot></slot>
|
|
14
14
|
</div>
|
|
15
|
-
</
|
|
15
|
+
</Portal>
|
|
16
16
|
</template>
|
|
17
17
|
|
|
18
18
|
<script>
|
|
19
|
+
import { Portal } from '@linusborg/vue-simple-portal';
|
|
19
20
|
import { genId } from '../../utils/ids';
|
|
20
21
|
|
|
21
22
|
export default {
|
|
@@ -1,21 +1,28 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
2
|
+
<Portal>
|
|
3
|
+
<div
|
|
4
|
+
v-if="visible"
|
|
5
|
+
:id="id"
|
|
6
|
+
:class="{ Drawer: headless, 'fixed inset-0 z-50 h-screen': !headless }"
|
|
7
|
+
aria-modal="true"
|
|
8
|
+
@click="onClick"
|
|
9
|
+
>
|
|
10
|
+
<slot></slot>
|
|
11
|
+
</div>
|
|
12
|
+
</Portal>
|
|
11
13
|
</template>
|
|
12
14
|
|
|
13
15
|
<script>
|
|
16
|
+
import { Portal } from '@linusborg/vue-simple-portal';
|
|
14
17
|
import { genId } from '../../utils/ids';
|
|
15
18
|
|
|
16
19
|
export default {
|
|
17
20
|
name: 'VTDrawer',
|
|
18
21
|
|
|
22
|
+
components: {
|
|
23
|
+
Portal,
|
|
24
|
+
},
|
|
25
|
+
|
|
19
26
|
provide() {
|
|
20
27
|
return {
|
|
21
28
|
api: () => {
|
|
@@ -12,15 +12,15 @@
|
|
|
12
12
|
</template>
|
|
13
13
|
|
|
14
14
|
<script>
|
|
15
|
-
import { IconLeft } from
|
|
16
|
-
import VTButton from
|
|
15
|
+
import { IconLeft } from '@veritree/icons';
|
|
16
|
+
import VTButton from '../Button/VTButton.vue';
|
|
17
17
|
|
|
18
18
|
export default {
|
|
19
|
-
name:
|
|
19
|
+
name: 'VTDrawerClose',
|
|
20
20
|
|
|
21
21
|
components: { IconLeft, VTButton },
|
|
22
22
|
|
|
23
|
-
inject: [
|
|
23
|
+
inject: ['api'],
|
|
24
24
|
|
|
25
25
|
computed: {
|
|
26
26
|
dark() {
|
|
@@ -37,7 +37,7 @@ export default {
|
|
|
37
37
|
|
|
38
38
|
// temporary till button theme is implemented
|
|
39
39
|
theme() {
|
|
40
|
-
return this.dark ?
|
|
40
|
+
return this.dark ? 'dark' : null;
|
|
41
41
|
},
|
|
42
42
|
},
|
|
43
43
|
|