@ornikar/kitt-universal 3.6.0 → 3.7.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/Button/AnimatedButtonPressable.web.d.ts +2 -2
- package/dist/definitions/Button/AnimatedButtonPressable.web.d.ts.map +1 -1
- package/dist/definitions/IconButton/PressableIconButton.d.ts.map +1 -1
- package/dist/definitions/themes/default.d.ts +21 -21
- package/dist/definitions/themes/default.d.ts.map +1 -1
- package/dist/definitions/useKittTheme.d.ts +0 -2
- package/dist/definitions/useKittTheme.d.ts.map +1 -1
- package/dist/definitions/utils/withTheme.d.ts +2 -2
- package/dist/definitions/utils/withTheme.d.ts.map +1 -1
- package/dist/index-browser-all.es.android.js +8 -6
- package/dist/index-browser-all.es.android.js.map +1 -1
- package/dist/index-browser-all.es.css +1 -1
- package/dist/index-browser-all.es.ios.js +8 -6
- package/dist/index-browser-all.es.ios.js.map +1 -1
- package/dist/index-browser-all.es.js +25 -27
- package/dist/index-browser-all.es.js.map +1 -1
- package/dist/index-browser-all.es.web.js +69 -75
- package/dist/index-browser-all.es.web.js.map +1 -1
- package/dist/index-node-14.17.cjs.css +1 -1
- package/dist/index-node-14.17.cjs.js +8 -9
- package/dist/index-node-14.17.cjs.js.map +1 -1
- package/dist/index-node-14.17.cjs.web.css +2 -2
- package/dist/index-node-14.17.cjs.web.js +42 -46
- package/dist/index-node-14.17.cjs.web.js.map +1 -1
- package/dist/styles.css +2 -2
- package/dist/tsbuildinfo +1 -1
- package/package.json +2 -2
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
.ssn8o83{display:-webkit-inline-box;display:-webkit-inline-flex;display:-ms-inline-flexbox;display:inline-flex;}.ssn8o83 > svg{-webkit-animation:spin-ssn8o83 1.1s infinite linear;animation:spin-ssn8o83 1.1s infinite linear;}@-webkit-keyframes spin-ssn8o83{0%{-webkit-transform:rotate(-1deg);-ms-transform:rotate(-1deg);transform:rotate(-1deg);}100%{-webkit-transform:rotate(359deg);-ms-transform:rotate(359deg);transform:rotate(359deg);}}@keyframes spin-ssn8o83{0%{-webkit-transform:rotate(-1deg);-ms-transform:rotate(-1deg);transform:rotate(-1deg);}100%{-webkit-transform:rotate(359deg);-ms-transform:rotate(359deg);transform:rotate(359deg);}}
|
|
2
|
-
.a1vkj3mh{width:auto;display:var(--a1vkj3mh-0);-webkit-align-self:var(--a1vkj3mh-1);-ms-flex-item-align:var(--a1vkj3mh-1);align-self:var(--a1vkj3mh-1);outline:none;}@media (
|
|
3
|
-
@media (hover:none) and (pointer:coarse){.p1nlccvg > *:hover,.kitt-hover .p1nlccvg > *{-webkit-transform:scale(var(--p1nlccvg-0));-ms-transform:scale(var(--p1nlccvg-0));transform:scale(var(--p1nlccvg-0));}}@media (
|
|
2
|
+
.a1vkj3mh{width:auto;display:var(--a1vkj3mh-0);-webkit-align-self:var(--a1vkj3mh-1);-ms-flex-item-align:var(--a1vkj3mh-1);align-self:var(--a1vkj3mh-1);outline:none;}@media (min-width:768px){.kitt-hover .a1vkj3mh > * > *,.a1vkj3mh:hover > * > *{-webkit-transform:scale(var(--a1vkj3mh-3));-ms-transform:scale(var(--a1vkj3mh-3));transform:scale(var(--a1vkj3mh-3));}}.kitt-active .a1vkj3mh > * > *,.a1vkj3mh:active > * > *{-webkit-transform:var(--a1vkj3mh-4);-ms-transform:var(--a1vkj3mh-4);transform:var(--a1vkj3mh-4);}.kitt-active .a1vkj3mh > * > *,.a1vkj3mh:active > * > *,.kitt-hover .a1vkj3mh > * > *,.a1vkj3mh:hover > * > *{background:var(--a1vkj3mh-5);}.a1vkj3mh > * > *{-webkit-transform:scale(1) translateZ(0);-ms-transform:scale(1) translateZ(0);transform:scale(1) translateZ(0);display:-webkit-inline-box;display:-webkit-inline-flex;display:-ms-inline-flexbox;display:inline-flex;-webkit-backface-visibility:hidden;backface-visibility:hidden;-webkit-transition:var(--a1vkj3mh-6);transition:var(--a1vkj3mh-6);}.a1vkj3mh > * > *::after,.a1vkj3mh > * > *::before{content:'';position:absolute;border-radius:var(--a1vkj3mh-7);-webkit-transition:var(--a1vkj3mh-8);transition:var(--a1vkj3mh-8);}.a1vkj3mh > * > *::after{opacity:var(--a1vkj3mh-9);top:var(--a1vkj3mh-10);left:var(--a1vkj3mh-10);width:var(--a1vkj3mh-12);height:var(--a1vkj3mh-12);border:var(--a1vkj3mh-14);}.a1vkj3mh > * > *::before{opacity:0;border:var(--a1vkj3mh-15);width:100%;height:100%;top:var(--a1vkj3mh-16);left:var(--a1vkj3mh-16);}.kitt-focus .a1vkj3mh > *,.a1vkj3mh:focus > *,.a1vkj3mh > [data-focusvisible-polyfill]{outline:none;}.kitt-focus .a1vkj3mh > * > *::before,.a1vkj3mh:focus > * > *::before,.a1vkj3mh > [data-focusvisible-polyfill] > *::before{opacity:1;}.kitt-hover .a1vkj3mh > * > *::before,.a1vkj3mh:hover > * > *::before,.kitt-active .a1vkj3mh > * > *::before,.a1vkj3mh:active > * > *::before{opacity:0;}.a1vkj3mh > *{color:var(--a1vkj3mh-18);}.kitt-hover .a1vkj3mh > *,.a1vkj3mh:hover > *{color:var(--a1vkj3mh-19);}.kitt-active .a1vkj3mh > *,.a1vkj3mh:active > *{color:var(--a1vkj3mh-20);}
|
|
3
|
+
@media (hover:none) and (pointer:coarse){.p1nlccvg > *:hover,.kitt-hover .p1nlccvg > *{-webkit-transform:scale(var(--p1nlccvg-0));-ms-transform:scale(var(--p1nlccvg-0));transform:scale(var(--p1nlccvg-0));}}@media (min-width:768px){.p1nlccvg > *:hover,.kitt-hover .p1nlccvg > *{-webkit-transform:scale(var(--p1nlccvg-2));-ms-transform:scale(var(--p1nlccvg-2));transform:scale(var(--p1nlccvg-2));}}.p1nlccvg > *:active,.kitt-active .p1nlccvg > *{-webkit-transform:scale(var(--p1nlccvg-3));-ms-transform:scale(var(--p1nlccvg-3));transform:scale(var(--p1nlccvg-3));}.p1nlccvg,.p1nlccvg > [data-focusvisible-polyfill]{outline:none;}.p1nlccvg > *:hover,.kitt-hover .p1nlccvg > *,.p1nlccvg > *:focus,.kitt-focus .p1nlccvg > *,.p1nlccvg > [data-focusvisible-polyfill],.p1nlccvg > *:active,.kitt-active .p1nlccvg > *{background-color:var(--p1nlccvg-4);}
|
|
4
4
|
.l2im3sa{width:60px;height:60px;-webkit-transform:scale(-1) rotate(90deg);-ms-transform:scale(-1) rotate(90deg);transform:scale(-1) rotate(90deg);}@-webkit-keyframes LargeLoaderInit-l2im3sa{0%{stroke-dashoffset:169.64px;}100%{stroke-dashoffset:0;}}@keyframes LargeLoaderInit-l2im3sa{0%{stroke-dashoffset:169.64px;}100%{stroke-dashoffset:0;}}@-webkit-keyframes LargeLoaderOffset-l2im3sa{0%{stroke-dashoffset:169.64px;}100%{stroke-dashoffset:34px;}}@keyframes LargeLoaderOffset-l2im3sa{0%{stroke-dashoffset:169.64px;}100%{stroke-dashoffset:34px;}}@-webkit-keyframes LargeLoaderRotation-l2im3sa{0%{-webkit-transform:rotate(0deg);-ms-transform:rotate(0deg);transform:rotate(0deg);}100%{-webkit-transform:rotate(360deg);-ms-transform:rotate(360deg);transform:rotate(360deg);}}@keyframes LargeLoaderRotation-l2im3sa{0%{-webkit-transform:rotate(0deg);-ms-transform:rotate(0deg);transform:rotate(0deg);}100%{-webkit-transform:rotate(360deg);-ms-transform:rotate(360deg);transform:rotate(360deg);}}.l2im3sa circle,.l2im3sa g{-webkit-transform-origin:center center;-ms-transform-origin:center center;transform-origin:center center;}.l2im3sa circle{stroke-width:3px;stroke-dasharray:169.64px;stroke-dashoffset:169.64px;stroke-linecap:round;}.l2im3sa g[data-large-loader='base'] circle{stroke:var(--l2im3sa-0);-webkit-animation:LargeLoaderInit-l2im3sa 1s cubic-bezier(0.39,0.575,0.565,1) 0.5s forwards;animation:LargeLoaderInit-l2im3sa 1s cubic-bezier(0.39,0.575,0.565,1) 0.5s forwards;}.l2im3sa g[data-large-loader='fill']{-webkit-transform-origin:center center;-ms-transform-origin:center center;transform-origin:center center;-webkit-animation:LargeLoaderRotation-l2im3sa 1.8s linear 0.5s infinite;animation:LargeLoaderRotation-l2im3sa 1.8s linear 0.5s infinite;}.l2im3sa g[data-large-loader='fill'] circle{stroke:var(--l2im3sa-1);-webkit-animation:LargeLoaderOffset-l2im3sa 1.8s cubic-bezier(0.39,0.575,0.565,1) 0.5s infinite alternate,LargeLoaderRotation-l2im3sa 2.16s linear 0.5s infinite;animation:LargeLoaderOffset-l2im3sa 1.8s cubic-bezier(0.39,0.575,0.565,1) 0.5s infinite alternate,LargeLoaderRotation-l2im3sa 2.16s linear 0.5s infinite;}
|
|
5
5
|
.sc3upcl{background-color:var(--sc3upcl-0);position:relative;overflow:hidden;height:100%;width:100%;}@-webkit-keyframes flareTranslate-sc3upcl{from{-webkit-transform:translateX(-100%);-ms-transform:translateX(-100%);transform:translateX(-100%);}to{-webkit-transform:translateX(100%);-ms-transform:translateX(100%);transform:translateX(100%);}}@keyframes flareTranslate-sc3upcl{from{-webkit-transform:translateX(-100%);-ms-transform:translateX(-100%);transform:translateX(-100%);}to{-webkit-transform:translateX(100%);-ms-transform:translateX(100%);transform:translateX(100%);}}.sc3upcl::after{content:'';position:absolute;width:100%;height:100%;top:0;left:0;background-image:var(--sc3upcl-1);-webkit-animation:var(--sc3upcl-2);animation:var(--sc3upcl-2);-webkit-animation-name:flareTranslate-sc3upcl;animation-name:flareTranslate-sc3upcl;}
|
|
6
6
|
.tcwz3nt > *:hover,.tcwz3nt > *:active,.kitt-hover .tcwz3nt > *{-webkit-text-decoration:none;text-decoration:none;}.tcwz3nt > *:hover,.tcwz3nt > *:active,.kitt-hover .tcwz3nt > *{-webkit-text-decoration:var(--tcwz3nt-0);text-decoration:var(--tcwz3nt-0);}
|
|
@@ -5,8 +5,8 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
|
5
5
|
const BabelPluginStyledComponentsReactNative = require('react-native');
|
|
6
6
|
const kittIcons = require('@ornikar/kitt-icons');
|
|
7
7
|
const styled = require('styled-components/native');
|
|
8
|
-
const react
|
|
9
|
-
const react = require('@linaria/react');
|
|
8
|
+
const react = require('react');
|
|
9
|
+
const react$1 = require('@linaria/react');
|
|
10
10
|
const jsxRuntime = require('react/jsx-runtime');
|
|
11
11
|
const twemojiParser = require('twemoji-parser');
|
|
12
12
|
const reactNativeSafeAreaContext = require('react-native-safe-area-context');
|
|
@@ -28,16 +28,18 @@ const styled__default = /*#__PURE__*/_interopDefaultLegacy(styled);
|
|
|
28
28
|
// };
|
|
29
29
|
// }
|
|
30
30
|
function withTheme(WrappedComponent) {
|
|
31
|
-
|
|
31
|
+
// eslint-disable-next-line prefer-arrow-callback
|
|
32
|
+
return /*#__PURE__*/react.forwardRef(function (props, ref) {
|
|
32
33
|
const theme = /*#__PURE__*/styled.useTheme();
|
|
33
34
|
return /*#__PURE__*/jsxRuntime.jsx(WrappedComponent, {
|
|
35
|
+
ref: ref,
|
|
34
36
|
theme: theme,
|
|
35
37
|
...props
|
|
36
38
|
});
|
|
37
|
-
};
|
|
39
|
+
});
|
|
38
40
|
}
|
|
39
41
|
|
|
40
|
-
const StyledSpinningIconContainer = withTheme( /*#__PURE__*/react.styled("div")({
|
|
42
|
+
const StyledSpinningIconContainer = withTheme( /*#__PURE__*/react$1.styled("div")({
|
|
41
43
|
name: "StyledSpinningIconContainer",
|
|
42
44
|
class: "ssn8o83"
|
|
43
45
|
}));
|
|
@@ -68,7 +70,7 @@ function Icon({
|
|
|
68
70
|
align,
|
|
69
71
|
color
|
|
70
72
|
}) {
|
|
71
|
-
const clonedIcon = /*#__PURE__*/react
|
|
73
|
+
const clonedIcon = /*#__PURE__*/react.cloneElement(icon, {
|
|
72
74
|
color
|
|
73
75
|
});
|
|
74
76
|
return /*#__PURE__*/jsxRuntime.jsx(IconContainer$1, {
|
|
@@ -129,10 +131,10 @@ const KittBreakpointsMax = {
|
|
|
129
131
|
LARGE: KittBreakpoints.WIDE - 1
|
|
130
132
|
};
|
|
131
133
|
|
|
132
|
-
const IsHeaderTypographyContext = /*#__PURE__*/react
|
|
133
|
-
const TypographyColorContext = /*#__PURE__*/react
|
|
134
|
+
const IsHeaderTypographyContext = /*#__PURE__*/react.createContext(undefined);
|
|
135
|
+
const TypographyColorContext = /*#__PURE__*/react.createContext('black');
|
|
134
136
|
function useTypographyColor() {
|
|
135
|
-
return react
|
|
137
|
+
return react.useContext(TypographyColorContext);
|
|
136
138
|
}
|
|
137
139
|
const getTypographyTypeConfigKey = theme => {
|
|
138
140
|
const isMediumOrAbove = theme.responsive.matchWindowSize({
|
|
@@ -221,7 +223,7 @@ function Typography({
|
|
|
221
223
|
color,
|
|
222
224
|
...otherProps
|
|
223
225
|
}) {
|
|
224
|
-
const isHeaderTypographyInContext = react
|
|
226
|
+
const isHeaderTypographyInContext = react.useContext(IsHeaderTypographyContext);
|
|
225
227
|
const hasTypographyAncestor = isHeaderTypographyInContext !== undefined;
|
|
226
228
|
const {
|
|
227
229
|
base: baseOrDefaultToBody,
|
|
@@ -392,7 +394,7 @@ function isSubtle(type) {
|
|
|
392
394
|
return type.startsWith('subtle');
|
|
393
395
|
}
|
|
394
396
|
|
|
395
|
-
const AnimatedButtonPressableContainer = withTheme( /*#__PURE__*/react.styled("div")({
|
|
397
|
+
const AnimatedButtonPressableContainer = withTheme( /*#__PURE__*/react$1.styled("div")({
|
|
396
398
|
name: "AnimatedButtonPressableContainer",
|
|
397
399
|
class: "a1vkj3mh",
|
|
398
400
|
vars: {
|
|
@@ -402,9 +404,6 @@ const AnimatedButtonPressableContainer = withTheme( /*#__PURE__*/react.styled("d
|
|
|
402
404
|
"a1vkj3mh-1": [({
|
|
403
405
|
$isStretch
|
|
404
406
|
}) => $isStretch ? 'stretch' : 'baseline'],
|
|
405
|
-
"a1vkj3mh-2": [({
|
|
406
|
-
theme
|
|
407
|
-
}) => theme.breakpoints.min.mediumBreakpoint],
|
|
408
407
|
"a1vkj3mh-3": [({
|
|
409
408
|
theme
|
|
410
409
|
}) => theme.kitt.button.scale.medium.hover],
|
|
@@ -483,7 +482,7 @@ const AnimatedButtonPressableContainer = withTheme( /*#__PURE__*/react.styled("d
|
|
|
483
482
|
}]
|
|
484
483
|
}
|
|
485
484
|
}));
|
|
486
|
-
const AnimatedButtonPressable = /*#__PURE__*/react
|
|
485
|
+
const AnimatedButtonPressable = /*#__PURE__*/react.forwardRef(({
|
|
487
486
|
$type,
|
|
488
487
|
$isStretch,
|
|
489
488
|
disabled,
|
|
@@ -735,7 +734,7 @@ function ButtonContent({
|
|
|
735
734
|
});
|
|
736
735
|
}
|
|
737
736
|
|
|
738
|
-
const Button = /*#__PURE__*/react
|
|
737
|
+
const Button = /*#__PURE__*/react.forwardRef(({
|
|
739
738
|
children,
|
|
740
739
|
type = 'default',
|
|
741
740
|
disabled,
|
|
@@ -817,7 +816,7 @@ function Emoji({
|
|
|
817
816
|
size,
|
|
818
817
|
style
|
|
819
818
|
}) {
|
|
820
|
-
const [emojiData] = react
|
|
819
|
+
const [emojiData] = react.useMemo(() => twemojiParser.parse(emoji, {
|
|
821
820
|
// on native plaforms, you can't display svg as Image
|
|
822
821
|
assetType: 'svg'
|
|
823
822
|
}), [emoji]);
|
|
@@ -919,8 +918,8 @@ function InputField({
|
|
|
919
918
|
}
|
|
920
919
|
|
|
921
920
|
const useInputText = () => {
|
|
922
|
-
const [isFocused, setIsFocused] = react
|
|
923
|
-
const [isPasswordVisible, setIsPasswordVisible] = react
|
|
921
|
+
const [isFocused, setIsFocused] = react.useState(false);
|
|
922
|
+
const [isPasswordVisible, setIsPasswordVisible] = react.useState(false);
|
|
924
923
|
return {
|
|
925
924
|
isFocused,
|
|
926
925
|
handleInputFocus: () => setIsFocused(true),
|
|
@@ -1017,7 +1016,7 @@ const textContentTypeByType = {
|
|
|
1017
1016
|
password: 'password',
|
|
1018
1017
|
username: 'username'
|
|
1019
1018
|
};
|
|
1020
|
-
const InputText = /*#__PURE__*/react
|
|
1019
|
+
const InputText = /*#__PURE__*/react.forwardRef(({
|
|
1021
1020
|
id,
|
|
1022
1021
|
minHeight = 0,
|
|
1023
1022
|
type,
|
|
@@ -1284,8 +1283,8 @@ function FullScreenModalHeader({
|
|
|
1284
1283
|
top
|
|
1285
1284
|
} = reactNativeSafeAreaContext.useSafeAreaInsets();
|
|
1286
1285
|
const dimensions = BabelPluginStyledComponentsReactNative.useWindowDimensions();
|
|
1287
|
-
const [leftWidth, setLeftWidth] = react
|
|
1288
|
-
const [rightWidth, setRightWidth] = react
|
|
1286
|
+
const [leftWidth, setLeftWidth] = react.useState(0);
|
|
1287
|
+
const [rightWidth, setRightWidth] = react.useState(0);
|
|
1289
1288
|
|
|
1290
1289
|
const handleLayoutChange = (event, side) => {
|
|
1291
1290
|
// Prevents react to nullify event on rerenders
|
|
@@ -1344,16 +1343,13 @@ function StyleWebWrapper({
|
|
|
1344
1343
|
});
|
|
1345
1344
|
}
|
|
1346
1345
|
|
|
1347
|
-
const PressableIconButtonWebWrapper = withTheme( /*#__PURE__*/react.styled("div")({
|
|
1346
|
+
const PressableIconButtonWebWrapper = withTheme( /*#__PURE__*/react$1.styled("div")({
|
|
1348
1347
|
name: "PressableIconButtonWebWrapper",
|
|
1349
1348
|
class: "p1nlccvg",
|
|
1350
1349
|
vars: {
|
|
1351
1350
|
"p1nlccvg-0": [({
|
|
1352
1351
|
theme
|
|
1353
1352
|
}) => theme.kitt.iconButton.scale.base.hover],
|
|
1354
|
-
"p1nlccvg-1": [({
|
|
1355
|
-
theme
|
|
1356
|
-
}) => theme.breakpoints.min.mediumBreakpoint],
|
|
1357
1353
|
"p1nlccvg-2": [({
|
|
1358
1354
|
theme
|
|
1359
1355
|
}) => theme.kitt.iconButton.scale.medium.hover],
|
|
@@ -1572,7 +1568,7 @@ function ListItem({
|
|
|
1572
1568
|
onPress,
|
|
1573
1569
|
...rest
|
|
1574
1570
|
}) {
|
|
1575
|
-
const Wrapper = onPress ? BabelPluginStyledComponentsReactNative.Pressable : react
|
|
1571
|
+
const Wrapper = onPress ? BabelPluginStyledComponentsReactNative.Pressable : react.Fragment;
|
|
1576
1572
|
const wrapperProps = onPress ? {
|
|
1577
1573
|
accessibilityRole: 'button',
|
|
1578
1574
|
onPress,
|
|
@@ -1600,7 +1596,7 @@ ListItem.Content = ListItemContent;
|
|
|
1600
1596
|
ListItem.SideContent = ListItemSideContent;
|
|
1601
1597
|
ListItem.SideContainer = ListItemSideContainer;
|
|
1602
1598
|
|
|
1603
|
-
const LargeLoaderContainer = withTheme( /*#__PURE__*/react.styled("div")({
|
|
1599
|
+
const LargeLoaderContainer = withTheme( /*#__PURE__*/react$1.styled("div")({
|
|
1604
1600
|
name: "LargeLoaderContainer",
|
|
1605
1601
|
class: "l2im3sa",
|
|
1606
1602
|
vars: {
|
|
@@ -1813,7 +1809,7 @@ function ModalFooter({
|
|
|
1813
1809
|
});
|
|
1814
1810
|
}
|
|
1815
1811
|
|
|
1816
|
-
const OnCloseContext = /*#__PURE__*/react
|
|
1812
|
+
const OnCloseContext = /*#__PURE__*/react.createContext(() => {});
|
|
1817
1813
|
|
|
1818
1814
|
const HeaderView = /*#__PURE__*/styled__default(BabelPluginStyledComponentsReactNative.View).withConfig({
|
|
1819
1815
|
displayName: "Header__HeaderView",
|
|
@@ -1847,7 +1843,7 @@ function ModalHeader({
|
|
|
1847
1843
|
right,
|
|
1848
1844
|
children
|
|
1849
1845
|
}) {
|
|
1850
|
-
const onClose = react
|
|
1846
|
+
const onClose = react.useContext(OnCloseContext);
|
|
1851
1847
|
const isIconLeft = !!left;
|
|
1852
1848
|
return /*#__PURE__*/jsxRuntime.jsxs(HeaderView, {
|
|
1853
1849
|
children: [isIconLeft && /*#__PURE__*/jsxRuntime.jsx(LeftIconView, {
|
|
@@ -1932,7 +1928,7 @@ function Notification({
|
|
|
1932
1928
|
});
|
|
1933
1929
|
}
|
|
1934
1930
|
|
|
1935
|
-
const StyledSkeleton = withTheme( /*#__PURE__*/react.styled("div")({
|
|
1931
|
+
const StyledSkeleton = withTheme( /*#__PURE__*/react$1.styled("div")({
|
|
1936
1932
|
name: "StyledSkeleton",
|
|
1937
1933
|
class: "sc3upcl",
|
|
1938
1934
|
vars: {
|
|
@@ -1965,7 +1961,7 @@ function Skeleton({
|
|
|
1965
1961
|
isLoading,
|
|
1966
1962
|
style
|
|
1967
1963
|
}) {
|
|
1968
|
-
const [width, setWidth] = react
|
|
1964
|
+
const [width, setWidth] = react.useState(0);
|
|
1969
1965
|
return /*#__PURE__*/jsxRuntime.jsx(BabelPluginStyledComponentsReactNative.View, {
|
|
1970
1966
|
style: style,
|
|
1971
1967
|
onLayout: ({
|
|
@@ -2051,10 +2047,10 @@ const getTypographyColorFromBlockColor = (color = 'transparent') => {
|
|
|
2051
2047
|
}
|
|
2052
2048
|
};
|
|
2053
2049
|
|
|
2054
|
-
const StoryBlockBackgroundContext = /*#__PURE__*/react
|
|
2055
|
-
const StoryBlockColorContext = /*#__PURE__*/react
|
|
2050
|
+
const StoryBlockBackgroundContext = /*#__PURE__*/react.createContext('transparent');
|
|
2051
|
+
const StoryBlockColorContext = /*#__PURE__*/react.createContext('black');
|
|
2056
2052
|
const useStoryBlockColor = color => {
|
|
2057
|
-
const storyBlockColor = react
|
|
2053
|
+
const storyBlockColor = react.useContext(StoryBlockColorContext);
|
|
2058
2054
|
return color || storyBlockColor;
|
|
2059
2055
|
};
|
|
2060
2056
|
const StyledStoryBlockView = /*#__PURE__*/styled__default(BabelPluginStyledComponentsReactNative.View).withConfig({
|
|
@@ -2312,14 +2308,14 @@ function StoryGridRow({
|
|
|
2312
2308
|
|
|
2313
2309
|
if (width < breakpointValue) {
|
|
2314
2310
|
return /*#__PURE__*/jsxRuntime.jsx(SmallScreenRow, {
|
|
2315
|
-
children: react
|
|
2311
|
+
children: react.Children.map(children, child => /*#__PURE__*/jsxRuntime.jsx(SmallScreenCol, {
|
|
2316
2312
|
children: child
|
|
2317
2313
|
}))
|
|
2318
2314
|
});
|
|
2319
2315
|
}
|
|
2320
2316
|
|
|
2321
2317
|
return /*#__PURE__*/jsxRuntime.jsx(FlexRow, {
|
|
2322
|
-
children: react
|
|
2318
|
+
children: react.Children.map(children, child => /*#__PURE__*/jsxRuntime.jsx(FlexCol, {
|
|
2323
2319
|
children: child
|
|
2324
2320
|
}))
|
|
2325
2321
|
});
|
|
@@ -2837,7 +2833,7 @@ const breakpoints = {
|
|
|
2837
2833
|
wideBreakpoint: 'max-width: 1279px'
|
|
2838
2834
|
}
|
|
2839
2835
|
}; // eslint-disable-next-line unicorn/expiring-todo-comments
|
|
2840
|
-
// TODO : seperate brand
|
|
2836
|
+
// TODO : seperate brand color usage definition from proper theme definition and add typings - https://ornikar.atlassian.net/browse/CME-156
|
|
2841
2837
|
|
|
2842
2838
|
const theme = {
|
|
2843
2839
|
spacing: 4,
|
|
@@ -2857,7 +2853,8 @@ const theme = {
|
|
|
2857
2853
|
iconButton,
|
|
2858
2854
|
listItem: listItemLateOceanTheme,
|
|
2859
2855
|
tooltip,
|
|
2860
|
-
skeleton: skeletonTheme
|
|
2856
|
+
skeleton: skeletonTheme,
|
|
2857
|
+
breakpoints
|
|
2861
2858
|
};
|
|
2862
2859
|
|
|
2863
2860
|
function TimePicker() {
|
|
@@ -2982,7 +2979,7 @@ function Tooltip({
|
|
|
2982
2979
|
}) {
|
|
2983
2980
|
const theme = /*#__PURE__*/styled.useTheme();
|
|
2984
2981
|
const padding = floatingPadding || theme.kitt.tooltip.floatingPadding;
|
|
2985
|
-
const [visible, setVisible] = react
|
|
2982
|
+
const [visible, setVisible] = react.useState(Boolean(defaultVisible));
|
|
2986
2983
|
const {
|
|
2987
2984
|
x,
|
|
2988
2985
|
y,
|
|
@@ -2998,7 +2995,7 @@ function Tooltip({
|
|
|
2998
2995
|
middleware: [reactDom.offset(padding), reactDom.shift(), reactDom.flip()]
|
|
2999
2996
|
}); // Update on scroll and resize for all relevant nodes
|
|
3000
2997
|
|
|
3001
|
-
react
|
|
2998
|
+
react.useEffect(() => {
|
|
3002
2999
|
if (!refs.reference.current || !refs.floating.current) {
|
|
3003
3000
|
return () => undefined;
|
|
3004
3001
|
}
|
|
@@ -3015,7 +3012,7 @@ function Tooltip({
|
|
|
3015
3012
|
});
|
|
3016
3013
|
};
|
|
3017
3014
|
}, [refs.reference, refs.floating, update]);
|
|
3018
|
-
react
|
|
3015
|
+
react.useEffect(() => {
|
|
3019
3016
|
if (!onUpdate) return;
|
|
3020
3017
|
onUpdate({
|
|
3021
3018
|
x,
|
|
@@ -3099,7 +3096,7 @@ function TypographyEmoji({
|
|
|
3099
3096
|
});
|
|
3100
3097
|
}
|
|
3101
3098
|
|
|
3102
|
-
const TypographyLinkWebWrapper = withTheme( /*#__PURE__*/react.styled("span")({
|
|
3099
|
+
const TypographyLinkWebWrapper = withTheme( /*#__PURE__*/react$1.styled("span")({
|
|
3103
3100
|
name: "TypographyLinkWebWrapper",
|
|
3104
3101
|
class: "tcwz3nt",
|
|
3105
3102
|
vars: {
|
|
@@ -3210,11 +3207,10 @@ function createWindowSizeHelper(dimensions) {
|
|
|
3210
3207
|
|
|
3211
3208
|
function useKittTheme() {
|
|
3212
3209
|
const dimensions = BabelPluginStyledComponentsReactNative.useWindowDimensions();
|
|
3213
|
-
return react
|
|
3210
|
+
return react.useMemo(() => {
|
|
3214
3211
|
return {
|
|
3215
3212
|
kitt: theme,
|
|
3216
|
-
responsive: createWindowSizeHelper(dimensions)
|
|
3217
|
-
breakpoints
|
|
3213
|
+
responsive: createWindowSizeHelper(dimensions)
|
|
3218
3214
|
};
|
|
3219
3215
|
}, [dimensions]);
|
|
3220
3216
|
}
|