@sikka/hawa 0.49.8-next → 0.49.10-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>;
@@ -1340,7 +1340,7 @@ var Input = (0, import_react8.forwardRef)(
1340
1340
  "input",
1341
1341
  {
1342
1342
  required: true,
1343
- dir: props.dir,
1343
+ dir: props.alwaysLTR ? "ltr" : props.dir,
1344
1344
  type: props.type,
1345
1345
  value: props.value || value,
1346
1346
  onChange: handleChange,
@@ -1361,6 +1361,7 @@ var Input = (0, import_react8.forwardRef)(
1361
1361
  "hawa-pe-[60px]": countPosition === "center"
1362
1362
  },
1363
1363
  preview && "hawa-border-transparent hawa-bg-transparent hawa-px-0",
1364
+ props.alwaysLTR && "hawa-text-end",
1364
1365
  inputProps == null ? void 0 : inputProps.className
1365
1366
  )
1366
1367
  }
@@ -5212,63 +5213,71 @@ var CodeConfirmation = ({ codeLength = 6, ...props }) => {
5212
5213
  }
5213
5214
  };
5214
5215
  }, []);
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",
5216
+ return /* @__PURE__ */ import_react44.default.createElement(
5217
+ Card,
5217
5218
  {
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
- })
5219
+ className: cn(
5220
+ props.cardless && "hawa-border-none hawa-bg-transparent !hawa-shadow-none !hawa-drop-shadow-none"
5221
+ )
5226
5222
  },
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,
5223
+ /* @__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(
5224
+ "form",
5258
5225
  {
5259
- type: "button",
5260
- onClick: () => {
5261
- if (props.onCancel) {
5262
- return props.onCancel();
5226
+ noValidate: true,
5227
+ onSubmit: handleSubmit((e) => {
5228
+ if (props.onConfirm) {
5229
+ return props.onConfirm(e);
5263
5230
  } else {
5264
- console.log("Cancel button clicked but onCancel prop is missing");
5231
+ console.log("Form is submitted but onConfirm prop is missing");
5265
5232
  }
5266
- },
5267
- variant: "outline"
5233
+ })
5268
5234
  },
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
- )));
5235
+ /* @__PURE__ */ import_react44.default.createElement(
5236
+ import_react_hook_form5.Controller,
5237
+ {
5238
+ control,
5239
+ name: "otp_code",
5240
+ render: ({ field }) => {
5241
+ var _a2;
5242
+ return /* @__PURE__ */ import_react44.default.createElement(
5243
+ PinInput,
5244
+ {
5245
+ maxLength: codeLength,
5246
+ helperText: (_a2 = formState.errors.otp_code) == null ? void 0 : _a2.message,
5247
+ ...field
5248
+ }
5249
+ );
5250
+ }
5251
+ }
5252
+ ),
5253
+ 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(
5254
+ "span",
5255
+ {
5256
+ className: "clickable-link",
5257
+ onClick: () => {
5258
+ startResendTimer();
5259
+ props.onResend();
5260
+ }
5261
+ },
5262
+ ((_i = props.texts) == null ? void 0 : _i.resendCode) || "Click to resend"
5263
+ )),
5264
+ /* @__PURE__ */ import_react44.default.createElement("div", { className: "hawa-mt-4 hawa-grid hawa-grid-cols-2 hawa-gap-2" }, /* @__PURE__ */ import_react44.default.createElement(
5265
+ Button,
5266
+ {
5267
+ type: "button",
5268
+ onClick: () => {
5269
+ if (props.onCancel) {
5270
+ return props.onCancel();
5271
+ } else {
5272
+ console.log("Cancel button clicked but onCancel prop is missing");
5273
+ }
5274
+ },
5275
+ variant: "outline"
5276
+ },
5277
+ ((_j = props.texts) == null ? void 0 : _j.cancel) || "Cancel"
5278
+ ), /* @__PURE__ */ import_react44.default.createElement(Button, { isLoading: props.confirmLoading }, ((_k = props.texts) == null ? void 0 : _k.confirm) || "Confirm"))
5279
+ ))
5280
+ );
5272
5281
  };
5273
5282
  // Annotate the CommonJS export names for ESM import in node:
5274
5283
  0 && (module.exports = {
@@ -5,7 +5,7 @@ import {
5
5
  TabsContent,
6
6
  TabsList,
7
7
  TabsTrigger
8
- } from "../../chunk-JT7R3L5O.mjs";
8
+ } from "../../chunk-LDN5RXGD.mjs";
9
9
  import {
10
10
  StopPropagationWrapper
11
11
  } from "../../chunk-47APBDKK.mjs";
@@ -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>;
@@ -1361,7 +1361,7 @@ var Input = (0, import_react8.forwardRef)(
1361
1361
  "input",
1362
1362
  {
1363
1363
  required: true,
1364
- dir: props.dir,
1364
+ dir: props.alwaysLTR ? "ltr" : props.dir,
1365
1365
  type: props.type,
1366
1366
  value: props.value || value,
1367
1367
  onChange: handleChange,
@@ -1382,6 +1382,7 @@ var Input = (0, import_react8.forwardRef)(
1382
1382
  "hawa-pe-[60px]": countPosition === "center"
1383
1383
  },
1384
1384
  preview && "hawa-border-transparent hawa-bg-transparent hawa-px-0",
1385
+ props.alwaysLTR && "hawa-text-end",
1385
1386
  inputProps == null ? void 0 : inputProps.className
1386
1387
  )
1387
1388
  }
@@ -5387,63 +5388,71 @@ var CodeConfirmation = ({ codeLength = 6, ...props }) => {
5387
5388
  }
5388
5389
  };
5389
5390
  }, []);
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",
5391
+ return /* @__PURE__ */ import_react44.default.createElement(
5392
+ Card,
5392
5393
  {
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
- })
5394
+ className: cn(
5395
+ props.cardless && "hawa-border-none hawa-bg-transparent !hawa-shadow-none !hawa-drop-shadow-none"
5396
+ )
5401
5397
  },
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,
5398
+ /* @__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(
5399
+ "form",
5433
5400
  {
5434
- type: "button",
5435
- onClick: () => {
5436
- if (props.onCancel) {
5437
- return props.onCancel();
5401
+ noValidate: true,
5402
+ onSubmit: handleSubmit((e) => {
5403
+ if (props.onConfirm) {
5404
+ return props.onConfirm(e);
5438
5405
  } else {
5439
- console.log("Cancel button clicked but onCancel prop is missing");
5406
+ console.log("Form is submitted but onConfirm prop is missing");
5440
5407
  }
5441
- },
5442
- variant: "outline"
5408
+ })
5443
5409
  },
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
- )));
5410
+ /* @__PURE__ */ import_react44.default.createElement(
5411
+ import_react_hook_form5.Controller,
5412
+ {
5413
+ control,
5414
+ name: "otp_code",
5415
+ render: ({ field }) => {
5416
+ var _a2;
5417
+ return /* @__PURE__ */ import_react44.default.createElement(
5418
+ PinInput,
5419
+ {
5420
+ maxLength: codeLength,
5421
+ helperText: (_a2 = formState.errors.otp_code) == null ? void 0 : _a2.message,
5422
+ ...field
5423
+ }
5424
+ );
5425
+ }
5426
+ }
5427
+ ),
5428
+ 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(
5429
+ "span",
5430
+ {
5431
+ className: "clickable-link",
5432
+ onClick: () => {
5433
+ startResendTimer();
5434
+ props.onResend();
5435
+ }
5436
+ },
5437
+ ((_i = props.texts) == null ? void 0 : _i.resendCode) || "Click to resend"
5438
+ )),
5439
+ /* @__PURE__ */ import_react44.default.createElement("div", { className: "hawa-mt-4 hawa-grid hawa-grid-cols-2 hawa-gap-2" }, /* @__PURE__ */ import_react44.default.createElement(
5440
+ Button,
5441
+ {
5442
+ type: "button",
5443
+ onClick: () => {
5444
+ if (props.onCancel) {
5445
+ return props.onCancel();
5446
+ } else {
5447
+ console.log("Cancel button clicked but onCancel prop is missing");
5448
+ }
5449
+ },
5450
+ variant: "outline"
5451
+ },
5452
+ ((_j = props.texts) == null ? void 0 : _j.cancel) || "Cancel"
5453
+ ), /* @__PURE__ */ import_react44.default.createElement(Button, { isLoading: props.confirmLoading }, ((_k = props.texts) == null ? void 0 : _k.confirm) || "Confirm"))
5454
+ ))
5455
+ );
5447
5456
  };
5448
5457
 
5449
5458
  // blocks/feedback/UserReferralSource.tsx
@@ -17,7 +17,7 @@ import {
17
17
  TabsList,
18
18
  TabsTrigger,
19
19
  Textarea
20
- } from "../chunk-5CD5WZIQ.mjs";
20
+ } from "../chunk-HKHXE2VO.mjs";
21
21
  import {
22
22
  getHotkeyHandler
23
23
  } from "../chunk-WQR4XZGL.mjs";
@@ -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
@@ -1265,7 +1265,7 @@ var Input = (0, import_react28.forwardRef)(
1265
1265
  "input",
1266
1266
  {
1267
1267
  required: true,
1268
- dir: props.dir,
1268
+ dir: props.alwaysLTR ? "ltr" : props.dir,
1269
1269
  type: props.type,
1270
1270
  value: props.value || value,
1271
1271
  onChange: handleChange,
@@ -1286,6 +1286,7 @@ var Input = (0, import_react28.forwardRef)(
1286
1286
  "hawa-pe-[60px]": countPosition === "center"
1287
1287
  },
1288
1288
  preview && "hawa-border-transparent hawa-bg-transparent hawa-px-0",
1289
+ props.alwaysLTR && "hawa-text-end",
1289
1290
  inputProps == null ? void 0 : inputProps.className
1290
1291
  )
1291
1292
  }
@@ -6,7 +6,7 @@ import {
6
6
  TabsList,
7
7
  TabsTrigger,
8
8
  getHotkeyHandler
9
- } from "../../chunk-JT7R3L5O.mjs";
9
+ } from "../../chunk-LDN5RXGD.mjs";
10
10
  import {
11
11
  ScrollArea
12
12
  } from "../../chunk-B53SP2WZ.mjs";
@@ -276,7 +276,7 @@ var Input = forwardRef(
276
276
  "input",
277
277
  {
278
278
  required: true,
279
- dir: props.dir,
279
+ dir: props.alwaysLTR ? "ltr" : props.dir,
280
280
  type: props.type,
281
281
  value: props.value || value,
282
282
  onChange: handleChange,
@@ -297,6 +297,7 @@ var Input = forwardRef(
297
297
  "hawa-pe-[60px]": countPosition === "center"
298
298
  },
299
299
  preview && "hawa-border-transparent hawa-bg-transparent hawa-px-0",
300
+ props.alwaysLTR && "hawa-text-end",
300
301
  inputProps == null ? void 0 : inputProps.className
301
302
  )
302
303
  }