vueless 0.0.101 → 0.0.102
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
CHANGED
|
@@ -45,9 +45,9 @@ export function useAttrs(props) {
|
|
|
45
45
|
classes: placeholderClasses,
|
|
46
46
|
isComponent: true,
|
|
47
47
|
});
|
|
48
|
-
const
|
|
49
|
-
const
|
|
50
|
-
const
|
|
48
|
+
const placeholderIconAttrs = getAttrs("placeholderIcon", { isComponent: true });
|
|
49
|
+
const clearIconAttrs = getAttrs("clearIcon", { isComponent: true });
|
|
50
|
+
const chooseFileIconNameAttrs = getAttrs("chooseFileIconName", { isComponent: true });
|
|
51
51
|
const inputAttrs = getAttrs("input");
|
|
52
52
|
|
|
53
53
|
return {
|
|
@@ -59,9 +59,9 @@ export function useAttrs(props) {
|
|
|
59
59
|
descriptionAttrs,
|
|
60
60
|
buttonWrapperAttrs,
|
|
61
61
|
placeholderWrapperAttrs,
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
62
|
+
placeholderIconAttrs,
|
|
63
|
+
clearIconAttrs,
|
|
64
|
+
chooseFileIconNameAttrs,
|
|
65
65
|
placeholderAttrs,
|
|
66
66
|
};
|
|
67
67
|
}
|
|
@@ -38,13 +38,13 @@ export default /*tw*/ {
|
|
|
38
38
|
},
|
|
39
39
|
},
|
|
40
40
|
},
|
|
41
|
-
iconPlaceholderName: "attach_file",
|
|
42
|
-
iconPlaceholder: "-rotate-45",
|
|
43
41
|
button: "hover:cursor-pointer",
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
42
|
+
placeholderIcon: "-rotate-45",
|
|
43
|
+
placeholderIconName: "attach_file",
|
|
44
|
+
chooseFileIcon: "",
|
|
45
|
+
chooseFileIconName: "upload_file",
|
|
46
|
+
clearIcon: "",
|
|
47
|
+
clearIconName: "close",
|
|
48
48
|
dropzoneWrapperHover: "border-gray-400 bg-gray-50",
|
|
49
49
|
dropzoneWrapperError: "hover:border-red-400 border-red-300",
|
|
50
50
|
input: "sr-only pointer-events-none size-0 opacity-0",
|
|
@@ -57,7 +57,7 @@ export default /*tw*/ {
|
|
|
57
57
|
defaultVariants: {
|
|
58
58
|
size: "md",
|
|
59
59
|
labelAlign: "topInside",
|
|
60
|
-
allowedFileTypes: [
|
|
60
|
+
allowedFileTypes: [],
|
|
61
61
|
maxFileSize: 100,
|
|
62
62
|
},
|
|
63
63
|
};
|
|
@@ -9,8 +9,8 @@
|
|
|
9
9
|
pill
|
|
10
10
|
internal
|
|
11
11
|
:size="nestedComponentSize"
|
|
12
|
-
:name="config.
|
|
13
|
-
v-bind="
|
|
12
|
+
:name="config.placeholderIconName"
|
|
13
|
+
v-bind="placeholderIconAttrs"
|
|
14
14
|
/>
|
|
15
15
|
<span v-bind="placeholderAttrs" v-text="placeholder" />
|
|
16
16
|
</div>
|
|
@@ -30,8 +30,8 @@
|
|
|
30
30
|
<UIcon
|
|
31
31
|
internal
|
|
32
32
|
:size="nestedComponentSize"
|
|
33
|
-
:name="config.
|
|
34
|
-
v-bind="
|
|
33
|
+
:name="config.chooseFileIconName"
|
|
34
|
+
v-bind="chooseFileIconAttrs"
|
|
35
35
|
/>
|
|
36
36
|
</template>
|
|
37
37
|
</UButton>
|
|
@@ -50,9 +50,9 @@
|
|
|
50
50
|
interactive
|
|
51
51
|
internal
|
|
52
52
|
:size="nestedComponentSize"
|
|
53
|
-
:name="config.
|
|
53
|
+
:name="config.clearIconName"
|
|
54
54
|
pill
|
|
55
|
-
v-bind="
|
|
55
|
+
v-bind="clearIconAttrs"
|
|
56
56
|
@click="onClickResetFiles"
|
|
57
57
|
/>
|
|
58
58
|
</div>
|
|
@@ -177,9 +177,9 @@ const {
|
|
|
177
177
|
descriptionAttrs,
|
|
178
178
|
buttonWrapperAttrs,
|
|
179
179
|
placeholderWrapperAttrs,
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
180
|
+
placeholderIconAttrs,
|
|
181
|
+
clearIconAttrs,
|
|
182
|
+
chooseFileIconAttrs,
|
|
183
183
|
placeholderAttrs,
|
|
184
184
|
inputAttrs,
|
|
185
185
|
} = useAttrs(props);
|
|
@@ -231,7 +231,10 @@ onBeforeUnmount(() => {
|
|
|
231
231
|
function validate(file) {
|
|
232
232
|
const targetFileSize = getFileMbSize(file);
|
|
233
233
|
|
|
234
|
-
const isValidType = extensionNames.value.
|
|
234
|
+
const isValidType = extensionNames.value.length
|
|
235
|
+
? extensionNames.value.some((item) => file.type.includes(item))
|
|
236
|
+
: true;
|
|
237
|
+
|
|
235
238
|
const isValidSize = targetFileSize <= props.maxFileSize;
|
|
236
239
|
|
|
237
240
|
if (!isValidSize) {
|
package/web-types.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"framework": "vue",
|
|
3
3
|
"name": "vueless",
|
|
4
|
-
"version": "0.0.
|
|
4
|
+
"version": "0.0.102",
|
|
5
5
|
"contributions": {
|
|
6
6
|
"html": {
|
|
7
7
|
"description-markup": "markdown",
|
|
@@ -3492,7 +3492,7 @@
|
|
|
3492
3492
|
"kind": "expression",
|
|
3493
3493
|
"type": "array"
|
|
3494
3494
|
},
|
|
3495
|
-
"default": "
|
|
3495
|
+
"default": ""
|
|
3496
3496
|
},
|
|
3497
3497
|
{
|
|
3498
3498
|
"name": "size",
|