@volverjs/ui-vue 0.0.10-beta.18 → 0.0.10-beta.20
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/LICENSE +1 -1
- package/README.md +1 -1
- package/dist/components/VvInputFile/VvInputFile.es.js +23 -8
- package/dist/components/VvInputFile/VvInputFile.umd.js +1 -1
- package/dist/components/VvInputFile/VvInputFile.vue.d.ts +9 -0
- package/dist/components/VvInputFile/index.d.ts +4 -0
- package/dist/components/index.es.js +13 -7
- package/dist/components/index.umd.js +1 -1
- package/dist/icons.es.js +3 -3
- package/dist/icons.umd.js +1 -1
- package/dist/stories/InputFile/InputFile.stories.d.ts +1 -0
- package/package.json +20 -23
- package/src/assets/icons/detailed.json +1 -1
- package/src/assets/icons/normal.json +1 -1
- package/src/assets/icons/simple.json +1 -1
- package/src/components/VvInputFile/VvInputFile.vue +7 -2
- package/src/components/VvInputFile/index.ts +2 -0
- package/src/stories/InputFile/InputFile.stories.ts +8 -0
|
@@ -25,7 +25,7 @@
|
|
|
25
25
|
props,
|
|
26
26
|
)
|
|
27
27
|
|
|
28
|
-
const { modifiers, id } = toRefs(props)
|
|
28
|
+
const { modifiers, id, readonly } = toRefs(props)
|
|
29
29
|
|
|
30
30
|
const hasId = useUniqueId(id)
|
|
31
31
|
const hasHintId = computed(() => `${hasId.value}-hint`)
|
|
@@ -142,7 +142,9 @@
|
|
|
142
142
|
if (!inputEl.value) {
|
|
143
143
|
return
|
|
144
144
|
}
|
|
145
|
-
|
|
145
|
+
if (!readonly.value) {
|
|
146
|
+
inputEl.value.click()
|
|
147
|
+
}
|
|
146
148
|
}
|
|
147
149
|
|
|
148
150
|
const onClickRemoveFile = (index: number) => {
|
|
@@ -210,6 +212,7 @@
|
|
|
210
212
|
>
|
|
211
213
|
<slot name="drop-area">
|
|
212
214
|
<VvButton
|
|
215
|
+
v-if="!readonly"
|
|
213
216
|
modifiers="action"
|
|
214
217
|
aria-label="upload"
|
|
215
218
|
:label="!previewSrc ? labelButton : undefined"
|
|
@@ -234,6 +237,7 @@
|
|
|
234
237
|
<input
|
|
235
238
|
:id="hasId"
|
|
236
239
|
ref="inputEl"
|
|
240
|
+
:readonly="readonly"
|
|
237
241
|
:placeholder="placeholder"
|
|
238
242
|
:aria-describedby="hasHintLabelOrSlot ? hasHintId : undefined"
|
|
239
243
|
:aria-invalid="invalid"
|
|
@@ -271,6 +275,7 @@
|
|
|
271
275
|
{{ sizeInKiB(file.size) }} KB
|
|
272
276
|
</small>
|
|
273
277
|
<button
|
|
278
|
+
v-if="!readonly"
|
|
274
279
|
type="button"
|
|
275
280
|
class="vv-input-file__item-remove"
|
|
276
281
|
title="Remove"
|
|
@@ -6,6 +6,7 @@ import {
|
|
|
6
6
|
HintProps,
|
|
7
7
|
LabelProps,
|
|
8
8
|
LoadingProps,
|
|
9
|
+
ReadonlyProps,
|
|
9
10
|
} from '../../props'
|
|
10
11
|
|
|
11
12
|
export type VvInputFileEvents = {
|
|
@@ -19,6 +20,7 @@ export const VvInputFileProps = {
|
|
|
19
20
|
...HintProps,
|
|
20
21
|
...LabelProps,
|
|
21
22
|
...LoadingProps,
|
|
23
|
+
...ReadonlyProps,
|
|
22
24
|
name: { type: String },
|
|
23
25
|
id: { type: String },
|
|
24
26
|
modelValue: {
|