@opexa/portal-components 0.0.313 → 0.0.314

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 (83) hide show
  1. package/dist/components/DigitainLauncher/DigitainLauncher.d.ts +2 -0
  2. package/dist/components/DigitainLauncher/DigitainLauncher.js +1 -1
  3. package/dist/components/DigitainLauncher/DigitianContainter.d.ts +2 -0
  4. package/dist/components/DigitainLauncher/DigitianContainter.js +2 -2
  5. package/dist/components/DigitainLauncher/Fallback.d.ts +4 -1
  6. package/dist/components/DigitainLauncher/Fallback.js +11 -11
  7. package/dist/components/Jackpots/JackpotsCarousel/JackpotsCarouselItem.module.css +184 -184
  8. package/dist/components/Jackpots/JackpotsList/JackpotsListItem.module.css +184 -184
  9. package/dist/components/Tournaments/TournamentsCarousel/TournamentsCarouselItem.module.css +184 -184
  10. package/dist/components/Tournaments/TournamentsList/TournamentItem.module.css +184 -184
  11. package/dist/services/queries.js +2644 -2644
  12. package/dist/styles/theme.css +706 -706
  13. package/package.json +160 -160
  14. package/dist/client/utils/recaptcha.d.ts +0 -14
  15. package/dist/client/utils/recaptcha.js +0 -18
  16. package/dist/components/Banner/Banner.client.d.ts +0 -12
  17. package/dist/components/Banner/Banner.client.js +0 -49
  18. package/dist/components/Disclaimer/ResponsibleGaming.d.ts +0 -10
  19. package/dist/components/Disclaimer/ResponsibleGaming.js +0 -13
  20. package/dist/components/Disclaimer/TermsOfUse.d.ts +0 -11
  21. package/dist/components/Disclaimer/TermsOfUse.js +0 -13
  22. package/dist/components/KYC/CaptureIdDocument.d.ts +0 -1
  23. package/dist/components/KYC/CaptureIdDocument.js +0 -219
  24. package/dist/components/KYC/CaptureSelfie.d.ts +0 -1
  25. package/dist/components/KYC/CaptureSelfie.js +0 -285
  26. package/dist/components/KYC/DisplayImage.d.ts +0 -5
  27. package/dist/components/KYC/DisplayImage.js +0 -8
  28. package/dist/components/KYC/FileUpload.d.ts +0 -10
  29. package/dist/components/KYC/FileUpload.js +0 -72
  30. package/dist/components/KYC/NoCameraError.d.ts +0 -7
  31. package/dist/components/KYC/NoCameraError.js +0 -6
  32. package/dist/components/KYC/PersonOverlayDesktop.d.ts +0 -7
  33. package/dist/components/KYC/PersonOverlayDesktop.js +0 -9
  34. package/dist/components/KYC/utils.d.ts +0 -9
  35. package/dist/components/KYC/utils.js +0 -79
  36. package/dist/components/SignIn/utils.d.ts +0 -8
  37. package/dist/components/SignIn/utils.js +0 -26
  38. package/dist/components/SignUp/SignUpDefault/SignUp.lazy.d.ts +0 -17
  39. package/dist/components/SignUp/SignUpDefault/SignUp.lazy.js +0 -18
  40. package/dist/components/SignUp/SignUpDefault/SignUpContext.d.ts +0 -6
  41. package/dist/components/SignUp/SignUpDefault/SignUpContext.js +0 -2
  42. package/dist/components/SignUp/SignUpDefault/SignUpForm.d.ts +0 -1
  43. package/dist/components/SignUp/SignUpDefault/SignUpForm.js +0 -310
  44. package/dist/components/SignUp/SignUpKYC/CaptureIdDocument.d.ts +0 -1
  45. package/dist/components/SignUp/SignUpKYC/CaptureIdDocument.js +0 -198
  46. package/dist/components/SignUp/SignUpKYC/CaptureSelfie.d.ts +0 -1
  47. package/dist/components/SignUp/SignUpKYC/CaptureSelfie.js +0 -251
  48. package/dist/components/SignUp/SignUpKYC/ImageUploader.d.ts +0 -10
  49. package/dist/components/SignUp/SignUpKYC/ImageUploader.js +0 -42
  50. package/dist/components/SignUp/SignUpKYC/PersonOverlayDesktop.d.ts +0 -7
  51. package/dist/components/SignUp/SignUpKYC/PersonOverlayDesktop.js +0 -9
  52. package/dist/components/SignUp/SignUpKYC/SignUpFormKYC.d.ts +0 -1
  53. package/dist/components/SignUp/SignUpKYC/SignUpFormKYC.js +0 -464
  54. package/dist/components/SignUp/SignUpKYC/useImageUploader.d.ts +0 -11
  55. package/dist/components/SignUp/SignUpKYC/useImageUploader.js +0 -20
  56. package/dist/components/SignUp/SignUpKYC/utils.d.ts +0 -9
  57. package/dist/components/SignUp/SignUpKYC/utils.js +0 -79
  58. package/dist/constants/Branches.d.ts +0 -2
  59. package/dist/constants/Branches.js +0 -42
  60. package/dist/handlers/postTransformIdFrontImage.d.ts +0 -3
  61. package/dist/handlers/postTransformIdFrontImage.js +0 -82
  62. package/dist/handlers/postTransformSelfieImage.d.ts +0 -3
  63. package/dist/handlers/postTransformSelfieImage.js +0 -82
  64. package/dist/third-parties/FacebookPixel/FacebookPixel.d.ts +0 -4
  65. package/dist/third-parties/FacebookPixel/FacebookPixel.js +0 -4
  66. package/dist/third-parties/FacebookPixel/api.d.ts +0 -0
  67. package/dist/third-parties/FacebookPixel/api.js +0 -1
  68. package/dist/third-parties/FacebookPixel/index.d.ts +0 -1
  69. package/dist/third-parties/FacebookPixel/index.js +0 -1
  70. package/dist/third-parties/GoogleRecaptcha/GoogleRecaptcha.d.ts +0 -4
  71. package/dist/third-parties/GoogleRecaptcha/GoogleRecaptcha.js +0 -4
  72. package/dist/third-parties/GoogleRecaptcha/api.d.ts +0 -0
  73. package/dist/third-parties/GoogleRecaptcha/api.js +0 -1
  74. package/dist/third-parties/GoogleRecaptcha/index.d.ts +0 -1
  75. package/dist/third-parties/GoogleRecaptcha/index.js +0 -1
  76. package/dist/third-parties/index.d.ts +0 -2
  77. package/dist/third-parties/index.js +0 -2
  78. package/dist/utils/gamesAvailable3pmTo3am.d.ts +0 -1
  79. package/dist/utils/gamesAvailable3pmTo3am.js +0 -1
  80. package/dist/utils/getGameName.d.ts +0 -1
  81. package/dist/utils/getGameName.js +0 -6
  82. package/dist/utils/isBetween3amAnd3pm.d.ts +0 -1
  83. package/dist/utils/isBetween3amAnd3pm.js +0 -5
@@ -1,9 +0,0 @@
1
- import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
2
- function PersonOverlayDesktop({ isFaceCentered, height, width }) {
3
- return (_jsxs(_Fragment, { children: [_jsx("div", { className: "pointer-events-none absolute inset-0 hidden md:block", children: _jsxs("svg", { width: `${width}px`, height: `${height}px`, viewBox: `0 0 ${width} ${height}`, preserveAspectRatio: "xMidYMid meet", className: "max-h-full w-full", children: [_jsxs("defs", { children: [_jsx("path", { id: "head-shoulder-path", d: "M 389.605 124.529 C 390.221 129.441 390.638 134.433 390.846 139.492 L 390.932 151.978 C 390.841 155.321 390.658 158.636 390.388 161.919 C 388.294 162.987 388.18 164.214 389 168 L 390.277 171.709 L 395 181 C 395.61 182.222 396.985 183.052 398.459 183.693 L 399.097 183.956 C 401.81 185.016 404.425 186.275 406.923 187.715 L 420.473 198.503 C 424.405 202.729 427.713 207.542 430.252 212.795 L 435.357 229.337 C 435.78 232.162 436 235.055 436 238 V 244.833 V 258.5 H 436 V 272.167 V 285.833 H 436 V 299.5 V 313.167 H 436 V 320 C 436 321.36 435.73 322.651 435.242 323.827 L 429.827 329.242 C 428.651 329.73 427.36 330 426 330 H 418.275 H 402.825 V 330 H 387.375 H 371.925 V 330 H 356.475 H 341.025 V 330 H 325.575 H 310.125 V 330 H 294.675 H 279.225 V 330 H 263.775 H 248.325 V 330 H 232.875 H 217.425 V 330 H 201.975 H 186.525 V 330 H 171.075 H 155.625 V 330 H 140.175 H 124.725 V 330 H 117 C 115.641 330 114.349 329.73 113.173 329.242 L 107.758 323.827 C 107.27 322.651 107 321.36 107 320 V 313.167 V 299.5 H 107 V 285.833 V 272.167 H 107 V 258.5 V 244.833 H 107 V 238 C 107 235.088 107.214 232.227 107.628 229.433 L 112.622 213.056 C 115.107 207.848 118.347 203.067 122.2 198.856 L 135.494 188.055 C 137.641 186.783 139.877 185.647 142.19 184.656 L 143.186 184.241 C 144.876 183.555 146.441 182.623 147.83 181.498 L 153.722 172.52 C 154.177 170.759 154.329 168.902 154.116 167.011 L 153.981 165.769 C 153.85 164.525 153.732 163.276 153.627 162.022 C 151.354 158.847 151.164 155.472 151.069 152.068 L 151.153 139.492 C 151.36 134.462 151.773 129.498 152.383 124.613 L 152.394 124.529 L 154.894 109.723 C 155.95 104.771 157.212 99.9212 158.668 95.1875 L 163.727 81.0498 C 165.649 76.3661 167.77 71.8259 170.076 67.4453 L 177.715 54.5254 C 180.508 50.3027 183.489 46.274 186.641 42.457 L 196.832 31.4316 C 200.471 27.9227 204.28 24.6674 208.24 21.6846 L 220.789 13.4502 C 225.168 10.9758 229.688 8.8149 234.332 6.9912 L 248.66 2.544 C 253.508 1.4258 258.458 0.6639 263.493 0.2832 L 278.506 0.2832 C 283.541 0.6638 288.491 1.4259 293.339 2.544 L 307.667 6.9912 C 312.311 8.8149 316.831 10.9758 321.21 13.4502 L 333.759 21.6846 C 337.719 24.6673 341.528 27.9227 345.167 31.4316 L 355.359 42.458 C 358.511 46.2749 361.491 50.3038 364.284 54.5264 L 371.923 67.4453 C 374.229 71.826 376.35 76.3661 378.272 81.0498 L 383.331 95.1875 C 384.787 99.9212 386.049 104.771 387.105 109.723 L 389.605 124.529 Z" }), _jsxs("mask", { id: "outline-mask", children: [_jsx("rect", { width: "100%", height: "100%", fill: "white" }), _jsx("use", { href: "#head-shoulder-path", fill: "black" })] })] }), _jsx("rect", { width: "100%", height: "100%", fill: !isFaceCentered
4
- ? 'rgba(156, 156, 156, 0.40)'
5
- : 'rgba(34, 139, 87, 0.75)', mask: "url(#outline-mask)" }), _jsx("use", { href: "#head-shoulder-path", fill: "none", stroke: !isFaceCentered ? '#B54708' : '#34D399', strokeWidth: "3", strokeDasharray: "10 5" })] }) }), _jsx("div", { className: "pointer-events-none absolute inset-0 block md:hidden", children: _jsxs("svg", { className: "block md:hidden", width: "100%", height: "100%", viewBox: "0 0 400 400", preserveAspectRatio: "xMidYMid slice", children: [_jsxs("defs", { children: [_jsx("path", { id: "fill-path", d: "M 300.85 220.1 C 301.15 223.9 302.705 227.284 305.171 230.096 V 230.097 L 311.15 234.9 L 316.351 238.504 C 320.778 242.037 324.741 246.126 328.135 250.665 L 336.459 265.409 C 338.554 270.577 340.015 276.069 340.746 281.79 V 320.036 V 359.74 V 369.667 L 340.28 374.731 C 338.938 377.967 336.351 380.555 333.115 381.896 H 300.872 H 264.633 H 228.396 H 192.158 H 155.921 H 119.682 H 83.4439 H 74.3844 L 69.319 381.896 C 66.0834 380.554 63.4953 377.967 62.1539 374.731 V 339.888 V 320.036 V 300.184 L 62.15 281.9 C 62.459 275.847 63.967 270.273 66.127 265.038 L 74.702 250.13 C 78.005 245.806 81.828 241.899 86.08 238.506 L 86.819 237.925 L 98.284 229.572 L 104.15 223.9 C 105.146 217.607 104.959 215.459 104.343 213.349 L 102.15 210.9 L 98.15 202.9 C 97.985 196.059 96.943 188.701 96.423 181.159 L 96.31 160.744 C 96.641 154.989 97.273 149.337 98.193 143.813 L 98.454 142.294 L 102.789 124.231 C 104.631 118.212 106.825 112.406 109.34 106.849 L 118.126 90.483 C 121.479 85.154 125.161 80.154 129.135 75.528 L 142.322 62.463 C 147.129 58.431 152.22 54.874 157.55 51.845 L 174.504 44.306 C 180.364 42.381 186.424 41.058 192.638 40.394 L 211.201 40.394 C 217.414 41.057 223.474 42.381 229.334 44.306 L 246.288 51.845 C 251.619 54.874 256.709 58.431 261.516 62.463 L 274.703 75.528 C 278.677 80.154 282.359 85.154 285.712 90.483 L 294.499 106.849 C 297.014 112.406 299.208 118.212 301.049 124.231 L 305.385 142.294 V 142.293 C 306.447 148.299 307.168 154.46 307.529 160.744 L 307.403 181.33 C 306.867 188.989 305.792 196.459 304.224 203.681 C 301.374 206.417 300.58 209.572 300.15 212.9 L 300.15 214.9 L 300.85 220.1 Z" }), _jsx("path", { id: "border-path", d: "M 300.85 220.1 C 301.15 223.9 302.705 227.284 305.171 230.096 V 230.097 L 311.15 234.9 L 316.351 238.504 C 320.778 242.037 324.741 246.126 328.135 250.665 L 336.459 265.409 C 338.554 270.577 340.015 276.069 340.746 281.79 V 320.036 V 359.74 V 369.667 L 340.28 374.731 C 338.938 377.967 336.351 380.555 333.115 381.896 H 300.872 H 264.633 H 228.396 H 192.158 H 155.921 H 119.682 H 83.4439 H 74.3844 L 69.319 381.896 C 66.0834 380.554 63.4953 377.967 62.1539 374.731 V 339.888 V 320.036 V 300.184 L 62.15 281.9 C 62.459 275.847 63.967 270.273 66.127 265.038 L 74.702 250.13 C 78.005 245.806 81.828 241.899 86.08 238.506 L 86.819 237.925 L 98.284 229.572 L 104.15 223.9 C 105.146 217.607 104.959 215.459 104.343 213.349 L 102.15 210.9 L 98.15 202.9 C 97.985 196.059 96.943 188.701 96.423 181.159 L 96.31 160.744 C 96.641 154.989 97.273 149.337 98.193 143.813 L 98.454 142.294 L 102.789 124.231 C 104.631 118.212 106.825 112.406 109.34 106.849 L 118.126 90.483 C 121.479 85.154 125.161 80.154 129.135 75.528 L 142.322 62.463 C 147.129 58.431 152.22 54.874 157.55 51.845 L 174.504 44.306 C 180.364 42.381 186.424 41.058 192.638 40.394 L 211.201 40.394 C 217.414 41.057 223.474 42.381 229.334 44.306 L 246.288 51.845 C 251.619 54.874 256.709 58.431 261.516 62.463 L 274.703 75.528 C 278.677 80.154 282.359 85.154 285.712 90.483 L 294.499 106.849 C 297.014 112.406 299.208 118.212 301.049 124.231 L 305.385 142.294 V 142.293 C 306.447 148.299 307.168 154.46 307.529 160.744 L 307.403 181.33 C 306.867 188.989 305.792 196.459 304.224 203.681 C 301.374 206.417 300.58 209.572 300.15 212.9 L 300.15 214.9 L 300.85 220.1 Z" }), _jsx("clipPath", { id: "face-cutout", children: _jsx("use", { href: "#fill-path" }) }), _jsxs("mask", { id: "face-mask", children: [_jsx("rect", { x: "0", y: "0", width: "400", height: "400", fill: "white" }), _jsx("use", { href: "#fill-path", fill: "black" })] })] }), _jsx("rect", { x: "0", y: "0", width: "100%", height: "100%", fill: !isFaceCentered
6
- ? 'rgba(156, 156, 156, 0.40)'
7
- : 'rgba(34, 139, 87, 0.75)', mask: "url(#face-mask)" }), _jsx("use", { href: "#border-path", fill: "none", stroke: !isFaceCentered ? '#B54708' : '#34D399', strokeWidth: "3", strokeDasharray: "12 8", strokeLinecap: "round", id: "border-element" })] }) })] }));
8
- }
9
- export default PersonOverlayDesktop;
@@ -1,9 +0,0 @@
1
- export declare function loadFaceApiModels(): Promise<void>;
2
- export declare function dataURLtoBlob(dataURL: string): Blob;
3
- export declare const resizeFile: (file: File) => Promise<unknown>;
4
- export declare const MAX_FILE_SIZE = 10;
5
- export declare const MAX_NAME_LENGTH = 52;
6
- export declare const SUPPORTED_FILES: string[];
7
- export declare function validateFile(file: File): "File too large" | "File name too long" | "Unsupported file" | undefined;
8
- export declare function showPermissionInstructions(): void;
9
- export declare const cameraErrorDescriptions: Record<string, string>;
@@ -1,79 +0,0 @@
1
- import * as faceapi from 'face-api.js';
2
- import Resizer from 'react-image-file-resizer';
3
- export async function loadFaceApiModels() {
4
- // const url = `${STATIC_ENDPOINT}/models`;
5
- const url = '/models';
6
- await Promise.all([
7
- faceapi.nets.tinyFaceDetector.loadFromUri(url),
8
- faceapi.nets.faceLandmark68Net.loadFromUri(url),
9
- faceapi.nets.faceRecognitionNet.loadFromUri(url),
10
- ]);
11
- }
12
- export function dataURLtoBlob(dataURL) {
13
- const parts = dataURL.split(';base64,');
14
- const contentType = parts[0].split(':')[1];
15
- const raw = window.atob(parts[1]);
16
- const rawLength = raw.length;
17
- const uInt8Array = new Uint8Array(rawLength);
18
- for (let i = 0; i < rawLength; ++i) {
19
- uInt8Array[i] = raw.charCodeAt(i);
20
- }
21
- return new Blob([uInt8Array], { type: contentType });
22
- }
23
- export const resizeFile = (file) => new Promise((resolve) => {
24
- Resizer.imageFileResizer(file, 300, 300, 'jpeg', 100, 0, (uri) => {
25
- resolve(uri);
26
- }, 'file');
27
- });
28
- export const MAX_FILE_SIZE = 10; /* in MB */
29
- export const MAX_NAME_LENGTH = 52;
30
- export const SUPPORTED_FILES = [
31
- /* add more supported ext */
32
- 'image/png',
33
- 'image/jpg',
34
- 'image/jpeg',
35
- ];
36
- function removeFilenameExt(subject) {
37
- const l = subject.split('.');
38
- l.pop();
39
- return l.join('.');
40
- }
41
- export function validateFile(file) {
42
- const fileType = file.type;
43
- const fileSize = file.size / (1024 * 1024);
44
- const nameLength = removeFilenameExt(file.name).length;
45
- if (fileSize > MAX_FILE_SIZE)
46
- return 'File too large';
47
- if (nameLength > MAX_NAME_LENGTH)
48
- return 'File name too long';
49
- if (!SUPPORTED_FILES.includes(fileType))
50
- return 'Unsupported file';
51
- }
52
- export function showPermissionInstructions() {
53
- const instructions = `
54
- Camera access is blocked. To enable camera access:
55
-
56
- Chrome/Edge:
57
- 1. Click the camera icon in the address bar
58
- 2. Select "Always allow" and click "Done"
59
- 3. Or go to Settings > Privacy and security > Site settings > Camera
60
-
61
- Firefox:
62
- 1. Click the shield icon in the address bar
63
- 2. Click on "Camera blocked"
64
- 3. Select "Allow" and refresh the page
65
-
66
- Safari:
67
- 1. Go to Safari > Settings > Websites > Camera
68
- 2. Find this website and change to "Allow"
69
-
70
- After changing permissions, please refresh the page and try again.
71
- `;
72
- alert(instructions);
73
- }
74
- export const cameraErrorDescriptions = {
75
- NotAllowedError: 'We were unable to detect a camera on your device. Please ensure it is properly connected and accessible to this application.',
76
- NotReadableError: 'We were unable to access your camera. Please check if another application is using it or try reconnecting your device.',
77
- NotFoundError: 'No camera was found. Please connect a camera and try again.',
78
- NoIdDetectedError: 'No ID document was detected in the frame. Please ensure your ID is clearly visible and try again.',
79
- };
@@ -1,8 +0,0 @@
1
- type Options = {
2
- accountName?: string;
3
- siteName?: string;
4
- signInOptions?: 'MOBILE_NUMBER' | 'NAME_AND_PASSWORD';
5
- };
6
- export type ErrorCode = 'MEMBER_ACCOUNT_BLACKLISTED' | 'MEMBER_ACCOUNT_SUSPENDED' | 'INVALID_RECAPTCHA_RESPONSE' | 'MEMBER_NOT_FOUND' | 'RATE_LIMIT_REACH' | 'NOT_READY_TO_SEND_VERIFICATION_ERROR' | 'Forbidden';
7
- export declare function getFriendlyErrorMessage(code: ErrorCode, options?: Options): string;
8
- export {};
@@ -1,26 +0,0 @@
1
- export function getFriendlyErrorMessage(code, options) {
2
- const accountName = options?.accountName ?? '';
3
- const siteName = options?.siteName ?? '';
4
- const signInOptions = options?.signInOptions ?? 'NAME_AND_PASSWORD';
5
- switch (code) {
6
- case 'MEMBER_ACCOUNT_BLACKLISTED':
7
- return `Your account ${accountName} has been blacklisted due to a serious violation of our policies. For more information or to appeal, please contact the ${siteName} Chat Support team.`;
8
- case 'MEMBER_ACCOUNT_SUSPENDED':
9
- return `Your account ${accountName} has been temporarily suspended. Please reach out to the ${siteName} Chat Support team to learn more and get help with resolving the issue.`;
10
- case 'INVALID_RECAPTCHA_RESPONSE':
11
- return 'Invalid reCAPTCHA response';
12
- case 'MEMBER_NOT_FOUND':
13
- return 'Account not found. Please check your username and try again.';
14
- case 'RATE_LIMIT_REACH':
15
- return 'Rate limit exceeded';
16
- case 'NOT_READY_TO_SEND_VERIFICATION_ERROR':
17
- return 'Your account is not ready to send verification requests. Please try again later.';
18
- case 'Forbidden':
19
- if (signInOptions === 'MOBILE_NUMBER') {
20
- return 'Invalid verification code. Please check the code and try again.';
21
- }
22
- return 'Invalid username or password, please try again.';
23
- default:
24
- return 'Something went wrong. Please try again later.';
25
- }
26
- }
@@ -1,17 +0,0 @@
1
- import { type ImageProps } from 'next/image';
2
- import { type ReactNode } from 'react';
3
- import type { Branch } from '../../../types';
4
- export interface SignUpProps {
5
- logo: ImageProps['src'];
6
- children?: ReactNode;
7
- /** @default "/terms-and-conditions" */
8
- termsAndConditionsUrl?: string;
9
- termsOfUseContent?: ReactNode;
10
- responsibleGamingContent?: ReactNode;
11
- responsibleGamingLogo?: ImageProps['src'];
12
- siteName?: string;
13
- className?: string;
14
- branches?: Branch[];
15
- layout: 'default';
16
- }
17
- export declare function SignUp(props: SignUpProps): import("react/jsx-runtime").JSX.Element;
@@ -1,18 +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 { Suspense } from 'react';
5
- import { twMerge } from 'tailwind-merge';
6
- import { useShallow } from 'zustand/shallow';
7
- import { useGlobalStore } from '../../../client/hooks/useGlobalStore.js';
8
- import { XIcon } from '../../../icons/XIcon.js';
9
- import { Dialog } from '../../../ui/Dialog/index.js';
10
- import { Portal } from '../../../ui/Portal/index.js';
11
- import { SignUpPropsProvider } from './SignUpContext.js';
12
- import { SignUpForm } from './SignUpForm.js';
13
- export function SignUp(props) {
14
- const signUpStore = useGlobalStore(useShallow((ctx) => ctx.signUp));
15
- return (_jsx(SignUpPropsProvider, { value: props, children: _jsx(Dialog.Root, { open: signUpStore.open, onOpenChange: (details) => {
16
- signUpStore.setOpen(details.open);
17
- }, lazyMount: true, unmountOnExit: true, closeOnEscape: false, closeOnInteractOutside: false, children: _jsxs(Portal, { children: [_jsx(Dialog.Backdrop, {}), _jsx(Dialog.Positioner, { children: _jsxs(Dialog.Content, { className: twMerge('bg-bg-primary-alt mx-auto h-full w-full items-start overflow-y-auto p-3xl pb-4xl lg:h-auto lg:w-[400px] lg:rounded-xl', props.className), children: [_jsx(Dialog.CloseTrigger, { children: _jsx(XIcon, {}) }), _jsx(Image, { src: props.logo, alt: "", width: 200, height: 100, className: "mx-auto h-auto w-[120px]", draggable: false }), _jsx(Suspense, { children: _jsx(SignUpForm, {}) })] }) })] }) }) }));
18
- }
@@ -1,6 +0,0 @@
1
- import type { SignUpProps } from './SignUp.lazy';
2
- export declare const SignUpPropsProvider: (props: {
3
- value: SignUpProps;
4
- } & {
5
- children?: import("react").ReactNode | undefined;
6
- }) => React.ReactNode, useSignUpPropsContext: () => SignUpProps;
@@ -1,2 +0,0 @@
1
- import { createContext } from '../../../client/utils/createContext.js';
2
- export const [SignUpPropsProvider, useSignUpPropsContext] = createContext();
@@ -1 +0,0 @@
1
- export declare function SignUpForm(): import("react/jsx-runtime").JSX.Element;
@@ -1,310 +0,0 @@
1
- 'use client';
2
- import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
3
- import { createListCollection, parseDate } from '@ark-ui/react';
4
- import { zodResolver } from '@hookform/resolvers/zod';
5
- import { ObjectId } from '@opexa/object-id';
6
- import { differenceInYears, format } from 'date-fns';
7
- import { useSearchParams } from 'next/navigation';
8
- import { useEffect, useRef, useState } from 'react';
9
- import { Controller, useForm } from 'react-hook-form';
10
- import { twMerge } from 'tailwind-merge';
11
- import { z } from 'zod';
12
- import { useShallow } from 'zustand/shallow';
13
- import { useControllableState } from '../../../client/hooks/useControllableState.js';
14
- import { useCooldown } from '../../../client/hooks/useCooldown.js';
15
- import { useGlobalStore } from '../../../client/hooks/useGlobalStore.js';
16
- import { useLocaleInfo } from '../../../client/hooks/useLocaleInfo.js';
17
- import { useMobileNumberParser } from '../../../client/hooks/useMobileNumberParser.js';
18
- import { useSendVerificationCodeMutation } from '../../../client/hooks/useSendVerificationCodeMutation.js';
19
- import { useSignInMutation } from '../../../client/hooks/useSignInMutation.js';
20
- import { useSignUpMutation } from '../../../client/hooks/useSignUpMutation.js';
21
- import { useUpdateAccountMutation } from '../../../client/hooks/useUpdateAccountMutation.js';
22
- import { toaster } from '../../../client/utils/toaster.js';
23
- import { BRANCHES } from '../../../constants/index.js';
24
- import { ArrowLeftIcon } from '../../../icons/ArrowLeftIcon.js';
25
- import { CalendarIcon } from '../../../icons/CalendarIcon.js';
26
- import { CheckIcon } from '../../../icons/CheckIcon.js';
27
- import { ChevronDownIcon } from '../../../icons/ChevronDownIcon.js';
28
- import { ChevronLeftIcon } from '../../../icons/ChevronLeftIcon.js';
29
- import { ChevronRightIcon } from '../../../icons/ChevronRightIcon.js';
30
- import { HelpCircleIcon } from '../../../icons/HelpCircleIcon.js';
31
- import { ObjectType } from '../../../services/ObjectType.js';
32
- import { Button } from '../../../ui/Button/index.js';
33
- import { Checkbox } from '../../../ui/Checkbox/index.js';
34
- import { DatePicker } from '../../../ui/DatePicker/index.js';
35
- import { Field } from '../../../ui/Field/index.js';
36
- import { PinInput } from '../../../ui/PinInput/index.js';
37
- import { Select } from '../../../ui/Select/index.js';
38
- import { Tooltip } from '../../../ui/Tooltip/index.js';
39
- import { createPoll } from '../../../utils/createPoll.js';
40
- import { ResponsibleGaming } from '../../Disclaimer/ResponsibleGaming.js';
41
- import { TermsOfUse } from '../../Disclaimer/TermsOfUse.js';
42
- import { useSignUpPropsContext } from './SignUpContext.js';
43
- export function SignUpForm() {
44
- const signUpProps = useSignUpPropsContext();
45
- const branchCollection = createListCollection({
46
- items: signUpProps.branches ?? BRANCHES,
47
- itemToValue: (item) => item.code,
48
- itemToString: (item) => `${item.code} - ${item.name}`,
49
- });
50
- const [step, setStep] = useState(1);
51
- const globalStore = useGlobalStore(useShallow((ctx) => ({
52
- kycReminder: ctx.kycReminder,
53
- signIn: ctx.signIn,
54
- signUp: ctx.signUp,
55
- })));
56
- const search = useSearchParams();
57
- const signUpMutation = useSignUpMutation();
58
- const signInMutation = useSignInMutation();
59
- const updateAccountMutation = useUpdateAccountMutation();
60
- const sendVerificationCodeMutation = useSendVerificationCodeMutation();
61
- const localeInfo = useLocaleInfo();
62
- const mobileNumberParser = useMobileNumberParser();
63
- const Step1Definition = z.object({
64
- mobileNumber: z
65
- .string()
66
- .min(1, 'Mobile number is required')
67
- .superRefine((v, ctx) => {
68
- if (!mobileNumberParser.validate(v)) {
69
- ctx.addIssue({
70
- code: z.ZodIssueCode.custom,
71
- message: 'Invalid mobile number',
72
- });
73
- }
74
- }),
75
- termsAccepted: z.boolean().superRefine((v, ctx) => {
76
- if (!v) {
77
- ctx.addIssue({
78
- code: z.ZodIssueCode.custom,
79
- message: 'You must accept the terms and conditions and the responsible gaming guidelines',
80
- });
81
- }
82
- }),
83
- realName: z
84
- .string()
85
- .min(2, 'Real name must be 2 or more characters')
86
- .max(50, 'Real name must not be more than 50 characters')
87
- .trim(),
88
- birthDay: z
89
- .date({
90
- invalid_type_error: 'Date of birth is required',
91
- required_error: 'Date of birth is required',
92
- })
93
- .superRefine((val, ctx) => {
94
- const now = new Date();
95
- const age = differenceInYears(now, val);
96
- if (age < 21) {
97
- return ctx.addIssue({
98
- code: z.ZodIssueCode.custom,
99
- message: 'You must be at least 21 years old',
100
- });
101
- }
102
- }),
103
- branchCode: z.string().min(1, 'Branch is required').trim(),
104
- });
105
- const Step2Definition = z.object({
106
- verificationCode: z.array(z.string()).superRefine((val, ctx) => {
107
- if (val.length !== 6 || val.some((v) => v.length !== 1)) {
108
- ctx.addIssue({
109
- code: z.ZodIssueCode.custom,
110
- message: 'Please Enter your 6 digits verification code',
111
- });
112
- }
113
- }),
114
- });
115
- const step1Form = useForm({
116
- mode: 'all',
117
- resolver: zodResolver(Step1Definition),
118
- defaultValues: {
119
- mobileNumber: '',
120
- termsAccepted: false,
121
- branchCode: signUpProps?.branches?.[0]?.code ?? BRANCHES[0].code,
122
- realName: '',
123
- },
124
- });
125
- const step2Form = useForm({
126
- resolver: zodResolver(Step2Definition),
127
- defaultValues: {
128
- verificationCode: Array.from({ length: 6 }).fill(''),
129
- },
130
- });
131
- const cooldown = useCooldown({
132
- max: 60,
133
- duration: 1000 * 60,
134
- });
135
- const form2Ref = useRef(null);
136
- const birthDay = step1Form.watch('birthDay');
137
- const branchCode = step1Form.watch('branchCode', '');
138
- const [isTermsOfUseOpen, setTermsOfUseOpen] = useState(false);
139
- const [isResponsibleGamingOpen, setResponsibleGamingOpen] = useState(false);
140
- const [isTermsOfUseAccepted, setIsTermsOfUseAccepted] = useState(false);
141
- const [isResponsibleGamingAccepted, setIsResponsibleGamingAccepted] = useState(false);
142
- useEffect(() => {
143
- if (isTermsOfUseAccepted && isResponsibleGamingAccepted) {
144
- step1Form.setValue('termsAccepted', true);
145
- }
146
- }, [isResponsibleGamingAccepted, isTermsOfUseAccepted, step1Form]);
147
- return (_jsxs(_Fragment, { children: [_jsx(TermsOfUse, { termsOfUseContent: signUpProps.termsOfUseContent ?? 'Terms of Use content', siteName: signUpProps.siteName ?? 'Site', logo: signUpProps.logo, open: isTermsOfUseOpen, onCloseAction: () => {
148
- setIsTermsOfUseAccepted(true);
149
- setTermsOfUseOpen(false);
150
- }, responsibleGamingLogo: signUpProps.responsibleGamingLogo }), _jsx(ResponsibleGaming, { responsibleGamingContent: signUpProps.responsibleGamingContent ?? 'Responsible Gaming content', logo: signUpProps.logo, open: isResponsibleGamingOpen, onCloseAction: () => {
151
- setIsResponsibleGamingAccepted(true);
152
- setResponsibleGamingOpen(false);
153
- }, responsibleGamingLogo: signUpProps.responsibleGamingLogo }), step === 1 && (_jsxs(_Fragment, { children: [_jsx("h2", { className: "mt-xl text-center text-lg font-semibold", children: "Create an account" }), _jsx("p", { className: "text-text-secondary-700 mt-xs text-center text-sm", children: "Register instantly and start playing!" }), _jsxs("form", { className: "mt-3xl", autoComplete: "off", onSubmit: step1Form.handleSubmit(async (data) => {
154
- try {
155
- await sendVerificationCodeMutation.mutateAsync({
156
- channel: 'SMS',
157
- recipient: mobileNumberParser.format(data.mobileNumber),
158
- });
159
- setStep(2);
160
- cooldown.start();
161
- }
162
- catch (e) {
163
- toaster.error({
164
- description: e instanceof Error
165
- ? e.message
166
- : 'Failed to send verification code',
167
- });
168
- }
169
- }), children: [_jsxs(Field.Root, { invalid: !!step1Form.formState.errors.mobileNumber, children: [_jsx(Field.Label, { children: "Mobile Number" }), _jsxs("div", { className: "relative", children: [_jsxs("div", { className: "absolute left-3.5 top-1/2 flex shrink-0 -translate-y-1/2 items-center gap-md", children: [_jsx(localeInfo.country.flag, { className: "size-5" }), _jsx("span", { className: "text-text-placeholder", children: localeInfo.mobileNumber.areaCode })] }), _jsx(Field.Input, { style: {
170
- paddingLeft: `calc(2.75rem + ${localeInfo.mobileNumber.areaCode.length}ch)`,
171
- }, ...step1Form.register('mobileNumber') })] }), _jsx(Field.ErrorText, { children: step1Form.formState.errors.mobileNumber?.message })] }), _jsxs(Field.Root, { invalid: !!step1Form.formState.errors.realName, className: "mt-xl", children: [_jsx(Field.Label, { children: "Real Name" }), _jsx(Field.Input, { placeholder: "Enter your real name", ...step1Form.register('realName') }), _jsx(Field.ErrorText, { children: step1Form.formState.errors.realName?.message })] }), _jsxs(Field.Root, { invalid: !!step1Form.formState.errors.birthDay, className: "mt-xl", children: [_jsx(DateOfBirthField, { value: birthDay, onChange: (value) => {
172
- if (!value)
173
- return;
174
- step1Form.setValue('birthDay', value, {
175
- shouldDirty: true,
176
- shouldTouch: true,
177
- shouldValidate: true,
178
- });
179
- }, onBlur: () => {
180
- step1Form.trigger('birthDay');
181
- } }), _jsx(Field.ErrorText, { children: step1Form.formState.errors.birthDay?.message })] }), _jsxs(Field.Root, { invalid: !!step1Form.formState.errors.branchCode, className: "mt-xl", children: [_jsxs(Select.Root, { value: [branchCode], onValueChange: (details) => {
182
- step1Form.setValue('branchCode', details.value.at(0) ??
183
- signUpProps?.branches?.[0]?.code ??
184
- BRANCHES[0].code, {
185
- shouldDirty: true,
186
- shouldTouch: true,
187
- shouldValidate: true,
188
- });
189
- }, collection: branchCollection, positioning: {
190
- sameWidth: true,
191
- placement: 'bottom',
192
- }, lazyMount: true, unmountOnExit: true, children: [_jsxs(Select.Label, { className: "flex items-center gap-1", children: ["Branch", _jsxs(Tooltip.Root, { openDelay: 0, closeDelay: 100, lazyMount: true, unmountOnExit: true, positioning: {
193
- placement: 'top',
194
- }, children: [_jsx(Tooltip.Trigger, { children: _jsx(HelpCircleIcon, { className: "text-text-nav-item-button-icon size-4" }) }), _jsx(Tooltip.Positioner, { children: _jsxs(Tooltip.Content, { children: [_jsx(Tooltip.Arrow, { children: _jsx(Tooltip.ArrowTip, {}) }), "Choose branch closest to your residence."] }) })] })] }), _jsxs(Select.Trigger, { children: [_jsx(Select.ValueText, {}), _jsx(Select.Indicator, { asChild: true, children: _jsx(ChevronDownIcon, {}) })] }), _jsx(Select.Positioner, { children: _jsx(Select.Content, { children: branchCollection.items.map((item) => {
195
- const label = branchCollection.stringifyItem(item) ?? '';
196
- return (_jsx(Select.Item, { item: item, "aria-disabled": item.disabled, className: twMerge(item.disabled && 'text-border-disabled'), children: _jsx("div", { title: label, className: "line-clamp-1", children: label }) }, item.code));
197
- }) }) })] }), _jsx(Field.ErrorText, { children: step1Form.formState.errors.branchCode?.message })] }), _jsx(Controller, { control: step1Form.control, name: "termsAccepted", render: (o) => (_jsxs(Field.Root, { className: "mt-2xl", invalid: o.fieldState.invalid, children: [_jsxs(Checkbox.Root, { checked: o.field.value, onCheckedChange: (details) => {
198
- o.field.onChange(details.checked);
199
- if (!details.checked) {
200
- setIsTermsOfUseAccepted(false);
201
- setIsResponsibleGamingAccepted(false);
202
- }
203
- }, children: [_jsx(Checkbox.Control, { children: _jsx(Checkbox.Indicator, { asChild: true, children: _jsx(CheckIcon, {}) }) }), _jsxs(Checkbox.Label, { children: ["I am at least 21 years of age and I have read and accept the", ' ', _jsx("button", { type: "button", className: "text-brand-400 underline underline-offset-2", onClick: () => {
204
- setTermsOfUseOpen(true);
205
- }, children: "Terms and Conditions" }), ' ', "and", ' ', _jsx("button", { type: "button", className: "text-brand-400 underline underline-offset-2", onClick: () => {
206
- setResponsibleGamingOpen(true);
207
- }, children: "Responsible Gaming" }), ' ', "guidelines."] }), _jsx(Checkbox.HiddenInput, {})] }), _jsx(Field.ErrorText, { className: "ml-6 text-xs", children: o.fieldState.error?.message })] })) }), _jsx(Button, { type: "submit", className: "mt-3xl", disabled: step1Form.formState.isSubmitting, children: "Create Account" })] }), _jsxs("div", { className: "mt-6 flex w-full items-center justify-center gap-xs text-sm", children: [_jsx("span", { className: "text-text-tertiary-600", children: "Already have an account?" }), _jsx("button", { type: "submit", className: "text-button-tertiary-fg font-semibold", onClick: () => {
208
- globalStore.signUp.setOpen(false);
209
- globalStore.signIn.setOpen(true);
210
- }, children: "Log In" })] })] })), step === 2 && (_jsxs(_Fragment, { children: [_jsx("h2", { className: "mt-xl text-center text-lg font-semibold", children: "Check your Phone" }), _jsxs("p", { className: "text-text-secondary-700 mt-xs text-center text-sm", children: ["We\u2019ve sent a verification code to your mobile number", ' ', _jsx("span", { className: "font-semibold", children: mobileNumberParser.format(step1Form.getValues('mobileNumber')) }), ' ', "via text"] }), _jsxs("form", { ref: form2Ref, className: "mt-5", onSubmit: step2Form.handleSubmit(async ({ verificationCode }) => {
211
- const id = ObjectId.generate(ObjectType.MemberAccount).toString();
212
- const { mobileNumber } = step1Form.getValues();
213
- try {
214
- await signUpMutation.mutateAsync({
215
- id,
216
- mobileNumber: mobileNumberParser.format(mobileNumber),
217
- verificationCode: verificationCode.join(''),
218
- referralCode: search.get('referralCode') ?? undefined,
219
- btag: search.get('btag') ?? undefined,
220
- });
221
- const name = mobileNumberParser.format(mobileNumber);
222
- const password = `${name}${id}`;
223
- const pollLogin = createPoll(async () => {
224
- try {
225
- await signInMutation.mutateAsync({
226
- type: 'NAME_AND_PASSWORD',
227
- name,
228
- password,
229
- });
230
- return true;
231
- }
232
- catch {
233
- return false;
234
- }
235
- }, {
236
- until: (ok) => ok,
237
- maxAttempt: 5,
238
- });
239
- const ok = await pollLogin();
240
- if (!ok) {
241
- globalStore.signIn.setOpen(true);
242
- return;
243
- }
244
- else {
245
- const pollUpdateAccount = createPoll(async () => {
246
- try {
247
- await updateAccountMutation.mutateAsync({
248
- branchCode: step1Form.getValues('branchCode'),
249
- realName: step1Form.getValues('realName'),
250
- birthDay: format(step1Form.getValues('birthDay'), 'yyyy-MM-dd'),
251
- });
252
- return true;
253
- }
254
- catch {
255
- return false;
256
- }
257
- }, {
258
- until: (ok) => ok,
259
- maxAttempt: 5,
260
- interval: 300,
261
- });
262
- await pollUpdateAccount();
263
- }
264
- globalStore.signUp.setOpen(false);
265
- globalStore.kycReminder.setOpen(true);
266
- step1Form.reset();
267
- step2Form.reset();
268
- setStep(1);
269
- }
270
- catch (error) {
271
- toaster.error({
272
- description: error instanceof Error
273
- ? error.message
274
- : 'Invalid Verification Code',
275
- });
276
- }
277
- }), children: [_jsx(Controller, { name: "verificationCode", control: step2Form.control, render: (o) => (_jsxs(Field.Root, { invalid: o.fieldState.invalid, children: [_jsxs(PinInput.Root, { placeholder: "0", value: o.field.value, onValueChange: (details) => {
278
- o.field.onChange(details.value);
279
- }, onValueComplete: () => {
280
- form2Ref.current?.requestSubmit();
281
- }, blurOnComplete: true, readOnly: step2Form.formState.isSubmitting, type: "numeric", children: [_jsxs(PinInput.Control, { className: "grid-cols-[1fr_1fr_1fr_auto_1fr_1fr_1fr] items-center gap-md", children: [_jsx(PinInput.Input, { index: 0 }), _jsx(PinInput.Input, { index: 1 }), _jsx(PinInput.Input, { index: 2 }), _jsx("span", { className: "text-text-placeholder-subtle text-2xl font-medium", children: "\u2013" }), _jsx(PinInput.Input, { index: 3 }), _jsx(PinInput.Input, { index: 4 }), _jsx(PinInput.Input, { index: 5 })] }), _jsx(PinInput.HiddenInput, {})] }), _jsx(Field.ErrorText, { children: o.formState.errors.verificationCode?.message })] })) }), _jsx(Button, { type: "submit", className: "mt-4xl", disabled: step2Form.formState.isSubmitting, children: "Verify" }), _jsxs("div", { className: "mt-3 flex w-full items-center justify-center gap-xs text-sm", children: [_jsx("span", { className: "text-text-secondary-700", children: "Didn't recieve the code?" }), _jsx("button", { type: "button", className: "text-button-secondary-fg font-semibold disabled:cursor-not-allowed disabled:opacity-75", disabled: cooldown.cooling, onClick: async () => {
282
- await sendVerificationCodeMutation.mutateAsync({
283
- channel: 'SMS',
284
- recipient: mobileNumberParser.format(step1Form.getValues('mobileNumber')),
285
- });
286
- cooldown.start();
287
- }, children: cooldown.cooling
288
- ? `Resend in ${cooldown.countdown}s`
289
- : 'Resend' })] }), _jsxs("button", { type: "button", className: "text-text-tertiary-600 mx-auto mt-3xl flex w-fit items-center gap-1 text-sm font-semibold", onClick: () => {
290
- setStep(1);
291
- step2Form.reset();
292
- cooldown.stop();
293
- }, children: [_jsx(ArrowLeftIcon, { className: "size-5" }), "Back"] })] })] }))] }));
294
- }
295
- const DEVICE_TIMEZONE = Intl.DateTimeFormat().resolvedOptions().timeZone;
296
- function DateOfBirthField(props) {
297
- const [value, setValue] = useControllableState({
298
- value: props.value,
299
- defaultValue: props.defaultValue ?? null,
300
- onChange: props.onChange,
301
- });
302
- return (_jsxs(DatePicker.Root, { size: "md", variant: "outline", placeholder: "MM/DD/YYYY", lazyMount: true, unmountOnExit: true, fixedWeeks: true, selectionMode: "single", value: value ? [parseDate(value)] : [], onValueChange: (details) => {
303
- const value = details.value.at(0)?.toDate(DEVICE_TIMEZONE);
304
- setValue(value ?? null);
305
- }, children: [_jsx(DatePicker.Label, { children: "Date of Birth" }), _jsxs(DatePicker.Control, { children: [_jsx(DatePicker.Input, { onBlur: props.onBlur, onFocus: props.onFocus }), _jsx(DatePicker.Trigger, { children: _jsx(CalendarIcon, {}) })] }), _jsx(DatePicker.Positioner, { children: _jsxs(DatePicker.Content, { children: [_jsx(DatePicker.View, { view: "day", children: _jsx(DatePicker.Context, { children: (api) => (_jsxs(_Fragment, { children: [_jsxs(DatePicker.ViewControl, { children: [_jsx(DatePicker.PrevTrigger, { children: _jsx(ChevronLeftIcon, {}) }), _jsx(DatePicker.ViewTrigger, { children: _jsx(DatePicker.RangeText, {}) }), _jsx(DatePicker.NextTrigger, { children: _jsx(ChevronRightIcon, {}) })] }), _jsxs(DatePicker.Table, { children: [_jsx(DatePicker.TableHead, { children: _jsx(DatePicker.TableRow, { children: api.weekDays.map((weekDay, id) => (_jsx(DatePicker.TableHeader, { children: weekDay.short.substring(0, 2) }, id))) }) }), _jsx(DatePicker.TableBody, { children: api.weeks.map((week, id) => (_jsx(DatePicker.TableRow, { children: week.map((day, id) => (_jsx(DatePicker.TableCell, { value: day, children: _jsx(DatePicker.TableCellTrigger, { children: day.day }) }, id))) }, id))) })] })] })) }) }), _jsx(DatePicker.View, { view: "month", children: _jsx(DatePicker.Context, { children: (datePicker) => (_jsxs(_Fragment, { children: [_jsxs(DatePicker.ViewControl, { children: [_jsx(DatePicker.PrevTrigger, { children: _jsx(ChevronLeftIcon, {}) }), _jsx(DatePicker.ViewTrigger, { children: _jsx(DatePicker.RangeText, {}) }), _jsx(DatePicker.NextTrigger, { children: _jsx(ChevronRightIcon, {}) })] }), _jsx(DatePicker.Table, { children: _jsx(DatePicker.TableBody, { children: datePicker
306
- .getMonthsGrid({ columns: 4, format: 'short' })
307
- .map((months, id) => (_jsx(DatePicker.TableRow, { children: months.map((month, id) => (_jsx(DatePicker.TableCell, { value: month.value, children: _jsx(DatePicker.TableCellTrigger, { className: "w-[4.425rem]", children: month.label }) }, id))) }, id))) }) })] })) }) }), _jsx(DatePicker.View, { view: "year", children: _jsx(DatePicker.Context, { children: (datePicker) => (_jsxs(_Fragment, { children: [_jsxs(DatePicker.ViewControl, { children: [_jsx(DatePicker.PrevTrigger, { children: _jsx(ChevronLeftIcon, {}) }), _jsx(DatePicker.ViewTrigger, { children: _jsx(DatePicker.RangeText, {}) }), _jsx(DatePicker.NextTrigger, { children: _jsx(ChevronRightIcon, {}) })] }), _jsx(DatePicker.Table, { children: _jsx(DatePicker.TableBody, { children: datePicker
308
- .getYearsGrid({ columns: 4 })
309
- .map((years, id) => (_jsx(DatePicker.TableRow, { children: years.map((year, id) => (_jsx(DatePicker.TableCell, { value: year.value, children: _jsx(DatePicker.TableCellTrigger, { className: "w-[4.425rem]", children: year.label }) }, id))) }, id))) }) })] })) }) })] }) })] }));
310
- }
@@ -1 +0,0 @@
1
- export declare function CaptureIdDocument(): import("react/jsx-runtime").JSX.Element;