bmi-next-brokers 1.2.3 → 1.2.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/assets/CompactFileUpload.css +1 -1
- package/dist/assets/Select.css +1 -1
- package/dist/components/FileUpload/CompactFileUpload.d.ts +0 -1
- package/dist/components/FileUpload/CompactFileUpload.js +180 -143
- package/dist/components/Input/RadioButton/RadioButton.js +17 -7
- package/dist/components/Select/Select.js +90 -92
- package/dist/icons/Icon.js +1 -1
- package/dist/icons/components/AmericanExpress.d.ts +3 -0
- package/dist/icons/components/AmericanExpress.js +11 -0
- package/dist/icons/components/AmericanExpressRounded.d.ts +3 -0
- package/dist/icons/components/AmericanExpressRounded.js +12 -0
- package/dist/icons/components/Checkbook.d.ts +3 -0
- package/dist/icons/components/Checkbook.js +22 -0
- package/dist/icons/components/Diners.d.ts +3 -0
- package/dist/icons/components/Diners.js +11 -0
- package/dist/icons/components/DinersRounded.d.ts +3 -0
- package/dist/icons/components/DinersRounded.js +12 -0
- package/dist/icons/components/Discover.d.ts +3 -0
- package/dist/icons/components/Discover.js +11 -0
- package/dist/icons/components/DiscoverRounded.d.ts +3 -0
- package/dist/icons/components/DiscoverRounded.js +12 -0
- package/dist/icons/components/FallbackCardRounded.d.ts +3 -0
- package/dist/icons/components/FallbackCardRounded.js +9 -0
- package/dist/icons/components/Mastercard.d.ts +3 -0
- package/dist/icons/components/Mastercard.js +9 -0
- package/dist/icons/components/MastercardRounded.d.ts +3 -0
- package/dist/icons/components/MastercardRounded.js +10 -0
- package/dist/icons/components/Visa.d.ts +3 -0
- package/dist/icons/components/Visa.js +5 -0
- package/dist/icons/components/VisaRounded.d.ts +3 -0
- package/dist/icons/components/VisaRounded.js +8 -0
- package/dist/icons/components/index.d.ts +12 -0
- package/dist/icons/components/index.js +202 -178
- package/dist/icons/index.d.ts +12 -0
- package/dist/icons/index.js +236 -212
- package/dist/index-cO2IT2I5.js +246 -0
- package/package.json +1 -1
- package/dist/index-9HOVLbts.js +0 -222
|
@@ -1 +1 @@
|
|
|
1
|
-
.
|
|
1
|
+
._inputContainer_84wrd_1{display:flex;flex-direction:column;gap:4px;width:100%;min-width:0}._compactFileUploadContainer_84wrd_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_84wrd_9._fullWidth_84wrd_26{max-width:100%}._compactFileUploadContainer_84wrd_9:hover{font-weight:600;background-color:var(--Fill-Info-Inverted-Hover, #e0e9f8)}._compactFileUploadContainer_84wrd_9._dragOver_84wrd_35{border-color:var(--Fill-Brand-Default-Active, #2054a5);background:var(--Fill-Brand-Default-Hover, #eef3fc)}._variant_document_84wrd_41 ._icon_84wrd_41{color:var(--Content-Neutral-Primary, #475569)}._variant_add_84wrd_45 ._icon_84wrd_41{color:var(--Fill-Brand-Default-Active, #2054a5)}._compactFileUploadContainer_84wrd_9._disabled_84wrd_50{border-color:var(--Stroke-Disabled-Default, #cbd5e1);background:var(--Fill-Disabled-Default, #f8fafc);cursor:not-allowed}._compactFileUploadContainer_84wrd_9._disabled_84wrd_50:hover{border-color:var(--Stroke-Disabled-Default, #cbd5e1);background:var(--Fill-Disabled-Default, #f8fafc)}._compactFileUploadContainer_84wrd_9._error_84wrd_61{background-color:#fef2f2}._compactFileUploadContainer_84wrd_9._error_84wrd_61:hover{background-color:var(--Fill-Negative-Default-Hover, #fecaca)}._compactFileUploadContainer_84wrd_9._warning_84wrd_69{background-color:#ffedd5}._compactFileUploadContainer_84wrd_9._warning_84wrd_69:hover{background-color:var(--Fill-Warning-Default-Hover, #fecaca)}._compactFileUploadContainer_84wrd_9._inverted_84wrd_78{border-color:var(--Stroke-Neutral-Secondary, #c9e1f6);background:transparent}._compactFileUploadContainer_84wrd_9._inverted_84wrd_78:hover{border-color:var(--Stroke-Neutral-Primary, #e0e9f8);background:#ffffff1a}._compactFileUploadContainer_84wrd_9._inverted_84wrd_78._dragOver_84wrd_35{border-color:var(--Fill-Brand-Inverted-Active, #fff);background:#fff3}._compactFileUploadContainer_84wrd_9._inverted_84wrd_78._disabled_84wrd_50{border-color:var(--Stroke-Disabled-Default, #1b468a);background:transparent}._compactFileUploadContainer_84wrd_9._inverted_84wrd_78._error_84wrd_61{background:transparent}._uploadContent_84wrd_103{display:flex;padding:12px;gap:8px;z-index:100;height:100%;position:relative;transition:background-color .3s ease-in-out}._textContent_84wrd_113{text-align:center;display:flex;flex-direction:row;gap:8px;align-items:center;height:100%;min-width:0}._dragText_84wrd_123{font-family:Poppins Bold;font-size:12px;color:var(--Content-Brand-Default-Active, #2054a5)}._disabled_84wrd_50 ._dragText_84wrd_123{color:var(--content-disabled-default, #cbd5e1)}._inverted_84wrd_78 ._dragText_84wrd_123{color:#fffc}._inverted_84wrd_78._disabled_84wrd_50 ._dragText_84wrd_123{color:var(--content-disabled-default, #4f88d9)}._inverted_84wrd_78 ._variant_document_84wrd_41 ._icon_84wrd_41,._inverted_84wrd_78 ._variant_add_84wrd_45 ._icon_84wrd_41{color:#fff}._inverted_84wrd_78._disabled_84wrd_50 ._icon_84wrd_41{color:var(--content-disabled-default, #4f88d9)}._hiddenInput_84wrd_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_84wrd_166{display:flex;align-items:center;gap:12px;width:100%;height:100%}._compactFileIcon_84wrd_174{flex-shrink:0;display:flex;align-items:center;justify-content:center;margin-top:0}._compactIconBackground_84wrd_182{display:flex;align-items:center;justify-content:center;padding:6px}._compactFileContent_84wrd_166,._compactFileText_84wrd_190{justify-content:center}._compactFileText_84wrd_190{flex:1;display:flex;flex-direction:column;gap:2px;min-width:0}._compactLabel_84wrd_202{color:#2054a5;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}._compactFileName_84wrd_209,._compactStatusText_84wrd_210{color:#525252;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}._compactFileName_84wrd_209._error_84wrd_61{color:#dc2626}._compactFileName_84wrd_209._success_84wrd_221{color:#65a30d}._compactFileName_84wrd_209._warning_84wrd_69{color:#ea580c}._compactFileName_84wrd_209._loading_84wrd_229{color:#2054a5}._addIconWrapper_84wrd_233{border-radius:1000px;height:34px;width:34px}._browseText_84wrd_239{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:#2054a5}._compactVisibilityIcon_84wrd_246{flex-shrink:0;display:flex;align-items:center;justify-content:center;cursor:pointer;transition:background-color .2s ease}._compactActions_84wrd_255{display:flex;align-items:center;gap:8px;flex-shrink:0}._deleteText_84wrd_262{font-family:Poppins Regular;font-size:12px;color:var(--Content-Brand-Default-Active, #2054a5);white-space:nowrap}
|
package/dist/assets/Select.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
.
|
|
1
|
+
._selectContainer_o3e7b_1{display:flex;flex-direction:column;gap:4px}._label_o3e7b_7{font-family:Poppins Regular;font-size:13px;color:var(--Content-Neutral-Default-Active, #000);font-weight:500;padding-left:4px}._label_large_o3e7b_15{font-size:15px;margin-bottom:6px}._label_disabled_o3e7b_20{color:var(--content-disabled-default, #cbd5e1)}._selectWrapper_o3e7b_24{position:relative;display:flex;align-items:center}._select_o3e7b_1{border:1px solid #ddd;border-radius:16px;font-family:Poppins Regular;font-weight:100;outline:none;transition:all .2s ease;width:100%;background-color:#fff;cursor:pointer;display:flex;align-items:center;justify-content:space-between;padding-right:12px}._select_o3e7b_1:hover{border:1px solid var(--Stroke-Neutral-Primary, #94a3b8)}._select_o3e7b_1:focus{box-shadow:0 0 0 3px var(--ui-blue-400, #7eaae6)}._select_o3e7b_1:active{border:1px solid var(--Stroke-Neutral-Primary, #94a3b8);box-shadow:0 0 0 3px var(--ui-blue-400, #7eaae6)}._select_o3e7b_1._open_o3e7b_59{box-shadow:0 0 0 3px var(--ui-blue-400, #7eaae6)}._select_o3e7b_1._disabled_o3e7b_63{border-radius:16px;border:1px solid var(--Stroke-Disabled-Default, #cbd5e1);background:var(--Fill-Disabled-Default, #f8fafc);color:var(--content-disabled-default, #cbd5e1);cursor:not-allowed}._select_o3e7b_1._disabled_o3e7b_63 ._placeholder_o3e7b_71{color:var(--content-disabled-default, #cbd5e1)}._selectValue_o3e7b_75{flex:1;text-align:left}._placeholder_o3e7b_71{color:var(--Content-Neutral-Default-Default, #a3a3a3)}._chevron_o3e7b_84{transition:transform .2s ease;color:var(--Content-Neutral-Default, #475569)}._chevronOpen_o3e7b_89{transform:rotate(180deg)}._small_o3e7b_94{padding:8px 11px;font-size:12px}._medium_o3e7b_99{padding:8px 10px;font-size:14px}._large_o3e7b_104{padding:11px 12px;font-size:15px}._error_o3e7b_110{border:1px solid var(--Stroke-Negative-Active, #dc2626);background:var(--Fill-Neutral-Primary, #fff);color:var(--Content-Negative-Default-Active, #dc2626);animation:_errorShake_o3e7b_1 .4s ease-in-out}._error_o3e7b_110 ._placeholder_o3e7b_71{color:var(--Content-Negative-Default-Active, #dc2626)}._error_o3e7b_110:hover{border:1px solid var(--Stroke-Negative-Active, #dc2626)}._error_o3e7b_110:active{border:1px solid transparent;box-shadow:0 0 0 3px var(--ui-red-400, #f87171)}._error_o3e7b_110:focus{border:1px solid transparent;box-shadow:0 0 0 3px var(--ui-red-400, #f87171)}._error_o3e7b_110._open_o3e7b_59{border:1px solid transparent;box-shadow:0 0 0 3px var(--ui-red-400, #f87171)}._errorMessage_o3e7b_140{font-family:Poppins Medium;color:#e74c3c;margin-top:2px;margin-left:4px;animation:_errorMessageSlide_o3e7b_1 .3s ease-out;transform-origin:top}._errorMessage_small_o3e7b_149{font-size:10px}._errorMessage_medium_o3e7b_153{font-size:12px}._errorMessage_large_o3e7b_157{font-size:14px}._errorMessage_inverted_o3e7b_161{color:var(--Content-Negative-Default-Active, #f87171)!important}._helperText_o3e7b_165{font-family:Poppins Regular;color:#acacac;margin-top:2px;margin-left:4px}._helperText_small_o3e7b_172,._helperText_medium_o3e7b_176{font-size:11px}._helperText_large_o3e7b_180{font-size:13px;margin-top:7px}._helperText_disabled_o3e7b_185{color:var(--content-disabled-default, #cbd5e1)}._iconLabel_o3e7b_189{display:flex;justify-content:center;align-items:center;gap:6px}._icon_o3e7b_189{color:var(--Content-Neutral-Default, #475569);pointer-events:none;display:flex;align-items:center;justify-content:center}._icon_disabled_o3e7b_205{color:var(--Content-Neutral-Disabled, #94a3b8)}._required_o3e7b_210{color:var(--Content-Negative-Default-Active, #dc2626);margin-left:2px}._required_inverted_o3e7b_215{color:var(--Content-Negative-Default-Active, #f87171)}._required_disabled_o3e7b_219{color:var(--content-disabled-default, #cbd5e1)}._required_inverted_disabled_o3e7b_223{color:var(--content-disabled-default, #4f88d9)}._dropdown_o3e7b_228{position:absolute;top:100%;left:0;right:0;z-index:1000;background:#fff;border:1px solid var(--Stroke-Neutral-Primary, #94a3b8);border-radius:16px;margin-top:10px;max-height:200px;overflow-y:auto}._option_o3e7b_242{padding:8px 12px;border-bottom:1px solid var(--Stroke-Neutral-Primary, #94a3b8);cursor:pointer;font-family:Poppins Regular;font-size:inherit;display:flex;align-items:center;gap:8px;transition:background-color .2s ease}._option_o3e7b_242:last-child{border-bottom:none}._dropdown_o3e7b_228 ._option_o3e7b_242{font-size:14px;padding:8px 12px}._small_o3e7b_94+._dropdown_o3e7b_228 ._option_o3e7b_242{font-size:12px;padding:8px 11px 8px 14px}._medium_o3e7b_99+._dropdown_o3e7b_228 ._option_o3e7b_242{font-size:14px;padding:8px 12px}._large_o3e7b_104+._dropdown_o3e7b_228 ._option_o3e7b_242{font-size:15px;padding:11px 12px}._option_o3e7b_242:hover{background-color:#f8f9fa}._option_o3e7b_242:first-child{border-top-left-radius:16px;border-top-right-radius:16px}._option_o3e7b_242:last-child{border-bottom-left-radius:16px;border-bottom-right-radius:16px}._optionSelected_o3e7b_295{background-color:var(--Fill-Brand-Inverted-Hover, #eef3fc);color:var(--Content-Brand-Inverted-Active, #2054a5)}._optionIcon_o3e7b_300{display:flex;align-items:center;justify-content:center}._inverted_o3e7b_307{border:1px solid var(--Stroke-Neutral-Secondary, #c9e1f6);background-color:transparent!important;color:#fff!important}._inverted_o3e7b_307:hover{border:1px solid white!important}._inverted_o3e7b_307._open_o3e7b_59{box-shadow:0 0 0 3px #ffffff4d!important}._inverted_o3e7b_307 ._placeholder_o3e7b_71{color:#ffffffb3!important}._inverted_o3e7b_307 ._chevron_o3e7b_84,._label_inverted_o3e7b_329{color:#fff!important}._helperText_inverted_o3e7b_333{color:var(--Content-Neutral-Default-Default, #fafafa)}._icon_inverted_o3e7b_337{color:#fff!important}._dropdown_inverted_o3e7b_341{background:var(--Fill-Brand-Default-Active, #2054a5);border:1px solid var(--Stroke-Neutral-Primary, #e0e9f8)}._option_inverted_o3e7b_346{color:#fff!important;border-bottom-color:1px solid var(--Stroke-Neutral-Primary, #e0e9f8)}._option_inverted_o3e7b_346:hover{background-color:#ffffff1a!important}._option_inverted_o3e7b_346._optionSelected_o3e7b_295{background-color:#ffffff26!important;color:#fff!important}._inverted_o3e7b_307._error_o3e7b_110{border:1px solid var(--Stroke-Negative-Active, #ef4444)!important;color:var(--Content-Negative-Default-Active, #f87171)!important}._inverted_o3e7b_307._error_o3e7b_110 ._placeholder_o3e7b_71{color:var(--Content-Negative-Default-Active, #f87171)!important}._inverted_o3e7b_307._error_o3e7b_110:hover{border:1px solid var(--Stroke-Negative-Active, #ef4444)!important}._inverted_o3e7b_307._error_o3e7b_110:active{border:1px solid transparent!important;box-shadow:0 0 0 3px var(--ui-red-400, #f87171)!important}._inverted_o3e7b_307._error_o3e7b_110:focus{border:1px solid transparent!important;box-shadow:0 0 0 3px var(--ui-red-400, #f87171)!important}._inverted_o3e7b_307._error_o3e7b_110._open_o3e7b_59{border:1px solid transparent!important;box-shadow:0 0 0 3px var(--ui-red-400, #f87171)!important}@keyframes _errorShake_o3e7b_1{0%,to{transform:translate(0)}10%,30%,50%,70%,90%{transform:translate(-2px)}20%,40%,60%,80%{transform:translate(2px)}}@keyframes _errorMessageSlide_o3e7b_1{0%{opacity:0;transform:translateY(-5px) scaleY(0)}50%{opacity:.8;transform:translateY(-2px) scaleY(.7)}to{opacity:1;transform:translateY(0) scaleY(1)}}._inverted_o3e7b_307._disabled_o3e7b_63{border:1px solid var(--Stroke-Disabled-Default, #1b468a)!important;background-color:transparent!important;color:var(--content-disabled-default, #4f88d9)!important;cursor:not-allowed}._inverted_o3e7b_307._disabled_o3e7b_63 ._placeholder_o3e7b_71{color:var(--content-disabled-default, #4f88d9)!important}._label_inverted_disabled_o3e7b_437{color:var(--Content-Neutral-Default-Active, #fff)}._helperText_inverted_disabled_o3e7b_441{color:var(--Content-Neutral-Default-Default, #fafafa)}._icon_inverted_disabled_o3e7b_445,._inverted_o3e7b_307._disabled_o3e7b_63 ._chevron_o3e7b_84{color:var(--content-disabled-default, #4f88d9)!important}._inverted_o3e7b_307._disabled_o3e7b_63:focus,._inverted_o3e7b_307._disabled_o3e7b_63:active,._inverted_o3e7b_307._disabled_o3e7b_63._open_o3e7b_59{box-shadow:none!important}._inverted_o3e7b_307._disabled_o3e7b_63._error_o3e7b_110{border:1px solid var(--Stroke-Negative-Active, #ef4444)!important;color:var(--Content-Negative-Default-Active, #f87171)!important}._inverted_o3e7b_307._disabled_o3e7b_63._error_o3e7b_110:focus,._inverted_o3e7b_307._disabled_o3e7b_63._error_o3e7b_110:active,._inverted_o3e7b_307._disabled_o3e7b_63._error_o3e7b_110._open_o3e7b_59{box-shadow:0 0 0 3px var(--ui-red-400, #f87171)!important}._inverted_o3e7b_307._disabled_o3e7b_63._error_o3e7b_110 ._placeholder_o3e7b_71{color:var(--Content-Negative-Default-Active, #f87171)!important}
|
|
@@ -18,7 +18,6 @@ export interface CompactFileUploadProps {
|
|
|
18
18
|
inspectFileFunction?: () => void;
|
|
19
19
|
maxFileSize?: number;
|
|
20
20
|
onFileSelect?: (files: FileList | null) => void | Promise<void>;
|
|
21
|
-
onDelete?: (files: FileList | null) => void | Promise<void>;
|
|
22
21
|
statusIconBorderRadius?: string;
|
|
23
22
|
fullWidth?: boolean;
|
|
24
23
|
}
|
|
@@ -1,160 +1,159 @@
|
|
|
1
|
-
import { jsx as n, jsxs as
|
|
2
|
-
import { useState as
|
|
3
|
-
import { Icon as
|
|
4
|
-
import { Spinner as
|
|
5
|
-
import { Button as
|
|
6
|
-
import '../../assets/CompactFileUpload.css';const J = "
|
|
7
|
-
inputContainer:
|
|
8
|
-
compactFileUploadContainer:
|
|
9
|
-
fullWidth:
|
|
10
|
-
dragOver:
|
|
11
|
-
variant_document:
|
|
12
|
-
icon:
|
|
13
|
-
variant_add:
|
|
14
|
-
disabled:
|
|
15
|
-
error:
|
|
16
|
-
warning:
|
|
17
|
-
inverted:
|
|
18
|
-
uploadContent:
|
|
19
|
-
textContent:
|
|
20
|
-
dragText:
|
|
21
|
-
hiddenInput:
|
|
22
|
-
compactFileContent:
|
|
1
|
+
import { jsx as n, jsxs as l, Fragment as y } from "react/jsx-runtime";
|
|
2
|
+
import { useState as b, useRef as S, useEffect as z } from "react";
|
|
3
|
+
import { Icon as u } from "../../icons/Icon.js";
|
|
4
|
+
import { Spinner as q } from "../Spinner/Spinner.js";
|
|
5
|
+
import { Button as T } from "../Button/Button.js";
|
|
6
|
+
import '../../assets/CompactFileUpload.css';const H = "_inputContainer_84wrd_1", G = "_compactFileUploadContainer_84wrd_9", J = "_fullWidth_84wrd_26", K = "_dragOver_84wrd_35", P = "_variant_document_84wrd_41", Q = "_icon_84wrd_41", X = "_variant_add_84wrd_45", Y = "_disabled_84wrd_50", Z = "_error_84wrd_61", tt = "_warning_84wrd_69", nt = "_inverted_84wrd_78", et = "_uploadContent_84wrd_103", at = "_textContent_84wrd_113", ct = "_dragText_84wrd_123", ot = "_hiddenInput_84wrd_153", it = "_compactFileContent_84wrd_166", rt = "_compactFileIcon_84wrd_174", lt = "_compactIconBackground_84wrd_182", st = "_compactFileText_84wrd_190", dt = "_compactLabel_84wrd_202", mt = "_compactFileName_84wrd_209", pt = "_compactStatusText_84wrd_210", _t = "_success_84wrd_221", ht = "_loading_84wrd_229", ut = "_addIconWrapper_84wrd_233", ft = "_browseText_84wrd_239", vt = "_compactVisibilityIcon_84wrd_246", wt = "_compactActions_84wrd_255", Ct = "_deleteText_84wrd_262", t = {
|
|
7
|
+
inputContainer: H,
|
|
8
|
+
compactFileUploadContainer: G,
|
|
9
|
+
fullWidth: J,
|
|
10
|
+
dragOver: K,
|
|
11
|
+
variant_document: P,
|
|
12
|
+
icon: Q,
|
|
13
|
+
variant_add: X,
|
|
14
|
+
disabled: Y,
|
|
15
|
+
error: Z,
|
|
16
|
+
warning: tt,
|
|
17
|
+
inverted: nt,
|
|
18
|
+
uploadContent: et,
|
|
19
|
+
textContent: at,
|
|
20
|
+
dragText: ct,
|
|
21
|
+
hiddenInput: ot,
|
|
22
|
+
compactFileContent: it,
|
|
23
23
|
compactFileIcon: rt,
|
|
24
|
-
compactIconBackground:
|
|
25
|
-
compactFileText:
|
|
26
|
-
compactLabel:
|
|
27
|
-
compactFileName:
|
|
28
|
-
compactStatusText:
|
|
29
|
-
success:
|
|
30
|
-
loading:
|
|
31
|
-
addIconWrapper:
|
|
32
|
-
browseText:
|
|
33
|
-
compactVisibilityIcon:
|
|
34
|
-
compactActions:
|
|
35
|
-
deleteText:
|
|
36
|
-
},
|
|
37
|
-
variant:
|
|
24
|
+
compactIconBackground: lt,
|
|
25
|
+
compactFileText: st,
|
|
26
|
+
compactLabel: dt,
|
|
27
|
+
compactFileName: mt,
|
|
28
|
+
compactStatusText: pt,
|
|
29
|
+
success: _t,
|
|
30
|
+
loading: ht,
|
|
31
|
+
addIconWrapper: ut,
|
|
32
|
+
browseText: ft,
|
|
33
|
+
compactVisibilityIcon: vt,
|
|
34
|
+
compactActions: wt,
|
|
35
|
+
deleteText: Ct
|
|
36
|
+
}, bt = ({
|
|
37
|
+
variant: D = "document",
|
|
38
38
|
label: f,
|
|
39
|
-
error:
|
|
40
|
-
success:
|
|
41
|
-
warning:
|
|
39
|
+
error: a,
|
|
40
|
+
success: c,
|
|
41
|
+
warning: v,
|
|
42
42
|
loading: o = !1,
|
|
43
|
-
defaultFile:
|
|
43
|
+
defaultFile: g = null,
|
|
44
44
|
disabled: d = !1,
|
|
45
|
-
inverted:
|
|
46
|
-
browseText:
|
|
45
|
+
inverted: k = !1,
|
|
46
|
+
browseText: $ = "Seleccionar archivo",
|
|
47
47
|
allowedTypes: m,
|
|
48
|
-
inspectFileFunction:
|
|
48
|
+
inspectFileFunction: A = () => {
|
|
49
49
|
console.warn(
|
|
50
50
|
"No hay función asignada para ver el archivo. Hay que pasarla al componente como prop inspectFileFunction."
|
|
51
51
|
);
|
|
52
52
|
},
|
|
53
|
-
maxFileSize:
|
|
54
|
-
onFileSelect:
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
fullWidth: B = !1
|
|
53
|
+
maxFileSize: x,
|
|
54
|
+
onFileSelect: p,
|
|
55
|
+
statusIconBorderRadius: N = "50%",
|
|
56
|
+
fullWidth: W = !1
|
|
58
57
|
}) => {
|
|
59
|
-
const [
|
|
60
|
-
|
|
61
|
-
),
|
|
62
|
-
|
|
58
|
+
const [j, w] = b(!1), [i, I] = b(
|
|
59
|
+
g || null
|
|
60
|
+
), h = S(null);
|
|
61
|
+
z(() => {
|
|
63
62
|
if (!i) return;
|
|
64
63
|
const e = [];
|
|
65
|
-
|
|
64
|
+
a && e.push("error"), c && e.push("success"), o && e.push("loading"), e.length > 1 && console.warn(
|
|
66
65
|
`⚠️ CompactFileUpload: Múltiples estados detectados (${e.join(", ")}). Solo un estado debe estar activo a la vez.`
|
|
67
66
|
);
|
|
68
|
-
}, [
|
|
69
|
-
const
|
|
70
|
-
e.preventDefault(), d ||
|
|
71
|
-
},
|
|
72
|
-
e.preventDefault(),
|
|
73
|
-
},
|
|
67
|
+
}, [a, c, o, i]);
|
|
68
|
+
const B = (e) => {
|
|
69
|
+
e.preventDefault(), d || w(!0);
|
|
70
|
+
}, E = (e) => {
|
|
71
|
+
e.preventDefault(), w(!1);
|
|
72
|
+
}, L = (e) => {
|
|
74
73
|
e.preventDefault();
|
|
75
|
-
},
|
|
76
|
-
if (e.preventDefault(),
|
|
77
|
-
const
|
|
78
|
-
|
|
79
|
-
},
|
|
80
|
-
const
|
|
81
|
-
|
|
82
|
-
},
|
|
74
|
+
}, O = (e) => {
|
|
75
|
+
if (e.preventDefault(), w(!1), d) return;
|
|
76
|
+
const s = e.dataTransfer.files;
|
|
77
|
+
F(s);
|
|
78
|
+
}, R = async (e) => {
|
|
79
|
+
const s = e.target.files;
|
|
80
|
+
F(s);
|
|
81
|
+
}, F = async (e) => {
|
|
83
82
|
if (!e) return;
|
|
84
83
|
if (m && m.length > 0)
|
|
85
|
-
for (let
|
|
86
|
-
const
|
|
84
|
+
for (let r = 0; r < e.length; r++) {
|
|
85
|
+
const _ = e[r];
|
|
87
86
|
if (!m.some(
|
|
88
|
-
(
|
|
87
|
+
(C) => C.startsWith(".") ? _.name.toLowerCase().endsWith(C.toLowerCase()) : _.type === C
|
|
89
88
|
)) {
|
|
90
|
-
console.warn(`File ${
|
|
89
|
+
console.warn(`File ${_.name} is not an allowed type`);
|
|
91
90
|
return;
|
|
92
91
|
}
|
|
93
92
|
}
|
|
94
|
-
if (
|
|
95
|
-
for (let
|
|
96
|
-
const
|
|
97
|
-
if (
|
|
98
|
-
console.warn(`File ${
|
|
93
|
+
if (x)
|
|
94
|
+
for (let r = 0; r < e.length; r++) {
|
|
95
|
+
const _ = e[r];
|
|
96
|
+
if (_.size > x) {
|
|
97
|
+
console.warn(`File ${_.name} exceeds maximum size`);
|
|
99
98
|
return;
|
|
100
99
|
}
|
|
101
100
|
}
|
|
102
|
-
const
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
const
|
|
106
|
-
return
|
|
101
|
+
const s = e ? e[0] : null;
|
|
102
|
+
I(s), await (p == null ? void 0 : p(
|
|
103
|
+
s ? (() => {
|
|
104
|
+
const r = new DataTransfer();
|
|
105
|
+
return r.items.add(s), r.files;
|
|
107
106
|
})() : null
|
|
108
107
|
));
|
|
109
|
-
},
|
|
110
|
-
!d &&
|
|
111
|
-
},
|
|
112
|
-
await (
|
|
113
|
-
},
|
|
108
|
+
}, U = () => {
|
|
109
|
+
!d && h.current && h.current.click();
|
|
110
|
+
}, V = async () => {
|
|
111
|
+
await (p == null ? void 0 : p(null)), I(null), h.current && (h.current.value = "");
|
|
112
|
+
}, M = [
|
|
114
113
|
t.compactFileUploadContainer,
|
|
115
|
-
|
|
116
|
-
t[`variant_${
|
|
117
|
-
|
|
118
|
-
i && c ? t.error : "",
|
|
119
|
-
i && !c && o ? t.loading : "",
|
|
120
|
-
i && !
|
|
114
|
+
W && t.fullWidth,
|
|
115
|
+
t[`variant_${D}`],
|
|
116
|
+
!i && v ? t.warning : "",
|
|
117
|
+
i && !o && !c && a ? t.error : "",
|
|
118
|
+
i && !a && !c && o ? t.loading : "",
|
|
119
|
+
i && !a && !o && c ? t.success : "",
|
|
121
120
|
d ? t.disabled : "",
|
|
122
|
-
|
|
123
|
-
|
|
121
|
+
k ? t.inverted : "",
|
|
122
|
+
j ? t.dragOver : ""
|
|
124
123
|
].filter(Boolean).join(" ");
|
|
125
|
-
return /* @__PURE__ */ n("div", { className: t.inputContainer, children: /* @__PURE__ */
|
|
124
|
+
return /* @__PURE__ */ n("div", { className: t.inputContainer, children: /* @__PURE__ */ l(
|
|
126
125
|
"div",
|
|
127
126
|
{
|
|
128
|
-
className:
|
|
129
|
-
onDragEnter:
|
|
130
|
-
onDragLeave:
|
|
131
|
-
onDragOver:
|
|
132
|
-
onDrop:
|
|
127
|
+
className: M,
|
|
128
|
+
onDragEnter: B,
|
|
129
|
+
onDragLeave: E,
|
|
130
|
+
onDragOver: L,
|
|
131
|
+
onDrop: O,
|
|
133
132
|
onClick: i ? () => {
|
|
134
|
-
} :
|
|
133
|
+
} : U,
|
|
135
134
|
style: { cursor: d ? "not-allowed" : "pointer" },
|
|
136
135
|
children: [
|
|
137
136
|
/* @__PURE__ */ n(
|
|
138
137
|
"input",
|
|
139
138
|
{
|
|
140
|
-
ref:
|
|
139
|
+
ref: h,
|
|
141
140
|
type: "file",
|
|
142
141
|
className: t.hiddenInput,
|
|
143
|
-
onChange:
|
|
142
|
+
onChange: R,
|
|
144
143
|
disabled: d,
|
|
145
144
|
accept: m == null ? void 0 : m.join(",")
|
|
146
145
|
}
|
|
147
146
|
),
|
|
148
|
-
/* @__PURE__ */ n("div", { className: t.uploadContent, children: i
|
|
147
|
+
/* @__PURE__ */ n("div", { className: t.uploadContent, children: i ? (
|
|
149
148
|
// Compact layout - simple text with left icon
|
|
150
|
-
/* @__PURE__ */
|
|
149
|
+
/* @__PURE__ */ l("div", { className: t.compactFileContent, children: [
|
|
151
150
|
/* @__PURE__ */ n("div", { className: t.compactFileIcon, children: /* @__PURE__ */ n(
|
|
152
151
|
"div",
|
|
153
152
|
{
|
|
154
153
|
className: t.compactIconBackground,
|
|
155
154
|
style: {
|
|
156
|
-
background:
|
|
157
|
-
borderRadius:
|
|
155
|
+
background: a && !o ? "#DC2626" : o ? "#2054A5" : c ? "#65A30D" : "#2054A5",
|
|
156
|
+
borderRadius: N
|
|
158
157
|
},
|
|
159
158
|
children: o ? /* @__PURE__ */ n(
|
|
160
159
|
"div",
|
|
@@ -166,7 +165,7 @@ import '../../assets/CompactFileUpload.css';const J = "_inputContainer_1c3te_1",
|
|
|
166
165
|
margin: "4px"
|
|
167
166
|
},
|
|
168
167
|
children: /* @__PURE__ */ n(
|
|
169
|
-
|
|
168
|
+
q,
|
|
170
169
|
{
|
|
171
170
|
size: 10,
|
|
172
171
|
color: "primary",
|
|
@@ -185,9 +184,9 @@ import '../../assets/CompactFileUpload.css';const J = "_inputContainer_1c3te_1",
|
|
|
185
184
|
alignItems: "center"
|
|
186
185
|
},
|
|
187
186
|
children: /* @__PURE__ */ n(
|
|
188
|
-
|
|
187
|
+
u,
|
|
189
188
|
{
|
|
190
|
-
name:
|
|
189
|
+
name: a ? "CancelIcon" : c ? "CheckIcon" : "Documentos",
|
|
191
190
|
fill: "white",
|
|
192
191
|
height: 20,
|
|
193
192
|
width: 20
|
|
@@ -197,37 +196,35 @@ import '../../assets/CompactFileUpload.css';const J = "_inputContainer_1c3te_1",
|
|
|
197
196
|
)
|
|
198
197
|
}
|
|
199
198
|
) }),
|
|
200
|
-
/* @__PURE__ */
|
|
201
|
-
!
|
|
199
|
+
/* @__PURE__ */ l("div", { className: t.compactFileText, children: [
|
|
200
|
+
!a && !o && !c && /* @__PURE__ */ l(y, { children: [
|
|
202
201
|
f && /* @__PURE__ */ n("span", { className: `small1Medium ${t.compactLabel}`, children: f }),
|
|
203
202
|
/* @__PURE__ */ n("span", { className: `small3Regular ${t.compactFileName}`, children: i == null ? void 0 : i.name })
|
|
204
203
|
] }),
|
|
205
|
-
(
|
|
204
|
+
(a || o || c) && /* @__PURE__ */ n(
|
|
206
205
|
"span",
|
|
207
206
|
{
|
|
208
207
|
className: `
|
|
209
208
|
small1Medium
|
|
210
209
|
${t.compactFileName}
|
|
211
|
-
${
|
|
212
|
-
${
|
|
213
|
-
${s && t.warning}
|
|
210
|
+
${a && t.error}
|
|
211
|
+
${c && t.success}
|
|
214
212
|
${o && t.loading}
|
|
215
213
|
`,
|
|
216
|
-
children:
|
|
214
|
+
children: i == null ? void 0 : i.name
|
|
217
215
|
}
|
|
218
216
|
),
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
a && !o && /* @__PURE__ */ n("span", { className: `small3Regular ${t.compactStatusText}`, children: a })
|
|
217
|
+
a && /* @__PURE__ */ n("span", { className: `small3Regular ${t.compactStatusText}`, children: a }),
|
|
218
|
+
c && !o && /* @__PURE__ */ n("span", { className: `small3Regular ${t.compactStatusText}`, children: c })
|
|
222
219
|
] }),
|
|
223
|
-
/* @__PURE__ */
|
|
224
|
-
!
|
|
220
|
+
/* @__PURE__ */ l("div", { className: t.compactActions, children: [
|
|
221
|
+
!a && !o && !c && /* @__PURE__ */ n(
|
|
225
222
|
"div",
|
|
226
223
|
{
|
|
227
224
|
className: t.compactVisibilityIcon,
|
|
228
|
-
onClick:
|
|
225
|
+
onClick: A,
|
|
229
226
|
children: /* @__PURE__ */ n(
|
|
230
|
-
|
|
227
|
+
u,
|
|
231
228
|
{
|
|
232
229
|
name: "Visibility",
|
|
233
230
|
fill: "#2054A5",
|
|
@@ -237,32 +234,72 @@ import '../../assets/CompactFileUpload.css';const J = "_inputContainer_1c3te_1",
|
|
|
237
234
|
)
|
|
238
235
|
}
|
|
239
236
|
),
|
|
240
|
-
(
|
|
241
|
-
|
|
237
|
+
(a || c || o) && /* @__PURE__ */ n(
|
|
238
|
+
T,
|
|
242
239
|
{
|
|
243
|
-
variant:
|
|
240
|
+
variant: c ? "ghost" : "outline",
|
|
244
241
|
icon: {
|
|
245
242
|
name: "CancelIcon",
|
|
246
243
|
position: "before"
|
|
247
244
|
},
|
|
248
|
-
onClick:
|
|
249
|
-
children:
|
|
245
|
+
onClick: V,
|
|
246
|
+
children: a ? "Eliminar" : o ? "Cancelar" : ""
|
|
250
247
|
}
|
|
251
|
-
)
|
|
252
|
-
|
|
253
|
-
|
|
248
|
+
)
|
|
249
|
+
] })
|
|
250
|
+
] })
|
|
251
|
+
) : v ? /* @__PURE__ */ l("div", { className: t.compactFileContent, children: [
|
|
252
|
+
/* @__PURE__ */ n("div", { className: t.compactFileIcon, children: /* @__PURE__ */ n(
|
|
253
|
+
"div",
|
|
254
|
+
{
|
|
255
|
+
className: t.compactIconBackground,
|
|
256
|
+
style: {
|
|
257
|
+
background: "#EA580C",
|
|
258
|
+
borderRadius: N
|
|
259
|
+
},
|
|
260
|
+
children: /* @__PURE__ */ n(
|
|
261
|
+
"div",
|
|
254
262
|
{
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
263
|
+
style: {
|
|
264
|
+
display: "flex",
|
|
265
|
+
justifyContent: "center",
|
|
266
|
+
alignItems: "center"
|
|
259
267
|
},
|
|
260
|
-
children:
|
|
268
|
+
children: /* @__PURE__ */ n(
|
|
269
|
+
u,
|
|
270
|
+
{
|
|
271
|
+
name: "AlertIcon",
|
|
272
|
+
fill: "white",
|
|
273
|
+
height: 20,
|
|
274
|
+
width: 20
|
|
275
|
+
}
|
|
276
|
+
)
|
|
261
277
|
}
|
|
262
278
|
)
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
279
|
+
}
|
|
280
|
+
) }),
|
|
281
|
+
/* @__PURE__ */ l("div", { className: t.compactFileText, children: [
|
|
282
|
+
/* @__PURE__ */ n(
|
|
283
|
+
"span",
|
|
284
|
+
{
|
|
285
|
+
className: ` small1Medium ${t.compactFileName} ${t.warning}`,
|
|
286
|
+
children: f
|
|
287
|
+
}
|
|
288
|
+
),
|
|
289
|
+
/* @__PURE__ */ n("span", { className: `small3Regular ${t.compactStatusText}`, children: v })
|
|
290
|
+
] }),
|
|
291
|
+
/* @__PURE__ */ n("div", { className: t.compactActions, children: /* @__PURE__ */ n(
|
|
292
|
+
T,
|
|
293
|
+
{
|
|
294
|
+
variant: "outline",
|
|
295
|
+
icon: {
|
|
296
|
+
name: "Upload",
|
|
297
|
+
position: "before"
|
|
298
|
+
},
|
|
299
|
+
children: "Subir doc"
|
|
300
|
+
}
|
|
301
|
+
) })
|
|
302
|
+
] }) : /* @__PURE__ */ n(y, { children: /* @__PURE__ */ l("div", { className: t.textContent, children: [
|
|
266
303
|
/* @__PURE__ */ n(
|
|
267
304
|
"div",
|
|
268
305
|
{
|
|
@@ -270,15 +307,15 @@ import '../../assets/CompactFileUpload.css';const J = "_inputContainer_1c3te_1",
|
|
|
270
307
|
style: {
|
|
271
308
|
background: "#2054A5"
|
|
272
309
|
},
|
|
273
|
-
children: /* @__PURE__ */ n("div", { style: { marginTop: "3px" }, children: /* @__PURE__ */ n(
|
|
310
|
+
children: /* @__PURE__ */ n("div", { style: { marginTop: "3px" }, children: /* @__PURE__ */ n(u, { name: "Add", fill: "white", height: 27, width: 27 }) })
|
|
274
311
|
}
|
|
275
312
|
),
|
|
276
|
-
/* @__PURE__ */ n("span", { className: `small1Medium ${t.browseText}`, children:
|
|
313
|
+
/* @__PURE__ */ n("span", { className: `small1Medium ${t.browseText}`, children: $ })
|
|
277
314
|
] }) }) })
|
|
278
315
|
]
|
|
279
316
|
}
|
|
280
317
|
) });
|
|
281
318
|
};
|
|
282
319
|
export {
|
|
283
|
-
|
|
320
|
+
bt as CompactFileUpload
|
|
284
321
|
};
|
|
@@ -16,7 +16,7 @@ const k = ({
|
|
|
16
16
|
}) => {
|
|
17
17
|
const c = C(null), u = (d) => {
|
|
18
18
|
!a && c.current && c.current.click(), h && h(d);
|
|
19
|
-
},
|
|
19
|
+
}, x = [
|
|
20
20
|
l.inputWrapper,
|
|
21
21
|
a ? l.inputCheckbox_disabled : l.inputCheckbox,
|
|
22
22
|
s === "small" ? l.smallCheckbox : s === "large" ? l.largeCheckbox : l.mediumCheckbox,
|
|
@@ -26,7 +26,7 @@ const k = ({
|
|
|
26
26
|
o && !r && !a && e ? l.inputCheckbox_inverted_checked : "",
|
|
27
27
|
o && r ? l.error_checked : "",
|
|
28
28
|
o && a ? l.inputCheckbox_disabled_checked : ""
|
|
29
|
-
].filter(Boolean).join(" "),
|
|
29
|
+
].filter(Boolean).join(" "), g = [
|
|
30
30
|
a && !e ? l.passwordToggle_disabled : "",
|
|
31
31
|
e && !a ? l.passwordToggle_inverted : "",
|
|
32
32
|
e && a ? l.passwordToggle_inverted_disabled : ""
|
|
@@ -44,15 +44,25 @@ const k = ({
|
|
|
44
44
|
className: `${l.label} ${s === "large" ? l.label_large : ""} ${a && !e ? l.label_disabled : ""} ${e && !a ? l.label_inverted : ""} ${e && a ? l.label_inverted_disabled : ""}`,
|
|
45
45
|
children: [
|
|
46
46
|
p,
|
|
47
|
-
m && /* @__PURE__ */ _(
|
|
47
|
+
m && /* @__PURE__ */ _(
|
|
48
|
+
"span",
|
|
49
|
+
{
|
|
50
|
+
className: `${l.required} ${a && !e ? l.required_disabled : ""} ${e && !a ? l.required_inverted : ""} ${e && a ? l.required_inverted_disabled : ""}`,
|
|
51
|
+
children: "*"
|
|
52
|
+
}
|
|
53
|
+
)
|
|
48
54
|
]
|
|
49
55
|
}
|
|
50
56
|
),
|
|
51
57
|
/* @__PURE__ */ n(
|
|
52
58
|
"div",
|
|
53
59
|
{
|
|
54
|
-
className:
|
|
55
|
-
style: {
|
|
60
|
+
className: x,
|
|
61
|
+
style: {
|
|
62
|
+
display: "flex",
|
|
63
|
+
alignItems: "center",
|
|
64
|
+
cursor: a ? "not-allowed" : "pointer"
|
|
65
|
+
},
|
|
56
66
|
onClick: u,
|
|
57
67
|
children: [
|
|
58
68
|
/* @__PURE__ */ _(
|
|
@@ -60,11 +70,11 @@ const k = ({
|
|
|
60
70
|
{
|
|
61
71
|
ref: c,
|
|
62
72
|
type: "radio",
|
|
63
|
-
className:
|
|
73
|
+
className: g,
|
|
64
74
|
disabled: a,
|
|
65
75
|
checked: o,
|
|
66
76
|
...$,
|
|
67
|
-
style: { marginTop: "-1px" }
|
|
77
|
+
style: { marginTop: "-1px", flexShrink: 0 }
|
|
68
78
|
}
|
|
69
79
|
),
|
|
70
80
|
i && /* @__PURE__ */ _(
|