@sikka/hawa 0.19.5-next → 0.19.6-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
@@ -995,8 +995,11 @@ input[type="number"]::-webkit-inner-spin-button,
995
995
  .hawa-bottom-4 {
996
996
  bottom: 1rem;
997
997
  }
998
- .hawa-bottom-\[60px\] {
999
- bottom: 60px;
998
+ .hawa-bottom-\[62px\] {
999
+ bottom: 62px;
1000
+ }
1001
+ .hawa-bottom-\[80px\] {
1002
+ bottom: 80px;
1000
1003
  }
1001
1004
  .hawa-end-0 {
1002
1005
  inset-inline-end: 0px;
@@ -1076,6 +1079,9 @@ input[type="number"]::-webkit-inner-spin-button,
1076
1079
  .hawa-top-\[60px\] {
1077
1080
  top: 60px;
1078
1081
  }
1082
+ .hawa-top-\[62px\] {
1083
+ top: 62px;
1084
+ }
1079
1085
  .hawa-top-\[72px\] {
1080
1086
  top: 72px;
1081
1087
  }
@@ -1478,6 +1484,9 @@ input[type="number"]::-webkit-inner-spin-button,
1478
1484
  .hawa-min-h-\[37\.75px\] {
1479
1485
  min-height: 37.75px;
1480
1486
  }
1487
+ .hawa-min-h-\[40px\] {
1488
+ min-height: 40px;
1489
+ }
1481
1490
  .hawa-min-h-fit {
1482
1491
  min-height: -moz-fit-content;
1483
1492
  min-height: fit-content;
package/dist/index.d.mts CHANGED
@@ -277,6 +277,8 @@ interface TextareaProps extends React$1.TextareaHTMLAttributes<HTMLTextAreaEleme
277
277
  labelProps?: LabelProps;
278
278
  forceHideHelperText?: boolean;
279
279
  textareaProps?: React$1.TextareaHTMLAttributes<HTMLTextAreaElement>;
280
+ showCount?: boolean;
281
+ countPosition?: "top" | "bottom";
280
282
  }
281
283
  declare const Textarea: React$1.ForwardRefExoticComponent<TextareaProps & React$1.RefAttributes<HTMLTextAreaElement>>;
282
284
 
package/dist/index.d.ts CHANGED
@@ -277,6 +277,8 @@ interface TextareaProps extends React$1.TextareaHTMLAttributes<HTMLTextAreaEleme
277
277
  labelProps?: LabelProps;
278
278
  forceHideHelperText?: boolean;
279
279
  textareaProps?: React$1.TextareaHTMLAttributes<HTMLTextAreaElement>;
280
+ showCount?: boolean;
281
+ countPosition?: "top" | "bottom";
280
282
  }
281
283
  declare const Textarea: React$1.ForwardRefExoticComponent<TextareaProps & React$1.RefAttributes<HTMLTextAreaElement>>;
282
284
 
package/dist/index.js CHANGED
@@ -3762,18 +3762,26 @@ Switch.displayName = SwitchPrimitives.Root.displayName;
3762
3762
  // components/elements/Textarea.tsx
3763
3763
  var React22 = __toESM(require("react"));
3764
3764
  var Textarea = React22.forwardRef(
3765
- ({ className, labelProps, forceHideHelperText, textareaProps, ...props }, ref) => {
3766
- return /* @__PURE__ */ React22.createElement("div", { className: "hawa-flex hawa-flex-col hawa-gap-2 hawa-h-full" }, props.label && /* @__PURE__ */ React22.createElement(Label2, { ...labelProps }, props.label), /* @__PURE__ */ React22.createElement(
3765
+ ({
3766
+ className,
3767
+ labelProps,
3768
+ showCount,
3769
+ forceHideHelperText,
3770
+ textareaProps,
3771
+ countPosition = "bottom",
3772
+ ...props
3773
+ }, ref) => {
3774
+ return /* @__PURE__ */ React22.createElement("div", { className: "hawa-relative hawa-flex hawa-w-full hawa-flex-col hawa-gap-2 hawa-h-full" }, props.label && /* @__PURE__ */ React22.createElement(Label2, { ...labelProps }, props.label), /* @__PURE__ */ React22.createElement(
3767
3775
  "textarea",
3768
3776
  {
3769
3777
  className: cn(
3770
- "hawa-flex hawa-w-full hawa-rounded-md hawa-border hawa-border-input hawa-bg-background hawa-px-3 hawa-py-2 hawa-text-sm hawa-ring-offset-background placeholder:hawa-text-muted-foreground focus-visible:hawa-outline-none focus-visible:hawa-ring-2 focus-visible:hawa-ring-ring focus-visible:hawa-ring-offset-0 disabled:hawa-cursor-not-allowed disabled:hawa-opacity-50",
3778
+ "hawa-min-h-[40px] hawa-flex hawa-w-full hawa-rounded-md hawa-border hawa-border-input hawa-bg-background hawa-px-3 hawa-py-2 hawa-text-sm hawa-ring-offset-background placeholder:hawa-text-muted-foreground focus-visible:hawa-outline-none focus-visible:hawa-ring-2 focus-visible:hawa-ring-ring focus-visible:hawa-ring-offset-0 disabled:hawa-cursor-not-allowed disabled:hawa-opacity-50",
3771
3779
  className
3772
3780
  ),
3773
3781
  ref,
3774
3782
  ...textareaProps
3775
3783
  }
3776
- ), !forceHideHelperText && /* @__PURE__ */ React22.createElement(
3784
+ ), /* @__PURE__ */ React22.createElement("div", { className: "hawa-flex hawa-flex-row hawa-justify-between" }, !forceHideHelperText && /* @__PURE__ */ React22.createElement(
3777
3785
  "p",
3778
3786
  {
3779
3787
  className: cn(
@@ -3782,7 +3790,20 @@ var Textarea = React22.forwardRef(
3782
3790
  )
3783
3791
  },
3784
3792
  props.helperText
3785
- ));
3793
+ ), showCount && /* @__PURE__ */ React22.createElement(
3794
+ "div",
3795
+ {
3796
+ className: cn(
3797
+ " hawa-text-xs hawa-transition-all hawa-text-start ",
3798
+ {
3799
+ "hawa-end-0 hawa-bottom-[80px] hawa-absolute hawa-translate-y-1/2": countPosition === "top"
3800
+ }
3801
+ )
3802
+ },
3803
+ (textareaProps == null ? void 0 : textareaProps.value) ? String(textareaProps == null ? void 0 : textareaProps.value).length : 0,
3804
+ "/",
3805
+ textareaProps == null ? void 0 : textareaProps.maxLength
3806
+ )));
3786
3807
  }
3787
3808
  );
3788
3809
  Textarea.displayName = "Textarea";
@@ -3935,7 +3956,7 @@ var Input = (0, import_react16.forwardRef)(
3935
3956
  preview ? "hawa-opacity-100" : "hawa-opacity-0"
3936
3957
  )
3937
3958
  }
3938
- ), /* @__PURE__ */ import_react16.default.createElement(import_react16.default.Fragment, null, /* @__PURE__ */ import_react16.default.createElement("div", { className: cn("hawa-relative") }, props.startIcon && /* @__PURE__ */ import_react16.default.createElement("div", { className: "hawa-absolute hawa-start-3 hawa-top-1/2 hawa--translate-y-1/2" }, props.startIcon), props.endIcon && /* @__PURE__ */ import_react16.default.createElement(
3959
+ ), /* @__PURE__ */ import_react16.default.createElement(import_react16.default.Fragment, null, /* @__PURE__ */ import_react16.default.createElement("div", { className: "hawa-relative" }, props.startIcon && /* @__PURE__ */ import_react16.default.createElement("div", { className: "hawa-absolute hawa-start-3 hawa-top-1/2 hawa--translate-y-1/2" }, props.startIcon), props.endIcon && /* @__PURE__ */ import_react16.default.createElement(
3939
3960
  "div",
3940
3961
  {
3941
3962
  className: cn(
@@ -3994,8 +4015,8 @@ var Input = (0, import_react16.forwardRef)(
3994
4015
  className: cn(
3995
4016
  "hawa-absolute hawa-text-xs hawa-transition-all hawa-text-start hawa-translate-y-1/2",
3996
4017
  {
3997
- "hawa-end-0 hawa-top-[60px]": countPosition === "bottom",
3998
- "hawa-end-0 hawa-bottom-[60px]": countPosition === "top",
4018
+ "hawa-end-0 hawa-top-[62px]": countPosition === "bottom",
4019
+ "hawa-end-0 hawa-bottom-[62px]": countPosition === "top",
3999
4020
  "hawa-end-2": countPosition === "center"
4000
4021
  }
4001
4022
  )
package/dist/index.mjs CHANGED
@@ -3529,18 +3529,26 @@ Switch.displayName = SwitchPrimitives.Root.displayName;
3529
3529
  // components/elements/Textarea.tsx
3530
3530
  import * as React22 from "react";
3531
3531
  var Textarea = React22.forwardRef(
3532
- ({ className, labelProps, forceHideHelperText, textareaProps, ...props }, ref) => {
3533
- return /* @__PURE__ */ React22.createElement("div", { className: "hawa-flex hawa-flex-col hawa-gap-2 hawa-h-full" }, props.label && /* @__PURE__ */ React22.createElement(Label2, { ...labelProps }, props.label), /* @__PURE__ */ React22.createElement(
3532
+ ({
3533
+ className,
3534
+ labelProps,
3535
+ showCount,
3536
+ forceHideHelperText,
3537
+ textareaProps,
3538
+ countPosition = "bottom",
3539
+ ...props
3540
+ }, ref) => {
3541
+ return /* @__PURE__ */ React22.createElement("div", { className: "hawa-relative hawa-flex hawa-w-full hawa-flex-col hawa-gap-2 hawa-h-full" }, props.label && /* @__PURE__ */ React22.createElement(Label2, { ...labelProps }, props.label), /* @__PURE__ */ React22.createElement(
3534
3542
  "textarea",
3535
3543
  {
3536
3544
  className: cn(
3537
- "hawa-flex hawa-w-full hawa-rounded-md hawa-border hawa-border-input hawa-bg-background hawa-px-3 hawa-py-2 hawa-text-sm hawa-ring-offset-background placeholder:hawa-text-muted-foreground focus-visible:hawa-outline-none focus-visible:hawa-ring-2 focus-visible:hawa-ring-ring focus-visible:hawa-ring-offset-0 disabled:hawa-cursor-not-allowed disabled:hawa-opacity-50",
3545
+ "hawa-min-h-[40px] hawa-flex hawa-w-full hawa-rounded-md hawa-border hawa-border-input hawa-bg-background hawa-px-3 hawa-py-2 hawa-text-sm hawa-ring-offset-background placeholder:hawa-text-muted-foreground focus-visible:hawa-outline-none focus-visible:hawa-ring-2 focus-visible:hawa-ring-ring focus-visible:hawa-ring-offset-0 disabled:hawa-cursor-not-allowed disabled:hawa-opacity-50",
3538
3546
  className
3539
3547
  ),
3540
3548
  ref,
3541
3549
  ...textareaProps
3542
3550
  }
3543
- ), !forceHideHelperText && /* @__PURE__ */ React22.createElement(
3551
+ ), /* @__PURE__ */ React22.createElement("div", { className: "hawa-flex hawa-flex-row hawa-justify-between" }, !forceHideHelperText && /* @__PURE__ */ React22.createElement(
3544
3552
  "p",
3545
3553
  {
3546
3554
  className: cn(
@@ -3549,7 +3557,20 @@ var Textarea = React22.forwardRef(
3549
3557
  )
3550
3558
  },
3551
3559
  props.helperText
3552
- ));
3560
+ ), showCount && /* @__PURE__ */ React22.createElement(
3561
+ "div",
3562
+ {
3563
+ className: cn(
3564
+ " hawa-text-xs hawa-transition-all hawa-text-start ",
3565
+ {
3566
+ "hawa-end-0 hawa-bottom-[80px] hawa-absolute hawa-translate-y-1/2": countPosition === "top"
3567
+ }
3568
+ )
3569
+ },
3570
+ (textareaProps == null ? void 0 : textareaProps.value) ? String(textareaProps == null ? void 0 : textareaProps.value).length : 0,
3571
+ "/",
3572
+ textareaProps == null ? void 0 : textareaProps.maxLength
3573
+ )));
3553
3574
  }
3554
3575
  );
3555
3576
  Textarea.displayName = "Textarea";
@@ -3705,7 +3726,7 @@ var Input = forwardRef9(
3705
3726
  preview ? "hawa-opacity-100" : "hawa-opacity-0"
3706
3727
  )
3707
3728
  }
3708
- ), /* @__PURE__ */ React25.createElement(React25.Fragment, null, /* @__PURE__ */ React25.createElement("div", { className: cn("hawa-relative") }, props.startIcon && /* @__PURE__ */ React25.createElement("div", { className: "hawa-absolute hawa-start-3 hawa-top-1/2 hawa--translate-y-1/2" }, props.startIcon), props.endIcon && /* @__PURE__ */ React25.createElement(
3729
+ ), /* @__PURE__ */ React25.createElement(React25.Fragment, null, /* @__PURE__ */ React25.createElement("div", { className: "hawa-relative" }, props.startIcon && /* @__PURE__ */ React25.createElement("div", { className: "hawa-absolute hawa-start-3 hawa-top-1/2 hawa--translate-y-1/2" }, props.startIcon), props.endIcon && /* @__PURE__ */ React25.createElement(
3709
3730
  "div",
3710
3731
  {
3711
3732
  className: cn(
@@ -3764,8 +3785,8 @@ var Input = forwardRef9(
3764
3785
  className: cn(
3765
3786
  "hawa-absolute hawa-text-xs hawa-transition-all hawa-text-start hawa-translate-y-1/2",
3766
3787
  {
3767
- "hawa-end-0 hawa-top-[60px]": countPosition === "bottom",
3768
- "hawa-end-0 hawa-bottom-[60px]": countPosition === "top",
3788
+ "hawa-end-0 hawa-top-[62px]": countPosition === "bottom",
3789
+ "hawa-end-0 hawa-bottom-[62px]": countPosition === "top",
3769
3790
  "hawa-end-2": countPosition === "center"
3770
3791
  }
3771
3792
  )
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sikka/hawa",
3
- "version": "0.19.5-next",
3
+ "version": "0.19.6-next",
4
4
  "description": "Modern UI Kit made with Tailwind",
5
5
  "author": {
6
6
  "name": "Sikka Software",