@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.cjs
CHANGED
|
@@ -390,7 +390,14 @@ function Popover({
|
|
|
390
390
|
bottom: pos.bottom == null ? "auto" : pos.bottom,
|
|
391
391
|
width: matchWidth ? pos.width : width,
|
|
392
392
|
minWidth: minWidth || (matchWidth ? void 0 : 200),
|
|
393
|
-
|
|
393
|
+
// Size to content by default — cap only at real available room between the
|
|
394
|
+
// anchor and the viewport edge (pos.maxH, computed by usePopoverPosition).
|
|
395
|
+
// A caller-supplied `maxHeight` narrows that further (e.g. a long menu that
|
|
396
|
+
// should scroll well before it reaches the viewport edge); it must never
|
|
397
|
+
// widen past pos.maxH, which is why it's still Math.min'd against it. There
|
|
398
|
+
// is intentionally no arbitrary default here — an unrequested cap would clip
|
|
399
|
+
// ordinary content that simply happens to be taller than some fixed number.
|
|
400
|
+
maxHeight: maxHeight != null ? Math.min(maxHeight, pos.maxH) : pos.maxH,
|
|
394
401
|
transformOrigin: pos.side === "top" ? "bottom center" : "top center",
|
|
395
402
|
zIndex: 140,
|
|
396
403
|
...style
|