@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
|
@@ -7,6 +7,7 @@ import _objectWithoutProperties from '@babel/runtime/helpers/objectWithoutProper
|
|
|
7
7
|
import _objectDestructuringEmpty from '@babel/runtime/helpers/objectDestructuringEmpty';
|
|
8
8
|
import _extends from '@babel/runtime/helpers/extends';
|
|
9
9
|
import _slicedToArray from '@babel/runtime/helpers/slicedToArray';
|
|
10
|
+
import _typeof from '@babel/runtime/helpers/typeof';
|
|
10
11
|
import _regeneratorRuntime from '@babel/runtime/helpers/regeneratorRuntime';
|
|
11
12
|
import _asyncToGenerator from '@babel/runtime/helpers/asyncToGenerator';
|
|
12
13
|
import { ArcIcon, UserIcon, ArrowUpIcon, ArrowDownIcon, CheckboxMark, MapPinIcon, EyeOffIcon, EyeIcon, InfoIcon, AlertTriangleIcon, CheckIcon, AlertCircleIcon, XIcon, RotateCCWIcon, TooltipArrowIcon } from '@ornikar/kitt-icons';
|
|
@@ -16,7 +17,6 @@ import { CSSTransition } from 'react-transition-group';
|
|
|
16
17
|
import { ScrollView as ScrollView$2, View as View$2, Linking, Pressable as Pressable$2, useWindowDimensions } from 'react-native';
|
|
17
18
|
export { useWindowDimensions as useWindowSize } from 'react-native';
|
|
18
19
|
import { parse } from 'twemoji-parser';
|
|
19
|
-
import _typeof from '@babel/runtime/helpers/typeof';
|
|
20
20
|
import Downshift, { useSelect } from 'downshift';
|
|
21
21
|
import { useDebouncedCallback } from 'use-debounce';
|
|
22
22
|
import { Loader } from '@googlemaps/js-api-loader';
|
|
@@ -1862,8 +1862,17 @@ function isColorTypographyColor(colorName) {
|
|
|
1862
1862
|
}
|
|
1863
1863
|
function getTypographyColorValue(colorName) {
|
|
1864
1864
|
if (!colorName) return undefined;
|
|
1865
|
-
if (
|
|
1866
|
-
|
|
1865
|
+
if (typeof colorName === 'string') {
|
|
1866
|
+
if (isColorTypographyColor(colorName)) {
|
|
1867
|
+
return getNBThemeColorFromColorProps(colorName);
|
|
1868
|
+
}
|
|
1869
|
+
} else if (_typeof(colorName) === 'object') {
|
|
1870
|
+
return Object.fromEntries(Object.entries(colorName).map(function (_ref) {
|
|
1871
|
+
var _ref2 = _slicedToArray(_ref, 2),
|
|
1872
|
+
breakpointName = _ref2[0],
|
|
1873
|
+
value = _ref2[1];
|
|
1874
|
+
return [breakpointName, getTypographyColorValue(value)];
|
|
1875
|
+
}));
|
|
1867
1876
|
}
|
|
1868
1877
|
return colorName;
|
|
1869
1878
|
}
|
|
@@ -1940,9 +1949,10 @@ function Typography(_ref) {
|
|
|
1940
1949
|
base: baseOrDefaultToBody
|
|
1941
1950
|
}));
|
|
1942
1951
|
var currentColor = !color && !hasTypographyAncestor ? defaultColor : color;
|
|
1952
|
+
var currentColorValue = getTypographyColorValue(currentColor);
|
|
1943
1953
|
var colorStyles = sx({
|
|
1944
|
-
color:
|
|
1945
|
-
textDecorationColor:
|
|
1954
|
+
color: currentColorValue,
|
|
1955
|
+
textDecorationColor: currentColorValue
|
|
1946
1956
|
});
|
|
1947
1957
|
if (process.env.NODE_ENV !== 'production') {
|
|
1948
1958
|
Object.entries(type).forEach(function (_ref2) {
|