@underverse-ui/underverse 0.2.10 → 0.2.12

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/README.md CHANGED
File without changes
package/dist/index.cjs CHANGED
@@ -12262,11 +12262,23 @@ var FormItem = React39.forwardRef(({ className, ...props }, ref) => {
12262
12262
  return /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(FormItemContext.Provider, { value: { id }, children: /* @__PURE__ */ (0, import_jsx_runtime48.jsx)("div", { ref, className: cn("space-y-2", className), ...props }) });
12263
12263
  });
12264
12264
  FormItem.displayName = "FormItem";
12265
- var FormLabel = React39.forwardRef(({ className, ...props }, ref) => {
12265
+ var FormLabel = React39.forwardRef(({ className, children, required, ...props }, ref) => {
12266
12266
  const { error, formItemId } = useFormField();
12267
12267
  const config = React39.useContext(FormConfigContext);
12268
12268
  const sizeClass = config.size === "sm" ? "text-xs" : config.size === "lg" ? "text-base" : "text-sm";
12269
- return /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(Label, { ref, className: cn(sizeClass, error && "text-destructive", className), htmlFor: formItemId, ...props });
12269
+ return /* @__PURE__ */ (0, import_jsx_runtime48.jsxs)(
12270
+ Label,
12271
+ {
12272
+ ref,
12273
+ className: cn(sizeClass, error && "text-destructive", className),
12274
+ htmlFor: formItemId,
12275
+ ...props,
12276
+ children: [
12277
+ children,
12278
+ required && /* @__PURE__ */ (0, import_jsx_runtime48.jsx)("span", { className: "text-destructive ml-1", children: "*" })
12279
+ ]
12280
+ }
12281
+ );
12270
12282
  });
12271
12283
  FormLabel.displayName = "FormLabel";
12272
12284
  var FormControl = React39.forwardRef(({ ...props }, ref) => {