1 | import * as React from "react";
|
2 | import { IconName, SVGIconProps } from "@blueprintjs/icons";
|
3 | import { OptionProps } from "../../common/props";
|
4 | import { Extends } from "../../common/utils";
|
5 | export type HTMLSelectIconName = Extends<IconName, "double-caret-vertical" | "caret-down">;
|
6 | export interface HTMLSelectProps extends React.RefAttributes<HTMLSelectElement>, React.SelectHTMLAttributes<HTMLSelectElement> {
|
7 | children?: React.ReactNode;
|
8 | /** Whether this element is non-interactive. */
|
9 | disabled?: boolean;
|
10 | /** Whether this element should fill its container. */
|
11 | fill?: boolean;
|
12 | /**
|
13 | * Name of one of the supported icons for this component to display on the right side of the element.
|
14 | *
|
15 | * @default "double-caret-vertical"
|
16 | */
|
17 | iconName?: HTMLSelectIconName;
|
18 | /**
|
19 | * Props to spread to the icon element displayed on the right side of the element.
|
20 | */
|
21 | iconProps?: Partial<SVGIconProps>;
|
22 | /** Whether to use large styles. */
|
23 | large?: boolean;
|
24 | /** Whether to use minimal styles. */
|
25 | minimal?: boolean;
|
26 | /** Multiple select is not supported. */
|
27 | multiple?: never;
|
28 | /** Change event handler. Use `event.currentTarget.value` to access the new value. */
|
29 | onChange?: React.ChangeEventHandler<HTMLSelectElement>;
|
30 | /**
|
31 | * Shorthand for supplying options: an array of basic types or
|
32 | * `{ label?, value }` objects. If no `label` is supplied, `value`
|
33 | * will be used as the label.
|
34 | */
|
35 | options?: ReadonlyArray<string | number | OptionProps>;
|
36 | /** Controlled value of this component. */
|
37 | value?: string | number;
|
38 | }
|
39 | /**
|
40 | * HTML select component
|
41 | *
|
42 | * @see https://blueprintjs.com/docs/#core/components/html-select
|
43 | */
|
44 | export declare const HTMLSelect: React.FC<HTMLSelectProps>;
|