@opexa/portal-components 0.1.83 → 0.1.85

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 (74) hide show
  1. package/dist/client/hooks/useMarkGameAsFavoriteMutation.js +1 -9
  2. package/dist/client/hooks/useUnmarkGameAsFavoriteMutation.js +1 -1
  3. package/dist/components/BetDepositLimit/betDepositLimitStore.d.ts +24 -0
  4. package/dist/components/BetDepositLimit/betDepositLimitStore.js +51 -0
  5. package/dist/components/ForgotPassword/Crazywin/ForgotPassword.module.css +42 -42
  6. package/dist/components/Jackpots/Jackpots.module.css +288 -288
  7. package/dist/components/KYC/KYCDefault/KYCVerificationStatus.lazy.js +2 -2
  8. package/dist/components/KYC/KYCNonPagCor/KYCVerificationStatus.lazy.js +2 -2
  9. package/dist/components/ResponsibleGamingLimits/ResponsibleGamingLimits.lazy.d.ts +1 -0
  10. package/dist/components/ResponsibleGamingLimits/ResponsibleGamingLimits.lazy.js +117 -0
  11. package/dist/components/SignIn/CrazyWin/NameAndPasswordSignIn.js +2 -1
  12. package/dist/components/SignIn/HappyBingo/NameAndPasswordSignIn.js +2 -1
  13. package/dist/components/SignIn/NameAndPasswordSignIn.js +2 -1
  14. package/dist/components/SignIn/SignIn.lazy.d.ts +5 -0
  15. package/dist/components/Tournaments/TournamentsCarousel/TournamentsCarouselItem.module.css +184 -184
  16. package/dist/components/Tournaments/TournamentsList/TournamentItem.module.css +184 -184
  17. package/dist/components/UpdateMobilePhoneNumber/hooks/useAutoOpenWhenUnverified.d.ts +6 -0
  18. package/dist/components/UpdateMobilePhoneNumber/hooks/useAutoOpenWhenUnverified.js +31 -0
  19. package/dist/constants/GameProvider.js +35 -0
  20. package/dist/handlers/index.d.ts +2 -2
  21. package/dist/handlers/v4Cookies.d.ts +9 -0
  22. package/dist/handlers/v4Cookies.js +49 -0
  23. package/dist/images/game-providers/SEXYCASINO.webp +0 -0
  24. package/dist/images/game-providers/VIBRA.png +0 -0
  25. package/dist/images/game-providers/VIBRA_AQUA_GAMING.png +0 -0
  26. package/dist/images/game-providers/VIBRA_GOLDEN_SPINS.png +0 -0
  27. package/dist/images/game-providers/VIBRA_RUVI_BET.png +0 -0
  28. package/dist/images/game-providers/VIBRA_SPINOCCHIO.png +0 -0
  29. package/dist/images/phone-icon.svg +10 -10
  30. package/dist/schemas/forgotPasswordSchema.d.ts +4 -4
  31. package/dist/services/queries.js +3613 -3613
  32. package/dist/styles/theme.css +776 -776
  33. package/dist/types/index.d.ts +1 -1
  34. package/dist/ui/AlertDialog/AlertDialog.d.ts +154 -154
  35. package/dist/ui/AlertDialog/alertDialog.recipe.d.ts +14 -14
  36. package/dist/ui/Badge/Badge.d.ts +12 -12
  37. package/dist/ui/Badge/badge.anatomy.d.ts +1 -1
  38. package/dist/ui/Badge/badge.recipe.d.ts +3 -3
  39. package/dist/ui/Carousel/Carousel.d.ts +99 -99
  40. package/dist/ui/Carousel/carousel.recipe.d.ts +11 -11
  41. package/dist/ui/Checkbox/Checkbox.d.ts +23 -23
  42. package/dist/ui/Checkbox/checkbox.recipe.d.ts +3 -3
  43. package/dist/ui/Clipboard/Clipboard.d.ts +18 -18
  44. package/dist/ui/Clipboard/clipboard.recipe.d.ts +3 -3
  45. package/dist/ui/Collapsible/Collapsible.d.ts +20 -20
  46. package/dist/ui/Collapsible/collapsible.recipe.d.ts +5 -5
  47. package/dist/ui/Combobox/Combobox.d.ts +42 -42
  48. package/dist/ui/Combobox/combobox.recipe.d.ts +3 -3
  49. package/dist/ui/DatePicker/DatePicker.d.ts +72 -72
  50. package/dist/ui/DatePicker/datePicker.recipe.d.ts +3 -3
  51. package/dist/ui/Dialog/Dialog.d.ts +33 -33
  52. package/dist/ui/Dialog/dialog.recipe.d.ts +3 -3
  53. package/dist/ui/Drawer/Drawer.d.ts +33 -33
  54. package/dist/ui/Drawer/drawer.recipe.d.ts +3 -3
  55. package/dist/ui/Menu/Menu.d.ts +144 -144
  56. package/dist/ui/Menu/menu.recipe.d.ts +8 -8
  57. package/dist/ui/Popover/Popover.d.ts +88 -88
  58. package/dist/ui/Popover/popover.recipe.d.ts +8 -8
  59. package/dist/ui/SegmentGroup/SegmentGroup.d.ts +18 -18
  60. package/dist/ui/SegmentGroup/segmentGroup.recipe.d.ts +3 -3
  61. package/dist/ui/Select/Select.d.ts +45 -45
  62. package/dist/ui/Select/select.recipe.d.ts +3 -3
  63. package/dist/ui/Table/Table.d.ts +21 -21
  64. package/dist/ui/Table/table.anatomy.d.ts +1 -1
  65. package/dist/ui/Table/table.recipe.d.ts +3 -3
  66. package/dist/ui/Tabs/Tabs.d.ts +15 -15
  67. package/dist/ui/Tabs/tabs.recipe.d.ts +3 -3
  68. package/dist/utils/get-fingerprint.d.ts +8 -0
  69. package/dist/utils/get-fingerprint.js +37 -0
  70. package/dist/utils/getProviderData.js +25 -0
  71. package/package.json +1 -1
  72. package/README.md +0 -238
  73. package/dist/components/Promos/PromoCardClassNames.d.ts +0 -11
  74. package/dist/components/Promos/PromoCardClassNames.js +0 -6
@@ -0,0 +1,117 @@
1
+ 'use client';
2
+ import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
3
+ import { Tabs } from '../../ui/Tabs/index.js';
4
+ import Link from 'next/link';
5
+ import { useCallback, useState } from 'react';
6
+ import { useForm } from 'react-hook-form';
7
+ import { twMerge } from 'tailwind-merge';
8
+ import { useShallow } from 'zustand/shallow';
9
+ import { BetDepositLimitModal } from '@opexa/portal-components/BetDepositLimit';
10
+ import { RefreshCcw01Icon } from '../../icons/RefreshCcw01Icon.js';
11
+ import { InfoCircleIcon } from '../../icons/InfoCircleIcon.js';
12
+ import { useGlobalStore } from '../../client/hooks/useGlobalStore.js';
13
+ import { Progress } from '../../ui/Progress/index.js';
14
+ import { Tooltip } from '../../ui/Tooltip/index.js';
15
+ import { Field } from '../../ui/Field/index.js';
16
+ import { Button } from '../../ui/Button/index.js';
17
+ const INITIAL_BET_LIMITS = [
18
+ {
19
+ period: 'daily',
20
+ label: 'Daily Bet Limit',
21
+ limit: 5000,
22
+ used: 3000,
23
+ resetsLabel: 'Resets daily',
24
+ active: true,
25
+ },
26
+ {
27
+ period: 'monthly',
28
+ label: 'Monthly Bet Limit',
29
+ limit: 50000,
30
+ used: 0,
31
+ resetsLabel: 'Resets May 30, 2026',
32
+ active: false,
33
+ },
34
+ ];
35
+ const INITIAL_DEPOSIT_LIMITS = [
36
+ {
37
+ period: 'daily',
38
+ label: 'Daily Deposit Limit',
39
+ limit: 10000,
40
+ used: 0,
41
+ resetsLabel: 'Resets daily',
42
+ active: false,
43
+ },
44
+ {
45
+ period: 'monthly',
46
+ label: 'Monthly Deposit Limit',
47
+ limit: 100000,
48
+ used: 0,
49
+ resetsLabel: 'Resets May 30, 2026',
50
+ active: false,
51
+ },
52
+ ];
53
+ function getNewLimitKey(tab, period) {
54
+ return `${tab}-${period}`;
55
+ }
56
+ function formatPeso(amount) {
57
+ return `₱${amount.toLocaleString('en-PH')}`;
58
+ }
59
+ function getUsedPercent(used, limit) {
60
+ if (limit === 0)
61
+ return 0;
62
+ return Math.min(Math.round((used / limit) * 100), 100);
63
+ }
64
+ function getProgressColor(pct) {
65
+ if (pct >= 80)
66
+ return 'bg-[#D92D20]';
67
+ if (pct >= 50)
68
+ return 'bg-[#F79009]';
69
+ return 'bg-[#FAC515]';
70
+ }
71
+ function tabToLimitType(tab) {
72
+ return tab === 'Bet' ? 'bet' : 'deposit';
73
+ }
74
+ export function ResponsibleGamingLimits() {
75
+ const openModal = useGlobalStore(useShallow((state) => state.betDepositLimit.openModal));
76
+ const form = useForm({
77
+ defaultValues: {},
78
+ });
79
+ const [activeTab, setActiveTab] = useState('Deposit');
80
+ const [betLimits, setBetLimits] = useState(INITIAL_BET_LIMITS);
81
+ const [depositLimits, setDepositLimits] = useState(INITIAL_DEPOSIT_LIMITS);
82
+ const limits = activeTab === 'Bet' ? betLimits : depositLimits;
83
+ const applyConfirmedLimit = useCallback(() => {
84
+ const { type, period, requestedLimit } = useGlobalStore.getState().betDepositLimit;
85
+ const updateLimits = (cards) => cards.map((card) => card.period === period ? { ...card, limit: requestedLimit } : card);
86
+ if (type === 'bet') {
87
+ setBetLimits(updateLimits);
88
+ }
89
+ else {
90
+ setDepositLimits(updateLimits);
91
+ }
92
+ }, []);
93
+ const saveLimit = useCallback((card, inputValue) => {
94
+ const key = getNewLimitKey(activeTab, card.period);
95
+ const parsed = parseFloat(String(inputValue).replace(/[^0-9.]/g, ''));
96
+ if (Number.isNaN(parsed) || parsed <= 0) {
97
+ return;
98
+ }
99
+ openModal(tabToLimitType(activeTab), card.period, card.limit, parsed);
100
+ form.setValue(key, '');
101
+ }, [activeTab, form, openModal]);
102
+ return (_jsxs(_Fragment, { children: [_jsxs("div", { className: "bg-bg-secondary m-5 mx-auto my-10 rounded-xl px-4 py-6 lg:px-8 lg:py-10", children: [_jsxs("div", { className: "mb-6", children: [_jsx("h1", { className: "text-text-primary-brand text-3xl font-bold lg:block", children: "Responsible Gaming" }), _jsxs("p", { className: "text-text-disabled mt-1 text-sm", children: ["Set limits for your gaming activity, including how much you can bet or deposit.", _jsx("br", { className: "hidden sm:inline" }), "These limits help you stay within the boundaries you choose."] })] }), _jsxs("div", { className: "bg-bg-primary border-border-dark mb-6 flex flex-col items-start justify-between gap-3 rounded-xl border px-4 py-4 shadow-xs sm:flex-row sm:items-center", children: [_jsxs("div", { children: [_jsx("p", { className: "text-text-primary-brand text-sm font-semibold", children: "Learn More About Responsible Gaming" }), _jsx("p", { className: "text-text-disabled mt-0.5 text-sm", children: "Find helpful tips, safety reminders, and support resources to help you stay informed and in control while playing." })] }), _jsx(Link, { href: "/responsible-gaming", className: twMerge('border-border-dark text-text-primary-brand inline-flex shrink-0 items-center justify-center gap-1.5 rounded-lg border px-4 py-2.5 text-sm font-semibold shadow-xs transition-colors'), children: "Visit Responsible Gaming" })] }), _jsx(Tabs.Root, { value: activeTab, onValueChange: (details) => setActiveTab(details.value), className: "mb-6 w-fit", children: _jsxs(Tabs.List, { children: [_jsx(Tabs.Trigger, { value: "Deposit", children: "Deposit" }), _jsx(Tabs.Trigger, { value: "Bet", children: "Bet" }), _jsx(Tabs.Indicator, {})] }) }), _jsx("div", { className: "grid grid-cols-1 gap-4 sm:grid-cols-2", children: limits.map((card) => {
103
+ const pct = getUsedPercent(card.used, card.limit);
104
+ const key = getNewLimitKey(activeTab, card.period);
105
+ return (_jsxs("div", { className: "border-border-dark bg-bg-primary flex flex-col gap-4 rounded-xl border p-5 shadow-xs", children: [_jsxs("div", { className: "flex items-center justify-between gap-2", children: [_jsxs("span", { className: twMerge('inline-flex items-center gap-1.5 rounded-full px-2.5 py-1 text-xs font-medium', card.active
106
+ ? 'border border-[#085D3A] bg-[#053321] text-[#75E0A7]'
107
+ : 'border border-[#912018] bg-[#55160c] text-[#FDA29B]'), children: [_jsx("span", { className: twMerge('size-1.5 rounded-full', card.active ? 'bg-[#17B26A]' : 'bg-[#F04438]') }), card.active ? 'Active' : 'Inactive'] }), _jsxs("span", { className: "inline-flex items-center gap-1 rounded-full border border-[#b0841f] bg-[#191304] px-2.5 py-1 text-xs font-medium text-[#e2aa28]", children: [_jsx(RefreshCcw01Icon, { className: "size-3" }), card.resetsLabel] })] }), _jsxs("div", { children: [_jsx("p", { className: "text-sm font-semibold text-text-primary-brand", children: card.label }), _jsx("p", { className: "mt-1 text-2xl font-bold text-button-primary-bg", children: formatPeso(card.limit) })] }), _jsxs("div", { children: [_jsxs("div", { className: "text-text-disabled flex items-center justify-between text-xs", children: [_jsxs("span", { children: [formatPeso(card.used), " used"] }), _jsxs("span", { children: [pct, "%"] })] }), _jsx(Progress.Root, { value: pct, max: 100, variant: "unstyled", className: "relative mt-1.5 h-2 w-full", children: _jsx(Progress.Track, { className: "bg-bg-dark h-2 w-full rounded-full", children: _jsx(Progress.Range, { className: twMerge('h-full rounded-full transition-all duration-700 ease-in-out', getProgressColor(pct)) }) }) }), _jsxs("p", { className: "text-text-disabled mt-1.5 text-xs", children: ["Remaining: ", formatPeso(card.limit - card.used)] })] }), _jsxs("div", { children: [_jsxs("div", { className: "mb-2 flex items-center gap-1 text-sm font-medium text-text-primary-brand", children: [_jsx("span", { children: "Set new limit" }), _jsxs(Tooltip.Root, { openDelay: 0, closeDelay: 100, children: [_jsx(Tooltip.Trigger, { type: "button", className: "inline-flex", "aria-label": "Limit change information", children: _jsx(InfoCircleIcon, { className: "size-4 text-text-disabled" }) }), _jsx(Tooltip.Positioner, { children: _jsxs(Tooltip.Content, { className: "max-w-64 rounded-lg bg-[#0C111D] px-2.5 py-2 text-xs font-medium text-text-primary-brand", children: [_jsx(Tooltip.Arrow, {}), "Enter a new limit amount. Limits can only be lowered immediately. Limit increases take 24 hours to apply."] }) })] })] }), _jsxs("form", { className: "flex w-full items-center gap-2", onSubmit: form.handleSubmit((values) => {
108
+ console.log({
109
+ component: 'ResponsibleGamingLimits',
110
+ activeTab,
111
+ card,
112
+ values,
113
+ });
114
+ saveLimit(card, values[key] ?? '');
115
+ }), children: [_jsxs(Field.Root, { className: "relative w-full", children: [_jsx("span", { className: "text-text-disabled absolute top-1/2 left-2 shrink-0 -translate-y-1/2 text-sm", children: "\u20B1" }), _jsx(Field.Input, { className: "pl-6", type: "number", min: 0, placeholder: "0", ...form.register(key) })] }), _jsx(Button, { size: "md", variant: "solid", colorScheme: "primary", type: "submit", className: "w-fit shrink-0", children: "Save" })] })] })] }, card.period));
116
+ }) })] }), _jsx(BetDepositLimitModal, { onConfirm: applyConfirmedLimit })] }));
117
+ }
@@ -273,7 +273,8 @@ export function NameAndPasswordSignIn() {
273
273
  }) })] }), _jsx(Field.ErrorText, { className: "text-[#ff2525b3] text-xs", children: form.formState.errors.name?.message })] }), _jsx(Field.Root, { disabled: !!signInMutation.data, invalid: !!form.formState.errors.password, className: "mt-xl", children: _jsxs(PasswordInput.Root, { children: [_jsx(PasswordInput.Label, { className: "text-xs", children: "Password" }), _jsxs("div", { children: [_jsxs(PasswordInput.Control, { className: "relative flex h-10 items-center rounded-full text-xs", children: [_jsx(Image, { src: lockIcon, alt: "lock icon", width: 20, height: 20, className: "-translate-y-1/2 pointer-events-none absolute top-1/2 left-3 h-5 w-5" }), _jsx(PasswordInput.Input, { className: "pl-10", placeholder: "Enter your password", ...form.register('password') }), _jsx(PasswordInput.VisibilityTrigger, { children: _jsx(PasswordInput.Indicator, { fallback: _jsx(EyeOffIcon, { className: "text-white/50" }), asChild: true, children: _jsx(EyeIcon, { className: "text-white/50" }) }) })] }), _jsx(Field.ErrorText, { className: "text-[#ff2525b3] text-xs", children: form.formState.errors.password?.message })] }), _jsx("div", { className: "mt-4 flex justify-end", children: _jsx("button", { type: "button", tabIndex: -1, className: "font-semibold text-[#FFE5AF] text-xs", onClick: () => {
274
274
  globalStore.forgotPassword.setOpen(true);
275
275
  dialog.setOpen(false);
276
- }, children: "Forgot Password" }) })] }) }), signInMutation.data && (_jsxs(Field.Root, { invalid: !!form.formState.errors.secretAnswer, className: "mt-xl", children: [_jsx(Field.Label, { children: secretQuestion }), _jsx(Field.Input, { placeholder: "Answer the security question", ...form.register('secretAnswer') }), _jsx(Field.ErrorText, { children: form.formState.errors.secretAnswer?.message })] })), _jsx(Button, { type: "submit", className: "mt-4 h-10 rounded-full text-sm", disabled: signInMutation.isPending || authenticateMutation.isPending, style: {
276
+ }, children: "Forgot Password" }) })] }) }), signInMutation.data &&
277
+ signInProps.shouldPromptSecurityQuestion !== false && (_jsxs(Field.Root, { invalid: !!form.formState.errors.secretAnswer, className: "mt-xl", children: [_jsx(Field.Label, { children: secretQuestion }), _jsx(Field.Input, { placeholder: "Answer the security question", ...form.register('secretAnswer') }), _jsx(Field.ErrorText, { children: form.formState.errors.secretAnswer?.message })] })), _jsx(Button, { type: "submit", className: "mt-4 h-10 rounded-full text-sm", disabled: signInMutation.isPending || authenticateMutation.isPending, style: {
277
278
  boxShadow: 'inset 0px -1px 2px 1px #fff7e1',
278
279
  backgroundImage: 'linear-gradient(89deg, #c7802d -15.91%, #ffe585 28.75%, #ffeca6 49.46%, #c7802d 112.69%)',
279
280
  }, children: "Login" }), _jsx(Controller, { control: form.control, name: "termsAccepted", render: (o) => (_jsxs(Field.Root, { invalid: o.fieldState.invalid, className: "mt-xl", children: [_jsxs(Checkbox.Root, { checked: o.field.value, onCheckedChange: (details) => {
@@ -270,7 +270,8 @@ export function NameAndPasswordSignIn() {
270
270
  }) }), _jsx(Field.ErrorText, { children: form.formState.errors.name?.message })] }), _jsx(Field.Root, { disabled: !!signInMutation.data, invalid: !!form.formState.errors.password, className: "mt-xl", children: _jsxs(PasswordInput.Root, { children: [_jsx(PasswordInput.Label, { className: "text-[#344054] dark:text-[#CECFD2]", children: "Password" }), _jsxs("div", { children: [_jsxs(PasswordInput.Control, { className: "border-[#D0D5DD] bg-white text-[#101828] dark:border-[#333741] dark:bg-[#1D2939] dark:text-[#F5F5F6]", children: [_jsx(PasswordInput.Input, { placeholder: "Enter your password", ...form.register('password') }), _jsx(PasswordInput.VisibilityTrigger, { children: _jsx(PasswordInput.Indicator, { fallback: _jsx(EyeOffIcon, {}), asChild: true, className: "text-[#98A2B3] dark:text-[#94969C]", children: _jsx(EyeIcon, {}) }) })] }), _jsx(Field.ErrorText, { children: form.formState.errors.password?.message })] }), _jsx("div", { className: "mt-2 flex justify-end", children: _jsx("button", { type: "button", tabIndex: -1, className: "font-semibold text-[#A15C07] text-sm dark:text-[#CECFD2]", onClick: () => {
271
271
  globalStore.forgotPassword.setOpen(true);
272
272
  dialog.setOpen(false);
273
- }, children: "Forgot Password?" }) })] }) }), signInMutation.data && (_jsxs(Field.Root, { invalid: !!form.formState.errors.secretAnswer, className: "mt-xl", children: [_jsx(Field.Label, { children: secretQuestion }), _jsx(Field.Input, { placeholder: "Answer the security question", ...form.register('secretAnswer') }), _jsx(Field.ErrorText, { children: form.formState.errors.secretAnswer?.message })] })), _jsx(Button, { type: "submit", className: "mt-3xl", disabled: signInMutation.isPending || authenticateMutation.isPending, children: "Log In" }), _jsx(Controller, { control: form.control, name: "termsAccepted", render: (o) => (_jsxs(Field.Root, { invalid: o.fieldState.invalid, className: "mt-xl", children: [_jsxs(Checkbox.Root, { variant: "outline", checked: o.field.value, onCheckedChange: (details) => {
273
+ }, children: "Forgot Password?" }) })] }) }), signInMutation.data &&
274
+ signInProps.shouldPromptSecurityQuestion !== false && (_jsxs(Field.Root, { invalid: !!form.formState.errors.secretAnswer, className: "mt-xl", children: [_jsx(Field.Label, { children: secretQuestion }), _jsx(Field.Input, { placeholder: "Answer the security question", ...form.register('secretAnswer') }), _jsx(Field.ErrorText, { children: form.formState.errors.secretAnswer?.message })] })), _jsx(Button, { type: "submit", className: "mt-3xl", disabled: signInMutation.isPending || authenticateMutation.isPending, children: "Log In" }), _jsx(Controller, { control: form.control, name: "termsAccepted", render: (o) => (_jsxs(Field.Root, { invalid: o.fieldState.invalid, className: "mt-xl", children: [_jsxs(Checkbox.Root, { variant: "outline", checked: o.field.value, onCheckedChange: (details) => {
274
275
  if (details.checked === 'indeterminate')
275
276
  return;
276
277
  o.field.onChange(details.checked);
@@ -304,7 +304,8 @@ export function NameAndPasswordSignIn() {
304
304
  }) }), _jsx(Field.ErrorText, { children: form.formState.errors.name?.message })] }), _jsx(Field.Root, { disabled: !!signInMutation.data, invalid: !!form.formState.errors.password, className: "mt-xl", children: _jsxs(PasswordInput.Root, { children: [_jsx(PasswordInput.Label, { children: "Password" }), _jsxs("div", { children: [_jsxs(PasswordInput.Control, { children: [_jsx(PasswordInput.Input, { placeholder: "Enter your password", ...form.register('password') }), _jsx(PasswordInput.VisibilityTrigger, { children: _jsx(PasswordInput.Indicator, { fallback: _jsx(EyeOffIcon, {}), asChild: true, children: _jsx(EyeIcon, {}) }) })] }), _jsx(Field.ErrorText, { children: form.formState.errors.password?.message })] }), _jsx("div", { className: "mt-2 flex justify-end", children: _jsx("button", { type: "button", tabIndex: -1, className: "font-semibold text-button-tertiary-fg text-sm", onClick: () => {
305
305
  globalStore.forgotPassword.setOpen(true);
306
306
  dialog.setOpen(false);
307
- }, children: "Forgot Password" }) })] }) }), signInMutation.data && (_jsxs(Field.Root, { invalid: !!form.formState.errors.secretAnswer, className: "mt-xl", children: [_jsx(Field.Label, { children: secretQuestion }), _jsx(Field.Input, { placeholder: "Answer the security question", ...form.register('secretAnswer') }), _jsx(Field.ErrorText, { children: form.formState.errors.secretAnswer?.message })] })), _jsx(Button, { type: "submit", className: "mt-3xl", disabled: signInMutation.isPending || authenticateMutation.isPending, children: "Log In" }), _jsx(Controller, { control: form.control, name: "termsAccepted", render: (o) => (_jsxs(Field.Root, { invalid: o.fieldState.invalid, className: "mt-xl", children: [_jsxs(Checkbox.Root, { variant: "outline", colorScheme: "neutral", checked: o.field.value, onCheckedChange: (details) => {
307
+ }, children: "Forgot Password" }) })] }) }), signInMutation.data &&
308
+ signInProps.shouldPromptSecurityQuestion !== false && (_jsxs(Field.Root, { invalid: !!form.formState.errors.secretAnswer, className: "mt-xl", children: [_jsx(Field.Label, { children: secretQuestion }), _jsx(Field.Input, { placeholder: "Answer the security question", ...form.register('secretAnswer') }), _jsx(Field.ErrorText, { children: form.formState.errors.secretAnswer?.message })] })), _jsx(Button, { type: "submit", className: "mt-3xl", disabled: signInMutation.isPending || authenticateMutation.isPending, children: "Log In" }), _jsx(Controller, { control: form.control, name: "termsAccepted", render: (o) => (_jsxs(Field.Root, { invalid: o.fieldState.invalid, className: "mt-xl", children: [_jsxs(Checkbox.Root, { variant: "outline", colorScheme: "neutral", checked: o.field.value, onCheckedChange: (details) => {
308
309
  if (details.checked === 'indeterminate')
309
310
  return;
310
311
  o.field.onChange(details.checked);
@@ -24,6 +24,11 @@ export interface SignInProps extends UseSignInProps {
24
24
  children?: ReactNode;
25
25
  shouldShowResponsibleGamingReminder?: boolean;
26
26
  shouldShowDisclaimer?: boolean;
27
+ /**
28
+ * When `false`, the security question is not prompted during
29
+ * sign in. Defaults to `true`.
30
+ */
31
+ shouldPromptSecurityQuestion?: boolean;
27
32
  variant?: 'crazywin' | 'happybingo';
28
33
  authApiBaseUrl?: string;
29
34
  /**
@@ -1,184 +1,184 @@
1
- @keyframes arrow-green-flash {
2
- 0% {
3
- color: #abefc6;
4
- }
5
- 100% {
6
- color: #079455;
7
- }
8
- }
9
-
10
- .animate-arrow-green-flash-1 {
11
- animation: arrow-green-flash 0.4s infinite;
12
- animation-delay: -0.2s;
13
- }
14
-
15
- .animate-arrow-green-flash-2 {
16
- animation: arrow-green-flash 0.4s infinite;
17
- animation-delay: -0.1s;
18
- }
19
-
20
- .animate-arrow-green-flash-3 {
21
- animation: arrow-green-flash 0.4s infinite;
22
- }
23
-
24
- @keyframes arrow-red-flash {
25
- 0%,
26
- 100% {
27
- color: #f97066;
28
- }
29
- 50% {
30
- color: #fecdca;
31
- }
32
- }
33
-
34
- .animate-arrow-red-flash-1 {
35
- animation: arrow-red-flash 0.4s infinite;
36
- }
37
-
38
- .animate-arrow-red-flash-2 {
39
- animation: arrow-red-flash 0.4s infinite;
40
- animation-delay: -0.1s;
41
- }
42
-
43
- .animate-arrow-red-flash-3 {
44
- animation: arrow-red-flash 0.4s infinite;
45
- animation-delay: -0.2s;
46
- }
47
-
48
- /* Animated BG */
49
- @keyframes rotate {
50
- to {
51
- transform: rotate(1turn);
52
- }
53
- }
54
-
55
- .light-rays {
56
- position: absolute;
57
- top: 0;
58
- left: 0;
59
- right: 0;
60
- bottom: 0;
61
- overflow: hidden;
62
-
63
- --first: var(--color-bg-tertiary);
64
- --second: var(--color-bg-quaternary);
65
- }
66
-
67
- .light-rays::before,
68
- .light-rays::after {
69
- content: '';
70
- position: absolute;
71
- top: var(--light-rays-top, 150px);
72
- left: calc(50% - 90px);
73
- margin: -100vmax;
74
- width: 200vmax;
75
- height: 200vmax;
76
- opacity: 0.6;
77
- transform-origin: center;
78
- }
79
-
80
- .light-rays::before {
81
- background: conic-gradient(
82
- var(--first) 0deg 7.2deg,
83
- var(--second) 7.2deg 14.4deg,
84
- var(--first) 14.4deg 21.6deg,
85
- var(--second) 21.6deg 28.8deg,
86
- var(--first) 28.8deg 36deg,
87
- var(--second) 36deg 43.2deg,
88
- var(--first) 43.2deg 50.4deg,
89
- var(--second) 50.4deg 57.6deg,
90
- var(--first) 57.6deg 64.8deg,
91
- var(--second) 64.8deg 72deg,
92
- var(--first) 72deg 79.2deg,
93
- var(--second) 79.2deg 86.4deg,
94
- var(--first) 86.4deg 93.6deg,
95
- var(--second) 93.6deg 100.8deg,
96
- var(--first) 100.8deg 108deg,
97
- var(--second) 108deg 115.2deg,
98
- var(--first) 115.2deg 122.4deg,
99
- var(--second) 122.4deg 129.6deg,
100
- var(--first) 129.6deg 136.8deg,
101
- var(--second) 136.8deg 144deg,
102
- var(--first) 144deg 151.2deg,
103
- var(--second) 151.2deg 158.4deg,
104
- var(--first) 158.4deg 165.6deg,
105
- var(--second) 165.6deg 172.8deg,
106
- var(--first) 172.8deg 180deg,
107
- var(--second) 180deg 187.2deg,
108
- var(--first) 187.2deg 194.4deg,
109
- var(--second) 194.4deg 201.6deg,
110
- var(--first) 201.6deg 208.8deg,
111
- var(--second) 208.8deg 216deg,
112
- var(--first) 216deg 223.2deg,
113
- var(--second) 223.2deg 230.4deg,
114
- var(--first) 230.4deg 237.6deg,
115
- var(--second) 237.6deg 244.8deg,
116
- var(--first) 244.8deg 252deg,
117
- var(--second) 252deg 259.2deg,
118
- var(--first) 259.2deg 266.4deg,
119
- var(--second) 266.4deg 273.6deg,
120
- var(--first) 273.6deg 280.8deg,
121
- var(--second) 280.8deg 288deg,
122
- var(--first) 288deg 295.2deg,
123
- var(--second) 295.2deg 302.4deg,
124
- var(--first) 302.4deg 309.6deg,
125
- var(--second) 309.6deg 316.8deg,
126
- var(--first) 316.8deg 324deg,
127
- var(--second) 324deg 331.2deg,
128
- var(--first) 331.2deg 338.4deg,
129
- var(--second) 338.4deg 345.6deg,
130
- var(--first) 345.6deg 352.8deg,
131
- var(--second) 352.8deg 360deg
132
- );
133
- animation: rotate 20s linear infinite;
134
- }
135
-
136
- @media (max-width: 1024px) {
137
- .light-rays::before,
138
- .light-rays::after {
139
- left: auto;
140
- right: 11%;
141
- }
142
- }
143
-
144
- /* ScrollArea.module.css */
145
- .scrollArea {
146
- overflow-y: scroll;
147
- padding-right: 4px;
148
- }
149
-
150
- /* WebKit-based browsers */
151
- .scrollArea::-webkit-scrollbar {
152
- width: 8px;
153
- }
154
-
155
- .scrollArea::-webkit-scrollbar-track {
156
- background: var(--color-bg-primary-alt);
157
- border-radius: 9999px;
158
- }
159
-
160
- .scrollArea::-webkit-scrollbar-thumb {
161
- background-color: var(--color-bg-quaternary);
162
- border-radius: 9999px;
163
- }
164
-
165
- @keyframes waveColor {
166
- 0%,
167
- 2.5% {
168
- color: var(--wave-highlight-color);
169
- }
170
- 2.51%,
171
- 100% {
172
- color: var(--color-brand-300);
173
- }
174
- }
175
-
176
- .animate-wave-color-success {
177
- --wave-highlight-color: var(--color-success-800);
178
- animation: waveColor 4s ease-in-out infinite;
179
- }
180
-
181
- .animate-wave-color-error {
182
- --wave-highlight-color: var(--color-error-600);
183
- animation: waveColor 4s ease-in-out infinite;
184
- }
1
+ @keyframes arrow-green-flash {
2
+ 0% {
3
+ color: #abefc6;
4
+ }
5
+ 100% {
6
+ color: #079455;
7
+ }
8
+ }
9
+
10
+ .animate-arrow-green-flash-1 {
11
+ animation: arrow-green-flash 0.4s infinite;
12
+ animation-delay: -0.2s;
13
+ }
14
+
15
+ .animate-arrow-green-flash-2 {
16
+ animation: arrow-green-flash 0.4s infinite;
17
+ animation-delay: -0.1s;
18
+ }
19
+
20
+ .animate-arrow-green-flash-3 {
21
+ animation: arrow-green-flash 0.4s infinite;
22
+ }
23
+
24
+ @keyframes arrow-red-flash {
25
+ 0%,
26
+ 100% {
27
+ color: #f97066;
28
+ }
29
+ 50% {
30
+ color: #fecdca;
31
+ }
32
+ }
33
+
34
+ .animate-arrow-red-flash-1 {
35
+ animation: arrow-red-flash 0.4s infinite;
36
+ }
37
+
38
+ .animate-arrow-red-flash-2 {
39
+ animation: arrow-red-flash 0.4s infinite;
40
+ animation-delay: -0.1s;
41
+ }
42
+
43
+ .animate-arrow-red-flash-3 {
44
+ animation: arrow-red-flash 0.4s infinite;
45
+ animation-delay: -0.2s;
46
+ }
47
+
48
+ /* Animated BG */
49
+ @keyframes rotate {
50
+ to {
51
+ transform: rotate(1turn);
52
+ }
53
+ }
54
+
55
+ .light-rays {
56
+ position: absolute;
57
+ top: 0;
58
+ left: 0;
59
+ right: 0;
60
+ bottom: 0;
61
+ overflow: hidden;
62
+
63
+ --first: var(--color-bg-tertiary);
64
+ --second: var(--color-bg-quaternary);
65
+ }
66
+
67
+ .light-rays::before,
68
+ .light-rays::after {
69
+ content: '';
70
+ position: absolute;
71
+ top: var(--light-rays-top, 150px);
72
+ left: calc(50% - 90px);
73
+ margin: -100vmax;
74
+ width: 200vmax;
75
+ height: 200vmax;
76
+ opacity: 0.6;
77
+ transform-origin: center;
78
+ }
79
+
80
+ .light-rays::before {
81
+ background: conic-gradient(
82
+ var(--first) 0deg 7.2deg,
83
+ var(--second) 7.2deg 14.4deg,
84
+ var(--first) 14.4deg 21.6deg,
85
+ var(--second) 21.6deg 28.8deg,
86
+ var(--first) 28.8deg 36deg,
87
+ var(--second) 36deg 43.2deg,
88
+ var(--first) 43.2deg 50.4deg,
89
+ var(--second) 50.4deg 57.6deg,
90
+ var(--first) 57.6deg 64.8deg,
91
+ var(--second) 64.8deg 72deg,
92
+ var(--first) 72deg 79.2deg,
93
+ var(--second) 79.2deg 86.4deg,
94
+ var(--first) 86.4deg 93.6deg,
95
+ var(--second) 93.6deg 100.8deg,
96
+ var(--first) 100.8deg 108deg,
97
+ var(--second) 108deg 115.2deg,
98
+ var(--first) 115.2deg 122.4deg,
99
+ var(--second) 122.4deg 129.6deg,
100
+ var(--first) 129.6deg 136.8deg,
101
+ var(--second) 136.8deg 144deg,
102
+ var(--first) 144deg 151.2deg,
103
+ var(--second) 151.2deg 158.4deg,
104
+ var(--first) 158.4deg 165.6deg,
105
+ var(--second) 165.6deg 172.8deg,
106
+ var(--first) 172.8deg 180deg,
107
+ var(--second) 180deg 187.2deg,
108
+ var(--first) 187.2deg 194.4deg,
109
+ var(--second) 194.4deg 201.6deg,
110
+ var(--first) 201.6deg 208.8deg,
111
+ var(--second) 208.8deg 216deg,
112
+ var(--first) 216deg 223.2deg,
113
+ var(--second) 223.2deg 230.4deg,
114
+ var(--first) 230.4deg 237.6deg,
115
+ var(--second) 237.6deg 244.8deg,
116
+ var(--first) 244.8deg 252deg,
117
+ var(--second) 252deg 259.2deg,
118
+ var(--first) 259.2deg 266.4deg,
119
+ var(--second) 266.4deg 273.6deg,
120
+ var(--first) 273.6deg 280.8deg,
121
+ var(--second) 280.8deg 288deg,
122
+ var(--first) 288deg 295.2deg,
123
+ var(--second) 295.2deg 302.4deg,
124
+ var(--first) 302.4deg 309.6deg,
125
+ var(--second) 309.6deg 316.8deg,
126
+ var(--first) 316.8deg 324deg,
127
+ var(--second) 324deg 331.2deg,
128
+ var(--first) 331.2deg 338.4deg,
129
+ var(--second) 338.4deg 345.6deg,
130
+ var(--first) 345.6deg 352.8deg,
131
+ var(--second) 352.8deg 360deg
132
+ );
133
+ animation: rotate 20s linear infinite;
134
+ }
135
+
136
+ @media (max-width: 1024px) {
137
+ .light-rays::before,
138
+ .light-rays::after {
139
+ left: auto;
140
+ right: 11%;
141
+ }
142
+ }
143
+
144
+ /* ScrollArea.module.css */
145
+ .scrollArea {
146
+ overflow-y: scroll;
147
+ padding-right: 4px;
148
+ }
149
+
150
+ /* WebKit-based browsers */
151
+ .scrollArea::-webkit-scrollbar {
152
+ width: 8px;
153
+ }
154
+
155
+ .scrollArea::-webkit-scrollbar-track {
156
+ background: var(--color-bg-primary-alt);
157
+ border-radius: 9999px;
158
+ }
159
+
160
+ .scrollArea::-webkit-scrollbar-thumb {
161
+ background-color: var(--color-bg-quaternary);
162
+ border-radius: 9999px;
163
+ }
164
+
165
+ @keyframes waveColor {
166
+ 0%,
167
+ 2.5% {
168
+ color: var(--wave-highlight-color);
169
+ }
170
+ 2.51%,
171
+ 100% {
172
+ color: var(--color-brand-300);
173
+ }
174
+ }
175
+
176
+ .animate-wave-color-success {
177
+ --wave-highlight-color: var(--color-success-800);
178
+ animation: waveColor 4s ease-in-out infinite;
179
+ }
180
+
181
+ .animate-wave-color-error {
182
+ --wave-highlight-color: var(--color-error-600);
183
+ animation: waveColor 4s ease-in-out infinite;
184
+ }