@opexa/portal-components 0.0.158 → 0.0.160
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/Bonus/Bonus.js +4 -2
- package/dist/components/Cashback/Cashback.js +4 -2
- package/dist/components/CustomPromo/CustomPromo.js +6 -4
- package/dist/components/News/News.js +6 -4
- package/dist/components/NewsFeed/News.d.ts +6 -0
- package/dist/components/NewsFeed/News.js +9 -0
- package/dist/components/NewsFeed/NewsFeedCarousel.d.ts +2 -2
- package/dist/components/NewsFeed/NewsFeedCarousel.js +2 -4
- package/dist/components/NewsFeed/NewsFeedList.d.ts +2 -2
- package/dist/components/NewsFeed/NewsFeedList.js +2 -6
- package/dist/components/Promo/Promo.js +4 -2
- package/dist/components/Promos/Cashback.js +1 -1
- package/dist/components/Promos/CustomPromo.js +1 -1
- package/dist/components/Promos/Promo.js +1 -1
- package/dist/utils/stripTags.d.ts +1 -0
- package/dist/utils/stripTags.js +4 -0
- package/package.json +3 -3
|
@@ -1,8 +1,10 @@
|
|
|
1
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
1
|
+
import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
import { notFound } from 'next/navigation';
|
|
3
|
+
import { DOMAIN } from '../../constants/index.js';
|
|
3
4
|
import { getSession } from '../../server/services/getSession.js';
|
|
4
5
|
import { prefetchBonusQuery } from '../../server/utils/prefetchBonusQuery.js';
|
|
5
6
|
import { getBonus } from '../../services/wallet.js';
|
|
7
|
+
import { stripTags } from '../../utils/stripTags.js';
|
|
6
8
|
import { Bonus__client } from './Bonus.client.js';
|
|
7
9
|
async function fetchBonus(id) {
|
|
8
10
|
const session = await getSession();
|
|
@@ -20,7 +22,7 @@ export async function Bonus(props) {
|
|
|
20
22
|
prefetchBonusQuery(props.id),
|
|
21
23
|
]);
|
|
22
24
|
if (result.status === 'fulfilled' && result.value) {
|
|
23
|
-
return _jsx(Bonus__client, { ...props });
|
|
25
|
+
return (_jsxs(_Fragment, { children: [_jsx("meta", { name: "description", content: stripTags(result.value.promo.description) }), _jsx("meta", { name: "og:title", content: result.value.promo.name }), _jsx("meta", { name: "og:description", content: stripTags(result.value.promo.description) }), _jsx("meta", { name: "og:image", content: result.value.promo.banner.url }), _jsx("meta", { name: "twitter:title", content: result.value.promo.name }), _jsx("meta", { name: "twitter:description", content: stripTags(result.value.promo.description) }), _jsx("meta", { name: "twitter:image", content: result.value.promo.banner.url }), _jsx("meta", { name: "twitter:card", content: "summary_large_image" }), _jsx("meta", { name: "twitter:site", content: DOMAIN }), _jsx(Bonus__client, { ...props })] }));
|
|
24
26
|
}
|
|
25
27
|
else {
|
|
26
28
|
return notFound();
|
|
@@ -1,7 +1,9 @@
|
|
|
1
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
1
|
+
import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
import { notFound } from 'next/navigation';
|
|
3
|
+
import { DOMAIN } from '../../constants/index.js';
|
|
3
4
|
import { prefetchCashbackQuery } from '../../server/utils/prefetchCashbackQuery.js';
|
|
4
5
|
import { getCashback } from '../../services/wallet.js';
|
|
6
|
+
import { stripTags } from '../../utils/stripTags.js';
|
|
5
7
|
import { Cashback__client } from './Cashback.client.js';
|
|
6
8
|
export async function Cashback(props) {
|
|
7
9
|
const [result] = await Promise.allSettled([
|
|
@@ -9,7 +11,7 @@ export async function Cashback(props) {
|
|
|
9
11
|
prefetchCashbackQuery(props.id),
|
|
10
12
|
]);
|
|
11
13
|
if (result.status === 'fulfilled' && result.value) {
|
|
12
|
-
return _jsx(Cashback__client, { ...props });
|
|
14
|
+
return (_jsxs(_Fragment, { children: [_jsx("meta", { name: "description", content: stripTags(result.value.description) }), _jsx("meta", { name: "og:title", content: result.value.name }), _jsx("meta", { name: "og:description", content: stripTags(result.value.description) }), _jsx("meta", { name: "og:image", content: result.value.banner.url }), _jsx("meta", { name: "twitter:title", content: result.value.name }), _jsx("meta", { name: "twitter:description", content: stripTags(result.value.description) }), _jsx("meta", { name: "twitter:image", content: result.value.banner.url }), _jsx("meta", { name: "twitter:card", content: "summary_large_image" }), _jsx("meta", { name: "twitter:site", content: DOMAIN }), _jsx(Cashback__client, { ...props })] }));
|
|
13
15
|
}
|
|
14
16
|
else {
|
|
15
17
|
return notFound();
|
|
@@ -1,11 +1,13 @@
|
|
|
1
1
|
'use client';
|
|
2
|
-
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
3
3
|
import Image from 'next/image';
|
|
4
4
|
import Link from 'next/link';
|
|
5
|
+
import { DOMAIN } from '../../constants/index.js';
|
|
5
6
|
import { ChevronLeftIcon } from '../../icons/ChevronLeftIcon.js';
|
|
6
7
|
import { Prose } from '../../ui/Prose/index.js';
|
|
8
|
+
import { stripTags } from '../../utils/stripTags.js';
|
|
7
9
|
export function CustomPromo(props) {
|
|
8
|
-
return (_jsxs("div", { className: props.className, children: [_jsxs(Link, { href: props.viewAllPromosUrl ?? '/promos', className: "text-button-tertiary-fg flex w-fit items-center gap-lg text-lg font-semibold", children: [_jsx(ChevronLeftIcon, { className: "size-6" }), "Back to all Promotions"] }), _jsx(Image, { src: props.promo.banner, alt: "", width: 1024, height: 600, priority: true, unoptimized: true, className: "mt-xl h-auto w-full rounded-xl lg:mt-6" }), _jsx("h1", { className: "mt-xl text-2xl font-semibold lg:mt-6 lg:text-3xl", children: props.promo.name }), _jsx(Prose, { className: "mt-2xl lg:mt-6", dangerouslySetInnerHTML: {
|
|
9
|
-
|
|
10
|
-
|
|
10
|
+
return (_jsxs(_Fragment, { children: [_jsx("meta", { name: "description", content: stripTags(props.promo.description) }), _jsx("meta", { name: "og:title", content: props.promo.name }), _jsx("meta", { name: "og:description", content: stripTags(props.promo.description) }), _jsx("meta", { name: "og:image", content: props.promo.banner }), _jsx("meta", { name: "twitter:title", content: props.promo.name }), _jsx("meta", { name: "twitter:description", content: stripTags(props.promo.description) }), _jsx("meta", { name: "twitter:image", content: props.promo.banner }), _jsx("meta", { name: "twitter:card", content: "summary_large_image" }), _jsx("meta", { name: "twitter:site", content: DOMAIN }), _jsxs("div", { className: props.className, children: [_jsxs(Link, { href: props.viewAllPromosUrl ?? '/promos', className: "text-button-tertiary-fg flex w-fit items-center gap-lg text-lg font-semibold", children: [_jsx(ChevronLeftIcon, { className: "size-6" }), "Back to all Promotions"] }), _jsx(Image, { src: props.promo.banner, alt: "", width: 1024, height: 600, priority: true, unoptimized: true, className: "mt-xl h-auto w-full rounded-xl lg:mt-6" }), _jsx("h1", { className: "mt-xl text-2xl font-semibold lg:mt-6 lg:text-3xl", children: props.promo.name }), _jsx(Prose, { className: "mt-2xl lg:mt-6", dangerouslySetInnerHTML: {
|
|
11
|
+
__html: props.promo.description,
|
|
12
|
+
} })] })] }));
|
|
11
13
|
}
|
|
@@ -1,10 +1,12 @@
|
|
|
1
|
-
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
2
2
|
import Image from 'next/image';
|
|
3
3
|
import Link from 'next/link';
|
|
4
|
+
import { DOMAIN } from '../../constants/index.js';
|
|
4
5
|
import { ChevronLeftIcon } from '../../icons/ChevronLeftIcon.js';
|
|
5
6
|
import { Prose } from '../../ui/Prose/index.js';
|
|
7
|
+
import { stripTags } from '../../utils/stripTags.js';
|
|
6
8
|
export function News(props) {
|
|
7
|
-
return (_jsxs("div", { style: props.style, className: props.className, children: [_jsxs(Link, { href: props.viewAllUrl ?? '/news', className: "text-button-secondary-fg flex items-center gap-lg text-lg font-semibold", 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: "text-brand-400 mt-xl text-sm font-semibold lg:mt-6", children: props.news.category }), _jsx("h2", { className: "mt-xl text-2xl font-semibold lg:mt-6", children: props.news.title }), _jsx(Prose, { className: "mt-xl lg:mt-6", dangerouslySetInnerHTML: {
|
|
8
|
-
|
|
9
|
-
|
|
9
|
+
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" }), _jsx("meta", { name: "twitter:site", content: DOMAIN }), _jsxs("div", { style: props.style, className: props.className, children: [_jsxs(Link, { href: props.viewAllUrl ?? '/news', className: "text-button-secondary-fg flex items-center gap-lg text-lg font-semibold", 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: "text-brand-400 mt-xl text-sm font-semibold lg:mt-6", children: props.news.category }), _jsx("h2", { className: "mt-xl text-2xl font-semibold lg:mt-6", children: props.news.title }), _jsx(Prose, { className: "mt-xl lg:mt-6", dangerouslySetInnerHTML: {
|
|
10
|
+
__html: props.news.content,
|
|
11
|
+
} })] })] }));
|
|
10
12
|
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import Image from 'next/image';
|
|
3
|
+
import Link from 'next/link';
|
|
4
|
+
import { Button } from '../../ui/Button/index.js';
|
|
5
|
+
export function News({ news, viewDetailsUrl }) {
|
|
6
|
+
return (_jsxs("div", { className: "bg-bg-primary-alt border-border-primary flex flex-col overflow-hidden rounded-2xl border 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: "text-brand-400 text-sm font-semibold", children: news.category }), _jsx("h2", { className: "mt-2 line-clamp-1 text-lg font-semibold", children: news.title }), _jsx("p", { className: "text-text-tertiary-600 mt-xs line-clamp-3", dangerouslySetInnerHTML: {
|
|
7
|
+
__html: news.content,
|
|
8
|
+
} })] }), _jsx(Button, { asChild: true, className: "mt-2xl", children: _jsx(Link, { href: `${viewDetailsUrl}/${news.id}`, "aria-label": `Read more about ${news.title}`, children: "Read More" }) })] })] }, news.id));
|
|
9
|
+
}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { type CSSProperties } from 'react';
|
|
2
|
-
import type { News } from '../../types';
|
|
2
|
+
import type { News as TNews } from '../../types';
|
|
3
3
|
export interface NewsFeedCarouselProps {
|
|
4
4
|
layout: 'carousel';
|
|
5
|
-
newsFeed:
|
|
5
|
+
newsFeed: TNews[];
|
|
6
6
|
/** @default 'News' */
|
|
7
7
|
heading?: string;
|
|
8
8
|
/** @default '/news' */
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
3
3
|
import useEmblaCarousel, {} from 'embla-carousel-react';
|
|
4
|
-
import Image from 'next/image';
|
|
5
4
|
import Link from 'next/link';
|
|
6
5
|
import { useCallback, useEffect, useState } from 'react';
|
|
7
6
|
import { twMerge } from 'tailwind-merge';
|
|
@@ -11,6 +10,7 @@ import { ChevronRightIcon } from '../../icons/ChevronRightIcon.js';
|
|
|
11
10
|
import { Tv03Icon } from '../../icons/Tv03Icon.js';
|
|
12
11
|
import { Button } from '../../ui/Button/index.js';
|
|
13
12
|
import { Empty } from '../shared/Empty.js';
|
|
13
|
+
import { News } from './News.js';
|
|
14
14
|
export function NewsFeedCarousel(props) {
|
|
15
15
|
const empty = props.newsFeed.length <= 0;
|
|
16
16
|
const heading = props.heading ?? 'News';
|
|
@@ -41,7 +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 font-semibold", children: heading }), _jsx("div", { className: "grow" }), _jsxs("div", { className: "flex items-center justify-center gap-xl", children: [_jsxs(Link, { href: viewAllUrl, className: "text-button-tertiary-fg flex gap-sm text-sm font-semibold", 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(_Fragment, { children: _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) => (
|
|
45
|
-
__html: news.content,
|
|
46
|
-
} })] }), _jsx(Button, { asChild: true, className: "mt-2xl", children: _jsx(Link, { href: `${viewDetailsUrl}/${news.id}`, children: "Read More" }) })] })] }, news.id))) }) }) }))] }));
|
|
44
|
+
return (_jsxs("div", { style: props.style, className: props.className, children: [_jsxs("div", { className: "flex items-center", children: [_jsx("h2", { className: "text-lg font-semibold", children: heading }), _jsx("div", { className: "grow" }), _jsxs("div", { className: "flex items-center justify-center gap-xl", children: [_jsxs(Link, { href: viewAllUrl, className: "text-button-tertiary-fg flex gap-sm text-sm font-semibold", 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(_Fragment, { children: _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))) }) }) }))] }));
|
|
47
45
|
}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import type { CSSProperties } from 'react';
|
|
2
|
-
import type { News } from '../../types';
|
|
2
|
+
import type { News as TNews } from '../../types';
|
|
3
3
|
export interface NewsFeedListProps {
|
|
4
4
|
layout: 'list';
|
|
5
|
-
newsFeed:
|
|
5
|
+
newsFeed: TNews[];
|
|
6
6
|
/** @default 'News' */
|
|
7
7
|
heading?: string;
|
|
8
8
|
/**
|
|
@@ -1,14 +1,10 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
import Image from 'next/image';
|
|
3
|
-
import Link from 'next/link';
|
|
4
2
|
import { Tv03Icon } from '../../icons/Tv03Icon.js';
|
|
5
|
-
import { Button } from '../../ui/Button/index.js';
|
|
6
3
|
import { Empty } from '../shared/Empty.js';
|
|
4
|
+
import { News } from './News.js';
|
|
7
5
|
export function NewsFeedList(props) {
|
|
8
6
|
const empty = props.newsFeed.length <= 0;
|
|
9
7
|
const heading = props.heading ?? 'News';
|
|
10
8
|
const viewDetailsUrl = props.viewDetailsUrl ?? '/news';
|
|
11
|
-
return (_jsxs("div", { style: props.style, className: props.className, children: [_jsx("h2", { className: "text-lg font-semibold", 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) => (
|
|
12
|
-
__html: news.content,
|
|
13
|
-
} })] }), _jsx(Button, { asChild: true, className: "mt-2xl", children: _jsx(Link, { href: `${viewDetailsUrl}/${news.id}`, children: "Read More" }) })] })] }, news.id))) }))] }));
|
|
9
|
+
return (_jsxs("div", { style: props.style, className: props.className, children: [_jsx("h2", { className: "text-lg font-semibold", 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))) }))] }));
|
|
14
10
|
}
|
|
@@ -1,7 +1,9 @@
|
|
|
1
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
1
|
+
import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
import { notFound } from 'next/navigation';
|
|
3
|
+
import { DOMAIN } from '../../constants/index.js';
|
|
3
4
|
import { prefetchPromoQuery } from '../../server/utils/prefetchPromoQuery.js';
|
|
4
5
|
import { getPromo } from '../../services/wallet.js';
|
|
6
|
+
import { stripTags } from '../../utils/stripTags.js';
|
|
5
7
|
import { Promo__client } from './Promo.client.js';
|
|
6
8
|
export async function Promo(props) {
|
|
7
9
|
const [result] = await Promise.allSettled([
|
|
@@ -9,7 +11,7 @@ export async function Promo(props) {
|
|
|
9
11
|
prefetchPromoQuery(props.id),
|
|
10
12
|
]);
|
|
11
13
|
if (result.status === 'fulfilled' && result.value) {
|
|
12
|
-
return _jsx(Promo__client, { ...props });
|
|
14
|
+
return (_jsxs(_Fragment, { children: [_jsx("meta", { name: "description", content: stripTags(result.value.description) }), _jsx("meta", { name: "og:title", content: result.value.name }), _jsx("meta", { name: "og:description", content: stripTags(result.value.description) }), _jsx("meta", { name: "og:image", content: result.value.banner.url }), _jsx("meta", { name: "twitter:title", content: result.value.name }), _jsx("meta", { name: "twitter:description", content: stripTags(result.value.description) }), _jsx("meta", { name: "twitter:image", content: result.value.banner.url }), _jsx("meta", { name: "twitter:card", content: "summary_large_image" }), _jsx("meta", { name: "twitter:site", content: DOMAIN }), _jsx(Promo__client, { ...props })] }));
|
|
13
15
|
}
|
|
14
16
|
else {
|
|
15
17
|
return notFound();
|
|
@@ -14,5 +14,5 @@ export function Cashback({ data, viewDetailsUrl }) {
|
|
|
14
14
|
return (_jsxs("div", { className: "border-border-secondary bg-accent-50 bg-bg-primary-alt relative flex h-full flex-col overflow-hidden rounded-2xl border", 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 pb-3xl pt-2xl", children: [_jsx("div", { className: "w-full grow text-center text-xl font-semibold", 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
|
-
}, children: "Get bonus" })), _jsx(Button, { size: "sm", variant: "outline", asChild: true, children: _jsx(Link, { href: `${viewDetailsUrl}/${data.id}`, children: "Read more" }) })] })] })] }));
|
|
17
|
+
}, children: "Get bonus" })), _jsx(Button, { size: "sm", variant: "outline", asChild: true, children: _jsx(Link, { href: `${viewDetailsUrl}/${data.id}`, "aria-label": `Read more about ${data.name}`, children: "Read more" }) })] })] })] }));
|
|
18
18
|
}
|
|
@@ -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: "border-border-secondary bg-accent-50 bg-bg-primary-alt relative flex h-full flex-col overflow-hidden rounded-2xl border", 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 pb-3xl pt-2xl", children: [_jsx("div", { className: "w-full grow text-center text-xl font-semibold", 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: _jsx(Link, { href: `${viewDetailsUrl}/${data.id}`, children: "Read more" }) }) })] })] }));
|
|
6
|
+
return (_jsxs("div", { className: "border-border-secondary bg-accent-50 bg-bg-primary-alt relative flex h-full flex-col overflow-hidden rounded-2xl border", 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 pb-3xl pt-2xl", children: [_jsx("div", { className: "w-full grow text-center text-xl font-semibold", 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: _jsx(Link, { href: `${viewDetailsUrl}/${data.id}`, "aria-label": `Read more about ${data.name}`, children: "Read more" }) }) })] })] }));
|
|
7
7
|
}
|
|
@@ -14,5 +14,5 @@ export function Promo({ data, viewDetailsUrl }) {
|
|
|
14
14
|
return (_jsxs("div", { className: "border-border-secondary bg-accent-50 bg-bg-primary-alt relative flex h-full flex-col overflow-hidden rounded-2xl border", 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 pb-3xl pt-2xl", children: [_jsx("div", { className: "w-full grow text-center text-xl font-semibold", 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
|
-
}, children: "Get bonus" })), _jsx(Button, { size: "sm", variant: "outline", asChild: true, children: _jsx(Link, { href: `${viewDetailsUrl}/${data.id}`, children: "Read more" }) })] })] })] }));
|
|
17
|
+
}, children: "Get bonus" })), _jsx(Button, { size: "sm", variant: "outline", asChild: true, children: _jsx(Link, { href: `${viewDetailsUrl}/${data.id}`, "aria-label": `Read more about ${data.name}`, children: "Read more" }) })] })] })] }));
|
|
18
18
|
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const stripTags: (html: string) => string;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@opexa/portal-components",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.160",
|
|
4
4
|
"exports": {
|
|
5
5
|
"./ui/*": {
|
|
6
6
|
"types": "./dist/ui/*/index.d.ts",
|
|
@@ -101,8 +101,8 @@
|
|
|
101
101
|
"@hookform/resolvers": "5.1.1",
|
|
102
102
|
"@opexa/object-id": "0.1.6",
|
|
103
103
|
"@tailwindcss/postcss": "4",
|
|
104
|
-
"@tanstack/react-query": "5.
|
|
105
|
-
"@tanstack/react-query-devtools": "5.
|
|
104
|
+
"@tanstack/react-query": "5.81.2",
|
|
105
|
+
"@tanstack/react-query-devtools": "5.81.2",
|
|
106
106
|
"@total-typescript/ts-reset": "0.6.1",
|
|
107
107
|
"@types/lodash-es": "4.17.12",
|
|
108
108
|
"@types/node": "24",
|