@ornikar/kitt-universal 9.2.0 → 9.3.2

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 (56) hide show
  1. package/dist/definitions/ModalBehaviour/ModalBehaviour.d.ts +18 -0
  2. package/dist/definitions/ModalBehaviour/ModalBehaviour.d.ts.map +1 -0
  3. package/dist/definitions/ModalBehaviour/ModalBehaviourPortal.d.ts +7 -0
  4. package/dist/definitions/ModalBehaviour/ModalBehaviourPortal.d.ts.map +1 -0
  5. package/dist/definitions/ModalBehaviour/ModalBehaviourPortal.web.d.ts +4 -0
  6. package/dist/definitions/ModalBehaviour/ModalBehaviourPortal.web.d.ts.map +1 -0
  7. package/dist/definitions/ModalBehaviour/OnCloseContext.d.ts +11 -0
  8. package/dist/definitions/ModalBehaviour/OnCloseContext.d.ts.map +1 -0
  9. package/dist/definitions/NavigationModal/Body.d.ts +9 -0
  10. package/dist/definitions/NavigationModal/Body.d.ts.map +1 -0
  11. package/dist/definitions/NavigationModal/ContentPadding.d.ts +7 -0
  12. package/dist/definitions/NavigationModal/ContentPadding.d.ts.map +1 -0
  13. package/dist/definitions/NavigationModal/Footer.d.ts +11 -0
  14. package/dist/definitions/NavigationModal/Footer.d.ts.map +1 -0
  15. package/dist/definitions/NavigationModal/Header.d.ts +31 -0
  16. package/dist/definitions/NavigationModal/Header.d.ts.map +1 -0
  17. package/dist/definitions/NavigationModal/NavigationModal.d.ts +17 -0
  18. package/dist/definitions/NavigationModal/NavigationModal.d.ts.map +1 -0
  19. package/dist/definitions/NavigationModal/NavigationModalContainer.d.ts +8 -0
  20. package/dist/definitions/NavigationModal/NavigationModalContainer.d.ts.map +1 -0
  21. package/dist/definitions/index.d.ts +4 -0
  22. package/dist/definitions/index.d.ts.map +1 -1
  23. package/dist/definitions/native-base/KittNativeBaseProvider.d.ts +1 -1
  24. package/dist/definitions/native-base/KittNativeBaseProvider.d.ts.map +1 -1
  25. package/dist/definitions/themes/default.d.ts +1 -0
  26. package/dist/definitions/themes/default.d.ts.map +1 -1
  27. package/dist/definitions/themes/late-ocean/navigationModal.d.ts +6 -0
  28. package/dist/definitions/themes/late-ocean/navigationModal.d.ts.map +1 -0
  29. package/dist/index-browser-all.es.android.js +333 -47
  30. package/dist/index-browser-all.es.android.js.map +1 -1
  31. package/dist/index-browser-all.es.ios.js +333 -47
  32. package/dist/index-browser-all.es.ios.js.map +1 -1
  33. package/dist/index-browser-all.es.js +333 -47
  34. package/dist/index-browser-all.es.js.map +1 -1
  35. package/dist/index-browser-all.es.web.js +355 -46
  36. package/dist/index-browser-all.es.web.js.map +1 -1
  37. package/dist/index-node-14.17.cjs.js +307 -14
  38. package/dist/index-node-14.17.cjs.js.map +1 -1
  39. package/dist/index-node-14.17.cjs.web.css +1 -0
  40. package/dist/index-node-14.17.cjs.web.js +319 -14
  41. package/dist/index-node-14.17.cjs.web.js.map +1 -1
  42. package/dist/linaria-themes-browser-all.es.android.js +7 -1
  43. package/dist/linaria-themes-browser-all.es.android.js.map +1 -1
  44. package/dist/linaria-themes-browser-all.es.ios.js +7 -1
  45. package/dist/linaria-themes-browser-all.es.ios.js.map +1 -1
  46. package/dist/linaria-themes-browser-all.es.js +7 -1
  47. package/dist/linaria-themes-browser-all.es.js.map +1 -1
  48. package/dist/linaria-themes-browser-all.es.web.js +7 -1
  49. package/dist/linaria-themes-browser-all.es.web.js.map +1 -1
  50. package/dist/linaria-themes-node-14.17.cjs.js +7 -1
  51. package/dist/linaria-themes-node-14.17.cjs.js.map +1 -1
  52. package/dist/linaria-themes-node-14.17.cjs.web.js +7 -1
  53. package/dist/linaria-themes-node-14.17.cjs.web.js.map +1 -1
  54. package/dist/styles.css +1 -0
  55. package/dist/tsbuildinfo +1 -1
  56. package/package.json +5 -3
@@ -5,7 +5,7 @@ export { useWindowDimensions as useWindowSize } from 'react-native';
5
5
  import { UserIcon, CheckboxMark, EyeOffIcon, EyeIcon, ArcIcon, InfoIcon, AlertTriangleIcon, CheckIcon, AlertCircleIcon, XIcon, TooltipArrowIcon } from '@ornikar/kitt-icons';
6
6
  export * from '@ornikar/kitt-icons';
7
7
  import styled, { useTheme, css, ThemeProvider } from 'styled-components/native';
8
- import { cloneElement, useContext, createContext, forwardRef, useMemo, useState, Fragment, Children, useEffect } from 'react';
8
+ import { cloneElement, useContext, createContext, forwardRef, useMemo, useState, Fragment, useEffect, Children } from 'react';
9
9
  import { jsx, jsxs, Fragment as Fragment$1 } from 'react/jsx-runtime';
10
10
  import _slicedToArray from '@babel/runtime/helpers/slicedToArray';
11
11
  import { Text as Text$1, Image as Image$1, NativeBaseProvider, extendTheme, Stack as Stack$1, VStack as VStack$1, HStack as HStack$1, View as View$2, ScrollView as ScrollView$2, Pressable as Pressable$2 } from 'native-base';
@@ -15,6 +15,7 @@ import _asyncToGenerator from '@babel/runtime/helpers/asyncToGenerator';
15
15
  import _regeneratorRuntime from '@babel/runtime/regenerator';
16
16
  import _extends from '@babel/runtime/helpers/extends';
17
17
  import { useSafeAreaInsets } from 'react-native-safe-area-context';
18
+ import { Portal } from 'react-portal';
18
19
  import _toConsumableArray from '@babel/runtime/helpers/toConsumableArray';
19
20
  import { useFloating, offset, shift, flip, getScrollParents } from '@floating-ui/react-dom';
20
21
  import { makeDecorator } from '@storybook/addons';
@@ -111,7 +112,7 @@ var KittBreakpointNameEnum;
111
112
  KittBreakpointNameEnum["WIDE"] = "wide";
112
113
  })(KittBreakpointNameEnum || (KittBreakpointNameEnum = {}));
113
114
 
114
- var _excluded$h = ["accessibilityRole", "base", "small", "medium", "large", "wide", "type", "variant", "color"];
115
+ var _excluded$j = ["accessibilityRole", "base", "small", "medium", "large", "wide", "type", "variant", "color"];
115
116
  var IsHeaderTypographyContext = /*#__PURE__*/createContext(undefined);
116
117
  var TypographyColorContext = /*#__PURE__*/createContext('black');
117
118
  function useTypographyColor() {
@@ -172,7 +173,7 @@ function Typography(_ref) {
172
173
  } : _ref$type,
173
174
  variant = _ref.variant,
174
175
  color = _ref.color,
175
- otherProps = _objectWithoutProperties(_ref, _excluded$h);
176
+ otherProps = _objectWithoutProperties(_ref, _excluded$j);
176
177
 
177
178
  var isHeaderTypographyInContext = useContext(IsHeaderTypographyContext);
178
179
  var hasTypographyAncestor = isHeaderTypographyInContext !== undefined;
@@ -198,7 +199,7 @@ function Typography(_ref) {
198
199
  var text = /*#__PURE__*/jsx(Text$1, _objectSpread({
199
200
  accessibilityRole: accessibilityRole || undefined,
200
201
  fontSize: fontSizeForNativeBase,
201
- lineHeight: fontSizeForNativeBase,
202
+ lineHeight: hasTypographyAncestor ? undefined : fontSizeForNativeBase,
202
203
  fontWeight: isHeader ? "headers.".concat(nonNullableVariant) : "bodies.".concat(nonNullableVariant),
203
204
  fontFamily: isHeader ? "headers.".concat(nonNullableVariant) : "bodies.".concat(nonNullableVariant),
204
205
  color: color ? "kitt.typography.".concat(color) : undefined,
@@ -267,7 +268,7 @@ Typography.h4 = createHeading(4, 'header4');
267
268
 
268
269
  Typography.h5 = createHeading(5, 'header5');
269
270
 
270
- var _excluded$g = ["size", "round", "light", "sizeVariant"];
271
+ var _excluded$i = ["size", "round", "light", "sizeVariant"];
271
272
 
272
273
  var getInitials = function (firstname, lastname) {
273
274
  return "".concat(firstname[0]).concat(lastname[0]).toUpperCase();
@@ -339,7 +340,7 @@ function Avatar(_ref6) {
339
340
  round = _ref6.round,
340
341
  light = _ref6.light,
341
342
  sizeVariant = _ref6.sizeVariant,
342
- props = _objectWithoutProperties(_ref6, _excluded$g);
343
+ props = _objectWithoutProperties(_ref6, _excluded$i);
343
344
 
344
345
  return /*#__PURE__*/jsx(StyledAvatarView, {
345
346
  $size: size,
@@ -406,7 +407,7 @@ function isSubtle(type) {
406
407
  return type.startsWith('subtle');
407
408
  }
408
409
 
409
- var _excluded$f = ["$type", "$variant", "$isStretch", "disabled"];
410
+ var _excluded$h = ["$type", "$variant", "$isStretch", "disabled"];
410
411
  var AnimatedButtonPressableContainer = withTheme( /*#__PURE__*/styled$1("div")({
411
412
  name: "AnimatedButtonPressableContainer",
412
413
  "class": "kitt-u_AnimatedButtonPressableContainer_a1vkj3mh",
@@ -520,7 +521,7 @@ var AnimatedButtonPressable = /*#__PURE__*/forwardRef(function (_ref18, ref) {
520
521
  $variant = _ref18.$variant,
521
522
  $isStretch = _ref18.$isStretch,
522
523
  disabled = _ref18.disabled,
523
- props = _objectWithoutProperties(_ref18, _excluded$f);
524
+ props = _objectWithoutProperties(_ref18, _excluded$h);
524
525
 
525
526
  return /*#__PURE__*/jsx(AnimatedButtonPressableContainer, {
526
527
  ref: ref,
@@ -575,12 +576,12 @@ var BaseStyledButtonPressable = /*#__PURE__*/styled(View$1).withConfig({
575
576
  return defaultPadding;
576
577
  });
577
578
 
578
- var _excluded$e = ["color"],
579
+ var _excluded$g = ["color"],
579
580
  _excluded2$3 = ["color"];
580
581
 
581
582
  function TypographyIconSpecifiedColor(_ref) {
582
583
  var color = _ref.color,
583
- props = _objectWithoutProperties(_ref, _excluded$e);
584
+ props = _objectWithoutProperties(_ref, _excluded$g);
584
585
 
585
586
  var theme = /*#__PURE__*/useTheme();
586
587
  return /*#__PURE__*/jsx(Icon, _objectSpread(_objectSpread({}, props), {}, {
@@ -608,7 +609,7 @@ function TypographyIcon(_ref2) {
608
609
  return /*#__PURE__*/jsx(TypographyIconInheritColor, _objectSpread({}, props));
609
610
  }
610
611
 
611
- var _excluded$d = ["type", "variant", "isDisabled", "$isStretch", "icon", "children"];
612
+ var _excluded$f = ["type", "variant", "isDisabled", "$isStretch", "icon", "children"];
612
613
 
613
614
  var getTextColorByType = function (type, variant) {
614
615
  switch (type) {
@@ -750,7 +751,7 @@ function ButtonContent(_ref7) {
750
751
  $isStretch = _ref7.$isStretch,
751
752
  icon = _ref7.icon,
752
753
  children = _ref7.children,
753
- props = _objectWithoutProperties(_ref7, _excluded$d);
754
+ props = _objectWithoutProperties(_ref7, _excluded$f);
754
755
 
755
756
  var color = isDisabled ? 'black-light' : getTextColorByType(type, variant);
756
757
  return /*#__PURE__*/jsx(ButtonContentContainer, {
@@ -904,7 +905,7 @@ function Emoji(_ref) {
904
905
  });
905
906
  }
906
907
 
907
- var _excluded$c = ["as", "appScheme", "appValue", "onPress", "onOpenAppError"],
908
+ var _excluded$e = ["as", "appScheme", "appValue", "onPress", "onOpenAppError"],
908
909
  _excluded2$2 = ["phoneNumber", "children"],
909
910
  _excluded3$1 = ["phoneNumber", "children"],
910
911
  _excluded4 = ["emailAddress", "children"];
@@ -914,7 +915,7 @@ function ExternalAppLink(_ref) {
914
915
  appValue = _ref.appValue,
915
916
  onPress = _ref.onPress,
916
917
  onOpenAppError = _ref.onOpenAppError,
917
- rest = _objectWithoutProperties(_ref, _excluded$c);
918
+ rest = _objectWithoutProperties(_ref, _excluded$e);
918
919
 
919
920
  var href = "".concat(appScheme, ":").concat(appValue);
920
921
 
@@ -1032,14 +1033,14 @@ var defaultOpenLinkBehavior = {
1032
1033
  web: 'targetBlank'
1033
1034
  };
1034
1035
 
1035
- var _excluded$b = ["as", "href", "openLinkBehavior", "onPress"];
1036
+ var _excluded$d = ["as", "href", "openLinkBehavior", "onPress"];
1036
1037
  function ExternalLink(_ref) {
1037
1038
  var Component = _ref.as,
1038
1039
  href = _ref.href,
1039
1040
  _ref$openLinkBehavior = _ref.openLinkBehavior,
1040
1041
  openLinkBehavior = _ref$openLinkBehavior === void 0 ? defaultOpenLinkBehavior : _ref$openLinkBehavior,
1041
1042
  onPress = _ref.onPress,
1042
- rest = _objectWithoutProperties(_ref, _excluded$b);
1043
+ rest = _objectWithoutProperties(_ref, _excluded$d);
1043
1044
 
1044
1045
  return /*#__PURE__*/jsx(Component, _objectSpread(_objectSpread({}, rest), {}, {
1045
1046
  href: href,
@@ -1513,6 +1514,11 @@ var listItem = {
1513
1514
  innerMargin: 8
1514
1515
  };
1515
1516
 
1517
+ var navigationModal = {
1518
+ height: 56,
1519
+ padding: 16
1520
+ };
1521
+
1516
1522
  var pageLoader = {
1517
1523
  size: 60,
1518
1524
  strokeWidth: 3,
@@ -1658,7 +1664,8 @@ var theme = {
1658
1664
  skeleton: skeleton,
1659
1665
  tag: tag,
1660
1666
  tooltip: tooltip,
1661
- typography: typography
1667
+ typography: typography,
1668
+ navigationModal: navigationModal
1662
1669
  };
1663
1670
 
1664
1671
  function matchWindowSize(_ref, _ref2) {
@@ -1961,12 +1968,12 @@ function DatePickerInputs(_ref4) {
1961
1968
  });
1962
1969
  }
1963
1970
 
1964
- var _excluded$a = ["value"];
1971
+ var _excluded$c = ["value"];
1965
1972
  // This is not yet implemented
1966
1973
  // We still display the inputs for chromatic
1967
1974
  function DatePicker(_ref) {
1968
1975
  var value = _ref.value,
1969
- props = _objectWithoutProperties(_ref, _excluded$a);
1976
+ props = _objectWithoutProperties(_ref, _excluded$c);
1970
1977
 
1971
1978
  return /*#__PURE__*/jsx(DatePickerInputs, _objectSpread({
1972
1979
  handleModalOpen: function handleModalOpen() {},
@@ -2006,7 +2013,7 @@ var InputTextContainer = withTheme( /*#__PURE__*/styled$1("div")({
2006
2013
  }
2007
2014
  }));
2008
2015
 
2009
- var _excluded$9 = ["id", "right", "minHeight", "state", "internalForceState", "disabled", "autoCorrect", "textContentType", "autoComplete", "keyboardType", "multiline", "onSubmitEditing", "onFocus", "onBlur"];
2016
+ var _excluded$b = ["id", "right", "minHeight", "state", "internalForceState", "disabled", "autoCorrect", "textContentType", "autoComplete", "keyboardType", "multiline", "onSubmitEditing", "onFocus", "onBlur"];
2010
2017
  var StyledTextInput = /*#__PURE__*/styled(TextInput).withConfig({
2011
2018
  displayName: "InputText__StyledTextInput",
2012
2019
  componentId: "kitt-universal__sc-uke279-0"
@@ -2050,7 +2057,7 @@ var InputText = /*#__PURE__*/forwardRef(function (_ref4, ref) {
2050
2057
  onSubmitEditing = _ref4.onSubmitEditing,
2051
2058
  _onFocus = _ref4.onFocus,
2052
2059
  _onBlur = _ref4.onBlur,
2053
- props = _objectWithoutProperties(_ref4, _excluded$9);
2060
+ props = _objectWithoutProperties(_ref4, _excluded$b);
2054
2061
 
2055
2062
  var theme = /*#__PURE__*/useTheme();
2056
2063
 
@@ -2206,11 +2213,11 @@ function InputPressable(_ref) {
2206
2213
  return /*#__PURE__*/jsx(Pressable$1, _objectSpread({}, props));
2207
2214
  }
2208
2215
 
2209
- var _excluded$8 = ["isPasswordDefaultVisible", "right"];
2216
+ var _excluded$a = ["isPasswordDefaultVisible", "right"];
2210
2217
  function InputPassword(_ref) {
2211
2218
  var isPasswordDefaultVisible = _ref.isPasswordDefaultVisible,
2212
2219
  right = _ref.right,
2213
- props = _objectWithoutProperties(_ref, _excluded$8);
2220
+ props = _objectWithoutProperties(_ref, _excluded$a);
2214
2221
 
2215
2222
  var _useState = useState(Boolean(isPasswordDefaultVisible)),
2216
2223
  _useState2 = _slicedToArray(_useState, 2),
@@ -2420,7 +2427,7 @@ function TextArea(_ref) {
2420
2427
  }, props));
2421
2428
  }
2422
2429
 
2423
- var Body = /*#__PURE__*/styled(View$1).withConfig({
2430
+ var Body$1 = /*#__PURE__*/styled(View$1).withConfig({
2424
2431
  displayName: "Body",
2425
2432
  componentId: "kitt-universal__sc-1ofncfn-0"
2426
2433
  })(["", " background-color:", ";flex:1;"], function (_ref) {
@@ -2434,7 +2441,7 @@ var Body = /*#__PURE__*/styled(View$1).withConfig({
2434
2441
  });
2435
2442
  function FullScreenModalBody(_ref3) {
2436
2443
  var children = _ref3.children;
2437
- return /*#__PURE__*/jsx(Body, {
2444
+ return /*#__PURE__*/jsx(Body$1, {
2438
2445
  children: children
2439
2446
  });
2440
2447
  }
@@ -2459,7 +2466,7 @@ function getHeaderHorizontalMediumPadding(spacing) {
2459
2466
  return spacing * 6;
2460
2467
  }
2461
2468
 
2462
- var Header = /*#__PURE__*/styled(View$1).withConfig({
2469
+ var Header$1 = /*#__PURE__*/styled(View$1).withConfig({
2463
2470
  displayName: "Header",
2464
2471
  componentId: "kitt-universal__sc-dfmxi1-1"
2465
2472
  })(["", ";border-bottom-color:", ";border-bottom-width:1px;flex-direction:row;align-items:center;"], function (_ref2) {
@@ -2545,7 +2552,7 @@ function FullScreenModalHeader(_ref6) {
2545
2552
  setRightWidth(event.nativeEvent.layout.width);
2546
2553
  };
2547
2554
 
2548
- return /*#__PURE__*/jsxs(Header, {
2555
+ return /*#__PURE__*/jsxs(Header$1, {
2549
2556
  insetTop: top,
2550
2557
  children: [left ? /*#__PURE__*/jsx(SideContainer, {
2551
2558
  onLayout: function onLayout(e) {
@@ -2598,11 +2605,11 @@ function SpinningIcon(_ref) {
2598
2605
  });
2599
2606
  }
2600
2607
 
2601
- var _excluded$7 = ["as", "children"];
2608
+ var _excluded$9 = ["as", "children"];
2602
2609
  function StyleWebWrapper(_ref) {
2603
2610
  var as = _ref.as,
2604
2611
  children = _ref.children,
2605
- props = _objectWithoutProperties(_ref, _excluded$7);
2612
+ props = _objectWithoutProperties(_ref, _excluded$9);
2606
2613
 
2607
2614
  // as or default to div. If as is undefined, T is div but typescript is not sure
2608
2615
  return /*#__PURE__*/jsx(as || 'div', _objectSpread(_objectSpread({}, props), {}, {
@@ -2610,7 +2617,7 @@ function StyleWebWrapper(_ref) {
2610
2617
  }));
2611
2618
  }
2612
2619
 
2613
- var _excluded$6 = ["color", "disabled"];
2620
+ var _excluded$8 = ["color", "disabled"];
2614
2621
  var PressableIconButtonWebWrapper = withTheme( /*#__PURE__*/styled$1("div")({
2615
2622
  name: "PressableIconButtonWebWrapper",
2616
2623
  "class": "kitt-u_PressableIconButtonWebWrapper_p1nlccvg",
@@ -2670,7 +2677,7 @@ var StyledPressableIconButton = /*#__PURE__*/styled(Pressable$1).withConfig({
2670
2677
  function PressableIconButton(_ref9) {
2671
2678
  var color = _ref9.color,
2672
2679
  disabled = _ref9.disabled,
2673
- props = _objectWithoutProperties(_ref9, _excluded$6);
2680
+ props = _objectWithoutProperties(_ref9, _excluded$8);
2674
2681
 
2675
2682
  return /*#__PURE__*/jsx(StyleWebWrapper, {
2676
2683
  as: PressableIconButtonWebWrapper,
@@ -2753,21 +2760,21 @@ function IconButton(_ref7) {
2753
2760
  });
2754
2761
  }
2755
2762
 
2756
- var _excluded$5 = ["children"];
2763
+ var _excluded$7 = ["children"];
2757
2764
  var ContentView$1 = /*#__PURE__*/styled(View$1).withConfig({
2758
2765
  displayName: "ListItemContent__ContentView",
2759
2766
  componentId: "kitt-universal__sc-57q0u9-0"
2760
2767
  })(["flex:1 0 0%;align-self:center;"]);
2761
2768
  function ListItemContent(_ref) {
2762
2769
  var children = _ref.children,
2763
- rest = _objectWithoutProperties(_ref, _excluded$5);
2770
+ rest = _objectWithoutProperties(_ref, _excluded$7);
2764
2771
 
2765
2772
  return /*#__PURE__*/jsx(ContentView$1, _objectSpread(_objectSpread({}, rest), {}, {
2766
2773
  children: children
2767
2774
  }));
2768
2775
  }
2769
2776
 
2770
- var _excluded$4 = ["children", "side"],
2777
+ var _excluded$6 = ["children", "side"],
2771
2778
  _excluded2$1 = ["children", "align"];
2772
2779
  var SideContainerView = /*#__PURE__*/styled(View$1).withConfig({
2773
2780
  displayName: "ListItemSideContent__SideContainerView",
@@ -2786,7 +2793,7 @@ function ListItemSideContainer(_ref3) {
2786
2793
  var children = _ref3.children,
2787
2794
  _ref3$side = _ref3.side,
2788
2795
  side = _ref3$side === void 0 ? 'left' : _ref3$side,
2789
- rest = _objectWithoutProperties(_ref3, _excluded$4);
2796
+ rest = _objectWithoutProperties(_ref3, _excluded$6);
2790
2797
 
2791
2798
  return /*#__PURE__*/jsx(SideContainerView, _objectSpread(_objectSpread({
2792
2799
  side: side
@@ -2814,7 +2821,7 @@ function ListItemSideContent(_ref5) {
2814
2821
  }));
2815
2822
  }
2816
2823
 
2817
- var _excluded$3 = ["children", "withPadding", "borders", "left", "right", "onPress"];
2824
+ var _excluded$5 = ["children", "withPadding", "borders", "left", "right", "onPress"];
2818
2825
  var ContainerView = /*#__PURE__*/styled(View$1).withConfig({
2819
2826
  displayName: "ListItem__ContainerView",
2820
2827
  componentId: "kitt-universal__sc-2afp9s-0"
@@ -2854,7 +2861,7 @@ function ListItem(_ref5) {
2854
2861
  left = _ref5.left,
2855
2862
  right = _ref5.right,
2856
2863
  onPress = _ref5.onPress,
2857
- rest = _objectWithoutProperties(_ref5, _excluded$3);
2864
+ rest = _objectWithoutProperties(_ref5, _excluded$5);
2858
2865
 
2859
2866
  var Wrapper = onPress ? Pressable$1 : Fragment;
2860
2867
  var wrapperProps = onPress ? _objectSpread({
@@ -3101,7 +3108,7 @@ function ModalFooter(_ref3) {
3101
3108
  });
3102
3109
  }
3103
3110
 
3104
- var OnCloseContext = /*#__PURE__*/createContext(function () {});
3111
+ var OnCloseContext$1 = /*#__PURE__*/createContext(function () {});
3105
3112
 
3106
3113
  var HeaderView = /*#__PURE__*/styled(View$1).withConfig({
3107
3114
  displayName: "Header__HeaderView",
@@ -3139,7 +3146,7 @@ function ModalHeader(_ref6) {
3139
3146
  var left = _ref6.left,
3140
3147
  right = _ref6.right,
3141
3148
  children = _ref6.children;
3142
- var onClose = useContext(OnCloseContext);
3149
+ var onClose = useContext(OnCloseContext$1);
3143
3150
  var isIconLeft = !!left;
3144
3151
  return /*#__PURE__*/jsxs(HeaderView, {
3145
3152
  children: [isIconLeft && /*#__PURE__*/jsx(LeftIconView, {
@@ -3182,7 +3189,7 @@ function Modal(_ref5) {
3182
3189
  onClose = _ref5.onClose,
3183
3190
  onEntered = _ref5.onEntered,
3184
3191
  onExited = _ref5.onExited;
3185
- return /*#__PURE__*/jsx(OnCloseContext.Provider, {
3192
+ return /*#__PURE__*/jsx(OnCloseContext$1.Provider, {
3186
3193
  value: onClose,
3187
3194
  children: /*#__PURE__*/jsx(Modal$1, {
3188
3195
  transparent: true,
@@ -3205,6 +3212,77 @@ Modal.Header = ModalHeader;
3205
3212
  Modal.Body = ModalBody;
3206
3213
  Modal.Footer = ModalFooter;
3207
3214
 
3215
+ var overflowHidden = "kitt-u_overflowHidden_otm3u3";
3216
+
3217
+ function useBlockBodyScroll(isScrollBlocked) {
3218
+ useEffect(function () {
3219
+ if (isScrollBlocked) {
3220
+ document.body.classList.add(overflowHidden);
3221
+ } else {
3222
+ document.body.classList.remove(overflowHidden);
3223
+ }
3224
+ }, [isScrollBlocked]);
3225
+ }
3226
+
3227
+ function ModalBehaviourPortal(_ref) {
3228
+ var visible = _ref.visible,
3229
+ children = _ref.children;
3230
+ useBlockBodyScroll(Boolean(visible));
3231
+ return /*#__PURE__*/jsx(Portal, {
3232
+ children: children
3233
+ });
3234
+ }
3235
+
3236
+ var OnCloseContext = /*#__PURE__*/createContext(function () {});
3237
+ function OnCloseProvider(_ref) {
3238
+ var children = _ref.children,
3239
+ onClose = _ref.onClose;
3240
+ return /*#__PURE__*/jsx(OnCloseContext.Provider, {
3241
+ value: onClose,
3242
+ children: children
3243
+ });
3244
+ }
3245
+ function useOnCloseModalBehaviour() {
3246
+ var onClose = useContext(OnCloseContext);
3247
+ return onClose;
3248
+ }
3249
+
3250
+ function CloseButton(_ref) {
3251
+ var children = _ref.children,
3252
+ onPress = _ref.onPress;
3253
+ var onCloseContextCallback = useOnCloseModalBehaviour();
3254
+ return /*#__PURE__*/cloneElement(children, {
3255
+ onPress: function handleClose() {
3256
+ if (onPress) onPress();
3257
+ onCloseContextCallback();
3258
+ }
3259
+ });
3260
+ }
3261
+
3262
+ var ModalBehaviourContainer = /*#__PURE__*/styled(View$1).withConfig({
3263
+ displayName: "ModalBehaviour__ModalBehaviourContainer",
3264
+ componentId: "kitt-universal__sc-tj3606-0"
3265
+ })(["", ""], function () {
3266
+ return css(["position:fixed;top:0;left:0;width:100%;"]);
3267
+ });
3268
+ function ModalBehaviour(_ref2) {
3269
+ var children = _ref2.children,
3270
+ visible = _ref2.visible,
3271
+ style = _ref2.style,
3272
+ onClose = _ref2.onClose;
3273
+ return /*#__PURE__*/jsx(OnCloseProvider, {
3274
+ onClose: onClose,
3275
+ children: /*#__PURE__*/jsx(ModalBehaviourPortal, {
3276
+ visible: visible,
3277
+ children: visible ? /*#__PURE__*/jsx(ModalBehaviourContainer, {
3278
+ style: style,
3279
+ children: children
3280
+ }) : null
3281
+ })
3282
+ });
3283
+ }
3284
+ ModalBehaviour.CloseButton = CloseButton;
3285
+
3208
3286
  var createKittSpaces = function (spacing) {
3209
3287
  var sizes = {};
3210
3288
 
@@ -3213,8 +3291,13 @@ var createKittSpaces = function (spacing) {
3213
3291
  }
3214
3292
 
3215
3293
  return sizes;
3216
- }; // eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types, @typescript-eslint/explicit-function-return-type -- let typescript infer types
3294
+ }; // reset native-base to be able to set size / space as a number
3295
+ // https://docs.nativebase.io/next/default-theme#h2-size
3296
+
3217
3297
 
3298
+ var overridenNativeBaseSizeandSpaceScale = Object.fromEntries([1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 12, 16, 20, 24, 32, 40, 48, 56, 64, 72, 80, 96, 0.5, 1.5, 2.5, 3.5].map(function (value) {
3299
+ return [value, value];
3300
+ })); // eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types, @typescript-eslint/explicit-function-return-type -- let typescript infer types
3218
3301
 
3219
3302
  var createKittNativeBaseCustomTheme = function (theme) {
3220
3303
  var spaces = createKittSpaces(theme.spacing);
@@ -3227,10 +3310,8 @@ var createKittNativeBaseCustomTheme = function (theme) {
3227
3310
  radii: {
3228
3311
  'kitt.borderRadius': theme.card.borderRadius
3229
3312
  },
3230
- sizes: _objectSpread(_objectSpread({}, spaces), Object.fromEntries([1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 12, 16, 20, 24, 32, 40, 48, 56, 64, 78, 80, 96, 0.5, 1.5, 2.5, 3.5].map(function (value) {
3231
- return [value, value];
3232
- }))),
3233
- space: spaces,
3313
+ sizes: _objectSpread(_objectSpread({}, spaces), overridenNativeBaseSizeandSpaceScale),
3314
+ space: _objectSpread(_objectSpread({}, spaces), overridenNativeBaseSizeandSpaceScale),
3234
3315
  breakpoints: {
3235
3316
  // kitt breakpoints
3236
3317
  base: KittBreakpoints.BASE,
@@ -3353,6 +3434,234 @@ var View = View$2;
3353
3434
  var ScrollView = ScrollView$2;
3354
3435
  var Pressable = Pressable$2;
3355
3436
 
3437
+ var _excluded$4 = ["children"];
3438
+ var ViewWithPadding = /*#__PURE__*/styled(View$1).withConfig({
3439
+ displayName: "ContentPadding__ViewWithPadding",
3440
+ componentId: "kitt-universal__sc-1rprqcv-0"
3441
+ })(["padding:", ";"], function (_ref) {
3442
+ var theme = _ref.theme;
3443
+ return "0 ".concat(theme.kitt.navigationModal.padding, "px");
3444
+ });
3445
+ function ContentPadding(_ref2) {
3446
+ var children = _ref2.children,
3447
+ props = _objectWithoutProperties(_ref2, _excluded$4);
3448
+
3449
+ return /*#__PURE__*/jsx(ViewWithPadding, _objectSpread(_objectSpread({}, props), {}, {
3450
+ children: children
3451
+ }));
3452
+ }
3453
+
3454
+ var _excluded$3 = ["children", "shouldHandleBottomNotch", "style"];
3455
+ var StyledViewWithPadding = /*#__PURE__*/styled(ContentPadding).withConfig({
3456
+ displayName: "Body__StyledViewWithPadding",
3457
+ componentId: "kitt-universal__sc-oc39vn-0"
3458
+ })(["padding-top:", "px;padding-bottom:", "px;"], function (_ref) {
3459
+ var theme = _ref.theme;
3460
+ return theme.kitt.spacing * 6;
3461
+ }, function (_ref2) {
3462
+ var theme = _ref2.theme,
3463
+ $insetBottom = _ref2.$insetBottom;
3464
+ return Math.max(theme.kitt.spacing * 4, $insetBottom);
3465
+ });
3466
+ function Body(_ref3) {
3467
+ var children = _ref3.children,
3468
+ shouldHandleBottomNotch = _ref3.shouldHandleBottomNotch,
3469
+ style = _ref3.style,
3470
+ props = _objectWithoutProperties(_ref3, _excluded$3);
3471
+
3472
+ var _useSafeAreaInsets = useSafeAreaInsets(),
3473
+ bottom = _useSafeAreaInsets.bottom;
3474
+
3475
+ var insetBottom = shouldHandleBottomNotch ? bottom : 0;
3476
+ return /*#__PURE__*/jsx(StyledViewWithPadding, _objectSpread(_objectSpread({}, props), {}, {
3477
+ $insetBottom: insetBottom,
3478
+ style: style,
3479
+ children: children
3480
+ }));
3481
+ }
3482
+
3483
+ var FooterContainer = /*#__PURE__*/styled(ContentPadding).withConfig({
3484
+ displayName: "Footer__FooterContainer",
3485
+ componentId: "kitt-universal__sc-1yjprfg-0"
3486
+ })(["padding-top:", "px;padding-bottom:", "px;", ";"], function (_ref) {
3487
+ var theme = _ref.theme;
3488
+ return theme.kitt.spacing * 3;
3489
+ }, function (_ref2) {
3490
+ var theme = _ref2.theme,
3491
+ $insetBottom = _ref2.$insetBottom;
3492
+ return Math.max(theme.kitt.spacing * 3, $insetBottom);
3493
+ }, function (_ref3) {
3494
+ var $hasSeparator = _ref3.$hasSeparator;
3495
+ if (!$hasSeparator) return undefined;
3496
+ return css(["border-top-width:1px;border-top-color:", ";"], function (_ref4) {
3497
+ var theme = _ref4.theme;
3498
+ return theme.kitt.colors.separator;
3499
+ });
3500
+ });
3501
+ function Footer(_ref5) {
3502
+ var _ref5$shouldHandleBot = _ref5.shouldHandleBottomNotch,
3503
+ shouldHandleBottomNotch = _ref5$shouldHandleBot === void 0 ? true : _ref5$shouldHandleBot,
3504
+ _ref5$hasSeparator = _ref5.hasSeparator,
3505
+ hasSeparator = _ref5$hasSeparator === void 0 ? true : _ref5$hasSeparator,
3506
+ children = _ref5.children,
3507
+ style = _ref5.style;
3508
+
3509
+ var _useSafeAreaInsets = useSafeAreaInsets(),
3510
+ bottom = _useSafeAreaInsets.bottom;
3511
+
3512
+ var insetBottom = shouldHandleBottomNotch ? bottom : 0;
3513
+ return /*#__PURE__*/jsx(FooterContainer, {
3514
+ $insetBottom: insetBottom,
3515
+ $hasSeparator: hasSeparator,
3516
+ style: style,
3517
+ children: children
3518
+ });
3519
+ }
3520
+
3521
+ var HeaderContainer = /*#__PURE__*/styled(ContentPadding).withConfig({
3522
+ displayName: "Header__HeaderContainer",
3523
+ componentId: "kitt-universal__sc-1g7sbq-0"
3524
+ })(["height:", "px;width:100%;justify-content:center;background-color:", ";padding-right:", "px;padding-left:", "px;", ";"], function (_ref) {
3525
+ var theme = _ref.theme;
3526
+ return theme.kitt.navigationModal.height;
3527
+ }, function (_ref2) {
3528
+ var theme = _ref2.theme,
3529
+ $isTransparent = _ref2.$isTransparent;
3530
+ if ($isTransparent) return 'transparent';
3531
+ return theme.kitt.colors.uiBackgroundLight;
3532
+ }, function (_ref3) {
3533
+ var theme = _ref3.theme,
3534
+ $hasRight = _ref3.$hasRight;
3535
+ return $hasRight ? theme.kitt.spacing * 2 : theme.kitt.navigationModal.padding;
3536
+ }, function (_ref4) {
3537
+ var theme = _ref4.theme,
3538
+ $hasLeft = _ref4.$hasLeft;
3539
+ return $hasLeft ? theme.kitt.spacing * 2 : theme.kitt.navigationModal.padding;
3540
+ }, function (_ref5) {
3541
+ var $hasSeparator = _ref5.$hasSeparator;
3542
+ if (!$hasSeparator) return undefined;
3543
+ return css(["border-bottom-width:1px;border-bottom-color:", ";"], function (_ref6) {
3544
+ var theme = _ref6.theme;
3545
+ return theme.kitt.colors.separator;
3546
+ });
3547
+ });
3548
+ var Row = /*#__PURE__*/styled(View$1).withConfig({
3549
+ displayName: "Header__Row",
3550
+ componentId: "kitt-universal__sc-1g7sbq-1"
3551
+ })(["flex-direction:row;justify-content:", ";align-items:center;"], function (_ref7) {
3552
+ var $hasContent = _ref7.$hasContent,
3553
+ $hasLeft = _ref7.$hasLeft;
3554
+ return !$hasContent && !$hasLeft ? 'flex-end' : 'space-between';
3555
+ });
3556
+ var ButtonContainer = /*#__PURE__*/styled(View$1).withConfig({
3557
+ displayName: "Header__ButtonContainer",
3558
+ componentId: "kitt-universal__sc-1g7sbq-2"
3559
+ })(["width:", "px;"], function (_ref8) {
3560
+ var theme = _ref8.theme;
3561
+ return theme.kitt.iconButton.width;
3562
+ });
3563
+ var ChildrenComponent = /*#__PURE__*/styled(View$1).withConfig({
3564
+ displayName: "Header__ChildrenComponent",
3565
+ componentId: "kitt-universal__sc-1g7sbq-3"
3566
+ })(["flex:1;align-items:center;", ";"], function (_ref9) {
3567
+ var theme = _ref9.theme,
3568
+ $hasLeft = _ref9.$hasLeft,
3569
+ $hasRight = _ref9.$hasRight;
3570
+ var paddingHorizontal = theme.kitt.spacing * 2;
3571
+ return css(["padding-right:", "px;padding-left:", "px;"], $hasRight ? paddingHorizontal : 0, $hasLeft ? paddingHorizontal : 0);
3572
+ });
3573
+ var HeaderTitle = /*#__PURE__*/styled(Typography.Text).withConfig({
3574
+ displayName: "Header__HeaderTitle",
3575
+ componentId: "kitt-universal__sc-1g7sbq-4"
3576
+ })(["flex:1;text-align:", ";", ";"], function (_ref10) {
3577
+ var $hasLeft = _ref10.$hasLeft,
3578
+ $hasRight = _ref10.$hasRight;
3579
+ if (!$hasLeft && $hasRight) return 'left';
3580
+ return 'center';
3581
+ }, function (_ref11) {
3582
+ var theme = _ref11.theme,
3583
+ $hasLeft = _ref11.$hasLeft,
3584
+ $hasRight = _ref11.$hasRight;
3585
+ var paddingHorizontal = theme.kitt.spacing * 2;
3586
+ return css(["padding-right:", "px;padding-left:", "px;"], $hasRight ? paddingHorizontal : 0, $hasLeft ? paddingHorizontal : 0);
3587
+ });
3588
+ function Header(_ref12) {
3589
+ var _ref12$hasSeparator = _ref12.hasSeparator,
3590
+ hasSeparator = _ref12$hasSeparator === void 0 ? true : _ref12$hasSeparator,
3591
+ isTransparent = _ref12.isTransparent,
3592
+ title = _ref12.title,
3593
+ children = _ref12.children,
3594
+ right = _ref12.right,
3595
+ left = _ref12.left,
3596
+ style = _ref12.style;
3597
+ var sharedProps = {
3598
+ $hasLeft: Boolean(left),
3599
+ $hasRight: Boolean(right)
3600
+ };
3601
+ return /*#__PURE__*/jsx(HeaderContainer, {
3602
+ $isTransparent: isTransparent,
3603
+ $hasSeparator: hasSeparator,
3604
+ $hasLeft: Boolean(left),
3605
+ $hasRight: Boolean(right),
3606
+ style: style,
3607
+ children: /*#__PURE__*/jsxs(Row, _objectSpread(_objectSpread({
3608
+ $hasContent: Boolean(title || children)
3609
+ }, sharedProps), {}, {
3610
+ children: [left ? /*#__PURE__*/jsx(ButtonContainer, {
3611
+ children: left
3612
+ }) : null, title ? /*#__PURE__*/jsx(HeaderTitle, _objectSpread(_objectSpread({}, sharedProps), {}, {
3613
+ variant: "bold",
3614
+ children: title
3615
+ })) : null, children ? /*#__PURE__*/jsx(ChildrenComponent, _objectSpread(_objectSpread({}, sharedProps), {}, {
3616
+ children: children
3617
+ })) : null, right || left ? /*#__PURE__*/jsx(ButtonContainer, {
3618
+ children: right
3619
+ }) : null]
3620
+ }))
3621
+ });
3622
+ }
3623
+
3624
+ var NavigationModalContainer = /*#__PURE__*/styled(View$1).withConfig({
3625
+ displayName: "NavigationModalContainer",
3626
+ componentId: "kitt-universal__sc-n0bwvk-0"
3627
+ })(["position:relative;background-color:", ";flex:1;", ""], function (_ref) {
3628
+ var theme = _ref.theme,
3629
+ $backgroundColor = _ref.$backgroundColor;
3630
+ return $backgroundColor || theme.kitt.colors.uiBackgroundLight;
3631
+ }, function () {
3632
+ return css(["min-height:100vh;"]);
3633
+ });
3634
+
3635
+ var ContainerWithoutHeader = /*#__PURE__*/styled(View$1).withConfig({
3636
+ displayName: "NavigationModal__ContainerWithoutHeader",
3637
+ componentId: "kitt-universal__sc-ls8t24-0"
3638
+ })(["justify-content:space-between;flex:1;"]);
3639
+ function NavigationModal(_ref) {
3640
+ var body = _ref.body,
3641
+ header = _ref.header,
3642
+ footer = _ref.footer,
3643
+ backgroundColor = _ref.backgroundColor;
3644
+ return /*#__PURE__*/jsxs(NavigationModalContainer, {
3645
+ $backgroundColor: backgroundColor,
3646
+ children: [header ? /*#__PURE__*/jsx(View$1, {
3647
+ children: header
3648
+ }) : null, /*#__PURE__*/jsxs(ContainerWithoutHeader, {
3649
+ children: [/*#__PURE__*/jsx(ScrollView$1, {
3650
+ bounces: false,
3651
+ contentContainerStyle: {
3652
+ flexGrow: 1,
3653
+ position: 'relative'
3654
+ },
3655
+ children: body
3656
+ }), footer || null]
3657
+ })]
3658
+ });
3659
+ }
3660
+ NavigationModal.Header = Header;
3661
+ NavigationModal.Footer = Footer;
3662
+ NavigationModal.Body = Body;
3663
+ NavigationModal.Padding = ContentPadding;
3664
+
3356
3665
  function Notification(_ref) {
3357
3666
  var type = _ref.type,
3358
3667
  children = _ref.children,
@@ -4388,5 +4697,5 @@ function MatchWindowSize(_ref) {
4388
4697
  return children;
4389
4698
  }
4390
4699
 
4391
- export { Avatar, Button, Card, Checkbox, DatePicker, Emoji, ExternalAppLink, ExternalLink, Flex, FullScreenModal, HStack, Icon, IconButton, InputEmail, InputFeedback, InputField, InputIcon, InputPassword, InputPhone, InputPressable, InputTag, InputText, KittBreakpoints, KittBreakpointsMax, KittNativeBaseProvider, KittThemeDecorator, KittThemeProvider, Label, ListItem, LoaderIcon, MatchWindowSize, Message, Modal, Notification, Overlay, PageLoader, Picker, Pressable, Radio, ScrollView, DeprecatedSection as Section, Skeleton, SpinningIcon, Stack, Story, StoryBlock, StoryContainer, StoryDecorator, StoryGrid, StorySection, StoryTitle, StyleWebWrapper, Tag, TextArea, TimePicker, Tooltip, Typography, TypographyEmoji, TypographyIcon, TypographyLink, VStack, View, createWindowSizeHelper, hex2rgba, matchWindowSize, styledTextInputMixin, theme, useKittTheme, useMatchWindowSize, useStoryBlockColor, withTheme };
4700
+ export { Avatar, Button, Card, Checkbox, DatePicker, Emoji, ExternalAppLink, ExternalLink, Flex, FullScreenModal, HStack, Icon, IconButton, InputEmail, InputFeedback, InputField, InputIcon, InputPassword, InputPhone, InputPressable, InputTag, InputText, KittBreakpoints, KittBreakpointsMax, KittNativeBaseProvider, KittThemeDecorator, KittThemeProvider, Label, ListItem, LoaderIcon, MatchWindowSize, Message, Modal, ModalBehaviour, NavigationModal, Notification, Overlay, PageLoader, Picker, Pressable, Radio, ScrollView, DeprecatedSection as Section, Skeleton, SpinningIcon, Stack, Story, StoryBlock, StoryContainer, StoryDecorator, StoryGrid, StorySection, StoryTitle, StyleWebWrapper, Tag, TextArea, TimePicker, Tooltip, Typography, TypographyEmoji, TypographyIcon, TypographyLink, VStack, View, createWindowSizeHelper, hex2rgba, matchWindowSize, styledTextInputMixin, theme, useKittTheme, useMatchWindowSize, useStoryBlockColor, withTheme };
4392
4701
  //# sourceMappingURL=index-browser-all.es.web.js.map