Files
game-cards-poker-design/frontend/node_modules/element-plus/es/components/tabs/src/tabs.mjs.map

1 line
14 KiB
Plaintext
Raw Normal View History

{"version":3,"file":"tabs.mjs","names":["computed","createVNode","defineComponent","getCurrentInstance","nextTick","provide","ref","renderSlot","watch","_createVNode","omit","buildProps","definePropType","getEventCode","isNumber","isString","isUndefined","EVENT_CODE","UPDATE_MODEL_EVENT","ElIcon","Plus","useNamespace","useOrderedChildren","tabsRootContextKey","TabNav","tabsProps","type","String","values","default","closable","Boolean","addable","modelValue","Number","defaultValue","editable","tabPosition","beforeLeave","Function","stretch","tabindex","isPaneName","value","tabsEmits","name","tabClick","pane","ev","Event","tabChange","edit","paneName","action","includes","tabRemove","tabAdd","Tabs","props","emits","setup","emit","slots","expose","ns","isVertical","children","panes","addChild","registerPane","removeChild","unregisterPane","ChildrenSorter","PanesSorter","nav$","currentName","setCurrentName","trigger","canLeave","result","Promise","isFocusInsidePane","find","item","removeFocus","focusActiveTab","handleTabClick","tab","tabName","event","disabled","handleTabRemove","stopPropagation","handleTabAdd","undefined","handleKeydown","code","enter","numpadEnter","swapChildren","vnode","actualFirstChild","el","firstChild","before","scrollToActiveTab","tabNavRef","addSlot","newButton","e","is","tabNav","header","$stable","panels","b","m"],"sources":["../../../../../../packages/components/tabs/src/tabs.tsx"],"sourcesContent":["import {\n computed,\n createVNode,\n defineComponent,\n getCurrentInstance,\n nextTick,\n provide,\n ref,\n renderSlot,\n watch,\n} from 'vue'\nimport { omit } from 'lodash-unified'\nimport {\n buildProps,\n definePropType,\n getEventCode,\n isNumber,\n isString,\n isUndefined,\n} from '@element-plus/utils'\nimport { EVENT_CODE, UPDATE_MODEL_EVENT } from '@element-plus/constants'\nimport ElIcon from '@element-plus/components/icon'\nimport { Plus } from '@element-plus/icons-vue'\nimport { useNamespace, useOrderedChildren } from '@element-plus/hooks'\nimport { tabsRootContextKey } from './constants'\nimport TabNav from './tab-nav'\n\nimport type { ExtractPropTypes, ExtractPublicPropTypes, VNode } from 'vue'\nimport type { Awaitable } from '@element-plus/utils'\nimport type { TabNavInstance } from './tab-nav'\nimport type { TabPaneName, TabsPaneContext } from './constants'\n\nexport const tabsProps = buildProps({\n /**\n * @description type of Tab\n */\n type: {\n type: String,\n values: ['card', 'border-card', ''],\n default: '',\n },\n /**\n * @description whether Tab is closable\n */\n closable: Boolean,\n /**\n * @description whether Tab is addable\n */\n addable: Boolean,\n /**\n * @description binding value, name of the selected tab\n */\n modelValue: {\n type: [String, Number],\n },\n /**\n * @description initial value when `model-value` is not set\n */\n defaultValue: {\n type: [String, Number],\n },\n /**\n * @description whether Tab is addable and closable\n */\n editable: Boolean,\n /**\n * @description position of tabs\n */\n tabPosition: {\n type: String,\n values: ['top', 'right', 'bottom', 'left'],\n default: 'top',\n },\n /**\n * @description hook function before switching tab. If `false` is returned or a `Promise` is returned and then is rejected, switching will be prevented\n */\n beforeLeave: {\n type: definePropType<\n (newName: TabPaneName, oldName: TabPaneName) => Awaitable<void | boolean>\n >(Function),\n default: () => true,\n },\n /**\n * @description whether width of tab automatically fits its container\n */\n stretch: Boolean,\n /**\n * @description tabs tabindex\n */\n tabindex: {\n type: [String, Number],\n default: 0,\n },\n} as const)\nexport type TabsProps = ExtractPropTypes<typeof tabsProps>\nexport type TabsPropsPublic = ExtractPublicPropTypes<typeof tabsProps>\n\nconst isPaneName = (value: unknown): value is string | number =>\n isString(value) || isNumber(value)\n\nexport const tabsEmits = {\n [UPDATE_MODEL_EVENT]: (name: TabPaneName) => isP