@flytedan/flytebot-design-system 0.49.1 → 0.49.2

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
@@ -158,27 +158,6 @@ declare function usePopoverPosition(open: boolean, anchorRef: React.RefObject<HT
158
158
  /** The rendered layer, so its real size replaces the estimates once it exists. */
159
159
  layerRef?: React.RefObject<HTMLElement>;
160
160
  }): PopoverPosition | null;
161
- /**
162
- * MP-268: a portalled overlay's z-index is no longer decided here. It used to be a second,
163
- * independently-timed mechanism (MP-142) — a value passed down through its own React context,
164
- * separate from the layer stack's ownership context (`kits/layerStack.tsx`) that already
165
- * decides Escape and Tab order. The two could disagree: a child overlay opened in the very
166
- * same commit as its parent could read the parent's not-yet-registered placeholder z-index
167
- * and mistake itself for a root overlay, racing its own parent for a root slot instead of
168
- * always outranking it (the reported bug — a Modal opened in the same commit as its Drawer
169
- * painted under it, though focus was correctly inside the Modal).
170
- *
171
- * Every overlay that escapes the DOM via `portal()` or `createPortal` directly — Popover
172
- * (and everything built on it), Drawer, Modal, Tooltip — now reads its z-index from
173
- * `useLayerZIndex(layer)` (`kits/layerStack.tsx`), passing the SAME `layer` object
174
- * `useStackedLayer` gave it. That function derives the number purely from `layer.parent` —
175
- * the same ownership fact already used for focus — so the two can never disagree again:
176
- * one fact, one mechanism. See `useLayerZIndex`'s own comment for the exact rule (child
177
- * always LAYER_STEP+ above its resolved parent; a root layer ranks by position among the
178
- * other currently-open root layers). Import `useLayerZIndex`/`LAYER_STEP`/`ROOT_STEP`/
179
- * `OVERLAY_CEILING`/`__resetLayerStackForTests` from `kits/layerStack` directly — this file
180
- * no longer re-exports them; there is exactly one place they live now.
181
- */
182
161
  /**
183
162
  * An anchored floating surface: menus, pickers, disclosure panels, meters.
184
163
  * Owns placement, dismissal, focus return — and its own layout, which is the one rule
@@ -898,6 +877,12 @@ interface TagProps {
898
877
  tone?: "neutral" | "info" | "success" | "warning" | "danger";
899
878
  onRemove?: () => void;
900
879
  onClick?: () => void;
880
+ /** MP-282: a native tooltip for the chip's full text — the same full text that is
881
+ * already the button's accessible name (its text content), so this only helps a
882
+ * sighted mouse user whose chip a caller (FilterBar, scoped to `.fd-filterbar .fd-tag`
883
+ * in components.css) has visually truncated with an ellipsis. Harmless, and invisible,
884
+ * on a chip nobody truncates. */
885
+ title?: string;
901
886
  className?: string;
902
887
  }
903
888
  declare function Tag({ children, icon, selected, tone, onRemove, onClick, className, ...rest }: TagProps): React.JSX.Element;
@@ -4899,8 +4884,8 @@ declare const LAYER_STEP = 10;
4899
4884
  * page chrome (a sticky header, the off-canvas rail's own resting z-index) must stay under
4900
4885
  * this, so no page z-index can ever outrank an overlay. */
4901
4886
  declare const ROOT_STEP = 100;
4902
- /** Guaranteed to sit above any z-index this mechanism can ever compute — see Popover.tsx's
4903
- * TransferList drag-ghost use. Not part of the layer tree; nothing derives from it. */
4887
+ /** Guaranteed to sit above any z-index this mechanism can ever compute — see
4888
+ * TransferList.tsx's drag-ghost use. Not part of the layer tree; nothing derives from it. */
4904
4889
  declare const OVERLAY_CEILING = 10000;
4905
4890
  /** The z-index `layer` should render at right now — 0 while it is closed (nothing should be
4906
4891
  * positioning off it then). Re-renders whenever any layer anywhere opens or closes, since
package/dist/index.d.ts CHANGED
@@ -158,27 +158,6 @@ declare function usePopoverPosition(open: boolean, anchorRef: React.RefObject<HT
158
158
  /** The rendered layer, so its real size replaces the estimates once it exists. */
159
159
  layerRef?: React.RefObject<HTMLElement>;
160
160
  }): PopoverPosition | null;
161
- /**
162
- * MP-268: a portalled overlay's z-index is no longer decided here. It used to be a second,
163
- * independently-timed mechanism (MP-142) — a value passed down through its own React context,
164
- * separate from the layer stack's ownership context (`kits/layerStack.tsx`) that already
165
- * decides Escape and Tab order. The two could disagree: a child overlay opened in the very
166
- * same commit as its parent could read the parent's not-yet-registered placeholder z-index
167
- * and mistake itself for a root overlay, racing its own parent for a root slot instead of
168
- * always outranking it (the reported bug — a Modal opened in the same commit as its Drawer
169
- * painted under it, though focus was correctly inside the Modal).
170
- *
171
- * Every overlay that escapes the DOM via `portal()` or `createPortal` directly — Popover
172
- * (and everything built on it), Drawer, Modal, Tooltip — now reads its z-index from
173
- * `useLayerZIndex(layer)` (`kits/layerStack.tsx`), passing the SAME `layer` object
174
- * `useStackedLayer` gave it. That function derives the number purely from `layer.parent` —
175
- * the same ownership fact already used for focus — so the two can never disagree again:
176
- * one fact, one mechanism. See `useLayerZIndex`'s own comment for the exact rule (child
177
- * always LAYER_STEP+ above its resolved parent; a root layer ranks by position among the
178
- * other currently-open root layers). Import `useLayerZIndex`/`LAYER_STEP`/`ROOT_STEP`/
179
- * `OVERLAY_CEILING`/`__resetLayerStackForTests` from `kits/layerStack` directly — this file
180
- * no longer re-exports them; there is exactly one place they live now.
181
- */
182
161
  /**
183
162
  * An anchored floating surface: menus, pickers, disclosure panels, meters.
184
163
  * Owns placement, dismissal, focus return — and its own layout, which is the one rule
@@ -898,6 +877,12 @@ interface TagProps {
898
877
  tone?: "neutral" | "info" | "success" | "warning" | "danger";
899
878
  onRemove?: () => void;
900
879
  onClick?: () => void;
880
+ /** MP-282: a native tooltip for the chip's full text — the same full text that is
881
+ * already the button's accessible name (its text content), so this only helps a
882
+ * sighted mouse user whose chip a caller (FilterBar, scoped to `.fd-filterbar .fd-tag`
883
+ * in components.css) has visually truncated with an ellipsis. Harmless, and invisible,
884
+ * on a chip nobody truncates. */
885
+ title?: string;
901
886
  className?: string;
902
887
  }
903
888
  declare function Tag({ children, icon, selected, tone, onRemove, onClick, className, ...rest }: TagProps): React.JSX.Element;
@@ -4899,8 +4884,8 @@ declare const LAYER_STEP = 10;
4899
4884
  * page chrome (a sticky header, the off-canvas rail's own resting z-index) must stay under
4900
4885
  * this, so no page z-index can ever outrank an overlay. */
4901
4886
  declare const ROOT_STEP = 100;
4902
- /** Guaranteed to sit above any z-index this mechanism can ever compute — see Popover.tsx's
4903
- * TransferList drag-ghost use. Not part of the layer tree; nothing derives from it. */
4887
+ /** Guaranteed to sit above any z-index this mechanism can ever compute — see
4888
+ * TransferList.tsx's drag-ghost use. Not part of the layer tree; nothing derives from it. */
4904
4889
  declare const OVERLAY_CEILING = 10000;
4905
4890
  /** The z-index `layer` should render at right now — 0 while it is closed (nothing should be
4906
4891
  * positioning off it then). Re-renders whenever any layer anywhere opens or closes, since
package/dist/index.js CHANGED
@@ -1779,7 +1779,7 @@ function Tag({ children, icon, selected = false, tone = "neutral", onRemove, onC
1779
1779
  ...rest,
1780
1780
  children: [
1781
1781
  icon ? /* @__PURE__ */ jsx30("i", { className: "ph ph-" + icon, "aria-hidden": "true" }) : null,
1782
- children,
1782
+ /* @__PURE__ */ jsx30("span", { className: "fd-tag-label", children }),
1783
1783
  onRemove ? /* @__PURE__ */ jsx30(
1784
1784
  "span",
1785
1785
  {
@@ -2561,7 +2561,7 @@ function BarList({
2561
2561
  const isEmpty = state === "ready" && ordered.every((r) => !(Number(r.value) > 0));
2562
2562
  const effectiveState = isEmpty ? "empty" : state;
2563
2563
  const maxValue = ordered.reduce((m, r) => Math.max(m, Number(r.value) || 0), 0) || 1;
2564
- const effectiveTotal = total != null ? total : ordered.reduce((n, r) => n + (Number(r.value) || 0), 0);
2564
+ const effectiveTotal = total != null ? total : rows.reduce((n, r) => n + (Number(r.value) || 0), 0);
2565
2565
  return /* @__PURE__ */ jsx38("div", { className: ["fd-barlist", className].filter(Boolean).join(" "), children: /* @__PURE__ */ jsxs30(
2566
2566
  LoadingRegion,
2567
2567
  {
@@ -4314,11 +4314,11 @@ function FilterBar({ fields = [], filters, onFilterChange, onFilterRemove, align
4314
4314
  };
4315
4315
  const chipText = field.label + (set ? ": " + chipLabel(field, value) : "");
4316
4316
  if (field.type === "text") {
4317
- return /* @__PURE__ */ jsx47(Tag, { selected: true, onClick: toggleOrClose, onRemove: remove, children: chipText }, field.key);
4317
+ return /* @__PURE__ */ jsx47(Tag, { selected: true, onClick: toggleOrClose, onRemove: remove, title: chipText, children: chipText }, field.key);
4318
4318
  }
4319
4319
  if (field.type === "select") {
4320
- return /* @__PURE__ */ jsxs39("span", { children: [
4321
- /* @__PURE__ */ jsx47("span", { ref: chipRef, children: /* @__PURE__ */ jsx47(Tag, { selected: true, onClick: toggleOrClose, onRemove: remove, children: chipText }) }),
4320
+ return /* @__PURE__ */ jsxs39("span", { className: "fd-filterbar-chip", children: [
4321
+ /* @__PURE__ */ jsx47("span", { ref: chipRef, children: /* @__PURE__ */ jsx47(Tag, { selected: true, onClick: toggleOrClose, onRemove: remove, title: chipText, children: chipText }) }),
4322
4322
  editing ? /* @__PURE__ */ jsx47(
4323
4323
  Popover,
4324
4324
  {
@@ -4352,8 +4352,8 @@ function FilterBar({ fields = [], filters, onFilterChange, onFilterRemove, align
4352
4352
  ] }, field.key);
4353
4353
  }
4354
4354
  if (field.type === "multiSelect") {
4355
- return /* @__PURE__ */ jsxs39("span", { children: [
4356
- /* @__PURE__ */ jsx47("span", { ref: chipRef, children: /* @__PURE__ */ jsx47(Tag, { selected: true, onClick: toggleOrClose, onRemove: remove, children: chipText }) }),
4355
+ return /* @__PURE__ */ jsxs39("span", { className: "fd-filterbar-chip", children: [
4356
+ /* @__PURE__ */ jsx47("span", { ref: chipRef, children: /* @__PURE__ */ jsx47(Tag, { selected: true, onClick: toggleOrClose, onRemove: remove, title: chipText, children: chipText }) }),
4357
4357
  editing ? /* @__PURE__ */ jsx47(
4358
4358
  MultiSelectPanel,
4359
4359
  {
@@ -4367,8 +4367,8 @@ function FilterBar({ fields = [], filters, onFilterChange, onFilterRemove, align
4367
4367
  ] }, field.key);
4368
4368
  }
4369
4369
  if (field.type === "range") {
4370
- return /* @__PURE__ */ jsxs39("span", { children: [
4371
- /* @__PURE__ */ jsx47("span", { ref: chipRef, children: /* @__PURE__ */ jsx47(Tag, { selected: true, onClick: toggleOrClose, onRemove: remove, children: chipText }) }),
4370
+ return /* @__PURE__ */ jsxs39("span", { className: "fd-filterbar-chip", children: [
4371
+ /* @__PURE__ */ jsx47("span", { ref: chipRef, children: /* @__PURE__ */ jsx47(Tag, { selected: true, onClick: toggleOrClose, onRemove: remove, title: chipText, children: chipText }) }),
4372
4372
  editing ? /* @__PURE__ */ jsx47(
4373
4373
  RangePanel,
4374
4374
  {
@@ -4382,8 +4382,8 @@ function FilterBar({ fields = [], filters, onFilterChange, onFilterRemove, align
4382
4382
  ] }, field.key);
4383
4383
  }
4384
4384
  if (field.type === "date") {
4385
- return /* @__PURE__ */ jsxs39("span", { children: [
4386
- /* @__PURE__ */ jsx47("span", { ref: chipRef, children: /* @__PURE__ */ jsx47(Tag, { selected: true, onClick: toggleOrClose, onRemove: remove, children: chipText }) }),
4385
+ return /* @__PURE__ */ jsxs39("span", { className: "fd-filterbar-chip", children: [
4386
+ /* @__PURE__ */ jsx47("span", { ref: chipRef, children: /* @__PURE__ */ jsx47(Tag, { selected: true, onClick: toggleOrClose, onRemove: remove, title: chipText, children: chipText }) }),
4387
4387
  editing ? /* @__PURE__ */ jsx47(
4388
4388
  DatePanel,
4389
4389
  {