vueless 0.0.616 → 0.0.617

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 (65) hide show
  1. package/package.json +1 -1
  2. package/ui.button/UButton.vue +0 -3
  3. package/ui.button-toggle/UToggle.vue +1 -15
  4. package/ui.button-toggle/config.ts +10 -0
  5. package/ui.button-toggle/types.ts +0 -2
  6. package/ui.container-accordion/UAccordion.vue +3 -14
  7. package/ui.container-accordion/config.ts +10 -1
  8. package/ui.container-accordion/types.ts +0 -1
  9. package/ui.data-list/UDataList.vue +4 -35
  10. package/ui.data-list/config.ts +13 -3
  11. package/ui.data-list/types.ts +0 -2
  12. package/ui.dropdown-button/UDropdownButton.vue +1 -29
  13. package/ui.dropdown-button/config.ts +23 -1
  14. package/ui.dropdown-button/types.ts +0 -3
  15. package/ui.dropdown-link/UDropdownLink.vue +1 -12
  16. package/ui.dropdown-link/config.ts +10 -1
  17. package/ui.dropdown-link/types.ts +0 -2
  18. package/ui.form-checkbox/UCheckbox.vue +1 -12
  19. package/ui.form-checkbox/config.ts +10 -1
  20. package/ui.form-checkbox/types.ts +0 -2
  21. package/ui.form-color-picker/UColorPicker.vue +1 -14
  22. package/ui.form-color-picker/config.ts +12 -1
  23. package/ui.form-color-picker/types.ts +0 -2
  24. package/ui.form-date-picker/UDatePicker.vue +5 -7
  25. package/ui.form-date-picker/config.ts +10 -1
  26. package/ui.form-date-picker-range/UDatePickerRange.vue +3 -4
  27. package/ui.form-date-picker-range/config.ts +10 -1
  28. package/ui.form-input/UInput.vue +5 -29
  29. package/ui.form-input/config.ts +13 -3
  30. package/ui.form-input/types.ts +0 -2
  31. package/ui.form-input-file/UInputFile.vue +1 -13
  32. package/ui.form-input-file/config.ts +17 -1
  33. package/ui.form-input-file/types.ts +0 -2
  34. package/ui.form-input-rating/UInputRating.vue +1 -12
  35. package/ui.form-input-rating/config.ts +10 -1
  36. package/ui.form-input-rating/types.ts +0 -2
  37. package/ui.form-input-search/UInputSearch.vue +2 -26
  38. package/ui.form-input-search/config.ts +30 -3
  39. package/ui.form-input-search/types.ts +0 -3
  40. package/ui.form-select/USelect.vue +8 -47
  41. package/ui.form-select/config.ts +15 -5
  42. package/ui.form-select/types.ts +0 -1
  43. package/ui.form-switch/USwitch.vue +1 -12
  44. package/ui.form-switch/config.ts +10 -1
  45. package/ui.form-switch/types.ts +0 -2
  46. package/ui.image-avatar/UAvatar.vue +1 -8
  47. package/ui.navigation-pagination/UPagination.vue +4 -50
  48. package/ui.navigation-pagination/config.ts +21 -4
  49. package/ui.navigation-pagination/types.ts +0 -3
  50. package/ui.navigation-progress/UProgress.vue +3 -17
  51. package/ui.navigation-progress/config.ts +14 -0
  52. package/ui.navigation-progress/types.ts +0 -2
  53. package/ui.text-alert/UAlert.vue +9 -32
  54. package/ui.text-alert/config.ts +22 -2
  55. package/ui.text-alert/types.ts +0 -3
  56. package/ui.text-badge/UBadge.vue +6 -34
  57. package/ui.text-badge/config.ts +13 -3
  58. package/ui.text-badge/types.ts +0 -2
  59. package/ui.text-empty/UEmpty.vue +4 -32
  60. package/ui.text-empty/config.ts +20 -2
  61. package/ui.text-empty/types.ts +0 -3
  62. package/ui.text-file/UFile.vue +2 -24
  63. package/ui.text-file/config.ts +20 -2
  64. package/ui.text-file/types.ts +0 -3
  65. package/web-types.json +1 -80
@@ -11,7 +11,7 @@ import UIcon from "../ui.image-icon/UIcon.vue";
11
11
  import defaultConfig from "./config.ts";
12
12
  import { COMPONENT_NAME } from "./constants.ts";
13
13
 
14
- import type { Props, ButtonSize, IconSize, Config } from "./types.ts";
14
+ import type { Props, Config } from "./types.ts";
15
15
 
16
16
  defineOptions({ inheritAttrs: false });
17
17
 
@@ -46,26 +46,6 @@ const currentPage = computed({
46
46
  },
47
47
  });
48
48
 
49
- const buttonSize = computed(() => {
50
- const sizes = {
51
- sm: "xs",
52
- md: "sm",
53
- lg: "md",
54
- };
55
-
56
- return sizes[props.size] as ButtonSize;
57
- });
58
-
59
- const iconSize = computed(() => {
60
- const sizes = {
61
- sm: "xs",
62
- md: "sm",
63
- lg: "md",
64
- };
65
-
66
- return sizes[props.size] as IconSize;
67
- });
68
-
69
49
  const totalPages = computed(() => {
70
50
  return props.perPage > 0 && props.total ? Math.ceil(props.total / props.perPage) : 0;
71
51
  });
@@ -145,7 +125,6 @@ const {
145
125
  <UButton
146
126
  v-if="showFirst"
147
127
  no-ring
148
- :size="buttonSize"
149
128
  variant="thirdary"
150
129
  :label="firstLabel"
151
130
  :square="!firstLabel"
@@ -159,7 +138,6 @@ const {
159
138
  <UIcon
160
139
  v-if="!firstLabel"
161
140
  internal
162
- :size="iconSize"
163
141
  :name="config.defaults.firstIcon"
164
142
  v-bind="firstIconAttrs"
165
143
  />
@@ -168,7 +146,6 @@ const {
168
146
 
169
147
  <UButton
170
148
  no-ring
171
- :size="buttonSize"
172
149
  variant="thirdary"
173
150
  :label="prevLabel"
174
151
  :square="!prevLabel"
@@ -179,13 +156,7 @@ const {
179
156
  >
180
157
  <!-- @slot Use it to add something instead of the "prev" label. -->
181
158
  <slot name="prev">
182
- <UIcon
183
- v-if="!prevLabel"
184
- internal
185
- :size="iconSize"
186
- :name="config.defaults.prevIcon"
187
- v-bind="prevIconAttrs"
188
- />
159
+ <UIcon v-if="!prevLabel" internal :name="config.defaults.prevIcon" v-bind="prevIconAttrs" />
189
160
  </slot>
190
161
  </UButton>
191
162
 
@@ -195,7 +166,6 @@ const {
195
166
  square
196
167
  no-ring
197
168
  disabled
198
- :size="buttonSize"
199
169
  variant="thirdary"
200
170
  v-bind="inactiveButtonAttrs"
201
171
  >
@@ -207,7 +177,6 @@ const {
207
177
  v-else-if="page.isActive"
208
178
  filled
209
179
  no-ring
210
- :size="buttonSize"
211
180
  :variant="variant"
212
181
  :label="String(page.number)"
213
182
  :disabled="disabled"
@@ -218,7 +187,6 @@ const {
218
187
  <UButton
219
188
  v-else
220
189
  no-ring
221
- :size="buttonSize"
222
190
  variant="thirdary"
223
191
  :label="String(page.number)"
224
192
  :disabled="disabled"
@@ -230,7 +198,6 @@ const {
230
198
 
231
199
  <UButton
232
200
  no-ring
233
- :size="buttonSize"
234
201
  variant="thirdary"
235
202
  :label="nextLabel"
236
203
  :square="!nextLabel"
@@ -241,20 +208,13 @@ const {
241
208
  >
242
209
  <!-- @slot Use it to add something instead of the "next" label. -->
243
210
  <slot name="next">
244
- <UIcon
245
- v-if="!nextLabel"
246
- internal
247
- :size="iconSize"
248
- :name="config.defaults.nextIcon"
249
- v-bind="nextIconAttrs"
250
- />
211
+ <UIcon v-if="!nextLabel" internal :name="config.defaults.nextIcon" v-bind="nextIconAttrs" />
251
212
  </slot>
252
213
  </UButton>
253
214
 
254
215
  <UButton
255
216
  v-if="showLast"
256
217
  no-ring
257
- :size="buttonSize"
258
218
  variant="thirdary"
259
219
  :label="lastLabel"
260
220
  :square="!lastLabel"
@@ -265,13 +225,7 @@ const {
265
225
  >
266
226
  <!-- @slot Use it to add something instead of the "last" label. -->
267
227
  <slot name="last">
268
- <UIcon
269
- v-if="!lastLabel"
270
- internal
271
- :size="iconSize"
272
- :name="config.defaults.lastIcon"
273
- v-bind="lastIconAttrs"
274
- />
228
+ <UIcon v-if="!lastLabel" internal :name="config.defaults.lastIcon" v-bind="lastIconAttrs" />
275
229
  </slot>
276
230
  </UButton>
277
231
  </div>
@@ -7,6 +7,13 @@ export default /*tw*/ {
7
7
  lg: "!text-base",
8
8
  },
9
9
  },
10
+ defaults: {
11
+ size: {
12
+ sm: "xs",
13
+ md: "sm",
14
+ lg: "md",
15
+ },
16
+ },
10
17
  },
11
18
  firstButton: "{UButton} {>paginationButton}",
12
19
  lastButton: "{UButton} {>paginationButton}",
@@ -14,10 +21,20 @@ export default /*tw*/ {
14
21
  nextButton: "{UButton} {>paginationButton}",
15
22
  inactiveButton: "{UButton} {>paginationButton}",
16
23
  activeButton: "{UButton} {>paginationButton}",
17
- lastIcon: "{UIcon}",
18
- firstIcon: "{UIcon}",
19
- prevIcon: "{UIcon}",
20
- nextIcon: "{UIcon}",
24
+ paginationIcon: {
25
+ base: "{UIcon}",
26
+ defaults: {
27
+ size: {
28
+ sm: "xs",
29
+ md: "sm",
30
+ lg: "md",
31
+ },
32
+ },
33
+ },
34
+ lastIcon: "{UIcon} {>paginationIcon}",
35
+ firstIcon: "{UIcon} {>paginationIcon}",
36
+ prevIcon: "{UIcon} {>paginationIcon}",
37
+ nextIcon: "{UIcon} {>paginationIcon}",
21
38
  defaults: {
22
39
  variant: "primary",
23
40
  size: "md",
@@ -3,9 +3,6 @@ import type { ComponentConfig } from "../types.ts";
3
3
 
4
4
  export type Config = typeof defaultConfig;
5
5
 
6
- export type ButtonSize = "xs" | "sm" | "md";
7
- export type IconSize = "xs" | "sm" | "md";
8
-
9
6
  export interface Props {
10
7
  /**
11
8
  * Current page number.
@@ -10,7 +10,7 @@ import { COMPONENT_NAME, VARIANT } from "./constants.ts";
10
10
  import UStepperProgress from "./UStepperProgress.vue";
11
11
  import UHeader from "../ui.text-header/UHeader.vue";
12
12
 
13
- import type { UProgressProps, HeaderSize, Config } from "./types.ts";
13
+ import type { UProgressProps, Config } from "./types.ts";
14
14
 
15
15
  defineOptions({ inheritAttrs: false });
16
16
 
@@ -19,20 +19,6 @@ const props = withDefaults(defineProps<UProgressProps>(), {
19
19
  max: 100,
20
20
  });
21
21
 
22
- const headerSize = computed(() => {
23
- const sizes = {
24
- "2xs": "xs",
25
- xs: "xs",
26
- sm: "sm",
27
- md: "sm",
28
- lg: "lg",
29
- xl: "xl",
30
- "2xl": "2xl",
31
- };
32
-
33
- return sizes[props.size] as HeaderSize;
34
- });
35
-
36
22
  const isSteps = computed(() => Array.isArray(props.max));
37
23
 
38
24
  const realMax = computed(() => {
@@ -67,7 +53,7 @@ function isActiveStep(index: number | string) {
67
53
  * Get element / nested component attributes for each config token ✨
68
54
  * Applies: `class`, `config`, redefined default `props` and dev `vl-...` attributes.
69
55
  */
70
- const { progressAttrs, wrapperAttrs, indicatorAttrs, stepAttrs, stepperAttrs } =
56
+ const { progressAttrs, wrapperAttrs, indicatorAttrs, stepAttrs, stepperAttrs, headerAttrs } =
71
57
  useUI<Config>(defaultConfig);
72
58
  </script>
73
59
 
@@ -105,7 +91,7 @@ const { progressAttrs, wrapperAttrs, indicatorAttrs, stepAttrs, stepperAttrs } =
105
91
  :value="value"
106
92
  :max="max"
107
93
  >
108
- <UHeader v-if="isVariant.stepper" :label="String(step)" :size="headerSize" />
94
+ <UHeader v-if="isVariant.stepper" :label="String(step)" v-bind="headerAttrs" />
109
95
  <template v-else>{{ step }}</template>
110
96
  </slot>
111
97
  </template>
@@ -103,6 +103,20 @@ export default /*tw*/ {
103
103
  },
104
104
  },
105
105
  },
106
+ header: {
107
+ base: "{UHeader}",
108
+ defaults: {
109
+ size: {
110
+ "2xs": "xs",
111
+ xs: "xs",
112
+ sm: "sm",
113
+ md: "sm",
114
+ lg: "lg",
115
+ xl: "xl",
116
+ "2xl": "2xl",
117
+ },
118
+ },
119
+ },
106
120
  defaults: {
107
121
  max: 100,
108
122
  color: "brand",
@@ -3,8 +3,6 @@ import type { ComponentConfig } from "../types.ts";
3
3
 
4
4
  export type Config = typeof defaultConfig;
5
5
 
6
- export type HeaderSize = "xs" | "sm" | "md" | "lg" | "xl" | "2xl";
7
-
8
6
  export interface UProgressProps {
9
7
  /**
10
8
  * Progress value (current step).
@@ -12,7 +12,7 @@ import UText from "../ui.text-block/UText.vue";
12
12
  import { COMPONENT_NAME } from "./constants.ts";
13
13
  import defaultConfig from "./config.ts";
14
14
 
15
- import type { Props, TextSize, CloseIconSize, Config } from "./types.ts";
15
+ import type { Props, Config } from "./types.ts";
16
16
 
17
17
  defineOptions({ inheritAttrs: false });
18
18
 
@@ -40,33 +40,12 @@ function onClickClose() {
40
40
  emit("hidden");
41
41
  }
42
42
 
43
- const textSize = computed(() => {
44
- const sizes = {
45
- xs: "sm",
46
- sm: "sm",
47
- md: "md",
48
- lg: "lg",
49
- };
50
-
51
- return sizes[props.size] as TextSize;
52
- });
53
-
54
- const closeIconSize = computed(() => {
55
- const sizes = {
56
- xs: "3xs",
57
- sm: "2xs",
58
- md: "xs",
59
- lg: "sm",
60
- };
61
-
62
- return sizes[props.size] as CloseIconSize;
63
- });
64
-
65
43
  const closeButtonColor = computed(() => {
66
- if (props.color === "grayscale") return "white";
67
- if (props.color === "white") return "grayscale";
68
-
69
- return props.color;
44
+ if (props.variant === "primary" || props.color === "white") {
45
+ return props.color === "white" ? "grayscale" : "white";
46
+ } else {
47
+ return props.color;
48
+ }
70
49
  });
71
50
 
72
51
  /**
@@ -118,7 +97,7 @@ const {
118
97
  <div v-if="description" v-bind="descriptionAttrs" v-text="description" />
119
98
  </slot>
120
99
 
121
- <UText v-bind="textAttrs" :size="textSize">
100
+ <UText v-bind="textAttrs">
122
101
  <!-- @slot Use it to add something inside. -->
123
102
  <slot />
124
103
  </UText>
@@ -141,13 +120,11 @@ const {
141
120
  <!--
142
121
  @slot Use it to add something instead of the close button.
143
122
  @binding {string} icon-name
144
- @binding {string} icon-size
145
123
  -->
146
- <slot name="close" :icon-name="config.defaults.closeIcon" :icon-size="closeIconSize">
124
+ <slot name="close" :icon-name="config.defaults.closeIcon">
147
125
  <UIcon
148
126
  internal
149
- color="inherit"
150
- :size="closeIconSize"
127
+ :color="closeButtonColor"
151
128
  :name="config.defaults.closeIcon"
152
129
  v-bind="closeIconAttrs"
153
130
  :data-test="`${dataTest}-button`"
@@ -41,9 +41,29 @@ export default /*tw*/ {
41
41
  },
42
42
  },
43
43
  description: "",
44
- text: "{UText}",
44
+ text: {
45
+ base: "{UText}",
46
+ defaults: {
47
+ size: {
48
+ xs: "sm",
49
+ sm: "sm",
50
+ md: "md",
51
+ lg: "lg",
52
+ },
53
+ },
54
+ },
45
55
  closeButton: "{UButton}",
46
- closeIcon: "{UIcon}",
56
+ closeIcon: {
57
+ base: "{UIcon}",
58
+ defaults: {
59
+ size: {
60
+ xs: "3xs",
61
+ sm: "2xs",
62
+ md: "xs",
63
+ lg: "sm",
64
+ },
65
+ },
66
+ },
47
67
  defaults: {
48
68
  variant: "primary",
49
69
  color: "brand",
@@ -3,9 +3,6 @@ import type { ComponentConfig } from "../types.ts";
3
3
 
4
4
  export type Config = typeof defaultConfig;
5
5
 
6
- export type TextSize = "sm" | "md" | "lg";
7
- export type CloseIconSize = "3xs" | "2xs" | "xs" | "sm";
8
-
9
6
  export interface Props {
10
7
  /**
11
8
  * Alert title.
@@ -10,7 +10,7 @@ import UIcon from "../ui.image-icon/UIcon.vue";
10
10
  import { COMPONENT_NAME } from "./constants.ts";
11
11
  import defaultConfig from "./config.ts";
12
12
 
13
- import type { Props, IconSize, Config } from "./types.ts";
13
+ import type { Props, Config } from "./types.ts";
14
14
 
15
15
  defineOptions({ inheritAttrs: false });
16
16
 
@@ -45,16 +45,6 @@ const slots = useSlots();
45
45
 
46
46
  const wrapperRef = useTemplateRef<HTMLElement>("wrapper");
47
47
 
48
- const iconSize = computed(() => {
49
- const sizes = {
50
- sm: "3xs",
51
- md: "2xs",
52
- lg: "xs",
53
- };
54
-
55
- return sizes[props.size] as IconSize;
56
- });
57
-
58
48
  function onFocus() {
59
49
  emit("focus");
60
50
  }
@@ -110,34 +100,18 @@ const { badgeAttrs, bodyAttrs, leftIconAttrs, centerIconAttrs, rightIconAttrs }
110
100
  <!--
111
101
  @slot Use it to add icon before the text.
112
102
  @binding {string} icon-name
113
- @binding {string} icon-size
114
103
  -->
115
- <slot name="left" :icon-name="leftIcon" :icon-size="iconSize">
116
- <UIcon
117
- v-if="leftIcon"
118
- internal
119
- :name="leftIcon"
120
- :size="iconSize"
121
- color="inherit"
122
- v-bind="leftIconAttrs"
123
- />
104
+ <slot name="left" :icon-name="leftIcon">
105
+ <UIcon v-if="leftIcon" internal :name="leftIcon" color="inherit" v-bind="leftIconAttrs" />
124
106
  </slot>
125
107
 
126
108
  <!--
127
109
  @slot Use it to add something instead of the label.
128
110
  @binding {string} label
129
111
  @binding {string} icon-name
130
- @binding {string} icon-size
131
112
  -->
132
- <slot name="default" :label="label" :icon-name="icon" :icon-size="iconSize">
133
- <UIcon
134
- v-if="icon"
135
- internal
136
- :name="icon"
137
- :size="iconSize"
138
- color="inherit"
139
- v-bind="centerIconAttrs"
140
- />
113
+ <slot name="default" :label="label" :icon-name="icon">
114
+ <UIcon v-if="icon" internal :name="icon" color="inherit" v-bind="centerIconAttrs" />
141
115
  <template v-else>
142
116
  {{ label }}
143
117
  </template>
@@ -146,13 +120,11 @@ const { badgeAttrs, bodyAttrs, leftIconAttrs, centerIconAttrs, rightIconAttrs }
146
120
  <!--
147
121
  @slot Use it to add icon after the text.
148
122
  @binding {string} icon-name
149
- @binding {string} icon-size
150
123
  -->
151
- <slot name="right" :icon-name="rightIcon" :icon-size="iconSize">
124
+ <slot name="right" :icon-name="rightIcon">
152
125
  <UIcon
153
126
  v-if="rightIcon"
154
127
  :name="rightIcon"
155
- :size="iconSize"
156
128
  color="inherit"
157
129
  internal
158
130
  v-bind="rightIconAttrs"
@@ -52,9 +52,19 @@ export default /*tw*/ {
52
52
  },
53
53
  },
54
54
  },
55
- leftIcon: "{UIcon}",
56
- centerIcon: "{UIcon}",
57
- rightIcon: "{UIcon}",
55
+ badgeIcon: {
56
+ base: "{UIcon}",
57
+ defaults: {
58
+ size: {
59
+ sm: "3xs",
60
+ md: "2xs",
61
+ lg: "xs",
62
+ },
63
+ },
64
+ },
65
+ centerIcon: "{UIcon} {>badgeIcon}",
66
+ leftIcon: "{UIcon} {>badgeIcon}",
67
+ rightIcon: "{UIcon} {>badgeIcon}",
58
68
  defaults: {
59
69
  color: "brand",
60
70
  variant: "primary",
@@ -3,8 +3,6 @@ import type { ComponentConfig } from "../types.ts";
3
3
 
4
4
  export type Config = typeof defaultConfig;
5
5
 
6
- export type IconSize = "3xs" | "2xs" | "xs";
7
-
8
6
  export interface Props {
9
7
  /**
10
8
  * Badge label.
@@ -1,6 +1,4 @@
1
1
  <script setup lang="ts">
2
- import { computed } from "vue";
3
-
4
2
  import useUI from "../composables/useUI.ts";
5
3
  import { getDefaults } from "../utils/ui.ts";
6
4
 
@@ -10,34 +8,14 @@ import UHeader from "../ui.text-header/UHeader.vue";
10
8
  import { COMPONENT_NAME } from "./constants.ts";
11
9
  import defaultConfig from "./config.ts";
12
10
 
13
- import type { Props, IconSize, TitleSize, Config } from "./types.ts";
11
+ import type { Props, Config } from "./types.ts";
14
12
 
15
13
  defineOptions({ inheritAttrs: false });
16
14
 
17
- const props = withDefaults(defineProps<Props>(), {
15
+ withDefaults(defineProps<Props>(), {
18
16
  ...getDefaults<Props, Config>(defaultConfig, COMPONENT_NAME),
19
17
  });
20
18
 
21
- const iconSize = computed(() => {
22
- const sizes = {
23
- sm: "2xl",
24
- md: "3xl",
25
- lg: "4xl",
26
- };
27
-
28
- return sizes[props.size] as IconSize;
29
- });
30
-
31
- const titleSize = computed(() => {
32
- const sizes = {
33
- sm: "xs",
34
- md: "sm",
35
- lg: "md",
36
- };
37
-
38
- return sizes[props.size] as TitleSize;
39
- });
40
-
41
19
  /**
42
20
  * Get element / nested component attributes for each config token ✨
43
21
  * Applies: `class`, `config`, redefined default `props` and dev `vl-...` attributes.
@@ -60,20 +38,14 @@ const {
60
38
  <!-- @slot Use it to add something to the header. -->
61
39
  <slot name="header">
62
40
  <div v-bind="emptyIconWrapperAttrs">
63
- <UIcon
64
- internal
65
- :name="config.defaults.emptyIcon"
66
- color="gray"
67
- :size="iconSize"
68
- v-bind="emptyIconAttrs"
69
- />
41
+ <UIcon internal :name="config.defaults.emptyIcon" color="gray" v-bind="emptyIconAttrs" />
70
42
  </div>
71
43
  </slot>
72
44
  </div>
73
45
 
74
46
  <!-- @slot Use it to add something inside. -->
75
47
  <slot>
76
- <UHeader v-if="title" :label="title" :size="titleSize" v-bind="titleAttrs" />
48
+ <UHeader v-if="title" :label="title" v-bind="titleAttrs" />
77
49
  <div v-if="description" v-bind="descriptionAttrs" v-text="description" />
78
50
  </slot>
79
51
 
@@ -20,8 +20,26 @@ export default /*tw*/ {
20
20
  },
21
21
  },
22
22
  },
23
- emptyIcon: "{UIcon}",
24
- title: "{UHeader}",
23
+ emptyIcon: {
24
+ base: "{UIcon}",
25
+ defaults: {
26
+ size: {
27
+ sm: "2xl",
28
+ md: "3xl",
29
+ lg: "4xl",
30
+ },
31
+ },
32
+ },
33
+ title: {
34
+ base: "{UHeader}",
35
+ defaults: {
36
+ size: {
37
+ sm: "xs",
38
+ md: "sm",
39
+ lg: "md",
40
+ },
41
+ },
42
+ },
25
43
  description: {
26
44
  base: "text-center",
27
45
  variants: {
@@ -3,9 +3,6 @@ import type { ComponentConfig } from "../types.ts";
3
3
 
4
4
  export type Config = typeof defaultConfig;
5
5
 
6
- export type IconSize = "2xl" | "3xl" | "4xl";
7
- export type TitleSize = "xs" | "sm" | "md";
8
-
9
6
  export interface Props {
10
7
  /**
11
8
  * Empty state title.
@@ -1,5 +1,5 @@
1
1
  <script setup lang="ts">
2
- import { computed, ref, useId } from "vue";
2
+ import { ref, useId } from "vue";
3
3
 
4
4
  import useUI from "../composables/useUI.ts";
5
5
  import { getDefaults } from "../utils/ui.ts";
@@ -10,7 +10,7 @@ import UIcon from "../ui.image-icon/UIcon.vue";
10
10
  import { COMPONENT_NAME } from "./constants.ts";
11
11
  import defaultConfig from "./config.ts";
12
12
 
13
- import type { Props, IconSize, RemoveIconSize, Config } from "./types.ts";
13
+ import type { Props, Config } from "./types.ts";
14
14
 
15
15
  defineOptions({ inheritAttrs: false });
16
16
 
@@ -31,26 +31,6 @@ const focus = ref(false);
31
31
 
32
32
  const elementId = props.id || useId();
33
33
 
34
- const iconSize = computed(() => {
35
- const sizes = {
36
- sm: "xs",
37
- md: "sm",
38
- lg: "md",
39
- };
40
-
41
- return sizes[props.size] as IconSize;
42
- });
43
-
44
- const removeIconSize = computed(() => {
45
- const sizes = {
46
- sm: "2xs",
47
- md: "xs",
48
- lg: "sm",
49
- };
50
-
51
- return sizes[props.size] as RemoveIconSize;
52
- });
53
-
54
34
  function onRemove() {
55
35
  emit("remove", props.id);
56
36
  }
@@ -91,7 +71,6 @@ const {
91
71
  internal
92
72
  interactive
93
73
  color="gray"
94
- :size="iconSize"
95
74
  :name="config.defaults.fileIcon"
96
75
  v-bind="fileIconAttrs"
97
76
  @focus="onFocus"
@@ -108,7 +87,6 @@ const {
108
87
  internal
109
88
  interactive
110
89
  color="gray"
111
- :size="removeIconSize"
112
90
  :name="config.defaults.removeIcon"
113
91
  v-bind="removeIconAttrs"
114
92
  :data-test="`${dataTest}-remove-item`"