@sustaina/shared-ui 1.68.0 → 1.69.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.d.mts CHANGED
@@ -1094,6 +1094,24 @@ declare const Input: React$1.ForwardRefExoticComponent<Omit<InputPrimitiveProps$
1094
1094
 
1095
1095
  declare function Label({ className, ...props }: React$1.ComponentProps<typeof LabelPrimitive.Root>): react_jsx_runtime.JSX.Element;
1096
1096
 
1097
+ interface LocaleOption {
1098
+ locale: string;
1099
+ }
1100
+ interface LanguageSelectorProps<T extends LocaleOption = LocaleOption> {
1101
+ tenant: T[];
1102
+ selectedLocale?: string;
1103
+ onSelectLocale: (lang: T) => void;
1104
+ errorLocales?: string[];
1105
+ enableErrorHighlight?: boolean;
1106
+ sortLocales?: boolean;
1107
+ priorityLocale?: string;
1108
+ className?: string;
1109
+ visibleLocalesCount?: number;
1110
+ localeButtonWidth?: number;
1111
+ localeGap?: number;
1112
+ }
1113
+ declare function LanguageSelector<T extends LocaleOption = LocaleOption>({ tenant, selectedLocale, onSelectLocale, errorLocales, enableErrorHighlight, sortLocales, priorityLocale, className, visibleLocalesCount, localeButtonWidth, localeGap }: LanguageSelectorProps<T>): react_jsx_runtime.JSX.Element | null;
1114
+
1097
1115
  interface LoadingPageProps {
1098
1116
  /** Custom loading message */
1099
1117
  message?: string;
@@ -2287,4 +2305,15 @@ type DeepPartialNullish<T> = T extends BrowserNativeObject ? T | null : {
2287
2305
  [K in keyof T]?: ExtractObjects<T[K]> extends never ? T[K] | null : DeepPartialNullish<T[K]> | null;
2288
2306
  };
2289
2307
 
2290
- export { Accordion, AccordionContent, AccordionItem, AccordionTrigger, type ActionButtonProps, ActionDropdown, type ActionDropdownProps, type ActionItemGroup, ActionMenu, type ActionMenuProps, AdministrationIcon, AdvanceSearch, AnalyticsIcon, ApplicationLogIcon, ArrowIcon, AuditFooter, type AuditFooterProps, BookmarkIcon, type Breakpoints, BriefcaseBusinessIcon, type BrowserNativeObject, BuildingIcon, Button, SuiCalendarIcon2 as Calendar2Icon, CalendarDaysIcon, CardIcon, Carousel, type CarouselApi, CarouselContent, CarouselDots, CarouselItem, CarouselNext, CarouselPrevious, CarouselThumbnails, Checkbox, CircleUserIcon, Collapsible, CollapsibleContent, CollapsibleTrigger, type Column, Combobox, type ComboboxProps, Command, CommandDialog, CommandEmpty, CommandGroup, CommandInput, CommandItem, CommandList, CommandSeparator, CommandShortcut, CopyUserRightsIcon, type CroppedImagePayload, type CroppedImagePayloadWithBlobUrl, CropperModal, CropperModalError, type CropperModalErrorType, type CropperModalProps, CustomActionStatusIcon, CustomFieldIcon, DIALOG_ALERT_I18N_SUBNAMESPACE, DIALOG_ALERT_TEMPLATES, DashboardIcon, DataEntryIcon, DataTable, type DataTableChildrenKeyHandler, type DataTableColumnFilter, type DataTableColumnFilterProps, type DataTableColumnGrouping, type DataTableColumnOrdering, type DataTableColumnPinning, type DataTableColumnSeparatorProps, type DataTableColumnSorting, type DataTableColumnVisibility, type DataTableComponentProps, type DataTableFilterConfig, type DataTableFilters, type DataTableGlobalFilter, type DataTableHeaderCell, type DataTableProps, type DataTableRenderHeaderHandler, type DataTableRenderHeaderProps, type DataTableRenderRowHandler, type DataTableRenderRowProps, type DataTableRowCell, type DataTableRowClickHandler, type DataTableRowExpansion, type DataTableRowIdKeyHandler, type DataTableRowSelection, type DataTableScrollFetch, type DataTableStatusContent, type DataTableVirtual, type DatatableColumnResizing, DatePicker, type DatePickerProps, type DateRange, DateTimePicker, type DateTimePickerProps, type DebounceOptions, type DebouncedFunction, DecreaseIcon, type DeepPartial, type DeepPartialNullish, type DefaultMentionItem, Dialog$1 as Dialog, DialogAlert, type DialogAlertI18nResource, type DialogAlertProps, DialogAlertProvider, type DialogAlertTemplateUnit, type DialogAlertTemplates, DialogClose, DialogCloseButton, DialogContent, type DialogContentProps, DialogDescription, DialogFooter, DialogHeader, DialogTitle, DialogTrigger, type DialogVariant, type DraftGuardState, type DraftSource, DropdownMenu, DropdownMenuCheckboxItem, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel, DropdownMenuPortal, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuTrigger, EllipsisBoxIcon, type EllipsisConfig, type EmptyObject, ErrorCompression, ErrorCreateCanvas, ErrorGeneratingBlob, ErrorInvalidSVG, ErrorSVGExceedSize, type ExtractObjects, FactoryIcon, type FieldSchema, type FieldType, FileCogIcon, FileSpreadsheet, FileTextIcon, FiltersIcon, FolderIcon, Form, FormControl, FormDescription, FormField, FormItem, FormLabel, FormMessage, FormulaEditor, type FormulaEditorProps, type FormulaOperator, type FormulaTokenAttributes, type FormulaTokenConfig, type FormulaTokenSuggestion, type FormulaTokenType, type GridPayload, GridSettingsModal, type GridSettingsModalProps, HamburgerMenuIcon, HandymanIcon, ListHeader as Header, HeaderCell, type HeaderCellProps, HelpIcon, HomeIcon, HomePlusIcon, Image, type ImageLoader, type ImageLoaderProps, ImagePlaceholderIcon, type ImageProps, InformationIcon, Input, type InputCustomInputProps, InputMention, type InputMentionProps, type InputMentionSerializedState, InputNumber, type InputNumberProps, type InputProps$1 as InputProps, Label, type ListHeaderProps, LoadingPage, type LoadingPageProps, LookupSelect, type LookupSelectOption, type LookupSelectProps, MailIcon, MainListContainer, type MainListContainerClassNames, type MainListContainerProps, type MainListContainerSlots, ManIcon, ManagementIcon, type MentionConfig$1 as MentionConfig, MenuIcon, type MenuItem, type MenuItemType, MessageIcon, MessageIconInverse, MessageSquareIcon, MonthPicker, type MonthPickerProps, type MonthRange, _default$1 as Navbar, type NavbarProps, NotFoundIcon, type OptionData, OutlineArrowIcon, type Params, type PermissionString, PlusIcon, PlusSearchIcon, Popover, PopoverAnchor, PopoverArrow, PopoverContent, PopoverTrigger, PowerIcon, type PrefixMap, PreventPageLeave, _default as ProgressBar, type ProgressBarProps, QuestionIcon, RadioGroupItem, RadioGroupRoot, RadioLabel, type RawFormulaSegment, RichText, type RichTextProps, type RichTextSerializedState, RightPanelContainer, type RightPanelContainerClassNames, type RightPanelContainerHeaderProps, type RightPanelContainerProps, type RightPanelContainerSlots, RoleIcon, type RowClickType, type RowState, type ScrollInfo, SearchIcon, Select, SelectContent, SelectGroup, SelectItem, SelectLabel, SelectScrollDownButton, SelectScrollUpButton, SelectSeparator, SelectTrigger, SelectValue, Separator, SetupIcon, Sheet, SheetClose, SheetContent, SheetDescription, SheetFooter, SheetHeader, SheetTitle, SheetTrigger, Sidebar, SidebarContent, SidebarFooter, SidebarGroup, SidebarGroupAction, SidebarGroupContent, SidebarGroupLabel, SidebarHeader, SidebarInput, SidebarInset, SidebarLayout, SidebarMenu, SidebarMenuAction, SidebarMenuBadge, SidebarMenuButton, SidebarMenuItem, SidebarMenuSkeleton, SidebarMenuSub, SidebarMenuSubButton, SidebarMenuSubItem, SidebarProvider, SidebarRail, SidebarSeparator, SidebarTrigger, Skeleton, type SorterProps, Spinner, type SpinnerProps, type StatusContentKey, SuiCalendarIcon, SuiCalendarIcon2, SuiCheckIcon, SuiDotsVerticalIcon, SuiEmptyDataIcon, SuiExpandIcon, SuiFilterIcon, SuiSettingIcon, SuiTriangleDownIcon, SuiWarningIcon, Switch, TabSelect, type TabSelectItem, Table, TableBody, TableCaption, TableCell, TableContainer, TableFooter, TableHead, TableHeader, TableOfContents, TableRow, TagListViewIcon, type TemplateKeys, TextArea, ToolBoxIcon, Tooltip, TooltipArrow, TooltipContent, TooltipProvider, TooltipTrigger, TransferUserRightsIcon, TrashIcon, Truncated, TruncatedMouseEnterDiv, type TruncatedMouseEnterDivProps, type TruncatedProps, index as UI, type UseBindRefProps, type UseControllableStateOptions, type UseControllableStateResult, type UseHoverResult, type UseMediaQueryOptions, type UseMediaQueryResult, type UsePreventPageLeaveOptions, type UseScreenSizeResult, type UseTruncatedOptions, type UseTruncatedResult, UserActiveIcon, UserAloneIcon, UserFriendIcon, UserGroupIcon, UserIcon, UserInactiveIcon, UserNameIcon, UserProtectIcon, UsersIcon, VirtualizedCommand, type VirtualizedCommandFieldNames, type VirtualizedCommandOption, type VirtualizedCommandProps, type Virtualizer, WorkFlowIcon, booleanToSelectValue, buildPrefixMap, buttonVariants, cn, compareAlphanumeric, debounce, defaultOperatorShortcuts, defaultOperators, formatISODate, getDialogAlertControls, inputVariants$1 as inputVariants, isDefined, isEmptyObject, isValidParentheses, mapTokensToOutput, parseFormula, parseFormulaToToken, resetVisibleTableState, selectValueToBoolean, spinnerVariants, splitOperators, stripNullishObject, throttle, tokenizeFormulaString, useBindRef, useCarousel, useControllableState, useDraftGuardStore, useFormField, useGridSettingsStore, useHover, useIntersectionObserver, useIsomorphicLayoutEffect, useMediaQuery, usePreventPageLeave, usePreventPageLeaveStore, useSafeBlocker, useScreenSize, useSidebar, useTruncated, validateTokenPrefixes };
2308
+ interface TenantLocale {
2309
+ id: string;
2310
+ tenantId: string | null;
2311
+ locale: string;
2312
+ i18nConfig: Record<string, unknown>;
2313
+ isDefault: boolean;
2314
+ enabled: boolean;
2315
+ createdAt: Date | string;
2316
+ updatedAt: Date | string;
2317
+ }
2318
+
2319
+ export { Accordion, AccordionContent, AccordionItem, AccordionTrigger, type ActionButtonProps, ActionDropdown, type ActionDropdownProps, type ActionItemGroup, ActionMenu, type ActionMenuProps, AdministrationIcon, AdvanceSearch, AnalyticsIcon, ApplicationLogIcon, ArrowIcon, AuditFooter, type AuditFooterProps, BookmarkIcon, type Breakpoints, BriefcaseBusinessIcon, type BrowserNativeObject, BuildingIcon, Button, SuiCalendarIcon2 as Calendar2Icon, CalendarDaysIcon, CardIcon, Carousel, type CarouselApi, CarouselContent, CarouselDots, CarouselItem, CarouselNext, CarouselPrevious, CarouselThumbnails, Checkbox, CircleUserIcon, Collapsible, CollapsibleContent, CollapsibleTrigger, type Column, Combobox, type ComboboxProps, Command, CommandDialog, CommandEmpty, CommandGroup, CommandInput, CommandItem, CommandList, CommandSeparator, CommandShortcut, CopyUserRightsIcon, type CroppedImagePayload, type CroppedImagePayloadWithBlobUrl, CropperModal, CropperModalError, type CropperModalErrorType, type CropperModalProps, CustomActionStatusIcon, CustomFieldIcon, DIALOG_ALERT_I18N_SUBNAMESPACE, DIALOG_ALERT_TEMPLATES, DashboardIcon, DataEntryIcon, DataTable, type DataTableChildrenKeyHandler, type DataTableColumnFilter, type DataTableColumnFilterProps, type DataTableColumnGrouping, type DataTableColumnOrdering, type DataTableColumnPinning, type DataTableColumnSeparatorProps, type DataTableColumnSorting, type DataTableColumnVisibility, type DataTableComponentProps, type DataTableFilterConfig, type DataTableFilters, type DataTableGlobalFilter, type DataTableHeaderCell, type DataTableProps, type DataTableRenderHeaderHandler, type DataTableRenderHeaderProps, type DataTableRenderRowHandler, type DataTableRenderRowProps, type DataTableRowCell, type DataTableRowClickHandler, type DataTableRowExpansion, type DataTableRowIdKeyHandler, type DataTableRowSelection, type DataTableScrollFetch, type DataTableStatusContent, type DataTableVirtual, type DatatableColumnResizing, DatePicker, type DatePickerProps, type DateRange, DateTimePicker, type DateTimePickerProps, type DebounceOptions, type DebouncedFunction, DecreaseIcon, type DeepPartial, type DeepPartialNullish, type DefaultMentionItem, Dialog$1 as Dialog, DialogAlert, type DialogAlertI18nResource, type DialogAlertProps, DialogAlertProvider, type DialogAlertTemplateUnit, type DialogAlertTemplates, DialogClose, DialogCloseButton, DialogContent, type DialogContentProps, DialogDescription, DialogFooter, DialogHeader, DialogTitle, DialogTrigger, type DialogVariant, type DraftGuardState, type DraftSource, DropdownMenu, DropdownMenuCheckboxItem, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel, DropdownMenuPortal, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuTrigger, EllipsisBoxIcon, type EllipsisConfig, type EmptyObject, ErrorCompression, ErrorCreateCanvas, ErrorGeneratingBlob, ErrorInvalidSVG, ErrorSVGExceedSize, type ExtractObjects, FactoryIcon, type FieldSchema, type FieldType, FileCogIcon, FileSpreadsheet, FileTextIcon, FiltersIcon, FolderIcon, Form, FormControl, FormDescription, FormField, FormItem, FormLabel, FormMessage, FormulaEditor, type FormulaEditorProps, type FormulaOperator, type FormulaTokenAttributes, type FormulaTokenConfig, type FormulaTokenSuggestion, type FormulaTokenType, type GridPayload, GridSettingsModal, type GridSettingsModalProps, HamburgerMenuIcon, HandymanIcon, ListHeader as Header, HeaderCell, type HeaderCellProps, HelpIcon, HomeIcon, HomePlusIcon, Image, type ImageLoader, type ImageLoaderProps, ImagePlaceholderIcon, type ImageProps, InformationIcon, Input, type InputCustomInputProps, InputMention, type InputMentionProps, type InputMentionSerializedState, InputNumber, type InputNumberProps, type InputProps$1 as InputProps, Label, LanguageSelector, type LanguageSelectorProps, type ListHeaderProps, LoadingPage, type LoadingPageProps, type LocaleOption, LookupSelect, type LookupSelectOption, type LookupSelectProps, MailIcon, MainListContainer, type MainListContainerClassNames, type MainListContainerProps, type MainListContainerSlots, ManIcon, ManagementIcon, type MentionConfig$1 as MentionConfig, MenuIcon, type MenuItem, type MenuItemType, MessageIcon, MessageIconInverse, MessageSquareIcon, MonthPicker, type MonthPickerProps, type MonthRange, _default$1 as Navbar, type NavbarProps, NotFoundIcon, type OptionData, OutlineArrowIcon, type Params, type PermissionString, PlusIcon, PlusSearchIcon, Popover, PopoverAnchor, PopoverArrow, PopoverContent, PopoverTrigger, PowerIcon, type PrefixMap, PreventPageLeave, _default as ProgressBar, type ProgressBarProps, QuestionIcon, RadioGroupItem, RadioGroupRoot, RadioLabel, type RawFormulaSegment, RichText, type RichTextProps, type RichTextSerializedState, RightPanelContainer, type RightPanelContainerClassNames, type RightPanelContainerHeaderProps, type RightPanelContainerProps, type RightPanelContainerSlots, RoleIcon, type RowClickType, type RowState, type ScrollInfo, SearchIcon, Select, SelectContent, SelectGroup, SelectItem, SelectLabel, SelectScrollDownButton, SelectScrollUpButton, SelectSeparator, SelectTrigger, SelectValue, Separator, SetupIcon, Sheet, SheetClose, SheetContent, SheetDescription, SheetFooter, SheetHeader, SheetTitle, SheetTrigger, Sidebar, SidebarContent, SidebarFooter, SidebarGroup, SidebarGroupAction, SidebarGroupContent, SidebarGroupLabel, SidebarHeader, SidebarInput, SidebarInset, SidebarLayout, SidebarMenu, SidebarMenuAction, SidebarMenuBadge, SidebarMenuButton, SidebarMenuItem, SidebarMenuSkeleton, SidebarMenuSub, SidebarMenuSubButton, SidebarMenuSubItem, SidebarProvider, SidebarRail, SidebarSeparator, SidebarTrigger, Skeleton, type SorterProps, Spinner, type SpinnerProps, type StatusContentKey, SuiCalendarIcon, SuiCalendarIcon2, SuiCheckIcon, SuiDotsVerticalIcon, SuiEmptyDataIcon, SuiExpandIcon, SuiFilterIcon, SuiSettingIcon, SuiTriangleDownIcon, SuiWarningIcon, Switch, TabSelect, type TabSelectItem, Table, TableBody, TableCaption, TableCell, TableContainer, TableFooter, TableHead, TableHeader, TableOfContents, TableRow, TagListViewIcon, type TemplateKeys, type TenantLocale, TextArea, ToolBoxIcon, Tooltip, TooltipArrow, TooltipContent, TooltipProvider, TooltipTrigger, TransferUserRightsIcon, TrashIcon, Truncated, TruncatedMouseEnterDiv, type TruncatedMouseEnterDivProps, type TruncatedProps, index as UI, type UseBindRefProps, type UseControllableStateOptions, type UseControllableStateResult, type UseHoverResult, type UseMediaQueryOptions, type UseMediaQueryResult, type UsePreventPageLeaveOptions, type UseScreenSizeResult, type UseTruncatedOptions, type UseTruncatedResult, UserActiveIcon, UserAloneIcon, UserFriendIcon, UserGroupIcon, UserIcon, UserInactiveIcon, UserNameIcon, UserProtectIcon, UsersIcon, VirtualizedCommand, type VirtualizedCommandFieldNames, type VirtualizedCommandOption, type VirtualizedCommandProps, type Virtualizer, WorkFlowIcon, booleanToSelectValue, buildPrefixMap, buttonVariants, cn, compareAlphanumeric, debounce, defaultOperatorShortcuts, defaultOperators, formatISODate, getDialogAlertControls, inputVariants$1 as inputVariants, isDefined, isEmptyObject, isValidParentheses, mapTokensToOutput, parseFormula, parseFormulaToToken, resetVisibleTableState, selectValueToBoolean, spinnerVariants, splitOperators, stripNullishObject, throttle, tokenizeFormulaString, useBindRef, useCarousel, useControllableState, useDraftGuardStore, useFormField, useGridSettingsStore, useHover, useIntersectionObserver, useIsomorphicLayoutEffect, useMediaQuery, usePreventPageLeave, usePreventPageLeaveStore, useSafeBlocker, useScreenSize, useSidebar, useTruncated, validateTokenPrefixes };
package/dist/index.d.ts CHANGED
@@ -1094,6 +1094,24 @@ declare const Input: React$1.ForwardRefExoticComponent<Omit<InputPrimitiveProps$
1094
1094
 
1095
1095
  declare function Label({ className, ...props }: React$1.ComponentProps<typeof LabelPrimitive.Root>): react_jsx_runtime.JSX.Element;
1096
1096
 
1097
+ interface LocaleOption {
1098
+ locale: string;
1099
+ }
1100
+ interface LanguageSelectorProps<T extends LocaleOption = LocaleOption> {
1101
+ tenant: T[];
1102
+ selectedLocale?: string;
1103
+ onSelectLocale: (lang: T) => void;
1104
+ errorLocales?: string[];
1105
+ enableErrorHighlight?: boolean;
1106
+ sortLocales?: boolean;
1107
+ priorityLocale?: string;
1108
+ className?: string;
1109
+ visibleLocalesCount?: number;
1110
+ localeButtonWidth?: number;
1111
+ localeGap?: number;
1112
+ }
1113
+ declare function LanguageSelector<T extends LocaleOption = LocaleOption>({ tenant, selectedLocale, onSelectLocale, errorLocales, enableErrorHighlight, sortLocales, priorityLocale, className, visibleLocalesCount, localeButtonWidth, localeGap }: LanguageSelectorProps<T>): react_jsx_runtime.JSX.Element | null;
1114
+
1097
1115
  interface LoadingPageProps {
1098
1116
  /** Custom loading message */
1099
1117
  message?: string;
@@ -2287,4 +2305,15 @@ type DeepPartialNullish<T> = T extends BrowserNativeObject ? T | null : {
2287
2305
  [K in keyof T]?: ExtractObjects<T[K]> extends never ? T[K] | null : DeepPartialNullish<T[K]> | null;
2288
2306
  };
2289
2307
 
2290
- export { Accordion, AccordionContent, AccordionItem, AccordionTrigger, type ActionButtonProps, ActionDropdown, type ActionDropdownProps, type ActionItemGroup, ActionMenu, type ActionMenuProps, AdministrationIcon, AdvanceSearch, AnalyticsIcon, ApplicationLogIcon, ArrowIcon, AuditFooter, type AuditFooterProps, BookmarkIcon, type Breakpoints, BriefcaseBusinessIcon, type BrowserNativeObject, BuildingIcon, Button, SuiCalendarIcon2 as Calendar2Icon, CalendarDaysIcon, CardIcon, Carousel, type CarouselApi, CarouselContent, CarouselDots, CarouselItem, CarouselNext, CarouselPrevious, CarouselThumbnails, Checkbox, CircleUserIcon, Collapsible, CollapsibleContent, CollapsibleTrigger, type Column, Combobox, type ComboboxProps, Command, CommandDialog, CommandEmpty, CommandGroup, CommandInput, CommandItem, CommandList, CommandSeparator, CommandShortcut, CopyUserRightsIcon, type CroppedImagePayload, type CroppedImagePayloadWithBlobUrl, CropperModal, CropperModalError, type CropperModalErrorType, type CropperModalProps, CustomActionStatusIcon, CustomFieldIcon, DIALOG_ALERT_I18N_SUBNAMESPACE, DIALOG_ALERT_TEMPLATES, DashboardIcon, DataEntryIcon, DataTable, type DataTableChildrenKeyHandler, type DataTableColumnFilter, type DataTableColumnFilterProps, type DataTableColumnGrouping, type DataTableColumnOrdering, type DataTableColumnPinning, type DataTableColumnSeparatorProps, type DataTableColumnSorting, type DataTableColumnVisibility, type DataTableComponentProps, type DataTableFilterConfig, type DataTableFilters, type DataTableGlobalFilter, type DataTableHeaderCell, type DataTableProps, type DataTableRenderHeaderHandler, type DataTableRenderHeaderProps, type DataTableRenderRowHandler, type DataTableRenderRowProps, type DataTableRowCell, type DataTableRowClickHandler, type DataTableRowExpansion, type DataTableRowIdKeyHandler, type DataTableRowSelection, type DataTableScrollFetch, type DataTableStatusContent, type DataTableVirtual, type DatatableColumnResizing, DatePicker, type DatePickerProps, type DateRange, DateTimePicker, type DateTimePickerProps, type DebounceOptions, type DebouncedFunction, DecreaseIcon, type DeepPartial, type DeepPartialNullish, type DefaultMentionItem, Dialog$1 as Dialog, DialogAlert, type DialogAlertI18nResource, type DialogAlertProps, DialogAlertProvider, type DialogAlertTemplateUnit, type DialogAlertTemplates, DialogClose, DialogCloseButton, DialogContent, type DialogContentProps, DialogDescription, DialogFooter, DialogHeader, DialogTitle, DialogTrigger, type DialogVariant, type DraftGuardState, type DraftSource, DropdownMenu, DropdownMenuCheckboxItem, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel, DropdownMenuPortal, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuTrigger, EllipsisBoxIcon, type EllipsisConfig, type EmptyObject, ErrorCompression, ErrorCreateCanvas, ErrorGeneratingBlob, ErrorInvalidSVG, ErrorSVGExceedSize, type ExtractObjects, FactoryIcon, type FieldSchema, type FieldType, FileCogIcon, FileSpreadsheet, FileTextIcon, FiltersIcon, FolderIcon, Form, FormControl, FormDescription, FormField, FormItem, FormLabel, FormMessage, FormulaEditor, type FormulaEditorProps, type FormulaOperator, type FormulaTokenAttributes, type FormulaTokenConfig, type FormulaTokenSuggestion, type FormulaTokenType, type GridPayload, GridSettingsModal, type GridSettingsModalProps, HamburgerMenuIcon, HandymanIcon, ListHeader as Header, HeaderCell, type HeaderCellProps, HelpIcon, HomeIcon, HomePlusIcon, Image, type ImageLoader, type ImageLoaderProps, ImagePlaceholderIcon, type ImageProps, InformationIcon, Input, type InputCustomInputProps, InputMention, type InputMentionProps, type InputMentionSerializedState, InputNumber, type InputNumberProps, type InputProps$1 as InputProps, Label, type ListHeaderProps, LoadingPage, type LoadingPageProps, LookupSelect, type LookupSelectOption, type LookupSelectProps, MailIcon, MainListContainer, type MainListContainerClassNames, type MainListContainerProps, type MainListContainerSlots, ManIcon, ManagementIcon, type MentionConfig$1 as MentionConfig, MenuIcon, type MenuItem, type MenuItemType, MessageIcon, MessageIconInverse, MessageSquareIcon, MonthPicker, type MonthPickerProps, type MonthRange, _default$1 as Navbar, type NavbarProps, NotFoundIcon, type OptionData, OutlineArrowIcon, type Params, type PermissionString, PlusIcon, PlusSearchIcon, Popover, PopoverAnchor, PopoverArrow, PopoverContent, PopoverTrigger, PowerIcon, type PrefixMap, PreventPageLeave, _default as ProgressBar, type ProgressBarProps, QuestionIcon, RadioGroupItem, RadioGroupRoot, RadioLabel, type RawFormulaSegment, RichText, type RichTextProps, type RichTextSerializedState, RightPanelContainer, type RightPanelContainerClassNames, type RightPanelContainerHeaderProps, type RightPanelContainerProps, type RightPanelContainerSlots, RoleIcon, type RowClickType, type RowState, type ScrollInfo, SearchIcon, Select, SelectContent, SelectGroup, SelectItem, SelectLabel, SelectScrollDownButton, SelectScrollUpButton, SelectSeparator, SelectTrigger, SelectValue, Separator, SetupIcon, Sheet, SheetClose, SheetContent, SheetDescription, SheetFooter, SheetHeader, SheetTitle, SheetTrigger, Sidebar, SidebarContent, SidebarFooter, SidebarGroup, SidebarGroupAction, SidebarGroupContent, SidebarGroupLabel, SidebarHeader, SidebarInput, SidebarInset, SidebarLayout, SidebarMenu, SidebarMenuAction, SidebarMenuBadge, SidebarMenuButton, SidebarMenuItem, SidebarMenuSkeleton, SidebarMenuSub, SidebarMenuSubButton, SidebarMenuSubItem, SidebarProvider, SidebarRail, SidebarSeparator, SidebarTrigger, Skeleton, type SorterProps, Spinner, type SpinnerProps, type StatusContentKey, SuiCalendarIcon, SuiCalendarIcon2, SuiCheckIcon, SuiDotsVerticalIcon, SuiEmptyDataIcon, SuiExpandIcon, SuiFilterIcon, SuiSettingIcon, SuiTriangleDownIcon, SuiWarningIcon, Switch, TabSelect, type TabSelectItem, Table, TableBody, TableCaption, TableCell, TableContainer, TableFooter, TableHead, TableHeader, TableOfContents, TableRow, TagListViewIcon, type TemplateKeys, TextArea, ToolBoxIcon, Tooltip, TooltipArrow, TooltipContent, TooltipProvider, TooltipTrigger, TransferUserRightsIcon, TrashIcon, Truncated, TruncatedMouseEnterDiv, type TruncatedMouseEnterDivProps, type TruncatedProps, index as UI, type UseBindRefProps, type UseControllableStateOptions, type UseControllableStateResult, type UseHoverResult, type UseMediaQueryOptions, type UseMediaQueryResult, type UsePreventPageLeaveOptions, type UseScreenSizeResult, type UseTruncatedOptions, type UseTruncatedResult, UserActiveIcon, UserAloneIcon, UserFriendIcon, UserGroupIcon, UserIcon, UserInactiveIcon, UserNameIcon, UserProtectIcon, UsersIcon, VirtualizedCommand, type VirtualizedCommandFieldNames, type VirtualizedCommandOption, type VirtualizedCommandProps, type Virtualizer, WorkFlowIcon, booleanToSelectValue, buildPrefixMap, buttonVariants, cn, compareAlphanumeric, debounce, defaultOperatorShortcuts, defaultOperators, formatISODate, getDialogAlertControls, inputVariants$1 as inputVariants, isDefined, isEmptyObject, isValidParentheses, mapTokensToOutput, parseFormula, parseFormulaToToken, resetVisibleTableState, selectValueToBoolean, spinnerVariants, splitOperators, stripNullishObject, throttle, tokenizeFormulaString, useBindRef, useCarousel, useControllableState, useDraftGuardStore, useFormField, useGridSettingsStore, useHover, useIntersectionObserver, useIsomorphicLayoutEffect, useMediaQuery, usePreventPageLeave, usePreventPageLeaveStore, useSafeBlocker, useScreenSize, useSidebar, useTruncated, validateTokenPrefixes };
2308
+ interface TenantLocale {
2309
+ id: string;
2310
+ tenantId: string | null;
2311
+ locale: string;
2312
+ i18nConfig: Record<string, unknown>;
2313
+ isDefault: boolean;
2314
+ enabled: boolean;
2315
+ createdAt: Date | string;
2316
+ updatedAt: Date | string;
2317
+ }
2318
+
2319
+ export { Accordion, AccordionContent, AccordionItem, AccordionTrigger, type ActionButtonProps, ActionDropdown, type ActionDropdownProps, type ActionItemGroup, ActionMenu, type ActionMenuProps, AdministrationIcon, AdvanceSearch, AnalyticsIcon, ApplicationLogIcon, ArrowIcon, AuditFooter, type AuditFooterProps, BookmarkIcon, type Breakpoints, BriefcaseBusinessIcon, type BrowserNativeObject, BuildingIcon, Button, SuiCalendarIcon2 as Calendar2Icon, CalendarDaysIcon, CardIcon, Carousel, type CarouselApi, CarouselContent, CarouselDots, CarouselItem, CarouselNext, CarouselPrevious, CarouselThumbnails, Checkbox, CircleUserIcon, Collapsible, CollapsibleContent, CollapsibleTrigger, type Column, Combobox, type ComboboxProps, Command, CommandDialog, CommandEmpty, CommandGroup, CommandInput, CommandItem, CommandList, CommandSeparator, CommandShortcut, CopyUserRightsIcon, type CroppedImagePayload, type CroppedImagePayloadWithBlobUrl, CropperModal, CropperModalError, type CropperModalErrorType, type CropperModalProps, CustomActionStatusIcon, CustomFieldIcon, DIALOG_ALERT_I18N_SUBNAMESPACE, DIALOG_ALERT_TEMPLATES, DashboardIcon, DataEntryIcon, DataTable, type DataTableChildrenKeyHandler, type DataTableColumnFilter, type DataTableColumnFilterProps, type DataTableColumnGrouping, type DataTableColumnOrdering, type DataTableColumnPinning, type DataTableColumnSeparatorProps, type DataTableColumnSorting, type DataTableColumnVisibility, type DataTableComponentProps, type DataTableFilterConfig, type DataTableFilters, type DataTableGlobalFilter, type DataTableHeaderCell, type DataTableProps, type DataTableRenderHeaderHandler, type DataTableRenderHeaderProps, type DataTableRenderRowHandler, type DataTableRenderRowProps, type DataTableRowCell, type DataTableRowClickHandler, type DataTableRowExpansion, type DataTableRowIdKeyHandler, type DataTableRowSelection, type DataTableScrollFetch, type DataTableStatusContent, type DataTableVirtual, type DatatableColumnResizing, DatePicker, type DatePickerProps, type DateRange, DateTimePicker, type DateTimePickerProps, type DebounceOptions, type DebouncedFunction, DecreaseIcon, type DeepPartial, type DeepPartialNullish, type DefaultMentionItem, Dialog$1 as Dialog, DialogAlert, type DialogAlertI18nResource, type DialogAlertProps, DialogAlertProvider, type DialogAlertTemplateUnit, type DialogAlertTemplates, DialogClose, DialogCloseButton, DialogContent, type DialogContentProps, DialogDescription, DialogFooter, DialogHeader, DialogTitle, DialogTrigger, type DialogVariant, type DraftGuardState, type DraftSource, DropdownMenu, DropdownMenuCheckboxItem, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel, DropdownMenuPortal, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuTrigger, EllipsisBoxIcon, type EllipsisConfig, type EmptyObject, ErrorCompression, ErrorCreateCanvas, ErrorGeneratingBlob, ErrorInvalidSVG, ErrorSVGExceedSize, type ExtractObjects, FactoryIcon, type FieldSchema, type FieldType, FileCogIcon, FileSpreadsheet, FileTextIcon, FiltersIcon, FolderIcon, Form, FormControl, FormDescription, FormField, FormItem, FormLabel, FormMessage, FormulaEditor, type FormulaEditorProps, type FormulaOperator, type FormulaTokenAttributes, type FormulaTokenConfig, type FormulaTokenSuggestion, type FormulaTokenType, type GridPayload, GridSettingsModal, type GridSettingsModalProps, HamburgerMenuIcon, HandymanIcon, ListHeader as Header, HeaderCell, type HeaderCellProps, HelpIcon, HomeIcon, HomePlusIcon, Image, type ImageLoader, type ImageLoaderProps, ImagePlaceholderIcon, type ImageProps, InformationIcon, Input, type InputCustomInputProps, InputMention, type InputMentionProps, type InputMentionSerializedState, InputNumber, type InputNumberProps, type InputProps$1 as InputProps, Label, LanguageSelector, type LanguageSelectorProps, type ListHeaderProps, LoadingPage, type LoadingPageProps, type LocaleOption, LookupSelect, type LookupSelectOption, type LookupSelectProps, MailIcon, MainListContainer, type MainListContainerClassNames, type MainListContainerProps, type MainListContainerSlots, ManIcon, ManagementIcon, type MentionConfig$1 as MentionConfig, MenuIcon, type MenuItem, type MenuItemType, MessageIcon, MessageIconInverse, MessageSquareIcon, MonthPicker, type MonthPickerProps, type MonthRange, _default$1 as Navbar, type NavbarProps, NotFoundIcon, type OptionData, OutlineArrowIcon, type Params, type PermissionString, PlusIcon, PlusSearchIcon, Popover, PopoverAnchor, PopoverArrow, PopoverContent, PopoverTrigger, PowerIcon, type PrefixMap, PreventPageLeave, _default as ProgressBar, type ProgressBarProps, QuestionIcon, RadioGroupItem, RadioGroupRoot, RadioLabel, type RawFormulaSegment, RichText, type RichTextProps, type RichTextSerializedState, RightPanelContainer, type RightPanelContainerClassNames, type RightPanelContainerHeaderProps, type RightPanelContainerProps, type RightPanelContainerSlots, RoleIcon, type RowClickType, type RowState, type ScrollInfo, SearchIcon, Select, SelectContent, SelectGroup, SelectItem, SelectLabel, SelectScrollDownButton, SelectScrollUpButton, SelectSeparator, SelectTrigger, SelectValue, Separator, SetupIcon, Sheet, SheetClose, SheetContent, SheetDescription, SheetFooter, SheetHeader, SheetTitle, SheetTrigger, Sidebar, SidebarContent, SidebarFooter, SidebarGroup, SidebarGroupAction, SidebarGroupContent, SidebarGroupLabel, SidebarHeader, SidebarInput, SidebarInset, SidebarLayout, SidebarMenu, SidebarMenuAction, SidebarMenuBadge, SidebarMenuButton, SidebarMenuItem, SidebarMenuSkeleton, SidebarMenuSub, SidebarMenuSubButton, SidebarMenuSubItem, SidebarProvider, SidebarRail, SidebarSeparator, SidebarTrigger, Skeleton, type SorterProps, Spinner, type SpinnerProps, type StatusContentKey, SuiCalendarIcon, SuiCalendarIcon2, SuiCheckIcon, SuiDotsVerticalIcon, SuiEmptyDataIcon, SuiExpandIcon, SuiFilterIcon, SuiSettingIcon, SuiTriangleDownIcon, SuiWarningIcon, Switch, TabSelect, type TabSelectItem, Table, TableBody, TableCaption, TableCell, TableContainer, TableFooter, TableHead, TableHeader, TableOfContents, TableRow, TagListViewIcon, type TemplateKeys, type TenantLocale, TextArea, ToolBoxIcon, Tooltip, TooltipArrow, TooltipContent, TooltipProvider, TooltipTrigger, TransferUserRightsIcon, TrashIcon, Truncated, TruncatedMouseEnterDiv, type TruncatedMouseEnterDivProps, type TruncatedProps, index as UI, type UseBindRefProps, type UseControllableStateOptions, type UseControllableStateResult, type UseHoverResult, type UseMediaQueryOptions, type UseMediaQueryResult, type UsePreventPageLeaveOptions, type UseScreenSizeResult, type UseTruncatedOptions, type UseTruncatedResult, UserActiveIcon, UserAloneIcon, UserFriendIcon, UserGroupIcon, UserIcon, UserInactiveIcon, UserNameIcon, UserProtectIcon, UsersIcon, VirtualizedCommand, type VirtualizedCommandFieldNames, type VirtualizedCommandOption, type VirtualizedCommandProps, type Virtualizer, WorkFlowIcon, booleanToSelectValue, buildPrefixMap, buttonVariants, cn, compareAlphanumeric, debounce, defaultOperatorShortcuts, defaultOperators, formatISODate, getDialogAlertControls, inputVariants$1 as inputVariants, isDefined, isEmptyObject, isValidParentheses, mapTokensToOutput, parseFormula, parseFormulaToToken, resetVisibleTableState, selectValueToBoolean, spinnerVariants, splitOperators, stripNullishObject, throttle, tokenizeFormulaString, useBindRef, useCarousel, useControllableState, useDraftGuardStore, useFormField, useGridSettingsStore, useHover, useIntersectionObserver, useIsomorphicLayoutEffect, useMediaQuery, usePreventPageLeave, usePreventPageLeaveStore, useSafeBlocker, useScreenSize, useSidebar, useTruncated, validateTokenPrefixes };
package/dist/index.js CHANGED
@@ -6593,7 +6593,7 @@ var MeasureText = React__namespace.forwardRef(({ style, children }, ref) => {
6593
6593
  React__namespace.useImperativeHandle(ref, () => ({
6594
6594
  isExceed: () => {
6595
6595
  const span = spanRef.current;
6596
- return span.scrollHeight > span.clientHeight;
6596
+ return span.scrollHeight > span.clientHeight || span.scrollWidth > span.clientWidth;
6597
6597
  },
6598
6598
  getHeight: () => spanRef.current.clientHeight
6599
6599
  }));
@@ -9688,7 +9688,7 @@ var TableHeaderRows = ({
9688
9688
  ),
9689
9689
  style: {
9690
9690
  ...style,
9691
- width: useColumnSizing ? `calc(var(--header-${header.id}-size, ${header.getSize()}) * 1px)` : void 0,
9691
+ width: useColumnSizing ? header.getSize() : void 0,
9692
9692
  minWidth: useColumnSizing ? header.column.columnDef.minSize : void 0,
9693
9693
  maxWidth: useColumnSizing ? header.column.columnDef.maxSize : void 0,
9694
9694
  ...tableHeadCellProps?.style,
@@ -9739,7 +9739,7 @@ var TableFilterRow = ({
9739
9739
  ),
9740
9740
  style: {
9741
9741
  ...style,
9742
- width: useColumnSizing ? `calc(var(--col-${column.id}-size, ${column.getSize()}) * 1px)` : void 0,
9742
+ width: useColumnSizing ? column.getSize() : void 0,
9743
9743
  minWidth: useColumnSizing ? column.columnDef.minSize : void 0,
9744
9744
  maxWidth: useColumnSizing ? column.columnDef.maxSize : void 0,
9745
9745
  ...tableFilterCellProps?.style,
@@ -9823,7 +9823,7 @@ var TableDataRows = ({
9823
9823
  ),
9824
9824
  style: {
9825
9825
  ...style,
9826
- width: useColumnSizing ? `calc(var(--col-${cell.column.id}-size, ${cell.column.getSize()}) * 1px)` : void 0,
9826
+ width: useColumnSizing ? cell.column.getSize() : void 0,
9827
9827
  minWidth: useColumnSizing ? cell.column.columnDef.minSize : void 0,
9828
9828
  maxWidth: useColumnSizing ? cell.column.columnDef.maxSize : void 0,
9829
9829
  ...tableDataCellProps?.style,
@@ -9846,10 +9846,6 @@ var TableDataRows = ({
9846
9846
  ) })
9847
9847
  ] });
9848
9848
  };
9849
- var MemoizedTableDataRows = React__namespace.default.memo(
9850
- TableDataRows,
9851
- (prev, next) => prev.table.options.data === next.table.options.data
9852
- );
9853
9849
  var TableFooterRows = ({
9854
9850
  table,
9855
9851
  columnResizing,
@@ -9963,19 +9959,6 @@ var DataTable = ({
9963
9959
  activeStatusContent
9964
9960
  });
9965
9961
  const fetchMoreOnScrollReached = useScrollFetch({ scrollFetch, containerRef: tableContainerRef });
9966
- const columnResizingEnabled = columnResizing?.enabled;
9967
- const { columnSizing, columnSizingInfo } = table.getState();
9968
- const columnSizeVars = React.useMemo(() => {
9969
- if (!columnResizingEnabled && !virtualEnabled) return {};
9970
- const headers = table.getFlatHeaders();
9971
- const colSizes = {};
9972
- for (const header of headers) {
9973
- colSizes[`--header-${header.id}-size`] = header.getSize();
9974
- colSizes[`--col-${header.column.id}-size`] = header.column.getSize();
9975
- }
9976
- return colSizes;
9977
- }, [columnSizing, columnSizingInfo, columnResizingEnabled, virtualEnabled]);
9978
- const isResizing = columnResizingEnabled && !!columnSizingInfo.isResizingColumn;
9979
9962
  useBindRef_default({ ref: tableRef, value: table });
9980
9963
  useBindRef_default({ ref: virtualizerRef, value: virtualizer });
9981
9964
  return /* @__PURE__ */ jsxRuntime.jsxs(
@@ -10018,11 +10001,7 @@ var DataTable = ({
10018
10001
  Table,
10019
10002
  {
10020
10003
  ...components?.tableProps,
10021
- style: {
10022
- tableLayout: virtualEnabled ? "fixed" : "auto",
10023
- ...components?.tableProps?.style,
10024
- ...columnSizeVars
10025
- },
10004
+ style: { tableLayout: virtualEnabled ? "fixed" : "auto", ...components?.tableProps?.style },
10026
10005
  children: [
10027
10006
  /* @__PURE__ */ jsxRuntime.jsxs(
10028
10007
  TableHeader,
@@ -10053,23 +10032,7 @@ var DataTable = ({
10053
10032
  ]
10054
10033
  }
10055
10034
  ),
10056
- /* @__PURE__ */ jsxRuntime.jsx(TableBody, { ...components?.tableBodyProps, children: isResizing ? /* @__PURE__ */ jsxRuntime.jsx(
10057
- MemoizedTableDataRows,
10058
- {
10059
- table,
10060
- rowModel,
10061
- virtualEnabled,
10062
- virtualItems,
10063
- virtualizer,
10064
- paddingTop,
10065
- paddingBottom,
10066
- visibleColumnCount,
10067
- columnResizing,
10068
- virtual,
10069
- onRowClick,
10070
- components
10071
- }
10072
- ) : /* @__PURE__ */ jsxRuntime.jsx(
10035
+ /* @__PURE__ */ jsxRuntime.jsx(TableBody, { ...components?.tableBodyProps, children: /* @__PURE__ */ jsxRuntime.jsx(
10073
10036
  TableDataRows,
10074
10037
  {
10075
10038
  table,
@@ -10264,7 +10227,7 @@ var DateTimePicker = ({
10264
10227
  },
10265
10228
  [currentHour, handleTimeApply]
10266
10229
  );
10267
- const hours = React__namespace.default.useMemo(() => Array.from({ length: 24 }, (_, index) => 23 - index), []);
10230
+ const hours = React__namespace.default.useMemo(() => Array.from({ length: 24 }, (_, index) => index), []);
10268
10231
  const minuteInterval = React__namespace.default.useMemo(() => {
10269
10232
  const safeStep = Math.min(60, Math.max(1, minuteStep));
10270
10233
  return Array.from({ length: Math.ceil(60 / safeStep) }, (_, index) => index * safeStep).filter(
@@ -13395,23 +13358,12 @@ function TooltipProvider2({
13395
13358
  delayDuration = 0,
13396
13359
  ...props
13397
13360
  }) {
13398
- return /* @__PURE__ */ jsxRuntime.jsx(
13399
- TooltipPrimitive__namespace.Provider,
13400
- {
13401
- "data-slot": "tooltip-provider",
13402
- delayDuration,
13403
- ...props
13404
- }
13405
- );
13361
+ return /* @__PURE__ */ jsxRuntime.jsx(TooltipPrimitive__namespace.Provider, { "data-slot": "tooltip-provider", delayDuration, ...props });
13406
13362
  }
13407
- function Tooltip2({
13408
- ...props
13409
- }) {
13363
+ function Tooltip2({ ...props }) {
13410
13364
  return /* @__PURE__ */ jsxRuntime.jsx(TooltipProvider2, { children: /* @__PURE__ */ jsxRuntime.jsx(TooltipPrimitive__namespace.Root, { "data-slot": "tooltip", ...props }) });
13411
13365
  }
13412
- function TooltipTrigger2({
13413
- ...props
13414
- }) {
13366
+ function TooltipTrigger2({ ...props }) {
13415
13367
  return /* @__PURE__ */ jsxRuntime.jsx(TooltipPrimitive__namespace.Trigger, { "data-slot": "tooltip-trigger", ...props });
13416
13368
  }
13417
13369
  function TooltipArrow(props) {
@@ -14017,6 +13969,144 @@ var Image2 = React__namespace.forwardRef(function Image3({
14017
13969
  );
14018
13970
  });
14019
13971
  Image2.displayName = "Image";
13972
+ function LanguageSelector({
13973
+ tenant,
13974
+ selectedLocale,
13975
+ onSelectLocale,
13976
+ errorLocales = [],
13977
+ enableErrorHighlight = false,
13978
+ sortLocales = true,
13979
+ priorityLocale = "en",
13980
+ className,
13981
+ visibleLocalesCount = 3,
13982
+ localeButtonWidth = 35,
13983
+ localeGap = 4
13984
+ }) {
13985
+ const orderedTenant = React__namespace.default.useMemo(() => {
13986
+ const normalizedPriority = priorityLocale.trim().toLowerCase();
13987
+ const localeAwareSorted = sortLocales ? [...tenant].sort(
13988
+ (a, b) => a.locale.localeCompare(b.locale, void 0, { sensitivity: "base", numeric: true })
13989
+ ) : [...tenant];
13990
+ if (!normalizedPriority) {
13991
+ return localeAwareSorted;
13992
+ }
13993
+ return localeAwareSorted.sort((a, b) => {
13994
+ const aIsPriority = a.locale.toLowerCase() === normalizedPriority;
13995
+ const bIsPriority = b.locale.toLowerCase() === normalizedPriority;
13996
+ if (aIsPriority && !bIsPriority) return -1;
13997
+ if (!aIsPriority && bIsPriority) return 1;
13998
+ return 0;
13999
+ });
14000
+ }, [priorityLocale, sortLocales, tenant]);
14001
+ const selectedIndex = orderedTenant.findIndex((t) => t.locale === selectedLocale);
14002
+ const currentIndex = selectedIndex >= 0 ? selectedIndex : 0;
14003
+ const isFirst = currentIndex <= 0;
14004
+ const isLast = currentIndex >= orderedTenant.length - 1;
14005
+ const safeVisibleCount = Math.min(orderedTenant.length, Math.max(1, visibleLocalesCount));
14006
+ const halfWindow = Math.floor((safeVisibleCount - 1) / 2);
14007
+ const maxStart = Math.max(0, orderedTenant.length - safeVisibleCount);
14008
+ const windowStart = Math.min(maxStart, Math.max(0, currentIndex - halfWindow));
14009
+ const visibleLocales = orderedTenant.slice(windowStart, windowStart + safeVisibleCount);
14010
+ const safeLocaleButtonWidth = Math.max(28, localeButtonWidth);
14011
+ const safeLocaleGap = Math.max(0, localeGap);
14012
+ const localeAreaWidth = safeVisibleCount * safeLocaleButtonWidth + (safeVisibleCount - 1) * safeLocaleGap;
14013
+ const localeWindowRef = React__namespace.default.useRef(null);
14014
+ const previousWindowStartRef = React__namespace.default.useRef(windowStart);
14015
+ React__namespace.default.useEffect(() => {
14016
+ const previousWindowStart = previousWindowStartRef.current;
14017
+ if (previousWindowStart === windowStart) {
14018
+ return;
14019
+ }
14020
+ previousWindowStartRef.current = windowStart;
14021
+ const localeWindow = localeWindowRef.current;
14022
+ if (!localeWindow) {
14023
+ return;
14024
+ }
14025
+ if (window.matchMedia("(prefers-reduced-motion: reduce)").matches) {
14026
+ return;
14027
+ }
14028
+ const movingRight = windowStart > previousWindowStart;
14029
+ const offsetX = movingRight ? 10 : -10;
14030
+ localeWindow.animate(
14031
+ [
14032
+ { opacity: 0.86, transform: `translate3d(${offsetX}px, 0, 0) scale(0.992)` },
14033
+ { opacity: 1, transform: "translate3d(0, 0, 0) scale(1)" }
14034
+ ],
14035
+ {
14036
+ duration: 460,
14037
+ easing: "cubic-bezier(0.22, 1, 0.36, 1)"
14038
+ }
14039
+ );
14040
+ }, [windowStart]);
14041
+ if (orderedTenant.length <= 1) {
14042
+ return null;
14043
+ }
14044
+ return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: cn("flex items-center gap-1 min-w-0", className), children: [
14045
+ /* @__PURE__ */ jsxRuntime.jsx(
14046
+ "button",
14047
+ {
14048
+ type: "button",
14049
+ disabled: isFirst,
14050
+ "aria-label": "Select previous locale",
14051
+ onClick: () => !isFirst && onSelectLocale(orderedTenant[currentIndex - 1]),
14052
+ className: cn(
14053
+ "inline-flex h-8 w-8 items-center justify-center rounded-md transform-gpu motion-safe:transition-[transform,background-color,color,box-shadow] motion-safe:duration-400 motion-safe:ease-[cubic-bezier(0.22,1,0.36,1)] active:scale-[0.985]",
14054
+ isFirst ? "text-muted-foreground/30 cursor-not-allowed" : "text-muted-foreground hover:text-foreground hover:bg-muted hover:shadow-sm"
14055
+ ),
14056
+ children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.ChevronLeft, { className: "h-4 w-4" })
14057
+ }
14058
+ ),
14059
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: "min-w-0 overflow-hidden", style: { width: localeAreaWidth, maxWidth: "100%" }, children: /* @__PURE__ */ jsxRuntime.jsx(
14060
+ "div",
14061
+ {
14062
+ ref: localeWindowRef,
14063
+ className: "grid gap-1",
14064
+ style: {
14065
+ gridTemplateColumns: `repeat(${safeVisibleCount}, minmax(0, 1fr))`,
14066
+ columnGap: safeLocaleGap
14067
+ },
14068
+ children: visibleLocales.map((lang) => /* @__PURE__ */ jsxRuntime.jsx(
14069
+ "button",
14070
+ {
14071
+ type: "button",
14072
+ "data-locale": lang.locale,
14073
+ "aria-label": lang.locale.toUpperCase(),
14074
+ onClick: () => onSelectLocale(lang),
14075
+ className: cn(
14076
+ "h-8 min-w-0 px-2 text-xs font-medium rounded-md transform-gpu motion-safe:transition-[transform,background-color,color,box-shadow] motion-safe:duration-400 motion-safe:ease-[cubic-bezier(0.22,1,0.36,1)] active:scale-[0.985] select-none",
14077
+ selectedLocale === lang.locale ? "bg-primary text-primary-foreground shadow-sm" : "bg-muted text-muted-foreground hover:bg-muted/80 hover:shadow-sm",
14078
+ enableErrorHighlight && errorLocales.includes(lang.locale) && "ring-1 ring-inset ring-red-500"
14079
+ ),
14080
+ children: /* @__PURE__ */ jsxRuntime.jsx(
14081
+ truncated_default,
14082
+ {
14083
+ as: "span",
14084
+ className: "block w-full text-center",
14085
+ tooltipContentProps: { side: "bottom", sideOffset: 6 },
14086
+ children: lang.locale.toUpperCase()
14087
+ }
14088
+ )
14089
+ },
14090
+ lang.locale
14091
+ ))
14092
+ }
14093
+ ) }),
14094
+ /* @__PURE__ */ jsxRuntime.jsx(
14095
+ "button",
14096
+ {
14097
+ type: "button",
14098
+ disabled: isLast,
14099
+ "aria-label": "Select next locale",
14100
+ onClick: () => !isLast && onSelectLocale(orderedTenant[currentIndex + 1]),
14101
+ className: cn(
14102
+ "inline-flex h-8 w-8 items-center justify-center rounded-md transform-gpu motion-safe:transition-[transform,background-color,color,box-shadow] motion-safe:duration-400 motion-safe:ease-[cubic-bezier(0.22,1,0.36,1)] active:scale-[0.985]",
14103
+ isLast ? "text-muted-foreground/30 cursor-not-allowed" : "text-muted-foreground hover:text-foreground hover:bg-muted hover:shadow-sm"
14104
+ ),
14105
+ children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.ChevronRight, { className: "h-4 w-4" })
14106
+ }
14107
+ )
14108
+ ] });
14109
+ }
14020
14110
  var AnimatedDots = () => {
14021
14111
  const dotAnimation = `
14022
14112
  @keyframes dot1 {
@@ -18877,6 +18967,7 @@ exports.Input = Input;
18877
18967
  exports.InputMention = InputMention;
18878
18968
  exports.InputNumber = InputNumber_default;
18879
18969
  exports.Label = Label2;
18970
+ exports.LanguageSelector = LanguageSelector;
18880
18971
  exports.LoadingPage = LoadingPage;
18881
18972
  exports.LookupSelect = LookupSelect;
18882
18973
  exports.MailIcon = MailIcon;