@tamagui/roving-focus 2.0.0-rc.3 → 2.0.0-rc.30
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/cjs/index.js +11 -8
- package/dist/esm/index.js +1 -1
- package/dist/esm/index.js.map +1 -6
- package/package.json +14 -17
- package/dist/cjs/RovingFocusGroup.js +0 -206
- package/dist/cjs/RovingFocusGroup.js.map +0 -6
- package/dist/esm/RovingFocusGroup.js +0 -190
- package/dist/esm/RovingFocusGroup.js.map +0 -6
package/dist/cjs/index.js
CHANGED
|
@@ -3,13 +3,16 @@ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
|
3
3
|
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
4
4
|
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
5
5
|
var __copyProps = (to, from, except, desc) => {
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
6
|
+
if (from && typeof from == "object" || typeof from == "function") for (let key of __getOwnPropNames(from)) !__hasOwnProp.call(to, key) && key !== except && __defProp(to, key, {
|
|
7
|
+
get: () => from[key],
|
|
8
|
+
enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
|
|
9
|
+
});
|
|
10
|
+
return to;
|
|
11
|
+
},
|
|
12
|
+
__reExport = (target, mod, secondTarget) => (__copyProps(target, mod, "default"), secondTarget && __copyProps(secondTarget, mod, "default"));
|
|
13
|
+
var __toCommonJS = mod => __copyProps(__defProp({}, "__esModule", {
|
|
14
|
+
value: !0
|
|
15
|
+
}), mod);
|
|
12
16
|
var index_exports = {};
|
|
13
17
|
module.exports = __toCommonJS(index_exports);
|
|
14
|
-
__reExport(index_exports, require("./RovingFocusGroup"), module.exports);
|
|
15
|
-
//# sourceMappingURL=index.js.map
|
|
18
|
+
__reExport(index_exports, require("./RovingFocusGroup.cjs"), module.exports);
|
package/dist/esm/index.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export * from "./RovingFocusGroup";
|
|
1
|
+
export * from "./RovingFocusGroup.mjs";
|
|
2
2
|
//# sourceMappingURL=index.js.map
|
package/dist/esm/index.js.map
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tamagui/roving-focus",
|
|
3
|
-
"version": "2.0.0-rc.
|
|
3
|
+
"version": "2.0.0-rc.30",
|
|
4
4
|
"gitHead": "a49cc7ea6b93ba384e77a4880ae48ac4a5635c14",
|
|
5
5
|
"source": "src/index.ts",
|
|
6
6
|
"files": [
|
|
@@ -19,15 +19,12 @@
|
|
|
19
19
|
"./package.json": "./package.json",
|
|
20
20
|
".": {
|
|
21
21
|
"types": "./types/index.d.ts",
|
|
22
|
-
"react-native":
|
|
23
|
-
|
|
24
|
-
"import": "./dist/esm/index.native.js",
|
|
25
|
-
"require": "./dist/cjs/index.native.js"
|
|
26
|
-
},
|
|
22
|
+
"react-native": "./dist/esm/index.native.js",
|
|
23
|
+
"browser": "./dist/esm/index.mjs",
|
|
27
24
|
"module": "./dist/esm/index.mjs",
|
|
28
25
|
"import": "./dist/esm/index.mjs",
|
|
29
26
|
"require": "./dist/cjs/index.cjs",
|
|
30
|
-
"default": "./dist/
|
|
27
|
+
"default": "./dist/esm/index.mjs"
|
|
31
28
|
}
|
|
32
29
|
},
|
|
33
30
|
"publishConfig": {
|
|
@@ -40,18 +37,18 @@
|
|
|
40
37
|
"clean:build": "tamagui-build clean:build"
|
|
41
38
|
},
|
|
42
39
|
"dependencies": {
|
|
43
|
-
"@tamagui/collection": "2.0.0-rc.
|
|
44
|
-
"@tamagui/compose-refs": "2.0.0-rc.
|
|
45
|
-
"@tamagui/constants": "2.0.0-rc.
|
|
46
|
-
"@tamagui/core": "2.0.0-rc.
|
|
47
|
-
"@tamagui/create-context": "2.0.0-rc.
|
|
48
|
-
"@tamagui/helpers": "2.0.0-rc.
|
|
49
|
-
"@tamagui/use-controllable-state": "2.0.0-rc.
|
|
50
|
-
"@tamagui/use-direction": "2.0.0-rc.
|
|
51
|
-
"@tamagui/use-event": "2.0.0-rc.
|
|
40
|
+
"@tamagui/collection": "2.0.0-rc.30",
|
|
41
|
+
"@tamagui/compose-refs": "2.0.0-rc.30",
|
|
42
|
+
"@tamagui/constants": "2.0.0-rc.30",
|
|
43
|
+
"@tamagui/core": "2.0.0-rc.30",
|
|
44
|
+
"@tamagui/create-context": "2.0.0-rc.30",
|
|
45
|
+
"@tamagui/helpers": "2.0.0-rc.30",
|
|
46
|
+
"@tamagui/use-controllable-state": "2.0.0-rc.30",
|
|
47
|
+
"@tamagui/use-direction": "2.0.0-rc.30",
|
|
48
|
+
"@tamagui/use-event": "2.0.0-rc.30"
|
|
52
49
|
},
|
|
53
50
|
"devDependencies": {
|
|
54
|
-
"@tamagui/build": "2.0.0-rc.
|
|
51
|
+
"@tamagui/build": "2.0.0-rc.30",
|
|
55
52
|
"react": ">=19"
|
|
56
53
|
},
|
|
57
54
|
"peerDependencies": {
|
|
@@ -1,206 +0,0 @@
|
|
|
1
|
-
var __create = Object.create;
|
|
2
|
-
var __defProp = Object.defineProperty;
|
|
3
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
-
var __getProtoOf = Object.getPrototypeOf, __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
-
var __export = (target, all) => {
|
|
7
|
-
for (var name in all)
|
|
8
|
-
__defProp(target, name, { get: all[name], enumerable: !0 });
|
|
9
|
-
}, __copyProps = (to, from, except, desc) => {
|
|
10
|
-
if (from && typeof from == "object" || typeof from == "function")
|
|
11
|
-
for (let key of __getOwnPropNames(from))
|
|
12
|
-
!__hasOwnProp.call(to, key) && key !== except && __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
13
|
-
return to;
|
|
14
|
-
};
|
|
15
|
-
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
16
|
-
// If the importer is in node compatibility mode or this is not an ESM
|
|
17
|
-
// file that has been converted to a CommonJS file using a Babel-
|
|
18
|
-
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
19
|
-
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
20
|
-
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: !0 }) : target,
|
|
21
|
-
mod
|
|
22
|
-
)), __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: !0 }), mod);
|
|
23
|
-
var RovingFocusGroup_exports = {};
|
|
24
|
-
__export(RovingFocusGroup_exports, {
|
|
25
|
-
RovingFocusGroup: () => RovingFocusGroup,
|
|
26
|
-
RovingFocusGroupItem: () => RovingFocusGroupItem
|
|
27
|
-
});
|
|
28
|
-
module.exports = __toCommonJS(RovingFocusGroup_exports);
|
|
29
|
-
var import_collection = require("@tamagui/collection"), import_compose_refs = require("@tamagui/compose-refs"), import_constants = require("@tamagui/constants"), import_core = require("@tamagui/core"), import_helpers = require("@tamagui/helpers"), import_use_controllable_state = require("@tamagui/use-controllable-state"), import_use_direction = require("@tamagui/use-direction"), React = __toESM(require("react"), 1), import_jsx_runtime = require("react/jsx-runtime");
|
|
30
|
-
const ENTRY_FOCUS = "rovingFocusGroup.onEntryFocus", EVENT_OPTIONS = { bubbles: !1, cancelable: !0 }, RovingFocusGroupImpl = React.forwardRef((props, forwardedRef) => {
|
|
31
|
-
const {
|
|
32
|
-
__scopeRovingFocusGroup,
|
|
33
|
-
orientation,
|
|
34
|
-
loop = !1,
|
|
35
|
-
dir,
|
|
36
|
-
currentTabStopId: currentTabStopIdProp,
|
|
37
|
-
defaultCurrentTabStopId,
|
|
38
|
-
onCurrentTabStopIdChange,
|
|
39
|
-
onEntryFocus,
|
|
40
|
-
asChild,
|
|
41
|
-
...groupProps
|
|
42
|
-
} = props, ref = React.useRef(null), composedRefs = (0, import_compose_refs.useComposedRefs)(forwardedRef, ref), direction = (0, import_use_direction.useDirection)(dir), [currentTabStopId = null, setCurrentTabStopId] = (0, import_use_controllable_state.useControllableState)({
|
|
43
|
-
prop: currentTabStopIdProp,
|
|
44
|
-
defaultProp: defaultCurrentTabStopId ?? null,
|
|
45
|
-
onChange: onCurrentTabStopIdChange
|
|
46
|
-
}), [isTabbingBackOut, setIsTabbingBackOut] = React.useState(!1), handleEntryFocus = (0, import_core.useEvent)(onEntryFocus), getItems = useCollection(__scopeRovingFocusGroup || ROVING_FOCUS_GROUP_CONTEXT), isClickFocusRef = React.useRef(!1), [focusableItemsCount, setFocusableItemsCount] = React.useState(0), Comp = asChild ? import_core.Slot : import_core.View;
|
|
47
|
-
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
48
|
-
RovingFocusProvider,
|
|
49
|
-
{
|
|
50
|
-
scope: __scopeRovingFocusGroup,
|
|
51
|
-
orientation,
|
|
52
|
-
dir: direction,
|
|
53
|
-
loop,
|
|
54
|
-
currentTabStopId,
|
|
55
|
-
onItemFocus: React.useCallback(
|
|
56
|
-
(tabStopId) => setCurrentTabStopId(tabStopId),
|
|
57
|
-
[setCurrentTabStopId]
|
|
58
|
-
),
|
|
59
|
-
onItemShiftTab: React.useCallback(() => setIsTabbingBackOut(!0), []),
|
|
60
|
-
onFocusableItemAdd: React.useCallback(
|
|
61
|
-
() => setFocusableItemsCount((prevCount) => prevCount + 1),
|
|
62
|
-
[]
|
|
63
|
-
),
|
|
64
|
-
onFocusableItemRemove: React.useCallback(
|
|
65
|
-
() => setFocusableItemsCount((prevCount) => prevCount - 1),
|
|
66
|
-
[]
|
|
67
|
-
),
|
|
68
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
69
|
-
Comp,
|
|
70
|
-
{
|
|
71
|
-
tabIndex: isTabbingBackOut || focusableItemsCount === 0 ? -1 : 0,
|
|
72
|
-
"data-orientation": orientation,
|
|
73
|
-
...groupProps,
|
|
74
|
-
ref: composedRefs,
|
|
75
|
-
outlineStyle: "none",
|
|
76
|
-
onMouseDown: (0, import_helpers.composeEventHandlers)(props.onMouseDown, () => {
|
|
77
|
-
isClickFocusRef.current = !0;
|
|
78
|
-
}),
|
|
79
|
-
onFocus: (0, import_helpers.composeEventHandlers)(props.onFocus, (event) => {
|
|
80
|
-
const isKeyboardFocus = !isClickFocusRef.current;
|
|
81
|
-
if (event.target === event.currentTarget && isKeyboardFocus && !isTabbingBackOut) {
|
|
82
|
-
const entryFocusEvent = new CustomEvent(ENTRY_FOCUS, EVENT_OPTIONS);
|
|
83
|
-
if (handleEntryFocus(entryFocusEvent), !entryFocusEvent.defaultPrevented) {
|
|
84
|
-
const items = getItems().filter((item) => item.focusable), activeItem = items.find((item) => item.active), currentItem = items.find((item) => item.id === currentTabStopId), candidateNodes = [activeItem, currentItem, ...items].filter(
|
|
85
|
-
Boolean
|
|
86
|
-
).map((item) => item.ref.current);
|
|
87
|
-
focusFirst(candidateNodes, { focusVisible: !1 });
|
|
88
|
-
}
|
|
89
|
-
}
|
|
90
|
-
isClickFocusRef.current = !1;
|
|
91
|
-
}),
|
|
92
|
-
onBlur: (0, import_helpers.composeEventHandlers)(
|
|
93
|
-
props.onBlur,
|
|
94
|
-
() => setIsTabbingBackOut(!1)
|
|
95
|
-
)
|
|
96
|
-
}
|
|
97
|
-
)
|
|
98
|
-
}
|
|
99
|
-
);
|
|
100
|
-
}), ITEM_NAME = "RovingFocusGroupItem", RovingFocusGroupItem = React.forwardRef((props, forwardedRef) => {
|
|
101
|
-
const {
|
|
102
|
-
__scopeRovingFocusGroup,
|
|
103
|
-
focusable = !0,
|
|
104
|
-
active = !1,
|
|
105
|
-
tabStopId,
|
|
106
|
-
...itemProps
|
|
107
|
-
} = props, autoId = React.useId(), id = tabStopId || autoId, context = useRovingFocusContext(__scopeRovingFocusGroup), isCurrentTabStop = context.currentTabStopId === id, getItems = useCollection(__scopeRovingFocusGroup || ROVING_FOCUS_GROUP_CONTEXT), { onFocusableItemAdd, onFocusableItemRemove } = context;
|
|
108
|
-
return React.useEffect(() => {
|
|
109
|
-
if (focusable)
|
|
110
|
-
return onFocusableItemAdd(), () => onFocusableItemRemove();
|
|
111
|
-
}, [focusable, onFocusableItemAdd, onFocusableItemRemove]), /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
112
|
-
Collection.ItemSlot,
|
|
113
|
-
{
|
|
114
|
-
scope: __scopeRovingFocusGroup || ROVING_FOCUS_GROUP_CONTEXT,
|
|
115
|
-
id,
|
|
116
|
-
focusable,
|
|
117
|
-
active,
|
|
118
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
119
|
-
import_core.View,
|
|
120
|
-
{
|
|
121
|
-
tabIndex: focusable ? 0 : -1,
|
|
122
|
-
"data-orientation": context.orientation,
|
|
123
|
-
...itemProps,
|
|
124
|
-
ref: forwardedRef,
|
|
125
|
-
onMouseDown: (0, import_helpers.composeEventHandlers)(props.onMouseDown, (event) => {
|
|
126
|
-
focusable ? context.onItemFocus(id) : event.preventDefault();
|
|
127
|
-
}),
|
|
128
|
-
onFocus: (0, import_helpers.composeEventHandlers)(props.onFocus, () => context.onItemFocus(id)),
|
|
129
|
-
...import_constants.isWeb && {
|
|
130
|
-
onKeyDown: (0, import_helpers.composeEventHandlers)(
|
|
131
|
-
props.onKeyDown,
|
|
132
|
-
(event) => {
|
|
133
|
-
if (event.key === "Tab" && event.shiftKey) {
|
|
134
|
-
context.onItemShiftTab();
|
|
135
|
-
return;
|
|
136
|
-
}
|
|
137
|
-
if (event.target !== event.currentTarget) return;
|
|
138
|
-
const focusIntent = getFocusIntent(event, context.orientation, context.dir);
|
|
139
|
-
if (focusIntent !== void 0) {
|
|
140
|
-
event.preventDefault();
|
|
141
|
-
let candidateNodes = getItems().filter((item) => item.focusable).map((item) => item.ref.current);
|
|
142
|
-
if (focusIntent === "last") candidateNodes.reverse();
|
|
143
|
-
else if (focusIntent === "prev" || focusIntent === "next") {
|
|
144
|
-
focusIntent === "prev" && candidateNodes.reverse();
|
|
145
|
-
const currentIndex = candidateNodes.indexOf(event.currentTarget);
|
|
146
|
-
candidateNodes = context.loop ? wrapArray(candidateNodes, currentIndex + 1) : candidateNodes.slice(currentIndex + 1);
|
|
147
|
-
}
|
|
148
|
-
setTimeout(() => focusFirst(candidateNodes, { focusVisible: !0 }));
|
|
149
|
-
}
|
|
150
|
-
}
|
|
151
|
-
)
|
|
152
|
-
}
|
|
153
|
-
}
|
|
154
|
-
)
|
|
155
|
-
}
|
|
156
|
-
);
|
|
157
|
-
});
|
|
158
|
-
RovingFocusGroupItem.displayName = ITEM_NAME;
|
|
159
|
-
const GROUP_NAME = "RovingFocusGroup", [Collection, useCollection] = (0, import_collection.createCollection)(GROUP_NAME), { Provider: RovingFocusProvider, useStyledContext: useRovingFocusContext } = (0, import_core.createStyledContext)(), ROVING_FOCUS_GROUP_CONTEXT = "RovingFocusGroupContext", RovingFocusGroup = (0, import_helpers.withStaticProperties)(
|
|
160
|
-
React.forwardRef(
|
|
161
|
-
(props, forwardedRef) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
162
|
-
Collection.Provider,
|
|
163
|
-
{
|
|
164
|
-
scope: props.__scopeRovingFocusGroup || ROVING_FOCUS_GROUP_CONTEXT,
|
|
165
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
166
|
-
Collection.Slot,
|
|
167
|
-
{
|
|
168
|
-
scope: props.__scopeRovingFocusGroup || ROVING_FOCUS_GROUP_CONTEXT,
|
|
169
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(RovingFocusGroupImpl, { ...props, ref: forwardedRef })
|
|
170
|
-
}
|
|
171
|
-
)
|
|
172
|
-
}
|
|
173
|
-
)
|
|
174
|
-
),
|
|
175
|
-
{
|
|
176
|
-
Item: RovingFocusGroupItem
|
|
177
|
-
}
|
|
178
|
-
);
|
|
179
|
-
RovingFocusGroup.displayName = GROUP_NAME;
|
|
180
|
-
const MAP_KEY_TO_FOCUS_INTENT = {
|
|
181
|
-
ArrowLeft: "prev",
|
|
182
|
-
ArrowUp: "prev",
|
|
183
|
-
ArrowRight: "next",
|
|
184
|
-
ArrowDown: "next",
|
|
185
|
-
PageUp: "first",
|
|
186
|
-
Home: "first",
|
|
187
|
-
PageDown: "last",
|
|
188
|
-
End: "last"
|
|
189
|
-
};
|
|
190
|
-
function getDirectionAwareKey(key, dir) {
|
|
191
|
-
return dir !== "rtl" ? key : key === "ArrowLeft" ? "ArrowRight" : key === "ArrowRight" ? "ArrowLeft" : key;
|
|
192
|
-
}
|
|
193
|
-
function getFocusIntent(event, orientation, dir) {
|
|
194
|
-
const key = getDirectionAwareKey(event.key, dir);
|
|
195
|
-
if (!(orientation === "vertical" && ["ArrowLeft", "ArrowRight"].includes(key)) && !(orientation === "horizontal" && ["ArrowUp", "ArrowDown"].includes(key)))
|
|
196
|
-
return MAP_KEY_TO_FOCUS_INTENT[key];
|
|
197
|
-
}
|
|
198
|
-
function focusFirst(candidates, options) {
|
|
199
|
-
const PREVIOUSLY_FOCUSED_ELEMENT = document.activeElement;
|
|
200
|
-
for (const candidate of candidates)
|
|
201
|
-
if (candidate === PREVIOUSLY_FOCUSED_ELEMENT || (candidate.focus({ focusVisible: options?.focusVisible }), document.activeElement !== PREVIOUSLY_FOCUSED_ELEMENT)) return;
|
|
202
|
-
}
|
|
203
|
-
function wrapArray(array, startIndex) {
|
|
204
|
-
return array.map((_, index) => array[(startIndex + index) % array.length]);
|
|
205
|
-
}
|
|
206
|
-
//# sourceMappingURL=RovingFocusGroup.js.map
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../src/RovingFocusGroup.tsx"],
|
|
4
|
-
"mappings": ";;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,wBAAiC,gCACjC,sBAAgC,k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C/C,MAAI,kBAAgB,cAAc,CAAC,aAAa,YAAY,EAAE,SAAS,GAAG,MAEtE,kBAAgB,gBAAgB,CAAC,WAAW,WAAW,EAAE,SAAS,GAAG;AAEzE,WAAO,wBAAwB,GAAG;AACpC;AAEA,SAAS,WAAW,YAA2B,SAAsC;AACnF,QAAM,6BAA6B,SAAS;AAC5C,aAAW,aAAa;AAKtB,QAHI,cAAc,+BAElB,UAAU,MAAM,EAAE,cAAc,SAAS,aAAa,CAAC,GACnD,SAAS,kBAAkB,4BAA4B;AAE/D;AAMA,SAAS,UAAa,OAAY,YAAoB;AACpD,SAAO,MAAM,IAAI,CAAC,GAAG,UAAU,OAAO,aAAa,SAAS,MAAM,MAAM,CAAC;AAC3E;",
|
|
5
|
-
"names": []
|
|
6
|
-
}
|
|
@@ -1,190 +0,0 @@
|
|
|
1
|
-
import { createCollection } from "@tamagui/collection";
|
|
2
|
-
import { useComposedRefs } from "@tamagui/compose-refs";
|
|
3
|
-
import { isWeb } from "@tamagui/constants";
|
|
4
|
-
import { Slot, View, createStyledContext, useEvent } from "@tamagui/core";
|
|
5
|
-
import { composeEventHandlers, withStaticProperties } from "@tamagui/helpers";
|
|
6
|
-
import { useControllableState } from "@tamagui/use-controllable-state";
|
|
7
|
-
import { useDirection } from "@tamagui/use-direction";
|
|
8
|
-
import * as React from "react";
|
|
9
|
-
import { jsx } from "react/jsx-runtime";
|
|
10
|
-
const ENTRY_FOCUS = "rovingFocusGroup.onEntryFocus", EVENT_OPTIONS = { bubbles: !1, cancelable: !0 }, RovingFocusGroupImpl = React.forwardRef((props, forwardedRef) => {
|
|
11
|
-
const {
|
|
12
|
-
__scopeRovingFocusGroup,
|
|
13
|
-
orientation,
|
|
14
|
-
loop = !1,
|
|
15
|
-
dir,
|
|
16
|
-
currentTabStopId: currentTabStopIdProp,
|
|
17
|
-
defaultCurrentTabStopId,
|
|
18
|
-
onCurrentTabStopIdChange,
|
|
19
|
-
onEntryFocus,
|
|
20
|
-
asChild,
|
|
21
|
-
...groupProps
|
|
22
|
-
} = props, ref = React.useRef(null), composedRefs = useComposedRefs(forwardedRef, ref), direction = useDirection(dir), [currentTabStopId = null, setCurrentTabStopId] = useControllableState({
|
|
23
|
-
prop: currentTabStopIdProp,
|
|
24
|
-
defaultProp: defaultCurrentTabStopId ?? null,
|
|
25
|
-
onChange: onCurrentTabStopIdChange
|
|
26
|
-
}), [isTabbingBackOut, setIsTabbingBackOut] = React.useState(!1), handleEntryFocus = useEvent(onEntryFocus), getItems = useCollection(__scopeRovingFocusGroup || ROVING_FOCUS_GROUP_CONTEXT), isClickFocusRef = React.useRef(!1), [focusableItemsCount, setFocusableItemsCount] = React.useState(0), Comp = asChild ? Slot : View;
|
|
27
|
-
return /* @__PURE__ */ jsx(
|
|
28
|
-
RovingFocusProvider,
|
|
29
|
-
{
|
|
30
|
-
scope: __scopeRovingFocusGroup,
|
|
31
|
-
orientation,
|
|
32
|
-
dir: direction,
|
|
33
|
-
loop,
|
|
34
|
-
currentTabStopId,
|
|
35
|
-
onItemFocus: React.useCallback(
|
|
36
|
-
(tabStopId) => setCurrentTabStopId(tabStopId),
|
|
37
|
-
[setCurrentTabStopId]
|
|
38
|
-
),
|
|
39
|
-
onItemShiftTab: React.useCallback(() => setIsTabbingBackOut(!0), []),
|
|
40
|
-
onFocusableItemAdd: React.useCallback(
|
|
41
|
-
() => setFocusableItemsCount((prevCount) => prevCount + 1),
|
|
42
|
-
[]
|
|
43
|
-
),
|
|
44
|
-
onFocusableItemRemove: React.useCallback(
|
|
45
|
-
() => setFocusableItemsCount((prevCount) => prevCount - 1),
|
|
46
|
-
[]
|
|
47
|
-
),
|
|
48
|
-
children: /* @__PURE__ */ jsx(
|
|
49
|
-
Comp,
|
|
50
|
-
{
|
|
51
|
-
tabIndex: isTabbingBackOut || focusableItemsCount === 0 ? -1 : 0,
|
|
52
|
-
"data-orientation": orientation,
|
|
53
|
-
...groupProps,
|
|
54
|
-
ref: composedRefs,
|
|
55
|
-
outlineStyle: "none",
|
|
56
|
-
onMouseDown: composeEventHandlers(props.onMouseDown, () => {
|
|
57
|
-
isClickFocusRef.current = !0;
|
|
58
|
-
}),
|
|
59
|
-
onFocus: composeEventHandlers(props.onFocus, (event) => {
|
|
60
|
-
const isKeyboardFocus = !isClickFocusRef.current;
|
|
61
|
-
if (event.target === event.currentTarget && isKeyboardFocus && !isTabbingBackOut) {
|
|
62
|
-
const entryFocusEvent = new CustomEvent(ENTRY_FOCUS, EVENT_OPTIONS);
|
|
63
|
-
if (handleEntryFocus(entryFocusEvent), !entryFocusEvent.defaultPrevented) {
|
|
64
|
-
const items = getItems().filter((item) => item.focusable), activeItem = items.find((item) => item.active), currentItem = items.find((item) => item.id === currentTabStopId), candidateNodes = [activeItem, currentItem, ...items].filter(
|
|
65
|
-
Boolean
|
|
66
|
-
).map((item) => item.ref.current);
|
|
67
|
-
focusFirst(candidateNodes, { focusVisible: !1 });
|
|
68
|
-
}
|
|
69
|
-
}
|
|
70
|
-
isClickFocusRef.current = !1;
|
|
71
|
-
}),
|
|
72
|
-
onBlur: composeEventHandlers(
|
|
73
|
-
props.onBlur,
|
|
74
|
-
() => setIsTabbingBackOut(!1)
|
|
75
|
-
)
|
|
76
|
-
}
|
|
77
|
-
)
|
|
78
|
-
}
|
|
79
|
-
);
|
|
80
|
-
}), ITEM_NAME = "RovingFocusGroupItem", RovingFocusGroupItem = React.forwardRef((props, forwardedRef) => {
|
|
81
|
-
const {
|
|
82
|
-
__scopeRovingFocusGroup,
|
|
83
|
-
focusable = !0,
|
|
84
|
-
active = !1,
|
|
85
|
-
tabStopId,
|
|
86
|
-
...itemProps
|
|
87
|
-
} = props, autoId = React.useId(), id = tabStopId || autoId, context = useRovingFocusContext(__scopeRovingFocusGroup), isCurrentTabStop = context.currentTabStopId === id, getItems = useCollection(__scopeRovingFocusGroup || ROVING_FOCUS_GROUP_CONTEXT), { onFocusableItemAdd, onFocusableItemRemove } = context;
|
|
88
|
-
return React.useEffect(() => {
|
|
89
|
-
if (focusable)
|
|
90
|
-
return onFocusableItemAdd(), () => onFocusableItemRemove();
|
|
91
|
-
}, [focusable, onFocusableItemAdd, onFocusableItemRemove]), /* @__PURE__ */ jsx(
|
|
92
|
-
Collection.ItemSlot,
|
|
93
|
-
{
|
|
94
|
-
scope: __scopeRovingFocusGroup || ROVING_FOCUS_GROUP_CONTEXT,
|
|
95
|
-
id,
|
|
96
|
-
focusable,
|
|
97
|
-
active,
|
|
98
|
-
children: /* @__PURE__ */ jsx(
|
|
99
|
-
View,
|
|
100
|
-
{
|
|
101
|
-
tabIndex: focusable ? 0 : -1,
|
|
102
|
-
"data-orientation": context.orientation,
|
|
103
|
-
...itemProps,
|
|
104
|
-
ref: forwardedRef,
|
|
105
|
-
onMouseDown: composeEventHandlers(props.onMouseDown, (event) => {
|
|
106
|
-
focusable ? context.onItemFocus(id) : event.preventDefault();
|
|
107
|
-
}),
|
|
108
|
-
onFocus: composeEventHandlers(props.onFocus, () => context.onItemFocus(id)),
|
|
109
|
-
...isWeb && {
|
|
110
|
-
onKeyDown: composeEventHandlers(
|
|
111
|
-
props.onKeyDown,
|
|
112
|
-
(event) => {
|
|
113
|
-
if (event.key === "Tab" && event.shiftKey) {
|
|
114
|
-
context.onItemShiftTab();
|
|
115
|
-
return;
|
|
116
|
-
}
|
|
117
|
-
if (event.target !== event.currentTarget) return;
|
|
118
|
-
const focusIntent = getFocusIntent(event, context.orientation, context.dir);
|
|
119
|
-
if (focusIntent !== void 0) {
|
|
120
|
-
event.preventDefault();
|
|
121
|
-
let candidateNodes = getItems().filter((item) => item.focusable).map((item) => item.ref.current);
|
|
122
|
-
if (focusIntent === "last") candidateNodes.reverse();
|
|
123
|
-
else if (focusIntent === "prev" || focusIntent === "next") {
|
|
124
|
-
focusIntent === "prev" && candidateNodes.reverse();
|
|
125
|
-
const currentIndex = candidateNodes.indexOf(event.currentTarget);
|
|
126
|
-
candidateNodes = context.loop ? wrapArray(candidateNodes, currentIndex + 1) : candidateNodes.slice(currentIndex + 1);
|
|
127
|
-
}
|
|
128
|
-
setTimeout(() => focusFirst(candidateNodes, { focusVisible: !0 }));
|
|
129
|
-
}
|
|
130
|
-
}
|
|
131
|
-
)
|
|
132
|
-
}
|
|
133
|
-
}
|
|
134
|
-
)
|
|
135
|
-
}
|
|
136
|
-
);
|
|
137
|
-
});
|
|
138
|
-
RovingFocusGroupItem.displayName = ITEM_NAME;
|
|
139
|
-
const GROUP_NAME = "RovingFocusGroup", [Collection, useCollection] = createCollection(GROUP_NAME), { Provider: RovingFocusProvider, useStyledContext: useRovingFocusContext } = createStyledContext(), ROVING_FOCUS_GROUP_CONTEXT = "RovingFocusGroupContext", RovingFocusGroup = withStaticProperties(
|
|
140
|
-
React.forwardRef(
|
|
141
|
-
(props, forwardedRef) => /* @__PURE__ */ jsx(
|
|
142
|
-
Collection.Provider,
|
|
143
|
-
{
|
|
144
|
-
scope: props.__scopeRovingFocusGroup || ROVING_FOCUS_GROUP_CONTEXT,
|
|
145
|
-
children: /* @__PURE__ */ jsx(
|
|
146
|
-
Collection.Slot,
|
|
147
|
-
{
|
|
148
|
-
scope: props.__scopeRovingFocusGroup || ROVING_FOCUS_GROUP_CONTEXT,
|
|
149
|
-
children: /* @__PURE__ */ jsx(RovingFocusGroupImpl, { ...props, ref: forwardedRef })
|
|
150
|
-
}
|
|
151
|
-
)
|
|
152
|
-
}
|
|
153
|
-
)
|
|
154
|
-
),
|
|
155
|
-
{
|
|
156
|
-
Item: RovingFocusGroupItem
|
|
157
|
-
}
|
|
158
|
-
);
|
|
159
|
-
RovingFocusGroup.displayName = GROUP_NAME;
|
|
160
|
-
const MAP_KEY_TO_FOCUS_INTENT = {
|
|
161
|
-
ArrowLeft: "prev",
|
|
162
|
-
ArrowUp: "prev",
|
|
163
|
-
ArrowRight: "next",
|
|
164
|
-
ArrowDown: "next",
|
|
165
|
-
PageUp: "first",
|
|
166
|
-
Home: "first",
|
|
167
|
-
PageDown: "last",
|
|
168
|
-
End: "last"
|
|
169
|
-
};
|
|
170
|
-
function getDirectionAwareKey(key, dir) {
|
|
171
|
-
return dir !== "rtl" ? key : key === "ArrowLeft" ? "ArrowRight" : key === "ArrowRight" ? "ArrowLeft" : key;
|
|
172
|
-
}
|
|
173
|
-
function getFocusIntent(event, orientation, dir) {
|
|
174
|
-
const key = getDirectionAwareKey(event.key, dir);
|
|
175
|
-
if (!(orientation === "vertical" && ["ArrowLeft", "ArrowRight"].includes(key)) && !(orientation === "horizontal" && ["ArrowUp", "ArrowDown"].includes(key)))
|
|
176
|
-
return MAP_KEY_TO_FOCUS_INTENT[key];
|
|
177
|
-
}
|
|
178
|
-
function focusFirst(candidates, options) {
|
|
179
|
-
const PREVIOUSLY_FOCUSED_ELEMENT = document.activeElement;
|
|
180
|
-
for (const candidate of candidates)
|
|
181
|
-
if (candidate === PREVIOUSLY_FOCUSED_ELEMENT || (candidate.focus({ focusVisible: options?.focusVisible }), document.activeElement !== PREVIOUSLY_FOCUSED_ELEMENT)) return;
|
|
182
|
-
}
|
|
183
|
-
function wrapArray(array, startIndex) {
|
|
184
|
-
return array.map((_, index) => array[(startIndex + index) % array.length]);
|
|
185
|
-
}
|
|
186
|
-
export {
|
|
187
|
-
RovingFocusGroup,
|
|
188
|
-
RovingFocusGroupItem
|
|
189
|
-
};
|
|
190
|
-
//# sourceMappingURL=RovingFocusGroup.js.map
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../src/RovingFocusGroup.tsx"],
|
|
4
|
-
"mappings": "AAAA,SAAS,wBAAwB;AACjC,SAAS,uBAAuB;AAChC,SAAS,aAAa;AACtB,SAAS,MAAM,MAAM,qBAAqB,gBAAgB;AAC1D,SAAS,sBAAsB,4BAA4B;AAC3D,SAAS,4BAA4B;AACrC,SAAS,oBAAoB;AAC7B,YAAY,WAAW;AAsEjB;AApEN,MAAM,cAAc,iCACd,gBAAgB,EAAE,SAAS,IAAO,YAAY,GAAK,GAcnD,uBAAu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