UNPKG

@jupyter/web-components

Version:

A component library for building extensions in Jupyter frontends.

97 lines (96 loc) 3 kB
import type { ComboboxOptions } from '@microsoft/fast-foundation'; import { Combobox } from '@microsoft/fast-foundation'; import { comboboxStyles as styles } from './combobox.styles.js'; /** * Scale locally an element. */ export type ComboboxScale = 'xsmall' | 'small' | 'medium' | 'large' | 'xlarge'; /** * Combobox class * * @public * @tagname jp-combobox * * @fires input - Fires a custom 'input' event when the value has changed */ declare class JupyterCombobox extends Combobox { /** * Whether the combobox has a compact layout or not. * * @public * @remarks * HTML Attribute: minimal */ autoWidth: boolean; /** * Whether the combobox has a compact layout or not. * * @public * @remarks * * @deprecated Use {@link scale} `xsmall` instead * * HTML Attribute: minimal */ minimal: boolean; /** * Scale the element compared to the theme size. */ scale?: ComboboxScale; /** * The connected callback for this FASTElement. * * @override * * @internal */ connectedCallback(): void; /** * Synchronize the form-associated proxy and updates the value property of the element. * * @param prev - the previous collection of slotted option elements * @param next - the next collection of slotted option elements * * @internal */ slottedOptionsChanged(prev: Element[] | undefined, next: Element[]): void; /** * (Un-)set the width when the autoWidth property changes. * * @param prev - the previous autoWidth value * @param next - the current autoWidth value */ protected autoWidthChanged(prev: boolean | undefined, next: boolean): void; /** * Compute the listbox width to set the one of the input. */ protected setAutoWidth(): void; /** * An internal stylesheet to hold calculated CSS custom properties. * * @internal */ private computedStylesheet?; /** * @internal */ protected maxHeightChanged(prev: number | undefined, next: number): void; /** * Updates an internal stylesheet with calculated CSS custom properties. * * @internal */ protected updateComputedStylesheet(): void; } /** * A function that returns a {@link @microsoft/fast-foundation#Combobox} registration for configuring the component with a DesignSystem. * Implements {@link @microsoft/fast-foundation#comboboxTemplate} * * @public * @remarks * Generates HTML Element: `<jp-combobox>` * */ export declare const jpCombobox: (overrideDefinition?: import("@microsoft/fast-foundation").OverrideFoundationElementDefinition<ComboboxOptions> | undefined) => import("@microsoft/fast-foundation").FoundationElementRegistry<ComboboxOptions, import("@microsoft/fast-element").Constructable<import("@microsoft/fast-foundation").FoundationElement>>; export { JupyterCombobox as Combobox }; export { styles as comboboxStyles };