@veritree/ui 0.39.0 → 0.39.1

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.39.0",
3
+ "version": "0.39.1",
4
4
  "description": "veritree ui library",
5
5
  "type": "module",
6
6
  "main": "index.js",
@@ -1,6 +1,6 @@
1
1
  <template>
2
2
  <div
3
- v-if="visible"
3
+ v-if="isVisible"
4
4
  :class="[
5
5
  // default styles
6
6
  headless ? 'alert' : 'flex items-start gap-3 rounded border border-solid',
@@ -60,6 +60,12 @@ export default {
60
60
  prop: 'visible',
61
61
  },
62
62
 
63
+ data() {
64
+ return {
65
+ visibleLocal: true,
66
+ };
67
+ },
68
+
63
69
  props: {
64
70
  variant: {
65
71
  type: String,
@@ -79,7 +85,7 @@ export default {
79
85
  },
80
86
  visible: {
81
87
  type: Boolean,
82
- default: false,
88
+ default: null,
83
89
  },
84
90
  },
85
91
 
@@ -103,11 +109,18 @@ export default {
103
109
  isSmall() {
104
110
  return this.size === 'small';
105
111
  },
112
+
113
+ isVisible() {
114
+ return this.visible !== null ? this.visible : this.visibleLocal;
115
+ },
106
116
  },
107
117
 
108
118
  methods: {
109
119
  hide() {
110
- this.$emit('input', false);
120
+ this.visible !== null
121
+ ? this.$emit('input', false)
122
+ : (this.visibleLocal = false);
123
+
111
124
  this.$emit('dismiss');
112
125
  },
113
126
  },
@@ -16,6 +16,9 @@
16
16
  @keydown.enter.prevent="onClick"
17
17
  @keydown.tab.prevent
18
18
  >
19
+ <!-- <span v-if="multiple">
20
+ <input type="radio" v-model="options" :value="value" />
21
+ </span> -->
19
22
  <slot></slot>
20
23
  <span v-if="wasSelected" class="ml-auto">
21
24
  <IconCheckOutline class="text-secondary-200 h-5 w-5" />
@@ -50,6 +53,7 @@ export default {
50
53
  // apiInjected is used in the mixin floating-ui-item
51
54
  apiInjected: this.apiListbox,
52
55
  componentName: 'listbox-item',
56
+ options: [],
53
57
  };
54
58
  },
55
59