@sikka/hawa 0.44.0-next → 0.45.0-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 +3 -2
- package/dist/blocks/auth/index.d.ts +3 -2
- package/dist/blocks/auth/index.js +62 -34
- package/dist/blocks/auth/index.mjs +44 -23
- package/dist/blocks/feedback/index.js +19 -12
- package/dist/blocks/feedback/index.mjs +1 -1
- package/dist/blocks/index.d.mts +5 -2
- package/dist/blocks/index.d.ts +5 -2
- package/dist/blocks/index.js +140 -40
- package/dist/blocks/index.mjs +45 -15
- package/dist/blocks/misc/index.d.mts +2 -0
- package/dist/blocks/misc/index.d.ts +2 -0
- package/dist/blocks/misc/index.js +97 -18
- package/dist/blocks/misc/index.mjs +79 -7
- package/dist/{chunk-DYYINLRJ.mjs → chunk-LMYT23CT.mjs} +19 -12
- package/dist/{chunk-MEXJAHQV.mjs → chunk-QMNXTGM4.mjs} +41 -27
- package/dist/elements/index.js +41 -27
- package/dist/elements/index.mjs +1 -1
- package/dist/index.css +3 -0
- package/dist/index.d.mts +5 -2
- package/dist/index.d.ts +5 -2
- package/dist/index.js +82 -40
- package/dist/index.mjs +82 -40
- package/dist/phoneInput/index.js +19 -12
- package/dist/phoneInput/index.js.map +1 -1
- package/dist/phoneInput/index.mjs +19 -12
- package/dist/phoneInput/index.mjs.map +1 -1
- package/dist/pinInput/index.js +22 -15
- package/dist/pinInput/index.js.map +1 -1
- package/dist/pinInput/index.mjs +22 -15
- package/dist/pinInput/index.mjs.map +1 -1
- package/dist/select/index.js +19 -12
- package/dist/select/index.js.map +1 -1
- package/dist/select/index.mjs +19 -12
- package/dist/select/index.mjs.map +1 -1
- package/package.json +11 -11
@@ -282,8 +282,9 @@ type TConfirmation = {
|
|
282
282
|
errorText?: any;
|
283
283
|
phoneNumber?: string;
|
284
284
|
confirmLoading?: boolean;
|
285
|
-
|
286
|
-
|
285
|
+
onConfirm?: any;
|
286
|
+
onResend?: any;
|
287
|
+
onCancel?: any;
|
287
288
|
codeLength?: number;
|
288
289
|
};
|
289
290
|
declare const CodeConfirmation: FC<TConfirmation>;
|
@@ -282,8 +282,9 @@ type TConfirmation = {
|
|
282
282
|
errorText?: any;
|
283
283
|
phoneNumber?: string;
|
284
284
|
confirmLoading?: boolean;
|
285
|
-
|
286
|
-
|
285
|
+
onConfirm?: any;
|
286
|
+
onResend?: any;
|
287
|
+
onCancel?: any;
|
287
288
|
codeLength?: number;
|
288
289
|
};
|
289
290
|
declare const CodeConfirmation: FC<TConfirmation>;
|
@@ -3299,13 +3299,21 @@ var Select = ({
|
|
3299
3299
|
children
|
3300
3300
|
);
|
3301
3301
|
};
|
3302
|
-
const Option = ({
|
3302
|
+
const Option = ({
|
3303
|
+
children,
|
3304
|
+
innerProps,
|
3305
|
+
innerRef,
|
3306
|
+
isFocused,
|
3307
|
+
isSelected
|
3308
|
+
}) => {
|
3303
3309
|
return /* @__PURE__ */ import_react9.default.createElement(
|
3304
3310
|
"div",
|
3305
3311
|
{
|
3306
3312
|
ref: innerRef,
|
3307
3313
|
className: cn(
|
3308
|
-
"hawa-flex hawa-cursor-pointer hawa-select-none hawa-flex-row hawa-items-center hawa-justify-between hawa-rounded-inner hawa-p-1 hawa-px-2 hawa-transition-all
|
3314
|
+
"hawa-flex hawa-cursor-pointer hawa-select-none hawa-flex-row hawa-items-center hawa-justify-between hawa-rounded-inner hawa-p-1 hawa-px-2 hawa-transition-all",
|
3315
|
+
isFocused ? "hawa-bg-accent hawa-text-bg-accent-foreground" : "hover:hawa-bg-accent hover:hawa-text-accent-foreground",
|
3316
|
+
isSelected && "hawa-bg-primary hawa-text-primary-foreground"
|
3309
3317
|
),
|
3310
3318
|
...innerProps
|
3311
3319
|
},
|
@@ -3362,15 +3370,20 @@ var Select = ({
|
|
3362
3370
|
container: () => cn(
|
3363
3371
|
selectContainerStyles,
|
3364
3372
|
props.phoneCode && phoneCodeStyles,
|
3365
|
-
props.disabled ? "hawa-cursor-not-allowed" : "hawa-cursor-pointer",
|
3366
3373
|
props.isMulti && "hawa-ps-0 "
|
3367
3374
|
),
|
3368
|
-
placeholder: () =>
|
3375
|
+
placeholder: () => cn(
|
3376
|
+
selectPlaceholderStyles,
|
3377
|
+
props.disabled && "hawa-text-muted-foreground"
|
3378
|
+
),
|
3369
3379
|
valueContainer: () => "hawa-text-foreground hawa-px-1 ",
|
3370
|
-
singleValue: () =>
|
3380
|
+
singleValue: () => cn(
|
3381
|
+
props.disabled ? "hawa-text-muted-foreground hawa-opacity-30" : "hawa-text-foreground"
|
3382
|
+
),
|
3371
3383
|
indicatorsContainer: () => cn(
|
3372
3384
|
selectIndicatorContainerStyles,
|
3373
|
-
props.hideIndicator ? "hawa-invisible" : "hawa-px-1"
|
3385
|
+
props.hideIndicator ? "hawa-invisible" : "hawa-px-1",
|
3386
|
+
props.disabled && "hawa-opacity-30"
|
3374
3387
|
)
|
3375
3388
|
},
|
3376
3389
|
unstyled: true,
|
@@ -3378,12 +3391,6 @@ var Select = ({
|
|
3378
3391
|
components: props.hideIndicator ? { Option, Menu, IndicatorsContainer: () => null } : {
|
3379
3392
|
Option,
|
3380
3393
|
Menu,
|
3381
|
-
// Control: (e) => (
|
3382
|
-
// <div
|
3383
|
-
// className={cn(e.className, "hawa-flex hawa-flex-row")}
|
3384
|
-
// {...e}
|
3385
|
-
// />
|
3386
|
-
// ),
|
3387
3394
|
ValueContainer: (e) => /* @__PURE__ */ import_react9.default.createElement(
|
3388
3395
|
"div",
|
3389
3396
|
{
|
@@ -4666,19 +4673,19 @@ var z5 = __toESM(require("zod"));
|
|
4666
4673
|
var React25 = __toESM(require("react"));
|
4667
4674
|
var import_input_otp = require("input-otp");
|
4668
4675
|
|
4669
|
-
// ../../node_modules/.pnpm/lucide-react@0.
|
4676
|
+
// ../../node_modules/.pnpm/lucide-react@0.424.0_react@18.3.1/node_modules/lucide-react/dist/esm/createLucideIcon.js
|
4670
4677
|
var import_react23 = require("react");
|
4671
4678
|
|
4672
|
-
// ../../node_modules/.pnpm/lucide-react@0.
|
4679
|
+
// ../../node_modules/.pnpm/lucide-react@0.424.0_react@18.3.1/node_modules/lucide-react/dist/esm/shared/src/utils.js
|
4673
4680
|
var toKebabCase = (string6) => string6.replace(/([a-z0-9])([A-Z])/g, "$1-$2").toLowerCase();
|
4674
4681
|
var mergeClasses = (...classes) => classes.filter((className, index, array) => {
|
4675
4682
|
return Boolean(className) && array.indexOf(className) === index;
|
4676
4683
|
}).join(" ");
|
4677
4684
|
|
4678
|
-
// ../../node_modules/.pnpm/lucide-react@0.
|
4685
|
+
// ../../node_modules/.pnpm/lucide-react@0.424.0_react@18.3.1/node_modules/lucide-react/dist/esm/Icon.js
|
4679
4686
|
var import_react22 = require("react");
|
4680
4687
|
|
4681
|
-
// ../../node_modules/.pnpm/lucide-react@0.
|
4688
|
+
// ../../node_modules/.pnpm/lucide-react@0.424.0_react@18.3.1/node_modules/lucide-react/dist/esm/defaultAttributes.js
|
4682
4689
|
var defaultAttributes = {
|
4683
4690
|
xmlns: "http://www.w3.org/2000/svg",
|
4684
4691
|
width: 24,
|
@@ -4691,7 +4698,7 @@ var defaultAttributes = {
|
|
4691
4698
|
strokeLinejoin: "round"
|
4692
4699
|
};
|
4693
4700
|
|
4694
|
-
// ../../node_modules/.pnpm/lucide-react@0.
|
4701
|
+
// ../../node_modules/.pnpm/lucide-react@0.424.0_react@18.3.1/node_modules/lucide-react/dist/esm/Icon.js
|
4695
4702
|
var Icon = (0, import_react22.forwardRef)(
|
4696
4703
|
({
|
4697
4704
|
color = "currentColor",
|
@@ -4723,7 +4730,7 @@ var Icon = (0, import_react22.forwardRef)(
|
|
4723
4730
|
}
|
4724
4731
|
);
|
4725
4732
|
|
4726
|
-
// ../../node_modules/.pnpm/lucide-react@0.
|
4733
|
+
// ../../node_modules/.pnpm/lucide-react@0.424.0_react@18.3.1/node_modules/lucide-react/dist/esm/createLucideIcon.js
|
4727
4734
|
var createLucideIcon = (iconName, iconNode) => {
|
4728
4735
|
const Component = (0, import_react23.forwardRef)(
|
4729
4736
|
({ className, ...props }, ref) => (0, import_react23.createElement)(Icon, {
|
@@ -4737,7 +4744,7 @@ var createLucideIcon = (iconName, iconNode) => {
|
|
4737
4744
|
return Component;
|
4738
4745
|
};
|
4739
4746
|
|
4740
|
-
// ../../node_modules/.pnpm/lucide-react@0.
|
4747
|
+
// ../../node_modules/.pnpm/lucide-react@0.424.0_react@18.3.1/node_modules/lucide-react/dist/esm/icons/dot.js
|
4741
4748
|
var Dot = createLucideIcon("Dot", [
|
4742
4749
|
["circle", { cx: "12.1", cy: "12.1", r: "1", key: "18d7e5" }]
|
4743
4750
|
]);
|
@@ -4794,12 +4801,19 @@ var PinInput = ({
|
|
4794
4801
|
const clampedSeparatorPosition = Math.min(separatorPosition, maxLength);
|
4795
4802
|
const firstGroupLength = clampedSeparatorPosition > 0 ? clampedSeparatorPosition : 0;
|
4796
4803
|
const secondGroupLength = maxLength - firstGroupLength;
|
4797
|
-
return /* @__PURE__ */ React25.createElement("div", { className: "hawa-flex hawa-flex-col hawa-gap-2" }, /* @__PURE__ */ React25.createElement(PinInputRoot, { ...props }, firstGroupLength > 0 && /* @__PURE__ */ React25.createElement(PinInputGroup, { className: "hawa-w-full
|
4804
|
+
return /* @__PURE__ */ React25.createElement("div", { className: "hawa-flex hawa-flex-col hawa-gap-2" }, /* @__PURE__ */ React25.createElement(PinInputRoot, { ...props }, firstGroupLength > 0 && /* @__PURE__ */ React25.createElement(PinInputGroup, { className: "hawa-w-full hawa-gap-2" }, [...Array(firstGroupLength)].map((_, index) => /* @__PURE__ */ React25.createElement(
|
4805
|
+
PinInputSlot,
|
4806
|
+
{
|
4807
|
+
key: index,
|
4808
|
+
index,
|
4809
|
+
className: "hawa-w-full hawa-border"
|
4810
|
+
}
|
4811
|
+
))), separatorPosition > 0 && separatorPosition < props.maxLength && /* @__PURE__ */ React25.createElement(PinInputSeperator, null), secondGroupLength > 0 && /* @__PURE__ */ React25.createElement(PinInputGroup, { className: "hawa-w-full hawa-gap-2" }, [...Array(secondGroupLength)].map((_, index) => /* @__PURE__ */ React25.createElement(
|
4798
4812
|
PinInputSlot,
|
4799
4813
|
{
|
4800
4814
|
key: index + firstGroupLength,
|
4801
4815
|
index: index + firstGroupLength,
|
4802
|
-
className: "hawa-w-full"
|
4816
|
+
className: "hawa-w-full hawa-border"
|
4803
4817
|
}
|
4804
4818
|
)))), /* @__PURE__ */ React25.createElement(HelperText, { helperText: props.helperText }));
|
4805
4819
|
};
|
@@ -4859,12 +4873,10 @@ var CodeConfirmation = ({
|
|
4859
4873
|
{
|
4860
4874
|
noValidate: true,
|
4861
4875
|
onSubmit: handleSubmit((e) => {
|
4862
|
-
if (props.
|
4863
|
-
return props.
|
4876
|
+
if (props.onConfirm) {
|
4877
|
+
return props.onConfirm(e);
|
4864
4878
|
} else {
|
4865
|
-
console.log(
|
4866
|
-
"Form is submitted but handleConfirm prop is missing"
|
4867
|
-
);
|
4879
|
+
console.log("Form is submitted but onConfirm prop is missing");
|
4868
4880
|
}
|
4869
4881
|
})
|
4870
4882
|
},
|
@@ -4892,12 +4904,28 @@ var CodeConfirmation = ({
|
|
4892
4904
|
className: "clickable-link",
|
4893
4905
|
onClick: () => {
|
4894
4906
|
startResendTimer();
|
4895
|
-
props.
|
4907
|
+
props.onResend();
|
4896
4908
|
}
|
4897
4909
|
},
|
4898
4910
|
((_i = props.texts) == null ? void 0 : _i.resendCode) || "Click to resend"
|
4899
4911
|
)),
|
4900
|
-
/* @__PURE__ */ import_react24.default.createElement("div", { className: "hawa-mt-4 hawa-grid hawa-grid-cols-2 hawa-gap-2" }, /* @__PURE__ */ import_react24.default.createElement(
|
4912
|
+
/* @__PURE__ */ import_react24.default.createElement("div", { className: "hawa-mt-4 hawa-grid hawa-grid-cols-2 hawa-gap-2" }, /* @__PURE__ */ import_react24.default.createElement(
|
4913
|
+
Button,
|
4914
|
+
{
|
4915
|
+
type: "button",
|
4916
|
+
onClick: () => {
|
4917
|
+
if (props.onCancel) {
|
4918
|
+
return props.onCancel();
|
4919
|
+
} else {
|
4920
|
+
console.log(
|
4921
|
+
"Cancel button clicked but onCancel prop is missing"
|
4922
|
+
);
|
4923
|
+
}
|
4924
|
+
},
|
4925
|
+
variant: "outline"
|
4926
|
+
},
|
4927
|
+
((_j = props.texts) == null ? void 0 : _j.cancel) || "Cancel"
|
4928
|
+
), /* @__PURE__ */ import_react24.default.createElement(Button, { isLoading: props.confirmLoading }, ((_k = props.texts) == null ? void 0 : _k.confirm) || "Confirm"))
|
4901
4929
|
)));
|
4902
4930
|
};
|
4903
4931
|
// Annotate the CommonJS export names for ESM import in node:
|
@@ -4915,7 +4943,7 @@ var CodeConfirmation = ({
|
|
4915
4943
|
|
4916
4944
|
lucide-react/dist/esm/shared/src/utils.js:
|
4917
4945
|
(**
|
4918
|
-
* @license lucide-react v0.
|
4946
|
+
* @license lucide-react v0.424.0 - ISC
|
4919
4947
|
*
|
4920
4948
|
* This source code is licensed under the ISC license.
|
4921
4949
|
* See the LICENSE file in the root directory of this source tree.
|
@@ -4923,7 +4951,7 @@ lucide-react/dist/esm/shared/src/utils.js:
|
|
4923
4951
|
|
4924
4952
|
lucide-react/dist/esm/defaultAttributes.js:
|
4925
4953
|
(**
|
4926
|
-
* @license lucide-react v0.
|
4954
|
+
* @license lucide-react v0.424.0 - ISC
|
4927
4955
|
*
|
4928
4956
|
* This source code is licensed under the ISC license.
|
4929
4957
|
* See the LICENSE file in the root directory of this source tree.
|
@@ -4931,7 +4959,7 @@ lucide-react/dist/esm/defaultAttributes.js:
|
|
4931
4959
|
|
4932
4960
|
lucide-react/dist/esm/Icon.js:
|
4933
4961
|
(**
|
4934
|
-
* @license lucide-react v0.
|
4962
|
+
* @license lucide-react v0.424.0 - ISC
|
4935
4963
|
*
|
4936
4964
|
* This source code is licensed under the ISC license.
|
4937
4965
|
* See the LICENSE file in the root directory of this source tree.
|
@@ -4939,7 +4967,7 @@ lucide-react/dist/esm/Icon.js:
|
|
4939
4967
|
|
4940
4968
|
lucide-react/dist/esm/createLucideIcon.js:
|
4941
4969
|
(**
|
4942
|
-
* @license lucide-react v0.
|
4970
|
+
* @license lucide-react v0.424.0 - ISC
|
4943
4971
|
*
|
4944
4972
|
* This source code is licensed under the ISC license.
|
4945
4973
|
* See the LICENSE file in the root directory of this source tree.
|
@@ -4947,7 +4975,7 @@ lucide-react/dist/esm/createLucideIcon.js:
|
|
4947
4975
|
|
4948
4976
|
lucide-react/dist/esm/icons/dot.js:
|
4949
4977
|
(**
|
4950
|
-
* @license lucide-react v0.
|
4978
|
+
* @license lucide-react v0.424.0 - ISC
|
4951
4979
|
*
|
4952
4980
|
* This source code is licensed under the ISC license.
|
4953
4981
|
* See the LICENSE file in the root directory of this source tree.
|
@@ -4955,7 +4983,7 @@ lucide-react/dist/esm/icons/dot.js:
|
|
4955
4983
|
|
4956
4984
|
lucide-react/dist/esm/lucide-react.js:
|
4957
4985
|
(**
|
4958
|
-
* @license lucide-react v0.
|
4986
|
+
* @license lucide-react v0.424.0 - ISC
|
4959
4987
|
*
|
4960
4988
|
* This source code is licensed under the ISC license.
|
4961
4989
|
* See the LICENSE file in the root directory of this source tree.
|
@@ -7,7 +7,7 @@ import {
|
|
7
7
|
} from "../../chunk-47APBDKK.mjs";
|
8
8
|
import {
|
9
9
|
Select
|
10
|
-
} from "../../chunk-
|
10
|
+
} from "../../chunk-LMYT23CT.mjs";
|
11
11
|
import {
|
12
12
|
EyeIcon,
|
13
13
|
HiddenEyeIcon
|
@@ -3682,19 +3682,19 @@ import * as z5 from "zod";
|
|
3682
3682
|
import * as React12 from "react";
|
3683
3683
|
import { OTPInput, OTPInputContext } from "input-otp";
|
3684
3684
|
|
3685
|
-
// ../../node_modules/.pnpm/lucide-react@0.
|
3685
|
+
// ../../node_modules/.pnpm/lucide-react@0.424.0_react@18.3.1/node_modules/lucide-react/dist/esm/createLucideIcon.js
|
3686
3686
|
import { forwardRef as forwardRef3, createElement as createElement3 } from "react";
|
3687
3687
|
|
3688
|
-
// ../../node_modules/.pnpm/lucide-react@0.
|
3688
|
+
// ../../node_modules/.pnpm/lucide-react@0.424.0_react@18.3.1/node_modules/lucide-react/dist/esm/shared/src/utils.js
|
3689
3689
|
var toKebabCase = (string6) => string6.replace(/([a-z0-9])([A-Z])/g, "$1-$2").toLowerCase();
|
3690
3690
|
var mergeClasses = (...classes) => classes.filter((className, index, array) => {
|
3691
3691
|
return Boolean(className) && array.indexOf(className) === index;
|
3692
3692
|
}).join(" ");
|
3693
3693
|
|
3694
|
-
// ../../node_modules/.pnpm/lucide-react@0.
|
3694
|
+
// ../../node_modules/.pnpm/lucide-react@0.424.0_react@18.3.1/node_modules/lucide-react/dist/esm/Icon.js
|
3695
3695
|
import { forwardRef as forwardRef2, createElement as createElement2 } from "react";
|
3696
3696
|
|
3697
|
-
// ../../node_modules/.pnpm/lucide-react@0.
|
3697
|
+
// ../../node_modules/.pnpm/lucide-react@0.424.0_react@18.3.1/node_modules/lucide-react/dist/esm/defaultAttributes.js
|
3698
3698
|
var defaultAttributes = {
|
3699
3699
|
xmlns: "http://www.w3.org/2000/svg",
|
3700
3700
|
width: 24,
|
@@ -3707,7 +3707,7 @@ var defaultAttributes = {
|
|
3707
3707
|
strokeLinejoin: "round"
|
3708
3708
|
};
|
3709
3709
|
|
3710
|
-
// ../../node_modules/.pnpm/lucide-react@0.
|
3710
|
+
// ../../node_modules/.pnpm/lucide-react@0.424.0_react@18.3.1/node_modules/lucide-react/dist/esm/Icon.js
|
3711
3711
|
var Icon = forwardRef2(
|
3712
3712
|
({
|
3713
3713
|
color = "currentColor",
|
@@ -3739,7 +3739,7 @@ var Icon = forwardRef2(
|
|
3739
3739
|
}
|
3740
3740
|
);
|
3741
3741
|
|
3742
|
-
// ../../node_modules/.pnpm/lucide-react@0.
|
3742
|
+
// ../../node_modules/.pnpm/lucide-react@0.424.0_react@18.3.1/node_modules/lucide-react/dist/esm/createLucideIcon.js
|
3743
3743
|
var createLucideIcon = (iconName, iconNode) => {
|
3744
3744
|
const Component = forwardRef3(
|
3745
3745
|
({ className, ...props }, ref) => createElement3(Icon, {
|
@@ -3753,7 +3753,7 @@ var createLucideIcon = (iconName, iconNode) => {
|
|
3753
3753
|
return Component;
|
3754
3754
|
};
|
3755
3755
|
|
3756
|
-
// ../../node_modules/.pnpm/lucide-react@0.
|
3756
|
+
// ../../node_modules/.pnpm/lucide-react@0.424.0_react@18.3.1/node_modules/lucide-react/dist/esm/icons/dot.js
|
3757
3757
|
var Dot = createLucideIcon("Dot", [
|
3758
3758
|
["circle", { cx: "12.1", cy: "12.1", r: "1", key: "18d7e5" }]
|
3759
3759
|
]);
|
@@ -3810,12 +3810,19 @@ var PinInput = ({
|
|
3810
3810
|
const clampedSeparatorPosition = Math.min(separatorPosition, maxLength);
|
3811
3811
|
const firstGroupLength = clampedSeparatorPosition > 0 ? clampedSeparatorPosition : 0;
|
3812
3812
|
const secondGroupLength = maxLength - firstGroupLength;
|
3813
|
-
return /* @__PURE__ */ React12.createElement("div", { className: "hawa-flex hawa-flex-col hawa-gap-2" }, /* @__PURE__ */ React12.createElement(PinInputRoot, { ...props }, firstGroupLength > 0 && /* @__PURE__ */ React12.createElement(PinInputGroup, { className: "hawa-w-full
|
3813
|
+
return /* @__PURE__ */ React12.createElement("div", { className: "hawa-flex hawa-flex-col hawa-gap-2" }, /* @__PURE__ */ React12.createElement(PinInputRoot, { ...props }, firstGroupLength > 0 && /* @__PURE__ */ React12.createElement(PinInputGroup, { className: "hawa-w-full hawa-gap-2" }, [...Array(firstGroupLength)].map((_, index) => /* @__PURE__ */ React12.createElement(
|
3814
|
+
PinInputSlot,
|
3815
|
+
{
|
3816
|
+
key: index,
|
3817
|
+
index,
|
3818
|
+
className: "hawa-w-full hawa-border"
|
3819
|
+
}
|
3820
|
+
))), separatorPosition > 0 && separatorPosition < props.maxLength && /* @__PURE__ */ React12.createElement(PinInputSeperator, null), secondGroupLength > 0 && /* @__PURE__ */ React12.createElement(PinInputGroup, { className: "hawa-w-full hawa-gap-2" }, [...Array(secondGroupLength)].map((_, index) => /* @__PURE__ */ React12.createElement(
|
3814
3821
|
PinInputSlot,
|
3815
3822
|
{
|
3816
3823
|
key: index + firstGroupLength,
|
3817
3824
|
index: index + firstGroupLength,
|
3818
|
-
className: "hawa-w-full"
|
3825
|
+
className: "hawa-w-full hawa-border"
|
3819
3826
|
}
|
3820
3827
|
)))), /* @__PURE__ */ React12.createElement(HelperText, { helperText: props.helperText }));
|
3821
3828
|
};
|
@@ -3875,12 +3882,10 @@ var CodeConfirmation = ({
|
|
3875
3882
|
{
|
3876
3883
|
noValidate: true,
|
3877
3884
|
onSubmit: handleSubmit((e) => {
|
3878
|
-
if (props.
|
3879
|
-
return props.
|
3885
|
+
if (props.onConfirm) {
|
3886
|
+
return props.onConfirm(e);
|
3880
3887
|
} else {
|
3881
|
-
console.log(
|
3882
|
-
"Form is submitted but handleConfirm prop is missing"
|
3883
|
-
);
|
3888
|
+
console.log("Form is submitted but onConfirm prop is missing");
|
3884
3889
|
}
|
3885
3890
|
})
|
3886
3891
|
},
|
@@ -3908,12 +3913,28 @@ var CodeConfirmation = ({
|
|
3908
3913
|
className: "clickable-link",
|
3909
3914
|
onClick: () => {
|
3910
3915
|
startResendTimer();
|
3911
|
-
props.
|
3916
|
+
props.onResend();
|
3912
3917
|
}
|
3913
3918
|
},
|
3914
3919
|
((_i = props.texts) == null ? void 0 : _i.resendCode) || "Click to resend"
|
3915
3920
|
)),
|
3916
|
-
/* @__PURE__ */ React13.createElement("div", { className: "hawa-mt-4 hawa-grid hawa-grid-cols-2 hawa-gap-2" }, /* @__PURE__ */ React13.createElement(
|
3921
|
+
/* @__PURE__ */ React13.createElement("div", { className: "hawa-mt-4 hawa-grid hawa-grid-cols-2 hawa-gap-2" }, /* @__PURE__ */ React13.createElement(
|
3922
|
+
Button,
|
3923
|
+
{
|
3924
|
+
type: "button",
|
3925
|
+
onClick: () => {
|
3926
|
+
if (props.onCancel) {
|
3927
|
+
return props.onCancel();
|
3928
|
+
} else {
|
3929
|
+
console.log(
|
3930
|
+
"Cancel button clicked but onCancel prop is missing"
|
3931
|
+
);
|
3932
|
+
}
|
3933
|
+
},
|
3934
|
+
variant: "outline"
|
3935
|
+
},
|
3936
|
+
((_j = props.texts) == null ? void 0 : _j.cancel) || "Cancel"
|
3937
|
+
), /* @__PURE__ */ React13.createElement(Button, { isLoading: props.confirmLoading }, ((_k = props.texts) == null ? void 0 : _k.confirm) || "Confirm"))
|
3917
3938
|
)));
|
3918
3939
|
};
|
3919
3940
|
export {
|
@@ -3930,7 +3951,7 @@ export {
|
|
3930
3951
|
|
3931
3952
|
lucide-react/dist/esm/shared/src/utils.js:
|
3932
3953
|
(**
|
3933
|
-
* @license lucide-react v0.
|
3954
|
+
* @license lucide-react v0.424.0 - ISC
|
3934
3955
|
*
|
3935
3956
|
* This source code is licensed under the ISC license.
|
3936
3957
|
* See the LICENSE file in the root directory of this source tree.
|
@@ -3938,7 +3959,7 @@ lucide-react/dist/esm/shared/src/utils.js:
|
|
3938
3959
|
|
3939
3960
|
lucide-react/dist/esm/defaultAttributes.js:
|
3940
3961
|
(**
|
3941
|
-
* @license lucide-react v0.
|
3962
|
+
* @license lucide-react v0.424.0 - ISC
|
3942
3963
|
*
|
3943
3964
|
* This source code is licensed under the ISC license.
|
3944
3965
|
* See the LICENSE file in the root directory of this source tree.
|
@@ -3946,7 +3967,7 @@ lucide-react/dist/esm/defaultAttributes.js:
|
|
3946
3967
|
|
3947
3968
|
lucide-react/dist/esm/Icon.js:
|
3948
3969
|
(**
|
3949
|
-
* @license lucide-react v0.
|
3970
|
+
* @license lucide-react v0.424.0 - ISC
|
3950
3971
|
*
|
3951
3972
|
* This source code is licensed under the ISC license.
|
3952
3973
|
* See the LICENSE file in the root directory of this source tree.
|
@@ -3954,7 +3975,7 @@ lucide-react/dist/esm/Icon.js:
|
|
3954
3975
|
|
3955
3976
|
lucide-react/dist/esm/createLucideIcon.js:
|
3956
3977
|
(**
|
3957
|
-
* @license lucide-react v0.
|
3978
|
+
* @license lucide-react v0.424.0 - ISC
|
3958
3979
|
*
|
3959
3980
|
* This source code is licensed under the ISC license.
|
3960
3981
|
* See the LICENSE file in the root directory of this source tree.
|
@@ -3962,7 +3983,7 @@ lucide-react/dist/esm/createLucideIcon.js:
|
|
3962
3983
|
|
3963
3984
|
lucide-react/dist/esm/icons/dot.js:
|
3964
3985
|
(**
|
3965
|
-
* @license lucide-react v0.
|
3986
|
+
* @license lucide-react v0.424.0 - ISC
|
3966
3987
|
*
|
3967
3988
|
* This source code is licensed under the ISC license.
|
3968
3989
|
* See the LICENSE file in the root directory of this source tree.
|
@@ -3970,7 +3991,7 @@ lucide-react/dist/esm/icons/dot.js:
|
|
3970
3991
|
|
3971
3992
|
lucide-react/dist/esm/lucide-react.js:
|
3972
3993
|
(**
|
3973
|
-
* @license lucide-react v0.
|
3994
|
+
* @license lucide-react v0.424.0 - ISC
|
3974
3995
|
*
|
3975
3996
|
* This source code is licensed under the ISC license.
|
3976
3997
|
* See the LICENSE file in the root directory of this source tree.
|
@@ -1540,13 +1540,21 @@ var Select = ({
|
|
1540
1540
|
children
|
1541
1541
|
);
|
1542
1542
|
};
|
1543
|
-
const Option = ({
|
1543
|
+
const Option = ({
|
1544
|
+
children,
|
1545
|
+
innerProps,
|
1546
|
+
innerRef,
|
1547
|
+
isFocused,
|
1548
|
+
isSelected
|
1549
|
+
}) => {
|
1544
1550
|
return /* @__PURE__ */ import_react12.default.createElement(
|
1545
1551
|
"div",
|
1546
1552
|
{
|
1547
1553
|
ref: innerRef,
|
1548
1554
|
className: cn(
|
1549
|
-
"hawa-flex hawa-cursor-pointer hawa-select-none hawa-flex-row hawa-items-center hawa-justify-between hawa-rounded-inner hawa-p-1 hawa-px-2 hawa-transition-all
|
1555
|
+
"hawa-flex hawa-cursor-pointer hawa-select-none hawa-flex-row hawa-items-center hawa-justify-between hawa-rounded-inner hawa-p-1 hawa-px-2 hawa-transition-all",
|
1556
|
+
isFocused ? "hawa-bg-accent hawa-text-bg-accent-foreground" : "hover:hawa-bg-accent hover:hawa-text-accent-foreground",
|
1557
|
+
isSelected && "hawa-bg-primary hawa-text-primary-foreground"
|
1550
1558
|
),
|
1551
1559
|
...innerProps
|
1552
1560
|
},
|
@@ -1603,15 +1611,20 @@ var Select = ({
|
|
1603
1611
|
container: () => cn(
|
1604
1612
|
selectContainerStyles,
|
1605
1613
|
props.phoneCode && phoneCodeStyles,
|
1606
|
-
props.disabled ? "hawa-cursor-not-allowed" : "hawa-cursor-pointer",
|
1607
1614
|
props.isMulti && "hawa-ps-0 "
|
1608
1615
|
),
|
1609
|
-
placeholder: () =>
|
1616
|
+
placeholder: () => cn(
|
1617
|
+
selectPlaceholderStyles,
|
1618
|
+
props.disabled && "hawa-text-muted-foreground"
|
1619
|
+
),
|
1610
1620
|
valueContainer: () => "hawa-text-foreground hawa-px-1 ",
|
1611
|
-
singleValue: () =>
|
1621
|
+
singleValue: () => cn(
|
1622
|
+
props.disabled ? "hawa-text-muted-foreground hawa-opacity-30" : "hawa-text-foreground"
|
1623
|
+
),
|
1612
1624
|
indicatorsContainer: () => cn(
|
1613
1625
|
selectIndicatorContainerStyles,
|
1614
|
-
props.hideIndicator ? "hawa-invisible" : "hawa-px-1"
|
1626
|
+
props.hideIndicator ? "hawa-invisible" : "hawa-px-1",
|
1627
|
+
props.disabled && "hawa-opacity-30"
|
1615
1628
|
)
|
1616
1629
|
},
|
1617
1630
|
unstyled: true,
|
@@ -1619,12 +1632,6 @@ var Select = ({
|
|
1619
1632
|
components: props.hideIndicator ? { Option, Menu, IndicatorsContainer: () => null } : {
|
1620
1633
|
Option,
|
1621
1634
|
Menu,
|
1622
|
-
// Control: (e) => (
|
1623
|
-
// <div
|
1624
|
-
// className={cn(e.className, "hawa-flex hawa-flex-row")}
|
1625
|
-
// {...e}
|
1626
|
-
// />
|
1627
|
-
// ),
|
1628
1635
|
ValueContainer: (e) => /* @__PURE__ */ import_react12.default.createElement(
|
1629
1636
|
"div",
|
1630
1637
|
{
|
package/dist/blocks/index.d.mts
CHANGED
@@ -259,8 +259,9 @@ type TConfirmation = {
|
|
259
259
|
errorText?: any;
|
260
260
|
phoneNumber?: string;
|
261
261
|
confirmLoading?: boolean;
|
262
|
-
|
263
|
-
|
262
|
+
onConfirm?: any;
|
263
|
+
onResend?: any;
|
264
|
+
onCancel?: any;
|
264
265
|
codeLength?: number;
|
265
266
|
};
|
266
267
|
declare const CodeConfirmation: FC<TConfirmation>;
|
@@ -414,12 +415,14 @@ type ContactFormProps = {
|
|
414
415
|
cardless?: boolean;
|
415
416
|
formId?: string;
|
416
417
|
formAutoComplete?: "on" | "off";
|
418
|
+
clearOnSubmit?: boolean;
|
417
419
|
size?: "sm" | "default";
|
418
420
|
onSubmit: (e: ContactFormData) => void;
|
419
421
|
customFields?: CustomField[];
|
420
422
|
showSuccess?: boolean;
|
421
423
|
classNames?: {
|
422
424
|
submitButton?: string;
|
425
|
+
container?: string;
|
423
426
|
};
|
424
427
|
texts?: {
|
425
428
|
submit: string;
|
package/dist/blocks/index.d.ts
CHANGED
@@ -259,8 +259,9 @@ type TConfirmation = {
|
|
259
259
|
errorText?: any;
|
260
260
|
phoneNumber?: string;
|
261
261
|
confirmLoading?: boolean;
|
262
|
-
|
263
|
-
|
262
|
+
onConfirm?: any;
|
263
|
+
onResend?: any;
|
264
|
+
onCancel?: any;
|
264
265
|
codeLength?: number;
|
265
266
|
};
|
266
267
|
declare const CodeConfirmation: FC<TConfirmation>;
|
@@ -414,12 +415,14 @@ type ContactFormProps = {
|
|
414
415
|
cardless?: boolean;
|
415
416
|
formId?: string;
|
416
417
|
formAutoComplete?: "on" | "off";
|
418
|
+
clearOnSubmit?: boolean;
|
417
419
|
size?: "sm" | "default";
|
418
420
|
onSubmit: (e: ContactFormData) => void;
|
419
421
|
customFields?: CustomField[];
|
420
422
|
showSuccess?: boolean;
|
421
423
|
classNames?: {
|
422
424
|
submitButton?: string;
|
425
|
+
container?: string;
|
423
426
|
};
|
424
427
|
texts?: {
|
425
428
|
submit: string;
|