@opexa/portal-components 0.0.68 → 0.0.69

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.
Files changed (33) hide show
  1. package/dist/client/hooks/useBonusQuery.js +5 -2
  2. package/dist/client/hooks/useCashbackQuery.js +5 -2
  3. package/dist/client/hooks/usePromoQuery.js +5 -2
  4. package/dist/components/Bonus/Bonus.client.d.ts +1 -1
  5. package/dist/components/Bonus/Bonus.client.js +27 -1
  6. package/dist/components/Bonus/Bonus.js +7 -0
  7. package/dist/components/Bonuses/Bonuses.client.js +5 -6
  8. package/dist/components/Bonuses/Bonuses.d.ts +1 -6
  9. package/dist/components/Bonuses/BonusesTrigger.js +6 -2
  10. package/dist/components/Cashback/Cashback.client.js +11 -7
  11. package/dist/components/Cashback/Cashback.js +4 -7
  12. package/dist/components/DepositWithdrawal/Deposit/OnlineBankDeposit/OnlineBankDepositContext.d.ts +2 -2
  13. package/dist/components/DepositWithdrawal/Deposit/OnlineBankDeposit/useOnlineBankDeposit.d.ts +1 -1
  14. package/dist/components/DepositWithdrawal/Deposit/QRPHDeposit/QRPHDepositContext.d.ts +2 -2
  15. package/dist/components/DepositWithdrawal/Deposit/QRPHDeposit/useQRPHDeposit.d.ts +1 -1
  16. package/dist/components/JackpotCounter/JackpotCounterItem.module.css +184 -184
  17. package/dist/components/Promo/Promo.client.js +7 -3
  18. package/dist/components/Promo/Promo.js +2 -5
  19. package/dist/components/index.d.ts +0 -1
  20. package/dist/components/index.js +0 -1
  21. package/dist/server/utils/prefetchBonusQuery.js +5 -2
  22. package/dist/server/utils/prefetchCashbackQuery.js +5 -2
  23. package/dist/server/utils/prefetchPromoQuery.js +5 -2
  24. package/dist/styles/theme.css +696 -696
  25. package/package.json +157 -157
  26. package/dist/components/Promo/PromoContent.d.ts +0 -2
  27. package/dist/components/Promo/PromoContent.js +0 -9
  28. package/dist/components/Promos/PromoCarousel.d.ts +0 -2
  29. package/dist/components/Promos/PromoCarousel.js +0 -41
  30. package/dist/components/Promos/PromoGrid.d.ts +0 -2
  31. package/dist/components/Promos/PromoGrid.js +0 -12
  32. package/dist/components/Promos/PromoItem.d.ts +0 -7
  33. package/dist/components/Promos/PromoItem.js +0 -10
package/package.json CHANGED
@@ -1,157 +1,157 @@
1
- {
2
- "name": "@opexa/portal-components",
3
- "version": "0.0.68",
4
- "exports": {
5
- ".": {
6
- "types": "./dist/components/index.d.ts",
7
- "default": "./dist/components/index.js"
8
- },
9
- "./ui": {
10
- "types": "./dist/ui/index.d.ts",
11
- "default": "./dist/ui/index.js"
12
- },
13
- "./utils": {
14
- "types": "./dist/utils/index.d.ts",
15
- "import": "./dist/utils/index.js"
16
- },
17
- "./types": {
18
- "types": "./dist/types/index.d.ts",
19
- "import": "./dist/types/index.js"
20
- },
21
- "./handlers": {
22
- "types": "./dist/handlers.d.ts",
23
- "default": "./dist/handlers.js"
24
- },
25
- "./middleware": {
26
- "types": "./dist/middleware.d.ts",
27
- "default": "./dist/middleware.js"
28
- },
29
- "./client-utils": {
30
- "types": "./dist/client/utils/index.d.ts",
31
- "import": "./dist/client/utils/index.mjs",
32
- "require": "./dist/client/utils/index.js"
33
- },
34
- "./client-hooks": {
35
- "types": "./dist/client/hooks/index.d.ts",
36
- "default": "./dist/client/hooks/index.js"
37
- },
38
- "./client-services": {
39
- "types": "./dist/client/services/index.d.ts",
40
- "default": "./dist/client/services/index.js"
41
- },
42
- "./server-utils": {
43
- "types": "./dist/server/utils/index.d.ts",
44
- "default": "./dist/server/utils/index.js"
45
- },
46
- "./server-services": {
47
- "types": "./dist/server/services/index.d.ts",
48
- "default": "./dist/server/services/index.js"
49
- },
50
- "./next.config": {
51
- "types": "./dist/next.config.d.ts",
52
- "default": "./dist/next.config.js"
53
- },
54
- "./theme.css": "./dist/styles/theme.css",
55
- "./package.json": "./package.json"
56
- },
57
- "files": [
58
- "dist",
59
- "!dist/tsconfig.tsbuildinfo",
60
- "!dist/tsconfig.build.tsbuildinfo"
61
- ],
62
- "publishConfig": {
63
- "access": "public"
64
- },
65
- "scripts": {
66
- "dev": "next dev --port 4000 --turbopack",
67
- "build": "tsc --project tsconfig.build.json && tsc-alias -p tsconfig.build.json && copy-files-from-to",
68
- "build:app": "next build",
69
- "start": "next start",
70
- "lint": "next lint",
71
- "release": "release-it"
72
- },
73
- "dependencies": {
74
- "@ark-ui/react": "5.13.0",
75
- "@date-fns/tz": "1.2.0",
76
- "@next/third-parties": "15.3.3",
77
- "@tailwindcss/typography": "0.5.16",
78
- "date-fns": "4.1.0",
79
- "embla-carousel-autoplay": "8.6.0",
80
- "embla-carousel-react": "8.6.0",
81
- "is-mobile": "5.0.0",
82
- "lodash-es": "4.17.21",
83
- "next-themes": "0.4.6",
84
- "tailwind-merge": "3.3.0",
85
- "tailwind-variants": "1.0.0",
86
- "tailwindcss-plugin-zag": "0.1.0",
87
- "tiny-invariant": "1.3.3",
88
- "type-fest": "4.41.0",
89
- "usehooks-ts": "3.1.1",
90
- "zustand": "5.0.5"
91
- },
92
- "devDependencies": {
93
- "@eslint/eslintrc": "3",
94
- "@hookform/resolvers": "5.0.1",
95
- "@opexa/portal-sdk-core": "0.0.35",
96
- "@tailwindcss/postcss": "4",
97
- "@tanstack/react-query": "5.80.0",
98
- "@tanstack/react-query-devtools": "5.80.0",
99
- "@total-typescript/ts-reset": "0.6.1",
100
- "@types/lodash-es": "4.17.12",
101
- "@types/node": "22",
102
- "@types/react": "19",
103
- "@types/react-dom": "19",
104
- "copy-files-from-to": "^3.12.1",
105
- "eslint": "9",
106
- "eslint-config-next": "15.3.3",
107
- "next": "15.4.0-canary.61",
108
- "react": "19.1.0",
109
- "react-dom": "19.1.0",
110
- "react-hook-form": "7.57.0",
111
- "release-it": "19.0.3",
112
- "tailwindcss": "4.1.8",
113
- "tsc-alias": "^1.8.16",
114
- "typescript": "5",
115
- "zod": "3.25.49"
116
- },
117
- "peerDependencies": {
118
- "@hookform/resolvers": "^4.0.0 || ^5.0.0",
119
- "@opexa/portal-sdk-core": "^0.0.35",
120
- "@tanstack/react-query": "^5.0.0",
121
- "next": "^15.4.0-canary.1",
122
- "react": "^19.0.0",
123
- "react-dom": "^19.0.0",
124
- "react-hook-form": "^7.0.0",
125
- "tailwindcss": "^4.0.0",
126
- "zod": "^3.0.0"
127
- },
128
- "release-it": {
129
- "git": {
130
- "commitMessage": "chore: release ${npm.name} v${version}",
131
- "tagName": "${npm.name}@${version}"
132
- },
133
- "github": {
134
- "release": false
135
- },
136
- "hooks": {
137
- "before:bump": [
138
- "pnpm lint"
139
- ],
140
- "after:bump": [
141
- "pnpm build"
142
- ]
143
- }
144
- },
145
- "copyFiles": [
146
- {
147
- "from": "src/lib/**/*.{png,jpg,jpeg,gif,svg,css,json}",
148
- "to": "dist/",
149
- "toFlat": false
150
- }
151
- ],
152
- "copyFilesSettings": {
153
- "whenFileExists": "overwrite",
154
- "removeSourceMappingURL": true,
155
- "ignoreDotFilesAndFolders": false
156
- }
157
- }
1
+ {
2
+ "name": "@opexa/portal-components",
3
+ "version": "0.0.69",
4
+ "exports": {
5
+ ".": {
6
+ "types": "./dist/components/index.d.ts",
7
+ "default": "./dist/components/index.js"
8
+ },
9
+ "./ui": {
10
+ "types": "./dist/ui/index.d.ts",
11
+ "default": "./dist/ui/index.js"
12
+ },
13
+ "./utils": {
14
+ "types": "./dist/utils/index.d.ts",
15
+ "import": "./dist/utils/index.js"
16
+ },
17
+ "./types": {
18
+ "types": "./dist/types/index.d.ts",
19
+ "import": "./dist/types/index.js"
20
+ },
21
+ "./handlers": {
22
+ "types": "./dist/handlers.d.ts",
23
+ "default": "./dist/handlers.js"
24
+ },
25
+ "./middleware": {
26
+ "types": "./dist/middleware.d.ts",
27
+ "default": "./dist/middleware.js"
28
+ },
29
+ "./client-utils": {
30
+ "types": "./dist/client/utils/index.d.ts",
31
+ "import": "./dist/client/utils/index.mjs",
32
+ "require": "./dist/client/utils/index.js"
33
+ },
34
+ "./client-hooks": {
35
+ "types": "./dist/client/hooks/index.d.ts",
36
+ "default": "./dist/client/hooks/index.js"
37
+ },
38
+ "./client-services": {
39
+ "types": "./dist/client/services/index.d.ts",
40
+ "default": "./dist/client/services/index.js"
41
+ },
42
+ "./server-utils": {
43
+ "types": "./dist/server/utils/index.d.ts",
44
+ "default": "./dist/server/utils/index.js"
45
+ },
46
+ "./server-services": {
47
+ "types": "./dist/server/services/index.d.ts",
48
+ "default": "./dist/server/services/index.js"
49
+ },
50
+ "./next.config": {
51
+ "types": "./dist/next.config.d.ts",
52
+ "default": "./dist/next.config.js"
53
+ },
54
+ "./theme.css": "./dist/styles/theme.css",
55
+ "./package.json": "./package.json"
56
+ },
57
+ "files": [
58
+ "dist",
59
+ "!dist/tsconfig.tsbuildinfo",
60
+ "!dist/tsconfig.build.tsbuildinfo"
61
+ ],
62
+ "publishConfig": {
63
+ "access": "public"
64
+ },
65
+ "scripts": {
66
+ "dev": "next dev --port 4000 --turbopack",
67
+ "build": "tsc --project tsconfig.build.json && tsc-alias -p tsconfig.build.json && copy-files-from-to",
68
+ "build:app": "next build",
69
+ "start": "next start",
70
+ "lint": "next lint",
71
+ "release": "release-it"
72
+ },
73
+ "dependencies": {
74
+ "@ark-ui/react": "5.13.0",
75
+ "@date-fns/tz": "1.2.0",
76
+ "@next/third-parties": "15.3.3",
77
+ "@tailwindcss/typography": "0.5.16",
78
+ "date-fns": "4.1.0",
79
+ "embla-carousel-autoplay": "8.6.0",
80
+ "embla-carousel-react": "8.6.0",
81
+ "is-mobile": "5.0.0",
82
+ "lodash-es": "4.17.21",
83
+ "next-themes": "0.4.6",
84
+ "tailwind-merge": "3.3.0",
85
+ "tailwind-variants": "1.0.0",
86
+ "tailwindcss-plugin-zag": "0.1.0",
87
+ "tiny-invariant": "1.3.3",
88
+ "type-fest": "4.41.0",
89
+ "usehooks-ts": "3.1.1",
90
+ "zustand": "5.0.5"
91
+ },
92
+ "devDependencies": {
93
+ "@eslint/eslintrc": "3",
94
+ "@hookform/resolvers": "5.0.1",
95
+ "@opexa/portal-sdk-core": "0.0.35",
96
+ "@tailwindcss/postcss": "4",
97
+ "@tanstack/react-query": "5.80.0",
98
+ "@tanstack/react-query-devtools": "5.80.0",
99
+ "@total-typescript/ts-reset": "0.6.1",
100
+ "@types/lodash-es": "4.17.12",
101
+ "@types/node": "22",
102
+ "@types/react": "19",
103
+ "@types/react-dom": "19",
104
+ "copy-files-from-to": "^3.12.1",
105
+ "eslint": "9",
106
+ "eslint-config-next": "15.3.3",
107
+ "next": "15.4.0-canary.61",
108
+ "react": "19.1.0",
109
+ "react-dom": "19.1.0",
110
+ "react-hook-form": "7.57.0",
111
+ "release-it": "19.0.3",
112
+ "tailwindcss": "4.1.8",
113
+ "tsc-alias": "^1.8.16",
114
+ "typescript": "5",
115
+ "zod": "3.25.49"
116
+ },
117
+ "peerDependencies": {
118
+ "@hookform/resolvers": "^4.0.0 || ^5.0.0",
119
+ "@opexa/portal-sdk-core": "^0.0.35",
120
+ "@tanstack/react-query": "^5.0.0",
121
+ "next": "^15.4.0-canary.1",
122
+ "react": "^19.0.0",
123
+ "react-dom": "^19.0.0",
124
+ "react-hook-form": "^7.0.0",
125
+ "tailwindcss": "^4.0.0",
126
+ "zod": "^3.0.0"
127
+ },
128
+ "release-it": {
129
+ "git": {
130
+ "commitMessage": "chore: release ${npm.name} v${version}",
131
+ "tagName": "${npm.name}@${version}"
132
+ },
133
+ "github": {
134
+ "release": false
135
+ },
136
+ "hooks": {
137
+ "before:bump": [
138
+ "pnpm lint"
139
+ ],
140
+ "after:bump": [
141
+ "pnpm build"
142
+ ]
143
+ }
144
+ },
145
+ "copyFiles": [
146
+ {
147
+ "from": "src/lib/**/*.{png,jpg,jpeg,gif,svg,css,json}",
148
+ "to": "dist/",
149
+ "toFlat": false
150
+ }
151
+ ],
152
+ "copyFilesSettings": {
153
+ "whenFileExists": "overwrite",
154
+ "removeSourceMappingURL": true,
155
+ "ignoreDotFilesAndFolders": false
156
+ }
157
+ }
@@ -1,2 +0,0 @@
1
- import type { PromoProps } from './Promo';
2
- export declare function PromoContent(props: PromoProps): import("react/jsx-runtime").JSX.Element;
@@ -1,9 +0,0 @@
1
- 'use client';
2
- import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
3
- import Image from 'next/image';
4
- import Link from 'next/link';
5
- import { ChevronLeftIcon } from '../../icons/index.js';
6
- import { Button, Prose } from '../../ui/index.js';
7
- export function PromoContent(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: "https://s3.ap-east-1.amazonaws.com/opexa-assets.opexasystem.com/assets/BSxIXEsa59_zzMAR27-ALLDAYREBATE06-STATIC-WEB-HB-1920x1080.png", alt: "", width: 1024, height: 600, className: "mt-xl h-auto w-full rounded-xl lg:mt-6" }), _jsx(Button, { className: "mt-xl lg:mt-6", children: "Deposit Now" }), _jsx("h1", { className: "mt-xl text-2xl font-semibold lg:mt-6 lg:text-3xl", children: "Welcome Bonus 100% up to $500 + 10 Free Spins" }), _jsx("p", { className: "text-text-secondary-700 mt-xl lg:mt-6", children: "Ends 5/26/2025, 1:59:59 AM" }), _jsxs(Prose, { className: "mt-2xl lg:mt-6", children: [_jsx("p", { children: "Mi tincidunt elit, id quisque ligula ac diam, amet. Vel etiam suspendisse morbi eleifend faucibus eget vestibulum felis. Dictum quis montes, sit sit. Tellus aliquam enim urna, etiam. Mauris posuere vulputate arcu amet, vitae nisi, tellus tincidunt. At feugiat sapien varius id." }), _jsx("p", { children: "Eget quis mi enim, leo lacinia pharetra, semper. Eget in volutpat mollis at volutpat lectus velit, sed auctor. Porttitor fames arcu quis fusce augue enim. Quis at habitant diam at. Suscipit tristique risus, at donec. In turpis vel et quam imperdiet. Ipsum molestie aliquet sodales id est ac volutpat." }), _jsx("p", { children: "Ipsum sit mattis nulla quam nulla. Gravida id gravida ac enim mauris id. Non pellentesque congue eget consectetur turpis. Sapien, dictum molestie sem tempor. Diam elit, orci, tincidunt aenean tempus. Quis velit eget ut tortor tellus. Sed vel, congue felis elit erat nam nibh orci." }), _jsx("p", { children: "Dolor enim eu tortor urna sed duis nulla. Aliquam vestibulum, nulla odio nisl vitae. In aliquet pellentesque aenean hac vestibulum turpis mi bibendum diam. Tempor integer aliquam in vitae malesuada fringilla." }), _jsx("p", { children: "Elit nisi in eleifend sed nisi. Pulvinar at orci, proin imperdiet commodo consectetur convallis risus. Sed condimentum enim dignissim adipiscing faucibus consequat, urna. Viverra purus et erat auctor aliquam. Risus, volutpat vulputate posuere purus sit congue convallis aliquet. Arcu id augue ut feugiat donec porttitor neque. Mauris, neque ultricies eu vestibulum, bibendum quam lorem id. Dolor lacus, eget nunc lectus in tellus, pharetra, porttitor." }), _jsx("p", { children: "Ipsum sit mattis nulla quam nulla. Gravida id gravida ac enim mauris id. Non pellentesque congue eget consectetur turpis. Sapien, dictum molestie sem tempor. Diam elit, orci, tincidunt aenean tempus. Quis velit eget ut tortor tellus. Sed vel, congue felis elit erat nam nibh orci." }), _jsx("h5", { children: "General Conditions:" }), _jsx("p", { children: "Mi tincidunt elit, id quisque ligula ac diam, amet. Vel etiam suspendisse morbi eleifend faucibus eget vestibulum felis. Dictum quis montes, sit sit. Tellus aliquam enim urna, etiam. Mauris posuere vulputate arcu amet, vitae nisi, tellus tincidunt. At feugiat sapien varius id." }), _jsx("p", { children: "Eget quis mi enim, leo lacinia pharetra, semper. Eget in volutpat mollis at volutpat lectus velit, sed auctor. Porttitor fames arcu quis fusce augue enim. Quis at habitant diam at. Suscipit tristique risus, at donec. In turpis vel et quam imperdiet. Ipsum molestie aliquet sodales id est ac volutpat." })] }), _jsxs(Prose, { className: "bg-bg-secondary mt-xl rounded-2xl p-2xl lg:mt-16 lg:p-4xl", children: [_jsx("h2", { children: "Conclusion" }), _jsx("p", { children: "Morbi sed imperdiet in ipsum, adipiscing elit dui lectus. Tellus id scelerisque est ultricies ultricies. Duis est sit sed leo nisl, blandit elit sagittis. Quisque tristique consequat quam sed. Nisl at scelerisque amet nulla purus habitasse." }), _jsx("p", { children: "Nunc sed faucibus bibendum feugiat sed interdum. Ipsum egestas condimentum mi massa. In tincidunt pharetra consectetur sed duis facilisis metus. Etiam egestas in nec sed et. Quis lobortis at sit dictum eget nibh tortor commodo cursus." }), _jsx("p", { children: "Odio felis sagittis, morbi feugiat tortor vitae feugiat fusce aliquet. Nam elementum urna nisi aliquet erat dolor enim. Ornare id morbi eget ipsum. Aliquam senectus neque ut id eget consectetur dictum. Donec posuere pharetra odio consequat scelerisque et, nunc tortor." })] })] }));
9
- }
@@ -1,2 +0,0 @@
1
- import type { PromosProps } from './Promos';
2
- export declare function PromoCarousel(props: PromosProps): import("react/jsx-runtime").JSX.Element;
@@ -1,41 +0,0 @@
1
- 'use client';
2
- import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
3
- import useEmblaCarousel, {} from 'embla-carousel-react';
4
- import Link from 'next/link';
5
- import { useCallback, useEffect, useState } from 'react';
6
- import { twMerge } from 'tailwind-merge';
7
- import { usePromosQuery } from '../../client/hooks/index.js';
8
- import { ArrowLeftIcon, ArrowRightIcon, ChevronRightIcon, Gift01Icon, } from '../../icons/index.js';
9
- import { Button } from '../../ui/index.js';
10
- import { Empty } from '../Empty.js';
11
- import { PromosItem } from './PromoItem.js';
12
- export function PromoCarousel(props) {
13
- const promosQuery = usePromosQuery({});
14
- const promos = promosQuery.data || [];
15
- const [emblaRef, emblaApi] = useEmblaCarousel({
16
- align: 'start',
17
- slidesToScroll: 1,
18
- breakpoints: {
19
- '(min-width: 1024px)': {
20
- slidesToScroll: 3,
21
- },
22
- },
23
- });
24
- const [prevBtnDisabled, setPrevBtnDisabled] = useState(true);
25
- const [nextBtnDisabled, setNextBtnDisabled] = useState(true);
26
- const onPrevButtonClick = useCallback(() => emblaApi?.scrollPrev(), [emblaApi]);
27
- const onNextButtonClick = useCallback(async () => {
28
- emblaApi?.scrollNext();
29
- }, [emblaApi]);
30
- const onSelect = useCallback((emblaApi) => {
31
- setPrevBtnDisabled(!emblaApi?.canScrollPrev());
32
- setNextBtnDisabled(!emblaApi?.canScrollNext());
33
- }, []);
34
- useEffect(() => {
35
- if (!emblaApi)
36
- return;
37
- onSelect(emblaApi);
38
- emblaApi.on('reInit', onSelect).on('select', onSelect);
39
- }, [emblaApi, onSelect]);
40
- return (_jsxs("div", { className: props.className, children: [_jsxs("div", { className: "flex items-center", children: [_jsx("h2", { className: "text-lg font-semibold", children: props.heading ?? 'Promotions' }), _jsx("div", { className: "grow" }), _jsxs("div", { className: "flex items-center justify-center gap-xl", children: [_jsxs(Link, { href: props.viewAllUrl ?? '/promos', className: "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" }) })] })] })] }), promos.length <= 0 && (_jsx(Empty, { icon: Gift01Icon, title: "No Promos", message: "No promo is currently available.", className: "mt-8" })), promos.length >= 1 && (_jsx("div", { ref: emblaRef, className: "relative mt-lg lg:overflow-hidden", children: _jsx("div", { className: twMerge('grid auto-cols-[calc((100%-(0.375rem*2))/1)] grid-flow-col gap-sm lg:auto-cols-[calc((100%-(0.5rem*5))/3)] lg:gap-md'), children: promos.map((promo) => (_jsx(PromosItem, { promo: promo, shouldShowDescription: props.shouldShowDescription }, promo.id))) }) }))] }));
41
- }
@@ -1,2 +0,0 @@
1
- import type { PromosProps } from './Promos';
2
- export declare function PromoGrid(props: PromosProps): import("react/jsx-runtime").JSX.Element;
@@ -1,12 +0,0 @@
1
- 'use client';
2
- import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
3
- import { twMerge } from 'tailwind-merge';
4
- import { usePromosQuery } from '../../client/hooks/index.js';
5
- import { Gift01Icon } from '../../icons/index.js';
6
- import { Empty } from '../Empty.js';
7
- import { PromosItem } from './PromoItem.js';
8
- export function PromoGrid(props) {
9
- const promosQuery = usePromosQuery({});
10
- const promos = promosQuery.data || [];
11
- return (_jsxs("div", { className: props.className, children: [_jsxs("div", { className: "flex items-center", children: [_jsx("h2", { className: "text-lg font-semibold", children: props.heading ?? 'Promos' }), _jsx("div", { className: "grow" })] }), promos.length <= 0 && (_jsx(Empty, { icon: Gift01Icon, title: "No Promos", message: "No promo is currently available.", className: "mt-lg" })), promos.length >= 1 && (_jsx("div", { className: "relative mt-lg lg:overflow-hidden", children: _jsx("div", { className: twMerge('grid grid-cols-1 gap-sm lg:grid-cols-3 lg:gap-md'), children: promos.map((promo) => (_jsx(PromosItem, { promo: promo, shouldShowDescription: props.shouldShowDescription }, promo.id))) }) }))] }));
12
- }
@@ -1,7 +0,0 @@
1
- import type { Promo } from '@opexa/portal-sdk-core';
2
- interface PromosItemProps {
3
- promo: Promo;
4
- shouldShowDescription?: boolean;
5
- }
6
- export declare function PromosItem(props: PromosItemProps): import("react/jsx-runtime").JSX.Element;
7
- export {};
@@ -1,10 +0,0 @@
1
- import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
- import Image from 'next/image';
3
- import { useRouter } from 'next/navigation';
4
- import { twJoin } from 'tailwind-merge';
5
- import { Button } from '../../ui/index.js';
6
- export function PromosItem(props) {
7
- const { promo } = props;
8
- const router = useRouter();
9
- return (_jsxs("div", { className: "border-border-primary bg-accent-50 relative flex h-full flex-col rounded-md border", children: [promo.banner.url && (_jsx(Image, { src: promo.banner.url, alt: promo.name, width: 1200, height: 500, priority: true, className: "aspect-[1200/500] w-full rounded-t-md object-cover" })), _jsxs("div", { className: "flex flex-grow flex-col p-4", children: [_jsx("p", { className: twJoin('w-full text-xl font-bold', props.shouldShowDescription ? 'text-start' : 'text-center'), children: promo.name }), props.shouldShowDescription && promo.description && (_jsx("p", { className: "text-gray-600 mb-2 line-clamp-2 w-full overflow-hidden text-start text-sm", dangerouslySetInnerHTML: { __html: promo.description } })), _jsx("div", { className: "mt-auto pt-4", children: _jsx(Button, { className: "w-full text-sm font-semibold", onClick: () => router.push(`/promos/${promo.id}`), children: "Get Bonus" }) })] })] }, promo.id));
10
- }