@opexa/portal-components 0.0.900 → 0.0.901

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.
@@ -20,14 +20,25 @@ export interface StageItemLockedClassNameEntries {
20
20
  }
21
21
  export interface ClassNameEntries {
22
22
  root?: string;
23
- stageBadge?: string;
23
+ title?: string;
24
+ description?: string;
25
+ timeBadgeRoot?: string;
26
+ timeBadgeIcon?: string;
27
+ timeBadgeLabel?: string;
28
+ completedBadgeRoot?: string;
29
+ completedBadgeLabel?: string;
30
+ failedBadgeRoot?: string;
31
+ failedBadgeLabel?: string;
32
+ progressRoot?: string;
33
+ progressTrack?: string;
34
+ progressRange?: string;
35
+ progressLabel?: string;
36
+ stageBadgeRoot?: string;
24
37
  stageBadgeIcon?: string;
25
- stageBadgeText?: string;
26
- progressBarContainer?: string;
27
- progressBar?: string;
28
- bonusText?: string;
29
- bonusAmount?: string;
30
- bonusContainer?: string;
38
+ stageBadgeLabel?: string;
39
+ bonusBadgeRoot?: string;
40
+ bonusBadgeLabel?: string;
41
+ stageProgress?: string;
31
42
  stageItemUnlocked?: StageItemUnlockedClassNameEntries;
32
43
  stageItemLocked?: StageItemLockedClassNameEntries;
33
44
  }
@@ -1,5 +1,6 @@
1
1
  'use client';
2
2
  import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
3
+ import { Progress } from '@ark-ui/react';
3
4
  import useEmblaCarousel from 'embla-carousel-react';
4
5
  import { isString } from 'lodash-es';
5
6
  import Image from 'next/image';
@@ -16,6 +17,7 @@ import { ArrowRightIcon } from '../../icons/ArrowRightIcon.js';
16
17
  import { Flag05Icon } from '../../icons/Flag05Icon.js';
17
18
  import { Lock01Icon } from '../../icons/Lock01Icon.js';
18
19
  import { XIcon } from '../../icons/XIcon.js';
20
+ import { Badge } from '../../ui/Badge/index.js';
19
21
  import { Button } from '../../ui/Button/index.js';
20
22
  import { Dialog } from '../../ui/Dialog/index.js';
21
23
  import { Portal } from '../../ui/Portal/index.js';
@@ -45,9 +47,17 @@ export function WageringQuestNext(props) {
45
47
  const numericValue = parseFloat(value);
46
48
  return Math.floor(numericValue).toString();
47
49
  };
48
- return (_jsxs(_Fragment, { children: [_jsxs("div", { className: twMerge('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', classNames?.root), children: [_jsxs("div", { className: "flex flex-col space-y-2", children: [_jsxs("div", { className: "flex max-h-7.5 items-start gap-2", children: [_jsxs("div", { className: twMerge('flex w-fit items-center gap-1 rounded-md border border-[#9E165F] bg-[#4E0D30] px-2 py-1', classNames?.stageBadge), children: [_jsx(Flag05Icon, { className: twMerge('size-4 text-[#EE46BC]', classNames?.stageBadgeIcon) }), _jsxs("p", { className: twMerge('font-medium text-[#FAA7E0] text-sm', classNames?.stageBadgeText), children: ["Stage ", currentStage] })] }), _jsx(RemainingTime, {})] }), _jsx("p", { className: "font-semibold text-xl", children: name }), _jsx(Prose, { 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(0), "%"] }), _jsxs("p", { children: [formatTurnover(turnover), _jsxs("span", { className: "text-text-quarterary-brand", children: ["/", targetTurnover, " ", localeInfo.currency.code] })] })] }), _jsx("div", { className: twMerge('h-2 w-full overflow-hidden rounded-full bg-bg-primary', classNames?.progressBarContainer), children: _jsx("div", { className: twMerge('h-full rounded-full bg-utility-brand-600 transition-all duration-300', classNames?.progressBar), style: { width: `${progressPercentage}%` } }) }), _jsxs("div", { className: "group flex items-center justify-between text-text-primary-brand", children: [_jsxs("p", { children: ["Stage ", currentStage, " of ", quest?.program.stages?.length] }), _jsxs("div", { className: twMerge('rounded-[6px] border border-utility-brand-200 bg-utility-brand-50 px-1.5 py-0.5 font-medium text-utility-brand-700 text-xs leading-tight'), children: ["+", formatNumber(bonus, {
49
- currency: localeInfo.currency.code,
50
- }), ' ', "Bonus"] })] })] }), status === 'IN_PROGRESS' && (_jsx("div", { className: "flex h-full items-end", children: _jsx(Button, { size: "sm", onClick: () => disclosure.setOpen(true), "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, gameProviderCarousel: props.gameProviderCarousel, gameProviders: Object.entries(quest.turnoverRequirementContributionPercentagePerGameProvider ?? [])
50
+ return (_jsxs(_Fragment, { children: [_jsxs("div", { className: twMerge('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', classNames?.root), children: [_jsxs("div", { className: "flex flex-col space-y-2", children: [_jsxs("div", { className: "flex max-h-7.5 items-start gap-2", children: [_jsxs(Badge.Root, { className: twMerge('flex w-fit items-center gap-1 rounded-md border border-[#9E165F] bg-[#4E0D30] px-2 py-1', classNames?.stageBadgeRoot), children: [_jsx(Badge.Icon, { className: twMerge('size-4 text-[#EE46BC]', classNames?.stageBadgeIcon), children: _jsx(Flag05Icon, {}) }), _jsxs(Badge.Label, { className: twMerge('font-medium text-[#FAA7E0] text-sm', classNames?.stageBadgeLabel), children: ["Stage ", currentStage] })] }), _jsx(RemainingTime, { className: {
51
+ timeBadgeRoot: classNames?.timeBadgeRoot,
52
+ timeBadgeIcon: classNames?.timeBadgeIcon,
53
+ timeBadgeLabel: classNames?.timeBadgeLabel,
54
+ completedBadgeRoot: classNames?.completedBadgeRoot,
55
+ completedBadgeLabel: classNames?.completedBadgeLabel,
56
+ failedBadgeRoot: classNames?.failedBadgeRoot,
57
+ failedBadgeLabel: classNames?.failedBadgeLabel,
58
+ } })] }), _jsx("p", { className: twMerge('font-semibold text-xl', classNames?.title), children: name }), _jsx(Prose, { className: twMerge('text-wrap font-normal text-sm text-text-secondary-700', classNames?.description), dangerouslySetInnerHTML: { __html: description } })] }), _jsxs("div", { className: "flex w-full flex-col space-y-2", children: [_jsxs("div", { className: twMerge('group flex items-center justify-between text-text-primary-brand', classNames?.progressLabel), children: [_jsxs("p", { children: ["Progress ", parseDecimal(progressPercentage, 0).toFixed(0), "%"] }), _jsxs("p", { children: [formatTurnover(turnover), _jsxs("span", { children: ["/", targetTurnover, " ", localeInfo.currency.code] })] })] }), _jsx(Progress.Root, { max: 100, className: twMerge('h-2 rounded-full bg-bg-primary', classNames?.progressRoot), value: Number(progressPercentage), children: _jsx(Progress.Track, { className: classNames?.progressTrack, children: _jsx(Progress.Range, { className: classNames?.progressRange }) }) }), _jsxs("div", { className: "group flex items-center justify-between text-text-primary-brand", children: [_jsxs("p", { className: classNames?.stageProgress, children: ["Stage ", currentStage, " of ", quest?.program.stages?.length] }), _jsx(Badge.Root, { className: twMerge('rounded-[6px] border border-utility-brand-200 bg-utility-brand-50 px-1.5 py-0.5', classNames?.bonusBadgeRoot), children: _jsxs(Badge.Label, { className: twMerge('font-medium text-utility-brand-700 text-xs leading-tight', classNames?.bonusBadgeLabel), children: ["+", ' ', formatNumber(bonus, {
59
+ currency: localeInfo.currency.code,
60
+ }), ' ', "Bonus"] }) })] })] }), status === 'IN_PROGRESS' && (_jsx("div", { className: "flex h-full items-end", children: _jsx(Button, { size: "sm", onClick: () => disclosure.setOpen(true), "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, gameProviderCarousel: props.gameProviderCarousel, gameProviders: Object.entries(quest.turnoverRequirementContributionPercentagePerGameProvider ?? [])
51
61
  .filter(([_, value]) => +value > 0)
52
62
  .map(([key]) => key), className: classNames, gameProviderViewPageUrl: props.gameProviderViewPageUrl })] }));
53
63
  }
@@ -289,7 +289,7 @@ const ERROR_CODES_MESSAGE_MAP = {
289
289
  InvalidPlatformError: 'Invalid platform',
290
290
  InvalidReCAPTCHAResponseError: 'Invalid reCAPTCHA',
291
291
  InvalidSMSVerificationCodeError: 'Invalid SMS verification code',
292
- InvalidTransactionPasswordError: 'Invalid transaction password',
292
+ InvalidTransactionPasswordError: 'You cannot use your account password as your transaction password.',
293
293
  InvalidVerificationCodeError: 'Invalid verification code',
294
294
  MemberVerificationAlreadyApprovedError: 'Member verification is already approved',
295
295
  MemberVerificationAlreadyExistsError: 'Member verification already exists',
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@opexa/portal-components",
3
- "version": "0.0.900",
3
+ "version": "0.0.901",
4
4
  "exports": {
5
5
  "./ui/*": {
6
6
  "types": "./dist/ui/*/index.d.ts",