oraculo-ui 0.1.7 → 0.1.8
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 +7 -1
- package/dist/index.d.ts +7 -1
- package/dist/index.js +32 -30
- package/dist/index.mjs +35 -33
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -43,6 +43,11 @@ interface OraculoCarouselOptions {
|
|
|
43
43
|
gap?: string;
|
|
44
44
|
pagination?: boolean;
|
|
45
45
|
arrows?: boolean;
|
|
46
|
+
drag?: boolean;
|
|
47
|
+
focus?: string | "center";
|
|
48
|
+
autoWidth?: boolean;
|
|
49
|
+
trimSpace?: boolean;
|
|
50
|
+
rewind?: boolean;
|
|
46
51
|
padding?: {
|
|
47
52
|
left?: string;
|
|
48
53
|
right?: string;
|
|
@@ -60,7 +65,7 @@ interface OraculoCarouselProps<T = any> {
|
|
|
60
65
|
renderItem: (item: T, index: number) => ReactNode;
|
|
61
66
|
perPage?: number;
|
|
62
67
|
gap?: string;
|
|
63
|
-
breakpoints?:
|
|
68
|
+
breakpoints?: Record<string | number, OraculoCarouselOptions>;
|
|
64
69
|
options?: OraculoCarouselOptions;
|
|
65
70
|
className?: string;
|
|
66
71
|
onMove?: (info: {
|
|
@@ -275,6 +280,7 @@ interface parametros {
|
|
|
275
280
|
casinoEnVivo: OraculoSeccionCasinoEnVivoProps;
|
|
276
281
|
virtuales: OraculoSeccionVirtualesProps;
|
|
277
282
|
clubOlimpo: OraculoSeccionClubOlimpoItem;
|
|
283
|
+
destacados: OraculoSeccionDestacadosProps;
|
|
278
284
|
}
|
|
279
285
|
declare function OraculoPageLanding({ props }: {
|
|
280
286
|
props: parametros;
|
package/dist/index.d.ts
CHANGED
|
@@ -43,6 +43,11 @@ interface OraculoCarouselOptions {
|
|
|
43
43
|
gap?: string;
|
|
44
44
|
pagination?: boolean;
|
|
45
45
|
arrows?: boolean;
|
|
46
|
+
drag?: boolean;
|
|
47
|
+
focus?: string | "center";
|
|
48
|
+
autoWidth?: boolean;
|
|
49
|
+
trimSpace?: boolean;
|
|
50
|
+
rewind?: boolean;
|
|
46
51
|
padding?: {
|
|
47
52
|
left?: string;
|
|
48
53
|
right?: string;
|
|
@@ -60,7 +65,7 @@ interface OraculoCarouselProps<T = any> {
|
|
|
60
65
|
renderItem: (item: T, index: number) => ReactNode;
|
|
61
66
|
perPage?: number;
|
|
62
67
|
gap?: string;
|
|
63
|
-
breakpoints?:
|
|
68
|
+
breakpoints?: Record<string | number, OraculoCarouselOptions>;
|
|
64
69
|
options?: OraculoCarouselOptions;
|
|
65
70
|
className?: string;
|
|
66
71
|
onMove?: (info: {
|
|
@@ -275,6 +280,7 @@ interface parametros {
|
|
|
275
280
|
casinoEnVivo: OraculoSeccionCasinoEnVivoProps;
|
|
276
281
|
virtuales: OraculoSeccionVirtualesProps;
|
|
277
282
|
clubOlimpo: OraculoSeccionClubOlimpoItem;
|
|
283
|
+
destacados: OraculoSeccionDestacadosProps;
|
|
278
284
|
}
|
|
279
285
|
declare function OraculoPageLanding({ props }: {
|
|
280
286
|
props: parametros;
|
package/dist/index.js
CHANGED
|
@@ -183,12 +183,9 @@ var OraculoCarousel = (0, import_react.forwardRef)(
|
|
|
183
183
|
({
|
|
184
184
|
items = [],
|
|
185
185
|
renderItem,
|
|
186
|
-
perPage =
|
|
187
|
-
gap = "
|
|
188
|
-
breakpoints
|
|
189
|
-
1024: { perPage: 3, gap: "10px" },
|
|
190
|
-
768: { perPage: 1.3, gap: "10px", padding: { right: "16px" } }
|
|
191
|
-
},
|
|
186
|
+
perPage = 1,
|
|
187
|
+
gap = "0px",
|
|
188
|
+
breakpoints,
|
|
192
189
|
options = {},
|
|
193
190
|
className = "",
|
|
194
191
|
onMove
|
|
@@ -212,9 +209,9 @@ var OraculoCarousel = (0, import_react.forwardRef)(
|
|
|
212
209
|
(splide) => {
|
|
213
210
|
const index = splide.index;
|
|
214
211
|
const total = splide.length;
|
|
215
|
-
const
|
|
212
|
+
const currentPerPage = splide.options.perPage || 1;
|
|
216
213
|
const isStart = index === 0;
|
|
217
|
-
const isEnd = index >= total -
|
|
214
|
+
const isEnd = index >= total - currentPerPage;
|
|
218
215
|
onMove == null ? void 0 : onMove({ index, isStart, isEnd, total });
|
|
219
216
|
},
|
|
220
217
|
[onMove]
|
|
@@ -225,24 +222,25 @@ var OraculoCarousel = (0, import_react.forwardRef)(
|
|
|
225
222
|
},
|
|
226
223
|
[handleMove]
|
|
227
224
|
);
|
|
225
|
+
const mergedOptions = {
|
|
226
|
+
type: "slide",
|
|
227
|
+
trimSpace: false,
|
|
228
|
+
drag: true,
|
|
229
|
+
pagination: false,
|
|
230
|
+
arrows: false,
|
|
231
|
+
rewind: false,
|
|
232
|
+
focus: "start",
|
|
233
|
+
autoWidth: false,
|
|
234
|
+
perPage,
|
|
235
|
+
gap,
|
|
236
|
+
breakpoints,
|
|
237
|
+
...options
|
|
238
|
+
};
|
|
228
239
|
return /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("div", { className, style: { width: "100%" }, children: /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
|
|
229
240
|
Splide,
|
|
230
241
|
{
|
|
231
242
|
ref: splideRef,
|
|
232
|
-
options:
|
|
233
|
-
type: "slide",
|
|
234
|
-
trimSpace: false,
|
|
235
|
-
perPage,
|
|
236
|
-
gap,
|
|
237
|
-
drag: true,
|
|
238
|
-
pagination: false,
|
|
239
|
-
rewind: false,
|
|
240
|
-
arrows: false,
|
|
241
|
-
focus: 0,
|
|
242
|
-
autoWidth: true,
|
|
243
|
-
breakpoints,
|
|
244
|
-
...options
|
|
245
|
-
},
|
|
243
|
+
options: mergedOptions,
|
|
246
244
|
onMove: handleMove,
|
|
247
245
|
onMounted: handleMounted,
|
|
248
246
|
children: items.map((item, index) => {
|
|
@@ -610,14 +608,17 @@ var OraculoGameSlide = ({
|
|
|
610
608
|
"& > *": { width: "100%", height: "100%" }
|
|
611
609
|
}
|
|
612
610
|
},
|
|
613
|
-
children: items.map((it, index) =>
|
|
614
|
-
|
|
615
|
-
{
|
|
616
|
-
|
|
617
|
-
|
|
618
|
-
|
|
619
|
-
|
|
620
|
-
|
|
611
|
+
children: items.map((it, index) => {
|
|
612
|
+
var _a;
|
|
613
|
+
return /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(import_Box4.default, { children: /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
|
|
614
|
+
OraculoGameCard_default,
|
|
615
|
+
{
|
|
616
|
+
imageUrl: it.imageUrl,
|
|
617
|
+
size: "sm",
|
|
618
|
+
onClick: () => onClick == null ? void 0 : onClick(it, index)
|
|
619
|
+
}
|
|
620
|
+
) }, (_a = it.id) != null ? _a : index);
|
|
621
|
+
})
|
|
621
622
|
}
|
|
622
623
|
);
|
|
623
624
|
};
|
|
@@ -1729,6 +1730,7 @@ var OraculoSeccionClubOlimpo_default = OraculoSeccionClubOlimpo;
|
|
|
1729
1730
|
|
|
1730
1731
|
// src/templates/OraculoPageLanding.tsx
|
|
1731
1732
|
var import_material2 = require("@mui/material");
|
|
1733
|
+
var import_css = require("@splidejs/react-splide/css");
|
|
1732
1734
|
var import_jsx_runtime20 = require("react/jsx-runtime");
|
|
1733
1735
|
function OraculoPageLanding({ props }) {
|
|
1734
1736
|
const clubOlimpoItems = [
|
package/dist/index.mjs
CHANGED
|
@@ -121,10 +121,10 @@ var OraculoCarouselDots_default = OraculoCarouselDots;
|
|
|
121
121
|
|
|
122
122
|
// src/molecules/OraculoCarousel/OraculoCarousel.tsx
|
|
123
123
|
import {
|
|
124
|
-
useRef,
|
|
125
|
-
useImperativeHandle,
|
|
126
124
|
forwardRef,
|
|
127
|
-
useCallback
|
|
125
|
+
useCallback,
|
|
126
|
+
useImperativeHandle,
|
|
127
|
+
useRef
|
|
128
128
|
} from "react";
|
|
129
129
|
import {
|
|
130
130
|
Splide as SplideRaw,
|
|
@@ -137,12 +137,9 @@ var OraculoCarousel = forwardRef(
|
|
|
137
137
|
({
|
|
138
138
|
items = [],
|
|
139
139
|
renderItem,
|
|
140
|
-
perPage =
|
|
141
|
-
gap = "
|
|
142
|
-
breakpoints
|
|
143
|
-
1024: { perPage: 3, gap: "10px" },
|
|
144
|
-
768: { perPage: 1.3, gap: "10px", padding: { right: "16px" } }
|
|
145
|
-
},
|
|
140
|
+
perPage = 1,
|
|
141
|
+
gap = "0px",
|
|
142
|
+
breakpoints,
|
|
146
143
|
options = {},
|
|
147
144
|
className = "",
|
|
148
145
|
onMove
|
|
@@ -166,9 +163,9 @@ var OraculoCarousel = forwardRef(
|
|
|
166
163
|
(splide) => {
|
|
167
164
|
const index = splide.index;
|
|
168
165
|
const total = splide.length;
|
|
169
|
-
const
|
|
166
|
+
const currentPerPage = splide.options.perPage || 1;
|
|
170
167
|
const isStart = index === 0;
|
|
171
|
-
const isEnd = index >= total -
|
|
168
|
+
const isEnd = index >= total - currentPerPage;
|
|
172
169
|
onMove == null ? void 0 : onMove({ index, isStart, isEnd, total });
|
|
173
170
|
},
|
|
174
171
|
[onMove]
|
|
@@ -179,24 +176,25 @@ var OraculoCarousel = forwardRef(
|
|
|
179
176
|
},
|
|
180
177
|
[handleMove]
|
|
181
178
|
);
|
|
179
|
+
const mergedOptions = {
|
|
180
|
+
type: "slide",
|
|
181
|
+
trimSpace: false,
|
|
182
|
+
drag: true,
|
|
183
|
+
pagination: false,
|
|
184
|
+
arrows: false,
|
|
185
|
+
rewind: false,
|
|
186
|
+
focus: "start",
|
|
187
|
+
autoWidth: false,
|
|
188
|
+
perPage,
|
|
189
|
+
gap,
|
|
190
|
+
breakpoints,
|
|
191
|
+
...options
|
|
192
|
+
};
|
|
182
193
|
return /* @__PURE__ */ jsx4("div", { className, style: { width: "100%" }, children: /* @__PURE__ */ jsx4(
|
|
183
194
|
Splide,
|
|
184
195
|
{
|
|
185
196
|
ref: splideRef,
|
|
186
|
-
options:
|
|
187
|
-
type: "slide",
|
|
188
|
-
trimSpace: false,
|
|
189
|
-
perPage,
|
|
190
|
-
gap,
|
|
191
|
-
drag: true,
|
|
192
|
-
pagination: false,
|
|
193
|
-
rewind: false,
|
|
194
|
-
arrows: false,
|
|
195
|
-
focus: 0,
|
|
196
|
-
autoWidth: true,
|
|
197
|
-
breakpoints,
|
|
198
|
-
...options
|
|
199
|
-
},
|
|
197
|
+
options: mergedOptions,
|
|
200
198
|
onMove: handleMove,
|
|
201
199
|
onMounted: handleMounted,
|
|
202
200
|
children: items.map((item, index) => {
|
|
@@ -564,14 +562,17 @@ var OraculoGameSlide = ({
|
|
|
564
562
|
"& > *": { width: "100%", height: "100%" }
|
|
565
563
|
}
|
|
566
564
|
},
|
|
567
|
-
children: items.map((it, index) =>
|
|
568
|
-
|
|
569
|
-
{
|
|
570
|
-
|
|
571
|
-
|
|
572
|
-
|
|
573
|
-
|
|
574
|
-
|
|
565
|
+
children: items.map((it, index) => {
|
|
566
|
+
var _a;
|
|
567
|
+
return /* @__PURE__ */ jsx8(Box4, { children: /* @__PURE__ */ jsx8(
|
|
568
|
+
OraculoGameCard_default,
|
|
569
|
+
{
|
|
570
|
+
imageUrl: it.imageUrl,
|
|
571
|
+
size: "sm",
|
|
572
|
+
onClick: () => onClick == null ? void 0 : onClick(it, index)
|
|
573
|
+
}
|
|
574
|
+
) }, (_a = it.id) != null ? _a : index);
|
|
575
|
+
})
|
|
575
576
|
}
|
|
576
577
|
);
|
|
577
578
|
};
|
|
@@ -1686,6 +1687,7 @@ import {
|
|
|
1686
1687
|
Container,
|
|
1687
1688
|
Stack as Stack5
|
|
1688
1689
|
} from "@mui/material";
|
|
1690
|
+
import "@splidejs/react-splide/css";
|
|
1689
1691
|
import { jsx as jsx18, jsxs as jsxs14 } from "react/jsx-runtime";
|
|
1690
1692
|
function OraculoPageLanding({ props }) {
|
|
1691
1693
|
const clubOlimpoItems = [
|