bmi-next-brokers 2.8.6 → 2.8.8
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/StaticToast.css +1 -0
- package/dist/components/FileUpload/CompactFileUpload.d.ts +2 -1
- package/dist/components/FileUpload/CompactFileUpload.js +60 -59
- package/dist/components/StaticToast/StaticToast.d.ts +27 -0
- package/dist/components/StaticToast/StaticToast.js +228 -0
- package/dist/components/StaticToast/index.d.ts +2 -0
- package/dist/components/StaticToast/index.js +4 -0
- package/dist/icons/Icon.js +1 -1
- package/dist/icons/components/AddAlert.js +36 -7
- package/dist/icons/components/Aetna.js +18 -1
- package/dist/icons/components/AnchorEmpty.js +36 -7
- package/dist/icons/components/AnchorFill.js +37 -8
- package/dist/icons/components/ArrowForward.js +37 -8
- package/dist/icons/components/ArrowTree.js +1 -1
- package/dist/icons/components/ArrowTreeDown.js +4 -4
- package/dist/icons/components/ArrowTreeRight.js +3 -3
- package/dist/icons/components/Assignment.js +37 -8
- package/dist/icons/components/CheckCircle.js +36 -7
- package/dist/icons/components/ChevronLeft.js +6 -6
- package/dist/icons/components/ChevronRight.js +37 -8
- package/dist/icons/components/Comunicaciones.js +36 -7
- package/dist/icons/components/DirectorioMedico.js +9 -7
- package/dist/icons/components/Facturas.js +36 -7
- package/dist/icons/components/Female.js +18 -1
- package/dist/icons/components/Handshake.js +10 -8
- package/dist/icons/components/Headset.js +37 -8
- package/dist/icons/components/Home.js +37 -8
- package/dist/icons/components/Hospital.js +27 -4
- package/dist/icons/components/Male.js +19 -2
- package/dist/icons/components/PetSupplies.js +20 -8
- package/dist/icons/components/PolizaIcon.js +10 -8
- package/dist/icons/components/Schedule.js +36 -7
- package/dist/icons/components/Stethoscope.js +35 -6
- package/dist/icons/components/Swich.js +37 -8
- package/dist/icons/components/TrendingDown.js +37 -8
- package/dist/icons/components/TrendingUp.js +10 -8
- package/dist/icons/components/WavingHand.js +36 -7
- package/dist/icons/index.js +1 -1
- package/dist/{index-v_jla2lD.js → index-KJHuFJDv.js} +1 -1
- package/dist/main.d.ts +2 -0
- package/dist/main.js +30 -28
- package/package.json +1 -1
- /package/dist/icons/components/{Rin/314/203ones.d.ts" → Ri/303/261ones.d.ts"} +0 -0
- /package/dist/icons/components/{Rin/314/203ones.js" → Ri/303/261ones.js"} +0 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
._toast_2sram_2{position:relative;width:100%;min-width:0;max-width:420px;border-radius:12px;align-items:center;border-left:4px solid;overflow:hidden;cursor:default;display:flex;flex-direction:column;gap:.75em;box-sizing:border-box}._topRow_2sram_19{display:flex;align-items:center;gap:.75rem;width:100%}._bottomRow_2sram_26{display:flex;justify-content:center;width:100%}._iconContainer_2sram_33{flex-shrink:0;width:24px;margin-left:5px;height:24px;display:flex;align-items:center;justify-content:center;margin-top:.125rem}._content_2sram_45{display:flex;flex-direction:column;justify-content:center;align-items:flex-start;flex:1;min-width:0;gap:2px;overflow:visible;word-break:break-word}._small2Bold_2sram_58{font-size:12px;font-weight:600;line-height:1.3}._small5Regular_2sram_64{font-size:11px;font-weight:400;line-height:1.4}._bodyBold_2sram_70{font-size:14px;font-weight:600;line-height:1.3}._small2Medium_2sram_76{font-size:12px;font-weight:500;line-height:1.4}._title6Bold_2sram_82{font-size:16px;font-weight:600;line-height:1.3}._bodyMedium_2sram_88{font-size:14px;font-weight:500;line-height:1.4}._actionButton_2sram_95{flex-shrink:0;background:transparent!important}._toast_2sram_2 ._actionButton_2sram_95{border:1px solid var(--Badge-Toasts-Stroke, #2054a5)!important;color:var(--Badge-Toasts-Stroke, #2054a5)!important;background-color:transparent!important}._type_brand_2sram_106 ._actionButton_2sram_95,._type_info_2sram_111 ._actionButton_2sram_95{border:1px solid #2054a5!important;color:#2054a5!important}._type_new_2sram_116 ._actionButton_2sram_95{border:1px solid #0f93a8!important;color:#0f93a8!important}._type_pending_2sram_121 ._actionButton_2sram_95{border:1px solid #ca8a04!important;color:#ca8a04!important}._type_positive_2sram_126 ._actionButton_2sram_95{border:1px solid #65a30d!important;color:#65a30d!important}._type_warning_2sram_131 ._actionButton_2sram_95{border:1px solid #ea580c!important;color:#ea580c!important}._type_negative_2sram_136 ._actionButton_2sram_95{border:1px solid #dc2626!important;color:#dc2626!important}._toast_2sram_2 ._actionButton_2sram_95:hover:not(:disabled){border-width:1px!important;background-color:transparent!important}._closeButton_2sram_147{flex-shrink:0;background:none;border:none;cursor:pointer;padding:0 0 0 7px;display:flex;align-items:center;justify-content:center;transition:all .2s ease;margin-right:.5rem}._closeButton_2sram_147:active{transform:scale(.95)}._progressBar_2sram_166{position:absolute;bottom:0;left:0;height:3px;background:currentColor;opacity:.6;animation:_progressBarShrink_2sram_1 linear;transform-origin:left}._entering_2sram_178{animation:_staticToastIn_2sram_1 .3s cubic-bezier(.16,1,.3,1) forwards}._exiting_2sram_182{animation:_staticToastOut_2sram_1 .3s cubic-bezier(.4,0,1,1) forwards}@keyframes _staticToastIn_2sram_1{0%{opacity:0;transform:translateY(-6px) scale(.98);filter:blur(3px)}to{opacity:1;transform:translateY(0) scale(1);filter:blur(0)}}@keyframes _staticToastOut_2sram_1{0%{opacity:1;transform:translateY(0) scale(1);filter:blur(0)}to{opacity:0;transform:translateY(-6px) scale(.98);filter:blur(3px)}}@keyframes _progressBarShrink_2sram_1{0%{transform:scaleX(1)}to{transform:scaleX(0)}}._toast_2sram_2:hover ._progressBar_2sram_166{animation-play-state:paused}@media (prefers-reduced-motion: reduce){._toast_2sram_2,._entering_2sram_178,._exiting_2sram_182,._progressBar_2sram_166{animation:none!important}}._content_2sram_45:only-child,._content_2sram_45:not(:has(._body_2sram_70)){justify-content:center}
|
|
@@ -25,7 +25,8 @@ export interface CompactFileUploadProps extends React.InputHTMLAttributes<HTMLIn
|
|
|
25
25
|
statusIconBorderRadius?: string;
|
|
26
26
|
customIcon?: IconName;
|
|
27
27
|
customInspectIcon?: IconName;
|
|
28
|
+
hideInspectIcon?: boolean;
|
|
28
29
|
fullWidth?: boolean;
|
|
29
30
|
clearFileText?: string;
|
|
30
31
|
}
|
|
31
|
-
export declare const CompactFileUpload: ({ variant, label, error, success, warning, loading, defaultFile, disabled, inverted, browseText, clearFileText, allowedTypes, inspectFileFunction, onInvalidTypeAction, maxFileSize, onInvalidSizeAction, onFileSelect, onSuccessAction, statusIconBorderRadius, customIcon, customInspectIcon, fullWidth, ...props }: CompactFileUploadProps) => import("react/jsx-runtime").JSX.Element;
|
|
32
|
+
export declare const CompactFileUpload: ({ variant, label, error, success, warning, loading, defaultFile, disabled, inverted, browseText, clearFileText, allowedTypes, inspectFileFunction, onInvalidTypeAction, maxFileSize, onInvalidSizeAction, onFileSelect, onSuccessAction, statusIconBorderRadius, customIcon, customInspectIcon, hideInspectIcon, fullWidth, ...props }: CompactFileUploadProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,39 +1,39 @@
|
|
|
1
1
|
import { jsx as e, jsxs as s, Fragment as T } from "react/jsx-runtime";
|
|
2
|
-
import { useState as W, useRef as
|
|
2
|
+
import { useState as W, useRef as z, useEffect as L } from "react";
|
|
3
3
|
import { Icon as h } from "../../icons/Icon.js";
|
|
4
|
-
import { Spinner as
|
|
4
|
+
import { Spinner as tt } from "../Spinner/Spinner.js";
|
|
5
5
|
import { Button as j } from "../Button/Button.js";
|
|
6
|
-
import '../../assets/CompactFileUpload.css';const
|
|
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:
|
|
23
|
-
compactFileIcon:
|
|
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
|
-
},
|
|
6
|
+
import '../../assets/CompactFileUpload.css';const et = "_inputContainer_4x7bg_1", at = "_compactFileUploadContainer_4x7bg_9", nt = "_fullWidth_4x7bg_26", ct = "_dragOver_4x7bg_35", ot = "_variant_document_4x7bg_41", it = "_icon_4x7bg_41", lt = "_variant_add_4x7bg_45", st = "_disabled_4x7bg_50", rt = "_error_4x7bg_61", mt = "_warning_4x7bg_69", dt = "_inverted_4x7bg_78", pt = "_uploadContent_4x7bg_103", _t = "_textContent_4x7bg_113", ht = "_dragText_4x7bg_123", ut = "_hiddenInput_4x7bg_153", gt = "_compactFileContent_4x7bg_166", xt = "_compactFileIcon_4x7bg_174", ft = "_compactIconBackground_4x7bg_182", bt = "_compactFileText_4x7bg_190", vt = "_compactLabel_4x7bg_202", Ct = "_compactFileName_4x7bg_209", Nt = "_compactStatusText_4x7bg_210", Ft = "_success_4x7bg_221", It = "_loading_4x7bg_229", wt = "_addIconWrapper_4x7bg_233", Dt = "_browseText_4x7bg_239", yt = "_compactVisibilityIcon_4x7bg_246", $t = "_compactActions_4x7bg_255", kt = "_deleteText_4x7bg_262", t = {
|
|
7
|
+
inputContainer: et,
|
|
8
|
+
compactFileUploadContainer: at,
|
|
9
|
+
fullWidth: nt,
|
|
10
|
+
dragOver: ct,
|
|
11
|
+
variant_document: ot,
|
|
12
|
+
icon: it,
|
|
13
|
+
variant_add: lt,
|
|
14
|
+
disabled: st,
|
|
15
|
+
error: rt,
|
|
16
|
+
warning: mt,
|
|
17
|
+
inverted: dt,
|
|
18
|
+
uploadContent: pt,
|
|
19
|
+
textContent: _t,
|
|
20
|
+
dragText: ht,
|
|
21
|
+
hiddenInput: ut,
|
|
22
|
+
compactFileContent: gt,
|
|
23
|
+
compactFileIcon: xt,
|
|
24
|
+
compactIconBackground: ft,
|
|
25
|
+
compactFileText: bt,
|
|
26
|
+
compactLabel: vt,
|
|
27
|
+
compactFileName: Ct,
|
|
28
|
+
compactStatusText: Nt,
|
|
29
|
+
success: Ft,
|
|
30
|
+
loading: It,
|
|
31
|
+
addIconWrapper: wt,
|
|
32
|
+
browseText: Dt,
|
|
33
|
+
compactVisibilityIcon: yt,
|
|
34
|
+
compactActions: $t,
|
|
35
|
+
deleteText: kt
|
|
36
|
+
}, Ot = ({
|
|
37
37
|
variant: B = "document",
|
|
38
38
|
label: u,
|
|
39
39
|
error: o,
|
|
@@ -59,10 +59,11 @@ import '../../assets/CompactFileUpload.css';const tt = "_inputContainer_4x7bg_1"
|
|
|
59
59
|
statusIconBorderRadius: y = "50%",
|
|
60
60
|
customIcon: U = "Documentos",
|
|
61
61
|
customInspectIcon: V = "Visibility",
|
|
62
|
-
|
|
63
|
-
|
|
62
|
+
hideInspectIcon: M = !1,
|
|
63
|
+
fullWidth: A = !1,
|
|
64
|
+
...S
|
|
64
65
|
}) => {
|
|
65
|
-
const [
|
|
66
|
+
const [q, N] = W(!1), [i, F] = W(null), _ = z(null);
|
|
66
67
|
L(() => {
|
|
67
68
|
F(w ?? null);
|
|
68
69
|
}, [w]), L(() => {
|
|
@@ -72,17 +73,17 @@ import '../../assets/CompactFileUpload.css';const tt = "_inputContainer_4x7bg_1"
|
|
|
72
73
|
`⚠️ CompactFileUpload: Múltiples estados detectados (${a.join(", ")}). Solo un estado debe estar activo a la vez.`
|
|
73
74
|
);
|
|
74
75
|
}, [o, n, c, i]);
|
|
75
|
-
const
|
|
76
|
+
const H = (a) => {
|
|
76
77
|
a.preventDefault(), m || N(!0);
|
|
77
|
-
}, H = (a) => {
|
|
78
|
-
a.preventDefault(), N(!1);
|
|
79
78
|
}, P = (a) => {
|
|
80
|
-
a.preventDefault();
|
|
79
|
+
a.preventDefault(), N(!1);
|
|
81
80
|
}, G = (a) => {
|
|
81
|
+
a.preventDefault();
|
|
82
|
+
}, J = (a) => {
|
|
82
83
|
if (a.preventDefault(), N(!1), m) return;
|
|
83
84
|
const r = a.dataTransfer.files;
|
|
84
85
|
$(r);
|
|
85
|
-
},
|
|
86
|
+
}, K = async (a) => {
|
|
86
87
|
const r = a.target.files;
|
|
87
88
|
$(r);
|
|
88
89
|
}, $ = async (a) => {
|
|
@@ -112,17 +113,17 @@ import '../../assets/CompactFileUpload.css';const tt = "_inputContainer_4x7bg_1"
|
|
|
112
113
|
return l.items.add(r), l.files;
|
|
113
114
|
})() : null
|
|
114
115
|
));
|
|
115
|
-
},
|
|
116
|
+
}, Q = () => {
|
|
116
117
|
!i && !m && _.current && _.current.click();
|
|
117
118
|
}, k = () => {
|
|
118
119
|
F(null), _.current && (_.current.value = "");
|
|
119
|
-
}, Q = () => {
|
|
120
|
-
k();
|
|
121
120
|
}, X = () => {
|
|
121
|
+
k();
|
|
122
|
+
}, Y = () => {
|
|
122
123
|
C == null || C(), k();
|
|
123
|
-
},
|
|
124
|
+
}, Z = [
|
|
124
125
|
t.compactFileUploadContainer,
|
|
125
|
-
|
|
126
|
+
A && t.fullWidth,
|
|
126
127
|
t[`variant_${B}`],
|
|
127
128
|
!i && g ? t.warning : "",
|
|
128
129
|
i && !c && !n && o ? t.error : "",
|
|
@@ -130,19 +131,19 @@ import '../../assets/CompactFileUpload.css';const tt = "_inputContainer_4x7bg_1"
|
|
|
130
131
|
i && !o && !c && n ? t.success : "",
|
|
131
132
|
m ? t.disabled : "",
|
|
132
133
|
E ? t.inverted : "",
|
|
133
|
-
|
|
134
|
+
q ? t.dragOver : ""
|
|
134
135
|
].filter(Boolean).join(" ");
|
|
135
136
|
return /* @__PURE__ */ e("div", { className: t.inputContainer, children: /* @__PURE__ */ s(
|
|
136
137
|
"div",
|
|
137
138
|
{
|
|
138
|
-
className:
|
|
139
|
-
onDragEnter:
|
|
140
|
-
onDragLeave:
|
|
141
|
-
onDragOver:
|
|
142
|
-
onDrop:
|
|
143
|
-
onClick:
|
|
139
|
+
className: Z,
|
|
140
|
+
onDragEnter: H,
|
|
141
|
+
onDragLeave: P,
|
|
142
|
+
onDragOver: G,
|
|
143
|
+
onDrop: J,
|
|
144
|
+
onClick: Q,
|
|
144
145
|
style: { cursor: m ? "not-allowed" : "pointer" },
|
|
145
|
-
...
|
|
146
|
+
...S,
|
|
146
147
|
children: [
|
|
147
148
|
/* @__PURE__ */ e(
|
|
148
149
|
"input",
|
|
@@ -150,7 +151,7 @@ import '../../assets/CompactFileUpload.css';const tt = "_inputContainer_4x7bg_1"
|
|
|
150
151
|
ref: _,
|
|
151
152
|
type: "file",
|
|
152
153
|
className: t.hiddenInput,
|
|
153
|
-
onChange:
|
|
154
|
+
onChange: K,
|
|
154
155
|
disabled: m,
|
|
155
156
|
accept: d == null ? void 0 : d.join(",")
|
|
156
157
|
}
|
|
@@ -176,7 +177,7 @@ import '../../assets/CompactFileUpload.css';const tt = "_inputContainer_4x7bg_1"
|
|
|
176
177
|
margin: "4px"
|
|
177
178
|
},
|
|
178
179
|
children: /* @__PURE__ */ e(
|
|
179
|
-
|
|
180
|
+
tt,
|
|
180
181
|
{
|
|
181
182
|
size: 10,
|
|
182
183
|
color: "primary",
|
|
@@ -230,7 +231,7 @@ import '../../assets/CompactFileUpload.css';const tt = "_inputContainer_4x7bg_1"
|
|
|
230
231
|
c && /* @__PURE__ */ e("span", { className: `small3Regular ${t.compactStatusText}`, children: c })
|
|
231
232
|
] }),
|
|
232
233
|
/* @__PURE__ */ s("div", { className: t.compactActions, children: [
|
|
233
|
-
!o && !c && !n && /* @__PURE__ */ e(
|
|
234
|
+
!o && !c && !n && !M && /* @__PURE__ */ e(
|
|
234
235
|
"div",
|
|
235
236
|
{
|
|
236
237
|
className: t.compactVisibilityIcon,
|
|
@@ -255,7 +256,7 @@ import '../../assets/CompactFileUpload.css';const tt = "_inputContainer_4x7bg_1"
|
|
|
255
256
|
position: "before"
|
|
256
257
|
},
|
|
257
258
|
onClick: (a) => {
|
|
258
|
-
a.stopPropagation(), n ?
|
|
259
|
+
a.stopPropagation(), n ? Y() : X();
|
|
259
260
|
},
|
|
260
261
|
children: x || ""
|
|
261
262
|
}
|
|
@@ -331,5 +332,5 @@ import '../../assets/CompactFileUpload.css';const tt = "_inputContainer_4x7bg_1"
|
|
|
331
332
|
) });
|
|
332
333
|
};
|
|
333
334
|
export {
|
|
334
|
-
|
|
335
|
+
Ot as CompactFileUpload
|
|
335
336
|
};
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { IconName } from '../../icons/Icon';
|
|
2
|
+
export type StaticToastType = "brand" | "info" | "new" | "pending" | "positive" | "warning" | "negative";
|
|
3
|
+
export type StaticToastSize = "small" | "medium" | "large";
|
|
4
|
+
export interface StaticToastProps {
|
|
5
|
+
type?: StaticToastType;
|
|
6
|
+
title?: string;
|
|
7
|
+
body?: string;
|
|
8
|
+
size?: StaticToastSize;
|
|
9
|
+
icon?: IconName;
|
|
10
|
+
/** Controla la visibilidad del toast. Por defecto visible. */
|
|
11
|
+
isVisible?: boolean;
|
|
12
|
+
/** Muestra el botón de cierre (X). Por defecto true. */
|
|
13
|
+
closable?: boolean;
|
|
14
|
+
onClose?: () => void;
|
|
15
|
+
/** Cierra automáticamente tras `duration` ms. Por defecto false en el StaticToast. */
|
|
16
|
+
autoClose?: boolean;
|
|
17
|
+
/** Duración del autoClose en ms y de la barra de progreso. */
|
|
18
|
+
duration?: number;
|
|
19
|
+
className?: string;
|
|
20
|
+
/** Estilos inline para integrarlo como un div normal (ancho, márgenes, etc.). */
|
|
21
|
+
style?: React.CSSProperties;
|
|
22
|
+
action?: {
|
|
23
|
+
label: string;
|
|
24
|
+
function: () => void;
|
|
25
|
+
};
|
|
26
|
+
}
|
|
27
|
+
export declare const StaticToast: ({ type, title, body, size, icon, isVisible, closable, onClose, autoClose, duration, className, style, action, }: StaticToastProps) => import("react/jsx-runtime").JSX.Element | null;
|
|
@@ -0,0 +1,228 @@
|
|
|
1
|
+
import { jsxs as B, jsx as t } from "react/jsx-runtime";
|
|
2
|
+
import { useState as R, useEffect as x } from "react";
|
|
3
|
+
import { Icon as w } from "../../icons/Icon.js";
|
|
4
|
+
import { Button as D } from "../Button/Button.js";
|
|
5
|
+
import '../../assets/StaticToast.css';const j = "_toast_2sram_2", O = "_topRow_2sram_19", P = "_bottomRow_2sram_26", $ = "_iconContainer_2sram_33", H = "_content_2sram_45", L = "_small2Bold_2sram_58", W = "_small5Regular_2sram_64", q = "_bodyBold_2sram_70", G = "_small2Medium_2sram_76", J = "_title6Bold_2sram_82", K = "_bodyMedium_2sram_88", Q = "_actionButton_2sram_95", U = "_type_brand_2sram_106", X = "_type_info_2sram_111", Y = "_type_new_2sram_116", Z = "_type_pending_2sram_121", S = "_type_positive_2sram_126", V = "_type_warning_2sram_131", z = "_type_negative_2sram_136", oo = "_closeButton_2sram_147", ro = "_progressBar_2sram_166", to = "_progressBarShrink_2sram_1", eo = "_entering_2sram_178", ao = "_staticToastIn_2sram_1", so = "_exiting_2sram_182", no = "_staticToastOut_2sram_1", lo = "_body_2sram_70", r = {
|
|
6
|
+
toast: j,
|
|
7
|
+
topRow: O,
|
|
8
|
+
bottomRow: P,
|
|
9
|
+
iconContainer: $,
|
|
10
|
+
content: H,
|
|
11
|
+
small2Bold: L,
|
|
12
|
+
small5Regular: W,
|
|
13
|
+
bodyBold: q,
|
|
14
|
+
small2Medium: G,
|
|
15
|
+
title6Bold: J,
|
|
16
|
+
bodyMedium: K,
|
|
17
|
+
actionButton: Q,
|
|
18
|
+
type_brand: U,
|
|
19
|
+
type_info: X,
|
|
20
|
+
type_new: Y,
|
|
21
|
+
type_pending: Z,
|
|
22
|
+
type_positive: S,
|
|
23
|
+
type_warning: V,
|
|
24
|
+
type_negative: z,
|
|
25
|
+
closeButton: oo,
|
|
26
|
+
progressBar: ro,
|
|
27
|
+
progressBarShrink: to,
|
|
28
|
+
entering: eo,
|
|
29
|
+
staticToastIn: ao,
|
|
30
|
+
exiting: so,
|
|
31
|
+
staticToastOut: no,
|
|
32
|
+
body: lo
|
|
33
|
+
}, po = ({
|
|
34
|
+
type: i = "info",
|
|
35
|
+
title: y,
|
|
36
|
+
body: v,
|
|
37
|
+
size: s = "small",
|
|
38
|
+
icon: E,
|
|
39
|
+
isVisible: m = !0,
|
|
40
|
+
closable: A = !0,
|
|
41
|
+
onClose: g,
|
|
42
|
+
autoClose: u = !1,
|
|
43
|
+
duration: d = 5e3,
|
|
44
|
+
className: N,
|
|
45
|
+
style: M,
|
|
46
|
+
action: p
|
|
47
|
+
}) => {
|
|
48
|
+
const [c, f] = R(m), [_, C] = R(!1);
|
|
49
|
+
x(() => {
|
|
50
|
+
m ? (C(!1), f(!0)) : c && b();
|
|
51
|
+
}, [m]), x(() => {
|
|
52
|
+
if (u && c && !_ && d > 0) {
|
|
53
|
+
const l = setTimeout(() => {
|
|
54
|
+
b();
|
|
55
|
+
}, d);
|
|
56
|
+
return () => clearTimeout(l);
|
|
57
|
+
}
|
|
58
|
+
}, [c, d, u, _]);
|
|
59
|
+
const b = () => {
|
|
60
|
+
C(!0), setTimeout(() => {
|
|
61
|
+
f(!1), g == null || g();
|
|
62
|
+
}, 300);
|
|
63
|
+
}, e = {
|
|
64
|
+
small: "10px 8px",
|
|
65
|
+
medium: "14px 10px",
|
|
66
|
+
large: "14px 12px"
|
|
67
|
+
}, a = {
|
|
68
|
+
small: "18px",
|
|
69
|
+
medium: "20px",
|
|
70
|
+
large: "24px"
|
|
71
|
+
}, T = {
|
|
72
|
+
small: { title: "small2Bold", body: "small5Regular" },
|
|
73
|
+
medium: { title: "bodyBold", body: "small2Medium" },
|
|
74
|
+
large: { title: "title6Bold", body: "bodyMedium" }
|
|
75
|
+
}, h = (l, o) => {
|
|
76
|
+
switch (l) {
|
|
77
|
+
case "brand":
|
|
78
|
+
return {
|
|
79
|
+
borderColor: "var(--Badge-Toasts-Stroke, #2054A5)",
|
|
80
|
+
background: "var(--Badge-Toasts-Fill, #FFF)",
|
|
81
|
+
padding: e[o],
|
|
82
|
+
borderRadius: a[o]
|
|
83
|
+
};
|
|
84
|
+
case "info":
|
|
85
|
+
return {
|
|
86
|
+
borderColor: "var(--Badge-Toasts-Stroke, #2054A5)",
|
|
87
|
+
background: "var(--Badge-Toasts-Fill, #E0E9F8)",
|
|
88
|
+
padding: e[o],
|
|
89
|
+
borderRadius: a[o]
|
|
90
|
+
};
|
|
91
|
+
case "new":
|
|
92
|
+
return {
|
|
93
|
+
borderColor: "var(--Badge-Toasts-Stroke, #0F93A8)",
|
|
94
|
+
background: "var(--Badge-Toasts-Fill, #D6F4F8)",
|
|
95
|
+
padding: e[o],
|
|
96
|
+
borderRadius: a[o]
|
|
97
|
+
};
|
|
98
|
+
case "pending":
|
|
99
|
+
return {
|
|
100
|
+
borderColor: "var(--Badge-Toasts-Stroke, #CA8A04)",
|
|
101
|
+
background: "var(--Badge-Toasts-Fill, #FEF9C3)",
|
|
102
|
+
padding: e[o],
|
|
103
|
+
borderRadius: a[o]
|
|
104
|
+
};
|
|
105
|
+
case "positive":
|
|
106
|
+
return {
|
|
107
|
+
borderColor: "var(--Badge-Toasts-Stroke, #65A30D)",
|
|
108
|
+
background: "var(--Badge-Toasts-Fill, #ECFCCB)",
|
|
109
|
+
padding: e[o],
|
|
110
|
+
borderRadius: a[o]
|
|
111
|
+
};
|
|
112
|
+
case "warning":
|
|
113
|
+
return {
|
|
114
|
+
borderColor: "var(--Badge-Toasts-Stroke, #EA580C)",
|
|
115
|
+
background: "var(--Badge-Toasts-Fill, #FFEDD5)",
|
|
116
|
+
padding: e[o],
|
|
117
|
+
borderRadius: a[o]
|
|
118
|
+
};
|
|
119
|
+
case "negative":
|
|
120
|
+
return {
|
|
121
|
+
borderColor: "var(--Badge-Toasts-Stroke, #DC2626)",
|
|
122
|
+
background: "var(--Badge-Toasts-Fill, #FEE2E2)",
|
|
123
|
+
padding: e[o],
|
|
124
|
+
borderRadius: a[o]
|
|
125
|
+
};
|
|
126
|
+
default:
|
|
127
|
+
return {
|
|
128
|
+
borderColor: "var(--Badge-Toasts-Stroke, #2054A5)",
|
|
129
|
+
background: "var(--Badge-Toasts-Fill, #E0E9F8)",
|
|
130
|
+
padding: e[o],
|
|
131
|
+
borderRadius: a[o]
|
|
132
|
+
};
|
|
133
|
+
}
|
|
134
|
+
}, k = (l, o) => {
|
|
135
|
+
const F = h(l, o).borderColor.match(/#([0-9A-Fa-f]{6})/);
|
|
136
|
+
return F ? F[0] : null;
|
|
137
|
+
};
|
|
138
|
+
if (!c) return null;
|
|
139
|
+
const I = [
|
|
140
|
+
r.toast,
|
|
141
|
+
r[`type_${i}`],
|
|
142
|
+
_ ? r.exiting : r.entering,
|
|
143
|
+
N
|
|
144
|
+
].filter(Boolean).join(" "), n = h(i, s);
|
|
145
|
+
return /* @__PURE__ */ B(
|
|
146
|
+
"div",
|
|
147
|
+
{
|
|
148
|
+
className: I,
|
|
149
|
+
style: {
|
|
150
|
+
border: "1px solid " + n.borderColor,
|
|
151
|
+
background: n.background,
|
|
152
|
+
padding: n.padding,
|
|
153
|
+
borderRadius: n.borderRadius,
|
|
154
|
+
...M
|
|
155
|
+
},
|
|
156
|
+
role: "alert",
|
|
157
|
+
"aria-live": "polite",
|
|
158
|
+
children: [
|
|
159
|
+
/* @__PURE__ */ B("div", { className: r.topRow, children: [
|
|
160
|
+
/* @__PURE__ */ t("div", { className: r.iconContainer, children: /* @__PURE__ */ t(
|
|
161
|
+
w,
|
|
162
|
+
{
|
|
163
|
+
name: E || "Info",
|
|
164
|
+
fill: k(i, s) || "#2054A5",
|
|
165
|
+
width: 25,
|
|
166
|
+
height: 25
|
|
167
|
+
}
|
|
168
|
+
) }),
|
|
169
|
+
/* @__PURE__ */ B("div", { className: r.content, children: [
|
|
170
|
+
y && /* @__PURE__ */ t("div", { className: r[T[s].title], children: y }),
|
|
171
|
+
v && /* @__PURE__ */ t(
|
|
172
|
+
"div",
|
|
173
|
+
{
|
|
174
|
+
className: r[T[s].body],
|
|
175
|
+
style: { color: n.borderColor },
|
|
176
|
+
children: v
|
|
177
|
+
}
|
|
178
|
+
)
|
|
179
|
+
] }),
|
|
180
|
+
A && /* @__PURE__ */ t(
|
|
181
|
+
"button",
|
|
182
|
+
{
|
|
183
|
+
className: r.closeButton,
|
|
184
|
+
style: {
|
|
185
|
+
borderLeft: "1px solid " + n.borderColor
|
|
186
|
+
},
|
|
187
|
+
onClick: b,
|
|
188
|
+
"aria-label": "Cerrar notificación",
|
|
189
|
+
children: /* @__PURE__ */ t(
|
|
190
|
+
w,
|
|
191
|
+
{
|
|
192
|
+
name: "CancelIcon",
|
|
193
|
+
fill: k(i, s) || "#2054A5",
|
|
194
|
+
width: 20,
|
|
195
|
+
height: 20
|
|
196
|
+
}
|
|
197
|
+
)
|
|
198
|
+
}
|
|
199
|
+
)
|
|
200
|
+
] }),
|
|
201
|
+
p && /* @__PURE__ */ t("div", { className: r.bottomRow, children: /* @__PURE__ */ t(
|
|
202
|
+
D,
|
|
203
|
+
{
|
|
204
|
+
onClick: p.function,
|
|
205
|
+
variant: "outline",
|
|
206
|
+
size: s,
|
|
207
|
+
className: r.actionButton,
|
|
208
|
+
fullWidth: !0,
|
|
209
|
+
children: p.label
|
|
210
|
+
}
|
|
211
|
+
) }),
|
|
212
|
+
u && d > 0 && /* @__PURE__ */ t(
|
|
213
|
+
"div",
|
|
214
|
+
{
|
|
215
|
+
className: r.progressBar,
|
|
216
|
+
style: {
|
|
217
|
+
animationDuration: `${d}ms`,
|
|
218
|
+
animationPlayState: _ ? "paused" : "running"
|
|
219
|
+
}
|
|
220
|
+
}
|
|
221
|
+
)
|
|
222
|
+
]
|
|
223
|
+
}
|
|
224
|
+
);
|
|
225
|
+
};
|
|
226
|
+
export {
|
|
227
|
+
po as StaticToast
|
|
228
|
+
};
|
package/dist/icons/Icon.js
CHANGED
|
@@ -1,10 +1,39 @@
|
|
|
1
1
|
import { jsxs as t, jsx as h } from "react/jsx-runtime";
|
|
2
|
-
const
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
2
|
+
const r = (e) => /* @__PURE__ */ t(
|
|
3
|
+
"svg",
|
|
4
|
+
{
|
|
5
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
6
|
+
fill: "none",
|
|
7
|
+
viewBox: "0 0 18 18",
|
|
8
|
+
width: "1em",
|
|
9
|
+
height: "1em",
|
|
10
|
+
...e,
|
|
11
|
+
children: [
|
|
12
|
+
/* @__PURE__ */ h(
|
|
13
|
+
"mask",
|
|
14
|
+
{
|
|
15
|
+
id: "add_alert_svg__a",
|
|
16
|
+
width: 18,
|
|
17
|
+
height: 18,
|
|
18
|
+
x: 0,
|
|
19
|
+
y: 0,
|
|
20
|
+
maskUnits: "userSpaceOnUse",
|
|
21
|
+
style: {
|
|
22
|
+
maskType: "alpha"
|
|
23
|
+
},
|
|
24
|
+
children: /* @__PURE__ */ h("path", { fill: "currentColor", d: "M0 0h18v18H0z" })
|
|
25
|
+
}
|
|
26
|
+
),
|
|
27
|
+
/* @__PURE__ */ h("g", { mask: "url(#add_alert_svg__a)", children: /* @__PURE__ */ h(
|
|
28
|
+
"path",
|
|
29
|
+
{
|
|
30
|
+
fill: "currentColor",
|
|
31
|
+
d: "M8.25 11.25h1.5v-1.5h1.5v-1.5h-1.5v-1.5h-1.5v1.5h-1.5v1.5h1.5zm-5.25 3v-1.5h1.5V7.5q0-1.556.938-2.766A4.33 4.33 0 0 1 7.874 3.15v-.525q0-.468.328-.797Q8.532 1.5 9 1.5t.797.328q.328.328.328.797v.525q1.5.375 2.438 1.584.937 1.21.937 2.766v5.25H15v1.5zm6 2.25q-.619 0-1.06-.44A1.45 1.45 0 0 1 7.5 15h3q0 .619-.44 1.06-.442.44-1.06.44m-3-3.75h6V7.5q0-1.237-.881-2.119A2.9 2.9 0 0 0 9 4.5q-1.237 0-2.119.881A2.9 2.9 0 0 0 6 7.5z"
|
|
32
|
+
}
|
|
33
|
+
) })
|
|
34
|
+
]
|
|
35
|
+
}
|
|
36
|
+
);
|
|
8
37
|
export {
|
|
9
|
-
|
|
38
|
+
r as default
|
|
10
39
|
};
|
|
@@ -1,5 +1,22 @@
|
|
|
1
1
|
import { jsx as c } from "react/jsx-runtime";
|
|
2
|
-
const v = (h) => /* @__PURE__ */ c(
|
|
2
|
+
const v = (h) => /* @__PURE__ */ c(
|
|
3
|
+
"svg",
|
|
4
|
+
{
|
|
5
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
6
|
+
fill: "none",
|
|
7
|
+
viewBox: "0 0 77 15",
|
|
8
|
+
width: "1em",
|
|
9
|
+
height: "1em",
|
|
10
|
+
...h,
|
|
11
|
+
children: /* @__PURE__ */ c(
|
|
12
|
+
"path",
|
|
13
|
+
{
|
|
14
|
+
fill: "currentColor",
|
|
15
|
+
d: "M71.15 11.191c0-1.01.118-2.473.118-4.179 0-3.158-1.3-4.34-4.82-4.34-1.705 0-3.203.243-4.133.65l.118 2.508c.812-.442 1.985-.848 3.122-.848 1.625 0 2.067.65 2.067 2.229v.244h-.523c-3.972 0-5.84 1.218-5.84 3.447s1.138 3.646 4.423 3.646c1.741 0 3.402-.243 5.631-.243-.162-.849-.162-2.193-.162-3.123zm-4.62 1.21c-1.218 0-1.742-.407-1.742-1.418s.65-1.543 2.31-1.543h.488c0 .93-.036 2.067.036 2.834-.28.081-.686.117-1.092.117zm-30.64-.118c-1.985 0-3.041-1.01-3.041-2.635v-.082c.36 0 1.056.037 1.462.037 3.529 0 5.306-1.092 5.306-3.484 0-2.067-1.498-3.402-4.702-3.402-3.934 0-5.469 1.741-5.839 4.864-.568-.036-1.218-.036-2.067-.036V7.02c0-3.158-1.3-4.34-4.819-4.34-1.706 0-3.204.243-4.133.65l.117 2.508c.812-.442 1.986-.848 3.123-.848 1.624 0 2.112.65 2.112 2.229v.244h-.524c-3.97 0-5.84 1.218-5.84 3.447s1.138 3.646 4.423 3.646c1.742 0 3.403-.243 5.632-.243-.163-.93-.163-2.266-.163-3.16 0-.486.036-1.055.036-1.705.93 0 1.625.045 2.067.045.325 3.728 2.265 5.063 6.245 5.063 1.463 0 2.96-.243 3.773-.604l-.117-2.51c-.768.488-1.869.849-3.042.849zm-13.582.117c-1.219 0-1.742-.406-1.742-1.417 0-1.01.65-1.543 2.31-1.543h.487c0 .93-.036 2.067.037 2.834-.28.081-.731.117-1.092.117zm10.505-4.819c0-1.58.487-2.753 1.949-2.753.812 0 1.38.443 1.38 1.219 0 1.092-.73 1.624-2.274 1.624-.36 0-.767 0-1.055-.036zm26.993 1.498V6.85c0-2.879-1.254-4.133-4.819-4.133-1.986 0-3.402.36-5.632.36.118 2.031.118 4.504.118 6.038s-.036 4.377-.118 5.27h3.809c-.081-.893-.163-3.528-.163-5.27 0-1.01 0-2.229.037-3.853.36-.118.848-.244 1.38-.244 1.336 0 1.787.605 1.787 2.346V9.07c0 1.58-.036 4.377-.117 5.27h3.809c0-.893-.082-3.483-.082-5.27zm-12.003 2.753.163 2.509c-.28.08-1.219.243-2.428.243-2.51 0-3.854-1.056-3.854-3.646 0-2.03.036-4.26.036-5.469h-1.3c.046-.568 0-1.336 0-1.904C42.37 3.24 42.976 2.148 43.3 0h2.148c-.082.893-.118 2.148-.163 3.041h2.274V5.47h-2.31v4.422c0 1.706.361 2.194 1.498 2.194.406 0 .849-.082 1.056-.244zM4.438 1.66c.487 0 .93.162 1.3.523l2.111 2.112 2.112-2.112a1.78 1.78 0 0 1 1.3-.523c.442 0 .93.162 1.3.523l2.59 2.59a1.804 1.804 0 0 1 0 2.59l-7.292 7.257-7.31-7.284a1.804 1.804 0 0 1 0-2.59l2.59-2.59a1.9 1.9 0 0 1 1.299-.487m67.444 1.047h1.985v.406H73.1v2.03h-.487v-2.03h-.767zm2.427 0h.65l.325 1.055c.081.325.244.93.244.93s.162-.605.243-.93l.325-1.055h.65v2.427h-.442v-.893c0-.442.036-1.092.036-1.092s-.162.568-.28 1.056l-.28.93h-.442l-.28-.93a11 11 0 0 1-.28-1.056s.046.686.046 1.092v.893h-.442V2.717z"
|
|
16
|
+
}
|
|
17
|
+
)
|
|
18
|
+
}
|
|
19
|
+
);
|
|
3
20
|
export {
|
|
4
21
|
v as default
|
|
5
22
|
};
|
|
@@ -1,10 +1,39 @@
|
|
|
1
1
|
import { jsxs as h, jsx as a } from "react/jsx-runtime";
|
|
2
|
-
const
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
2
|
+
const r = (e) => /* @__PURE__ */ h(
|
|
3
|
+
"svg",
|
|
4
|
+
{
|
|
5
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
6
|
+
fill: "none",
|
|
7
|
+
viewBox: "0 0 16 16",
|
|
8
|
+
width: "1em",
|
|
9
|
+
height: "1em",
|
|
10
|
+
...e,
|
|
11
|
+
children: [
|
|
12
|
+
/* @__PURE__ */ a(
|
|
13
|
+
"mask",
|
|
14
|
+
{
|
|
15
|
+
id: "anchor_empty_svg__a",
|
|
16
|
+
width: 16,
|
|
17
|
+
height: 16,
|
|
18
|
+
x: 0,
|
|
19
|
+
y: 0,
|
|
20
|
+
maskUnits: "userSpaceOnUse",
|
|
21
|
+
style: {
|
|
22
|
+
maskType: "alpha"
|
|
23
|
+
},
|
|
24
|
+
children: /* @__PURE__ */ a("path", { fill: "currentColor", d: "M0 0h16v16H0z" })
|
|
25
|
+
}
|
|
26
|
+
),
|
|
27
|
+
/* @__PURE__ */ a("g", { mask: "url(#anchor_empty_svg__a)", children: /* @__PURE__ */ a(
|
|
28
|
+
"path",
|
|
29
|
+
{
|
|
30
|
+
fill: "currentColor",
|
|
31
|
+
d: "M10.667 3.333V8L11.8 9.133a.67.67 0 0 1 .2.484V10a.65.65 0 0 1-.192.475.65.65 0 0 1-.475.192H8.667v3.9a.65.65 0 0 1-.192.475.65.65 0 0 1-.475.191.65.65 0 0 1-.475-.191.65.65 0 0 1-.192-.475v-3.9H4.667a.65.65 0 0 1-.475-.192A.65.65 0 0 1 4 10v-.383a.7.7 0 0 1 .2-.484L5.333 8V3.333a.65.65 0 0 1-.475-.191.65.65 0 0 1-.191-.475q0-.285.191-.475A.65.65 0 0 1 5.333 2h5.334q.283 0 .475.192a.65.65 0 0 1 .191.475.65.65 0 0 1-.191.475.65.65 0 0 1-.475.191m-4.767 6h4.2l-.767-.766V3.333H6.667v5.234z"
|
|
32
|
+
}
|
|
33
|
+
) })
|
|
34
|
+
]
|
|
35
|
+
}
|
|
36
|
+
);
|
|
8
37
|
export {
|
|
9
|
-
|
|
38
|
+
r as default
|
|
10
39
|
};
|