@opexa/portal-components 0.0.972 → 0.0.973

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 (53) hide show
  1. package/dist/client/hooks/useCamera.js +9 -1
  2. package/dist/schemas/forgotPasswordSchema.d.ts +5 -5
  3. package/dist/ui/AlertDialog/AlertDialog.d.ts +187 -187
  4. package/dist/ui/AlertDialog/alertDialog.recipe.d.ts +17 -17
  5. package/dist/ui/Badge/Badge.d.ts +12 -12
  6. package/dist/ui/Badge/badge.anatomy.d.ts +1 -1
  7. package/dist/ui/Badge/badge.recipe.d.ts +3 -3
  8. package/dist/ui/Carousel/Carousel.d.ts +99 -99
  9. package/dist/ui/Carousel/carousel.recipe.d.ts +11 -11
  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/Collapsible/Collapsible.d.ts +20 -20
  15. package/dist/ui/Collapsible/collapsible.recipe.d.ts +5 -5
  16. package/dist/ui/Combobox/Combobox.d.ts +42 -42
  17. package/dist/ui/Combobox/combobox.recipe.d.ts +3 -3
  18. package/dist/ui/DatePicker/DatePicker.d.ts +72 -72
  19. package/dist/ui/DatePicker/datePicker.recipe.d.ts +3 -3
  20. package/dist/ui/Dialog/Dialog.d.ts +33 -33
  21. package/dist/ui/Dialog/dialog.recipe.d.ts +3 -3
  22. package/dist/ui/Drawer/Drawer.d.ts +33 -33
  23. package/dist/ui/Drawer/drawer.recipe.d.ts +3 -3
  24. package/dist/ui/Menu/Menu.d.ts +360 -360
  25. package/dist/ui/Menu/menu.recipe.d.ts +20 -20
  26. package/dist/ui/Popover/Popover.d.ts +154 -154
  27. package/dist/ui/Popover/popover.recipe.d.ts +14 -14
  28. package/dist/ui/Progress/Progress.d.ts +27 -27
  29. package/dist/ui/Progress/progress.recipe.d.ts +3 -3
  30. package/dist/ui/SegmentGroup/SegmentGroup.d.ts +18 -18
  31. package/dist/ui/SegmentGroup/segmentGroup.recipe.d.ts +3 -3
  32. package/dist/ui/Select/Select.d.ts +45 -45
  33. package/dist/ui/Select/select.recipe.d.ts +3 -3
  34. package/dist/ui/Table/Table.d.ts +21 -21
  35. package/dist/ui/Table/table.anatomy.d.ts +1 -1
  36. package/dist/ui/Table/table.recipe.d.ts +3 -3
  37. package/dist/ui/Tabs/Tabs.d.ts +15 -15
  38. package/dist/ui/Tabs/tabs.recipe.d.ts +3 -3
  39. package/dist/ui/Tooltip/Tooltip.d.ts +30 -30
  40. package/dist/ui/Tooltip/tooltip.recipe.d.ts +5 -5
  41. package/package.json +1 -1
  42. package/dist/client/hooks/useVerifyMobileNumber.d.ts +0 -3
  43. package/dist/client/hooks/useVerifyMobileNumber.js +0 -20
  44. package/dist/components/DepositWithdrawal/Deposit/AurixPayPayMayaDeposit/AurixPayGrabPayDeposit.d.ts +0 -1
  45. package/dist/components/DepositWithdrawal/Deposit/AurixPayPayMayaDeposit/AurixPayGrabPayDeposit.js +0 -241
  46. package/dist/components/SingleSignOn/SingleSignOn.d.ts +0 -4
  47. package/dist/components/SingleSignOn/SingleSignOn.js +0 -185
  48. package/dist/components/SingleSignOn/index.d.ts +0 -1
  49. package/dist/components/SingleSignOn/index.js +0 -1
  50. package/dist/lib/components/UpdateMobilePhoneNumber/UpdateMobilePhoneNumber.d.ts +0 -1
  51. package/dist/lib/components/UpdateMobilePhoneNumber/UpdateMobilePhoneNumber.js +0 -152
  52. package/dist/lib/components/UpdateMobilePhoneNumber/index.d.ts +0 -1
  53. package/dist/lib/components/UpdateMobilePhoneNumber/index.js +0 -1
@@ -131,10 +131,15 @@ export function useCamera(options = {}) {
131
131
  const video = videoRef.current;
132
132
  if (!video || video.readyState < 2)
133
133
  return null;
134
+ // Reset error state and set snapping state before attempting to snap
135
+ setError(null);
136
+ setSnapping(true);
134
137
  const canvas = document.createElement('canvas');
135
138
  const context = canvas.getContext('2d', { willReadFrequently: true });
136
- if (!context)
139
+ if (!context) {
140
+ setSnapping(false);
137
141
  return null;
142
+ }
138
143
  canvas.width = video.videoWidth;
139
144
  canvas.height = video.videoHeight;
140
145
  context.drawImage(video, 0, 0, canvas.width, canvas.height);
@@ -142,6 +147,9 @@ export function useCamera(options = {}) {
142
147
  canvas.toBlob((blob) => {
143
148
  if (!blob) {
144
149
  resolve(null);
150
+ setData(null);
151
+ setSnapping(false);
152
+ setLoading(false);
145
153
  return setError({
146
154
  name: 'CameraError',
147
155
  message: 'Failed to snap photo',
@@ -8,25 +8,25 @@ 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
- password: string;
12
- confirmPassword: string;
13
11
  mobileNumber: string;
14
12
  verificationCode: string;
15
- }, {
16
13
  password: string;
17
14
  confirmPassword: string;
15
+ }, {
18
16
  mobileNumber: string;
19
17
  verificationCode: string;
20
- }>, {
21
18
  password: string;
22
19
  confirmPassword: string;
20
+ }>, {
23
21
  mobileNumber: string;
24
22
  verificationCode: string;
25
- }, {
26
23
  password: string;
27
24
  confirmPassword: string;
25
+ }, {
28
26
  mobileNumber: string;
29
27
  verificationCode: string;
28
+ password: string;
29
+ confirmPassword: string;
30
30
  }>;
31
31
  export type ForgotPasswordSchema = z.infer<ReturnType<typeof createForgotPasswordSchema>>;
32
32
  export {};