@sikka/hawa 0.44.0-next → 0.45.1-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 +63 -34
- package/dist/blocks/auth/index.mjs +44 -23
- package/dist/blocks/feedback/index.js +22 -13
- package/dist/blocks/feedback/index.mjs +2 -2
- package/dist/blocks/index.d.mts +5 -2
- package/dist/blocks/index.d.ts +5 -2
- package/dist/blocks/index.js +143 -41
- 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 +98 -18
- package/dist/blocks/misc/index.mjs +79 -7
- package/dist/blocks/pricing/index.js +2 -1
- package/dist/blocks/pricing/index.mjs +1 -1
- package/dist/{chunk-DYYINLRJ.mjs → chunk-D3B3MKLS.mjs} +20 -12
- package/dist/{chunk-MEXJAHQV.mjs → chunk-QOVVJCFE.mjs} +44 -28
- package/dist/{chunk-OE6XZ6LW.mjs → chunk-YABFWOF3.mjs} +2 -1
- package/dist/elements/index.js +44 -28
- package/dist/elements/index.mjs +1 -1
- package/dist/index.css +4 -1
- package/dist/index.d.mts +5 -2
- package/dist/index.d.ts +5 -2
- package/dist/index.js +85 -41
- package/dist/index.mjs +85 -41
- package/dist/interfaceSettings/index.js +2 -1
- package/dist/interfaceSettings/index.js.map +1 -1
- package/dist/interfaceSettings/index.mjs +2 -1
- package/dist/interfaceSettings/index.mjs.map +1 -1
- package/dist/phoneInput/index.js +20 -12
- package/dist/phoneInput/index.js.map +1 -1
- package/dist/phoneInput/index.mjs +20 -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/radio/index.js +2 -1
- package/dist/radio/index.js.map +1 -1
- package/dist/radio/index.mjs +2 -1
- package/dist/radio/index.mjs.map +1 -1
- package/dist/select/index.js +20 -12
- package/dist/select/index.js.map +1 -1
- package/dist/select/index.mjs +20 -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
|
{
|
@@ -3406,6 +3413,7 @@ var Select = ({
|
|
3406
3413
|
options: props.options,
|
3407
3414
|
getOptionLabel: props.getOptionLabel,
|
3408
3415
|
defaultValue: props.defaultValue,
|
3416
|
+
value: props.value,
|
3409
3417
|
placeholder: props.placeholder,
|
3410
3418
|
isDisabled: props.disabled,
|
3411
3419
|
isClearable: props.isClearable,
|
@@ -4666,19 +4674,19 @@ var z5 = __toESM(require("zod"));
|
|
4666
4674
|
var React25 = __toESM(require("react"));
|
4667
4675
|
var import_input_otp = require("input-otp");
|
4668
4676
|
|
4669
|
-
// ../../node_modules/.pnpm/lucide-react@0.
|
4677
|
+
// ../../node_modules/.pnpm/lucide-react@0.424.0_react@18.3.1/node_modules/lucide-react/dist/esm/createLucideIcon.js
|
4670
4678
|
var import_react23 = require("react");
|
4671
4679
|
|
4672
|
-
// ../../node_modules/.pnpm/lucide-react@0.
|
4680
|
+
// ../../node_modules/.pnpm/lucide-react@0.424.0_react@18.3.1/node_modules/lucide-react/dist/esm/shared/src/utils.js
|
4673
4681
|
var toKebabCase = (string6) => string6.replace(/([a-z0-9])([A-Z])/g, "$1-$2").toLowerCase();
|
4674
4682
|
var mergeClasses = (...classes) => classes.filter((className, index, array) => {
|
4675
4683
|
return Boolean(className) && array.indexOf(className) === index;
|
4676
4684
|
}).join(" ");
|
4677
4685
|
|
4678
|
-
// ../../node_modules/.pnpm/lucide-react@0.
|
4686
|
+
// ../../node_modules/.pnpm/lucide-react@0.424.0_react@18.3.1/node_modules/lucide-react/dist/esm/Icon.js
|
4679
4687
|
var import_react22 = require("react");
|
4680
4688
|
|
4681
|
-
// ../../node_modules/.pnpm/lucide-react@0.
|
4689
|
+
// ../../node_modules/.pnpm/lucide-react@0.424.0_react@18.3.1/node_modules/lucide-react/dist/esm/defaultAttributes.js
|
4682
4690
|
var defaultAttributes = {
|
4683
4691
|
xmlns: "http://www.w3.org/2000/svg",
|
4684
4692
|
width: 24,
|
@@ -4691,7 +4699,7 @@ var defaultAttributes = {
|
|
4691
4699
|
strokeLinejoin: "round"
|
4692
4700
|
};
|
4693
4701
|
|
4694
|
-
// ../../node_modules/.pnpm/lucide-react@0.
|
4702
|
+
// ../../node_modules/.pnpm/lucide-react@0.424.0_react@18.3.1/node_modules/lucide-react/dist/esm/Icon.js
|
4695
4703
|
var Icon = (0, import_react22.forwardRef)(
|
4696
4704
|
({
|
4697
4705
|
color = "currentColor",
|
@@ -4723,7 +4731,7 @@ var Icon = (0, import_react22.forwardRef)(
|
|
4723
4731
|
}
|
4724
4732
|
);
|
4725
4733
|
|
4726
|
-
// ../../node_modules/.pnpm/lucide-react@0.
|
4734
|
+
// ../../node_modules/.pnpm/lucide-react@0.424.0_react@18.3.1/node_modules/lucide-react/dist/esm/createLucideIcon.js
|
4727
4735
|
var createLucideIcon = (iconName, iconNode) => {
|
4728
4736
|
const Component = (0, import_react23.forwardRef)(
|
4729
4737
|
({ className, ...props }, ref) => (0, import_react23.createElement)(Icon, {
|
@@ -4737,7 +4745,7 @@ var createLucideIcon = (iconName, iconNode) => {
|
|
4737
4745
|
return Component;
|
4738
4746
|
};
|
4739
4747
|
|
4740
|
-
// ../../node_modules/.pnpm/lucide-react@0.
|
4748
|
+
// ../../node_modules/.pnpm/lucide-react@0.424.0_react@18.3.1/node_modules/lucide-react/dist/esm/icons/dot.js
|
4741
4749
|
var Dot = createLucideIcon("Dot", [
|
4742
4750
|
["circle", { cx: "12.1", cy: "12.1", r: "1", key: "18d7e5" }]
|
4743
4751
|
]);
|
@@ -4794,12 +4802,19 @@ var PinInput = ({
|
|
4794
4802
|
const clampedSeparatorPosition = Math.min(separatorPosition, maxLength);
|
4795
4803
|
const firstGroupLength = clampedSeparatorPosition > 0 ? clampedSeparatorPosition : 0;
|
4796
4804
|
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
|
4805
|
+
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(
|
4806
|
+
PinInputSlot,
|
4807
|
+
{
|
4808
|
+
key: index,
|
4809
|
+
index,
|
4810
|
+
className: "hawa-w-full hawa-border"
|
4811
|
+
}
|
4812
|
+
))), 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
4813
|
PinInputSlot,
|
4799
4814
|
{
|
4800
4815
|
key: index + firstGroupLength,
|
4801
4816
|
index: index + firstGroupLength,
|
4802
|
-
className: "hawa-w-full"
|
4817
|
+
className: "hawa-w-full hawa-border"
|
4803
4818
|
}
|
4804
4819
|
)))), /* @__PURE__ */ React25.createElement(HelperText, { helperText: props.helperText }));
|
4805
4820
|
};
|
@@ -4859,12 +4874,10 @@ var CodeConfirmation = ({
|
|
4859
4874
|
{
|
4860
4875
|
noValidate: true,
|
4861
4876
|
onSubmit: handleSubmit((e) => {
|
4862
|
-
if (props.
|
4863
|
-
return props.
|
4877
|
+
if (props.onConfirm) {
|
4878
|
+
return props.onConfirm(e);
|
4864
4879
|
} else {
|
4865
|
-
console.log(
|
4866
|
-
"Form is submitted but handleConfirm prop is missing"
|
4867
|
-
);
|
4880
|
+
console.log("Form is submitted but onConfirm prop is missing");
|
4868
4881
|
}
|
4869
4882
|
})
|
4870
4883
|
},
|
@@ -4892,12 +4905,28 @@ var CodeConfirmation = ({
|
|
4892
4905
|
className: "clickable-link",
|
4893
4906
|
onClick: () => {
|
4894
4907
|
startResendTimer();
|
4895
|
-
props.
|
4908
|
+
props.onResend();
|
4896
4909
|
}
|
4897
4910
|
},
|
4898
4911
|
((_i = props.texts) == null ? void 0 : _i.resendCode) || "Click to resend"
|
4899
4912
|
)),
|
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(
|
4913
|
+
/* @__PURE__ */ import_react24.default.createElement("div", { className: "hawa-mt-4 hawa-grid hawa-grid-cols-2 hawa-gap-2" }, /* @__PURE__ */ import_react24.default.createElement(
|
4914
|
+
Button,
|
4915
|
+
{
|
4916
|
+
type: "button",
|
4917
|
+
onClick: () => {
|
4918
|
+
if (props.onCancel) {
|
4919
|
+
return props.onCancel();
|
4920
|
+
} else {
|
4921
|
+
console.log(
|
4922
|
+
"Cancel button clicked but onCancel prop is missing"
|
4923
|
+
);
|
4924
|
+
}
|
4925
|
+
},
|
4926
|
+
variant: "outline"
|
4927
|
+
},
|
4928
|
+
((_j = props.texts) == null ? void 0 : _j.cancel) || "Cancel"
|
4929
|
+
), /* @__PURE__ */ import_react24.default.createElement(Button, { isLoading: props.confirmLoading }, ((_k = props.texts) == null ? void 0 : _k.confirm) || "Confirm"))
|
4901
4930
|
)));
|
4902
4931
|
};
|
4903
4932
|
// Annotate the CommonJS export names for ESM import in node:
|
@@ -4915,7 +4944,7 @@ var CodeConfirmation = ({
|
|
4915
4944
|
|
4916
4945
|
lucide-react/dist/esm/shared/src/utils.js:
|
4917
4946
|
(**
|
4918
|
-
* @license lucide-react v0.
|
4947
|
+
* @license lucide-react v0.424.0 - ISC
|
4919
4948
|
*
|
4920
4949
|
* This source code is licensed under the ISC license.
|
4921
4950
|
* See the LICENSE file in the root directory of this source tree.
|
@@ -4923,7 +4952,7 @@ lucide-react/dist/esm/shared/src/utils.js:
|
|
4923
4952
|
|
4924
4953
|
lucide-react/dist/esm/defaultAttributes.js:
|
4925
4954
|
(**
|
4926
|
-
* @license lucide-react v0.
|
4955
|
+
* @license lucide-react v0.424.0 - ISC
|
4927
4956
|
*
|
4928
4957
|
* This source code is licensed under the ISC license.
|
4929
4958
|
* See the LICENSE file in the root directory of this source tree.
|
@@ -4931,7 +4960,7 @@ lucide-react/dist/esm/defaultAttributes.js:
|
|
4931
4960
|
|
4932
4961
|
lucide-react/dist/esm/Icon.js:
|
4933
4962
|
(**
|
4934
|
-
* @license lucide-react v0.
|
4963
|
+
* @license lucide-react v0.424.0 - ISC
|
4935
4964
|
*
|
4936
4965
|
* This source code is licensed under the ISC license.
|
4937
4966
|
* See the LICENSE file in the root directory of this source tree.
|
@@ -4939,7 +4968,7 @@ lucide-react/dist/esm/Icon.js:
|
|
4939
4968
|
|
4940
4969
|
lucide-react/dist/esm/createLucideIcon.js:
|
4941
4970
|
(**
|
4942
|
-
* @license lucide-react v0.
|
4971
|
+
* @license lucide-react v0.424.0 - ISC
|
4943
4972
|
*
|
4944
4973
|
* This source code is licensed under the ISC license.
|
4945
4974
|
* See the LICENSE file in the root directory of this source tree.
|
@@ -4947,7 +4976,7 @@ lucide-react/dist/esm/createLucideIcon.js:
|
|
4947
4976
|
|
4948
4977
|
lucide-react/dist/esm/icons/dot.js:
|
4949
4978
|
(**
|
4950
|
-
* @license lucide-react v0.
|
4979
|
+
* @license lucide-react v0.424.0 - ISC
|
4951
4980
|
*
|
4952
4981
|
* This source code is licensed under the ISC license.
|
4953
4982
|
* See the LICENSE file in the root directory of this source tree.
|
@@ -4955,7 +4984,7 @@ lucide-react/dist/esm/icons/dot.js:
|
|
4955
4984
|
|
4956
4985
|
lucide-react/dist/esm/lucide-react.js:
|
4957
4986
|
(**
|
4958
|
-
* @license lucide-react v0.
|
4987
|
+
* @license lucide-react v0.424.0 - ISC
|
4959
4988
|
*
|
4960
4989
|
* This source code is licensed under the ISC license.
|
4961
4990
|
* 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-D3B3MKLS.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.
|
@@ -750,7 +750,8 @@ var Radio = (0, import_react4.forwardRef)(
|
|
750
750
|
"hawa-select-none hawa-whitespace-nowrap hawa-rounded hawa-border hawa-text-center hawa-font-medium hawa-h-[40px]",
|
751
751
|
orientationStyle[orientation],
|
752
752
|
widthStyle[width],
|
753
|
-
tabsContainerClassName
|
753
|
+
tabsContainerClassName,
|
754
|
+
props.direction === "rtl" ? "hawa-flex-row-reverse" : ""
|
754
755
|
)
|
755
756
|
},
|
756
757
|
(_b = props.options) == null ? void 0 : _b.map((opt, o) => {
|
@@ -1540,13 +1541,21 @@ var Select = ({
|
|
1540
1541
|
children
|
1541
1542
|
);
|
1542
1543
|
};
|
1543
|
-
const Option = ({
|
1544
|
+
const Option = ({
|
1545
|
+
children,
|
1546
|
+
innerProps,
|
1547
|
+
innerRef,
|
1548
|
+
isFocused,
|
1549
|
+
isSelected
|
1550
|
+
}) => {
|
1544
1551
|
return /* @__PURE__ */ import_react12.default.createElement(
|
1545
1552
|
"div",
|
1546
1553
|
{
|
1547
1554
|
ref: innerRef,
|
1548
1555
|
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
|
1556
|
+
"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",
|
1557
|
+
isFocused ? "hawa-bg-accent hawa-text-bg-accent-foreground" : "hover:hawa-bg-accent hover:hawa-text-accent-foreground",
|
1558
|
+
isSelected && "hawa-bg-primary hawa-text-primary-foreground"
|
1550
1559
|
),
|
1551
1560
|
...innerProps
|
1552
1561
|
},
|
@@ -1603,15 +1612,20 @@ var Select = ({
|
|
1603
1612
|
container: () => cn(
|
1604
1613
|
selectContainerStyles,
|
1605
1614
|
props.phoneCode && phoneCodeStyles,
|
1606
|
-
props.disabled ? "hawa-cursor-not-allowed" : "hawa-cursor-pointer",
|
1607
1615
|
props.isMulti && "hawa-ps-0 "
|
1608
1616
|
),
|
1609
|
-
placeholder: () =>
|
1617
|
+
placeholder: () => cn(
|
1618
|
+
selectPlaceholderStyles,
|
1619
|
+
props.disabled && "hawa-text-muted-foreground"
|
1620
|
+
),
|
1610
1621
|
valueContainer: () => "hawa-text-foreground hawa-px-1 ",
|
1611
|
-
singleValue: () =>
|
1622
|
+
singleValue: () => cn(
|
1623
|
+
props.disabled ? "hawa-text-muted-foreground hawa-opacity-30" : "hawa-text-foreground"
|
1624
|
+
),
|
1612
1625
|
indicatorsContainer: () => cn(
|
1613
1626
|
selectIndicatorContainerStyles,
|
1614
|
-
props.hideIndicator ? "hawa-invisible" : "hawa-px-1"
|
1627
|
+
props.hideIndicator ? "hawa-invisible" : "hawa-px-1",
|
1628
|
+
props.disabled && "hawa-opacity-30"
|
1615
1629
|
)
|
1616
1630
|
},
|
1617
1631
|
unstyled: true,
|
@@ -1619,12 +1633,6 @@ var Select = ({
|
|
1619
1633
|
components: props.hideIndicator ? { Option, Menu, IndicatorsContainer: () => null } : {
|
1620
1634
|
Option,
|
1621
1635
|
Menu,
|
1622
|
-
// Control: (e) => (
|
1623
|
-
// <div
|
1624
|
-
// className={cn(e.className, "hawa-flex hawa-flex-row")}
|
1625
|
-
// {...e}
|
1626
|
-
// />
|
1627
|
-
// ),
|
1628
1636
|
ValueContainer: (e) => /* @__PURE__ */ import_react12.default.createElement(
|
1629
1637
|
"div",
|
1630
1638
|
{
|
@@ -1647,6 +1655,7 @@ var Select = ({
|
|
1647
1655
|
options: props.options,
|
1648
1656
|
getOptionLabel: props.getOptionLabel,
|
1649
1657
|
defaultValue: props.defaultValue,
|
1658
|
+
value: props.value,
|
1650
1659
|
placeholder: props.placeholder,
|
1651
1660
|
isDisabled: props.disabled,
|
1652
1661
|
isClearable: props.isClearable,
|
@@ -4,11 +4,11 @@ import {
|
|
4
4
|
} from "../../chunk-FIUKVRL5.mjs";
|
5
5
|
import {
|
6
6
|
Select
|
7
|
-
} from "../../chunk-
|
7
|
+
} from "../../chunk-D3B3MKLS.mjs";
|
8
8
|
import {
|
9
9
|
Popover,
|
10
10
|
Radio
|
11
|
-
} from "../../chunk-
|
11
|
+
} from "../../chunk-YABFWOF3.mjs";
|
12
12
|
import {
|
13
13
|
BadEmoji,
|
14
14
|
GoodEmoji,
|
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;
|