@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
|
@@ -1824,8 +1824,12 @@ function isColorTypographyColor(colorName) {
|
|
|
1824
1824
|
}
|
|
1825
1825
|
function getTypographyColorValue(colorName) {
|
|
1826
1826
|
if (!colorName) return undefined;
|
|
1827
|
-
if (
|
|
1828
|
-
|
|
1827
|
+
if (typeof colorName === 'string') {
|
|
1828
|
+
if (isColorTypographyColor(colorName)) {
|
|
1829
|
+
return getNBThemeColorFromColorProps(colorName);
|
|
1830
|
+
}
|
|
1831
|
+
} else if (typeof colorName === 'object') {
|
|
1832
|
+
return Object.fromEntries(Object.entries(colorName).map(([breakpointName, value]) => [breakpointName, getTypographyColorValue(value)]));
|
|
1829
1833
|
}
|
|
1830
1834
|
return colorName;
|
|
1831
1835
|
}
|
|
@@ -1900,9 +1904,10 @@ function Typography({
|
|
|
1900
1904
|
base: baseOrDefaultToBody
|
|
1901
1905
|
});
|
|
1902
1906
|
const currentColor = !color && !hasTypographyAncestor ? defaultColor : color;
|
|
1907
|
+
const currentColorValue = getTypographyColorValue(currentColor);
|
|
1903
1908
|
const colorStyles = sx({
|
|
1904
|
-
color:
|
|
1905
|
-
textDecorationColor:
|
|
1909
|
+
color: currentColorValue,
|
|
1910
|
+
textDecorationColor: currentColorValue
|
|
1906
1911
|
});
|
|
1907
1912
|
if (process.env.NODE_ENV !== 'production') {
|
|
1908
1913
|
Object.entries(type).forEach(([key, value]) => {
|