@moderneinc/neo-styled-components 5.0.0-next.12a890 → 5.0.0-next.17550d
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/Tooltip/Tooltip.d.ts +8 -5
- package/dist/index.d.ts +7 -5
- package/dist/index.esm.js +2 -2
- package/dist/index.esm.js.map +1 -1
- package/dist/index.js +2 -2
- package/dist/index.js.map +1 -1
- package/package.json +3 -3
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { type TooltipProps } from '@mui/material/Tooltip';
|
|
2
|
+
import type { ReactNode } from 'react';
|
|
2
3
|
/**
|
|
3
4
|
* Variant type for NeoTooltip
|
|
4
5
|
*/
|
|
@@ -14,13 +15,15 @@ export interface NeoTooltipProps extends Omit<TooltipProps, 'title' | 'variant'>
|
|
|
14
15
|
*/
|
|
15
16
|
variant?: TooltipVariant;
|
|
16
17
|
/**
|
|
17
|
-
* The main tooltip
|
|
18
|
+
* The main tooltip content. Accepts a string or any ReactNode, so callers can
|
|
19
|
+
* compose richer content when the `description` variant isn't enough.
|
|
18
20
|
* @figma text (literal content, not a variant property)
|
|
19
21
|
*/
|
|
20
|
-
title:
|
|
22
|
+
title: ReactNode;
|
|
21
23
|
/**
|
|
22
|
-
* Optional supporting description text
|
|
23
|
-
*
|
|
24
|
+
* Optional supporting description text. When provided, shows a larger tooltip
|
|
25
|
+
* with a heading + body hierarchy: title (13px semibold) above a muted
|
|
26
|
+
* description (12px medium).
|
|
24
27
|
* @default undefined
|
|
25
28
|
* @figma Supporting text
|
|
26
29
|
*/
|
|
@@ -45,7 +48,7 @@ export interface NeoTooltipProps extends Omit<TooltipProps, 'title' | 'variant'>
|
|
|
45
48
|
* - Dark: grey[50] (#f9fafb), grey[800] (#1f2937)
|
|
46
49
|
* - Brand: digitalBlue[800] (#131e7a), typography.tooltip (#ffffff)
|
|
47
50
|
* - Shadow: neutralMedium (0px 8px 15px 0px rgba(31,41,55,0.1))
|
|
48
|
-
* - Typography: fontSize.xs (12), fontWeight.medium (500), fontWeight.semiBold (600)
|
|
51
|
+
* - Typography: fontSize.xs (12), fontSize.caption (13), fontWeight.medium (500), fontWeight.semiBold (600)
|
|
49
52
|
*/
|
|
50
53
|
export declare const NeoTooltip: {
|
|
51
54
|
({ variant, title, description, children, arrow, placement, ...props }: NeoTooltipProps): import("react/jsx-runtime").JSX.Element;
|
package/dist/index.d.ts
CHANGED
|
@@ -3053,13 +3053,15 @@ interface NeoTooltipProps extends Omit<TooltipProps, 'title' | 'variant'> {
|
|
|
3053
3053
|
*/
|
|
3054
3054
|
variant?: TooltipVariant;
|
|
3055
3055
|
/**
|
|
3056
|
-
* The main tooltip
|
|
3056
|
+
* The main tooltip content. Accepts a string or any ReactNode, so callers can
|
|
3057
|
+
* compose richer content when the `description` variant isn't enough.
|
|
3057
3058
|
* @figma text (literal content, not a variant property)
|
|
3058
3059
|
*/
|
|
3059
|
-
title:
|
|
3060
|
+
title: ReactNode;
|
|
3060
3061
|
/**
|
|
3061
|
-
* Optional supporting description text
|
|
3062
|
-
*
|
|
3062
|
+
* Optional supporting description text. When provided, shows a larger tooltip
|
|
3063
|
+
* with a heading + body hierarchy: title (13px semibold) above a muted
|
|
3064
|
+
* description (12px medium).
|
|
3063
3065
|
* @default undefined
|
|
3064
3066
|
* @figma Supporting text
|
|
3065
3067
|
*/
|
|
@@ -3084,7 +3086,7 @@ interface NeoTooltipProps extends Omit<TooltipProps, 'title' | 'variant'> {
|
|
|
3084
3086
|
* - Dark: grey[50] (#f9fafb), grey[800] (#1f2937)
|
|
3085
3087
|
* - Brand: digitalBlue[800] (#131e7a), typography.tooltip (#ffffff)
|
|
3086
3088
|
* - Shadow: neutralMedium (0px 8px 15px 0px rgba(31,41,55,0.1))
|
|
3087
|
-
* - Typography: fontSize.xs (12), fontWeight.medium (500), fontWeight.semiBold (600)
|
|
3089
|
+
* - Typography: fontSize.xs (12), fontSize.caption (13), fontWeight.medium (500), fontWeight.semiBold (600)
|
|
3088
3090
|
*/
|
|
3089
3091
|
declare const NeoTooltip: {
|
|
3090
3092
|
({ variant, title, description, children, arrow, placement, ...props }: NeoTooltipProps): react_jsx_runtime.JSX.Element;
|
package/dist/index.esm.js
CHANGED
|
@@ -6933,13 +6933,13 @@ const StyledTooltip = styled(Tooltip, {
|
|
|
6933
6933
|
* - Dark: grey[50] (#f9fafb), grey[800] (#1f2937)
|
|
6934
6934
|
* - Brand: digitalBlue[800] (#131e7a), typography.tooltip (#ffffff)
|
|
6935
6935
|
* - Shadow: neutralMedium (0px 8px 15px 0px rgba(31,41,55,0.1))
|
|
6936
|
-
* - Typography: fontSize.xs (12), fontWeight.medium (500), fontWeight.semiBold (600)
|
|
6936
|
+
* - Typography: fontSize.xs (12), fontSize.caption (13), fontWeight.medium (500), fontWeight.semiBold (600)
|
|
6937
6937
|
*/
|
|
6938
6938
|
const NeoTooltip = ({ variant = 'light', title, description, children, arrow = false, placement, ...props }) => {
|
|
6939
6939
|
// Build the title content
|
|
6940
6940
|
// If description is provided, create a structured layout with title + description
|
|
6941
6941
|
// Otherwise, just show the title text
|
|
6942
|
-
const titleContent = description ? (jsxs(Stack, { gap: 0.
|
|
6942
|
+
const titleContent = description ? (jsxs(Stack, { gap: 0.5, children: [jsx(Typography, { fontSize: typography.fontSize.caption, fontWeight: typography.fontWeight.semiBold, children: title }), jsx(Typography, { fontSize: typography.fontSize.xs, fontWeight: typography.fontWeight.medium, sx: { opacity: 0.75 }, children: description })] })) : (title);
|
|
6943
6943
|
return (jsx(StyledTooltip, { variant: variant, description: description, title: titleContent, arrow: arrow, placement: placement, ...props, children: children }));
|
|
6944
6944
|
};
|
|
6945
6945
|
NeoTooltip.displayName = 'NeoTooltip';
|