oraculo-ui 0.1.2 → 0.1.3

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.d.mts CHANGED
@@ -113,7 +113,7 @@ interface OraculoGameSlideItem {
113
113
  interface OraculoGameSlideProps {
114
114
  items: OraculoGameSlideItem[];
115
115
  layout?: "mosaic" | "grid";
116
- onClick?: (item: OraculoGameSlideItem) => void;
116
+ onClick?: (item: OraculoGameSlideItem, index: number) => void;
117
117
  }
118
118
  declare const OraculoGameSlide: React.FC<OraculoGameSlideProps>;
119
119
 
@@ -178,12 +178,14 @@ interface OraculoSeccionTopJuegosProps {
178
178
  items: OraculoTopJuegoItem[];
179
179
  title?: string;
180
180
  iconUrl?: string;
181
- onCardClick?: (juego: OraculoTopJuegoItem, index: number) => void;
181
+ onCardClick?: () => void;
182
182
  className?: string;
183
183
  }
184
184
  declare function OraculoSeccionTopJuegos({ items, title, iconUrl, onCardClick, className, }: OraculoSeccionTopJuegosProps): react_jsx_runtime.JSX.Element;
185
185
 
186
186
  interface OraculoLiveCasinoItem {
187
+ orden?: number;
188
+ logo?: string;
187
189
  machine?: number | string;
188
190
  name?: string;
189
191
  web_name?: string;
@@ -193,7 +195,6 @@ interface OraculoLiveCasinoItem {
193
195
  type?: string;
194
196
  tags?: string;
195
197
  lobby_tag?: string | null;
196
- logo?: string;
197
198
  background?: string;
198
199
  rtp?: number;
199
200
  demo_allowed?: boolean;
@@ -212,10 +213,9 @@ interface OraculoSeccionCasinoEnVivoProps {
212
213
  declare const OraculoSeccionCasinoEnVivo: React.FC<OraculoSeccionCasinoEnVivoProps>;
213
214
 
214
215
  interface OraculoGameItem {
215
- id?: string | number;
216
- machine?: number | string;
216
+ orden?: string | number;
217
217
  logo?: string;
218
- imageUrl?: string;
218
+ machine?: number | string;
219
219
  name?: string;
220
220
  web_name?: string;
221
221
  provider?: string;
@@ -257,7 +257,6 @@ interface OraculoSeccionBonoBienvenidaProps {
257
257
  /** Título principal, admite salto con "\n" para dos líneas */
258
258
  headline?: string;
259
259
  items: OraculoWelcomeBannerProps[];
260
- /** Fondo de la sección (full width) */
261
260
  backgroundImageUrl?: string;
262
261
  }
263
262
  declare const OraculoSeccionBonoBienvenida: React.FC<OraculoSeccionBonoBienvenidaProps>;
package/dist/index.d.ts CHANGED
@@ -113,7 +113,7 @@ interface OraculoGameSlideItem {
113
113
  interface OraculoGameSlideProps {
114
114
  items: OraculoGameSlideItem[];
115
115
  layout?: "mosaic" | "grid";
116
- onClick?: (item: OraculoGameSlideItem) => void;
116
+ onClick?: (item: OraculoGameSlideItem, index: number) => void;
117
117
  }
118
118
  declare const OraculoGameSlide: React.FC<OraculoGameSlideProps>;
119
119
 
@@ -178,12 +178,14 @@ interface OraculoSeccionTopJuegosProps {
178
178
  items: OraculoTopJuegoItem[];
179
179
  title?: string;
180
180
  iconUrl?: string;
181
- onCardClick?: (juego: OraculoTopJuegoItem, index: number) => void;
181
+ onCardClick?: () => void;
182
182
  className?: string;
183
183
  }
184
184
  declare function OraculoSeccionTopJuegos({ items, title, iconUrl, onCardClick, className, }: OraculoSeccionTopJuegosProps): react_jsx_runtime.JSX.Element;
185
185
 
186
186
  interface OraculoLiveCasinoItem {
187
+ orden?: number;
188
+ logo?: string;
187
189
  machine?: number | string;
188
190
  name?: string;
189
191
  web_name?: string;
@@ -193,7 +195,6 @@ interface OraculoLiveCasinoItem {
193
195
  type?: string;
194
196
  tags?: string;
195
197
  lobby_tag?: string | null;
196
- logo?: string;
197
198
  background?: string;
198
199
  rtp?: number;
199
200
  demo_allowed?: boolean;
@@ -212,10 +213,9 @@ interface OraculoSeccionCasinoEnVivoProps {
212
213
  declare const OraculoSeccionCasinoEnVivo: React.FC<OraculoSeccionCasinoEnVivoProps>;
213
214
 
214
215
  interface OraculoGameItem {
215
- id?: string | number;
216
- machine?: number | string;
216
+ orden?: string | number;
217
217
  logo?: string;
218
- imageUrl?: string;
218
+ machine?: number | string;
219
219
  name?: string;
220
220
  web_name?: string;
221
221
  provider?: string;
@@ -257,7 +257,6 @@ interface OraculoSeccionBonoBienvenidaProps {
257
257
  /** Título principal, admite salto con "\n" para dos líneas */
258
258
  headline?: string;
259
259
  items: OraculoWelcomeBannerProps[];
260
- /** Fondo de la sección (full width) */
261
260
  backgroundImageUrl?: string;
262
261
  }
263
262
  declare const OraculoSeccionBonoBienvenida: React.FC<OraculoSeccionBonoBienvenidaProps>;
package/dist/index.js CHANGED
@@ -558,12 +558,12 @@ var OraculoGameSlide = ({
558
558
  {
559
559
  imageUrl: big.imageUrl,
560
560
  size: "lg",
561
- onClick: () => onClick == null ? void 0 : onClick(big)
561
+ onClick: () => onClick == null ? void 0 : onClick(big, 0)
562
562
  }
563
563
  )
564
564
  }
565
565
  ),
566
- smalls.map((it) => /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
566
+ smalls.map((it, index) => /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
567
567
  import_Box4.default,
568
568
  {
569
569
  sx: {
@@ -578,7 +578,7 @@ var OraculoGameSlide = ({
578
578
  {
579
579
  imageUrl: it.imageUrl,
580
580
  size: "sm",
581
- onClick: () => onClick == null ? void 0 : onClick(it)
581
+ onClick: () => onClick == null ? void 0 : onClick(it, index)
582
582
  }
583
583
  )
584
584
  },
@@ -608,12 +608,12 @@ var OraculoGameSlide = ({
608
608
  "& > *": { width: "100%", height: "100%" }
609
609
  }
610
610
  },
611
- children: items.map((it) => /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(import_Box4.default, { children: /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
611
+ children: items.map((it, index) => /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(import_Box4.default, { children: /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
612
612
  OraculoGameCard_default,
613
613
  {
614
614
  imageUrl: it.imageUrl,
615
615
  size: "sm",
616
- onClick: () => onClick == null ? void 0 : onClick(it)
616
+ onClick: () => onClick == null ? void 0 : onClick(it, index)
617
617
  }
618
618
  ) }, it.id))
619
619
  }
@@ -726,6 +726,7 @@ var OraculoWelcomeBanner = ({
726
726
  {
727
727
  component: "p",
728
728
  sx: {
729
+ fontFamily: '"secondary", sans-serif',
729
730
  lineHeight: { xs: 0.9, lg: 0.87 },
730
731
  m: "4px 0",
731
732
  background: "linear-gradient(175deg, #EDC421 -12.56%, #FFFABF 17.99%, #EDC421 49.74%)",
@@ -1004,7 +1005,7 @@ function OraculoSeccionTopJuegos({
1004
1005
  OraculoGameRankCard,
1005
1006
  {
1006
1007
  imageUrl: juego.logo || "",
1007
- orden: juego.orden,
1008
+ orden: juego.orden || idx + 1,
1008
1009
  onClick: () => console.log(juego.machine)
1009
1010
  },
1010
1011
  juego.machine
@@ -1144,7 +1145,7 @@ var OraculoSeccionCasinoEnVivo = ({
1144
1145
  machine: juego.machine,
1145
1146
  onClick: () => onCardClick == null ? void 0 : onCardClick(juego, idx)
1146
1147
  },
1147
- (_a = juego.machine) != null ? _a : idx
1148
+ (_a = juego.orden) != null ? _a : idx
1148
1149
  );
1149
1150
  })
1150
1151
  }
@@ -1174,10 +1175,10 @@ var import_Box8 = __toESM(require("@mui/material/Box"));
1174
1175
  var import_jsx_runtime16 = require("react/jsx-runtime");
1175
1176
  var buildCasinoSlides = (games, mosaicFirst = true, gridSize = 4) => {
1176
1177
  const baseItems = games.map((g, idx) => {
1177
- var _a, _b, _c, _d;
1178
+ var _a, _b, _c;
1178
1179
  return {
1179
- id: (_b = (_a = g.id) != null ? _a : g.machine) != null ? _b : idx,
1180
- imageUrl: (_d = (_c = g.imageUrl) != null ? _c : g.logo) != null ? _d : ""
1180
+ id: (_b = (_a = g.orden) != null ? _a : g.machine) != null ? _b : idx,
1181
+ imageUrl: (_c = g.logo) != null ? _c : ""
1181
1182
  };
1182
1183
  });
1183
1184
  if (!baseItems.length) return [];
@@ -1309,8 +1310,8 @@ var OraculoSeccionCasino = ({
1309
1310
  onClick: (itm) => {
1310
1311
  const game = items.find(
1311
1312
  (g, idx) => {
1312
- var _a, _b;
1313
- return ((_b = (_a = g.id) != null ? _a : g.machine) != null ? _b : idx) === itm.id;
1313
+ var _a;
1314
+ return ((_a = g.orden) != null ? _a : idx) === itm.id;
1314
1315
  }
1315
1316
  );
1316
1317
  if (game) onItemClick == null ? void 0 : onItemClick(game);
@@ -1331,10 +1332,10 @@ var import_Box9 = __toESM(require("@mui/material/Box"));
1331
1332
  var import_jsx_runtime17 = require("react/jsx-runtime");
1332
1333
  var buildVirtualSlides = (games, mosaicFirst = true, gridSize = 4) => {
1333
1334
  const baseItems = games.map((g, idx) => {
1334
- var _a, _b, _c, _d;
1335
+ var _a, _b;
1335
1336
  return {
1336
- id: (_b = (_a = g.id) != null ? _a : g.machine) != null ? _b : idx,
1337
- imageUrl: (_d = (_c = g.imageUrl) != null ? _c : g.logo) != null ? _d : ""
1337
+ id: (_a = g.orden) != null ? _a : idx,
1338
+ imageUrl: (_b = g.logo) != null ? _b : ""
1338
1339
  };
1339
1340
  });
1340
1341
  if (!baseItems.length) return [];
@@ -1467,8 +1468,8 @@ var OraculoSeccionVirtuales = ({
1467
1468
  onClick: (itm) => {
1468
1469
  const game = items.find(
1469
1470
  (g, idx) => {
1470
- var _a, _b;
1471
- return ((_b = (_a = g.id) != null ? _a : g.machine) != null ? _b : idx) === itm.id;
1471
+ var _a;
1472
+ return ((_a = g.orden) != null ? _a : idx) === itm.id;
1472
1473
  }
1473
1474
  );
1474
1475
  if (game) onItemClick == null ? void 0 : onItemClick(game);
@@ -1582,7 +1583,7 @@ var OraculoSeccionBonoBienvenida = ({
1582
1583
  options: {
1583
1584
  autoWidth: false
1584
1585
  },
1585
- renderItem: (it) => /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(OraculoWelcomeBanner_default, { ...it }),
1586
+ renderItem: (it) => /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(OraculoWelcomeBanner_default, { ...it, onButtonClick: items[0].onButtonClick }),
1586
1587
  onMove: ({ index, isStart, isEnd }) => {
1587
1588
  setNavState({ isStart, isEnd });
1588
1589
  setActiveIndex(index);
@@ -1659,6 +1660,7 @@ var OraculoSeccionBonoBienvenida = ({
1659
1660
  children: items.map((it, idx) => /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
1660
1661
  OraculoWelcomeBanner_default,
1661
1662
  {
1663
+ onButtonClick: it.onButtonClick,
1662
1664
  ...it
1663
1665
  },
1664
1666
  idx
package/dist/index.mjs CHANGED
@@ -514,12 +514,12 @@ var OraculoGameSlide = ({
514
514
  {
515
515
  imageUrl: big.imageUrl,
516
516
  size: "lg",
517
- onClick: () => onClick == null ? void 0 : onClick(big)
517
+ onClick: () => onClick == null ? void 0 : onClick(big, 0)
518
518
  }
519
519
  )
520
520
  }
521
521
  ),
522
- smalls.map((it) => /* @__PURE__ */ jsx8(
522
+ smalls.map((it, index) => /* @__PURE__ */ jsx8(
523
523
  Box4,
524
524
  {
525
525
  sx: {
@@ -534,7 +534,7 @@ var OraculoGameSlide = ({
534
534
  {
535
535
  imageUrl: it.imageUrl,
536
536
  size: "sm",
537
- onClick: () => onClick == null ? void 0 : onClick(it)
537
+ onClick: () => onClick == null ? void 0 : onClick(it, index)
538
538
  }
539
539
  )
540
540
  },
@@ -564,12 +564,12 @@ var OraculoGameSlide = ({
564
564
  "& > *": { width: "100%", height: "100%" }
565
565
  }
566
566
  },
567
- children: items.map((it) => /* @__PURE__ */ jsx8(Box4, { children: /* @__PURE__ */ jsx8(
567
+ children: items.map((it, index) => /* @__PURE__ */ jsx8(Box4, { children: /* @__PURE__ */ jsx8(
568
568
  OraculoGameCard_default,
569
569
  {
570
570
  imageUrl: it.imageUrl,
571
571
  size: "sm",
572
- onClick: () => onClick == null ? void 0 : onClick(it)
572
+ onClick: () => onClick == null ? void 0 : onClick(it, index)
573
573
  }
574
574
  ) }, it.id))
575
575
  }
@@ -682,6 +682,7 @@ var OraculoWelcomeBanner = ({
682
682
  {
683
683
  component: "p",
684
684
  sx: {
685
+ fontFamily: '"secondary", sans-serif',
685
686
  lineHeight: { xs: 0.9, lg: 0.87 },
686
687
  m: "4px 0",
687
688
  background: "linear-gradient(175deg, #EDC421 -12.56%, #FFFABF 17.99%, #EDC421 49.74%)",
@@ -960,7 +961,7 @@ function OraculoSeccionTopJuegos({
960
961
  OraculoGameRankCard,
961
962
  {
962
963
  imageUrl: juego.logo || "",
963
- orden: juego.orden,
964
+ orden: juego.orden || idx + 1,
964
965
  onClick: () => console.log(juego.machine)
965
966
  },
966
967
  juego.machine
@@ -1100,7 +1101,7 @@ var OraculoSeccionCasinoEnVivo = ({
1100
1101
  machine: juego.machine,
1101
1102
  onClick: () => onCardClick == null ? void 0 : onCardClick(juego, idx)
1102
1103
  },
1103
- (_a = juego.machine) != null ? _a : idx
1104
+ (_a = juego.orden) != null ? _a : idx
1104
1105
  );
1105
1106
  })
1106
1107
  }
@@ -1130,10 +1131,10 @@ import Box8 from "@mui/material/Box";
1130
1131
  import { jsx as jsx14, jsxs as jsxs11 } from "react/jsx-runtime";
1131
1132
  var buildCasinoSlides = (games, mosaicFirst = true, gridSize = 4) => {
1132
1133
  const baseItems = games.map((g, idx) => {
1133
- var _a, _b, _c, _d;
1134
+ var _a, _b, _c;
1134
1135
  return {
1135
- id: (_b = (_a = g.id) != null ? _a : g.machine) != null ? _b : idx,
1136
- imageUrl: (_d = (_c = g.imageUrl) != null ? _c : g.logo) != null ? _d : ""
1136
+ id: (_b = (_a = g.orden) != null ? _a : g.machine) != null ? _b : idx,
1137
+ imageUrl: (_c = g.logo) != null ? _c : ""
1137
1138
  };
1138
1139
  });
1139
1140
  if (!baseItems.length) return [];
@@ -1265,8 +1266,8 @@ var OraculoSeccionCasino = ({
1265
1266
  onClick: (itm) => {
1266
1267
  const game = items.find(
1267
1268
  (g, idx) => {
1268
- var _a, _b;
1269
- return ((_b = (_a = g.id) != null ? _a : g.machine) != null ? _b : idx) === itm.id;
1269
+ var _a;
1270
+ return ((_a = g.orden) != null ? _a : idx) === itm.id;
1270
1271
  }
1271
1272
  );
1272
1273
  if (game) onItemClick == null ? void 0 : onItemClick(game);
@@ -1287,10 +1288,10 @@ import Box9 from "@mui/material/Box";
1287
1288
  import { jsx as jsx15, jsxs as jsxs12 } from "react/jsx-runtime";
1288
1289
  var buildVirtualSlides = (games, mosaicFirst = true, gridSize = 4) => {
1289
1290
  const baseItems = games.map((g, idx) => {
1290
- var _a, _b, _c, _d;
1291
+ var _a, _b;
1291
1292
  return {
1292
- id: (_b = (_a = g.id) != null ? _a : g.machine) != null ? _b : idx,
1293
- imageUrl: (_d = (_c = g.imageUrl) != null ? _c : g.logo) != null ? _d : ""
1293
+ id: (_a = g.orden) != null ? _a : idx,
1294
+ imageUrl: (_b = g.logo) != null ? _b : ""
1294
1295
  };
1295
1296
  });
1296
1297
  if (!baseItems.length) return [];
@@ -1423,8 +1424,8 @@ var OraculoSeccionVirtuales = ({
1423
1424
  onClick: (itm) => {
1424
1425
  const game = items.find(
1425
1426
  (g, idx) => {
1426
- var _a, _b;
1427
- return ((_b = (_a = g.id) != null ? _a : g.machine) != null ? _b : idx) === itm.id;
1427
+ var _a;
1428
+ return ((_a = g.orden) != null ? _a : idx) === itm.id;
1428
1429
  }
1429
1430
  );
1430
1431
  if (game) onItemClick == null ? void 0 : onItemClick(game);
@@ -1538,7 +1539,7 @@ var OraculoSeccionBonoBienvenida = ({
1538
1539
  options: {
1539
1540
  autoWidth: false
1540
1541
  },
1541
- renderItem: (it) => /* @__PURE__ */ jsx16(OraculoWelcomeBanner_default, { ...it }),
1542
+ renderItem: (it) => /* @__PURE__ */ jsx16(OraculoWelcomeBanner_default, { ...it, onButtonClick: items[0].onButtonClick }),
1542
1543
  onMove: ({ index, isStart, isEnd }) => {
1543
1544
  setNavState({ isStart, isEnd });
1544
1545
  setActiveIndex(index);
@@ -1615,6 +1616,7 @@ var OraculoSeccionBonoBienvenida = ({
1615
1616
  children: items.map((it, idx) => /* @__PURE__ */ jsx16(
1616
1617
  OraculoWelcomeBanner_default,
1617
1618
  {
1619
+ onButtonClick: it.onButtonClick,
1618
1620
  ...it
1619
1621
  },
1620
1622
  idx
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "oraculo-ui",
3
- "version": "0.1.2",
3
+ "version": "0.1.3",
4
4
  "main": "./dist/index.js",
5
5
  "module": "./dist/index.mjs",
6
6
  "types": "./dist/index.d.ts",