@veritree/ui 0.19.2-2 → 0.19.2-4
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 +2 -2
- package/src/components/Dialog/VTDialog.vue +1 -1
- package/src/components/Dialog/VTDialogClose.vue +9 -9
- package/src/components/Dialog/VTDialogContent.vue +9 -9
- package/src/components/Dialog/VTDialogFooter.vue +5 -5
- package/src/components/Dialog/VTDialogHeader.vue +8 -8
- package/src/components/Dialog/VTDialogMain.vue +8 -8
- package/src/components/Dialog/VTDialogOverlay.vue +7 -7
- package/src/components/Dialog/VTDialogTitle.vue +4 -4
- package/src/components/Drawer/VTDrawer.vue +12 -10
- package/src/components/Drawer/VTDrawerClose.vue +9 -9
- package/src/components/Drawer/VTDrawerContent.vue +8 -8
- package/src/components/Drawer/VTDrawerFooter.vue +3 -3
- package/src/components/Drawer/VTDrawerHeader.vue +4 -4
- package/src/components/Drawer/VTDrawerMain.vue +5 -5
- package/src/components/Drawer/VTDrawerOverlay.vue +6 -6
- package/src/components/Drawer/VTDrawerTitle.vue +5 -5
- package/src/components/DropdownMenu/VTDropdownMenu.vue +3 -3
- package/src/components/DropdownMenu/VTDropdownMenuContent.vue +10 -10
- package/src/components/DropdownMenu/VTDropdownMenuDivider.vue +3 -3
- package/src/components/DropdownMenu/VTDropdownMenuItem.vue +20 -9
- package/src/components/DropdownMenu/VTDropdownMenuTrigger.vue +27 -37
- package/src/components/Listbox/VTListbox.vue +5 -5
- package/src/components/Listbox/VTListboxContent.vue +15 -15
- package/src/components/Listbox/VTListboxItem.vue +13 -13
- package/src/components/Listbox/VTListboxLabel.vue +2 -2
- package/src/components/Listbox/VTListboxList.vue +4 -4
- package/src/components/Listbox/VTListboxSearch.vue +6 -6
- package/src/components/Listbox/VTListboxTrigger.vue +5 -5
- package/src/components/Popover/VTPopover.vue +3 -3
- package/src/components/Popover/VTPopoverContent.vue +13 -13
- package/src/components/Popover/VTPopoverDivider.vue +3 -3
- package/src/components/Popover/VTPopoverItem.vue +8 -4
- package/src/components/Popover/VTPopoverTrigger.vue +21 -16
- package/src/components/Tabs/VTTab.vue +9 -10
- package/src/components/Tabs/VTTabGroup.vue +9 -7
- package/src/components/Tabs/VTTabPanel.vue +3 -4
- package/src/components/Transitions/FadeInOut.vue +2 -2
- package/package-lock.json +0 -13
- package/src/components/Modal/VTModal.vue +0 -69
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@veritree/ui",
|
|
3
|
-
"version": "0.19.2-
|
|
3
|
+
"version": "0.19.2-4",
|
|
4
4
|
"description": "veritree ui library",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "index.js",
|
|
@@ -14,6 +14,6 @@
|
|
|
14
14
|
"@veritree/icons": "^0.36.1-0"
|
|
15
15
|
},
|
|
16
16
|
"devDependencies": {
|
|
17
|
-
"@nuxt/kit": "^3.0.0-rc.
|
|
17
|
+
"@nuxt/kit": "^3.0.0-rc.13"
|
|
18
18
|
}
|
|
19
19
|
}
|
|
@@ -12,38 +12,38 @@
|
|
|
12
12
|
</template>
|
|
13
13
|
|
|
14
14
|
<script>
|
|
15
|
-
import { IconClose } from
|
|
16
|
-
import VTButton from
|
|
15
|
+
import { IconClose } from '@veritree/icons';
|
|
16
|
+
import VTButton from '../Button/VTButton.vue';
|
|
17
17
|
|
|
18
18
|
export default {
|
|
19
|
-
name:
|
|
19
|
+
name: 'VTDialogClose',
|
|
20
20
|
|
|
21
21
|
components: { IconClose, VTButton },
|
|
22
22
|
|
|
23
|
-
inject: [
|
|
23
|
+
inject: ['apiDialog'],
|
|
24
24
|
|
|
25
25
|
computed: {
|
|
26
26
|
id() {
|
|
27
|
-
return `dialog-close-${this.
|
|
27
|
+
return `dialog-close-${this.apiDialog().componentId}`;
|
|
28
28
|
},
|
|
29
29
|
|
|
30
30
|
dark() {
|
|
31
|
-
return this.
|
|
31
|
+
return this.apiDialog().isDark;
|
|
32
32
|
},
|
|
33
33
|
|
|
34
34
|
headless() {
|
|
35
|
-
return this.
|
|
35
|
+
return this.apiDialog().isHeadless;
|
|
36
36
|
},
|
|
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
|
|
|
44
44
|
methods: {
|
|
45
45
|
hide() {
|
|
46
|
-
this.
|
|
46
|
+
this.apiDialog().hide();
|
|
47
47
|
},
|
|
48
48
|
},
|
|
49
49
|
};
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<transition
|
|
3
3
|
enter-active-class="duration-300 ease-out"
|
|
4
|
-
enter-class="translate-y-[50px] opacity-0"
|
|
4
|
+
enter-from-class="translate-y-[50px] opacity-0"
|
|
5
5
|
enter-to-class="translate-y-0 opacity-100"
|
|
6
6
|
leave-active-class="duration-300 ease-out"
|
|
7
|
-
leave-class="translate-y-0 opacity-100"
|
|
7
|
+
leave-from-class="translate-y-0 opacity-100"
|
|
8
8
|
leave-to-class="translate-y-[50px] opacity-0"
|
|
9
9
|
@after-leave="hideDialog"
|
|
10
10
|
>
|
|
@@ -28,9 +28,9 @@
|
|
|
28
28
|
|
|
29
29
|
<script>
|
|
30
30
|
export default {
|
|
31
|
-
name:
|
|
31
|
+
name: 'VTDialogContent',
|
|
32
32
|
|
|
33
|
-
inject: [
|
|
33
|
+
inject: ['apiDialog'],
|
|
34
34
|
|
|
35
35
|
data() {
|
|
36
36
|
return {
|
|
@@ -40,20 +40,20 @@ export default {
|
|
|
40
40
|
|
|
41
41
|
computed: {
|
|
42
42
|
id() {
|
|
43
|
-
return `dialog-content-${this.
|
|
43
|
+
return `dialog-content-${this.apiDialog().componentId}`;
|
|
44
44
|
},
|
|
45
45
|
|
|
46
46
|
dark() {
|
|
47
|
-
return this.
|
|
47
|
+
return this.apiDialog().isDark;
|
|
48
48
|
},
|
|
49
49
|
|
|
50
50
|
headless() {
|
|
51
|
-
return this.
|
|
51
|
+
return this.apiDialog().isHeadless;
|
|
52
52
|
},
|
|
53
53
|
},
|
|
54
54
|
|
|
55
55
|
mounted() {
|
|
56
|
-
this.
|
|
56
|
+
this.apiDialog().registerContent(this);
|
|
57
57
|
this.show();
|
|
58
58
|
|
|
59
59
|
this.$nextTick(() => this.$el.focus());
|
|
@@ -69,7 +69,7 @@ export default {
|
|
|
69
69
|
},
|
|
70
70
|
|
|
71
71
|
hideDialog() {
|
|
72
|
-
this.
|
|
72
|
+
this.apiDialog().emit();
|
|
73
73
|
},
|
|
74
74
|
},
|
|
75
75
|
};
|
|
@@ -9,24 +9,24 @@
|
|
|
9
9
|
|
|
10
10
|
<script>
|
|
11
11
|
export default {
|
|
12
|
-
name:
|
|
12
|
+
name: 'VTDialogFooter',
|
|
13
13
|
|
|
14
|
-
inject: [
|
|
14
|
+
inject: ['apiDialog'],
|
|
15
15
|
|
|
16
16
|
props: {
|
|
17
17
|
as: {
|
|
18
18
|
type: String,
|
|
19
|
-
default:
|
|
19
|
+
default: 'footer',
|
|
20
20
|
},
|
|
21
21
|
},
|
|
22
22
|
|
|
23
23
|
computed: {
|
|
24
24
|
dark() {
|
|
25
|
-
return this.
|
|
25
|
+
return this.apiDialog().isDark;
|
|
26
26
|
},
|
|
27
27
|
|
|
28
28
|
headless() {
|
|
29
|
-
return this.
|
|
29
|
+
return this.apiDialog().isHeadless;
|
|
30
30
|
},
|
|
31
31
|
},
|
|
32
32
|
};
|
|
@@ -13,28 +13,28 @@
|
|
|
13
13
|
|
|
14
14
|
<script>
|
|
15
15
|
export default {
|
|
16
|
-
name:
|
|
16
|
+
name: 'VTDialogHeader',
|
|
17
17
|
|
|
18
|
-
inject: [
|
|
18
|
+
inject: ['apiDialog'],
|
|
19
19
|
|
|
20
20
|
props: {
|
|
21
21
|
as: {
|
|
22
22
|
type: String,
|
|
23
|
-
default:
|
|
23
|
+
default: 'header',
|
|
24
24
|
},
|
|
25
25
|
},
|
|
26
26
|
|
|
27
27
|
computed: {
|
|
28
28
|
dark() {
|
|
29
|
-
return this.
|
|
29
|
+
return this.apiDialog().isDark;
|
|
30
30
|
},
|
|
31
31
|
|
|
32
32
|
headless() {
|
|
33
|
-
return this.
|
|
33
|
+
return this.apiDialog().isHeadless;
|
|
34
34
|
},
|
|
35
35
|
|
|
36
36
|
id() {
|
|
37
|
-
return `${this.
|
|
37
|
+
return `${this.apiDialog().id}-header`;
|
|
38
38
|
},
|
|
39
39
|
},
|
|
40
40
|
|
|
@@ -45,10 +45,10 @@ export default {
|
|
|
45
45
|
methods: {
|
|
46
46
|
// In here because if there is no header, the dialog will not be labelled by
|
|
47
47
|
setDialogLabelledby() {
|
|
48
|
-
const dialog = document.getElementById(this.
|
|
48
|
+
const dialog = document.getElementById(this.apiDialog().id);
|
|
49
49
|
|
|
50
50
|
if (dialog) {
|
|
51
|
-
dialog.setAttribute(
|
|
51
|
+
dialog.setAttribute('aria-labelledby', this.id);
|
|
52
52
|
}
|
|
53
53
|
},
|
|
54
54
|
},
|
|
@@ -13,28 +13,28 @@
|
|
|
13
13
|
|
|
14
14
|
<script>
|
|
15
15
|
export default {
|
|
16
|
-
name:
|
|
16
|
+
name: 'VTDialogMain',
|
|
17
17
|
|
|
18
|
-
inject: [
|
|
18
|
+
inject: ['apiDialog'],
|
|
19
19
|
|
|
20
20
|
props: {
|
|
21
21
|
as: {
|
|
22
22
|
type: String,
|
|
23
|
-
default:
|
|
23
|
+
default: 'main',
|
|
24
24
|
},
|
|
25
25
|
},
|
|
26
26
|
|
|
27
27
|
computed: {
|
|
28
28
|
dark() {
|
|
29
|
-
return this.
|
|
29
|
+
return this.apiDialog().isDark;
|
|
30
30
|
},
|
|
31
31
|
|
|
32
32
|
headless() {
|
|
33
|
-
return this.
|
|
33
|
+
return this.apiDialog().isHeadless;
|
|
34
34
|
},
|
|
35
35
|
|
|
36
36
|
id() {
|
|
37
|
-
return `${this.
|
|
37
|
+
return `${this.apiDialog().id}-desc`;
|
|
38
38
|
},
|
|
39
39
|
},
|
|
40
40
|
|
|
@@ -45,10 +45,10 @@ export default {
|
|
|
45
45
|
methods: {
|
|
46
46
|
// In here because if there is no body, the dialog will not be described by
|
|
47
47
|
setDialogDescribedby() {
|
|
48
|
-
const dialog = document.getElementById(this.
|
|
48
|
+
const dialog = document.getElementById(this.apiDialog().id);
|
|
49
49
|
|
|
50
50
|
if (dialog) {
|
|
51
|
-
dialog.setAttribute(
|
|
51
|
+
dialog.setAttribute('aria-describedby', this.id);
|
|
52
52
|
}
|
|
53
53
|
},
|
|
54
54
|
},
|
|
@@ -12,16 +12,16 @@
|
|
|
12
12
|
</template>
|
|
13
13
|
|
|
14
14
|
<script>
|
|
15
|
-
import FadeInOut from
|
|
15
|
+
import FadeInOut from '../Transitions/FadeInOut.vue';
|
|
16
16
|
|
|
17
17
|
export default {
|
|
18
|
-
name:
|
|
18
|
+
name: 'VTDialogOverlay',
|
|
19
19
|
|
|
20
20
|
components: {
|
|
21
21
|
FadeInOut,
|
|
22
22
|
},
|
|
23
23
|
|
|
24
|
-
inject: [
|
|
24
|
+
inject: ['apiDialog'],
|
|
25
25
|
|
|
26
26
|
data() {
|
|
27
27
|
return {
|
|
@@ -31,21 +31,21 @@ export default {
|
|
|
31
31
|
|
|
32
32
|
computed: {
|
|
33
33
|
id() {
|
|
34
|
-
return `dialog-overlay-${this.
|
|
34
|
+
return `dialog-overlay-${this.apiDialog().componentId}`;
|
|
35
35
|
},
|
|
36
36
|
|
|
37
37
|
dark() {
|
|
38
|
-
return this.
|
|
38
|
+
return this.apiDialog().isDark;
|
|
39
39
|
},
|
|
40
40
|
|
|
41
41
|
headless() {
|
|
42
|
-
return this.
|
|
42
|
+
return this.apiDialog().isHeadless;
|
|
43
43
|
},
|
|
44
44
|
},
|
|
45
45
|
|
|
46
46
|
mounted() {
|
|
47
47
|
this.visible = true;
|
|
48
|
-
this.
|
|
48
|
+
this.apiDialog().registerOverlay(this);
|
|
49
49
|
},
|
|
50
50
|
|
|
51
51
|
methods: {
|
|
@@ -9,17 +9,17 @@
|
|
|
9
9
|
|
|
10
10
|
<script>
|
|
11
11
|
export default {
|
|
12
|
-
name:
|
|
12
|
+
name: 'VTDialogTitle',
|
|
13
13
|
|
|
14
|
-
inject: [
|
|
14
|
+
inject: ['apiDialog'],
|
|
15
15
|
|
|
16
16
|
computed: {
|
|
17
17
|
headless() {
|
|
18
|
-
return this.
|
|
18
|
+
return this.apiDialog().isHeadless;
|
|
19
19
|
},
|
|
20
20
|
|
|
21
21
|
id() {
|
|
22
|
-
return `${this.
|
|
22
|
+
return `${this.apiDialog().id}-title`;
|
|
23
23
|
},
|
|
24
24
|
},
|
|
25
25
|
};
|
|
@@ -1,13 +1,15 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
2
|
+
<Teleport to="body">
|
|
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
|
+
</Teleport>
|
|
11
13
|
</template>
|
|
12
14
|
|
|
13
15
|
<script>
|
|
@@ -18,7 +20,7 @@ export default {
|
|
|
18
20
|
|
|
19
21
|
provide() {
|
|
20
22
|
return {
|
|
21
|
-
|
|
23
|
+
apiDrawer: () => {
|
|
22
24
|
const id = this.id;
|
|
23
25
|
const isDark = this.dark;
|
|
24
26
|
const isHeadless = this.headless;
|
|
@@ -12,38 +12,38 @@
|
|
|
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() {
|
|
27
|
-
return this.
|
|
27
|
+
return this.apiDrawer().isDark;
|
|
28
28
|
},
|
|
29
29
|
|
|
30
30
|
headless() {
|
|
31
|
-
return this.
|
|
31
|
+
return this.apiDrawer().isHeadless;
|
|
32
32
|
},
|
|
33
33
|
|
|
34
34
|
right() {
|
|
35
|
-
return this.
|
|
35
|
+
return this.apiDrawer().isRight;
|
|
36
36
|
},
|
|
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
|
|
|
44
44
|
methods: {
|
|
45
45
|
hide() {
|
|
46
|
-
this.
|
|
46
|
+
this.apiDrawer().hide();
|
|
47
47
|
},
|
|
48
48
|
},
|
|
49
49
|
};
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<transition
|
|
3
3
|
:enter-active-class="activeClass"
|
|
4
|
-
:enter-class="enterClass"
|
|
4
|
+
:enter-from-class="enterClass"
|
|
5
5
|
:enter-to-class="enterToClass"
|
|
6
6
|
:leave-active-class="activeClass"
|
|
7
|
-
:leave-class="leaveClass"
|
|
7
|
+
:leave-from-class="leaveClass"
|
|
8
8
|
:leave-to-class="leaveToClass"
|
|
9
9
|
@after-leave="hideDrawer"
|
|
10
10
|
>
|
|
@@ -33,7 +33,7 @@
|
|
|
33
33
|
export default {
|
|
34
34
|
name: 'VTDrawerContent',
|
|
35
35
|
|
|
36
|
-
inject: ['
|
|
36
|
+
inject: ['apiDrawer'],
|
|
37
37
|
|
|
38
38
|
data() {
|
|
39
39
|
return {
|
|
@@ -43,15 +43,15 @@ export default {
|
|
|
43
43
|
|
|
44
44
|
computed: {
|
|
45
45
|
dark() {
|
|
46
|
-
return this.
|
|
46
|
+
return this.apiDrawer().isDark;
|
|
47
47
|
},
|
|
48
48
|
|
|
49
49
|
headless() {
|
|
50
|
-
return this.
|
|
50
|
+
return this.apiDrawer().isHeadless;
|
|
51
51
|
},
|
|
52
52
|
|
|
53
53
|
position() {
|
|
54
|
-
return this.
|
|
54
|
+
return this.apiDrawer().position;
|
|
55
55
|
},
|
|
56
56
|
|
|
57
57
|
activeClass() {
|
|
@@ -132,7 +132,7 @@ export default {
|
|
|
132
132
|
},
|
|
133
133
|
|
|
134
134
|
mounted() {
|
|
135
|
-
this.
|
|
135
|
+
this.apiDrawer().registerContent(this);
|
|
136
136
|
this.show();
|
|
137
137
|
|
|
138
138
|
this.$nextTick(() => this.$el.focus());
|
|
@@ -148,7 +148,7 @@ export default {
|
|
|
148
148
|
},
|
|
149
149
|
|
|
150
150
|
hideDrawer() {
|
|
151
|
-
this.
|
|
151
|
+
this.apiDrawer().emit();
|
|
152
152
|
},
|
|
153
153
|
},
|
|
154
154
|
};
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
export default {
|
|
9
9
|
name: 'VTDrawerFooter',
|
|
10
10
|
|
|
11
|
-
inject: ['
|
|
11
|
+
inject: ['apiDrawer'],
|
|
12
12
|
|
|
13
13
|
props: {
|
|
14
14
|
as: {
|
|
@@ -19,11 +19,11 @@ export default {
|
|
|
19
19
|
|
|
20
20
|
computed: {
|
|
21
21
|
dark() {
|
|
22
|
-
return this.
|
|
22
|
+
return this.apiDrawer().isDark;
|
|
23
23
|
},
|
|
24
24
|
|
|
25
25
|
headless() {
|
|
26
|
-
return this.
|
|
26
|
+
return this.apiDrawer().isHeadless;
|
|
27
27
|
},
|
|
28
28
|
},
|
|
29
29
|
};
|
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
export default {
|
|
16
16
|
name: 'VTDrawerHeader',
|
|
17
17
|
|
|
18
|
-
inject: ['
|
|
18
|
+
inject: ['apiDrawer'],
|
|
19
19
|
|
|
20
20
|
props: {
|
|
21
21
|
as: {
|
|
@@ -26,15 +26,15 @@ export default {
|
|
|
26
26
|
|
|
27
27
|
computed: {
|
|
28
28
|
dark() {
|
|
29
|
-
return this.
|
|
29
|
+
return this.apiDrawer().isDark;
|
|
30
30
|
},
|
|
31
31
|
|
|
32
32
|
headless() {
|
|
33
|
-
return this.
|
|
33
|
+
return this.apiDrawer().isHeadless;
|
|
34
34
|
},
|
|
35
35
|
|
|
36
36
|
id() {
|
|
37
|
-
return `${this.
|
|
37
|
+
return `${this.apiDrawer().id}-header`;
|
|
38
38
|
},
|
|
39
39
|
},
|
|
40
40
|
};
|
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
export default {
|
|
13
13
|
name: 'VTDrawerMain',
|
|
14
14
|
|
|
15
|
-
inject: ['
|
|
15
|
+
inject: ['apiDrawer'],
|
|
16
16
|
|
|
17
17
|
props: {
|
|
18
18
|
as: {
|
|
@@ -23,15 +23,15 @@ export default {
|
|
|
23
23
|
|
|
24
24
|
computed: {
|
|
25
25
|
dark() {
|
|
26
|
-
return this.
|
|
26
|
+
return this.apiDrawer().isDark;
|
|
27
27
|
},
|
|
28
28
|
|
|
29
29
|
headless() {
|
|
30
|
-
return this.
|
|
30
|
+
return this.apiDrawer().isHeadless;
|
|
31
31
|
},
|
|
32
32
|
|
|
33
33
|
id() {
|
|
34
|
-
return `${this.
|
|
34
|
+
return `${this.apiDrawer().id}-desc`;
|
|
35
35
|
},
|
|
36
36
|
},
|
|
37
37
|
|
|
@@ -42,7 +42,7 @@ export default {
|
|
|
42
42
|
methods: {
|
|
43
43
|
// In here because if there is no body, the dialog will not be described by
|
|
44
44
|
setDialogDescribedby() {
|
|
45
|
-
const dialog = document.getElementById(this.
|
|
45
|
+
const dialog = document.getElementById(this.apiDrawer().id);
|
|
46
46
|
|
|
47
47
|
if (dialog) {
|
|
48
48
|
dialog.setAttribute('aria-describedby', this.id);
|
|
@@ -12,14 +12,14 @@
|
|
|
12
12
|
</template>
|
|
13
13
|
|
|
14
14
|
<script>
|
|
15
|
-
import FadeInOut from
|
|
15
|
+
import FadeInOut from '../Transitions/FadeInOut.vue';
|
|
16
16
|
|
|
17
17
|
export default {
|
|
18
18
|
components: {
|
|
19
19
|
FadeInOut,
|
|
20
20
|
},
|
|
21
21
|
|
|
22
|
-
inject: [
|
|
22
|
+
inject: ['api'],
|
|
23
23
|
|
|
24
24
|
data() {
|
|
25
25
|
return {
|
|
@@ -29,21 +29,21 @@ export default {
|
|
|
29
29
|
|
|
30
30
|
computed: {
|
|
31
31
|
dark() {
|
|
32
|
-
return this.
|
|
32
|
+
return this.apiDrawer().isDark;
|
|
33
33
|
},
|
|
34
34
|
|
|
35
35
|
headless() {
|
|
36
|
-
return this.
|
|
36
|
+
return this.apiDrawer().isHeadless;
|
|
37
37
|
},
|
|
38
38
|
|
|
39
39
|
id() {
|
|
40
|
-
return `${this.
|
|
40
|
+
return `${this.apiDrawer().id}-overlay`;
|
|
41
41
|
},
|
|
42
42
|
},
|
|
43
43
|
|
|
44
44
|
mounted() {
|
|
45
45
|
this.visible = true;
|
|
46
|
-
this.
|
|
46
|
+
this.apiDrawer().registerOverlay(this);
|
|
47
47
|
},
|
|
48
48
|
|
|
49
49
|
methods: {
|
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
export default {
|
|
16
16
|
name: 'VTDrawerTitle',
|
|
17
17
|
|
|
18
|
-
inject: ['
|
|
18
|
+
inject: ['apiDrawer'],
|
|
19
19
|
|
|
20
20
|
props: {
|
|
21
21
|
as: {
|
|
@@ -26,15 +26,15 @@ export default {
|
|
|
26
26
|
|
|
27
27
|
computed: {
|
|
28
28
|
dark() {
|
|
29
|
-
return this.
|
|
29
|
+
return this.apiDrawer().isDark;
|
|
30
30
|
},
|
|
31
31
|
|
|
32
32
|
headless() {
|
|
33
|
-
return this.
|
|
33
|
+
return this.apiDrawer().isHeadless;
|
|
34
34
|
},
|
|
35
35
|
|
|
36
36
|
id() {
|
|
37
|
-
return `${this.
|
|
37
|
+
return `${this.apiDrawer().id}-title`;
|
|
38
38
|
},
|
|
39
39
|
},
|
|
40
40
|
|
|
@@ -45,7 +45,7 @@ export default {
|
|
|
45
45
|
methods: {
|
|
46
46
|
// In here because if there is no header, the dialog will not be labelled by
|
|
47
47
|
setDialogLabelledby() {
|
|
48
|
-
const dialog = document.getElementById(this.
|
|
48
|
+
const dialog = document.getElementById(this.apiDrawer().id);
|
|
49
49
|
|
|
50
50
|
if (dialog) {
|
|
51
51
|
dialog.setAttribute('aria-labelledby', this.id);
|
|
@@ -5,14 +5,14 @@
|
|
|
5
5
|
</template>
|
|
6
6
|
|
|
7
7
|
<script>
|
|
8
|
-
import { genId } from
|
|
8
|
+
import { genId } from '../../utils/ids';
|
|
9
9
|
|
|
10
10
|
export default {
|
|
11
|
-
name:
|
|
11
|
+
name: 'VTDropdownMenu',
|
|
12
12
|
|
|
13
13
|
provide() {
|
|
14
14
|
return {
|
|
15
|
-
|
|
15
|
+
apiDropdownMenu: () => {
|
|
16
16
|
const { dark: isDark, headless: isHeadless, right: isRight } = this;
|
|
17
17
|
const { id, trigger, content, items } = this;
|
|
18
18
|
|