import { defineComponent, inject, ref } from "vue"; import type { PropType, VNode } from "vue"; import { EVENT_NAME } from "@darwin-studio/vue-ui/src/constants/event-name"; import generateProp from "@darwin-studio/vue-ui/src/utils/generate-prop"; import generateClass from "@darwin-studio/vue-ui/src/utils/generate-class"; import type { CommonProps, DTabsProvided } from "./types"; import config from "./config"; import styles from "./d-tab.css?module"; /** * The component is intended to be a Tab child of the DTabs component. */ export default defineComponent({ name: config.tabName, // TODO: move to props.ts ??? props: { /** * Defines id attr of the component */ id: generateProp.text(undefined, true), /** * Defines id attr of the corresponding DTabpanel component */ tabpanelId: generateProp.text(), /** * Plain string or VNode */ content: generateProp.content(), /** * Pass if the component is active */ active: Boolean, /** * Pass true to disable DTab element. */ disabled: Boolean, /** * Defines padding type of the component, use 'equal' if the component contains only an icon */ padding: generateProp.padding(), /** * Defines size of the component */ size: generateProp.size(), /** * Defines transition type of the component */ transition: generateProp.transition(), /*TODO: It is recommended to use a