@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
@@ -918,6 +918,7 @@ var lateOceanColorPalette = {
918
918
  englishVermillon: '#D44148',
919
919
  goldCrayola: '#F8C583',
920
920
  aero: '#89BDDD',
921
+ seaShell: '#FFF9F3',
921
922
  transparent: 'transparent',
922
923
  moonPurple: '#DBD6F9',
923
924
  moonPurpleLight1: '#EDEBFC'
@@ -5850,12 +5851,13 @@ function ContentPadding(_ref2) {
5850
5851
  }));
5851
5852
  }
5852
5853
 
5853
- var _excluded$6 = ["children", "shouldHandleBottomNotch", "style"];
5854
+ var _excluded$6 = ["children", "shouldHandleBottomNotch", "style", "shouldHandleTopNotch"];
5854
5855
  var StyledViewWithPadding = /*#__PURE__*/styled(ContentPadding).withConfig({
5855
5856
  displayName: "Body__StyledViewWithPadding"
5856
5857
  })(["padding-top:", "px;padding-bottom:", "px;"], function (_ref) {
5857
- var theme = _ref.theme;
5858
- return theme.kitt.spacing * 6;
5858
+ var theme = _ref.theme,
5859
+ $insetTop = _ref.$insetTop;
5860
+ return Math.max(theme.kitt.spacing * 6, $insetTop);
5859
5861
  }, function (_ref2) {
5860
5862
  var theme = _ref2.theme,
5861
5863
  $insetBottom = _ref2.$insetBottom;
@@ -5865,12 +5867,16 @@ function Body(_ref3) {
5865
5867
  var children = _ref3.children,
5866
5868
  shouldHandleBottomNotch = _ref3.shouldHandleBottomNotch,
5867
5869
  style = _ref3.style,
5870
+ shouldHandleTopNotch = _ref3.shouldHandleTopNotch,
5868
5871
  props = _objectWithoutProperties(_ref3, _excluded$6);
5869
5872
  var _useSafeAreaInsets = useSafeAreaInsets(),
5870
- bottom = _useSafeAreaInsets.bottom;
5873
+ bottom = _useSafeAreaInsets.bottom,
5874
+ top = _useSafeAreaInsets.top;
5871
5875
  var insetBottom = shouldHandleBottomNotch ? bottom : 0;
5876
+ var insetTop = shouldHandleTopNotch ? top : 0;
5872
5877
  return /*#__PURE__*/jsx(StyledViewWithPadding, _objectSpread(_objectSpread({}, props), {}, {
5873
5878
  $insetBottom: insetBottom,
5879
+ $insetTop: insetTop,
5874
5880
  style: style,
5875
5881
  children: children
5876
5882
  }));
@@ -5913,9 +5919,10 @@ function Footer(_ref5) {
5913
5919
 
5914
5920
  var HeaderContainer = /*#__PURE__*/styled(ContentPadding).withConfig({
5915
5921
  displayName: "Header__HeaderContainer"
5916
- })(["height:", "px;width:100%;justify-content:center;background-color:", ";padding-right:", "px;padding-left:", "px;", ";"], function (_ref) {
5917
- var theme = _ref.theme;
5918
- return theme.kitt.navigationModal.height;
5922
+ })(["height:", "px;width:100%;justify-content:center;background-color:", ";padding-right:", "px;padding-left:", "px;padding-top:", "px;", ";"], function (_ref) {
5923
+ var theme = _ref.theme,
5924
+ $insetTop = _ref.$insetTop;
5925
+ return theme.kitt.navigationModal.height + $insetTop;
5919
5926
  }, function (_ref2) {
5920
5927
  var theme = _ref2.theme,
5921
5928
  $isTransparent = _ref2.$isTransparent;
@@ -5930,64 +5937,73 @@ var HeaderContainer = /*#__PURE__*/styled(ContentPadding).withConfig({
5930
5937
  $hasLeft = _ref4.$hasLeft;
5931
5938
  return $hasLeft ? theme.kitt.spacing * 2 : theme.kitt.navigationModal.padding;
5932
5939
  }, function (_ref5) {
5933
- var $hasSeparator = _ref5.$hasSeparator;
5940
+ var $insetTop = _ref5.$insetTop;
5941
+ return $insetTop;
5942
+ }, function (_ref6) {
5943
+ var $hasSeparator = _ref6.$hasSeparator;
5934
5944
  if (!$hasSeparator) return undefined;
5935
- return css(["border-bottom-width:1px;border-bottom-color:", ";"], function (_ref6) {
5936
- var theme = _ref6.theme;
5945
+ return css(["border-bottom-width:1px;border-bottom-color:", ";"], function (_ref7) {
5946
+ var theme = _ref7.theme;
5937
5947
  return theme.kitt.colors.separator;
5938
5948
  });
5939
5949
  });
5940
5950
  var Row = /*#__PURE__*/styled(View$2).withConfig({
5941
5951
  displayName: "Header__Row"
5942
- })(["flex-direction:row;justify-content:", ";align-items:center;"], function (_ref7) {
5943
- var $hasContent = _ref7.$hasContent,
5944
- $hasLeft = _ref7.$hasLeft;
5952
+ })(["flex-direction:row;justify-content:", ";align-items:center;"], function (_ref8) {
5953
+ var $hasContent = _ref8.$hasContent,
5954
+ $hasLeft = _ref8.$hasLeft;
5945
5955
  return !$hasContent && !$hasLeft ? 'flex-end' : 'space-between';
5946
5956
  });
5947
5957
  var ButtonContainer = /*#__PURE__*/styled.View.withConfig({
5948
5958
  displayName: "Header__ButtonContainer"
5949
- })(["width:", "px;"], function (_ref8) {
5950
- var theme = _ref8.theme;
5959
+ })(["width:", "px;"], function (_ref9) {
5960
+ var theme = _ref9.theme;
5951
5961
  return theme.kitt.iconButton.width;
5952
5962
  });
5953
5963
  var ChildrenComponent = /*#__PURE__*/styled(View$2).withConfig({
5954
5964
  displayName: "Header__ChildrenComponent"
5955
- })(["flex:1;align-items:center;", ";"], function (_ref9) {
5956
- var theme = _ref9.theme,
5957
- $hasLeft = _ref9.$hasLeft,
5958
- $hasRight = _ref9.$hasRight;
5965
+ })(["flex:1;align-items:center;", ";"], function (_ref10) {
5966
+ var theme = _ref10.theme,
5967
+ $hasLeft = _ref10.$hasLeft,
5968
+ $hasRight = _ref10.$hasRight;
5959
5969
  var paddingHorizontal = theme.kitt.spacing * 2;
5960
5970
  return css(["padding-right:", "px;padding-left:", "px;"], $hasRight ? paddingHorizontal : 0, $hasLeft ? paddingHorizontal : 0);
5961
5971
  });
5962
5972
  var HeaderTitle = /*#__PURE__*/styled(Typography.Text).withConfig({
5963
5973
  displayName: "Header__HeaderTitle"
5964
- })(["flex:1;text-align:", ";", ";"], function (_ref10) {
5965
- var $hasLeft = _ref10.$hasLeft,
5966
- $hasRight = _ref10.$hasRight;
5974
+ })(["flex:1;text-align:", ";", ";"], function (_ref11) {
5975
+ var $hasLeft = _ref11.$hasLeft,
5976
+ $hasRight = _ref11.$hasRight;
5967
5977
  if (!$hasLeft && $hasRight) return 'left';
5968
5978
  return 'center';
5969
- }, function (_ref11) {
5970
- var theme = _ref11.theme,
5971
- $hasLeft = _ref11.$hasLeft,
5972
- $hasRight = _ref11.$hasRight;
5979
+ }, function (_ref12) {
5980
+ var theme = _ref12.theme,
5981
+ $hasLeft = _ref12.$hasLeft,
5982
+ $hasRight = _ref12.$hasRight;
5973
5983
  var paddingHorizontal = theme.kitt.spacing * 2;
5974
5984
  return css(["padding-right:", "px;padding-left:", "px;"], $hasRight ? paddingHorizontal : 0, $hasLeft ? paddingHorizontal : 0);
5975
5985
  });
5976
- function Header(_ref12) {
5977
- var _ref12$hasSeparator = _ref12.hasSeparator,
5978
- hasSeparator = _ref12$hasSeparator === void 0 ? true : _ref12$hasSeparator,
5979
- isTransparent = _ref12.isTransparent,
5980
- title = _ref12.title,
5981
- children = _ref12.children,
5982
- right = _ref12.right,
5983
- left = _ref12.left,
5984
- style = _ref12.style;
5986
+ function Header(_ref13) {
5987
+ var _ref13$hasSeparator = _ref13.hasSeparator,
5988
+ hasSeparator = _ref13$hasSeparator === void 0 ? true : _ref13$hasSeparator,
5989
+ isTransparent = _ref13.isTransparent,
5990
+ title = _ref13.title,
5991
+ children = _ref13.children,
5992
+ right = _ref13.right,
5993
+ left = _ref13.left,
5994
+ _ref13$shouldHandleTo = _ref13.shouldHandleTopNotch,
5995
+ shouldHandleTopNotch = _ref13$shouldHandleTo === void 0 ? true : _ref13$shouldHandleTo,
5996
+ style = _ref13.style;
5997
+ var _useSafeAreaInsets = useSafeAreaInsets(),
5998
+ top = _useSafeAreaInsets.top;
5999
+ var insetTop = shouldHandleTopNotch ? top : 0;
5985
6000
  var sharedProps = {
5986
6001
  $hasLeft: Boolean(left),
5987
6002
  $hasRight: Boolean(right)
5988
6003
  };
5989
6004
  return /*#__PURE__*/jsx(HeaderContainer, {
5990
6005
  $isTransparent: isTransparent,
6006
+ $insetTop: insetTop,
5991
6007
  $hasSeparator: hasSeparator,
5992
6008
  $hasLeft: Boolean(left),
5993
6009
  $hasRight: Boolean(right),
@@ -6059,9 +6075,7 @@ function NativeOpacityAnimation(_ref) {
6059
6075
  }
6060
6076
 
6061
6077
  function NativeSlideInAnimation(_ref) {
6062
- var _ref$topInset = _ref.topInset,
6063
- topInset = _ref$topInset === void 0 ? 0 : _ref$topInset,
6064
- visible = _ref.visible,
6078
+ var visible = _ref.visible,
6065
6079
  children = _ref.children,
6066
6080
  onEntered = _ref.onEntered,
6067
6081
  onExited = _ref.onExited;
@@ -6078,7 +6092,6 @@ function NativeSlideInAnimation(_ref) {
6078
6092
  // Since animation callback is called on component mount, we must make sure that the animation has been runed once to call it an exit
6079
6093
  if (!visible && hasRunAnimationRef.current) onExited();
6080
6094
  }
6081
- var viewportHeight = wHeight - topInset;
6082
6095
  var translateStyle = useAnimatedStyle(function () {
6083
6096
  var _f = function () {
6084
6097
  var _theme$kitt$navigatio = theme.kitt.navigationModal.animation.content,
@@ -6091,7 +6104,7 @@ function NativeSlideInAnimation(_ref) {
6091
6104
  y2 = _easing[3];
6092
6105
  return {
6093
6106
  transform: [{
6094
- translateY: withTiming(visible ? 0 : viewportHeight, {
6107
+ translateY: withTiming(visible ? 0 : wHeight, {
6095
6108
  duration: duration,
6096
6109
  easing: Easing$1.bezier(x1, y1, x2, y2)
6097
6110
  }, function () {
@@ -6105,7 +6118,7 @@ function NativeSlideInAnimation(_ref) {
6105
6118
  };
6106
6119
  _f.asString = "function _f(isFinished){const{runOnJS,handleAnimationFinished}=jsThis._closure;{if(!isFinished)return;runOnJS(handleAnimationFinished)();}}";
6107
6120
  _f.__workletHash = 14707844242190;
6108
- _f.__location = "/home/circleci/repo/@ornikar/kitt-universal/src/NavigationModal/components/NativeSlideInAnimation.tsx (49:12)";
6121
+ _f.__location = "/home/circleci/repo/@ornikar/kitt-universal/src/NavigationModal/components/NativeSlideInAnimation.tsx (45:12)";
6109
6122
  return _f;
6110
6123
  }())
6111
6124
  }]
@@ -6123,24 +6136,27 @@ function NativeSlideInAnimation(_ref) {
6123
6136
  },
6124
6137
  withTiming: withTiming,
6125
6138
  visible: visible,
6126
- viewportHeight: viewportHeight,
6139
+ wHeight: wHeight,
6127
6140
  Easing: {
6128
6141
  bezier: Easing$1.bezier
6129
6142
  },
6130
6143
  runOnJS: runOnJS,
6131
6144
  handleAnimationFinished: handleAnimationFinished
6132
6145
  };
6133
- _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)();})}]};}}";
6134
- _f.__workletHash = 505483620545;
6135
- _f.__location = "/home/circleci/repo/@ornikar/kitt-universal/src/NavigationModal/components/NativeSlideInAnimation.tsx (39:42)";
6146
+ _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)();})}]};}}";
6147
+ _f.__workletHash = 14160876288353;
6148
+ _f.__location = "/home/circleci/repo/@ornikar/kitt-universal/src/NavigationModal/components/NativeSlideInAnimation.tsx (35:42)";
6136
6149
  return _f;
6137
6150
  }());
6138
6151
  return /*#__PURE__*/jsx(Animated.View, {
6139
6152
  style: [{
6140
6153
  transform: [{
6141
- translateY: viewportHeight
6154
+ translateY: wHeight
6142
6155
  }]
6143
- }, translateStyle],
6156
+ }, translateStyle, {
6157
+ width: '100%',
6158
+ flex: 1
6159
+ }],
6144
6160
  children: children
6145
6161
  });
6146
6162
  }
@@ -6152,8 +6168,6 @@ function NavigationModalAnimation(_ref) {
6152
6168
  onEntered = _ref.onEntered,
6153
6169
  onExit = _ref.onExit,
6154
6170
  onExited = _ref.onExited;
6155
- var _useSafeAreaInsets = useSafeAreaInsets(),
6156
- top = _useSafeAreaInsets.top;
6157
6171
  var _useState = useState(visible),
6158
6172
  _useState2 = _slicedToArray(_useState, 2),
6159
6173
  isModalVisible = _useState2[0],
@@ -6194,14 +6208,14 @@ function NavigationModalAnimation(_ref) {
6194
6208
  children: /*#__PURE__*/jsx(Overlay, {
6195
6209
  onPress: handleAnimationExited
6196
6210
  })
6197
- }), /*#__PURE__*/jsxs(NativeSlideInAnimation, {
6198
- topInset: top,
6211
+ }), /*#__PURE__*/jsx(NativeSlideInAnimation, {
6199
6212
  visible: isContentVisible,
6200
6213
  onExited: handleAnimationExited,
6201
6214
  onEntered: onEntered,
6202
- children: [/*#__PURE__*/jsx(View, {
6203
- height: top
6204
- }), children]
6215
+ children: /*#__PURE__*/jsx(View, {
6216
+ flex: 1,
6217
+ children: children
6218
+ })
6205
6219
  })]
6206
6220
  })
6207
6221
  });