@veritree/ui 0.32.0 → 0.34.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.32.0",
3
+ "version": "0.34.0",
4
4
  "description": "veritree ui library",
5
5
  "type": "module",
6
6
  "main": "index.js",
@@ -6,7 +6,7 @@
6
6
  :class="
7
7
  headless
8
8
  ? 'dialog'
9
- : `fixed inset-0 z-50 grid grid-cols-1 grid-rows-1 p-4 md:p-8`
9
+ : `fixed inset-0 z-50 grid grid-cols-1 grid-rows-1 ${classes}`
10
10
  "
11
11
  aria-modal="true"
12
12
  @click="onClick"
@@ -99,6 +99,9 @@ export default {
99
99
  hasOverlay() {
100
100
  return this.overlay !== null;
101
101
  },
102
+ classes() {
103
+ return !this.full ? 'p-4 md:p-8' : '';
104
+ },
102
105
  },
103
106
 
104
107
  watch: {
@@ -47,12 +47,14 @@ export default {
47
47
  id() {
48
48
  return `dialog-content-${this.apiDialog().componentId}`;
49
49
  },
50
+
51
+ classes() {
52
+ return this.full ? 'h-screen w-screen' : 'max-h-full max-w-full';
53
+ },
54
+
50
55
  full() {
51
56
  return this.apiDialog().full;
52
57
  },
53
- classes() {
54
- return this.full ? 'h-screen w-screen' : 'max-h-full max-w-full ';
55
- },
56
58
  },
57
59
 
58
60
  mounted() {
@@ -4,7 +4,7 @@
4
4
  :class="[
5
5
  headless
6
6
  ? 'dialog-footer'
7
- : '-mx-4 -mb-4 flex items-center justify-between gap-x-3 p-4 md:-mx-8 md:-mb-8 md:p-8',
7
+ : '-mx-4 -mb-4 flex items-center justify-between gap-x-3 p-4 md:-mx-6 md:-mb-6 md:p-6',
8
8
  ]"
9
9
  >
10
10
  <slot></slot>
@@ -5,7 +5,7 @@
5
5
  :class="[
6
6
  headless
7
7
  ? 'dialog-header'
8
- : '-mx-4 -mt-4 flex items-center justify-between gap-x-3 p-4 md:-mx-8 md:-mt-8 md:p-8',
8
+ : '-mx-4 -mt-4 flex items-center justify-between gap-x-3 p-4 md:-mx-6 md:-mt-6 md:p-6',
9
9
  ]"
10
10
  >
11
11
  <slot></slot>
@@ -18,7 +18,7 @@
18
18
  ]"
19
19
  role="tab"
20
20
  type="button"
21
- @click.stop="onClick"
21
+ @click.prevent.stop="onClick"
22
22
  @keydown="onKeyDown"
23
23
  @blur="onBlur"
24
24
  >
@@ -106,6 +106,7 @@ export default {
106
106
  onClick() {
107
107
  this.api.selectTab(this.index);
108
108
  this.$emit('change');
109
+ this.$emit('click');
109
110
  },
110
111
 
111
112
  onKeyDown(event) {