@veritree/ui 0.19.2-4 → 0.19.2-6

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.19.2-4",
3
+ "version": "0.19.2-6",
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.13"
17
+ "@nuxt/kit": "^3.0.0"
18
18
  }
19
19
  }
@@ -1,7 +1,7 @@
1
1
  <template>
2
2
  <Teleport to="body">
3
3
  <div
4
- v-if="visible"
4
+ v-if="modelValue"
5
5
  :id="id"
6
6
  :class="{
7
7
  Dialog: headless,
@@ -61,12 +61,8 @@ export default {
61
61
  };
62
62
  },
63
63
 
64
- model: {
65
- prop: 'visible',
66
- },
67
-
68
64
  props: {
69
- visible: {
65
+ modelValue: {
70
66
  type: Boolean,
71
67
  default: false,
72
68
  },
@@ -121,7 +117,7 @@ export default {
121
117
 
122
118
  emit() {
123
119
  this.$nextTick(() => {
124
- this.$emit('input', false);
120
+ this.$emit('update:modelValue', false);
125
121
  this.$emit('hidden');
126
122
  });
127
123
  },
@@ -1,7 +1,7 @@
1
1
  <template>
2
2
  <Teleport to="body">
3
3
  <div
4
- v-if="visible"
4
+ v-if="modelValue"
5
5
  :id="id"
6
6
  :class="{ Drawer: headless, 'fixed inset-0 z-50 h-screen': !headless }"
7
7
  aria-modal="true"
@@ -53,12 +53,8 @@ export default {
53
53
  };
54
54
  },
55
55
 
56
- model: {
57
- prop: 'visible',
58
- },
59
-
60
56
  props: {
61
- visible: {
57
+ modelValue: {
62
58
  type: Boolean,
63
59
  default: false,
64
60
  },
@@ -112,7 +108,7 @@ export default {
112
108
 
113
109
  emit() {
114
110
  this.$nextTick(() => {
115
- this.$emit('input', false);
111
+ this.$emit('update:modelValue', false);
116
112
  this.$emit('hidden');
117
113
  });
118
114
  },
@@ -1,13 +0,0 @@
1
- // Generate id
2
- // https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/function*
3
- let gen = null;
4
-
5
- function* idMaker() {
6
- let index = 0;
7
- while (true) yield index++;
8
- }
9
-
10
- export const genId = () => {
11
- if (!gen) gen = idMaker();
12
- return gen.next().value;
13
- };