@underverse-ui/underverse 1.0.61 → 1.0.63
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/api-reference.json +16 -2
- package/dist/index.cjs +230 -64
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +20 -4
- package/dist/index.d.ts +20 -4
- package/dist/index.js +240 -74
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.d.cts
CHANGED
|
@@ -1803,10 +1803,24 @@ interface FileUploadProps {
|
|
|
1803
1803
|
declare function FileUpload({ onUpload, onRemove, onChange, uploadHandler, maxSize, // Default 50MB
|
|
1804
1804
|
maxFiles, accept, multiple, disabled, className, showFileList, variant, size, dragDropText, browseText, supportedFormatsText, showTypeIcons, allowPreview, initialFiles, }: FileUploadProps): react_jsx_runtime.JSX.Element;
|
|
1805
1805
|
|
|
1806
|
-
type AnimationVariant$1 = "slide" | "fade" | "scale";
|
|
1806
|
+
type AnimationVariant$1 = "slide" | "fade" | "scale" | "coverflow" | "stack";
|
|
1807
1807
|
type Orientation = "horizontal" | "vertical";
|
|
1808
|
+
type CarouselEffectPreset = "cinematic" | "gallery" | "poster" | "minimal";
|
|
1809
|
+
interface CarouselEffectOptions {
|
|
1810
|
+
mainScale?: number;
|
|
1811
|
+
sideScale?: number;
|
|
1812
|
+
farScale?: number;
|
|
1813
|
+
sideOpacity?: number;
|
|
1814
|
+
farOpacity?: number;
|
|
1815
|
+
sideOffset?: number;
|
|
1816
|
+
rotate?: number;
|
|
1817
|
+
depthStep?: number;
|
|
1818
|
+
blur?: number;
|
|
1819
|
+
stackOffset?: number;
|
|
1820
|
+
stackLift?: number;
|
|
1821
|
+
}
|
|
1808
1822
|
interface CarouselProps {
|
|
1809
|
-
children: React$1.ReactNode
|
|
1823
|
+
children: React$1.ReactNode;
|
|
1810
1824
|
autoScroll?: boolean;
|
|
1811
1825
|
autoScrollInterval?: number;
|
|
1812
1826
|
animation?: AnimationVariant$1;
|
|
@@ -1824,8 +1838,10 @@ interface CarouselProps {
|
|
|
1824
1838
|
onSlideChange?: (index: number) => void;
|
|
1825
1839
|
thumbnailRenderer?: (child: React$1.ReactNode, index: number) => React$1.ReactNode;
|
|
1826
1840
|
ariaLabel?: string;
|
|
1841
|
+
effectPreset?: CarouselEffectPreset;
|
|
1842
|
+
effectOptions?: CarouselEffectOptions;
|
|
1827
1843
|
}
|
|
1828
|
-
declare function Carousel({ children, autoScroll, autoScrollInterval, animation, orientation, showArrows, showDots, showProgress, showThumbnails, loop, slidesToShow, slidesToScroll, className, containerClassName, slideClassName, onSlideChange, thumbnailRenderer, ariaLabel, }: CarouselProps): react_jsx_runtime.JSX.Element;
|
|
1844
|
+
declare function Carousel({ children, autoScroll, autoScrollInterval, animation, orientation, showArrows, showDots, showProgress, showThumbnails, loop, slidesToShow, slidesToScroll, className, containerClassName, slideClassName, onSlideChange, thumbnailRenderer, ariaLabel, effectPreset, effectOptions, }: CarouselProps): react_jsx_runtime.JSX.Element;
|
|
1829
1845
|
|
|
1830
1846
|
type IconComponent = React__default.ComponentType<{
|
|
1831
1847
|
className?: string;
|
|
@@ -4547,4 +4563,4 @@ declare function getUnderverseMessages(locale?: UnderverseLocale): {
|
|
|
4547
4563
|
};
|
|
4548
4564
|
};
|
|
4549
4565
|
|
|
4550
|
-
export { AccessDenied, type AccessDeniedProps, Alert, Avatar, Badge, Badge as BadgeBase, BatteryProgress, BottomSheet, 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 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 DataTableProps, type DataTableQuery, type DataTableSize, DatePicker, type DatePickerProps, DateRangePicker, type DateRangePickerProps, DateTimePicker, type DateTimePickerProps, date as DateUtils, Drawer, DropdownMenu, DropdownMenuItem, DropdownMenuSeparator, FallingIcons, FileUpload, type FileUploadProps, type FilterType, ForceInternalTranslationsProvider, Form, FormActions, FormCheckbox, FormControl, FormDescription, FormField, FormInput, FormItem, FormLabel, FormMessage, FormSubmitButton, 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$1 as Locale, MiniProgress, Modal, MonthYearPicker, MonthYearPicker as MonthYearPickerBase, type MonthYearPickerProps, MultiCombobox, type MultiComboboxOption, type MultiComboboxProps, MusicPlayer, MusicPlayer as MusicPlayerDefault, type MusicPlayerProps, 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, RadioGroup, RadioGroupItem, SIZE_STYLES_BTN, ScrollArea, type ScrollAreaProps, SearchInput, type SearchInputProps, Section, SegmentedProgress, SelectDropdown, Sheet, SidebarSheet, SimplePagination, type SimplePaginationProps, SimpleTabs, Skeleton, SkeletonAvatar, SkeletonButton, SkeletonCard, SkeletonList, SkeletonMessage, SkeletonPost, SkeletonTable, SkeletonText, SlideOver, Slider, type SliderProps, SmartImage, type Song, type Sorter, StatusBadge, StepProgress, 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, Tooltip, TranslationProvider, type TranslationProviderProps, type Translations, UEditor, type UEditorInlineUploadedItem, UEditorPrepareContentForSaveError, type UEditorPrepareContentForSaveOptions, type UEditorPrepareContentForSaveResult, type UEditorProps, type UEditorRef, type UEditorUploadImageForSave, type UEditorUploadImageForSaveResult, type UEditorVariant, type UnderverseLocale, UnderverseProvider, type UnderverseProviderProps, type UploadedFile, type UploadedImage, type UseOverlayScrollbarTargetOptions, VARIANT_STYLES_ALERT, VARIANT_STYLES_BTN, VIETNAM_HOLIDAYS, VerticalTabs, Watermark, type WatermarkProps, cn$1 as cn, cn as cnLocal, extractImageSrcsFromHtml, getAnimationStyles, getUnderverseMessages, injectAnimationStyles, loading, normalizeImageUrl, prepareUEditorContentForSave, shadcnAnimationStyles, underverseMessages, useFormField, useOverlayScrollbarTarget, useShadCNAnimations, useSmartLocale, useSmartTranslations, useToast, useTranslations as useUnderverseI18n, useLocale as useUnderverseI18nLocale, useUnderverseLocale, useUnderverseTranslations };
|
|
4566
|
+
export { AccessDenied, type AccessDeniedProps, Alert, Avatar, Badge, Badge as BadgeBase, BatteryProgress, BottomSheet, 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 DataTableProps, type DataTableQuery, type DataTableSize, DatePicker, type DatePickerProps, DateRangePicker, type DateRangePickerProps, DateTimePicker, type DateTimePickerProps, date as DateUtils, Drawer, DropdownMenu, DropdownMenuItem, DropdownMenuSeparator, FallingIcons, FileUpload, type FileUploadProps, type FilterType, ForceInternalTranslationsProvider, Form, FormActions, FormCheckbox, FormControl, FormDescription, FormField, FormInput, FormItem, FormLabel, FormMessage, FormSubmitButton, 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$1 as Locale, MiniProgress, Modal, MonthYearPicker, MonthYearPicker as MonthYearPickerBase, type MonthYearPickerProps, MultiCombobox, type MultiComboboxOption, type MultiComboboxProps, MusicPlayer, MusicPlayer as MusicPlayerDefault, type MusicPlayerProps, 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, RadioGroup, RadioGroupItem, SIZE_STYLES_BTN, ScrollArea, type ScrollAreaProps, SearchInput, type SearchInputProps, Section, SegmentedProgress, SelectDropdown, Sheet, SidebarSheet, SimplePagination, type SimplePaginationProps, SimpleTabs, Skeleton, SkeletonAvatar, SkeletonButton, SkeletonCard, SkeletonList, SkeletonMessage, SkeletonPost, SkeletonTable, SkeletonText, SlideOver, Slider, type SliderProps, SmartImage, type Song, type Sorter, StatusBadge, StepProgress, 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, Tooltip, TranslationProvider, type TranslationProviderProps, type Translations, UEditor, type UEditorInlineUploadedItem, UEditorPrepareContentForSaveError, type UEditorPrepareContentForSaveOptions, type UEditorPrepareContentForSaveResult, type UEditorProps, type UEditorRef, type UEditorUploadImageForSave, type UEditorUploadImageForSaveResult, type UEditorVariant, type UnderverseLocale, UnderverseProvider, type UnderverseProviderProps, type UploadedFile, type UploadedImage, type UseOverlayScrollbarTargetOptions, VARIANT_STYLES_ALERT, VARIANT_STYLES_BTN, VIETNAM_HOLIDAYS, VerticalTabs, Watermark, type WatermarkProps, cn$1 as cn, cn as cnLocal, extractImageSrcsFromHtml, getAnimationStyles, getUnderverseMessages, injectAnimationStyles, loading, normalizeImageUrl, prepareUEditorContentForSave, shadcnAnimationStyles, underverseMessages, useFormField, useOverlayScrollbarTarget, useShadCNAnimations, useSmartLocale, useSmartTranslations, useToast, useTranslations as useUnderverseI18n, useLocale as useUnderverseI18nLocale, useUnderverseLocale, useUnderverseTranslations };
|
package/dist/index.d.ts
CHANGED
|
@@ -1803,10 +1803,24 @@ interface FileUploadProps {
|
|
|
1803
1803
|
declare function FileUpload({ onUpload, onRemove, onChange, uploadHandler, maxSize, // Default 50MB
|
|
1804
1804
|
maxFiles, accept, multiple, disabled, className, showFileList, variant, size, dragDropText, browseText, supportedFormatsText, showTypeIcons, allowPreview, initialFiles, }: FileUploadProps): react_jsx_runtime.JSX.Element;
|
|
1805
1805
|
|
|
1806
|
-
type AnimationVariant$1 = "slide" | "fade" | "scale";
|
|
1806
|
+
type AnimationVariant$1 = "slide" | "fade" | "scale" | "coverflow" | "stack";
|
|
1807
1807
|
type Orientation = "horizontal" | "vertical";
|
|
1808
|
+
type CarouselEffectPreset = "cinematic" | "gallery" | "poster" | "minimal";
|
|
1809
|
+
interface CarouselEffectOptions {
|
|
1810
|
+
mainScale?: number;
|
|
1811
|
+
sideScale?: number;
|
|
1812
|
+
farScale?: number;
|
|
1813
|
+
sideOpacity?: number;
|
|
1814
|
+
farOpacity?: number;
|
|
1815
|
+
sideOffset?: number;
|
|
1816
|
+
rotate?: number;
|
|
1817
|
+
depthStep?: number;
|
|
1818
|
+
blur?: number;
|
|
1819
|
+
stackOffset?: number;
|
|
1820
|
+
stackLift?: number;
|
|
1821
|
+
}
|
|
1808
1822
|
interface CarouselProps {
|
|
1809
|
-
children: React$1.ReactNode
|
|
1823
|
+
children: React$1.ReactNode;
|
|
1810
1824
|
autoScroll?: boolean;
|
|
1811
1825
|
autoScrollInterval?: number;
|
|
1812
1826
|
animation?: AnimationVariant$1;
|
|
@@ -1824,8 +1838,10 @@ interface CarouselProps {
|
|
|
1824
1838
|
onSlideChange?: (index: number) => void;
|
|
1825
1839
|
thumbnailRenderer?: (child: React$1.ReactNode, index: number) => React$1.ReactNode;
|
|
1826
1840
|
ariaLabel?: string;
|
|
1841
|
+
effectPreset?: CarouselEffectPreset;
|
|
1842
|
+
effectOptions?: CarouselEffectOptions;
|
|
1827
1843
|
}
|
|
1828
|
-
declare function Carousel({ children, autoScroll, autoScrollInterval, animation, orientation, showArrows, showDots, showProgress, showThumbnails, loop, slidesToShow, slidesToScroll, className, containerClassName, slideClassName, onSlideChange, thumbnailRenderer, ariaLabel, }: CarouselProps): react_jsx_runtime.JSX.Element;
|
|
1844
|
+
declare function Carousel({ children, autoScroll, autoScrollInterval, animation, orientation, showArrows, showDots, showProgress, showThumbnails, loop, slidesToShow, slidesToScroll, className, containerClassName, slideClassName, onSlideChange, thumbnailRenderer, ariaLabel, effectPreset, effectOptions, }: CarouselProps): react_jsx_runtime.JSX.Element;
|
|
1829
1845
|
|
|
1830
1846
|
type IconComponent = React__default.ComponentType<{
|
|
1831
1847
|
className?: string;
|
|
@@ -4547,4 +4563,4 @@ declare function getUnderverseMessages(locale?: UnderverseLocale): {
|
|
|
4547
4563
|
};
|
|
4548
4564
|
};
|
|
4549
4565
|
|
|
4550
|
-
export { AccessDenied, type AccessDeniedProps, Alert, Avatar, Badge, Badge as BadgeBase, BatteryProgress, BottomSheet, 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 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 DataTableProps, type DataTableQuery, type DataTableSize, DatePicker, type DatePickerProps, DateRangePicker, type DateRangePickerProps, DateTimePicker, type DateTimePickerProps, date as DateUtils, Drawer, DropdownMenu, DropdownMenuItem, DropdownMenuSeparator, FallingIcons, FileUpload, type FileUploadProps, type FilterType, ForceInternalTranslationsProvider, Form, FormActions, FormCheckbox, FormControl, FormDescription, FormField, FormInput, FormItem, FormLabel, FormMessage, FormSubmitButton, 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$1 as Locale, MiniProgress, Modal, MonthYearPicker, MonthYearPicker as MonthYearPickerBase, type MonthYearPickerProps, MultiCombobox, type MultiComboboxOption, type MultiComboboxProps, MusicPlayer, MusicPlayer as MusicPlayerDefault, type MusicPlayerProps, 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, RadioGroup, RadioGroupItem, SIZE_STYLES_BTN, ScrollArea, type ScrollAreaProps, SearchInput, type SearchInputProps, Section, SegmentedProgress, SelectDropdown, Sheet, SidebarSheet, SimplePagination, type SimplePaginationProps, SimpleTabs, Skeleton, SkeletonAvatar, SkeletonButton, SkeletonCard, SkeletonList, SkeletonMessage, SkeletonPost, SkeletonTable, SkeletonText, SlideOver, Slider, type SliderProps, SmartImage, type Song, type Sorter, StatusBadge, StepProgress, 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, Tooltip, TranslationProvider, type TranslationProviderProps, type Translations, UEditor, type UEditorInlineUploadedItem, UEditorPrepareContentForSaveError, type UEditorPrepareContentForSaveOptions, type UEditorPrepareContentForSaveResult, type UEditorProps, type UEditorRef, type UEditorUploadImageForSave, type UEditorUploadImageForSaveResult, type UEditorVariant, type UnderverseLocale, UnderverseProvider, type UnderverseProviderProps, type UploadedFile, type UploadedImage, type UseOverlayScrollbarTargetOptions, VARIANT_STYLES_ALERT, VARIANT_STYLES_BTN, VIETNAM_HOLIDAYS, VerticalTabs, Watermark, type WatermarkProps, cn$1 as cn, cn as cnLocal, extractImageSrcsFromHtml, getAnimationStyles, getUnderverseMessages, injectAnimationStyles, loading, normalizeImageUrl, prepareUEditorContentForSave, shadcnAnimationStyles, underverseMessages, useFormField, useOverlayScrollbarTarget, useShadCNAnimations, useSmartLocale, useSmartTranslations, useToast, useTranslations as useUnderverseI18n, useLocale as useUnderverseI18nLocale, useUnderverseLocale, useUnderverseTranslations };
|
|
4566
|
+
export { AccessDenied, type AccessDeniedProps, Alert, Avatar, Badge, Badge as BadgeBase, BatteryProgress, BottomSheet, 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 DataTableProps, type DataTableQuery, type DataTableSize, DatePicker, type DatePickerProps, DateRangePicker, type DateRangePickerProps, DateTimePicker, type DateTimePickerProps, date as DateUtils, Drawer, DropdownMenu, DropdownMenuItem, DropdownMenuSeparator, FallingIcons, FileUpload, type FileUploadProps, type FilterType, ForceInternalTranslationsProvider, Form, FormActions, FormCheckbox, FormControl, FormDescription, FormField, FormInput, FormItem, FormLabel, FormMessage, FormSubmitButton, 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$1 as Locale, MiniProgress, Modal, MonthYearPicker, MonthYearPicker as MonthYearPickerBase, type MonthYearPickerProps, MultiCombobox, type MultiComboboxOption, type MultiComboboxProps, MusicPlayer, MusicPlayer as MusicPlayerDefault, type MusicPlayerProps, 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, RadioGroup, RadioGroupItem, SIZE_STYLES_BTN, ScrollArea, type ScrollAreaProps, SearchInput, type SearchInputProps, Section, SegmentedProgress, SelectDropdown, Sheet, SidebarSheet, SimplePagination, type SimplePaginationProps, SimpleTabs, Skeleton, SkeletonAvatar, SkeletonButton, SkeletonCard, SkeletonList, SkeletonMessage, SkeletonPost, SkeletonTable, SkeletonText, SlideOver, Slider, type SliderProps, SmartImage, type Song, type Sorter, StatusBadge, StepProgress, 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, Tooltip, TranslationProvider, type TranslationProviderProps, type Translations, UEditor, type UEditorInlineUploadedItem, UEditorPrepareContentForSaveError, type UEditorPrepareContentForSaveOptions, type UEditorPrepareContentForSaveResult, type UEditorProps, type UEditorRef, type UEditorUploadImageForSave, type UEditorUploadImageForSaveResult, type UEditorVariant, type UnderverseLocale, UnderverseProvider, type UnderverseProviderProps, type UploadedFile, type UploadedImage, type UseOverlayScrollbarTargetOptions, VARIANT_STYLES_ALERT, VARIANT_STYLES_BTN, VIETNAM_HOLIDAYS, VerticalTabs, Watermark, type WatermarkProps, cn$1 as cn, cn as cnLocal, extractImageSrcsFromHtml, getAnimationStyles, getUnderverseMessages, injectAnimationStyles, loading, normalizeImageUrl, prepareUEditorContentForSave, shadcnAnimationStyles, underverseMessages, useFormField, useOverlayScrollbarTarget, useShadCNAnimations, useSmartLocale, useSmartTranslations, useToast, useTranslations as useUnderverseI18n, useLocale as useUnderverseI18nLocale, useUnderverseLocale, useUnderverseTranslations };
|
package/dist/index.js
CHANGED
|
@@ -16182,20 +16182,139 @@ function Carousel({
|
|
|
16182
16182
|
slideClassName,
|
|
16183
16183
|
onSlideChange,
|
|
16184
16184
|
thumbnailRenderer,
|
|
16185
|
-
ariaLabel = "Carousel"
|
|
16185
|
+
ariaLabel = "Carousel",
|
|
16186
|
+
effectPreset,
|
|
16187
|
+
effectOptions
|
|
16186
16188
|
}) {
|
|
16187
16189
|
const [currentIndex, setCurrentIndex] = React42.useState(0);
|
|
16188
16190
|
const [isPaused, setIsPaused] = React42.useState(false);
|
|
16189
|
-
const [isDragging, setIsDragging] = React42.useState(false);
|
|
16190
|
-
const [startPos, setStartPos] = React42.useState(0);
|
|
16191
|
-
const [currentTranslate, setCurrentTranslate] = React42.useState(0);
|
|
16192
|
-
const [prevTranslate, setPrevTranslate] = React42.useState(0);
|
|
16193
16191
|
const progressElRef = React42.useRef(null);
|
|
16194
16192
|
const carouselRef = React42.useRef(null);
|
|
16195
16193
|
const rafRef = React42.useRef(null);
|
|
16196
|
-
const
|
|
16197
|
-
const
|
|
16194
|
+
const isDraggingRef = React42.useRef(false);
|
|
16195
|
+
const startPosRef = React42.useRef(0);
|
|
16196
|
+
const lastDragPositionRef = React42.useRef(0);
|
|
16197
|
+
const slides = React42.useMemo(() => React42.Children.toArray(children), [children]);
|
|
16198
|
+
const totalSlides = slides.length;
|
|
16198
16199
|
const isHorizontal = orientation === "horizontal";
|
|
16200
|
+
const effectiveAnimation = slidesToShow > 1 && !["slide", "coverflow", "stack"].includes(animation) ? "slide" : animation;
|
|
16201
|
+
const isDeckAnimation = effectiveAnimation === "coverflow" || effectiveAnimation === "stack";
|
|
16202
|
+
const effectiveSlidesToShow = isDeckAnimation ? 1 : slidesToShow;
|
|
16203
|
+
const maxIndex = Math.max(0, totalSlides - effectiveSlidesToShow);
|
|
16204
|
+
const shouldShowArrows = showArrows && isHorizontal;
|
|
16205
|
+
const presetEffectOptions = React42.useMemo(() => {
|
|
16206
|
+
if (effectPreset === "cinematic") {
|
|
16207
|
+
return effectiveAnimation === "stack" ? {
|
|
16208
|
+
mainScale: 1.08,
|
|
16209
|
+
sideScale: 0.9,
|
|
16210
|
+
farScale: 0.84,
|
|
16211
|
+
sideOpacity: 0.68,
|
|
16212
|
+
farOpacity: 0.3,
|
|
16213
|
+
depthStep: 76,
|
|
16214
|
+
blur: 2.2,
|
|
16215
|
+
stackOffset: 16,
|
|
16216
|
+
stackLift: 16
|
|
16217
|
+
} : {
|
|
16218
|
+
mainScale: 1.12,
|
|
16219
|
+
sideScale: 0.82,
|
|
16220
|
+
farScale: 0.72,
|
|
16221
|
+
sideOpacity: 0.72,
|
|
16222
|
+
farOpacity: 0.24,
|
|
16223
|
+
sideOffset: 22,
|
|
16224
|
+
rotate: 20,
|
|
16225
|
+
depthStep: 120,
|
|
16226
|
+
blur: 2.6
|
|
16227
|
+
};
|
|
16228
|
+
}
|
|
16229
|
+
if (effectPreset === "gallery") {
|
|
16230
|
+
return effectiveAnimation === "stack" ? {
|
|
16231
|
+
mainScale: 1.03,
|
|
16232
|
+
sideScale: 0.94,
|
|
16233
|
+
farScale: 0.88,
|
|
16234
|
+
sideOpacity: 0.82,
|
|
16235
|
+
farOpacity: 0.5,
|
|
16236
|
+
depthStep: 50,
|
|
16237
|
+
blur: 0.8,
|
|
16238
|
+
stackOffset: 24,
|
|
16239
|
+
stackLift: 8
|
|
16240
|
+
} : {
|
|
16241
|
+
mainScale: 1.05,
|
|
16242
|
+
sideScale: 0.9,
|
|
16243
|
+
farScale: 0.82,
|
|
16244
|
+
sideOpacity: 0.84,
|
|
16245
|
+
farOpacity: 0.48,
|
|
16246
|
+
sideOffset: 30,
|
|
16247
|
+
rotate: 16,
|
|
16248
|
+
depthStep: 78,
|
|
16249
|
+
blur: 1
|
|
16250
|
+
};
|
|
16251
|
+
}
|
|
16252
|
+
if (effectPreset === "poster") {
|
|
16253
|
+
return effectiveAnimation === "stack" ? {
|
|
16254
|
+
mainScale: 1.12,
|
|
16255
|
+
sideScale: 0.88,
|
|
16256
|
+
farScale: 0.78,
|
|
16257
|
+
sideOpacity: 0.64,
|
|
16258
|
+
farOpacity: 0.22,
|
|
16259
|
+
depthStep: 92,
|
|
16260
|
+
blur: 2.8,
|
|
16261
|
+
stackOffset: 14,
|
|
16262
|
+
stackLift: 18
|
|
16263
|
+
} : {
|
|
16264
|
+
mainScale: 1.16,
|
|
16265
|
+
sideScale: 0.78,
|
|
16266
|
+
farScale: 0.68,
|
|
16267
|
+
sideOpacity: 0.68,
|
|
16268
|
+
farOpacity: 0.18,
|
|
16269
|
+
sideOffset: 18,
|
|
16270
|
+
rotate: 26,
|
|
16271
|
+
depthStep: 140,
|
|
16272
|
+
blur: 3
|
|
16273
|
+
};
|
|
16274
|
+
}
|
|
16275
|
+
if (effectPreset === "minimal") {
|
|
16276
|
+
return effectiveAnimation === "stack" ? {
|
|
16277
|
+
mainScale: 1.01,
|
|
16278
|
+
sideScale: 0.96,
|
|
16279
|
+
farScale: 0.92,
|
|
16280
|
+
sideOpacity: 0.88,
|
|
16281
|
+
farOpacity: 0.66,
|
|
16282
|
+
depthStep: 36,
|
|
16283
|
+
blur: 0,
|
|
16284
|
+
stackOffset: 26,
|
|
16285
|
+
stackLift: 6
|
|
16286
|
+
} : {
|
|
16287
|
+
mainScale: 1.02,
|
|
16288
|
+
sideScale: 0.94,
|
|
16289
|
+
farScale: 0.88,
|
|
16290
|
+
sideOpacity: 0.9,
|
|
16291
|
+
farOpacity: 0.62,
|
|
16292
|
+
sideOffset: 34,
|
|
16293
|
+
rotate: 10,
|
|
16294
|
+
depthStep: 54,
|
|
16295
|
+
blur: 0
|
|
16296
|
+
};
|
|
16297
|
+
}
|
|
16298
|
+
return {};
|
|
16299
|
+
}, [effectPreset, effectiveAnimation]);
|
|
16300
|
+
const mergedEffectOptions = React42.useMemo(
|
|
16301
|
+
() => ({
|
|
16302
|
+
mainScale: 1.04,
|
|
16303
|
+
sideScale: effectiveAnimation === "stack" ? 0.93 : 0.88,
|
|
16304
|
+
farScale: effectiveAnimation === "stack" ? 0.86 : 0.76,
|
|
16305
|
+
sideOpacity: effectiveAnimation === "stack" ? 0.74 : 0.78,
|
|
16306
|
+
farOpacity: effectiveAnimation === "stack" ? 0.42 : 0.38,
|
|
16307
|
+
sideOffset: effectiveAnimation === "stack" ? 20 : 28,
|
|
16308
|
+
rotate: 24,
|
|
16309
|
+
depthStep: effectiveAnimation === "stack" ? 60 : 90,
|
|
16310
|
+
blur: 1.5,
|
|
16311
|
+
stackOffset: 20,
|
|
16312
|
+
stackLift: 12,
|
|
16313
|
+
...presetEffectOptions,
|
|
16314
|
+
...effectOptions
|
|
16315
|
+
}),
|
|
16316
|
+
[effectOptions, effectiveAnimation, presetEffectOptions]
|
|
16317
|
+
);
|
|
16199
16318
|
const scrollPrev = React42.useCallback(() => {
|
|
16200
16319
|
setCurrentIndex((prev) => {
|
|
16201
16320
|
if (prev === 0) {
|
|
@@ -16218,8 +16337,8 @@ function Carousel({
|
|
|
16218
16337
|
},
|
|
16219
16338
|
[maxIndex]
|
|
16220
16339
|
);
|
|
16221
|
-
React42.
|
|
16222
|
-
|
|
16340
|
+
const handleKeyDown = React42.useCallback(
|
|
16341
|
+
(e) => {
|
|
16223
16342
|
if (e.key === "ArrowLeft" || e.key === "ArrowUp") {
|
|
16224
16343
|
e.preventDefault();
|
|
16225
16344
|
scrollPrev();
|
|
@@ -16233,13 +16352,9 @@ function Carousel({
|
|
|
16233
16352
|
e.preventDefault();
|
|
16234
16353
|
scrollTo(maxIndex);
|
|
16235
16354
|
}
|
|
16236
|
-
}
|
|
16237
|
-
|
|
16238
|
-
|
|
16239
|
-
carousel.addEventListener("keydown", handleKeyDown);
|
|
16240
|
-
return () => carousel.removeEventListener("keydown", handleKeyDown);
|
|
16241
|
-
}
|
|
16242
|
-
}, [scrollPrev, scrollNext, scrollTo, maxIndex]);
|
|
16355
|
+
},
|
|
16356
|
+
[scrollPrev, scrollNext, scrollTo, maxIndex]
|
|
16357
|
+
);
|
|
16243
16358
|
React42.useEffect(() => {
|
|
16244
16359
|
const stop = () => {
|
|
16245
16360
|
if (rafRef.current != null) {
|
|
@@ -16248,7 +16363,7 @@ function Carousel({
|
|
|
16248
16363
|
}
|
|
16249
16364
|
if (progressElRef.current) progressElRef.current.style.width = "0%";
|
|
16250
16365
|
};
|
|
16251
|
-
if (!autoScroll || isPaused || totalSlides <=
|
|
16366
|
+
if (!autoScroll || isPaused || totalSlides <= effectiveSlidesToShow) {
|
|
16252
16367
|
stop();
|
|
16253
16368
|
return;
|
|
16254
16369
|
}
|
|
@@ -16267,7 +16382,7 @@ function Carousel({
|
|
|
16267
16382
|
};
|
|
16268
16383
|
rafRef.current = requestAnimationFrame(tick);
|
|
16269
16384
|
return stop;
|
|
16270
|
-
}, [autoScroll, isPaused, totalSlides,
|
|
16385
|
+
}, [autoScroll, isPaused, totalSlides, effectiveSlidesToShow, autoScrollInterval, scrollNext]);
|
|
16271
16386
|
const getPositionX = (event) => {
|
|
16272
16387
|
return event.type.includes("mouse") ? event.pageX : event.touches[0].clientX;
|
|
16273
16388
|
};
|
|
@@ -16275,60 +16390,100 @@ function Carousel({
|
|
|
16275
16390
|
return event.type.includes("mouse") ? event.pageY : event.touches[0].clientY;
|
|
16276
16391
|
};
|
|
16277
16392
|
const touchStart = (event) => {
|
|
16278
|
-
|
|
16393
|
+
isDraggingRef.current = true;
|
|
16279
16394
|
const pos = isHorizontal ? getPositionX(event.nativeEvent) : getPositionY(event.nativeEvent);
|
|
16280
|
-
|
|
16281
|
-
|
|
16395
|
+
startPosRef.current = pos;
|
|
16396
|
+
lastDragPositionRef.current = pos;
|
|
16282
16397
|
};
|
|
16283
16398
|
const touchMove = (event) => {
|
|
16284
|
-
if (!
|
|
16399
|
+
if (!isDraggingRef.current) return;
|
|
16285
16400
|
const pos = isHorizontal ? getPositionX(event.nativeEvent) : getPositionY(event.nativeEvent);
|
|
16286
|
-
|
|
16287
|
-
setCurrentTranslate(prevTranslate + currentPosition - startPos);
|
|
16401
|
+
lastDragPositionRef.current = pos;
|
|
16288
16402
|
};
|
|
16289
16403
|
const touchEnd = () => {
|
|
16290
|
-
if (!
|
|
16291
|
-
|
|
16292
|
-
const movedBy =
|
|
16404
|
+
if (!isDraggingRef.current) return;
|
|
16405
|
+
isDraggingRef.current = false;
|
|
16406
|
+
const movedBy = lastDragPositionRef.current - startPosRef.current;
|
|
16293
16407
|
const threshold = 50;
|
|
16294
|
-
if (movedBy < -threshold
|
|
16408
|
+
if (movedBy < -threshold) {
|
|
16295
16409
|
scrollNext();
|
|
16296
|
-
} else if (movedBy > threshold
|
|
16410
|
+
} else if (movedBy > threshold) {
|
|
16297
16411
|
scrollPrev();
|
|
16298
16412
|
}
|
|
16299
|
-
|
|
16300
|
-
|
|
16413
|
+
startPosRef.current = 0;
|
|
16414
|
+
lastDragPositionRef.current = 0;
|
|
16301
16415
|
};
|
|
16302
16416
|
React42.useEffect(() => {
|
|
16303
16417
|
onSlideChange?.(currentIndex);
|
|
16304
16418
|
}, [currentIndex, onSlideChange]);
|
|
16305
16419
|
const getAnimationStyles2 = () => {
|
|
16306
|
-
|
|
16307
|
-
|
|
16308
|
-
return {
|
|
16309
|
-
transition: "opacity 500ms ease-in-out"
|
|
16310
|
-
};
|
|
16311
|
-
}
|
|
16312
|
-
if (animation === "scale") {
|
|
16313
|
-
return {
|
|
16314
|
-
transform: baseTransform,
|
|
16315
|
-
transition: "transform 500ms ease-in-out, scale 500ms ease-in-out"
|
|
16316
|
-
};
|
|
16420
|
+
if (effectiveAnimation !== "slide") {
|
|
16421
|
+
return {};
|
|
16317
16422
|
}
|
|
16423
|
+
const baseTransform = isHorizontal ? `translateX(-${currentIndex * (100 / effectiveSlidesToShow)}%)` : `translateY(-${currentIndex * (100 / effectiveSlidesToShow)}%)`;
|
|
16318
16424
|
return {
|
|
16319
16425
|
transform: baseTransform,
|
|
16320
|
-
transition:
|
|
16426
|
+
transition: "transform 500ms ease-in-out"
|
|
16321
16427
|
};
|
|
16322
16428
|
};
|
|
16323
|
-
const slideWidth = 100 /
|
|
16429
|
+
const slideWidth = 100 / effectiveSlidesToShow;
|
|
16430
|
+
const getLoopDistance = React42.useCallback(
|
|
16431
|
+
(index) => {
|
|
16432
|
+
if (totalSlides <= 0) return 0;
|
|
16433
|
+
const forward = index - currentIndex;
|
|
16434
|
+
if (!loop) return forward;
|
|
16435
|
+
const altForward = forward - totalSlides;
|
|
16436
|
+
const altBackward = forward + totalSlides;
|
|
16437
|
+
const candidates = [forward, altForward, altBackward];
|
|
16438
|
+
return candidates.reduce((best, candidate) => Math.abs(candidate) < Math.abs(best) ? candidate : best, candidates[0] ?? 0);
|
|
16439
|
+
},
|
|
16440
|
+
[currentIndex, loop, totalSlides]
|
|
16441
|
+
);
|
|
16442
|
+
const getDeckSlideStyles = React42.useCallback(
|
|
16443
|
+
(index) => {
|
|
16444
|
+
const distance = getLoopDistance(index);
|
|
16445
|
+
const absDistance = Math.abs(distance);
|
|
16446
|
+
const hidden = absDistance > 2;
|
|
16447
|
+
if (hidden) {
|
|
16448
|
+
return {
|
|
16449
|
+
opacity: 0,
|
|
16450
|
+
pointerEvents: "none",
|
|
16451
|
+
transform: `translate3d(0, 0, -${mergedEffectOptions.depthStep * 2}px) scale(${mergedEffectOptions.farScale})`,
|
|
16452
|
+
filter: `blur(${mergedEffectOptions.blur * 1.4}px)`
|
|
16453
|
+
};
|
|
16454
|
+
}
|
|
16455
|
+
if (effectiveAnimation === "stack") {
|
|
16456
|
+
const xOffset2 = distance * mergedEffectOptions.stackOffset;
|
|
16457
|
+
const yOffset = absDistance * mergedEffectOptions.stackLift;
|
|
16458
|
+
const scale2 = distance === 0 ? mergedEffectOptions.mainScale : distance === 1 || distance === -1 ? mergedEffectOptions.sideScale : mergedEffectOptions.farScale;
|
|
16459
|
+
return {
|
|
16460
|
+
opacity: distance === 0 ? 1 : distance === 1 || distance === -1 ? mergedEffectOptions.sideOpacity : mergedEffectOptions.farOpacity,
|
|
16461
|
+
transform: `translate3d(${xOffset2}px, ${yOffset}px, -${absDistance * mergedEffectOptions.depthStep}px) scale(${scale2})`,
|
|
16462
|
+
filter: distance === 0 ? "blur(0px)" : `blur(${Math.min(absDistance, 2) * mergedEffectOptions.blur}px)`,
|
|
16463
|
+
pointerEvents: distance === 0 ? "auto" : "none"
|
|
16464
|
+
};
|
|
16465
|
+
}
|
|
16466
|
+
const xOffset = distance * mergedEffectOptions.sideOffset;
|
|
16467
|
+
const rotateY = distance * -mergedEffectOptions.rotate;
|
|
16468
|
+
const scale = distance === 0 ? mergedEffectOptions.mainScale : distance === 1 || distance === -1 ? mergedEffectOptions.sideScale : mergedEffectOptions.farScale;
|
|
16469
|
+
return {
|
|
16470
|
+
opacity: distance === 0 ? 1 : distance === 1 || distance === -1 ? mergedEffectOptions.sideOpacity : mergedEffectOptions.farOpacity,
|
|
16471
|
+
transform: `translate3d(${xOffset}%, 0, -${absDistance * mergedEffectOptions.depthStep}px) rotateY(${rotateY}deg) scale(${scale})`,
|
|
16472
|
+
filter: distance === 0 ? "blur(0px)" : `blur(${Math.min(absDistance, 2) * mergedEffectOptions.blur}px)`,
|
|
16473
|
+
pointerEvents: distance === 0 ? "auto" : "none"
|
|
16474
|
+
};
|
|
16475
|
+
},
|
|
16476
|
+
[effectiveAnimation, getLoopDistance, mergedEffectOptions]
|
|
16477
|
+
);
|
|
16324
16478
|
return /* @__PURE__ */ jsxs41(
|
|
16325
16479
|
"div",
|
|
16326
16480
|
{
|
|
16327
16481
|
ref: carouselRef,
|
|
16328
16482
|
className: cn(
|
|
16329
|
-
"relative w-full overflow-hidden focus:outline-none focus:ring-2 focus:ring-primary focus:ring-offset-2 rounded-
|
|
16483
|
+
"relative w-full overflow-hidden focus:outline-none focus:ring-2 focus:ring-primary focus:ring-offset-2 rounded-xl md:rounded-3xl",
|
|
16330
16484
|
className
|
|
16331
16485
|
),
|
|
16486
|
+
onKeyDown: handleKeyDown,
|
|
16332
16487
|
onMouseEnter: () => setIsPaused(true),
|
|
16333
16488
|
onMouseLeave: () => setIsPaused(false),
|
|
16334
16489
|
role: "region",
|
|
@@ -16340,8 +16495,14 @@ function Carousel({
|
|
|
16340
16495
|
/* @__PURE__ */ jsx49(
|
|
16341
16496
|
"div",
|
|
16342
16497
|
{
|
|
16343
|
-
className: cn(
|
|
16344
|
-
|
|
16498
|
+
className: cn(
|
|
16499
|
+
effectiveAnimation === "slide" ? "flex" : "grid",
|
|
16500
|
+
effectiveAnimation === "slide" && (isHorizontal ? "flex-row" : "flex-col h-full"),
|
|
16501
|
+
isDeckAnimation && "place-items-center [transform-style:preserve-3d]",
|
|
16502
|
+
isHorizontal ? "touch-pan-y" : "touch-pan-x",
|
|
16503
|
+
containerClassName
|
|
16504
|
+
),
|
|
16505
|
+
style: isDeckAnimation ? { perspective: "1400px" } : getAnimationStyles2(),
|
|
16345
16506
|
onTouchStart: touchStart,
|
|
16346
16507
|
onTouchMove: touchMove,
|
|
16347
16508
|
onTouchEnd: touchEnd,
|
|
@@ -16352,30 +16513,30 @@ function Carousel({
|
|
|
16352
16513
|
role: "group",
|
|
16353
16514
|
"aria-atomic": "false",
|
|
16354
16515
|
"aria-live": autoScroll ? "off" : "polite",
|
|
16355
|
-
children:
|
|
16516
|
+
children: slides.map((child, idx) => /* @__PURE__ */ jsx49(
|
|
16356
16517
|
"div",
|
|
16357
16518
|
{
|
|
16358
16519
|
className: cn(
|
|
16359
16520
|
"shrink-0",
|
|
16360
|
-
isHorizontal ? "h-full" : "w-full",
|
|
16361
|
-
|
|
16362
|
-
|
|
16521
|
+
effectiveAnimation === "slide" ? isHorizontal ? "h-full" : "h-full w-full" : "col-start-1 row-start-1",
|
|
16522
|
+
effectiveAnimation === "fade" && (idx === currentIndex ? "opacity-100 z-10" : "opacity-0 pointer-events-none z-0"),
|
|
16523
|
+
effectiveAnimation === "scale" && (idx === currentIndex ? "opacity-100 scale-100 z-10" : "opacity-0 scale-95 pointer-events-none z-0"),
|
|
16524
|
+
isDeckAnimation && "w-full max-w-[78%] md:max-w-[72%] transition-[opacity,transform] duration-500 ease-out",
|
|
16525
|
+
effectiveAnimation !== "slide" && "transition-[opacity,transform] duration-500 ease-in-out",
|
|
16363
16526
|
slideClassName
|
|
16364
16527
|
),
|
|
16365
|
-
style: {
|
|
16366
|
-
[isHorizontal ? "width" : "height"]: `${slideWidth}%`
|
|
16367
|
-
},
|
|
16528
|
+
style: effectiveAnimation === "slide" ? { [isHorizontal ? "width" : "height"]: `${slideWidth}%` } : isDeckAnimation ? getDeckSlideStyles(idx) : void 0,
|
|
16368
16529
|
role: "group",
|
|
16369
16530
|
"aria-roledescription": "slide",
|
|
16370
16531
|
"aria-label": `${idx + 1} of ${totalSlides}`,
|
|
16371
|
-
"aria-hidden": idx < currentIndex || idx >= currentIndex + slidesToShow,
|
|
16532
|
+
"aria-hidden": effectiveAnimation === "slide" ? idx < currentIndex || idx >= currentIndex + slidesToShow : idx !== currentIndex,
|
|
16372
16533
|
children: child
|
|
16373
16534
|
},
|
|
16374
|
-
idx
|
|
16535
|
+
React42.isValidElement(child) && child.key || idx
|
|
16375
16536
|
))
|
|
16376
16537
|
}
|
|
16377
16538
|
),
|
|
16378
|
-
|
|
16539
|
+
shouldShowArrows && totalSlides > effectiveSlidesToShow && /* @__PURE__ */ jsxs41(Fragment17, { children: [
|
|
16379
16540
|
/* @__PURE__ */ jsx49(
|
|
16380
16541
|
Button_default,
|
|
16381
16542
|
{
|
|
@@ -16387,7 +16548,8 @@ function Carousel({
|
|
|
16387
16548
|
disabled: !loop && currentIndex === 0,
|
|
16388
16549
|
className: cn(
|
|
16389
16550
|
"absolute top-1/2 -translate-y-1/2 hover:-translate-y-1/2 active:-translate-y-1/2 z-10 rounded-full will-change-transform backdrop-blur-0 hover:backdrop-blur-0 hover:bg-transparent border-0",
|
|
16390
|
-
|
|
16551
|
+
"max-md:h-8 max-md:w-8 max-md:border max-md:border-border/60 max-md:bg-background/75 max-md:backdrop-blur-sm max-md:shadow-sm",
|
|
16552
|
+
isHorizontal ? "left-4 max-md:left-2" : "top-4 left-1/2 -translate-x-1/2 rotate-90 max-md:top-2"
|
|
16391
16553
|
),
|
|
16392
16554
|
"aria-label": "Previous slide"
|
|
16393
16555
|
}
|
|
@@ -16403,18 +16565,19 @@ function Carousel({
|
|
|
16403
16565
|
disabled: !loop && currentIndex >= maxIndex,
|
|
16404
16566
|
className: cn(
|
|
16405
16567
|
"absolute top-1/2 -translate-y-1/2 hover:-translate-y-1/2 active:-translate-y-1/2 z-10 rounded-full will-change-transform backdrop-blur-0 hover:backdrop-blur-0 hover:bg-transparent border-0",
|
|
16406
|
-
|
|
16568
|
+
"max-md:h-8 max-md:w-8 max-md:border max-md:border-border/60 max-md:bg-background/75 max-md:backdrop-blur-sm max-md:shadow-sm",
|
|
16569
|
+
isHorizontal ? "right-4 max-md:right-2" : "bottom-4 left-1/2 -translate-x-1/2 rotate-90 max-md:bottom-2"
|
|
16407
16570
|
),
|
|
16408
16571
|
"aria-label": "Next slide"
|
|
16409
16572
|
}
|
|
16410
16573
|
)
|
|
16411
16574
|
] }),
|
|
16412
|
-
showDots && totalSlides >
|
|
16575
|
+
showDots && totalSlides > effectiveSlidesToShow && /* @__PURE__ */ jsx49(
|
|
16413
16576
|
"div",
|
|
16414
16577
|
{
|
|
16415
16578
|
className: cn(
|
|
16416
16579
|
"absolute flex gap-2 z-10",
|
|
16417
|
-
isHorizontal ? "bottom-4 left-1/2 -translate-x-1/2 flex-row" : "right-4 top-1/2 -translate-y-1/2 flex-col"
|
|
16580
|
+
isHorizontal ? "bottom-4 left-1/2 -translate-x-1/2 flex-row max-md:bottom-2" : "right-4 top-1/2 -translate-y-1/2 flex-col max-md:right-2"
|
|
16418
16581
|
),
|
|
16419
16582
|
role: "tablist",
|
|
16420
16583
|
"aria-label": "Carousel pagination",
|
|
@@ -16424,8 +16587,9 @@ function Carousel({
|
|
|
16424
16587
|
onClick: () => scrollTo(idx),
|
|
16425
16588
|
className: cn(
|
|
16426
16589
|
"rounded-full transition-all focus:outline-none focus:ring-2 focus:ring-primary focus:ring-offset-2",
|
|
16590
|
+
"max-md:w-1.5 max-md:h-1.5",
|
|
16427
16591
|
isHorizontal ? "w-2 h-2" : "w-2 h-2",
|
|
16428
|
-
idx === currentIndex ? `bg-primary ${isHorizontal ? "w-6" : "h-6"}` : "bg-muted-foreground/50 hover:bg-muted-foreground/75"
|
|
16592
|
+
idx === currentIndex ? `bg-primary ${isHorizontal ? "w-6 max-md:w-4" : "h-6 max-md:h-4"}` : "bg-muted-foreground/50 hover:bg-muted-foreground/75"
|
|
16429
16593
|
),
|
|
16430
16594
|
"aria-label": `Go to slide ${idx + 1}`,
|
|
16431
16595
|
"aria-selected": idx === currentIndex,
|
|
@@ -16435,11 +16599,12 @@ function Carousel({
|
|
|
16435
16599
|
))
|
|
16436
16600
|
}
|
|
16437
16601
|
),
|
|
16438
|
-
showThumbnails && totalSlides >
|
|
16602
|
+
showThumbnails && totalSlides > effectiveSlidesToShow && /* @__PURE__ */ jsx49(
|
|
16439
16603
|
"div",
|
|
16440
16604
|
{
|
|
16441
16605
|
className: cn(
|
|
16442
16606
|
"absolute bottom-0 left-0 right-0 flex gap-2 p-4 bg-linear-to-t from-black/50 to-transparent overflow-x-auto",
|
|
16607
|
+
"max-md:gap-1.5 max-md:p-2",
|
|
16443
16608
|
isHorizontal ? "flex-row" : "flex-col"
|
|
16444
16609
|
),
|
|
16445
16610
|
children: React42.Children.map(children, (child, idx) => /* @__PURE__ */ jsx49(
|
|
@@ -16448,7 +16613,8 @@ function Carousel({
|
|
|
16448
16613
|
onClick: () => scrollTo(idx),
|
|
16449
16614
|
className: cn(
|
|
16450
16615
|
"shrink-0 w-16 h-16 rounded-lg overflow-hidden border-2 transition-all focus:outline-none focus:ring-2 focus:ring-primary",
|
|
16451
|
-
|
|
16616
|
+
"max-md:w-12 max-md:h-12",
|
|
16617
|
+
idx === currentIndex ? "border-primary md:scale-110" : "border-transparent opacity-70 hover:opacity-100"
|
|
16452
16618
|
),
|
|
16453
16619
|
"aria-label": `Thumbnail ${idx + 1}`,
|
|
16454
16620
|
children: thumbnailRenderer ? thumbnailRenderer(child, idx) : child
|
|
@@ -20791,7 +20957,7 @@ function useLocale() {
|
|
|
20791
20957
|
}
|
|
20792
20958
|
|
|
20793
20959
|
// src/components/UEditor/UEditor.tsx
|
|
20794
|
-
import React71, { useEffect as useEffect34, useImperativeHandle as useImperativeHandle3, useMemo as
|
|
20960
|
+
import React71, { useEffect as useEffect34, useImperativeHandle as useImperativeHandle3, useMemo as useMemo23, useRef as useRef30 } from "react";
|
|
20795
20961
|
import { useEditor, EditorContent } from "@tiptap/react";
|
|
20796
20962
|
|
|
20797
20963
|
// src/components/UEditor/extensions.ts
|
|
@@ -22605,12 +22771,12 @@ import {
|
|
|
22605
22771
|
} from "lucide-react";
|
|
22606
22772
|
|
|
22607
22773
|
// src/components/UEditor/colors.tsx
|
|
22608
|
-
import { useMemo as
|
|
22774
|
+
import { useMemo as useMemo20 } from "react";
|
|
22609
22775
|
import { X as X17 } from "lucide-react";
|
|
22610
22776
|
import { jsx as jsx74, jsxs as jsxs64 } from "react/jsx-runtime";
|
|
22611
22777
|
var useEditorColors = () => {
|
|
22612
22778
|
const t = useSmartTranslations("UEditor");
|
|
22613
|
-
const textColors =
|
|
22779
|
+
const textColors = useMemo20(
|
|
22614
22780
|
() => [
|
|
22615
22781
|
{ name: t("colors.default"), color: "inherit", cssClass: "text-foreground" },
|
|
22616
22782
|
{ name: t("colors.muted"), color: "var(--muted-foreground)", cssClass: "text-muted-foreground" },
|
|
@@ -22623,7 +22789,7 @@ var useEditorColors = () => {
|
|
|
22623
22789
|
],
|
|
22624
22790
|
[t]
|
|
22625
22791
|
);
|
|
22626
|
-
const highlightColors =
|
|
22792
|
+
const highlightColors = useMemo20(
|
|
22627
22793
|
() => [
|
|
22628
22794
|
{ name: t("colors.default"), color: "", cssClass: "" },
|
|
22629
22795
|
{ name: t("colors.muted"), color: "var(--muted)", cssClass: "bg-muted" },
|
|
@@ -22769,7 +22935,7 @@ var ImageInput = ({ onSubmit, onCancel }) => {
|
|
|
22769
22935
|
};
|
|
22770
22936
|
|
|
22771
22937
|
// src/components/UEditor/emoji-picker.tsx
|
|
22772
|
-
import { useState as useState43, useMemo as
|
|
22938
|
+
import { useState as useState43, useMemo as useMemo21, useRef as useRef27, useEffect as useEffect32 } from "react";
|
|
22773
22939
|
import { Search as Search6, X as X19, Smile as Smile2, Leaf, Utensils, Dumbbell, Lightbulb, Hash, Flag } from "lucide-react";
|
|
22774
22940
|
import { jsx as jsx76, jsxs as jsxs66 } from "react/jsx-runtime";
|
|
22775
22941
|
var CATEGORY_ICONS = {
|
|
@@ -22788,7 +22954,7 @@ var EmojiPicker = ({ onSelect, onClose }) => {
|
|
|
22788
22954
|
const scrollContainerRef = useRef27(null);
|
|
22789
22955
|
const categoryRefs = useRef27({});
|
|
22790
22956
|
const isUserScrolling = useRef27(false);
|
|
22791
|
-
const filteredCategories =
|
|
22957
|
+
const filteredCategories = useMemo21(() => {
|
|
22792
22958
|
if (!search.trim()) return EMOJI_LIST;
|
|
22793
22959
|
const query = search.toLowerCase();
|
|
22794
22960
|
return EMOJI_LIST.map((category) => ({
|
|
@@ -23450,7 +23616,7 @@ var EditorToolbar = ({
|
|
|
23450
23616
|
};
|
|
23451
23617
|
|
|
23452
23618
|
// src/components/UEditor/menus.tsx
|
|
23453
|
-
import React70, { useCallback as useCallback17, useEffect as useEffect33, useMemo as
|
|
23619
|
+
import React70, { useCallback as useCallback17, useEffect as useEffect33, useMemo as useMemo22, useRef as useRef29, useState as useState45 } from "react";
|
|
23454
23620
|
import { createPortal as createPortal8 } from "react-dom";
|
|
23455
23621
|
import {
|
|
23456
23622
|
Bold as BoldIcon2,
|
|
@@ -23494,7 +23660,7 @@ var SlashCommandMenu = ({ editor, onClose, filterText = "" }) => {
|
|
|
23494
23660
|
const t = useSmartTranslations("UEditor");
|
|
23495
23661
|
const [selectedIndex, setSelectedIndex] = useResettingIndex4(filterText);
|
|
23496
23662
|
const menuRef = useRef29(null);
|
|
23497
|
-
const allCommands =
|
|
23663
|
+
const allCommands = useMemo22(
|
|
23498
23664
|
() => [
|
|
23499
23665
|
{
|
|
23500
23666
|
icon: Type3,
|
|
@@ -23565,7 +23731,7 @@ var SlashCommandMenu = ({ editor, onClose, filterText = "" }) => {
|
|
|
23565
23731
|
],
|
|
23566
23732
|
[editor, t]
|
|
23567
23733
|
);
|
|
23568
|
-
const commands =
|
|
23734
|
+
const commands = useMemo22(() => {
|
|
23569
23735
|
if (!filterText) return allCommands;
|
|
23570
23736
|
const lowerFilter = filterText.toLowerCase();
|
|
23571
23737
|
return allCommands.filter((cmd) => cmd.label.toLowerCase().includes(lowerFilter) || cmd.description.toLowerCase().includes(lowerFilter));
|
|
@@ -24201,7 +24367,7 @@ var UEditor = React71.forwardRef(({
|
|
|
24201
24367
|
const t = useSmartTranslations("UEditor");
|
|
24202
24368
|
const effectivePlaceholder = placeholder ?? t("placeholder");
|
|
24203
24369
|
const inFlightPrepareRef = useRef30(null);
|
|
24204
|
-
const extensions =
|
|
24370
|
+
const extensions = useMemo23(
|
|
24205
24371
|
() => buildUEditorExtensions({ placeholder: effectivePlaceholder, translate: t, maxCharacters, uploadImage, imageInsertMode, editable }),
|
|
24206
24372
|
[effectivePlaceholder, t, maxCharacters, uploadImage, imageInsertMode, editable]
|
|
24207
24373
|
);
|