next-helios-fe 1.8.57 → 1.8.58

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "next-helios-fe",
3
- "version": "1.8.57",
3
+ "version": "1.8.58",
4
4
  "description": "",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -1,5 +1,5 @@
1
1
  "use client";
2
- import React, { useRef } from "react";
2
+ import React from "react";
3
3
  import { Tooltip } from "../../../components";
4
4
  import { Icon } from "@iconify/react";
5
5
 
@@ -20,7 +20,6 @@ export const Email: React.FC<EmailProps> = ({
20
20
  description,
21
21
  ...rest
22
22
  }) => {
23
- const inputRef = useRef<HTMLInputElement>(null);
24
23
  const width = options?.width === "fit" ? "w-fit" : "w-full";
25
24
  const height =
26
25
  options?.height === "short"
@@ -48,10 +47,8 @@ export const Email: React.FC<EmailProps> = ({
48
47
  <div className="flex-1 flex justify-end items-center gap-2">
49
48
  {rest.maxLength && (
50
49
  <span className="text-sm select-none">
51
- {inputRef.current?.value
52
- ? (inputRef.current?.value as string).length
53
- : 0}
54
- /{rest.maxLength}
50
+ {rest.value ? (rest.value as string).length : 0}/
51
+ {rest.maxLength}
55
52
  </span>
56
53
  )}
57
54
  {description && (
@@ -68,7 +65,6 @@ export const Email: React.FC<EmailProps> = ({
68
65
  )}
69
66
  <input
70
67
  type="email"
71
- ref={inputRef}
72
68
  className={`w-full px-4 border-default border rounded-md bg-secondary-bg placeholder:duration-300 placeholder:translate-x-0 focus:placeholder:translate-x-1 placeholder:text-silent focus:outline-none focus:ring-1 focus:ring-primary focus:shadow focus:shadow-primary focus:border-primary-dark disabled:bg-secondary-light disabled:text-disabled ${height}`}
73
69
  {...rest}
74
70
  />
@@ -1,5 +1,5 @@
1
1
  "use client";
2
- import React, { useState, useRef } from "react";
2
+ import React, { useState } from "react";
3
3
  import { Tooltip } from "../../../components";
4
4
  import { Icon } from "@iconify/react";
5
5
 
@@ -20,7 +20,6 @@ export const Password: React.FC<PasswordProps> = ({
20
20
  description,
21
21
  ...rest
22
22
  }) => {
23
- const inputRef = useRef<HTMLInputElement>(null);
24
23
  const [show, setShow] = useState(false);
25
24
  const width = options?.width === "fit" ? "w-fit" : "w-full";
26
25
  const height =
@@ -49,10 +48,8 @@ export const Password: React.FC<PasswordProps> = ({
49
48
  <div className="flex-1 flex justify-end items-center gap-2">
50
49
  {rest.maxLength && (
51
50
  <span className="text-sm select-none">
52
- {inputRef.current?.value
53
- ? (inputRef.current?.value as string).length
54
- : 0}
55
- /{rest.maxLength}
51
+ {rest.value ? (rest.value as string).length : 0}/
52
+ {rest.maxLength}
56
53
  </span>
57
54
  )}
58
55
  {description && (
@@ -70,7 +67,6 @@ export const Password: React.FC<PasswordProps> = ({
70
67
  <div className="relative flex items-center">
71
68
  <input
72
69
  type={show ? "text" : "password"}
73
- ref={inputRef}
74
70
  className={`w-full ps-4 pe-14 border-default border rounded-md bg-secondary-bg placeholder:duration-300 placeholder:translate-x-0 focus:placeholder:translate-x-1 placeholder:text-silent focus:outline-none focus:ring-1 focus:ring-primary focus:shadow focus:shadow-primary focus:border-primary-dark disabled:bg-secondary-light disabled:text-disabled ${height}`}
75
71
  {...rest}
76
72
  />
@@ -1,5 +1,5 @@
1
1
  "use client";
2
- import React, { useRef } from "react";
2
+ import React from "react";
3
3
  import { Tooltip } from "../../../components";
4
4
  import { Icon } from "@iconify/react";
5
5
 
@@ -19,7 +19,6 @@ export const Text: React.FC<TextProps> = ({
19
19
  description,
20
20
  ...rest
21
21
  }) => {
22
- const inputRef = useRef<HTMLInputElement>(null);
23
22
  const width = options?.width === "fit" ? "w-fit" : "w-full";
24
23
  const height =
25
24
  options?.height === "short"
@@ -47,10 +46,8 @@ export const Text: React.FC<TextProps> = ({
47
46
  <div className="flex-1 flex justify-end items-center gap-2">
48
47
  {rest.maxLength && (
49
48
  <span className="text-sm select-none">
50
- {inputRef.current?.value
51
- ? (inputRef.current?.value as string).length
52
- : 0}
53
- /{rest.maxLength}
49
+ {rest.value ? (rest.value as string).length : 0}/
50
+ {rest.maxLength}
54
51
  </span>
55
52
  )}
56
53
  {description && (
@@ -67,7 +64,6 @@ export const Text: React.FC<TextProps> = ({
67
64
  )}
68
65
  <input
69
66
  type="text"
70
- ref={inputRef}
71
67
  className={`w-full px-4 border-default border rounded-md bg-secondary-bg placeholder:duration-300 placeholder:translate-x-0 focus:placeholder:translate-x-1 placeholder:text-silent focus:outline-none focus:ring-1 focus:ring-primary focus:shadow focus:shadow-primary focus:border-primary-dark disabled:bg-secondary-light disabled:text-disabled ${height}`}
72
68
  {...rest}
73
69
  />
@@ -1,5 +1,5 @@
1
1
  "use client";
2
- import React, { useRef } from "react";
2
+ import React from "react";
3
3
  import { Tooltip } from "../../../components";
4
4
  import { Icon } from "@iconify/react";
5
5
 
@@ -20,7 +20,6 @@ export const Textarea: React.FC<TextareaProps> = ({
20
20
  description,
21
21
  ...rest
22
22
  }) => {
23
- const inputRef = useRef<HTMLTextAreaElement>(null);
24
23
  const width = options?.width === "fit" ? "w-fit" : "w-full";
25
24
  const height =
26
25
  options?.height === "short"
@@ -48,10 +47,8 @@ export const Textarea: React.FC<TextareaProps> = ({
48
47
  <div className="flex-1 flex justify-end items-center gap-2">
49
48
  {rest.maxLength && (
50
49
  <span className="text-sm select-none">
51
- {inputRef.current?.value
52
- ? (inputRef.current?.value as string).length
53
- : 0}
54
- /{rest.maxLength}
50
+ {rest.value ? (rest.value as string).length : 0}/
51
+ {rest.maxLength}
55
52
  </span>
56
53
  )}
57
54
  {description && (
@@ -68,7 +65,6 @@ export const Textarea: React.FC<TextareaProps> = ({
68
65
  )}
69
66
  <textarea
70
67
  rows={rest.rows || 10}
71
- ref={inputRef}
72
68
  className={`w-full px-4 border-default border rounded-md bg-secondary-bg placeholder:duration-300 placeholder:translate-x-0 focus:placeholder:translate-x-1 placeholder:text-silent focus:outline-none focus:ring-1 focus:ring-primary focus:shadow focus:shadow-primary focus:border-primary-dark disabled:bg-secondary-light disabled:text-disabled ${height}`}
73
69
  {...rest}
74
70
  />