@opexa/portal-components 0.0.306 → 0.0.307
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/Banner/Banner.client.d.ts +12 -0
- package/dist/components/Banner/Banner.client.js +49 -0
- package/dist/components/Jackpots/JackpotsCarousel/JackpotsCarouselItem.js +5 -5
- package/dist/components/Jackpots/JackpotsList/JackpotsListItemDesktop.js +3 -3
- package/dist/components/Jackpots/JackpotsList/useJackpotsListItemData.js +2 -2
- package/dist/third-parties/FacebookPixel/FacebookPixel.d.ts +4 -0
- package/dist/third-parties/FacebookPixel/FacebookPixel.js +4 -0
- package/dist/third-parties/FacebookPixel/api.d.ts +0 -0
- package/dist/third-parties/FacebookPixel/api.js +1 -0
- package/dist/third-parties/FacebookPixel/index.d.ts +1 -0
- package/dist/third-parties/FacebookPixel/index.js +1 -0
- package/dist/third-parties/GoogleRecaptcha/GoogleRecaptcha.d.ts +4 -0
- package/dist/third-parties/GoogleRecaptcha/GoogleRecaptcha.js +4 -0
- package/dist/third-parties/GoogleRecaptcha/api.d.ts +0 -0
- package/dist/third-parties/GoogleRecaptcha/api.js +1 -0
- package/dist/third-parties/GoogleRecaptcha/index.d.ts +1 -0
- package/dist/third-parties/GoogleRecaptcha/index.js +1 -0
- package/dist/third-parties/index.d.ts +2 -0
- package/dist/third-parties/index.js +2 -0
- package/dist/ui/AlertDialog/AlertDialog.d.ts +55 -55
- package/dist/ui/AlertDialog/alertDialog.recipe.d.ts +5 -5
- 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 +72 -72
- package/dist/ui/Carousel/carousel.recipe.d.ts +8 -8
- package/dist/ui/Checkbox/Checkbox.d.ts +23 -23
- package/dist/ui/Checkbox/checkbox.recipe.d.ts +3 -3
- package/dist/ui/Clipboard/Clipboard.d.ts +18 -18
- package/dist/ui/Clipboard/clipboard.recipe.d.ts +3 -3
- package/dist/ui/Collapsible/Collapsible.d.ts +20 -20
- package/dist/ui/Collapsible/collapsible.recipe.d.ts +5 -5
- 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/Dialog/Dialog.d.ts +55 -55
- package/dist/ui/Dialog/dialog.recipe.d.ts +5 -5
- package/dist/ui/Drawer/Drawer.d.ts +33 -33
- package/dist/ui/Drawer/drawer.recipe.d.ts +3 -3
- package/dist/ui/Field/Field.d.ts +21 -21
- package/dist/ui/Field/field.recipe.d.ts +3 -3
- package/dist/ui/Menu/Menu.d.ts +198 -198
- package/dist/ui/Menu/menu.recipe.d.ts +11 -11
- package/dist/ui/PasswordInput/PasswordInput.d.ts +18 -18
- package/dist/ui/PasswordInput/passwordInput.recipe.d.ts +3 -3
- package/dist/ui/Popover/Popover.d.ts +88 -88
- package/dist/ui/Popover/popover.recipe.d.ts +8 -8
- 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/dist/ui/Tabs/Tabs.d.ts +15 -15
- package/dist/ui/Tabs/tabs.recipe.d.ts +3 -3
- package/package.json +1 -1
- package/dist/client/utils/recaptcha.d.ts +0 -14
- package/dist/client/utils/recaptcha.js +0 -18
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import type { ImageProps } from 'next/image';
|
|
2
|
+
export interface BannerEntry {
|
|
3
|
+
src: ImageProps['src'];
|
|
4
|
+
redirectUrl?: string;
|
|
5
|
+
}
|
|
6
|
+
export interface BannerProps {
|
|
7
|
+
banners: BannerEntry[];
|
|
8
|
+
imageWidth?: number | [mobile: number, desktop: number];
|
|
9
|
+
imageHeight?: number | [mobile: number, desktop: number];
|
|
10
|
+
className?: string;
|
|
11
|
+
}
|
|
12
|
+
export declare function Banner__client(props: BannerProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
|
+
import emblaCarouselAutoplay from 'embla-carousel-autoplay';
|
|
4
|
+
import useEmblaCarousel, {} from 'embla-carousel-react';
|
|
5
|
+
import isMobile from 'is-mobile';
|
|
6
|
+
import Image from 'next/image';
|
|
7
|
+
import Link from 'next/link';
|
|
8
|
+
import { Fragment, useEffect, useState } from 'react';
|
|
9
|
+
import { twMerge } from 'tailwind-merge';
|
|
10
|
+
import { dataAttr } from '../../utils/dataAttr.js';
|
|
11
|
+
export function Banner__client(props) {
|
|
12
|
+
const [emblaRef, emblaApi] = useEmblaCarousel({
|
|
13
|
+
loop: true,
|
|
14
|
+
align: 'start',
|
|
15
|
+
}, [
|
|
16
|
+
emblaCarouselAutoplay({
|
|
17
|
+
playOnInit: true,
|
|
18
|
+
delay: 5000,
|
|
19
|
+
}),
|
|
20
|
+
]);
|
|
21
|
+
const [currentIndex, setCurrentIndex] = useState(0);
|
|
22
|
+
useEffect(() => {
|
|
23
|
+
function handler(detail) {
|
|
24
|
+
setCurrentIndex(detail?.selectedScrollSnap() ?? 0);
|
|
25
|
+
}
|
|
26
|
+
emblaApi?.on('scroll', handler);
|
|
27
|
+
emblaApi?.on('init', handler);
|
|
28
|
+
return () => {
|
|
29
|
+
emblaApi?.on('init', handler);
|
|
30
|
+
emblaApi?.off('scroll', handler);
|
|
31
|
+
};
|
|
32
|
+
}, [emblaApi]);
|
|
33
|
+
const imageWidth = !props.imageWidth
|
|
34
|
+
? [400, 1200]
|
|
35
|
+
: Array.isArray(props.imageWidth)
|
|
36
|
+
? props.imageWidth
|
|
37
|
+
: [props.imageWidth, props.imageWidth];
|
|
38
|
+
const imageHeight = !props.imageHeight
|
|
39
|
+
? [225, 300]
|
|
40
|
+
: Array.isArray(props.imageHeight)
|
|
41
|
+
? props.imageHeight
|
|
42
|
+
: [props.imageHeight, props.imageHeight];
|
|
43
|
+
return (_jsxs("div", { className: twMerge('relative', props.className), children: [_jsx("div", { ref: emblaRef, className: "overflow-hidden", children: _jsx("div", { className: "flex gap-2", children: props.banners.map((banner, index) => {
|
|
44
|
+
const img = (_jsx(Image, { src: banner.src, alt: "", width: isMobile() ? imageWidth[0] : imageWidth[1], height: isMobile() ? imageHeight[0] : imageHeight[1], className: "block h-auto w-full", priority: index === 0 }));
|
|
45
|
+
return (_jsx(Fragment, { children: !banner.redirectUrl ? (_jsx("div", { className: "w-full shrink-0", children: img })) : (_jsx(Link, { href: banner.redirectUrl, className: "block w-full shrink-0", "aria-label": `Open ${banner.redirectUrl}`, children: img })) }, index));
|
|
46
|
+
}) }) }), _jsx("div", { className: "absolute bottom-lg left-1/2 flex w-fit -translate-x-1/2 gap-2", children: props.banners.map((_, index) => (_jsx("button", { type: "button", className: "ui-active:bg-brand-500 bg-gray-300 size-3 shrink-0 rounded-full border border-white transition-all duration-300 ui-active:w-9", onClick: () => {
|
|
47
|
+
emblaApi?.scrollTo(index);
|
|
48
|
+
}, "aria-label": `Go to slide ${index + 1}`, "data-active": dataAttr(index === currentIndex) }, index))) })] }));
|
|
49
|
+
}
|
|
@@ -41,8 +41,8 @@ export function JackpotsCarouselItem({ style, className, viewAllUrl, animate = t
|
|
|
41
41
|
const localeInfo = useLocaleInfo();
|
|
42
42
|
const isPayingOut = jackpot.drawing;
|
|
43
43
|
const jackpotAmount = isPayingOut
|
|
44
|
-
? jackpot.
|
|
45
|
-
: jackpot.
|
|
44
|
+
? jackpot.pool
|
|
45
|
+
: jackpot.maximumJackpotPoolLimit;
|
|
46
46
|
const Arrow = useCallback(({ index }) => {
|
|
47
47
|
const Icon = isPayingOut ? ChevronLeftIcon : ChevronRightIcon;
|
|
48
48
|
return (_jsx(Icon, { className: twMerge('scale-400 lg:scale-250 text-brand-300 min-w-2.5 lg:min-w-4', isPayingOut
|
|
@@ -58,7 +58,7 @@ export function JackpotsCarouselItem({ style, className, viewAllUrl, animate = t
|
|
|
58
58
|
currency: localeInfo.currency.code,
|
|
59
59
|
minDecimalPlaces: 2,
|
|
60
60
|
maxDecimalPlaces: 2,
|
|
61
|
-
}) })] }), _jsx("div", { className: "min-w-25 hidden lg:block" }), _jsx("div", { className: "z-1 min-w-25 bottom-[-60] right-0 lg:absolute", children: _jsx(Image, { width: 150, height: 150, src: isPayingOut ? openChest : closeChest, alt: "closeChest", className: "h-25 w-25 lg:h-37.5 lg:w-37.5 size-full p-2" }) })] }), latestJackpotPayout.amount ? (_jsx("div", { children: _jsxs("div", { className: "bg-bg-primary relative mt-4 hidden w-full gap-4 rounded-lg p-4 lg:flex", children: [_jsxs("div", { className: "bg-bg-tertiary
|
|
61
|
+
}) })] }), _jsx("div", { className: "min-w-25 hidden lg:block" }), _jsx("div", { className: "z-1 min-w-25 bottom-[-60] right-0 lg:absolute", children: _jsx(Image, { width: 150, height: 150, src: isPayingOut ? openChest : closeChest, alt: "closeChest", className: "h-25 w-25 lg:h-37.5 lg:w-37.5 size-full p-2" }) })] }), latestJackpotPayout.amount ? (_jsx("div", { children: _jsxs("div", { className: "bg-bg-primary relative mt-4 hidden w-full gap-4 rounded-lg p-4 lg:flex", children: [_jsxs("div", { className: "bg-bg-tertiary h-18 w-18 relative flex items-center justify-center rounded-full", children: [_jsx(User01Icon, { className: "text-text-quarterary-500 size-9" }), _jsxs("div", { className: "text-brand-950 border-bg-primary absolute bottom-0 right-0 flex h-6 w-6 items-center justify-center rounded-full border-[1.5px] bg-yellow-400 text-xs font-bold", children: [latestJackpotPayout.multiplier, "x"] })] }), _jsxs("div", { className: "flex flex-col gap-1 text-left", children: [_jsxs("div", { className: "border-utility-brand-200 bg-utility-brand-50 text-utility-brand-700 flex h-fit w-fit items-center gap-1 rounded-sm border px-2 py-0.5 text-xs font-medium", children: [_jsx(Trophy01Icon, { className: "text-utility-brand-600 size-3.5" }), "Recent Payout"] }), _jsx("div", { className: "font-semibold", children: mask(latestJackpotPayout.member.name, {
|
|
62
62
|
totalCharsCount: 6,
|
|
63
63
|
}) }), _jsx("div", { className: "text-brand-400 text-2xl", children: formatNumber(latestJackpotPayout.amount, {
|
|
64
64
|
currency: localeInfo.currency.code,
|
|
@@ -80,12 +80,12 @@ export function JackpotsCarouselItem({ style, className, viewAllUrl, animate = t
|
|
|
80
80
|
currency: localeInfo.currency.code,
|
|
81
81
|
minDecimalPlaces: 2,
|
|
82
82
|
maxDecimalPlaces: 2,
|
|
83
|
-
})] }), _jsx(Tooltip.Arrow, { children: _jsx(Tooltip.ArrowTip, {}) })] }) })] })] }) }) }), _jsx("div", { className: "mt-1 block text-start
|
|
83
|
+
})] }), _jsx(Tooltip.Arrow, { children: _jsx(Tooltip.ArrowTip, {}) })] }) })] })] }) }) }), _jsx("div", { className: "text-2xs mt-1 block text-start lg:hidden", children: isPayingOut
|
|
84
84
|
? `The pot has hit ${formatNumber(jackpot?.maximumJackpotPoolLimit, {
|
|
85
85
|
currency: localeInfo.currency.code,
|
|
86
86
|
compact: true,
|
|
87
87
|
})} Play now for your chance to win big! 🔥`
|
|
88
|
-
: getAccumulatingJackpotDescription(Number(jackpot?.pool) ?? 0, Number(jackpot?.maximumJackpotPoolLimit) ?? 0) })] })] }), _jsxs("div", { className: "z-1 hidden flex-1 space-y-4 lg:block", children: [_jsxs("div", { className: "flex items-center justify-between", children: [_jsxs("div", { className: "flex gap-2", children: [_jsx(Image, { width: 24, height: 24, src: leaderboard, alt: "leaderboardIcon", className: "size-full h-auto w-6" }), _jsx("div", { className: "text-text-primary-900 text-lg font-semibold", children: jackpotPayouts.length ? 'Recent payouts' : 'Starting soon!' })] }), _jsxs(Link, { className: "text-button-tertiary-fg flex text-sm font-semibold", href: viewAllUrl ?? '/jackpots', children: ["See details", _jsx(ChevronRightIcon, { className: "size-5" })] })] }), _jsx("div", { className: twMerge('max-h-[17rem] overflow-y-scroll', styles['scrollArea']), children: _jsx("div", { className: "
|
|
88
|
+
: getAccumulatingJackpotDescription(Number(jackpot?.pool) ?? 0, Number(jackpot?.maximumJackpotPoolLimit) ?? 0) })] })] }), _jsxs("div", { className: "z-1 hidden flex-1 space-y-4 lg:block", children: [_jsxs("div", { className: "flex items-center justify-between", children: [_jsxs("div", { className: "flex gap-2", children: [_jsx(Image, { width: 24, height: 24, src: leaderboard, alt: "leaderboardIcon", className: "size-full h-auto w-6" }), _jsx("div", { className: "text-text-primary-900 text-lg font-semibold", children: jackpotPayouts.length ? 'Recent payouts' : 'Starting soon!' })] }), _jsxs(Link, { className: "text-button-tertiary-fg flex text-sm font-semibold", href: viewAllUrl ?? '/jackpots', children: ["See details", _jsx(ChevronRightIcon, { className: "size-5" })] })] }), _jsx("div", { className: twMerge('max-h-[17rem] overflow-y-scroll', styles['scrollArea']), children: _jsx("div", { className: "overflow-hidden rounded-xl border-gray-200", children: _jsxs("table", { className: "w-full", children: [_jsx("thead", { children: _jsx("tr", { className: "bg-bg-secondary text-text-tertiary-600 h-8 whitespace-nowrap text-left text-xs font-medium", children: [
|
|
89
89
|
'Player',
|
|
90
90
|
'Game Provider',
|
|
91
91
|
'Multiplier',
|
|
@@ -29,7 +29,7 @@ export function JackpotsListItemDesktop({ animate = true, ...props }) {
|
|
|
29
29
|
currency: localeInfo.currency.code,
|
|
30
30
|
minDecimalPlaces: 2,
|
|
31
31
|
maxDecimalPlaces: 2,
|
|
32
|
-
}) })] }), _jsx("div", { className: "min-w-30" }), _jsx("div", { className: "z-1 min-w-30 bottom-[-60] right-0 lg:absolute", children: _jsx(Image, { width: 150, height: 150, src: isPayingOut ? openChest : closeChest, alt: "closeChest", className: "h-25 w-25 lg:h-37.5 lg:w-37.5 size-full p-2" }) })] }), topJackpotPayout.amount ? (_jsx("div", { children: _jsxs("div", { className: "bg-bg-primary relative mt-4 hidden w-full gap-4 rounded-lg p-4 lg:flex", children: [_jsxs("div", { className: "bg-bg-tertiary
|
|
32
|
+
}) })] }), _jsx("div", { className: "min-w-30" }), _jsx("div", { className: "z-1 min-w-30 bottom-[-60] right-0 lg:absolute", children: _jsx(Image, { width: 150, height: 150, src: isPayingOut ? openChest : closeChest, alt: "closeChest", className: "h-25 w-25 lg:h-37.5 lg:w-37.5 size-full p-2" }) })] }), topJackpotPayout.amount ? (_jsx("div", { children: _jsxs("div", { className: "bg-bg-primary relative mt-4 hidden w-full gap-4 rounded-lg p-4 lg:flex", children: [_jsxs("div", { className: "bg-bg-tertiary h-18 w-18 relative flex items-center justify-center rounded-full", children: [_jsx(User01Icon, { className: "text-text-quarterary-500 size-9" }), _jsxs("div", { className: "text-brand-950 border-bg-primary absolute bottom-0 right-0 flex h-6 w-6 items-center justify-center rounded-full border-[1.5px] bg-yellow-400 text-xs font-bold", children: [topJackpotPayout.multiplier, "x"] })] }), _jsxs("div", { className: "flex flex-col gap-1 text-left", children: [_jsxs("div", { className: "border-utility-brand-200 bg-utility-brand-50 text-utility-brand-700 flex h-fit w-fit items-center gap-1 rounded-sm border px-2 py-0.5 text-xs font-medium", children: [_jsx(Trophy01Icon, { className: "text-utility-brand-600 size-3.5" }), "Recent Payout"] }), _jsx("div", { className: "font-semibold", children: mask(topJackpotPayout.member.name, {
|
|
33
33
|
totalCharsCount: 6,
|
|
34
34
|
}) }), _jsx("div", { className: "text-brand-400 text-2xl", children: formatNumber(topJackpotPayout.amount, {
|
|
35
35
|
currency: localeInfo.currency.code,
|
|
@@ -51,12 +51,12 @@ export function JackpotsListItemDesktop({ animate = true, ...props }) {
|
|
|
51
51
|
currency: localeInfo.currency.code,
|
|
52
52
|
minDecimalPlaces: 2,
|
|
53
53
|
maxDecimalPlaces: 2,
|
|
54
|
-
})] }), _jsx(Tooltip.Arrow, { children: _jsx(Tooltip.ArrowTip, {}) })] }) })] })] }) }) }), _jsx("div", { className: "mt-1 block text-start
|
|
54
|
+
})] }), _jsx(Tooltip.Arrow, { children: _jsx(Tooltip.ArrowTip, {}) })] }) })] })] }) }) }), _jsx("div", { className: "text-2xs mt-1 block text-start lg:hidden", children: isPayingOut
|
|
55
55
|
? `The pot has hit ${formatNumber(jackpot?.maximumJackpotPoolLimit, {
|
|
56
56
|
currency: localeInfo.currency.code,
|
|
57
57
|
compact: true,
|
|
58
58
|
})} Play now for your chance to win big! 🔥`
|
|
59
|
-
: getAccumulatingJackpotDescription(Number(jackpot?.pool) ?? 0, Number(jackpot?.maximumJackpotPoolLimit) ?? 0) })] })] }), _jsxs("div", { className: "z-1 hidden flex-1 space-y-4 lg:block", children: [_jsxs("div", { className: "flex items-center justify-between", children: [_jsxs("div", { className: "flex gap-2", children: [_jsx(Image, { width: 24, height: 24, src: leaderboard, alt: "leaderboardIcon", className: "size-full h-auto w-6" }), _jsx("div", { className: "text-text-primary-900 text-lg font-semibold", children: jackpotPayouts.length ? 'Recent Payouts' : 'Starting soon!' })] }), _jsx(JackpotsListItemRules, {})] }), _jsx("div", { className: twMerge('max-h-[17rem] overflow-y-scroll', styles['scrollArea']), children: _jsx("div", { className: "
|
|
59
|
+
: getAccumulatingJackpotDescription(Number(jackpot?.pool) ?? 0, Number(jackpot?.maximumJackpotPoolLimit) ?? 0) })] })] }), _jsxs("div", { className: "z-1 hidden flex-1 space-y-4 lg:block", children: [_jsxs("div", { className: "flex items-center justify-between", children: [_jsxs("div", { className: "flex gap-2", children: [_jsx(Image, { width: 24, height: 24, src: leaderboard, alt: "leaderboardIcon", className: "size-full h-auto w-6" }), _jsx("div", { className: "text-text-primary-900 text-lg font-semibold", children: jackpotPayouts.length ? 'Recent Payouts' : 'Starting soon!' })] }), _jsx(JackpotsListItemRules, {})] }), _jsx("div", { className: twMerge('max-h-[17rem] overflow-y-scroll', styles['scrollArea']), children: _jsx("div", { className: "overflow-hidden rounded-xl border-gray-200", children: _jsxs("table", { className: "w-full", children: [_jsx("thead", { children: _jsx("tr", { className: "bg-bg-secondary text-text-tertiary-600 h-8 whitespace-nowrap text-left text-xs font-medium", children: [
|
|
60
60
|
'Player',
|
|
61
61
|
'Game Provider',
|
|
62
62
|
'Multiplier',
|
|
@@ -34,8 +34,8 @@ export function useJackpotsListItemData() {
|
|
|
34
34
|
const localeInfo = useLocaleInfo();
|
|
35
35
|
const isPayingOut = jackpot.drawing;
|
|
36
36
|
const jackpotAmount = isPayingOut
|
|
37
|
-
? jackpot.
|
|
38
|
-
: jackpot.
|
|
37
|
+
? jackpot.pool
|
|
38
|
+
: jackpot.maximumJackpotPoolLimit;
|
|
39
39
|
const Arrow = useCallback(({ index }) => {
|
|
40
40
|
const Icon = isPayingOut ? ChevronLeftIcon : ChevronRightIcon;
|
|
41
41
|
return (_jsx(Icon, { className: twMerge('scale-400 lg:scale-250 text-brand-300 min-w-2.5 lg:min-w-4', isPayingOut
|
|
File without changes
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './FacebookPixel';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './FacebookPixel.js';
|
|
File without changes
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './GoogleRecaptcha';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './GoogleRecaptcha.js';
|