@ai-matrx/design-system 0.86.355 → 0.86.356

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/settings.js CHANGED
@@ -5,7 +5,7 @@ import {
5
5
  } from "./chunk-XEXSZBXV.js";
6
6
  import {
7
7
  Slider
8
- } from "./chunk-ZRHVA3DL.js";
8
+ } from "./chunk-AV5C4YLL.js";
9
9
  import {
10
10
  Command,
11
11
  CommandEmpty,
@@ -2151,6 +2151,15 @@ function SwipeDeck(props) {
2151
2151
  view.addEventListener("keydown", onKey);
2152
2152
  return () => view.removeEventListener("keydown", onKey);
2153
2153
  }, [keyboard, layout]);
2154
+ const cardId = cardItem?.id ?? null;
2155
+ React6.useEffect(() => {
2156
+ if (!keyboard || layout === "inline" || cardId === null) return;
2157
+ const root = rootRef.current;
2158
+ const active = root?.ownerDocument.activeElement;
2159
+ if (!root || active && root.contains(active)) return;
2160
+ if (active?.closest("input, textarea, select, [contenteditable='true'], [role='dialog'], [role='alertdialog'], [role='menu'], [role='listbox']")) return;
2161
+ root.focus({ preventScroll: true });
2162
+ }, [cardId, keyboard, layout]);
2154
2163
  const fingerRef = React6.useRef(null);
2155
2164
  const ringRef = React6.useRef(null);
2156
2165
  const capRef = React6.useRef(null);
@@ -2319,7 +2328,7 @@ function SwipeDeck(props) {
2319
2328
  const root = e.currentTarget;
2320
2329
  if (!root.contains(root.ownerDocument.activeElement)) root.focus({ preventScroll: true });
2321
2330
  }
2322
- } : {},
2331
+ } : { tabIndex: -1 },
2323
2332
  children: [
2324
2333
  /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("div", { className: "matrx-sd-progress", "aria-hidden": "true", children: progress.map((s, k) => {
2325
2334
  const tone = k === stepIndex ? "current" : s.kind === "card" ? findAnswer(rules, s.item, state.answers[s.item.id])?.tone : s.kind === "pick" && state.picks[s.group] ? "primary" : void 0;