{"version":3,"file":"tab-nav.mjs","sources":["../../../../../../packages/components/tabs/src/tab-nav.tsx"],"sourcesContent":["import {\n computed,\n defineComponent,\n inject,\n nextTick,\n onMounted,\n onUpdated,\n ref,\n watch,\n} from 'vue'\nimport {\n useDocumentVisibility,\n useResizeObserver,\n useWindowFocus,\n} from '@vueuse/core'\nimport {\n buildProps,\n capitalize,\n definePropType,\n mutable,\n throwError,\n} from '@element-plus/utils'\nimport { EVENT_CODE } from '@element-plus/constants'\nimport { ElIcon } from '@element-plus/components/icon'\nimport { ArrowLeft, ArrowRight, Close } from '@element-plus/icons-vue'\nimport { useNamespace } from '@element-plus/hooks'\nimport TabBar from './tab-bar.vue'\nimport { tabsRootContextKey } from './constants'\n\nimport type { CSSProperties, ExtractPropTypes } from 'vue'\nimport type { TabsPaneContext } from './constants'\nimport type { TabPaneName } from './tabs'\n\ninterface Scrollable {\n next?: boolean\n prev?: number\n}\n\nexport const tabNavProps = buildProps({\n panes: {\n type: definePropType(Array),\n default: () => mutable([] as const),\n },\n currentName: {\n type: [String, Number],\n default: '',\n },\n editable: Boolean,\n type: {\n type: String,\n values: ['card', 'border-card', ''],\n default: '',\n },\n stretch: Boolean,\n} as const)\n\nexport const tabNavEmits = {\n tabClick: (tab: TabsPaneContext, tabName: TabPaneName, ev: Event) =>\n ev instanceof Event,\n tabRemove: (tab: TabsPaneContext, ev: Event) => ev instanceof Event,\n}\n\nexport type TabNavProps = ExtractPropTypes\nexport type TabNavEmits = typeof tabNavEmits\n\nconst COMPONENT_NAME = 'ElTabNav'\nconst TabNav = defineComponent({\n name: COMPONENT_NAME,\n props: tabNavProps,\n emits: tabNavEmits,\n setup(props, { expose, emit }) {\n const rootTabs = inject(tabsRootContextKey)\n if (!rootTabs) throwError(COMPONENT_NAME, ``)\n\n const ns = useNamespace('tabs')\n const visibility = useDocumentVisibility()\n const focused = useWindowFocus()\n\n const navScroll$ = ref()\n const nav$ = ref()\n const el$ = ref()\n\n const tabBarRef = ref>()\n\n const scrollable = ref(false)\n const navOffset = ref(0)\n const isFocus = ref(false)\n const focusable = ref(true)\n\n const sizeName = computed(() =>\n ['top', 'bottom'].includes(rootTabs.props.tabPosition)\n ? 'width'\n : 'height'\n )\n const navStyle = computed(() => {\n const dir = sizeName.value === 'width' ? 'X' : 'Y'\n return {\n transform: `translate${dir}(-${navOffset.value}px)`,\n }\n })\n\n const scrollPrev = () => {\n if (!navScroll$.value) return\n\n const containerSize =\n navScroll$.value[`offset${capitalize(sizeName.value)}`]\n const currentOffset = navOffset.value\n\n if (!currentOffset) return\n\n const newOffset =\n currentOffset > containerSize ? currentOffset - containerSize : 0\n\n navOffset.value = newOffset\n }\n\n const scrollNext = () => {\n if (!navScroll$.value || !nav$.value) return\n\n const navSize = nav$.value[`offset${capitalize(sizeName.value)}`]\n const containerSize =\n navScroll$.value[`offset${capitalize(sizeName.value)}`]\n const currentOffset = navOffset.value\n\n if (navSize - currentOffset <= containerSize) return\n\n const newOffset =\n navSize - currentOffset > containerSize * 2\n ? currentOffset + containerSize\n : navSize - containerSize\n\n navOffset.value = newOffset\n }\n\n const scrollToActiveTab = async () => {\n const nav = nav$.value\n if (!scrollable.value || !el$.value || !navScroll$.value || !nav) return\n\n await nextTick()\n\n const activeTab = el$.value.querySelector('.is-active')\n if (!activeTab) return\n\n const navScroll = navScroll$.value\n const isHorizontal = ['top', 'bottom'].includes(\n rootTabs.props.tabPosition\n )\n const activeTabBounding = activeTab.getBoundingClientRect()\n const navScrollBounding = navScroll.getBoundingClientRect()\n const maxOffset = isHorizontal\n ? nav.offsetWidth - navScrollBounding.width\n : nav.offsetHeight - navScrollBounding.height\n const currentOffset = navOffset.value\n let newOffset = currentOffset\n\n if (isHorizontal) {\n if (activeTabBounding.left < navScrollBounding.left) {\n newOffset =\n currentOffset - (navScrollBounding.left - activeTabBounding.left)\n }\n if (activeTabBounding.right > navScrollBounding.right) {\n newOffset =\n currentOffset + activeTabBounding.right - navScrollBounding.right\n }\n } else {\n if (activeTabBounding.top < navScrollBounding.top) {\n newOffset =\n currentOffset - (navScrollBounding.top - activeTabBounding.top)\n }\n if (activeTabBounding.bottom > navScrollBounding.bottom) {\n newOffset =\n currentOffset +\n (activeTabBounding.bottom - navScrollBounding.bottom)\n }\n }\n newOffset = Math.max(newOffset, 0)\n navOffset.value = Math.min(newOffset, maxOffset)\n }\n\n const update = () => {\n if (!nav$.value || !navScroll$.value) return\n\n props.stretch && tabBarRef.value?.update()\n\n const navSize = nav$.value[`offset${capitalize(sizeName.value)}`]\n const containerSize =\n navScroll$.value[`offset${capitalize(sizeName.value)}`]\n const currentOffset = navOffset.value\n\n if (containerSize < navSize) {\n scrollable.value = scrollable.value || {}\n scrollable.value.prev = currentOffset\n scrollable.value.next = currentOffset + containerSize < navSize\n if (navSize - currentOffset < containerSize) {\n navOffset.value = navSize - containerSize\n }\n } else {\n scrollable.value = false\n if (currentOffset > 0) {\n navOffset.value = 0\n }\n }\n }\n\n const changeTab = (e: KeyboardEvent) => {\n const code = e.code\n\n const { up, down, left, right } = EVENT_CODE\n if (![up, down, left, right].includes(code)) return\n\n // 左右上下键更换tab\n const tabList = Array.from(\n (e.currentTarget as HTMLDivElement).querySelectorAll(\n '[role=tab]:not(.is-disabled)'\n )\n )\n const currentIndex = tabList.indexOf(e.target as HTMLDivElement)\n\n let nextIndex: number\n if (code === left || code === up) {\n // left\n if (currentIndex === 0) {\n // first\n nextIndex = tabList.length - 1\n } else {\n nextIndex = currentIndex - 1\n }\n } else {\n // right\n if (currentIndex < tabList.length - 1) {\n // not last\n nextIndex = currentIndex + 1\n } else {\n nextIndex = 0\n }\n }\n tabList[nextIndex].focus({ preventScroll: true }) // 改变焦点元素\n tabList[nextIndex].click() // 选中下一个tab\n setFocus()\n }\n\n const setFocus = () => {\n if (focusable.value) isFocus.value = true\n }\n const removeFocus = () => (isFocus.value = false)\n\n watch(visibility, (visibility) => {\n if (visibility === 'hidden') {\n focusable.value = false\n } else if (visibility === 'visible') {\n setTimeout(() => (focusable.value = true), 50)\n }\n })\n watch(focused, (focused) => {\n if (focused) {\n setTimeout(() => (focusable.value = true), 50)\n } else {\n focusable.value = false\n }\n })\n\n useResizeObserver(el$, update)\n\n onMounted(() => setTimeout(() => scrollToActiveTab(), 0))\n onUpdated(() => update())\n\n expose({\n scrollToActiveTab,\n removeFocus,\n })\n\n return () => {\n const scrollBtn = scrollable.value\n ? [\n \n \n \n \n ,\n \n \n \n \n ,\n ]\n : null\n\n const tabs = props.panes.map((pane, index) => {\n const uid = pane.uid\n const disabled = pane.props.disabled\n const tabName = pane.props.name ?? pane.index ?? `${index}`\n const closable = !disabled && (pane.isClosable || props.editable)\n pane.index = `${index}`\n\n const btnClose = closable ? (\n emit('tabRemove', pane, ev)}\n >\n \n \n ) : null\n\n const tabLabelContent = pane.slots.label?.() || pane.props.label\n const tabindex = !disabled && pane.active ? 0 : -1\n\n return (\n setFocus()}\n onBlur={() => removeFocus()}\n onClick={(ev: MouseEvent) => {\n removeFocus()\n emit('tabClick', pane, tabName, ev)\n }}\n onKeydown={(ev: KeyboardEvent) => {\n if (\n closable &&\n (ev.code === EVENT_CODE.delete ||\n ev.code === EVENT_CODE.backspace)\n ) {\n emit('tabRemove', pane, ev)\n }\n }}\n >\n {...[tabLabelContent, btnClose]}\n \n )\n })\n\n return (\n \n {scrollBtn}\n
\n \n {...[\n !props.type ? (\n \n ) : null,\n tabs,\n ]}\n
\n \n \n )\n }\n },\n})\n\nexport type TabNavInstance = InstanceType & {\n scrollToActiveTab: () => Promise\n removeFocus: () => void\n}\nexport default TabNav\n"],"names":["tabNavProps","buildProps","panes","type","definePropType","Array","default","mutable","currentName","String","Number","editable","Boolean","values","stretch","tabNavEmits","tabClick","tab","tabName","ev","Event","tabRemove","COMPONENT_NAME","TabNav","defineComponent","name","props","emits","expose","emit","ns","useNamespace","visibility","useDocumentVisibility","focused","useWindowFocus","navScroll$","ref","nav$","el$","tabBarRef","scrollable","navOffset","isFocus","focusable","sizeName","computed","includes","rootTabs","tabPosition","navStyle","dir","value","transform","scrollPrev","containerSize","capitalize","currentOffset","newOffset","scrollNext","scrollToActiveTab","activeTab","navScroll","navScrollBounding","maxOffset","isHorizontal","offsetWidth","activeTabBounding","right","top","bottom","max","update","navSize","prev","changeTab","code","left","down","tabList","currentIndex","nextIndex","preventScroll","click","setFocus","watch","_createVNode","setTimeout","useResizeObserver","onUpdated","removeFocus","e","pane","index","closable","disabled","btnClose","delete","backspace","tabLabelContent"],"mappings":";;;;;;;;;;;;;;;;AAsCaA,MAAAA,WAAW,GAAGC,UAAU,CAAC;AACpCC,EAAAA,KAAK,EAAE;AACLC,IAAAA,IAAI,EAAEC,cAAc,CAAoBC,KAApB,CADf;AAELC,IAAAA,OAAO,EAAE,MAAMC,OAAO,CAAC,EAAD,CAAA;GAHY;AAKpCC,EAAAA,WAAW,EAAE;AACXL,IAAAA,IAAI,EAAE,CAACM,MAAD,EAASC,MAAT,CADK;AAEXJ,IAAAA,OAAO,EAAE,EAAA;GAPyB;AASpCK,EAAAA,QAAQ,EAAEC,OAT0B;AAUpCT,EAAAA,IAAI,EAAE;AACJA,IAAAA,IAAI,EAAEM,MADF;AAEJI,IAAAA,MAAM,EAAE,CAAC,MAAD,EAAS,aAAT,EAAwB,EAAxB,CAFJ;AAGJP,IAAAA,OAAO,EAAE,EAAA;GAbyB;AAepCQ,EAAAA,OAAO,EAAEF,OAAAA;AAf2B,CAAD,EAA9B;AAkBA,MAAMG,WAAW,GAAG;EACzBC,QAAQ,EAAE,CAACC,GAAD,EAAuBC,OAAvB,EAA6CC,EAA7C,KACRA,EAAE,YAAYC,KAFS;AAGzBC,EAAAA,SAAS,EAAE,CAACJ,GAAD,EAAuBE,EAAvB,KAAqCA,EAAE,YAAYC,KAAAA;AAHrC,EAApB;AASP,MAAME,cAAc,GAAG,UAAvB,CAAA;AACMC,MAAAA,MAAM,GAAGC,eAAe,CAAC;AAC7BC,EAAAA,IAAI,EAAEH,cADuB;AAE7BI,EAAAA,KAAK,EAAE1B,WAFsB;AAG7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