@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/CHANGELOG.md +22 -2
- package/dist/carousel.js +2 -2
- package/dist/{chunk-XXZA2JUP.js → chunk-2PO3N42Q.js} +2 -2
- package/dist/{chunk-ZRHVA3DL.js → chunk-AV5C4YLL.js} +2 -1
- package/dist/{chunk-ZRHVA3DL.js.map → chunk-AV5C4YLL.js.map} +1 -1
- package/dist/controls.cjs +1 -0
- package/dist/controls.cjs.map +1 -1
- package/dist/controls.js +2 -2
- package/dist/index.cjs +1 -0
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +2 -2
- package/dist/settings.cjs +1 -0
- package/dist/settings.cjs.map +1 -1
- package/dist/settings.js +1 -1
- package/dist/swipe-deck.cjs +10 -1
- package/dist/swipe-deck.cjs.map +1 -1
- package/dist/swipe-deck.css +2 -0
- package/dist/swipe-deck.js +10 -1
- package/dist/swipe-deck.js.map +1 -1
- package/package.json +2 -2
- /package/dist/{chunk-XXZA2JUP.js.map → chunk-2PO3N42Q.js.map} +0 -0
package/dist/settings.js
CHANGED
package/dist/swipe-deck.cjs
CHANGED
|
@@ -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;
|