vueless 0.0.288 → 0.0.289
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 +1 -1
- package/ui.button/configs/default.config.js +3 -3
- package/ui.button-link/configs/default.config.js +2 -2
- package/ui.button-link/index.vue +5 -7
- package/ui.dropdown-badge/composables/attrs.composable.js +4 -4
- package/ui.dropdown-badge/configs/default.config.js +13 -3
- package/ui.dropdown-badge/index.vue +4 -4
- package/ui.dropdown-button/composables/attrs.composable.js +4 -4
- package/ui.dropdown-button/configs/default.config.js +2 -2
- package/ui.dropdown-link/composables/attrs.composable.js +4 -4
- package/ui.dropdown-link/configs/default.config.js +2 -2
- package/ui.form-select/composables/attrs.composable.js +10 -22
- package/ui.form-select/configs/default.config.js +6 -9
- package/ui.form-select/index.vue +37 -36
- package/ui.image-icon/index.vue +1 -0
- package/ui.text-alert/configs/default.config.js +4 -7
- package/ui.text-alert/index.vue +27 -11
- package/ui.text-badge/configs/default.config.js +7 -7
- package/ui.text-badge/index.vue +3 -3
- package/web-types.json +23 -23
package/package.json
CHANGED
|
@@ -115,9 +115,9 @@ export default /*tw*/ {
|
|
|
115
115
|
variant: "thirdary",
|
|
116
116
|
class: `
|
|
117
117
|
text-gray-900
|
|
118
|
-
hover:text-gray-800 hover:bg-white
|
|
119
|
-
focus:text-gray-800 focus:bg-white
|
|
120
|
-
active:text-gray-700 active:bg-white
|
|
118
|
+
hover:text-gray-800 hover:bg-white/15
|
|
119
|
+
focus:text-gray-800 focus:bg-white/15
|
|
120
|
+
active:text-gray-700 active:bg-white/20
|
|
121
121
|
`,
|
|
122
122
|
},
|
|
123
123
|
{ filled: true, variant: "thirdary", class: "bg-{color}-600/10" },
|
|
@@ -7,7 +7,7 @@ export default /*tw*/ {
|
|
|
7
7
|
variants: {
|
|
8
8
|
size: {
|
|
9
9
|
sm: "gap-1",
|
|
10
|
-
md: "gap-1
|
|
10
|
+
md: "gap-1",
|
|
11
11
|
lg: "gap-1.5",
|
|
12
12
|
},
|
|
13
13
|
color: {
|
|
@@ -27,7 +27,7 @@ export default /*tw*/ {
|
|
|
27
27
|
},
|
|
28
28
|
link: {
|
|
29
29
|
base: `
|
|
30
|
-
|
|
30
|
+
inline-block cursor-pointer !leading-none transition
|
|
31
31
|
text-{color}-600 decoration-{color}-600 underline-offset-4
|
|
32
32
|
hover:text-{color}-700 hover:decoration-{color}-700
|
|
33
33
|
focus:text-{color}-700 focus:decoration-{color}-700 focus:outline-0
|
package/ui.button-link/index.vue
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<div v-bind="wrapperAttrs" ref="wrapperRef" tabindex="-1">
|
|
3
|
-
<!-- @slot Use it to add something before the
|
|
3
|
+
<!-- @slot Use it to add something before the label. -->
|
|
4
4
|
<slot name="left" />
|
|
5
5
|
|
|
6
6
|
<router-link
|
|
@@ -16,7 +16,7 @@
|
|
|
16
16
|
@keydown="onKeydown"
|
|
17
17
|
@mouseover="onMouseover"
|
|
18
18
|
>
|
|
19
|
-
<!-- @slot Use it replace the
|
|
19
|
+
<!-- @slot Use it replace the label. -->
|
|
20
20
|
<slot>
|
|
21
21
|
{{ label }}
|
|
22
22
|
</slot>
|
|
@@ -35,13 +35,11 @@
|
|
|
35
35
|
@keydown="onKeydown"
|
|
36
36
|
@mouseover="onMouseover"
|
|
37
37
|
>
|
|
38
|
-
<!-- @slot Use it replace the
|
|
39
|
-
<slot>
|
|
40
|
-
{{ label }}
|
|
41
|
-
</slot>
|
|
38
|
+
<!-- @slot Use it replace the label. -->
|
|
39
|
+
<slot>{{ label }}</slot>
|
|
42
40
|
</a>
|
|
43
41
|
|
|
44
|
-
<!-- @slot Use it to add something after the
|
|
42
|
+
<!-- @slot Use it to add something after the label. -->
|
|
45
43
|
<slot name="right" />
|
|
46
44
|
</div>
|
|
47
45
|
</template>
|
|
@@ -28,12 +28,12 @@ export default function useAttrs(props, { isShownOptions }) {
|
|
|
28
28
|
|
|
29
29
|
attrs[`${key}Attrs`] = getAttrs(key, { classes });
|
|
30
30
|
|
|
31
|
-
if (key === "
|
|
32
|
-
const
|
|
31
|
+
if (key === "badge") {
|
|
32
|
+
const badgeAttrs = attrs[`${key}Attrs`];
|
|
33
33
|
|
|
34
34
|
attrs[`${key}Attrs`] = computed(() => ({
|
|
35
|
-
...
|
|
36
|
-
class: cx([
|
|
35
|
+
...badgeAttrs.value,
|
|
36
|
+
class: cx([badgeAttrs.value.class, isShownOptions.value && config.value.badgeActive]),
|
|
37
37
|
}));
|
|
38
38
|
}
|
|
39
39
|
|
|
@@ -1,9 +1,19 @@
|
|
|
1
1
|
export default /*tw*/ {
|
|
2
2
|
wrapper: "relative inline-block",
|
|
3
|
-
badge:
|
|
4
|
-
|
|
3
|
+
badge: {
|
|
4
|
+
component: "{UBadge}",
|
|
5
|
+
base: "cursor-pointer",
|
|
6
|
+
variants: {
|
|
7
|
+
size: {
|
|
8
|
+
sm: "pr-1",
|
|
9
|
+
md: "pr-1.5",
|
|
10
|
+
lg: "pr-1.5",
|
|
11
|
+
},
|
|
12
|
+
},
|
|
13
|
+
},
|
|
14
|
+
badgeActive: "group",
|
|
15
|
+
icon: "{UIcon} transition duration-300 group-[]:rotate-180",
|
|
5
16
|
iconName: "keyboard_arrow_down",
|
|
6
|
-
iconRotate: "rotate-180",
|
|
7
17
|
listWrapper: {
|
|
8
18
|
base: `
|
|
9
19
|
absolute z-10
|
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
v-bind="badgeAttrs"
|
|
12
12
|
@click="onClickBadge"
|
|
13
13
|
>
|
|
14
|
-
<template #right>
|
|
14
|
+
<template #right-icon>
|
|
15
15
|
<UIcon
|
|
16
16
|
v-if="!noIcon"
|
|
17
17
|
internal
|
|
@@ -204,9 +204,9 @@ const { config, listWrapperAttrs, wrapperAttrs, badgeAttrs, listAttrs, iconAttrs
|
|
|
204
204
|
|
|
205
205
|
const iconSize = computed(() => {
|
|
206
206
|
const sizes = {
|
|
207
|
-
sm: "
|
|
208
|
-
md: "
|
|
209
|
-
lg: "
|
|
207
|
+
sm: "2xs",
|
|
208
|
+
md: "xs",
|
|
209
|
+
lg: "sm",
|
|
210
210
|
};
|
|
211
211
|
|
|
212
212
|
return sizes[props.size];
|
|
@@ -28,12 +28,12 @@ export default function useAttrs(props, { isShownOptions }) {
|
|
|
28
28
|
|
|
29
29
|
attrs[`${key}Attrs`] = getAttrs(key, { classes });
|
|
30
30
|
|
|
31
|
-
if (key === "
|
|
32
|
-
const
|
|
31
|
+
if (key === "button") {
|
|
32
|
+
const buttonAttrs = attrs[`${key}Attrs`];
|
|
33
33
|
|
|
34
34
|
attrs[`${key}Attrs`] = computed(() => ({
|
|
35
|
-
...
|
|
36
|
-
class: cx([
|
|
35
|
+
...buttonAttrs.value,
|
|
36
|
+
class: cx([buttonAttrs.value.class, isShownOptions.value && config.value.buttonActive]),
|
|
37
37
|
}));
|
|
38
38
|
}
|
|
39
39
|
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
export default /*tw*/ {
|
|
2
2
|
wrapper: "relative inline-block",
|
|
3
3
|
button: "{UButton}",
|
|
4
|
-
|
|
4
|
+
buttonActive: "group",
|
|
5
|
+
icon: "{UIcon} transition duration-300 group-[]:rotate-180",
|
|
5
6
|
iconName: "keyboard_arrow_down",
|
|
6
|
-
iconRotate: "rotate-180",
|
|
7
7
|
listWrapper: {
|
|
8
8
|
base: `
|
|
9
9
|
absolute z-10 inline-block
|
|
@@ -28,12 +28,12 @@ export default function useAttrs(props, { isShownOptions }) {
|
|
|
28
28
|
|
|
29
29
|
attrs[`${key}Attrs`] = getAttrs(key, { classes });
|
|
30
30
|
|
|
31
|
-
if (key === "
|
|
32
|
-
const
|
|
31
|
+
if (key === "link") {
|
|
32
|
+
const linkAttrs = attrs[`${key}Attrs`];
|
|
33
33
|
|
|
34
34
|
attrs[`${key}Attrs`] = computed(() => ({
|
|
35
|
-
...
|
|
36
|
-
class: cx([
|
|
35
|
+
...linkAttrs.value,
|
|
36
|
+
class: cx([linkAttrs.value.class, isShownOptions.value && config.value.linkActive]),
|
|
37
37
|
}));
|
|
38
38
|
}
|
|
39
39
|
|
|
@@ -2,9 +2,9 @@ export default /*tw*/ {
|
|
|
2
2
|
wrapper: "relative inline-block",
|
|
3
3
|
trigger: "flex items-center relative space-x-0.5",
|
|
4
4
|
link: "{ULink}",
|
|
5
|
-
|
|
5
|
+
linkActive: "group",
|
|
6
|
+
icon: "{UIcon} block transition duration-300 group-[]:rotate-180",
|
|
6
7
|
iconName: "keyboard_arrow_down",
|
|
7
|
-
iconRotate: "rotate-180",
|
|
8
8
|
listWrapper: {
|
|
9
9
|
base: `
|
|
10
10
|
absolute z-10
|
|
@@ -68,30 +68,18 @@ export default function useAttrs(props, { isTop, isOpen, selectedLabel: selected
|
|
|
68
68
|
}));
|
|
69
69
|
}
|
|
70
70
|
|
|
71
|
-
if (
|
|
72
|
-
|
|
71
|
+
if (
|
|
72
|
+
key === "toggle" ||
|
|
73
|
+
key === "clear" ||
|
|
74
|
+
key === "beforeCaret" ||
|
|
75
|
+
key === "afterCaret" ||
|
|
76
|
+
key === "rightIconWrapper"
|
|
77
|
+
) {
|
|
78
|
+
const keyAttrs = attrs[`${key}Attrs`];
|
|
73
79
|
|
|
74
80
|
attrs[`${key}Attrs`] = computed(() => ({
|
|
75
|
-
...
|
|
76
|
-
class: cx([
|
|
77
|
-
}));
|
|
78
|
-
}
|
|
79
|
-
|
|
80
|
-
if (key === "beforeCaret") {
|
|
81
|
-
const beforeCaretAttrs = attrs[`${key}Attrs`];
|
|
82
|
-
|
|
83
|
-
attrs[`${key}Attrs`] = computed(() => ({
|
|
84
|
-
...beforeCaretAttrs.value,
|
|
85
|
-
class: cx([beforeCaretAttrs.value.class, caretClasses.value]),
|
|
86
|
-
}));
|
|
87
|
-
}
|
|
88
|
-
|
|
89
|
-
if (key === "afterCaret") {
|
|
90
|
-
const afterCaretAttrs = attrs[`${key}Attrs`];
|
|
91
|
-
|
|
92
|
-
attrs[`${key}Attrs`] = computed(() => ({
|
|
93
|
-
...afterCaretAttrs.value,
|
|
94
|
-
class: cx([afterCaretAttrs.value.class, caretClasses.value]),
|
|
81
|
+
...keyAttrs.value,
|
|
82
|
+
class: cx([keyAttrs.value.class, caretClasses.value]),
|
|
95
83
|
}));
|
|
96
84
|
}
|
|
97
85
|
|
|
@@ -18,10 +18,7 @@ export default /*tw*/ {
|
|
|
18
18
|
`,
|
|
19
19
|
},
|
|
20
20
|
disabled: {
|
|
21
|
-
true:
|
|
22
|
-
border-gray-100 bg-gray-100 text-gray-900 hover:border-gray-100
|
|
23
|
-
focus-within:border-gray-100 focus-within:ring-0 focus-within:ring-offset-0
|
|
24
|
-
`,
|
|
21
|
+
true: "bg-gray-100 pointer-events-none",
|
|
25
22
|
},
|
|
26
23
|
},
|
|
27
24
|
compoundVariants: [
|
|
@@ -52,7 +49,7 @@ export default /*tw*/ {
|
|
|
52
49
|
lg: "text-base min-h-6",
|
|
53
50
|
},
|
|
54
51
|
disabled: {
|
|
55
|
-
true: "
|
|
52
|
+
true: "text-gray-700",
|
|
56
53
|
},
|
|
57
54
|
multiple: {
|
|
58
55
|
true: "py-2 last:mb-2.5 flex justify-between border-b border-gray-100",
|
|
@@ -64,8 +61,8 @@ export default /*tw*/ {
|
|
|
64
61
|
{ size: "lg", multiple: true, class: "text-base" },
|
|
65
62
|
],
|
|
66
63
|
},
|
|
67
|
-
leftIconWrapper: "pr-
|
|
68
|
-
rightIconWrapper: "
|
|
64
|
+
leftIconWrapper: "pr-1.5",
|
|
65
|
+
rightIconWrapper: "pr-3",
|
|
69
66
|
leftIcon: "{UIcon}",
|
|
70
67
|
rightIcon: "{UIcon}",
|
|
71
68
|
beforeCaret: "",
|
|
@@ -79,7 +76,7 @@ export default /*tw*/ {
|
|
|
79
76
|
],
|
|
80
77
|
},
|
|
81
78
|
toggle: "mr-3",
|
|
82
|
-
toggleIcon: "{UIcon}
|
|
79
|
+
toggleIcon: "{UIcon} transition duration-300 group-[]/active:rotate-180",
|
|
83
80
|
toggleIconName: "expand_more",
|
|
84
81
|
clear: "",
|
|
85
82
|
clearIcon: "{UIcon}",
|
|
@@ -95,7 +92,7 @@ export default /*tw*/ {
|
|
|
95
92
|
{ size: "lg", class: "text-base" },
|
|
96
93
|
],
|
|
97
94
|
},
|
|
98
|
-
search: "flex w-
|
|
95
|
+
search: "flex w-full",
|
|
99
96
|
searchInput: {
|
|
100
97
|
base: `
|
|
101
98
|
p-0 font-normal leading-none text-gray-900 relative w-full border-none bg-transparent
|
package/ui.form-select/index.vue
CHANGED
|
@@ -11,10 +11,11 @@
|
|
|
11
11
|
centred
|
|
12
12
|
v-bind="labelAttrs"
|
|
13
13
|
:data-test="dataTest"
|
|
14
|
+
:tabindex="-1"
|
|
14
15
|
>
|
|
15
16
|
<div
|
|
16
17
|
ref="wrapperRef"
|
|
17
|
-
:tabindex="searchable ? -1 : 0"
|
|
18
|
+
:tabindex="searchable || disabled ? -1 : 0"
|
|
18
19
|
role="combobox"
|
|
19
20
|
:aria-owns="'listbox-' + id"
|
|
20
21
|
v-bind="wrapperAttrs"
|
|
@@ -25,9 +26,30 @@
|
|
|
25
26
|
@keydown.enter.tab.stop.self="dropdownListRef.addPointerElement"
|
|
26
27
|
@keyup.esc="deactivate"
|
|
27
28
|
>
|
|
29
|
+
<!-- @slot Use it to add something after input. -->
|
|
30
|
+
<slot name="right" />
|
|
31
|
+
|
|
32
|
+
<div v-if="hasSlotContent($slots['right-icon']) || rightIcon" v-bind="rightIconWrapperAttrs">
|
|
33
|
+
<!--
|
|
34
|
+
@slot Use it to add icon after option.
|
|
35
|
+
@binding {string} icon-name
|
|
36
|
+
@binding {string} icon-size
|
|
37
|
+
-->
|
|
38
|
+
<slot name="right-icon" :icon-name="rightIcon" :icon-size="iconSize">
|
|
39
|
+
<UIcon
|
|
40
|
+
v-if="rightIcon"
|
|
41
|
+
:name="rightIcon"
|
|
42
|
+
:size="iconSize"
|
|
43
|
+
internal
|
|
44
|
+
v-bind="rightIconAttrs"
|
|
45
|
+
/>
|
|
46
|
+
</slot>
|
|
47
|
+
</div>
|
|
48
|
+
|
|
28
49
|
<div
|
|
29
50
|
v-if="hasSlotContent($slots['after-caret']) && !(multiple && localValue.length)"
|
|
30
51
|
v-bind="afterCaretAttrs"
|
|
52
|
+
:tabindex="-1"
|
|
31
53
|
>
|
|
32
54
|
<!--
|
|
33
55
|
@slot Use it to add something after caret.
|
|
@@ -39,6 +61,7 @@
|
|
|
39
61
|
<div
|
|
40
62
|
v-show="!multiple || (!isLocalValue && multiple)"
|
|
41
63
|
v-bind="toggleAttrs"
|
|
64
|
+
:tabindex="-1"
|
|
42
65
|
@mousedown.prevent.stop="toggle"
|
|
43
66
|
>
|
|
44
67
|
<UIcon
|
|
@@ -48,20 +71,10 @@
|
|
|
48
71
|
:size="iconSize"
|
|
49
72
|
:name="config.toggleIconName"
|
|
50
73
|
v-bind="toggleIconAttrs"
|
|
74
|
+
:tabindex="-1"
|
|
51
75
|
/>
|
|
52
76
|
</div>
|
|
53
77
|
|
|
54
|
-
<div
|
|
55
|
-
v-if="hasSlotContent($slots['before-caret']) && !(multiple && localValue.length)"
|
|
56
|
-
v-bind="beforeCaretAttrs"
|
|
57
|
-
>
|
|
58
|
-
<!--
|
|
59
|
-
@slot Use it to add something before caret.
|
|
60
|
-
@binding {object} scope-props
|
|
61
|
-
-->
|
|
62
|
-
<slot :scope-props="props" name="before-caret" />
|
|
63
|
-
</div>
|
|
64
|
-
|
|
65
78
|
<div v-if="isLocalValue && !noClear && !disabled && !multiple" v-bind="clearAttrs">
|
|
66
79
|
<UIcon
|
|
67
80
|
internal
|
|
@@ -74,6 +87,17 @@
|
|
|
74
87
|
/>
|
|
75
88
|
</div>
|
|
76
89
|
|
|
90
|
+
<div
|
|
91
|
+
v-if="hasSlotContent($slots['before-caret']) && !(multiple && localValue.length)"
|
|
92
|
+
v-bind="beforeCaretAttrs"
|
|
93
|
+
>
|
|
94
|
+
<!--
|
|
95
|
+
@slot Use it to add something before caret.
|
|
96
|
+
@binding {object} scope-props
|
|
97
|
+
-->
|
|
98
|
+
<slot :scope-props="props" name="before-caret" />
|
|
99
|
+
</div>
|
|
100
|
+
|
|
77
101
|
<div ref="innerWrapperRef" v-bind="innerWrapperAttrs">
|
|
78
102
|
<span
|
|
79
103
|
v-if="hasSlotContent($slots['left-icon']) || leftIcon"
|
|
@@ -192,29 +216,6 @@
|
|
|
192
216
|
@click.prevent.capture
|
|
193
217
|
v-text="currentLocale.clear"
|
|
194
218
|
/>
|
|
195
|
-
|
|
196
|
-
<!-- @slot Use it to add something after input. -->
|
|
197
|
-
<slot name="right" />
|
|
198
|
-
|
|
199
|
-
<span
|
|
200
|
-
v-if="hasSlotContent($slots['right-icon']) || rightIcon"
|
|
201
|
-
v-bind="rightIconWrapperAttrs"
|
|
202
|
-
>
|
|
203
|
-
<!--
|
|
204
|
-
@slot Use it to add icon after option.
|
|
205
|
-
@binding {string} icon-name
|
|
206
|
-
@binding {string} icon-size
|
|
207
|
-
-->
|
|
208
|
-
<slot name="right-icon" :icon-name="rightIcon" :icon-size="iconSize">
|
|
209
|
-
<UIcon
|
|
210
|
-
v-if="rightIcon"
|
|
211
|
-
:name="rightIcon"
|
|
212
|
-
:size="iconSize"
|
|
213
|
-
internal
|
|
214
|
-
v-bind="rightIconAttrs"
|
|
215
|
-
/>
|
|
216
|
-
</slot>
|
|
217
|
-
</span>
|
|
218
219
|
</div>
|
|
219
220
|
|
|
220
221
|
<UDropdownList
|
|
@@ -752,7 +753,7 @@ function toggle() {
|
|
|
752
753
|
}
|
|
753
754
|
|
|
754
755
|
function deactivate() {
|
|
755
|
-
if (!isOpen.value) return;
|
|
756
|
+
if (!isOpen.value || props.disabled) return;
|
|
756
757
|
|
|
757
758
|
props.searchable && searchInputRef.value ? searchInputRef.value.blur() : wrapperRef.value?.blur();
|
|
758
759
|
|
package/ui.image-icon/index.vue
CHANGED
|
@@ -27,7 +27,7 @@ export default /*tw*/ {
|
|
|
27
27
|
],
|
|
28
28
|
},
|
|
29
29
|
text: "{UText}",
|
|
30
|
-
body: "flex items-
|
|
30
|
+
body: "flex items-start justify-between",
|
|
31
31
|
content: "",
|
|
32
32
|
innerWrapper: "flex gap-2",
|
|
33
33
|
title: {
|
|
@@ -42,13 +42,10 @@ export default /*tw*/ {
|
|
|
42
42
|
},
|
|
43
43
|
},
|
|
44
44
|
description: "",
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
compoundVariants: [{ color: "grayscale", variant: "primary", closable: true, class: "hover:bg-gray-200" }],
|
|
48
|
-
},
|
|
49
|
-
icon: "{UIcon}",
|
|
50
|
-
iconName: "close",
|
|
45
|
+
closeButton: "{UButton}",
|
|
46
|
+
closeIcon: "{UIcon}",
|
|
51
47
|
defaults: {
|
|
48
|
+
closeIcon: "close",
|
|
52
49
|
variant: "primary",
|
|
53
50
|
color: "brand",
|
|
54
51
|
size: "md",
|
package/ui.text-alert/index.vue
CHANGED
|
@@ -43,19 +43,19 @@
|
|
|
43
43
|
v-if="closable"
|
|
44
44
|
square
|
|
45
45
|
no-ring
|
|
46
|
-
size="
|
|
47
|
-
:color="
|
|
46
|
+
size="xs"
|
|
47
|
+
:color="closeButtonColor"
|
|
48
48
|
variant="thirdary"
|
|
49
|
-
v-bind="
|
|
49
|
+
v-bind="closeButtonAttrs"
|
|
50
50
|
@click="onClickClose"
|
|
51
51
|
>
|
|
52
52
|
<UIcon
|
|
53
53
|
internal
|
|
54
|
-
size="
|
|
54
|
+
:size="closeIconSize"
|
|
55
55
|
:color="iconColor"
|
|
56
|
-
:name="config.
|
|
56
|
+
:name="config.defaults.closeIcon"
|
|
57
57
|
:data-test="`${dataTest}-button`"
|
|
58
|
-
v-bind="
|
|
58
|
+
v-bind="closeIconAttrs"
|
|
59
59
|
/>
|
|
60
60
|
</UButton>
|
|
61
61
|
</div>
|
|
@@ -181,8 +181,8 @@ const {
|
|
|
181
181
|
textAttrs,
|
|
182
182
|
titleAttrs,
|
|
183
183
|
descriptionAttrs,
|
|
184
|
-
|
|
185
|
-
|
|
184
|
+
closeButtonAttrs,
|
|
185
|
+
closeIconAttrs,
|
|
186
186
|
innerWrapperAttrs,
|
|
187
187
|
hasSlotContent,
|
|
188
188
|
} = useAttrs(props);
|
|
@@ -198,10 +198,26 @@ function onClickClose() {
|
|
|
198
198
|
emit("hidden");
|
|
199
199
|
}
|
|
200
200
|
|
|
201
|
+
const closeIconSize = computed(() => {
|
|
202
|
+
const sizes = {
|
|
203
|
+
xs: "3xs",
|
|
204
|
+
sm: "2xs",
|
|
205
|
+
md: "xs",
|
|
206
|
+
lg: "sm",
|
|
207
|
+
};
|
|
208
|
+
|
|
209
|
+
return sizes[props.size];
|
|
210
|
+
});
|
|
211
|
+
|
|
212
|
+
const closeButtonColor = computed(() => {
|
|
213
|
+
if (props.color === "grayscale") return "white";
|
|
214
|
+
if (props.color === "white") return "grayscale";
|
|
215
|
+
|
|
216
|
+
return props.color;
|
|
217
|
+
});
|
|
218
|
+
|
|
201
219
|
const iconColor = computed(() => {
|
|
202
|
-
if (props.color === "white")
|
|
203
|
-
return "gray";
|
|
204
|
-
}
|
|
220
|
+
if (props.color === "white") return "gray";
|
|
205
221
|
|
|
206
222
|
return props.variant === "primary" ? "white" : props.color;
|
|
207
223
|
});
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
export default /*tw*/ {
|
|
2
2
|
wrapper: {
|
|
3
|
-
base: "border
|
|
3
|
+
base: "border rounded-full inline-block py-1 !leading-none",
|
|
4
4
|
variants: {
|
|
5
5
|
variant: {
|
|
6
6
|
primary: "bg-{color}-50 text-{color}-600 border-transparent",
|
|
@@ -8,9 +8,9 @@ export default /*tw*/ {
|
|
|
8
8
|
thirdary: "text-{color}-600 border-transparent",
|
|
9
9
|
},
|
|
10
10
|
size: {
|
|
11
|
-
sm: "px-2
|
|
12
|
-
md: "px-2
|
|
13
|
-
lg: "px-3
|
|
11
|
+
sm: "px-2 text-2xs",
|
|
12
|
+
md: "px-2.5 text-xs",
|
|
13
|
+
lg: "px-3 text-sm",
|
|
14
14
|
},
|
|
15
15
|
weight: {
|
|
16
16
|
regular: "font-normal",
|
|
@@ -31,9 +31,9 @@ export default /*tw*/ {
|
|
|
31
31
|
base: "flex items-center",
|
|
32
32
|
variants: {
|
|
33
33
|
size: {
|
|
34
|
-
sm: "
|
|
35
|
-
md: "
|
|
36
|
-
lg: "
|
|
34
|
+
sm: "gap-0.5",
|
|
35
|
+
md: "gap-x-0.5",
|
|
36
|
+
lg: "gap-x-0.5",
|
|
37
37
|
},
|
|
38
38
|
},
|
|
39
39
|
},
|
package/ui.text-badge/index.vue
CHANGED
package/web-types.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"framework": "vue",
|
|
3
3
|
"name": "vueless",
|
|
4
|
-
"version": "0.0.
|
|
4
|
+
"version": "0.0.289",
|
|
5
5
|
"contributions": {
|
|
6
6
|
"html": {
|
|
7
7
|
"description-markup": "markdown",
|
|
@@ -5545,15 +5545,15 @@
|
|
|
5545
5545
|
"slots": [
|
|
5546
5546
|
{
|
|
5547
5547
|
"name": "left",
|
|
5548
|
-
"description": "Use it to add something before the
|
|
5548
|
+
"description": "Use it to add something before the label."
|
|
5549
5549
|
},
|
|
5550
5550
|
{
|
|
5551
5551
|
"name": "default",
|
|
5552
|
-
"description": "Use it replace the
|
|
5552
|
+
"description": "Use it replace the label."
|
|
5553
5553
|
},
|
|
5554
5554
|
{
|
|
5555
5555
|
"name": "right",
|
|
5556
|
-
"description": "Use it to add something after the
|
|
5556
|
+
"description": "Use it to add something after the label."
|
|
5557
5557
|
}
|
|
5558
5558
|
],
|
|
5559
5559
|
"source": {
|
|
@@ -7315,6 +7315,25 @@
|
|
|
7315
7315
|
}
|
|
7316
7316
|
],
|
|
7317
7317
|
"slots": [
|
|
7318
|
+
{
|
|
7319
|
+
"name": "right",
|
|
7320
|
+
"description": "Use it to add something after input."
|
|
7321
|
+
},
|
|
7322
|
+
{
|
|
7323
|
+
"name": "right-icon",
|
|
7324
|
+
"scoped": true,
|
|
7325
|
+
"description": "Use it to add icon after option.",
|
|
7326
|
+
"bindings": [
|
|
7327
|
+
{
|
|
7328
|
+
"type": "string",
|
|
7329
|
+
"name": "icon-name"
|
|
7330
|
+
},
|
|
7331
|
+
{
|
|
7332
|
+
"type": "string",
|
|
7333
|
+
"name": "icon-size"
|
|
7334
|
+
}
|
|
7335
|
+
]
|
|
7336
|
+
},
|
|
7318
7337
|
{
|
|
7319
7338
|
"name": "after-caret",
|
|
7320
7339
|
"scoped": true,
|
|
@@ -7382,25 +7401,6 @@
|
|
|
7382
7401
|
}
|
|
7383
7402
|
]
|
|
7384
7403
|
},
|
|
7385
|
-
{
|
|
7386
|
-
"name": "right",
|
|
7387
|
-
"description": "Use it to add something after input."
|
|
7388
|
-
},
|
|
7389
|
-
{
|
|
7390
|
-
"name": "right-icon",
|
|
7391
|
-
"scoped": true,
|
|
7392
|
-
"description": "Use it to add icon after option.",
|
|
7393
|
-
"bindings": [
|
|
7394
|
-
{
|
|
7395
|
-
"type": "string",
|
|
7396
|
-
"name": "icon-name"
|
|
7397
|
-
},
|
|
7398
|
-
{
|
|
7399
|
-
"type": "string",
|
|
7400
|
-
"name": "icon-size"
|
|
7401
|
-
}
|
|
7402
|
-
]
|
|
7403
|
-
},
|
|
7404
7404
|
{
|
|
7405
7405
|
"name": "before-option",
|
|
7406
7406
|
"scoped": true,
|