@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
package/dist/elements/index.js
CHANGED
@@ -3993,7 +3993,8 @@ var Radio = (0, import_react13.forwardRef)(
|
|
3993
3993
|
"hawa-select-none hawa-whitespace-nowrap hawa-rounded hawa-border hawa-text-center hawa-font-medium hawa-h-[40px]",
|
3994
3994
|
orientationStyle[orientation],
|
3995
3995
|
widthStyle[width],
|
3996
|
-
tabsContainerClassName
|
3996
|
+
tabsContainerClassName,
|
3997
|
+
props.direction === "rtl" ? "hawa-flex-row-reverse" : ""
|
3997
3998
|
)
|
3998
3999
|
},
|
3999
4000
|
(_b = props.options) == null ? void 0 : _b.map((opt, o) => {
|
@@ -5265,13 +5266,21 @@ var Select = ({
|
|
5265
5266
|
children
|
5266
5267
|
);
|
5267
5268
|
};
|
5268
|
-
const Option = ({
|
5269
|
+
const Option = ({
|
5270
|
+
children,
|
5271
|
+
innerProps,
|
5272
|
+
innerRef,
|
5273
|
+
isFocused,
|
5274
|
+
isSelected
|
5275
|
+
}) => {
|
5269
5276
|
return /* @__PURE__ */ import_react35.default.createElement(
|
5270
5277
|
"div",
|
5271
5278
|
{
|
5272
5279
|
ref: innerRef,
|
5273
5280
|
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
|
5281
|
+
"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",
|
5282
|
+
isFocused ? "hawa-bg-accent hawa-text-bg-accent-foreground" : "hover:hawa-bg-accent hover:hawa-text-accent-foreground",
|
5283
|
+
isSelected && "hawa-bg-primary hawa-text-primary-foreground"
|
5275
5284
|
),
|
5276
5285
|
...innerProps
|
5277
5286
|
},
|
@@ -5328,15 +5337,20 @@ var Select = ({
|
|
5328
5337
|
container: () => cn(
|
5329
5338
|
selectContainerStyles,
|
5330
5339
|
props.phoneCode && phoneCodeStyles,
|
5331
|
-
props.disabled ? "hawa-cursor-not-allowed" : "hawa-cursor-pointer",
|
5332
5340
|
props.isMulti && "hawa-ps-0 "
|
5333
5341
|
),
|
5334
|
-
placeholder: () =>
|
5342
|
+
placeholder: () => cn(
|
5343
|
+
selectPlaceholderStyles,
|
5344
|
+
props.disabled && "hawa-text-muted-foreground"
|
5345
|
+
),
|
5335
5346
|
valueContainer: () => "hawa-text-foreground hawa-px-1 ",
|
5336
|
-
singleValue: () =>
|
5347
|
+
singleValue: () => cn(
|
5348
|
+
props.disabled ? "hawa-text-muted-foreground hawa-opacity-30" : "hawa-text-foreground"
|
5349
|
+
),
|
5337
5350
|
indicatorsContainer: () => cn(
|
5338
5351
|
selectIndicatorContainerStyles,
|
5339
|
-
props.hideIndicator ? "hawa-invisible" : "hawa-px-1"
|
5352
|
+
props.hideIndicator ? "hawa-invisible" : "hawa-px-1",
|
5353
|
+
props.disabled && "hawa-opacity-30"
|
5340
5354
|
)
|
5341
5355
|
},
|
5342
5356
|
unstyled: true,
|
@@ -5344,12 +5358,6 @@ var Select = ({
|
|
5344
5358
|
components: props.hideIndicator ? { Option, Menu, IndicatorsContainer: () => null } : {
|
5345
5359
|
Option,
|
5346
5360
|
Menu,
|
5347
|
-
// Control: (e) => (
|
5348
|
-
// <div
|
5349
|
-
// className={cn(e.className, "hawa-flex hawa-flex-row")}
|
5350
|
-
// {...e}
|
5351
|
-
// />
|
5352
|
-
// ),
|
5353
5361
|
ValueContainer: (e) => /* @__PURE__ */ import_react35.default.createElement(
|
5354
5362
|
"div",
|
5355
5363
|
{
|
@@ -5372,6 +5380,7 @@ var Select = ({
|
|
5372
5380
|
options: props.options,
|
5373
5381
|
getOptionLabel: props.getOptionLabel,
|
5374
5382
|
defaultValue: props.defaultValue,
|
5383
|
+
value: props.value,
|
5375
5384
|
placeholder: props.placeholder,
|
5376
5385
|
isDisabled: props.disabled,
|
5377
5386
|
isClearable: props.isClearable,
|
@@ -7421,19 +7430,19 @@ var PhoneInput = ({
|
|
7421
7430
|
var React50 = __toESM(require("react"));
|
7422
7431
|
var import_input_otp = require("input-otp");
|
7423
7432
|
|
7424
|
-
// ../../node_modules/.pnpm/lucide-react@0.
|
7433
|
+
// ../../node_modules/.pnpm/lucide-react@0.424.0_react@18.3.1/node_modules/lucide-react/dist/esm/createLucideIcon.js
|
7425
7434
|
var import_react41 = require("react");
|
7426
7435
|
|
7427
|
-
// ../../node_modules/.pnpm/lucide-react@0.
|
7436
|
+
// ../../node_modules/.pnpm/lucide-react@0.424.0_react@18.3.1/node_modules/lucide-react/dist/esm/shared/src/utils.js
|
7428
7437
|
var toKebabCase = (string) => string.replace(/([a-z0-9])([A-Z])/g, "$1-$2").toLowerCase();
|
7429
7438
|
var mergeClasses = (...classes) => classes.filter((className, index, array) => {
|
7430
7439
|
return Boolean(className) && array.indexOf(className) === index;
|
7431
7440
|
}).join(" ");
|
7432
7441
|
|
7433
|
-
// ../../node_modules/.pnpm/lucide-react@0.
|
7442
|
+
// ../../node_modules/.pnpm/lucide-react@0.424.0_react@18.3.1/node_modules/lucide-react/dist/esm/Icon.js
|
7434
7443
|
var import_react40 = require("react");
|
7435
7444
|
|
7436
|
-
// ../../node_modules/.pnpm/lucide-react@0.
|
7445
|
+
// ../../node_modules/.pnpm/lucide-react@0.424.0_react@18.3.1/node_modules/lucide-react/dist/esm/defaultAttributes.js
|
7437
7446
|
var defaultAttributes = {
|
7438
7447
|
xmlns: "http://www.w3.org/2000/svg",
|
7439
7448
|
width: 24,
|
@@ -7446,7 +7455,7 @@ var defaultAttributes = {
|
|
7446
7455
|
strokeLinejoin: "round"
|
7447
7456
|
};
|
7448
7457
|
|
7449
|
-
// ../../node_modules/.pnpm/lucide-react@0.
|
7458
|
+
// ../../node_modules/.pnpm/lucide-react@0.424.0_react@18.3.1/node_modules/lucide-react/dist/esm/Icon.js
|
7450
7459
|
var Icon = (0, import_react40.forwardRef)(
|
7451
7460
|
({
|
7452
7461
|
color = "currentColor",
|
@@ -7478,7 +7487,7 @@ var Icon = (0, import_react40.forwardRef)(
|
|
7478
7487
|
}
|
7479
7488
|
);
|
7480
7489
|
|
7481
|
-
// ../../node_modules/.pnpm/lucide-react@0.
|
7490
|
+
// ../../node_modules/.pnpm/lucide-react@0.424.0_react@18.3.1/node_modules/lucide-react/dist/esm/createLucideIcon.js
|
7482
7491
|
var createLucideIcon = (iconName, iconNode) => {
|
7483
7492
|
const Component = (0, import_react41.forwardRef)(
|
7484
7493
|
({ className, ...props }, ref) => (0, import_react41.createElement)(Icon, {
|
@@ -7492,7 +7501,7 @@ var createLucideIcon = (iconName, iconNode) => {
|
|
7492
7501
|
return Component;
|
7493
7502
|
};
|
7494
7503
|
|
7495
|
-
// ../../node_modules/.pnpm/lucide-react@0.
|
7504
|
+
// ../../node_modules/.pnpm/lucide-react@0.424.0_react@18.3.1/node_modules/lucide-react/dist/esm/icons/dot.js
|
7496
7505
|
var Dot = createLucideIcon("Dot", [
|
7497
7506
|
["circle", { cx: "12.1", cy: "12.1", r: "1", key: "18d7e5" }]
|
7498
7507
|
]);
|
@@ -7549,12 +7558,19 @@ var PinInput = ({
|
|
7549
7558
|
const clampedSeparatorPosition = Math.min(separatorPosition, maxLength);
|
7550
7559
|
const firstGroupLength = clampedSeparatorPosition > 0 ? clampedSeparatorPosition : 0;
|
7551
7560
|
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
|
7561
|
+
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(
|
7562
|
+
PinInputSlot,
|
7563
|
+
{
|
7564
|
+
key: index,
|
7565
|
+
index,
|
7566
|
+
className: "hawa-w-full hawa-border"
|
7567
|
+
}
|
7568
|
+
))), 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
7569
|
PinInputSlot,
|
7554
7570
|
{
|
7555
7571
|
key: index + firstGroupLength,
|
7556
7572
|
index: index + firstGroupLength,
|
7557
|
-
className: "hawa-w-full"
|
7573
|
+
className: "hawa-w-full hawa-border"
|
7558
7574
|
}
|
7559
7575
|
)))), /* @__PURE__ */ React50.createElement(HelperText, { helperText: props.helperText }));
|
7560
7576
|
};
|
@@ -9038,7 +9054,7 @@ var PhoneMockup = ({
|
|
9038
9054
|
|
9039
9055
|
lucide-react/dist/esm/shared/src/utils.js:
|
9040
9056
|
(**
|
9041
|
-
* @license lucide-react v0.
|
9057
|
+
* @license lucide-react v0.424.0 - ISC
|
9042
9058
|
*
|
9043
9059
|
* This source code is licensed under the ISC license.
|
9044
9060
|
* See the LICENSE file in the root directory of this source tree.
|
@@ -9046,7 +9062,7 @@ lucide-react/dist/esm/shared/src/utils.js:
|
|
9046
9062
|
|
9047
9063
|
lucide-react/dist/esm/defaultAttributes.js:
|
9048
9064
|
(**
|
9049
|
-
* @license lucide-react v0.
|
9065
|
+
* @license lucide-react v0.424.0 - ISC
|
9050
9066
|
*
|
9051
9067
|
* This source code is licensed under the ISC license.
|
9052
9068
|
* See the LICENSE file in the root directory of this source tree.
|
@@ -9054,7 +9070,7 @@ lucide-react/dist/esm/defaultAttributes.js:
|
|
9054
9070
|
|
9055
9071
|
lucide-react/dist/esm/Icon.js:
|
9056
9072
|
(**
|
9057
|
-
* @license lucide-react v0.
|
9073
|
+
* @license lucide-react v0.424.0 - ISC
|
9058
9074
|
*
|
9059
9075
|
* This source code is licensed under the ISC license.
|
9060
9076
|
* See the LICENSE file in the root directory of this source tree.
|
@@ -9062,7 +9078,7 @@ lucide-react/dist/esm/Icon.js:
|
|
9062
9078
|
|
9063
9079
|
lucide-react/dist/esm/createLucideIcon.js:
|
9064
9080
|
(**
|
9065
|
-
* @license lucide-react v0.
|
9081
|
+
* @license lucide-react v0.424.0 - ISC
|
9066
9082
|
*
|
9067
9083
|
* This source code is licensed under the ISC license.
|
9068
9084
|
* See the LICENSE file in the root directory of this source tree.
|
@@ -9070,7 +9086,7 @@ lucide-react/dist/esm/createLucideIcon.js:
|
|
9070
9086
|
|
9071
9087
|
lucide-react/dist/esm/icons/dot.js:
|
9072
9088
|
(**
|
9073
|
-
* @license lucide-react v0.
|
9089
|
+
* @license lucide-react v0.424.0 - ISC
|
9074
9090
|
*
|
9075
9091
|
* This source code is licensed under the ISC license.
|
9076
9092
|
* See the LICENSE file in the root directory of this source tree.
|
@@ -9078,7 +9094,7 @@ lucide-react/dist/esm/icons/dot.js:
|
|
9078
9094
|
|
9079
9095
|
lucide-react/dist/esm/lucide-react.js:
|
9080
9096
|
(**
|
9081
|
-
* @license lucide-react v0.
|
9097
|
+
* @license lucide-react v0.424.0 - ISC
|
9082
9098
|
*
|
9083
9099
|
* This source code is licensed under the ISC license.
|
9084
9100
|
* See the LICENSE file in the root directory of this source tree.
|
package/dist/elements/index.mjs
CHANGED
package/dist/index.css
CHANGED
@@ -1,5 +1,5 @@
|
|
1
1
|
/*
|
2
|
-
! tailwindcss v3.4.
|
2
|
+
! tailwindcss v3.4.8 | MIT License | https://tailwindcss.com
|
3
3
|
*//*
|
4
4
|
1. Prevent padding and border from affecting element width. (https://github.com/mozdevs/cssremedy/issues/4)
|
5
5
|
2. Allow adding a border to an element by just adding a border-width. (https://github.com/tailwindcss/tailwindcss/pull/116)
|
@@ -3080,6 +3080,9 @@ input[type="number"]::-webkit-inner-spin-button,
|
|
3080
3080
|
.hawa-opacity-100 {
|
3081
3081
|
opacity: 1;
|
3082
3082
|
}
|
3083
|
+
.hawa-opacity-30 {
|
3084
|
+
opacity: 0.3;
|
3085
|
+
}
|
3083
3086
|
.hawa-opacity-50 {
|
3084
3087
|
opacity: 0.5;
|
3085
3088
|
}
|
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
@@ -4068,7 +4068,8 @@ var Radio = (0, import_react13.forwardRef)(
|
|
4068
4068
|
"hawa-select-none hawa-whitespace-nowrap hawa-rounded hawa-border hawa-text-center hawa-font-medium hawa-h-[40px]",
|
4069
4069
|
orientationStyle[orientation],
|
4070
4070
|
widthStyle[width],
|
4071
|
-
tabsContainerClassName
|
4071
|
+
tabsContainerClassName,
|
4072
|
+
props.direction === "rtl" ? "hawa-flex-row-reverse" : ""
|
4072
4073
|
)
|
4073
4074
|
},
|
4074
4075
|
(_b = props.options) == null ? void 0 : _b.map((opt, o) => {
|
@@ -5792,13 +5793,21 @@ var Select = ({
|
|
5792
5793
|
children
|
5793
5794
|
);
|
5794
5795
|
};
|
5795
|
-
const Option = ({
|
5796
|
+
const Option = ({
|
5797
|
+
children,
|
5798
|
+
innerProps,
|
5799
|
+
innerRef,
|
5800
|
+
isFocused,
|
5801
|
+
isSelected
|
5802
|
+
}) => {
|
5796
5803
|
return /* @__PURE__ */ import_react35.default.createElement(
|
5797
5804
|
"div",
|
5798
5805
|
{
|
5799
5806
|
ref: innerRef,
|
5800
5807
|
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
|
5808
|
+
"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",
|
5809
|
+
isFocused ? "hawa-bg-accent hawa-text-bg-accent-foreground" : "hover:hawa-bg-accent hover:hawa-text-accent-foreground",
|
5810
|
+
isSelected && "hawa-bg-primary hawa-text-primary-foreground"
|
5802
5811
|
),
|
5803
5812
|
...innerProps
|
5804
5813
|
},
|
@@ -5855,15 +5864,20 @@ var Select = ({
|
|
5855
5864
|
container: () => cn(
|
5856
5865
|
selectContainerStyles,
|
5857
5866
|
props.phoneCode && phoneCodeStyles,
|
5858
|
-
props.disabled ? "hawa-cursor-not-allowed" : "hawa-cursor-pointer",
|
5859
5867
|
props.isMulti && "hawa-ps-0 "
|
5860
5868
|
),
|
5861
|
-
placeholder: () =>
|
5869
|
+
placeholder: () => cn(
|
5870
|
+
selectPlaceholderStyles,
|
5871
|
+
props.disabled && "hawa-text-muted-foreground"
|
5872
|
+
),
|
5862
5873
|
valueContainer: () => "hawa-text-foreground hawa-px-1 ",
|
5863
|
-
singleValue: () =>
|
5874
|
+
singleValue: () => cn(
|
5875
|
+
props.disabled ? "hawa-text-muted-foreground hawa-opacity-30" : "hawa-text-foreground"
|
5876
|
+
),
|
5864
5877
|
indicatorsContainer: () => cn(
|
5865
5878
|
selectIndicatorContainerStyles,
|
5866
|
-
props.hideIndicator ? "hawa-invisible" : "hawa-px-1"
|
5879
|
+
props.hideIndicator ? "hawa-invisible" : "hawa-px-1",
|
5880
|
+
props.disabled && "hawa-opacity-30"
|
5867
5881
|
)
|
5868
5882
|
},
|
5869
5883
|
unstyled: true,
|
@@ -5871,12 +5885,6 @@ var Select = ({
|
|
5871
5885
|
components: props.hideIndicator ? { Option, Menu: Menu2, IndicatorsContainer: () => null } : {
|
5872
5886
|
Option,
|
5873
5887
|
Menu: Menu2,
|
5874
|
-
// Control: (e) => (
|
5875
|
-
// <div
|
5876
|
-
// className={cn(e.className, "hawa-flex hawa-flex-row")}
|
5877
|
-
// {...e}
|
5878
|
-
// />
|
5879
|
-
// ),
|
5880
5888
|
ValueContainer: (e) => /* @__PURE__ */ import_react35.default.createElement(
|
5881
5889
|
"div",
|
5882
5890
|
{
|
@@ -5899,6 +5907,7 @@ var Select = ({
|
|
5899
5907
|
options: props.options,
|
5900
5908
|
getOptionLabel: props.getOptionLabel,
|
5901
5909
|
defaultValue: props.defaultValue,
|
5910
|
+
value: props.value,
|
5902
5911
|
placeholder: props.placeholder,
|
5903
5912
|
isDisabled: props.disabled,
|
5904
5913
|
isClearable: props.isClearable,
|
@@ -7948,19 +7957,19 @@ var PhoneInput = ({
|
|
7948
7957
|
var React50 = __toESM(require("react"));
|
7949
7958
|
var import_input_otp = require("input-otp");
|
7950
7959
|
|
7951
|
-
// ../../node_modules/.pnpm/lucide-react@0.
|
7960
|
+
// ../../node_modules/.pnpm/lucide-react@0.424.0_react@18.3.1/node_modules/lucide-react/dist/esm/createLucideIcon.js
|
7952
7961
|
var import_react41 = require("react");
|
7953
7962
|
|
7954
|
-
// ../../node_modules/.pnpm/lucide-react@0.
|
7963
|
+
// ../../node_modules/.pnpm/lucide-react@0.424.0_react@18.3.1/node_modules/lucide-react/dist/esm/shared/src/utils.js
|
7955
7964
|
var toKebabCase = (string9) => string9.replace(/([a-z0-9])([A-Z])/g, "$1-$2").toLowerCase();
|
7956
7965
|
var mergeClasses = (...classes) => classes.filter((className, index, array) => {
|
7957
7966
|
return Boolean(className) && array.indexOf(className) === index;
|
7958
7967
|
}).join(" ");
|
7959
7968
|
|
7960
|
-
// ../../node_modules/.pnpm/lucide-react@0.
|
7969
|
+
// ../../node_modules/.pnpm/lucide-react@0.424.0_react@18.3.1/node_modules/lucide-react/dist/esm/Icon.js
|
7961
7970
|
var import_react40 = require("react");
|
7962
7971
|
|
7963
|
-
// ../../node_modules/.pnpm/lucide-react@0.
|
7972
|
+
// ../../node_modules/.pnpm/lucide-react@0.424.0_react@18.3.1/node_modules/lucide-react/dist/esm/defaultAttributes.js
|
7964
7973
|
var defaultAttributes = {
|
7965
7974
|
xmlns: "http://www.w3.org/2000/svg",
|
7966
7975
|
width: 24,
|
@@ -7973,7 +7982,7 @@ var defaultAttributes = {
|
|
7973
7982
|
strokeLinejoin: "round"
|
7974
7983
|
};
|
7975
7984
|
|
7976
|
-
// ../../node_modules/.pnpm/lucide-react@0.
|
7985
|
+
// ../../node_modules/.pnpm/lucide-react@0.424.0_react@18.3.1/node_modules/lucide-react/dist/esm/Icon.js
|
7977
7986
|
var Icon = (0, import_react40.forwardRef)(
|
7978
7987
|
({
|
7979
7988
|
color = "currentColor",
|
@@ -8005,7 +8014,7 @@ var Icon = (0, import_react40.forwardRef)(
|
|
8005
8014
|
}
|
8006
8015
|
);
|
8007
8016
|
|
8008
|
-
// ../../node_modules/.pnpm/lucide-react@0.
|
8017
|
+
// ../../node_modules/.pnpm/lucide-react@0.424.0_react@18.3.1/node_modules/lucide-react/dist/esm/createLucideIcon.js
|
8009
8018
|
var createLucideIcon = (iconName, iconNode) => {
|
8010
8019
|
const Component = (0, import_react41.forwardRef)(
|
8011
8020
|
({ className, ...props }, ref) => (0, import_react41.createElement)(Icon, {
|
@@ -8019,7 +8028,7 @@ var createLucideIcon = (iconName, iconNode) => {
|
|
8019
8028
|
return Component;
|
8020
8029
|
};
|
8021
8030
|
|
8022
|
-
// ../../node_modules/.pnpm/lucide-react@0.
|
8031
|
+
// ../../node_modules/.pnpm/lucide-react@0.424.0_react@18.3.1/node_modules/lucide-react/dist/esm/icons/dot.js
|
8023
8032
|
var Dot = createLucideIcon("Dot", [
|
8024
8033
|
["circle", { cx: "12.1", cy: "12.1", r: "1", key: "18d7e5" }]
|
8025
8034
|
]);
|
@@ -8076,12 +8085,19 @@ var PinInput = ({
|
|
8076
8085
|
const clampedSeparatorPosition = Math.min(separatorPosition, maxLength);
|
8077
8086
|
const firstGroupLength = clampedSeparatorPosition > 0 ? clampedSeparatorPosition : 0;
|
8078
8087
|
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
|
8088
|
+
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(
|
8089
|
+
PinInputSlot,
|
8090
|
+
{
|
8091
|
+
key: index,
|
8092
|
+
index,
|
8093
|
+
className: "hawa-w-full hawa-border"
|
8094
|
+
}
|
8095
|
+
))), 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
8096
|
PinInputSlot,
|
8081
8097
|
{
|
8082
8098
|
key: index + firstGroupLength,
|
8083
8099
|
index: index + firstGroupLength,
|
8084
|
-
className: "hawa-w-full"
|
8100
|
+
className: "hawa-w-full hawa-border"
|
8085
8101
|
}
|
8086
8102
|
)))), /* @__PURE__ */ React50.createElement(HelperText, { helperText: props.helperText }));
|
8087
8103
|
};
|
@@ -12019,12 +12035,10 @@ var CodeConfirmation = ({
|
|
12019
12035
|
{
|
12020
12036
|
noValidate: true,
|
12021
12037
|
onSubmit: handleSubmit((e) => {
|
12022
|
-
if (props.
|
12023
|
-
return props.
|
12038
|
+
if (props.onConfirm) {
|
12039
|
+
return props.onConfirm(e);
|
12024
12040
|
} else {
|
12025
|
-
console.log(
|
12026
|
-
"Form is submitted but handleConfirm prop is missing"
|
12027
|
-
);
|
12041
|
+
console.log("Form is submitted but onConfirm prop is missing");
|
12028
12042
|
}
|
12029
12043
|
})
|
12030
12044
|
},
|
@@ -12052,12 +12066,28 @@ var CodeConfirmation = ({
|
|
12052
12066
|
className: "clickable-link",
|
12053
12067
|
onClick: () => {
|
12054
12068
|
startResendTimer();
|
12055
|
-
props.
|
12069
|
+
props.onResend();
|
12056
12070
|
}
|
12057
12071
|
},
|
12058
12072
|
((_i = props.texts) == null ? void 0 : _i.resendCode) || "Click to resend"
|
12059
12073
|
)),
|
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(
|
12074
|
+
/* @__PURE__ */ import_react74.default.createElement("div", { className: "hawa-mt-4 hawa-grid hawa-grid-cols-2 hawa-gap-2" }, /* @__PURE__ */ import_react74.default.createElement(
|
12075
|
+
Button,
|
12076
|
+
{
|
12077
|
+
type: "button",
|
12078
|
+
onClick: () => {
|
12079
|
+
if (props.onCancel) {
|
12080
|
+
return props.onCancel();
|
12081
|
+
} else {
|
12082
|
+
console.log(
|
12083
|
+
"Cancel button clicked but onCancel prop is missing"
|
12084
|
+
);
|
12085
|
+
}
|
12086
|
+
},
|
12087
|
+
variant: "outline"
|
12088
|
+
},
|
12089
|
+
((_j = props.texts) == null ? void 0 : _j.cancel) || "Cancel"
|
12090
|
+
), /* @__PURE__ */ import_react74.default.createElement(Button, { isLoading: props.confirmLoading }, ((_k = props.texts) == null ? void 0 : _k.confirm) || "Confirm"))
|
12061
12091
|
)));
|
12062
12092
|
};
|
12063
12093
|
|
@@ -12700,6 +12730,7 @@ var ContactForm = ({
|
|
12700
12730
|
onSubmit,
|
12701
12731
|
customFields,
|
12702
12732
|
classNames,
|
12733
|
+
clearOnSubmit = true,
|
12703
12734
|
...props
|
12704
12735
|
}) => {
|
12705
12736
|
var _a, _b, _c, _d, _e;
|
@@ -12743,8 +12774,11 @@ var ContactForm = ({
|
|
12743
12774
|
control,
|
12744
12775
|
handleSubmit,
|
12745
12776
|
formState: { errors },
|
12746
|
-
reset
|
12777
|
+
reset,
|
12778
|
+
getValues,
|
12779
|
+
trigger
|
12747
12780
|
} = (0, import_react_hook_form9.useForm)({
|
12781
|
+
mode: "all",
|
12748
12782
|
resolver: (0, import_zod8.zodResolver)(MainSchema),
|
12749
12783
|
defaultValues: {
|
12750
12784
|
name: "",
|
@@ -12753,10 +12787,16 @@ var ContactForm = ({
|
|
12753
12787
|
...customFieldsDefaultValues
|
12754
12788
|
}
|
12755
12789
|
});
|
12756
|
-
const
|
12790
|
+
const SubmitForm = async (data) => {
|
12791
|
+
const isValid = await trigger();
|
12792
|
+
if (!isValid) {
|
12793
|
+
return;
|
12794
|
+
}
|
12757
12795
|
if (onSubmit) {
|
12758
12796
|
onSubmit(data);
|
12759
|
-
|
12797
|
+
if (clearOnSubmit) {
|
12798
|
+
reset();
|
12799
|
+
}
|
12760
12800
|
} else {
|
12761
12801
|
console.log("Form is submitted but onSubmit prop is missing");
|
12762
12802
|
}
|
@@ -12766,7 +12806,8 @@ var ContactForm = ({
|
|
12766
12806
|
{
|
12767
12807
|
className: cn(
|
12768
12808
|
"hawa-w-full",
|
12769
|
-
cardless && "hawa-border-none hawa-bg-transparent hawa-shadow-none hawa-drop-shadow-none"
|
12809
|
+
cardless && "hawa-border-none hawa-bg-transparent hawa-shadow-none hawa-drop-shadow-none",
|
12810
|
+
classNames == null ? void 0 : classNames.container
|
12770
12811
|
),
|
12771
12812
|
style: cardless ? { boxShadow: "none" } : void 0
|
12772
12813
|
},
|
@@ -12774,7 +12815,7 @@ var ContactForm = ({
|
|
12774
12815
|
"form",
|
12775
12816
|
{
|
12776
12817
|
noValidate: true,
|
12777
|
-
onSubmit: handleSubmit(
|
12818
|
+
onSubmit: handleSubmit(SubmitForm),
|
12778
12819
|
className: "hawa-space-y-2",
|
12779
12820
|
id: formId,
|
12780
12821
|
autoComplete: formAutoComplete
|
@@ -12885,7 +12926,10 @@ var ContactForm = ({
|
|
12885
12926
|
textareaProps: {
|
12886
12927
|
placeholder: texts == null ? void 0 : texts.message.placeholder,
|
12887
12928
|
className: "hawa-min-h-20",
|
12888
|
-
...field
|
12929
|
+
...field,
|
12930
|
+
onKeyDown: getHotkeyHandler([
|
12931
|
+
["mod+enter", () => SubmitForm(getValues())]
|
12932
|
+
])
|
12889
12933
|
},
|
12890
12934
|
classNames: { textarea: "hawa-min-h-40 hawa-h-full" },
|
12891
12935
|
helperText: (_a2 = errors.message) == null ? void 0 : _a2.message
|
@@ -13851,7 +13895,7 @@ var Usage = (props) => {
|
|
13851
13895
|
|
13852
13896
|
lucide-react/dist/esm/shared/src/utils.js:
|
13853
13897
|
(**
|
13854
|
-
* @license lucide-react v0.
|
13898
|
+
* @license lucide-react v0.424.0 - ISC
|
13855
13899
|
*
|
13856
13900
|
* This source code is licensed under the ISC license.
|
13857
13901
|
* See the LICENSE file in the root directory of this source tree.
|
@@ -13859,7 +13903,7 @@ lucide-react/dist/esm/shared/src/utils.js:
|
|
13859
13903
|
|
13860
13904
|
lucide-react/dist/esm/defaultAttributes.js:
|
13861
13905
|
(**
|
13862
|
-
* @license lucide-react v0.
|
13906
|
+
* @license lucide-react v0.424.0 - ISC
|
13863
13907
|
*
|
13864
13908
|
* This source code is licensed under the ISC license.
|
13865
13909
|
* See the LICENSE file in the root directory of this source tree.
|
@@ -13867,7 +13911,7 @@ lucide-react/dist/esm/defaultAttributes.js:
|
|
13867
13911
|
|
13868
13912
|
lucide-react/dist/esm/Icon.js:
|
13869
13913
|
(**
|
13870
|
-
* @license lucide-react v0.
|
13914
|
+
* @license lucide-react v0.424.0 - ISC
|
13871
13915
|
*
|
13872
13916
|
* This source code is licensed under the ISC license.
|
13873
13917
|
* See the LICENSE file in the root directory of this source tree.
|
@@ -13875,7 +13919,7 @@ lucide-react/dist/esm/Icon.js:
|
|
13875
13919
|
|
13876
13920
|
lucide-react/dist/esm/createLucideIcon.js:
|
13877
13921
|
(**
|
13878
|
-
* @license lucide-react v0.
|
13922
|
+
* @license lucide-react v0.424.0 - ISC
|
13879
13923
|
*
|
13880
13924
|
* This source code is licensed under the ISC license.
|
13881
13925
|
* See the LICENSE file in the root directory of this source tree.
|
@@ -13883,7 +13927,7 @@ lucide-react/dist/esm/createLucideIcon.js:
|
|
13883
13927
|
|
13884
13928
|
lucide-react/dist/esm/icons/dot.js:
|
13885
13929
|
(**
|
13886
|
-
* @license lucide-react v0.
|
13930
|
+
* @license lucide-react v0.424.0 - ISC
|
13887
13931
|
*
|
13888
13932
|
* This source code is licensed under the ISC license.
|
13889
13933
|
* See the LICENSE file in the root directory of this source tree.
|
@@ -13891,7 +13935,7 @@ lucide-react/dist/esm/icons/dot.js:
|
|
13891
13935
|
|
13892
13936
|
lucide-react/dist/esm/lucide-react.js:
|
13893
13937
|
(**
|
13894
|
-
* @license lucide-react v0.
|
13938
|
+
* @license lucide-react v0.424.0 - ISC
|
13895
13939
|
*
|
13896
13940
|
* This source code is licensed under the ISC license.
|
13897
13941
|
* See the LICENSE file in the root directory of this source tree.
|