@opentinyvue/vue-file-upload 3.27.0 → 3.29.0

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.
@@ -201,6 +201,9 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
201
201
  }, [t2("ui.fileUpload.uploadFile")])])];
202
202
  }
203
203
  }), createVNode(resolveComponent("icon-plus-circle"), {
204
+ "role": "button",
205
+ "tabindex": "0",
206
+ "aria-label": t2("ui.fileUpload.uploadFile"),
204
207
  "custom-class": "sm:hidden w-5 h-5 absolute top-0.5 right-5"
205
208
  }, null)]);
206
209
  } else if (listType2 === "drag-single") {
@@ -209,7 +212,13 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
209
212
  var defaultClass = "relative h-full border border-dashed border-color-border rounded bg-color-bg-2 align-top hover:cursor-pointer";
210
213
  listType2 === "picture-single" && uploadFiles.length && (defaultClass += " hidden");
211
214
  defaultContent = createVNode("div", {
212
- "class": defaultClass
215
+ "class": defaultClass,
216
+ "role": "button",
217
+ "tabindex": "0",
218
+ "aria-label": t2("ui.fileUpload.uploadFile"),
219
+ "onKeydown": function onKeydown(event) {
220
+ return event.key === "Enter" && handleTriggerClick();
221
+ }
213
222
  }, [createVNode("div", {
214
223
  "class": "absolute w-full top-1/2 left-0 -translate-y-1/2 z-[1] text-center"
215
224
  }, [defaultList[type2 || "picture"]])]);
@@ -521,6 +530,8 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
521
530
  var attrs = a($attrs, ["^on[A-Z]"]);
522
531
  return createVNode("div", mergeProps(attrs, {
523
532
  "data-tag": "tiny-file-upload",
533
+ "role": "group",
534
+ "aria-label": title,
524
535
  "class": isDragSingle ? "relative inline-block" : ""
525
536
  }), [getDefaultTitle({
526
537
  listType,
package/lib/pc.js CHANGED
@@ -92,6 +92,7 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
92
92
  "class": "trigger-btn"
93
93
  }, [createVNode(resolveComponent("tiny-button"), {
94
94
  "disabled": disabled,
95
+ "aria-label": t2("ui.fileUpload.uploadFile"),
95
96
  "onClick": handleTriggerClick
96
97
  }, {
97
98
  default: function _default() {
@@ -140,6 +141,9 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
140
141
  var getThumIcon = function getThumIcon2(file) {
141
142
  return [showDownload && createVNode("span", {
142
143
  "class": "thumb-icon",
144
+ "role": "button",
145
+ "tabindex": "0",
146
+ "aria-label": t("ui.fileUpload.downloadFile"),
143
147
  "title": t("ui.fileUpload.downloadFile"),
144
148
  "onClick": function onClick() {
145
149
  return execDownload(file);
@@ -148,6 +152,9 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
148
152
  "class": "download-icon"
149
153
  }, null)]), isEdm && !isFolder && showUpdate && createVNode("span", {
150
154
  "class": "thumb-icon",
155
+ "role": "button",
156
+ "tabindex": "0",
157
+ "aria-label": t("ui.fileUpload.updateFile"),
151
158
  "title": t("ui.fileUpload.updateFile"),
152
159
  "onClick": function onClick() {
153
160
  return updateFile(file);
@@ -156,9 +163,17 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
156
163
  "class": "refres-icon"
157
164
  }, null)]), showDel && createVNode("span", {
158
165
  "class": "thumb-icon",
166
+ "role": "button",
167
+ "tabindex": "0",
168
+ "aria-label": t("ui.fileUpload.deleteFile"),
159
169
  "title": t("ui.fileUpload.deleteFile"),
160
170
  "onClick": function onClick() {
161
171
  return handleRemove(file);
172
+ },
173
+ "onKeydown": function onKeydown(event) {
174
+ return handleEnter(event, function() {
175
+ return handleRemove(file);
176
+ });
162
177
  }
163
178
  }, [createVNode(TinyIconClose, {
164
179
  "class": "close-icon"
@@ -442,7 +457,9 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
442
457
  }
443
458
  var attrs = a($attrs, ["^on[A-Z]"]);
444
459
  return createVNode("div", mergeProps({
445
- "class": "tiny-file-upload"
460
+ "class": "tiny-file-upload",
461
+ "role": "group",
462
+ "aria-label": title
446
463
  }, attrs), [isSaasType ? getDefaultTitle(title, this.showTitle) : "", notice, isPictureCard ? uploadList : "", slots.trigger ? [uploadComponent, defaultSlot] : uploadComponent, !isSaasType && slots.tip && slots.tip(), isPictureCard ? "" : uploadList, previewComponent, encryptDialogComponent]);
447
464
  }
448
465
  });
package/package.json CHANGED
@@ -1,26 +1,26 @@
1
1
  {
2
2
  "name": "@opentinyvue/vue-file-upload",
3
- "version": "3.27.0",
3
+ "version": "3.29.0",
4
4
  "description": "",
5
5
  "license": "MIT",
6
6
  "sideEffects": false,
7
7
  "main": "./lib/index.js",
8
8
  "module": "./lib/index.js",
9
9
  "dependencies": {
10
- "@opentinyvue/vue-button": "~3.27.0",
11
- "@opentinyvue/vue-common": "~3.27.0",
12
- "@opentinyvue/vue-dialog-box": "~3.27.0",
13
- "@opentinyvue/vue-icon": "~3.27.0",
14
- "@opentinyvue/vue-input": "~3.27.0",
15
- "@opentinyvue/vue-modal": "~3.27.0",
16
- "@opentinyvue/vue-popover": "~3.27.0",
17
- "@opentinyvue/vue-progress": "~3.27.0",
18
- "@opentinyvue/vue-renderless": "~3.27.0",
19
- "@opentinyvue/vue-tooltip": "~3.27.0",
20
- "@opentinyvue/vue-upload": "~3.27.0",
21
- "@opentinyvue/vue-upload-list": "~3.27.0",
22
- "@opentinyvue/vue-switch": "~3.27.0",
23
- "@opentinyvue/vue-theme": "~3.27.0",
10
+ "@opentinyvue/vue-button": "~3.29.0",
11
+ "@opentinyvue/vue-common": "~3.29.0",
12
+ "@opentinyvue/vue-dialog-box": "~3.29.0",
13
+ "@opentinyvue/vue-icon": "~3.29.0",
14
+ "@opentinyvue/vue-input": "~3.29.0",
15
+ "@opentinyvue/vue-modal": "~3.29.0",
16
+ "@opentinyvue/vue-popover": "~3.29.0",
17
+ "@opentinyvue/vue-progress": "~3.29.0",
18
+ "@opentinyvue/vue-renderless": "~3.29.0",
19
+ "@opentinyvue/vue-tooltip": "~3.29.0",
20
+ "@opentinyvue/vue-upload": "~3.29.0",
21
+ "@opentinyvue/vue-upload-list": "~3.29.0",
22
+ "@opentinyvue/vue-switch": "~3.29.0",
23
+ "@opentinyvue/vue-theme": "~3.29.0",
24
24
  "streamsaver": "2.0.6"
25
25
  },
26
26
  "types": "index.d.ts",
package/src/index.d.ts CHANGED
@@ -977,12 +977,12 @@ declare const _default: import("@vue/runtime-core").DefineComponent<{
977
977
  mode: string;
978
978
  tiny_mode_root: boolean;
979
979
  _constants: Record<string, any>;
980
+ scale: string | number;
980
981
  lockScroll: boolean;
981
982
  showTitle: boolean;
982
983
  displayOnly: boolean;
983
984
  multiple: boolean;
984
985
  isHidden: boolean;
985
- scale: string | number;
986
986
  listType: string;
987
987
  sourceType: string;
988
988
  openDownloadFile: boolean;
@@ -18,12 +18,12 @@ declare const _default: import("@vue/runtime-core").DefineComponent<Readonly<{
18
18
  tiny_theme?: any;
19
19
  tiny_chart_theme?: any;
20
20
  tiny_mcp_config?: any;
21
+ scale?: any;
21
22
  lockScroll?: any;
22
23
  action?: any;
23
24
  showTitle?: any;
24
25
  displayOnly?: any;
25
26
  multiple?: any;
26
- scale?: any;
27
27
  listType?: any;
28
28
  httpRequest?: any;
29
29
  accept?: any;
@@ -69,12 +69,12 @@ declare const _default: import("@vue/runtime-core").DefineComponent<Readonly<{
69
69
  tiny_theme?: any;
70
70
  tiny_chart_theme?: any;
71
71
  tiny_mcp_config?: any;
72
+ scale?: any;
72
73
  lockScroll?: any;
73
74
  action?: any;
74
75
  showTitle?: any;
75
76
  displayOnly?: any;
76
77
  multiple?: any;
77
- scale?: any;
78
78
  listType?: any;
79
79
  httpRequest?: any;
80
80
  accept?: any;
@@ -130,12 +130,12 @@ declare const _default: import("@vue/runtime-core").DefineComponent<Readonly<{
130
130
  readonly tiny_theme?: any;
131
131
  readonly tiny_chart_theme?: any;
132
132
  readonly tiny_mcp_config?: any;
133
+ readonly scale?: any;
133
134
  readonly lockScroll?: any;
134
135
  readonly action?: any;
135
136
  readonly showTitle?: any;
136
137
  readonly displayOnly?: any;
137
138
  readonly multiple?: any;
138
- readonly scale?: any;
139
139
  readonly listType?: any;
140
140
  readonly httpRequest?: any;
141
141
  readonly accept?: any;