@ornikar/kitt-universal 9.30.2 → 9.31.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 (41) hide show
  1. package/dist/definitions/KittBreakpoints.d.ts +2 -2
  2. package/dist/definitions/KittBreakpoints.d.ts.map +1 -1
  3. package/dist/definitions/NavigationModal/Body.d.ts +2 -1
  4. package/dist/definitions/NavigationModal/Body.d.ts.map +1 -1
  5. package/dist/definitions/NavigationModal/Header.d.ts +3 -1
  6. package/dist/definitions/NavigationModal/Header.d.ts.map +1 -1
  7. package/dist/definitions/NavigationModal/NavigationModalAnimation.d.ts.map +1 -1
  8. package/dist/definitions/NavigationModal/components/NativeSlideInAnimation.d.ts +1 -2
  9. package/dist/definitions/NavigationModal/components/NativeSlideInAnimation.d.ts.map +1 -1
  10. package/dist/definitions/native-base/KittNativeBaseProvider.d.ts +1 -0
  11. package/dist/definitions/native-base/KittNativeBaseProvider.d.ts.map +1 -1
  12. package/dist/definitions/themes/default.d.ts +1 -0
  13. package/dist/definitions/themes/default.d.ts.map +1 -1
  14. package/dist/definitions/themes/palettes/lateOceanColorPalette.d.ts +1 -0
  15. package/dist/definitions/themes/palettes/lateOceanColorPalette.d.ts.map +1 -1
  16. package/dist/index-browser-all.es.android.js +68 -54
  17. package/dist/index-browser-all.es.android.js.map +1 -1
  18. package/dist/index-browser-all.es.ios.js +68 -54
  19. package/dist/index-browser-all.es.ios.js.map +1 -1
  20. package/dist/index-browser-all.es.js +68 -54
  21. package/dist/index-browser-all.es.js.map +1 -1
  22. package/dist/index-browser-all.es.web.js +51 -35
  23. package/dist/index-browser-all.es.web.js.map +1 -1
  24. package/dist/index-node-14.17.cjs.js +37 -24
  25. package/dist/index-node-14.17.cjs.js.map +1 -1
  26. package/dist/index-node-14.17.cjs.web.js +21 -6
  27. package/dist/index-node-14.17.cjs.web.js.map +1 -1
  28. package/dist/linaria-themes-browser-all.es.android.js +1 -0
  29. package/dist/linaria-themes-browser-all.es.android.js.map +1 -1
  30. package/dist/linaria-themes-browser-all.es.ios.js +1 -0
  31. package/dist/linaria-themes-browser-all.es.ios.js.map +1 -1
  32. package/dist/linaria-themes-browser-all.es.js +1 -0
  33. package/dist/linaria-themes-browser-all.es.js.map +1 -1
  34. package/dist/linaria-themes-browser-all.es.web.js +1 -0
  35. package/dist/linaria-themes-browser-all.es.web.js.map +1 -1
  36. package/dist/linaria-themes-node-14.17.cjs.js +1 -0
  37. package/dist/linaria-themes-node-14.17.cjs.js.map +1 -1
  38. package/dist/linaria-themes-node-14.17.cjs.web.js +1 -0
  39. package/dist/linaria-themes-node-14.17.cjs.web.js.map +1 -1
  40. package/dist/tsbuildinfo +1 -1
  41. package/package.json +2 -2
@@ -910,6 +910,7 @@ const lateOceanColorPalette = {
910
910
  englishVermillon: '#D44148',
911
911
  goldCrayola: '#F8C583',
912
912
  aero: '#89BDDD',
913
+ seaShell: '#FFF9F3',
913
914
  transparent: 'transparent',
914
915
  moonPurple: '#DBD6F9',
915
916
  moonPurpleLight1: '#EDEBFC'
@@ -5794,8 +5795,9 @@ const StyledViewWithPadding = /*#__PURE__*/styled__default(ContentPadding).withC
5794
5795
  displayName: "Body__StyledViewWithPadding",
5795
5796
  componentId: "kitt-universal__sc-oc39vn-0"
5796
5797
  })(["padding-top:", "px;padding-bottom:", "px;"], ({
5797
- theme
5798
- }) => theme.kitt.spacing * 6, ({
5798
+ theme,
5799
+ $insetTop
5800
+ }) => Math.max(theme.kitt.spacing * 6, $insetTop), ({
5799
5801
  theme,
5800
5802
  $insetBottom
5801
5803
  }) => Math.max(theme.kitt.spacing * 4, $insetBottom));
@@ -5803,15 +5805,19 @@ function Body({
5803
5805
  children,
5804
5806
  shouldHandleBottomNotch,
5805
5807
  style,
5808
+ shouldHandleTopNotch,
5806
5809
  ...props
5807
5810
  }) {
5808
5811
  const {
5809
- bottom
5812
+ bottom,
5813
+ top
5810
5814
  } = reactNativeSafeAreaContext.useSafeAreaInsets();
5811
5815
  const insetBottom = shouldHandleBottomNotch ? bottom : 0;
5816
+ const insetTop = shouldHandleTopNotch ? top : 0;
5812
5817
  return /*#__PURE__*/jsxRuntime.jsx(StyledViewWithPadding, {
5813
5818
  ...props,
5814
5819
  $insetBottom: insetBottom,
5820
+ $insetTop: insetTop,
5815
5821
  style: style,
5816
5822
  children: children
5817
5823
  });
@@ -5854,9 +5860,10 @@ function Footer({
5854
5860
  const HeaderContainer = /*#__PURE__*/styled__default(ContentPadding).withConfig({
5855
5861
  displayName: "Header__HeaderContainer",
5856
5862
  componentId: "kitt-universal__sc-1g7sbq-0"
5857
- })(["height:", "px;width:100%;justify-content:center;background-color:", ";padding-right:", "px;padding-left:", "px;", ";"], ({
5858
- theme
5859
- }) => theme.kitt.navigationModal.height, ({
5863
+ })(["height:", "px;width:100%;justify-content:center;background-color:", ";padding-right:", "px;padding-left:", "px;padding-top:", "px;", ";"], ({
5864
+ theme,
5865
+ $insetTop
5866
+ }) => theme.kitt.navigationModal.height + $insetTop, ({
5860
5867
  theme,
5861
5868
  $isTransparent
5862
5869
  }) => {
@@ -5869,6 +5876,8 @@ const HeaderContainer = /*#__PURE__*/styled__default(ContentPadding).withConfig(
5869
5876
  theme,
5870
5877
  $hasLeft
5871
5878
  }) => $hasLeft ? theme.kitt.spacing * 2 : theme.kitt.navigationModal.padding, ({
5879
+ $insetTop
5880
+ }) => $insetTop, ({
5872
5881
  $hasSeparator
5873
5882
  }) => {
5874
5883
  if (!$hasSeparator) return undefined;
@@ -5924,14 +5933,20 @@ function Header({
5924
5933
  children,
5925
5934
  right,
5926
5935
  left,
5936
+ shouldHandleTopNotch = true,
5927
5937
  style
5928
5938
  }) {
5939
+ const {
5940
+ top
5941
+ } = reactNativeSafeAreaContext.useSafeAreaInsets();
5942
+ const insetTop = shouldHandleTopNotch ? top : 0;
5929
5943
  const sharedProps = {
5930
5944
  $hasLeft: Boolean(left),
5931
5945
  $hasRight: Boolean(right)
5932
5946
  };
5933
5947
  return /*#__PURE__*/jsxRuntime.jsx(HeaderContainer, {
5934
5948
  $isTransparent: isTransparent,
5949
+ $insetTop: insetTop,
5935
5950
  $hasSeparator: hasSeparator,
5936
5951
  $hasLeft: Boolean(left),
5937
5952
  $hasRight: Boolean(right),
@@ -6003,7 +6018,6 @@ function NativeOpacityAnimation({
6003
6018
  }
6004
6019
 
6005
6020
  function NativeSlideInAnimation({
6006
- topInset = 0,
6007
6021
  visible,
6008
6022
  children,
6009
6023
  onEntered,
@@ -6023,7 +6037,6 @@ function NativeSlideInAnimation({
6023
6037
  // Since animation callback is called on component mount, we must make sure that the animation has been runed once to call it an exit
6024
6038
  if (!visible && hasRunAnimationRef.current) onExited();
6025
6039
  }
6026
- const viewportHeight = wHeight - topInset;
6027
6040
  const translateStyle = Animated.useAnimatedStyle(function () {
6028
6041
  const _f = function () {
6029
6042
  const {
@@ -6033,7 +6046,7 @@ function NativeSlideInAnimation({
6033
6046
  const [x1, y1, x2, y2] = easing;
6034
6047
  return {
6035
6048
  transform: [{
6036
- translateY: Animated.withTiming(visible ? 0 : viewportHeight, {
6049
+ translateY: Animated.withTiming(visible ? 0 : wHeight, {
6037
6050
  duration,
6038
6051
  easing: Animated.Easing.bezier(x1, y1, x2, y2)
6039
6052
  }, function () {
@@ -6047,7 +6060,7 @@ function NativeSlideInAnimation({
6047
6060
  };
6048
6061
  _f.asString = "function _f(isFinished){const{runOnJS,handleAnimationFinished}=jsThis._closure;{if(!isFinished)return;runOnJS(handleAnimationFinished)();}}";
6049
6062
  _f.__workletHash = 14707844242190;
6050
- _f.__location = "/home/circleci/repo/@ornikar/kitt-universal/src/NavigationModal/components/NativeSlideInAnimation.tsx (49:12)";
6063
+ _f.__location = "/home/circleci/repo/@ornikar/kitt-universal/src/NavigationModal/components/NativeSlideInAnimation.tsx (45:12)";
6051
6064
  return _f;
6052
6065
  }())
6053
6066
  }]
@@ -6065,24 +6078,27 @@ function NativeSlideInAnimation({
6065
6078
  },
6066
6079
  withTiming: Animated.withTiming,
6067
6080
  visible,
6068
- viewportHeight,
6081
+ wHeight,
6069
6082
  Easing: {
6070
6083
  bezier: Animated.Easing.bezier
6071
6084
  },
6072
6085
  runOnJS: Animated.runOnJS,
6073
6086
  handleAnimationFinished
6074
6087
  };
6075
- _f.asString = "function _f(){const{theme,withTiming,visible,viewportHeight,Easing,runOnJS,handleAnimationFinished}=jsThis._closure;{const{duration:duration,easing:easing}=theme.kitt.navigationModal.animation.content;const[x1,y1,x2,y2]=easing;return{transform:[{translateY:withTiming(visible?0:viewportHeight,{duration:duration,easing:Easing.bezier(x1,y1,x2,y2)},function(isFinished){if(!isFinished)return;runOnJS(handleAnimationFinished)();})}]};}}";
6076
- _f.__workletHash = 505483620545;
6077
- _f.__location = "/home/circleci/repo/@ornikar/kitt-universal/src/NavigationModal/components/NativeSlideInAnimation.tsx (39:42)";
6088
+ _f.asString = "function _f(){const{theme,withTiming,visible,wHeight,Easing,runOnJS,handleAnimationFinished}=jsThis._closure;{const{duration:duration,easing:easing}=theme.kitt.navigationModal.animation.content;const[x1,y1,x2,y2]=easing;return{transform:[{translateY:withTiming(visible?0:wHeight,{duration:duration,easing:Easing.bezier(x1,y1,x2,y2)},function(isFinished){if(!isFinished)return;runOnJS(handleAnimationFinished)();})}]};}}";
6089
+ _f.__workletHash = 14160876288353;
6090
+ _f.__location = "/home/circleci/repo/@ornikar/kitt-universal/src/NavigationModal/components/NativeSlideInAnimation.tsx (35:42)";
6078
6091
  return _f;
6079
6092
  }());
6080
6093
  return /*#__PURE__*/jsxRuntime.jsx(Animated__default.View, {
6081
6094
  style: [{
6082
6095
  transform: [{
6083
- translateY: viewportHeight
6096
+ translateY: wHeight
6084
6097
  }]
6085
- }, translateStyle],
6098
+ }, translateStyle, {
6099
+ width: '100%',
6100
+ flex: 1
6101
+ }],
6086
6102
  children: children
6087
6103
  });
6088
6104
  }
@@ -6095,9 +6111,6 @@ function NavigationModalAnimation({
6095
6111
  onExit,
6096
6112
  onExited
6097
6113
  }) {
6098
- const {
6099
- top
6100
- } = reactNativeSafeAreaContext.useSafeAreaInsets();
6101
6114
  const [isModalVisible, setIsModalVisible] = React.useState(visible);
6102
6115
  const [isContentVisible, setIsContentVisible] = React.useState(false);
6103
6116
  const handleAnimationExited = () => {
@@ -6132,14 +6145,14 @@ function NavigationModalAnimation({
6132
6145
  children: /*#__PURE__*/jsxRuntime.jsx(Overlay, {
6133
6146
  onPress: handleAnimationExited
6134
6147
  })
6135
- }), /*#__PURE__*/jsxRuntime.jsxs(NativeSlideInAnimation, {
6136
- topInset: top,
6148
+ }), /*#__PURE__*/jsxRuntime.jsx(NativeSlideInAnimation, {
6137
6149
  visible: isContentVisible,
6138
6150
  onExited: handleAnimationExited,
6139
6151
  onEntered: onEntered,
6140
- children: [/*#__PURE__*/jsxRuntime.jsx(View, {
6141
- height: top
6142
- }), children]
6152
+ children: /*#__PURE__*/jsxRuntime.jsx(View, {
6153
+ flex: 1,
6154
+ children: children
6155
+ })
6143
6156
  })]
6144
6157
  })
6145
6158
  });