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.
Files changed (87) hide show
  1. package/composable.ui/index.js +3 -2
  2. package/constants/index.js +2 -1
  3. package/directive.tooltip/index.js +1 -2
  4. package/package.json +3 -3
  5. package/service.ui/index.js +3 -6
  6. package/ui.button/configs/default.config.js +4 -4
  7. package/ui.button/index.vue +1 -1
  8. package/ui.button-link/composables/attrs.composable.js +18 -28
  9. package/ui.button-link/configs/default.config.js +9 -7
  10. package/ui.button-link/index.stories.js +20 -1
  11. package/ui.button-link/index.vue +21 -28
  12. package/ui.button-toggle/configs/default.config.js +1 -1
  13. package/ui.button-toggle-item/configs/default.config.js +1 -1
  14. package/ui.container-accordion/configs/default.config.js +1 -1
  15. package/ui.container-card/configs/default.config.js +1 -1
  16. package/ui.container-card/index.stories.js +2 -2
  17. package/ui.container-col/configs/default.config.js +1 -1
  18. package/ui.container-divider/configs/default.config.js +1 -1
  19. package/ui.container-group/configs/default.config.js +1 -1
  20. package/ui.container-modal/configs/default.config.js +1 -1
  21. package/ui.container-modal/index.vue +1 -1
  22. package/ui.container-modal-confirm/configs/default.config.js +1 -1
  23. package/ui.container-page/configs/default.config.js +2 -2
  24. package/ui.container-page/index.stories.js +2 -2
  25. package/ui.container-page/index.vue +22 -11
  26. package/ui.container-row/configs/default.config.js +1 -1
  27. package/ui.data-list/configs/default.config.js +1 -1
  28. package/ui.data-table/configs/default.config.js +1 -1
  29. package/ui.data-table/index.stories.js +1 -1
  30. package/ui.dropdown-badge/composables/attrs.composable.js +4 -4
  31. package/ui.dropdown-badge/configs/default.config.js +14 -4
  32. package/ui.dropdown-badge/index.vue +4 -4
  33. package/ui.dropdown-button/composables/attrs.composable.js +4 -4
  34. package/ui.dropdown-button/configs/default.config.js +3 -3
  35. package/ui.dropdown-link/composables/attrs.composable.js +4 -4
  36. package/ui.dropdown-link/configs/default.config.js +3 -3
  37. package/ui.dropdown-list/configs/default.config.js +1 -1
  38. package/ui.form-calendar/configs/default.config.js +1 -1
  39. package/ui.form-checkbox/configs/default.config.js +1 -1
  40. package/ui.form-checkbox-group/configs/default.config.js +1 -1
  41. package/ui.form-checkbox-multi-state/configs/default.config.js +1 -1
  42. package/ui.form-color-picker/configs/default.config.js +1 -1
  43. package/ui.form-date-picker/configs/default.config.js +1 -1
  44. package/ui.form-date-picker-range/configs/default.config.js +1 -1
  45. package/ui.form-input/configs/default.config.js +1 -1
  46. package/ui.form-input-file/configs/default.config.js +2 -2
  47. package/ui.form-input-file/index.vue +14 -13
  48. package/ui.form-input-money/configs/default.config.js +1 -1
  49. package/ui.form-input-number/configs/default.config.js +1 -1
  50. package/ui.form-input-rating/configs/default.config.js +1 -1
  51. package/ui.form-input-search/configs/default.config.js +1 -1
  52. package/ui.form-label/configs/default.config.js +1 -1
  53. package/ui.form-radio/configs/default.config.js +1 -1
  54. package/ui.form-radio-group/configs/default.config.js +1 -1
  55. package/ui.form-select/composables/attrs.composable.js +10 -22
  56. package/ui.form-select/configs/default.config.js +7 -10
  57. package/ui.form-select/index.vue +37 -36
  58. package/ui.form-switch/configs/default.config.js +1 -1
  59. package/ui.form-textarea/configs/default.config.js +1 -1
  60. package/ui.image-avatar/configs/default.config.js +1 -1
  61. package/ui.image-icon/configs/default.config.js +4 -48
  62. package/ui.image-icon/index.stories.js +0 -3
  63. package/ui.image-icon/index.vue +14 -42
  64. package/ui.loader/configs/default.config.js +1 -1
  65. package/ui.loader-rendering/configs/default.config.js +1 -1
  66. package/ui.loader-top/configs/default.config.js +1 -1
  67. package/ui.navigation-pagination/configs/default.config.js +1 -1
  68. package/ui.navigation-progress/configs/default.config.js +1 -1
  69. package/ui.navigation-tab/configs/default.config.js +1 -1
  70. package/ui.navigation-tabs/configs/default.config.js +1 -1
  71. package/ui.other-dot/configs/default.config.js +1 -1
  72. package/ui.text-alert/configs/default.config.js +5 -8
  73. package/ui.text-alert/index.vue +27 -11
  74. package/ui.text-badge/configs/default.config.js +8 -8
  75. package/ui.text-badge/index.vue +3 -3
  76. package/ui.text-block/configs/default.config.js +1 -1
  77. package/ui.text-empty/configs/default.config.js +14 -4
  78. package/ui.text-empty/index.stories.js +0 -1
  79. package/ui.text-empty/index.vue +19 -10
  80. package/ui.text-file/configs/default.config.js +2 -2
  81. package/ui.text-file/index.vue +1 -1
  82. package/ui.text-files/configs/default.config.js +1 -1
  83. package/ui.text-header/configs/default.config.js +1 -1
  84. package/ui.text-money/configs/default.config.js +1 -1
  85. package/ui.text-notify/configs/default.config.js +1 -1
  86. package/ui.text-notify/index.vue +2 -2
  87. 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 === "icon") {
32
- const iconAttrs = attrs[`${key}Attrs`];
31
+ if (key === "badge") {
32
+ const badgeAttrs = attrs[`${key}Attrs`];
33
33
 
34
34
  attrs[`${key}Attrs`] = computed(() => ({
35
- ...iconAttrs.value,
36
- class: cx([iconAttrs.value.class, isShownOptions.value && config.value.iconRotate]),
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: "{UBadge} cursor-pointer",
4
- icon: "{UIcon} transition duration-300",
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
- defaultVariants: {
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: "xs",
208
- md: "sm",
209
- lg: "md",
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 === "icon") {
32
- const iconAttrs = attrs[`${key}Attrs`];
31
+ if (key === "button") {
32
+ const buttonAttrs = attrs[`${key}Attrs`];
33
33
 
34
34
  attrs[`${key}Attrs`] = computed(() => ({
35
- ...iconAttrs.value,
36
- class: cx([iconAttrs.value.class, isShownOptions.value && config.value.iconRotate]),
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
- icon: "{UIcon} transition duration-300",
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
- defaultVariants: {
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 === "icon") {
32
- const iconAttrs = attrs[`${key}Attrs`];
31
+ if (key === "link") {
32
+ const linkAttrs = attrs[`${key}Attrs`];
33
33
 
34
34
  attrs[`${key}Attrs`] = computed(() => ({
35
- ...iconAttrs.value,
36
- class: cx([iconAttrs.value.class, isShownOptions.value && config.value.iconRotate]),
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
- icon: "{UIcon} block transition duration-300",
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
- defaultVariants: {
26
+ defaults: {
27
27
  color: "brand",
28
28
  size: "md",
29
29
  labelKey: "label",
@@ -61,7 +61,7 @@ export default /*tw*/ {
61
61
  noDataToShow: "No data to show.",
62
62
  add: "Add",
63
63
  },
64
- defaultVariants: {
64
+ defaults: {
65
65
  size: "md",
66
66
  labelKey: "label",
67
67
  valueKey: "id",
@@ -123,7 +123,7 @@ export default /*tw*/ {
123
123
  timeLabel: "Time",
124
124
  okLabel: "Ok",
125
125
  },
126
- defaultVariants: {
126
+ defaults: {
127
127
  userFormat: "F j, Y",
128
128
  range: false,
129
129
  timepicker: false,
@@ -43,7 +43,7 @@ export default /*tw*/ {
43
43
  icon: "{UIcon}",
44
44
  partialIconName: "remove",
45
45
  selectedIconName: "check",
46
- defaultVariants: {
46
+ defaults: {
47
47
  color: "brand",
48
48
  size: "md",
49
49
  labelAlign: "right",
@@ -11,7 +11,7 @@ export default /*tw*/ {
11
11
  },
12
12
  },
13
13
  },
14
- defaultVariants: {
14
+ defaults: {
15
15
  color: "brand",
16
16
  size: "md",
17
17
  disabled: false,
@@ -1,6 +1,6 @@
1
1
  export default /*tw*/ {
2
2
  checkbox: "{UCheckbox}",
3
- defaultVariants: {
3
+ defaults: {
4
4
  color: "brand",
5
5
  size: "md",
6
6
  placement: "left",
@@ -24,7 +24,7 @@ export default /*tw*/ {
24
24
  disabled:border-{color}-400 disabled:bg-{color}-400
25
25
  `,
26
26
  },
27
- defaultVariants: {
27
+ defaults: {
28
28
  size: "md",
29
29
  name: "colorPicker",
30
30
  disabled: false,
@@ -107,7 +107,7 @@ export default /*tw*/ {
107
107
  timeLabel: "Time",
108
108
  okLabel: "Ok",
109
109
  },
110
- defaultVariants: {
110
+ defaults: {
111
111
  userFormat: "F j, Y",
112
112
  size: "md",
113
113
  openDirectionX: "auto",
@@ -155,7 +155,7 @@ export default /*tw*/ {
155
155
  },
156
156
  },
157
157
  },
158
- defaultVariants: {
158
+ defaults: {
159
159
  size: "md",
160
160
  variant: "button",
161
161
  openDirectionX: "auto",
@@ -54,7 +54,7 @@ export default /*tw*/ {
54
54
  { labelAlign: "topInside", label: true, size: "lg", class: "pt-7" },
55
55
  ],
56
56
  },
57
- defaultVariants: {
57
+ defaults: {
58
58
  size: "md",
59
59
  type: "text",
60
60
  inputmode: "text",
@@ -56,7 +56,7 @@ export default /*tw*/ {
56
56
  chooseFileIconName: "attach_file",
57
57
  clearButton: "{UButton}",
58
58
  clearIconName: "close",
59
- removeItemIcon: "{UIcon} ml-2",
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
- defaultVariants: {
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
- <UIcon
26
+ <UButton
27
27
  v-if="props.multiple && !disabled"
28
28
  round
29
- internal
30
- interactive
31
- color="brand"
32
- :size="removeItemIconSize"
33
- :name="config.removeItemIconName"
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
- removeItemIconAttrs,
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 removeItemIconSize = computed(() => {
301
+ const removeItemButtonSize = computed(() => {
301
302
  const sizes = {
302
- sm: "4xs",
303
- md: "3xs",
304
- lg: "2xs",
303
+ sm: "2xs",
304
+ md: "xs",
305
+ lg: "sm",
305
306
  };
306
307
 
307
308
  return sizes[props.size];
@@ -1,6 +1,6 @@
1
1
  export default /*tw*/ {
2
2
  input: "{UInput}",
3
- defaultVariants: {
3
+ defaults: {
4
4
  symbol: "$",
5
5
  size: "md",
6
6
  decimalScale: 2,
@@ -27,7 +27,7 @@ export default /*tw*/ {
27
27
  },
28
28
  },
29
29
  },
30
- defaultVariants: {
30
+ defaults: {
31
31
  size: "md",
32
32
  },
33
33
  };
@@ -32,7 +32,7 @@ export default /*tw*/ {
32
32
  },
33
33
  },
34
34
  },
35
- defaultVariants: {
35
+ defaults: {
36
36
  labelAlign: "top",
37
37
  size: "md",
38
38
  stars: 5,
@@ -5,7 +5,7 @@ export default /*tw*/ {
5
5
  searchIcon: "{UIcon}",
6
6
  searchIconName: "search",
7
7
  button: "{UButton} rounded-l-none ml-1 outline outline-1 outline-gray-900",
8
- defaultVariants: {
8
+ defaults: {
9
9
  size: "md",
10
10
  labelAlign: "topInside",
11
11
  debounce: 300,
@@ -97,7 +97,7 @@ export default /*tw*/ {
97
97
  { align: "topInside", size: "lg", class: "mt-2.5" },
98
98
  ],
99
99
  },
100
- defaultVariants: {
100
+ defaults: {
101
101
  align: "top",
102
102
  size: "md",
103
103
  error: false,
@@ -19,7 +19,7 @@ export default /*tw*/ {
19
19
  },
20
20
  },
21
21
  },
22
- defaultVariants: {
22
+ defaults: {
23
23
  color: "brand",
24
24
  labelAlign: "right",
25
25
  size: "md",
@@ -11,7 +11,7 @@ export default /*tw*/ {
11
11
  },
12
12
  },
13
13
  },
14
- defaultVariants: {
14
+ defaults: {
15
15
  color: "brand",
16
16
  size: "md",
17
17
  disabled: false,
@@ -68,30 +68,18 @@ export default function useAttrs(props, { isTop, isOpen, selectedLabel: selected
68
68
  }));
69
69
  }
70
70
 
71
- if (key === "clear") {
72
- const clearAttrs = attrs[`${key}Attrs`];
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
- ...clearAttrs.value,
76
- class: cx([clearAttrs.value.class, caretClasses.value]),
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: "bg-gray-100",
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-3 flex items-center",
68
- rightIconWrapper: "pl-3 flex items-center",
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} transform transition duration-300 group-[]/active:rotate-180",
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-fit",
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
- defaultVariants: {
117
+ defaults: {
121
118
  size: "md",
122
119
  labelAlign: "topInside",
123
120
  openDirection: "auto",
@@ -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
 
@@ -58,7 +58,7 @@ export default /*tw*/ {
58
58
  inactive: "Off",
59
59
  active: "On",
60
60
  },
61
- defaultVariants: {
61
+ defaults: {
62
62
  color: "brand",
63
63
  size: "md",
64
64
  labelAlign: "right",
@@ -40,7 +40,7 @@ export default /*tw*/ {
40
40
  },
41
41
  },
42
42
  },
43
- defaultVariants: {
43
+ defaults: {
44
44
  rows: "3",
45
45
  size: "md",
46
46
  type: "text",
@@ -34,7 +34,7 @@ export default /*tw*/ {
34
34
  },
35
35
  },
36
36
  icon: "{UIcon}",
37
- defaultVariants: {
37
+ defaults: {
38
38
  color: "grayscale",
39
39
  rounded: "md",
40
40
  size: "md",