@opexa/portal-components 0.0.959 → 0.0.961

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 (108) hide show
  1. package/dist/client/hooks/useCamera.d.ts +1 -1
  2. package/dist/client/hooks/useCamera.js +22 -66
  3. package/dist/components/AccountInfo/AccountInfo.js +1 -1
  4. package/dist/components/AccountSecurity/AccountSecurity.js +1 -1
  5. package/dist/components/DepositWithdrawal/Deposit/AiOGCashDeposit/AiOGCashDeposit.js +1 -1
  6. package/dist/components/DepositWithdrawal/Deposit/AiOGrabPayDeposit/AiOGrabPayDeposit.js +1 -1
  7. package/dist/components/DepositWithdrawal/Deposit/AiOPayMayaDeposit/AiOPayMayaDeposit.js +1 -1
  8. package/dist/components/DepositWithdrawal/Deposit/AurixPayGCashDeposit/AurixPayGCashDeposit.js +2 -2
  9. package/dist/components/DepositWithdrawal/Deposit/AurixPayGrabPayDeposit/AurixPayGrabPayDeposit.js +2 -2
  10. package/dist/components/DepositWithdrawal/Deposit/AurixPayPayMayaDeposit/AurixPayPayMayaDeposit.js +2 -2
  11. package/dist/components/DepositWithdrawal/Deposit/AurixPayQRPHDeposit/Form.js +1 -1
  12. package/dist/components/DepositWithdrawal/Deposit/Deposit.js +20 -10
  13. package/dist/components/DepositWithdrawal/Deposit/GCashDeposit/GCashDeposit.js +1 -1
  14. package/dist/components/DepositWithdrawal/Deposit/GCashWebpayDeposit/GCashWebpayDeposit.js +1 -1
  15. package/dist/components/DepositWithdrawal/Deposit/LibanganDeposit/LibanganDeposit.js +1 -1
  16. package/dist/components/DepositWithdrawal/Deposit/MayaAppDeposit/MayaAppDeposit.js +1 -1
  17. package/dist/components/DepositWithdrawal/Deposit/MayaDeposit/MayaDeposit.js +1 -1
  18. package/dist/components/DepositWithdrawal/Deposit/MayaWebpayDeposit/MayaWebpayDeposit.js +1 -1
  19. package/dist/components/DepositWithdrawal/Deposit/OnlineBankDeposit/OnlineBankDepositContext.d.ts +2 -2
  20. package/dist/components/DepositWithdrawal/Deposit/OnlineBankDeposit/OnlineBankDepositForm.js +1 -1
  21. package/dist/components/DepositWithdrawal/Deposit/OnlineBankDeposit/useOnlineBankDeposit.d.ts +1 -1
  22. package/dist/components/DepositWithdrawal/Deposit/PisoPayDeposit/PisoPayDeposit.js +1 -1
  23. package/dist/components/DepositWithdrawal/Deposit/QRPHDeposit/Form.js +1 -1
  24. package/dist/components/DepositWithdrawal/DepositWithdrawal.lazy.d.ts +1 -0
  25. package/dist/components/DepositWithdrawal/DepositWithdrawal.lazy.js +2 -1
  26. package/dist/components/DepositWithdrawal/Withdrawal/GCashStandardCashInWithdrawal/GCashStandardCashInWithdrawal.js +1 -1
  27. package/dist/components/DepositWithdrawal/Withdrawal/GCashWithdrawal/GCashWithdrawal.js +1 -1
  28. package/dist/components/DepositWithdrawal/Withdrawal/InstapayGCashWithdrawal/InstapayGcashWithdrawal.js +2 -2
  29. package/dist/components/DepositWithdrawal/Withdrawal/InstapayPaymayaWithdrawal/InstapayPaymayaWithdrawal.js +2 -2
  30. package/dist/components/DepositWithdrawal/Withdrawal/InstapayWithdrawal/InstapayWithdrawal.js +1 -1
  31. package/dist/components/DepositWithdrawal/Withdrawal/MayaWithdrawal/MayaWithdrawal.js +1 -1
  32. package/dist/components/DepositWithdrawal/Withdrawal/VentajaWithdrawal/VentajaWithdrawal.js +1 -1
  33. package/dist/components/Disclaimer/DisclaimerV3.js +21 -12
  34. package/dist/components/ForgotPassword/Crazywin/CWForgotPassword.js +1 -1
  35. package/dist/components/ForgotPassword/Crazywin/CWForgotPasswordForm.js +2 -2
  36. package/dist/components/ForgotPassword/ForgotPasswordForm.js +3 -3
  37. package/dist/components/GameProviders/GameProvidersCarousel.d.ts +8 -0
  38. package/dist/components/GameProviders/GameProvidersCarousel.js +32 -0
  39. package/dist/components/Games/Game.js +6 -1
  40. package/dist/components/Jackpots/JackpotsCarouselNext/JackpotsCarouselStageItem.js +1 -1
  41. package/dist/components/Quests/Crazywin/components/Countdown.js +1 -1
  42. package/dist/components/SignUp/SignUpKYC/SelfieImageField/useSelfieImageField.js +0 -1
  43. package/dist/components/TermsOfUse/TermsOfUseV2.lazy.d.ts +1 -1
  44. package/dist/components/TermsOfUse/TermsOfUseV2.lazy.js +1 -1
  45. package/dist/components/TermsOfUse/TermsOfUseV3.lazy.d.ts +1 -1
  46. package/dist/components/TermsOfUse/TermsOfUseV3.lazy.js +1 -1
  47. package/dist/components/shared/SelfieImageField/useSelfieImageField.js +1 -3
  48. package/dist/handlers/index.d.ts +2 -2
  49. package/dist/lib/components/Banner/Banner.test.js +1 -1
  50. package/dist/lib/components/DepositWithdrawal/Deposit/Deposit.js +2 -1
  51. package/dist/lib/components/DepositWithdrawal/Withdrawal/GCashStandardCashInWithdrawal/GCashStandardCashInWithdrawal.js +1 -1
  52. package/dist/lib/components/DepositWithdrawal/Withdrawal/GCashWithdrawal/GCashWithdrawal.js +1 -1
  53. package/dist/lib/components/DepositWithdrawal/Withdrawal/InstapayGCashWithdrawal/InstapayGcashWithdrawal.js +1 -1
  54. package/dist/lib/components/DepositWithdrawal/Withdrawal/InstapayPaymayaWithdrawal/InstapayPaymayaWithdrawal.js +1 -1
  55. package/dist/lib/components/DepositWithdrawal/Withdrawal/MayaAppWithdrawal/MayaAppWithdrawal.js +1 -1
  56. package/dist/lib/components/DepositWithdrawal/Withdrawal/MayaWithdrawal/MayaWithdrawal.js +1 -1
  57. package/dist/lib/components/DepositWithdrawal/Withdrawal/PisoPayWithdrawal/PisoPayWithdrawal.js +1 -1
  58. package/dist/lib/components/DepositWithdrawal/Withdrawal/TransactionPasswordNotSet.js +2 -2
  59. package/dist/lib/components/DepositWithdrawal/Withdrawal/VentajaWithdrawal/VentajaWithdrawal.js +4 -4
  60. package/dist/lib/components/Disclaimer/Disclaimer.test.js +7 -7
  61. package/dist/lib/components/Games/Game.js +1 -5
  62. package/dist/lib/components/SignIn/MobileNumberSignIn.test.js +9 -8
  63. package/dist/lib/components/SignIn/NameAndPasswordSignIn.test.js +14 -10
  64. package/dist/lib/components/SignIn/SignIn.test.js +4 -3
  65. package/dist/schemas/forgotPasswordSchema.d.ts +4 -4
  66. package/dist/ui/AlertDialog/AlertDialog.d.ts +154 -154
  67. package/dist/ui/AlertDialog/alertDialog.recipe.d.ts +14 -14
  68. package/dist/ui/Badge/Badge.d.ts +12 -12
  69. package/dist/ui/Badge/badge.anatomy.d.ts +1 -1
  70. package/dist/ui/Badge/badge.recipe.d.ts +3 -3
  71. package/dist/ui/Carousel/Carousel.d.ts +72 -72
  72. package/dist/ui/Carousel/carousel.recipe.d.ts +8 -8
  73. package/dist/ui/Checkbox/Checkbox.d.ts +23 -23
  74. package/dist/ui/Checkbox/checkbox.recipe.d.ts +3 -3
  75. package/dist/ui/Clipboard/Clipboard.d.ts +18 -18
  76. package/dist/ui/Clipboard/clipboard.recipe.d.ts +3 -3
  77. package/dist/ui/Collapsible/Collapsible.d.ts +20 -20
  78. package/dist/ui/Collapsible/collapsible.recipe.d.ts +5 -5
  79. package/dist/ui/Combobox/Combobox.d.ts +42 -42
  80. package/dist/ui/Combobox/combobox.recipe.d.ts +3 -3
  81. package/dist/ui/DatePicker/DatePicker.d.ts +72 -72
  82. package/dist/ui/DatePicker/datePicker.recipe.d.ts +3 -3
  83. package/dist/ui/Dialog/Dialog.d.ts +33 -33
  84. package/dist/ui/Dialog/dialog.recipe.d.ts +3 -3
  85. package/dist/ui/Drawer/Drawer.d.ts +33 -33
  86. package/dist/ui/Drawer/drawer.recipe.d.ts +3 -3
  87. package/dist/ui/Menu/Menu.d.ts +198 -198
  88. package/dist/ui/Menu/menu.recipe.d.ts +11 -11
  89. package/dist/ui/Popover/Popover.d.ts +88 -88
  90. package/dist/ui/Popover/popover.recipe.d.ts +8 -8
  91. package/dist/ui/QrCode/QrCode.d.ts +25 -25
  92. package/dist/ui/QrCode/qrCode.recipe.d.ts +5 -5
  93. package/dist/ui/Select/Select.d.ts +45 -45
  94. package/dist/ui/Select/select.recipe.d.ts +3 -3
  95. package/dist/ui/Table/Table.d.ts +21 -21
  96. package/dist/ui/Table/table.anatomy.d.ts +1 -1
  97. package/dist/ui/Table/table.recipe.d.ts +3 -3
  98. package/dist/ui/Tabs/Tabs.d.ts +15 -15
  99. package/dist/ui/Tabs/tabs.recipe.d.ts +3 -3
  100. package/package.json +1 -1
  101. package/dist/client/hooks/useVerifyMobileNumber.d.ts +0 -3
  102. package/dist/client/hooks/useVerifyMobileNumber.js +0 -20
  103. package/dist/components/DepositWithdrawal/Deposit/AurixPayPayMayaDeposit/AurixPayGrabPayDeposit.d.ts +0 -1
  104. package/dist/components/DepositWithdrawal/Deposit/AurixPayPayMayaDeposit/AurixPayGrabPayDeposit.js +0 -241
  105. package/dist/components/SingleSignOn/SingleSignOn.d.ts +0 -4
  106. package/dist/components/SingleSignOn/SingleSignOn.js +0 -185
  107. package/dist/components/SingleSignOn/index.d.ts +0 -1
  108. package/dist/components/SingleSignOn/index.js +0 -1
@@ -89,11 +89,7 @@ function GameImage({ priority }) {
89
89
  image: game.image,
90
90
  }), [game.reference, game.provider, game.image]);
91
91
  const [imgSrc, setImgSrc] = useState(initialImageUrl);
92
- return (_jsx(Image, { src: game.name === 'Rainbow Ball' && game.id === '22wQ1YcMwrBaZH3Mx7'
93
- ? RainbowballImg
94
- : imgSrc, alt: game.name, width: 200, height: 200, loading: priority ? undefined : 'lazy', priority: priority, unoptimized: true, sizes: "(max-width: 768px) 33vw, 200px", className: twMerge('aspect-square w-full rounded-t-md object-contain', game.name === 'Rainbow Ball' &&
95
- game.id === '22wQ1YcMwrBaZH3Mx7' &&
96
- 'object-cover'), onError: () => {
92
+ return (_jsx(Image, { src: game.name === 'Rainbow Ball' ? RainbowballImg : imgSrc, alt: game.name, width: 200, height: 200, loading: priority ? undefined : 'lazy', priority: priority, unoptimized: true, sizes: "(max-width: 768px) 33vw, 200px", className: twMerge('aspect-square w-full rounded-t-md object-contain', game.name === 'Rainbow Ball' && 'object-cover'), onError: () => {
97
93
  const fallbackThumbnail = props.fallbackThumbnails?.[game.provider];
98
94
  if (fallbackThumbnail) {
99
95
  setImgSrc(fallbackThumbnail);
@@ -42,10 +42,10 @@ vi.mock('next/navigation', () => ({
42
42
  }));
43
43
  // Mock external components
44
44
  vi.mock('./GoogleSignInTrigger', () => ({
45
- GoogleSignInTrigger: () => _jsx("button", { children: "Google Sign In" }),
45
+ GoogleSignInTrigger: () => _jsx("button", { type: "button", children: "Google Sign In" }),
46
46
  }));
47
47
  vi.mock('../../FacebookSignInTrigger', () => ({
48
- FacebookSignInTrigger: () => _jsx("button", { children: "Facebook Sign In" }),
48
+ FacebookSignInTrigger: () => _jsx("button", { type: "button", children: "Facebook Sign In" }),
49
49
  }));
50
50
  vi.mock('../../ui/Checkbox', () => {
51
51
  const React = require('react');
@@ -54,11 +54,12 @@ vi.mock('../../ui/Checkbox', () => {
54
54
  Checkbox: {
55
55
  Root: ({ children, onCheckedChange }) => (_jsx(CheckboxContext.Provider, { value: { onCheckedChange }, children: _jsx("div", { children: children }) })),
56
56
  Control: ({ children }) => _jsx("div", { children: children }),
57
- Label: ({ children }) => _jsx("label", { children: children }),
57
+ Label: ({ children, htmlFor, ...props }) => (_jsx("label", { htmlFor: htmlFor ?? 'checkbox-input', ...props, children: children })),
58
58
  Indicator: ({ children }) => _jsx("div", { children: children }),
59
59
  HiddenInput: React.forwardRef((props, ref) => {
60
60
  const { onCheckedChange } = React.useContext(CheckboxContext);
61
- return (_jsx("input", { type: "checkbox", "data-testid": "input-terms", ref: ref, ...props, onChange: (e) => {
61
+ const id = props.id ?? 'checkbox-input';
62
+ return (_jsx("input", { type: "checkbox", "data-testid": "input-terms", id: id, ref: ref, ...props, onChange: (e) => {
62
63
  if (onCheckedChange)
63
64
  onCheckedChange({ checked: e.target.checked });
64
65
  } }));
@@ -73,8 +74,8 @@ vi.mock('../../ui/Field', () => {
73
74
  return {
74
75
  Field: {
75
76
  Root: ({ children }) => _jsx("div", { children: children }),
76
- Label: ({ children }) => _jsx("label", { children: children }),
77
- Input: React.forwardRef((props, ref) => _jsx("input", { "data-testid": `input-${props.name || 'field'}`, ref: ref, ...props })),
77
+ Label: ({ children, htmlFor, ...props }) => (_jsx("label", { htmlFor: htmlFor ?? props.name ?? 'field', ...props, children: children })),
78
+ Input: React.forwardRef((props, ref) => (_jsx("input", { "data-testid": `input-${props.name || 'field'}`, id: props.id ?? props.name ?? 'field', ref: ref, ...props }))),
78
79
  ErrorText: ({ children }) => _jsx("div", { children: children }),
79
80
  },
80
81
  };
@@ -84,8 +85,8 @@ vi.mock('../../ui/PinInput', () => {
84
85
  return {
85
86
  PinInput: {
86
87
  Root: ({ children }) => _jsx("div", { children: children }),
87
- Label: ({ children }) => _jsx("label", { children: children }),
88
- Input: React.forwardRef((props, ref) => _jsx("input", { "data-testid": "input-otp", ref: ref, ...props })),
88
+ Label: ({ children, htmlFor, ...props }) => (_jsx("label", { htmlFor: htmlFor ?? 'pin-input', ...props, children: children })),
89
+ Input: React.forwardRef((props, ref) => (_jsx("input", { "data-testid": "input-otp", id: props.id ?? 'pin-input', ref: ref, ...props }))),
89
90
  Control: ({ children }) => _jsx("div", { children: children }),
90
91
  HiddenInput: () => null,
91
92
  },
@@ -36,10 +36,10 @@ vi.mock('@ark-ui/react/dialog', () => ({
36
36
  }));
37
37
  // Mock external components
38
38
  vi.mock('./GoogleSignInTrigger', () => ({
39
- GoogleSignInTrigger: () => _jsx("button", { children: "Google Sign In" }),
39
+ GoogleSignInTrigger: () => _jsx("button", { type: "button", children: "Google Sign In" }),
40
40
  }));
41
41
  vi.mock('./FacebookSignInTrigger', () => ({
42
- FacebookSignInTrigger: () => _jsx("button", { children: "Facebook Sign In" }),
42
+ FacebookSignInTrigger: () => _jsx("button", { type: "button", children: "Facebook Sign In" }),
43
43
  }));
44
44
  vi.mock('../../ui/Checkbox', () => {
45
45
  const React = require('react');
@@ -48,11 +48,12 @@ vi.mock('../../ui/Checkbox', () => {
48
48
  Checkbox: {
49
49
  Root: ({ children, onCheckedChange }) => (_jsx(CheckboxContext.Provider, { value: { onCheckedChange }, children: _jsx("div", { children: children }) })),
50
50
  Control: ({ children }) => _jsx("div", { children: children }),
51
- Label: ({ children }) => _jsx("label", { children: children }),
51
+ Label: ({ children, htmlFor, ...props }) => (_jsx("label", { htmlFor: htmlFor ?? 'checkbox-input', ...props, children: children })),
52
52
  Indicator: ({ children }) => _jsx("div", { children: children }),
53
53
  HiddenInput: React.forwardRef((props, ref) => {
54
54
  const { onCheckedChange } = React.useContext(CheckboxContext);
55
- return (_jsx("input", { type: "checkbox", "data-testid": "input-terms", ref: ref, ...props, onChange: (e) => {
55
+ const id = props.id ?? 'checkbox-input';
56
+ return (_jsx("input", { type: "checkbox", "data-testid": "input-terms", id: id, ref: ref, ...props, onChange: (e) => {
56
57
  if (onCheckedChange)
57
58
  onCheckedChange({ checked: e.target.checked });
58
59
  } }));
@@ -69,8 +70,8 @@ vi.mock('../../ui/Field', () => {
69
70
  return {
70
71
  Field: {
71
72
  Root: ({ children }) => _jsx("div", { children: children }),
72
- Label: ({ children }) => _jsx("label", { children: children }),
73
- Input: React.forwardRef((props, ref) => _jsx("input", { "data-testid": `input-${props.name}`, ref: ref, ...props })),
73
+ Label: ({ children, htmlFor, ...props }) => (_jsx("label", { htmlFor: htmlFor ?? props.name ?? 'field', ...props, children: children })),
74
+ Input: React.forwardRef((props, ref) => (_jsx("input", { "data-testid": `input-${props.name}`, id: props.id ?? props.name ?? 'field', ref: ref, ...props }))),
74
75
  HelperText: ({ children }) => _jsx("div", { children: children }),
75
76
  ErrorText: ({ children }) => _jsx("div", { children: children }),
76
77
  },
@@ -79,18 +80,21 @@ vi.mock('../../ui/Field', () => {
79
80
  vi.mock('../../ui/PasswordInput', () => {
80
81
  const React = require('react');
81
82
  const { useState, useContext, createContext } = React;
82
- const VisibilityContext = createContext({ visible: false, setVisible: (v) => { } });
83
+ const VisibilityContext = createContext({
84
+ visible: false,
85
+ setVisible: (_v) => { },
86
+ });
83
87
  return {
84
88
  PasswordInput: {
85
89
  Root: ({ children }) => {
86
90
  const [visible, setVisible] = useState(false);
87
91
  return (_jsx(VisibilityContext.Provider, { value: { visible, setVisible }, children: _jsx("div", { children: children }) }));
88
92
  },
89
- Label: ({ children }) => _jsx("label", { children: children }),
93
+ Label: ({ children, htmlFor, ...props }) => (_jsx("label", { htmlFor: htmlFor ?? 'password', ...props, children: children })),
90
94
  Input: React.forwardRef((props, ref) => {
91
95
  const { visible } = useContext(VisibilityContext);
92
96
  // Ensure type is passed correctly if not overridden
93
- return _jsx("input", { "data-testid": `input-${props.name || 'password'}`, ref: ref, type: visible ? 'text' : 'password', ...props });
97
+ return (_jsx("input", { "data-testid": `input-${props.name || 'password'}`, id: props.id ?? props.name ?? 'password', ref: ref, type: visible ? 'text' : 'password', ...props }));
94
98
  }),
95
99
  Control: ({ children }) => _jsx("div", { children: children }),
96
100
  VisibilityTrigger: ({ children }) => {
@@ -197,7 +201,7 @@ describe('NameAndPasswordSignIn', () => {
197
201
  expect(passwordInput).toHaveAttribute('type', 'password');
198
202
  });
199
203
  it('handles security question flow', async () => {
200
- const user = userEvent.setup();
204
+ const _user = userEvent.setup();
201
205
  // Mock SignInMutation returning a security question challenge
202
206
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
203
207
  mockSignInMutation.data = {
@@ -26,7 +26,10 @@ vi.mock('./HappyBingo/SignInForm', () => ({
26
26
  }));
27
27
  // Mock Next.js Image since it's used in the wrapper
28
28
  vi.mock('next/image', () => ({
29
- default: (props) => _jsx("img", { ...props, alt: props.alt || '' }),
29
+ default: (props) => {
30
+ // biome-ignore lint/performance/noImgElement: mock Next/Image with plain img in tests
31
+ return _jsx("img", { ...props, alt: props.alt || '' });
32
+ },
30
33
  }));
31
34
  const mockLogo = '/mock-logo.png';
32
35
  describe('SignIn Wrapper', () => {
@@ -60,7 +63,6 @@ describe('SignIn Wrapper', () => {
60
63
  expect(screen.getByTestId('mock-hb-sign-in-form')).toBeInTheDocument();
61
64
  });
62
65
  it('closes dialog when close trigger is clicked', async () => {
63
- const user = require('@testing-library/user-event').default.setup();
64
66
  render(_jsx(SignIn, { ...defaultProps }));
65
67
  // Find close button (usually checking for label or class, assuming standard Dialog CloseTrigger)
66
68
  // Our Dialog mock or real Dialog implementation needs to be checked.
@@ -74,7 +76,6 @@ describe('SignIn Wrapper', () => {
74
76
  </Dialog.CloseTrigger>
75
77
  */
76
78
  // Ark UI CloseTrigger usually renders a button.
77
- const closeButtons = screen.getAllByRole('button');
78
79
  // Assuming the first one or finding by icon logic?
79
80
  // Actually, let's just use fireEvent on the overlay or trigger if finding it is hard without testId.
80
81
  // But let's try finding by role.
@@ -8,23 +8,23 @@ export declare const createForgotPasswordSchema: (mobileNumberParser: MobileNumb
8
8
  mobileNumber: z.ZodEffects<z.ZodString, string, string>;
9
9
  verificationCode: z.ZodEffects<z.ZodString, string, string>;
10
10
  }, "strip", z.ZodTypeAny, {
11
- verificationCode: string;
12
11
  password: string;
12
+ verificationCode: string;
13
13
  mobileNumber: string;
14
14
  confirmPassword: string;
15
15
  }, {
16
- verificationCode: string;
17
16
  password: string;
17
+ verificationCode: string;
18
18
  mobileNumber: string;
19
19
  confirmPassword: string;
20
20
  }>, {
21
- verificationCode: string;
22
21
  password: string;
22
+ verificationCode: string;
23
23
  mobileNumber: string;
24
24
  confirmPassword: string;
25
25
  }, {
26
- verificationCode: string;
27
26
  password: string;
27
+ verificationCode: string;
28
28
  mobileNumber: string;
29
29
  confirmPassword: string;
30
30
  }>;