@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.
- package/dist/blocks/auth/index.d.mts +1 -0
- package/dist/blocks/auth/index.d.ts +1 -0
- package/dist/blocks/auth/index.js +61 -52
- package/dist/blocks/auth/index.mjs +60 -52
- package/dist/blocks/index.d.mts +1 -0
- package/dist/blocks/index.d.ts +1 -0
- package/dist/blocks/index.js +61 -52
- package/dist/blocks/index.mjs +60 -52
- package/dist/blocks/misc/index.js +2 -1
- package/dist/blocks/misc/index.mjs +1 -1
- package/dist/{chunk-5CD5WZIQ.mjs → chunk-HKHXE2VO.mjs} +2 -1
- package/dist/{chunk-JT7R3L5O.mjs → chunk-LDN5RXGD.mjs} +2 -1
- package/dist/dataTable/index.js +2 -1
- package/dist/dataTable/index.js.map +1 -1
- package/dist/dataTable/index.mjs +2 -1
- package/dist/dataTable/index.mjs.map +1 -1
- package/dist/elements/index.d.mts +2 -0
- package/dist/elements/index.d.ts +2 -0
- package/dist/elements/index.js +2 -1
- package/dist/elements/index.mjs +1 -1
- package/dist/index.d.mts +3 -0
- package/dist/index.d.ts +3 -0
- package/dist/index.js +61 -52
- package/dist/index.mjs +61 -52
- package/dist/input/index.d.mts +2 -0
- package/dist/input/index.d.ts +2 -0
- package/dist/input/index.js +2 -1
- package/dist/input/index.js.map +1 -1
- package/dist/input/index.mjs +2 -1
- package/dist/input/index.mjs.map +1 -1
- package/dist/passwordInput/index.js +2 -1
- package/dist/passwordInput/index.js.map +1 -1
- package/dist/passwordInput/index.mjs +2 -1
- package/dist/passwordInput/index.mjs.map +1 -1
- package/package.json +4 -4
@@ -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(
|
5216
|
-
|
5216
|
+
return /* @__PURE__ */ import_react44.default.createElement(
|
5217
|
+
Card,
|
5217
5218
|
{
|
5218
|
-
|
5219
|
-
|
5220
|
-
|
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
|
-
|
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
|
-
|
5260
|
-
|
5261
|
-
if (props.
|
5262
|
-
return props.
|
5226
|
+
noValidate: true,
|
5227
|
+
onSubmit: handleSubmit((e) => {
|
5228
|
+
if (props.onConfirm) {
|
5229
|
+
return props.onConfirm(e);
|
5263
5230
|
} else {
|
5264
|
-
console.log("
|
5231
|
+
console.log("Form is submitted but onConfirm prop is missing");
|
5265
5232
|
}
|
5266
|
-
}
|
5267
|
-
variant: "outline"
|
5233
|
+
})
|
5268
5234
|
},
|
5269
|
-
|
5270
|
-
|
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-
|
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(
|
3843
|
-
|
3842
|
+
return /* @__PURE__ */ React13.createElement(
|
3843
|
+
Card,
|
3844
3844
|
{
|
3845
|
-
|
3846
|
-
|
3847
|
-
|
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
|
-
|
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
|
-
|
3887
|
-
|
3888
|
-
if (props.
|
3889
|
-
return props.
|
3852
|
+
noValidate: true,
|
3853
|
+
onSubmit: handleSubmit((e) => {
|
3854
|
+
if (props.onConfirm) {
|
3855
|
+
return props.onConfirm(e);
|
3890
3856
|
} else {
|
3891
|
-
console.log("
|
3857
|
+
console.log("Form is submitted but onConfirm prop is missing");
|
3892
3858
|
}
|
3893
|
-
}
|
3894
|
-
variant: "outline"
|
3859
|
+
})
|
3895
3860
|
},
|
3896
|
-
|
3897
|
-
|
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,
|
package/dist/blocks/index.d.mts
CHANGED
package/dist/blocks/index.d.ts
CHANGED
package/dist/blocks/index.js
CHANGED
@@ -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(
|
5391
|
-
|
5391
|
+
return /* @__PURE__ */ import_react44.default.createElement(
|
5392
|
+
Card,
|
5392
5393
|
{
|
5393
|
-
|
5394
|
-
|
5395
|
-
|
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
|
-
|
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
|
-
|
5435
|
-
|
5436
|
-
if (props.
|
5437
|
-
return props.
|
5401
|
+
noValidate: true,
|
5402
|
+
onSubmit: handleSubmit((e) => {
|
5403
|
+
if (props.onConfirm) {
|
5404
|
+
return props.onConfirm(e);
|
5438
5405
|
} else {
|
5439
|
-
console.log("
|
5406
|
+
console.log("Form is submitted but onConfirm prop is missing");
|
5440
5407
|
}
|
5441
|
-
}
|
5442
|
-
variant: "outline"
|
5408
|
+
})
|
5443
5409
|
},
|
5444
|
-
|
5445
|
-
|
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
|
package/dist/blocks/index.mjs
CHANGED
@@ -17,7 +17,7 @@ import {
|
|
17
17
|
TabsList,
|
18
18
|
TabsTrigger,
|
19
19
|
Textarea
|
20
|
-
} from "../chunk-
|
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(
|
1299
|
-
|
1298
|
+
return /* @__PURE__ */ React8.createElement(
|
1299
|
+
Card,
|
1300
1300
|
{
|
1301
|
-
|
1302
|
-
|
1303
|
-
|
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
|
-
|
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
|
-
|
1343
|
-
|
1344
|
-
if (props.
|
1345
|
-
return props.
|
1308
|
+
noValidate: true,
|
1309
|
+
onSubmit: handleSubmit((e) => {
|
1310
|
+
if (props.onConfirm) {
|
1311
|
+
return props.onConfirm(e);
|
1346
1312
|
} else {
|
1347
|
-
console.log("
|
1313
|
+
console.log("Form is submitted but onConfirm prop is missing");
|
1348
1314
|
}
|
1349
|
-
}
|
1350
|
-
variant: "outline"
|
1315
|
+
})
|
1351
1316
|
},
|
1352
|
-
|
1353
|
-
|
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
|
}
|
@@ -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
|
}
|