@sikka/hawa 0.18.15-next → 0.18.18-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/index.css +19 -0
- package/dist/index.d.mts +15 -7
- package/dist/index.d.ts +15 -7
- package/dist/index.js +81 -50
- package/dist/index.mjs +81 -50
- package/package.json +1 -1
package/dist/index.css
CHANGED
|
@@ -1054,6 +1054,9 @@ input[type="number"]::-webkit-inner-spin-button,
|
|
|
1054
1054
|
.hawa-top-\[22px\] {
|
|
1055
1055
|
top: 22px;
|
|
1056
1056
|
}
|
|
1057
|
+
.hawa-top-\[47px\] {
|
|
1058
|
+
top: 47px;
|
|
1059
|
+
}
|
|
1057
1060
|
.hawa-top-\[50\%\] {
|
|
1058
1061
|
top: 50%;
|
|
1059
1062
|
}
|
|
@@ -1081,6 +1084,9 @@ input[type="number"]::-webkit-inner-spin-button,
|
|
|
1081
1084
|
.hawa-z-10 {
|
|
1082
1085
|
z-index: 10;
|
|
1083
1086
|
}
|
|
1087
|
+
.hawa-z-20 {
|
|
1088
|
+
z-index: 20;
|
|
1089
|
+
}
|
|
1084
1090
|
.hawa-z-30 {
|
|
1085
1091
|
z-index: 30;
|
|
1086
1092
|
}
|
|
@@ -1719,6 +1725,10 @@ input[type="number"]::-webkit-inner-spin-button,
|
|
|
1719
1725
|
--tw-translate-x: -50%;
|
|
1720
1726
|
transform: translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y));
|
|
1721
1727
|
}
|
|
1728
|
+
.hawa-translate-y-1\/2 {
|
|
1729
|
+
--tw-translate-y: 50%;
|
|
1730
|
+
transform: translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y));
|
|
1731
|
+
}
|
|
1722
1732
|
.hawa-translate-y-\[-50\%\] {
|
|
1723
1733
|
--tw-translate-y: -50%;
|
|
1724
1734
|
transform: translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y));
|
|
@@ -2958,6 +2968,11 @@ input[type="number"]::-webkit-inner-spin-button,
|
|
|
2958
2968
|
--tw-shadow-colored: 0 4px 6px -1px var(--tw-shadow-color), 0 2px 4px -2px var(--tw-shadow-color);
|
|
2959
2969
|
box-shadow: var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow);
|
|
2960
2970
|
}
|
|
2971
|
+
.hawa-shadow-none {
|
|
2972
|
+
--tw-shadow: 0 0 #0000;
|
|
2973
|
+
--tw-shadow-colored: 0 0 #0000;
|
|
2974
|
+
box-shadow: var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow);
|
|
2975
|
+
}
|
|
2961
2976
|
.hawa-shadow-sm {
|
|
2962
2977
|
--tw-shadow: 0 1px 2px 0 rgb(0 0 0 / 0.05);
|
|
2963
2978
|
--tw-shadow-colored: 0 1px 2px 0 var(--tw-shadow-color);
|
|
@@ -2978,6 +2993,10 @@ input[type="number"]::-webkit-inner-spin-button,
|
|
|
2978
2993
|
.hawa-ring-offset-background {
|
|
2979
2994
|
--tw-ring-offset-color: hsl(var(--background));
|
|
2980
2995
|
}
|
|
2996
|
+
.hawa-drop-shadow-md {
|
|
2997
|
+
--tw-drop-shadow: drop-shadow(0 4px 3px rgb(0 0 0 / 0.07)) drop-shadow(0 2px 2px rgb(0 0 0 / 0.06));
|
|
2998
|
+
filter: var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow);
|
|
2999
|
+
}
|
|
2981
3000
|
.hawa-drop-shadow-xl {
|
|
2982
3001
|
--tw-drop-shadow: drop-shadow(0 20px 13px rgb(0 0 0 / 0.03)) drop-shadow(0 8px 5px rgb(0 0 0 / 0.08));
|
|
2983
3002
|
filter: var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow);
|
package/dist/index.d.mts
CHANGED
|
@@ -296,6 +296,8 @@ declare const Input: React__default.ForwardRefExoticComponent<React__default.Inp
|
|
|
296
296
|
} | undefined;
|
|
297
297
|
startIcon?: React__default.ReactNode;
|
|
298
298
|
placeholder?: React__default.ReactNode;
|
|
299
|
+
/** Show the count of characters left in the input field. Works along with maxLength prop. */
|
|
300
|
+
showCount?: boolean | undefined;
|
|
299
301
|
} & React__default.RefAttributes<HTMLInputElement>>;
|
|
300
302
|
|
|
301
303
|
type ComboboxTypes<T> = {
|
|
@@ -611,8 +613,8 @@ interface PopoverProps {
|
|
|
611
613
|
disableTrigger?: any;
|
|
612
614
|
width?: "trigger" | "default";
|
|
613
615
|
open?: boolean;
|
|
614
|
-
contentProps?:
|
|
615
|
-
triggerProps?:
|
|
616
|
+
contentProps?: PopoverPrimitive.PopoverContentProps;
|
|
617
|
+
triggerProps?: PopoverPrimitive.PopoverTriggerProps;
|
|
616
618
|
}
|
|
617
619
|
type HawaPopoverTypes = PopoverProps & React$1.ComponentProps<typeof PopoverPrimitive.Root>;
|
|
618
620
|
declare const Popover: React$1.FC<HawaPopoverTypes>;
|
|
@@ -1535,18 +1537,24 @@ type ComponentTypes = {
|
|
|
1535
1537
|
};
|
|
1536
1538
|
declare const FeedbackEmoji: FC<ComponentTypes>;
|
|
1537
1539
|
|
|
1540
|
+
type FeedbackFormRequestTypeInputProps = BaseInputType & {
|
|
1541
|
+
required?: string;
|
|
1542
|
+
};
|
|
1543
|
+
type FeedbackFormDescriptionInputProps = BaseInputType & {
|
|
1544
|
+
required?: string;
|
|
1545
|
+
tooShort?: string;
|
|
1546
|
+
};
|
|
1538
1547
|
type FeedbackFormType = {
|
|
1539
1548
|
onSubmit: (e: any) => void;
|
|
1540
1549
|
requestTypes?: {
|
|
1541
1550
|
label: string;
|
|
1542
1551
|
value: any;
|
|
1543
1552
|
}[];
|
|
1553
|
+
selectProps?: any;
|
|
1554
|
+
cardless?: boolean;
|
|
1544
1555
|
texts: {
|
|
1545
|
-
requestType
|
|
1546
|
-
|
|
1547
|
-
description?: string;
|
|
1548
|
-
descriptionRequired?: string;
|
|
1549
|
-
descriptionTooShort?: string;
|
|
1556
|
+
requestType: FeedbackFormRequestTypeInputProps;
|
|
1557
|
+
description: FeedbackFormDescriptionInputProps;
|
|
1550
1558
|
submit?: string;
|
|
1551
1559
|
};
|
|
1552
1560
|
};
|
package/dist/index.d.ts
CHANGED
|
@@ -296,6 +296,8 @@ declare const Input: React__default.ForwardRefExoticComponent<React__default.Inp
|
|
|
296
296
|
} | undefined;
|
|
297
297
|
startIcon?: React__default.ReactNode;
|
|
298
298
|
placeholder?: React__default.ReactNode;
|
|
299
|
+
/** Show the count of characters left in the input field. Works along with maxLength prop. */
|
|
300
|
+
showCount?: boolean | undefined;
|
|
299
301
|
} & React__default.RefAttributes<HTMLInputElement>>;
|
|
300
302
|
|
|
301
303
|
type ComboboxTypes<T> = {
|
|
@@ -611,8 +613,8 @@ interface PopoverProps {
|
|
|
611
613
|
disableTrigger?: any;
|
|
612
614
|
width?: "trigger" | "default";
|
|
613
615
|
open?: boolean;
|
|
614
|
-
contentProps?:
|
|
615
|
-
triggerProps?:
|
|
616
|
+
contentProps?: PopoverPrimitive.PopoverContentProps;
|
|
617
|
+
triggerProps?: PopoverPrimitive.PopoverTriggerProps;
|
|
616
618
|
}
|
|
617
619
|
type HawaPopoverTypes = PopoverProps & React$1.ComponentProps<typeof PopoverPrimitive.Root>;
|
|
618
620
|
declare const Popover: React$1.FC<HawaPopoverTypes>;
|
|
@@ -1535,18 +1537,24 @@ type ComponentTypes = {
|
|
|
1535
1537
|
};
|
|
1536
1538
|
declare const FeedbackEmoji: FC<ComponentTypes>;
|
|
1537
1539
|
|
|
1540
|
+
type FeedbackFormRequestTypeInputProps = BaseInputType & {
|
|
1541
|
+
required?: string;
|
|
1542
|
+
};
|
|
1543
|
+
type FeedbackFormDescriptionInputProps = BaseInputType & {
|
|
1544
|
+
required?: string;
|
|
1545
|
+
tooShort?: string;
|
|
1546
|
+
};
|
|
1538
1547
|
type FeedbackFormType = {
|
|
1539
1548
|
onSubmit: (e: any) => void;
|
|
1540
1549
|
requestTypes?: {
|
|
1541
1550
|
label: string;
|
|
1542
1551
|
value: any;
|
|
1543
1552
|
}[];
|
|
1553
|
+
selectProps?: any;
|
|
1554
|
+
cardless?: boolean;
|
|
1544
1555
|
texts: {
|
|
1545
|
-
requestType
|
|
1546
|
-
|
|
1547
|
-
description?: string;
|
|
1548
|
-
descriptionRequired?: string;
|
|
1549
|
-
descriptionTooShort?: string;
|
|
1556
|
+
requestType: FeedbackFormRequestTypeInputProps;
|
|
1557
|
+
description: FeedbackFormDescriptionInputProps;
|
|
1550
1558
|
submit?: string;
|
|
1551
1559
|
};
|
|
1552
1560
|
};
|
package/dist/index.js
CHANGED
|
@@ -3787,6 +3787,7 @@ var Input = (0, import_react15.forwardRef)(
|
|
|
3787
3787
|
forceHideHelperText = false,
|
|
3788
3788
|
labelProps,
|
|
3789
3789
|
placeholder,
|
|
3790
|
+
showCount,
|
|
3790
3791
|
...props
|
|
3791
3792
|
}, ref) => {
|
|
3792
3793
|
var _a, _b;
|
|
@@ -3835,6 +3836,7 @@ var Input = (0, import_react15.forwardRef)(
|
|
|
3835
3836
|
), /* @__PURE__ */ import_react15.default.createElement(
|
|
3836
3837
|
"input",
|
|
3837
3838
|
{
|
|
3839
|
+
...props,
|
|
3838
3840
|
required: true,
|
|
3839
3841
|
dir: props.dir,
|
|
3840
3842
|
type: props.type,
|
|
@@ -3863,6 +3865,25 @@ var Input = (0, import_react15.forwardRef)(
|
|
|
3863
3865
|
)
|
|
3864
3866
|
},
|
|
3865
3867
|
props.helperText
|
|
3868
|
+
), !props.disabled && forceHideHelperText && /* @__PURE__ */ import_react15.default.createElement(
|
|
3869
|
+
"div",
|
|
3870
|
+
{
|
|
3871
|
+
className: cn(
|
|
3872
|
+
"hawa-absolute hawa-top-[47px] hawa-text-sm hawa-text-helper-color hawa-transition-all hawa-text-start hawa-rounded hawa-end-0 hawa-z-20 hawa-drop-shadow-md hawa-bg-background hawa-translate-y-1/2",
|
|
3873
|
+
props.helperText ? "hawa-border hawa-p-1" : " hawa-border-none hawa-p-0"
|
|
3874
|
+
)
|
|
3875
|
+
},
|
|
3876
|
+
props.helperText
|
|
3877
|
+
), showCount && /* @__PURE__ */ import_react15.default.createElement(
|
|
3878
|
+
"div",
|
|
3879
|
+
{
|
|
3880
|
+
className: cn(
|
|
3881
|
+
"hawa-absolute hawa-top-[60px] hawa-text-sm hawa-transition-all hawa-text-start hawa-end-0 hawa-translate-y-1/2"
|
|
3882
|
+
)
|
|
3883
|
+
},
|
|
3884
|
+
props.value ? String(props.value).length : 0,
|
|
3885
|
+
"/",
|
|
3886
|
+
props.maxLength
|
|
3866
3887
|
)))
|
|
3867
3888
|
);
|
|
3868
3889
|
}
|
|
@@ -10581,65 +10602,75 @@ var z7 = __toESM(require("zod"));
|
|
|
10581
10602
|
var FeedbackForm = (props) => {
|
|
10582
10603
|
var _a, _b;
|
|
10583
10604
|
const formSchema = z7.object({
|
|
10584
|
-
requestType: z7.string({ required_error: props.texts.
|
|
10585
|
-
description: z7.string({ required_error: props.texts.
|
|
10605
|
+
requestType: z7.string({ required_error: props.texts.requestType.required }).min(1, { message: props.texts.requestType.required }),
|
|
10606
|
+
description: z7.string({ required_error: props.texts.description.required }).min(10, { message: props.texts.description.tooShort })
|
|
10586
10607
|
});
|
|
10587
10608
|
const { handleSubmit, control, formState } = (0, import_react_hook_form7.useForm)({
|
|
10588
10609
|
resolver: (0, import_zod7.zodResolver)(formSchema)
|
|
10589
10610
|
});
|
|
10590
|
-
return /* @__PURE__ */ import_react59.default.createElement(
|
|
10591
|
-
|
|
10611
|
+
return /* @__PURE__ */ import_react59.default.createElement(
|
|
10612
|
+
Card,
|
|
10592
10613
|
{
|
|
10593
|
-
|
|
10594
|
-
|
|
10595
|
-
|
|
10596
|
-
return props.onSubmit(e);
|
|
10597
|
-
} else {
|
|
10598
|
-
console.log("Form is submitted but onSubmit prop is missing");
|
|
10599
|
-
}
|
|
10600
|
-
}),
|
|
10601
|
-
className: "hawa-flex hawa-flex-col hawa-gap-4"
|
|
10614
|
+
className: cn(
|
|
10615
|
+
props.cardless ? "hawa-bg-transparent hawa-border-none hawa-shadow-none" : ""
|
|
10616
|
+
)
|
|
10602
10617
|
},
|
|
10603
|
-
/* @__PURE__ */ import_react59.default.createElement(
|
|
10604
|
-
|
|
10605
|
-
import_react_hook_form7.Controller,
|
|
10618
|
+
/* @__PURE__ */ import_react59.default.createElement(CardContent, { headless: true }, /* @__PURE__ */ import_react59.default.createElement(
|
|
10619
|
+
"form",
|
|
10606
10620
|
{
|
|
10607
|
-
|
|
10608
|
-
|
|
10609
|
-
|
|
10610
|
-
|
|
10611
|
-
|
|
10612
|
-
|
|
10613
|
-
|
|
10614
|
-
|
|
10615
|
-
|
|
10616
|
-
|
|
10617
|
-
|
|
10618
|
-
|
|
10619
|
-
|
|
10621
|
+
noValidate: true,
|
|
10622
|
+
onSubmit: handleSubmit((e) => {
|
|
10623
|
+
if (props.onSubmit) {
|
|
10624
|
+
return props.onSubmit(e);
|
|
10625
|
+
} else {
|
|
10626
|
+
console.log("Form is submitted but onSubmit prop is missing");
|
|
10627
|
+
}
|
|
10628
|
+
}),
|
|
10629
|
+
className: "hawa-flex hawa-flex-col hawa-gap-4"
|
|
10630
|
+
},
|
|
10631
|
+
/* @__PURE__ */ import_react59.default.createElement(Label2, null, (_a = props.texts) == null ? void 0 : _a.requestType.label),
|
|
10632
|
+
/* @__PURE__ */ import_react59.default.createElement(
|
|
10633
|
+
import_react_hook_form7.Controller,
|
|
10634
|
+
{
|
|
10635
|
+
name: "requestType",
|
|
10636
|
+
control,
|
|
10637
|
+
render: ({ field }) => {
|
|
10638
|
+
var _a2, _b2, _c;
|
|
10639
|
+
return /* @__PURE__ */ import_react59.default.createElement(
|
|
10640
|
+
Select,
|
|
10641
|
+
{
|
|
10642
|
+
...field,
|
|
10643
|
+
...props.selectProps,
|
|
10644
|
+
onChange: (option) => field.onChange(option.value),
|
|
10645
|
+
options: props.requestTypes,
|
|
10646
|
+
helperText: (_b2 = (_a2 = formState.errors.requestType) == null ? void 0 : _a2.message) == null ? void 0 : _b2.toString(),
|
|
10647
|
+
placeholder: (_c = props.texts) == null ? void 0 : _c.requestType.placeholder
|
|
10648
|
+
}
|
|
10649
|
+
);
|
|
10650
|
+
}
|
|
10620
10651
|
}
|
|
10621
|
-
|
|
10622
|
-
|
|
10623
|
-
|
|
10624
|
-
|
|
10625
|
-
|
|
10626
|
-
|
|
10627
|
-
|
|
10628
|
-
|
|
10629
|
-
|
|
10630
|
-
|
|
10631
|
-
|
|
10632
|
-
|
|
10633
|
-
|
|
10634
|
-
|
|
10635
|
-
|
|
10636
|
-
|
|
10637
|
-
|
|
10652
|
+
),
|
|
10653
|
+
/* @__PURE__ */ import_react59.default.createElement(Label2, null, props.texts.description.label),
|
|
10654
|
+
/* @__PURE__ */ import_react59.default.createElement(
|
|
10655
|
+
import_react_hook_form7.Controller,
|
|
10656
|
+
{
|
|
10657
|
+
name: "description",
|
|
10658
|
+
control,
|
|
10659
|
+
render: ({ field }) => {
|
|
10660
|
+
var _a2, _b2;
|
|
10661
|
+
return /* @__PURE__ */ import_react59.default.createElement(
|
|
10662
|
+
Textarea,
|
|
10663
|
+
{
|
|
10664
|
+
...field,
|
|
10665
|
+
helperText: formState.errors.description && ((_b2 = (_a2 = formState.errors.description) == null ? void 0 : _a2.message) == null ? void 0 : _b2.toString())
|
|
10666
|
+
}
|
|
10667
|
+
);
|
|
10668
|
+
}
|
|
10638
10669
|
}
|
|
10639
|
-
|
|
10640
|
-
|
|
10641
|
-
|
|
10642
|
-
)
|
|
10670
|
+
),
|
|
10671
|
+
/* @__PURE__ */ import_react59.default.createElement(Button, { type: "submit" }, (_b = props.texts) == null ? void 0 : _b.submit)
|
|
10672
|
+
))
|
|
10673
|
+
);
|
|
10643
10674
|
};
|
|
10644
10675
|
|
|
10645
10676
|
// components/blocks/misc/LegalTexts.tsx
|
package/dist/index.mjs
CHANGED
|
@@ -3565,6 +3565,7 @@ var Input = forwardRef9(
|
|
|
3565
3565
|
forceHideHelperText = false,
|
|
3566
3566
|
labelProps,
|
|
3567
3567
|
placeholder,
|
|
3568
|
+
showCount,
|
|
3568
3569
|
...props
|
|
3569
3570
|
}, ref) => {
|
|
3570
3571
|
var _a, _b;
|
|
@@ -3613,6 +3614,7 @@ var Input = forwardRef9(
|
|
|
3613
3614
|
), /* @__PURE__ */ React24.createElement(
|
|
3614
3615
|
"input",
|
|
3615
3616
|
{
|
|
3617
|
+
...props,
|
|
3616
3618
|
required: true,
|
|
3617
3619
|
dir: props.dir,
|
|
3618
3620
|
type: props.type,
|
|
@@ -3641,6 +3643,25 @@ var Input = forwardRef9(
|
|
|
3641
3643
|
)
|
|
3642
3644
|
},
|
|
3643
3645
|
props.helperText
|
|
3646
|
+
), !props.disabled && forceHideHelperText && /* @__PURE__ */ React24.createElement(
|
|
3647
|
+
"div",
|
|
3648
|
+
{
|
|
3649
|
+
className: cn(
|
|
3650
|
+
"hawa-absolute hawa-top-[47px] hawa-text-sm hawa-text-helper-color hawa-transition-all hawa-text-start hawa-rounded hawa-end-0 hawa-z-20 hawa-drop-shadow-md hawa-bg-background hawa-translate-y-1/2",
|
|
3651
|
+
props.helperText ? "hawa-border hawa-p-1" : " hawa-border-none hawa-p-0"
|
|
3652
|
+
)
|
|
3653
|
+
},
|
|
3654
|
+
props.helperText
|
|
3655
|
+
), showCount && /* @__PURE__ */ React24.createElement(
|
|
3656
|
+
"div",
|
|
3657
|
+
{
|
|
3658
|
+
className: cn(
|
|
3659
|
+
"hawa-absolute hawa-top-[60px] hawa-text-sm hawa-transition-all hawa-text-start hawa-end-0 hawa-translate-y-1/2"
|
|
3660
|
+
)
|
|
3661
|
+
},
|
|
3662
|
+
props.value ? String(props.value).length : 0,
|
|
3663
|
+
"/",
|
|
3664
|
+
props.maxLength
|
|
3644
3665
|
)))
|
|
3645
3666
|
);
|
|
3646
3667
|
}
|
|
@@ -10373,65 +10394,75 @@ import * as z7 from "zod";
|
|
|
10373
10394
|
var FeedbackForm = (props) => {
|
|
10374
10395
|
var _a, _b;
|
|
10375
10396
|
const formSchema = z7.object({
|
|
10376
|
-
requestType: z7.string({ required_error: props.texts.
|
|
10377
|
-
description: z7.string({ required_error: props.texts.
|
|
10397
|
+
requestType: z7.string({ required_error: props.texts.requestType.required }).min(1, { message: props.texts.requestType.required }),
|
|
10398
|
+
description: z7.string({ required_error: props.texts.description.required }).min(10, { message: props.texts.description.tooShort })
|
|
10378
10399
|
});
|
|
10379
10400
|
const { handleSubmit, control, formState } = useForm7({
|
|
10380
10401
|
resolver: zodResolver7(formSchema)
|
|
10381
10402
|
});
|
|
10382
|
-
return /* @__PURE__ */ React86.createElement(
|
|
10383
|
-
|
|
10403
|
+
return /* @__PURE__ */ React86.createElement(
|
|
10404
|
+
Card,
|
|
10384
10405
|
{
|
|
10385
|
-
|
|
10386
|
-
|
|
10387
|
-
|
|
10388
|
-
return props.onSubmit(e);
|
|
10389
|
-
} else {
|
|
10390
|
-
console.log("Form is submitted but onSubmit prop is missing");
|
|
10391
|
-
}
|
|
10392
|
-
}),
|
|
10393
|
-
className: "hawa-flex hawa-flex-col hawa-gap-4"
|
|
10406
|
+
className: cn(
|
|
10407
|
+
props.cardless ? "hawa-bg-transparent hawa-border-none hawa-shadow-none" : ""
|
|
10408
|
+
)
|
|
10394
10409
|
},
|
|
10395
|
-
/* @__PURE__ */ React86.createElement(
|
|
10396
|
-
|
|
10397
|
-
Controller7,
|
|
10410
|
+
/* @__PURE__ */ React86.createElement(CardContent, { headless: true }, /* @__PURE__ */ React86.createElement(
|
|
10411
|
+
"form",
|
|
10398
10412
|
{
|
|
10399
|
-
|
|
10400
|
-
|
|
10401
|
-
|
|
10402
|
-
|
|
10403
|
-
|
|
10404
|
-
|
|
10405
|
-
|
|
10406
|
-
|
|
10407
|
-
|
|
10408
|
-
|
|
10409
|
-
|
|
10410
|
-
|
|
10411
|
-
|
|
10413
|
+
noValidate: true,
|
|
10414
|
+
onSubmit: handleSubmit((e) => {
|
|
10415
|
+
if (props.onSubmit) {
|
|
10416
|
+
return props.onSubmit(e);
|
|
10417
|
+
} else {
|
|
10418
|
+
console.log("Form is submitted but onSubmit prop is missing");
|
|
10419
|
+
}
|
|
10420
|
+
}),
|
|
10421
|
+
className: "hawa-flex hawa-flex-col hawa-gap-4"
|
|
10422
|
+
},
|
|
10423
|
+
/* @__PURE__ */ React86.createElement(Label2, null, (_a = props.texts) == null ? void 0 : _a.requestType.label),
|
|
10424
|
+
/* @__PURE__ */ React86.createElement(
|
|
10425
|
+
Controller7,
|
|
10426
|
+
{
|
|
10427
|
+
name: "requestType",
|
|
10428
|
+
control,
|
|
10429
|
+
render: ({ field }) => {
|
|
10430
|
+
var _a2, _b2, _c;
|
|
10431
|
+
return /* @__PURE__ */ React86.createElement(
|
|
10432
|
+
Select,
|
|
10433
|
+
{
|
|
10434
|
+
...field,
|
|
10435
|
+
...props.selectProps,
|
|
10436
|
+
onChange: (option) => field.onChange(option.value),
|
|
10437
|
+
options: props.requestTypes,
|
|
10438
|
+
helperText: (_b2 = (_a2 = formState.errors.requestType) == null ? void 0 : _a2.message) == null ? void 0 : _b2.toString(),
|
|
10439
|
+
placeholder: (_c = props.texts) == null ? void 0 : _c.requestType.placeholder
|
|
10440
|
+
}
|
|
10441
|
+
);
|
|
10442
|
+
}
|
|
10412
10443
|
}
|
|
10413
|
-
|
|
10414
|
-
|
|
10415
|
-
|
|
10416
|
-
|
|
10417
|
-
|
|
10418
|
-
|
|
10419
|
-
|
|
10420
|
-
|
|
10421
|
-
|
|
10422
|
-
|
|
10423
|
-
|
|
10424
|
-
|
|
10425
|
-
|
|
10426
|
-
|
|
10427
|
-
|
|
10428
|
-
|
|
10429
|
-
|
|
10444
|
+
),
|
|
10445
|
+
/* @__PURE__ */ React86.createElement(Label2, null, props.texts.description.label),
|
|
10446
|
+
/* @__PURE__ */ React86.createElement(
|
|
10447
|
+
Controller7,
|
|
10448
|
+
{
|
|
10449
|
+
name: "description",
|
|
10450
|
+
control,
|
|
10451
|
+
render: ({ field }) => {
|
|
10452
|
+
var _a2, _b2;
|
|
10453
|
+
return /* @__PURE__ */ React86.createElement(
|
|
10454
|
+
Textarea,
|
|
10455
|
+
{
|
|
10456
|
+
...field,
|
|
10457
|
+
helperText: formState.errors.description && ((_b2 = (_a2 = formState.errors.description) == null ? void 0 : _a2.message) == null ? void 0 : _b2.toString())
|
|
10458
|
+
}
|
|
10459
|
+
);
|
|
10460
|
+
}
|
|
10430
10461
|
}
|
|
10431
|
-
|
|
10432
|
-
|
|
10433
|
-
|
|
10434
|
-
)
|
|
10462
|
+
),
|
|
10463
|
+
/* @__PURE__ */ React86.createElement(Button, { type: "submit" }, (_b = props.texts) == null ? void 0 : _b.submit)
|
|
10464
|
+
))
|
|
10465
|
+
);
|
|
10435
10466
|
};
|
|
10436
10467
|
|
|
10437
10468
|
// components/blocks/misc/LegalTexts.tsx
|