@ornikar/kitt-universal 25.48.1-canary.430f6cd109998511d4c4ad7369a24908547c62f4.0 → 25.49.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 (82) hide show
  1. package/CHANGELOG.md +2 -4
  2. package/dist/definitions/BottomSheet/BottomSheet.d.ts +2 -3
  3. package/dist/definitions/BottomSheet/BottomSheet.d.ts.map +1 -1
  4. package/dist/definitions/CardModal/CardModal.d.ts +2 -3
  5. package/dist/definitions/CardModal/CardModal.d.ts.map +1 -1
  6. package/dist/definitions/FullscreenModal/FullscreenModal.d.ts +2 -3
  7. package/dist/definitions/FullscreenModal/FullscreenModal.d.ts.map +1 -1
  8. package/dist/definitions/NavigationModal/NavigationModal.d.ts +1 -1
  9. package/dist/definitions/NavigationModal/NavigationModal.d.ts.map +1 -1
  10. package/dist/definitions/index.d.ts +0 -6
  11. package/dist/definitions/index.d.ts.map +1 -1
  12. package/dist/index-metro.es.android.js +164 -922
  13. package/dist/index-metro.es.android.js.map +1 -1
  14. package/dist/index-metro.es.ios.js +164 -922
  15. package/dist/index-metro.es.ios.js.map +1 -1
  16. package/dist/index-node-20.10.cjs.js +97 -852
  17. package/dist/index-node-20.10.cjs.js.map +1 -1
  18. package/dist/index-node-20.10.cjs.web.css +0 -8
  19. package/dist/index-node-20.10.cjs.web.js +139 -822
  20. package/dist/index-node-20.10.cjs.web.js.map +1 -1
  21. package/dist/index-node-20.10.es.mjs +98 -850
  22. package/dist/index-node-20.10.es.mjs.map +1 -1
  23. package/dist/index-node-20.10.es.web.css +0 -8
  24. package/dist/index-node-20.10.es.web.mjs +141 -821
  25. package/dist/index-node-20.10.es.web.mjs.map +1 -1
  26. package/dist/index.es.js +166 -935
  27. package/dist/index.es.js.map +1 -1
  28. package/dist/index.es.web.js +225 -910
  29. package/dist/index.es.web.js.map +1 -1
  30. package/dist/styles.css +0 -8
  31. package/dist/tsbuildinfo +1 -1
  32. package/package.json +1 -1
  33. package/dist/definitions/CardModal2/CardModal2.d.ts +0 -19
  34. package/dist/definitions/CardModal2/CardModal2.d.ts.map +0 -1
  35. package/dist/definitions/CardModal2/components/CardModal2Animation/CardModal2Animation.d.ts +0 -8
  36. package/dist/definitions/CardModal2/components/CardModal2Animation/CardModal2Animation.d.ts.map +0 -1
  37. package/dist/definitions/CardModal2/components/CardModal2Animation/CardModal2Animation.web.d.ts +0 -4
  38. package/dist/definitions/CardModal2/components/CardModal2Animation/CardModal2Animation.web.d.ts.map +0 -1
  39. package/dist/definitions/CardModal2/components/CardModal2Animation/CardModal2RotationContainer.d.ts +0 -7
  40. package/dist/definitions/CardModal2/components/CardModal2Animation/CardModal2RotationContainer.d.ts.map +0 -1
  41. package/dist/definitions/CardModal2/components/CardModal2Animation/NativeOpacityAnimation.d.ts +0 -8
  42. package/dist/definitions/CardModal2/components/CardModal2Animation/NativeOpacityAnimation.d.ts.map +0 -1
  43. package/dist/definitions/CardModal2/components/CardModal2Animation/NativeRotationAnimation.d.ts +0 -11
  44. package/dist/definitions/CardModal2/components/CardModal2Animation/NativeRotationAnimation.d.ts.map +0 -1
  45. package/dist/definitions/CardModal2/components/CardModal2Behaviour.d.ts +0 -8
  46. package/dist/definitions/CardModal2/components/CardModal2Behaviour.d.ts.map +0 -1
  47. package/dist/definitions/CardModal2/components/CardModal2Body.d.ts +0 -7
  48. package/dist/definitions/CardModal2/components/CardModal2Body.d.ts.map +0 -1
  49. package/dist/definitions/CardModal2/components/CardModal2Footer.d.ts +0 -7
  50. package/dist/definitions/CardModal2/components/CardModal2Footer.d.ts.map +0 -1
  51. package/dist/definitions/CardModal2/components/CardModal2Header.d.ts +0 -20
  52. package/dist/definitions/CardModal2/components/CardModal2Header.d.ts.map +0 -1
  53. package/dist/definitions/FullscreenModal2/FullscreenModal2.d.ts +0 -18
  54. package/dist/definitions/FullscreenModal2/FullscreenModal2.d.ts.map +0 -1
  55. package/dist/definitions/FullscreenModal2/components/FullscreenModal2Animation.d.ts +0 -8
  56. package/dist/definitions/FullscreenModal2/components/FullscreenModal2Animation.d.ts.map +0 -1
  57. package/dist/definitions/FullscreenModal2/components/FullscreenModal2Behaviour.d.ts +0 -8
  58. package/dist/definitions/FullscreenModal2/components/FullscreenModal2Behaviour.d.ts.map +0 -1
  59. package/dist/definitions/FullscreenModal2/components/FullscreenModal2Body.d.ts +0 -9
  60. package/dist/definitions/FullscreenModal2/components/FullscreenModal2Body.d.ts.map +0 -1
  61. package/dist/definitions/FullscreenModal2/components/FullscreenModal2Container.d.ts +0 -8
  62. package/dist/definitions/FullscreenModal2/components/FullscreenModal2Container.d.ts.map +0 -1
  63. package/dist/definitions/FullscreenModal2/components/FullscreenModal2Footer.d.ts +0 -8
  64. package/dist/definitions/FullscreenModal2/components/FullscreenModal2Footer.d.ts.map +0 -1
  65. package/dist/definitions/FullscreenModal2/components/FullscreenModal2Header.d.ts +0 -22
  66. package/dist/definitions/FullscreenModal2/components/FullscreenModal2Header.d.ts.map +0 -1
  67. package/dist/definitions/FullscreenModal2/components/NativeOpacityAnimation.d.ts +0 -7
  68. package/dist/definitions/FullscreenModal2/components/NativeOpacityAnimation.d.ts.map +0 -1
  69. package/dist/definitions/FullscreenModal2/components/NativeSlideInAnimation.d.ts +0 -10
  70. package/dist/definitions/FullscreenModal2/components/NativeSlideInAnimation.d.ts.map +0 -1
  71. package/dist/definitions/NavigationModal2/NavigationModal2.d.ts +0 -23
  72. package/dist/definitions/NavigationModal2/NavigationModal2.d.ts.map +0 -1
  73. package/dist/definitions/NavigationModal2/components/NavigationModal2Behaviour.d.ts +0 -8
  74. package/dist/definitions/NavigationModal2/components/NavigationModal2Behaviour.d.ts.map +0 -1
  75. package/dist/definitions/NavigationModal2/components/NavigationModal2Body.d.ts +0 -7
  76. package/dist/definitions/NavigationModal2/components/NavigationModal2Body.d.ts.map +0 -1
  77. package/dist/definitions/NavigationModal2/components/NavigationModal2Footer.d.ts +0 -7
  78. package/dist/definitions/NavigationModal2/components/NavigationModal2Footer.d.ts.map +0 -1
  79. package/dist/definitions/NavigationModal2/components/NavigationModal2Header.d.ts +0 -7
  80. package/dist/definitions/NavigationModal2/components/NavigationModal2Header.d.ts.map +0 -1
  81. package/dist/definitions/utils/IdentityComponent.d.ts +0 -15
  82. package/dist/definitions/utils/IdentityComponent.d.ts.map +0 -1
@@ -5,7 +5,7 @@ import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
5
5
  import { SpinnerGapRegularIcon, UserRegularIcon, CaretUpFillIcon, CaretDownFillIcon, MapPinRegularIcon, EyeClosedRegularIcon, EyeRegularIcon, CheckCircleFillIcon, CaretDownRegularIcon, XRegularIcon, CaretRightRegularIcon, InfoRegularIcon, WarningRegularIcon, CheckRegularIcon, WarningCircleRegularIcon, ArrowCounterClockwiseRegularIcon, InfoFillIcon, WarningCircleFillIcon, WarningFillIcon } from '@ornikar/kitt-icons/phosphor';
6
6
  import { createPortal } from 'react-dom';
7
7
  import { CSSTransition } from 'react-transition-group';
8
- import { ScrollView as ScrollView$2, View as View$2, Linking, Pressable as Pressable$2, StyleSheet, useWindowDimensions, Modal } from 'react-native';
8
+ import { ScrollView as ScrollView$2, View as View$2, Linking, Pressable as Pressable$2, useWindowDimensions } from 'react-native';
9
9
  export { useWindowDimensions as useWindowSize } from 'react-native';
10
10
  import { parse } from '@twemoji/parser';
11
11
  import Downshift, { useSelect } from 'downshift';
@@ -3811,24 +3811,6 @@ function useStaticBottomSheet(Content) {
3811
3811
  };
3812
3812
  }
3813
3813
 
3814
- /**
3815
- * A utility component that returns its children without any modifications.
3816
- *
3817
- * This component acts as an identity function for React elements - it simply returns
3818
- * whatever children are passed to it. It can be useful in conditional rendering patterns,
3819
- * component composition, or as a placeholder in component hierarchies.
3820
- *
3821
- * @returns The children as they were passed in, without any wrapper elements
3822
- *
3823
- * @example
3824
- * See CardModal and FullscreenModal for usage examples.
3825
- */
3826
- function IdentityComponent({
3827
- children
3828
- }) {
3829
- return children;
3830
- }
3831
-
3832
3814
  const overflowHidden = "kitt-u_overflowHidden_otm3u3";
3833
3815
  function useBlockBodyScroll(shouldBlockScroll, isInitialRender) {
3834
3816
  useEffect(() => {
@@ -3936,253 +3918,10 @@ function CardModalRotationContainer(props) {
3936
3918
  });
3937
3919
  }
3938
3920
 
3939
- const contentAnimationEnter$2 = "kitt-u_contentAnimationEnter_c11xxy4r";
3940
- const contentAnimatioEnterActive$2 = "kitt-u_contentAnimatioEnterActive_cl52117";
3941
- const contentAnimatioExit$2 = "kitt-u_contentAnimatioExit_cyjczep";
3942
- const contentAnimatioExitActive$2 = "kitt-u_contentAnimatioExitActive_cpsy3dt";
3943
- const contentAnimationClassNames$2 = {
3944
- appear: contentAnimationEnter$2,
3945
- appearActive: contentAnimatioEnterActive$2,
3946
- enter: contentAnimationEnter$2,
3947
- enterActive: contentAnimatioEnterActive$2,
3948
- exit: contentAnimatioExit$2,
3949
- exitActive: contentAnimatioExitActive$2
3950
- };
3951
- const opacityEnter$3 = "kitt-u_opacityEnter_o1ae40dx";
3952
- const opacityEnterActive$3 = "kitt-u_opacityEnterActive_o1t4vl7b";
3953
- const opacityExit$3 = "kitt-u_opacityExit_ogyytm1";
3954
- const opacityExitActive$3 = "kitt-u_opacityExitActive_o18xvk52";
3955
- const opacityClassNames$3 = {
3956
- appear: opacityEnter$3,
3957
- appearActive: opacityEnterActive$3,
3958
- enter: opacityEnter$3,
3959
- enterActive: opacityEnterActive$3,
3960
- exit: opacityExit$3,
3961
- exitActive: opacityExitActive$3
3962
- };
3963
- function CardModalAnimation({
3964
- children,
3965
- appear = true,
3966
- visible,
3967
- unmountOnExit = true,
3968
- isAnimationEnabled = true,
3969
- onEnter,
3970
- onEntered,
3971
- onExit,
3972
- onExited,
3973
- onClose,
3974
- ...props
3975
- }) {
3976
- const theme = useTheme();
3977
- const {
3978
- animation
3979
- } = theme.kitt.cardModal;
3980
- const sharedProps = {
3981
- in: visible,
3982
- appear,
3983
- unmountOnExit
3984
- };
3985
- return /*#__PURE__*/jsxs(View, {
3986
- ...props,
3987
- height: "100%",
3988
- justifyContent: "center",
3989
- children: [/*#__PURE__*/jsx(CSSTransition, {
3990
- ...sharedProps,
3991
- timeout: isAnimationEnabled ? animation.overlay.duration : 0,
3992
- classNames: opacityClassNames$3,
3993
- children: /*#__PURE__*/jsx(Overlay, {
3994
- onPress: onClose
3995
- })
3996
- }), /*#__PURE__*/jsx(CSSTransition, {
3997
- ...sharedProps,
3998
- timeout: isAnimationEnabled ? animation.content.duration : 0,
3999
- classNames: contentAnimationClassNames$2,
4000
- onEnter: onEnter,
4001
- onEntered: onEntered,
4002
- onExit: onExit,
4003
- onExited: onExited,
4004
- children: /*#__PURE__*/jsx(CardModalRotationContainer, {
4005
- alignItems: "center",
4006
- margin: "auto",
4007
- children: children
4008
- })
4009
- })]
4010
- });
4011
- }
4012
-
4013
- function CardModalBehaviour({
4014
- children,
4015
- visible,
4016
- onClose,
4017
- onExited,
4018
- ...props
4019
- }) {
4020
- const [isModalBehaviourVisible, setIsModalBehaviourVisible] = useState(visible);
4021
- useEffect(() => {
4022
- if (visible === true) {
4023
- setIsModalBehaviourVisible(true);
4024
- }
4025
- }, [visible]);
4026
- return /*#__PURE__*/jsx(ModalBehaviour, {
4027
- visible: isModalBehaviourVisible,
4028
- onClose: onClose,
4029
- children: /*#__PURE__*/jsx(CardModalAnimation, {
4030
- ...props,
4031
- visible: visible,
4032
- onExited: () => {
4033
- if (onExited) onExited();
4034
- setIsModalBehaviourVisible(false);
4035
- },
4036
- onClose: onClose,
4037
- children: children
4038
- })
4039
- });
4040
- }
4041
-
4042
- function CardModalBody({
4043
- children,
4044
- paddingX = {
4045
- base: 'kitt.4',
4046
- medium: 'kitt.6'
4047
- },
4048
- paddingY = 'kitt.4',
4049
- ...props
4050
- }) {
4051
- return /*#__PURE__*/jsx(ScrollView, {
4052
- showsVerticalScrollIndicator: false,
4053
- _contentContainerStyle: {
4054
- paddingX,
4055
- paddingY
4056
- },
4057
- ...props,
4058
- children: children
4059
- });
4060
- }
4061
-
4062
- function CardModalFooter({
4063
- children,
4064
- padding = {
4065
- base: 'kitt.4',
4066
- medium: 'kitt.2'
4067
- },
4068
- hasSeparator = true,
4069
- ...props
4070
- }) {
4071
- return /*#__PURE__*/jsx(View, {
4072
- ...props,
4073
- marginTop: "kitt.2",
4074
- padding: padding,
4075
- borderTopWidth: hasSeparator ? 'kitt.cardModal.footer.borderWidth' : 0,
4076
- borderColor: "kitt.separator",
4077
- alignItems: {
4078
- base: undefined,
4079
- medium: 'flex-end'
4080
- },
4081
- children: children
4082
- });
4083
- }
4084
-
4085
- function CardModalHeader({
4086
- children,
4087
- title,
4088
- paddingBottom = {
4089
- base: 'kitt.4',
4090
- medium: 'kitt.2'
4091
- },
4092
- hasSeparator = true,
4093
- right,
4094
- left,
4095
- ...props
4096
- }) {
4097
- const defaultContainerPadding = {
4098
- base: 'kitt.4',
4099
- medium: 'kitt.6'
4100
- };
4101
- return /*#__PURE__*/jsx(View, {
4102
- ...props,
4103
- padding: paddingBottom,
4104
- borderBottomWidth: hasSeparator ? 'kitt.cardModal.footer.borderWidth' : 0,
4105
- borderColor: "kitt.separator",
4106
- justifyContent: "center",
4107
- width: "100%",
4108
- height: "kitt.cardModal.header.height",
4109
- paddingRight: right ? 'kitt.2' : defaultContainerPadding,
4110
- paddingLeft: left ? 'kitt.2' : defaultContainerPadding,
4111
- children: /*#__PURE__*/jsxs(View, {
4112
- alignItems: "center",
4113
- flexDirection: "row",
4114
- justifyContent: !children && !left ? 'flex-end' : 'space-between',
4115
- children: [left ? /*#__PURE__*/jsx(View, {
4116
- width: "kitt.iconButton.width",
4117
- children: left
4118
- }) : null, /*#__PURE__*/jsxs(View, {
4119
- flexGrow: "1",
4120
- paddingRight: right ? 'kitt.2' : 0,
4121
- paddingLeft: left ? 'kitt.2' : 0,
4122
- children: [title ? /*#__PURE__*/jsx(Typography.Text, {
4123
- textAlign: !left && right ? 'left' : 'center',
4124
- variant: "bold",
4125
- children: title
4126
- }) : null, children]
4127
- }), right ? /*#__PURE__*/jsx(View, {
4128
- width: "kitt.iconButton.width",
4129
- children: right
4130
- }) : null]
4131
- })
4132
- });
4133
- }
4134
-
4135
- function CardModal({
4136
- backgroundColor = 'kitt.uiBackgroundLight',
4137
- maxWidth = 'kitt.cardModal.maxWidth',
4138
- withoutShadow,
4139
- children,
4140
- header,
4141
- body,
4142
- footer,
4143
- contentContainer: ContentContainer = IdentityComponent,
4144
- ...props
4145
- }) {
4146
- return /*#__PURE__*/jsx(View, {
4147
- ...props,
4148
- overflow: "hidden",
4149
- backgroundColor: backgroundColor,
4150
- shadow: withoutShadow ? undefined : 'kitt.cardModal.shadow',
4151
- borderRadius: "kitt.cardModal.borderRadius",
4152
- width: "100%",
4153
- maxHeight: "100%",
4154
- maxWidth: maxWidth,
4155
- minHeight: "kitt.cardModal.minHeight",
4156
- children: /*#__PURE__*/jsx(ContentContainer, {
4157
- children: children || /*#__PURE__*/jsxs(Fragment, {
4158
- children: [header || null, body || null, footer || null]
4159
- })
4160
- })
4161
- });
4162
- }
4163
- CardModal.Body = CardModalBody;
4164
- CardModal.Header = CardModalHeader;
4165
- CardModal.Footer = CardModalFooter;
4166
- CardModal.ModalBehaviour = CardModalBehaviour;
4167
-
4168
- function CardModal2RotationContainer(props) {
4169
- return /*#__PURE__*/jsx(View, {
4170
- paddingX: "kitt.cardModal.overlayPadding.horizontal",
4171
- paddingY: "kitt.cardModal.overlayPadding.vertical",
4172
- maxWidth: "kitt.cardModal.maxWidthWithPadding",
4173
- width: "100%",
4174
- maxHeight: "100%",
4175
- _web: {
4176
- maxHeight: '100svh'
4177
- },
4178
- ...props
4179
- });
4180
- }
4181
-
4182
- const contentAnimationEnter$1 = "kitt-u_contentAnimationEnter_c1qvsvvv";
4183
- const contentAnimatioEnterActive$1 = "kitt-u_contentAnimatioEnterActive_c1ka3ql7";
4184
- const contentAnimatioExit$1 = "kitt-u_contentAnimatioExit_cn78c68";
4185
- const contentAnimatioExitActive$1 = "kitt-u_contentAnimatioExitActive_c14lwu6p";
3921
+ const contentAnimationEnter$1 = "kitt-u_contentAnimationEnter_c11xxy4r";
3922
+ const contentAnimatioEnterActive$1 = "kitt-u_contentAnimatioEnterActive_cl52117";
3923
+ const contentAnimatioExit$1 = "kitt-u_contentAnimatioExit_cyjczep";
3924
+ const contentAnimatioExitActive$1 = "kitt-u_contentAnimatioExitActive_cpsy3dt";
4186
3925
  const contentAnimationClassNames$1 = {
4187
3926
  appear: contentAnimationEnter$1,
4188
3927
  appearActive: contentAnimatioEnterActive$1,
@@ -4191,10 +3930,10 @@ const contentAnimationClassNames$1 = {
4191
3930
  exit: contentAnimatioExit$1,
4192
3931
  exitActive: contentAnimatioExitActive$1
4193
3932
  };
4194
- const opacityEnter$2 = "kitt-u_opacityEnter_o1sh7i4q";
4195
- const opacityEnterActive$2 = "kitt-u_opacityEnterActive_ow4hztn";
4196
- const opacityExit$2 = "kitt-u_opacityExit_o1ct2t80";
4197
- const opacityExitActive$2 = "kitt-u_opacityExitActive_ov5hhc8";
3933
+ const opacityEnter$2 = "kitt-u_opacityEnter_o1ae40dx";
3934
+ const opacityEnterActive$2 = "kitt-u_opacityEnterActive_o1t4vl7b";
3935
+ const opacityExit$2 = "kitt-u_opacityExit_ogyytm1";
3936
+ const opacityExitActive$2 = "kitt-u_opacityExitActive_o18xvk52";
4198
3937
  const opacityClassNames$2 = {
4199
3938
  appear: opacityEnter$2,
4200
3939
  appearActive: opacityEnterActive$2,
@@ -4203,7 +3942,7 @@ const opacityClassNames$2 = {
4203
3942
  exit: opacityExit$2,
4204
3943
  exitActive: opacityExitActive$2
4205
3944
  };
4206
- function CardModal2Animation({
3945
+ function CardModalAnimation({
4207
3946
  children,
4208
3947
  appear = true,
4209
3948
  visible,
@@ -4244,7 +3983,7 @@ function CardModal2Animation({
4244
3983
  onEntered: onEntered,
4245
3984
  onExit: onExit,
4246
3985
  onExited: onExited,
4247
- children: /*#__PURE__*/jsx(CardModal2RotationContainer, {
3986
+ children: /*#__PURE__*/jsx(CardModalRotationContainer, {
4248
3987
  alignItems: "center",
4249
3988
  margin: "auto",
4250
3989
  children: children
@@ -4253,7 +3992,7 @@ function CardModal2Animation({
4253
3992
  });
4254
3993
  }
4255
3994
 
4256
- function CardModal2Behaviour({
3995
+ function CardModalBehaviour({
4257
3996
  children,
4258
3997
  visible,
4259
3998
  onClose,
@@ -4269,7 +4008,7 @@ function CardModal2Behaviour({
4269
4008
  return /*#__PURE__*/jsx(ModalBehaviour, {
4270
4009
  visible: isModalBehaviourVisible,
4271
4010
  onClose: onClose,
4272
- children: /*#__PURE__*/jsx(CardModal2Animation, {
4011
+ children: /*#__PURE__*/jsx(CardModalAnimation, {
4273
4012
  ...props,
4274
4013
  visible: visible,
4275
4014
  onExited: () => {
@@ -4282,7 +4021,7 @@ function CardModal2Behaviour({
4282
4021
  });
4283
4022
  }
4284
4023
 
4285
- function CardModal2Body({
4024
+ function CardModalBody({
4286
4025
  children,
4287
4026
  paddingX = {
4288
4027
  base: 'kitt.4',
@@ -4302,7 +4041,7 @@ function CardModal2Body({
4302
4041
  });
4303
4042
  }
4304
4043
 
4305
- function CardModal2Footer({
4044
+ function CardModalFooter({
4306
4045
  children,
4307
4046
  padding = {
4308
4047
  base: 'kitt.4',
@@ -4325,7 +4064,7 @@ function CardModal2Footer({
4325
4064
  });
4326
4065
  }
4327
4066
 
4328
- function CardModal2Header({
4067
+ function CardModalHeader({
4329
4068
  children,
4330
4069
  title,
4331
4070
  paddingBottom = {
@@ -4375,11 +4114,14 @@ function CardModal2Header({
4375
4114
  });
4376
4115
  }
4377
4116
 
4378
- function CardModal2({
4117
+ function CardModal({
4379
4118
  backgroundColor = 'kitt.uiBackgroundLight',
4380
4119
  maxWidth = 'kitt.cardModal.maxWidth',
4381
4120
  withoutShadow,
4382
4121
  children,
4122
+ header,
4123
+ body,
4124
+ footer,
4383
4125
  ...props
4384
4126
  }) {
4385
4127
  return /*#__PURE__*/jsx(View, {
@@ -4392,13 +4134,15 @@ function CardModal2({
4392
4134
  maxHeight: "100%",
4393
4135
  maxWidth: maxWidth,
4394
4136
  minHeight: "kitt.cardModal.minHeight",
4395
- children: children
4137
+ children: children || /*#__PURE__*/jsxs(Fragment, {
4138
+ children: [header || null, body || null, footer || null]
4139
+ })
4396
4140
  });
4397
4141
  }
4398
- CardModal2.Body = CardModal2Body;
4399
- CardModal2.Header = CardModal2Header;
4400
- CardModal2.Footer = CardModal2Footer;
4401
- CardModal2.Behaviour = CardModal2Behaviour;
4142
+ CardModal.Body = CardModalBody;
4143
+ CardModal.Header = CardModalHeader;
4144
+ CardModal.Footer = CardModalFooter;
4145
+ CardModal.ModalBehaviour = CardModalBehaviour;
4402
4146
 
4403
4147
  function getBackgroundColor$6({
4404
4148
  isDisabled,
@@ -7262,371 +7006,95 @@ function FullscreenModalBody({
7262
7006
  function FullscreenModalFooter({
7263
7007
  shouldHandleBottomNotch = true,
7264
7008
  hasSeparator = true,
7265
- children,
7266
- ...props
7267
- }) {
7268
- const {
7269
- bottom
7270
- } = useSafeAreaInsets();
7271
- return /*#__PURE__*/jsx(View, {
7272
- borderTopColor: "kitt.separator",
7273
- borderTopWidth: hasSeparator ? 1 : undefined,
7274
- paddingTop: "kitt.fullscreenModal.footer.verticalPadding",
7275
- paddingBottom: shouldHandleBottomNotch ? bottom : undefined,
7276
- paddingX: "kitt.fullscreenModal.horizontalPadding",
7277
- ...props,
7278
- children: /*#__PURE__*/jsx(View, {
7279
- paddingBottom: "kitt.fullscreenModal.footer.verticalPadding",
7280
- children: children
7281
- })
7282
- });
7283
- }
7284
-
7285
- const slideInFromBottomEnter = "kitt-u_slideInFromBottomEnter_s1717rto";
7286
- const slideInFromBottomEnterActive = "kitt-u_slideInFromBottomEnterActive_sux6xgc";
7287
- const slideInFromBottomExit = "kitt-u_slideInFromBottomExit_sl0lsxt";
7288
- const slideInFromBottomExitActive = "kitt-u_slideInFromBottomExitActive_srlzzmu";
7289
- const slideInClassNames = {
7290
- appear: slideInFromBottomEnter,
7291
- appearActive: slideInFromBottomEnterActive,
7292
- enter: slideInFromBottomEnter,
7293
- enterActive: slideInFromBottomEnterActive,
7294
- exit: slideInFromBottomExit,
7295
- exitActive: slideInFromBottomExitActive
7296
- };
7297
- const opacityEnter = "kitt-u_opacityEnter_okm44hr";
7298
- const opacityEnterActive = "kitt-u_opacityEnterActive_o2w8t0i";
7299
- const opacityExit = "kitt-u_opacityExit_o14r8iix";
7300
- const opacityExitActive = "kitt-u_opacityExitActive_oim72y2";
7301
- const opacityClassNames = {
7302
- appear: opacityEnter,
7303
- appearActive: opacityEnterActive,
7304
- enter: opacityEnter,
7305
- enterActive: opacityEnterActive,
7306
- exit: opacityExit,
7307
- exitActive: opacityExitActive
7308
- };
7309
- function FullscreenModalAnimation({
7310
- children,
7311
- appear = true,
7312
- visible,
7313
- unmountOnExit = true,
7314
- isAnimationEnabled = true,
7315
- onEnter,
7316
- onEntered,
7317
- onExit,
7318
- onExited,
7319
- onClose,
7320
- ...props
7321
- }) {
7322
- const theme = useTheme();
7323
- const {
7324
- animation
7325
- } = theme.kitt.fullscreenModal;
7326
- const sharedProps = {
7327
- in: visible,
7328
- appear,
7329
- unmountOnExit
7330
- };
7331
- return /*#__PURE__*/jsxs(View, {
7332
- ...props,
7333
- children: [/*#__PURE__*/jsx(CSSTransition, {
7334
- ...sharedProps,
7335
- timeout: isAnimationEnabled ? animation.overlay.duration : 0,
7336
- classNames: opacityClassNames,
7337
- children: /*#__PURE__*/jsx(Overlay, {
7338
- onPress: onClose
7339
- })
7340
- }), /*#__PURE__*/jsx(CSSTransition, {
7341
- ...sharedProps,
7342
- timeout: isAnimationEnabled ? animation.content.duration : 0,
7343
- classNames: slideInClassNames,
7344
- onEnter: onEnter,
7345
- onEntered: onEntered,
7346
- onExit: onExit,
7347
- onExited: onExited,
7348
- children: children
7349
- })]
7350
- });
7351
- }
7352
-
7353
- function FullscreenModalBehaviour({
7354
- children,
7355
- visible,
7356
- onClose,
7357
- onExited,
7358
- ...props
7359
- }) {
7360
- const [isModalBehaviourVisible, setIsModalBehaviourVisible] = useState(visible);
7361
- useEffect(() => {
7362
- if (visible === true) {
7363
- setIsModalBehaviourVisible(true);
7364
- }
7365
- }, [visible]);
7366
- return /*#__PURE__*/jsx(ModalBehaviour, {
7367
- visible: isModalBehaviourVisible,
7368
- onClose: onClose,
7369
- children: /*#__PURE__*/jsx(FullscreenModalAnimation, {
7370
- ...props,
7371
- visible: visible,
7372
- onExited: () => {
7373
- if (onExited) onExited();
7374
- setIsModalBehaviourVisible(false);
7375
- },
7376
- children: children
7377
- })
7378
- });
7379
- }
7380
-
7381
- function FullscreenModalContainer({
7382
- children,
7383
- backgroundColor
7384
- }) {
7385
- return /*#__PURE__*/jsx(View, {
7386
- position: "relative",
7387
- flexGrow: 1,
7388
- flexShrink: 1,
7389
- flexBasis: "100%"
7390
- /*
7391
- Here we are setting the same min and max height because on web the content was overflowing and not scrolling
7392
- minHeight is needed to make the modal fullscreen
7393
- maxHeight limits the height to the viewport when the content is too long, this allows us to scroll inside
7394
- We use svh instead of vh because vh is the total height of the viewport, including the address bar in mobile web browsers
7395
- */,
7396
- _web: {
7397
- minHeight: '100svh',
7398
- maxHeight: '100svh'
7399
- },
7400
- backgroundColor: backgroundColor ?? 'kitt.uiBackgroundLight',
7401
- children: children
7402
- });
7403
- }
7404
-
7405
- function FullscreenModalHeader({
7406
- hasSeparator = true,
7407
- isTransparent,
7408
- title,
7409
- children,
7410
- right,
7411
- left,
7412
- shouldHandleTopNotch = true,
7413
- ...props
7414
- }) {
7415
- const {
7416
- top
7417
- } = useSafeAreaInsets();
7418
- const hasRight = Boolean(right);
7419
- const hasLeft = Boolean(left);
7420
- const hasContent = Boolean(title || children);
7421
- return /*#__PURE__*/jsx(View, {
7422
- backgroundColor: isTransparent ? 'kitt.transparent' : 'kitt.uiBackgroundLight',
7423
- minHeight: "kitt.fullscreenModal.header.height",
7424
- width: "100%",
7425
- justifyContent: "center",
7426
- paddingTop: shouldHandleTopNotch ? top : undefined,
7427
- paddingRight: hasRight ? 'kitt.2' : 'kitt.fullscreenModal.horizontalPadding',
7428
- paddingLeft: hasLeft ? 'kitt.2' : 'kitt.fullscreenModal.horizontalPadding',
7429
- borderBottomColor: "kitt.separator",
7430
- borderBottomWidth: hasSeparator ? 1 : undefined,
7431
- ...props,
7432
- children: /*#__PURE__*/jsxs(View, {
7433
- flexDirection: "row",
7434
- alignItems: "center",
7435
- justifyContent: !hasContent && !hasLeft ? 'flex-end' : 'space-between',
7436
- children: [left ? /*#__PURE__*/jsx(View, {
7437
- width: "kitt.iconButton.width",
7438
- children: left
7439
- }) : null, title ? /*#__PURE__*/jsx(View, {
7440
- flexGrow: 1,
7441
- flexShrink: 1,
7442
- paddingLeft: hasLeft ? 'kitt.2' : undefined,
7443
- paddingRight: hasRight ? 'kitt.2' : 0,
7444
- children: /*#__PURE__*/jsx(Typography.Text, {
7445
- variant: "bold",
7446
- textAlign: !hasLeft && hasRight ? 'left' : 'center',
7447
- children: title
7448
- })
7449
- }) : null, children ? /*#__PURE__*/jsx(View, {
7450
- flexGrow: 1,
7451
- flexShrink: 1,
7452
- alignItems: "center",
7453
- paddingLeft: hasLeft ? 'kitt.2' : undefined,
7454
- paddingRight: hasRight ? 'kitt.2' : undefined,
7455
- children: children
7456
- }) : null, right || left ? /*#__PURE__*/jsx(View, {
7457
- width: "kitt.iconButton.width",
7458
- children: right
7459
- }) : null]
7460
- })
7461
- });
7462
- }
7463
-
7464
- function FullscreenModal({
7465
- body,
7466
- header,
7467
- footer,
7468
- backgroundColor,
7469
- contentContainer: ContentContainer = IdentityComponent
7470
- }) {
7471
- return /*#__PURE__*/jsx(FullscreenModalContainer, {
7472
- backgroundColor: backgroundColor,
7473
- children: /*#__PURE__*/jsxs(ContentContainer, {
7474
- children: [header ? /*#__PURE__*/jsx(View, {
7475
- children: header
7476
- }) : null, /*#__PURE__*/jsxs(View, {
7477
- flexGrow: 1,
7478
- flexShrink: 1,
7479
- justifyContent: "space-between",
7480
- children: [/*#__PURE__*/jsx(ScrollView$2, {
7481
- bounces: false,
7482
- contentContainerStyle: {
7483
- flexGrow: 1,
7484
- position: 'relative'
7485
- },
7486
- children: body
7487
- }), footer || null]
7488
- })]
7489
- })
7490
- });
7491
- }
7492
- FullscreenModal.Header = FullscreenModalHeader;
7493
- FullscreenModal.Footer = FullscreenModalFooter;
7494
- FullscreenModal.Body = FullscreenModalBody;
7495
- FullscreenModal.ModalBehaviour = FullscreenModalBehaviour;
7496
-
7497
- function NativeOpacityAnimation({
7498
- visible,
7499
- children
7500
- }) {
7501
- const theme = useTheme();
7502
- const opacityStyle = useAnimatedStyle(() => {
7503
- const {
7504
- duration,
7505
- easing
7506
- } = theme.kitt.fullscreenModal.animation.overlay;
7507
- const [x1, y1, x2, y2] = easing;
7508
- return {
7509
- opacity: withTiming(visible ? 1 : 0, {
7510
- duration,
7511
- easing: Easing.bezier(x1, y1, x2, y2)
7512
- })
7513
- };
7514
- });
7515
- return /*#__PURE__*/jsx(Animated.View, {
7516
- style: [StyleSheet.absoluteFillObject, opacityStyle],
7517
- children: children
7518
- });
7519
- }
7520
-
7521
- function NativeSlideInAnimation({
7522
- visible,
7523
- children,
7524
- onEntered,
7525
- onExited
7526
- }) {
7527
- const theme = useTheme();
7528
- const {
7529
- height: wHeight
7530
- } = useWindowDimensions();
7531
- const hasRunAnimationRef = useRef(false);
7532
- function handleAnimationFinished() {
7533
- if (visible) {
7534
- if (onEntered) onEntered();
7535
- hasRunAnimationRef.current = true;
7536
- }
7537
-
7538
- // Since animation callback is called on component mount, we must make sure that the animation has been runed once to call it an exit
7539
- if (!visible && hasRunAnimationRef.current) onExited();
7540
- }
7541
- const translateStyle = useAnimatedStyle(() => {
7542
- const {
7543
- duration,
7544
- easing
7545
- } = theme.kitt.fullscreenModal.animation.content;
7546
- const [x1, y1, x2, y2] = easing;
7547
- return {
7548
- transform: [{
7549
- translateY: withTiming(visible ? 0 : wHeight, {
7550
- duration,
7551
- easing: Easing.bezier(x1, y1, x2, y2)
7552
- }, isFinished => {
7553
- if (!isFinished) return;
7554
- runOnJS(handleAnimationFinished)();
7555
- })
7556
- }]
7557
- };
7558
- });
7559
- return /*#__PURE__*/jsx(Animated.View, {
7560
- style: [{
7561
- transform: [{
7562
- translateY: wHeight
7563
- }]
7564
- }, translateStyle, {
7565
- width: '100%',
7566
- flex: 1
7567
- }],
7568
- children: children
7009
+ children,
7010
+ ...props
7011
+ }) {
7012
+ const {
7013
+ bottom
7014
+ } = useSafeAreaInsets();
7015
+ return /*#__PURE__*/jsx(View, {
7016
+ borderTopColor: "kitt.separator",
7017
+ borderTopWidth: hasSeparator ? 1 : undefined,
7018
+ paddingTop: "kitt.fullscreenModal.footer.verticalPadding",
7019
+ paddingBottom: shouldHandleBottomNotch ? bottom : undefined,
7020
+ paddingX: "kitt.fullscreenModal.horizontalPadding",
7021
+ ...props,
7022
+ children: /*#__PURE__*/jsx(View, {
7023
+ paddingBottom: "kitt.fullscreenModal.footer.verticalPadding",
7024
+ children: children
7025
+ })
7569
7026
  });
7570
7027
  }
7571
7028
 
7572
- function FullscreenModal2Animation({
7573
- visible,
7029
+ const slideInFromBottomEnter = "kitt-u_slideInFromBottomEnter_s1717rto";
7030
+ const slideInFromBottomEnterActive = "kitt-u_slideInFromBottomEnterActive_sux6xgc";
7031
+ const slideInFromBottomExit = "kitt-u_slideInFromBottomExit_sl0lsxt";
7032
+ const slideInFromBottomExitActive = "kitt-u_slideInFromBottomExitActive_srlzzmu";
7033
+ const slideInClassNames = {
7034
+ appear: slideInFromBottomEnter,
7035
+ appearActive: slideInFromBottomEnterActive,
7036
+ enter: slideInFromBottomEnter,
7037
+ enterActive: slideInFromBottomEnterActive,
7038
+ exit: slideInFromBottomExit,
7039
+ exitActive: slideInFromBottomExitActive
7040
+ };
7041
+ const opacityEnter = "kitt-u_opacityEnter_okm44hr";
7042
+ const opacityEnterActive = "kitt-u_opacityEnterActive_o2w8t0i";
7043
+ const opacityExit = "kitt-u_opacityExit_o14r8iix";
7044
+ const opacityExitActive = "kitt-u_opacityExitActive_oim72y2";
7045
+ const opacityClassNames = {
7046
+ appear: opacityEnter,
7047
+ appearActive: opacityEnterActive,
7048
+ enter: opacityEnter,
7049
+ enterActive: opacityEnterActive,
7050
+ exit: opacityExit,
7051
+ exitActive: opacityExitActive
7052
+ };
7053
+ function FullscreenModalAnimation({
7574
7054
  children,
7055
+ appear = true,
7056
+ visible,
7057
+ unmountOnExit = true,
7058
+ isAnimationEnabled = true,
7575
7059
  onEnter,
7576
7060
  onEntered,
7577
7061
  onExit,
7578
- onExited
7062
+ onExited,
7063
+ onClose,
7064
+ ...props
7579
7065
  }) {
7580
- const [isModalVisible, setIsModalVisible] = useState(visible);
7581
- const [isContentVisible, setIsContentVisible] = useState(false);
7582
- const handleAnimationExited = () => {
7583
- setIsModalVisible(false);
7584
- // Android doesn't handle the onDismiss callback on the modal, we need to call it manually
7066
+ const theme = useTheme();
7067
+ const {
7068
+ animation
7069
+ } = theme.kitt.fullscreenModal;
7070
+ const sharedProps = {
7071
+ in: visible,
7072
+ appear,
7073
+ unmountOnExit
7585
7074
  };
7586
-
7587
- // When parent visibility is set to false, in order to have our exit animation we must in this order :
7588
- // 1 - run the exit animation
7589
- // 2 - once it is done, unmount the Modal
7590
- useEffect(() => {
7591
- if (!(!visible && isContentVisible)) return;
7592
- if (onExit) onExit();
7593
- setIsContentVisible(false);
7594
- }, [visible, isContentVisible, onExit]);
7595
- return /*#__PURE__*/jsx(Modal, {
7596
- transparent: true,
7597
- supportedOrientations: ['landscape', 'portrait'],
7598
- visible: isModalVisible,
7599
- onShow: () => {
7600
- if (onEnter) onEnter();
7601
- setIsContentVisible(true);
7602
- },
7603
- onDismiss: () => {
7604
- if (onExited) onExited();
7605
- },
7606
- children: /*#__PURE__*/jsxs(View, {
7607
- position: "relative",
7608
- flexGrow: 1,
7609
- justifyContent: "center",
7610
- alignItems: "center",
7611
- children: [/*#__PURE__*/jsx(NativeOpacityAnimation, {
7612
- visible: isContentVisible,
7613
- children: /*#__PURE__*/jsx(Overlay, {
7614
- onPress: handleAnimationExited
7615
- })
7616
- }), /*#__PURE__*/jsx(NativeSlideInAnimation, {
7617
- visible: isContentVisible,
7618
- onExited: handleAnimationExited,
7619
- onEntered: onEntered,
7620
- children: /*#__PURE__*/jsx(View, {
7621
- flexGrow: 1,
7622
- children: children
7623
- })
7624
- })]
7625
- })
7075
+ return /*#__PURE__*/jsxs(View, {
7076
+ ...props,
7077
+ children: [/*#__PURE__*/jsx(CSSTransition, {
7078
+ ...sharedProps,
7079
+ timeout: isAnimationEnabled ? animation.overlay.duration : 0,
7080
+ classNames: opacityClassNames,
7081
+ children: /*#__PURE__*/jsx(Overlay, {
7082
+ onPress: onClose
7083
+ })
7084
+ }), /*#__PURE__*/jsx(CSSTransition, {
7085
+ ...sharedProps,
7086
+ timeout: isAnimationEnabled ? animation.content.duration : 0,
7087
+ classNames: slideInClassNames,
7088
+ onEnter: onEnter,
7089
+ onEntered: onEntered,
7090
+ onExit: onExit,
7091
+ onExited: onExited,
7092
+ children: children
7093
+ })]
7626
7094
  });
7627
7095
  }
7628
7096
 
7629
- function FullscreenModal2Behaviour({
7097
+ function FullscreenModalBehaviour({
7630
7098
  children,
7631
7099
  visible,
7632
7100
  onClose,
@@ -7642,7 +7110,7 @@ function FullscreenModal2Behaviour({
7642
7110
  return /*#__PURE__*/jsx(ModalBehaviour, {
7643
7111
  visible: isModalBehaviourVisible,
7644
7112
  onClose: onClose,
7645
- children: /*#__PURE__*/jsx(FullscreenModal2Animation, {
7113
+ children: /*#__PURE__*/jsx(FullscreenModalAnimation, {
7646
7114
  ...props,
7647
7115
  visible: visible,
7648
7116
  onExited: () => {
@@ -7654,51 +7122,7 @@ function FullscreenModal2Behaviour({
7654
7122
  });
7655
7123
  }
7656
7124
 
7657
- function FullscreenModal2Body({
7658
- children,
7659
- shouldHandleBottomNotch,
7660
- style,
7661
- shouldHandleTopNotch,
7662
- ...props
7663
- }) {
7664
- const {
7665
- bottom,
7666
- top
7667
- } = useSafeAreaInsets();
7668
- const {
7669
- kitt: {
7670
- fullscreenModal: {
7671
- body: {
7672
- verticalPadding
7673
- }
7674
- }
7675
- }
7676
- } = useTheme();
7677
- const paddingBottom = shouldHandleBottomNotch ? Math.max(bottom, verticalPadding) : verticalPadding;
7678
- const paddingTop = shouldHandleTopNotch ? Math.max(top, verticalPadding) : verticalPadding;
7679
- return /*#__PURE__*/jsx(View, {
7680
- flexGrow: 1,
7681
- flexShrink: 1,
7682
- justifyContent: "space-between",
7683
- children: /*#__PURE__*/jsx(ScrollView$1, {
7684
- bounces: false,
7685
- contentContainerStyle: {
7686
- flexGrow: 1,
7687
- position: 'relative'
7688
- },
7689
- children: /*#__PURE__*/jsx(View, {
7690
- ...props,
7691
- paddingX: "kitt.fullscreenModal.horizontalPadding",
7692
- paddingTop: paddingTop,
7693
- paddingBottom: paddingBottom,
7694
- style: style,
7695
- children: children
7696
- })
7697
- })
7698
- });
7699
- }
7700
-
7701
- function FullscreenModal2Container({
7125
+ function FullscreenModalContainer({
7702
7126
  children,
7703
7127
  backgroundColor
7704
7128
  }) {
@@ -7722,30 +7146,7 @@ function FullscreenModal2Container({
7722
7146
  });
7723
7147
  }
7724
7148
 
7725
- function FullscreenModal2Footer({
7726
- shouldHandleBottomNotch = true,
7727
- hasSeparator = true,
7728
- children,
7729
- ...props
7730
- }) {
7731
- const {
7732
- bottom
7733
- } = useSafeAreaInsets();
7734
- return /*#__PURE__*/jsx(View, {
7735
- borderTopColor: "kitt.separator",
7736
- borderTopWidth: hasSeparator ? 1 : undefined,
7737
- paddingTop: "kitt.fullscreenModal.footer.verticalPadding",
7738
- paddingBottom: shouldHandleBottomNotch ? bottom : undefined,
7739
- paddingX: "kitt.fullscreenModal.horizontalPadding",
7740
- ...props,
7741
- children: /*#__PURE__*/jsx(View, {
7742
- paddingBottom: "kitt.fullscreenModal.footer.verticalPadding",
7743
- children: children
7744
- })
7745
- });
7746
- }
7747
-
7748
- function FullscreenModal2Header({
7149
+ function FullscreenModalHeader({
7749
7150
  hasSeparator = true,
7750
7151
  isTransparent,
7751
7152
  title,
@@ -7804,19 +7205,35 @@ function FullscreenModal2Header({
7804
7205
  });
7805
7206
  }
7806
7207
 
7807
- function FullscreenModal2({
7808
- backgroundColor,
7809
- children
7208
+ function FullscreenModal({
7209
+ body,
7210
+ header,
7211
+ footer,
7212
+ backgroundColor
7810
7213
  }) {
7811
- return /*#__PURE__*/jsx(FullscreenModal2Container, {
7214
+ return /*#__PURE__*/jsxs(FullscreenModalContainer, {
7812
7215
  backgroundColor: backgroundColor,
7813
- children: children
7216
+ children: [header ? /*#__PURE__*/jsx(View, {
7217
+ children: header
7218
+ }) : null, /*#__PURE__*/jsxs(View, {
7219
+ flexGrow: 1,
7220
+ flexShrink: 1,
7221
+ justifyContent: "space-between",
7222
+ children: [/*#__PURE__*/jsx(ScrollView$2, {
7223
+ bounces: false,
7224
+ contentContainerStyle: {
7225
+ flexGrow: 1,
7226
+ position: 'relative'
7227
+ },
7228
+ children: body
7229
+ }), footer || null]
7230
+ })]
7814
7231
  });
7815
7232
  }
7816
- FullscreenModal2.Header = FullscreenModal2Header;
7817
- FullscreenModal2.Footer = FullscreenModal2Footer;
7818
- FullscreenModal2.Body = FullscreenModal2Body;
7819
- FullscreenModal2.Behaviour = FullscreenModal2Behaviour;
7233
+ FullscreenModal.Header = FullscreenModalHeader;
7234
+ FullscreenModal.Footer = FullscreenModalFooter;
7235
+ FullscreenModal.Body = FullscreenModalBody;
7236
+ FullscreenModal.ModalBehaviour = FullscreenModalBehaviour;
7820
7237
 
7821
7238
  function GroupTags({
7822
7239
  children,
@@ -11344,8 +10761,7 @@ function NavigationModal({
11344
10761
  body,
11345
10762
  backgroundColor,
11346
10763
  footer,
11347
- header,
11348
- contentContainer
10764
+ header
11349
10765
  }) {
11350
10766
  const Component = useBreakpointValue({
11351
10767
  base: FullscreenModal,
@@ -11355,11 +10771,10 @@ function NavigationModal({
11355
10771
  body: body,
11356
10772
  backgroundColor: backgroundColor,
11357
10773
  footer: footer,
11358
- header: header,
11359
- contentContainer: contentContainer
10774
+ header: header
11360
10775
  });
11361
10776
  }
11362
- function Header$1(props) {
10777
+ function Header(props) {
11363
10778
  const Component = useBreakpointValue({
11364
10779
  base: FullscreenModal.Header,
11365
10780
  small: CardModal.Header
@@ -11368,7 +10783,7 @@ function Header$1(props) {
11368
10783
  ...props
11369
10784
  });
11370
10785
  }
11371
- function Body$1(props) {
10786
+ function Body(props) {
11372
10787
  const Component = useBreakpointValue({
11373
10788
  base: FullscreenModal.Body,
11374
10789
  small: CardModal.Body
@@ -11377,7 +10792,7 @@ function Body$1(props) {
11377
10792
  ...props
11378
10793
  });
11379
10794
  }
11380
- function Footer$1(props) {
10795
+ function Footer(props) {
11381
10796
  const Component = useBreakpointValue({
11382
10797
  base: FullscreenModal.Footer,
11383
10798
  small: CardModal.Footer
@@ -11386,106 +10801,11 @@ function Footer$1(props) {
11386
10801
  ...props
11387
10802
  });
11388
10803
  }
11389
- NavigationModal.Header = Header$1;
11390
- NavigationModal.Body = Body$1;
11391
- NavigationModal.Footer = Footer$1;
10804
+ NavigationModal.Header = Header;
10805
+ NavigationModal.Body = Body;
10806
+ NavigationModal.Footer = Footer;
11392
10807
  NavigationModal.ModalBehaviour = NavigationModalBehaviour;
11393
10808
 
11394
- function NavigationModal2Behaviour({
11395
- children,
11396
- visible,
11397
- appear = true,
11398
- onExited,
11399
- onEnter,
11400
- onExit,
11401
- onClose,
11402
- ...props
11403
- }) {
11404
- const AnimationComponent = useBreakpointValue({
11405
- base: FullscreenModal2Animation,
11406
- small: CardModal2Animation
11407
- });
11408
- const [isModalBehaviourVisible, setIsModalBehaviourVisible] = useState(visible);
11409
- const [shouldAppear, setShouldAppear] = useState(appear);
11410
- useEffect(() => {
11411
- if (visible === true) {
11412
- setIsModalBehaviourVisible(true);
11413
- }
11414
- }, [visible]);
11415
- return /*#__PURE__*/jsx(ModalBehaviour, {
11416
- visible: isModalBehaviourVisible,
11417
- onClose: onClose,
11418
- children: /*#__PURE__*/jsx(AnimationComponent, {
11419
- ...props,
11420
- appear: shouldAppear,
11421
- visible: visible,
11422
- onEnter: () => {
11423
- if (onEnter) onEnter();
11424
-
11425
- // Once a children as been displayed, we force appear to false in order to avoid replaying animation on breakpoint change
11426
- setShouldAppear(false);
11427
- },
11428
- onExit: () => {
11429
- if (onExit) onExit();
11430
-
11431
- // Reset appear value to its original value for future modal display
11432
- setShouldAppear(appear);
11433
- },
11434
- onExited: () => {
11435
- if (onExited) onExited();
11436
- setIsModalBehaviourVisible(false);
11437
- },
11438
- onClose: onClose,
11439
- children: children
11440
- })
11441
- });
11442
- }
11443
-
11444
- function NavigationModal2({
11445
- backgroundColor,
11446
- children
11447
- }) {
11448
- const Component = useBreakpointValue({
11449
- base: FullscreenModal2,
11450
- small: CardModal2
11451
- });
11452
- return /*#__PURE__*/jsx(Component, {
11453
- backgroundColor: backgroundColor,
11454
- children: children
11455
- });
11456
- }
11457
- function Header(props) {
11458
- const Component = useBreakpointValue({
11459
- base: FullscreenModal2.Header,
11460
- small: CardModal2.Header
11461
- });
11462
- return /*#__PURE__*/jsx(Component, {
11463
- ...props
11464
- });
11465
- }
11466
- function Body(props) {
11467
- const Component = useBreakpointValue({
11468
- base: FullscreenModal2.Body,
11469
- small: CardModal2.Body
11470
- });
11471
- return /*#__PURE__*/jsx(Component, {
11472
- ...props
11473
- });
11474
- }
11475
- function Footer(props) {
11476
- const Component = useBreakpointValue({
11477
- base: FullscreenModal2.Footer,
11478
- small: CardModal2.Footer
11479
- });
11480
- return /*#__PURE__*/jsx(Component, {
11481
- ...props
11482
- });
11483
- }
11484
- NavigationModal2.Header = Header;
11485
- NavigationModal2.Body = Body;
11486
- NavigationModal2.Footer = Footer;
11487
- NavigationModal2.ModalBehaviour = NavigationModal2Behaviour;
11488
-
11489
10809
  function Notification({
11490
10810
  type,
11491
10811
  children,
@@ -13703,5 +13023,5 @@ function VerticalSteps({
13703
13023
  VerticalSteps.Step = Step;
13704
13024
  VerticalSteps.BorderlessStep = BorderlessStep;
13705
13025
 
13706
- 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, 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 };
13026
+ 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, 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 };
13707
13027
  //# sourceMappingURL=index-node-20.10.es.web.mjs.map