@opexa/portal-components 0.0.231 → 0.0.233

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 (100) hide show
  1. package/dist/client/hooks/useCamera.d.ts +1 -0
  2. package/dist/client/hooks/useCamera.js +12 -7
  3. package/dist/client/hooks/useFeatureFlag.d.ts +1 -1
  4. package/dist/client/hooks/useFeatureFlag.js +1 -19
  5. package/dist/components/CashbackBonus/CashbackBonus.client.d.ts +2 -0
  6. package/dist/components/CashbackBonus/CashbackBonus.client.js +9 -0
  7. package/dist/components/CashbackBonus/CashbackBonus.d.ts +10 -0
  8. package/dist/components/CashbackBonus/CashbackBonus.js +5 -0
  9. package/dist/components/CashbackBonus/index.d.ts +1 -0
  10. package/dist/components/CashbackBonus/index.js +1 -0
  11. package/dist/components/Empty.d.ts +1 -2
  12. package/dist/components/FeatureFlag/FeatureFlag.js +21 -2
  13. package/dist/components/Jackpots/JackpotsCarousel/JackpotsCarouselItem.js +1 -1
  14. package/dist/components/Jackpots/JackpotsList/JackpotsListItemDesktop.js +2 -2
  15. package/dist/components/Jackpots/JackpotsList/JackpotsListItemMobile.js +1 -1
  16. package/dist/components/KYC/Header.js +4 -2
  17. package/dist/components/KYC/Step1.js +3 -2
  18. package/dist/components/KYC/Step2.js +3 -2
  19. package/dist/components/KYC/Step3.js +4 -2
  20. package/dist/components/KYC/Step4.js +3 -2
  21. package/dist/components/KYC/backup/KYCContext.d.ts +5 -1
  22. package/dist/components/KYC/loadModels.d.ts +1 -0
  23. package/dist/components/KYC/loadModels.js +9 -0
  24. package/dist/components/Messages/Message.js +2 -3
  25. package/dist/components/Messages/MessageContext.d.ts +5 -1
  26. package/dist/components/Messages/MessagePopup.js +2 -3
  27. package/dist/components/Promo/PromoContent.d.ts +2 -0
  28. package/dist/components/Promo/PromoContent.js +9 -0
  29. package/dist/components/Promos/PromoCarousel.d.ts +2 -0
  30. package/dist/components/Promos/PromoCarousel.js +41 -0
  31. package/dist/components/Promos/PromoGrid.d.ts +2 -0
  32. package/dist/components/Promos/PromoGrid.js +12 -0
  33. package/dist/components/Promos/PromoItem.d.ts +7 -0
  34. package/dist/components/Promos/PromoItem.js +10 -0
  35. package/dist/components/Quests/DailyCheckInQuest/DailyCheckInQuest.d.ts +1 -1
  36. package/dist/components/Quests/DailyCheckInQuest/DailyCheckInQuest.js +10 -5
  37. package/dist/components/Quests/DailyCheckInQuest/DailyCheckInQuestModal.js +4 -3
  38. package/dist/components/Quests/OnboardingQuest/OnboardingQuest.d.ts +1 -1
  39. package/dist/components/Quests/WageringQuest/WageringQuest.d.ts +1 -1
  40. package/dist/components/Quests/WageringQuest/WageringQuest.js +3 -2
  41. package/dist/components/Quests/WageringQuest/WageringQuestModal.js +4 -3
  42. package/dist/components/SignUp/SignUpForm.js +6 -1
  43. package/dist/components/shared/IdDocumentField.js +117 -48
  44. package/dist/components/shared/SelfieField.js +105 -43
  45. package/dist/constants/BranchCode.d.ts +4 -0
  46. package/dist/constants/BranchCode.js +42 -0
  47. package/dist/constants/endpoints.d.ts +10 -0
  48. package/dist/constants/endpoints.js +41 -0
  49. package/dist/constants/gameProviders.d.ts +1 -2
  50. package/dist/constants/gameProviders.js +6 -0
  51. package/dist/constants/gameTypes.d.ts +1 -2
  52. package/dist/constants/headerKeys.d.ts +1 -0
  53. package/dist/constants/headerKeys.js +1 -0
  54. package/dist/constants/secretQuestions.d.ts +1 -1
  55. package/dist/ui/AlertDialog/AlertDialog.d.ts +88 -88
  56. package/dist/ui/AlertDialog/alertDialog.recipe.d.ts +11 -11
  57. package/dist/ui/Avatar/avatar.recipe.d.ts +3 -3
  58. package/dist/ui/Badge/Badge.d.ts +12 -12
  59. package/dist/ui/Carousel/Carousel.d.ts +45 -45
  60. package/dist/ui/Carousel/carousel.recipe.d.ts +5 -5
  61. package/dist/ui/Checkbox/Checkbox.d.ts +23 -23
  62. package/dist/ui/Checkbox/checkbox.recipe.d.ts +3 -3
  63. package/dist/ui/Clipboard/Clipboard.d.ts +18 -18
  64. package/dist/ui/Collapsible/Collapsible.d.ts +32 -32
  65. package/dist/ui/Collapsible/collapsible.recipe.d.ts +5 -5
  66. package/dist/ui/Combobox/Combobox.d.ts +42 -42
  67. package/dist/ui/Combobox/combobox.recipe.d.ts +3 -3
  68. package/dist/ui/DatePicker/DatePicker.d.ts +72 -72
  69. package/dist/ui/DatePicker/datePicker.recipe.d.ts +3 -3
  70. package/dist/ui/Dialog/Dialog.d.ts +88 -88
  71. package/dist/ui/Dialog/dialog.recipe.d.ts +11 -11
  72. package/dist/ui/Drawer/Drawer.d.ts +33 -33
  73. package/dist/ui/Drawer/drawer.recipe.d.ts +3 -3
  74. package/dist/ui/Menu/Menu.d.ts +144 -144
  75. package/dist/ui/Menu/menu.recipe.d.ts +20 -20
  76. package/dist/ui/PasswordInput/PasswordInput.d.ts +18 -18
  77. package/dist/ui/Popover/Popover.d.ts +55 -55
  78. package/dist/ui/Popover/popover.recipe.d.ts +8 -8
  79. package/dist/ui/Presence.d.ts +1 -1
  80. package/dist/ui/Presence.js +1 -1
  81. package/dist/ui/Progress/Progress.d.ts +27 -27
  82. package/dist/ui/Progress/progress.recipe.d.ts +3 -3
  83. package/dist/ui/QrCode/qrCode.recipe.d.ts +5 -5
  84. package/dist/ui/SegmentGroup/SegmentGroup.d.ts +18 -18
  85. package/dist/ui/SegmentGroup/segmentGroup.recipe.d.ts +3 -3
  86. package/dist/ui/Select/Select.d.ts +45 -45
  87. package/dist/ui/Select/select.recipe.d.ts +3 -3
  88. package/dist/ui/Table/Table.d.ts +21 -21
  89. package/dist/ui/Table/table.anatomy.d.ts +1 -1
  90. package/dist/ui/Table/table.recipe.d.ts +3 -3
  91. package/dist/ui/Tabs/Tabs.d.ts +15 -15
  92. package/dist/ui/Tabs/tabs.recipe.d.ts +3 -3
  93. package/dist/utils/createErrorFromCode.d.ts +2 -0
  94. package/dist/utils/createErrorFromCode.js +11 -0
  95. package/dist/utils/validateFile.js +8 -5
  96. package/package.json +4 -1
  97. package/dist/utils/constants.d.ts +0 -2
  98. package/dist/utils/constants.js +0 -2
  99. package/dist/utils/isBetween3amAnd3pm.d.ts +0 -1
  100. package/dist/utils/isBetween3amAnd3pm.js +0 -5
@@ -28,6 +28,7 @@ export interface UseCameraReturn {
28
28
  data: CameraData | null;
29
29
  error: CameraError | null;
30
30
  loading: boolean;
31
+ videoRef: React.RefObject<HTMLVideoElement | null>;
31
32
  videoProps: ComponentPropsWithRef<'video'>;
32
33
  }
33
34
  export interface UseCameraOptions extends MediaStreamConstraints {
@@ -3,7 +3,7 @@ import { useCallback, useMemo, useRef, useState, } from 'react';
3
3
  import invariant from 'tiny-invariant';
4
4
  export function useCamera(options = {}) {
5
5
  const { validate, ...constraints } = options;
6
- const ref = useRef(null);
6
+ const videoRef = useRef(null);
7
7
  const stream = useRef(null);
8
8
  const [data, setData] = useState(null);
9
9
  const [error, setError] = useState(null);
@@ -13,7 +13,7 @@ export function useCamera(options = {}) {
13
13
  setError(null);
14
14
  setLoading(true);
15
15
  await sleep();
16
- const node = ref.current;
16
+ const node = videoRef.current;
17
17
  if (!node) {
18
18
  setLoading(false);
19
19
  setError({
@@ -74,18 +74,18 @@ export function useCamera(options = {}) {
74
74
  setError(null);
75
75
  return new Promise((resolve) => {
76
76
  stream.current?.getTracks().forEach((track) => track.stop());
77
- ref.current?.pause();
77
+ videoRef.current?.pause();
78
78
  resolve();
79
79
  });
80
80
  }, [setData, setError]);
81
81
  const snap = useCallback(async (opts = {}) => {
82
82
  setData(null);
83
83
  setError(null);
84
- const video = ref.current;
84
+ const video = videoRef.current;
85
85
  const canvas = document.createElement('canvas');
86
86
  const context = canvas.getContext('2d');
87
- invariant(video);
88
- invariant(context);
87
+ invariant(video, 'Could not find video element');
88
+ invariant(context, 'Could not get canvas context');
89
89
  video.currentTime = 1;
90
90
  const videoRect = video.getBoundingClientRect();
91
91
  const lowResolution = video.videoWidth < 640 || video.videoHeight < 480;
@@ -149,14 +149,18 @@ export function useCamera(options = {}) {
149
149
  await open();
150
150
  }, [close, open]);
151
151
  const videoProps = useMemo(() => ({
152
- ref,
152
+ ref: videoRef,
153
153
  muted: true,
154
154
  autoPlay: true,
155
155
  playsInline: true,
156
+ preload: 'none',
156
157
  style: {
157
158
  width: '100%',
158
159
  height: 'auto',
159
160
  display: 'block',
161
+ position: 'relative',
162
+ boxSizing: 'border-box',
163
+ background: 'transparent',
160
164
  },
161
165
  }), []);
162
166
  return {
@@ -168,6 +172,7 @@ export function useCamera(options = {}) {
168
172
  data,
169
173
  error,
170
174
  loading,
175
+ videoRef,
171
176
  videoProps,
172
177
  };
173
178
  }
@@ -1,5 +1,5 @@
1
1
  export declare const FEATURE_FLAG_KEY = "FEATURE_FLAG_ENABLED";
2
2
  export declare const useFeatureFlag: () => {
3
3
  featureFlagEnabled: boolean;
4
- disableFeatureFlag: () => void;
4
+ setFeatureFlagEnabled: import("react").Dispatch<import("react").SetStateAction<boolean>>;
5
5
  };
@@ -1,34 +1,16 @@
1
1
  'use client';
2
- import { useRouter, useSearchParams } from 'next/navigation';
3
2
  import { useEffect, useState } from 'react';
4
3
  export const FEATURE_FLAG_KEY = 'FEATURE_FLAG_ENABLED';
5
4
  export const useFeatureFlag = () => {
6
5
  const [featureFlagEnabled, setFeatureFlagEnabled] = useState(false);
7
- const searchParams = useSearchParams();
8
- const router = useRouter();
9
- useEffect(() => {
10
- const futureFlagParam = searchParams.get('future');
11
- if (futureFlagParam !== null) {
12
- const isEnabled = futureFlagParam === 'true';
13
- setFeatureFlagEnabled(isEnabled);
14
- localStorage.setItem(FEATURE_FLAG_KEY, isEnabled.toString());
15
- }
16
- }, [searchParams]);
17
6
  useEffect(() => {
18
7
  const storedFlag = localStorage.getItem(FEATURE_FLAG_KEY);
19
8
  if (storedFlag !== null) {
20
9
  setFeatureFlagEnabled(storedFlag === 'true');
21
10
  }
22
11
  }, []);
23
- function disableFeatureFlag() {
24
- setFeatureFlagEnabled(false);
25
- localStorage.removeItem(FEATURE_FLAG_KEY);
26
- const params = new URLSearchParams(searchParams.toString());
27
- params.delete('future');
28
- router.replace(`?${params.toString()}`, { scroll: false });
29
- }
30
12
  return {
31
13
  featureFlagEnabled,
32
- disableFeatureFlag,
14
+ setFeatureFlagEnabled,
33
15
  };
34
16
  };
@@ -0,0 +1,2 @@
1
+ import type { CashbackBonusProps } from './CashbackBonus';
2
+ export declare function CashbackBonus__client(props: CashbackBonusProps): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,9 @@
1
+ 'use client';
2
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
3
+ import Image from 'next/image';
4
+ import Link from 'next/link';
5
+ import { ChevronLeftIcon, ChevronRightIcon, StopWatchIcon } from '../../icons/index.js';
6
+ import { Badge, Collapsible, Progress, Prose } from '../../ui/index.js';
7
+ export function CashbackBonus__client(props) {
8
+ return (_jsxs("div", { className: props.className, children: [_jsxs(Link, { href: props.viewAllUrl ?? '/rewards', className: "text-button-tertiary-fg flex items-center gap-lg text-lg font-semibold", children: [_jsx(ChevronLeftIcon, { className: "size-6" }), "Back to Rewards"] }), _jsx(Image, { src: "https://s3.ap-east-1.amazonaws.com/opexa-assets.opexasystem.com/assets/BSxIXEsa59_zzMAR27-ALLDAYREBATE06-STATIC-WEB-HB-1920x1080.png", alt: "", width: 1024, height: 600, className: "mt-3xl h-auto w-full rounded-xl" }), _jsxs(Badge.Root, { size: "lg", round: false, colorScheme: "brand", className: "mt-xl lg:mt-6", children: [_jsx(Badge.Icon, { children: _jsx(StopWatchIcon, {}) }), _jsx(Badge.Label, { children: "9d:10h:11m" })] }), _jsx("h1", { className: "text-text-primary-900 mt-xl text-2xl font-semibold lg:mt-6 lg:text-3xl", children: "50 PHP First Deposit Bonus" }), _jsx("p", { className: "text-text-primary-brand mt-xl text-base lg:mt-6 lg:text-lg", children: "Complete the wagering before time runs out to convert your bonus balance into real money!" }), _jsxs("div", { className: "border-border-primary bg-bg-tertiary text-text-secondary-700 mt-xl flex items-center justify-between rounded-md border px-3.5 py-xl lg:mt-6", children: [_jsx("p", { children: "Your bonus" }), _jsxs("p", { children: [_jsx("span", { className: "text-text-primary-900", children: "20.00" }), " / 50.00 PHP"] })] }), _jsxs("div", { className: "border-border-primary bg-bg-tertiary text-text-secondary-700 mt-xl flex items-center justify-between rounded-md border px-3.5 py-xl lg:mt-6", children: [_jsx("p", { children: "Required Turnover" }), _jsx("p", { children: "5x" })] }), _jsxs("div", { className: "border-border-primary bg-bg-tertiary text-text-secondary-700 mt-xl rounded-md border px-3.5 py-xl lg:mt-6", children: [_jsxs("div", { className: "flex items-center justify-between", children: [_jsx("p", { children: "Wagering" }), _jsx("p", { children: "400/1000" })] }), _jsx(Progress.Root, { defaultValue: 42, className: "mt-2", children: _jsx(Progress.Track, { children: _jsx(Progress.Range, {}) }) })] }), _jsxs(Collapsible.Root, { className: "mt-xl lg:mt-6", children: [_jsxs(Collapsible.Trigger, { className: "text-button-tertiary-fg flex w-fit items-center justify-center gap-sm text-sm font-semibold lg:mx-auto", children: ["Game Provider Contribution", _jsx(Collapsible.Indicator, { asChild: true, children: _jsx(ChevronRightIcon, { className: "size-5" }) })] }), _jsxs(Collapsible.Content, { className: "border-border-primary bg-bg-tertiary text-text-secondary-700 mt-xl space-y-1.5 rounded-md border px-3.5 py-xl lg:mt-6", children: [_jsxs("div", { className: "flex items-center justify-between gap-md", children: [_jsx("p", { className: "w-[11.25rem] shrink-0", children: "Playson" }), _jsx(Progress.Root, { defaultValue: 42, className: "mt-2 grow", children: _jsx(Progress.Track, { children: _jsx(Progress.Range, {}) }) }), _jsx("p", { children: "25%" })] }), _jsxs("div", { className: "flex items-center justify-between gap-md", children: [_jsx("p", { className: "w-[11.25rem] shrink-0", children: "Betsoft Gaming" }), _jsx(Progress.Root, { defaultValue: 42, className: "mt-2 grow", children: _jsx(Progress.Track, { children: _jsx(Progress.Range, {}) }) }), _jsx("p", { children: "13%" })] }), _jsxs("div", { className: "flex items-center justify-between gap-md", children: [_jsx("p", { className: "w-[11.25rem] shrink-0", children: "Microgaming" }), _jsx(Progress.Root, { defaultValue: 42, className: "mt-2 grow", children: _jsx(Progress.Track, { children: _jsx(Progress.Range, {}) }) }), _jsx("p", { children: "50%" })] }), _jsxs("div", { className: "flex items-center justify-between gap-md", children: [_jsx("p", { className: "w-[11.25rem] shrink-0", children: "Realtime Gaming" }), _jsx(Progress.Root, { defaultValue: 42, className: "mt-2 grow", children: _jsx(Progress.Track, { children: _jsx(Progress.Range, {}) }) }), _jsx("p", { children: "10%" })] })] })] }), _jsxs(Prose, { className: "mt-xl lg:mt-6", children: [_jsx("h3", { children: "How to get bonus" }), _jsxs("ol", { children: [_jsx("li", { children: "All OFWin members are eligible for this program." }), _jsx("li", { children: "50 PHP of game credit will be automatically credited to the new member account upon completion of first deposit Auctor vel in vitae placerat." }), _jsx("li", { children: "Member must reach a 5x turnover requirement before a withdrawal can be made. Attempting to make a withdrawal before this turnover requirement is completed could cause your bonus to be voided." }), _jsx("li", { children: "Players will have 10 days from the date the bonus is awarded to complete the rollover requirement." }), _jsx("li", { children: "Bets used to meet other bonus rollover requirements will not count toward this promotion." })] }), _jsx("h3", { children: "Terms and Conditions" }), _jsxs("ul", { children: [_jsx("li", { children: "Only one account per player is allowed. No same IP address/bank account name allowed. Players who have multiple or fraudulent accounts will not be qualified for the promotion." }), _jsx("li", { children: "Players that are found to have any duplicate accounts or those who participate in fraudulent activities may have their funds forfeited and their accounts closed." }), _jsx("li", { children: "OFWin reserves the right to amend or cancel this Referral Program at any time. OFWin General Terms and Conditions apply." })] })] })] }));
9
+ }
@@ -0,0 +1,10 @@
1
+ export interface CashbackBonusProps {
2
+ id: string;
3
+ className?: string;
4
+ /**
5
+ * @description URL for the bonuses details page
6
+ * @default "/rewards"
7
+ */
8
+ viewAllUrl?: string;
9
+ }
10
+ export declare function CashbackBonus(props: CashbackBonusProps): Promise<import("react/jsx-runtime").JSX.Element>;
@@ -0,0 +1,5 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ import { CashbackBonus__client } from './CashbackBonus.client.js';
3
+ export async function CashbackBonus(props) {
4
+ return _jsx(CashbackBonus__client, { ...props });
5
+ }
@@ -0,0 +1 @@
1
+ export * from './CashbackBonus';
@@ -0,0 +1 @@
1
+ export * from './CashbackBonus.js';
@@ -1,5 +1,5 @@
1
1
  import type { ComponentProps, ComponentType } from 'react';
2
- interface EmptyProps {
2
+ export interface EmptyProps {
3
3
  icon: ComponentType<ComponentProps<'svg'>>;
4
4
  title: string;
5
5
  message: string;
@@ -7,4 +7,3 @@ interface EmptyProps {
7
7
  className?: string;
8
8
  }
9
9
  export declare function Empty(props: EmptyProps): import("react/jsx-runtime").JSX.Element;
10
- export {};
@@ -1,8 +1,27 @@
1
1
  'use client';
2
2
  import { jsxs as _jsxs, jsx as _jsx } from "react/jsx-runtime";
3
- import { useFeatureFlag } from '../../client/hooks/useFeatureFlag.js';
3
+ import { useRouter, useSearchParams } from 'next/navigation';
4
+ import { useEffect } from 'react';
5
+ import { FEATURE_FLAG_KEY, useFeatureFlag, } from '../../client/hooks/useFeatureFlag.js';
4
6
  export function FeatureFlag() {
5
- const { featureFlagEnabled, disableFeatureFlag } = useFeatureFlag();
7
+ const { featureFlagEnabled, setFeatureFlagEnabled } = useFeatureFlag();
8
+ const searchParams = useSearchParams();
9
+ const router = useRouter();
10
+ useEffect(() => {
11
+ const futureFlagParam = searchParams.get('future');
12
+ if (futureFlagParam !== null) {
13
+ const isEnabled = futureFlagParam === 'true';
14
+ setFeatureFlagEnabled(isEnabled);
15
+ localStorage.setItem(FEATURE_FLAG_KEY, isEnabled.toString());
16
+ }
17
+ }, [searchParams, setFeatureFlagEnabled]);
18
+ function disableFeatureFlag() {
19
+ setFeatureFlagEnabled(false);
20
+ localStorage.removeItem(FEATURE_FLAG_KEY);
21
+ const params = new URLSearchParams(searchParams.toString());
22
+ params.delete('future');
23
+ router.replace(`?${params.toString()}`, { scroll: false });
24
+ }
6
25
  if (!featureFlagEnabled) {
7
26
  return null;
8
27
  }
@@ -57,7 +57,7 @@ export function JackpotsCarouselItem({ style, className, viewAllUrl, animate = t
57
57
  currency: localeInfo.currency.code,
58
58
  minDecimalPlaces: 2,
59
59
  maxDecimalPlaces: 2,
60
- }) })] }), _jsx("div", { className: "z-1 bottom-[-60] right-0 lg:absolute", children: _jsx(Image, { width: 150, height: 150, src: isPayingOut ? openChest : closeChest, alt: "closeChest", quality: 100, className: "h-25 w-25 lg:h-37.5 lg:w-37.5 size-full p-2" }) })] }), latestJackpotPayout.amount ? (_jsx("div", { children: _jsxs("div", { className: "bg-bg-primary relative mt-4 hidden w-full gap-4 rounded-lg p-4 lg:flex", children: [_jsxs("div", { className: "bg-bg-tertiary relative flex h-18 w-18 items-center justify-center rounded-full", children: [_jsx(User01Icon, { className: "text-text-quarterary-500 size-9" }), _jsxs("div", { className: "bg-yellow-400 text-brand-950 border-bg-primary absolute bottom-0 right-0 flex h-6 w-6 items-center justify-center rounded-full border-[1.5px] text-xs font-bold", children: [latestJackpotPayout.multiplier, "x"] })] }), _jsxs("div", { className: "flex flex-col gap-1 text-left", children: [_jsxs("div", { className: "border-utility-brand-200 bg-utility-brand-50 text-utility-brand-700 flex h-fit w-fit items-center gap-1 rounded-sm border px-2 py-0.5 text-xs font-medium", children: [_jsx(Trophy01Icon, { className: "text-utility-brand-600 size-3.5" }), "Recent Payout"] }), _jsx("div", { className: "font-semibold", children: mask(latestJackpotPayout.member.name, {
60
+ }) })] }), _jsx("div", { className: "min-w-25 hidden lg:block" }), _jsx("div", { className: "z-1 min-w-25 bottom-[-60] right-0 lg:absolute", children: _jsx(Image, { width: 150, height: 150, src: isPayingOut ? openChest : closeChest, alt: "closeChest", quality: 100, className: "h-25 w-25 lg:h-37.5 lg:w-37.5 size-full p-2" }) })] }), latestJackpotPayout.amount ? (_jsx("div", { children: _jsxs("div", { className: "bg-bg-primary relative mt-4 hidden w-full gap-4 rounded-lg p-4 lg:flex", children: [_jsxs("div", { className: "bg-bg-tertiary relative flex h-18 w-18 items-center justify-center rounded-full", children: [_jsx(User01Icon, { className: "text-text-quarterary-500 size-9" }), _jsxs("div", { className: "bg-yellow-400 text-brand-950 border-bg-primary absolute bottom-0 right-0 flex h-6 w-6 items-center justify-center rounded-full border-[1.5px] text-xs font-bold", children: [latestJackpotPayout.multiplier, "x"] })] }), _jsxs("div", { className: "flex flex-col gap-1 text-left", children: [_jsxs("div", { className: "border-utility-brand-200 bg-utility-brand-50 text-utility-brand-700 flex h-fit w-fit items-center gap-1 rounded-sm border px-2 py-0.5 text-xs font-medium", children: [_jsx(Trophy01Icon, { className: "text-utility-brand-600 size-3.5" }), "Recent Payout"] }), _jsx("div", { className: "font-semibold", children: mask(latestJackpotPayout.member.name, {
61
61
  totalCharsCount: 6,
62
62
  }) }), _jsx("div", { className: "text-brand-400 text-2xl", children: formatNumber(latestJackpotPayout.amount, {
63
63
  currency: localeInfo.currency.code,
@@ -24,11 +24,11 @@ import { useJackpotsListItemData } from './useJackpotsListItemData.js';
24
24
  export function JackpotsListItemDesktop({ animate = true, ...props }) {
25
25
  const jackpot = useJackpotsListItemContext();
26
26
  const { jackpotPayouts, topJackpotPayout, filteredGameProviders, localeInfo, isPayingOut, jackpotAmount, arrowImages, getAccumulatingJackpotDescription, } = useJackpotsListItemData();
27
- return (_jsxs("div", { className: twMerge('bg-bg-tertiary border-border-primary rounded-2xl border', props.className), children: [_jsxs("div", { style: props.style, className: twMerge('relative flex shrink-0 rounded-2xl p-3 text-center lg:gap-4 lg:p-5'), children: [_jsxs("div", { className: "z-1 relative flex flex-1 flex-col", children: [_jsx("div", { className: "flex h-full flex-col justify-between", children: _jsx("div", { className: "flex w-full justify-between", children: _jsxs("div", { className: "flex w-full flex-col", children: [_jsxs("div", { className: "relative flex w-full justify-between", children: [_jsxs("div", { className: "w-[calc(100%-4rem)]", children: [isPayingOut ? (_jsxs("div", { className: "border-utility-success-200 bg-utility-success-50 text-utility-success-700 flex w-fit items-center gap-1 rounded-full border px-2 py-0.5 text-xs font-medium", children: [_jsx("span", { className: "full bg-utility-success-500 size-1.5 animate-pulse rounded" }), "Paying Out"] })) : (_jsxs("div", { className: "border-utility-blue-200 bg-utility-blue-50 text-utility-blue-700 flex w-fit items-center gap-1 rounded-full border px-2 py-0.5 text-xs font-medium", children: [_jsx(ArrowNarrowUpRightIcon, { className: "text-utility-blue-500 size-3.5" }), "Accumulating"] })), _jsx("div", { className: "text-text-primary-900 mt-1 text-left text-lg font-medium lg:mt-5 lg:text-2xl", children: jackpot.name }), _jsx("div", { className: "bg-bg-primary text-brand-400 mt-1.5 w-fit rounded-md px-2 py-1 text-2xl font-bold lg:mt-2 lg:text-4xl", children: formatNumber(jackpotAmount, {
27
+ return (_jsxs("div", { className: twMerge('bg-bg-tertiary border-border-primary rounded-2xl border', props.className), children: [_jsxs("div", { style: props.style, className: twMerge('relative flex shrink-0 rounded-2xl p-3 text-center lg:gap-4 lg:p-5'), children: [_jsxs("div", { className: "z-1 relative flex flex-1 flex-col", children: [_jsx("div", { className: "flex h-full flex-col justify-between", children: _jsx("div", { className: "flex w-full justify-between", children: _jsxs("div", { className: "flex w-full flex-col", children: [_jsxs("div", { className: "relative flex w-full justify-between", children: [_jsxs("div", { children: [isPayingOut ? (_jsxs("div", { className: "border-utility-success-200 bg-utility-success-50 text-utility-success-700 flex w-fit items-center gap-1 rounded-full border px-2 py-0.5 text-xs font-medium", children: [_jsx("span", { className: "full bg-utility-success-500 size-1.5 animate-pulse rounded" }), "Paying Out"] })) : (_jsxs("div", { className: "border-utility-blue-200 bg-utility-blue-50 text-utility-blue-700 flex w-fit items-center gap-1 rounded-full border px-2 py-0.5 text-xs font-medium", children: [_jsx(ArrowNarrowUpRightIcon, { className: "text-utility-blue-500 size-3.5" }), "Accumulating"] })), _jsx("div", { className: "text-text-primary-900 mt-1 text-left text-lg font-medium lg:mt-5 lg:text-2xl", children: jackpot.name }), _jsx("div", { className: "bg-bg-primary text-brand-400 mt-1.5 w-fit rounded-md px-2 py-1 text-2xl font-bold lg:mt-2 lg:text-4xl", children: formatNumber(jackpotAmount, {
28
28
  currency: localeInfo.currency.code,
29
29
  minDecimalPlaces: 2,
30
30
  maxDecimalPlaces: 2,
31
- }) })] }), _jsx("div", { className: "z-1 bottom-[-60] right-0 block lg:absolute", children: _jsx(Image, { width: 150, height: 150, src: isPayingOut ? openChest : closeChest, alt: "closeChest", quality: 100, className: "h-25 w-25 lg:h-37.5 lg:w-37.5 size-full p-2" }) })] }), topJackpotPayout.amount ? (_jsx("div", { children: _jsxs("div", { className: "bg-bg-primary relative mt-4 hidden w-full gap-4 rounded-lg p-4 lg:flex", children: [_jsxs("div", { className: "bg-bg-tertiary relative flex h-18 w-18 items-center justify-center rounded-full", children: [_jsx(User01Icon, { className: "text-text-quarterary-500 size-9" }), _jsxs("div", { className: "bg-yellow-400 text-brand-950 border-bg-primary absolute bottom-0 right-0 flex h-6 w-6 items-center justify-center rounded-full border-[1.5px] text-xs font-bold", children: [topJackpotPayout.multiplier, "x"] })] }), _jsxs("div", { className: "flex flex-col gap-1 text-left", children: [_jsxs("div", { className: "border-utility-brand-200 bg-utility-brand-50 text-utility-brand-700 flex h-fit w-fit items-center gap-1 rounded-sm border px-2 py-0.5 text-xs font-medium", children: [_jsx(Trophy01Icon, { className: "text-utility-brand-600 size-3.5" }), "Recent Payout"] }), _jsx("div", { className: "font-semibold", children: mask(topJackpotPayout.member.name, {
31
+ }) })] }), _jsx("div", { className: "min-w-30" }), _jsx("div", { className: "z-1 min-w-30 bottom-[-60] right-0 lg:absolute", children: _jsx(Image, { width: 150, height: 150, src: isPayingOut ? openChest : closeChest, alt: "closeChest", quality: 100, className: "h-25 w-25 lg:h-37.5 lg:w-37.5 size-full p-2" }) })] }), topJackpotPayout.amount ? (_jsx("div", { children: _jsxs("div", { className: "bg-bg-primary relative mt-4 hidden w-full gap-4 rounded-lg p-4 lg:flex", children: [_jsxs("div", { className: "bg-bg-tertiary relative flex h-18 w-18 items-center justify-center rounded-full", children: [_jsx(User01Icon, { className: "text-text-quarterary-500 size-9" }), _jsxs("div", { className: "bg-yellow-400 text-brand-950 border-bg-primary absolute bottom-0 right-0 flex h-6 w-6 items-center justify-center rounded-full border-[1.5px] text-xs font-bold", children: [topJackpotPayout.multiplier, "x"] })] }), _jsxs("div", { className: "flex flex-col gap-1 text-left", children: [_jsxs("div", { className: "border-utility-brand-200 bg-utility-brand-50 text-utility-brand-700 flex h-fit w-fit items-center gap-1 rounded-sm border px-2 py-0.5 text-xs font-medium", children: [_jsx(Trophy01Icon, { className: "text-utility-brand-600 size-3.5" }), "Recent Payout"] }), _jsx("div", { className: "font-semibold", children: mask(topJackpotPayout.member.name, {
32
32
  totalCharsCount: 6,
33
33
  }) }), _jsx("div", { className: "text-brand-400 text-2xl", children: formatNumber(topJackpotPayout.amount, {
34
34
  currency: localeInfo.currency.code,
@@ -32,7 +32,7 @@ export function JackpotsListItemMobile({ animate = true, ...props }) {
32
32
  currency: localeInfo.currency.code,
33
33
  minDecimalPlaces: 2,
34
34
  maxDecimalPlaces: 2,
35
- }) })] }), _jsx("div", { className: "z-1 bottom-[-60] right-0 block lg:absolute", children: _jsx(Image, { width: 100, height: 100, src: isPayingOut ? openChest : closeChest, alt: "closeChest", quality: 100, className: "size-full h-auto w-[100px]" }) })] }) }) }) }), _jsxs("div", { className: "mt-3 lg:mt-4", children: [_jsxs("div", { className: "mb-1 flex justify-between", children: [_jsx("div", { className: "text-text-primary-900 text-xs font-semibold", children: formatNumber(0, {
35
+ }) })] }), _jsx("div", { className: "z-1 min-w-34.5 bottom-[-60] right-0 block lg:absolute", children: _jsx(Image, { width: 100, height: 100, src: isPayingOut ? openChest : closeChest, alt: "closeChest", quality: 100, className: "h-34.5 w-34.5 lg:h-37.5 lg:w-37.5 size-full p-2" }) })] }) }) }) }), _jsxs("div", { className: "mt-3 lg:mt-4", children: [_jsxs("div", { className: "mb-1 flex justify-between", children: [_jsx("div", { className: "text-text-primary-900 text-xs font-semibold", children: formatNumber(0, {
36
36
  currency: localeInfo.currency.code,
37
37
  compact: true,
38
38
  }) }), _jsxs("div", { className: "relative flex items-center justify-end gap-1.5", children: [isPayingOut ? (_jsxs("div", { className: "flex w-6 items-center", children: [_jsx("div", { className: twMerge('absolute left-0', styles['animate-arrow-red-flash-1']), children: _jsx(ChevronLeftIcon, { className: "size-4.5" }) }), _jsx("div", { className: twMerge('absolute left-1.5', styles['animate-arrow-red-flash-2']), children: _jsx(ChevronLeftIcon, { className: "size-4.5" }) }), _jsx("div", { className: twMerge('absolute left-3', styles['animate-arrow-red-flash-3']), children: _jsx(ChevronLeftIcon, { className: "size-4.5" }) })] })) : (_jsxs("div", { className: "flex w-6 items-center", children: [_jsx("div", { className: twMerge('absolute left-0', styles['animate-arrow-green-flash-1']), children: _jsx(ChevronRightIcon, { className: "size-4.5" }) }), _jsx("div", { className: twMerge('absolute left-1.5', styles['animate-arrow-green-flash-2']), children: _jsx(ChevronRightIcon, { className: "size-4.5" }) }), _jsx("div", { className: twMerge('absolute left-3', styles['animate-arrow-green-flash-3']), children: _jsx(ChevronRightIcon, { className: "size-4.5" }) })] })), _jsx("div", { className: "text-text-primary-900 text-xs font-semibold", children: formatNumber(jackpot?.maximumJackpotPoolLimit, {
@@ -1,6 +1,8 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
- import { ChevronLeftIcon, XIcon } from '../../icons/index.js';
3
- import { Dialog, IconButton } from '../../ui/index.js';
2
+ import { ChevronLeftIcon } from '../../icons/ChevronLeftIcon.js';
3
+ import { XIcon } from '../../icons/XIcon.js';
4
+ import { Dialog } from '../../ui/Dialog/index.js';
5
+ import { IconButton } from '../../ui/IconButton/index.js';
4
6
  export function Header() {
5
7
  return (_jsx(Dialog.Context, { children: (api) => (_jsxs("div", { className: "bg-bg-primary-alt relative flex items-center gap-xl px-xl py-md lg:justify-center lg:bg-transparent lg:p-0", children: [_jsx(IconButton, { size: "2xs", variant: "outline", colorScheme: "gray", className: "lg:hidden", onClick: () => api.setOpen(false), children: _jsx(ChevronLeftIcon, {}) }), _jsx(Dialog.Title, { className: "text-lg font-semibold", children: "Personal Verification" }), _jsx("button", { type: "button", className: "text-text-quinary absolute right-0 top-1/2 hidden -translate-y-1/2 lg:block", onClick: () => api.setOpen(false), children: _jsx(XIcon, { className: "size-6" }) })] })) }));
6
8
  }
@@ -1,8 +1,9 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
2
  import Image from 'next/image';
3
- import { CheckIcon, XIcon } from '../../icons/index.js';
3
+ import { CheckIcon } from '../../icons/CheckIcon.js';
4
+ import { XIcon } from '../../icons/XIcon.js';
4
5
  import uploadId from '../../images/capture-id-banner.png';
5
- import { Button } from '../../ui/index.js';
6
+ import { Button } from '../../ui/Button/index.js';
6
7
  import { useKYCContext } from './KYCContext.js';
7
8
  export function Step1() {
8
9
  const context = useKYCContext();
@@ -1,8 +1,9 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
2
  import Image from 'next/image';
3
- import { CheckIcon, XIcon } from '../../icons/index.js';
3
+ import { CheckIcon } from '../../icons/CheckIcon.js';
4
+ import { XIcon } from '../../icons/XIcon.js';
4
5
  import selfie from '../../images/capture-selfie-banner.png';
5
- import { Button } from '../../ui/index.js';
6
+ import { Button } from '../../ui/Button/index.js';
6
7
  import { useKYCContext } from './KYCContext.js';
7
8
  export function Step2() {
8
9
  const context = useKYCContext();
@@ -1,6 +1,8 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
- import { CheckIcon } from '../../icons/index.js';
3
- import { Button, Checkbox, Field } from '../../ui/index.js';
2
+ import { CheckIcon } from '../../icons/CheckIcon.js';
3
+ import { Button } from '../../ui/Button/index.js';
4
+ import { Checkbox } from '../../ui/Checkbox/index.js';
5
+ import { Field } from '../../ui/Field/index.js';
4
6
  import { useKYCContext } from './KYCContext.js';
5
7
  export function Step3() {
6
8
  const context = useKYCContext();
@@ -1,6 +1,7 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
- import { CheckCircleIcon } from '../../icons/index.js';
3
- import { Button, Dialog } from '../../ui/index.js';
2
+ import { CheckCircleIcon } from '../../icons/CheckCircleIcon.js';
3
+ import { Button } from '../../ui/Button/index.js';
4
+ import { Dialog } from '../../ui/Dialog/index.js';
4
5
  export function Step4() {
5
6
  return (_jsxs("div", { children: [_jsx("div", { className: "bg-bg-success-secondary text-text-featured-icon-light-success mx-auto flex size-12 items-center justify-center rounded-full", children: _jsx(CheckCircleIcon, {}) }), _jsx("h2", { className: "mt-3 text-center", children: "Submission Successful" }), _jsx("p", { className: "text-text-tertiary-600 text-center", children: "Your documents have been submitted successfully. They\u2019re now under review, and you\u2019ll receive a notification as soon as your account is verified." }), _jsx(Dialog.Context, { children: (api) => (_jsx(Button, { className: "mt-3xl", onClick: () => api.setOpen(false), children: "Ok" })) })] }));
6
7
  }
@@ -1,2 +1,6 @@
1
1
  import type { UseKYCReturn } from './useKYC';
2
- export declare const KYCContext: import("react").Context<UseKYCReturn>, useKYCContext: () => UseKYCReturn;
2
+ export declare const KYCContext: (props: {
3
+ value: UseKYCReturn;
4
+ } & {
5
+ children?: import("react").ReactNode | undefined;
6
+ }) => React.ReactNode, useKYCContext: () => UseKYCReturn;
@@ -0,0 +1 @@
1
+ export declare function loadFaceApiModels(): Promise<void>;
@@ -0,0 +1,9 @@
1
+ import * as faceapi from 'face-api.js';
2
+ export async function loadFaceApiModels() {
3
+ const MODEL_URL = '/models';
4
+ await Promise.all([
5
+ faceapi.nets.tinyFaceDetector.loadFromUri(MODEL_URL),
6
+ faceapi.nets.faceLandmark68Net.loadFromUri(MODEL_URL),
7
+ faceapi.nets.faceRecognitionNet.loadFromUri(MODEL_URL),
8
+ ]);
9
+ }
@@ -7,7 +7,7 @@ import { useGlobalStore } from '../../client/hooks/useGlobalStore.js';
7
7
  import { useLocaleInfo } from '../../client/hooks/useLocaleInfo.js';
8
8
  import { useMarkMessageAsReadMutation } from '../../client/hooks/useMarkMessageAsReadMutation.js';
9
9
  import { useMessageContext } from './MessageContext.js';
10
- import { getMessageIcon } from './utils.js';
10
+ import { MessageIcon } from './MessageIcon.js';
11
11
  export function Message() {
12
12
  const message = useMessageContext();
13
13
  const localeInfo = useLocaleInfo();
@@ -16,7 +16,6 @@ export function Message() {
16
16
  messages: ctx.messages,
17
17
  })));
18
18
  const markMessageAsReadMutation = useMarkMessageAsReadMutation();
19
- const Icon = getMessageIcon(message.icon);
20
19
  const handleViewMessage = async () => {
21
20
  globalStore.message.setData(message);
22
21
  globalStore.message.setOpen(true);
@@ -31,5 +30,5 @@ export function Message() {
31
30
  };
32
31
  return (_jsxs("div", { role: "button", tabIndex: 0, className: "border-border-secondary rounded-xs bg-bg-secondary flex h-auto flex-shrink-0 cursor-pointer flex-col border px-3.5 py-2.5", onClick: handleViewMessage, "aria-pressed": "false", children: [_jsxs("div", { className: "flex items-center space-x-2", children: [_jsx("p", { className: "text-text-tertiary-600 text-xs font-normal", children: format(new Date(message.dateTimeCreated), 'M/d/yyyy - h:mma', {
33
32
  in: tz(localeInfo.timezone),
34
- }) }), !message.markedAsRead && (_jsx("div", { className: "bg-utility-success-500 h-2.5 w-2.5 rounded-full" }))] }), _jsxs("div", { className: "mb-2 flex items-center space-x-2", children: [_jsx(Icon, { className: "text-brand-400" }), _jsx("p", { className: "text-text-primary-brand text-sm font-semibold", children: message.title })] }), _jsx("p", { className: "line-clamp-3 text-wrap text-sm font-normal", dangerouslySetInnerHTML: { __html: message.content } }), message.actions.length > 0 && (_jsx("div", { className: "mt-2 flex flex-wrap items-center justify-end gap-2", children: message.actions.map((action, index) => (_jsx(Link, { className: "border-button-secondary-border text-button-secondary-fg rounded-md border px-3 py-2 text-sm", href: action.url, onClick: handleActionClick, children: action.name }, index))) }))] }));
33
+ }) }), !message.markedAsRead && (_jsx("div", { className: "bg-utility-success-500 h-2.5 w-2.5 rounded-full" }))] }), _jsxs("div", { className: "mb-2 flex items-center space-x-2", children: [_jsx(MessageIcon, { type: message.icon, className: "text-brand-400 size-5" }), _jsx("p", { className: "text-text-primary-brand text-sm font-semibold", children: message.title })] }), _jsx("p", { className: "line-clamp-3 text-wrap text-sm font-normal", dangerouslySetInnerHTML: { __html: message.content } }), message.actions.length > 0 && (_jsx("div", { className: "mt-2 flex flex-wrap items-center justify-end gap-2", children: message.actions.map((action, index) => (_jsx(Link, { className: "border-button-secondary-border text-button-secondary-fg rounded-md border px-3 py-2 text-sm", href: action.url, onClick: handleActionClick, children: action.name }, index))) }))] }));
35
34
  }
@@ -1,2 +1,6 @@
1
1
  import type { Message } from '../../types';
2
- export declare const MessageContext: import("react").Context<Message>, useMessageContext: () => Message;
2
+ export declare const MessageContext: (props: {
3
+ value: Message;
4
+ } & {
5
+ children?: import("react").ReactNode | undefined;
6
+ }) => React.ReactNode, useMessageContext: () => Message;
@@ -6,13 +6,12 @@ import { useGlobalStore } from '../../client/hooks/useGlobalStore.js';
6
6
  import { XIcon } from '../../icons/XIcon.js';
7
7
  import { Dialog } from '../../ui/Dialog/index.js';
8
8
  import { Portal } from '../../ui/Portal/index.js';
9
- import { getMessageIcon } from './utils.js';
9
+ import { MessageIcon } from './MessageIcon.js';
10
10
  export const MessagePopup = () => {
11
11
  const globalStore = useGlobalStore(useShallow((ctx) => ({ message: ctx.message })));
12
- const Icon = getMessageIcon(globalStore.message.data?.icon ?? 'MESSAGE');
13
12
  return (_jsx(Dialog.Root, { lazyMount: true, unmountOnExit: true, open: globalStore.message.open, onOpenChange: ({ open }) => {
14
13
  globalStore.message.setOpen(open);
15
- }, closeOnEscape: false, closeOnInteractOutside: false, children: _jsxs(Portal, { children: [_jsx(Dialog.Backdrop, { className: "!z-[calc(var(--z-dialog)+1)]" }), _jsx(Dialog.Positioner, { className: "!z-[calc(var(--z-dialog)+2)] flex items-center justify-center", children: _jsxs(Dialog.Content, { className: "min-h-auto mx-auto min-w-[21.438rem] max-w-[21.438rem] rounded-xl px-xl pb-0 pt-5 shadow-xl", children: [_jsx(Dialog.CloseTrigger, { children: _jsx(XIcon, {}) }), _jsxs("div", { className: "pb-6", children: [_jsx("div", { className: "bg-bg-brand-secondary mx-auto w-fit rounded-full p-3", children: _jsx(Icon, { className: "text-text-brand", height: "24", width: "24" }) }), _jsx("p", { className: "text-text-primary-brand mt-lg text-center text-lg font-semibold leading-tight", children: globalStore.message.data?.title }), _jsx("div", { className: "text-shadow-text-secondary-700 mt-xs text-center text-sm font-normal leading-tight", dangerouslySetInnerHTML: {
14
+ }, closeOnEscape: false, closeOnInteractOutside: false, children: _jsxs(Portal, { children: [_jsx(Dialog.Backdrop, { className: "!z-[calc(var(--z-dialog)+1)]" }), _jsx(Dialog.Positioner, { className: "!z-[calc(var(--z-dialog)+2)] flex items-center justify-center", children: _jsxs(Dialog.Content, { className: "min-h-auto mx-auto min-w-[21.438rem] max-w-[21.438rem] rounded-xl px-xl pb-0 pt-5 shadow-xl", children: [_jsx(Dialog.CloseTrigger, { children: _jsx(XIcon, {}) }), _jsxs("div", { className: "pb-6", children: [_jsx("div", { className: "bg-bg-brand-secondary mx-auto w-fit rounded-full p-3", children: _jsx(MessageIcon, { type: globalStore.message.data?.icon ?? 'INFO', className: "text-text-brand size-6" }) }), _jsx("p", { className: "text-text-primary-brand mt-lg text-center text-lg font-semibold leading-tight", children: globalStore.message.data?.title }), _jsx("div", { className: "text-shadow-text-secondary-700 mt-xs text-center text-sm font-normal leading-tight", dangerouslySetInnerHTML: {
16
15
  __html: globalStore.message.data?.content ?? '',
17
16
  } })] }), globalStore.message.data?.actions.length ? (_jsx("div", { className: "flex flex-col space-y-2 px-4 pb-8 pt-6 text-center", children: globalStore.message.data.actions.map((action, index) => (_jsx(Link, { className: "bg-button-primary-bg rounded-xs text-button-primary-fg w-full px-4 py-2.5 text-base font-semibold", href: action.url, onClick: () => {
18
17
  globalStore.message.setOpen(false);
@@ -0,0 +1,2 @@
1
+ import type { PromoProps } from './Promo';
2
+ export declare function PromoContent(props: PromoProps): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,9 @@
1
+ 'use client';
2
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
3
+ import Image from 'next/image';
4
+ import Link from 'next/link';
5
+ import { ChevronLeftIcon } from '../../icons/index.js';
6
+ import { Button, Prose } from '../../ui/index.js';
7
+ export function PromoContent(props) {
8
+ return (_jsxs("div", { className: props.className, children: [_jsxs(Link, { href: props.viewAllPromosUrl ?? '/promos', className: "text-button-tertiary-fg flex w-fit items-center gap-lg text-lg font-semibold", children: [_jsx(ChevronLeftIcon, { className: "size-6" }), "Back to all Promotions"] }), _jsx(Image, { src: "https://s3.ap-east-1.amazonaws.com/opexa-assets.opexasystem.com/assets/BSxIXEsa59_zzMAR27-ALLDAYREBATE06-STATIC-WEB-HB-1920x1080.png", alt: "", width: 1024, height: 600, className: "mt-xl h-auto w-full rounded-xl lg:mt-6" }), _jsx(Button, { className: "mt-xl lg:mt-6", children: "Deposit Now" }), _jsx("h1", { className: "mt-xl text-2xl font-semibold lg:mt-6 lg:text-3xl", children: "Welcome Bonus 100% up to $500 + 10 Free Spins" }), _jsx("p", { className: "text-text-secondary-700 mt-xl lg:mt-6", children: "Ends 5/26/2025, 1:59:59 AM" }), _jsxs(Prose, { className: "mt-2xl lg:mt-6", children: [_jsx("p", { children: "Mi tincidunt elit, id quisque ligula ac diam, amet. Vel etiam suspendisse morbi eleifend faucibus eget vestibulum felis. Dictum quis montes, sit sit. Tellus aliquam enim urna, etiam. Mauris posuere vulputate arcu amet, vitae nisi, tellus tincidunt. At feugiat sapien varius id." }), _jsx("p", { children: "Eget quis mi enim, leo lacinia pharetra, semper. Eget in volutpat mollis at volutpat lectus velit, sed auctor. Porttitor fames arcu quis fusce augue enim. Quis at habitant diam at. Suscipit tristique risus, at donec. In turpis vel et quam imperdiet. Ipsum molestie aliquet sodales id est ac volutpat." }), _jsx("p", { children: "Ipsum sit mattis nulla quam nulla. Gravida id gravida ac enim mauris id. Non pellentesque congue eget consectetur turpis. Sapien, dictum molestie sem tempor. Diam elit, orci, tincidunt aenean tempus. Quis velit eget ut tortor tellus. Sed vel, congue felis elit erat nam nibh orci." }), _jsx("p", { children: "Dolor enim eu tortor urna sed duis nulla. Aliquam vestibulum, nulla odio nisl vitae. In aliquet pellentesque aenean hac vestibulum turpis mi bibendum diam. Tempor integer aliquam in vitae malesuada fringilla." }), _jsx("p", { children: "Elit nisi in eleifend sed nisi. Pulvinar at orci, proin imperdiet commodo consectetur convallis risus. Sed condimentum enim dignissim adipiscing faucibus consequat, urna. Viverra purus et erat auctor aliquam. Risus, volutpat vulputate posuere purus sit congue convallis aliquet. Arcu id augue ut feugiat donec porttitor neque. Mauris, neque ultricies eu vestibulum, bibendum quam lorem id. Dolor lacus, eget nunc lectus in tellus, pharetra, porttitor." }), _jsx("p", { children: "Ipsum sit mattis nulla quam nulla. Gravida id gravida ac enim mauris id. Non pellentesque congue eget consectetur turpis. Sapien, dictum molestie sem tempor. Diam elit, orci, tincidunt aenean tempus. Quis velit eget ut tortor tellus. Sed vel, congue felis elit erat nam nibh orci." }), _jsx("h5", { children: "General Conditions:" }), _jsx("p", { children: "Mi tincidunt elit, id quisque ligula ac diam, amet. Vel etiam suspendisse morbi eleifend faucibus eget vestibulum felis. Dictum quis montes, sit sit. Tellus aliquam enim urna, etiam. Mauris posuere vulputate arcu amet, vitae nisi, tellus tincidunt. At feugiat sapien varius id." }), _jsx("p", { children: "Eget quis mi enim, leo lacinia pharetra, semper. Eget in volutpat mollis at volutpat lectus velit, sed auctor. Porttitor fames arcu quis fusce augue enim. Quis at habitant diam at. Suscipit tristique risus, at donec. In turpis vel et quam imperdiet. Ipsum molestie aliquet sodales id est ac volutpat." })] }), _jsxs(Prose, { className: "bg-bg-secondary mt-xl rounded-2xl p-2xl lg:mt-16 lg:p-4xl", children: [_jsx("h2", { children: "Conclusion" }), _jsx("p", { children: "Morbi sed imperdiet in ipsum, adipiscing elit dui lectus. Tellus id scelerisque est ultricies ultricies. Duis est sit sed leo nisl, blandit elit sagittis. Quisque tristique consequat quam sed. Nisl at scelerisque amet nulla purus habitasse." }), _jsx("p", { children: "Nunc sed faucibus bibendum feugiat sed interdum. Ipsum egestas condimentum mi massa. In tincidunt pharetra consectetur sed duis facilisis metus. Etiam egestas in nec sed et. Quis lobortis at sit dictum eget nibh tortor commodo cursus." }), _jsx("p", { children: "Odio felis sagittis, morbi feugiat tortor vitae feugiat fusce aliquet. Nam elementum urna nisi aliquet erat dolor enim. Ornare id morbi eget ipsum. Aliquam senectus neque ut id eget consectetur dictum. Donec posuere pharetra odio consequat scelerisque et, nunc tortor." })] })] }));
9
+ }
@@ -0,0 +1,2 @@
1
+ import type { PromosProps } from './Promos';
2
+ export declare function PromoCarousel(props: PromosProps): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,41 @@
1
+ 'use client';
2
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
3
+ import useEmblaCarousel, {} from 'embla-carousel-react';
4
+ import Link from 'next/link';
5
+ import { useCallback, useEffect, useState } from 'react';
6
+ import { twMerge } from 'tailwind-merge';
7
+ import { usePromosQuery } from '../../client/hooks/index.js';
8
+ import { ArrowLeftIcon, ArrowRightIcon, ChevronRightIcon, Gift01Icon, } from '../../icons/index.js';
9
+ import { Button } from '../../ui/index.js';
10
+ import { Empty } from '../Empty.js';
11
+ import { PromosItem } from './PromoItem.js';
12
+ export function PromoCarousel(props) {
13
+ const promosQuery = usePromosQuery({});
14
+ const promos = promosQuery.data || [];
15
+ const [emblaRef, emblaApi] = useEmblaCarousel({
16
+ align: 'start',
17
+ slidesToScroll: 1,
18
+ breakpoints: {
19
+ '(min-width: 1024px)': {
20
+ slidesToScroll: 3,
21
+ },
22
+ },
23
+ });
24
+ const [prevBtnDisabled, setPrevBtnDisabled] = useState(true);
25
+ const [nextBtnDisabled, setNextBtnDisabled] = useState(true);
26
+ const onPrevButtonClick = useCallback(() => emblaApi?.scrollPrev(), [emblaApi]);
27
+ const onNextButtonClick = useCallback(async () => {
28
+ emblaApi?.scrollNext();
29
+ }, [emblaApi]);
30
+ const onSelect = useCallback((emblaApi) => {
31
+ setPrevBtnDisabled(!emblaApi?.canScrollPrev());
32
+ setNextBtnDisabled(!emblaApi?.canScrollNext());
33
+ }, []);
34
+ useEffect(() => {
35
+ if (!emblaApi)
36
+ return;
37
+ onSelect(emblaApi);
38
+ emblaApi.on('reInit', onSelect).on('select', onSelect);
39
+ }, [emblaApi, onSelect]);
40
+ return (_jsxs("div", { className: props.className, children: [_jsxs("div", { className: "flex items-center", children: [_jsx("h2", { className: "text-lg font-semibold", children: props.heading ?? 'Promotions' }), _jsx("div", { className: "grow" }), _jsxs("div", { className: "flex items-center justify-center gap-xl", children: [_jsxs(Link, { href: props.viewAllUrl ?? '/promos', className: "text-button-tertiary-fg flex gap-sm text-sm font-semibold", children: ["See All", _jsx(ChevronRightIcon, { className: "size-5 lg:hidden" })] }), _jsxs("div", { className: "hidden lg:flex", children: [_jsx(Button, { variant: "outline", colorScheme: "gray", className: "rounded-r-none border-r-0", onClick: onPrevButtonClick, disabled: prevBtnDisabled, "aria-label": "Previous", children: _jsx(ArrowLeftIcon, { className: "size-5" }) }), _jsx(Button, { variant: "outline", colorScheme: "gray", className: "rounded-l-none", onClick: onNextButtonClick, disabled: nextBtnDisabled, "aria-label": "Next", children: _jsx(ArrowRightIcon, { className: "size-5" }) })] })] })] }), promos.length <= 0 && (_jsx(Empty, { icon: Gift01Icon, title: "No Promos", message: "No promo is currently available.", className: "mt-8" })), promos.length >= 1 && (_jsx("div", { ref: emblaRef, className: "relative mt-lg lg:overflow-hidden", children: _jsx("div", { className: twMerge('grid auto-cols-[calc((100%-(0.375rem*2))/1)] grid-flow-col gap-sm lg:auto-cols-[calc((100%-(0.5rem*5))/3)] lg:gap-md'), children: promos.map((promo) => (_jsx(PromosItem, { promo: promo, shouldShowDescription: props.shouldShowDescription }, promo.id))) }) }))] }));
41
+ }
@@ -0,0 +1,2 @@
1
+ import type { PromosProps } from './Promos';
2
+ export declare function PromoGrid(props: PromosProps): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,12 @@
1
+ 'use client';
2
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
3
+ import { twMerge } from 'tailwind-merge';
4
+ import { usePromosQuery } from '../../client/hooks/index.js';
5
+ import { Gift01Icon } from '../../icons/index.js';
6
+ import { Empty } from '../Empty.js';
7
+ import { PromosItem } from './PromoItem.js';
8
+ export function PromoGrid(props) {
9
+ const promosQuery = usePromosQuery({});
10
+ const promos = promosQuery.data || [];
11
+ return (_jsxs("div", { className: props.className, children: [_jsxs("div", { className: "flex items-center", children: [_jsx("h2", { className: "text-lg font-semibold", children: props.heading ?? 'Promos' }), _jsx("div", { className: "grow" })] }), promos.length <= 0 && (_jsx(Empty, { icon: Gift01Icon, title: "No Promos", message: "No promo is currently available.", className: "mt-lg" })), promos.length >= 1 && (_jsx("div", { className: "relative mt-lg lg:overflow-hidden", children: _jsx("div", { className: twMerge('grid grid-cols-1 gap-sm lg:grid-cols-3 lg:gap-md'), children: promos.map((promo) => (_jsx(PromosItem, { promo: promo, shouldShowDescription: props.shouldShowDescription }, promo.id))) }) }))] }));
12
+ }
@@ -0,0 +1,7 @@
1
+ import type { Promo } from '@opexa/portal-sdk-core';
2
+ interface PromosItemProps {
3
+ promo: Promo;
4
+ shouldShowDescription?: boolean;
5
+ }
6
+ export declare function PromosItem(props: PromosItemProps): import("react/jsx-runtime").JSX.Element;
7
+ export {};
@@ -0,0 +1,10 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import Image from 'next/image';
3
+ import { useRouter } from 'next/navigation';
4
+ import { twJoin } from 'tailwind-merge';
5
+ import { Button } from '../../ui/index.js';
6
+ export function PromosItem(props) {
7
+ const { promo } = props;
8
+ const router = useRouter();
9
+ return (_jsxs("div", { className: "border-border-primary bg-accent-50 relative flex h-full flex-col rounded-md border", children: [promo.banner.url && (_jsx(Image, { src: promo.banner.url, alt: promo.name, width: 1200, height: 500, priority: true, className: "aspect-[1200/500] w-full rounded-t-md object-cover" })), _jsxs("div", { className: "flex flex-grow flex-col p-4", children: [_jsx("p", { className: twJoin('w-full text-xl font-bold', props.shouldShowDescription ? 'text-start' : 'text-center'), children: promo.name }), props.shouldShowDescription && promo.description && (_jsx("p", { className: "text-gray-600 mb-2 line-clamp-2 w-full overflow-hidden text-start text-sm", dangerouslySetInnerHTML: { __html: promo.description } })), _jsx("div", { className: "mt-auto pt-4", children: _jsx(Button, { className: "w-full text-sm font-semibold", onClick: () => router.push(`/promos/${promo.id}`), children: "Get Bonus" }) })] })] }, promo.id));
10
+ }
@@ -1,4 +1,4 @@
1
- import type { Quest } from '@opexa/portal-sdk-core';
1
+ import type { Quest } from '../../../types';
2
2
  export declare function DailyCheckInQuest({ quest }: {
3
3
  quest: Quest;
4
4
  }): import("react/jsx-runtime").JSX.Element;
@@ -3,11 +3,16 @@ import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-run
3
3
  import { addDays, isEqual, startOfDay } from 'date-fns';
4
4
  import { useState } from 'react';
5
5
  import { twMerge } from 'tailwind-merge';
6
- import { useCheckInDailyCheckInQuestMutation } from '../../../client/hooks/index.js';
7
- import { toaster } from '../../../client/utils/index.js';
8
- import { CalendarIcon, CheckIcon, ClockStopWatchIcon, InfoCircleIcon, } from '../../../icons/index.js';
9
- import { Badge, Button } from '../../../ui/index.js';
10
- import { getAvailableQuestsQueryKey, getQueryClient } from '../../../utils/index.js';
6
+ import { useCheckInDailyCheckInQuestMutation } from '../../../client/hooks/useCheckInDailyCheckInQuestMutation.js';
7
+ import { toaster } from '../../../client/utils/toaster.js';
8
+ import { CalendarIcon } from '../../../icons/CalendarIcon.js';
9
+ import { CheckIcon } from '../../../icons/CheckIcon.js';
10
+ import { ClockStopWatchIcon } from '../../../icons/ClockStopWatchIcon.js';
11
+ import { InfoCircleIcon } from '../../../icons/InfoCircleIcon.js';
12
+ import { Badge } from '../../../ui/Badge/index.js';
13
+ import { Button } from '../../../ui/Button/index.js';
14
+ import { getQueryClient } from '../../../utils/getQueryClient.js';
15
+ import { getAvailableQuestsQueryKey } from '../../../utils/queryKeys.js';
11
16
  import CountdownTimer from '../CountdownTimer.js';
12
17
  import { DailyCheckInQuestModal } from './DailyCheckInQuestModal.js';
13
18
  export function DailyCheckInQuest({ quest }) {
@@ -1,8 +1,9 @@
1
1
  'use client';
2
2
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
3
- import { Portal } from '@ark-ui/react';
4
- import { XIcon } from '../../../icons/index.js';
5
- import { Button, Dialog } from '../../../ui/index.js';
3
+ import { XIcon } from '../../../icons/XIcon.js';
4
+ import { Button } from '../../../ui/Button/index.js';
5
+ import { Dialog } from '../../../ui/Dialog/index.js';
6
+ import { Portal } from '../../../ui/Portal/index.js';
6
7
  export function DailyCheckInQuestModal(props) {
7
8
  return (_jsx(Dialog.Root, { lazyMount: true, unmountOnExit: true, open: props.modalState.isOpen, onOpenChange: ({ open }) => props.modalState.setIsOpen(open), closeOnEscape: false, closeOnInteractOutside: false, children: _jsxs(Portal, { children: [_jsx(Dialog.Backdrop, { className: "!z-[calc(var(--z-dialog)+1)]" }), _jsx(Dialog.Positioner, { className: "!z-[calc(var(--z-dialog)+2)] flex items-center justify-center", children: _jsxs(Dialog.Content, { className: "min-h-auto mx-auto max-w-[343px] rounded-xl px-4 pb-0 pt-5", children: [_jsx(Dialog.CloseTrigger, { children: _jsx(XIcon, {}) }), _jsxs("div", { className: "flex flex-col space-y-5", children: [_jsx("p", { className: "text-text-primary-900 text-lg font-semibold", children: "Daily Check-In Rules" }), _jsxs("ul", { className: "text-text-tertiary-600 group list-disc text-wrap pl-4 text-sm font-normal", children: [_jsx("li", { children: "Earn rewards just for checking in each day!" }), _jsx("li", { children: "Stay consistent to unlock special rewards on the 3rd, 5th, and 7th day." }), _jsx("li", { children: "Missing a day will reset your streak, starting again from Day 1." }), _jsx("li", { children: "Each check-in unlocks the next one on the following day." }), _jsx("li", { children: "Successfully check in for 7 consecutive days to complete the quest and reset the cycle." })] })] }), _jsx("div", { className: "pb-4 pt-6", children: _jsx(Button, { onClick: () => props.modalState.setIsOpen(false), children: "Ok" }) })] }) })] }) }));
8
9
  }
@@ -1,4 +1,4 @@
1
- import type { Quest } from '@opexa/portal-sdk-core';
1
+ import type { Quest } from '../../../types';
2
2
  export declare function OnboardingQuest(props: {
3
3
  quest: Quest;
4
4
  }): null;
@@ -1,4 +1,4 @@
1
- import type { Quest } from '@opexa/portal-sdk-core';
1
+ import type { Quest } from '../../../types';
2
2
  export declare function WageringQuest({ quest }: {
3
3
  quest: Quest;
4
4
  }): import("react/jsx-runtime").JSX.Element;