@imj_media/ui 1.0.39 → 1.0.41
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.css +1 -1
- package/dist/index.esm.js +1047 -1018
- package/dist/index.esm.js.map +1 -1
- package/dist/index.js +3 -3
- package/dist/index.js.map +1 -1
- package/dist/modules/InnerButton/index.d.ts +1 -1
- package/dist/modules/InnerButton/index.d.ts.map +1 -1
- package/dist/modules/Tooltip/components/organisms/Tooltip.d.ts.map +1 -1
- package/dist/modules/Tooltip/stories/Tooltip.stories.d.ts +1 -0
- package/dist/modules/Tooltip/stories/Tooltip.stories.d.ts.map +1 -1
- package/dist/shared/types/button.d.ts +1 -0
- package/dist/shared/types/button.d.ts.map +1 -1
- package/package.json +1 -1
package/dist/index.esm.js
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import { jsxs as u, jsx as i, Fragment as
|
|
2
|
-
import
|
|
1
|
+
import { jsxs as u, jsx as i, Fragment as k1 } from "react/jsx-runtime";
|
|
2
|
+
import f1, { useState as K, useRef as t1, useEffect as W, useCallback as N, useMemo as V1, useImperativeHandle as Q1, forwardRef as E1, useId as l0, createContext as I0, useContext as B0 } from "react";
|
|
3
3
|
import { clsx as S0 } from "clsx";
|
|
4
4
|
import { twMerge as $0 } from "tailwind-merge";
|
|
5
5
|
import { cva as c1 } from "class-variance-authority";
|
|
6
|
-
import d0, { createPortal as
|
|
6
|
+
import d0, { createPortal as Z1 } from "react-dom";
|
|
7
7
|
import { Prism as P0 } from "react-syntax-highlighter";
|
|
8
8
|
import { dark as N0, prism as z0, materialLight as D0, materialDark as A0, atomDark as T0, oneLight as E0, oneDark as F0, tomorrow as R0, dracula as U0 } from "react-syntax-highlighter/dist/esm/styles/prism";
|
|
9
|
-
function
|
|
9
|
+
function q(...o) {
|
|
10
10
|
return $0(S0(o));
|
|
11
11
|
}
|
|
12
12
|
function _0({
|
|
@@ -52,7 +52,7 @@ function _0({
|
|
|
52
52
|
}
|
|
53
53
|
);
|
|
54
54
|
}
|
|
55
|
-
function
|
|
55
|
+
function q0({
|
|
56
56
|
width: o = 24,
|
|
57
57
|
height: r = 24,
|
|
58
58
|
fill: t,
|
|
@@ -113,7 +113,7 @@ function Y0({
|
|
|
113
113
|
}
|
|
114
114
|
);
|
|
115
115
|
}
|
|
116
|
-
function
|
|
116
|
+
function Y0({
|
|
117
117
|
width: o = 24,
|
|
118
118
|
height: r = 24,
|
|
119
119
|
stroke: t,
|
|
@@ -361,11 +361,11 @@ function Q0({ width: o = 24, height: r = 24, fill: t, stroke: n }) {
|
|
|
361
361
|
const s0 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
362
362
|
__proto__: null,
|
|
363
363
|
FacebookFill: G0,
|
|
364
|
-
InstagramFill:
|
|
364
|
+
InstagramFill: q0,
|
|
365
365
|
LinkedinFill: K0,
|
|
366
366
|
LogoFill: Q0,
|
|
367
367
|
TelegramFill: J0,
|
|
368
|
-
TwitterFill:
|
|
368
|
+
TwitterFill: Y0,
|
|
369
369
|
WhatsappFill: X0,
|
|
370
370
|
YoutubeFill: _0
|
|
371
371
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
@@ -3109,7 +3109,7 @@ function _2({
|
|
|
3109
3109
|
}
|
|
3110
3110
|
);
|
|
3111
3111
|
}
|
|
3112
|
-
function
|
|
3112
|
+
function q2({
|
|
3113
3113
|
width: o = 24,
|
|
3114
3114
|
height: r = 24,
|
|
3115
3115
|
fill: t = "none",
|
|
@@ -3149,7 +3149,7 @@ function Y2({
|
|
|
3149
3149
|
}
|
|
3150
3150
|
);
|
|
3151
3151
|
}
|
|
3152
|
-
function
|
|
3152
|
+
function Y2({
|
|
3153
3153
|
width: o = 24,
|
|
3154
3154
|
height: r = 24,
|
|
3155
3155
|
fill: t = "none",
|
|
@@ -6351,7 +6351,7 @@ function _9({
|
|
|
6351
6351
|
}
|
|
6352
6352
|
);
|
|
6353
6353
|
}
|
|
6354
|
-
function
|
|
6354
|
+
function q9({
|
|
6355
6355
|
width: o = 24,
|
|
6356
6356
|
height: r = 24,
|
|
6357
6357
|
fill: t = "none",
|
|
@@ -6382,7 +6382,7 @@ function Y9({
|
|
|
6382
6382
|
}
|
|
6383
6383
|
);
|
|
6384
6384
|
}
|
|
6385
|
-
function
|
|
6385
|
+
function Y9({
|
|
6386
6386
|
width: o = 24,
|
|
6387
6387
|
height: r = 24,
|
|
6388
6388
|
fill: t = "none",
|
|
@@ -9497,7 +9497,7 @@ function _n({
|
|
|
9497
9497
|
}
|
|
9498
9498
|
);
|
|
9499
9499
|
}
|
|
9500
|
-
function
|
|
9500
|
+
function qn({
|
|
9501
9501
|
width: o = 24,
|
|
9502
9502
|
height: r = 24,
|
|
9503
9503
|
fill: t = "none",
|
|
@@ -9535,7 +9535,7 @@ function Yn({
|
|
|
9535
9535
|
}
|
|
9536
9536
|
);
|
|
9537
9537
|
}
|
|
9538
|
-
function
|
|
9538
|
+
function Yn({
|
|
9539
9539
|
width: o = 24,
|
|
9540
9540
|
height: r = 24,
|
|
9541
9541
|
fill: t = "none",
|
|
@@ -12699,7 +12699,7 @@ function _4({
|
|
|
12699
12699
|
}
|
|
12700
12700
|
);
|
|
12701
12701
|
}
|
|
12702
|
-
function
|
|
12702
|
+
function q4({
|
|
12703
12703
|
width: o = 24,
|
|
12704
12704
|
height: r = 24,
|
|
12705
12705
|
fill: t = "none",
|
|
@@ -12727,7 +12727,7 @@ function Y4({
|
|
|
12727
12727
|
}
|
|
12728
12728
|
);
|
|
12729
12729
|
}
|
|
12730
|
-
function
|
|
12730
|
+
function Y4({
|
|
12731
12731
|
width: o = 24,
|
|
12732
12732
|
height: r = 24,
|
|
12733
12733
|
fill: t = "none",
|
|
@@ -15904,7 +15904,7 @@ function _e({
|
|
|
15904
15904
|
}
|
|
15905
15905
|
);
|
|
15906
15906
|
}
|
|
15907
|
-
function
|
|
15907
|
+
function qe({
|
|
15908
15908
|
width: o = 24,
|
|
15909
15909
|
height: r = 24,
|
|
15910
15910
|
fill: t = "none",
|
|
@@ -15954,7 +15954,7 @@ function Ye({
|
|
|
15954
15954
|
}
|
|
15955
15955
|
);
|
|
15956
15956
|
}
|
|
15957
|
-
function
|
|
15957
|
+
function Ye({
|
|
15958
15958
|
width: o = 24,
|
|
15959
15959
|
height: r = 24,
|
|
15960
15960
|
fill: t = "none",
|
|
@@ -17932,7 +17932,7 @@ function H8({
|
|
|
17932
17932
|
}
|
|
17933
17933
|
);
|
|
17934
17934
|
}
|
|
17935
|
-
const
|
|
17935
|
+
const Y1 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
17936
17936
|
__proto__: null,
|
|
17937
17937
|
AaeeOutlined: k9,
|
|
17938
17938
|
AaeeSlashOutlined: Q4,
|
|
@@ -18013,7 +18013,7 @@ const q1 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
18013
18013
|
CirclePlusOutlined: r4,
|
|
18014
18014
|
CircleXOutlined: M8,
|
|
18015
18015
|
CityOutlined: u8,
|
|
18016
|
-
ClockOutlined:
|
|
18016
|
+
ClockOutlined: q2,
|
|
18017
18017
|
CloneOutlined: Ge,
|
|
18018
18018
|
CoinOutlined: T9,
|
|
18019
18019
|
CoinsOutlined: ln,
|
|
@@ -18069,7 +18069,7 @@ const q1 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
18069
18069
|
GlassOutlined: $9,
|
|
18070
18070
|
GridOutlined: Le,
|
|
18071
18071
|
GroupFilesOutlined: Xn,
|
|
18072
|
-
GroupOutlined:
|
|
18072
|
+
GroupOutlined: Y4,
|
|
18073
18073
|
HandOutlined: Ce,
|
|
18074
18074
|
HardOutlined: mn,
|
|
18075
18075
|
HistoryOutlined: Z9,
|
|
@@ -18081,7 +18081,7 @@ const q1 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
18081
18081
|
ImjLogoOutlined: H8,
|
|
18082
18082
|
ImplementacionOutlined: h2,
|
|
18083
18083
|
IndoorOutlined: v8,
|
|
18084
|
-
InfoCardOutlined:
|
|
18084
|
+
InfoCardOutlined: Y2,
|
|
18085
18085
|
InfoCircleOutlined: jn,
|
|
18086
18086
|
InfoOutlined: D4,
|
|
18087
18087
|
InstallOutlined: _e,
|
|
@@ -18095,7 +18095,7 @@ const q1 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
18095
18095
|
LightbulbOutlined: V8,
|
|
18096
18096
|
LightbulbSlashOutlined: a8,
|
|
18097
18097
|
LikeOutlined: re,
|
|
18098
|
-
LinkOutlined:
|
|
18098
|
+
LinkOutlined: Yn,
|
|
18099
18099
|
ListOutlined: le,
|
|
18100
18100
|
ListaCampanas1Outlined: Vn,
|
|
18101
18101
|
ListaCampanas2Outlined: en,
|
|
@@ -18112,7 +18112,7 @@ const q1 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
18112
18112
|
MallOutlined: C9,
|
|
18113
18113
|
MapOutlined: g8,
|
|
18114
18114
|
MaximizeOutlined: X2,
|
|
18115
|
-
MediumOutlined:
|
|
18115
|
+
MediumOutlined: Y9,
|
|
18116
18116
|
MinimizeOutlined: b9,
|
|
18117
18117
|
Minus1Outlined: w9,
|
|
18118
18118
|
Minus2Outlined: n2,
|
|
@@ -18132,7 +18132,7 @@ const q1 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
18132
18132
|
PauseOutlined: p2,
|
|
18133
18133
|
PautaInteligenteOutlined: K9,
|
|
18134
18134
|
PautaTradicionalOutlined: M2,
|
|
18135
|
-
PencilOutlined:
|
|
18135
|
+
PencilOutlined: qe,
|
|
18136
18136
|
PercentageOutlined: U9,
|
|
18137
18137
|
PerifoneoOutlined: Sn,
|
|
18138
18138
|
PerifoneoSlashOutlined: L9,
|
|
@@ -18142,7 +18142,7 @@ const q1 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
18142
18142
|
PlantillaOutlined: h9,
|
|
18143
18143
|
PlayOutlined: J9,
|
|
18144
18144
|
Plus1Outlined: S9,
|
|
18145
|
-
PlusOutlined:
|
|
18145
|
+
PlusOutlined: q4,
|
|
18146
18146
|
PostventaOutlined: i2,
|
|
18147
18147
|
PowerOutlined: He,
|
|
18148
18148
|
PreferenciasDeUbicacionOutlined: H2,
|
|
@@ -18168,7 +18168,7 @@ const q1 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
18168
18168
|
ScreenOutlined: T4,
|
|
18169
18169
|
SearchCompanyOutlined: P9,
|
|
18170
18170
|
SearchMinusOutlined: un,
|
|
18171
|
-
SearchOutlined:
|
|
18171
|
+
SearchOutlined: q9,
|
|
18172
18172
|
SearchPlusOutlined: N4,
|
|
18173
18173
|
SeguimientoOutlined: K4,
|
|
18174
18174
|
SelectOutlined: Je,
|
|
@@ -18186,7 +18186,7 @@ const q1 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
18186
18186
|
SortAlphaUpOutlined: y2,
|
|
18187
18187
|
SortAltOutlined: u2,
|
|
18188
18188
|
SortAmountDownAltOutlined: ue,
|
|
18189
|
-
SortAmountDownOutlined:
|
|
18189
|
+
SortAmountDownOutlined: Ye,
|
|
18190
18190
|
SortAmountUpAltOutlined: Xe,
|
|
18191
18191
|
SortAmountUpOutlined: j9,
|
|
18192
18192
|
SortDownOutlined: V9,
|
|
@@ -18212,7 +18212,7 @@ const q1 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
18212
18212
|
TrashOutlined: v9,
|
|
18213
18213
|
TrashSlashOutlined: i9,
|
|
18214
18214
|
TreeDiagramOutlined: E4,
|
|
18215
|
-
UbicacionesOutlined:
|
|
18215
|
+
UbicacionesOutlined: qn,
|
|
18216
18216
|
UndoOutlined: z2,
|
|
18217
18217
|
UnlockOutlined: Ne,
|
|
18218
18218
|
UpdateOutlined: a9,
|
|
@@ -18256,7 +18256,7 @@ const q1 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
18256
18256
|
"5xl": 40,
|
|
18257
18257
|
"6xl": 48
|
|
18258
18258
|
};
|
|
18259
|
-
function
|
|
18259
|
+
function b1({
|
|
18260
18260
|
name: o,
|
|
18261
18261
|
size: r = "md",
|
|
18262
18262
|
color: t = "current",
|
|
@@ -18267,10 +18267,10 @@ function v1({
|
|
|
18267
18267
|
strokeWidth: d = 2,
|
|
18268
18268
|
onClick: s
|
|
18269
18269
|
}) {
|
|
18270
|
-
let L =
|
|
18270
|
+
let L = Y1[o];
|
|
18271
18271
|
if (L || (L = s0[o]), !L)
|
|
18272
18272
|
return console.warn(`Icono "${o}" no encontrado en ninguna variante`), null;
|
|
18273
|
-
const p = L ===
|
|
18273
|
+
const p = L === Y1[o] ? "outline" : "fill", l = O8[r], w = N1[t === "current" && p === "fill" ? "white" : t] || N1.blue, g = N1[n] || N1.black, x = /* @__PURE__ */ i(
|
|
18274
18274
|
L,
|
|
18275
18275
|
{
|
|
18276
18276
|
width: l,
|
|
@@ -18279,7 +18279,7 @@ function v1({
|
|
|
18279
18279
|
...c,
|
|
18280
18280
|
strokeWidth: d
|
|
18281
18281
|
}
|
|
18282
|
-
),
|
|
18282
|
+
), M = (j) => {
|
|
18283
18283
|
s && (j.stopPropagation(), s(j));
|
|
18284
18284
|
};
|
|
18285
18285
|
return s ? /* @__PURE__ */ i(
|
|
@@ -18287,8 +18287,8 @@ function v1({
|
|
|
18287
18287
|
{
|
|
18288
18288
|
role: "button",
|
|
18289
18289
|
tabIndex: 0,
|
|
18290
|
-
onClick:
|
|
18291
|
-
className:
|
|
18290
|
+
onClick: M,
|
|
18291
|
+
className: q(
|
|
18292
18292
|
e,
|
|
18293
18293
|
"ui-inline-block ui-cursor-pointer ui-rounded-full ui-p-1 ui-transition-all ui-duration-200",
|
|
18294
18294
|
a ? "ui-rounded-full ui-bg-blue-50 ui-p-2" : "",
|
|
@@ -18302,7 +18302,7 @@ function v1({
|
|
|
18302
18302
|
) : /* @__PURE__ */ i(
|
|
18303
18303
|
"i",
|
|
18304
18304
|
{
|
|
18305
|
-
className:
|
|
18305
|
+
className: q(
|
|
18306
18306
|
e,
|
|
18307
18307
|
"ui-inline-block",
|
|
18308
18308
|
a ? "ui-rounded-full ui-bg-blue-50 ui-p-2" : ""
|
|
@@ -18344,7 +18344,7 @@ const y8 = ({
|
|
|
18344
18344
|
}
|
|
18345
18345
|
}
|
|
18346
18346
|
);
|
|
18347
|
-
return /* @__PURE__ */ i("span", { className:
|
|
18347
|
+
return /* @__PURE__ */ i("span", { className: q(s({ color: r, border: t, size: d }), n), ...e, children: o });
|
|
18348
18348
|
}, Z8 = ({ slot: o, className: r, size: t }) => {
|
|
18349
18349
|
const e = c1("inner-avatar", {
|
|
18350
18350
|
variants: {
|
|
@@ -18370,7 +18370,7 @@ const y8 = ({
|
|
|
18370
18370
|
{
|
|
18371
18371
|
src: o,
|
|
18372
18372
|
alt: "Visual",
|
|
18373
|
-
className:
|
|
18373
|
+
className: q(r, "ui-rounded-full ui-object-cover", e)
|
|
18374
18374
|
}
|
|
18375
18375
|
);
|
|
18376
18376
|
}, c0 = {
|
|
@@ -18667,7 +18667,7 @@ const y8 = ({
|
|
|
18667
18667
|
}
|
|
18668
18668
|
});
|
|
18669
18669
|
return /* @__PURE__ */ i("span", { className: e({ size: r }), role: "img", "aria-label": o, children: n });
|
|
18670
|
-
},
|
|
18670
|
+
}, x1 = ({
|
|
18671
18671
|
slot: o,
|
|
18672
18672
|
className: r,
|
|
18673
18673
|
colorIcon: t,
|
|
@@ -18677,8 +18677,8 @@ const y8 = ({
|
|
|
18677
18677
|
strokeWidth: c
|
|
18678
18678
|
}) => {
|
|
18679
18679
|
const d = typeof o == "string" && o in c0;
|
|
18680
|
-
return typeof o == "string" && (o in
|
|
18681
|
-
|
|
18680
|
+
return typeof o == "string" && (o in Y1 || o in s0) ? /* @__PURE__ */ i(
|
|
18681
|
+
b1,
|
|
18682
18682
|
{
|
|
18683
18683
|
strokeWidth: c,
|
|
18684
18684
|
name: o,
|
|
@@ -18729,12 +18729,13 @@ const y8 = ({
|
|
|
18729
18729
|
style: p,
|
|
18730
18730
|
arrowClassName: l,
|
|
18731
18731
|
absolute: C = !1,
|
|
18732
|
-
autoClose: w = !
|
|
18732
|
+
autoClose: w = !0,
|
|
18733
|
+
// Valor por defecto, pero se sobrescribe con el valor del componente exportado
|
|
18733
18734
|
...g
|
|
18734
18735
|
}) => {
|
|
18735
|
-
const [
|
|
18736
|
-
|
|
18737
|
-
R.current &&
|
|
18736
|
+
const [f, x] = K(!1), [M, j] = K({ top: 0, left: 0 }), [h, v] = K({ width: 0, height: 0 }), [V, I] = K(!1), S = t1(null), R = t1(null), D = t1(null), y = t1(null), J = t1(`tooltip-${Math.random().toString(36).substring(2, 9)}-${Date.now()}`);
|
|
18737
|
+
W(() => {
|
|
18738
|
+
R.current && f && requestAnimationFrame(() => {
|
|
18738
18739
|
if (R.current) {
|
|
18739
18740
|
const m = R.current.getBoundingClientRect(), b = {
|
|
18740
18741
|
width: m.width,
|
|
@@ -18743,106 +18744,106 @@ const y8 = ({
|
|
|
18743
18744
|
v(b);
|
|
18744
18745
|
}
|
|
18745
18746
|
});
|
|
18746
|
-
}, [
|
|
18747
|
-
const
|
|
18748
|
-
var T,
|
|
18749
|
-
if (!
|
|
18750
|
-
const m =
|
|
18747
|
+
}, [f, r]);
|
|
18748
|
+
const $ = N(() => {
|
|
18749
|
+
var T, E, i1, e1, l1, _;
|
|
18750
|
+
if (!S.current) return;
|
|
18751
|
+
const m = S.current.getBoundingClientRect();
|
|
18751
18752
|
let b = 0, O = 0;
|
|
18752
|
-
const
|
|
18753
|
+
const Z = 8;
|
|
18753
18754
|
if (C) {
|
|
18754
|
-
const U = (T =
|
|
18755
|
+
const U = (T = D.current) == null ? void 0 : T.getBoundingClientRect();
|
|
18755
18756
|
if (!U) return;
|
|
18756
18757
|
const H = m.top - U.top, P = m.left - U.left;
|
|
18757
18758
|
switch (t) {
|
|
18758
18759
|
case "top":
|
|
18759
|
-
b = H - h.height -
|
|
18760
|
+
b = H - h.height - Z, O = P + m.width / 2 - h.width / 2;
|
|
18760
18761
|
break;
|
|
18761
18762
|
case "bottom":
|
|
18762
|
-
b = H + m.height +
|
|
18763
|
+
b = H + m.height + Z, O = P + m.width / 2 - h.width / 2;
|
|
18763
18764
|
break;
|
|
18764
18765
|
case "left":
|
|
18765
|
-
b = H + m.height / 2 - h.height / 2, O = P - h.width -
|
|
18766
|
+
b = H + m.height / 2 - h.height / 2, O = P - h.width - Z;
|
|
18766
18767
|
break;
|
|
18767
18768
|
case "right":
|
|
18768
|
-
b = H + m.height / 2 - h.height / 2, O = P + m.width +
|
|
18769
|
+
b = H + m.height / 2 - h.height / 2, O = P + m.width + Z;
|
|
18769
18770
|
break;
|
|
18770
18771
|
case "top-left":
|
|
18771
|
-
b = H - h.height -
|
|
18772
|
+
b = H - h.height - Z, O = P;
|
|
18772
18773
|
break;
|
|
18773
18774
|
case "top-right":
|
|
18774
|
-
b = H - h.height -
|
|
18775
|
+
b = H - h.height - Z, O = P + m.width - h.width;
|
|
18775
18776
|
break;
|
|
18776
18777
|
case "bottom-left":
|
|
18777
|
-
b = H + m.height +
|
|
18778
|
+
b = H + m.height + Z, O = P;
|
|
18778
18779
|
break;
|
|
18779
18780
|
case "bottom-right":
|
|
18780
|
-
b = H + m.height +
|
|
18781
|
+
b = H + m.height + Z, O = P + m.width - h.width;
|
|
18781
18782
|
break;
|
|
18782
18783
|
case "right-top":
|
|
18783
|
-
b = H, O = P + m.width +
|
|
18784
|
+
b = H, O = P + m.width + Z;
|
|
18784
18785
|
break;
|
|
18785
18786
|
case "right-bottom":
|
|
18786
|
-
b = H + m.height - h.height, O = P + m.width +
|
|
18787
|
+
b = H + m.height - h.height, O = P + m.width + Z;
|
|
18787
18788
|
break;
|
|
18788
18789
|
case "left-top":
|
|
18789
|
-
b = H, O = P - h.width -
|
|
18790
|
+
b = H, O = P - h.width - Z;
|
|
18790
18791
|
break;
|
|
18791
18792
|
case "left-bottom":
|
|
18792
|
-
b = H + m.height - h.height, O = P - h.width -
|
|
18793
|
+
b = H + m.height - h.height, O = P - h.width - Z;
|
|
18793
18794
|
break;
|
|
18794
18795
|
}
|
|
18795
18796
|
} else
|
|
18796
18797
|
switch (t) {
|
|
18797
18798
|
case "top":
|
|
18798
|
-
b = m.top - h.height -
|
|
18799
|
+
b = m.top - h.height - Z, O = m.left + m.width / 2 - h.width / 2;
|
|
18799
18800
|
break;
|
|
18800
18801
|
case "bottom":
|
|
18801
|
-
b = m.bottom +
|
|
18802
|
+
b = m.bottom + Z, O = m.left + m.width / 2 - h.width / 2;
|
|
18802
18803
|
break;
|
|
18803
18804
|
case "left":
|
|
18804
|
-
b = m.top + m.height / 2 - h.height / 2, O = m.left - h.width -
|
|
18805
|
+
b = m.top + m.height / 2 - h.height / 2, O = m.left - h.width - Z;
|
|
18805
18806
|
break;
|
|
18806
18807
|
case "right":
|
|
18807
|
-
b = m.top + m.height / 2 - h.height / 2, O = m.right +
|
|
18808
|
+
b = m.top + m.height / 2 - h.height / 2, O = m.right + Z;
|
|
18808
18809
|
break;
|
|
18809
18810
|
case "top-left":
|
|
18810
|
-
b = m.top - h.height -
|
|
18811
|
+
b = m.top - h.height - Z, O = m.left;
|
|
18811
18812
|
break;
|
|
18812
18813
|
case "top-right":
|
|
18813
|
-
b = m.top - h.height -
|
|
18814
|
+
b = m.top - h.height - Z, O = m.right - h.width;
|
|
18814
18815
|
break;
|
|
18815
18816
|
case "bottom-left":
|
|
18816
|
-
b = m.bottom +
|
|
18817
|
+
b = m.bottom + Z, O = m.left;
|
|
18817
18818
|
break;
|
|
18818
18819
|
case "bottom-right":
|
|
18819
|
-
b = m.bottom +
|
|
18820
|
+
b = m.bottom + Z, O = m.right - h.width;
|
|
18820
18821
|
break;
|
|
18821
18822
|
case "right-top":
|
|
18822
|
-
b = m.top, O = m.right +
|
|
18823
|
+
b = m.top, O = m.right + Z;
|
|
18823
18824
|
break;
|
|
18824
18825
|
case "right-bottom":
|
|
18825
|
-
b = m.bottom - h.height, O = m.right +
|
|
18826
|
+
b = m.bottom - h.height, O = m.right + Z;
|
|
18826
18827
|
break;
|
|
18827
18828
|
case "left-top":
|
|
18828
|
-
b = m.top, O = m.left - h.width -
|
|
18829
|
+
b = m.top, O = m.left - h.width - Z;
|
|
18829
18830
|
break;
|
|
18830
18831
|
case "left-bottom":
|
|
18831
|
-
b = m.bottom - h.height, O = m.left - h.width -
|
|
18832
|
+
b = m.bottom - h.height, O = m.left - h.width - Z;
|
|
18832
18833
|
break;
|
|
18833
18834
|
}
|
|
18834
18835
|
if (t.includes("top") || t.includes("bottom"))
|
|
18835
18836
|
switch (n) {
|
|
18836
18837
|
case "start":
|
|
18837
18838
|
if (C) {
|
|
18838
|
-
const U = (
|
|
18839
|
+
const U = (E = D.current) == null ? void 0 : E.getBoundingClientRect();
|
|
18839
18840
|
U && (O = m.left - U.left);
|
|
18840
18841
|
} else
|
|
18841
18842
|
O = m.left;
|
|
18842
18843
|
break;
|
|
18843
18844
|
case "end":
|
|
18844
18845
|
if (C) {
|
|
18845
|
-
const U = (
|
|
18846
|
+
const U = (i1 = D.current) == null ? void 0 : i1.getBoundingClientRect();
|
|
18846
18847
|
U && (O = m.right - U.left - h.width);
|
|
18847
18848
|
} else
|
|
18848
18849
|
O = m.right - h.width;
|
|
@@ -18852,74 +18853,99 @@ const y8 = ({
|
|
|
18852
18853
|
switch (n) {
|
|
18853
18854
|
case "start":
|
|
18854
18855
|
if (C) {
|
|
18855
|
-
const U = (
|
|
18856
|
+
const U = (e1 = D.current) == null ? void 0 : e1.getBoundingClientRect();
|
|
18856
18857
|
U && (b = m.top - U.top);
|
|
18857
18858
|
} else
|
|
18858
18859
|
b = m.top;
|
|
18859
18860
|
break;
|
|
18860
18861
|
case "end":
|
|
18861
18862
|
if (C) {
|
|
18862
|
-
const U = (
|
|
18863
|
+
const U = (l1 = D.current) == null ? void 0 : l1.getBoundingClientRect();
|
|
18863
18864
|
U && (b = m.bottom - U.top - h.height);
|
|
18864
18865
|
} else
|
|
18865
18866
|
b = m.bottom - h.height;
|
|
18866
18867
|
break;
|
|
18867
18868
|
}
|
|
18868
18869
|
if (C) {
|
|
18869
|
-
const U = (_ =
|
|
18870
|
+
const U = (_ = D.current) == null ? void 0 : _.getBoundingClientRect();
|
|
18870
18871
|
U && (O < 8 ? O = 8 : O + h.width > U.width - 8 && (O = U.width - h.width - 8), b < 8 ? b = 8 : b + h.height > U.height - 8 && (b = U.height - h.height - 8));
|
|
18871
18872
|
} else {
|
|
18872
18873
|
const U = window.innerWidth, H = window.innerHeight, P = 8;
|
|
18873
18874
|
O < P ? O = P : O + h.width > U - P && (O = U - h.width - P), b < P ? b = P : b + h.height > H - P && (b = H - h.height - P);
|
|
18874
18875
|
}
|
|
18875
|
-
j({ top: b, left: O }),
|
|
18876
|
+
j({ top: b, left: O }), I(!0);
|
|
18876
18877
|
}, [t, n, h, C]);
|
|
18877
|
-
|
|
18878
|
-
|
|
18879
|
-
|
|
18878
|
+
W(() => {
|
|
18879
|
+
f && h.width > 0 && h.height > 0 && requestAnimationFrame(() => {
|
|
18880
|
+
$();
|
|
18880
18881
|
});
|
|
18881
|
-
}, [
|
|
18882
|
+
}, [f, h, $]), W(() => {
|
|
18882
18883
|
const m = () => {
|
|
18883
|
-
|
|
18884
|
+
f && $();
|
|
18884
18885
|
}, b = () => {
|
|
18885
|
-
|
|
18886
|
+
f && $();
|
|
18886
18887
|
};
|
|
18887
18888
|
return window.addEventListener("scroll", m, !0), window.addEventListener("resize", b), () => {
|
|
18888
18889
|
window.removeEventListener("scroll", m, !0), window.removeEventListener("resize", b);
|
|
18889
18890
|
};
|
|
18890
|
-
}, [
|
|
18891
|
-
|
|
18891
|
+
}, [f, $]), W(() => {
|
|
18892
|
+
if (!S.current) return;
|
|
18893
|
+
const m = new ResizeObserver(() => {
|
|
18894
|
+
f ? requestAnimationFrame(() => {
|
|
18895
|
+
$();
|
|
18896
|
+
}) : (x(!1), I(!1), v({ width: 0, height: 0 }));
|
|
18897
|
+
});
|
|
18898
|
+
return m.observe(S.current), () => {
|
|
18899
|
+
m.disconnect();
|
|
18900
|
+
};
|
|
18901
|
+
}, [f, $]), W(() => {
|
|
18902
|
+
if (!S.current || !f) return;
|
|
18903
|
+
let m = S.current.getBoundingClientRect();
|
|
18904
|
+
const O = setInterval(() => {
|
|
18905
|
+
if (!S.current) return;
|
|
18906
|
+
const Z = S.current.getBoundingClientRect();
|
|
18907
|
+
if (Math.abs(Z.left - m.left) > 5 || Math.abs(Z.top - m.top) > 5) {
|
|
18908
|
+
x(!1), I(!1), v({ width: 0, height: 0 });
|
|
18909
|
+
return;
|
|
18910
|
+
}
|
|
18911
|
+
m = Z;
|
|
18912
|
+
}, 100);
|
|
18913
|
+
return () => {
|
|
18914
|
+
clearInterval(O);
|
|
18915
|
+
};
|
|
18916
|
+
}, [f]);
|
|
18917
|
+
const G = N(() => {
|
|
18892
18918
|
w && (y.current = setTimeout(() => {
|
|
18893
|
-
x(!1),
|
|
18919
|
+
x(!1), I(!1), v({ width: 0, height: 0 });
|
|
18894
18920
|
}, 3e3));
|
|
18895
|
-
}, [w]), X =
|
|
18921
|
+
}, [w]), X = N(() => {
|
|
18896
18922
|
d || (y.current && (clearTimeout(y.current), y.current = null), c > 0 ? y.current = setTimeout(() => {
|
|
18897
18923
|
x(!0), G();
|
|
18898
18924
|
}, c) : (x(!0), G()));
|
|
18899
|
-
}, [d, c, G]),
|
|
18900
|
-
w && (y.current && (clearTimeout(y.current), y.current = null), x(!1),
|
|
18925
|
+
}, [d, c, G]), B = N(() => {
|
|
18926
|
+
w && (y.current && (clearTimeout(y.current), y.current = null), x(!1), I(!1), v({ width: 0, height: 0 }));
|
|
18901
18927
|
}, [w]);
|
|
18902
|
-
|
|
18903
|
-
y.current && clearTimeout(y.current), x(!1),
|
|
18928
|
+
W(() => () => {
|
|
18929
|
+
y.current && clearTimeout(y.current), x(!1), I(!1), j({ top: 0, left: 0 }), v({ width: 0, height: 0 });
|
|
18904
18930
|
}, []);
|
|
18905
|
-
const
|
|
18906
|
-
if (!
|
|
18931
|
+
const k = () => {
|
|
18932
|
+
if (!f || d || V) return null;
|
|
18907
18933
|
const m = /* @__PURE__ */ i(
|
|
18908
18934
|
"div",
|
|
18909
18935
|
{
|
|
18910
18936
|
ref: R,
|
|
18911
|
-
className:
|
|
18937
|
+
className: q(
|
|
18912
18938
|
r0(e, C, w),
|
|
18913
18939
|
"ui--left-[9999px] ui--top-[9999px] ui--z-10",
|
|
18914
|
-
"ui-invisible",
|
|
18940
|
+
"ui-invisible ui-font-bold",
|
|
18915
18941
|
s
|
|
18916
18942
|
),
|
|
18917
18943
|
style: p,
|
|
18918
18944
|
children: r
|
|
18919
18945
|
}
|
|
18920
18946
|
);
|
|
18921
|
-
return C ? m :
|
|
18922
|
-
},
|
|
18947
|
+
return C ? m : Z1(m, document.body);
|
|
18948
|
+
}, z = () => {
|
|
18923
18949
|
const b = I8(e);
|
|
18924
18950
|
switch (t) {
|
|
18925
18951
|
case "top":
|
|
@@ -19061,57 +19087,57 @@ const y8 = ({
|
|
|
19061
19087
|
default:
|
|
19062
19088
|
return {};
|
|
19063
19089
|
}
|
|
19064
|
-
},
|
|
19065
|
-
w || (x(!1),
|
|
19090
|
+
}, Y = N(() => {
|
|
19091
|
+
w || (x(!1), I(!1), v({ width: 0, height: 0 }));
|
|
19066
19092
|
}, [w]), A = () => {
|
|
19067
|
-
if (!
|
|
19093
|
+
if (!f || d || !V) return null;
|
|
19068
19094
|
const m = /* @__PURE__ */ u(
|
|
19069
19095
|
"div",
|
|
19070
19096
|
{
|
|
19071
19097
|
ref: R,
|
|
19072
19098
|
id: a || J.current,
|
|
19073
|
-
className:
|
|
19099
|
+
className: q(
|
|
19074
19100
|
r0(e, C, w),
|
|
19075
|
-
"tooltip",
|
|
19101
|
+
"imj-ui-tooltip ui-font-bold",
|
|
19076
19102
|
s,
|
|
19077
19103
|
// Agregar cursor pointer cuando autoClose es false para indicar que se puede cerrar
|
|
19078
19104
|
w ? "" : "ui-cursor-pointer"
|
|
19079
19105
|
),
|
|
19080
19106
|
style: {
|
|
19081
|
-
top: `${
|
|
19082
|
-
left: `${
|
|
19107
|
+
top: `${M.top}px`,
|
|
19108
|
+
left: `${M.left}px`,
|
|
19083
19109
|
...p
|
|
19084
19110
|
},
|
|
19085
19111
|
role: "tooltip",
|
|
19086
|
-
"aria-hidden": !
|
|
19087
|
-
onClick: w ? void 0 :
|
|
19112
|
+
"aria-hidden": !f,
|
|
19113
|
+
onClick: w ? void 0 : Y,
|
|
19088
19114
|
onKeyDown: w ? void 0 : (b) => {
|
|
19089
|
-
(b.key === "Enter" || b.key === " ") &&
|
|
19115
|
+
(b.key === "Enter" || b.key === " ") && Y();
|
|
19090
19116
|
},
|
|
19091
19117
|
tabIndex: w ? void 0 : 0,
|
|
19092
19118
|
...g,
|
|
19093
19119
|
children: [
|
|
19094
19120
|
r,
|
|
19095
|
-
/* @__PURE__ */ i("div", { className:
|
|
19121
|
+
/* @__PURE__ */ i("div", { className: q("tooltip-imj-ui-arrow", l), style: z() })
|
|
19096
19122
|
]
|
|
19097
19123
|
}
|
|
19098
19124
|
);
|
|
19099
|
-
return C ? m :
|
|
19125
|
+
return C ? m : Z1(m, document.body);
|
|
19100
19126
|
};
|
|
19101
|
-
return /* @__PURE__ */ u("div", { ref:
|
|
19127
|
+
return /* @__PURE__ */ u("div", { ref: D, className: C ? "ui-relative" : "", children: [
|
|
19102
19128
|
/* @__PURE__ */ i(
|
|
19103
19129
|
"div",
|
|
19104
19130
|
{
|
|
19105
|
-
ref:
|
|
19131
|
+
ref: S,
|
|
19106
19132
|
onMouseEnter: X,
|
|
19107
|
-
onMouseLeave:
|
|
19133
|
+
onMouseLeave: B,
|
|
19108
19134
|
onFocus: X,
|
|
19109
|
-
onBlur:
|
|
19110
|
-
className:
|
|
19135
|
+
onBlur: B,
|
|
19136
|
+
className: q("ui-inline-block ui-h-fit ui-w-fit", L ? "ui-w-full" : "ui-w-fit"),
|
|
19111
19137
|
children: o
|
|
19112
19138
|
}
|
|
19113
19139
|
),
|
|
19114
|
-
|
|
19140
|
+
k(),
|
|
19115
19141
|
A()
|
|
19116
19142
|
] });
|
|
19117
19143
|
}, t0 = ({
|
|
@@ -19127,7 +19153,8 @@ const y8 = ({
|
|
|
19127
19153
|
style: L,
|
|
19128
19154
|
arrowClassName: p,
|
|
19129
19155
|
absolute: l = !1,
|
|
19130
|
-
autoClose: C = !
|
|
19156
|
+
autoClose: C = !0,
|
|
19157
|
+
// true: tooltip se cierra automáticamente (por defecto), false: permanece abierto hasta cierre manual
|
|
19131
19158
|
...w
|
|
19132
19159
|
}) => d || !r ? o : /* @__PURE__ */ i(
|
|
19133
19160
|
B8,
|
|
@@ -19216,7 +19243,7 @@ const y8 = ({
|
|
|
19216
19243
|
}
|
|
19217
19244
|
};
|
|
19218
19245
|
return a[o] || a.button;
|
|
19219
|
-
},
|
|
19246
|
+
}, r1 = ({
|
|
19220
19247
|
className: o,
|
|
19221
19248
|
classNameLabel: r,
|
|
19222
19249
|
fullWidth: t = !1,
|
|
@@ -19232,43 +19259,44 @@ const y8 = ({
|
|
|
19232
19259
|
textColor: C,
|
|
19233
19260
|
clickable: w = !0,
|
|
19234
19261
|
icon: g,
|
|
19235
|
-
link:
|
|
19262
|
+
link: f,
|
|
19236
19263
|
size: x,
|
|
19237
|
-
square:
|
|
19264
|
+
square: M = !1,
|
|
19238
19265
|
target: j = "_self",
|
|
19239
19266
|
onClickIcon: h,
|
|
19240
19267
|
onClickLeftSlot: v,
|
|
19241
19268
|
onClickRightSlot: V,
|
|
19242
|
-
disabled:
|
|
19243
|
-
colorIcon:
|
|
19269
|
+
disabled: I,
|
|
19270
|
+
colorIcon: S,
|
|
19244
19271
|
showShadow: R = !1,
|
|
19245
|
-
borderable:
|
|
19272
|
+
borderable: D,
|
|
19246
19273
|
iconSizeExtended: y = "none",
|
|
19247
19274
|
defaultSizeIcon: J = !0,
|
|
19248
|
-
defaultTooltipColor:
|
|
19275
|
+
defaultTooltipColor: $ = !0,
|
|
19249
19276
|
as: G = "button",
|
|
19250
19277
|
classNameId: X = "imj-ui-inner-button",
|
|
19251
|
-
tooltip:
|
|
19252
|
-
tooltipPosition:
|
|
19253
|
-
tooltipAlignment:
|
|
19254
|
-
tooltipColor:
|
|
19278
|
+
tooltip: B = "",
|
|
19279
|
+
tooltipPosition: k,
|
|
19280
|
+
tooltipAlignment: z,
|
|
19281
|
+
tooltipColor: Y = "neutral",
|
|
19255
19282
|
tooltipDelay: A,
|
|
19256
|
-
|
|
19257
|
-
|
|
19258
|
-
|
|
19259
|
-
|
|
19260
|
-
|
|
19261
|
-
|
|
19262
|
-
|
|
19263
|
-
|
|
19264
|
-
|
|
19265
|
-
|
|
19283
|
+
tooltipAbsolute: m,
|
|
19284
|
+
classNameTooltip: b,
|
|
19285
|
+
stopPropagation: O = !0,
|
|
19286
|
+
pointer: Z = !1,
|
|
19287
|
+
ref: T,
|
|
19288
|
+
onClick: E,
|
|
19289
|
+
textAlign: i1 = "center",
|
|
19290
|
+
whiteBackground: e1 = !1,
|
|
19291
|
+
strokeWidth: l1 = 2,
|
|
19292
|
+
transition: _ = !0,
|
|
19293
|
+
...U
|
|
19266
19294
|
}) => {
|
|
19267
|
-
const
|
|
19268
|
-
disabled:
|
|
19269
|
-
},
|
|
19270
|
-
|
|
19271
|
-
},
|
|
19295
|
+
const H = {
|
|
19296
|
+
disabled: I
|
|
19297
|
+
}, P = a === "icon", o1 = P ? !0 : J, n1 = P ? "xs" : x, p1 = (L1) => {
|
|
19298
|
+
O && L1.stopPropagation(), E && E(L1);
|
|
19299
|
+
}, s1 = c1("", {
|
|
19272
19300
|
variants: {
|
|
19273
19301
|
color: {
|
|
19274
19302
|
inherit: "ui-text-inherit",
|
|
@@ -19293,26 +19321,26 @@ const y8 = ({
|
|
|
19293
19321
|
color: "inherit",
|
|
19294
19322
|
textAlign: "left"
|
|
19295
19323
|
}
|
|
19296
|
-
}),
|
|
19324
|
+
}), d1 = () => /* @__PURE__ */ u(k1, { children: [
|
|
19297
19325
|
l && n && /* @__PURE__ */ i(
|
|
19298
|
-
|
|
19326
|
+
x1,
|
|
19299
19327
|
{
|
|
19300
19328
|
slot: n,
|
|
19301
19329
|
size: x,
|
|
19302
|
-
colorIcon:
|
|
19330
|
+
colorIcon: S,
|
|
19303
19331
|
className: o,
|
|
19304
19332
|
onClick: v,
|
|
19305
|
-
defaultSizeIcon:
|
|
19306
|
-
strokeWidth:
|
|
19333
|
+
defaultSizeIcon: o1,
|
|
19334
|
+
strokeWidth: l1
|
|
19307
19335
|
}
|
|
19308
19336
|
),
|
|
19309
19337
|
l && /* @__PURE__ */ u(
|
|
19310
19338
|
"p",
|
|
19311
19339
|
{
|
|
19312
|
-
className:
|
|
19340
|
+
className: q(
|
|
19313
19341
|
"ui-relative ui-leading-none",
|
|
19314
19342
|
n || e ? "" : "ui-w-full",
|
|
19315
|
-
|
|
19343
|
+
s1({ color: C, textAlign: i1 })
|
|
19316
19344
|
),
|
|
19317
19345
|
children: [
|
|
19318
19346
|
l,
|
|
@@ -19322,29 +19350,29 @@ const y8 = ({
|
|
|
19322
19350
|
),
|
|
19323
19351
|
c && l && /* @__PURE__ */ i(y8, { color: c, label: d, border: s }),
|
|
19324
19352
|
!l && g && (typeof g == "string" ? /* @__PURE__ */ i(
|
|
19325
|
-
|
|
19353
|
+
b1,
|
|
19326
19354
|
{
|
|
19327
|
-
strokeWidth:
|
|
19355
|
+
strokeWidth: l1,
|
|
19328
19356
|
name: g,
|
|
19329
19357
|
size: a === "icon" ? x : y !== "none" ? y : x,
|
|
19330
|
-
color:
|
|
19331
|
-
onClick: h
|
|
19358
|
+
color: S,
|
|
19359
|
+
onClick: a === "icon" ? E || h : void 0
|
|
19332
19360
|
}
|
|
19333
19361
|
) : g),
|
|
19334
19362
|
l && e && /* @__PURE__ */ i(
|
|
19335
|
-
|
|
19363
|
+
x1,
|
|
19336
19364
|
{
|
|
19337
19365
|
slot: e,
|
|
19338
19366
|
size: y !== "none" ? y : x,
|
|
19339
|
-
colorIcon:
|
|
19367
|
+
colorIcon: S,
|
|
19340
19368
|
className: o,
|
|
19341
19369
|
onClick: V,
|
|
19342
|
-
defaultSizeIcon:
|
|
19343
|
-
strokeWidth:
|
|
19370
|
+
defaultSizeIcon: o1,
|
|
19371
|
+
strokeWidth: l1
|
|
19344
19372
|
}
|
|
19345
19373
|
)
|
|
19346
|
-
] }), u1 =
|
|
19347
|
-
`${X} ui-h-fit ui-justify-center ui-flex ui-items-center ui-gap-x-1.5 ui-border-[1.5px] ui-font-bold ui-cursor-default ${R && a !== "icon" ? "ui-shadow-button" : ""} ui-overflow-hidden ${
|
|
19374
|
+
] }), u1 = M ? "!ui-p-0 ui-flex ui-justify-center ui-items-center" : "", m1 = $ ? Y || "neutral" : L, M1 = c1(
|
|
19375
|
+
`${X} ui-h-fit ui-justify-center ui-flex ui-items-center ui-gap-x-1.5 ui-border-[1.5px] ui-font-bold ui-cursor-default ${R && a !== "icon" ? "ui-shadow-button" : ""} ui-overflow-hidden ${Z && P ? "!ui-cursor-pointer" : ""} ${_ ? "ui-transition-all ui-duration-300" : ""}`,
|
|
19348
19376
|
{
|
|
19349
19377
|
variants: {
|
|
19350
19378
|
variant: {
|
|
@@ -19355,26 +19383,26 @@ const y8 = ({
|
|
|
19355
19383
|
icon: " ui-border-transparent"
|
|
19356
19384
|
},
|
|
19357
19385
|
size: {
|
|
19358
|
-
xs: `ui-max-h-5 ui-min-h-5 ui-min-w-5 ${l ? "ui-px-1 ui-py-0.5" : "ui-p-0.5 ui-w-5 ui-flex ui-justify-center ui-items-center"} ui-h-5 ui-text-[10px] ${
|
|
19359
|
-
sm: `ui-max-h-6 ui-min-h-6 ui-min-w-6 ${l ? "ui-px-2 ui-py-1" : "ui-p-1 ui-w-6 ui-flex ui-justify-center ui-items-center"} ui-h-6 ui-text-[10px] ${
|
|
19360
|
-
md: `ui-max-h-[26px] ui-min-h-[26px] ui-min-w-[26px] ${l ? "ui-px-3 ui-py-1.5" : "ui-p-1.5 ui-w-[26px] ui-flex ui-justify-center ui-items-center"} ui-h-[26px] ui-text-[12px] ${
|
|
19361
|
-
lg: `ui-max-h-[32px] ui-min-h-[32px] ui-min-w-[32px] ${l ? "ui-px-4 ui-py-2" : "ui-p-2 ui-w-[32px] ui-flex ui-justify-center ui-items-center"} ui-h-[32px] ui-text-[14px] ${
|
|
19362
|
-
xl: `ui-max-h-[42px] ui-min-h-[42px] ui-min-w-[42px] ${l ? "ui-px-5 ui-py-2.5" : "ui-p-2.5 ui-w-[42px] ui-flex ui-justify-center ui-items-center"} ui-h-[42px] ui-text-[16px] ${
|
|
19363
|
-
"2xl": `ui-max-h-[52px] ui-min-h-[52px] ui-min-w-[52px] ${l ? "ui-px-6 ui-py-3" : "ui-p-3 ui-w-[52px] ui-flex ui-justify-center ui-items-center"} ui-h-[52px] ui-text-[18px] ${
|
|
19364
|
-
"3xl": `ui-max-h-[62px] ui-min-h-[62px] ui-min-w-[62px] ${l ? "ui-px-7 ui-py-3.5" : "ui-p-3.5 ui-w-[62px] ui-flex ui-justify-center ui-items-center"} ui-h-[62px] ui-text-[20px] ${
|
|
19386
|
+
xs: `ui-max-h-5 ui-min-h-5 ui-min-w-5 ${l ? "ui-px-1 ui-py-0.5" : "ui-p-0.5 ui-w-5 ui-flex ui-justify-center ui-items-center"} ui-h-5 ui-text-[10px] ${M ? ` ui-max-w-5 ui-min-h-5 ${u1}` : ""}`,
|
|
19387
|
+
sm: `ui-max-h-6 ui-min-h-6 ui-min-w-6 ${l ? "ui-px-2 ui-py-1" : "ui-p-1 ui-w-6 ui-flex ui-justify-center ui-items-center"} ui-h-6 ui-text-[10px] ${M ? ` ui-max-w-6 ui-min-h-6 ${u1}` : ""}`,
|
|
19388
|
+
md: `ui-max-h-[26px] ui-min-h-[26px] ui-min-w-[26px] ${l ? "ui-px-3 ui-py-1.5" : "ui-p-1.5 ui-w-[26px] ui-flex ui-justify-center ui-items-center"} ui-h-[26px] ui-text-[12px] ${M ? ` ui-max-w-[26px] ui-min-h-[26px] ${u1}` : ""}`,
|
|
19389
|
+
lg: `ui-max-h-[32px] ui-min-h-[32px] ui-min-w-[32px] ${l ? "ui-px-4 ui-py-2" : "ui-p-2 ui-w-[32px] ui-flex ui-justify-center ui-items-center"} ui-h-[32px] ui-text-[14px] ${M ? ` ui-max-w-[32px] ui-min-h-[32px] ${u1}` : ""}`,
|
|
19390
|
+
xl: `ui-max-h-[42px] ui-min-h-[42px] ui-min-w-[42px] ${l ? "ui-px-5 ui-py-2.5" : "ui-p-2.5 ui-w-[42px] ui-flex ui-justify-center ui-items-center"} ui-h-[42px] ui-text-[16px] ${M ? ` ui-max-w-[42px] ui-min-h-[42px] ${u1}` : ""}`,
|
|
19391
|
+
"2xl": `ui-max-h-[52px] ui-min-h-[52px] ui-min-w-[52px] ${l ? "ui-px-6 ui-py-3" : "ui-p-3 ui-w-[52px] ui-flex ui-justify-center ui-items-center"} ui-h-[52px] ui-text-[18px] ${M ? ` ui-max-w-[52px] ui-min-h-[52px] ${u1}` : ""}`,
|
|
19392
|
+
"3xl": `ui-max-h-[62px] ui-min-h-[62px] ui-min-w-[62px] ${l ? "ui-px-7 ui-py-3.5" : "ui-p-3.5 ui-w-[62px] ui-flex ui-justify-center ui-items-center"} ui-h-[62px] ui-text-[20px] ${M ? `ui-max-w-[62px] ui-min-h-[62px] ${u1}` : ""}`
|
|
19365
19393
|
},
|
|
19366
19394
|
color: {
|
|
19367
|
-
blue: C1(a, w,
|
|
19368
|
-
"blue-dark": C1(a, w,
|
|
19369
|
-
orange: C1(a, w,
|
|
19370
|
-
red: C1(a, w,
|
|
19371
|
-
green: C1(a, w,
|
|
19372
|
-
white: C1(a, w,
|
|
19373
|
-
yellow: C1(a, w,
|
|
19374
|
-
"blue-light": C1(a, w,
|
|
19375
|
-
neutral: C1(a, w,
|
|
19376
|
-
black: C1(a, w,
|
|
19377
|
-
transparent: C1(a, w,
|
|
19395
|
+
blue: C1(a, w, D, e1).blue,
|
|
19396
|
+
"blue-dark": C1(a, w, D, e1)["blue-dark"],
|
|
19397
|
+
orange: C1(a, w, D, e1).orange,
|
|
19398
|
+
red: C1(a, w, D, e1).red,
|
|
19399
|
+
green: C1(a, w, D, e1).green,
|
|
19400
|
+
white: C1(a, w, D, e1).white,
|
|
19401
|
+
yellow: C1(a, w, D, e1).yellow,
|
|
19402
|
+
"blue-light": C1(a, w, D, e1)["blue-light"],
|
|
19403
|
+
neutral: C1(a, w, D, e1).neutral,
|
|
19404
|
+
black: C1(a, w, D, e1).black,
|
|
19405
|
+
transparent: C1(a, w, D, e1).transparent
|
|
19378
19406
|
},
|
|
19379
19407
|
rounded: {
|
|
19380
19408
|
false: "ui-rounded-sm",
|
|
@@ -19382,7 +19410,7 @@ const y8 = ({
|
|
|
19382
19410
|
},
|
|
19383
19411
|
fullWidth: {
|
|
19384
19412
|
true: "ui-w-full",
|
|
19385
|
-
false: !
|
|
19413
|
+
false: !M && !g && l ? "ui-min-w-fit" : ""
|
|
19386
19414
|
}
|
|
19387
19415
|
},
|
|
19388
19416
|
defaultVariants: {
|
|
@@ -19393,61 +19421,62 @@ const y8 = ({
|
|
|
19393
19421
|
}
|
|
19394
19422
|
}
|
|
19395
19423
|
)({
|
|
19396
|
-
size:
|
|
19424
|
+
size: n1,
|
|
19397
19425
|
color: L,
|
|
19398
19426
|
rounded: p,
|
|
19399
19427
|
fullWidth: t,
|
|
19400
19428
|
variant: a,
|
|
19401
|
-
className:
|
|
19429
|
+
className: q(o)
|
|
19402
19430
|
});
|
|
19403
|
-
return
|
|
19431
|
+
return f ? /* @__PURE__ */ i(
|
|
19404
19432
|
"a",
|
|
19405
19433
|
{
|
|
19406
|
-
ref:
|
|
19407
|
-
href:
|
|
19434
|
+
ref: T,
|
|
19435
|
+
href: f,
|
|
19408
19436
|
target: j,
|
|
19409
|
-
className:
|
|
19410
|
-
children:
|
|
19437
|
+
className: q(M1, o),
|
|
19438
|
+
children: d1()
|
|
19411
19439
|
}
|
|
19412
19440
|
) : G === "div" ? /* @__PURE__ */ i(
|
|
19413
19441
|
t0,
|
|
19414
19442
|
{
|
|
19415
|
-
label:
|
|
19416
|
-
position:
|
|
19417
|
-
alignment:
|
|
19418
|
-
|
|
19443
|
+
label: B,
|
|
19444
|
+
position: k,
|
|
19445
|
+
alignment: z,
|
|
19446
|
+
absolute: m,
|
|
19447
|
+
color: m1,
|
|
19419
19448
|
delay: A,
|
|
19420
|
-
className:
|
|
19449
|
+
className: b,
|
|
19421
19450
|
fullWidth: t,
|
|
19422
19451
|
children: /* @__PURE__ */ i(
|
|
19423
19452
|
"div",
|
|
19424
19453
|
{
|
|
19425
|
-
ref:
|
|
19426
|
-
className:
|
|
19427
|
-
...
|
|
19428
|
-
children:
|
|
19454
|
+
ref: T,
|
|
19455
|
+
className: q(M1, o),
|
|
19456
|
+
...U,
|
|
19457
|
+
children: d1()
|
|
19429
19458
|
}
|
|
19430
19459
|
)
|
|
19431
19460
|
}
|
|
19432
19461
|
) : /* @__PURE__ */ i(
|
|
19433
19462
|
t0,
|
|
19434
19463
|
{
|
|
19435
|
-
label:
|
|
19436
|
-
position:
|
|
19437
|
-
alignment:
|
|
19438
|
-
color:
|
|
19464
|
+
label: B,
|
|
19465
|
+
position: k,
|
|
19466
|
+
alignment: z,
|
|
19467
|
+
color: m1,
|
|
19439
19468
|
delay: A,
|
|
19440
|
-
className:
|
|
19469
|
+
className: b,
|
|
19441
19470
|
fullWidth: t,
|
|
19442
19471
|
children: /* @__PURE__ */ i(
|
|
19443
19472
|
"button",
|
|
19444
19473
|
{
|
|
19445
|
-
ref:
|
|
19446
|
-
className:
|
|
19474
|
+
ref: T,
|
|
19475
|
+
className: q(M1, o),
|
|
19476
|
+
...H,
|
|
19447
19477
|
...U,
|
|
19448
|
-
|
|
19449
|
-
|
|
19450
|
-
children: l1()
|
|
19478
|
+
onClick: p1,
|
|
19479
|
+
children: d1()
|
|
19451
19480
|
}
|
|
19452
19481
|
)
|
|
19453
19482
|
}
|
|
@@ -19461,7 +19490,7 @@ const y8 = ({
|
|
|
19461
19490
|
}) => /* @__PURE__ */ u("div", { className: `ui-flex ui-items-center ui-justify-between ${n}`, children: [
|
|
19462
19491
|
/* @__PURE__ */ i("h3", { className: "ui-text-sm ui-font-bold ui-leading-none ui-text-neutral-900", children: o }),
|
|
19463
19492
|
/* @__PURE__ */ i(
|
|
19464
|
-
|
|
19493
|
+
r1,
|
|
19465
19494
|
{
|
|
19466
19495
|
variant: "icon",
|
|
19467
19496
|
size: "2xl",
|
|
@@ -19603,7 +19632,7 @@ const y8 = ({
|
|
|
19603
19632
|
}, e = o.type === "yellow";
|
|
19604
19633
|
return /* @__PURE__ */ u("div", { className: `ui-flex ui-gap-x-1 ${o.title ? "ui-items-start" : "ui-items-center"}`, children: [
|
|
19605
19634
|
/* @__PURE__ */ i(
|
|
19606
|
-
|
|
19635
|
+
b1,
|
|
19607
19636
|
{
|
|
19608
19637
|
name: r(o.type || "green"),
|
|
19609
19638
|
color: t ? e ? "yellow_dark" : "white" : void 0,
|
|
@@ -19628,7 +19657,7 @@ const y8 = ({
|
|
|
19628
19657
|
)
|
|
19629
19658
|
] }),
|
|
19630
19659
|
o.showCloseButton && /* @__PURE__ */ i(
|
|
19631
|
-
|
|
19660
|
+
r1,
|
|
19632
19661
|
{
|
|
19633
19662
|
icon: "X2Outlined",
|
|
19634
19663
|
size: "xs",
|
|
@@ -19671,7 +19700,7 @@ const y8 = ({
|
|
|
19671
19700
|
}, c = t === "outlined";
|
|
19672
19701
|
return console.log(c), /* @__PURE__ */ u("div", { className: "ui-mt-2 ui-flex ui-w-full ui-justify-end ui-gap-x-2", children: [
|
|
19673
19702
|
o.onSecondaryClick && /* @__PURE__ */ i(
|
|
19674
|
-
|
|
19703
|
+
r1,
|
|
19675
19704
|
{
|
|
19676
19705
|
clickable: !0,
|
|
19677
19706
|
variant: r[t].secondary,
|
|
@@ -19682,7 +19711,7 @@ const y8 = ({
|
|
|
19682
19711
|
}
|
|
19683
19712
|
),
|
|
19684
19713
|
o.onPrimaryClick && /* @__PURE__ */ i(
|
|
19685
|
-
|
|
19714
|
+
r1,
|
|
19686
19715
|
{
|
|
19687
19716
|
clickable: !0,
|
|
19688
19717
|
variant: r[t].primary,
|
|
@@ -19763,11 +19792,11 @@ const y8 = ({
|
|
|
19763
19792
|
}[o][r]}`;
|
|
19764
19793
|
}, T8 = ({ open: o, externalIsLeaving: r }) => {
|
|
19765
19794
|
const [t, n] = K(!1), [e, a] = K(!1), c = r !== void 0 ? r : e;
|
|
19766
|
-
return
|
|
19795
|
+
return W(() => {
|
|
19767
19796
|
o ? (n(!0), a(!1)) : (a(!0), r === void 0 && setTimeout(() => {
|
|
19768
19797
|
n(!1);
|
|
19769
19798
|
}, 300));
|
|
19770
|
-
}, [o, r]),
|
|
19799
|
+
}, [o, r]), W(() => {
|
|
19771
19800
|
r && r !== e && (a(!0), setTimeout(() => {
|
|
19772
19801
|
n(!1);
|
|
19773
19802
|
}, 300));
|
|
@@ -19891,7 +19920,7 @@ const y8 = ({
|
|
|
19891
19920
|
}
|
|
19892
19921
|
}
|
|
19893
19922
|
}
|
|
19894
|
-
),
|
|
19923
|
+
), f = c1(
|
|
19895
19924
|
"ui-absolute ui-border-[3px] ui-p-3.5 ui-rounded-full ui-border-white",
|
|
19896
19925
|
{
|
|
19897
19926
|
variants: {
|
|
@@ -19903,10 +19932,10 @@ const y8 = ({
|
|
|
19903
19932
|
}
|
|
19904
19933
|
}
|
|
19905
19934
|
);
|
|
19906
|
-
return /* @__PURE__ */ u("div", { className:
|
|
19907
|
-
(l || C) && /* @__PURE__ */ u("div", { className:
|
|
19908
|
-
l && /* @__PURE__ */ i(
|
|
19909
|
-
/* @__PURE__ */ i("div", { className:
|
|
19935
|
+
return /* @__PURE__ */ u("div", { className: q("ui-relative ui-flex ui-w-full ui-gap-2 ui-p-1", o), children: [
|
|
19936
|
+
(l || C) && /* @__PURE__ */ u("div", { className: q(g({ status: r })), children: [
|
|
19937
|
+
l && /* @__PURE__ */ i(b1, { name: l, size: "2xl", color: "white", strokeWidth: 4 }),
|
|
19938
|
+
/* @__PURE__ */ i("div", { className: q(f({ borderStyle: p })) })
|
|
19910
19939
|
] }),
|
|
19911
19940
|
/* @__PURE__ */ u("div", { className: "ui-relative ui-flex ui-w-full ui-flex-col ui-gap-1.5", children: [
|
|
19912
19941
|
/* @__PURE__ */ u("div", { className: "ui-flex ui-items-center ui-justify-between ui-gap-2", children: [
|
|
@@ -19926,7 +19955,7 @@ const y8 = ({
|
|
|
19926
19955
|
/* @__PURE__ */ i(
|
|
19927
19956
|
"p",
|
|
19928
19957
|
{
|
|
19929
|
-
className:
|
|
19958
|
+
className: q("ui-text-xxs", r === "red" ? "ui-text-red-500" : "ui-text-neutral-500"),
|
|
19930
19959
|
children: w
|
|
19931
19960
|
}
|
|
19932
19961
|
)
|
|
@@ -19948,9 +19977,9 @@ const y8 = ({
|
|
|
19948
19977
|
animation: C = "none",
|
|
19949
19978
|
isLeaving: w,
|
|
19950
19979
|
progressBarColor: g = !1,
|
|
19951
|
-
duration:
|
|
19980
|
+
duration: f = 3e3
|
|
19952
19981
|
}) => {
|
|
19953
|
-
const { isVisible: x, isLeaving:
|
|
19982
|
+
const { isVisible: x, isLeaving: M } = T8({ open: o, externalIsLeaving: w });
|
|
19954
19983
|
if (!x)
|
|
19955
19984
|
return null;
|
|
19956
19985
|
const j = !!d, h = (v) => {
|
|
@@ -19959,9 +19988,9 @@ const y8 = ({
|
|
|
19959
19988
|
return /* @__PURE__ */ u(
|
|
19960
19989
|
"div",
|
|
19961
19990
|
{
|
|
19962
|
-
className:
|
|
19991
|
+
className: q(
|
|
19963
19992
|
"ui-relative ui-overflow-hidden",
|
|
19964
|
-
A8({ type: r, variant: t, isLeaving:
|
|
19993
|
+
A8({ type: r, variant: t, isLeaving: M, animation: C }),
|
|
19965
19994
|
j ? "ui-hover:ui-brightness-110 ui-cursor-pointer ui-transition-all ui-duration-300 ui-ease-in-out" : ""
|
|
19966
19995
|
),
|
|
19967
19996
|
onClick: h,
|
|
@@ -19990,11 +20019,11 @@ const y8 = ({
|
|
|
19990
20019
|
}
|
|
19991
20020
|
)
|
|
19992
20021
|
] }),
|
|
19993
|
-
g && /* @__PURE__ */ i("div", { className:
|
|
20022
|
+
g && /* @__PURE__ */ i("div", { className: q("ui-absolute ui-bottom-0 ui-w-full ui-opacity-80"), children: /* @__PURE__ */ i(
|
|
19994
20023
|
F8,
|
|
19995
20024
|
{
|
|
19996
20025
|
progress: 100,
|
|
19997
|
-
duration:
|
|
20026
|
+
duration: f,
|
|
19998
20027
|
color: t === "contained" ? "white" : r,
|
|
19999
20028
|
showLabel: !1,
|
|
20000
20029
|
withBackground: !1
|
|
@@ -20019,26 +20048,26 @@ const y8 = ({
|
|
|
20019
20048
|
children: C,
|
|
20020
20049
|
icon: w,
|
|
20021
20050
|
link: g,
|
|
20022
|
-
size:
|
|
20051
|
+
size: f,
|
|
20023
20052
|
target: x = "_self",
|
|
20024
|
-
onClickIcon:
|
|
20053
|
+
onClickIcon: M,
|
|
20025
20054
|
disabled: j,
|
|
20026
20055
|
colorIcon: h,
|
|
20027
20056
|
tooltip: v,
|
|
20028
20057
|
tooltipPosition: V,
|
|
20029
|
-
tooltipAlignment:
|
|
20030
|
-
tooltipColor:
|
|
20058
|
+
tooltipAlignment: I,
|
|
20059
|
+
tooltipColor: S,
|
|
20031
20060
|
tooltipDelay: R,
|
|
20032
|
-
...
|
|
20061
|
+
...D
|
|
20033
20062
|
}) => /* @__PURE__ */ i(
|
|
20034
|
-
|
|
20063
|
+
r1,
|
|
20035
20064
|
{
|
|
20036
20065
|
ref: o,
|
|
20037
20066
|
variant: a,
|
|
20038
20067
|
color: p,
|
|
20039
20068
|
rounded: l,
|
|
20040
20069
|
fullWidth: t,
|
|
20041
|
-
size:
|
|
20070
|
+
size: f,
|
|
20042
20071
|
clickable: L,
|
|
20043
20072
|
children: C,
|
|
20044
20073
|
icon: w,
|
|
@@ -20049,16 +20078,16 @@ const y8 = ({
|
|
|
20049
20078
|
slotRight: e,
|
|
20050
20079
|
link: g,
|
|
20051
20080
|
target: x,
|
|
20052
|
-
onClickIcon:
|
|
20081
|
+
onClickIcon: M,
|
|
20053
20082
|
disabled: j,
|
|
20054
20083
|
colorIcon: h,
|
|
20055
20084
|
className: r,
|
|
20056
20085
|
tooltip: v,
|
|
20057
20086
|
tooltipPosition: V,
|
|
20058
|
-
tooltipAlignment:
|
|
20059
|
-
tooltipColor:
|
|
20087
|
+
tooltipAlignment: I,
|
|
20088
|
+
tooltipColor: S,
|
|
20060
20089
|
tooltipDelay: R,
|
|
20061
|
-
...
|
|
20090
|
+
...D
|
|
20062
20091
|
}
|
|
20063
20092
|
), u5 = ({
|
|
20064
20093
|
children: o,
|
|
@@ -20067,11 +20096,11 @@ const y8 = ({
|
|
|
20067
20096
|
color: n = "white",
|
|
20068
20097
|
size: e = "md"
|
|
20069
20098
|
}) => {
|
|
20070
|
-
const a =
|
|
20071
|
-
if (!
|
|
20099
|
+
const a = f1.Children.toArray(o), c = f1.Children.map(o, (d, s) => {
|
|
20100
|
+
if (!f1.isValidElement(d))
|
|
20072
20101
|
return d;
|
|
20073
20102
|
const L = s === 0, p = s === a.length - 1, l = d.props.icon;
|
|
20074
|
-
return
|
|
20103
|
+
return f1.cloneElement(d, {
|
|
20075
20104
|
...d.props,
|
|
20076
20105
|
className: `${d.props.className || ""} ${L ? "!ui-rounded-r-none" : p ? "!ui-rounded-l-none" : "!ui-rounded-none"}`.trim(),
|
|
20077
20106
|
// Asegurar que los botones tengan el mismo tamaño y estilo base
|
|
@@ -20085,14 +20114,14 @@ const y8 = ({
|
|
|
20085
20114
|
}, J1 = ({ className: o, vertical: r = !1, padding: t = !0 }) => /* @__PURE__ */ i(
|
|
20086
20115
|
"div",
|
|
20087
20116
|
{
|
|
20088
|
-
className:
|
|
20117
|
+
className: q(
|
|
20089
20118
|
"ui-bg-neutral-100",
|
|
20090
20119
|
o,
|
|
20091
20120
|
"",
|
|
20092
20121
|
r ? "ui-max-h-full ui-min-h-7 ui-w-[1px]" : "ui-h-[1px] ui-w-full"
|
|
20093
20122
|
)
|
|
20094
20123
|
}
|
|
20095
|
-
),
|
|
20124
|
+
), g1 = ({
|
|
20096
20125
|
children: o,
|
|
20097
20126
|
className: r,
|
|
20098
20127
|
fullWidth: t = !1,
|
|
@@ -20110,7 +20139,7 @@ const y8 = ({
|
|
|
20110
20139
|
return /* @__PURE__ */ i(
|
|
20111
20140
|
"div",
|
|
20112
20141
|
{
|
|
20113
|
-
className:
|
|
20142
|
+
className: q(
|
|
20114
20143
|
"ui-flex ui-w-full ui-flex-col ui-border-1 ui-border-neutral-100 ui-bg-white ui-shadow-sm",
|
|
20115
20144
|
r,
|
|
20116
20145
|
s ? "ui-gap-4" : "",
|
|
@@ -20127,11 +20156,11 @@ const y8 = ({
|
|
|
20127
20156
|
}
|
|
20128
20157
|
);
|
|
20129
20158
|
};
|
|
20130
|
-
|
|
20131
|
-
|
|
20159
|
+
g1.Header = ({ children: o, className: r }) => /* @__PURE__ */ i("div", { className: r, children: o });
|
|
20160
|
+
g1.Body = ({ children: o, className: r, fullHeight: t = !1, scrollable: n = !0 }) => /* @__PURE__ */ i(
|
|
20132
20161
|
"div",
|
|
20133
20162
|
{
|
|
20134
|
-
className:
|
|
20163
|
+
className: q(
|
|
20135
20164
|
r,
|
|
20136
20165
|
t ? "ui-h-full" : "",
|
|
20137
20166
|
n ? "custom-scrollbar ui-overflow-y-auto" : ""
|
|
@@ -20139,8 +20168,8 @@ h1.Body = ({ children: o, className: r, fullHeight: t = !1, scrollable: n = !0 }
|
|
|
20139
20168
|
children: o
|
|
20140
20169
|
}
|
|
20141
20170
|
);
|
|
20142
|
-
|
|
20143
|
-
|
|
20171
|
+
g1.Footer = ({ children: o, className: r }) => /* @__PURE__ */ i("div", { className: r, children: o });
|
|
20172
|
+
g1.Separator = ({ className: o, vertical: r = !1, padding: t = !0 }) => /* @__PURE__ */ i(J1, { vertical: r, padding: t, className: o });
|
|
20144
20173
|
const U8 = (o) => {
|
|
20145
20174
|
const {
|
|
20146
20175
|
mode: r = "single",
|
|
@@ -20157,113 +20186,113 @@ const U8 = (o) => {
|
|
|
20157
20186
|
internalRange: { start: null, end: null },
|
|
20158
20187
|
hoverDate: null,
|
|
20159
20188
|
portalPosition: { top: 0, left: 0 }
|
|
20160
|
-
}), [L, p] = K(!1), l = t1(null), C = r === "single" ? t !== void 0 : n !== void 0, w = r === "single" ? t == null : n === void 0, g = r === "single" ? w ? d.internalDate : t : null,
|
|
20161
|
-
start: x(
|
|
20162
|
-
end: x(
|
|
20163
|
-
}, h =
|
|
20189
|
+
}), [L, p] = K(!1), l = t1(null), C = r === "single" ? t !== void 0 : n !== void 0, w = r === "single" ? t == null : n === void 0, g = r === "single" ? w ? d.internalDate : t : null, f = r === "range" ? w ? d.internalRange : n : { start: null, end: null }, x = (B) => B && B instanceof Date && !isNaN(B.getTime()), M = x(g) ? g : null, j = {
|
|
20190
|
+
start: x(f == null ? void 0 : f.start) ? f.start : null,
|
|
20191
|
+
end: x(f == null ? void 0 : f.end) ? f.end : null
|
|
20192
|
+
}, h = N(() => {
|
|
20164
20193
|
if (l.current) {
|
|
20165
|
-
const
|
|
20166
|
-
if (
|
|
20167
|
-
const
|
|
20168
|
-
let O,
|
|
20169
|
-
const T =
|
|
20170
|
-
T >= A + b ? O =
|
|
20171
|
-
...
|
|
20194
|
+
const B = l.current.getInputElement();
|
|
20195
|
+
if (B) {
|
|
20196
|
+
const k = B.getBoundingClientRect(), z = window.innerHeight, Y = window.innerWidth, A = 320, m = 256, b = 8;
|
|
20197
|
+
let O, Z = k.left;
|
|
20198
|
+
const T = z - k.bottom, E = k.top;
|
|
20199
|
+
T >= A + b ? O = k.bottom + b : E >= A + b ? O = k.top - A + b : T > E ? O = k.bottom + b : O = k.top - A + b, k.left + m > Y && (Z = k.right - m), Z = Math.max(0, Math.min(Z, Y - m)), s((i1) => ({
|
|
20200
|
+
...i1,
|
|
20172
20201
|
isOpen: !0,
|
|
20173
|
-
portalPosition: { top: O, left:
|
|
20202
|
+
portalPosition: { top: O, left: Z }
|
|
20174
20203
|
})), p(!0);
|
|
20175
20204
|
return;
|
|
20176
20205
|
}
|
|
20177
20206
|
}
|
|
20178
|
-
s((
|
|
20179
|
-
}, []), v =
|
|
20180
|
-
s((
|
|
20181
|
-
}, []), V =
|
|
20182
|
-
s((
|
|
20183
|
-
}, []),
|
|
20184
|
-
s((
|
|
20185
|
-
}, []),
|
|
20186
|
-
s((
|
|
20187
|
-
const
|
|
20188
|
-
switch (
|
|
20207
|
+
s((B) => ({ ...B, isOpen: !0 })), p(!1);
|
|
20208
|
+
}, []), v = N(() => {
|
|
20209
|
+
s((B) => ({ ...B, isOpen: !1 })), p(!1);
|
|
20210
|
+
}, []), V = N((B) => {
|
|
20211
|
+
s((k) => ({ ...k, currentDate: B }));
|
|
20212
|
+
}, []), I = N((B) => {
|
|
20213
|
+
s((k) => ({ ...k, viewMode: B }));
|
|
20214
|
+
}, []), S = N((B) => {
|
|
20215
|
+
s((k) => {
|
|
20216
|
+
const z = new Date(k.currentDate);
|
|
20217
|
+
switch (k.viewMode) {
|
|
20189
20218
|
case "days":
|
|
20190
|
-
|
|
20219
|
+
z.setMonth(z.getMonth() + (B === "next" ? 1 : -1));
|
|
20191
20220
|
break;
|
|
20192
20221
|
case "months":
|
|
20193
|
-
|
|
20222
|
+
z.setFullYear(z.getFullYear() + (B === "next" ? 1 : -1));
|
|
20194
20223
|
break;
|
|
20195
20224
|
case "years":
|
|
20196
|
-
|
|
20225
|
+
z.setFullYear(z.getFullYear() + (B === "next" ? 12 : -12));
|
|
20197
20226
|
break;
|
|
20198
20227
|
}
|
|
20199
|
-
return { ...
|
|
20228
|
+
return { ...k, currentDate: z };
|
|
20200
20229
|
});
|
|
20201
|
-
}, []), R =
|
|
20202
|
-
(
|
|
20203
|
-
var
|
|
20204
|
-
r === "single" && (w && s((
|
|
20230
|
+
}, []), R = N(
|
|
20231
|
+
(B) => {
|
|
20232
|
+
var k;
|
|
20233
|
+
r === "single" && (w && s((z) => ({ ...z, internalDate: B })), (k = o.onDateChange) == null || k.call(o, B), a && v());
|
|
20205
20234
|
},
|
|
20206
20235
|
[r, w, o.onDateChange, a, v]
|
|
20207
|
-
),
|
|
20208
|
-
(
|
|
20209
|
-
var
|
|
20210
|
-
r === "range" && (C || s((
|
|
20236
|
+
), D = N(
|
|
20237
|
+
(B) => {
|
|
20238
|
+
var k;
|
|
20239
|
+
r === "range" && (C || s((z) => ({ ...z, internalRange: B })), (k = o.onRangeChange) == null || k.call(o, B), c && B.start && B.end && v());
|
|
20211
20240
|
},
|
|
20212
20241
|
[r, C, o.onRangeChange, c, v]
|
|
20213
|
-
), y =
|
|
20214
|
-
s((
|
|
20215
|
-
}, []), J =
|
|
20216
|
-
s((
|
|
20217
|
-
const
|
|
20218
|
-
return
|
|
20219
|
-
...
|
|
20220
|
-
currentDate:
|
|
20242
|
+
), y = N((B) => {
|
|
20243
|
+
s((k) => ({ ...k, hoverDate: B }));
|
|
20244
|
+
}, []), J = N((B) => {
|
|
20245
|
+
s((k) => {
|
|
20246
|
+
const z = new Date(k.currentDate);
|
|
20247
|
+
return z.setMonth(B), {
|
|
20248
|
+
...k,
|
|
20249
|
+
currentDate: z,
|
|
20221
20250
|
viewMode: "days"
|
|
20222
20251
|
};
|
|
20223
20252
|
});
|
|
20224
|
-
}, []),
|
|
20225
|
-
s((
|
|
20226
|
-
const
|
|
20227
|
-
return
|
|
20228
|
-
...
|
|
20229
|
-
currentDate:
|
|
20253
|
+
}, []), $ = N((B) => {
|
|
20254
|
+
s((k) => {
|
|
20255
|
+
const z = new Date(k.currentDate);
|
|
20256
|
+
return z.setFullYear(B), {
|
|
20257
|
+
...k,
|
|
20258
|
+
currentDate: z,
|
|
20230
20259
|
viewMode: "months"
|
|
20231
20260
|
};
|
|
20232
20261
|
});
|
|
20233
|
-
}, []), G =
|
|
20234
|
-
const
|
|
20235
|
-
s((
|
|
20236
|
-
...
|
|
20237
|
-
currentDate:
|
|
20262
|
+
}, []), G = N(() => {
|
|
20263
|
+
const B = /* @__PURE__ */ new Date();
|
|
20264
|
+
s((k) => ({
|
|
20265
|
+
...k,
|
|
20266
|
+
currentDate: B,
|
|
20238
20267
|
viewMode: "days"
|
|
20239
20268
|
}));
|
|
20240
|
-
}, []), X =
|
|
20269
|
+
}, []), X = N(() => {
|
|
20241
20270
|
if (!l.current)
|
|
20242
20271
|
return;
|
|
20243
|
-
const
|
|
20244
|
-
if (!
|
|
20272
|
+
const B = l.current.getInputElement();
|
|
20273
|
+
if (!B)
|
|
20245
20274
|
return;
|
|
20246
|
-
const
|
|
20247
|
-
let O,
|
|
20248
|
-
const T =
|
|
20249
|
-
T >= A + b ? O =
|
|
20275
|
+
const k = B.getBoundingClientRect(), z = window.innerHeight, Y = window.innerWidth, A = 320, m = 256, b = 8;
|
|
20276
|
+
let O, Z = k.left;
|
|
20277
|
+
const T = z - k.bottom, E = k.top;
|
|
20278
|
+
T >= A + b ? O = k.bottom + b : E >= A + b ? O = k.top - A + b : T > E ? O = k.bottom + b : O = k.top - A + b, k.left + m > Y && (Z = k.right - m), Z = Math.max(0, Math.min(Z, Y - m)), s((i1) => ({ ...i1, portalPosition: { top: O, left: Z } })), p(!0);
|
|
20250
20279
|
}, []);
|
|
20251
|
-
return
|
|
20280
|
+
return W(() => {
|
|
20252
20281
|
if (!d.isOpen) return;
|
|
20253
|
-
const
|
|
20254
|
-
return window.addEventListener("scroll",
|
|
20255
|
-
window.removeEventListener("scroll",
|
|
20282
|
+
const B = () => X(), k = () => X();
|
|
20283
|
+
return window.addEventListener("scroll", B, !0), window.addEventListener("resize", k), () => {
|
|
20284
|
+
window.removeEventListener("scroll", B, !0), window.removeEventListener("resize", k);
|
|
20256
20285
|
};
|
|
20257
|
-
}, [d.isOpen, X]),
|
|
20286
|
+
}, [d.isOpen, X]), W(() => {
|
|
20258
20287
|
if (d.isOpen) {
|
|
20259
|
-
const
|
|
20288
|
+
const B = setTimeout(() => {
|
|
20260
20289
|
X();
|
|
20261
20290
|
}, 0);
|
|
20262
|
-
return () => clearTimeout(
|
|
20291
|
+
return () => clearTimeout(B);
|
|
20263
20292
|
}
|
|
20264
20293
|
}, [d.isOpen, X]), {
|
|
20265
20294
|
state: d,
|
|
20266
|
-
selectedDate:
|
|
20295
|
+
selectedDate: M,
|
|
20267
20296
|
selectedRange: j,
|
|
20268
20297
|
inputRef: l,
|
|
20269
20298
|
isPortalReady: L,
|
|
@@ -20271,24 +20300,24 @@ const U8 = (o) => {
|
|
|
20271
20300
|
openPicker: h,
|
|
20272
20301
|
closePicker: v,
|
|
20273
20302
|
setCurrentDate: V,
|
|
20274
|
-
setViewMode:
|
|
20303
|
+
setViewMode: I,
|
|
20275
20304
|
setSelectedDate: R,
|
|
20276
|
-
setSelectedRange:
|
|
20305
|
+
setSelectedRange: D,
|
|
20277
20306
|
setHoverDate: y,
|
|
20278
20307
|
updatePortalPosition: X,
|
|
20279
|
-
navigate:
|
|
20308
|
+
navigate: S,
|
|
20280
20309
|
handleMonthSelect: J,
|
|
20281
|
-
handleYearSelect:
|
|
20310
|
+
handleYearSelect: $,
|
|
20282
20311
|
goToToday: G
|
|
20283
20312
|
}
|
|
20284
20313
|
};
|
|
20285
|
-
},
|
|
20286
|
-
const a =
|
|
20287
|
-
(l) => !!(!
|
|
20314
|
+
}, v1 = (o) => o && o instanceof Date && !isNaN(o.getTime()), C0 = (o, r, t, n, e) => {
|
|
20315
|
+
const a = N((l, C) => !C.start || !C.end || !v1(C.start) || !v1(C.end) ? !1 : l >= C.start && l <= C.end, []), c = N((l, C) => !C.start || !v1(C.start) ? !1 : l.getTime() === C.start.getTime(), []), d = N((l, C) => !C.end || !v1(C.end) ? !1 : l.getTime() === C.end.getTime(), []), s = N(
|
|
20316
|
+
(l) => !!(!v1(l) || t && v1(t) && l < t || n && v1(n) && l > n),
|
|
20288
20317
|
[t, n]
|
|
20289
|
-
), L =
|
|
20318
|
+
), L = N(
|
|
20290
20319
|
(l, C, w) => {
|
|
20291
|
-
if (!
|
|
20320
|
+
if (!v1(l)) {
|
|
20292
20321
|
console.warn("useDateRange: Se recibió una fecha inválida:", l);
|
|
20293
20322
|
return;
|
|
20294
20323
|
}
|
|
@@ -20297,42 +20326,42 @@ const U8 = (o) => {
|
|
|
20297
20326
|
!o.start || o.start && o.end ? (g.start = l, g.end = null) : l < o.start ? (g.start = l, g.end = o.start) : (g.start = o.start, g.end = l), r(g), e && g.start && g.end && w && w();
|
|
20298
20327
|
},
|
|
20299
20328
|
[o, r, s, e]
|
|
20300
|
-
), p =
|
|
20329
|
+
), p = N(
|
|
20301
20330
|
(l, C) => {
|
|
20302
|
-
const w = c(l, o), g = d(l, o),
|
|
20303
|
-
let
|
|
20331
|
+
const w = c(l, o), g = d(l, o), f = a(l, o), x = s(l);
|
|
20332
|
+
let M = !1;
|
|
20304
20333
|
if (C && o.start && !o.end) {
|
|
20305
20334
|
const V = {
|
|
20306
20335
|
start: o.start < C ? o.start : C,
|
|
20307
20336
|
end: o.start < C ? C : o.start
|
|
20308
20337
|
};
|
|
20309
|
-
|
|
20338
|
+
M = a(l, V);
|
|
20310
20339
|
}
|
|
20311
20340
|
let j = !1;
|
|
20312
|
-
if (o.start && o.end &&
|
|
20341
|
+
if (o.start && o.end && f && !w) {
|
|
20313
20342
|
const V = new Date(l);
|
|
20314
20343
|
V.setDate(l.getDate() - 1), j = !a(V, o);
|
|
20315
|
-
} else if (o.start && !o.end && C &&
|
|
20344
|
+
} else if (o.start && !o.end && C && M) {
|
|
20316
20345
|
const V = new Date(l);
|
|
20317
20346
|
V.setDate(l.getDate() - 1);
|
|
20318
|
-
const
|
|
20347
|
+
const I = {
|
|
20319
20348
|
start: o.start < C ? o.start : C,
|
|
20320
20349
|
end: o.start < C ? C : o.start
|
|
20321
20350
|
};
|
|
20322
|
-
j = !a(V,
|
|
20351
|
+
j = !a(V, I);
|
|
20323
20352
|
}
|
|
20324
20353
|
let h = !1;
|
|
20325
|
-
if (o.start && o.end &&
|
|
20354
|
+
if (o.start && o.end && f && !g) {
|
|
20326
20355
|
const V = new Date(l);
|
|
20327
20356
|
V.setDate(l.getDate() + 1), h = !a(V, o);
|
|
20328
|
-
} else if (o.start && !o.end && C &&
|
|
20357
|
+
} else if (o.start && !o.end && C && M) {
|
|
20329
20358
|
const V = new Date(l);
|
|
20330
20359
|
V.setDate(l.getDate() + 1);
|
|
20331
|
-
const
|
|
20360
|
+
const I = {
|
|
20332
20361
|
start: o.start < C ? o.start : C,
|
|
20333
20362
|
end: o.start < C ? C : o.start
|
|
20334
20363
|
};
|
|
20335
|
-
h = !a(V,
|
|
20364
|
+
h = !a(V, I);
|
|
20336
20365
|
}
|
|
20337
20366
|
let v = !0;
|
|
20338
20367
|
return o.start && !o.end && C ? v = C >= o.start : o.start && o.end && (v = l >= o.start), {
|
|
@@ -20340,12 +20369,12 @@ const U8 = (o) => {
|
|
|
20340
20369
|
isSelectingEnd: !!o.start && !o.end,
|
|
20341
20370
|
isStart: w,
|
|
20342
20371
|
isEnd: g,
|
|
20343
|
-
isInRange:
|
|
20372
|
+
isInRange: f,
|
|
20344
20373
|
isFirstInRange: j,
|
|
20345
20374
|
isLastInRange: h,
|
|
20346
20375
|
afterSelected: v,
|
|
20347
20376
|
isDisabled: x,
|
|
20348
|
-
isHovered:
|
|
20377
|
+
isHovered: M
|
|
20349
20378
|
};
|
|
20350
20379
|
},
|
|
20351
20380
|
[o, c, d, a, s]
|
|
@@ -20359,7 +20388,7 @@ const U8 = (o) => {
|
|
|
20359
20388
|
getRangeState: p
|
|
20360
20389
|
};
|
|
20361
20390
|
}, F1 = (o, r, t) => {
|
|
20362
|
-
const n =
|
|
20391
|
+
const n = N(
|
|
20363
20392
|
(p) => {
|
|
20364
20393
|
const l = new Date(o);
|
|
20365
20394
|
switch (p) {
|
|
@@ -20373,13 +20402,13 @@ const U8 = (o) => {
|
|
|
20373
20402
|
r(p);
|
|
20374
20403
|
},
|
|
20375
20404
|
[o, r]
|
|
20376
|
-
), e =
|
|
20377
|
-
const l = p.getFullYear(), C = p.getMonth(), w = new Date(l, C, 1), g = new Date(l, C + 1, 0),
|
|
20378
|
-
return { firstDay: w, lastDay: g, daysInMonth:
|
|
20379
|
-
}, []), a =
|
|
20405
|
+
), e = N((p) => {
|
|
20406
|
+
const l = p.getFullYear(), C = p.getMonth(), w = new Date(l, C, 1), g = new Date(l, C + 1, 0), f = g.getDate(), x = w.getDay();
|
|
20407
|
+
return { firstDay: w, lastDay: g, daysInMonth: f, startOfWeek: x };
|
|
20408
|
+
}, []), a = N(
|
|
20380
20409
|
(p, l = 1) => {
|
|
20381
|
-
const { firstDay: C, lastDay: w, daysInMonth: g, startOfWeek:
|
|
20382
|
-
for (let h = 0; h <
|
|
20410
|
+
const { firstDay: C, lastDay: w, daysInMonth: g, startOfWeek: f } = e(p), x = [], M = (f - l + 7) % 7;
|
|
20411
|
+
for (let h = 0; h < M; h++)
|
|
20383
20412
|
x.push(null);
|
|
20384
20413
|
for (let h = 1; h <= g; h++)
|
|
20385
20414
|
x.push(h);
|
|
@@ -20389,22 +20418,22 @@ const U8 = (o) => {
|
|
|
20389
20418
|
return x;
|
|
20390
20419
|
},
|
|
20391
20420
|
[e]
|
|
20392
|
-
), c =
|
|
20421
|
+
), c = N((p = "es-ES") => {
|
|
20393
20422
|
const l = [];
|
|
20394
20423
|
for (let C = 0; C < 12; C++) {
|
|
20395
20424
|
const w = new Date(2024, C, 1);
|
|
20396
20425
|
l.push(w.toLocaleDateString(p, { month: "long" }));
|
|
20397
20426
|
}
|
|
20398
20427
|
return l;
|
|
20399
|
-
}, []), d =
|
|
20428
|
+
}, []), d = N((p, l = 12) => {
|
|
20400
20429
|
const C = [], w = p - Math.floor(l / 2);
|
|
20401
20430
|
for (let g = 0; g < l; g++)
|
|
20402
20431
|
C.push(w + g);
|
|
20403
20432
|
return C;
|
|
20404
|
-
}, []), s =
|
|
20433
|
+
}, []), s = N((p) => {
|
|
20405
20434
|
const l = /* @__PURE__ */ new Date();
|
|
20406
20435
|
return p.getDate() === l.getDate() && p.getMonth() === l.getMonth() && p.getFullYear() === l.getFullYear();
|
|
20407
|
-
}, []), L =
|
|
20436
|
+
}, []), L = N((p, l) => p.toLocaleDateString("es-ES", l), []);
|
|
20408
20437
|
return {
|
|
20409
20438
|
navigate: n,
|
|
20410
20439
|
getDaysInMonth: e,
|
|
@@ -20418,31 +20447,31 @@ const U8 = (o) => {
|
|
|
20418
20447
|
const [n, e] = K({
|
|
20419
20448
|
isFocused: !1,
|
|
20420
20449
|
inputValue: o
|
|
20421
|
-
}), a =
|
|
20450
|
+
}), a = N((w) => {
|
|
20422
20451
|
e((g) => ({ ...g, isFocused: w }));
|
|
20423
|
-
}, []), c =
|
|
20452
|
+
}, []), c = N((w) => {
|
|
20424
20453
|
e((g) => ({ ...g, inputValue: w }));
|
|
20425
|
-
}, []), d =
|
|
20454
|
+
}, []), d = N((w, g) => {
|
|
20426
20455
|
if (!w) return "";
|
|
20427
|
-
const
|
|
20428
|
-
return g.format.replace("dd",
|
|
20429
|
-
}, []), s =
|
|
20456
|
+
const f = w.getDate().toString().padStart(2, "0"), x = (w.getMonth() + 1).toString().padStart(2, "0"), M = w.getFullYear();
|
|
20457
|
+
return g.format.replace("dd", f).replace("MM", x).replace("yyyy", M.toString());
|
|
20458
|
+
}, []), s = N((w, g) => {
|
|
20430
20459
|
if (!w) return null;
|
|
20431
|
-
const
|
|
20432
|
-
if (!
|
|
20433
|
-
const [, j, h, v] =
|
|
20460
|
+
const f = g.replace("dd", "(\\d{2})").replace("MM", "(\\d{2})").replace("yyyy", "(\\d{4})"), x = new RegExp(`^${f}$`), M = w.match(x);
|
|
20461
|
+
if (!M) return null;
|
|
20462
|
+
const [, j, h, v] = M, V = new Date(parseInt(v), parseInt(h) - 1, parseInt(j));
|
|
20434
20463
|
return isNaN(V.getTime()) ? null : V;
|
|
20435
|
-
}, []), L =
|
|
20464
|
+
}, []), L = N(
|
|
20436
20465
|
(w, g) => s(w, g) !== null,
|
|
20437
20466
|
[s]
|
|
20438
|
-
), p =
|
|
20467
|
+
), p = N(
|
|
20439
20468
|
(w) => {
|
|
20440
20469
|
c(w);
|
|
20441
20470
|
},
|
|
20442
20471
|
[c]
|
|
20443
|
-
), l =
|
|
20472
|
+
), l = N(() => {
|
|
20444
20473
|
a(!0);
|
|
20445
|
-
}, [a]), C =
|
|
20474
|
+
}, [a]), C = N(() => {
|
|
20446
20475
|
a(!1);
|
|
20447
20476
|
}, [a]);
|
|
20448
20477
|
return {
|
|
@@ -20457,26 +20486,26 @@ const U8 = (o) => {
|
|
|
20457
20486
|
handleInputBlur: C
|
|
20458
20487
|
};
|
|
20459
20488
|
}, _8 = (o, r, t, n = 1e3) => {
|
|
20460
|
-
const e = t1(null), a =
|
|
20489
|
+
const e = t1(null), a = N(
|
|
20461
20490
|
(s) => {
|
|
20462
20491
|
e.current && !e.current.contains(s.target) && r();
|
|
20463
20492
|
},
|
|
20464
20493
|
[r]
|
|
20465
|
-
), c =
|
|
20494
|
+
), c = N(
|
|
20466
20495
|
(s) => {
|
|
20467
20496
|
s.key === "Escape" && r();
|
|
20468
20497
|
},
|
|
20469
20498
|
[r]
|
|
20470
20499
|
);
|
|
20471
|
-
|
|
20500
|
+
W(() => {
|
|
20472
20501
|
if (o)
|
|
20473
20502
|
return document.addEventListener("mousedown", a), document.addEventListener("keydown", c), () => {
|
|
20474
20503
|
document.removeEventListener("mousedown", a), document.removeEventListener("keydown", c);
|
|
20475
20504
|
};
|
|
20476
20505
|
}, [o, a, c]);
|
|
20477
|
-
const d =
|
|
20478
|
-
(s) => o ?
|
|
20479
|
-
|
|
20506
|
+
const d = N(
|
|
20507
|
+
(s) => o ? Z1(
|
|
20508
|
+
f1.createElement(
|
|
20480
20509
|
"div",
|
|
20481
20510
|
{
|
|
20482
20511
|
ref: e,
|
|
@@ -20498,7 +20527,7 @@ const U8 = (o) => {
|
|
|
20498
20527
|
portalRef: e,
|
|
20499
20528
|
renderPortal: d
|
|
20500
20529
|
};
|
|
20501
|
-
},
|
|
20530
|
+
}, q8 = ({
|
|
20502
20531
|
day: o,
|
|
20503
20532
|
date: r,
|
|
20504
20533
|
isSelected: t,
|
|
@@ -20514,23 +20543,23 @@ const U8 = (o) => {
|
|
|
20514
20543
|
onClick: C,
|
|
20515
20544
|
onMouseEnter: w,
|
|
20516
20545
|
onMouseLeave: g,
|
|
20517
|
-
className:
|
|
20546
|
+
className: f = "",
|
|
20518
20547
|
renderDay: x
|
|
20519
20548
|
}) => {
|
|
20520
|
-
const
|
|
20549
|
+
const M = t1(null);
|
|
20521
20550
|
if (o === null)
|
|
20522
20551
|
return /* @__PURE__ */ i("div", { className: "ui-h-8 ui-w-8" });
|
|
20523
|
-
const j = (
|
|
20524
|
-
|
|
20552
|
+
const j = (I) => {
|
|
20553
|
+
I.stopPropagation(), L || C(r);
|
|
20525
20554
|
}, h = () => {
|
|
20526
|
-
!L && w && (
|
|
20555
|
+
!L && w && (M.current && (clearTimeout(M.current), M.current = null), w(r));
|
|
20527
20556
|
}, v = () => {
|
|
20528
|
-
!L && g && (t || n || e || a ?
|
|
20529
|
-
g(),
|
|
20557
|
+
!L && g && (t || n || e || a ? M.current = setTimeout(() => {
|
|
20558
|
+
g(), M.current = null;
|
|
20530
20559
|
}, 100) : g());
|
|
20531
20560
|
}, V = () => {
|
|
20532
|
-
let
|
|
20533
|
-
return L ?
|
|
20561
|
+
let I = `ui-w-8 ui-h-8 ui-flex ui-items-center ui-select-none ui-justify-center ui-font-medium ${!d && !n && !c ? "hover:ui-bg-blue-50 hover:ui-text-blue-500 hover:ui-rounded-lg hover:ui-cursor-pointer" : ""} ui-text-xs ui-transition-colors ui-transition-500`;
|
|
20562
|
+
return L ? I += " ui-text-gray-400 ui-cursor-not-allowed" : t ? I += " ui-bg-blue-500 ui-text-white" : e ? I += ` ui-bg-blue-500 ui-text-white ${s ? "ui-rounded-l-lg" : "ui-rounded-r-lg"}` : a ? I += ` ui-bg-blue-500 ui-text-white ${s ? "ui-rounded-r-lg" : "ui-rounded-l-lg"}` : n ? I += " ui-bg-blue-50 ui-text-blue-500" : l ? I += " ui-bg-blue-50" : p ? I += " ui-text-blue-500" : I += "hover:ui-bg-neutral-50", `${I} ${f}`;
|
|
20534
20563
|
};
|
|
20535
20564
|
return x ? x({
|
|
20536
20565
|
day: o,
|
|
@@ -20559,7 +20588,7 @@ const U8 = (o) => {
|
|
|
20559
20588
|
children: o
|
|
20560
20589
|
}
|
|
20561
20590
|
);
|
|
20562
|
-
},
|
|
20591
|
+
}, Y8 = ({
|
|
20563
20592
|
monthIndex: o,
|
|
20564
20593
|
monthName: r,
|
|
20565
20594
|
isSelected: t,
|
|
@@ -20626,8 +20655,8 @@ const U8 = (o) => {
|
|
|
20626
20655
|
disabled: t = !1,
|
|
20627
20656
|
className: n = "",
|
|
20628
20657
|
children: e
|
|
20629
|
-
}) => /* @__PURE__ */ i(
|
|
20630
|
-
|
|
20658
|
+
}) => /* @__PURE__ */ i(k1, { children: /* @__PURE__ */ i(
|
|
20659
|
+
r1,
|
|
20631
20660
|
{
|
|
20632
20661
|
variant: "outlined",
|
|
20633
20662
|
size: "xs",
|
|
@@ -20685,7 +20714,7 @@ const U8 = (o) => {
|
|
|
20685
20714
|
navigate: t
|
|
20686
20715
|
}) : /* @__PURE__ */ i("div", { className: `ui-flex ui-flex-col ui-border-b ui-border-neutral-100 ${c}`, children: /* @__PURE__ */ u("div", { className: "ui-flex ui-items-center ui-justify-between ui-px-4 ui-py-3", children: [
|
|
20687
20716
|
e && /* @__PURE__ */ i(
|
|
20688
|
-
|
|
20717
|
+
r1,
|
|
20689
20718
|
{
|
|
20690
20719
|
onClick: e,
|
|
20691
20720
|
variant: "outlined",
|
|
@@ -20696,7 +20725,7 @@ const U8 = (o) => {
|
|
|
20696
20725
|
}
|
|
20697
20726
|
),
|
|
20698
20727
|
/* @__PURE__ */ i(
|
|
20699
|
-
|
|
20728
|
+
r1,
|
|
20700
20729
|
{
|
|
20701
20730
|
onClick: L,
|
|
20702
20731
|
variant: "text",
|
|
@@ -20740,10 +20769,10 @@ const U8 = (o) => {
|
|
|
20740
20769
|
},
|
|
20741
20770
|
a,
|
|
20742
20771
|
c
|
|
20743
|
-
),
|
|
20772
|
+
), f = (j) => r ? j.getTime() === r.getTime() : !1, x = (j) => !!(a && j < a || c && j > c), M = C(o, s);
|
|
20744
20773
|
return /* @__PURE__ */ u("div", { className: "ui-mx-auto ui-grid ui-w-fit ui-grid-cols-7 ui-gap-y-0.5", children: [
|
|
20745
20774
|
d.map((j, h) => /* @__PURE__ */ i(G8, { day: j }, h)),
|
|
20746
|
-
|
|
20775
|
+
M.map((j, h) => {
|
|
20747
20776
|
if (j === null)
|
|
20748
20777
|
return /* @__PURE__ */ i("div", { className: "ui-h-8 ui-w-8" }, h);
|
|
20749
20778
|
const v = new Date(o.getFullYear(), o.getMonth(), j), V = t ? g(v, p || null) : {
|
|
@@ -20757,11 +20786,11 @@ const U8 = (o) => {
|
|
|
20757
20786
|
isHovered: !1
|
|
20758
20787
|
};
|
|
20759
20788
|
return /* @__PURE__ */ i(
|
|
20760
|
-
|
|
20789
|
+
q8,
|
|
20761
20790
|
{
|
|
20762
20791
|
day: j,
|
|
20763
20792
|
date: v,
|
|
20764
|
-
isSelected:
|
|
20793
|
+
isSelected: f(v),
|
|
20765
20794
|
isInRange: V.isInRange,
|
|
20766
20795
|
isStart: V.isStart,
|
|
20767
20796
|
isEnd: V.isEnd,
|
|
@@ -20806,7 +20835,7 @@ const U8 = (o) => {
|
|
|
20806
20835
|
}
|
|
20807
20836
|
), c = a();
|
|
20808
20837
|
return /* @__PURE__ */ i("div", { className: `ui-mx-auto ui-grid ui-w-fit ui-grid-cols-3 ${e}`, children: c.map((d, s) => /* @__PURE__ */ i(
|
|
20809
|
-
|
|
20838
|
+
Y8,
|
|
20810
20839
|
{
|
|
20811
20840
|
monthIndex: s,
|
|
20812
20841
|
monthName: d,
|
|
@@ -20839,16 +20868,16 @@ const U8 = (o) => {
|
|
|
20839
20868
|
d
|
|
20840
20869
|
)) });
|
|
20841
20870
|
}, K8 = (o) => {
|
|
20842
|
-
const { value: r, defaultValue: t, onChange: n, initialValue: e } = o, a = r !== void 0, c = t !== void 0 ? t : e, [d, s] = K(c), L = a ? r : d, p =
|
|
20871
|
+
const { value: r, defaultValue: t, onChange: n, initialValue: e } = o, a = r !== void 0, c = t !== void 0 ? t : e, [d, s] = K(c), L = a ? r : d, p = N(
|
|
20843
20872
|
(C) => {
|
|
20844
20873
|
a || s(C), n == null || n(C);
|
|
20845
20874
|
},
|
|
20846
20875
|
[a, n]
|
|
20847
|
-
), l =
|
|
20876
|
+
), l = N(() => {
|
|
20848
20877
|
const C = t !== void 0 ? t : e;
|
|
20849
20878
|
a || s(C), n == null || n(C);
|
|
20850
20879
|
}, [a, t, e, n]);
|
|
20851
|
-
return
|
|
20880
|
+
return W(() => {
|
|
20852
20881
|
a && r !== void 0 && s(r);
|
|
20853
20882
|
}, [a, r]), {
|
|
20854
20883
|
value: L,
|
|
@@ -20909,18 +20938,18 @@ const U8 = (o) => {
|
|
|
20909
20938
|
isControlled: n,
|
|
20910
20939
|
inputId: e
|
|
20911
20940
|
}) => {
|
|
20912
|
-
const a =
|
|
20941
|
+
const a = N(() => {
|
|
20913
20942
|
const l = e || "default-input";
|
|
20914
20943
|
return document.querySelector(`input[data-input-id="${l}"]`);
|
|
20915
|
-
}, [e]), c =
|
|
20944
|
+
}, [e]), c = N(() => {
|
|
20916
20945
|
const l = a();
|
|
20917
20946
|
l == null || l.focus();
|
|
20918
|
-
}, [a]), d =
|
|
20947
|
+
}, [a]), d = N(() => {
|
|
20919
20948
|
const l = a();
|
|
20920
20949
|
l == null || l.blur();
|
|
20921
|
-
}, [a]), s =
|
|
20950
|
+
}, [a]), s = N(() => {
|
|
20922
20951
|
t("");
|
|
20923
|
-
}, [t]), L =
|
|
20952
|
+
}, [t]), L = N(() => r, [r]), p = N(
|
|
20924
20953
|
(l) => {
|
|
20925
20954
|
t(l);
|
|
20926
20955
|
},
|
|
@@ -21013,58 +21042,58 @@ const U8 = (o) => {
|
|
|
21013
21042
|
disabled: C = !1,
|
|
21014
21043
|
onValueChange: w,
|
|
21015
21044
|
onChange: g,
|
|
21016
|
-
onClickExtraSlot:
|
|
21045
|
+
onClickExtraSlot: f,
|
|
21017
21046
|
className: x,
|
|
21018
|
-
style:
|
|
21047
|
+
style: M,
|
|
21019
21048
|
name: j,
|
|
21020
21049
|
autosize: h = !1,
|
|
21021
21050
|
colorLeftIcon: v,
|
|
21022
21051
|
infoTooltip: V = "",
|
|
21023
|
-
...
|
|
21024
|
-
},
|
|
21052
|
+
...I
|
|
21053
|
+
}, S) => {
|
|
21025
21054
|
const {
|
|
21026
21055
|
value: R,
|
|
21027
|
-
setValue:
|
|
21056
|
+
setValue: D,
|
|
21028
21057
|
isControlled: y
|
|
21029
21058
|
} = Q8({
|
|
21030
21059
|
value: L,
|
|
21031
21060
|
defaultValue: l,
|
|
21032
21061
|
onChange: w
|
|
21033
|
-
}), J = (
|
|
21034
|
-
const
|
|
21035
|
-
|
|
21036
|
-
}, { paddingClasses:
|
|
21062
|
+
}), J = (z) => {
|
|
21063
|
+
const Y = z.target.value;
|
|
21064
|
+
D(Y), g == null || g(z);
|
|
21065
|
+
}, { paddingClasses: $, getIconPosition: G } = W8({
|
|
21037
21066
|
size: n,
|
|
21038
21067
|
leftSlot: a,
|
|
21039
21068
|
rightSlot: c,
|
|
21040
21069
|
extraSlot: d
|
|
21041
|
-
}), { baseClasses: X, containerClasses:
|
|
21070
|
+
}), { baseClasses: X, containerClasses: B, labelClasses: k } = e3({
|
|
21042
21071
|
size: n,
|
|
21043
21072
|
error: r,
|
|
21044
21073
|
disabled: C,
|
|
21045
21074
|
fullWidth: p,
|
|
21046
21075
|
caret: s,
|
|
21047
|
-
paddingClasses:
|
|
21076
|
+
paddingClasses: $,
|
|
21048
21077
|
autosize: h
|
|
21049
21078
|
});
|
|
21050
21079
|
return n3({
|
|
21051
|
-
ref:
|
|
21080
|
+
ref: S,
|
|
21052
21081
|
currentValue: R,
|
|
21053
|
-
setValue:
|
|
21082
|
+
setValue: D,
|
|
21054
21083
|
isControlled: y,
|
|
21055
|
-
inputId:
|
|
21084
|
+
inputId: I.id
|
|
21056
21085
|
}), /* @__PURE__ */ u(
|
|
21057
21086
|
"div",
|
|
21058
21087
|
{
|
|
21059
|
-
className:
|
|
21088
|
+
className: q(
|
|
21060
21089
|
"ui-relative ui-flex ui-flex-col ui-gap-1",
|
|
21061
21090
|
p ? "ui-w-full" : "ui-w-fit",
|
|
21062
21091
|
x
|
|
21063
21092
|
),
|
|
21064
|
-
style:
|
|
21093
|
+
style: M,
|
|
21065
21094
|
children: [
|
|
21066
21095
|
(o || V) && /* @__PURE__ */ u("div", { className: "ui-flex ui-flex-row ui-items-center ui-gap-1 ui-leading-tight", children: [
|
|
21067
|
-
o && /* @__PURE__ */ i("label", { className:
|
|
21096
|
+
o && /* @__PURE__ */ i("label", { className: k, children: o }),
|
|
21068
21097
|
V && /* @__PURE__ */ i(
|
|
21069
21098
|
H1,
|
|
21070
21099
|
{
|
|
@@ -21079,9 +21108,9 @@ const U8 = (o) => {
|
|
|
21079
21108
|
}
|
|
21080
21109
|
)
|
|
21081
21110
|
] }),
|
|
21082
|
-
/* @__PURE__ */ u("div", { className:
|
|
21111
|
+
/* @__PURE__ */ u("div", { className: B, children: [
|
|
21083
21112
|
a && /* @__PURE__ */ i(
|
|
21084
|
-
|
|
21113
|
+
x1,
|
|
21085
21114
|
{
|
|
21086
21115
|
slot: a,
|
|
21087
21116
|
colorIcon: v,
|
|
@@ -21096,13 +21125,13 @@ const U8 = (o) => {
|
|
|
21096
21125
|
value: R,
|
|
21097
21126
|
onChange: J,
|
|
21098
21127
|
name: j,
|
|
21099
|
-
"data-input-id":
|
|
21128
|
+
"data-input-id": I.id || "default-input",
|
|
21100
21129
|
className: X + " ui-min-w-12",
|
|
21101
|
-
...
|
|
21130
|
+
...I
|
|
21102
21131
|
}
|
|
21103
21132
|
),
|
|
21104
21133
|
c && /* @__PURE__ */ i(
|
|
21105
|
-
|
|
21134
|
+
x1,
|
|
21106
21135
|
{
|
|
21107
21136
|
slot: c,
|
|
21108
21137
|
className: `ui-absolute ${G("right")} ui-top-1/2 ui--translate-y-1/2`
|
|
@@ -21117,10 +21146,10 @@ const U8 = (o) => {
|
|
|
21117
21146
|
d && /* @__PURE__ */ i(
|
|
21118
21147
|
"button",
|
|
21119
21148
|
{
|
|
21120
|
-
onClick:
|
|
21149
|
+
onClick: f,
|
|
21121
21150
|
className: `ui-absolute ${G("extra")} ui-top-1/2 ui-flex ui--translate-y-1/2 ui-place-items-center`,
|
|
21122
21151
|
type: "button",
|
|
21123
|
-
children: /* @__PURE__ */ i(
|
|
21152
|
+
children: /* @__PURE__ */ i(x1, { slot: d })
|
|
21124
21153
|
}
|
|
21125
21154
|
)
|
|
21126
21155
|
] }),
|
|
@@ -21158,8 +21187,8 @@ const i3 = E1(
|
|
|
21158
21187
|
s || n();
|
|
21159
21188
|
},
|
|
21160
21189
|
extraSlot: "CalendarOutlined",
|
|
21161
|
-
onChange: (
|
|
21162
|
-
!s && e && e(
|
|
21190
|
+
onChange: (M) => {
|
|
21191
|
+
!s && e && e(M.target.value);
|
|
21163
21192
|
},
|
|
21164
21193
|
onFocus: () => {
|
|
21165
21194
|
!s && a && a();
|
|
@@ -21205,8 +21234,8 @@ const i3 = E1(
|
|
|
21205
21234
|
const w = a[l.getMonth()], g = l.getFullYear();
|
|
21206
21235
|
switch (C) {
|
|
21207
21236
|
case "years":
|
|
21208
|
-
const
|
|
21209
|
-
return `${x} - ${
|
|
21237
|
+
const f = s(g, c), x = f[0], M = f[f.length - 1];
|
|
21238
|
+
return `${x} - ${M}`;
|
|
21210
21239
|
case "months":
|
|
21211
21240
|
return `${g}`;
|
|
21212
21241
|
case "days":
|
|
@@ -21226,7 +21255,7 @@ const i3 = E1(
|
|
|
21226
21255
|
{
|
|
21227
21256
|
className: "ui-flex ui-w-full ui-min-w-0 ui-flex-1 ui-items-center ui-justify-center ui-text-center",
|
|
21228
21257
|
children: /* @__PURE__ */ i(
|
|
21229
|
-
|
|
21258
|
+
r1,
|
|
21230
21259
|
{
|
|
21231
21260
|
onClick: () => n(C),
|
|
21232
21261
|
variant: "text",
|
|
@@ -21275,13 +21304,13 @@ const i3 = E1(
|
|
|
21275
21304
|
yearRange: C = 12,
|
|
21276
21305
|
hoverDate: w,
|
|
21277
21306
|
onMonthSelect: g,
|
|
21278
|
-
onYearSelect:
|
|
21307
|
+
onYearSelect: f,
|
|
21279
21308
|
renderDay: x
|
|
21280
21309
|
}) => {
|
|
21281
|
-
const
|
|
21310
|
+
const M = (v) => {
|
|
21282
21311
|
g == null || g(v);
|
|
21283
21312
|
}, j = (v) => {
|
|
21284
|
-
|
|
21313
|
+
f == null || f(v);
|
|
21285
21314
|
};
|
|
21286
21315
|
return /* @__PURE__ */ i("div", { className: "ui-flex ui-h-full ui-justify-center ui-p-3", children: (() => {
|
|
21287
21316
|
switch (d) {
|
|
@@ -21309,7 +21338,7 @@ const i3 = E1(
|
|
|
21309
21338
|
{
|
|
21310
21339
|
currentDate: o,
|
|
21311
21340
|
selectedMonth: o.getMonth(),
|
|
21312
|
-
onMonthSelect:
|
|
21341
|
+
onMonthSelect: M,
|
|
21313
21342
|
monthNames: L
|
|
21314
21343
|
}
|
|
21315
21344
|
);
|
|
@@ -21343,7 +21372,7 @@ const i3 = E1(
|
|
|
21343
21372
|
onGoToToday: C,
|
|
21344
21373
|
locale: w = "es-ES",
|
|
21345
21374
|
weekDays: g = ["D", "L", "M", "M", "J", "V", "S"],
|
|
21346
|
-
monthNames:
|
|
21375
|
+
monthNames: f = [
|
|
21347
21376
|
"Enero",
|
|
21348
21377
|
"Febrero",
|
|
21349
21378
|
"Marzo",
|
|
@@ -21358,17 +21387,17 @@ const i3 = E1(
|
|
|
21358
21387
|
"Diciembre"
|
|
21359
21388
|
],
|
|
21360
21389
|
startOfWeek: x = 1,
|
|
21361
|
-
showWeekNumbers:
|
|
21390
|
+
showWeekNumbers: M = !1,
|
|
21362
21391
|
yearRange: j = 12,
|
|
21363
21392
|
hoverDate: h,
|
|
21364
21393
|
closeOnSelect: v,
|
|
21365
21394
|
autoCloseRange: V,
|
|
21366
|
-
renderHeader:
|
|
21367
|
-
renderDay:
|
|
21395
|
+
renderHeader: I,
|
|
21396
|
+
renderDay: S
|
|
21368
21397
|
}) => {
|
|
21369
21398
|
const R = (G) => {
|
|
21370
21399
|
L == null || L(G);
|
|
21371
|
-
},
|
|
21400
|
+
}, D = () => {
|
|
21372
21401
|
switch (d) {
|
|
21373
21402
|
case "days":
|
|
21374
21403
|
s("months");
|
|
@@ -21384,7 +21413,7 @@ const i3 = E1(
|
|
|
21384
21413
|
p == null || p(G);
|
|
21385
21414
|
}, J = (G) => {
|
|
21386
21415
|
l == null || l(G);
|
|
21387
|
-
},
|
|
21416
|
+
}, $ = () => {
|
|
21388
21417
|
switch (d) {
|
|
21389
21418
|
case "days":
|
|
21390
21419
|
return /* @__PURE__ */ i(
|
|
@@ -21399,9 +21428,9 @@ const i3 = E1(
|
|
|
21399
21428
|
maxDate: c,
|
|
21400
21429
|
weekDays: g,
|
|
21401
21430
|
startOfWeek: x,
|
|
21402
|
-
showWeekNumbers:
|
|
21431
|
+
showWeekNumbers: M,
|
|
21403
21432
|
hoverDate: h,
|
|
21404
|
-
renderDay:
|
|
21433
|
+
renderDay: S
|
|
21405
21434
|
}
|
|
21406
21435
|
);
|
|
21407
21436
|
case "months":
|
|
@@ -21411,7 +21440,7 @@ const i3 = E1(
|
|
|
21411
21440
|
currentDate: o,
|
|
21412
21441
|
selectedMonth: o.getMonth(),
|
|
21413
21442
|
onMonthSelect: y,
|
|
21414
|
-
monthNames:
|
|
21443
|
+
monthNames: f
|
|
21415
21444
|
}
|
|
21416
21445
|
);
|
|
21417
21446
|
case "years":
|
|
@@ -21431,7 +21460,7 @@ const i3 = E1(
|
|
|
21431
21460
|
return /* @__PURE__ */ u(
|
|
21432
21461
|
"div",
|
|
21433
21462
|
{
|
|
21434
|
-
className:
|
|
21463
|
+
className: q(
|
|
21435
21464
|
"ui-min-w-[254px] ui-overflow-hidden ui-rounded-lg ui-border ui-border-neutral-100 ui-bg-white ui-shadow-lg",
|
|
21436
21465
|
v ? "ui-min-h-[280px]" : "ui-min-h-[325px]"
|
|
21437
21466
|
),
|
|
@@ -21442,16 +21471,16 @@ const i3 = E1(
|
|
|
21442
21471
|
currentDate: o,
|
|
21443
21472
|
viewMode: d,
|
|
21444
21473
|
onNavigate: R,
|
|
21445
|
-
onToggleViewMode:
|
|
21474
|
+
onToggleViewMode: D,
|
|
21446
21475
|
onGoToToday: C,
|
|
21447
|
-
monthNames:
|
|
21448
|
-
renderHeader:
|
|
21476
|
+
monthNames: f,
|
|
21477
|
+
renderHeader: I
|
|
21449
21478
|
}
|
|
21450
21479
|
),
|
|
21451
|
-
/* @__PURE__ */ i("div", { className: "ui-h-full ui-p-3", children:
|
|
21480
|
+
/* @__PURE__ */ i("div", { className: "ui-h-full ui-p-3", children: $() }),
|
|
21452
21481
|
!v && /* @__PURE__ */ u("footer", { className: "ui-flex ui-justify-end ui-gap-2 ui-border-t ui-border-neutral-100 ui-p-3", children: [
|
|
21453
|
-
/* @__PURE__ */ i(
|
|
21454
|
-
/* @__PURE__ */ i(
|
|
21482
|
+
/* @__PURE__ */ i(r1, { variant: "outlined", size: "md", color: "white", children: "Cancelar" }),
|
|
21483
|
+
/* @__PURE__ */ i(r1, { size: "md", children: "Aceptar" })
|
|
21455
21484
|
] })
|
|
21456
21485
|
]
|
|
21457
21486
|
}
|
|
@@ -21472,130 +21501,130 @@ const i3 = E1(
|
|
|
21472
21501
|
onGoToToday: C,
|
|
21473
21502
|
viewMode: w,
|
|
21474
21503
|
minDate: g,
|
|
21475
|
-
maxDate:
|
|
21504
|
+
maxDate: f,
|
|
21476
21505
|
locale: x,
|
|
21477
|
-
weekDays:
|
|
21506
|
+
weekDays: M,
|
|
21478
21507
|
monthNames: j,
|
|
21479
21508
|
startOfWeek: h,
|
|
21480
21509
|
showWeekNumbers: v,
|
|
21481
21510
|
yearRange: V,
|
|
21482
|
-
hoverDate:
|
|
21483
|
-
closeOnSelect:
|
|
21511
|
+
hoverDate: I,
|
|
21512
|
+
closeOnSelect: S,
|
|
21484
21513
|
autoCloseRange: R,
|
|
21485
|
-
calendarsCount:
|
|
21514
|
+
calendarsCount: D = 1,
|
|
21486
21515
|
mode: y = "single",
|
|
21487
21516
|
onClickSelected: J = !1,
|
|
21488
|
-
renderHeader:
|
|
21517
|
+
renderHeader: $,
|
|
21489
21518
|
renderDay: G
|
|
21490
21519
|
}) => {
|
|
21491
|
-
const [X,
|
|
21492
|
-
const
|
|
21493
|
-
for (let T = 0; T <
|
|
21494
|
-
const
|
|
21495
|
-
|
|
21496
|
-
}
|
|
21497
|
-
return
|
|
21498
|
-
}), { renderPortal:
|
|
21499
|
-
|
|
21500
|
-
|
|
21501
|
-
}, [w,
|
|
21502
|
-
const
|
|
21503
|
-
for (let T = 0; T <
|
|
21504
|
-
const
|
|
21505
|
-
|
|
21506
|
-
}
|
|
21507
|
-
|
|
21508
|
-
}, [n,
|
|
21509
|
-
const A = (
|
|
21510
|
-
const T = X[
|
|
21511
|
-
let
|
|
21520
|
+
const [X, B] = K(Array(D).fill(w)), [k, z] = K(() => {
|
|
21521
|
+
const Z = [];
|
|
21522
|
+
for (let T = 0; T < D; T++) {
|
|
21523
|
+
const E = new Date(n);
|
|
21524
|
+
E.setMonth(E.getMonth() + T), Z.push(E);
|
|
21525
|
+
}
|
|
21526
|
+
return Z;
|
|
21527
|
+
}), { renderPortal: Y } = _8(o, r, t, 1100);
|
|
21528
|
+
W(() => {
|
|
21529
|
+
B(Array(D).fill(w));
|
|
21530
|
+
}, [w, D]), W(() => {
|
|
21531
|
+
const Z = [];
|
|
21532
|
+
for (let T = 0; T < D; T++) {
|
|
21533
|
+
const E = new Date(n);
|
|
21534
|
+
E.setMonth(E.getMonth() + T), Z.push(E);
|
|
21535
|
+
}
|
|
21536
|
+
z(Z);
|
|
21537
|
+
}, [n, D]);
|
|
21538
|
+
const A = (Z) => {
|
|
21539
|
+
const T = X[Z];
|
|
21540
|
+
let E;
|
|
21512
21541
|
switch (T) {
|
|
21513
21542
|
case "days":
|
|
21514
|
-
|
|
21543
|
+
E = "months";
|
|
21515
21544
|
break;
|
|
21516
21545
|
case "months":
|
|
21517
|
-
|
|
21546
|
+
E = "years";
|
|
21518
21547
|
break;
|
|
21519
21548
|
case "years":
|
|
21520
|
-
|
|
21549
|
+
E = "days";
|
|
21521
21550
|
break;
|
|
21522
21551
|
default:
|
|
21523
|
-
|
|
21524
|
-
}
|
|
21525
|
-
const
|
|
21526
|
-
|
|
21527
|
-
}, m = (
|
|
21528
|
-
const
|
|
21529
|
-
|
|
21530
|
-
Z
|
|
21552
|
+
E = "days";
|
|
21553
|
+
}
|
|
21554
|
+
const i1 = [...X];
|
|
21555
|
+
i1[Z] = E, B(i1);
|
|
21556
|
+
}, m = (Z, T) => {
|
|
21557
|
+
const E = [...k];
|
|
21558
|
+
E[Z] = new Date(
|
|
21559
|
+
k[Z].getFullYear(),
|
|
21531
21560
|
T,
|
|
21532
21561
|
1
|
|
21533
|
-
),
|
|
21534
|
-
const
|
|
21535
|
-
|
|
21536
|
-
}, b = (
|
|
21537
|
-
const
|
|
21538
|
-
|
|
21539
|
-
const
|
|
21540
|
-
|
|
21541
|
-
}, O = (
|
|
21542
|
-
const T = [...
|
|
21543
|
-
T.forEach((
|
|
21544
|
-
const
|
|
21545
|
-
switch (X[
|
|
21562
|
+
), z(E);
|
|
21563
|
+
const i1 = [...X];
|
|
21564
|
+
i1[Z] = "days", B(i1), p == null || p(T);
|
|
21565
|
+
}, b = (Z, T) => {
|
|
21566
|
+
const E = [...k];
|
|
21567
|
+
E[Z] = new Date(T, k[Z].getMonth(), 1), z(E);
|
|
21568
|
+
const i1 = [...X];
|
|
21569
|
+
i1[Z] = "months", B(i1), l == null || l(T);
|
|
21570
|
+
}, O = (Z) => {
|
|
21571
|
+
const T = [...k];
|
|
21572
|
+
T.forEach((E, i1) => {
|
|
21573
|
+
const e1 = new Date(E);
|
|
21574
|
+
switch (X[i1]) {
|
|
21546
21575
|
case "days":
|
|
21547
|
-
|
|
21576
|
+
e1.setMonth(e1.getMonth() + (Z === "next" ? 1 : -1));
|
|
21548
21577
|
break;
|
|
21549
21578
|
case "months":
|
|
21550
|
-
|
|
21579
|
+
e1.setFullYear(e1.getFullYear() + (Z === "next" ? 1 : -1));
|
|
21551
21580
|
break;
|
|
21552
21581
|
case "years":
|
|
21553
|
-
|
|
21582
|
+
e1.setFullYear(e1.getFullYear() + (Z === "next" ? 12 : -12));
|
|
21554
21583
|
break;
|
|
21555
21584
|
}
|
|
21556
|
-
T[
|
|
21557
|
-
}),
|
|
21585
|
+
T[i1] = e1;
|
|
21586
|
+
}), z(T), L(Z);
|
|
21558
21587
|
};
|
|
21559
|
-
return
|
|
21560
|
-
/* @__PURE__ */ i("div", { className: "ui-relative", children: y === "range" &&
|
|
21588
|
+
return Y(
|
|
21589
|
+
/* @__PURE__ */ i("div", { className: "ui-relative", children: y === "range" && D > 1 ? /* @__PURE__ */ u("div", { className: "ui-overflow-hidden ui-rounded-lg ui-border ui-bg-white ui-shadow-lg", children: [
|
|
21561
21590
|
/* @__PURE__ */ i(
|
|
21562
21591
|
o3,
|
|
21563
21592
|
{
|
|
21564
|
-
calendarDates:
|
|
21593
|
+
calendarDates: k,
|
|
21565
21594
|
viewModes: X,
|
|
21566
21595
|
onNavigate: O,
|
|
21567
21596
|
onToggleViewMode: A,
|
|
21568
21597
|
onGoToToday: C,
|
|
21569
21598
|
monthNames: j,
|
|
21570
21599
|
yearRange: V,
|
|
21571
|
-
renderHeader:
|
|
21600
|
+
renderHeader: $
|
|
21572
21601
|
}
|
|
21573
21602
|
),
|
|
21574
|
-
/* @__PURE__ */ i("div", { className: "ui-flex ui-flex-col ui-flex-wrap ui-gap-4 ui-p-4 md:ui-flex-row", children:
|
|
21603
|
+
/* @__PURE__ */ i("div", { className: "ui-flex ui-flex-col ui-flex-wrap ui-gap-4 ui-p-4 md:ui-flex-row", children: k.map((Z, T) => /* @__PURE__ */ i("div", { className: "ui-flex-shrink-0", children: /* @__PURE__ */ i("div", { className: "ui-w-full ui-overflow-hidden ui-rounded-lg ui-bg-white", children: /* @__PURE__ */ i(
|
|
21575
21604
|
r3,
|
|
21576
21605
|
{
|
|
21577
|
-
currentDate:
|
|
21606
|
+
currentDate: Z,
|
|
21578
21607
|
selectedDate: e,
|
|
21579
21608
|
selectedRange: a,
|
|
21580
21609
|
onDateSelect: c,
|
|
21581
21610
|
onDateHover: d,
|
|
21582
21611
|
minDate: g,
|
|
21583
|
-
maxDate:
|
|
21612
|
+
maxDate: f,
|
|
21584
21613
|
viewMode: X[T],
|
|
21585
|
-
weekDays:
|
|
21614
|
+
weekDays: M,
|
|
21586
21615
|
monthNames: j,
|
|
21587
21616
|
startOfWeek: h,
|
|
21588
21617
|
showWeekNumbers: v,
|
|
21589
21618
|
yearRange: V,
|
|
21590
|
-
hoverDate:
|
|
21591
|
-
onMonthSelect: (
|
|
21592
|
-
onYearSelect: (
|
|
21619
|
+
hoverDate: I,
|
|
21620
|
+
onMonthSelect: (E) => m(T, E),
|
|
21621
|
+
onYearSelect: (E) => b(T, E),
|
|
21593
21622
|
renderDay: G
|
|
21594
21623
|
}
|
|
21595
21624
|
) }) }, T)) }),
|
|
21596
21625
|
/* @__PURE__ */ u("div", { className: "ui-flex ui-justify-end ui-gap-2 ui-border-t ui-border-neutral-100 ui-p-3", children: [
|
|
21597
|
-
/* @__PURE__ */ i(
|
|
21598
|
-
/* @__PURE__ */ i(
|
|
21626
|
+
/* @__PURE__ */ i(r1, { variant: "outlined", size: "md", color: "white", children: "Cancelar" }),
|
|
21627
|
+
/* @__PURE__ */ i(r1, { size: "md", children: "Aceptar" })
|
|
21599
21628
|
] })
|
|
21600
21629
|
] }) : /* @__PURE__ */ i(
|
|
21601
21630
|
t3,
|
|
@@ -21606,7 +21635,7 @@ const i3 = E1(
|
|
|
21606
21635
|
onDateSelect: c,
|
|
21607
21636
|
onDateHover: d,
|
|
21608
21637
|
minDate: g,
|
|
21609
|
-
maxDate:
|
|
21638
|
+
maxDate: f,
|
|
21610
21639
|
viewMode: w,
|
|
21611
21640
|
onViewModeChange: s,
|
|
21612
21641
|
onNavigate: L,
|
|
@@ -21614,15 +21643,15 @@ const i3 = E1(
|
|
|
21614
21643
|
onYearSelect: l,
|
|
21615
21644
|
onGoToToday: C,
|
|
21616
21645
|
locale: x,
|
|
21617
|
-
weekDays:
|
|
21646
|
+
weekDays: M,
|
|
21618
21647
|
monthNames: j,
|
|
21619
21648
|
startOfWeek: h,
|
|
21620
21649
|
showWeekNumbers: v,
|
|
21621
21650
|
yearRange: V,
|
|
21622
|
-
hoverDate:
|
|
21623
|
-
closeOnSelect:
|
|
21651
|
+
hoverDate: I,
|
|
21652
|
+
closeOnSelect: S,
|
|
21624
21653
|
autoCloseRange: R,
|
|
21625
|
-
renderHeader:
|
|
21654
|
+
renderHeader: $,
|
|
21626
21655
|
renderDay: G
|
|
21627
21656
|
}
|
|
21628
21657
|
) })
|
|
@@ -21656,25 +21685,25 @@ const i3 = E1(
|
|
|
21656
21685
|
className: C = "",
|
|
21657
21686
|
inputClassName: w = "",
|
|
21658
21687
|
headerClassName: g = "",
|
|
21659
|
-
dayClassName:
|
|
21688
|
+
dayClassName: f = "",
|
|
21660
21689
|
monthClassName: x = "",
|
|
21661
|
-
yearClassName:
|
|
21690
|
+
yearClassName: M = "",
|
|
21662
21691
|
disabledDayClassName: j = "text-gray-400 cursor-not-allowed",
|
|
21663
21692
|
rangeClassName: h = "bg-blue-100",
|
|
21664
21693
|
rangeStartClassName: v = "bg-blue-500 text-white rounded-l-full",
|
|
21665
21694
|
rangeEndClassName: V = "bg-blue-500 text-white rounded-r-full",
|
|
21666
|
-
todayClassName:
|
|
21667
|
-
showWeekNumbers:
|
|
21695
|
+
todayClassName: I = "border border-blue-500",
|
|
21696
|
+
showWeekNumbers: S = !1,
|
|
21668
21697
|
yearRange: R = 12,
|
|
21669
|
-
initialViewMode:
|
|
21698
|
+
initialViewMode: D = "days",
|
|
21670
21699
|
closeOnSelect: y = !1,
|
|
21671
21700
|
autoCloseRange: J = !0,
|
|
21672
|
-
placeholder:
|
|
21701
|
+
placeholder: $ = "Seleccionar fecha",
|
|
21673
21702
|
format: G = "dd/MM/yyyy",
|
|
21674
21703
|
calendarsCount: X = 1,
|
|
21675
|
-
renderHeader:
|
|
21676
|
-
renderDay:
|
|
21677
|
-
} = o, { state:
|
|
21704
|
+
renderHeader: B,
|
|
21705
|
+
renderDay: k
|
|
21706
|
+
} = o, { state: z, selectedDate: Y, selectedRange: A, inputRef: m, isPortalReady: b, actions: O } = U8(o), { handleRangeSelection: Z } = C0(
|
|
21678
21707
|
A,
|
|
21679
21708
|
O.setSelectedRange,
|
|
21680
21709
|
c,
|
|
@@ -21685,31 +21714,31 @@ const i3 = E1(
|
|
|
21685
21714
|
return "";
|
|
21686
21715
|
const U = _.getDate().toString().padStart(2, "0"), H = (_.getMonth() + 1).toString().padStart(2, "0"), P = _.getFullYear();
|
|
21687
21716
|
return G.replace("dd", U).replace("MM", H).replace("yyyy", P.toString());
|
|
21688
|
-
},
|
|
21717
|
+
}, E = (_) => {
|
|
21689
21718
|
if (!_ || !_.start && !_.end) return "";
|
|
21690
21719
|
const U = _.start && _.start instanceof Date && !isNaN(_.start.getTime()), H = _.end && _.end instanceof Date && !isNaN(_.end.getTime());
|
|
21691
21720
|
return U && H ? `${T(_.start)} - ${T(_.end)}` : U ? T(_.start) : H ? T(_.end) : "";
|
|
21692
|
-
},
|
|
21721
|
+
}, i1 = (_) => {
|
|
21693
21722
|
if (!_ || !(_ instanceof Date) || isNaN(_.getTime())) {
|
|
21694
21723
|
console.warn("DatePicker: Se recibió una fecha inválida:", _);
|
|
21695
21724
|
return;
|
|
21696
21725
|
}
|
|
21697
|
-
r === "single" ? O.setSelectedDate(_) :
|
|
21698
|
-
},
|
|
21726
|
+
r === "single" ? O.setSelectedDate(_) : Z(_, z.hoverDate, O.closePicker);
|
|
21727
|
+
}, e1 = (_) => {
|
|
21699
21728
|
if (_ !== null && (!(_ instanceof Date) || isNaN(_.getTime()))) {
|
|
21700
21729
|
console.warn("DatePicker: Se recibió una fecha inválida en hover:", _);
|
|
21701
21730
|
return;
|
|
21702
21731
|
}
|
|
21703
21732
|
O.setHoverDate(_);
|
|
21704
|
-
},
|
|
21733
|
+
}, l1 = () => r === "single" ? T(Y) : E(A);
|
|
21705
21734
|
return /* @__PURE__ */ u("div", { className: `relative ${C}`, children: [
|
|
21706
21735
|
/* @__PURE__ */ i(
|
|
21707
21736
|
i3,
|
|
21708
21737
|
{
|
|
21709
21738
|
ref: m,
|
|
21710
|
-
value:
|
|
21711
|
-
placeholder:
|
|
21712
|
-
isOpen:
|
|
21739
|
+
value: l1(),
|
|
21740
|
+
placeholder: $,
|
|
21741
|
+
isOpen: z.isOpen,
|
|
21713
21742
|
onInputClick: O.openPicker,
|
|
21714
21743
|
className: w,
|
|
21715
21744
|
format: G
|
|
@@ -21718,44 +21747,44 @@ const i3 = E1(
|
|
|
21718
21747
|
/* @__PURE__ */ i(
|
|
21719
21748
|
u3,
|
|
21720
21749
|
{
|
|
21721
|
-
isOpen:
|
|
21750
|
+
isOpen: z.isOpen && b,
|
|
21722
21751
|
onClose: O.closePicker,
|
|
21723
|
-
portalPosition:
|
|
21724
|
-
currentDate:
|
|
21725
|
-
selectedDate:
|
|
21752
|
+
portalPosition: z.portalPosition,
|
|
21753
|
+
currentDate: z.currentDate,
|
|
21754
|
+
selectedDate: Y,
|
|
21726
21755
|
selectedRange: A,
|
|
21727
|
-
onDateSelect:
|
|
21728
|
-
onDateHover:
|
|
21756
|
+
onDateSelect: i1,
|
|
21757
|
+
onDateHover: e1,
|
|
21729
21758
|
onViewModeChange: O.setViewMode,
|
|
21730
21759
|
onNavigate: O.navigate,
|
|
21731
21760
|
onMonthSelect: O.handleMonthSelect,
|
|
21732
21761
|
onYearSelect: O.handleYearSelect,
|
|
21733
21762
|
onGoToToday: O.goToToday,
|
|
21734
|
-
viewMode:
|
|
21763
|
+
viewMode: z.viewMode,
|
|
21735
21764
|
minDate: c,
|
|
21736
21765
|
maxDate: d,
|
|
21737
21766
|
locale: s,
|
|
21738
21767
|
weekDays: L,
|
|
21739
21768
|
monthNames: p,
|
|
21740
21769
|
startOfWeek: l,
|
|
21741
|
-
showWeekNumbers:
|
|
21770
|
+
showWeekNumbers: S,
|
|
21742
21771
|
yearRange: R,
|
|
21743
|
-
hoverDate:
|
|
21772
|
+
hoverDate: z.hoverDate,
|
|
21744
21773
|
closeOnSelect: y,
|
|
21745
21774
|
autoCloseRange: J,
|
|
21746
21775
|
calendarsCount: X,
|
|
21747
21776
|
mode: r,
|
|
21748
|
-
renderHeader:
|
|
21749
|
-
renderDay:
|
|
21777
|
+
renderHeader: B,
|
|
21778
|
+
renderDay: k
|
|
21750
21779
|
}
|
|
21751
21780
|
)
|
|
21752
21781
|
] });
|
|
21753
21782
|
}, a3 = ({ title: o, className: r, icon: t }) => /* @__PURE__ */ u("div", { className: "ui-flex ui-w-full ui-items-center ui-gap-x-2", children: [
|
|
21754
|
-
t && /* @__PURE__ */ i(
|
|
21755
|
-
/* @__PURE__ */ i("h2", { className:
|
|
21783
|
+
t && /* @__PURE__ */ i(b1, { name: t, background: !0, color: "blue" }),
|
|
21784
|
+
/* @__PURE__ */ i("h2", { className: q("ui-text-2xl ui-font-bold", r), children: o })
|
|
21756
21785
|
] }), g0 = (o, r = {}) => {
|
|
21757
21786
|
const { enterDelay: t = 10, exitDelay: n = 300 } = r, [e, a] = K(!1), [c, d] = K(!1);
|
|
21758
|
-
return
|
|
21787
|
+
return W(() => {
|
|
21759
21788
|
if (o) {
|
|
21760
21789
|
a(!0);
|
|
21761
21790
|
const s = setTimeout(() => {
|
|
@@ -21770,14 +21799,14 @@ const i3 = E1(
|
|
|
21770
21799
|
}, [o, t, n]), { isVisible: e, isAnimating: c };
|
|
21771
21800
|
}, f0 = (o) => {
|
|
21772
21801
|
const r = typeof window < "u";
|
|
21773
|
-
|
|
21802
|
+
W(() => {
|
|
21774
21803
|
if (r)
|
|
21775
21804
|
return o ? document.body.style.overflow = "hidden" : document.body.style.overflow = "", () => {
|
|
21776
21805
|
document.body.style.overflow = "";
|
|
21777
21806
|
};
|
|
21778
21807
|
}, [o, r]);
|
|
21779
21808
|
}, W1 = (o, r, t = !1) => {
|
|
21780
|
-
|
|
21809
|
+
W(() => {
|
|
21781
21810
|
if (!o || t) return;
|
|
21782
21811
|
const n = (e) => {
|
|
21783
21812
|
e.key === "Escape" && r();
|
|
@@ -21785,7 +21814,7 @@ const i3 = E1(
|
|
|
21785
21814
|
return window.addEventListener("keydown", n), () => window.removeEventListener("keydown", n);
|
|
21786
21815
|
}, [o, r, t]);
|
|
21787
21816
|
}, M0 = (o, r, t = !1) => {
|
|
21788
|
-
|
|
21817
|
+
W(() => {
|
|
21789
21818
|
if (!o || t || !r.current) return;
|
|
21790
21819
|
const n = [
|
|
21791
21820
|
"button",
|
|
@@ -21802,7 +21831,7 @@ const i3 = E1(
|
|
|
21802
21831
|
return window.addEventListener("keydown", s), () => window.removeEventListener("keydown", s);
|
|
21803
21832
|
}, [o, t, r]);
|
|
21804
21833
|
}, l3 = (o, r) => {
|
|
21805
|
-
|
|
21834
|
+
W(() => {
|
|
21806
21835
|
o && r.current && requestAnimationFrame(() => {
|
|
21807
21836
|
var t;
|
|
21808
21837
|
(t = r.current) == null || t.focus();
|
|
@@ -21810,14 +21839,14 @@ const i3 = E1(
|
|
|
21810
21839
|
}, [o, r]);
|
|
21811
21840
|
}, m0 = () => {
|
|
21812
21841
|
const o = typeof window < "u", [r] = K(() => o ? document.createElement("div") : null);
|
|
21813
|
-
return
|
|
21842
|
+
return W(() => {
|
|
21814
21843
|
if (!(!r || !o))
|
|
21815
21844
|
return document.body.appendChild(r), () => {
|
|
21816
21845
|
document.body.contains(r) && document.body.removeChild(r);
|
|
21817
21846
|
};
|
|
21818
21847
|
}, [r, o]), r;
|
|
21819
21848
|
}, d3 = (o, r, t, n = !1) => {
|
|
21820
|
-
|
|
21849
|
+
W(() => {
|
|
21821
21850
|
if (!o || n) return;
|
|
21822
21851
|
const e = (a) => {
|
|
21823
21852
|
var s;
|
|
@@ -21839,12 +21868,12 @@ const i3 = E1(
|
|
|
21839
21868
|
excludeSelectors: d = [],
|
|
21840
21869
|
onOutsideClick: s
|
|
21841
21870
|
}) => {
|
|
21842
|
-
|
|
21871
|
+
W(() => {
|
|
21843
21872
|
if (!o || r || !c) return;
|
|
21844
21873
|
const L = (l) => {
|
|
21845
21874
|
var j, h;
|
|
21846
|
-
const C = l.target, w = (j = t.current) == null ? void 0 : j.contains(C), g = (h = n == null ? void 0 : n.current) == null ? void 0 : h.contains(C),
|
|
21847
|
-
w || g ||
|
|
21875
|
+
const C = l.target, w = (j = t.current) == null ? void 0 : j.contains(C), g = (h = n == null ? void 0 : n.current) == null ? void 0 : h.contains(C), f = e ? C.closest(`[data-${a}-id="${e}"]`) : !1, x = a ? C.closest(`[data-${a}-container-id]`) : !1, M = d.some((v) => C.closest(v));
|
|
21876
|
+
w || g || f || x || M || s();
|
|
21848
21877
|
}, p = (l) => {
|
|
21849
21878
|
l.detail.id === e && s();
|
|
21850
21879
|
};
|
|
@@ -21883,19 +21912,19 @@ const i3 = E1(
|
|
|
21883
21912
|
successButtonText: w = "Guardar",
|
|
21884
21913
|
onCancel: g = () => {
|
|
21885
21914
|
},
|
|
21886
|
-
onSuccess:
|
|
21915
|
+
onSuccess: f = () => {
|
|
21887
21916
|
},
|
|
21888
21917
|
showCancelButton: x = !0,
|
|
21889
|
-
showSuccessButton:
|
|
21918
|
+
showSuccessButton: M = !0,
|
|
21890
21919
|
closeAtSuccess: j = !1,
|
|
21891
21920
|
closeAtCancel: h = !0
|
|
21892
21921
|
}) => {
|
|
21893
|
-
const v = m0(), { isVisible: V, isAnimating:
|
|
21894
|
-
f0(o), W1(o, r, d), M0(o,
|
|
21922
|
+
const v = m0(), { isVisible: V, isAnimating: I } = g0(o), S = t1(null);
|
|
21923
|
+
f0(o), W1(o, r, d), M0(o, S, !s);
|
|
21895
21924
|
const R = () => {
|
|
21896
21925
|
g && g(), h && r();
|
|
21897
|
-
},
|
|
21898
|
-
|
|
21926
|
+
}, D = () => {
|
|
21927
|
+
f && f(), j && r();
|
|
21899
21928
|
};
|
|
21900
21929
|
if (!v || !V) return null;
|
|
21901
21930
|
const y = /* @__PURE__ */ u(
|
|
@@ -21909,7 +21938,7 @@ const i3 = E1(
|
|
|
21909
21938
|
/* @__PURE__ */ i(
|
|
21910
21939
|
"div",
|
|
21911
21940
|
{
|
|
21912
|
-
className:
|
|
21941
|
+
className: q(
|
|
21913
21942
|
"ui-absolute ui-inset-0 ui-bg-black ui-opacity-50 ui-backdrop-blur-sm ui-transition-opacity ui-duration-300",
|
|
21914
21943
|
o ? "ui-opacity-100" : "ui-opacity-0"
|
|
21915
21944
|
)
|
|
@@ -21918,34 +21947,34 @@ const i3 = E1(
|
|
|
21918
21947
|
/* @__PURE__ */ i(
|
|
21919
21948
|
"div",
|
|
21920
21949
|
{
|
|
21921
|
-
ref:
|
|
21950
|
+
ref: S,
|
|
21922
21951
|
tabIndex: -1,
|
|
21923
21952
|
onClick: (J) => J.stopPropagation(),
|
|
21924
|
-
className:
|
|
21953
|
+
className: q(
|
|
21925
21954
|
"ui-relative ui-z-10 ui-flex ui-flex-col ui-bg-white ui-shadow-xl ui-outline-none ui-transition-transform ui-duration-300 ui-ease-in-out",
|
|
21926
21955
|
s3[n],
|
|
21927
21956
|
L === "right" ? "ui-ml-auto" : "ui-mr-auto"
|
|
21928
21957
|
),
|
|
21929
21958
|
style: {
|
|
21930
|
-
transform: L === "right" ?
|
|
21959
|
+
transform: L === "right" ? I ? "translateX(0)" : "translateX(80%)" : I ? "translateX(0)" : "translateX(-100%)"
|
|
21931
21960
|
},
|
|
21932
|
-
children: /* @__PURE__ */ u(
|
|
21933
|
-
/* @__PURE__ */ i(
|
|
21934
|
-
/* @__PURE__ */ i(
|
|
21961
|
+
children: /* @__PURE__ */ u(g1, { rounded: !1, padding: !1, gap: !1, className: q(p), children: [
|
|
21962
|
+
/* @__PURE__ */ i(g1.Header, { children: /* @__PURE__ */ i("div", { className: "ui-flex ui-items-center ui-justify-between ui-p-4", children: t && /* @__PURE__ */ i(a3, { title: t, icon: a }) }) }),
|
|
21963
|
+
/* @__PURE__ */ i(g1.Separator, { padding: !1 }),
|
|
21935
21964
|
/* @__PURE__ */ i(
|
|
21936
|
-
|
|
21965
|
+
g1.Body,
|
|
21937
21966
|
{
|
|
21938
21967
|
fullHeight: !0,
|
|
21939
|
-
className:
|
|
21968
|
+
className: q("ui-p-4", l ? "ui-overflow-y-auto" : ""),
|
|
21940
21969
|
scrollable: l,
|
|
21941
21970
|
children: e
|
|
21942
21971
|
}
|
|
21943
21972
|
),
|
|
21944
|
-
(x ||
|
|
21945
|
-
/* @__PURE__ */ i(
|
|
21946
|
-
/* @__PURE__ */ u(
|
|
21947
|
-
x && /* @__PURE__ */ i(H1, { fullWidth: !0, variant: "outlined", color: "white", onClick: R, children: C }),
|
|
21948
|
-
|
|
21973
|
+
(x || M) && /* @__PURE__ */ u(k1, { children: [
|
|
21974
|
+
/* @__PURE__ */ i(g1.Separator, { padding: !1 }),
|
|
21975
|
+
/* @__PURE__ */ u(g1.Footer, { className: "ui-flex ui-items-center ui-justify-end ui-gap-x-4 ui-p-4", children: [
|
|
21976
|
+
x && /* @__PURE__ */ i(H1, { fullWidth: !0, variant: "outlined", color: "white", tooltip: "Cancelar", onClick: R, children: C }),
|
|
21977
|
+
M && /* @__PURE__ */ i(H1, { fullWidth: !0, variant: "button", onClick: D, children: w })
|
|
21949
21978
|
] })
|
|
21950
21979
|
] })
|
|
21951
21980
|
] })
|
|
@@ -21955,7 +21984,7 @@ const i3 = E1(
|
|
|
21955
21984
|
}
|
|
21956
21985
|
);
|
|
21957
21986
|
return d0.createPortal(y, v);
|
|
21958
|
-
}, s5 = ({ className: o }) => /* @__PURE__ */ i("div", { className:
|
|
21987
|
+
}, s5 = ({ className: o }) => /* @__PURE__ */ i("div", { className: q("ui-my-1 ui-h-px ui-w-full ui-bg-neutral-100", o) }), x0 = ({
|
|
21959
21988
|
children: o,
|
|
21960
21989
|
icon: r,
|
|
21961
21990
|
onClick: t,
|
|
@@ -22012,7 +22041,7 @@ const i3 = E1(
|
|
|
22012
22041
|
l(!1);
|
|
22013
22042
|
},
|
|
22014
22043
|
children: [
|
|
22015
|
-
r && /* @__PURE__ */ i(
|
|
22044
|
+
r && /* @__PURE__ */ i(x1, { slot: r, colorIcon: w, size: "2xl", defaultSizeIcon: !1 }),
|
|
22016
22045
|
o
|
|
22017
22046
|
]
|
|
22018
22047
|
}
|
|
@@ -22080,7 +22109,7 @@ const i3 = E1(
|
|
|
22080
22109
|
className: "ui-focus:ring-blue-500 ui-focus:ring-2 ui-h-4 ui-w-4 ui-rounded ui-border-gray-300 ui-bg-gray-100 ui-text-blue-600"
|
|
22081
22110
|
}
|
|
22082
22111
|
) }),
|
|
22083
|
-
r && /* @__PURE__ */ i(
|
|
22112
|
+
r && /* @__PURE__ */ i(x1, { slot: r, colorIcon: C, size: "2xl", defaultSizeIcon: !1 }),
|
|
22084
22113
|
o
|
|
22085
22114
|
]
|
|
22086
22115
|
}
|
|
@@ -22099,7 +22128,7 @@ const i3 = E1(
|
|
|
22099
22128
|
}) => o.length === 0 && !d ? null : /* @__PURE__ */ i(
|
|
22100
22129
|
"ul",
|
|
22101
22130
|
{
|
|
22102
|
-
className:
|
|
22131
|
+
className: q(
|
|
22103
22132
|
"ui-m-0 ui-flex ui-min-w-max ui-list-none ui-flex-col ui-p-0 ui-py-2",
|
|
22104
22133
|
c
|
|
22105
22134
|
),
|
|
@@ -22153,170 +22182,170 @@ const i3 = E1(
|
|
|
22153
22182
|
absolute: w = !1,
|
|
22154
22183
|
onOpenChange: g
|
|
22155
22184
|
}) => {
|
|
22156
|
-
const
|
|
22185
|
+
const f = l0(), x = L || `dropdown-${f}`, [M, j] = K(!1), [h, v] = K(!1), [V, I] = K(""), [S, R] = K("bottom"), [D, y] = K({}), J = t1(null), $ = t1(null), G = t1(null), X = N(
|
|
22157
22186
|
(H) => H == null ? [] : Array.isArray(H) ? H : [H],
|
|
22158
22187
|
[]
|
|
22159
|
-
),
|
|
22188
|
+
), B = N(
|
|
22160
22189
|
(H) => H == null || H === "" ? "" : Array.isArray(H) ? H[0] || "" : H,
|
|
22161
22190
|
[]
|
|
22162
|
-
), [
|
|
22191
|
+
), [k, z] = K(() => l ? X(r) : B(r)), Y = o !== void 0, A = Y ? o : k, m = N(
|
|
22163
22192
|
(H) => {
|
|
22164
|
-
|
|
22193
|
+
Y || z(H), a == null || a(H);
|
|
22165
22194
|
},
|
|
22166
|
-
[
|
|
22195
|
+
[Y, a]
|
|
22167
22196
|
);
|
|
22168
|
-
|
|
22169
|
-
if (
|
|
22197
|
+
W(() => {
|
|
22198
|
+
if (Y && o !== void 0)
|
|
22170
22199
|
if (l) {
|
|
22171
22200
|
const H = X(o);
|
|
22172
|
-
|
|
22201
|
+
z((P) => JSON.stringify(P) !== JSON.stringify(H) ? H : P);
|
|
22173
22202
|
} else {
|
|
22174
|
-
const H =
|
|
22175
|
-
|
|
22203
|
+
const H = B(o);
|
|
22204
|
+
z((P) => P !== H ? H : P);
|
|
22176
22205
|
}
|
|
22177
|
-
}, [o,
|
|
22206
|
+
}, [o, Y, l, X, B]);
|
|
22178
22207
|
const b = l ? t.filter((H) => X(A).includes(H[n])) : [
|
|
22179
22208
|
t.find((H) => A === "" || A === null || A === void 0 ? !1 : H[e] === -1 ? A === -1 || A === "-1" : H[n] === A)
|
|
22180
22209
|
].filter(Boolean), O = t.filter((H) => {
|
|
22181
22210
|
const P = d ? H[n].toLowerCase().includes(V.toLowerCase()) : !0;
|
|
22182
22211
|
if (l) {
|
|
22183
|
-
const
|
|
22184
|
-
return P && !
|
|
22212
|
+
const o1 = X(A).includes(H[n]);
|
|
22213
|
+
return P && !o1;
|
|
22185
22214
|
}
|
|
22186
22215
|
return H[e] === -1 && (A === -1 || A === "-1") ? !1 : P;
|
|
22187
|
-
}),
|
|
22188
|
-
var
|
|
22189
|
-
const H = (
|
|
22190
|
-
return H || ((
|
|
22216
|
+
}), Z = N(() => {
|
|
22217
|
+
var o1, n1;
|
|
22218
|
+
const H = (o1 = G.current) == null ? void 0 : o1.querySelector("input");
|
|
22219
|
+
return H || ((n1 = G.current) == null ? void 0 : n1.querySelector(
|
|
22191
22220
|
'[data-dropdown-input="true"]'
|
|
22192
22221
|
));
|
|
22193
|
-
}, []), T =
|
|
22194
|
-
const H =
|
|
22222
|
+
}, []), T = N(() => {
|
|
22223
|
+
const H = Z();
|
|
22195
22224
|
H && requestAnimationFrame(() => {
|
|
22196
22225
|
var $1;
|
|
22197
|
-
const P = H.getBoundingClientRect(),
|
|
22198
|
-
let
|
|
22199
|
-
|
|
22200
|
-
const p1 =
|
|
22201
|
-
R(
|
|
22202
|
-
let
|
|
22226
|
+
const P = H.getBoundingClientRect(), o1 = window.innerHeight;
|
|
22227
|
+
let n1 = 0;
|
|
22228
|
+
$.current && (n1 = $.current.offsetHeight), n1 === 0 && (n1 = Math.min(200, O.length * 40));
|
|
22229
|
+
const p1 = o1 - P.bottom, s1 = P.top, d1 = p1 < n1 && s1 > p1 ? "top" : "bottom";
|
|
22230
|
+
R(d1);
|
|
22231
|
+
let u1 = 0, m1 = 0, S1 = P.width;
|
|
22203
22232
|
if (!w)
|
|
22204
|
-
|
|
22233
|
+
d1 === "bottom" ? u1 = P.bottom + 4 : u1 = P.top - n1 - 4, m1 = P.left;
|
|
22205
22234
|
else {
|
|
22206
|
-
const
|
|
22207
|
-
if (!
|
|
22208
|
-
const
|
|
22209
|
-
|
|
22235
|
+
const w1 = ($1 = G.current) == null ? void 0 : $1.getBoundingClientRect();
|
|
22236
|
+
if (!w1) return;
|
|
22237
|
+
const B1 = P.top - w1.top, O1 = P.left - w1.left;
|
|
22238
|
+
d1 === "bottom" ? u1 = B1 + P.height + 4 : u1 = B1 - n1 - 4, m1 = O1;
|
|
22210
22239
|
}
|
|
22211
|
-
const
|
|
22240
|
+
const M1 = 1100, L1 = parseInt(x.replace(/\D/g, "")) || 0, I1 = M1 + L1 % 100, _1 = {
|
|
22212
22241
|
position: w ? "absolute" : "fixed",
|
|
22213
|
-
top: `${
|
|
22214
|
-
left: `${
|
|
22215
|
-
width: `${
|
|
22216
|
-
zIndex:
|
|
22242
|
+
top: `${u1}px`,
|
|
22243
|
+
left: `${m1}px`,
|
|
22244
|
+
width: `${S1}px`,
|
|
22245
|
+
zIndex: I1
|
|
22217
22246
|
};
|
|
22218
22247
|
y(_1);
|
|
22219
22248
|
});
|
|
22220
|
-
}, [
|
|
22221
|
-
if (
|
|
22249
|
+
}, [Z, O.length, x, w]), E = N(() => {
|
|
22250
|
+
if (!$.current || !b.length)
|
|
22222
22251
|
return;
|
|
22223
|
-
const P =
|
|
22252
|
+
const P = $.current.querySelector(".ui-overflow-y-auto");
|
|
22224
22253
|
if (!P)
|
|
22225
22254
|
return;
|
|
22226
|
-
const
|
|
22227
|
-
if (!
|
|
22228
|
-
const
|
|
22229
|
-
`[data-option-value="${
|
|
22255
|
+
const o1 = b[0];
|
|
22256
|
+
if (!o1) return;
|
|
22257
|
+
const n1 = P.querySelector(
|
|
22258
|
+
`[data-option-value="${o1[n]}"]`
|
|
22230
22259
|
);
|
|
22231
|
-
if (!
|
|
22260
|
+
if (!n1)
|
|
22232
22261
|
return;
|
|
22233
|
-
const p1 = P.clientHeight,
|
|
22262
|
+
const p1 = P.clientHeight, s1 = n1.offsetTop, d1 = n1.clientHeight, u1 = s1 - p1 / 2 + d1 / 2;
|
|
22234
22263
|
P.scrollTo({
|
|
22235
|
-
top: Math.max(0,
|
|
22264
|
+
top: Math.max(0, u1),
|
|
22236
22265
|
behavior: "smooth"
|
|
22237
22266
|
});
|
|
22238
|
-
}, [b, n]),
|
|
22239
|
-
H && H.stopPropagation(), !p && (
|
|
22267
|
+
}, [b, n]), i1 = (H) => {
|
|
22268
|
+
H && H.stopPropagation(), !p && (M ? e1() : (c3(x), I(""), v(!1), T(), setTimeout(() => {
|
|
22240
22269
|
j(!0), G1.add(x), setTimeout(() => {
|
|
22241
22270
|
T(), setTimeout(() => {
|
|
22242
|
-
|
|
22271
|
+
E();
|
|
22243
22272
|
}, 50);
|
|
22244
22273
|
}, 50);
|
|
22245
22274
|
}, 50)));
|
|
22246
|
-
},
|
|
22275
|
+
}, e1 = () => {
|
|
22247
22276
|
v(!0), setTimeout(() => {
|
|
22248
22277
|
j(!1), v(!1), G1.delete(x);
|
|
22249
22278
|
}, 150);
|
|
22250
|
-
},
|
|
22279
|
+
}, l1 = (H, P) => {
|
|
22251
22280
|
if (P.stopPropagation(), !H.disabled) {
|
|
22252
22281
|
if (l) {
|
|
22253
|
-
const
|
|
22254
|
-
if (C &&
|
|
22282
|
+
const o1 = X(A), n1 = H[n];
|
|
22283
|
+
if (C && o1.length >= C && !o1.includes(n1))
|
|
22255
22284
|
return;
|
|
22256
|
-
const p1 =
|
|
22285
|
+
const p1 = o1.includes(n1) ? o1.filter((s1) => s1 !== n1) : [...o1, n1];
|
|
22257
22286
|
m(p1);
|
|
22258
22287
|
} else {
|
|
22259
|
-
const
|
|
22260
|
-
m(
|
|
22288
|
+
const o1 = H[e] === -1 ? -1 : H[n];
|
|
22289
|
+
m(o1), I(""), e1();
|
|
22261
22290
|
}
|
|
22262
22291
|
c == null || c(H);
|
|
22263
22292
|
}
|
|
22264
22293
|
}, _ = (H) => {
|
|
22265
|
-
|
|
22294
|
+
I(H.target.value);
|
|
22266
22295
|
}, U = (H) => {
|
|
22267
|
-
H.stopPropagation(), m(l ? [] : ""),
|
|
22296
|
+
H.stopPropagation(), m(l ? [] : ""), I("");
|
|
22268
22297
|
};
|
|
22269
|
-
return
|
|
22270
|
-
g == null || g(
|
|
22271
|
-
}, [
|
|
22272
|
-
isActive:
|
|
22298
|
+
return W(() => {
|
|
22299
|
+
g == null || g(M);
|
|
22300
|
+
}, [M, g]), v0({
|
|
22301
|
+
isActive: M && !h,
|
|
22273
22302
|
// Solo activar cuando esté abierto y no cerrando
|
|
22274
22303
|
disabled: p,
|
|
22275
|
-
elementRef:
|
|
22304
|
+
elementRef: $,
|
|
22276
22305
|
containerRef: G,
|
|
22277
22306
|
elementId: x,
|
|
22278
22307
|
elementType: "dropdown",
|
|
22279
22308
|
closeOnClickOutside: s,
|
|
22280
22309
|
onOutsideClick: () => {
|
|
22281
|
-
|
|
22310
|
+
e1();
|
|
22282
22311
|
}
|
|
22283
|
-
}),
|
|
22284
|
-
if (
|
|
22312
|
+
}), W(() => {
|
|
22313
|
+
if (M) {
|
|
22285
22314
|
const H = () => {
|
|
22286
22315
|
T();
|
|
22287
22316
|
}, P = () => {
|
|
22288
|
-
|
|
22317
|
+
M && !h && T();
|
|
22289
22318
|
};
|
|
22290
22319
|
return window.addEventListener("resize", H), window.addEventListener("scroll", P, !1), document.addEventListener("scroll", P, !1), () => {
|
|
22291
22320
|
window.removeEventListener("resize", H), window.removeEventListener("scroll", P, !1), document.removeEventListener("scroll", P, !1);
|
|
22292
22321
|
};
|
|
22293
22322
|
}
|
|
22294
|
-
}, [
|
|
22323
|
+
}, [M, T, h]), {
|
|
22295
22324
|
// Estado
|
|
22296
|
-
isOpen:
|
|
22325
|
+
isOpen: M,
|
|
22297
22326
|
isClosing: h,
|
|
22298
22327
|
searchValue: V,
|
|
22299
22328
|
selectedValue: A,
|
|
22300
22329
|
selectedOptions: b,
|
|
22301
22330
|
filteredOptions: O,
|
|
22302
|
-
position:
|
|
22303
|
-
dropdownStyle:
|
|
22304
|
-
isControlled:
|
|
22331
|
+
position: S,
|
|
22332
|
+
dropdownStyle: D,
|
|
22333
|
+
isControlled: Y,
|
|
22305
22334
|
multiple: l,
|
|
22306
22335
|
// Referencias
|
|
22307
22336
|
inputRef: J,
|
|
22308
|
-
dropdownRef:
|
|
22337
|
+
dropdownRef: $,
|
|
22309
22338
|
containerRef: G,
|
|
22310
22339
|
dropdownUniqueId: x,
|
|
22311
22340
|
// Funciones
|
|
22312
|
-
toggleDropdown:
|
|
22313
|
-
closeDropdown:
|
|
22314
|
-
handleOptionSelect:
|
|
22341
|
+
toggleDropdown: i1,
|
|
22342
|
+
closeDropdown: e1,
|
|
22343
|
+
handleOptionSelect: l1,
|
|
22315
22344
|
handleSearchChange: _,
|
|
22316
22345
|
handleClear: U,
|
|
22317
22346
|
calculatePosition: T,
|
|
22318
22347
|
setValue: m,
|
|
22319
|
-
scrollToSelectedOption:
|
|
22348
|
+
scrollToSelectedOption: E,
|
|
22320
22349
|
normalizeToArray: X
|
|
22321
22350
|
};
|
|
22322
22351
|
}, j0 = ({
|
|
@@ -22331,7 +22360,7 @@ const i3 = E1(
|
|
|
22331
22360
|
color: s,
|
|
22332
22361
|
...L
|
|
22333
22362
|
}) => /* @__PURE__ */ i(
|
|
22334
|
-
|
|
22363
|
+
r1,
|
|
22335
22364
|
{
|
|
22336
22365
|
slotRight: o ? "X2Outlined" : void 0,
|
|
22337
22366
|
rounded: c,
|
|
@@ -22342,7 +22371,7 @@ const i3 = E1(
|
|
|
22342
22371
|
onClickRightSlot: o || void 0,
|
|
22343
22372
|
size: t,
|
|
22344
22373
|
defaultSizeIcon: !1,
|
|
22345
|
-
className:
|
|
22374
|
+
className: q("ui:h-fit", r),
|
|
22346
22375
|
classNameId: "imj-ui-tag",
|
|
22347
22376
|
...L,
|
|
22348
22377
|
clickable: !1,
|
|
@@ -22364,22 +22393,22 @@ const i3 = E1(
|
|
|
22364
22393
|
rightSlot: C,
|
|
22365
22394
|
valueName: w
|
|
22366
22395
|
}) => {
|
|
22367
|
-
const [g,
|
|
22368
|
-
return
|
|
22396
|
+
const [g, f] = K(!1), [x, M] = K(null), j = t1(null);
|
|
22397
|
+
return W(() => {
|
|
22369
22398
|
if (!j.current || t.length === 0) {
|
|
22370
|
-
|
|
22399
|
+
f(!1), M(null);
|
|
22371
22400
|
return;
|
|
22372
22401
|
}
|
|
22373
22402
|
const v = setTimeout(() => {
|
|
22374
22403
|
const V = j.current;
|
|
22375
22404
|
if (V) {
|
|
22376
|
-
const
|
|
22405
|
+
const I = V.scrollHeight, S = V.clientHeight;
|
|
22377
22406
|
if (x === null) {
|
|
22378
|
-
|
|
22407
|
+
M(S);
|
|
22379
22408
|
return;
|
|
22380
22409
|
}
|
|
22381
|
-
const R =
|
|
22382
|
-
|
|
22410
|
+
const R = I > x;
|
|
22411
|
+
f(R);
|
|
22383
22412
|
}
|
|
22384
22413
|
}, 100);
|
|
22385
22414
|
return () => clearTimeout(v);
|
|
@@ -22456,206 +22485,206 @@ const i3 = E1(
|
|
|
22456
22485
|
value: C,
|
|
22457
22486
|
defaultValue: w = "",
|
|
22458
22487
|
disabled: g = !1,
|
|
22459
|
-
placeholder:
|
|
22488
|
+
placeholder: f = "",
|
|
22460
22489
|
options: x = [],
|
|
22461
|
-
valueName:
|
|
22490
|
+
valueName: M = "label",
|
|
22462
22491
|
idName: j = "id",
|
|
22463
22492
|
onValueChange: h,
|
|
22464
22493
|
onOptionSelect: v,
|
|
22465
22494
|
onCheckboxChange: V,
|
|
22466
|
-
searchable:
|
|
22467
|
-
maxHeight:
|
|
22495
|
+
searchable: I = !1,
|
|
22496
|
+
maxHeight: S = "200px",
|
|
22468
22497
|
closeOnClickOutside: R = !0,
|
|
22469
|
-
dropdownId:
|
|
22498
|
+
dropdownId: D,
|
|
22470
22499
|
multiple: y = !1,
|
|
22471
22500
|
maxSelectedItems: J,
|
|
22472
|
-
selectedItemsDisplay:
|
|
22501
|
+
selectedItemsDisplay: $ = "tags",
|
|
22473
22502
|
absolute: G = !1,
|
|
22474
22503
|
footer: X = !1,
|
|
22475
|
-
defaultOptionSelected:
|
|
22476
|
-
withCheckbox:
|
|
22477
|
-
|
|
22478
|
-
},
|
|
22479
|
-
const A = t1(null), [m, b] = K(c), [O,
|
|
22504
|
+
defaultOptionSelected: B = !1,
|
|
22505
|
+
withCheckbox: k = !1,
|
|
22506
|
+
...z
|
|
22507
|
+
}, Y) => {
|
|
22508
|
+
const A = t1(null), [m, b] = K(c), [O, Z] = K(null), [T, E] = K(!1), l1 = y ? x : !y && B ? [
|
|
22480
22509
|
{
|
|
22481
22510
|
...{
|
|
22482
|
-
label:
|
|
22511
|
+
label: f || "Selecciona una opción",
|
|
22483
22512
|
value: -1,
|
|
22484
22513
|
disabled: !1
|
|
22485
22514
|
},
|
|
22486
22515
|
[j]: -1,
|
|
22487
22516
|
value: -1,
|
|
22488
|
-
label:
|
|
22517
|
+
label: f || "Selecciona una opción"
|
|
22489
22518
|
},
|
|
22490
|
-
...x.filter((
|
|
22491
|
-
] : x, _ = C !== void 0 ? C :
|
|
22519
|
+
...x.filter((F) => F[j] !== -1)
|
|
22520
|
+
] : x, _ = C !== void 0 ? C : B && !y ? -1 : w, {
|
|
22492
22521
|
// Estado
|
|
22493
22522
|
isOpen: U,
|
|
22494
22523
|
isClosing: H,
|
|
22495
22524
|
searchValue: P,
|
|
22496
|
-
selectedValue:
|
|
22497
|
-
selectedOptions:
|
|
22525
|
+
selectedValue: o1,
|
|
22526
|
+
selectedOptions: n1,
|
|
22498
22527
|
filteredOptions: p1,
|
|
22499
|
-
dropdownStyle:
|
|
22500
|
-
isControlled:
|
|
22528
|
+
dropdownStyle: s1,
|
|
22529
|
+
isControlled: d1,
|
|
22501
22530
|
// Referencias
|
|
22502
|
-
inputRef:
|
|
22503
|
-
dropdownRef:
|
|
22504
|
-
containerRef:
|
|
22505
|
-
dropdownUniqueId:
|
|
22531
|
+
inputRef: u1,
|
|
22532
|
+
dropdownRef: m1,
|
|
22533
|
+
containerRef: S1,
|
|
22534
|
+
dropdownUniqueId: M1,
|
|
22506
22535
|
// Funciones
|
|
22507
|
-
toggleDropdown:
|
|
22508
|
-
closeDropdown:
|
|
22536
|
+
toggleDropdown: L1,
|
|
22537
|
+
closeDropdown: I1,
|
|
22509
22538
|
handleOptionSelect: i0,
|
|
22510
22539
|
handleSearchChange: _1,
|
|
22511
22540
|
handleClear: $1,
|
|
22512
|
-
calculatePosition:
|
|
22513
|
-
scrollToSelectedOption:
|
|
22514
|
-
setValue:
|
|
22541
|
+
calculatePosition: w1,
|
|
22542
|
+
scrollToSelectedOption: B1,
|
|
22543
|
+
setValue: O1,
|
|
22515
22544
|
normalizeToArray: y0
|
|
22516
22545
|
} = p3({
|
|
22517
22546
|
value: C,
|
|
22518
22547
|
defaultValue: _,
|
|
22519
|
-
options:
|
|
22520
|
-
valueName:
|
|
22548
|
+
options: l1,
|
|
22549
|
+
valueName: M,
|
|
22521
22550
|
idName: j,
|
|
22522
22551
|
onValueChange: h,
|
|
22523
22552
|
onOptionSelect: v,
|
|
22524
|
-
searchable:
|
|
22553
|
+
searchable: I,
|
|
22525
22554
|
closeOnClickOutside: R,
|
|
22526
|
-
dropdownId:
|
|
22555
|
+
dropdownId: D,
|
|
22527
22556
|
disabled: g,
|
|
22528
22557
|
multiple: y,
|
|
22529
22558
|
maxSelectedItems: J,
|
|
22530
22559
|
absolute: G,
|
|
22531
|
-
onOpenChange: (
|
|
22532
|
-
|
|
22533
|
-
|
|
22560
|
+
onOpenChange: (F) => {
|
|
22561
|
+
F && setTimeout(() => {
|
|
22562
|
+
E(!1);
|
|
22534
22563
|
}, 200);
|
|
22535
22564
|
}
|
|
22536
22565
|
});
|
|
22537
|
-
|
|
22538
|
-
if (
|
|
22566
|
+
W(() => {
|
|
22567
|
+
if (d1 && C !== void 0)
|
|
22539
22568
|
if (C === "" || C === -1 || C === "-1")
|
|
22540
|
-
b((
|
|
22569
|
+
b((F) => F !== c ? c : F), Z((F) => F !== null ? null : F);
|
|
22541
22570
|
else {
|
|
22542
|
-
const
|
|
22543
|
-
(a1) => a1[
|
|
22571
|
+
const F = l1.find(
|
|
22572
|
+
(a1) => a1[M] === C || a1[j] === C
|
|
22544
22573
|
);
|
|
22545
|
-
if (
|
|
22546
|
-
const a1 =
|
|
22547
|
-
b((
|
|
22574
|
+
if (F) {
|
|
22575
|
+
const a1 = F.icon || c, j1 = F.iconColor || null;
|
|
22576
|
+
b((Q) => Q !== a1 ? a1 : Q), Z((Q) => Q !== j1 ? j1 : Q);
|
|
22548
22577
|
}
|
|
22549
22578
|
}
|
|
22550
|
-
}, [C,
|
|
22551
|
-
|
|
22579
|
+
}, [C, d1, l1, M, j, c]), Q1(
|
|
22580
|
+
Y,
|
|
22552
22581
|
() => ({
|
|
22553
|
-
getValue: () =>
|
|
22554
|
-
setValue: (
|
|
22555
|
-
|
|
22582
|
+
getValue: () => o1,
|
|
22583
|
+
setValue: (F) => {
|
|
22584
|
+
d1 || O1(F), h == null || h(F);
|
|
22556
22585
|
},
|
|
22557
22586
|
focus: () => {
|
|
22558
|
-
var
|
|
22559
|
-
y &&
|
|
22587
|
+
var F, a1;
|
|
22588
|
+
y && $ === "tags" ? (F = A.current) == null || F.focus() : (a1 = u1.current) == null || a1.focus();
|
|
22560
22589
|
},
|
|
22561
22590
|
blur: () => {
|
|
22562
|
-
var
|
|
22563
|
-
y &&
|
|
22591
|
+
var F, a1;
|
|
22592
|
+
y && $ === "tags" ? (F = A.current) == null || F.blur() : (a1 = u1.current) == null || a1.blur();
|
|
22564
22593
|
},
|
|
22565
22594
|
clear: () => {
|
|
22566
|
-
|
|
22595
|
+
d1 || O1(y ? [] : ""), h == null || h(y ? [] : "");
|
|
22567
22596
|
},
|
|
22568
22597
|
open: () => {
|
|
22569
|
-
g || (
|
|
22570
|
-
|
|
22598
|
+
g || (w1(), setTimeout(() => {
|
|
22599
|
+
L1();
|
|
22571
22600
|
}, 50));
|
|
22572
22601
|
},
|
|
22573
22602
|
close: () => {
|
|
22574
|
-
|
|
22603
|
+
I1();
|
|
22575
22604
|
}
|
|
22576
22605
|
}),
|
|
22577
22606
|
[
|
|
22578
|
-
|
|
22579
|
-
|
|
22607
|
+
o1,
|
|
22608
|
+
d1,
|
|
22580
22609
|
g,
|
|
22581
|
-
|
|
22610
|
+
w1,
|
|
22582
22611
|
h,
|
|
22583
|
-
|
|
22612
|
+
I1,
|
|
22584
22613
|
y,
|
|
22585
|
-
|
|
22586
|
-
|
|
22587
|
-
|
|
22588
|
-
]
|
|
22589
|
-
),
|
|
22590
|
-
if (U &&
|
|
22591
|
-
const
|
|
22592
|
-
|
|
22614
|
+
O1,
|
|
22615
|
+
L1,
|
|
22616
|
+
$
|
|
22617
|
+
]
|
|
22618
|
+
), W(() => {
|
|
22619
|
+
if (U && n1.length > 0) {
|
|
22620
|
+
const F = setTimeout(() => {
|
|
22621
|
+
B1();
|
|
22593
22622
|
}, 150);
|
|
22594
|
-
return () => clearTimeout(
|
|
22623
|
+
return () => clearTimeout(F);
|
|
22595
22624
|
}
|
|
22596
|
-
}, [U,
|
|
22597
|
-
if (U && y &&
|
|
22598
|
-
const
|
|
22599
|
-
if (!
|
|
22625
|
+
}, [U, n1, B1]), W(() => {
|
|
22626
|
+
if (U && y && $ === "tags") {
|
|
22627
|
+
const F = A.current;
|
|
22628
|
+
if (!F) return;
|
|
22600
22629
|
const a1 = new ResizeObserver(() => {
|
|
22601
22630
|
setTimeout(() => {
|
|
22602
|
-
|
|
22631
|
+
w1();
|
|
22603
22632
|
}, 50);
|
|
22604
22633
|
});
|
|
22605
|
-
return a1.observe(
|
|
22634
|
+
return a1.observe(F), () => {
|
|
22606
22635
|
a1.disconnect();
|
|
22607
22636
|
};
|
|
22608
22637
|
}
|
|
22609
|
-
}, [U, y,
|
|
22610
|
-
if (U && y &&
|
|
22611
|
-
const
|
|
22612
|
-
|
|
22638
|
+
}, [U, y, $, w1]), W(() => {
|
|
22639
|
+
if (U && y && $ === "tags") {
|
|
22640
|
+
const F = setTimeout(() => {
|
|
22641
|
+
w1();
|
|
22613
22642
|
}, 100);
|
|
22614
|
-
return () => clearTimeout(
|
|
22643
|
+
return () => clearTimeout(F);
|
|
22615
22644
|
}
|
|
22616
|
-
}, [
|
|
22617
|
-
const o0 = (
|
|
22645
|
+
}, [n1, U, y, $, w1]);
|
|
22646
|
+
const o0 = (F) => {
|
|
22618
22647
|
if (y) {
|
|
22619
|
-
const j1 = y0(
|
|
22620
|
-
|
|
22648
|
+
const j1 = y0(o1).filter((Q) => Q !== F);
|
|
22649
|
+
O1(j1);
|
|
22621
22650
|
}
|
|
22622
22651
|
}, Z0 = () => {
|
|
22623
22652
|
if (y) {
|
|
22624
|
-
if (
|
|
22625
|
-
switch (
|
|
22653
|
+
if (n1.length === 0) return "";
|
|
22654
|
+
switch ($) {
|
|
22626
22655
|
case "count":
|
|
22627
|
-
return `${
|
|
22656
|
+
return `${n1.length} elemento${n1.length > 1 ? "s" : ""} seleccionado${n1.length > 1 ? "s" : ""}`;
|
|
22628
22657
|
case "text":
|
|
22629
|
-
return
|
|
22658
|
+
return n1.map((F) => F == null ? void 0 : F[M]).filter(Boolean).join(", ");
|
|
22630
22659
|
case "tags":
|
|
22631
22660
|
default:
|
|
22632
22661
|
return "";
|
|
22633
22662
|
}
|
|
22634
22663
|
} else {
|
|
22635
|
-
const
|
|
22636
|
-
return
|
|
22664
|
+
const F = n1[0];
|
|
22665
|
+
return F ? F[j] === -1 || F[M] === -1 || F[M] === "-1" ? f : F[M] || "" : "";
|
|
22637
22666
|
}
|
|
22638
22667
|
}, k0 = () => {
|
|
22639
|
-
if (!U || !
|
|
22640
|
-
const
|
|
22641
|
-
i0(
|
|
22668
|
+
if (!U || !s1.top) return null;
|
|
22669
|
+
const F = H ? "animate-dropdown-exit" : "animate-dropdown-enter", a1 = (Q, P1) => {
|
|
22670
|
+
i0(Q, P1), Q.icon && b(Q.icon), Q.iconColor && Z(Q.iconColor);
|
|
22642
22671
|
}, j1 = /* @__PURE__ */ u(
|
|
22643
22672
|
"div",
|
|
22644
22673
|
{
|
|
22645
|
-
ref:
|
|
22646
|
-
id:
|
|
22647
|
-
"data-dropdown-id":
|
|
22674
|
+
ref: m1,
|
|
22675
|
+
id: M1,
|
|
22676
|
+
"data-dropdown-id": M1,
|
|
22648
22677
|
style: {
|
|
22649
|
-
position:
|
|
22650
|
-
top:
|
|
22651
|
-
left:
|
|
22652
|
-
width:
|
|
22653
|
-
zIndex:
|
|
22678
|
+
position: s1.position,
|
|
22679
|
+
top: s1.top,
|
|
22680
|
+
left: s1.left,
|
|
22681
|
+
width: s1.width,
|
|
22682
|
+
zIndex: s1.zIndex
|
|
22654
22683
|
},
|
|
22655
|
-
className: `py-2 ui-min-w-fit ui-overflow-hidden ui-rounded-sm ui-border ui-border-neutral-200 ui-bg-white ui-shadow-lg ${
|
|
22656
|
-
onClick: (
|
|
22684
|
+
className: `py-2 ui-min-w-fit ui-overflow-hidden ui-rounded-sm ui-border ui-border-neutral-200 ui-bg-white ui-shadow-lg ${F}`,
|
|
22685
|
+
onClick: (Q) => Q.stopPropagation(),
|
|
22657
22686
|
children: [
|
|
22658
|
-
/* @__PURE__ */ i("div", { children:
|
|
22687
|
+
/* @__PURE__ */ i("div", { children: I && /* @__PURE__ */ i("div", { className: "ui-p-2", onClick: (Q) => Q.stopPropagation(), children: /* @__PURE__ */ i(
|
|
22659
22688
|
T1,
|
|
22660
22689
|
{
|
|
22661
22690
|
value: P,
|
|
@@ -22667,42 +22696,42 @@ const i3 = E1(
|
|
|
22667
22696
|
size: "sm"
|
|
22668
22697
|
}
|
|
22669
22698
|
) }) }),
|
|
22670
|
-
|
|
22671
|
-
/* @__PURE__ */ i("div", { className: "no-scrollbar ui-max-h-[200px] ui-overflow-y-auto ui-py-2", children: p1.length > 0 ? p1.map((
|
|
22672
|
-
const P1 = y ?
|
|
22673
|
-
(
|
|
22674
|
-
) :
|
|
22675
|
-
return
|
|
22699
|
+
I && /* @__PURE__ */ i(J1, {}),
|
|
22700
|
+
/* @__PURE__ */ i("div", { className: "no-scrollbar ui-max-h-[200px] ui-overflow-y-auto ui-py-2", children: p1.length > 0 ? p1.map((Q) => {
|
|
22701
|
+
const P1 = y ? n1.some(
|
|
22702
|
+
(y1) => y1 && y1[M] === Q[M]
|
|
22703
|
+
) : Q[j] === -1 && (o1 === -1 || o1 === "-1") || Q[M] === o1;
|
|
22704
|
+
return k ? /* @__PURE__ */ i(
|
|
22676
22705
|
b0,
|
|
22677
22706
|
{
|
|
22678
|
-
disabled:
|
|
22707
|
+
disabled: Q.disabled,
|
|
22679
22708
|
current: P1 ? "blue" : !1,
|
|
22680
|
-
"data-option-value":
|
|
22681
|
-
icon:
|
|
22682
|
-
iconColor:
|
|
22709
|
+
"data-option-value": Q[M],
|
|
22710
|
+
icon: Q.icon,
|
|
22711
|
+
iconColor: Q.iconColor,
|
|
22683
22712
|
checkboxProps: {
|
|
22684
|
-
checked:
|
|
22685
|
-
onChange: (
|
|
22686
|
-
disabled:
|
|
22713
|
+
checked: Q.checked || !1,
|
|
22714
|
+
onChange: (y1) => V == null ? void 0 : V(Q, y1),
|
|
22715
|
+
disabled: Q.disabled
|
|
22687
22716
|
},
|
|
22688
|
-
children:
|
|
22717
|
+
children: Q[M]
|
|
22689
22718
|
},
|
|
22690
|
-
|
|
22719
|
+
Q[j] || Q[M]
|
|
22691
22720
|
) : /* @__PURE__ */ i(
|
|
22692
22721
|
x0,
|
|
22693
22722
|
{
|
|
22694
|
-
onClick: (
|
|
22695
|
-
disabled:
|
|
22723
|
+
onClick: (y1) => a1(Q, y1),
|
|
22724
|
+
disabled: Q.disabled,
|
|
22696
22725
|
current: P1 ? "blue" : !1,
|
|
22697
|
-
"data-option-value":
|
|
22698
|
-
icon:
|
|
22699
|
-
iconColor:
|
|
22700
|
-
children:
|
|
22726
|
+
"data-option-value": Q[M],
|
|
22727
|
+
icon: Q.icon,
|
|
22728
|
+
iconColor: Q.iconColor,
|
|
22729
|
+
children: Q[M]
|
|
22701
22730
|
},
|
|
22702
|
-
|
|
22731
|
+
Q[j] || Q[M]
|
|
22703
22732
|
);
|
|
22704
22733
|
}) : P ? /* @__PURE__ */ u("div", { className: "ui-mx-auto ui-max-w-[300px] ui-break-words ui-px-3 ui-py-2 ui-text-center ui-text-sm ui-text-neutral-500", children: [
|
|
22705
|
-
/* @__PURE__ */ i("div", { children: /* @__PURE__ */ i(
|
|
22734
|
+
/* @__PURE__ */ i("div", { children: /* @__PURE__ */ i(b1, { name: "SearchOutlined", size: "5xl", color: "neutral" }) }),
|
|
22706
22735
|
/* @__PURE__ */ u("p", { className: "ui-font-semibold ui-text-neutral-800", children: [
|
|
22707
22736
|
L,
|
|
22708
22737
|
' "',
|
|
@@ -22711,7 +22740,7 @@ const i3 = E1(
|
|
|
22711
22740
|
] }),
|
|
22712
22741
|
/* @__PURE__ */ i("p", { className: "ui-mt-2 ui-text-xs ui-text-neutral-500", children: p })
|
|
22713
22742
|
] }) : /* @__PURE__ */ i("div", { className: "ui-px-3 ui-text-center ui-text-sm ui-text-neutral-500", children: "Sin opciones" }) }),
|
|
22714
|
-
X && /* @__PURE__ */ u(
|
|
22743
|
+
X && /* @__PURE__ */ u(k1, { children: [
|
|
22715
22744
|
/* @__PURE__ */ i(J1, {}),
|
|
22716
22745
|
/* @__PURE__ */ u("div", { className: "ui-flex ui-min-w-[200px] ui-gap-x-2 ui-px-4 ui-py-2", children: [
|
|
22717
22746
|
/* @__PURE__ */ i(
|
|
@@ -22726,47 +22755,47 @@ const i3 = E1(
|
|
|
22726
22755
|
children: "Limpiar"
|
|
22727
22756
|
}
|
|
22728
22757
|
),
|
|
22729
|
-
/* @__PURE__ */ i(H1, { color: "blue", size: "sm", fullWidth: !0, onClick: () =>
|
|
22758
|
+
/* @__PURE__ */ i(H1, { color: "blue", size: "sm", fullWidth: !0, onClick: () => I1(), children: "OK" })
|
|
22730
22759
|
] })
|
|
22731
22760
|
] })
|
|
22732
22761
|
]
|
|
22733
22762
|
}
|
|
22734
22763
|
);
|
|
22735
|
-
return G ? j1 :
|
|
22764
|
+
return G ? j1 : Z1(j1, document.body);
|
|
22736
22765
|
};
|
|
22737
|
-
return
|
|
22766
|
+
return W(() => {
|
|
22738
22767
|
c && b(c);
|
|
22739
22768
|
}, [c]), /* @__PURE__ */ u(
|
|
22740
22769
|
"div",
|
|
22741
22770
|
{
|
|
22742
|
-
ref:
|
|
22771
|
+
ref: S1,
|
|
22743
22772
|
className: "ui-relative ui-w-full",
|
|
22744
|
-
"data-dropdown-container-id":
|
|
22773
|
+
"data-dropdown-container-id": M1,
|
|
22745
22774
|
children: [
|
|
22746
|
-
y &&
|
|
22775
|
+
y && $ === "tags" ? /* @__PURE__ */ i(
|
|
22747
22776
|
C3,
|
|
22748
22777
|
{
|
|
22749
22778
|
label: r,
|
|
22750
|
-
placeholder:
|
|
22751
|
-
selectedOptions:
|
|
22779
|
+
placeholder: f,
|
|
22780
|
+
selectedOptions: n1,
|
|
22752
22781
|
handleRemoveSelected: o0,
|
|
22753
|
-
toggleDropdown:
|
|
22782
|
+
toggleDropdown: L1,
|
|
22754
22783
|
isOpen: U,
|
|
22755
22784
|
isOpening: T,
|
|
22756
|
-
setIsOpening:
|
|
22785
|
+
setIsOpening: E,
|
|
22757
22786
|
customInputRef: A,
|
|
22758
22787
|
disabled: g,
|
|
22759
22788
|
error: t,
|
|
22760
22789
|
helperText: n || "",
|
|
22761
22790
|
rightSlot: d,
|
|
22762
|
-
valueName:
|
|
22791
|
+
valueName: M
|
|
22763
22792
|
}
|
|
22764
22793
|
) : (
|
|
22765
22794
|
// Input normal para otros modos
|
|
22766
22795
|
/* @__PURE__ */ i(
|
|
22767
22796
|
T1,
|
|
22768
22797
|
{
|
|
22769
|
-
ref:
|
|
22798
|
+
ref: u1,
|
|
22770
22799
|
label: r,
|
|
22771
22800
|
error: t,
|
|
22772
22801
|
helperText: n,
|
|
@@ -22778,27 +22807,27 @@ const i3 = E1(
|
|
|
22778
22807
|
fullWidth: !0,
|
|
22779
22808
|
caret: l,
|
|
22780
22809
|
disabled: g,
|
|
22781
|
-
placeholder:
|
|
22810
|
+
placeholder: f,
|
|
22782
22811
|
value: Z0(),
|
|
22783
22812
|
readOnly: !0,
|
|
22784
|
-
onClick: (
|
|
22785
|
-
onClickExtraSlot: () =>
|
|
22813
|
+
onClick: (F) => L1(F),
|
|
22814
|
+
onClickExtraSlot: () => L1(),
|
|
22786
22815
|
extraSlot: U ? "ChevronUp1Outlined" : "ChevronDown1Outlined",
|
|
22787
22816
|
name: o,
|
|
22788
22817
|
autosize: !0,
|
|
22789
|
-
|
|
22818
|
+
...z
|
|
22790
22819
|
}
|
|
22791
22820
|
)
|
|
22792
22821
|
),
|
|
22793
|
-
y &&
|
|
22822
|
+
y && $ !== "tags" && n1.length > 0 && /* @__PURE__ */ i("div", { className: "ui-mt-2 ui-flex ui-flex-wrap ui-gap-2", children: n1.map((F) => F ? /* @__PURE__ */ i(
|
|
22794
22823
|
j0,
|
|
22795
22824
|
{
|
|
22796
|
-
label:
|
|
22825
|
+
label: F[M],
|
|
22797
22826
|
color: "blue",
|
|
22798
22827
|
size: "sm",
|
|
22799
|
-
onClick: () => o0(
|
|
22828
|
+
onClick: () => o0(F[M])
|
|
22800
22829
|
},
|
|
22801
|
-
|
|
22830
|
+
F[M]
|
|
22802
22831
|
) : null) }),
|
|
22803
22832
|
k0()
|
|
22804
22833
|
]
|
|
@@ -22811,7 +22840,7 @@ const L3 = {
|
|
|
22811
22840
|
sm: "3xl",
|
|
22812
22841
|
md: "4xl",
|
|
22813
22842
|
lg: "5xl"
|
|
22814
|
-
}, p5 = ({ size: o = "md" }) => /* @__PURE__ */ i(
|
|
22843
|
+
}, p5 = ({ size: o = "md" }) => /* @__PURE__ */ i(b1, { name: "LogoFill", size: L3[o] }), w3 = ({
|
|
22815
22844
|
isOpen: o,
|
|
22816
22845
|
onClose: r,
|
|
22817
22846
|
disableEscapeClose: t = !1,
|
|
@@ -22841,16 +22870,16 @@ const L3 = {
|
|
|
22841
22870
|
closeAtCorner: C = !0,
|
|
22842
22871
|
title: w,
|
|
22843
22872
|
tabs: g,
|
|
22844
|
-
defaultValueTab:
|
|
22873
|
+
defaultValueTab: f,
|
|
22845
22874
|
onChangeTab: x,
|
|
22846
|
-
headerButtonIcon:
|
|
22875
|
+
headerButtonIcon: M,
|
|
22847
22876
|
headerButtonOnClick: j,
|
|
22848
22877
|
footerButtonIcon: h,
|
|
22849
22878
|
footerButtonOnClick: v,
|
|
22850
22879
|
cancelButtonSlotLeft: V,
|
|
22851
|
-
successButtonSlotRight:
|
|
22880
|
+
successButtonSlotRight: I
|
|
22852
22881
|
}) => {
|
|
22853
|
-
const
|
|
22882
|
+
const S = {
|
|
22854
22883
|
onClose: r,
|
|
22855
22884
|
showCloseButton: l,
|
|
22856
22885
|
closeAtCorner: C,
|
|
@@ -22865,16 +22894,16 @@ const L3 = {
|
|
|
22865
22894
|
title: w,
|
|
22866
22895
|
icon: n,
|
|
22867
22896
|
tabs: g,
|
|
22868
|
-
defaultValueTab:
|
|
22897
|
+
defaultValueTab: f,
|
|
22869
22898
|
onChangeTab: x,
|
|
22870
|
-
headerButtonIcon:
|
|
22899
|
+
headerButtonIcon: M,
|
|
22871
22900
|
headerButtonOnClick: j,
|
|
22872
22901
|
footerButtonIcon: h,
|
|
22873
22902
|
footerButtonOnClick: v,
|
|
22874
22903
|
cancelButtonSlotLeft: V,
|
|
22875
|
-
successButtonSlotRight:
|
|
22904
|
+
successButtonSlotRight: I
|
|
22876
22905
|
};
|
|
22877
|
-
return /* @__PURE__ */ i(H0.Provider, { value:
|
|
22906
|
+
return /* @__PURE__ */ i(H0.Provider, { value: S, children: o });
|
|
22878
22907
|
}, O0 = () => {
|
|
22879
22908
|
const o = B0(H0);
|
|
22880
22909
|
if (!o)
|
|
@@ -22908,8 +22937,8 @@ const L3 = {
|
|
|
22908
22937
|
}), [d, s] = K(r || ((l = o[0]) == null ? void 0 : l.value) || ""), L = (C) => {
|
|
22909
22938
|
d !== C && (s(C), t && t(C));
|
|
22910
22939
|
}, p = c({ size: n, fullWidth: a });
|
|
22911
|
-
return /* @__PURE__ */ i("div", { className:
|
|
22912
|
-
|
|
22940
|
+
return /* @__PURE__ */ i("div", { className: q("ui-relative ui-flex ui-rounded-md ui-bg-neutral-50", p), children: o.map((C) => /* @__PURE__ */ i(
|
|
22941
|
+
r1,
|
|
22913
22942
|
{
|
|
22914
22943
|
size: n,
|
|
22915
22944
|
colorIcon: e,
|
|
@@ -22944,28 +22973,28 @@ const L3 = {
|
|
|
22944
22973
|
defaultValueTab: C,
|
|
22945
22974
|
onChangeTab: w,
|
|
22946
22975
|
headerButtonIcon: g,
|
|
22947
|
-
headerButtonOnClick:
|
|
22948
|
-
} = O0(), x = r ?? L,
|
|
22976
|
+
headerButtonOnClick: f
|
|
22977
|
+
} = O0(), x = r ?? L, M = c ?? g, j = d ?? f, h = (n == null ? void 0 : n.length) > 0 ? n : l, v = (h == null ? void 0 : h.length) ?? !1, V = a ?? w, I = e ?? C, S = (R) => {
|
|
22949
22978
|
V && V(R);
|
|
22950
22979
|
};
|
|
22951
22980
|
return /* @__PURE__ */ u("div", { className: "ui-relative ui-flex ui-flex-wrap ui-items-center ui-justify-between ui-gap-x-md ui-border-b ui-border-neutral-100 ui-p-4", children: [
|
|
22952
|
-
p && /* @__PURE__ */ i("div", { className: "ui-flex ui-h-8 ui-w-8 ui-items-center ui-justify-center ui-gap-2 ui-rounded-full ui-bg-blue-50 ui-text-blue-500", children: /* @__PURE__ */ i(
|
|
22981
|
+
p && /* @__PURE__ */ i("div", { className: "ui-flex ui-h-8 ui-w-8 ui-items-center ui-justify-center ui-gap-2 ui-rounded-full ui-bg-blue-50 ui-text-blue-500", children: /* @__PURE__ */ i(x1, { slot: p, size: "lg" }) }),
|
|
22953
22982
|
/* @__PURE__ */ i("div", { className: "ui-flex-1", children: t ? /* @__PURE__ */ i("h2", { className: "ui-text-2xl ui-font-semibold", children: t }) : o }),
|
|
22954
22983
|
/* @__PURE__ */ u("div", { className: "ui-z-10 ui-flex ui-items-center ui-gap-2", children: [
|
|
22955
22984
|
j && /* @__PURE__ */ i(
|
|
22956
|
-
|
|
22985
|
+
r1,
|
|
22957
22986
|
{
|
|
22958
22987
|
onClick: j,
|
|
22959
22988
|
"aria-label": "Header button",
|
|
22960
22989
|
variant: "outlined",
|
|
22961
22990
|
rounded: !0,
|
|
22962
22991
|
color: "white",
|
|
22963
|
-
icon:
|
|
22992
|
+
icon: M ?? "AlignJustifyOutlined",
|
|
22964
22993
|
size: "lg"
|
|
22965
22994
|
}
|
|
22966
22995
|
),
|
|
22967
22996
|
x && /* @__PURE__ */ i(
|
|
22968
|
-
|
|
22997
|
+
r1,
|
|
22969
22998
|
{
|
|
22970
22999
|
onClick: s,
|
|
22971
23000
|
"aria-label": "Cerrar modal",
|
|
@@ -22981,17 +23010,17 @@ const L3 = {
|
|
|
22981
23010
|
g3,
|
|
22982
23011
|
{
|
|
22983
23012
|
options: h ?? [],
|
|
22984
|
-
defaultValue:
|
|
23013
|
+
defaultValue: I,
|
|
22985
23014
|
size: "sm",
|
|
22986
23015
|
onChange: (R) => {
|
|
22987
|
-
|
|
23016
|
+
S(R);
|
|
22988
23017
|
}
|
|
22989
23018
|
}
|
|
22990
23019
|
) }) : null
|
|
22991
23020
|
] });
|
|
22992
23021
|
};
|
|
22993
23022
|
R1.displayName = "Modal.Header";
|
|
22994
|
-
const f3 = ({ children: o, withPadding: r = !0 }) => /* @__PURE__ */ i("div", { className:
|
|
23023
|
+
const f3 = ({ children: o, withPadding: r = !0 }) => /* @__PURE__ */ i("div", { className: q(r && "ui-p-4"), children: o }), n0 = ({
|
|
22995
23024
|
children: o,
|
|
22996
23025
|
footerButtonIcon: r,
|
|
22997
23026
|
footerButtonOnClick: t,
|
|
@@ -23009,21 +23038,21 @@ const f3 = ({ children: o, withPadding: r = !0 }) => /* @__PURE__ */ i("div", {
|
|
|
23009
23038
|
closeAtSuccess: C,
|
|
23010
23039
|
closeAtCancel: w,
|
|
23011
23040
|
footerButtonIcon: g,
|
|
23012
|
-
footerButtonOnClick:
|
|
23041
|
+
footerButtonOnClick: f,
|
|
23013
23042
|
cancelButtonSlotLeft: x,
|
|
23014
|
-
successButtonSlotRight:
|
|
23043
|
+
successButtonSlotRight: M
|
|
23015
23044
|
} = O0(), j = () => {
|
|
23016
23045
|
s && s(), w && a();
|
|
23017
23046
|
}, h = () => {
|
|
23018
23047
|
L && L(), C && a();
|
|
23019
|
-
}, v = r ?? g, V = t ??
|
|
23048
|
+
}, v = r ?? g, V = t ?? f;
|
|
23020
23049
|
return /* @__PURE__ */ u(
|
|
23021
23050
|
"div",
|
|
23022
23051
|
{
|
|
23023
23052
|
className: `ui-flex ui-border-t ui-border-neutral-100 ui-p-4 ${V ? "ui-justify-between" : "ui-justify-end"} ui-items-center ui-gap-2`,
|
|
23024
23053
|
children: [
|
|
23025
23054
|
V && /* @__PURE__ */ i(
|
|
23026
|
-
|
|
23055
|
+
r1,
|
|
23027
23056
|
{
|
|
23028
23057
|
"aria-label": "Header button",
|
|
23029
23058
|
variant: "outlined",
|
|
@@ -23036,7 +23065,7 @@ const f3 = ({ children: o, withPadding: r = !0 }) => /* @__PURE__ */ i("div", {
|
|
|
23036
23065
|
),
|
|
23037
23066
|
o || /* @__PURE__ */ u("div", { className: "ui-flex ui-gap-2", children: [
|
|
23038
23067
|
p && /* @__PURE__ */ i(
|
|
23039
|
-
|
|
23068
|
+
r1,
|
|
23040
23069
|
{
|
|
23041
23070
|
slotLeft: n ?? x,
|
|
23042
23071
|
color: "white",
|
|
@@ -23046,9 +23075,9 @@ const f3 = ({ children: o, withPadding: r = !0 }) => /* @__PURE__ */ i("div", {
|
|
|
23046
23075
|
}
|
|
23047
23076
|
),
|
|
23048
23077
|
l && /* @__PURE__ */ i(
|
|
23049
|
-
|
|
23078
|
+
r1,
|
|
23050
23079
|
{
|
|
23051
|
-
slotLeft: e ??
|
|
23080
|
+
slotLeft: e ?? M,
|
|
23052
23081
|
onClick: h,
|
|
23053
23082
|
children: d
|
|
23054
23083
|
}
|
|
@@ -23069,7 +23098,7 @@ const f3 = ({ children: o, withPadding: r = !0 }) => /* @__PURE__ */ i("div", {
|
|
|
23069
23098
|
children: o,
|
|
23070
23099
|
component: r,
|
|
23071
23100
|
componentName: t
|
|
23072
|
-
}) =>
|
|
23101
|
+
}) => f1.Children.toArray(o).some((n) => f1.isValidElement(n) ? n.type === r || n.type.displayName === t || n.type.name === t ? !0 : n.type === f1.Fragment || n.props.children ? e0({ children: n.props.children, component: r, componentName: t }) : !1 : !1), x3 = ({
|
|
23073
23102
|
isOpen: o,
|
|
23074
23103
|
onClose: r,
|
|
23075
23104
|
icon: t,
|
|
@@ -23085,29 +23114,29 @@ const f3 = ({ children: o, withPadding: r = !0 }) => /* @__PURE__ */ i("div", {
|
|
|
23085
23114
|
onCancel: C,
|
|
23086
23115
|
onSuccess: w,
|
|
23087
23116
|
title: g,
|
|
23088
|
-
showCancelButton:
|
|
23117
|
+
showCancelButton: f,
|
|
23089
23118
|
showSuccessButton: x,
|
|
23090
|
-
closeAtSuccess:
|
|
23119
|
+
closeAtSuccess: M,
|
|
23091
23120
|
closeAtCancel: j,
|
|
23092
23121
|
tabs: h,
|
|
23093
23122
|
defaultValueTab: v,
|
|
23094
23123
|
onChangeTab: V,
|
|
23095
|
-
headerButtonIcon:
|
|
23096
|
-
headerButtonOnClick:
|
|
23124
|
+
headerButtonIcon: I,
|
|
23125
|
+
headerButtonOnClick: S,
|
|
23097
23126
|
footerButtonIcon: R,
|
|
23098
|
-
footerButtonOnClick:
|
|
23127
|
+
footerButtonOnClick: D,
|
|
23099
23128
|
cancelButtonSlotLeft: y,
|
|
23100
23129
|
successButtonSlotRight: J
|
|
23101
23130
|
}) => {
|
|
23102
|
-
const { isVisible:
|
|
23131
|
+
const { isVisible: $, animateIn: G, container: X, modalRef: B } = w3({
|
|
23103
23132
|
isOpen: o,
|
|
23104
23133
|
onClose: r,
|
|
23105
23134
|
disableEscapeClose: c,
|
|
23106
23135
|
disableOutsideTab: d,
|
|
23107
23136
|
disableOutsideClick: s
|
|
23108
23137
|
});
|
|
23109
|
-
if (!X || !o &&
|
|
23110
|
-
const
|
|
23138
|
+
if (!X || !o && !$) return null;
|
|
23139
|
+
const k = m3(e), z = v3(e), Y = /* @__PURE__ */ u(
|
|
23111
23140
|
"div",
|
|
23112
23141
|
{
|
|
23113
23142
|
"aria-modal": "true",
|
|
@@ -23118,7 +23147,7 @@ const f3 = ({ children: o, withPadding: r = !0 }) => /* @__PURE__ */ i("div", {
|
|
|
23118
23147
|
/* @__PURE__ */ i(
|
|
23119
23148
|
"div",
|
|
23120
23149
|
{
|
|
23121
|
-
className:
|
|
23150
|
+
className: q(
|
|
23122
23151
|
"ui-fixed ui-inset-0 ui-bg-black ui-backdrop-blur-sm ui-transition-opacity ui-duration-200",
|
|
23123
23152
|
G ? "ui-opacity-40" : "ui-opacity-0"
|
|
23124
23153
|
),
|
|
@@ -23128,9 +23157,9 @@ const f3 = ({ children: o, withPadding: r = !0 }) => /* @__PURE__ */ i("div", {
|
|
|
23128
23157
|
/* @__PURE__ */ i("div", { className: "ui-flex ui-min-h-full ui-items-start ui-justify-center ui-px-4 ui-py-8", children: /* @__PURE__ */ i(
|
|
23129
23158
|
"div",
|
|
23130
23159
|
{
|
|
23131
|
-
ref:
|
|
23160
|
+
ref: B,
|
|
23132
23161
|
tabIndex: -1,
|
|
23133
|
-
className:
|
|
23162
|
+
className: q(
|
|
23134
23163
|
"ui-relative ui-z-10 ui-my-auto ui-flex ui-w-full ui-transform ui-flex-col ui-rounded-lg ui-bg-white ui-shadow-md ui-outline-none ui-transition-all ui-duration-200",
|
|
23135
23164
|
M3[n],
|
|
23136
23165
|
G ? "ui-translate-y-0 ui-scale-100 ui-opacity-100" : "ui-translate-y-4 ui-scale-95 ui-opacity-0"
|
|
@@ -23147,25 +23176,25 @@ const f3 = ({ children: o, withPadding: r = !0 }) => /* @__PURE__ */ i("div", {
|
|
|
23147
23176
|
successButtonText: l,
|
|
23148
23177
|
onCancel: C,
|
|
23149
23178
|
onSuccess: w,
|
|
23150
|
-
showCancelButton:
|
|
23179
|
+
showCancelButton: f,
|
|
23151
23180
|
showSuccessButton: x,
|
|
23152
|
-
closeAtSuccess:
|
|
23181
|
+
closeAtSuccess: M,
|
|
23153
23182
|
closeAtCancel: j,
|
|
23154
23183
|
title: g,
|
|
23155
23184
|
icon: t,
|
|
23156
|
-
headerButtonIcon:
|
|
23157
|
-
headerButtonOnClick:
|
|
23185
|
+
headerButtonIcon: I,
|
|
23186
|
+
headerButtonOnClick: S,
|
|
23158
23187
|
footerButtonIcon: R,
|
|
23159
|
-
footerButtonOnClick:
|
|
23188
|
+
footerButtonOnClick: D,
|
|
23160
23189
|
tabs: h,
|
|
23161
23190
|
defaultValueTab: v,
|
|
23162
23191
|
onChangeTab: V,
|
|
23163
23192
|
cancelButtonSlotLeft: y,
|
|
23164
23193
|
successButtonSlotRight: J,
|
|
23165
23194
|
children: [
|
|
23166
|
-
!
|
|
23195
|
+
!k && (a || g ? /* @__PURE__ */ i(R1, { title: g }) : null),
|
|
23167
23196
|
e && e,
|
|
23168
|
-
|
|
23197
|
+
!z && /* @__PURE__ */ i(n0, {})
|
|
23169
23198
|
]
|
|
23170
23199
|
}
|
|
23171
23200
|
)
|
|
@@ -23174,7 +23203,7 @@ const f3 = ({ children: o, withPadding: r = !0 }) => /* @__PURE__ */ i("div", {
|
|
|
23174
23203
|
]
|
|
23175
23204
|
}
|
|
23176
23205
|
);
|
|
23177
|
-
return d0.createPortal(
|
|
23206
|
+
return d0.createPortal(Y, X);
|
|
23178
23207
|
}, C5 = Object.assign(x3, {
|
|
23179
23208
|
Header: R1,
|
|
23180
23209
|
Body: f3,
|
|
@@ -23197,100 +23226,100 @@ const f3 = ({ children: o, withPadding: r = !0 }) => /* @__PURE__ */ i("div", {
|
|
|
23197
23226
|
disabled: d = !1,
|
|
23198
23227
|
absolute: s = !1
|
|
23199
23228
|
}) => {
|
|
23200
|
-
const L = l0(), p = e || `popup-${L}`, [l, C] = K(!1), [w, g] = K({}), [
|
|
23201
|
-
const
|
|
23202
|
-
if (!
|
|
23203
|
-
const
|
|
23229
|
+
const L = l0(), p = e || `popup-${L}`, [l, C] = K(!1), [w, g] = K({}), [f, x] = K(!1), M = t1(null), j = t1(null), h = t1(null), v = N(() => {
|
|
23230
|
+
const S = M.current, R = j.current;
|
|
23231
|
+
if (!S || !R) return;
|
|
23232
|
+
const D = S.getBoundingClientRect(), y = R.getBoundingClientRect();
|
|
23204
23233
|
if (y.width === 0 || y.height === 0)
|
|
23205
23234
|
return;
|
|
23206
|
-
let J = 0,
|
|
23235
|
+
let J = 0, $ = 0;
|
|
23207
23236
|
if (s) {
|
|
23208
|
-
const
|
|
23237
|
+
const z = S.offsetTop, Y = S.offsetLeft, A = S.offsetWidth, m = S.offsetHeight;
|
|
23209
23238
|
switch (o) {
|
|
23210
23239
|
case "top":
|
|
23211
|
-
J =
|
|
23240
|
+
J = z - y.height - r, $ = Y + (A - y.width) / 2;
|
|
23212
23241
|
break;
|
|
23213
23242
|
case "bottom":
|
|
23214
23243
|
case "bottom-center":
|
|
23215
|
-
J =
|
|
23244
|
+
J = z + m + r, $ = Y + (A - y.width) / 2;
|
|
23216
23245
|
break;
|
|
23217
23246
|
case "bottom-left":
|
|
23218
|
-
J =
|
|
23247
|
+
J = z + m + r, $ = Y;
|
|
23219
23248
|
break;
|
|
23220
23249
|
case "bottom-right":
|
|
23221
|
-
J =
|
|
23250
|
+
J = z + m + r, $ = Y + A - y.width;
|
|
23222
23251
|
break;
|
|
23223
23252
|
case "left":
|
|
23224
|
-
J =
|
|
23253
|
+
J = z, $ = Y - y.width - r;
|
|
23225
23254
|
break;
|
|
23226
23255
|
case "right":
|
|
23227
|
-
J =
|
|
23256
|
+
J = z, $ = Y + A + r;
|
|
23228
23257
|
break;
|
|
23229
23258
|
}
|
|
23230
23259
|
} else {
|
|
23231
|
-
const
|
|
23260
|
+
const z = window.innerWidth, Y = window.innerHeight, A = D.top, m = D.left, b = D.width, O = D.height;
|
|
23232
23261
|
switch (o) {
|
|
23233
23262
|
case "top":
|
|
23234
|
-
J = A - y.height - r,
|
|
23263
|
+
J = A - y.height - r, $ = m + (b - y.width) / 2;
|
|
23235
23264
|
break;
|
|
23236
23265
|
case "bottom":
|
|
23237
23266
|
case "bottom-center":
|
|
23238
|
-
J = A + O + r,
|
|
23267
|
+
J = A + O + r, $ = m + (b - y.width) / 2;
|
|
23239
23268
|
break;
|
|
23240
23269
|
case "bottom-left":
|
|
23241
|
-
J = A + O + r,
|
|
23270
|
+
J = A + O + r, $ = m;
|
|
23242
23271
|
break;
|
|
23243
23272
|
case "bottom-right":
|
|
23244
|
-
J = A + O + r,
|
|
23273
|
+
J = A + O + r, $ = m + b - y.width;
|
|
23245
23274
|
break;
|
|
23246
23275
|
case "left":
|
|
23247
|
-
J = A,
|
|
23276
|
+
J = A, $ = m - y.width - r;
|
|
23248
23277
|
break;
|
|
23249
23278
|
case "right":
|
|
23250
|
-
J = A,
|
|
23279
|
+
J = A, $ = m + b + r;
|
|
23251
23280
|
break;
|
|
23252
23281
|
}
|
|
23253
|
-
|
|
23282
|
+
$ < 0 && ($ = 0), $ + y.width > z && ($ = z - y.width), J < 0 && (J = 0), J + y.height > Y && (J = Y - y.height), o === "bottom-right" && y.width > D.width && ($ = D.right - y.width, $ < 0 && ($ = 0));
|
|
23254
23283
|
}
|
|
23255
|
-
const G = 1e3, X = parseInt(p.replace(/\D/g, "")) || 0,
|
|
23284
|
+
const G = 1e3, X = parseInt(p.replace(/\D/g, "")) || 0, B = G + X % 100, k = {
|
|
23256
23285
|
position: s ? "absolute" : "fixed",
|
|
23257
23286
|
top: `${J}px`,
|
|
23258
|
-
left: `${
|
|
23259
|
-
zIndex:
|
|
23287
|
+
left: `${$}px`,
|
|
23288
|
+
zIndex: B
|
|
23260
23289
|
};
|
|
23261
|
-
g(
|
|
23262
|
-
}, [o, r, p, s]), V = (
|
|
23263
|
-
|
|
23264
|
-
},
|
|
23290
|
+
g(k), x(!0);
|
|
23291
|
+
}, [o, r, p, s]), V = (S) => {
|
|
23292
|
+
S && S.stopPropagation(), !d && (l ? I() : (b3(p), g({}), x(!1), C(!0), X1.add(p), a == null || a()));
|
|
23293
|
+
}, I = () => {
|
|
23265
23294
|
C(!1), x(!1), X1.delete(p), c == null || c();
|
|
23266
23295
|
};
|
|
23267
|
-
return
|
|
23296
|
+
return W(() => {
|
|
23268
23297
|
if (l) {
|
|
23269
|
-
const
|
|
23298
|
+
const S = () => {
|
|
23270
23299
|
const R = j.current;
|
|
23271
23300
|
if (R) {
|
|
23272
|
-
const
|
|
23273
|
-
|
|
23274
|
-
requestAnimationFrame(
|
|
23301
|
+
const D = R.getBoundingClientRect();
|
|
23302
|
+
D.width > 0 && D.height > 0 && D.width !== 0 && D.height !== 0 ? v() : setTimeout(() => {
|
|
23303
|
+
requestAnimationFrame(S);
|
|
23275
23304
|
}, 10);
|
|
23276
23305
|
}
|
|
23277
23306
|
};
|
|
23278
23307
|
setTimeout(() => {
|
|
23279
|
-
requestAnimationFrame(
|
|
23308
|
+
requestAnimationFrame(S);
|
|
23280
23309
|
}, 0);
|
|
23281
23310
|
}
|
|
23282
|
-
}, [l, v]),
|
|
23283
|
-
if (!l || !
|
|
23284
|
-
let
|
|
23311
|
+
}, [l, v]), W(() => {
|
|
23312
|
+
if (!l || !f || s) return;
|
|
23313
|
+
let S = !1;
|
|
23285
23314
|
const R = () => {
|
|
23286
|
-
|
|
23287
|
-
v(),
|
|
23288
|
-
}),
|
|
23315
|
+
S || (requestAnimationFrame(() => {
|
|
23316
|
+
v(), S = !1;
|
|
23317
|
+
}), S = !0);
|
|
23289
23318
|
};
|
|
23290
23319
|
return window.addEventListener("scroll", R, { passive: !0 }), window.addEventListener("resize", R, { passive: !0 }), () => {
|
|
23291
23320
|
window.removeEventListener("scroll", R), window.removeEventListener("resize", R);
|
|
23292
23321
|
};
|
|
23293
|
-
}, [l,
|
|
23322
|
+
}, [l, f, s, v]), v0({
|
|
23294
23323
|
isActive: l,
|
|
23295
23324
|
disabled: d,
|
|
23296
23325
|
elementRef: j,
|
|
@@ -23298,17 +23327,17 @@ const f3 = ({ children: o, withPadding: r = !0 }) => /* @__PURE__ */ i("div", {
|
|
|
23298
23327
|
elementId: p,
|
|
23299
23328
|
elementType: "popup",
|
|
23300
23329
|
closeOnClickOutside: t,
|
|
23301
|
-
onOutsideClick:
|
|
23302
|
-
}), W1(l,
|
|
23330
|
+
onOutsideClick: I
|
|
23331
|
+
}), W1(l, I, !n), {
|
|
23303
23332
|
isOpen: l,
|
|
23304
23333
|
popupStyle: w,
|
|
23305
|
-
isPositioned:
|
|
23306
|
-
triggerRef:
|
|
23334
|
+
isPositioned: f,
|
|
23335
|
+
triggerRef: M,
|
|
23307
23336
|
popupRef: j,
|
|
23308
23337
|
containerRef: h,
|
|
23309
23338
|
popupUniqueId: p,
|
|
23310
23339
|
togglePopup: V,
|
|
23311
|
-
closePopup:
|
|
23340
|
+
closePopup: I
|
|
23312
23341
|
};
|
|
23313
23342
|
}, V3 = (o) => ({
|
|
23314
23343
|
sm: "ui-rounded-sm",
|
|
@@ -23334,35 +23363,35 @@ const f3 = ({ children: o, withPadding: r = !0 }) => /* @__PURE__ */ i("div", {
|
|
|
23334
23363
|
color: C = "white",
|
|
23335
23364
|
size: w = "md",
|
|
23336
23365
|
textColor: g = "inherit",
|
|
23337
|
-
rounded:
|
|
23366
|
+
rounded: f = !1,
|
|
23338
23367
|
slotLeft: x,
|
|
23339
|
-
borderRadius:
|
|
23368
|
+
borderRadius: M = "sm",
|
|
23340
23369
|
slotRight: j,
|
|
23341
23370
|
icon: h,
|
|
23342
23371
|
colorIcon: v,
|
|
23343
23372
|
tooltip: V,
|
|
23344
|
-
tooltipPosition:
|
|
23345
|
-
tooltipAlignment:
|
|
23373
|
+
tooltipPosition: I,
|
|
23374
|
+
tooltipAlignment: S,
|
|
23346
23375
|
tooltipColor: R,
|
|
23347
|
-
tooltipDelay:
|
|
23376
|
+
tooltipDelay: D,
|
|
23348
23377
|
absolute: y = !1,
|
|
23349
23378
|
closeOnClick: J = !0,
|
|
23350
|
-
buttonClassName:
|
|
23379
|
+
buttonClassName: $,
|
|
23351
23380
|
containerClassName: G,
|
|
23352
23381
|
buttonTransition: X = !0,
|
|
23353
|
-
buttonStyle:
|
|
23354
|
-
...
|
|
23355
|
-
},
|
|
23382
|
+
buttonStyle: B,
|
|
23383
|
+
...k
|
|
23384
|
+
}, z) => {
|
|
23356
23385
|
const {
|
|
23357
|
-
isOpen:
|
|
23386
|
+
isOpen: Y,
|
|
23358
23387
|
popupStyle: A,
|
|
23359
23388
|
isPositioned: m,
|
|
23360
23389
|
triggerRef: b,
|
|
23361
23390
|
popupRef: O,
|
|
23362
|
-
containerRef:
|
|
23391
|
+
containerRef: Z,
|
|
23363
23392
|
popupUniqueId: T,
|
|
23364
|
-
togglePopup:
|
|
23365
|
-
closePopup:
|
|
23393
|
+
togglePopup: E,
|
|
23394
|
+
closePopup: i1
|
|
23366
23395
|
} = j3({
|
|
23367
23396
|
position: t,
|
|
23368
23397
|
offset: n,
|
|
@@ -23375,22 +23404,22 @@ const f3 = ({ children: o, withPadding: r = !0 }) => /* @__PURE__ */ i("div", {
|
|
|
23375
23404
|
absolute: y
|
|
23376
23405
|
});
|
|
23377
23406
|
Q1(
|
|
23378
|
-
|
|
23407
|
+
z,
|
|
23379
23408
|
() => ({
|
|
23380
23409
|
open: () => {
|
|
23381
|
-
p ||
|
|
23410
|
+
p || E();
|
|
23382
23411
|
},
|
|
23383
23412
|
close: () => {
|
|
23384
|
-
|
|
23413
|
+
i1();
|
|
23385
23414
|
},
|
|
23386
|
-
isOpen: () =>
|
|
23415
|
+
isOpen: () => Y
|
|
23387
23416
|
}),
|
|
23388
|
-
[p,
|
|
23417
|
+
[p, E, i1, Y]
|
|
23389
23418
|
);
|
|
23390
|
-
const
|
|
23391
|
-
if (!
|
|
23419
|
+
const e1 = () => {
|
|
23420
|
+
if (!Y)
|
|
23392
23421
|
return null;
|
|
23393
|
-
const
|
|
23422
|
+
const l1 = {
|
|
23394
23423
|
position: y ? "absolute" : "fixed",
|
|
23395
23424
|
top: y ? "auto" : "-9999px",
|
|
23396
23425
|
left: y ? "auto" : "-9999px",
|
|
@@ -23398,56 +23427,56 @@ const f3 = ({ children: o, withPadding: r = !0 }) => /* @__PURE__ */ i("div", {
|
|
|
23398
23427
|
opacity: m ? 1 : 0,
|
|
23399
23428
|
transition: "opacity 0.1s ease-out",
|
|
23400
23429
|
...A
|
|
23401
|
-
}, _ = V3(
|
|
23430
|
+
}, _ = V3(M), U = /* @__PURE__ */ i(
|
|
23402
23431
|
"div",
|
|
23403
23432
|
{
|
|
23404
23433
|
ref: O,
|
|
23405
23434
|
id: T,
|
|
23406
23435
|
"data-popup-id": T,
|
|
23407
|
-
style:
|
|
23436
|
+
style: l1,
|
|
23408
23437
|
className: `ui-border ui-border-neutral-100 ui-bg-white ${_} ui-overflow-hidden ui-shadow-lg ${d}`,
|
|
23409
23438
|
onClick: () => {
|
|
23410
|
-
J &&
|
|
23439
|
+
J && i1();
|
|
23411
23440
|
},
|
|
23412
|
-
...
|
|
23441
|
+
...k,
|
|
23413
23442
|
children: o
|
|
23414
23443
|
}
|
|
23415
23444
|
);
|
|
23416
|
-
return y ? U :
|
|
23445
|
+
return y ? U : Z1(U, document.body);
|
|
23417
23446
|
};
|
|
23418
23447
|
return /* @__PURE__ */ u(
|
|
23419
23448
|
"div",
|
|
23420
23449
|
{
|
|
23421
|
-
ref:
|
|
23422
|
-
className:
|
|
23450
|
+
ref: Z,
|
|
23451
|
+
className: q("ui-relative ui-h-max"),
|
|
23423
23452
|
"data-popup-container-id": T,
|
|
23424
23453
|
children: [
|
|
23425
|
-
/* @__PURE__ */ i("div", { ref: b, className:
|
|
23454
|
+
/* @__PURE__ */ i("div", { ref: b, className: q("ui-w-fit", G), children: /* @__PURE__ */ i(
|
|
23426
23455
|
H1,
|
|
23427
23456
|
{
|
|
23428
|
-
className:
|
|
23429
|
-
onClick:
|
|
23457
|
+
className: $,
|
|
23458
|
+
onClick: E,
|
|
23430
23459
|
disabled: p,
|
|
23431
23460
|
variant: l,
|
|
23432
23461
|
color: C,
|
|
23433
23462
|
size: w,
|
|
23434
|
-
rounded:
|
|
23463
|
+
rounded: f,
|
|
23435
23464
|
icon: h,
|
|
23436
23465
|
slotLeft: x,
|
|
23437
23466
|
slotRight: j,
|
|
23438
23467
|
colorIcon: v,
|
|
23439
23468
|
textColor: g,
|
|
23440
23469
|
tooltip: V,
|
|
23441
|
-
tooltipPosition:
|
|
23442
|
-
tooltipAlignment:
|
|
23470
|
+
tooltipPosition: I,
|
|
23471
|
+
tooltipAlignment: S,
|
|
23443
23472
|
tooltipColor: R,
|
|
23444
|
-
tooltipDelay:
|
|
23473
|
+
tooltipDelay: D,
|
|
23445
23474
|
transition: X,
|
|
23446
|
-
style:
|
|
23475
|
+
style: B,
|
|
23447
23476
|
children: r || ""
|
|
23448
23477
|
}
|
|
23449
23478
|
) }),
|
|
23450
|
-
|
|
23479
|
+
e1()
|
|
23451
23480
|
]
|
|
23452
23481
|
}
|
|
23453
23482
|
);
|
|
@@ -23476,20 +23505,20 @@ const O3 = [
|
|
|
23476
23505
|
showVisiblePages: l = !1,
|
|
23477
23506
|
showPagesSelector: C = !1
|
|
23478
23507
|
}) => {
|
|
23479
|
-
|
|
23508
|
+
W(() => {
|
|
23480
23509
|
o > r && r > 0 && d(r);
|
|
23481
23510
|
}, [o, r, d]);
|
|
23482
23511
|
const w = (v) => {
|
|
23483
23512
|
v >= 1 && v <= r && d(v);
|
|
23484
|
-
}, [g,
|
|
23485
|
-
|
|
23486
|
-
|
|
23513
|
+
}, [g, f] = K(t);
|
|
23514
|
+
W(() => {
|
|
23515
|
+
f(t);
|
|
23487
23516
|
}, [t]);
|
|
23488
23517
|
const x = Math.min(o * (t || 0), n || 0) || 0, j = (() => {
|
|
23489
23518
|
const v = Math.min(Math.max(o, 1), Math.max(r - p + 1, 1)), V = Math.min(v + p - 1, r);
|
|
23490
|
-
return Array.from({ length: V - v + 1 }, (
|
|
23519
|
+
return Array.from({ length: V - v + 1 }, (I, S) => v + S);
|
|
23491
23520
|
})(), h = (v) => {
|
|
23492
|
-
|
|
23521
|
+
f(v), s(v), w(1);
|
|
23493
23522
|
};
|
|
23494
23523
|
return /* @__PURE__ */ i(
|
|
23495
23524
|
"div",
|
|
@@ -23521,7 +23550,7 @@ const O3 = [
|
|
|
23521
23550
|
"aria-label": "Navegación de páginas",
|
|
23522
23551
|
children: [
|
|
23523
23552
|
/* @__PURE__ */ i(
|
|
23524
|
-
|
|
23553
|
+
r1,
|
|
23525
23554
|
{
|
|
23526
23555
|
variant: "outlined",
|
|
23527
23556
|
size: "md",
|
|
@@ -23535,7 +23564,7 @@ const O3 = [
|
|
|
23535
23564
|
}
|
|
23536
23565
|
),
|
|
23537
23566
|
/* @__PURE__ */ i(
|
|
23538
|
-
|
|
23567
|
+
r1,
|
|
23539
23568
|
{
|
|
23540
23569
|
variant: "outlined",
|
|
23541
23570
|
size: "md",
|
|
@@ -23549,7 +23578,7 @@ const O3 = [
|
|
|
23549
23578
|
}
|
|
23550
23579
|
),
|
|
23551
23580
|
j.map((v) => /* @__PURE__ */ i(
|
|
23552
|
-
|
|
23581
|
+
r1,
|
|
23553
23582
|
{
|
|
23554
23583
|
square: !0,
|
|
23555
23584
|
rounded: !0,
|
|
@@ -23565,7 +23594,7 @@ const O3 = [
|
|
|
23565
23594
|
v
|
|
23566
23595
|
)),
|
|
23567
23596
|
/* @__PURE__ */ i(
|
|
23568
|
-
|
|
23597
|
+
r1,
|
|
23569
23598
|
{
|
|
23570
23599
|
variant: "outlined",
|
|
23571
23600
|
size: "md",
|
|
@@ -23579,7 +23608,7 @@ const O3 = [
|
|
|
23579
23608
|
}
|
|
23580
23609
|
),
|
|
23581
23610
|
/* @__PURE__ */ i(
|
|
23582
|
-
|
|
23611
|
+
r1,
|
|
23583
23612
|
{
|
|
23584
23613
|
variant: "outlined",
|
|
23585
23614
|
size: "md",
|
|
@@ -23595,7 +23624,7 @@ const O3 = [
|
|
|
23595
23624
|
]
|
|
23596
23625
|
}
|
|
23597
23626
|
) : /* @__PURE__ */ i("div", {}),
|
|
23598
|
-
/* @__PURE__ */ i("div", { className: "ui-flex ui-w-fit ui-items-center ui-justify-center md:ui-justify-end", children: C && /* @__PURE__ */ u(
|
|
23627
|
+
/* @__PURE__ */ i("div", { className: "ui-flex ui-w-fit ui-items-center ui-justify-center md:ui-justify-end", children: C && /* @__PURE__ */ u(k1, { children: [
|
|
23599
23628
|
/* @__PURE__ */ i(
|
|
23600
23629
|
"label",
|
|
23601
23630
|
{
|
|
@@ -23833,15 +23862,15 @@ const O3 = [
|
|
|
23833
23862
|
name: a,
|
|
23834
23863
|
id: c
|
|
23835
23864
|
}) => {
|
|
23836
|
-
const [d, s] = K(!1), [L, p] = K(!1), l = c || `radio-${Math.random().toString(36).substr(2, 9)}`, w = o !== void 0 ? o : r !== void 0 ? r : !1, g =
|
|
23865
|
+
const [d, s] = K(!1), [L, p] = K(!1), l = c || `radio-${Math.random().toString(36).substr(2, 9)}`, w = o !== void 0 ? o : r !== void 0 ? r : !1, g = N(() => t ? w ? "disabledChecked" : "disabledUnchecked" : d ? w ? "checkedActive" : "uncheckedActive" : L ? w ? "checkedHover" : "uncheckedHover" : w ? "checked" : "unchecked", [t, w, d, L]), f = N(() => {
|
|
23837
23866
|
t || s(!0);
|
|
23838
|
-
}, [t]), x =
|
|
23867
|
+
}, [t]), x = N(() => {
|
|
23839
23868
|
s(!1);
|
|
23840
|
-
}, []),
|
|
23869
|
+
}, []), M = N(() => {
|
|
23841
23870
|
t || p(!0);
|
|
23842
|
-
}, [t]), j =
|
|
23871
|
+
}, [t]), j = N(() => {
|
|
23843
23872
|
p(!1), s(!1);
|
|
23844
|
-
}, []), h =
|
|
23873
|
+
}, []), h = N(
|
|
23845
23874
|
(v) => {
|
|
23846
23875
|
t || (v.preventDefault(), n && n({
|
|
23847
23876
|
target: {
|
|
@@ -23860,9 +23889,9 @@ const O3 = [
|
|
|
23860
23889
|
isActive: d,
|
|
23861
23890
|
isHovered: L,
|
|
23862
23891
|
handlers: {
|
|
23863
|
-
handleMouseDown:
|
|
23892
|
+
handleMouseDown: f,
|
|
23864
23893
|
handleMouseUp: x,
|
|
23865
|
-
handleMouseEnter:
|
|
23894
|
+
handleMouseEnter: M,
|
|
23866
23895
|
handleMouseLeave: j,
|
|
23867
23896
|
handleClick: h
|
|
23868
23897
|
}
|
|
@@ -23880,7 +23909,7 @@ const O3 = [
|
|
|
23880
23909
|
defaultChecked: L,
|
|
23881
23910
|
...p
|
|
23882
23911
|
}) => {
|
|
23883
|
-
const l = d !== void 0, C = l ? d : L !== void 0 ? L : !1, { state: w, radioId: g, handlers:
|
|
23912
|
+
const l = d !== void 0, C = l ? d : L !== void 0 ? L : !1, { state: w, radioId: g, handlers: f } = I3({
|
|
23884
23913
|
checked: d,
|
|
23885
23914
|
defaultChecked: L,
|
|
23886
23915
|
disabled: n,
|
|
@@ -23889,7 +23918,7 @@ const O3 = [
|
|
|
23889
23918
|
name: p.name,
|
|
23890
23919
|
id: c
|
|
23891
23920
|
});
|
|
23892
|
-
return /* @__PURE__ */ u("div", { className:
|
|
23921
|
+
return /* @__PURE__ */ u("div", { className: q("ui-flex ui-items-center", e), children: [
|
|
23893
23922
|
/* @__PURE__ */ i(
|
|
23894
23923
|
"input",
|
|
23895
23924
|
{
|
|
@@ -23907,12 +23936,12 @@ const O3 = [
|
|
|
23907
23936
|
"label",
|
|
23908
23937
|
{
|
|
23909
23938
|
htmlFor: g,
|
|
23910
|
-
onClick:
|
|
23911
|
-
onMouseDown:
|
|
23912
|
-
onMouseUp:
|
|
23913
|
-
onMouseEnter:
|
|
23914
|
-
onMouseLeave:
|
|
23915
|
-
className:
|
|
23939
|
+
onClick: f.handleClick,
|
|
23940
|
+
onMouseDown: f.handleMouseDown,
|
|
23941
|
+
onMouseUp: f.handleMouseUp,
|
|
23942
|
+
onMouseEnter: f.handleMouseEnter,
|
|
23943
|
+
onMouseLeave: f.handleMouseLeave,
|
|
23944
|
+
className: q(
|
|
23916
23945
|
"ui-relative ui-inline-flex ui-cursor-pointer ui-items-center",
|
|
23917
23946
|
n && "ui-cursor-not-allowed"
|
|
23918
23947
|
),
|
|
@@ -23928,7 +23957,7 @@ const O3 = [
|
|
|
23928
23957
|
children: C && /* @__PURE__ */ i(
|
|
23929
23958
|
"div",
|
|
23930
23959
|
{
|
|
23931
|
-
className:
|
|
23960
|
+
className: q("ui-absolute ui-rounded-full", "ui-bg-white"),
|
|
23932
23961
|
style: {
|
|
23933
23962
|
zIndex: 1,
|
|
23934
23963
|
width: r === "sm" ? "4px" : r === "md" ? "6px" : "8px",
|
|
@@ -23938,7 +23967,7 @@ const O3 = [
|
|
|
23938
23967
|
)
|
|
23939
23968
|
}
|
|
23940
23969
|
),
|
|
23941
|
-
o && /* @__PURE__ */ i("span", { className:
|
|
23970
|
+
o && /* @__PURE__ */ i("span", { className: q(k3({ size: r, disabled: n }), a), children: o })
|
|
23942
23971
|
]
|
|
23943
23972
|
}
|
|
23944
23973
|
)
|
|
@@ -23948,7 +23977,7 @@ const O3 = [
|
|
|
23948
23977
|
onChange: r,
|
|
23949
23978
|
options: t
|
|
23950
23979
|
}) => {
|
|
23951
|
-
const [n, e] = K(o), a = o !== void 0 ? o : n, c =
|
|
23980
|
+
const [n, e] = K(o), a = o !== void 0 ? o : n, c = N(
|
|
23952
23981
|
(d) => {
|
|
23953
23982
|
r ? r(d) : e(d);
|
|
23954
23983
|
},
|
|
@@ -23979,7 +24008,7 @@ const O3 = [
|
|
|
23979
24008
|
return /* @__PURE__ */ i(
|
|
23980
24009
|
"div",
|
|
23981
24010
|
{
|
|
23982
|
-
className:
|
|
24011
|
+
className: q(
|
|
23983
24012
|
"ui-flex ui-gap-3",
|
|
23984
24013
|
c === "horizontal" ? "ui-flex-row" : "ui-flex-col",
|
|
23985
24014
|
d
|
|
@@ -24095,7 +24124,7 @@ const O3 = [
|
|
|
24095
24124
|
classNameNumber: e = ""
|
|
24096
24125
|
}) => {
|
|
24097
24126
|
const a = "ui-min-w-[38px] ui-min-h-[38px] ui-max-w-[38px] ui-max-h-[38px] ui-rounded-full ui-flex ui-items-center ui-justify-center ui-border-3";
|
|
24098
|
-
return r === "completed" ? /* @__PURE__ */ i("div", { className: `${a} ${t.primary} ${n}`, children: /* @__PURE__ */ i(
|
|
24127
|
+
return r === "completed" ? /* @__PURE__ */ i("div", { className: `${a} ${t.primary} ${n}`, children: /* @__PURE__ */ i(b1, { name: "Check2Outlined", size: "3xl", color: "white" }) }) : r === "active" ? /* @__PURE__ */ i("div", { className: `${a} ui-bg-white ${t.secondary} ${n}`, children: /* @__PURE__ */ i(
|
|
24099
24128
|
"div",
|
|
24100
24129
|
{
|
|
24101
24130
|
className: `ui-h-[18px] ui-w-[18px] ui-rounded-full ${t.primary.split(" ")[0]}`
|
|
@@ -24202,22 +24231,22 @@ const O3 = [
|
|
|
24202
24231
|
vertical: C = !1,
|
|
24203
24232
|
stepClickable: w = !1
|
|
24204
24233
|
}) => {
|
|
24205
|
-
const { currentStep: g, getColorClasses:
|
|
24234
|
+
const { currentStep: g, getColorClasses: f, handleStepClick: x, getStepStatus: M } = $3({
|
|
24206
24235
|
steps: o,
|
|
24207
24236
|
currentStep: s,
|
|
24208
24237
|
onClickStep: L,
|
|
24209
24238
|
onStepChange: p
|
|
24210
|
-
}), j =
|
|
24239
|
+
}), j = f(r || "blue");
|
|
24211
24240
|
return /* @__PURE__ */ i("div", { className: `${C ? `ui-flex ui-flex-col ui-items-center ui-min-h-0 ${l ? "ui-overflow-y-auto ui-overflow-x-hidden" : ""}` : `ui-flex ui-items-center ui-min-w-0 ${l ? "ui-overflow-x-auto ui-overflow-y-hidden" : ""}`} ${A3({ color: r, size: t, className: n })}`, children: o.map((v, V) => {
|
|
24212
|
-
const
|
|
24241
|
+
const I = M(V), S = V === o.length - 1;
|
|
24213
24242
|
return /* @__PURE__ */ i(
|
|
24214
24243
|
D3,
|
|
24215
24244
|
{
|
|
24216
24245
|
step: v,
|
|
24217
24246
|
stepIndex: V,
|
|
24218
|
-
status:
|
|
24247
|
+
status: I,
|
|
24219
24248
|
colorClasses: j,
|
|
24220
|
-
isLast:
|
|
24249
|
+
isLast: S,
|
|
24221
24250
|
onStepClick: x,
|
|
24222
24251
|
classNameStep: e,
|
|
24223
24252
|
classNameStepLabel: a,
|
|
@@ -24241,7 +24270,7 @@ const O3 = [
|
|
|
24241
24270
|
dark: N0
|
|
24242
24271
|
}, D1 = (o) => {
|
|
24243
24272
|
if (typeof o == "string") return o;
|
|
24244
|
-
if (
|
|
24273
|
+
if (f1.isValidElement(o)) {
|
|
24245
24274
|
const r = o, { type: t, props: n } = r;
|
|
24246
24275
|
let e = typeof t == "string" ? t : t.name || "Component";
|
|
24247
24276
|
const a = Object.entries(n).filter(([L]) => L !== "children").map(([L, p]) => {
|
|
@@ -24259,7 +24288,7 @@ const O3 = [
|
|
|
24259
24288
|
return `${L}={undefined}`;
|
|
24260
24289
|
if (typeof p == "object")
|
|
24261
24290
|
try {
|
|
24262
|
-
return p && typeof p == "object" && "$$typeof" in p &&
|
|
24291
|
+
return p && typeof p == "object" && "$$typeof" in p && f1.isValidElement(p) ? `${L}={/* React Element */}` : `${L}={${JSON.stringify(p)}}`;
|
|
24263
24292
|
} catch {
|
|
24264
24293
|
return `${L}={/* objeto complejo */}`;
|
|
24265
24294
|
}
|
|
@@ -24349,8 +24378,8 @@ const U3 = {
|
|
|
24349
24378
|
progressBarColor: !1,
|
|
24350
24379
|
animationDuration: 300
|
|
24351
24380
|
};
|
|
24352
|
-
let
|
|
24353
|
-
const
|
|
24381
|
+
let h1 = { ...U3 };
|
|
24382
|
+
const q1 = [];
|
|
24354
24383
|
let _3 = 0;
|
|
24355
24384
|
const z1 = /* @__PURE__ */ new Map(), K1 = {
|
|
24356
24385
|
show(o, r = "green", t = {}) {
|
|
@@ -24374,13 +24403,13 @@ const z1 = /* @__PURE__ */ new Map(), K1 = {
|
|
|
24374
24403
|
onSecondaryClick: a.onSecondaryClick,
|
|
24375
24404
|
showCloseButton: a.showCloseButton ?? !0,
|
|
24376
24405
|
isLeaving: !1,
|
|
24377
|
-
duration: a.duration ??
|
|
24378
|
-
position: a.position ??
|
|
24379
|
-
variant: a.variant ??
|
|
24380
|
-
primaryButtonText: a.primaryButtonText ??
|
|
24381
|
-
secondaryButtonText: a.secondaryButtonText ??
|
|
24406
|
+
duration: a.duration ?? h1.duration,
|
|
24407
|
+
position: a.position ?? h1.position,
|
|
24408
|
+
variant: a.variant ?? h1.variant,
|
|
24409
|
+
primaryButtonText: a.primaryButtonText ?? h1.primaryButtonText,
|
|
24410
|
+
secondaryButtonText: a.secondaryButtonText ?? h1.secondaryButtonText
|
|
24382
24411
|
};
|
|
24383
|
-
return
|
|
24412
|
+
return q1.forEach((p) => p(L)), n;
|
|
24384
24413
|
},
|
|
24385
24414
|
success(o, r) {
|
|
24386
24415
|
return this.show(o, "green", r);
|
|
@@ -24398,29 +24427,29 @@ const z1 = /* @__PURE__ */ new Map(), K1 = {
|
|
|
24398
24427
|
return this.show(o, "neutral", r);
|
|
24399
24428
|
},
|
|
24400
24429
|
dismiss(o) {
|
|
24401
|
-
|
|
24430
|
+
q1.forEach(
|
|
24402
24431
|
(r) => r({
|
|
24403
24432
|
id: o,
|
|
24404
24433
|
message: "",
|
|
24405
24434
|
title: "",
|
|
24406
24435
|
type: "green",
|
|
24407
24436
|
duration: 0,
|
|
24408
|
-
position:
|
|
24437
|
+
position: h1.position,
|
|
24409
24438
|
showCloseButton: !0,
|
|
24410
24439
|
isLeaving: !0,
|
|
24411
|
-
variant:
|
|
24440
|
+
variant: h1.variant
|
|
24412
24441
|
})
|
|
24413
24442
|
);
|
|
24414
24443
|
},
|
|
24415
24444
|
configure(o) {
|
|
24416
|
-
Object.assign(
|
|
24445
|
+
Object.assign(h1, o);
|
|
24417
24446
|
},
|
|
24418
24447
|
getListeners() {
|
|
24419
|
-
return
|
|
24448
|
+
return q1;
|
|
24420
24449
|
}
|
|
24421
|
-
},
|
|
24450
|
+
}, q3 = () => {
|
|
24422
24451
|
const [o, r] = K([]), t = t1(/* @__PURE__ */ new Map()), n = t1(null);
|
|
24423
|
-
return
|
|
24452
|
+
return W(() => {
|
|
24424
24453
|
const a = K1.getListeners();
|
|
24425
24454
|
if (n.current) {
|
|
24426
24455
|
const d = a.indexOf(n.current);
|
|
@@ -24432,13 +24461,13 @@ const z1 = /* @__PURE__ */ new Map(), K1 = {
|
|
|
24432
24461
|
(s) => s.map((L) => L.id === d.id ? { ...L, isLeaving: !0 } : L)
|
|
24433
24462
|
), setTimeout(() => {
|
|
24434
24463
|
r((s) => s.filter((L) => L.id !== d.id));
|
|
24435
|
-
},
|
|
24464
|
+
}, h1.animationDuration);
|
|
24436
24465
|
return;
|
|
24437
24466
|
}
|
|
24438
24467
|
if (r((s) => {
|
|
24439
24468
|
if (s.some((C) => C.id === d.id)) return s;
|
|
24440
24469
|
const p = { ...d, isLeaving: !1 };
|
|
24441
|
-
return [...s, p].slice(-
|
|
24470
|
+
return [...s, p].slice(-h1.maxToasts);
|
|
24442
24471
|
}), d.duration && d.duration > 0) {
|
|
24443
24472
|
const s = setTimeout(() => {
|
|
24444
24473
|
K1.dismiss(d.id), t.current.delete(d.id);
|
|
@@ -24457,7 +24486,7 @@ const z1 = /* @__PURE__ */ new Map(), K1 = {
|
|
|
24457
24486
|
}, {}),
|
|
24458
24487
|
[o]
|
|
24459
24488
|
), toasts: o };
|
|
24460
|
-
},
|
|
24489
|
+
}, Y3 = () => ({
|
|
24461
24490
|
getPositionClasses: (r) => ({
|
|
24462
24491
|
"top-left": "ui-fixed ui-top-5 ui-left-5",
|
|
24463
24492
|
"top-center": "ui-fixed ui-top-5 ui-left-1/2 ui--translate-x-1/2",
|
|
@@ -24471,7 +24500,7 @@ const z1 = /* @__PURE__ */ new Map(), K1 = {
|
|
|
24471
24500
|
})[r]
|
|
24472
24501
|
}), J3 = ({ toastItem: o }) => {
|
|
24473
24502
|
const [r, t] = K(!0);
|
|
24474
|
-
|
|
24503
|
+
W(() => {
|
|
24475
24504
|
o.isLeaving && setTimeout(() => {
|
|
24476
24505
|
t(!1);
|
|
24477
24506
|
}, 300);
|
|
@@ -24500,8 +24529,8 @@ const z1 = /* @__PURE__ */ new Map(), K1 = {
|
|
|
24500
24529
|
}
|
|
24501
24530
|
) : null;
|
|
24502
24531
|
}, G3 = ({ toasts: o }) => {
|
|
24503
|
-
const { getPositionClasses: r } =
|
|
24504
|
-
return /* @__PURE__ */ i(
|
|
24532
|
+
const { getPositionClasses: r } = Y3();
|
|
24533
|
+
return /* @__PURE__ */ i(k1, { children: Object.entries(o).map(([t, n]) => /* @__PURE__ */ i(
|
|
24505
24534
|
"div",
|
|
24506
24535
|
{
|
|
24507
24536
|
className: `${r(t)} ui-z-50 ui-max-w-[350px] ui-space-y-2`,
|
|
@@ -24510,8 +24539,8 @@ const z1 = /* @__PURE__ */ new Map(), K1 = {
|
|
|
24510
24539
|
t
|
|
24511
24540
|
)) });
|
|
24512
24541
|
}, X3 = K1, g5 = () => {
|
|
24513
|
-
const { toastsByPosition: o } =
|
|
24514
|
-
return
|
|
24542
|
+
const { toastsByPosition: o } = q3();
|
|
24543
|
+
return Z1(/* @__PURE__ */ i(G3, { toasts: o }), document.body);
|
|
24515
24544
|
};
|
|
24516
24545
|
export {
|
|
24517
24546
|
t5 as Accordion,
|
|
@@ -24523,17 +24552,17 @@ export {
|
|
|
24523
24552
|
r3 as CalendarContent,
|
|
24524
24553
|
L0 as CalendarGrid,
|
|
24525
24554
|
X8 as CalendarHeader,
|
|
24526
|
-
|
|
24555
|
+
g1 as Card,
|
|
24527
24556
|
i3 as DateInput,
|
|
24528
24557
|
l5 as DatePicker,
|
|
24529
24558
|
u3 as DatePickerPortal,
|
|
24530
|
-
|
|
24559
|
+
q8 as Day,
|
|
24531
24560
|
d5 as Drawer,
|
|
24532
24561
|
V0 as Dropdown,
|
|
24533
24562
|
k8 as Emoji,
|
|
24534
|
-
|
|
24563
|
+
b1 as Icon,
|
|
24535
24564
|
Z8 as InnerAvatar,
|
|
24536
|
-
|
|
24565
|
+
r1 as InnerButton,
|
|
24537
24566
|
F8 as InnerProgressBar,
|
|
24538
24567
|
T1 as Input,
|
|
24539
24568
|
c5 as List,
|
|
@@ -24543,7 +24572,7 @@ export {
|
|
|
24543
24572
|
p5 as Logo,
|
|
24544
24573
|
C5 as Modal,
|
|
24545
24574
|
h3 as ModalProvider,
|
|
24546
|
-
|
|
24575
|
+
Y8 as Month,
|
|
24547
24576
|
w0 as MonthGrid,
|
|
24548
24577
|
o3 as MultipleCalendarsHeader,
|
|
24549
24578
|
A1 as NavigationButton,
|
|
@@ -24562,11 +24591,11 @@ export {
|
|
|
24562
24591
|
j0 as Tag,
|
|
24563
24592
|
g5 as Toaster,
|
|
24564
24593
|
t0 as Tooltip,
|
|
24565
|
-
|
|
24594
|
+
x1 as Visual,
|
|
24566
24595
|
G8 as WeekDay,
|
|
24567
24596
|
J8 as Year,
|
|
24568
24597
|
h0 as YearGrid,
|
|
24569
|
-
|
|
24598
|
+
q as cn,
|
|
24570
24599
|
k3 as labelVariants,
|
|
24571
24600
|
Z3 as radioButtonVariants,
|
|
24572
24601
|
X3 as toast,
|