@ornikar/kitt-universal 31.3.2-canary.d9333a410786c9c1a722ce408a27e7980c9146a4.0 → 31.4.1-canary.2fdbcaad37b7e76ba2442f7c56a4939349d51eb1.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/CHANGELOG.md +17 -2
- package/dist/definitions/CardModal/CardModalAnimation/OpacityAnimation.d.ts +8 -0
- package/dist/definitions/CardModal/CardModalAnimation/OpacityAnimation.d.ts.map +1 -0
- package/dist/definitions/CardModal/CardModalAnimation/{NativeRotationAnimation.d.ts → RotationAnimation.d.ts} +3 -3
- package/dist/definitions/CardModal/CardModalAnimation/RotationAnimation.d.ts.map +1 -0
- package/dist/definitions/DialogModal/DialogModalAnimation/NativeOpacityAnimation.d.ts.map +1 -1
- package/dist/definitions/DialogModal/DialogModalAnimation/NativeRotationAnimation.d.ts.map +1 -1
- package/dist/definitions/FullscreenModal/FullscreenModalAnimation.web.d.ts.map +1 -1
- package/dist/definitions/themes/late-ocean/fullscreenModal.d.ts +0 -14
- package/dist/definitions/themes/late-ocean/fullscreenModal.d.ts.map +1 -1
- package/dist/index-metro.es.android.js +44 -42
- package/dist/index-metro.es.android.js.map +1 -1
- package/dist/index-metro.es.ios.js +44 -42
- package/dist/index-metro.es.ios.js.map +1 -1
- package/dist/index-node-22.17.cjs.js +44 -42
- package/dist/index-node-22.17.cjs.js.map +1 -1
- package/dist/index-node-22.17.cjs.web.css +38 -16
- package/dist/index-node-22.17.cjs.web.js +262 -179
- package/dist/index-node-22.17.cjs.web.js.map +1 -1
- package/dist/index-node-22.17.es.mjs +44 -42
- package/dist/index-node-22.17.es.mjs.map +1 -1
- package/dist/index-node-22.17.es.web.css +38 -16
- package/dist/index-node-22.17.es.web.mjs +262 -179
- package/dist/index-node-22.17.es.web.mjs.map +1 -1
- package/dist/index.es.js +44 -42
- package/dist/index.es.js.map +1 -1
- package/dist/index.es.web.js +288 -206
- package/dist/index.es.web.js.map +1 -1
- package/dist/linaria-themes-metro.es.android.js +30 -34
- package/dist/linaria-themes-metro.es.android.js.map +1 -1
- package/dist/linaria-themes-metro.es.ios.js +30 -34
- package/dist/linaria-themes-metro.es.ios.js.map +1 -1
- package/dist/linaria-themes-node-22.17.cjs.js +30 -34
- package/dist/linaria-themes-node-22.17.cjs.js.map +1 -1
- package/dist/linaria-themes-node-22.17.cjs.web.js +30 -34
- package/dist/linaria-themes-node-22.17.cjs.web.js.map +1 -1
- package/dist/linaria-themes-node-22.17.es.mjs +30 -34
- package/dist/linaria-themes-node-22.17.es.mjs.map +1 -1
- package/dist/linaria-themes-node-22.17.es.web.mjs +30 -34
- package/dist/linaria-themes-node-22.17.es.web.mjs.map +1 -1
- package/dist/linaria-themes.es.js +30 -34
- package/dist/linaria-themes.es.js.map +1 -1
- package/dist/linaria-themes.es.web.js +30 -34
- package/dist/linaria-themes.es.web.js.map +1 -1
- package/dist/styles.css +38 -16
- package/dist/tsbuildinfo +1 -1
- package/package.json +1 -1
- package/dist/definitions/CardModal/CardModalAnimation/NativeOpacityAnimation.d.ts +0 -8
- package/dist/definitions/CardModal/CardModalAnimation/NativeOpacityAnimation.d.ts.map +0 -1
- package/dist/definitions/CardModal/CardModalAnimation/NativeRotationAnimation.d.ts.map +0 -1
- package/dist/definitions/DialogModal/DialogModalAnimation/DialogModalAnimation.web.d.ts +0 -4
- package/dist/definitions/DialogModal/DialogModalAnimation/DialogModalAnimation.web.d.ts.map +0 -1
|
@@ -6,23 +6,45 @@
|
|
|
6
6
|
.kitt-u_opacityEnterActive_o1t4vl7b{opacity:1;-webkit-transition:opacity 250ms cubic-bezier(0.42,0,1,1);transition:opacity 250ms cubic-bezier(0.42,0,1,1);}
|
|
7
7
|
.kitt-u_opacityExit_ogyytm1{opacity:1;}
|
|
8
8
|
.kitt-u_opacityExitActive_o18xvk52{opacity:0;-webkit-transition:opacity 250ms cubic-bezier(0.42,0,1,1);transition:opacity 250ms cubic-bezier(0.42,0,1,1);}
|
|
9
|
-
.kitt-u_contentAnimationEnter_c1i0gle8{opacity:0;-webkit-transform:rotateZ(5deg) scale(0.8);-ms-transform:rotateZ(5deg) scale(0.8);transform:rotateZ(5deg) scale(0.8);}
|
|
10
|
-
.kitt-u_contentAnimatioEnterActive_c1jmfkjw{opacity:1;-webkit-transform:rotateZ(0) scale(1);-ms-transform:rotateZ(0) scale(1);transform:rotateZ(0) scale(1);-webkit-transition:all 400ms cubic-bezier(0.77,0,0.175,1);transition:all 400ms cubic-bezier(0.77,0,0.175,1);}
|
|
11
|
-
.kitt-u_contentAnimatioExit_cwjstxl{opacity:1;-webkit-transform:rotateZ(0) scale(1);-ms-transform:rotateZ(0) scale(1);transform:rotateZ(0) scale(1);}
|
|
12
|
-
.kitt-u_contentAnimatioExitActive_c1almbvu{opacity:0;-webkit-transform:rotateZ(5deg) scale(0.8);-ms-transform:rotateZ(5deg) scale(0.8);transform:rotateZ(5deg) scale(0.8);-webkit-transition:all 400ms cubic-bezier(0.77,0,0.175,1);transition:all 400ms cubic-bezier(0.77,0,0.175,1);}
|
|
13
|
-
.kitt-u_opacityEnter_o9rkayr{opacity:0;}
|
|
14
|
-
.kitt-u_opacityEnterActive_od7zvm9{opacity:1;-webkit-transition:opacity 250ms cubic-bezier(0.42,0,1,1);transition:opacity 250ms cubic-bezier(0.42,0,1,1);}
|
|
15
|
-
.kitt-u_opacityExit_opddo9j{opacity:1;}
|
|
16
|
-
.kitt-u_opacityExitActive_o15v6ove{opacity:0;-webkit-transition:opacity 250ms cubic-bezier(0.42,0,1,1);transition:opacity 250ms cubic-bezier(0.42,0,1,1);}
|
|
17
9
|
.kitt-u_inputTextContainer_i1encr9g{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;position:relative;}.kitt-u_inputTextContainer_i1encr9g > *::-ms-clear,.kitt-u_inputTextContainer_i1encr9g > *::-ms-reveal{display:none;}.kitt-u_inputTextContainer_i1encr9g > *{-webkit-transition:border-color 200ms ease-in-out,background-color 200ms ease-in-out;transition:border-color 200ms ease-in-out,background-color 200ms ease-in-out;}
|
|
18
|
-
|
|
19
|
-
.
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
.
|
|
24
|
-
|
|
25
|
-
|
|
10
|
+
/* Overlay animation styles - uses CSS variables for theme values */
|
|
11
|
+
.FullscreenModalAnimation-module_overlay-enter__L1J1X {
|
|
12
|
+
opacity: 0;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
.FullscreenModalAnimation-module_overlay-enter-active__gDEVb {
|
|
16
|
+
opacity: 1;
|
|
17
|
+
transition: opacity var(--overlay-duration) var(--overlay-easing);
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
.FullscreenModalAnimation-module_overlay-exit__Qx1WE {
|
|
21
|
+
opacity: 1;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
.FullscreenModalAnimation-module_overlay-exit-active__lFR3x {
|
|
25
|
+
opacity: 0;
|
|
26
|
+
transition: opacity var(--overlay-duration) var(--overlay-easing);
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
/* Content animation styles - uses CSS variables for theme values */
|
|
30
|
+
.FullscreenModalAnimation-module_content-enter__JmCWa {
|
|
31
|
+
transform: translateY(100%);
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
.FullscreenModalAnimation-module_content-enter-active__iaNRs {
|
|
35
|
+
transform: translateY(0);
|
|
36
|
+
transition: transform var(--content-duration) var(--content-easing);
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
.FullscreenModalAnimation-module_content-exit__hB0wY {
|
|
40
|
+
transform: translateY(0);
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
.FullscreenModalAnimation-module_content-exit-active__BPVPo {
|
|
44
|
+
transform: translateY(100%);
|
|
45
|
+
transition: transform var(--content-duration) var(--content-easing);
|
|
46
|
+
}
|
|
47
|
+
|
|
26
48
|
.kitt-u_enter_ereraf{-webkit-transform:translateY(8px);-ms-transform:translateY(8px);transform:translateY(8px);opacity:0;}
|
|
27
49
|
.kitt-u_enterActive_e1jmsjrm{-webkit-transform:translateY(0);-ms-transform:translateY(0);transform:translateY(0);opacity:1;-webkit-transition:all 300ms ease-in-out;transition:all 300ms ease-in-out;}
|
|
28
50
|
.kitt-u_exit_e1mwnccz{-webkit-transform:translateY(0);-ms-transform:translateY(0);transform:translateY(0);opacity:1;}
|
|
@@ -9,6 +9,7 @@ const phosphor = require('@ornikar/kitt-icons/phosphor');
|
|
|
9
9
|
const reactNative = require('react-native');
|
|
10
10
|
const reactDom = require('react-dom');
|
|
11
11
|
const reactTransitionGroup = require('react-transition-group');
|
|
12
|
+
const Animated = require('react-native-reanimated');
|
|
12
13
|
const parser = require('@twemoji/parser');
|
|
13
14
|
const Downshift = require('downshift');
|
|
14
15
|
const expoDocumentPicker = require('expo-document-picker');
|
|
@@ -16,7 +17,6 @@ const expoImagePicker = require('expo-image-picker');
|
|
|
16
17
|
const useDebounce = require('use-debounce');
|
|
17
18
|
const jsApiLoader = require('@googlemaps/js-api-loader');
|
|
18
19
|
const libphonenumberJs = require('libphonenumber-js');
|
|
19
|
-
const Animated = require('react-native-reanimated');
|
|
20
20
|
const reactNativeSafeAreaContext = require('react-native-safe-area-context');
|
|
21
21
|
const Svg = require('react-native-svg');
|
|
22
22
|
const reactDom$1 = require('@floating-ui/react-dom');
|
|
@@ -26,8 +26,8 @@ const isChromatic = require('chromatic/isChromatic');
|
|
|
26
26
|
|
|
27
27
|
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e["default"] : e; }
|
|
28
28
|
|
|
29
|
-
const Downshift__default = /*#__PURE__*/_interopDefaultLegacy(Downshift);
|
|
30
29
|
const Animated__default = /*#__PURE__*/_interopDefaultLegacy(Animated);
|
|
30
|
+
const Downshift__default = /*#__PURE__*/_interopDefaultLegacy(Downshift);
|
|
31
31
|
const Svg__default = /*#__PURE__*/_interopDefaultLegacy(Svg);
|
|
32
32
|
const isChromatic__default = /*#__PURE__*/_interopDefaultLegacy(isChromatic);
|
|
33
33
|
|
|
@@ -847,15 +847,15 @@ const card = {
|
|
|
847
847
|
}
|
|
848
848
|
};
|
|
849
849
|
|
|
850
|
-
const webAnimationContentDuration$
|
|
851
|
-
const webAnimationContentEasing$
|
|
850
|
+
const webAnimationContentDuration$1 = 400;
|
|
851
|
+
const webAnimationContentEasing$1 = {
|
|
852
852
|
x1: 0.77,
|
|
853
853
|
y1: 0,
|
|
854
854
|
x2: 0.175,
|
|
855
855
|
y2: 1
|
|
856
856
|
};
|
|
857
|
-
const webAnimationOverlayDuration$
|
|
858
|
-
const webAnimationOverlayEasing$
|
|
857
|
+
const webAnimationOverlayDuration$1 = 250;
|
|
858
|
+
const webAnimationOverlayEasing$1 = {
|
|
859
859
|
x1: 0.42,
|
|
860
860
|
y1: 0,
|
|
861
861
|
x2: 1,
|
|
@@ -890,12 +890,12 @@ const cardModal = {
|
|
|
890
890
|
},
|
|
891
891
|
animation: {
|
|
892
892
|
overlay: {
|
|
893
|
-
duration: webAnimationOverlayDuration$
|
|
894
|
-
easing: webAnimationOverlayEasing$
|
|
893
|
+
duration: webAnimationOverlayDuration$1,
|
|
894
|
+
easing: webAnimationOverlayEasing$1
|
|
895
895
|
},
|
|
896
896
|
content: {
|
|
897
|
-
duration: webAnimationContentDuration$
|
|
898
|
-
easing: webAnimationContentEasing$
|
|
897
|
+
duration: webAnimationContentDuration$1,
|
|
898
|
+
easing: webAnimationContentEasing$1
|
|
899
899
|
}
|
|
900
900
|
}
|
|
901
901
|
};
|
|
@@ -951,15 +951,15 @@ const choices = {
|
|
|
951
951
|
}
|
|
952
952
|
};
|
|
953
953
|
|
|
954
|
-
const webAnimationContentDuration
|
|
955
|
-
const webAnimationContentEasing
|
|
954
|
+
const webAnimationContentDuration = 400;
|
|
955
|
+
const webAnimationContentEasing = {
|
|
956
956
|
x1: 0.77,
|
|
957
957
|
y1: 0,
|
|
958
958
|
x2: 0.175,
|
|
959
959
|
y2: 1
|
|
960
960
|
};
|
|
961
|
-
const webAnimationOverlayDuration
|
|
962
|
-
const webAnimationOverlayEasing
|
|
961
|
+
const webAnimationOverlayDuration = 250;
|
|
962
|
+
const webAnimationOverlayEasing = {
|
|
963
963
|
x1: 0.42,
|
|
964
964
|
y1: 0,
|
|
965
965
|
x2: 1,
|
|
@@ -981,12 +981,12 @@ const dialogModal = {
|
|
|
981
981
|
},
|
|
982
982
|
animation: {
|
|
983
983
|
overlay: {
|
|
984
|
-
duration: webAnimationOverlayDuration
|
|
985
|
-
easing: webAnimationOverlayEasing
|
|
984
|
+
duration: webAnimationOverlayDuration,
|
|
985
|
+
easing: webAnimationOverlayEasing
|
|
986
986
|
},
|
|
987
987
|
content: {
|
|
988
|
-
duration: webAnimationContentDuration
|
|
989
|
-
easing: webAnimationContentEasing
|
|
988
|
+
duration: webAnimationContentDuration,
|
|
989
|
+
easing: webAnimationContentEasing
|
|
990
990
|
}
|
|
991
991
|
}
|
|
992
992
|
};
|
|
@@ -1895,20 +1895,6 @@ const forms = {
|
|
|
1895
1895
|
timePicker
|
|
1896
1896
|
};
|
|
1897
1897
|
|
|
1898
|
-
const webAnimationContentDuration = 600;
|
|
1899
|
-
const webAnimationContentEasing = {
|
|
1900
|
-
x1: 0.77,
|
|
1901
|
-
y1: 0,
|
|
1902
|
-
x2: 0.175,
|
|
1903
|
-
y2: 1
|
|
1904
|
-
};
|
|
1905
|
-
const webAnimationOverlayDuration = 250;
|
|
1906
|
-
const webAnimationOverlayEasing = {
|
|
1907
|
-
x1: 0.42,
|
|
1908
|
-
y1: 0,
|
|
1909
|
-
x2: 1,
|
|
1910
|
-
y2: 1
|
|
1911
|
-
};
|
|
1912
1898
|
const fullscreenModal = {
|
|
1913
1899
|
header: {
|
|
1914
1900
|
height: 56
|
|
@@ -1922,12 +1908,22 @@ const fullscreenModal = {
|
|
|
1922
1908
|
},
|
|
1923
1909
|
animation: {
|
|
1924
1910
|
overlay: {
|
|
1925
|
-
duration:
|
|
1926
|
-
easing:
|
|
1911
|
+
duration: 250,
|
|
1912
|
+
easing: {
|
|
1913
|
+
x1: 0.42,
|
|
1914
|
+
y1: 0,
|
|
1915
|
+
x2: 1,
|
|
1916
|
+
y2: 1
|
|
1917
|
+
}
|
|
1927
1918
|
},
|
|
1928
1919
|
content: {
|
|
1929
|
-
duration:
|
|
1930
|
-
easing:
|
|
1920
|
+
duration: 600,
|
|
1921
|
+
easing: {
|
|
1922
|
+
x1: 0.77,
|
|
1923
|
+
y1: 0,
|
|
1924
|
+
x2: 0.175,
|
|
1925
|
+
y2: 1
|
|
1926
|
+
}
|
|
1931
1927
|
}
|
|
1932
1928
|
}
|
|
1933
1929
|
};
|
|
@@ -4332,29 +4328,29 @@ const CardModalRotationContainer = /*#__PURE__*/react.forwardRef((props, ref) =>
|
|
|
4332
4328
|
});
|
|
4333
4329
|
});
|
|
4334
4330
|
|
|
4335
|
-
const contentAnimationEnter
|
|
4336
|
-
const contentAnimatioEnterActive
|
|
4337
|
-
const contentAnimatioExit
|
|
4338
|
-
const contentAnimatioExitActive
|
|
4339
|
-
const contentAnimationClassNames
|
|
4340
|
-
appear: contentAnimationEnter
|
|
4341
|
-
appearActive: contentAnimatioEnterActive
|
|
4342
|
-
enter: contentAnimationEnter
|
|
4343
|
-
enterActive: contentAnimatioEnterActive
|
|
4344
|
-
exit: contentAnimatioExit
|
|
4345
|
-
exitActive: contentAnimatioExitActive
|
|
4331
|
+
const contentAnimationEnter = "kitt-u_contentAnimationEnter_c11xxy4r";
|
|
4332
|
+
const contentAnimatioEnterActive = "kitt-u_contentAnimatioEnterActive_cl52117";
|
|
4333
|
+
const contentAnimatioExit = "kitt-u_contentAnimatioExit_cyjczep";
|
|
4334
|
+
const contentAnimatioExitActive = "kitt-u_contentAnimatioExitActive_cpsy3dt";
|
|
4335
|
+
const contentAnimationClassNames = {
|
|
4336
|
+
appear: contentAnimationEnter,
|
|
4337
|
+
appearActive: contentAnimatioEnterActive,
|
|
4338
|
+
enter: contentAnimationEnter,
|
|
4339
|
+
enterActive: contentAnimatioEnterActive,
|
|
4340
|
+
exit: contentAnimatioExit,
|
|
4341
|
+
exitActive: contentAnimatioExitActive
|
|
4346
4342
|
};
|
|
4347
|
-
const opacityEnter
|
|
4348
|
-
const opacityEnterActive
|
|
4349
|
-
const opacityExit
|
|
4350
|
-
const opacityExitActive
|
|
4351
|
-
const opacityClassNames
|
|
4352
|
-
appear: opacityEnter
|
|
4353
|
-
appearActive: opacityEnterActive
|
|
4354
|
-
enter: opacityEnter
|
|
4355
|
-
enterActive: opacityEnterActive
|
|
4356
|
-
exit: opacityExit
|
|
4357
|
-
exitActive: opacityExitActive
|
|
4343
|
+
const opacityEnter = "kitt-u_opacityEnter_o1ae40dx";
|
|
4344
|
+
const opacityEnterActive = "kitt-u_opacityEnterActive_o1t4vl7b";
|
|
4345
|
+
const opacityExit = "kitt-u_opacityExit_ogyytm1";
|
|
4346
|
+
const opacityExitActive = "kitt-u_opacityExitActive_o18xvk52";
|
|
4347
|
+
const opacityClassNames = {
|
|
4348
|
+
appear: opacityEnter,
|
|
4349
|
+
appearActive: opacityEnterActive,
|
|
4350
|
+
enter: opacityEnter,
|
|
4351
|
+
enterActive: opacityEnterActive,
|
|
4352
|
+
exit: opacityExit,
|
|
4353
|
+
exitActive: opacityExitActive
|
|
4358
4354
|
};
|
|
4359
4355
|
function CardModalAnimation({
|
|
4360
4356
|
children,
|
|
@@ -4390,7 +4386,7 @@ function CardModalAnimation({
|
|
|
4390
4386
|
...sharedProps,
|
|
4391
4387
|
nodeRef: overlayRef,
|
|
4392
4388
|
timeout: isAnimationEnabled ? animation.overlay.duration : 0,
|
|
4393
|
-
classNames: opacityClassNames
|
|
4389
|
+
classNames: opacityClassNames,
|
|
4394
4390
|
children: /*#__PURE__*/jsxRuntime.jsx(Overlay, {
|
|
4395
4391
|
ref: overlayRef,
|
|
4396
4392
|
onPress: onClose
|
|
@@ -4399,7 +4395,7 @@ function CardModalAnimation({
|
|
|
4399
4395
|
...sharedProps,
|
|
4400
4396
|
nodeRef: contentRef,
|
|
4401
4397
|
timeout: isAnimationEnabled ? animation.content.duration : 0,
|
|
4402
|
-
classNames: contentAnimationClassNames
|
|
4398
|
+
classNames: contentAnimationClassNames,
|
|
4403
4399
|
onEnter: onEnter,
|
|
4404
4400
|
onEntered: onEntered,
|
|
4405
4401
|
onExit: onExit,
|
|
@@ -4936,87 +4932,167 @@ const ChoicesElements = {
|
|
|
4936
4932
|
ButtonChoices
|
|
4937
4933
|
};
|
|
4938
4934
|
|
|
4939
|
-
|
|
4940
|
-
|
|
4941
|
-
const contentAnimatioExit = "kitt-u_contentAnimatioExit_cwjstxl";
|
|
4942
|
-
const contentAnimatioExitActive = "kitt-u_contentAnimatioExitActive_c1almbvu";
|
|
4943
|
-
const contentAnimationClassNames = {
|
|
4944
|
-
appear: contentAnimationEnter,
|
|
4945
|
-
appearActive: contentAnimatioEnterActive,
|
|
4946
|
-
enter: contentAnimationEnter,
|
|
4947
|
-
enterActive: contentAnimatioEnterActive,
|
|
4948
|
-
exit: contentAnimatioExit,
|
|
4949
|
-
exitActive: contentAnimatioExitActive
|
|
4950
|
-
};
|
|
4951
|
-
const opacityEnter$1 = "kitt-u_opacityEnter_o9rkayr";
|
|
4952
|
-
const opacityEnterActive$1 = "kitt-u_opacityEnterActive_od7zvm9";
|
|
4953
|
-
const opacityExit$1 = "kitt-u_opacityExit_opddo9j";
|
|
4954
|
-
const opacityExitActive$1 = "kitt-u_opacityExitActive_o15v6ove";
|
|
4955
|
-
const opacityClassNames$1 = {
|
|
4956
|
-
appear: opacityEnter$1,
|
|
4957
|
-
appearActive: opacityEnterActive$1,
|
|
4958
|
-
enter: opacityEnter$1,
|
|
4959
|
-
enterActive: opacityEnterActive$1,
|
|
4960
|
-
exit: opacityExit$1,
|
|
4961
|
-
exitActive: opacityExitActive$1
|
|
4962
|
-
};
|
|
4963
|
-
function DialogModalAnimation({
|
|
4935
|
+
function NativeOpacityAnimation({
|
|
4936
|
+
visible,
|
|
4964
4937
|
children,
|
|
4965
|
-
|
|
4938
|
+
onExited
|
|
4939
|
+
}) {
|
|
4940
|
+
const theme = useTheme();
|
|
4941
|
+
const hasRunAnimationRef = react.useRef(false);
|
|
4942
|
+
react.useEffect(() => {
|
|
4943
|
+
if (visible) {
|
|
4944
|
+
hasRunAnimationRef.current = true;
|
|
4945
|
+
}
|
|
4946
|
+
}, [visible]);
|
|
4947
|
+
function handleAnimationFinished() {
|
|
4948
|
+
if (!visible && hasRunAnimationRef.current) {
|
|
4949
|
+
onExited();
|
|
4950
|
+
}
|
|
4951
|
+
}
|
|
4952
|
+
const opacityStyle = Animated.useAnimatedStyle(() => {
|
|
4953
|
+
const {
|
|
4954
|
+
duration,
|
|
4955
|
+
easing
|
|
4956
|
+
} = theme.kitt.dialogModal.animation.overlay;
|
|
4957
|
+
const {
|
|
4958
|
+
x1,
|
|
4959
|
+
y1,
|
|
4960
|
+
x2,
|
|
4961
|
+
y2
|
|
4962
|
+
} = easing;
|
|
4963
|
+
return {
|
|
4964
|
+
opacity: Animated.withTiming(visible ? 1 : 0, {
|
|
4965
|
+
duration,
|
|
4966
|
+
easing: Animated.Easing.bezier(x1, y1, x2, y2)
|
|
4967
|
+
}, isFinished => {
|
|
4968
|
+
if (!isFinished) return;
|
|
4969
|
+
Animated.runOnJS(handleAnimationFinished)();
|
|
4970
|
+
})
|
|
4971
|
+
};
|
|
4972
|
+
}, [theme, visible, handleAnimationFinished]);
|
|
4973
|
+
return /*#__PURE__*/jsxRuntime.jsx(Animated__default.View, {
|
|
4974
|
+
style: [reactNative.StyleSheet.absoluteFillObject, opacityStyle],
|
|
4975
|
+
children: children
|
|
4976
|
+
});
|
|
4977
|
+
}
|
|
4978
|
+
|
|
4979
|
+
function NativeRotationAnimation({
|
|
4966
4980
|
visible,
|
|
4967
|
-
|
|
4968
|
-
|
|
4981
|
+
children,
|
|
4982
|
+
onEntered,
|
|
4983
|
+
onExited
|
|
4984
|
+
}) {
|
|
4985
|
+
const theme = useTheme();
|
|
4986
|
+
const hasRunAnimationRef = react.useRef(false);
|
|
4987
|
+
const rotation = Animated.useSharedValue(0.8);
|
|
4988
|
+
react.useEffect(() => {
|
|
4989
|
+
if (visible) {
|
|
4990
|
+
hasRunAnimationRef.current = true;
|
|
4991
|
+
}
|
|
4992
|
+
}, [visible]);
|
|
4993
|
+
function handleAnimationFinished() {
|
|
4994
|
+
if (visible) {
|
|
4995
|
+
if (onEntered) onEntered();
|
|
4996
|
+
}
|
|
4997
|
+
if (!visible && hasRunAnimationRef.current) onExited();
|
|
4998
|
+
}
|
|
4999
|
+
const animatedStyle = Animated.useAnimatedStyle(() => {
|
|
5000
|
+
const {
|
|
5001
|
+
duration,
|
|
5002
|
+
easing
|
|
5003
|
+
} = theme.kitt.dialogModal.animation.content;
|
|
5004
|
+
const {
|
|
5005
|
+
x1,
|
|
5006
|
+
y1,
|
|
5007
|
+
x2,
|
|
5008
|
+
y2
|
|
5009
|
+
} = easing;
|
|
5010
|
+
rotation.value = Animated.withTiming(visible ? 0 : 5, {
|
|
5011
|
+
duration,
|
|
5012
|
+
easing: Animated.Easing.bezier(x1, y1, x2, y2)
|
|
5013
|
+
}, isFinished => {
|
|
5014
|
+
if (!isFinished) return;
|
|
5015
|
+
Animated.runOnJS(handleAnimationFinished)();
|
|
5016
|
+
});
|
|
5017
|
+
return {
|
|
5018
|
+
opacity: Animated.withTiming(visible ? 1 : 0, {
|
|
5019
|
+
duration,
|
|
5020
|
+
easing: Animated.Easing.bezier(x1, y1, x2, y2)
|
|
5021
|
+
}),
|
|
5022
|
+
transform: [{
|
|
5023
|
+
scale: Animated.withTiming(visible ? 1 : 0.8, {
|
|
5024
|
+
duration,
|
|
5025
|
+
easing: Animated.Easing.bezier(x1, y1, x2, y2)
|
|
5026
|
+
})
|
|
5027
|
+
}, {
|
|
5028
|
+
rotateZ: `${rotation.value}deg`
|
|
5029
|
+
}]
|
|
5030
|
+
};
|
|
5031
|
+
}, [theme, visible, rotation, handleAnimationFinished]);
|
|
5032
|
+
return /*#__PURE__*/jsxRuntime.jsx(Animated__default.View, {
|
|
5033
|
+
style: [animatedStyle],
|
|
5034
|
+
children: children
|
|
5035
|
+
});
|
|
5036
|
+
}
|
|
5037
|
+
|
|
5038
|
+
function DialogModalAnimation({
|
|
5039
|
+
visible,
|
|
5040
|
+
children,
|
|
4969
5041
|
onEnter,
|
|
4970
5042
|
onEntered,
|
|
4971
5043
|
onExit,
|
|
4972
5044
|
onExited,
|
|
4973
|
-
onClose
|
|
4974
|
-
...props
|
|
5045
|
+
onClose
|
|
4975
5046
|
}) {
|
|
4976
|
-
|
|
4977
|
-
|
|
4978
|
-
const
|
|
4979
|
-
|
|
4980
|
-
|
|
4981
|
-
const {
|
|
4982
|
-
animation
|
|
4983
|
-
} = theme.kitt.dialogModal;
|
|
4984
|
-
const sharedProps = {
|
|
4985
|
-
in: visible,
|
|
4986
|
-
appear,
|
|
4987
|
-
unmountOnExit
|
|
5047
|
+
const [isModalVisible, setIsModalVisible] = react.useState(visible);
|
|
5048
|
+
const [isContentVisible, setIsContentVisible] = react.useState(false);
|
|
5049
|
+
const handleAnimationExited = () => {
|
|
5050
|
+
setIsModalVisible(false);
|
|
5051
|
+
// Android doesn't handle the onDismiss callback on the modal, we need to call it manually
|
|
4988
5052
|
};
|
|
4989
|
-
|
|
4990
|
-
|
|
4991
|
-
|
|
4992
|
-
|
|
4993
|
-
|
|
4994
|
-
|
|
4995
|
-
|
|
4996
|
-
|
|
4997
|
-
|
|
4998
|
-
|
|
4999
|
-
|
|
5000
|
-
|
|
5001
|
-
|
|
5002
|
-
|
|
5003
|
-
|
|
5004
|
-
|
|
5005
|
-
|
|
5006
|
-
|
|
5007
|
-
|
|
5008
|
-
|
|
5009
|
-
|
|
5010
|
-
|
|
5011
|
-
|
|
5012
|
-
|
|
5013
|
-
|
|
5014
|
-
|
|
5015
|
-
|
|
5016
|
-
|
|
5017
|
-
|
|
5018
|
-
|
|
5019
|
-
|
|
5053
|
+
react.useEffect(() => {
|
|
5054
|
+
if (!(!visible && isContentVisible)) return;
|
|
5055
|
+
if (onExit) onExit();
|
|
5056
|
+
setIsContentVisible(false);
|
|
5057
|
+
}, [visible, isContentVisible, onExit]);
|
|
5058
|
+
return /*#__PURE__*/jsxRuntime.jsx(reactNative.Modal, {
|
|
5059
|
+
transparent: true,
|
|
5060
|
+
supportedOrientations: ['landscape', 'portrait'],
|
|
5061
|
+
visible: isModalVisible,
|
|
5062
|
+
onShow: () => {
|
|
5063
|
+
if (onEnter) onEnter();
|
|
5064
|
+
setIsContentVisible(true);
|
|
5065
|
+
},
|
|
5066
|
+
onDismiss: () => {
|
|
5067
|
+
if (onExited) onExited();
|
|
5068
|
+
},
|
|
5069
|
+
children: /*#__PURE__*/jsxRuntime.jsxs(View
|
|
5070
|
+
// This is an ugly workaround to make the Modal calculate its height correctly on Android.
|
|
5071
|
+
// This ugly workaround is used in FullScreenModalAnimation and CardModalAnimation as well
|
|
5072
|
+
// TODO [expo@>=53]: Check if still needed
|
|
5073
|
+
, {
|
|
5074
|
+
height: undefined,
|
|
5075
|
+
position: "relative",
|
|
5076
|
+
flexGrow: 1,
|
|
5077
|
+
justifyContent: "center",
|
|
5078
|
+
alignItems: "center",
|
|
5079
|
+
children: [/*#__PURE__*/jsxRuntime.jsx(NativeOpacityAnimation, {
|
|
5080
|
+
visible: isContentVisible,
|
|
5081
|
+
onExited: handleAnimationExited,
|
|
5082
|
+
children: /*#__PURE__*/jsxRuntime.jsx(Overlay, {
|
|
5083
|
+
onPress: onClose
|
|
5084
|
+
})
|
|
5085
|
+
}), /*#__PURE__*/jsxRuntime.jsx(NativeRotationAnimation, {
|
|
5086
|
+
visible: isContentVisible,
|
|
5087
|
+
onExited: handleAnimationExited,
|
|
5088
|
+
onEntered: onEntered,
|
|
5089
|
+
children: /*#__PURE__*/jsxRuntime.jsx(View, {
|
|
5090
|
+
paddingX: "kitt.dialogModal.overlayPadding.horizontal",
|
|
5091
|
+
paddingY: "kitt.dialogModal.overlayPadding.vertical",
|
|
5092
|
+
children: children
|
|
5093
|
+
})
|
|
5094
|
+
})]
|
|
5095
|
+
})
|
|
5020
5096
|
});
|
|
5021
5097
|
}
|
|
5022
5098
|
|
|
@@ -7571,29 +7647,23 @@ function FullscreenModalFooter({
|
|
|
7571
7647
|
});
|
|
7572
7648
|
}
|
|
7573
7649
|
|
|
7574
|
-
const
|
|
7575
|
-
|
|
7576
|
-
const
|
|
7577
|
-
|
|
7578
|
-
|
|
7579
|
-
|
|
7580
|
-
|
|
7581
|
-
|
|
7582
|
-
|
|
7583
|
-
exit: slideInFromBottomExit,
|
|
7584
|
-
exitActive: slideInFromBottomExitActive
|
|
7650
|
+
const styles$1 = {"overlay-enter":"FullscreenModalAnimation-module_overlay-enter__L1J1X","overlay-enter-active":"FullscreenModalAnimation-module_overlay-enter-active__gDEVb","overlay-exit":"FullscreenModalAnimation-module_overlay-exit__Qx1WE","overlay-exit-active":"FullscreenModalAnimation-module_overlay-exit-active__lFR3x","content-enter":"FullscreenModalAnimation-module_content-enter__JmCWa","content-enter-active":"FullscreenModalAnimation-module_content-enter-active__iaNRs","content-exit":"FullscreenModalAnimation-module_content-exit__hB0wY","content-exit-active":"FullscreenModalAnimation-module_content-exit-active__BPVPo"};
|
|
7651
|
+
|
|
7652
|
+
const overlayClassNames = {
|
|
7653
|
+
appear: styles$1['overlay-enter'],
|
|
7654
|
+
appearActive: styles$1['overlay-enter-active'],
|
|
7655
|
+
enter: styles$1['overlay-enter'],
|
|
7656
|
+
enterActive: styles$1['overlay-enter-active'],
|
|
7657
|
+
exit: styles$1['overlay-exit'],
|
|
7658
|
+
exitActive: styles$1['overlay-exit-active']
|
|
7585
7659
|
};
|
|
7586
|
-
const
|
|
7587
|
-
|
|
7588
|
-
|
|
7589
|
-
|
|
7590
|
-
|
|
7591
|
-
|
|
7592
|
-
|
|
7593
|
-
enter: opacityEnter,
|
|
7594
|
-
enterActive: opacityEnterActive,
|
|
7595
|
-
exit: opacityExit,
|
|
7596
|
-
exitActive: opacityExitActive
|
|
7660
|
+
const slideInClassNames = {
|
|
7661
|
+
appear: styles$1['content-enter'],
|
|
7662
|
+
appearActive: styles$1['content-enter-active'],
|
|
7663
|
+
enter: styles$1['content-enter'],
|
|
7664
|
+
enterActive: styles$1['content-enter-active'],
|
|
7665
|
+
exit: styles$1['content-exit'],
|
|
7666
|
+
exitActive: styles$1['content-exit-active']
|
|
7597
7667
|
};
|
|
7598
7668
|
function FullscreenModalAnimation({
|
|
7599
7669
|
children,
|
|
@@ -7621,31 +7691,44 @@ function FullscreenModalAnimation({
|
|
|
7621
7691
|
appear,
|
|
7622
7692
|
unmountOnExit
|
|
7623
7693
|
};
|
|
7624
|
-
|
|
7694
|
+
|
|
7695
|
+
// CSS custom properties for theme-based animation values
|
|
7696
|
+
const overlayEasing = animation.overlay.easing;
|
|
7697
|
+
const contentEasing = animation.content.easing;
|
|
7698
|
+
const cssVariables = {
|
|
7699
|
+
'--overlay-duration': `${animation.overlay.duration}ms`,
|
|
7700
|
+
'--overlay-easing': `cubic-bezier(${overlayEasing.x1}, ${overlayEasing.y1}, ${overlayEasing.x2}, ${overlayEasing.y2})`,
|
|
7701
|
+
'--content-duration': `${animation.content.duration}ms`,
|
|
7702
|
+
'--content-easing': `cubic-bezier(${contentEasing.x1}, ${contentEasing.y1}, ${contentEasing.x2}, ${contentEasing.y2})`
|
|
7703
|
+
};
|
|
7704
|
+
return /*#__PURE__*/jsxRuntime.jsx(View, {
|
|
7625
7705
|
...props,
|
|
7626
|
-
children:
|
|
7627
|
-
|
|
7628
|
-
|
|
7629
|
-
|
|
7630
|
-
|
|
7631
|
-
|
|
7632
|
-
|
|
7633
|
-
|
|
7634
|
-
|
|
7635
|
-
|
|
7636
|
-
|
|
7637
|
-
|
|
7638
|
-
|
|
7639
|
-
|
|
7640
|
-
|
|
7641
|
-
|
|
7642
|
-
|
|
7643
|
-
|
|
7644
|
-
|
|
7645
|
-
|
|
7646
|
-
children:
|
|
7647
|
-
|
|
7648
|
-
|
|
7706
|
+
children: /*#__PURE__*/jsxRuntime.jsxs("div", {
|
|
7707
|
+
style: cssVariables,
|
|
7708
|
+
children: [/*#__PURE__*/jsxRuntime.jsx(reactTransitionGroup.CSSTransition, {
|
|
7709
|
+
...sharedProps,
|
|
7710
|
+
nodeRef: overlayRef,
|
|
7711
|
+
timeout: isAnimationEnabled ? animation.overlay.duration : 0,
|
|
7712
|
+
classNames: overlayClassNames,
|
|
7713
|
+
children: /*#__PURE__*/jsxRuntime.jsx(Overlay, {
|
|
7714
|
+
ref: overlayRef,
|
|
7715
|
+
onPress: onClose
|
|
7716
|
+
})
|
|
7717
|
+
}), /*#__PURE__*/jsxRuntime.jsx(reactTransitionGroup.CSSTransition, {
|
|
7718
|
+
...sharedProps,
|
|
7719
|
+
nodeRef: contentRef,
|
|
7720
|
+
timeout: isAnimationEnabled ? animation.content.duration : 0,
|
|
7721
|
+
classNames: slideInClassNames,
|
|
7722
|
+
onEnter: onEnter,
|
|
7723
|
+
onEntered: onEntered,
|
|
7724
|
+
onExit: onExit,
|
|
7725
|
+
onExited: onExited,
|
|
7726
|
+
children: /*#__PURE__*/jsxRuntime.jsx(View, {
|
|
7727
|
+
ref: contentRef,
|
|
7728
|
+
children: children
|
|
7729
|
+
})
|
|
7730
|
+
})]
|
|
7731
|
+
})
|
|
7649
7732
|
});
|
|
7650
7733
|
}
|
|
7651
7734
|
|