vueless 0.0.287 → 0.0.288
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 +1 -1
- 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 +8 -6
- package/ui.button-link/index.stories.js +20 -1
- package/ui.button-link/index.vue +19 -24
- 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/configs/default.config.js +1 -1
- package/ui.dropdown-button/configs/default.config.js +1 -1
- package/ui.dropdown-link/configs/default.config.js +1 -1
- 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/configs/default.config.js +1 -1
- 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 +13 -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 +1 -1
- package/ui.text-badge/configs/default.config.js +1 -1
- 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 +16 -24
|
@@ -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];
|
|
@@ -1,45 +1,7 @@
|
|
|
1
1
|
export default /*tw*/ {
|
|
2
|
-
|
|
3
|
-
base: "flex w-fit",
|
|
4
|
-
variants: {
|
|
5
|
-
round: {
|
|
6
|
-
true: "rounded-full bg-{color}-600/5",
|
|
7
|
-
},
|
|
8
|
-
},
|
|
9
|
-
compoundVariants: [
|
|
10
|
-
{ round: true, size: "4xs", class: "p-0.5" },
|
|
11
|
-
{ round: true, size: "3xs", class: "p-1" },
|
|
12
|
-
{ round: true, size: "2xs", class: "p-1" },
|
|
13
|
-
{ round: true, size: "xs", class: "p-2" },
|
|
14
|
-
{ round: true, size: "sm", class: "p-2" },
|
|
15
|
-
{ round: true, size: "md", class: "p-3" },
|
|
16
|
-
{ round: true, size: "lg", class: "p-3" },
|
|
17
|
-
{ round: true, size: "xl", class: "p-4" },
|
|
18
|
-
{ round: true, size: "2xl", class: "p-4" },
|
|
19
|
-
{ round: true, size: "3xl", class: "p-4" },
|
|
20
|
-
{ round: true, size: "4xl", class: "p-5" },
|
|
21
|
-
{ round: true, size: "5xl", class: "p-5" },
|
|
22
|
-
{ round: true, color: "white", class: "bg-white/5" },
|
|
23
|
-
{ round: true, color: "grayscale", class: "bg-gray-700/5" },
|
|
24
|
-
],
|
|
25
|
-
},
|
|
26
|
-
container: {
|
|
27
|
-
base: "fill-current outline-0",
|
|
2
|
+
icon: {
|
|
3
|
+
base: "flex w-fit fill-current outline-0",
|
|
28
4
|
variants: {
|
|
29
|
-
size: {
|
|
30
|
-
"4xs": "size-2.5",
|
|
31
|
-
"3xs": "size-3",
|
|
32
|
-
"2xs": "size-3.5",
|
|
33
|
-
xs: "size-4",
|
|
34
|
-
sm: "size-5",
|
|
35
|
-
md: "size-6",
|
|
36
|
-
lg: "size-8",
|
|
37
|
-
xl: "size-10",
|
|
38
|
-
"2xl": "size-12",
|
|
39
|
-
"3xl": "size-14",
|
|
40
|
-
"4xl": "size-16",
|
|
41
|
-
"5xl": "size-20",
|
|
42
|
-
},
|
|
43
5
|
variant: {
|
|
44
6
|
light: "text-{color}-400",
|
|
45
7
|
default: "text-{color}-600",
|
|
@@ -50,12 +12,8 @@ export default /*tw*/ {
|
|
|
50
12
|
grayscale: "text-gray-900",
|
|
51
13
|
},
|
|
52
14
|
interactive: {
|
|
53
|
-
true: "cursor-pointer
|
|
15
|
+
true: "cursor-pointer",
|
|
54
16
|
},
|
|
55
|
-
},
|
|
56
|
-
},
|
|
57
|
-
icon: {
|
|
58
|
-
variants: {
|
|
59
17
|
size: {
|
|
60
18
|
"4xs": "size-2.5",
|
|
61
19
|
"3xs": "size-3",
|
|
@@ -72,7 +30,7 @@ export default /*tw*/ {
|
|
|
72
30
|
},
|
|
73
31
|
},
|
|
74
32
|
},
|
|
75
|
-
|
|
33
|
+
defaults: {
|
|
76
34
|
name: "",
|
|
77
35
|
library: "@material-symbols",
|
|
78
36
|
weight: 500,
|
|
@@ -81,10 +39,8 @@ export default /*tw*/ {
|
|
|
81
39
|
size: "md",
|
|
82
40
|
variant: "default",
|
|
83
41
|
interactive: false,
|
|
84
|
-
round: false,
|
|
85
42
|
},
|
|
86
43
|
safelist: (colors) => [
|
|
87
|
-
{ pattern: `bg-(${colors})-600` },
|
|
88
44
|
{ pattern: `text-(${colors})-400` },
|
|
89
45
|
{ pattern: `text-(${colors})-600` },
|
|
90
46
|
{ pattern: `text-(${colors})-800` },
|
package/ui.image-icon/index.vue
CHANGED
|
@@ -1,16 +1,11 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<
|
|
2
|
+
<component
|
|
3
|
+
:is="dynamicComponent"
|
|
3
4
|
v-tooltip="tooltipConfig"
|
|
5
|
+
v-bind="iconAttrs"
|
|
4
6
|
:data-test="dataTest"
|
|
5
|
-
v-bind="wrapperAttrs"
|
|
6
|
-
@focus="onFocus"
|
|
7
|
-
@blur="onBlur"
|
|
8
7
|
@click="onClick"
|
|
9
|
-
|
|
10
|
-
<div v-bind="containerAttrs">
|
|
11
|
-
<component :is="dynamicComponent" v-bind="iconAttrs" />
|
|
12
|
-
</div>
|
|
13
|
-
</div>
|
|
8
|
+
/>
|
|
14
9
|
</template>
|
|
15
10
|
|
|
16
11
|
<script setup>
|
|
@@ -64,14 +59,6 @@ const props = defineProps({
|
|
|
64
59
|
default: getDefault(defaultConfig, UIcon).size,
|
|
65
60
|
},
|
|
66
61
|
|
|
67
|
-
/**
|
|
68
|
-
* Set round mild semi-transparent background and solid colour icon.
|
|
69
|
-
*/
|
|
70
|
-
round: {
|
|
71
|
-
type: Boolean,
|
|
72
|
-
default: getDefault(defaultConfig, UIcon).round,
|
|
73
|
-
},
|
|
74
|
-
|
|
75
62
|
/**
|
|
76
63
|
* Icon variant.
|
|
77
64
|
* @values light, default, dark
|
|
@@ -137,19 +124,9 @@ const emit = defineEmits([
|
|
|
137
124
|
* Triggers when the icon is clicked.
|
|
138
125
|
*/
|
|
139
126
|
"click",
|
|
140
|
-
|
|
141
|
-
/**
|
|
142
|
-
* Triggers when the icon is focused.
|
|
143
|
-
*/
|
|
144
|
-
"focus",
|
|
145
|
-
|
|
146
|
-
/**
|
|
147
|
-
* Triggers when the icon loses focus.
|
|
148
|
-
*/
|
|
149
|
-
"blur",
|
|
150
127
|
]);
|
|
151
128
|
|
|
152
|
-
const { config,
|
|
129
|
+
const { config, iconAttrs } = useAttrs(props);
|
|
153
130
|
|
|
154
131
|
const generatedIcons = computed(() => {
|
|
155
132
|
return (
|
|
@@ -163,11 +140,11 @@ const dynamicComponent = computed(() => {
|
|
|
163
140
|
const FILL_SUFFIX = "-fill";
|
|
164
141
|
|
|
165
142
|
const isDefaultIcon = Boolean(generatedIcons.value.find(([path]) => path.includes(props.name)));
|
|
166
|
-
const userLibrary = config.value.
|
|
143
|
+
const userLibrary = config.value.defaults.library;
|
|
167
144
|
|
|
168
145
|
const library = props.internal && isDefaultIcon ? "vueless" : userLibrary;
|
|
169
|
-
const weight = config.value.
|
|
170
|
-
const style = config.value.
|
|
146
|
+
const weight = config.value.defaults.weight;
|
|
147
|
+
const style = config.value.defaults.style;
|
|
171
148
|
const isFill = props.name.endsWith(FILL_SUFFIX);
|
|
172
149
|
const name = props.name;
|
|
173
150
|
const src = props.src;
|
|
@@ -219,19 +196,13 @@ const dynamicComponent = computed(() => {
|
|
|
219
196
|
return defineAsyncComponent(libraries[library]);
|
|
220
197
|
});
|
|
221
198
|
|
|
222
|
-
const tooltipConfig = computed(() => {
|
|
223
|
-
|
|
224
|
-
|
|
199
|
+
const tooltipConfig = computed(() => ({
|
|
200
|
+
onShow: () => !!props.tooltip,
|
|
201
|
+
...props.tooltipSettings,
|
|
202
|
+
content: props.tooltip,
|
|
203
|
+
}));
|
|
225
204
|
|
|
226
205
|
function onClick(event) {
|
|
227
206
|
emit("click", event);
|
|
228
207
|
}
|
|
229
|
-
|
|
230
|
-
function onFocus() {
|
|
231
|
-
emit("focus");
|
|
232
|
-
}
|
|
233
|
-
|
|
234
|
-
function onBlur(event) {
|
|
235
|
-
emit("blur", event);
|
|
236
|
-
}
|
|
237
208
|
</script>
|
|
@@ -10,10 +10,19 @@ export default /*tw*/ {
|
|
|
10
10
|
},
|
|
11
11
|
},
|
|
12
12
|
},
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
13
|
+
emptyIconWrapper: {
|
|
14
|
+
base: "rounded-full bg-gray-700/5",
|
|
15
|
+
variants: {
|
|
16
|
+
size: {
|
|
17
|
+
sm: "p-4",
|
|
18
|
+
md: "p-5",
|
|
19
|
+
lg: "p-6",
|
|
20
|
+
},
|
|
21
|
+
},
|
|
22
|
+
},
|
|
23
|
+
emptyIcon: "{UIcon}",
|
|
16
24
|
title: "{UHeader}",
|
|
25
|
+
footer: "mt-4 flex justify-center",
|
|
17
26
|
description: {
|
|
18
27
|
base: "text-center",
|
|
19
28
|
variants: {
|
|
@@ -24,7 +33,8 @@ export default /*tw*/ {
|
|
|
24
33
|
},
|
|
25
34
|
},
|
|
26
35
|
},
|
|
27
|
-
|
|
36
|
+
defaults: {
|
|
28
37
|
size: "md",
|
|
38
|
+
emptyIcon: "emoji_food_beverage",
|
|
29
39
|
},
|
|
30
40
|
};
|
package/ui.text-empty/index.vue
CHANGED
|
@@ -3,14 +3,15 @@
|
|
|
3
3
|
<div v-bind="headerAttrs">
|
|
4
4
|
<!-- @slot Use it to add something to the header. -->
|
|
5
5
|
<slot name="header">
|
|
6
|
-
<
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
6
|
+
<div v-bind="emptyIconWrapperAttrs">
|
|
7
|
+
<UIcon
|
|
8
|
+
internal
|
|
9
|
+
:name="config.defaults.emptyIcon"
|
|
10
|
+
color="gray"
|
|
11
|
+
:size="iconSize"
|
|
12
|
+
v-bind="emptyIconAttrs"
|
|
13
|
+
/>
|
|
14
|
+
</div>
|
|
14
15
|
</slot>
|
|
15
16
|
</div>
|
|
16
17
|
|
|
@@ -84,8 +85,16 @@ const props = defineProps({
|
|
|
84
85
|
},
|
|
85
86
|
});
|
|
86
87
|
|
|
87
|
-
const {
|
|
88
|
-
|
|
88
|
+
const {
|
|
89
|
+
config,
|
|
90
|
+
titleAttrs,
|
|
91
|
+
descriptionAttrs,
|
|
92
|
+
wrapperAttrs,
|
|
93
|
+
headerAttrs,
|
|
94
|
+
footerAttrs,
|
|
95
|
+
emptyIconWrapperAttrs,
|
|
96
|
+
emptyIconAttrs,
|
|
97
|
+
} = useAttrs(props);
|
|
89
98
|
|
|
90
99
|
const iconSize = computed(() => {
|
|
91
100
|
const sizes = {
|