@opexa/portal-components 0.0.26 → 0.0.27

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 (97) hide show
  1. package/dist/client/hooks/index.d.ts +1 -0
  2. package/dist/client/hooks/useGlobalStore.d.ts +5 -4
  3. package/dist/client/hooks/useGlobalStore.js +1 -1
  4. package/dist/client/hooks/useGlobalStore.mjs +20 -9
  5. package/dist/client/hooks/useProfileCompletionQuery.d.ts +3 -0
  6. package/dist/client/hooks/useProfileCompletionQuery.js +1 -0
  7. package/dist/client/hooks/useProfileCompletionQuery.mjs +38 -0
  8. package/dist/client-hooks.js +1 -1
  9. package/dist/client-hooks.mjs +34 -32
  10. package/dist/components/Account/Account.d.ts +8 -0
  11. package/dist/components/Account/Account.js +1 -1
  12. package/dist/components/Account/Account.mjs +346 -201
  13. package/dist/components/Account/account.recipe.js +1 -1
  14. package/dist/components/Account/account.recipe.mjs +4 -4
  15. package/dist/components/AccountInfo/AccountInfo.d.ts +4 -0
  16. package/dist/components/AccountInfo/AccountInfo.js +1 -0
  17. package/dist/components/AccountInfo/AccountInfo.mjs +148 -0
  18. package/dist/components/AccountInfo/index.d.ts +1 -0
  19. package/dist/components/AccountPaymentMethods/AccountPaymentMethods.d.ts +1 -0
  20. package/dist/components/AccountPaymentMethods/AccountPaymentMethods.js +1 -0
  21. package/dist/components/AccountPaymentMethods/AccountPaymentMethods.mjs +6 -0
  22. package/dist/components/AccountPaymentMethods/index.d.ts +1 -0
  23. package/dist/components/AccountSecurity/AccountSecurity.d.ts +4 -0
  24. package/dist/components/AccountSecurity/AccountSecurity.js +1 -0
  25. package/dist/components/AccountSecurity/AccountSecurity.mjs +159 -0
  26. package/dist/components/AccountSecurity/index.d.ts +1 -0
  27. package/dist/components/AccountVerification/AccountVerification.d.ts +1 -0
  28. package/dist/components/AccountVerification/AccountVerification.js +1 -0
  29. package/dist/components/AccountVerification/AccountVerification.mjs +6 -0
  30. package/dist/components/AccountVerification/index.d.ts +1 -0
  31. package/dist/components/JackpotCounter/JackpotCounterItem.js +1 -1
  32. package/dist/components/JackpotCounter/JackpotCounterItem.mjs +36 -36
  33. package/dist/components/Jackpots/JackpotGameProviders.d.ts +5 -1
  34. package/dist/components/Jackpots/JackpotGameProviders.js +1 -1
  35. package/dist/components/Jackpots/JackpotGameProviders.mjs +33 -31
  36. package/dist/components/Jackpots/JackpotItemDesktop.d.ts +9 -0
  37. package/dist/components/Jackpots/JackpotItemDesktop.js +1 -0
  38. package/dist/components/Jackpots/{JackpotItem.mjs → JackpotItemDesktop.mjs} +121 -173
  39. package/dist/components/Jackpots/JackpotItemMobile.d.ts +3 -1
  40. package/dist/components/Jackpots/JackpotItemMobile.js +1 -1
  41. package/dist/components/Jackpots/JackpotItemMobile.mjs +133 -180
  42. package/dist/components/Jackpots/Jackpots.d.ts +2 -0
  43. package/dist/components/Jackpots/Jackpots.js +1 -1
  44. package/dist/components/Jackpots/Jackpots.mjs +15 -13
  45. package/dist/components/Jackpots/useJackpotItemData.d.ts +21 -0
  46. package/dist/components/Jackpots/useJackpotItemData.js +1 -0
  47. package/dist/components/Jackpots/useJackpotItemData.mjs +100 -0
  48. package/dist/components/index.d.ts +4 -0
  49. package/dist/components.js +1 -1
  50. package/dist/components.mjs +74 -66
  51. package/dist/icons/CheckVerified02Icon.d.ts +2 -0
  52. package/dist/icons/CheckVerified02Icon.js +1 -0
  53. package/dist/icons/CheckVerified02Icon.mjs +22 -0
  54. package/dist/icons/CreditCard02Icon.d.ts +2 -0
  55. package/dist/icons/CreditCard02Icon.js +1 -0
  56. package/dist/icons/CreditCard02Icon.mjs +22 -0
  57. package/dist/icons/FileCheck02Icon.d.ts +2 -0
  58. package/dist/icons/FileCheck02Icon.js +1 -0
  59. package/dist/icons/FileCheck02Icon.mjs +22 -0
  60. package/dist/icons/Lock01Icon.d.ts +2 -0
  61. package/dist/icons/Lock01Icon.js +1 -0
  62. package/dist/icons/Lock01Icon.mjs +22 -0
  63. package/dist/icons/index.d.ts +4 -0
  64. package/dist/icons.js +1 -1
  65. package/dist/icons.mjs +92 -84
  66. package/dist/server/utils/index.d.ts +1 -0
  67. package/dist/server/utils/prefetchProfileCompletionQuery.d.ts +1 -0
  68. package/dist/server/utils/prefetchProfileCompletionQuery.js +1 -0
  69. package/dist/server/utils/prefetchProfileCompletionQuery.mjs +26 -0
  70. package/dist/server-utils.js +1 -1
  71. package/dist/server-utils.mjs +28 -26
  72. package/dist/theme.css +49 -0
  73. package/dist/ui/Checkbox/checkbox.recipe.js +1 -1
  74. package/dist/ui/Checkbox/checkbox.recipe.mjs +3 -3
  75. package/dist/ui/Clipboard/clipboard.recipe.js +1 -1
  76. package/dist/ui/Clipboard/clipboard.recipe.mjs +8 -8
  77. package/dist/ui/Field/field.recipe.js +1 -1
  78. package/dist/ui/Field/field.recipe.mjs +4 -2
  79. package/dist/ui/IconButton/iconButton.recipe.d.ts +1 -0
  80. package/dist/ui/IconButton/iconButton.recipe.js +1 -1
  81. package/dist/ui/IconButton/iconButton.recipe.mjs +1 -0
  82. package/dist/ui/NumberInput/numberInput.recipe.js +1 -1
  83. package/dist/ui/NumberInput/numberInput.recipe.mjs +3 -3
  84. package/dist/ui/PasswordInput/passwordInput.recipe.js +1 -1
  85. package/dist/ui/PasswordInput/passwordInput.recipe.mjs +3 -3
  86. package/dist/ui/PinInput/pinInput.recipe.js +1 -1
  87. package/dist/ui/PinInput/pinInput.recipe.mjs +1 -1
  88. package/dist/ui/Select/select.recipe.js +1 -1
  89. package/dist/ui/Select/select.recipe.mjs +3 -3
  90. package/dist/utils/queryKeys.d.ts +1 -0
  91. package/dist/utils/queryKeys.js +1 -1
  92. package/dist/utils/queryKeys.mjs +71 -68
  93. package/dist/utils.js +1 -1
  94. package/dist/utils.mjs +20 -19
  95. package/package.json +1 -1
  96. package/dist/components/Jackpots/JackpotItem.d.ts +0 -7
  97. package/dist/components/Jackpots/JackpotItem.js +0 -1
@@ -24,7 +24,7 @@ import { useLocaleInfo as L } from "../../client/hooks/useLocaleInfo.mjs";
24
24
  import "usehooks-ts";
25
25
  import { useJackpotPayoutsQuery as T } from "../../client/hooks/useJackpotPayoutsQuery.mjs";
26
26
  import { ArrowNarrowUpRightIcon as S } from "../../icons/ArrowNarrowUpRightIcon.mjs";
27
- import { ChevronLeftIcon as x } from "../../icons/ChevronLeftIcon.mjs";
27
+ import { ChevronLeftIcon as b } from "../../icons/ChevronLeftIcon.mjs";
28
28
  import { ChevronRightIcon as d } from "../../icons/ChevronRightIcon.mjs";
29
29
  import { StarIcon as w } from "../../icons/StarIcon.mjs";
30
30
  import { Trophy01Icon as P } from "../../icons/Trophy01Icon.mjs";
@@ -32,10 +32,10 @@ import q from "../../images/close-chest.png.mjs";
32
32
  import M from "../../images/first-place.png.mjs";
33
33
  import R from "../../images/leaderboard.png.mjs";
34
34
  import O from "../../images/open-chest.png.mjs";
35
- import s from "./JackpotCounterItem.module.css.mjs";
35
+ import o from "./JackpotCounterItem.module.css.mjs";
36
36
  function Ne({
37
37
  jackpot: t,
38
- className: o,
38
+ className: c,
39
39
  viewAllUrl: u
40
40
  }) {
41
41
  var N;
@@ -50,22 +50,22 @@ function Ne({
50
50
  cursor: "AMOUNT",
51
51
  order: "DESC"
52
52
  }
53
- }).data) == null ? void 0 : N.pages[0].edges.map((c) => c.node)) ?? [], b = h[0] ?? [], m = L(), i = t.drawing, z = i ? t.maximumJackpotPoolLimit : t.pool, g = D(
54
- ({ index: c }) => /* @__PURE__ */ e(
55
- i ? x : d,
53
+ }).data) == null ? void 0 : N.pages[0].edges.map((s) => s.node)) ?? [], f = h[0] ?? [], m = L(), i = t.drawing, z = i ? t.maximumJackpotPoolLimit : t.pool, g = D(
54
+ ({ index: s }) => /* @__PURE__ */ e(
55
+ i ? b : d,
56
56
  {
57
57
  className: a(
58
58
  "scale-400 lg:scale-250 text-brand-300 min-w-2.5 lg:min-w-4",
59
- i ? s["animate-wave-color-error"] : s["animate-wave-color-success"]
59
+ i ? o["animate-wave-color-error"] : o["animate-wave-color-success"]
60
60
  ),
61
61
  style: {
62
- animationDelay: i ? `${(40 - c - 1) * 0.1}s` : `${c * 0.1}s`
62
+ animationDelay: i ? `${(40 - s - 1) * 0.1}s` : `${s * 0.1}s`
63
63
  }
64
64
  }
65
65
  ),
66
66
  [i]
67
67
  ), I = J(
68
- () => Array.from({ length: 40 }, (c, l) => /* @__PURE__ */ e(g, { isFirst: l === 0, index: l }, l)),
68
+ () => Array.from({ length: 40 }, (s, l) => /* @__PURE__ */ e(g, { isFirst: l === 0, index: l }, l)),
69
69
  [g]
70
70
  );
71
71
  return /* @__PURE__ */ r(
@@ -73,7 +73,7 @@ function Ne({
73
73
  {
74
74
  className: a(
75
75
  "bg-bg-tertiary border-border-primary relative flex shrink-0 rounded-2xl border p-3 text-center lg:gap-4 lg:p-5",
76
- o
76
+ c
77
77
  ),
78
78
  children: [
79
79
  /* @__PURE__ */ r("div", { className: "z-1 relative flex flex-1 flex-col", children: [
@@ -106,15 +106,15 @@ function Ne({
106
106
  }
107
107
  ) })
108
108
  ] }),
109
- b.amount ? /* @__PURE__ */ e("div", { children: /* @__PURE__ */ r("div", { className: "bg-bg-primary relative mt-4 hidden w-full gap-4 rounded-lg p-4 lg:flex", children: [
109
+ f.amount ? /* @__PURE__ */ e("div", { children: /* @__PURE__ */ r("div", { className: "bg-bg-primary relative mt-4 hidden w-full gap-4 rounded-lg p-4 lg:flex", children: [
110
110
  /* @__PURE__ */ e("div", { className: "border-yellow-400 relative h-18 w-18 rounded-full border", children: /* @__PURE__ */ e("div", { className: "bg-yellow-400 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] text-xs font-bold", children: "1st" }) }),
111
111
  /* @__PURE__ */ r("div", { className: "flex flex-col gap-1 text-left", children: [
112
112
  /* @__PURE__ */ r("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: [
113
113
  /* @__PURE__ */ e(P, { className: "text-utility-brand-600 size-3.5" }),
114
114
  "Top Payout"
115
115
  ] }),
116
- /* @__PURE__ */ e("div", { className: "font-semibold", children: C(b.member.name) }),
117
- /* @__PURE__ */ e("div", { className: "text-brand-400 text-2xl", children: n(b.amount, {
116
+ /* @__PURE__ */ e("div", { className: "font-semibold", children: C(f.member.name) }),
117
+ /* @__PURE__ */ e("div", { className: "text-brand-400 text-2xl", children: n(f.amount, {
118
118
  currency: m.currency.code,
119
119
  minDecimalPlaces: 2,
120
120
  maxDecimalPlaces: 2
@@ -154,9 +154,9 @@ function Ne({
154
154
  {
155
155
  className: a(
156
156
  "absolute left-0",
157
- s["animate-arrow-red-flash-1"]
157
+ o["animate-arrow-red-flash-1"]
158
158
  ),
159
- children: /* @__PURE__ */ e(x, { className: "size-4.5" })
159
+ children: /* @__PURE__ */ e(b, { className: "size-4.5" })
160
160
  }
161
161
  ),
162
162
  /* @__PURE__ */ e(
@@ -164,9 +164,9 @@ function Ne({
164
164
  {
165
165
  className: a(
166
166
  "absolute left-1.5",
167
- s["animate-arrow-red-flash-2"]
167
+ o["animate-arrow-red-flash-2"]
168
168
  ),
169
- children: /* @__PURE__ */ e(x, { className: "size-4.5" })
169
+ children: /* @__PURE__ */ e(b, { className: "size-4.5" })
170
170
  }
171
171
  ),
172
172
  /* @__PURE__ */ e(
@@ -174,9 +174,9 @@ function Ne({
174
174
  {
175
175
  className: a(
176
176
  "absolute left-3",
177
- s["animate-arrow-red-flash-3"]
177
+ o["animate-arrow-red-flash-3"]
178
178
  ),
179
- children: /* @__PURE__ */ e(x, { className: "size-4.5" })
179
+ children: /* @__PURE__ */ e(b, { className: "size-4.5" })
180
180
  }
181
181
  )
182
182
  ] }) : /* @__PURE__ */ r("div", { className: "flex w-6 items-center", children: [
@@ -185,7 +185,7 @@ function Ne({
185
185
  {
186
186
  className: a(
187
187
  "absolute left-0",
188
- s["animate-arrow-green-flash-1"]
188
+ o["animate-arrow-green-flash-1"]
189
189
  ),
190
190
  children: /* @__PURE__ */ e(d, { className: "size-4.5" })
191
191
  }
@@ -195,7 +195,7 @@ function Ne({
195
195
  {
196
196
  className: a(
197
197
  "absolute left-1.5",
198
- s["animate-arrow-green-flash-2"]
198
+ o["animate-arrow-green-flash-2"]
199
199
  ),
200
200
  children: /* @__PURE__ */ e(d, { className: "size-4.5" })
201
201
  }
@@ -205,7 +205,7 @@ function Ne({
205
205
  {
206
206
  className: a(
207
207
  "absolute left-3",
208
- s["animate-arrow-green-flash-3"]
208
+ o["animate-arrow-green-flash-3"]
209
209
  ),
210
210
  children: /* @__PURE__ */ e(d, { className: "size-4.5" })
211
211
  }
@@ -281,7 +281,7 @@ function Ne({
281
281
  {
282
282
  className: a(
283
283
  "max-h-[272px] overflow-y-scroll",
284
- s.scrollArea
284
+ o.scrollArea
285
285
  ),
286
286
  children: /* @__PURE__ */ e("div", { className: "border-gray-200 overflow-hidden rounded-xl", children: /* @__PURE__ */ r("table", { className: "w-full", children: [
287
287
  /* @__PURE__ */ e("thead", { children: /* @__PURE__ */ r("tr", { className: "bg-bg-secondary text-text-tertiary-600 h-8 text-xs font-medium", children: [
@@ -290,7 +290,7 @@ function Ne({
290
290
  /* @__PURE__ */ e("th", { children: "Multiplier" }),
291
291
  /* @__PURE__ */ e("th", { children: "Prize" })
292
292
  ] }) }),
293
- /* @__PURE__ */ e("tbody", { children: h.length ? /* @__PURE__ */ e(v, { children: h.map((c, l) => /* @__PURE__ */ r(
293
+ /* @__PURE__ */ e("tbody", { children: h.length ? /* @__PURE__ */ e(v, { children: h.map((s, l) => /* @__PURE__ */ r(
294
294
  "tr",
295
295
  {
296
296
  className: "bg-bg-primary text-text-secondary-700 text-sm",
@@ -301,7 +301,7 @@ function Ne({
301
301
  {
302
302
  className: a(
303
303
  "mx-auto size-6.5",
304
- f[l].starColor
304
+ x[l].starColor
305
305
  )
306
306
  }
307
307
  ),
@@ -310,18 +310,18 @@ function Ne({
310
310
  {
311
311
  className: a(
312
312
  "absolute inset-0 mt-0.5 flex items-center justify-center text-2xs font-bold",
313
- f[l].numberColor
313
+ x[l].numberColor
314
314
  ),
315
315
  children: l + 1
316
316
  }
317
317
  )
318
318
  ] }) : l + 1 }),
319
- /* @__PURE__ */ e("td", { className: "border-border-secondary h-12 border-t-2", children: C(c.member.name) }),
319
+ /* @__PURE__ */ e("td", { className: "border-border-secondary h-12 border-t-2", children: C(s.member.name) }),
320
320
  /* @__PURE__ */ r("td", { className: "border-border-secondary h-12 border-t-2", children: [
321
- c.multiplier,
321
+ s.multiplier,
322
322
  "x"
323
323
  ] }),
324
- /* @__PURE__ */ e("td", { className: "border-border-secondary text-brand-400 h-12 border-t-2", children: n(b.amount, {
324
+ /* @__PURE__ */ e("td", { className: "border-border-secondary text-brand-400 h-12 border-t-2", children: n(s.amount, {
325
325
  currency: m.currency.code,
326
326
  minDecimalPlaces: 2,
327
327
  maxDecimalPlaces: 2
@@ -329,7 +329,7 @@ function Ne({
329
329
  ]
330
330
  },
331
331
  l
332
- )) }) : /* @__PURE__ */ e(v, { children: Array.from({ length: 10 }).map((c, l) => /* @__PURE__ */ r(
332
+ )) }) : /* @__PURE__ */ e(v, { children: Array.from({ length: 10 }).map((s, l) => /* @__PURE__ */ r(
333
333
  "tr",
334
334
  {
335
335
  className: "bg-bg-primary text-text-secondary-700 text-sm",
@@ -340,7 +340,7 @@ function Ne({
340
340
  {
341
341
  className: a(
342
342
  "mx-auto size-6.5",
343
- f[l].starColor
343
+ x[l].starColor
344
344
  )
345
345
  }
346
346
  ),
@@ -349,7 +349,7 @@ function Ne({
349
349
  {
350
350
  className: a(
351
351
  "absolute inset-0 mt-0.5 flex items-center justify-center text-2xs font-bold",
352
- f[l].numberColor
352
+ x[l].numberColor
353
353
  ),
354
354
  children: l + 1
355
355
  }
@@ -370,7 +370,7 @@ function Ne({
370
370
  "div",
371
371
  {
372
372
  className: a(
373
- s["light-rays"],
373
+ o["light-rays"],
374
374
  "absolute right-0 top-0 rounded-2xl [--light-rays-top:25%] lg:[--light-rays-top:150px]"
375
375
  )
376
376
  }
@@ -382,10 +382,10 @@ function Ne({
382
382
  function C(t) {
383
383
  if (t.length <= 7)
384
384
  return "*".repeat(t.length);
385
- const o = t.slice(0, 3), u = "*".repeat(7);
386
- return o + u;
385
+ const c = t.slice(0, 3), u = "*".repeat(7);
386
+ return c + u;
387
387
  }
388
- const Q = (t, o) => o === 0 ? 0 : t / o * 100, $ = (t, o) => (o === 0 ? 0 : t / o * 100) <= 90 ? "The jackpot is heating up! Keep playing to stay in the action and watch it grow!" : "🔥 It’s about to pop! Stay in the game for your shot at the prize!", f = [
388
+ const Q = (t, c) => c === 0 ? 0 : t / c * 100, $ = (t, c) => (c === 0 ? 0 : t / c * 100) <= 90 ? "The jackpot is heating up! Keep playing to stay in the action and watch it grow!" : "🔥 It’s about to pop! Stay in the game for your shot at the prize!", x = [
389
389
  {
390
390
  starColor: "text-yellow-400",
391
391
  numberColor: "text-bg-primary"
@@ -1 +1,5 @@
1
- export declare function JackpotGameProviders(): import("react").JSX.Element;
1
+ import { GameProviderData } from '../../types';
2
+ export interface JackpotGameProvidersProps {
3
+ gameProviders: GameProviderData[];
4
+ }
5
+ export declare function JackpotGameProviders({ gameProviders, }: JackpotGameProvidersProps): import("react").JSX.Element;
@@ -1 +1 @@
1
- "use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("react/jsx-runtime"),m=require("embla-carousel-react"),x=require("next/image"),s=require("react"),f=require("../../icons/ArrowLeftIcon.js"),v=require("../../icons/ArrowRightIcon.js"),N=require("../../images/fantasma-games.png.js"),b=require("../../images/hacksaw-gaming.png.js");require("../../ui/AlertDialog/AlertDialog.js");require("../../ui/Avatar/Avatar.js");require("../../ui/Badge/Badge.js");const a=require("../../ui/Button/Button.js");require("../../ui/Checkbox/Checkbox.js");require("../../ui/Clipboard/Clipboard.js");require("../../ui/Collapsible/Collapsible.js");require("../../ui/Combobox/Combobox.js");require("../../ui/DatePicker/DatePicker.js");require("../../ui/Dialog/Dialog.js");require("../../ui/Drawer/Drawer.js");require("../../ui/Field/Field.js");require("@ark-ui/react");require("../../utils/capitalize.js");require("../../utils/parseDecimal.js");require("../../constants/index.js");require("../../utils/getLocaleInfo.js");require("../../utils/getQueryClient.js");require("../../utils/isMobile.js");require("../../ui/IconButton/iconButton.recipe.js");require("../../ui/NumberInput/NumberInput.js");require("../../ui/PasswordInput/PasswordInput.js");require("../../ui/PinInput/PinInput.js");require("../../ui/Popover/Popover.js");require("tailwind-merge");require("../../ui/Progress/Progress.js");require("../../ui/SegmentGroup/SegmentGroup.js");require("../../ui/Select/Select.js");require("../../ui/Table/Table.js");require("../../ui/Tabs/Tabs.js");function g(){const[c,e]=m({align:"start",slidesToScroll:1}),t=s.useCallback(()=>{e&&e.scrollPrev()},[e]),n=s.useCallback(()=>{e&&e.scrollNext()},[e]),[o,u]=s.useState(!1),[d,q]=s.useState(!1),i=s.useCallback(()=>{e&&(u(e.canScrollPrev()),q(e.canScrollNext()))},[e]);return s.useEffect(()=>{e&&(i(),e.on("select",i),e.on("reInit",i))},[e,i]),r.jsxs("div",{className:"p-4 pb-8",children:[r.jsxs("div",{className:"flex items-center justify-between",children:[r.jsx("div",{className:"text-text-primary-900 text-lg font-semibold",children:"Jackpot Game Providers"}),r.jsxs("div",{className:"hidden lg:flex",children:[r.jsx(a.Button,{disabled:!o,onClick:t,variant:"outline",colorScheme:"gray",className:"rounded-r-none border-r-0","aria-label":"Previous",children:r.jsx(f.ArrowLeftIcon,{className:"size-5"})}),r.jsxs(a.Button,{disabled:!d,onClick:n,variant:"outline",colorScheme:"gray",className:"rounded-l-none","aria-label":"Next",children:[r.jsx("span",{className:"sr-only",children:"Next"}),r.jsx(v.ArrowRightIcon,{className:"size-5"})]})]})]}),r.jsx("div",{className:"relative mt-3 overflow-hidden",ref:c,children:r.jsx("div",{className:"flex gap-3.5",children:Array.from({length:12},(h,l)=>r.jsx("div",{className:"bg-gray-800 lg:bg-bg-primary-900 min-w-27.5 rounded-md",children:r.jsx(x,{src:l%2?b:N,alt:"provider",className:"size-full"})},l))})})]})}exports.JackpotGameProviders=g;
1
+ "use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("react/jsx-runtime"),f=require("embla-carousel-react"),v=require("next/image"),N=require("next/link"),s=require("react"),b=require("../../icons/ArrowLeftIcon.js"),g=require("../../icons/ArrowRightIcon.js");require("../../ui/AlertDialog/AlertDialog.js");require("../../ui/Avatar/Avatar.js");require("../../ui/Badge/Badge.js");const a=require("../../ui/Button/Button.js");require("../../ui/Checkbox/Checkbox.js");require("../../ui/Clipboard/Clipboard.js");require("../../ui/Collapsible/Collapsible.js");require("../../ui/Combobox/Combobox.js");require("../../ui/DatePicker/DatePicker.js");require("../../ui/Dialog/Dialog.js");require("../../ui/Drawer/Drawer.js");require("../../ui/Field/Field.js");require("@ark-ui/react");require("../../utils/capitalize.js");require("../../utils/parseDecimal.js");require("../../constants/index.js");require("../../utils/getLocaleInfo.js");require("../../utils/getQueryClient.js");require("../../utils/isMobile.js");require("../../ui/IconButton/iconButton.recipe.js");require("../../ui/NumberInput/NumberInput.js");require("../../ui/PasswordInput/PasswordInput.js");require("../../ui/PinInput/PinInput.js");require("../../ui/Popover/Popover.js");require("tailwind-merge");require("../../ui/Progress/Progress.js");require("../../ui/SegmentGroup/SegmentGroup.js");require("../../ui/Select/Select.js");require("../../ui/Table/Table.js");require("../../ui/Tabs/Tabs.js");function h({gameProviders:c}){const[t,e]=f({align:"start",slidesToScroll:1}),o=s.useCallback(()=>{e&&e.scrollPrev()},[e]),n=s.useCallback(()=>{e&&e.scrollNext()},[e]),[u,d]=s.useState(!1),[q,m]=s.useState(!1),i=s.useCallback(()=>{e&&(d(e.canScrollPrev()),m(e.canScrollNext()))},[e]);return s.useEffect(()=>{e&&(i(),e.on("select",i),e.on("reInit",i))},[e,i]),r.jsxs("div",{className:"p-4 pb-8",children:[r.jsxs("div",{className:"flex items-center justify-between",children:[r.jsx("div",{className:"text-text-primary-900 text-lg font-semibold",children:"Jackpot Game Providers"}),r.jsxs("div",{className:"hidden lg:flex",children:[r.jsx(a.Button,{disabled:!u,onClick:o,variant:"outline",colorScheme:"gray",className:"rounded-r-none border-r-0","aria-label":"Previous",children:r.jsx(b.ArrowLeftIcon,{className:"size-5"})}),r.jsxs(a.Button,{disabled:!q,onClick:n,variant:"outline",colorScheme:"gray",className:"rounded-l-none","aria-label":"Next",children:[r.jsx("span",{className:"sr-only",children:"Next"}),r.jsx(g.ArrowRightIcon,{className:"size-5"})]})]})]}),r.jsx("div",{className:"relative mt-3 overflow-hidden",ref:t,children:r.jsx("div",{className:"flex gap-3.5",children:c.map((l,x)=>r.jsx(N,{href:`/${l.slug}`,className:"bg-gray-800 lg:bg-bg-primary-900 min-w-27.5 rounded-md",children:r.jsx(v,{src:l.logo,alt:"provider",className:"size-full"})},x))})})]})}exports.JackpotGameProviders=h;
@@ -1,12 +1,11 @@
1
1
  "use client";
2
- import { jsxs as t, jsx as e } from "react/jsx-runtime";
3
- import N from "embla-carousel-react";
4
- import u from "next/image";
5
- import { useCallback as i, useState as m, useEffect as h } from "react";
6
- import { ArrowLeftIcon as x } from "../../icons/ArrowLeftIcon.mjs";
7
- import { ArrowRightIcon as b } from "../../icons/ArrowRightIcon.mjs";
8
- import g from "../../images/fantasma-games.png.mjs";
9
- import S from "../../images/hacksaw-gaming.png.mjs";
2
+ import { jsxs as i, jsx as e } from "react/jsx-runtime";
3
+ import h from "embla-carousel-react";
4
+ import x from "next/image";
5
+ import b from "next/link";
6
+ import { useCallback as t, useState as m, useEffect as g } from "react";
7
+ import { ArrowLeftIcon as S } from "../../icons/ArrowLeftIcon.mjs";
8
+ import { ArrowRightIcon as P } from "../../icons/ArrowRightIcon.mjs";
10
9
  import "../../ui/AlertDialog/AlertDialog.mjs";
11
10
  import "../../ui/Avatar/Avatar.mjs";
12
11
  import "../../ui/Badge/Badge.mjs";
@@ -37,69 +36,72 @@ import "../../ui/SegmentGroup/SegmentGroup.mjs";
37
36
  import "../../ui/Select/Select.mjs";
38
37
  import "../../ui/Table/Table.mjs";
39
38
  import "../../ui/Tabs/Tabs.mjs";
40
- function ar() {
41
- const [s, r] = N({
39
+ function mr({
40
+ gameProviders: s
41
+ }) {
42
+ const [c, r] = h({
42
43
  align: "start",
43
44
  slidesToScroll: 1
44
- }), c = i(() => {
45
+ }), n = t(() => {
45
46
  r && r.scrollPrev();
46
- }, [r]), n = i(() => {
47
+ }, [r]), p = t(() => {
47
48
  r && r.scrollNext();
48
- }, [r]), [p, d] = m(!1), [f, v] = m(!1), o = i(() => {
49
- r && (d(r.canScrollPrev()), v(r.canScrollNext()));
49
+ }, [r]), [d, f] = m(!1), [u, N] = m(!1), o = t(() => {
50
+ r && (f(r.canScrollPrev()), N(r.canScrollNext()));
50
51
  }, [r]);
51
- return h(() => {
52
+ return g(() => {
52
53
  r && (o(), r.on("select", o), r.on("reInit", o));
53
- }, [r, o]), /* @__PURE__ */ t("div", { className: "p-4 pb-8", children: [
54
- /* @__PURE__ */ t("div", { className: "flex items-center justify-between", children: [
54
+ }, [r, o]), /* @__PURE__ */ i("div", { className: "p-4 pb-8", children: [
55
+ /* @__PURE__ */ i("div", { className: "flex items-center justify-between", children: [
55
56
  /* @__PURE__ */ e("div", { className: "text-text-primary-900 text-lg font-semibold", children: "Jackpot Game Providers" }),
56
- /* @__PURE__ */ t("div", { className: "hidden lg:flex", children: [
57
+ /* @__PURE__ */ i("div", { className: "hidden lg:flex", children: [
57
58
  /* @__PURE__ */ e(
58
59
  a,
59
60
  {
60
- disabled: !p,
61
- onClick: c,
61
+ disabled: !d,
62
+ onClick: n,
62
63
  variant: "outline",
63
64
  colorScheme: "gray",
64
65
  className: "rounded-r-none border-r-0",
65
66
  "aria-label": "Previous",
66
- children: /* @__PURE__ */ e(x, { className: "size-5" })
67
+ children: /* @__PURE__ */ e(S, { className: "size-5" })
67
68
  }
68
69
  ),
69
- /* @__PURE__ */ t(
70
+ /* @__PURE__ */ i(
70
71
  a,
71
72
  {
72
- disabled: !f,
73
- onClick: n,
73
+ disabled: !u,
74
+ onClick: p,
74
75
  variant: "outline",
75
76
  colorScheme: "gray",
76
77
  className: "rounded-l-none",
77
78
  "aria-label": "Next",
78
79
  children: [
79
80
  /* @__PURE__ */ e("span", { className: "sr-only", children: "Next" }),
80
- /* @__PURE__ */ e(b, { className: "size-5" })
81
+ /* @__PURE__ */ e(P, { className: "size-5" })
81
82
  ]
82
83
  }
83
84
  )
84
85
  ] })
85
86
  ] }),
86
- /* @__PURE__ */ e("div", { className: "relative mt-3 overflow-hidden", ref: s, children: /* @__PURE__ */ e("div", { className: "flex gap-3.5", children: Array.from({ length: 12 }, (y, l) => /* @__PURE__ */ e(
87
- "div",
87
+ /* @__PURE__ */ e("div", { className: "relative mt-3 overflow-hidden", ref: c, children: /* @__PURE__ */ e("div", { className: "flex gap-3.5", children: s.map((l, v) => /* @__PURE__ */ e(
88
+ b,
88
89
  {
90
+ href: `/${l.slug}`,
89
91
  className: "bg-gray-800 lg:bg-bg-primary-900 min-w-27.5 rounded-md",
90
92
  children: /* @__PURE__ */ e(
91
- u,
93
+ x,
92
94
  {
93
- src: l % 2 ? S : g,
95
+ src: l.logo,
94
96
  alt: "provider",
95
97
  className: "size-full"
96
98
  }
97
99
  )
98
100
  },
99
- l
101
+ v
100
102
  )) }) })
101
103
  ] });
102
104
  }
103
105
  export {
104
- ar as JackpotGameProviders
106
+ mr as JackpotGameProviders
105
107
  };
@@ -0,0 +1,9 @@
1
+ import { Jackpot } from '@opexa/portal-sdk-core';
2
+ import { GameProviderData } from '../../types';
3
+ export interface JackpotItemProps {
4
+ jackpot: Jackpot;
5
+ /** @default "/jackpots" */
6
+ viewAllUrl?: string;
7
+ gameProviders: GameProviderData[];
8
+ }
9
+ export declare function JackpotItemDesktop({ jackpot, gameProviders, }: JackpotItemProps): import("react").JSX.Element;
@@ -0,0 +1 @@
1
+ "use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),x=require("@ark-ui/react"),u=require("next/image"),s=require("tailwind-merge"),I=require("../../icons/ArrowNarrowUpRightIcon.js"),h=require("../../icons/ChevronLeftIcon.js"),b=require("../../icons/ChevronRightIcon.js"),g=require("../../icons/StarIcon.js"),N=require("../../icons/Trophy01Icon.js"),P=require("../../images/close-chest.png.js"),z=require("../../images/first-place.png.js"),C=require("../../images/leaderboard.png.js"),M=require("../../images/open-chest.png.js");require("../../utils/capitalize.js");const i=require("../../utils/formatNumber.js");require("../../constants/index.js");require("../../utils/getLocaleInfo.js");require("../../utils/getQueryClient.js");require("../../utils/isMobile.js");require("../../utils/parseDecimal.js");const y=require("../JackpotCounter/JackpotCounterItem.js"),l=require("../JackpotCounter/JackpotCounterItem.module.css.js"),J=require("./JackpotGameProviders.js"),R=require("./JackpotRules.js"),D=require("./useJackpotItemData.js");function L({jackpot:r,gameProviders:f}){const{jackpotPayouts:o,topJackpotPayout:m,filteredGameProviders:j,localeInfo:a,isPayingOut:c,jackpotAmount:v,arrowImages:p,calculatePercentage:w,getAccumulatingJackpotDescription:q,starTierStyles:d}=D.useJackpotItemData({jackpot:r,gameProviders:f});return e.jsxs("div",{className:s.twMerge("bg-bg-tertiary border-border-primary rounded-2xl border"),children:[e.jsxs("div",{className:s.twMerge("relative flex shrink-0 p-3 text-center lg:gap-4 lg:p-5"),children:[e.jsxs("div",{className:"z-1 relative flex flex-1 flex-col",children:[e.jsx("div",{className:"flex h-full flex-col justify-between",children:e.jsx("div",{className:"flex w-full justify-between",children:e.jsxs("div",{className:"flex w-full flex-col",children:[e.jsxs("div",{className:"relative flex w-full justify-between",children:[e.jsxs("div",{children:[c?e.jsxs("div",{className:"border-utility-success-200 bg-utility-success-50 text-utility-success-700 flex w-fit items-center gap-1 rounded-full border px-2 py-0.5 text-xs font-medium",children:[e.jsx("span",{className:"full bg-utility-success-500 size-1.5 animate-pulse rounded"}),"Paying Out"]}):e.jsxs("div",{className:"border-utility-blue-200 bg-utility-blue-50 text-utility-blue-700 flex w-fit items-center gap-1 rounded-full border px-2 py-0.5 text-xs font-medium",children:[e.jsx(I.ArrowNarrowUpRightIcon,{className:"text-utility-blue-500 size-3.5"}),"Accumulating"]}),e.jsx("div",{className:"text-text-primary-900 mt-1 text-left text-lg font-medium lg:mt-5 lg:text-2xl",children:r.name}),e.jsx("div",{className:"bg-bg-primary text-brand-400 mt-1.5 w-fit rounded-md px-2 py-1 text-2xl font-bold lg:mt-2 lg:text-4xl",children:i.formatNumber(v,{currency:a.currency.code,minDecimalPlaces:2,maxDecimalPlaces:2})})]}),e.jsx("div",{className:"z-1 bottom-[-60] right-0 block lg:absolute",children:e.jsx(u,{width:150,height:150,src:c?M:P,alt:"closeChest",quality:100,className:"h-25 w-25 lg:h-37.5 lg:w-37.5 size-full p-2"})})]}),m.amount?e.jsx("div",{children:e.jsxs("div",{className:"bg-bg-primary relative mt-4 hidden w-full gap-4 rounded-lg p-4 lg:flex",children:[e.jsx("div",{className:"border-yellow-400 relative h-18 w-18 rounded-full border",children:e.jsx("div",{className:"bg-yellow-400 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] text-xs font-bold",children:"1st"})}),e.jsxs("div",{className:"flex flex-col gap-1 text-left",children:[e.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:[e.jsx(N.Trophy01Icon,{className:"text-utility-brand-600 size-3.5"}),"Top Payout"]}),e.jsx("div",{className:"font-semibold",children:y.maskName(m.member.name)}),e.jsx("div",{className:"text-brand-400 text-2xl",children:i.formatNumber(m.amount,{currency:a.currency.code,minDecimalPlaces:2,maxDecimalPlaces:2})})]})]})}):e.jsxs("div",{className:"bg-bg-primary relative mt-4 hidden w-full gap-4 rounded-lg p-4 lg:flex",children:[e.jsx(u,{width:66,height:87,src:z,alt:"closeChest",className:"size-full h-auto w-[66px] mix-blend-luminosity"}),e.jsxs("div",{className:"flex flex-col gap-1 text-left",children:[e.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:[e.jsx(N.Trophy01Icon,{className:"text-utility-brand-600 size-3.5"}),"Top Payout"]}),e.jsx("div",{className:"font-semibold",children:"No winners yet"}),e.jsx("div",{className:"text-text-secondary-700 text-xs",children:"You could be the first to win the tournament!"})]})]})]})})}),e.jsxs("div",{className:"mt-3 lg:mt-4",children:[e.jsxs("div",{className:"mb-1 flex justify-between",children:[e.jsx("div",{className:"text-text-primary-900 text-xs font-semibold",children:i.formatNumber(0,{currency:a.currency.code,compact:!0})}),e.jsxs("div",{className:"relative flex items-center justify-end gap-1.5",children:[c?e.jsxs("div",{className:"flex w-6 items-center",children:[e.jsx("div",{className:s.twMerge("absolute left-0",l.default["animate-arrow-red-flash-1"]),children:e.jsx(h.ChevronLeftIcon,{className:"size-4.5"})}),e.jsx("div",{className:s.twMerge("absolute left-1.5",l.default["animate-arrow-red-flash-2"]),children:e.jsx(h.ChevronLeftIcon,{className:"size-4.5"})}),e.jsx("div",{className:s.twMerge("absolute left-3",l.default["animate-arrow-red-flash-3"]),children:e.jsx(h.ChevronLeftIcon,{className:"size-4.5"})})]}):e.jsxs("div",{className:"flex w-6 items-center",children:[e.jsx("div",{className:s.twMerge("absolute left-0",l.default["animate-arrow-green-flash-1"]),children:e.jsx(b.ChevronRightIcon,{className:"size-4.5"})}),e.jsx("div",{className:s.twMerge("absolute left-1.5",l.default["animate-arrow-green-flash-2"]),children:e.jsx(b.ChevronRightIcon,{className:"size-4.5"})}),e.jsx("div",{className:s.twMerge("absolute left-3",l.default["animate-arrow-green-flash-3"]),children:e.jsx(b.ChevronRightIcon,{className:"size-4.5"})})]}),e.jsx("div",{className:"text-text-primary-900 text-xs font-semibold",children:i.formatNumber(r==null?void 0:r.maximumJackpotPoolLimit,{currency:a.currency.code,compact:!0})})]})]}),e.jsx(x.Progress.Root,{className:"bg-bg-primary h-2 w-full rounded-full lg:h-4",max:100,value:w(Number(r.pool),Number(r.maximumJackpotPoolLimit)),children:e.jsx(x.Progress.Track,{className:"bg-bg-primary h-full overflow-hidden rounded-full",children:e.jsx(x.Progress.Range,{className:"bg-brand-500 relative h-full overflow-hidden rounded-full pl-1.5",children:e.jsx("div",{className:"pointer-events-none absolute inset-0 flex items-center justify-start pl-1.5","aria-hidden":"true",children:p})})})}),e.jsx("div",{className:"mt-1 block text-start text-2xs lg:hidden",children:c?`The pot has hit ${i.formatNumber(r==null?void 0:r.maximumJackpotPoolLimit,{currency:a.currency.code,compact:!0})} Play now for your chance to win big! 🔥`:q(Number(r==null?void 0:r.pool)??0,Number(r==null?void 0:r.maximumJackpotPoolLimit)??0)})]})]}),e.jsxs("div",{className:"z-1 hidden flex-1 space-y-4 lg:block",children:[e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsxs("div",{className:"flex gap-2",children:[e.jsx(u,{width:24,height:24,src:C,quality:100,alt:"leaderboardIcon",className:"size-full h-auto w-6"}),e.jsx("div",{className:"text-text-primary-900 text-lg font-semibold",children:o.length?"Leaderboard":"Starting soon!"})]}),e.jsx(R.JackpotRules,{jackpotRules:r.description})]}),e.jsx("div",{className:s.twMerge("max-h-[272px] overflow-y-scroll",l.default.scrollArea),children:e.jsx("div",{className:"border-gray-200 overflow-hidden rounded-xl",children:e.jsxs("table",{className:"w-full",children:[e.jsx("thead",{children:e.jsxs("tr",{className:"bg-bg-secondary text-text-tertiary-600 h-8 text-xs font-medium",children:[e.jsx("th",{className:"w-[52px]",children:"#"}),e.jsx("th",{children:"Player"}),e.jsx("th",{children:"Multiplier"}),e.jsx("th",{children:"Prize"})]})}),e.jsx("tbody",{children:o.length?e.jsx(e.Fragment,{children:o.map((n,t)=>e.jsxs("tr",{className:"bg-bg-primary text-text-secondary-700 text-sm",children:[e.jsx("td",{className:"border-border-secondary h-12 w-[52px] border-t-2",children:t+1<6?e.jsxs("div",{className:"relative",children:[e.jsx(g.StarIcon,{className:s.twMerge("mx-auto size-6.5",d[t].starColor)}),e.jsx("span",{className:s.twMerge("absolute inset-0 mt-0.5 flex items-center justify-center text-2xs font-bold",d[t].numberColor),children:t+1})]}):t+1}),e.jsx("td",{className:"border-border-secondary h-12 border-t-2",children:y.maskName(n.member.name)}),e.jsxs("td",{className:"border-border-secondary h-12 border-t-2",children:[n.multiplier,"x"]}),e.jsx("td",{className:"border-border-secondary text-brand-400 h-12 border-t-2",children:i.formatNumber(n.amount,{currency:a.currency.code,minDecimalPlaces:2,maxDecimalPlaces:2})})]},t))}):e.jsx(e.Fragment,{children:Array.from({length:10}).map((n,t)=>e.jsxs("tr",{className:"bg-bg-primary text-text-secondary-700 text-sm",children:[e.jsx("td",{className:"border-border-secondary h-12 w-[52px] border-t-2",children:t+1<6?e.jsxs("div",{className:"relative",children:[e.jsx(g.StarIcon,{className:s.twMerge("mx-auto size-6.5",d[t].starColor)}),e.jsx("span",{className:s.twMerge("absolute inset-0 mt-0.5 flex items-center justify-center text-2xs font-bold",d[t].numberColor),children:t+1})]}):t+1}),e.jsx("td",{className:"border-border-secondary h-12 border-t-2",children:"-"}),e.jsx("td",{className:"border-border-secondary h-12 border-t-2",children:"-"}),e.jsx("td",{className:"border-border-secondary h-12 border-t-2",children:"-"})]},t))})})]})})})]}),c&&e.jsx("div",{className:s.twMerge(l.default["light-rays"],"absolute right-0 top-0 rounded-2xl")})]}),!!j.length&&e.jsx(J.JackpotGameProviders,{gameProviders:f})]})}exports.JackpotItemDesktop=L;