@chekinapp/ui 0.0.30 → 0.0.32
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 +40 -13
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +11 -2
- package/dist/index.d.ts +11 -2
- package/dist/index.js +39 -13
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.d.cts
CHANGED
|
@@ -2528,6 +2528,7 @@ declare const SearchableSelect: SearchableSelectComponent;
|
|
|
2528
2528
|
|
|
2529
2529
|
declare function copyToClipboard(value: string | number): void;
|
|
2530
2530
|
|
|
2531
|
+
declare const isNumeric: (n: string | number) => boolean;
|
|
2531
2532
|
declare function toCssSize(size?: string | number): string | undefined;
|
|
2532
2533
|
|
|
2533
2534
|
declare function useScrollToTop(): void;
|
|
@@ -2564,7 +2565,15 @@ declare function useModalControls(initState?: boolean, { disabled }?: {
|
|
|
2564
2565
|
setIsOpen: React$1.Dispatch<React$1.SetStateAction<boolean>>;
|
|
2565
2566
|
};
|
|
2566
2567
|
|
|
2567
|
-
|
|
2568
|
+
type OutsideClickHandler = (event: Event) => void;
|
|
2569
|
+
type UseOutsideClickProps<T extends Element> = {
|
|
2570
|
+
elementRef: RefObject<T> | null;
|
|
2571
|
+
onOutsideClick: OutsideClickHandler | null;
|
|
2572
|
+
triggerRef?: RefObject<Element> | null;
|
|
2573
|
+
isDisabled?: boolean;
|
|
2574
|
+
nested?: string[] | string;
|
|
2575
|
+
};
|
|
2576
|
+
declare function useOutsideClick<T extends Element>({ elementRef, onOutsideClick, triggerRef, isDisabled, nested, }: UseOutsideClickProps<T>): void;
|
|
2568
2577
|
|
|
2569
2578
|
declare function useScreenResize(maxWidth: string): {
|
|
2570
2579
|
isMatch: boolean;
|
|
@@ -2687,4 +2696,4 @@ declare function useIsFormTouched({ watch, displayFields, debug, defaultValues,
|
|
|
2687
2696
|
|
|
2688
2697
|
declare function cn(...inputs: ClassValue[]): string;
|
|
2689
2698
|
|
|
2690
|
-
export { Accordion, AccordionContent, type AccordionContentProps, AccordionItem, AccordionTrigger, type AccordionTriggerProps, AirbnbInput, type AirbnbInputProps, AirbnbSearchInput, AirbnbSelect, type AirbnbSelectProps, AlertBox, type AlertBoxProps, AlertSize, AlertSizes, AlertType, AlertTypes, AudioPlayer, type AudioPlayerProps, Avatar, type AvatarProps, Badge, type BadgeProps, BaseCheckbox, type BaseCheckboxProps, 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, type ChannelOption, ChannelSelector, type ChannelSelectorProps, Checkbox, CheckboxGroup, type CheckboxGroupProps, type CheckboxOption, type CheckboxProps, CircularLoader, CommingSoonBadge, type CommingSoonBadgeProps, ConfirmationDialog, type ConfirmationDialogProps, CopyIcon, type CopyIconProps, CopyLinkButton, type CopyLinkButtonProps, type CustomIconEntry, DataTable, type DataTableProps, DatePicker, type DatePickerProps, type DatePickerValue, DefaultSelectTrigger, type DefaultSelectTriggerProps, Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger, DialogVisuallyHidden, DividingSubsection, DownloadEntryFormsButton, type DownloadEntryFormsButtonProps, Drawer, DrawerClose, DrawerContent, DrawerDescription, DrawerFooter, DrawerHeader, DrawerOverlay, DrawerPortal, DrawerTitle, DrawerTrigger, DropdownButton, type DropdownButtonProps, DropdownMenu, DropdownMenuContent, type DropdownMenuContentSide, DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel, DropdownMenuPortal, DropdownMenuSeparator, DropdownMenuTrigger, Empty, EmptyContent, EmptyDescription, EmptyHeader, EmptyMedia, EmptySectionPlaceholder, type EmptySectionPlaceholderProps, EmptyTitle, ErrorMessage, type ErrorMessageProps, ExternalLink, type ExternalLinkProps, FeatureCard, type FeatureCardProps, FieldErrorMessage, type FieldErrorMessageProps, FieldTrigger, type FieldTriggerProps, FileInputButton, type FileInputButtonProps, FormBox, Content as FormBoxContent, type FormBoxContentProps, Header as FormBoxHeader, type FormBoxHeaderProps, Root as FormBoxRoot, type FormBoxRootProps, SubHeader as FormBoxSubHeader, type FormBoxSubHeaderProps, FramedIcon, type FramedIconProps, FreeTextField, type FreeTextFieldProps, GridItems, type GridItemsProps, type GuestVerificationStatus, HALO_ICON_STATUS, HaloIcon, type HaloIconProps, HelpTooltip, type HelpTooltipProps, IVStatusBadge, type IVStatusBadgeProps, IV_BADGE_STATUS, Icon$1 as Icon, IconButton, type IconButtonProps, type IconEntry, type IconNames, type IconProps, IconRegistry, IconsDropdown, type IconsDropdownProps, Image, ImageFullScreenView, type ImageFullScreenViewProps, type ImageProps, InfoBox, type InfoBoxProps, Input, InputOTP, InputOTPGroup, type InputOTPProps, InputOTPSeparator, InputOTPSlot, type InputProps, LABEL_PLACEMENT, Label, type LabelProps, LargeModal, type LargeModalProps, LearnMoreButton, type LearnMoreButtonProps, Link, type LinkProps, Loader, type LoaderProps, LoadingBar, type LoadingBarProps, type LucideIconEntry, METRIC_CARD_VARIANTS, MetricCard, type MetricCardProps, Modal, ModalButton, ModalLoader, type ModalLoaderProps, type ModalProps, OverlayLoader, type OverlayLoaderProps, PageLoader, type PageLoaderProps, Pagination, type PaginationProps, type PaginationVariant, PhoneField, type PhoneFieldOption, type PhoneFieldProps, type PhoneFieldValue, Popover, PopoverAnchor, PopoverClose, PopoverContent, PopoverPortal, PopoverTrigger, Radio, RadioGroup, RadioGroupItem, type RadioOption, type RadioProps, RadioWithBorder, RatingProgress, type RatingProgressProps, RatingRadioGroup, type RatingRadioGroupProps, RatingStars, type RatingStarsProps, RegistryIcon, ResponsiveSheet, type ResponsiveSheetProps, RotateIcon, type RotateIconProps, ScrollArea, type ScrollAreaProps, ScrollBar, type ScrollBarProps, SearchButton, type SearchButtonProps, SearchInput, type SearchInputProps, SearchableSelect, type SearchableSelectProps, type SearchableSelectValue, Section, type SectionProps, SectionTag, SectionTagColors, type SectionTagProps, Select, SelectContent, type SelectForwardType, SelectGroup, SelectItem, SelectLabel, type SelectOption, SelectPortal, type SelectProps, SelectRoot, SelectSeparator, SelectTrigger, SelectValue$1 as SelectValue, SelectorButton, type SelectorButtonProps, type SelectorOption, Selectors, type SelectorsProps, 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, Skeleton, type SkeletonProps, 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, Switch, SwitchBlocks, type SwitchBlocksOption, type SwitchBlocksProps, SwitchGroup, type SwitchGroupProps, type SwitchOption, type SwitchProps, TASK_VARIANTS, TabbedSection, type TabbedSectionProps, Table, TableBody, TableCaption, TableCell, TableFooter, TableHead, TableHeader, TablePlaceholder, type TablePlaceholderProps, TableRow, Tabs, TabsContent, TabsList, type TabsListProps, TabsTrigger, type TabsTriggerProps, TaskCard, type TaskCardProps, TextField, type TextFieldProps, Textarea, type TextareaProps, ThreeDotsLoader, type ThreeDotsLoaderProps, ToggleGroup, ToggleGroupItem, Toggles, type TogglesForwardType, type TogglesProps, Tooltip, TooltipContent, type TooltipContentProps, type TooltipProps, TooltipProvider, TooltipRoot, type TooltipRootProps, TooltipRootWrapper, TooltipTrigger, type UiKitLocale, UploadedFilesList, type UploadedFilesListProps, VideoPlayer, type VideoPlayerProps, WideButton, type WideButtonProps, badgeVariants, bookmarkTabsListVariants, bookmarkTabsTriggerVariants, buttonGroupVariants, buttonVariants, calendarClassNames, cn, copyToClipboard, emptyMediaVariants, getSidebarState, inputVariants, labelVariants, sectionTagVariants, switchThumbVariants, switchVariants, tabsListVariants, tabsTriggerVariants, toCssSize, toggleVariants, uiKitI18nResources, uiKitTranslations, useAbortController, useClickEscape, useCombinedRef, useCopyToClipboard, useDebounce, useDebouncedFunction, useEvent, useHover, useIsFormTouched, useIsMobile, useIsMounted, useKeyDown, useModalControls, useOutsideClick, usePagination, usePrevious, usePromisedModalControls, useRadioOptions, useResetAfterRequestStatus, useScreenResize, useScrollFrameIntoView, useScrollToTop, useSidebar, useSidebarMenuButton, useSidebarSafe, useTimeout, useTimer, useUpdateToast };
|
|
2699
|
+
export { Accordion, AccordionContent, type AccordionContentProps, AccordionItem, AccordionTrigger, type AccordionTriggerProps, AirbnbInput, type AirbnbInputProps, AirbnbSearchInput, AirbnbSelect, type AirbnbSelectProps, AlertBox, type AlertBoxProps, AlertSize, AlertSizes, AlertType, AlertTypes, AudioPlayer, type AudioPlayerProps, Avatar, type AvatarProps, Badge, type BadgeProps, BaseCheckbox, type BaseCheckboxProps, 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, type ChannelOption, ChannelSelector, type ChannelSelectorProps, Checkbox, CheckboxGroup, type CheckboxGroupProps, type CheckboxOption, type CheckboxProps, CircularLoader, CommingSoonBadge, type CommingSoonBadgeProps, ConfirmationDialog, type ConfirmationDialogProps, CopyIcon, type CopyIconProps, CopyLinkButton, type CopyLinkButtonProps, type CustomIconEntry, DataTable, type DataTableProps, DatePicker, type DatePickerProps, type DatePickerValue, DefaultSelectTrigger, type DefaultSelectTriggerProps, Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger, DialogVisuallyHidden, DividingSubsection, DownloadEntryFormsButton, type DownloadEntryFormsButtonProps, Drawer, DrawerClose, DrawerContent, DrawerDescription, DrawerFooter, DrawerHeader, DrawerOverlay, DrawerPortal, DrawerTitle, DrawerTrigger, DropdownButton, type DropdownButtonProps, DropdownMenu, DropdownMenuContent, type DropdownMenuContentSide, DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel, DropdownMenuPortal, DropdownMenuSeparator, DropdownMenuTrigger, Empty, EmptyContent, EmptyDescription, EmptyHeader, EmptyMedia, EmptySectionPlaceholder, type EmptySectionPlaceholderProps, EmptyTitle, ErrorMessage, type ErrorMessageProps, ExternalLink, type ExternalLinkProps, FeatureCard, type FeatureCardProps, FieldErrorMessage, type FieldErrorMessageProps, FieldTrigger, type FieldTriggerProps, FileInputButton, type FileInputButtonProps, FormBox, Content as FormBoxContent, type FormBoxContentProps, Header as FormBoxHeader, type FormBoxHeaderProps, Root as FormBoxRoot, type FormBoxRootProps, SubHeader as FormBoxSubHeader, type FormBoxSubHeaderProps, FramedIcon, type FramedIconProps, FreeTextField, type FreeTextFieldProps, GridItems, type GridItemsProps, type GuestVerificationStatus, HALO_ICON_STATUS, HaloIcon, type HaloIconProps, HelpTooltip, type HelpTooltipProps, IVStatusBadge, type IVStatusBadgeProps, IV_BADGE_STATUS, Icon$1 as Icon, IconButton, type IconButtonProps, type IconEntry, type IconNames, type IconProps, IconRegistry, IconsDropdown, type IconsDropdownProps, Image, ImageFullScreenView, type ImageFullScreenViewProps, type ImageProps, InfoBox, type InfoBoxProps, Input, InputOTP, InputOTPGroup, type InputOTPProps, InputOTPSeparator, InputOTPSlot, type InputProps, LABEL_PLACEMENT, Label, type LabelProps, LargeModal, type LargeModalProps, LearnMoreButton, type LearnMoreButtonProps, Link, type LinkProps, Loader, type LoaderProps, LoadingBar, type LoadingBarProps, type LucideIconEntry, METRIC_CARD_VARIANTS, MetricCard, type MetricCardProps, Modal, ModalButton, ModalLoader, type ModalLoaderProps, type ModalProps, OverlayLoader, type OverlayLoaderProps, PageLoader, type PageLoaderProps, Pagination, type PaginationProps, type PaginationVariant, PhoneField, type PhoneFieldOption, type PhoneFieldProps, type PhoneFieldValue, Popover, PopoverAnchor, PopoverClose, PopoverContent, PopoverPortal, PopoverTrigger, Radio, RadioGroup, RadioGroupItem, type RadioOption, type RadioProps, RadioWithBorder, RatingProgress, type RatingProgressProps, RatingRadioGroup, type RatingRadioGroupProps, RatingStars, type RatingStarsProps, RegistryIcon, ResponsiveSheet, type ResponsiveSheetProps, RotateIcon, type RotateIconProps, ScrollArea, type ScrollAreaProps, ScrollBar, type ScrollBarProps, SearchButton, type SearchButtonProps, SearchInput, type SearchInputProps, SearchableSelect, type SearchableSelectProps, type SearchableSelectValue, Section, type SectionProps, SectionTag, SectionTagColors, type SectionTagProps, Select, SelectContent, type SelectForwardType, SelectGroup, SelectItem, SelectLabel, type SelectOption, SelectPortal, type SelectProps, SelectRoot, SelectSeparator, SelectTrigger, SelectValue$1 as SelectValue, SelectorButton, type SelectorButtonProps, type SelectorOption, Selectors, type SelectorsProps, 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, Skeleton, type SkeletonProps, 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, Switch, SwitchBlocks, type SwitchBlocksOption, type SwitchBlocksProps, SwitchGroup, type SwitchGroupProps, type SwitchOption, type SwitchProps, TASK_VARIANTS, TabbedSection, type TabbedSectionProps, Table, TableBody, TableCaption, TableCell, TableFooter, TableHead, TableHeader, TablePlaceholder, type TablePlaceholderProps, TableRow, Tabs, TabsContent, TabsList, type TabsListProps, TabsTrigger, type TabsTriggerProps, TaskCard, type TaskCardProps, TextField, type TextFieldProps, Textarea, type TextareaProps, ThreeDotsLoader, type ThreeDotsLoaderProps, ToggleGroup, ToggleGroupItem, Toggles, type TogglesForwardType, type TogglesProps, Tooltip, TooltipContent, type TooltipContentProps, type TooltipProps, TooltipProvider, TooltipRoot, type TooltipRootProps, TooltipRootWrapper, TooltipTrigger, type UiKitLocale, UploadedFilesList, type UploadedFilesListProps, VideoPlayer, type VideoPlayerProps, WideButton, type WideButtonProps, badgeVariants, bookmarkTabsListVariants, bookmarkTabsTriggerVariants, buttonGroupVariants, buttonVariants, calendarClassNames, cn, copyToClipboard, emptyMediaVariants, getSidebarState, inputVariants, isNumeric, labelVariants, sectionTagVariants, switchThumbVariants, switchVariants, tabsListVariants, tabsTriggerVariants, toCssSize, toggleVariants, uiKitI18nResources, uiKitTranslations, useAbortController, useClickEscape, useCombinedRef, useCopyToClipboard, useDebounce, useDebouncedFunction, useEvent, useHover, useIsFormTouched, useIsMobile, useIsMounted, useKeyDown, useModalControls, useOutsideClick, usePagination, usePrevious, usePromisedModalControls, useRadioOptions, useResetAfterRequestStatus, useScreenResize, useScrollFrameIntoView, useScrollToTop, useSidebar, useSidebarMenuButton, useSidebarSafe, useTimeout, useTimer, useUpdateToast };
|
package/dist/index.d.ts
CHANGED
|
@@ -2528,6 +2528,7 @@ declare const SearchableSelect: SearchableSelectComponent;
|
|
|
2528
2528
|
|
|
2529
2529
|
declare function copyToClipboard(value: string | number): void;
|
|
2530
2530
|
|
|
2531
|
+
declare const isNumeric: (n: string | number) => boolean;
|
|
2531
2532
|
declare function toCssSize(size?: string | number): string | undefined;
|
|
2532
2533
|
|
|
2533
2534
|
declare function useScrollToTop(): void;
|
|
@@ -2564,7 +2565,15 @@ declare function useModalControls(initState?: boolean, { disabled }?: {
|
|
|
2564
2565
|
setIsOpen: React$1.Dispatch<React$1.SetStateAction<boolean>>;
|
|
2565
2566
|
};
|
|
2566
2567
|
|
|
2567
|
-
|
|
2568
|
+
type OutsideClickHandler = (event: Event) => void;
|
|
2569
|
+
type UseOutsideClickProps<T extends Element> = {
|
|
2570
|
+
elementRef: RefObject<T> | null;
|
|
2571
|
+
onOutsideClick: OutsideClickHandler | null;
|
|
2572
|
+
triggerRef?: RefObject<Element> | null;
|
|
2573
|
+
isDisabled?: boolean;
|
|
2574
|
+
nested?: string[] | string;
|
|
2575
|
+
};
|
|
2576
|
+
declare function useOutsideClick<T extends Element>({ elementRef, onOutsideClick, triggerRef, isDisabled, nested, }: UseOutsideClickProps<T>): void;
|
|
2568
2577
|
|
|
2569
2578
|
declare function useScreenResize(maxWidth: string): {
|
|
2570
2579
|
isMatch: boolean;
|
|
@@ -2687,4 +2696,4 @@ declare function useIsFormTouched({ watch, displayFields, debug, defaultValues,
|
|
|
2687
2696
|
|
|
2688
2697
|
declare function cn(...inputs: ClassValue[]): string;
|
|
2689
2698
|
|
|
2690
|
-
export { Accordion, AccordionContent, type AccordionContentProps, AccordionItem, AccordionTrigger, type AccordionTriggerProps, AirbnbInput, type AirbnbInputProps, AirbnbSearchInput, AirbnbSelect, type AirbnbSelectProps, AlertBox, type AlertBoxProps, AlertSize, AlertSizes, AlertType, AlertTypes, AudioPlayer, type AudioPlayerProps, Avatar, type AvatarProps, Badge, type BadgeProps, BaseCheckbox, type BaseCheckboxProps, 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, type ChannelOption, ChannelSelector, type ChannelSelectorProps, Checkbox, CheckboxGroup, type CheckboxGroupProps, type CheckboxOption, type CheckboxProps, CircularLoader, CommingSoonBadge, type CommingSoonBadgeProps, ConfirmationDialog, type ConfirmationDialogProps, CopyIcon, type CopyIconProps, CopyLinkButton, type CopyLinkButtonProps, type CustomIconEntry, DataTable, type DataTableProps, DatePicker, type DatePickerProps, type DatePickerValue, DefaultSelectTrigger, type DefaultSelectTriggerProps, Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger, DialogVisuallyHidden, DividingSubsection, DownloadEntryFormsButton, type DownloadEntryFormsButtonProps, Drawer, DrawerClose, DrawerContent, DrawerDescription, DrawerFooter, DrawerHeader, DrawerOverlay, DrawerPortal, DrawerTitle, DrawerTrigger, DropdownButton, type DropdownButtonProps, DropdownMenu, DropdownMenuContent, type DropdownMenuContentSide, DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel, DropdownMenuPortal, DropdownMenuSeparator, DropdownMenuTrigger, Empty, EmptyContent, EmptyDescription, EmptyHeader, EmptyMedia, EmptySectionPlaceholder, type EmptySectionPlaceholderProps, EmptyTitle, ErrorMessage, type ErrorMessageProps, ExternalLink, type ExternalLinkProps, FeatureCard, type FeatureCardProps, FieldErrorMessage, type FieldErrorMessageProps, FieldTrigger, type FieldTriggerProps, FileInputButton, type FileInputButtonProps, FormBox, Content as FormBoxContent, type FormBoxContentProps, Header as FormBoxHeader, type FormBoxHeaderProps, Root as FormBoxRoot, type FormBoxRootProps, SubHeader as FormBoxSubHeader, type FormBoxSubHeaderProps, FramedIcon, type FramedIconProps, FreeTextField, type FreeTextFieldProps, GridItems, type GridItemsProps, type GuestVerificationStatus, HALO_ICON_STATUS, HaloIcon, type HaloIconProps, HelpTooltip, type HelpTooltipProps, IVStatusBadge, type IVStatusBadgeProps, IV_BADGE_STATUS, Icon$1 as Icon, IconButton, type IconButtonProps, type IconEntry, type IconNames, type IconProps, IconRegistry, IconsDropdown, type IconsDropdownProps, Image, ImageFullScreenView, type ImageFullScreenViewProps, type ImageProps, InfoBox, type InfoBoxProps, Input, InputOTP, InputOTPGroup, type InputOTPProps, InputOTPSeparator, InputOTPSlot, type InputProps, LABEL_PLACEMENT, Label, type LabelProps, LargeModal, type LargeModalProps, LearnMoreButton, type LearnMoreButtonProps, Link, type LinkProps, Loader, type LoaderProps, LoadingBar, type LoadingBarProps, type LucideIconEntry, METRIC_CARD_VARIANTS, MetricCard, type MetricCardProps, Modal, ModalButton, ModalLoader, type ModalLoaderProps, type ModalProps, OverlayLoader, type OverlayLoaderProps, PageLoader, type PageLoaderProps, Pagination, type PaginationProps, type PaginationVariant, PhoneField, type PhoneFieldOption, type PhoneFieldProps, type PhoneFieldValue, Popover, PopoverAnchor, PopoverClose, PopoverContent, PopoverPortal, PopoverTrigger, Radio, RadioGroup, RadioGroupItem, type RadioOption, type RadioProps, RadioWithBorder, RatingProgress, type RatingProgressProps, RatingRadioGroup, type RatingRadioGroupProps, RatingStars, type RatingStarsProps, RegistryIcon, ResponsiveSheet, type ResponsiveSheetProps, RotateIcon, type RotateIconProps, ScrollArea, type ScrollAreaProps, ScrollBar, type ScrollBarProps, SearchButton, type SearchButtonProps, SearchInput, type SearchInputProps, SearchableSelect, type SearchableSelectProps, type SearchableSelectValue, Section, type SectionProps, SectionTag, SectionTagColors, type SectionTagProps, Select, SelectContent, type SelectForwardType, SelectGroup, SelectItem, SelectLabel, type SelectOption, SelectPortal, type SelectProps, SelectRoot, SelectSeparator, SelectTrigger, SelectValue$1 as SelectValue, SelectorButton, type SelectorButtonProps, type SelectorOption, Selectors, type SelectorsProps, 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, Skeleton, type SkeletonProps, 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, Switch, SwitchBlocks, type SwitchBlocksOption, type SwitchBlocksProps, SwitchGroup, type SwitchGroupProps, type SwitchOption, type SwitchProps, TASK_VARIANTS, TabbedSection, type TabbedSectionProps, Table, TableBody, TableCaption, TableCell, TableFooter, TableHead, TableHeader, TablePlaceholder, type TablePlaceholderProps, TableRow, Tabs, TabsContent, TabsList, type TabsListProps, TabsTrigger, type TabsTriggerProps, TaskCard, type TaskCardProps, TextField, type TextFieldProps, Textarea, type TextareaProps, ThreeDotsLoader, type ThreeDotsLoaderProps, ToggleGroup, ToggleGroupItem, Toggles, type TogglesForwardType, type TogglesProps, Tooltip, TooltipContent, type TooltipContentProps, type TooltipProps, TooltipProvider, TooltipRoot, type TooltipRootProps, TooltipRootWrapper, TooltipTrigger, type UiKitLocale, UploadedFilesList, type UploadedFilesListProps, VideoPlayer, type VideoPlayerProps, WideButton, type WideButtonProps, badgeVariants, bookmarkTabsListVariants, bookmarkTabsTriggerVariants, buttonGroupVariants, buttonVariants, calendarClassNames, cn, copyToClipboard, emptyMediaVariants, getSidebarState, inputVariants, labelVariants, sectionTagVariants, switchThumbVariants, switchVariants, tabsListVariants, tabsTriggerVariants, toCssSize, toggleVariants, uiKitI18nResources, uiKitTranslations, useAbortController, useClickEscape, useCombinedRef, useCopyToClipboard, useDebounce, useDebouncedFunction, useEvent, useHover, useIsFormTouched, useIsMobile, useIsMounted, useKeyDown, useModalControls, useOutsideClick, usePagination, usePrevious, usePromisedModalControls, useRadioOptions, useResetAfterRequestStatus, useScreenResize, useScrollFrameIntoView, useScrollToTop, useSidebar, useSidebarMenuButton, useSidebarSafe, useTimeout, useTimer, useUpdateToast };
|
|
2699
|
+
export { Accordion, AccordionContent, type AccordionContentProps, AccordionItem, AccordionTrigger, type AccordionTriggerProps, AirbnbInput, type AirbnbInputProps, AirbnbSearchInput, AirbnbSelect, type AirbnbSelectProps, AlertBox, type AlertBoxProps, AlertSize, AlertSizes, AlertType, AlertTypes, AudioPlayer, type AudioPlayerProps, Avatar, type AvatarProps, Badge, type BadgeProps, BaseCheckbox, type BaseCheckboxProps, 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, type ChannelOption, ChannelSelector, type ChannelSelectorProps, Checkbox, CheckboxGroup, type CheckboxGroupProps, type CheckboxOption, type CheckboxProps, CircularLoader, CommingSoonBadge, type CommingSoonBadgeProps, ConfirmationDialog, type ConfirmationDialogProps, CopyIcon, type CopyIconProps, CopyLinkButton, type CopyLinkButtonProps, type CustomIconEntry, DataTable, type DataTableProps, DatePicker, type DatePickerProps, type DatePickerValue, DefaultSelectTrigger, type DefaultSelectTriggerProps, Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger, DialogVisuallyHidden, DividingSubsection, DownloadEntryFormsButton, type DownloadEntryFormsButtonProps, Drawer, DrawerClose, DrawerContent, DrawerDescription, DrawerFooter, DrawerHeader, DrawerOverlay, DrawerPortal, DrawerTitle, DrawerTrigger, DropdownButton, type DropdownButtonProps, DropdownMenu, DropdownMenuContent, type DropdownMenuContentSide, DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel, DropdownMenuPortal, DropdownMenuSeparator, DropdownMenuTrigger, Empty, EmptyContent, EmptyDescription, EmptyHeader, EmptyMedia, EmptySectionPlaceholder, type EmptySectionPlaceholderProps, EmptyTitle, ErrorMessage, type ErrorMessageProps, ExternalLink, type ExternalLinkProps, FeatureCard, type FeatureCardProps, FieldErrorMessage, type FieldErrorMessageProps, FieldTrigger, type FieldTriggerProps, FileInputButton, type FileInputButtonProps, FormBox, Content as FormBoxContent, type FormBoxContentProps, Header as FormBoxHeader, type FormBoxHeaderProps, Root as FormBoxRoot, type FormBoxRootProps, SubHeader as FormBoxSubHeader, type FormBoxSubHeaderProps, FramedIcon, type FramedIconProps, FreeTextField, type FreeTextFieldProps, GridItems, type GridItemsProps, type GuestVerificationStatus, HALO_ICON_STATUS, HaloIcon, type HaloIconProps, HelpTooltip, type HelpTooltipProps, IVStatusBadge, type IVStatusBadgeProps, IV_BADGE_STATUS, Icon$1 as Icon, IconButton, type IconButtonProps, type IconEntry, type IconNames, type IconProps, IconRegistry, IconsDropdown, type IconsDropdownProps, Image, ImageFullScreenView, type ImageFullScreenViewProps, type ImageProps, InfoBox, type InfoBoxProps, Input, InputOTP, InputOTPGroup, type InputOTPProps, InputOTPSeparator, InputOTPSlot, type InputProps, LABEL_PLACEMENT, Label, type LabelProps, LargeModal, type LargeModalProps, LearnMoreButton, type LearnMoreButtonProps, Link, type LinkProps, Loader, type LoaderProps, LoadingBar, type LoadingBarProps, type LucideIconEntry, METRIC_CARD_VARIANTS, MetricCard, type MetricCardProps, Modal, ModalButton, ModalLoader, type ModalLoaderProps, type ModalProps, OverlayLoader, type OverlayLoaderProps, PageLoader, type PageLoaderProps, Pagination, type PaginationProps, type PaginationVariant, PhoneField, type PhoneFieldOption, type PhoneFieldProps, type PhoneFieldValue, Popover, PopoverAnchor, PopoverClose, PopoverContent, PopoverPortal, PopoverTrigger, Radio, RadioGroup, RadioGroupItem, type RadioOption, type RadioProps, RadioWithBorder, RatingProgress, type RatingProgressProps, RatingRadioGroup, type RatingRadioGroupProps, RatingStars, type RatingStarsProps, RegistryIcon, ResponsiveSheet, type ResponsiveSheetProps, RotateIcon, type RotateIconProps, ScrollArea, type ScrollAreaProps, ScrollBar, type ScrollBarProps, SearchButton, type SearchButtonProps, SearchInput, type SearchInputProps, SearchableSelect, type SearchableSelectProps, type SearchableSelectValue, Section, type SectionProps, SectionTag, SectionTagColors, type SectionTagProps, Select, SelectContent, type SelectForwardType, SelectGroup, SelectItem, SelectLabel, type SelectOption, SelectPortal, type SelectProps, SelectRoot, SelectSeparator, SelectTrigger, SelectValue$1 as SelectValue, SelectorButton, type SelectorButtonProps, type SelectorOption, Selectors, type SelectorsProps, 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, Skeleton, type SkeletonProps, 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, Switch, SwitchBlocks, type SwitchBlocksOption, type SwitchBlocksProps, SwitchGroup, type SwitchGroupProps, type SwitchOption, type SwitchProps, TASK_VARIANTS, TabbedSection, type TabbedSectionProps, Table, TableBody, TableCaption, TableCell, TableFooter, TableHead, TableHeader, TablePlaceholder, type TablePlaceholderProps, TableRow, Tabs, TabsContent, TabsList, type TabsListProps, TabsTrigger, type TabsTriggerProps, TaskCard, type TaskCardProps, TextField, type TextFieldProps, Textarea, type TextareaProps, ThreeDotsLoader, type ThreeDotsLoaderProps, ToggleGroup, ToggleGroupItem, Toggles, type TogglesForwardType, type TogglesProps, Tooltip, TooltipContent, type TooltipContentProps, type TooltipProps, TooltipProvider, TooltipRoot, type TooltipRootProps, TooltipRootWrapper, TooltipTrigger, type UiKitLocale, UploadedFilesList, type UploadedFilesListProps, VideoPlayer, type VideoPlayerProps, WideButton, type WideButtonProps, badgeVariants, bookmarkTabsListVariants, bookmarkTabsTriggerVariants, buttonGroupVariants, buttonVariants, calendarClassNames, cn, copyToClipboard, emptyMediaVariants, getSidebarState, inputVariants, isNumeric, labelVariants, sectionTagVariants, switchThumbVariants, switchVariants, tabsListVariants, tabsTriggerVariants, toCssSize, toggleVariants, uiKitI18nResources, uiKitTranslations, useAbortController, useClickEscape, useCombinedRef, useCopyToClipboard, useDebounce, useDebouncedFunction, useEvent, useHover, useIsFormTouched, useIsMobile, useIsMounted, useKeyDown, useModalControls, useOutsideClick, usePagination, usePrevious, usePromisedModalControls, useRadioOptions, useResetAfterRequestStatus, useScreenResize, useScrollFrameIntoView, useScrollToTop, useSidebar, useSidebarMenuButton, useSidebarSafe, useTimeout, useTimer, useUpdateToast };
|
package/dist/index.js
CHANGED
|
@@ -2169,18 +2169,25 @@ function useModalControls(initState = false, { disabled } = {}) {
|
|
|
2169
2169
|
|
|
2170
2170
|
// src/hooks/use-outside-click.ts
|
|
2171
2171
|
import { useCallback as useCallback5, useEffect as useEffect8, useRef as useRef5 } from "react";
|
|
2172
|
-
function useOutsideClick(
|
|
2172
|
+
function useOutsideClick({
|
|
2173
|
+
elementRef,
|
|
2174
|
+
onOutsideClick,
|
|
2175
|
+
triggerRef,
|
|
2176
|
+
isDisabled,
|
|
2177
|
+
nested
|
|
2178
|
+
}) {
|
|
2173
2179
|
const handleOutsideClick = useRef5(onOutsideClick);
|
|
2174
2180
|
handleOutsideClick.current = onOutsideClick;
|
|
2175
2181
|
const checkNestedElements = useCallback5(
|
|
2176
|
-
(event) => {
|
|
2182
|
+
(event, ownerDocument) => {
|
|
2177
2183
|
const checkIsElementClickedBySelector = (selector) => {
|
|
2178
|
-
const nestedElement =
|
|
2184
|
+
const nestedElement = ownerDocument.querySelector(selector);
|
|
2179
2185
|
return nestedElement?.contains(event.target);
|
|
2180
2186
|
};
|
|
2181
2187
|
const checkDataAttribute = () => {
|
|
2182
2188
|
const target = event.target;
|
|
2183
|
-
|
|
2189
|
+
const HTMLElementConstructor = ownerDocument.defaultView?.HTMLElement ?? HTMLElement;
|
|
2190
|
+
if (!target || !(target instanceof HTMLElementConstructor)) {
|
|
2184
2191
|
return false;
|
|
2185
2192
|
}
|
|
2186
2193
|
let current = target;
|
|
@@ -2204,19 +2211,29 @@ function useOutsideClick(elementRef, onOutsideClick, nested) {
|
|
|
2204
2211
|
[nested]
|
|
2205
2212
|
);
|
|
2206
2213
|
useEffect8(() => {
|
|
2214
|
+
if (isDisabled || !handleOutsideClick.current) {
|
|
2215
|
+
return;
|
|
2216
|
+
}
|
|
2217
|
+
const ownerDocument = elementRef?.current?.ownerDocument ?? triggerRef?.current?.ownerDocument ?? getDocument();
|
|
2207
2218
|
function handleClickOutside(event) {
|
|
2208
|
-
const
|
|
2209
|
-
|
|
2219
|
+
const target = event.target;
|
|
2220
|
+
const NodeConstructor = ownerDocument.defaultView?.Node ?? Node;
|
|
2221
|
+
if (!target || !(target instanceof NodeConstructor)) {
|
|
2222
|
+
return;
|
|
2223
|
+
}
|
|
2224
|
+
const targetNode = target;
|
|
2225
|
+
const isNestedElement = checkNestedElements(event, ownerDocument);
|
|
2226
|
+
if (elementRef?.current && !elementRef.current.contains(targetNode) && !triggerRef?.current?.contains(targetNode) && !isNestedElement) {
|
|
2210
2227
|
handleOutsideClick.current?.(event);
|
|
2211
2228
|
}
|
|
2212
2229
|
}
|
|
2213
|
-
|
|
2214
|
-
|
|
2230
|
+
ownerDocument.addEventListener("mousedown", handleClickOutside, true);
|
|
2231
|
+
ownerDocument.addEventListener("touchstart", handleClickOutside, true);
|
|
2215
2232
|
return () => {
|
|
2216
|
-
|
|
2217
|
-
|
|
2233
|
+
ownerDocument.removeEventListener("mousedown", handleClickOutside, true);
|
|
2234
|
+
ownerDocument.removeEventListener("touchstart", handleClickOutside, true);
|
|
2218
2235
|
};
|
|
2219
|
-
}, [checkNestedElements, elementRef]);
|
|
2236
|
+
}, [checkNestedElements, elementRef, isDisabled, triggerRef]);
|
|
2220
2237
|
}
|
|
2221
2238
|
|
|
2222
2239
|
// src/hooks/use-screen-resize.ts
|
|
@@ -11000,7 +11017,11 @@ var AirbnbSelect = React38.forwardRef(function AirbnbSelect2({
|
|
|
11000
11017
|
const combinedRef = useCombinedRef(ref, desktopTriggerRef);
|
|
11001
11018
|
const activeMobileIndex = getOptionIndex(options, pendingValue);
|
|
11002
11019
|
const valueLabel = value ? getValueLabel?.(value) ?? String(value.label) : void 0;
|
|
11003
|
-
useOutsideClick(
|
|
11020
|
+
useOutsideClick({
|
|
11021
|
+
elementRef: containerRef,
|
|
11022
|
+
onOutsideClick: () => setIsOpen(false),
|
|
11023
|
+
isDisabled: !isOpen || isMobile
|
|
11024
|
+
});
|
|
11004
11025
|
React38.useEffect(() => {
|
|
11005
11026
|
if (isBlocked) {
|
|
11006
11027
|
setIsOpen(false);
|
|
@@ -11500,7 +11521,11 @@ var SearchableSelectInternal = ({
|
|
|
11500
11521
|
const triggerError = error ?? invalid;
|
|
11501
11522
|
const describedBy = error && !hideErrorMessage ? errorId : void 0;
|
|
11502
11523
|
const activeOptionId = highlightedIndex >= 0 ? getOptionId(reactId, highlightedIndex) : void 0;
|
|
11503
|
-
useOutsideClick(
|
|
11524
|
+
useOutsideClick({
|
|
11525
|
+
elementRef: containerRef,
|
|
11526
|
+
onOutsideClick: () => closeSelect(),
|
|
11527
|
+
isDisabled: !open || isMobile
|
|
11528
|
+
});
|
|
11504
11529
|
const handleOnOpenChange = useEvent(onOpenChange);
|
|
11505
11530
|
const setSelectOpen = useCallback25(
|
|
11506
11531
|
(nextOpen, options2) => {
|
|
@@ -12125,6 +12150,7 @@ export {
|
|
|
12125
12150
|
emptyMediaVariants,
|
|
12126
12151
|
getSidebarState,
|
|
12127
12152
|
inputVariants,
|
|
12153
|
+
isNumeric,
|
|
12128
12154
|
labelVariants,
|
|
12129
12155
|
sectionTagVariants,
|
|
12130
12156
|
switchThumbVariants,
|