@ikatec/nebula-react 1.0.26 → 1.0.27

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
@@ -1,6 +1,6 @@
1
1
  import * as class_variance_authority_dist_types from 'class-variance-authority/dist/types';
2
2
  import * as React$1 from 'react';
3
- import React__default, { ComponentProps, PropsWithChildren, HTMLAttributes, ReactNode, DragEvent, ChangeEvent, InputHTMLAttributes, MutableRefObject } from 'react';
3
+ import React__default, { ComponentProps, PropsWithChildren, HTMLAttributes, ReactNode, DragEvent, ChangeEvent, InputHTMLAttributes } from 'react';
4
4
  import { VariantProps } from 'class-variance-authority';
5
5
  import * as PopoverPrimitive from '@radix-ui/react-popover';
6
6
  import * as LabelPrimitive from '@radix-ui/react-label';
@@ -589,25 +589,26 @@ interface InputDatePickerSingleProps extends Omit<InputTextProps, 'onChange' | '
589
589
  value?: string;
590
590
  onChange?: (value?: string, calendarDate?: Date) => void;
591
591
  numberOfMonths?: CalendarProps['numberOfMonths'];
592
+ portal?: PopoverContentProps['portal'];
592
593
  placeholder?: string;
593
594
  className?: string;
594
595
  disabledDates?: CalendarProps['disabled'];
595
596
  onClean?: VoidFunction;
596
- popoverContainer?: HTMLElement | null;
597
597
  }
598
598
  declare const dateIsAvailable: (inputDate?: Date | null, disabledDates?: InputDatePickerSingleProps["disabledDates"]) => boolean;
599
- declare const InputDatePickerSingle: ({ placeholder, className, value, onChange, numberOfMonths, onClean, disabledDates, ...rest }: InputDatePickerSingleProps) => react_jsx_runtime.JSX.Element;
599
+ declare const InputDatePickerSingle: ({ portal, placeholder, className, value, onChange, numberOfMonths, onClean, disabledDates, ...rest }: InputDatePickerSingleProps) => react_jsx_runtime.JSX.Element;
600
600
 
601
601
  interface InputDateTimePickerSingleProps extends Omit<InputTextProps, 'onChange' | 'value'> {
602
602
  value?: string;
603
603
  onChange?: (value?: string, calendarDate?: Date, inputTimeValue?: string) => void;
604
604
  numberOfMonths?: CalendarProps['numberOfMonths'];
605
+ portal?: PopoverContentProps['portal'];
605
606
  placeholder?: string;
606
607
  className?: string;
607
608
  disabledDates?: CalendarProps['disabled'];
608
609
  onClean?: VoidFunction;
609
610
  }
610
- declare const InputDateTimePickerSingle: ({ placeholder, className, value, onChange, numberOfMonths, onClean, disabledDates, ...rest }: InputDateTimePickerSingleProps) => react_jsx_runtime.JSX.Element;
611
+ declare const InputDateTimePickerSingle: ({ portal, placeholder, className, value, onChange, numberOfMonths, onClean, disabledDates, ...rest }: InputDateTimePickerSingleProps) => react_jsx_runtime.JSX.Element;
611
612
 
612
613
  type InputTimeProps = Omit<React.ComponentProps<typeof InputText>, 'onChange'> & {
613
614
  onChange?: (value: string) => void;
@@ -679,6 +680,9 @@ interface FileUploadProps extends Omit<FileUploadOptions, 'maxSize'> {
679
680
  disabled?: boolean;
680
681
  }
681
682
  declare function FileUpload({ maxSizeMB, subtitle, title, imagePreview, showPreview, onError, maxFiles, ...rest }: FileUploadProps): react_jsx_runtime.JSX.Element;
683
+ declare namespace FileUpload {
684
+ var displayName: string;
685
+ }
682
686
 
683
687
  interface TextAreaProps extends React$1.InputHTMLAttributes<HTMLTextAreaElement> {
684
688
  isError?: boolean;
@@ -702,6 +706,21 @@ interface TextAreaProps extends React$1.InputHTMLAttributes<HTMLTextAreaElement>
702
706
  */
703
707
  declare const TextArea: React$1.ForwardRefExoticComponent<TextAreaProps & React$1.RefAttributes<HTMLTextAreaElement>>;
704
708
 
709
+ interface ProfileImageProps extends Omit<FileUploadOptions, 'maxSize' | 'accept'> {
710
+ maxSizeMB?: number;
711
+ onError?: (errors: {
712
+ file?: File | FileMetadata;
713
+ error: FileUploadError;
714
+ }[]) => void;
715
+ disabled?: boolean;
716
+ subtitle?: string;
717
+ onRemove?: VoidFunction;
718
+ }
719
+ declare const ProfileImage: {
720
+ ({ maxSizeMB, subtitle, onError, maxFiles, onRemove, ...rest }: ProfileImageProps): react_jsx_runtime.JSX.Element;
721
+ displayName: string;
722
+ };
723
+
705
724
  interface Content {
706
725
  /**
707
726
  * Path to `node_modules` where `flowbite-react` is installed
@@ -767,9 +786,4 @@ declare const NebulaI18nProvider: ({ children, customI18nStorageKey, }: NebulaI1
767
786
  */
768
787
  declare const useNebulaI18n: () => NebulaI18nContextType;
769
788
 
770
- type PossibleRefs<T extends HTMLElement> = MutableRefObject<T | undefined | null> | MutableRefObject<T | undefined | null>[];
771
- declare function useClickOutside<T extends HTMLElement>(refs: PossibleRefs<T>, onClickOutside: VoidFunction): void;
772
-
773
- declare function useKeyPress(key: string, callback: VoidFunction): void;
774
-
775
- 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, type FileUploadActions, FileUploadError, type FileUploadOptions, type FileUploadState, 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, useClickOutside, useFileUpload, useKeyPress, useNebulaI18n };
789
+ 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, type FileUploadActions, FileUploadError, type FileUploadOptions, type FileUploadProps, type FileUploadState, 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, ProfileImage, type ProfileImageProps, 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, useFileUpload, useNebulaI18n };
package/dist/index.d.ts CHANGED
@@ -1,6 +1,6 @@
1
1
  import * as class_variance_authority_dist_types from 'class-variance-authority/dist/types';
2
2
  import * as React$1 from 'react';
3
- import React__default, { ComponentProps, PropsWithChildren, HTMLAttributes, ReactNode, DragEvent, ChangeEvent, InputHTMLAttributes, MutableRefObject } from 'react';
3
+ import React__default, { ComponentProps, PropsWithChildren, HTMLAttributes, ReactNode, DragEvent, ChangeEvent, InputHTMLAttributes } from 'react';
4
4
  import { VariantProps } from 'class-variance-authority';
5
5
  import * as PopoverPrimitive from '@radix-ui/react-popover';
6
6
  import * as LabelPrimitive from '@radix-ui/react-label';
@@ -589,25 +589,26 @@ interface InputDatePickerSingleProps extends Omit<InputTextProps, 'onChange' | '
589
589
  value?: string;
590
590
  onChange?: (value?: string, calendarDate?: Date) => void;
591
591
  numberOfMonths?: CalendarProps['numberOfMonths'];
592
+ portal?: PopoverContentProps['portal'];
592
593
  placeholder?: string;
593
594
  className?: string;
594
595
  disabledDates?: CalendarProps['disabled'];
595
596
  onClean?: VoidFunction;
596
- popoverContainer?: HTMLElement | null;
597
597
  }
598
598
  declare const dateIsAvailable: (inputDate?: Date | null, disabledDates?: InputDatePickerSingleProps["disabledDates"]) => boolean;
599
- declare const InputDatePickerSingle: ({ placeholder, className, value, onChange, numberOfMonths, onClean, disabledDates, ...rest }: InputDatePickerSingleProps) => react_jsx_runtime.JSX.Element;
599
+ declare const InputDatePickerSingle: ({ portal, placeholder, className, value, onChange, numberOfMonths, onClean, disabledDates, ...rest }: InputDatePickerSingleProps) => react_jsx_runtime.JSX.Element;
600
600
 
601
601
  interface InputDateTimePickerSingleProps extends Omit<InputTextProps, 'onChange' | 'value'> {
602
602
  value?: string;
603
603
  onChange?: (value?: string, calendarDate?: Date, inputTimeValue?: string) => void;
604
604
  numberOfMonths?: CalendarProps['numberOfMonths'];
605
+ portal?: PopoverContentProps['portal'];
605
606
  placeholder?: string;
606
607
  className?: string;
607
608
  disabledDates?: CalendarProps['disabled'];
608
609
  onClean?: VoidFunction;
609
610
  }
610
- declare const InputDateTimePickerSingle: ({ placeholder, className, value, onChange, numberOfMonths, onClean, disabledDates, ...rest }: InputDateTimePickerSingleProps) => react_jsx_runtime.JSX.Element;
611
+ declare const InputDateTimePickerSingle: ({ portal, placeholder, className, value, onChange, numberOfMonths, onClean, disabledDates, ...rest }: InputDateTimePickerSingleProps) => react_jsx_runtime.JSX.Element;
611
612
 
612
613
  type InputTimeProps = Omit<React.ComponentProps<typeof InputText>, 'onChange'> & {
613
614
  onChange?: (value: string) => void;
@@ -679,6 +680,9 @@ interface FileUploadProps extends Omit<FileUploadOptions, 'maxSize'> {
679
680
  disabled?: boolean;
680
681
  }
681
682
  declare function FileUpload({ maxSizeMB, subtitle, title, imagePreview, showPreview, onError, maxFiles, ...rest }: FileUploadProps): react_jsx_runtime.JSX.Element;
683
+ declare namespace FileUpload {
684
+ var displayName: string;
685
+ }
682
686
 
683
687
  interface TextAreaProps extends React$1.InputHTMLAttributes<HTMLTextAreaElement> {
684
688
  isError?: boolean;
@@ -702,6 +706,21 @@ interface TextAreaProps extends React$1.InputHTMLAttributes<HTMLTextAreaElement>
702
706
  */
703
707
  declare const TextArea: React$1.ForwardRefExoticComponent<TextAreaProps & React$1.RefAttributes<HTMLTextAreaElement>>;
704
708
 
709
+ interface ProfileImageProps extends Omit<FileUploadOptions, 'maxSize' | 'accept'> {
710
+ maxSizeMB?: number;
711
+ onError?: (errors: {
712
+ file?: File | FileMetadata;
713
+ error: FileUploadError;
714
+ }[]) => void;
715
+ disabled?: boolean;
716
+ subtitle?: string;
717
+ onRemove?: VoidFunction;
718
+ }
719
+ declare const ProfileImage: {
720
+ ({ maxSizeMB, subtitle, onError, maxFiles, onRemove, ...rest }: ProfileImageProps): react_jsx_runtime.JSX.Element;
721
+ displayName: string;
722
+ };
723
+
705
724
  interface Content {
706
725
  /**
707
726
  * Path to `node_modules` where `flowbite-react` is installed
@@ -767,9 +786,4 @@ declare const NebulaI18nProvider: ({ children, customI18nStorageKey, }: NebulaI1
767
786
  */
768
787
  declare const useNebulaI18n: () => NebulaI18nContextType;
769
788
 
770
- type PossibleRefs<T extends HTMLElement> = MutableRefObject<T | undefined | null> | MutableRefObject<T | undefined | null>[];
771
- declare function useClickOutside<T extends HTMLElement>(refs: PossibleRefs<T>, onClickOutside: VoidFunction): void;
772
-
773
- declare function useKeyPress(key: string, callback: VoidFunction): void;
774
-
775
- 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, type FileUploadActions, FileUploadError, type FileUploadOptions, type FileUploadState, 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, useClickOutside, useFileUpload, useKeyPress, useNebulaI18n };
789
+ 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, type FileUploadActions, FileUploadError, type FileUploadOptions, type FileUploadProps, type FileUploadState, 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, ProfileImage, type ProfileImageProps, 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, useFileUpload, useNebulaI18n };