@sikka/hawa 0.18.15-next → 0.18.19-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 CHANGED
@@ -991,9 +991,15 @@ input[type="number"]::-webkit-inner-spin-button,
991
991
  .hawa-bottom-4 {
992
992
  bottom: 1rem;
993
993
  }
994
+ .hawa-bottom-\[60px\] {
995
+ bottom: 60px;
996
+ }
994
997
  .hawa-end-0 {
995
998
  inset-inline-end: 0px;
996
999
  }
1000
+ .hawa-end-2 {
1001
+ inset-inline-end: 0.5rem;
1002
+ }
997
1003
  .hawa-end-3 {
998
1004
  inset-inline-end: 0.75rem;
999
1005
  }
@@ -1054,6 +1060,9 @@ input[type="number"]::-webkit-inner-spin-button,
1054
1060
  .hawa-top-\[22px\] {
1055
1061
  top: 22px;
1056
1062
  }
1063
+ .hawa-top-\[47px\] {
1064
+ top: 47px;
1065
+ }
1057
1066
  .hawa-top-\[50\%\] {
1058
1067
  top: 50%;
1059
1068
  }
@@ -1081,6 +1090,9 @@ input[type="number"]::-webkit-inner-spin-button,
1081
1090
  .hawa-z-10 {
1082
1091
  z-index: 10;
1083
1092
  }
1093
+ .hawa-z-20 {
1094
+ z-index: 20;
1095
+ }
1084
1096
  .hawa-z-30 {
1085
1097
  z-index: 30;
1086
1098
  }
@@ -1719,6 +1731,10 @@ input[type="number"]::-webkit-inner-spin-button,
1719
1731
  --tw-translate-x: -50%;
1720
1732
  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
1733
  }
1734
+ .hawa-translate-y-1\/2 {
1735
+ --tw-translate-y: 50%;
1736
+ 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));
1737
+ }
1722
1738
  .hawa-translate-y-\[-50\%\] {
1723
1739
  --tw-translate-y: -50%;
1724
1740
  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));
@@ -2612,6 +2628,9 @@ input[type="number"]::-webkit-inner-spin-button,
2612
2628
  .hawa-pe-9 {
2613
2629
  padding-inline-end: 2.25rem;
2614
2630
  }
2631
+ .hawa-pe-\[60px\] {
2632
+ padding-inline-end: 60px;
2633
+ }
2615
2634
  .hawa-pl-0 {
2616
2635
  padding-left: 0px;
2617
2636
  }
@@ -2958,6 +2977,11 @@ input[type="number"]::-webkit-inner-spin-button,
2958
2977
  --tw-shadow-colored: 0 4px 6px -1px var(--tw-shadow-color), 0 2px 4px -2px var(--tw-shadow-color);
2959
2978
  box-shadow: var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow);
2960
2979
  }
2980
+ .hawa-shadow-none {
2981
+ --tw-shadow: 0 0 #0000;
2982
+ --tw-shadow-colored: 0 0 #0000;
2983
+ box-shadow: var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow);
2984
+ }
2961
2985
  .hawa-shadow-sm {
2962
2986
  --tw-shadow: 0 1px 2px 0 rgb(0 0 0 / 0.05);
2963
2987
  --tw-shadow-colored: 0 1px 2px 0 var(--tw-shadow-color);
@@ -2978,6 +3002,10 @@ input[type="number"]::-webkit-inner-spin-button,
2978
3002
  .hawa-ring-offset-background {
2979
3003
  --tw-ring-offset-color: hsl(var(--background));
2980
3004
  }
3005
+ .hawa-drop-shadow-md {
3006
+ --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));
3007
+ 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);
3008
+ }
2981
3009
  .hawa-drop-shadow-xl {
2982
3010
  --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
3011
  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,9 @@ 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;
301
+ countPosition?: "center" | "top" | "bottom" | undefined;
299
302
  } & React__default.RefAttributes<HTMLInputElement>>;
300
303
 
301
304
  type ComboboxTypes<T> = {
@@ -611,8 +614,8 @@ interface PopoverProps {
611
614
  disableTrigger?: any;
612
615
  width?: "trigger" | "default";
613
616
  open?: boolean;
614
- contentProps?: any;
615
- triggerProps?: any;
617
+ contentProps?: PopoverPrimitive.PopoverContentProps;
618
+ triggerProps?: PopoverPrimitive.PopoverTriggerProps;
616
619
  }
617
620
  type HawaPopoverTypes = PopoverProps & React$1.ComponentProps<typeof PopoverPrimitive.Root>;
618
621
  declare const Popover: React$1.FC<HawaPopoverTypes>;
@@ -1535,18 +1538,25 @@ type ComponentTypes = {
1535
1538
  };
1536
1539
  declare const FeedbackEmoji: FC<ComponentTypes>;
1537
1540
 
1541
+ type FeedbackFormRequestTypeInputProps = BaseInputType & {
1542
+ required?: string;
1543
+ noOptions?: string;
1544
+ };
1545
+ type FeedbackFormDescriptionInputProps = BaseInputType & {
1546
+ required?: string;
1547
+ tooShort?: string;
1548
+ };
1538
1549
  type FeedbackFormType = {
1539
1550
  onSubmit: (e: any) => void;
1540
1551
  requestTypes?: {
1541
1552
  label: string;
1542
1553
  value: any;
1543
1554
  }[];
1555
+ selectProps?: any;
1556
+ cardless?: boolean;
1544
1557
  texts: {
1545
- requestType?: string;
1546
- requestTypeRequired?: string;
1547
- description?: string;
1548
- descriptionRequired?: string;
1549
- descriptionTooShort?: string;
1558
+ requestType: FeedbackFormRequestTypeInputProps;
1559
+ description: FeedbackFormDescriptionInputProps;
1550
1560
  submit?: string;
1551
1561
  };
1552
1562
  };
package/dist/index.d.ts CHANGED
@@ -296,6 +296,9 @@ 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;
301
+ countPosition?: "center" | "top" | "bottom" | undefined;
299
302
  } & React__default.RefAttributes<HTMLInputElement>>;
300
303
 
301
304
  type ComboboxTypes<T> = {
@@ -611,8 +614,8 @@ interface PopoverProps {
611
614
  disableTrigger?: any;
612
615
  width?: "trigger" | "default";
613
616
  open?: boolean;
614
- contentProps?: any;
615
- triggerProps?: any;
617
+ contentProps?: PopoverPrimitive.PopoverContentProps;
618
+ triggerProps?: PopoverPrimitive.PopoverTriggerProps;
616
619
  }
617
620
  type HawaPopoverTypes = PopoverProps & React$1.ComponentProps<typeof PopoverPrimitive.Root>;
618
621
  declare const Popover: React$1.FC<HawaPopoverTypes>;
@@ -1535,18 +1538,25 @@ type ComponentTypes = {
1535
1538
  };
1536
1539
  declare const FeedbackEmoji: FC<ComponentTypes>;
1537
1540
 
1541
+ type FeedbackFormRequestTypeInputProps = BaseInputType & {
1542
+ required?: string;
1543
+ noOptions?: string;
1544
+ };
1545
+ type FeedbackFormDescriptionInputProps = BaseInputType & {
1546
+ required?: string;
1547
+ tooShort?: string;
1548
+ };
1538
1549
  type FeedbackFormType = {
1539
1550
  onSubmit: (e: any) => void;
1540
1551
  requestTypes?: {
1541
1552
  label: string;
1542
1553
  value: any;
1543
1554
  }[];
1555
+ selectProps?: any;
1556
+ cardless?: boolean;
1544
1557
  texts: {
1545
- requestType?: string;
1546
- requestTypeRequired?: string;
1547
- description?: string;
1548
- descriptionRequired?: string;
1549
- descriptionTooShort?: string;
1558
+ requestType: FeedbackFormRequestTypeInputProps;
1559
+ description: FeedbackFormDescriptionInputProps;
1550
1560
  submit?: string;
1551
1561
  };
1552
1562
  };
package/dist/index.js CHANGED
@@ -3787,6 +3787,8 @@ var Input = (0, import_react15.forwardRef)(
3787
3787
  forceHideHelperText = false,
3788
3788
  labelProps,
3789
3789
  placeholder,
3790
+ showCount,
3791
+ countPosition = "bottom",
3790
3792
  ...props
3791
3793
  }, ref) => {
3792
3794
  var _a, _b;
@@ -3835,6 +3837,7 @@ var Input = (0, import_react15.forwardRef)(
3835
3837
  ), /* @__PURE__ */ import_react15.default.createElement(
3836
3838
  "input",
3837
3839
  {
3840
+ ...props,
3838
3841
  required: true,
3839
3842
  dir: props.dir,
3840
3843
  type: props.type,
@@ -3848,8 +3851,11 @@ var Input = (0, import_react15.forwardRef)(
3848
3851
  className: cn(
3849
3852
  defaultInputStyle,
3850
3853
  " dark:hawa-text-white focus-visible:hawa-outline-none focus-visible:hawa-ring-2 focus-visible:hawa-ring-ring focus-visible:hawa-ring-offset-0",
3851
- props.endIcon && "hawa-pe-9",
3852
- props.startIcon && "hawa-ps-9",
3854
+ {
3855
+ "hawa-pe-9": props.endIcon,
3856
+ "hawa-ps-9": props.startIcon,
3857
+ "hawa-pe-[60px]": countPosition === "center"
3858
+ },
3853
3859
  preview && "hawa-border-transparent hawa-bg-transparent hawa-px-0",
3854
3860
  (_b = props.inputProps) == null ? void 0 : _b.className
3855
3861
  )
@@ -3863,6 +3869,30 @@ var Input = (0, import_react15.forwardRef)(
3863
3869
  )
3864
3870
  },
3865
3871
  props.helperText
3872
+ ), !props.disabled && forceHideHelperText && /* @__PURE__ */ import_react15.default.createElement(
3873
+ "div",
3874
+ {
3875
+ className: cn(
3876
+ "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",
3877
+ props.helperText ? "hawa-border hawa-p-1" : "hawa-border-none hawa-p-0"
3878
+ )
3879
+ },
3880
+ props.helperText
3881
+ ), showCount && /* @__PURE__ */ import_react15.default.createElement(
3882
+ "div",
3883
+ {
3884
+ className: cn(
3885
+ "hawa-absolute hawa-text-xs hawa-transition-all hawa-text-start hawa-translate-y-1/2",
3886
+ {
3887
+ "hawa-end-0 hawa-top-[60px]": countPosition === "bottom",
3888
+ "hawa-end-0 hawa-bottom-[60px]": countPosition === "top",
3889
+ "hawa-end-2": countPosition === "center"
3890
+ }
3891
+ )
3892
+ },
3893
+ props.value ? String(props.value).length : 0,
3894
+ "/",
3895
+ props.maxLength
3866
3896
  )))
3867
3897
  );
3868
3898
  }
@@ -10579,67 +10609,81 @@ var import_react_hook_form7 = require("react-hook-form");
10579
10609
  var import_zod7 = require("@hookform/resolvers/zod");
10580
10610
  var z7 = __toESM(require("zod"));
10581
10611
  var FeedbackForm = (props) => {
10582
- var _a, _b;
10612
+ var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m;
10583
10613
  const formSchema = z7.object({
10584
- requestType: z7.string({ required_error: props.texts.requestTypeRequired }).min(1, { message: props.texts.requestTypeRequired }),
10585
- description: z7.string({ required_error: props.texts.descriptionRequired }).min(10, { message: props.texts.descriptionTooShort })
10614
+ requestType: z7.string({ required_error: (_b = (_a = props.texts) == null ? void 0 : _a.requestType) == null ? void 0 : _b.required }).min(1, { message: (_d = (_c = props.texts) == null ? void 0 : _c.requestType) == null ? void 0 : _d.required }),
10615
+ description: z7.string({ required_error: (_f = (_e = props.texts) == null ? void 0 : _e.description) == null ? void 0 : _f.required }).min(10, { message: (_h = (_g = props.texts) == null ? void 0 : _g.description) == null ? void 0 : _h.tooShort })
10586
10616
  });
10587
10617
  const { handleSubmit, control, formState } = (0, import_react_hook_form7.useForm)({
10588
10618
  resolver: (0, import_zod7.zodResolver)(formSchema)
10589
10619
  });
10590
- return /* @__PURE__ */ import_react59.default.createElement(Card, null, /* @__PURE__ */ import_react59.default.createElement(CardContent, { headless: true }, /* @__PURE__ */ import_react59.default.createElement(
10591
- "form",
10620
+ return /* @__PURE__ */ import_react59.default.createElement(
10621
+ Card,
10592
10622
  {
10593
- noValidate: true,
10594
- onSubmit: handleSubmit((e) => {
10595
- if (props.onSubmit) {
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"
10623
+ className: cn(
10624
+ props.cardless ? "hawa-bg-transparent hawa-border-none hawa-shadow-none" : ""
10625
+ )
10602
10626
  },
10603
- /* @__PURE__ */ import_react59.default.createElement(Label2, null, (_a = props.texts) == null ? void 0 : _a.requestType),
10604
- /* @__PURE__ */ import_react59.default.createElement(
10605
- import_react_hook_form7.Controller,
10627
+ /* @__PURE__ */ import_react59.default.createElement(CardContent, { headless: true }, /* @__PURE__ */ import_react59.default.createElement(
10628
+ "form",
10606
10629
  {
10607
- name: "requestType",
10608
- control,
10609
- render: ({ field }) => {
10610
- var _a2, _b2;
10611
- return /* @__PURE__ */ import_react59.default.createElement(
10612
- Select,
10613
- {
10614
- ...field,
10615
- onChange: (option) => field.onChange(option.value),
10616
- options: props.requestTypes,
10617
- helperText: (_b2 = (_a2 = formState.errors.requestType) == null ? void 0 : _a2.message) == null ? void 0 : _b2.toString()
10618
- }
10619
- );
10630
+ noValidate: true,
10631
+ onSubmit: handleSubmit((e) => {
10632
+ if (props.onSubmit) {
10633
+ return props.onSubmit(e);
10634
+ } else {
10635
+ console.log("Form is submitted but onSubmit prop is missing");
10636
+ }
10637
+ }),
10638
+ className: "hawa-flex hawa-flex-col hawa-gap-4"
10639
+ },
10640
+ /* @__PURE__ */ import_react59.default.createElement(Label2, null, (_j = (_i = props.texts) == null ? void 0 : _i.requestType) == null ? void 0 : _j.label),
10641
+ /* @__PURE__ */ import_react59.default.createElement(
10642
+ import_react_hook_form7.Controller,
10643
+ {
10644
+ name: "requestType",
10645
+ control,
10646
+ render: ({ field }) => {
10647
+ var _a2, _b2, _c2, _d2, _e2, _f2;
10648
+ return /* @__PURE__ */ import_react59.default.createElement(
10649
+ Select,
10650
+ {
10651
+ ...field,
10652
+ ...props.selectProps,
10653
+ onChange: (option) => field.onChange(option.value),
10654
+ options: props.requestTypes,
10655
+ helperText: (_b2 = (_a2 = formState.errors.requestType) == null ? void 0 : _a2.message) == null ? void 0 : _b2.toString(),
10656
+ placeholder: (_d2 = (_c2 = props.texts) == null ? void 0 : _c2.requestType) == null ? void 0 : _d2.placeholder,
10657
+ texts: {
10658
+ noOptions: (_f2 = (_e2 = props.texts) == null ? void 0 : _e2.requestType) == null ? void 0 : _f2.noOptions
10659
+ }
10660
+ }
10661
+ );
10662
+ }
10620
10663
  }
10621
- }
10622
- ),
10623
- /* @__PURE__ */ import_react59.default.createElement(Label2, null, props.texts.description),
10624
- /* @__PURE__ */ import_react59.default.createElement(
10625
- import_react_hook_form7.Controller,
10626
- {
10627
- name: "description",
10628
- control,
10629
- render: ({ field }) => {
10630
- var _a2, _b2;
10631
- return /* @__PURE__ */ import_react59.default.createElement(
10632
- Textarea,
10633
- {
10634
- ...field,
10635
- helperText: formState.errors.description && ((_b2 = (_a2 = formState.errors.description) == null ? void 0 : _a2.message) == null ? void 0 : _b2.toString())
10636
- }
10637
- );
10664
+ ),
10665
+ /* @__PURE__ */ import_react59.default.createElement(Label2, null, (_l = (_k = props.texts) == null ? void 0 : _k.description) == null ? void 0 : _l.label),
10666
+ /* @__PURE__ */ import_react59.default.createElement(
10667
+ import_react_hook_form7.Controller,
10668
+ {
10669
+ name: "description",
10670
+ control,
10671
+ render: ({ field }) => {
10672
+ var _a2, _b2, _c2, _d2;
10673
+ return /* @__PURE__ */ import_react59.default.createElement(
10674
+ Textarea,
10675
+ {
10676
+ ...field,
10677
+ helperText: formState.errors.description && ((_b2 = (_a2 = formState.errors.description) == null ? void 0 : _a2.message) == null ? void 0 : _b2.toString()),
10678
+ placeholder: (_d2 = (_c2 = props.texts) == null ? void 0 : _c2.description) == null ? void 0 : _d2.placeholder
10679
+ }
10680
+ );
10681
+ }
10638
10682
  }
10639
- }
10640
- ),
10641
- /* @__PURE__ */ import_react59.default.createElement(Button, { type: "submit" }, (_b = props.texts) == null ? void 0 : _b.submit)
10642
- )));
10683
+ ),
10684
+ /* @__PURE__ */ import_react59.default.createElement(Button, { type: "submit" }, (_m = props.texts) == null ? void 0 : _m.submit)
10685
+ ))
10686
+ );
10643
10687
  };
10644
10688
 
10645
10689
  // components/blocks/misc/LegalTexts.tsx
package/dist/index.mjs CHANGED
@@ -3565,6 +3565,8 @@ var Input = forwardRef9(
3565
3565
  forceHideHelperText = false,
3566
3566
  labelProps,
3567
3567
  placeholder,
3568
+ showCount,
3569
+ countPosition = "bottom",
3568
3570
  ...props
3569
3571
  }, ref) => {
3570
3572
  var _a, _b;
@@ -3613,6 +3615,7 @@ var Input = forwardRef9(
3613
3615
  ), /* @__PURE__ */ React24.createElement(
3614
3616
  "input",
3615
3617
  {
3618
+ ...props,
3616
3619
  required: true,
3617
3620
  dir: props.dir,
3618
3621
  type: props.type,
@@ -3626,8 +3629,11 @@ var Input = forwardRef9(
3626
3629
  className: cn(
3627
3630
  defaultInputStyle,
3628
3631
  " dark:hawa-text-white focus-visible:hawa-outline-none focus-visible:hawa-ring-2 focus-visible:hawa-ring-ring focus-visible:hawa-ring-offset-0",
3629
- props.endIcon && "hawa-pe-9",
3630
- props.startIcon && "hawa-ps-9",
3632
+ {
3633
+ "hawa-pe-9": props.endIcon,
3634
+ "hawa-ps-9": props.startIcon,
3635
+ "hawa-pe-[60px]": countPosition === "center"
3636
+ },
3631
3637
  preview && "hawa-border-transparent hawa-bg-transparent hawa-px-0",
3632
3638
  (_b = props.inputProps) == null ? void 0 : _b.className
3633
3639
  )
@@ -3641,6 +3647,30 @@ var Input = forwardRef9(
3641
3647
  )
3642
3648
  },
3643
3649
  props.helperText
3650
+ ), !props.disabled && forceHideHelperText && /* @__PURE__ */ React24.createElement(
3651
+ "div",
3652
+ {
3653
+ className: cn(
3654
+ "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",
3655
+ props.helperText ? "hawa-border hawa-p-1" : "hawa-border-none hawa-p-0"
3656
+ )
3657
+ },
3658
+ props.helperText
3659
+ ), showCount && /* @__PURE__ */ React24.createElement(
3660
+ "div",
3661
+ {
3662
+ className: cn(
3663
+ "hawa-absolute hawa-text-xs hawa-transition-all hawa-text-start hawa-translate-y-1/2",
3664
+ {
3665
+ "hawa-end-0 hawa-top-[60px]": countPosition === "bottom",
3666
+ "hawa-end-0 hawa-bottom-[60px]": countPosition === "top",
3667
+ "hawa-end-2": countPosition === "center"
3668
+ }
3669
+ )
3670
+ },
3671
+ props.value ? String(props.value).length : 0,
3672
+ "/",
3673
+ props.maxLength
3644
3674
  )))
3645
3675
  );
3646
3676
  }
@@ -10371,67 +10401,81 @@ import { useForm as useForm7, Controller as Controller7 } from "react-hook-form"
10371
10401
  import { zodResolver as zodResolver7 } from "@hookform/resolvers/zod";
10372
10402
  import * as z7 from "zod";
10373
10403
  var FeedbackForm = (props) => {
10374
- var _a, _b;
10404
+ var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m;
10375
10405
  const formSchema = z7.object({
10376
- requestType: z7.string({ required_error: props.texts.requestTypeRequired }).min(1, { message: props.texts.requestTypeRequired }),
10377
- description: z7.string({ required_error: props.texts.descriptionRequired }).min(10, { message: props.texts.descriptionTooShort })
10406
+ requestType: z7.string({ required_error: (_b = (_a = props.texts) == null ? void 0 : _a.requestType) == null ? void 0 : _b.required }).min(1, { message: (_d = (_c = props.texts) == null ? void 0 : _c.requestType) == null ? void 0 : _d.required }),
10407
+ description: z7.string({ required_error: (_f = (_e = props.texts) == null ? void 0 : _e.description) == null ? void 0 : _f.required }).min(10, { message: (_h = (_g = props.texts) == null ? void 0 : _g.description) == null ? void 0 : _h.tooShort })
10378
10408
  });
10379
10409
  const { handleSubmit, control, formState } = useForm7({
10380
10410
  resolver: zodResolver7(formSchema)
10381
10411
  });
10382
- return /* @__PURE__ */ React86.createElement(Card, null, /* @__PURE__ */ React86.createElement(CardContent, { headless: true }, /* @__PURE__ */ React86.createElement(
10383
- "form",
10412
+ return /* @__PURE__ */ React86.createElement(
10413
+ Card,
10384
10414
  {
10385
- noValidate: true,
10386
- onSubmit: handleSubmit((e) => {
10387
- if (props.onSubmit) {
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"
10415
+ className: cn(
10416
+ props.cardless ? "hawa-bg-transparent hawa-border-none hawa-shadow-none" : ""
10417
+ )
10394
10418
  },
10395
- /* @__PURE__ */ React86.createElement(Label2, null, (_a = props.texts) == null ? void 0 : _a.requestType),
10396
- /* @__PURE__ */ React86.createElement(
10397
- Controller7,
10419
+ /* @__PURE__ */ React86.createElement(CardContent, { headless: true }, /* @__PURE__ */ React86.createElement(
10420
+ "form",
10398
10421
  {
10399
- name: "requestType",
10400
- control,
10401
- render: ({ field }) => {
10402
- var _a2, _b2;
10403
- return /* @__PURE__ */ React86.createElement(
10404
- Select,
10405
- {
10406
- ...field,
10407
- onChange: (option) => field.onChange(option.value),
10408
- options: props.requestTypes,
10409
- helperText: (_b2 = (_a2 = formState.errors.requestType) == null ? void 0 : _a2.message) == null ? void 0 : _b2.toString()
10410
- }
10411
- );
10422
+ noValidate: true,
10423
+ onSubmit: handleSubmit((e) => {
10424
+ if (props.onSubmit) {
10425
+ return props.onSubmit(e);
10426
+ } else {
10427
+ console.log("Form is submitted but onSubmit prop is missing");
10428
+ }
10429
+ }),
10430
+ className: "hawa-flex hawa-flex-col hawa-gap-4"
10431
+ },
10432
+ /* @__PURE__ */ React86.createElement(Label2, null, (_j = (_i = props.texts) == null ? void 0 : _i.requestType) == null ? void 0 : _j.label),
10433
+ /* @__PURE__ */ React86.createElement(
10434
+ Controller7,
10435
+ {
10436
+ name: "requestType",
10437
+ control,
10438
+ render: ({ field }) => {
10439
+ var _a2, _b2, _c2, _d2, _e2, _f2;
10440
+ return /* @__PURE__ */ React86.createElement(
10441
+ Select,
10442
+ {
10443
+ ...field,
10444
+ ...props.selectProps,
10445
+ onChange: (option) => field.onChange(option.value),
10446
+ options: props.requestTypes,
10447
+ helperText: (_b2 = (_a2 = formState.errors.requestType) == null ? void 0 : _a2.message) == null ? void 0 : _b2.toString(),
10448
+ placeholder: (_d2 = (_c2 = props.texts) == null ? void 0 : _c2.requestType) == null ? void 0 : _d2.placeholder,
10449
+ texts: {
10450
+ noOptions: (_f2 = (_e2 = props.texts) == null ? void 0 : _e2.requestType) == null ? void 0 : _f2.noOptions
10451
+ }
10452
+ }
10453
+ );
10454
+ }
10412
10455
  }
10413
- }
10414
- ),
10415
- /* @__PURE__ */ React86.createElement(Label2, null, props.texts.description),
10416
- /* @__PURE__ */ React86.createElement(
10417
- Controller7,
10418
- {
10419
- name: "description",
10420
- control,
10421
- render: ({ field }) => {
10422
- var _a2, _b2;
10423
- return /* @__PURE__ */ React86.createElement(
10424
- Textarea,
10425
- {
10426
- ...field,
10427
- helperText: formState.errors.description && ((_b2 = (_a2 = formState.errors.description) == null ? void 0 : _a2.message) == null ? void 0 : _b2.toString())
10428
- }
10429
- );
10456
+ ),
10457
+ /* @__PURE__ */ React86.createElement(Label2, null, (_l = (_k = props.texts) == null ? void 0 : _k.description) == null ? void 0 : _l.label),
10458
+ /* @__PURE__ */ React86.createElement(
10459
+ Controller7,
10460
+ {
10461
+ name: "description",
10462
+ control,
10463
+ render: ({ field }) => {
10464
+ var _a2, _b2, _c2, _d2;
10465
+ return /* @__PURE__ */ React86.createElement(
10466
+ Textarea,
10467
+ {
10468
+ ...field,
10469
+ helperText: formState.errors.description && ((_b2 = (_a2 = formState.errors.description) == null ? void 0 : _a2.message) == null ? void 0 : _b2.toString()),
10470
+ placeholder: (_d2 = (_c2 = props.texts) == null ? void 0 : _c2.description) == null ? void 0 : _d2.placeholder
10471
+ }
10472
+ );
10473
+ }
10430
10474
  }
10431
- }
10432
- ),
10433
- /* @__PURE__ */ React86.createElement(Button, { type: "submit" }, (_b = props.texts) == null ? void 0 : _b.submit)
10434
- )));
10475
+ ),
10476
+ /* @__PURE__ */ React86.createElement(Button, { type: "submit" }, (_m = props.texts) == null ? void 0 : _m.submit)
10477
+ ))
10478
+ );
10435
10479
  };
10436
10480
 
10437
10481
  // components/blocks/misc/LegalTexts.tsx
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sikka/hawa",
3
- "version": "0.18.15-next",
3
+ "version": "0.18.19-next",
4
4
  "description": "Modern UI Kit made with Tailwind",
5
5
  "author": {
6
6
  "name": "Sikka Software",