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.
Files changed (29) hide show
  1. package/dist/{OraculoSeccionBonoBienvenida-EDS6UQVL.mjs → OraculoSeccionBonoBienvenida-2APXZQQA.mjs} +1 -2
  2. package/dist/{OraculoSeccionCasino-GXRRODCJ.mjs → OraculoSeccionCasino-H6CXFXMN.mjs} +5 -4
  3. package/dist/{OraculoSeccionVirtuales-OP2CSKUP.css → OraculoSeccionCasino-RFXPS2MW.css} +181 -0
  4. package/dist/OraculoSeccionCasino-WBPCNYC5.mjs +12 -0
  5. package/dist/OraculoSeccionDestacados-EPL4KZCF.mjs +12 -0
  6. package/dist/OraculoSeccionDestacados-IMREYQ6W.mjs +12 -0
  7. package/dist/OraculoSeccionTopJuegos-DWEO36ND.mjs +12 -0
  8. package/dist/OraculoSeccionTopJuegos-FKAD2YD3.mjs +12 -0
  9. package/dist/{OraculoSeccionCasino-Q2VV44XD.css → OraculoSeccionTopJuegos-FMFAEVQK.css} +181 -0
  10. package/dist/OraculoSeccionVirtuales-6RBECPDW.css +397 -0
  11. package/dist/{OraculoSeccionVirtuales-MGW5X23B.mjs → OraculoSeccionVirtuales-IBYOMEJV.mjs} +5 -4
  12. package/dist/OraculoSeccionVirtuales-N2ETKRK7.mjs +12 -0
  13. package/dist/{chunk-WPLILXPP.mjs → chunk-4LBAYKDQ.mjs} +116 -30
  14. package/dist/{chunk-PXIOKT7L.mjs → chunk-ECHAXSTL.mjs} +817 -97
  15. package/dist/chunk-VYYKDD5L.mjs +39899 -0
  16. package/dist/index.d.mts +2 -1
  17. package/dist/index.d.ts +2 -1
  18. package/dist/index.js +194 -162
  19. package/dist/index.mjs +11 -23
  20. package/package.json +1 -1
  21. package/dist/OraculoSeccionDestacados-QU6BT2NM.mjs +0 -18
  22. package/dist/OraculoSeccionTopJuegos-3AR4L7SZ.css +0 -59
  23. package/dist/OraculoSeccionTopJuegos-FZUYQEMC.mjs +0 -8
  24. package/dist/chunk-5GTDKE3I.mjs +0 -30
  25. package/dist/chunk-AFPCFXMZ.mjs +0 -174
  26. package/dist/chunk-AIT7B2J3.mjs +0 -192
  27. package/dist/chunk-DKP3HTEP.mjs +0 -183
  28. package/dist/chunk-VHW77D2M.mjs +0 -91
  29. package/dist/chunk-YY5T37WR.mjs +0 -175
@@ -1,20 +1,105 @@
1
- import {
2
- OraculoCarousel_default
3
- } from "./chunk-VHW77D2M.mjs";
4
1
  import {
5
2
  OraculoButton
6
3
  } from "./chunk-IJQLK4NO.mjs";
7
4
 
8
5
  // src/organisms/OraculoSeccionBonoBienvenida/OraculoSeccionBonoBienvenida.tsx
9
- import { useRef, useState } from "react";
6
+ import { useRef as useRef2, useState } from "react";
10
7
  import Box2 from "@mui/material/Box";
11
8
  import Typography2 from "@mui/material/Typography";
12
9
  import useMediaQuery from "@mui/material/useMediaQuery";
13
10
 
11
+ // src/molecules/OraculoCarousel/OraculoCarousel.tsx
12
+ import {
13
+ forwardRef,
14
+ useCallback,
15
+ useImperativeHandle,
16
+ useRef
17
+ } from "react";
18
+ import {
19
+ Splide as SplideRaw,
20
+ SplideSlide as SplideSlideRaw
21
+ } from "@splidejs/react-splide";
22
+ import { jsx } from "react/jsx-runtime";
23
+ var Splide = SplideRaw;
24
+ var SplideSlide = SplideSlideRaw;
25
+ var OraculoCarousel = forwardRef(
26
+ ({
27
+ items = [],
28
+ renderItem,
29
+ perPage = 1,
30
+ gap = "0px",
31
+ breakpoints,
32
+ options = {},
33
+ className = "",
34
+ onMove
35
+ }, ref) => {
36
+ const splideRef = useRef(null);
37
+ useImperativeHandle(ref, () => ({
38
+ next: () => {
39
+ var _a;
40
+ return (_a = splideRef.current) == null ? void 0 : _a.go(">");
41
+ },
42
+ prev: () => {
43
+ var _a;
44
+ return (_a = splideRef.current) == null ? void 0 : _a.go("<");
45
+ },
46
+ go: (index) => {
47
+ var _a;
48
+ return (_a = splideRef.current) == null ? void 0 : _a.go(index);
49
+ }
50
+ }));
51
+ const handleMove = useCallback(
52
+ (splide) => {
53
+ const index = splide.index;
54
+ const total = splide.length;
55
+ const currentPerPage = splide.options.perPage || 1;
56
+ const isStart = index === 0;
57
+ const isEnd = index >= total - currentPerPage;
58
+ onMove == null ? void 0 : onMove({ index, isStart, isEnd, total });
59
+ },
60
+ [onMove]
61
+ );
62
+ const handleMounted = useCallback(
63
+ (splide) => {
64
+ handleMove(splide);
65
+ },
66
+ [handleMove]
67
+ );
68
+ const mergedOptions = {
69
+ type: "slide",
70
+ trimSpace: false,
71
+ drag: true,
72
+ pagination: false,
73
+ arrows: false,
74
+ rewind: false,
75
+ focus: "start",
76
+ autoWidth: false,
77
+ perPage,
78
+ gap,
79
+ breakpoints,
80
+ ...options
81
+ };
82
+ return /* @__PURE__ */ jsx("div", { className, style: { width: "100%" }, children: /* @__PURE__ */ jsx(
83
+ Splide,
84
+ {
85
+ ref: splideRef,
86
+ options: mergedOptions,
87
+ onMove: handleMove,
88
+ onMounted: handleMounted,
89
+ children: items.map((item, index) => {
90
+ var _a;
91
+ return /* @__PURE__ */ jsx(SplideSlide, { children: renderItem(item, index) }, (_a = item.id) != null ? _a : index);
92
+ })
93
+ }
94
+ ) });
95
+ }
96
+ );
97
+ var OraculoCarousel_default = OraculoCarousel;
98
+
14
99
  // src/molecules/OraculoWelcomeBanner/OraculoWelcomeBanner.tsx
15
100
  import Box from "@mui/material/Box";
16
101
  import Typography from "@mui/material/Typography";
17
- import { jsx, jsxs } from "react/jsx-runtime";
102
+ import { jsx as jsx2, jsxs } from "react/jsx-runtime";
18
103
  var OraculoWelcomeBanner = ({
19
104
  title,
20
105
  amount,
@@ -43,7 +128,7 @@ var OraculoWelcomeBanner = ({
43
128
  mx: "auto"
44
129
  },
45
130
  children: [
46
- backgroundImage && /* @__PURE__ */ jsx(
131
+ backgroundImage && /* @__PURE__ */ jsx2(
47
132
  Box,
48
133
  {
49
134
  sx: {
@@ -56,7 +141,7 @@ var OraculoWelcomeBanner = ({
56
141
  borderRadius: "14px",
57
142
  overflow: "hidden"
58
143
  },
59
- children: /* @__PURE__ */ jsx(
144
+ children: /* @__PURE__ */ jsx2(
60
145
  Box,
61
146
  {
62
147
  component: "img",
@@ -76,7 +161,7 @@ var OraculoWelcomeBanner = ({
76
161
  )
77
162
  }
78
163
  ),
79
- /* @__PURE__ */ jsx(
164
+ /* @__PURE__ */ jsx2(
80
165
  Box,
81
166
  {
82
167
  sx: {
@@ -100,7 +185,7 @@ var OraculoWelcomeBanner = ({
100
185
  alignItems: "center"
101
186
  },
102
187
  children: [
103
- title && /* @__PURE__ */ jsx(
188
+ title && /* @__PURE__ */ jsx2(
104
189
  Typography,
105
190
  {
106
191
  sx: {
@@ -129,7 +214,7 @@ var OraculoWelcomeBanner = ({
129
214
  justifyContent: "center"
130
215
  },
131
216
  children: [
132
- /* @__PURE__ */ jsx(
217
+ /* @__PURE__ */ jsx2(
133
218
  Box,
134
219
  {
135
220
  component: "span",
@@ -137,7 +222,7 @@ var OraculoWelcomeBanner = ({
137
222
  children: symbol
138
223
  }
139
224
  ),
140
- /* @__PURE__ */ jsx(
225
+ /* @__PURE__ */ jsx2(
141
226
  Box,
142
227
  {
143
228
  component: "span",
@@ -148,7 +233,7 @@ var OraculoWelcomeBanner = ({
148
233
  ]
149
234
  }
150
235
  ),
151
- subtitle && /* @__PURE__ */ jsx(
236
+ subtitle && /* @__PURE__ */ jsx2(
152
237
  Typography,
153
238
  {
154
239
  sx: {
@@ -160,7 +245,7 @@ var OraculoWelcomeBanner = ({
160
245
  children: subtitle
161
246
  }
162
247
  ),
163
- buttonText && /* @__PURE__ */ jsx(OraculoButton, { onClick: onButtonClick, children: buttonText })
248
+ buttonText && /* @__PURE__ */ jsx2(OraculoButton, { onClick: onButtonClick, children: buttonText })
164
249
  ]
165
250
  }
166
251
  )
@@ -173,7 +258,7 @@ var OraculoWelcomeBanner = ({
173
258
  var OraculoWelcomeBanner_default = OraculoWelcomeBanner;
174
259
 
175
260
  // src/atoms/OraculoCarouselDots/OraculoCarouselDots.tsx
176
- import { jsx as jsx2 } from "react/jsx-runtime";
261
+ import { jsx as jsx3 } from "react/jsx-runtime";
177
262
  var OraculoCarouselDots = ({
178
263
  total,
179
264
  active,
@@ -182,7 +267,7 @@ var OraculoCarouselDots = ({
182
267
  }) => {
183
268
  if (total <= 1) return null;
184
269
  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(
270
+ return /* @__PURE__ */ jsx3("div", { className: rootClass, role: "tablist", children: Array.from({ length: total }).map((_, i) => /* @__PURE__ */ jsx3("span", { className: "orc-dots__cell", children: /* @__PURE__ */ jsx3(
186
271
  "button",
187
272
  {
188
273
  type: "button",
@@ -197,7 +282,7 @@ var OraculoCarouselDots = ({
197
282
  var OraculoCarouselDots_default = OraculoCarouselDots;
198
283
 
199
284
  // src/organisms/OraculoSeccionBonoBienvenida/OraculoSeccionBonoBienvenida.tsx
200
- import { Fragment, jsx as jsx3, jsxs as jsxs2 } from "react/jsx-runtime";
285
+ import { Fragment, jsx as jsx4, jsxs as jsxs2 } from "react/jsx-runtime";
201
286
  var buildSectionSx = (bgUrl) => ({
202
287
  width: "100vw",
203
288
  position: "relative",
@@ -249,7 +334,7 @@ var OraculoSeccionBonoBienvenida = ({
249
334
  const showDots = items.length > 1;
250
335
  const bgUrl = backgroundImageUrl != null ? backgroundImageUrl : "/assets/img/home/BonoBienvenida/Fondobg.png";
251
336
  const sectionSx = buildSectionSx(bgUrl);
252
- const carouselRef = useRef(null);
337
+ const carouselRef = useRef2(null);
253
338
  const [navState, setNavState] = useState({ isStart: true, isEnd: false });
254
339
  const [activeIndex, setActiveIndex] = useState(0);
255
340
  if (isMobile) {
@@ -263,14 +348,14 @@ var OraculoSeccionBonoBienvenida = ({
263
348
  },
264
349
  children: [
265
350
  (hl1 || hl2) && /* @__PURE__ */ jsxs2(Box2, { sx: headlineBaseSx, children: [
266
- hl1 && /* @__PURE__ */ jsx3(Typography2, { component: "span", sx: hlTopSx, children: hl1 }),
351
+ hl1 && /* @__PURE__ */ jsx4(Typography2, { component: "span", sx: hlTopSx, children: hl1 }),
267
352
  hl2 && /* @__PURE__ */ jsxs2(Fragment, { children: [
268
- /* @__PURE__ */ jsx3("br", {}),
269
- /* @__PURE__ */ jsx3(Typography2, { component: "span", sx: hlBottomSx, children: hl2 })
353
+ /* @__PURE__ */ jsx4("br", {}),
354
+ /* @__PURE__ */ jsx4(Typography2, { component: "span", sx: hlBottomSx, children: hl2 })
270
355
  ] })
271
356
  ] }),
272
357
  /* @__PURE__ */ jsxs2(Box2, { children: [
273
- /* @__PURE__ */ jsx3(
358
+ /* @__PURE__ */ jsx4(
274
359
  OraculoCarousel_default,
275
360
  {
276
361
  ref: carouselRef,
@@ -292,14 +377,14 @@ var OraculoSeccionBonoBienvenida = ({
292
377
  options: {
293
378
  autoWidth: false
294
379
  },
295
- renderItem: (it) => /* @__PURE__ */ jsx3(OraculoWelcomeBanner_default, { ...it, onButtonClick: items[0].onButtonClick }),
380
+ renderItem: (it) => /* @__PURE__ */ jsx4(OraculoWelcomeBanner_default, { ...it, onButtonClick: items[0].onButtonClick }),
296
381
  onMove: ({ index, isStart, isEnd }) => {
297
382
  setNavState({ isStart, isEnd });
298
383
  setActiveIndex(index);
299
384
  }
300
385
  }
301
386
  ),
302
- showDots && /* @__PURE__ */ jsx3(
387
+ showDots && /* @__PURE__ */ jsx4(
303
388
  OraculoCarouselDots_default,
304
389
  {
305
390
  total: items.length,
@@ -316,7 +401,7 @@ var OraculoSeccionBonoBienvenida = ({
316
401
  }
317
402
  );
318
403
  }
319
- return /* @__PURE__ */ jsx3(Box2, { component: "section", sx: sectionSx, children: /* @__PURE__ */ jsxs2(
404
+ return /* @__PURE__ */ jsx4(Box2, { component: "section", sx: sectionSx, children: /* @__PURE__ */ jsxs2(
320
405
  Box2,
321
406
  {
322
407
  sx: {
@@ -328,7 +413,7 @@ var OraculoSeccionBonoBienvenida = ({
328
413
  alignItems: "center"
329
414
  },
330
415
  children: [
331
- (hl1 || hl2) && /* @__PURE__ */ jsx3(
416
+ (hl1 || hl2) && /* @__PURE__ */ jsx4(
332
417
  Box2,
333
418
  {
334
419
  sx: {
@@ -346,17 +431,17 @@ var OraculoSeccionBonoBienvenida = ({
346
431
  mb: 0
347
432
  },
348
433
  children: [
349
- hl1 && /* @__PURE__ */ jsx3(Typography2, { component: "span", sx: hlTopSx, children: hl1 }),
434
+ hl1 && /* @__PURE__ */ jsx4(Typography2, { component: "span", sx: hlTopSx, children: hl1 }),
350
435
  hl2 && /* @__PURE__ */ jsxs2(Fragment, { children: [
351
- /* @__PURE__ */ jsx3("br", {}),
352
- /* @__PURE__ */ jsx3(Typography2, { component: "span", sx: hlBottomSx, children: hl2 })
436
+ /* @__PURE__ */ jsx4("br", {}),
437
+ /* @__PURE__ */ jsx4(Typography2, { component: "span", sx: hlBottomSx, children: hl2 })
353
438
  ] })
354
439
  ]
355
440
  }
356
441
  )
357
442
  }
358
443
  ),
359
- /* @__PURE__ */ jsx3(
444
+ /* @__PURE__ */ jsx4(
360
445
  Box2,
361
446
  {
362
447
  sx: {
@@ -366,7 +451,7 @@ var OraculoSeccionBonoBienvenida = ({
366
451
  flexWrap: "nowrap",
367
452
  gap: 4
368
453
  },
369
- children: items.map((it, idx) => /* @__PURE__ */ jsx3(
454
+ children: items.map((it, idx) => /* @__PURE__ */ jsx4(
370
455
  OraculoWelcomeBanner_default,
371
456
  {
372
457
  onButtonClick: it.onButtonClick,
@@ -384,6 +469,7 @@ var OraculoSeccionBonoBienvenida_default = OraculoSeccionBonoBienvenida;
384
469
 
385
470
  export {
386
471
  OraculoCarouselDots_default,
472
+ OraculoCarousel_default,
387
473
  OraculoWelcomeBanner_default,
388
474
  OraculoSeccionBonoBienvenida_default
389
475
  };