{"version":3,"file":"tokens.mjs","sources":["../../../../../../packages/components/roving-focus-group/src/tokens.ts"],"sourcesContent":["import type { StyleValue, InjectionKey, Ref } from 'vue'\r\nimport type { SgRovingFocusGroupProps } from './roving-focus-group'\r\n\r\ntype EventHandler<T = Event> = (e: T) => void\r\n\r\nexport type RovingGroupInjectionContext = {\r\n  currentTabbedId: Ref<string | null>\r\n  dir: Ref<SgRovingFocusGroupProps['dir']>\r\n  loop: Ref<SgRovingFocusGroupProps['loop']>\r\n  orientation: Ref<SgRovingFocusGroupProps['orientation']>\r\n  tabIndex: Ref<number>\r\n  rovingFocusGroupRef: Ref<HTMLElement | null>\r\n  rovingFocusGroupRootStyle: Ref<StyleValue>\r\n  onBlur: EventHandler\r\n  onFocus: EventHandler<FocusEvent>\r\n  onMousedown: EventHandler\r\n  onItemFocus: (id: string) => void\r\n  onItemShiftTab: () => void\r\n}\r\n\r\nexport type RovingFocusGroupItemInjectionContext = {\r\n  rovingFocusGroupItemRef: Ref<HTMLElement | null>\r\n  tabIndex: Ref<number>\r\n  handleMousedown: EventHandler\r\n  handleFocus: EventHandler\r\n  handleKeydown: EventHandler\r\n}\r\n\r\nexport const ROVING_FOCUS_GROUP_INJECTION_KEY: InjectionKey<RovingGroupInjectionContext> =\r\n  Symbol('sgRovingFocusGroup')\r\n\r\nexport const ROVING_FOCUS_GROUP_ITEM_INJECTION_KEY: InjectionKey<RovingFocusGroupItemInjectionContext> =\r\n  Symbol('sgRovingFocusGroupItem')\r\n"],"names":[],"mappings":"AAAY,MAAC,gCAAgC,GAAG,MAAM,CAAC,oBAAoB,EAAE;AACjE,MAAC,qCAAqC,GAAG,MAAM,CAAC,wBAAwB;;;;"}