bmi-next-brokers 1.2.1 → 1.2.3
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.js +77 -77
- package/dist/components/Input/RadioButton/RadioButton.js +7 -17
- package/dist/components/Select/Select.d.ts +1 -1
- package/dist/components/Select/Select.js +139 -101
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
.
|
|
1
|
+
._inputContainer_1c3te_1{display:flex;flex-direction:column;gap:4px;width:100%;min-width:0}._compactFileUploadContainer_1c3te_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_1c3te_9._fullWidth_1c3te_26{max-width:100%}._compactFileUploadContainer_1c3te_9:hover{font-weight:600;background-color:var(--Fill-Info-Inverted-Hover, #e0e9f8)}._compactFileUploadContainer_1c3te_9._dragOver_1c3te_35{border-color:var(--Fill-Brand-Default-Active, #2054a5);background:var(--Fill-Brand-Default-Hover, #eef3fc)}._variant_document_1c3te_41 ._icon_1c3te_41{color:var(--Content-Neutral-Primary, #475569)}._variant_add_1c3te_45 ._icon_1c3te_41{color:var(--Fill-Brand-Default-Active, #2054a5)}._compactFileUploadContainer_1c3te_9._disabled_1c3te_50{border-color:var(--Stroke-Disabled-Default, #cbd5e1);background:var(--Fill-Disabled-Default, #f8fafc);cursor:not-allowed}._compactFileUploadContainer_1c3te_9._disabled_1c3te_50:hover{border-color:var(--Stroke-Disabled-Default, #cbd5e1);background:var(--Fill-Disabled-Default, #f8fafc)}._compactFileUploadContainer_1c3te_9._error_1c3te_61{background-color:#fef2f2}._compactFileUploadContainer_1c3te_9._error_1c3te_61:hover{background-color:var(--Fill-Negative-Default-Hover, #fecaca)}._compactFileUploadContainer_1c3te_9._warning_1c3te_69{background-color:#ffedd5}._compactFileUploadContainer_1c3te_9._warning_1c3te_69:hover{background-color:var(--Fill-Warning-Default-Hover, #fecaca)}._compactFileUploadContainer_1c3te_9._inverted_1c3te_78{border-color:var(--Stroke-Neutral-Secondary, #c9e1f6);background:transparent}._compactFileUploadContainer_1c3te_9._inverted_1c3te_78:hover{border-color:var(--Stroke-Neutral-Primary, #e0e9f8);background:#ffffff1a}._compactFileUploadContainer_1c3te_9._inverted_1c3te_78._dragOver_1c3te_35{border-color:var(--Fill-Brand-Inverted-Active, #fff);background:#fff3}._compactFileUploadContainer_1c3te_9._inverted_1c3te_78._disabled_1c3te_50{border-color:var(--Stroke-Disabled-Default, #1b468a);background:transparent}._compactFileUploadContainer_1c3te_9._inverted_1c3te_78._error_1c3te_61{background:transparent}._uploadContent_1c3te_103{display:flex;padding:12px;gap:8px;z-index:100;height:100%;position:relative;transition:font-weight .3s ease-in-out,background-color .3s ease-in-out}._textContent_1c3te_115{text-align:center;display:flex;flex-direction:row;gap:8px;align-items:center;height:100%;min-width:0}._dragText_1c3te_125{font-family:Poppins Bold;font-size:12px;color:var(--Content-Brand-Default-Active, #2054a5)}._disabled_1c3te_50 ._dragText_1c3te_125{color:var(--content-disabled-default, #cbd5e1)}._inverted_1c3te_78 ._dragText_1c3te_125{color:#fffc}._inverted_1c3te_78._disabled_1c3te_50 ._dragText_1c3te_125{color:var(--content-disabled-default, #4f88d9)}._inverted_1c3te_78 ._variant_document_1c3te_41 ._icon_1c3te_41,._inverted_1c3te_78 ._variant_add_1c3te_45 ._icon_1c3te_41{color:#fff}._inverted_1c3te_78._disabled_1c3te_50 ._icon_1c3te_41{color:var(--content-disabled-default, #4f88d9)}._hiddenInput_1c3te_155{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}._compactFileContent_1c3te_168{display:flex;align-items:center;gap:12px;width:100%;height:100%}._compactFileIcon_1c3te_176{flex-shrink:0;display:flex;align-items:center;justify-content:center;margin-top:0}._compactIconBackground_1c3te_184{display:flex;align-items:center;justify-content:center;padding:6px}._compactFileContent_1c3te_168,._compactFileText_1c3te_192{justify-content:center}._compactFileText_1c3te_192{flex:1;display:flex;flex-direction:column;gap:2px;min-width:0}._compactLabel_1c3te_204{color:#2054a5;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}._compactFileName_1c3te_211,._compactStatusText_1c3te_212{color:#525252;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}._compactFileName_1c3te_211._error_1c3te_61{color:#dc2626}._compactFileName_1c3te_211._success_1c3te_223{color:#65a30d}._compactFileName_1c3te_211._warning_1c3te_69{color:#ea580c}._compactFileName_1c3te_211._loading_1c3te_231{color:#2054a5}._addIconWrapper_1c3te_235{border-radius:1000px;height:34px;width:34px}._browseText_1c3te_241{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:#2054a5}._compactVisibilityIcon_1c3te_248{flex-shrink:0;display:flex;align-items:center;justify-content:center;cursor:pointer;transition:background-color .2s ease}._compactActions_1c3te_257{display:flex;align-items:center;gap:8px;flex-shrink:0}._deleteText_1c3te_264{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_12ph8_1{display:flex;flex-direction:column;gap:4px}._label_12ph8_7{font-family:Poppins Regular;font-size:13px;color:var(--Content-Neutral-Default-Active, #000);font-weight:500;padding-left:4px}._label_large_12ph8_15{font-size:15px;margin-bottom:6px}._label_disabled_12ph8_20{color:var(--content-disabled-default, #cbd5e1)}._selectWrapper_12ph8_24{position:relative;display:flex;align-items:center}._select_12ph8_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_12ph8_1:hover{border:1px solid var(--Stroke-Neutral-Primary, #94a3b8)}._select_12ph8_1:focus{box-shadow:0 0 0 3px var(--ui-blue-400, #7eaae6)}._select_12ph8_1:active{border:1px solid var(--Stroke-Neutral-Primary, #94a3b8);box-shadow:0 0 0 3px var(--ui-blue-400, #7eaae6)}._select_12ph8_1._open_12ph8_59{box-shadow:0 0 0 3px var(--ui-blue-400, #7eaae6)}._select_12ph8_1._disabled_12ph8_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_12ph8_1._disabled_12ph8_63 ._placeholder_12ph8_71{color:var(--content-disabled-default, #cbd5e1)}._selectValue_12ph8_75{flex:1;text-align:left}._placeholder_12ph8_71{color:var(--Content-Neutral-Default-Default, #a3a3a3)}._chevron_12ph8_84{transition:transform .2s ease;color:var(--Content-Neutral-Default, #475569)}._chevronOpen_12ph8_89{transform:rotate(180deg)}._small_12ph8_94{padding:8px 11px;font-size:12px}._small_12ph8_94._withIcon_12ph8_99{padding:11px 8px 11px 28px}._medium_12ph8_103{padding:8px 10px;font-size:14px}._medium_12ph8_103._withIcon_12ph8_99{padding:8px 10px 8px 30px}._large_12ph8_112{padding:11px 12px;font-size:15px}._large_12ph8_112._withIcon_12ph8_99{padding:11px 12px 11px 32px}._error_12ph8_122{border:1px solid var(--Stroke-Negative-Active, #dc2626);background:var(--Fill-Neutral-Primary, #fff);color:var(--Content-Negative-Default-Active, #dc2626);animation:_errorShake_12ph8_1 .4s ease-in-out}._error_12ph8_122 ._placeholder_12ph8_71{color:var(--Content-Negative-Default-Active, #dc2626)}._error_12ph8_122:hover{border:1px solid var(--Stroke-Negative-Active, #dc2626)}._error_12ph8_122:active{border:1px solid transparent;box-shadow:0 0 0 3px var(--ui-red-400, #f87171)}._error_12ph8_122:focus{border:1px solid transparent;box-shadow:0 0 0 3px var(--ui-red-400, #f87171)}._error_12ph8_122._open_12ph8_59{border:1px solid transparent;box-shadow:0 0 0 3px var(--ui-red-400, #f87171)}._errorMessage_12ph8_152{font-family:Poppins Medium;color:#e74c3c;margin-top:2px;margin-left:4px;animation:_errorMessageSlide_12ph8_1 .3s ease-out;transform-origin:top}._errorMessage_small_12ph8_161{font-size:10px}._errorMessage_medium_12ph8_165{font-size:12px}._errorMessage_large_12ph8_169{font-size:14px}._errorMessage_inverted_12ph8_173{color:var(--Content-Negative-Default-Active, #f87171)!important}._helperText_12ph8_177{font-family:Poppins Regular;color:#acacac;margin-top:2px;margin-left:4px}._helperText_small_12ph8_184,._helperText_medium_12ph8_188{font-size:11px}._helperText_large_12ph8_192{font-size:13px;margin-top:7px}._helperText_disabled_12ph8_197{color:var(--content-disabled-default, #cbd5e1)}._iconLabel_12ph8_201{display:flex;justify-content:center;align-items:center;gap:6px}._icon_12ph8_201{color:var(--Content-Neutral-Default, #475569);pointer-events:none;display:flex;align-items:center;justify-content:center}._icon_disabled_12ph8_217{color:var(--Content-Neutral-Disabled, #94a3b8)}._required_12ph8_222{color:var(--Content-Negative-Default-Active, #dc2626);margin-left:2px}._required_inverted_12ph8_227{color:var(--Content-Negative-Default-Active, #f87171)}._required_disabled_12ph8_231{color:var(--content-disabled-default, #cbd5e1)}._required_inverted_disabled_12ph8_235{color:var(--content-disabled-default, #4f88d9)}._dropdown_12ph8_240{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_12ph8_254{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_12ph8_254:last-child{border-bottom:none}._dropdown_12ph8_240 ._option_12ph8_254{font-size:14px;padding:8px 12px}._small_12ph8_94+._dropdown_12ph8_240 ._option_12ph8_254{font-size:12px;padding:8px 11px 8px 14px}._medium_12ph8_103+._dropdown_12ph8_240 ._option_12ph8_254{font-size:14px;padding:8px 12px}._large_12ph8_112+._dropdown_12ph8_240 ._option_12ph8_254{font-size:15px;padding:11px 12px}._option_12ph8_254:hover{background-color:#f8f9fa}._option_12ph8_254:first-child{border-top-left-radius:16px;border-top-right-radius:16px}._option_12ph8_254:last-child{border-bottom-left-radius:16px;border-bottom-right-radius:16px}._optionSelected_12ph8_307{background-color:var(--Fill-Brand-Inverted-Hover, #eef3fc);color:var(--Content-Brand-Inverted-Active, #2054a5)}._optionIcon_12ph8_312{display:flex;align-items:center;justify-content:center}._inverted_12ph8_319{border:1px solid var(--Stroke-Neutral-Secondary, #c9e1f6);background-color:transparent!important;color:#fff!important}._inverted_12ph8_319:hover{border:1px solid white!important}._inverted_12ph8_319._open_12ph8_59{box-shadow:0 0 0 3px #ffffff4d!important}._inverted_12ph8_319 ._placeholder_12ph8_71{color:#ffffffb3!important}._inverted_12ph8_319 ._chevron_12ph8_84,._label_inverted_12ph8_341{color:#fff!important}._helperText_inverted_12ph8_345{color:var(--Content-Neutral-Default-Default, #fafafa)}._icon_inverted_12ph8_349{color:#fff!important}._dropdown_inverted_12ph8_353{background:var(--Fill-Brand-Default-Active, #2054a5);border:1px solid var(--Stroke-Neutral-Primary, #e0e9f8)}._option_inverted_12ph8_358{color:#fff!important;border-bottom-color:1px solid var(--Stroke-Neutral-Primary, #e0e9f8)}._option_inverted_12ph8_358:hover{background-color:#ffffff1a!important}._option_inverted_12ph8_358._optionSelected_12ph8_307{background-color:#ffffff26!important;color:#fff!important}._inverted_12ph8_319._error_12ph8_122{border:1px solid var(--Stroke-Negative-Active, #ef4444)!important;color:var(--Content-Negative-Default-Active, #f87171)!important}._inverted_12ph8_319._error_12ph8_122 ._placeholder_12ph8_71{color:var(--Content-Negative-Default-Active, #f87171)!important}._inverted_12ph8_319._error_12ph8_122:hover{border:1px solid var(--Stroke-Negative-Active, #ef4444)!important}._inverted_12ph8_319._error_12ph8_122:active{border:1px solid transparent!important;box-shadow:0 0 0 3px var(--ui-red-400, #f87171)!important}._inverted_12ph8_319._error_12ph8_122:focus{border:1px solid transparent!important;box-shadow:0 0 0 3px var(--ui-red-400, #f87171)!important}._inverted_12ph8_319._error_12ph8_122._open_12ph8_59{border:1px solid transparent!important;box-shadow:0 0 0 3px var(--ui-red-400, #f87171)!important}@keyframes _errorShake_12ph8_1{0%,to{transform:translate(0)}10%,30%,50%,70%,90%{transform:translate(-2px)}20%,40%,60%,80%{transform:translate(2px)}}@keyframes _errorMessageSlide_12ph8_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_12ph8_319._disabled_12ph8_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_12ph8_319._disabled_12ph8_63 ._placeholder_12ph8_71{color:var(--content-disabled-default, #4f88d9)!important}._label_inverted_disabled_12ph8_449{color:var(--Content-Neutral-Default-Active, #fff)}._helperText_inverted_disabled_12ph8_453{color:var(--Content-Neutral-Default-Default, #fafafa)}._icon_inverted_disabled_12ph8_457,._inverted_12ph8_319._disabled_12ph8_63 ._chevron_12ph8_84{color:var(--content-disabled-default, #4f88d9)!important}._inverted_12ph8_319._disabled_12ph8_63:focus,._inverted_12ph8_319._disabled_12ph8_63:active,._inverted_12ph8_319._disabled_12ph8_63._open_12ph8_59{box-shadow:none!important}._inverted_12ph8_319._disabled_12ph8_63._error_12ph8_122{border:1px solid var(--Stroke-Negative-Active, #ef4444)!important;color:var(--Content-Negative-Default-Active, #f87171)!important}._inverted_12ph8_319._disabled_12ph8_63._error_12ph8_122:focus,._inverted_12ph8_319._disabled_12ph8_63._error_12ph8_122:active,._inverted_12ph8_319._disabled_12ph8_63._error_12ph8_122._open_12ph8_59{box-shadow:0 0 0 3px var(--ui-red-400, #f87171)!important}._inverted_12ph8_319._disabled_12ph8_63._error_12ph8_122 ._placeholder_12ph8_71{color:var(--Content-Negative-Default-Active, #f87171)!important}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { jsx as n, jsxs as
|
|
1
|
+
import { jsx as n, jsxs as _, Fragment as T } from "react/jsx-runtime";
|
|
2
2
|
import { useState as w, useRef as q, useEffect as H } from "react";
|
|
3
|
-
import { Icon as
|
|
3
|
+
import { Icon as I } from "../../icons/Icon.js";
|
|
4
4
|
import { Spinner as G } from "../Spinner/Spinner.js";
|
|
5
5
|
import { Button as $ } from "../Button/Button.js";
|
|
6
|
-
import '../../assets/CompactFileUpload.css';const J = "
|
|
6
|
+
import '../../assets/CompactFileUpload.css';const J = "_inputContainer_1c3te_1", K = "_compactFileUploadContainer_1c3te_9", P = "_fullWidth_1c3te_26", Q = "_dragOver_1c3te_35", X = "_variant_document_1c3te_41", Y = "_icon_1c3te_41", Z = "_variant_add_1c3te_45", tt = "_disabled_1c3te_50", et = "_error_1c3te_61", nt = "_warning_1c3te_69", ct = "_inverted_1c3te_78", at = "_uploadContent_1c3te_103", ot = "_textContent_1c3te_115", it = "_dragText_1c3te_125", lt = "_hiddenInput_1c3te_155", st = "_compactFileContent_1c3te_168", rt = "_compactFileIcon_1c3te_176", dt = "_compactIconBackground_1c3te_184", mt = "_compactFileText_1c3te_192", pt = "_compactLabel_1c3te_204", _t = "_compactFileName_1c3te_211", ut = "_compactStatusText_1c3te_212", ht = "_success_1c3te_223", ft = "_loading_1c3te_231", vt = "_addIconWrapper_1c3te_235", Ct = "_browseText_1c3te_241", gt = "_compactVisibilityIcon_1c3te_248", xt = "_compactActions_1c3te_257", It = "_deleteText_1c3te_264", t = {
|
|
7
7
|
inputContainer: J,
|
|
8
8
|
compactFileUploadContainer: K,
|
|
9
9
|
fullWidth: P,
|
|
@@ -12,10 +12,10 @@ import '../../assets/CompactFileUpload.css';const J = "_inputContainer_1dauy_1",
|
|
|
12
12
|
icon: Y,
|
|
13
13
|
variant_add: Z,
|
|
14
14
|
disabled: tt,
|
|
15
|
-
error:
|
|
15
|
+
error: et,
|
|
16
16
|
warning: nt,
|
|
17
|
-
inverted:
|
|
18
|
-
uploadContent:
|
|
17
|
+
inverted: ct,
|
|
18
|
+
uploadContent: at,
|
|
19
19
|
textContent: ot,
|
|
20
20
|
dragText: it,
|
|
21
21
|
hiddenInput: lt,
|
|
@@ -24,23 +24,23 @@ import '../../assets/CompactFileUpload.css';const J = "_inputContainer_1dauy_1",
|
|
|
24
24
|
compactIconBackground: dt,
|
|
25
25
|
compactFileText: mt,
|
|
26
26
|
compactLabel: pt,
|
|
27
|
-
compactFileName:
|
|
28
|
-
compactStatusText:
|
|
27
|
+
compactFileName: _t,
|
|
28
|
+
compactStatusText: ut,
|
|
29
29
|
success: ht,
|
|
30
30
|
loading: ft,
|
|
31
31
|
addIconWrapper: vt,
|
|
32
|
-
browseText:
|
|
33
|
-
compactVisibilityIcon:
|
|
34
|
-
compactActions:
|
|
35
|
-
deleteText:
|
|
32
|
+
browseText: Ct,
|
|
33
|
+
compactVisibilityIcon: gt,
|
|
34
|
+
compactActions: xt,
|
|
35
|
+
deleteText: It
|
|
36
36
|
}, $t = ({
|
|
37
37
|
variant: k = "document",
|
|
38
38
|
label: f,
|
|
39
|
-
error:
|
|
40
|
-
success:
|
|
41
|
-
warning:
|
|
39
|
+
error: c,
|
|
40
|
+
success: a,
|
|
41
|
+
warning: h,
|
|
42
42
|
loading: o = !1,
|
|
43
|
-
defaultFile:
|
|
43
|
+
defaultFile: F = null,
|
|
44
44
|
disabled: d = !1,
|
|
45
45
|
inverted: A = !1,
|
|
46
46
|
browseText: D = "Seleccionar archivo",
|
|
@@ -50,79 +50,79 @@ import '../../assets/CompactFileUpload.css';const J = "_inputContainer_1dauy_1",
|
|
|
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:
|
|
53
|
+
maxFileSize: N,
|
|
54
54
|
onFileSelect: v,
|
|
55
|
-
onDelete:
|
|
55
|
+
onDelete: C,
|
|
56
56
|
statusIconBorderRadius: S = "50%",
|
|
57
57
|
fullWidth: B = !1
|
|
58
58
|
}) => {
|
|
59
|
-
const [E,
|
|
60
|
-
|
|
61
|
-
),
|
|
59
|
+
const [E, g] = w(!1), [i, b] = w(
|
|
60
|
+
F || null
|
|
61
|
+
), u = q(null);
|
|
62
62
|
H(() => {
|
|
63
63
|
if (!i) return;
|
|
64
|
-
const
|
|
65
|
-
|
|
66
|
-
`⚠️ CompactFileUpload: Múltiples estados detectados (${
|
|
64
|
+
const e = [];
|
|
65
|
+
c && e.push("error"), a && e.push("success"), o && e.push("loading"), e.length > 1 && console.warn(
|
|
66
|
+
`⚠️ CompactFileUpload: Múltiples estados detectados (${e.join(", ")}). Solo un estado debe estar activo a la vez.`
|
|
67
67
|
);
|
|
68
|
-
}, [
|
|
69
|
-
const L = (
|
|
70
|
-
|
|
71
|
-
}, O = (
|
|
72
|
-
|
|
73
|
-
}, j = (
|
|
74
|
-
|
|
75
|
-
}, R = (
|
|
76
|
-
if (
|
|
77
|
-
const r =
|
|
78
|
-
|
|
79
|
-
}, U = async (
|
|
80
|
-
const r =
|
|
81
|
-
|
|
82
|
-
},
|
|
83
|
-
if (!
|
|
68
|
+
}, [c, a, o, i]);
|
|
69
|
+
const L = (e) => {
|
|
70
|
+
e.preventDefault(), d || g(!0);
|
|
71
|
+
}, O = (e) => {
|
|
72
|
+
e.preventDefault(), g(!1);
|
|
73
|
+
}, j = (e) => {
|
|
74
|
+
e.preventDefault();
|
|
75
|
+
}, R = (e) => {
|
|
76
|
+
if (e.preventDefault(), g(!1), d) return;
|
|
77
|
+
const r = e.dataTransfer.files;
|
|
78
|
+
y(r);
|
|
79
|
+
}, U = async (e) => {
|
|
80
|
+
const r = e.target.files;
|
|
81
|
+
y(r);
|
|
82
|
+
}, y = async (e) => {
|
|
83
|
+
if (!e) return;
|
|
84
84
|
if (m && m.length > 0)
|
|
85
|
-
for (let l = 0; l <
|
|
86
|
-
const p =
|
|
85
|
+
for (let l = 0; l < e.length; l++) {
|
|
86
|
+
const p = e[l];
|
|
87
87
|
if (!m.some(
|
|
88
|
-
(
|
|
88
|
+
(x) => x.startsWith(".") ? p.name.toLowerCase().endsWith(x.toLowerCase()) : p.type === x
|
|
89
89
|
)) {
|
|
90
90
|
console.warn(`File ${p.name} is not an allowed type`);
|
|
91
91
|
return;
|
|
92
92
|
}
|
|
93
93
|
}
|
|
94
|
-
if (
|
|
95
|
-
for (let l = 0; l <
|
|
96
|
-
const p =
|
|
97
|
-
if (p.size >
|
|
94
|
+
if (N)
|
|
95
|
+
for (let l = 0; l < e.length; l++) {
|
|
96
|
+
const p = e[l];
|
|
97
|
+
if (p.size > N) {
|
|
98
98
|
console.warn(`File ${p.name} exceeds maximum size`);
|
|
99
99
|
return;
|
|
100
100
|
}
|
|
101
101
|
}
|
|
102
|
-
const r =
|
|
103
|
-
|
|
102
|
+
const r = e ? e[0] : null;
|
|
103
|
+
b(r), await (v == null ? void 0 : v(
|
|
104
104
|
r ? (() => {
|
|
105
105
|
const l = new DataTransfer();
|
|
106
106
|
return l.items.add(r), l.files;
|
|
107
107
|
})() : null
|
|
108
108
|
));
|
|
109
109
|
}, V = () => {
|
|
110
|
-
!d &&
|
|
110
|
+
!d && u.current && u.current.click();
|
|
111
111
|
}, M = async () => {
|
|
112
|
-
await (
|
|
113
|
-
}, s =
|
|
112
|
+
await (C == null ? void 0 : C(null)), b(null), u.current && (u.current.value = "");
|
|
113
|
+
}, s = h && !o && !a && !c, z = [
|
|
114
114
|
t.compactFileUploadContainer,
|
|
115
115
|
B && t.fullWidth,
|
|
116
116
|
t[`variant_${k}`],
|
|
117
117
|
s ? t.warning : "",
|
|
118
|
-
i &&
|
|
119
|
-
i && !
|
|
120
|
-
i && !
|
|
118
|
+
i && c ? t.error : "",
|
|
119
|
+
i && !c && o ? t.loading : "",
|
|
120
|
+
i && !c && !o && a ? t.success : "",
|
|
121
121
|
d ? t.disabled : "",
|
|
122
122
|
A ? t.inverted : "",
|
|
123
123
|
E ? t.dragOver : ""
|
|
124
124
|
].filter(Boolean).join(" ");
|
|
125
|
-
return /* @__PURE__ */ n("div", { className: t.inputContainer, children: /* @__PURE__ */
|
|
125
|
+
return /* @__PURE__ */ n("div", { className: t.inputContainer, children: /* @__PURE__ */ _(
|
|
126
126
|
"div",
|
|
127
127
|
{
|
|
128
128
|
className: z,
|
|
@@ -137,7 +137,7 @@ import '../../assets/CompactFileUpload.css';const J = "_inputContainer_1dauy_1",
|
|
|
137
137
|
/* @__PURE__ */ n(
|
|
138
138
|
"input",
|
|
139
139
|
{
|
|
140
|
-
ref:
|
|
140
|
+
ref: u,
|
|
141
141
|
type: "file",
|
|
142
142
|
className: t.hiddenInput,
|
|
143
143
|
onChange: U,
|
|
@@ -147,13 +147,13 @@ import '../../assets/CompactFileUpload.css';const J = "_inputContainer_1dauy_1",
|
|
|
147
147
|
),
|
|
148
148
|
/* @__PURE__ */ n("div", { className: t.uploadContent, children: i || s ? (
|
|
149
149
|
// Compact layout - simple text with left icon
|
|
150
|
-
/* @__PURE__ */
|
|
150
|
+
/* @__PURE__ */ _("div", { className: t.compactFileContent, children: [
|
|
151
151
|
/* @__PURE__ */ n("div", { className: t.compactFileIcon, children: /* @__PURE__ */ n(
|
|
152
152
|
"div",
|
|
153
153
|
{
|
|
154
154
|
className: t.compactIconBackground,
|
|
155
155
|
style: {
|
|
156
|
-
background:
|
|
156
|
+
background: c ? "#DC2626" : o ? "#2054A5" : a ? "#65A30D" : h ? "#EA580C" : "#2054A5",
|
|
157
157
|
borderRadius: S
|
|
158
158
|
},
|
|
159
159
|
children: o ? /* @__PURE__ */ n(
|
|
@@ -185,9 +185,9 @@ import '../../assets/CompactFileUpload.css';const J = "_inputContainer_1dauy_1",
|
|
|
185
185
|
alignItems: "center"
|
|
186
186
|
},
|
|
187
187
|
children: /* @__PURE__ */ n(
|
|
188
|
-
|
|
188
|
+
I,
|
|
189
189
|
{
|
|
190
|
-
name:
|
|
190
|
+
name: c ? "CancelIcon" : a ? "CheckIcon" : h ? "AlertIcon" : "Documentos",
|
|
191
191
|
fill: "white",
|
|
192
192
|
height: 20,
|
|
193
193
|
width: 20
|
|
@@ -197,37 +197,37 @@ import '../../assets/CompactFileUpload.css';const J = "_inputContainer_1dauy_1",
|
|
|
197
197
|
)
|
|
198
198
|
}
|
|
199
199
|
) }),
|
|
200
|
-
/* @__PURE__ */
|
|
201
|
-
!
|
|
200
|
+
/* @__PURE__ */ _("div", { className: t.compactFileText, children: [
|
|
201
|
+
!c && !o && !a && !s && /* @__PURE__ */ _(T, { children: [
|
|
202
202
|
f && /* @__PURE__ */ n("span", { className: `small1Medium ${t.compactLabel}`, children: f }),
|
|
203
203
|
/* @__PURE__ */ n("span", { className: `small3Regular ${t.compactFileName}`, children: i == null ? void 0 : i.name })
|
|
204
204
|
] }),
|
|
205
|
-
(
|
|
205
|
+
(c || s || o || a) && /* @__PURE__ */ n(
|
|
206
206
|
"span",
|
|
207
207
|
{
|
|
208
208
|
className: `
|
|
209
209
|
small1Medium
|
|
210
210
|
${t.compactFileName}
|
|
211
|
-
${
|
|
212
|
-
${
|
|
211
|
+
${c && t.error}
|
|
212
|
+
${a && t.success}
|
|
213
213
|
${s && t.warning}
|
|
214
214
|
${o && t.loading}
|
|
215
215
|
`,
|
|
216
216
|
children: s ? f : i == null ? void 0 : i.name
|
|
217
217
|
}
|
|
218
218
|
),
|
|
219
|
-
|
|
220
|
-
s && /* @__PURE__ */ n("span", { className: `small3Regular ${t.compactStatusText}`, children:
|
|
221
|
-
|
|
219
|
+
c && /* @__PURE__ */ n("span", { className: `small3Regular ${t.compactStatusText}`, children: c }),
|
|
220
|
+
s && /* @__PURE__ */ n("span", { className: `small3Regular ${t.compactStatusText}`, children: h }),
|
|
221
|
+
a && !o && /* @__PURE__ */ n("span", { className: `small3Regular ${t.compactStatusText}`, children: a })
|
|
222
222
|
] }),
|
|
223
|
-
/* @__PURE__ */
|
|
224
|
-
!
|
|
223
|
+
/* @__PURE__ */ _("div", { className: t.compactActions, children: [
|
|
224
|
+
!c && !o && !a && !s && /* @__PURE__ */ n(
|
|
225
225
|
"div",
|
|
226
226
|
{
|
|
227
227
|
className: t.compactVisibilityIcon,
|
|
228
228
|
onClick: W,
|
|
229
229
|
children: /* @__PURE__ */ n(
|
|
230
|
-
|
|
230
|
+
I,
|
|
231
231
|
{
|
|
232
232
|
name: "Visibility",
|
|
233
233
|
fill: "#2054A5",
|
|
@@ -237,16 +237,16 @@ import '../../assets/CompactFileUpload.css';const J = "_inputContainer_1dauy_1",
|
|
|
237
237
|
)
|
|
238
238
|
}
|
|
239
239
|
),
|
|
240
|
-
(
|
|
240
|
+
(c || a || o) && /* @__PURE__ */ n(
|
|
241
241
|
$,
|
|
242
242
|
{
|
|
243
|
-
variant:
|
|
243
|
+
variant: a ? "ghost" : "outline",
|
|
244
244
|
icon: {
|
|
245
245
|
name: "CancelIcon",
|
|
246
246
|
position: "before"
|
|
247
247
|
},
|
|
248
248
|
onClick: M,
|
|
249
|
-
children:
|
|
249
|
+
children: c ? "Eliminar" : o ? "Cancelar" : ""
|
|
250
250
|
}
|
|
251
251
|
),
|
|
252
252
|
s && /* @__PURE__ */ n(
|
|
@@ -262,7 +262,7 @@ import '../../assets/CompactFileUpload.css';const J = "_inputContainer_1dauy_1",
|
|
|
262
262
|
)
|
|
263
263
|
] })
|
|
264
264
|
] })
|
|
265
|
-
) : /* @__PURE__ */ n(T, { children: /* @__PURE__ */
|
|
265
|
+
) : /* @__PURE__ */ n(T, { children: /* @__PURE__ */ _("div", { className: t.textContent, children: [
|
|
266
266
|
/* @__PURE__ */ n(
|
|
267
267
|
"div",
|
|
268
268
|
{
|
|
@@ -270,7 +270,7 @@ import '../../assets/CompactFileUpload.css';const J = "_inputContainer_1dauy_1",
|
|
|
270
270
|
style: {
|
|
271
271
|
background: "#2054A5"
|
|
272
272
|
},
|
|
273
|
-
children: /* @__PURE__ */ n("div", { style: { marginTop: "3px" }, children: /* @__PURE__ */ n(
|
|
273
|
+
children: /* @__PURE__ */ n("div", { style: { marginTop: "3px" }, children: /* @__PURE__ */ n(I, { name: "Add", fill: "white", height: 27, width: 27 }) })
|
|
274
274
|
}
|
|
275
275
|
),
|
|
276
276
|
/* @__PURE__ */ n("span", { className: `small1Medium ${t.browseText}`, children: D })
|
|
@@ -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
|
+
}, g = [
|
|
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(" "), x = [
|
|
30
30
|
a && !e ? l.passwordToggle_disabled : "",
|
|
31
31
|
e && !a ? l.passwordToggle_inverted : "",
|
|
32
32
|
e && a ? l.passwordToggle_inverted_disabled : ""
|
|
@@ -44,25 +44,15 @@ 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__ */ _(
|
|
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
|
-
)
|
|
47
|
+
m && /* @__PURE__ */ _("span", { className: `${l.required} ${a && !e ? l.required_disabled : ""} ${e && !a ? l.required_inverted : ""} ${e && a ? l.required_inverted_disabled : ""}`, children: "*" })
|
|
54
48
|
]
|
|
55
49
|
}
|
|
56
50
|
),
|
|
57
51
|
/* @__PURE__ */ n(
|
|
58
52
|
"div",
|
|
59
53
|
{
|
|
60
|
-
className:
|
|
61
|
-
style: {
|
|
62
|
-
display: "flex",
|
|
63
|
-
alignItems: "center",
|
|
64
|
-
cursor: a ? "not-allowed" : "pointer"
|
|
65
|
-
},
|
|
54
|
+
className: g,
|
|
55
|
+
style: { display: "flex", alignItems: "center", cursor: a ? "not-allowed" : "pointer" },
|
|
66
56
|
onClick: u,
|
|
67
57
|
children: [
|
|
68
58
|
/* @__PURE__ */ _(
|
|
@@ -70,11 +60,11 @@ const k = ({
|
|
|
70
60
|
{
|
|
71
61
|
ref: c,
|
|
72
62
|
type: "radio",
|
|
73
|
-
className:
|
|
63
|
+
className: x,
|
|
74
64
|
disabled: a,
|
|
75
65
|
checked: o,
|
|
76
66
|
...$,
|
|
77
|
-
style: { marginTop: "-1px"
|
|
67
|
+
style: { marginTop: "-1px" }
|
|
78
68
|
}
|
|
79
69
|
),
|
|
80
70
|
i && /* @__PURE__ */ _(
|
|
@@ -7,7 +7,7 @@ export interface SelectOption {
|
|
|
7
7
|
label: string;
|
|
8
8
|
icon?: IconName;
|
|
9
9
|
}
|
|
10
|
-
export interface SelectProps extends Omit<React.HTMLAttributes<HTMLDivElement>,
|
|
10
|
+
export interface SelectProps extends Omit<React.HTMLAttributes<HTMLDivElement>, "onChange" | "value"> {
|
|
11
11
|
size?: SelectSize;
|
|
12
12
|
label?: string;
|
|
13
13
|
error?: string;
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { jsxs as t, jsx as
|
|
2
|
-
import { useState as O, useRef as
|
|
3
|
-
import { Icon as
|
|
4
|
-
import '../../assets/Select.css';const
|
|
5
|
-
selectContainer:
|
|
6
|
-
label:
|
|
7
|
-
label_large:
|
|
1
|
+
import { jsxs as t, jsx as n } from "react/jsx-runtime";
|
|
2
|
+
import { useState as O, useRef as L, useEffect as V } from "react";
|
|
3
|
+
import { Icon as m } from "../../icons/Icon.js";
|
|
4
|
+
import '../../assets/Select.css';const W = "_selectContainer_12ph8_1", j = "_label_12ph8_7", E = "_label_large_12ph8_15", R = "_label_disabled_12ph8_20", y = "_selectWrapper_12ph8_24", A = "_select_12ph8_1", B = "_open_12ph8_59", D = "_disabled_12ph8_63", F = "_placeholder_12ph8_71", G = "_selectValue_12ph8_75", H = "_chevron_12ph8_84", J = "_chevronOpen_12ph8_89", K = "_small_12ph8_94", Q = "_withIcon_12ph8_99", U = "_medium_12ph8_103", X = "_large_12ph8_112", Y = "_error_12ph8_122", Z = "_errorShake_12ph8_1", P = "_errorMessage_12ph8_152", z = "_errorMessageSlide_12ph8_1", ee = "_errorMessage_small_12ph8_161", re = "_errorMessage_medium_12ph8_165", _e = "_errorMessage_large_12ph8_169", le = "_errorMessage_inverted_12ph8_173", ne = "_helperText_12ph8_177", se = "_helperText_small_12ph8_184", oe = "_helperText_medium_12ph8_188", te = "_helperText_large_12ph8_192", ae = "_helperText_disabled_12ph8_197", ie = "_iconLabel_12ph8_201", ce = "_icon_12ph8_201", de = "_icon_disabled_12ph8_217", pe = "_required_12ph8_222", he = "_required_inverted_12ph8_227", me = "_required_disabled_12ph8_231", ve = "_required_inverted_disabled_12ph8_235", be = "_dropdown_12ph8_240", ue = "_option_12ph8_254", ge = "_optionSelected_12ph8_307", $e = "_optionIcon_12ph8_312", xe = "_inverted_12ph8_319", Te = "_label_inverted_12ph8_341", Me = "_helperText_inverted_12ph8_345", fe = "_icon_inverted_12ph8_349", we = "_dropdown_inverted_12ph8_353", qe = "_option_inverted_12ph8_358", Ne = "_label_inverted_disabled_12ph8_449", Se = "_helperText_inverted_disabled_12ph8_453", Ie = "_icon_inverted_disabled_12ph8_457", e = {
|
|
5
|
+
selectContainer: W,
|
|
6
|
+
label: j,
|
|
7
|
+
label_large: E,
|
|
8
8
|
label_disabled: R,
|
|
9
9
|
selectWrapper: y,
|
|
10
10
|
select: A,
|
|
@@ -24,123 +24,161 @@ import '../../assets/Select.css';const j = "_selectContainer_sb3f9_1", E = "_lab
|
|
|
24
24
|
errorMessageSlide: z,
|
|
25
25
|
errorMessage_small: ee,
|
|
26
26
|
errorMessage_medium: re,
|
|
27
|
-
errorMessage_large:
|
|
28
|
-
errorMessage_inverted:
|
|
29
|
-
helperText:
|
|
30
|
-
helperText_small:
|
|
27
|
+
errorMessage_large: _e,
|
|
28
|
+
errorMessage_inverted: le,
|
|
29
|
+
helperText: ne,
|
|
30
|
+
helperText_small: se,
|
|
31
31
|
helperText_medium: oe,
|
|
32
32
|
helperText_large: te,
|
|
33
33
|
helperText_disabled: ae,
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
34
|
+
iconLabel: ie,
|
|
35
|
+
icon: ce,
|
|
36
|
+
icon_disabled: de,
|
|
37
|
+
required: pe,
|
|
38
|
+
required_inverted: he,
|
|
39
|
+
required_disabled: me,
|
|
40
|
+
required_inverted_disabled: ve,
|
|
41
|
+
dropdown: be,
|
|
42
|
+
option: ue,
|
|
43
|
+
optionSelected: ge,
|
|
44
|
+
optionIcon: $e,
|
|
45
|
+
inverted: xe,
|
|
46
|
+
label_inverted: Te,
|
|
47
|
+
helperText_inverted: Me,
|
|
48
|
+
icon_inverted: fe,
|
|
49
|
+
dropdown_inverted: we,
|
|
50
|
+
option_inverted: qe,
|
|
51
|
+
label_inverted_disabled: Ne,
|
|
51
52
|
helperText_inverted_disabled: Se,
|
|
52
|
-
icon_inverted_disabled:
|
|
53
|
-
},
|
|
53
|
+
icon_inverted_disabled: Ie
|
|
54
|
+
}, Le = ({
|
|
54
55
|
size: o = "medium",
|
|
55
|
-
label:
|
|
56
|
+
label: v,
|
|
56
57
|
error: a,
|
|
57
|
-
helperText:
|
|
58
|
-
icon:
|
|
59
|
-
className:
|
|
60
|
-
required:
|
|
58
|
+
helperText: b,
|
|
59
|
+
icon: i,
|
|
60
|
+
className: M,
|
|
61
|
+
required: f,
|
|
61
62
|
placeholder: w = "Seleccionar...",
|
|
62
|
-
options:
|
|
63
|
-
value:
|
|
64
|
-
onChange:
|
|
65
|
-
disabled:
|
|
63
|
+
options: u = [],
|
|
64
|
+
value: g,
|
|
65
|
+
onChange: $,
|
|
66
|
+
disabled: _ = !1,
|
|
66
67
|
inverted: r = !1,
|
|
67
68
|
dynamicIcon: q = !1,
|
|
68
|
-
showPlaceholderIcon:
|
|
69
|
-
...
|
|
69
|
+
showPlaceholderIcon: x = !1,
|
|
70
|
+
...N
|
|
70
71
|
}) => {
|
|
71
|
-
const [
|
|
72
|
-
|
|
73
|
-
const
|
|
74
|
-
|
|
72
|
+
const [c, p] = O(!1), h = L(null), s = u.find((l) => l.value === g);
|
|
73
|
+
V(() => {
|
|
74
|
+
const l = (k) => {
|
|
75
|
+
h.current && !h.current.contains(k.target) && p(!1);
|
|
75
76
|
};
|
|
76
|
-
return document.addEventListener("mousedown",
|
|
77
|
-
document.removeEventListener("mousedown",
|
|
77
|
+
return document.addEventListener("mousedown", l), () => {
|
|
78
|
+
document.removeEventListener("mousedown", l);
|
|
78
79
|
};
|
|
79
80
|
}, []);
|
|
80
|
-
const
|
|
81
|
+
const S = [
|
|
81
82
|
e.select,
|
|
82
83
|
e[o],
|
|
83
|
-
|
|
84
|
+
i && x ? e.withIcon : "",
|
|
84
85
|
a ? e.error : "",
|
|
85
|
-
|
|
86
|
-
|
|
86
|
+
_ ? e.disabled : "",
|
|
87
|
+
c ? e.open : "",
|
|
87
88
|
r ? e.inverted : "",
|
|
88
|
-
|
|
89
|
-
].filter(Boolean).join(" "),
|
|
90
|
-
|
|
91
|
-
}, C = (
|
|
92
|
-
|
|
89
|
+
M
|
|
90
|
+
].filter(Boolean).join(" "), d = o === "small" ? 16 : o === "large" ? 20 : 18, T = q && (s != null && s.icon) ? s.icon : i, I = () => {
|
|
91
|
+
_ || p(!c);
|
|
92
|
+
}, C = (l) => {
|
|
93
|
+
$ && $(l), p(!1);
|
|
93
94
|
};
|
|
94
|
-
return /* @__PURE__ */ t("div", { className: e.selectContainer, ...
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
95
|
+
return /* @__PURE__ */ t("div", { className: e.selectContainer, ...N, children: [
|
|
96
|
+
v && /* @__PURE__ */ t(
|
|
97
|
+
"label",
|
|
98
|
+
{
|
|
99
|
+
className: `${e.label} ${o === "large" ? e.label_large : ""} ${_ && !r ? e.label_disabled : ""} ${r && !_ ? e.label_inverted : ""} ${r && _ ? e.label_inverted_disabled : ""}`,
|
|
100
|
+
children: [
|
|
101
|
+
v,
|
|
102
|
+
/* @__PURE__ */ n(
|
|
103
|
+
"span",
|
|
104
|
+
{
|
|
105
|
+
className: `${e.required} ${_ && !r ? e.required_disabled : ""} ${r && !_ ? e.required_inverted : ""} ${r && _ ? e.required_inverted_disabled : ""}`,
|
|
106
|
+
children: f && "*"
|
|
107
|
+
}
|
|
108
|
+
)
|
|
109
|
+
]
|
|
110
|
+
}
|
|
111
|
+
),
|
|
112
|
+
/* @__PURE__ */ t("div", { className: e.selectWrapper, ref: h, children: [
|
|
113
|
+
/* @__PURE__ */ t("div", { className: S, onClick: I, children: [
|
|
114
|
+
/* @__PURE__ */ t("div", { className: e.iconLabel, children: [
|
|
115
|
+
T && x && /* @__PURE__ */ n(
|
|
116
|
+
"div",
|
|
117
|
+
{
|
|
118
|
+
className: `${e.icon} ${_ && !r ? e.icon_disabled : ""} ${r && !_ ? e.icon_inverted : ""} ${r && _ ? e.icon_inverted_disabled : ""}`,
|
|
119
|
+
children: /* @__PURE__ */ n(m, { name: T, width: d, height: d })
|
|
120
|
+
}
|
|
121
|
+
),
|
|
122
|
+
/* @__PURE__ */ n(
|
|
123
|
+
"span",
|
|
124
|
+
{
|
|
125
|
+
className: `${e.selectValue} ${s ? "" : e.placeholder}`,
|
|
126
|
+
children: s ? s.label : w
|
|
127
|
+
}
|
|
128
|
+
)
|
|
129
|
+
] }),
|
|
130
|
+
/* @__PURE__ */ n(
|
|
131
|
+
m,
|
|
132
|
+
{
|
|
133
|
+
name: "ArrowDown",
|
|
134
|
+
width: 16,
|
|
135
|
+
height: 16,
|
|
136
|
+
className: `${e.chevron} ${c ? e.chevronOpen : ""}`
|
|
137
|
+
}
|
|
138
|
+
)
|
|
139
|
+
] }),
|
|
140
|
+
c && !_ && /* @__PURE__ */ n(
|
|
109
141
|
"div",
|
|
110
142
|
{
|
|
111
|
-
className:
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
143
|
+
className: `${e.dropdown} ${r ? e.dropdown_inverted : ""}`,
|
|
144
|
+
children: u.map((l) => /* @__PURE__ */ t(
|
|
145
|
+
"div",
|
|
146
|
+
{
|
|
147
|
+
className: `${e.option} ${g === l.value ? e.optionSelected : ""} ${r ? e.option_inverted : ""}`,
|
|
148
|
+
onClick: () => C(l.value),
|
|
149
|
+
children: [
|
|
150
|
+
(l.icon || i) && /* @__PURE__ */ n("div", { className: e.optionIcon, children: /* @__PURE__ */ n(
|
|
151
|
+
m,
|
|
152
|
+
{
|
|
153
|
+
name: l.icon || i,
|
|
154
|
+
width: d,
|
|
155
|
+
height: d
|
|
156
|
+
}
|
|
157
|
+
) }),
|
|
158
|
+
l.label
|
|
159
|
+
]
|
|
160
|
+
},
|
|
161
|
+
l.value
|
|
162
|
+
))
|
|
125
163
|
}
|
|
126
|
-
)
|
|
127
|
-
i && !s && /* @__PURE__ */ l("div", { className: `${e.dropdown} ${r ? e.dropdown_inverted : ""}`, children: v.map((_) => /* @__PURE__ */ t(
|
|
128
|
-
"div",
|
|
129
|
-
{
|
|
130
|
-
className: `${e.option} ${u === _.value ? e.optionSelected : ""} ${r ? e.option_inverted : ""}`,
|
|
131
|
-
onClick: () => C(_.value),
|
|
132
|
-
children: [
|
|
133
|
-
(_.icon || d) && /* @__PURE__ */ l("div", { className: e.optionIcon, children: /* @__PURE__ */ l(f, { name: _.icon || d, width: c, height: c }) }),
|
|
134
|
-
_.label
|
|
135
|
-
]
|
|
136
|
-
},
|
|
137
|
-
_.value
|
|
138
|
-
)) })
|
|
164
|
+
)
|
|
139
165
|
] }),
|
|
140
|
-
a && /* @__PURE__ */
|
|
141
|
-
|
|
166
|
+
a && /* @__PURE__ */ n(
|
|
167
|
+
"span",
|
|
168
|
+
{
|
|
169
|
+
className: `${e.errorMessage} ${e[`errorMessage_${o}`]} ${r ? e.errorMessage_inverted : ""}`,
|
|
170
|
+
children: a
|
|
171
|
+
}
|
|
172
|
+
),
|
|
173
|
+
b && !a && /* @__PURE__ */ n(
|
|
174
|
+
"span",
|
|
175
|
+
{
|
|
176
|
+
className: `${e.helperText} ${e[`helperText_${o}`]} ${_ && !r ? e.helperText_disabled : ""} ${r && !_ ? e.helperText_inverted : ""} ${r && _ ? e.helperText_inverted_disabled : ""}`,
|
|
177
|
+
children: b
|
|
178
|
+
}
|
|
179
|
+
)
|
|
142
180
|
] });
|
|
143
181
|
};
|
|
144
182
|
export {
|
|
145
|
-
|
|
183
|
+
Le as Select
|
|
146
184
|
};
|
package/package.json
CHANGED