@opexa/portal-components 0.0.873 → 0.0.874

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 (39) hide show
  1. package/dist/components/DepositWithdrawal/Deposit/OnlineBankDeposit/OnlineBankDepositContext.d.ts +2 -2
  2. package/dist/components/DepositWithdrawal/Deposit/OnlineBankDeposit/useOnlineBankDeposit.d.ts +1 -1
  3. package/dist/components/Jackpots/Jackpots.module.css +68 -1
  4. package/dist/components/Jackpots/JackpotsCarousel/JackpotsCarousel.client.d.ts +1 -0
  5. package/dist/components/Jackpots/JackpotsCarousel/JackpotsCarousel.client.js +2 -1
  6. package/dist/components/Jackpots/JackpotsCarousel/JackpotsCarouselItem.CrazyWin.d.ts +8 -0
  7. package/dist/components/Jackpots/JackpotsCarousel/JackpotsCarouselItem.CrazyWin.js +144 -0
  8. package/dist/components/Jackpots/utils.d.ts +11 -0
  9. package/dist/components/Jackpots/utils.js +38 -0
  10. package/dist/constants/Endpoint.js +11 -0
  11. package/dist/constants/EnvVar.d.ts +1 -1
  12. package/dist/constants/EnvVar.js +1 -1
  13. package/dist/images/chest-bg.webp +0 -0
  14. package/dist/images/coin.webp +0 -0
  15. package/dist/images/coins.webp +0 -0
  16. package/dist/images/star.webp +0 -0
  17. package/dist/images/treasure.webp +0 -0
  18. package/dist/ui/AlertDialog/AlertDialog.d.ts +88 -88
  19. package/dist/ui/AlertDialog/alertDialog.recipe.d.ts +8 -8
  20. package/dist/ui/Combobox/Combobox.d.ts +42 -42
  21. package/dist/ui/Combobox/combobox.recipe.d.ts +3 -3
  22. package/dist/ui/DatePicker/DatePicker.d.ts +72 -72
  23. package/dist/ui/DatePicker/datePicker.recipe.d.ts +3 -3
  24. package/dist/ui/Dialog/Dialog.d.ts +33 -33
  25. package/dist/ui/Dialog/dialog.recipe.d.ts +3 -3
  26. package/dist/ui/Drawer/Drawer.d.ts +33 -33
  27. package/dist/ui/Drawer/drawer.recipe.d.ts +3 -3
  28. package/dist/ui/Field/Field.d.ts +21 -21
  29. package/dist/ui/Field/field.recipe.d.ts +3 -3
  30. package/dist/ui/Popover/Popover.d.ts +55 -55
  31. package/dist/ui/Popover/popover.recipe.d.ts +5 -5
  32. package/dist/ui/QrCode/QrCode.d.ts +25 -25
  33. package/dist/ui/QrCode/qrCode.recipe.d.ts +5 -5
  34. package/dist/ui/Select/Select.d.ts +45 -45
  35. package/dist/ui/Select/select.recipe.d.ts +3 -3
  36. package/dist/ui/Table/Table.d.ts +21 -21
  37. package/dist/ui/Table/table.anatomy.d.ts +1 -1
  38. package/dist/ui/Table/table.recipe.d.ts +3 -3
  39. package/package.json +1 -1
@@ -1,7 +1,7 @@
1
1
  export declare const OnlineBankDepositContext: (props: {
2
2
  value: {
3
3
  view: "form" | "vca";
4
- status: "failed" | "waiting" | "processing" | "verification-waiting" | "verification-processing" | "verification-failed" | "verification-success";
4
+ status: "waiting" | "failed" | "processing" | "verification-waiting" | "verification-processing" | "verification-failed" | "verification-success";
5
5
  verify: () => void;
6
6
  reset: () => void;
7
7
  deposit: import("../../../../types").Deposit | null;
@@ -14,7 +14,7 @@ export declare const OnlineBankDepositContext: (props: {
14
14
  children?: import("react").ReactNode | undefined;
15
15
  }) => React.ReactNode, useOnlineBankDepositContext: () => {
16
16
  view: "form" | "vca";
17
- status: "failed" | "waiting" | "processing" | "verification-waiting" | "verification-processing" | "verification-failed" | "verification-success";
17
+ status: "waiting" | "failed" | "processing" | "verification-waiting" | "verification-processing" | "verification-failed" | "verification-success";
18
18
  verify: () => void;
19
19
  reset: () => void;
20
20
  deposit: import("../../../../types").Deposit | null;
@@ -2,7 +2,7 @@ import type { Deposit } from '../../../../types';
2
2
  export type UseOnlineBankDepositReturn = ReturnType<typeof useOnlineBankDeposit>;
3
3
  export declare function useOnlineBankDeposit(): {
4
4
  view: "form" | "vca";
5
- status: "failed" | "waiting" | "processing" | "verification-waiting" | "verification-processing" | "verification-failed" | "verification-success";
5
+ status: "waiting" | "failed" | "processing" | "verification-waiting" | "verification-processing" | "verification-failed" | "verification-success";
6
6
  verify: () => void;
7
7
  reset: () => void;
8
8
  deposit: Deposit | null;
@@ -69,7 +69,7 @@
69
69
  content: '';
70
70
  position: absolute;
71
71
  top: var(--light-rays-top, 150px);
72
- left: calc(50% - 90px);
72
+ left: var(--light-rays-left, calc(50% - 90px));
73
73
  margin: -100vmax;
74
74
  width: 200vmax;
75
75
  height: 200vmax;
@@ -218,4 +218,71 @@
218
218
  }
219
219
  }
220
220
 
221
+ /* --- Pulse Animations --- */
222
+ @keyframes pulseError {
223
+ 0% {
224
+ background-color: #98a2b3;
225
+ }
226
+ 100% {
227
+ background-color: #f04438;
228
+ }
229
+ }
230
+ @keyframes pulseSuccess {
231
+ 0% {
232
+ background-color: #98a2b3;
233
+ }
234
+ 100% {
235
+ background-color: #17b26a;
236
+ }
237
+ }
238
+ .pulse-error {
239
+ animation: pulseError 0.2s infinite alternate;
240
+ }
241
+ .pulse-success {
242
+ animation: pulseSuccess 0.2s infinite alternate;
243
+ }
221
244
 
245
+
246
+ /* --- Flicker Scale Fade (Stars) --- */
247
+ @keyframes flickerScaleFade {
248
+ 0% {
249
+ opacity: 0;
250
+ transform: scale(1);
251
+ }
252
+ 10% {
253
+ opacity: 1;
254
+ transform: scale(1);
255
+ }
256
+ 15% {
257
+ opacity: 0.7;
258
+ }
259
+ 20% {
260
+ opacity: 1;
261
+ }
262
+ 30% {
263
+ opacity: 0.9;
264
+ }
265
+ 60% {
266
+ opacity: 1;
267
+ transform: scale(1.05);
268
+ }
269
+ 90% {
270
+ opacity: 0.6;
271
+ transform: scale(1.08);
272
+ }
273
+ 100% {
274
+ opacity: 0;
275
+ transform: scale(1.1);
276
+ }
277
+ }
278
+ .flicker-scale-fade {
279
+ animation: flickerScaleFade 1.2s ease-in-out infinite;
280
+ opacity: 0;
281
+ transform: scale(1);
282
+ }
283
+ .flicker-scale-fade-2 {
284
+ animation: flickerScaleFade 1.2s ease-in-out infinite;
285
+ opacity: 0;
286
+ transform: scale(1);
287
+ animation-delay: -0.5s;
288
+ }
@@ -26,6 +26,7 @@ interface StyleEntries {
26
26
  itemRoot?: CSSProperties;
27
27
  }
28
28
  export interface JackpotsCarouselProps {
29
+ variant?: 'crazywin' | 'happybingo';
29
30
  layout: 'carousel';
30
31
  /** @default "Promos" */
31
32
  heading?: string | ReactNode;
@@ -18,6 +18,7 @@ const JackpotsCarouselNext = lazy(() => import('../JackpotsCarouselNext/Jackpots
18
18
  })));
19
19
  import { JackpotsCarouselItemContext } from './JackpotsCarouselContext.js';
20
20
  import { JackpotsCarouselItem } from './JackpotsCarouselItem.js';
21
+ import { JackpotsCarouselItemCrazyWin } from './JackpotsCarouselItem.CrazyWin.js';
21
22
  export function JackpotsCarousel__client({ style, className, ...props }) {
22
23
  const [emblaRef, emblaApi] = useEmblaCarousel({
23
24
  align: 'start',
@@ -70,7 +71,7 @@ export function JackpotsCarousel__client({ style, className, ...props }) {
70
71
  const classNames = useMemo(() => (isString(className) ? { root: className } : (className ?? {})), [className]);
71
72
  if (jackpots.length <= 0)
72
73
  return null;
73
- return (_jsxs("div", { ref: ref, style: styles.root, className: classNames.root, children: [_jsxs("div", { className: "flex items-center justify-between", children: [_jsx("div", { className: "font-semibold text-lg", children: props.heading ?? 'Jackpots' }), _jsxs("div", { className: "flex items-center md:gap-3xl", children: [_jsxs(Link, { href: props.viewAllUrl ?? '/jackpots', className: "flex gap-sm font-semibold text-button-tertiary-fg text-sm", children: ["See All", _jsx(ChevronRightIcon, { className: "size-5 lg:hidden" })] }), _jsxs("div", { className: "hidden lg:flex", children: [_jsx(Button, { disabled: !canScrollPrev, onClick: scrollPrev, variant: "outline", colorScheme: "gray", className: "rounded-r-none border-r-0", "aria-label": "Previous", children: _jsx(ArrowLeftIcon, { className: "size-5" }) }), _jsxs(Button, { disabled: !canScrollNext, onClick: scrollNext, variant: "outline", colorScheme: "gray", className: "rounded-l-none", "aria-label": "Next", children: [_jsx("span", { className: "sr-only", children: "Next" }), _jsx(ArrowRightIcon, { className: "size-5" })] })] })] })] }), _jsx("div", { className: "relative mt-lg overflow-hidden", ref: emblaRef, children: _jsx("div", { className: "flex gap-2.5", children: jackpots.map((jackpot, index) => (_jsx(JackpotsCarouselItemContext, { value: jackpot, children: _jsx(JackpotsCarouselItem, { style: styles.itemRoot, className: classNames, viewAllUrl: props.viewAllUrl, animate: props.animate, customJackpotChestImage: props.customJackpotChestImage, jackpotProfileShape: props.jackpotProfileShape, chestImagesByTier: props.chestImagesByTier }) }, jackpot.id ?? index))) }) })] }));
74
+ return (_jsxs("div", { ref: ref, style: styles.root, className: classNames.root, children: [_jsxs("div", { className: "flex items-center justify-between", children: [_jsx("div", { className: "font-semibold text-lg", children: props.heading ?? 'Jackpots' }), _jsxs("div", { className: "flex items-center md:gap-3xl", children: [_jsxs(Link, { href: props.viewAllUrl ?? '/jackpots', className: "flex gap-sm font-semibold text-button-tertiary-fg text-sm", children: ["See All", _jsx(ChevronRightIcon, { className: "size-5 lg:hidden" })] }), _jsxs("div", { className: "hidden lg:flex", children: [_jsx(Button, { disabled: !canScrollPrev, onClick: scrollPrev, variant: "outline", colorScheme: "gray", className: "rounded-r-none border-r-0", "aria-label": "Previous", children: _jsx(ArrowLeftIcon, { className: "size-5" }) }), _jsxs(Button, { disabled: !canScrollNext, onClick: scrollNext, variant: "outline", colorScheme: "gray", className: "rounded-l-none", "aria-label": "Next", children: [_jsx("span", { className: "sr-only", children: "Next" }), _jsx(ArrowRightIcon, { className: "size-5" })] })] })] })] }), _jsx("div", { className: 'relative overflow-hidden pt-lg', ref: emblaRef, children: _jsx("div", { className: "flex gap-2.5", children: jackpots.map((jackpot, index) => props.variant === 'crazywin' ? (_jsx(JackpotsCarouselItemContext, { value: jackpot, children: _jsx(JackpotsCarouselItemCrazyWin, { index: index, className: classNames, viewAllUrl: props.viewAllUrl }) }, jackpot.id ?? index)) : (_jsx(JackpotsCarouselItemContext, { value: jackpot, children: _jsx(JackpotsCarouselItem, { style: styles.itemRoot, className: classNames, viewAllUrl: props.viewAllUrl, animate: props.animate, customJackpotChestImage: props.customJackpotChestImage, jackpotProfileShape: props.jackpotProfileShape, chestImagesByTier: props.chestImagesByTier }) }, jackpot.id ?? index))) }) })] }));
74
75
  }
75
76
  export function JackpotsCarousels__client(props) {
76
77
  const future = useFeatureFlag();
@@ -0,0 +1,8 @@
1
+ import type { ClassNameEntries } from './JackpotsCarousel';
2
+ export interface JackpotsCarouselItemCrazyWinProps {
3
+ index: number;
4
+ className?: ClassNameEntries;
5
+ /** @default "/jackpots" */
6
+ viewAllUrl?: string;
7
+ }
8
+ export declare function JackpotsCarouselItemCrazyWin({ index, }: JackpotsCarouselItemCrazyWinProps): import("react/jsx-runtime").JSX.Element | null;
@@ -0,0 +1,144 @@
1
+ 'use client';
2
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
3
+ import { Progress } from '@ark-ui/react/progress';
4
+ import isMobile from 'is-mobile';
5
+ import Image from 'next/image';
6
+ import { useCallback, useEffect, useMemo, useState } from 'react';
7
+ import { twMerge } from 'tailwind-merge';
8
+ import { useIntersectionObserver } from 'usehooks-ts';
9
+ import { useLocaleInfo } from '../../../client/hooks/useLocaleInfo.js';
10
+ import { ArrowNarrowUpRightIcon } from '../../../icons/ArrowNarrowUpRightIcon.js';
11
+ import { ChevronLeftIcon } from '../../../icons/ChevronLeftIcon.js';
12
+ import { ChevronRightIcon } from '../../../icons/ChevronRightIcon.js';
13
+ import treasureChestBg from '../../../images/chest-bg.webp';
14
+ import star from '../../../images/star.webp';
15
+ import treasureChest from '../../../images/treasure.webp';
16
+ import { formatNumber } from '../../../utils/formatNumber.js';
17
+ import { parseDecimal } from '../../../utils/parseDecimal.js';
18
+ import styles from '../Jackpots.module.css';
19
+ import { JACKPOTS_VARIATIONS } from '../utils.js';
20
+ import { useJackpotsCarouselItemContext } from './JackpotsCarouselContext.js';
21
+ export function JackpotsCarouselItemCrazyWin({ index, }) {
22
+ const [ref] = useIntersectionObserver({
23
+ threshold: 0.5,
24
+ rootMargin: '50px',
25
+ });
26
+ const jackpot = useJackpotsCarouselItemContext();
27
+ const localeInfo = useLocaleInfo();
28
+ const isPayingOut = jackpot.drawing;
29
+ const jackpotAmount = jackpot.pool;
30
+ const [showSeeDetailsButton, setShowSeeDetailsButton] = useState(true);
31
+ const [infoIndex, setInfoIndex] = useState(0);
32
+ const getInfoBlocks = useCallback(() => {
33
+ return [
34
+ `Current Jackpot: <b>${formatNumber(jackpotAmount, {
35
+ currency: localeInfo.currency.code,
36
+ minDecimalPlaces: 2,
37
+ maxDecimalPlaces: 2,
38
+ })}</b>`,
39
+ `Minimum Payout Limit: <b>${formatNumber(jackpot.minimumJackpotPoolDrawingLimit, {
40
+ currency: localeInfo.currency.code,
41
+ minDecimalPlaces: 2,
42
+ maxDecimalPlaces: 2,
43
+ })}</b>`,
44
+ `Maximum Payout Limit: <b>${formatNumber(jackpot.maximumJackpotPoolLimit, {
45
+ currency: localeInfo.currency.code,
46
+ minDecimalPlaces: 2,
47
+ maxDecimalPlaces: 2,
48
+ })}</b>`,
49
+ isPayingOut
50
+ ? `The pot has hit <b>${formatNumber(jackpot.maximumJackpotPoolLimit, {
51
+ currency: localeInfo.currency.code,
52
+ minDecimalPlaces: 2,
53
+ maxDecimalPlaces: 2,
54
+ })}</b> Play now for your chance to win big! 🔥`
55
+ : getAccumulatingJackpotDescription(Number(jackpot.pool), Number(jackpot.maximumJackpotPoolLimit)),
56
+ ];
57
+ }, [isPayingOut, jackpot, jackpotAmount, localeInfo]);
58
+ useEffect(() => {
59
+ const interval = setInterval(() => {
60
+ setInfoIndex((i) => (i + 1) % getInfoBlocks().length);
61
+ setShowSeeDetailsButton((v) => !v);
62
+ }, 4000);
63
+ return () => clearInterval(interval);
64
+ }, [getInfoBlocks]);
65
+ const Arrow = useCallback(({ index }) => {
66
+ const Icon = isPayingOut ? ChevronLeftIcon : ChevronRightIcon;
67
+ return (_jsx(Icon, { className: twMerge('min-w-2.5 scale-400 text-brand-300 lg:min-w-4 lg:scale-250', isPayingOut
68
+ ? styles['animate-wave-color-error']
69
+ : styles['animate-wave-color-success']), style: {
70
+ animationDelay: isPayingOut
71
+ ? `${(40 - index - 1) * 0.1}s`
72
+ : `${index * 0.1}s`,
73
+ } }));
74
+ }, [isPayingOut]);
75
+ // Memoize arrow images array
76
+ const arrowImages = useMemo(() => Array.from({ length: 40 }, (_, i) => _jsx(Arrow, { index: i }, i)), [Arrow]);
77
+ const [mainTooltipOpen, setMainTooltipOpen] = useState(false);
78
+ const isMobileDevice = useMemo(() => isMobile(), []);
79
+ useEffect(() => {
80
+ if (isMobileDevice && mainTooltipOpen) {
81
+ const timeout = setTimeout(() => setMainTooltipOpen(false), 3000);
82
+ return () => clearTimeout(timeout);
83
+ }
84
+ }, [mainTooltipOpen, isMobileDevice]);
85
+ if (jackpot.status === 'DISABLED' && jackpot.drawing !== true) {
86
+ return null;
87
+ }
88
+ const variation = JACKPOTS_VARIATIONS[index % JACKPOTS_VARIATIONS.length];
89
+ return (_jsxs("div", { className: "w-full shrink-0", children: [_jsxs("div", { ref: ref, className: twMerge('relative flex w-full shrink-0 rounded-t-2xl p-3 text-center lg:gap-4 lg:p-5', variation.background), children: [_jsxs("div", { className: "relative z-1 flex flex-1 flex-col", children: [[
90
+ [
91
+ styles['flicker-scale-fade-2'],
92
+ 'absolute right-[38%] top-[2%] h-2 w-2 delay-75',
93
+ ],
94
+ [
95
+ styles['flicker-scale-fade'],
96
+ 'absolute right-[20%] top-[10%] h-3 w-3',
97
+ ],
98
+ [
99
+ styles['flicker-scale-fade-2'],
100
+ 'absolute right-[30%] top-[10%] h-5 w-5',
101
+ ],
102
+ [
103
+ styles['flicker-scale-fade'],
104
+ 'absolute right-[36%] top-[35%] h-3 w-3',
105
+ ],
106
+ [
107
+ styles['flicker-scale-fade'],
108
+ 'absolute right-[15%] top-[56%] h-3 w-3',
109
+ ],
110
+ [
111
+ styles['flicker-scale-fade-2'],
112
+ 'absolute right-[50%] top-[55%] h-4 w-4',
113
+ ],
114
+ ].map(([animationClass, positionClass], i) => (_jsx(Image, { src: star, alt: "star", draggable: "false", className: twMerge(animationClass, positionClass) }, i))), _jsx("div", { className: "flex h-full flex-col justify-between", children: _jsx("div", { className: "flex w-full justify-between", children: _jsx("div", { className: "flex w-full flex-col", children: _jsxs("div", { className: "relative flex w-full justify-between", children: [_jsxs("div", { children: [_jsx("div", { className: "mb-2 flex gap-1 font-medium", children: _jsxs("div", { className: twMerge('flex w-fit items-center justify-center gap-1 rounded-[10px] border border-[#82F0D0] px-[10px] py-1 text-[#82F0D0] text-xs lg:text-sm'), children: [_jsx("div", { className: twMerge('h-[6px] w-[6px] animate-color rounded-full', isPayingOut
115
+ ? styles['pulse-error']
116
+ : styles['pulse-success']) }), _jsx("div", { className: twMerge('rounded text-[#CECFD2]'), children: isPayingOut ? 'Paying Out' : 'Accumulating' })] }) }), _jsx("div", { className: "mb-2 font-semibold text-[18px] text-white lg:mb-0 lg:text-2xl", children: jackpot?.name }), _jsx("div", { className: `${variation.poolBg} ${variation.textColor} flex w-fit rounded-lg px-2 font-semibold text-[26px] lg:text-[36px]`, children: formatNumber(jackpotAmount, {
117
+ currency: localeInfo.currency.code,
118
+ minDecimalPlaces: 2,
119
+ maxDecimalPlaces: 2,
120
+ }) })] }), _jsx(Image, { width: 175, height: 175, src: treasureChest, alt: "treasure chest", className: twMerge('absolute top-[0px] right-[-3px] h-[124px] w-[124px] md:top-0 lg:top-[-30px] lg:h-[175px] lg:w-[175px]'), priority: false, loading: "lazy" })] }) }) }) }), _jsxs("div", { className: "mt-3 lg:mt-4", children: [_jsxs("div", { className: "mb-1 flex justify-between", children: [_jsx("div", { className: "font-semibold text-text-primary-900 text-xs", "aria-live": "polite", children: formatNumber(0, {
121
+ currency: localeInfo.currency.code,
122
+ compact: true,
123
+ }) }), _jsxs("div", { className: "relative flex items-center justify-end gap-1.5", children: [isPayingOut ? (_jsx("div", { className: "flex w-6 items-center", children: [0, 1.5, 3].map((left, i) => (_jsx("div", { className: twMerge(`absolute left-${left}`, styles[`animate-arrow-red-flash-${i + 1}`]), children: _jsx(ChevronLeftIcon, { className: "size-4.5" }) }, i))) })) : (_jsx("div", { className: "flex w-6 items-center", children: [0, 1.5, 3].map((left, i) => (_jsx("div", { className: twMerge(`absolute left-${left}`, styles[`animate-arrow-green-flash-${i + 1}`]), children: _jsx(ChevronRightIcon, { className: "size-4.5" }) }, i))) })), _jsx("div", { className: "font-semibold text-text-primary-900 text-xs", children: formatNumber(jackpot?.maximumJackpotPoolLimit, {
124
+ currency: localeInfo.currency.code,
125
+ compact: true,
126
+ }) })] })] }), _jsx(Progress.Root, { className: "h-2 w-full rounded-full bg-bg-primary lg:h-4", max: 100, value: getPercentage(jackpot.pool, jackpot.maximumJackpotPoolLimit), "aria-valuenow": getPercentage(jackpot.pool, jackpot.maximumJackpotPoolLimit), "aria-valuemax": 100, "aria-label": "Jackpot progress", children: _jsx(Progress.Track, { className: twMerge('h-full overflow-hidden rounded-full', variation.progressBg), children: _jsx(Progress.Range, { className: "relative h-full overflow-hidden rounded-full bg-brand-500 pl-1.5", children: _jsx("div", { className: "pointer-events-none absolute inset-0 flex items-center justify-start pl-1.5", "aria-hidden": "true", children: arrowImages }) }) }) }), _jsx("div", { className: "mt-2 h-2 text-left text-[#F5F5F6] text-xs lg:h-auto lg:text-sm", dangerouslySetInnerHTML: { __html: getInfoBlocks()[infoIndex] } }, infoIndex)] })] }), isPayingOut ? (_jsx("div", { className: twMerge(styles['light-rays'], variation.raysColor, 'rounded-t-2xl [--light-rays-left:90%] [--light-rays-top:100px]') })) : (_jsx(Image, { width: 175, height: 175, src: treasureChestBg, alt: "treasure chest background", className: twMerge('absolute top-0 right-0 h-full w-[380px] object-cover opacity-50'), priority: false, loading: "lazy" }))] }), _jsxs("div", { className: "relative flex h-[56px] min-h-[40px] w-full flex-1 items-center justify-between rounded-b-2xl bg-[#171b26] px-4 py-[10px]", children: [showSeeDetailsButton ? (_jsxs("button", { type: "button", className: "flex items-center gap-1 font-medium text-[#fff] text-sm", children: ["See details", _jsx(ArrowNarrowUpRightIcon, { className: "h-5 w-5" })] })) : (_jsxs("div", { className: "w-full text-white text-xs opacity-100 transition-opacity duration-500 ease-in-out", children: [_jsxs("div", { children: ["Minimum bet:", ' ', _jsxs("span", { className: "font-semibold text-[#FFE5AF]", children: ["PHP", ' ', formatNumber(jackpot.minimumBet, {
127
+ currency: localeInfo.currency.code,
128
+ minDecimalPlaces: 2,
129
+ maxDecimalPlaces: 2,
130
+ }) || 'N/A'] })] }), _jsxs("div", { children: ["Multiplier Requirement:", ' ', _jsx("span", { className: "font-semibold text-[#FFE5AF]", children: jackpot.minimumMultiplier
131
+ ? `${jackpot.minimumMultiplier}X or more`
132
+ : 'N/A' })] })] })), _jsx("button", { type: "button", className: 'text-nowrap text-[#FFE5AF] text-sm underline underline-offset-4', children: "Jackpot Rules" })] })] }));
133
+ }
134
+ const getAccumulatingJackpotDescription = (part, total) => {
135
+ const percentage = total === 0 ? 0 : (part / total) * 100;
136
+ return percentage <= 90
137
+ ? 'The jackpot is heating up! Keep playing to stay in the action and watch it grow!'
138
+ : '🔥 It’s about to pop! Stay in the game for your shot at the prize!';
139
+ };
140
+ function getPercentage(value, total) {
141
+ const v = parseDecimal(value, 0);
142
+ const t = parseDecimal(total, 0);
143
+ return t === 0 ? 0 : (v / t) * 100;
144
+ }
@@ -0,0 +1,11 @@
1
+ export declare const JACKPOTS_VARIATIONS: {
2
+ background: string;
3
+ progressBg: string;
4
+ textColor: string;
5
+ poolBg: string;
6
+ multiplierColor: string;
7
+ multiplierBg: string;
8
+ topPayoutImgBorderColor: string;
9
+ topPayoutImgBg: string;
10
+ raysColor: string;
11
+ }[];
@@ -0,0 +1,38 @@
1
+ export const JACKPOTS_VARIATIONS = [
2
+ // Green
3
+ {
4
+ background: 'bg-[linear-gradient(241.67deg,#1A534C_1.19%,#051B29_100%)]',
5
+ progressBg: 'bg-[#073333]',
6
+ textColor: 'text-[#09232E]',
7
+ poolBg: 'bg-[linear-gradient(6.3deg,#215B5F_4.86%,#88FFD7_119.22%)]',
8
+ multiplierColor: 'text-[#fff]',
9
+ multiplierBg: 'bg-[linear-gradient(241.67deg,#1A534C_1.19%,#051B29_100%)]',
10
+ topPayoutImgBorderColor: 'bg-[linear-gradient(6.3deg,#215B5F_4.86%,#88FFD7_119.22%)]',
11
+ topPayoutImgBg: 'bg-[linear-gradient(241.67deg,#1A534C_1.19%,#051B29_100%)]',
12
+ raysColor: '[--color-jackpot-rays-primary:#0f3333] [--color-jackpot-rays-secondary:#144342]',
13
+ },
14
+ // Purple
15
+ {
16
+ background: 'bg-[linear-gradient(241.67deg,#1C1D83_1.19%,#31033F_100%)]',
17
+ progressBg: 'bg-[#301059]',
18
+ textColor: 'text-[#fff]',
19
+ poolBg: 'bg-[linear-gradient(180deg,#7442D9_0%,#451C7D_100%)]',
20
+ multiplierBg: 'bg-[linear-gradient(241.67deg,#1C1D83_1.19%,#31033F_100%)]',
21
+ multiplierColor: 'text-[#fff]',
22
+ topPayoutImgBorderColor: 'bg-[linear-gradient(180deg,_#9E77ED_0%,#8057D9_100%)]',
23
+ topPayoutImgBg: 'bg-[linear-gradient(241.67deg,#1C1D83_1.19%,#31033F_100%)]',
24
+ raysColor: '[--color-jackpot-rays-primary:#251166] [--color-jackpot-rays-secondary:#352676]',
25
+ },
26
+ // Red
27
+ {
28
+ background: 'bg-[linear-gradient(241.67deg,#F86246_1.19%,#5B0A26_100%)]',
29
+ progressBg: 'bg-[#A63D40]',
30
+ textColor: 'text-[#fff]',
31
+ poolBg: 'bg-[linear-gradient(180deg,_#D05C58_0%,_#75222E_100%)]',
32
+ multiplierBg: 'bg-[linear-gradient(241.67deg,#F86246_1.19%,#5B0A26_100%)]',
33
+ multiplierColor: 'text-[#fff]',
34
+ topPayoutImgBorderColor: 'bg-[linear-gradient(180deg,#D05C58_0%,#75222E_100%)]',
35
+ topPayoutImgBg: 'bg-[linear-gradient(241.67deg,#F86246_1.19%,#5B0A26_100%)]',
36
+ raysColor: '[--color-jackpot-rays-primary:#c04e48] [--color-jackpot-rays-secondary:#8f2731]',
37
+ },
38
+ ];
@@ -1,45 +1,56 @@
1
1
  import { ENVIRONMENT } from './EnvVar.js';
2
2
  export const ACCOUNT_GRAPHQL_ENDPOINT = {
3
3
  development: 'https://account.development.opexa.io/graphql',
4
+ staging: 'https://account.staging.atalos.io/graphql',
4
5
  production: 'https://account.opexa.io/graphql',
5
6
  }[ENVIRONMENT];
6
7
  export const FILE_GRAPHQL_ENDPOINT = {
7
8
  development: 'https://file.development.opexa.io/graphql',
9
+ staging: 'https://file.staging.atalos.io/graphql',
8
10
  production: 'https://file.opexa.io/graphql',
9
11
  }[ENVIRONMENT];
10
12
  export const GAME_GRAPHQL_ENDPOINT = {
11
13
  development: 'https://game.development.opexa.io/graphql',
14
+ staging: 'https://game.staging.atalos.io/graphql',
12
15
  production: 'https://game.opexa.io/graphql',
13
16
  }[ENVIRONMENT];
14
17
  export const PORTAL_GRAPHQL_ENDPOINT = {
15
18
  development: 'https://portal.development.opexa.io/graphql',
19
+ staging: 'https://portal.staging.atalos.io/graphql',
16
20
  production: 'https://portal.opexa.io/graphql',
17
21
  }[ENVIRONMENT];
18
22
  export const REPORT_GRAPHQL_ENDPOINT = {
19
23
  development: 'https://report.development.opexa.io/graphql',
24
+ staging: 'https://report.staging.atalos.io/graphql',
20
25
  production: 'https://report.opexa.io/graphql',
21
26
  }[ENVIRONMENT];
22
27
  export const TRIGGER_GRAPHQL_ENDPOINT = {
23
28
  development: 'https://trigger.development.opexa.io/graphql',
29
+ staging: 'https://trigger.staging.atalos.io/graphql',
24
30
  production: 'https://trigger.opexa.io/graphql',
25
31
  }[ENVIRONMENT];
26
32
  export const WALLET_GRAPHQL_ENDPOINT = {
27
33
  development: 'https://wallet.development.opexa.io/graphql',
34
+ staging: 'https://wallet.staging.atalos.io/graphql',
28
35
  production: 'https://wallet.opexa.io/graphql',
29
36
  }[ENVIRONMENT];
30
37
  export const AUTH_ENDPOINT = {
31
38
  development: 'https://auth.development.opexa.io',
39
+ staging: 'https://auth.staging.atalos.io',
32
40
  production: 'https://auth.opexa.io',
33
41
  }[ENVIRONMENT];
34
42
  export const CMS_PORTAL_ENDPOINT = {
35
43
  development: 'https://portal-api.opexacms.io',
44
+ staging: 'https://portal-api.staging.opexacms.io',
36
45
  production: 'https://portal-api.opexacms.io',
37
46
  }[ENVIRONMENT];
38
47
  export const STATIC_ENDPOINT = {
39
48
  development: 'https://static.development.atalos.io',
49
+ staging: 'https://static.atalos.io',
40
50
  production: 'https://static.atalos.io',
41
51
  }[ENVIRONMENT];
42
52
  export const OPEXAPAY_ENDPOINT = {
43
53
  development: 'https://external.opexapay.development.opexa.io',
54
+ staging: 'https://external.opexapay.staging.atalos.io',
44
55
  production: 'https://external.opexapay.opexa.io',
45
56
  }[ENVIRONMENT];
@@ -1,5 +1,5 @@
1
1
  export declare const SITE_ID: string;
2
2
  export declare const PLATFORM_ID: string;
3
3
  export declare const PLATFORM_CODE: string;
4
- export declare const ENVIRONMENT: "production" | "development";
4
+ export declare const ENVIRONMENT: "production" | "staging" | "development";
5
5
  export declare const INTERNALS__REPORT_WEB_VITALS: boolean;
@@ -15,7 +15,7 @@ export const PLATFORM_CODE = z
15
15
  .trim()
16
16
  .parse(process.env.NEXT_PUBLIC_PLATFORM_CODE);
17
17
  export const ENVIRONMENT = z
18
- .enum(['production', 'development'])
18
+ .enum(['production', 'staging', 'development'])
19
19
  .catch('development')
20
20
  .parse(process.env.NEXT_PUBLIC_ENVIRONMENT);
21
21
  export const INTERNALS__REPORT_WEB_VITALS = z
Binary file
Binary file
Binary file
Binary file
Binary file