@sb1/ffe-file-upload-react 7.0.10 → 7.1.1
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/es/FileUpload.js +10 -3
- package/lib/FileUpload.js +10 -3
- package/package.json +2 -2
- package/types/index.d.ts +1 -0
package/es/FileUpload.js
CHANGED
|
@@ -83,7 +83,8 @@ var FileUpload = /*#__PURE__*/function (_React$Component) {
|
|
|
83
83
|
infoSubText = _this$props.infoSubText,
|
|
84
84
|
uploadTitle = _this$props.uploadTitle,
|
|
85
85
|
uploadMicroText = _this$props.uploadMicroText,
|
|
86
|
-
uploadSubText = _this$props.uploadSubText
|
|
86
|
+
uploadSubText = _this$props.uploadSubText,
|
|
87
|
+
accept = _this$props.accept;
|
|
87
88
|
return /*#__PURE__*/React.createElement("div", {
|
|
88
89
|
className: "ffe-file-upload"
|
|
89
90
|
}, /*#__PURE__*/React.createElement("div", {
|
|
@@ -141,7 +142,8 @@ var FileUpload = /*#__PURE__*/function (_React$Component) {
|
|
|
141
142
|
multiple: multiple,
|
|
142
143
|
ref: this.setFileInputElement,
|
|
143
144
|
onChange: this.onFilesSelected,
|
|
144
|
-
"aria-labelledby": "".concat(id, "-label")
|
|
145
|
+
"aria-labelledby": "".concat(id, "-label"),
|
|
146
|
+
accept: accept || '*'
|
|
145
147
|
}));
|
|
146
148
|
}
|
|
147
149
|
}]);
|
|
@@ -189,6 +191,11 @@ FileUpload.propTypes = {
|
|
|
189
191
|
/** MicroText on the upload-section */
|
|
190
192
|
uploadMicroText: stringType.isRequired,
|
|
191
193
|
/** SubText on the upload-section */
|
|
192
|
-
uploadSubText: stringType.isRequired
|
|
194
|
+
uploadSubText: stringType.isRequired,
|
|
195
|
+
/** Unique file type specifier that describes a type of file that may be selected by the user, e.g. ".pdf"
|
|
196
|
+
* See MDN for documentation on
|
|
197
|
+
* [Unique file type specifiers](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input/file#unique_file_type_specifiers)
|
|
198
|
+
*/
|
|
199
|
+
accept: stringType
|
|
193
200
|
};
|
|
194
201
|
export default FileUpload;
|
package/lib/FileUpload.js
CHANGED
|
@@ -90,7 +90,8 @@ var FileUpload = /*#__PURE__*/function (_React$Component) {
|
|
|
90
90
|
infoSubText = _this$props.infoSubText,
|
|
91
91
|
uploadTitle = _this$props.uploadTitle,
|
|
92
92
|
uploadMicroText = _this$props.uploadMicroText,
|
|
93
|
-
uploadSubText = _this$props.uploadSubText
|
|
93
|
+
uploadSubText = _this$props.uploadSubText,
|
|
94
|
+
accept = _this$props.accept;
|
|
94
95
|
return /*#__PURE__*/_react.default.createElement("div", {
|
|
95
96
|
className: "ffe-file-upload"
|
|
96
97
|
}, /*#__PURE__*/_react.default.createElement("div", {
|
|
@@ -148,7 +149,8 @@ var FileUpload = /*#__PURE__*/function (_React$Component) {
|
|
|
148
149
|
multiple: multiple,
|
|
149
150
|
ref: this.setFileInputElement,
|
|
150
151
|
onChange: this.onFilesSelected,
|
|
151
|
-
"aria-labelledby": "".concat(id, "-label")
|
|
152
|
+
"aria-labelledby": "".concat(id, "-label"),
|
|
153
|
+
accept: accept || '*'
|
|
152
154
|
}));
|
|
153
155
|
}
|
|
154
156
|
}]);
|
|
@@ -196,7 +198,12 @@ FileUpload.propTypes = {
|
|
|
196
198
|
/** MicroText on the upload-section */
|
|
197
199
|
uploadMicroText: _propTypes.string.isRequired,
|
|
198
200
|
/** SubText on the upload-section */
|
|
199
|
-
uploadSubText: _propTypes.string.isRequired
|
|
201
|
+
uploadSubText: _propTypes.string.isRequired,
|
|
202
|
+
/** Unique file type specifier that describes a type of file that may be selected by the user, e.g. ".pdf"
|
|
203
|
+
* See MDN for documentation on
|
|
204
|
+
* [Unique file type specifiers](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input/file#unique_file_type_specifiers)
|
|
205
|
+
*/
|
|
206
|
+
accept: _propTypes.string
|
|
200
207
|
};
|
|
201
208
|
var _default = FileUpload;
|
|
202
209
|
exports.default = _default;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sb1/ffe-file-upload-react",
|
|
3
|
-
"version": "7.
|
|
3
|
+
"version": "7.1.1",
|
|
4
4
|
"description": "Upload file button with validation and list of uploaded files.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"ffe"
|
|
@@ -48,5 +48,5 @@
|
|
|
48
48
|
"depencencies": {
|
|
49
49
|
"prop-types": "^15.6.0"
|
|
50
50
|
},
|
|
51
|
-
"gitHead": "
|
|
51
|
+
"gitHead": "70c8e3495bbfbe9660bb25296aec52e143544080"
|
|
52
52
|
}
|