@jobber/components 4.70.1 → 4.71.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.
@@ -6,7 +6,7 @@ var tslib_es6 = require('../tslib.es6-5b8768b7.js');
6
6
  var React = require('react');
7
7
  var styleInject_es = require('../style-inject.es-9d2f5f4e.js');
8
8
  var Avatar = require('../Avatar-76a799fa.js');
9
- var InputFile = require('../InputFile-f6b4b2c8.js');
9
+ var InputFile = require('../InputFile-271f6d31.js');
10
10
  var ProgressBar = require('../ProgressBar-b68edc8f.js');
11
11
  var Button = require('../Button-b73a5e01.js');
12
12
  require('classnames');
@@ -82,10 +82,11 @@ interface InputFileProps {
82
82
  *
83
83
  * @param "images" - only accepts all types of image
84
84
  * @param "basicImages" - only accepts png, jpg and jpeg
85
+ * @param "string[]" - accept a specific list of MIME types
85
86
  *
86
87
  * @default "all"
87
88
  */
88
- readonly allowedTypes?: "all" | "images" | "basicImages";
89
+ readonly allowedTypes?: "all" | "images" | "basicImages" | string[];
89
90
  /**
90
91
  * Allow for multiple files to be selected for upload.
91
92
  *
@@ -2,7 +2,7 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- var InputFile = require('../InputFile-f6b4b2c8.js');
5
+ var InputFile = require('../InputFile-271f6d31.js');
6
6
  require('../tslib.es6-5b8768b7.js');
7
7
  require('react');
8
8
  require('classnames');
@@ -32,6 +32,9 @@ function InputFile({ variation = "dropzone", size = "base", buttonLabel: provide
32
32
  else if (allowedTypes === "basicImages") {
33
33
  options.accept = "image/png, image/jpg, image/jpeg";
34
34
  }
35
+ else if (Array.isArray(allowedTypes)) {
36
+ options.accept = allowedTypes.join(",");
37
+ }
35
38
  const { getRootProps, getInputProps, isDragActive } = reactDropzone.useDropzone(options);
36
39
  const { buttonLabel, hintText } = getLabels(providedButtonLabel, allowMultiple, allowedTypes);
37
40
  const dropZone = classnames__default["default"](styles.dropZoneBase, {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@jobber/components",
3
- "version": "4.70.1",
3
+ "version": "4.71.1",
4
4
  "license": "MIT",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -83,5 +83,5 @@
83
83
  "> 1%",
84
84
  "IE 10"
85
85
  ],
86
- "gitHead": "1dddad626dc40cc5c9e8140b336604cec915c510"
86
+ "gitHead": "6610893f9faf0d26e44ae0c98ae13489d42e6427"
87
87
  }