vueless 0.0.217 → 0.0.219

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 (54) hide show
  1. package/package.json +2 -2
  2. package/ui.button/configs/default.config.js +21 -21
  3. package/ui.button/index.vue +14 -2
  4. package/ui.button-link/configs/default.config.js +6 -13
  5. package/ui.button-link/index.vue +1 -1
  6. package/ui.button-toggle/index.vue +1 -1
  7. package/ui.container-page/configs/default.config.js +1 -1
  8. package/ui.dropdown-button/index.vue +6 -3
  9. package/ui.dropdown-item/configs/default.config.js +3 -3
  10. package/ui.dropdown-link/index.vue +1 -1
  11. package/ui.dropdown-list/configs/default.config.js +10 -10
  12. package/ui.dropdown-list/index.vue +1 -1
  13. package/ui.form-calendar/index.vue +1 -1
  14. package/ui.form-checkbox/configs/default.config.js +8 -12
  15. package/ui.form-checkbox/index.vue +5 -7
  16. package/ui.form-checkbox-group/configs/default.config.js +10 -1
  17. package/ui.form-checkbox-group/index.stories.js +21 -28
  18. package/ui.form-checkbox-group/index.vue +3 -3
  19. package/ui.form-date-picker-range/configs/default.config.js +19 -25
  20. package/ui.form-date-picker-range/index.vue +46 -55
  21. package/ui.form-input/composables/attrs.composable.js +10 -10
  22. package/ui.form-input/configs/default.config.js +19 -14
  23. package/ui.form-input/index.vue +4 -3
  24. package/ui.form-input-file/configs/default.config.js +9 -18
  25. package/ui.form-input-file/index.vue +1 -1
  26. package/ui.form-input-money/index.vue +1 -1
  27. package/ui.form-input-rating/index.vue +1 -1
  28. package/ui.form-input-search/index.vue +1 -1
  29. package/ui.form-label/configs/default.config.js +40 -48
  30. package/ui.form-label/index.vue +10 -2
  31. package/ui.form-radio/configs/default.config.js +5 -10
  32. package/ui.form-radio/index.vue +3 -3
  33. package/ui.form-radio-group/configs/default.config.js +3 -4
  34. package/ui.form-radio-group/index.stories.js +7 -15
  35. package/ui.form-radio-group/index.vue +1 -1
  36. package/ui.form-select/configs/default.config.js +15 -21
  37. package/ui.form-select/index.vue +4 -4
  38. package/ui.form-switch/configs/default.config.js +14 -14
  39. package/ui.form-switch/index.vue +1 -1
  40. package/ui.form-textarea/configs/default.config.js +11 -16
  41. package/ui.form-textarea/index.vue +1 -1
  42. package/ui.image-icon/configs/default.config.js +11 -11
  43. package/ui.text-badge/configs/default.config.js +4 -4
  44. package/ui.text-block/configs/default.config.js +3 -4
  45. package/ui.text-block/index.vue +1 -1
  46. package/ui.text-empty/configs/default.config.js +12 -12
  47. package/ui.text-empty/index.vue +16 -9
  48. package/ui.text-file/configs/default.config.js +13 -4
  49. package/ui.text-file/index.vue +12 -2
  50. package/ui.text-files/configs/default.config.js +3 -10
  51. package/ui.text-files/index.vue +1 -1
  52. package/ui.text-money/configs/default.config.js +7 -8
  53. package/ui.text-money/index.stories.js +2 -9
  54. package/web-types.json +40 -31
@@ -91,7 +91,7 @@ const props = defineProps({
91
91
 
92
92
  /**
93
93
  * Radio size.
94
- * @values xs, sm, md, lg, xl
94
+ * @values sm, md, lg
95
95
  */
96
96
  size: {
97
97
  type: String,
@@ -108,8 +108,8 @@ const props = defineProps({
108
108
  },
109
109
 
110
110
  /**
111
- * Set label placement related from the default slot.
112
- * @values top, topInside, topWithDesc, bottom, left, right
111
+ * Label placement.
112
+ * @values left, right
113
113
  */
114
114
  labelAlign: {
115
115
  type: String,
@@ -5,10 +5,9 @@ export default /*tw*/ {
5
5
  base: "flex flex-col",
6
6
  variants: {
7
7
  size: {
8
- sm: "gap-2",
9
- md: "gap-3",
10
- lg: "gap-4",
11
- xl: "gap-5",
8
+ sm: "gap-1.5 mt-1",
9
+ md: "gap-2 mt-1.5",
10
+ lg: "gap-2.5 mt-2",
12
11
  },
13
12
  },
14
13
  },
@@ -38,21 +38,13 @@ const DefaultTemplate = (args) => ({
38
38
  };
39
39
  },
40
40
  template: `
41
- <UGroup>
41
+ <UGroup gap="2xl">
42
42
  <URadioGroup v-bind="args" v-model="value">
43
- <template v-for="(radio,index) in args.radios" :key="index">
44
- <URadio
45
- v-bind="radio"
46
- >
47
- </URadio>
48
- </template>
43
+ <URadio v-for="(radio, index) in args.radios" :key="index" v-bind="radio" />
49
44
  </URadioGroup>
50
-
51
- <URow>
52
- <UAlert color="green" size="sm">
53
- <p>Selected value: <b>{{ value }}</b></p>
54
- </UAlert>
55
- </URow>
45
+ <UAlert color="gray" size="xs">
46
+ <code>Selected value: <b>{{ value }}</b></code>
47
+ </UAlert>
56
48
  </UGroup>
57
49
  `,
58
50
  });
@@ -100,7 +92,7 @@ const ColorsTemplate = (args, { argTypes } = {}) => ({
100
92
  :label="color"
101
93
  :color="color"
102
94
  :options="args.radios"
103
- name="color"
95
+ :name="color"
104
96
  v-model="value"
105
97
  />
106
98
  </URow>
@@ -127,7 +119,7 @@ const SizesTemplate = (args, { argTypes } = {}) => ({
127
119
  :label="size"
128
120
  :size="size"
129
121
  :options="args.radios"
130
- name="size"
122
+ :name="size"
131
123
  v-model="value"
132
124
  />
133
125
  </URow>
@@ -84,7 +84,7 @@ const props = defineProps({
84
84
 
85
85
  /**
86
86
  * Radio size.
87
- * @values xs, sm, md, lg, xl
87
+ * @values sm, md, lg
88
88
  */
89
89
  size: {
90
90
  type: String,
@@ -1,20 +1,15 @@
1
1
  export default /*tw*/ {
2
- label: "{ULabel} w-full relative",
2
+ label: "{ULabel}",
3
3
  labelWrapperTop: "group/top", // applies when an open direction is top
4
4
  labelWrapperActive: "group/active",
5
5
  wrapper: {
6
6
  base: `
7
- pb-2 pt-2 flex flex-row-reverse justify-between w-full min-h-full box-border relative
7
+ py-2 flex flex-row-reverse justify-between w-full min-h-full box-border relative
8
8
  rounded-lg border border-gray-300 bg-white
9
9
  hover:border-gray-400 hover:transition hover:focus-within:border-brand-500
10
10
  focus-within:border-brand-500 focus-within:ring-4 focus-within:ring-brand-600/[.15] focus-within:outline-none
11
11
  `,
12
12
  variants: {
13
- size: {
14
- sm: "pt-2 pb-1.5",
15
- md: "pt-2.5 pb-1.5",
16
- lg: "pt-3 pb-2",
17
- },
18
13
  error: {
19
14
  true: `
20
15
  border-red-300 hover:border-red-300
@@ -36,7 +31,7 @@ export default /*tw*/ {
36
31
  },
37
32
  wrapperActive: "z-[inherit]", // applies when select active
38
33
  innerWrapper: {
39
- base: "flex px-4 min-h-full w-full overflow-hidden justify-between",
34
+ base: "px-3 flex min-h-full w-full overflow-hidden justify-between",
40
35
  variants: {
41
36
  multiple: {
42
37
  true: "grid grid-cols-1 grid-rows-[minmax(0, 1fr)_min-content]",
@@ -51,9 +46,9 @@ export default /*tw*/ {
51
46
  `,
52
47
  variants: {
53
48
  size: {
54
- sm: "text-sm min-h-4",
55
- md: "text-base min-h-5",
56
- lg: "text-lg min-h-6",
49
+ sm: "text-xs min-h-4",
50
+ md: "text-sm min-h-5",
51
+ lg: "text-base min-h-6",
57
52
  },
58
53
  disabled: {
59
54
  true: "bg-gray-100",
@@ -63,9 +58,9 @@ export default /*tw*/ {
63
58
  },
64
59
  },
65
60
  compoundVariants: [
66
- { size: "sm", multiple: true, class: "text-sm" },
67
- { size: "md", multiple: true, class: "text-base" },
68
- { size: "lg", multiple: true, class: "text-lg" },
61
+ { size: "sm", multiple: true, class: "text-xs" },
62
+ { size: "md", multiple: true, class: "text-sm" },
63
+ { size: "lg", multiple: true, class: "text-base" },
69
64
  ],
70
65
  },
71
66
  leftIcon: "pr-3 flex items-center",
@@ -90,12 +85,11 @@ export default /*tw*/ {
90
85
  clearMultipleIcon: "{UIcon}",
91
86
  clearMultipleIconName: "close_small",
92
87
  clearMultipleTextAll: {
93
- // TODO: clearMultiple is better
94
88
  base: "cursor-pointer flex items-center text-sm font-normal text-gray-400 hover:text-gray-500 transition",
95
89
  compoundVariants: [
96
- { size: "sm", class: "text-sm" },
97
- { size: "md", class: "text-base" },
98
- { size: "lg", class: "text-lg" },
90
+ { size: "sm", class: "text-xs" },
91
+ { size: "md", class: "text-sm" },
92
+ { size: "lg", class: "text-base" },
99
93
  ],
100
94
  },
101
95
  search: "flex w-fit",
@@ -107,9 +101,9 @@ export default /*tw*/ {
107
101
  `,
108
102
  variants: {
109
103
  size: {
110
- sm: "text-sm placeholder:text-sm",
111
- md: "text-base placeholder:text-base",
112
- lg: "text-lg placeholder:text-lg",
104
+ sm: "text-xs placeholder:text-xs",
105
+ md: "text-sm placeholder:text-sm",
106
+ lg: "text-base placeholder:text-base",
113
107
  },
114
108
  },
115
109
  },
@@ -85,7 +85,7 @@
85
85
  @binding {string} icon-size
86
86
  -->
87
87
  <slot name="icon-left" :icon-name="iconLeft" :icon-size="iconSize">
88
- <UIcon v-if="iconLeft" :name="iconLeft" :size="iconSize" />
88
+ <UIcon v-if="iconLeft" :name="iconLeft" :size="iconSize" internal />
89
89
  </slot>
90
90
  </span>
91
91
 
@@ -196,7 +196,7 @@
196
196
  @binding {string} icon-size
197
197
  -->
198
198
  <slot name="icon-right" :icon-name="iconRight" :icon-size="iconSize">
199
- <UIcon v-if="iconRight" :name="iconRight" :size="iconSize" />
199
+ <UIcon v-if="iconRight" :name="iconRight" :size="iconSize" internal />
200
200
  </slot>
201
201
  </span>
202
202
  </div>
@@ -303,7 +303,7 @@ const props = defineProps({
303
303
 
304
304
  /**
305
305
  * Set label placement related from the default slot.
306
- * @values top, topInside, topWithDesc, bottom, left, right
306
+ * @values top, topInside, topWithDesc, left, right
307
307
  */
308
308
  labelAlign: {
309
309
  type: String,
@@ -588,7 +588,7 @@ const currentLocale = computed(() => merge(defaultConfig.i18n, i18nGlobal, props
588
588
  const iconSize = computed(() => {
589
589
  const sizes = {
590
590
  sm: "sm",
591
- md: "md",
591
+ md: "sm",
592
592
  lg: "md",
593
593
  };
594
594
 
@@ -1,5 +1,5 @@
1
1
  export default /*tw*/ {
2
- label: "{ULabel} flex items-start",
2
+ label: "{ULabel}",
3
3
  wrapper: {
4
4
  base: `
5
5
  transition duration-300
@@ -12,15 +12,15 @@ export default /*tw*/ {
12
12
  false: "bg-gray-300 ring-gray-700 hover:bg-gray-400 active:bg-gray-500",
13
13
  },
14
14
  size: {
15
- sm: "w-8",
16
- md: "w-10",
17
- lg: "w-12",
15
+ sm: "w-6",
16
+ md: "w-8",
17
+ lg: "w-10",
18
18
  },
19
19
  },
20
20
  compoundVariants: [
21
- { toggleLabel: true, size: "sm", class: "w-12" },
22
- { toggleLabel: true, size: "md", class: "w-14" },
23
- { toggleLabel: true, size: "lg", class: "w-16" },
21
+ { toggleLabel: true, size: "sm", class: "w-10" },
22
+ { toggleLabel: true, size: "md", class: "w-12" },
23
+ { toggleLabel: true, size: "lg", class: "w-14" },
24
24
  { disabled: true, checked: true, class: "bg-opacity-50 pointer-events-none" },
25
25
  { disabled: true, checked: false, class: "bg-opacity-50 pointer-events-none" },
26
26
  { color: "grayscale", checked: true, class: "bg-gray-800 ring-gray-800" },
@@ -31,15 +31,15 @@ export default /*tw*/ {
31
31
  base: "transition duration-300 rounded-full bg-white flex items-center justify-center",
32
32
  variants: {
33
33
  size: {
34
- sm: "size-4",
35
- md: "size-5",
36
- lg: "size-6",
34
+ sm: "size-3",
35
+ md: "size-4",
36
+ lg: "size-5",
37
37
  },
38
38
  },
39
39
  compoundVariants: [
40
- { checked: true, size: "sm", class: "ml-[calc(100%-1rem)]" },
41
- { checked: true, size: "md", class: "ml-[calc(100%-1.25rem)]" },
42
- { checked: true, size: "lg", class: "ml-[calc(100%-1.5rem)]" },
40
+ { checked: true, size: "sm", class: "ml-[calc(100%-0.75rem)]" },
41
+ { checked: true, size: "md", class: "ml-[calc(100%-1rem)]" },
42
+ { checked: true, size: "lg", class: "ml-[calc(100%-1.25rem)]" },
43
43
  ],
44
44
  },
45
45
  icon: "{UIcon}",
@@ -62,7 +62,7 @@ export default /*tw*/ {
62
62
  defaultVariants: {
63
63
  color: "brand",
64
64
  size: "md",
65
- labelAlign: "left",
65
+ labelAlign: "right",
66
66
  disabled: false,
67
67
  toggleIcon: false,
68
68
  toggleLabel: false,
@@ -64,7 +64,7 @@ const props = defineProps({
64
64
 
65
65
  /**
66
66
  * Label alignment.
67
- * @values top, topInside, topWithDesc, bottom, left, right
67
+ * @values top, left, right
68
68
  */
69
69
  labelAlign: {
70
70
  type: String,
@@ -1,13 +1,12 @@
1
1
  export default /*tw*/ {
2
- label: "{ULabel} relative w-full",
2
+ label: "{ULabel}",
3
3
  leftSlot: "flex items-center justify-center h-full w-11 absolute left-0",
4
4
  rightSlot: "flex items-center justify-center h-full w-11 absolute right-0",
5
5
  textareaWrapper: {
6
6
  base: `
7
- transition focus-within:outline-none
8
- rounded-lg border border-solid border-gray-300 ring-0 cursor-text bg-white pr-4
9
- hover:border-gray-400 pl-4 hover:focus-within:border-gray-500
10
- focus-within:border-gray-500 focus-within:ring-4 focus-within:ring-gray-600/[.15]
7
+ px-3 py-2 rounded-md border border-gray-300 cursor-text bg-white transition
8
+ hover:border-gray-400 hover:focus-within:border-gray-500
9
+ focus-within:outline-none focus-within:border-gray-500 focus-within:ring-4 focus-within:ring-gray-600/[.15]
11
10
  `,
12
11
  variants: {
13
12
  error: {
@@ -23,16 +22,12 @@ export default /*tw*/ {
23
22
  readonly: {
24
23
  true: "ring-0 border-gray-300 focus-within:ring-0 focus-within:border-brand-300",
25
24
  },
26
- size: {
27
- sm: "pt-2 pb-2",
28
- md: "pt-2.5 pb-2.5",
29
- lg: "pt-3 pb-3",
30
- },
31
25
  },
32
26
  compoundVariants: [
33
- { labelAlign: "topInside", label: true, class: "pt-5 pb-1.5" },
34
- { labelAlign: "topInside", label: true, class: "pt-6 pb-1.5" },
35
- { labelAlign: "topInside", label: true, class: "pt-7 pb-2" },
27
+ { labelAlign: "topInside", label: true, class: "rounded-lg" },
28
+ { labelAlign: "topInside", label: true, size: "sm", class: "pt-5" },
29
+ { labelAlign: "topInside", label: true, size: "md", class: "pt-6" },
30
+ { labelAlign: "topInside", label: true, size: "lg", class: "pt-7" },
36
31
  ],
37
32
  },
38
33
  textarea: {
@@ -45,16 +40,16 @@ export default /*tw*/ {
45
40
  variants: {
46
41
  size: {
47
42
  sm: "text-xs placeholder:text-xs",
48
- md: "text-base placeholder:text-base",
49
- lg: "text-lg placeholder:text-lg",
43
+ md: "text-sm placeholder:text-sm",
44
+ lg: "text-base placeholder:text-base",
50
45
  },
51
46
  },
52
47
  },
53
48
  defaultVariants: {
49
+ rows: "2",
54
50
  size: "md",
55
51
  type: "text",
56
52
  inputmode: "text",
57
- rows: "2",
58
53
  labelAlign: "topInside",
59
54
  error: false,
60
55
  disabled: false,
@@ -97,7 +97,7 @@ const props = defineProps({
97
97
 
98
98
  /**
99
99
  * Set label placement related from the default slot.
100
- * @values top, topInside, topWithDesc, bottom, left, right
100
+ * @values top, topInside, topWithDesc, left, right
101
101
  */
102
102
  labelAlign: {
103
103
  type: String,
@@ -55,17 +55,17 @@ export default /*tw*/ {
55
55
  icon: {
56
56
  variants: {
57
57
  size: {
58
- "3xs": "h-3 w-3",
59
- "2xs": "h-3.5 w-3.5",
60
- xs: " h-4 w-4",
61
- sm: "h-5 w-5",
62
- md: "h-6 w-6",
63
- lg: "h-8 w-8",
64
- xl: "h-10 w-10",
65
- "2xl": "h-12 w-12",
66
- "3xl": "h-14 w-14",
67
- "4xl": "h-16 w-16",
68
- "5xl": "h-20 w-20",
58
+ "3xs": "size-3",
59
+ "2xs": "size-3.5",
60
+ xs: "size-4",
61
+ sm: "size-5",
62
+ md: "size-6",
63
+ lg: "size-8",
64
+ xl: "size-10",
65
+ "2xl": "size-12",
66
+ "3xl": "size-14",
67
+ "4xl": "size-16",
68
+ "5xl": "size-20",
69
69
  },
70
70
  },
71
71
  },
@@ -8,7 +8,7 @@ export default /*tw*/ {
8
8
  thirdary: "text-{color}-500 border-transparent",
9
9
  },
10
10
  size: {
11
- sm: "p-0.5 px-2 text-2xs",
11
+ sm: "px-2 py-1 text-2xs",
12
12
  md: "px-2 py-1 text-xs",
13
13
  lg: "px-3 py-1.5 text-sm",
14
14
  },
@@ -31,9 +31,9 @@ export default /*tw*/ {
31
31
  base: "flex items-center",
32
32
  variants: {
33
33
  size: {
34
- sm: "space-x-1",
35
- md: "space-x-1.5",
36
- lg: "space-x-2",
34
+ sm: "space-x-0.5",
35
+ md: "space-x-1",
36
+ lg: "space-x-1.5",
37
37
  },
38
38
  },
39
39
  },
@@ -12,10 +12,9 @@ export default /*tw*/ {
12
12
  `,
13
13
  variants: {
14
14
  size: {
15
- xs: "text-xs space-y-2",
16
- sm: "text-sm space-y-3",
17
- md: "text-base space-y-4",
18
- lg: "text-lg space-y-5",
15
+ sm: "text-xs space-y-2",
16
+ md: "text-sm space-y-3",
17
+ lg: "text-base space-y-4",
19
18
  },
20
19
  align: {
21
20
  left: "text-left",
@@ -27,7 +27,7 @@ const props = defineProps({
27
27
 
28
28
  /**
29
29
  * Text size.
30
- * @values xs, sm, md, lg
30
+ * @values sm, md, lg
31
31
  */
32
32
  size: {
33
33
  type: String,
@@ -1,26 +1,26 @@
1
1
  export default /*tw*/ {
2
2
  wrapper: "flex flex-col items-center justify-center size-full",
3
- header: "mb-4 flex justify-center",
4
- icon: "{UIcon}",
5
- iconName: "emoji_food_beverage",
6
- footer: "mt-4 flex justify-center",
7
- title: {
8
- base: "mb-2 font-medium text-center",
3
+ header: {
4
+ base: "flex justify-center",
9
5
  variants: {
10
6
  size: {
11
- sm: "text-base",
12
- md: "text-lg",
13
- lg: "text-xl",
7
+ sm: "mb-4",
8
+ md: "mb-5",
9
+ lg: "mb-6",
14
10
  },
15
11
  },
16
12
  },
13
+ icon: "{UIcon}",
14
+ iconName: "emoji_food_beverage",
15
+ footer: "mt-4 flex justify-center",
16
+ title: "{UHeader}",
17
17
  description: {
18
18
  base: "text-center",
19
19
  variants: {
20
20
  size: {
21
- sm: "text-sm",
22
- md: "text-base",
23
- lg: "text-lg",
21
+ sm: "text-xs",
22
+ md: "text-sm",
23
+ lg: "text-base",
24
24
  },
25
25
  },
26
26
  },
@@ -16,12 +16,8 @@
16
16
 
17
17
  <!-- @slot Use it to add something inside. -->
18
18
  <slot>
19
- <div v-if="title" v-bind="titleAttrs">
20
- {{ title }}
21
- </div>
22
- <div v-if="description" v-bind="descriptionAttrs">
23
- {{ description }}
24
- </div>
19
+ <UHeader v-if="title" :label="title" :size="titleSize" v-bind="titleAttrs" />
20
+ <div v-if="description" v-bind="descriptionAttrs" v-text="description" />
25
21
  </slot>
26
22
 
27
23
  <div v-bind="footerAttrs">
@@ -35,6 +31,7 @@
35
31
  import { computed } from "vue";
36
32
 
37
33
  import UIcon from "../ui.image-icon";
34
+ import UHeader from "../ui.text-header";
38
35
  import UIService from "../service.ui";
39
36
 
40
37
  import { UEmpty } from "./constants";
@@ -92,9 +89,19 @@ const { config, titleAttrs, descriptionAttrs, wrapperAttrs, headerAttrs, footerA
92
89
 
93
90
  const iconSize = computed(() => {
94
91
  const sizes = {
95
- sm: "xl",
96
- md: "2xl",
97
- lg: "3xl",
92
+ sm: "2xl",
93
+ md: "3xl",
94
+ lg: "4xl",
95
+ };
96
+
97
+ return sizes[props.size];
98
+ });
99
+
100
+ const titleSize = computed(() => {
101
+ const sizes = {
102
+ sm: "xs",
103
+ md: "sm",
104
+ lg: "md",
98
105
  };
99
106
 
100
107
  return sizes[props.size];
@@ -1,6 +1,15 @@
1
1
  export default /*tw*/ {
2
2
  file: "{UFile}",
3
- info: "flex items-center gap-2 ",
3
+ info: {
4
+ base: "flex items-center",
5
+ variants: {
6
+ size: {
7
+ sm: "gap-1",
8
+ md: "gap-1.5",
9
+ lg: "gap-2",
10
+ },
11
+ },
12
+ },
4
13
  icon: "{UIcon}",
5
14
  iconName: "description",
6
15
  image: "rounded-sm max-w-7",
@@ -11,9 +20,9 @@ export default /*tw*/ {
11
20
  true: "underline decoration-dashed underline-offset-4",
12
21
  },
13
22
  size: {
14
- sm: "text-sm",
15
- md: "text-base",
16
- lg: "text-lg",
23
+ sm: "text-xs",
24
+ md: "text-sm",
25
+ lg: "text-base",
17
26
  },
18
27
  },
19
28
  },
@@ -11,7 +11,7 @@
11
11
  internal
12
12
  interactive
13
13
  color="gray"
14
- :size="size"
14
+ :size="iconSize"
15
15
  :name="config.iconName"
16
16
  v-bind="iconAttrs"
17
17
  @focus="onFocus"
@@ -27,7 +27,7 @@
27
27
  </template>
28
28
 
29
29
  <script setup>
30
- import { ref } from "vue";
30
+ import { computed, ref } from "vue";
31
31
 
32
32
  import ULink from "../ui.button-link";
33
33
  import UIcon from "../ui.image-icon";
@@ -107,6 +107,16 @@ const { config, fileAttrs, infoAttrs, iconAttrs, labelAttrs, imageAttrs } = useA
107
107
  focus,
108
108
  });
109
109
 
110
+ const iconSize = computed(() => {
111
+ const sizes = {
112
+ sm: "2xs",
113
+ md: "xs",
114
+ lg: "sm",
115
+ };
116
+
117
+ return sizes[props.size];
118
+ });
119
+
110
120
  function onFocus() {
111
121
  focus.value = true;
112
122
  }
@@ -1,16 +1,9 @@
1
1
  export default /*tw*/ {
2
- label: "block text-sm font-normal text-gray-500",
3
- body: {
4
- base: "flex gap-4 flex-col",
5
- variants: {
6
- label: {
7
- true: "mt-4",
8
- },
9
- },
10
- },
2
+ label: "{ULabel}",
3
+ body: "flex flex-col gap-1",
11
4
  file: "{UFile} block",
12
5
  defaultVariants: {
13
- placement: "topInside",
6
+ placement: "top",
14
7
  size: "md",
15
8
  },
16
9
  };
@@ -1,5 +1,5 @@
1
1
  <template>
2
- <ULabel :label="label" :description="description" v-bind="labelAttrs">
2
+ <ULabel :label="label" :description="description" :size="size" v-bind="labelAttrs">
3
3
  <div v-bind="bodyAttrs">
4
4
  <slot>
5
5
  <UFile
@@ -23,14 +23,13 @@ export default /*tw*/ {
23
23
  sum: {
24
24
  variants: {
25
25
  size: {
26
- xs: "text-xs",
27
- sm: "text-sm",
28
- md: "text-base",
29
- lg: "text-lg",
30
- xl: "text-xl",
31
- "2xl": "text-2xl",
32
- "3xl": "text-3xl",
33
- "4xl": "text-4xl",
26
+ sm: "text-xs",
27
+ md: "text-sm",
28
+ lg: "text-base",
29
+ xl: "text-lg",
30
+ "2xl": "text-xl",
31
+ "3xl": "text-2xl",
32
+ "4xl": "text-3xl",
34
33
  },
35
34
  planned: {
36
35
  true: "opacity-75 before:content-['('] after:content-[')']",
@@ -243,10 +243,7 @@ export const slotLeft = SlotTemplate.bind({});
243
243
  slotLeft.args = {
244
244
  slotTemplate: `
245
245
  <template #left>
246
- <UIcon
247
- :src="icons.Debit"
248
- size="xs"
249
- />
246
+ <UIcon :src="icons.Debit" size="3xs" />
250
247
  </template>
251
248
  `,
252
249
  };
@@ -255,11 +252,7 @@ export const slotRight = SlotTemplate.bind({});
255
252
  slotRight.args = {
256
253
  slotTemplate: `
257
254
  <template #right>
258
- <UIcon
259
- :src="icons.Credit"
260
- size="xs"
261
- color="gray"
262
- />
255
+ <UIcon :src="icons.Credit" size="3xs" />
263
256
  </template>
264
257
  `,
265
258
  };