@ews-admin/global-design-system 1.9.0 → 1.10.0
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,5 +1,5 @@
|
|
|
1
1
|
import { ChevronDown } from "lucide-react";
|
|
2
|
-
import React, { useEffect, useRef, useState } from "react";
|
|
2
|
+
import React, { useEffect, useId, useRef, useState } from "react";
|
|
3
3
|
import { Eye, EyeOff } from "../../icons";
|
|
4
4
|
import { cn } from "../../utils";
|
|
5
5
|
|
|
@@ -104,7 +104,8 @@ const Input = React.forwardRef<HTMLInputElement, InputProps>(
|
|
|
104
104
|
},
|
|
105
105
|
ref
|
|
106
106
|
) => {
|
|
107
|
-
const
|
|
107
|
+
const generatedId = useId();
|
|
108
|
+
const inputId = id || `input-${generatedId.replace(/:/g, "")}`;
|
|
108
109
|
const hasError = Boolean(error);
|
|
109
110
|
const actualVariant = hasError ? "error" : variant;
|
|
110
111
|
|