@opexa/portal-components 0.1.80 → 0.1.84
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.
- package/dist/components/SignIn/CrazyWin/NameAndPasswordSignIn.js +2 -1
- package/dist/components/SignIn/HappyBingo/NameAndPasswordSignIn.js +2 -1
- package/dist/components/SignIn/NameAndPasswordSignIn.js +2 -1
- package/dist/components/SignIn/SignIn.lazy.d.ts +5 -0
- package/dist/components/SignUp/SignUpDefault/SignUpDefaultForm.js +1 -4
- package/package.json +4 -1
|
@@ -273,7 +273,8 @@ export function NameAndPasswordSignIn() {
|
|
|
273
273
|
}) })] }), _jsx(Field.ErrorText, { className: "text-[#ff2525b3] text-xs", children: form.formState.errors.name?.message })] }), _jsx(Field.Root, { disabled: !!signInMutation.data, invalid: !!form.formState.errors.password, className: "mt-xl", children: _jsxs(PasswordInput.Root, { children: [_jsx(PasswordInput.Label, { className: "text-xs", children: "Password" }), _jsxs("div", { children: [_jsxs(PasswordInput.Control, { className: "relative flex h-10 items-center rounded-full text-xs", children: [_jsx(Image, { src: lockIcon, alt: "lock icon", width: 20, height: 20, className: "-translate-y-1/2 pointer-events-none absolute top-1/2 left-3 h-5 w-5" }), _jsx(PasswordInput.Input, { className: "pl-10", placeholder: "Enter your password", ...form.register('password') }), _jsx(PasswordInput.VisibilityTrigger, { children: _jsx(PasswordInput.Indicator, { fallback: _jsx(EyeOffIcon, { className: "text-white/50" }), asChild: true, children: _jsx(EyeIcon, { className: "text-white/50" }) }) })] }), _jsx(Field.ErrorText, { className: "text-[#ff2525b3] text-xs", children: form.formState.errors.password?.message })] }), _jsx("div", { className: "mt-4 flex justify-end", children: _jsx("button", { type: "button", tabIndex: -1, className: "font-semibold text-[#FFE5AF] text-xs", onClick: () => {
|
|
274
274
|
globalStore.forgotPassword.setOpen(true);
|
|
275
275
|
dialog.setOpen(false);
|
|
276
|
-
}, children: "Forgot Password" }) })] }) }), signInMutation.data &&
|
|
276
|
+
}, children: "Forgot Password" }) })] }) }), signInMutation.data &&
|
|
277
|
+
signInProps.shouldPromptSecurityQuestion !== false && (_jsxs(Field.Root, { invalid: !!form.formState.errors.secretAnswer, className: "mt-xl", children: [_jsx(Field.Label, { children: secretQuestion }), _jsx(Field.Input, { placeholder: "Answer the security question", ...form.register('secretAnswer') }), _jsx(Field.ErrorText, { children: form.formState.errors.secretAnswer?.message })] })), _jsx(Button, { type: "submit", className: "mt-4 h-10 rounded-full text-sm", disabled: signInMutation.isPending || authenticateMutation.isPending, style: {
|
|
277
278
|
boxShadow: 'inset 0px -1px 2px 1px #fff7e1',
|
|
278
279
|
backgroundImage: 'linear-gradient(89deg, #c7802d -15.91%, #ffe585 28.75%, #ffeca6 49.46%, #c7802d 112.69%)',
|
|
279
280
|
}, children: "Login" }), _jsx(Controller, { control: form.control, name: "termsAccepted", render: (o) => (_jsxs(Field.Root, { invalid: o.fieldState.invalid, className: "mt-xl", children: [_jsxs(Checkbox.Root, { checked: o.field.value, onCheckedChange: (details) => {
|
|
@@ -270,7 +270,8 @@ export function NameAndPasswordSignIn() {
|
|
|
270
270
|
}) }), _jsx(Field.ErrorText, { children: form.formState.errors.name?.message })] }), _jsx(Field.Root, { disabled: !!signInMutation.data, invalid: !!form.formState.errors.password, className: "mt-xl", children: _jsxs(PasswordInput.Root, { children: [_jsx(PasswordInput.Label, { className: "text-[#344054] dark:text-[#CECFD2]", children: "Password" }), _jsxs("div", { children: [_jsxs(PasswordInput.Control, { className: "border-[#D0D5DD] bg-white text-[#101828] dark:border-[#333741] dark:bg-[#1D2939] dark:text-[#F5F5F6]", children: [_jsx(PasswordInput.Input, { placeholder: "Enter your password", ...form.register('password') }), _jsx(PasswordInput.VisibilityTrigger, { children: _jsx(PasswordInput.Indicator, { fallback: _jsx(EyeOffIcon, {}), asChild: true, className: "text-[#98A2B3] dark:text-[#94969C]", children: _jsx(EyeIcon, {}) }) })] }), _jsx(Field.ErrorText, { children: form.formState.errors.password?.message })] }), _jsx("div", { className: "mt-2 flex justify-end", children: _jsx("button", { type: "button", tabIndex: -1, className: "font-semibold text-[#A15C07] text-sm dark:text-[#CECFD2]", onClick: () => {
|
|
271
271
|
globalStore.forgotPassword.setOpen(true);
|
|
272
272
|
dialog.setOpen(false);
|
|
273
|
-
}, children: "Forgot Password?" }) })] }) }), signInMutation.data &&
|
|
273
|
+
}, children: "Forgot Password?" }) })] }) }), signInMutation.data &&
|
|
274
|
+
signInProps.shouldPromptSecurityQuestion !== false && (_jsxs(Field.Root, { invalid: !!form.formState.errors.secretAnswer, className: "mt-xl", children: [_jsx(Field.Label, { children: secretQuestion }), _jsx(Field.Input, { placeholder: "Answer the security question", ...form.register('secretAnswer') }), _jsx(Field.ErrorText, { children: form.formState.errors.secretAnswer?.message })] })), _jsx(Button, { type: "submit", className: "mt-3xl", disabled: signInMutation.isPending || authenticateMutation.isPending, children: "Log In" }), _jsx(Controller, { control: form.control, name: "termsAccepted", render: (o) => (_jsxs(Field.Root, { invalid: o.fieldState.invalid, className: "mt-xl", children: [_jsxs(Checkbox.Root, { variant: "outline", checked: o.field.value, onCheckedChange: (details) => {
|
|
274
275
|
if (details.checked === 'indeterminate')
|
|
275
276
|
return;
|
|
276
277
|
o.field.onChange(details.checked);
|
|
@@ -304,7 +304,8 @@ export function NameAndPasswordSignIn() {
|
|
|
304
304
|
}) }), _jsx(Field.ErrorText, { children: form.formState.errors.name?.message })] }), _jsx(Field.Root, { disabled: !!signInMutation.data, invalid: !!form.formState.errors.password, className: "mt-xl", children: _jsxs(PasswordInput.Root, { children: [_jsx(PasswordInput.Label, { children: "Password" }), _jsxs("div", { children: [_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 })] }), _jsx("div", { className: "mt-2 flex justify-end", children: _jsx("button", { type: "button", tabIndex: -1, className: "font-semibold text-button-tertiary-fg text-sm", onClick: () => {
|
|
305
305
|
globalStore.forgotPassword.setOpen(true);
|
|
306
306
|
dialog.setOpen(false);
|
|
307
|
-
}, children: "Forgot Password" }) })] }) }), signInMutation.data &&
|
|
307
|
+
}, children: "Forgot Password" }) })] }) }), signInMutation.data &&
|
|
308
|
+
signInProps.shouldPromptSecurityQuestion !== false && (_jsxs(Field.Root, { invalid: !!form.formState.errors.secretAnswer, className: "mt-xl", children: [_jsx(Field.Label, { children: secretQuestion }), _jsx(Field.Input, { placeholder: "Answer the security question", ...form.register('secretAnswer') }), _jsx(Field.ErrorText, { children: form.formState.errors.secretAnswer?.message })] })), _jsx(Button, { type: "submit", className: "mt-3xl", disabled: signInMutation.isPending || authenticateMutation.isPending, children: "Log In" }), _jsx(Controller, { control: form.control, name: "termsAccepted", render: (o) => (_jsxs(Field.Root, { invalid: o.fieldState.invalid, className: "mt-xl", children: [_jsxs(Checkbox.Root, { variant: "outline", colorScheme: "neutral", checked: o.field.value, onCheckedChange: (details) => {
|
|
308
309
|
if (details.checked === 'indeterminate')
|
|
309
310
|
return;
|
|
310
311
|
o.field.onChange(details.checked);
|
|
@@ -24,6 +24,11 @@ export interface SignInProps extends UseSignInProps {
|
|
|
24
24
|
children?: ReactNode;
|
|
25
25
|
shouldShowResponsibleGamingReminder?: boolean;
|
|
26
26
|
shouldShowDisclaimer?: boolean;
|
|
27
|
+
/**
|
|
28
|
+
* When `false`, the security question is not prompted during
|
|
29
|
+
* sign in. Defaults to `true`.
|
|
30
|
+
*/
|
|
31
|
+
shouldPromptSecurityQuestion?: boolean;
|
|
27
32
|
variant?: 'crazywin' | 'happybingo';
|
|
28
33
|
authApiBaseUrl?: string;
|
|
29
34
|
/**
|
|
@@ -12,7 +12,6 @@ import { twMerge } from 'tailwind-merge';
|
|
|
12
12
|
import { z } from 'zod';
|
|
13
13
|
import { useShallow } from 'zustand/shallow';
|
|
14
14
|
import { useCooldown } from '../../../client/hooks/useCooldown.js';
|
|
15
|
-
import { useFeatureFlag } from '../../../client/hooks/useFeatureFlag.js';
|
|
16
15
|
import { useGlobalStore } from '../../../client/hooks/useGlobalStore.js';
|
|
17
16
|
import { useInplaySignUpMutation } from '../../../client/hooks/useInplaySignUpMutation.js';
|
|
18
17
|
import { useLocaleInfo } from '../../../client/hooks/useLocaleInfo.js';
|
|
@@ -72,7 +71,6 @@ export function SignUpDefaultForm() {
|
|
|
72
71
|
versionSession: signUpProps.versionSession,
|
|
73
72
|
});
|
|
74
73
|
const sendVerificationCodeMutation = useSendVerificationCodeMutation();
|
|
75
|
-
const featureFlag = useFeatureFlag();
|
|
76
74
|
const localeInfo = useLocaleInfo();
|
|
77
75
|
const mobileNumberParser = useMobileNumberParser();
|
|
78
76
|
const [branchTipOpen, setBranchTipOpen] = useState(false);
|
|
@@ -344,8 +342,7 @@ export function SignUpDefaultForm() {
|
|
|
344
342
|
referralCode: search.get('referralCode') ?? undefined,
|
|
345
343
|
agentCode,
|
|
346
344
|
};
|
|
347
|
-
if (signUpProps.versionSession === 'Inplay'
|
|
348
|
-
featureFlag.enabled) {
|
|
345
|
+
if (signUpProps.versionSession === 'Inplay') {
|
|
349
346
|
await inplaySignUpMutation.mutateAsync({
|
|
350
347
|
...signUpInput,
|
|
351
348
|
...(step1Form.getValues('firstName') && {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@opexa/portal-components",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.84",
|
|
4
4
|
"exports": {
|
|
5
5
|
"./ui/*": {
|
|
6
6
|
"types": "./dist/ui/*/index.d.ts",
|
|
@@ -165,6 +165,9 @@
|
|
|
165
165
|
"publish": false
|
|
166
166
|
},
|
|
167
167
|
"hooks": {
|
|
168
|
+
"before:init": [
|
|
169
|
+
"npm whoami"
|
|
170
|
+
],
|
|
168
171
|
"after:bump": [
|
|
169
172
|
"pnpm build"
|
|
170
173
|
],
|