@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.
Files changed (52) hide show
  1. package/CHANGELOG.md +17 -2
  2. package/dist/definitions/CardModal/CardModalAnimation/OpacityAnimation.d.ts +8 -0
  3. package/dist/definitions/CardModal/CardModalAnimation/OpacityAnimation.d.ts.map +1 -0
  4. package/dist/definitions/CardModal/CardModalAnimation/{NativeRotationAnimation.d.ts → RotationAnimation.d.ts} +3 -3
  5. package/dist/definitions/CardModal/CardModalAnimation/RotationAnimation.d.ts.map +1 -0
  6. package/dist/definitions/DialogModal/DialogModalAnimation/NativeOpacityAnimation.d.ts.map +1 -1
  7. package/dist/definitions/DialogModal/DialogModalAnimation/NativeRotationAnimation.d.ts.map +1 -1
  8. package/dist/definitions/FullscreenModal/FullscreenModalAnimation.web.d.ts.map +1 -1
  9. package/dist/definitions/themes/late-ocean/fullscreenModal.d.ts +0 -14
  10. package/dist/definitions/themes/late-ocean/fullscreenModal.d.ts.map +1 -1
  11. package/dist/index-metro.es.android.js +44 -42
  12. package/dist/index-metro.es.android.js.map +1 -1
  13. package/dist/index-metro.es.ios.js +44 -42
  14. package/dist/index-metro.es.ios.js.map +1 -1
  15. package/dist/index-node-22.17.cjs.js +44 -42
  16. package/dist/index-node-22.17.cjs.js.map +1 -1
  17. package/dist/index-node-22.17.cjs.web.css +38 -16
  18. package/dist/index-node-22.17.cjs.web.js +262 -179
  19. package/dist/index-node-22.17.cjs.web.js.map +1 -1
  20. package/dist/index-node-22.17.es.mjs +44 -42
  21. package/dist/index-node-22.17.es.mjs.map +1 -1
  22. package/dist/index-node-22.17.es.web.css +38 -16
  23. package/dist/index-node-22.17.es.web.mjs +262 -179
  24. package/dist/index-node-22.17.es.web.mjs.map +1 -1
  25. package/dist/index.es.js +44 -42
  26. package/dist/index.es.js.map +1 -1
  27. package/dist/index.es.web.js +288 -206
  28. package/dist/index.es.web.js.map +1 -1
  29. package/dist/linaria-themes-metro.es.android.js +30 -34
  30. package/dist/linaria-themes-metro.es.android.js.map +1 -1
  31. package/dist/linaria-themes-metro.es.ios.js +30 -34
  32. package/dist/linaria-themes-metro.es.ios.js.map +1 -1
  33. package/dist/linaria-themes-node-22.17.cjs.js +30 -34
  34. package/dist/linaria-themes-node-22.17.cjs.js.map +1 -1
  35. package/dist/linaria-themes-node-22.17.cjs.web.js +30 -34
  36. package/dist/linaria-themes-node-22.17.cjs.web.js.map +1 -1
  37. package/dist/linaria-themes-node-22.17.es.mjs +30 -34
  38. package/dist/linaria-themes-node-22.17.es.mjs.map +1 -1
  39. package/dist/linaria-themes-node-22.17.es.web.mjs +30 -34
  40. package/dist/linaria-themes-node-22.17.es.web.mjs.map +1 -1
  41. package/dist/linaria-themes.es.js +30 -34
  42. package/dist/linaria-themes.es.js.map +1 -1
  43. package/dist/linaria-themes.es.web.js +30 -34
  44. package/dist/linaria-themes.es.web.js.map +1 -1
  45. package/dist/styles.css +38 -16
  46. package/dist/tsbuildinfo +1 -1
  47. package/package.json +1 -1
  48. package/dist/definitions/CardModal/CardModalAnimation/NativeOpacityAnimation.d.ts +0 -8
  49. package/dist/definitions/CardModal/CardModalAnimation/NativeOpacityAnimation.d.ts.map +0 -1
  50. package/dist/definitions/CardModal/CardModalAnimation/NativeRotationAnimation.d.ts.map +0 -1
  51. package/dist/definitions/DialogModal/DialogModalAnimation/DialogModalAnimation.web.d.ts +0 -4
  52. package/dist/definitions/DialogModal/DialogModalAnimation/DialogModalAnimation.web.d.ts.map +0 -1
@@ -11,10 +11,11 @@ import _typeof from '@babel/runtime/helpers/typeof';
11
11
  import _regeneratorRuntime from '@babel/runtime/helpers/regeneratorRuntime';
12
12
  import _asyncToGenerator from '@babel/runtime/helpers/asyncToGenerator';
13
13
  import { SpinnerGapRegularIcon, UserRegularIcon, XRegularIcon, ArrowLeftRegularIcon, CaretUpFillIcon, CaretDownFillIcon, MapPinRegularIcon, EyeClosedRegularIcon, EyeRegularIcon, CheckCircleFillIcon, CaretDownRegularIcon, CaretRightRegularIcon, InfoRegularIcon, WarningRegularIcon, CheckRegularIcon, WarningCircleRegularIcon, ArrowCounterClockwiseRegularIcon, InfoFillIcon, WarningCircleFillIcon, WarningFillIcon } from '@ornikar/kitt-icons/phosphor';
14
- import { Animated, Easing, ScrollView as ScrollView$2, View as View$2, Linking, Pressable as Pressable$2, StyleSheet, useWindowDimensions } from 'react-native';
14
+ import { Animated, Easing, ScrollView as ScrollView$2, View as View$2, StyleSheet, Modal, Linking, Pressable as Pressable$2, useWindowDimensions } from 'react-native';
15
15
  export { useWindowDimensions as useWindowSize } from 'react-native';
16
16
  import { createPortal } from 'react-dom';
17
17
  import { CSSTransition } from 'react-transition-group';
18
+ import Animated$1, { useAnimatedStyle, withTiming, Easing as Easing$1, runOnJS, useSharedValue, withSpring, interpolateColor, useAnimatedProps, withDelay, withRepeat, interpolate, ReducedMotionConfig, ReduceMotion } from 'react-native-reanimated';
18
19
  import { parse } from '@twemoji/parser';
19
20
  import Downshift, { useSelect } from 'downshift';
20
21
  import { getDocumentAsync } from 'expo-document-picker';
@@ -22,7 +23,6 @@ import { launchImageLibraryAsync } from 'expo-image-picker';
22
23
  import { useDebouncedCallback } from 'use-debounce';
23
24
  import { Loader } from '@googlemaps/js-api-loader';
24
25
  import { parseNumber, getCountryCallingCode, isValidNumber } from 'libphonenumber-js';
25
- import Animated$1, { useAnimatedStyle, withSpring, withTiming, useSharedValue, interpolateColor, Easing as Easing$1, useAnimatedProps, withDelay, withRepeat, interpolate, runOnJS, ReducedMotionConfig, ReduceMotion } from 'react-native-reanimated';
26
26
  import { useSafeAreaInsets } from 'react-native-safe-area-context';
27
27
  import Svg, { Circle as Circle$1 } from 'react-native-svg';
28
28
  import { useFloating, autoUpdate, offset, autoPlacement, shift, arrow } from '@floating-ui/react-dom';
@@ -856,15 +856,15 @@ var card = {
856
856
  }
857
857
  };
858
858
 
859
- var webAnimationContentDuration$2 = 400;
860
- var webAnimationContentEasing$2 = {
859
+ var webAnimationContentDuration$1 = 400;
860
+ var webAnimationContentEasing$1 = {
861
861
  x1: 0.77,
862
862
  y1: 0,
863
863
  x2: 0.175,
864
864
  y2: 1
865
865
  };
866
- var webAnimationOverlayDuration$2 = 250;
867
- var webAnimationOverlayEasing$2 = {
866
+ var webAnimationOverlayDuration$1 = 250;
867
+ var webAnimationOverlayEasing$1 = {
868
868
  x1: 0.42,
869
869
  y1: 0,
870
870
  x2: 1,
@@ -899,12 +899,12 @@ var cardModal = {
899
899
  },
900
900
  animation: {
901
901
  overlay: {
902
- duration: webAnimationOverlayDuration$2,
903
- easing: webAnimationOverlayEasing$2
902
+ duration: webAnimationOverlayDuration$1,
903
+ easing: webAnimationOverlayEasing$1
904
904
  },
905
905
  content: {
906
- duration: webAnimationContentDuration$2,
907
- easing: webAnimationContentEasing$2
906
+ duration: webAnimationContentDuration$1,
907
+ easing: webAnimationContentEasing$1
908
908
  }
909
909
  }
910
910
  };
@@ -960,15 +960,15 @@ var choices = {
960
960
  }
961
961
  };
962
962
 
963
- var webAnimationContentDuration$1 = 400;
964
- var webAnimationContentEasing$1 = {
963
+ var webAnimationContentDuration = 400;
964
+ var webAnimationContentEasing = {
965
965
  x1: 0.77,
966
966
  y1: 0,
967
967
  x2: 0.175,
968
968
  y2: 1
969
969
  };
970
- var webAnimationOverlayDuration$1 = 250;
971
- var webAnimationOverlayEasing$1 = {
970
+ var webAnimationOverlayDuration = 250;
971
+ var webAnimationOverlayEasing = {
972
972
  x1: 0.42,
973
973
  y1: 0,
974
974
  x2: 1,
@@ -990,12 +990,12 @@ var dialogModal = {
990
990
  },
991
991
  animation: {
992
992
  overlay: {
993
- duration: webAnimationOverlayDuration$1,
994
- easing: webAnimationOverlayEasing$1
993
+ duration: webAnimationOverlayDuration,
994
+ easing: webAnimationOverlayEasing
995
995
  },
996
996
  content: {
997
- duration: webAnimationContentDuration$1,
998
- easing: webAnimationContentEasing$1
997
+ duration: webAnimationContentDuration,
998
+ easing: webAnimationContentEasing
999
999
  }
1000
1000
  }
1001
1001
  };
@@ -1904,20 +1904,6 @@ var forms = {
1904
1904
  timePicker: timePicker
1905
1905
  };
1906
1906
 
1907
- var webAnimationContentDuration = 600;
1908
- var webAnimationContentEasing = {
1909
- x1: 0.77,
1910
- y1: 0,
1911
- x2: 0.175,
1912
- y2: 1
1913
- };
1914
- var webAnimationOverlayDuration = 250;
1915
- var webAnimationOverlayEasing = {
1916
- x1: 0.42,
1917
- y1: 0,
1918
- x2: 1,
1919
- y2: 1
1920
- };
1921
1907
  var fullscreenModal = {
1922
1908
  header: {
1923
1909
  height: 56
@@ -1931,12 +1917,22 @@ var fullscreenModal = {
1931
1917
  },
1932
1918
  animation: {
1933
1919
  overlay: {
1934
- duration: webAnimationOverlayDuration,
1935
- easing: webAnimationOverlayEasing
1920
+ duration: 250,
1921
+ easing: {
1922
+ x1: 0.42,
1923
+ y1: 0,
1924
+ x2: 1,
1925
+ y2: 1
1926
+ }
1936
1927
  },
1937
1928
  content: {
1938
- duration: webAnimationContentDuration,
1939
- easing: webAnimationContentEasing
1929
+ duration: 600,
1930
+ easing: {
1931
+ x1: 0.77,
1932
+ y1: 0,
1933
+ x2: 0.175,
1934
+ y2: 1
1935
+ }
1940
1936
  }
1941
1937
  }
1942
1938
  };
@@ -2863,7 +2859,7 @@ function ActionCardDisabled(_ref) {
2863
2859
  });
2864
2860
  }
2865
2861
 
2866
- var _excluded$Q = ["children", "variant", "borderVariant", "borderRadius", "disabled", "isHovered", "isPressed", "isFocused"];
2862
+ var _excluded$P = ["children", "variant", "borderVariant", "borderRadius", "disabled", "isHovered", "isPressed", "isFocused"];
2867
2863
  function ActionCard(_ref) {
2868
2864
  var children = _ref.children,
2869
2865
  _ref$variant = _ref.variant,
@@ -2876,7 +2872,7 @@ function ActionCard(_ref) {
2876
2872
  isHovered = _ref.isHovered,
2877
2873
  isPressed = _ref.isPressed,
2878
2874
  isFocused = _ref.isFocused,
2879
- props = _objectWithoutProperties(_ref, _excluded$Q);
2875
+ props = _objectWithoutProperties(_ref, _excluded$P);
2880
2876
  return /*#__PURE__*/jsx(View, _objectSpread(_objectSpread({}, props), {}, {
2881
2877
  children: disabled ? /*#__PURE__*/jsx(ActionCardDisabled, {
2882
2878
  borderRadius: borderRadius,
@@ -3208,7 +3204,7 @@ var getTypographyTypeWithAncestorValue = function (type, typographyTypeInContext
3208
3204
  return !!isAllValuesUndefined && !!typographyTypeInContext ? typographyTypeInContext : type;
3209
3205
  };
3210
3206
 
3211
- var _excluded$P = ["accessibilityRole", "base", "small", "medium", "large", "wide", "type", "variant", "color"];
3207
+ var _excluded$O = ["accessibilityRole", "base", "small", "medium", "large", "wide", "type", "variant", "color"];
3212
3208
  var TypographyFamilyContext = /*#__PURE__*/createContext(null);
3213
3209
  var TypographyTypeContext = /*#__PURE__*/createContext(null);
3214
3210
  var TypographyVariantContext = /*#__PURE__*/createContext(undefined);
@@ -3333,7 +3329,7 @@ var TypographyBase = /*#__PURE__*/forwardRef(function (_ref2, ref) {
3333
3329
  } : _ref2$type,
3334
3330
  variant = _ref2.variant,
3335
3331
  color = _ref2.color,
3336
- otherProps = _objectWithoutProperties(_ref2, _excluded$P);
3332
+ otherProps = _objectWithoutProperties(_ref2, _excluded$O);
3337
3333
  var sx = useSx();
3338
3334
 
3339
3335
  // ancestors
@@ -3495,12 +3491,12 @@ function Icon(_ref) {
3495
3491
  });
3496
3492
  }
3497
3493
 
3498
- var _excluded$O = ["color", "size"],
3494
+ var _excluded$N = ["color", "size"],
3499
3495
  _excluded2$6 = ["color"];
3500
3496
  function TypographyIconSpecifiedColor(_ref) {
3501
3497
  var color = _ref.color,
3502
3498
  size = _ref.size,
3503
- props = _objectWithoutProperties(_ref, _excluded$O);
3499
+ props = _objectWithoutProperties(_ref, _excluded$N);
3504
3500
  var colorValue = getTypographyColorValue(color);
3505
3501
  var sx = useSx();
3506
3502
  var _sx = sx({
@@ -3540,7 +3536,7 @@ var getButtonTextColorByType = function (type, variant, isHovered, isPressed, is
3540
3536
  return "".concat(baseKey, ".default");
3541
3537
  };
3542
3538
 
3543
- var _excluded$N = ["type", "variant", "isDisabled", "icon", "children", "isHovered", "isPressed", "isFocused", "innerSpacing", "size"];
3539
+ var _excluded$M = ["type", "variant", "isDisabled", "icon", "children", "isHovered", "isPressed", "isFocused", "innerSpacing", "size"];
3544
3540
  function ButtonContentChildren(_ref) {
3545
3541
  var type = _ref.type,
3546
3542
  icon = _ref.icon,
@@ -3640,7 +3636,7 @@ function ButtonContent(_ref2) {
3640
3636
  _ref2.isFocused;
3641
3637
  var innerSpacing = _ref2.innerSpacing,
3642
3638
  size = _ref2.size,
3643
- props = _objectWithoutProperties(_ref2, _excluded$N);
3639
+ props = _objectWithoutProperties(_ref2, _excluded$M);
3644
3640
  var color = getButtonTextColorByType(type, variant, isHovered, isPressed, isDisabled);
3645
3641
  return /*#__PURE__*/jsx(View, {
3646
3642
  _web: {
@@ -3941,7 +3937,7 @@ function LoaderIcon(_ref) {
3941
3937
  });
3942
3938
  }
3943
3939
 
3944
- var _excluded$M = ["as", "onPress", "disabled", "icon", "stretch"];
3940
+ var _excluded$L = ["as", "onPress", "disabled", "icon", "stretch"];
3945
3941
  var ActionsItem = /*#__PURE__*/forwardRef(function (_ref, ref) {
3946
3942
  var as = _ref.as,
3947
3943
  onPress = _ref.onPress,
@@ -3952,7 +3948,7 @@ var ActionsItem = /*#__PURE__*/forwardRef(function (_ref, ref) {
3952
3948
  base: true,
3953
3949
  medium: false
3954
3950
  } : _ref$stretch,
3955
- props = _objectWithoutProperties(_ref, _excluded$M);
3951
+ props = _objectWithoutProperties(_ref, _excluded$L);
3956
3952
  var _useState = useState(false),
3957
3953
  _useState2 = _slicedToArray(_useState, 2),
3958
3954
  isLoading = _useState2[0],
@@ -4030,7 +4026,7 @@ function ActionsButton(_ref) {
4030
4026
  }, props));
4031
4027
  }
4032
4028
 
4033
- var _excluded$L = ["children", "layout", "reversed"];
4029
+ var _excluded$K = ["children", "layout", "reversed"];
4034
4030
  function getCurrentLayout(layout) {
4035
4031
  if (!layout) return {
4036
4032
  base: 'stretch',
@@ -4062,7 +4058,7 @@ function Actions(_ref) {
4062
4058
  reversed = _ref$reversed === void 0 ? {
4063
4059
  base: false
4064
4060
  } : _ref$reversed,
4065
- props = _objectWithoutProperties(_ref, _excluded$L);
4061
+ props = _objectWithoutProperties(_ref, _excluded$K);
4066
4062
  var shouldReverse = typeof reversed === 'boolean' ? {
4067
4063
  base: !!reversed
4068
4064
  } : createResponsiveStyleFromProp(reversed, true, false);
@@ -4115,7 +4111,7 @@ function getInitials(firstname, lastname) {
4115
4111
  return "".concat(firstname[0]).concat(lastname[0]).toUpperCase();
4116
4112
  }
4117
4113
 
4118
- var _excluded$K = ["size", "round", "light", "sizeVariant", "width", "height", "dark", "disabled"];
4114
+ var _excluded$J = ["size", "round", "light", "sizeVariant", "width", "height", "dark", "disabled"];
4119
4115
  function AvatarContent(_ref) {
4120
4116
  var size = _ref.size,
4121
4117
  src = _ref.src,
@@ -4178,7 +4174,7 @@ function Avatar(_ref2) {
4178
4174
  height = _ref2.height,
4179
4175
  dark = _ref2.dark,
4180
4176
  disabled = _ref2.disabled,
4181
- props = _objectWithoutProperties(_ref2, _excluded$K);
4177
+ props = _objectWithoutProperties(_ref2, _excluded$J);
4182
4178
  var currentSize = getCurrentSize({
4183
4179
  size: size,
4184
4180
  sizeVariant: sizeVariant
@@ -4363,30 +4359,30 @@ var CardModalRotationContainer = /*#__PURE__*/forwardRef(function (props, ref) {
4363
4359
  }));
4364
4360
  });
4365
4361
 
4366
- var _excluded$J = ["children", "appear", "visible", "unmountOnExit", "isAnimationEnabled", "onEnter", "onEntered", "onExit", "onExited", "onClose"];
4367
- var contentAnimationEnter$1 = "kitt-u_contentAnimationEnter_c11xxy4r";
4368
- var contentAnimatioEnterActive$1 = "kitt-u_contentAnimatioEnterActive_cl52117";
4369
- var contentAnimatioExit$1 = "kitt-u_contentAnimatioExit_cyjczep";
4370
- var contentAnimatioExitActive$1 = "kitt-u_contentAnimatioExitActive_cpsy3dt";
4371
- var contentAnimationClassNames$1 = {
4372
- appear: contentAnimationEnter$1,
4373
- appearActive: contentAnimatioEnterActive$1,
4374
- enter: contentAnimationEnter$1,
4375
- enterActive: contentAnimatioEnterActive$1,
4376
- exit: contentAnimatioExit$1,
4377
- exitActive: contentAnimatioExitActive$1
4362
+ var _excluded$I = ["children", "appear", "visible", "unmountOnExit", "isAnimationEnabled", "onEnter", "onEntered", "onExit", "onExited", "onClose"];
4363
+ var contentAnimationEnter = "kitt-u_contentAnimationEnter_c11xxy4r";
4364
+ var contentAnimatioEnterActive = "kitt-u_contentAnimatioEnterActive_cl52117";
4365
+ var contentAnimatioExit = "kitt-u_contentAnimatioExit_cyjczep";
4366
+ var contentAnimatioExitActive = "kitt-u_contentAnimatioExitActive_cpsy3dt";
4367
+ var contentAnimationClassNames = {
4368
+ appear: contentAnimationEnter,
4369
+ appearActive: contentAnimatioEnterActive,
4370
+ enter: contentAnimationEnter,
4371
+ enterActive: contentAnimatioEnterActive,
4372
+ exit: contentAnimatioExit,
4373
+ exitActive: contentAnimatioExitActive
4378
4374
  };
4379
- var opacityEnter$2 = "kitt-u_opacityEnter_o1ae40dx";
4380
- var opacityEnterActive$2 = "kitt-u_opacityEnterActive_o1t4vl7b";
4381
- var opacityExit$2 = "kitt-u_opacityExit_ogyytm1";
4382
- var opacityExitActive$2 = "kitt-u_opacityExitActive_o18xvk52";
4383
- var opacityClassNames$2 = {
4384
- appear: opacityEnter$2,
4385
- appearActive: opacityEnterActive$2,
4386
- enter: opacityEnter$2,
4387
- enterActive: opacityEnterActive$2,
4388
- exit: opacityExit$2,
4389
- exitActive: opacityExitActive$2
4375
+ var opacityEnter = "kitt-u_opacityEnter_o1ae40dx";
4376
+ var opacityEnterActive = "kitt-u_opacityEnterActive_o1t4vl7b";
4377
+ var opacityExit = "kitt-u_opacityExit_ogyytm1";
4378
+ var opacityExitActive = "kitt-u_opacityExitActive_o18xvk52";
4379
+ var opacityClassNames = {
4380
+ appear: opacityEnter,
4381
+ appearActive: opacityEnterActive,
4382
+ enter: opacityEnter,
4383
+ enterActive: opacityEnterActive,
4384
+ exit: opacityExit,
4385
+ exitActive: opacityExitActive
4390
4386
  };
4391
4387
  function CardModalAnimation(_ref) {
4392
4388
  var children = _ref.children,
@@ -4402,7 +4398,7 @@ function CardModalAnimation(_ref) {
4402
4398
  onExit = _ref.onExit,
4403
4399
  onExited = _ref.onExited,
4404
4400
  onClose = _ref.onClose,
4405
- props = _objectWithoutProperties(_ref, _excluded$J);
4401
+ props = _objectWithoutProperties(_ref, _excluded$I);
4406
4402
  // React 19 has removed the ReactDOM.findDOMNode method. We need to use refs to access DOM nodes in CSSTransition.
4407
4403
  // See https://github.com/reactjs/react-transition-group/issues/918
4408
4404
  var overlayRef = useRef(null);
@@ -4420,7 +4416,7 @@ function CardModalAnimation(_ref) {
4420
4416
  children: [/*#__PURE__*/jsx(CSSTransition, _objectSpread(_objectSpread({}, sharedProps), {}, {
4421
4417
  nodeRef: overlayRef,
4422
4418
  timeout: isAnimationEnabled ? animation.overlay.duration : 0,
4423
- classNames: opacityClassNames$2,
4419
+ classNames: opacityClassNames,
4424
4420
  children: /*#__PURE__*/jsx(Overlay, {
4425
4421
  ref: overlayRef,
4426
4422
  onPress: onClose
@@ -4428,7 +4424,7 @@ function CardModalAnimation(_ref) {
4428
4424
  })), /*#__PURE__*/jsx(CSSTransition, _objectSpread(_objectSpread({}, sharedProps), {}, {
4429
4425
  nodeRef: contentRef,
4430
4426
  timeout: isAnimationEnabled ? animation.content.duration : 0,
4431
- classNames: contentAnimationClassNames$1,
4427
+ classNames: contentAnimationClassNames,
4432
4428
  onEnter: onEnter,
4433
4429
  onEntered: onEntered,
4434
4430
  onExit: onExit,
@@ -4443,13 +4439,13 @@ function CardModalAnimation(_ref) {
4443
4439
  }));
4444
4440
  }
4445
4441
 
4446
- var _excluded$I = ["children", "visible", "onClose", "onExited"];
4442
+ var _excluded$H = ["children", "visible", "onClose", "onExited"];
4447
4443
  function CardModalBehaviour(_ref) {
4448
4444
  var children = _ref.children,
4449
4445
  visible = _ref.visible,
4450
4446
  onClose = _ref.onClose,
4451
4447
  onExited = _ref.onExited,
4452
- props = _objectWithoutProperties(_ref, _excluded$I);
4448
+ props = _objectWithoutProperties(_ref, _excluded$H);
4453
4449
  var _useState = useState(visible),
4454
4450
  _useState2 = _slicedToArray(_useState, 2),
4455
4451
  isModalBehaviourVisible = _useState2[0],
@@ -4474,12 +4470,12 @@ function CardModalBehaviour(_ref) {
4474
4470
  });
4475
4471
  }
4476
4472
 
4477
- var _excluded$H = ["children", "padding"];
4473
+ var _excluded$G = ["children", "padding"];
4478
4474
  function CardModalBody(_ref) {
4479
4475
  var children = _ref.children,
4480
4476
  _ref$padding = _ref.padding,
4481
4477
  padding = _ref$padding === void 0 ? 'kitt.4' : _ref$padding,
4482
- props = _objectWithoutProperties(_ref, _excluded$H);
4478
+ props = _objectWithoutProperties(_ref, _excluded$G);
4483
4479
  return /*#__PURE__*/jsx(ScrollView, _objectSpread(_objectSpread({
4484
4480
  showsVerticalScrollIndicator: false,
4485
4481
  _contentContainerStyle: {
@@ -4490,7 +4486,7 @@ function CardModalBody(_ref) {
4490
4486
  }));
4491
4487
  }
4492
4488
 
4493
- var _excluded$G = ["children", "padding", "hasSeparator"];
4489
+ var _excluded$F = ["children", "padding", "hasSeparator"];
4494
4490
  function CardModalFooter(_ref) {
4495
4491
  var children = _ref.children,
4496
4492
  _ref$padding = _ref.padding,
@@ -4500,7 +4496,7 @@ function CardModalFooter(_ref) {
4500
4496
  } : _ref$padding,
4501
4497
  _ref$hasSeparator = _ref.hasSeparator,
4502
4498
  hasSeparator = _ref$hasSeparator === void 0 ? true : _ref$hasSeparator,
4503
- props = _objectWithoutProperties(_ref, _excluded$G);
4499
+ props = _objectWithoutProperties(_ref, _excluded$F);
4504
4500
  return /*#__PURE__*/jsx(View, _objectSpread(_objectSpread({}, props), {}, {
4505
4501
  marginTop: "kitt.2",
4506
4502
  padding: padding,
@@ -4544,7 +4540,7 @@ var getButtonTypeAndVariant = function (iconColor) {
4544
4540
  }
4545
4541
  };
4546
4542
 
4547
- var _excluded$F = ["color", "ariaLabel"];
4543
+ var _excluded$E = ["color", "ariaLabel"];
4548
4544
  /**
4549
4545
  * @deprecated IconButton should only be used as a navigation button
4550
4546
  * Other use cases should use a <Button> component with an icon
@@ -4553,7 +4549,7 @@ function IconButton(_ref) {
4553
4549
  var _ref$color = _ref.color,
4554
4550
  color = _ref$color === void 0 ? 'black' : _ref$color;
4555
4551
  _ref.ariaLabel;
4556
- var props = _objectWithoutProperties(_ref, _excluded$F);
4552
+ var props = _objectWithoutProperties(_ref, _excluded$E);
4557
4553
  var _getButtonTypeAndVari = getButtonTypeAndVariant(color),
4558
4554
  legacyColorToType = _getButtonTypeAndVari.type,
4559
4555
  legacyColorToVariant = _getButtonTypeAndVari.variant;
@@ -4660,7 +4656,7 @@ function CardModalHeader(props) {
4660
4656
  return /*#__PURE__*/jsx(TopNavBar, _objectSpread({}, props));
4661
4657
  }
4662
4658
 
4663
- var _excluded$E = ["backgroundColor", "maxWidth", "withoutShadow", "children"];
4659
+ var _excluded$D = ["backgroundColor", "maxWidth", "withoutShadow", "children"];
4664
4660
  function CardModal(_ref) {
4665
4661
  var _ref$backgroundColor = _ref.backgroundColor,
4666
4662
  backgroundColor = _ref$backgroundColor === void 0 ? 'kitt.uiBackgroundLight' : _ref$backgroundColor,
@@ -4668,7 +4664,7 @@ function CardModal(_ref) {
4668
4664
  maxWidth = _ref$maxWidth === void 0 ? 'kitt.cardModal.maxWidth' : _ref$maxWidth,
4669
4665
  withoutShadow = _ref.withoutShadow,
4670
4666
  children = _ref.children,
4671
- props = _objectWithoutProperties(_ref, _excluded$E);
4667
+ props = _objectWithoutProperties(_ref, _excluded$D);
4672
4668
  return /*#__PURE__*/jsx(View, _objectSpread(_objectSpread({}, props), {}, {
4673
4669
  overflow: "hidden",
4674
4670
  backgroundColor: backgroundColor,
@@ -4884,11 +4880,11 @@ function ChoiceItemContainer(_ref) {
4884
4880
  }));
4885
4881
  }
4886
4882
 
4887
- var _excluded$D = ["direction", "contentContainerStyle"];
4883
+ var _excluded$C = ["direction", "contentContainerStyle"];
4888
4884
  function ChoicesContainer(_ref) {
4889
4885
  var direction = _ref.direction,
4890
4886
  contentContainerStyle = _ref.contentContainerStyle,
4891
- props = _objectWithoutProperties(_ref, _excluded$D);
4887
+ props = _objectWithoutProperties(_ref, _excluded$C);
4892
4888
  if (direction === 'row') {
4893
4889
  return /*#__PURE__*/jsx(ScrollView$2, _objectSpread({
4894
4890
  horizontal: true,
@@ -4963,86 +4959,165 @@ var ChoicesElements = {
4963
4959
  ButtonChoices: ButtonChoices
4964
4960
  };
4965
4961
 
4966
- var _excluded$C = ["children", "appear", "visible", "unmountOnExit", "isAnimationEnabled", "onEnter", "onEntered", "onExit", "onExited", "onClose"];
4967
- var contentAnimationEnter = "kitt-u_contentAnimationEnter_c1i0gle8";
4968
- var contentAnimatioEnterActive = "kitt-u_contentAnimatioEnterActive_c1jmfkjw";
4969
- var contentAnimatioExit = "kitt-u_contentAnimatioExit_cwjstxl";
4970
- var contentAnimatioExitActive = "kitt-u_contentAnimatioExitActive_c1almbvu";
4971
- var contentAnimationClassNames = {
4972
- appear: contentAnimationEnter,
4973
- appearActive: contentAnimatioEnterActive,
4974
- enter: contentAnimationEnter,
4975
- enterActive: contentAnimatioEnterActive,
4976
- exit: contentAnimatioExit,
4977
- exitActive: contentAnimatioExitActive
4978
- };
4979
- var opacityEnter$1 = "kitt-u_opacityEnter_o9rkayr";
4980
- var opacityEnterActive$1 = "kitt-u_opacityEnterActive_od7zvm9";
4981
- var opacityExit$1 = "kitt-u_opacityExit_opddo9j";
4982
- var opacityExitActive$1 = "kitt-u_opacityExitActive_o15v6ove";
4983
- var opacityClassNames$1 = {
4984
- appear: opacityEnter$1,
4985
- appearActive: opacityEnterActive$1,
4986
- enter: opacityEnter$1,
4987
- enterActive: opacityEnterActive$1,
4988
- exit: opacityExit$1,
4989
- exitActive: opacityExitActive$1
4990
- };
4962
+ function NativeOpacityAnimation(_ref) {
4963
+ var visible = _ref.visible,
4964
+ children = _ref.children,
4965
+ onExited = _ref.onExited;
4966
+ var theme = useTheme();
4967
+ var hasRunAnimationRef = useRef(false);
4968
+ useEffect(function () {
4969
+ if (visible) {
4970
+ hasRunAnimationRef.current = true;
4971
+ }
4972
+ }, [visible]);
4973
+ function handleAnimationFinished() {
4974
+ if (!visible && hasRunAnimationRef.current) {
4975
+ onExited();
4976
+ }
4977
+ }
4978
+ var opacityStyle = useAnimatedStyle(function () {
4979
+ var _theme$kitt$dialogMod = theme.kitt.dialogModal.animation.overlay,
4980
+ duration = _theme$kitt$dialogMod.duration,
4981
+ easing = _theme$kitt$dialogMod.easing;
4982
+ var x1 = easing.x1,
4983
+ y1 = easing.y1,
4984
+ x2 = easing.x2,
4985
+ y2 = easing.y2;
4986
+ return {
4987
+ opacity: withTiming(visible ? 1 : 0, {
4988
+ duration: duration,
4989
+ easing: Easing$1.bezier(x1, y1, x2, y2)
4990
+ }, function (isFinished) {
4991
+ if (!isFinished) return;
4992
+ runOnJS(handleAnimationFinished)();
4993
+ })
4994
+ };
4995
+ }, [theme, visible, handleAnimationFinished]);
4996
+ return /*#__PURE__*/jsx(Animated$1.View, {
4997
+ style: [StyleSheet.absoluteFillObject, opacityStyle],
4998
+ children: children
4999
+ });
5000
+ }
5001
+
5002
+ function NativeRotationAnimation(_ref) {
5003
+ var visible = _ref.visible,
5004
+ children = _ref.children,
5005
+ onEntered = _ref.onEntered,
5006
+ onExited = _ref.onExited;
5007
+ var theme = useTheme();
5008
+ var hasRunAnimationRef = useRef(false);
5009
+ var rotation = useSharedValue(0.8);
5010
+ useEffect(function () {
5011
+ if (visible) {
5012
+ hasRunAnimationRef.current = true;
5013
+ }
5014
+ }, [visible]);
5015
+ function handleAnimationFinished() {
5016
+ if (visible) {
5017
+ if (onEntered) onEntered();
5018
+ }
5019
+ if (!visible && hasRunAnimationRef.current) onExited();
5020
+ }
5021
+ var animatedStyle = useAnimatedStyle(function () {
5022
+ var _theme$kitt$dialogMod = theme.kitt.dialogModal.animation.content,
5023
+ duration = _theme$kitt$dialogMod.duration,
5024
+ easing = _theme$kitt$dialogMod.easing;
5025
+ var x1 = easing.x1,
5026
+ y1 = easing.y1,
5027
+ x2 = easing.x2,
5028
+ y2 = easing.y2;
5029
+ rotation.value = withTiming(visible ? 0 : 5, {
5030
+ duration: duration,
5031
+ easing: Easing$1.bezier(x1, y1, x2, y2)
5032
+ }, function (isFinished) {
5033
+ if (!isFinished) return;
5034
+ runOnJS(handleAnimationFinished)();
5035
+ });
5036
+ return {
5037
+ opacity: withTiming(visible ? 1 : 0, {
5038
+ duration: duration,
5039
+ easing: Easing$1.bezier(x1, y1, x2, y2)
5040
+ }),
5041
+ transform: [{
5042
+ scale: withTiming(visible ? 1 : 0.8, {
5043
+ duration: duration,
5044
+ easing: Easing$1.bezier(x1, y1, x2, y2)
5045
+ })
5046
+ }, {
5047
+ rotateZ: "".concat(rotation.value, "deg")
5048
+ }]
5049
+ };
5050
+ }, [theme, visible, rotation, handleAnimationFinished]);
5051
+ return /*#__PURE__*/jsx(Animated$1.View, {
5052
+ style: [animatedStyle],
5053
+ children: children
5054
+ });
5055
+ }
5056
+
4991
5057
  function DialogModalAnimation(_ref) {
4992
- var children = _ref.children,
4993
- _ref$appear = _ref.appear,
4994
- appear = _ref$appear === void 0 ? true : _ref$appear,
4995
- visible = _ref.visible,
4996
- _ref$unmountOnExit = _ref.unmountOnExit,
4997
- unmountOnExit = _ref$unmountOnExit === void 0 ? true : _ref$unmountOnExit,
4998
- _ref$isAnimationEnabl = _ref.isAnimationEnabled,
4999
- isAnimationEnabled = _ref$isAnimationEnabl === void 0 ? true : _ref$isAnimationEnabl,
5058
+ var visible = _ref.visible,
5059
+ children = _ref.children,
5000
5060
  onEnter = _ref.onEnter,
5001
5061
  onEntered = _ref.onEntered,
5002
5062
  onExit = _ref.onExit,
5003
5063
  onExited = _ref.onExited,
5004
- onClose = _ref.onClose,
5005
- props = _objectWithoutProperties(_ref, _excluded$C);
5006
- // React 19 has removed the ReactDOM.findDOMNode method. We need to use refs to access DOM nodes in CSSTransition.
5007
- // See https://github.com/reactjs/react-transition-group/issues/918
5008
- var overlayRef = useRef(null);
5009
- var contentRef = useRef(null);
5010
- var theme = useTheme();
5011
- var animation = theme.kitt.dialogModal.animation;
5012
- var sharedProps = {
5013
- "in": visible,
5014
- appear: appear,
5015
- unmountOnExit: unmountOnExit
5064
+ onClose = _ref.onClose;
5065
+ var _useState = useState(visible),
5066
+ _useState2 = _slicedToArray(_useState, 2),
5067
+ isModalVisible = _useState2[0],
5068
+ setIsModalVisible = _useState2[1];
5069
+ var _useState3 = useState(false),
5070
+ _useState4 = _slicedToArray(_useState3, 2),
5071
+ isContentVisible = _useState4[0],
5072
+ setIsContentVisible = _useState4[1];
5073
+ var handleAnimationExited = function () {
5074
+ setIsModalVisible(false);
5075
+ // Android doesn't handle the onDismiss callback on the modal, we need to call it manually
5016
5076
  };
5017
- return /*#__PURE__*/jsxs(View, _objectSpread(_objectSpread({}, props), {}, {
5018
- height: "100%",
5019
- justifyContent: "center",
5020
- children: [/*#__PURE__*/jsx(CSSTransition, _objectSpread(_objectSpread({}, sharedProps), {}, {
5021
- nodeRef: overlayRef,
5022
- timeout: isAnimationEnabled ? animation.overlay.duration : 0,
5023
- classNames: opacityClassNames$1,
5024
- children: /*#__PURE__*/jsx(Overlay, {
5025
- ref: overlayRef,
5026
- onPress: onClose
5027
- })
5028
- })), /*#__PURE__*/jsx(CSSTransition, _objectSpread(_objectSpread({}, sharedProps), {}, {
5029
- nodeRef: contentRef,
5030
- timeout: isAnimationEnabled ? animation.content.duration : 0,
5031
- classNames: contentAnimationClassNames,
5032
- onEnter: onEnter,
5033
- onEntered: onEntered,
5034
- onExit: onExit,
5035
- onExited: onExited,
5036
- children: /*#__PURE__*/jsx(View, {
5037
- ref: contentRef,
5038
- alignItems: "center",
5039
- paddingX: "kitt.dialogModal.overlayPadding.horizontal",
5040
- paddingY: "kitt.dialogModal.overlayPadding.vertical",
5041
- margin: "auto",
5042
- children: children
5043
- })
5044
- }))]
5045
- }));
5077
+ useEffect(function () {
5078
+ if (!(!visible && isContentVisible)) return;
5079
+ if (onExit) onExit();
5080
+ setIsContentVisible(false);
5081
+ }, [visible, isContentVisible, onExit]);
5082
+ return /*#__PURE__*/jsx(Modal, {
5083
+ transparent: true,
5084
+ supportedOrientations: ['landscape', 'portrait'],
5085
+ visible: isModalVisible,
5086
+ onShow: function () {
5087
+ if (onEnter) onEnter();
5088
+ setIsContentVisible(true);
5089
+ },
5090
+ onDismiss: function () {
5091
+ if (onExited) onExited();
5092
+ },
5093
+ children: /*#__PURE__*/jsxs(View
5094
+ // This is an ugly workaround to make the Modal calculate its height correctly on Android.
5095
+ // This ugly workaround is used in FullScreenModalAnimation and CardModalAnimation as well
5096
+ // TODO [expo@>=53]: Check if still needed
5097
+ , {
5098
+ height: undefined,
5099
+ position: "relative",
5100
+ flexGrow: 1,
5101
+ justifyContent: "center",
5102
+ alignItems: "center",
5103
+ children: [/*#__PURE__*/jsx(NativeOpacityAnimation, {
5104
+ visible: isContentVisible,
5105
+ onExited: handleAnimationExited,
5106
+ children: /*#__PURE__*/jsx(Overlay, {
5107
+ onPress: onClose
5108
+ })
5109
+ }), /*#__PURE__*/jsx(NativeRotationAnimation, {
5110
+ visible: isContentVisible,
5111
+ onExited: handleAnimationExited,
5112
+ onEntered: onEntered,
5113
+ children: /*#__PURE__*/jsx(View, {
5114
+ paddingX: "kitt.dialogModal.overlayPadding.horizontal",
5115
+ paddingY: "kitt.dialogModal.overlayPadding.vertical",
5116
+ children: children
5117
+ })
5118
+ })]
5119
+ })
5120
+ });
5046
5121
  }
5047
5122
 
5048
5123
  var _excluded$B = ["children", "visible", "onClose", "onExited"];
@@ -7749,30 +7824,24 @@ function FullscreenModalFooter(_ref) {
7749
7824
  }));
7750
7825
  }
7751
7826
 
7827
+ var 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"};
7828
+
7752
7829
  var _excluded$i = ["children", "appear", "visible", "unmountOnExit", "isAnimationEnabled", "onEnter", "onEntered", "onExit", "onExited", "onClose"];
7753
- var slideInFromBottomEnter = "kitt-u_slideInFromBottomEnter_s1717rto";
7754
- var slideInFromBottomEnterActive = "kitt-u_slideInFromBottomEnterActive_sux6xgc";
7755
- var slideInFromBottomExit = "kitt-u_slideInFromBottomExit_sl0lsxt";
7756
- var slideInFromBottomExitActive = "kitt-u_slideInFromBottomExitActive_srlzzmu";
7757
- var slideInClassNames = {
7758
- appear: slideInFromBottomEnter,
7759
- appearActive: slideInFromBottomEnterActive,
7760
- enter: slideInFromBottomEnter,
7761
- enterActive: slideInFromBottomEnterActive,
7762
- exit: slideInFromBottomExit,
7763
- exitActive: slideInFromBottomExitActive
7830
+ var overlayClassNames = {
7831
+ appear: styles$1['overlay-enter'],
7832
+ appearActive: styles$1['overlay-enter-active'],
7833
+ enter: styles$1['overlay-enter'],
7834
+ enterActive: styles$1['overlay-enter-active'],
7835
+ exit: styles$1['overlay-exit'],
7836
+ exitActive: styles$1['overlay-exit-active']
7764
7837
  };
7765
- var opacityEnter = "kitt-u_opacityEnter_okm44hr";
7766
- var opacityEnterActive = "kitt-u_opacityEnterActive_o2w8t0i";
7767
- var opacityExit = "kitt-u_opacityExit_o14r8iix";
7768
- var opacityExitActive = "kitt-u_opacityExitActive_oim72y2";
7769
- var opacityClassNames = {
7770
- appear: opacityEnter,
7771
- appearActive: opacityEnterActive,
7772
- enter: opacityEnter,
7773
- enterActive: opacityEnterActive,
7774
- exit: opacityExit,
7775
- exitActive: opacityExitActive
7838
+ var slideInClassNames = {
7839
+ appear: styles$1['content-enter'],
7840
+ appearActive: styles$1['content-enter-active'],
7841
+ enter: styles$1['content-enter'],
7842
+ enterActive: styles$1['content-enter-active'],
7843
+ exit: styles$1['content-exit'],
7844
+ exitActive: styles$1['content-exit-active']
7776
7845
  };
7777
7846
  function FullscreenModalAnimation(_ref) {
7778
7847
  var children = _ref.children,
@@ -7800,28 +7869,41 @@ function FullscreenModalAnimation(_ref) {
7800
7869
  appear: appear,
7801
7870
  unmountOnExit: unmountOnExit
7802
7871
  };
7803
- return /*#__PURE__*/jsxs(View, _objectSpread(_objectSpread({}, props), {}, {
7804
- children: [/*#__PURE__*/jsx(CSSTransition, _objectSpread(_objectSpread({}, sharedProps), {}, {
7805
- nodeRef: overlayRef,
7806
- timeout: isAnimationEnabled ? animation.overlay.duration : 0,
7807
- classNames: opacityClassNames,
7808
- children: /*#__PURE__*/jsx(Overlay, {
7809
- ref: overlayRef,
7810
- onPress: onClose
7811
- })
7812
- })), /*#__PURE__*/jsx(CSSTransition, _objectSpread(_objectSpread({}, sharedProps), {}, {
7813
- nodeRef: contentRef,
7814
- timeout: isAnimationEnabled ? animation.content.duration : 0,
7815
- classNames: slideInClassNames,
7816
- onEnter: onEnter,
7817
- onEntered: onEntered,
7818
- onExit: onExit,
7819
- onExited: onExited,
7820
- children: /*#__PURE__*/jsx(View, {
7821
- ref: contentRef,
7822
- children: children
7823
- })
7824
- }))]
7872
+
7873
+ // CSS custom properties for theme-based animation values
7874
+ var overlayEasing = animation.overlay.easing;
7875
+ var contentEasing = animation.content.easing;
7876
+ var cssVariables = {
7877
+ '--overlay-duration': "".concat(animation.overlay.duration, "ms"),
7878
+ '--overlay-easing': "cubic-bezier(".concat(overlayEasing.x1, ", ").concat(overlayEasing.y1, ", ").concat(overlayEasing.x2, ", ").concat(overlayEasing.y2, ")"),
7879
+ '--content-duration': "".concat(animation.content.duration, "ms"),
7880
+ '--content-easing': "cubic-bezier(".concat(contentEasing.x1, ", ").concat(contentEasing.y1, ", ").concat(contentEasing.x2, ", ").concat(contentEasing.y2, ")")
7881
+ };
7882
+ return /*#__PURE__*/jsx(View, _objectSpread(_objectSpread({}, props), {}, {
7883
+ children: /*#__PURE__*/jsxs("div", {
7884
+ style: cssVariables,
7885
+ children: [/*#__PURE__*/jsx(CSSTransition, _objectSpread(_objectSpread({}, sharedProps), {}, {
7886
+ nodeRef: overlayRef,
7887
+ timeout: isAnimationEnabled ? animation.overlay.duration : 0,
7888
+ classNames: overlayClassNames,
7889
+ children: /*#__PURE__*/jsx(Overlay, {
7890
+ ref: overlayRef,
7891
+ onPress: onClose
7892
+ })
7893
+ })), /*#__PURE__*/jsx(CSSTransition, _objectSpread(_objectSpread({}, sharedProps), {}, {
7894
+ nodeRef: contentRef,
7895
+ timeout: isAnimationEnabled ? animation.content.duration : 0,
7896
+ classNames: slideInClassNames,
7897
+ onEnter: onEnter,
7898
+ onEntered: onEntered,
7899
+ onExit: onExit,
7900
+ onExited: onExited,
7901
+ children: /*#__PURE__*/jsx(View, {
7902
+ ref: contentRef,
7903
+ children: children
7904
+ })
7905
+ }))]
7906
+ })
7825
7907
  }));
7826
7908
  }
7827
7909