File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -450,12 +450,12 @@ const indexSelection = computed(() => {
450450<template >
451451 <div style =" width : 100% " class =" font-mono border-b border-border" >
452452 <div class =" mt-4 flex flex-row flex-wrap items-center justify-between gap-4" >
453- <TabRoot v-model =" activeTab" default-value =" totalSize" id-prefix = " timeline " >
453+ <TabRoot v-model =" activeTab" default-value =" totalSize" >
454454 <TabList :ariaLabel =" $t('package.timeline.chart.tab_aria_label')" >
455- <TabItem value =" totalSize" icon =" i-lucide:package-open" >
455+ <TabItem value =" totalSize" icon =" i-lucide:package-open" :controls-panel = " false " >
456456 {{ $t('package.stats.install_size') }}
457457 </TabItem >
458- <TabItem value =" dependencyCount" icon =" i-lucide:network" >
458+ <TabItem value =" dependencyCount" icon =" i-lucide:network" :controls-panel = " false " >
459459 {{ $t('compare.dependencies') }}
460460 </TabItem >
461461 </TabList >
Original file line number Diff line number Diff line change @@ -8,10 +8,12 @@ const props = withDefaults(
88 value: string
99 icon? : IconClass
1010 tabId? : string
11+ controlsPanel? : boolean
1112 variant? : ' primary' | ' secondary'
1213 size? : ' sm' | ' md'
1314 }>(),
1415 {
16+ controlsPanel: true ,
1517 variant: ' secondary' ,
1618 size: ' md' ,
1719 },
@@ -22,12 +24,13 @@ const attrs = useAttrs()
2224const selected = inject <WritableComputedRef <string >>(' tabs-selected' )
2325const getTabId = inject <(value : string ) => string >(' tabs-tab-id' )
2426const getPanelId = inject <(value : string ) => string >(' tabs-panel-id' )
27+
2528if (! selected || ! getTabId || ! getPanelId ) {
2629 throw new Error (' TabItem must be used inside a TabRoot component' )
2730}
2831const isSelected = computed (() => selected .value === props .value )
2932const resolvedTabId = computed (() => props .tabId ?? getTabId (props .value ))
30- const resolvedPanelId = computed (() => getPanelId (props .value ))
33+ const resolvedPanelId = computed (() => ( props . controlsPanel ? getPanelId (props .value ) : undefined ))
3134const select = () => {
3235 selected .value = props .value
3336}
You can’t perform that action at this time.
0 commit comments