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.
- package/package.json +2 -2
- package/ui.button/configs/default.config.js +21 -21
- package/ui.button/index.vue +14 -2
- package/ui.button-link/configs/default.config.js +6 -13
- package/ui.button-link/index.vue +1 -1
- package/ui.button-toggle/index.vue +1 -1
- package/ui.container-page/configs/default.config.js +1 -1
- package/ui.dropdown-button/index.vue +6 -3
- package/ui.dropdown-item/configs/default.config.js +3 -3
- package/ui.dropdown-link/index.vue +1 -1
- package/ui.dropdown-list/configs/default.config.js +10 -10
- package/ui.dropdown-list/index.vue +1 -1
- package/ui.form-calendar/index.vue +1 -1
- package/ui.form-checkbox/configs/default.config.js +8 -12
- package/ui.form-checkbox/index.vue +5 -7
- package/ui.form-checkbox-group/configs/default.config.js +10 -1
- package/ui.form-checkbox-group/index.stories.js +21 -28
- package/ui.form-checkbox-group/index.vue +3 -3
- package/ui.form-date-picker-range/configs/default.config.js +19 -25
- package/ui.form-date-picker-range/index.vue +46 -55
- package/ui.form-input/composables/attrs.composable.js +10 -10
- package/ui.form-input/configs/default.config.js +19 -14
- package/ui.form-input/index.vue +4 -3
- package/ui.form-input-file/configs/default.config.js +9 -18
- package/ui.form-input-file/index.vue +1 -1
- package/ui.form-input-money/index.vue +1 -1
- package/ui.form-input-rating/index.vue +1 -1
- package/ui.form-input-search/index.vue +1 -1
- package/ui.form-label/configs/default.config.js +40 -48
- package/ui.form-label/index.vue +10 -2
- package/ui.form-radio/configs/default.config.js +5 -10
- package/ui.form-radio/index.vue +3 -3
- package/ui.form-radio-group/configs/default.config.js +3 -4
- package/ui.form-radio-group/index.stories.js +7 -15
- package/ui.form-radio-group/index.vue +1 -1
- package/ui.form-select/configs/default.config.js +15 -21
- package/ui.form-select/index.vue +4 -4
- package/ui.form-switch/configs/default.config.js +14 -14
- package/ui.form-switch/index.vue +1 -1
- package/ui.form-textarea/configs/default.config.js +11 -16
- package/ui.form-textarea/index.vue +1 -1
- package/ui.image-icon/configs/default.config.js +11 -11
- package/ui.text-badge/configs/default.config.js +4 -4
- package/ui.text-block/configs/default.config.js +3 -4
- package/ui.text-block/index.vue +1 -1
- package/ui.text-empty/configs/default.config.js +12 -12
- package/ui.text-empty/index.vue +16 -9
- package/ui.text-file/configs/default.config.js +13 -4
- package/ui.text-file/index.vue +12 -2
- package/ui.text-files/configs/default.config.js +3 -10
- package/ui.text-files/index.vue +1 -1
- package/ui.text-money/configs/default.config.js +7 -8
- package/ui.text-money/index.stories.js +2 -9
- package/web-types.json +40 -31
package/ui.form-radio/index.vue
CHANGED
|
@@ -91,7 +91,7 @@ const props = defineProps({
|
|
|
91
91
|
|
|
92
92
|
/**
|
|
93
93
|
* Radio size.
|
|
94
|
-
* @values
|
|
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
|
-
*
|
|
112
|
-
* @values
|
|
111
|
+
* Label placement.
|
|
112
|
+
* @values left, right
|
|
113
113
|
*/
|
|
114
114
|
labelAlign: {
|
|
115
115
|
type: String,
|
|
@@ -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
|
-
<
|
|
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
|
-
|
|
52
|
-
|
|
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>
|
|
@@ -1,20 +1,15 @@
|
|
|
1
1
|
export default /*tw*/ {
|
|
2
|
-
label: "{ULabel}
|
|
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
|
-
|
|
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: "
|
|
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-
|
|
55
|
-
md: "text-
|
|
56
|
-
lg: "text-
|
|
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-
|
|
67
|
-
{ size: "md", multiple: true, class: "text-
|
|
68
|
-
{ size: "lg", multiple: true, class: "text-
|
|
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-
|
|
97
|
-
{ size: "md", class: "text-
|
|
98
|
-
{ size: "lg", class: "text-
|
|
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-
|
|
111
|
-
md: "text-
|
|
112
|
-
lg: "text-
|
|
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
|
},
|
package/ui.form-select/index.vue
CHANGED
|
@@ -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,
|
|
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: "
|
|
591
|
+
md: "sm",
|
|
592
592
|
lg: "md",
|
|
593
593
|
};
|
|
594
594
|
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export default /*tw*/ {
|
|
2
|
-
label: "{ULabel}
|
|
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-
|
|
16
|
-
md: "w-
|
|
17
|
-
lg: "w-
|
|
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-
|
|
22
|
-
{ toggleLabel: true, size: "md", class: "w-
|
|
23
|
-
{ toggleLabel: true, size: "lg", class: "w-
|
|
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-
|
|
35
|
-
md: "size-
|
|
36
|
-
lg: "size-
|
|
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%-
|
|
41
|
-
{ checked: true, size: "md", class: "ml-[calc(100%-
|
|
42
|
-
{ checked: true, size: "lg", class: "ml-[calc(100%-1.
|
|
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: "
|
|
65
|
+
labelAlign: "right",
|
|
66
66
|
disabled: false,
|
|
67
67
|
toggleIcon: false,
|
|
68
68
|
toggleLabel: false,
|
package/ui.form-switch/index.vue
CHANGED
|
@@ -1,13 +1,12 @@
|
|
|
1
1
|
export default /*tw*/ {
|
|
2
|
-
label: "{ULabel}
|
|
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
|
-
|
|
8
|
-
|
|
9
|
-
|
|
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: "
|
|
34
|
-
{ labelAlign: "topInside", label: true, class: "pt-
|
|
35
|
-
{ labelAlign: "topInside", label: true, class: "pt-
|
|
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-
|
|
49
|
-
lg: "text-
|
|
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,
|
|
@@ -55,17 +55,17 @@ export default /*tw*/ {
|
|
|
55
55
|
icon: {
|
|
56
56
|
variants: {
|
|
57
57
|
size: {
|
|
58
|
-
"3xs": "
|
|
59
|
-
"2xs": "
|
|
60
|
-
xs: "
|
|
61
|
-
sm: "
|
|
62
|
-
md: "
|
|
63
|
-
lg: "
|
|
64
|
-
xl: "
|
|
65
|
-
"2xl": "
|
|
66
|
-
"3xl": "
|
|
67
|
-
"4xl": "
|
|
68
|
-
"5xl": "
|
|
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: "
|
|
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-
|
|
35
|
-
md: "space-x-1
|
|
36
|
-
lg: "space-x-
|
|
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
|
-
|
|
16
|
-
|
|
17
|
-
|
|
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",
|
package/ui.text-block/index.vue
CHANGED
|
@@ -1,26 +1,26 @@
|
|
|
1
1
|
export default /*tw*/ {
|
|
2
2
|
wrapper: "flex flex-col items-center justify-center size-full",
|
|
3
|
-
header:
|
|
4
|
-
|
|
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: "
|
|
12
|
-
md: "
|
|
13
|
-
lg: "
|
|
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-
|
|
22
|
-
md: "text-
|
|
23
|
-
lg: "text-
|
|
21
|
+
sm: "text-xs",
|
|
22
|
+
md: "text-sm",
|
|
23
|
+
lg: "text-base",
|
|
24
24
|
},
|
|
25
25
|
},
|
|
26
26
|
},
|
package/ui.text-empty/index.vue
CHANGED
|
@@ -16,12 +16,8 @@
|
|
|
16
16
|
|
|
17
17
|
<!-- @slot Use it to add something inside. -->
|
|
18
18
|
<slot>
|
|
19
|
-
<
|
|
20
|
-
|
|
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: "
|
|
96
|
-
md: "
|
|
97
|
-
lg: "
|
|
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:
|
|
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-
|
|
15
|
-
md: "text-
|
|
16
|
-
lg: "text-
|
|
23
|
+
sm: "text-xs",
|
|
24
|
+
md: "text-sm",
|
|
25
|
+
lg: "text-base",
|
|
17
26
|
},
|
|
18
27
|
},
|
|
19
28
|
},
|
package/ui.text-file/index.vue
CHANGED
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
internal
|
|
12
12
|
interactive
|
|
13
13
|
color="gray"
|
|
14
|
-
: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: "
|
|
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: "
|
|
6
|
+
placement: "top",
|
|
14
7
|
size: "md",
|
|
15
8
|
},
|
|
16
9
|
};
|
package/ui.text-files/index.vue
CHANGED
|
@@ -23,14 +23,13 @@ export default /*tw*/ {
|
|
|
23
23
|
sum: {
|
|
24
24
|
variants: {
|
|
25
25
|
size: {
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
"
|
|
32
|
-
"
|
|
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
|
};
|