oraculo-ui 0.1.7 → 0.1.9
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 +9 -0
- package/dist/OraculoSeccionBonoBienvenida-MGMLDCRG.css +220 -0
- package/dist/OraculoSeccionCasino-GXRRODCJ.mjs +11 -0
- package/dist/OraculoSeccionCasino-Q2VV44XD.css +216 -0
- package/dist/OraculoSeccionCasinoEnVivo-ISYMJSUN.mjs +8 -0
- package/dist/OraculoSeccionCasinoEnVivo-MMXETHJA.css +156 -0
- package/dist/OraculoSeccionClubOlimpo-APZYPQ5V.css +116 -0
- package/dist/OraculoSeccionClubOlimpo-MYTRV5IN.css +273 -0
- package/dist/OraculoSeccionClubOlimpo-TV3LABJ5.mjs +9 -0
- package/dist/OraculoSeccionClubOlimpo-XGB4KUKX.mjs +7 -0
- package/dist/OraculoSeccionDestacados-QU6BT2NM.mjs +18 -0
- package/dist/OraculoSeccionDestacados-WQX2GQNY.css +397 -0
- package/dist/OraculoSeccionTopJuegos-3AR4L7SZ.css +59 -0
- package/dist/OraculoSeccionTopJuegos-FZUYQEMC.mjs +8 -0
- package/dist/OraculoSeccionVirtuales-MGW5X23B.mjs +11 -0
- package/dist/OraculoSeccionVirtuales-OP2CSKUP.css +216 -0
- package/dist/chunk-2D7ZJMJV.mjs +118 -0
- package/dist/chunk-5GTDKE3I.mjs +30 -0
- package/dist/chunk-AFPCFXMZ.mjs +174 -0
- package/dist/chunk-AIT7B2J3.mjs +192 -0
- package/dist/chunk-DKP3HTEP.mjs +183 -0
- package/dist/chunk-IJQLK4NO.mjs +73 -0
- package/dist/chunk-PVY5Z3JS.mjs +249 -0
- package/dist/chunk-PXIOKT7L.mjs +39177 -0
- package/dist/chunk-PZJSZNXJ.mjs +6 -0
- package/dist/chunk-VHW77D2M.mjs +91 -0
- package/dist/chunk-VIPLL6XT.mjs +43 -0
- package/dist/chunk-WPLILXPP.mjs +389 -0
- package/dist/chunk-YY5T37WR.mjs +175 -0
- package/dist/index.d.mts +45 -2
- package/dist/index.d.ts +45 -2
- package/dist/index.js +39897 -1277
- package/dist/index.mjs +41 -1812
- package/package.json +1 -1
|
@@ -0,0 +1,91 @@
|
|
|
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
|
+
};
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
var __create = Object.create;
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
6
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
7
|
+
var __require = /* @__PURE__ */ ((x) => typeof require !== "undefined" ? require : typeof Proxy !== "undefined" ? new Proxy(x, {
|
|
8
|
+
get: (a, b) => (typeof require !== "undefined" ? require : a)[b]
|
|
9
|
+
}) : x)(function(x) {
|
|
10
|
+
if (typeof require !== "undefined") return require.apply(this, arguments);
|
|
11
|
+
throw Error('Dynamic require of "' + x + '" is not supported');
|
|
12
|
+
});
|
|
13
|
+
var __glob = (map) => (path) => {
|
|
14
|
+
var fn = map[path];
|
|
15
|
+
if (fn) return fn();
|
|
16
|
+
throw new Error("Module not found in bundle: " + path);
|
|
17
|
+
};
|
|
18
|
+
var __commonJS = (cb, mod) => function __require2() {
|
|
19
|
+
return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
|
|
20
|
+
};
|
|
21
|
+
var __copyProps = (to, from, except, desc) => {
|
|
22
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
23
|
+
for (let key of __getOwnPropNames(from))
|
|
24
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
25
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
26
|
+
}
|
|
27
|
+
return to;
|
|
28
|
+
};
|
|
29
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
30
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
31
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
32
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
33
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
34
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
35
|
+
mod
|
|
36
|
+
));
|
|
37
|
+
|
|
38
|
+
export {
|
|
39
|
+
__require,
|
|
40
|
+
__glob,
|
|
41
|
+
__commonJS,
|
|
42
|
+
__toESM
|
|
43
|
+
};
|
|
@@ -0,0 +1,389 @@
|
|
|
1
|
+
import {
|
|
2
|
+
OraculoCarousel_default
|
|
3
|
+
} from "./chunk-VHW77D2M.mjs";
|
|
4
|
+
import {
|
|
5
|
+
OraculoButton
|
|
6
|
+
} from "./chunk-IJQLK4NO.mjs";
|
|
7
|
+
|
|
8
|
+
// src/organisms/OraculoSeccionBonoBienvenida/OraculoSeccionBonoBienvenida.tsx
|
|
9
|
+
import { useRef, useState } from "react";
|
|
10
|
+
import Box2 from "@mui/material/Box";
|
|
11
|
+
import Typography2 from "@mui/material/Typography";
|
|
12
|
+
import useMediaQuery from "@mui/material/useMediaQuery";
|
|
13
|
+
|
|
14
|
+
// src/molecules/OraculoWelcomeBanner/OraculoWelcomeBanner.tsx
|
|
15
|
+
import Box from "@mui/material/Box";
|
|
16
|
+
import Typography from "@mui/material/Typography";
|
|
17
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
18
|
+
var OraculoWelcomeBanner = ({
|
|
19
|
+
title,
|
|
20
|
+
amount,
|
|
21
|
+
subtitle,
|
|
22
|
+
buttonText,
|
|
23
|
+
onButtonClick,
|
|
24
|
+
backgroundImage,
|
|
25
|
+
alt,
|
|
26
|
+
className = "",
|
|
27
|
+
variant = "small"
|
|
28
|
+
}) => {
|
|
29
|
+
const symbol = amount ? amount.slice(0, 2) : "";
|
|
30
|
+
const value = amount ? amount.slice(2) : "";
|
|
31
|
+
const isLarge = variant === "large";
|
|
32
|
+
return /* @__PURE__ */ jsxs(
|
|
33
|
+
Box,
|
|
34
|
+
{
|
|
35
|
+
className,
|
|
36
|
+
sx: {
|
|
37
|
+
position: "relative",
|
|
38
|
+
width: "100%",
|
|
39
|
+
maxWidth: {
|
|
40
|
+
xs: 328,
|
|
41
|
+
lg: isLarge ? 618 : 456
|
|
42
|
+
},
|
|
43
|
+
mx: "auto"
|
|
44
|
+
},
|
|
45
|
+
children: [
|
|
46
|
+
backgroundImage && /* @__PURE__ */ jsx(
|
|
47
|
+
Box,
|
|
48
|
+
{
|
|
49
|
+
sx: {
|
|
50
|
+
position: "relative",
|
|
51
|
+
width: "100%",
|
|
52
|
+
aspectRatio: {
|
|
53
|
+
xs: "328 / 188",
|
|
54
|
+
lg: isLarge ? "618 / 346" : "456 / 272"
|
|
55
|
+
},
|
|
56
|
+
borderRadius: "14px",
|
|
57
|
+
overflow: "hidden"
|
|
58
|
+
},
|
|
59
|
+
children: /* @__PURE__ */ jsx(
|
|
60
|
+
Box,
|
|
61
|
+
{
|
|
62
|
+
component: "img",
|
|
63
|
+
src: backgroundImage,
|
|
64
|
+
alt: alt != null ? alt : "Fondo promocional",
|
|
65
|
+
sx: {
|
|
66
|
+
width: "100%",
|
|
67
|
+
height: "100%",
|
|
68
|
+
objectFit: "cover",
|
|
69
|
+
objectPosition: {
|
|
70
|
+
xs: "50% 0%",
|
|
71
|
+
lg: "45% 0%"
|
|
72
|
+
},
|
|
73
|
+
display: "block"
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
)
|
|
77
|
+
}
|
|
78
|
+
),
|
|
79
|
+
/* @__PURE__ */ jsx(
|
|
80
|
+
Box,
|
|
81
|
+
{
|
|
82
|
+
sx: {
|
|
83
|
+
position: "absolute",
|
|
84
|
+
inset: 0,
|
|
85
|
+
display: "flex",
|
|
86
|
+
alignItems: "center",
|
|
87
|
+
justifyContent: "flex-end",
|
|
88
|
+
color: "#e7f8ff",
|
|
89
|
+
textAlign: "center",
|
|
90
|
+
pl: "14%",
|
|
91
|
+
pr: { xs: "14%", lg: "15%" }
|
|
92
|
+
},
|
|
93
|
+
children: /* @__PURE__ */ jsxs(
|
|
94
|
+
Box,
|
|
95
|
+
{
|
|
96
|
+
sx: {
|
|
97
|
+
maxWidth: "60%",
|
|
98
|
+
display: "flex",
|
|
99
|
+
flexDirection: "column",
|
|
100
|
+
alignItems: "center"
|
|
101
|
+
},
|
|
102
|
+
children: [
|
|
103
|
+
title && /* @__PURE__ */ jsx(
|
|
104
|
+
Typography,
|
|
105
|
+
{
|
|
106
|
+
sx: {
|
|
107
|
+
fontSize: { xs: 12, lg: 20 },
|
|
108
|
+
fontWeight: 400,
|
|
109
|
+
color: "#e7f8ff"
|
|
110
|
+
},
|
|
111
|
+
children: title
|
|
112
|
+
}
|
|
113
|
+
),
|
|
114
|
+
amount && /* @__PURE__ */ jsxs(
|
|
115
|
+
Box,
|
|
116
|
+
{
|
|
117
|
+
component: "p",
|
|
118
|
+
sx: {
|
|
119
|
+
fontFamily: '"secondary", sans-serif',
|
|
120
|
+
lineHeight: { xs: 0.9, lg: 0.87 },
|
|
121
|
+
m: "4px 0",
|
|
122
|
+
background: "linear-gradient(175deg, #EDC421 -12.56%, #FFFABF 17.99%, #EDC421 49.74%)",
|
|
123
|
+
WebkitBackgroundClip: "text",
|
|
124
|
+
WebkitTextFillColor: "transparent",
|
|
125
|
+
WebkitTextStroke: "0.5px #fff8c1",
|
|
126
|
+
filter: "drop-shadow(0px 4px 0px #8D4406) drop-shadow(0px 4px 4px rgba(28, 28, 28, 0.4))",
|
|
127
|
+
display: "flex",
|
|
128
|
+
alignItems: "baseline",
|
|
129
|
+
justifyContent: "center"
|
|
130
|
+
},
|
|
131
|
+
children: [
|
|
132
|
+
/* @__PURE__ */ jsx(
|
|
133
|
+
Box,
|
|
134
|
+
{
|
|
135
|
+
component: "span",
|
|
136
|
+
sx: { fontSize: { xs: 35, lg: 48 }, mr: 0.5 },
|
|
137
|
+
children: symbol
|
|
138
|
+
}
|
|
139
|
+
),
|
|
140
|
+
/* @__PURE__ */ jsx(
|
|
141
|
+
Box,
|
|
142
|
+
{
|
|
143
|
+
component: "span",
|
|
144
|
+
sx: { fontSize: { xs: 52, lg: 77 } },
|
|
145
|
+
children: value
|
|
146
|
+
}
|
|
147
|
+
)
|
|
148
|
+
]
|
|
149
|
+
}
|
|
150
|
+
),
|
|
151
|
+
subtitle && /* @__PURE__ */ jsx(
|
|
152
|
+
Typography,
|
|
153
|
+
{
|
|
154
|
+
sx: {
|
|
155
|
+
pb: "20px",
|
|
156
|
+
fontSize: 14,
|
|
157
|
+
fontWeight: 600,
|
|
158
|
+
color: "#e7f8ff"
|
|
159
|
+
},
|
|
160
|
+
children: subtitle
|
|
161
|
+
}
|
|
162
|
+
),
|
|
163
|
+
buttonText && /* @__PURE__ */ jsx(OraculoButton, { onClick: onButtonClick, children: buttonText })
|
|
164
|
+
]
|
|
165
|
+
}
|
|
166
|
+
)
|
|
167
|
+
}
|
|
168
|
+
)
|
|
169
|
+
]
|
|
170
|
+
}
|
|
171
|
+
);
|
|
172
|
+
};
|
|
173
|
+
var OraculoWelcomeBanner_default = OraculoWelcomeBanner;
|
|
174
|
+
|
|
175
|
+
// src/atoms/OraculoCarouselDots/OraculoCarouselDots.tsx
|
|
176
|
+
import { jsx as jsx2 } from "react/jsx-runtime";
|
|
177
|
+
var OraculoCarouselDots = ({
|
|
178
|
+
total,
|
|
179
|
+
active,
|
|
180
|
+
onSelect,
|
|
181
|
+
className = ""
|
|
182
|
+
}) => {
|
|
183
|
+
if (total <= 1) return null;
|
|
184
|
+
const rootClass = ["orc-dots", className].filter(Boolean).join(" ");
|
|
185
|
+
return /* @__PURE__ */ jsx2("div", { className: rootClass, role: "tablist", children: Array.from({ length: total }).map((_, i) => /* @__PURE__ */ jsx2("span", { className: "orc-dots__cell", children: /* @__PURE__ */ jsx2(
|
|
186
|
+
"button",
|
|
187
|
+
{
|
|
188
|
+
type: "button",
|
|
189
|
+
role: "tab",
|
|
190
|
+
"aria-selected": i === active,
|
|
191
|
+
"aria-label": `Ir al slide ${i + 1}`,
|
|
192
|
+
className: "orc-dots__dot" + (i === active ? " orc-dots__dot--active" : ""),
|
|
193
|
+
onClick: () => onSelect == null ? void 0 : onSelect(i)
|
|
194
|
+
}
|
|
195
|
+
) }, i)) });
|
|
196
|
+
};
|
|
197
|
+
var OraculoCarouselDots_default = OraculoCarouselDots;
|
|
198
|
+
|
|
199
|
+
// src/organisms/OraculoSeccionBonoBienvenida/OraculoSeccionBonoBienvenida.tsx
|
|
200
|
+
import { Fragment, jsx as jsx3, jsxs as jsxs2 } from "react/jsx-runtime";
|
|
201
|
+
var buildSectionSx = (bgUrl) => ({
|
|
202
|
+
width: "100vw",
|
|
203
|
+
position: "relative",
|
|
204
|
+
left: "50%",
|
|
205
|
+
right: "50%",
|
|
206
|
+
marginLeft: "-50vw",
|
|
207
|
+
marginRight: "-50vw",
|
|
208
|
+
py: 8,
|
|
209
|
+
color: "#fff",
|
|
210
|
+
backgroundImage: `
|
|
211
|
+
linear-gradient(to bottom,#121212 0%, rgba(18,18,18,0) 10%),
|
|
212
|
+
linear-gradient(to top, #121212 0%, rgba(18,18,18,0) 10%),
|
|
213
|
+
linear-gradient(to left, #121212 0%, rgba(18,18,18,0) 10%),
|
|
214
|
+
linear-gradient(to right, #121212 0%, rgba(18,18,18,0) 10%),
|
|
215
|
+
url("${bgUrl}")
|
|
216
|
+
`,
|
|
217
|
+
backgroundRepeat: "no-repeat",
|
|
218
|
+
backgroundPosition: "center",
|
|
219
|
+
backgroundSize: "cover"
|
|
220
|
+
});
|
|
221
|
+
var headlineBaseSx = {
|
|
222
|
+
textAlign: "center",
|
|
223
|
+
lineHeight: 1.1,
|
|
224
|
+
mb: 1.5
|
|
225
|
+
};
|
|
226
|
+
var hlTopSx = {
|
|
227
|
+
display: "inline-block",
|
|
228
|
+
fontWeight: 600,
|
|
229
|
+
fontSize: 24
|
|
230
|
+
};
|
|
231
|
+
var hlBottomSx = {
|
|
232
|
+
display: "inline-block",
|
|
233
|
+
fontSize: 24,
|
|
234
|
+
lineHeight: 1.1,
|
|
235
|
+
WebkitTextStroke: "0.3px rgba(255, 255, 255, .5)",
|
|
236
|
+
textShadow: `
|
|
237
|
+
0 0 2px rgba(255, 255, 255, .95),
|
|
238
|
+
0 0 6px rgba(255, 255, 255, .6),
|
|
239
|
+
0 1px 0 rgba(137, 137, 137, .85)
|
|
240
|
+
`
|
|
241
|
+
};
|
|
242
|
+
var OraculoSeccionBonoBienvenida = ({
|
|
243
|
+
headline,
|
|
244
|
+
items,
|
|
245
|
+
backgroundImageUrl
|
|
246
|
+
}) => {
|
|
247
|
+
const [hl1 = "", hl2 = ""] = (headline || "").split("\n");
|
|
248
|
+
const isMobile = useMediaQuery("(max-width: 767px)");
|
|
249
|
+
const showDots = items.length > 1;
|
|
250
|
+
const bgUrl = backgroundImageUrl != null ? backgroundImageUrl : "/assets/img/home/BonoBienvenida/Fondobg.png";
|
|
251
|
+
const sectionSx = buildSectionSx(bgUrl);
|
|
252
|
+
const carouselRef = useRef(null);
|
|
253
|
+
const [navState, setNavState] = useState({ isStart: true, isEnd: false });
|
|
254
|
+
const [activeIndex, setActiveIndex] = useState(0);
|
|
255
|
+
if (isMobile) {
|
|
256
|
+
return /* @__PURE__ */ jsxs2(
|
|
257
|
+
Box2,
|
|
258
|
+
{
|
|
259
|
+
component: "section",
|
|
260
|
+
sx: {
|
|
261
|
+
...sectionSx,
|
|
262
|
+
textAlign: "center"
|
|
263
|
+
},
|
|
264
|
+
children: [
|
|
265
|
+
(hl1 || hl2) && /* @__PURE__ */ jsxs2(Box2, { sx: headlineBaseSx, children: [
|
|
266
|
+
hl1 && /* @__PURE__ */ jsx3(Typography2, { component: "span", sx: hlTopSx, children: hl1 }),
|
|
267
|
+
hl2 && /* @__PURE__ */ jsxs2(Fragment, { children: [
|
|
268
|
+
/* @__PURE__ */ jsx3("br", {}),
|
|
269
|
+
/* @__PURE__ */ jsx3(Typography2, { component: "span", sx: hlBottomSx, children: hl2 })
|
|
270
|
+
] })
|
|
271
|
+
] }),
|
|
272
|
+
/* @__PURE__ */ jsxs2(Box2, { children: [
|
|
273
|
+
/* @__PURE__ */ jsx3(
|
|
274
|
+
OraculoCarousel_default,
|
|
275
|
+
{
|
|
276
|
+
ref: carouselRef,
|
|
277
|
+
items,
|
|
278
|
+
perPage: 1,
|
|
279
|
+
gap: "12px",
|
|
280
|
+
breakpoints: {
|
|
281
|
+
480: {
|
|
282
|
+
perPage: 1,
|
|
283
|
+
gap: "8px",
|
|
284
|
+
padding: { left: "8px", right: "8px" }
|
|
285
|
+
},
|
|
286
|
+
768: {
|
|
287
|
+
perPage: 1,
|
|
288
|
+
gap: "12px",
|
|
289
|
+
padding: { left: "8px", right: "8px" }
|
|
290
|
+
}
|
|
291
|
+
},
|
|
292
|
+
options: {
|
|
293
|
+
autoWidth: false
|
|
294
|
+
},
|
|
295
|
+
renderItem: (it) => /* @__PURE__ */ jsx3(OraculoWelcomeBanner_default, { ...it, onButtonClick: items[0].onButtonClick }),
|
|
296
|
+
onMove: ({ index, isStart, isEnd }) => {
|
|
297
|
+
setNavState({ isStart, isEnd });
|
|
298
|
+
setActiveIndex(index);
|
|
299
|
+
}
|
|
300
|
+
}
|
|
301
|
+
),
|
|
302
|
+
showDots && /* @__PURE__ */ jsx3(
|
|
303
|
+
OraculoCarouselDots_default,
|
|
304
|
+
{
|
|
305
|
+
total: items.length,
|
|
306
|
+
active: activeIndex,
|
|
307
|
+
onSelect: (i) => {
|
|
308
|
+
var _a;
|
|
309
|
+
setActiveIndex(i);
|
|
310
|
+
(_a = carouselRef.current) == null ? void 0 : _a.go(i);
|
|
311
|
+
}
|
|
312
|
+
}
|
|
313
|
+
)
|
|
314
|
+
] })
|
|
315
|
+
]
|
|
316
|
+
}
|
|
317
|
+
);
|
|
318
|
+
}
|
|
319
|
+
return /* @__PURE__ */ jsx3(Box2, { component: "section", sx: sectionSx, children: /* @__PURE__ */ jsxs2(
|
|
320
|
+
Box2,
|
|
321
|
+
{
|
|
322
|
+
sx: {
|
|
323
|
+
maxWidth: 1200,
|
|
324
|
+
mx: 5,
|
|
325
|
+
px: 2,
|
|
326
|
+
display: "grid",
|
|
327
|
+
gridTemplateColumns: "200px auto",
|
|
328
|
+
alignItems: "center"
|
|
329
|
+
},
|
|
330
|
+
children: [
|
|
331
|
+
(hl1 || hl2) && /* @__PURE__ */ jsx3(
|
|
332
|
+
Box2,
|
|
333
|
+
{
|
|
334
|
+
sx: {
|
|
335
|
+
display: "flex",
|
|
336
|
+
alignItems: "center",
|
|
337
|
+
justifyContent: "flex-start",
|
|
338
|
+
minHeight: "100%"
|
|
339
|
+
},
|
|
340
|
+
children: /* @__PURE__ */ jsxs2(
|
|
341
|
+
Box2,
|
|
342
|
+
{
|
|
343
|
+
sx: {
|
|
344
|
+
...headlineBaseSx,
|
|
345
|
+
textAlign: "left",
|
|
346
|
+
mb: 0
|
|
347
|
+
},
|
|
348
|
+
children: [
|
|
349
|
+
hl1 && /* @__PURE__ */ jsx3(Typography2, { component: "span", sx: hlTopSx, children: hl1 }),
|
|
350
|
+
hl2 && /* @__PURE__ */ jsxs2(Fragment, { children: [
|
|
351
|
+
/* @__PURE__ */ jsx3("br", {}),
|
|
352
|
+
/* @__PURE__ */ jsx3(Typography2, { component: "span", sx: hlBottomSx, children: hl2 })
|
|
353
|
+
] })
|
|
354
|
+
]
|
|
355
|
+
}
|
|
356
|
+
)
|
|
357
|
+
}
|
|
358
|
+
),
|
|
359
|
+
/* @__PURE__ */ jsx3(
|
|
360
|
+
Box2,
|
|
361
|
+
{
|
|
362
|
+
sx: {
|
|
363
|
+
display: "flex",
|
|
364
|
+
justifyContent: "center",
|
|
365
|
+
alignItems: "center",
|
|
366
|
+
flexWrap: "nowrap",
|
|
367
|
+
gap: 4
|
|
368
|
+
},
|
|
369
|
+
children: items.map((it, idx) => /* @__PURE__ */ jsx3(
|
|
370
|
+
OraculoWelcomeBanner_default,
|
|
371
|
+
{
|
|
372
|
+
onButtonClick: it.onButtonClick,
|
|
373
|
+
...it
|
|
374
|
+
},
|
|
375
|
+
idx
|
|
376
|
+
))
|
|
377
|
+
}
|
|
378
|
+
)
|
|
379
|
+
]
|
|
380
|
+
}
|
|
381
|
+
) });
|
|
382
|
+
};
|
|
383
|
+
var OraculoSeccionBonoBienvenida_default = OraculoSeccionBonoBienvenida;
|
|
384
|
+
|
|
385
|
+
export {
|
|
386
|
+
OraculoCarouselDots_default,
|
|
387
|
+
OraculoWelcomeBanner_default,
|
|
388
|
+
OraculoSeccionBonoBienvenida_default
|
|
389
|
+
};
|
|
@@ -0,0 +1,175 @@
|
|
|
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
|
+
};
|