@kaizen/components 3.1.5 → 3.1.6
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.
|
@@ -61,9 +61,13 @@ var renderInitials = function (fullName, alt, size, disableInitials) {
|
|
|
61
61
|
title: alt
|
|
62
62
|
}, isLongName ?
|
|
63
63
|
// Only called if 3 or more initials, fits text width for long names
|
|
64
|
+
//
|
|
65
|
+
// Ignore Chromatic diffs since the font-size calculation has shown itself to be slightly non-deterministic,
|
|
66
|
+
// causing flaky tests.
|
|
64
67
|
React__default.default.createElement(reactTextfit.Textfit, {
|
|
65
68
|
mode: "single",
|
|
66
|
-
max: getMaxFontSizePixels(size)
|
|
69
|
+
max: getMaxFontSizePixels(size),
|
|
70
|
+
"data-chromatic": "ignore"
|
|
67
71
|
}, initials) : getInitials(fullName, size === 'small'));
|
|
68
72
|
};
|
|
69
73
|
/**
|
|
@@ -53,9 +53,13 @@ var renderInitials = function (fullName, alt, size, disableInitials) {
|
|
|
53
53
|
}, isLongName ? (
|
|
54
54
|
/*#__PURE__*/
|
|
55
55
|
// Only called if 3 or more initials, fits text width for long names
|
|
56
|
+
//
|
|
57
|
+
// Ignore Chromatic diffs since the font-size calculation has shown itself to be slightly non-deterministic,
|
|
58
|
+
// causing flaky tests.
|
|
56
59
|
React.createElement(Textfit, {
|
|
57
60
|
mode: "single",
|
|
58
|
-
max: getMaxFontSizePixels(size)
|
|
61
|
+
max: getMaxFontSizePixels(size),
|
|
62
|
+
"data-chromatic": "ignore"
|
|
59
63
|
}, initials)) : getInitials(fullName, size === 'small')));
|
|
60
64
|
};
|
|
61
65
|
/**
|
package/package.json
CHANGED
package/src/Avatar/Avatar.tsx
CHANGED
|
@@ -97,7 +97,10 @@ const renderInitials = (
|
|
|
97
97
|
<abbr className={classnames(styles.initials, isLongName && styles.longName)} title={alt}>
|
|
98
98
|
{isLongName ? (
|
|
99
99
|
// Only called if 3 or more initials, fits text width for long names
|
|
100
|
-
|
|
100
|
+
//
|
|
101
|
+
// Ignore Chromatic diffs since the font-size calculation has shown itself to be slightly non-deterministic,
|
|
102
|
+
// causing flaky tests.
|
|
103
|
+
<Textfit mode="single" max={getMaxFontSizePixels(size)} data-chromatic="ignore">
|
|
101
104
|
{initials}
|
|
102
105
|
</Textfit>
|
|
103
106
|
) : (
|