@flytedan/flytebot-design-system 0.12.8 → 0.12.10

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 CHANGED
@@ -275,7 +275,7 @@ function IconButton({
275
275
  const overflowRow = useOverflowRow();
276
276
  const cls = [
277
277
  "fd-btn-icon",
278
- variant === "outline" ? "fd-btn-icon-outline" : variant === "solid" ? "fd-btn-icon-solid" : "",
278
+ variant === "outline" ? "fd-btn-icon-outline" : variant === "solid" ? "fd-btn-icon-solid" : variant === "soft" ? "fd-btn-icon-soft" : "",
279
279
  tone !== "neutral" ? "is-" + tone : "",
280
280
  size === "sm" ? "fd-btn-icon-sm" : size === "lg" ? "fd-btn-icon-lg" : "",
281
281
  round ? "fd-btn-icon-round" : "",
@@ -3141,6 +3141,7 @@ function EntityRowMetrics({ metrics, className = "", style }) {
3141
3141
  }
3142
3142
  function EntityRow({
3143
3143
  title,
3144
+ titleIcon,
3144
3145
  meta,
3145
3146
  metrics,
3146
3147
  accessory,
@@ -3158,9 +3159,11 @@ function EntityRow({
3158
3159
  onPointerDown,
3159
3160
  className: ["fd-erow", tone === "danger" ? "fd-erow-danger" : "", className].filter(Boolean).join(" "),
3160
3161
  style: {
3161
- display: "flex",
3162
- alignItems: "center",
3163
- gap: 10,
3162
+ // display/alignItems/gap moved to the .fd-erow stylesheet rule (MP-114
3163
+ // follow-up): an inline style always wins over a stylesheet rule regardless of
3164
+ // specificity or media/container query, which would have made it impossible
3165
+ // for the narrow-container rule below to ever switch this row from a flex row
3166
+ // to a grid (see that rule's own comment for why it needs to).
3164
3167
  height: "100%",
3165
3168
  padding: "0 12px",
3166
3169
  cursor: draggable ? "grab" : void 0,
@@ -3170,10 +3173,20 @@ function EntityRow({
3170
3173
  ...style
3171
3174
  },
3172
3175
  children: [
3173
- draggable ? /* @__PURE__ */ (0, import_jsx_runtime40.jsx)("i", { className: "ph ph-dots-six-vertical", "aria-hidden": "true", style: { fontSize: 14, flex: "none", color: "var(--text-muted)" } }) : null,
3176
+ draggable ? /* @__PURE__ */ (0, import_jsx_runtime40.jsx)("i", { className: "ph ph-dots-six-vertical fd-erow-grip", "aria-hidden": "true", style: { fontSize: 14, flex: "none", color: "var(--text-muted)" } }) : null,
3174
3177
  /* @__PURE__ */ (0, import_jsx_runtime40.jsxs)("span", { className: "fd-erow-body", children: [
3175
3178
  /* @__PURE__ */ (0, import_jsx_runtime40.jsxs)("span", { className: "fd-erow-titleline", children: [
3176
- /* @__PURE__ */ (0, import_jsx_runtime40.jsx)("span", { className: "fd-erow-title fd-body-sm", children: title }),
3179
+ titleIcon ? /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(Tooltip, { label: titleIcon.tooltip, children: /* @__PURE__ */ (0, import_jsx_runtime40.jsxs)(
3180
+ "button",
3181
+ {
3182
+ type: "button",
3183
+ className: ["fd-erow-title-icon", titleIcon.tone ? "is-" + titleIcon.tone : ""].filter(Boolean).join(" "),
3184
+ children: [
3185
+ /* @__PURE__ */ (0, import_jsx_runtime40.jsx)("i", { className: "ph ph-" + titleIcon.icon, "aria-hidden": "true" }),
3186
+ /* @__PURE__ */ (0, import_jsx_runtime40.jsx)("span", { className: "fd-erow-title fd-body-sm", children: title })
3187
+ ]
3188
+ }
3189
+ ) }) : /* @__PURE__ */ (0, import_jsx_runtime40.jsx)("span", { className: "fd-erow-title fd-body-sm", children: title }),
3177
3190
  meta ? /* @__PURE__ */ (0, import_jsx_runtime40.jsx)("span", { className: "fd-erow-meta", children: meta }) : null
3178
3191
  ] }),
3179
3192
  hasStrip ? /* @__PURE__ */ (0, import_jsx_runtime40.jsxs)("span", { className: "fd-erow-strip", children: [
@@ -3187,7 +3200,7 @@ function EntityRow({
3187
3200
  icon: action.icon,
3188
3201
  label: action.label,
3189
3202
  size: "sm",
3190
- variant: "solid",
3203
+ variant: action.tone ? "soft" : "solid",
3191
3204
  tone: action.tone === "add" ? "ok" : action.tone === "remove" ? "danger" : "neutral",
3192
3205
  className: "fd-erow-action",
3193
3206
  onClick: action.onClick
@@ -8356,7 +8369,7 @@ function SaturationDistribution({ campuses = [], floorBand, floorScore, onSelect
8356
8369
  const tallest = Math.max(1, ...grouped.map((g) => g.items.length));
8357
8370
  const floor = BANDS2.find((b) => b.key === floorBand) || BANDS2[0];
8358
8371
  return /* @__PURE__ */ (0, import_jsx_runtime66.jsxs)("div", { className: ["fd-stack", className].filter(Boolean).join(" "), style: { gap: 16 }, children: [
8359
- /* @__PURE__ */ (0, import_jsx_runtime66.jsx)("div", { style: { display: "grid", gridTemplateColumns: "repeat(4,1fr)", gap: 12, alignItems: "end" }, children: grouped.map((g) => {
8372
+ /* @__PURE__ */ (0, import_jsx_runtime66.jsx)("div", { style: { display: "grid", gridTemplateColumns: "repeat(4,minmax(0,1fr))", gap: 12, alignItems: "end" }, children: grouped.map((g) => {
8360
8373
  const mark = "var(--csi-" + g.n + "-mark)";
8361
8374
  const active = selectedBand === g.key;
8362
8375
  return /* @__PURE__ */ (0, import_jsx_runtime66.jsxs)(
@@ -8364,16 +8377,23 @@ function SaturationDistribution({ campuses = [], floorBand, floorScore, onSelect
8364
8377
  {
8365
8378
  type: "button",
8366
8379
  onClick: onSelectBand ? () => onSelectBand(active ? null : g.key) : void 0,
8367
- style: { display: "flex", flexDirection: "column", justifyContent: "flex-end", gap: 10, padding: 12, border: "1px solid " + (active ? "var(--border-strong)" : "var(--border)"), borderRadius: "var(--r-lg)", background: active ? "var(--surface-2)" : "var(--surface)", cursor: onSelectBand ? "pointer" : "default", textAlign: "left", minHeight: 190, transition: "background var(--dur-fast) var(--ease),border-color var(--dur-fast) var(--ease)" },
8380
+ style: { display: "flex", flexDirection: "column", justifyContent: "flex-end", gap: 10, padding: 12, border: "1px solid " + (active ? "var(--border-strong)" : "var(--border)"), borderRadius: "var(--r-lg)", background: active ? "var(--surface-2)" : "var(--surface)", cursor: onSelectBand ? "pointer" : "default", textAlign: "left", minHeight: 190, minWidth: 0, transition: "background var(--dur-fast) var(--ease),border-color var(--dur-fast) var(--ease)" },
8368
8381
  children: [
8369
- /* @__PURE__ */ (0, import_jsx_runtime66.jsx)("span", { style: { display: "flex", flexDirection: "column-reverse", gap: 4, minHeight: tallest * 24 }, children: loading ? Array.from({ length: 3 }).map((_, i) => /* @__PURE__ */ (0, import_jsx_runtime66.jsx)("span", { className: "fd-skel", style: { height: 16, borderRadius: 4 } }, i)) : g.items.map((c) => /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(
8370
- "span",
8371
- {
8372
- title: c.name + " \xB7 " + c.crp,
8373
- style: { height: 18, borderRadius: 4, background: "var(--csi-" + g.n + "-fill)", border: "1px solid var(--csi-" + g.n + "-edge)", color: "var(--csi-" + g.n + "-text)", display: "flex", alignItems: "center", padding: "0 7px", fontSize: 10, fontWeight: 700, overflow: "hidden", whiteSpace: "nowrap" },
8374
- children: c.short || c.name
8375
- },
8376
- c.name
8382
+ /* @__PURE__ */ (0, import_jsx_runtime66.jsx)("span", { style: { display: "flex", flexDirection: "column-reverse", gap: 4, minHeight: tallest * 24, minWidth: 0 }, children: loading ? Array.from({ length: 3 }).map((_, i) => /* @__PURE__ */ (0, import_jsx_runtime66.jsx)("span", { className: "fd-skel", style: { height: 16, borderRadius: 4 } }, i)) : g.items.map((c) => (
8383
+ // `overflow: hidden` + `white-space: nowrap` only clips once the span
8384
+ // actually HAS a bounded width to clip against (see the grid/flex
8385
+ // `minWidth: 0` chain above) `textOverflow: ellipsis` then makes
8386
+ // that clip readable instead of a hard cut mid-letter; the full name
8387
+ // is still one hover away via `title`.
8388
+ /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(
8389
+ "span",
8390
+ {
8391
+ title: c.name + " \xB7 " + c.crp,
8392
+ style: { height: 18, borderRadius: 4, background: "var(--csi-" + g.n + "-fill)", border: "1px solid var(--csi-" + g.n + "-edge)", color: "var(--csi-" + g.n + "-text)", display: "flex", alignItems: "center", padding: "0 7px", fontSize: 10, fontWeight: 700, overflow: "hidden", whiteSpace: "nowrap", textOverflow: "ellipsis" },
8393
+ children: c.short || c.name
8394
+ },
8395
+ c.name
8396
+ )
8377
8397
  )) }),
8378
8398
  /* @__PURE__ */ (0, import_jsx_runtime66.jsxs)("span", { className: "fd-row", style: { gap: 8, alignItems: "baseline" }, children: [
8379
8399
  /* @__PURE__ */ (0, import_jsx_runtime66.jsx)("span", { className: "fd-num-hero", style: { fontSize: 30, color: g.items.length ? "var(--text)" : "var(--text-disabled)" }, children: loading ? "\u2013" : g.items.length }),