UNPKG

@wordpress/components

Version:
1 lines • 882 B
{"version":3,"file":"roving-tab-index-context.cjs","names":["createContext","useContext"],"sources":["../../src/tree-grid/roving-tab-index-context.ts"],"sourcesContent":["import { createContext, useContext } from '@wordpress/element';\n\nconst RovingTabIndexContext = createContext<\n\t| {\n\t\t\tlastFocusedElement: HTMLElement | undefined;\n\t\t\tsetLastFocusedElement: React.Dispatch<\n\t\t\t\tReact.SetStateAction< HTMLElement | undefined >\n\t\t\t>;\n\t }\n\t| undefined\n>( undefined );\nRovingTabIndexContext.displayName = 'RovingTabIndexContext';\n\nexport const useRovingTabIndexContext = () =>\n\tuseContext( RovingTabIndexContext );\nexport const RovingTabIndexProvider = RovingTabIndexContext.Provider;\n"],"mappings":";;;;;;;AAEA,MAAM,yBAAA,GAAwBA,mBAAAA,cAAAA,CAQ3B,KAAA,CAAU;AACb,sBAAsB,cAAc;AAEpC,MAAa,kCAAA,GACZC,mBAAAA,WAAAA,CAAY,qBAAsB;AACnC,MAAa,yBAAyB,sBAAsB"}