diff --git a/docs/api-report.md b/docs/api-report.md index 911a345a..f0bd9e75 100644 --- a/docs/api-report.md +++ b/docs/api-report.md @@ -83,23 +83,24 @@ export class Dropdown extends Select { } // @public -export class DropdownOption extends ListboxOption { - // @internal - connectedCallback(): void; -} +export type DropdownOptions = SelectOptions; // @public -export type DropdownOptionOptions = ListboxOptionOptions; +export class Link extends Anchor { +} // @public -export type DropdownOptions = SelectOptions; +export type LinkOptions = AnchorOptions; // @public -export class Link extends Anchor { +class Option_2 extends ListboxOption { + // @internal + connectedCallback(): void; } +export { Option_2 as Option } // @public -export type LinkOptions = AnchorOptions; +export type OptionOptions = ListboxOptionOptions; // @public export class Panels extends Tabs { diff --git a/src/custom-elements.ts b/src/custom-elements.ts index 83e552d8..ffa9d9ae 100644 --- a/src/custom-elements.ts +++ b/src/custom-elements.ts @@ -27,20 +27,12 @@ import {vsCodeTextField} from './text-field/index'; import type {Badge} from './badge/index'; import type {Button} from './button/index'; import type {Checkbox} from './checkbox/index'; -import type { - DataGrid, - DataGridCell, - DataGridRow, -} from './data-grid/index'; +import type {DataGrid, DataGridCell, DataGridRow} from './data-grid/index'; import type {Divider} from './divider/index'; import type {Dropdown} from './dropdown/index'; import type {Link} from './link/index'; -import type {DropdownOption} from './option/index'; -import type { - Panels, - PanelTab, - PanelView, -} from './panels/index'; +import type {Option} from './option/index'; +import type {Panels, PanelTab, PanelView} from './panels/index'; import type {ProgressRing} from './progress-ring/index'; import type {RadioGroup} from './radio-group/index'; import type {Radio} from './radio/index'; diff --git a/src/option/fixtures/createOption.ts b/src/option/fixtures/createOption.ts index ff9aacee..3ddee419 100644 --- a/src/option/fixtures/createOption.ts +++ b/src/option/fixtures/createOption.ts @@ -1,7 +1,7 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -import {DropdownOption} from '../index'; +import {Option} from '../index'; export type OptionArgs = { label: string; @@ -10,7 +10,7 @@ export type OptionArgs = { }; export function createOption({label, isDisabled, isSelected}: OptionArgs) { - const option = new DropdownOption(); + const option = new Option(); if (label) { option.textContent = label; diff --git a/src/option/index.ts b/src/option/index.ts index 5271008f..166d3fe3 100644 --- a/src/option/index.ts +++ b/src/option/index.ts @@ -12,14 +12,14 @@ import {optionStyles as styles} from './option.styles'; * Dropdown option configuration options * @public */ -export type DropdownOptionOptions = ListboxOptionOptions; +export type OptionOptions = ListboxOptionOptions; /** * The Visual Studio Code option class. * * @public */ -export class DropdownOption extends FoundationListboxOption { +export class Option extends FoundationListboxOption { /** * Component lifecycle method that runs when the component is inserted * into the DOM. @@ -45,7 +45,7 @@ export class DropdownOption extends FoundationListboxOption { * * @public */ -export const vsCodeOption = DropdownOption.compose({ +export const vsCodeOption = Option.compose({ baseName: 'option', template, styles, diff --git a/src/option/option.styles.ts b/src/option/option.styles.ts index ea594e67..3ca5dd14 100644 --- a/src/option/option.styles.ts +++ b/src/option/option.styles.ts @@ -20,11 +20,11 @@ import { typeRampBaseFontSize, typeRampBaseLineHeight, } from '../design-tokens'; -import {DropdownOptionOptions} from './'; +import {OptionOptions} from './'; export const optionStyles = ( context: ElementDefinitionContext, - definition: DropdownOptionOptions + definition: OptionOptions ) => css` ${display('inline-flex')} :host { font-family: var(--body-font);