@underverse-ui/underverse 2.0.16 → 2.0.18
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 +16 -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 +111 -75
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +12 -4
- package/dist/index.d.ts +12 -4
- package/dist/index.js +46 -32
- 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
|
@@ -658,6 +658,10 @@ interface PopoverProps {
|
|
|
658
658
|
matchTriggerWidth?: boolean;
|
|
659
659
|
contentWidth?: number;
|
|
660
660
|
borderMode?: BorderMode;
|
|
661
|
+
/** Resolve the document element that should receive the portal. */
|
|
662
|
+
getPortalContainer?: () => HTMLElement | null;
|
|
663
|
+
/** Constrain vertical placement and height to the largest available viewport side. */
|
|
664
|
+
constrainToAvailableHeight?: boolean;
|
|
661
665
|
}
|
|
662
666
|
declare const Popover: React$1.FC<PopoverProps>;
|
|
663
667
|
|
|
@@ -1808,6 +1812,8 @@ interface ComboboxProps {
|
|
|
1808
1812
|
searchPlaceholder?: string;
|
|
1809
1813
|
emptyText?: string;
|
|
1810
1814
|
usePortal?: boolean;
|
|
1815
|
+
/** Resolve the document element that should receive the dropdown portal. */
|
|
1816
|
+
getPortalContainer?: () => HTMLElement | null;
|
|
1811
1817
|
label?: string;
|
|
1812
1818
|
/** Custom class for label */
|
|
1813
1819
|
labelClassName?: string;
|
|
@@ -2963,13 +2969,15 @@ interface DataTableProps<T> {
|
|
|
2963
2969
|
overscan?: number;
|
|
2964
2970
|
/** Alignment of the page navigation controls. Default: "right" */
|
|
2965
2971
|
paginationAlign?: DataTablePaginationAlign;
|
|
2972
|
+
/** Number of page buttons pinned at each end. Defaults to 3 below 14 pages, otherwise 5. */
|
|
2973
|
+
paginationRange?: number;
|
|
2966
2974
|
/** Double-click leaf headers to auto-fit column width based on visible content. Default: true */
|
|
2967
2975
|
enableHeaderAutoFit?: boolean;
|
|
2968
2976
|
labels?: DataTableLabels;
|
|
2969
2977
|
borderMode?: BorderMode;
|
|
2970
2978
|
}
|
|
2971
2979
|
|
|
2972
|
-
declare function DataTable<T extends Record<string, any>>({ columns, data, rowKey, loading, total, page, pageSize, pageSizeOptions, onQueryChange, caption, toolbar, showToolbar, size, enableColumnVisibilityToggle, enableDensityToggle, enableHeaderAlignToggle, uppercaseHeader, striped, columnDividers, className, storageKey, stickyHeader, maxHeight, horizontalMode, overflowHidden, useOverlayScrollbar, virtualizedRows, estimatedRowHeight, overscan, paginationAlign, enableHeaderAutoFit, labels, columnColorGroups, borderMode, }: DataTableProps<T>): react_jsx_runtime.JSX.Element;
|
|
2980
|
+
declare function DataTable<T extends Record<string, any>>({ columns, data, rowKey, loading, total, page, pageSize, pageSizeOptions, onQueryChange, caption, toolbar, showToolbar, size, enableColumnVisibilityToggle, enableDensityToggle, enableHeaderAlignToggle, uppercaseHeader, striped, columnDividers, className, storageKey, stickyHeader, maxHeight, horizontalMode, overflowHidden, useOverlayScrollbar, virtualizedRows, estimatedRowHeight, overscan, paginationAlign, paginationRange, enableHeaderAutoFit, labels, columnColorGroups, borderMode, }: DataTableProps<T>): react_jsx_runtime.JSX.Element;
|
|
2973
2981
|
|
|
2974
2982
|
/** Public props for the `Table` component. */
|
|
2975
2983
|
interface TableProps extends React__default.HTMLAttributes<HTMLTableElement> {
|
|
@@ -3247,12 +3255,12 @@ declare namespace date {
|
|
|
3247
3255
|
* ```
|
|
3248
3256
|
*/
|
|
3249
3257
|
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";
|
|
3250
|
-
declare function useShadCNAnimations(): void;
|
|
3258
|
+
declare function useShadCNAnimations(targetDocument?: Document | null): void;
|
|
3251
3259
|
/**
|
|
3252
3260
|
* Manually inject animation styles.
|
|
3253
3261
|
* Useful for non-React environments or SSR.
|
|
3254
3262
|
*/
|
|
3255
|
-
declare function injectAnimationStyles(): void;
|
|
3263
|
+
declare function injectAnimationStyles(targetDocument?: Document): void;
|
|
3256
3264
|
/**
|
|
3257
3265
|
* Get the animation styles as a string.
|
|
3258
3266
|
* Useful for including in a style tag or CSS file.
|
|
@@ -7223,4 +7231,4 @@ declare function getUnderverseMessages(locale?: UnderverseLocale): {
|
|
|
7223
7231
|
};
|
|
7224
7232
|
};
|
|
7225
7233
|
|
|
7226
|
-
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 };
|
|
7234
|
+
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, 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
|
@@ -658,6 +658,10 @@ interface PopoverProps {
|
|
|
658
658
|
matchTriggerWidth?: boolean;
|
|
659
659
|
contentWidth?: number;
|
|
660
660
|
borderMode?: BorderMode;
|
|
661
|
+
/** Resolve the document element that should receive the portal. */
|
|
662
|
+
getPortalContainer?: () => HTMLElement | null;
|
|
663
|
+
/** Constrain vertical placement and height to the largest available viewport side. */
|
|
664
|
+
constrainToAvailableHeight?: boolean;
|
|
661
665
|
}
|
|
662
666
|
declare const Popover: React$1.FC<PopoverProps>;
|
|
663
667
|
|
|
@@ -1808,6 +1812,8 @@ interface ComboboxProps {
|
|
|
1808
1812
|
searchPlaceholder?: string;
|
|
1809
1813
|
emptyText?: string;
|
|
1810
1814
|
usePortal?: boolean;
|
|
1815
|
+
/** Resolve the document element that should receive the dropdown portal. */
|
|
1816
|
+
getPortalContainer?: () => HTMLElement | null;
|
|
1811
1817
|
label?: string;
|
|
1812
1818
|
/** Custom class for label */
|
|
1813
1819
|
labelClassName?: string;
|
|
@@ -2963,13 +2969,15 @@ interface DataTableProps<T> {
|
|
|
2963
2969
|
overscan?: number;
|
|
2964
2970
|
/** Alignment of the page navigation controls. Default: "right" */
|
|
2965
2971
|
paginationAlign?: DataTablePaginationAlign;
|
|
2972
|
+
/** Number of page buttons pinned at each end. Defaults to 3 below 14 pages, otherwise 5. */
|
|
2973
|
+
paginationRange?: number;
|
|
2966
2974
|
/** Double-click leaf headers to auto-fit column width based on visible content. Default: true */
|
|
2967
2975
|
enableHeaderAutoFit?: boolean;
|
|
2968
2976
|
labels?: DataTableLabels;
|
|
2969
2977
|
borderMode?: BorderMode;
|
|
2970
2978
|
}
|
|
2971
2979
|
|
|
2972
|
-
declare function DataTable<T extends Record<string, any>>({ columns, data, rowKey, loading, total, page, pageSize, pageSizeOptions, onQueryChange, caption, toolbar, showToolbar, size, enableColumnVisibilityToggle, enableDensityToggle, enableHeaderAlignToggle, uppercaseHeader, striped, columnDividers, className, storageKey, stickyHeader, maxHeight, horizontalMode, overflowHidden, useOverlayScrollbar, virtualizedRows, estimatedRowHeight, overscan, paginationAlign, enableHeaderAutoFit, labels, columnColorGroups, borderMode, }: DataTableProps<T>): react_jsx_runtime.JSX.Element;
|
|
2980
|
+
declare function DataTable<T extends Record<string, any>>({ columns, data, rowKey, loading, total, page, pageSize, pageSizeOptions, onQueryChange, caption, toolbar, showToolbar, size, enableColumnVisibilityToggle, enableDensityToggle, enableHeaderAlignToggle, uppercaseHeader, striped, columnDividers, className, storageKey, stickyHeader, maxHeight, horizontalMode, overflowHidden, useOverlayScrollbar, virtualizedRows, estimatedRowHeight, overscan, paginationAlign, paginationRange, enableHeaderAutoFit, labels, columnColorGroups, borderMode, }: DataTableProps<T>): react_jsx_runtime.JSX.Element;
|
|
2973
2981
|
|
|
2974
2982
|
/** Public props for the `Table` component. */
|
|
2975
2983
|
interface TableProps extends React__default.HTMLAttributes<HTMLTableElement> {
|
|
@@ -3247,12 +3255,12 @@ declare namespace date {
|
|
|
3247
3255
|
* ```
|
|
3248
3256
|
*/
|
|
3249
3257
|
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";
|
|
3250
|
-
declare function useShadCNAnimations(): void;
|
|
3258
|
+
declare function useShadCNAnimations(targetDocument?: Document | null): void;
|
|
3251
3259
|
/**
|
|
3252
3260
|
* Manually inject animation styles.
|
|
3253
3261
|
* Useful for non-React environments or SSR.
|
|
3254
3262
|
*/
|
|
3255
|
-
declare function injectAnimationStyles(): void;
|
|
3263
|
+
declare function injectAnimationStyles(targetDocument?: Document): void;
|
|
3256
3264
|
/**
|
|
3257
3265
|
* Get the animation styles as a string.
|
|
3258
3266
|
* Useful for including in a style tag or CSS file.
|
|
@@ -7223,4 +7231,4 @@ declare function getUnderverseMessages(locale?: UnderverseLocale): {
|
|
|
7223
7231
|
};
|
|
7224
7232
|
};
|
|
7225
7233
|
|
|
7226
|
-
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 };
|
|
7234
|
+
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, 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
|
|
@@ -4637,6 +4637,7 @@ var Combobox = ({
|
|
|
4637
4637
|
variant = "default",
|
|
4638
4638
|
allowClear = false,
|
|
4639
4639
|
usePortal = true,
|
|
4640
|
+
getPortalContainer,
|
|
4640
4641
|
label,
|
|
4641
4642
|
labelClassName,
|
|
4642
4643
|
required,
|
|
@@ -4678,7 +4679,6 @@ var Combobox = ({
|
|
|
4678
4679
|
const [activeIndex, setActiveIndex] = React19.useState(null);
|
|
4679
4680
|
const [localRequiredError, setLocalRequiredError] = React19.useState();
|
|
4680
4681
|
const [triggerBackgroundColor, setTriggerBackgroundColor] = React19.useState();
|
|
4681
|
-
useShadCNAnimations();
|
|
4682
4682
|
const inputRef = React19.useRef(null);
|
|
4683
4683
|
const optionsViewportRef = React19.useRef(null);
|
|
4684
4684
|
useOverlayScrollbarTarget(optionsViewportRef, { enabled: open && useOverlayScrollbar && !virtualized });
|
|
@@ -4719,10 +4719,16 @@ var Combobox = ({
|
|
|
4719
4719
|
});
|
|
4720
4720
|
const virtualItems = canVirtualize ? optionVirtualizer.getVirtualItems() : [];
|
|
4721
4721
|
const triggerRef = React19.useRef(null);
|
|
4722
|
+
React19.useEffect(() => {
|
|
4723
|
+
const triggerDocument = triggerRef.current?.ownerDocument;
|
|
4724
|
+
if (triggerDocument) injectAnimationStyles(triggerDocument);
|
|
4725
|
+
}, []);
|
|
4722
4726
|
const updateTriggerBackgroundColor = React19.useCallback(() => {
|
|
4723
4727
|
const trigger = triggerRef.current;
|
|
4724
4728
|
if (!trigger) return;
|
|
4725
|
-
const
|
|
4729
|
+
const triggerWindow = trigger.ownerDocument.defaultView;
|
|
4730
|
+
if (!triggerWindow) return;
|
|
4731
|
+
const backgroundColor = triggerWindow.getComputedStyle(trigger).backgroundColor;
|
|
4726
4732
|
setTriggerBackgroundColor((current) => current === backgroundColor ? current : backgroundColor);
|
|
4727
4733
|
}, []);
|
|
4728
4734
|
const scrollVirtualListToIndex = React19.useCallback((index) => {
|
|
@@ -4762,15 +4768,21 @@ var Combobox = ({
|
|
|
4762
4768
|
setActiveIndex(null);
|
|
4763
4769
|
scrollVirtualListToStart();
|
|
4764
4770
|
} else if (enableSearch) {
|
|
4765
|
-
|
|
4771
|
+
const triggerWindow = triggerRef.current?.ownerDocument.defaultView;
|
|
4772
|
+
if (!triggerWindow) return void 0;
|
|
4773
|
+
const timeoutId = triggerWindow.setTimeout(() => {
|
|
4766
4774
|
inputRef.current?.focus();
|
|
4767
4775
|
}, 100);
|
|
4776
|
+
return () => triggerWindow.clearTimeout(timeoutId);
|
|
4768
4777
|
}
|
|
4778
|
+
return void 0;
|
|
4769
4779
|
}, [enableSearch, open, scrollVirtualListToStart]);
|
|
4770
4780
|
React19.useEffect(() => {
|
|
4771
4781
|
if (!onSearchChange) return void 0;
|
|
4772
|
-
const
|
|
4773
|
-
|
|
4782
|
+
const triggerWindow = triggerRef.current?.ownerDocument.defaultView;
|
|
4783
|
+
if (!triggerWindow) return void 0;
|
|
4784
|
+
const timeoutId = triggerWindow.setTimeout(() => onSearchChange(query), searchDebounceMs);
|
|
4785
|
+
return () => triggerWindow.clearTimeout(timeoutId);
|
|
4774
4786
|
}, [onSearchChange, query, searchDebounceMs]);
|
|
4775
4787
|
React19.useEffect(() => {
|
|
4776
4788
|
if (process.env.NODE_ENV !== "production" && options.length > 300 && !virtualized && searchMode !== "manual" && maxInitialOptions === void 0) {
|
|
@@ -4784,13 +4796,15 @@ var Combobox = ({
|
|
|
4784
4796
|
setTriggerBackgroundColor(void 0);
|
|
4785
4797
|
return void 0;
|
|
4786
4798
|
}
|
|
4799
|
+
const triggerWindow = triggerRef.current?.ownerDocument.defaultView;
|
|
4800
|
+
if (!triggerWindow) return void 0;
|
|
4787
4801
|
let raf = 0;
|
|
4788
4802
|
const tick = () => {
|
|
4789
4803
|
updateTriggerBackgroundColor();
|
|
4790
|
-
raf =
|
|
4804
|
+
raf = triggerWindow.requestAnimationFrame(tick);
|
|
4791
4805
|
};
|
|
4792
4806
|
tick();
|
|
4793
|
-
return () =>
|
|
4807
|
+
return () => triggerWindow.cancelAnimationFrame(raf);
|
|
4794
4808
|
}, [matchTriggerBackground, open, updateTriggerBackgroundColor]);
|
|
4795
4809
|
const selectedOption = findOptionByValue(options, value) ?? (selectedOptionProp && getOptionValue(selectedOptionProp) === value ? selectedOptionProp : void 0);
|
|
4796
4810
|
const displayValue = selectedOption ? getOptionLabel(selectedOption) : "";
|
|
@@ -4902,9 +4916,10 @@ var Combobox = ({
|
|
|
4902
4916
|
{
|
|
4903
4917
|
"data-combobox-dropdown": true,
|
|
4904
4918
|
"data-state": open ? "open" : "closed",
|
|
4905
|
-
|
|
4919
|
+
style: usePortal ? { maxHeight: "var(--underverse-popover-available-height)" } : void 0,
|
|
4920
|
+
className: cn("w-full overflow-hidden", usePortal && "flex min-h-0 flex-col", getPanelBorderRadiusClass(resolvedBorderMode)),
|
|
4906
4921
|
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: [
|
|
4922
|
+
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
4923
|
/* @__PURE__ */ jsx22(
|
|
4909
4924
|
Search4,
|
|
4910
4925
|
{
|
|
@@ -4974,7 +4989,7 @@ var Combobox = ({
|
|
|
4974
4989
|
role: "listbox",
|
|
4975
4990
|
"aria-labelledby": labelId,
|
|
4976
4991
|
"data-os-ignore": virtualized ? "" : void 0,
|
|
4977
|
-
className: cn("overflow-y-auto overscroll-contain", (!useOverlayScrollbar || virtualized) && comboboxScrollClassName),
|
|
4992
|
+
className: cn("overflow-y-auto overscroll-contain", usePortal && "min-h-0", (!useOverlayScrollbar || virtualized) && comboboxScrollClassName),
|
|
4978
4993
|
style: { maxHeight },
|
|
4979
4994
|
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
4995
|
/* @__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 +5197,8 @@ var Combobox = ({
|
|
|
5182
5197
|
matchTriggerWidth: true,
|
|
5183
5198
|
className: "z-50",
|
|
5184
5199
|
borderMode: resolvedBorderMode,
|
|
5200
|
+
getPortalContainer,
|
|
5201
|
+
constrainToAvailableHeight: true,
|
|
5185
5202
|
contentClassName: "p-0 overflow-hidden",
|
|
5186
5203
|
contentProps: { style: dropdownBackgroundStyle },
|
|
5187
5204
|
children: dropdownBody
|
|
@@ -22021,24 +22038,19 @@ function DataTablePagination({
|
|
|
22021
22038
|
pageSizeOptions,
|
|
22022
22039
|
setCurPageSize,
|
|
22023
22040
|
size,
|
|
22024
|
-
align
|
|
22041
|
+
align,
|
|
22042
|
+
paginationRange
|
|
22025
22043
|
}) {
|
|
22026
22044
|
const totalPages = Math.ceil(totalItems / curPageSize);
|
|
22027
22045
|
const pages = React51.useMemo(() => {
|
|
22028
|
-
const
|
|
22029
|
-
if (totalPages <=
|
|
22030
|
-
|
|
22031
|
-
|
|
22032
|
-
|
|
22033
|
-
|
|
22034
|
-
|
|
22035
|
-
|
|
22036
|
-
const end = Math.min(totalPages - 1, curPage + 1);
|
|
22037
|
-
for (let i = start; i <= end; i++) result.push(i);
|
|
22038
|
-
if (curPage < totalPages - 2) result.push("...");
|
|
22039
|
-
result.push(totalPages);
|
|
22040
|
-
return result;
|
|
22041
|
-
}, [curPage, totalPages]);
|
|
22046
|
+
const edgeCount = Math.max(1, Math.floor(paginationRange ?? (totalPages < 14 ? 3 : 5)));
|
|
22047
|
+
if (totalPages <= edgeCount * 2 + 3) return Array.from({ length: totalPages }, (_, index) => index + 1);
|
|
22048
|
+
const pageNumbers = /* @__PURE__ */ new Set();
|
|
22049
|
+
for (let page = 1; page <= edgeCount; page += 1) pageNumbers.add(page);
|
|
22050
|
+
for (let page = totalPages - edgeCount + 1; page <= totalPages; page += 1) pageNumbers.add(page);
|
|
22051
|
+
for (let page = Math.max(1, curPage - 1); page <= Math.min(totalPages, curPage + 1); page += 1) pageNumbers.add(page);
|
|
22052
|
+
return Array.from(pageNumbers).sort((a, b) => a - b).flatMap((page, index, sortedPages) => index > 0 && page - sortedPages[index - 1] > 1 ? ["...", page] : [page]);
|
|
22053
|
+
}, [curPage, paginationRange, totalPages]);
|
|
22042
22054
|
if (totalItems === 0) return null;
|
|
22043
22055
|
const controlButtonSize = size === "lg" ? "md" : "sm";
|
|
22044
22056
|
const navBtnClass = size === "sm" ? "h-6 w-6 p-0 rounded-full" : size === "lg" ? "h-8 w-8 p-0 rounded-full" : "h-7 w-7 p-0 rounded-full";
|
|
@@ -22822,6 +22834,7 @@ function DataTable({
|
|
|
22822
22834
|
estimatedRowHeight,
|
|
22823
22835
|
overscan = 8,
|
|
22824
22836
|
paginationAlign = "right",
|
|
22837
|
+
paginationRange,
|
|
22825
22838
|
enableHeaderAutoFit = true,
|
|
22826
22839
|
labels,
|
|
22827
22840
|
columnColorGroups,
|
|
@@ -23074,7 +23087,8 @@ function DataTable({
|
|
|
23074
23087
|
pageSizeOptions,
|
|
23075
23088
|
setCurPageSize,
|
|
23076
23089
|
size,
|
|
23077
|
-
align: paginationAlign
|
|
23090
|
+
align: paginationAlign,
|
|
23091
|
+
paginationRange
|
|
23078
23092
|
}
|
|
23079
23093
|
)
|
|
23080
23094
|
] });
|