@rehagro/ui 1.0.4 → 1.0.5

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
@@ -410,6 +410,141 @@ declare const Tag: React$1.ForwardRefExoticComponent<React$1.HTMLAttributes<HTML
410
410
  disabled?: boolean;
411
411
  } & React$1.RefAttributes<HTMLSpanElement>>;
412
412
 
413
+ type ToggleGroupSize = "sm" | "md" | "lg";
414
+ type ToggleGroupRadius = "none" | "xs" | "sm" | "md" | "lg" | "xl" | "full";
415
+ type ToggleGroupOption<T extends string = string> = {
416
+ /** Unique value for this option */
417
+ value: T;
418
+ /** Label text or icon to display */
419
+ label?: React$1.ReactNode;
420
+ /** Icon to display (alternative to label) */
421
+ icon?: React$1.ReactNode;
422
+ /** Accessible label for screen readers */
423
+ "aria-label"?: string;
424
+ /** Whether this option is disabled */
425
+ disabled?: boolean;
426
+ };
427
+ type ToggleGroupProps<T extends string = string> = Omit<React$1.HTMLAttributes<HTMLDivElement>, "onChange"> & {
428
+ /** Available options */
429
+ options: ToggleGroupOption<T>[];
430
+ /** Currently selected value */
431
+ value: T;
432
+ /** Called when selection changes */
433
+ onChange: (value: T) => void;
434
+ /** Size variant */
435
+ size?: ToggleGroupSize;
436
+ /** Border radius */
437
+ radius?: ToggleGroupRadius;
438
+ /** Color scheme for active state */
439
+ color?: PresetColor | (string & {});
440
+ /** Whether the entire group is disabled */
441
+ disabled?: boolean;
442
+ };
443
+ declare const ToggleGroup: <T extends string = string>(props: ToggleGroupProps<T> & {
444
+ ref?: React$1.ForwardedRef<HTMLDivElement>;
445
+ }) => React$1.ReactElement;
446
+
447
+ type CardVariant = "elevated" | "outlined" | "filled";
448
+ type CardRadius = "none" | "xs" | "sm" | "md" | "lg" | "xl";
449
+ type CardPadding = "none" | "sm" | "md" | "lg";
450
+ type CardProps = React$1.HTMLAttributes<HTMLDivElement> & {
451
+ /** Visual style variant */
452
+ variant?: CardVariant;
453
+ /** Border radius */
454
+ radius?: CardRadius;
455
+ /** Internal padding */
456
+ padding?: CardPadding;
457
+ /** Makes the card clickable with hover effects */
458
+ clickable?: boolean;
459
+ /** Disabled state (only applies when clickable) */
460
+ disabled?: boolean;
461
+ };
462
+ declare const Card: React$1.ForwardRefExoticComponent<React$1.HTMLAttributes<HTMLDivElement> & {
463
+ /** Visual style variant */
464
+ variant?: CardVariant;
465
+ /** Border radius */
466
+ radius?: CardRadius;
467
+ /** Internal padding */
468
+ padding?: CardPadding;
469
+ /** Makes the card clickable with hover effects */
470
+ clickable?: boolean;
471
+ /** Disabled state (only applies when clickable) */
472
+ disabled?: boolean;
473
+ } & React$1.RefAttributes<HTMLDivElement>>;
474
+ type CardHeaderProps = React$1.HTMLAttributes<HTMLDivElement>;
475
+ declare const CardHeader: React$1.ForwardRefExoticComponent<CardHeaderProps & React$1.RefAttributes<HTMLDivElement>>;
476
+ type CardContentProps = React$1.HTMLAttributes<HTMLDivElement>;
477
+ declare const CardContent: React$1.ForwardRefExoticComponent<CardContentProps & React$1.RefAttributes<HTMLDivElement>>;
478
+ type CardFooterProps = React$1.HTMLAttributes<HTMLDivElement>;
479
+ declare const CardFooter: React$1.ForwardRefExoticComponent<CardFooterProps & React$1.RefAttributes<HTMLDivElement>>;
480
+
481
+ type SpinnerSize = "xs" | "sm" | "md" | "lg" | "xl";
482
+ type SpinnerProps = React$1.HTMLAttributes<HTMLDivElement> & {
483
+ /** Spinner size */
484
+ size?: SpinnerSize;
485
+ /** Color scheme */
486
+ color?: PresetColor | (string & {});
487
+ /** Accessible label for screen readers */
488
+ label?: string;
489
+ };
490
+ declare const Spinner: React$1.ForwardRefExoticComponent<React$1.HTMLAttributes<HTMLDivElement> & {
491
+ /** Spinner size */
492
+ size?: SpinnerSize;
493
+ /** Color scheme */
494
+ color?: PresetColor | (string & {});
495
+ /** Accessible label for screen readers */
496
+ label?: string;
497
+ } & React$1.RefAttributes<HTMLDivElement>>;
498
+
499
+ type TableSize = "sm" | "md" | "lg";
500
+ type TableVariant = "default" | "striped";
501
+ type TableColumn<T> = {
502
+ /** Unique key for this column */
503
+ key: string;
504
+ /** Column header text */
505
+ header: React$1.ReactNode;
506
+ /** Function to render cell content */
507
+ render: (row: T, index: number) => React$1.ReactNode;
508
+ /** Column width (CSS value) */
509
+ width?: string;
510
+ /** Text alignment */
511
+ align?: "left" | "center" | "right";
512
+ /** Whether this column is sortable */
513
+ sortable?: boolean;
514
+ };
515
+ type SortDirection = "asc" | "desc" | null;
516
+ type TableSort = {
517
+ key: string;
518
+ direction: SortDirection;
519
+ };
520
+ type TableProps<T> = Omit<React$1.HTMLAttributes<HTMLTableElement>, "children"> & {
521
+ /** Column definitions */
522
+ columns: TableColumn<T>[];
523
+ /** Row data */
524
+ data: T[];
525
+ /** Function to get unique key for each row */
526
+ rowKey: (row: T, index: number) => string | number;
527
+ /** Table size variant */
528
+ size?: TableSize;
529
+ /** Table style variant */
530
+ variant?: TableVariant;
531
+ /** Current sort state */
532
+ sort?: TableSort;
533
+ /** Called when sort changes */
534
+ onSortChange?: (sort: TableSort) => void;
535
+ /** Whether to show loading state */
536
+ loading?: boolean;
537
+ /** Content to show when data is empty */
538
+ emptyContent?: React$1.ReactNode;
539
+ /** Loading content */
540
+ loadingContent?: React$1.ReactNode;
541
+ /** Whether the table has sticky header */
542
+ stickyHeader?: boolean;
543
+ };
544
+ declare const Table: <T>(props: TableProps<T> & {
545
+ ref?: React$1.ForwardedRef<HTMLTableElement>;
546
+ }) => React$1.ReactElement;
547
+
413
548
  type ContainerProps = React$1.HTMLAttributes<HTMLDivElement> & {
414
549
  /**
415
550
  * Remove o padding horizontal lateral.
@@ -511,4 +646,4 @@ declare const NeutralIcon: (props: IconProps) => react_jsx_runtime.JSX.Element;
511
646
 
512
647
  declare const CloseIcon: (props: IconProps) => react_jsx_runtime.JSX.Element;
513
648
 
514
- export { Avatar, type AvatarProps, type AvatarSize, type AvatarVariant, Button, ButtonColor, type ButtonProps, type ButtonRadius, type ButtonSize, type ButtonVariant, Checkbox, type CheckboxProps, type CheckboxSize, CloseIcon, Container, type ContainerProps, DeleteIcon, EditIcon, ErrorIcon, GridContainer, type GridContainerProps, GridItem, type GridItemProps, type GridSpan, IconButton, type IconButtonColor, type IconButtonProps, type IconButtonRadius, type IconButtonSize, type IconButtonVariant, type IconProps, InfoIcon, type MobileSpan, NeutralIcon, PlusIcon, RehagroProvider, type RehagroProviderProps, type RehagroTheme, SearchIcon, Select, type SelectMultipleProps, type SelectOption, type SelectProps, type SelectRadius, type SelectSingleProps, type SelectSize, type SelectStatus, SuccessIcon, Tag, type TagProps, type TagSize, TextInput, type TextInputProps, type TextInputRadius, type TextInputSize, type TextInputStatus, Toast, type ToastAppearance, ToastContainer, type ToastFn, type ToastItem, type ToastLink, type ToastOptions, type ToastPosition, type ToastProps, ToastProvider, type ToastProviderProps, type ToastVariant, Tooltip, type TooltipPlacement, type TooltipProps, type TooltipSize, type TooltipVariant, WarningIcon, useToast };
649
+ export { Avatar, type AvatarProps, type AvatarSize, type AvatarVariant, Button, ButtonColor, type ButtonProps, type ButtonRadius, type ButtonSize, type ButtonVariant, Card, CardContent, type CardContentProps, CardFooter, type CardFooterProps, CardHeader, type CardHeaderProps, type CardPadding, type CardProps, type CardRadius, type CardVariant, Checkbox, type CheckboxProps, type CheckboxSize, CloseIcon, Container, type ContainerProps, DeleteIcon, EditIcon, ErrorIcon, GridContainer, type GridContainerProps, GridItem, type GridItemProps, type GridSpan, IconButton, type IconButtonColor, type IconButtonProps, type IconButtonRadius, type IconButtonSize, type IconButtonVariant, type IconProps, InfoIcon, type MobileSpan, NeutralIcon, PlusIcon, RehagroProvider, type RehagroProviderProps, type RehagroTheme, SearchIcon, Select, type SelectMultipleProps, type SelectOption, type SelectProps, type SelectRadius, type SelectSingleProps, type SelectSize, type SelectStatus, type SortDirection, Spinner, type SpinnerProps, type SpinnerSize, SuccessIcon, Table, type TableColumn, type TableProps, type TableSize, type TableSort, type TableVariant, Tag, type TagProps, type TagSize, TextInput, type TextInputProps, type TextInputRadius, type TextInputSize, type TextInputStatus, Toast, type ToastAppearance, ToastContainer, type ToastFn, type ToastItem, type ToastLink, type ToastOptions, type ToastPosition, type ToastProps, ToastProvider, type ToastProviderProps, type ToastVariant, ToggleGroup, type ToggleGroupOption, type ToggleGroupProps, type ToggleGroupRadius, type ToggleGroupSize, Tooltip, type TooltipPlacement, type TooltipProps, type TooltipSize, type TooltipVariant, WarningIcon, useToast };
package/dist/index.d.ts CHANGED
@@ -410,6 +410,141 @@ declare const Tag: React$1.ForwardRefExoticComponent<React$1.HTMLAttributes<HTML
410
410
  disabled?: boolean;
411
411
  } & React$1.RefAttributes<HTMLSpanElement>>;
412
412
 
413
+ type ToggleGroupSize = "sm" | "md" | "lg";
414
+ type ToggleGroupRadius = "none" | "xs" | "sm" | "md" | "lg" | "xl" | "full";
415
+ type ToggleGroupOption<T extends string = string> = {
416
+ /** Unique value for this option */
417
+ value: T;
418
+ /** Label text or icon to display */
419
+ label?: React$1.ReactNode;
420
+ /** Icon to display (alternative to label) */
421
+ icon?: React$1.ReactNode;
422
+ /** Accessible label for screen readers */
423
+ "aria-label"?: string;
424
+ /** Whether this option is disabled */
425
+ disabled?: boolean;
426
+ };
427
+ type ToggleGroupProps<T extends string = string> = Omit<React$1.HTMLAttributes<HTMLDivElement>, "onChange"> & {
428
+ /** Available options */
429
+ options: ToggleGroupOption<T>[];
430
+ /** Currently selected value */
431
+ value: T;
432
+ /** Called when selection changes */
433
+ onChange: (value: T) => void;
434
+ /** Size variant */
435
+ size?: ToggleGroupSize;
436
+ /** Border radius */
437
+ radius?: ToggleGroupRadius;
438
+ /** Color scheme for active state */
439
+ color?: PresetColor | (string & {});
440
+ /** Whether the entire group is disabled */
441
+ disabled?: boolean;
442
+ };
443
+ declare const ToggleGroup: <T extends string = string>(props: ToggleGroupProps<T> & {
444
+ ref?: React$1.ForwardedRef<HTMLDivElement>;
445
+ }) => React$1.ReactElement;
446
+
447
+ type CardVariant = "elevated" | "outlined" | "filled";
448
+ type CardRadius = "none" | "xs" | "sm" | "md" | "lg" | "xl";
449
+ type CardPadding = "none" | "sm" | "md" | "lg";
450
+ type CardProps = React$1.HTMLAttributes<HTMLDivElement> & {
451
+ /** Visual style variant */
452
+ variant?: CardVariant;
453
+ /** Border radius */
454
+ radius?: CardRadius;
455
+ /** Internal padding */
456
+ padding?: CardPadding;
457
+ /** Makes the card clickable with hover effects */
458
+ clickable?: boolean;
459
+ /** Disabled state (only applies when clickable) */
460
+ disabled?: boolean;
461
+ };
462
+ declare const Card: React$1.ForwardRefExoticComponent<React$1.HTMLAttributes<HTMLDivElement> & {
463
+ /** Visual style variant */
464
+ variant?: CardVariant;
465
+ /** Border radius */
466
+ radius?: CardRadius;
467
+ /** Internal padding */
468
+ padding?: CardPadding;
469
+ /** Makes the card clickable with hover effects */
470
+ clickable?: boolean;
471
+ /** Disabled state (only applies when clickable) */
472
+ disabled?: boolean;
473
+ } & React$1.RefAttributes<HTMLDivElement>>;
474
+ type CardHeaderProps = React$1.HTMLAttributes<HTMLDivElement>;
475
+ declare const CardHeader: React$1.ForwardRefExoticComponent<CardHeaderProps & React$1.RefAttributes<HTMLDivElement>>;
476
+ type CardContentProps = React$1.HTMLAttributes<HTMLDivElement>;
477
+ declare const CardContent: React$1.ForwardRefExoticComponent<CardContentProps & React$1.RefAttributes<HTMLDivElement>>;
478
+ type CardFooterProps = React$1.HTMLAttributes<HTMLDivElement>;
479
+ declare const CardFooter: React$1.ForwardRefExoticComponent<CardFooterProps & React$1.RefAttributes<HTMLDivElement>>;
480
+
481
+ type SpinnerSize = "xs" | "sm" | "md" | "lg" | "xl";
482
+ type SpinnerProps = React$1.HTMLAttributes<HTMLDivElement> & {
483
+ /** Spinner size */
484
+ size?: SpinnerSize;
485
+ /** Color scheme */
486
+ color?: PresetColor | (string & {});
487
+ /** Accessible label for screen readers */
488
+ label?: string;
489
+ };
490
+ declare const Spinner: React$1.ForwardRefExoticComponent<React$1.HTMLAttributes<HTMLDivElement> & {
491
+ /** Spinner size */
492
+ size?: SpinnerSize;
493
+ /** Color scheme */
494
+ color?: PresetColor | (string & {});
495
+ /** Accessible label for screen readers */
496
+ label?: string;
497
+ } & React$1.RefAttributes<HTMLDivElement>>;
498
+
499
+ type TableSize = "sm" | "md" | "lg";
500
+ type TableVariant = "default" | "striped";
501
+ type TableColumn<T> = {
502
+ /** Unique key for this column */
503
+ key: string;
504
+ /** Column header text */
505
+ header: React$1.ReactNode;
506
+ /** Function to render cell content */
507
+ render: (row: T, index: number) => React$1.ReactNode;
508
+ /** Column width (CSS value) */
509
+ width?: string;
510
+ /** Text alignment */
511
+ align?: "left" | "center" | "right";
512
+ /** Whether this column is sortable */
513
+ sortable?: boolean;
514
+ };
515
+ type SortDirection = "asc" | "desc" | null;
516
+ type TableSort = {
517
+ key: string;
518
+ direction: SortDirection;
519
+ };
520
+ type TableProps<T> = Omit<React$1.HTMLAttributes<HTMLTableElement>, "children"> & {
521
+ /** Column definitions */
522
+ columns: TableColumn<T>[];
523
+ /** Row data */
524
+ data: T[];
525
+ /** Function to get unique key for each row */
526
+ rowKey: (row: T, index: number) => string | number;
527
+ /** Table size variant */
528
+ size?: TableSize;
529
+ /** Table style variant */
530
+ variant?: TableVariant;
531
+ /** Current sort state */
532
+ sort?: TableSort;
533
+ /** Called when sort changes */
534
+ onSortChange?: (sort: TableSort) => void;
535
+ /** Whether to show loading state */
536
+ loading?: boolean;
537
+ /** Content to show when data is empty */
538
+ emptyContent?: React$1.ReactNode;
539
+ /** Loading content */
540
+ loadingContent?: React$1.ReactNode;
541
+ /** Whether the table has sticky header */
542
+ stickyHeader?: boolean;
543
+ };
544
+ declare const Table: <T>(props: TableProps<T> & {
545
+ ref?: React$1.ForwardedRef<HTMLTableElement>;
546
+ }) => React$1.ReactElement;
547
+
413
548
  type ContainerProps = React$1.HTMLAttributes<HTMLDivElement> & {
414
549
  /**
415
550
  * Remove o padding horizontal lateral.
@@ -511,4 +646,4 @@ declare const NeutralIcon: (props: IconProps) => react_jsx_runtime.JSX.Element;
511
646
 
512
647
  declare const CloseIcon: (props: IconProps) => react_jsx_runtime.JSX.Element;
513
648
 
514
- export { Avatar, type AvatarProps, type AvatarSize, type AvatarVariant, Button, ButtonColor, type ButtonProps, type ButtonRadius, type ButtonSize, type ButtonVariant, Checkbox, type CheckboxProps, type CheckboxSize, CloseIcon, Container, type ContainerProps, DeleteIcon, EditIcon, ErrorIcon, GridContainer, type GridContainerProps, GridItem, type GridItemProps, type GridSpan, IconButton, type IconButtonColor, type IconButtonProps, type IconButtonRadius, type IconButtonSize, type IconButtonVariant, type IconProps, InfoIcon, type MobileSpan, NeutralIcon, PlusIcon, RehagroProvider, type RehagroProviderProps, type RehagroTheme, SearchIcon, Select, type SelectMultipleProps, type SelectOption, type SelectProps, type SelectRadius, type SelectSingleProps, type SelectSize, type SelectStatus, SuccessIcon, Tag, type TagProps, type TagSize, TextInput, type TextInputProps, type TextInputRadius, type TextInputSize, type TextInputStatus, Toast, type ToastAppearance, ToastContainer, type ToastFn, type ToastItem, type ToastLink, type ToastOptions, type ToastPosition, type ToastProps, ToastProvider, type ToastProviderProps, type ToastVariant, Tooltip, type TooltipPlacement, type TooltipProps, type TooltipSize, type TooltipVariant, WarningIcon, useToast };
649
+ export { Avatar, type AvatarProps, type AvatarSize, type AvatarVariant, Button, ButtonColor, type ButtonProps, type ButtonRadius, type ButtonSize, type ButtonVariant, Card, CardContent, type CardContentProps, CardFooter, type CardFooterProps, CardHeader, type CardHeaderProps, type CardPadding, type CardProps, type CardRadius, type CardVariant, Checkbox, type CheckboxProps, type CheckboxSize, CloseIcon, Container, type ContainerProps, DeleteIcon, EditIcon, ErrorIcon, GridContainer, type GridContainerProps, GridItem, type GridItemProps, type GridSpan, IconButton, type IconButtonColor, type IconButtonProps, type IconButtonRadius, type IconButtonSize, type IconButtonVariant, type IconProps, InfoIcon, type MobileSpan, NeutralIcon, PlusIcon, RehagroProvider, type RehagroProviderProps, type RehagroTheme, SearchIcon, Select, type SelectMultipleProps, type SelectOption, type SelectProps, type SelectRadius, type SelectSingleProps, type SelectSize, type SelectStatus, type SortDirection, Spinner, type SpinnerProps, type SpinnerSize, SuccessIcon, Table, type TableColumn, type TableProps, type TableSize, type TableSort, type TableVariant, Tag, type TagProps, type TagSize, TextInput, type TextInputProps, type TextInputRadius, type TextInputSize, type TextInputStatus, Toast, type ToastAppearance, ToastContainer, type ToastFn, type ToastItem, type ToastLink, type ToastOptions, type ToastPosition, type ToastProps, ToastProvider, type ToastProviderProps, type ToastVariant, ToggleGroup, type ToggleGroupOption, type ToggleGroupProps, type ToggleGroupRadius, type ToggleGroupSize, Tooltip, type TooltipPlacement, type TooltipProps, type TooltipSize, type TooltipVariant, WarningIcon, useToast };