@flytedan/flytebot-design-system 0.5.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 +11 -3
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +3 -1
- package/dist/index.d.ts +3 -1
- package/dist/index.js +11 -3
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
- package/styles/components.css +26 -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
|
|
@@ -1113,12 +1120,13 @@ function hasModifier(e) {
|
|
|
1113
1120
|
|
|
1114
1121
|
// src/components/feedback/Tag.tsx
|
|
1115
1122
|
var import_jsx_runtime22 = require("react/jsx-runtime");
|
|
1116
|
-
|
|
1123
|
+
var TONES2 = { info: "fd-tag-info", success: "fd-tag-success", warning: "fd-tag-warning", danger: "fd-tag-danger" };
|
|
1124
|
+
function Tag({ children, icon, selected = false, tone = "neutral", onRemove, onClick, className = "", ...rest }) {
|
|
1117
1125
|
return /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)(
|
|
1118
1126
|
"button",
|
|
1119
1127
|
{
|
|
1120
1128
|
type: "button",
|
|
1121
|
-
className: ["fd-tag", className].filter(Boolean).join(" "),
|
|
1129
|
+
className: ["fd-tag", selected ? TONES2[tone] : null, className].filter(Boolean).join(" "),
|
|
1122
1130
|
"aria-pressed": selected,
|
|
1123
1131
|
onClick,
|
|
1124
1132
|
...rest,
|