@popsure/dirty-swan 0.38.4 → 0.38.5

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/cjs/index.js CHANGED
@@ -6596,7 +6596,7 @@ var icons = {
6596
6596
  uploadSmallIcon: uploadSmallSvg,
6597
6597
  };
6598
6598
 
6599
- var css_248z$s = ".style-module_upload-file-cell__3nv5i {\n display: flex;\n align-items: center;\n justify-content: space-between;\n height: 64px;\n padding: 8px 16px;\n border: 1px solid #d2d2d8;\n border-radius: 8px;\n background-color: white;\n animation: style-module_appear-down__14rCV 0.6s;\n animation-fill-mode: both;\n animation-delay: 0s;\n}\n\n.style-module_upload-file-cell-error__3KcSe {\n border-color: #e55454;\n background-color: rgba(229, 84, 84, 0.2);\n}\n\n.style-module_cell-left-section__3Iv8c {\n display: flex;\n align-items: center;\n}\n\n.style-module_main-icon__335_Y {\n width: 16px;\n height: 20px;\n margin-right: 16px;\n}\n\n.style-module_upload-display-text__3Rd68 {\n overflow-wrap: anywhere;\n}\n\n.style-module_progress-bar-container__2JCBO {\n position: relative;\n}\n\n.style-module_progress-bar__1Rosf {\n background-color: #f5f6fb;\n border-radius: 10px;\n height: 4px;\n}\n\n.style-module_progress-bar-filler__131fA {\n background-color: #8e8cee;\n border-radius: 10px;\n height: 4px;\n position: absolute;\n bottom: 0;\n transition: 1s ease;\n}\n\n.style-module_cell-right-section__dVWqJ {\n display: flex;\n justify-content: flex-end;\n min-width: 32px;\n margin-left: 16px;\n}\n\n.style-module_cell-right-section-complete__c0rHc {\n min-width: 64px;\n}\n\n.style-module_view-icon__3UenG,\n.style-module_remove-icon__2FWBQ {\n cursor: pointer;\n}\n\n.style-module_remove-icon__2FWBQ {\n margin-left: 16px;\n}\n\n.style-module_disabled__s-DR1 {\n pointer-events: none;\n cursor: default;\n}\n\n@keyframes style-module_appear-down__14rCV {\n from {\n transform: translateY(-10px);\n opacity: 0;\n }\n to {\n transform: translateY(0);\n opacity: 1;\n }\n}";
6599
+ var css_248z$s = ".style-module_upload-file-cell__3nv5i {\n display: flex;\n align-items: center;\n justify-content: space-between;\n min-height: 64px;\n padding: 8px 16px;\n border: 1px solid #d2d2d8;\n border-radius: 8px;\n background-color: white;\n animation: style-module_appear-down__14rCV 0.6s;\n animation-fill-mode: both;\n animation-delay: 0s;\n}\n\n.style-module_upload-file-cell-error__3KcSe {\n border-color: #e55454;\n background-color: rgba(229, 84, 84, 0.2);\n}\n\n.style-module_cell-left-section__3Iv8c {\n display: flex;\n align-items: center;\n}\n\n.style-module_main-icon__335_Y {\n width: 16px;\n height: 20px;\n margin-right: 16px;\n}\n\n.style-module_upload-display-text__3Rd68 {\n display: -webkit-box;\n -webkit-line-clamp: 2;\n -webkit-box-orient: vertical;\n overflow: hidden;\n}\n\n.style-module_progress-bar-container__2JCBO {\n position: relative;\n}\n\n.style-module_progress-bar__1Rosf {\n background-color: #f5f6fb;\n border-radius: 10px;\n height: 4px;\n}\n\n.style-module_progress-bar-filler__131fA {\n background-color: #8e8cee;\n border-radius: 10px;\n height: 4px;\n position: absolute;\n bottom: 0;\n transition: 1s ease;\n}\n\n.style-module_cell-right-section__dVWqJ {\n display: flex;\n justify-content: flex-end;\n min-width: 32px;\n margin-left: 16px;\n}\n\n.style-module_cell-right-section-complete__c0rHc {\n min-width: 64px;\n}\n\n.style-module_view-icon__3UenG,\n.style-module_remove-icon__2FWBQ {\n cursor: pointer;\n}\n\n.style-module_remove-icon__2FWBQ {\n margin-left: 16px;\n}\n\n.style-module_disabled__s-DR1 {\n pointer-events: none;\n cursor: default;\n}\n\n@keyframes style-module_appear-down__14rCV {\n from {\n transform: translateY(-10px);\n opacity: 0;\n }\n to {\n transform: translateY(0);\n opacity: 1;\n }\n}";
6600
6600
  var styles$r = {"upload-file-cell":"style-module_upload-file-cell__3nv5i","appear-down":"style-module_appear-down__14rCV","upload-file-cell-error":"style-module_upload-file-cell-error__3KcSe","cell-left-section":"style-module_cell-left-section__3Iv8c","main-icon":"style-module_main-icon__335_Y","upload-display-text":"style-module_upload-display-text__3Rd68","progress-bar-container":"style-module_progress-bar-container__2JCBO","progress-bar":"style-module_progress-bar__1Rosf","progress-bar-filler":"style-module_progress-bar-filler__131fA","cell-right-section":"style-module_cell-right-section__dVWqJ","cell-right-section-complete":"style-module_cell-right-section-complete__c0rHc","view-icon":"style-module_view-icon__3UenG","remove-icon":"style-module_remove-icon__2FWBQ","disabled":"style-module_disabled__s-DR1"};
6601
6601
  styleInject(css_248z$s);
6602
6602
 
@@ -6612,23 +6612,23 @@ var UploadFileCell = function (_a) {
6612
6612
  COMPLETE: icons.fileIcon,
6613
6613
  ERROR: icons.fileErrorIcon,
6614
6614
  };
6615
- var mapDisplayText = {
6615
+ var displayText = {
6616
6616
  UPLOADING: 'Uploading...',
6617
6617
  COMPLETE: name,
6618
6618
  ERROR: error !== null && error !== void 0 ? error : 'Something went wrong. Try uploading again.',
6619
- };
6619
+ }[uploadStatus];
6620
6620
  return (jsxRuntime.jsxs("div", __assign({ className: classNames("mt8 " + styles$r['upload-file-cell'], (_b = {},
6621
6621
  _b[styles$r['upload-file-cell-error']] = hasError,
6622
6622
  _b)) }, { children: [jsxRuntime.jsxs("div", __assign({ className: "w100 " + styles$r['cell-left-section'] }, { children: [jsxRuntime.jsx("img", { className: styles$r['main-icon'], src: mapFileIcon[uploadStatus], alt: "" }, void 0),
6623
- jsxRuntime.jsxs("div", __assign({ className: "w100" }, { children: [jsxRuntime.jsx("div", __assign({ className: "p-p " + styles$r['upload-display-text'] }, { children: mapDisplayText[uploadStatus] }), void 0),
6623
+ jsxRuntime.jsxs("div", __assign({ className: "w100" }, { children: [jsxRuntime.jsx("div", __assign({ className: "p-p " + styles$r['upload-display-text'], title: displayText }, { children: displayText }), void 0),
6624
6624
  isUploading && showProgressBar && (jsxRuntime.jsxs("div", __assign({ className: "mt8 w100 " + styles$r['progress-bar-container'] }, { children: [jsxRuntime.jsx("div", { className: "" + styles$r['progress-bar'] }, void 0),
6625
6625
  jsxRuntime.jsx("div", { "data-testid": "ds-filecell-progressbar", className: "" + styles$r['progress-bar-filler'], style: { width: progress + "%" } }, void 0)] }), void 0))] }), void 0)] }), void 0),
6626
6626
  jsxRuntime.jsx("div", __assign({ className: classNames(styles$r['cell-right-section'], (_c = {},
6627
6627
  _c[styles$r['cell-right-section-complete']] = isComplete,
6628
6628
  _c)) }, { children: isUploading ? (jsxRuntime.jsx("div", __assign({ className: styles$r.spinner }, { children: showLoadingSpinner && (jsxRuntime.jsx("div", { className: 'ds-spinner ds-spinner__m', "data-testid": "ds-filecell-spinner" }, void 0)) }), void 0)) : (jsxRuntime.jsxs("div", { children: [isComplete && (jsxRuntime.jsx("a", __assign({ className: styles$r['view-icon'], href: previewUrl, target: "_blank", rel: "noopener noreferrer" }, { children: jsxRuntime.jsx("img", { src: icons.eyeIcon, alt: "preview" }, void 0) }), void 0)),
6629
- jsxRuntime.jsx("img", { className: classNames(styles$r['remove-icon'], (_d = {},
6629
+ onRemoveFile && (jsxRuntime.jsx("img", { className: classNames(styles$r['remove-icon'], (_d = {},
6630
6630
  _d[styles$r.disabled] = uploading,
6631
- _d)), src: hasError ? icons.trashErrorIcon : icons.trashIcon, onClick: function () { return onRemoveFile(id); }, alt: "remove" }, void 0)] }, void 0)) }), void 0)] }), void 0));
6631
+ _d)), src: hasError ? icons.trashErrorIcon : icons.trashIcon, onClick: function () { return onRemoveFile(id); }, alt: "remove" }, void 0))] }, void 0)) }), void 0)] }), void 0));
6632
6632
  };
6633
6633
 
6634
6634
  var k$2 = 1024;
@@ -6758,7 +6758,7 @@ var MultiDropzone = function (_a) {
6758
6758
  progress: 0,
6759
6759
  }, onRemoveFile: function () { return removeError(id); }, uploading: false }, id));
6760
6760
  }),
6761
- uploadedFiles.length > 0 && (jsxRuntime.jsx("div", __assign({ className: "w100 mt16" }, { children: uploadedFiles.map(function (file) { return (jsxRuntime.jsx(UploadFileCell, { uploadStatus: getUploadStatus(file.progress, file.error), file: file, onRemoveFile: onRemoveFile, uploading: uploading }, file.id)); }) }), void 0)),
6761
+ uploadedFiles.length > 0 && (jsxRuntime.jsx("div", __assign({ className: "w100 mt16" }, { children: uploadedFiles.map(function (file) { return (jsxRuntime.jsx(UploadFileCell, __assign({ uploadStatus: getUploadStatus(file.progress, file.error), file: file }, !onRemoveFile ? {} : { onRemoveFile: onRemoveFile }, { uploading: uploading }), file.id)); }) }), void 0)),
6762
6762
  jsxRuntime.jsx(AnimateHeight, __assign({ duration: 300, height: isOverMaxFiles ? 'auto' : 0 }, { children: jsxRuntime.jsx("p", __assign({ className: "tc-red-500 p-p--small" }, { children: (textOverrides === null || textOverrides === void 0 ? void 0 : textOverrides.tooManyFilesError) || 'Too many files.' }), void 0) }), void 0)] }), void 0));
6763
6763
  };
6764
6764