@flytedan/flytebot-design-system 0.12.7 → 0.12.9

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.cts CHANGED
@@ -2416,8 +2416,16 @@ interface FeatureGateProps {
2416
2416
  variant?: "block" | "inline";
2417
2417
  /** When false, an incomplete-in-live-mode feature renders `fallback` instead of the ComingSoon banner. Default true. */
2418
2418
  preview?: boolean;
2419
- /** Permission that lets the viewer bypass the ComingSoon veil and use the feature early. Default "flags.manage". */
2420
- bypassPerm?: string;
2419
+ /**
2420
+ * Permission that lets the viewer bypass the ComingSoon veil and use the feature early.
2421
+ * Default `"flags.manage"`. Pass `null` to declare the gate NOT bypassable by anyone,
2422
+ * regardless of permissions — the veil still renders, but no "View and use it anyway"
2423
+ * control appears, and a bypass stored from before this call site turned `null` is
2424
+ * ignored rather than honored. Use this for a gate whose content is itself the problem
2425
+ * (e.g. fixture/demo data standing in for another record), where letting even an
2426
+ * administrator click through would show something untrue, not just something unfinished.
2427
+ */
2428
+ bypassPerm?: string | null;
2421
2429
  }
2422
2430
  /** Feature gate. ALWAYS silent when off — an unreleased feature should leave no trace. */
2423
2431
  declare function FeatureGate({ flag, fallback, children, onRoadmap, blur, minHeight, label, variant, preview, bypassPerm }: FeatureGateProps): React.ReactNode;
package/dist/index.d.ts CHANGED
@@ -2416,8 +2416,16 @@ interface FeatureGateProps {
2416
2416
  variant?: "block" | "inline";
2417
2417
  /** When false, an incomplete-in-live-mode feature renders `fallback` instead of the ComingSoon banner. Default true. */
2418
2418
  preview?: boolean;
2419
- /** Permission that lets the viewer bypass the ComingSoon veil and use the feature early. Default "flags.manage". */
2420
- bypassPerm?: string;
2419
+ /**
2420
+ * Permission that lets the viewer bypass the ComingSoon veil and use the feature early.
2421
+ * Default `"flags.manage"`. Pass `null` to declare the gate NOT bypassable by anyone,
2422
+ * regardless of permissions — the veil still renders, but no "View and use it anyway"
2423
+ * control appears, and a bypass stored from before this call site turned `null` is
2424
+ * ignored rather than honored. Use this for a gate whose content is itself the problem
2425
+ * (e.g. fixture/demo data standing in for another record), where letting even an
2426
+ * administrator click through would show something untrue, not just something unfinished.
2427
+ */
2428
+ bypassPerm?: string | null;
2421
2429
  }
2422
2430
  /** Feature gate. ALWAYS silent when off — an unreleased feature should leave no trace. */
2423
2431
  declare function FeatureGate({ flag, fallback, children, onRoadmap, blur, minHeight, label, variant, preview, bypassPerm }: FeatureGateProps): React.ReactNode;
package/dist/index.js CHANGED
@@ -7910,6 +7910,7 @@ function FeatureGate({
7910
7910
  if (!preview) return fallback;
7911
7911
  const f = SessionKit.findFlag(flag) || {};
7912
7912
  const missing = rt.missing || [];
7913
+ const canBypass = bypassPerm === null ? false : !bypassPerm || SessionKit.can(bypassPerm);
7913
7914
  return /* @__PURE__ */ jsx62(
7914
7915
  ComingSoon,
7915
7916
  {
@@ -7923,7 +7924,7 @@ function FeatureGate({
7923
7924
  minHeight,
7924
7925
  onRoadmap,
7925
7926
  bypassKey: flag,
7926
- canBypass: !bypassPerm || SessionKit.can(bypassPerm),
7927
+ canBypass,
7927
7928
  children
7928
7929
  }
7929
7930
  );
@@ -8151,7 +8152,7 @@ function SaturationDistribution({ campuses = [], floorBand, floorScore, onSelect
8151
8152
  const tallest = Math.max(1, ...grouped.map((g) => g.items.length));
8152
8153
  const floor = BANDS2.find((b) => b.key === floorBand) || BANDS2[0];
8153
8154
  return /* @__PURE__ */ jsxs61("div", { className: ["fd-stack", className].filter(Boolean).join(" "), style: { gap: 16 }, children: [
8154
- /* @__PURE__ */ jsx65("div", { style: { display: "grid", gridTemplateColumns: "repeat(4,1fr)", gap: 12, alignItems: "end" }, children: grouped.map((g) => {
8155
+ /* @__PURE__ */ jsx65("div", { style: { display: "grid", gridTemplateColumns: "repeat(4,minmax(0,1fr))", gap: 12, alignItems: "end" }, children: grouped.map((g) => {
8155
8156
  const mark = "var(--csi-" + g.n + "-mark)";
8156
8157
  const active = selectedBand === g.key;
8157
8158
  return /* @__PURE__ */ jsxs61(
@@ -8159,16 +8160,23 @@ function SaturationDistribution({ campuses = [], floorBand, floorScore, onSelect
8159
8160
  {
8160
8161
  type: "button",
8161
8162
  onClick: onSelectBand ? () => onSelectBand(active ? null : g.key) : void 0,
8162
- 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)" },
8163
+ 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)" },
8163
8164
  children: [
8164
- /* @__PURE__ */ jsx65("span", { style: { display: "flex", flexDirection: "column-reverse", gap: 4, minHeight: tallest * 24 }, children: loading ? Array.from({ length: 3 }).map((_, i) => /* @__PURE__ */ jsx65("span", { className: "fd-skel", style: { height: 16, borderRadius: 4 } }, i)) : g.items.map((c) => /* @__PURE__ */ jsx65(
8165
- "span",
8166
- {
8167
- title: c.name + " \xB7 " + c.crp,
8168
- 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" },
8169
- children: c.short || c.name
8170
- },
8171
- c.name
8165
+ /* @__PURE__ */ jsx65("span", { style: { display: "flex", flexDirection: "column-reverse", gap: 4, minHeight: tallest * 24, minWidth: 0 }, children: loading ? Array.from({ length: 3 }).map((_, i) => /* @__PURE__ */ jsx65("span", { className: "fd-skel", style: { height: 16, borderRadius: 4 } }, i)) : g.items.map((c) => (
8166
+ // `overflow: hidden` + `white-space: nowrap` only clips once the span
8167
+ // actually HAS a bounded width to clip against (see the grid/flex
8168
+ // `minWidth: 0` chain above) `textOverflow: ellipsis` then makes
8169
+ // that clip readable instead of a hard cut mid-letter; the full name
8170
+ // is still one hover away via `title`.
8171
+ /* @__PURE__ */ jsx65(
8172
+ "span",
8173
+ {
8174
+ title: c.name + " \xB7 " + c.crp,
8175
+ 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" },
8176
+ children: c.short || c.name
8177
+ },
8178
+ c.name
8179
+ )
8172
8180
  )) }),
8173
8181
  /* @__PURE__ */ jsxs61("span", { className: "fd-row", style: { gap: 8, alignItems: "baseline" }, children: [
8174
8182
  /* @__PURE__ */ jsx65("span", { className: "fd-num-hero", style: { fontSize: 30, color: g.items.length ? "var(--text)" : "var(--text-disabled)" }, children: loading ? "\u2013" : g.items.length }),