@tamagui/roving-focus 1.88.1 → 1.88.3
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/RovingFocusGroup.js +0 -4
- package/dist/cjs/index.js +0 -4
- package/dist/esm/RovingFocusGroup.native.js +37 -10
- package/dist/esm/RovingFocusGroup.native.js.map +2 -2
- package/dist/esm/index.native.js +19 -1
- package/dist/esm/index.native.js.map +1 -1
- package/dist/jsx/RovingFocusGroup.js +111 -88
- package/dist/jsx/RovingFocusGroup.js.map +1 -1
- package/dist/jsx/RovingFocusGroup.native.js +37 -9
- package/dist/jsx/RovingFocusGroup.native.js.map +2 -2
- package/dist/jsx/index.native.js +19 -1
- package/dist/jsx/index.native.js.map +1 -1
- package/package.json +11 -11
|
@@ -210,8 +210,4 @@ function focusFirst(candidates) {
|
|
|
210
210
|
function wrapArray(array, startIndex) {
|
|
211
211
|
return array.map((_, index) => array[(startIndex + index) % array.length]);
|
|
212
212
|
}
|
|
213
|
-
// Annotate the CommonJS export names for ESM import in node:
|
|
214
|
-
0 && (module.exports = {
|
|
215
|
-
RovingFocusGroup
|
|
216
|
-
});
|
|
217
213
|
//# sourceMappingURL=RovingFocusGroup.js.map
|
package/dist/cjs/index.js
CHANGED
|
@@ -12,8 +12,4 @@ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: !0
|
|
|
12
12
|
var src_exports = {};
|
|
13
13
|
module.exports = __toCommonJS(src_exports);
|
|
14
14
|
__reExport(src_exports, require("./RovingFocusGroup"), module.exports);
|
|
15
|
-
// Annotate the CommonJS export names for ESM import in node:
|
|
16
|
-
0 && (module.exports = {
|
|
17
|
-
...require("./RovingFocusGroup")
|
|
18
|
-
});
|
|
19
15
|
//# sourceMappingURL=index.js.map
|
|
@@ -1,21 +1,48 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
1
|
+
"use strict";
|
|
2
|
+
var __create = Object.create;
|
|
3
|
+
var __defProp = Object.defineProperty;
|
|
4
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
5
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
|
+
var __getProtoOf = Object.getPrototypeOf, __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
7
|
+
var __export = (target, all) => {
|
|
8
|
+
for (var name in all)
|
|
9
|
+
__defProp(target, name, { get: all[name], enumerable: !0 });
|
|
10
|
+
}, __copyProps = (to, from, except, desc) => {
|
|
11
|
+
if (from && typeof from == "object" || typeof from == "function")
|
|
12
|
+
for (let key of __getOwnPropNames(from))
|
|
13
|
+
!__hasOwnProp.call(to, key) && key !== except && __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
14
|
+
return to;
|
|
15
|
+
};
|
|
16
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
17
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
18
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
19
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
20
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
21
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: !0 }) : target,
|
|
22
|
+
mod
|
|
23
|
+
)), __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: !0 }), mod);
|
|
24
|
+
var RovingFocusGroup_native_exports = {};
|
|
25
|
+
__export(RovingFocusGroup_native_exports, {
|
|
26
|
+
RovingFocusGroup: () => RovingFocusGroup,
|
|
27
|
+
createRovingFocusGroupScope: () => createRovingFocusGroupScope
|
|
28
|
+
});
|
|
29
|
+
module.exports = __toCommonJS(RovingFocusGroup_native_exports);
|
|
30
|
+
var import_core = require("@tamagui/core"), import_helpers = require("@tamagui/helpers"), import_react = __toESM(require("react")), import_jsx_runtime = require("react/jsx-runtime");
|
|
31
|
+
const ITEM_NAME = "RovingFocusGroupItem", RovingFocusGroupItem = import_react.default.forwardRef(
|
|
32
|
+
({ children, ...props }, _ref) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_core.Stack, { ...props, children })
|
|
7
33
|
);
|
|
8
34
|
RovingFocusGroupItem.displayName = ITEM_NAME;
|
|
9
|
-
const GROUP_NAME = "RovingFocusGroup", RovingFocusGroup = withStaticProperties(
|
|
10
|
-
|
|
35
|
+
const GROUP_NAME = "RovingFocusGroup", RovingFocusGroup = (0, import_helpers.withStaticProperties)(
|
|
36
|
+
import_react.default.forwardRef(({ children, ...props }, _ref) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_core.Stack, { ...props, children })),
|
|
11
37
|
{
|
|
12
38
|
Item: RovingFocusGroupItem
|
|
13
39
|
}
|
|
14
40
|
);
|
|
15
41
|
RovingFocusGroup.displayName = GROUP_NAME;
|
|
16
42
|
const createRovingFocusGroupScope = () => () => ({});
|
|
17
|
-
export
|
|
43
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
44
|
+
0 && (module.exports = {
|
|
18
45
|
RovingFocusGroup,
|
|
19
46
|
createRovingFocusGroupScope
|
|
20
|
-
};
|
|
47
|
+
});
|
|
21
48
|
//# sourceMappingURL=RovingFocusGroup.native.js.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../src/RovingFocusGroup.native.tsx"],
|
|
4
|
-
"mappings": "AAAA,
|
|
5
|
-
"names": []
|
|
4
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,kBAAsB,0BACtB,iBAAqC,6BACrC,eAAkB,2BASd;AAHJ,MAAM,YAAY,wBACZ,uBAAuB,aAAAA,QAAM;AAAA,EACjC,CAAC,EAAE,UAAU,GAAG,MAAM,GAAyB,SAC7C,4CAAC,qBAAO,GAAG,OAAQ,UAAS;AAEhC;AACA,qBAAqB,cAAc;AACnC,MAAM,aAAa,oBAEb,uBAAmB;AAAA,EACvB,aAAAA,QAAM,WAAW,CAAC,EAAE,UAAU,GAAG,MAAM,GAA0B,SAC/D,4CAAC,qBAAO,GAAG,OAAQ,UAAS,CAC7B;AAAA,EACD;AAAA,IACE,MAAM;AAAA,EACR;AACF;AAEA,iBAAiB,cAAc;AAE/B,MAAM,8BAA8B,MAAM,OAAO,CAAC;",
|
|
5
|
+
"names": ["React"]
|
|
6
6
|
}
|
package/dist/esm/index.native.js
CHANGED
|
@@ -1,2 +1,20 @@
|
|
|
1
|
-
|
|
1
|
+
"use strict";
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
+
var __copyProps = (to, from, except, desc) => {
|
|
7
|
+
if (from && typeof from == "object" || typeof from == "function")
|
|
8
|
+
for (let key of __getOwnPropNames(from))
|
|
9
|
+
!__hasOwnProp.call(to, key) && key !== except && __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
10
|
+
return to;
|
|
11
|
+
}, __reExport = (target, mod, secondTarget) => (__copyProps(target, mod, "default"), secondTarget && __copyProps(secondTarget, mod, "default"));
|
|
12
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: !0 }), mod);
|
|
13
|
+
var src_exports = {};
|
|
14
|
+
module.exports = __toCommonJS(src_exports);
|
|
15
|
+
__reExport(src_exports, require("./RovingFocusGroup"), module.exports);
|
|
16
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
17
|
+
0 && (module.exports = {
|
|
18
|
+
...require("./RovingFocusGroup")
|
|
19
|
+
});
|
|
2
20
|
//# sourceMappingURL=index.js.map
|
|
@@ -6,6 +6,7 @@ import { composeEventHandlers, withStaticProperties } from "@tamagui/helpers";
|
|
|
6
6
|
import { useControllableState } from "@tamagui/use-controllable-state";
|
|
7
7
|
import { useDirection } from "@tamagui/use-direction";
|
|
8
8
|
import * as React from "react";
|
|
9
|
+
import { jsx } from "react/jsx-runtime";
|
|
9
10
|
const ENTRY_FOCUS = "rovingFocusGroup.onEntryFocus", EVENT_OPTIONS = { bubbles: !1, cancelable: !0 }, RovingFocusGroupImpl = React.forwardRef((props, forwardedRef) => {
|
|
10
11
|
const {
|
|
11
12
|
__scopeRovingFocusGroup,
|
|
@@ -26,52 +27,59 @@ const ENTRY_FOCUS = "rovingFocusGroup.onEntryFocus", EVENT_OPTIONS = { bubbles:
|
|
|
26
27
|
const node = ref.current;
|
|
27
28
|
if (node)
|
|
28
29
|
return node.addEventListener(ENTRY_FOCUS, handleEntryFocus), () => node.removeEventListener(ENTRY_FOCUS, handleEntryFocus);
|
|
29
|
-
}, [handleEntryFocus]),
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
() =>
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
30
|
+
}, [handleEntryFocus]), /* @__PURE__ */ jsx(
|
|
31
|
+
RovingFocusProvider,
|
|
32
|
+
{
|
|
33
|
+
scope: __scopeRovingFocusGroup,
|
|
34
|
+
orientation,
|
|
35
|
+
dir: direction,
|
|
36
|
+
loop,
|
|
37
|
+
currentTabStopId,
|
|
38
|
+
onItemFocus: React.useCallback(
|
|
39
|
+
(tabStopId) => setCurrentTabStopId(tabStopId),
|
|
40
|
+
[setCurrentTabStopId]
|
|
41
|
+
),
|
|
42
|
+
onItemShiftTab: React.useCallback(() => setIsTabbingBackOut(!0), []),
|
|
43
|
+
onFocusableItemAdd: React.useCallback(
|
|
44
|
+
() => setFocusableItemsCount((prevCount) => prevCount + 1),
|
|
45
|
+
[]
|
|
46
|
+
),
|
|
47
|
+
onFocusableItemRemove: React.useCallback(
|
|
48
|
+
() => setFocusableItemsCount((prevCount) => prevCount - 1),
|
|
49
|
+
[]
|
|
50
|
+
),
|
|
51
|
+
children: /* @__PURE__ */ jsx(
|
|
52
|
+
Stack,
|
|
53
|
+
{
|
|
54
|
+
tabIndex: isTabbingBackOut || focusableItemsCount === 0 ? -1 : 0,
|
|
55
|
+
"data-orientation": orientation,
|
|
56
|
+
...groupProps,
|
|
57
|
+
ref: composedRefs,
|
|
58
|
+
style: [{ outline: "none" }, props.style],
|
|
59
|
+
onMouseDown: composeEventHandlers(props.onMouseDown, () => {
|
|
60
|
+
isClickFocusRef.current = !0;
|
|
61
|
+
}),
|
|
62
|
+
onFocus: composeEventHandlers(props.onFocus, (event) => {
|
|
63
|
+
const isKeyboardFocus = !isClickFocusRef.current;
|
|
64
|
+
if (event.target === event.currentTarget && isKeyboardFocus && !isTabbingBackOut) {
|
|
65
|
+
const entryFocusEvent = new CustomEvent(ENTRY_FOCUS, EVENT_OPTIONS);
|
|
66
|
+
if (event.currentTarget.dispatchEvent(entryFocusEvent), !entryFocusEvent.defaultPrevented) {
|
|
67
|
+
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(
|
|
68
|
+
Boolean
|
|
69
|
+
).map((item) => item.ref.current);
|
|
70
|
+
focusFirst(candidateNodes);
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
isClickFocusRef.current = !1;
|
|
74
|
+
}),
|
|
75
|
+
onBlur: composeEventHandlers(
|
|
76
|
+
props.onBlur,
|
|
77
|
+
() => setIsTabbingBackOut(!1)
|
|
78
|
+
)
|
|
66
79
|
}
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
onBlur={composeEventHandlers(
|
|
71
|
-
props.onBlur,
|
|
72
|
-
() => setIsTabbingBackOut(!1)
|
|
73
|
-
)}
|
|
74
|
-
/></RovingFocusProvider>;
|
|
80
|
+
)
|
|
81
|
+
}
|
|
82
|
+
);
|
|
75
83
|
}), ITEM_NAME = "RovingFocusGroupItem", RovingFocusGroupItem = React.forwardRef((props, forwardedRef) => {
|
|
76
84
|
const {
|
|
77
85
|
__scopeRovingFocusGroup,
|
|
@@ -83,58 +91,73 @@ const ENTRY_FOCUS = "rovingFocusGroup.onEntryFocus", EVENT_OPTIONS = { bubbles:
|
|
|
83
91
|
return React.useEffect(() => {
|
|
84
92
|
if (focusable)
|
|
85
93
|
return onFocusableItemAdd(), () => onFocusableItemRemove();
|
|
86
|
-
}, [focusable, onFocusableItemAdd, onFocusableItemRemove]),
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
94
|
+
}, [focusable, onFocusableItemAdd, onFocusableItemRemove]), /* @__PURE__ */ jsx(
|
|
95
|
+
Collection.ItemSlot,
|
|
96
|
+
{
|
|
97
|
+
__scopeCollection: __scopeRovingFocusGroup || ROVING_FOCUS_GROUP_CONTEXT,
|
|
98
|
+
id,
|
|
99
|
+
focusable,
|
|
100
|
+
active,
|
|
101
|
+
children: /* @__PURE__ */ jsx(
|
|
102
|
+
Stack,
|
|
103
|
+
{
|
|
104
|
+
tabIndex: isCurrentTabStop ? 0 : -1,
|
|
105
|
+
"data-orientation": context.orientation,
|
|
106
|
+
...itemProps,
|
|
107
|
+
ref: forwardedRef,
|
|
108
|
+
onMouseDown: composeEventHandlers(props.onMouseDown, (event) => {
|
|
109
|
+
focusable ? context.onItemFocus(id) : event.preventDefault();
|
|
110
|
+
}),
|
|
111
|
+
onFocus: composeEventHandlers(props.onFocus, () => context.onItemFocus(id)),
|
|
112
|
+
...isWeb && {
|
|
113
|
+
onKeyDown: composeEventHandlers(
|
|
114
|
+
props.onKeyDown,
|
|
115
|
+
(event) => {
|
|
116
|
+
if (event.key === "Tab" && event.shiftKey) {
|
|
117
|
+
context.onItemShiftTab();
|
|
118
|
+
return;
|
|
119
|
+
}
|
|
120
|
+
if (event.target !== event.currentTarget)
|
|
121
|
+
return;
|
|
122
|
+
const focusIntent = getFocusIntent(event, context.orientation, context.dir);
|
|
123
|
+
if (focusIntent !== void 0) {
|
|
124
|
+
event.preventDefault();
|
|
125
|
+
let candidateNodes = getItems().filter((item) => item.focusable).map((item) => item.ref.current);
|
|
126
|
+
if (focusIntent === "last")
|
|
127
|
+
candidateNodes.reverse();
|
|
128
|
+
else if (focusIntent === "prev" || focusIntent === "next") {
|
|
129
|
+
focusIntent === "prev" && candidateNodes.reverse();
|
|
130
|
+
const currentIndex = candidateNodes.indexOf(event.currentTarget);
|
|
131
|
+
candidateNodes = context.loop ? wrapArray(candidateNodes, currentIndex + 1) : candidateNodes.slice(currentIndex + 1);
|
|
132
|
+
}
|
|
133
|
+
setTimeout(() => focusFirst(candidateNodes));
|
|
134
|
+
}
|
|
135
|
+
}
|
|
136
|
+
)
|
|
122
137
|
}
|
|
123
138
|
}
|
|
124
139
|
)
|
|
125
|
-
}
|
|
126
|
-
|
|
140
|
+
}
|
|
141
|
+
);
|
|
127
142
|
});
|
|
128
143
|
RovingFocusGroupItem.displayName = ITEM_NAME;
|
|
129
144
|
const GROUP_NAME = "RovingFocusGroup", [Collection, useCollection] = createCollection(
|
|
130
145
|
GROUP_NAME
|
|
131
146
|
), { Provider: RovingFocusProvider, useStyledContext: useRovingFocusContext } = createStyledContext(), ROVING_FOCUS_GROUP_CONTEXT = "RovingFocusGroupContext", RovingFocusGroup = withStaticProperties(
|
|
132
147
|
React.forwardRef(
|
|
133
|
-
(props, forwardedRef) =>
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
148
|
+
(props, forwardedRef) => /* @__PURE__ */ jsx(
|
|
149
|
+
Collection.Provider,
|
|
150
|
+
{
|
|
151
|
+
__scopeCollection: props.__scopeRovingFocusGroup || ROVING_FOCUS_GROUP_CONTEXT,
|
|
152
|
+
children: /* @__PURE__ */ jsx(
|
|
153
|
+
Collection.Slot,
|
|
154
|
+
{
|
|
155
|
+
__scopeCollection: props.__scopeRovingFocusGroup || ROVING_FOCUS_GROUP_CONTEXT,
|
|
156
|
+
children: /* @__PURE__ */ jsx(RovingFocusGroupImpl, { ...props, ref: forwardedRef })
|
|
157
|
+
}
|
|
158
|
+
)
|
|
159
|
+
}
|
|
160
|
+
)
|
|
138
161
|
),
|
|
139
162
|
{
|
|
140
163
|
Item: RovingFocusGroupItem
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../src/RovingFocusGroup.tsx"],
|
|
4
|
-
"mappings": "AAAA,SAAS,wBAAwB;AACjC,SAAS,uBAAuB;AAChC,SAAS,aAAa;AACtB,SAAS,OAAO,qBAAqB,gBAAgB;AACrD,SAAS,sBAAsB,4BAA4B;AAC3D,SAAS,4BAA4B;AACrC,SAAS,oBAAoB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ACZ,WAAW;AAAA,EACX,QAAQ;AAAA,EACR,MAAM;AAAA,EACN,UAAU;AAAA,EACV,KAAK;AACP;AAEA,SAAS,qBAAqB,KAAa,KAAiB;AAC1D,SAAI,QAAQ,QAAc,MACnB,QAAQ,cAAc,eAAe,QAAQ,eAAe,cAAc;AACnF;AAIA,SAAS,eACP,OACA,aACA,KACA;AACA,QAAM,MAAM,qBAAqB,MAAM,KAAK,GAAG;AAC/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;AAC7C,QAAM,6BAA6B,SAAS;AAC5C,aAAW,aAAa;AAItB,QAFI,cAAc,+BAClB,UAAU,MAAM,GACZ,SAAS,kBAAkB;AAA4B;AAE/D;AAMA,SAAS,UAAa,OAAY,YAAoB;AACpD,SAAO,MAAM,IAAI,CAAC,GAAG,UAAU,OAAO,aAAa,SAAS,MAAM,MAAM,CAAC;AAC3E;",
|
|
5
5
|
"names": []
|
|
6
6
|
}
|
|
@@ -1,20 +1,48 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
1
|
+
"use strict";
|
|
2
|
+
var __create = Object.create;
|
|
3
|
+
var __defProp = Object.defineProperty;
|
|
4
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
5
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
|
+
var __getProtoOf = Object.getPrototypeOf, __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
7
|
+
var __export = (target, all) => {
|
|
8
|
+
for (var name in all)
|
|
9
|
+
__defProp(target, name, { get: all[name], enumerable: !0 });
|
|
10
|
+
}, __copyProps = (to, from, except, desc) => {
|
|
11
|
+
if (from && typeof from == "object" || typeof from == "function")
|
|
12
|
+
for (let key of __getOwnPropNames(from))
|
|
13
|
+
!__hasOwnProp.call(to, key) && key !== except && __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
14
|
+
return to;
|
|
15
|
+
};
|
|
16
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
17
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
18
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
19
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
20
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
21
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: !0 }) : target,
|
|
22
|
+
mod
|
|
23
|
+
)), __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: !0 }), mod);
|
|
24
|
+
var RovingFocusGroup_native_exports = {};
|
|
25
|
+
__export(RovingFocusGroup_native_exports, {
|
|
26
|
+
RovingFocusGroup: () => RovingFocusGroup,
|
|
27
|
+
createRovingFocusGroupScope: () => createRovingFocusGroupScope
|
|
28
|
+
});
|
|
29
|
+
module.exports = __toCommonJS(RovingFocusGroup_native_exports);
|
|
30
|
+
var import_core = require("@tamagui/core"), import_helpers = require("@tamagui/helpers"), import_react = __toESM(require("react")), import_jsx_runtime = require("react/jsx-runtime");
|
|
31
|
+
const ITEM_NAME = "RovingFocusGroupItem", RovingFocusGroupItem = import_react.default.forwardRef(
|
|
32
|
+
({ children, ...props }, _ref) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_core.Stack, { ...props, children })
|
|
6
33
|
);
|
|
7
34
|
RovingFocusGroupItem.displayName = ITEM_NAME;
|
|
8
|
-
const GROUP_NAME = "RovingFocusGroup", RovingFocusGroup = withStaticProperties(
|
|
9
|
-
|
|
35
|
+
const GROUP_NAME = "RovingFocusGroup", RovingFocusGroup = (0, import_helpers.withStaticProperties)(
|
|
36
|
+
import_react.default.forwardRef(({ children, ...props }, _ref) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_core.Stack, { ...props, children })),
|
|
10
37
|
{
|
|
11
38
|
Item: RovingFocusGroupItem
|
|
12
39
|
}
|
|
13
40
|
);
|
|
14
41
|
RovingFocusGroup.displayName = GROUP_NAME;
|
|
15
42
|
const createRovingFocusGroupScope = () => () => ({});
|
|
16
|
-
export
|
|
43
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
44
|
+
0 && (module.exports = {
|
|
17
45
|
RovingFocusGroup,
|
|
18
46
|
createRovingFocusGroupScope
|
|
19
|
-
};
|
|
47
|
+
});
|
|
20
48
|
//# sourceMappingURL=RovingFocusGroup.native.js.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../src/RovingFocusGroup.native.tsx"],
|
|
4
|
-
"mappings": "AAAA,
|
|
5
|
-
"names": []
|
|
4
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,kBAAsB,0BACtB,iBAAqC,6BACrC,eAAkB,2BASd;AAHJ,MAAM,YAAY,wBACZ,uBAAuB,aAAAA,QAAM;AAAA,EACjC,CAAC,EAAE,UAAU,GAAG,MAAM,GAAyB,SAC7C,4CAAC,qBAAO,GAAG,OAAQ,UAAS;AAEhC;AACA,qBAAqB,cAAc;AACnC,MAAM,aAAa,oBAEb,uBAAmB;AAAA,EACvB,aAAAA,QAAM,WAAW,CAAC,EAAE,UAAU,GAAG,MAAM,GAA0B,SAC/D,4CAAC,qBAAO,GAAG,OAAQ,UAAS,CAC7B;AAAA,EACD;AAAA,IACE,MAAM;AAAA,EACR;AACF;AAEA,iBAAiB,cAAc;AAE/B,MAAM,8BAA8B,MAAM,OAAO,CAAC;",
|
|
5
|
+
"names": ["React"]
|
|
6
6
|
}
|
package/dist/jsx/index.native.js
CHANGED
|
@@ -1,2 +1,20 @@
|
|
|
1
|
-
|
|
1
|
+
"use strict";
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
+
var __copyProps = (to, from, except, desc) => {
|
|
7
|
+
if (from && typeof from == "object" || typeof from == "function")
|
|
8
|
+
for (let key of __getOwnPropNames(from))
|
|
9
|
+
!__hasOwnProp.call(to, key) && key !== except && __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
10
|
+
return to;
|
|
11
|
+
}, __reExport = (target, mod, secondTarget) => (__copyProps(target, mod, "default"), secondTarget && __copyProps(secondTarget, mod, "default"));
|
|
12
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: !0 }), mod);
|
|
13
|
+
var src_exports = {};
|
|
14
|
+
module.exports = __toCommonJS(src_exports);
|
|
15
|
+
__reExport(src_exports, require("./RovingFocusGroup"), module.exports);
|
|
16
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
17
|
+
0 && (module.exports = {
|
|
18
|
+
...require("./RovingFocusGroup")
|
|
19
|
+
});
|
|
2
20
|
//# sourceMappingURL=index.js.map
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tamagui/roving-focus",
|
|
3
|
-
"version": "1.88.
|
|
3
|
+
"version": "1.88.3",
|
|
4
4
|
"sideEffects": [
|
|
5
5
|
"*.css"
|
|
6
6
|
],
|
|
@@ -32,21 +32,21 @@
|
|
|
32
32
|
}
|
|
33
33
|
},
|
|
34
34
|
"dependencies": {
|
|
35
|
-
"@tamagui/collection": "1.88.
|
|
36
|
-
"@tamagui/compose-refs": "1.88.
|
|
37
|
-
"@tamagui/constants": "1.88.
|
|
38
|
-
"@tamagui/core": "1.88.
|
|
39
|
-
"@tamagui/create-context": "1.88.
|
|
40
|
-
"@tamagui/helpers": "1.88.
|
|
41
|
-
"@tamagui/use-controllable-state": "1.88.
|
|
42
|
-
"@tamagui/use-direction": "1.88.
|
|
43
|
-
"@tamagui/use-event": "1.88.
|
|
35
|
+
"@tamagui/collection": "1.88.3",
|
|
36
|
+
"@tamagui/compose-refs": "1.88.3",
|
|
37
|
+
"@tamagui/constants": "1.88.3",
|
|
38
|
+
"@tamagui/core": "1.88.3",
|
|
39
|
+
"@tamagui/create-context": "1.88.3",
|
|
40
|
+
"@tamagui/helpers": "1.88.3",
|
|
41
|
+
"@tamagui/use-controllable-state": "1.88.3",
|
|
42
|
+
"@tamagui/use-direction": "1.88.3",
|
|
43
|
+
"@tamagui/use-event": "1.88.3"
|
|
44
44
|
},
|
|
45
45
|
"peerDependencies": {
|
|
46
46
|
"react": "*"
|
|
47
47
|
},
|
|
48
48
|
"devDependencies": {
|
|
49
|
-
"@tamagui/build": "1.88.
|
|
49
|
+
"@tamagui/build": "1.88.3",
|
|
50
50
|
"react": "^18.2.0"
|
|
51
51
|
},
|
|
52
52
|
"publishConfig": {
|