import React from "react"; import type { ActionableProps } from "../Actionable"; import type { DropdownMenuProps } from "../DropdownMenu"; import type { IconProps } from "../Icon"; import type { MenuItemProps } from "../MenuItem"; import type * as G from "../../types/global"; import type { Attributes, ClassName } from "@reshaped/headless"; type Size = G.Responsive<"small" | "medium" | "large" | "xlarge">; type RenderSingleValue = (args: { value: string; }) => React.ReactNode; type RenderMultipleValues = (args: { value: string[]; }) => React.ReactNode; type NativeOption = { /** Option text label */ label: string; /** Option value used in the form submission */ value: string; /** Disable the option from the selection */ disabled?: boolean; }; export type OptionProps = Pick & { value: string; }; export type GroupProps = { label?: string; children: React.ReactNode; }; type BaseFragment = { id?: string; /** Name of the input element */ name: string; /** Component size */ size?: Size; /** Component render variant */ variant?: "outline" | "faded" | "ghost" | "headless"; /** Disable the select user interaction and form submission */ disabled?: boolean; /** Placeholder text when there is no value selected */ placeholder?: string; /** Icon to display in the select start position */ icon?: IconProps["svg"]; /** Node for inserting content before the select value */ startSlot?: React.ReactNode; /** Show an error state, automatically inherited when component is used inside FormControl */ hasError?: boolean; /** Callback when the trigger is clicked */ onClick?: ActionableProps["onClick"]; /** Additional classname for the root element */ className?: ClassName; /** Additional attributes for the root element */ attributes?: Attributes<"div">; /** Node for inserting children */ children?: React.ReactNode; }; export type CustomFragment = { /** Options for the select */ options?: never; /** Callback when the input is focused */ onFocus?: (e: React.FocusEvent) => void; /** Callback when the input is blurred */ onBlur?: (e: React.FocusEvent) => void; /** Additional attributes for the trigger element */ inputAttributes?: ActionableProps["attributes"]; } & Pick; export type NativeFragment = { /** Options for the select */ /** @deprecated Use