@opexa/portal-components 0.0.535 → 0.0.536

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 (66) hide show
  1. package/dist/components/SignIn/SignInMethod.d.ts +1 -1
  2. package/dist/components/SignIn/SignInMethod.js +2 -0
  3. package/dist/components/SignIn/useSignIn.d.ts +2 -0
  4. package/dist/components/SignIn/useSignIn.js +5 -1
  5. package/dist/components/SignUp/SignUpNameAndPassword/SignUpNameAndPasswordForm.js +8 -4
  6. package/dist/ui/AlertDialog/AlertDialog.d.ts +55 -55
  7. package/dist/ui/AlertDialog/alertDialog.recipe.d.ts +5 -5
  8. package/dist/ui/Carousel/Carousel.d.ts +45 -45
  9. package/dist/ui/Carousel/carousel.recipe.d.ts +5 -5
  10. package/dist/ui/Checkbox/Checkbox.d.ts +23 -23
  11. package/dist/ui/Checkbox/checkbox.recipe.d.ts +3 -3
  12. package/dist/ui/Clipboard/Clipboard.d.ts +18 -18
  13. package/dist/ui/Clipboard/clipboard.recipe.d.ts +3 -3
  14. package/dist/ui/Combobox/Combobox.d.ts +42 -42
  15. package/dist/ui/Combobox/combobox.recipe.d.ts +3 -3
  16. package/dist/ui/Dialog/Dialog.d.ts +33 -33
  17. package/dist/ui/Dialog/dialog.recipe.d.ts +3 -3
  18. package/dist/ui/Drawer/Drawer.d.ts +33 -33
  19. package/dist/ui/Drawer/drawer.recipe.d.ts +3 -3
  20. package/dist/ui/PasswordInput/PasswordInput.d.ts +18 -18
  21. package/dist/ui/PasswordInput/passwordInput.recipe.d.ts +3 -3
  22. package/dist/ui/Select/Select.d.ts +45 -45
  23. package/dist/ui/Select/select.recipe.d.ts +3 -3
  24. package/dist/ui/Table/Table.d.ts +21 -21
  25. package/dist/ui/Table/table.anatomy.d.ts +1 -1
  26. package/dist/ui/Table/table.recipe.d.ts +3 -3
  27. package/package.json +1 -1
  28. package/dist/components/Banner/Banner.client.d.ts +0 -12
  29. package/dist/components/Banner/Banner.client.js +0 -49
  30. package/dist/components/DigitainLauncher/Loading.d.ts +0 -1
  31. package/dist/components/DigitainLauncher/Loading.js +0 -5
  32. package/dist/components/KYC/BasicInformation.d.ts +0 -1
  33. package/dist/components/KYC/BasicInformation.js +0 -101
  34. package/dist/components/KYC/IdentityVerification.d.ts +0 -1
  35. package/dist/components/KYC/IdentityVerification.js +0 -120
  36. package/dist/components/KYC/Indicator.d.ts +0 -1
  37. package/dist/components/KYC/Indicator.js +0 -8
  38. package/dist/components/KYC/KYC.lazy.d.ts +0 -6
  39. package/dist/components/KYC/KYC.lazy.js +0 -45
  40. package/dist/components/KYC/KYCContext.d.ts +0 -6
  41. package/dist/components/KYC/KYCContext.js +0 -2
  42. package/dist/components/KYC/PersonalInformation.d.ts +0 -1
  43. package/dist/components/KYC/PersonalInformation.js +0 -122
  44. package/dist/components/KYC/useKYC.d.ts +0 -25
  45. package/dist/components/KYC/useKYC.js +0 -38
  46. package/dist/components/PortalProvider/CXDTokenObserver.d.ts +0 -1
  47. package/dist/components/PortalProvider/CXDTokenObserver.js +0 -30
  48. package/dist/components/SignIn/utils.d.ts +0 -8
  49. package/dist/components/SignIn/utils.js +0 -26
  50. package/dist/constants/Branches.d.ts +0 -2
  51. package/dist/constants/Branches.js +0 -42
  52. package/dist/images/responsible-gaming-yellow.png +0 -0
  53. package/dist/third-parties/FacebookPixel/FacebookPixel.d.ts +0 -4
  54. package/dist/third-parties/FacebookPixel/FacebookPixel.js +0 -4
  55. package/dist/third-parties/FacebookPixel/api.d.ts +0 -0
  56. package/dist/third-parties/FacebookPixel/api.js +0 -1
  57. package/dist/third-parties/FacebookPixel/index.d.ts +0 -1
  58. package/dist/third-parties/FacebookPixel/index.js +0 -1
  59. package/dist/third-parties/GoogleRecaptcha/GoogleRecaptcha.d.ts +0 -4
  60. package/dist/third-parties/GoogleRecaptcha/GoogleRecaptcha.js +0 -4
  61. package/dist/third-parties/GoogleRecaptcha/api.d.ts +0 -0
  62. package/dist/third-parties/GoogleRecaptcha/api.js +0 -1
  63. package/dist/third-parties/GoogleRecaptcha/index.d.ts +0 -1
  64. package/dist/third-parties/GoogleRecaptcha/index.js +0 -1
  65. package/dist/third-parties/index.d.ts +0 -2
  66. package/dist/third-parties/index.js +0 -2
@@ -1 +1 @@
1
- export declare function SignInMethod(): import("react/jsx-runtime").JSX.Element;
1
+ export declare function SignInMethod(): import("react/jsx-runtime").JSX.Element | null;
@@ -12,6 +12,8 @@ const METHOD_LABEL_MAP = {
12
12
  };
13
13
  export function SignInMethod() {
14
14
  const context = useSignInContext();
15
+ if (context.types.length <= 1)
16
+ return null;
15
17
  return (_jsxs(SegmentGroup.Root, { value: context.type, onValueChange: (details) => {
16
18
  context.setStep(1);
17
19
  context.setType(z.enum(METHODS).parse(details.value));
@@ -1,6 +1,7 @@
1
1
  export type SignInStep = 1 | 2 | (number & {});
2
2
  export type SignInType = 'NAME_AND_PASSWORD' | 'MOBILE_NUMBER';
3
3
  export interface UseSignInProps {
4
+ types?: SignInType[];
4
5
  defaultType?: SignInType;
5
6
  }
6
7
  export interface UseSignInReturn {
@@ -8,5 +9,6 @@ export interface UseSignInReturn {
8
9
  setStep: (step: SignInStep) => void;
9
10
  type: SignInType;
10
11
  setType: (type: SignInType) => void;
12
+ types: SignInType[];
11
13
  }
12
14
  export declare function useSignIn(props?: UseSignInProps): UseSignInReturn;
@@ -1,11 +1,15 @@
1
1
  import { useState } from 'react';
2
2
  export function useSignIn(props) {
3
+ const types = !props?.types?.length
4
+ ? ['MOBILE_NUMBER', 'NAME_AND_PASSWORD']
5
+ : props.types;
3
6
  const [step, setStep] = useState(1);
4
- const [type, setType] = useState(props?.defaultType ?? 'MOBILE_NUMBER');
7
+ const [type, setType] = useState(props?.defaultType ?? types[0]);
5
8
  return {
6
9
  step,
7
10
  setStep,
8
11
  type,
9
12
  setType,
13
+ types,
10
14
  };
11
15
  }
@@ -20,6 +20,8 @@ import { CheckIcon } from '../../../icons/CheckIcon.js';
20
20
  import { ChevronDownIcon } from '../../../icons/ChevronDownIcon.js';
21
21
  import { ChevronLeftIcon } from '../../../icons/ChevronLeftIcon.js';
22
22
  import { ChevronRightIcon } from '../../../icons/ChevronRightIcon.js';
23
+ import { EyeIcon } from '../../../icons/EyeIcon.js';
24
+ import { EyeOffIcon } from '../../../icons/EyeOffIcon.js';
23
25
  import { HelpCircleIcon } from '../../../icons/HelpCircleIcon.js';
24
26
  import pagcorLogo from '../../../images/pagcor-round-icon.png';
25
27
  import responsibleGamingLogo from '../../../images/responsible-gaming-gold.png';
@@ -28,6 +30,7 @@ import { Button } from '../../../ui/Button/index.js';
28
30
  import { Checkbox } from '../../../ui/Checkbox/index.js';
29
31
  import { DatePicker } from '../../../ui/DatePicker/index.js';
30
32
  import { Field } from '../../../ui/Field/index.js';
33
+ import { PasswordInput } from '../../../ui/PasswordInput/index.js';
31
34
  import { Select } from '../../../ui/Select/index.js';
32
35
  import { Tooltip } from '../../../ui/Tooltip/index.js';
33
36
  import { createPoll } from '../../../utils/createPoll.js';
@@ -54,13 +57,14 @@ export function SignUpNameAndPasswordForm() {
54
57
  name: z
55
58
  .string()
56
59
  .trim()
57
- .min(5, 'Name must be 5 or more characters')
58
- .max(100, 'Name must not be more that 100 characters'),
60
+ .regex(/^[0-9a-z]*$/, 'Name must be alphanumeric')
61
+ .min(6, 'Name must be 6 or more characters')
62
+ .max(20, 'Name must not be more that 20 characters'),
59
63
  password: z
60
64
  .string()
61
65
  .trim()
62
66
  .min(8, 'Password must be 8 or more characters')
63
- .max(100, 'Password must not be more that 100 characters'),
67
+ .max(32, 'Password must not be more that 32 characters'),
64
68
  termsAccepted: z.boolean().superRefine((v, ctx) => {
65
69
  if (!v) {
66
70
  ctx.addIssue({
@@ -168,7 +172,7 @@ export function SignUpNameAndPasswordForm() {
168
172
  description: error instanceof Error ? error.message : 'Something went wrong',
169
173
  });
170
174
  }
171
- }), children: [_jsxs(Field.Root, { invalid: !!form.formState.errors.name, className: "mt-xl", children: [_jsx(Field.Label, { children: "Name" }), _jsx(Field.Input, { placeholder: "Enter your name", ...form.register('name') }), _jsx(Field.ErrorText, { children: form.formState.errors.name?.message })] }), _jsxs(Field.Root, { invalid: !!form.formState.errors.password, className: "mt-xl", children: [_jsx(Field.Label, { children: "Password" }), _jsx(Field.Input, { type: "password", placeholder: "Enter your password", ...form.register('password') }), _jsx(Field.ErrorText, { children: form.formState.errors.password?.message })] }), _jsxs(Field.Root, { invalid: !!form.formState.errors.firstName, className: "mt-xl", children: [_jsx(Field.Label, { children: "First Name" }), _jsx(Field.Input, { placeholder: "Enter your first name", ...form.register('firstName') }), _jsx(Field.ErrorText, { children: form.formState.errors.firstName?.message })] }), _jsxs(Field.Root, { invalid: !!form.formState.errors.lastName, className: "mt-xl", children: [_jsx(Field.Label, { children: "Last Name" }), _jsx(Field.Input, { placeholder: "Enter your last name", ...form.register('lastName') }), _jsx(Field.ErrorText, { children: form.formState.errors.lastName?.message })] }), _jsxs(Field.Root, { invalid: !!form.formState.errors.birthDay, className: "mt-xl", children: [_jsx(DateOfBirthField, { value: form.watch('birthDay'), onChange: (value) => {
175
+ }), children: [_jsxs(Field.Root, { invalid: !!form.formState.errors.name, className: "mt-xl", children: [_jsx(Field.Label, { children: "Name" }), _jsx(Field.Input, { placeholder: "Enter your name", ...form.register('name') }), _jsx(Field.ErrorText, { children: form.formState.errors.name?.message })] }), _jsxs(Field.Root, { invalid: !!form.formState.errors.password, className: "mt-xl", children: [_jsxs(PasswordInput.Root, { children: [_jsx(PasswordInput.Label, { children: "Password" }), _jsxs(PasswordInput.Control, { children: [_jsx(PasswordInput.Input, { placeholder: "Enter your password", ...form.register('password') }), _jsx(PasswordInput.VisibilityTrigger, { children: _jsx(PasswordInput.Indicator, { fallback: _jsx(EyeOffIcon, {}), asChild: true, children: _jsx(EyeIcon, {}) }) })] })] }), _jsx(Field.ErrorText, { children: form.formState.errors.password?.message })] }), _jsxs(Field.Root, { invalid: !!form.formState.errors.firstName, className: "mt-xl", children: [_jsx(Field.Label, { children: "First Name" }), _jsx(Field.Input, { placeholder: "Enter your first name", ...form.register('firstName') }), _jsx(Field.ErrorText, { children: form.formState.errors.firstName?.message })] }), _jsxs(Field.Root, { invalid: !!form.formState.errors.lastName, className: "mt-xl", children: [_jsx(Field.Label, { children: "Last Name" }), _jsx(Field.Input, { placeholder: "Enter your last name", ...form.register('lastName') }), _jsx(Field.ErrorText, { children: form.formState.errors.lastName?.message })] }), _jsxs(Field.Root, { invalid: !!form.formState.errors.birthDay, className: "mt-xl", children: [_jsx(DateOfBirthField, { value: form.watch('birthDay'), onChange: (value) => {
172
176
  if (!value)
173
177
  return;
174
178
  form.setValue('birthDay', value, {