@opexa/portal-components 0.0.308 → 0.0.310
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/client/hooks/useCamera.js +2 -2
- package/dist/client/hooks/useControllableState.js +1 -1
- package/dist/client/hooks/useInfiniteQueryHelper.js +2 -3
- package/dist/client/hooks/useMarkGameAsFavoriteMutation.js +1 -2
- package/dist/client/hooks/useMobileNumberParser.js +1 -1
- package/dist/components/Account/Account.lazy.js +5 -5
- package/dist/components/Account/account.recipe.js +4 -4
- package/dist/components/AccountInfo/AccountInfo.js +6 -6
- package/dist/components/AccountSecurity/AccountSecurity.js +6 -6
- package/dist/components/AccountVerification/AccountVerification.js +7 -7
- package/dist/components/Banner/Banner.js +1 -1
- package/dist/components/BetRecords/BetRecords.client.js +5 -5
- package/dist/components/Bonus/Bonus.client.js +2 -2
- package/dist/components/Bonuses/Bonuses.client.js +10 -10
- package/dist/components/Bonuses/BonusesTrigger.js +1 -1
- package/dist/components/Bonuses/ClaimSpotBonus.lazy.js +1 -1
- package/dist/components/Cashback/Cashback.client.js +2 -2
- package/dist/components/CustomPromo/CustomPromo.js +1 -1
- package/dist/components/DepositWithdrawal/Deposit/AvailablePromos.js +1 -1
- package/dist/components/DepositWithdrawal/Deposit/Deposit.js +2 -2
- package/dist/components/DepositWithdrawal/Deposit/GCashDeposit/GCashDeposit.js +2 -2
- package/dist/components/DepositWithdrawal/Deposit/LibanganDeposit/LibanganDeposit.js +2 -2
- package/dist/components/DepositWithdrawal/Deposit/MayaAppDeposit/MayaAppDeposit.js +2 -2
- package/dist/components/DepositWithdrawal/Deposit/MayaDeposit/MayaDeposit.js +2 -2
- package/dist/components/DepositWithdrawal/Deposit/OnlineBankDeposit/OnlineBankDepositAlert.js +1 -1
- package/dist/components/DepositWithdrawal/Deposit/OnlineBankDeposit/OnlineBankDepositDetails.js +2 -2
- package/dist/components/DepositWithdrawal/Deposit/OnlineBankDeposit/OnlineBankDepositForm.js +1 -1
- package/dist/components/DepositWithdrawal/Deposit/PisoPayDeposit/PisoPayDeposit.js +2 -2
- package/dist/components/DepositWithdrawal/Deposit/QRPHDeposit/QRPHDepositAlert.js +1 -1
- package/dist/components/DepositWithdrawal/Deposit/QRPHDeposit/QRPHDepositDetails.js +2 -2
- package/dist/components/DepositWithdrawal/Deposit/QRPHDeposit/QRPHDepositForm.js +1 -1
- package/dist/components/DepositWithdrawal/DepositWithdrawal.lazy.js +2 -2
- package/dist/components/DepositWithdrawal/DepositWithdrawalTrigger.js +2 -2
- package/dist/components/DepositWithdrawal/HasPendingBonuses.js +1 -1
- package/dist/components/DepositWithdrawal/PaymentMethods.js +1 -1
- package/dist/components/DepositWithdrawal/Withdrawal/GCashWithdrawal/GCashWithdrawal.js +3 -3
- package/dist/components/DepositWithdrawal/Withdrawal/InstapayWithdrawal/InstapayWithdrawal.js +2 -4
- package/dist/components/DepositWithdrawal/Withdrawal/MayaAppWithdrawal/MayaAppWithdrawal.js +2 -2
- package/dist/components/DepositWithdrawal/Withdrawal/MayaWithdrawal/MayaWithdrawal.js +3 -3
- package/dist/components/DepositWithdrawal/Withdrawal/PisoPayWithdrawal/PisoPayWithdrawal.js +2 -2
- package/dist/components/DepositWithdrawal/Withdrawal/TransactionPasswordNotSet.js +2 -2
- package/dist/components/DepositWithdrawal/Withdrawal/VentajaWithdrawal/VentajaWithdrawal.js +2 -2
- package/dist/components/DepositWithdrawal/Withdrawal/Withdrawal.js +4 -4
- package/dist/components/DigitainLauncher/Fallback.js +1 -1
- package/dist/components/DigitainLauncher/Loading.js +1 -1
- package/dist/components/DigitainLauncher/utils.js +1 -2
- package/dist/components/Disclaimer/DisclaimerV1.js +1 -1
- package/dist/components/Disclaimer/DisclaimerV2.js +3 -3
- package/dist/components/FavoriteGames/FavoriteGames.client.js +4 -4
- package/dist/components/ForgotPassword/ForgotPassword.lazy.js +1 -1
- package/dist/components/ForgotPassword/ForgotPasswordForm.js +5 -5
- package/dist/components/GCashFailed/GCashFailed.js +1 -1
- package/dist/components/GCashSuccess/GCashSuccess.js +1 -1
- package/dist/components/GameLaunch/GameLaunch.lazy.js +4 -4
- package/dist/components/GameLaunch/GameLaunchTrigger.js +2 -4
- package/dist/components/GameProviders/GameProvidersCarousel.js +1 -1
- package/dist/components/GameProviders/GameProvidersList.js +1 -1
- package/dist/components/Games/Game.js +3 -3
- package/dist/components/Games/GamesCarousel.client.js +2 -4
- package/dist/components/Games/GamesList.client.js +2 -2
- package/dist/components/GamesSearch/GamesSearch.js +4 -6
- package/dist/components/Jackpots/JackpotsCarousel/JackpotsCarousel.js +1 -1
- package/dist/components/Jackpots/JackpotsCarousel/JackpotsCarouselItem.d.ts +1 -1
- package/dist/components/Jackpots/JackpotsCarousel/JackpotsCarouselItem.js +53 -51
- package/dist/components/Jackpots/JackpotsList/JackpotsList.js +1 -1
- package/dist/components/Jackpots/JackpotsList/JackpotsListItemDesktop.js +14 -12
- package/dist/components/Jackpots/JackpotsList/JackpotsListItemGameProviders.js +1 -1
- package/dist/components/Jackpots/JackpotsList/JackpotsListItemMobile.js +13 -11
- package/dist/components/Jackpots/JackpotsList/JackpotsListItemRules.js +1 -1
- package/dist/components/Jackpots/JackpotsList/useJackpotsListItemData.js +15 -15
- package/dist/components/KYC/BasicInformation.js +1 -1
- package/dist/components/KYC/IdentityVerification.js +1 -1
- package/dist/components/KYC/KYC.lazy.js +1 -1
- package/dist/components/KYC/KYCReminder.lazy.js +1 -1
- package/dist/components/KYC/PersonalInformation.js +1 -1
- package/dist/components/Marquee/Marquee.js +1 -1
- package/dist/components/Messages/Messages.lazy.js +5 -5
- package/dist/components/Messages/MessagesPopup.js +3 -3
- package/dist/components/Messages/MessagesTrigger.js +1 -1
- package/dist/components/News/News.js +1 -1
- package/dist/components/NewsFeed/News.d.ts +2 -2
- package/dist/components/NewsFeed/News.js +1 -1
- package/dist/components/NewsFeed/NewsFeedCarousel.js +2 -2
- package/dist/components/NewsFeed/NewsFeedList.js +1 -1
- package/dist/components/PortalProvider/Snackbar.js +2 -2
- package/dist/components/Promo/Promo.client.js +2 -2
- package/dist/components/Promos/Cashback.js +1 -1
- package/dist/components/Promos/CustomPromo.d.ts +2 -2
- package/dist/components/Promos/CustomPromo.js +1 -1
- package/dist/components/Promos/Promo.js +1 -1
- package/dist/components/Promos/PromosCarousel.js +2 -2
- package/dist/components/Promos/PromosGrid.js +2 -2
- package/dist/components/Quests/DailyCheckInQuest.js +3 -3
- package/dist/components/Quests/JourneyQuest.js +5 -5
- package/dist/components/Quests/OnboardingQuest.js +2 -2
- package/dist/components/Quests/Quests.client.js +4 -4
- package/dist/components/Quests/WageringQuest.js +2 -2
- package/dist/components/ResponsibleGaming/ResponsibleGaming.lazy.js +1 -1
- package/dist/components/Search/Search.lazy.js +7 -9
- package/dist/components/SignIn/MobileNumberSignIn.js +5 -5
- package/dist/components/SignIn/NameAndPasswordSignIn.js +2 -2
- package/dist/components/SignIn/SignIn.lazy.d.ts +1 -1
- package/dist/components/SignIn/SignIn.lazy.js +1 -2
- package/dist/components/SignIn/SignInForm.js +1 -1
- package/dist/components/SignUp/SignUpDefault/SignUpDefault.lazy.js +1 -1
- package/dist/components/SignUp/SignUpDefault/SignUpDefaultForm.js +7 -7
- package/dist/components/SignUp/SignUpKYC/IdFrontImageField/IdFrontImageField.client.js +7 -7
- package/dist/components/SignUp/SignUpKYC/IdFrontImageField/IdFrontImageField.js +1 -1
- package/dist/components/SignUp/SignUpKYC/SelfieImageField/SelfieImageField.client.js +6 -6
- package/dist/components/SignUp/SignUpKYC/SelfieImageField/SelfieImageField.js +1 -1
- package/dist/components/SignUp/SignUpKYC/SelfieImageField/useSelfieImageField.js +0 -1
- package/dist/components/SignUp/SignUpKYC/SignUpKYC.lazy.js +1 -1
- package/dist/components/SignUp/SignUpKYC/SignUpKYCForm.js +8 -8
- package/dist/components/TermsAndConditions/TermsAndConditions.lazy.js +1 -1
- package/dist/components/TermsOfUse/TermsOfUse.lazy.js +1 -1
- package/dist/components/TopWins/TopWins.client.js +3 -3
- package/dist/components/Tournaments/TournamentsCarousel/TournamentsCarousel.js +1 -1
- package/dist/components/Tournaments/TournamentsCarousel/TournamentsCarouselItem.js +10 -8
- package/dist/components/Tournaments/TournamentsList/TournamentsList.js +2 -2
- package/dist/components/Tournaments/TournamentsList/TournamentsListItemDesktop.js +9 -7
- package/dist/components/Tournaments/TournamentsList/TournamentsListItemGameProviders.js +1 -1
- package/dist/components/Tournaments/TournamentsList/TournamentsListItemMobile.js +8 -6
- package/dist/components/Tournaments/TournamentsList/TournamentsListItemRules.js +1 -1
- package/dist/components/Tournaments/TournamentsList/useTournamentListItemData.js +1 -1
- package/dist/components/TransactionRecords/DepositRecordsTable.js +2 -2
- package/dist/components/TransactionRecords/TableFilters.js +1 -1
- package/dist/components/TransactionRecords/TransactionRecords.suspense.js +1 -1
- package/dist/components/TransactionRecords/TransactionRecordsTable.js +2 -2
- package/dist/components/TransactionRecords/WithdrawalRecordsTable.js +2 -2
- package/dist/components/shared/Empty.js +1 -1
- package/dist/components/shared/IdFrontImageField/IdFrontImageField.client.js +7 -7
- package/dist/components/shared/IdFrontImageField/IdFrontImageField.js +1 -1
- package/dist/components/shared/SelfieImageField/SelfieImageField.client.js +6 -6
- package/dist/components/shared/SelfieImageField/SelfieImageField.js +1 -1
- package/dist/components/shared/SelfieImageField/useSelfieImageField.js +0 -1
- package/dist/constants/EnvVar.d.ts +1 -1
- package/dist/middleware.d.ts +1 -1
- package/dist/middleware.js +1 -1
- package/dist/services/graphqlRequest.js +0 -1
- package/dist/ui/AlertDialog/AlertDialog.d.ts +154 -154
- package/dist/ui/AlertDialog/alertDialog.recipe.d.ts +14 -14
- package/dist/ui/AlertDialog/alertDialog.recipe.js +6 -6
- package/dist/ui/Avatar/avatar.recipe.js +3 -3
- package/dist/ui/Badge/Badge.d.ts +12 -12
- package/dist/ui/Badge/badge.anatomy.d.ts +1 -1
- package/dist/ui/Badge/badge.recipe.d.ts +3 -3
- package/dist/ui/Badge/badge.recipe.js +7 -7
- package/dist/ui/Button/button.recipe.d.ts +2 -2
- package/dist/ui/Button/button.recipe.js +3 -3
- package/dist/ui/Carousel/Carousel.d.ts +45 -45
- package/dist/ui/Carousel/carousel.recipe.d.ts +5 -5
- package/dist/ui/Checkbox/Checkbox.d.ts +23 -23
- package/dist/ui/Checkbox/checkbox.recipe.d.ts +3 -3
- package/dist/ui/Checkbox/checkbox.recipe.js +1 -1
- package/dist/ui/Clipboard/Clipboard.d.ts +18 -18
- package/dist/ui/Clipboard/clipboard.recipe.d.ts +3 -3
- package/dist/ui/Clipboard/clipboard.recipe.js +2 -2
- package/dist/ui/Collapsible/Collapsible.d.ts +32 -32
- package/dist/ui/Collapsible/collapsible.recipe.d.ts +8 -8
- package/dist/ui/Collapsible/collapsible.recipe.js +2 -2
- package/dist/ui/Combobox/Combobox.d.ts +42 -42
- package/dist/ui/Combobox/Combobox.js +0 -1
- package/dist/ui/Combobox/combobox.recipe.d.ts +3 -3
- package/dist/ui/Combobox/combobox.recipe.js +6 -6
- package/dist/ui/DatePicker/DatePicker.d.ts +72 -72
- package/dist/ui/DatePicker/datePicker.recipe.d.ts +3 -3
- package/dist/ui/DatePicker/datePicker.recipe.js +7 -7
- package/dist/ui/Dialog/Dialog.d.ts +154 -154
- package/dist/ui/Dialog/dialog.recipe.d.ts +14 -14
- package/dist/ui/Dialog/dialog.recipe.js +4 -4
- package/dist/ui/Drawer/Drawer.d.ts +33 -33
- package/dist/ui/Drawer/drawer.recipe.d.ts +3 -3
- package/dist/ui/Drawer/drawer.recipe.js +5 -5
- package/dist/ui/Field/Field.d.ts +21 -21
- package/dist/ui/Field/field.recipe.d.ts +3 -3
- package/dist/ui/Field/field.recipe.js +3 -3
- package/dist/ui/IconButton/iconButton.recipe.d.ts +2 -2
- package/dist/ui/Menu/Menu.d.ts +144 -144
- package/dist/ui/Menu/menu.recipe.d.ts +8 -8
- package/dist/ui/NumberInput/numberInput.recipe.js +5 -5
- package/dist/ui/PasswordInput/PasswordInput.d.ts +18 -18
- package/dist/ui/PasswordInput/passwordInput.recipe.d.ts +3 -3
- package/dist/ui/PasswordInput/passwordInput.recipe.js +3 -3
- package/dist/ui/PinInput/pinInput.recipe.js +3 -3
- package/dist/ui/Popover/Popover.d.ts +121 -121
- package/dist/ui/Popover/popover.recipe.d.ts +11 -11
- package/dist/ui/Popover/popover.recipe.js +1 -1
- package/dist/ui/Presence/Presence.js +1 -1
- package/dist/ui/Progress/Progress.d.ts +27 -27
- package/dist/ui/Progress/progress.recipe.d.ts +3 -3
- package/dist/ui/Progress/progress.recipe.js +2 -2
- package/dist/ui/SegmentGroup/SegmentGroup.d.ts +18 -18
- package/dist/ui/SegmentGroup/segmentGroup.recipe.d.ts +3 -3
- package/dist/ui/SegmentGroup/segmentGroup.recipe.js +4 -4
- package/dist/ui/Select/Select.d.ts +45 -45
- package/dist/ui/Select/Select.js +0 -1
- package/dist/ui/Select/select.recipe.d.ts +3 -3
- package/dist/ui/Select/select.recipe.js +7 -7
- package/dist/ui/Table/Table.d.ts +21 -21
- package/dist/ui/Table/table.anatomy.d.ts +1 -1
- package/dist/ui/Table/table.recipe.d.ts +3 -3
- package/dist/ui/Table/table.recipe.js +3 -3
- package/dist/ui/Tabs/Tabs.d.ts +15 -15
- package/dist/ui/Tabs/tabs.recipe.d.ts +3 -3
- package/dist/ui/Tabs/tabs.recipe.js +4 -4
- package/dist/ui/Tooltip/tooltip.recipe.js +1 -1
- package/dist/utils/getLocaleInfo.js +7 -7
- package/dist/utils/getQueryClient.js +1 -1
- package/dist/utils/parseDecimal.js +1 -1
- package/dist/utils/validateFile.d.ts +1 -1
- package/package.json +157 -162
|
@@ -32,7 +32,7 @@ export function KYCReminder(props) {
|
|
|
32
32
|
session?.status === 'authenticated' &&
|
|
33
33
|
hasMissingData, onOpenChange: (details) => {
|
|
34
34
|
globalStore.kycReminder.setOpen(details.open);
|
|
35
|
-
}, closeOnEscape: false, closeOnInteractOutside: false, lazyMount: true, unmountOnExit: true, children: _jsxs(Portal, { children: [_jsx(Dialog.Backdrop, { className: "!z-[calc(var(--z-dialog)+3)]" }), _jsx(Dialog.Positioner, { className: "!z-[calc(var(--z-dialog)+4)] flex items-center justify-center", children: _jsxs(Dialog.Content, { className: "
|
|
35
|
+
}, closeOnEscape: false, closeOnInteractOutside: false, lazyMount: true, unmountOnExit: true, children: _jsxs(Portal, { children: [_jsx(Dialog.Backdrop, { className: "!z-[calc(var(--z-dialog)+3)]" }), _jsx(Dialog.Positioner, { className: "!z-[calc(var(--z-dialog)+4)] flex items-center justify-center", children: _jsxs(Dialog.Content, { className: "mx-auto h-fit max-w-[calc(100dvw-1rem)] overflow-y-auto rounded-lg bg-bg-primary-alt lg:max-w-[400px]", children: [_jsx(Dialog.CloseTrigger, { children: _jsx(XIcon, {}) }), _jsxs("div", { className: "p-3xl text-center", children: [_jsx("div", { className: "mx-auto w-fit rounded-full bg-bg-warning-secondary p-2", children: _jsx(FileCheck02Icon, { className: "text-[#FEDF89]" }) }), _jsx("h2", { className: "mt-4 text-lg text-white", children: "Personal Verification" }), _jsxs("p", { className: "mt-xs text-sm text-text-tertiary-600", children: ["All new users are required to complete identity verification to access the full range of ", props.siteName, " services, including withdrawals."] }), _jsx(Dialog.Context, { children: (api) => (_jsxs("div", { className: "mt-3xl space-y-lg", children: [_jsx(Button, { onClick: () => {
|
|
36
36
|
api.setOpen(false);
|
|
37
37
|
globalStore.kyc.setOpen(true);
|
|
38
38
|
}, children: "Verify Now" }), _jsx(Button, { type: "button", variant: "outline", fullWidth: true, onClick: () => api.setOpen(false), children: "Do it later" })] })) })] })] }) })] }) }));
|
|
@@ -104,7 +104,7 @@ export function PersonalInformation() {
|
|
|
104
104
|
}
|
|
105
105
|
const address = form.watch('address');
|
|
106
106
|
const permanentAddress = form.watch('permanentAddress');
|
|
107
|
-
return (_jsxs("div", { children: [_jsx(Dialog.Title, { className: "text-center text-lg
|
|
107
|
+
return (_jsxs("div", { children: [_jsx(Dialog.Title, { className: "text-center font-semibold text-lg", children: "Personal Information" }), _jsx(Dialog.Description, { className: "mt-xs text-center text-sm text-text-secondary-700", children: "Provide your basic details and work info." }), _jsxs("form", { className: "mt-7", onSubmit: form.handleSubmit(onSubmit), children: [_jsxs(Field.Root, { invalid: !!form.formState.errors.permanentAddress, children: [_jsx(Field.Label, { children: "Permanent address" }), _jsx(Field.Input, { placeholder: "Enter your permanent address", ...form.register('permanentAddress') }), _jsx(Field.ErrorText, { children: form.formState.errors.permanentAddress?.message })] }), _jsxs(Field.Root, { className: "mt-2xl", invalid: !!form.formState.errors.address, children: [_jsx(Field.Label, { children: "Current address" }), _jsx(Field.Input, { placeholder: "Enter your current address", ...form.register('address') }), _jsx(Field.ErrorText, { children: form.formState.errors.address?.message })] }), _jsxs(Checkbox.Root, { className: "mt-md", checked: address !== '' &&
|
|
108
108
|
permanentAddress !== '' &&
|
|
109
109
|
address === permanentAddress, onCheckedChange: (details) => {
|
|
110
110
|
if (details.checked === true) {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
import { twMerge } from 'tailwind-merge';
|
|
3
3
|
export async function Marquee(props) {
|
|
4
|
-
return (_jsxs("div", { className: twMerge('border-border-primary bg-bg-primary
|
|
4
|
+
return (_jsxs("div", { className: twMerge('flex gap-lg rounded-lg border border-border-primary bg-bg-primary p-1 pr-2.5 font-medium text-sm text-text-secondary-700 shadow-xs', props.className), children: [_jsxs("div", { className: "flex shrink-0 items-center gap-sm rounded-sm border border-border-primary px-2 py-0.5", children: [_jsx("span", { className: "size-2 rounded-full bg-utility-success-500 outline-2 outline-utility-success-100" }), _jsx("span", { children: "What's new" })] }), _jsx("div", { className: "flex grow items-center overflow-hidden", children: _jsxs("div", { className: "flex items-center whitespace-nowrap", children: [_jsx("div", { className: "animate-marquee pr-4 [animation-delay:1s]", children: props.children }), _jsx("div", { className: "animate-marquee pr-4 [animation-delay:1s]", children: props.children })] }) })] }));
|
|
5
5
|
}
|
|
@@ -50,7 +50,7 @@ export function Messages(props) {
|
|
|
50
50
|
return (_jsxs(_Fragment, { children: [_jsx(Drawer.Root, { open: globalStore.messages.open, onOpenChange: ({ open }) => globalStore.messages.setOpen(open), lazyMount: true, unmountOnExit: true, children: _jsx(Portal, { children: _jsx(Drawer.Positioner, { children: _jsx(Drawer.Content, { className: twMerge('flex', 'flex-col', 'border-border-secondary', 'top-[var(--offset-top-mobile)]', 'h-[calc(100%-var(--offset-top-mobile))]', 'lg:border-l', 'lg:top-[var(--offset-top-desktop)]', 'lg:h-[calc(100%-var(--offset-top-desktop))]'), style: {
|
|
51
51
|
['--offset-top-mobile']: mobileOffsetTop,
|
|
52
52
|
['--offset-top-desktop']: desktopOffsetTop,
|
|
53
|
-
}, children: _jsxs("div", { className: "flex h-full flex-col", children: [_jsxs("div", { className: "flex items-end justify-between p-xl", children: [_jsx("p", { className: "text-text-primary-brand text-xl
|
|
53
|
+
}, children: _jsxs("div", { className: "flex h-full flex-col", children: [_jsxs("div", { className: "flex items-end justify-between p-xl", children: [_jsx("p", { className: "font-semibold text-text-primary-brand text-xl", children: "Notifications" }), _jsx(Drawer.CloseTrigger, { className: "p-2", children: _jsx(XIcon, {}) })] }), _jsxs(Tabs.Root, { value: globalStore.messages.tab, onValueChange: (details) => globalStore.messages.setTab(z.enum(TABS).parse(details.value)), lazyMount: true, unmountOnExit: true, className: "flex grow flex-col overflow-y-auto", children: [_jsx("div", { className: "p-xl pt-0", children: _jsxs(Tabs.List, { className: "w-full", children: [_jsx(Tabs.Trigger, { value: "ALL", className: "w-full", children: "All" }), _jsxs(Tabs.Trigger, { value: "UNREAD", className: "w-full", children: ["Unread", !!unreadMessagesCount && (_jsx("span", { className: "ml-md rounded-full border border-border-primary bg-bg-secondary px-2 py-0.5", children: unreadMessagesCount }))] }), _jsx(Tabs.Indicator, {})] }) }), TABS.map((tab) => (_jsxs(Tabs.Content, { value: tab, className: "scrollbar:w-2 grow overflow-y-auto scrollbar-thumb:rounded-full scrollbar-track:rounded-full border-border-secondary border-t scrollbar-thumb:bg-bg-quaternary scrollbar-track:bg-bg-primary-alt p-xl", children: [messages.length > 0 && (_jsx("div", { className: "flex flex-col space-y-3", children: messages.map((message) => (_jsx(MessageProvider, { value: message, children: _jsx(Message, {}) }, message.id))) })), _jsx(InfiniteScroll, { loader: _jsx(SpinnerIcon, { className: "mx-auto size-5" }), hasMore: !!messagesQuery.hasNextPage, loadMore: async () => {
|
|
54
54
|
await messagesQuery.fetchNextPage();
|
|
55
55
|
}, className: "mt-4" })] }, tab)))] })] }) }) }) }) }), _jsx(MessageDetails, {})] }));
|
|
56
56
|
}
|
|
@@ -65,16 +65,16 @@ function Message() {
|
|
|
65
65
|
message: ctx.message,
|
|
66
66
|
})));
|
|
67
67
|
const markMessageAsReadMutation = useMarkMessageAsReadMutation();
|
|
68
|
-
return (_jsxs("button", {
|
|
68
|
+
return (_jsxs("button", { type: "button", className: "flex h-auto flex-shrink-0 cursor-pointer flex-col rounded-xs border border-border-secondary bg-bg-secondary px-3.5 py-2.5 text-left", onClick: () => {
|
|
69
69
|
globalStore.messages.setOpen(false);
|
|
70
70
|
globalStore.message.setOpen(true);
|
|
71
71
|
globalStore.message.setData(message);
|
|
72
72
|
if (!message.markedAsRead) {
|
|
73
73
|
markMessageAsReadMutation.mutate(message.id);
|
|
74
74
|
}
|
|
75
|
-
}, children: [_jsxs("div", { className: "flex items-center space-x-2", children: [_jsx("p", { className: "text-text-tertiary-600 text-xs
|
|
75
|
+
}, children: [_jsxs("div", { className: "flex items-center space-x-2", children: [_jsx("p", { className: "font-normal text-text-tertiary-600 text-xs", children: format(new Date(message.dateTimeCreated), 'M/d/yyyy - h:mma', {
|
|
76
76
|
in: tz(localeInfo.timezone),
|
|
77
|
-
}) }), !message.markedAsRead && (_jsx("span", { className: "
|
|
77
|
+
}) }), !message.markedAsRead && (_jsx("span", { className: "block size-2.5 rounded-full bg-utility-success-500" }))] }), _jsxs("div", { className: "flex items-center space-x-2", children: [_jsx(MessageIcon, { type: message.icon, className: "size-5 text-brand-400" }), _jsx("h2", { className: "font-semibold text-sm text-text-primary-brand", children: message.title })] }), message.content && (_jsx("div", { className: "mt-2 line-clamp-3 text-wrap font-normal text-sm", 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: "rounded-md border border-button-secondary-border px-3 py-2 text-button-secondary-fg text-sm", href: normalizeActionUrl(action.url, {
|
|
78
78
|
transactionsPageUrl,
|
|
79
79
|
questsPageUrl,
|
|
80
80
|
}), onClick: (e) => {
|
|
@@ -92,7 +92,7 @@ export function MessageDetails() {
|
|
|
92
92
|
const message = globalStore.message.data;
|
|
93
93
|
return (_jsx(Dialog.Root, { lazyMount: true, unmountOnExit: true, open: globalStore.message.open, onOpenChange: (details) => {
|
|
94
94
|
globalStore.message.setOpen(details.open);
|
|
95
|
-
}, 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: "max-h-[80vh]
|
|
95
|
+
}, 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: "mx-auto max-h-[80vh] min-w-[21.438rem] max-w-[21.438rem] overflow-y-auto rounded-xl p-3xl lg:min-w-[25rem] lg:max-w-[25rem]", children: [_jsx(Dialog.CloseTrigger, { children: _jsx(XIcon, {}) }), _jsx("div", { className: "mx-auto flex size-12 items-center justify-center rounded-full bg-bg-brand-secondary text-text-brand", children: _jsx(MessageIcon, { type: message?.icon ?? 'INFO', className: "size-6" }) }), _jsx(Dialog.Title, { className: "mt-lg text-center font-semibold text-lg lg:mt-xl", children: message?.title }), message?.content && (_jsx(Dialog.Description, { className: "mt-xs pb-5 text-center text-sm text-text-secondary-700", dangerouslySetInnerHTML: {
|
|
96
96
|
__html: message?.content,
|
|
97
97
|
} })), message?.image && (_jsx("div", { className: "mt-5 pb-5", children: _jsx(Image, { src: message?.image, alt: "", width: 400, height: 250, loading: "lazy", unoptimized: true, className: "h-auto w-full rounded-sm" }) })), message?.actions.length ? (_jsx("div", { className: "mt-3xl flex flex-col gap-2 text-center lg:mt-4xl", children: message?.actions.map((action, index) => (_jsx(Button, { asChild: true, children: _jsx(Link, { href: normalizeActionUrl(action.url, {
|
|
98
98
|
transactionsPageUrl,
|
|
@@ -95,12 +95,12 @@ export function MessagesPopup() {
|
|
|
95
95
|
}, !disclosure.open && !paused ? 2500 : null);
|
|
96
96
|
return (_jsx(Dialog.Root, { open: disclosure.open, onOpenChange: (details) => {
|
|
97
97
|
disclosure.setOpen(details.open);
|
|
98
|
-
}, lazyMount: true, unmountOnExit: true, children: _jsxs(Portal, { children: [_jsx(Dialog.Backdrop, { className: "!z-[calc(var(--z-dialog)+3)]" }), _jsx(Dialog.Positioner, { className: "!z-[calc(var(--z-dialog)+4)] flex items-center justify-center", children: _jsxs(Dialog.Content, { className: "
|
|
98
|
+
}, lazyMount: true, unmountOnExit: true, children: _jsxs(Portal, { children: [_jsx(Dialog.Backdrop, { className: "!z-[calc(var(--z-dialog)+3)]" }), _jsx(Dialog.Positioner, { className: "!z-[calc(var(--z-dialog)+4)] flex items-center justify-center", children: _jsxs(Dialog.Content, { className: "mx-auto max-h-[80vh] min-w-[21.438rem] max-w-[21.438rem] overflow-y-auto rounded-xl p-3xl lg:min-w-[25rem] lg:max-w-[25rem]", children: [_jsx(Dialog.CloseTrigger, { children: _jsx(XIcon, {}) }), _jsxs(Carousel.Root, { page: index, onPageChange: (details) => {
|
|
99
99
|
setIndex(details.page);
|
|
100
|
-
}, slideCount: messages.length, allowMouseDrag: true, autoplay: false, children: [_jsx(Carousel.ItemGroup, { children: messages.map((message, index) => (_jsxs(Carousel.Item, { index: index, className: "select-none", children: [_jsx("div", { className: "
|
|
100
|
+
}, slideCount: messages.length, allowMouseDrag: true, autoplay: false, children: [_jsx(Carousel.ItemGroup, { children: messages.map((message, index) => (_jsxs(Carousel.Item, { index: index, className: "select-none", children: [_jsx("div", { className: "mx-auto flex size-12 items-center justify-center rounded-full bg-bg-brand-secondary text-text-brand", children: _jsx(MessageIcon, { type: message.icon, className: "size-6" }) }), _jsx("h2", { className: "mt-lg text-center font-semibold text-lg xl:mt-xl", children: message.title }), message.content && (_jsx("div", { dangerouslySetInnerHTML: { __html: message.content }, className: "mt-xs pb-5 text-center text-sm text-text-secondary-700" })), message.image && (_jsx("div", { className: "mt-5 pb-5", children: _jsx(Image, { src: message.image, alt: "", width: 400, height: 250, loading: "lazy", unoptimized: true, className: "h-auto w-full rounded-sm" }) })), message.actions.length ? (_jsx("div", { className: "mt-3xl flex flex-col gap-2 text-center lg:mt-4xl", children: message.actions.map((action, index) => (_jsx(Button, { asChild: true, children: _jsx(Link, { href: normalizeActionUrl(action.url, {
|
|
101
101
|
questsPageUrl,
|
|
102
102
|
transactionsPageUrl,
|
|
103
103
|
}), onClick: () => {
|
|
104
104
|
disclosure.setOpen(false);
|
|
105
|
-
}, children: action.name }) }, index))) })) : null] }, message.id))) }), _jsxs(Carousel.Control, { className: "
|
|
105
|
+
}, children: action.name }) }, index))) })) : null] }, message.id))) }), _jsxs(Carousel.Control, { className: "mt-5 flex items-center lg:mt-3xl", children: [_jsxs(Carousel.PrevTrigger, { className: "hidden items-center gap-md font-semibold text-text-quarterary-500 disabled:invisible lg:flex", children: [_jsx(ChevronLeftIcon, { className: "size-5" }), "Back"] }), _jsx(Carousel.IndicatorGroup, { className: "flex grow justify-center gap-xs", children: messages.map((message, index) => (_jsx(Carousel.Indicator, { index: index, className: "size-2.5 ui-current:w-5 rounded-full bg-bg-quaternary ui-current:bg-brand-400 transition-all duration-150" }, message.id))) }), _jsxs(Carousel.NextTrigger, { className: "hidden items-center gap-md font-semibold text-text-quarterary-500 disabled:invisible lg:flex", children: ["Next", _jsx(ChevronRightIcon, { className: "size-5" })] })] })] })] }) })] }) }));
|
|
106
106
|
}
|
|
@@ -17,5 +17,5 @@ export function MessagesTrigger({ asChild, children, ...props }) {
|
|
|
17
17
|
return (_jsx(ark.button, { type: "button", "aria-label": "Toggle messages panel", "data-state": globalStore.messages.open ? 'open' : 'closed', ...props, onClick: (e) => {
|
|
18
18
|
globalStore.messages.setOpen(!globalStore.messages.open);
|
|
19
19
|
return props.onClick?.(e);
|
|
20
|
-
}, asChild: !children ? true : asChild, children: children ?? (_jsxs(IconButton, { size: "sm", colorScheme: "gray", className: "relative", children: [!!unreadMessagesCount && (_jsx("div", { className: "
|
|
20
|
+
}, asChild: !children ? true : asChild, children: children ?? (_jsxs(IconButton, { size: "sm", colorScheme: "gray", className: "relative", children: [!!unreadMessagesCount && (_jsx("div", { className: "-right-1.5 -top-1.5 absolute rounded-full border bg-brand-500 px-1.5 font-semibold text-2xs text-button-primary-fg leading-4.5", children: unreadMessagesCount })), _jsx(Bell01Icon, {})] })) }));
|
|
21
21
|
}
|
|
@@ -5,7 +5,7 @@ import { ChevronLeftIcon } from '../../icons/ChevronLeftIcon.js';
|
|
|
5
5
|
import { Prose } from '../../ui/Prose/index.js';
|
|
6
6
|
import { stripTags } from '../../utils/stripTags.js';
|
|
7
7
|
export async function News(props) {
|
|
8
|
-
return (_jsxs(_Fragment, { children: [_jsx("meta", { name: "description", content: stripTags(props.news.content) }), _jsx("meta", { name: "og:title", content: props.news.title }), _jsx("meta", { name: "og:description", content: stripTags(props.news.content) }), _jsx("meta", { name: "og:image", content: props.news.image }), _jsx("meta", { name: "twitter:title", content: props.news.title }), _jsx("meta", { name: "twitter:description", content: stripTags(props.news.content) }), _jsx("meta", { name: "twitter:image", content: props.news.image }), _jsx("meta", { name: "twitter:card", content: "summary_large_image" }), _jsxs("div", { style: props.style, className: props.className, children: [_jsxs(Link, { href: props.viewAllUrl ?? '/news', className: "
|
|
8
|
+
return (_jsxs(_Fragment, { children: [_jsx("meta", { name: "description", content: stripTags(props.news.content) }), _jsx("meta", { name: "og:title", content: props.news.title }), _jsx("meta", { name: "og:description", content: stripTags(props.news.content) }), _jsx("meta", { name: "og:image", content: props.news.image }), _jsx("meta", { name: "twitter:title", content: props.news.title }), _jsx("meta", { name: "twitter:description", content: stripTags(props.news.content) }), _jsx("meta", { name: "twitter:image", content: props.news.image }), _jsx("meta", { name: "twitter:card", content: "summary_large_image" }), _jsxs("div", { style: props.style, className: props.className, children: [_jsxs(Link, { href: props.viewAllUrl ?? '/news', className: "flex items-center gap-lg font-semibold text-button-secondary-fg text-lg", children: [_jsx(ChevronLeftIcon, { className: "size-6" }), "Back to all News"] }), _jsx(Image, { src: props.news.image, alt: "", width: 1024, height: 600, priority: true, unoptimized: true, className: "mt-3xl block h-auto w-full rounded-xl lg:mt-6" }), _jsx("p", { className: "mt-xl font-semibold text-brand-400 text-sm lg:mt-6", children: props.news.category }), _jsx("h2", { className: "mt-xl font-semibold text-2xl lg:mt-6", children: props.news.title }), _jsx(Prose, { className: "mt-xl lg:mt-6", dangerouslySetInnerHTML: {
|
|
9
9
|
__html: props.news.content,
|
|
10
10
|
} })] })] }));
|
|
11
11
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import type { News } from '../../types';
|
|
1
|
+
import type { News as TNews } from '../../types';
|
|
2
2
|
export interface NewsProps {
|
|
3
|
-
news:
|
|
3
|
+
news: TNews;
|
|
4
4
|
viewDetailsUrl: string;
|
|
5
5
|
}
|
|
6
6
|
export declare function News({ news, viewDetailsUrl }: NewsProps): Promise<import("react/jsx-runtime").JSX.Element>;
|
|
@@ -3,7 +3,7 @@ import Image from 'next/image';
|
|
|
3
3
|
import Link from 'next/link';
|
|
4
4
|
import { Button } from '../../ui/Button/index.js';
|
|
5
5
|
export async function News({ news, viewDetailsUrl }) {
|
|
6
|
-
return (_jsxs("div", { className: "
|
|
6
|
+
return (_jsxs("div", { className: "flex flex-col overflow-hidden rounded-2xl border border-border-primary bg-bg-primary-alt shadow-md", children: [_jsx(Image, { src: news.image, alt: "", width: 400, height: 274, loading: "lazy", unoptimized: true, className: "block h-[15.25rem] w-full object-cover" }), _jsxs("div", { className: "flex grow flex-col p-3xl", children: [_jsxs("div", { className: "grow", children: [_jsx("p", { className: "font-semibold text-brand-400 text-sm", children: news.category }), _jsx("h2", { className: "mt-2 line-clamp-1 font-semibold text-lg", children: news.title }), _jsx("p", { className: "mt-xs line-clamp-3 text-text-tertiary-600", dangerouslySetInnerHTML: {
|
|
7
7
|
__html: news.content,
|
|
8
8
|
} })] }), _jsx(Button, { asChild: true, className: "mt-2xl", children: _jsxs(Link, { href: `${viewDetailsUrl}/${news.id}`, children: ["Read More", _jsxs("span", { className: "sr-only", children: [" about ", news.title] })] }) })] })] }, news.id));
|
|
9
9
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
'use client';
|
|
2
|
-
import { jsx as _jsx, jsxs as _jsxs
|
|
2
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
3
|
import useEmblaCarousel, {} from 'embla-carousel-react';
|
|
4
4
|
import Link from 'next/link';
|
|
5
5
|
import { useCallback, useEffect, useState } from 'react';
|
|
@@ -41,5 +41,5 @@ export function NewsFeedCarousel(props) {
|
|
|
41
41
|
onSelect(emblaApi);
|
|
42
42
|
emblaApi.on('reInit', onSelect).on('select', onSelect);
|
|
43
43
|
}, [emblaApi, onSelect]);
|
|
44
|
-
return (_jsxs("div", { style: props.style, className: props.className, children: [_jsxs("div", { className: "flex items-center", children: [_jsx("h2", { className: "text-lg
|
|
44
|
+
return (_jsxs("div", { style: props.style, className: props.className, children: [_jsxs("div", { className: "flex items-center", children: [_jsx("h2", { className: "font-semibold text-lg", children: heading }), _jsx("div", { className: "grow" }), _jsxs("div", { className: "flex items-center justify-center gap-xl", children: [_jsxs(Link, { href: viewAllUrl, 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, { 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" }) })] })] })] }), empty && (_jsx(Empty, { icon: Tv03Icon, title: "No News", message: "No news is currently available.", className: "mt-8" })), !empty && (_jsx("div", { ref: emblaRef, className: "relative mt-lg lg:overflow-hidden", children: _jsx("div", { className: twMerge('grid auto-cols-[100%] grid-flow-col gap-1.5 lg:auto-cols-[calc((100%-(1.25rem*2))/3)] lg:gap-2xl'), children: props.newsFeed.map((news) => (_jsx(News, { news: news, viewDetailsUrl: viewDetailsUrl }, news.id))) }) }))] }));
|
|
45
45
|
}
|
|
@@ -6,5 +6,5 @@ export function NewsFeedList(props) {
|
|
|
6
6
|
const empty = props.newsFeed.length <= 0;
|
|
7
7
|
const heading = props.heading ?? 'News';
|
|
8
8
|
const viewDetailsUrl = props.viewDetailsUrl ?? '/news';
|
|
9
|
-
return (_jsxs("div", { style: props.style, className: props.className, children: [_jsx("h2", { className: "text-lg
|
|
9
|
+
return (_jsxs("div", { style: props.style, className: props.className, children: [_jsx("h2", { className: "font-semibold text-lg", children: heading }), empty && (_jsx(Empty, { icon: Tv03Icon, title: "No News", message: "No news is currently available.", className: "mt-8" })), !empty && (_jsx("div", { className: "mt-lg grid gap-3xl lg:grid-cols-3 lg:gap-2xl", children: props.newsFeed.map((news) => (_jsx(News, { news: news, viewDetailsUrl: viewDetailsUrl }, news.id))) }))] }));
|
|
10
10
|
}
|
|
@@ -6,13 +6,13 @@ import { toaster } from '../../client/utils/toaster.js';
|
|
|
6
6
|
import { AlertCircleIcon } from '../../icons/AlertCircleIcon.js';
|
|
7
7
|
import { XIcon } from '../../icons/XIcon.js';
|
|
8
8
|
export function Snackbar() {
|
|
9
|
-
return (_jsx(Toaster, { toaster: toaster, children: (toast) => (_jsxs(Toast.Root, { className: twMerge('group', 'p-xl', 'border', 'border-border-primary', 'bg-bg-primary-alt', 'flex', 'items-start', 'gap-lg', 'w-[21.438rem]', 'lg:w-[1200px]', 'max-w-full', 'rounded-xl', 'shadow-xs', 'h-[var(--height)]', 'z-[var(--z-index)]', 'scale-[var(--scale)]', 'opacity-[var(--opacity)]', '[translate:var(--x)_var(--y)_0]', 'transition-all', 'duration-300'), children: [_jsxs("div", { className: "flex grow flex-col gap-xl lg:flex-row lg:gap-lg", children: [_jsx("div", { className: twMerge('flex', 'items-center', 'justify-center', 'size-9.5', 'border-2', 'rounded-full', toast.type === 'success' && 'border-text-success-primary/15', toast.type === 'warning' && 'border-text-warning-primary/15', toast.type === 'error' && 'border-text-error-primary/15'), children: _jsx("div", { className: twMerge('flex', 'items-center', 'justify-center', 'size-7', 'border-2', 'rounded-full', toast.type === 'success' && 'border-text-success-primary/35', toast.type === 'warning' && 'border-text-warning-primary/35', toast.type === 'error' && 'border-text-error-primary/35'), children: _jsx(AlertCircleIcon, { className: twMerge('size-5', toast.type === 'success' && 'text-text-success-primary', toast.type === 'warning' && 'text-text-warning-primary', toast.type === 'error' && 'text-text-error-primary') }) }) }), _jsxs("div", { className: "grow text-sm leading-none", children: [_jsx(Toast.Title, { className: "text-text-secondary-700
|
|
9
|
+
return (_jsx(Toaster, { toaster: toaster, children: (toast) => (_jsxs(Toast.Root, { className: twMerge('group', 'p-xl', 'border', 'border-border-primary', 'bg-bg-primary-alt', 'flex', 'items-start', 'gap-lg', 'w-[21.438rem]', 'lg:w-[1200px]', 'max-w-full', 'rounded-xl', 'shadow-xs', 'h-[var(--height)]', 'z-[var(--z-index)]', 'scale-[var(--scale)]', 'opacity-[var(--opacity)]', '[translate:var(--x)_var(--y)_0]', 'transition-all', 'duration-300'), children: [_jsxs("div", { className: "flex grow flex-col gap-xl lg:flex-row lg:gap-lg", children: [_jsx("div", { className: twMerge('flex', 'items-center', 'justify-center', 'size-9.5', 'border-2', 'rounded-full', toast.type === 'success' && 'border-text-success-primary/15', toast.type === 'warning' && 'border-text-warning-primary/15', toast.type === 'error' && 'border-text-error-primary/15'), children: _jsx("div", { className: twMerge('flex', 'items-center', 'justify-center', 'size-7', 'border-2', 'rounded-full', toast.type === 'success' && 'border-text-success-primary/35', toast.type === 'warning' && 'border-text-warning-primary/35', toast.type === 'error' && 'border-text-error-primary/35'), children: _jsx(AlertCircleIcon, { className: twMerge('size-5', toast.type === 'success' && 'text-text-success-primary', toast.type === 'warning' && 'text-text-warning-primary', toast.type === 'error' && 'text-text-error-primary') }) }) }), _jsxs("div", { className: "grow text-sm leading-none", children: [_jsx(Toast.Title, { className: "font-semibold text-text-secondary-700", children: toast.title
|
|
10
10
|
? toast.title
|
|
11
11
|
: toast.type === 'error'
|
|
12
12
|
? 'Error'
|
|
13
13
|
: toast.type === 'warning'
|
|
14
14
|
? 'Warning'
|
|
15
|
-
: 'Success' }), _jsx(Toast.Description, { className: "text-text-tertiary-600
|
|
15
|
+
: 'Success' }), _jsx(Toast.Description, { className: "mt-xs text-text-tertiary-600", children: toast.description
|
|
16
16
|
? toast.description
|
|
17
17
|
: toast.type === 'error'
|
|
18
18
|
? 'Something went wrong.'
|
|
@@ -24,10 +24,10 @@ export function Promo__client(props) {
|
|
|
24
24
|
})));
|
|
25
25
|
if (!promo)
|
|
26
26
|
return null;
|
|
27
|
-
return (_jsxs("div", { className: props.className, children: [_jsxs(Link, { href: props.viewAllPromosUrl ?? '/promos', className: "
|
|
27
|
+
return (_jsxs("div", { className: props.className, children: [_jsxs(Link, { href: props.viewAllPromosUrl ?? '/promos', className: "flex w-fit items-center gap-lg font-semibold text-button-tertiary-fg text-lg", children: [_jsx(ChevronLeftIcon, { className: "size-6" }), "Back to all Promotions"] }), promo.banner.url && (_jsx(Image, { src: promo.banner.url, alt: "", width: 1024, height: 600, priority: true, unoptimized: true, className: "mt-xl h-auto w-full rounded-xl lg:mt-6" })), claimable && (_jsx(Button, { className: "mt-xl lg:mt-6", onClick: () => {
|
|
28
28
|
globalStore.depositWithdrawal.setOpen(true);
|
|
29
29
|
globalStore.depositWithdrawal.setPromo(promo.id);
|
|
30
|
-
}, children: "Deposit Now" })), _jsx("h1", { className: "mt-xl text-2xl
|
|
30
|
+
}, children: "Deposit Now" })), _jsx("h1", { className: "mt-xl font-semibold text-2xl lg:mt-6 lg:text-3xl", children: promo.name }), _jsxs("p", { className: "mt-xl text-text-secondary-700 lg:mt-6", children: ["Ends", ' ', format(promo.activationEndDateTime, 'MM/dd/yyy hh:mm:ss', {
|
|
31
31
|
in: tz(localeInfo.timezone),
|
|
32
32
|
})] }), _jsx(Prose, { className: "mt-2xl lg:mt-6", dangerouslySetInnerHTML: {
|
|
33
33
|
__html: promo.description,
|
|
@@ -11,7 +11,7 @@ export function Cashback({ data, viewDetailsUrl }) {
|
|
|
11
11
|
})));
|
|
12
12
|
const claimablePromos = useAvailablePromosQuery().data ?? [];
|
|
13
13
|
const claimable = claimablePromos.find((availablePromo) => availablePromo.id === data.id);
|
|
14
|
-
return (_jsxs("div", { className: "
|
|
14
|
+
return (_jsxs("div", { className: "relative flex h-full flex-col overflow-hidden rounded-2xl border border-border-secondary bg-accent-50 bg-bg-primary-alt", children: [data.banner?.url && (_jsx(Image, { src: data.banner.url, alt: data.name, width: 400, height: 202, loading: "lazy", unoptimized: true, className: "block aspect-[365/180] w-full object-cover" })), _jsxs("div", { className: "flex flex-grow flex-col px-4 pt-2xl pb-3xl", children: [_jsx("div", { className: "w-full grow text-center font-semibold text-xl", children: data.name }), _jsxs("div", { className: "mt-auto flex flex-col gap-3 pt-4 lg:flex-row", children: [claimable && (_jsx(Button, { size: "sm", onClick: () => {
|
|
15
15
|
globalStore.depositWithdrawal.setOpen(true);
|
|
16
16
|
globalStore.depositWithdrawal.setPromo(data.id);
|
|
17
17
|
}, children: "Get bonus" })), _jsx(Button, { size: "sm", variant: "outline", asChild: true, children: _jsxs(Link, { href: `${viewDetailsUrl}/${data.id}`, children: ["Read more", _jsxs("span", { className: "sr-only", children: [" about ", data.name] })] }) })] })] })] }));
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import type { CustomPromo } from '../../types';
|
|
1
|
+
import type { CustomPromo as TCustomPromo } from '../../types';
|
|
2
2
|
interface CustomPromoProps {
|
|
3
|
-
data:
|
|
3
|
+
data: TCustomPromo;
|
|
4
4
|
viewDetailsUrl: string;
|
|
5
5
|
}
|
|
6
6
|
export declare function CustomPromo({ data, viewDetailsUrl }: CustomPromoProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -3,5 +3,5 @@ import Image from 'next/image';
|
|
|
3
3
|
import Link from 'next/link';
|
|
4
4
|
import { Button } from '../../ui/Button/index.js';
|
|
5
5
|
export function CustomPromo({ data, viewDetailsUrl }) {
|
|
6
|
-
return (_jsxs("div", { className: "
|
|
6
|
+
return (_jsxs("div", { className: "relative flex h-full flex-col overflow-hidden rounded-2xl border border-border-secondary bg-accent-50 bg-bg-primary-alt", children: [_jsx(Image, { src: data.banner, alt: data.name, width: 400, height: 202, loading: "lazy", unoptimized: true, className: "block aspect-[365/180] w-full object-cover" }), _jsxs("div", { className: "flex flex-grow flex-col px-4 pt-2xl pb-3xl", children: [_jsx("div", { className: "w-full grow text-center font-semibold text-xl", children: data.name }), _jsx("div", { className: "mt-auto flex flex-col gap-3 pt-4 lg:flex-row", children: _jsx(Button, { size: "sm", variant: "outline", asChild: true, children: _jsxs(Link, { href: `${viewDetailsUrl}/${data.id}`, children: ["Read more", _jsxs("span", { className: "sr-only", children: [" about ", data.name] })] }) }) })] })] }));
|
|
7
7
|
}
|
|
@@ -11,7 +11,7 @@ export function Promo({ data, viewDetailsUrl }) {
|
|
|
11
11
|
})));
|
|
12
12
|
const claimablePromos = useAvailablePromosQuery().data ?? [];
|
|
13
13
|
const claimable = claimablePromos.find((availablePromo) => availablePromo.id === data.id);
|
|
14
|
-
return (_jsxs("div", { className: "
|
|
14
|
+
return (_jsxs("div", { className: "relative flex h-full flex-col overflow-hidden rounded-2xl border border-border-secondary bg-accent-50 bg-bg-primary-alt", children: [data.banner?.url && (_jsx(Image, { src: data.banner.url, alt: data.name, width: 400, height: 202, loading: "lazy", unoptimized: true, className: "block aspect-[365/180] w-full object-cover" })), _jsxs("div", { className: "flex flex-grow flex-col px-4 pt-2xl pb-3xl", children: [_jsx("div", { className: "w-full grow text-center font-semibold text-xl", children: data.name }), _jsxs("div", { className: "mt-auto flex flex-col gap-3 pt-4 lg:flex-row", children: [claimable && (_jsx(Button, { size: "sm", onClick: () => {
|
|
15
15
|
globalStore.depositWithdrawal.setOpen(true);
|
|
16
16
|
globalStore.depositWithdrawal.setPromo(data.id);
|
|
17
17
|
}, children: "Get bonus" })), _jsx(Button, { size: "sm", variant: "outline", asChild: true, children: _jsxs(Link, { href: `${viewDetailsUrl}/${data.id}`, children: ["Read more", _jsxs("span", { className: "sr-only", children: [" about ", data.name] })] }) })] })] })] }));
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
'use client';
|
|
2
|
-
import { jsx as _jsx, jsxs as _jsxs
|
|
2
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
3
|
import useEmblaCarousel, {} from 'embla-carousel-react';
|
|
4
4
|
import Link from 'next/link';
|
|
5
5
|
import { useCallback, useEffect, useState } from 'react';
|
|
@@ -48,5 +48,5 @@ export function PromosCarousel(props) {
|
|
|
48
48
|
onSelect(emblaApi);
|
|
49
49
|
emblaApi.on('reInit', onSelect).on('select', onSelect);
|
|
50
50
|
}, [emblaApi, onSelect]);
|
|
51
|
-
return (_jsxs("div", { className: props.className, children: [_jsxs("div", { className: "flex items-center", children: [_jsx("h2", { className: "text-lg
|
|
51
|
+
return (_jsxs("div", { className: props.className, children: [_jsxs("div", { className: "flex items-center", children: [_jsx("h2", { className: "font-semibold text-lg", 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: "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, { 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" }) })] })] })] }), empty && (_jsx(Empty, { icon: Gift01Icon, title: "No Promos", message: "No promo is currently available.", className: "mt-8" })), !empty && (_jsx("div", { ref: emblaRef, className: "relative mt-lg lg:overflow-hidden", children: _jsxs("div", { className: twMerge('grid auto-cols-[100%] grid-flow-col gap-1.5 lg:auto-cols-[calc((100%-(1.25rem*2))/3)] lg:gap-2xl'), children: [promos.map((promo) => (_jsx(Promo, { data: promo, viewDetailsUrl: props.viewPromoDetailsUrl ?? '/promos' }, promo.id))), cashbacks.map((cashback) => (_jsx(Cashback, { data: cashback, viewDetailsUrl: props.viewCashbackDetailsUrl ?? '/promos/cashback' }, cashback.id))), customPromos.map((customPromo) => (_jsx(CustomPromo, { data: customPromo, viewDetailsUrl: props.viewCashbackDetailsUrl ?? '/promos/custom' }, customPromo.id)))] }) }))] }));
|
|
52
52
|
}
|
|
@@ -14,7 +14,7 @@ export function PromosGrid(props) {
|
|
|
14
14
|
const customPromos = props.customPromos?.filter((item) => !blacklist.includes(item.id)) ?? [];
|
|
15
15
|
const empty = promos.length <= 0 && cashbacks.length <= 0 && customPromos.length <= 0;
|
|
16
16
|
if (empty) {
|
|
17
|
-
return (_jsx("div", { className: props.className, children: _jsxs("div", { className: "flex items-center", children: [_jsx("h2", { className: "text-lg
|
|
17
|
+
return (_jsx("div", { className: props.className, children: _jsxs("div", { className: "flex items-center", children: [_jsx("h2", { className: "font-semibold text-lg", children: props.heading ?? 'Promos' }), _jsx("div", { className: "grow" })] }) }));
|
|
18
18
|
}
|
|
19
|
-
return (_jsxs("div", { className: props.className, children: [_jsxs("div", { className: "flex items-center", children: [_jsx("h2", { className: "text-lg
|
|
19
|
+
return (_jsxs("div", { className: props.className, children: [_jsxs("div", { className: "flex items-center", children: [_jsx("h2", { className: "font-semibold text-lg", children: props.heading ?? 'Promos' }), _jsx("div", { className: "grow" })] }), _jsx("div", { className: "relative mt-lg lg:overflow-hidden", children: _jsxs("div", { className: "grid gap-3xl lg:grid-cols-3 lg:gap-2xl", children: [promos.map((promo) => (_jsx(Promo, { data: promo, viewDetailsUrl: props.viewPromoDetailsUrl ?? '/promos' }, promo.id))), cashbacks.map((cashback) => (_jsx(Cashback, { data: cashback, viewDetailsUrl: props.viewCashbackDetailsUrl ?? '/promos/cashback' }, cashback.id))), customPromos.map((customPromo) => (_jsx(CustomPromo, { data: customPromo, viewDetailsUrl: props.viewCashbackDetailsUrl ?? '/promos/custom' }, customPromo.id)))] }) })] }));
|
|
20
20
|
}
|
|
@@ -57,7 +57,7 @@ export function DailyCheckInQuest() {
|
|
|
57
57
|
},
|
|
58
58
|
});
|
|
59
59
|
const remainingTime = useRemainingTime(endDateTime);
|
|
60
|
-
return (_jsxs(_Fragment, { children: [_jsxs("div", { className: "
|
|
60
|
+
return (_jsxs(_Fragment, { children: [_jsxs("div", { className: "flex h-full w-full flex-col space-y-6 rounded-2xl border border-border-primary bg-bg-tertiary px-4 pt-5 pb-6", children: [_jsxs("div", { className: "flex flex-col space-y-2", children: [_jsxs("div", { className: "flex max-h-7.5 items-start justify-between", children: [_jsx(RemainingTime, {}), _jsx("button", { type: "button", className: "flex size-9 cursor-pointer items-center justify-center rounded-md border border-border-secondary bg-bg-primary", onClick: () => disclosure.setOpen(true), "aria-label": "View Rules", children: _jsx(InfoCircleIcon, { className: "size-5 text-text-disabled" }) })] }), _jsx("p", { className: "font-semibold text-xl", children: name }), _jsx("div", { className: "text-wrap font-normal text-sm text-text-secondary-700", dangerouslySetInnerHTML: { __html: description } })] }), _jsxs("div", { className: "flex w-full flex-col space-y-2", children: [_jsx("div", { className: "grid grid-cols-7", children: dailyCheckedInData.map((item) => {
|
|
61
61
|
const done = item.day <= (checkInStreak ?? 0);
|
|
62
62
|
const reward = item.reward ? (`+${formatNumber(item.reward, {
|
|
63
63
|
currency: localeInfo.currency.code,
|
|
@@ -65,7 +65,7 @@ export function DailyCheckInQuest() {
|
|
|
65
65
|
maxDecimalPlaces: 0,
|
|
66
66
|
})}`) : done ? (_jsx(CheckIcon, { className: "size-4" })) : ('-');
|
|
67
67
|
return (_jsx("div", { className: twMerge('flex items-center justify-center', done ? 'text-brand-400' : 'text-text-secondary-700'), children: _jsx("p", { children: reward }) }, item.day));
|
|
68
|
-
}) }), _jsx("div", { className: "
|
|
68
|
+
}) }), _jsx("div", { className: "h-2 w-full overflow-hidden rounded-full bg-bg-primary", children: _jsx("div", { className: "h-full rounded-full bg-utility-brand-600 transition-all duration-300", style: { width: `${progressPercentage}%` } }) }), _jsx("div", { className: "grid grid-cols-7 place-items-center", children: dailyCheckedInData.map((item) => (_jsxs("div", { className: "group relative size-fit text-text-secondary-700 ui-active:text-brand-400", "data-active": dataAttr(item.day <= (checkInStreak ?? 0)), children: [_jsx(CalendarIcon, { className: "h-4.5 w-auto" }), _jsx("p", { className: "-translate-x-1/2 -translate-y-1/2 absolute top-1/2 left-1/2 text-2xs leading-none", children: item.day })] }, item.day))) })] }), _jsx(Button, { onClick: () => checkInDailyQuestMutation.mutate(id), className: "disabled:bg-bg-primary disabled:text-text-disabled", disabled: status === 'COMPLETED' ||
|
|
69
69
|
status === 'FAILED' ||
|
|
70
70
|
remainingTime.expired ||
|
|
71
71
|
hasCheckedInToday ||
|
|
@@ -91,5 +91,5 @@ function Rules(props) {
|
|
|
91
91
|
defaultValue: props.defaultOpen ?? false,
|
|
92
92
|
onChange: props.onOpenChange,
|
|
93
93
|
});
|
|
94
|
-
return (_jsx(Dialog.Root, { lazyMount: true, unmountOnExit: true, open: open, onOpenChange: (details) => setOpen(details.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
|
|
94
|
+
return (_jsx(Dialog.Root, { lazyMount: true, unmountOnExit: true, open: open, onOpenChange: (details) => setOpen(details.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: "mx-auto min-h-auto max-w-[21.438rem] overflow-y-auto rounded-xl px-4 pt-5 pb-0", children: [_jsx(Dialog.CloseTrigger, { children: _jsx(XIcon, {}) }), _jsxs("div", { className: "flex flex-col space-y-5", children: [_jsx("h2", { className: "font-semibold text-lg text-text-primary-900", children: "Daily Check-In Rules" }), _jsxs("ol", { className: "group list-disc text-wrap pl-4 font-normal text-sm text-text-tertiary-600", 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: "pt-6 pb-4", children: _jsx(Button, { onClick: () => setOpen(false), children: "Ok" }) })] }) })] }) }));
|
|
95
95
|
}
|
|
@@ -58,7 +58,7 @@ export function JourneyQuest() {
|
|
|
58
58
|
const handleViewDetails = useCallback(() => {
|
|
59
59
|
disclosure.setOpen(true);
|
|
60
60
|
}, [disclosure]);
|
|
61
|
-
return (_jsxs(_Fragment, { children: [_jsxs("div", { className: "
|
|
61
|
+
return (_jsxs(_Fragment, { children: [_jsxs("div", { className: "flex h-full w-full flex-col space-y-6 rounded-2xl border border-border-primary bg-bg-tertiary px-4 pt-5 pb-6", children: [_jsxs("div", { className: "flex flex-col space-y-2", children: [_jsx("div", { className: "flex max-h-7.5 items-start justify-between", children: _jsx(RemainingTime, {}) }), _jsx("p", { className: "font-semibold text-xl", children: quest?.name || 'Journey Quest' }), _jsxs("div", { className: "flex w-full items-center space-x-2", children: [_jsx(Progress.Root, { max: 100, className: "h-2 rounded-full bg-bg-primary", value: progressValue, children: _jsx(Progress.Track, { children: _jsx(Progress.Range, { className: "bg-utility-brand-600" }) }) }), _jsxs("p", { className: "text-text-quarterary-brand text-xs", children: [currentMilestone, "/", totalMilestones] })] }), _jsx("div", { className: "flex w-full flex-col space-y-3", children: milestones.map((milestone) => (_jsx(QuestMilestone, { label: milestone.label, bonus: milestone.bonus, isCompleted: milestone.isCompleted }, milestone.key))) })] }), _jsx("div", { className: "flex h-full items-end", children: _jsx(Button, { size: "sm", onClick: handleViewDetails, "aria-label": "View Details", disabled: false, className: "disabled:bg-bg-primary disabled:text-text-disabled", children: "View Details" }) })] }), _jsx(Rules, { open: disclosure.open, onOpenChange: disclosure.setOpen, quest: quest, milestones: milestones })] }));
|
|
62
62
|
}
|
|
63
63
|
function Rules(props) {
|
|
64
64
|
const [open, setOpen] = useControllableState({
|
|
@@ -81,8 +81,8 @@ function Rules(props) {
|
|
|
81
81
|
return false;
|
|
82
82
|
return milestones.every((milestone) => milestone.isCompleted);
|
|
83
83
|
}, [milestones]);
|
|
84
|
-
return (_jsx(Dialog.Root, { lazyMount: true, unmountOnExit: true, open: open, onOpenChange: (details) => setOpen(details.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
|
|
85
|
-
'Ready for a challenge? Complete them all and get amazing rewards!' }), milestones.map((milestone) => (_jsxs("div", { className: "
|
|
84
|
+
return (_jsx(Dialog.Root, { lazyMount: true, unmountOnExit: true, open: open, onOpenChange: (details) => setOpen(details.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: "mx-auto min-h-auto min-w-[21.438rem] max-w-[400px] overflow-y-auto rounded-xl px-4 py-5", children: [_jsx(Dialog.CloseTrigger, { children: _jsx(XIcon, {}) }), _jsxs("div", { className: "group flex flex-col space-y-5 text-sm text-text-quarterary-brand", children: [_jsx("h2", { className: "font-semibold text-lg text-text-primary-900", children: quest?.name || 'Quest' }), _jsx("p", { children: quest?.description ||
|
|
85
|
+
'Ready for a challenge? Complete them all and get amazing rewards!' }), milestones.map((milestone) => (_jsxs("div", { className: "flex flex-col space-y-2.5 rounded-xl bg-bg-tertiary p-3", children: [_jsxs("div", { className: "flex items-center justify-between", children: [_jsx("p", { className: "font-medium text-base text-white", children: milestone.label }), milestone.isCompleted && (_jsx("div", { className: "flex w-fit items-center gap-1 rounded-full border border-utility-success-200 bg-utility-success-50 px-2 py-0.5 font-medium text-utility-success-700 text-xs", children: "Complete" }))] }), milestone.description ? (_jsx(Prose, { dangerouslySetInnerHTML: {
|
|
86
86
|
__html: milestone.description,
|
|
87
87
|
} })) : milestone.bonus ? (_jsxs("p", { className: "ml-1", children: [milestone.key === 'REGISTRATION' &&
|
|
88
88
|
`Register and win Php ${milestone.bonus} Bonus`, milestone.key === 'ACCOUNT_VERIFICATION' &&
|
|
@@ -103,11 +103,11 @@ function Rules(props) {
|
|
|
103
103
|
}
|
|
104
104
|
}, "aria-label": `Complete ${milestone.label}`, children: [milestone.key === 'ACCOUNT_VERIFICATION' ? (_jsx(FileCheck02Icon, { className: "size-5" })) : (_jsx(CoinsHandIcon, { className: "size-5" })), milestone.key === 'FIRST_DEPOSIT'
|
|
105
105
|
? 'Deposit'
|
|
106
|
-
: 'Verify Account'] }))] }, milestone.key))), quest?.bonus && (_jsx("div", { className: "flex h-full items-end", children: allMilestonesCompleted ? (_jsx(Button, { size: "sm", onClick: () => setOpen(false), "aria-label": "Close", className: "w-full", children: "Close" })) : (_jsx("div", { className: "
|
|
106
|
+
: 'Verify Account'] }))] }, milestone.key))), quest?.bonus && (_jsx("div", { className: "flex h-full items-end", children: allMilestonesCompleted ? (_jsx(Button, { size: "sm", onClick: () => setOpen(false), "aria-label": "Close", className: "w-full", children: "Close" })) : (_jsx("div", { className: "w-full rounded-md border border-bg-primary-hover bg-button-secondary-bg px-3.5 py-2.5 text-center text-white", children: _jsxs("p", { children: ["Complete target to", ' ', _jsxs("span", { className: "text-brand-400", children: ["\u20B1", quest?.bonus] }), ' ', "bonus!"] }) })) }))] })] }) })] }) }));
|
|
107
107
|
}
|
|
108
108
|
function QuestMilestone({ label, bonus, isCompleted = false, }) {
|
|
109
109
|
const localeInfo = useLocaleInfo();
|
|
110
|
-
return (_jsxs("div", { className: "flex items-center justify-between", children: [_jsxs(Checkbox.Root, { checked: isCompleted, children: [_jsx(Checkbox.Control, { className: "bg-transparent", children: _jsx(Checkbox.Indicator, { asChild: true, children: _jsx(CheckIcon, {}) }) }), _jsx(Checkbox.Label, { className: "text-sm
|
|
110
|
+
return (_jsxs("div", { className: "flex items-center justify-between", children: [_jsxs(Checkbox.Root, { checked: isCompleted, children: [_jsx(Checkbox.Control, { className: "bg-transparent", children: _jsx(Checkbox.Indicator, { asChild: true, children: _jsx(CheckIcon, {}) }) }), _jsx(Checkbox.Label, { className: "font-medium text-sm leading-tight", children: label }), _jsx(Checkbox.HiddenInput, {})] }), bonus && (_jsx("div", { className: "rounded-[6px] border border-border-secondary bg-bg-secondary-alt px-1.5 py-0.5", children: _jsxs("p", { className: "font-medium text-xs leading-tight", children: ["+", formatNumber(bonus, {
|
|
111
111
|
currency: localeInfo.currency.code,
|
|
112
112
|
}), ' ', "Bonus"] }) }))] }));
|
|
113
113
|
}
|
|
@@ -26,7 +26,7 @@ export function OnboardingQuest() {
|
|
|
26
26
|
})));
|
|
27
27
|
const memberVerificationQuery = useMemberVerificationQuery();
|
|
28
28
|
const remainingTime = useRemainingTime(quest.endDateTime);
|
|
29
|
-
return (_jsxs(_Fragment, { children: [_jsxs("div", { className: "
|
|
29
|
+
return (_jsxs(_Fragment, { children: [_jsxs("div", { className: "flex h-full w-full flex-col space-y-6 rounded-2xl border border-border-primary bg-bg-tertiary px-4 pt-5 pb-6", children: [_jsxs("div", { className: "flex flex-col space-y-2", children: [_jsxs("div", { className: "flex max-h-7.5 items-start justify-between", children: [_jsx(RemainingTime, {}), _jsx("button", { type: "button", className: "flex size-9 cursor-pointer items-center justify-center rounded-md border border-border-secondary bg-bg-primary", onClick: () => disclosure.setOpen(true), "aria-label": "View Rules", children: _jsx(InfoCircleIcon, { className: "size-5 text-text-disabled" }) })] }), _jsx("h2", { className: "font-semibold text-xl", children: quest.name }), _jsx("div", { className: "text-wrap font-normal text-sm text-text-secondary-700", dangerouslySetInnerHTML: { __html: quest.description } })] }), _jsxs("div", { className: "w-full grow space-y-2", children: [_jsxs(Checkbox.Root, { checked: quest.accountVerificationCompleted, onCheckedChange: noop, children: [_jsx(Checkbox.Control, { className: "bg-transparent", children: _jsx(Checkbox.Indicator, { asChild: true, children: _jsx(CheckIcon, {}) }) }), _jsx(Checkbox.Label, { className: "font-medium text-sm leading-tight", children: "Complete personal verification" }), _jsx(Checkbox.HiddenInput, {})] }), _jsxs(Checkbox.Root, { checked: quest.firstDepositCompleted, onCheckedChange: noop, children: [_jsx(Checkbox.Control, { className: "bg-transparent", children: _jsx(Checkbox.Indicator, { asChild: true, children: _jsx(CheckIcon, {}) }) }), _jsx(Checkbox.Label, { className: "font-medium text-sm leading-tight", children: "Make your first deposit" }), _jsx(Checkbox.HiddenInput, {})] })] }), _jsxs("div", { className: "flex gap-lg", children: [_jsxs(Button, { size: "sm", onClick: () => {
|
|
30
30
|
globalStore.kyc.setOpen(true);
|
|
31
31
|
}, disabled: quest.accountVerificationCompleted ||
|
|
32
32
|
quest.status === 'COMPLETED' ||
|
|
@@ -47,5 +47,5 @@ function Rules(props) {
|
|
|
47
47
|
defaultValue: props.defaultOpen ?? false,
|
|
48
48
|
onChange: props.onOpenChange,
|
|
49
49
|
});
|
|
50
|
-
return (_jsx(Dialog.Root, { lazyMount: true, unmountOnExit: true, open: open, onOpenChange: (details) => setOpen(details.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
|
|
50
|
+
return (_jsx(Dialog.Root, { lazyMount: true, unmountOnExit: true, open: open, onOpenChange: (details) => setOpen(details.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: "mx-auto min-h-auto max-w-[21.438rem] overflow-y-auto rounded-xl px-4 pt-5 pb-0", children: [_jsx(Dialog.CloseTrigger, { children: _jsx(XIcon, {}) }), _jsxs("div", { className: "flex flex-col space-y-5", children: [_jsx("h2", { className: "font-semibold text-lg text-text-primary-900", children: "Welcome Quest Rules" }), _jsxs("ol", { className: "group list-disc text-wrap pl-4 font-normal text-sm text-text-tertiary-600", children: [_jsx("li", { children: "Begin your quest whenever you're ready" }), _jsx("li", { children: "Tackle the tasks in any order you like" }), _jsx("li", { children: "Finish all tasks and we'll credit your reward automatically!" })] })] }), _jsx("div", { className: "pt-6 pb-4", children: _jsx(Button, { onClick: () => setOpen(false), children: "Ok" }) })] }) })] }) }));
|
|
51
51
|
}
|
|
@@ -39,14 +39,14 @@ export function Quests__client(props) {
|
|
|
39
39
|
return false;
|
|
40
40
|
});
|
|
41
41
|
if (questsQuery.isLoading) {
|
|
42
|
-
return (_jsxs("div", { style: props.style, className: props.className, children: [_jsx("h2", { className: "mb-3 text-lg
|
|
42
|
+
return (_jsxs("div", { style: props.style, className: props.className, children: [_jsx("h2", { className: "mb-3 font-semibold text-lg", children: props.heading ?? 'Quests' }), _jsx(SpinnerIcon, { className: "mx-auto size-5 h-[50vh]" })] }));
|
|
43
43
|
}
|
|
44
44
|
if (!questsQuery.data?.length) {
|
|
45
|
-
return (_jsxs("div", { style: props.style, className: props.className, children: [_jsx("h2", { className: "mb-3 text-lg
|
|
45
|
+
return (_jsxs("div", { style: props.style, className: props.className, children: [_jsx("h2", { className: "mb-3 font-semibold text-lg", children: props.heading ?? 'Quests' }), _jsxs("div", { className: "mt-11 flex flex-col items-center justify-center", children: [_jsx(Image, { src: closeChest, width: 100, height: 100, alt: "No Quests Available", className: "mix-blend-luminosity" }), _jsx("div", { className: "mt-4 font-semibold text-base text-text-primary-900", children: props.heading ?? 'Quests' }), _jsx("div", { className: "mt-1 text-center text-sm text-text-tertiary-600", children: "No available quests. Please check back later!" })] })] }));
|
|
46
46
|
}
|
|
47
|
-
return (_jsxs("div", { style: props.style, className: props.className, children: [_jsx("h2", { className: "text-lg
|
|
47
|
+
return (_jsxs("div", { style: props.style, className: props.className, children: [_jsx("h2", { className: "font-semibold text-lg", children: props.heading ?? 'Quests' }), _jsxs(SegmentGroup.Root, { value: tab, onValueChange: (details) => {
|
|
48
48
|
setTab(TabDefinition.catch('AVAILABLE').parse(details.value));
|
|
49
|
-
}, className: "
|
|
49
|
+
}, className: "mt-3 w-full overflow-x-auto lg:mt-4.5 lg:w-fit", children: [_jsxs(SegmentGroup.Item, { value: "AVAILABLE", className: "w-full lg:w-fit", children: [_jsx(SegmentGroup.ItemText, { children: "Available" }), _jsx(SegmentGroup.ItemControl, {}), _jsx(SegmentGroup.ItemHiddenInput, {})] }), _jsxs(SegmentGroup.Item, { value: "COMPLETED", className: "w-full lg:w-fit", children: [_jsx(SegmentGroup.ItemText, { children: "Completed" }), _jsx(SegmentGroup.ItemControl, {}), _jsx(SegmentGroup.ItemHiddenInput, {})] }), _jsxs(SegmentGroup.Item, { value: "FAILED", className: "w-full lg:w-fit", children: [_jsx(SegmentGroup.ItemText, { children: "Failed" }), _jsx(SegmentGroup.ItemControl, {}), _jsx(SegmentGroup.ItemHiddenInput, {})] }), _jsx(SegmentGroup.Indicator, {})] }), _jsx("div", { className: "mt-3xl grid gap-3xl lg:mt-lg lg:grid-cols-3", children: quests.map((quest) => {
|
|
50
50
|
const Quest = QUEST_COMPONENT_MAP[quest.type];
|
|
51
51
|
return (_jsx(QuestContext, { value: quest, children: _jsx(Quest, {}) }, quest.id));
|
|
52
52
|
}) })] }));
|
|
@@ -19,7 +19,7 @@ export function WageringQuest() {
|
|
|
19
19
|
const localeInfo = useLocaleInfo();
|
|
20
20
|
const { progressPercentage, turnover, targetTurnover, name, description, endDateTime, bonus, status, } = quest;
|
|
21
21
|
const remainingTime = useRemainingTime(endDateTime);
|
|
22
|
-
return (_jsxs(_Fragment, { children: [_jsxs("div", { className: "
|
|
22
|
+
return (_jsxs(_Fragment, { children: [_jsxs("div", { className: "flex h-full w-full flex-col space-y-6 rounded-2xl border border-border-primary bg-bg-tertiary px-4 pt-5 pb-6", children: [_jsxs("div", { className: "flex flex-col space-y-2", children: [_jsxs("div", { className: "flex max-h-7.5 items-start justify-between", children: [_jsx(RemainingTime, {}), _jsx("button", { type: "button", className: "flex size-9 cursor-pointer items-center justify-center rounded-md border border-border-secondary bg-bg-primary", onClick: () => disclosure.setOpen(true), "aria-label": "View Rules", children: _jsx(InfoCircleIcon, { className: "size-5 text-text-disabled" }) })] }), _jsx("p", { className: "font-semibold text-xl", children: name }), _jsx("div", { className: "text-wrap font-normal text-sm text-text-secondary-700", dangerouslySetInnerHTML: { __html: description } })] }), _jsxs("div", { className: "flex w-full flex-col space-y-2", children: [_jsxs("div", { className: "group flex items-center justify-between text-text-primary-brand", children: [_jsxs("p", { children: ["Progress ", parseDecimal(progressPercentage, 0).toFixed(2), "%"] }), _jsxs("p", { children: [turnover, _jsxs("span", { className: "text-text-quarterary-brand", children: ["/", targetTurnover, " ", localeInfo.currency.code] })] })] }), _jsx("div", { className: "h-2 w-full overflow-hidden rounded-full bg-bg-primary", children: _jsx("div", { className: "h-full rounded-full bg-utility-brand-600 transition-all duration-300", style: { width: `${progressPercentage}%` } }) })] }), _jsx("div", { className: "flex h-full items-end", children: _jsx("div", { className: "w-full rounded-md border border-bg-primary-hover bg-button-secondary-bg px-3.5 py-2.5 text-center text-white", children: _jsxs("p", { className: twMerge(remainingTime.expired ||
|
|
23
23
|
status === 'COMPLETED' ||
|
|
24
24
|
status === 'FAILED'
|
|
25
25
|
? 'opacity-50 grayscale'
|
|
@@ -32,5 +32,5 @@ function Rules(props) {
|
|
|
32
32
|
defaultValue: props.defaultOpen ?? false,
|
|
33
33
|
onChange: props.onOpenChange,
|
|
34
34
|
});
|
|
35
|
-
return (_jsx(Dialog.Root, { lazyMount: true, unmountOnExit: true, open: open, onOpenChange: (details) => setOpen(details.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
|
|
35
|
+
return (_jsx(Dialog.Root, { lazyMount: true, unmountOnExit: true, open: open, onOpenChange: (details) => setOpen(details.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: "mx-auto min-h-auto max-w-[21.438rem] overflow-y-auto rounded-xl px-4 pt-5 pb-0", children: [_jsx(Dialog.CloseTrigger, { children: _jsx(XIcon, {}) }), _jsxs("div", { className: "flex flex-col space-y-5", children: [_jsx("h2", { className: "font-semibold text-lg text-text-primary-900", children: quest.name }), _jsxs("ol", { className: "group list-disc text-wrap pl-4 font-normal text-sm text-text-tertiary-600", children: [_jsx("li", { children: "Earn extra rewards just by playing Slots, every bet counts, win or lose!" }), _jsx("li", { children: "Reach the wagering requirement in bets to complete the quest and claim your reward." })] })] }), _jsx("div", { className: "pt-6 pb-4", children: _jsx(Button, { onClick: () => setOpen(false), children: "Ok" }) })] }) })] }) }));
|
|
36
36
|
}
|
|
@@ -30,7 +30,7 @@ export function ResponsibleGaming(props) {
|
|
|
30
30
|
globalStore.disclaimer.setOpen(true);
|
|
31
31
|
}
|
|
32
32
|
globalStore.responsibleGaming.setNext(null);
|
|
33
|
-
}, children: _jsxs(Portal, { children: [_jsx(Dialog.Backdrop, { className: "z-popover" }), _jsx(Dialog.Positioner, { className: "z-popover", children: _jsxs(Dialog.Content, { className: twMerge('
|
|
33
|
+
}, children: _jsxs(Portal, { children: [_jsx(Dialog.Backdrop, { className: "z-popover" }), _jsx(Dialog.Positioner, { className: "z-popover", children: _jsxs(Dialog.Content, { className: twMerge('flex h-full w-full flex-col items-start overflow-y-auto p-3xl lg:mx-auto lg:h-auto lg:max-h-[80vh] lg:w-[400px]', 'scrollbar:h-2 scrollbar:w-2 scrollbar-thumb:rounded-full scrollbar-thumb:bg-bg-quaternary scrollbar-track:bg-transparent'), children: [_jsx(Image, { src: props.logo, alt: "", width: 200, height: 100, className: "mx-auto h-auto w-[7.5rem]", draggable: false }), _jsxs("div", { className: "w-full grow", children: [_jsx(Dialog.Title, { className: "mt-3xl text-center font-semibold text-brand-400 text-lg", children: "Responsible Gaming" }), _jsx(Dialog.Description, { className: "mt-xs text-sm leading-2xl", children: props.content }), _jsxs("div", { className: "mt-5 flex items-center justify-center gap-3xl", children: [_jsx(Image, { src: pagcorLogo, alt: "", height: 75, width: 88, className: "h-[5.5rem] w-auto shrink-0", draggable: false }), _jsx(Image, { src: props.responsibleGamingLogo ?? responsibleGamingLogo, alt: "", height: 62, width: 186, className: "h-[3.875rem] w-auto shrink-0", draggable: false })] })] }), _jsx(Dialog.Context, { children: (api) => (_jsx(Button, { type: "button", className: "mt-3 py-2.5", onClick: () => {
|
|
34
34
|
api.setOpen(false);
|
|
35
35
|
}, children: "I Agree" })) })] }) })] }) }));
|
|
36
36
|
}
|