@sikka/hawa 0.49.8-next → 0.49.9-next

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.
@@ -303,6 +303,7 @@ type TConfirmation = {
303
303
  onConfirm?: any;
304
304
  onResend?: any;
305
305
  onCancel?: any;
306
+ cardless?: boolean;
306
307
  codeLength?: number;
307
308
  };
308
309
  declare const CodeConfirmation: FC<TConfirmation>;
@@ -303,6 +303,7 @@ type TConfirmation = {
303
303
  onConfirm?: any;
304
304
  onResend?: any;
305
305
  onCancel?: any;
306
+ cardless?: boolean;
306
307
  codeLength?: number;
307
308
  };
308
309
  declare const CodeConfirmation: FC<TConfirmation>;
@@ -5212,63 +5212,71 @@ var CodeConfirmation = ({ codeLength = 6, ...props }) => {
5212
5212
  }
5213
5213
  };
5214
5214
  }, []);
5215
- return /* @__PURE__ */ import_react44.default.createElement(Card, null, /* @__PURE__ */ import_react44.default.createElement(CardContent, { headless: true }, props.showError && /* @__PURE__ */ import_react44.default.createElement(Alert, { title: props.errorTitle, text: props.errorText, severity: "error" }), /* @__PURE__ */ import_react44.default.createElement("div", { className: "hawa-mb-4 dark:hawa-text-white" }, /* @__PURE__ */ import_react44.default.createElement("div", { className: "hawa-text-lg hawa-font-bold" }, ((_c = props.texts) == null ? void 0 : _c.checkYourIdentifier) || "Please check your phone"), /* @__PURE__ */ import_react44.default.createElement("div", { className: "hawa-text-muted-foreground hawa-flex hawa-flex-row" }, /* @__PURE__ */ import_react44.default.createElement("span", null, `${(_d = props.texts) == null ? void 0 : _d.weSentCode} ` || `We've sent a code to `, /* @__PURE__ */ import_react44.default.createElement("span", { dir: "ltr" }, props.identifier)))), /* @__PURE__ */ import_react44.default.createElement(
5216
- "form",
5215
+ return /* @__PURE__ */ import_react44.default.createElement(
5216
+ Card,
5217
5217
  {
5218
- noValidate: true,
5219
- onSubmit: handleSubmit((e) => {
5220
- if (props.onConfirm) {
5221
- return props.onConfirm(e);
5222
- } else {
5223
- console.log("Form is submitted but onConfirm prop is missing");
5224
- }
5225
- })
5218
+ className: cn(
5219
+ props.cardless && "hawa-border-none hawa-bg-transparent !hawa-shadow-none !hawa-drop-shadow-none"
5220
+ )
5226
5221
  },
5227
- /* @__PURE__ */ import_react44.default.createElement(
5228
- import_react_hook_form5.Controller,
5229
- {
5230
- control,
5231
- name: "otp_code",
5232
- render: ({ field }) => {
5233
- var _a2;
5234
- return /* @__PURE__ */ import_react44.default.createElement(
5235
- PinInput,
5236
- {
5237
- maxLength: codeLength,
5238
- helperText: (_a2 = formState.errors.otp_code) == null ? void 0 : _a2.message,
5239
- ...field
5240
- }
5241
- );
5242
- }
5243
- }
5244
- ),
5245
- showResendTimer ? /* @__PURE__ */ import_react44.default.createElement("div", { className: "hawa-py-2 hawa-text-center hawa-text-xs hawa-text-muted-foreground" }, (_e = props.texts) == null ? void 0 : _e.resendCodeTimer, " ", /* @__PURE__ */ import_react44.default.createElement("strong", null, remainingTime), " ", (_f = props.texts) == null ? void 0 : _f.seconds) : /* @__PURE__ */ import_react44.default.createElement("div", { className: "hawa-py-2 hawa-text-center hawa-text-xs hawa-text-muted-foreground" }, /* @__PURE__ */ import_react44.default.createElement("span", null, (_h = (_g = props.texts) == null ? void 0 : _g.didntGetCode) != null ? _h : "Didn't get the code?"), " ", /* @__PURE__ */ import_react44.default.createElement(
5246
- "span",
5247
- {
5248
- className: "clickable-link",
5249
- onClick: () => {
5250
- startResendTimer();
5251
- props.onResend();
5252
- }
5253
- },
5254
- ((_i = props.texts) == null ? void 0 : _i.resendCode) || "Click to resend"
5255
- )),
5256
- /* @__PURE__ */ import_react44.default.createElement("div", { className: "hawa-mt-4 hawa-grid hawa-grid-cols-2 hawa-gap-2" }, /* @__PURE__ */ import_react44.default.createElement(
5257
- Button,
5222
+ /* @__PURE__ */ import_react44.default.createElement(CardContent, { headless: true, noPadding: props.cardless }, props.showError && /* @__PURE__ */ import_react44.default.createElement(Alert, { title: props.errorTitle, text: props.errorText, severity: "error" }), /* @__PURE__ */ import_react44.default.createElement("div", { className: "hawa-mb-4 dark:hawa-text-white" }, /* @__PURE__ */ import_react44.default.createElement("div", { className: "hawa-text-lg hawa-font-bold" }, ((_c = props.texts) == null ? void 0 : _c.checkYourIdentifier) || "Please check your phone"), /* @__PURE__ */ import_react44.default.createElement("div", { className: "hawa-text-muted-foreground hawa-flex hawa-flex-row" }, /* @__PURE__ */ import_react44.default.createElement("span", null, `${(_d = props.texts) == null ? void 0 : _d.weSentCode} ` || `We've sent a code to `, /* @__PURE__ */ import_react44.default.createElement("span", { dir: "ltr" }, props.identifier)))), /* @__PURE__ */ import_react44.default.createElement(
5223
+ "form",
5258
5224
  {
5259
- type: "button",
5260
- onClick: () => {
5261
- if (props.onCancel) {
5262
- return props.onCancel();
5225
+ noValidate: true,
5226
+ onSubmit: handleSubmit((e) => {
5227
+ if (props.onConfirm) {
5228
+ return props.onConfirm(e);
5263
5229
  } else {
5264
- console.log("Cancel button clicked but onCancel prop is missing");
5230
+ console.log("Form is submitted but onConfirm prop is missing");
5265
5231
  }
5266
- },
5267
- variant: "outline"
5232
+ })
5268
5233
  },
5269
- ((_j = props.texts) == null ? void 0 : _j.cancel) || "Cancel"
5270
- ), /* @__PURE__ */ import_react44.default.createElement(Button, { isLoading: props.confirmLoading }, ((_k = props.texts) == null ? void 0 : _k.confirm) || "Confirm"))
5271
- )));
5234
+ /* @__PURE__ */ import_react44.default.createElement(
5235
+ import_react_hook_form5.Controller,
5236
+ {
5237
+ control,
5238
+ name: "otp_code",
5239
+ render: ({ field }) => {
5240
+ var _a2;
5241
+ return /* @__PURE__ */ import_react44.default.createElement(
5242
+ PinInput,
5243
+ {
5244
+ maxLength: codeLength,
5245
+ helperText: (_a2 = formState.errors.otp_code) == null ? void 0 : _a2.message,
5246
+ ...field
5247
+ }
5248
+ );
5249
+ }
5250
+ }
5251
+ ),
5252
+ showResendTimer ? /* @__PURE__ */ import_react44.default.createElement("div", { className: "hawa-py-2 hawa-text-center hawa-text-xs hawa-text-muted-foreground" }, (_e = props.texts) == null ? void 0 : _e.resendCodeTimer, " ", /* @__PURE__ */ import_react44.default.createElement("strong", null, remainingTime), " ", (_f = props.texts) == null ? void 0 : _f.seconds) : /* @__PURE__ */ import_react44.default.createElement("div", { className: "hawa-py-2 hawa-text-center hawa-text-xs hawa-text-muted-foreground" }, /* @__PURE__ */ import_react44.default.createElement("span", null, (_h = (_g = props.texts) == null ? void 0 : _g.didntGetCode) != null ? _h : "Didn't get the code?"), " ", /* @__PURE__ */ import_react44.default.createElement(
5253
+ "span",
5254
+ {
5255
+ className: "clickable-link",
5256
+ onClick: () => {
5257
+ startResendTimer();
5258
+ props.onResend();
5259
+ }
5260
+ },
5261
+ ((_i = props.texts) == null ? void 0 : _i.resendCode) || "Click to resend"
5262
+ )),
5263
+ /* @__PURE__ */ import_react44.default.createElement("div", { className: "hawa-mt-4 hawa-grid hawa-grid-cols-2 hawa-gap-2" }, /* @__PURE__ */ import_react44.default.createElement(
5264
+ Button,
5265
+ {
5266
+ type: "button",
5267
+ onClick: () => {
5268
+ if (props.onCancel) {
5269
+ return props.onCancel();
5270
+ } else {
5271
+ console.log("Cancel button clicked but onCancel prop is missing");
5272
+ }
5273
+ },
5274
+ variant: "outline"
5275
+ },
5276
+ ((_j = props.texts) == null ? void 0 : _j.cancel) || "Cancel"
5277
+ ), /* @__PURE__ */ import_react44.default.createElement(Button, { isLoading: props.confirmLoading }, ((_k = props.texts) == null ? void 0 : _k.confirm) || "Confirm"))
5278
+ ))
5279
+ );
5272
5280
  };
5273
5281
  // Annotate the CommonJS export names for ESM import in node:
5274
5282
  0 && (module.exports = {
@@ -3839,63 +3839,71 @@ var CodeConfirmation = ({ codeLength = 6, ...props }) => {
3839
3839
  }
3840
3840
  };
3841
3841
  }, []);
3842
- return /* @__PURE__ */ React13.createElement(Card, null, /* @__PURE__ */ React13.createElement(CardContent, { headless: true }, props.showError && /* @__PURE__ */ React13.createElement(Alert, { title: props.errorTitle, text: props.errorText, severity: "error" }), /* @__PURE__ */ React13.createElement("div", { className: "hawa-mb-4 dark:hawa-text-white" }, /* @__PURE__ */ React13.createElement("div", { className: "hawa-text-lg hawa-font-bold" }, ((_c = props.texts) == null ? void 0 : _c.checkYourIdentifier) || "Please check your phone"), /* @__PURE__ */ React13.createElement("div", { className: "hawa-text-muted-foreground hawa-flex hawa-flex-row" }, /* @__PURE__ */ React13.createElement("span", null, `${(_d = props.texts) == null ? void 0 : _d.weSentCode} ` || `We've sent a code to `, /* @__PURE__ */ React13.createElement("span", { dir: "ltr" }, props.identifier)))), /* @__PURE__ */ React13.createElement(
3843
- "form",
3842
+ return /* @__PURE__ */ React13.createElement(
3843
+ Card,
3844
3844
  {
3845
- noValidate: true,
3846
- onSubmit: handleSubmit((e) => {
3847
- if (props.onConfirm) {
3848
- return props.onConfirm(e);
3849
- } else {
3850
- console.log("Form is submitted but onConfirm prop is missing");
3851
- }
3852
- })
3845
+ className: cn(
3846
+ props.cardless && "hawa-border-none hawa-bg-transparent !hawa-shadow-none !hawa-drop-shadow-none"
3847
+ )
3853
3848
  },
3854
- /* @__PURE__ */ React13.createElement(
3855
- Controller5,
3856
- {
3857
- control,
3858
- name: "otp_code",
3859
- render: ({ field }) => {
3860
- var _a2;
3861
- return /* @__PURE__ */ React13.createElement(
3862
- PinInput,
3863
- {
3864
- maxLength: codeLength,
3865
- helperText: (_a2 = formState.errors.otp_code) == null ? void 0 : _a2.message,
3866
- ...field
3867
- }
3868
- );
3869
- }
3870
- }
3871
- ),
3872
- showResendTimer ? /* @__PURE__ */ React13.createElement("div", { className: "hawa-py-2 hawa-text-center hawa-text-xs hawa-text-muted-foreground" }, (_e = props.texts) == null ? void 0 : _e.resendCodeTimer, " ", /* @__PURE__ */ React13.createElement("strong", null, remainingTime), " ", (_f = props.texts) == null ? void 0 : _f.seconds) : /* @__PURE__ */ React13.createElement("div", { className: "hawa-py-2 hawa-text-center hawa-text-xs hawa-text-muted-foreground" }, /* @__PURE__ */ React13.createElement("span", null, (_h = (_g = props.texts) == null ? void 0 : _g.didntGetCode) != null ? _h : "Didn't get the code?"), " ", /* @__PURE__ */ React13.createElement(
3873
- "span",
3874
- {
3875
- className: "clickable-link",
3876
- onClick: () => {
3877
- startResendTimer();
3878
- props.onResend();
3879
- }
3880
- },
3881
- ((_i = props.texts) == null ? void 0 : _i.resendCode) || "Click to resend"
3882
- )),
3883
- /* @__PURE__ */ React13.createElement("div", { className: "hawa-mt-4 hawa-grid hawa-grid-cols-2 hawa-gap-2" }, /* @__PURE__ */ React13.createElement(
3884
- Button,
3849
+ /* @__PURE__ */ React13.createElement(CardContent, { headless: true, noPadding: props.cardless }, props.showError && /* @__PURE__ */ React13.createElement(Alert, { title: props.errorTitle, text: props.errorText, severity: "error" }), /* @__PURE__ */ React13.createElement("div", { className: "hawa-mb-4 dark:hawa-text-white" }, /* @__PURE__ */ React13.createElement("div", { className: "hawa-text-lg hawa-font-bold" }, ((_c = props.texts) == null ? void 0 : _c.checkYourIdentifier) || "Please check your phone"), /* @__PURE__ */ React13.createElement("div", { className: "hawa-text-muted-foreground hawa-flex hawa-flex-row" }, /* @__PURE__ */ React13.createElement("span", null, `${(_d = props.texts) == null ? void 0 : _d.weSentCode} ` || `We've sent a code to `, /* @__PURE__ */ React13.createElement("span", { dir: "ltr" }, props.identifier)))), /* @__PURE__ */ React13.createElement(
3850
+ "form",
3885
3851
  {
3886
- type: "button",
3887
- onClick: () => {
3888
- if (props.onCancel) {
3889
- return props.onCancel();
3852
+ noValidate: true,
3853
+ onSubmit: handleSubmit((e) => {
3854
+ if (props.onConfirm) {
3855
+ return props.onConfirm(e);
3890
3856
  } else {
3891
- console.log("Cancel button clicked but onCancel prop is missing");
3857
+ console.log("Form is submitted but onConfirm prop is missing");
3892
3858
  }
3893
- },
3894
- variant: "outline"
3859
+ })
3895
3860
  },
3896
- ((_j = props.texts) == null ? void 0 : _j.cancel) || "Cancel"
3897
- ), /* @__PURE__ */ React13.createElement(Button, { isLoading: props.confirmLoading }, ((_k = props.texts) == null ? void 0 : _k.confirm) || "Confirm"))
3898
- )));
3861
+ /* @__PURE__ */ React13.createElement(
3862
+ Controller5,
3863
+ {
3864
+ control,
3865
+ name: "otp_code",
3866
+ render: ({ field }) => {
3867
+ var _a2;
3868
+ return /* @__PURE__ */ React13.createElement(
3869
+ PinInput,
3870
+ {
3871
+ maxLength: codeLength,
3872
+ helperText: (_a2 = formState.errors.otp_code) == null ? void 0 : _a2.message,
3873
+ ...field
3874
+ }
3875
+ );
3876
+ }
3877
+ }
3878
+ ),
3879
+ showResendTimer ? /* @__PURE__ */ React13.createElement("div", { className: "hawa-py-2 hawa-text-center hawa-text-xs hawa-text-muted-foreground" }, (_e = props.texts) == null ? void 0 : _e.resendCodeTimer, " ", /* @__PURE__ */ React13.createElement("strong", null, remainingTime), " ", (_f = props.texts) == null ? void 0 : _f.seconds) : /* @__PURE__ */ React13.createElement("div", { className: "hawa-py-2 hawa-text-center hawa-text-xs hawa-text-muted-foreground" }, /* @__PURE__ */ React13.createElement("span", null, (_h = (_g = props.texts) == null ? void 0 : _g.didntGetCode) != null ? _h : "Didn't get the code?"), " ", /* @__PURE__ */ React13.createElement(
3880
+ "span",
3881
+ {
3882
+ className: "clickable-link",
3883
+ onClick: () => {
3884
+ startResendTimer();
3885
+ props.onResend();
3886
+ }
3887
+ },
3888
+ ((_i = props.texts) == null ? void 0 : _i.resendCode) || "Click to resend"
3889
+ )),
3890
+ /* @__PURE__ */ React13.createElement("div", { className: "hawa-mt-4 hawa-grid hawa-grid-cols-2 hawa-gap-2" }, /* @__PURE__ */ React13.createElement(
3891
+ Button,
3892
+ {
3893
+ type: "button",
3894
+ onClick: () => {
3895
+ if (props.onCancel) {
3896
+ return props.onCancel();
3897
+ } else {
3898
+ console.log("Cancel button clicked but onCancel prop is missing");
3899
+ }
3900
+ },
3901
+ variant: "outline"
3902
+ },
3903
+ ((_j = props.texts) == null ? void 0 : _j.cancel) || "Cancel"
3904
+ ), /* @__PURE__ */ React13.createElement(Button, { isLoading: props.confirmLoading }, ((_k = props.texts) == null ? void 0 : _k.confirm) || "Confirm"))
3905
+ ))
3906
+ );
3899
3907
  };
3900
3908
  export {
3901
3909
  AppLanding,
@@ -280,6 +280,7 @@ type TConfirmation = {
280
280
  onConfirm?: any;
281
281
  onResend?: any;
282
282
  onCancel?: any;
283
+ cardless?: boolean;
283
284
  codeLength?: number;
284
285
  };
285
286
  declare const CodeConfirmation: FC<TConfirmation>;
@@ -280,6 +280,7 @@ type TConfirmation = {
280
280
  onConfirm?: any;
281
281
  onResend?: any;
282
282
  onCancel?: any;
283
+ cardless?: boolean;
283
284
  codeLength?: number;
284
285
  };
285
286
  declare const CodeConfirmation: FC<TConfirmation>;
@@ -5387,63 +5387,71 @@ var CodeConfirmation = ({ codeLength = 6, ...props }) => {
5387
5387
  }
5388
5388
  };
5389
5389
  }, []);
5390
- return /* @__PURE__ */ import_react44.default.createElement(Card, null, /* @__PURE__ */ import_react44.default.createElement(CardContent, { headless: true }, props.showError && /* @__PURE__ */ import_react44.default.createElement(Alert, { title: props.errorTitle, text: props.errorText, severity: "error" }), /* @__PURE__ */ import_react44.default.createElement("div", { className: "hawa-mb-4 dark:hawa-text-white" }, /* @__PURE__ */ import_react44.default.createElement("div", { className: "hawa-text-lg hawa-font-bold" }, ((_c = props.texts) == null ? void 0 : _c.checkYourIdentifier) || "Please check your phone"), /* @__PURE__ */ import_react44.default.createElement("div", { className: "hawa-text-muted-foreground hawa-flex hawa-flex-row" }, /* @__PURE__ */ import_react44.default.createElement("span", null, `${(_d = props.texts) == null ? void 0 : _d.weSentCode} ` || `We've sent a code to `, /* @__PURE__ */ import_react44.default.createElement("span", { dir: "ltr" }, props.identifier)))), /* @__PURE__ */ import_react44.default.createElement(
5391
- "form",
5390
+ return /* @__PURE__ */ import_react44.default.createElement(
5391
+ Card,
5392
5392
  {
5393
- noValidate: true,
5394
- onSubmit: handleSubmit((e) => {
5395
- if (props.onConfirm) {
5396
- return props.onConfirm(e);
5397
- } else {
5398
- console.log("Form is submitted but onConfirm prop is missing");
5399
- }
5400
- })
5393
+ className: cn(
5394
+ props.cardless && "hawa-border-none hawa-bg-transparent !hawa-shadow-none !hawa-drop-shadow-none"
5395
+ )
5401
5396
  },
5402
- /* @__PURE__ */ import_react44.default.createElement(
5403
- import_react_hook_form5.Controller,
5404
- {
5405
- control,
5406
- name: "otp_code",
5407
- render: ({ field }) => {
5408
- var _a2;
5409
- return /* @__PURE__ */ import_react44.default.createElement(
5410
- PinInput,
5411
- {
5412
- maxLength: codeLength,
5413
- helperText: (_a2 = formState.errors.otp_code) == null ? void 0 : _a2.message,
5414
- ...field
5415
- }
5416
- );
5417
- }
5418
- }
5419
- ),
5420
- showResendTimer ? /* @__PURE__ */ import_react44.default.createElement("div", { className: "hawa-py-2 hawa-text-center hawa-text-xs hawa-text-muted-foreground" }, (_e = props.texts) == null ? void 0 : _e.resendCodeTimer, " ", /* @__PURE__ */ import_react44.default.createElement("strong", null, remainingTime), " ", (_f = props.texts) == null ? void 0 : _f.seconds) : /* @__PURE__ */ import_react44.default.createElement("div", { className: "hawa-py-2 hawa-text-center hawa-text-xs hawa-text-muted-foreground" }, /* @__PURE__ */ import_react44.default.createElement("span", null, (_h = (_g = props.texts) == null ? void 0 : _g.didntGetCode) != null ? _h : "Didn't get the code?"), " ", /* @__PURE__ */ import_react44.default.createElement(
5421
- "span",
5422
- {
5423
- className: "clickable-link",
5424
- onClick: () => {
5425
- startResendTimer();
5426
- props.onResend();
5427
- }
5428
- },
5429
- ((_i = props.texts) == null ? void 0 : _i.resendCode) || "Click to resend"
5430
- )),
5431
- /* @__PURE__ */ import_react44.default.createElement("div", { className: "hawa-mt-4 hawa-grid hawa-grid-cols-2 hawa-gap-2" }, /* @__PURE__ */ import_react44.default.createElement(
5432
- Button,
5397
+ /* @__PURE__ */ import_react44.default.createElement(CardContent, { headless: true, noPadding: props.cardless }, props.showError && /* @__PURE__ */ import_react44.default.createElement(Alert, { title: props.errorTitle, text: props.errorText, severity: "error" }), /* @__PURE__ */ import_react44.default.createElement("div", { className: "hawa-mb-4 dark:hawa-text-white" }, /* @__PURE__ */ import_react44.default.createElement("div", { className: "hawa-text-lg hawa-font-bold" }, ((_c = props.texts) == null ? void 0 : _c.checkYourIdentifier) || "Please check your phone"), /* @__PURE__ */ import_react44.default.createElement("div", { className: "hawa-text-muted-foreground hawa-flex hawa-flex-row" }, /* @__PURE__ */ import_react44.default.createElement("span", null, `${(_d = props.texts) == null ? void 0 : _d.weSentCode} ` || `We've sent a code to `, /* @__PURE__ */ import_react44.default.createElement("span", { dir: "ltr" }, props.identifier)))), /* @__PURE__ */ import_react44.default.createElement(
5398
+ "form",
5433
5399
  {
5434
- type: "button",
5435
- onClick: () => {
5436
- if (props.onCancel) {
5437
- return props.onCancel();
5400
+ noValidate: true,
5401
+ onSubmit: handleSubmit((e) => {
5402
+ if (props.onConfirm) {
5403
+ return props.onConfirm(e);
5438
5404
  } else {
5439
- console.log("Cancel button clicked but onCancel prop is missing");
5405
+ console.log("Form is submitted but onConfirm prop is missing");
5440
5406
  }
5441
- },
5442
- variant: "outline"
5407
+ })
5443
5408
  },
5444
- ((_j = props.texts) == null ? void 0 : _j.cancel) || "Cancel"
5445
- ), /* @__PURE__ */ import_react44.default.createElement(Button, { isLoading: props.confirmLoading }, ((_k = props.texts) == null ? void 0 : _k.confirm) || "Confirm"))
5446
- )));
5409
+ /* @__PURE__ */ import_react44.default.createElement(
5410
+ import_react_hook_form5.Controller,
5411
+ {
5412
+ control,
5413
+ name: "otp_code",
5414
+ render: ({ field }) => {
5415
+ var _a2;
5416
+ return /* @__PURE__ */ import_react44.default.createElement(
5417
+ PinInput,
5418
+ {
5419
+ maxLength: codeLength,
5420
+ helperText: (_a2 = formState.errors.otp_code) == null ? void 0 : _a2.message,
5421
+ ...field
5422
+ }
5423
+ );
5424
+ }
5425
+ }
5426
+ ),
5427
+ showResendTimer ? /* @__PURE__ */ import_react44.default.createElement("div", { className: "hawa-py-2 hawa-text-center hawa-text-xs hawa-text-muted-foreground" }, (_e = props.texts) == null ? void 0 : _e.resendCodeTimer, " ", /* @__PURE__ */ import_react44.default.createElement("strong", null, remainingTime), " ", (_f = props.texts) == null ? void 0 : _f.seconds) : /* @__PURE__ */ import_react44.default.createElement("div", { className: "hawa-py-2 hawa-text-center hawa-text-xs hawa-text-muted-foreground" }, /* @__PURE__ */ import_react44.default.createElement("span", null, (_h = (_g = props.texts) == null ? void 0 : _g.didntGetCode) != null ? _h : "Didn't get the code?"), " ", /* @__PURE__ */ import_react44.default.createElement(
5428
+ "span",
5429
+ {
5430
+ className: "clickable-link",
5431
+ onClick: () => {
5432
+ startResendTimer();
5433
+ props.onResend();
5434
+ }
5435
+ },
5436
+ ((_i = props.texts) == null ? void 0 : _i.resendCode) || "Click to resend"
5437
+ )),
5438
+ /* @__PURE__ */ import_react44.default.createElement("div", { className: "hawa-mt-4 hawa-grid hawa-grid-cols-2 hawa-gap-2" }, /* @__PURE__ */ import_react44.default.createElement(
5439
+ Button,
5440
+ {
5441
+ type: "button",
5442
+ onClick: () => {
5443
+ if (props.onCancel) {
5444
+ return props.onCancel();
5445
+ } else {
5446
+ console.log("Cancel button clicked but onCancel prop is missing");
5447
+ }
5448
+ },
5449
+ variant: "outline"
5450
+ },
5451
+ ((_j = props.texts) == null ? void 0 : _j.cancel) || "Cancel"
5452
+ ), /* @__PURE__ */ import_react44.default.createElement(Button, { isLoading: props.confirmLoading }, ((_k = props.texts) == null ? void 0 : _k.confirm) || "Confirm"))
5453
+ ))
5454
+ );
5447
5455
  };
5448
5456
 
5449
5457
  // blocks/feedback/UserReferralSource.tsx
@@ -1295,63 +1295,71 @@ var CodeConfirmation = ({ codeLength = 6, ...props }) => {
1295
1295
  }
1296
1296
  };
1297
1297
  }, []);
1298
- return /* @__PURE__ */ React8.createElement(Card, null, /* @__PURE__ */ React8.createElement(CardContent, { headless: true }, props.showError && /* @__PURE__ */ React8.createElement(Alert, { title: props.errorTitle, text: props.errorText, severity: "error" }), /* @__PURE__ */ React8.createElement("div", { className: "hawa-mb-4 dark:hawa-text-white" }, /* @__PURE__ */ React8.createElement("div", { className: "hawa-text-lg hawa-font-bold" }, ((_c = props.texts) == null ? void 0 : _c.checkYourIdentifier) || "Please check your phone"), /* @__PURE__ */ React8.createElement("div", { className: "hawa-text-muted-foreground hawa-flex hawa-flex-row" }, /* @__PURE__ */ React8.createElement("span", null, `${(_d = props.texts) == null ? void 0 : _d.weSentCode} ` || `We've sent a code to `, /* @__PURE__ */ React8.createElement("span", { dir: "ltr" }, props.identifier)))), /* @__PURE__ */ React8.createElement(
1299
- "form",
1298
+ return /* @__PURE__ */ React8.createElement(
1299
+ Card,
1300
1300
  {
1301
- noValidate: true,
1302
- onSubmit: handleSubmit((e) => {
1303
- if (props.onConfirm) {
1304
- return props.onConfirm(e);
1305
- } else {
1306
- console.log("Form is submitted but onConfirm prop is missing");
1307
- }
1308
- })
1301
+ className: cn(
1302
+ props.cardless && "hawa-border-none hawa-bg-transparent !hawa-shadow-none !hawa-drop-shadow-none"
1303
+ )
1309
1304
  },
1310
- /* @__PURE__ */ React8.createElement(
1311
- Controller5,
1312
- {
1313
- control,
1314
- name: "otp_code",
1315
- render: ({ field }) => {
1316
- var _a2;
1317
- return /* @__PURE__ */ React8.createElement(
1318
- PinInput,
1319
- {
1320
- maxLength: codeLength,
1321
- helperText: (_a2 = formState.errors.otp_code) == null ? void 0 : _a2.message,
1322
- ...field
1323
- }
1324
- );
1325
- }
1326
- }
1327
- ),
1328
- showResendTimer ? /* @__PURE__ */ React8.createElement("div", { className: "hawa-py-2 hawa-text-center hawa-text-xs hawa-text-muted-foreground" }, (_e = props.texts) == null ? void 0 : _e.resendCodeTimer, " ", /* @__PURE__ */ React8.createElement("strong", null, remainingTime), " ", (_f = props.texts) == null ? void 0 : _f.seconds) : /* @__PURE__ */ React8.createElement("div", { className: "hawa-py-2 hawa-text-center hawa-text-xs hawa-text-muted-foreground" }, /* @__PURE__ */ React8.createElement("span", null, (_h = (_g = props.texts) == null ? void 0 : _g.didntGetCode) != null ? _h : "Didn't get the code?"), " ", /* @__PURE__ */ React8.createElement(
1329
- "span",
1330
- {
1331
- className: "clickable-link",
1332
- onClick: () => {
1333
- startResendTimer();
1334
- props.onResend();
1335
- }
1336
- },
1337
- ((_i = props.texts) == null ? void 0 : _i.resendCode) || "Click to resend"
1338
- )),
1339
- /* @__PURE__ */ React8.createElement("div", { className: "hawa-mt-4 hawa-grid hawa-grid-cols-2 hawa-gap-2" }, /* @__PURE__ */ React8.createElement(
1340
- Button,
1305
+ /* @__PURE__ */ React8.createElement(CardContent, { headless: true, noPadding: props.cardless }, props.showError && /* @__PURE__ */ React8.createElement(Alert, { title: props.errorTitle, text: props.errorText, severity: "error" }), /* @__PURE__ */ React8.createElement("div", { className: "hawa-mb-4 dark:hawa-text-white" }, /* @__PURE__ */ React8.createElement("div", { className: "hawa-text-lg hawa-font-bold" }, ((_c = props.texts) == null ? void 0 : _c.checkYourIdentifier) || "Please check your phone"), /* @__PURE__ */ React8.createElement("div", { className: "hawa-text-muted-foreground hawa-flex hawa-flex-row" }, /* @__PURE__ */ React8.createElement("span", null, `${(_d = props.texts) == null ? void 0 : _d.weSentCode} ` || `We've sent a code to `, /* @__PURE__ */ React8.createElement("span", { dir: "ltr" }, props.identifier)))), /* @__PURE__ */ React8.createElement(
1306
+ "form",
1341
1307
  {
1342
- type: "button",
1343
- onClick: () => {
1344
- if (props.onCancel) {
1345
- return props.onCancel();
1308
+ noValidate: true,
1309
+ onSubmit: handleSubmit((e) => {
1310
+ if (props.onConfirm) {
1311
+ return props.onConfirm(e);
1346
1312
  } else {
1347
- console.log("Cancel button clicked but onCancel prop is missing");
1313
+ console.log("Form is submitted but onConfirm prop is missing");
1348
1314
  }
1349
- },
1350
- variant: "outline"
1315
+ })
1351
1316
  },
1352
- ((_j = props.texts) == null ? void 0 : _j.cancel) || "Cancel"
1353
- ), /* @__PURE__ */ React8.createElement(Button, { isLoading: props.confirmLoading }, ((_k = props.texts) == null ? void 0 : _k.confirm) || "Confirm"))
1354
- )));
1317
+ /* @__PURE__ */ React8.createElement(
1318
+ Controller5,
1319
+ {
1320
+ control,
1321
+ name: "otp_code",
1322
+ render: ({ field }) => {
1323
+ var _a2;
1324
+ return /* @__PURE__ */ React8.createElement(
1325
+ PinInput,
1326
+ {
1327
+ maxLength: codeLength,
1328
+ helperText: (_a2 = formState.errors.otp_code) == null ? void 0 : _a2.message,
1329
+ ...field
1330
+ }
1331
+ );
1332
+ }
1333
+ }
1334
+ ),
1335
+ showResendTimer ? /* @__PURE__ */ React8.createElement("div", { className: "hawa-py-2 hawa-text-center hawa-text-xs hawa-text-muted-foreground" }, (_e = props.texts) == null ? void 0 : _e.resendCodeTimer, " ", /* @__PURE__ */ React8.createElement("strong", null, remainingTime), " ", (_f = props.texts) == null ? void 0 : _f.seconds) : /* @__PURE__ */ React8.createElement("div", { className: "hawa-py-2 hawa-text-center hawa-text-xs hawa-text-muted-foreground" }, /* @__PURE__ */ React8.createElement("span", null, (_h = (_g = props.texts) == null ? void 0 : _g.didntGetCode) != null ? _h : "Didn't get the code?"), " ", /* @__PURE__ */ React8.createElement(
1336
+ "span",
1337
+ {
1338
+ className: "clickable-link",
1339
+ onClick: () => {
1340
+ startResendTimer();
1341
+ props.onResend();
1342
+ }
1343
+ },
1344
+ ((_i = props.texts) == null ? void 0 : _i.resendCode) || "Click to resend"
1345
+ )),
1346
+ /* @__PURE__ */ React8.createElement("div", { className: "hawa-mt-4 hawa-grid hawa-grid-cols-2 hawa-gap-2" }, /* @__PURE__ */ React8.createElement(
1347
+ Button,
1348
+ {
1349
+ type: "button",
1350
+ onClick: () => {
1351
+ if (props.onCancel) {
1352
+ return props.onCancel();
1353
+ } else {
1354
+ console.log("Cancel button clicked but onCancel prop is missing");
1355
+ }
1356
+ },
1357
+ variant: "outline"
1358
+ },
1359
+ ((_j = props.texts) == null ? void 0 : _j.cancel) || "Cancel"
1360
+ ), /* @__PURE__ */ React8.createElement(Button, { isLoading: props.confirmLoading }, ((_k = props.texts) == null ? void 0 : _k.confirm) || "Confirm"))
1361
+ ))
1362
+ );
1355
1363
  };
1356
1364
 
1357
1365
  // blocks/feedback/UserReferralSource.tsx
package/dist/index.d.mts CHANGED
@@ -1903,6 +1903,7 @@ type TConfirmation = {
1903
1903
  onConfirm?: any;
1904
1904
  onResend?: any;
1905
1905
  onCancel?: any;
1906
+ cardless?: boolean;
1906
1907
  codeLength?: number;
1907
1908
  };
1908
1909
  declare const CodeConfirmation: FC<TConfirmation>;
package/dist/index.d.ts CHANGED
@@ -1903,6 +1903,7 @@ type TConfirmation = {
1903
1903
  onConfirm?: any;
1904
1904
  onResend?: any;
1905
1905
  onCancel?: any;
1906
+ cardless?: boolean;
1906
1907
  codeLength?: number;
1907
1908
  };
1908
1909
  declare const CodeConfirmation: FC<TConfirmation>;
package/dist/index.js CHANGED
@@ -11319,63 +11319,71 @@ var CodeConfirmation = ({ codeLength = 6, ...props }) => {
11319
11319
  }
11320
11320
  };
11321
11321
  }, []);
11322
- return /* @__PURE__ */ import_react74.default.createElement(Card, null, /* @__PURE__ */ import_react74.default.createElement(CardContent, { headless: true }, props.showError && /* @__PURE__ */ import_react74.default.createElement(Alert, { title: props.errorTitle, text: props.errorText, severity: "error" }), /* @__PURE__ */ import_react74.default.createElement("div", { className: "hawa-mb-4 dark:hawa-text-white" }, /* @__PURE__ */ import_react74.default.createElement("div", { className: "hawa-text-lg hawa-font-bold" }, ((_c = props.texts) == null ? void 0 : _c.checkYourIdentifier) || "Please check your phone"), /* @__PURE__ */ import_react74.default.createElement("div", { className: "hawa-text-muted-foreground hawa-flex hawa-flex-row" }, /* @__PURE__ */ import_react74.default.createElement("span", null, `${(_d = props.texts) == null ? void 0 : _d.weSentCode} ` || `We've sent a code to `, /* @__PURE__ */ import_react74.default.createElement("span", { dir: "ltr" }, props.identifier)))), /* @__PURE__ */ import_react74.default.createElement(
11323
- "form",
11322
+ return /* @__PURE__ */ import_react74.default.createElement(
11323
+ Card,
11324
11324
  {
11325
- noValidate: true,
11326
- onSubmit: handleSubmit((e) => {
11327
- if (props.onConfirm) {
11328
- return props.onConfirm(e);
11329
- } else {
11330
- console.log("Form is submitted but onConfirm prop is missing");
11331
- }
11332
- })
11325
+ className: cn(
11326
+ props.cardless && "hawa-border-none hawa-bg-transparent !hawa-shadow-none !hawa-drop-shadow-none"
11327
+ )
11333
11328
  },
11334
- /* @__PURE__ */ import_react74.default.createElement(
11335
- import_react_hook_form5.Controller,
11336
- {
11337
- control,
11338
- name: "otp_code",
11339
- render: ({ field }) => {
11340
- var _a2;
11341
- return /* @__PURE__ */ import_react74.default.createElement(
11342
- PinInput,
11343
- {
11344
- maxLength: codeLength,
11345
- helperText: (_a2 = formState.errors.otp_code) == null ? void 0 : _a2.message,
11346
- ...field
11347
- }
11348
- );
11349
- }
11350
- }
11351
- ),
11352
- showResendTimer ? /* @__PURE__ */ import_react74.default.createElement("div", { className: "hawa-py-2 hawa-text-center hawa-text-xs hawa-text-muted-foreground" }, (_e = props.texts) == null ? void 0 : _e.resendCodeTimer, " ", /* @__PURE__ */ import_react74.default.createElement("strong", null, remainingTime), " ", (_f = props.texts) == null ? void 0 : _f.seconds) : /* @__PURE__ */ import_react74.default.createElement("div", { className: "hawa-py-2 hawa-text-center hawa-text-xs hawa-text-muted-foreground" }, /* @__PURE__ */ import_react74.default.createElement("span", null, (_h = (_g = props.texts) == null ? void 0 : _g.didntGetCode) != null ? _h : "Didn't get the code?"), " ", /* @__PURE__ */ import_react74.default.createElement(
11353
- "span",
11354
- {
11355
- className: "clickable-link",
11356
- onClick: () => {
11357
- startResendTimer();
11358
- props.onResend();
11359
- }
11360
- },
11361
- ((_i = props.texts) == null ? void 0 : _i.resendCode) || "Click to resend"
11362
- )),
11363
- /* @__PURE__ */ import_react74.default.createElement("div", { className: "hawa-mt-4 hawa-grid hawa-grid-cols-2 hawa-gap-2" }, /* @__PURE__ */ import_react74.default.createElement(
11364
- Button,
11329
+ /* @__PURE__ */ import_react74.default.createElement(CardContent, { headless: true, noPadding: props.cardless }, props.showError && /* @__PURE__ */ import_react74.default.createElement(Alert, { title: props.errorTitle, text: props.errorText, severity: "error" }), /* @__PURE__ */ import_react74.default.createElement("div", { className: "hawa-mb-4 dark:hawa-text-white" }, /* @__PURE__ */ import_react74.default.createElement("div", { className: "hawa-text-lg hawa-font-bold" }, ((_c = props.texts) == null ? void 0 : _c.checkYourIdentifier) || "Please check your phone"), /* @__PURE__ */ import_react74.default.createElement("div", { className: "hawa-text-muted-foreground hawa-flex hawa-flex-row" }, /* @__PURE__ */ import_react74.default.createElement("span", null, `${(_d = props.texts) == null ? void 0 : _d.weSentCode} ` || `We've sent a code to `, /* @__PURE__ */ import_react74.default.createElement("span", { dir: "ltr" }, props.identifier)))), /* @__PURE__ */ import_react74.default.createElement(
11330
+ "form",
11365
11331
  {
11366
- type: "button",
11367
- onClick: () => {
11368
- if (props.onCancel) {
11369
- return props.onCancel();
11332
+ noValidate: true,
11333
+ onSubmit: handleSubmit((e) => {
11334
+ if (props.onConfirm) {
11335
+ return props.onConfirm(e);
11370
11336
  } else {
11371
- console.log("Cancel button clicked but onCancel prop is missing");
11337
+ console.log("Form is submitted but onConfirm prop is missing");
11372
11338
  }
11373
- },
11374
- variant: "outline"
11339
+ })
11375
11340
  },
11376
- ((_j = props.texts) == null ? void 0 : _j.cancel) || "Cancel"
11377
- ), /* @__PURE__ */ import_react74.default.createElement(Button, { isLoading: props.confirmLoading }, ((_k = props.texts) == null ? void 0 : _k.confirm) || "Confirm"))
11378
- )));
11341
+ /* @__PURE__ */ import_react74.default.createElement(
11342
+ import_react_hook_form5.Controller,
11343
+ {
11344
+ control,
11345
+ name: "otp_code",
11346
+ render: ({ field }) => {
11347
+ var _a2;
11348
+ return /* @__PURE__ */ import_react74.default.createElement(
11349
+ PinInput,
11350
+ {
11351
+ maxLength: codeLength,
11352
+ helperText: (_a2 = formState.errors.otp_code) == null ? void 0 : _a2.message,
11353
+ ...field
11354
+ }
11355
+ );
11356
+ }
11357
+ }
11358
+ ),
11359
+ showResendTimer ? /* @__PURE__ */ import_react74.default.createElement("div", { className: "hawa-py-2 hawa-text-center hawa-text-xs hawa-text-muted-foreground" }, (_e = props.texts) == null ? void 0 : _e.resendCodeTimer, " ", /* @__PURE__ */ import_react74.default.createElement("strong", null, remainingTime), " ", (_f = props.texts) == null ? void 0 : _f.seconds) : /* @__PURE__ */ import_react74.default.createElement("div", { className: "hawa-py-2 hawa-text-center hawa-text-xs hawa-text-muted-foreground" }, /* @__PURE__ */ import_react74.default.createElement("span", null, (_h = (_g = props.texts) == null ? void 0 : _g.didntGetCode) != null ? _h : "Didn't get the code?"), " ", /* @__PURE__ */ import_react74.default.createElement(
11360
+ "span",
11361
+ {
11362
+ className: "clickable-link",
11363
+ onClick: () => {
11364
+ startResendTimer();
11365
+ props.onResend();
11366
+ }
11367
+ },
11368
+ ((_i = props.texts) == null ? void 0 : _i.resendCode) || "Click to resend"
11369
+ )),
11370
+ /* @__PURE__ */ import_react74.default.createElement("div", { className: "hawa-mt-4 hawa-grid hawa-grid-cols-2 hawa-gap-2" }, /* @__PURE__ */ import_react74.default.createElement(
11371
+ Button,
11372
+ {
11373
+ type: "button",
11374
+ onClick: () => {
11375
+ if (props.onCancel) {
11376
+ return props.onCancel();
11377
+ } else {
11378
+ console.log("Cancel button clicked but onCancel prop is missing");
11379
+ }
11380
+ },
11381
+ variant: "outline"
11382
+ },
11383
+ ((_j = props.texts) == null ? void 0 : _j.cancel) || "Cancel"
11384
+ ), /* @__PURE__ */ import_react74.default.createElement(Button, { isLoading: props.confirmLoading }, ((_k = props.texts) == null ? void 0 : _k.confirm) || "Confirm"))
11385
+ ))
11386
+ );
11379
11387
  };
11380
11388
 
11381
11389
  // blocks/feedback/UserReferralSource.tsx
package/dist/index.mjs CHANGED
@@ -11089,63 +11089,71 @@ var CodeConfirmation = ({ codeLength = 6, ...props }) => {
11089
11089
  }
11090
11090
  };
11091
11091
  }, []);
11092
- return /* @__PURE__ */ React88.createElement(Card, null, /* @__PURE__ */ React88.createElement(CardContent, { headless: true }, props.showError && /* @__PURE__ */ React88.createElement(Alert, { title: props.errorTitle, text: props.errorText, severity: "error" }), /* @__PURE__ */ React88.createElement("div", { className: "hawa-mb-4 dark:hawa-text-white" }, /* @__PURE__ */ React88.createElement("div", { className: "hawa-text-lg hawa-font-bold" }, ((_c = props.texts) == null ? void 0 : _c.checkYourIdentifier) || "Please check your phone"), /* @__PURE__ */ React88.createElement("div", { className: "hawa-text-muted-foreground hawa-flex hawa-flex-row" }, /* @__PURE__ */ React88.createElement("span", null, `${(_d = props.texts) == null ? void 0 : _d.weSentCode} ` || `We've sent a code to `, /* @__PURE__ */ React88.createElement("span", { dir: "ltr" }, props.identifier)))), /* @__PURE__ */ React88.createElement(
11093
- "form",
11092
+ return /* @__PURE__ */ React88.createElement(
11093
+ Card,
11094
11094
  {
11095
- noValidate: true,
11096
- onSubmit: handleSubmit((e) => {
11097
- if (props.onConfirm) {
11098
- return props.onConfirm(e);
11099
- } else {
11100
- console.log("Form is submitted but onConfirm prop is missing");
11101
- }
11102
- })
11095
+ className: cn(
11096
+ props.cardless && "hawa-border-none hawa-bg-transparent !hawa-shadow-none !hawa-drop-shadow-none"
11097
+ )
11103
11098
  },
11104
- /* @__PURE__ */ React88.createElement(
11105
- Controller5,
11106
- {
11107
- control,
11108
- name: "otp_code",
11109
- render: ({ field }) => {
11110
- var _a2;
11111
- return /* @__PURE__ */ React88.createElement(
11112
- PinInput,
11113
- {
11114
- maxLength: codeLength,
11115
- helperText: (_a2 = formState.errors.otp_code) == null ? void 0 : _a2.message,
11116
- ...field
11117
- }
11118
- );
11119
- }
11120
- }
11121
- ),
11122
- showResendTimer ? /* @__PURE__ */ React88.createElement("div", { className: "hawa-py-2 hawa-text-center hawa-text-xs hawa-text-muted-foreground" }, (_e = props.texts) == null ? void 0 : _e.resendCodeTimer, " ", /* @__PURE__ */ React88.createElement("strong", null, remainingTime), " ", (_f = props.texts) == null ? void 0 : _f.seconds) : /* @__PURE__ */ React88.createElement("div", { className: "hawa-py-2 hawa-text-center hawa-text-xs hawa-text-muted-foreground" }, /* @__PURE__ */ React88.createElement("span", null, (_h = (_g = props.texts) == null ? void 0 : _g.didntGetCode) != null ? _h : "Didn't get the code?"), " ", /* @__PURE__ */ React88.createElement(
11123
- "span",
11124
- {
11125
- className: "clickable-link",
11126
- onClick: () => {
11127
- startResendTimer();
11128
- props.onResend();
11129
- }
11130
- },
11131
- ((_i = props.texts) == null ? void 0 : _i.resendCode) || "Click to resend"
11132
- )),
11133
- /* @__PURE__ */ React88.createElement("div", { className: "hawa-mt-4 hawa-grid hawa-grid-cols-2 hawa-gap-2" }, /* @__PURE__ */ React88.createElement(
11134
- Button,
11099
+ /* @__PURE__ */ React88.createElement(CardContent, { headless: true, noPadding: props.cardless }, props.showError && /* @__PURE__ */ React88.createElement(Alert, { title: props.errorTitle, text: props.errorText, severity: "error" }), /* @__PURE__ */ React88.createElement("div", { className: "hawa-mb-4 dark:hawa-text-white" }, /* @__PURE__ */ React88.createElement("div", { className: "hawa-text-lg hawa-font-bold" }, ((_c = props.texts) == null ? void 0 : _c.checkYourIdentifier) || "Please check your phone"), /* @__PURE__ */ React88.createElement("div", { className: "hawa-text-muted-foreground hawa-flex hawa-flex-row" }, /* @__PURE__ */ React88.createElement("span", null, `${(_d = props.texts) == null ? void 0 : _d.weSentCode} ` || `We've sent a code to `, /* @__PURE__ */ React88.createElement("span", { dir: "ltr" }, props.identifier)))), /* @__PURE__ */ React88.createElement(
11100
+ "form",
11135
11101
  {
11136
- type: "button",
11137
- onClick: () => {
11138
- if (props.onCancel) {
11139
- return props.onCancel();
11102
+ noValidate: true,
11103
+ onSubmit: handleSubmit((e) => {
11104
+ if (props.onConfirm) {
11105
+ return props.onConfirm(e);
11140
11106
  } else {
11141
- console.log("Cancel button clicked but onCancel prop is missing");
11107
+ console.log("Form is submitted but onConfirm prop is missing");
11142
11108
  }
11143
- },
11144
- variant: "outline"
11109
+ })
11145
11110
  },
11146
- ((_j = props.texts) == null ? void 0 : _j.cancel) || "Cancel"
11147
- ), /* @__PURE__ */ React88.createElement(Button, { isLoading: props.confirmLoading }, ((_k = props.texts) == null ? void 0 : _k.confirm) || "Confirm"))
11148
- )));
11111
+ /* @__PURE__ */ React88.createElement(
11112
+ Controller5,
11113
+ {
11114
+ control,
11115
+ name: "otp_code",
11116
+ render: ({ field }) => {
11117
+ var _a2;
11118
+ return /* @__PURE__ */ React88.createElement(
11119
+ PinInput,
11120
+ {
11121
+ maxLength: codeLength,
11122
+ helperText: (_a2 = formState.errors.otp_code) == null ? void 0 : _a2.message,
11123
+ ...field
11124
+ }
11125
+ );
11126
+ }
11127
+ }
11128
+ ),
11129
+ showResendTimer ? /* @__PURE__ */ React88.createElement("div", { className: "hawa-py-2 hawa-text-center hawa-text-xs hawa-text-muted-foreground" }, (_e = props.texts) == null ? void 0 : _e.resendCodeTimer, " ", /* @__PURE__ */ React88.createElement("strong", null, remainingTime), " ", (_f = props.texts) == null ? void 0 : _f.seconds) : /* @__PURE__ */ React88.createElement("div", { className: "hawa-py-2 hawa-text-center hawa-text-xs hawa-text-muted-foreground" }, /* @__PURE__ */ React88.createElement("span", null, (_h = (_g = props.texts) == null ? void 0 : _g.didntGetCode) != null ? _h : "Didn't get the code?"), " ", /* @__PURE__ */ React88.createElement(
11130
+ "span",
11131
+ {
11132
+ className: "clickable-link",
11133
+ onClick: () => {
11134
+ startResendTimer();
11135
+ props.onResend();
11136
+ }
11137
+ },
11138
+ ((_i = props.texts) == null ? void 0 : _i.resendCode) || "Click to resend"
11139
+ )),
11140
+ /* @__PURE__ */ React88.createElement("div", { className: "hawa-mt-4 hawa-grid hawa-grid-cols-2 hawa-gap-2" }, /* @__PURE__ */ React88.createElement(
11141
+ Button,
11142
+ {
11143
+ type: "button",
11144
+ onClick: () => {
11145
+ if (props.onCancel) {
11146
+ return props.onCancel();
11147
+ } else {
11148
+ console.log("Cancel button clicked but onCancel prop is missing");
11149
+ }
11150
+ },
11151
+ variant: "outline"
11152
+ },
11153
+ ((_j = props.texts) == null ? void 0 : _j.cancel) || "Cancel"
11154
+ ), /* @__PURE__ */ React88.createElement(Button, { isLoading: props.confirmLoading }, ((_k = props.texts) == null ? void 0 : _k.confirm) || "Confirm"))
11155
+ ))
11156
+ );
11149
11157
  };
11150
11158
 
11151
11159
  // blocks/feedback/UserReferralSource.tsx
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sikka/hawa",
3
- "version": "0.49.8-next",
3
+ "version": "0.49.9-next",
4
4
  "description": "Modern UI Kit made with Tailwind",
5
5
  "author": {
6
6
  "name": "Sikka Software",