@opexa/portal-components 0.0.451 → 0.0.452
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/components/AccountInfo/GoogleDisconnect.d.ts +7 -0
- package/dist/components/AccountInfo/GoogleDisconnect.js +11 -0
- package/dist/components/DepositWithdrawal/Deposit/OnlineBankDeposit/OnlineBankDepositContext.d.ts +2 -2
- package/dist/components/DepositWithdrawal/Deposit/OnlineBankDeposit/useOnlineBankDeposit.d.ts +1 -1
- package/dist/components/DepositWithdrawal/Deposit/QRPHDeposit/QRPHDepositContext.d.ts +2 -2
- package/dist/components/DepositWithdrawal/Deposit/QRPHDeposit/useQRPHDeposit.d.ts +1 -1
- package/dist/components/DepositWithdrawal/Withdrawal/GCashWithdrawal/GCashWithdrawal.js +91 -83
- package/dist/components/DigitainLauncher/Loading.d.ts +1 -0
- package/dist/components/DigitainLauncher/Loading.js +5 -0
- package/dist/components/Jackpots/JackpotsCarousel/JackpotsCarouselItem.module.css +184 -0
- package/dist/components/Jackpots/JackpotsList/JackpotsListItem.module.css +184 -0
- package/dist/components/KYC/BasicInformation.d.ts +1 -0
- package/dist/components/KYC/BasicInformation.js +101 -0
- package/dist/components/KYC/IdentityVerification.d.ts +1 -0
- package/dist/components/KYC/IdentityVerification.js +120 -0
- package/dist/components/KYC/Indicator.d.ts +1 -0
- package/dist/components/KYC/Indicator.js +8 -0
- package/dist/components/KYC/KYC.lazy.d.ts +6 -0
- package/dist/components/KYC/KYC.lazy.js +45 -0
- package/dist/components/KYC/KYCContext.d.ts +6 -0
- package/dist/components/KYC/KYCContext.js +2 -0
- package/dist/components/KYC/PersonalInformation.d.ts +1 -0
- package/dist/components/KYC/PersonalInformation.js +122 -0
- package/dist/components/KYC/useKYC.d.ts +25 -0
- package/dist/components/KYC/useKYC.js +38 -0
- package/dist/components/PortalProvider/CXDTokenObserver.js +11 -11
- package/dist/components/PortalProvider/LinkGoogleAccountObserver.d.ts +1 -0
- package/dist/components/PortalProvider/LinkGoogleAccountObserver.js +29 -0
- package/dist/components/Quests/JourneyQuest.js +9 -8
- package/dist/components/Quests/MultiWageringQuest.d.ts +1 -0
- package/dist/components/Quests/MultiWageringQuest.js +91 -0
- package/dist/components/Quests/Quests.client.js +7 -1
- package/dist/components/SessionWatcher/SessionWatcher.d.ts +1 -0
- package/dist/components/SessionWatcher/SessionWatcher.js +20 -0
- package/dist/components/SessionWatcher/index.d.ts +1 -0
- package/dist/components/SessionWatcher/index.js +1 -0
- package/dist/icons/LinkBrokenIcon.d.ts +2 -0
- package/dist/icons/LinkBrokenIcon.js +4 -0
- package/dist/images/responsible-gaming-yellow.png +0 -0
- package/dist/services/queries.d.ts +2 -2
- package/dist/services/queries.js +7 -0
- package/dist/styles/theme.css +3 -0
- package/dist/types/index.d.ts +9 -1
- 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/Carousel/Carousel.d.ts +99 -99
- package/dist/ui/Carousel/carousel.recipe.d.ts +11 -11
- package/dist/ui/Checkbox/Checkbox.d.ts +23 -23
- package/dist/ui/Checkbox/checkbox.recipe.d.ts +3 -3
- package/dist/ui/Combobox/Combobox.d.ts +42 -42
- package/dist/ui/Combobox/combobox.recipe.d.ts +3 -3
- package/dist/ui/DatePicker/DatePicker.d.ts +72 -72
- package/dist/ui/DatePicker/datePicker.recipe.d.ts +3 -3
- package/dist/ui/Menu/Menu.d.ts +90 -90
- package/dist/ui/Menu/menu.recipe.d.ts +5 -5
- package/dist/ui/Popover/Popover.d.ts +55 -55
- package/dist/ui/Popover/popover.recipe.d.ts +5 -5
- package/dist/ui/QrCode/QrCode.d.ts +25 -25
- package/dist/ui/QrCode/qrCode.recipe.d.ts +5 -5
- package/dist/ui/SegmentGroup/SegmentGroup.d.ts +18 -18
- package/dist/ui/SegmentGroup/segmentGroup.recipe.d.ts +3 -3
- package/dist/ui/Select/Select.d.ts +45 -45
- package/dist/ui/Select/select.recipe.d.ts +3 -3
- 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/package.json +1 -1
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { useRef, useState } from 'react';
|
|
2
|
+
export function useKYC() {
|
|
3
|
+
const [step, setStep] = useState(2);
|
|
4
|
+
const [done, setDone] = useState(false);
|
|
5
|
+
const [idFrontImageId, setFrontImageId] = useState(null);
|
|
6
|
+
const [selfieImageId, setSelfieImageId] = useState(null);
|
|
7
|
+
const subscribers = useRef([]);
|
|
8
|
+
const subscribe = (subscriber) => {
|
|
9
|
+
subscribers.current.push(subscriber);
|
|
10
|
+
return () => {
|
|
11
|
+
subscribers.current = subscribers.current.filter((item) => item !== subscriber);
|
|
12
|
+
};
|
|
13
|
+
};
|
|
14
|
+
const triggerEvent = (detail) => {
|
|
15
|
+
subscribers.current.forEach((subscriber) => {
|
|
16
|
+
subscriber(detail);
|
|
17
|
+
});
|
|
18
|
+
};
|
|
19
|
+
const reset = () => {
|
|
20
|
+
setStep(1);
|
|
21
|
+
setDone(false);
|
|
22
|
+
setFrontImageId(null);
|
|
23
|
+
setSelfieImageId(null);
|
|
24
|
+
};
|
|
25
|
+
return {
|
|
26
|
+
step,
|
|
27
|
+
setStep,
|
|
28
|
+
done,
|
|
29
|
+
setDone,
|
|
30
|
+
idFrontImageId,
|
|
31
|
+
setFrontImageId,
|
|
32
|
+
selfieImageId,
|
|
33
|
+
setSelfieImageId,
|
|
34
|
+
subscribe,
|
|
35
|
+
triggerEvent,
|
|
36
|
+
reset,
|
|
37
|
+
};
|
|
38
|
+
}
|
|
@@ -1,30 +1,30 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
import { addHours } from 'date-fns';
|
|
3
3
|
import { clamp } from 'lodash-es';
|
|
4
|
+
import { useSearchParams } from 'next/navigation';
|
|
4
5
|
import { useLocalStorage, useTimeout } from 'usehooks-ts';
|
|
5
6
|
import { useAccountQuery } from '../../client/hooks/useAccountQuery.js';
|
|
6
7
|
export function CXDTokenObserver() {
|
|
7
|
-
const
|
|
8
|
-
const
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
const [cxd, setCxd, removeCxd] = useLocalStorage('
|
|
8
|
+
const searchParams = useSearchParams();
|
|
9
|
+
const cxdToken = searchParams.get('cxd');
|
|
10
|
+
const accountQuery = useAccountQuery();
|
|
11
|
+
const account = accountQuery.data;
|
|
12
|
+
const [cxd, setCxd, removeCxd] = useLocalStorage('WebPortalCellxpertCxd', null);
|
|
12
13
|
const now = new Date();
|
|
14
|
+
const shouldTimeoutRun = cxdToken && account;
|
|
13
15
|
const removeCxdUntilInMs = cxd?.timestamp
|
|
14
16
|
? clamp(cxd.timestamp - now.getTime(), 0, Infinity)
|
|
15
17
|
: 0;
|
|
16
18
|
useTimeout(() => {
|
|
17
|
-
const isSame = cxd?.cxd ===
|
|
19
|
+
const isSame = cxd?.cxd === cxdToken;
|
|
18
20
|
if (!isSame) {
|
|
19
21
|
const extendedTimestamp = addHours(new Date(), 6).getTime();
|
|
20
22
|
setCxd({
|
|
21
|
-
cxd:
|
|
23
|
+
cxd: cxdToken,
|
|
22
24
|
timestamp: extendedTimestamp,
|
|
23
25
|
});
|
|
24
26
|
}
|
|
25
|
-
},
|
|
26
|
-
useTimeout(() =>
|
|
27
|
-
removeCxd();
|
|
28
|
-
}, account ? removeCxdUntilInMs : null);
|
|
27
|
+
}, shouldTimeoutRun ? 100 : null);
|
|
28
|
+
useTimeout(() => removeCxd(), shouldTimeoutRun ? removeCxdUntilInMs : null);
|
|
29
29
|
return null;
|
|
30
30
|
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function LinkGoogleAccountObserver(): null;
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
import { useSearchParams } from 'next/navigation';
|
|
3
|
+
import { useTimeout } from 'usehooks-ts';
|
|
4
|
+
import { toaster } from '../../client/utils/toaster.js';
|
|
5
|
+
import { getQueryClient } from '../../utils/getQueryClient.js';
|
|
6
|
+
import { getSessionQueryKey } from '../../utils/queryKeys.js';
|
|
7
|
+
export function LinkGoogleAccountObserver() {
|
|
8
|
+
const searchParams = useSearchParams();
|
|
9
|
+
const code = searchParams.get('message') ?? searchParams.get('status');
|
|
10
|
+
const queryClient = getQueryClient();
|
|
11
|
+
useTimeout(() => {
|
|
12
|
+
if (code === 'duplicate') {
|
|
13
|
+
return toaster.error({
|
|
14
|
+
title: 'Duplicate Account',
|
|
15
|
+
description: 'An account with this email already exists. Please try signing in instead.',
|
|
16
|
+
});
|
|
17
|
+
}
|
|
18
|
+
if (code === 'linked') {
|
|
19
|
+
queryClient.invalidateQueries({
|
|
20
|
+
queryKey: getSessionQueryKey(),
|
|
21
|
+
});
|
|
22
|
+
return toaster.success({
|
|
23
|
+
title: 'Google Account Linked Successfully',
|
|
24
|
+
description: 'Your Google account has been successfully connected.',
|
|
25
|
+
});
|
|
26
|
+
}
|
|
27
|
+
}, code ? 100 : null);
|
|
28
|
+
return null;
|
|
29
|
+
}
|
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
2
|
+
import dynamic from 'next/dynamic';
|
|
2
3
|
import { useCallback, useMemo } from 'react';
|
|
3
4
|
import { useShallow } from 'zustand/react/shallow';
|
|
4
5
|
import { useControllableState } from '../../client/hooks/useControllableState.js';
|
|
5
6
|
import { useDisclosure } from '../../client/hooks/useDisclosure.js';
|
|
7
|
+
import { useFeatureFlag } from '../../client/hooks/useFeatureFlag.js';
|
|
6
8
|
import { useGlobalStore } from '../../client/hooks/useGlobalStore.js';
|
|
7
9
|
import { useLocaleInfo } from '../../client/hooks/useLocaleInfo.js';
|
|
8
10
|
import { CheckIcon } from '../../icons/CheckIcon.js';
|
|
@@ -18,11 +20,9 @@ import { Progress } from '../../ui/Progress/index.js';
|
|
|
18
20
|
import { Prose } from '../../ui/Prose/index.js';
|
|
19
21
|
import { formatNumber } from '../../utils/formatNumber.js';
|
|
20
22
|
import { getPercentage } from '../../utils/getPercentage.js';
|
|
23
|
+
import { FacebookSignInTrigger } from '../SignIn/FacebookSignInTrigger.js';
|
|
21
24
|
import { useQuestContext } from './QuestsContext.js';
|
|
22
25
|
import { RemainingTime } from './RemainingTime.js';
|
|
23
|
-
import { useFeatureFlag } from '../../client/hooks/useFeatureFlag.js';
|
|
24
|
-
import { FacebookSignInTrigger } from '../SignIn/FacebookSignInTrigger.js';
|
|
25
|
-
import dynamic from 'next/dynamic';
|
|
26
26
|
const GoogleSignInButton = dynamic(() => import('../SignIn/GoogleSignInTrigger.js').then((m) => m.GoogleSignInTrigger), {
|
|
27
27
|
ssr: false,
|
|
28
28
|
loading: () => null,
|
|
@@ -42,7 +42,8 @@ export function JourneyQuest() {
|
|
|
42
42
|
}
|
|
43
43
|
const filteredMilestones = quest.milestones.filter((milestone) => {
|
|
44
44
|
if (!featureFlag.enabled) {
|
|
45
|
-
return milestone.type !== 'LINK_FACEBOOK_ACCOUNT' &&
|
|
45
|
+
return (milestone.type !== 'LINK_FACEBOOK_ACCOUNT' &&
|
|
46
|
+
milestone.type !== 'LINK_GOOGLE_ACCOUNT');
|
|
46
47
|
}
|
|
47
48
|
return true;
|
|
48
49
|
});
|
|
@@ -66,7 +67,7 @@ export function JourneyQuest() {
|
|
|
66
67
|
? parseFloat(quest.progressPercentage)
|
|
67
68
|
: getPercentage(completedCount, total),
|
|
68
69
|
};
|
|
69
|
-
}, [quest]);
|
|
70
|
+
}, [quest, featureFlag]);
|
|
70
71
|
const progressValue = useMemo(() => {
|
|
71
72
|
return (progressPercentage || getPercentage(currentMilestone, totalMilestones));
|
|
72
73
|
}, [progressPercentage, currentMilestone, totalMilestones]);
|
|
@@ -99,7 +100,7 @@ function Rules(props) {
|
|
|
99
100
|
return false;
|
|
100
101
|
return milestones.every((milestone) => milestone.isCompleted);
|
|
101
102
|
}, [milestones]);
|
|
102
|
-
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
|
|
103
|
+
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 mt-40 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 ||
|
|
103
104
|
'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: {
|
|
104
105
|
__html: milestone.description,
|
|
105
106
|
} })) : milestone.bonus ? (_jsxs("p", { className: "ml-1", children: [milestone.key === 'REGISTRATION' &&
|
|
@@ -122,8 +123,8 @@ function Rules(props) {
|
|
|
122
123
|
}, "aria-label": `Complete ${milestone.label}`, children: [milestone.key === 'ACCOUNT_VERIFICATION' ? (_jsx(FileCheck02Icon, { className: "size-5" })) : (_jsx(CoinsHandIcon, { className: "size-5" })), milestone.key === 'FIRST_DEPOSIT'
|
|
123
124
|
? 'Deposit'
|
|
124
125
|
: 'Verify Account'] })), !milestone.isCompleted &&
|
|
125
|
-
milestone.key === 'LINK_FACEBOOK_ACCOUNT' && (_jsx(FacebookSignInTrigger, { text:
|
|
126
|
-
milestone.key === 'LINK_GOOGLE_ACCOUNT' && (_jsx(GoogleSignInButton, { text:
|
|
126
|
+
milestone.key === 'LINK_FACEBOOK_ACCOUNT' && (_jsx(FacebookSignInTrigger, { text: "Link Facebook Account", className: "flex h-10 w-full items-center justify-center gap-md rounded-md bg-button-primary-bg px-3 font-semibold text-button-primary-fg text-sm shadow-xs disabled:opacity-60 disabled:shadow-none aria-disabled:cursor-not-allowed aria-disabled:opacity-60 aria-disabled:shadow-none" })), !milestone.isCompleted &&
|
|
127
|
+
milestone.key === 'LINK_GOOGLE_ACCOUNT' && (_jsx(GoogleSignInButton, { text: "Link Google Account", className: "flex h-10 w-full items-center justify-center gap-md rounded-md bg-button-primary-bg px-3 font-semibold text-button-primary-fg text-sm shadow-xs disabled:opacity-60 disabled:shadow-none aria-disabled:cursor-not-allowed aria-disabled:opacity-60 aria-disabled:shadow-none" }))] }, 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!"] }) })) }))] })] }) })] }) }));
|
|
127
128
|
}
|
|
128
129
|
function QuestMilestone({ label, bonus, isCompleted = false, }) {
|
|
129
130
|
const localeInfo = useLocaleInfo();
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function MultiWageringQuest(): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
2
|
+
import { useCallback, useMemo } from 'react';
|
|
3
|
+
import { useControllableState } from '../../client/hooks/useControllableState.js';
|
|
4
|
+
import { useDisclosure } from '../../client/hooks/useDisclosure.js';
|
|
5
|
+
import { useLocaleInfo } from '../../client/hooks/useLocaleInfo.js';
|
|
6
|
+
import { Lock01Icon } from '../../icons/Lock01Icon.js';
|
|
7
|
+
import { XIcon } from '../../icons/XIcon.js';
|
|
8
|
+
import { Badge } from '../../ui/Badge/index.js';
|
|
9
|
+
import { Button } from '../../ui/Button/index.js';
|
|
10
|
+
import { Dialog } from '../../ui/Dialog/index.js';
|
|
11
|
+
import { Portal } from '../../ui/Portal/index.js';
|
|
12
|
+
import { Progress } from '../../ui/Progress/index.js';
|
|
13
|
+
import { formatNumber } from '../../utils/formatNumber.js';
|
|
14
|
+
import { useQuestContext } from './QuestsContext.js';
|
|
15
|
+
import { RemainingTime } from './RemainingTime.js';
|
|
16
|
+
export function MultiWageringQuest() {
|
|
17
|
+
const disclosure = useDisclosure();
|
|
18
|
+
const quest = useQuestContext();
|
|
19
|
+
const { stages, totalStage, currentStage, progressPercentage } = useMemo(() => {
|
|
20
|
+
const currentStage = quest.stages.filter((m) => m.cleared).length;
|
|
21
|
+
if (!quest?.stages) {
|
|
22
|
+
return {
|
|
23
|
+
stages: [],
|
|
24
|
+
totalStage: 0,
|
|
25
|
+
currentStage: 0,
|
|
26
|
+
progressPercentage: 0,
|
|
27
|
+
};
|
|
28
|
+
}
|
|
29
|
+
const transformedStages = quest.stages.map((stage) => ({
|
|
30
|
+
bonusAmount: stage.bonusAmount,
|
|
31
|
+
bonusTurnoverRequirementMultiplier: stage.bonusTurnoverRequirementMultiplier,
|
|
32
|
+
cleared: stage.cleared,
|
|
33
|
+
dateTimeCleared: stage.dateTimeCleared,
|
|
34
|
+
targetTurnover: stage.targetTurnover,
|
|
35
|
+
}));
|
|
36
|
+
const total = quest.stages.length;
|
|
37
|
+
return {
|
|
38
|
+
stages: transformedStages,
|
|
39
|
+
totalStage: total,
|
|
40
|
+
currentStage: currentStage === 0 ? 1 : currentStage,
|
|
41
|
+
progressPercentage: +quest.progressPercentage,
|
|
42
|
+
};
|
|
43
|
+
}, [quest]);
|
|
44
|
+
const handleViewDetails = useCallback(() => {
|
|
45
|
+
disclosure.setOpen(true);
|
|
46
|
+
}, [disclosure]);
|
|
47
|
+
const localeInfo = useLocaleInfo();
|
|
48
|
+
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-center justify-between", children: [_jsx(RemainingTime, { endOfDay: true }), quest.status === 'COMPLETED' && (_jsx(Badge.Root, { colorScheme: "success", size: "lg", round: false, children: _jsxs(Badge.Label, { children: ["Final Bonus:", ' ', formatNumber(quest.bonus, {
|
|
49
|
+
currency: localeInfo.currency.code,
|
|
50
|
+
})] }) }))] }), _jsx("p", { className: "font-semibold text-xl", children: quest?.name || 'Journey Quest' }), _jsx("div", { className: "text-sm", dangerouslySetInnerHTML: {
|
|
51
|
+
__html: quest?.description ||
|
|
52
|
+
'Ready for a challenge? Complete them all and get amazing rewards!',
|
|
53
|
+
} }), _jsxs("div", { className: "flex items-center justify-between pt-5", children: [_jsxs("p", { className: "text-sm", children: ["Progress: ", quest.progressPercentage, "%"] }), _jsxs("p", { className: "text-sm", children: [quest.turnover, _jsxs("span", { className: "text-[#667085]", children: ["/", quest.targetTurnover, " PHP"] })] })] }), _jsx(Progress.Root, { max: 100, className: "h-2 rounded-full bg-bg-primary", value: progressPercentage, children: _jsx(Progress.Track, { children: _jsx(Progress.Range, { className: "bg-utility-brand-600" }) }) }), _jsxs("div", { className: "flex items-center justify-between", children: [_jsxs("p", { className: "text-sm text-text-quarterary-brand", children: ["Stage ", currentStage, " of ", totalStage] }), _jsx(Badge.Root, { size: "lg", colorScheme: "brand", round: false, children: _jsxs(Badge.Label, { className: "flex items-center justify-center text-xs", children: [_jsx("p", { className: "flex h-[10px] items-center justify-center", children: "+" }), ' ', formatNumber(quest.stages?.reduce((curr, prev) => {
|
|
54
|
+
return curr + Number(prev.bonusAmount || 0);
|
|
55
|
+
}, 0), {
|
|
56
|
+
currency: localeInfo.currency.code,
|
|
57
|
+
maxDecimalPlaces: 0,
|
|
58
|
+
minDecimalPlaces: 0,
|
|
59
|
+
}), ' ', "Bonus"] }) })] })] }), _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(Stages, { open: disclosure.open, onOpenChange: disclosure.setOpen, quest: quest, stages: stages })] }));
|
|
60
|
+
}
|
|
61
|
+
function Stages(props) {
|
|
62
|
+
const [open, setOpen] = useControllableState({
|
|
63
|
+
value: props.open,
|
|
64
|
+
defaultValue: props.defaultOpen ?? false,
|
|
65
|
+
onChange: props.onOpenChange,
|
|
66
|
+
});
|
|
67
|
+
const currentStage = useMemo(() => {
|
|
68
|
+
const stage = props?.stages?.findLastIndex((stage) => stage.cleared) ?? 0;
|
|
69
|
+
return stage !== -1 ? stage + 1 : 1;
|
|
70
|
+
}, [props.stages]);
|
|
71
|
+
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 mt-40 min-h-auto min-w-[23rem] max-w-[25rem] 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: props.quest?.name || 'Quest' }), _jsx("div", { dangerouslySetInnerHTML: {
|
|
72
|
+
__html: props.quest?.description ||
|
|
73
|
+
'Ready for a challenge? Complete them all and get amazing rewards!',
|
|
74
|
+
} }), _jsx("div", { className: "flex w-full flex-col space-y-3", children: props.stages.map((stage, idx) => {
|
|
75
|
+
if (currentStage >= idx + 1) {
|
|
76
|
+
return (_jsx(QuestWageringStageUnlocked, { data: stage, bonus: stage.bonusAmount, stage: idx, isCompleted: stage.cleared }, idx));
|
|
77
|
+
}
|
|
78
|
+
else {
|
|
79
|
+
return _jsx(QuestWageringStageLocked, { stage: idx }, idx);
|
|
80
|
+
}
|
|
81
|
+
}) }), _jsx(Button, { size: "sm", onClick: () => setOpen(false), "aria-label": "Close", className: "w-full", children: "Close" })] })] }) })] }) }));
|
|
82
|
+
}
|
|
83
|
+
function QuestWageringStageUnlocked({ bonus, stage, data, isCompleted = false, }) {
|
|
84
|
+
const localeInfo = useLocaleInfo();
|
|
85
|
+
return (_jsxs("div", { className: "mb-4 flex flex-col justify-between rounded-xl bg-bg-secondary p-3", children: [_jsxs("div", { className: "flex items-center justify-between", children: [_jsxs("p", { className: "font-medium", children: ["Stage ", stage + 1] }), _jsx(Badge.Root, { colorScheme: isCompleted ? 'success' : 'blue', size: "md", round: true, children: _jsx(Badge.Label, { children: data.cleared ? 'Completed' : 'Ongoing' }) })] }), _jsxs("div", { className: "mt-2.5 flex items-center justify-between", children: [_jsxs("p", { children: ["Progress ", data.cleared ? 100 : 0, "%"] }), _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, {
|
|
86
|
+
currency: localeInfo.currency.code,
|
|
87
|
+
}), ' ', "Bonus"] }) })] }), _jsx(Progress.Root, { max: 100, className: "mt-2 h-2 rounded-full bg-bg-primary", value: data.cleared ? 100 : 0, children: _jsx(Progress.Track, { children: _jsx(Progress.Range, { className: "bg-utility-brand-600" }) }) })] }));
|
|
88
|
+
}
|
|
89
|
+
function QuestWageringStageLocked({ stage }) {
|
|
90
|
+
return (_jsxs("div", { className: "mb-4 flex items-center justify-between rounded-xl bg-bg-secondary p-3", children: [_jsxs("p", { className: "font-medium", children: ["Stage ", stage + 1] }), _jsx("div", { className: "flex items-center justify-center rounded-full border border-border-lock bg-bg-lock p-1", children: _jsx(Lock01Icon, { className: "size-3 stroke-3 font-medium text-text-lock" }) })] }));
|
|
91
|
+
}
|
|
@@ -6,11 +6,13 @@ import { useState, } from 'react';
|
|
|
6
6
|
import { twMerge } from 'tailwind-merge';
|
|
7
7
|
import { z } from 'zod';
|
|
8
8
|
import { useAvailableQuestsQuery } from '../../client/hooks/useAvailableQuestsQuery.js';
|
|
9
|
+
import { useFeatureFlag } from '../../client/hooks/useFeatureFlag.js';
|
|
9
10
|
import { SpinnerIcon } from '../../icons/SpinnerIcon.js';
|
|
10
11
|
import closeChest from '../../images/close-chest.png';
|
|
11
12
|
import { SegmentGroup } from '../../ui/SegmentGroup/index.js';
|
|
12
13
|
import { DailyCheckInQuest, } from './DailyCheckInQuest.js';
|
|
13
14
|
import { JourneyQuest } from './JourneyQuest.js';
|
|
15
|
+
import { MultiWageringQuest } from './MultiWageringQuest.js';
|
|
14
16
|
import { OnboardingQuest } from './OnboardingQuest.js';
|
|
15
17
|
import { QuestContext } from './QuestsContext.js';
|
|
16
18
|
import { WageringQuest, } from './WageringQuest.js';
|
|
@@ -19,12 +21,14 @@ const QUEST_COMPONENT_MAP = {
|
|
|
19
21
|
ONBOARDING: OnboardingQuest,
|
|
20
22
|
WAGERING: WageringQuest,
|
|
21
23
|
JOURNEY: JourneyQuest,
|
|
24
|
+
MULTI_WAGERING: MultiWageringQuest,
|
|
22
25
|
};
|
|
23
26
|
const TabDefinition = z.enum(['AVAILABLE', 'COMPLETED', 'FAILED']);
|
|
24
27
|
export function Quests__client(props) {
|
|
25
28
|
const { className, style, heading } = props;
|
|
26
29
|
const classNames = isString(className) ? { root: className } : className;
|
|
27
30
|
const [tab, setTab] = useState('AVAILABLE');
|
|
31
|
+
const featureFlag = useFeatureFlag();
|
|
28
32
|
const questsQuery = useAvailableQuestsQuery({
|
|
29
33
|
refetchInterval: 7500,
|
|
30
34
|
});
|
|
@@ -51,7 +55,9 @@ export function Quests__client(props) {
|
|
|
51
55
|
return (_jsxs("div", { style: style, className: twMerge(classNames?.root), children: [_jsx("h2", { className: "font-semibold text-lg", children: heading ?? 'Quests' }), _jsxs(SegmentGroup.Root, { value: tab, onValueChange: (details) => {
|
|
52
56
|
setTab(TabDefinition.catch('AVAILABLE').parse(details.value));
|
|
53
57
|
}, 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) => {
|
|
54
|
-
const Quest =
|
|
58
|
+
const Quest = quest.stages?.length && featureFlag.enabled
|
|
59
|
+
? QUEST_COMPONENT_MAP['MULTI_WAGERING']
|
|
60
|
+
: QUEST_COMPONENT_MAP[quest.type];
|
|
55
61
|
return (_jsx(QuestContext, { value: quest, children: _jsx(Quest, { className: quest.type === 'WAGERING'
|
|
56
62
|
? classNames?.wageringQuest
|
|
57
63
|
: quest.type === 'DAILY_CHECKIN'
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function SessionWatcher(): null;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
import { useRouter } from 'next/navigation';
|
|
3
|
+
import { useCallback, useEffect } from 'react';
|
|
4
|
+
import { useSessionHealthQuery } from '../../client/hooks/useSessionHealthQuery.js';
|
|
5
|
+
import { useSignOutMutation } from '../../client/hooks/useSignOutMutation.js';
|
|
6
|
+
export function SessionWatcher() {
|
|
7
|
+
const router = useRouter();
|
|
8
|
+
const query = useSessionHealthQuery({ refetchInterval: 1000 * 5 });
|
|
9
|
+
const healthy = query.data ?? true;
|
|
10
|
+
const mutation = useSignOutMutation();
|
|
11
|
+
const signOut = useCallback(async () => {
|
|
12
|
+
await mutation.mutateAsync();
|
|
13
|
+
router.refresh();
|
|
14
|
+
}, [mutation, router]);
|
|
15
|
+
useEffect(() => {
|
|
16
|
+
if (!healthy)
|
|
17
|
+
signOut();
|
|
18
|
+
}, [healthy, signOut]);
|
|
19
|
+
return null;
|
|
20
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './SessionWatcher';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './SessionWatcher.js';
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
export function LinkBrokenIcon(props) {
|
|
3
|
+
return (_jsx("svg", { xmlns: "http://www.w3.org/2000/svg", width: "24", height: "24", viewBox: "0 0 24 24", fill: "none", ...props, children: _jsx("path", { d: "M8.5 15.5L15.5 8.49998M9 4V2M15 20V22M4 9H2M20 15H22M4.91421 4.91421L3.5 3.5M19.0858 19.0857L20.5 20.4999M12 17.6568L9.87871 19.7781C8.31662 21.3402 5.78396 21.3402 4.22186 19.7781C2.65976 18.216 2.65976 15.6833 4.22186 14.1212L6.34318 11.9999M17.6569 11.9999L19.7782 9.87859C21.3403 8.31649 21.3403 5.78383 19.7782 4.22174C18.2161 2.65964 15.6835 2.65964 14.1214 4.22174L12 6.34306", stroke: "#FEDF89", "stroke-width": "2", "stroke-linecap": "round", "stroke-linejoin": "round" }) }));
|
|
4
|
+
}
|
|
Binary file
|
|
@@ -110,10 +110,10 @@ export declare const COMPLETE_ONBOARDING = "\n mutation CompleteOnboarding($inp
|
|
|
110
110
|
export declare const SKIP_ONBOARDING = "\n mutation SkipOnboarding {\n skipOnboarding\n }\n";
|
|
111
111
|
export declare const QUEST_PROGRAM_FRAGMENT = "\n fragment QuestProgramFragment on QuestProgram {\n status\n type\n name\n description\n }\n";
|
|
112
112
|
export declare const DAILY_CHECKIN_FRAGMENT = "\n \n fragment QuestProgramFragment on QuestProgram {\n status\n type\n name\n description\n }\n\n fragment DailyCheckinQuestFragment on DailyCheckInQuest {\n id\n name\n description\n type\n program {\n ...QuestProgramFragment\n }\n\n status\n progressPercentage\n turnover\n endDateTime\n dateTimeCreated\n lastCheckInDate\n startDateTime\n checkInStreak\n\n thirdDayBonusAmount\n seventhDayBonusAmount\n sixthDayBonusAmount\n }\n";
|
|
113
|
-
export declare const WAGERING_FRAGMENT = "\n fragment WageringQuestFragment on WageringQuest {\n bonus\n id\n name\n type\n description\n program {\n ...QuestProgramFragment\n }\n\n status\n progressPercentage\n turnover\n targetTurnover\n endDateTime\n dateTimeCreated\n }\n";
|
|
113
|
+
export declare const WAGERING_FRAGMENT = "\n fragment WageringQuestFragment on WageringQuest {\n bonus\n id\n name\n type\n description\n program {\n ...QuestProgramFragment\n }\n\n status\n progressPercentage\n turnover\n targetTurnover\n endDateTime\n dateTimeCreated\n stages{\n targetTurnover\n bonusTurnoverRequirementMultiplier\n bonusAmount\n cleared\n dateTimeCleared\n }\n }\n";
|
|
114
114
|
export declare const JOURNEY_FRAGMENT = "\n fragment JourneyQuestFragment on JourneyQuest {\n id\n name\n description\n program {\n ...QuestProgramFragment\n }\n status\n type\n progressPercentage\n bonus\n bonusAwarded\n dateTimeCreated\n endDateTime\n milestones {\n id\n type\n name\n bonusAmount\n cleared\n description\n }\n }\n";
|
|
115
115
|
export declare const ONBOARDING_QUEST_FRAGMENT = "\n fragment OnboardingQuestFragment on OnboardingQuest {\n id\n name\n description\n program {\n ...QuestProgramFragment\n }\n\n status\n type\n progressPercentage\n bonus\n endDateTime\n dateTimeCreated\n firstDepositCompleted\n accountVerificationCompleted\n }\n";
|
|
116
|
-
export declare const AVAILABLE_QUESTS = "\n \n fragment WageringQuestFragment on WageringQuest {\n bonus\n id\n name\n type\n description\n program {\n ...QuestProgramFragment\n }\n\n status\n progressPercentage\n turnover\n targetTurnover\n endDateTime\n dateTimeCreated\n }\n\n \n \n fragment QuestProgramFragment on QuestProgram {\n status\n type\n name\n description\n }\n\n fragment DailyCheckinQuestFragment on DailyCheckInQuest {\n id\n name\n description\n type\n program {\n ...QuestProgramFragment\n }\n\n status\n progressPercentage\n turnover\n endDateTime\n dateTimeCreated\n lastCheckInDate\n startDateTime\n checkInStreak\n\n thirdDayBonusAmount\n seventhDayBonusAmount\n sixthDayBonusAmount\n }\n\n \n fragment OnboardingQuestFragment on OnboardingQuest {\n id\n name\n description\n program {\n ...QuestProgramFragment\n }\n\n status\n type\n progressPercentage\n bonus\n endDateTime\n dateTimeCreated\n firstDepositCompleted\n accountVerificationCompleted\n }\n\n \n fragment JourneyQuestFragment on JourneyQuest {\n id\n name\n description\n program {\n ...QuestProgramFragment\n }\n status\n type\n progressPercentage\n bonus\n bonusAwarded\n dateTimeCreated\n endDateTime\n milestones {\n id\n type\n name\n bonusAmount\n cleared\n description\n }\n }\n\n\n query AvailableQuests {\n availableQuests {\n ... on Quest {\n ... on WageringQuest {\n ...WageringQuestFragment\n }\n ... on DailyCheckInQuest {\n ...DailyCheckinQuestFragment\n }\n ... on OnboardingQuest {\n ...OnboardingQuestFragment\n }\n ... on JourneyQuest {\n ...JourneyQuestFragment\n }\n }\n }\n }\n";
|
|
116
|
+
export declare const AVAILABLE_QUESTS = "\n \n fragment WageringQuestFragment on WageringQuest {\n bonus\n id\n name\n type\n description\n program {\n ...QuestProgramFragment\n }\n\n status\n progressPercentage\n turnover\n targetTurnover\n endDateTime\n dateTimeCreated\n stages{\n targetTurnover\n bonusTurnoverRequirementMultiplier\n bonusAmount\n cleared\n dateTimeCleared\n }\n }\n\n \n \n fragment QuestProgramFragment on QuestProgram {\n status\n type\n name\n description\n }\n\n fragment DailyCheckinQuestFragment on DailyCheckInQuest {\n id\n name\n description\n type\n program {\n ...QuestProgramFragment\n }\n\n status\n progressPercentage\n turnover\n endDateTime\n dateTimeCreated\n lastCheckInDate\n startDateTime\n checkInStreak\n\n thirdDayBonusAmount\n seventhDayBonusAmount\n sixthDayBonusAmount\n }\n\n \n fragment OnboardingQuestFragment on OnboardingQuest {\n id\n name\n description\n program {\n ...QuestProgramFragment\n }\n\n status\n type\n progressPercentage\n bonus\n endDateTime\n dateTimeCreated\n firstDepositCompleted\n accountVerificationCompleted\n }\n\n \n fragment JourneyQuestFragment on JourneyQuest {\n id\n name\n description\n program {\n ...QuestProgramFragment\n }\n status\n type\n progressPercentage\n bonus\n bonusAwarded\n dateTimeCreated\n endDateTime\n milestones {\n id\n type\n name\n bonusAmount\n cleared\n description\n }\n }\n\n\n query AvailableQuests {\n availableQuests {\n ... on Quest {\n ... on WageringQuest {\n ...WageringQuestFragment\n }\n ... on DailyCheckInQuest {\n ...DailyCheckinQuestFragment\n }\n ... on OnboardingQuest {\n ...OnboardingQuestFragment\n }\n ... on JourneyQuest {\n ...JourneyQuestFragment\n }\n }\n }\n }\n";
|
|
117
117
|
export declare const AVAILABLE_QUEST_IDS = "\n query AvailableQuestIds {\n availableQuests {\n ... on Node {\n id\n }\n }\n }\n";
|
|
118
118
|
export declare const CHECK_IN_DAILY_QUEST = "\n mutation checkInDailyCheckInQuest($input: CheckInDailyCheckInQuestInput!) {\n checkInDailyCheckInQuest(input: $input)\n }\n";
|
|
119
119
|
export declare const TOP_WINS = "\n query TopWins($first: Int) {\n topWins(first: $first) {\n id\n game {\n id\n name\n type\n provider\n }\n member {\n id\n name\n }\n multiplier\n payout\n }\n }\n";
|
package/dist/services/queries.js
CHANGED
|
@@ -2422,6 +2422,13 @@ export const WAGERING_FRAGMENT = /* GraphQL */ `
|
|
|
2422
2422
|
targetTurnover
|
|
2423
2423
|
endDateTime
|
|
2424
2424
|
dateTimeCreated
|
|
2425
|
+
stages{
|
|
2426
|
+
targetTurnover
|
|
2427
|
+
bonusTurnoverRequirementMultiplier
|
|
2428
|
+
bonusAmount
|
|
2429
|
+
cleared
|
|
2430
|
+
dateTimeCleared
|
|
2431
|
+
}
|
|
2425
2432
|
}
|
|
2426
2433
|
`;
|
|
2427
2434
|
export const JOURNEY_FRAGMENT = /* GraphQL */ `
|
package/dist/styles/theme.css
CHANGED
|
@@ -274,6 +274,9 @@
|
|
|
274
274
|
|
|
275
275
|
--color-border-checkbox-primary: #373a41;
|
|
276
276
|
--color-bg-progress-bar-primary: var(--color-bg-primary);
|
|
277
|
+
--color-bg-lock: #161B26;
|
|
278
|
+
--color-border-lock: #333741;
|
|
279
|
+
--color-text-lock: #85888E;
|
|
277
280
|
|
|
278
281
|
|
|
279
282
|
--font-sans: var(--font-sans);
|
package/dist/types/index.d.ts
CHANGED
|
@@ -693,7 +693,7 @@ export interface Message {
|
|
|
693
693
|
}
|
|
694
694
|
export type OnboardingStatus = 'PENDING' | 'SKIPPED' | 'COMPLETED';
|
|
695
695
|
export type OnboardingPlayerExperience = 'ROOKIE' | 'VETERAN';
|
|
696
|
-
export type QuestType = 'WAGERING' | 'DAILY_CHECKIN' | 'ONBOARDING' | 'JOURNEY';
|
|
696
|
+
export type QuestType = 'WAGERING' | 'DAILY_CHECKIN' | 'ONBOARDING' | 'JOURNEY' | 'MULTI_WAGERING';
|
|
697
697
|
export type QuestStatus = 'IN_PROGRESS' | 'COMPLETED' | 'FAILED';
|
|
698
698
|
export type QuestProgramStatus = 'ACTIVE' | 'INACTIVE' | 'DELETED';
|
|
699
699
|
export interface QuestProgram {
|
|
@@ -712,6 +712,13 @@ export interface JourneyQuestMilestone {
|
|
|
712
712
|
cleared: boolean;
|
|
713
713
|
description: string;
|
|
714
714
|
}
|
|
715
|
+
export interface WageringQuestStage {
|
|
716
|
+
targetTurnover: string;
|
|
717
|
+
bonusTurnoverRequirementMultiplier: number;
|
|
718
|
+
bonusAmount: number;
|
|
719
|
+
cleared: boolean;
|
|
720
|
+
dateTimeCleared: Date;
|
|
721
|
+
}
|
|
715
722
|
export interface Quest {
|
|
716
723
|
id: string;
|
|
717
724
|
name: string;
|
|
@@ -736,6 +743,7 @@ export interface Quest {
|
|
|
736
743
|
firstDepositCompleted?: boolean;
|
|
737
744
|
accountVerificationCompleted?: boolean;
|
|
738
745
|
milestones?: JourneyQuestMilestone[];
|
|
746
|
+
stages?: WageringQuestStage[];
|
|
739
747
|
}
|
|
740
748
|
interface TopWinGame {
|
|
741
749
|
id: string;
|
package/dist/ui/Badge/Badge.d.ts
CHANGED
|
@@ -37,7 +37,7 @@ export declare const Root: import("react").ComponentType<import("@ark-ui/react")
|
|
|
37
37
|
root: string;
|
|
38
38
|
};
|
|
39
39
|
};
|
|
40
|
-
}, Record<"label" | "root" | "
|
|
40
|
+
}, Record<"label" | "root" | "indicator" | "icon", string | string[]>, undefined, {
|
|
41
41
|
size: {
|
|
42
42
|
md: {
|
|
43
43
|
root: string;
|
|
@@ -72,7 +72,7 @@ export declare const Root: import("react").ComponentType<import("@ark-ui/react")
|
|
|
72
72
|
root: string;
|
|
73
73
|
};
|
|
74
74
|
};
|
|
75
|
-
}, Record<"label" | "root" | "
|
|
75
|
+
}, Record<"label" | "root" | "indicator" | "icon", string | string[]>, import("tailwind-variants").TVReturnType<{
|
|
76
76
|
size: {
|
|
77
77
|
md: {
|
|
78
78
|
root: string;
|
|
@@ -107,7 +107,7 @@ export declare const Root: import("react").ComponentType<import("@ark-ui/react")
|
|
|
107
107
|
root: string;
|
|
108
108
|
};
|
|
109
109
|
};
|
|
110
|
-
}, Record<"label" | "root" | "
|
|
110
|
+
}, Record<"label" | "root" | "indicator" | "icon", string | string[]>, undefined, unknown, unknown, undefined>>>>>;
|
|
111
111
|
interface BadgeLabelProps extends ComponentPropsWithRef<'span'> {
|
|
112
112
|
asChild?: boolean;
|
|
113
113
|
}
|
|
@@ -146,7 +146,7 @@ export declare const Label: import("react").ComponentType<import("@ark-ui/react"
|
|
|
146
146
|
root: string;
|
|
147
147
|
};
|
|
148
148
|
};
|
|
149
|
-
}, Record<"label" | "root" | "
|
|
149
|
+
}, Record<"label" | "root" | "indicator" | "icon", string | string[]>, undefined, {
|
|
150
150
|
size: {
|
|
151
151
|
md: {
|
|
152
152
|
root: string;
|
|
@@ -181,7 +181,7 @@ export declare const Label: import("react").ComponentType<import("@ark-ui/react"
|
|
|
181
181
|
root: string;
|
|
182
182
|
};
|
|
183
183
|
};
|
|
184
|
-
}, Record<"label" | "root" | "
|
|
184
|
+
}, Record<"label" | "root" | "indicator" | "icon", string | string[]>, import("tailwind-variants").TVReturnType<{
|
|
185
185
|
size: {
|
|
186
186
|
md: {
|
|
187
187
|
root: string;
|
|
@@ -216,7 +216,7 @@ export declare const Label: import("react").ComponentType<import("@ark-ui/react"
|
|
|
216
216
|
root: string;
|
|
217
217
|
};
|
|
218
218
|
};
|
|
219
|
-
}, Record<"label" | "root" | "
|
|
219
|
+
}, Record<"label" | "root" | "indicator" | "icon", string | string[]>, undefined, unknown, unknown, undefined>>>>>;
|
|
220
220
|
interface BadgeIndicatorProps extends ComponentPropsWithRef<'svg'> {
|
|
221
221
|
asChild?: boolean;
|
|
222
222
|
}
|
|
@@ -255,7 +255,7 @@ export declare const Indicator: import("react").ComponentType<import("@ark-ui/re
|
|
|
255
255
|
root: string;
|
|
256
256
|
};
|
|
257
257
|
};
|
|
258
|
-
}, Record<"label" | "root" | "
|
|
258
|
+
}, Record<"label" | "root" | "indicator" | "icon", string | string[]>, undefined, {
|
|
259
259
|
size: {
|
|
260
260
|
md: {
|
|
261
261
|
root: string;
|
|
@@ -290,7 +290,7 @@ export declare const Indicator: import("react").ComponentType<import("@ark-ui/re
|
|
|
290
290
|
root: string;
|
|
291
291
|
};
|
|
292
292
|
};
|
|
293
|
-
}, Record<"label" | "root" | "
|
|
293
|
+
}, Record<"label" | "root" | "indicator" | "icon", string | string[]>, import("tailwind-variants").TVReturnType<{
|
|
294
294
|
size: {
|
|
295
295
|
md: {
|
|
296
296
|
root: string;
|
|
@@ -325,7 +325,7 @@ export declare const Indicator: import("react").ComponentType<import("@ark-ui/re
|
|
|
325
325
|
root: string;
|
|
326
326
|
};
|
|
327
327
|
};
|
|
328
|
-
}, Record<"label" | "root" | "
|
|
328
|
+
}, Record<"label" | "root" | "indicator" | "icon", string | string[]>, undefined, unknown, unknown, undefined>>>>>;
|
|
329
329
|
interface BadgeIconProps extends ComponentPropsWithRef<'svg'> {
|
|
330
330
|
asChild?: boolean;
|
|
331
331
|
}
|
|
@@ -364,7 +364,7 @@ export declare const Icon: import("react").ComponentType<import("@ark-ui/react")
|
|
|
364
364
|
root: string;
|
|
365
365
|
};
|
|
366
366
|
};
|
|
367
|
-
}, Record<"label" | "root" | "
|
|
367
|
+
}, Record<"label" | "root" | "indicator" | "icon", string | string[]>, undefined, {
|
|
368
368
|
size: {
|
|
369
369
|
md: {
|
|
370
370
|
root: string;
|
|
@@ -399,7 +399,7 @@ export declare const Icon: import("react").ComponentType<import("@ark-ui/react")
|
|
|
399
399
|
root: string;
|
|
400
400
|
};
|
|
401
401
|
};
|
|
402
|
-
}, Record<"label" | "root" | "
|
|
402
|
+
}, Record<"label" | "root" | "indicator" | "icon", string | string[]>, import("tailwind-variants").TVReturnType<{
|
|
403
403
|
size: {
|
|
404
404
|
md: {
|
|
405
405
|
root: string;
|
|
@@ -434,5 +434,5 @@ export declare const Icon: import("react").ComponentType<import("@ark-ui/react")
|
|
|
434
434
|
root: string;
|
|
435
435
|
};
|
|
436
436
|
};
|
|
437
|
-
}, Record<"label" | "root" | "
|
|
437
|
+
}, Record<"label" | "root" | "indicator" | "icon", string | string[]>, undefined, unknown, unknown, undefined>>>>>;
|
|
438
438
|
export {};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const badgeAnatomy: import("@ark-ui/react/anatomy").AnatomyInstance<"label" | "root" | "
|
|
1
|
+
export declare const badgeAnatomy: import("@ark-ui/react/anatomy").AnatomyInstance<"label" | "root" | "indicator" | "icon">;
|
|
@@ -33,7 +33,7 @@ export declare const badgeRecipe: import("tailwind-variants").TVReturnType<{
|
|
|
33
33
|
root: string;
|
|
34
34
|
};
|
|
35
35
|
};
|
|
36
|
-
}, Record<"label" | "root" | "
|
|
36
|
+
}, Record<"label" | "root" | "indicator" | "icon", string | string[]>, undefined, {
|
|
37
37
|
size: {
|
|
38
38
|
md: {
|
|
39
39
|
root: string;
|
|
@@ -68,7 +68,7 @@ export declare const badgeRecipe: import("tailwind-variants").TVReturnType<{
|
|
|
68
68
|
root: string;
|
|
69
69
|
};
|
|
70
70
|
};
|
|
71
|
-
}, Record<"label" | "root" | "
|
|
71
|
+
}, Record<"label" | "root" | "indicator" | "icon", string | string[]>, import("tailwind-variants").TVReturnType<{
|
|
72
72
|
size: {
|
|
73
73
|
md: {
|
|
74
74
|
root: string;
|
|
@@ -103,4 +103,4 @@ export declare const badgeRecipe: import("tailwind-variants").TVReturnType<{
|
|
|
103
103
|
root: string;
|
|
104
104
|
};
|
|
105
105
|
};
|
|
106
|
-
}, Record<"label" | "root" | "
|
|
106
|
+
}, Record<"label" | "root" | "indicator" | "icon", string | string[]>, undefined, unknown, unknown, undefined>>;
|