@underverse-ui/underverse 1.0.99 → 1.0.100

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.js CHANGED
@@ -22675,7 +22675,7 @@ var useFormField = () => {
22675
22675
  var FormItemContext = React63.createContext({});
22676
22676
  var FormItem = React63.forwardRef(({ className, ...props }, ref) => {
22677
22677
  const id = React63.useId();
22678
- return /* @__PURE__ */ jsx68(FormItemContext.Provider, { value: { id }, children: /* @__PURE__ */ jsx68("div", { ref, className: cn("space-y-2", className), ...props }) });
22678
+ return /* @__PURE__ */ jsx68(FormItemContext.Provider, { value: { id }, children: /* @__PURE__ */ jsx68("div", { ref, className: cn("group space-y-2", className), ...props }) });
22679
22679
  });
22680
22680
  FormItem.displayName = "FormItem";
22681
22681
  var FormLabel = React63.forwardRef(
@@ -22683,10 +22683,24 @@ var FormLabel = React63.forwardRef(
22683
22683
  const { error, formItemId } = useFormField();
22684
22684
  const config = React63.useContext(FormConfigContext);
22685
22685
  const sizeClass = config.size === "sm" ? "text-xs" : config.size === "lg" ? "text-base" : "text-sm";
22686
- return /* @__PURE__ */ jsxs57(Label, { ref, className: cn(sizeClass, error && "text-destructive", className), htmlFor: formItemId, ...props, children: [
22687
- children,
22688
- required && /* @__PURE__ */ jsx68("span", { className: "text-destructive ml-1", children: "*" })
22689
- ] });
22686
+ return /* @__PURE__ */ jsxs57(
22687
+ Label,
22688
+ {
22689
+ ref,
22690
+ className: cn(
22691
+ sizeClass,
22692
+ "transition-colors duration-200",
22693
+ error ? "text-destructive" : "group-focus-within:text-primary",
22694
+ className
22695
+ ),
22696
+ htmlFor: formItemId,
22697
+ ...props,
22698
+ children: [
22699
+ children,
22700
+ required && /* @__PURE__ */ jsx68("span", { className: "text-destructive ml-1", children: "*" })
22701
+ ]
22702
+ }
22703
+ );
22690
22704
  }
22691
22705
  );
22692
22706
  FormLabel.displayName = "FormLabel";