@rehagro/ui 1.0.13 → 1.0.14

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
@@ -633,6 +633,29 @@ declare const Table: <T>(props: TableProps<T> & {
633
633
  ref?: React$1.ForwardedRef<HTMLTableElement>;
634
634
  }) => React$1.ReactElement;
635
635
 
636
+ type TypographyVariant = "h1" | "h2" | "h3" | "h4" | "body" | "bodyLg" | "label" | "caption";
637
+ type TypographyColor = "default" | "muted" | "primary" | "danger" | "success" | "warning";
638
+ type TypographyProps = React$1.HTMLAttributes<HTMLElement> & {
639
+ /** Typographic variant */
640
+ variant?: TypographyVariant;
641
+ /** Color preset */
642
+ color?: TypographyColor;
643
+ /** Bold weight */
644
+ bold?: boolean;
645
+ /** Override the rendered HTML element */
646
+ as?: keyof JSX.IntrinsicElements;
647
+ };
648
+ declare const Typography: React$1.ForwardRefExoticComponent<React$1.HTMLAttributes<HTMLElement> & {
649
+ /** Typographic variant */
650
+ variant?: TypographyVariant;
651
+ /** Color preset */
652
+ color?: TypographyColor;
653
+ /** Bold weight */
654
+ bold?: boolean;
655
+ /** Override the rendered HTML element */
656
+ as?: keyof JSX.IntrinsicElements;
657
+ } & React$1.RefAttributes<HTMLElement>>;
658
+
636
659
  type ContainerProps = React$1.HTMLAttributes<HTMLDivElement> & {
637
660
  /**
638
661
  * Remove o padding horizontal lateral.
@@ -734,4 +757,4 @@ declare const NeutralIcon: (props: IconProps) => react_jsx_runtime.JSX.Element;
734
757
 
735
758
  declare const CloseIcon: (props: IconProps) => react_jsx_runtime.JSX.Element;
736
759
 
737
- 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, ProgressBar, type ProgressBarProps, type ProgressBarSize, 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, TagInput, type TagInputOption, type TagInputProps, type TagInputRadius, type TagInputSize, type TagInputStatus, 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 };
760
+ 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, ProgressBar, type ProgressBarProps, type ProgressBarSize, 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, TagInput, type TagInputOption, type TagInputProps, type TagInputRadius, type TagInputSize, type TagInputStatus, 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, Typography, type TypographyColor, type TypographyProps, type TypographyVariant, WarningIcon, useToast };
package/dist/index.d.ts CHANGED
@@ -633,6 +633,29 @@ declare const Table: <T>(props: TableProps<T> & {
633
633
  ref?: React$1.ForwardedRef<HTMLTableElement>;
634
634
  }) => React$1.ReactElement;
635
635
 
636
+ type TypographyVariant = "h1" | "h2" | "h3" | "h4" | "body" | "bodyLg" | "label" | "caption";
637
+ type TypographyColor = "default" | "muted" | "primary" | "danger" | "success" | "warning";
638
+ type TypographyProps = React$1.HTMLAttributes<HTMLElement> & {
639
+ /** Typographic variant */
640
+ variant?: TypographyVariant;
641
+ /** Color preset */
642
+ color?: TypographyColor;
643
+ /** Bold weight */
644
+ bold?: boolean;
645
+ /** Override the rendered HTML element */
646
+ as?: keyof JSX.IntrinsicElements;
647
+ };
648
+ declare const Typography: React$1.ForwardRefExoticComponent<React$1.HTMLAttributes<HTMLElement> & {
649
+ /** Typographic variant */
650
+ variant?: TypographyVariant;
651
+ /** Color preset */
652
+ color?: TypographyColor;
653
+ /** Bold weight */
654
+ bold?: boolean;
655
+ /** Override the rendered HTML element */
656
+ as?: keyof JSX.IntrinsicElements;
657
+ } & React$1.RefAttributes<HTMLElement>>;
658
+
636
659
  type ContainerProps = React$1.HTMLAttributes<HTMLDivElement> & {
637
660
  /**
638
661
  * Remove o padding horizontal lateral.
@@ -734,4 +757,4 @@ declare const NeutralIcon: (props: IconProps) => react_jsx_runtime.JSX.Element;
734
757
 
735
758
  declare const CloseIcon: (props: IconProps) => react_jsx_runtime.JSX.Element;
736
759
 
737
- 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, ProgressBar, type ProgressBarProps, type ProgressBarSize, 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, TagInput, type TagInputOption, type TagInputProps, type TagInputRadius, type TagInputSize, type TagInputStatus, 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 };
760
+ 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, ProgressBar, type ProgressBarProps, type ProgressBarSize, 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, TagInput, type TagInputOption, type TagInputProps, type TagInputRadius, type TagInputSize, type TagInputStatus, 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, Typography, type TypographyColor, type TypographyProps, type TypographyVariant, WarningIcon, useToast };
package/dist/index.js CHANGED
@@ -1898,7 +1898,7 @@ var Tag = React8.forwardRef(function Tag2({
1898
1898
  }, ref) {
1899
1899
  const preset = isPresetColor3(color);
1900
1900
  const clickable = !!rest.onClick && !disabled;
1901
- const colorClasses2 = preset ? active ? activePresetClasses[color] : inactivePresetClasses[color] : "";
1901
+ const colorClasses3 = preset ? active ? activePresetClasses[color] : inactivePresetClasses[color] : "";
1902
1902
  const hoverClasses = clickable && preset ? active ? hoverActivePresetClasses[color] : hoverInactivePresetClasses[color] : clickable ? "hover:rh-brightness-95" : "";
1903
1903
  const customStyles = preset ? {} : getCustomColorStyles(color, active);
1904
1904
  return /* @__PURE__ */ jsxRuntime.jsxs(
@@ -1916,7 +1916,7 @@ var Tag = React8.forwardRef(function Tag2({
1916
1916
  "rh-cursor-pointer",
1917
1917
  clickable ? "rh-cursor-pointer" : "",
1918
1918
  sizeClasses8[size],
1919
- colorClasses2,
1919
+ colorClasses3,
1920
1920
  hoverClasses,
1921
1921
  disabled ? "rh-opacity-50 rh-cursor-not-allowed rh-pointer-events-none" : "",
1922
1922
  className
@@ -2681,6 +2681,51 @@ function TableInner({
2681
2681
  ) });
2682
2682
  }
2683
2683
  var Table = React8.forwardRef(TableInner);
2684
+ var defaultElements = {
2685
+ h1: "h1",
2686
+ h2: "h2",
2687
+ h3: "h3",
2688
+ h4: "h4",
2689
+ bodyLg: "p",
2690
+ body: "p",
2691
+ label: "span",
2692
+ caption: "span"
2693
+ };
2694
+ var variantClasses4 = {
2695
+ h1: "rh-text-4xl rh-font-bold rh-leading-tight rh-font-display",
2696
+ h2: "rh-text-2xl rh-font-bold rh-leading-snug rh-font-display",
2697
+ h3: "rh-text-xl rh-font-semibold rh-leading-snug rh-font-display",
2698
+ h4: "rh-text-lg rh-font-semibold rh-leading-snug rh-font-display",
2699
+ bodyLg: "rh-text-base rh-font-normal rh-leading-normal rh-font-body",
2700
+ body: "rh-text-sm rh-font-normal rh-leading-normal rh-font-body",
2701
+ label: "rh-text-sm rh-font-medium rh-leading-normal rh-font-body",
2702
+ caption: "rh-text-xs rh-font-normal rh-leading-normal rh-font-body"
2703
+ };
2704
+ var colorClasses2 = {
2705
+ default: "rh-text-text",
2706
+ muted: "rh-text-text-muted",
2707
+ primary: "rh-text-primary",
2708
+ danger: "rh-text-danger",
2709
+ success: "rh-text-success",
2710
+ warning: "rh-text-warning"
2711
+ };
2712
+ var Typography = React8.forwardRef(function Typography2({ variant = "body", color = "default", bold = false, as, className = "", children, ...rest }, ref) {
2713
+ const element = as ?? defaultElements[variant];
2714
+ return React8__default.default.createElement(
2715
+ element,
2716
+ {
2717
+ ref,
2718
+ className: [
2719
+ variantClasses4[variant],
2720
+ colorClasses2[color],
2721
+ bold ? "rh-font-bold" : "",
2722
+ className
2723
+ ].filter(Boolean).join(" "),
2724
+ ...rest
2725
+ },
2726
+ children
2727
+ );
2728
+ });
2684
2729
  var Container = React8.forwardRef(
2685
2730
  function Container2({ fluid = false, className = "", children, ...rest }, ref) {
2686
2731
  return /* @__PURE__ */ jsxRuntime.jsx(
@@ -2883,6 +2928,7 @@ exports.ToastContainer = ToastContainer;
2883
2928
  exports.ToastProvider = ToastProvider;
2884
2929
  exports.ToggleGroup = ToggleGroup;
2885
2930
  exports.Tooltip = Tooltip;
2931
+ exports.Typography = Typography;
2886
2932
  exports.WarningIcon = WarningIcon;
2887
2933
  exports.useToast = useToast;
2888
2934
  //# sourceMappingURL=index.js.map