@douglasneuroinformatics/libui 5.0.0 → 5.0.1

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.
@@ -2737,11 +2737,38 @@ var Separator3 = forwardRef65(function Separator4({ className, decorative = true
2737
2737
  import "react";
2738
2738
  import { CircleAlertIcon } from "lucide-react";
2739
2739
  import { jsx as jsx97, jsxs as jsxs31 } from "react/jsx-runtime";
2740
- var ErrorMessage = ({ className, error }) => {
2741
- return error ? /* @__PURE__ */ jsx97("div", { className: "flex flex-col gap-1.5", children: error.map((message) => /* @__PURE__ */ jsxs31("div", { className: cn("text-destructive flex w-full items-center text-sm font-medium", className), children: [
2742
- /* @__PURE__ */ jsx97(CircleAlertIcon, { className: "mr-1", style: { strokeWidth: "2px" } }),
2743
- /* @__PURE__ */ jsx97("span", { "data-testid": "error-message-text", children: message })
2744
- ] }, message)) ?? null }) : null;
2740
+ var ErrorMessage = ({
2741
+ className,
2742
+ error,
2743
+ hideIconOnWrap
2744
+ }) => {
2745
+ if (!error) {
2746
+ return null;
2747
+ }
2748
+ return /* @__PURE__ */ jsx97("div", { className: "flex flex-col gap-1.5", children: error.map((message) => /* @__PURE__ */ jsxs31(
2749
+ "div",
2750
+ {
2751
+ className: cn(
2752
+ "text-destructive flex w-full items-center text-sm font-medium",
2753
+ hideIconOnWrap && "flex-wrap",
2754
+ className
2755
+ ),
2756
+ children: [
2757
+ /* @__PURE__ */ jsxs31("div", { className: "@container/alert mr-1.5 flex min-w-4 shrink-0 flex-grow-[1] items-center justify-start", children: [
2758
+ /* @__PURE__ */ jsx97("div", { className: "h-0 w-0" }),
2759
+ /* @__PURE__ */ jsx97(
2760
+ CircleAlertIcon,
2761
+ {
2762
+ className: "@min-[24px]/alert:hidden",
2763
+ style: { height: "16px", strokeWidth: "2px", width: "16px" }
2764
+ }
2765
+ )
2766
+ ] }),
2767
+ /* @__PURE__ */ jsx97("span", { className: "flex-grow-[999]", "data-testid": "error-message-text", children: message })
2768
+ ]
2769
+ },
2770
+ message
2771
+ )) });
2745
2772
  };
2746
2773
 
2747
2774
  // src/components/Form/FieldsComponent.tsx
@@ -4196,7 +4223,7 @@ var Form = ({
4196
4223
  values
4197
4224
  }
4198
4225
  ),
4199
- Boolean(rootErrors.length) && /* @__PURE__ */ jsx138(ErrorMessage, { className: "-mt-3", error: rootErrors }),
4226
+ Boolean(rootErrors.length) && /* @__PURE__ */ jsx138("div", { className: "-mt-3", children: /* @__PURE__ */ jsx138(ErrorMessage, { hideIconOnWrap: true, error: rootErrors }) }),
4200
4227
  fieldsFooter,
4201
4228
  /* @__PURE__ */ jsxs52("div", { className: "flex w-full gap-3", children: [
4202
4229
  additionalButtons?.left,