@veritree/ui 0.3.1 → 0.4.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/index.js +2 -0
- package/package.json +1 -1
- package/src/Button/VTButtonSave.vue +1 -1
- package/src/Dialog/VTDialogClose.vue +5 -6
- package/src/Dialog/VTDialogContent.vue +2 -2
- package/src/Dialog/VTDialogHeader.vue +5 -5
- package/src/Dialog/VTDialogMain.vue +4 -4
- package/src/Dialog/VTDialogOverlay.vue +1 -1
- package/src/Dialog/VTDialogTitle.vue +26 -0
- package/src/Drawer/VTDrawerClose.vue +1 -1
- package/src/Modal/VTModal.vue +1 -1
package/index.js
CHANGED
|
@@ -37,6 +37,7 @@ import VTDialogFooter from './src/Dialog/VTDialogFooter.vue';
|
|
|
37
37
|
import VTDialogHeader from './src/Dialog/VTDialogHeader.vue';
|
|
38
38
|
import VTDialogMain from './src/Dialog/VTDialogMain.vue';
|
|
39
39
|
import VTDialogOverlay from './src/Dialog/VTDialogOverlay.vue';
|
|
40
|
+
import VTDialogTitle from './src/Dialog/VTDialogTitle.vue';
|
|
40
41
|
|
|
41
42
|
import VTDrawer from './src/Drawer/VTDrawer.vue';
|
|
42
43
|
import VTDrawerClose from './src/Drawer/VTDrawerClose.vue';
|
|
@@ -84,5 +85,6 @@ export {
|
|
|
84
85
|
VTDialogHeader,
|
|
85
86
|
VTDialogMain,
|
|
86
87
|
VTDialogOverlay,
|
|
88
|
+
VTDialogTitle,
|
|
87
89
|
}
|
|
88
90
|
|
package/package.json
CHANGED
|
@@ -3,7 +3,6 @@
|
|
|
3
3
|
variant="icon"
|
|
4
4
|
:class="{
|
|
5
5
|
'Dialog-close': headless,
|
|
6
|
-
'absolute right-4 top-4': !headless,
|
|
7
6
|
}"
|
|
8
7
|
:theme="theme"
|
|
9
8
|
@click.prevent="hide"
|
|
@@ -12,15 +11,15 @@
|
|
|
12
11
|
</template>
|
|
13
12
|
|
|
14
13
|
<script>
|
|
15
|
-
import { IconClose } from
|
|
16
|
-
import VTButton from
|
|
14
|
+
import { IconClose } from "@veritree/icons";
|
|
15
|
+
import VTButton from "../Button/VTButton.vue";
|
|
17
16
|
|
|
18
17
|
export default {
|
|
19
|
-
name:
|
|
18
|
+
name: "VTDialogClose",
|
|
20
19
|
|
|
21
20
|
components: { IconClose, VTButton },
|
|
22
21
|
|
|
23
|
-
inject: [
|
|
22
|
+
inject: ["api"],
|
|
24
23
|
|
|
25
24
|
computed: {
|
|
26
25
|
dark() {
|
|
@@ -33,7 +32,7 @@ export default {
|
|
|
33
32
|
|
|
34
33
|
// temporary till button theme is implemented
|
|
35
34
|
theme() {
|
|
36
|
-
return this.dark ?
|
|
35
|
+
return this.dark ? "dark" : null;
|
|
37
36
|
},
|
|
38
37
|
},
|
|
39
38
|
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
:id="id"
|
|
5
5
|
:class="{
|
|
6
6
|
'Dialog-header': headless,
|
|
7
|
-
'mb-8
|
|
7
|
+
'mb-8 flex justify-between gap-x-3 items-center': !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: "VTDialogHeader",
|
|
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
|
|
|
@@ -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
|
},
|
|
@@ -6,14 +6,14 @@
|
|
|
6
6
|
|
|
7
7
|
<script>
|
|
8
8
|
export default {
|
|
9
|
-
name:
|
|
9
|
+
name: "VTDialogMain",
|
|
10
10
|
|
|
11
|
-
inject: [
|
|
11
|
+
inject: ["api"],
|
|
12
12
|
|
|
13
13
|
props: {
|
|
14
14
|
as: {
|
|
15
15
|
type: String,
|
|
16
|
-
default:
|
|
16
|
+
default: "main",
|
|
17
17
|
},
|
|
18
18
|
},
|
|
19
19
|
|
|
@@ -41,7 +41,7 @@ export default {
|
|
|
41
41
|
const dialog = document.getElementById(this.api().id);
|
|
42
42
|
|
|
43
43
|
if (dialog) {
|
|
44
|
-
dialog.setAttribute(
|
|
44
|
+
dialog.setAttribute("aria-describedby", this.id);
|
|
45
45
|
}
|
|
46
46
|
},
|
|
47
47
|
},
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<span
|
|
3
|
+
:id="id"
|
|
4
|
+
:class="{ 'Dialog-header': headless, 'text-2xl font-semibold': !headless }"
|
|
5
|
+
>
|
|
6
|
+
<slot></slot
|
|
7
|
+
></span>
|
|
8
|
+
</template>
|
|
9
|
+
|
|
10
|
+
<script>
|
|
11
|
+
export default {
|
|
12
|
+
name: "VTDialogTitle",
|
|
13
|
+
|
|
14
|
+
inject: ["api"],
|
|
15
|
+
|
|
16
|
+
computed: {
|
|
17
|
+
headless() {
|
|
18
|
+
return this.api().isHeadless;
|
|
19
|
+
},
|
|
20
|
+
|
|
21
|
+
id() {
|
|
22
|
+
return `${this.api().id}-title`;
|
|
23
|
+
},
|
|
24
|
+
},
|
|
25
|
+
};
|
|
26
|
+
</script>
|