vueless 0.0.287 → 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/composable.ui/index.js +3 -2
- package/constants/index.js +2 -1
- package/directive.tooltip/index.js +1 -2
- package/package.json +3 -3
- package/service.ui/index.js +3 -6
- package/ui.button/configs/default.config.js +4 -4
- package/ui.button/index.vue +1 -1
- package/ui.button-link/composables/attrs.composable.js +18 -28
- package/ui.button-link/configs/default.config.js +9 -7
- package/ui.button-link/index.stories.js +20 -1
- package/ui.button-link/index.vue +21 -28
- package/ui.button-toggle/configs/default.config.js +1 -1
- package/ui.button-toggle-item/configs/default.config.js +1 -1
- package/ui.container-accordion/configs/default.config.js +1 -1
- package/ui.container-card/configs/default.config.js +1 -1
- package/ui.container-card/index.stories.js +2 -2
- package/ui.container-col/configs/default.config.js +1 -1
- package/ui.container-divider/configs/default.config.js +1 -1
- package/ui.container-group/configs/default.config.js +1 -1
- package/ui.container-modal/configs/default.config.js +1 -1
- package/ui.container-modal/index.vue +1 -1
- package/ui.container-modal-confirm/configs/default.config.js +1 -1
- package/ui.container-page/configs/default.config.js +2 -2
- package/ui.container-page/index.stories.js +2 -2
- package/ui.container-page/index.vue +22 -11
- package/ui.container-row/configs/default.config.js +1 -1
- package/ui.data-list/configs/default.config.js +1 -1
- package/ui.data-table/configs/default.config.js +1 -1
- package/ui.data-table/index.stories.js +1 -1
- package/ui.dropdown-badge/composables/attrs.composable.js +4 -4
- package/ui.dropdown-badge/configs/default.config.js +14 -4
- 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 +3 -3
- package/ui.dropdown-link/composables/attrs.composable.js +4 -4
- package/ui.dropdown-link/configs/default.config.js +3 -3
- package/ui.dropdown-list/configs/default.config.js +1 -1
- package/ui.form-calendar/configs/default.config.js +1 -1
- package/ui.form-checkbox/configs/default.config.js +1 -1
- package/ui.form-checkbox-group/configs/default.config.js +1 -1
- package/ui.form-checkbox-multi-state/configs/default.config.js +1 -1
- package/ui.form-color-picker/configs/default.config.js +1 -1
- package/ui.form-date-picker/configs/default.config.js +1 -1
- package/ui.form-date-picker-range/configs/default.config.js +1 -1
- package/ui.form-input/configs/default.config.js +1 -1
- package/ui.form-input-file/configs/default.config.js +2 -2
- package/ui.form-input-file/index.vue +14 -13
- package/ui.form-input-money/configs/default.config.js +1 -1
- package/ui.form-input-number/configs/default.config.js +1 -1
- package/ui.form-input-rating/configs/default.config.js +1 -1
- package/ui.form-input-search/configs/default.config.js +1 -1
- package/ui.form-label/configs/default.config.js +1 -1
- package/ui.form-radio/configs/default.config.js +1 -1
- package/ui.form-radio-group/configs/default.config.js +1 -1
- package/ui.form-select/composables/attrs.composable.js +10 -22
- package/ui.form-select/configs/default.config.js +7 -10
- package/ui.form-select/index.vue +37 -36
- package/ui.form-switch/configs/default.config.js +1 -1
- package/ui.form-textarea/configs/default.config.js +1 -1
- package/ui.image-avatar/configs/default.config.js +1 -1
- package/ui.image-icon/configs/default.config.js +4 -48
- package/ui.image-icon/index.stories.js +0 -3
- package/ui.image-icon/index.vue +14 -42
- package/ui.loader/configs/default.config.js +1 -1
- package/ui.loader-rendering/configs/default.config.js +1 -1
- package/ui.loader-top/configs/default.config.js +1 -1
- package/ui.navigation-pagination/configs/default.config.js +1 -1
- package/ui.navigation-progress/configs/default.config.js +1 -1
- package/ui.navigation-tab/configs/default.config.js +1 -1
- package/ui.navigation-tabs/configs/default.config.js +1 -1
- package/ui.other-dot/configs/default.config.js +1 -1
- package/ui.text-alert/configs/default.config.js +5 -8
- package/ui.text-alert/index.vue +27 -11
- package/ui.text-badge/configs/default.config.js +8 -8
- package/ui.text-badge/index.vue +3 -3
- package/ui.text-block/configs/default.config.js +1 -1
- package/ui.text-empty/configs/default.config.js +14 -4
- package/ui.text-empty/index.stories.js +0 -1
- package/ui.text-empty/index.vue +19 -10
- package/ui.text-file/configs/default.config.js +2 -2
- package/ui.text-file/index.vue +1 -1
- package/ui.text-files/configs/default.config.js +1 -1
- package/ui.text-header/configs/default.config.js +1 -1
- package/ui.text-money/configs/default.config.js +1 -1
- package/ui.text-notify/configs/default.config.js +1 -1
- package/ui.text-notify/index.vue +2 -2
- package/web-types.json +38 -46
|
@@ -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
|
|
@@ -22,7 +32,7 @@ export default /*tw*/ {
|
|
|
22
32
|
},
|
|
23
33
|
},
|
|
24
34
|
list: "{UDropdownList} w-fit",
|
|
25
|
-
|
|
35
|
+
defaults: {
|
|
26
36
|
color: "brand",
|
|
27
37
|
size: "md",
|
|
28
38
|
weight: "medium",
|
|
@@ -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
|
|
@@ -22,7 +22,7 @@ export default /*tw*/ {
|
|
|
22
22
|
},
|
|
23
23
|
},
|
|
24
24
|
list: "{UDropdownList} w-fit",
|
|
25
|
-
|
|
25
|
+
defaults: {
|
|
26
26
|
color: "brand",
|
|
27
27
|
size: "md",
|
|
28
28
|
variant: "primary",
|
|
@@ -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
|
|
@@ -23,7 +23,7 @@ export default /*tw*/ {
|
|
|
23
23
|
},
|
|
24
24
|
},
|
|
25
25
|
list: "{UDropdownList} w-fit",
|
|
26
|
-
|
|
26
|
+
defaults: {
|
|
27
27
|
color: "brand",
|
|
28
28
|
size: "md",
|
|
29
29
|
labelKey: "label",
|
|
@@ -56,7 +56,7 @@ export default /*tw*/ {
|
|
|
56
56
|
chooseFileIconName: "attach_file",
|
|
57
57
|
clearButton: "{UButton}",
|
|
58
58
|
clearIconName: "close",
|
|
59
|
-
|
|
59
|
+
removeItemButton: "{UButton} ml-2",
|
|
60
60
|
removeItemIconName: "close",
|
|
61
61
|
dropzoneWrapperHover: "border-gray-400 border-dashed",
|
|
62
62
|
dropzoneWrapperError: "hover:border-red-400 border-dashed border-red-300",
|
|
@@ -69,7 +69,7 @@ export default /*tw*/ {
|
|
|
69
69
|
noFile: "No file selected",
|
|
70
70
|
uploadFile: "Choose file",
|
|
71
71
|
},
|
|
72
|
-
|
|
72
|
+
defaults: {
|
|
73
73
|
size: "md",
|
|
74
74
|
labelAlign: "topInside",
|
|
75
75
|
allowedFileTypes: [],
|
|
@@ -23,16 +23,18 @@
|
|
|
23
23
|
|
|
24
24
|
<UFiles :size="size" v-bind="fileListAttrs" :file-list="fileList">
|
|
25
25
|
<template #right="{ file }">
|
|
26
|
-
<
|
|
26
|
+
<UButton
|
|
27
27
|
v-if="props.multiple && !disabled"
|
|
28
28
|
round
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
:
|
|
29
|
+
filled
|
|
30
|
+
square
|
|
31
|
+
no-ring
|
|
32
|
+
variant="thirdary"
|
|
33
|
+
:size="removeItemButtonSize"
|
|
34
|
+
:left-icon="config.removeItemIconName"
|
|
35
|
+
:disabled="disabled"
|
|
36
|
+
v-bind="removeItemButtonAttrs"
|
|
34
37
|
:data-test="`${dataTest}-remove-item`"
|
|
35
|
-
v-bind="removeItemIconAttrs"
|
|
36
38
|
@click.stop.prevent="onClickRemoveItem(file.id)"
|
|
37
39
|
/>
|
|
38
40
|
</template>
|
|
@@ -95,7 +97,6 @@ import { computed, nextTick, onBeforeUnmount, onMounted, ref, watch } from "vue"
|
|
|
95
97
|
import { merge } from "lodash-es";
|
|
96
98
|
|
|
97
99
|
import UText from "../ui.text-block";
|
|
98
|
-
import UIcon from "../ui.image-icon";
|
|
99
100
|
import ULabel from "../ui.form-label";
|
|
100
101
|
import UButton from "../ui.button";
|
|
101
102
|
import UFiles from "../ui.text-files";
|
|
@@ -249,7 +250,7 @@ const {
|
|
|
249
250
|
inputAttrs,
|
|
250
251
|
fileListAttrs,
|
|
251
252
|
buttonWrapperAttrs,
|
|
252
|
-
|
|
253
|
+
removeItemButtonAttrs,
|
|
253
254
|
hasSlotContent,
|
|
254
255
|
} = useAttrs(props);
|
|
255
256
|
|
|
@@ -297,11 +298,11 @@ const fileList = computed(() => {
|
|
|
297
298
|
return currentFiles.value ? [currentFiles.value] : [];
|
|
298
299
|
});
|
|
299
300
|
|
|
300
|
-
const
|
|
301
|
+
const removeItemButtonSize = computed(() => {
|
|
301
302
|
const sizes = {
|
|
302
|
-
sm: "
|
|
303
|
-
md: "
|
|
304
|
-
lg: "
|
|
303
|
+
sm: "2xs",
|
|
304
|
+
md: "xs",
|
|
305
|
+
lg: "sm",
|
|
305
306
|
};
|
|
306
307
|
|
|
307
308
|
return sizes[props.size];
|
|
@@ -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
|
|
@@ -117,7 +114,7 @@ export default /*tw*/ {
|
|
|
117
114
|
clear: "clear",
|
|
118
115
|
addMore: "Add more...",
|
|
119
116
|
},
|
|
120
|
-
|
|
117
|
+
defaults: {
|
|
121
118
|
size: "md",
|
|
122
119
|
labelAlign: "topInside",
|
|
123
120
|
openDirection: "auto",
|
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
|
|