@ornikar/kitt-universal 25.48.0 → 25.48.1-canary.430f6cd109998511d4c4ad7369a24908547c62f4.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 (72) hide show
  1. package/CHANGELOG.md +11 -0
  2. package/dist/definitions/CardModal2/CardModal2.d.ts +19 -0
  3. package/dist/definitions/CardModal2/CardModal2.d.ts.map +1 -0
  4. package/dist/definitions/CardModal2/components/CardModal2Animation/CardModal2Animation.d.ts +8 -0
  5. package/dist/definitions/CardModal2/components/CardModal2Animation/CardModal2Animation.d.ts.map +1 -0
  6. package/dist/definitions/CardModal2/components/CardModal2Animation/CardModal2Animation.web.d.ts +4 -0
  7. package/dist/definitions/CardModal2/components/CardModal2Animation/CardModal2Animation.web.d.ts.map +1 -0
  8. package/dist/definitions/CardModal2/components/CardModal2Animation/CardModal2RotationContainer.d.ts +7 -0
  9. package/dist/definitions/CardModal2/components/CardModal2Animation/CardModal2RotationContainer.d.ts.map +1 -0
  10. package/dist/definitions/CardModal2/components/CardModal2Animation/NativeOpacityAnimation.d.ts +8 -0
  11. package/dist/definitions/CardModal2/components/CardModal2Animation/NativeOpacityAnimation.d.ts.map +1 -0
  12. package/dist/definitions/CardModal2/components/CardModal2Animation/NativeRotationAnimation.d.ts +11 -0
  13. package/dist/definitions/CardModal2/components/CardModal2Animation/NativeRotationAnimation.d.ts.map +1 -0
  14. package/dist/definitions/CardModal2/components/CardModal2Behaviour.d.ts +8 -0
  15. package/dist/definitions/CardModal2/components/CardModal2Behaviour.d.ts.map +1 -0
  16. package/dist/definitions/CardModal2/components/CardModal2Body.d.ts +7 -0
  17. package/dist/definitions/CardModal2/components/CardModal2Body.d.ts.map +1 -0
  18. package/dist/definitions/CardModal2/components/CardModal2Footer.d.ts +7 -0
  19. package/dist/definitions/CardModal2/components/CardModal2Footer.d.ts.map +1 -0
  20. package/dist/definitions/CardModal2/components/CardModal2Header.d.ts +20 -0
  21. package/dist/definitions/CardModal2/components/CardModal2Header.d.ts.map +1 -0
  22. package/dist/definitions/FullscreenModal2/FullscreenModal2.d.ts +18 -0
  23. package/dist/definitions/FullscreenModal2/FullscreenModal2.d.ts.map +1 -0
  24. package/dist/definitions/FullscreenModal2/components/FullscreenModal2Animation.d.ts +8 -0
  25. package/dist/definitions/FullscreenModal2/components/FullscreenModal2Animation.d.ts.map +1 -0
  26. package/dist/definitions/FullscreenModal2/components/FullscreenModal2Behaviour.d.ts +8 -0
  27. package/dist/definitions/FullscreenModal2/components/FullscreenModal2Behaviour.d.ts.map +1 -0
  28. package/dist/definitions/FullscreenModal2/components/FullscreenModal2Body.d.ts +9 -0
  29. package/dist/definitions/FullscreenModal2/components/FullscreenModal2Body.d.ts.map +1 -0
  30. package/dist/definitions/FullscreenModal2/components/FullscreenModal2Container.d.ts +8 -0
  31. package/dist/definitions/FullscreenModal2/components/FullscreenModal2Container.d.ts.map +1 -0
  32. package/dist/definitions/FullscreenModal2/components/FullscreenModal2Footer.d.ts +8 -0
  33. package/dist/definitions/FullscreenModal2/components/FullscreenModal2Footer.d.ts.map +1 -0
  34. package/dist/definitions/FullscreenModal2/components/FullscreenModal2Header.d.ts +22 -0
  35. package/dist/definitions/FullscreenModal2/components/FullscreenModal2Header.d.ts.map +1 -0
  36. package/dist/definitions/FullscreenModal2/components/NativeOpacityAnimation.d.ts +7 -0
  37. package/dist/definitions/FullscreenModal2/components/NativeOpacityAnimation.d.ts.map +1 -0
  38. package/dist/definitions/FullscreenModal2/components/NativeSlideInAnimation.d.ts +10 -0
  39. package/dist/definitions/FullscreenModal2/components/NativeSlideInAnimation.d.ts.map +1 -0
  40. package/dist/definitions/NavigationModal2/NavigationModal2.d.ts +23 -0
  41. package/dist/definitions/NavigationModal2/NavigationModal2.d.ts.map +1 -0
  42. package/dist/definitions/NavigationModal2/components/NavigationModal2Behaviour.d.ts +8 -0
  43. package/dist/definitions/NavigationModal2/components/NavigationModal2Behaviour.d.ts.map +1 -0
  44. package/dist/definitions/NavigationModal2/components/NavigationModal2Body.d.ts +7 -0
  45. package/dist/definitions/NavigationModal2/components/NavigationModal2Body.d.ts.map +1 -0
  46. package/dist/definitions/NavigationModal2/components/NavigationModal2Footer.d.ts +7 -0
  47. package/dist/definitions/NavigationModal2/components/NavigationModal2Footer.d.ts.map +1 -0
  48. package/dist/definitions/NavigationModal2/components/NavigationModal2Header.d.ts +7 -0
  49. package/dist/definitions/NavigationModal2/components/NavigationModal2Header.d.ts.map +1 -0
  50. package/dist/definitions/index.d.ts +6 -0
  51. package/dist/definitions/index.d.ts.map +1 -1
  52. package/dist/index-metro.es.android.js +1023 -294
  53. package/dist/index-metro.es.android.js.map +1 -1
  54. package/dist/index-metro.es.ios.js +1023 -294
  55. package/dist/index-metro.es.ios.js.map +1 -1
  56. package/dist/index-node-20.10.cjs.js +802 -76
  57. package/dist/index-node-20.10.cjs.js.map +1 -1
  58. package/dist/index-node-20.10.cjs.web.css +8 -0
  59. package/dist/index-node-20.10.cjs.web.js +777 -120
  60. package/dist/index-node-20.10.cjs.web.js.map +1 -1
  61. package/dist/index-node-20.10.es.mjs +800 -77
  62. package/dist/index-node-20.10.es.mjs.map +1 -1
  63. package/dist/index-node-20.10.es.web.css +8 -0
  64. package/dist/index-node-20.10.es.web.mjs +776 -122
  65. package/dist/index-node-20.10.es.web.mjs.map +1 -1
  66. package/dist/index.es.js +890 -152
  67. package/dist/index.es.js.map +1 -1
  68. package/dist/index.es.web.js +778 -120
  69. package/dist/index.es.web.js.map +1 -1
  70. package/dist/styles.css +8 -0
  71. package/dist/tsbuildinfo +1 -1
  72. package/package.json +1 -1
@@ -2609,7 +2609,7 @@ function ActionCardDisabled({
2609
2609
  });
2610
2610
  }
2611
2611
 
2612
- const _excluded$T = ["children", "variant", "borderVariant", "borderRadius", "disabled", "isHovered", "isPressed", "isFocused"];
2612
+ const _excluded$11 = ["children", "variant", "borderVariant", "borderRadius", "disabled", "isHovered", "isPressed", "isFocused"];
2613
2613
  function ActionCard(_ref) {
2614
2614
  let {
2615
2615
  children,
@@ -2621,7 +2621,7 @@ function ActionCard(_ref) {
2621
2621
  isPressed,
2622
2622
  isFocused
2623
2623
  } = _ref,
2624
- props = _objectWithoutProperties(_ref, _excluded$T);
2624
+ props = _objectWithoutProperties(_ref, _excluded$11);
2625
2625
  return /*#__PURE__*/jsx(View, _objectSpread(_objectSpread({}, props), {}, {
2626
2626
  children: disabled ? /*#__PURE__*/jsx(ActionCardDisabled, {
2627
2627
  borderRadius: borderRadius,
@@ -2919,7 +2919,7 @@ const getTypographyFamilyWithAncestorValue = (type, typographyFamilyInContext) =
2919
2919
  throw new Error('You must set a "base" prop or wrap this Typography in one that does.');
2920
2920
  };
2921
2921
 
2922
- const _excluded$S = ["accessibilityRole", "base", "small", "medium", "large", "wide", "type", "variant", "color"];
2922
+ const _excluded$10 = ["accessibilityRole", "base", "small", "medium", "large", "wide", "type", "variant", "color"];
2923
2923
  const TypographyFamilyContext = /*#__PURE__*/createContext(null);
2924
2924
  const TypographyTypeContext = /*#__PURE__*/createContext(null);
2925
2925
  const TypographyColorContext = /*#__PURE__*/createContext('black');
@@ -2975,7 +2975,7 @@ function Typography(_ref) {
2975
2975
  variant,
2976
2976
  color
2977
2977
  } = _ref,
2978
- otherProps = _objectWithoutProperties(_ref, _excluded$S);
2978
+ otherProps = _objectWithoutProperties(_ref, _excluded$10);
2979
2979
  const sx = useSx();
2980
2980
  const typographyFamilyInContext = useContext(TypographyFamilyContext);
2981
2981
  const defaultColor = useTypographyDefaultColor();
@@ -3088,7 +3088,7 @@ function Icon({
3088
3088
  });
3089
3089
  }
3090
3090
 
3091
- const _excluded$R = ["color", "size"],
3091
+ const _excluded$$ = ["color", "size"],
3092
3092
  _excluded2$5 = ["color"];
3093
3093
  function getIconSizeConfigKeyFromTypeName(breakpointName) {
3094
3094
  return breakpointName === KittBreakpointNameEnum.BASE || breakpointName === KittBreakpointNameEnum.SMALL ? 'baseAndSmall' : 'mediumAndWide';
@@ -3111,7 +3111,7 @@ function TypographyIconSpecifiedColor(_ref) {
3111
3111
  color,
3112
3112
  size
3113
3113
  } = _ref,
3114
- props = _objectWithoutProperties(_ref, _excluded$R);
3114
+ props = _objectWithoutProperties(_ref, _excluded$$);
3115
3115
  const ancestorType = useTypographyAncestorType();
3116
3116
  const iconSize = size || (ancestorType ? createNativeBaseIconSize(ancestorType) : undefined);
3117
3117
  const colorValue = getTypographyColorValue(color);
@@ -3167,7 +3167,7 @@ const getButtonTextColorByType = (type, variant, isHovered, isPressed) => {
3167
3167
  }
3168
3168
  };
3169
3169
 
3170
- const _excluded$Q = ["type", "variant", "isDisabled", "icon", "children", "isHovered", "isPressed", "isFocused", "innerSpacing"];
3170
+ const _excluded$_ = ["type", "variant", "isDisabled", "icon", "children", "isHovered", "isPressed", "isFocused", "innerSpacing"];
3171
3171
  function ButtonIcon({
3172
3172
  icon,
3173
3173
  color,
@@ -3248,7 +3248,7 @@ function ButtonContent(_ref) {
3248
3248
  isFocused,
3249
3249
  innerSpacing
3250
3250
  } = _ref,
3251
- props = _objectWithoutProperties(_ref, _excluded$Q);
3251
+ props = _objectWithoutProperties(_ref, _excluded$_);
3252
3252
  const color = isDisabled ? 'black-light' : getButtonTextColorByType(type, variant, isHovered, isPressed);
3253
3253
  return /*#__PURE__*/jsx(View, {
3254
3254
  _web: {
@@ -3554,7 +3554,7 @@ function LoaderIcon({
3554
3554
  });
3555
3555
  }
3556
3556
 
3557
- const _excluded$P = ["as", "onPress", "disabled", "icon", "stretch"];
3557
+ const _excluded$Z = ["as", "onPress", "disabled", "icon", "stretch"];
3558
3558
  const ActionsItem = /*#__PURE__*/forwardRef((_ref, ref) => {
3559
3559
  let {
3560
3560
  as,
@@ -3566,7 +3566,7 @@ const ActionsItem = /*#__PURE__*/forwardRef((_ref, ref) => {
3566
3566
  medium: false
3567
3567
  }
3568
3568
  } = _ref,
3569
- props = _objectWithoutProperties(_ref, _excluded$P);
3569
+ props = _objectWithoutProperties(_ref, _excluded$Z);
3570
3570
  const [isLoading, setIsLoading] = useState(false);
3571
3571
  const mountedRef = useRef(false);
3572
3572
 
@@ -3612,7 +3612,7 @@ function ActionsButton(_ref) {
3612
3612
  }, props));
3613
3613
  }
3614
3614
 
3615
- const _excluded$O = ["children", "layout", "reversed"];
3615
+ const _excluded$Y = ["children", "layout", "reversed"];
3616
3616
  function getCurrentLayout(layout) {
3617
3617
  if (!layout) return {
3618
3618
  base: 'stretch',
@@ -3645,7 +3645,7 @@ function Actions(_ref) {
3645
3645
  base: false
3646
3646
  }
3647
3647
  } = _ref,
3648
- props = _objectWithoutProperties(_ref, _excluded$O);
3648
+ props = _objectWithoutProperties(_ref, _excluded$Y);
3649
3649
  const shouldReverse = typeof reversed === 'boolean' ? {
3650
3650
  base: !!reversed
3651
3651
  } : createResponsiveStyleFromProp(reversed, true, false);
@@ -3700,7 +3700,7 @@ function getInitials(firstname, lastname) {
3700
3700
  return `${firstname[0]}${lastname[0]}`.toUpperCase();
3701
3701
  }
3702
3702
 
3703
- const _excluded$N = ["size", "round", "light", "sizeVariant", "width", "height", "dark", "disabled"];
3703
+ const _excluded$X = ["size", "round", "light", "sizeVariant", "width", "height", "dark", "disabled"];
3704
3704
  function AvatarContent({
3705
3705
  size,
3706
3706
  src,
@@ -3766,7 +3766,7 @@ function Avatar(_ref) {
3766
3766
  dark,
3767
3767
  disabled
3768
3768
  } = _ref,
3769
- props = _objectWithoutProperties(_ref, _excluded$N);
3769
+ props = _objectWithoutProperties(_ref, _excluded$X);
3770
3770
  const currentSize = getCurrentSize({
3771
3771
  size,
3772
3772
  sizeVariant
@@ -3822,7 +3822,7 @@ function IdentityComponent({
3822
3822
  return children;
3823
3823
  }
3824
3824
 
3825
- const _excluded$M = ["children", "hasScrollView", "hasBackdrop", "hasHandle", "enableDynamicSizing", "snapPoints", "contentContainer"];
3825
+ const _excluded$W = ["children", "hasScrollView", "hasBackdrop", "hasHandle", "enableDynamicSizing", "snapPoints", "contentContainer"];
3826
3826
  function BottomSheetComp(_ref, ref) {
3827
3827
  let {
3828
3828
  children: Content,
@@ -3833,7 +3833,7 @@ function BottomSheetComp(_ref, ref) {
3833
3833
  snapPoints = ['100%'],
3834
3834
  contentContainer: ContentContainer = IdentityComponent
3835
3835
  } = _ref,
3836
- rest = _objectWithoutProperties(_ref, _excluded$M);
3836
+ rest = _objectWithoutProperties(_ref, _excluded$W);
3837
3837
  const {
3838
3838
  top
3839
3839
  } = useSafeAreaInsets();
@@ -3989,7 +3989,7 @@ function CardModalRotationContainer(props) {
3989
3989
  }, props));
3990
3990
  }
3991
3991
 
3992
- function NativeOpacityAnimation$2({
3992
+ function NativeOpacityAnimation$4({
3993
3993
  visible,
3994
3994
  children,
3995
3995
  onExited
@@ -4026,7 +4026,7 @@ function NativeOpacityAnimation$2({
4026
4026
  });
4027
4027
  }
4028
4028
 
4029
- function NativeRotationAnimation$1({
4029
+ function NativeRotationAnimation$2({
4030
4030
  visible,
4031
4031
  children,
4032
4032
  onEntered,
@@ -4113,14 +4113,14 @@ function CardModalAnimation({
4113
4113
  flexGrow: 1,
4114
4114
  justifyContent: "center",
4115
4115
  alignItems: "center",
4116
- children: [/*#__PURE__*/jsx(NativeOpacityAnimation$2, {
4116
+ children: [/*#__PURE__*/jsx(NativeOpacityAnimation$4, {
4117
4117
  visible: isContentVisible,
4118
4118
  onExited: handleAnimationExited,
4119
4119
  children: /*#__PURE__*/jsx(Overlay, {
4120
4120
  onPress: onClose
4121
4121
  })
4122
4122
  }), /*#__PURE__*/jsx(CardModalRotationContainer, {
4123
- children: /*#__PURE__*/jsx(NativeRotationAnimation$1, {
4123
+ children: /*#__PURE__*/jsx(NativeRotationAnimation$2, {
4124
4124
  visible: isContentVisible,
4125
4125
  onExited: handleAnimationExited,
4126
4126
  onEntered: onEntered,
@@ -4131,7 +4131,7 @@ function CardModalAnimation({
4131
4131
  });
4132
4132
  }
4133
4133
 
4134
- const _excluded$L = ["children", "visible", "onClose", "onExited"];
4134
+ const _excluded$V = ["children", "visible", "onClose", "onExited"];
4135
4135
  function CardModalBehaviour(_ref) {
4136
4136
  let {
4137
4137
  children,
@@ -4139,7 +4139,7 @@ function CardModalBehaviour(_ref) {
4139
4139
  onClose,
4140
4140
  onExited
4141
4141
  } = _ref,
4142
- props = _objectWithoutProperties(_ref, _excluded$L);
4142
+ props = _objectWithoutProperties(_ref, _excluded$V);
4143
4143
  const [isModalBehaviourVisible, setIsModalBehaviourVisible] = useState(visible);
4144
4144
  useEffect(() => {
4145
4145
  if (visible === true) {
@@ -4161,7 +4161,7 @@ function CardModalBehaviour(_ref) {
4161
4161
  });
4162
4162
  }
4163
4163
 
4164
- const _excluded$K = ["children", "paddingX", "paddingY"];
4164
+ const _excluded$U = ["children", "paddingX", "paddingY"];
4165
4165
  function CardModalBody(_ref) {
4166
4166
  let {
4167
4167
  children,
@@ -4171,7 +4171,7 @@ function CardModalBody(_ref) {
4171
4171
  },
4172
4172
  paddingY = 'kitt.4'
4173
4173
  } = _ref,
4174
- props = _objectWithoutProperties(_ref, _excluded$K);
4174
+ props = _objectWithoutProperties(_ref, _excluded$U);
4175
4175
  return /*#__PURE__*/jsx(ScrollView, _objectSpread(_objectSpread({
4176
4176
  showsVerticalScrollIndicator: false,
4177
4177
  _contentContainerStyle: {
@@ -4183,7 +4183,7 @@ function CardModalBody(_ref) {
4183
4183
  }));
4184
4184
  }
4185
4185
 
4186
- const _excluded$J = ["children", "padding", "hasSeparator"];
4186
+ const _excluded$T = ["children", "padding", "hasSeparator"];
4187
4187
  function CardModalFooter(_ref) {
4188
4188
  let {
4189
4189
  children,
@@ -4193,7 +4193,7 @@ function CardModalFooter(_ref) {
4193
4193
  },
4194
4194
  hasSeparator = true
4195
4195
  } = _ref,
4196
- props = _objectWithoutProperties(_ref, _excluded$J);
4196
+ props = _objectWithoutProperties(_ref, _excluded$T);
4197
4197
  return /*#__PURE__*/jsx(View, _objectSpread(_objectSpread({}, props), {}, {
4198
4198
  marginTop: "kitt.2",
4199
4199
  padding: padding,
@@ -4207,7 +4207,7 @@ function CardModalFooter(_ref) {
4207
4207
  }));
4208
4208
  }
4209
4209
 
4210
- const _excluded$I = ["children", "title", "paddingBottom", "hasSeparator", "right", "left"];
4210
+ const _excluded$S = ["children", "title", "paddingBottom", "hasSeparator", "right", "left"];
4211
4211
  function CardModalHeader(_ref) {
4212
4212
  let {
4213
4213
  children,
@@ -4220,7 +4220,7 @@ function CardModalHeader(_ref) {
4220
4220
  right,
4221
4221
  left
4222
4222
  } = _ref,
4223
- props = _objectWithoutProperties(_ref, _excluded$I);
4223
+ props = _objectWithoutProperties(_ref, _excluded$S);
4224
4224
  const defaultContainerPadding = {
4225
4225
  base: 'kitt.4',
4226
4226
  medium: 'kitt.6'
@@ -4258,7 +4258,7 @@ function CardModalHeader(_ref) {
4258
4258
  }));
4259
4259
  }
4260
4260
 
4261
- const _excluded$H = ["backgroundColor", "maxWidth", "withoutShadow", "children", "header", "body", "footer", "contentContainer"];
4261
+ const _excluded$R = ["backgroundColor", "maxWidth", "withoutShadow", "children", "header", "body", "footer", "contentContainer"];
4262
4262
  function CardModal(_ref) {
4263
4263
  let {
4264
4264
  backgroundColor = 'kitt.uiBackgroundLight',
@@ -4270,7 +4270,7 @@ function CardModal(_ref) {
4270
4270
  footer,
4271
4271
  contentContainer: ContentContainer = IdentityComponent
4272
4272
  } = _ref,
4273
- props = _objectWithoutProperties(_ref, _excluded$H);
4273
+ props = _objectWithoutProperties(_ref, _excluded$R);
4274
4274
  return /*#__PURE__*/jsx(View, _objectSpread(_objectSpread({}, props), {}, {
4275
4275
  overflow: "hidden",
4276
4276
  backgroundColor: backgroundColor,
@@ -4292,164 +4292,472 @@ CardModal.Header = CardModalHeader;
4292
4292
  CardModal.Footer = CardModalFooter;
4293
4293
  CardModal.ModalBehaviour = CardModalBehaviour;
4294
4294
 
4295
- function getBackgroundColor$5({
4296
- isDisabled,
4297
- isSelected,
4298
- isHovered,
4299
- isPressed
4300
- }) {
4301
- if (isDisabled) return 'kitt.choices.item.disabled.backgroundColor';
4302
- if (isSelected && isHovered) return 'kitt.choices.item.hoverWhenSelected.backgroundColor';
4303
- if (isPressed) return 'kitt.choices.item.pressed.backgroundColor';
4304
- if (isHovered) return 'kitt.choices.item.hover.backgroundColor';
4305
- if (isSelected) return 'kitt.choices.item.selected.backgroundColor';
4306
- return 'kitt.choices.item.default.backgroundColor';
4307
- }
4308
-
4309
- function getBorderRadius(variant) {
4310
- // The clean way to have the rounded effect would have been to know the children height since radius >= height * 0.5
4311
- // We don't control over the height of the rendered children we just go with a arbitrary really high value
4312
- return variant === 'rounded' ? Number.MAX_SAFE_INTEGER : 'kitt.choices.item.borderRadius';
4295
+ function CardModal2RotationContainer(props) {
4296
+ return /*#__PURE__*/jsx(View, _objectSpread({
4297
+ paddingX: "kitt.cardModal.overlayPadding.horizontal",
4298
+ paddingY: "kitt.cardModal.overlayPadding.vertical",
4299
+ maxWidth: "kitt.cardModal.maxWidthWithPadding",
4300
+ width: "100%",
4301
+ maxHeight: "100%",
4302
+ _web: {
4303
+ maxHeight: '100svh'
4304
+ }
4305
+ }, props));
4313
4306
  }
4314
4307
 
4315
- function AnimatedChoiceItemView({
4308
+ function NativeOpacityAnimation$3({
4309
+ visible,
4316
4310
  children,
4317
- variant,
4318
- size,
4319
- isHovered,
4320
- isPressed,
4321
- isDisabled,
4322
- isSelected,
4323
- animatedStyles
4311
+ onExited
4324
4312
  }) {
4325
- const sx = useSx();
4326
- const style = sx({
4327
- position: 'relative',
4328
- borderRadius: getBorderRadius(variant),
4329
- backgroundColor: getBackgroundColor$5({
4330
- isDisabled,
4331
- isSelected,
4332
- isHovered,
4333
- isPressed
4334
- }),
4335
- paddingX: size === 'small' ? 'kitt.4' : {
4336
- base: 'kitt.4',
4337
- small: 'kitt.6'
4338
- },
4339
- paddingY: size === 'small' ? 'kitt.2' : {
4340
- base: 'kitt.4',
4341
- small: 'kitt.6'
4313
+ const theme = useTheme();
4314
+ const hasRunAnimationRef = useRef(false);
4315
+ function handleAnimationFinished() {
4316
+ if (visible) {
4317
+ hasRunAnimationRef.current = true;
4318
+ }
4319
+ if (!visible && hasRunAnimationRef.current) {
4320
+ onExited();
4342
4321
  }
4322
+ }
4323
+ const opacityStyle = useAnimatedStyle(() => {
4324
+ const {
4325
+ duration,
4326
+ easing
4327
+ } = theme.kitt.cardModal.animation.overlay;
4328
+ const [x1, y1, x2, y2] = easing;
4329
+ return {
4330
+ opacity: withTiming(visible ? 1 : 0, {
4331
+ duration,
4332
+ easing: Easing$1.bezier(x1, y1, x2, y2)
4333
+ }, isFinished => {
4334
+ if (!isFinished) return;
4335
+ runOnJS(handleAnimationFinished)();
4336
+ })
4337
+ };
4343
4338
  });
4344
4339
  return /*#__PURE__*/jsx(Animated.View, {
4345
- style: [style, animatedStyles],
4340
+ style: [StyleSheet.absoluteFillObject, opacityStyle],
4346
4341
  children: children
4347
4342
  });
4348
4343
  }
4349
4344
 
4350
- const useNativeAnimation$4 = ({
4351
- selected,
4352
- disabled,
4353
- isPressedInternal
4354
- }) => {
4345
+ function NativeRotationAnimation$1({
4346
+ visible,
4347
+ children,
4348
+ onEntered,
4349
+ onExited
4350
+ }) {
4355
4351
  const theme = useTheme();
4356
- const pressed = useSharedValue(Boolean(isPressedInternal));
4357
- const progress = useDerivedValue(() => {
4358
- return withTiming(pressed.value ? 1 : 0, {
4359
- duration: theme.kitt.choices.item.transition.duration
4360
- });
4361
- });
4362
- const backgroundStyles = useAnimatedStyle(() => {
4352
+ const hasRunAnimationRef = useRef(false);
4353
+ const rotation = useSharedValue(0.8);
4354
+ function handleAnimationFinished() {
4355
+ if (visible) {
4356
+ if (onEntered) onEntered();
4357
+ hasRunAnimationRef.current = true;
4358
+ }
4359
+ if (!visible && hasRunAnimationRef.current) onExited();
4360
+ }
4361
+ const animatedStyle = useAnimatedStyle(() => {
4363
4362
  const {
4364
- default: defaultBg,
4365
- pressed: pressedBg,
4366
- selected: selectedBg,
4367
- disabled: disabledBg
4368
- } = theme.kitt.choices.item.backgroundColor;
4369
- if (disabled) return {
4370
- backgroundColor: disabledBg
4371
- };
4372
- if (selected) return {
4373
- backgroundColor: selectedBg
4374
- };
4363
+ duration,
4364
+ easing
4365
+ } = theme.kitt.cardModal.animation.content;
4366
+ const [x1, y1, x2, y2] = easing;
4367
+ rotation.value = withTiming(visible ? 0 : 5, {
4368
+ duration,
4369
+ easing: Easing$1.bezier(x1, y1, x2, y2)
4370
+ }, isFinished => {
4371
+ if (!isFinished) return;
4372
+ runOnJS(handleAnimationFinished)();
4373
+ });
4375
4374
  return {
4376
- backgroundColor: interpolateColor(progress.value, [0, 1], [defaultBg, pressedBg])
4375
+ opacity: withTiming(visible ? 1 : 0, {
4376
+ duration,
4377
+ easing: Easing$1.bezier(x1, y1, x2, y2)
4378
+ }),
4379
+ transform: [{
4380
+ scale: withTiming(visible ? 1 : 0.8, {
4381
+ duration,
4382
+ easing: Easing$1.bezier(x1, y1, x2, y2)
4383
+ })
4384
+ }, {
4385
+ rotateZ: `${rotation.value}deg`
4386
+ }]
4377
4387
  };
4378
4388
  });
4379
- return {
4380
- onPressIn: () => {
4381
- pressed.value = true;
4382
- },
4383
- onPressOut: () => {
4384
- pressed.value = false;
4385
- },
4386
- backgroundStyles
4387
- };
4388
- };
4389
-
4390
- function getCurrentTextColor$1({
4391
- isDisabled,
4392
- isSelected,
4393
- isPressed,
4394
- isHovered
4395
- }) {
4396
- if (isDisabled) return 'black-light';
4397
- if (isSelected && isHovered) return 'white';
4398
- if (isSelected || isPressed) return 'white';
4399
- return 'black';
4389
+ return /*#__PURE__*/jsx(Animated.View, {
4390
+ style: [animatedStyle],
4391
+ children: children
4392
+ });
4400
4393
  }
4401
4394
 
4402
- function ChoiceItem({
4403
- type = 'button',
4404
- value,
4405
- selected,
4406
- disabled,
4407
- variant,
4395
+ function CardModal2Animation({
4396
+ visible,
4408
4397
  children,
4409
- isPressedInternal,
4410
- isHoveredInternal,
4411
- onPress,
4412
- onChange,
4413
- onBlur,
4414
- onFocus,
4415
- size,
4416
- style,
4417
- testID
4398
+ onEnter,
4399
+ onEntered,
4400
+ onExit,
4401
+ onExited,
4402
+ onClose
4418
4403
  }) {
4419
- const {
4420
- onPressIn,
4421
- onPressOut,
4422
- backgroundStyles
4423
- } = useNativeAnimation$4({
4424
- selected,
4425
- disabled,
4426
- isPressedInternal
4427
- });
4428
- const handleChange = () => {
4429
- if (!onChange) return;
4430
-
4431
- // Checkbox can be toggled
4432
- if (type === 'checkbox') {
4433
- onChange(selected ? undefined : value);
4434
- return;
4435
- }
4436
- onChange(value);
4404
+ const [isModalVisible, setIsModalVisible] = useState(visible);
4405
+ const [isContentVisible, setIsContentVisible] = useState(false);
4406
+ const handleAnimationExited = () => {
4407
+ setIsModalVisible(false);
4408
+ // Android doesn't handle the onDismiss callback on the modal, we need to call it manually
4409
+ if (Platform.OS === 'android' && onExited) onExited();
4437
4410
  };
4438
- return /*#__PURE__*/jsx(Pressable, {
4439
- testID: testID,
4440
- disabled: disabled,
4441
- accessibilityRole: type,
4442
- accessibilityState: {
4443
- checked: selected
4444
- },
4445
- style: style,
4446
- onBlur: onBlur,
4447
- onFocus: onFocus,
4448
- onPress: e => {
4449
- if (onFocus) onFocus(e);
4450
- if (onPress) onPress();
4451
- handleChange();
4452
- if (onBlur) onBlur(e);
4411
+ useEffect(() => {
4412
+ if (!(!visible && isContentVisible)) return;
4413
+ if (onExit) onExit();
4414
+ setIsContentVisible(false);
4415
+ }, [visible, isContentVisible, onExit]);
4416
+ return /*#__PURE__*/jsx(Modal, {
4417
+ transparent: true,
4418
+ supportedOrientations: ['landscape', 'portrait'],
4419
+ visible: isModalVisible,
4420
+ onShow: () => {
4421
+ if (onEnter) onEnter();
4422
+ setIsContentVisible(true);
4423
+ },
4424
+ onDismiss: () => {
4425
+ if (onExited) onExited();
4426
+ },
4427
+ children: /*#__PURE__*/jsxs(View, {
4428
+ position: "relative",
4429
+ flexGrow: 1,
4430
+ justifyContent: "center",
4431
+ alignItems: "center",
4432
+ children: [/*#__PURE__*/jsx(NativeOpacityAnimation$3, {
4433
+ visible: isContentVisible,
4434
+ onExited: handleAnimationExited,
4435
+ children: /*#__PURE__*/jsx(Overlay, {
4436
+ onPress: onClose
4437
+ })
4438
+ }), /*#__PURE__*/jsx(CardModal2RotationContainer, {
4439
+ children: /*#__PURE__*/jsx(NativeRotationAnimation$1, {
4440
+ visible: isContentVisible,
4441
+ onExited: handleAnimationExited,
4442
+ onEntered: onEntered,
4443
+ children: children
4444
+ })
4445
+ })]
4446
+ })
4447
+ });
4448
+ }
4449
+
4450
+ const _excluded$Q = ["children", "visible", "onClose", "onExited"];
4451
+ function CardModal2Behaviour(_ref) {
4452
+ let {
4453
+ children,
4454
+ visible,
4455
+ onClose,
4456
+ onExited
4457
+ } = _ref,
4458
+ props = _objectWithoutProperties(_ref, _excluded$Q);
4459
+ const [isModalBehaviourVisible, setIsModalBehaviourVisible] = useState(visible);
4460
+ useEffect(() => {
4461
+ if (visible === true) {
4462
+ setIsModalBehaviourVisible(true);
4463
+ }
4464
+ }, [visible]);
4465
+ return /*#__PURE__*/jsx(ModalBehaviour, {
4466
+ visible: isModalBehaviourVisible,
4467
+ onClose: onClose,
4468
+ children: /*#__PURE__*/jsx(CardModal2Animation, _objectSpread(_objectSpread({}, props), {}, {
4469
+ visible: visible,
4470
+ onExited: () => {
4471
+ if (onExited) onExited();
4472
+ setIsModalBehaviourVisible(false);
4473
+ },
4474
+ onClose: onClose,
4475
+ children: children
4476
+ }))
4477
+ });
4478
+ }
4479
+
4480
+ const _excluded$P = ["children", "paddingX", "paddingY"];
4481
+ function CardModal2Body(_ref) {
4482
+ let {
4483
+ children,
4484
+ paddingX = {
4485
+ base: 'kitt.4',
4486
+ medium: 'kitt.6'
4487
+ },
4488
+ paddingY = 'kitt.4'
4489
+ } = _ref,
4490
+ props = _objectWithoutProperties(_ref, _excluded$P);
4491
+ return /*#__PURE__*/jsx(ScrollView, _objectSpread(_objectSpread({
4492
+ showsVerticalScrollIndicator: false,
4493
+ _contentContainerStyle: {
4494
+ paddingX,
4495
+ paddingY
4496
+ }
4497
+ }, props), {}, {
4498
+ children: children
4499
+ }));
4500
+ }
4501
+
4502
+ const _excluded$O = ["children", "padding", "hasSeparator"];
4503
+ function CardModal2Footer(_ref) {
4504
+ let {
4505
+ children,
4506
+ padding = {
4507
+ base: 'kitt.4',
4508
+ medium: 'kitt.2'
4509
+ },
4510
+ hasSeparator = true
4511
+ } = _ref,
4512
+ props = _objectWithoutProperties(_ref, _excluded$O);
4513
+ return /*#__PURE__*/jsx(View, _objectSpread(_objectSpread({}, props), {}, {
4514
+ marginTop: "kitt.2",
4515
+ padding: padding,
4516
+ borderTopWidth: hasSeparator ? 'kitt.cardModal.footer.borderWidth' : 0,
4517
+ borderColor: "kitt.separator",
4518
+ alignItems: {
4519
+ base: undefined,
4520
+ medium: 'flex-end'
4521
+ },
4522
+ children: children
4523
+ }));
4524
+ }
4525
+
4526
+ const _excluded$N = ["children", "title", "paddingBottom", "hasSeparator", "right", "left"];
4527
+ function CardModal2Header(_ref) {
4528
+ let {
4529
+ children,
4530
+ title,
4531
+ paddingBottom = {
4532
+ base: 'kitt.4',
4533
+ medium: 'kitt.2'
4534
+ },
4535
+ hasSeparator = true,
4536
+ right,
4537
+ left
4538
+ } = _ref,
4539
+ props = _objectWithoutProperties(_ref, _excluded$N);
4540
+ const defaultContainerPadding = {
4541
+ base: 'kitt.4',
4542
+ medium: 'kitt.6'
4543
+ };
4544
+ return /*#__PURE__*/jsx(View, _objectSpread(_objectSpread({}, props), {}, {
4545
+ padding: paddingBottom,
4546
+ borderBottomWidth: hasSeparator ? 'kitt.cardModal.footer.borderWidth' : 0,
4547
+ borderColor: "kitt.separator",
4548
+ justifyContent: "center",
4549
+ width: "100%",
4550
+ height: "kitt.cardModal.header.height",
4551
+ paddingRight: right ? 'kitt.2' : defaultContainerPadding,
4552
+ paddingLeft: left ? 'kitt.2' : defaultContainerPadding,
4553
+ children: /*#__PURE__*/jsxs(View, {
4554
+ alignItems: "center",
4555
+ flexDirection: "row",
4556
+ justifyContent: !children && !left ? 'flex-end' : 'space-between',
4557
+ children: [left ? /*#__PURE__*/jsx(View, {
4558
+ width: "kitt.iconButton.width",
4559
+ children: left
4560
+ }) : null, /*#__PURE__*/jsxs(View, {
4561
+ flexGrow: "1",
4562
+ paddingRight: right ? 'kitt.2' : 0,
4563
+ paddingLeft: left ? 'kitt.2' : 0,
4564
+ children: [title ? /*#__PURE__*/jsx(Typography.Text, {
4565
+ textAlign: !left && right ? 'left' : 'center',
4566
+ variant: "bold",
4567
+ children: title
4568
+ }) : null, children]
4569
+ }), right ? /*#__PURE__*/jsx(View, {
4570
+ width: "kitt.iconButton.width",
4571
+ children: right
4572
+ }) : null]
4573
+ })
4574
+ }));
4575
+ }
4576
+
4577
+ const _excluded$M = ["backgroundColor", "maxWidth", "withoutShadow", "children"];
4578
+ function CardModal2(_ref) {
4579
+ let {
4580
+ backgroundColor = 'kitt.uiBackgroundLight',
4581
+ maxWidth = 'kitt.cardModal.maxWidth',
4582
+ withoutShadow,
4583
+ children
4584
+ } = _ref,
4585
+ props = _objectWithoutProperties(_ref, _excluded$M);
4586
+ return /*#__PURE__*/jsx(View, _objectSpread(_objectSpread({}, props), {}, {
4587
+ overflow: "hidden",
4588
+ backgroundColor: backgroundColor,
4589
+ shadow: withoutShadow ? undefined : 'kitt.cardModal.shadow',
4590
+ borderRadius: "kitt.cardModal.borderRadius",
4591
+ width: "100%",
4592
+ maxHeight: "100%",
4593
+ maxWidth: maxWidth,
4594
+ minHeight: "kitt.cardModal.minHeight",
4595
+ children: children
4596
+ }));
4597
+ }
4598
+ CardModal2.Body = CardModal2Body;
4599
+ CardModal2.Header = CardModal2Header;
4600
+ CardModal2.Footer = CardModal2Footer;
4601
+ CardModal2.Behaviour = CardModal2Behaviour;
4602
+
4603
+ function getBackgroundColor$5({
4604
+ isDisabled,
4605
+ isSelected,
4606
+ isHovered,
4607
+ isPressed
4608
+ }) {
4609
+ if (isDisabled) return 'kitt.choices.item.disabled.backgroundColor';
4610
+ if (isSelected && isHovered) return 'kitt.choices.item.hoverWhenSelected.backgroundColor';
4611
+ if (isPressed) return 'kitt.choices.item.pressed.backgroundColor';
4612
+ if (isHovered) return 'kitt.choices.item.hover.backgroundColor';
4613
+ if (isSelected) return 'kitt.choices.item.selected.backgroundColor';
4614
+ return 'kitt.choices.item.default.backgroundColor';
4615
+ }
4616
+
4617
+ function getBorderRadius(variant) {
4618
+ // The clean way to have the rounded effect would have been to know the children height since radius >= height * 0.5
4619
+ // We don't control over the height of the rendered children we just go with a arbitrary really high value
4620
+ return variant === 'rounded' ? Number.MAX_SAFE_INTEGER : 'kitt.choices.item.borderRadius';
4621
+ }
4622
+
4623
+ function AnimatedChoiceItemView({
4624
+ children,
4625
+ variant,
4626
+ size,
4627
+ isHovered,
4628
+ isPressed,
4629
+ isDisabled,
4630
+ isSelected,
4631
+ animatedStyles
4632
+ }) {
4633
+ const sx = useSx();
4634
+ const style = sx({
4635
+ position: 'relative',
4636
+ borderRadius: getBorderRadius(variant),
4637
+ backgroundColor: getBackgroundColor$5({
4638
+ isDisabled,
4639
+ isSelected,
4640
+ isHovered,
4641
+ isPressed
4642
+ }),
4643
+ paddingX: size === 'small' ? 'kitt.4' : {
4644
+ base: 'kitt.4',
4645
+ small: 'kitt.6'
4646
+ },
4647
+ paddingY: size === 'small' ? 'kitt.2' : {
4648
+ base: 'kitt.4',
4649
+ small: 'kitt.6'
4650
+ }
4651
+ });
4652
+ return /*#__PURE__*/jsx(Animated.View, {
4653
+ style: [style, animatedStyles],
4654
+ children: children
4655
+ });
4656
+ }
4657
+
4658
+ const useNativeAnimation$4 = ({
4659
+ selected,
4660
+ disabled,
4661
+ isPressedInternal
4662
+ }) => {
4663
+ const theme = useTheme();
4664
+ const pressed = useSharedValue(Boolean(isPressedInternal));
4665
+ const progress = useDerivedValue(() => {
4666
+ return withTiming(pressed.value ? 1 : 0, {
4667
+ duration: theme.kitt.choices.item.transition.duration
4668
+ });
4669
+ });
4670
+ const backgroundStyles = useAnimatedStyle(() => {
4671
+ const {
4672
+ default: defaultBg,
4673
+ pressed: pressedBg,
4674
+ selected: selectedBg,
4675
+ disabled: disabledBg
4676
+ } = theme.kitt.choices.item.backgroundColor;
4677
+ if (disabled) return {
4678
+ backgroundColor: disabledBg
4679
+ };
4680
+ if (selected) return {
4681
+ backgroundColor: selectedBg
4682
+ };
4683
+ return {
4684
+ backgroundColor: interpolateColor(progress.value, [0, 1], [defaultBg, pressedBg])
4685
+ };
4686
+ });
4687
+ return {
4688
+ onPressIn: () => {
4689
+ pressed.value = true;
4690
+ },
4691
+ onPressOut: () => {
4692
+ pressed.value = false;
4693
+ },
4694
+ backgroundStyles
4695
+ };
4696
+ };
4697
+
4698
+ function getCurrentTextColor$1({
4699
+ isDisabled,
4700
+ isSelected,
4701
+ isPressed,
4702
+ isHovered
4703
+ }) {
4704
+ if (isDisabled) return 'black-light';
4705
+ if (isSelected && isHovered) return 'white';
4706
+ if (isSelected || isPressed) return 'white';
4707
+ return 'black';
4708
+ }
4709
+
4710
+ function ChoiceItem({
4711
+ type = 'button',
4712
+ value,
4713
+ selected,
4714
+ disabled,
4715
+ variant,
4716
+ children,
4717
+ isPressedInternal,
4718
+ isHoveredInternal,
4719
+ onPress,
4720
+ onChange,
4721
+ onBlur,
4722
+ onFocus,
4723
+ size,
4724
+ style,
4725
+ testID
4726
+ }) {
4727
+ const {
4728
+ onPressIn,
4729
+ onPressOut,
4730
+ backgroundStyles
4731
+ } = useNativeAnimation$4({
4732
+ selected,
4733
+ disabled,
4734
+ isPressedInternal
4735
+ });
4736
+ const handleChange = () => {
4737
+ if (!onChange) return;
4738
+
4739
+ // Checkbox can be toggled
4740
+ if (type === 'checkbox') {
4741
+ onChange(selected ? undefined : value);
4742
+ return;
4743
+ }
4744
+ onChange(value);
4745
+ };
4746
+ return /*#__PURE__*/jsx(Pressable, {
4747
+ testID: testID,
4748
+ disabled: disabled,
4749
+ accessibilityRole: type,
4750
+ accessibilityState: {
4751
+ checked: selected
4752
+ },
4753
+ style: style,
4754
+ onBlur: onBlur,
4755
+ onFocus: onFocus,
4756
+ onPress: e => {
4757
+ if (onFocus) onFocus(e);
4758
+ if (onPress) onPress();
4759
+ handleChange();
4760
+ if (onBlur) onBlur(e);
4453
4761
  },
4454
4762
  onPressIn: onPressIn,
4455
4763
  onPressOut: onPressOut,
@@ -4505,13 +4813,13 @@ function ChoiceItemContainer({
4505
4813
  }));
4506
4814
  }
4507
4815
 
4508
- const _excluded$G = ["direction", "contentContainerStyle"];
4816
+ const _excluded$L = ["direction", "contentContainerStyle"];
4509
4817
  function ChoicesContainer(_ref) {
4510
4818
  let {
4511
4819
  direction,
4512
4820
  contentContainerStyle
4513
4821
  } = _ref,
4514
- props = _objectWithoutProperties(_ref, _excluded$G);
4822
+ props = _objectWithoutProperties(_ref, _excluded$L);
4515
4823
  if (direction === 'row') {
4516
4824
  return /*#__PURE__*/jsx(ScrollView$2, _objectSpread({
4517
4825
  horizontal: true,
@@ -4585,7 +4893,7 @@ const ChoicesElements = {
4585
4893
  ButtonChoices
4586
4894
  };
4587
4895
 
4588
- function NativeOpacityAnimation$1({
4896
+ function NativeOpacityAnimation$2({
4589
4897
  visible,
4590
4898
  children,
4591
4899
  onExited
@@ -4709,7 +5017,7 @@ function DialogModalAnimation({
4709
5017
  flexGrow: 1,
4710
5018
  justifyContent: "center",
4711
5019
  alignItems: "center",
4712
- children: [/*#__PURE__*/jsx(NativeOpacityAnimation$1, {
5020
+ children: [/*#__PURE__*/jsx(NativeOpacityAnimation$2, {
4713
5021
  visible: isContentVisible,
4714
5022
  onExited: handleAnimationExited,
4715
5023
  children: /*#__PURE__*/jsx(Overlay, {
@@ -4729,7 +5037,7 @@ function DialogModalAnimation({
4729
5037
  });
4730
5038
  }
4731
5039
 
4732
- const _excluded$F = ["children", "visible", "onClose", "onExited"];
5040
+ const _excluded$K = ["children", "visible", "onClose", "onExited"];
4733
5041
  function DialogModalBehaviour(_ref) {
4734
5042
  let {
4735
5043
  children,
@@ -4737,7 +5045,7 @@ function DialogModalBehaviour(_ref) {
4737
5045
  onClose,
4738
5046
  onExited
4739
5047
  } = _ref,
4740
- props = _objectWithoutProperties(_ref, _excluded$F);
5048
+ props = _objectWithoutProperties(_ref, _excluded$K);
4741
5049
  const [isModalBehaviourVisible, setIsModalBehaviourVisible] = useState(visible);
4742
5050
  useEffect(() => {
4743
5051
  if (visible === true) {
@@ -4765,7 +5073,7 @@ function DialogModalBehaviour(_ref) {
4765
5073
  });
4766
5074
  }
4767
5075
 
4768
- const _excluded$E = ["stretch"];
5076
+ const _excluded$J = ["stretch"];
4769
5077
  function DialogModal({
4770
5078
  illustration,
4771
5079
  title,
@@ -4807,7 +5115,7 @@ function DialogModalButton(_ref) {
4807
5115
  let {
4808
5116
  stretch = true
4809
5117
  } = _ref,
4810
- props = _objectWithoutProperties(_ref, _excluded$E);
5118
+ props = _objectWithoutProperties(_ref, _excluded$J);
4811
5119
  return /*#__PURE__*/jsx(Actions.Button, _objectSpread({
4812
5120
  stretch: stretch
4813
5121
  }, props));
@@ -4841,7 +5149,7 @@ function Emoji({
4841
5149
  });
4842
5150
  }
4843
5151
 
4844
- const _excluded$D = ["as", "appScheme", "appValue", "onPress", "onOpenAppError"],
5152
+ const _excluded$I = ["as", "appScheme", "appValue", "onPress", "onOpenAppError"],
4845
5153
  _excluded2$4 = ["phoneNumber", "children"],
4846
5154
  _excluded3$3 = ["phoneNumber", "children"],
4847
5155
  _excluded4$3 = ["emailAddress", "children"];
@@ -4853,7 +5161,7 @@ function ExternalAppLink(_ref) {
4853
5161
  onPress,
4854
5162
  onOpenAppError
4855
5163
  } = _ref,
4856
- rest = _objectWithoutProperties(_ref, _excluded$D);
5164
+ rest = _objectWithoutProperties(_ref, _excluded$I);
4857
5165
  const href = `${appScheme}:${appValue}`;
4858
5166
  return /*#__PURE__*/jsx(Component, _objectSpread(_objectSpread({
4859
5167
  href: href
@@ -4947,7 +5255,7 @@ function useOpenExternalLink(errorHandler) {
4947
5255
  };
4948
5256
  }
4949
5257
 
4950
- const _excluded$C = ["as", "href", "openLinkBehavior", "onPress", "onOpenLinkError"];
5258
+ const _excluded$H = ["as", "href", "openLinkBehavior", "onPress", "onOpenLinkError"];
4951
5259
  function ExternalLink(_ref) {
4952
5260
  let {
4953
5261
  as: Component,
@@ -4957,7 +5265,7 @@ function ExternalLink(_ref) {
4957
5265
  // eslint-disable-next-line no-console
4958
5266
  onOpenLinkError = console.error
4959
5267
  } = _ref,
4960
- rest = _objectWithoutProperties(_ref, _excluded$C);
5268
+ rest = _objectWithoutProperties(_ref, _excluded$H);
4961
5269
  const openExternalLink = useOpenExternalLink();
4962
5270
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
4963
5271
  return /*#__PURE__*/jsx(Component, _objectSpread(_objectSpread({}, rest), {}, {
@@ -5016,7 +5324,7 @@ function InputTextContainer({
5016
5324
  });
5017
5325
  }
5018
5326
 
5019
- const _excluded$B = ["id", "right", "state", "variant", "internalForceState", "disabled", "autoCorrect", "textContentType", "autoComplete", "inputMode", "multiline", "height", "onSubmitEditing"];
5327
+ const _excluded$G = ["id", "right", "state", "variant", "internalForceState", "disabled", "autoCorrect", "textContentType", "autoComplete", "inputMode", "multiline", "height", "onSubmitEditing"];
5020
5328
  const InputText = /*#__PURE__*/forwardRef((_ref, ref) => {
5021
5329
  let {
5022
5330
  id,
@@ -5033,7 +5341,7 @@ const InputText = /*#__PURE__*/forwardRef((_ref, ref) => {
5033
5341
  height,
5034
5342
  onSubmitEditing
5035
5343
  } = _ref,
5036
- props = _objectWithoutProperties(_ref, _excluded$B);
5344
+ props = _objectWithoutProperties(_ref, _excluded$G);
5037
5345
  const theme = useTheme();
5038
5346
  const fontSizeForNativeBase = createNativeBaseFontSize({
5039
5347
  base: 'body'
@@ -5158,12 +5466,12 @@ function AutocompleteItemsListContainer({
5158
5466
  });
5159
5467
  }
5160
5468
 
5161
- const _excluded$A = ["children"];
5469
+ const _excluded$F = ["children"];
5162
5470
  function AutocompleteOption(_ref) {
5163
5471
  let {
5164
5472
  children
5165
5473
  } = _ref,
5166
- props = _objectWithoutProperties(_ref, _excluded$A);
5474
+ props = _objectWithoutProperties(_ref, _excluded$F);
5167
5475
  return /*#__PURE__*/jsx(View, _objectSpread(_objectSpread({
5168
5476
  paddingX: {
5169
5477
  base: 'kitt.2',
@@ -5175,7 +5483,7 @@ function AutocompleteOption(_ref) {
5175
5483
  }));
5176
5484
  }
5177
5485
 
5178
- const _excluded$z = ["children", "name", "disabled", "placeholder", "isInitialOpen", "initialValue", "containerProps", "filterItemBasedOnCurrentInputValue", "checkSelectedItem", "itemToString", "right", "onChange", "onFocus", "onBlur", "onInputChange", "onSelectItem", "onOuterPress", "errorElement", "emptyResultsElement", "inputTestID", "listContainerTestID", "zIndex", "maxItemContainerHeight"],
5486
+ const _excluded$E = ["children", "name", "disabled", "placeholder", "isInitialOpen", "initialValue", "containerProps", "filterItemBasedOnCurrentInputValue", "checkSelectedItem", "itemToString", "right", "onChange", "onFocus", "onBlur", "onInputChange", "onSelectItem", "onOuterPress", "errorElement", "emptyResultsElement", "inputTestID", "listContainerTestID", "zIndex", "maxItemContainerHeight"],
5179
5487
  _excluded2$3 = ["onClick", "onPress"],
5180
5488
  _excluded3$2 = ["onKeyDown", "onFocus", "onBlur", "onChange"],
5181
5489
  _excluded4$2 = ["onClick", "onPress", "role", "aria-selected"];
@@ -5217,7 +5525,7 @@ function Autocomplete(_ref) {
5217
5525
  zIndex = 1000,
5218
5526
  maxItemContainerHeight
5219
5527
  } = _ref,
5220
- props = _objectWithoutProperties(_ref, _excluded$z);
5528
+ props = _objectWithoutProperties(_ref, _excluded$E);
5221
5529
  const childrenArray = Children.toArray(children);
5222
5530
  const items = childrenArray.filter(isReactElement).map(child => ({
5223
5531
  child,
@@ -5438,7 +5746,7 @@ function getBorderColor$1({
5438
5746
  return 'kitt.forms.checkbox.default.borderColor';
5439
5747
  }
5440
5748
 
5441
- const _excluded$y = ["checked", "hitSlop", "children", "disabled", "onChange", "onBlur", "onFocus"];
5749
+ const _excluded$D = ["checked", "hitSlop", "children", "disabled", "onChange", "onBlur", "onFocus"];
5442
5750
  const Checkbox = /*#__PURE__*/forwardRef((_ref, ref) => {
5443
5751
  let {
5444
5752
  checked,
@@ -5449,7 +5757,7 @@ const Checkbox = /*#__PURE__*/forwardRef((_ref, ref) => {
5449
5757
  onBlur,
5450
5758
  onFocus
5451
5759
  } = _ref,
5452
- props = _objectWithoutProperties(_ref, _excluded$y);
5760
+ props = _objectWithoutProperties(_ref, _excluded$D);
5453
5761
  const theme = useTheme();
5454
5762
  return /*#__PURE__*/jsx(Pressable, _objectSpread(_objectSpread({
5455
5763
  hitSlop: hitSlop
@@ -5778,7 +6086,7 @@ function PartContainer({
5778
6086
  });
5779
6087
  }
5780
6088
 
5781
- const _excluded$x = ["id", "value", "testID", "stretch", "placeholder", "minDate", "maxDate", "disabled", "isFocusedInternal", "isHoveredInternal", "isPressedInternal", "enterKeyHint", "onChange", "onBlur", "onFocus", "onSubmitEditing"];
6089
+ const _excluded$C = ["id", "value", "testID", "stretch", "placeholder", "minDate", "maxDate", "disabled", "isFocusedInternal", "isHoveredInternal", "isPressedInternal", "enterKeyHint", "onChange", "onBlur", "onFocus", "onSubmitEditing"];
5782
6090
  const KeyboardDatePicker = /*#__PURE__*/forwardRef((_ref, ref) => {
5783
6091
  let {
5784
6092
  id,
@@ -5798,7 +6106,7 @@ const KeyboardDatePicker = /*#__PURE__*/forwardRef((_ref, ref) => {
5798
6106
  onFocus,
5799
6107
  onSubmitEditing
5800
6108
  } = _ref;
5801
- _objectWithoutProperties(_ref, _excluded$x);
6109
+ _objectWithoutProperties(_ref, _excluded$C);
5802
6110
  const monthRef = useRef(null);
5803
6111
  const yearRef = useRef(null);
5804
6112
  const defaultValue = value;
@@ -5999,7 +6307,7 @@ const PressableDateInputs = /*#__PURE__*/forwardRef(({
5999
6307
  });
6000
6308
  });
6001
6309
 
6002
- const _excluded$w = ["onBlur", "onFocus", "pickerDefaultDate", "pickerUITestID", "isDefaultVisible", "value", "onChange"];
6310
+ const _excluded$B = ["onBlur", "onFocus", "pickerDefaultDate", "pickerUITestID", "isDefaultVisible", "value", "onChange"];
6003
6311
  const DatePickerAndroid = /*#__PURE__*/forwardRef((_ref, ref) => {
6004
6312
  let {
6005
6313
  onBlur,
@@ -6010,7 +6318,7 @@ const DatePickerAndroid = /*#__PURE__*/forwardRef((_ref, ref) => {
6010
6318
  value,
6011
6319
  onChange
6012
6320
  } = _ref,
6013
- props = _objectWithoutProperties(_ref, _excluded$w);
6321
+ props = _objectWithoutProperties(_ref, _excluded$B);
6014
6322
  const [isFocused, setIsFocused] = useState(false);
6015
6323
  const [currentValue, setCurrentValue] = useState(value);
6016
6324
  const handleClose = () => {
@@ -6080,7 +6388,7 @@ function PlatformDateTimePicker({
6080
6388
  }));
6081
6389
  }
6082
6390
 
6083
- const _excluded$v = ["title", "isVisible", "value", "validateButtonLabel", "onClose", "onChange"];
6391
+ const _excluded$A = ["title", "isVisible", "value", "validateButtonLabel", "onClose", "onChange"];
6084
6392
  function ModalTitle({
6085
6393
  children
6086
6394
  }) {
@@ -6101,7 +6409,7 @@ function ModalPlatformDateTimePicker(_ref) {
6101
6409
  onClose,
6102
6410
  onChange
6103
6411
  } = _ref,
6104
- props = _objectWithoutProperties(_ref, _excluded$v);
6412
+ props = _objectWithoutProperties(_ref, _excluded$A);
6105
6413
  const [currentValue, setCurrentValue] = useState(value);
6106
6414
 
6107
6415
  // Prevent unsynced value between the modal and its parent state
@@ -6144,7 +6452,7 @@ function ModalPlatformDateTimePicker(_ref) {
6144
6452
  });
6145
6453
  }
6146
6454
 
6147
- const _excluded$u = ["value", "pickerUITestID", "pickerUITitle", "pickerUIValidateButtonLabel", "isDefaultVisible", "pickerDefaultDate", "isFocusedInternal", "isHoveredInternal", "isPressedInternal", "onChange", "onFocus", "onBlur"];
6455
+ const _excluded$z = ["value", "pickerUITestID", "pickerUITitle", "pickerUIValidateButtonLabel", "isDefaultVisible", "pickerDefaultDate", "isFocusedInternal", "isHoveredInternal", "isPressedInternal", "onChange", "onFocus", "onBlur"];
6148
6456
  const DefaultNativeUIDatePicker = /*#__PURE__*/forwardRef((_ref, ref) => {
6149
6457
  let {
6150
6458
  value,
@@ -6160,7 +6468,7 @@ const DefaultNativeUIDatePicker = /*#__PURE__*/forwardRef((_ref, ref) => {
6160
6468
  onFocus,
6161
6469
  onBlur
6162
6470
  } = _ref,
6163
- props = _objectWithoutProperties(_ref, _excluded$u);
6471
+ props = _objectWithoutProperties(_ref, _excluded$z);
6164
6472
  const [isPickerUIVisible, setIsPickerUIVisible] = useState(isDefaultVisible);
6165
6473
  const [isFocused, setIsFocused] = useState(false);
6166
6474
  const [currentValue, setCurrentValue] = useState(value);
@@ -6198,7 +6506,7 @@ const DefaultNativeUIDatePicker = /*#__PURE__*/forwardRef((_ref, ref) => {
6198
6506
  });
6199
6507
  });
6200
6508
 
6201
- const _excluded$t = ["value", "pickerUITestID", "isDefaultVisible", "pickerDefaultDate", "onChange", "onBlur"];
6509
+ const _excluded$y = ["value", "pickerUITestID", "isDefaultVisible", "pickerDefaultDate", "onChange", "onBlur"];
6202
6510
  const NativeUIDatePicker = /*#__PURE__*/forwardRef((_ref, ref) => {
6203
6511
  let {
6204
6512
  value,
@@ -6208,7 +6516,7 @@ const NativeUIDatePicker = /*#__PURE__*/forwardRef((_ref, ref) => {
6208
6516
  onChange,
6209
6517
  onBlur
6210
6518
  } = _ref,
6211
- props = _objectWithoutProperties(_ref, _excluded$t);
6519
+ props = _objectWithoutProperties(_ref, _excluded$y);
6212
6520
  if (Platform.OS === 'android') {
6213
6521
  return /*#__PURE__*/jsx(DatePickerAndroid, _objectSpread({
6214
6522
  ref: ref,
@@ -6230,7 +6538,7 @@ const NativeUIDatePicker = /*#__PURE__*/forwardRef((_ref, ref) => {
6230
6538
  }, props));
6231
6539
  });
6232
6540
 
6233
- const _excluded$s = ["fillMode", "enterKeyHint", "value", "onSubmitEditing"];
6541
+ const _excluded$x = ["fillMode", "enterKeyHint", "value", "onSubmitEditing"];
6234
6542
  const DatePicker = /*#__PURE__*/forwardRef((_ref, ref) => {
6235
6543
  let {
6236
6544
  fillMode = 'native',
@@ -6238,7 +6546,7 @@ const DatePicker = /*#__PURE__*/forwardRef((_ref, ref) => {
6238
6546
  value,
6239
6547
  onSubmitEditing
6240
6548
  } = _ref,
6241
- props = _objectWithoutProperties(_ref, _excluded$s);
6549
+ props = _objectWithoutProperties(_ref, _excluded$x);
6242
6550
  // in apps, final-form can give a string value that will break the component
6243
6551
  const currentValue = value || undefined;
6244
6552
  if (fillMode === 'keyboard') {
@@ -6310,12 +6618,12 @@ function ImagePicker({
6310
6618
  });
6311
6619
  }
6312
6620
 
6313
- const _excluded$r = ["children"];
6621
+ const _excluded$w = ["children"];
6314
6622
  function ListItemContent(_ref) {
6315
6623
  let {
6316
6624
  children
6317
6625
  } = _ref,
6318
- rest = _objectWithoutProperties(_ref, _excluded$r);
6626
+ rest = _objectWithoutProperties(_ref, _excluded$w);
6319
6627
  return /*#__PURE__*/jsx(View, _objectSpread(_objectSpread({
6320
6628
  alignSelf: "center",
6321
6629
  flexBasis: "0%",
@@ -6326,7 +6634,7 @@ function ListItemContent(_ref) {
6326
6634
  }));
6327
6635
  }
6328
6636
 
6329
- const _excluded$q = ["children", "side"],
6637
+ const _excluded$v = ["children", "side"],
6330
6638
  _excluded2$2 = ["children", "align"];
6331
6639
  // Handles the vertical alignment of the side elements of the list item
6332
6640
  function ListItemSideContainer(_ref) {
@@ -6334,7 +6642,7 @@ function ListItemSideContainer(_ref) {
6334
6642
  children,
6335
6643
  side = 'left'
6336
6644
  } = _ref,
6337
- rest = _objectWithoutProperties(_ref, _excluded$q);
6645
+ rest = _objectWithoutProperties(_ref, _excluded$v);
6338
6646
  return /*#__PURE__*/jsx(View, _objectSpread(_objectSpread({
6339
6647
  flexDirection: "row",
6340
6648
  marginLeft: side === 'right' ? 'kitt.2' : undefined,
@@ -6356,7 +6664,7 @@ function ListItemSideContent(_ref2) {
6356
6664
  }));
6357
6665
  }
6358
6666
 
6359
- const _excluded$p = ["children", "withPadding", "borders", "left", "right", "onPress"];
6667
+ const _excluded$u = ["children", "withPadding", "borders", "left", "right", "onPress"];
6360
6668
  function ListItem(_ref) {
6361
6669
  let {
6362
6670
  children,
@@ -6366,7 +6674,7 @@ function ListItem(_ref) {
6366
6674
  right,
6367
6675
  onPress
6368
6676
  } = _ref,
6369
- rest = _objectWithoutProperties(_ref, _excluded$p);
6677
+ rest = _objectWithoutProperties(_ref, _excluded$u);
6370
6678
  const Wrapper = onPress ? Pressable$2 : Fragment$1;
6371
6679
  const wrapperProps = onPress ? _objectSpread({
6372
6680
  accessibilityRole: 'button',
@@ -6399,12 +6707,12 @@ ListItem.Content = ListItemContent;
6399
6707
  ListItem.SideContent = ListItemSideContent;
6400
6708
  ListItem.SideContainer = ListItemSideContainer;
6401
6709
 
6402
- const _excluded$o = ["title"];
6710
+ const _excluded$t = ["title"];
6403
6711
  function BottomSheetActionsItem(_ref) {
6404
6712
  let {
6405
6713
  title
6406
6714
  } = _ref,
6407
- props = _objectWithoutProperties(_ref, _excluded$o);
6715
+ props = _objectWithoutProperties(_ref, _excluded$t);
6408
6716
  return /*#__PURE__*/jsx(Pressable$2, _objectSpread(_objectSpread({}, props), {}, {
6409
6717
  children: /*#__PURE__*/jsx(ListItem, {
6410
6718
  withPadding: true,
@@ -6899,7 +7207,7 @@ function formatInitialValueToAutocompletePrediction(address, placeId) {
6899
7207
  };
6900
7208
  }
6901
7209
 
6902
- const _excluded$n = ["initialValue", "itemToString", "errorElement", "emptyResultsElement", "onChange"];
7210
+ const _excluded$s = ["initialValue", "itemToString", "errorElement", "emptyResultsElement", "onChange"];
6903
7211
  function InputAddress(_ref) {
6904
7212
  let {
6905
7213
  initialValue,
@@ -6908,7 +7216,7 @@ function InputAddress(_ref) {
6908
7216
  emptyResultsElement,
6909
7217
  onChange
6910
7218
  } = _ref,
6911
- props = _objectWithoutProperties(_ref, _excluded$n);
7219
+ props = _objectWithoutProperties(_ref, _excluded$s);
6912
7220
  const {
6913
7221
  state,
6914
7222
  onInputChange,
@@ -7004,12 +7312,12 @@ const InputIban = /*#__PURE__*/forwardRef((props, ref) => {
7004
7312
  }, props));
7005
7313
  });
7006
7314
 
7007
- const _excluded$m = ["onChange"];
7315
+ const _excluded$r = ["onChange"];
7008
7316
  const InputNumber = /*#__PURE__*/forwardRef((_ref, ref) => {
7009
7317
  let {
7010
7318
  onChange
7011
7319
  } = _ref,
7012
- props = _objectWithoutProperties(_ref, _excluded$m);
7320
+ props = _objectWithoutProperties(_ref, _excluded$r);
7013
7321
  return /*#__PURE__*/jsx(InputText, _objectSpread(_objectSpread({
7014
7322
  ref: ref
7015
7323
  }, props), {}, {
@@ -7026,13 +7334,13 @@ const InputNumber = /*#__PURE__*/forwardRef((_ref, ref) => {
7026
7334
  }));
7027
7335
  });
7028
7336
 
7029
- const _excluded$l = ["isPasswordDefaultVisible", "right"];
7337
+ const _excluded$q = ["isPasswordDefaultVisible", "right"];
7030
7338
  const InputPassword = /*#__PURE__*/forwardRef((_ref, ref) => {
7031
7339
  let {
7032
7340
  isPasswordDefaultVisible,
7033
7341
  right
7034
7342
  } = _ref,
7035
- props = _objectWithoutProperties(_ref, _excluded$l);
7343
+ props = _objectWithoutProperties(_ref, _excluded$q);
7036
7344
  const [isVisible, setIsVisible] = useState(Boolean(isPasswordDefaultVisible));
7037
7345
  return /*#__PURE__*/jsx(InputText, _objectSpread(_objectSpread({
7038
7346
  ref: ref
@@ -7053,7 +7361,7 @@ const InputPassword = /*#__PURE__*/forwardRef((_ref, ref) => {
7053
7361
  }));
7054
7362
  });
7055
7363
 
7056
- const _excluded$k = ["enterKeyHint", "autoComplete", "phoneNumberLength", "onChange"];
7364
+ const _excluded$p = ["enterKeyHint", "autoComplete", "phoneNumberLength", "onChange"];
7057
7365
  function isPhoneNumberValid(number) {
7058
7366
  return isValidNumber(number);
7059
7367
  }
@@ -7067,7 +7375,7 @@ const InputPhone = /*#__PURE__*/forwardRef((_ref, ref) => {
7067
7375
  phoneNumberLength = 10,
7068
7376
  onChange
7069
7377
  } = _ref,
7070
- props = _objectWithoutProperties(_ref, _excluded$k);
7378
+ props = _objectWithoutProperties(_ref, _excluded$p);
7071
7379
  const currentEnterKeyHint = enterKeyHint ? getEnterKeyHintForNumericInput(enterKeyHint) : undefined;
7072
7380
  return /*#__PURE__*/jsx(InputText, _objectSpread(_objectSpread({
7073
7381
  ref: ref
@@ -7517,7 +7825,7 @@ function RadioButton({
7517
7825
  });
7518
7826
  }
7519
7827
 
7520
- const _excluded$j = ["children", "stretch", "value", "disabled", "onFocus", "onBlur", "onChange"];
7828
+ const _excluded$o = ["children", "stretch", "value", "disabled", "onFocus", "onBlur", "onChange"];
7521
7829
  function RadioButtonGroupItem(_ref) {
7522
7830
  let props = _extends({}, (_objectDestructuringEmpty(_ref), _ref));
7523
7831
  return /*#__PURE__*/jsx(RadioButton, _objectSpread({}, props));
@@ -7532,7 +7840,7 @@ function RadioButtonGroup(_ref2) {
7532
7840
  onBlur,
7533
7841
  onChange
7534
7842
  } = _ref2,
7535
- props = _objectWithoutProperties(_ref2, _excluded$j);
7843
+ props = _objectWithoutProperties(_ref2, _excluded$o);
7536
7844
  const [currentValue, setCurrentValue] = useState(value);
7537
7845
  const handleChange = newValue => {
7538
7846
  if (disabled) return;
@@ -7561,14 +7869,14 @@ function RadioButtonGroup(_ref2) {
7561
7869
  }
7562
7870
  RadioButtonGroup.RadioButton = RadioButtonGroupItem;
7563
7871
 
7564
- const _excluded$i = ["helper", "limit"];
7872
+ const _excluded$n = ["helper", "limit"];
7565
7873
  const TextArea = /*#__PURE__*/forwardRef((_ref, ref) => {
7566
7874
  var _props$value, _props$value2;
7567
7875
  let {
7568
7876
  helper,
7569
7877
  limit
7570
7878
  } = _ref,
7571
- props = _objectWithoutProperties(_ref, _excluded$i);
7879
+ props = _objectWithoutProperties(_ref, _excluded$n);
7572
7880
  const shouldDisplayLimit = limit && limit > 0;
7573
7881
  const isLimitReached = ((_props$value = props.value) === null || _props$value === void 0 ? void 0 : _props$value.length) === limit;
7574
7882
  const limitContainerAnimatedStyle = useAnimatedStyle(() => ({
@@ -7724,7 +8032,7 @@ function ToggleAnimated({
7724
8032
  });
7725
8033
  }
7726
8034
 
7727
- const _excluded$h = ["isDisabled", "isHoveredInternal", "isFocusedInternal", "isPressedInternal", "label", "variant", "size", "value", "onChange"];
8035
+ const _excluded$m = ["isDisabled", "isHoveredInternal", "isFocusedInternal", "isPressedInternal", "label", "variant", "size", "value", "onChange"];
7728
8036
  const getLabelTypographyType = size => {
7729
8037
  return size === 'medium' ? 'body' : 'body-medium';
7730
8038
  };
@@ -7740,7 +8048,7 @@ function Toggle(_ref) {
7740
8048
  value = false,
7741
8049
  onChange = () => {}
7742
8050
  } = _ref,
7743
- props = _objectWithoutProperties(_ref, _excluded$h);
8051
+ props = _objectWithoutProperties(_ref, _excluded$m);
7744
8052
  const theme = useKittTheme();
7745
8053
  return /*#__PURE__*/jsxs(HStack, _objectSpread(_objectSpread({
7746
8054
  alignItems: "center"
@@ -7778,7 +8086,7 @@ function Toggle(_ref) {
7778
8086
  }));
7779
8087
  }
7780
8088
 
7781
- const _excluded$g = ["children", "shouldHandleBottomNotch", "style", "shouldHandleTopNotch"];
8089
+ const _excluded$l = ["children", "shouldHandleBottomNotch", "style", "shouldHandleTopNotch"];
7782
8090
  function FullscreenModalBody(_ref) {
7783
8091
  let {
7784
8092
  children,
@@ -7786,7 +8094,7 @@ function FullscreenModalBody(_ref) {
7786
8094
  style,
7787
8095
  shouldHandleTopNotch
7788
8096
  } = _ref,
7789
- props = _objectWithoutProperties(_ref, _excluded$g);
8097
+ props = _objectWithoutProperties(_ref, _excluded$l);
7790
8098
  const {
7791
8099
  bottom,
7792
8100
  top
@@ -7811,30 +8119,310 @@ function FullscreenModalBody(_ref) {
7811
8119
  }));
7812
8120
  }
7813
8121
 
7814
- const _excluded$f = ["shouldHandleBottomNotch", "hasSeparator", "children"];
7815
- function FullscreenModalFooter(_ref) {
7816
- let {
7817
- shouldHandleBottomNotch = true,
7818
- hasSeparator = true,
7819
- children
7820
- } = _ref,
7821
- props = _objectWithoutProperties(_ref, _excluded$f);
7822
- const {
7823
- bottom
7824
- } = useSafeAreaInsets();
7825
- return /*#__PURE__*/jsx(View, _objectSpread(_objectSpread({
7826
- borderTopColor: "kitt.separator",
7827
- borderTopWidth: hasSeparator ? 1 : undefined,
7828
- paddingTop: "kitt.fullscreenModal.footer.verticalPadding",
7829
- paddingBottom: shouldHandleBottomNotch ? bottom : undefined,
7830
- paddingX: "kitt.fullscreenModal.horizontalPadding"
7831
- }, props), {}, {
7832
- children: /*#__PURE__*/jsx(View, {
7833
- paddingBottom: "kitt.fullscreenModal.footer.verticalPadding",
7834
- children: children
8122
+ const _excluded$k = ["shouldHandleBottomNotch", "hasSeparator", "children"];
8123
+ function FullscreenModalFooter(_ref) {
8124
+ let {
8125
+ shouldHandleBottomNotch = true,
8126
+ hasSeparator = true,
8127
+ children
8128
+ } = _ref,
8129
+ props = _objectWithoutProperties(_ref, _excluded$k);
8130
+ const {
8131
+ bottom
8132
+ } = useSafeAreaInsets();
8133
+ return /*#__PURE__*/jsx(View, _objectSpread(_objectSpread({
8134
+ borderTopColor: "kitt.separator",
8135
+ borderTopWidth: hasSeparator ? 1 : undefined,
8136
+ paddingTop: "kitt.fullscreenModal.footer.verticalPadding",
8137
+ paddingBottom: shouldHandleBottomNotch ? bottom : undefined,
8138
+ paddingX: "kitt.fullscreenModal.horizontalPadding"
8139
+ }, props), {}, {
8140
+ children: /*#__PURE__*/jsx(View, {
8141
+ paddingBottom: "kitt.fullscreenModal.footer.verticalPadding",
8142
+ children: children
8143
+ })
8144
+ }));
8145
+ }
8146
+
8147
+ function NativeOpacityAnimation$1({
8148
+ visible,
8149
+ children
8150
+ }) {
8151
+ const theme = useTheme();
8152
+ const opacityStyle = useAnimatedStyle(() => {
8153
+ const {
8154
+ duration,
8155
+ easing
8156
+ } = theme.kitt.fullscreenModal.animation.overlay;
8157
+ const [x1, y1, x2, y2] = easing;
8158
+ return {
8159
+ opacity: withTiming(visible ? 1 : 0, {
8160
+ duration,
8161
+ easing: Easing$1.bezier(x1, y1, x2, y2)
8162
+ })
8163
+ };
8164
+ });
8165
+ return /*#__PURE__*/jsx(Animated.View, {
8166
+ style: [StyleSheet.absoluteFillObject, opacityStyle],
8167
+ children: children
8168
+ });
8169
+ }
8170
+
8171
+ function NativeSlideInAnimation$1({
8172
+ visible,
8173
+ children,
8174
+ onEntered,
8175
+ onExited
8176
+ }) {
8177
+ const theme = useTheme();
8178
+ const {
8179
+ height: wHeight
8180
+ } = useWindowDimensions();
8181
+ const hasRunAnimationRef = useRef(false);
8182
+ function handleAnimationFinished() {
8183
+ if (visible) {
8184
+ if (onEntered) onEntered();
8185
+ hasRunAnimationRef.current = true;
8186
+ }
8187
+
8188
+ // Since animation callback is called on component mount, we must make sure that the animation has been runed once to call it an exit
8189
+ if (!visible && hasRunAnimationRef.current) onExited();
8190
+ }
8191
+ const translateStyle = useAnimatedStyle(() => {
8192
+ const {
8193
+ duration,
8194
+ easing
8195
+ } = theme.kitt.fullscreenModal.animation.content;
8196
+ const [x1, y1, x2, y2] = easing;
8197
+ return {
8198
+ transform: [{
8199
+ translateY: withTiming(visible ? 0 : wHeight, {
8200
+ duration,
8201
+ easing: Easing$1.bezier(x1, y1, x2, y2)
8202
+ }, isFinished => {
8203
+ if (!isFinished) return;
8204
+ runOnJS(handleAnimationFinished)();
8205
+ })
8206
+ }]
8207
+ };
8208
+ });
8209
+ return /*#__PURE__*/jsx(Animated.View, {
8210
+ style: [{
8211
+ transform: [{
8212
+ translateY: wHeight
8213
+ }]
8214
+ }, translateStyle, {
8215
+ width: '100%',
8216
+ flex: 1
8217
+ }],
8218
+ children: children
8219
+ });
8220
+ }
8221
+
8222
+ function FullscreenModalAnimation({
8223
+ visible,
8224
+ children,
8225
+ onEnter,
8226
+ onEntered,
8227
+ onExit,
8228
+ onExited
8229
+ }) {
8230
+ const [isModalVisible, setIsModalVisible] = useState(visible);
8231
+ const [isContentVisible, setIsContentVisible] = useState(false);
8232
+ const handleAnimationExited = () => {
8233
+ setIsModalVisible(false);
8234
+ // Android doesn't handle the onDismiss callback on the modal, we need to call it manually
8235
+ if (Platform.OS === 'android' && onExited) onExited();
8236
+ };
8237
+
8238
+ // When parent visibility is set to false, in order to have our exit animation we must in this order :
8239
+ // 1 - run the exit animation
8240
+ // 2 - once it is done, unmount the Modal
8241
+ useEffect(() => {
8242
+ if (!(!visible && isContentVisible)) return;
8243
+ if (onExit) onExit();
8244
+ setIsContentVisible(false);
8245
+ }, [visible, isContentVisible, onExit]);
8246
+ return /*#__PURE__*/jsx(Modal, {
8247
+ transparent: true,
8248
+ supportedOrientations: ['landscape', 'portrait'],
8249
+ visible: isModalVisible,
8250
+ onShow: () => {
8251
+ if (onEnter) onEnter();
8252
+ setIsContentVisible(true);
8253
+ },
8254
+ onDismiss: () => {
8255
+ if (onExited) onExited();
8256
+ },
8257
+ children: /*#__PURE__*/jsxs(View, {
8258
+ position: "relative",
8259
+ flexGrow: 1,
8260
+ justifyContent: "center",
8261
+ alignItems: "center",
8262
+ children: [/*#__PURE__*/jsx(NativeOpacityAnimation$1, {
8263
+ visible: isContentVisible,
8264
+ children: /*#__PURE__*/jsx(Overlay, {
8265
+ onPress: handleAnimationExited
8266
+ })
8267
+ }), /*#__PURE__*/jsx(NativeSlideInAnimation$1, {
8268
+ visible: isContentVisible,
8269
+ onExited: handleAnimationExited,
8270
+ onEntered: onEntered,
8271
+ children: /*#__PURE__*/jsx(View, {
8272
+ flexGrow: 1,
8273
+ children: children
8274
+ })
8275
+ })]
8276
+ })
8277
+ });
8278
+ }
8279
+
8280
+ const _excluded$j = ["children", "visible", "onClose", "onExited"];
8281
+ function FullscreenModalBehaviour(_ref) {
8282
+ let {
8283
+ children,
8284
+ visible,
8285
+ onClose,
8286
+ onExited
8287
+ } = _ref,
8288
+ props = _objectWithoutProperties(_ref, _excluded$j);
8289
+ const [isModalBehaviourVisible, setIsModalBehaviourVisible] = useState(visible);
8290
+ useEffect(() => {
8291
+ if (visible === true) {
8292
+ setIsModalBehaviourVisible(true);
8293
+ }
8294
+ }, [visible]);
8295
+ return /*#__PURE__*/jsx(ModalBehaviour, {
8296
+ visible: isModalBehaviourVisible,
8297
+ onClose: onClose,
8298
+ children: /*#__PURE__*/jsx(FullscreenModalAnimation, _objectSpread(_objectSpread({}, props), {}, {
8299
+ visible: visible,
8300
+ onExited: () => {
8301
+ if (onExited) onExited();
8302
+ setIsModalBehaviourVisible(false);
8303
+ },
8304
+ children: children
8305
+ }))
8306
+ });
8307
+ }
8308
+
8309
+ function FullscreenModalContainer({
8310
+ children,
8311
+ backgroundColor
8312
+ }) {
8313
+ return /*#__PURE__*/jsx(View, {
8314
+ position: "relative",
8315
+ flexGrow: 1,
8316
+ flexShrink: 1,
8317
+ flexBasis: "100%"
8318
+ /*
8319
+ Here we are setting the same min and max height because on web the content was overflowing and not scrolling
8320
+ minHeight is needed to make the modal fullscreen
8321
+ maxHeight limits the height to the viewport when the content is too long, this allows us to scroll inside
8322
+ We use svh instead of vh because vh is the total height of the viewport, including the address bar in mobile web browsers
8323
+ */,
8324
+ _web: {
8325
+ minHeight: '100svh',
8326
+ maxHeight: '100svh'
8327
+ },
8328
+ backgroundColor: backgroundColor !== null && backgroundColor !== void 0 ? backgroundColor : 'kitt.uiBackgroundLight',
8329
+ children: children
8330
+ });
8331
+ }
8332
+
8333
+ const _excluded$i = ["hasSeparator", "isTransparent", "title", "children", "right", "left", "shouldHandleTopNotch"];
8334
+ function FullscreenModalHeader(_ref) {
8335
+ let {
8336
+ hasSeparator = true,
8337
+ isTransparent,
8338
+ title,
8339
+ children,
8340
+ right,
8341
+ left,
8342
+ shouldHandleTopNotch = true
8343
+ } = _ref,
8344
+ props = _objectWithoutProperties(_ref, _excluded$i);
8345
+ const {
8346
+ top
8347
+ } = useSafeAreaInsets();
8348
+ const hasRight = Boolean(right);
8349
+ const hasLeft = Boolean(left);
8350
+ const hasContent = Boolean(title || children);
8351
+ return /*#__PURE__*/jsx(View, _objectSpread(_objectSpread({
8352
+ backgroundColor: isTransparent ? 'kitt.transparent' : 'kitt.uiBackgroundLight',
8353
+ minHeight: "kitt.fullscreenModal.header.height",
8354
+ width: "100%",
8355
+ justifyContent: "center",
8356
+ paddingTop: shouldHandleTopNotch ? top : undefined,
8357
+ paddingRight: hasRight ? 'kitt.2' : 'kitt.fullscreenModal.horizontalPadding',
8358
+ paddingLeft: hasLeft ? 'kitt.2' : 'kitt.fullscreenModal.horizontalPadding',
8359
+ borderBottomColor: "kitt.separator",
8360
+ borderBottomWidth: hasSeparator ? 1 : undefined
8361
+ }, props), {}, {
8362
+ children: /*#__PURE__*/jsxs(View, {
8363
+ flexDirection: "row",
8364
+ alignItems: "center",
8365
+ justifyContent: !hasContent && !hasLeft ? 'flex-end' : 'space-between',
8366
+ children: [left ? /*#__PURE__*/jsx(View, {
8367
+ width: "kitt.iconButton.width",
8368
+ children: left
8369
+ }) : null, title ? /*#__PURE__*/jsx(View, {
8370
+ flexGrow: 1,
8371
+ flexShrink: 1,
8372
+ paddingLeft: hasLeft ? 'kitt.2' : undefined,
8373
+ paddingRight: hasRight ? 'kitt.2' : 0,
8374
+ children: /*#__PURE__*/jsx(Typography.Text, {
8375
+ variant: "bold",
8376
+ textAlign: !hasLeft && hasRight ? 'left' : 'center',
8377
+ children: title
8378
+ })
8379
+ }) : null, children ? /*#__PURE__*/jsx(View, {
8380
+ flexGrow: 1,
8381
+ flexShrink: 1,
8382
+ alignItems: "center",
8383
+ paddingLeft: hasLeft ? 'kitt.2' : undefined,
8384
+ paddingRight: hasRight ? 'kitt.2' : undefined,
8385
+ children: children
8386
+ }) : null, right || left ? /*#__PURE__*/jsx(View, {
8387
+ width: "kitt.iconButton.width",
8388
+ children: right
8389
+ }) : null]
8390
+ })
8391
+ }));
8392
+ }
8393
+
8394
+ function FullscreenModal({
8395
+ body,
8396
+ header,
8397
+ footer,
8398
+ backgroundColor,
8399
+ contentContainer: ContentContainer = IdentityComponent
8400
+ }) {
8401
+ return /*#__PURE__*/jsx(FullscreenModalContainer, {
8402
+ backgroundColor: backgroundColor,
8403
+ children: /*#__PURE__*/jsxs(ContentContainer, {
8404
+ children: [header ? /*#__PURE__*/jsx(View, {
8405
+ children: header
8406
+ }) : null, /*#__PURE__*/jsxs(View, {
8407
+ flexGrow: 1,
8408
+ flexShrink: 1,
8409
+ justifyContent: "space-between",
8410
+ children: [/*#__PURE__*/jsx(ScrollView$2, {
8411
+ bounces: false,
8412
+ contentContainerStyle: {
8413
+ flexGrow: 1,
8414
+ position: 'relative'
8415
+ },
8416
+ children: body
8417
+ }), footer || null]
8418
+ })]
7835
8419
  })
7836
- }));
8420
+ });
7837
8421
  }
8422
+ FullscreenModal.Header = FullscreenModalHeader;
8423
+ FullscreenModal.Footer = FullscreenModalFooter;
8424
+ FullscreenModal.Body = FullscreenModalBody;
8425
+ FullscreenModal.ModalBehaviour = FullscreenModalBehaviour;
7838
8426
 
7839
8427
  function NativeOpacityAnimation({
7840
8428
  visible,
@@ -7911,7 +8499,7 @@ function NativeSlideInAnimation({
7911
8499
  });
7912
8500
  }
7913
8501
 
7914
- function FullscreenModalAnimation({
8502
+ function FullscreenModal2Animation({
7915
8503
  visible,
7916
8504
  children,
7917
8505
  onEnter,
@@ -7969,15 +8557,15 @@ function FullscreenModalAnimation({
7969
8557
  });
7970
8558
  }
7971
8559
 
7972
- const _excluded$e = ["children", "visible", "onClose", "onExited"];
7973
- function FullscreenModalBehaviour(_ref) {
8560
+ const _excluded$h = ["children", "visible", "onClose", "onExited"];
8561
+ function FullscreenModal2Behaviour(_ref) {
7974
8562
  let {
7975
8563
  children,
7976
8564
  visible,
7977
8565
  onClose,
7978
8566
  onExited
7979
8567
  } = _ref,
7980
- props = _objectWithoutProperties(_ref, _excluded$e);
8568
+ props = _objectWithoutProperties(_ref, _excluded$h);
7981
8569
  const [isModalBehaviourVisible, setIsModalBehaviourVisible] = useState(visible);
7982
8570
  useEffect(() => {
7983
8571
  if (visible === true) {
@@ -7987,7 +8575,7 @@ function FullscreenModalBehaviour(_ref) {
7987
8575
  return /*#__PURE__*/jsx(ModalBehaviour, {
7988
8576
  visible: isModalBehaviourVisible,
7989
8577
  onClose: onClose,
7990
- children: /*#__PURE__*/jsx(FullscreenModalAnimation, _objectSpread(_objectSpread({}, props), {}, {
8578
+ children: /*#__PURE__*/jsx(FullscreenModal2Animation, _objectSpread(_objectSpread({}, props), {}, {
7991
8579
  visible: visible,
7992
8580
  onExited: () => {
7993
8581
  if (onExited) onExited();
@@ -7998,7 +8586,52 @@ function FullscreenModalBehaviour(_ref) {
7998
8586
  });
7999
8587
  }
8000
8588
 
8001
- function FullscreenModalContainer({
8589
+ const _excluded$g = ["children", "shouldHandleBottomNotch", "style", "shouldHandleTopNotch"];
8590
+ function FullscreenModal2Body(_ref) {
8591
+ let {
8592
+ children,
8593
+ shouldHandleBottomNotch,
8594
+ style,
8595
+ shouldHandleTopNotch
8596
+ } = _ref,
8597
+ props = _objectWithoutProperties(_ref, _excluded$g);
8598
+ const {
8599
+ bottom,
8600
+ top
8601
+ } = useSafeAreaInsets();
8602
+ const {
8603
+ kitt: {
8604
+ fullscreenModal: {
8605
+ body: {
8606
+ verticalPadding
8607
+ }
8608
+ }
8609
+ }
8610
+ } = useTheme();
8611
+ const paddingBottom = shouldHandleBottomNotch ? Math.max(bottom, verticalPadding) : verticalPadding;
8612
+ const paddingTop = shouldHandleTopNotch ? Math.max(top, verticalPadding) : verticalPadding;
8613
+ return /*#__PURE__*/jsx(View, {
8614
+ flexGrow: 1,
8615
+ flexShrink: 1,
8616
+ justifyContent: "space-between",
8617
+ children: /*#__PURE__*/jsx(ScrollView$1, {
8618
+ bounces: false,
8619
+ contentContainerStyle: {
8620
+ flexGrow: 1,
8621
+ position: 'relative'
8622
+ },
8623
+ children: /*#__PURE__*/jsx(View, _objectSpread(_objectSpread({}, props), {}, {
8624
+ paddingX: "kitt.fullscreenModal.horizontalPadding",
8625
+ paddingTop: paddingTop,
8626
+ paddingBottom: paddingBottom,
8627
+ style: style,
8628
+ children: children
8629
+ }))
8630
+ })
8631
+ });
8632
+ }
8633
+
8634
+ function FullscreenModal2Container({
8002
8635
  children,
8003
8636
  backgroundColor
8004
8637
  }) {
@@ -8022,8 +8655,33 @@ function FullscreenModalContainer({
8022
8655
  });
8023
8656
  }
8024
8657
 
8025
- const _excluded$d = ["hasSeparator", "isTransparent", "title", "children", "right", "left", "shouldHandleTopNotch"];
8026
- function FullscreenModalHeader(_ref) {
8658
+ const _excluded$f = ["shouldHandleBottomNotch", "hasSeparator", "children"];
8659
+ function FullscreenModal2Footer(_ref) {
8660
+ let {
8661
+ shouldHandleBottomNotch = true,
8662
+ hasSeparator = true,
8663
+ children
8664
+ } = _ref,
8665
+ props = _objectWithoutProperties(_ref, _excluded$f);
8666
+ const {
8667
+ bottom
8668
+ } = useSafeAreaInsets();
8669
+ return /*#__PURE__*/jsx(View, _objectSpread(_objectSpread({
8670
+ borderTopColor: "kitt.separator",
8671
+ borderTopWidth: hasSeparator ? 1 : undefined,
8672
+ paddingTop: "kitt.fullscreenModal.footer.verticalPadding",
8673
+ paddingBottom: shouldHandleBottomNotch ? bottom : undefined,
8674
+ paddingX: "kitt.fullscreenModal.horizontalPadding"
8675
+ }, props), {}, {
8676
+ children: /*#__PURE__*/jsx(View, {
8677
+ paddingBottom: "kitt.fullscreenModal.footer.verticalPadding",
8678
+ children: children
8679
+ })
8680
+ }));
8681
+ }
8682
+
8683
+ const _excluded$e = ["hasSeparator", "isTransparent", "title", "children", "right", "left", "shouldHandleTopNotch"];
8684
+ function FullscreenModal2Header(_ref) {
8027
8685
  let {
8028
8686
  hasSeparator = true,
8029
8687
  isTransparent,
@@ -8033,7 +8691,7 @@ function FullscreenModalHeader(_ref) {
8033
8691
  left,
8034
8692
  shouldHandleTopNotch = true
8035
8693
  } = _ref,
8036
- props = _objectWithoutProperties(_ref, _excluded$d);
8694
+ props = _objectWithoutProperties(_ref, _excluded$e);
8037
8695
  const {
8038
8696
  top
8039
8697
  } = useSafeAreaInsets();
@@ -8083,38 +8741,19 @@ function FullscreenModalHeader(_ref) {
8083
8741
  }));
8084
8742
  }
8085
8743
 
8086
- function FullscreenModal({
8087
- body,
8088
- header,
8089
- footer,
8744
+ function FullscreenModal2({
8090
8745
  backgroundColor,
8091
- contentContainer: ContentContainer = IdentityComponent
8746
+ children
8092
8747
  }) {
8093
- return /*#__PURE__*/jsx(FullscreenModalContainer, {
8748
+ return /*#__PURE__*/jsx(FullscreenModal2Container, {
8094
8749
  backgroundColor: backgroundColor,
8095
- children: /*#__PURE__*/jsxs(ContentContainer, {
8096
- children: [header ? /*#__PURE__*/jsx(View, {
8097
- children: header
8098
- }) : null, /*#__PURE__*/jsxs(View, {
8099
- flexGrow: 1,
8100
- flexShrink: 1,
8101
- justifyContent: "space-between",
8102
- children: [/*#__PURE__*/jsx(ScrollView$2, {
8103
- bounces: false,
8104
- contentContainerStyle: {
8105
- flexGrow: 1,
8106
- position: 'relative'
8107
- },
8108
- children: body
8109
- }), footer || null]
8110
- })]
8111
- })
8750
+ children: children
8112
8751
  });
8113
8752
  }
8114
- FullscreenModal.Header = FullscreenModalHeader;
8115
- FullscreenModal.Footer = FullscreenModalFooter;
8116
- FullscreenModal.Body = FullscreenModalBody;
8117
- FullscreenModal.ModalBehaviour = FullscreenModalBehaviour;
8753
+ FullscreenModal2.Header = FullscreenModal2Header;
8754
+ FullscreenModal2.Footer = FullscreenModal2Footer;
8755
+ FullscreenModal2.Body = FullscreenModal2Body;
8756
+ FullscreenModal2.Behaviour = FullscreenModal2Behaviour;
8118
8757
 
8119
8758
  function GroupTags({
8120
8759
  children,
@@ -8369,7 +9008,7 @@ function Highlight({
8369
9008
  });
8370
9009
  }
8371
9010
 
8372
- const _excluded$c = ["color", "isDisabled"];
9011
+ const _excluded$d = ["color", "isDisabled"];
8373
9012
  function getBackgroundColor$1(color, isDisabled) {
8374
9013
  if (isDisabled) {
8375
9014
  return 'kitt.iconButton.disabled.backgroundColor';
@@ -8391,7 +9030,7 @@ function Background(_ref) {
8391
9030
  color,
8392
9031
  isDisabled
8393
9032
  } = _ref,
8394
- props = _objectWithoutProperties(_ref, _excluded$c);
9033
+ props = _objectWithoutProperties(_ref, _excluded$d);
8395
9034
  return /*#__PURE__*/jsx(View, _objectSpread(_objectSpread({}, props), {}, {
8396
9035
  width: "100%",
8397
9036
  height: "100%",
@@ -8792,7 +9431,7 @@ const getBackgroundColor = ({
8792
9431
  return isSelected || isHovered ? theme.mapMarker.meetingPoint.selected : theme.mapMarker.meetingPoint.default;
8793
9432
  };
8794
9433
 
8795
- const _excluded$b = ["onPress", "testID"];
9434
+ const _excluded$c = ["onPress", "testID"];
8796
9435
  let MapMarkerVariantEnum = /*#__PURE__*/function (MapMarkerVariantEnum) {
8797
9436
  MapMarkerVariantEnum["HOME"] = "home";
8798
9437
  MapMarkerVariantEnum["MEETING_POINT"] = "meetingPoint";
@@ -8862,7 +9501,7 @@ function MapMarker(_ref) {
8862
9501
  onPress,
8863
9502
  testID
8864
9503
  } = _ref,
8865
- props = _objectWithoutProperties(_ref, _excluded$b);
9504
+ props = _objectWithoutProperties(_ref, _excluded$c);
8866
9505
  return /*#__PURE__*/jsx(Pressable$1, {
8867
9506
  testID: testID,
8868
9507
  onPress: onPress,
@@ -11474,7 +12113,7 @@ function KittNativeBaseProvider({
11474
12113
  });
11475
12114
  }
11476
12115
 
11477
- const _excluded$a = ["children", "visible", "appear", "onExited", "onEnter", "onExit", "onClose"];
12116
+ const _excluded$b = ["children", "visible", "appear", "onExited", "onEnter", "onExit", "onClose"];
11478
12117
  function NavigationModalBehaviour(_ref) {
11479
12118
  let {
11480
12119
  children,
@@ -11485,7 +12124,7 @@ function NavigationModalBehaviour(_ref) {
11485
12124
  onExit,
11486
12125
  onClose
11487
12126
  } = _ref,
11488
- props = _objectWithoutProperties(_ref, _excluded$a);
12127
+ props = _objectWithoutProperties(_ref, _excluded$b);
11489
12128
  const AnimationComponent = useBreakpointValue({
11490
12129
  base: FullscreenModalAnimation,
11491
12130
  small: CardModalAnimation
@@ -11544,32 +12183,122 @@ function NavigationModal({
11544
12183
  contentContainer: contentContainer
11545
12184
  });
11546
12185
  }
11547
- function Header(props) {
12186
+ function Header$1(props) {
11548
12187
  const Component = useBreakpointValue({
11549
12188
  base: FullscreenModal.Header,
11550
12189
  small: CardModal.Header
11551
12190
  });
11552
12191
  return /*#__PURE__*/jsx(Component, _objectSpread({}, props));
11553
12192
  }
11554
- function Body(props) {
12193
+ function Body$1(props) {
11555
12194
  const Component = useBreakpointValue({
11556
12195
  base: FullscreenModal.Body,
11557
12196
  small: CardModal.Body
11558
12197
  });
11559
12198
  return /*#__PURE__*/jsx(Component, _objectSpread({}, props));
11560
12199
  }
11561
- function Footer(props) {
12200
+ function Footer$1(props) {
11562
12201
  const Component = useBreakpointValue({
11563
12202
  base: FullscreenModal.Footer,
11564
12203
  small: CardModal.Footer
11565
12204
  });
11566
12205
  return /*#__PURE__*/jsx(Component, _objectSpread({}, props));
11567
12206
  }
11568
- NavigationModal.Header = Header;
11569
- NavigationModal.Body = Body;
11570
- NavigationModal.Footer = Footer;
12207
+ NavigationModal.Header = Header$1;
12208
+ NavigationModal.Body = Body$1;
12209
+ NavigationModal.Footer = Footer$1;
11571
12210
  NavigationModal.ModalBehaviour = NavigationModalBehaviour;
11572
12211
 
12212
+ const _excluded$a = ["children", "visible", "appear", "onExited", "onEnter", "onExit", "onClose"];
12213
+ function NavigationModal2Behaviour(_ref) {
12214
+ let {
12215
+ children,
12216
+ visible,
12217
+ appear = true,
12218
+ onExited,
12219
+ onEnter,
12220
+ onExit,
12221
+ onClose
12222
+ } = _ref,
12223
+ props = _objectWithoutProperties(_ref, _excluded$a);
12224
+ const AnimationComponent = useBreakpointValue({
12225
+ base: FullscreenModal2Animation,
12226
+ small: CardModal2Animation
12227
+ });
12228
+ const [isModalBehaviourVisible, setIsModalBehaviourVisible] = useState(visible);
12229
+ const [shouldAppear, setShouldAppear] = useState(appear);
12230
+ useEffect(() => {
12231
+ if (visible === true) {
12232
+ setIsModalBehaviourVisible(true);
12233
+ }
12234
+ }, [visible]);
12235
+ return /*#__PURE__*/jsx(ModalBehaviour, {
12236
+ visible: isModalBehaviourVisible,
12237
+ onClose: onClose,
12238
+ children: /*#__PURE__*/jsx(AnimationComponent, _objectSpread(_objectSpread({}, props), {}, {
12239
+ appear: shouldAppear,
12240
+ visible: visible,
12241
+ onEnter: () => {
12242
+ if (onEnter) onEnter();
12243
+
12244
+ // Once a children as been displayed, we force appear to false in order to avoid replaying animation on breakpoint change
12245
+ setShouldAppear(false);
12246
+ },
12247
+ onExit: () => {
12248
+ if (onExit) onExit();
12249
+
12250
+ // Reset appear value to its original value for future modal display
12251
+ setShouldAppear(appear);
12252
+ },
12253
+ onExited: () => {
12254
+ if (onExited) onExited();
12255
+ setIsModalBehaviourVisible(false);
12256
+ },
12257
+ onClose: onClose,
12258
+ children: children
12259
+ }))
12260
+ });
12261
+ }
12262
+
12263
+ function NavigationModal2({
12264
+ backgroundColor,
12265
+ children
12266
+ }) {
12267
+ const Component = useBreakpointValue({
12268
+ base: FullscreenModal2,
12269
+ small: CardModal2
12270
+ });
12271
+ return /*#__PURE__*/jsx(Component, {
12272
+ backgroundColor: backgroundColor,
12273
+ children: children
12274
+ });
12275
+ }
12276
+ function Header(props) {
12277
+ const Component = useBreakpointValue({
12278
+ base: FullscreenModal2.Header,
12279
+ small: CardModal2.Header
12280
+ });
12281
+ return /*#__PURE__*/jsx(Component, _objectSpread({}, props));
12282
+ }
12283
+ function Body(props) {
12284
+ const Component = useBreakpointValue({
12285
+ base: FullscreenModal2.Body,
12286
+ small: CardModal2.Body
12287
+ });
12288
+ return /*#__PURE__*/jsx(Component, _objectSpread({}, props));
12289
+ }
12290
+ function Footer(props) {
12291
+ const Component = useBreakpointValue({
12292
+ base: FullscreenModal2.Footer,
12293
+ small: CardModal2.Footer
12294
+ });
12295
+ return /*#__PURE__*/jsx(Component, _objectSpread({}, props));
12296
+ }
12297
+ NavigationModal2.Header = Header;
12298
+ NavigationModal2.Body = Body;
12299
+ NavigationModal2.Footer = Footer;
12300
+ NavigationModal2.ModalBehaviour = NavigationModal2Behaviour;
12301
+
11573
12302
  function Notification({
11574
12303
  type,
11575
12304
  children,
@@ -13964,5 +14693,5 @@ function VerticalSteps(_ref) {
13964
14693
  VerticalSteps.Step = Step;
13965
14694
  VerticalSteps.BorderlessStep = BorderlessStep;
13966
14695
 
13967
- export { ActionCard, Actions, Autocomplete, Avatar, BottomSheet, Button, CardModal, Center, Checkbox, ChoicesElements, CloseIconButton, DatePicker, DialogModal, DocumentPicker, Emoji, ExternalAppLink, ExternalLink, FilePicker, FlatList, Flex, FullscreenModal, GoogleMapsApiKeyProvider, GoogleMapsAutocompleteProvider, GroupTags, HStack, Highlight, Icon, IconButton, Image, ImagePicker, InfoCard, InputAddress, InputEmail, InputFeedback, InputField, InputIban, InputIcon, InputNumber, InputPassword, InputPhone, InputPressable, InputTag, InputText, KittBreakpointNameEnum, KittBreakpoints, KittBreakpointsMax, KittMapConfigProvider, KittNativeBaseProvider, KittThemeDecorator, KittThemeProvider, Label, ListItem, LoaderIcon, MapMarker, MapMarkerVariantEnum, MatchWindowSize, Message, ModalBehaviour, FlatList as NativeOnlyFlatList, NavigationModal, Notification, Overlay, PageLoader, Picker, Pressable, RadioWithRef as Radio, RadioButtonGroup, ScrollView, DeprecatedSection as Section, SectionList, SegmentedProgressBar, Skeleton, SpinningIcon, Stack, StaticMap, Story, StoryBlock, StoryContainer, StoryDecorator, StoryGrid, StorySection, StoryTitle, StyleWebWrapper, SwitchBreakpoints, TabBar, Tag, TextArea, TimePicker, ToastComponent, Toggle, Tooltip, Typography, TypographyEmoji, TypographyIcon, TypographyLink, VStack, VerticalSteps, View, createChoicesComponent, createResponsiveStyleFromProp, getStaticMapImageUrl, getValueForBreakpoint, hex2rgba, matchWindowSize, storyPadding, theme, useBottomSheet, useBreakpointValue, useCurrentBreakpointName, useGetStaticMapImageUrl, useKittMapConfig, useKittTheme, useMatchWindowSize, useOpenExternalLink, useStaticBottomSheet, useStoryBlockColor, useTheme };
14696
+ export { ActionCard, Actions, Autocomplete, Avatar, BottomSheet, Button, CardModal, CardModal2, Center, Checkbox, ChoicesElements, CloseIconButton, DatePicker, DialogModal, DocumentPicker, Emoji, ExternalAppLink, ExternalLink, FilePicker, FlatList, Flex, FullscreenModal, FullscreenModal2, GoogleMapsApiKeyProvider, GoogleMapsAutocompleteProvider, GroupTags, HStack, Highlight, Icon, IconButton, Image, ImagePicker, InfoCard, InputAddress, InputEmail, InputFeedback, InputField, InputIban, InputIcon, InputNumber, InputPassword, InputPhone, InputPressable, InputTag, InputText, KittBreakpointNameEnum, KittBreakpoints, KittBreakpointsMax, KittMapConfigProvider, KittNativeBaseProvider, KittThemeDecorator, KittThemeProvider, Label, ListItem, LoaderIcon, MapMarker, MapMarkerVariantEnum, MatchWindowSize, Message, ModalBehaviour, FlatList as NativeOnlyFlatList, NavigationModal, NavigationModal2, Notification, Overlay, PageLoader, Picker, Pressable, RadioWithRef as Radio, RadioButtonGroup, ScrollView, DeprecatedSection as Section, SectionList, SegmentedProgressBar, Skeleton, SpinningIcon, Stack, StaticMap, Story, StoryBlock, StoryContainer, StoryDecorator, StoryGrid, StorySection, StoryTitle, StyleWebWrapper, SwitchBreakpoints, TabBar, Tag, TextArea, TimePicker, ToastComponent, Toggle, Tooltip, Typography, TypographyEmoji, TypographyIcon, TypographyLink, VStack, VerticalSteps, View, createChoicesComponent, createResponsiveStyleFromProp, getStaticMapImageUrl, getValueForBreakpoint, hex2rgba, matchWindowSize, storyPadding, theme, useBottomSheet, useBreakpointValue, useCurrentBreakpointName, useGetStaticMapImageUrl, useKittMapConfig, useKittTheme, useMatchWindowSize, useOpenExternalLink, useStaticBottomSheet, useStoryBlockColor, useTheme };
13968
14697
  //# sourceMappingURL=index-metro.es.android.js.map