windly-ui 1.0.6 → 1.0.8

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.
Files changed (55) hide show
  1. package/dist/module.json +1 -1
  2. package/dist/runtime/components/Alert.d.vue.ts +7 -0
  3. package/dist/runtime/components/Alert.vue +47 -29
  4. package/dist/runtime/components/Alert.vue.d.ts +7 -0
  5. package/dist/runtime/components/Avatar.d.vue.ts +3 -3
  6. package/dist/runtime/components/Avatar.vue.d.ts +3 -3
  7. package/dist/runtime/components/Badge.d.vue.ts +6 -6
  8. package/dist/runtime/components/Badge.vue.d.ts +6 -6
  9. package/dist/runtime/components/Button.d.vue.ts +5 -5
  10. package/dist/runtime/components/Button.vue.d.ts +5 -5
  11. package/dist/runtime/components/Card.d.vue.ts +3 -3
  12. package/dist/runtime/components/Card.vue.d.ts +3 -3
  13. package/dist/runtime/components/Checkbox.d.vue.ts +2 -2
  14. package/dist/runtime/components/Checkbox.vue.d.ts +2 -2
  15. package/dist/runtime/components/Chip.d.vue.ts +133 -0
  16. package/dist/runtime/components/Chip.vue +99 -0
  17. package/dist/runtime/components/Chip.vue.d.ts +133 -0
  18. package/dist/runtime/components/ColorPicker.d.vue.ts +2 -2
  19. package/dist/runtime/components/ColorPicker.vue.d.ts +2 -2
  20. package/dist/runtime/components/Date.d.vue.ts +4 -4
  21. package/dist/runtime/components/Date.vue.d.ts +4 -4
  22. package/dist/runtime/components/Dialog.d.vue.ts +1 -1
  23. package/dist/runtime/components/Dialog.vue.d.ts +1 -1
  24. package/dist/runtime/components/Divider.d.vue.ts +1 -1
  25. package/dist/runtime/components/Divider.vue.d.ts +1 -1
  26. package/dist/runtime/components/Drawer.d.vue.ts +2 -2
  27. package/dist/runtime/components/Drawer.vue.d.ts +2 -2
  28. package/dist/runtime/components/Dropdown.d.vue.ts +3 -3
  29. package/dist/runtime/components/Dropdown.vue.d.ts +3 -3
  30. package/dist/runtime/components/FileUploader.d.vue.ts +3 -3
  31. package/dist/runtime/components/FileUploader.vue.d.ts +3 -3
  32. package/dist/runtime/components/Image.d.vue.ts +2 -2
  33. package/dist/runtime/components/Image.vue.d.ts +2 -2
  34. package/dist/runtime/components/Input.d.vue.ts +2 -2
  35. package/dist/runtime/components/Input.vue.d.ts +2 -2
  36. package/dist/runtime/components/Radio.d.vue.ts +4 -4
  37. package/dist/runtime/components/Radio.vue.d.ts +4 -4
  38. package/dist/runtime/components/ScrollArea.d.vue.ts +2 -2
  39. package/dist/runtime/components/ScrollArea.vue.d.ts +2 -2
  40. package/dist/runtime/components/Select.d.vue.ts +2 -2
  41. package/dist/runtime/components/Select.vue.d.ts +2 -2
  42. package/dist/runtime/components/Stepper.d.vue.ts +1 -1
  43. package/dist/runtime/components/Stepper.vue.d.ts +1 -1
  44. package/dist/runtime/components/Table.d.vue.ts +3 -3
  45. package/dist/runtime/components/Table.vue.d.ts +3 -3
  46. package/dist/runtime/components/Textarea.d.vue.ts +2 -2
  47. package/dist/runtime/components/Textarea.vue.d.ts +2 -2
  48. package/dist/runtime/components/Toggle.d.vue.ts +1 -1
  49. package/dist/runtime/components/Toggle.vue.d.ts +1 -1
  50. package/dist/runtime/components/Tooltip.d.vue.ts +1 -1
  51. package/dist/runtime/components/Tooltip.vue.d.ts +1 -1
  52. package/dist/runtime/components/useUiClasses.d.ts +11 -11
  53. package/dist/runtime/components/useUiClasses.js +3 -3
  54. package/dist/runtime/docs/index.vue +1 -1
  55. package/package.json +1 -1
package/dist/module.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "windly-ui",
3
- "version": "1.0.6",
3
+ "version": "1.0.8",
4
4
  "builder": {
5
5
  "@nuxt/module-builder": "1.0.2",
6
6
  "unbuild": "3.6.1"
@@ -77,7 +77,14 @@ declare const __VLS_base: import("vue").DefineComponent<import("vue").ExtractPro
77
77
  showCloseIcon: boolean;
78
78
  }, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
79
79
  type __VLS_Slots = {
80
+ header?: ((props: {}) => any) | undefined;
81
+ } & {
80
82
  title?: ((props: {}) => any) | undefined;
81
83
  } & {
82
84
  message?: ((props: {}) => any) | undefined;
85
+ } & {
86
+ actions?: ((props: {
87
+ confirm: () => void;
88
+ cancel: () => void;
89
+ }) => any) | undefined;
83
90
  };
@@ -1,5 +1,8 @@
1
1
  <script setup>
2
- import { useAttrs } from "vue";
2
+ import { useAttrs, computed } from "vue";
3
+ defineOptions({
4
+ inheritAttrs: false
5
+ });
3
6
  const props = defineProps({
4
7
  isOpen: {
5
8
  type: Boolean,
@@ -30,7 +33,16 @@ const props = defineProps({
30
33
  default: false
31
34
  }
32
35
  });
33
- const dialogAttributes = useAttrs();
36
+ const attrs = useAttrs();
37
+ const wrapperClass = computed(() => attrs.class || "");
38
+ const wrapperStyle = computed(() => attrs.style || {});
39
+ const dialogAttributes = computed(() => {
40
+ const { class: _class, style: _style, ...rest } = attrs;
41
+ return rest;
42
+ });
43
+ const hasWrapperStyling = computed(
44
+ () => Boolean(wrapperClass.value) || Object.keys(wrapperStyle.value || {}).length > 0
45
+ );
34
46
  const emit = defineEmits(["update:isOpen", "confirm"]);
35
47
  const close = () => emit("update:isOpen", false);
36
48
  const handleConfirm = () => {
@@ -41,37 +53,43 @@ const handleConfirm = () => {
41
53
 
42
54
  <template>
43
55
  <UIDialog v-bind="dialogAttributes" :isOpen="isOpen" @update:isOpen="(val) => emit('update:isOpen', val)">
44
- <div class="bg-white rounded-lg shadow-lg w-96 p-6">
45
- <!-- Header -->
46
- <div class="flex justify-between items-center mb-4">
47
- <slot name="title">
48
- <h3 class="text-lg font-semibold">
49
- {{ title }}
50
- </h3>
51
- </slot>
56
+ <div >
57
+ <div class="bg-white shadow-lg w-96 p-4" :class="hasWrapperStyling ? [wrapperClass, 'pt-1'] : ''" :style="wrapperStyle">
58
+ <!-- Header -->
59
+ <slot name="header">
60
+ <div class="flex justify-between items-center mb-4">
61
+ <slot name="title">
62
+ <h3 class="text-lg font-semibold">
63
+ {{ title }}
64
+ </h3>
65
+ </slot>
52
66
 
53
- <button v-if="showCloseIcon" @click="close" class="text-gray-500 hover:text-gray-700" aria-label="Close modal">
54
- <span class="material-icons">close</span>
55
- </button>
56
- </div>
67
+ <button v-if="showCloseIcon" @click="close" class="text-gray-500 hover:text-gray-700" aria-label="Close modal">
68
+ <span class="material-icons">close</span>
69
+ </button>
70
+ </div>
71
+ </slot>
57
72
 
58
- <!-- Message -->
59
- <slot name="message">
60
- <p class="text-gray-600 mb-6">
61
- {{ message }}
62
- </p>
63
- </slot>
73
+ <!-- Message -->
74
+ <slot name="message">
75
+ <p class="text-gray-600 mb-6">
76
+ {{ message }}
77
+ </p>
78
+ </slot>
64
79
 
65
- <!-- Actions -->
66
- <div class="flex justify-end">
67
- <button @click="close" class="mr-2 px-4 py-2 bg-gray-200 text-gray-700 rounded-lg transition hover:bg-gray-300">
68
- {{ cancelBtnText }}
69
- </button>
80
+ <!-- Actions -->
81
+ <slot name="actions" :confirm="handleConfirm" :cancel="close">
82
+ <div class="flex justify-end">
83
+ <button @click="close" class="mr-2 px-4 py-2 bg-gray-200 text-gray-700 rounded-lg transition hover:bg-gray-300">
84
+ {{ cancelBtnText }}
85
+ </button>
70
86
 
71
- <button v-if="showConfirmBtn" @click="handleConfirm"
72
- class="px-4 py-2 bg-blue-500 text-white rounded-lg transition hover:bg-blue-600">
73
- {{ confirmBtnText }}
74
- </button>
87
+ <button v-if="showConfirmBtn" @click="handleConfirm"
88
+ class="px-4 py-2 bg-blue-500 text-white rounded-lg transition hover:bg-blue-600">
89
+ {{ confirmBtnText }}
90
+ </button>
91
+ </div>
92
+ </slot>
75
93
  </div>
76
94
  </div>
77
95
  </UIDialog>
@@ -77,7 +77,14 @@ declare const __VLS_base: import("vue").DefineComponent<import("vue").ExtractPro
77
77
  showCloseIcon: boolean;
78
78
  }, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
79
79
  type __VLS_Slots = {
80
+ header?: ((props: {}) => any) | undefined;
81
+ } & {
80
82
  title?: ((props: {}) => any) | undefined;
81
83
  } & {
82
84
  message?: ((props: {}) => any) | undefined;
85
+ } & {
86
+ actions?: ((props: {
87
+ confirm: () => void;
88
+ cancel: () => void;
89
+ }) => any) | undefined;
83
90
  };
@@ -122,18 +122,18 @@ declare const __VLS_export: import("vue").DefineComponent<import("vue").ExtractP
122
122
  };
123
123
  }>> & Readonly<{}>, {
124
124
  image: string;
125
+ color: string;
126
+ size: string;
127
+ borderColor: string;
125
128
  contentClass: string;
126
129
  contentStyle: string;
127
130
  textColor: string;
128
131
  disable: boolean;
129
132
  loading: boolean;
130
- color: string;
131
133
  rounded: string;
132
- size: string;
133
134
  iconSize: string;
134
135
  altText: string;
135
136
  initials: string;
136
- borderColor: string;
137
137
  borderThickness: number;
138
138
  shadow: boolean;
139
139
  }, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
@@ -122,18 +122,18 @@ declare const __VLS_export: import("vue").DefineComponent<import("vue").ExtractP
122
122
  };
123
123
  }>> & Readonly<{}>, {
124
124
  image: string;
125
+ color: string;
126
+ size: string;
127
+ borderColor: string;
125
128
  contentClass: string;
126
129
  contentStyle: string;
127
130
  textColor: string;
128
131
  disable: boolean;
129
132
  loading: boolean;
130
- color: string;
131
133
  rounded: string;
132
- size: string;
133
134
  iconSize: string;
134
135
  altText: string;
135
136
  initials: string;
136
- borderColor: string;
137
137
  borderThickness: number;
138
138
  shadow: boolean;
139
139
  }, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
@@ -109,19 +109,19 @@ declare const __VLS_base: import("vue").DefineComponent<import("vue").ExtractPro
109
109
  default: boolean;
110
110
  };
111
111
  }>> & Readonly<{}>, {
112
+ color: string;
113
+ content: string;
114
+ size: string;
115
+ show: boolean;
116
+ position: string;
117
+ icon: string;
112
118
  contentClass: string;
113
119
  contentStyle: string;
114
120
  textColor: string;
115
121
  disable: boolean;
116
122
  loading: boolean;
117
- color: string;
118
123
  rounded: string;
119
- size: string;
120
124
  iconSize: string;
121
- content: string;
122
- icon: string;
123
- position: string;
124
- show: boolean;
125
125
  }, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
126
126
  declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
127
127
  declare const _default: typeof __VLS_export;
@@ -109,19 +109,19 @@ declare const __VLS_base: import("vue").DefineComponent<import("vue").ExtractPro
109
109
  default: boolean;
110
110
  };
111
111
  }>> & Readonly<{}>, {
112
+ color: string;
113
+ content: string;
114
+ size: string;
115
+ show: boolean;
116
+ position: string;
117
+ icon: string;
112
118
  contentClass: string;
113
119
  contentStyle: string;
114
120
  textColor: string;
115
121
  disable: boolean;
116
122
  loading: boolean;
117
- color: string;
118
123
  rounded: string;
119
- size: string;
120
124
  iconSize: string;
121
- content: string;
122
- icon: string;
123
- position: string;
124
- show: boolean;
125
125
  }, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
126
126
  declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
127
127
  declare const _default: typeof __VLS_export;
@@ -184,19 +184,19 @@ declare const __VLS_export: import("vue").DefineComponent<import("vue").ExtractP
184
184
  dense: boolean;
185
185
  label: string;
186
186
  class: string;
187
+ color: string;
188
+ size: string;
189
+ flat: boolean;
190
+ icon: string;
191
+ outline: boolean;
187
192
  contentClass: string;
188
193
  contentStyle: string;
189
194
  textColor: string;
190
195
  disable: boolean;
191
196
  loading: boolean;
192
- color: string;
193
197
  rounded: string;
194
- size: string;
195
198
  iconSize: string;
196
- icon: string;
197
199
  to: string | Record<string, any>;
198
- outline: boolean;
199
- flat: boolean;
200
200
  unelevated: boolean;
201
201
  stacked: boolean;
202
202
  gradient: boolean;
@@ -184,19 +184,19 @@ declare const __VLS_export: import("vue").DefineComponent<import("vue").ExtractP
184
184
  dense: boolean;
185
185
  label: string;
186
186
  class: string;
187
+ color: string;
188
+ size: string;
189
+ flat: boolean;
190
+ icon: string;
191
+ outline: boolean;
187
192
  contentClass: string;
188
193
  contentStyle: string;
189
194
  textColor: string;
190
195
  disable: boolean;
191
196
  loading: boolean;
192
- color: string;
193
197
  rounded: string;
194
- size: string;
195
198
  iconSize: string;
196
- icon: string;
197
199
  to: string | Record<string, any>;
198
- outline: boolean;
199
- flat: boolean;
200
200
  unelevated: boolean;
201
201
  stacked: boolean;
202
202
  gradient: boolean;
@@ -67,11 +67,11 @@ declare const __VLS_base: import("vue").DefineComponent<import("vue").ExtractPro
67
67
  }>> & Readonly<{}>, {
68
68
  dense: boolean;
69
69
  color: string;
70
- borderColor: string;
71
- flat: boolean;
72
70
  square: boolean;
73
- bordered: boolean;
71
+ flat: boolean;
74
72
  width: string;
73
+ borderColor: string;
74
+ bordered: boolean;
75
75
  }, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
76
76
  declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
77
77
  declare const _default: typeof __VLS_export;
@@ -67,11 +67,11 @@ declare const __VLS_base: import("vue").DefineComponent<import("vue").ExtractPro
67
67
  }>> & Readonly<{}>, {
68
68
  dense: boolean;
69
69
  color: string;
70
- borderColor: string;
71
- flat: boolean;
72
70
  square: boolean;
73
- bordered: boolean;
71
+ flat: boolean;
74
72
  width: string;
73
+ borderColor: string;
74
+ bordered: boolean;
75
75
  }, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
76
76
  declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
77
77
  declare const _default: typeof __VLS_export;
@@ -168,14 +168,14 @@ declare const __VLS_export: import("vue").DefineComponent<import("vue").ExtractP
168
168
  dense: boolean;
169
169
  label: string;
170
170
  name: string;
171
+ color: string;
172
+ size: string;
171
173
  contentClass: string;
172
174
  contentStyle: string;
173
175
  textColor: string;
174
176
  disable: boolean;
175
177
  loading: boolean;
176
- color: string;
177
178
  rounded: string;
178
- size: string;
179
179
  iconSize: string;
180
180
  trueValue: boolean;
181
181
  falseValue: boolean;
@@ -168,14 +168,14 @@ declare const __VLS_export: import("vue").DefineComponent<import("vue").ExtractP
168
168
  dense: boolean;
169
169
  label: string;
170
170
  name: string;
171
+ color: string;
172
+ size: string;
171
173
  contentClass: string;
172
174
  contentStyle: string;
173
175
  textColor: string;
174
176
  disable: boolean;
175
177
  loading: boolean;
176
- color: string;
177
178
  rounded: string;
178
- size: string;
179
179
  iconSize: string;
180
180
  trueValue: boolean;
181
181
  falseValue: boolean;
@@ -0,0 +1,133 @@
1
+ declare var __VLS_1: {};
2
+ type __VLS_Slots = {} & {
3
+ default?: (props: typeof __VLS_1) => any;
4
+ };
5
+ declare const __VLS_base: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
6
+ contentClass: {
7
+ readonly type: StringConstructor;
8
+ readonly default: "";
9
+ };
10
+ contentStyle: {
11
+ readonly type: StringConstructor;
12
+ readonly default: "";
13
+ };
14
+ textColor: {
15
+ readonly type: StringConstructor;
16
+ readonly default: "";
17
+ };
18
+ disable: {
19
+ readonly type: BooleanConstructor;
20
+ readonly default: false;
21
+ };
22
+ loading: {
23
+ readonly type: BooleanConstructor;
24
+ readonly default: false;
25
+ };
26
+ color: {
27
+ readonly type: StringConstructor;
28
+ readonly default: "blue-900";
29
+ };
30
+ rounded: {
31
+ readonly type: StringConstructor;
32
+ readonly default: "md";
33
+ };
34
+ size: {
35
+ readonly type: StringConstructor;
36
+ readonly default: "md";
37
+ };
38
+ iconSize: {
39
+ readonly type: StringConstructor;
40
+ readonly default: "lg";
41
+ };
42
+ content: {
43
+ type: StringConstructor;
44
+ default: string;
45
+ };
46
+ icon: {
47
+ type: StringConstructor;
48
+ default: string;
49
+ };
50
+ position: {
51
+ type: StringConstructor;
52
+ default: string;
53
+ };
54
+ show: {
55
+ type: BooleanConstructor;
56
+ default: boolean;
57
+ };
58
+ }>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
59
+ contentClass: {
60
+ readonly type: StringConstructor;
61
+ readonly default: "";
62
+ };
63
+ contentStyle: {
64
+ readonly type: StringConstructor;
65
+ readonly default: "";
66
+ };
67
+ textColor: {
68
+ readonly type: StringConstructor;
69
+ readonly default: "";
70
+ };
71
+ disable: {
72
+ readonly type: BooleanConstructor;
73
+ readonly default: false;
74
+ };
75
+ loading: {
76
+ readonly type: BooleanConstructor;
77
+ readonly default: false;
78
+ };
79
+ color: {
80
+ readonly type: StringConstructor;
81
+ readonly default: "blue-900";
82
+ };
83
+ rounded: {
84
+ readonly type: StringConstructor;
85
+ readonly default: "md";
86
+ };
87
+ size: {
88
+ readonly type: StringConstructor;
89
+ readonly default: "md";
90
+ };
91
+ iconSize: {
92
+ readonly type: StringConstructor;
93
+ readonly default: "lg";
94
+ };
95
+ content: {
96
+ type: StringConstructor;
97
+ default: string;
98
+ };
99
+ icon: {
100
+ type: StringConstructor;
101
+ default: string;
102
+ };
103
+ position: {
104
+ type: StringConstructor;
105
+ default: string;
106
+ };
107
+ show: {
108
+ type: BooleanConstructor;
109
+ default: boolean;
110
+ };
111
+ }>> & Readonly<{}>, {
112
+ color: string;
113
+ content: string;
114
+ size: string;
115
+ show: boolean;
116
+ position: string;
117
+ icon: string;
118
+ contentClass: string;
119
+ contentStyle: string;
120
+ textColor: string;
121
+ disable: boolean;
122
+ loading: boolean;
123
+ rounded: string;
124
+ iconSize: string;
125
+ }, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
126
+ declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
127
+ declare const _default: typeof __VLS_export;
128
+ export default _default;
129
+ type __VLS_WithSlots<T, S> = T & {
130
+ new (): {
131
+ $slots: S;
132
+ };
133
+ };
@@ -0,0 +1,99 @@
1
+ <script setup>
2
+ defineOptions({
3
+ inheritAttrs: false
4
+ });
5
+ import { useSlots, computed } from "vue";
6
+ import { useUiClasses } from "./useUiClasses";
7
+ import { uiProps } from "./uiProps";
8
+ const slots = useSlots();
9
+ const props = defineProps({
10
+ content: { type: String, default: "" },
11
+ icon: { type: String, default: "" },
12
+ position: { type: String, default: "superscript" },
13
+ show: { type: Boolean, default: true },
14
+ ...uiProps
15
+ });
16
+ const {
17
+ // props
18
+ contentClass,
19
+ contentStyle,
20
+ color,
21
+ size,
22
+ rounded,
23
+ // computed
24
+ colorClass,
25
+ computedContentClass,
26
+ isColorDark,
27
+ isHex,
28
+ isTailwindColor
29
+ } = useUiClasses(props);
30
+ const hasSlots = computed(() => {
31
+ return !!slots.default?.();
32
+ });
33
+ const sizeClass = computed(() => {
34
+ const map = {
35
+ xs: "w-auto min-w-2 h-2.5 text-[7px]",
36
+ sm: "w-auto min-w-3 h-3 text-[10px]",
37
+ md: "w-auto min-w-4 h-4 text-xs",
38
+ lg: "w-auto min-w-6 h-6 text-sm"
39
+ };
40
+ return map[size.value];
41
+ });
42
+ const roundedClass = computed(() => {
43
+ const map = {
44
+ xs: "rounded-xs",
45
+ sm: "rounded-sm",
46
+ md: "rounded",
47
+ lg: "rounded-lg",
48
+ full: "rounded-full"
49
+ };
50
+ return map[rounded.value];
51
+ });
52
+ const positionClasses = computed(
53
+ () => props.position === "superscript" && hasSlots.value ? "absolute top-0 right-0 transform translate-x-1/2 -translate-y-1/2" : ""
54
+ );
55
+ const chipClass = computed(() => {
56
+ return [
57
+ "inline-flex items-center justify-center font-bold",
58
+ computedContentClass.value,
59
+ sizeClass.value,
60
+ roundedClass.value,
61
+ positionClasses.value,
62
+ isColorDark(color.value) ? "text-white" : "text-gray-700",
63
+ isTailwindColor(color.value) ? `bg-${color.value}` : ""
64
+ ].filter((c) => !["", "!"].includes(c));
65
+ });
66
+ const chipStyle = computed(() => {
67
+ const style = contentStyle.value;
68
+ return {
69
+ backgroundColor: isHex(color.value) ? color.value : void 0,
70
+ ...typeof style === "object" && style ? style : {}
71
+ };
72
+ });
73
+ </script>
74
+
75
+ <template>
76
+ <div class="flex">
77
+ <div v-if="hasSlots" class="relative">
78
+ <slot />
79
+ <span v-if="show" :class="[
80
+ chipClass
81
+ ]" :style="[chipStyle]">
82
+ <span v-if="icon" class="p-1 material-icons">{{ icon }}</span>
83
+ <span v-if="content" class="p-1">{{ content }}</span>
84
+ </span>
85
+ </div>
86
+ <div v-else>
87
+ <span v-if="show" :class="[
88
+ chipClass
89
+ ]" :style="[chipStyle]">
90
+ <span v-if="icon" class="p-1 material-icons">{{ icon }}</span>
91
+ <span v-if="content" class="p-1">{{ content }}</span>
92
+ </span>
93
+ </div>
94
+ </div>
95
+ </template>
96
+
97
+ <style scoped>
98
+ .material-icons{font-size:1em}
99
+ </style>