@opensumi/ide-editor 3.2.5-next-1724148998.0 → 3.2.5-next-1724290408.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -13,7 +13,6 @@ import React, {
13
13
  useState,
14
14
  } from 'react';
15
15
 
16
- import { Scrollbars } from '@opensumi/ide-components';
17
16
  import {
18
17
  ComponentRegistry,
19
18
  ConfigContext,
@@ -27,18 +26,18 @@ import {
27
26
  PreferenceService,
28
27
  ResizeEvent,
29
28
  URI,
30
- View,
31
29
  getExternalIcon,
32
30
  getIcon,
33
31
  getSlotLocation,
32
+ renderView,
34
33
  useDesignStyles,
35
34
  } from '@opensumi/ide-core-browser';
36
- import { renderView } from '@opensumi/ide-core-browser';
37
35
  import { InlineMenuBar } from '@opensumi/ide-core-browser/lib/components/actions';
38
36
  import { LayoutViewSizeConfig } from '@opensumi/ide-core-browser/lib/layout/constants';
39
37
  import { VIEW_CONTAINERS } from '@opensumi/ide-core-browser/lib/layout/view-id';
40
38
  import { IMenuRegistry, MenuId } from '@opensumi/ide-core-browser/lib/menu/next';
41
39
  import { useInjectable, useUpdateOnEventBusEvent } from '@opensumi/ide-core-browser/lib/react-hooks';
40
+ import { formatLocalize } from '@opensumi/ide-core-common';
42
41
 
43
42
  import {
44
43
  IEditorGroup,
@@ -49,6 +48,7 @@ import {
49
48
  WorkbenchEditorService,
50
49
  } from '../common';
51
50
 
51
+ import { Scroll } from './editor-scrollbar';
52
52
  import styles from './editor.module.less';
53
53
  import { TabTitleMenuService } from './menu/title-context.menu';
54
54
  import {
@@ -378,7 +378,9 @@ export const Tabs = ({ group }: ITabsProps) => {
378
378
  return editorTabService.renderEditorTab(
379
379
  <>
380
380
  <div className={tabsLoadingMap[resource.uri.toString()] ? 'loading_indicator' : cls(resource.icon)}> </div>
381
- <div>{resource.name}</div>
381
+ <div tabIndex={0} role='tab' aria-selected={isCurrent ? 'true' : 'false'}>
382
+ {resource.name}
383
+ </div>
382
384
  {subname ? <div className={styles.subname}>{subname}</div> : null}
383
385
  {decoration.readOnly ? (
384
386
  <span className={cls(getExternalIcon('lock'), styles.editor_readonly_icon)}></span>
@@ -398,7 +400,12 @@ export const Tabs = ({ group }: ITabsProps) => {
398
400
  }}
399
401
  >
400
402
  {editorTabService.renderTabCloseComponent(
401
- <div className={cls(getIcon('close'), styles_kt_editor_close_icon)} />,
403
+ <div
404
+ className={cls(getIcon('close'), styles_kt_editor_close_icon)}
405
+ tabIndex={0}
406
+ role='button'
407
+ aria-label={formatLocalize('editor.closeTab.title', resource.name)}
408
+ />,
402
409
  )}
403
410
  </div>
404
411
  </div>
@@ -419,6 +426,7 @@ export const Tabs = ({ group }: ITabsProps) => {
419
426
  [styles_kt_editor_tabs_current_last]: curTabIndex === group.resources.length - 1,
420
427
  })}
421
428
  ref={contentRef as any}
429
+ role='tablist'
422
430
  >
423
431
  {group.resources.map((resource, i) => {
424
432
  let ref: HTMLDivElement | null;
@@ -510,13 +518,12 @@ export const Tabs = ({ group }: ITabsProps) => {
510
518
  onDoubleClick={handleEmptyDBClick}
511
519
  >
512
520
  {!wrapMode ? (
513
- <Scrollbars
514
- tabBarMode
521
+ <Scroll
515
522
  forwardedRef={(el) => (el ? (tabContainer.current = el) : null)}
516
523
  className={styles.kt_editor_tabs_scroll}
517
524
  >
518
525
  {renderTabContent()}
519
- </Scrollbars>
526
+ </Scroll>
520
527
  ) : (
521
528
  <div className={styles.kt_editor_wrap_container}>{renderTabContent()}</div>
522
529
  )}