@popsure/dirty-swan 0.27.17 → 0.27.19
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/dist/index.js +5 -4
- package/dist/index.js.map +1 -1
- package/dist/lib/components/multiDropzone/index.d.ts +6 -1
- package/dist/lib/scss/public/demo.tsx +1 -1
- package/package.json +1 -1
- package/src/lib/components/multiDropzone/index.stories.mdx +17 -0
- package/src/lib/components/multiDropzone/index.tsx +12 -3
- package/src/lib/scss/public/demo.tsx +1 -1
package/dist/index.js
CHANGED
|
@@ -8554,7 +8554,7 @@ var getUploadStatus = function (progress, error) {
|
|
|
8554
8554
|
};
|
|
8555
8555
|
var index$7 = (function (_a) {
|
|
8556
8556
|
var _b;
|
|
8557
|
-
var uploadedFiles = _a.uploadedFiles, onFileSelect = _a.onFileSelect, uploading = _a.uploading, onRemoveFile = _a.onRemoveFile, _c = _a.isCondensed, isCondensed = _c === void 0 ? false : _c, _d = _a.maxFiles, maxFiles = _d === void 0 ? 0 : _d;
|
|
8557
|
+
var uploadedFiles = _a.uploadedFiles, onFileSelect = _a.onFileSelect, uploading = _a.uploading, onRemoveFile = _a.onRemoveFile, _c = _a.isCondensed, isCondensed = _c === void 0 ? false : _c, _d = _a.maxFiles, maxFiles = _d === void 0 ? 0 : _d, textOverrides = _a.textOverrides;
|
|
8558
8558
|
var _e = require$$0.useState(''), error = _e[0], setError = _e[1];
|
|
8559
8559
|
var onDrop = require$$0.useCallback(function (acceptedFiles, filesRejected) {
|
|
8560
8560
|
setError('');
|
|
@@ -8570,9 +8570,10 @@ var index$7 = (function (_a) {
|
|
|
8570
8570
|
_b)) }, getRootProps(), { children: [jsxRuntime.jsx("input", __assign({}, getInputProps()), void 0),
|
|
8571
8571
|
jsxRuntime.jsx("img", { className: isCondensed ? styles$m.img : '', src: icons.uploadIcon, alt: "purple cloud with an arrow" }, void 0),
|
|
8572
8572
|
jsxRuntime.jsx("div", __assign({ className: "p-h4 mt8 " + (isCondensed ? styles$m.textInline : '') }, { children: uploading
|
|
8573
|
-
?
|
|
8574
|
-
|
|
8575
|
-
|
|
8573
|
+
? (textOverrides === null || textOverrides === void 0 ? void 0 : textOverrides.currentlyUploadingText) ||
|
|
8574
|
+
'Please wait while uploading file...'
|
|
8575
|
+
: (textOverrides === null || textOverrides === void 0 ? void 0 : textOverrides.instructionsText) || 'Choose file or drag & drop' }), void 0),
|
|
8576
|
+
jsxRuntime.jsx("div", __assign({ className: "p-p--small tc-grey-500" }, { children: (textOverrides === null || textOverrides === void 0 ? void 0 : textOverrides.supportsText) || 'Supports JPEG, PNG, PDF' }), void 0)] }), void 0),
|
|
8576
8577
|
jsxRuntime.jsx(AnimateHeight, __assign({ duration: 300, height: error ? 'auto' : 0 }, { children: jsxRuntime.jsx("p", __assign({ className: "tc-red-500 p-p--small" }, { children: error }), void 0) }), void 0),
|
|
8577
8578
|
uploadedFiles.length > 0 && (jsxRuntime.jsx("div", __assign({ className: "w100 mt16" }, { children: uploadedFiles.map(function (file) {
|
|
8578
8579
|
var uploadStatus = getUploadStatus(file.progress, file.error);
|