@ornikar/kitt-universal 16.4.2 → 16.5.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/definitions/typography/Typography.d.ts.map +1 -1
- package/dist/definitions/typography/utils/getTypographyColorValue.d.ts.map +1 -1
- package/dist/index-browser-all.es.android.js +15 -5
- package/dist/index-browser-all.es.android.js.map +1 -1
- package/dist/index-browser-all.es.ios.js +15 -5
- package/dist/index-browser-all.es.ios.js.map +1 -1
- package/dist/index-browser-all.es.js +15 -5
- package/dist/index-browser-all.es.js.map +1 -1
- package/dist/index-browser-all.es.web.js +15 -5
- package/dist/index-browser-all.es.web.js.map +1 -1
- package/dist/index-node-14.17.cjs.js +9 -4
- package/dist/index-node-14.17.cjs.js.map +1 -1
- package/dist/index-node-14.17.cjs.web.js +9 -4
- package/dist/index-node-14.17.cjs.web.js.map +1 -1
- package/dist/tsbuildinfo +1 -1
- package/package.json +2 -2
|
@@ -1852,8 +1852,12 @@ function isColorTypographyColor(colorName) {
|
|
|
1852
1852
|
}
|
|
1853
1853
|
function getTypographyColorValue(colorName) {
|
|
1854
1854
|
if (!colorName) return undefined;
|
|
1855
|
-
if (
|
|
1856
|
-
|
|
1855
|
+
if (typeof colorName === 'string') {
|
|
1856
|
+
if (isColorTypographyColor(colorName)) {
|
|
1857
|
+
return getNBThemeColorFromColorProps(colorName);
|
|
1858
|
+
}
|
|
1859
|
+
} else if (typeof colorName === 'object') {
|
|
1860
|
+
return Object.fromEntries(Object.entries(colorName).map(([breakpointName, value]) => [breakpointName, getTypographyColorValue(value)]));
|
|
1857
1861
|
}
|
|
1858
1862
|
return colorName;
|
|
1859
1863
|
}
|
|
@@ -1928,9 +1932,10 @@ function Typography({
|
|
|
1928
1932
|
base: baseOrDefaultToBody
|
|
1929
1933
|
});
|
|
1930
1934
|
const currentColor = !color && !hasTypographyAncestor ? defaultColor : color;
|
|
1935
|
+
const currentColorValue = getTypographyColorValue(currentColor);
|
|
1931
1936
|
const colorStyles = sx({
|
|
1932
|
-
color:
|
|
1933
|
-
textDecorationColor:
|
|
1937
|
+
color: currentColorValue,
|
|
1938
|
+
textDecorationColor: currentColorValue
|
|
1934
1939
|
});
|
|
1935
1940
|
if (process.env.NODE_ENV !== 'production') {
|
|
1936
1941
|
Object.entries(type).forEach(([key, value]) => {
|