@underverse-ui/underverse 1.0.68 → 1.0.70
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 +1 -1
- package/dist/index.cjs +5185 -531
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +110 -57
- package/dist/index.d.ts +110 -57
- package/dist/index.js +5185 -518
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.d.cts
CHANGED
|
@@ -2597,14 +2597,14 @@ declare const VARIANT_STYLES_ALERT: {
|
|
|
2597
2597
|
error: string;
|
|
2598
2598
|
};
|
|
2599
2599
|
|
|
2600
|
-
type Locale
|
|
2600
|
+
type Locale = "en" | "vi" | "ko" | "ja";
|
|
2601
2601
|
type Translations = Record<string, Record<string, string | Record<string, string>>>;
|
|
2602
2602
|
interface TranslationProviderProps {
|
|
2603
2603
|
children: React$1.ReactNode;
|
|
2604
2604
|
/** Current locale. Defaults to "en" */
|
|
2605
|
-
locale?: Locale
|
|
2605
|
+
locale?: Locale;
|
|
2606
2606
|
/** Custom translations to merge with defaults */
|
|
2607
|
-
translations?: Partial<Record<Locale
|
|
2607
|
+
translations?: Partial<Record<Locale, Translations>>;
|
|
2608
2608
|
}
|
|
2609
2609
|
/**
|
|
2610
2610
|
* TranslationProvider for Underverse UI components.
|
|
@@ -2651,65 +2651,22 @@ declare const useUnderverseTranslations: (namespace: string) => (key: string) =>
|
|
|
2651
2651
|
*
|
|
2652
2652
|
* @returns The current locale ("en" or "vi")
|
|
2653
2653
|
*/
|
|
2654
|
-
declare const useUnderverseLocale: () => Locale
|
|
2654
|
+
declare const useUnderverseLocale: () => Locale;
|
|
2655
2655
|
|
|
2656
|
-
|
|
2656
|
+
interface NextIntlAdapterProps {
|
|
2657
2657
|
children: React$1.ReactNode;
|
|
2658
|
-
|
|
2658
|
+
locale?: string | null;
|
|
2659
|
+
messages?: Record<string, unknown> | null;
|
|
2660
|
+
}
|
|
2661
|
+
declare function NextIntlAdapter({ children, locale, messages }: NextIntlAdapterProps): react_jsx_runtime.JSX.Element;
|
|
2659
2662
|
declare const UnderverseNextIntlProvider: typeof NextIntlAdapter;
|
|
2660
2663
|
|
|
2661
|
-
|
|
2662
|
-
|
|
2663
|
-
|
|
2664
|
-
* This module provides a unified translation interface that:
|
|
2665
|
-
* 1. Uses next-intl when available (for Next.js projects)
|
|
2666
|
-
* 2. Falls back to @underverse-ui/underverse's internal translations
|
|
2667
|
-
*
|
|
2668
|
-
* Components should import from this file instead of directly from next-intl
|
|
2669
|
-
* to ensure compatibility with both Next.js and React projects.
|
|
2670
|
-
*/
|
|
2671
|
-
|
|
2672
|
-
type Locale = "en" | "vi" | "ko" | "ja";
|
|
2673
|
-
interface UnderverseProviderProps {
|
|
2674
|
-
children: React$1.ReactNode;
|
|
2675
|
-
/** Current locale. Defaults to "en" */
|
|
2676
|
-
locale?: Locale;
|
|
2677
|
-
/** Custom translations to merge with defaults */
|
|
2678
|
-
translations?: Record<string, Record<string, string | Record<string, string>>>;
|
|
2664
|
+
type LegacyTranslations = Record<string, Record<string, string | Record<string, string>>>;
|
|
2665
|
+
interface UnderverseProviderProps extends Omit<TranslationProviderProps, "translations"> {
|
|
2666
|
+
translations?: LegacyTranslations;
|
|
2679
2667
|
}
|
|
2680
|
-
/**
|
|
2681
|
-
* UnderverseProvider for standalone React usage (without next-intl).
|
|
2682
|
-
* Wrap your app with this provider to enable translations.
|
|
2683
|
-
*
|
|
2684
|
-
* @example
|
|
2685
|
-
* ```tsx
|
|
2686
|
-
* // For React (Vite, CRA, etc.) - without next-intl
|
|
2687
|
-
* import { UnderverseProvider, DatePicker } from "@underverse-ui/underverse";
|
|
2688
|
-
*
|
|
2689
|
-
* function App() {
|
|
2690
|
-
* return (
|
|
2691
|
-
* <UnderverseProvider locale="vi">
|
|
2692
|
-
* <DatePicker onChange={(date) => console.log(date)} />
|
|
2693
|
-
* </UnderverseProvider>
|
|
2694
|
-
* );
|
|
2695
|
-
* }
|
|
2696
|
-
* ```
|
|
2697
|
-
*/
|
|
2698
2668
|
declare const UnderverseProvider: React$1.FC<UnderverseProviderProps>;
|
|
2699
|
-
/**
|
|
2700
|
-
* Smart translation hook that works with both next-intl and standalone React.
|
|
2701
|
-
*
|
|
2702
|
-
* Priority:
|
|
2703
|
-
* 1. next-intl (if available and in NextIntlClientProvider)
|
|
2704
|
-
* 2. UnderverseProvider context
|
|
2705
|
-
* 3. English fallback defaults
|
|
2706
|
-
*
|
|
2707
|
-
* @param namespace - The translation namespace (e.g., "DatePicker", "Common")
|
|
2708
|
-
*/
|
|
2709
2669
|
declare function useTranslations(namespace: string): (key: string, params?: Record<string, unknown>) => string;
|
|
2710
|
-
/**
|
|
2711
|
-
* Smart locale hook that works with both next-intl and standalone React.
|
|
2712
|
-
*/
|
|
2713
2670
|
declare function useLocale(): Locale;
|
|
2714
2671
|
|
|
2715
2672
|
declare const ForceInternalTranslationsProvider: React$1.FC<{
|
|
@@ -2742,7 +2699,7 @@ declare function useSmartTranslations(namespace: string): (key: string) => strin
|
|
|
2742
2699
|
*
|
|
2743
2700
|
* @returns The current locale
|
|
2744
2701
|
*/
|
|
2745
|
-
declare function useSmartLocale(): Locale
|
|
2702
|
+
declare function useSmartLocale(): Locale;
|
|
2746
2703
|
|
|
2747
2704
|
type UEditorUploadImageForSaveResult = string | ({
|
|
2748
2705
|
url: string;
|
|
@@ -3036,9 +2993,21 @@ declare const underverseMessages: {
|
|
|
3036
2993
|
addColumnAfter: string;
|
|
3037
2994
|
addRowBefore: string;
|
|
3038
2995
|
addRowAfter: string;
|
|
2996
|
+
duplicateColumn: string;
|
|
2997
|
+
duplicateRow: string;
|
|
2998
|
+
clearColumnContents: string;
|
|
2999
|
+
clearRowContents: string;
|
|
3039
3000
|
deleteColumn: string;
|
|
3040
3001
|
deleteRow: string;
|
|
3041
3002
|
deleteTable: string;
|
|
3003
|
+
toggleHeaderRow: string;
|
|
3004
|
+
toggleHeaderColumn: string;
|
|
3005
|
+
openControls: string;
|
|
3006
|
+
quickAddColumnAfter: string;
|
|
3007
|
+
quickAddRowAfter: string;
|
|
3008
|
+
expandTable: string;
|
|
3009
|
+
dragRow: string;
|
|
3010
|
+
dragColumn: string;
|
|
3042
3011
|
};
|
|
3043
3012
|
};
|
|
3044
3013
|
};
|
|
@@ -3266,9 +3235,21 @@ declare const underverseMessages: {
|
|
|
3266
3235
|
addColumnAfter: string;
|
|
3267
3236
|
addRowBefore: string;
|
|
3268
3237
|
addRowAfter: string;
|
|
3238
|
+
duplicateColumn: string;
|
|
3239
|
+
duplicateRow: string;
|
|
3240
|
+
clearColumnContents: string;
|
|
3241
|
+
clearRowContents: string;
|
|
3269
3242
|
deleteColumn: string;
|
|
3270
3243
|
deleteRow: string;
|
|
3271
3244
|
deleteTable: string;
|
|
3245
|
+
toggleHeaderRow: string;
|
|
3246
|
+
toggleHeaderColumn: string;
|
|
3247
|
+
openControls: string;
|
|
3248
|
+
quickAddColumnAfter: string;
|
|
3249
|
+
quickAddRowAfter: string;
|
|
3250
|
+
expandTable: string;
|
|
3251
|
+
dragRow: string;
|
|
3252
|
+
dragColumn: string;
|
|
3272
3253
|
};
|
|
3273
3254
|
};
|
|
3274
3255
|
};
|
|
@@ -3495,9 +3476,21 @@ declare const underverseMessages: {
|
|
|
3495
3476
|
addColumnAfter: string;
|
|
3496
3477
|
addRowBefore: string;
|
|
3497
3478
|
addRowAfter: string;
|
|
3479
|
+
duplicateColumn: string;
|
|
3480
|
+
duplicateRow: string;
|
|
3481
|
+
clearColumnContents: string;
|
|
3482
|
+
clearRowContents: string;
|
|
3498
3483
|
deleteColumn: string;
|
|
3499
3484
|
deleteRow: string;
|
|
3500
3485
|
deleteTable: string;
|
|
3486
|
+
toggleHeaderRow: string;
|
|
3487
|
+
toggleHeaderColumn: string;
|
|
3488
|
+
openControls: string;
|
|
3489
|
+
quickAddColumnAfter: string;
|
|
3490
|
+
quickAddRowAfter: string;
|
|
3491
|
+
expandTable: string;
|
|
3492
|
+
dragRow: string;
|
|
3493
|
+
dragColumn: string;
|
|
3501
3494
|
};
|
|
3502
3495
|
};
|
|
3503
3496
|
};
|
|
@@ -3724,9 +3717,21 @@ declare const underverseMessages: {
|
|
|
3724
3717
|
addColumnAfter: string;
|
|
3725
3718
|
addRowBefore: string;
|
|
3726
3719
|
addRowAfter: string;
|
|
3720
|
+
duplicateColumn: string;
|
|
3721
|
+
duplicateRow: string;
|
|
3722
|
+
clearColumnContents: string;
|
|
3723
|
+
clearRowContents: string;
|
|
3727
3724
|
deleteColumn: string;
|
|
3728
3725
|
deleteRow: string;
|
|
3729
3726
|
deleteTable: string;
|
|
3727
|
+
toggleHeaderRow: string;
|
|
3728
|
+
toggleHeaderColumn: string;
|
|
3729
|
+
openControls: string;
|
|
3730
|
+
quickAddColumnAfter: string;
|
|
3731
|
+
quickAddRowAfter: string;
|
|
3732
|
+
expandTable: string;
|
|
3733
|
+
dragRow: string;
|
|
3734
|
+
dragColumn: string;
|
|
3730
3735
|
};
|
|
3731
3736
|
};
|
|
3732
3737
|
};
|
|
@@ -3956,9 +3961,21 @@ declare function getUnderverseMessages(locale?: UnderverseLocale): {
|
|
|
3956
3961
|
addColumnAfter: string;
|
|
3957
3962
|
addRowBefore: string;
|
|
3958
3963
|
addRowAfter: string;
|
|
3964
|
+
duplicateColumn: string;
|
|
3965
|
+
duplicateRow: string;
|
|
3966
|
+
clearColumnContents: string;
|
|
3967
|
+
clearRowContents: string;
|
|
3959
3968
|
deleteColumn: string;
|
|
3960
3969
|
deleteRow: string;
|
|
3961
3970
|
deleteTable: string;
|
|
3971
|
+
toggleHeaderRow: string;
|
|
3972
|
+
toggleHeaderColumn: string;
|
|
3973
|
+
openControls: string;
|
|
3974
|
+
quickAddColumnAfter: string;
|
|
3975
|
+
quickAddRowAfter: string;
|
|
3976
|
+
expandTable: string;
|
|
3977
|
+
dragRow: string;
|
|
3978
|
+
dragColumn: string;
|
|
3962
3979
|
};
|
|
3963
3980
|
};
|
|
3964
3981
|
} | {
|
|
@@ -4185,9 +4202,21 @@ declare function getUnderverseMessages(locale?: UnderverseLocale): {
|
|
|
4185
4202
|
addColumnAfter: string;
|
|
4186
4203
|
addRowBefore: string;
|
|
4187
4204
|
addRowAfter: string;
|
|
4205
|
+
duplicateColumn: string;
|
|
4206
|
+
duplicateRow: string;
|
|
4207
|
+
clearColumnContents: string;
|
|
4208
|
+
clearRowContents: string;
|
|
4188
4209
|
deleteColumn: string;
|
|
4189
4210
|
deleteRow: string;
|
|
4190
4211
|
deleteTable: string;
|
|
4212
|
+
toggleHeaderRow: string;
|
|
4213
|
+
toggleHeaderColumn: string;
|
|
4214
|
+
openControls: string;
|
|
4215
|
+
quickAddColumnAfter: string;
|
|
4216
|
+
quickAddRowAfter: string;
|
|
4217
|
+
expandTable: string;
|
|
4218
|
+
dragRow: string;
|
|
4219
|
+
dragColumn: string;
|
|
4191
4220
|
};
|
|
4192
4221
|
};
|
|
4193
4222
|
} | {
|
|
@@ -4413,9 +4442,21 @@ declare function getUnderverseMessages(locale?: UnderverseLocale): {
|
|
|
4413
4442
|
addColumnAfter: string;
|
|
4414
4443
|
addRowBefore: string;
|
|
4415
4444
|
addRowAfter: string;
|
|
4445
|
+
duplicateColumn: string;
|
|
4446
|
+
duplicateRow: string;
|
|
4447
|
+
clearColumnContents: string;
|
|
4448
|
+
clearRowContents: string;
|
|
4416
4449
|
deleteColumn: string;
|
|
4417
4450
|
deleteRow: string;
|
|
4418
4451
|
deleteTable: string;
|
|
4452
|
+
toggleHeaderRow: string;
|
|
4453
|
+
toggleHeaderColumn: string;
|
|
4454
|
+
openControls: string;
|
|
4455
|
+
quickAddColumnAfter: string;
|
|
4456
|
+
quickAddRowAfter: string;
|
|
4457
|
+
expandTable: string;
|
|
4458
|
+
dragRow: string;
|
|
4459
|
+
dragColumn: string;
|
|
4419
4460
|
};
|
|
4420
4461
|
};
|
|
4421
4462
|
} | {
|
|
@@ -4641,11 +4682,23 @@ declare function getUnderverseMessages(locale?: UnderverseLocale): {
|
|
|
4641
4682
|
addColumnAfter: string;
|
|
4642
4683
|
addRowBefore: string;
|
|
4643
4684
|
addRowAfter: string;
|
|
4685
|
+
duplicateColumn: string;
|
|
4686
|
+
duplicateRow: string;
|
|
4687
|
+
clearColumnContents: string;
|
|
4688
|
+
clearRowContents: string;
|
|
4644
4689
|
deleteColumn: string;
|
|
4645
4690
|
deleteRow: string;
|
|
4646
4691
|
deleteTable: string;
|
|
4692
|
+
toggleHeaderRow: string;
|
|
4693
|
+
toggleHeaderColumn: string;
|
|
4694
|
+
openControls: string;
|
|
4695
|
+
quickAddColumnAfter: string;
|
|
4696
|
+
quickAddRowAfter: string;
|
|
4697
|
+
expandTable: string;
|
|
4698
|
+
dragRow: string;
|
|
4699
|
+
dragColumn: string;
|
|
4647
4700
|
};
|
|
4648
4701
|
};
|
|
4649
4702
|
};
|
|
4650
4703
|
|
|
4651
|
-
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, EmojiPicker, type EmojiPickerProps, 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
|
|
4704
|
+
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, EmojiPicker, type EmojiPickerProps, 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, 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, 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, UnderverseNextIntlProvider, 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
|
@@ -2597,14 +2597,14 @@ declare const VARIANT_STYLES_ALERT: {
|
|
|
2597
2597
|
error: string;
|
|
2598
2598
|
};
|
|
2599
2599
|
|
|
2600
|
-
type Locale
|
|
2600
|
+
type Locale = "en" | "vi" | "ko" | "ja";
|
|
2601
2601
|
type Translations = Record<string, Record<string, string | Record<string, string>>>;
|
|
2602
2602
|
interface TranslationProviderProps {
|
|
2603
2603
|
children: React$1.ReactNode;
|
|
2604
2604
|
/** Current locale. Defaults to "en" */
|
|
2605
|
-
locale?: Locale
|
|
2605
|
+
locale?: Locale;
|
|
2606
2606
|
/** Custom translations to merge with defaults */
|
|
2607
|
-
translations?: Partial<Record<Locale
|
|
2607
|
+
translations?: Partial<Record<Locale, Translations>>;
|
|
2608
2608
|
}
|
|
2609
2609
|
/**
|
|
2610
2610
|
* TranslationProvider for Underverse UI components.
|
|
@@ -2651,65 +2651,22 @@ declare const useUnderverseTranslations: (namespace: string) => (key: string) =>
|
|
|
2651
2651
|
*
|
|
2652
2652
|
* @returns The current locale ("en" or "vi")
|
|
2653
2653
|
*/
|
|
2654
|
-
declare const useUnderverseLocale: () => Locale
|
|
2654
|
+
declare const useUnderverseLocale: () => Locale;
|
|
2655
2655
|
|
|
2656
|
-
|
|
2656
|
+
interface NextIntlAdapterProps {
|
|
2657
2657
|
children: React$1.ReactNode;
|
|
2658
|
-
|
|
2658
|
+
locale?: string | null;
|
|
2659
|
+
messages?: Record<string, unknown> | null;
|
|
2660
|
+
}
|
|
2661
|
+
declare function NextIntlAdapter({ children, locale, messages }: NextIntlAdapterProps): react_jsx_runtime.JSX.Element;
|
|
2659
2662
|
declare const UnderverseNextIntlProvider: typeof NextIntlAdapter;
|
|
2660
2663
|
|
|
2661
|
-
|
|
2662
|
-
|
|
2663
|
-
|
|
2664
|
-
* This module provides a unified translation interface that:
|
|
2665
|
-
* 1. Uses next-intl when available (for Next.js projects)
|
|
2666
|
-
* 2. Falls back to @underverse-ui/underverse's internal translations
|
|
2667
|
-
*
|
|
2668
|
-
* Components should import from this file instead of directly from next-intl
|
|
2669
|
-
* to ensure compatibility with both Next.js and React projects.
|
|
2670
|
-
*/
|
|
2671
|
-
|
|
2672
|
-
type Locale = "en" | "vi" | "ko" | "ja";
|
|
2673
|
-
interface UnderverseProviderProps {
|
|
2674
|
-
children: React$1.ReactNode;
|
|
2675
|
-
/** Current locale. Defaults to "en" */
|
|
2676
|
-
locale?: Locale;
|
|
2677
|
-
/** Custom translations to merge with defaults */
|
|
2678
|
-
translations?: Record<string, Record<string, string | Record<string, string>>>;
|
|
2664
|
+
type LegacyTranslations = Record<string, Record<string, string | Record<string, string>>>;
|
|
2665
|
+
interface UnderverseProviderProps extends Omit<TranslationProviderProps, "translations"> {
|
|
2666
|
+
translations?: LegacyTranslations;
|
|
2679
2667
|
}
|
|
2680
|
-
/**
|
|
2681
|
-
* UnderverseProvider for standalone React usage (without next-intl).
|
|
2682
|
-
* Wrap your app with this provider to enable translations.
|
|
2683
|
-
*
|
|
2684
|
-
* @example
|
|
2685
|
-
* ```tsx
|
|
2686
|
-
* // For React (Vite, CRA, etc.) - without next-intl
|
|
2687
|
-
* import { UnderverseProvider, DatePicker } from "@underverse-ui/underverse";
|
|
2688
|
-
*
|
|
2689
|
-
* function App() {
|
|
2690
|
-
* return (
|
|
2691
|
-
* <UnderverseProvider locale="vi">
|
|
2692
|
-
* <DatePicker onChange={(date) => console.log(date)} />
|
|
2693
|
-
* </UnderverseProvider>
|
|
2694
|
-
* );
|
|
2695
|
-
* }
|
|
2696
|
-
* ```
|
|
2697
|
-
*/
|
|
2698
2668
|
declare const UnderverseProvider: React$1.FC<UnderverseProviderProps>;
|
|
2699
|
-
/**
|
|
2700
|
-
* Smart translation hook that works with both next-intl and standalone React.
|
|
2701
|
-
*
|
|
2702
|
-
* Priority:
|
|
2703
|
-
* 1. next-intl (if available and in NextIntlClientProvider)
|
|
2704
|
-
* 2. UnderverseProvider context
|
|
2705
|
-
* 3. English fallback defaults
|
|
2706
|
-
*
|
|
2707
|
-
* @param namespace - The translation namespace (e.g., "DatePicker", "Common")
|
|
2708
|
-
*/
|
|
2709
2669
|
declare function useTranslations(namespace: string): (key: string, params?: Record<string, unknown>) => string;
|
|
2710
|
-
/**
|
|
2711
|
-
* Smart locale hook that works with both next-intl and standalone React.
|
|
2712
|
-
*/
|
|
2713
2670
|
declare function useLocale(): Locale;
|
|
2714
2671
|
|
|
2715
2672
|
declare const ForceInternalTranslationsProvider: React$1.FC<{
|
|
@@ -2742,7 +2699,7 @@ declare function useSmartTranslations(namespace: string): (key: string) => strin
|
|
|
2742
2699
|
*
|
|
2743
2700
|
* @returns The current locale
|
|
2744
2701
|
*/
|
|
2745
|
-
declare function useSmartLocale(): Locale
|
|
2702
|
+
declare function useSmartLocale(): Locale;
|
|
2746
2703
|
|
|
2747
2704
|
type UEditorUploadImageForSaveResult = string | ({
|
|
2748
2705
|
url: string;
|
|
@@ -3036,9 +2993,21 @@ declare const underverseMessages: {
|
|
|
3036
2993
|
addColumnAfter: string;
|
|
3037
2994
|
addRowBefore: string;
|
|
3038
2995
|
addRowAfter: string;
|
|
2996
|
+
duplicateColumn: string;
|
|
2997
|
+
duplicateRow: string;
|
|
2998
|
+
clearColumnContents: string;
|
|
2999
|
+
clearRowContents: string;
|
|
3039
3000
|
deleteColumn: string;
|
|
3040
3001
|
deleteRow: string;
|
|
3041
3002
|
deleteTable: string;
|
|
3003
|
+
toggleHeaderRow: string;
|
|
3004
|
+
toggleHeaderColumn: string;
|
|
3005
|
+
openControls: string;
|
|
3006
|
+
quickAddColumnAfter: string;
|
|
3007
|
+
quickAddRowAfter: string;
|
|
3008
|
+
expandTable: string;
|
|
3009
|
+
dragRow: string;
|
|
3010
|
+
dragColumn: string;
|
|
3042
3011
|
};
|
|
3043
3012
|
};
|
|
3044
3013
|
};
|
|
@@ -3266,9 +3235,21 @@ declare const underverseMessages: {
|
|
|
3266
3235
|
addColumnAfter: string;
|
|
3267
3236
|
addRowBefore: string;
|
|
3268
3237
|
addRowAfter: string;
|
|
3238
|
+
duplicateColumn: string;
|
|
3239
|
+
duplicateRow: string;
|
|
3240
|
+
clearColumnContents: string;
|
|
3241
|
+
clearRowContents: string;
|
|
3269
3242
|
deleteColumn: string;
|
|
3270
3243
|
deleteRow: string;
|
|
3271
3244
|
deleteTable: string;
|
|
3245
|
+
toggleHeaderRow: string;
|
|
3246
|
+
toggleHeaderColumn: string;
|
|
3247
|
+
openControls: string;
|
|
3248
|
+
quickAddColumnAfter: string;
|
|
3249
|
+
quickAddRowAfter: string;
|
|
3250
|
+
expandTable: string;
|
|
3251
|
+
dragRow: string;
|
|
3252
|
+
dragColumn: string;
|
|
3272
3253
|
};
|
|
3273
3254
|
};
|
|
3274
3255
|
};
|
|
@@ -3495,9 +3476,21 @@ declare const underverseMessages: {
|
|
|
3495
3476
|
addColumnAfter: string;
|
|
3496
3477
|
addRowBefore: string;
|
|
3497
3478
|
addRowAfter: string;
|
|
3479
|
+
duplicateColumn: string;
|
|
3480
|
+
duplicateRow: string;
|
|
3481
|
+
clearColumnContents: string;
|
|
3482
|
+
clearRowContents: string;
|
|
3498
3483
|
deleteColumn: string;
|
|
3499
3484
|
deleteRow: string;
|
|
3500
3485
|
deleteTable: string;
|
|
3486
|
+
toggleHeaderRow: string;
|
|
3487
|
+
toggleHeaderColumn: string;
|
|
3488
|
+
openControls: string;
|
|
3489
|
+
quickAddColumnAfter: string;
|
|
3490
|
+
quickAddRowAfter: string;
|
|
3491
|
+
expandTable: string;
|
|
3492
|
+
dragRow: string;
|
|
3493
|
+
dragColumn: string;
|
|
3501
3494
|
};
|
|
3502
3495
|
};
|
|
3503
3496
|
};
|
|
@@ -3724,9 +3717,21 @@ declare const underverseMessages: {
|
|
|
3724
3717
|
addColumnAfter: string;
|
|
3725
3718
|
addRowBefore: string;
|
|
3726
3719
|
addRowAfter: string;
|
|
3720
|
+
duplicateColumn: string;
|
|
3721
|
+
duplicateRow: string;
|
|
3722
|
+
clearColumnContents: string;
|
|
3723
|
+
clearRowContents: string;
|
|
3727
3724
|
deleteColumn: string;
|
|
3728
3725
|
deleteRow: string;
|
|
3729
3726
|
deleteTable: string;
|
|
3727
|
+
toggleHeaderRow: string;
|
|
3728
|
+
toggleHeaderColumn: string;
|
|
3729
|
+
openControls: string;
|
|
3730
|
+
quickAddColumnAfter: string;
|
|
3731
|
+
quickAddRowAfter: string;
|
|
3732
|
+
expandTable: string;
|
|
3733
|
+
dragRow: string;
|
|
3734
|
+
dragColumn: string;
|
|
3730
3735
|
};
|
|
3731
3736
|
};
|
|
3732
3737
|
};
|
|
@@ -3956,9 +3961,21 @@ declare function getUnderverseMessages(locale?: UnderverseLocale): {
|
|
|
3956
3961
|
addColumnAfter: string;
|
|
3957
3962
|
addRowBefore: string;
|
|
3958
3963
|
addRowAfter: string;
|
|
3964
|
+
duplicateColumn: string;
|
|
3965
|
+
duplicateRow: string;
|
|
3966
|
+
clearColumnContents: string;
|
|
3967
|
+
clearRowContents: string;
|
|
3959
3968
|
deleteColumn: string;
|
|
3960
3969
|
deleteRow: string;
|
|
3961
3970
|
deleteTable: string;
|
|
3971
|
+
toggleHeaderRow: string;
|
|
3972
|
+
toggleHeaderColumn: string;
|
|
3973
|
+
openControls: string;
|
|
3974
|
+
quickAddColumnAfter: string;
|
|
3975
|
+
quickAddRowAfter: string;
|
|
3976
|
+
expandTable: string;
|
|
3977
|
+
dragRow: string;
|
|
3978
|
+
dragColumn: string;
|
|
3962
3979
|
};
|
|
3963
3980
|
};
|
|
3964
3981
|
} | {
|
|
@@ -4185,9 +4202,21 @@ declare function getUnderverseMessages(locale?: UnderverseLocale): {
|
|
|
4185
4202
|
addColumnAfter: string;
|
|
4186
4203
|
addRowBefore: string;
|
|
4187
4204
|
addRowAfter: string;
|
|
4205
|
+
duplicateColumn: string;
|
|
4206
|
+
duplicateRow: string;
|
|
4207
|
+
clearColumnContents: string;
|
|
4208
|
+
clearRowContents: string;
|
|
4188
4209
|
deleteColumn: string;
|
|
4189
4210
|
deleteRow: string;
|
|
4190
4211
|
deleteTable: string;
|
|
4212
|
+
toggleHeaderRow: string;
|
|
4213
|
+
toggleHeaderColumn: string;
|
|
4214
|
+
openControls: string;
|
|
4215
|
+
quickAddColumnAfter: string;
|
|
4216
|
+
quickAddRowAfter: string;
|
|
4217
|
+
expandTable: string;
|
|
4218
|
+
dragRow: string;
|
|
4219
|
+
dragColumn: string;
|
|
4191
4220
|
};
|
|
4192
4221
|
};
|
|
4193
4222
|
} | {
|
|
@@ -4413,9 +4442,21 @@ declare function getUnderverseMessages(locale?: UnderverseLocale): {
|
|
|
4413
4442
|
addColumnAfter: string;
|
|
4414
4443
|
addRowBefore: string;
|
|
4415
4444
|
addRowAfter: string;
|
|
4445
|
+
duplicateColumn: string;
|
|
4446
|
+
duplicateRow: string;
|
|
4447
|
+
clearColumnContents: string;
|
|
4448
|
+
clearRowContents: string;
|
|
4416
4449
|
deleteColumn: string;
|
|
4417
4450
|
deleteRow: string;
|
|
4418
4451
|
deleteTable: string;
|
|
4452
|
+
toggleHeaderRow: string;
|
|
4453
|
+
toggleHeaderColumn: string;
|
|
4454
|
+
openControls: string;
|
|
4455
|
+
quickAddColumnAfter: string;
|
|
4456
|
+
quickAddRowAfter: string;
|
|
4457
|
+
expandTable: string;
|
|
4458
|
+
dragRow: string;
|
|
4459
|
+
dragColumn: string;
|
|
4419
4460
|
};
|
|
4420
4461
|
};
|
|
4421
4462
|
} | {
|
|
@@ -4641,11 +4682,23 @@ declare function getUnderverseMessages(locale?: UnderverseLocale): {
|
|
|
4641
4682
|
addColumnAfter: string;
|
|
4642
4683
|
addRowBefore: string;
|
|
4643
4684
|
addRowAfter: string;
|
|
4685
|
+
duplicateColumn: string;
|
|
4686
|
+
duplicateRow: string;
|
|
4687
|
+
clearColumnContents: string;
|
|
4688
|
+
clearRowContents: string;
|
|
4644
4689
|
deleteColumn: string;
|
|
4645
4690
|
deleteRow: string;
|
|
4646
4691
|
deleteTable: string;
|
|
4692
|
+
toggleHeaderRow: string;
|
|
4693
|
+
toggleHeaderColumn: string;
|
|
4694
|
+
openControls: string;
|
|
4695
|
+
quickAddColumnAfter: string;
|
|
4696
|
+
quickAddRowAfter: string;
|
|
4697
|
+
expandTable: string;
|
|
4698
|
+
dragRow: string;
|
|
4699
|
+
dragColumn: string;
|
|
4647
4700
|
};
|
|
4648
4701
|
};
|
|
4649
4702
|
};
|
|
4650
4703
|
|
|
4651
|
-
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, EmojiPicker, type EmojiPickerProps, 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
|
|
4704
|
+
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, EmojiPicker, type EmojiPickerProps, 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, 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, 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, UnderverseNextIntlProvider, 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 };
|