UNPKG

@mantine/core

Version:

React components library focused on usability, accessibility and developer experience

11 lines (10 loc) 600 B
"use client"; const require_find_element_ancestor = require("../find-element-ancestor/find-element-ancestor.cjs"); //#region packages/@mantine/core/src/core/utils/get-context-item-index/get-context-item-index.ts function getContextItemIndex(elementSelector, parentSelector, node) { if (!node) return null; return Array.from(require_find_element_ancestor.findElementAncestor(node, parentSelector)?.querySelectorAll(elementSelector) || []).findIndex((element) => element === node); } //#endregion exports.getContextItemIndex = getContextItemIndex; //# sourceMappingURL=get-context-item-index.cjs.map