@veritree/ui 0.56.0 → 0.57.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/index.js
CHANGED
|
@@ -3,6 +3,7 @@ import VTAvatar from './src/components/Avatar/VTAvatar.vue';
|
|
|
3
3
|
import VTAvatarImage from './src/components/Avatar/VTAvatarImage.vue';
|
|
4
4
|
import VTAvatarText from './src/components/Avatar/VTAvatarText.vue';
|
|
5
5
|
import VTButton from './src/components/Button/VTButton.vue';
|
|
6
|
+
import VTChip from './src/components/Chip/VTChip.vue';
|
|
6
7
|
import VTImage from './src/components/Image/VTImage.vue';
|
|
7
8
|
import VTImageCounter from './src/components/Image/VTImageCounter.vue';
|
|
8
9
|
import VTImageHover from './src/components/Image/VTImageHover.vue';
|
|
@@ -154,4 +155,5 @@ export {
|
|
|
154
155
|
VTDisclosureContent,
|
|
155
156
|
VTSkeleton,
|
|
156
157
|
VTSkeletonItem,
|
|
158
|
+
VTChip,
|
|
157
159
|
};
|
package/nuxt.js
CHANGED
|
@@ -4,6 +4,7 @@ const components = [
|
|
|
4
4
|
'src/components/Alert',
|
|
5
5
|
'src/components/Avatar',
|
|
6
6
|
'src/components/Button',
|
|
7
|
+
'src/components/Chip',
|
|
7
8
|
'src/components/Drawer',
|
|
8
9
|
'src/components/Dialog',
|
|
9
10
|
'src/components/Disclosure',
|
|
@@ -17,13 +18,13 @@ const components = [
|
|
|
17
18
|
'src/components/Spinner',
|
|
18
19
|
'src/components/Tabs',
|
|
19
20
|
'src/components/Tooltip',
|
|
20
|
-
]
|
|
21
|
+
];
|
|
21
22
|
|
|
22
23
|
export default function () {
|
|
23
|
-
this.nuxt.hook('components:dirs', dirs => {
|
|
24
|
+
this.nuxt.hook('components:dirs', (dirs) => {
|
|
24
25
|
// Add ./components dir to the list
|
|
25
26
|
components.forEach((component) => {
|
|
26
|
-
dirs.push(join(__dirname, component))
|
|
27
|
+
dirs.push(join(__dirname, component));
|
|
27
28
|
});
|
|
28
|
-
})
|
|
29
|
-
}
|
|
29
|
+
});
|
|
30
|
+
}
|
package/package.json
CHANGED
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div
|
|
3
|
+
class="Chip flex shrink-0 items-center gap-2 rounded-full bg-gray-200 py-0.5 pl-2 pr-[3px] text-sm text-gray-800"
|
|
4
|
+
>
|
|
5
|
+
<span class="Chip-text truncate whitespace-nowrap"><slot></slot></span>
|
|
6
|
+
<button
|
|
7
|
+
class="Chip-button shrink-0 text-gray-500 hover:text-gray-600"
|
|
8
|
+
@click.stop.prevent="onCancel"
|
|
9
|
+
>
|
|
10
|
+
<IconCancel class="Chip-button__icon h-5 w-5" />
|
|
11
|
+
</button>
|
|
12
|
+
</div>
|
|
13
|
+
</template>
|
|
14
|
+
|
|
15
|
+
<script>
|
|
16
|
+
export default {
|
|
17
|
+
methods: {
|
|
18
|
+
onCancel() {
|
|
19
|
+
this.$emit('cancel');
|
|
20
|
+
},
|
|
21
|
+
},
|
|
22
|
+
};
|
|
23
|
+
</script>
|
|
@@ -83,9 +83,13 @@ export default {
|
|
|
83
83
|
* is also only used when the prop multiple is true.
|
|
84
84
|
*/
|
|
85
85
|
const removeValueFromValueComputed = (value) => {
|
|
86
|
-
this.valueComputed = this.valueComputed.filter(
|
|
87
|
-
(valueComputed
|
|
88
|
-
|
|
86
|
+
this.valueComputed = this.valueComputed.filter((valueComputed) => {
|
|
87
|
+
if (typeof valueComputed === 'object') {
|
|
88
|
+
return JSON.stringify(valueComputed) !== JSON.stringify(value);
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
return valueComputed !== value;
|
|
92
|
+
});
|
|
89
93
|
};
|
|
90
94
|
|
|
91
95
|
return {
|