@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
package/dist/elements/index.js
CHANGED
@@ -5265,13 +5265,21 @@ var Select = ({
|
|
5265
5265
|
children
|
5266
5266
|
);
|
5267
5267
|
};
|
5268
|
-
const Option = ({
|
5268
|
+
const Option = ({
|
5269
|
+
children,
|
5270
|
+
innerProps,
|
5271
|
+
innerRef,
|
5272
|
+
isFocused,
|
5273
|
+
isSelected
|
5274
|
+
}) => {
|
5269
5275
|
return /* @__PURE__ */ import_react35.default.createElement(
|
5270
5276
|
"div",
|
5271
5277
|
{
|
5272
5278
|
ref: innerRef,
|
5273
5279
|
className: cn(
|
5274
|
-
"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
|
5280
|
+
"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",
|
5281
|
+
isFocused ? "hawa-bg-accent hawa-text-bg-accent-foreground" : "hover:hawa-bg-accent hover:hawa-text-accent-foreground",
|
5282
|
+
isSelected && "hawa-bg-primary hawa-text-primary-foreground"
|
5275
5283
|
),
|
5276
5284
|
...innerProps
|
5277
5285
|
},
|
@@ -5328,15 +5336,20 @@ var Select = ({
|
|
5328
5336
|
container: () => cn(
|
5329
5337
|
selectContainerStyles,
|
5330
5338
|
props.phoneCode && phoneCodeStyles,
|
5331
|
-
props.disabled ? "hawa-cursor-not-allowed" : "hawa-cursor-pointer",
|
5332
5339
|
props.isMulti && "hawa-ps-0 "
|
5333
5340
|
),
|
5334
|
-
placeholder: () =>
|
5341
|
+
placeholder: () => cn(
|
5342
|
+
selectPlaceholderStyles,
|
5343
|
+
props.disabled && "hawa-text-muted-foreground"
|
5344
|
+
),
|
5335
5345
|
valueContainer: () => "hawa-text-foreground hawa-px-1 ",
|
5336
|
-
singleValue: () =>
|
5346
|
+
singleValue: () => cn(
|
5347
|
+
props.disabled ? "hawa-text-muted-foreground hawa-opacity-30" : "hawa-text-foreground"
|
5348
|
+
),
|
5337
5349
|
indicatorsContainer: () => cn(
|
5338
5350
|
selectIndicatorContainerStyles,
|
5339
|
-
props.hideIndicator ? "hawa-invisible" : "hawa-px-1"
|
5351
|
+
props.hideIndicator ? "hawa-invisible" : "hawa-px-1",
|
5352
|
+
props.disabled && "hawa-opacity-30"
|
5340
5353
|
)
|
5341
5354
|
},
|
5342
5355
|
unstyled: true,
|
@@ -5344,12 +5357,6 @@ var Select = ({
|
|
5344
5357
|
components: props.hideIndicator ? { Option, Menu, IndicatorsContainer: () => null } : {
|
5345
5358
|
Option,
|
5346
5359
|
Menu,
|
5347
|
-
// Control: (e) => (
|
5348
|
-
// <div
|
5349
|
-
// className={cn(e.className, "hawa-flex hawa-flex-row")}
|
5350
|
-
// {...e}
|
5351
|
-
// />
|
5352
|
-
// ),
|
5353
5360
|
ValueContainer: (e) => /* @__PURE__ */ import_react35.default.createElement(
|
5354
5361
|
"div",
|
5355
5362
|
{
|
@@ -7421,19 +7428,19 @@ var PhoneInput = ({
|
|
7421
7428
|
var React50 = __toESM(require("react"));
|
7422
7429
|
var import_input_otp = require("input-otp");
|
7423
7430
|
|
7424
|
-
// ../../node_modules/.pnpm/lucide-react@0.
|
7431
|
+
// ../../node_modules/.pnpm/lucide-react@0.424.0_react@18.3.1/node_modules/lucide-react/dist/esm/createLucideIcon.js
|
7425
7432
|
var import_react41 = require("react");
|
7426
7433
|
|
7427
|
-
// ../../node_modules/.pnpm/lucide-react@0.
|
7434
|
+
// ../../node_modules/.pnpm/lucide-react@0.424.0_react@18.3.1/node_modules/lucide-react/dist/esm/shared/src/utils.js
|
7428
7435
|
var toKebabCase = (string) => string.replace(/([a-z0-9])([A-Z])/g, "$1-$2").toLowerCase();
|
7429
7436
|
var mergeClasses = (...classes) => classes.filter((className, index, array) => {
|
7430
7437
|
return Boolean(className) && array.indexOf(className) === index;
|
7431
7438
|
}).join(" ");
|
7432
7439
|
|
7433
|
-
// ../../node_modules/.pnpm/lucide-react@0.
|
7440
|
+
// ../../node_modules/.pnpm/lucide-react@0.424.0_react@18.3.1/node_modules/lucide-react/dist/esm/Icon.js
|
7434
7441
|
var import_react40 = require("react");
|
7435
7442
|
|
7436
|
-
// ../../node_modules/.pnpm/lucide-react@0.
|
7443
|
+
// ../../node_modules/.pnpm/lucide-react@0.424.0_react@18.3.1/node_modules/lucide-react/dist/esm/defaultAttributes.js
|
7437
7444
|
var defaultAttributes = {
|
7438
7445
|
xmlns: "http://www.w3.org/2000/svg",
|
7439
7446
|
width: 24,
|
@@ -7446,7 +7453,7 @@ var defaultAttributes = {
|
|
7446
7453
|
strokeLinejoin: "round"
|
7447
7454
|
};
|
7448
7455
|
|
7449
|
-
// ../../node_modules/.pnpm/lucide-react@0.
|
7456
|
+
// ../../node_modules/.pnpm/lucide-react@0.424.0_react@18.3.1/node_modules/lucide-react/dist/esm/Icon.js
|
7450
7457
|
var Icon = (0, import_react40.forwardRef)(
|
7451
7458
|
({
|
7452
7459
|
color = "currentColor",
|
@@ -7478,7 +7485,7 @@ var Icon = (0, import_react40.forwardRef)(
|
|
7478
7485
|
}
|
7479
7486
|
);
|
7480
7487
|
|
7481
|
-
// ../../node_modules/.pnpm/lucide-react@0.
|
7488
|
+
// ../../node_modules/.pnpm/lucide-react@0.424.0_react@18.3.1/node_modules/lucide-react/dist/esm/createLucideIcon.js
|
7482
7489
|
var createLucideIcon = (iconName, iconNode) => {
|
7483
7490
|
const Component = (0, import_react41.forwardRef)(
|
7484
7491
|
({ className, ...props }, ref) => (0, import_react41.createElement)(Icon, {
|
@@ -7492,7 +7499,7 @@ var createLucideIcon = (iconName, iconNode) => {
|
|
7492
7499
|
return Component;
|
7493
7500
|
};
|
7494
7501
|
|
7495
|
-
// ../../node_modules/.pnpm/lucide-react@0.
|
7502
|
+
// ../../node_modules/.pnpm/lucide-react@0.424.0_react@18.3.1/node_modules/lucide-react/dist/esm/icons/dot.js
|
7496
7503
|
var Dot = createLucideIcon("Dot", [
|
7497
7504
|
["circle", { cx: "12.1", cy: "12.1", r: "1", key: "18d7e5" }]
|
7498
7505
|
]);
|
@@ -7549,12 +7556,19 @@ var PinInput = ({
|
|
7549
7556
|
const clampedSeparatorPosition = Math.min(separatorPosition, maxLength);
|
7550
7557
|
const firstGroupLength = clampedSeparatorPosition > 0 ? clampedSeparatorPosition : 0;
|
7551
7558
|
const secondGroupLength = maxLength - firstGroupLength;
|
7552
|
-
return /* @__PURE__ */ React50.createElement("div", { className: "hawa-flex hawa-flex-col hawa-gap-2" }, /* @__PURE__ */ React50.createElement(PinInputRoot, { ...props }, firstGroupLength > 0 && /* @__PURE__ */ React50.createElement(PinInputGroup, { className: "hawa-w-full
|
7559
|
+
return /* @__PURE__ */ React50.createElement("div", { className: "hawa-flex hawa-flex-col hawa-gap-2" }, /* @__PURE__ */ React50.createElement(PinInputRoot, { ...props }, firstGroupLength > 0 && /* @__PURE__ */ React50.createElement(PinInputGroup, { className: "hawa-w-full hawa-gap-2" }, [...Array(firstGroupLength)].map((_, index) => /* @__PURE__ */ React50.createElement(
|
7560
|
+
PinInputSlot,
|
7561
|
+
{
|
7562
|
+
key: index,
|
7563
|
+
index,
|
7564
|
+
className: "hawa-w-full hawa-border"
|
7565
|
+
}
|
7566
|
+
))), separatorPosition > 0 && separatorPosition < props.maxLength && /* @__PURE__ */ React50.createElement(PinInputSeperator, null), secondGroupLength > 0 && /* @__PURE__ */ React50.createElement(PinInputGroup, { className: "hawa-w-full hawa-gap-2" }, [...Array(secondGroupLength)].map((_, index) => /* @__PURE__ */ React50.createElement(
|
7553
7567
|
PinInputSlot,
|
7554
7568
|
{
|
7555
7569
|
key: index + firstGroupLength,
|
7556
7570
|
index: index + firstGroupLength,
|
7557
|
-
className: "hawa-w-full"
|
7571
|
+
className: "hawa-w-full hawa-border"
|
7558
7572
|
}
|
7559
7573
|
)))), /* @__PURE__ */ React50.createElement(HelperText, { helperText: props.helperText }));
|
7560
7574
|
};
|
@@ -9038,7 +9052,7 @@ var PhoneMockup = ({
|
|
9038
9052
|
|
9039
9053
|
lucide-react/dist/esm/shared/src/utils.js:
|
9040
9054
|
(**
|
9041
|
-
* @license lucide-react v0.
|
9055
|
+
* @license lucide-react v0.424.0 - ISC
|
9042
9056
|
*
|
9043
9057
|
* This source code is licensed under the ISC license.
|
9044
9058
|
* See the LICENSE file in the root directory of this source tree.
|
@@ -9046,7 +9060,7 @@ lucide-react/dist/esm/shared/src/utils.js:
|
|
9046
9060
|
|
9047
9061
|
lucide-react/dist/esm/defaultAttributes.js:
|
9048
9062
|
(**
|
9049
|
-
* @license lucide-react v0.
|
9063
|
+
* @license lucide-react v0.424.0 - ISC
|
9050
9064
|
*
|
9051
9065
|
* This source code is licensed under the ISC license.
|
9052
9066
|
* See the LICENSE file in the root directory of this source tree.
|
@@ -9054,7 +9068,7 @@ lucide-react/dist/esm/defaultAttributes.js:
|
|
9054
9068
|
|
9055
9069
|
lucide-react/dist/esm/Icon.js:
|
9056
9070
|
(**
|
9057
|
-
* @license lucide-react v0.
|
9071
|
+
* @license lucide-react v0.424.0 - ISC
|
9058
9072
|
*
|
9059
9073
|
* This source code is licensed under the ISC license.
|
9060
9074
|
* See the LICENSE file in the root directory of this source tree.
|
@@ -9062,7 +9076,7 @@ lucide-react/dist/esm/Icon.js:
|
|
9062
9076
|
|
9063
9077
|
lucide-react/dist/esm/createLucideIcon.js:
|
9064
9078
|
(**
|
9065
|
-
* @license lucide-react v0.
|
9079
|
+
* @license lucide-react v0.424.0 - ISC
|
9066
9080
|
*
|
9067
9081
|
* This source code is licensed under the ISC license.
|
9068
9082
|
* See the LICENSE file in the root directory of this source tree.
|
@@ -9070,7 +9084,7 @@ lucide-react/dist/esm/createLucideIcon.js:
|
|
9070
9084
|
|
9071
9085
|
lucide-react/dist/esm/icons/dot.js:
|
9072
9086
|
(**
|
9073
|
-
* @license lucide-react v0.
|
9087
|
+
* @license lucide-react v0.424.0 - ISC
|
9074
9088
|
*
|
9075
9089
|
* This source code is licensed under the ISC license.
|
9076
9090
|
* See the LICENSE file in the root directory of this source tree.
|
@@ -9078,7 +9092,7 @@ lucide-react/dist/esm/icons/dot.js:
|
|
9078
9092
|
|
9079
9093
|
lucide-react/dist/esm/lucide-react.js:
|
9080
9094
|
(**
|
9081
|
-
* @license lucide-react v0.
|
9095
|
+
* @license lucide-react v0.424.0 - ISC
|
9082
9096
|
*
|
9083
9097
|
* This source code is licensed under the ISC license.
|
9084
9098
|
* See the LICENSE file in the root directory of this source tree.
|
package/dist/elements/index.mjs
CHANGED
package/dist/index.css
CHANGED
package/dist/index.d.mts
CHANGED
@@ -1877,8 +1877,9 @@ type TConfirmation = {
|
|
1877
1877
|
errorText?: any;
|
1878
1878
|
phoneNumber?: string;
|
1879
1879
|
confirmLoading?: boolean;
|
1880
|
-
|
1881
|
-
|
1880
|
+
onConfirm?: any;
|
1881
|
+
onResend?: any;
|
1882
|
+
onCancel?: any;
|
1882
1883
|
codeLength?: number;
|
1883
1884
|
};
|
1884
1885
|
declare const CodeConfirmation: FC<TConfirmation>;
|
@@ -2032,12 +2033,14 @@ type ContactFormProps = {
|
|
2032
2033
|
cardless?: boolean;
|
2033
2034
|
formId?: string;
|
2034
2035
|
formAutoComplete?: "on" | "off";
|
2036
|
+
clearOnSubmit?: boolean;
|
2035
2037
|
size?: "sm" | "default";
|
2036
2038
|
onSubmit: (e: ContactFormData) => void;
|
2037
2039
|
customFields?: CustomField[];
|
2038
2040
|
showSuccess?: boolean;
|
2039
2041
|
classNames?: {
|
2040
2042
|
submitButton?: string;
|
2043
|
+
container?: string;
|
2041
2044
|
};
|
2042
2045
|
texts?: {
|
2043
2046
|
submit: string;
|
package/dist/index.d.ts
CHANGED
@@ -1877,8 +1877,9 @@ type TConfirmation = {
|
|
1877
1877
|
errorText?: any;
|
1878
1878
|
phoneNumber?: string;
|
1879
1879
|
confirmLoading?: boolean;
|
1880
|
-
|
1881
|
-
|
1880
|
+
onConfirm?: any;
|
1881
|
+
onResend?: any;
|
1882
|
+
onCancel?: any;
|
1882
1883
|
codeLength?: number;
|
1883
1884
|
};
|
1884
1885
|
declare const CodeConfirmation: FC<TConfirmation>;
|
@@ -2032,12 +2033,14 @@ type ContactFormProps = {
|
|
2032
2033
|
cardless?: boolean;
|
2033
2034
|
formId?: string;
|
2034
2035
|
formAutoComplete?: "on" | "off";
|
2036
|
+
clearOnSubmit?: boolean;
|
2035
2037
|
size?: "sm" | "default";
|
2036
2038
|
onSubmit: (e: ContactFormData) => void;
|
2037
2039
|
customFields?: CustomField[];
|
2038
2040
|
showSuccess?: boolean;
|
2039
2041
|
classNames?: {
|
2040
2042
|
submitButton?: string;
|
2043
|
+
container?: string;
|
2041
2044
|
};
|
2042
2045
|
texts?: {
|
2043
2046
|
submit: string;
|
package/dist/index.js
CHANGED
@@ -5792,13 +5792,21 @@ var Select = ({
|
|
5792
5792
|
children
|
5793
5793
|
);
|
5794
5794
|
};
|
5795
|
-
const Option = ({
|
5795
|
+
const Option = ({
|
5796
|
+
children,
|
5797
|
+
innerProps,
|
5798
|
+
innerRef,
|
5799
|
+
isFocused,
|
5800
|
+
isSelected
|
5801
|
+
}) => {
|
5796
5802
|
return /* @__PURE__ */ import_react35.default.createElement(
|
5797
5803
|
"div",
|
5798
5804
|
{
|
5799
5805
|
ref: innerRef,
|
5800
5806
|
className: cn(
|
5801
|
-
"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
|
5807
|
+
"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",
|
5808
|
+
isFocused ? "hawa-bg-accent hawa-text-bg-accent-foreground" : "hover:hawa-bg-accent hover:hawa-text-accent-foreground",
|
5809
|
+
isSelected && "hawa-bg-primary hawa-text-primary-foreground"
|
5802
5810
|
),
|
5803
5811
|
...innerProps
|
5804
5812
|
},
|
@@ -5855,15 +5863,20 @@ var Select = ({
|
|
5855
5863
|
container: () => cn(
|
5856
5864
|
selectContainerStyles,
|
5857
5865
|
props.phoneCode && phoneCodeStyles,
|
5858
|
-
props.disabled ? "hawa-cursor-not-allowed" : "hawa-cursor-pointer",
|
5859
5866
|
props.isMulti && "hawa-ps-0 "
|
5860
5867
|
),
|
5861
|
-
placeholder: () =>
|
5868
|
+
placeholder: () => cn(
|
5869
|
+
selectPlaceholderStyles,
|
5870
|
+
props.disabled && "hawa-text-muted-foreground"
|
5871
|
+
),
|
5862
5872
|
valueContainer: () => "hawa-text-foreground hawa-px-1 ",
|
5863
|
-
singleValue: () =>
|
5873
|
+
singleValue: () => cn(
|
5874
|
+
props.disabled ? "hawa-text-muted-foreground hawa-opacity-30" : "hawa-text-foreground"
|
5875
|
+
),
|
5864
5876
|
indicatorsContainer: () => cn(
|
5865
5877
|
selectIndicatorContainerStyles,
|
5866
|
-
props.hideIndicator ? "hawa-invisible" : "hawa-px-1"
|
5878
|
+
props.hideIndicator ? "hawa-invisible" : "hawa-px-1",
|
5879
|
+
props.disabled && "hawa-opacity-30"
|
5867
5880
|
)
|
5868
5881
|
},
|
5869
5882
|
unstyled: true,
|
@@ -5871,12 +5884,6 @@ var Select = ({
|
|
5871
5884
|
components: props.hideIndicator ? { Option, Menu: Menu2, IndicatorsContainer: () => null } : {
|
5872
5885
|
Option,
|
5873
5886
|
Menu: Menu2,
|
5874
|
-
// Control: (e) => (
|
5875
|
-
// <div
|
5876
|
-
// className={cn(e.className, "hawa-flex hawa-flex-row")}
|
5877
|
-
// {...e}
|
5878
|
-
// />
|
5879
|
-
// ),
|
5880
5887
|
ValueContainer: (e) => /* @__PURE__ */ import_react35.default.createElement(
|
5881
5888
|
"div",
|
5882
5889
|
{
|
@@ -7948,19 +7955,19 @@ var PhoneInput = ({
|
|
7948
7955
|
var React50 = __toESM(require("react"));
|
7949
7956
|
var import_input_otp = require("input-otp");
|
7950
7957
|
|
7951
|
-
// ../../node_modules/.pnpm/lucide-react@0.
|
7958
|
+
// ../../node_modules/.pnpm/lucide-react@0.424.0_react@18.3.1/node_modules/lucide-react/dist/esm/createLucideIcon.js
|
7952
7959
|
var import_react41 = require("react");
|
7953
7960
|
|
7954
|
-
// ../../node_modules/.pnpm/lucide-react@0.
|
7961
|
+
// ../../node_modules/.pnpm/lucide-react@0.424.0_react@18.3.1/node_modules/lucide-react/dist/esm/shared/src/utils.js
|
7955
7962
|
var toKebabCase = (string9) => string9.replace(/([a-z0-9])([A-Z])/g, "$1-$2").toLowerCase();
|
7956
7963
|
var mergeClasses = (...classes) => classes.filter((className, index, array) => {
|
7957
7964
|
return Boolean(className) && array.indexOf(className) === index;
|
7958
7965
|
}).join(" ");
|
7959
7966
|
|
7960
|
-
// ../../node_modules/.pnpm/lucide-react@0.
|
7967
|
+
// ../../node_modules/.pnpm/lucide-react@0.424.0_react@18.3.1/node_modules/lucide-react/dist/esm/Icon.js
|
7961
7968
|
var import_react40 = require("react");
|
7962
7969
|
|
7963
|
-
// ../../node_modules/.pnpm/lucide-react@0.
|
7970
|
+
// ../../node_modules/.pnpm/lucide-react@0.424.0_react@18.3.1/node_modules/lucide-react/dist/esm/defaultAttributes.js
|
7964
7971
|
var defaultAttributes = {
|
7965
7972
|
xmlns: "http://www.w3.org/2000/svg",
|
7966
7973
|
width: 24,
|
@@ -7973,7 +7980,7 @@ var defaultAttributes = {
|
|
7973
7980
|
strokeLinejoin: "round"
|
7974
7981
|
};
|
7975
7982
|
|
7976
|
-
// ../../node_modules/.pnpm/lucide-react@0.
|
7983
|
+
// ../../node_modules/.pnpm/lucide-react@0.424.0_react@18.3.1/node_modules/lucide-react/dist/esm/Icon.js
|
7977
7984
|
var Icon = (0, import_react40.forwardRef)(
|
7978
7985
|
({
|
7979
7986
|
color = "currentColor",
|
@@ -8005,7 +8012,7 @@ var Icon = (0, import_react40.forwardRef)(
|
|
8005
8012
|
}
|
8006
8013
|
);
|
8007
8014
|
|
8008
|
-
// ../../node_modules/.pnpm/lucide-react@0.
|
8015
|
+
// ../../node_modules/.pnpm/lucide-react@0.424.0_react@18.3.1/node_modules/lucide-react/dist/esm/createLucideIcon.js
|
8009
8016
|
var createLucideIcon = (iconName, iconNode) => {
|
8010
8017
|
const Component = (0, import_react41.forwardRef)(
|
8011
8018
|
({ className, ...props }, ref) => (0, import_react41.createElement)(Icon, {
|
@@ -8019,7 +8026,7 @@ var createLucideIcon = (iconName, iconNode) => {
|
|
8019
8026
|
return Component;
|
8020
8027
|
};
|
8021
8028
|
|
8022
|
-
// ../../node_modules/.pnpm/lucide-react@0.
|
8029
|
+
// ../../node_modules/.pnpm/lucide-react@0.424.0_react@18.3.1/node_modules/lucide-react/dist/esm/icons/dot.js
|
8023
8030
|
var Dot = createLucideIcon("Dot", [
|
8024
8031
|
["circle", { cx: "12.1", cy: "12.1", r: "1", key: "18d7e5" }]
|
8025
8032
|
]);
|
@@ -8076,12 +8083,19 @@ var PinInput = ({
|
|
8076
8083
|
const clampedSeparatorPosition = Math.min(separatorPosition, maxLength);
|
8077
8084
|
const firstGroupLength = clampedSeparatorPosition > 0 ? clampedSeparatorPosition : 0;
|
8078
8085
|
const secondGroupLength = maxLength - firstGroupLength;
|
8079
|
-
return /* @__PURE__ */ React50.createElement("div", { className: "hawa-flex hawa-flex-col hawa-gap-2" }, /* @__PURE__ */ React50.createElement(PinInputRoot, { ...props }, firstGroupLength > 0 && /* @__PURE__ */ React50.createElement(PinInputGroup, { className: "hawa-w-full
|
8086
|
+
return /* @__PURE__ */ React50.createElement("div", { className: "hawa-flex hawa-flex-col hawa-gap-2" }, /* @__PURE__ */ React50.createElement(PinInputRoot, { ...props }, firstGroupLength > 0 && /* @__PURE__ */ React50.createElement(PinInputGroup, { className: "hawa-w-full hawa-gap-2" }, [...Array(firstGroupLength)].map((_, index) => /* @__PURE__ */ React50.createElement(
|
8087
|
+
PinInputSlot,
|
8088
|
+
{
|
8089
|
+
key: index,
|
8090
|
+
index,
|
8091
|
+
className: "hawa-w-full hawa-border"
|
8092
|
+
}
|
8093
|
+
))), separatorPosition > 0 && separatorPosition < props.maxLength && /* @__PURE__ */ React50.createElement(PinInputSeperator, null), secondGroupLength > 0 && /* @__PURE__ */ React50.createElement(PinInputGroup, { className: "hawa-w-full hawa-gap-2" }, [...Array(secondGroupLength)].map((_, index) => /* @__PURE__ */ React50.createElement(
|
8080
8094
|
PinInputSlot,
|
8081
8095
|
{
|
8082
8096
|
key: index + firstGroupLength,
|
8083
8097
|
index: index + firstGroupLength,
|
8084
|
-
className: "hawa-w-full"
|
8098
|
+
className: "hawa-w-full hawa-border"
|
8085
8099
|
}
|
8086
8100
|
)))), /* @__PURE__ */ React50.createElement(HelperText, { helperText: props.helperText }));
|
8087
8101
|
};
|
@@ -12019,12 +12033,10 @@ var CodeConfirmation = ({
|
|
12019
12033
|
{
|
12020
12034
|
noValidate: true,
|
12021
12035
|
onSubmit: handleSubmit((e) => {
|
12022
|
-
if (props.
|
12023
|
-
return props.
|
12036
|
+
if (props.onConfirm) {
|
12037
|
+
return props.onConfirm(e);
|
12024
12038
|
} else {
|
12025
|
-
console.log(
|
12026
|
-
"Form is submitted but handleConfirm prop is missing"
|
12027
|
-
);
|
12039
|
+
console.log("Form is submitted but onConfirm prop is missing");
|
12028
12040
|
}
|
12029
12041
|
})
|
12030
12042
|
},
|
@@ -12052,12 +12064,28 @@ var CodeConfirmation = ({
|
|
12052
12064
|
className: "clickable-link",
|
12053
12065
|
onClick: () => {
|
12054
12066
|
startResendTimer();
|
12055
|
-
props.
|
12067
|
+
props.onResend();
|
12056
12068
|
}
|
12057
12069
|
},
|
12058
12070
|
((_i = props.texts) == null ? void 0 : _i.resendCode) || "Click to resend"
|
12059
12071
|
)),
|
12060
|
-
/* @__PURE__ */ import_react74.default.createElement("div", { className: "hawa-mt-4 hawa-grid hawa-grid-cols-2 hawa-gap-2" }, /* @__PURE__ */ import_react74.default.createElement(
|
12072
|
+
/* @__PURE__ */ import_react74.default.createElement("div", { className: "hawa-mt-4 hawa-grid hawa-grid-cols-2 hawa-gap-2" }, /* @__PURE__ */ import_react74.default.createElement(
|
12073
|
+
Button,
|
12074
|
+
{
|
12075
|
+
type: "button",
|
12076
|
+
onClick: () => {
|
12077
|
+
if (props.onCancel) {
|
12078
|
+
return props.onCancel();
|
12079
|
+
} else {
|
12080
|
+
console.log(
|
12081
|
+
"Cancel button clicked but onCancel prop is missing"
|
12082
|
+
);
|
12083
|
+
}
|
12084
|
+
},
|
12085
|
+
variant: "outline"
|
12086
|
+
},
|
12087
|
+
((_j = props.texts) == null ? void 0 : _j.cancel) || "Cancel"
|
12088
|
+
), /* @__PURE__ */ import_react74.default.createElement(Button, { isLoading: props.confirmLoading }, ((_k = props.texts) == null ? void 0 : _k.confirm) || "Confirm"))
|
12061
12089
|
)));
|
12062
12090
|
};
|
12063
12091
|
|
@@ -12700,6 +12728,7 @@ var ContactForm = ({
|
|
12700
12728
|
onSubmit,
|
12701
12729
|
customFields,
|
12702
12730
|
classNames,
|
12731
|
+
clearOnSubmit = true,
|
12703
12732
|
...props
|
12704
12733
|
}) => {
|
12705
12734
|
var _a, _b, _c, _d, _e;
|
@@ -12743,8 +12772,11 @@ var ContactForm = ({
|
|
12743
12772
|
control,
|
12744
12773
|
handleSubmit,
|
12745
12774
|
formState: { errors },
|
12746
|
-
reset
|
12775
|
+
reset,
|
12776
|
+
getValues,
|
12777
|
+
trigger
|
12747
12778
|
} = (0, import_react_hook_form9.useForm)({
|
12779
|
+
mode: "all",
|
12748
12780
|
resolver: (0, import_zod8.zodResolver)(MainSchema),
|
12749
12781
|
defaultValues: {
|
12750
12782
|
name: "",
|
@@ -12753,10 +12785,16 @@ var ContactForm = ({
|
|
12753
12785
|
...customFieldsDefaultValues
|
12754
12786
|
}
|
12755
12787
|
});
|
12756
|
-
const
|
12788
|
+
const SubmitForm = async (data) => {
|
12789
|
+
const isValid = await trigger();
|
12790
|
+
if (!isValid) {
|
12791
|
+
return;
|
12792
|
+
}
|
12757
12793
|
if (onSubmit) {
|
12758
12794
|
onSubmit(data);
|
12759
|
-
|
12795
|
+
if (clearOnSubmit) {
|
12796
|
+
reset();
|
12797
|
+
}
|
12760
12798
|
} else {
|
12761
12799
|
console.log("Form is submitted but onSubmit prop is missing");
|
12762
12800
|
}
|
@@ -12766,7 +12804,8 @@ var ContactForm = ({
|
|
12766
12804
|
{
|
12767
12805
|
className: cn(
|
12768
12806
|
"hawa-w-full",
|
12769
|
-
cardless && "hawa-border-none hawa-bg-transparent hawa-shadow-none hawa-drop-shadow-none"
|
12807
|
+
cardless && "hawa-border-none hawa-bg-transparent hawa-shadow-none hawa-drop-shadow-none",
|
12808
|
+
classNames == null ? void 0 : classNames.container
|
12770
12809
|
),
|
12771
12810
|
style: cardless ? { boxShadow: "none" } : void 0
|
12772
12811
|
},
|
@@ -12774,7 +12813,7 @@ var ContactForm = ({
|
|
12774
12813
|
"form",
|
12775
12814
|
{
|
12776
12815
|
noValidate: true,
|
12777
|
-
onSubmit: handleSubmit(
|
12816
|
+
onSubmit: handleSubmit(SubmitForm),
|
12778
12817
|
className: "hawa-space-y-2",
|
12779
12818
|
id: formId,
|
12780
12819
|
autoComplete: formAutoComplete
|
@@ -12885,7 +12924,10 @@ var ContactForm = ({
|
|
12885
12924
|
textareaProps: {
|
12886
12925
|
placeholder: texts == null ? void 0 : texts.message.placeholder,
|
12887
12926
|
className: "hawa-min-h-20",
|
12888
|
-
...field
|
12927
|
+
...field,
|
12928
|
+
onKeyDown: getHotkeyHandler([
|
12929
|
+
["mod+enter", () => SubmitForm(getValues())]
|
12930
|
+
])
|
12889
12931
|
},
|
12890
12932
|
classNames: { textarea: "hawa-min-h-40 hawa-h-full" },
|
12891
12933
|
helperText: (_a2 = errors.message) == null ? void 0 : _a2.message
|
@@ -13851,7 +13893,7 @@ var Usage = (props) => {
|
|
13851
13893
|
|
13852
13894
|
lucide-react/dist/esm/shared/src/utils.js:
|
13853
13895
|
(**
|
13854
|
-
* @license lucide-react v0.
|
13896
|
+
* @license lucide-react v0.424.0 - ISC
|
13855
13897
|
*
|
13856
13898
|
* This source code is licensed under the ISC license.
|
13857
13899
|
* See the LICENSE file in the root directory of this source tree.
|
@@ -13859,7 +13901,7 @@ lucide-react/dist/esm/shared/src/utils.js:
|
|
13859
13901
|
|
13860
13902
|
lucide-react/dist/esm/defaultAttributes.js:
|
13861
13903
|
(**
|
13862
|
-
* @license lucide-react v0.
|
13904
|
+
* @license lucide-react v0.424.0 - ISC
|
13863
13905
|
*
|
13864
13906
|
* This source code is licensed under the ISC license.
|
13865
13907
|
* See the LICENSE file in the root directory of this source tree.
|
@@ -13867,7 +13909,7 @@ lucide-react/dist/esm/defaultAttributes.js:
|
|
13867
13909
|
|
13868
13910
|
lucide-react/dist/esm/Icon.js:
|
13869
13911
|
(**
|
13870
|
-
* @license lucide-react v0.
|
13912
|
+
* @license lucide-react v0.424.0 - ISC
|
13871
13913
|
*
|
13872
13914
|
* This source code is licensed under the ISC license.
|
13873
13915
|
* See the LICENSE file in the root directory of this source tree.
|
@@ -13875,7 +13917,7 @@ lucide-react/dist/esm/Icon.js:
|
|
13875
13917
|
|
13876
13918
|
lucide-react/dist/esm/createLucideIcon.js:
|
13877
13919
|
(**
|
13878
|
-
* @license lucide-react v0.
|
13920
|
+
* @license lucide-react v0.424.0 - ISC
|
13879
13921
|
*
|
13880
13922
|
* This source code is licensed under the ISC license.
|
13881
13923
|
* See the LICENSE file in the root directory of this source tree.
|
@@ -13883,7 +13925,7 @@ lucide-react/dist/esm/createLucideIcon.js:
|
|
13883
13925
|
|
13884
13926
|
lucide-react/dist/esm/icons/dot.js:
|
13885
13927
|
(**
|
13886
|
-
* @license lucide-react v0.
|
13928
|
+
* @license lucide-react v0.424.0 - ISC
|
13887
13929
|
*
|
13888
13930
|
* This source code is licensed under the ISC license.
|
13889
13931
|
* See the LICENSE file in the root directory of this source tree.
|
@@ -13891,7 +13933,7 @@ lucide-react/dist/esm/icons/dot.js:
|
|
13891
13933
|
|
13892
13934
|
lucide-react/dist/esm/lucide-react.js:
|
13893
13935
|
(**
|
13894
|
-
* @license lucide-react v0.
|
13936
|
+
* @license lucide-react v0.424.0 - ISC
|
13895
13937
|
*
|
13896
13938
|
* This source code is licensed under the ISC license.
|
13897
13939
|
* See the LICENSE file in the root directory of this source tree.
|