@flytedan/flytebot-design-system 0.6.0 → 0.6.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.
- package/dist/index.cjs +8 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +8 -1
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
- package/styles/components.css +6 -1
package/dist/index.js
CHANGED
|
@@ -205,7 +205,14 @@ function Popover({
|
|
|
205
205
|
bottom: pos.bottom == null ? "auto" : pos.bottom,
|
|
206
206
|
width: matchWidth ? pos.width : width,
|
|
207
207
|
minWidth: minWidth || (matchWidth ? void 0 : 200),
|
|
208
|
-
|
|
208
|
+
// Size to content by default — cap only at real available room between the
|
|
209
|
+
// anchor and the viewport edge (pos.maxH, computed by usePopoverPosition).
|
|
210
|
+
// A caller-supplied `maxHeight` narrows that further (e.g. a long menu that
|
|
211
|
+
// should scroll well before it reaches the viewport edge); it must never
|
|
212
|
+
// widen past pos.maxH, which is why it's still Math.min'd against it. There
|
|
213
|
+
// is intentionally no arbitrary default here — an unrequested cap would clip
|
|
214
|
+
// ordinary content that simply happens to be taller than some fixed number.
|
|
215
|
+
maxHeight: maxHeight != null ? Math.min(maxHeight, pos.maxH) : pos.maxH,
|
|
209
216
|
transformOrigin: pos.side === "top" ? "bottom center" : "top center",
|
|
210
217
|
zIndex: 140,
|
|
211
218
|
...style
|