@underverse-ui/underverse 2.0.17 → 2.0.19
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/README.md +18 -0
- package/api-reference.json +23 -2
- package/dist/{EmojiPicker-3X2S7XPP.js → EmojiPicker-SFPFCRI4.js} +4 -4
- package/dist/{chunk-HTGAV4IG.js → chunk-LQCKCWVZ.js} +3 -3
- package/dist/{chunk-YM56RXIZ.js → chunk-MSTO23JM.js} +6 -6
- package/dist/{chunk-HEXF4EOB.js → chunk-NJ53GV74.js} +3 -3
- package/dist/{chunk-EPBYGZHZ.js → chunk-PZCD342B.js} +6 -4
- package/dist/{chunk-EPBYGZHZ.js.map → chunk-PZCD342B.js.map} +1 -1
- package/dist/{chunk-23VKHYEB.js → chunk-RSLY7UU2.js} +70 -50
- package/dist/chunk-RSLY7UU2.js.map +1 -0
- package/dist/{chunk-SKCO2GFM.js → chunk-SBDZKVUJ.js} +2 -2
- package/dist/index.cjs +114 -61
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +10 -3
- package/dist/index.d.ts +10 -3
- package/dist/index.js +49 -18
- package/dist/index.js.map +1 -1
- package/dist/{menu-bar-7MPCNTHR.js → menu-bar-JXYQ5CH5.js} +4 -4
- package/dist/ueditor.cjs +69 -47
- package/dist/ueditor.cjs.map +1 -1
- package/dist/ueditor.js +4 -4
- package/package.json +2 -1
- package/dist/chunk-23VKHYEB.js.map +0 -1
- /package/dist/{EmojiPicker-3X2S7XPP.js.map → EmojiPicker-SFPFCRI4.js.map} +0 -0
- /package/dist/{chunk-HTGAV4IG.js.map → chunk-LQCKCWVZ.js.map} +0 -0
- /package/dist/{chunk-YM56RXIZ.js.map → chunk-MSTO23JM.js.map} +0 -0
- /package/dist/{chunk-HEXF4EOB.js.map → chunk-NJ53GV74.js.map} +0 -0
- /package/dist/{chunk-SKCO2GFM.js.map → chunk-SBDZKVUJ.js.map} +0 -0
- /package/dist/{menu-bar-7MPCNTHR.js.map → menu-bar-JXYQ5CH5.js.map} +0 -0
package/dist/index.d.cts
CHANGED
|
@@ -621,6 +621,7 @@ interface ToastProviderProps {
|
|
|
621
621
|
children: React__default.ReactNode;
|
|
622
622
|
position?: ToastPosition;
|
|
623
623
|
maxToasts?: number;
|
|
624
|
+
viewportClassName?: string;
|
|
624
625
|
}
|
|
625
626
|
declare const ToastProvider: React__default.FC<ToastProviderProps>;
|
|
626
627
|
|
|
@@ -658,6 +659,10 @@ interface PopoverProps {
|
|
|
658
659
|
matchTriggerWidth?: boolean;
|
|
659
660
|
contentWidth?: number;
|
|
660
661
|
borderMode?: BorderMode;
|
|
662
|
+
/** Resolve the document element that should receive the portal. */
|
|
663
|
+
getPortalContainer?: () => HTMLElement | null;
|
|
664
|
+
/** Constrain vertical placement and height to the largest available viewport side. */
|
|
665
|
+
constrainToAvailableHeight?: boolean;
|
|
661
666
|
}
|
|
662
667
|
declare const Popover: React$1.FC<PopoverProps>;
|
|
663
668
|
|
|
@@ -1808,6 +1813,8 @@ interface ComboboxProps {
|
|
|
1808
1813
|
searchPlaceholder?: string;
|
|
1809
1814
|
emptyText?: string;
|
|
1810
1815
|
usePortal?: boolean;
|
|
1816
|
+
/** Resolve the document element that should receive the dropdown portal. */
|
|
1817
|
+
getPortalContainer?: () => HTMLElement | null;
|
|
1811
1818
|
label?: string;
|
|
1812
1819
|
/** Custom class for label */
|
|
1813
1820
|
labelClassName?: string;
|
|
@@ -3249,12 +3256,12 @@ declare namespace date {
|
|
|
3249
3256
|
* ```
|
|
3250
3257
|
*/
|
|
3251
3258
|
declare const shadcnAnimationStyles = "\n /* ============================================\n * DROPDOWN / POPOVER ANIMATIONS\n * Uses spring-like cubic-bezier for natural feel\n * ============================================ */\n \n /* Native-like Combobox Animation - Mimics browser default select */\n [data-state=\"open\"][data-combobox-dropdown] {\n animation: comboboxOpen 150ms cubic-bezier(0.2, 0, 0, 1);\n transform-origin: top center;\n }\n\n [data-state=\"closed\"][data-combobox-dropdown] {\n animation: comboboxClose 120ms cubic-bezier(0.4, 0, 1, 1);\n transform-origin: top center;\n }\n\n @keyframes comboboxOpen {\n 0% {\n opacity: 0;\n transform: translateY(-4px) scaleY(0.9);\n }\n 100% {\n opacity: 1;\n transform: translateY(0) scaleY(1);\n }\n }\n\n @keyframes comboboxClose {\n 0% {\n opacity: 1;\n transform: translateY(0) scaleY(1);\n }\n 100% {\n opacity: 0;\n transform: translateY(-4px) scaleY(0.9);\n }\n }\n\n /* Generic dropdown open/close */\n [data-state=\"open\"] {\n animation: slideDownAndFade 220ms cubic-bezier(0.16, 1, 0.3, 1);\n }\n \n [data-state=\"closed\"] {\n animation: slideUpAndFade 180ms cubic-bezier(0.4, 0, 0.2, 1);\n }\n \n @keyframes slideDownAndFade {\n from {\n opacity: 0;\n transform: translateY(-4px) scale(0.98);\n }\n to {\n opacity: 1;\n transform: translateY(0) scale(1);\n }\n }\n \n @keyframes slideUpAndFade {\n from {\n opacity: 1;\n transform: translateY(0) scale(1);\n }\n to {\n opacity: 0;\n transform: translateY(-4px) scale(0.98);\n }\n }\n \n /* ============================================\n * DROPDOWN ITEMS - Native-like instant appearance\n * ============================================ */\n\n /* Fast staggered animation for native feel */\n .dropdown-item {\n opacity: 0;\n animation: itemFadeIn 120ms cubic-bezier(0.2, 0, 0, 1) forwards;\n }\n\n @keyframes itemFadeIn {\n from {\n opacity: 0;\n transform: translateX(-4px);\n }\n to {\n opacity: 1;\n transform: translateX(0);\n }\n }\n\n /* Item stagger delays - minimal for speed */\n .dropdown-item:nth-child(1) { animation-delay: 0ms; }\n .dropdown-item:nth-child(2) { animation-delay: 15ms; }\n .dropdown-item:nth-child(3) { animation-delay: 30ms; }\n .dropdown-item:nth-child(4) { animation-delay: 45ms; }\n .dropdown-item:nth-child(5) { animation-delay: 60ms; }\n .dropdown-item:nth-child(6) { animation-delay: 75ms; }\n .dropdown-item:nth-child(7) { animation-delay: 90ms; }\n .dropdown-item:nth-child(8) { animation-delay: 105ms; }\n .dropdown-item:nth-child(n+9) { animation-delay: 120ms; }\n\n /* ============================================\n * DATEPICKER ANIMATIONS\n * ============================================ */\n\n .datepicker-day {\n opacity: 0;\n animation: dayFadeIn 200ms cubic-bezier(0.16, 1, 0.3, 1) forwards;\n }\n\n @keyframes dayFadeIn {\n from {\n opacity: 0;\n transform: scale(0.8);\n }\n to {\n opacity: 1;\n transform: scale(1);\n }\n }\n\n /* ============================================\n * TOOLTIP ANIMATIONS\n * ============================================ */\n\n [data-tooltip] {\n animation: tooltipIn 150ms cubic-bezier(0.16, 1, 0.3, 1);\n }\n\n @keyframes tooltipIn {\n from {\n opacity: 0;\n transform: scale(0.95);\n }\n to {\n opacity: 1;\n transform: scale(1);\n }\n }\n\n /* ============================================\n * MODAL / DIALOG ANIMATIONS\n * ============================================ */\n\n .modal-content {\n animation: scaleIn 200ms cubic-bezier(0.34, 1.56, 0.64, 1);\n }\n \n @keyframes scaleIn {\n from {\n opacity: 0;\n transform: scale(0.9);\n }\n to {\n opacity: 1;\n transform: scale(1);\n }\n }\n \n /* Smooth backdrop blur transition */\n .backdrop-animate {\n transition: backdrop-filter 200ms ease, background-color 200ms ease;\n }\n";
|
|
3252
|
-
declare function useShadCNAnimations(): void;
|
|
3259
|
+
declare function useShadCNAnimations(targetDocument?: Document | null): void;
|
|
3253
3260
|
/**
|
|
3254
3261
|
* Manually inject animation styles.
|
|
3255
3262
|
* Useful for non-React environments or SSR.
|
|
3256
3263
|
*/
|
|
3257
|
-
declare function injectAnimationStyles(): void;
|
|
3264
|
+
declare function injectAnimationStyles(targetDocument?: Document): void;
|
|
3258
3265
|
/**
|
|
3259
3266
|
* Get the animation styles as a string.
|
|
3260
3267
|
* Useful for including in a style tag or CSS file.
|
|
@@ -7225,4 +7232,4 @@ declare function getUnderverseMessages(locale?: UnderverseLocale): {
|
|
|
7225
7232
|
};
|
|
7226
7233
|
};
|
|
7227
7234
|
|
|
7228
|
-
export { AccessDenied, type AccessDeniedProps, Alert, Avatar, Badge, Badge as BadgeBase, BatteryProgress, BottomSheet, type BottomSheetProps, Breadcrumb, Button, ButtonLoading, type ButtonProps, Calendar, type CalendarEvent, type CalendarHoliday, type CalendarProps, CalendarTimeline, type CalendarTimelineDateInput, type CalendarTimelineDayRangeMode, type CalendarTimelineEvent, type CalendarTimelineFormatters, type CalendarTimelineGroup, type CalendarTimelineInteractions, type CalendarTimelineLabels, type CalendarTimelineProps, type CalendarTimelineResource, type CalendarTimelineSize, type CalendarTimelineView, type CalendarTimelineVirtualization, Card, type CardProps, Carousel, type CarouselEffectOptions, type CarouselEffectPreset, type Category, CategoryTreeSelect, type CategoryTreeSelectBaseProps, type CategoryTreeSelectLabels, type CategoryTreeSelectMultiProps, type CategoryTreeSelectProps, type CategoryTreeSelectSingleProps, Checkbox, type CheckboxProps, CircularProgress, ClientOnly, ColorPicker, type ColorPickerProps, Combobox, type ComboboxOption, type ComboboxProps, CompactDatePicker, CompactPagination, type CompactPaginationProps, DataTable, type DataTableColumn, type DataTableDensity, type DataTableLabels, type DataTablePaginationAlign, type DataTableProps, type DataTableQuery, type DataTableSize, DatePicker, type DatePickerProps, DateRangePicker, type DateRangePickerProps, DateTimePicker, type DateTimePickerProps, date as DateUtils, Drawer, type DrawerProps, DropdownMenu, DropdownMenuItem, DropdownMenuSeparator, EmojiPicker, type EmojiPickerProps, FallingIcons, FileUpload, type FileUploadProps, type FilterType, ForceInternalTranslationsProvider, Form, FormActions, FormCheckbox, FormControl, FormDescription, FormField, FormInput, FormItem, FormLabel, FormMessage, FormSubmitButton, type GlobalI18nConfig, GlobalLoading, GradientBadge, Grid, GridItem, type GridItemProps, type GridProps, ImageUpload, type ImageUploadProps, InlineLoading, Input, type InputProps, InteractiveBadge, Label, type LanguageOption, LanguageSwitcherHeadless as LanguageSwitcher, LanguageSwitcherHeadless, type LanguageSwitcherHeadlessProps, type LanguageSwitcherHeadlessProps as LanguageSwitcherProps, List, ListItem, LoadingBar, LoadingDots, LoadingProgress, LoadingSpinner, type LoadingState, type Locale, LunarDatePicker, type LunarDatePickerProps, LunarDateRangePicker, type LunarDateRangePickerProps, type LunarDateValue, type LunarPickerValue, lunar as LunarUtils, MiniProgress, Modal, MonthYearPicker, MonthYearPicker as MonthYearPickerBase, type MonthYearPickerProps, MultiCombobox, type MultiComboboxOption, type MultiComboboxProps, MusicPlayer, MusicPlayer as MusicPlayerDefault, type MusicPlayerProps, NextIntlAdapter, NotificationBadge, NotificationModal, NumberInput, type NumberInputProps, OverlayControls, type OverlayControlsProps, OverlayScrollArea, type OverlayScrollAreaProps, OverlayScrollbarProvider, type OverlayScrollbarProviderProps, PageLoading, Pagination, type PaginationProps, PasswordInput, type PasswordInputProps, PillTabs, Popover, Progress, PulseBadge, RadioButtonGroup, RadioGroup, RadioGroupItem, SIZE_STYLES_BTN, ScrollArea, type ScrollAreaProps, SearchInput, type SearchInputProps, Section, SegmentedControl, SegmentedProgress, SelectDropdown, Sheet, type SheetProps, SidebarSheet, type SidebarSheetProps, SimplePagination, type SimplePaginationProps, SimpleRadioGroup, SimpleTabs, Skeleton, SkeletonAvatar, SkeletonButton, SkeletonCard, SkeletonList, SkeletonMessage, SkeletonPost, SkeletonTable, SkeletonText, SlideOver, type SlideOverProps, Slider, type SliderProps, SmartImage, type Song, type Sorter, StatusBadge, StepProgress, type StickerAssetVariant, type StickerImageUrlOptions, StickerPicker, type StickerPickerProps, type SupportedLocale, Switch, Table, TableBody, TableCaption, TableCell, TableFooter, TableHead, TableHeader, type TableHeaderProps, type TableProps, TableRow, Tabs, TagBadge, TagInput, TagInput as TagInputBase, type TagInputProps, Textarea, type TextareaProps, type ThemeMode, ThemeToggleHeadless as ThemeToggle, ThemeToggleHeadless, type ThemeToggleHeadlessProps, type ThemeToggleHeadlessProps as ThemeToggleProps, TimePicker, type TimePickerProps, Timeline, TimelineItem, ToastProvider, ToggleGroup, Tooltip, TranslationProvider, type TranslationProviderProps, type Translations, UnderverseConfigProvider, type UnderverseConfigProviderProps, type UnderverseLocale, UnderverseNextIntlProvider, UnderverseProvider, type UnderverseProviderProps, type UnderverseUIConfig, type UploadedFile, type UploadedImage, type UseOverlayScrollbarTargetOptions, VARIANT_STYLES_ALERT, VARIANT_STYLES_BTN, VIETNAM_HOLIDAYS, VerticalTabs, Watermark, type WatermarkProps, cn, cn as cnLocal, getAnimationStyles, getEmojiImageUrl, getEmojiUnifiedCode, getStickerImageUrl, getUnderverseMessages, injectAnimationStyles, loading, setEmojiBaseUrl, setStickerBaseUrl, shadcnAnimationStyles, underverseMessages, useFormField, useGlobalI18n, useOverlayScrollbarTarget, useShadCNAnimations, useSmartLocale, useSmartTranslations, useToast, useTranslations as useUnderverseI18n, useLocale as useUnderverseI18nLocale, useUnderverseLocale, useUnderverseTranslations, useUnderverseUIConfig };
|
|
7235
|
+
export { AccessDenied, type AccessDeniedProps, Alert, Avatar, Badge, Badge as BadgeBase, BatteryProgress, BottomSheet, type BottomSheetProps, Breadcrumb, Button, ButtonLoading, type ButtonProps, Calendar, type CalendarEvent, type CalendarHoliday, type CalendarProps, CalendarTimeline, type CalendarTimelineDateInput, type CalendarTimelineDayRangeMode, type CalendarTimelineEvent, type CalendarTimelineFormatters, type CalendarTimelineGroup, type CalendarTimelineInteractions, type CalendarTimelineLabels, type CalendarTimelineProps, type CalendarTimelineResource, type CalendarTimelineSize, type CalendarTimelineView, type CalendarTimelineVirtualization, Card, type CardProps, Carousel, type CarouselEffectOptions, type CarouselEffectPreset, type Category, CategoryTreeSelect, type CategoryTreeSelectBaseProps, type CategoryTreeSelectLabels, type CategoryTreeSelectMultiProps, type CategoryTreeSelectProps, type CategoryTreeSelectSingleProps, Checkbox, type CheckboxProps, CircularProgress, ClientOnly, ColorPicker, type ColorPickerProps, Combobox, type ComboboxOption, type ComboboxProps, CompactDatePicker, CompactPagination, type CompactPaginationProps, DataTable, type DataTableColumn, type DataTableDensity, type DataTableLabels, type DataTablePaginationAlign, type DataTableProps, type DataTableQuery, type DataTableSize, DatePicker, type DatePickerProps, DateRangePicker, type DateRangePickerProps, DateTimePicker, type DateTimePickerProps, date as DateUtils, Drawer, type DrawerProps, DropdownMenu, DropdownMenuItem, DropdownMenuSeparator, EmojiPicker, type EmojiPickerProps, FallingIcons, FileUpload, type FileUploadProps, type FilterType, ForceInternalTranslationsProvider, Form, FormActions, FormCheckbox, FormControl, FormDescription, FormField, FormInput, FormItem, FormLabel, FormMessage, FormSubmitButton, type GlobalI18nConfig, GlobalLoading, GradientBadge, Grid, GridItem, type GridItemProps, type GridProps, ImageUpload, type ImageUploadProps, InlineLoading, Input, type InputProps, InteractiveBadge, Label, type LanguageOption, LanguageSwitcherHeadless as LanguageSwitcher, LanguageSwitcherHeadless, type LanguageSwitcherHeadlessProps, type LanguageSwitcherHeadlessProps as LanguageSwitcherProps, List, ListItem, LoadingBar, LoadingDots, LoadingProgress, LoadingSpinner, type LoadingState, type Locale, LunarDatePicker, type LunarDatePickerProps, LunarDateRangePicker, type LunarDateRangePickerProps, type LunarDateValue, type LunarPickerValue, lunar as LunarUtils, MiniProgress, Modal, MonthYearPicker, MonthYearPicker as MonthYearPickerBase, type MonthYearPickerProps, MultiCombobox, type MultiComboboxOption, type MultiComboboxProps, MusicPlayer, MusicPlayer as MusicPlayerDefault, type MusicPlayerProps, NextIntlAdapter, NotificationBadge, NotificationModal, NumberInput, type NumberInputProps, OverlayControls, type OverlayControlsProps, OverlayScrollArea, type OverlayScrollAreaProps, OverlayScrollbarProvider, type OverlayScrollbarProviderProps, PageLoading, Pagination, type PaginationProps, PasswordInput, type PasswordInputProps, PillTabs, Popover, type PopoverPlacement, type PopoverProps, Progress, PulseBadge, RadioButtonGroup, RadioGroup, RadioGroupItem, SIZE_STYLES_BTN, ScrollArea, type ScrollAreaProps, SearchInput, type SearchInputProps, Section, SegmentedControl, SegmentedProgress, SelectDropdown, Sheet, type SheetProps, SidebarSheet, type SidebarSheetProps, SimplePagination, type SimplePaginationProps, SimpleRadioGroup, SimpleTabs, Skeleton, SkeletonAvatar, SkeletonButton, SkeletonCard, SkeletonList, SkeletonMessage, SkeletonPost, SkeletonTable, SkeletonText, SlideOver, type SlideOverProps, Slider, type SliderProps, SmartImage, type Song, type Sorter, StatusBadge, StepProgress, type StickerAssetVariant, type StickerImageUrlOptions, StickerPicker, type StickerPickerProps, type SupportedLocale, Switch, Table, TableBody, TableCaption, TableCell, TableFooter, TableHead, TableHeader, type TableHeaderProps, type TableProps, TableRow, Tabs, TagBadge, TagInput, TagInput as TagInputBase, type TagInputProps, Textarea, type TextareaProps, type ThemeMode, ThemeToggleHeadless as ThemeToggle, ThemeToggleHeadless, type ThemeToggleHeadlessProps, type ThemeToggleHeadlessProps as ThemeToggleProps, TimePicker, type TimePickerProps, Timeline, TimelineItem, ToastProvider, type ToastProviderProps, ToggleGroup, Tooltip, TranslationProvider, type TranslationProviderProps, type Translations, UnderverseConfigProvider, type UnderverseConfigProviderProps, type UnderverseLocale, UnderverseNextIntlProvider, UnderverseProvider, type UnderverseProviderProps, type UnderverseUIConfig, type UploadedFile, type UploadedImage, type UseOverlayScrollbarTargetOptions, VARIANT_STYLES_ALERT, VARIANT_STYLES_BTN, VIETNAM_HOLIDAYS, VerticalTabs, Watermark, type WatermarkProps, cn, cn as cnLocal, getAnimationStyles, getEmojiImageUrl, getEmojiUnifiedCode, getStickerImageUrl, getUnderverseMessages, injectAnimationStyles, loading, setEmojiBaseUrl, setStickerBaseUrl, shadcnAnimationStyles, underverseMessages, useFormField, useGlobalI18n, useOverlayScrollbarTarget, useShadCNAnimations, useSmartLocale, useSmartTranslations, useToast, useTranslations as useUnderverseI18n, useLocale as useUnderverseI18nLocale, useUnderverseLocale, useUnderverseTranslations, useUnderverseUIConfig };
|
package/dist/index.d.ts
CHANGED
|
@@ -621,6 +621,7 @@ interface ToastProviderProps {
|
|
|
621
621
|
children: React__default.ReactNode;
|
|
622
622
|
position?: ToastPosition;
|
|
623
623
|
maxToasts?: number;
|
|
624
|
+
viewportClassName?: string;
|
|
624
625
|
}
|
|
625
626
|
declare const ToastProvider: React__default.FC<ToastProviderProps>;
|
|
626
627
|
|
|
@@ -658,6 +659,10 @@ interface PopoverProps {
|
|
|
658
659
|
matchTriggerWidth?: boolean;
|
|
659
660
|
contentWidth?: number;
|
|
660
661
|
borderMode?: BorderMode;
|
|
662
|
+
/** Resolve the document element that should receive the portal. */
|
|
663
|
+
getPortalContainer?: () => HTMLElement | null;
|
|
664
|
+
/** Constrain vertical placement and height to the largest available viewport side. */
|
|
665
|
+
constrainToAvailableHeight?: boolean;
|
|
661
666
|
}
|
|
662
667
|
declare const Popover: React$1.FC<PopoverProps>;
|
|
663
668
|
|
|
@@ -1808,6 +1813,8 @@ interface ComboboxProps {
|
|
|
1808
1813
|
searchPlaceholder?: string;
|
|
1809
1814
|
emptyText?: string;
|
|
1810
1815
|
usePortal?: boolean;
|
|
1816
|
+
/** Resolve the document element that should receive the dropdown portal. */
|
|
1817
|
+
getPortalContainer?: () => HTMLElement | null;
|
|
1811
1818
|
label?: string;
|
|
1812
1819
|
/** Custom class for label */
|
|
1813
1820
|
labelClassName?: string;
|
|
@@ -3249,12 +3256,12 @@ declare namespace date {
|
|
|
3249
3256
|
* ```
|
|
3250
3257
|
*/
|
|
3251
3258
|
declare const shadcnAnimationStyles = "\n /* ============================================\n * DROPDOWN / POPOVER ANIMATIONS\n * Uses spring-like cubic-bezier for natural feel\n * ============================================ */\n \n /* Native-like Combobox Animation - Mimics browser default select */\n [data-state=\"open\"][data-combobox-dropdown] {\n animation: comboboxOpen 150ms cubic-bezier(0.2, 0, 0, 1);\n transform-origin: top center;\n }\n\n [data-state=\"closed\"][data-combobox-dropdown] {\n animation: comboboxClose 120ms cubic-bezier(0.4, 0, 1, 1);\n transform-origin: top center;\n }\n\n @keyframes comboboxOpen {\n 0% {\n opacity: 0;\n transform: translateY(-4px) scaleY(0.9);\n }\n 100% {\n opacity: 1;\n transform: translateY(0) scaleY(1);\n }\n }\n\n @keyframes comboboxClose {\n 0% {\n opacity: 1;\n transform: translateY(0) scaleY(1);\n }\n 100% {\n opacity: 0;\n transform: translateY(-4px) scaleY(0.9);\n }\n }\n\n /* Generic dropdown open/close */\n [data-state=\"open\"] {\n animation: slideDownAndFade 220ms cubic-bezier(0.16, 1, 0.3, 1);\n }\n \n [data-state=\"closed\"] {\n animation: slideUpAndFade 180ms cubic-bezier(0.4, 0, 0.2, 1);\n }\n \n @keyframes slideDownAndFade {\n from {\n opacity: 0;\n transform: translateY(-4px) scale(0.98);\n }\n to {\n opacity: 1;\n transform: translateY(0) scale(1);\n }\n }\n \n @keyframes slideUpAndFade {\n from {\n opacity: 1;\n transform: translateY(0) scale(1);\n }\n to {\n opacity: 0;\n transform: translateY(-4px) scale(0.98);\n }\n }\n \n /* ============================================\n * DROPDOWN ITEMS - Native-like instant appearance\n * ============================================ */\n\n /* Fast staggered animation for native feel */\n .dropdown-item {\n opacity: 0;\n animation: itemFadeIn 120ms cubic-bezier(0.2, 0, 0, 1) forwards;\n }\n\n @keyframes itemFadeIn {\n from {\n opacity: 0;\n transform: translateX(-4px);\n }\n to {\n opacity: 1;\n transform: translateX(0);\n }\n }\n\n /* Item stagger delays - minimal for speed */\n .dropdown-item:nth-child(1) { animation-delay: 0ms; }\n .dropdown-item:nth-child(2) { animation-delay: 15ms; }\n .dropdown-item:nth-child(3) { animation-delay: 30ms; }\n .dropdown-item:nth-child(4) { animation-delay: 45ms; }\n .dropdown-item:nth-child(5) { animation-delay: 60ms; }\n .dropdown-item:nth-child(6) { animation-delay: 75ms; }\n .dropdown-item:nth-child(7) { animation-delay: 90ms; }\n .dropdown-item:nth-child(8) { animation-delay: 105ms; }\n .dropdown-item:nth-child(n+9) { animation-delay: 120ms; }\n\n /* ============================================\n * DATEPICKER ANIMATIONS\n * ============================================ */\n\n .datepicker-day {\n opacity: 0;\n animation: dayFadeIn 200ms cubic-bezier(0.16, 1, 0.3, 1) forwards;\n }\n\n @keyframes dayFadeIn {\n from {\n opacity: 0;\n transform: scale(0.8);\n }\n to {\n opacity: 1;\n transform: scale(1);\n }\n }\n\n /* ============================================\n * TOOLTIP ANIMATIONS\n * ============================================ */\n\n [data-tooltip] {\n animation: tooltipIn 150ms cubic-bezier(0.16, 1, 0.3, 1);\n }\n\n @keyframes tooltipIn {\n from {\n opacity: 0;\n transform: scale(0.95);\n }\n to {\n opacity: 1;\n transform: scale(1);\n }\n }\n\n /* ============================================\n * MODAL / DIALOG ANIMATIONS\n * ============================================ */\n\n .modal-content {\n animation: scaleIn 200ms cubic-bezier(0.34, 1.56, 0.64, 1);\n }\n \n @keyframes scaleIn {\n from {\n opacity: 0;\n transform: scale(0.9);\n }\n to {\n opacity: 1;\n transform: scale(1);\n }\n }\n \n /* Smooth backdrop blur transition */\n .backdrop-animate {\n transition: backdrop-filter 200ms ease, background-color 200ms ease;\n }\n";
|
|
3252
|
-
declare function useShadCNAnimations(): void;
|
|
3259
|
+
declare function useShadCNAnimations(targetDocument?: Document | null): void;
|
|
3253
3260
|
/**
|
|
3254
3261
|
* Manually inject animation styles.
|
|
3255
3262
|
* Useful for non-React environments or SSR.
|
|
3256
3263
|
*/
|
|
3257
|
-
declare function injectAnimationStyles(): void;
|
|
3264
|
+
declare function injectAnimationStyles(targetDocument?: Document): void;
|
|
3258
3265
|
/**
|
|
3259
3266
|
* Get the animation styles as a string.
|
|
3260
3267
|
* Useful for including in a style tag or CSS file.
|
|
@@ -7225,4 +7232,4 @@ declare function getUnderverseMessages(locale?: UnderverseLocale): {
|
|
|
7225
7232
|
};
|
|
7226
7233
|
};
|
|
7227
7234
|
|
|
7228
|
-
export { AccessDenied, type AccessDeniedProps, Alert, Avatar, Badge, Badge as BadgeBase, BatteryProgress, BottomSheet, type BottomSheetProps, Breadcrumb, Button, ButtonLoading, type ButtonProps, Calendar, type CalendarEvent, type CalendarHoliday, type CalendarProps, CalendarTimeline, type CalendarTimelineDateInput, type CalendarTimelineDayRangeMode, type CalendarTimelineEvent, type CalendarTimelineFormatters, type CalendarTimelineGroup, type CalendarTimelineInteractions, type CalendarTimelineLabels, type CalendarTimelineProps, type CalendarTimelineResource, type CalendarTimelineSize, type CalendarTimelineView, type CalendarTimelineVirtualization, Card, type CardProps, Carousel, type CarouselEffectOptions, type CarouselEffectPreset, type Category, CategoryTreeSelect, type CategoryTreeSelectBaseProps, type CategoryTreeSelectLabels, type CategoryTreeSelectMultiProps, type CategoryTreeSelectProps, type CategoryTreeSelectSingleProps, Checkbox, type CheckboxProps, CircularProgress, ClientOnly, ColorPicker, type ColorPickerProps, Combobox, type ComboboxOption, type ComboboxProps, CompactDatePicker, CompactPagination, type CompactPaginationProps, DataTable, type DataTableColumn, type DataTableDensity, type DataTableLabels, type DataTablePaginationAlign, type DataTableProps, type DataTableQuery, type DataTableSize, DatePicker, type DatePickerProps, DateRangePicker, type DateRangePickerProps, DateTimePicker, type DateTimePickerProps, date as DateUtils, Drawer, type DrawerProps, DropdownMenu, DropdownMenuItem, DropdownMenuSeparator, EmojiPicker, type EmojiPickerProps, FallingIcons, FileUpload, type FileUploadProps, type FilterType, ForceInternalTranslationsProvider, Form, FormActions, FormCheckbox, FormControl, FormDescription, FormField, FormInput, FormItem, FormLabel, FormMessage, FormSubmitButton, type GlobalI18nConfig, GlobalLoading, GradientBadge, Grid, GridItem, type GridItemProps, type GridProps, ImageUpload, type ImageUploadProps, InlineLoading, Input, type InputProps, InteractiveBadge, Label, type LanguageOption, LanguageSwitcherHeadless as LanguageSwitcher, LanguageSwitcherHeadless, type LanguageSwitcherHeadlessProps, type LanguageSwitcherHeadlessProps as LanguageSwitcherProps, List, ListItem, LoadingBar, LoadingDots, LoadingProgress, LoadingSpinner, type LoadingState, type Locale, LunarDatePicker, type LunarDatePickerProps, LunarDateRangePicker, type LunarDateRangePickerProps, type LunarDateValue, type LunarPickerValue, lunar as LunarUtils, MiniProgress, Modal, MonthYearPicker, MonthYearPicker as MonthYearPickerBase, type MonthYearPickerProps, MultiCombobox, type MultiComboboxOption, type MultiComboboxProps, MusicPlayer, MusicPlayer as MusicPlayerDefault, type MusicPlayerProps, NextIntlAdapter, NotificationBadge, NotificationModal, NumberInput, type NumberInputProps, OverlayControls, type OverlayControlsProps, OverlayScrollArea, type OverlayScrollAreaProps, OverlayScrollbarProvider, type OverlayScrollbarProviderProps, PageLoading, Pagination, type PaginationProps, PasswordInput, type PasswordInputProps, PillTabs, Popover, Progress, PulseBadge, RadioButtonGroup, RadioGroup, RadioGroupItem, SIZE_STYLES_BTN, ScrollArea, type ScrollAreaProps, SearchInput, type SearchInputProps, Section, SegmentedControl, SegmentedProgress, SelectDropdown, Sheet, type SheetProps, SidebarSheet, type SidebarSheetProps, SimplePagination, type SimplePaginationProps, SimpleRadioGroup, SimpleTabs, Skeleton, SkeletonAvatar, SkeletonButton, SkeletonCard, SkeletonList, SkeletonMessage, SkeletonPost, SkeletonTable, SkeletonText, SlideOver, type SlideOverProps, Slider, type SliderProps, SmartImage, type Song, type Sorter, StatusBadge, StepProgress, type StickerAssetVariant, type StickerImageUrlOptions, StickerPicker, type StickerPickerProps, type SupportedLocale, Switch, Table, TableBody, TableCaption, TableCell, TableFooter, TableHead, TableHeader, type TableHeaderProps, type TableProps, TableRow, Tabs, TagBadge, TagInput, TagInput as TagInputBase, type TagInputProps, Textarea, type TextareaProps, type ThemeMode, ThemeToggleHeadless as ThemeToggle, ThemeToggleHeadless, type ThemeToggleHeadlessProps, type ThemeToggleHeadlessProps as ThemeToggleProps, TimePicker, type TimePickerProps, Timeline, TimelineItem, ToastProvider, ToggleGroup, Tooltip, TranslationProvider, type TranslationProviderProps, type Translations, UnderverseConfigProvider, type UnderverseConfigProviderProps, type UnderverseLocale, UnderverseNextIntlProvider, UnderverseProvider, type UnderverseProviderProps, type UnderverseUIConfig, type UploadedFile, type UploadedImage, type UseOverlayScrollbarTargetOptions, VARIANT_STYLES_ALERT, VARIANT_STYLES_BTN, VIETNAM_HOLIDAYS, VerticalTabs, Watermark, type WatermarkProps, cn, cn as cnLocal, getAnimationStyles, getEmojiImageUrl, getEmojiUnifiedCode, getStickerImageUrl, getUnderverseMessages, injectAnimationStyles, loading, setEmojiBaseUrl, setStickerBaseUrl, shadcnAnimationStyles, underverseMessages, useFormField, useGlobalI18n, useOverlayScrollbarTarget, useShadCNAnimations, useSmartLocale, useSmartTranslations, useToast, useTranslations as useUnderverseI18n, useLocale as useUnderverseI18nLocale, useUnderverseLocale, useUnderverseTranslations, useUnderverseUIConfig };
|
|
7235
|
+
export { AccessDenied, type AccessDeniedProps, Alert, Avatar, Badge, Badge as BadgeBase, BatteryProgress, BottomSheet, type BottomSheetProps, Breadcrumb, Button, ButtonLoading, type ButtonProps, Calendar, type CalendarEvent, type CalendarHoliday, type CalendarProps, CalendarTimeline, type CalendarTimelineDateInput, type CalendarTimelineDayRangeMode, type CalendarTimelineEvent, type CalendarTimelineFormatters, type CalendarTimelineGroup, type CalendarTimelineInteractions, type CalendarTimelineLabels, type CalendarTimelineProps, type CalendarTimelineResource, type CalendarTimelineSize, type CalendarTimelineView, type CalendarTimelineVirtualization, Card, type CardProps, Carousel, type CarouselEffectOptions, type CarouselEffectPreset, type Category, CategoryTreeSelect, type CategoryTreeSelectBaseProps, type CategoryTreeSelectLabels, type CategoryTreeSelectMultiProps, type CategoryTreeSelectProps, type CategoryTreeSelectSingleProps, Checkbox, type CheckboxProps, CircularProgress, ClientOnly, ColorPicker, type ColorPickerProps, Combobox, type ComboboxOption, type ComboboxProps, CompactDatePicker, CompactPagination, type CompactPaginationProps, DataTable, type DataTableColumn, type DataTableDensity, type DataTableLabels, type DataTablePaginationAlign, type DataTableProps, type DataTableQuery, type DataTableSize, DatePicker, type DatePickerProps, DateRangePicker, type DateRangePickerProps, DateTimePicker, type DateTimePickerProps, date as DateUtils, Drawer, type DrawerProps, DropdownMenu, DropdownMenuItem, DropdownMenuSeparator, EmojiPicker, type EmojiPickerProps, FallingIcons, FileUpload, type FileUploadProps, type FilterType, ForceInternalTranslationsProvider, Form, FormActions, FormCheckbox, FormControl, FormDescription, FormField, FormInput, FormItem, FormLabel, FormMessage, FormSubmitButton, type GlobalI18nConfig, GlobalLoading, GradientBadge, Grid, GridItem, type GridItemProps, type GridProps, ImageUpload, type ImageUploadProps, InlineLoading, Input, type InputProps, InteractiveBadge, Label, type LanguageOption, LanguageSwitcherHeadless as LanguageSwitcher, LanguageSwitcherHeadless, type LanguageSwitcherHeadlessProps, type LanguageSwitcherHeadlessProps as LanguageSwitcherProps, List, ListItem, LoadingBar, LoadingDots, LoadingProgress, LoadingSpinner, type LoadingState, type Locale, LunarDatePicker, type LunarDatePickerProps, LunarDateRangePicker, type LunarDateRangePickerProps, type LunarDateValue, type LunarPickerValue, lunar as LunarUtils, MiniProgress, Modal, MonthYearPicker, MonthYearPicker as MonthYearPickerBase, type MonthYearPickerProps, MultiCombobox, type MultiComboboxOption, type MultiComboboxProps, MusicPlayer, MusicPlayer as MusicPlayerDefault, type MusicPlayerProps, NextIntlAdapter, NotificationBadge, NotificationModal, NumberInput, type NumberInputProps, OverlayControls, type OverlayControlsProps, OverlayScrollArea, type OverlayScrollAreaProps, OverlayScrollbarProvider, type OverlayScrollbarProviderProps, PageLoading, Pagination, type PaginationProps, PasswordInput, type PasswordInputProps, PillTabs, Popover, type PopoverPlacement, type PopoverProps, Progress, PulseBadge, RadioButtonGroup, RadioGroup, RadioGroupItem, SIZE_STYLES_BTN, ScrollArea, type ScrollAreaProps, SearchInput, type SearchInputProps, Section, SegmentedControl, SegmentedProgress, SelectDropdown, Sheet, type SheetProps, SidebarSheet, type SidebarSheetProps, SimplePagination, type SimplePaginationProps, SimpleRadioGroup, SimpleTabs, Skeleton, SkeletonAvatar, SkeletonButton, SkeletonCard, SkeletonList, SkeletonMessage, SkeletonPost, SkeletonTable, SkeletonText, SlideOver, type SlideOverProps, Slider, type SliderProps, SmartImage, type Song, type Sorter, StatusBadge, StepProgress, type StickerAssetVariant, type StickerImageUrlOptions, StickerPicker, type StickerPickerProps, type SupportedLocale, Switch, Table, TableBody, TableCaption, TableCell, TableFooter, TableHead, TableHeader, type TableHeaderProps, type TableProps, TableRow, Tabs, TagBadge, TagInput, TagInput as TagInputBase, type TagInputProps, Textarea, type TextareaProps, type ThemeMode, ThemeToggleHeadless as ThemeToggle, ThemeToggleHeadless, type ThemeToggleHeadlessProps, type ThemeToggleHeadlessProps as ThemeToggleProps, TimePicker, type TimePickerProps, Timeline, TimelineItem, ToastProvider, type ToastProviderProps, ToggleGroup, Tooltip, TranslationProvider, type TranslationProviderProps, type Translations, UnderverseConfigProvider, type UnderverseConfigProviderProps, type UnderverseLocale, UnderverseNextIntlProvider, UnderverseProvider, type UnderverseProviderProps, type UnderverseUIConfig, type UploadedFile, type UploadedImage, type UseOverlayScrollbarTargetOptions, VARIANT_STYLES_ALERT, VARIANT_STYLES_BTN, VIETNAM_HOLIDAYS, VerticalTabs, Watermark, type WatermarkProps, cn, cn as cnLocal, getAnimationStyles, getEmojiImageUrl, getEmojiUnifiedCode, getStickerImageUrl, getUnderverseMessages, injectAnimationStyles, loading, setEmojiBaseUrl, setStickerBaseUrl, shadcnAnimationStyles, underverseMessages, useFormField, useGlobalI18n, useOverlayScrollbarTarget, useShadCNAnimations, useSmartLocale, useSmartTranslations, useToast, useTranslations as useUnderverseI18n, useLocale as useUnderverseI18nLocale, useUnderverseLocale, useUnderverseTranslations, useUnderverseUIConfig };
|
package/dist/index.js
CHANGED
|
@@ -4,19 +4,19 @@ import {
|
|
|
4
4
|
extractImageSrcsFromHtml,
|
|
5
5
|
normalizeImageUrl,
|
|
6
6
|
prepareUEditorContentForSave
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-MSTO23JM.js";
|
|
8
8
|
import {
|
|
9
9
|
EmojiPicker_default
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-LQCKCWVZ.js";
|
|
11
11
|
import {
|
|
12
12
|
getEmojiImageUrl,
|
|
13
13
|
getEmojiUnifiedCode,
|
|
14
14
|
setEmojiBaseUrl
|
|
15
|
-
} from "./chunk-
|
|
15
|
+
} from "./chunk-SBDZKVUJ.js";
|
|
16
16
|
import "./chunk-4TYW5K4J.js";
|
|
17
17
|
import {
|
|
18
18
|
Modal_default
|
|
19
|
-
} from "./chunk-
|
|
19
|
+
} from "./chunk-NJ53GV74.js";
|
|
20
20
|
import {
|
|
21
21
|
DropdownMenuItem,
|
|
22
22
|
DropdownMenuSeparator,
|
|
@@ -31,7 +31,7 @@ import {
|
|
|
31
31
|
shadcnAnimationStyles,
|
|
32
32
|
useShadCNAnimations,
|
|
33
33
|
useUnderverseUIConfig
|
|
34
|
-
} from "./chunk-
|
|
34
|
+
} from "./chunk-RSLY7UU2.js";
|
|
35
35
|
import {
|
|
36
36
|
ForceInternalTranslationsProvider,
|
|
37
37
|
NextIntlAdapter,
|
|
@@ -57,7 +57,7 @@ import {
|
|
|
57
57
|
useUnderverseLocale,
|
|
58
58
|
useUnderverseTranslations,
|
|
59
59
|
vi_default
|
|
60
|
-
} from "./chunk-
|
|
60
|
+
} from "./chunk-PZCD342B.js";
|
|
61
61
|
import {
|
|
62
62
|
__export,
|
|
63
63
|
__require
|
|
@@ -3490,7 +3490,12 @@ var useToast = () => {
|
|
|
3490
3490
|
}
|
|
3491
3491
|
return context;
|
|
3492
3492
|
};
|
|
3493
|
-
var ToastProvider = ({
|
|
3493
|
+
var ToastProvider = ({
|
|
3494
|
+
children,
|
|
3495
|
+
position = "top-right",
|
|
3496
|
+
maxToasts = 5,
|
|
3497
|
+
viewportClassName
|
|
3498
|
+
}) => {
|
|
3494
3499
|
const [toasts, setToasts] = useState7([]);
|
|
3495
3500
|
const idRef = useRef4(0);
|
|
3496
3501
|
const removeToast = useCallback3((id) => {
|
|
@@ -3517,7 +3522,15 @@ var ToastProvider = ({ children, position = "top-right", maxToasts = 5 }) => {
|
|
|
3517
3522
|
};
|
|
3518
3523
|
return /* @__PURE__ */ jsxs12(ToastContext.Provider, { value: { addToast, removeToast, toasts }, children: [
|
|
3519
3524
|
children,
|
|
3520
|
-
/* @__PURE__ */ jsx16(
|
|
3525
|
+
/* @__PURE__ */ jsx16(
|
|
3526
|
+
"div",
|
|
3527
|
+
{
|
|
3528
|
+
className: cn("fixed z-99999 flex flex-col gap-2 pointer-events-none", positionClasses[position], viewportClassName),
|
|
3529
|
+
"aria-live": "polite",
|
|
3530
|
+
"aria-atomic": true,
|
|
3531
|
+
children: toasts.map((toast) => /* @__PURE__ */ jsx16(ToastComponent, { toast, onRemove: removeToast }, toast.id))
|
|
3532
|
+
}
|
|
3533
|
+
)
|
|
3521
3534
|
] });
|
|
3522
3535
|
};
|
|
3523
3536
|
var ToastComponent = ({ toast, onRemove }) => {
|
|
@@ -3589,6 +3602,7 @@ var ToastComponent = ({ toast, onRemove }) => {
|
|
|
3589
3602
|
isVisible ? "opacity-100 translate-x-0" : "opacity-0 translate-x-full"
|
|
3590
3603
|
),
|
|
3591
3604
|
role: "status",
|
|
3605
|
+
"data-variant": toast.type,
|
|
3592
3606
|
"aria-live": toast.type === "error" ? "assertive" : "polite",
|
|
3593
3607
|
onMouseEnter: () => {
|
|
3594
3608
|
if (toast.duration === 0) return;
|
|
@@ -4637,6 +4651,7 @@ var Combobox = ({
|
|
|
4637
4651
|
variant = "default",
|
|
4638
4652
|
allowClear = false,
|
|
4639
4653
|
usePortal = true,
|
|
4654
|
+
getPortalContainer,
|
|
4640
4655
|
label,
|
|
4641
4656
|
labelClassName,
|
|
4642
4657
|
required,
|
|
@@ -4678,7 +4693,6 @@ var Combobox = ({
|
|
|
4678
4693
|
const [activeIndex, setActiveIndex] = React19.useState(null);
|
|
4679
4694
|
const [localRequiredError, setLocalRequiredError] = React19.useState();
|
|
4680
4695
|
const [triggerBackgroundColor, setTriggerBackgroundColor] = React19.useState();
|
|
4681
|
-
useShadCNAnimations();
|
|
4682
4696
|
const inputRef = React19.useRef(null);
|
|
4683
4697
|
const optionsViewportRef = React19.useRef(null);
|
|
4684
4698
|
useOverlayScrollbarTarget(optionsViewportRef, { enabled: open && useOverlayScrollbar && !virtualized });
|
|
@@ -4719,10 +4733,16 @@ var Combobox = ({
|
|
|
4719
4733
|
});
|
|
4720
4734
|
const virtualItems = canVirtualize ? optionVirtualizer.getVirtualItems() : [];
|
|
4721
4735
|
const triggerRef = React19.useRef(null);
|
|
4736
|
+
React19.useEffect(() => {
|
|
4737
|
+
const triggerDocument = triggerRef.current?.ownerDocument;
|
|
4738
|
+
if (triggerDocument) injectAnimationStyles(triggerDocument);
|
|
4739
|
+
}, []);
|
|
4722
4740
|
const updateTriggerBackgroundColor = React19.useCallback(() => {
|
|
4723
4741
|
const trigger = triggerRef.current;
|
|
4724
4742
|
if (!trigger) return;
|
|
4725
|
-
const
|
|
4743
|
+
const triggerWindow = trigger.ownerDocument.defaultView;
|
|
4744
|
+
if (!triggerWindow) return;
|
|
4745
|
+
const backgroundColor = triggerWindow.getComputedStyle(trigger).backgroundColor;
|
|
4726
4746
|
setTriggerBackgroundColor((current) => current === backgroundColor ? current : backgroundColor);
|
|
4727
4747
|
}, []);
|
|
4728
4748
|
const scrollVirtualListToIndex = React19.useCallback((index) => {
|
|
@@ -4762,15 +4782,21 @@ var Combobox = ({
|
|
|
4762
4782
|
setActiveIndex(null);
|
|
4763
4783
|
scrollVirtualListToStart();
|
|
4764
4784
|
} else if (enableSearch) {
|
|
4765
|
-
|
|
4785
|
+
const triggerWindow = triggerRef.current?.ownerDocument.defaultView;
|
|
4786
|
+
if (!triggerWindow) return void 0;
|
|
4787
|
+
const timeoutId = triggerWindow.setTimeout(() => {
|
|
4766
4788
|
inputRef.current?.focus();
|
|
4767
4789
|
}, 100);
|
|
4790
|
+
return () => triggerWindow.clearTimeout(timeoutId);
|
|
4768
4791
|
}
|
|
4792
|
+
return void 0;
|
|
4769
4793
|
}, [enableSearch, open, scrollVirtualListToStart]);
|
|
4770
4794
|
React19.useEffect(() => {
|
|
4771
4795
|
if (!onSearchChange) return void 0;
|
|
4772
|
-
const
|
|
4773
|
-
|
|
4796
|
+
const triggerWindow = triggerRef.current?.ownerDocument.defaultView;
|
|
4797
|
+
if (!triggerWindow) return void 0;
|
|
4798
|
+
const timeoutId = triggerWindow.setTimeout(() => onSearchChange(query), searchDebounceMs);
|
|
4799
|
+
return () => triggerWindow.clearTimeout(timeoutId);
|
|
4774
4800
|
}, [onSearchChange, query, searchDebounceMs]);
|
|
4775
4801
|
React19.useEffect(() => {
|
|
4776
4802
|
if (process.env.NODE_ENV !== "production" && options.length > 300 && !virtualized && searchMode !== "manual" && maxInitialOptions === void 0) {
|
|
@@ -4784,13 +4810,15 @@ var Combobox = ({
|
|
|
4784
4810
|
setTriggerBackgroundColor(void 0);
|
|
4785
4811
|
return void 0;
|
|
4786
4812
|
}
|
|
4813
|
+
const triggerWindow = triggerRef.current?.ownerDocument.defaultView;
|
|
4814
|
+
if (!triggerWindow) return void 0;
|
|
4787
4815
|
let raf = 0;
|
|
4788
4816
|
const tick = () => {
|
|
4789
4817
|
updateTriggerBackgroundColor();
|
|
4790
|
-
raf =
|
|
4818
|
+
raf = triggerWindow.requestAnimationFrame(tick);
|
|
4791
4819
|
};
|
|
4792
4820
|
tick();
|
|
4793
|
-
return () =>
|
|
4821
|
+
return () => triggerWindow.cancelAnimationFrame(raf);
|
|
4794
4822
|
}, [matchTriggerBackground, open, updateTriggerBackgroundColor]);
|
|
4795
4823
|
const selectedOption = findOptionByValue(options, value) ?? (selectedOptionProp && getOptionValue(selectedOptionProp) === value ? selectedOptionProp : void 0);
|
|
4796
4824
|
const displayValue = selectedOption ? getOptionLabel(selectedOption) : "";
|
|
@@ -4902,9 +4930,10 @@ var Combobox = ({
|
|
|
4902
4930
|
{
|
|
4903
4931
|
"data-combobox-dropdown": true,
|
|
4904
4932
|
"data-state": open ? "open" : "closed",
|
|
4905
|
-
|
|
4933
|
+
style: usePortal ? { maxHeight: "var(--underverse-popover-available-height)" } : void 0,
|
|
4934
|
+
className: cn("w-full overflow-hidden", usePortal && "flex min-h-0 flex-col", getPanelBorderRadiusClass(resolvedBorderMode)),
|
|
4906
4935
|
children: [
|
|
4907
|
-
enableSearch && /* @__PURE__ */ jsx22("div", { className: cn("relative border-b border-border/30", size === "xs" ? "p-1.5" : size === "sm" ? "p-2" : size === "lg" ? "p-3" : size === "xl" ? "p-3.5" : "p-2.5"), children: /* @__PURE__ */ jsxs18("div", { className: "relative", children: [
|
|
4936
|
+
enableSearch && /* @__PURE__ */ jsx22("div", { className: cn("relative shrink-0 border-b border-border/30", size === "xs" ? "p-1.5" : size === "sm" ? "p-2" : size === "lg" ? "p-3" : size === "xl" ? "p-3.5" : "p-2.5"), children: /* @__PURE__ */ jsxs18("div", { className: "relative", children: [
|
|
4908
4937
|
/* @__PURE__ */ jsx22(
|
|
4909
4938
|
Search4,
|
|
4910
4939
|
{
|
|
@@ -4974,7 +5003,7 @@ var Combobox = ({
|
|
|
4974
5003
|
role: "listbox",
|
|
4975
5004
|
"aria-labelledby": labelId,
|
|
4976
5005
|
"data-os-ignore": virtualized ? "" : void 0,
|
|
4977
|
-
className: cn("overflow-y-auto overscroll-contain", (!useOverlayScrollbar || virtualized) && comboboxScrollClassName),
|
|
5006
|
+
className: cn("overflow-y-auto overscroll-contain", usePortal && "min-h-0", (!useOverlayScrollbar || virtualized) && comboboxScrollClassName),
|
|
4978
5007
|
style: { maxHeight },
|
|
4979
5008
|
children: /* @__PURE__ */ jsx22("div", { className: cn(size === "xs" ? "p-1" : size === "sm" ? "p-1" : size === "lg" || size === "xl" ? "p-2" : "p-1.5"), children: loading2 ? /* @__PURE__ */ jsx22("div", { className: "px-3 py-10 text-center", children: /* @__PURE__ */ jsxs18("div", { className: "flex flex-col items-center gap-3 animate-in fade-in-0 zoom-in-95 duration-300", children: [
|
|
4980
5009
|
/* @__PURE__ */ jsx22("div", { className: "relative", children: /* @__PURE__ */ jsx22("div", { className: "w-10 h-10 rounded-full border-2 border-primary/20 border-t-primary animate-spin" }) }),
|
|
@@ -5182,6 +5211,8 @@ var Combobox = ({
|
|
|
5182
5211
|
matchTriggerWidth: true,
|
|
5183
5212
|
className: "z-50",
|
|
5184
5213
|
borderMode: resolvedBorderMode,
|
|
5214
|
+
getPortalContainer,
|
|
5215
|
+
constrainToAvailableHeight: true,
|
|
5185
5216
|
contentClassName: "p-0 overflow-hidden",
|
|
5186
5217
|
contentProps: { style: dropdownBackgroundStyle },
|
|
5187
5218
|
children: dropdownBody
|