diff --git a/api-generator/components/tabpanel.js b/api-generator/components/tabpanel.js index 6ddeb3dc0..ac1d7ab7a 100644 --- a/api-generator/components/tabpanel.js +++ b/api-generator/components/tabpanel.js @@ -5,6 +5,48 @@ const TabPanelProps = [ default: "null", description: "Orientation of tab headers." }, + { + name: "headerStyle", + type: "any", + default: "null", + description: "Inline style of the tab header." + }, + { + name: "headerClass", + type: "any", + default: "null", + description: "Style class of the tab header." + }, + { + name: "headerProps", + type: "any", + default: "null", + description: "Uses to pass all properties of the HTMLLiElement to the tab header." + }, + { + name: "headerActionProps", + type: "any", + default: "null", + description: "Uses to pass all properties of the HTMLAnchorElement to the focusable anchor element inside the tab header." + }, + { + name: "contentStyle", + type: "any", + default: "null", + description: "Inline style of the tab content." + }, + { + name: "contentClass", + type: "any", + default: "null", + description: "Style class of the tab content." + }, + { + name: "contentProps", + type: "any", + default: "null", + description: "Uses to pass all properties of the HTMLDivElement to the tab content." + }, { name: "disabled", type: "boolean", diff --git a/api-generator/components/tabview.js b/api-generator/components/tabview.js index 1eb0cce72..ff61e617b 100644 --- a/api-generator/components/tabview.js +++ b/api-generator/components/tabview.js @@ -16,6 +16,65 @@ const TabViewProps = [ type: "boolean", default: "false", description: "When enabled displays buttons at each side of the tab headers to scroll the tab list." + }, + { + name: "tabindex", + type: "number", + default: "0", + description: "Index of the element in tabbing order." + }, + { + name: "selectOnFocus", + type: "boolean", + default: "false", + description: "When enabled, the focused tab is activated." + }, + { + name: "previousButtonProps", + type: "any", + default: "null", + description: "Uses to pass all properties of the HTMLButtonElement to the previous button." + }, + { + name: "nextButtonProps", + type: "any", + default: "null", + description: "Uses to pass all properties of the HTMLButtonElement to the next button." + } +]; + +const TabViewEvents = [ + { + name: "tab-change", + description: "Callback to invoke when an active tab is changed.", + arguments: [ + { + name: "originalEvent", + type: "object", + description: "Original event" + }, + { + name: "index", + type: "number", + description: "Index of the selected tab" + } + ] + }, + { + name: "tab-click", + description: "Callback to invoke when an active tab is clicked.", + arguments: [ + { + name: "originalEvent", + type: "object", + description: "Original event" + }, + { + name: "index", + type: "number", + description: "Index of the clicked tab" + } + ] } ]; @@ -23,6 +82,7 @@ module.exports = { tabview: { name: "TabView", description: "TabView is a container component to group content with tabs.", - props: TabViewProps + props: TabViewProps, + event: TabViewEvents } }; diff --git a/src/components/config/PrimeVue.d.ts b/src/components/config/PrimeVue.d.ts index 231e87da4..746430f74 100644 --- a/src/components/config/PrimeVue.d.ts +++ b/src/components/config/PrimeVue.d.ts @@ -24,6 +24,8 @@ interface PrimeVueLocaleAriaOptions { selectAll?: string; unselectAll?: string; close?: string; + previous?: string; + next?: string; } interface PrimeVueLocaleOptions { diff --git a/src/components/config/PrimeVue.js b/src/components/config/PrimeVue.js index aaaeec1a5..dd3709dec 100644 --- a/src/components/config/PrimeVue.js +++ b/src/components/config/PrimeVue.js @@ -75,7 +75,9 @@ const defaultOptions = { stars: '{star} stars', selectAll: 'All items selected', unselectAll: 'All items unselected', - close: 'Close' + close: 'Close', + previous: 'Previous', + next: 'Next' } }, filterMatchModeOptions: { diff --git a/src/components/tabpanel/TabPanel.d.ts b/src/components/tabpanel/TabPanel.d.ts index 6a4a7553d..ca44b4f79 100755 --- a/src/components/tabpanel/TabPanel.d.ts +++ b/src/components/tabpanel/TabPanel.d.ts @@ -1,4 +1,4 @@ -import { VNode } from 'vue'; +import { AnchorHTMLAttributes, HTMLAttributes, LiHTMLAttributes, VNode } from 'vue'; import { ClassComponent, GlobalComponentConstructor } from '../ts-helpers'; export interface TabPanelProps { @@ -6,6 +6,34 @@ export interface TabPanelProps { * Orientation of tab headers. */ header?: string | undefined; + /** + * Inline style of the tab header. + */ + headerStyle?: any; + /** + * Style class of the tab header. + */ + headerClass?: any; + /** + * Uses to pass all properties of the HTMLLiElement to the tab header. + */ + headerProps?: LiHTMLAttributes | undefined; + /** + * Uses to pass all properties of the HTMLAnchorElement to the focusable anchor element inside the tab header. + */ + headerActionProps?: AnchorHTMLAttributes | undefined; + /** + * Inline style of the tab content. + */ + contentStyle?: any; + /** + * Style class of the tab content. + */ + contentClass?: any; + /** + * Uses to pass all properties of the HTMLDivElement to the tab content. + */ + contentProps?: HTMLAttributes | undefined; /** * Whether the tab is disabled. */ diff --git a/src/components/tabpanel/TabPanel.vue b/src/components/tabpanel/TabPanel.vue index 65662351a..09f26cc79 100755 --- a/src/components/tabpanel/TabPanel.vue +++ b/src/components/tabpanel/TabPanel.vue @@ -7,6 +7,13 @@ export default { name: 'TabPanel', props: { header: null, + headerStyle: null, + headerClass: null, + headerProps: null, + headerActionProps: null, + contentStyle: null, + contentClass: null, + contentProps: null, disabled: Boolean } } diff --git a/src/components/tabview/TabView.d.ts b/src/components/tabview/TabView.d.ts index 964e41692..fddce759b 100755 --- a/src/components/tabview/TabView.d.ts +++ b/src/components/tabview/TabView.d.ts @@ -1,4 +1,4 @@ -import { VNode } from 'vue'; +import { ButtonHTMLAttributes, VNode } from 'vue'; import { ClassComponent, GlobalComponentConstructor } from '../ts-helpers'; export interface TabViewChangeEvent { @@ -30,6 +30,22 @@ export interface TabViewProps { * When enabled displays buttons at each side of the tab headers to scroll the tab list. */ scrollable?: boolean | undefined; + /** + * Index of the element in tabbing order. + */ + tabindex?: number | undefined; + /** + * When enabled, the focused tab is activated. + */ + selectOnFocus?: boolean | undefined; + /** + * Uses to pass all properties of the HTMLButtonElement to the previous button. + */ + previousButtonProps?: ButtonHTMLAttributes | undefined; + /** + * Uses to pass all properties of the HTMLButtonElement to the next button. + */ + nextButtonProps?: ButtonHTMLAttributes | undefined; } export interface TabViewSlots { diff --git a/src/components/tabview/TabView.vue b/src/components/tabview/TabView.vue index 357a2b15a..5e7787414 100755 --- a/src/components/tabview/TabView.vue +++ b/src/components/tabview/TabView.vue @@ -1,27 +1,32 @@