@ikatec/nebula-react 1.0.16 → 1.0.17

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
@@ -498,7 +498,7 @@ declare const Paragraph: React__default.ForwardRefExoticComponent<ParagraphProps
498
498
  interface CaptionProps extends HTMLAttributes<HTMLTableCaptionElement> {
499
499
  }
500
500
  declare const Caption: React__default.ForwardRefExoticComponent<CaptionProps & React__default.RefAttributes<HTMLTableCaptionElement>>;
501
- interface LinkProps extends HTMLAttributes<HTMLAnchorElement> {
501
+ interface LinkProps extends React__default.AnchorHTMLAttributes<HTMLAnchorElement> {
502
502
  size?: 'md' | 'sm';
503
503
  asChild?: boolean;
504
504
  children: ReactNode;
@@ -550,6 +550,9 @@ interface InputPhoneMessages {
550
550
  interface TimePickerMessages {
551
551
  label: string;
552
552
  }
553
+ interface FileUploadMessages {
554
+ deleteAll: string;
555
+ }
553
556
  /**
554
557
  * Type to store the messages.
555
558
  */
@@ -558,6 +561,7 @@ interface Messages {
558
561
  inputSelect: InputSelectMessages;
559
562
  inputPhone: InputPhoneMessages;
560
563
  timePicker: TimePickerMessages;
564
+ fileUpload: FileUploadMessages;
561
565
  }
562
566
 
563
567
  /**
@@ -609,6 +613,48 @@ type InputTimeProps = Omit<React.ComponentProps<typeof InputText>, 'onChange'> &
609
613
  };
610
614
  declare const InputTime: React$1.ForwardRefExoticComponent<Omit<InputTimeProps, "ref"> & React$1.RefAttributes<HTMLInputElement>>;
611
615
 
616
+ type FileMetadata = {
617
+ name: string;
618
+ size: number;
619
+ type: string;
620
+ url: string;
621
+ id: string;
622
+ };
623
+ type FileWithPreview = {
624
+ file: File | FileMetadata;
625
+ id: string;
626
+ preview?: string;
627
+ };
628
+ type FileUploadOptions = {
629
+ maxFiles?: number;
630
+ maxSize?: number;
631
+ accept?: string;
632
+ multiple?: boolean;
633
+ initialFiles?: FileMetadata[];
634
+ onFilesChange?: (files: FileWithPreview[]) => void;
635
+ onFilesAdded?: (addedFiles: FileWithPreview[]) => void;
636
+ };
637
+ declare enum FileUploadError {
638
+ MAX_FILES_EXCEEDED = "MAX_FILES_EXCEEDED",
639
+ MAXIMUM_FILE_SIZE_EXCEEDED = "MAXIMUM_FILE_SIZE_EXCEEDED",
640
+ INVALID_FORMAT = "INVALID_FORMAT"
641
+ }
642
+ declare const formatBytes: (bytes: number, decimals?: number) => string;
643
+
644
+ interface FileUploadProps extends Omit<FileUploadOptions, 'maxSize'> {
645
+ maxSizeMB?: number;
646
+ title: string;
647
+ subtitle: string;
648
+ showPreview?: boolean;
649
+ imagePreview?: (file?: FileWithPreview) => ReactNode;
650
+ onError?: (errors: {
651
+ file?: File | FileMetadata;
652
+ error: FileUploadError;
653
+ }[]) => void;
654
+ disabled?: boolean;
655
+ }
656
+ declare function FileUpload({ maxSizeMB, subtitle, title, imagePreview, showPreview, onError, maxFiles, ...rest }: FileUploadProps): react_jsx_runtime.JSX.Element;
657
+
612
658
  interface TextAreaProps extends React$1.InputHTMLAttributes<HTMLTextAreaElement> {
613
659
  isError?: boolean;
614
660
  resize?: boolean;
@@ -696,4 +742,4 @@ declare const NebulaI18nProvider: ({ children, customI18nStorageKey, }: NebulaI1
696
742
  */
697
743
  declare const useNebulaI18n: () => NebulaI18nContextType;
698
744
 
699
- 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, Badge, type BadgeProps, 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, 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, Heading, type HeadingProps, InputDatePickerSingle, type InputDatePickerSingleProps, InputDateTimePickerSingle, type InputDateTimePickerSingleProps, InputPhone, InputText, type InputTextProps, InputTime, type InputTimeProps, Label, Link, type LinkProps, NebulaI18nProvider, type NebulaI18nProviderProps, Pagination, type PaginationProps, Paragraph, type ParagraphProps, Popover, PopoverContent, type PopoverContentProps, PopoverTrigger, StyledSelect as Select, type CreateStyledSelectProps as SelectProps, Separator, type SeparatorProps, Skeleton, type SkeletonProps, Space, SpaceDirectionEnum, type SpaceProps, SpaceSizeEnum, Switch, Table, TableBody, TableCaption, TableCell, TableFooter, TableHead, TableHeader, TableRow, Tabs, TabsContent, TabsList, TabsTrigger, Tag, type TagProps, TextArea, type TextAreaProps, Toaster, Tooltip, type TooltipProps, alertVariants, badgeSizeEnum, badgeVariantEnum, buttonSizeEnum, buttonVariantEnum, buttonVariantsConfig, dateIsAvailable, getNebulaLanguage, localeByi18nKey, messages, separatorVariants, setNebulaLanguage, tagVariantsEnum, tailwind, toast, useNebulaI18n };
745
+ 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, Badge, type BadgeProps, 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, 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, FileUploadError, type FileUploadOptions, type FileWithPreview, Heading, type HeadingProps, InputDatePickerSingle, type InputDatePickerSingleProps, InputDateTimePickerSingle, type InputDateTimePickerSingleProps, InputPhone, InputText, type InputTextProps, InputTime, type InputTimeProps, Label, Link, type LinkProps, NebulaI18nProvider, type NebulaI18nProviderProps, Pagination, type PaginationProps, Paragraph, type ParagraphProps, Popover, PopoverContent, type PopoverContentProps, PopoverTrigger, StyledSelect as Select, type CreateStyledSelectProps as SelectProps, Separator, type SeparatorProps, Skeleton, type SkeletonProps, Space, SpaceDirectionEnum, type SpaceProps, SpaceSizeEnum, Switch, Table, TableBody, TableCaption, TableCell, TableFooter, TableHead, TableHeader, TableRow, Tabs, TabsContent, TabsList, TabsTrigger, Tag, type TagProps, TextArea, type TextAreaProps, Toaster, Tooltip, type TooltipProps, alertVariants, badgeSizeEnum, badgeVariantEnum, buttonSizeEnum, buttonVariantEnum, buttonVariantsConfig, dateIsAvailable, formatBytes, getNebulaLanguage, localeByi18nKey, messages, separatorVariants, setNebulaLanguage, tagVariantsEnum, tailwind, toast, useNebulaI18n };
package/dist/index.d.ts CHANGED
@@ -498,7 +498,7 @@ declare const Paragraph: React__default.ForwardRefExoticComponent<ParagraphProps
498
498
  interface CaptionProps extends HTMLAttributes<HTMLTableCaptionElement> {
499
499
  }
500
500
  declare const Caption: React__default.ForwardRefExoticComponent<CaptionProps & React__default.RefAttributes<HTMLTableCaptionElement>>;
501
- interface LinkProps extends HTMLAttributes<HTMLAnchorElement> {
501
+ interface LinkProps extends React__default.AnchorHTMLAttributes<HTMLAnchorElement> {
502
502
  size?: 'md' | 'sm';
503
503
  asChild?: boolean;
504
504
  children: ReactNode;
@@ -550,6 +550,9 @@ interface InputPhoneMessages {
550
550
  interface TimePickerMessages {
551
551
  label: string;
552
552
  }
553
+ interface FileUploadMessages {
554
+ deleteAll: string;
555
+ }
553
556
  /**
554
557
  * Type to store the messages.
555
558
  */
@@ -558,6 +561,7 @@ interface Messages {
558
561
  inputSelect: InputSelectMessages;
559
562
  inputPhone: InputPhoneMessages;
560
563
  timePicker: TimePickerMessages;
564
+ fileUpload: FileUploadMessages;
561
565
  }
562
566
 
563
567
  /**
@@ -609,6 +613,48 @@ type InputTimeProps = Omit<React.ComponentProps<typeof InputText>, 'onChange'> &
609
613
  };
610
614
  declare const InputTime: React$1.ForwardRefExoticComponent<Omit<InputTimeProps, "ref"> & React$1.RefAttributes<HTMLInputElement>>;
611
615
 
616
+ type FileMetadata = {
617
+ name: string;
618
+ size: number;
619
+ type: string;
620
+ url: string;
621
+ id: string;
622
+ };
623
+ type FileWithPreview = {
624
+ file: File | FileMetadata;
625
+ id: string;
626
+ preview?: string;
627
+ };
628
+ type FileUploadOptions = {
629
+ maxFiles?: number;
630
+ maxSize?: number;
631
+ accept?: string;
632
+ multiple?: boolean;
633
+ initialFiles?: FileMetadata[];
634
+ onFilesChange?: (files: FileWithPreview[]) => void;
635
+ onFilesAdded?: (addedFiles: FileWithPreview[]) => void;
636
+ };
637
+ declare enum FileUploadError {
638
+ MAX_FILES_EXCEEDED = "MAX_FILES_EXCEEDED",
639
+ MAXIMUM_FILE_SIZE_EXCEEDED = "MAXIMUM_FILE_SIZE_EXCEEDED",
640
+ INVALID_FORMAT = "INVALID_FORMAT"
641
+ }
642
+ declare const formatBytes: (bytes: number, decimals?: number) => string;
643
+
644
+ interface FileUploadProps extends Omit<FileUploadOptions, 'maxSize'> {
645
+ maxSizeMB?: number;
646
+ title: string;
647
+ subtitle: string;
648
+ showPreview?: boolean;
649
+ imagePreview?: (file?: FileWithPreview) => ReactNode;
650
+ onError?: (errors: {
651
+ file?: File | FileMetadata;
652
+ error: FileUploadError;
653
+ }[]) => void;
654
+ disabled?: boolean;
655
+ }
656
+ declare function FileUpload({ maxSizeMB, subtitle, title, imagePreview, showPreview, onError, maxFiles, ...rest }: FileUploadProps): react_jsx_runtime.JSX.Element;
657
+
612
658
  interface TextAreaProps extends React$1.InputHTMLAttributes<HTMLTextAreaElement> {
613
659
  isError?: boolean;
614
660
  resize?: boolean;
@@ -696,4 +742,4 @@ declare const NebulaI18nProvider: ({ children, customI18nStorageKey, }: NebulaI1
696
742
  */
697
743
  declare const useNebulaI18n: () => NebulaI18nContextType;
698
744
 
699
- 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, Badge, type BadgeProps, 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, 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, Heading, type HeadingProps, InputDatePickerSingle, type InputDatePickerSingleProps, InputDateTimePickerSingle, type InputDateTimePickerSingleProps, InputPhone, InputText, type InputTextProps, InputTime, type InputTimeProps, Label, Link, type LinkProps, NebulaI18nProvider, type NebulaI18nProviderProps, Pagination, type PaginationProps, Paragraph, type ParagraphProps, Popover, PopoverContent, type PopoverContentProps, PopoverTrigger, StyledSelect as Select, type CreateStyledSelectProps as SelectProps, Separator, type SeparatorProps, Skeleton, type SkeletonProps, Space, SpaceDirectionEnum, type SpaceProps, SpaceSizeEnum, Switch, Table, TableBody, TableCaption, TableCell, TableFooter, TableHead, TableHeader, TableRow, Tabs, TabsContent, TabsList, TabsTrigger, Tag, type TagProps, TextArea, type TextAreaProps, Toaster, Tooltip, type TooltipProps, alertVariants, badgeSizeEnum, badgeVariantEnum, buttonSizeEnum, buttonVariantEnum, buttonVariantsConfig, dateIsAvailable, getNebulaLanguage, localeByi18nKey, messages, separatorVariants, setNebulaLanguage, tagVariantsEnum, tailwind, toast, useNebulaI18n };
745
+ 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, Badge, type BadgeProps, 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, 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, FileUploadError, type FileUploadOptions, type FileWithPreview, Heading, type HeadingProps, InputDatePickerSingle, type InputDatePickerSingleProps, InputDateTimePickerSingle, type InputDateTimePickerSingleProps, InputPhone, InputText, type InputTextProps, InputTime, type InputTimeProps, Label, Link, type LinkProps, NebulaI18nProvider, type NebulaI18nProviderProps, Pagination, type PaginationProps, Paragraph, type ParagraphProps, Popover, PopoverContent, type PopoverContentProps, PopoverTrigger, StyledSelect as Select, type CreateStyledSelectProps as SelectProps, Separator, type SeparatorProps, Skeleton, type SkeletonProps, Space, SpaceDirectionEnum, type SpaceProps, SpaceSizeEnum, Switch, Table, TableBody, TableCaption, TableCell, TableFooter, TableHead, TableHeader, TableRow, Tabs, TabsContent, TabsList, TabsTrigger, Tag, type TagProps, TextArea, type TextAreaProps, Toaster, Tooltip, type TooltipProps, alertVariants, badgeSizeEnum, badgeVariantEnum, buttonSizeEnum, buttonVariantEnum, buttonVariantsConfig, dateIsAvailable, formatBytes, getNebulaLanguage, localeByi18nKey, messages, separatorVariants, setNebulaLanguage, tagVariantsEnum, tailwind, toast, useNebulaI18n };
package/dist/index.js CHANGED
@@ -4835,7 +4835,7 @@ var TextArea = React8__namespace.forwardRef(
4835
4835
  };
4836
4836
  }, [asInput, autoResize, props.value]);
4837
4837
  React8__namespace.useImperativeHandle(ref, () => innerRef.current);
4838
- return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "nebula-ds relative", children: [
4838
+ return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "nebula-ds relative w-full", children: [
4839
4839
  /* @__PURE__ */ jsxRuntime.jsx(
4840
4840
  "div",
4841
4841
  {
package/dist/index.mjs CHANGED
@@ -4795,7 +4795,7 @@ var TextArea = React8.forwardRef(
4795
4795
  };
4796
4796
  }, [asInput, autoResize, props.value]);
4797
4797
  React8.useImperativeHandle(ref, () => innerRef.current);
4798
- return /* @__PURE__ */ jsxs("div", { className: "nebula-ds relative", children: [
4798
+ return /* @__PURE__ */ jsxs("div", { className: "nebula-ds relative w-full", children: [
4799
4799
  /* @__PURE__ */ jsx(
4800
4800
  "div",
4801
4801
  {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ikatec/nebula-react",
3
- "version": "1.0.16",
3
+ "version": "1.0.17",
4
4
  "description": "React components",
5
5
  "publishConfig": {
6
6
  "access": "public"