@povio/ui 2.1.26 → 2.1.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/Button.js CHANGED
@@ -34,7 +34,7 @@ const Button$1 = ({ icon: Icon, iconPosition, children, isLoading, className, li
34
34
  children: /* @__PURE__ */ jsx(ButtonContent, {
35
35
  isLoading,
36
36
  icon: Icon,
37
- text: children,
37
+ content: children,
38
38
  ref: onContentRef,
39
39
  hideText: props.iconOnly,
40
40
  iconPosition,
@@ -4,7 +4,7 @@ import { Typography } from "./Typography.js";
4
4
  import { jsx, jsxs } from "react/jsx-runtime";
5
5
  import { clsx } from "clsx";
6
6
  import { isValidElement } from "react";
7
- const ButtonContent = ({ ref, text, isLoading, className, icon: Icon, iconClassName, hideText, iconPosition, typography }) => {
7
+ const ButtonContent = ({ ref, content, isLoading, className, icon: Icon, iconClassName, hideText, iconPosition, typography }) => {
8
8
  let iconOrLoader = null;
9
9
  if (isLoading) iconOrLoader = /* @__PURE__ */ jsx(Loader, { className: "shrink-0" });
10
10
  else if (Icon) if (isValidElement(Icon)) iconOrLoader = Icon;
@@ -21,7 +21,7 @@ const ButtonContent = ({ ref, text, isLoading, className, icon: Icon, iconClassN
21
21
  ...typography,
22
22
  className: clsx("hyphens-auto md:truncate", hideText && "sr-only"),
23
23
  ref,
24
- children: text
24
+ children: content
25
25
  })]
26
26
  });
27
27
  };
@@ -23,7 +23,7 @@ const PillButton = ({ children, dismissable, toggle, icon, iconPosition,...props
23
23
  className: props.className
24
24
  }),
25
25
  children: /* @__PURE__ */ jsx(ButtonContent, {
26
- text: children,
26
+ content: children,
27
27
  ref: onContentRef,
28
28
  icon: dismissable ? CloseIcon : icon,
29
29
  iconPosition: dismissable ? "right" : iconPosition,
@@ -1,4 +1,4 @@
1
- import { FC, ReactElement, SVGProps } from 'react';
1
+ import { FC, ReactElement, ReactNode, SVGProps } from 'react';
2
2
  import { ButtonProps as AriaButtonProps, ToggleButtonProps as AriaToggleButtonProps } from 'react-aria-components';
3
3
  import { ButtonContentVariantProps } from '../shared/buttonContent.cva';
4
4
  import { LinkNavigationProps } from '../../text/Link/Link';
@@ -17,7 +17,7 @@ type ToggleButtonProps = {
17
17
  isSelected?: boolean;
18
18
  } & AriaToggleButtonProps);
19
19
  export type ButtonProps<IconOnly extends boolean = false> = ButtonVariantProps & ButtonContentVariantProps & AriaButtonProps & ButtonIconProps<IconOnly> & ToggleButtonProps & {
20
- children: string;
20
+ children: ReactNode;
21
21
  isLoading?: boolean;
22
22
  link?: LinkNavigationProps;
23
23
  noDisableWhenLoading?: boolean;
@@ -1,9 +1,9 @@
1
- import { FC, SVGProps } from 'react';
1
+ import { FC, ReactNode, SVGProps } from 'react';
2
2
  import { ButtonProps as AriaButtonProps, ToggleButtonProps as AriaToggleButtonProps } from 'react-aria-components';
3
3
  import { PillButtonVariants } from './pillButton.cva';
4
4
  import { ButtonContentVariantProps } from '../shared/buttonContent.cva';
5
5
  export interface PillButtonProps extends AriaButtonProps, Omit<AriaToggleButtonProps, keyof AriaButtonProps>, ButtonContentVariantProps, PillButtonVariants {
6
- children: string;
6
+ children: ReactNode;
7
7
  dismissable?: boolean;
8
8
  toggle?: boolean;
9
9
  icon?: FC<SVGProps<SVGSVGElement>>;
@@ -1,10 +1,11 @@
1
+ import { ReactNode } from 'react';
1
2
  import { ButtonProps as AriaButtonProps } from 'react-aria-components';
2
3
  import { ButtonIconProps } from '../Button/Button';
3
4
  import { ButtonVariantProps } from '../Button/button.cva';
4
5
  import { ButtonContentVariantProps } from '../shared/buttonContent.cva';
5
6
  import { LinkNavigationProps } from '../../text/Link/Link';
6
7
  export type TextButtonProps = Omit<ButtonVariantProps, "variant"> & ButtonContentVariantProps & AriaButtonProps & ButtonIconProps<true | false> & {
7
- children: string;
8
+ children: ReactNode;
8
9
  isLoading?: boolean;
9
10
  link?: LinkNavigationProps;
10
11
  disableTooltip?: boolean;
@@ -1,9 +1,10 @@
1
+ import { ReactNode } from 'react';
1
2
  import { ToggleButtonProps as AriaToggleButtonProps } from 'react-aria-components';
2
3
  import { ButtonIconProps } from '../Button/Button';
3
4
  import { ButtonVariantProps } from '../Button/button.cva';
4
5
  import { ButtonContentVariantProps } from '../shared/buttonContent.cva';
5
6
  export type ToggleButtonProps = ButtonVariantProps & ButtonContentVariantProps & AriaToggleButtonProps & ButtonIconProps<true | false> & {
6
- children: string;
7
+ children: ReactNode;
7
8
  disableTooltip?: boolean;
8
9
  };
9
10
  export declare const ToggleButton: ({ children, ...props }: ToggleButtonProps) => import("react/jsx-runtime").JSX.Element;
@@ -1,10 +1,10 @@
1
- import { FC, ReactElement, Ref, SVGProps } from 'react';
1
+ import { FC, ReactElement, ReactNode, Ref, SVGProps } from 'react';
2
2
  import { ButtonVariantProps } from '../Button/button.cva';
3
3
  import { ButtonContentVariantProps } from './buttonContent.cva';
4
4
  import { TypographyVariantProps } from '../../text/Typography/typography.cva';
5
5
  interface ButtonContentProps extends ButtonContentVariantProps, Pick<ButtonVariantProps, "size"> {
6
6
  ref?: Ref<HTMLHeadingElement>;
7
- text: string;
7
+ content: ReactNode;
8
8
  isLoading?: boolean;
9
9
  className?: string;
10
10
  icon?: FC<SVGProps<SVGSVGElement>> | ReactElement;
@@ -12,5 +12,5 @@ interface ButtonContentProps extends ButtonContentVariantProps, Pick<ButtonVaria
12
12
  hideText?: boolean;
13
13
  typography?: TypographyVariantProps;
14
14
  }
15
- export declare const ButtonContent: ({ ref, text, isLoading, className, icon: Icon, iconClassName, hideText, iconPosition, typography, }: ButtonContentProps) => import("react/jsx-runtime").JSX.Element;
15
+ export declare const ButtonContent: ({ ref, content, isLoading, className, icon: Icon, iconClassName, hideText, iconPosition, typography, }: ButtonContentProps) => import("react/jsx-runtime").JSX.Element;
16
16
  export {};
@@ -1,6 +1,6 @@
1
- import { JSX, Ref } from 'react';
1
+ import { JSX, ReactNode, Ref } from 'react';
2
2
  export interface TooltipEllipsisProps {
3
- text: string;
3
+ text: ReactNode;
4
4
  children: (ref: Ref<HTMLHeadingElement> | undefined) => JSX.Element;
5
5
  isDisabled?: boolean;
6
6
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@povio/ui",
3
- "version": "2.1.26",
3
+ "version": "2.1.27",
4
4
  "type": "module",
5
5
  "module": "dist/index.js",
6
6
  "types": "dist/index.d.ts",