UNPKG

@wordpress/components

Version:
1 lines • 1.15 kB
{"version":3,"file":"item.mjs","names":[],"sources":["../../src/tree-grid/item.tsx"],"sourcesContent":["import { forwardRef } from '@wordpress/element';\nimport RovingTabIndexItem from './roving-tab-index-item';\nimport type { RovingTabIndexItemProps } from './types';\n\nfunction UnforwardedTreeGridItem(\n\t{ children, ...props }: RovingTabIndexItemProps,\n\tref: React.ForwardedRef< any >\n) {\n\treturn (\n\t\t<RovingTabIndexItem ref={ ref } { ...props }>\n\t\t\t{ children }\n\t\t</RovingTabIndexItem>\n\t);\n}\n\n/**\n * `TreeGridItem` is used to create a tree hierarchy.\n * It is not a visually styled component, but instead helps with adding\n * keyboard navigation and roving tab index behaviors to tree grid structures.\n *\n * @see {@link https://www.w3.org/TR/wai-aria-practices/examples/treegrid/treegrid-1.html}\n */\nexport const TreeGridItem = forwardRef( UnforwardedTreeGridItem );\nTreeGridItem.displayName = 'TreeGridItem';\n\nexport default TreeGridItem;\n"],"mappings":";;;;AAIA,SAAS,wBACR,EAAE,UAAU,GAAG,SACf,KACC;CACD,OACC,oBAAC,oBAAD;EAA0B;EAAM,GAAK;EAClC;CACiB,CAAA;AAEtB;;;;;;;;AASA,MAAa,eAAe,WAAY,uBAAwB;AAChE,aAAa,cAAc"}