UNPKG

@workday/canvas-kit-react

Version:

The parent module that contains all Workday Canvas Kit React components

254 lines • 10.4 kB
import { CanvasSystemIcon } from '@workday/design-assets-types'; import { CSProps } from '@workday/canvas-kit-styling'; import { TextInput } from '@workday/canvas-kit-react/text-input'; import { ExtractProps } from '@workday/canvas-kit-react/common'; export interface SelectInputProps extends ExtractProps<typeof TextInput, never>, CSProps { /** * The Icon to render at the start of the `input`. Use this prop if your options * include icons that you would like to render in the `input` when selected. * ** Note:An option must be selected in order to render and icon.** */ inputStartIcon?: CanvasSystemIcon; } export declare const selectInputStencil: import("@workday/canvas-kit-styling").Stencil<{ error: { error: ({ visualInputPart }: {} & import("@workday/canvas-kit-styling").StencilVarsParts<{ readonly caret: "select-caret-icon"; readonly caretContainer: "select-caret-container"; readonly startIconContainer: "select-start-icon-container"; readonly startIcon: "select-start-icon"; readonly endIcon: "select-end-icon"; readonly hiddenInput: "select-hidden-input"; readonly visualInput: "select-visual-input"; }>) => { "[data-part=\"select-visual-input\"]": { backgroundColor: "--cnvs-brand-error-lightest"; }; }; caution: ({ visualInputPart }: {} & import("@workday/canvas-kit-styling").StencilVarsParts<{ readonly caret: "select-caret-icon"; readonly caretContainer: "select-caret-container"; readonly startIconContainer: "select-start-icon-container"; readonly startIcon: "select-start-icon"; readonly endIcon: "select-end-icon"; readonly hiddenInput: "select-hidden-input"; readonly visualInput: "select-visual-input"; }>) => { "[data-part=\"select-visual-input\"]": { backgroundColor: "--cnvs-brand-alert-lightest"; }; }; }; }, { readonly caret: "select-caret-icon"; readonly caretContainer: "select-caret-container"; readonly startIconContainer: "select-start-icon-container"; readonly startIcon: "select-start-icon"; readonly endIcon: "select-end-icon"; readonly hiddenInput: "select-hidden-input"; readonly visualInput: "select-visual-input"; }, {}, never, never>; export declare const SelectInput: import("@workday/canvas-kit-react/common").ElementComponentM<import("@workday/canvas-kit-react/common").ElementComponent<"input", import("@workday/canvas-kit-react/text-input").TextInputProps> & { ErrorType: typeof import("@workday/canvas-kit-react/common").ErrorType; }, SelectInputProps, { state: { stackRef: import("react").RefObject<HTMLDivElement>; targetRef: import("react").RefObject<HTMLButtonElement>; initialFocusRef: import("react").RefObject<any> | undefined; returnFocusRef: import("react").RefObject<any> | undefined; placement: import("@popperjs/core").Placement; id: string; visibility: "hidden" | "visible"; selectedIds: string[] | "all"; unselectedIds: string[]; cursorId: string | string[]; columnCount: number; pageSizeRef: import("react").MutableRefObject<number>; cursorIndexRef: { readonly current: number; }; UNSTABLE_virtual: import("@tanstack/virtual-core").Virtualizer<HTMLDivElement, Element>; UNSTABLE_defaultItemHeight: number; containerRef: import("react").RefObject<HTMLDivElement>; orientation: "horizontal" | "vertical"; indexRef: import("react").MutableRefObject<number>; nonInteractiveIds: string[]; isVirtualized: boolean; items: import("../..").Item<any>[]; mode: "multiple" | "single"; value: string | undefined; inputRef: import("react").RefObject<HTMLInputElement>; width: number; }; events: { setWidth(width: number): void; updatePlacement(data: { placement: import("@popperjs/core").Placement; }): void; show(event?: Event | import("react").SyntheticEvent<Element, Event> | undefined): void; hide(event?: Event | import("react").SyntheticEvent<Element, Event> | undefined): void; select(data: { id: string; }): void; selectAll(): void; unselectAll(): void; setSelectedIds(ids: string[] | "all"): void; remove(data: { id: string; nextId?: string | undefined; event?: Event | import("react").SyntheticEvent<Element, Event> | undefined; }): void; goTo(data: { id: string; }): void; goToNext(): void; goToPrevious(): void; goToPreviousRow(): void; goToNextRow(): void; goToFirst(): void; goToLast(): void; goToFirstOfRow(): void; goToLastOfRow(): void; goToNextPage(): void; goToPreviousPage(): void; registerItem(data: { id: string; textValue: string; }): void; unregisterItem(data: { id: string; }): void; updateItemHeight(data: { value: number; }): void; }; onFilterChange: (event: import("react").ChangeEvent<HTMLInputElement>) => void; onChange: (event: import("react").ChangeEvent<HTMLInputElement>) => void; UNSTABLE_parentModel: { state: { selectedIds: string[] | "all"; unselectedIds: string[]; cursorId: string | string[]; columnCount: number; pageSizeRef: import("react").MutableRefObject<number>; cursorIndexRef: { readonly current: number; }; UNSTABLE_virtual: import("@tanstack/virtual-core").Virtualizer<HTMLDivElement, Element>; UNSTABLE_defaultItemHeight: number; containerRef: import("react").RefObject<HTMLDivElement>; id: string; orientation: "horizontal" | "vertical"; indexRef: import("react").MutableRefObject<number>; nonInteractiveIds: string[]; isVirtualized: boolean; items: import("../..").Item<any>[]; }; events: { select(data: { id: string; }): void; selectAll(): void; unselectAll(): void; setSelectedIds(ids: string[] | "all"): void; remove(data: { id: string; nextId?: string | undefined; event?: Event | import("react").SyntheticEvent<Element, Event> | undefined; }): void; goTo(data: { id: string; }): void; goToNext(): void; goToPrevious(): void; goToPreviousRow(): void; goToNextRow(): void; goToFirst(): void; goToLast(): void; goToFirstOfRow(): void; goToLastOfRow(): void; goToNextPage(): void; goToPreviousPage(): void; registerItem(data: { id: string; textValue: string; }): void; unregisterItem(data: { id: string; }): void; updateItemHeight(data: { value: number; }): void; }; selection: import("../..").SelectionManager; navigation: import("../..").NavigationManager; getId: (item: any) => string; getTextValue: (item: any) => string; UNSTABLE_parentModel: { state: { selectedIds: string[] | "all"; unselectedIds: string[]; cursorId: string | string[]; columnCount: number; pageSizeRef: import("react").MutableRefObject<number>; cursorIndexRef: { readonly current: number; }; UNSTABLE_virtual: import("@tanstack/virtual-core").Virtualizer<HTMLDivElement, Element>; UNSTABLE_defaultItemHeight: number; containerRef: import("react").RefObject<HTMLDivElement>; id: string; orientation: "horizontal" | "vertical"; indexRef: import("react").MutableRefObject<number>; nonInteractiveIds: string[]; isVirtualized: boolean; items: import("../..").Item<any>[]; }; events: { select(data: { id: string; }): void; selectAll(): void; unselectAll(): void; setSelectedIds(ids: string[] | "all"): void; remove(data: { id: string; nextId?: string | undefined; event?: Event | import("react").SyntheticEvent<Element, Event> | undefined; }): void; goTo(data: { id: string; }): void; goToNext(): void; goToPrevious(): void; goToPreviousRow(): void; goToNextRow(): void; goToFirst(): void; goToLast(): void; goToFirstOfRow(): void; goToLastOfRow(): void; goToNextPage(): void; goToPreviousPage(): void; registerItem(data: { id: string; textValue: string; }): void; unregisterItem(data: { id: string; }): void; updateItemHeight(data: { value: number; }): void; }; selection: import("../..").SelectionManager; navigation: import("../..").NavigationManager; getId: (item: any) => string; getTextValue: (item: any) => string; } | undefined; }; selection: import("../..").SelectionManager; navigation: import("../..").NavigationManager; getId: (item: any) => string; getTextValue: (item: any) => string; }>; //# sourceMappingURL=SelectInput.d.ts.map