@veritree/ui 0.55.0 → 0.57.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 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
  };
@@ -69,7 +69,7 @@ export const formControlStyleMixin = {
69
69
  ? 'border-error-300'
70
70
  : this.isSuccess
71
71
  ? 'border-success-300'
72
- : this?.isOutline
72
+ : this.isOutline
73
73
  ? 'border-gray-700'
74
74
  : 'border-gray-300',
75
75
  // height styles
@@ -86,5 +86,11 @@ export const formControlStyleMixin = {
86
86
  : null,
87
87
  ];
88
88
  },
89
+
90
+ // not all places as form control is used needs outline,
91
+ // so this is here mostly as a placeholder
92
+ isOutline() {
93
+ return null
94
+ }
89
95
  },
90
96
  };
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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@veritree/ui",
3
- "version": "0.55.0",
3
+ "version": "0.57.0",
4
4
  "description": "veritree ui library",
5
5
  "type": "module",
6
6
  "main": "index.js",
@@ -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>
@@ -69,10 +69,12 @@ export default {
69
69
 
70
70
  methods: {
71
71
  show() {
72
+ this.$emit('toggle', true);
72
73
  this.visible = true;
73
74
  },
74
75
 
75
76
  hide() {
77
+ this.$emit('toggle', false);
76
78
  this.visible = false;
77
79
  },
78
80