@imj_media/ui 1.0.18 → 1.0.19
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/index.esm.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { jsxs as u, jsx as o, Fragment as b1 } from "react/jsx-runtime";
|
|
2
|
-
import a1, { useState as $, useRef as G, useEffect as
|
|
2
|
+
import a1, { useState as $, useRef as G, useEffect as z, useCallback as H, forwardRef as j1, useImperativeHandle as I1, useId as K1, createContext as Q1, useContext as W1, useMemo as n0 } from "react";
|
|
3
3
|
import { clsx as e0 } from "clsx";
|
|
4
4
|
import { twMerge as o0 } from "tailwind-merge";
|
|
5
5
|
import { cva as t1 } from "class-variance-authority";
|
|
@@ -367,7 +367,7 @@ function N0({
|
|
|
367
367
|
/* @__PURE__ */ o("path", { d: "M5 15.998V16.748C5 17.848 5.9 18.748 7 18.748H8.66", stroke: n, strokeWidth: e, strokeLinecap: "round", strokeLinejoin: "round" })
|
|
368
368
|
] });
|
|
369
369
|
}
|
|
370
|
-
function
|
|
370
|
+
function z0({
|
|
371
371
|
width: r = 24,
|
|
372
372
|
height: i = 24,
|
|
373
373
|
fill: t = "none",
|
|
@@ -380,7 +380,7 @@ function P0({
|
|
|
380
380
|
/* @__PURE__ */ o("path", { d: "M8.01945 20.9999H5.98426C4.88026 20.9999 3.98267 20.1023 3.98267 18.9983V4.99679C3.98267 3.8928 4.88026 3 5.98426 3H12.2194C12.7522 3 13.261 3.2112 13.6354 3.5856L17.4658 7.41118C17.6386 7.58398 17.773 7.78558 17.869 8.00158", stroke: n, strokeWidth: e, strokeLinecap: "round" })
|
|
381
381
|
] });
|
|
382
382
|
}
|
|
383
|
-
function
|
|
383
|
+
function P0({
|
|
384
384
|
width: r = 24,
|
|
385
385
|
height: i = 24,
|
|
386
386
|
fill: t = "none",
|
|
@@ -1118,17 +1118,14 @@ function N2({
|
|
|
1118
1118
|
stroke: n = "currentColor",
|
|
1119
1119
|
strokeWidth: e = 2
|
|
1120
1120
|
}) {
|
|
1121
|
-
return /* @__PURE__ */
|
|
1122
|
-
/* @__PURE__ */
|
|
1123
|
-
|
|
1124
|
-
|
|
1125
|
-
|
|
1126
|
-
|
|
1127
|
-
] }),
|
|
1128
|
-
/* @__PURE__ */ o("defs", { children: /* @__PURE__ */ o("clipPath", { id: "clip0_29848_88185", children: /* @__PURE__ */ o("rect", { width: r, height: i, fill: t }) }) })
|
|
1129
|
-
] });
|
|
1121
|
+
return /* @__PURE__ */ o("svg", { width: r, height: i, viewBox: "0 0 24 24", fill: t, xmlns: "http://www.w3.org/2000/svg", children: /* @__PURE__ */ u("g", { clipPath: "url(#clip0_29848_88185)", children: [
|
|
1122
|
+
/* @__PURE__ */ o("path", { d: "M16.8758 11.4121L10.178 18.104C10.0179 18.27 9.80453 18.3767 9.57337 18.4122L7.20838 18.7856C6.84682 18.839 6.53267 18.5248 6.58601 18.1633L6.95351 15.7924C6.98907 15.5671 7.09576 15.3537 7.26173 15.1878L13.9536 8.49586C14.3804 8.06909 15.0798 8.06909 15.5125 8.49586L16.8758 9.85913C17.3026 10.2859 17.3026 10.9794 16.8758 11.4121Z", stroke: n, strokeWidth: e, strokeMiterlimit: "10" }),
|
|
1123
|
+
/* @__PURE__ */ o("path", { d: "M7.9314 14.5234L10.8476 17.4397", stroke: n, strokeWidth: e, strokeMiterlimit: "10" }),
|
|
1124
|
+
/* @__PURE__ */ o("path", { d: "M16.354 0.748047V4.65413C16.354 4.95642 16.597 5.19944 16.8993 5.19944H20.7817", stroke: n, strokeWidth: e, strokeLinecap: "round" }),
|
|
1125
|
+
/* @__PURE__ */ o("path", { d: "M20.7819 22.0271V5.03355C20.7819 4.71347 20.6574 4.39933 20.4262 4.16816L17.4152 1.10968C17.184 0.872588 16.8699 0.742188 16.5379 0.742188H4.22695C3.54531 0.742188 3 1.29343 3 1.96914V22.0152C3 22.6969 3.55124 23.2422 4.22695 23.2422H19.549C20.2306 23.2422 20.7759 22.6909 20.7759 22.0152L20.7819 22.0271Z", stroke: n, strokeWidth: e })
|
|
1126
|
+
] }) });
|
|
1130
1127
|
}
|
|
1131
|
-
function
|
|
1128
|
+
function z2({
|
|
1132
1129
|
width: r = 24,
|
|
1133
1130
|
height: i = 24,
|
|
1134
1131
|
fill: t = "none",
|
|
@@ -1141,7 +1138,7 @@ function P2({
|
|
|
1141
1138
|
/* @__PURE__ */ o("path", { d: "M16.9498 12.998H6.95142V20.9996H16.9498V12.998Z", stroke: n, strokeWidth: e, strokeLinecap: "round", strokeLinejoin: "round" })
|
|
1142
1139
|
] });
|
|
1143
1140
|
}
|
|
1144
|
-
function
|
|
1141
|
+
function P2({
|
|
1145
1142
|
width: r = 24,
|
|
1146
1143
|
height: i = 24,
|
|
1147
1144
|
fill: t = "none",
|
|
@@ -1939,7 +1936,7 @@ function N9({
|
|
|
1939
1936
|
/* @__PURE__ */ o("path", { d: "M3 13.4199H20.0497", stroke: n, strokeWidth: e, strokeLinecap: "round", strokeLinejoin: "round" })
|
|
1940
1937
|
] });
|
|
1941
1938
|
}
|
|
1942
|
-
function
|
|
1939
|
+
function z9({
|
|
1943
1940
|
width: r = 24,
|
|
1944
1941
|
height: i = 24,
|
|
1945
1942
|
fill: t = "none",
|
|
@@ -1958,7 +1955,7 @@ function P9({
|
|
|
1958
1955
|
/* @__PURE__ */ o("path", { d: "M21.0327 16.3477V19.3477C21.0327 20.4477 20.1327 21.3477 19.0327 21.3477H5.03271C3.93271 21.3477 3.03271 20.4477 3.03271 19.3477V16.3477C3.03271 15.8677 3.20271 15.4277 3.49271 15.0777C3.86271 14.6277 4.41271 14.3477 5.03271 14.3477H19.0327C20.1327 14.3477 21.0327 15.2477 21.0327 16.3477Z", stroke: n, strokeWidth: e, strokeLinecap: "round", strokeLinejoin: "round" })
|
|
1959
1956
|
] });
|
|
1960
1957
|
}
|
|
1961
|
-
function
|
|
1958
|
+
function P9({
|
|
1962
1959
|
width: r = 24,
|
|
1963
1960
|
height: i = 24,
|
|
1964
1961
|
fill: t = "none",
|
|
@@ -2692,7 +2689,7 @@ function N4({
|
|
|
2692
2689
|
}) {
|
|
2693
2690
|
return /* @__PURE__ */ o("svg", { width: r, height: i, viewBox: "0 0 24 24", fill: t, xmlns: "http://www.w3.org/2000/svg", children: /* @__PURE__ */ o("path", { d: "M20.535 7.005C20.535 7.515 20.345 8.025 19.955 8.415L10.305 18.065C9.525 18.845 8.255 18.845 7.475 18.065L6.055 16.645L3.585 14.175C2.805 13.395 2.805 12.135 3.585 11.355C3.975 10.965 4.495 10.765 5.005 10.765C5.515 10.765 6.025 10.965 6.415 11.355L8.885 13.815L17.125 5.585C17.905 4.805 19.175 4.805 19.955 5.585C20.345 5.975 20.535 6.485 20.535 7.005Z", stroke: n, strokeWidth: e, strokeLinecap: "round", strokeLinejoin: "round" }) });
|
|
2694
2691
|
}
|
|
2695
|
-
function
|
|
2692
|
+
function z4({
|
|
2696
2693
|
width: r = 24,
|
|
2697
2694
|
height: i = 24,
|
|
2698
2695
|
fill: t = "none",
|
|
@@ -2701,7 +2698,7 @@ function P4({
|
|
|
2701
2698
|
}) {
|
|
2702
2699
|
return /* @__PURE__ */ o("svg", { width: r, height: i, viewBox: "0 0 24 24", fill: t, xmlns: "http://www.w3.org/2000/svg", children: /* @__PURE__ */ o("path", { d: "M19.2774 12.9972C17.5574 14.7172 15.0375 15.1412 12.9127 14.2691L6.18188 21L2.98267 17.8008L9.71354 11.0699C8.84146 8.94996 9.26545 6.4301 10.9855 4.70522C12.7056 2.98035 15.3411 2.5419 17.4851 3.49107L13.25 7.72617L16.2613 10.7375L20.4964 6.50237C21.4408 8.64642 21.0312 11.2482 19.2823 13.002L19.2774 12.9972Z", stroke: n, strokeWidth: e, strokeLinecap: "round", strokeLinejoin: "round" }) });
|
|
2703
2700
|
}
|
|
2704
|
-
function
|
|
2701
|
+
function P4({
|
|
2705
2702
|
width: r = 24,
|
|
2706
2703
|
height: i = 24,
|
|
2707
2704
|
fill: t = "none",
|
|
@@ -3451,7 +3448,7 @@ function Nn({
|
|
|
3451
3448
|
/* @__PURE__ */ o("path", { d: "M12.0305 15.998V17.9996", stroke: n, strokeWidth: e })
|
|
3452
3449
|
] });
|
|
3453
3450
|
}
|
|
3454
|
-
function
|
|
3451
|
+
function zn({
|
|
3455
3452
|
width: r = 24,
|
|
3456
3453
|
height: i = 24,
|
|
3457
3454
|
fill: t = "none",
|
|
@@ -3466,7 +3463,7 @@ function Pn({
|
|
|
3466
3463
|
/* @__PURE__ */ o("path", { d: "M3 5H9.00001", stroke: n, strokeWidth: e, strokeLinecap: "round", strokeLinejoin: "round" })
|
|
3467
3464
|
] });
|
|
3468
3465
|
}
|
|
3469
|
-
function
|
|
3466
|
+
function Pn({
|
|
3470
3467
|
width: r = 24,
|
|
3471
3468
|
height: i = 24,
|
|
3472
3469
|
fill: t = "none",
|
|
@@ -4191,7 +4188,7 @@ function N8({
|
|
|
4191
4188
|
/* @__PURE__ */ o("path", { d: "M18.9983 20.9997V18.998", stroke: n, strokeWidth: e, strokeMiterlimit: "10", strokeLinecap: "round" })
|
|
4192
4189
|
] });
|
|
4193
4190
|
}
|
|
4194
|
-
function
|
|
4191
|
+
function z8({
|
|
4195
4192
|
width: r = 24,
|
|
4196
4193
|
height: i = 24,
|
|
4197
4194
|
fill: t = "none",
|
|
@@ -4205,7 +4202,7 @@ function P8({
|
|
|
4205
4202
|
/* @__PURE__ */ o("path", { d: "M18.7037 21.0004H5.99806C4.67325 21.0004 3.71325 19.7284 4.07805 18.4564L4.93726 15.4468C5.18206 14.5924 5.96446 14.002 6.85726 14.002H9.37246L9.54046 14.17L12.3581 17.002L15.1853 14.17L15.3533 14.002H17.8445C18.7373 14.002 19.5197 14.5924 19.7645 15.4468L20.6237 18.4564C20.9885 19.7284 20.0333 21.0004 18.7037 21.0004Z", stroke: n, strokeWidth: e, strokeMiterlimit: "10" })
|
|
4206
4203
|
] });
|
|
4207
4204
|
}
|
|
4208
|
-
function
|
|
4205
|
+
function P8({
|
|
4209
4206
|
width: r = 24,
|
|
4210
4207
|
height: i = 24,
|
|
4211
4208
|
fill: t = "none",
|
|
@@ -4367,7 +4364,7 @@ const m1 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
4367
4364
|
ArrowDownOutlined: Sn,
|
|
4368
4365
|
ArrowDownRightOutlined: Wn,
|
|
4369
4366
|
ArrowHorizontalOutlined: B9,
|
|
4370
|
-
ArrowLeftOutlined:
|
|
4367
|
+
ArrowLeftOutlined: P0,
|
|
4371
4368
|
ArrowRightOutlined: Jn,
|
|
4372
4369
|
ArrowUpLeftOutlined: v4,
|
|
4373
4370
|
ArrowUpOutlined: k9,
|
|
@@ -4398,7 +4395,7 @@ const m1 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
4398
4395
|
CaretRightOutlined: i8,
|
|
4399
4396
|
CaretUpOutlined: M8,
|
|
4400
4397
|
CatalogoOutlined: jn,
|
|
4401
|
-
CentrosComercialesOutlined:
|
|
4398
|
+
CentrosComercialesOutlined: z9,
|
|
4402
4399
|
Check2Outlined: Yn,
|
|
4403
4400
|
CheckOutlined: N4,
|
|
4404
4401
|
ChevronCircleDownOutlined: t2,
|
|
@@ -4447,7 +4444,7 @@ const m1 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
4447
4444
|
ElipsisVerticalOutlined: I8,
|
|
4448
4445
|
EmojiOutlined: ln,
|
|
4449
4446
|
EmojiSadOutlined: Q2,
|
|
4450
|
-
EspectacularOutlined:
|
|
4447
|
+
EspectacularOutlined: P4,
|
|
4451
4448
|
EstatusCampanaOutlined: D0,
|
|
4452
4449
|
EstatusProyectoOutlined: f4,
|
|
4453
4450
|
ExclamationCircleOutlined: R4,
|
|
@@ -4458,7 +4455,7 @@ const m1 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
4458
4455
|
FastBackward2Outlined: Un,
|
|
4459
4456
|
FemaleOutlined: q4,
|
|
4460
4457
|
FileKmlOutlined: Q0,
|
|
4461
|
-
FileOkOutlined:
|
|
4458
|
+
FileOkOutlined: z0,
|
|
4462
4459
|
FileOutlined: D8,
|
|
4463
4460
|
FilePdfOutlined: o4,
|
|
4464
4461
|
FileXlsOutlined: h2,
|
|
@@ -4479,7 +4476,7 @@ const m1 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
4479
4476
|
HandOutlined: $n,
|
|
4480
4477
|
HardOutlined: T9,
|
|
4481
4478
|
HistoryOutlined: J2,
|
|
4482
|
-
HomeOutlined:
|
|
4479
|
+
HomeOutlined: Pn,
|
|
4483
4480
|
IconsboxOutlined: X4,
|
|
4484
4481
|
IdOutlined: n2,
|
|
4485
4482
|
ImageOutlined: v9,
|
|
@@ -4507,16 +4504,16 @@ const m1 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
4507
4504
|
ListaCampanas2Outlined: f9,
|
|
4508
4505
|
ListaCampanasOutlined: w2,
|
|
4509
4506
|
LocationpinOutlined: g9,
|
|
4510
|
-
LockOpenOutlined:
|
|
4507
|
+
LockOpenOutlined: P2,
|
|
4511
4508
|
LockOutlined: x4,
|
|
4512
4509
|
LogoutOutlined: u4,
|
|
4513
4510
|
LongitudeOutlined: f8,
|
|
4514
4511
|
LuggageOutlined: G4,
|
|
4515
4512
|
MailOutlined: S4,
|
|
4516
|
-
MaintenanceOutlined:
|
|
4517
|
-
MaleOutlined:
|
|
4513
|
+
MaintenanceOutlined: z4,
|
|
4514
|
+
MaleOutlined: P8,
|
|
4518
4515
|
MallOutlined: $2,
|
|
4519
|
-
MapOutlined:
|
|
4516
|
+
MapOutlined: z8,
|
|
4520
4517
|
MaximizeOutlined: g2,
|
|
4521
4518
|
MediumOutlined: L9,
|
|
4522
4519
|
MinimizeOutlined: U2,
|
|
@@ -4569,7 +4566,7 @@ const m1 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
4569
4566
|
RouteOutlined: O2,
|
|
4570
4567
|
RouteSlashOutlined: F4,
|
|
4571
4568
|
SackDollarOutlined: Nn,
|
|
4572
|
-
SaveOutlined:
|
|
4569
|
+
SaveOutlined: z2,
|
|
4573
4570
|
ScissorsOutlined: Y0,
|
|
4574
4571
|
ScreenOutlined: an,
|
|
4575
4572
|
SearchCompanyOutlined: o9,
|
|
@@ -4609,7 +4606,7 @@ const m1 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
4609
4606
|
TableOutlined: F9,
|
|
4610
4607
|
TagOutlined: s8,
|
|
4611
4608
|
TaskListOutlined: J0,
|
|
4612
|
-
TaskOutlined:
|
|
4609
|
+
TaskOutlined: zn,
|
|
4613
4610
|
TelegramOutlined: l4,
|
|
4614
4611
|
ThumbtackOutlined: V8,
|
|
4615
4612
|
TimelineOutlined: mn,
|
|
@@ -4630,7 +4627,7 @@ const m1 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
4630
4627
|
UserPlusOutlined: Z8,
|
|
4631
4628
|
UsersOutlined: o2,
|
|
4632
4629
|
VallasMovilesOutlined: rn,
|
|
4633
|
-
VistaDerechaOutlined:
|
|
4630
|
+
VistaDerechaOutlined: P9,
|
|
4634
4631
|
VistaIndefinidaOutlined: J9,
|
|
4635
4632
|
VistaIzquierdaOutlined: nn,
|
|
4636
4633
|
VistaListaOutlined: o8,
|
|
@@ -5088,7 +5085,7 @@ const X8 = ({ label: r, color: i = "blue", border: t = !1, className: n, ...e })
|
|
|
5088
5085
|
...s
|
|
5089
5086
|
}) => {
|
|
5090
5087
|
const [p, h] = $(!1), [M, v] = $({ top: 0, left: 0 }), [w, g] = $({ width: 0, height: 0 }), [x, b] = $(!1), y = G(null), I = G(null), k = G(null), T = G(`tooltip-${Math.random().toString(36).substring(2, 9)}-${Date.now()}`);
|
|
5091
|
-
|
|
5088
|
+
z(() => {
|
|
5092
5089
|
I.current && p && requestAnimationFrame(() => {
|
|
5093
5090
|
if (I.current) {
|
|
5094
5091
|
const f = I.current.getBoundingClientRect(), V = {
|
|
@@ -5163,11 +5160,11 @@ const X8 = ({ label: r, color: i = "blue", border: t = !1, className: n, ...e })
|
|
|
5163
5160
|
const U = window.innerWidth, Q = window.innerHeight, E = 8;
|
|
5164
5161
|
Z < E ? Z = E : Z + w.width > U - E && (Z = U - w.width - E), V < E ? V = E : V + w.height > Q - E && (V = Q - w.height - E), v({ top: V, left: Z }), b(!0);
|
|
5165
5162
|
}, [t, n, w]);
|
|
5166
|
-
|
|
5163
|
+
z(() => {
|
|
5167
5164
|
p && w.width > 0 && w.height > 0 && requestAnimationFrame(() => {
|
|
5168
5165
|
S();
|
|
5169
5166
|
});
|
|
5170
|
-
}, [p, w, S]),
|
|
5167
|
+
}, [p, w, S]), z(() => {
|
|
5171
5168
|
const f = () => {
|
|
5172
5169
|
p && S();
|
|
5173
5170
|
}, V = () => {
|
|
@@ -5184,7 +5181,7 @@ const X8 = ({ label: r, color: i = "blue", border: t = !1, className: n, ...e })
|
|
|
5184
5181
|
}, [d, l]), j = H(() => {
|
|
5185
5182
|
k.current && (clearTimeout(k.current), k.current = null), h(!1), b(!1), g({ width: 0, height: 0 });
|
|
5186
5183
|
}, []);
|
|
5187
|
-
|
|
5184
|
+
z(() => () => {
|
|
5188
5185
|
k.current && clearTimeout(k.current), h(!1), b(!1), v({ top: 0, left: 0 }), g({ width: 0, height: 0 });
|
|
5189
5186
|
}, []);
|
|
5190
5187
|
const O = () => {
|
|
@@ -5205,7 +5202,7 @@ const X8 = ({ label: r, color: i = "blue", border: t = !1, className: n, ...e })
|
|
|
5205
5202
|
}
|
|
5206
5203
|
);
|
|
5207
5204
|
return s1(f, document.body);
|
|
5208
|
-
},
|
|
5205
|
+
}, P = () => {
|
|
5209
5206
|
const V = W8(e);
|
|
5210
5207
|
switch (t) {
|
|
5211
5208
|
case "top":
|
|
@@ -5369,7 +5366,7 @@ const X8 = ({ label: r, color: i = "blue", border: t = !1, className: n, ...e })
|
|
|
5369
5366
|
...s,
|
|
5370
5367
|
children: [
|
|
5371
5368
|
i,
|
|
5372
|
-
/* @__PURE__ */ o("div", { className: A("tooltip-imj-ui-arrow", c), style:
|
|
5369
|
+
/* @__PURE__ */ o("div", { className: A("tooltip-imj-ui-arrow", c), style: P() })
|
|
5373
5370
|
]
|
|
5374
5371
|
}
|
|
5375
5372
|
);
|
|
@@ -5497,7 +5494,7 @@ const X8 = ({ label: r, color: i = "blue", border: t = !1, className: n, ...e })
|
|
|
5497
5494
|
defaultTooltipColor: m = !0,
|
|
5498
5495
|
as: j = "button",
|
|
5499
5496
|
classNameId: O = "imj-ui-inner-button",
|
|
5500
|
-
tooltip:
|
|
5497
|
+
tooltip: P = "",
|
|
5501
5498
|
tooltipPosition: R,
|
|
5502
5499
|
tooltipAlignment: f,
|
|
5503
5500
|
tooltipColor: V = "neutral",
|
|
@@ -5519,7 +5516,7 @@ const X8 = ({ label: r, color: i = "blue", border: t = !1, className: n, ...e })
|
|
|
5519
5516
|
" "
|
|
5520
5517
|
] }),
|
|
5521
5518
|
l && s && /* @__PURE__ */ o(X8, { color: l, label: d, border: C }),
|
|
5522
|
-
!s && h && (typeof h == "string" ? /* @__PURE__ */ o(C1, { name: h, size: a === "icon" ? v
|
|
5519
|
+
!s && h && (typeof h == "string" ? /* @__PURE__ */ o(C1, { name: h, size: a === "icon" ? v : T !== "none" ? T : v, color: y, onClick: x }) : h),
|
|
5523
5520
|
s && e && /* @__PURE__ */ o(d1, { slot: e, size: v, colorIcon: y, className: r, onClick: x, defaultSizeIcon: u1 })
|
|
5524
5521
|
] }), _ = w ? "!ui-p-0 ui-flex ui-justify-center !ui-font-medium ui-items-center" : "", o1 = t1(
|
|
5525
5522
|
`${O} ui-flex ui-items-center ui-gap-x-1.5 ui-transition-colors ui-duration-300 ui-border-[1.5px] ui-font-bold ui-cursor-default ${I && a !== "icon" ? "ui-shadow-button" : ""} ui-overflow-hidden ${Q || n1 ? "!ui-cursor-pointer" : ""}`,
|
|
@@ -5586,7 +5583,7 @@ const X8 = ({ label: r, color: i = "blue", border: t = !1, className: n, ...e })
|
|
|
5586
5583
|
) : /* @__PURE__ */ o(
|
|
5587
5584
|
e3,
|
|
5588
5585
|
{
|
|
5589
|
-
label:
|
|
5586
|
+
label: P,
|
|
5590
5587
|
position: R,
|
|
5591
5588
|
alignment: f,
|
|
5592
5589
|
color: m ? V || "neutral" : L,
|
|
@@ -5848,11 +5845,11 @@ const X8 = ({ label: r, color: i = "blue", border: t = !1, className: n, ...e })
|
|
|
5848
5845
|
}[r][i]}`;
|
|
5849
5846
|
}, l3 = ({ open: r, externalIsLeaving: i }) => {
|
|
5850
5847
|
const [t, n] = $(!1), [e, a] = $(!1), l = i !== void 0 ? i : e;
|
|
5851
|
-
return
|
|
5848
|
+
return z(() => {
|
|
5852
5849
|
r ? (n(!0), a(!1)) : (a(!0), i === void 0 && setTimeout(() => {
|
|
5853
5850
|
n(!1);
|
|
5854
5851
|
}, 300));
|
|
5855
|
-
}, [r, i]),
|
|
5852
|
+
}, [r, i]), z(() => {
|
|
5856
5853
|
i && i !== e && (a(!0), setTimeout(() => {
|
|
5857
5854
|
n(!1);
|
|
5858
5855
|
}, 300));
|
|
@@ -6103,18 +6100,18 @@ const L3 = (r) => {
|
|
|
6103
6100
|
}, []), S = H(() => {
|
|
6104
6101
|
if (!L.current)
|
|
6105
6102
|
return;
|
|
6106
|
-
const m = L.current.getBoundingClientRect(), j = window.innerHeight, O = window.innerWidth,
|
|
6103
|
+
const m = L.current.getBoundingClientRect(), j = window.innerHeight, O = window.innerWidth, P = 320, R = 256, f = 8;
|
|
6107
6104
|
let V, Z = m.left;
|
|
6108
6105
|
const F = j - m.bottom, U = m.top;
|
|
6109
|
-
F >=
|
|
6106
|
+
F >= P + f ? V = m.bottom + f : U >= P + f ? V = m.top - P + f : F > U ? V = m.bottom + f : V = m.top - P + f, m.left + R > O && (Z = m.right - R), Z = Math.max(0, Math.min(Z, O - R)), C((Q) => ({ ...Q, portalPosition: { top: V, left: Z } }));
|
|
6110
6107
|
}, []);
|
|
6111
|
-
return
|
|
6108
|
+
return z(() => {
|
|
6112
6109
|
if (!d.isOpen) return;
|
|
6113
6110
|
const m = () => S(), j = () => S();
|
|
6114
6111
|
return window.addEventListener("scroll", m, !0), window.addEventListener("resize", j), () => {
|
|
6115
6112
|
window.removeEventListener("scroll", m, !0), window.removeEventListener("resize", j);
|
|
6116
6113
|
};
|
|
6117
|
-
}, [d.isOpen, S]),
|
|
6114
|
+
}, [d.isOpen, S]), z(() => {
|
|
6118
6115
|
d.isOpen && S();
|
|
6119
6116
|
}, [d.isOpen, S]), {
|
|
6120
6117
|
state: d,
|
|
@@ -6260,7 +6257,7 @@ const L3 = (r) => {
|
|
|
6260
6257
|
}, [i]), a = H((d) => {
|
|
6261
6258
|
d.key === "Escape" && i();
|
|
6262
6259
|
}, [i]);
|
|
6263
|
-
|
|
6260
|
+
z(() => {
|
|
6264
6261
|
if (r)
|
|
6265
6262
|
return document.addEventListener("mousedown", e), document.addEventListener("keydown", a), () => {
|
|
6266
6263
|
document.removeEventListener("mousedown", e), document.removeEventListener("keydown", a);
|
|
@@ -6848,7 +6845,7 @@ const L3 = (r) => {
|
|
|
6848
6845
|
initialViewMode: m = "days",
|
|
6849
6846
|
closeOnSelect: j = !1,
|
|
6850
6847
|
autoCloseRange: O = !0,
|
|
6851
|
-
placeholder:
|
|
6848
|
+
placeholder: P = "Seleccionar fecha",
|
|
6852
6849
|
format: R = "dd/MM/yyyy",
|
|
6853
6850
|
renderHeader: f,
|
|
6854
6851
|
renderDay: V
|
|
@@ -6872,7 +6869,7 @@ const L3 = (r) => {
|
|
|
6872
6869
|
{
|
|
6873
6870
|
ref: Q,
|
|
6874
6871
|
value: q(),
|
|
6875
|
-
placeholder:
|
|
6872
|
+
placeholder: P,
|
|
6876
6873
|
isOpen: Z.isOpen,
|
|
6877
6874
|
onInputClick: E.openPicker,
|
|
6878
6875
|
className: h,
|
|
@@ -6925,12 +6922,12 @@ const L3 = (r) => {
|
|
|
6925
6922
|
position: C = "right"
|
|
6926
6923
|
}) => {
|
|
6927
6924
|
const L = typeof window < "u", [c, s] = $(!1), [p, h] = $(!1), [M] = $(() => L ? document.createElement("div") : null), v = G(null);
|
|
6928
|
-
if (
|
|
6925
|
+
if (z(() => {
|
|
6929
6926
|
if (!(!M || !L))
|
|
6930
6927
|
return document.body.appendChild(M), () => {
|
|
6931
6928
|
document.body.removeChild(M);
|
|
6932
6929
|
};
|
|
6933
|
-
}, [M]),
|
|
6930
|
+
}, [M]), z(() => {
|
|
6934
6931
|
if (r) {
|
|
6935
6932
|
s(!0);
|
|
6936
6933
|
const g = setTimeout(() => {
|
|
@@ -6942,18 +6939,18 @@ const L3 = (r) => {
|
|
|
6942
6939
|
const g = setTimeout(() => s(!1), 300);
|
|
6943
6940
|
return () => clearTimeout(g);
|
|
6944
6941
|
}
|
|
6945
|
-
}, [r]),
|
|
6942
|
+
}, [r]), z(() => {
|
|
6946
6943
|
if (L)
|
|
6947
6944
|
return r ? document.body.style.overflow = "ui-hidden" : document.body.style.overflow = "", () => {
|
|
6948
6945
|
document.body.style.overflow = "";
|
|
6949
6946
|
};
|
|
6950
|
-
}, [r, L]),
|
|
6947
|
+
}, [r, L]), z(() => {
|
|
6951
6948
|
if (!r || l) return;
|
|
6952
6949
|
const g = (x) => {
|
|
6953
6950
|
x.key === "Escape" && i();
|
|
6954
6951
|
};
|
|
6955
6952
|
return window.addEventListener("keydown", g), () => window.removeEventListener("keydown", g);
|
|
6956
|
-
}, [r, i, l]),
|
|
6953
|
+
}, [r, i, l]), z(() => {
|
|
6957
6954
|
if (!r || !d) return;
|
|
6958
6955
|
const g = [
|
|
6959
6956
|
"button",
|
|
@@ -7047,18 +7044,18 @@ const L3 = (r) => {
|
|
|
7047
7044
|
md: "ui-h-10 ui-text-sm ui-py-2",
|
|
7048
7045
|
lg: "ui-h-12 ui-text-base ui-py-2.5"
|
|
7049
7046
|
}, T = () => {
|
|
7050
|
-
const m = n || "md", j = !!a, O = !!l,
|
|
7047
|
+
const m = n || "md", j = !!a, O = !!l, P = !!d, f = {
|
|
7051
7048
|
sm: {
|
|
7052
7049
|
left: j ? "ui-pl-7.5" : "ui-pl-2",
|
|
7053
|
-
right: O &&
|
|
7050
|
+
right: O && P ? "ui-pr-15" : O || P ? "ui-pr-7.5" : "ui-pr-2"
|
|
7054
7051
|
},
|
|
7055
7052
|
md: {
|
|
7056
7053
|
left: j ? "ui-pl-8.5" : "ui-pl-3",
|
|
7057
|
-
right: O &&
|
|
7054
|
+
right: O && P ? "ui-pr-17" : O || P ? "ui-pr-8.5" : "ui-pr-3"
|
|
7058
7055
|
},
|
|
7059
7056
|
lg: {
|
|
7060
7057
|
left: j ? "ui-pl-10" : "ui-pl-4",
|
|
7061
|
-
right: O &&
|
|
7058
|
+
right: O && P ? "ui-pr-16" : O || P ? "ui-pr-9.5" : "ui-pr-4"
|
|
7062
7059
|
}
|
|
7063
7060
|
}[m];
|
|
7064
7061
|
return `${f.left} ${f.right}`.trim();
|
|
@@ -7070,11 +7067,11 @@ const L3 = (r) => {
|
|
|
7070
7067
|
md: "ui-left-2.5",
|
|
7071
7068
|
lg: "ui-left-4"
|
|
7072
7069
|
}[j];
|
|
7073
|
-
const O = !!l,
|
|
7070
|
+
const O = !!l, P = !!d;
|
|
7074
7071
|
return m === "right" ? {
|
|
7075
|
-
sm:
|
|
7076
|
-
md:
|
|
7077
|
-
lg:
|
|
7072
|
+
sm: P ? "ui-right-8" : "ui-right-2",
|
|
7073
|
+
md: P ? "ui-right-9" : "ui-right-2.5",
|
|
7074
|
+
lg: P ? "ui-right-10" : "ui-right-3"
|
|
7078
7075
|
}[j] : m === "extra" ? {
|
|
7079
7076
|
sm: "ui-right-2",
|
|
7080
7077
|
md: "ui-right-2.5",
|
|
@@ -7097,7 +7094,7 @@ const L3 = (r) => {
|
|
|
7097
7094
|
clear: () => {
|
|
7098
7095
|
g || b(""), p == null || p("");
|
|
7099
7096
|
}
|
|
7100
|
-
}), [y, g, v.id]),
|
|
7097
|
+
}), [y, g, v.id]), z(() => {
|
|
7101
7098
|
g && L !== void 0 && x !== L && b(L);
|
|
7102
7099
|
}, [L, g, x]), /* @__PURE__ */ u("div", { className: "ui-flex ui-flex-col ui-gap-1 ui-w-full ui-relative", children: [
|
|
7103
7100
|
r && /* @__PURE__ */ o("label", { className: `ui-text-sm ui-font-bold ${i ? "ui-text-red-500" : "ui-text-neutral-900"}`, children: r }),
|
|
@@ -7155,7 +7152,7 @@ const y3 = j1(({
|
|
|
7155
7152
|
dropdownId: k,
|
|
7156
7153
|
...T
|
|
7157
7154
|
}, S) => {
|
|
7158
|
-
const m = K1(), j = k || `dropdown-${m}`, [O,
|
|
7155
|
+
const m = K1(), j = k || `dropdown-${m}`, [O, P] = $(!1), [R, f] = $(!1), [V, Z] = $(""), [F, U] = $(c || s || ""), [Q, E] = $("bottom"), [X, W] = $({}), n1 = G(null), u1 = G(null), e1 = G(null), q = c !== void 0, D = q ? c : F, _ = M.find((B) => B[v] === D), l1 = M.filter(
|
|
7159
7156
|
(B) => b ? B[v].toLowerCase().includes(V.toLowerCase()) : !0
|
|
7160
7157
|
), o1 = H(() => {
|
|
7161
7158
|
var B;
|
|
@@ -7175,10 +7172,10 @@ const y3 = j1(({
|
|
|
7175
7172
|
W(J1);
|
|
7176
7173
|
});
|
|
7177
7174
|
}, [o1, M.length, j]), c1 = (B) => {
|
|
7178
|
-
B && B.stopPropagation(), !p && (O ? p1() : (Z(""), f(!1), r1(), setTimeout(() =>
|
|
7175
|
+
B && B.stopPropagation(), !p && (O ? p1() : (Z(""), f(!1), r1(), setTimeout(() => P(!0), 50)));
|
|
7179
7176
|
}, p1 = () => {
|
|
7180
7177
|
f(!0), setTimeout(() => {
|
|
7181
|
-
|
|
7178
|
+
P(!1), f(!1);
|
|
7182
7179
|
}, 150);
|
|
7183
7180
|
}, T1 = (B, N) => {
|
|
7184
7181
|
if (N.stopPropagation(), B.disabled) return;
|
|
@@ -7187,14 +7184,14 @@ const y3 = j1(({
|
|
|
7187
7184
|
}, E1 = (B) => {
|
|
7188
7185
|
Z(B.target.value);
|
|
7189
7186
|
};
|
|
7190
|
-
|
|
7187
|
+
z(() => {
|
|
7191
7188
|
const B = (N) => {
|
|
7192
7189
|
I && e1.current && !e1.current.contains(N.target) && p1();
|
|
7193
7190
|
};
|
|
7194
7191
|
return O && document.addEventListener("click", B), () => {
|
|
7195
7192
|
document.removeEventListener("click", B);
|
|
7196
7193
|
};
|
|
7197
|
-
}, [O, I]),
|
|
7194
|
+
}, [O, I]), z(() => {
|
|
7198
7195
|
if (O) {
|
|
7199
7196
|
const B = () => {
|
|
7200
7197
|
r1();
|
|
@@ -7205,7 +7202,7 @@ const y3 = j1(({
|
|
|
7205
7202
|
window.removeEventListener("resize", B), window.removeEventListener("scroll", N, !0), document.removeEventListener("scroll", N, !0);
|
|
7206
7203
|
};
|
|
7207
7204
|
}
|
|
7208
|
-
}, [O, r1]),
|
|
7205
|
+
}, [O, r1]), z(() => {
|
|
7209
7206
|
q && c !== void 0 && U(c);
|
|
7210
7207
|
}, [c, q]), I1(S, () => ({
|
|
7211
7208
|
getValue: () => D,
|
|
@@ -7224,7 +7221,7 @@ const y3 = j1(({
|
|
|
7224
7221
|
q || U(""), g == null || g("");
|
|
7225
7222
|
},
|
|
7226
7223
|
open: () => {
|
|
7227
|
-
p || (r1(), setTimeout(() =>
|
|
7224
|
+
p || (r1(), setTimeout(() => P(!0), 50));
|
|
7228
7225
|
},
|
|
7229
7226
|
close: () => {
|
|
7230
7227
|
p1();
|
|
@@ -7315,12 +7312,12 @@ const Z3 = {
|
|
|
7315
7312
|
disableOutsideClick: e = !1
|
|
7316
7313
|
}) => {
|
|
7317
7314
|
const a = typeof window < "u", [l, d] = $(!1), [C, L] = $(!1), [c] = $(() => a ? document.createElement("div") : null), s = G(null);
|
|
7318
|
-
return
|
|
7315
|
+
return z(() => {
|
|
7319
7316
|
if (!(!c || !a))
|
|
7320
7317
|
return document.body.appendChild(c), () => {
|
|
7321
7318
|
document.body.removeChild(c);
|
|
7322
7319
|
};
|
|
7323
|
-
}, [c, a]),
|
|
7320
|
+
}, [c, a]), z(() => {
|
|
7324
7321
|
if (r)
|
|
7325
7322
|
d(!0), requestAnimationFrame(() => {
|
|
7326
7323
|
L(!0);
|
|
@@ -7330,18 +7327,18 @@ const Z3 = {
|
|
|
7330
7327
|
const p = setTimeout(() => d(!1), 200);
|
|
7331
7328
|
return () => clearTimeout(p);
|
|
7332
7329
|
}
|
|
7333
|
-
}, [r]),
|
|
7330
|
+
}, [r]), z(() => {
|
|
7334
7331
|
if (!r || t) return;
|
|
7335
7332
|
const p = (h) => {
|
|
7336
7333
|
h.key === "Escape" && i();
|
|
7337
7334
|
};
|
|
7338
7335
|
return window.addEventListener("keydown", p), () => window.removeEventListener("keydown", p);
|
|
7339
|
-
}, [r, i, t]),
|
|
7336
|
+
}, [r, i, t]), z(() => {
|
|
7340
7337
|
r && s.current && requestAnimationFrame(() => {
|
|
7341
7338
|
var p;
|
|
7342
7339
|
(p = s.current) == null || p.focus();
|
|
7343
7340
|
});
|
|
7344
|
-
}, [r]),
|
|
7341
|
+
}, [r]), z(() => {
|
|
7345
7342
|
if (!r || !n) return;
|
|
7346
7343
|
const p = [
|
|
7347
7344
|
"button",
|
|
@@ -7362,7 +7359,7 @@ const Z3 = {
|
|
|
7362
7359
|
container: c,
|
|
7363
7360
|
modalRef: s
|
|
7364
7361
|
};
|
|
7365
|
-
},
|
|
7362
|
+
}, z1 = Q1(null), B3 = ({
|
|
7366
7363
|
children: r,
|
|
7367
7364
|
onClose: i,
|
|
7368
7365
|
onSuccess: t,
|
|
@@ -7393,9 +7390,9 @@ const Z3 = {
|
|
|
7393
7390
|
title: h,
|
|
7394
7391
|
icon: n
|
|
7395
7392
|
};
|
|
7396
|
-
return /* @__PURE__ */ o(
|
|
7397
|
-
},
|
|
7398
|
-
const r = W1(
|
|
7393
|
+
return /* @__PURE__ */ o(z1.Provider, { value: M, children: r });
|
|
7394
|
+
}, P1 = () => {
|
|
7395
|
+
const r = W1(z1);
|
|
7399
7396
|
if (!r)
|
|
7400
7397
|
throw new Error("Modal components must be used within a Modal");
|
|
7401
7398
|
return r;
|
|
@@ -7404,7 +7401,7 @@ const Z3 = {
|
|
|
7404
7401
|
showCloseButton: i,
|
|
7405
7402
|
title: t
|
|
7406
7403
|
}) => {
|
|
7407
|
-
const { onClose: n, showCloseButton: e, icon: a } =
|
|
7404
|
+
const { onClose: n, showCloseButton: e, icon: a } = P1();
|
|
7408
7405
|
return /* @__PURE__ */ u("div", { className: "ui-flex ui-items-center ui-p-4 ui-gap-x-md ui-justify-between ui-border-b ui-border-neutral-100", children: [
|
|
7409
7406
|
a && /* @__PURE__ */ o("div", { className: "ui-flex ui-items-center ui-justify-center ui-bg-blue-50 ui-rounded-full ui-gap-2 ui-w-8 ui-h-8 ui-text-blue-500", children: /* @__PURE__ */ o(d1, { slot: a, size: "lg" }) }),
|
|
7410
7407
|
/* @__PURE__ */ o("div", { className: "ui-flex-1", children: t ? /* @__PURE__ */ o("h2", { className: "ui-text-2xl ui-font-bold", children: t }) : r }),
|
|
@@ -7426,7 +7423,7 @@ const Z3 = {
|
|
|
7426
7423
|
};
|
|
7427
7424
|
g1.displayName = "Modal.Header";
|
|
7428
7425
|
const I3 = ({ children: r }) => /* @__PURE__ */ o("div", { className: "ui-p-4", children: r }), H1 = ({ children: r }) => {
|
|
7429
|
-
const { onClose: i, cancelButtonText: t, successButtonText: n, onCancel: e, onSuccess: a, showCancelButton: l, showSuccessButton: d, closeAtSuccess: C, closeAtCancel: L } =
|
|
7426
|
+
const { onClose: i, cancelButtonText: t, successButtonText: n, onCancel: e, onSuccess: a, showCancelButton: l, showSuccessButton: d, closeAtSuccess: C, closeAtCancel: L } = P1();
|
|
7430
7427
|
return /* @__PURE__ */ o("div", { className: "ui-p-4 ui-border-t ui-border-neutral-100 ui-flex ui-justify-end ui-items-center ui-gap-2", children: r || /* @__PURE__ */ u("div", { className: "ui-flex ui-gap-2", children: [
|
|
7431
7428
|
l && /* @__PURE__ */ o(Y, { color: "white", variant: "outlined", onClick: () => {
|
|
7432
7429
|
e && e(), L && i();
|
|
@@ -7547,7 +7544,7 @@ const I3 = ({ children: r }) => /* @__PURE__ */ o("div", { className: "ui-p-4",
|
|
|
7547
7544
|
className: L = "",
|
|
7548
7545
|
maxVisiblePages: c = 5
|
|
7549
7546
|
}) => {
|
|
7550
|
-
|
|
7547
|
+
z(() => {
|
|
7551
7548
|
r > i && i > 0 && d(i);
|
|
7552
7549
|
}, [r, i, d]);
|
|
7553
7550
|
const s = (w) => {
|
|
@@ -7638,7 +7635,7 @@ const I3 = ({ children: r }) => /* @__PURE__ */ o("div", { className: "ui-p-4",
|
|
|
7638
7635
|
] })
|
|
7639
7636
|
}
|
|
7640
7637
|
);
|
|
7641
|
-
},
|
|
7638
|
+
}, z3 = [
|
|
7642
7639
|
// Blue variants
|
|
7643
7640
|
{
|
|
7644
7641
|
color: "blue",
|
|
@@ -7794,7 +7791,7 @@ const I3 = ({ children: r }) => /* @__PURE__ */ o("div", { className: "ui-p-4",
|
|
|
7794
7791
|
state: "disabledChecked",
|
|
7795
7792
|
class: "ui-border-gray-200 ui-bg-gray-200"
|
|
7796
7793
|
}
|
|
7797
|
-
],
|
|
7794
|
+
], P3 = t1(
|
|
7798
7795
|
"ui-relative ui-rounded-full ui-border-1 ui-flex ui-items-center ui-justify-center",
|
|
7799
7796
|
{
|
|
7800
7797
|
variants: {
|
|
@@ -7821,7 +7818,7 @@ const I3 = ({ children: r }) => /* @__PURE__ */ o("div", { className: "ui-p-4",
|
|
|
7821
7818
|
disabledChecked: "ui-cursor-not-allowed"
|
|
7822
7819
|
}
|
|
7823
7820
|
},
|
|
7824
|
-
compoundVariants:
|
|
7821
|
+
compoundVariants: z3,
|
|
7825
7822
|
defaultVariants: {
|
|
7826
7823
|
size: "md",
|
|
7827
7824
|
color: "blue",
|
|
@@ -7937,7 +7934,7 @@ const I3 = ({ children: r }) => /* @__PURE__ */ o("div", { className: "ui-p-4",
|
|
|
7937
7934
|
/* @__PURE__ */ o(
|
|
7938
7935
|
"div",
|
|
7939
7936
|
{
|
|
7940
|
-
className:
|
|
7937
|
+
className: P3({
|
|
7941
7938
|
size: i,
|
|
7942
7939
|
color: t,
|
|
7943
7940
|
state: h
|
|
@@ -8416,7 +8413,7 @@ const v1 = [], f1 = {
|
|
|
8416
8413
|
}
|
|
8417
8414
|
}, e5 = () => {
|
|
8418
8415
|
const [r, i] = $([]);
|
|
8419
|
-
return
|
|
8416
|
+
return z(() => {
|
|
8420
8417
|
const n = f1.getListeners(), e = (a) => {
|
|
8421
8418
|
if (a.isLeaving) {
|
|
8422
8419
|
i((l) => l.map(
|
|
@@ -8459,7 +8456,7 @@ const v1 = [], f1 = {
|
|
|
8459
8456
|
})[i]
|
|
8460
8457
|
}), r5 = ({ toastItem: r }) => {
|
|
8461
8458
|
const [i, t] = $(!0);
|
|
8462
|
-
|
|
8459
|
+
z(() => {
|
|
8463
8460
|
r.isLeaving && setTimeout(() => {
|
|
8464
8461
|
t(!1);
|
|
8465
8462
|
}, 300);
|
|
@@ -8546,13 +8543,13 @@ export {
|
|
|
8546
8543
|
b3 as YearGrid,
|
|
8547
8544
|
A as cn,
|
|
8548
8545
|
T3 as labelVariants,
|
|
8549
|
-
|
|
8546
|
+
P3 as radioButtonVariants,
|
|
8550
8547
|
t5 as toast,
|
|
8551
8548
|
V1 as useCalendar,
|
|
8552
8549
|
g5 as useDateInput,
|
|
8553
8550
|
L3 as useDatePicker,
|
|
8554
8551
|
N1 as useDateRange,
|
|
8555
|
-
|
|
8552
|
+
P1 as useModalContext,
|
|
8556
8553
|
w3 as usePortal,
|
|
8557
8554
|
E3 as useRadioButton,
|
|
8558
8555
|
R3 as useRadioButtonGroup,
|