@tamagui/roving-focus 3.0.0-beta.669.1 → 3.0.0-beta.728.1

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.
@@ -1,4 +1,3 @@
1
-
2
1
  var __create = Object.create;
3
2
  var __defProp = Object.defineProperty;
4
3
  var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
@@ -1,6 +1,5 @@
1
1
  "use strict";
2
2
 
3
-
4
3
  var __defProp = Object.defineProperty;
5
4
  var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
6
5
  var __getOwnPropNames = Object.getOwnPropertyNames;
@@ -1,6 +1,5 @@
1
1
  "use strict";
2
2
 
3
-
4
3
  var __defProp = Object.defineProperty;
5
4
  var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
6
5
  var __getOwnPropNames = Object.getOwnPropertyNames;
@@ -1 +1 @@
1
- {"version":3,"file":"RovingFocusGroup.native.js","names":[],"sources":["cjs/RovingFocusGroup.native.js"],"sourcesContent":["\"use strict\";\nvar __defProp = Object.defineProperty;\nvar __getOwnPropDesc = Object.getOwnPropertyDescriptor;\nvar __getOwnPropNames = Object.getOwnPropertyNames;\nvar __hasOwnProp = Object.prototype.hasOwnProperty;\nvar __export = (target, all) => {\n for (var name in all)\n __defProp(target, name, { get: all[name], enumerable: true });\n};\nvar __copyProps = (to, from, except, desc) => {\n if (from && typeof from === \"object\" || typeof from === \"function\") {\n for (let key of __getOwnPropNames(from))\n if (!__hasOwnProp.call(to, key) && key !== except)\n __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });\n }\n return to;\n};\nvar __toCommonJS = (mod) => __copyProps(__defProp({}, \"__esModule\", { value: true }), mod);\nvar RovingFocusGroup_native_exports = {};\n__export(RovingFocusGroup_native_exports, {\n RovingFocusGroup: () => RovingFocusGroup,\n createRovingFocusGroupScope: () => createRovingFocusGroupScope\n});\nmodule.exports = __toCommonJS(RovingFocusGroup_native_exports);\nvar import_core = require(\"@tamagui/core\");\nvar import_helpers = require(\"@tamagui/helpers\");\nvar ITEM_NAME = \"RovingFocusGroupItem\";\nvar RovingFocusGroupItem = (0, import_core.styled)(import_core.View, {\n displayName: ITEM_NAME\n});\nvar GROUP_NAME = \"RovingFocusGroup\";\nvar RovingFocusGroupFrame = (0, import_core.styled)(import_core.View, {\n displayName: GROUP_NAME\n});\nvar RovingFocusGroup = (0, import_helpers.withStaticProperties)(RovingFocusGroupFrame, {\n Item: RovingFocusGroupItem\n});\nRovingFocusGroup.displayName = GROUP_NAME;\nvar createRovingFocusGroupScope = function() {\n return function() {\n return {};\n };\n};\n//# sourceMappingURL=RovingFocusGroup.native.js.map\n"],"mappings":";;;;AACA,IAAI,YAAY,OAAO;AACvB,IAAI,mBAAmB,OAAO;AAC9B,IAAI,oBAAoB,OAAO;AAC/B,IAAI,eAAe,OAAO,UAAU;AACpC,IAAI,YAAY,QAAQ,QAAQ;CAC9B,KAAK,IAAI,QAAQ,KACf,UAAU,QAAQ,MAAM;EAAE,KAAK,IAAI;EAAO,YAAY;CAAK,CAAC;AAChE;AACA,IAAI,eAAe,IAAI,MAAM,QAAQ,SAAS;CAC5C,IAAI,QAAQ,OAAO,SAAS,YAAY,OAAO,SAAS,YAAY;EAClE,KAAK,IAAI,OAAO,kBAAkB,IAAI,GACpC,IAAI,CAAC,aAAa,KAAK,IAAI,GAAG,KAAK,QAAQ,QACzC,UAAU,IAAI,KAAK;GAAE,WAAW,KAAK;GAAM,YAAY,EAAE,OAAO,iBAAiB,MAAM,GAAG,MAAM,KAAK;EAAW,CAAC;CACvH;CACA,OAAO;AACT;AACA,IAAI,gBAAgB,QAAQ,YAAY,UAAU,CAAC,GAAG,cAAc,EAAE,OAAO,KAAK,CAAC,GAAG,GAAG;AACzF,IAAI,kCAAkC,CAAC;AACvC,SAAS,iCAAiC;CACxC,wBAAwB;CACxB,mCAAmC;AACrC,CAAC;AACD,OAAO,UAAU,aAAa,+BAA+B;AAC7D,IAAI,cAAc,QAAQ,eAAe;AACzC,IAAI,iBAAiB,QAAQ,kBAAkB;AAC/C,IAAI,YAAY;AAChB,IAAI,wBAAwB,GAAG,YAAY,QAAQ,YAAY,MAAM,EACnE,aAAa,UACf,CAAC;AACD,IAAI,aAAa;AACjB,IAAI,yBAAyB,GAAG,YAAY,QAAQ,YAAY,MAAM,EACpE,aAAa,WACf,CAAC;AACD,IAAI,oBAAoB,GAAG,eAAe,sBAAsB,uBAAuB,EACrF,MAAM,qBACR,CAAC;AACD,iBAAiB,cAAc;AAC/B,IAAI,8BAA8B,WAAW;CAC3C,OAAO,WAAW;EAChB,OAAO,CAAC;CACV;AACF"}
1
+ {"version":3,"file":"RovingFocusGroup.native.js","names":[],"sources":["cjs/RovingFocusGroup.native.js"],"sourcesContent":["\"use strict\";\nvar __defProp = Object.defineProperty;\nvar __getOwnPropDesc = Object.getOwnPropertyDescriptor;\nvar __getOwnPropNames = Object.getOwnPropertyNames;\nvar __hasOwnProp = Object.prototype.hasOwnProperty;\nvar __export = (target, all) => {\n for (var name in all)\n __defProp(target, name, { get: all[name], enumerable: true });\n};\nvar __copyProps = (to, from, except, desc) => {\n if (from && typeof from === \"object\" || typeof from === \"function\") {\n for (let key of __getOwnPropNames(from))\n if (!__hasOwnProp.call(to, key) && key !== except)\n __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });\n }\n return to;\n};\nvar __toCommonJS = (mod) => __copyProps(__defProp({}, \"__esModule\", { value: true }), mod);\nvar RovingFocusGroup_native_exports = {};\n__export(RovingFocusGroup_native_exports, {\n RovingFocusGroup: () => RovingFocusGroup,\n createRovingFocusGroupScope: () => createRovingFocusGroupScope\n});\nmodule.exports = __toCommonJS(RovingFocusGroup_native_exports);\nvar import_core = require(\"@tamagui/core\");\nvar import_helpers = require(\"@tamagui/helpers\");\nvar ITEM_NAME = \"RovingFocusGroupItem\";\nvar RovingFocusGroupItem = (0, import_core.styled)(import_core.View, {\n displayName: ITEM_NAME\n});\nvar GROUP_NAME = \"RovingFocusGroup\";\nvar RovingFocusGroupFrame = (0, import_core.styled)(import_core.View, {\n displayName: GROUP_NAME\n});\nvar RovingFocusGroup = (0, import_helpers.withStaticProperties)(RovingFocusGroupFrame, {\n Item: RovingFocusGroupItem\n});\nRovingFocusGroup.displayName = GROUP_NAME;\nvar createRovingFocusGroupScope = function() {\n return function() {\n return {};\n };\n};\n//# sourceMappingURL=RovingFocusGroup.native.js.map\n"],"mappings":";;;AACA,IAAI,YAAY,OAAO;AACvB,IAAI,mBAAmB,OAAO;AAC9B,IAAI,oBAAoB,OAAO;AAC/B,IAAI,eAAe,OAAO,UAAU;AACpC,IAAI,YAAY,QAAQ,QAAQ;CAC9B,KAAK,IAAI,QAAQ,KACf,UAAU,QAAQ,MAAM;EAAE,KAAK,IAAI;EAAO,YAAY;CAAK,CAAC;AAChE;AACA,IAAI,eAAe,IAAI,MAAM,QAAQ,SAAS;CAC5C,IAAI,QAAQ,OAAO,SAAS,YAAY,OAAO,SAAS,YAAY;EAClE,KAAK,IAAI,OAAO,kBAAkB,IAAI,GACpC,IAAI,CAAC,aAAa,KAAK,IAAI,GAAG,KAAK,QAAQ,QACzC,UAAU,IAAI,KAAK;GAAE,WAAW,KAAK;GAAM,YAAY,EAAE,OAAO,iBAAiB,MAAM,GAAG,MAAM,KAAK;EAAW,CAAC;CACvH;CACA,OAAO;AACT;AACA,IAAI,gBAAgB,QAAQ,YAAY,UAAU,CAAC,GAAG,cAAc,EAAE,OAAO,KAAK,CAAC,GAAG,GAAG;AACzF,IAAI,kCAAkC,CAAC;AACvC,SAAS,iCAAiC;CACxC,wBAAwB;CACxB,mCAAmC;AACrC,CAAC;AACD,OAAO,UAAU,aAAa,+BAA+B;AAC7D,IAAI,cAAc,QAAQ,eAAe;AACzC,IAAI,iBAAiB,QAAQ,kBAAkB;AAC/C,IAAI,YAAY;AAChB,IAAI,wBAAwB,GAAG,YAAY,OAAM,CAAE,YAAY,MAAM,EACnE,aAAa,UACf,CAAC;AACD,IAAI,aAAa;AACjB,IAAI,yBAAyB,GAAG,YAAY,OAAM,CAAE,YAAY,MAAM,EACpE,aAAa,WACf,CAAC;AACD,IAAI,oBAAoB,GAAG,eAAe,qBAAoB,CAAE,uBAAuB,EACrF,MAAM,qBACR,CAAC;AACD,iBAAiB,cAAc;AAC/B,IAAI,8BAA8B,WAAW;CAC3C,OAAO,WAAW;EAChB,OAAO,CAAC;CACV;AACF"}
@@ -1,4 +1,3 @@
1
-
2
1
  var __defProp = Object.defineProperty;
3
2
  var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
3
  var __getOwnPropNames = Object.getOwnPropertyNames;
@@ -1,6 +1,5 @@
1
1
  "use strict";
2
2
 
3
-
4
3
  var __defProp = Object.defineProperty;
5
4
  var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
6
5
  var __getOwnPropNames = Object.getOwnPropertyNames;
@@ -1,6 +1,5 @@
1
1
  "use strict";
2
2
 
3
-
4
3
  var __defProp = Object.defineProperty;
5
4
  var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
6
5
  var __getOwnPropNames = Object.getOwnPropertyNames;
@@ -1 +1 @@
1
- {"version":3,"file":"index.native.js","names":[],"sources":["cjs/index.native.js"],"sourcesContent":["\"use strict\";\nvar __defProp = Object.defineProperty;\nvar __getOwnPropDesc = Object.getOwnPropertyDescriptor;\nvar __getOwnPropNames = Object.getOwnPropertyNames;\nvar __hasOwnProp = Object.prototype.hasOwnProperty;\nvar __copyProps = (to, from, except, desc) => {\n if (from && typeof from === \"object\" || typeof from === \"function\") {\n for (let key of __getOwnPropNames(from))\n if (!__hasOwnProp.call(to, key) && key !== except)\n __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });\n }\n return to;\n};\nvar __reExport = (target, mod, secondTarget) => (__copyProps(target, mod, \"default\"), secondTarget && __copyProps(secondTarget, mod, \"default\"));\nvar __toCommonJS = (mod) => __copyProps(__defProp({}, \"__esModule\", { value: true }), mod);\nvar index_exports = {};\nmodule.exports = __toCommonJS(index_exports);\n__reExport(index_exports, require(\"./RovingFocusGroup\"), module.exports);\n//# sourceMappingURL=index.js.map\n"],"mappings":";;;;AACA,IAAI,YAAY,OAAO;AACvB,IAAI,mBAAmB,OAAO;AAC9B,IAAI,oBAAoB,OAAO;AAC/B,IAAI,eAAe,OAAO,UAAU;AACpC,IAAI,eAAe,IAAI,MAAM,QAAQ,SAAS;CAC5C,IAAI,QAAQ,OAAO,SAAS,YAAY,OAAO,SAAS,YAAY;EAClE,KAAK,IAAI,OAAO,kBAAkB,IAAI,GACpC,IAAI,CAAC,aAAa,KAAK,IAAI,GAAG,KAAK,QAAQ,QACzC,UAAU,IAAI,KAAK;GAAE,WAAW,KAAK;GAAM,YAAY,EAAE,OAAO,iBAAiB,MAAM,GAAG,MAAM,KAAK;EAAW,CAAC;CACvH;CACA,OAAO;AACT;AACA,IAAI,cAAc,QAAQ,KAAK,kBAAkB,YAAY,QAAQ,KAAK,SAAS,GAAG,gBAAgB,YAAY,cAAc,KAAK,SAAS;AAC9I,IAAI,gBAAgB,QAAQ,YAAY,UAAU,CAAC,GAAG,cAAc,EAAE,OAAO,KAAK,CAAC,GAAG,GAAG;AACzF,IAAI,gBAAgB,CAAC;AACrB,OAAO,UAAU,aAAa,aAAa;AAC3C,WAAW,eAAe,QAAQ,8BAAoB,GAAG,OAAO,OAAO"}
1
+ {"version":3,"file":"index.native.js","names":[],"sources":["cjs/index.native.js"],"sourcesContent":["\"use strict\";\nvar __defProp = Object.defineProperty;\nvar __getOwnPropDesc = Object.getOwnPropertyDescriptor;\nvar __getOwnPropNames = Object.getOwnPropertyNames;\nvar __hasOwnProp = Object.prototype.hasOwnProperty;\nvar __copyProps = (to, from, except, desc) => {\n if (from && typeof from === \"object\" || typeof from === \"function\") {\n for (let key of __getOwnPropNames(from))\n if (!__hasOwnProp.call(to, key) && key !== except)\n __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });\n }\n return to;\n};\nvar __reExport = (target, mod, secondTarget) => (__copyProps(target, mod, \"default\"), secondTarget && __copyProps(secondTarget, mod, \"default\"));\nvar __toCommonJS = (mod) => __copyProps(__defProp({}, \"__esModule\", { value: true }), mod);\nvar index_exports = {};\nmodule.exports = __toCommonJS(index_exports);\n__reExport(index_exports, require(\"./RovingFocusGroup\"), module.exports);\n//# sourceMappingURL=index.js.map\n"],"mappings":";;;AACA,IAAI,YAAY,OAAO;AACvB,IAAI,mBAAmB,OAAO;AAC9B,IAAI,oBAAoB,OAAO;AAC/B,IAAI,eAAe,OAAO,UAAU;AACpC,IAAI,eAAe,IAAI,MAAM,QAAQ,SAAS;CAC5C,IAAI,QAAQ,OAAO,SAAS,YAAY,OAAO,SAAS,YAAY;EAClE,KAAK,IAAI,OAAO,kBAAkB,IAAI,GACpC,IAAI,CAAC,aAAa,KAAK,IAAI,GAAG,KAAK,QAAQ,QACzC,UAAU,IAAI,KAAK;GAAE,WAAW,KAAK;GAAM,YAAY,EAAE,OAAO,iBAAiB,MAAM,GAAG,MAAM,KAAK;EAAW,CAAC;CACvH;CACA,OAAO;AACT;AACA,IAAI,cAAc,QAAQ,KAAK,kBAAkB,YAAY,QAAQ,KAAK,SAAS,GAAG,gBAAgB,YAAY,cAAc,KAAK,SAAS;AAC9I,IAAI,gBAAgB,QAAQ,YAAY,UAAU,CAAC,GAAG,cAAc,EAAE,OAAO,KAAK,CAAC,GAAG,GAAG;AACzF,IAAI,gBAAgB,CAAC;AACrB,OAAO,UAAU,aAAa,aAAa;AAC3C,WAAW,eAAe,QAAQ,8BAAoB,GAAG,OAAO,OAAO"}
@@ -1 +1 @@
1
- {"version":3,"file":"RovingFocusGroup.js","names":[],"sources":["esm/RovingFocusGroup.js"],"sourcesContent":["import { createCollection } from \"@tamagui/collection\";\nimport { useComposedRefs } from \"@tamagui/compose-refs\";\nimport { isWeb } from \"@tamagui/constants\";\nimport {\n Slot,\n View,\n createChangeEventDetails,\n createStyledContext,\n useEvent,\n createRefComponent\n} from \"@tamagui/core\";\nimport { composeEventHandlers, withStaticProperties } from \"@tamagui/helpers\";\nimport { useControllableState } from \"@tamagui/use-controllable-state\";\nimport { useDirection } from \"@tamagui/use-direction\";\nimport * as React from \"react\";\nimport { jsx } from \"react/jsx-runtime\";\nconst RovingFocusGroupImpl = createRefComponent((props, forwardedRef) => {\n const {\n __scopeRovingFocusGroup,\n orientation,\n loop = false,\n dir,\n currentTabStopId: currentTabStopIdProp,\n defaultCurrentTabStopId,\n onCurrentTabStopIdChange,\n onEntryFocus,\n asChild,\n ...groupProps\n } = props;\n const ref = React.useRef(null);\n const composedRefs = useComposedRefs(forwardedRef, ref);\n const direction = useDirection(dir);\n const [currentTabStopId = null, setCurrentTabStopId] = useControllableState({\n prop: currentTabStopIdProp,\n defaultProp: defaultCurrentTabStopId ?? null,\n onChange: (tabStopId, details) => {\n if (details) onCurrentTabStopIdChange?.(tabStopId, details);\n }\n });\n const [isTabbingBackOut, setIsTabbingBackOut] = React.useState(false);\n const handleEntryFocus = useEvent(onEntryFocus);\n const getItems = useCollection(__scopeRovingFocusGroup || ROVING_FOCUS_GROUP_CONTEXT);\n const isClickFocusRef = React.useRef(false);\n const pendingFocusDetailsRef = React.useRef(null);\n const [focusableItemsCount, setFocusableItemsCount] = React.useState(0);\n const Comp = asChild ? Slot : View;\n return /* @__PURE__ */ jsx(\n RovingFocusProvider,\n {\n scope: __scopeRovingFocusGroup,\n orientation,\n dir: direction,\n loop,\n currentTabStopId,\n onItemFocus: React.useCallback(\n (tabStopId, event) => {\n if (tabStopId === currentTabStopId) return;\n const details = pendingFocusDetailsRef.current ?? createChangeEventDetails(\"trigger-focus\", event, event.currentTarget);\n pendingFocusDetailsRef.current = null;\n setCurrentTabStopId(tabStopId, details);\n },\n [currentTabStopId, setCurrentTabStopId]\n ),\n setPendingFocusDetails: React.useCallback((details) => {\n pendingFocusDetailsRef.current = details;\n }, []),\n onItemShiftTab: React.useCallback(() => setIsTabbingBackOut(true), []),\n onFocusableItemAdd: React.useCallback(\n () => setFocusableItemsCount((prevCount) => prevCount + 1),\n []\n ),\n onFocusableItemRemove: React.useCallback(\n () => setFocusableItemsCount((prevCount) => prevCount - 1),\n []\n ),\n children: /* @__PURE__ */ jsx(\n Comp,\n {\n tabIndex: isTabbingBackOut || focusableItemsCount === 0 ? -1 : 0,\n \"data-orientation\": orientation,\n ...groupProps,\n ref: composedRefs,\n outlineStyle: \"none\",\n onMouseDown: composeEventHandlers(props.onMouseDown, () => {\n isClickFocusRef.current = true;\n }),\n onFocus: composeEventHandlers(props.onFocus, (event) => {\n const isKeyboardFocus = !isClickFocusRef.current;\n if (event.target === event.currentTarget && isKeyboardFocus && !isTabbingBackOut) {\n const details = createChangeEventDetails(\n \"trigger-focus\",\n event,\n event.currentTarget\n );\n handleEntryFocus(details);\n if (!details.isCanceled) {\n const items = getItems().filter((item) => item.focusable);\n const activeItem = items.find((item) => item.active);\n const currentItem = items.find((item) => item.id === currentTabStopId);\n const candidateItems = [activeItem, currentItem, ...items].filter(\n Boolean\n );\n const candidateNodes = candidateItems.map((item) => item.ref.current);\n focusFirst(candidateNodes, { focusVisible: false });\n }\n }\n isClickFocusRef.current = false;\n }),\n onBlur: composeEventHandlers(\n props.onBlur,\n () => setIsTabbingBackOut(false)\n )\n }\n )\n }\n );\n});\nconst ITEM_NAME = \"RovingFocusGroupItem\";\nconst RovingFocusGroupItem = createRefComponent((props, forwardedRef) => {\n const {\n __scopeRovingFocusGroup,\n active = false,\n tabStopId,\n tabIndex: tabIndexProp,\n ...itemProps\n } = props;\n const tabIndex = tabIndexProp ?? 0;\n const focusable = Number(tabIndex) >= 0;\n const autoId = React.useId();\n const id = tabStopId || autoId;\n const context = useRovingFocusContext(__scopeRovingFocusGroup);\n const isCurrentTabStop = context.currentTabStopId === id;\n const getItems = useCollection(__scopeRovingFocusGroup || ROVING_FOCUS_GROUP_CONTEXT);\n const skipNextFocusRequestRef = React.useRef(false);\n const { onFocusableItemAdd, onFocusableItemRemove } = context;\n React.useEffect(() => {\n if (focusable) {\n onFocusableItemAdd();\n return () => onFocusableItemRemove();\n }\n }, [focusable, onFocusableItemAdd, onFocusableItemRemove]);\n return /* @__PURE__ */ jsx(\n Collection.ItemSlot,\n {\n scope: __scopeRovingFocusGroup || ROVING_FOCUS_GROUP_CONTEXT,\n id,\n focusable,\n active,\n children: /* @__PURE__ */ jsx(\n View,\n {\n tabIndex,\n \"data-orientation\": context.orientation,\n ...itemProps,\n ref: forwardedRef,\n onMouseDown: composeEventHandlers(props.onMouseDown, (event) => {\n if (!focusable) event.preventDefault();\n else {\n skipNextFocusRequestRef.current = true;\n queueMicrotask(() => {\n skipNextFocusRequestRef.current = false;\n });\n context.onItemFocus(id, event);\n }\n }),\n onFocus: composeEventHandlers(props.onFocus, (event) => {\n if (skipNextFocusRequestRef.current) {\n skipNextFocusRequestRef.current = false;\n return;\n }\n context.onItemFocus(id, event);\n }),\n ...isWeb && {\n onKeyDown: composeEventHandlers(\n props.onKeyDown,\n (event) => {\n if (event.key === \"Tab\" && event.shiftKey) {\n context.onItemShiftTab();\n return;\n }\n if (event.target !== event.currentTarget) return;\n const focusIntent = getFocusIntent(event, context.orientation, context.dir);\n if (focusIntent !== void 0) {\n event.preventDefault();\n const items = getItems().filter((item) => item.focusable);\n let candidateNodes = items.map((item) => item.ref.current);\n if (focusIntent === \"last\") candidateNodes.reverse();\n else if (focusIntent === \"prev\" || focusIntent === \"next\") {\n if (focusIntent === \"prev\") candidateNodes.reverse();\n const currentIndex = candidateNodes.indexOf(event.currentTarget);\n candidateNodes = context.loop ? wrapArray(candidateNodes, currentIndex + 1) : candidateNodes.slice(currentIndex + 1);\n }\n const details = createChangeEventDetails(\n \"keyboard\",\n event,\n event.currentTarget\n );\n setTimeout(() => {\n context.setPendingFocusDetails(details);\n focusFirst(candidateNodes, { focusVisible: true });\n context.setPendingFocusDetails(null);\n });\n }\n }\n )\n }\n }\n )\n }\n );\n});\nRovingFocusGroupItem.displayName = ITEM_NAME;\nconst GROUP_NAME = \"RovingFocusGroup\";\nconst [Collection, useCollection] = createCollection(GROUP_NAME);\nconst { Provider: RovingFocusProvider, useStyledContext: useRovingFocusContext } = createStyledContext();\nconst ROVING_FOCUS_GROUP_CONTEXT = \"RovingFocusGroupContext\";\nconst RovingFocusGroup = withStaticProperties(\n createRefComponent(\n (props, forwardedRef) => {\n return /* @__PURE__ */ jsx(\n Collection.Provider,\n {\n scope: props.__scopeRovingFocusGroup || ROVING_FOCUS_GROUP_CONTEXT,\n children: /* @__PURE__ */ jsx(\n Collection.Slot,\n {\n scope: props.__scopeRovingFocusGroup || ROVING_FOCUS_GROUP_CONTEXT,\n children: /* @__PURE__ */ jsx(RovingFocusGroupImpl, { ...props, ref: forwardedRef })\n }\n )\n }\n );\n }\n ),\n {\n Item: RovingFocusGroupItem\n }\n);\nRovingFocusGroup.displayName = GROUP_NAME;\nconst MAP_KEY_TO_FOCUS_INTENT = {\n ArrowLeft: \"prev\",\n ArrowUp: \"prev\",\n ArrowRight: \"next\",\n ArrowDown: \"next\",\n PageUp: \"first\",\n Home: \"first\",\n PageDown: \"last\",\n End: \"last\"\n};\nfunction getDirectionAwareKey(key, dir) {\n if (dir !== \"rtl\") return key;\n return key === \"ArrowLeft\" ? \"ArrowRight\" : key === \"ArrowRight\" ? \"ArrowLeft\" : key;\n}\nfunction getFocusIntent(event, orientation, dir) {\n const key = getDirectionAwareKey(event.key, dir);\n if (orientation === \"vertical\" && [\"ArrowLeft\", \"ArrowRight\"].includes(key))\n return void 0;\n if (orientation === \"horizontal\" && [\"ArrowUp\", \"ArrowDown\"].includes(key))\n return void 0;\n return MAP_KEY_TO_FOCUS_INTENT[key];\n}\nfunction focusFirst(candidates, options) {\n const PREVIOUSLY_FOCUSED_ELEMENT = document.activeElement;\n for (const candidate of candidates) {\n if (candidate === PREVIOUSLY_FOCUSED_ELEMENT) return;\n candidate.focus({ focusVisible: options?.focusVisible });\n if (document.activeElement !== PREVIOUSLY_FOCUSED_ELEMENT) return;\n }\n}\nfunction wrapArray(array, startIndex) {\n return array.map((_, index) => array[(startIndex + index) % array.length]);\n}\nexport {\n RovingFocusGroup,\n RovingFocusGroupItem\n};\n//# sourceMappingURL=RovingFocusGroup.js.map\n"],"mappings":";;;;;;;;;;;AAgBA,MAAM,uBAAuB,oBAAoB,OAAO,iBAAiB;CACvE,MAAM,EACJ,yBACA,aACA,OAAO,OACP,KACA,kBAAkB,sBAClB,yBACA,0BACA,cACA,SACA,GAAG,eACD;CACJ,MAAM,MAAM,MAAM,OAAO,IAAI;CAC7B,MAAM,eAAe,gBAAgB,cAAc,GAAG;CACtD,MAAM,YAAY,aAAa,GAAG;CAClC,MAAM,CAAC,mBAAmB,MAAM,uBAAuB,qBAAqB;EAC1E,MAAM;EACN,aAAa,2BAA2B;EACxC,WAAW,WAAW,YAAY;GAChC,IAAI,SAAS,2BAA2B,WAAW,OAAO;EAC5D;CACF,CAAC;CACD,MAAM,CAAC,kBAAkB,uBAAuB,MAAM,SAAS,KAAK;CACpE,MAAM,mBAAmB,SAAS,YAAY;CAC9C,MAAM,WAAW,cAAc,2BAA2B,0BAA0B;CACpF,MAAM,kBAAkB,MAAM,OAAO,KAAK;CAC1C,MAAM,yBAAyB,MAAM,OAAO,IAAI;CAChD,MAAM,CAAC,qBAAqB,0BAA0B,MAAM,SAAS,CAAC;CACtE,MAAM,OAAO,UAAU,OAAO;CAC9B,OAAuB,oBACrB,qBACA;EACE,OAAO;EACP;EACA,KAAK;EACL;EACA;EACA,aAAa,MAAM,aAChB,WAAW,UAAU;GACpB,IAAI,cAAc,kBAAkB;GACpC,MAAM,UAAU,uBAAuB,WAAW,yBAAyB,iBAAiB,OAAO,MAAM,aAAa;GACtH,uBAAuB,UAAU;GACjC,oBAAoB,WAAW,OAAO;EACxC,GACA,CAAC,kBAAkB,mBAAmB,CACxC;EACA,wBAAwB,MAAM,aAAa,YAAY;GACrD,uBAAuB,UAAU;EACn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AAa,KAAK;CAC/C,MAAM,MAAM,qBAAqB,MAAM,KAAK,GAAG;CAC/C,IAAI,gBAAgB,cAAc,CAAC,aAAa,YAAY,EAAE,SAAS,GAAG,GACxE,OAAO,KAAK;CACd,IAAI,gBAAgB,gBAAgB,CAAC,WAAW,WAAW,EAAE,SAAS,GAAG,GACvE,OAAO,KAAK;CACd,OAAO,wBAAwB;AACjC;AACA,SAAS,WAAW,YAAY,SAAS;CACvC,MAAM,6BAA6B,SAAS;CAC5C,KAAK,MAAM,aAAa,YAAY;EAClC,IAAI,cAAc,4BAA4B;EAC9C,UAAU,MAAM,EAAE,cAAc,SAAS,aAAa,CAAC;EACvD,IAAI,SAAS,kBAAkB,4BAA4B;CAC7D;AACF;AACA,SAAS,UAAU,OAAO,YAAY;CACpC,OAAO,MAAM,KAAK,GAAG,UAAU,OAAO,aAAa,SAAS,MAAM,OAAO;AAC3E"}
1
+ {"version":3,"file":"RovingFocusGroup.js","names":[],"sources":["esm/RovingFocusGroup.js"],"sourcesContent":["import { createCollection } from \"@tamagui/collection\";\nimport { useComposedRefs } from \"@tamagui/compose-refs\";\nimport { isWeb } from \"@tamagui/constants\";\nimport {\n Slot,\n View,\n createChangeEventDetails,\n createStyledContext,\n useEvent,\n createRefComponent\n} from \"@tamagui/core\";\nimport { composeEventHandlers, withStaticProperties } from \"@tamagui/helpers\";\nimport { useControllableState } from \"@tamagui/use-controllable-state\";\nimport { useDirection } from \"@tamagui/use-direction\";\nimport * as React from \"react\";\nimport { jsx } from \"react/jsx-runtime\";\nconst RovingFocusGroupImpl = createRefComponent((props, forwardedRef) => {\n const {\n __scopeRovingFocusGroup,\n orientation,\n loop = false,\n dir,\n currentTabStopId: currentTabStopIdProp,\n defaultCurrentTabStopId,\n onCurrentTabStopIdChange,\n onEntryFocus,\n asChild,\n ...groupProps\n } = props;\n const ref = React.useRef(null);\n const composedRefs = useComposedRefs(forwardedRef, ref);\n const direction = useDirection(dir);\n const [currentTabStopId = null, setCurrentTabStopId] = useControllableState({\n prop: currentTabStopIdProp,\n defaultProp: defaultCurrentTabStopId ?? null,\n onChange: (tabStopId, details) => {\n if (details) onCurrentTabStopIdChange?.(tabStopId, details);\n }\n });\n const [isTabbingBackOut, setIsTabbingBackOut] = React.useState(false);\n const handleEntryFocus = useEvent(onEntryFocus);\n const getItems = useCollection(__scopeRovingFocusGroup || ROVING_FOCUS_GROUP_CONTEXT);\n const isClickFocusRef = React.useRef(false);\n const pendingFocusDetailsRef = React.useRef(null);\n const [focusableItemsCount, setFocusableItemsCount] = React.useState(0);\n const Comp = asChild ? Slot : View;\n return /* @__PURE__ */ jsx(\n RovingFocusProvider,\n {\n scope: __scopeRovingFocusGroup,\n orientation,\n dir: direction,\n loop,\n currentTabStopId,\n onItemFocus: React.useCallback(\n (tabStopId, event) => {\n if (tabStopId === currentTabStopId) return;\n const details = pendingFocusDetailsRef.current ?? createChangeEventDetails(\"trigger-focus\", event, event.currentTarget);\n pendingFocusDetailsRef.current = null;\n setCurrentTabStopId(tabStopId, details);\n },\n [currentTabStopId, setCurrentTabStopId]\n ),\n setPendingFocusDetails: React.useCallback((details) => {\n pendingFocusDetailsRef.current = details;\n }, []),\n onItemShiftTab: React.useCallback(() => setIsTabbingBackOut(true), []),\n onFocusableItemAdd: React.useCallback(\n () => setFocusableItemsCount((prevCount) => prevCount + 1),\n []\n ),\n onFocusableItemRemove: React.useCallback(\n () => setFocusableItemsCount((prevCount) => prevCount - 1),\n []\n ),\n children: /* @__PURE__ */ jsx(\n Comp,\n {\n tabIndex: isTabbingBackOut || focusableItemsCount === 0 ? -1 : 0,\n \"data-orientation\": orientation,\n ...groupProps,\n ref: composedRefs,\n outlineStyle: \"none\",\n onMouseDown: composeEventHandlers(props.onMouseDown, () => {\n isClickFocusRef.current = true;\n }),\n onFocus: composeEventHandlers(props.onFocus, (event) => {\n const isKeyboardFocus = !isClickFocusRef.current;\n if (event.target === event.currentTarget && isKeyboardFocus && !isTabbingBackOut) {\n const details = createChangeEventDetails(\n \"trigger-focus\",\n event,\n event.currentTarget\n );\n handleEntryFocus(details);\n if (!details.isCanceled) {\n const items = getItems().filter((item) => item.focusable);\n const activeItem = items.find((item) => item.active);\n const currentItem = items.find((item) => item.id === currentTabStopId);\n const candidateItems = [activeItem, currentItem, ...items].filter(\n Boolean\n );\n const candidateNodes = candidateItems.map((item) => item.ref.current);\n focusFirst(candidateNodes, { focusVisible: false });\n }\n }\n isClickFocusRef.current = false;\n }),\n onBlur: composeEventHandlers(\n props.onBlur,\n () => setIsTabbingBackOut(false)\n )\n }\n )\n }\n );\n});\nconst ITEM_NAME = \"RovingFocusGroupItem\";\nconst RovingFocusGroupItem = createRefComponent((props, forwardedRef) => {\n const {\n __scopeRovingFocusGroup,\n active = false,\n tabStopId,\n tabIndex: tabIndexProp,\n ...itemProps\n } = props;\n const tabIndex = tabIndexProp ?? 0;\n const focusable = Number(tabIndex) >= 0;\n const autoId = React.useId();\n const id = tabStopId || autoId;\n const context = useRovingFocusContext(__scopeRovingFocusGroup);\n const isCurrentTabStop = context.currentTabStopId === id;\n const getItems = useCollection(__scopeRovingFocusGroup || ROVING_FOCUS_GROUP_CONTEXT);\n const skipNextFocusRequestRef = React.useRef(false);\n const { onFocusableItemAdd, onFocusableItemRemove } = context;\n React.useEffect(() => {\n if (focusable) {\n onFocusableItemAdd();\n return () => onFocusableItemRemove();\n }\n }, [focusable, onFocusableItemAdd, onFocusableItemRemove]);\n return /* @__PURE__ */ jsx(\n Collection.ItemSlot,\n {\n scope: __scopeRovingFocusGroup || ROVING_FOCUS_GROUP_CONTEXT,\n id,\n focusable,\n active,\n children: /* @__PURE__ */ jsx(\n View,\n {\n tabIndex,\n \"data-orientation\": context.orientation,\n ...itemProps,\n ref: forwardedRef,\n onMouseDown: composeEventHandlers(props.onMouseDown, (event) => {\n if (!focusable) event.preventDefault();\n else {\n skipNextFocusRequestRef.current = true;\n queueMicrotask(() => {\n skipNextFocusRequestRef.current = false;\n });\n context.onItemFocus(id, event);\n }\n }),\n onFocus: composeEventHandlers(props.onFocus, (event) => {\n if (skipNextFocusRequestRef.current) {\n skipNextFocusRequestRef.current = false;\n return;\n }\n context.onItemFocus(id, event);\n }),\n ...isWeb && {\n onKeyDown: composeEventHandlers(\n props.onKeyDown,\n (event) => {\n if (event.key === \"Tab\" && event.shiftKey) {\n context.onItemShiftTab();\n return;\n }\n if (event.target !== event.currentTarget) return;\n const focusIntent = getFocusIntent(event, context.orientation, context.dir);\n if (focusIntent !== void 0) {\n event.preventDefault();\n const items = getItems().filter((item) => item.focusable);\n let candidateNodes = items.map((item) => item.ref.current);\n if (focusIntent === \"last\") candidateNodes.reverse();\n else if (focusIntent === \"prev\" || focusIntent === \"next\") {\n if (focusIntent === \"prev\") candidateNodes.reverse();\n const currentIndex = candidateNodes.indexOf(event.currentTarget);\n candidateNodes = context.loop ? wrapArray(candidateNodes, currentIndex + 1) : candidateNodes.slice(currentIndex + 1);\n }\n const details = createChangeEventDetails(\n \"keyboard\",\n event,\n event.currentTarget\n );\n setTimeout(() => {\n context.setPendingFocusDetails(details);\n focusFirst(candidateNodes, { focusVisible: true });\n context.setPendingFocusDetails(null);\n });\n }\n }\n )\n }\n }\n )\n }\n );\n});\nRovingFocusGroupItem.displayName = ITEM_NAME;\nconst GROUP_NAME = \"RovingFocusGroup\";\nconst [Collection, useCollection] = createCollection(GROUP_NAME);\nconst { Provider: RovingFocusProvider, useStyledContext: useRovingFocusContext } = createStyledContext();\nconst ROVING_FOCUS_GROUP_CONTEXT = \"RovingFocusGroupContext\";\nconst RovingFocusGroup = withStaticProperties(\n createRefComponent(\n (props, forwardedRef) => {\n return /* @__PURE__ */ jsx(\n Collection.Provider,\n {\n scope: props.__scopeRovingFocusGroup || ROVING_FOCUS_GROUP_CONTEXT,\n children: /* @__PURE__ */ jsx(\n Collection.Slot,\n {\n scope: props.__scopeRovingFocusGroup || ROVING_FOCUS_GROUP_CONTEXT,\n children: /* @__PURE__ */ jsx(RovingFocusGroupImpl, { ...props, ref: forwardedRef })\n }\n )\n }\n );\n }\n ),\n {\n Item: RovingFocusGroupItem\n }\n);\nRovingFocusGroup.displayName = GROUP_NAME;\nconst MAP_KEY_TO_FOCUS_INTENT = {\n ArrowLeft: \"prev\",\n ArrowUp: \"prev\",\n ArrowRight: \"next\",\n ArrowDown: \"next\",\n PageUp: \"first\",\n Home: \"first\",\n PageDown: \"last\",\n End: \"last\"\n};\nfunction getDirectionAwareKey(key, dir) {\n if (dir !== \"rtl\") return key;\n return key === \"ArrowLeft\" ? \"ArrowRight\" : key === \"ArrowRight\" ? \"ArrowLeft\" : key;\n}\nfunction getFocusIntent(event, orientation, dir) {\n const key = getDirectionAwareKey(event.key, dir);\n if (orientation === \"vertical\" && [\"ArrowLeft\", \"ArrowRight\"].includes(key))\n return void 0;\n if (orientation === \"horizontal\" && [\"ArrowUp\", \"ArrowDown\"].includes(key))\n return void 0;\n return MAP_KEY_TO_FOCUS_INTENT[key];\n}\nfunction focusFirst(candidates, options) {\n const PREVIOUSLY_FOCUSED_ELEMENT = document.activeElement;\n for (const candidate of candidates) {\n if (candidate === PREVIOUSLY_FOCUSED_ELEMENT) return;\n candidate.focus({ focusVisible: options?.focusVisible });\n if (document.activeElement !== PREVIOUSLY_FOCUSED_ELEMENT) return;\n }\n}\nfunction wrapArray(array, startIndex) {\n return array.map((_, index) => array[(startIndex + index) % array.length]);\n}\nexport {\n RovingFocusGroup,\n RovingFocusGroupItem\n};\n//# sourceMappingURL=RovingFocusGroup.js.map\n"],"mappings":";;;;;;;;;;;AAgBA,MAAM,uBAAuB,oBAAoB,OAAO,iBAAiB;CACvE,MAAM,EACJ,yBACA,aACA,OAAO,OACP,KACA,kBAAkB,sBAClB,yBACA,0BACA,cACA,SACA,GAAG,eACD;CACJ,MAAM,MAAM,MAAM,OAAO,IAAI;CAC7B,MAAM,eAAe,gBAAgB,cAAc,GAAG;CACtD,MAAM,YAAY,aAAa,GAAG;CAClC,MAAM,CAAC,mBAAmB,MAAM,uBAAuB,qBAAqB;EAC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,OAAO,YAAY;CACpC,OAAO,MAAM,KAAK,GAAG,UAAU,OAAO,aAAa,SAAS,MAAM,OAAO;AAC3E"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tamagui/roving-focus",
3
- "version": "3.0.0-beta.669.1",
3
+ "version": "3.0.0-beta.728.1",
4
4
  "gitHead": "a49cc7ea6b93ba384e77a4880ae48ac4a5635c14",
5
5
  "source": "src/index.ts",
6
6
  "files": [
@@ -35,19 +35,19 @@
35
35
  "clean:build": "tamagui-build clean:build"
36
36
  },
37
37
  "dependencies": {
38
- "@tamagui/collection": "3.0.0-beta.669.1",
39
- "@tamagui/compose-refs": "3.0.0-beta.669.1",
40
- "@tamagui/constants": "3.0.0-beta.669.1",
41
- "@tamagui/core": "3.0.0-beta.669.1",
42
- "@tamagui/create-context": "3.0.0-beta.669.1",
43
- "@tamagui/helpers": "3.0.0-beta.669.1",
44
- "@tamagui/use-controllable-state": "3.0.0-beta.669.1",
45
- "@tamagui/use-direction": "3.0.0-beta.669.1",
46
- "@tamagui/use-event": "3.0.0-beta.669.1"
38
+ "@tamagui/collection": "3.0.0-beta.728.1",
39
+ "@tamagui/compose-refs": "3.0.0-beta.728.1",
40
+ "@tamagui/constants": "3.0.0-beta.728.1",
41
+ "@tamagui/core": "3.0.0-beta.728.1",
42
+ "@tamagui/create-context": "3.0.0-beta.728.1",
43
+ "@tamagui/helpers": "3.0.0-beta.728.1",
44
+ "@tamagui/use-controllable-state": "3.0.0-beta.728.1",
45
+ "@tamagui/use-direction": "3.0.0-beta.728.1",
46
+ "@tamagui/use-event": "3.0.0-beta.728.1"
47
47
  },
48
48
  "devDependencies": {
49
- "@tamagui/build": "3.0.0-beta.669.1",
50
- "react": ">=19"
49
+ "@tamagui/build": "3.0.0-beta.728.1",
50
+ "react": "19.2.3"
51
51
  },
52
52
  "peerDependencies": {
53
53
  "react": ">=19"