@chekinapp/ui 0.0.118 → 0.0.120
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs +55 -35
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +12 -9
- package/dist/index.d.ts +12 -9
- package/dist/index.js +55 -35
- package/dist/index.js.map +1 -1
- package/package.json +2 -2
package/dist/index.d.cts
CHANGED
|
@@ -3081,17 +3081,20 @@ type BaseSelectProps<T, V extends SelectValue$1, L extends ReactNode> = {
|
|
|
3081
3081
|
onMenuScrollToBottom?: (event: React$1.UIEvent<HTMLDivElement>) => void;
|
|
3082
3082
|
leftIcon?: React$1.ReactNode;
|
|
3083
3083
|
formatGroupLabel?: SelectFormatGroupLabel<T, V, L>;
|
|
3084
|
+
onReset?: () => void;
|
|
3084
3085
|
};
|
|
3085
3086
|
type SingleSelectProps<T, V extends SelectValue$1, L extends ReactNode> = BaseSelectProps<T, V, L> & {
|
|
3086
3087
|
isMulti?: false;
|
|
3087
3088
|
value?: SelectOption<T, V, L> | null;
|
|
3088
|
-
|
|
3089
|
+
defaultValue?: SelectOption<T, V, L> | null;
|
|
3090
|
+
onChange?: (option: SelectOption<T, V, L> | null, meta?: SelectChangeMeta) => void;
|
|
3089
3091
|
clearable?: boolean;
|
|
3090
3092
|
};
|
|
3091
3093
|
type MultiSelectModeProps<T, V extends SelectValue$1, L extends ReactNode> = BaseSelectProps<T, V, L> & {
|
|
3092
3094
|
isMulti: true;
|
|
3093
3095
|
value?: SelectOption<T, V, L>[] | null;
|
|
3094
|
-
|
|
3096
|
+
defaultValue?: SelectOption<T, V, L>[] | null;
|
|
3097
|
+
onChange?: (value: SelectOption<T, V, L>[], meta?: SelectChangeMeta) => void;
|
|
3095
3098
|
closeMenuOnSelect?: boolean;
|
|
3096
3099
|
};
|
|
3097
3100
|
type SelectProps<T = undefined, V extends SelectValue$1 = string, L extends ReactNode = string> = SingleSelectProps<T, V, L> | MultiSelectModeProps<T, V, L>;
|
|
@@ -3104,7 +3107,6 @@ type SearchingSelectTriggerRenderer = (isOpen: boolean, toggle: () => void) => R
|
|
|
3104
3107
|
type SearchingSelectBaseProps<T, V extends SelectValue$1, L extends ReactNode> = Omit<SingleSelectProps<T, V, L>, 'isMulti' | 'searchPosition' | 'components'> & {
|
|
3105
3108
|
trigger?: SearchingSelectTriggerRenderer;
|
|
3106
3109
|
components?: SelectComponents<T, V, L>;
|
|
3107
|
-
searchPlaceholder?: string;
|
|
3108
3110
|
/** Hide the in-menu search input (default: true). */
|
|
3109
3111
|
searchable?: boolean;
|
|
3110
3112
|
};
|
|
@@ -3246,12 +3248,12 @@ declare const Textarea: React$1.ForwardRefExoticComponent<Omit<React$1.TextareaH
|
|
|
3246
3248
|
autosize?: boolean;
|
|
3247
3249
|
} & React$1.RefAttributes<HTMLTextAreaElement>>;
|
|
3248
3250
|
|
|
3249
|
-
type
|
|
3251
|
+
type DatepickerDate = Date | null;
|
|
3250
3252
|
type DatepickerProps = {
|
|
3251
3253
|
label?: string;
|
|
3252
|
-
value?:
|
|
3253
|
-
defaultValue?:
|
|
3254
|
-
onChange?: (value:
|
|
3254
|
+
value?: DatepickerDate;
|
|
3255
|
+
defaultValue?: DatepickerDate;
|
|
3256
|
+
onChange?: (value: DatepickerDate, name?: string) => void;
|
|
3255
3257
|
name?: string;
|
|
3256
3258
|
invalid?: boolean;
|
|
3257
3259
|
error?: string;
|
|
@@ -4007,7 +4009,8 @@ type SelectRenderTriggerProps<T = undefined, V extends SelectValue = string, L e
|
|
|
4007
4009
|
type AirbnbSelectProps<T = undefined, V extends SelectValue = string, L extends string | number | React$1.ReactNode = string> = {
|
|
4008
4010
|
options?: SelectOption<T, V, L>[];
|
|
4009
4011
|
value?: SelectOption<T, V, L> | null;
|
|
4010
|
-
|
|
4012
|
+
defaultValue?: SelectOption<T, V, L> | null;
|
|
4013
|
+
onChange?: (option: SelectOption<T, V, L>) => void;
|
|
4011
4014
|
onBlur?: React$1.FocusEventHandler<HTMLButtonElement>;
|
|
4012
4015
|
label: string;
|
|
4013
4016
|
topLabel?: string;
|
|
@@ -4088,4 +4091,4 @@ interface AirbnbSwitchProps extends Omit<React$1.ComponentPropsWithoutRef<typeof
|
|
|
4088
4091
|
}
|
|
4089
4092
|
declare const AirbnbSwitch: React$1.ForwardRefExoticComponent<AirbnbSwitchProps & React$1.RefAttributes<HTMLButtonElement>>;
|
|
4090
4093
|
|
|
4091
|
-
export { ALERT_BOX_VARIANTS, Accordion, AccordionContent, type AccordionContentProps, AccordionItem, AccordionTrigger, type AccordionTriggerProps, AirbnbDatePicker, type AirbnbDatePickerProps, type AirbnbDatePickerValue, AirbnbFieldTrigger, type AirbnbFieldTriggerProps, AirbnbInput, type AirbnbInputProps, AirbnbPhoneField, type AirbnbPhoneFieldOption, type AirbnbPhoneFieldProps, type AirbnbPhoneFieldValue, AirbnbSearchInput, AirbnbSearchableSelect, type AirbnbSearchableSelectProps, type AirbnbSearchableSelectValue, AirbnbSelect, type AirbnbSelectProps, AirbnbSwitch, type AirbnbSwitchProps, Alert, AlertBox, type AlertBoxProps, type AlertBoxVariant, AlertDescription, AlertSize, AlertSizes, AlertTitle, AlertType, AlertTypes, AudioPlayer, type AudioPlayerProps, Avatar, type AvatarProps, Badge, type BadgeProps, BaseCheckbox, type BaseCheckboxProps, type BaseSelectProps, BetaBadge, type BetaBadgeProps, BookmarkTabsList, type BookmarkTabsListProps, BookmarkTabsTrigger, type BookmarkTabsTriggerProps, BoxOptionSelector, type BoxOptionSelectorProps, type BoxOptionSelectorSwitchProps, Breadcrumb, type BreadcrumbProps, type BreadcrumbType, Breadcrumbs, type BreadcrumbsProps, Button, ButtonGroup, type ButtonGroupProps, ButtonGroupText, type ButtonGroupTextProps, type ButtonProps, type ButtonStatuses, ButtonsGroupLabel, type ButtonsGroupLabelProps, Calendar, type CalendarProps, Card, CardContent, CardDescription, CardFooter, CardHeader, CardTitle, Carousel, CarouselNext, CarouselPrevious, type CarouselProps, CarouselRoot, type CarouselRootProps, CarouselSlide, CarouselTrack, CarouselViewport, CheckList, type CheckListProps, Checkbox, CheckboxDropdownGroup, type CheckboxDropdownGroupConfig, type CheckboxDropdownGroupProps, CheckboxDropdownMultiGroup, CheckboxGroup, type CheckboxGroupProps, type CheckboxOption, type CheckboxProps, type CheckboxSize, CircularLoader, Collapsible, CollapsibleContent, CollapsibleTrigger, CommingSoonBadge, type CommingSoonBadgeProps, ConfirmationDialog, type ConfirmationDialogProps, CopyIcon, type CopyIconProps, CopyLinkButton, type CopyLinkButtonProps, CopyString, type CopyStringProps, Counter, type CounterProps, CounterSize, CreatableMultiSelect, type CreatableMultiSelectProps, CreatableSelect, type CreatableSelectProps, CustomCheckboxDropdownGroup, type CustomIconEntry, DEFAULT_DISPLAY_FORMAT, DEVICE_BREAKPOINTS, DataTable, type DataTableProps, DateRangePicker, type DateRangePickerImperativeProps, type OpenDirection as DateRangePickerOpenDirection, type DateRangePickerProps, DateTableFilter, Datepicker, type DatepickerProps, type DatepickerValue, DebouncedSearchInput, type DebouncedSearchInputProps, DefaultSelectTrigger, type DefaultSelectTriggerProps, Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger, DialogVisuallyHidden, DividingSubsection, Drawer, DrawerClose, DrawerContent, DrawerDescription, DrawerFooter, DrawerHeader, DrawerOverlay, DrawerPortal, DrawerTitle, DrawerTrigger, DropdownButton, type DropdownButtonProps, DropdownMenu, DropdownMenuCheckboxItem, DropdownMenuContent, type DropdownMenuContentSide, DropdownMenuGroup, DropdownMenuItem, DropdownMenuItemContent, type DropdownMenuItemContentProps, DropdownMenuLabel, DropdownMenuPortal, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuTrigger, Empty, EmptyContent, EmptyDescription, EmptyHeader, EmptyMedia, EmptySectionPlaceholder, type EmptySectionPlaceholderProps, EmptyTitle, ErrorMessage, type ErrorMessageProps, ExpandableContent, type ExpandableContentProps, type ExpandableContentTrigger, ExternalLink, type ExternalLinkProps, FieldErrorMessage, type FieldErrorMessageProps, FileInput, FileInputButton, type FileInputButtonProps, type FileInputProps, type FileInputValue, FormBox, Content as FormBoxContent, type FormBoxContentProps, Header as FormBoxHeader, type FormBoxHeaderProps, Root$1 as FormBoxRoot, type FormBoxRootProps, SubHeader as FormBoxSubHeader, type FormBoxSubHeaderProps, FramedIcon, type FramedIconProps, FreeTextField, type FreeTextFieldProps, HALO_ICON_STATUS, HaloIcon, type HaloIconProps, HelpTooltip, type HelpTooltipProps, IconButton, type IconButtonProps, type IconEntry, IconsDropdown, type IconsDropdownProps, Image, ImageFullScreenView, type ImageFullScreenViewProps, type ImageProps, InfiniteScrollMultiSelect, type InfiniteScrollMultiSelectProps, InfiniteScrollSelect, type InfiniteScrollSelectProps, InfoBox, type InfoBoxProps, Input, InputOTP, InputOTPGroup, type InputOTPProps, InputOTPSeparator, InputOTPSlot, type InputProps, Label, type LabelProps, LargeModal, type LargeModalProps, LearnMoreButton, type LearnMoreButtonProps, LegacyInfinitySelect, type LegacyInfinitySelectProps, LegacyInput, type LegacyInputProps, LegacyMultiSelect, type LegacyMultiSelectProps, LegacySelect, LegacySelectContent, LegacySelectGroup, LegacySelectItem, LegacySelectLabel, LegacySelectPortal, type LegacySelectProps, LegacySelectRoot, LegacySelectScrollDownButton, LegacySelectScrollUpButton, LegacySelectSeparator, type LegacySelectSize, LegacySelectTrigger, LegacySelectValue, LegacyTextarea, type LegacyTextareaProps, Link, type LinkProps, LoadingBar, type LoadingBarProps, type LucideIconEntry, type MobileCameraProps, type MobileScreenshotPayload, MobileWebcam, Modal, ModalButton, ModalLoader, type ModalLoaderProps, type ModalProps, MultiSelect, type MultiSelectProps, NumberedList, type NumberedListProps, type OptionsCardsProps, OverlayLoader, type OverlayLoaderProps, Pagination, type PaginationProps, type PaginationVariant, PhoneInput, type PhoneInputOption, type PhoneInputProps, type PhoneInputValue, Popover, PopoverAnchor, PopoverClose, PopoverContent, PopoverPortal, PopoverTrigger, PopoverWithTooltip, type PopoverWithTooltipProps, Radio, type RadioCardOption, MemoizedRadioCardsGroup as RadioCardsGroup, RadioGroup, RadioGroupItem, type RadioGroupItemProps, type RadioOption, type RadioProps, type RadioSize, RadioWithBorder, RatingProgress, type RatingProgressProps, RatingRadioGroup, type RatingRadioGroupProps, RatingStars, type RatingStarsProps, type RegisterUiKitI18nOptions, ResponsiveDropdown, type ResponsiveDropdownOption, type ResponsiveDropdownProps, ResponsiveSheet, type ResponsiveSheetProps, RotateArrow, type RotateArrowProps, ScrollArea, type ScrollAreaProps, ScrollBar, type ScrollBarProps, type ScrollableAreaState, SearchButton, type SearchButtonProps, SearchInput, type SearchInputProps, SearchingSelect, type SearchingSelectProps, type SearchingSelectTriggerRenderer, Section, SectionGroup, type SectionGroupItemProps, type SectionGroupLabelProps, type SectionGroupProps, type SectionProps, SectionTag, SectionTagColors, type SectionTagProps, Select, SelectAllRow, type SelectAllRowProps, SelectCheckboxOption, SelectCheckboxes, type SelectCheckboxesProps, type SelectCheckboxesTriggerRenderer, type SelectFormatGroupLabel, type SelectGroupedOption, SelectIconsBox, type SelectIconsBoxProps, type MultiSelectModeProps as SelectMultiProps, type SelectOption, type SelectOptionGroup, type SelectProps, type SelectorOption, Separator, type SeparatorProps, Sheet, SheetClose, SheetContent, SheetDescription, SheetFooter, SheetHeader, SheetTitle, SheetTrigger, Sidebar, SidebarContent, SidebarFooter, SidebarGroup, SidebarGroupAction, SidebarGroupContent, SidebarGroupLabel, SidebarHeader, SidebarIcon, SidebarInput, SidebarInset, SidebarMenu, SidebarMenuAction, SidebarMenuBadge, SidebarMenuButton, SidebarMenuItem, SidebarMenuSkeleton, SidebarMenuSub, SidebarMenuSubButton, SidebarMenuSubItem, SidebarProvider, SidebarRail, SidebarSeparator, SidebarTrigger, SignatureCanvas, type SignatureCanvasRef, type SingleSelectProps, Skeleton, type SkeletonProps, Slider, SmallGridSingleItem, type SmallGridSingleItemProps, SortingAction, type SortingActionProps, type SortingActionValue, type SortingByVariant, StatusBadge, type StatusBadgeProps, type StatusBadgeVariant, StatusBox, type StatusBoxProps, StatusButton, type StatusButtonProps, Stepper, type StepperProps, SubSection, SubSectionSize, SvgIcon, type SvgIconProps, type SvgIconSize, Switch, SwitchBlocks, type SwitchBlocksOption, type SwitchBlocksProps, SwitchGroup, type SwitchGroupProps, type SwitchOption, type SwitchProps, TabbedSection, type TabbedSectionProps, Table, TableBody, TableCaption, TableCell, TableFilter, type TableFilterProps, TableFooter, TableHead, TableHeader, TableLoader, type TableLoaderProps, type TableLoaderRootProps, TablePlaceholder, type TablePlaceholderProps, TableRow, Tabs, TabsContent, TabsList, type TabsListProps, TabsTrigger, type TabsTriggerProps, Textarea, type TextareaProps, ThreeDotsLoader, type ThreeDotsLoaderProps, TimePicker, type TimePickerFormat, type TimePickerProps, type TimeSettings, Timeline, TimelineConnector, type TimelineConnectorProps, TimelineContent, type TimelineContentProps, type TimelineContextProps, TimelineDescription, type TimelineDescriptionProps, TimelineDot, type TimelineDotProps, TimelineItem, type TimelineItemProps, type TimelineProps, TimelineSeparator, type TimelineSeparatorProps, TimelineTitle, type TimelineTitleProps, ToggleGroup, ToggleGroupItem, Toggles, type TogglesForwardType, type TogglesProps, Tooltip, TooltipContent, type TooltipContentProps, type TooltipProps, TooltipProvider, TooltipRoot, type TooltipRootProps, TooltipRootWrapper, TooltipTrigger, UI_KIT_I18N_NAMESPACE, type UiKitLocale, UploadedFilesList, type UploadedFilesListProps, type UseScrollableAreaOptions, type UseScrollableAreaResult, VerticalTabs, type VerticalTabsProps, type VerticalTabsStep, type VideoConstraints, VideoModal, type VideoModalProps, VideoPlayer, type VideoPlayerProps, Webcam, type WebcamProps, type WebcamRefTypes, WideButton, type WideButtonProps, addSupportEmailToMessage, badgeVariants, bookmarkTabsListVariants, bookmarkTabsTriggerVariants, buttonGroupVariants, buttonVariants, calendarClassNames, clearPhoneNumber, cn, compressFile, compressImage, copyToClipboard, createDisabledMatchers, emptyMediaVariants, findPhoneCode, findPhoneCodeOption, formatDate, formatPhoneCodeOptionLabel, getErrorMessage, getFileSizeMB, getScrollableAreaState, getSidebarState, isDayBlocked, isNumeric, labelVariants, parseDate, parsePhoneValueWithOptions, registerUiKitI18n, scrollToTop, sectionTagVariants, switchThumbVariants, switchVariants, tabsListVariants, tabsTriggerVariants, toCssSize, toastResponseError, toggleVariants, uiKitI18nResources, uiKitTranslations, useAbortController, useAccordionState, useCarouselContext, useClickEscape, useCombinedRef, useCopyToClipboard, useCountdown, useDebounce, useDebouncedFunction, useEvent, useHover, useIframeFocusTrapFallback, useIsFormTouched, useIsMobile, useIsMounted, useKeyDown, useLoadMore, useLockBodyScroll, useModalControls, useModalWithHistoryControls, useOutsideClick, usePagination, usePrevious, usePromisedModalControls, useRadioOptions, useResetAfterRequestStatus, useScreenResize, useScrollFrameIntoView, useScrollToTop, useScrollableArea, useSearchInput, useSidebar, useSidebarMenuButton, useSidebarSafe, useStickyStuck, useSwitchSectionActive, useTimeline, useTimeout, useTimeoutRef, useUpdateToast, useValidateDates };
|
|
4094
|
+
export { ALERT_BOX_VARIANTS, Accordion, AccordionContent, type AccordionContentProps, AccordionItem, AccordionTrigger, type AccordionTriggerProps, AirbnbDatePicker, type AirbnbDatePickerProps, type AirbnbDatePickerValue, AirbnbFieldTrigger, type AirbnbFieldTriggerProps, AirbnbInput, type AirbnbInputProps, AirbnbPhoneField, type AirbnbPhoneFieldOption, type AirbnbPhoneFieldProps, type AirbnbPhoneFieldValue, AirbnbSearchInput, AirbnbSearchableSelect, type AirbnbSearchableSelectProps, type AirbnbSearchableSelectValue, AirbnbSelect, type AirbnbSelectProps, AirbnbSwitch, type AirbnbSwitchProps, Alert, AlertBox, type AlertBoxProps, type AlertBoxVariant, AlertDescription, AlertSize, AlertSizes, AlertTitle, AlertType, AlertTypes, AudioPlayer, type AudioPlayerProps, Avatar, type AvatarProps, Badge, type BadgeProps, BaseCheckbox, type BaseCheckboxProps, type BaseSelectProps, BetaBadge, type BetaBadgeProps, BookmarkTabsList, type BookmarkTabsListProps, BookmarkTabsTrigger, type BookmarkTabsTriggerProps, BoxOptionSelector, type BoxOptionSelectorProps, type BoxOptionSelectorSwitchProps, Breadcrumb, type BreadcrumbProps, type BreadcrumbType, Breadcrumbs, type BreadcrumbsProps, Button, ButtonGroup, type ButtonGroupProps, ButtonGroupText, type ButtonGroupTextProps, type ButtonProps, type ButtonStatuses, ButtonsGroupLabel, type ButtonsGroupLabelProps, Calendar, type CalendarProps, Card, CardContent, CardDescription, CardFooter, CardHeader, CardTitle, Carousel, CarouselNext, CarouselPrevious, type CarouselProps, CarouselRoot, type CarouselRootProps, CarouselSlide, CarouselTrack, CarouselViewport, CheckList, type CheckListProps, Checkbox, CheckboxDropdownGroup, type CheckboxDropdownGroupConfig, type CheckboxDropdownGroupProps, CheckboxDropdownMultiGroup, CheckboxGroup, type CheckboxGroupProps, type CheckboxOption, type CheckboxProps, type CheckboxSize, CircularLoader, Collapsible, CollapsibleContent, CollapsibleTrigger, CommingSoonBadge, type CommingSoonBadgeProps, ConfirmationDialog, type ConfirmationDialogProps, CopyIcon, type CopyIconProps, CopyLinkButton, type CopyLinkButtonProps, CopyString, type CopyStringProps, Counter, type CounterProps, CounterSize, CreatableMultiSelect, type CreatableMultiSelectProps, CreatableSelect, type CreatableSelectProps, CustomCheckboxDropdownGroup, type CustomIconEntry, DEFAULT_DISPLAY_FORMAT, DEVICE_BREAKPOINTS, DataTable, type DataTableProps, DateRangePicker, type DateRangePickerImperativeProps, type OpenDirection as DateRangePickerOpenDirection, type DateRangePickerProps, DateTableFilter, Datepicker, type DatepickerDate, type DatepickerProps, DebouncedSearchInput, type DebouncedSearchInputProps, DefaultSelectTrigger, type DefaultSelectTriggerProps, Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger, DialogVisuallyHidden, DividingSubsection, Drawer, DrawerClose, DrawerContent, DrawerDescription, DrawerFooter, DrawerHeader, DrawerOverlay, DrawerPortal, DrawerTitle, DrawerTrigger, DropdownButton, type DropdownButtonProps, DropdownMenu, DropdownMenuCheckboxItem, DropdownMenuContent, type DropdownMenuContentSide, DropdownMenuGroup, DropdownMenuItem, DropdownMenuItemContent, type DropdownMenuItemContentProps, DropdownMenuLabel, DropdownMenuPortal, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuTrigger, Empty, EmptyContent, EmptyDescription, EmptyHeader, EmptyMedia, EmptySectionPlaceholder, type EmptySectionPlaceholderProps, EmptyTitle, ErrorMessage, type ErrorMessageProps, ExpandableContent, type ExpandableContentProps, type ExpandableContentTrigger, ExternalLink, type ExternalLinkProps, FieldErrorMessage, type FieldErrorMessageProps, FileInput, FileInputButton, type FileInputButtonProps, type FileInputProps, type FileInputValue, FormBox, Content as FormBoxContent, type FormBoxContentProps, Header as FormBoxHeader, type FormBoxHeaderProps, Root$1 as FormBoxRoot, type FormBoxRootProps, SubHeader as FormBoxSubHeader, type FormBoxSubHeaderProps, FramedIcon, type FramedIconProps, FreeTextField, type FreeTextFieldProps, HALO_ICON_STATUS, HaloIcon, type HaloIconProps, HelpTooltip, type HelpTooltipProps, IconButton, type IconButtonProps, type IconEntry, IconsDropdown, type IconsDropdownProps, Image, ImageFullScreenView, type ImageFullScreenViewProps, type ImageProps, InfiniteScrollMultiSelect, type InfiniteScrollMultiSelectProps, InfiniteScrollSelect, type InfiniteScrollSelectProps, InfoBox, type InfoBoxProps, Input, InputOTP, InputOTPGroup, type InputOTPProps, InputOTPSeparator, InputOTPSlot, type InputProps, Label, type LabelProps, LargeModal, type LargeModalProps, LearnMoreButton, type LearnMoreButtonProps, LegacyInfinitySelect, type LegacyInfinitySelectProps, LegacyInput, type LegacyInputProps, LegacyMultiSelect, type LegacyMultiSelectProps, LegacySelect, LegacySelectContent, LegacySelectGroup, LegacySelectItem, LegacySelectLabel, LegacySelectPortal, type LegacySelectProps, LegacySelectRoot, LegacySelectScrollDownButton, LegacySelectScrollUpButton, LegacySelectSeparator, type LegacySelectSize, LegacySelectTrigger, LegacySelectValue, LegacyTextarea, type LegacyTextareaProps, Link, type LinkProps, LoadingBar, type LoadingBarProps, type LucideIconEntry, type MobileCameraProps, type MobileScreenshotPayload, MobileWebcam, Modal, ModalButton, ModalLoader, type ModalLoaderProps, type ModalProps, MultiSelect, type MultiSelectProps, NumberedList, type NumberedListProps, type OptionsCardsProps, OverlayLoader, type OverlayLoaderProps, Pagination, type PaginationProps, type PaginationVariant, PhoneInput, type PhoneInputOption, type PhoneInputProps, type PhoneInputValue, Popover, PopoverAnchor, PopoverClose, PopoverContent, PopoverPortal, PopoverTrigger, PopoverWithTooltip, type PopoverWithTooltipProps, Radio, type RadioCardOption, MemoizedRadioCardsGroup as RadioCardsGroup, RadioGroup, RadioGroupItem, type RadioGroupItemProps, type RadioOption, type RadioProps, type RadioSize, RadioWithBorder, RatingProgress, type RatingProgressProps, RatingRadioGroup, type RatingRadioGroupProps, RatingStars, type RatingStarsProps, type RegisterUiKitI18nOptions, ResponsiveDropdown, type ResponsiveDropdownOption, type ResponsiveDropdownProps, ResponsiveSheet, type ResponsiveSheetProps, RotateArrow, type RotateArrowProps, ScrollArea, type ScrollAreaProps, ScrollBar, type ScrollBarProps, type ScrollableAreaState, SearchButton, type SearchButtonProps, SearchInput, type SearchInputProps, SearchingSelect, type SearchingSelectProps, type SearchingSelectTriggerRenderer, Section, SectionGroup, type SectionGroupItemProps, type SectionGroupLabelProps, type SectionGroupProps, type SectionProps, SectionTag, SectionTagColors, type SectionTagProps, Select, SelectAllRow, type SelectAllRowProps, SelectCheckboxOption, SelectCheckboxes, type SelectCheckboxesProps, type SelectCheckboxesTriggerRenderer, type SelectFormatGroupLabel, type SelectGroupedOption, SelectIconsBox, type SelectIconsBoxProps, type MultiSelectModeProps as SelectMultiProps, type SelectOption, type SelectOptionGroup, type SelectProps, type SelectorOption, Separator, type SeparatorProps, Sheet, SheetClose, SheetContent, SheetDescription, SheetFooter, SheetHeader, SheetTitle, SheetTrigger, Sidebar, SidebarContent, SidebarFooter, SidebarGroup, SidebarGroupAction, SidebarGroupContent, SidebarGroupLabel, SidebarHeader, SidebarIcon, SidebarInput, SidebarInset, SidebarMenu, SidebarMenuAction, SidebarMenuBadge, SidebarMenuButton, SidebarMenuItem, SidebarMenuSkeleton, SidebarMenuSub, SidebarMenuSubButton, SidebarMenuSubItem, SidebarProvider, SidebarRail, SidebarSeparator, SidebarTrigger, SignatureCanvas, type SignatureCanvasRef, type SingleSelectProps, Skeleton, type SkeletonProps, Slider, SmallGridSingleItem, type SmallGridSingleItemProps, SortingAction, type SortingActionProps, type SortingActionValue, type SortingByVariant, StatusBadge, type StatusBadgeProps, type StatusBadgeVariant, StatusBox, type StatusBoxProps, StatusButton, type StatusButtonProps, Stepper, type StepperProps, SubSection, SubSectionSize, SvgIcon, type SvgIconProps, type SvgIconSize, Switch, SwitchBlocks, type SwitchBlocksOption, type SwitchBlocksProps, SwitchGroup, type SwitchGroupProps, type SwitchOption, type SwitchProps, TabbedSection, type TabbedSectionProps, Table, TableBody, TableCaption, TableCell, TableFilter, type TableFilterProps, TableFooter, TableHead, TableHeader, TableLoader, type TableLoaderProps, type TableLoaderRootProps, TablePlaceholder, type TablePlaceholderProps, TableRow, Tabs, TabsContent, TabsList, type TabsListProps, TabsTrigger, type TabsTriggerProps, Textarea, type TextareaProps, ThreeDotsLoader, type ThreeDotsLoaderProps, TimePicker, type TimePickerFormat, type TimePickerProps, type TimeSettings, Timeline, TimelineConnector, type TimelineConnectorProps, TimelineContent, type TimelineContentProps, type TimelineContextProps, TimelineDescription, type TimelineDescriptionProps, TimelineDot, type TimelineDotProps, TimelineItem, type TimelineItemProps, type TimelineProps, TimelineSeparator, type TimelineSeparatorProps, TimelineTitle, type TimelineTitleProps, ToggleGroup, ToggleGroupItem, Toggles, type TogglesForwardType, type TogglesProps, Tooltip, TooltipContent, type TooltipContentProps, type TooltipProps, TooltipProvider, TooltipRoot, type TooltipRootProps, TooltipRootWrapper, TooltipTrigger, UI_KIT_I18N_NAMESPACE, type UiKitLocale, UploadedFilesList, type UploadedFilesListProps, type UseScrollableAreaOptions, type UseScrollableAreaResult, VerticalTabs, type VerticalTabsProps, type VerticalTabsStep, type VideoConstraints, VideoModal, type VideoModalProps, VideoPlayer, type VideoPlayerProps, Webcam, type WebcamProps, type WebcamRefTypes, WideButton, type WideButtonProps, addSupportEmailToMessage, badgeVariants, bookmarkTabsListVariants, bookmarkTabsTriggerVariants, buttonGroupVariants, buttonVariants, calendarClassNames, clearPhoneNumber, cn, compressFile, compressImage, copyToClipboard, createDisabledMatchers, emptyMediaVariants, findPhoneCode, findPhoneCodeOption, formatDate, formatPhoneCodeOptionLabel, getErrorMessage, getFileSizeMB, getScrollableAreaState, getSidebarState, isDayBlocked, isNumeric, labelVariants, parseDate, parsePhoneValueWithOptions, registerUiKitI18n, scrollToTop, sectionTagVariants, switchThumbVariants, switchVariants, tabsListVariants, tabsTriggerVariants, toCssSize, toastResponseError, toggleVariants, uiKitI18nResources, uiKitTranslations, useAbortController, useAccordionState, useCarouselContext, useClickEscape, useCombinedRef, useCopyToClipboard, useCountdown, useDebounce, useDebouncedFunction, useEvent, useHover, useIframeFocusTrapFallback, useIsFormTouched, useIsMobile, useIsMounted, useKeyDown, useLoadMore, useLockBodyScroll, useModalControls, useModalWithHistoryControls, useOutsideClick, usePagination, usePrevious, usePromisedModalControls, useRadioOptions, useResetAfterRequestStatus, useScreenResize, useScrollFrameIntoView, useScrollToTop, useScrollableArea, useSearchInput, useSidebar, useSidebarMenuButton, useSidebarSafe, useStickyStuck, useSwitchSectionActive, useTimeline, useTimeout, useTimeoutRef, useUpdateToast, useValidateDates };
|
package/dist/index.d.ts
CHANGED
|
@@ -3081,17 +3081,20 @@ type BaseSelectProps<T, V extends SelectValue$1, L extends ReactNode> = {
|
|
|
3081
3081
|
onMenuScrollToBottom?: (event: React$1.UIEvent<HTMLDivElement>) => void;
|
|
3082
3082
|
leftIcon?: React$1.ReactNode;
|
|
3083
3083
|
formatGroupLabel?: SelectFormatGroupLabel<T, V, L>;
|
|
3084
|
+
onReset?: () => void;
|
|
3084
3085
|
};
|
|
3085
3086
|
type SingleSelectProps<T, V extends SelectValue$1, L extends ReactNode> = BaseSelectProps<T, V, L> & {
|
|
3086
3087
|
isMulti?: false;
|
|
3087
3088
|
value?: SelectOption<T, V, L> | null;
|
|
3088
|
-
|
|
3089
|
+
defaultValue?: SelectOption<T, V, L> | null;
|
|
3090
|
+
onChange?: (option: SelectOption<T, V, L> | null, meta?: SelectChangeMeta) => void;
|
|
3089
3091
|
clearable?: boolean;
|
|
3090
3092
|
};
|
|
3091
3093
|
type MultiSelectModeProps<T, V extends SelectValue$1, L extends ReactNode> = BaseSelectProps<T, V, L> & {
|
|
3092
3094
|
isMulti: true;
|
|
3093
3095
|
value?: SelectOption<T, V, L>[] | null;
|
|
3094
|
-
|
|
3096
|
+
defaultValue?: SelectOption<T, V, L>[] | null;
|
|
3097
|
+
onChange?: (value: SelectOption<T, V, L>[], meta?: SelectChangeMeta) => void;
|
|
3095
3098
|
closeMenuOnSelect?: boolean;
|
|
3096
3099
|
};
|
|
3097
3100
|
type SelectProps<T = undefined, V extends SelectValue$1 = string, L extends ReactNode = string> = SingleSelectProps<T, V, L> | MultiSelectModeProps<T, V, L>;
|
|
@@ -3104,7 +3107,6 @@ type SearchingSelectTriggerRenderer = (isOpen: boolean, toggle: () => void) => R
|
|
|
3104
3107
|
type SearchingSelectBaseProps<T, V extends SelectValue$1, L extends ReactNode> = Omit<SingleSelectProps<T, V, L>, 'isMulti' | 'searchPosition' | 'components'> & {
|
|
3105
3108
|
trigger?: SearchingSelectTriggerRenderer;
|
|
3106
3109
|
components?: SelectComponents<T, V, L>;
|
|
3107
|
-
searchPlaceholder?: string;
|
|
3108
3110
|
/** Hide the in-menu search input (default: true). */
|
|
3109
3111
|
searchable?: boolean;
|
|
3110
3112
|
};
|
|
@@ -3246,12 +3248,12 @@ declare const Textarea: React$1.ForwardRefExoticComponent<Omit<React$1.TextareaH
|
|
|
3246
3248
|
autosize?: boolean;
|
|
3247
3249
|
} & React$1.RefAttributes<HTMLTextAreaElement>>;
|
|
3248
3250
|
|
|
3249
|
-
type
|
|
3251
|
+
type DatepickerDate = Date | null;
|
|
3250
3252
|
type DatepickerProps = {
|
|
3251
3253
|
label?: string;
|
|
3252
|
-
value?:
|
|
3253
|
-
defaultValue?:
|
|
3254
|
-
onChange?: (value:
|
|
3254
|
+
value?: DatepickerDate;
|
|
3255
|
+
defaultValue?: DatepickerDate;
|
|
3256
|
+
onChange?: (value: DatepickerDate, name?: string) => void;
|
|
3255
3257
|
name?: string;
|
|
3256
3258
|
invalid?: boolean;
|
|
3257
3259
|
error?: string;
|
|
@@ -4007,7 +4009,8 @@ type SelectRenderTriggerProps<T = undefined, V extends SelectValue = string, L e
|
|
|
4007
4009
|
type AirbnbSelectProps<T = undefined, V extends SelectValue = string, L extends string | number | React$1.ReactNode = string> = {
|
|
4008
4010
|
options?: SelectOption<T, V, L>[];
|
|
4009
4011
|
value?: SelectOption<T, V, L> | null;
|
|
4010
|
-
|
|
4012
|
+
defaultValue?: SelectOption<T, V, L> | null;
|
|
4013
|
+
onChange?: (option: SelectOption<T, V, L>) => void;
|
|
4011
4014
|
onBlur?: React$1.FocusEventHandler<HTMLButtonElement>;
|
|
4012
4015
|
label: string;
|
|
4013
4016
|
topLabel?: string;
|
|
@@ -4088,4 +4091,4 @@ interface AirbnbSwitchProps extends Omit<React$1.ComponentPropsWithoutRef<typeof
|
|
|
4088
4091
|
}
|
|
4089
4092
|
declare const AirbnbSwitch: React$1.ForwardRefExoticComponent<AirbnbSwitchProps & React$1.RefAttributes<HTMLButtonElement>>;
|
|
4090
4093
|
|
|
4091
|
-
export { ALERT_BOX_VARIANTS, Accordion, AccordionContent, type AccordionContentProps, AccordionItem, AccordionTrigger, type AccordionTriggerProps, AirbnbDatePicker, type AirbnbDatePickerProps, type AirbnbDatePickerValue, AirbnbFieldTrigger, type AirbnbFieldTriggerProps, AirbnbInput, type AirbnbInputProps, AirbnbPhoneField, type AirbnbPhoneFieldOption, type AirbnbPhoneFieldProps, type AirbnbPhoneFieldValue, AirbnbSearchInput, AirbnbSearchableSelect, type AirbnbSearchableSelectProps, type AirbnbSearchableSelectValue, AirbnbSelect, type AirbnbSelectProps, AirbnbSwitch, type AirbnbSwitchProps, Alert, AlertBox, type AlertBoxProps, type AlertBoxVariant, AlertDescription, AlertSize, AlertSizes, AlertTitle, AlertType, AlertTypes, AudioPlayer, type AudioPlayerProps, Avatar, type AvatarProps, Badge, type BadgeProps, BaseCheckbox, type BaseCheckboxProps, type BaseSelectProps, BetaBadge, type BetaBadgeProps, BookmarkTabsList, type BookmarkTabsListProps, BookmarkTabsTrigger, type BookmarkTabsTriggerProps, BoxOptionSelector, type BoxOptionSelectorProps, type BoxOptionSelectorSwitchProps, Breadcrumb, type BreadcrumbProps, type BreadcrumbType, Breadcrumbs, type BreadcrumbsProps, Button, ButtonGroup, type ButtonGroupProps, ButtonGroupText, type ButtonGroupTextProps, type ButtonProps, type ButtonStatuses, ButtonsGroupLabel, type ButtonsGroupLabelProps, Calendar, type CalendarProps, Card, CardContent, CardDescription, CardFooter, CardHeader, CardTitle, Carousel, CarouselNext, CarouselPrevious, type CarouselProps, CarouselRoot, type CarouselRootProps, CarouselSlide, CarouselTrack, CarouselViewport, CheckList, type CheckListProps, Checkbox, CheckboxDropdownGroup, type CheckboxDropdownGroupConfig, type CheckboxDropdownGroupProps, CheckboxDropdownMultiGroup, CheckboxGroup, type CheckboxGroupProps, type CheckboxOption, type CheckboxProps, type CheckboxSize, CircularLoader, Collapsible, CollapsibleContent, CollapsibleTrigger, CommingSoonBadge, type CommingSoonBadgeProps, ConfirmationDialog, type ConfirmationDialogProps, CopyIcon, type CopyIconProps, CopyLinkButton, type CopyLinkButtonProps, CopyString, type CopyStringProps, Counter, type CounterProps, CounterSize, CreatableMultiSelect, type CreatableMultiSelectProps, CreatableSelect, type CreatableSelectProps, CustomCheckboxDropdownGroup, type CustomIconEntry, DEFAULT_DISPLAY_FORMAT, DEVICE_BREAKPOINTS, DataTable, type DataTableProps, DateRangePicker, type DateRangePickerImperativeProps, type OpenDirection as DateRangePickerOpenDirection, type DateRangePickerProps, DateTableFilter, Datepicker, type DatepickerProps, type DatepickerValue, DebouncedSearchInput, type DebouncedSearchInputProps, DefaultSelectTrigger, type DefaultSelectTriggerProps, Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger, DialogVisuallyHidden, DividingSubsection, Drawer, DrawerClose, DrawerContent, DrawerDescription, DrawerFooter, DrawerHeader, DrawerOverlay, DrawerPortal, DrawerTitle, DrawerTrigger, DropdownButton, type DropdownButtonProps, DropdownMenu, DropdownMenuCheckboxItem, DropdownMenuContent, type DropdownMenuContentSide, DropdownMenuGroup, DropdownMenuItem, DropdownMenuItemContent, type DropdownMenuItemContentProps, DropdownMenuLabel, DropdownMenuPortal, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuTrigger, Empty, EmptyContent, EmptyDescription, EmptyHeader, EmptyMedia, EmptySectionPlaceholder, type EmptySectionPlaceholderProps, EmptyTitle, ErrorMessage, type ErrorMessageProps, ExpandableContent, type ExpandableContentProps, type ExpandableContentTrigger, ExternalLink, type ExternalLinkProps, FieldErrorMessage, type FieldErrorMessageProps, FileInput, FileInputButton, type FileInputButtonProps, type FileInputProps, type FileInputValue, FormBox, Content as FormBoxContent, type FormBoxContentProps, Header as FormBoxHeader, type FormBoxHeaderProps, Root$1 as FormBoxRoot, type FormBoxRootProps, SubHeader as FormBoxSubHeader, type FormBoxSubHeaderProps, FramedIcon, type FramedIconProps, FreeTextField, type FreeTextFieldProps, HALO_ICON_STATUS, HaloIcon, type HaloIconProps, HelpTooltip, type HelpTooltipProps, IconButton, type IconButtonProps, type IconEntry, IconsDropdown, type IconsDropdownProps, Image, ImageFullScreenView, type ImageFullScreenViewProps, type ImageProps, InfiniteScrollMultiSelect, type InfiniteScrollMultiSelectProps, InfiniteScrollSelect, type InfiniteScrollSelectProps, InfoBox, type InfoBoxProps, Input, InputOTP, InputOTPGroup, type InputOTPProps, InputOTPSeparator, InputOTPSlot, type InputProps, Label, type LabelProps, LargeModal, type LargeModalProps, LearnMoreButton, type LearnMoreButtonProps, LegacyInfinitySelect, type LegacyInfinitySelectProps, LegacyInput, type LegacyInputProps, LegacyMultiSelect, type LegacyMultiSelectProps, LegacySelect, LegacySelectContent, LegacySelectGroup, LegacySelectItem, LegacySelectLabel, LegacySelectPortal, type LegacySelectProps, LegacySelectRoot, LegacySelectScrollDownButton, LegacySelectScrollUpButton, LegacySelectSeparator, type LegacySelectSize, LegacySelectTrigger, LegacySelectValue, LegacyTextarea, type LegacyTextareaProps, Link, type LinkProps, LoadingBar, type LoadingBarProps, type LucideIconEntry, type MobileCameraProps, type MobileScreenshotPayload, MobileWebcam, Modal, ModalButton, ModalLoader, type ModalLoaderProps, type ModalProps, MultiSelect, type MultiSelectProps, NumberedList, type NumberedListProps, type OptionsCardsProps, OverlayLoader, type OverlayLoaderProps, Pagination, type PaginationProps, type PaginationVariant, PhoneInput, type PhoneInputOption, type PhoneInputProps, type PhoneInputValue, Popover, PopoverAnchor, PopoverClose, PopoverContent, PopoverPortal, PopoverTrigger, PopoverWithTooltip, type PopoverWithTooltipProps, Radio, type RadioCardOption, MemoizedRadioCardsGroup as RadioCardsGroup, RadioGroup, RadioGroupItem, type RadioGroupItemProps, type RadioOption, type RadioProps, type RadioSize, RadioWithBorder, RatingProgress, type RatingProgressProps, RatingRadioGroup, type RatingRadioGroupProps, RatingStars, type RatingStarsProps, type RegisterUiKitI18nOptions, ResponsiveDropdown, type ResponsiveDropdownOption, type ResponsiveDropdownProps, ResponsiveSheet, type ResponsiveSheetProps, RotateArrow, type RotateArrowProps, ScrollArea, type ScrollAreaProps, ScrollBar, type ScrollBarProps, type ScrollableAreaState, SearchButton, type SearchButtonProps, SearchInput, type SearchInputProps, SearchingSelect, type SearchingSelectProps, type SearchingSelectTriggerRenderer, Section, SectionGroup, type SectionGroupItemProps, type SectionGroupLabelProps, type SectionGroupProps, type SectionProps, SectionTag, SectionTagColors, type SectionTagProps, Select, SelectAllRow, type SelectAllRowProps, SelectCheckboxOption, SelectCheckboxes, type SelectCheckboxesProps, type SelectCheckboxesTriggerRenderer, type SelectFormatGroupLabel, type SelectGroupedOption, SelectIconsBox, type SelectIconsBoxProps, type MultiSelectModeProps as SelectMultiProps, type SelectOption, type SelectOptionGroup, type SelectProps, type SelectorOption, Separator, type SeparatorProps, Sheet, SheetClose, SheetContent, SheetDescription, SheetFooter, SheetHeader, SheetTitle, SheetTrigger, Sidebar, SidebarContent, SidebarFooter, SidebarGroup, SidebarGroupAction, SidebarGroupContent, SidebarGroupLabel, SidebarHeader, SidebarIcon, SidebarInput, SidebarInset, SidebarMenu, SidebarMenuAction, SidebarMenuBadge, SidebarMenuButton, SidebarMenuItem, SidebarMenuSkeleton, SidebarMenuSub, SidebarMenuSubButton, SidebarMenuSubItem, SidebarProvider, SidebarRail, SidebarSeparator, SidebarTrigger, SignatureCanvas, type SignatureCanvasRef, type SingleSelectProps, Skeleton, type SkeletonProps, Slider, SmallGridSingleItem, type SmallGridSingleItemProps, SortingAction, type SortingActionProps, type SortingActionValue, type SortingByVariant, StatusBadge, type StatusBadgeProps, type StatusBadgeVariant, StatusBox, type StatusBoxProps, StatusButton, type StatusButtonProps, Stepper, type StepperProps, SubSection, SubSectionSize, SvgIcon, type SvgIconProps, type SvgIconSize, Switch, SwitchBlocks, type SwitchBlocksOption, type SwitchBlocksProps, SwitchGroup, type SwitchGroupProps, type SwitchOption, type SwitchProps, TabbedSection, type TabbedSectionProps, Table, TableBody, TableCaption, TableCell, TableFilter, type TableFilterProps, TableFooter, TableHead, TableHeader, TableLoader, type TableLoaderProps, type TableLoaderRootProps, TablePlaceholder, type TablePlaceholderProps, TableRow, Tabs, TabsContent, TabsList, type TabsListProps, TabsTrigger, type TabsTriggerProps, Textarea, type TextareaProps, ThreeDotsLoader, type ThreeDotsLoaderProps, TimePicker, type TimePickerFormat, type TimePickerProps, type TimeSettings, Timeline, TimelineConnector, type TimelineConnectorProps, TimelineContent, type TimelineContentProps, type TimelineContextProps, TimelineDescription, type TimelineDescriptionProps, TimelineDot, type TimelineDotProps, TimelineItem, type TimelineItemProps, type TimelineProps, TimelineSeparator, type TimelineSeparatorProps, TimelineTitle, type TimelineTitleProps, ToggleGroup, ToggleGroupItem, Toggles, type TogglesForwardType, type TogglesProps, Tooltip, TooltipContent, type TooltipContentProps, type TooltipProps, TooltipProvider, TooltipRoot, type TooltipRootProps, TooltipRootWrapper, TooltipTrigger, UI_KIT_I18N_NAMESPACE, type UiKitLocale, UploadedFilesList, type UploadedFilesListProps, type UseScrollableAreaOptions, type UseScrollableAreaResult, VerticalTabs, type VerticalTabsProps, type VerticalTabsStep, type VideoConstraints, VideoModal, type VideoModalProps, VideoPlayer, type VideoPlayerProps, Webcam, type WebcamProps, type WebcamRefTypes, WideButton, type WideButtonProps, addSupportEmailToMessage, badgeVariants, bookmarkTabsListVariants, bookmarkTabsTriggerVariants, buttonGroupVariants, buttonVariants, calendarClassNames, clearPhoneNumber, cn, compressFile, compressImage, copyToClipboard, createDisabledMatchers, emptyMediaVariants, findPhoneCode, findPhoneCodeOption, formatDate, formatPhoneCodeOptionLabel, getErrorMessage, getFileSizeMB, getScrollableAreaState, getSidebarState, isDayBlocked, isNumeric, labelVariants, parseDate, parsePhoneValueWithOptions, registerUiKitI18n, scrollToTop, sectionTagVariants, switchThumbVariants, switchVariants, tabsListVariants, tabsTriggerVariants, toCssSize, toastResponseError, toggleVariants, uiKitI18nResources, uiKitTranslations, useAbortController, useAccordionState, useCarouselContext, useClickEscape, useCombinedRef, useCopyToClipboard, useCountdown, useDebounce, useDebouncedFunction, useEvent, useHover, useIframeFocusTrapFallback, useIsFormTouched, useIsMobile, useIsMounted, useKeyDown, useLoadMore, useLockBodyScroll, useModalControls, useModalWithHistoryControls, useOutsideClick, usePagination, usePrevious, usePromisedModalControls, useRadioOptions, useResetAfterRequestStatus, useScreenResize, useScrollFrameIntoView, useScrollToTop, useScrollableArea, useSearchInput, useSidebar, useSidebarMenuButton, useSidebarSafe, useStickyStuck, useSwitchSectionActive, useTimeline, useTimeout, useTimeoutRef, useUpdateToast, useValidateDates };
|
|
4094
|
+
export { ALERT_BOX_VARIANTS, Accordion, AccordionContent, type AccordionContentProps, AccordionItem, AccordionTrigger, type AccordionTriggerProps, AirbnbDatePicker, type AirbnbDatePickerProps, type AirbnbDatePickerValue, AirbnbFieldTrigger, type AirbnbFieldTriggerProps, AirbnbInput, type AirbnbInputProps, AirbnbPhoneField, type AirbnbPhoneFieldOption, type AirbnbPhoneFieldProps, type AirbnbPhoneFieldValue, AirbnbSearchInput, AirbnbSearchableSelect, type AirbnbSearchableSelectProps, type AirbnbSearchableSelectValue, AirbnbSelect, type AirbnbSelectProps, AirbnbSwitch, type AirbnbSwitchProps, Alert, AlertBox, type AlertBoxProps, type AlertBoxVariant, AlertDescription, AlertSize, AlertSizes, AlertTitle, AlertType, AlertTypes, AudioPlayer, type AudioPlayerProps, Avatar, type AvatarProps, Badge, type BadgeProps, BaseCheckbox, type BaseCheckboxProps, type BaseSelectProps, BetaBadge, type BetaBadgeProps, BookmarkTabsList, type BookmarkTabsListProps, BookmarkTabsTrigger, type BookmarkTabsTriggerProps, BoxOptionSelector, type BoxOptionSelectorProps, type BoxOptionSelectorSwitchProps, Breadcrumb, type BreadcrumbProps, type BreadcrumbType, Breadcrumbs, type BreadcrumbsProps, Button, ButtonGroup, type ButtonGroupProps, ButtonGroupText, type ButtonGroupTextProps, type ButtonProps, type ButtonStatuses, ButtonsGroupLabel, type ButtonsGroupLabelProps, Calendar, type CalendarProps, Card, CardContent, CardDescription, CardFooter, CardHeader, CardTitle, Carousel, CarouselNext, CarouselPrevious, type CarouselProps, CarouselRoot, type CarouselRootProps, CarouselSlide, CarouselTrack, CarouselViewport, CheckList, type CheckListProps, Checkbox, CheckboxDropdownGroup, type CheckboxDropdownGroupConfig, type CheckboxDropdownGroupProps, CheckboxDropdownMultiGroup, CheckboxGroup, type CheckboxGroupProps, type CheckboxOption, type CheckboxProps, type CheckboxSize, CircularLoader, Collapsible, CollapsibleContent, CollapsibleTrigger, CommingSoonBadge, type CommingSoonBadgeProps, ConfirmationDialog, type ConfirmationDialogProps, CopyIcon, type CopyIconProps, CopyLinkButton, type CopyLinkButtonProps, CopyString, type CopyStringProps, Counter, type CounterProps, CounterSize, CreatableMultiSelect, type CreatableMultiSelectProps, CreatableSelect, type CreatableSelectProps, CustomCheckboxDropdownGroup, type CustomIconEntry, DEFAULT_DISPLAY_FORMAT, DEVICE_BREAKPOINTS, DataTable, type DataTableProps, DateRangePicker, type DateRangePickerImperativeProps, type OpenDirection as DateRangePickerOpenDirection, type DateRangePickerProps, DateTableFilter, Datepicker, type DatepickerDate, type DatepickerProps, DebouncedSearchInput, type DebouncedSearchInputProps, DefaultSelectTrigger, type DefaultSelectTriggerProps, Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger, DialogVisuallyHidden, DividingSubsection, Drawer, DrawerClose, DrawerContent, DrawerDescription, DrawerFooter, DrawerHeader, DrawerOverlay, DrawerPortal, DrawerTitle, DrawerTrigger, DropdownButton, type DropdownButtonProps, DropdownMenu, DropdownMenuCheckboxItem, DropdownMenuContent, type DropdownMenuContentSide, DropdownMenuGroup, DropdownMenuItem, DropdownMenuItemContent, type DropdownMenuItemContentProps, DropdownMenuLabel, DropdownMenuPortal, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuTrigger, Empty, EmptyContent, EmptyDescription, EmptyHeader, EmptyMedia, EmptySectionPlaceholder, type EmptySectionPlaceholderProps, EmptyTitle, ErrorMessage, type ErrorMessageProps, ExpandableContent, type ExpandableContentProps, type ExpandableContentTrigger, ExternalLink, type ExternalLinkProps, FieldErrorMessage, type FieldErrorMessageProps, FileInput, FileInputButton, type FileInputButtonProps, type FileInputProps, type FileInputValue, FormBox, Content as FormBoxContent, type FormBoxContentProps, Header as FormBoxHeader, type FormBoxHeaderProps, Root$1 as FormBoxRoot, type FormBoxRootProps, SubHeader as FormBoxSubHeader, type FormBoxSubHeaderProps, FramedIcon, type FramedIconProps, FreeTextField, type FreeTextFieldProps, HALO_ICON_STATUS, HaloIcon, type HaloIconProps, HelpTooltip, type HelpTooltipProps, IconButton, type IconButtonProps, type IconEntry, IconsDropdown, type IconsDropdownProps, Image, ImageFullScreenView, type ImageFullScreenViewProps, type ImageProps, InfiniteScrollMultiSelect, type InfiniteScrollMultiSelectProps, InfiniteScrollSelect, type InfiniteScrollSelectProps, InfoBox, type InfoBoxProps, Input, InputOTP, InputOTPGroup, type InputOTPProps, InputOTPSeparator, InputOTPSlot, type InputProps, Label, type LabelProps, LargeModal, type LargeModalProps, LearnMoreButton, type LearnMoreButtonProps, LegacyInfinitySelect, type LegacyInfinitySelectProps, LegacyInput, type LegacyInputProps, LegacyMultiSelect, type LegacyMultiSelectProps, LegacySelect, LegacySelectContent, LegacySelectGroup, LegacySelectItem, LegacySelectLabel, LegacySelectPortal, type LegacySelectProps, LegacySelectRoot, LegacySelectScrollDownButton, LegacySelectScrollUpButton, LegacySelectSeparator, type LegacySelectSize, LegacySelectTrigger, LegacySelectValue, LegacyTextarea, type LegacyTextareaProps, Link, type LinkProps, LoadingBar, type LoadingBarProps, type LucideIconEntry, type MobileCameraProps, type MobileScreenshotPayload, MobileWebcam, Modal, ModalButton, ModalLoader, type ModalLoaderProps, type ModalProps, MultiSelect, type MultiSelectProps, NumberedList, type NumberedListProps, type OptionsCardsProps, OverlayLoader, type OverlayLoaderProps, Pagination, type PaginationProps, type PaginationVariant, PhoneInput, type PhoneInputOption, type PhoneInputProps, type PhoneInputValue, Popover, PopoverAnchor, PopoverClose, PopoverContent, PopoverPortal, PopoverTrigger, PopoverWithTooltip, type PopoverWithTooltipProps, Radio, type RadioCardOption, MemoizedRadioCardsGroup as RadioCardsGroup, RadioGroup, RadioGroupItem, type RadioGroupItemProps, type RadioOption, type RadioProps, type RadioSize, RadioWithBorder, RatingProgress, type RatingProgressProps, RatingRadioGroup, type RatingRadioGroupProps, RatingStars, type RatingStarsProps, type RegisterUiKitI18nOptions, ResponsiveDropdown, type ResponsiveDropdownOption, type ResponsiveDropdownProps, ResponsiveSheet, type ResponsiveSheetProps, RotateArrow, type RotateArrowProps, ScrollArea, type ScrollAreaProps, ScrollBar, type ScrollBarProps, type ScrollableAreaState, SearchButton, type SearchButtonProps, SearchInput, type SearchInputProps, SearchingSelect, type SearchingSelectProps, type SearchingSelectTriggerRenderer, Section, SectionGroup, type SectionGroupItemProps, type SectionGroupLabelProps, type SectionGroupProps, type SectionProps, SectionTag, SectionTagColors, type SectionTagProps, Select, SelectAllRow, type SelectAllRowProps, SelectCheckboxOption, SelectCheckboxes, type SelectCheckboxesProps, type SelectCheckboxesTriggerRenderer, type SelectFormatGroupLabel, type SelectGroupedOption, SelectIconsBox, type SelectIconsBoxProps, type MultiSelectModeProps as SelectMultiProps, type SelectOption, type SelectOptionGroup, type SelectProps, type SelectorOption, Separator, type SeparatorProps, Sheet, SheetClose, SheetContent, SheetDescription, SheetFooter, SheetHeader, SheetTitle, SheetTrigger, Sidebar, SidebarContent, SidebarFooter, SidebarGroup, SidebarGroupAction, SidebarGroupContent, SidebarGroupLabel, SidebarHeader, SidebarIcon, SidebarInput, SidebarInset, SidebarMenu, SidebarMenuAction, SidebarMenuBadge, SidebarMenuButton, SidebarMenuItem, SidebarMenuSkeleton, SidebarMenuSub, SidebarMenuSubButton, SidebarMenuSubItem, SidebarProvider, SidebarRail, SidebarSeparator, SidebarTrigger, SignatureCanvas, type SignatureCanvasRef, type SingleSelectProps, Skeleton, type SkeletonProps, Slider, SmallGridSingleItem, type SmallGridSingleItemProps, SortingAction, type SortingActionProps, type SortingActionValue, type SortingByVariant, StatusBadge, type StatusBadgeProps, type StatusBadgeVariant, StatusBox, type StatusBoxProps, StatusButton, type StatusButtonProps, Stepper, type StepperProps, SubSection, SubSectionSize, SvgIcon, type SvgIconProps, type SvgIconSize, Switch, SwitchBlocks, type SwitchBlocksOption, type SwitchBlocksProps, SwitchGroup, type SwitchGroupProps, type SwitchOption, type SwitchProps, TabbedSection, type TabbedSectionProps, Table, TableBody, TableCaption, TableCell, TableFilter, type TableFilterProps, TableFooter, TableHead, TableHeader, TableLoader, type TableLoaderProps, type TableLoaderRootProps, TablePlaceholder, type TablePlaceholderProps, TableRow, Tabs, TabsContent, TabsList, type TabsListProps, TabsTrigger, type TabsTriggerProps, Textarea, type TextareaProps, ThreeDotsLoader, type ThreeDotsLoaderProps, TimePicker, type TimePickerFormat, type TimePickerProps, type TimeSettings, Timeline, TimelineConnector, type TimelineConnectorProps, TimelineContent, type TimelineContentProps, type TimelineContextProps, TimelineDescription, type TimelineDescriptionProps, TimelineDot, type TimelineDotProps, TimelineItem, type TimelineItemProps, type TimelineProps, TimelineSeparator, type TimelineSeparatorProps, TimelineTitle, type TimelineTitleProps, ToggleGroup, ToggleGroupItem, Toggles, type TogglesForwardType, type TogglesProps, Tooltip, TooltipContent, type TooltipContentProps, type TooltipProps, TooltipProvider, TooltipRoot, type TooltipRootProps, TooltipRootWrapper, TooltipTrigger, UI_KIT_I18N_NAMESPACE, type UiKitLocale, UploadedFilesList, type UploadedFilesListProps, type UseScrollableAreaOptions, type UseScrollableAreaResult, VerticalTabs, type VerticalTabsProps, type VerticalTabsStep, type VideoConstraints, VideoModal, type VideoModalProps, VideoPlayer, type VideoPlayerProps, Webcam, type WebcamProps, type WebcamRefTypes, WideButton, type WideButtonProps, addSupportEmailToMessage, badgeVariants, bookmarkTabsListVariants, bookmarkTabsTriggerVariants, buttonGroupVariants, buttonVariants, calendarClassNames, clearPhoneNumber, cn, compressFile, compressImage, copyToClipboard, createDisabledMatchers, emptyMediaVariants, findPhoneCode, findPhoneCodeOption, formatDate, formatPhoneCodeOptionLabel, getErrorMessage, getFileSizeMB, getScrollableAreaState, getSidebarState, isDayBlocked, isNumeric, labelVariants, parseDate, parsePhoneValueWithOptions, registerUiKitI18n, scrollToTop, sectionTagVariants, switchThumbVariants, switchVariants, tabsListVariants, tabsTriggerVariants, toCssSize, toastResponseError, toggleVariants, uiKitI18nResources, uiKitTranslations, useAbortController, useAccordionState, useCarouselContext, useClickEscape, useCombinedRef, useCopyToClipboard, useCountdown, useDebounce, useDebouncedFunction, useEvent, useHover, useIframeFocusTrapFallback, useIsFormTouched, useIsMobile, useIsMounted, useKeyDown, useLoadMore, useLockBodyScroll, useModalControls, useModalWithHistoryControls, useOutsideClick, usePagination, usePrevious, usePromisedModalControls, useRadioOptions, useResetAfterRequestStatus, useScreenResize, useScrollFrameIntoView, useScrollToTop, useScrollableArea, useSearchInput, useSidebar, useSidebarMenuButton, useSidebarSafe, useStickyStuck, useSwitchSectionActive, useTimeline, useTimeout, useTimeoutRef, useUpdateToast, useValidateDates };
|
package/dist/index.js
CHANGED
|
@@ -13842,26 +13842,36 @@ function SelectInternal(props, ref) {
|
|
|
13842
13842
|
menuHeader,
|
|
13843
13843
|
onMenuScrollToBottom,
|
|
13844
13844
|
leftIcon,
|
|
13845
|
-
formatGroupLabel
|
|
13845
|
+
formatGroupLabel,
|
|
13846
|
+
onReset
|
|
13846
13847
|
} = props;
|
|
13847
13848
|
const isSearchInDropdown = searchPosition === "dropdown";
|
|
13848
13849
|
const isMulti = props.isMulti === true;
|
|
13849
13850
|
const clearable = !isMulti ? props.clearable ?? true : true;
|
|
13850
13851
|
const closeMenuOnSelect = isMulti ? props.closeMenuOnSelect ?? false : void 0;
|
|
13851
13852
|
const { t } = useTranslation33();
|
|
13853
|
+
const isControlled = props.value !== void 0;
|
|
13854
|
+
const [internalValue, setInternalValue] = React49.useState(() => {
|
|
13855
|
+
if (isMulti) return props.defaultValue ?? [];
|
|
13856
|
+
return props.defaultValue ?? null;
|
|
13857
|
+
});
|
|
13858
|
+
const currentValue = isControlled ? props.value : internalValue;
|
|
13852
13859
|
const selectedOptions = React49.useMemo(() => {
|
|
13853
|
-
if (isMulti) return
|
|
13854
|
-
return
|
|
13855
|
-
}, [isMulti,
|
|
13860
|
+
if (isMulti) return currentValue ?? [];
|
|
13861
|
+
return currentValue ? [currentValue] : [];
|
|
13862
|
+
}, [isMulti, currentValue]);
|
|
13856
13863
|
const onSelectionChange = React49.useCallback(
|
|
13857
13864
|
(next, meta) => {
|
|
13858
13865
|
if (isMulti) {
|
|
13859
|
-
|
|
13866
|
+
if (!isControlled) setInternalValue(next);
|
|
13867
|
+
props.onChange?.(next, meta);
|
|
13860
13868
|
} else {
|
|
13861
|
-
|
|
13869
|
+
const nextValue = next[0] ?? null;
|
|
13870
|
+
if (!isControlled) setInternalValue(nextValue);
|
|
13871
|
+
props.onChange?.(nextValue, meta);
|
|
13862
13872
|
}
|
|
13863
13873
|
},
|
|
13864
|
-
[isMulti, props.onChange]
|
|
13874
|
+
[isMulti, isControlled, props.onChange]
|
|
13865
13875
|
);
|
|
13866
13876
|
const flatOptions = React49.useMemo(() => flattenGroupedOptions(options), [options]);
|
|
13867
13877
|
const state = useSelectState({
|
|
@@ -13909,7 +13919,10 @@ function SelectInternal(props, ref) {
|
|
|
13909
13919
|
const resolvedLabel = label ?? placeholder;
|
|
13910
13920
|
const hasInvalidState = state.hasInvalidState || Boolean(invalid);
|
|
13911
13921
|
const hiddenValue = isMulti ? selectedOptions.map((item) => String(item.value)).join(",") : selectedOptions[0] ? String(selectedOptions[0].value) : "";
|
|
13912
|
-
const handleClear = (event) =>
|
|
13922
|
+
const handleClear = (event) => {
|
|
13923
|
+
state.clearSelection(event);
|
|
13924
|
+
onReset?.();
|
|
13925
|
+
};
|
|
13913
13926
|
const { Control, MenuList, CreateOption } = components;
|
|
13914
13927
|
return /* @__PURE__ */ jsxs99(
|
|
13915
13928
|
SelectFieldShell,
|
|
@@ -14141,7 +14154,14 @@ function VirtualMenuList(props) {
|
|
|
14141
14154
|
if (lastLoadMoreOptionsLengthRef.current === options.length) return;
|
|
14142
14155
|
lastLoadMoreOptionsLengthRef.current = options.length;
|
|
14143
14156
|
loadMoreItems();
|
|
14144
|
-
}, [
|
|
14157
|
+
}, [
|
|
14158
|
+
virtualItems,
|
|
14159
|
+
options.length,
|
|
14160
|
+
canLoadMore,
|
|
14161
|
+
isLoadingMore,
|
|
14162
|
+
loadMoreItems,
|
|
14163
|
+
loadMoreThreshold
|
|
14164
|
+
]);
|
|
14145
14165
|
React51.useEffect(() => {
|
|
14146
14166
|
const changed = previousHighlightedIndexRef.current !== highlightedIndex;
|
|
14147
14167
|
previousHighlightedIndexRef.current = highlightedIndex;
|
|
@@ -14317,14 +14337,7 @@ function InfiniteScrollSelectInternal(props, ref) {
|
|
|
14317
14337
|
if (synthetic) list = [synthetic, ...list];
|
|
14318
14338
|
}
|
|
14319
14339
|
return list;
|
|
14320
|
-
}, [
|
|
14321
|
-
rawOptions,
|
|
14322
|
-
inputValue,
|
|
14323
|
-
filterOption,
|
|
14324
|
-
getFullSearchOption,
|
|
14325
|
-
rest.getValueLabel,
|
|
14326
|
-
props
|
|
14327
|
-
]);
|
|
14340
|
+
}, [rawOptions, inputValue, filterOption, getFullSearchOption, props, rest]);
|
|
14328
14341
|
const contextValue = React52.useMemo(
|
|
14329
14342
|
() => ({
|
|
14330
14343
|
canLoadMore,
|
|
@@ -14388,13 +14401,7 @@ function hasPaginationProps(props) {
|
|
|
14388
14401
|
return props.canLoadMore !== void 0 || props.isLoadingMore !== void 0 || props.loadMoreItems !== void 0 || props.onSearchChange !== void 0 || props.getFullSearchOption !== void 0;
|
|
14389
14402
|
}
|
|
14390
14403
|
function SearchingSelectInternal(props, ref) {
|
|
14391
|
-
const {
|
|
14392
|
-
trigger,
|
|
14393
|
-
components: userComponents,
|
|
14394
|
-
searchPlaceholder,
|
|
14395
|
-
searchable = true,
|
|
14396
|
-
...rest
|
|
14397
|
-
} = props;
|
|
14404
|
+
const { trigger, components: userComponents, searchable = true, ...rest } = props;
|
|
14398
14405
|
const Control = React53.useMemo(() => {
|
|
14399
14406
|
if (trigger) return makeTriggerSlot(trigger);
|
|
14400
14407
|
return StaticControl;
|
|
@@ -14844,6 +14851,7 @@ function SelectCheckboxesInternal(props, ref) {
|
|
|
14844
14851
|
const {
|
|
14845
14852
|
options: rawOptions = [],
|
|
14846
14853
|
value,
|
|
14854
|
+
defaultValue,
|
|
14847
14855
|
onChange,
|
|
14848
14856
|
trigger,
|
|
14849
14857
|
components: userComponents,
|
|
@@ -14861,7 +14869,19 @@ function SelectCheckboxesInternal(props, ref) {
|
|
|
14861
14869
|
paginationAndRest
|
|
14862
14870
|
);
|
|
14863
14871
|
const [inputValue, setInputValue] = React59.useState("");
|
|
14864
|
-
const
|
|
14872
|
+
const isControlled = value !== void 0;
|
|
14873
|
+
const [internalValue, setInternalValue] = React59.useState(
|
|
14874
|
+
() => defaultValue ?? []
|
|
14875
|
+
);
|
|
14876
|
+
const currentValue = isControlled ? value : internalValue;
|
|
14877
|
+
const selected = React59.useMemo(() => currentValue ?? [], [currentValue]);
|
|
14878
|
+
const handleChange = React59.useCallback(
|
|
14879
|
+
(next, meta) => {
|
|
14880
|
+
if (!isControlled) setInternalValue(next);
|
|
14881
|
+
onChange?.(next, meta);
|
|
14882
|
+
},
|
|
14883
|
+
[isControlled, onChange]
|
|
14884
|
+
);
|
|
14865
14885
|
const flatRawOptions = React59.useMemo(
|
|
14866
14886
|
() => flattenGroupedOptions(rawOptions),
|
|
14867
14887
|
[rawOptions]
|
|
@@ -14888,7 +14908,7 @@ function SelectCheckboxesInternal(props, ref) {
|
|
|
14888
14908
|
const handleToggleAll = React59.useCallback(() => {
|
|
14889
14909
|
if (allVisibleSelected) {
|
|
14890
14910
|
const visibleValues = new Set(filteredFlat.map((option) => option.value));
|
|
14891
|
-
|
|
14911
|
+
handleChange(
|
|
14892
14912
|
selected.filter((s) => !visibleValues.has(s.value)),
|
|
14893
14913
|
{ action: "deselect" }
|
|
14894
14914
|
);
|
|
@@ -14898,8 +14918,8 @@ function SelectCheckboxesInternal(props, ref) {
|
|
|
14898
14918
|
for (const option of filteredFlat) {
|
|
14899
14919
|
if (!merged.some((s) => s.value === option.value)) merged.push(option);
|
|
14900
14920
|
}
|
|
14901
|
-
|
|
14902
|
-
}, [allVisibleSelected, filteredFlat,
|
|
14921
|
+
handleChange(merged, { action: "select" });
|
|
14922
|
+
}, [allVisibleSelected, filteredFlat, handleChange, selected]);
|
|
14903
14923
|
const Control = React59.useMemo(() => {
|
|
14904
14924
|
if (trigger) return makeTriggerSlot2(trigger);
|
|
14905
14925
|
return createCountTrigger({
|
|
@@ -14932,8 +14952,8 @@ function SelectCheckboxesInternal(props, ref) {
|
|
|
14932
14952
|
);
|
|
14933
14953
|
const baseSharedProps = {
|
|
14934
14954
|
...paginationAndRest,
|
|
14935
|
-
value,
|
|
14936
|
-
onChange,
|
|
14955
|
+
value: currentValue,
|
|
14956
|
+
onChange: handleChange,
|
|
14937
14957
|
filterOption: passthroughFilter2,
|
|
14938
14958
|
components,
|
|
14939
14959
|
closeMenuOnSelect,
|
|
@@ -15931,7 +15951,7 @@ var Datepicker = React63.forwardRef(
|
|
|
15931
15951
|
React63.useImperativeHandle(
|
|
15932
15952
|
ref,
|
|
15933
15953
|
() => dayInputRef.current ?? mobileTriggerRef.current,
|
|
15934
|
-
[
|
|
15954
|
+
[]
|
|
15935
15955
|
);
|
|
15936
15956
|
React63.useEffect(() => {
|
|
15937
15957
|
if (!isControlled) return;
|
|
@@ -18669,7 +18689,7 @@ function useDesktopSelect({
|
|
|
18669
18689
|
const handleSelect = React76.useCallback(
|
|
18670
18690
|
(option) => {
|
|
18671
18691
|
if (option.isDisabled || disabled) return;
|
|
18672
|
-
onChange(option);
|
|
18692
|
+
onChange?.(option);
|
|
18673
18693
|
},
|
|
18674
18694
|
[disabled, onChange]
|
|
18675
18695
|
);
|
|
@@ -18747,7 +18767,7 @@ function useDesktopSelect({
|
|
|
18747
18767
|
event.preventDefault();
|
|
18748
18768
|
const option = options[highlightedIndex];
|
|
18749
18769
|
if (option && !option.isDisabled) {
|
|
18750
|
-
onChange(option);
|
|
18770
|
+
onChange?.(option);
|
|
18751
18771
|
onClose();
|
|
18752
18772
|
focusTrigger();
|
|
18753
18773
|
}
|
|
@@ -19076,7 +19096,7 @@ var AirbnbSelect = React79.forwardRef(function AirbnbSelect2({
|
|
|
19076
19096
|
}
|
|
19077
19097
|
const validOption = filteredOptions.find((option) => option.value === value.value);
|
|
19078
19098
|
if (validOption) {
|
|
19079
|
-
onChange(validOption);
|
|
19099
|
+
onChange?.(validOption);
|
|
19080
19100
|
}
|
|
19081
19101
|
},
|
|
19082
19102
|
[onChange, filteredOptions, value]
|
|
@@ -19096,7 +19116,7 @@ var AirbnbSelect = React79.forwardRef(function AirbnbSelect2({
|
|
|
19096
19116
|
if (isBlocked) return;
|
|
19097
19117
|
const finalOption = pendingValue;
|
|
19098
19118
|
if (finalOption && finalOption.value !== value?.value) {
|
|
19099
|
-
onChange(finalOption);
|
|
19119
|
+
onChange?.(finalOption);
|
|
19100
19120
|
}
|
|
19101
19121
|
setIsOpen(false);
|
|
19102
19122
|
focusTrigger();
|