@nulogy/components 14.2.0 → 14.3.0
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/main.js +358 -118
- package/dist/main.module.js +363 -123
- package/dist/src/Card/Card.story.d.ts +1 -0
- package/dist/src/TruncatedText/MaybeTooltip.d.ts +4 -3
- package/dist/src/TruncatedText/TooltipContent.d.ts +7 -0
- package/dist/src/TruncatedText/TruncatedText.d.ts +1 -1
- package/dist/src/TruncatedText/components/MaybeTooltip.d.ts +14 -0
- package/dist/src/TruncatedText/components/TooltipComponents.d.ts +14 -0
- package/dist/src/TruncatedText/{TruncatedTextFillWidth.d.ts → components/TruncatedTextFillWidth.d.ts} +1 -1
- package/dist/src/TruncatedText/{TruncatedTextMaxCharacters.d.ts → components/TruncatedTextMaxCharacters.d.ts} +1 -1
- package/dist/src/TruncatedText/{TruncatedTextProps.d.ts → types.d.ts} +2 -2
- package/dist/src/utils/story/resizable.d.ts +2 -2
- package/package.json +2 -1
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import React from "react";
|
|
2
|
-
import
|
|
3
|
-
type MaybeTooltipProps =
|
|
2
|
+
import * as RadixTooltip from "@radix-ui/react-tooltip";
|
|
3
|
+
type MaybeTooltipProps = React.ComponentProps<typeof RadixTooltip.Root> & {
|
|
4
|
+
tooltip: React.ReactNode;
|
|
4
5
|
showTooltip?: boolean;
|
|
5
6
|
};
|
|
6
|
-
declare const MaybeTooltip: ({ children, showTooltip, ...
|
|
7
|
+
declare const MaybeTooltip: ({ children, tooltip, showTooltip, ...rest }: MaybeTooltipProps) => React.JSX.Element;
|
|
7
8
|
export default MaybeTooltip;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import * as RadixTooltip from "@radix-ui/react-tooltip";
|
|
3
|
+
type StyledTooltipContentProps = React.ComponentProps<typeof RadixTooltip.Content> & {
|
|
4
|
+
children: React.ReactNode;
|
|
5
|
+
};
|
|
6
|
+
declare const StyledTooltipContent: ({ children, ...props }: StyledTooltipContentProps) => React.JSX.Element;
|
|
7
|
+
export default StyledTooltipContent;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import React from "react";
|
|
2
|
-
import { TruncatedTextProps } from "./
|
|
2
|
+
import { TruncatedTextProps } from "./types";
|
|
3
3
|
declare const TruncatedText: ({ indicator, element, maxCharacters, fullWidth, showTooltip, "data-testid": dataTestId, children, ...props }: TruncatedTextProps) => React.JSX.Element;
|
|
4
4
|
export default TruncatedText;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import React, { PropsWithChildren } from "react";
|
|
2
|
+
import { MaxWidthProps } from "styled-system";
|
|
3
|
+
export type MaybeTooltipProps = PropsWithChildren<{
|
|
4
|
+
tooltip: React.ReactNode;
|
|
5
|
+
showTooltip?: boolean;
|
|
6
|
+
placement?: "top" | "bottom" | "left" | "right";
|
|
7
|
+
className?: string;
|
|
8
|
+
defaultOpen?: boolean;
|
|
9
|
+
showDelay?: number;
|
|
10
|
+
maxWidth?: MaxWidthProps["maxWidth"];
|
|
11
|
+
supportMobileTap?: boolean;
|
|
12
|
+
}>;
|
|
13
|
+
declare const MaybeTooltip: React.FC<MaybeTooltipProps>;
|
|
14
|
+
export default MaybeTooltip;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import * as TooltipPrimitive from "@radix-ui/react-tooltip";
|
|
3
|
+
import { MaxWidthProps } from "styled-system";
|
|
4
|
+
declare const TooltipProvider: React.FC<TooltipPrimitive.TooltipProviderProps>;
|
|
5
|
+
type TooltipProps = TooltipPrimitive.TooltipProps & {
|
|
6
|
+
supportMobileTap?: boolean;
|
|
7
|
+
};
|
|
8
|
+
declare const Tooltip: React.FC<TooltipProps>;
|
|
9
|
+
declare const TooltipTrigger: React.ForwardRefExoticComponent<Omit<TooltipPrimitive.TooltipTriggerProps & React.RefAttributes<HTMLButtonElement>, "ref"> & React.RefAttributes<HTMLButtonElement>>;
|
|
10
|
+
interface StyledTooltipContentProps extends React.ComponentPropsWithoutRef<typeof TooltipPrimitive.Content>, MaxWidthProps {
|
|
11
|
+
children?: React.ReactNode;
|
|
12
|
+
}
|
|
13
|
+
declare const TooltipContent: React.ForwardRefExoticComponent<StyledTooltipContentProps & React.RefAttributes<HTMLDivElement>>;
|
|
14
|
+
export { Tooltip, TooltipContent, TooltipProvider, TooltipTrigger };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import React from "react";
|
|
2
|
-
import { TruncatedTextProps } from "
|
|
2
|
+
import { TruncatedTextProps } from "../types";
|
|
3
3
|
declare const TruncatedTextFillWidth: ({ element, showTooltip, tooltipProps, children, "data-testid": testId, ...props }: TruncatedTextProps) => React.JSX.Element;
|
|
4
4
|
export default TruncatedTextFillWidth;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import React from "react";
|
|
2
|
-
import { TruncatedTextProps } from "
|
|
2
|
+
import { TruncatedTextProps } from "../types";
|
|
3
3
|
declare const TruncatedTextMaxCharacters: ({ children, element, indicator, maxCharacters, showTooltip, tooltipProps, "data-testid": testId, ...props }: TruncatedTextProps) => React.JSX.Element;
|
|
4
4
|
export default TruncatedTextMaxCharacters;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { ReactElement } from "react";
|
|
2
|
-
import { TooltipProps } from "../Tooltip/Tooltip";
|
|
3
2
|
import { TextProps } from "../Type";
|
|
3
|
+
import { MaybeTooltipProps } from "./components/MaybeTooltip";
|
|
4
4
|
export interface TruncatedTextProps extends TextProps {
|
|
5
5
|
children?: string;
|
|
6
6
|
indicator?: string;
|
|
@@ -9,5 +9,5 @@ export interface TruncatedTextProps extends TextProps {
|
|
|
9
9
|
showTooltip?: boolean;
|
|
10
10
|
fullWidth?: boolean;
|
|
11
11
|
"data-testid"?: string;
|
|
12
|
-
tooltipProps?:
|
|
12
|
+
tooltipProps?: MaybeTooltipProps;
|
|
13
13
|
}
|
|
@@ -6,14 +6,14 @@ interface ResizableProps {
|
|
|
6
6
|
showContainerOutline?: boolean;
|
|
7
7
|
}
|
|
8
8
|
export declare const Resizable: ({ children, containerWidth, onResize, showContainerOutline, }: ResizableProps) => React.JSX.Element;
|
|
9
|
-
export declare const WidthText: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<Omit<import("styled-components").FastOmit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLParagraphElement>, HTMLParagraphElement>, "
|
|
9
|
+
export declare const WidthText: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<Omit<import("styled-components").FastOmit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLParagraphElement>, HTMLParagraphElement>, "disabled" | "inline" | "compact" | keyof React.HTMLAttributes<HTMLParagraphElement> | keyof import("../..").StyledProps | "textTransform"> & React.HTMLAttributes<HTMLParagraphElement> & {
|
|
10
10
|
variant?: import("../../NDSProvider/ComponentVariantContext").ComponentVariant;
|
|
11
11
|
inline?: boolean;
|
|
12
12
|
compact?: boolean;
|
|
13
13
|
disabled?: boolean;
|
|
14
14
|
textTransform?: "-moz-initial" | "inherit" | "initial" | "revert" | "unset" | "none" | "full-width" | "capitalize" | "full-size-kana" | "lowercase" | "uppercase";
|
|
15
15
|
fontSize?: string;
|
|
16
|
-
} & import("../..").StyledProps & import("framer-motion").MotionProps, "ref"> & React.RefAttributes<HTMLElement | SVGElement>, never>> & string & Omit<import("framer-motion").CustomDomComponent<import("styled-components").FastOmit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLParagraphElement>, HTMLParagraphElement>, "
|
|
16
|
+
} & import("../..").StyledProps & import("framer-motion").MotionProps, "ref"> & React.RefAttributes<HTMLElement | SVGElement>, never>> & string & Omit<import("framer-motion").CustomDomComponent<import("styled-components").FastOmit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLParagraphElement>, HTMLParagraphElement>, "disabled" | "inline" | "compact" | keyof React.HTMLAttributes<HTMLParagraphElement> | keyof import("../..").StyledProps | "textTransform"> & React.HTMLAttributes<HTMLParagraphElement> & {
|
|
17
17
|
variant?: import("../../NDSProvider/ComponentVariantContext").ComponentVariant;
|
|
18
18
|
inline?: boolean;
|
|
19
19
|
compact?: boolean;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nulogy/components",
|
|
3
|
-
"version": "14.
|
|
3
|
+
"version": "14.3.0",
|
|
4
4
|
"description": "Component library for the Nulogy Design System - http://nulogy.design",
|
|
5
5
|
"private": false,
|
|
6
6
|
"publishConfig": {
|
|
@@ -114,6 +114,7 @@
|
|
|
114
114
|
"cypress": "^13.2.0",
|
|
115
115
|
"cypress-enter-plugin": "^1.0.1",
|
|
116
116
|
"cypress-plugin-tab": "^1.0.1",
|
|
117
|
+
"cypress-real-events": "^1.14.0",
|
|
117
118
|
"enzyme": "3.11.0",
|
|
118
119
|
"enzyme-to-json": "3.4.4",
|
|
119
120
|
"eslint": "6.8.0",
|