@ai-matrx/design-system 0.21.5 → 0.21.6

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.
@@ -45,6 +45,8 @@ var Search = (p) => /* @__PURE__ */ jsxs(Icon, { ...p, children: [
45
45
  /* @__PURE__ */ jsx("path", { d: "m16 16 4 4" })
46
46
  ] });
47
47
  var Plus = (p) => /* @__PURE__ */ jsx(Icon, { ...p, children: path });
48
+ var Star = (p) => /* @__PURE__ */ jsx(Icon, { ...p, children: /* @__PURE__ */ jsx("path", { d: "m12 2 3.09 6.26L22 9.27l-5 4.87 1.18 6.88L12 17.77l-6.18 3.25L7 14.14 2 9.27l6.91-1.01L12 2z" }) });
49
+ var Pin = (p) => /* @__PURE__ */ jsx(Icon, { ...p, children: /* @__PURE__ */ jsx("path", { d: "M12 17v5M9 3h6l1 7 3 3v2H5v-2l3-3 1-7z" }) });
48
50
  var Eraser = (p) => /* @__PURE__ */ jsx(Icon, { ...p, children: /* @__PURE__ */ jsx("path", { d: "m16 3 5 5-11 11H5l-3-3L13 5l3-2Z M8 10l6 6 M10 19h12" }) });
49
51
  var GripVertical = (p) => /* @__PURE__ */ jsxs(Icon, { ...p, children: [
50
52
  /* @__PURE__ */ jsx("circle", { cx: "9", cy: "6", r: "1" }),
@@ -11681,6 +11683,28 @@ function DefaultJsonCell({ value }) {
11681
11683
  /* @__PURE__ */ jsx41(DataRowWindow, { isOpen: open, onClose: () => setOpen(false), title: "JSON value", row: value, viewContent: Viewer ? /* @__PURE__ */ jsx41(Viewer, { data: value }) : /* @__PURE__ */ jsx41("pre", { className: "overflow-auto whitespace-pre-wrap p-3 text-xs", children: text }) })
11682
11684
  ] });
11683
11685
  }
11686
+ function DefaultMarkerCell({
11687
+ marker,
11688
+ value
11689
+ }) {
11690
+ const label = marker === "favorite" ? value ? "Favorite" : "Not favorite" : value ? "Pinned" : "Not pinned";
11691
+ const Icon3 = marker === "favorite" ? Star : Pin;
11692
+ return /* @__PURE__ */ jsxs31(Tooltip, { children: [
11693
+ /* @__PURE__ */ jsx41(TooltipTrigger, { asChild: true, children: /* @__PURE__ */ jsx41(
11694
+ "span",
11695
+ {
11696
+ role: "img",
11697
+ "aria-label": label,
11698
+ className: cn(
11699
+ "inline-flex size-5 items-center justify-center",
11700
+ value ? "text-amber-500" : "text-muted-foreground/45"
11701
+ ),
11702
+ children: /* @__PURE__ */ jsx41(Icon3, { className: "size-4", ...value ? { fill: "currentColor" } : {} })
11703
+ }
11704
+ ) }),
11705
+ /* @__PURE__ */ jsx41(TooltipContent, { children: label })
11706
+ ] });
11707
+ }
11684
11708
  function renderCell(row, col, index) {
11685
11709
  if (col.cell) return col.cell(row, index);
11686
11710
  const raw = getCellValue(row, col);
@@ -11703,6 +11727,8 @@ function renderCell(row, col, index) {
11703
11727
  }
11704
11728
  if (raw !== null && typeof raw === "object" && !(raw instanceof Date)) return /* @__PURE__ */ jsx41(DefaultJsonCell, { value: raw });
11705
11729
  if (typeof raw === "boolean") {
11730
+ const marker = resolveColumnMarker(col);
11731
+ if (marker) return /* @__PURE__ */ jsx41(DefaultMarkerCell, { marker, value: raw });
11706
11732
  return /* @__PURE__ */ jsx41("span", { className: raw ? "rounded bg-emerald-500/10 px-1.5 py-0.5 text-xs text-emerald-600" : "rounded bg-slate-500/10 px-1.5 py-0.5 text-xs text-muted-foreground", children: raw ? "Yes" : "No" });
11707
11733
  }
11708
11734
  const formatted = formatTableDisplayValue(raw);