@s-ui/react-molecule-photo-uploader
Advanced tools
Comparing version 1.23.0 to 1.24.0-beta.0
@@ -0,3 +1,3 @@ | ||
import _asyncToGenerator from "@babel/runtime/helpers/esm/asyncToGenerator"; | ||
import _regeneratorRuntime from "@babel/runtime/regenerator"; | ||
import _asyncToGenerator from "@babel/runtime/helpers/esm/asyncToGenerator"; | ||
import { formatToBase64 } from './photoTools'; | ||
@@ -4,0 +4,0 @@ import { DEFAULT_HAS_ERRORS_STATUS, DEFAULT_IMAGE_ROTATION_DEGREES, REJECT_FILES_REASONS } from './config'; |
import _extends from "@babel/runtime/helpers/esm/extends"; | ||
import { useState } from 'react'; | ||
import { useState, forwardRef } from 'react'; | ||
import { useDropzone } from 'react-dropzone'; | ||
@@ -7,3 +7,3 @@ import { getTarget } from '@s-ui/js/lib/react'; | ||
import PropTypes from 'prop-types'; | ||
import { useMount } from '@s-ui/react-hooks'; | ||
import { useMount, useMergeRefs } from '@s-ui/react-hooks'; | ||
import { filterValidFiles, prepareFiles, loadInitialPhotos } from './fileTools'; | ||
@@ -22,3 +22,3 @@ import DragNotification from './DragNotification'; | ||
var MoleculePhotoUploader = function MoleculePhotoUploader(_ref) { | ||
var MoleculePhotoUploader = /*#__PURE__*/forwardRef(function (_ref, forwardedRef) { | ||
var _cx; | ||
@@ -244,4 +244,6 @@ | ||
isDragAccept = _useDropzone.isDragAccept, | ||
isDragReject = _useDropzone.isDragReject; | ||
isDragReject = _useDropzone.isDragReject, | ||
dropzoneInputRef = _useDropzone.inputRef; | ||
var inputRef = useMergeRefs(dropzoneInputRef, forwardedRef); | ||
var dropzoneClassName = cx(DROPZONE_CLASS_NAME, (_cx = {}, _cx[DROPZONE_CLASS_NAME + "--disabled"] = isPhotoUploaderFully(), _cx[DROPZONE_CLASS_NAME + "--empty"] = isPhotoUploaderEmpty, _cx)); | ||
@@ -269,3 +271,5 @@ var container = getTarget(document.querySelector("." + BASE_CLASS_NAME)); | ||
}), { | ||
children: [/*#__PURE__*/_jsx("input", _extends({}, getInputProps())), isPhotoUploaderEmpty && !isDragActive && /*#__PURE__*/_jsx(InitialState, { | ||
children: [/*#__PURE__*/_jsx("input", _extends({}, getInputProps(), { | ||
ref: inputRef | ||
})), isPhotoUploaderEmpty && !isDragActive && /*#__PURE__*/_jsx(InitialState, { | ||
buttonColor: addPhotoButtonColor, | ||
@@ -326,6 +330,5 @@ buttonDesign: addPhotoButtonDesign, | ||
}); | ||
}; | ||
}); | ||
MoleculePhotoUploader.displayName = 'MoleculePhotoUploader'; | ||
export default MoleculePhotoUploader; | ||
export { ROTATION_DIRECTION as MoleculePhotoUploaderRotationDirection }; |
@@ -0,3 +1,3 @@ | ||
import _asyncToGenerator from "@babel/runtime/helpers/esm/asyncToGenerator"; | ||
import _regeneratorRuntime from "@babel/runtime/regenerator"; | ||
import _asyncToGenerator from "@babel/runtime/helpers/esm/asyncToGenerator"; | ||
import PropTypes from 'prop-types'; | ||
@@ -4,0 +4,0 @@ import cx from 'classnames'; |
{ | ||
"name": "@s-ui/react-molecule-photo-uploader", | ||
"version": "1.23.0", | ||
"version": "1.24.0-beta.0", | ||
"description": "", | ||
@@ -5,0 +5,0 @@ "main": "lib/index.js", |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
74423
1226
2