@ikatec/nebula-react 1.9.0-beta.5 → 1.9.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/ikatec-nebula-react-1.9.0.tgz +0 -0
- package/dist/index.d.mts +27 -2
- package/dist/index.d.ts +27 -2
- package/dist/index.js +173 -63
- package/dist/index.mjs +173 -64
- package/package.json +1 -2
- package/dist/ikatec-nebula-react-1.9.0-beta.5.tgz +0 -0
|
Binary file
|
package/dist/index.d.mts
CHANGED
|
@@ -248,7 +248,7 @@ declare const BannerAlert: ({ variant, type, title, description, onClose, childr
|
|
|
248
248
|
interface BoxProps extends PropsWithChildren<HTMLAttributes<HTMLDivElement>> {
|
|
249
249
|
border?: boolean;
|
|
250
250
|
paddingSize?: 'none' | 'sm' | 'md' | 'lg' | 'xl';
|
|
251
|
-
shadow?: 'sm' | 'md' | 'lg';
|
|
251
|
+
shadow?: 'sm' | 'md' | 'lg' | 'none';
|
|
252
252
|
variant?: 'primary' | 'secondary';
|
|
253
253
|
}
|
|
254
254
|
declare const Box: ({ className, paddingSize, border, shadow, variant, children, ...rest }: BoxProps) => react_jsx_runtime.JSX.Element;
|
|
@@ -311,6 +311,11 @@ interface CropperMessages {
|
|
|
311
311
|
dialogTitle: string;
|
|
312
312
|
applyButtonLabel: string;
|
|
313
313
|
}
|
|
314
|
+
interface ComboboxMessages {
|
|
315
|
+
removeAll: string;
|
|
316
|
+
noItemsSelected: string;
|
|
317
|
+
selectAnOption: string;
|
|
318
|
+
}
|
|
314
319
|
/**
|
|
315
320
|
* Type to store the messages.
|
|
316
321
|
*/
|
|
@@ -321,6 +326,7 @@ interface Messages {
|
|
|
321
326
|
timePicker: TimePickerMessages;
|
|
322
327
|
fileUpload: FileUploadMessages;
|
|
323
328
|
cropper: CropperMessages;
|
|
329
|
+
combobox: ComboboxMessages;
|
|
324
330
|
}
|
|
325
331
|
|
|
326
332
|
declare enum NebulaLanguage {
|
|
@@ -615,6 +621,7 @@ interface InputDateTimePickerSingleProps extends Omit<InputTextProps, 'onChange'
|
|
|
615
621
|
className?: string;
|
|
616
622
|
disabledDates?: CalendarProps['disabled'];
|
|
617
623
|
onClean?: VoidFunction;
|
|
624
|
+
popoverContainer?: HTMLElement | null;
|
|
618
625
|
}
|
|
619
626
|
declare const InputDateTimePickerSingle: ({ placeholder, className, value, onChange, numberOfMonths, onClean, disabledDates, ...rest }: InputDateTimePickerSingleProps) => react_jsx_runtime.JSX.Element;
|
|
620
627
|
|
|
@@ -1136,6 +1143,24 @@ type SidebarMenuItemProps = {
|
|
|
1136
1143
|
};
|
|
1137
1144
|
declare function SidebarMenuItem({ icon, action, label, active, disabled, counter, collapsible, defaultOpen, children, }: SidebarMenuItemProps): react_jsx_runtime.JSX.Element;
|
|
1138
1145
|
|
|
1146
|
+
type Option = {
|
|
1147
|
+
value: string;
|
|
1148
|
+
label: string;
|
|
1149
|
+
color?: TagVariantsType;
|
|
1150
|
+
};
|
|
1151
|
+
interface ComboboxProps extends Omit<CreateStyledSelectProps, 'value' | 'onChange'> {
|
|
1152
|
+
icon?: React__default.ReactNode;
|
|
1153
|
+
placeholder?: string;
|
|
1154
|
+
options: Option[];
|
|
1155
|
+
value?: Option[];
|
|
1156
|
+
onChange?: (value: Option[]) => void;
|
|
1157
|
+
isClearable?: boolean;
|
|
1158
|
+
showEmptyState?: boolean;
|
|
1159
|
+
emptyStateText?: string;
|
|
1160
|
+
emptyStateDescription?: string;
|
|
1161
|
+
}
|
|
1162
|
+
declare function Combobox({ value, onChange, showEmptyState, isClearable, emptyStateText, emptyStateDescription, ...props }: ComboboxProps): react_jsx_runtime.JSX.Element;
|
|
1163
|
+
|
|
1139
1164
|
/**
|
|
1140
1165
|
* Context type to use the NebulaI18nProvider.
|
|
1141
1166
|
*/
|
|
@@ -1208,4 +1233,4 @@ declare function useKeyPress(key: string, callback: VoidFunction): void;
|
|
|
1208
1233
|
|
|
1209
1234
|
declare const useIsMobile: (breakpoint?: number) => boolean;
|
|
1210
1235
|
|
|
1211
|
-
export { Accordion, AccordionContent, AccordionDescription, AccordionItem, type AccordionProps, AccordionTitle, AccordionTrigger, ActionBar, ActionBarButton, ActionBarClose, ActionBarContent, ActionBarDivider, ActionBarPortal, ActionBarTrigger, Alert, AlertButton, AlertDescription, AlertDialog, AlertDialogAction, AlertDialogCancel, AlertDialogContent, AlertDialogDescription, AlertDialogFooter, AlertDialogHeader, AlertDialogTitle, AlertDialogTrigger, type AlertProps, AlertTitle, StyledAsync as Async, StyledAsyncCreatable as AsyncCreatable, Avatar, AvatarFallback, AvatarHoverAction, AvatarImage, AvatarSizeEnum, AvatarStick, AvatarVariantEnum, Badge, type BadgeProps, BannerAlert, type BannerAlertProps, BannerType, BannerVariant, Box, type BoxProps, Breadcrumb, BreadcrumbEllipsis, BreadcrumbItem, BreadcrumbLink, BreadcrumbList, BreadcrumbPage, BreadcrumbSeparator, Button, type ButtonProps, Calendar, type CalendarProps, Caption, type CaptionProps, Checkbox, type CheckboxProps, StyledCreatable as Creatable, Cropper, CropperCropArea, CropperDescription, CropperImage, type CropperProps, Dialog, DialogBody, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogTitle, DialogTrigger, Drawer, DrawerBody, DrawerClose, DrawerContent, DrawerDescription, DrawerFooter, DrawerHeader, DrawerOverlay, DrawerPortal, DrawerTitle, DrawerTrigger, DropdownMenu, DropdownMenuCheckboxItem, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuTrigger, type FileMetadata, FileUpload, type FileUploadActions, FileUploadError, type FileUploadOptions, type FileUploadProps, type FileUploadState, type FileWithPreview, Heading, type HeadingProps, InputDatePickerSingle, type InputDatePickerSingleProps, InputDateRangePicker, type InputDateRangePickerProps, InputDateTimePickerSingle, type InputDateTimePickerSingleProps, InputPhone, InputText, type InputTextProps, InputTime, type InputTimeProps, KanbanBoard, type KanbanBoardCard, type KanbanBoardColumn, type KanbanBoardProps, KanbanCard, type KanbanCardDropEvent, KanbanColumn, KanbanColumnDragHandle, type KanbanColumnDropEvent, KanbanColumnFooter, KanbanColumnHeader, KanbanColumnTitle, type KanbanOrderingMode, type KanbanRenderCardContext, type KanbanRenderColumnBodyContext, type KanbanRenderColumnContext, Label, Link, type LinkProps, NebulaI18nProvider, type NebulaI18nProviderProps, Pagination, type PaginationProps, Paragraph, type ParagraphProps, Popover, PopoverContent, type PopoverContentProps, PopoverTrigger, ProfileImage, type ProfileImageProps, RadioGroup, RadioGroupItem, StyledSelect as Select, type CreateStyledSelectProps as SelectProps, Separator, type SeparatorProps, Sidebar, SidebarContent, SidebarFooter, SidebarGroup, SidebarGroupLabel, SidebarHeader, SidebarMenuItem, type SidebarProps, SidebarSeparator, SidebarStateEnum, SidebarTitle, SidebarTrigger, Skeleton, type SkeletonProps, Slider, Space, SpaceDirectionEnum, type SpaceProps, SpaceSizeEnum, Stepper, StepperDescription, StepperIndicator, StepperItem, StepperSeparator, StepperTitle, StepperTrigger, Switch, Table, TableBody, TableCaption, TableCell, TableFooter, TableHead, TableHeader, TableRow, Tabs, TabsContent, TabsList, TabsTrigger, Tag, type TagProps, TextArea, type TextAreaProps, TipCard, TipCardContent, TipCardFooter, TipCardHeader, TipCardItem, TipCardMedia, TipCardMediaType, TipCardProvider, Toaster, Toggle, ToggleGroup, ToggleGroupItem, ToggleGroupTypeEnum, ToggleSizeEnum, Tooltip, type TooltipProps, alertVariants, badgeSizeEnum, badgeVariantEnum, buttonSizeEnum, buttonVariantEnum, buttonVariantsConfig, dateIsAvailable, formatBytes, getNebulaLanguage, localeByi18nKey, messages, separatorVariants, setNebulaLanguage, tagVariantsEnum, tailwind, toast, toggleVariants, useClickOutside, useFileUpload, useIsMobile, useKeyPress, useNebulaI18n, useSidebar, useTipCard };
|
|
1236
|
+
export { Accordion, AccordionContent, AccordionDescription, AccordionItem, type AccordionProps, AccordionTitle, AccordionTrigger, ActionBar, ActionBarButton, ActionBarClose, ActionBarContent, ActionBarDivider, ActionBarPortal, ActionBarTrigger, Alert, AlertButton, AlertDescription, AlertDialog, AlertDialogAction, AlertDialogCancel, AlertDialogContent, AlertDialogDescription, AlertDialogFooter, AlertDialogHeader, AlertDialogTitle, AlertDialogTrigger, type AlertProps, AlertTitle, StyledAsync as Async, StyledAsyncCreatable as AsyncCreatable, Avatar, AvatarFallback, AvatarHoverAction, AvatarImage, AvatarSizeEnum, AvatarStick, AvatarVariantEnum, Badge, type BadgeProps, BannerAlert, type BannerAlertProps, BannerType, BannerVariant, Box, type BoxProps, Breadcrumb, BreadcrumbEllipsis, BreadcrumbItem, BreadcrumbLink, BreadcrumbList, BreadcrumbPage, BreadcrumbSeparator, Button, type ButtonProps, Calendar, type CalendarProps, Caption, type CaptionProps, Checkbox, type CheckboxProps, Combobox, type Option as ComboboxOption, type ComboboxProps, StyledCreatable as Creatable, Cropper, CropperCropArea, CropperDescription, CropperImage, type CropperProps, Dialog, DialogBody, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogTitle, DialogTrigger, Drawer, DrawerBody, DrawerClose, DrawerContent, DrawerDescription, DrawerFooter, DrawerHeader, DrawerOverlay, DrawerPortal, DrawerTitle, DrawerTrigger, DropdownMenu, DropdownMenuCheckboxItem, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuTrigger, type FileMetadata, FileUpload, type FileUploadActions, FileUploadError, type FileUploadOptions, type FileUploadProps, type FileUploadState, type FileWithPreview, Heading, type HeadingProps, InputDatePickerSingle, type InputDatePickerSingleProps, InputDateRangePicker, type InputDateRangePickerProps, InputDateTimePickerSingle, type InputDateTimePickerSingleProps, InputPhone, InputText, type InputTextProps, InputTime, type InputTimeProps, KanbanBoard, type KanbanBoardCard, type KanbanBoardColumn, type KanbanBoardProps, KanbanCard, type KanbanCardDropEvent, KanbanColumn, KanbanColumnDragHandle, type KanbanColumnDropEvent, KanbanColumnFooter, KanbanColumnHeader, KanbanColumnTitle, type KanbanOrderingMode, type KanbanRenderCardContext, type KanbanRenderColumnBodyContext, type KanbanRenderColumnContext, Label, Link, type LinkProps, NebulaI18nProvider, type NebulaI18nProviderProps, Pagination, type PaginationProps, Paragraph, type ParagraphProps, Popover, PopoverContent, type PopoverContentProps, PopoverTrigger, ProfileImage, type ProfileImageProps, RadioGroup, RadioGroupItem, StyledSelect as Select, type CreateStyledSelectProps as SelectProps, Separator, type SeparatorProps, Sidebar, SidebarContent, SidebarFooter, SidebarGroup, SidebarGroupLabel, SidebarHeader, SidebarMenuItem, type SidebarProps, SidebarSeparator, SidebarStateEnum, SidebarTitle, SidebarTrigger, Skeleton, type SkeletonProps, Slider, Space, SpaceDirectionEnum, type SpaceProps, SpaceSizeEnum, Stepper, StepperDescription, StepperIndicator, StepperItem, StepperSeparator, StepperTitle, StepperTrigger, Switch, Table, TableBody, TableCaption, TableCell, TableFooter, TableHead, TableHeader, TableRow, Tabs, TabsContent, TabsList, TabsTrigger, Tag, type TagProps, type TagVariantsType, TextArea, type TextAreaProps, TipCard, TipCardContent, TipCardFooter, TipCardHeader, TipCardItem, TipCardMedia, TipCardMediaType, TipCardProvider, Toaster, Toggle, ToggleGroup, ToggleGroupItem, ToggleGroupTypeEnum, ToggleSizeEnum, Tooltip, type TooltipProps, alertVariants, badgeSizeEnum, badgeVariantEnum, buttonSizeEnum, buttonVariantEnum, buttonVariantsConfig, dateIsAvailable, formatBytes, getNebulaLanguage, localeByi18nKey, messages, separatorVariants, setNebulaLanguage, tagVariantsEnum, tailwind, toast, toggleVariants, useClickOutside, useFileUpload, useIsMobile, useKeyPress, useNebulaI18n, useSidebar, useTipCard };
|
package/dist/index.d.ts
CHANGED
|
@@ -248,7 +248,7 @@ declare const BannerAlert: ({ variant, type, title, description, onClose, childr
|
|
|
248
248
|
interface BoxProps extends PropsWithChildren<HTMLAttributes<HTMLDivElement>> {
|
|
249
249
|
border?: boolean;
|
|
250
250
|
paddingSize?: 'none' | 'sm' | 'md' | 'lg' | 'xl';
|
|
251
|
-
shadow?: 'sm' | 'md' | 'lg';
|
|
251
|
+
shadow?: 'sm' | 'md' | 'lg' | 'none';
|
|
252
252
|
variant?: 'primary' | 'secondary';
|
|
253
253
|
}
|
|
254
254
|
declare const Box: ({ className, paddingSize, border, shadow, variant, children, ...rest }: BoxProps) => react_jsx_runtime.JSX.Element;
|
|
@@ -311,6 +311,11 @@ interface CropperMessages {
|
|
|
311
311
|
dialogTitle: string;
|
|
312
312
|
applyButtonLabel: string;
|
|
313
313
|
}
|
|
314
|
+
interface ComboboxMessages {
|
|
315
|
+
removeAll: string;
|
|
316
|
+
noItemsSelected: string;
|
|
317
|
+
selectAnOption: string;
|
|
318
|
+
}
|
|
314
319
|
/**
|
|
315
320
|
* Type to store the messages.
|
|
316
321
|
*/
|
|
@@ -321,6 +326,7 @@ interface Messages {
|
|
|
321
326
|
timePicker: TimePickerMessages;
|
|
322
327
|
fileUpload: FileUploadMessages;
|
|
323
328
|
cropper: CropperMessages;
|
|
329
|
+
combobox: ComboboxMessages;
|
|
324
330
|
}
|
|
325
331
|
|
|
326
332
|
declare enum NebulaLanguage {
|
|
@@ -615,6 +621,7 @@ interface InputDateTimePickerSingleProps extends Omit<InputTextProps, 'onChange'
|
|
|
615
621
|
className?: string;
|
|
616
622
|
disabledDates?: CalendarProps['disabled'];
|
|
617
623
|
onClean?: VoidFunction;
|
|
624
|
+
popoverContainer?: HTMLElement | null;
|
|
618
625
|
}
|
|
619
626
|
declare const InputDateTimePickerSingle: ({ placeholder, className, value, onChange, numberOfMonths, onClean, disabledDates, ...rest }: InputDateTimePickerSingleProps) => react_jsx_runtime.JSX.Element;
|
|
620
627
|
|
|
@@ -1136,6 +1143,24 @@ type SidebarMenuItemProps = {
|
|
|
1136
1143
|
};
|
|
1137
1144
|
declare function SidebarMenuItem({ icon, action, label, active, disabled, counter, collapsible, defaultOpen, children, }: SidebarMenuItemProps): react_jsx_runtime.JSX.Element;
|
|
1138
1145
|
|
|
1146
|
+
type Option = {
|
|
1147
|
+
value: string;
|
|
1148
|
+
label: string;
|
|
1149
|
+
color?: TagVariantsType;
|
|
1150
|
+
};
|
|
1151
|
+
interface ComboboxProps extends Omit<CreateStyledSelectProps, 'value' | 'onChange'> {
|
|
1152
|
+
icon?: React__default.ReactNode;
|
|
1153
|
+
placeholder?: string;
|
|
1154
|
+
options: Option[];
|
|
1155
|
+
value?: Option[];
|
|
1156
|
+
onChange?: (value: Option[]) => void;
|
|
1157
|
+
isClearable?: boolean;
|
|
1158
|
+
showEmptyState?: boolean;
|
|
1159
|
+
emptyStateText?: string;
|
|
1160
|
+
emptyStateDescription?: string;
|
|
1161
|
+
}
|
|
1162
|
+
declare function Combobox({ value, onChange, showEmptyState, isClearable, emptyStateText, emptyStateDescription, ...props }: ComboboxProps): react_jsx_runtime.JSX.Element;
|
|
1163
|
+
|
|
1139
1164
|
/**
|
|
1140
1165
|
* Context type to use the NebulaI18nProvider.
|
|
1141
1166
|
*/
|
|
@@ -1208,4 +1233,4 @@ declare function useKeyPress(key: string, callback: VoidFunction): void;
|
|
|
1208
1233
|
|
|
1209
1234
|
declare const useIsMobile: (breakpoint?: number) => boolean;
|
|
1210
1235
|
|
|
1211
|
-
export { Accordion, AccordionContent, AccordionDescription, AccordionItem, type AccordionProps, AccordionTitle, AccordionTrigger, ActionBar, ActionBarButton, ActionBarClose, ActionBarContent, ActionBarDivider, ActionBarPortal, ActionBarTrigger, Alert, AlertButton, AlertDescription, AlertDialog, AlertDialogAction, AlertDialogCancel, AlertDialogContent, AlertDialogDescription, AlertDialogFooter, AlertDialogHeader, AlertDialogTitle, AlertDialogTrigger, type AlertProps, AlertTitle, StyledAsync as Async, StyledAsyncCreatable as AsyncCreatable, Avatar, AvatarFallback, AvatarHoverAction, AvatarImage, AvatarSizeEnum, AvatarStick, AvatarVariantEnum, Badge, type BadgeProps, BannerAlert, type BannerAlertProps, BannerType, BannerVariant, Box, type BoxProps, Breadcrumb, BreadcrumbEllipsis, BreadcrumbItem, BreadcrumbLink, BreadcrumbList, BreadcrumbPage, BreadcrumbSeparator, Button, type ButtonProps, Calendar, type CalendarProps, Caption, type CaptionProps, Checkbox, type CheckboxProps, StyledCreatable as Creatable, Cropper, CropperCropArea, CropperDescription, CropperImage, type CropperProps, Dialog, DialogBody, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogTitle, DialogTrigger, Drawer, DrawerBody, DrawerClose, DrawerContent, DrawerDescription, DrawerFooter, DrawerHeader, DrawerOverlay, DrawerPortal, DrawerTitle, DrawerTrigger, DropdownMenu, DropdownMenuCheckboxItem, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuTrigger, type FileMetadata, FileUpload, type FileUploadActions, FileUploadError, type FileUploadOptions, type FileUploadProps, type FileUploadState, type FileWithPreview, Heading, type HeadingProps, InputDatePickerSingle, type InputDatePickerSingleProps, InputDateRangePicker, type InputDateRangePickerProps, InputDateTimePickerSingle, type InputDateTimePickerSingleProps, InputPhone, InputText, type InputTextProps, InputTime, type InputTimeProps, KanbanBoard, type KanbanBoardCard, type KanbanBoardColumn, type KanbanBoardProps, KanbanCard, type KanbanCardDropEvent, KanbanColumn, KanbanColumnDragHandle, type KanbanColumnDropEvent, KanbanColumnFooter, KanbanColumnHeader, KanbanColumnTitle, type KanbanOrderingMode, type KanbanRenderCardContext, type KanbanRenderColumnBodyContext, type KanbanRenderColumnContext, Label, Link, type LinkProps, NebulaI18nProvider, type NebulaI18nProviderProps, Pagination, type PaginationProps, Paragraph, type ParagraphProps, Popover, PopoverContent, type PopoverContentProps, PopoverTrigger, ProfileImage, type ProfileImageProps, RadioGroup, RadioGroupItem, StyledSelect as Select, type CreateStyledSelectProps as SelectProps, Separator, type SeparatorProps, Sidebar, SidebarContent, SidebarFooter, SidebarGroup, SidebarGroupLabel, SidebarHeader, SidebarMenuItem, type SidebarProps, SidebarSeparator, SidebarStateEnum, SidebarTitle, SidebarTrigger, Skeleton, type SkeletonProps, Slider, Space, SpaceDirectionEnum, type SpaceProps, SpaceSizeEnum, Stepper, StepperDescription, StepperIndicator, StepperItem, StepperSeparator, StepperTitle, StepperTrigger, Switch, Table, TableBody, TableCaption, TableCell, TableFooter, TableHead, TableHeader, TableRow, Tabs, TabsContent, TabsList, TabsTrigger, Tag, type TagProps, TextArea, type TextAreaProps, TipCard, TipCardContent, TipCardFooter, TipCardHeader, TipCardItem, TipCardMedia, TipCardMediaType, TipCardProvider, Toaster, Toggle, ToggleGroup, ToggleGroupItem, ToggleGroupTypeEnum, ToggleSizeEnum, Tooltip, type TooltipProps, alertVariants, badgeSizeEnum, badgeVariantEnum, buttonSizeEnum, buttonVariantEnum, buttonVariantsConfig, dateIsAvailable, formatBytes, getNebulaLanguage, localeByi18nKey, messages, separatorVariants, setNebulaLanguage, tagVariantsEnum, tailwind, toast, toggleVariants, useClickOutside, useFileUpload, useIsMobile, useKeyPress, useNebulaI18n, useSidebar, useTipCard };
|
|
1236
|
+
export { Accordion, AccordionContent, AccordionDescription, AccordionItem, type AccordionProps, AccordionTitle, AccordionTrigger, ActionBar, ActionBarButton, ActionBarClose, ActionBarContent, ActionBarDivider, ActionBarPortal, ActionBarTrigger, Alert, AlertButton, AlertDescription, AlertDialog, AlertDialogAction, AlertDialogCancel, AlertDialogContent, AlertDialogDescription, AlertDialogFooter, AlertDialogHeader, AlertDialogTitle, AlertDialogTrigger, type AlertProps, AlertTitle, StyledAsync as Async, StyledAsyncCreatable as AsyncCreatable, Avatar, AvatarFallback, AvatarHoverAction, AvatarImage, AvatarSizeEnum, AvatarStick, AvatarVariantEnum, Badge, type BadgeProps, BannerAlert, type BannerAlertProps, BannerType, BannerVariant, Box, type BoxProps, Breadcrumb, BreadcrumbEllipsis, BreadcrumbItem, BreadcrumbLink, BreadcrumbList, BreadcrumbPage, BreadcrumbSeparator, Button, type ButtonProps, Calendar, type CalendarProps, Caption, type CaptionProps, Checkbox, type CheckboxProps, Combobox, type Option as ComboboxOption, type ComboboxProps, StyledCreatable as Creatable, Cropper, CropperCropArea, CropperDescription, CropperImage, type CropperProps, Dialog, DialogBody, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogTitle, DialogTrigger, Drawer, DrawerBody, DrawerClose, DrawerContent, DrawerDescription, DrawerFooter, DrawerHeader, DrawerOverlay, DrawerPortal, DrawerTitle, DrawerTrigger, DropdownMenu, DropdownMenuCheckboxItem, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuTrigger, type FileMetadata, FileUpload, type FileUploadActions, FileUploadError, type FileUploadOptions, type FileUploadProps, type FileUploadState, type FileWithPreview, Heading, type HeadingProps, InputDatePickerSingle, type InputDatePickerSingleProps, InputDateRangePicker, type InputDateRangePickerProps, InputDateTimePickerSingle, type InputDateTimePickerSingleProps, InputPhone, InputText, type InputTextProps, InputTime, type InputTimeProps, KanbanBoard, type KanbanBoardCard, type KanbanBoardColumn, type KanbanBoardProps, KanbanCard, type KanbanCardDropEvent, KanbanColumn, KanbanColumnDragHandle, type KanbanColumnDropEvent, KanbanColumnFooter, KanbanColumnHeader, KanbanColumnTitle, type KanbanOrderingMode, type KanbanRenderCardContext, type KanbanRenderColumnBodyContext, type KanbanRenderColumnContext, Label, Link, type LinkProps, NebulaI18nProvider, type NebulaI18nProviderProps, Pagination, type PaginationProps, Paragraph, type ParagraphProps, Popover, PopoverContent, type PopoverContentProps, PopoverTrigger, ProfileImage, type ProfileImageProps, RadioGroup, RadioGroupItem, StyledSelect as Select, type CreateStyledSelectProps as SelectProps, Separator, type SeparatorProps, Sidebar, SidebarContent, SidebarFooter, SidebarGroup, SidebarGroupLabel, SidebarHeader, SidebarMenuItem, type SidebarProps, SidebarSeparator, SidebarStateEnum, SidebarTitle, SidebarTrigger, Skeleton, type SkeletonProps, Slider, Space, SpaceDirectionEnum, type SpaceProps, SpaceSizeEnum, Stepper, StepperDescription, StepperIndicator, StepperItem, StepperSeparator, StepperTitle, StepperTrigger, Switch, Table, TableBody, TableCaption, TableCell, TableFooter, TableHead, TableHeader, TableRow, Tabs, TabsContent, TabsList, TabsTrigger, Tag, type TagProps, type TagVariantsType, TextArea, type TextAreaProps, TipCard, TipCardContent, TipCardFooter, TipCardHeader, TipCardItem, TipCardMedia, TipCardMediaType, TipCardProvider, Toaster, Toggle, ToggleGroup, ToggleGroupItem, ToggleGroupTypeEnum, ToggleSizeEnum, Tooltip, type TooltipProps, alertVariants, badgeSizeEnum, badgeVariantEnum, buttonSizeEnum, buttonVariantEnum, buttonVariantsConfig, dateIsAvailable, formatBytes, getNebulaLanguage, localeByi18nKey, messages, separatorVariants, setNebulaLanguage, tagVariantsEnum, tailwind, toast, toggleVariants, useClickOutside, useFileUpload, useIsMobile, useKeyPress, useNebulaI18n, useSidebar, useTipCard };
|
package/dist/index.js
CHANGED
|
@@ -1073,7 +1073,8 @@ var Box = ({
|
|
|
1073
1073
|
{
|
|
1074
1074
|
"shadow-sm": shadow === "sm",
|
|
1075
1075
|
"shadow-md": shadow === "md",
|
|
1076
|
-
"shadow-lg": shadow === "lg"
|
|
1076
|
+
"shadow-lg": shadow === "lg",
|
|
1077
|
+
"shadow-none": shadow === "none"
|
|
1077
1078
|
},
|
|
1078
1079
|
className
|
|
1079
1080
|
),
|
|
@@ -1462,6 +1463,14 @@ var messages6 = {
|
|
|
1462
1463
|
};
|
|
1463
1464
|
var cropper_default = messages6;
|
|
1464
1465
|
|
|
1466
|
+
// src/i18n/messages/en/combobox.ts
|
|
1467
|
+
var messages7 = {
|
|
1468
|
+
removeAll: "Remove all",
|
|
1469
|
+
noItemsSelected: "No items selected",
|
|
1470
|
+
selectAnOption: "Type to begin searching and select an option."
|
|
1471
|
+
};
|
|
1472
|
+
var combobox_default = messages7;
|
|
1473
|
+
|
|
1465
1474
|
// src/i18n/messages/en/index.ts
|
|
1466
1475
|
var enMessages = {
|
|
1467
1476
|
cropper: cropper_default,
|
|
@@ -1469,11 +1478,12 @@ var enMessages = {
|
|
|
1469
1478
|
inputSelect: input_select_default,
|
|
1470
1479
|
inputPhone: input_phone_default,
|
|
1471
1480
|
timePicker: time_picker_default,
|
|
1472
|
-
fileUpload: file_upload_default
|
|
1481
|
+
fileUpload: file_upload_default,
|
|
1482
|
+
combobox: combobox_default
|
|
1473
1483
|
};
|
|
1474
1484
|
|
|
1475
1485
|
// src/i18n/messages/es/pagination.ts
|
|
1476
|
-
var
|
|
1486
|
+
var messages8 = {
|
|
1477
1487
|
totalResultsLabel(pagesSize, totalResults) {
|
|
1478
1488
|
if (totalResults < pagesSize) {
|
|
1479
1489
|
pagesSize = totalResults;
|
|
@@ -1484,16 +1494,16 @@ var messages7 = {
|
|
|
1484
1494
|
return `P\xE1gina ${currentPage} de ${totalPages}`;
|
|
1485
1495
|
}
|
|
1486
1496
|
};
|
|
1487
|
-
var pagination_default2 =
|
|
1497
|
+
var pagination_default2 = messages8;
|
|
1488
1498
|
|
|
1489
1499
|
// src/i18n/messages/es/input-select.ts
|
|
1490
|
-
var
|
|
1500
|
+
var messages9 = {
|
|
1491
1501
|
noOptions: "No hay opciones disponibles"
|
|
1492
1502
|
};
|
|
1493
|
-
var input_select_default2 =
|
|
1503
|
+
var input_select_default2 = messages9;
|
|
1494
1504
|
|
|
1495
1505
|
// src/i18n/messages/es/input-phone.ts
|
|
1496
|
-
var
|
|
1506
|
+
var messages10 = {
|
|
1497
1507
|
countries: {
|
|
1498
1508
|
empty: "Seleccionar",
|
|
1499
1509
|
AF: "Afganist\xE1n",
|
|
@@ -1743,26 +1753,34 @@ var messages9 = {
|
|
|
1743
1753
|
ZW: "Zimbabue"
|
|
1744
1754
|
}
|
|
1745
1755
|
};
|
|
1746
|
-
var input_phone_default2 =
|
|
1756
|
+
var input_phone_default2 = messages10;
|
|
1747
1757
|
|
|
1748
1758
|
// src/i18n/messages/es/time-picker.ts
|
|
1749
|
-
var
|
|
1759
|
+
var messages11 = {
|
|
1750
1760
|
label: "Tiempo"
|
|
1751
1761
|
};
|
|
1752
|
-
var time_picker_default2 =
|
|
1762
|
+
var time_picker_default2 = messages11;
|
|
1753
1763
|
|
|
1754
1764
|
// src/i18n/messages/es/file-upload.ts
|
|
1755
|
-
var
|
|
1765
|
+
var messages12 = {
|
|
1756
1766
|
deleteAll: "Remover todos"
|
|
1757
1767
|
};
|
|
1758
|
-
var file_upload_default2 =
|
|
1768
|
+
var file_upload_default2 = messages12;
|
|
1759
1769
|
|
|
1760
1770
|
// src/i18n/messages/es/cropper.ts
|
|
1761
|
-
var
|
|
1771
|
+
var messages13 = {
|
|
1762
1772
|
applyButtonLabel: "Aplicar",
|
|
1763
1773
|
dialogTitle: "Ajustar la imagen"
|
|
1764
1774
|
};
|
|
1765
|
-
var cropper_default2 =
|
|
1775
|
+
var cropper_default2 = messages13;
|
|
1776
|
+
|
|
1777
|
+
// src/i18n/messages/es/combobox.ts
|
|
1778
|
+
var messages14 = {
|
|
1779
|
+
removeAll: "Eliminar todos",
|
|
1780
|
+
noItemsSelected: "No hay elementos seleccionados",
|
|
1781
|
+
selectAnOption: "Escriba para comenzar a buscar y seleccione una opci\xF3n."
|
|
1782
|
+
};
|
|
1783
|
+
var combobox_default2 = messages14;
|
|
1766
1784
|
|
|
1767
1785
|
// src/i18n/messages/es/index.ts
|
|
1768
1786
|
var esMessages = {
|
|
@@ -1771,11 +1789,12 @@ var esMessages = {
|
|
|
1771
1789
|
inputSelect: input_select_default2,
|
|
1772
1790
|
inputPhone: input_phone_default2,
|
|
1773
1791
|
timePicker: time_picker_default2,
|
|
1774
|
-
fileUpload: file_upload_default2
|
|
1792
|
+
fileUpload: file_upload_default2,
|
|
1793
|
+
combobox: combobox_default2
|
|
1775
1794
|
};
|
|
1776
1795
|
|
|
1777
1796
|
// src/i18n/messages/pt-br/pagination.ts
|
|
1778
|
-
var
|
|
1797
|
+
var messages15 = {
|
|
1779
1798
|
totalResultsLabel(pagesSize, totalResults) {
|
|
1780
1799
|
if (totalResults < pagesSize) {
|
|
1781
1800
|
pagesSize = totalResults;
|
|
@@ -1786,16 +1805,16 @@ var messages13 = {
|
|
|
1786
1805
|
return `P\xE1gina ${currentPage} de ${totalPages}`;
|
|
1787
1806
|
}
|
|
1788
1807
|
};
|
|
1789
|
-
var pagination_default3 =
|
|
1808
|
+
var pagination_default3 = messages15;
|
|
1790
1809
|
|
|
1791
1810
|
// src/i18n/messages/pt-br/input-select.ts
|
|
1792
|
-
var
|
|
1811
|
+
var messages16 = {
|
|
1793
1812
|
noOptions: "Nenhuma op\xE7\xE3o dispon\xEDvel"
|
|
1794
1813
|
};
|
|
1795
|
-
var input_select_default3 =
|
|
1814
|
+
var input_select_default3 = messages16;
|
|
1796
1815
|
|
|
1797
1816
|
// src/i18n/messages/pt-br/input-phone.ts
|
|
1798
|
-
var
|
|
1817
|
+
var messages17 = {
|
|
1799
1818
|
countries: {
|
|
1800
1819
|
empty: "Selecione",
|
|
1801
1820
|
AF: "Afeganist\xE3o",
|
|
@@ -2045,26 +2064,34 @@ var messages15 = {
|
|
|
2045
2064
|
ZW: "Zimb\xE1bue"
|
|
2046
2065
|
}
|
|
2047
2066
|
};
|
|
2048
|
-
var input_phone_default3 =
|
|
2067
|
+
var input_phone_default3 = messages17;
|
|
2049
2068
|
|
|
2050
2069
|
// src/i18n/messages/pt-br/time-picker.ts
|
|
2051
|
-
var
|
|
2070
|
+
var messages18 = {
|
|
2052
2071
|
label: "Hor\xE1rio"
|
|
2053
2072
|
};
|
|
2054
|
-
var time_picker_default3 =
|
|
2073
|
+
var time_picker_default3 = messages18;
|
|
2055
2074
|
|
|
2056
2075
|
// src/i18n/messages/pt-br/file-upload.ts
|
|
2057
|
-
var
|
|
2076
|
+
var messages19 = {
|
|
2058
2077
|
deleteAll: "Remover todos"
|
|
2059
2078
|
};
|
|
2060
|
-
var file_upload_default3 =
|
|
2079
|
+
var file_upload_default3 = messages19;
|
|
2061
2080
|
|
|
2062
2081
|
// src/i18n/messages/pt-br/cropper.ts
|
|
2063
|
-
var
|
|
2082
|
+
var messages20 = {
|
|
2064
2083
|
applyButtonLabel: "Aplicar",
|
|
2065
2084
|
dialogTitle: "Ajustar imagem"
|
|
2066
2085
|
};
|
|
2067
|
-
var cropper_default3 =
|
|
2086
|
+
var cropper_default3 = messages20;
|
|
2087
|
+
|
|
2088
|
+
// src/i18n/messages/pt-br/combobox.ts
|
|
2089
|
+
var messages21 = {
|
|
2090
|
+
removeAll: "Remover todos",
|
|
2091
|
+
noItemsSelected: "Nenhum item selecionado",
|
|
2092
|
+
selectAnOption: "Digite para come\xE7ar a buscar e selecione uma op\xE7\xE3o."
|
|
2093
|
+
};
|
|
2094
|
+
var combobox_default3 = messages21;
|
|
2068
2095
|
|
|
2069
2096
|
// src/i18n/messages/pt-br/index.ts
|
|
2070
2097
|
var ptBrMessages = {
|
|
@@ -2073,7 +2100,8 @@ var ptBrMessages = {
|
|
|
2073
2100
|
inputPhone: input_phone_default3,
|
|
2074
2101
|
timePicker: time_picker_default3,
|
|
2075
2102
|
fileUpload: file_upload_default3,
|
|
2076
|
-
cropper: cropper_default3
|
|
2103
|
+
cropper: cropper_default3,
|
|
2104
|
+
combobox: combobox_default3
|
|
2077
2105
|
};
|
|
2078
2106
|
|
|
2079
2107
|
// src/i18n/message-storage-handler.ts
|
|
@@ -2098,7 +2126,7 @@ var setNebulaLanguage = (language) => {
|
|
|
2098
2126
|
}
|
|
2099
2127
|
localStorage.setItem(getNebulaI18nStorageKey(), language);
|
|
2100
2128
|
};
|
|
2101
|
-
var
|
|
2129
|
+
var messages22 = /* @__PURE__ */ new Map([
|
|
2102
2130
|
[null, enMessages],
|
|
2103
2131
|
[void 0, enMessages],
|
|
2104
2132
|
["en-US" /* EN_US */, enMessages],
|
|
@@ -2116,14 +2144,14 @@ var NebulaI18nProvider = ({
|
|
|
2116
2144
|
() => customI18nStorageKey ?? localStorageKey,
|
|
2117
2145
|
[customI18nStorageKey]
|
|
2118
2146
|
);
|
|
2119
|
-
const [
|
|
2120
|
-
|
|
2147
|
+
const [messages23, setMessages] = React25.useState(
|
|
2148
|
+
messages22.get(getNebulaLanguage()) ?? messages22.get("en-US" /* EN_US */)
|
|
2121
2149
|
);
|
|
2122
2150
|
const handleStorageChange = React25.useCallback(
|
|
2123
2151
|
({ detail }) => {
|
|
2124
2152
|
if (detail.key === storageKey) {
|
|
2125
2153
|
setMessages(
|
|
2126
|
-
|
|
2154
|
+
messages22.get(detail.value) ?? messages22.get("en-US" /* EN_US */)
|
|
2127
2155
|
);
|
|
2128
2156
|
}
|
|
2129
2157
|
},
|
|
@@ -2167,7 +2195,7 @@ var NebulaI18nProvider = ({
|
|
|
2167
2195
|
NebulaI18nContext.Provider,
|
|
2168
2196
|
{
|
|
2169
2197
|
value: {
|
|
2170
|
-
messages:
|
|
2198
|
+
messages: messages23,
|
|
2171
2199
|
locale: getNebulaLanguage()
|
|
2172
2200
|
},
|
|
2173
2201
|
children
|
|
@@ -5421,7 +5449,7 @@ var InputDateTimePickerSingle = ({
|
|
|
5421
5449
|
formattedDateByLanguage ? new Date(formattedDateByLanguage) : void 0
|
|
5422
5450
|
);
|
|
5423
5451
|
const [popoverIsOpen, setPopoverIsOpen] = React25.useState(false);
|
|
5424
|
-
const { locale, messages:
|
|
5452
|
+
const { locale, messages: messages23 } = useNebulaI18n();
|
|
5425
5453
|
const [month, setMonth] = React25.useState(/* @__PURE__ */ new Date());
|
|
5426
5454
|
const inputTimeRef = React25.useRef(null);
|
|
5427
5455
|
const handleClearValue = () => {
|
|
@@ -5524,15 +5552,15 @@ var InputDateTimePickerSingle = ({
|
|
|
5524
5552
|
replacement: { _: /\d/ }
|
|
5525
5553
|
};
|
|
5526
5554
|
const inputRef = mask.useMask(maskOptions);
|
|
5527
|
-
const
|
|
5555
|
+
const containerRef = React25.useRef(null);
|
|
5528
5556
|
const calendarRef = React25.useRef(null);
|
|
5529
|
-
useClickOutside([
|
|
5557
|
+
useClickOutside([containerRef, calendarRef], () => {
|
|
5530
5558
|
setPopoverIsOpen(false);
|
|
5531
5559
|
});
|
|
5532
5560
|
useKeyPress("Escape", () => {
|
|
5533
5561
|
setPopoverIsOpen(false);
|
|
5534
5562
|
});
|
|
5535
|
-
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "nebula-ds w-full", ref:
|
|
5563
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "nebula-ds w-full", ref: containerRef, children: [
|
|
5536
5564
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
5537
5565
|
InputText,
|
|
5538
5566
|
{
|
|
@@ -5588,7 +5616,7 @@ var InputDateTimePickerSingle = ({
|
|
|
5588
5616
|
disabled: disabledDates,
|
|
5589
5617
|
footer: /* @__PURE__ */ jsxRuntime.jsxs(Space, { className: "nebula-ds items-center", children: [
|
|
5590
5618
|
/* @__PURE__ */ jsxRuntime.jsxs(Label2, { children: [
|
|
5591
|
-
|
|
5619
|
+
messages23.timePicker.label,
|
|
5592
5620
|
":"
|
|
5593
5621
|
] }),
|
|
5594
5622
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -5617,8 +5645,8 @@ var CountrySelect = ({
|
|
|
5617
5645
|
const handleSelect = (event) => {
|
|
5618
5646
|
onChange(event.target.value);
|
|
5619
5647
|
};
|
|
5620
|
-
const { messages:
|
|
5621
|
-
const { countries } =
|
|
5648
|
+
const { messages: messages23 } = useNebulaI18n();
|
|
5649
|
+
const { countries } = messages23.inputPhone;
|
|
5622
5650
|
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "nebula-ds rounded-s-[20px] relative inline-flex items-center self-stretch py-2 ps-4 pe-2 transition-[color,box-shadow] outline-none has-disabled:pointer-events-none has-disabled:opacity-50", children: [
|
|
5623
5651
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "nebula-ds inline-flex items-center gap-1", "aria-hidden": "true", children: [
|
|
5624
5652
|
/* @__PURE__ */ jsxRuntime.jsx(FlagComponent, { country: value, countryName: value, "aria-hidden": "true" }),
|
|
@@ -5750,7 +5778,7 @@ var ClearIndicator = (props) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
|
5750
5778
|
);
|
|
5751
5779
|
var MultiValueRemove = (props) => /* @__PURE__ */ jsxRuntime.jsx(Select.components.MultiValueRemove, { ...props, children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.CircleX, { size: "16px" }) });
|
|
5752
5780
|
var Option = (props) => {
|
|
5753
|
-
const { isSelected, data, innerRef, innerProps } = props;
|
|
5781
|
+
const { isSelected, isFocused, data, innerRef, innerProps } = props;
|
|
5754
5782
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
5755
5783
|
"div",
|
|
5756
5784
|
{
|
|
@@ -5764,13 +5792,17 @@ var Option = (props) => {
|
|
|
5764
5792
|
gap-2
|
|
5765
5793
|
cursor-pointer
|
|
5766
5794
|
text-sm
|
|
5767
|
-
|
|
5768
|
-
hover:bg-listItem-background-hover
|
|
5769
|
-
|
|
5770
|
-
|
|
5795
|
+
text-listItem-primary-text-default
|
|
5796
|
+
hover:bg-listItem-primary-background-hover
|
|
5797
|
+
hover:text-listItem-primary-text-hover
|
|
5798
|
+
outline-none
|
|
5799
|
+
rounded-lg
|
|
5771
5800
|
`,
|
|
5772
5801
|
{
|
|
5773
|
-
"text-
|
|
5802
|
+
"text-listItem-primary-text-selected font-semibold": isSelected
|
|
5803
|
+
},
|
|
5804
|
+
{
|
|
5805
|
+
"bg-listItem-primary-background-hover text-listItem-primary-text-hover": isFocused
|
|
5774
5806
|
}
|
|
5775
5807
|
),
|
|
5776
5808
|
children: [
|
|
@@ -5801,17 +5833,35 @@ var multiValueLabelStyles = "";
|
|
|
5801
5833
|
var indicatorsContainerStyles = "";
|
|
5802
5834
|
var clearIndicatorStyles = "text-inputSelect-default-icon mr-2";
|
|
5803
5835
|
var dropdownIndicatorStyles = "text-inputSelect-default-icon";
|
|
5804
|
-
var menuStyles =
|
|
5836
|
+
var menuStyles = `
|
|
5837
|
+
mt-2
|
|
5838
|
+
z-[1000]
|
|
5839
|
+
rounded-2xl
|
|
5840
|
+
border
|
|
5841
|
+
border-dropdownMenu-border
|
|
5842
|
+
bg-dropdownMenu-background
|
|
5843
|
+
shadow-dropdownMenu-shadow
|
|
5844
|
+
shadow-sm
|
|
5845
|
+
outline-none
|
|
5846
|
+
overflow-hidden
|
|
5847
|
+
p-[6px]
|
|
5848
|
+
flex
|
|
5849
|
+
flex-col
|
|
5850
|
+
gap-1
|
|
5851
|
+
`;
|
|
5805
5852
|
var groupHeadingStyles = "ml-3 mt-2 mb-1 text-inputSelect-default-text text-sm";
|
|
5806
5853
|
var noOptionsMessageStyles = "p-2 text-inputSelect-default-text";
|
|
5807
5854
|
var createStyledSelect = (BaseSelect, displayName) => {
|
|
5808
5855
|
const StyledSelect2 = ({
|
|
5809
|
-
icon,
|
|
5856
|
+
icon = null,
|
|
5810
5857
|
disabled = false,
|
|
5811
5858
|
isError = false,
|
|
5812
5859
|
...props
|
|
5813
5860
|
}) => {
|
|
5814
|
-
const
|
|
5861
|
+
const CloneIcon = icon && React25.cloneElement(icon, {
|
|
5862
|
+
className: "size-4"
|
|
5863
|
+
});
|
|
5864
|
+
const { messages: messages23 } = useNebulaI18n();
|
|
5815
5865
|
const customClassNames = React25.useMemo(() => {
|
|
5816
5866
|
return {
|
|
5817
5867
|
control: (props2) => controlStyles(props2, isError),
|
|
@@ -5843,13 +5893,13 @@ var createStyledSelect = (BaseSelect, displayName) => {
|
|
|
5843
5893
|
"text-inputSelect-default-icon": !isError,
|
|
5844
5894
|
"text-inputSelect-danger-icon": isError
|
|
5845
5895
|
}),
|
|
5846
|
-
children:
|
|
5896
|
+
children: CloneIcon
|
|
5847
5897
|
}
|
|
5848
5898
|
),
|
|
5849
5899
|
children
|
|
5850
5900
|
] }) })
|
|
5851
5901
|
}),
|
|
5852
|
-
[icon, isError]
|
|
5902
|
+
[icon, isError, CloneIcon]
|
|
5853
5903
|
);
|
|
5854
5904
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
5855
5905
|
BaseSelect,
|
|
@@ -5858,7 +5908,7 @@ var createStyledSelect = (BaseSelect, displayName) => {
|
|
|
5858
5908
|
isDisabled: disabled,
|
|
5859
5909
|
components: customComponents,
|
|
5860
5910
|
classNames: customClassNames,
|
|
5861
|
-
noOptionsMessage: () => /* @__PURE__ */ jsxRuntime.jsx("p", { children:
|
|
5911
|
+
noOptionsMessage: () => /* @__PURE__ */ jsxRuntime.jsx("p", { children: messages23.inputSelect.noOptions }),
|
|
5862
5912
|
...props
|
|
5863
5913
|
}
|
|
5864
5914
|
);
|
|
@@ -7077,7 +7127,7 @@ var Pagination = ({
|
|
|
7077
7127
|
onChangePage,
|
|
7078
7128
|
...props
|
|
7079
7129
|
}) => {
|
|
7080
|
-
const { messages:
|
|
7130
|
+
const { messages: messages23 } = useNebulaI18n();
|
|
7081
7131
|
const totalPages = React25.useMemo(() => {
|
|
7082
7132
|
return Math.ceil(total / (pageSize || 1));
|
|
7083
7133
|
}, [total, pageSize]);
|
|
@@ -7110,13 +7160,13 @@ var Pagination = ({
|
|
|
7110
7160
|
}, [totalPages, pageSize, total]);
|
|
7111
7161
|
const totalResultsLabel = React25.useMemo(() => {
|
|
7112
7162
|
if (page === totalPages) {
|
|
7113
|
-
return
|
|
7163
|
+
return messages23.pagination.totalResultsLabel(lastPageSize, total);
|
|
7114
7164
|
}
|
|
7115
|
-
return
|
|
7116
|
-
}, [
|
|
7165
|
+
return messages23.pagination.totalResultsLabel(pageSize, total);
|
|
7166
|
+
}, [messages23.pagination, pageSize, total, page, totalPages, lastPageSize]);
|
|
7117
7167
|
const currentPageLabel = React25.useMemo(
|
|
7118
|
-
() =>
|
|
7119
|
-
[
|
|
7168
|
+
() => messages23.pagination.currentPageLabel(normalizedPage, totalPages),
|
|
7169
|
+
[messages23.pagination, normalizedPage, totalPages]
|
|
7120
7170
|
);
|
|
7121
7171
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
7122
7172
|
"nav",
|
|
@@ -8555,13 +8605,13 @@ function custom(message, options) {
|
|
|
8555
8605
|
}
|
|
8556
8606
|
);
|
|
8557
8607
|
}
|
|
8558
|
-
async function promise(promise2,
|
|
8608
|
+
async function promise(promise2, messages23, options) {
|
|
8559
8609
|
const loadingToast = sonner.toast.custom(
|
|
8560
8610
|
(t) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
8561
8611
|
ToastComponent,
|
|
8562
8612
|
{
|
|
8563
8613
|
type: "info",
|
|
8564
|
-
message:
|
|
8614
|
+
message: messages23.loading,
|
|
8565
8615
|
options,
|
|
8566
8616
|
t
|
|
8567
8617
|
}
|
|
@@ -8575,7 +8625,7 @@ async function promise(promise2, messages20, options) {
|
|
|
8575
8625
|
ToastComponent,
|
|
8576
8626
|
{
|
|
8577
8627
|
type: "success",
|
|
8578
|
-
message:
|
|
8628
|
+
message: messages23.success,
|
|
8579
8629
|
options,
|
|
8580
8630
|
t
|
|
8581
8631
|
}
|
|
@@ -8590,7 +8640,7 @@ async function promise(promise2, messages20, options) {
|
|
|
8590
8640
|
ToastComponent,
|
|
8591
8641
|
{
|
|
8592
8642
|
type: "error",
|
|
8593
|
-
message:
|
|
8643
|
+
message: messages23.error,
|
|
8594
8644
|
options,
|
|
8595
8645
|
t
|
|
8596
8646
|
}
|
|
@@ -9100,6 +9150,65 @@ function SidebarMenuItem({
|
|
|
9100
9150
|
collapsible && open && !isRail && /* @__PURE__ */ jsxRuntime.jsx(SidebarLevelContext.Provider, { value: level + 1, children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: "nebula-ds mt-1 space-y-1", children }) })
|
|
9101
9151
|
] });
|
|
9102
9152
|
}
|
|
9153
|
+
function Combobox({
|
|
9154
|
+
value = [],
|
|
9155
|
+
onChange,
|
|
9156
|
+
showEmptyState = true,
|
|
9157
|
+
isClearable = true,
|
|
9158
|
+
emptyStateText,
|
|
9159
|
+
emptyStateDescription,
|
|
9160
|
+
...props
|
|
9161
|
+
}) {
|
|
9162
|
+
const { messages: messages23 } = useNebulaI18n();
|
|
9163
|
+
const selectedValues = value || [];
|
|
9164
|
+
const handleSelect = (val) => {
|
|
9165
|
+
onChange?.(val);
|
|
9166
|
+
};
|
|
9167
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(Space, { direction: "column", size: "md", className: "nebula-ds w-full", children: [
|
|
9168
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
9169
|
+
StyledSelect,
|
|
9170
|
+
{
|
|
9171
|
+
...props,
|
|
9172
|
+
onChange: (e) => handleSelect(e),
|
|
9173
|
+
value: selectedValues,
|
|
9174
|
+
isMulti: true,
|
|
9175
|
+
controlShouldRenderValue: false,
|
|
9176
|
+
hideSelectedOptions: false,
|
|
9177
|
+
className: "nebula-ds w-full",
|
|
9178
|
+
isClearable: false
|
|
9179
|
+
}
|
|
9180
|
+
),
|
|
9181
|
+
selectedValues.length > 0 && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "nebula-ds flex flex-wrap gap-2", children: [
|
|
9182
|
+
selectedValues.map((item) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
9183
|
+
Tag,
|
|
9184
|
+
{
|
|
9185
|
+
color: item.color,
|
|
9186
|
+
onDelete: () => {
|
|
9187
|
+
const newValue = selectedValues.filter(
|
|
9188
|
+
(i) => i.value !== item.value
|
|
9189
|
+
);
|
|
9190
|
+
onChange?.(newValue);
|
|
9191
|
+
},
|
|
9192
|
+
children: item.label
|
|
9193
|
+
},
|
|
9194
|
+
item.value
|
|
9195
|
+
)),
|
|
9196
|
+
isClearable && /* @__PURE__ */ jsxRuntime.jsx(Button, { onClick: () => onChange?.([]), size: "xs", variant: "ghost", children: /* @__PURE__ */ jsxRuntime.jsx(Paragraph, { children: messages23.combobox.removeAll }) })
|
|
9197
|
+
] }),
|
|
9198
|
+
selectedValues.length <= 0 && showEmptyState && /* @__PURE__ */ jsxRuntime.jsx(
|
|
9199
|
+
Box,
|
|
9200
|
+
{
|
|
9201
|
+
variant: "secondary",
|
|
9202
|
+
shadow: "none",
|
|
9203
|
+
className: "nebula-ds w-full flex justify-center items-center",
|
|
9204
|
+
children: /* @__PURE__ */ jsxRuntime.jsxs(Space, { direction: "column", className: "nebula-ds justify-center items-center", children: [
|
|
9205
|
+
/* @__PURE__ */ jsxRuntime.jsx(Heading, { level: "6", children: emptyStateText || messages23.combobox.noItemsSelected }),
|
|
9206
|
+
/* @__PURE__ */ jsxRuntime.jsx(Paragraph, { size: "sm", children: emptyStateDescription || messages23.combobox.selectAnOption })
|
|
9207
|
+
] })
|
|
9208
|
+
}
|
|
9209
|
+
)
|
|
9210
|
+
] });
|
|
9211
|
+
}
|
|
9103
9212
|
|
|
9104
9213
|
// src/tailwind.ts
|
|
9105
9214
|
function content({ base = "./" } = {}) {
|
|
@@ -9162,6 +9271,7 @@ exports.Button = Button;
|
|
|
9162
9271
|
exports.Calendar = Calendar;
|
|
9163
9272
|
exports.Caption = Caption;
|
|
9164
9273
|
exports.Checkbox = Checkbox;
|
|
9274
|
+
exports.Combobox = Combobox;
|
|
9165
9275
|
exports.Creatable = StyledCreatable;
|
|
9166
9276
|
exports.Cropper = Cropper2;
|
|
9167
9277
|
exports.CropperCropArea = CropperCropArea2;
|
|
@@ -9293,7 +9403,7 @@ exports.dateIsAvailable = dateIsAvailable;
|
|
|
9293
9403
|
exports.formatBytes = formatBytes;
|
|
9294
9404
|
exports.getNebulaLanguage = getNebulaLanguage;
|
|
9295
9405
|
exports.localeByi18nKey = localeByi18nKey;
|
|
9296
|
-
exports.messages =
|
|
9406
|
+
exports.messages = messages22;
|
|
9297
9407
|
exports.separatorVariants = separatorVariants;
|
|
9298
9408
|
exports.setNebulaLanguage = setNebulaLanguage;
|
|
9299
9409
|
exports.tagVariantsEnum = tagVariantsEnum;
|
package/dist/index.mjs
CHANGED
|
@@ -3,7 +3,7 @@ import { Minus, Check, X, ChevronRight, Circle, CircleX, Eye, EyeOff, ClockIcon,
|
|
|
3
3
|
import { extendTailwindMerge } from 'tailwind-merge';
|
|
4
4
|
import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
|
|
5
5
|
import * as React25 from 'react';
|
|
6
|
-
import React25__default, { createContext, forwardRef, useMemo, useState, useEffect, memo, useContext, useCallback, useRef, useId } from 'react';
|
|
6
|
+
import React25__default, { createContext, forwardRef, useMemo, useState, useEffect, memo, useContext, useCallback, useRef, useId, cloneElement } from 'react';
|
|
7
7
|
import * as DialogPrimitive from '@radix-ui/react-dialog';
|
|
8
8
|
import { Slot } from '@radix-ui/react-slot';
|
|
9
9
|
import { cva } from 'class-variance-authority';
|
|
@@ -1030,7 +1030,8 @@ var Box = ({
|
|
|
1030
1030
|
{
|
|
1031
1031
|
"shadow-sm": shadow === "sm",
|
|
1032
1032
|
"shadow-md": shadow === "md",
|
|
1033
|
-
"shadow-lg": shadow === "lg"
|
|
1033
|
+
"shadow-lg": shadow === "lg",
|
|
1034
|
+
"shadow-none": shadow === "none"
|
|
1034
1035
|
},
|
|
1035
1036
|
className
|
|
1036
1037
|
),
|
|
@@ -1419,6 +1420,14 @@ var messages6 = {
|
|
|
1419
1420
|
};
|
|
1420
1421
|
var cropper_default = messages6;
|
|
1421
1422
|
|
|
1423
|
+
// src/i18n/messages/en/combobox.ts
|
|
1424
|
+
var messages7 = {
|
|
1425
|
+
removeAll: "Remove all",
|
|
1426
|
+
noItemsSelected: "No items selected",
|
|
1427
|
+
selectAnOption: "Type to begin searching and select an option."
|
|
1428
|
+
};
|
|
1429
|
+
var combobox_default = messages7;
|
|
1430
|
+
|
|
1422
1431
|
// src/i18n/messages/en/index.ts
|
|
1423
1432
|
var enMessages = {
|
|
1424
1433
|
cropper: cropper_default,
|
|
@@ -1426,11 +1435,12 @@ var enMessages = {
|
|
|
1426
1435
|
inputSelect: input_select_default,
|
|
1427
1436
|
inputPhone: input_phone_default,
|
|
1428
1437
|
timePicker: time_picker_default,
|
|
1429
|
-
fileUpload: file_upload_default
|
|
1438
|
+
fileUpload: file_upload_default,
|
|
1439
|
+
combobox: combobox_default
|
|
1430
1440
|
};
|
|
1431
1441
|
|
|
1432
1442
|
// src/i18n/messages/es/pagination.ts
|
|
1433
|
-
var
|
|
1443
|
+
var messages8 = {
|
|
1434
1444
|
totalResultsLabel(pagesSize, totalResults) {
|
|
1435
1445
|
if (totalResults < pagesSize) {
|
|
1436
1446
|
pagesSize = totalResults;
|
|
@@ -1441,16 +1451,16 @@ var messages7 = {
|
|
|
1441
1451
|
return `P\xE1gina ${currentPage} de ${totalPages}`;
|
|
1442
1452
|
}
|
|
1443
1453
|
};
|
|
1444
|
-
var pagination_default2 =
|
|
1454
|
+
var pagination_default2 = messages8;
|
|
1445
1455
|
|
|
1446
1456
|
// src/i18n/messages/es/input-select.ts
|
|
1447
|
-
var
|
|
1457
|
+
var messages9 = {
|
|
1448
1458
|
noOptions: "No hay opciones disponibles"
|
|
1449
1459
|
};
|
|
1450
|
-
var input_select_default2 =
|
|
1460
|
+
var input_select_default2 = messages9;
|
|
1451
1461
|
|
|
1452
1462
|
// src/i18n/messages/es/input-phone.ts
|
|
1453
|
-
var
|
|
1463
|
+
var messages10 = {
|
|
1454
1464
|
countries: {
|
|
1455
1465
|
empty: "Seleccionar",
|
|
1456
1466
|
AF: "Afganist\xE1n",
|
|
@@ -1700,26 +1710,34 @@ var messages9 = {
|
|
|
1700
1710
|
ZW: "Zimbabue"
|
|
1701
1711
|
}
|
|
1702
1712
|
};
|
|
1703
|
-
var input_phone_default2 =
|
|
1713
|
+
var input_phone_default2 = messages10;
|
|
1704
1714
|
|
|
1705
1715
|
// src/i18n/messages/es/time-picker.ts
|
|
1706
|
-
var
|
|
1716
|
+
var messages11 = {
|
|
1707
1717
|
label: "Tiempo"
|
|
1708
1718
|
};
|
|
1709
|
-
var time_picker_default2 =
|
|
1719
|
+
var time_picker_default2 = messages11;
|
|
1710
1720
|
|
|
1711
1721
|
// src/i18n/messages/es/file-upload.ts
|
|
1712
|
-
var
|
|
1722
|
+
var messages12 = {
|
|
1713
1723
|
deleteAll: "Remover todos"
|
|
1714
1724
|
};
|
|
1715
|
-
var file_upload_default2 =
|
|
1725
|
+
var file_upload_default2 = messages12;
|
|
1716
1726
|
|
|
1717
1727
|
// src/i18n/messages/es/cropper.ts
|
|
1718
|
-
var
|
|
1728
|
+
var messages13 = {
|
|
1719
1729
|
applyButtonLabel: "Aplicar",
|
|
1720
1730
|
dialogTitle: "Ajustar la imagen"
|
|
1721
1731
|
};
|
|
1722
|
-
var cropper_default2 =
|
|
1732
|
+
var cropper_default2 = messages13;
|
|
1733
|
+
|
|
1734
|
+
// src/i18n/messages/es/combobox.ts
|
|
1735
|
+
var messages14 = {
|
|
1736
|
+
removeAll: "Eliminar todos",
|
|
1737
|
+
noItemsSelected: "No hay elementos seleccionados",
|
|
1738
|
+
selectAnOption: "Escriba para comenzar a buscar y seleccione una opci\xF3n."
|
|
1739
|
+
};
|
|
1740
|
+
var combobox_default2 = messages14;
|
|
1723
1741
|
|
|
1724
1742
|
// src/i18n/messages/es/index.ts
|
|
1725
1743
|
var esMessages = {
|
|
@@ -1728,11 +1746,12 @@ var esMessages = {
|
|
|
1728
1746
|
inputSelect: input_select_default2,
|
|
1729
1747
|
inputPhone: input_phone_default2,
|
|
1730
1748
|
timePicker: time_picker_default2,
|
|
1731
|
-
fileUpload: file_upload_default2
|
|
1749
|
+
fileUpload: file_upload_default2,
|
|
1750
|
+
combobox: combobox_default2
|
|
1732
1751
|
};
|
|
1733
1752
|
|
|
1734
1753
|
// src/i18n/messages/pt-br/pagination.ts
|
|
1735
|
-
var
|
|
1754
|
+
var messages15 = {
|
|
1736
1755
|
totalResultsLabel(pagesSize, totalResults) {
|
|
1737
1756
|
if (totalResults < pagesSize) {
|
|
1738
1757
|
pagesSize = totalResults;
|
|
@@ -1743,16 +1762,16 @@ var messages13 = {
|
|
|
1743
1762
|
return `P\xE1gina ${currentPage} de ${totalPages}`;
|
|
1744
1763
|
}
|
|
1745
1764
|
};
|
|
1746
|
-
var pagination_default3 =
|
|
1765
|
+
var pagination_default3 = messages15;
|
|
1747
1766
|
|
|
1748
1767
|
// src/i18n/messages/pt-br/input-select.ts
|
|
1749
|
-
var
|
|
1768
|
+
var messages16 = {
|
|
1750
1769
|
noOptions: "Nenhuma op\xE7\xE3o dispon\xEDvel"
|
|
1751
1770
|
};
|
|
1752
|
-
var input_select_default3 =
|
|
1771
|
+
var input_select_default3 = messages16;
|
|
1753
1772
|
|
|
1754
1773
|
// src/i18n/messages/pt-br/input-phone.ts
|
|
1755
|
-
var
|
|
1774
|
+
var messages17 = {
|
|
1756
1775
|
countries: {
|
|
1757
1776
|
empty: "Selecione",
|
|
1758
1777
|
AF: "Afeganist\xE3o",
|
|
@@ -2002,26 +2021,34 @@ var messages15 = {
|
|
|
2002
2021
|
ZW: "Zimb\xE1bue"
|
|
2003
2022
|
}
|
|
2004
2023
|
};
|
|
2005
|
-
var input_phone_default3 =
|
|
2024
|
+
var input_phone_default3 = messages17;
|
|
2006
2025
|
|
|
2007
2026
|
// src/i18n/messages/pt-br/time-picker.ts
|
|
2008
|
-
var
|
|
2027
|
+
var messages18 = {
|
|
2009
2028
|
label: "Hor\xE1rio"
|
|
2010
2029
|
};
|
|
2011
|
-
var time_picker_default3 =
|
|
2030
|
+
var time_picker_default3 = messages18;
|
|
2012
2031
|
|
|
2013
2032
|
// src/i18n/messages/pt-br/file-upload.ts
|
|
2014
|
-
var
|
|
2033
|
+
var messages19 = {
|
|
2015
2034
|
deleteAll: "Remover todos"
|
|
2016
2035
|
};
|
|
2017
|
-
var file_upload_default3 =
|
|
2036
|
+
var file_upload_default3 = messages19;
|
|
2018
2037
|
|
|
2019
2038
|
// src/i18n/messages/pt-br/cropper.ts
|
|
2020
|
-
var
|
|
2039
|
+
var messages20 = {
|
|
2021
2040
|
applyButtonLabel: "Aplicar",
|
|
2022
2041
|
dialogTitle: "Ajustar imagem"
|
|
2023
2042
|
};
|
|
2024
|
-
var cropper_default3 =
|
|
2043
|
+
var cropper_default3 = messages20;
|
|
2044
|
+
|
|
2045
|
+
// src/i18n/messages/pt-br/combobox.ts
|
|
2046
|
+
var messages21 = {
|
|
2047
|
+
removeAll: "Remover todos",
|
|
2048
|
+
noItemsSelected: "Nenhum item selecionado",
|
|
2049
|
+
selectAnOption: "Digite para come\xE7ar a buscar e selecione uma op\xE7\xE3o."
|
|
2050
|
+
};
|
|
2051
|
+
var combobox_default3 = messages21;
|
|
2025
2052
|
|
|
2026
2053
|
// src/i18n/messages/pt-br/index.ts
|
|
2027
2054
|
var ptBrMessages = {
|
|
@@ -2030,7 +2057,8 @@ var ptBrMessages = {
|
|
|
2030
2057
|
inputPhone: input_phone_default3,
|
|
2031
2058
|
timePicker: time_picker_default3,
|
|
2032
2059
|
fileUpload: file_upload_default3,
|
|
2033
|
-
cropper: cropper_default3
|
|
2060
|
+
cropper: cropper_default3,
|
|
2061
|
+
combobox: combobox_default3
|
|
2034
2062
|
};
|
|
2035
2063
|
|
|
2036
2064
|
// src/i18n/message-storage-handler.ts
|
|
@@ -2055,7 +2083,7 @@ var setNebulaLanguage = (language) => {
|
|
|
2055
2083
|
}
|
|
2056
2084
|
localStorage.setItem(getNebulaI18nStorageKey(), language);
|
|
2057
2085
|
};
|
|
2058
|
-
var
|
|
2086
|
+
var messages22 = /* @__PURE__ */ new Map([
|
|
2059
2087
|
[null, enMessages],
|
|
2060
2088
|
[void 0, enMessages],
|
|
2061
2089
|
["en-US" /* EN_US */, enMessages],
|
|
@@ -2073,14 +2101,14 @@ var NebulaI18nProvider = ({
|
|
|
2073
2101
|
() => customI18nStorageKey ?? localStorageKey,
|
|
2074
2102
|
[customI18nStorageKey]
|
|
2075
2103
|
);
|
|
2076
|
-
const [
|
|
2077
|
-
|
|
2104
|
+
const [messages23, setMessages] = useState(
|
|
2105
|
+
messages22.get(getNebulaLanguage()) ?? messages22.get("en-US" /* EN_US */)
|
|
2078
2106
|
);
|
|
2079
2107
|
const handleStorageChange = useCallback(
|
|
2080
2108
|
({ detail }) => {
|
|
2081
2109
|
if (detail.key === storageKey) {
|
|
2082
2110
|
setMessages(
|
|
2083
|
-
|
|
2111
|
+
messages22.get(detail.value) ?? messages22.get("en-US" /* EN_US */)
|
|
2084
2112
|
);
|
|
2085
2113
|
}
|
|
2086
2114
|
},
|
|
@@ -2124,7 +2152,7 @@ var NebulaI18nProvider = ({
|
|
|
2124
2152
|
NebulaI18nContext.Provider,
|
|
2125
2153
|
{
|
|
2126
2154
|
value: {
|
|
2127
|
-
messages:
|
|
2155
|
+
messages: messages23,
|
|
2128
2156
|
locale: getNebulaLanguage()
|
|
2129
2157
|
},
|
|
2130
2158
|
children
|
|
@@ -5378,7 +5406,7 @@ var InputDateTimePickerSingle = ({
|
|
|
5378
5406
|
formattedDateByLanguage ? new Date(formattedDateByLanguage) : void 0
|
|
5379
5407
|
);
|
|
5380
5408
|
const [popoverIsOpen, setPopoverIsOpen] = useState(false);
|
|
5381
|
-
const { locale, messages:
|
|
5409
|
+
const { locale, messages: messages23 } = useNebulaI18n();
|
|
5382
5410
|
const [month, setMonth] = useState(/* @__PURE__ */ new Date());
|
|
5383
5411
|
const inputTimeRef = useRef(null);
|
|
5384
5412
|
const handleClearValue = () => {
|
|
@@ -5481,15 +5509,15 @@ var InputDateTimePickerSingle = ({
|
|
|
5481
5509
|
replacement: { _: /\d/ }
|
|
5482
5510
|
};
|
|
5483
5511
|
const inputRef = useMask(maskOptions);
|
|
5484
|
-
const
|
|
5512
|
+
const containerRef = useRef(null);
|
|
5485
5513
|
const calendarRef = useRef(null);
|
|
5486
|
-
useClickOutside([
|
|
5514
|
+
useClickOutside([containerRef, calendarRef], () => {
|
|
5487
5515
|
setPopoverIsOpen(false);
|
|
5488
5516
|
});
|
|
5489
5517
|
useKeyPress("Escape", () => {
|
|
5490
5518
|
setPopoverIsOpen(false);
|
|
5491
5519
|
});
|
|
5492
|
-
return /* @__PURE__ */ jsxs("div", { className: "nebula-ds w-full", ref:
|
|
5520
|
+
return /* @__PURE__ */ jsxs("div", { className: "nebula-ds w-full", ref: containerRef, children: [
|
|
5493
5521
|
/* @__PURE__ */ jsx(
|
|
5494
5522
|
InputText,
|
|
5495
5523
|
{
|
|
@@ -5545,7 +5573,7 @@ var InputDateTimePickerSingle = ({
|
|
|
5545
5573
|
disabled: disabledDates,
|
|
5546
5574
|
footer: /* @__PURE__ */ jsxs(Space, { className: "nebula-ds items-center", children: [
|
|
5547
5575
|
/* @__PURE__ */ jsxs(Label2, { children: [
|
|
5548
|
-
|
|
5576
|
+
messages23.timePicker.label,
|
|
5549
5577
|
":"
|
|
5550
5578
|
] }),
|
|
5551
5579
|
/* @__PURE__ */ jsx(
|
|
@@ -5574,8 +5602,8 @@ var CountrySelect = ({
|
|
|
5574
5602
|
const handleSelect = (event) => {
|
|
5575
5603
|
onChange(event.target.value);
|
|
5576
5604
|
};
|
|
5577
|
-
const { messages:
|
|
5578
|
-
const { countries } =
|
|
5605
|
+
const { messages: messages23 } = useNebulaI18n();
|
|
5606
|
+
const { countries } = messages23.inputPhone;
|
|
5579
5607
|
return /* @__PURE__ */ jsxs("div", { className: "nebula-ds rounded-s-[20px] relative inline-flex items-center self-stretch py-2 ps-4 pe-2 transition-[color,box-shadow] outline-none has-disabled:pointer-events-none has-disabled:opacity-50", children: [
|
|
5580
5608
|
/* @__PURE__ */ jsxs("div", { className: "nebula-ds inline-flex items-center gap-1", "aria-hidden": "true", children: [
|
|
5581
5609
|
/* @__PURE__ */ jsx(FlagComponent, { country: value, countryName: value, "aria-hidden": "true" }),
|
|
@@ -5707,7 +5735,7 @@ var ClearIndicator = (props) => /* @__PURE__ */ jsx(
|
|
|
5707
5735
|
);
|
|
5708
5736
|
var MultiValueRemove = (props) => /* @__PURE__ */ jsx(components.MultiValueRemove, { ...props, children: /* @__PURE__ */ jsx(CircleX, { size: "16px" }) });
|
|
5709
5737
|
var Option = (props) => {
|
|
5710
|
-
const { isSelected, data, innerRef, innerProps } = props;
|
|
5738
|
+
const { isSelected, isFocused, data, innerRef, innerProps } = props;
|
|
5711
5739
|
return /* @__PURE__ */ jsxs(
|
|
5712
5740
|
"div",
|
|
5713
5741
|
{
|
|
@@ -5721,13 +5749,17 @@ var Option = (props) => {
|
|
|
5721
5749
|
gap-2
|
|
5722
5750
|
cursor-pointer
|
|
5723
5751
|
text-sm
|
|
5724
|
-
|
|
5725
|
-
hover:bg-listItem-background-hover
|
|
5726
|
-
|
|
5727
|
-
|
|
5752
|
+
text-listItem-primary-text-default
|
|
5753
|
+
hover:bg-listItem-primary-background-hover
|
|
5754
|
+
hover:text-listItem-primary-text-hover
|
|
5755
|
+
outline-none
|
|
5756
|
+
rounded-lg
|
|
5728
5757
|
`,
|
|
5729
5758
|
{
|
|
5730
|
-
"text-
|
|
5759
|
+
"text-listItem-primary-text-selected font-semibold": isSelected
|
|
5760
|
+
},
|
|
5761
|
+
{
|
|
5762
|
+
"bg-listItem-primary-background-hover text-listItem-primary-text-hover": isFocused
|
|
5731
5763
|
}
|
|
5732
5764
|
),
|
|
5733
5765
|
children: [
|
|
@@ -5758,17 +5790,35 @@ var multiValueLabelStyles = "";
|
|
|
5758
5790
|
var indicatorsContainerStyles = "";
|
|
5759
5791
|
var clearIndicatorStyles = "text-inputSelect-default-icon mr-2";
|
|
5760
5792
|
var dropdownIndicatorStyles = "text-inputSelect-default-icon";
|
|
5761
|
-
var menuStyles =
|
|
5793
|
+
var menuStyles = `
|
|
5794
|
+
mt-2
|
|
5795
|
+
z-[1000]
|
|
5796
|
+
rounded-2xl
|
|
5797
|
+
border
|
|
5798
|
+
border-dropdownMenu-border
|
|
5799
|
+
bg-dropdownMenu-background
|
|
5800
|
+
shadow-dropdownMenu-shadow
|
|
5801
|
+
shadow-sm
|
|
5802
|
+
outline-none
|
|
5803
|
+
overflow-hidden
|
|
5804
|
+
p-[6px]
|
|
5805
|
+
flex
|
|
5806
|
+
flex-col
|
|
5807
|
+
gap-1
|
|
5808
|
+
`;
|
|
5762
5809
|
var groupHeadingStyles = "ml-3 mt-2 mb-1 text-inputSelect-default-text text-sm";
|
|
5763
5810
|
var noOptionsMessageStyles = "p-2 text-inputSelect-default-text";
|
|
5764
5811
|
var createStyledSelect = (BaseSelect, displayName) => {
|
|
5765
5812
|
const StyledSelect2 = ({
|
|
5766
|
-
icon,
|
|
5813
|
+
icon = null,
|
|
5767
5814
|
disabled = false,
|
|
5768
5815
|
isError = false,
|
|
5769
5816
|
...props
|
|
5770
5817
|
}) => {
|
|
5771
|
-
const
|
|
5818
|
+
const CloneIcon = icon && cloneElement(icon, {
|
|
5819
|
+
className: "size-4"
|
|
5820
|
+
});
|
|
5821
|
+
const { messages: messages23 } = useNebulaI18n();
|
|
5772
5822
|
const customClassNames = useMemo(() => {
|
|
5773
5823
|
return {
|
|
5774
5824
|
control: (props2) => controlStyles(props2, isError),
|
|
@@ -5800,13 +5850,13 @@ var createStyledSelect = (BaseSelect, displayName) => {
|
|
|
5800
5850
|
"text-inputSelect-default-icon": !isError,
|
|
5801
5851
|
"text-inputSelect-danger-icon": isError
|
|
5802
5852
|
}),
|
|
5803
|
-
children:
|
|
5853
|
+
children: CloneIcon
|
|
5804
5854
|
}
|
|
5805
5855
|
),
|
|
5806
5856
|
children
|
|
5807
5857
|
] }) })
|
|
5808
5858
|
}),
|
|
5809
|
-
[icon, isError]
|
|
5859
|
+
[icon, isError, CloneIcon]
|
|
5810
5860
|
);
|
|
5811
5861
|
return /* @__PURE__ */ jsx(
|
|
5812
5862
|
BaseSelect,
|
|
@@ -5815,7 +5865,7 @@ var createStyledSelect = (BaseSelect, displayName) => {
|
|
|
5815
5865
|
isDisabled: disabled,
|
|
5816
5866
|
components: customComponents,
|
|
5817
5867
|
classNames: customClassNames,
|
|
5818
|
-
noOptionsMessage: () => /* @__PURE__ */ jsx("p", { children:
|
|
5868
|
+
noOptionsMessage: () => /* @__PURE__ */ jsx("p", { children: messages23.inputSelect.noOptions }),
|
|
5819
5869
|
...props
|
|
5820
5870
|
}
|
|
5821
5871
|
);
|
|
@@ -7034,7 +7084,7 @@ var Pagination = ({
|
|
|
7034
7084
|
onChangePage,
|
|
7035
7085
|
...props
|
|
7036
7086
|
}) => {
|
|
7037
|
-
const { messages:
|
|
7087
|
+
const { messages: messages23 } = useNebulaI18n();
|
|
7038
7088
|
const totalPages = useMemo(() => {
|
|
7039
7089
|
return Math.ceil(total / (pageSize || 1));
|
|
7040
7090
|
}, [total, pageSize]);
|
|
@@ -7067,13 +7117,13 @@ var Pagination = ({
|
|
|
7067
7117
|
}, [totalPages, pageSize, total]);
|
|
7068
7118
|
const totalResultsLabel = useMemo(() => {
|
|
7069
7119
|
if (page === totalPages) {
|
|
7070
|
-
return
|
|
7120
|
+
return messages23.pagination.totalResultsLabel(lastPageSize, total);
|
|
7071
7121
|
}
|
|
7072
|
-
return
|
|
7073
|
-
}, [
|
|
7122
|
+
return messages23.pagination.totalResultsLabel(pageSize, total);
|
|
7123
|
+
}, [messages23.pagination, pageSize, total, page, totalPages, lastPageSize]);
|
|
7074
7124
|
const currentPageLabel = useMemo(
|
|
7075
|
-
() =>
|
|
7076
|
-
[
|
|
7125
|
+
() => messages23.pagination.currentPageLabel(normalizedPage, totalPages),
|
|
7126
|
+
[messages23.pagination, normalizedPage, totalPages]
|
|
7077
7127
|
);
|
|
7078
7128
|
return /* @__PURE__ */ jsxs(
|
|
7079
7129
|
"nav",
|
|
@@ -8512,13 +8562,13 @@ function custom(message, options) {
|
|
|
8512
8562
|
}
|
|
8513
8563
|
);
|
|
8514
8564
|
}
|
|
8515
|
-
async function promise(promise2,
|
|
8565
|
+
async function promise(promise2, messages23, options) {
|
|
8516
8566
|
const loadingToast = toast$1.custom(
|
|
8517
8567
|
(t) => /* @__PURE__ */ jsx(
|
|
8518
8568
|
ToastComponent,
|
|
8519
8569
|
{
|
|
8520
8570
|
type: "info",
|
|
8521
|
-
message:
|
|
8571
|
+
message: messages23.loading,
|
|
8522
8572
|
options,
|
|
8523
8573
|
t
|
|
8524
8574
|
}
|
|
@@ -8532,7 +8582,7 @@ async function promise(promise2, messages20, options) {
|
|
|
8532
8582
|
ToastComponent,
|
|
8533
8583
|
{
|
|
8534
8584
|
type: "success",
|
|
8535
|
-
message:
|
|
8585
|
+
message: messages23.success,
|
|
8536
8586
|
options,
|
|
8537
8587
|
t
|
|
8538
8588
|
}
|
|
@@ -8547,7 +8597,7 @@ async function promise(promise2, messages20, options) {
|
|
|
8547
8597
|
ToastComponent,
|
|
8548
8598
|
{
|
|
8549
8599
|
type: "error",
|
|
8550
|
-
message:
|
|
8600
|
+
message: messages23.error,
|
|
8551
8601
|
options,
|
|
8552
8602
|
t
|
|
8553
8603
|
}
|
|
@@ -9057,6 +9107,65 @@ function SidebarMenuItem({
|
|
|
9057
9107
|
collapsible && open && !isRail && /* @__PURE__ */ jsx(SidebarLevelContext.Provider, { value: level + 1, children: /* @__PURE__ */ jsx("div", { className: "nebula-ds mt-1 space-y-1", children }) })
|
|
9058
9108
|
] });
|
|
9059
9109
|
}
|
|
9110
|
+
function Combobox({
|
|
9111
|
+
value = [],
|
|
9112
|
+
onChange,
|
|
9113
|
+
showEmptyState = true,
|
|
9114
|
+
isClearable = true,
|
|
9115
|
+
emptyStateText,
|
|
9116
|
+
emptyStateDescription,
|
|
9117
|
+
...props
|
|
9118
|
+
}) {
|
|
9119
|
+
const { messages: messages23 } = useNebulaI18n();
|
|
9120
|
+
const selectedValues = value || [];
|
|
9121
|
+
const handleSelect = (val) => {
|
|
9122
|
+
onChange?.(val);
|
|
9123
|
+
};
|
|
9124
|
+
return /* @__PURE__ */ jsxs(Space, { direction: "column", size: "md", className: "nebula-ds w-full", children: [
|
|
9125
|
+
/* @__PURE__ */ jsx(
|
|
9126
|
+
StyledSelect,
|
|
9127
|
+
{
|
|
9128
|
+
...props,
|
|
9129
|
+
onChange: (e) => handleSelect(e),
|
|
9130
|
+
value: selectedValues,
|
|
9131
|
+
isMulti: true,
|
|
9132
|
+
controlShouldRenderValue: false,
|
|
9133
|
+
hideSelectedOptions: false,
|
|
9134
|
+
className: "nebula-ds w-full",
|
|
9135
|
+
isClearable: false
|
|
9136
|
+
}
|
|
9137
|
+
),
|
|
9138
|
+
selectedValues.length > 0 && /* @__PURE__ */ jsxs("div", { className: "nebula-ds flex flex-wrap gap-2", children: [
|
|
9139
|
+
selectedValues.map((item) => /* @__PURE__ */ jsx(
|
|
9140
|
+
Tag,
|
|
9141
|
+
{
|
|
9142
|
+
color: item.color,
|
|
9143
|
+
onDelete: () => {
|
|
9144
|
+
const newValue = selectedValues.filter(
|
|
9145
|
+
(i) => i.value !== item.value
|
|
9146
|
+
);
|
|
9147
|
+
onChange?.(newValue);
|
|
9148
|
+
},
|
|
9149
|
+
children: item.label
|
|
9150
|
+
},
|
|
9151
|
+
item.value
|
|
9152
|
+
)),
|
|
9153
|
+
isClearable && /* @__PURE__ */ jsx(Button, { onClick: () => onChange?.([]), size: "xs", variant: "ghost", children: /* @__PURE__ */ jsx(Paragraph, { children: messages23.combobox.removeAll }) })
|
|
9154
|
+
] }),
|
|
9155
|
+
selectedValues.length <= 0 && showEmptyState && /* @__PURE__ */ jsx(
|
|
9156
|
+
Box,
|
|
9157
|
+
{
|
|
9158
|
+
variant: "secondary",
|
|
9159
|
+
shadow: "none",
|
|
9160
|
+
className: "nebula-ds w-full flex justify-center items-center",
|
|
9161
|
+
children: /* @__PURE__ */ jsxs(Space, { direction: "column", className: "nebula-ds justify-center items-center", children: [
|
|
9162
|
+
/* @__PURE__ */ jsx(Heading, { level: "6", children: emptyStateText || messages23.combobox.noItemsSelected }),
|
|
9163
|
+
/* @__PURE__ */ jsx(Paragraph, { size: "sm", children: emptyStateDescription || messages23.combobox.selectAnOption })
|
|
9164
|
+
] })
|
|
9165
|
+
}
|
|
9166
|
+
)
|
|
9167
|
+
] });
|
|
9168
|
+
}
|
|
9060
9169
|
|
|
9061
9170
|
// src/tailwind.ts
|
|
9062
9171
|
function content({ base = "./" } = {}) {
|
|
@@ -9068,4 +9177,4 @@ var tailwind = {
|
|
|
9068
9177
|
// plugin: () => require("tailwindcss")("node_modules/@nebulareact/dist/tailwind.config.js"),
|
|
9069
9178
|
};
|
|
9070
9179
|
|
|
9071
|
-
export { Accordion, AccordionContent, AccordionDescription, AccordionItem, AccordionTitle, AccordionTrigger, ActionBar, ActionBarButton, ActionBarClose, ActionBarContent, ActionBarDivider, ActionBarPortal, ActionBarTrigger, Alert, AlertButton, AlertDescription, AlertDialog, AlertDialogAction, AlertDialogCancel, AlertDialogContent, AlertDialogDescription, AlertDialogFooter, AlertDialogHeader, AlertDialogTitle, AlertDialogTrigger, AlertTitle, StyledAsync as Async, StyledAsyncCreatable as AsyncCreatable, Avatar, AvatarFallback, AvatarHoverAction, AvatarImage, AvatarSizeEnum, AvatarStick, AvatarVariantEnum, Badge, BannerAlert, BannerType, BannerVariant, Box, Breadcrumb, BreadcrumbEllipsis, BreadcrumbItem, BreadcrumbLink, BreadcrumbList, BreadcrumbPage, BreadcrumbSeparator, Button, Calendar, Caption, Checkbox, StyledCreatable as Creatable, Cropper2 as Cropper, CropperCropArea2 as CropperCropArea, CropperDescription2 as CropperDescription, CropperImage2 as CropperImage, Dialog, DialogBody, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogTitle, DialogTrigger, Drawer, DrawerBody, DrawerClose, DrawerContent, DrawerDescription, DrawerFooter, DrawerHeader, DrawerOverlay, DrawerPortal, DrawerTitle, DrawerTrigger, DropdownMenu, DropdownMenuCheckboxItem, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuTrigger, FileUpload, FileUploadError, Heading, InputDatePickerSingle, InputDateRangePicker, InputDateTimePickerSingle, InputPhone, InputText, InputTime, KanbanBoard, KanbanCard, KanbanColumn, KanbanColumnDragHandle, KanbanColumnFooter, KanbanColumnHeader, KanbanColumnTitle, Label2 as Label, Link, NebulaI18nProvider, Pagination, Paragraph, Popover, PopoverContent, PopoverTrigger, ProfileImage, RadioGroup2 as RadioGroup, RadioGroupItem, StyledSelect as Select, Separator, Sidebar, SidebarContent, SidebarFooter, SidebarGroup, SidebarGroupLabel, SidebarHeader, SidebarMenuItem, SidebarSeparator, SidebarStateEnum, SidebarTitle, SidebarTrigger, Skeleton, Slider, Space, SpaceDirectionEnum, SpaceSizeEnum, Stepper, StepperDescription, StepperIndicator, StepperItem, StepperSeparator, StepperTitle, StepperTrigger, Switch, Table, TableBody, TableCaption, TableCell, TableFooter, TableHead, TableHeader, TableRow, Tabs, TabsContent, TabsList, TabsTrigger, Tag, TextArea, TipCard, TipCardContent2 as TipCardContent, TipCardFooter, TipCardHeader, TipCardItem, TipCardMedia, TipCardMediaType, TipCardProvider, Toaster, Toggle, ToggleGroup, ToggleGroupItem, ToggleGroupTypeEnum, ToggleSizeEnum, Tooltip, alertVariants, badgeSizeEnum, badgeVariantEnum, buttonSizeEnum, buttonVariantEnum, buttonVariantsConfig, dateIsAvailable, formatBytes, getNebulaLanguage, localeByi18nKey,
|
|
9180
|
+
export { Accordion, AccordionContent, AccordionDescription, AccordionItem, AccordionTitle, AccordionTrigger, ActionBar, ActionBarButton, ActionBarClose, ActionBarContent, ActionBarDivider, ActionBarPortal, ActionBarTrigger, Alert, AlertButton, AlertDescription, AlertDialog, AlertDialogAction, AlertDialogCancel, AlertDialogContent, AlertDialogDescription, AlertDialogFooter, AlertDialogHeader, AlertDialogTitle, AlertDialogTrigger, AlertTitle, StyledAsync as Async, StyledAsyncCreatable as AsyncCreatable, Avatar, AvatarFallback, AvatarHoverAction, AvatarImage, AvatarSizeEnum, AvatarStick, AvatarVariantEnum, Badge, BannerAlert, BannerType, BannerVariant, Box, Breadcrumb, BreadcrumbEllipsis, BreadcrumbItem, BreadcrumbLink, BreadcrumbList, BreadcrumbPage, BreadcrumbSeparator, Button, Calendar, Caption, Checkbox, Combobox, StyledCreatable as Creatable, Cropper2 as Cropper, CropperCropArea2 as CropperCropArea, CropperDescription2 as CropperDescription, CropperImage2 as CropperImage, Dialog, DialogBody, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogTitle, DialogTrigger, Drawer, DrawerBody, DrawerClose, DrawerContent, DrawerDescription, DrawerFooter, DrawerHeader, DrawerOverlay, DrawerPortal, DrawerTitle, DrawerTrigger, DropdownMenu, DropdownMenuCheckboxItem, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuTrigger, FileUpload, FileUploadError, Heading, InputDatePickerSingle, InputDateRangePicker, InputDateTimePickerSingle, InputPhone, InputText, InputTime, KanbanBoard, KanbanCard, KanbanColumn, KanbanColumnDragHandle, KanbanColumnFooter, KanbanColumnHeader, KanbanColumnTitle, Label2 as Label, Link, NebulaI18nProvider, Pagination, Paragraph, Popover, PopoverContent, PopoverTrigger, ProfileImage, RadioGroup2 as RadioGroup, RadioGroupItem, StyledSelect as Select, Separator, Sidebar, SidebarContent, SidebarFooter, SidebarGroup, SidebarGroupLabel, SidebarHeader, SidebarMenuItem, SidebarSeparator, SidebarStateEnum, SidebarTitle, SidebarTrigger, Skeleton, Slider, Space, SpaceDirectionEnum, SpaceSizeEnum, Stepper, StepperDescription, StepperIndicator, StepperItem, StepperSeparator, StepperTitle, StepperTrigger, Switch, Table, TableBody, TableCaption, TableCell, TableFooter, TableHead, TableHeader, TableRow, Tabs, TabsContent, TabsList, TabsTrigger, Tag, TextArea, TipCard, TipCardContent2 as TipCardContent, TipCardFooter, TipCardHeader, TipCardItem, TipCardMedia, TipCardMediaType, TipCardProvider, Toaster, Toggle, ToggleGroup, ToggleGroupItem, ToggleGroupTypeEnum, ToggleSizeEnum, Tooltip, alertVariants, badgeSizeEnum, badgeVariantEnum, buttonSizeEnum, buttonVariantEnum, buttonVariantsConfig, dateIsAvailable, formatBytes, getNebulaLanguage, localeByi18nKey, messages22 as messages, separatorVariants, setNebulaLanguage, tagVariantsEnum, tailwind, toast, toggleVariants, useClickOutside, useFileUpload, useIsMobile, useKeyPress, useNebulaI18n, useSidebar, useTipCard };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ikatec/nebula-react",
|
|
3
|
-
"version": "1.9.0
|
|
3
|
+
"version": "1.9.0",
|
|
4
4
|
"description": "React components for Nebula Design System",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"access": "public"
|
|
@@ -19,7 +19,6 @@
|
|
|
19
19
|
"build": "tsup src/index.tsx --format esm,cjs --dts",
|
|
20
20
|
"dev": "tsup src/index.tsx --format esm,cjs --dts --watch",
|
|
21
21
|
"lint": "eslint ./src --ext .ts,.tsx,.js,.jsx",
|
|
22
|
-
"lint:staged": "npx lint-staged",
|
|
23
22
|
"lint:fix": "eslint ./src --ext .ts,.tsx,.js,.jsx --fix"
|
|
24
23
|
},
|
|
25
24
|
"keywords": [],
|
|
Binary file
|