vueless 0.0.171 → 0.0.172
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
|
@@ -35,7 +35,7 @@ export default /*tw*/ {
|
|
|
35
35
|
},
|
|
36
36
|
},
|
|
37
37
|
placeholder: {
|
|
38
|
-
base: "pr-4 text-gray-700 flex-grow",
|
|
38
|
+
base: "pr-4 text-gray-700 flex-grow w-full",
|
|
39
39
|
variants: {
|
|
40
40
|
size: {
|
|
41
41
|
sm: "text-sm",
|
|
@@ -49,12 +49,13 @@ export default /*tw*/ {
|
|
|
49
49
|
chooseFileIconName: "attach_file",
|
|
50
50
|
clearIcon: "",
|
|
51
51
|
clearIconName: "close",
|
|
52
|
-
removeItemIcon: "",
|
|
52
|
+
removeItemIcon: "ml-2",
|
|
53
53
|
removeItemIconName: "close",
|
|
54
54
|
dropzoneWrapperHover: "border-gray-400 border-dashed",
|
|
55
55
|
dropzoneWrapperError: "hover:border-red-400 border-dashed border-red-300",
|
|
56
56
|
input: "sr-only pointer-events-none size-0 opacity-0",
|
|
57
57
|
buttonWrapper: "flex gap-4 items-center",
|
|
58
|
+
fileList: "w-full",
|
|
58
59
|
i18n: {
|
|
59
60
|
sizeError: "File size is too big.",
|
|
60
61
|
formatError: "Format is not supported.",
|
|
@@ -40,6 +40,28 @@ const DefaultTemplate = (args) => ({
|
|
|
40
40
|
`,
|
|
41
41
|
});
|
|
42
42
|
|
|
43
|
+
const SlotTemplate = (args) => ({
|
|
44
|
+
components: { UInputFile },
|
|
45
|
+
setup() {
|
|
46
|
+
return { args };
|
|
47
|
+
},
|
|
48
|
+
data() {
|
|
49
|
+
return {
|
|
50
|
+
files: [],
|
|
51
|
+
error: args.error || "",
|
|
52
|
+
};
|
|
53
|
+
},
|
|
54
|
+
template: `
|
|
55
|
+
<UInputFile
|
|
56
|
+
v-bind="args"
|
|
57
|
+
v-model="files"
|
|
58
|
+
v-model:error="error"
|
|
59
|
+
>
|
|
60
|
+
${args.slotTemplate}
|
|
61
|
+
</UInputFile>
|
|
62
|
+
`,
|
|
63
|
+
});
|
|
64
|
+
|
|
43
65
|
const LabelAlignTemplate = (args, { argTypes } = {}) => ({
|
|
44
66
|
components: { UInputFile, URow },
|
|
45
67
|
setup() {
|
|
@@ -98,3 +120,12 @@ sizes.args = {};
|
|
|
98
120
|
|
|
99
121
|
export const labelAlign = LabelAlignTemplate.bind({});
|
|
100
122
|
labelAlign.args = {};
|
|
123
|
+
|
|
124
|
+
export const slotLeft = SlotTemplate.bind({});
|
|
125
|
+
slotLeft.args = {
|
|
126
|
+
slotTemplate: `
|
|
127
|
+
<template #left>
|
|
128
|
+
🥸
|
|
129
|
+
</template>
|
|
130
|
+
`,
|
|
131
|
+
};
|