bmi-next-brokers 1.1.9 → 1.2.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.
- package/dist/assets/CompactFileUpload.css +1 -1
- package/dist/assets/FileUpload.css +1 -1
- package/dist/components/FileUpload/CompactFileUpload.d.ts +3 -1
- package/dist/components/FileUpload/CompactFileUpload.js +175 -168
- package/dist/components/FileUpload/FileUpload.js +119 -117
- package/dist/components/Input/RadioButton/RadioButton.js +17 -7
- package/dist/icons/Icon.js +1 -1
- package/dist/icons/components/AddAlert.js +36 -7
- package/dist/icons/components/Assignment.js +37 -8
- package/dist/icons/components/ComputerCancel.d.ts +3 -0
- package/dist/icons/components/ComputerCancel.js +39 -0
- package/dist/icons/components/Paid.d.ts +3 -0
- package/dist/icons/components/Paid.js +22 -0
- package/dist/icons/components/ProductIcon.d.ts +3 -0
- package/dist/icons/components/ProductIcon.js +39 -0
- package/dist/icons/components/Upload.d.ts +3 -0
- package/dist/icons/components/Upload.js +39 -0
- package/dist/icons/components/index.d.ts +4 -1
- package/dist/icons/components/index.js +106 -100
- package/dist/icons/index.d.ts +4 -0
- package/dist/icons/index.js +160 -152
- package/dist/index-9HOVLbts.js +222 -0
- package/package.json +1 -1
- package/dist/index-CYre5lRF.js +0 -214
|
@@ -1 +1 @@
|
|
|
1
|
-
.
|
|
1
|
+
._inputContainer_1dauy_1{display:flex;flex-direction:column;gap:4px;width:100%;min-width:0}._compactFileUploadContainer_1dauy_9{background:var(--Fill-Brand-Default-Hover, #eef3fc);border-radius:12px;transition:background-color .3s ease,border-color .3s ease;position:relative;cursor:pointer;display:flex;flex-direction:column;justify-content:center;overflow:hidden;width:100%;max-width:415px;height:62px}._compactFileUploadContainer_1dauy_9._fullWidth_1dauy_26{max-width:100%}._compactFileUploadContainer_1dauy_9:hover{font-weight:600;background-color:var(--Fill-Info-Inverted-Hover, #e0e9f8)}._compactFileUploadContainer_1dauy_9._dragOver_1dauy_35{border-color:var(--Fill-Brand-Default-Active, #2054a5);background:var(--Fill-Brand-Default-Hover, #eef3fc)}._variant_document_1dauy_41 ._icon_1dauy_41{color:var(--Content-Neutral-Primary, #475569)}._variant_add_1dauy_45 ._icon_1dauy_41{color:var(--Fill-Brand-Default-Active, #2054a5)}._compactFileUploadContainer_1dauy_9._disabled_1dauy_50{border-color:var(--Stroke-Disabled-Default, #cbd5e1);background:var(--Fill-Disabled-Default, #f8fafc);cursor:not-allowed}._compactFileUploadContainer_1dauy_9._disabled_1dauy_50:hover{border-color:var(--Stroke-Disabled-Default, #cbd5e1);background:var(--Fill-Disabled-Default, #f8fafc)}._compactFileUploadContainer_1dauy_9._error_1dauy_61{background-color:#fef2f2}._compactFileUploadContainer_1dauy_9._error_1dauy_61:hover{background-color:var(--Fill-Negative-Default-Hover, #fecaca)}._compactFileUploadContainer_1dauy_9._warning_1dauy_69{background-color:#ffedd5}._compactFileUploadContainer_1dauy_9._warning_1dauy_69:hover{background-color:var(--Fill-Warning-Default-Hover, #fecaca)}._compactFileUploadContainer_1dauy_9._inverted_1dauy_78{border-color:var(--Stroke-Neutral-Secondary, #c9e1f6);background:transparent}._compactFileUploadContainer_1dauy_9._inverted_1dauy_78:hover{border-color:var(--Stroke-Neutral-Primary, #e0e9f8);background:#ffffff1a}._compactFileUploadContainer_1dauy_9._inverted_1dauy_78._dragOver_1dauy_35{border-color:var(--Fill-Brand-Inverted-Active, #fff);background:#fff3}._compactFileUploadContainer_1dauy_9._inverted_1dauy_78._disabled_1dauy_50{border-color:var(--Stroke-Disabled-Default, #1b468a);background:transparent}._compactFileUploadContainer_1dauy_9._inverted_1dauy_78._error_1dauy_61{background:transparent}._uploadContent_1dauy_103{display:flex;padding:12px;gap:8px;z-index:100;height:100%;position:relative;transition:all .3s ease}._textContent_1dauy_113{text-align:center;display:flex;flex-direction:row;gap:8px;align-items:center;height:100%;min-width:0}._dragText_1dauy_123{font-family:Poppins Bold;font-size:12px;color:var(--Content-Brand-Default-Active, #2054a5)}._disabled_1dauy_50 ._dragText_1dauy_123{color:var(--content-disabled-default, #cbd5e1)}._inverted_1dauy_78 ._dragText_1dauy_123{color:#fffc}._inverted_1dauy_78._disabled_1dauy_50 ._dragText_1dauy_123{color:var(--content-disabled-default, #4f88d9)}._inverted_1dauy_78 ._variant_document_1dauy_41 ._icon_1dauy_41,._inverted_1dauy_78 ._variant_add_1dauy_45 ._icon_1dauy_41{color:#fff}._inverted_1dauy_78._disabled_1dauy_50 ._icon_1dauy_41{color:var(--content-disabled-default, #4f88d9)}._hiddenInput_1dauy_153{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}._compactFileContent_1dauy_166{display:flex;align-items:center;gap:12px;width:100%;height:100%}._compactFileIcon_1dauy_174{flex-shrink:0;display:flex;align-items:center;justify-content:center;margin-top:0}._compactIconBackground_1dauy_182{display:flex;align-items:center;justify-content:center;padding:6px}._compactFileContent_1dauy_166,._compactFileText_1dauy_190{justify-content:center}._compactFileText_1dauy_190{flex:1;display:flex;flex-direction:column;gap:2px;min-width:0}._compactLabel_1dauy_202{color:#2054a5;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}._compactFileName_1dauy_209,._compactStatusText_1dauy_210{color:#525252;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}._compactFileName_1dauy_209._error_1dauy_61{color:#dc2626}._compactFileName_1dauy_209._success_1dauy_221{color:#65a30d}._compactFileName_1dauy_209._warning_1dauy_69{color:#ea580c}._compactFileName_1dauy_209._loading_1dauy_229{color:#2054a5}._addIconWrapper_1dauy_233{border-radius:1000px;height:34px;width:34px}._browseText_1dauy_239{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:#2054a5}._compactVisibilityIcon_1dauy_246{flex-shrink:0;display:flex;align-items:center;justify-content:center;cursor:pointer;transition:background-color .2s ease}._compactActions_1dauy_255{display:flex;align-items:center;gap:8px;flex-shrink:0}._deleteText_1dauy_262{font-family:Poppins Regular;font-size:12px;color:var(--Content-Brand-Default-Active, #2054a5);white-space:nowrap}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
._inputContainer_1ejg3_1{display:flex;flex-direction:column;gap:4px;width:fit-content}._inputContainer_1ejg3_1._fullWidth_1ejg3_8{width:100%}._label_1ejg3_12{font-family:Poppins Regular;font-size:13px;color:var(--Content-Neutral-Default-Active, #000);font-weight:500;padding-left:4px}._label_large_1ejg3_20{font-size:15px;margin-bottom:6px}._label_disabled_1ejg3_25{color:var(--content-disabled-default, #cbd5e1)}._label_inverted_1ejg3_29{color:#fff!important}._label_inverted_disabled_1ejg3_33{color:var(--Content-Neutral-Default-Active, #fff)}._required_1ejg3_37{color:var(--Content-Negative-Default-Active, #dc2626);margin-left:2px}._required_disabled_1ejg3_42{color:var(--content-disabled-default, #cbd5e1)}._required_inverted_1ejg3_46{color:var(--Content-Negative-Default-Active, #f87171)}._required_inverted_disabled_1ejg3_50{color:var(--content-disabled-default, #4f88d9)}._fileUploadContainer_1ejg3_54{background:var(--Fill-Brand-Default-Hover, #eef3fc);border-radius:12px;transition:background-color .3s ease,border-color .3s ease;position:relative;cursor:pointer;display:flex;flex-direction:column;justify-content:center;overflow:hidden}._iconContainerLeft_1ejg3_68{position:absolute;top:-60px;left:-12px;transform:rotate(15deg);transition:opacity .3s ease}._iconContainerRight_1ejg3_76{position:absolute;top:20px;left:300px;transform:rotate(-25deg);transition:opacity .3s ease}._fileUploadContainer_1ejg3_54:hover{background:var(--Fill-Info-Inverted-Hover, #e0e9f8)}._fileUploadContainer_1ejg3_54._dragOver_1ejg3_88{border-color:var(--Fill-Brand-Default-Active, #2054a5);background:var(--Fill-Brand-Default-Hover, #eef3fc)}._fileUploadContainer_1ejg3_54{width:415px;height:120px}._fileUploadContainer_1ejg3_54._fullWidth_1ejg3_8{width:100%}._variant_document_1ejg3_104 ._icon_1ejg3_68{color:var(--Content-Neutral-Primary, #475569)}._variant_add_1ejg3_108 ._icon_1ejg3_68{color:var(--Fill-Brand-Default-Active, #2054a5)}._fileUploadContainer_1ejg3_54._disabled_1ejg3_113{border-color:var(--Stroke-Disabled-Default, #cbd5e1);background:var(--Fill-Disabled-Default, #f8fafc);cursor:not-allowed}._fileUploadContainer_1ejg3_54._disabled_1ejg3_113:hover{border-color:var(--Stroke-Disabled-Default, #cbd5e1);background:var(--Fill-Disabled-Default, #f8fafc)}._fileUploadContainer_1ejg3_54._error_1ejg3_124{border-color:var(--Stroke-Negative-Active, #dc2626);background:var(--Fill-Negative-Default-Active, #fee2e2)}._fileUploadContainer_1ejg3_54._error_1ejg3_124:hover{border-color:var(--Stroke-Negative-Active, #dc2626)}._fileUploadContainer_1ejg3_54._success_1ejg3_133{background:var(--Fill-Brand-Default-Hover, #eef3fc)}._fileUploadContainer_1ejg3_54._success_1ejg3_133:hover{background:var(--Fill-Info-Inverted-Hover, #e0e9f8)}._fileUploadContainer_1ejg3_54._loading_1ejg3_141{background:var(--Fill-Brand-Default-Hover, #eef3fc)}._fileUploadContainer_1ejg3_54._loading_1ejg3_141:hover{background:var(--Fill-Info-Inverted-Hover, #e0e9f8)}._fileUploadContainer_1ejg3_54._inverted_1ejg3_150{border-color:var(--Stroke-Neutral-Secondary, #c9e1f6);background:transparent}._fileUploadContainer_1ejg3_54._inverted_1ejg3_150:hover{border-color:var(--Stroke-Neutral-Primary, #e0e9f8);background:#ffffff1a}._fileUploadContainer_1ejg3_54._inverted_1ejg3_150._dragOver_1ejg3_88{border-color:var(--Fill-Brand-Inverted-Active, #fff);background:#fff3}._fileUploadContainer_1ejg3_54._inverted_1ejg3_150._disabled_1ejg3_113{border-color:var(--Stroke-Disabled-Default, #1b468a);background:transparent}._fileUploadContainer_1ejg3_54._inverted_1ejg3_150._error_1ejg3_124{border-color:var(--Stroke-Negative-Active, #ef4444);background:#ef44441a}._uploadContent_1ejg3_176{display:flex;flex-direction:column;align-items:center;gap:12px;z-index:100;height:100%;position:relative;transition:all .3s ease}._selectedFileContent_1ejg3_188{display:flex;flex-direction:column;align-items:center;gap:12px;width:100%;height:100%;justify-content:flex-start}._selectedFileContent_1ejg3_188._withoutError_1ejg3_198{justify-content:center}._selectedFileName_1ejg3_202{font-family:Poppins Bold;font-size:16px;color:var(--Content-Neutral-Default-Active, #475569);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}._selectedFileSize_1ejg3_211{font-family:Poppins Regular;font-size:12px;color:var(--Content-Neutral-Secondary, #64748b);margin-top:2px}._removeButton_1ejg3_218{font-family:Poppins Medium;font-size:20px;color:var(--Content-Neutral-Secondary, #64748b);background:transparent;border:none;cursor:pointer;padding:4px;line-height:1;border-radius:4px;transition:all .2s ease;flex-shrink:0}._removeButton_1ejg3_218:hover{color:var(--Content-Negative-Default-Active, #dc2626);background:var(--Fill-Negative-Default-Hover, #fee2e2)}._removeButton_1ejg3_218:disabled{color:var(--content-disabled-default, #cbd5e1);cursor:not-allowed;background:transparent}._inverted_1ejg3_150 ._selectedFileName_1ejg3_202{color:#fff}._inverted_1ejg3_150 ._selectedFileSize_1ejg3_211,._inverted_1ejg3_150 ._removeButton_1ejg3_218{color:#ffffffb3}._inverted_1ejg3_150 ._removeButton_1ejg3_218:hover{color:var(--Content-Negative-Default-Active, #f87171);background:#ef44441a}._inverted_1ejg3_150._disabled_1ejg3_113 ._selectedFileName_1ejg3_202,._inverted_1ejg3_150._disabled_1ejg3_113 ._selectedFileSize_1ejg3_211,._inverted_1ejg3_150._disabled_1ejg3_113 ._removeButton_1ejg3_218{color:var(--content-disabled-default, #4f88d9)}._icon_1ejg3_68{display:flex;align-items:center;justify-content:center}._icon_1ejg3_68 svg{width:32px;height:32px}._textContent_1ejg3_278{text-align:center;display:flex;flex-direction:column;gap:8px;justify-content:center;align-items:center;height:100%}._dragText_1ejg3_288{font-family:Poppins Bold;font-size:16px;color:var(--Content-Brand-Default-Active, #2054a5)}._browseText_1ejg3_294{font-family:Poppins Medium;font-size:14px;color:var(--Fill-Brand-Default-Active, #2054a5);text-decoration:underline}._disabled_1ejg3_113 ._dragText_1ejg3_288,._disabled_1ejg3_113 ._browseText_1ejg3_294{color:var(--content-disabled-default, #cbd5e1)}._inverted_1ejg3_150 ._dragText_1ejg3_288{color:#fffc}._inverted_1ejg3_150 ._browseText_1ejg3_294{color:#fff}._inverted_1ejg3_150._disabled_1ejg3_113 ._dragText_1ejg3_288,._inverted_1ejg3_150._disabled_1ejg3_113 ._browseText_1ejg3_294{color:var(--content-disabled-default, #4f88d9)}._inverted_1ejg3_150 ._variant_document_1ejg3_104 ._icon_1ejg3_68,._inverted_1ejg3_150 ._variant_add_1ejg3_108 ._icon_1ejg3_68{color:#fff}._inverted_1ejg3_150._disabled_1ejg3_113 ._icon_1ejg3_68{color:var(--content-disabled-default, #4f88d9)}._hiddenInput_1ejg3_331{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}._helperText_1ejg3_344{font-family:Poppins Regular;color:#acacac;margin-top:2px;margin-left:4px}._helperText_default_1ejg3_351{font-size:11px}._helperText_compact_1ejg3_355{font-size:10px}._helperText_disabled_1ejg3_359{color:var(--content-disabled-default, #cbd5e1)}._helperText_inverted_1ejg3_363,._helperText_inverted_disabled_1ejg3_367{color:var(--Content-Neutral-Default-Default, #fafafa)}._errorMessage_1ejg3_372{font-family:Poppins Medium;color:#e74c3c;margin-top:2px;margin-left:4px}._errorMessage_default_1ejg3_379{font-size:12px}._errorMessage_compact_1ejg3_383{font-size:10px}._errorMessage_inverted_1ejg3_387{color:var(--Content-Negative-Default-Active, #f87171)!important}._selectedFilesContainer_1ejg3_392{margin-top:12px;padding:12px;border-radius:8px;background:var(--Fill-Neutral-Default-Default, #f8fafc);border:1px solid var(--Stroke-Neutral-Primary, #e2e8f0)}._selectedFilesHeader_1ejg3_400{display:flex;justify-content:space-between;align-items:center;margin-bottom:8px}._selectedFilesText_1ejg3_407{font-family:Poppins Medium;font-size:13px;color:var(--Content-Neutral-Default-Active, #475569)}._clearButton_1ejg3_413{font-family:Poppins Medium;font-size:12px;color:var(--Fill-Brand-Default-Active, #2054a5);background:transparent;border:none;cursor:pointer;text-decoration:underline;padding:0}._clearButton_1ejg3_413:hover{color:var(--Fill-Brand-Default-Hover, #1e40af)}._clearButton_1ejg3_413:disabled{color:var(--content-disabled-default, #cbd5e1);cursor:not-allowed;text-decoration:none}._filesList_1ejg3_434{display:flex;flex-direction:column;gap:4px}._fileItem_1ejg3_440{display:flex;justify-content:space-between;align-items:center;padding:4px 0;border-bottom:1px solid var(--Stroke-Neutral-Secondary, #e2e8f0)}._fileItem_1ejg3_440:last-child{border-bottom:none}._fileName_1ejg3_452{font-family:Poppins Regular;font-size:12px;color:var(--Content-Neutral-Default-Active, #475569);flex:1;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;margin-right:8px}._fileSize_1ejg3_463{font-family:Poppins Regular;font-size:11px;color:var(--Content-Neutral-Secondary, #64748b);flex-shrink:0}._inverted_1ejg3_150 ._selectedFilesContainer_1ejg3_392{background:#ffffff1a;border-color:var(--Stroke-Neutral-Secondary, #c9e1f6)}._inverted_1ejg3_150 ._selectedFilesText_1ejg3_407,._inverted_1ejg3_150 ._clearButton_1ejg3_413{color:#fff}._inverted_1ejg3_150 ._clearButton_1ejg3_413:hover{color:#fffc}._inverted_1ejg3_150 ._clearButton_1ejg3_413:disabled{color:var(--content-disabled-default, #4f88d9)}._inverted_1ejg3_150 ._fileItem_1ejg3_440{border-color:#fff3}._inverted_1ejg3_150 ._fileName_1ejg3_452{color:#ffffffe6}._inverted_1ejg3_150 ._fileSize_1ejg3_463{color:#ffffffb3}._bigZIndex_1ejg3_504{z-index:1000}._cancelIconWrapper_1ejg3_508{background:var(--Content-Negative-Default-Active, #dc2626);height:35px;width:35px;border-radius:1000px;position:absolute;top:18px;left:50%;transform:translate(-50%);z-index:200;display:flex;align-items:center;justify-content:center;animation:_fadeInSlideDown_1ejg3_1 .4s ease}._selectedFileInfo_1ejg3_524{display:flex;flex-direction:column;text-align:center;position:absolute;top:65px;left:50%;transform:translate(-50%);z-index:200;width:90%;opacity:0;animation:_fadeInSlideUp_1ejg3_1 .3s ease forwards}._successIconWrapper_1ejg3_538{background:var(--Content-Positive-Active, #65a30d);height:35px;width:35px;border-radius:1000px;position:absolute;top:18px;left:50%;transform:translate(-50%);z-index:200;display:flex;align-items:center;justify-content:center;animation:_fadeInSlideDown_1ejg3_1 .4s ease}._loadingIconWrapper_1ejg3_554{background:var(--Content-Brand-Default-Active, #2054a5);height:35px;width:35px;border-radius:1000px;position:absolute;top:18px;left:50%;transform:translate(-50%);z-index:200;display:flex;align-items:center;justify-content:center;animation:_fadeInSlideDown_1ejg3_1 .4s ease}._withoutError_1ejg3_198 ._selectedFileInfo_1ejg3_524{position:static;transform:none;opacity:0;animation:_fadeIn_1ejg3_1 .3s ease forwards}._withSuccess_1ejg3_578 ._selectedFileInfo_1ejg3_524,._withLoading_1ejg3_592 ._selectedFileInfo_1ejg3_524{display:flex;flex-direction:column;text-align:center;position:absolute;top:65px;left:50%;transform:translate(-50%);z-index:200;width:90%;opacity:0;animation:_fadeInSlideUp_1ejg3_1 .3s ease forwards}._errorText_1ejg3_606{position:absolute;top:89px;left:50%;transform:translate(-50%);z-index:200;width:90%;text-align:center;font-family:Poppins Medium;font-size:12px;color:var(--Content-Negative-Default-Active, #dc2626);margin:0;padding:0;animation:_fadeInSlideUp_1ejg3_1 .4s ease}._successText_1ejg3_622{position:absolute;top:89px;left:50%;transform:translate(-50%);z-index:200;width:90%;text-align:center;font-family:Poppins Medium;font-size:12px;color:var(--Content-Positive-Default-Active, #16a34a);margin:0;padding:0;animation:_fadeInSlideUp_1ejg3_1 .4s ease}@keyframes _fadeInSlideDown_1ejg3_1{0%{opacity:0;transform:translate(-50%) translateY(-10px)}to{opacity:1;transform:translate(-50%) translateY(0)}}@keyframes _fadeInSlideUp_1ejg3_1{0%{opacity:0;transform:translate(-50%) translateY(10px)}to{opacity:1;transform:translate(-50%) translateY(0)}}@keyframes _fadeInSlideUpCentered_1ejg3_1{0%{opacity:0;transform:translate(-50%) translateY(10px);left:50%}to{opacity:1;transform:translate(-50%) translateY(0);left:50%}}@keyframes _fadeIn_1ejg3_1{0%{opacity:0}to{opacity:1}}._inlineFileContainer_1ejg3_684{display:flex;align-items:center;gap:12px;width:100%;padding:0;animation:_fadeIn_1ejg3_1 .3s ease forwards}._inlineFileIcon_1ejg3_693{width:32px;height:32px;border-radius:50%;display:flex;align-items:center;justify-content:center;flex-shrink:0;background:var(--Fill-Brand-Default-Active, #2054a5)}._inlineFileIcon_1ejg3_693._error_1ejg3_124{background:var(--Content-Negative-Default-Active, #dc2626)}._inlineFileIcon_1ejg3_693._success_1ejg3_133{background:var(--Content-Positive-Active, #65a30d)}._inlineFileIcon_1ejg3_693._loading_1ejg3_141{background:var(--Content-Brand-Default-Active, #2054a5)}._inlineFileIcon_1ejg3_693._default_1ejg3_716{background:var(--Fill-Brand-Default-Active, #2054a5)}._inlineFileInfo_1ejg3_720{flex:1;display:flex;flex-direction:column;gap:2px;min-width:0}._inlineFileName_1ejg3_728{font-family:Poppins Medium;font-size:14px;color:var(--Content-Neutral-Default-Active, #475569);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}._inlineErrorText_1ejg3_737{font-family:Poppins Regular;font-size:12px;color:var(--Content-Negative-Default-Active, #dc2626)}._inlineSuccessText_1ejg3_743{font-family:Poppins Regular;font-size:12px;color:var(--Content-Positive-Default-Active, #16a34a)}._inlineFileActions_1ejg3_749{display:flex;align-items:center;gap:8px;flex-shrink:0}._inlineActionIcon_1ejg3_756{width:24px;height:24px;display:flex;align-items:center;justify-content:center;border-radius:4px;cursor:pointer;transition:background-color .2s ease}._inlineActionIcon_1ejg3_756:hover{background:var(--Fill-Neutral-Secondary, #f1f5f9)}
|
|
1
|
+
._inputContainer_13l42_1{display:flex;flex-direction:column;gap:4px;width:fit-content}._inputContainer_13l42_1._fullWidth_13l42_8{width:100%}._label_13l42_12{font-family:Poppins Regular;font-size:13px;color:var(--Content-Neutral-Default-Active, #000);font-weight:500;padding-left:4px}._label_large_13l42_20{font-size:15px;margin-bottom:6px}._label_disabled_13l42_25{color:var(--content-disabled-default, #cbd5e1)}._label_inverted_13l42_29{color:#fff!important}._label_inverted_disabled_13l42_33{color:var(--Content-Neutral-Default-Active, #fff)}._required_13l42_37{color:var(--Content-Negative-Default-Active, #dc2626);margin-left:2px}._required_disabled_13l42_42{color:var(--content-disabled-default, #cbd5e1)}._required_inverted_13l42_46{color:var(--Content-Negative-Default-Active, #f87171)}._required_inverted_disabled_13l42_50{color:var(--content-disabled-default, #4f88d9)}._fileUploadContainer_13l42_54{background:var(--Fill-Brand-Default-Hover, #eef3fc);border-radius:12px;transition:background-color .3s ease,border-color .3s ease;position:relative;cursor:pointer;display:flex;flex-direction:column;justify-content:center;overflow:hidden}._iconContainerLeft_13l42_68{position:absolute;top:-60px;left:-12px;transform:rotate(15deg);transition:opacity .3s ease}._iconContainerRight_13l42_76{position:absolute;top:20px;left:300px;transform:rotate(-25deg);transition:opacity .3s ease}._fileUploadContainer_13l42_54:hover{background:var(--Fill-Info-Inverted-Hover, #e0e9f8)}._fileUploadContainer_13l42_54._dragOver_13l42_88{border-color:var(--Fill-Brand-Default-Active, #2054a5);background:var(--Fill-Brand-Default-Hover, #eef3fc)}._fileUploadContainer_13l42_54{width:415px;height:120px}._fileUploadContainer_13l42_54._fullWidth_13l42_8{width:100%}._variant_document_13l42_104 ._icon_13l42_68{color:var(--Content-Neutral-Primary, #475569)}._variant_add_13l42_108 ._icon_13l42_68{color:var(--Fill-Brand-Default-Active, #2054a5)}._fileUploadContainer_13l42_54._disabled_13l42_113{border-color:var(--Stroke-Disabled-Default, #cbd5e1);background:var(--Fill-Disabled-Default, #f8fafc);cursor:not-allowed}._fileUploadContainer_13l42_54._disabled_13l42_113:hover{border-color:var(--Stroke-Disabled-Default, #cbd5e1);background:var(--Fill-Disabled-Default, #f8fafc)}._fileUploadContainer_13l42_54._error_13l42_124{border-color:var(--Stroke-Negative-Active, #dc2626);background:var(--Fill-Negative-Default-Active, #fee2e2)}._fileUploadContainer_13l42_54._error_13l42_124:hover{border-color:var(--Stroke-Negative-Active, #dc2626)}._fileUploadContainer_13l42_54._success_13l42_133{background:var(--Fill-Brand-Default-Hover, #eef3fc)}._fileUploadContainer_13l42_54._success_13l42_133:hover{background:var(--Fill-Info-Inverted-Hover, #e0e9f8)}._fileUploadContainer_13l42_54._loading_13l42_141{background:var(--Fill-Brand-Default-Hover, #eef3fc)}._fileUploadContainer_13l42_54._loading_13l42_141:hover{background:var(--Fill-Info-Inverted-Hover, #e0e9f8)}._fileUploadContainer_13l42_54._inverted_13l42_150{border-color:var(--Stroke-Neutral-Secondary, #c9e1f6);background:transparent}._fileUploadContainer_13l42_54._inverted_13l42_150:hover{border-color:var(--Stroke-Neutral-Primary, #e0e9f8);background:#ffffff1a}._fileUploadContainer_13l42_54._inverted_13l42_150._dragOver_13l42_88{border-color:var(--Fill-Brand-Inverted-Active, #fff);background:#fff3}._fileUploadContainer_13l42_54._inverted_13l42_150._disabled_13l42_113{border-color:var(--Stroke-Disabled-Default, #1b468a);background:transparent}._fileUploadContainer_13l42_54._inverted_13l42_150._error_13l42_124{border-color:var(--Stroke-Negative-Active, #ef4444);background:#ef44441a}._uploadContent_13l42_176{display:flex;flex-direction:column;align-items:center;gap:12px;z-index:100;height:100%;position:relative;transition:all .3s ease}._selectedFileContent_13l42_188{display:flex;flex-direction:column;align-items:center;gap:12px;width:100%;height:100%;justify-content:flex-start}._selectedFileContent_13l42_188._withoutError_13l42_198{justify-content:center}._selectedFileName_13l42_202{color:#2054a5;font-size:600;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}._selectedFileSize_13l42_210{font-family:Poppins Regular;font-size:12px;color:var(--Content-Neutral-Secondary, #64748b);margin-top:2px}._removeButton_13l42_217{font-family:Poppins Medium;font-size:20px;color:var(--Content-Neutral-Secondary, #64748b);background:transparent;border:none;cursor:pointer;padding:4px;line-height:1;border-radius:4px;transition:all .2s ease;flex-shrink:0}._removeButton_13l42_217:hover{color:var(--Content-Negative-Default-Active, #dc2626);background:var(--Fill-Negative-Default-Hover, #fee2e2)}._removeButton_13l42_217:disabled{color:var(--content-disabled-default, #cbd5e1);cursor:not-allowed;background:transparent}._inverted_13l42_150 ._selectedFileName_13l42_202{color:#fff}._inverted_13l42_150 ._selectedFileSize_13l42_210,._inverted_13l42_150 ._removeButton_13l42_217{color:#ffffffb3}._inverted_13l42_150 ._removeButton_13l42_217:hover{color:var(--Content-Negative-Default-Active, #f87171);background:#ef44441a}._inverted_13l42_150._disabled_13l42_113 ._selectedFileName_13l42_202,._inverted_13l42_150._disabled_13l42_113 ._selectedFileSize_13l42_210,._inverted_13l42_150._disabled_13l42_113 ._removeButton_13l42_217{color:var(--content-disabled-default, #4f88d9)}._icon_13l42_68{display:flex;align-items:center;justify-content:center}._icon_13l42_68 svg{width:32px;height:32px}._textContent_13l42_277{text-align:center;display:flex;flex-direction:column;gap:8px;justify-content:center;align-items:center;height:100%}._dragText_13l42_287{color:var(--Content-Brand-Default-Active, #2054a5)}._browseText_13l42_291{font-family:Poppins Medium;font-size:14px;color:var(--Fill-Brand-Default-Active, #2054a5);text-decoration:underline}._disabled_13l42_113 ._dragText_13l42_287,._disabled_13l42_113 ._browseText_13l42_291{color:var(--content-disabled-default, #cbd5e1)}._inverted_13l42_150 ._dragText_13l42_287{color:#fffc}._inverted_13l42_150 ._browseText_13l42_291{color:#fff}._inverted_13l42_150._disabled_13l42_113 ._dragText_13l42_287,._inverted_13l42_150._disabled_13l42_113 ._browseText_13l42_291{color:var(--content-disabled-default, #4f88d9)}._inverted_13l42_150 ._variant_document_13l42_104 ._icon_13l42_68,._inverted_13l42_150 ._variant_add_13l42_108 ._icon_13l42_68{color:#fff}._inverted_13l42_150._disabled_13l42_113 ._icon_13l42_68{color:var(--content-disabled-default, #4f88d9)}._hiddenInput_13l42_328{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}._helperText_13l42_341{font-family:Poppins Regular;color:#acacac;margin-top:2px;margin-left:4px}._helperText_default_13l42_348{font-size:11px}._helperText_compact_13l42_352{font-size:10px}._helperText_disabled_13l42_356{color:var(--content-disabled-default, #cbd5e1)}._helperText_inverted_13l42_360,._helperText_inverted_disabled_13l42_364{color:var(--Content-Neutral-Default-Default, #fafafa)}._errorMessage_13l42_369{font-family:Poppins Medium;color:#e74c3c;margin-top:2px;margin-left:4px}._errorMessage_default_13l42_376{font-size:12px}._errorMessage_compact_13l42_380{font-size:10px}._errorMessage_inverted_13l42_384{color:var(--Content-Negative-Default-Active, #f87171)!important}._selectedFilesContainer_13l42_389{margin-top:12px;padding:12px;border-radius:8px;background:var(--Fill-Neutral-Default-Default, #f8fafc);border:1px solid var(--Stroke-Neutral-Primary, #e2e8f0)}._selectedFilesHeader_13l42_397{display:flex;justify-content:space-between;align-items:center;margin-bottom:8px}._selectedFilesText_13l42_404{font-family:Poppins Medium;font-size:13px;color:var(--Content-Neutral-Default-Active, #475569)}._clearButton_13l42_410{font-family:Poppins Medium;font-size:12px;color:var(--Fill-Brand-Default-Active, #2054a5);background:transparent;border:none;cursor:pointer;text-decoration:underline;padding:0}._clearButton_13l42_410:hover{color:var(--Fill-Brand-Default-Hover, #1e40af)}._clearButton_13l42_410:disabled{color:var(--content-disabled-default, #cbd5e1);cursor:not-allowed;text-decoration:none}._filesList_13l42_431{display:flex;flex-direction:column;gap:4px}._fileItem_13l42_437{display:flex;justify-content:space-between;align-items:center;padding:4px 0;border-bottom:1px solid var(--Stroke-Neutral-Secondary, #e2e8f0)}._fileItem_13l42_437:last-child{border-bottom:none}._fileName_13l42_449{font-family:Poppins Regular;font-size:12px;color:var(--Content-Neutral-Default-Active, #475569);flex:1;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;margin-right:8px}._fileSize_13l42_460{font-family:Poppins Regular;font-size:11px;color:var(--Content-Neutral-Secondary, #64748b);flex-shrink:0}._inverted_13l42_150 ._selectedFilesContainer_13l42_389{background:#ffffff1a;border-color:var(--Stroke-Neutral-Secondary, #c9e1f6)}._inverted_13l42_150 ._selectedFilesText_13l42_404,._inverted_13l42_150 ._clearButton_13l42_410{color:#fff}._inverted_13l42_150 ._clearButton_13l42_410:hover{color:#fffc}._inverted_13l42_150 ._clearButton_13l42_410:disabled{color:var(--content-disabled-default, #4f88d9)}._inverted_13l42_150 ._fileItem_13l42_437{border-color:#fff3}._inverted_13l42_150 ._fileName_13l42_449{color:#ffffffe6}._inverted_13l42_150 ._fileSize_13l42_460{color:#ffffffb3}._bigZIndex_13l42_501{z-index:1000}._cancelIconWrapper_13l42_505{background:var(--Content-Negative-Default-Active, #dc2626);height:35px;width:35px;border-radius:1000px;position:absolute;top:18px;left:50%;transform:translate(-50%);z-index:200;display:flex;align-items:center;justify-content:center;animation:_fadeInSlideDown_13l42_1 .4s ease}._selectedFileInfo_13l42_521{display:flex;flex-direction:column;text-align:center;position:absolute;top:65px;left:50%;transform:translate(-50%);z-index:200;width:90%;opacity:0;animation:_fadeInSlideUp_13l42_1 .3s ease forwards}._successIconWrapper_13l42_535{background:var(--Content-Positive-Active, #65a30d);height:35px;width:35px;border-radius:1000px;position:absolute;top:18px;left:50%;transform:translate(-50%);z-index:200;display:flex;align-items:center;justify-content:center;animation:_fadeInSlideDown_13l42_1 .4s ease}._loadingIconWrapper_13l42_551{background:var(--Content-Brand-Default-Active, #2054a5);height:35px;width:35px;border-radius:1000px;position:absolute;top:18px;left:50%;transform:translate(-50%);z-index:200;display:flex;align-items:center;justify-content:center;animation:_fadeInSlideDown_13l42_1 .4s ease}._withoutError_13l42_198 ._selectedFileInfo_13l42_521{position:static;transform:none;opacity:0;animation:_fadeIn_13l42_1 .3s ease forwards}._withSuccess_13l42_575 ._selectedFileInfo_13l42_521,._withLoading_13l42_589 ._selectedFileInfo_13l42_521{display:flex;flex-direction:column;text-align:center;position:absolute;top:65px;left:50%;transform:translate(-50%);z-index:200;width:90%;opacity:0;animation:_fadeInSlideUp_13l42_1 .3s ease forwards}._errorText_13l42_603{position:absolute;top:89px;left:50%;transform:translate(-50%);z-index:200;width:90%;text-align:center;font-family:Poppins Medium;font-size:12px;color:var(--Content-Negative-Default-Active, #dc2626);margin:0;padding:0;animation:_fadeInSlideUp_13l42_1 .4s ease}._successText_13l42_619{position:absolute;top:89px;left:50%;transform:translate(-50%);z-index:200;width:90%;text-align:center;font-family:Poppins Medium;font-size:12px;color:var(--Content-Positive-Default-Active, #16a34a);margin:0;padding:0;animation:_fadeInSlideUp_13l42_1 .4s ease}@keyframes _fadeInSlideDown_13l42_1{0%{opacity:0;transform:translate(-50%) translateY(-10px)}to{opacity:1;transform:translate(-50%) translateY(0)}}@keyframes _fadeInSlideUp_13l42_1{0%{opacity:0;transform:translate(-50%) translateY(10px)}to{opacity:1;transform:translate(-50%) translateY(0)}}@keyframes _fadeInSlideUpCentered_13l42_1{0%{opacity:0;transform:translate(-50%) translateY(10px);left:50%}to{opacity:1;transform:translate(-50%) translateY(0);left:50%}}@keyframes _fadeIn_13l42_1{0%{opacity:0}to{opacity:1}}._inlineFileContainer_13l42_681{display:flex;align-items:center;gap:12px;width:100%;padding:0;animation:_fadeIn_13l42_1 .3s ease forwards}._inlineFileIcon_13l42_690{width:32px;height:32px;border-radius:50%;display:flex;align-items:center;justify-content:center;flex-shrink:0;background:var(--Fill-Brand-Default-Active, #2054a5)}._inlineFileIcon_13l42_690._error_13l42_124{background:var(--Content-Negative-Default-Active, #dc2626)}._inlineFileIcon_13l42_690._success_13l42_133{background:var(--Content-Positive-Active, #65a30d)}._inlineFileIcon_13l42_690._loading_13l42_141{background:var(--Content-Brand-Default-Active, #2054a5)}._inlineFileIcon_13l42_690._default_13l42_713{background:var(--Fill-Brand-Default-Active, #2054a5)}._inlineFileInfo_13l42_717{flex:1;display:flex;flex-direction:column;gap:2px;min-width:0}._inlineFileName_13l42_725{font-family:Poppins Medium;font-size:14px;color:var(--Content-Neutral-Default-Active, #475569);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}._inlineErrorText_13l42_734{font-family:Poppins Regular;font-size:12px;color:var(--Content-Negative-Default-Active, #dc2626)}._inlineSuccessText_13l42_740{font-family:Poppins Regular;font-size:12px;color:var(--Content-Positive-Default-Active, #16a34a)}._inlineFileActions_13l42_746{display:flex;align-items:center;gap:8px;flex-shrink:0}._inlineActionIcon_13l42_753{width:24px;height:24px;display:flex;align-items:center;justify-content:center;border-radius:4px;cursor:pointer;transition:background-color .2s ease}._inlineActionIcon_13l42_753:hover{background:var(--Fill-Neutral-Secondary, #f1f5f9)}
|
|
@@ -7,6 +7,7 @@ export interface CompactFileUploadProps {
|
|
|
7
7
|
required?: boolean;
|
|
8
8
|
error?: string;
|
|
9
9
|
success?: string;
|
|
10
|
+
warning?: string;
|
|
10
11
|
defaultFile?: File;
|
|
11
12
|
loading?: boolean;
|
|
12
13
|
disabled?: boolean;
|
|
@@ -16,7 +17,8 @@ export interface CompactFileUploadProps {
|
|
|
16
17
|
allowedTypes?: string[];
|
|
17
18
|
inspectFileFunction?: () => void;
|
|
18
19
|
maxFileSize?: number;
|
|
19
|
-
onFileSelect?: (files: FileList | null) => void
|
|
20
|
+
onFileSelect?: (files: FileList | null) => void | Promise<void>;
|
|
21
|
+
onDelete?: (files: FileList | null) => void | Promise<void>;
|
|
20
22
|
statusIconBorderRadius?: string;
|
|
21
23
|
fullWidth?: boolean;
|
|
22
24
|
}
|
|
@@ -1,159 +1,162 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import { useState as
|
|
3
|
-
import { Icon as
|
|
4
|
-
import { Spinner as
|
|
5
|
-
import
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
inverted:
|
|
18
|
-
uploadContent:
|
|
19
|
-
textContent:
|
|
20
|
-
dragText:
|
|
21
|
-
hiddenInput:
|
|
22
|
-
compactFileContent:
|
|
1
|
+
import { jsx as n, jsxs as u, Fragment as T } from "react/jsx-runtime";
|
|
2
|
+
import { useState as w, useRef as q, useEffect as H } from "react";
|
|
3
|
+
import { Icon as x } from "../../icons/Icon.js";
|
|
4
|
+
import { Spinner as G } from "../Spinner/Spinner.js";
|
|
5
|
+
import { Button as $ } from "../Button/Button.js";
|
|
6
|
+
import '../../assets/CompactFileUpload.css';const J = "_inputContainer_1dauy_1", K = "_compactFileUploadContainer_1dauy_9", P = "_fullWidth_1dauy_26", Q = "_dragOver_1dauy_35", X = "_variant_document_1dauy_41", Y = "_icon_1dauy_41", Z = "_variant_add_1dauy_45", tt = "_disabled_1dauy_50", at = "_error_1dauy_61", nt = "_warning_1dauy_69", et = "_inverted_1dauy_78", ct = "_uploadContent_1dauy_103", ot = "_textContent_1dauy_113", it = "_dragText_1dauy_123", lt = "_hiddenInput_1dauy_153", st = "_compactFileContent_1dauy_166", rt = "_compactFileIcon_1dauy_174", dt = "_compactIconBackground_1dauy_182", mt = "_compactFileText_1dauy_190", pt = "_compactLabel_1dauy_202", ut = "_compactFileName_1dauy_209", _t = "_compactStatusText_1dauy_210", ht = "_success_1dauy_221", ft = "_loading_1dauy_229", vt = "_addIconWrapper_1dauy_233", yt = "_browseText_1dauy_239", Ct = "_compactVisibilityIcon_1dauy_246", gt = "_compactActions_1dauy_255", xt = "_deleteText_1dauy_262", t = {
|
|
7
|
+
inputContainer: J,
|
|
8
|
+
compactFileUploadContainer: K,
|
|
9
|
+
fullWidth: P,
|
|
10
|
+
dragOver: Q,
|
|
11
|
+
variant_document: X,
|
|
12
|
+
icon: Y,
|
|
13
|
+
variant_add: Z,
|
|
14
|
+
disabled: tt,
|
|
15
|
+
error: at,
|
|
16
|
+
warning: nt,
|
|
17
|
+
inverted: et,
|
|
18
|
+
uploadContent: ct,
|
|
19
|
+
textContent: ot,
|
|
20
|
+
dragText: it,
|
|
21
|
+
hiddenInput: lt,
|
|
22
|
+
compactFileContent: st,
|
|
23
23
|
compactFileIcon: rt,
|
|
24
|
-
compactIconBackground:
|
|
25
|
-
compactErrorText: lt,
|
|
26
|
-
compactSuccessText: st,
|
|
27
|
-
compactLabel: dt,
|
|
24
|
+
compactIconBackground: dt,
|
|
28
25
|
compactFileText: mt,
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
26
|
+
compactLabel: pt,
|
|
27
|
+
compactFileName: ut,
|
|
28
|
+
compactStatusText: _t,
|
|
29
|
+
success: ht,
|
|
30
|
+
loading: ft,
|
|
31
|
+
addIconWrapper: vt,
|
|
32
|
+
browseText: yt,
|
|
33
|
+
compactVisibilityIcon: Ct,
|
|
34
|
+
compactActions: gt,
|
|
35
|
+
deleteText: xt
|
|
36
|
+
}, $t = ({
|
|
37
|
+
variant: k = "document",
|
|
38
|
+
label: f,
|
|
39
|
+
error: e,
|
|
40
|
+
success: c,
|
|
41
|
+
warning: _,
|
|
41
42
|
loading: o = !1,
|
|
42
|
-
defaultFile:
|
|
43
|
-
disabled:
|
|
43
|
+
defaultFile: I = null,
|
|
44
|
+
disabled: d = !1,
|
|
44
45
|
inverted: A = !1,
|
|
45
|
-
browseText:
|
|
46
|
-
allowedTypes:
|
|
47
|
-
inspectFileFunction:
|
|
46
|
+
browseText: D = "Seleccionar archivo",
|
|
47
|
+
allowedTypes: m,
|
|
48
|
+
inspectFileFunction: W = () => {
|
|
48
49
|
console.warn(
|
|
49
50
|
"No hay función asignada para ver el archivo. Hay que pasarla al componente como prop inspectFileFunction."
|
|
50
51
|
);
|
|
51
52
|
},
|
|
52
|
-
maxFileSize:
|
|
53
|
-
onFileSelect:
|
|
54
|
-
|
|
55
|
-
|
|
53
|
+
maxFileSize: F,
|
|
54
|
+
onFileSelect: v,
|
|
55
|
+
onDelete: y,
|
|
56
|
+
statusIconBorderRadius: S = "50%",
|
|
57
|
+
fullWidth: B = !1
|
|
56
58
|
}) => {
|
|
57
|
-
const [E,
|
|
58
|
-
|
|
59
|
-
), h =
|
|
60
|
-
|
|
59
|
+
const [E, C] = w(!1), [i, N] = w(
|
|
60
|
+
I || null
|
|
61
|
+
), h = q(null);
|
|
62
|
+
H(() => {
|
|
61
63
|
if (!i) return;
|
|
62
|
-
const
|
|
63
|
-
|
|
64
|
-
`⚠️ CompactFileUpload: Múltiples estados detectados (${
|
|
64
|
+
const a = [];
|
|
65
|
+
e && a.push("error"), c && a.push("success"), o && a.push("loading"), a.length > 1 && console.warn(
|
|
66
|
+
`⚠️ CompactFileUpload: Múltiples estados detectados (${a.join(", ")}). Solo un estado debe estar activo a la vez.`
|
|
65
67
|
);
|
|
66
|
-
}, [
|
|
67
|
-
const
|
|
68
|
-
|
|
69
|
-
},
|
|
70
|
-
|
|
71
|
-
},
|
|
72
|
-
|
|
73
|
-
},
|
|
74
|
-
if (
|
|
75
|
-
const
|
|
76
|
-
|
|
77
|
-
},
|
|
78
|
-
const
|
|
79
|
-
|
|
80
|
-
},
|
|
81
|
-
if (!
|
|
82
|
-
if (
|
|
83
|
-
for (let
|
|
84
|
-
const p =
|
|
85
|
-
if (!
|
|
86
|
-
(
|
|
68
|
+
}, [e, c, o, i]);
|
|
69
|
+
const L = (a) => {
|
|
70
|
+
a.preventDefault(), d || C(!0);
|
|
71
|
+
}, O = (a) => {
|
|
72
|
+
a.preventDefault(), C(!1);
|
|
73
|
+
}, j = (a) => {
|
|
74
|
+
a.preventDefault();
|
|
75
|
+
}, R = (a) => {
|
|
76
|
+
if (a.preventDefault(), C(!1), d) return;
|
|
77
|
+
const r = a.dataTransfer.files;
|
|
78
|
+
b(r);
|
|
79
|
+
}, U = async (a) => {
|
|
80
|
+
const r = a.target.files;
|
|
81
|
+
b(r);
|
|
82
|
+
}, b = async (a) => {
|
|
83
|
+
if (!a) return;
|
|
84
|
+
if (m && m.length > 0)
|
|
85
|
+
for (let l = 0; l < a.length; l++) {
|
|
86
|
+
const p = a[l];
|
|
87
|
+
if (!m.some(
|
|
88
|
+
(g) => g.startsWith(".") ? p.name.toLowerCase().endsWith(g.toLowerCase()) : p.type === g
|
|
87
89
|
)) {
|
|
88
90
|
console.warn(`File ${p.name} is not an allowed type`);
|
|
89
91
|
return;
|
|
90
92
|
}
|
|
91
93
|
}
|
|
92
|
-
if (
|
|
93
|
-
for (let
|
|
94
|
-
const p =
|
|
95
|
-
if (p.size >
|
|
94
|
+
if (F)
|
|
95
|
+
for (let l = 0; l < a.length; l++) {
|
|
96
|
+
const p = a[l];
|
|
97
|
+
if (p.size > F) {
|
|
96
98
|
console.warn(`File ${p.name} exceeds maximum size`);
|
|
97
99
|
return;
|
|
98
100
|
}
|
|
99
101
|
}
|
|
100
|
-
const
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
const
|
|
104
|
-
return
|
|
102
|
+
const r = a ? a[0] : null;
|
|
103
|
+
N(r), await (v == null ? void 0 : v(
|
|
104
|
+
r ? (() => {
|
|
105
|
+
const l = new DataTransfer();
|
|
106
|
+
return l.items.add(r), l.files;
|
|
105
107
|
})() : null
|
|
106
|
-
);
|
|
108
|
+
));
|
|
107
109
|
}, V = () => {
|
|
108
|
-
!
|
|
109
|
-
},
|
|
110
|
-
|
|
111
|
-
},
|
|
110
|
+
!d && h.current && h.current.click();
|
|
111
|
+
}, M = async () => {
|
|
112
|
+
await (y == null ? void 0 : y(null)), N(null), h.current && (h.current.value = "");
|
|
113
|
+
}, s = _ && !o && !c && !e, z = [
|
|
112
114
|
t.compactFileUploadContainer,
|
|
113
|
-
|
|
114
|
-
t[`variant_${
|
|
115
|
-
|
|
116
|
-
i &&
|
|
117
|
-
i && !
|
|
118
|
-
|
|
115
|
+
B && t.fullWidth,
|
|
116
|
+
t[`variant_${k}`],
|
|
117
|
+
s ? t.warning : "",
|
|
118
|
+
i && e ? t.error : "",
|
|
119
|
+
i && !e && o ? t.loading : "",
|
|
120
|
+
i && !e && !o && c ? t.success : "",
|
|
121
|
+
d ? t.disabled : "",
|
|
119
122
|
A ? t.inverted : "",
|
|
120
123
|
E ? t.dragOver : ""
|
|
121
124
|
].filter(Boolean).join(" ");
|
|
122
|
-
return /* @__PURE__ */
|
|
125
|
+
return /* @__PURE__ */ n("div", { className: t.inputContainer, children: /* @__PURE__ */ u(
|
|
123
126
|
"div",
|
|
124
127
|
{
|
|
125
|
-
className:
|
|
126
|
-
onDragEnter:
|
|
127
|
-
onDragLeave:
|
|
128
|
-
onDragOver:
|
|
129
|
-
onDrop:
|
|
128
|
+
className: z,
|
|
129
|
+
onDragEnter: L,
|
|
130
|
+
onDragLeave: O,
|
|
131
|
+
onDragOver: j,
|
|
132
|
+
onDrop: R,
|
|
130
133
|
onClick: i ? () => {
|
|
131
134
|
} : V,
|
|
132
|
-
style: { cursor:
|
|
135
|
+
style: { cursor: d ? "not-allowed" : "pointer" },
|
|
133
136
|
children: [
|
|
134
|
-
/* @__PURE__ */
|
|
137
|
+
/* @__PURE__ */ n(
|
|
135
138
|
"input",
|
|
136
139
|
{
|
|
137
140
|
ref: h,
|
|
138
141
|
type: "file",
|
|
139
142
|
className: t.hiddenInput,
|
|
140
|
-
onChange:
|
|
141
|
-
disabled:
|
|
142
|
-
accept:
|
|
143
|
+
onChange: U,
|
|
144
|
+
disabled: d,
|
|
145
|
+
accept: m == null ? void 0 : m.join(",")
|
|
143
146
|
}
|
|
144
147
|
),
|
|
145
|
-
/* @__PURE__ */
|
|
148
|
+
/* @__PURE__ */ n("div", { className: t.uploadContent, children: i || s ? (
|
|
146
149
|
// Compact layout - simple text with left icon
|
|
147
|
-
/* @__PURE__ */
|
|
148
|
-
/* @__PURE__ */
|
|
150
|
+
/* @__PURE__ */ u("div", { className: t.compactFileContent, children: [
|
|
151
|
+
/* @__PURE__ */ n("div", { className: t.compactFileIcon, children: /* @__PURE__ */ n(
|
|
149
152
|
"div",
|
|
150
153
|
{
|
|
151
154
|
className: t.compactIconBackground,
|
|
152
155
|
style: {
|
|
153
|
-
background:
|
|
154
|
-
borderRadius:
|
|
156
|
+
background: e ? "#DC2626" : o ? "#2054A5" : c ? "#65A30D" : _ ? "#EA580C" : "#2054A5",
|
|
157
|
+
borderRadius: S
|
|
155
158
|
},
|
|
156
|
-
children: o ? /* @__PURE__ */
|
|
159
|
+
children: o ? /* @__PURE__ */ n(
|
|
157
160
|
"div",
|
|
158
161
|
{
|
|
159
162
|
style: {
|
|
@@ -162,8 +165,8 @@ import '../../assets/CompactFileUpload.css';const q = "_inputContainer_10r2r_1",
|
|
|
162
165
|
alignItems: "center",
|
|
163
166
|
margin: "4px"
|
|
164
167
|
},
|
|
165
|
-
children: /* @__PURE__ */
|
|
166
|
-
|
|
168
|
+
children: /* @__PURE__ */ n(
|
|
169
|
+
G,
|
|
167
170
|
{
|
|
168
171
|
size: 10,
|
|
169
172
|
color: "primary",
|
|
@@ -173,7 +176,7 @@ import '../../assets/CompactFileUpload.css';const q = "_inputContainer_10r2r_1",
|
|
|
173
176
|
}
|
|
174
177
|
)
|
|
175
178
|
}
|
|
176
|
-
) : /* @__PURE__ */
|
|
179
|
+
) : /* @__PURE__ */ n(
|
|
177
180
|
"div",
|
|
178
181
|
{
|
|
179
182
|
style: {
|
|
@@ -181,33 +184,50 @@ import '../../assets/CompactFileUpload.css';const q = "_inputContainer_10r2r_1",
|
|
|
181
184
|
justifyContent: "center",
|
|
182
185
|
alignItems: "center"
|
|
183
186
|
},
|
|
184
|
-
children: /* @__PURE__ */
|
|
185
|
-
|
|
187
|
+
children: /* @__PURE__ */ n(
|
|
188
|
+
x,
|
|
186
189
|
{
|
|
187
|
-
name:
|
|
190
|
+
name: e ? "CancelIcon" : c ? "CheckIcon" : _ ? "AlertIcon" : "Documentos",
|
|
188
191
|
fill: "white",
|
|
189
|
-
height:
|
|
190
|
-
width:
|
|
192
|
+
height: 20,
|
|
193
|
+
width: 20
|
|
191
194
|
}
|
|
192
195
|
)
|
|
193
196
|
}
|
|
194
197
|
)
|
|
195
198
|
}
|
|
196
199
|
) }),
|
|
197
|
-
/* @__PURE__ */
|
|
198
|
-
!
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
200
|
+
/* @__PURE__ */ u("div", { className: t.compactFileText, children: [
|
|
201
|
+
!e && !o && !c && !s && /* @__PURE__ */ u(T, { children: [
|
|
202
|
+
f && /* @__PURE__ */ n("span", { className: `small1Medium ${t.compactLabel}`, children: f }),
|
|
203
|
+
/* @__PURE__ */ n("span", { className: `small3Regular ${t.compactFileName}`, children: i == null ? void 0 : i.name })
|
|
204
|
+
] }),
|
|
205
|
+
(e || _ || o || c) && /* @__PURE__ */ n(
|
|
206
|
+
"span",
|
|
207
|
+
{
|
|
208
|
+
className: `
|
|
209
|
+
small1Medium
|
|
210
|
+
${t.compactFileName}
|
|
211
|
+
${e && t.error}
|
|
212
|
+
${c && t.success}
|
|
213
|
+
${s && t.warning}
|
|
214
|
+
${o && t.loading}
|
|
215
|
+
`,
|
|
216
|
+
children: s ? f : i == null ? void 0 : i.name
|
|
217
|
+
}
|
|
218
|
+
),
|
|
219
|
+
e && /* @__PURE__ */ n("span", { className: `small3Regular ${t.compactStatusText}`, children: e }),
|
|
220
|
+
s && /* @__PURE__ */ n("span", { className: `small3Regular ${t.compactStatusText}`, children: _ }),
|
|
221
|
+
c && !o && /* @__PURE__ */ n("span", { className: `small3Regular ${t.compactStatusText}`, children: c })
|
|
202
222
|
] }),
|
|
203
|
-
/* @__PURE__ */
|
|
204
|
-
!
|
|
223
|
+
/* @__PURE__ */ u("div", { className: t.compactActions, children: [
|
|
224
|
+
!e && !o && !c && !s && /* @__PURE__ */ n(
|
|
205
225
|
"div",
|
|
206
226
|
{
|
|
207
227
|
className: t.compactVisibilityIcon,
|
|
208
|
-
onClick:
|
|
209
|
-
children: /* @__PURE__ */
|
|
210
|
-
|
|
228
|
+
onClick: W,
|
|
229
|
+
children: /* @__PURE__ */ n(
|
|
230
|
+
x,
|
|
211
231
|
{
|
|
212
232
|
name: "Visibility",
|
|
213
233
|
fill: "#2054A5",
|
|
@@ -217,61 +237,48 @@ import '../../assets/CompactFileUpload.css';const q = "_inputContainer_10r2r_1",
|
|
|
217
237
|
)
|
|
218
238
|
}
|
|
219
239
|
),
|
|
220
|
-
(
|
|
221
|
-
|
|
240
|
+
(e || c || o) && /* @__PURE__ */ n(
|
|
241
|
+
$,
|
|
222
242
|
{
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
}
|
|
242
|
-
),
|
|
243
|
-
/* @__PURE__ */ e(
|
|
244
|
-
"span",
|
|
245
|
-
{
|
|
246
|
-
style: {
|
|
247
|
-
transform: "translateY(1px)"
|
|
248
|
-
},
|
|
249
|
-
className: t.deleteText,
|
|
250
|
-
children: "Cancelar"
|
|
251
|
-
}
|
|
252
|
-
)
|
|
253
|
-
] }) : null
|
|
243
|
+
variant: c ? "ghost" : "outline",
|
|
244
|
+
icon: {
|
|
245
|
+
name: "CancelIcon",
|
|
246
|
+
position: "before"
|
|
247
|
+
},
|
|
248
|
+
onClick: M,
|
|
249
|
+
children: e ? "Eliminar" : o ? "Cancelar" : ""
|
|
250
|
+
}
|
|
251
|
+
),
|
|
252
|
+
s && /* @__PURE__ */ n(
|
|
253
|
+
$,
|
|
254
|
+
{
|
|
255
|
+
variant: "outline",
|
|
256
|
+
icon: {
|
|
257
|
+
name: "Upload",
|
|
258
|
+
position: "before"
|
|
259
|
+
},
|
|
260
|
+
children: "Subir doc"
|
|
254
261
|
}
|
|
255
262
|
)
|
|
256
263
|
] })
|
|
257
264
|
] })
|
|
258
|
-
) : /* @__PURE__ */
|
|
259
|
-
/* @__PURE__ */
|
|
265
|
+
) : /* @__PURE__ */ n(T, { children: /* @__PURE__ */ u("div", { className: t.textContent, children: [
|
|
266
|
+
/* @__PURE__ */ n(
|
|
260
267
|
"div",
|
|
261
268
|
{
|
|
262
269
|
className: t.addIconWrapper,
|
|
263
270
|
style: {
|
|
264
271
|
background: "#2054A5"
|
|
265
272
|
},
|
|
266
|
-
children: /* @__PURE__ */
|
|
273
|
+
children: /* @__PURE__ */ n("div", { style: { marginTop: "3px" }, children: /* @__PURE__ */ n(x, { name: "Add", fill: "white", height: 27, width: 27 }) })
|
|
267
274
|
}
|
|
268
275
|
),
|
|
269
|
-
/* @__PURE__ */
|
|
276
|
+
/* @__PURE__ */ n("span", { className: `small1Medium ${t.browseText}`, children: D })
|
|
270
277
|
] }) }) })
|
|
271
278
|
]
|
|
272
279
|
}
|
|
273
280
|
) });
|
|
274
281
|
};
|
|
275
282
|
export {
|
|
276
|
-
|
|
283
|
+
$t as CompactFileUpload
|
|
277
284
|
};
|