@popsure/dirty-swan 0.38.4 → 0.38.6
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 +15 -15
- package/dist/cjs/index.js.map +1 -1
- package/dist/cjs/lib/components/multiDropzone/UploadFileCell/index.d.ts +1 -1
- package/dist/cjs/lib/components/multiDropzone/index.d.ts +1 -1
- package/dist/esm/components/modal/bottomModal/index.js +8 -8
- package/dist/esm/components/modal/bottomModal/index.js.map +1 -1
- package/dist/esm/components/multiDropzone/UploadFileCell/index.js +1 -1
- package/dist/esm/components/multiDropzone/index.js +2 -2
- package/dist/esm/components/multiDropzone/index.js.map +1 -1
- package/dist/esm/components/multiDropzone/index.stories.js +3 -3
- package/dist/esm/components/multiDropzone/index.stories.js.map +1 -1
- package/dist/esm/components/multiDropzone/index.test.js +1 -1
- package/dist/esm/{index-da10b7ad.js → index-3e39c956.js} +7 -7
- package/dist/esm/{index-da10b7ad.js.map → index-3e39c956.js.map} +1 -1
- package/dist/esm/index.js +1 -1
- package/dist/esm/lib/components/multiDropzone/UploadFileCell/index.d.ts +1 -1
- package/dist/esm/lib/components/multiDropzone/index.d.ts +1 -1
- package/package.json +1 -1
- package/src/lib/components/modal/bottomModal/index.tsx +26 -22
- package/src/lib/components/modal/bottomModal/style.module.scss +6 -3
- package/src/lib/components/multiDropzone/UploadFileCell/index.tsx +15 -13
- package/src/lib/components/multiDropzone/UploadFileCell/style.module.scss +5 -2
- package/src/lib/components/multiDropzone/index.stories.tsx +2 -2
- package/src/lib/components/multiDropzone/index.tsx +3 -2
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
|
|
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
|
|
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:
|
|
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
|
|
|
@@ -7005,8 +7005,8 @@ var Radio$1 = function (_a) {
|
|
|
7005
7005
|
}) }), void 0));
|
|
7006
7006
|
};
|
|
7007
7007
|
|
|
7008
|
-
var css_248z$l = "@keyframes style-module_fade-in__1GZgs {\n 0% {\n background-color: rgba(0, 0, 0, 0);\n }\n 100% {\n background-color: rgba(0, 0, 0, 0.3);\n }\n}\n@keyframes style-module_fade-out__30Bns {\n from {\n background-color: rgba(0, 0, 0, 0.3);\n }\n to {\n background-color: rgba(0, 0, 0, 0);\n }\n}\n@keyframes style-module_appear-in__3U2lu {\n 0% {\n transform: translateY(100%);\n }\n 80% {\n transform: translateY(-2%);\n }\n 100% {\n transform: translateY(0);\n }\n}\n@keyframes style-module_disappear-out__6pOVr {\n 0% {\n transform: translateY(0);\n }\n 100% {\n transform: translateY(100%);\n }\n}\n.style-module_close__1GERU {\n border: none;\n background-color: transparent;\n cursor: pointer;\n}\n\n.style-module_overlay__AlX2J, .style-module_overlay--close__3E9GY {\n position: fixed;\n z-index: 100;\n overflow: auto;\n top: 0;\n bottom: 0;\n left: 0;\n right: 0;\n animation: style-module_fade-in__1GZgs 0.3s both;\n}\n.style-module_overlay--close__3E9GY {\n animation-delay: 0.1s;\n animation: style-module_fade-out__30Bns 0.3s both;\n}\n\n.style-module_container__aOENo, .style-module_container--close__K506c {\n
|
|
7009
|
-
var styles$k = {"close":"style-module_close__1GERU","overlay":"style-module_overlay__AlX2J","overlay--close":"style-module_overlay--close__3E9GY","fade-in":"style-module_fade-in__1GZgs","fade-out":"style-module_fade-out__30Bns","container":"style-module_container__aOENo","container--close":"style-module_container--close__K506c","appear-in":"style-module_appear-in__3U2lu","disappear-out":"style-module_disappear-out__6pOVr","header":"style-module_header__10iiH","content":"style-module_content__mq_IJ"};
|
|
7008
|
+
var css_248z$l = "@keyframes style-module_fade-in__1GZgs {\n 0% {\n background-color: rgba(0, 0, 0, 0);\n }\n 100% {\n background-color: rgba(0, 0, 0, 0.3);\n }\n}\n@keyframes style-module_fade-out__30Bns {\n from {\n background-color: rgba(0, 0, 0, 0.3);\n }\n to {\n background-color: rgba(0, 0, 0, 0);\n }\n}\n@keyframes style-module_appear-in__3U2lu {\n 0% {\n transform: translateY(100%);\n }\n 80% {\n transform: translateY(-2%);\n }\n 100% {\n transform: translateY(0);\n }\n}\n@keyframes style-module_disappear-out__6pOVr {\n 0% {\n transform: translateY(0);\n }\n 100% {\n transform: translateY(100%);\n }\n}\n.style-module_close__1GERU {\n border: none;\n background-color: transparent;\n cursor: pointer;\n}\n\n.style-module_overlay__AlX2J, .style-module_overlay--close__3E9GY {\n position: fixed;\n z-index: 100;\n overflow: auto;\n top: 0;\n bottom: 0;\n left: 0;\n right: 0;\n animation: style-module_fade-in__1GZgs 0.3s both;\n}\n.style-module_overlay--close__3E9GY {\n animation-delay: 0.1s;\n animation: style-module_fade-out__30Bns 0.3s both;\n}\n\n.style-module_wrapper__200Xu {\n position: relative;\n top: 0;\n width: 100%;\n overflow: hidden;\n}\n\n.style-module_container__aOENo, .style-module_container--close__K506c {\n background-color: white;\n border-top-left-radius: 8px;\n border-top-right-radius: 8px;\n width: 100%;\n animation-name: style-module_appear-in__3U2lu;\n animation-duration: 0.4s;\n animation-fill-mode: both;\n animation-timing-function: ease-out;\n}\n.style-module_container--close__K506c {\n animation-name: style-module_disappear-out__6pOVr;\n animation-duration: 0.4s;\n animation-delay: 0s;\n animation-fill-mode: both;\n animation-timing-function: ease-out;\n}\n\n.style-module_header__10iiH {\n height: 60px;\n display: flex;\n align-items: center;\n padding: 0 16px;\n}\n\n@media (max-width: 34rem) {\n .style-module_content__mq_IJ {\n padding-bottom: 48px;\n }\n}";
|
|
7009
|
+
var styles$k = {"close":"style-module_close__1GERU","overlay":"style-module_overlay__AlX2J","overlay--close":"style-module_overlay--close__3E9GY","fade-in":"style-module_fade-in__1GZgs","fade-out":"style-module_fade-out__30Bns","wrapper":"style-module_wrapper__200Xu","container":"style-module_container__aOENo","container--close":"style-module_container--close__K506c","appear-in":"style-module_appear-in__3U2lu","disappear-out":"style-module_disappear-out__6pOVr","header":"style-module_header__10iiH","content":"style-module_content__mq_IJ"};
|
|
7010
7010
|
styleInject(css_248z$l);
|
|
7011
7011
|
|
|
7012
7012
|
var imageClose$1 = "data:image/svg+xml,%3Csvg%20width%3D%2224%22%20height%3D%2224%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cpath%20d%3D%22M18%206L6%2018%22%20stroke%3D%22%2326262E%22%20strokeWidth%3D%222%22%20strokeLinecap%3D%22round%22%20strokeLinejoin%3D%22round%22%2F%3E%3Cpath%20d%3D%22M6%206L18%2018%22%20stroke%3D%22%2326262E%22%20strokeWidth%3D%222%22%20strokeLinecap%3D%22round%22%20strokeLinejoin%3D%22round%22%2F%3E%3C%2Fsvg%3E";
|
|
@@ -7065,12 +7065,12 @@ var BottomModal = function (_a) {
|
|
|
7065
7065
|
if (!isOpen) {
|
|
7066
7066
|
return jsxRuntime.jsx(jsxRuntime.Fragment, {}, void 0);
|
|
7067
7067
|
}
|
|
7068
|
-
return (jsxRuntime.jsx("div", __assign({ className: isClosing ? styles$k['overlay--close'] : styles$k.overlay, onClick: handleOnOverlayClick }, { children: jsxRuntime.jsxs("div", __assign({ className: (isClosing ? styles$k['container--close'] : styles$k.container) + " " + className
|
|
7069
|
-
|
|
7070
|
-
|
|
7071
|
-
|
|
7072
|
-
|
|
7073
|
-
|
|
7068
|
+
return (jsxRuntime.jsx("div", __assign({ className: isClosing ? styles$k['overlay--close'] : styles$k.overlay, onClick: handleOnOverlayClick }, { children: jsxRuntime.jsx("div", __assign({ className: styles$k.wrapper, ref: containerRef, onClick: handleContainerClick, style: { top: containerXOffset + "px" } }, { children: jsxRuntime.jsxs("div", __assign({ className: (isClosing ? styles$k['container--close'] : styles$k.container) + " " + className }, { children: [jsxRuntime.jsxs("div", __assign({ className: classNames(styles$k.header, {
|
|
7069
|
+
'jc-between': !!title,
|
|
7070
|
+
'jc-end': !title
|
|
7071
|
+
}) }, { children: [jsxRuntime.jsx("div", __assign({ className: "p-h4 " + styles$k.title }, { children: title }), void 0),
|
|
7072
|
+
dismissible && (jsxRuntime.jsx("button", __assign({ type: "button", className: styles$k.close, onClick: handleOnClose }, { children: jsxRuntime.jsx("img", { src: imageClose$1, alt: "Close" }, void 0) }), void 0))] }), void 0),
|
|
7073
|
+
jsxRuntime.jsx("div", __assign({ className: styles$k.content }, { children: children }), void 0)] }), void 0) }), void 0) }), void 0));
|
|
7074
7074
|
};
|
|
7075
7075
|
|
|
7076
7076
|
var css_248z$k = "@keyframes style-module_fade-in__nLzzO {\n 0% {\n background-color: rgba(0, 0, 0, 0);\n visibility: hidden;\n }\n 100% {\n background-color: rgba(0, 0, 0, 0.3);\n visibility: visible;\n }\n}\n@keyframes style-module_fade-out__IuSV7 {\n from {\n background-color: rgba(0, 0, 0, 0.3);\n visibility: visible;\n }\n to {\n background-color: rgba(0, 0, 0, 0);\n visibility: hidden;\n }\n}\n@keyframes style-module_appear-in__2ZMqz {\n 0% {\n transform: translateY(24px);\n opacity: 0;\n visibility: hidden;\n }\n 100% {\n transform: translateY(0);\n opacity: 1;\n visibility: visible;\n }\n}\n@keyframes style-module_disappear-out__38TSV {\n 0% {\n transform: translateY(0);\n opacity: 1;\n visibility: visible;\n }\n 100% {\n transform: translateY(24px);\n opacity: 0;\n visibility: hidden;\n }\n}\n.style-module_overlay__1Zbce, .style-module_overlay--close__2dytn {\n position: fixed;\n z-index: 100;\n overflow: auto;\n top: 0;\n bottom: 0;\n left: 0;\n right: 0;\n animation: style-module_fade-in__nLzzO 0.3s both;\n}\n.style-module_overlay--close__2dytn {\n animation-delay: 0.1s;\n animation: style-module_fade-out__IuSV7 0.3s both;\n}\n\n.style-module_container__1XZj_, .style-module_container--close__3UYsJ {\n position: relative;\n display: flex;\n align-items: center;\n max-width: 592px;\n width: 100%;\n min-height: 100%;\n margin: 0 auto;\n animation-name: style-module_appear-in__2ZMqz;\n animation-duration: 0.4s;\n animation-fill-mode: both;\n animation-timing-function: ease-out;\n}\n.style-module_container--close__3UYsJ {\n animation-name: style-module_disappear-out__38TSV;\n animation-duration: 0.4s;\n animation-delay: 0s;\n animation-fill-mode: both;\n animation-timing-function: ease-out;\n}\n\n.style-module_body__lbUih {\n background-color: white;\n border-radius: 8px;\n margin: 80px auto;\n}\n\n.style-module_header__2oEKp {\n display: flex;\n align-items: center;\n padding: 24px 24px 0 24px;\n}\n\n.style-module_close__p3Axi {\n border: none;\n background-color: transparent;\n cursor: pointer;\n}";
|