@ai-matrx/records-ui 0.115.85 → 0.115.86

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.js CHANGED
@@ -7379,13 +7379,31 @@ function keptAsideReason(field2, entry) {
7379
7379
  }
7380
7380
  function KeptAsideValue({ field: field2, entry, shown: shown5 }) {
7381
7381
  const why = keptAsideReason(field2, entry);
7382
+ const open = useRecordsUi().openPerson;
7383
+ const person = (Array.isArray(entry.value) ? entry.value : [entry.value]).find(isUserId);
7384
+ const opens = open && typeof person === "string";
7382
7385
  return /* @__PURE__ */ jsx29(
7383
7386
  "span",
7384
7387
  {
7385
7388
  "data-records-kept-aside": field2.key,
7386
7389
  title: why,
7387
7390
  "aria-label": `${shown5}. ${why}`,
7388
- className: "cursor-help rounded-sm bg-amber-500/10 px-0.5 text-amber-700 dark:text-amber-300",
7391
+ className: `${opens ? "cursor-pointer underline-offset-2 hover:underline" : "cursor-help"} rounded-sm bg-amber-500/10 px-0.5 text-amber-700 dark:text-amber-300`,
7392
+ ...opens ? {
7393
+ role: "button",
7394
+ tabIndex: 0,
7395
+ onClick: (e) => {
7396
+ e.stopPropagation();
7397
+ void openStoredPerson(person, open);
7398
+ },
7399
+ onKeyDown: (e) => {
7400
+ if (e.key === "Enter" || e.key === " ") {
7401
+ e.preventDefault();
7402
+ e.stopPropagation();
7403
+ void openStoredPerson(person, open);
7404
+ }
7405
+ }
7406
+ } : {},
7389
7407
  children: shown5
7390
7408
  }
7391
7409
  );