primevue
Version:
PrimeVue is an open source UI library for Vue featuring a rich set of 80+ components, a theme designer, various theme alternatives such as Material, Bootstrap, Tailwind, premium templates and professional support. In addition, it integrates with PrimeBloc
1 lines • 51.6 kB
Source Map (JSON)
{"version":3,"file":"index.mjs","sources":["../../src/tabview/BaseTabView.vue","../../src/tabview/TabView.vue","../../src/tabview/TabView.vue?vue&type=template&id=15a9c0e0&lang.js"],"sourcesContent":["<script>\nimport BaseComponent from '@primevue/core/basecomponent';\nimport TabViewStyle from 'primevue/tabview/style';\n\nexport default {\n name: 'BaseTabView',\n extends: BaseComponent,\n props: {\n activeIndex: {\n type: Number,\n default: 0\n },\n lazy: {\n type: Boolean,\n default: false\n },\n scrollable: {\n type: Boolean,\n default: false\n },\n tabindex: {\n type: Number,\n default: 0\n },\n selectOnFocus: {\n type: Boolean,\n default: false\n },\n prevButtonProps: {\n type: null,\n default: null\n },\n nextButtonProps: {\n type: null,\n default: null\n },\n prevIcon: {\n type: String,\n default: undefined\n },\n nextIcon: {\n type: String,\n default: undefined\n }\n },\n style: TabViewStyle,\n provide() {\n return {\n $pcTabs: undefined, // Backwards compatible to prevent <TabPanel> component from breaking\n $pcTabView: this,\n $parentInstance: this\n };\n }\n};\n</script>\n","<template>\n <div :class=\"cx('root')\" role=\"tablist\" v-bind=\"ptmi('root')\">\n <div :class=\"cx('navContainer')\" v-bind=\"ptm('navContainer')\">\n <button\n v-if=\"scrollable && !isPrevButtonDisabled\"\n ref=\"prevBtn\"\n v-ripple\n type=\"button\"\n :class=\"cx('prevButton')\"\n :tabindex=\"tabindex\"\n :aria-label=\"prevButtonAriaLabel\"\n @click=\"onPrevButtonClick\"\n v-bind=\"{ ...prevButtonProps, ...ptm('prevButton') }\"\n data-pc-group-section=\"navbutton\"\n >\n <slot name=\"previcon\">\n <component :is=\"prevIcon ? 'span' : 'ChevronLeftIcon'\" aria-hidden=\"true\" :class=\"prevIcon\" v-bind=\"ptm('prevIcon')\" />\n </slot>\n </button>\n <div ref=\"content\" :class=\"cx('navContent')\" @scroll=\"onScroll\" v-bind=\"ptm('navContent')\">\n <ul ref=\"nav\" :class=\"cx('nav')\" v-bind=\"ptm('nav')\">\n <li\n v-for=\"(tab, index) of tabs\"\n :key=\"getKey(tab, index)\"\n :style=\"getTabProp(tab, 'headerStyle')\"\n :class=\"cx('tab.header', { tab, index })\"\n role=\"presentation\"\n v-bind=\"{ ...getTabProp(tab, 'headerProps'), ...getTabPT(tab, 'root', index), ...getTabPT(tab, 'header', index) }\"\n data-pc-name=\"tabpanel\"\n :data-p-active=\"d_activeIndex === index\"\n :data-p-disabled=\"getTabProp(tab, 'disabled')\"\n :data-pc-index=\"index\"\n >\n <a\n :id=\"getTabHeaderActionId(index)\"\n v-ripple\n :class=\"cx('tab.headerAction')\"\n :tabindex=\"getTabProp(tab, 'disabled') || !isTabActive(index) ? -1 : tabindex\"\n role=\"tab\"\n :aria-disabled=\"getTabProp(tab, 'disabled')\"\n :aria-selected=\"isTabActive(index)\"\n :aria-controls=\"getTabContentId(index)\"\n @click=\"onTabClick($event, tab, index)\"\n @keydown=\"onTabKeyDown($event, tab, index)\"\n v-bind=\"{ ...getTabProp(tab, 'headerActionProps'), ...getTabPT(tab, 'headerAction', index) }\"\n >\n <span v-if=\"tab.props && tab.props.header\" :class=\"cx('tab.headerTitle')\" v-bind=\"getTabPT(tab, 'headerTitle', index)\">{{ tab.props.header }}</span>\n <component v-if=\"tab.children && tab.children.header\" :is=\"tab.children.header\"></component>\n </a>\n </li>\n <li ref=\"inkbar\" :class=\"cx('inkbar')\" role=\"presentation\" aria-hidden=\"true\" v-bind=\"ptm('inkbar')\"></li>\n </ul>\n </div>\n <button\n v-if=\"scrollable && !isNextButtonDisabled\"\n ref=\"nextBtn\"\n v-ripple\n type=\"button\"\n :class=\"cx('nextButton')\"\n :tabindex=\"tabindex\"\n :aria-label=\"nextButtonAriaLabel\"\n @click=\"onNextButtonClick\"\n v-bind=\"{ ...nextButtonProps, ...ptm('nextButton') }\"\n data-pc-group-section=\"navbutton\"\n >\n <slot name=\"nexticon\">\n <component :is=\"nextIcon ? 'span' : 'ChevronRightIcon'\" aria-hidden=\"true\" :class=\"nextIcon\" v-bind=\"ptm('nextIcon')\" />\n </slot>\n </button>\n </div>\n <div :class=\"cx('panelContainer')\" v-bind=\"ptm('panelContainer')\">\n <template v-for=\"(tab, index) of tabs\" :key=\"getKey(tab, index)\">\n <div\n v-if=\"lazy ? isTabActive(index) : true\"\n v-show=\"lazy ? true : isTabActive(index)\"\n :id=\"getTabContentId(index)\"\n :style=\"getTabProp(tab, 'contentStyle')\"\n :class=\"cx('tab.content', { tab })\"\n role=\"tabpanel\"\n :aria-labelledby=\"getTabHeaderActionId(index)\"\n v-bind=\"{ ...getTabProp(tab, 'contentProps'), ...getTabPT(tab, 'root', index), ...getTabPT(tab, 'content', index) }\"\n data-pc-name=\"tabpanel\"\n :data-pc-index=\"index\"\n :data-p-active=\"d_activeIndex === index\"\n >\n <component :is=\"tab\"></component>\n </div>\n </template>\n </div>\n </div>\n</template>\n\n<script>\nimport { findSingle, focus, getAttribute, getOffset, getWidth } from '@primeuix/utils/dom';\nimport ChevronLeftIcon from '@primevue/icons/chevronleft';\nimport ChevronRightIcon from '@primevue/icons/chevronright';\nimport Ripple from 'primevue/ripple';\nimport { mergeProps } from 'vue';\nimport BaseTabView from './BaseTabView.vue';\n\nexport default {\n name: 'TabView',\n extends: BaseTabView,\n inheritAttrs: false,\n emits: ['update:activeIndex', 'tab-change', 'tab-click'],\n data() {\n return {\n d_activeIndex: this.activeIndex,\n isPrevButtonDisabled: true,\n isNextButtonDisabled: false\n };\n },\n watch: {\n activeIndex(newValue) {\n this.d_activeIndex = newValue;\n\n this.scrollInView({ index: newValue });\n }\n },\n mounted() {\n console.warn('Deprecated since v4. Use Tabs component instead.');\n\n this.updateInkBar();\n this.scrollable && this.updateButtonState();\n },\n updated() {\n this.updateInkBar();\n this.scrollable && this.updateButtonState();\n },\n methods: {\n isTabPanel(child) {\n return child.type.name === 'TabPanel';\n },\n isTabActive(index) {\n return this.d_activeIndex === index;\n },\n getTabProp(tab, name) {\n return tab.props ? tab.props[name] : undefined;\n },\n getKey(tab, index) {\n return this.getTabProp(tab, 'header') || index;\n },\n getTabHeaderActionId(index) {\n return `${this.$id}_${index}_header_action`;\n },\n getTabContentId(index) {\n return `${this.$id}_${index}_content`;\n },\n getTabPT(tab, key, index) {\n const count = this.tabs.length;\n const tabMetaData = {\n props: tab.props,\n parent: {\n instance: this,\n props: this.$props,\n state: this.$data\n },\n context: {\n index,\n count,\n first: index === 0,\n last: index === count - 1,\n active: this.isTabActive(index)\n }\n };\n\n return mergeProps(this.ptm(`tabpanel.${key}`, { tabpanel: tabMetaData }), this.ptm(`tabpanel.${key}`, tabMetaData), this.ptmo(this.getTabProp(tab, 'pt'), key, tabMetaData));\n },\n onScroll(event) {\n this.scrollable && this.updateButtonState();\n\n event.preventDefault();\n },\n onPrevButtonClick() {\n const content = this.$refs.content;\n const width = getWidth(content);\n const pos = content.scrollLeft - width;\n\n content.scrollLeft = pos <= 0 ? 0 : pos;\n },\n onNextButtonClick() {\n const content = this.$refs.content;\n const width = getWidth(content) - this.getVisibleButtonWidths();\n const pos = content.scrollLeft + width;\n const lastPos = content.scrollWidth - width;\n\n content.scrollLeft = pos >= lastPos ? lastPos : pos;\n },\n onTabClick(event, tab, index) {\n this.changeActiveIndex(event, tab, index);\n this.$emit('tab-click', { originalEvent: event, index });\n },\n onTabKeyDown(event, tab, index) {\n switch (event.code) {\n case 'ArrowLeft':\n this.onTabArrowLeftKey(event);\n break;\n\n case 'ArrowRight':\n this.onTabArrowRightKey(event);\n break;\n\n case 'Home':\n this.onTabHomeKey(event);\n break;\n\n case 'End':\n this.onTabEndKey(event);\n break;\n\n case 'PageDown':\n this.onPageDownKey(event);\n break;\n\n case 'PageUp':\n this.onPageUpKey(event);\n break;\n\n case 'Enter':\n case 'NumpadEnter':\n case 'Space':\n this.onTabEnterKey(event, tab, index);\n break;\n\n default:\n break;\n }\n },\n onTabArrowRightKey(event) {\n const nextHeaderAction = this.findNextHeaderAction(event.target.parentElement);\n\n nextHeaderAction ? this.changeFocusedTab(event, nextHeaderAction) : this.onTabHomeKey(event);\n event.preventDefault();\n },\n onTabArrowLeftKey(event) {\n const prevHeaderAction = this.findPrevHeaderAction(event.target.parentElement);\n\n prevHeaderAction ? this.changeFocusedTab(event, prevHeaderAction) : this.onTabEndKey(event);\n event.preventDefault();\n },\n onTabHomeKey(event) {\n const firstHeaderAction = this.findFirstHeaderAction();\n\n this.changeFocusedTab(event, firstHeaderAction);\n event.preventDefault();\n },\n onTabEndKey(event) {\n const lastHeaderAction = this.findLastHeaderAction();\n\n this.changeFocusedTab(event, lastHeaderAction);\n event.preventDefault();\n },\n onPageDownKey(event) {\n this.scrollInView({ index: this.$refs.nav.children.length - 2 });\n event.preventDefault();\n },\n onPageUpKey(event) {\n this.scrollInView({ index: 0 });\n event.preventDefault();\n },\n onTabEnterKey(event, tab, index) {\n this.changeActiveIndex(event, tab, index);\n\n event.preventDefault();\n },\n findNextHeaderAction(tabElement, selfCheck = false) {\n const headerElement = selfCheck ? tabElement : tabElement.nextElementSibling;\n\n return headerElement\n ? getAttribute(headerElement, 'data-p-disabled') || getAttribute(headerElement, 'data-pc-section') === 'inkbar'\n ? this.findNextHeaderAction(headerElement)\n : findSingle(headerElement, '[data-pc-section=\"headeraction\"]')\n : null;\n },\n findPrevHeaderAction(tabElement, selfCheck = false) {\n const headerElement = selfCheck ? tabElement : tabElement.previousElementSibling;\n\n return headerElement\n ? getAttribute(headerElement, 'data-p-disabled') || getAttribute(headerElement, 'data-pc-section') === 'inkbar'\n ? this.findPrevHeaderAction(headerElement)\n : findSingle(headerElement, '[data-pc-section=\"headeraction\"]')\n : null;\n },\n findFirstHeaderAction() {\n return this.findNextHeaderAction(this.$refs.nav.firstElementChild, true);\n },\n findLastHeaderAction() {\n return this.findPrevHeaderAction(this.$refs.nav.lastElementChild, true);\n },\n changeActiveIndex(event, tab, index) {\n if (!this.getTabProp(tab, 'disabled') && this.d_activeIndex !== index) {\n this.d_activeIndex = index;\n\n this.$emit('update:activeIndex', index);\n this.$emit('tab-change', { originalEvent: event, index });\n\n this.scrollInView({ index });\n }\n },\n changeFocusedTab(event, element) {\n if (element) {\n focus(element);\n this.scrollInView({ element });\n\n if (this.selectOnFocus) {\n const index = parseInt(element.parentElement.dataset.pcIndex, 10);\n const tab = this.tabs[index];\n\n this.changeActiveIndex(event, tab, index);\n }\n }\n },\n scrollInView({ element, index = -1 }) {\n const currentElement = element || this.$refs.nav.children[index];\n\n if (currentElement) {\n currentElement.scrollIntoView && currentElement.scrollIntoView({ block: 'nearest' });\n }\n },\n updateInkBar() {\n let tabHeader = this.$refs.nav.children[this.d_activeIndex];\n\n this.$refs.inkbar.style.width = getWidth(tabHeader) + 'px';\n this.$refs.inkbar.style.left = getOffset(tabHeader).left - getOffset(this.$refs.nav).left + 'px';\n },\n updateButtonState() {\n const content = this.$refs.content;\n const { scrollLeft, scrollWidth } = content;\n const width = getWidth(content);\n\n this.isPrevButtonDisabled = scrollLeft === 0;\n this.isNextButtonDisabled = parseInt(scrollLeft) === scrollWidth - width;\n },\n getVisibleButtonWidths() {\n const { prevBtn, nextBtn } = this.$refs;\n\n return [prevBtn, nextBtn].reduce((acc, el) => (el ? acc + getWidth(el) : acc), 0);\n }\n },\n computed: {\n tabs() {\n return this.$slots.default().reduce((tabs, child) => {\n if (this.isTabPanel(child)) {\n tabs.push(child);\n } else if (child.children && child.children instanceof Array) {\n child.children.forEach((nestedChild) => {\n if (this.isTabPanel(nestedChild)) {\n tabs.push(nestedChild);\n }\n });\n }\n\n return tabs;\n }, []);\n },\n prevButtonAriaLabel() {\n return this.$primevue.config.locale.aria ? this.$primevue.config.locale.aria.previous : undefined;\n },\n nextButtonAriaLabel() {\n return this.$primevue.config.locale.aria ? this.$primevue.config.locale.aria.next : undefined;\n }\n },\n directives: {\n ripple: Ripple\n },\n components: {\n ChevronLeftIcon,\n ChevronRightIcon\n }\n};\n</script>\n","<template>\n <div :class=\"cx('root')\" role=\"tablist\" v-bind=\"ptmi('root')\">\n <div :class=\"cx('navContainer')\" v-bind=\"ptm('navContainer')\">\n <button\n v-if=\"scrollable && !isPrevButtonDisabled\"\n ref=\"prevBtn\"\n v-ripple\n type=\"button\"\n :class=\"cx('prevButton')\"\n :tabindex=\"tabindex\"\n :aria-label=\"prevButtonAriaLabel\"\n @click=\"onPrevButtonClick\"\n v-bind=\"{ ...prevButtonProps, ...ptm('prevButton') }\"\n data-pc-group-section=\"navbutton\"\n >\n <slot name=\"previcon\">\n <component :is=\"prevIcon ? 'span' : 'ChevronLeftIcon'\" aria-hidden=\"true\" :class=\"prevIcon\" v-bind=\"ptm('prevIcon')\" />\n </slot>\n </button>\n <div ref=\"content\" :class=\"cx('navContent')\" @scroll=\"onScroll\" v-bind=\"ptm('navContent')\">\n <ul ref=\"nav\" :class=\"cx('nav')\" v-bind=\"ptm('nav')\">\n <li\n v-for=\"(tab, index) of tabs\"\n :key=\"getKey(tab, index)\"\n :style=\"getTabProp(tab, 'headerStyle')\"\n :class=\"cx('tab.header', { tab, index })\"\n role=\"presentation\"\n v-bind=\"{ ...getTabProp(tab, 'headerProps'), ...getTabPT(tab, 'root', index), ...getTabPT(tab, 'header', index) }\"\n data-pc-name=\"tabpanel\"\n :data-p-active=\"d_activeIndex === index\"\n :data-p-disabled=\"getTabProp(tab, 'disabled')\"\n :data-pc-index=\"index\"\n >\n <a\n :id=\"getTabHeaderActionId(index)\"\n v-ripple\n :class=\"cx('tab.headerAction')\"\n :tabindex=\"getTabProp(tab, 'disabled') || !isTabActive(index) ? -1 : tabindex\"\n role=\"tab\"\n :aria-disabled=\"getTabProp(tab, 'disabled')\"\n :aria-selected=\"isTabActive(index)\"\n :aria-controls=\"getTabContentId(index)\"\n @click=\"onTabClick($event, tab, index)\"\n @keydown=\"onTabKeyDown($event, tab, index)\"\n v-bind=\"{ ...getTabProp(tab, 'headerActionProps'), ...getTabPT(tab, 'headerAction', index) }\"\n >\n <span v-if=\"tab.props && tab.props.header\" :class=\"cx('tab.headerTitle')\" v-bind=\"getTabPT(tab, 'headerTitle', index)\">{{ tab.props.header }}</span>\n <component v-if=\"tab.children && tab.children.header\" :is=\"tab.children.header\"></component>\n </a>\n </li>\n <li ref=\"inkbar\" :class=\"cx('inkbar')\" role=\"presentation\" aria-hidden=\"true\" v-bind=\"ptm('inkbar')\"></li>\n </ul>\n </div>\n <button\n v-if=\"scrollable && !isNextButtonDisabled\"\n ref=\"nextBtn\"\n v-ripple\n type=\"button\"\n :class=\"cx('nextButton')\"\n :tabindex=\"tabindex\"\n :aria-label=\"nextButtonAriaLabel\"\n @click=\"onNextButtonClick\"\n v-bind=\"{ ...nextButtonProps, ...ptm('nextButton') }\"\n data-pc-group-section=\"navbutton\"\n >\n <slot name=\"nexticon\">\n <component :is=\"nextIcon ? 'span' : 'ChevronRightIcon'\" aria-hidden=\"true\" :class=\"nextIcon\" v-bind=\"ptm('nextIcon')\" />\n </slot>\n </button>\n </div>\n <div :class=\"cx('panelContainer')\" v-bind=\"ptm('panelContainer')\">\n <template v-for=\"(tab, index) of tabs\" :key=\"getKey(tab, index)\">\n <div\n v-if=\"lazy ? isTabActive(index) : true\"\n v-show=\"lazy ? true : isTabActive(index)\"\n :id=\"getTabContentId(index)\"\n :style=\"getTabProp(tab, 'contentStyle')\"\n :class=\"cx('tab.content', { tab })\"\n role=\"tabpanel\"\n :aria-labelledby=\"getTabHeaderActionId(index)\"\n v-bind=\"{ ...getTabProp(tab, 'contentProps'), ...getTabPT(tab, 'root', index), ...getTabPT(tab, 'content', index) }\"\n data-pc-name=\"tabpanel\"\n :data-pc-index=\"index\"\n :data-p-active=\"d_activeIndex === index\"\n >\n <component :is=\"tab\"></component>\n </div>\n </template>\n </div>\n </div>\n</template>\n\n<script>\nimport { findSingle, focus, getAttribute, getOffset, getWidth } from '@primeuix/utils/dom';\nimport ChevronLeftIcon from '@primevue/icons/chevronleft';\nimport ChevronRightIcon from '@primevue/icons/chevronright';\nimport Ripple from 'primevue/ripple';\nimport { mergeProps } from 'vue';\nimport BaseTabView from './BaseTabView.vue';\n\nexport default {\n name: 'TabView',\n extends: BaseTabView,\n inheritAttrs: false,\n emits: ['update:activeIndex', 'tab-change', 'tab-click'],\n data() {\n return {\n d_activeIndex: this.activeIndex,\n isPrevButtonDisabled: true,\n isNextButtonDisabled: false\n };\n },\n watch: {\n activeIndex(newValue) {\n this.d_activeIndex = newValue;\n\n this.scrollInView({ index: newValue });\n }\n },\n mounted() {\n console.warn('Deprecated since v4. Use Tabs component instead.');\n\n this.updateInkBar();\n this.scrollable && this.updateButtonState();\n },\n updated() {\n this.updateInkBar();\n this.scrollable && this.updateButtonState();\n },\n methods: {\n isTabPanel(child) {\n return child.type.name === 'TabPanel';\n },\n isTabActive(index) {\n return this.d_activeIndex === index;\n },\n getTabProp(tab, name) {\n return tab.props ? tab.props[name] : undefined;\n },\n getKey(tab, index) {\n return this.getTabProp(tab, 'header') || index;\n },\n getTabHeaderActionId(index) {\n return `${this.$id}_${index}_header_action`;\n },\n getTabContentId(index) {\n return `${this.$id}_${index}_content`;\n },\n getTabPT(tab, key, index) {\n const count = this.tabs.length;\n const tabMetaData = {\n props: tab.props,\n parent: {\n instance: this,\n props: this.$props,\n state: this.$data\n },\n context: {\n index,\n count,\n first: index === 0,\n last: index === count - 1,\n active: this.isTabActive(index)\n }\n };\n\n return mergeProps(this.ptm(`tabpanel.${key}`, { tabpanel: tabMetaData }), this.ptm(`tabpanel.${key}`, tabMetaData), this.ptmo(this.getTabProp(tab, 'pt'), key, tabMetaData));\n },\n onScroll(event) {\n this.scrollable && this.updateButtonState();\n\n event.preventDefault();\n },\n onPrevButtonClick() {\n const content = this.$refs.content;\n const width = getWidth(content);\n const pos = content.scrollLeft - width;\n\n content.scrollLeft = pos <= 0 ? 0 : pos;\n },\n onNextButtonClick() {\n const content = this.$refs.content;\n const width = getWidth(content) - this.getVisibleButtonWidths();\n const pos = content.scrollLeft + width;\n const lastPos = content.scrollWidth - width;\n\n content.scrollLeft = pos >= lastPos ? lastPos : pos;\n },\n onTabClick(event, tab, index) {\n this.changeActiveIndex(event, tab, index);\n this.$emit('tab-click', { originalEvent: event, index });\n },\n onTabKeyDown(event, tab, index) {\n switch (event.code) {\n case 'ArrowLeft':\n this.onTabArrowLeftKey(event);\n break;\n\n case 'ArrowRight':\n this.onTabArrowRightKey(event);\n break;\n\n case 'Home':\n this.onTabHomeKey(event);\n break;\n\n case 'End':\n this.onTabEndKey(event);\n break;\n\n case 'PageDown':\n this.onPageDownKey(event);\n break;\n\n case 'PageUp':\n this.onPageUpKey(event);\n break;\n\n case 'Enter':\n case 'NumpadEnter':\n case 'Space':\n this.onTabEnterKey(event, tab, index);\n break;\n\n default:\n break;\n }\n },\n onTabArrowRightKey(event) {\n const nextHeaderAction = this.findNextHeaderAction(event.target.parentElement);\n\n nextHeaderAction ? this.changeFocusedTab(event, nextHeaderAction) : this.onTabHomeKey(event);\n event.preventDefault();\n },\n onTabArrowLeftKey(event) {\n const prevHeaderAction = this.findPrevHeaderAction(event.target.parentElement);\n\n prevHeaderAction ? this.changeFocusedTab(event, prevHeaderAction) : this.onTabEndKey(event);\n event.preventDefault();\n },\n onTabHomeKey(event) {\n const firstHeaderAction = this.findFirstHeaderAction();\n\n this.changeFocusedTab(event, firstHeaderAction);\n event.preventDefault();\n },\n onTabEndKey(event) {\n const lastHeaderAction = this.findLastHeaderAction();\n\n this.changeFocusedTab(event, lastHeaderAction);\n event.preventDefault();\n },\n onPageDownKey(event) {\n this.scrollInView({ index: this.$refs.nav.children.length - 2 });\n event.preventDefault();\n },\n onPageUpKey(event) {\n this.scrollInView({ index: 0 });\n event.preventDefault();\n },\n onTabEnterKey(event, tab, index) {\n this.changeActiveIndex(event, tab, index);\n\n event.preventDefault();\n },\n findNextHeaderAction(tabElement, selfCheck = false) {\n const headerElement = selfCheck ? tabElement : tabElement.nextElementSibling;\n\n return headerElement\n ? getAttribute(headerElement, 'data-p-disabled') || getAttribute(headerElement, 'data-pc-section') === 'inkbar'\n ? this.findNextHeaderAction(headerElement)\n : findSingle(headerElement, '[data-pc-section=\"headeraction\"]')\n : null;\n },\n findPrevHeaderAction(tabElement, selfCheck = false) {\n const headerElement = selfCheck ? tabElement : tabElement.previousElementSibling;\n\n return headerElement\n ? getAttribute(headerElement, 'data-p-disabled') || getAttribute(headerElement, 'data-pc-section') === 'inkbar'\n ? this.findPrevHeaderAction(headerElement)\n : findSingle(headerElement, '[data-pc-section=\"headeraction\"]')\n : null;\n },\n findFirstHeaderAction() {\n return this.findNextHeaderAction(this.$refs.nav.firstElementChild, true);\n },\n findLastHeaderAction() {\n return this.findPrevHeaderAction(this.$refs.nav.lastElementChild, true);\n },\n changeActiveIndex(event, tab, index) {\n if (!this.getTabProp(tab, 'disabled') && this.d_activeIndex !== index) {\n this.d_activeIndex = index;\n\n this.$emit('update:activeIndex', index);\n this.$emit('tab-change', { originalEvent: event, index });\n\n this.scrollInView({ index });\n }\n },\n changeFocusedTab(event, element) {\n if (element) {\n focus(element);\n this.scrollInView({ element });\n\n if (this.selectOnFocus) {\n const index = parseInt(element.parentElement.dataset.pcIndex, 10);\n const tab = this.tabs[index];\n\n this.changeActiveIndex(event, tab, index);\n }\n }\n },\n scrollInView({ element, index = -1 }) {\n const currentElement = element || this.$refs.nav.children[index];\n\n if (currentElement) {\n currentElement.scrollIntoView && currentElement.scrollIntoView({ block: 'nearest' });\n }\n },\n updateInkBar() {\n let tabHeader = this.$refs.nav.children[this.d_activeIndex];\n\n this.$refs.inkbar.style.width = getWidth(tabHeader) + 'px';\n this.$refs.inkbar.style.left = getOffset(tabHeader).left - getOffset(this.$refs.nav).left + 'px';\n },\n updateButtonState() {\n const content = this.$refs.content;\n const { scrollLeft, scrollWidth } = content;\n const width = getWidth(content);\n\n this.isPrevButtonDisabled = scrollLeft === 0;\n this.isNextButtonDisabled = parseInt(scrollLeft) === scrollWidth - width;\n },\n getVisibleButtonWidths() {\n const { prevBtn, nextBtn } = this.$refs;\n\n return [prevBtn, nextBtn].reduce((acc, el) => (el ? acc + getWidth(el) : acc), 0);\n }\n },\n computed: {\n tabs() {\n return this.$slots.default().reduce((tabs, child) => {\n if (this.isTabPanel(child)) {\n tabs.push(child);\n } else if (child.children && child.children instanceof Array) {\n child.children.forEach((nestedChild) => {\n if (this.isTabPanel(nestedChild)) {\n tabs.push(nestedChild);\n }\n });\n }\n\n return tabs;\n }, []);\n },\n prevButtonAriaLabel() {\n return this.$primevue.config.locale.aria ? this.$primevue.config.locale.aria.previous : undefined;\n },\n nextButtonAriaLabel() {\n return this.$primevue.config.locale.aria ? this.$primevue.config.locale.aria.next : undefined;\n }\n },\n directives: {\n ripple: Ripple\n },\n components: {\n ChevronLeftIcon,\n ChevronRightIcon\n }\n};\n</script>\n"],"names":["name","BaseComponent","props","activeIndex","type","Number","lazy","Boolean","scrollable","tabindex","selectOnFocus","prevButtonProps","nextButtonProps","prevIcon","String","undefined","nextIcon","style","TabViewStyle","provide","$pcTabs","$pcTabView","$parentInstance","BaseTabView","inheritAttrs","emits","data","d_activeIndex","isPrevButtonDisabled","isNextButtonDisabled","watch","newValue","scrollInView","index","mounted","console","warn","updateInkBar","updateButtonState","updated","methods","isTabPanel","child","isTabActive","getTabProp","tab","getKey","getTabHeaderActionId","concat","$id","getTabContentId","getTabPT","key","count","tabs","length","tabMetaData","parent","instance","$props","state","$data","context","first","last","active","mergeProps","ptm","tabpanel","ptmo","onScroll","event","preventDefault","onPrevButtonClick","content","$refs","width","getWidth","pos","scrollLeft","onNextButtonClick","getVisibleButtonWidths","lastPos","scrollWidth","onTabClick","changeActiveIndex","$emit","originalEvent","onTabKeyDown","code","onTabArrowLeftKey","onTabArrowRightKey","onTabHomeKey","onTabEndKey","onPageDownKey","onPageUpKey","onTabEnterKey","nextHeaderAction","findNextHeaderAction","target","parentElement","changeFocusedTab","prevHeaderAction","findPrevHeaderAction","firstHeaderAction","findFirstHeaderAction","lastHeaderAction","findLastHeaderAction","nav","children","tabElement","selfCheck","arguments","headerElement","nextElementSibling","getAttribute","findSingle","previousElementSibling","firstElementChild","lastElementChild","element","focus","parseInt","dataset","pcIndex","_ref","_ref$index","currentElement","scrollIntoView","block","tabHeader","inkbar","left","getOffset","_this$$refs","prevBtn","nextBtn","reduce","acc","el","computed","_this","$slots","push","Array","forEach","nestedChild","prevButtonAriaLabel","$primevue","config","locale","aria","previous","nextButtonAriaLabel","next","directives","ripple","Ripple","components","ChevronLeftIcon","ChevronRightIcon","_openBlock","_createElementBlock","_mergeProps","_ctx","cx","role","ptmi","_createElementVNode","_withDirectives","ref","$options","onClick","apply","_objectSpread","_renderSlot","_createBlock","_resolveDynamicComponent","_Fragment","_renderList","id","$event","onKeydown","header"],"mappings":";;;;;;;;AAIA,eAAe;AACXA,EAAAA,IAAI,EAAE,aAAa;AACnB,EAAA,SAAA,EAASC,aAAa;AACtBC,EAAAA,KAAK,EAAE;AACHC,IAAAA,WAAW,EAAE;AACTC,MAAAA,IAAI,EAAEC,MAAM;MACZ,SAAS,EAAA;KACZ;AACDC,IAAAA,IAAI,EAAE;AACFF,MAAAA,IAAI,EAAEG,OAAO;MACb,SAAS,EAAA;KACZ;AACDC,IAAAA,UAAU,EAAE;AACRJ,MAAAA,IAAI,EAAEG,OAAO;MACb,SAAS,EAAA;KACZ;AACDE,IAAAA,QAAQ,EAAE;AACNL,MAAAA,IAAI,EAAEC,MAAM;MACZ,SAAS,EAAA;KACZ;AACDK,IAAAA,aAAa,EAAE;AACXN,MAAAA,IAAI,EAAEG,OAAO;MACb,SAAS,EAAA;KACZ;AACDI,IAAAA,eAAe,EAAE;AACbP,MAAAA,IAAI,EAAE,IAAI;MACV,SAAS,EAAA;KACZ;AACDQ,IAAAA,eAAe,EAAE;AACbR,MAAAA,IAAI,EAAE,IAAI;MACV,SAAS,EAAA;KACZ;AACDS,IAAAA,QAAQ,EAAE;AACNT,MAAAA,IAAI,EAAEU,MAAM;MACZ,SAASC,EAAAA;KACZ;AACDC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