@caqophony/ui 0.9.4 → 0.9.5

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.d.mts CHANGED
@@ -992,6 +992,8 @@ declare const ActionCard: React.ForwardRefExoticComponent<ActionCardProps & Reac
992
992
  * z-overlay -> zIndex.overlay (60)
993
993
  * duration-default -> transition.duration.default
994
994
  *
995
+ * A click outside the panel closes it (#7051).
996
+ *
995
997
  * Issue #2628 — B-2: Modal Dialog + Drawer
996
998
  * Authored by Caqophony
997
999
  */
package/dist/index.js CHANGED
@@ -1608,7 +1608,7 @@ var StackedListItem = React8.forwardRef(
1608
1608
  }
1609
1609
  )
1610
1610
  ] }),
1611
- meta && /* @__PURE__ */ jsx19("span", { className: "flex-shrink-0 text-sm text-muted-foreground", children: meta }),
1611
+ meta && /* @__PURE__ */ jsx19("span", { className: "min-w-0 max-w-full break-words text-sm text-muted-foreground", children: meta }),
1612
1612
  action && /* @__PURE__ */ jsx19("div", { className: "flex-shrink-0", children: action })
1613
1613
  ] })
1614
1614
  ]
@@ -3040,22 +3040,34 @@ var ModalDialog = React18.forwardRef(
3040
3040
  "aria-hidden": "true"
3041
3041
  }
3042
3042
  ),
3043
- /* @__PURE__ */ jsx29("div", { className: "z-modal fixed inset-0 flex items-center justify-center p-4", children: /* @__PURE__ */ jsx29(
3043
+ /* @__PURE__ */ jsx29(
3044
3044
  "div",
3045
3045
  {
3046
- ref: setPanel,
3047
- role: "dialog",
3048
- "aria-modal": "true",
3049
- className: cn(
3050
- "relative w-full rounded-lg border border-border bg-card shadow-lg",
3051
- "animate-in fade-in-0 zoom-in-95",
3052
- SIZE_CLASSES2[size],
3053
- className
3054
- ),
3055
- ...props,
3056
- children
3046
+ className: "z-modal fixed inset-0 flex items-center justify-center p-4",
3047
+ "data-testid": "modal-dialog-outside",
3048
+ onClick: (e) => {
3049
+ if (e.target === e.currentTarget) onClose?.();
3050
+ },
3051
+ children: /* @__PURE__ */ jsx29(
3052
+ "div",
3053
+ {
3054
+ ref: setPanel,
3055
+ role: "dialog",
3056
+ "aria-modal": "true",
3057
+ className: cn(
3058
+ // #7263: a panel taller than the screen scrolls inside it, so
3059
+ // its footer (Cancel, Save) can always be reached
3060
+ "relative max-h-[calc(100dvh-2rem)] w-full overflow-y-auto rounded-lg border border-border bg-card shadow-lg",
3061
+ "animate-in fade-in-0 zoom-in-95",
3062
+ SIZE_CLASSES2[size],
3063
+ className
3064
+ ),
3065
+ ...props,
3066
+ children
3067
+ }
3068
+ )
3057
3069
  }
3058
- ) })
3070
+ )
3059
3071
  ] })
3060
3072
  );
3061
3073
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@caqophony/ui",
3
- "version": "0.9.4",
3
+ "version": "0.9.5",
4
4
  "description": "Generic, optional React UI reuse library (Gossamer tokens). Centrally maintained by Caqophony.",
5
5
  "license": "MIT",
6
6
  "author": "Caqophony",