oraculo-ui 0.1.9 → 0.1.11
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/{OraculoSeccionBonoBienvenida-EDS6UQVL.mjs → OraculoSeccionBonoBienvenida-2APXZQQA.mjs} +1 -2
- package/dist/{OraculoSeccionCasino-GXRRODCJ.mjs → OraculoSeccionCasino-H6CXFXMN.mjs} +5 -4
- package/dist/{OraculoSeccionVirtuales-OP2CSKUP.css → OraculoSeccionCasino-RFXPS2MW.css} +181 -0
- package/dist/OraculoSeccionCasino-WBPCNYC5.mjs +12 -0
- package/dist/OraculoSeccionDestacados-EPL4KZCF.mjs +12 -0
- package/dist/OraculoSeccionDestacados-IMREYQ6W.mjs +12 -0
- package/dist/OraculoSeccionTopJuegos-DWEO36ND.mjs +12 -0
- package/dist/OraculoSeccionTopJuegos-FKAD2YD3.mjs +12 -0
- package/dist/{OraculoSeccionCasino-Q2VV44XD.css → OraculoSeccionTopJuegos-FMFAEVQK.css} +181 -0
- package/dist/OraculoSeccionVirtuales-6RBECPDW.css +397 -0
- package/dist/{OraculoSeccionVirtuales-MGW5X23B.mjs → OraculoSeccionVirtuales-IBYOMEJV.mjs} +5 -4
- package/dist/OraculoSeccionVirtuales-N2ETKRK7.mjs +12 -0
- package/dist/{chunk-WPLILXPP.mjs → chunk-4LBAYKDQ.mjs} +116 -30
- package/dist/{chunk-PXIOKT7L.mjs → chunk-ECHAXSTL.mjs} +817 -97
- package/dist/chunk-VYYKDD5L.mjs +39899 -0
- package/dist/index.d.mts +2 -1
- package/dist/index.d.ts +2 -1
- package/dist/index.js +194 -162
- package/dist/index.mjs +11 -23
- package/package.json +1 -1
- package/dist/OraculoSeccionDestacados-QU6BT2NM.mjs +0 -18
- package/dist/OraculoSeccionTopJuegos-3AR4L7SZ.css +0 -59
- package/dist/OraculoSeccionTopJuegos-FZUYQEMC.mjs +0 -8
- package/dist/chunk-5GTDKE3I.mjs +0 -30
- package/dist/chunk-AFPCFXMZ.mjs +0 -174
- package/dist/chunk-AIT7B2J3.mjs +0 -192
- package/dist/chunk-DKP3HTEP.mjs +0 -183
- package/dist/chunk-VHW77D2M.mjs +0 -91
- package/dist/chunk-YY5T37WR.mjs +0 -175
package/dist/chunk-VHW77D2M.mjs
DELETED
|
@@ -1,91 +0,0 @@
|
|
|
1
|
-
// src/molecules/OraculoCarousel/OraculoCarousel.tsx
|
|
2
|
-
import {
|
|
3
|
-
forwardRef,
|
|
4
|
-
useCallback,
|
|
5
|
-
useImperativeHandle,
|
|
6
|
-
useRef
|
|
7
|
-
} from "react";
|
|
8
|
-
import {
|
|
9
|
-
Splide as SplideRaw,
|
|
10
|
-
SplideSlide as SplideSlideRaw
|
|
11
|
-
} from "@splidejs/react-splide";
|
|
12
|
-
import { jsx } from "react/jsx-runtime";
|
|
13
|
-
var Splide = SplideRaw;
|
|
14
|
-
var SplideSlide = SplideSlideRaw;
|
|
15
|
-
var OraculoCarousel = forwardRef(
|
|
16
|
-
({
|
|
17
|
-
items = [],
|
|
18
|
-
renderItem,
|
|
19
|
-
perPage = 1,
|
|
20
|
-
gap = "0px",
|
|
21
|
-
breakpoints,
|
|
22
|
-
options = {},
|
|
23
|
-
className = "",
|
|
24
|
-
onMove
|
|
25
|
-
}, ref) => {
|
|
26
|
-
const splideRef = useRef(null);
|
|
27
|
-
useImperativeHandle(ref, () => ({
|
|
28
|
-
next: () => {
|
|
29
|
-
var _a;
|
|
30
|
-
return (_a = splideRef.current) == null ? void 0 : _a.go(">");
|
|
31
|
-
},
|
|
32
|
-
prev: () => {
|
|
33
|
-
var _a;
|
|
34
|
-
return (_a = splideRef.current) == null ? void 0 : _a.go("<");
|
|
35
|
-
},
|
|
36
|
-
go: (index) => {
|
|
37
|
-
var _a;
|
|
38
|
-
return (_a = splideRef.current) == null ? void 0 : _a.go(index);
|
|
39
|
-
}
|
|
40
|
-
}));
|
|
41
|
-
const handleMove = useCallback(
|
|
42
|
-
(splide) => {
|
|
43
|
-
const index = splide.index;
|
|
44
|
-
const total = splide.length;
|
|
45
|
-
const currentPerPage = splide.options.perPage || 1;
|
|
46
|
-
const isStart = index === 0;
|
|
47
|
-
const isEnd = index >= total - currentPerPage;
|
|
48
|
-
onMove == null ? void 0 : onMove({ index, isStart, isEnd, total });
|
|
49
|
-
},
|
|
50
|
-
[onMove]
|
|
51
|
-
);
|
|
52
|
-
const handleMounted = useCallback(
|
|
53
|
-
(splide) => {
|
|
54
|
-
handleMove(splide);
|
|
55
|
-
},
|
|
56
|
-
[handleMove]
|
|
57
|
-
);
|
|
58
|
-
const mergedOptions = {
|
|
59
|
-
type: "slide",
|
|
60
|
-
trimSpace: false,
|
|
61
|
-
drag: true,
|
|
62
|
-
pagination: false,
|
|
63
|
-
arrows: false,
|
|
64
|
-
rewind: false,
|
|
65
|
-
focus: "start",
|
|
66
|
-
autoWidth: false,
|
|
67
|
-
perPage,
|
|
68
|
-
gap,
|
|
69
|
-
breakpoints,
|
|
70
|
-
...options
|
|
71
|
-
};
|
|
72
|
-
return /* @__PURE__ */ jsx("div", { className, style: { width: "100%" }, children: /* @__PURE__ */ jsx(
|
|
73
|
-
Splide,
|
|
74
|
-
{
|
|
75
|
-
ref: splideRef,
|
|
76
|
-
options: mergedOptions,
|
|
77
|
-
onMove: handleMove,
|
|
78
|
-
onMounted: handleMounted,
|
|
79
|
-
children: items.map((item, index) => {
|
|
80
|
-
var _a;
|
|
81
|
-
return /* @__PURE__ */ jsx(SplideSlide, { children: renderItem(item, index) }, (_a = item.id) != null ? _a : index);
|
|
82
|
-
})
|
|
83
|
-
}
|
|
84
|
-
) });
|
|
85
|
-
}
|
|
86
|
-
);
|
|
87
|
-
var OraculoCarousel_default = OraculoCarousel;
|
|
88
|
-
|
|
89
|
-
export {
|
|
90
|
-
OraculoCarousel_default
|
|
91
|
-
};
|
package/dist/chunk-YY5T37WR.mjs
DELETED
|
@@ -1,175 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
ChevronLeftRounded_default,
|
|
3
|
-
ChevronRightRounded_default,
|
|
4
|
-
OraculoGameSlide_default
|
|
5
|
-
} from "./chunk-AIT7B2J3.mjs";
|
|
6
|
-
import {
|
|
7
|
-
OraculoSectionTitle
|
|
8
|
-
} from "./chunk-5GTDKE3I.mjs";
|
|
9
|
-
import {
|
|
10
|
-
OraculoCarousel_default
|
|
11
|
-
} from "./chunk-VHW77D2M.mjs";
|
|
12
|
-
import {
|
|
13
|
-
OraculoButton
|
|
14
|
-
} from "./chunk-IJQLK4NO.mjs";
|
|
15
|
-
|
|
16
|
-
// src/organisms/OraculoSeccionVirtuales/OraculoSeccionVirtuales.tsx
|
|
17
|
-
import { useRef, useState } from "react";
|
|
18
|
-
import Stack from "@mui/material/Stack";
|
|
19
|
-
import Box from "@mui/material/Box";
|
|
20
|
-
import { jsx, jsxs } from "react/jsx-runtime";
|
|
21
|
-
var buildVirtualSlides = (games, mosaicFirst = true, gridSize = 4) => {
|
|
22
|
-
const baseItems = games.map((g, idx) => {
|
|
23
|
-
var _a, _b;
|
|
24
|
-
return {
|
|
25
|
-
id: (_a = g.orden) != null ? _a : idx,
|
|
26
|
-
imageUrl: (_b = g.logo) != null ? _b : ""
|
|
27
|
-
};
|
|
28
|
-
});
|
|
29
|
-
if (!baseItems.length) return [];
|
|
30
|
-
const slides = [];
|
|
31
|
-
let start = 0;
|
|
32
|
-
if (mosaicFirst) {
|
|
33
|
-
const take = Math.min(baseItems.length, 5);
|
|
34
|
-
slides.push({
|
|
35
|
-
id: "mosaic-0",
|
|
36
|
-
kind: "mosaic",
|
|
37
|
-
items: baseItems.slice(0, take)
|
|
38
|
-
});
|
|
39
|
-
start = take;
|
|
40
|
-
}
|
|
41
|
-
while (start < baseItems.length) {
|
|
42
|
-
const end = Math.min(start + gridSize, baseItems.length);
|
|
43
|
-
slides.push({
|
|
44
|
-
id: `grid-${start}`,
|
|
45
|
-
kind: "grid",
|
|
46
|
-
items: baseItems.slice(start, end)
|
|
47
|
-
});
|
|
48
|
-
start = end;
|
|
49
|
-
}
|
|
50
|
-
return slides;
|
|
51
|
-
};
|
|
52
|
-
var OraculoSeccionVirtuales = ({
|
|
53
|
-
items,
|
|
54
|
-
title = "Virtuales",
|
|
55
|
-
iconUrl = "/assets/img/home/Virtuales/virtuales.svg",
|
|
56
|
-
onItemClick,
|
|
57
|
-
onViewMore,
|
|
58
|
-
mosaicFirst = true,
|
|
59
|
-
gridSize = 4
|
|
60
|
-
}) => {
|
|
61
|
-
const carouselRef = useRef(null);
|
|
62
|
-
const [navState, setNavState] = useState({ isStart: true, isEnd: false });
|
|
63
|
-
const slides = buildVirtualSlides(items, mosaicFirst, gridSize);
|
|
64
|
-
const handlePrev = () => {
|
|
65
|
-
var _a;
|
|
66
|
-
(_a = carouselRef.current) == null ? void 0 : _a.prev();
|
|
67
|
-
};
|
|
68
|
-
const handleNext = () => {
|
|
69
|
-
var _a;
|
|
70
|
-
(_a = carouselRef.current) == null ? void 0 : _a.next();
|
|
71
|
-
};
|
|
72
|
-
const handleViewMore = () => {
|
|
73
|
-
onViewMore == null ? void 0 : onViewMore();
|
|
74
|
-
};
|
|
75
|
-
return /* @__PURE__ */ jsx("section", { children: /* @__PURE__ */ jsxs(Stack, { direction: "column", spacing: 2, useFlexGap: true, children: [
|
|
76
|
-
/* @__PURE__ */ jsxs(
|
|
77
|
-
Box,
|
|
78
|
-
{
|
|
79
|
-
sx: {
|
|
80
|
-
display: "grid",
|
|
81
|
-
gridTemplateColumns: "1fr auto auto",
|
|
82
|
-
alignItems: "center",
|
|
83
|
-
columnGap: 1.5,
|
|
84
|
-
rowGap: 1
|
|
85
|
-
},
|
|
86
|
-
children: [
|
|
87
|
-
/* @__PURE__ */ jsx(
|
|
88
|
-
OraculoSectionTitle,
|
|
89
|
-
{
|
|
90
|
-
title,
|
|
91
|
-
iconUrl,
|
|
92
|
-
size: "md"
|
|
93
|
-
}
|
|
94
|
-
),
|
|
95
|
-
/* @__PURE__ */ jsxs(
|
|
96
|
-
Box,
|
|
97
|
-
{
|
|
98
|
-
sx: {
|
|
99
|
-
display: "flex",
|
|
100
|
-
gap: 1,
|
|
101
|
-
justifyContent: "flex-end"
|
|
102
|
-
},
|
|
103
|
-
children: [
|
|
104
|
-
/* @__PURE__ */ jsx(
|
|
105
|
-
OraculoButton,
|
|
106
|
-
{
|
|
107
|
-
ariaLabel: "Anterior",
|
|
108
|
-
variant: "secondary",
|
|
109
|
-
iconOnly: true,
|
|
110
|
-
leftIcon: /* @__PURE__ */ jsx(ChevronLeftRounded_default, {}),
|
|
111
|
-
onClick: handlePrev,
|
|
112
|
-
disabled: navState.isStart
|
|
113
|
-
}
|
|
114
|
-
),
|
|
115
|
-
/* @__PURE__ */ jsx(
|
|
116
|
-
OraculoButton,
|
|
117
|
-
{
|
|
118
|
-
ariaLabel: "Siguiente",
|
|
119
|
-
variant: "secondary",
|
|
120
|
-
iconOnly: true,
|
|
121
|
-
rightIcon: /* @__PURE__ */ jsx(ChevronRightRounded_default, {}),
|
|
122
|
-
onClick: handleNext,
|
|
123
|
-
disabled: navState.isEnd
|
|
124
|
-
}
|
|
125
|
-
)
|
|
126
|
-
]
|
|
127
|
-
}
|
|
128
|
-
),
|
|
129
|
-
/* @__PURE__ */ jsx(Box, { sx: { justifySelf: "end" }, children: /* @__PURE__ */ jsx(OraculoButton, { variant: "secondary", onClick: handleViewMore, children: "Ver m\xE1s" }) })
|
|
130
|
-
]
|
|
131
|
-
}
|
|
132
|
-
),
|
|
133
|
-
/* @__PURE__ */ jsx(
|
|
134
|
-
OraculoCarousel_default,
|
|
135
|
-
{
|
|
136
|
-
ref: carouselRef,
|
|
137
|
-
items: slides,
|
|
138
|
-
perPage: 1,
|
|
139
|
-
gap: "0",
|
|
140
|
-
options: {
|
|
141
|
-
autoWidth: true,
|
|
142
|
-
gap: "12px",
|
|
143
|
-
trimSpace: false,
|
|
144
|
-
pagination: false,
|
|
145
|
-
arrows: false,
|
|
146
|
-
drag: true,
|
|
147
|
-
focus: "start",
|
|
148
|
-
perMove: 1
|
|
149
|
-
},
|
|
150
|
-
renderItem: (slide) => /* @__PURE__ */ jsx("div", { style: { alignSelf: "start" }, children: /* @__PURE__ */ jsx(
|
|
151
|
-
OraculoGameSlide_default,
|
|
152
|
-
{
|
|
153
|
-
items: slide.items,
|
|
154
|
-
layout: slide.kind === "mosaic" ? "mosaic" : "grid",
|
|
155
|
-
onClick: (itm) => {
|
|
156
|
-
const game = items.find(
|
|
157
|
-
(g, idx) => {
|
|
158
|
-
var _a;
|
|
159
|
-
return ((_a = g.orden) != null ? _a : idx) === itm.id;
|
|
160
|
-
}
|
|
161
|
-
);
|
|
162
|
-
if (game) onItemClick == null ? void 0 : onItemClick(game);
|
|
163
|
-
}
|
|
164
|
-
}
|
|
165
|
-
) }),
|
|
166
|
-
onMove: ({ isStart, isEnd }) => setNavState({ isStart, isEnd })
|
|
167
|
-
}
|
|
168
|
-
)
|
|
169
|
-
] }) });
|
|
170
|
-
};
|
|
171
|
-
var OraculoSeccionVirtuales_default = OraculoSeccionVirtuales;
|
|
172
|
-
|
|
173
|
-
export {
|
|
174
|
-
OraculoSeccionVirtuales_default
|
|
175
|
-
};
|