@ornikar/kitt-universal 9.30.2 → 9.32.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 (92) 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/forms/DatePicker/DatePicker.d.ts +36 -2
  11. package/dist/definitions/forms/DatePicker/DatePicker.d.ts.map +1 -1
  12. package/dist/definitions/forms/DatePicker/DatePicker.web.d.ts +2 -2
  13. package/dist/definitions/forms/DatePicker/DatePicker.web.d.ts.map +1 -1
  14. package/dist/definitions/forms/DatePicker/components/DatePickerInputs.d.ts +25 -0
  15. package/dist/definitions/forms/DatePicker/components/DatePickerInputs.d.ts.map +1 -0
  16. package/dist/definitions/forms/DatePicker/components/InputPart.d.ts +16 -0
  17. package/dist/definitions/forms/DatePicker/components/InputPart.d.ts.map +1 -0
  18. package/dist/definitions/forms/DatePicker/components/KeyboardDatePicker.d.ts +7 -0
  19. package/dist/definitions/forms/DatePicker/components/KeyboardDatePicker.d.ts.map +1 -0
  20. package/dist/definitions/forms/DatePicker/components/NativeUIDatePicker/DatePickerAndroid.d.ts +8 -0
  21. package/dist/definitions/forms/DatePicker/components/NativeUIDatePicker/DatePickerAndroid.d.ts.map +1 -0
  22. package/dist/definitions/forms/DatePicker/components/NativeUIDatePicker/DefaultNativeUIDatePicker.d.ts +4 -0
  23. package/dist/definitions/forms/DatePicker/components/NativeUIDatePicker/DefaultNativeUIDatePicker.d.ts.map +1 -0
  24. package/dist/definitions/forms/DatePicker/{ModalPlatformDateTimePicker.d.ts → components/NativeUIDatePicker/ModalPlatformDateTimePicker.d.ts} +0 -0
  25. package/dist/definitions/forms/DatePicker/components/NativeUIDatePicker/ModalPlatformDateTimePicker.d.ts.map +1 -0
  26. package/dist/definitions/forms/DatePicker/components/NativeUIDatePicker/NativeUIDatePicker.d.ts +7 -0
  27. package/dist/definitions/forms/DatePicker/components/NativeUIDatePicker/NativeUIDatePicker.d.ts.map +1 -0
  28. package/dist/definitions/forms/DatePicker/{PlatformDateTimePicker.d.ts → components/NativeUIDatePicker/PlatformDateTimePicker.d.ts} +0 -0
  29. package/dist/definitions/forms/DatePicker/components/NativeUIDatePicker/PlatformDateTimePicker.d.ts.map +1 -0
  30. package/dist/definitions/forms/DatePicker/components/PartContainer.d.ts +10 -0
  31. package/dist/definitions/forms/DatePicker/components/PartContainer.d.ts.map +1 -0
  32. package/dist/definitions/forms/DatePicker/reducers/keyboardDatePickerReducer.d.ts +41 -0
  33. package/dist/definitions/forms/DatePicker/reducers/keyboardDatePickerReducer.d.ts.map +1 -0
  34. package/dist/definitions/forms/DatePicker/utils/dateFormatter.d.ts +4 -0
  35. package/dist/definitions/forms/DatePicker/utils/dateFormatter.d.ts.map +1 -0
  36. package/dist/definitions/forms/DatePicker/utils/datePartInInterval.d.ts +4 -0
  37. package/dist/definitions/forms/DatePicker/utils/datePartInInterval.d.ts.map +1 -0
  38. package/dist/definitions/forms/DatePicker/utils/isNumber.d.ts +2 -0
  39. package/dist/definitions/forms/DatePicker/utils/isNumber.d.ts.map +1 -0
  40. package/dist/definitions/forms/DatePicker/utils/onDatePartChange.d.ts +11 -0
  41. package/dist/definitions/forms/DatePicker/utils/onDatePartChange.d.ts.map +1 -0
  42. package/dist/definitions/forms/DatePicker/utils/stringToNumber.d.ts +2 -0
  43. package/dist/definitions/forms/DatePicker/utils/stringToNumber.d.ts.map +1 -0
  44. package/dist/definitions/forms/InputText/InputText.d.ts +4 -1
  45. package/dist/definitions/forms/InputText/InputText.d.ts.map +1 -1
  46. package/dist/definitions/forms/InputText/InputTextContainer.web.d.ts +1 -1
  47. package/dist/definitions/forms/utils.d.ts +0 -8
  48. package/dist/definitions/forms/utils.d.ts.map +1 -1
  49. package/dist/definitions/index.d.ts +1 -1
  50. package/dist/definitions/index.d.ts.map +1 -1
  51. package/dist/definitions/native-base/KittNativeBaseProvider.d.ts +25 -0
  52. package/dist/definitions/native-base/KittNativeBaseProvider.d.ts.map +1 -1
  53. package/dist/definitions/themes/default.d.ts +1 -0
  54. package/dist/definitions/themes/default.d.ts.map +1 -1
  55. package/dist/definitions/themes/palettes/lateOceanColorPalette.d.ts +1 -0
  56. package/dist/definitions/themes/palettes/lateOceanColorPalette.d.ts.map +1 -1
  57. package/dist/index-browser-all.es.android.js +701 -319
  58. package/dist/index-browser-all.es.android.js.map +1 -1
  59. package/dist/index-browser-all.es.ios.js +701 -319
  60. package/dist/index-browser-all.es.ios.js.map +1 -1
  61. package/dist/index-browser-all.es.js +701 -319
  62. package/dist/index-browser-all.es.js.map +1 -1
  63. package/dist/index-browser-all.es.web.js +437 -203
  64. package/dist/index-browser-all.es.web.js.map +1 -1
  65. package/dist/index-node-14.17.cjs.js +616 -231
  66. package/dist/index-node-14.17.cjs.js.map +1 -1
  67. package/dist/index-node-14.17.cjs.web.js +416 -171
  68. package/dist/index-node-14.17.cjs.web.js.map +1 -1
  69. package/dist/linaria-themes-browser-all.es.android.js +1 -0
  70. package/dist/linaria-themes-browser-all.es.android.js.map +1 -1
  71. package/dist/linaria-themes-browser-all.es.ios.js +1 -0
  72. package/dist/linaria-themes-browser-all.es.ios.js.map +1 -1
  73. package/dist/linaria-themes-browser-all.es.js +1 -0
  74. package/dist/linaria-themes-browser-all.es.js.map +1 -1
  75. package/dist/linaria-themes-browser-all.es.web.js +1 -0
  76. package/dist/linaria-themes-browser-all.es.web.js.map +1 -1
  77. package/dist/linaria-themes-node-14.17.cjs.js +1 -0
  78. package/dist/linaria-themes-node-14.17.cjs.js.map +1 -1
  79. package/dist/linaria-themes-node-14.17.cjs.web.js +1 -0
  80. package/dist/linaria-themes-node-14.17.cjs.web.js.map +1 -1
  81. package/dist/tsbuildinfo +1 -1
  82. package/package.json +2 -2
  83. package/dist/definitions/forms/DatePicker/DatePickerAndroid.d.ts +0 -12
  84. package/dist/definitions/forms/DatePicker/DatePickerAndroid.d.ts.map +0 -1
  85. package/dist/definitions/forms/DatePicker/DatePickerInputPart.d.ts +0 -11
  86. package/dist/definitions/forms/DatePicker/DatePickerInputPart.d.ts.map +0 -1
  87. package/dist/definitions/forms/DatePicker/DatePickerInputs.d.ts +0 -9
  88. package/dist/definitions/forms/DatePicker/DatePickerInputs.d.ts.map +0 -1
  89. package/dist/definitions/forms/DatePicker/ModalPlatformDateTimePicker.d.ts.map +0 -1
  90. package/dist/definitions/forms/DatePicker/PlatformDateTimePicker.d.ts.map +0 -1
  91. package/dist/definitions/forms/DatePicker/types.d.ts +0 -35
  92. package/dist/definitions/forms/DatePicker/types.d.ts.map +0 -1
@@ -4,7 +4,7 @@ import { Stack as Stack$1, VStack as VStack$1, HStack as HStack$1, Center as Cen
4
4
  export { useBreakpointValue, useClipboard, useToken } from 'native-base';
5
5
  import _objectDestructuringEmpty from '@babel/runtime/helpers/objectDestructuringEmpty';
6
6
  import _extends from '@babel/runtime/helpers/extends';
7
- import React, { useContext, createContext, cloneElement, forwardRef, useRef, useEffect, useState, useMemo, Children, Fragment as Fragment$1, useCallback } from 'react';
7
+ import React, { useContext, createContext, cloneElement, forwardRef, useRef, useEffect, useState, useMemo, Children, useReducer, Fragment as Fragment$1, useCallback } from 'react';
8
8
  import Animated, { withSpring, useSharedValue, useAnimatedStyle, interpolateColor, withTiming, Easing as Easing$1, runOnJS, useDerivedValue, useAnimatedProps, withDelay, withRepeat, interpolate } from 'react-native-reanimated';
9
9
  import styled, { useTheme, css, withTheme as withTheme$1, ThemeProvider } from 'styled-components/native';
10
10
  import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
@@ -139,7 +139,7 @@ var KittBreakpointNameEnum;
139
139
  KittBreakpointNameEnum["WIDE"] = "wide";
140
140
  })(KittBreakpointNameEnum || (KittBreakpointNameEnum = {}));
141
141
 
142
- var _excluded$y = ["accessibilityRole", "base", "small", "medium", "large", "wide", "type", "variant", "color"];
142
+ var _excluded$B = ["accessibilityRole", "base", "small", "medium", "large", "wide", "type", "variant", "color"];
143
143
  var IsHeaderTypographyContext = /*#__PURE__*/createContext(undefined);
144
144
  var TypographyColorContext = /*#__PURE__*/createContext('black');
145
145
  function useTypographyColor() {
@@ -202,7 +202,7 @@ function Typography(_ref) {
202
202
  } : _ref$type,
203
203
  variant = _ref.variant,
204
204
  color = _ref.color,
205
- otherProps = _objectWithoutProperties(_ref, _excluded$y);
205
+ otherProps = _objectWithoutProperties(_ref, _excluded$B);
206
206
  var isHeaderTypographyInContext = useContext(IsHeaderTypographyContext);
207
207
  var defaultColor = useTypographyDefaultColor();
208
208
  var hasTypographyAncestor = isHeaderTypographyInContext !== undefined;
@@ -320,11 +320,11 @@ function Icon(_ref5) {
320
320
  });
321
321
  }
322
322
 
323
- var _excluded$x = ["color"],
323
+ var _excluded$A = ["color"],
324
324
  _excluded2$5 = ["color"];
325
325
  function TypographyIconSpecifiedColor(_ref) {
326
326
  var color = _ref.color,
327
- props = _objectWithoutProperties(_ref, _excluded$x);
327
+ props = _objectWithoutProperties(_ref, _excluded$A);
328
328
  var theme = /*#__PURE__*/useTheme();
329
329
  return /*#__PURE__*/jsx(Icon, _objectSpread(_objectSpread({}, props), {}, {
330
330
  color: color === 'inherit' ? 'inherit' : theme.kitt.typography.colors[color]
@@ -365,7 +365,7 @@ var getTextColorByType = function (type, variant, isHovered, isPressed) {
365
365
  }
366
366
  };
367
367
 
368
- var _excluded$w = ["type", "variant", "isDisabled", "icon", "children", "isHovered", "isPressed", "isFocused"];
368
+ var _excluded$z = ["type", "variant", "isDisabled", "icon", "children", "isHovered", "isPressed", "isFocused"];
369
369
  function ButtonIcon(_ref) {
370
370
  var icon = _ref.icon,
371
371
  color = _ref.color,
@@ -440,7 +440,7 @@ function ButtonContent(_ref3) {
440
440
  isHovered = _ref3.isHovered,
441
441
  isPressed = _ref3.isPressed;
442
442
  _ref3.isFocused;
443
- var props = _objectWithoutProperties(_ref3, _excluded$w);
443
+ var props = _objectWithoutProperties(_ref3, _excluded$z);
444
444
  var color = isDisabled ? 'black-light' : getTextColorByType(type, variant, isHovered, isPressed);
445
445
  return /*#__PURE__*/jsx(View, {
446
446
  _web: {
@@ -773,7 +773,7 @@ function useMatchWindowSize(options) {
773
773
  }, options);
774
774
  }
775
775
 
776
- var _excluded$v = ["as", "onPress", "disabled", "icon", "stretch"];
776
+ var _excluded$y = ["as", "onPress", "disabled", "icon", "stretch"];
777
777
  function getCurrentStretchValue(isStretch, isMedium) {
778
778
  // Stretch will follow the value passed from the component occurence if defined
779
779
  if (isStretch) return isStretch;
@@ -785,7 +785,7 @@ function ActionsItem(_ref) {
785
785
  disabled = _ref.disabled,
786
786
  icon = _ref.icon,
787
787
  stretch = _ref.stretch,
788
- props = _objectWithoutProperties(_ref, _excluded$v);
788
+ props = _objectWithoutProperties(_ref, _excluded$y);
789
789
  var isMedium = useMatchWindowSize({
790
790
  minWidth: KittBreakpoints.MEDIUM
791
791
  });
@@ -862,7 +862,7 @@ function ActionsButton(_ref) {
862
862
  }, props));
863
863
  }
864
864
 
865
- var _excluded$u = ["children", "layout"];
865
+ var _excluded$x = ["children", "layout"];
866
866
  function getCurrentLayout(layout) {
867
867
  if (!layout) return {
868
868
  base: 'stretch',
@@ -882,7 +882,7 @@ function getCurrentDirection(layout) {
882
882
  function Actions(_ref) {
883
883
  var children = _ref.children,
884
884
  layout = _ref.layout,
885
- props = _objectWithoutProperties(_ref, _excluded$u);
885
+ props = _objectWithoutProperties(_ref, _excluded$x);
886
886
  var currentAlignItems = getCurrentLayout(layout);
887
887
  var currentDirection = getCurrentDirection(layout);
888
888
  return /*#__PURE__*/jsx(Stack, _objectSpread(_objectSpread({
@@ -917,6 +917,7 @@ var lateOceanColorPalette = {
917
917
  englishVermillon: '#D44148',
918
918
  goldCrayola: '#F8C583',
919
919
  aero: '#89BDDD',
920
+ seaShell: '#FFF9F3',
920
921
  transparent: 'transparent',
921
922
  moonPurple: '#DBD6F9',
922
923
  moonPurpleLight1: '#EDEBFC'
@@ -1001,7 +1002,7 @@ function getInitials(firstname, lastname) {
1001
1002
  return "".concat(firstname[0]).concat(lastname[0]).toUpperCase();
1002
1003
  }
1003
1004
 
1004
- var _excluded$t = ["size", "round", "light", "sizeVariant"];
1005
+ var _excluded$w = ["size", "round", "light", "sizeVariant"];
1005
1006
  function AvatarContent(_ref) {
1006
1007
  var size = _ref.size,
1007
1008
  src = _ref.src,
@@ -1040,7 +1041,7 @@ function Avatar(_ref2) {
1040
1041
  round = _ref2.round,
1041
1042
  light = _ref2.light,
1042
1043
  sizeVariant = _ref2.sizeVariant,
1043
- props = _objectWithoutProperties(_ref2, _excluded$t);
1044
+ props = _objectWithoutProperties(_ref2, _excluded$w);
1044
1045
  var currentSize = getCurrentSize({
1045
1046
  size: size,
1046
1047
  sizeVariant: sizeVariant
@@ -1457,11 +1458,11 @@ function CardModalAnimation(_ref) {
1457
1458
  });
1458
1459
  }
1459
1460
 
1460
- var _excluded$s = ["children"],
1461
+ var _excluded$v = ["children"],
1461
1462
  _excluded2$4 = ["children", "visible", "onClose", "onExited"];
1462
1463
  function ScrollContainer(_ref) {
1463
1464
  var children = _ref.children,
1464
- props = _objectWithoutProperties(_ref, _excluded$s);
1465
+ props = _objectWithoutProperties(_ref, _excluded$v);
1465
1466
  if (Platform.OS !== 'web') {
1466
1467
  return /*#__PURE__*/jsx(View, {
1467
1468
  children: children
@@ -1507,7 +1508,7 @@ function CardModalBehaviour(_ref2) {
1507
1508
  });
1508
1509
  }
1509
1510
 
1510
- var _excluded$r = ["children", "paddingX", "paddingY"];
1511
+ var _excluded$u = ["children", "paddingX", "paddingY"];
1511
1512
  function CardModalBody(_ref) {
1512
1513
  var children = _ref.children,
1513
1514
  _ref$paddingX = _ref.paddingX,
@@ -1517,7 +1518,7 @@ function CardModalBody(_ref) {
1517
1518
  } : _ref$paddingX,
1518
1519
  _ref$paddingY = _ref.paddingY,
1519
1520
  paddingY = _ref$paddingY === void 0 ? 'kitt.4' : _ref$paddingY,
1520
- props = _objectWithoutProperties(_ref, _excluded$r);
1521
+ props = _objectWithoutProperties(_ref, _excluded$u);
1521
1522
  return /*#__PURE__*/jsx(View, _objectSpread(_objectSpread({
1522
1523
  paddingX: paddingX,
1523
1524
  paddingY: paddingY
@@ -1526,7 +1527,7 @@ function CardModalBody(_ref) {
1526
1527
  }));
1527
1528
  }
1528
1529
 
1529
- var _excluded$q = ["children", "padding", "hasSeparator"];
1530
+ var _excluded$t = ["children", "padding", "hasSeparator"];
1530
1531
  function CardModalFooter(_ref) {
1531
1532
  var children = _ref.children,
1532
1533
  _ref$padding = _ref.padding,
@@ -1536,7 +1537,7 @@ function CardModalFooter(_ref) {
1536
1537
  } : _ref$padding,
1537
1538
  _ref$hasSeparator = _ref.hasSeparator,
1538
1539
  hasSeparator = _ref$hasSeparator === void 0 ? true : _ref$hasSeparator,
1539
- props = _objectWithoutProperties(_ref, _excluded$q);
1540
+ props = _objectWithoutProperties(_ref, _excluded$t);
1540
1541
  return /*#__PURE__*/jsx(View, _objectSpread(_objectSpread({}, props), {}, {
1541
1542
  marginTop: "kitt.2",
1542
1543
  padding: padding,
@@ -1550,7 +1551,7 @@ function CardModalFooter(_ref) {
1550
1551
  }));
1551
1552
  }
1552
1553
 
1553
- var _excluded$p = ["children", "title", "paddingBottom", "hasSeparator", "right", "left"];
1554
+ var _excluded$s = ["children", "title", "paddingBottom", "hasSeparator", "right", "left"];
1554
1555
  function CardModalHeader(_ref) {
1555
1556
  var children = _ref.children,
1556
1557
  title = _ref.title,
@@ -1563,7 +1564,7 @@ function CardModalHeader(_ref) {
1563
1564
  hasSeparator = _ref$hasSeparator === void 0 ? true : _ref$hasSeparator,
1564
1565
  right = _ref.right,
1565
1566
  left = _ref.left,
1566
- props = _objectWithoutProperties(_ref, _excluded$p);
1567
+ props = _objectWithoutProperties(_ref, _excluded$s);
1567
1568
  var defaultContainerPadding = {
1568
1569
  base: 'kitt.4',
1569
1570
  medium: 'kitt.6'
@@ -1601,7 +1602,7 @@ function CardModalHeader(_ref) {
1601
1602
  }));
1602
1603
  }
1603
1604
 
1604
- var _excluded$o = ["children", "backgroundColor", "maxWidth", "withoutShadow"];
1605
+ var _excluded$r = ["children", "backgroundColor", "maxWidth", "withoutShadow"];
1605
1606
  function CardModal(_ref) {
1606
1607
  var children = _ref.children,
1607
1608
  _ref$backgroundColor = _ref.backgroundColor,
@@ -1609,7 +1610,7 @@ function CardModal(_ref) {
1609
1610
  _ref$maxWidth = _ref.maxWidth,
1610
1611
  maxWidth = _ref$maxWidth === void 0 ? 'kitt.cardModal.maxWidth' : _ref$maxWidth,
1611
1612
  withoutShadow = _ref.withoutShadow,
1612
- props = _objectWithoutProperties(_ref, _excluded$o);
1613
+ props = _objectWithoutProperties(_ref, _excluded$r);
1613
1614
  return /*#__PURE__*/jsx(View, _objectSpread(_objectSpread({}, props), {}, {
1614
1615
  overflow: "hidden",
1615
1616
  backgroundColor: backgroundColor,
@@ -1873,10 +1874,10 @@ var ChoiceItemContainer = /*#__PURE__*/styled(View$2).withConfig({
1873
1874
  return css(["margin-bottom:", "px;"], $isLast ? 0 : column);
1874
1875
  });
1875
1876
 
1876
- var _excluded$n = ["direction"];
1877
+ var _excluded$q = ["direction"];
1877
1878
  function ChoicesContainer(_ref) {
1878
1879
  var direction = _ref.direction,
1879
- props = _objectWithoutProperties(_ref, _excluded$n);
1880
+ props = _objectWithoutProperties(_ref, _excluded$q);
1880
1881
  if (direction === 'row') {
1881
1882
  return /*#__PURE__*/jsx(ScrollView$2, _objectSpread({
1882
1883
  horizontal: true
@@ -2164,13 +2165,13 @@ function DialogModalAnimation(_ref) {
2164
2165
  });
2165
2166
  }
2166
2167
 
2167
- var _excluded$m = ["children", "visible", "onClose", "onExited"];
2168
+ var _excluded$p = ["children", "visible", "onClose", "onExited"];
2168
2169
  function DialogModalBehaviour(_ref) {
2169
2170
  var children = _ref.children,
2170
2171
  visible = _ref.visible,
2171
2172
  onClose = _ref.onClose,
2172
2173
  onExited = _ref.onExited,
2173
- props = _objectWithoutProperties(_ref, _excluded$m);
2174
+ props = _objectWithoutProperties(_ref, _excluded$p);
2174
2175
  var _useState = useState(visible),
2175
2176
  _useState2 = _slicedToArray(_useState, 2),
2176
2177
  isModalBehaviourVisible = _useState2[0],
@@ -2201,7 +2202,7 @@ function DialogModalBehaviour(_ref) {
2201
2202
  });
2202
2203
  }
2203
2204
 
2204
- var _excluded$l = ["stretch"];
2205
+ var _excluded$o = ["stretch"];
2205
2206
  function DialogModal(_ref) {
2206
2207
  var illustration = _ref.illustration,
2207
2208
  title = _ref.title,
@@ -2242,7 +2243,7 @@ DialogModal.ModalBehaviour = DialogModalBehaviour;
2242
2243
  function DialogModalButton(_ref2) {
2243
2244
  var _ref2$stretch = _ref2.stretch,
2244
2245
  stretch = _ref2$stretch === void 0 ? true : _ref2$stretch,
2245
- props = _objectWithoutProperties(_ref2, _excluded$l);
2246
+ props = _objectWithoutProperties(_ref2, _excluded$o);
2246
2247
  return /*#__PURE__*/jsx(Actions.Button, _objectSpread({
2247
2248
  stretch: stretch
2248
2249
  }, props));
@@ -2277,7 +2278,7 @@ function Emoji(_ref) {
2277
2278
  });
2278
2279
  }
2279
2280
 
2280
- var _excluded$k = ["as", "appScheme", "appValue", "onPress", "onOpenAppError"],
2281
+ var _excluded$n = ["as", "appScheme", "appValue", "onPress", "onOpenAppError"],
2281
2282
  _excluded2$3 = ["phoneNumber", "children"],
2282
2283
  _excluded3$2 = ["phoneNumber", "children"],
2283
2284
  _excluded4$1 = ["emailAddress", "children"];
@@ -2287,7 +2288,7 @@ function ExternalAppLink(_ref) {
2287
2288
  appValue = _ref.appValue,
2288
2289
  onPress = _ref.onPress,
2289
2290
  onOpenAppError = _ref.onOpenAppError,
2290
- rest = _objectWithoutProperties(_ref, _excluded$k);
2291
+ rest = _objectWithoutProperties(_ref, _excluded$n);
2291
2292
  var href = "".concat(appScheme, ":").concat(appValue);
2292
2293
  var handleOnPress = /*#__PURE__*/function () {
2293
2294
  var _ref2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(e) {
@@ -2384,14 +2385,14 @@ var defaultOpenLinkBehavior = {
2384
2385
  web: 'targetBlank'
2385
2386
  };
2386
2387
 
2387
- var _excluded$j = ["as", "href", "openLinkBehavior", "onPress"];
2388
+ var _excluded$m = ["as", "href", "openLinkBehavior", "onPress"];
2388
2389
  function ExternalLink(_ref) {
2389
2390
  var Component = _ref.as,
2390
2391
  href = _ref.href,
2391
2392
  _ref$openLinkBehavior = _ref.openLinkBehavior,
2392
2393
  openLinkBehavior = _ref$openLinkBehavior === void 0 ? defaultOpenLinkBehavior : _ref$openLinkBehavior,
2393
2394
  onPress = _ref.onPress,
2394
- rest = _objectWithoutProperties(_ref, _excluded$j);
2395
+ rest = _objectWithoutProperties(_ref, _excluded$m);
2395
2396
  return /*#__PURE__*/jsx(Component, _objectSpread(_objectSpread({}, rest), {}, {
2396
2397
  onPress: function handleOnPress(e) {
2397
2398
  if (onPress) {
@@ -3417,167 +3418,514 @@ function Checkbox(_ref6) {
3417
3418
  });
3418
3419
  }
3419
3420
 
3420
- /** @deprecated use native-base instead */
3421
- function getInputUIState(_ref) {
3422
- var isFocused = _ref.isFocused,
3423
- isDisabled = _ref.isDisabled,
3424
- formState = _ref.formState;
3425
- if (isDisabled) return 'disabled';
3426
- if (isFocused) return 'focus';
3427
- if (formState === 'invalid') return 'invalid';
3428
- return 'default';
3421
+ function prefixWithZero(value) {
3422
+ var maxLength = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 2;
3423
+ return "".concat(value).padStart(maxLength, '0');
3424
+ }
3425
+ function dayFormatter(day) {
3426
+ return prefixWithZero(day);
3427
+ }
3428
+ function monthFormatter(month) {
3429
+ return prefixWithZero(month);
3430
+ }
3431
+ function yearFormatter(year) {
3432
+ return prefixWithZero(year, 4);
3429
3433
  }
3430
3434
 
3431
- /** @deprecated this mixin is not SSR compatible */
3432
- var styledTextInputMixin = /*#__PURE__*/css(["background-color:", ";border-width:", "px;border-radius:", "px;border-color:", ";font-size:", ";color:", ";font-family:", ";"], function (_ref) {
3433
- var theme = _ref.theme,
3434
- $state = _ref.$state;
3435
- return $state === 'disabled' ? theme.kitt.forms.input.states.disabled.backgroundColor : theme.kitt.forms.input.states["default"].backgroundColor;
3436
- }, function (_ref2) {
3437
- var theme = _ref2.theme;
3438
- return theme.kitt.forms.input.borderWidth;
3439
- }, function (_ref3) {
3440
- var theme = _ref3.theme;
3441
- return theme.kitt.forms.input.borderRadius;
3442
- }, function (_ref4) {
3443
- var theme = _ref4.theme,
3444
- $state = _ref4.$state;
3445
- return theme.kitt.forms.input.states[$state].borderColor;
3446
- }, function (_ref5) {
3447
- var theme = _ref5.theme;
3448
- var typeConfigKey = getTypographyTypeConfigKey(theme);
3449
- return "".concat(theme.kitt.typography.types.bodies.configs.body[typeConfigKey].fontSize, "px");
3450
- }, function (_ref6) {
3451
- var theme = _ref6.theme,
3452
- $state = _ref6.$state;
3453
- return theme.kitt.forms.input.states[$state].color || theme.kitt.forms.input.states["default"].color;
3454
- }, function (_ref7) {
3455
- var theme = _ref7.theme;
3456
- return Platform.OS === 'web' ? theme.kitt.typography.types.bodies.fontFamily.web.regular : theme.kitt.typography.types.bodies.fontFamily["native"].regular;
3457
- });
3435
+ function getDayInInterval(value, minDate, maxDate) {
3436
+ var minValue = minDate ? minDate.getDate() : 1;
3437
+ var maxValue = maxDate ? maxDate.getDate() : 31;
3438
+ return value !== undefined ? Math.max(minValue, Math.min(maxValue, value)) : value;
3439
+ }
3440
+ function getMonthInInterval(value, minDate, maxDate) {
3441
+ var minValue = minDate ? minDate.getMonth() + 1 : 1;
3442
+ var maxValue = maxDate ? maxDate.getMonth() + 1 : 12;
3443
+ return value !== undefined ? Math.max(minValue, Math.min(maxValue, value)) : value;
3444
+ }
3445
+ function getYearInInterval(value, minDate, maxDate) {
3446
+ var minValue = minDate ? minDate.getFullYear() : 1;
3447
+ var maxValue = maxDate ? maxDate.getFullYear() : 9999;
3448
+ return value !== undefined ? Math.max(minValue, Math.min(maxValue, value)) : value;
3449
+ }
3458
3450
 
3459
- var StyledTypographyText = /*#__PURE__*/styled(Typography.Text).withConfig({
3460
- displayName: "DatePickerInputPart__StyledTypographyText"
3461
- })(["text-align:center;"]);
3462
- var ViewInput = /*#__PURE__*/styled.View.withConfig({
3463
- displayName: "DatePickerInputPart__ViewInput"
3464
- })(["", " padding:", ";min-height:", "px;min-width:", ";"], styledTextInputMixin, function (_ref) {
3465
- var theme = _ref.theme;
3466
- return "".concat(theme.kitt.forms.input.padding.vertical, "px ").concat(theme.kitt.forms.input.padding.horizontal, "px");
3467
- }, function (_ref2) {
3468
- var theme = _ref2.theme;
3469
- return theme.kitt.forms.input.minHeight;
3470
- }, function (_ref3) {
3471
- var theme = _ref3.theme,
3472
- $partName = _ref3.$partName;
3473
- if (!$partName) {
3474
- return undefined;
3451
+ function isNumber(input) {
3452
+ // Number.isNaN and isNaN are not consistent
3453
+ // eslint-disable-next-line no-restricted-globals
3454
+ return !isNaN(input);
3455
+ }
3456
+
3457
+ function onDatePartChange(_ref) {
3458
+ var day = _ref.day,
3459
+ month = _ref.month,
3460
+ year = _ref.year,
3461
+ onChange = _ref.onChange,
3462
+ onBlur = _ref.onBlur,
3463
+ onFocus = _ref.onFocus;
3464
+ var arrayParts = [day, month, year];
3465
+ var isEverythingUndefined = arrayParts.every(function (v) {
3466
+ return v === undefined;
3467
+ });
3468
+ var isEverythingDefined = arrayParts.every(Boolean);
3469
+
3470
+ // every parts are undefined
3471
+ if (isEverythingUndefined) {
3472
+ if (onFocus) onFocus();
3473
+ onChange(undefined);
3474
+ if (onBlur) onBlur();
3475
+ return;
3476
+ }
3477
+
3478
+ // Do nothing if some input parts are empty
3479
+ if (!isEverythingDefined) {
3480
+ return;
3481
+ }
3482
+ var nextValue = new Date();
3483
+ if (day) nextValue.setDate(day);
3484
+ if (month) nextValue.setMonth(month - 1);
3485
+ if (year) nextValue.setFullYear(year);
3486
+ nextValue.setMinutes(0);
3487
+ nextValue.setHours(0);
3488
+ nextValue.setSeconds(0);
3489
+ nextValue.setMilliseconds(0);
3490
+ if (onFocus) onFocus();
3491
+ onChange(nextValue);
3492
+ if (onBlur) onBlur();
3493
+ }
3494
+
3495
+ function stringToNumber(text) {
3496
+ if (text.length === 0) return undefined;
3497
+ return parseInt(text, 10);
3498
+ }
3499
+
3500
+ var keyboardDatePickerReducer = function (state, action) {
3501
+ var handleChange = function (dateParts) {
3502
+ var onFocus = state.onFocus,
3503
+ onBlur = state.onBlur,
3504
+ onChange = state.onChange;
3505
+ onDatePartChange(_objectSpread(_objectSpread({}, dateParts), {}, {
3506
+ onFocus: onFocus,
3507
+ onBlur: onBlur,
3508
+ onChange: onChange
3509
+ }));
3510
+ };
3511
+ switch (action.type) {
3512
+ case 'day-change':
3513
+ {
3514
+ var nextDay = stringToNumber(action.nextDay || '');
3515
+ if (nextDay === undefined || !isNumber(action.nextDay)) {
3516
+ return _objectSpread(_objectSpread({}, state), {}, {
3517
+ currentDay: undefined,
3518
+ displayedDay: ''
3519
+ });
3520
+ }
3521
+ handleChange({
3522
+ day: nextDay,
3523
+ month: state.currentMonth,
3524
+ year: state.currentYear
3525
+ });
3526
+ return _objectSpread(_objectSpread({}, state), {}, {
3527
+ currentDay: nextDay,
3528
+ displayedDay: nextDay.toString()
3529
+ });
3530
+ }
3531
+ case 'month-change':
3532
+ {
3533
+ var nextMonth = stringToNumber(action.nextMonth || '');
3534
+ if (nextMonth === undefined || !isNumber(action.nextMonth)) {
3535
+ return _objectSpread(_objectSpread({}, state), {}, {
3536
+ currentMonth: undefined,
3537
+ displayedMonth: ''
3538
+ });
3539
+ }
3540
+ handleChange({
3541
+ day: state.currentDay,
3542
+ month: nextMonth,
3543
+ year: state.currentYear
3544
+ });
3545
+ return _objectSpread(_objectSpread({}, state), {}, {
3546
+ currentMonth: nextMonth,
3547
+ displayedMonth: nextMonth.toString()
3548
+ });
3549
+ }
3550
+ case 'year-change':
3551
+ {
3552
+ var nextYear = stringToNumber(action.nextYear || '');
3553
+ if (nextYear === undefined || !isNumber(action.nextYear)) {
3554
+ return _objectSpread(_objectSpread({}, state), {}, {
3555
+ currentYear: undefined,
3556
+ displayedYear: ''
3557
+ });
3558
+ }
3559
+ handleChange({
3560
+ day: state.currentDay,
3561
+ month: state.currentMonth,
3562
+ year: nextYear
3563
+ });
3564
+ return _objectSpread(_objectSpread({}, state), {}, {
3565
+ currentYear: nextYear,
3566
+ displayedYear: nextYear.toString()
3567
+ });
3568
+ }
3569
+ case 'day-blur':
3570
+ {
3571
+ var minDate = state.minDate,
3572
+ maxDate = state.maxDate;
3573
+ var nextCurrentDay = getDayInInterval(state.currentDay, minDate, maxDate);
3574
+ return _objectSpread(_objectSpread({}, state), {}, {
3575
+ displayedDay: nextCurrentDay ? dayFormatter(nextCurrentDay) : state.displayedDay
3576
+ });
3577
+ }
3578
+ case 'month-blur':
3579
+ {
3580
+ var _minDate = state.minDate,
3581
+ _maxDate = state.maxDate;
3582
+ var nextCurrentMonth = getMonthInInterval(state.currentMonth, _minDate, _maxDate);
3583
+ return _objectSpread(_objectSpread({}, state), {}, {
3584
+ currentMonth: nextCurrentMonth,
3585
+ displayedMonth: nextCurrentMonth !== undefined ? monthFormatter(nextCurrentMonth) : state.displayedMonth
3586
+ });
3587
+ }
3588
+ case 'year-blur':
3589
+ {
3590
+ var _minDate2 = state.minDate,
3591
+ _maxDate2 = state.maxDate;
3592
+ var nextCurrentYear = getYearInInterval(state.currentYear, _minDate2, _maxDate2);
3593
+ return _objectSpread(_objectSpread({}, state), {}, {
3594
+ currentYear: nextCurrentYear,
3595
+ displayedYear: nextCurrentYear !== undefined ? yearFormatter(nextCurrentYear) : state.displayedYear
3596
+ });
3597
+ }
3598
+ default:
3599
+ return state;
3475
3600
  }
3476
- return "".concat(theme.kitt.forms.datePicker[$partName].minWidth, "px");
3601
+ };
3602
+
3603
+ var InputTextContainer = /*#__PURE__*/styled.View.withConfig({
3604
+ displayName: "InputTextContainer"
3605
+ })(["position:relative;"]);
3606
+
3607
+ var _excluded$l = ["id", "right", "state", "variant", "internalForceState", "disabled", "autoCorrect", "textContentType", "autoComplete", "keyboardType", "multiline", "onSubmitEditing"];
3608
+ var InputText = /*#__PURE__*/forwardRef(function (_ref, ref) {
3609
+ var id = _ref.id,
3610
+ right = _ref.right;
3611
+ _ref.state;
3612
+ var _ref$variant = _ref.variant,
3613
+ variant = _ref$variant === void 0 ? 'outline' : _ref$variant,
3614
+ internalForceState = _ref.internalForceState,
3615
+ _ref$disabled = _ref.disabled,
3616
+ disabled = _ref$disabled === void 0 ? false : _ref$disabled,
3617
+ _ref$autoCorrect = _ref.autoCorrect,
3618
+ autoCorrect = _ref$autoCorrect === void 0 ? true : _ref$autoCorrect,
3619
+ _ref$textContentType = _ref.textContentType,
3620
+ textContentType = _ref$textContentType === void 0 ? 'none' : _ref$textContentType,
3621
+ _ref$autoComplete = _ref.autoComplete,
3622
+ autoComplete = _ref$autoComplete === void 0 ? 'off' : _ref$autoComplete,
3623
+ _ref$keyboardType = _ref.keyboardType,
3624
+ keyboardType = _ref$keyboardType === void 0 ? 'default' : _ref$keyboardType,
3625
+ multiline = _ref.multiline,
3626
+ onSubmitEditing = _ref.onSubmitEditing,
3627
+ props = _objectWithoutProperties(_ref, _excluded$l);
3628
+ var theme = /*#__PURE__*/useTheme();
3629
+ var fontSizeForNativeBase = createNativeBaseFontSize({
3630
+ base: 'body'
3631
+ });
3632
+ var shouldHandleSingleLineOnIOS = Platform.OS === 'ios' && !multiline;
3633
+ return /*#__PURE__*/jsxs(InputTextContainer, {
3634
+ $isDisabled: disabled,
3635
+ children: [/*#__PURE__*/jsx(Input, _objectSpread(_objectSpread({
3636
+ ref: ref,
3637
+ multiline: multiline,
3638
+ nativeID: id,
3639
+ isDisabled: internalForceState ? internalForceState === 'disabled' : disabled,
3640
+ isHovered: internalForceState ? internalForceState === 'hover' : undefined,
3641
+ isFocused: internalForceState ? internalForceState === 'focus' : undefined,
3642
+ keyboardType: keyboardType,
3643
+ autoComplete: autoComplete,
3644
+ autoCorrect: autoCorrect,
3645
+ textContentType: textContentType,
3646
+ fontSize: fontSizeForNativeBase,
3647
+ lineHeight:
3648
+ // On basic text input, we set the line-height to zero for iOS to fix vertical text alignment
3649
+ // This is a iOS only fix since having 0 as a line-height value breaks text inputs on Android
3650
+ shouldHandleSingleLineOnIOS ? 0 : fontSizeForNativeBase,
3651
+ fontWeight: "bodies.regular",
3652
+ fontFamily: "bodies.regular",
3653
+ py: !multiline && Platform.OS !== 'web' ? 0 : undefined,
3654
+ variant: variant
3655
+ }, props), {}, {
3656
+ onSubmitEditing: multiline ? function () {
3657
+ return null;
3658
+ } : onSubmitEditing
3659
+ })), right ? /*#__PURE__*/jsx(View, {
3660
+ position: "absolute",
3661
+ right: 0,
3662
+ top: 0,
3663
+ bottom: 0,
3664
+ justifyContent: "center",
3665
+ padding: theme.kitt.forms.input.rightContainer.padding,
3666
+ children: right
3667
+ }) : null]
3668
+ });
3477
3669
  });
3478
- function DatePickerInputPart(_ref4) {
3479
- var $state = _ref4.$state,
3480
- placeholder = _ref4.placeholder,
3481
- value = _ref4.value,
3482
- partName = _ref4.partName,
3483
- disabled = _ref4.disabled;
3484
- return /*#__PURE__*/jsx(ViewInput, {
3485
- $state: $state,
3486
- $partName: partName,
3487
- children: placeholder || value ? /*#__PURE__*/jsx(StyledTypographyText, {
3488
- color: !value || disabled ? 'black-light' : undefined,
3489
- children: value || placeholder
3490
- }) : null
3670
+
3671
+ function getCurrentInternalForcedState(_ref) {
3672
+ var isDisabled = _ref.isDisabled,
3673
+ isHoveredInternal = _ref.isHoveredInternal,
3674
+ isFocusedInternal = _ref.isFocusedInternal,
3675
+ isPressedInternal = _ref.isPressedInternal;
3676
+ if (isDisabled) return 'disabled';
3677
+ if (isHoveredInternal) return 'hover';
3678
+ if (isFocusedInternal) return 'focus';
3679
+ if (isPressedInternal) return 'hover';
3680
+ return 'default';
3681
+ }
3682
+ var InputPart = /*#__PURE__*/forwardRef(function (_ref2, ref) {
3683
+ var value = _ref2.value,
3684
+ placeholder = _ref2.placeholder,
3685
+ disabled = _ref2.disabled,
3686
+ isFocusedInternal = _ref2.isFocusedInternal,
3687
+ isHoveredInternal = _ref2.isHoveredInternal,
3688
+ isPressedInternal = _ref2.isPressedInternal,
3689
+ onChange = _ref2.onChange,
3690
+ onBlur = _ref2.onBlur;
3691
+ return /*#__PURE__*/jsx(InputText, {
3692
+ ref: ref,
3693
+ internalForceState: getCurrentInternalForcedState({
3694
+ isDisabled: disabled,
3695
+ isHoveredInternal: isHoveredInternal,
3696
+ isFocusedInternal: isFocusedInternal,
3697
+ isPressedInternal: isPressedInternal
3698
+ }),
3699
+ value: value,
3700
+ placeholder: placeholder,
3701
+ disabled: disabled,
3702
+ keyboardType: "numeric",
3703
+ textAlign: "center",
3704
+ onChange: onChange,
3705
+ onBlur: onBlur
3706
+ });
3707
+ });
3708
+
3709
+ function PartContainer(_ref) {
3710
+ var children = _ref.children,
3711
+ isStretch = _ref.isStretch,
3712
+ width = _ref.width;
3713
+ return /*#__PURE__*/jsx(View, {
3714
+ flex: createResponsiveStyleFromProp(isStretch, 0.33),
3715
+ flexGrow: createResponsiveStyleFromProp(isStretch, 1),
3716
+ width: isStretch ? undefined : width,
3717
+ children: children
3491
3718
  });
3492
3719
  }
3493
3720
 
3494
- function prefixWithZero(value) {
3495
- return "".concat(value).padStart(2, '0');
3721
+ var _excluded$k = ["value", "testID", "id", "stretch", "placeholder", "minDate", "maxDate", "disabled", "isFocusedInternal", "isHoveredInternal", "isPressedInternal", "onChange", "onBlur", "onFocus"];
3722
+ function KeyboardDatePicker(_ref) {
3723
+ var value = _ref.value,
3724
+ testID = _ref.testID,
3725
+ id = _ref.id,
3726
+ stretch = _ref.stretch,
3727
+ placeholder = _ref.placeholder,
3728
+ minDate = _ref.minDate,
3729
+ maxDate = _ref.maxDate,
3730
+ disabled = _ref.disabled,
3731
+ isFocusedInternal = _ref.isFocusedInternal,
3732
+ isHoveredInternal = _ref.isHoveredInternal,
3733
+ isPressedInternal = _ref.isPressedInternal,
3734
+ onChange = _ref.onChange,
3735
+ onBlur = _ref.onBlur,
3736
+ onFocus = _ref.onFocus;
3737
+ _objectWithoutProperties(_ref, _excluded$k);
3738
+ var dayRef = useRef(null);
3739
+ var monthRef = useRef(null);
3740
+ var yearRef = useRef(null);
3741
+ var defaultValue = value;
3742
+ var defaultDay = defaultValue === null || defaultValue === void 0 ? void 0 : defaultValue.getDate();
3743
+ var defaultMonth = defaultValue ? defaultValue.getMonth() + 1 : undefined;
3744
+ var defaultYear = defaultValue === null || defaultValue === void 0 ? void 0 : defaultValue.getFullYear();
3745
+ var _useReducer = useReducer(keyboardDatePickerReducer, {
3746
+ currentValue: defaultValue,
3747
+ currentDay: defaultDay,
3748
+ currentMonth: defaultMonth,
3749
+ currentYear: defaultYear,
3750
+ displayedDay: defaultDay ? dayFormatter(defaultDay) : '',
3751
+ displayedMonth: defaultMonth ? monthFormatter(defaultMonth) : '',
3752
+ displayedYear: defaultYear ? yearFormatter(defaultYear) : '',
3753
+ minDate: minDate,
3754
+ maxDate: maxDate,
3755
+ onChange: onChange,
3756
+ onBlur: onBlur,
3757
+ onFocus: onFocus
3758
+ }),
3759
+ _useReducer2 = _slicedToArray(_useReducer, 2),
3760
+ state = _useReducer2[0],
3761
+ dispatch = _useReducer2[1];
3762
+ var sharedInputPartProps = {
3763
+ isFocusedInternal: isFocusedInternal,
3764
+ isHoveredInternal: isHoveredInternal,
3765
+ isPressedInternal: isPressedInternal,
3766
+ disabled: disabled
3767
+ };
3768
+ return /*#__PURE__*/jsx(View, {
3769
+ testID: testID,
3770
+ nativeID: id,
3771
+ children: /*#__PURE__*/jsxs(HStack, {
3772
+ space: "kitt.2",
3773
+ children: [/*#__PURE__*/jsx(PartContainer, {
3774
+ isStretch: stretch,
3775
+ width: "kitt.forms.datePicker.day.minWidth",
3776
+ children: /*#__PURE__*/jsx(InputPart, _objectSpread(_objectSpread({
3777
+ ref: dayRef
3778
+ }, sharedInputPartProps), {}, {
3779
+ placeholder: placeholder === null || placeholder === void 0 ? void 0 : placeholder.day,
3780
+ value: state.displayedDay,
3781
+ onChange: function (e) {
3782
+ var nextDay = e.nativeEvent.text;
3783
+ dispatch({
3784
+ type: 'day-change',
3785
+ nextDay: nextDay
3786
+ });
3787
+ if (nextDay.length === 2 && monthRef.current) {
3788
+ monthRef.current.focus();
3789
+ }
3790
+ },
3791
+ onBlur: function () {
3792
+ return dispatch({
3793
+ type: 'day-blur'
3794
+ });
3795
+ }
3796
+ }))
3797
+ }), /*#__PURE__*/jsx(PartContainer, {
3798
+ isStretch: stretch,
3799
+ width: "kitt.forms.datePicker.month.minWidth",
3800
+ children: /*#__PURE__*/jsx(InputPart, _objectSpread(_objectSpread({
3801
+ ref: monthRef
3802
+ }, sharedInputPartProps), {}, {
3803
+ placeholder: placeholder === null || placeholder === void 0 ? void 0 : placeholder.month,
3804
+ value: state.displayedMonth,
3805
+ onChange: function (e) {
3806
+ var nextMonth = e.nativeEvent.text;
3807
+ dispatch({
3808
+ type: 'month-change',
3809
+ nextMonth: e.nativeEvent.text
3810
+ });
3811
+ if (nextMonth.length === 2 && yearRef.current) {
3812
+ yearRef.current.focus();
3813
+ }
3814
+ },
3815
+ onBlur: function () {
3816
+ return dispatch({
3817
+ type: 'month-blur'
3818
+ });
3819
+ }
3820
+ }))
3821
+ }), /*#__PURE__*/jsx(PartContainer, {
3822
+ isStretch: stretch,
3823
+ width: "kitt.forms.datePicker.year.minWidth",
3824
+ children: /*#__PURE__*/jsx(InputPart, _objectSpread(_objectSpread({
3825
+ ref: yearRef
3826
+ }, sharedInputPartProps), {}, {
3827
+ placeholder: placeholder === null || placeholder === void 0 ? void 0 : placeholder.year,
3828
+ value: state.displayedYear,
3829
+ onChange: function (e) {
3830
+ dispatch({
3831
+ type: 'year-change',
3832
+ nextYear: e.nativeEvent.text
3833
+ });
3834
+ },
3835
+ onBlur: function () {
3836
+ return dispatch({
3837
+ type: 'year-blur'
3838
+ });
3839
+ }
3840
+ }))
3841
+ })]
3842
+ })
3843
+ });
3496
3844
  }
3497
- var PartContainer = /*#__PURE__*/styled.View.withConfig({
3498
- displayName: "DatePickerInputs__PartContainer"
3499
- })(["margin-right:", ";", ";"], function (_ref) {
3500
- var theme = _ref.theme,
3501
- $isLast = _ref.$isLast;
3502
- return !$isLast ? "".concat(theme.kitt.spacing * 2, "px") : 0;
3503
- }, function (_ref2) {
3504
- var $isStretch = _ref2.$isStretch;
3505
- return $isStretch ? css(["flex:0.33;flex-grow:1;"]) : undefined;
3506
- });
3507
- var DatePickerPressable = /*#__PURE__*/styled.Pressable.withConfig({
3508
- displayName: "DatePickerInputs__DatePickerPressable"
3509
- })(["display:flex;flex-direction:row;", ";"], function (_ref3) {
3510
- var $isStretch = _ref3.$isStretch;
3511
- if ($isStretch) {
3512
- return css(["width:100%;"]);
3513
- }
3514
- return css(["align-self:baseline;"]);
3515
- });
3516
- function DatePickerInputs(_ref4) {
3517
- var state = _ref4.state,
3518
- internalForceState = _ref4.internalForceState,
3519
- isFocused = _ref4.isFocused,
3520
- disabled = _ref4.disabled,
3521
- stretch = _ref4.stretch,
3522
- id = _ref4.id,
3523
- testID = _ref4.testID,
3524
- handleModalOpen = _ref4.handleModalOpen,
3525
- currentValue = _ref4.currentValue,
3526
- placeholder = _ref4.placeholder;
3527
- var currentState = internalForceState || getInputUIState({
3528
- isFocused: isFocused,
3529
- isDisabled: Boolean(disabled),
3530
- formState: state
3531
- });
3532
- var sharedPartProps = {
3533
- disabled: disabled,
3534
- $state: currentState
3845
+
3846
+ function DatePickerInputs(_ref) {
3847
+ var disabled = _ref.disabled,
3848
+ stretch = _ref.stretch,
3849
+ id = _ref.id,
3850
+ testID = _ref.testID,
3851
+ currentValue = _ref.currentValue,
3852
+ placeholder = _ref.placeholder,
3853
+ isFocusedInternal = _ref.isFocusedInternal,
3854
+ isHoveredInternal = _ref.isHoveredInternal,
3855
+ isPressedInternal = _ref.isPressedInternal,
3856
+ onPress = _ref.onPress;
3857
+ var sharedInputPartProps = {
3858
+ isFocusedInternal: isFocusedInternal,
3859
+ isHoveredInternal: isHoveredInternal,
3860
+ isPressedInternal: isPressedInternal,
3861
+ disabled: disabled
3535
3862
  };
3536
- return /*#__PURE__*/jsxs(DatePickerPressable, {
3537
- $isStretch: stretch,
3863
+ return /*#__PURE__*/jsx(Pressable, {
3864
+ display: "flex",
3865
+ flexDirection: "row",
3866
+ position: "relative",
3867
+ alignSelf: createResponsiveStyleFromProp(stretch, undefined, 'base-line'),
3538
3868
  nativeID: id,
3539
3869
  disabled: disabled,
3540
3870
  testID: testID,
3541
- onPress: handleModalOpen,
3542
- children: [/*#__PURE__*/jsx(PartContainer, {
3543
- $isStretch: stretch,
3544
- children: /*#__PURE__*/jsx(DatePickerInputPart, _objectSpread(_objectSpread({}, sharedPartProps), {}, {
3545
- partName: "day",
3546
- value: currentValue ? prefixWithZero(currentValue.getDate()) : undefined,
3547
- placeholder: placeholder === null || placeholder === void 0 ? void 0 : placeholder.day
3548
- }))
3549
- }), /*#__PURE__*/jsx(PartContainer, {
3550
- $isStretch: stretch,
3551
- children: /*#__PURE__*/jsx(DatePickerInputPart, _objectSpread(_objectSpread({}, sharedPartProps), {}, {
3552
- partName: "month",
3553
- value: currentValue ? prefixWithZero(currentValue.getMonth() + 1) : undefined,
3554
- placeholder: placeholder === null || placeholder === void 0 ? void 0 : placeholder.month
3555
- }))
3556
- }), /*#__PURE__*/jsx(PartContainer, {
3557
- $isLast: true,
3558
- $isStretch: stretch,
3559
- children: /*#__PURE__*/jsx(DatePickerInputPart, _objectSpread(_objectSpread({}, sharedPartProps), {}, {
3560
- partName: "year",
3561
- value: currentValue ? currentValue.getFullYear() : undefined,
3562
- placeholder: placeholder === null || placeholder === void 0 ? void 0 : placeholder.year
3563
- }))
3564
- })]
3871
+ onPress: onPress,
3872
+ children: /*#__PURE__*/jsxs(View, {
3873
+ position: "relative",
3874
+ width: createResponsiveStyleFromProp(stretch, '100%'),
3875
+ children: [/*#__PURE__*/jsxs(HStack, {
3876
+ space: "kitt.2",
3877
+ width: createResponsiveStyleFromProp(stretch, '100%'),
3878
+ children: [/*#__PURE__*/jsx(PartContainer, {
3879
+ isStretch: stretch,
3880
+ width: "kitt.forms.datePicker.day.minWidth",
3881
+ children: /*#__PURE__*/jsx(InputPart, _objectSpread(_objectSpread({}, sharedInputPartProps), {}, {
3882
+ placeholder: placeholder === null || placeholder === void 0 ? void 0 : placeholder.day,
3883
+ value: currentValue ? dayFormatter(currentValue.getDate()) : undefined
3884
+ }))
3885
+ }), /*#__PURE__*/jsx(PartContainer, {
3886
+ isStretch: stretch,
3887
+ width: "kitt.forms.datePicker.month.minWidth",
3888
+ children: /*#__PURE__*/jsx(InputPart, _objectSpread(_objectSpread({}, sharedInputPartProps), {}, {
3889
+ placeholder: placeholder === null || placeholder === void 0 ? void 0 : placeholder.month,
3890
+ value: currentValue ? monthFormatter(currentValue.getMonth() + 1) : undefined
3891
+ }))
3892
+ }), /*#__PURE__*/jsx(PartContainer, {
3893
+ isStretch: stretch,
3894
+ width: "kitt.forms.datePicker.year.minWidth",
3895
+ children: /*#__PURE__*/jsx(InputPart, _objectSpread(_objectSpread({}, sharedInputPartProps), {}, {
3896
+ placeholder: placeholder === null || placeholder === void 0 ? void 0 : placeholder.year,
3897
+ value: currentValue ? yearFormatter(currentValue.getFullYear()) : undefined
3898
+ }))
3899
+ })]
3900
+ }), /*#__PURE__*/jsx(View, {
3901
+ width: "100%",
3902
+ height: "100%",
3903
+ position: "absolute",
3904
+ top: "0",
3905
+ left: "0"
3906
+ })]
3907
+ })
3565
3908
  });
3566
3909
  }
3567
3910
 
3568
- var _excluded$i = ["onBlur", "onFocus", "pickerDefaultDate", "pickerUITestID", "isDefaultVisible", "setIsFocused", "currentValue", "setCurrentValue", "onChange", "isFocused"];
3911
+ var _excluded$j = ["onBlur", "onFocus", "pickerDefaultDate", "pickerUITestID", "isDefaultVisible", "value", "onChange"];
3569
3912
  function DatePickerAndroid(_ref) {
3570
3913
  var onBlur = _ref.onBlur,
3571
3914
  onFocus = _ref.onFocus,
3572
3915
  pickerDefaultDate = _ref.pickerDefaultDate,
3573
3916
  pickerUITestID = _ref.pickerUITestID,
3574
3917
  isDefaultVisible = _ref.isDefaultVisible,
3575
- setIsFocused = _ref.setIsFocused,
3576
- currentValue = _ref.currentValue,
3577
- setCurrentValue = _ref.setCurrentValue,
3918
+ value = _ref.value,
3578
3919
  _onChange = _ref.onChange,
3579
- isFocused = _ref.isFocused,
3580
- props = _objectWithoutProperties(_ref, _excluded$i);
3920
+ props = _objectWithoutProperties(_ref, _excluded$j);
3921
+ var _useState = useState(false),
3922
+ _useState2 = _slicedToArray(_useState, 2),
3923
+ isFocused = _useState2[0],
3924
+ setIsFocused = _useState2[1];
3925
+ var _useState3 = useState(value),
3926
+ _useState4 = _slicedToArray(_useState3, 2),
3927
+ currentValue = _useState4[0],
3928
+ setCurrentValue = _useState4[1];
3581
3929
  var handleClose = function () {
3582
3930
  if (onBlur) onBlur();
3583
3931
  };
@@ -3605,9 +3953,9 @@ function DatePickerAndroid(_ref) {
3605
3953
  // eslint-disable-next-line react-hooks/exhaustive-deps
3606
3954
  }, []);
3607
3955
  return /*#__PURE__*/jsx(DatePickerInputs, _objectSpread({
3608
- handleModalOpen: handleModalOpen,
3609
3956
  currentValue: currentValue,
3610
- isFocused: isFocused
3957
+ isFocusedInternal: isFocused,
3958
+ onPress: handleModalOpen
3611
3959
  }, props));
3612
3960
  }
3613
3961
 
@@ -3645,11 +3993,11 @@ function ModalFooter(_ref3) {
3645
3993
  });
3646
3994
  }
3647
3995
 
3648
- var _excluded$h = ["as", "children"];
3996
+ var _excluded$i = ["as", "children"];
3649
3997
  function StyleWebWrapper(_ref) {
3650
3998
  var as = _ref.as,
3651
3999
  children = _ref.children,
3652
- props = _objectWithoutProperties(_ref, _excluded$h);
4000
+ props = _objectWithoutProperties(_ref, _excluded$i);
3653
4001
  if (Platform.OS !== 'web') return children;
3654
4002
  // as or default to div. If as is undefined, T is div but typescript is not sure
3655
4003
  return /*#__PURE__*/jsx(as || 'div', _objectSpread(_objectSpread({}, props), {}, {
@@ -3661,7 +4009,7 @@ function PressableIconButtonWebWrapperWithTheme() {
3661
4009
  throw new Error('This component is not supposed to be called in native');
3662
4010
  }
3663
4011
 
3664
- var _excluded$g = ["color", "disabled"];
4012
+ var _excluded$h = ["color", "disabled"];
3665
4013
  var PressableIconButtonWebWrapper = /*#__PURE__*/withTheme$1(PressableIconButtonWebWrapperWithTheme);
3666
4014
  var StyledPressableIconButton = /*#__PURE__*/styled.Pressable.withConfig({
3667
4015
  displayName: "PressableIconButton__StyledPressableIconButton"
@@ -3690,7 +4038,7 @@ var StyledPressableIconButton = /*#__PURE__*/styled.Pressable.withConfig({
3690
4038
  function PressableIconButton(_ref5) {
3691
4039
  var color = _ref5.color,
3692
4040
  disabled = _ref5.disabled,
3693
- props = _objectWithoutProperties(_ref5, _excluded$g);
4041
+ props = _objectWithoutProperties(_ref5, _excluded$h);
3694
4042
  return /*#__PURE__*/jsx(StyleWebWrapper, {
3695
4043
  as: PressableIconButtonWebWrapper,
3696
4044
  $isWhite: color === 'white',
@@ -3999,7 +4347,7 @@ function PlatformDateTimePicker(_ref) {
3999
4347
  }));
4000
4348
  }
4001
4349
 
4002
- var _excluded$f = ["title", "isVisible", "value", "validateButtonLabel", "onClose", "onChange"];
4350
+ var _excluded$g = ["title", "isVisible", "value", "validateButtonLabel", "onClose", "onChange"];
4003
4351
  function ModalTitle(_ref) {
4004
4352
  var children = _ref.children;
4005
4353
  return /*#__PURE__*/jsx(Modal.Header, {
@@ -4017,7 +4365,7 @@ function ModalPlatformDateTimePicker(_ref2) {
4017
4365
  validateButtonLabel = _ref2.validateButtonLabel,
4018
4366
  onClose = _ref2.onClose,
4019
4367
  onChange = _ref2.onChange,
4020
- props = _objectWithoutProperties(_ref2, _excluded$f);
4368
+ props = _objectWithoutProperties(_ref2, _excluded$g);
4021
4369
  var _useState = useState(value),
4022
4370
  _useState2 = _slicedToArray(_useState, 2),
4023
4371
  currentValue = _useState2[0],
@@ -4061,18 +4409,21 @@ function ModalPlatformDateTimePicker(_ref2) {
4061
4409
  });
4062
4410
  }
4063
4411
 
4064
- var _excluded$e = ["value", "pickerUITestID", "pickerUITitle", "pickerUIValidateButtonLabel", "isDefaultVisible", "onChange", "onFocus", "onBlur", "pickerDefaultDate"];
4065
- function DatePicker(_ref) {
4412
+ var _excluded$f = ["value", "pickerUITestID", "pickerUITitle", "pickerUIValidateButtonLabel", "isDefaultVisible", "pickerDefaultDate", "isFocusedInternal", "isHoveredInternal", "isPressedInternal", "onChange", "onFocus", "onBlur"];
4413
+ function DefaultNativeUIDatePicker(_ref) {
4066
4414
  var value = _ref.value,
4067
4415
  pickerUITestID = _ref.pickerUITestID,
4068
4416
  pickerUITitle = _ref.pickerUITitle,
4069
4417
  pickerUIValidateButtonLabel = _ref.pickerUIValidateButtonLabel,
4070
4418
  isDefaultVisible = _ref.isDefaultVisible,
4419
+ pickerDefaultDate = _ref.pickerDefaultDate,
4420
+ isFocusedInternal = _ref.isFocusedInternal,
4421
+ isHoveredInternal = _ref.isHoveredInternal,
4422
+ isPressedInternal = _ref.isPressedInternal,
4071
4423
  onChange = _ref.onChange,
4072
4424
  onFocus = _ref.onFocus,
4073
4425
  onBlur = _ref.onBlur,
4074
- pickerDefaultDate = _ref.pickerDefaultDate,
4075
- props = _objectWithoutProperties(_ref, _excluded$e);
4426
+ props = _objectWithoutProperties(_ref, _excluded$f);
4076
4427
  var _useState = useState(isDefaultVisible),
4077
4428
  _useState2 = _slicedToArray(_useState, 2),
4078
4429
  isPickerUIVisible = _useState2[0],
@@ -4085,19 +4436,6 @@ function DatePicker(_ref) {
4085
4436
  _useState6 = _slicedToArray(_useState5, 2),
4086
4437
  currentValue = _useState6[0],
4087
4438
  setCurrentValue = _useState6[1];
4088
- if (Platform.OS === 'android') {
4089
- return /*#__PURE__*/jsx(DatePickerAndroid, _objectSpread({
4090
- pickerDefaultDate: pickerDefaultDate,
4091
- pickerUITestID: pickerUITestID,
4092
- isDefaultVisible: isDefaultVisible,
4093
- currentValue: currentValue,
4094
- setCurrentValue: setCurrentValue,
4095
- isFocused: isFocused,
4096
- setIsFocused: setIsFocused,
4097
- onChange: onChange,
4098
- onBlur: onBlur
4099
- }, props));
4100
- }
4101
4439
  var handleModalClose = function () {
4102
4440
  if (onBlur) onBlur();
4103
4441
  setIsPickerUIVisible(false);
@@ -4105,13 +4443,15 @@ function DatePicker(_ref) {
4105
4443
  };
4106
4444
  return /*#__PURE__*/jsxs(Fragment, {
4107
4445
  children: [/*#__PURE__*/jsx(DatePickerInputs, _objectSpread({
4108
- handleModalOpen: function handleModalOpen() {
4446
+ currentValue: currentValue,
4447
+ isFocusedInternal: isFocused || isFocusedInternal,
4448
+ isHoveredInternal: isHoveredInternal,
4449
+ isPressedInternal: isPressedInternal,
4450
+ onPress: function handleModalOpen() {
4109
4451
  if (onFocus) onFocus();
4110
4452
  setIsPickerUIVisible(true);
4111
4453
  setIsFocused(true);
4112
- },
4113
- currentValue: currentValue,
4114
- isFocused: isFocused
4454
+ }
4115
4455
  }, props)), /*#__PURE__*/jsx(ModalPlatformDateTimePicker, {
4116
4456
  testID: pickerUITestID,
4117
4457
  value: currentValue,
@@ -4129,73 +4469,44 @@ function DatePicker(_ref) {
4129
4469
  });
4130
4470
  }
4131
4471
 
4132
- var InputTextContainer = /*#__PURE__*/styled.View.withConfig({
4133
- displayName: "InputTextContainer"
4134
- })(["position:relative;"]);
4472
+ var _excluded$e = ["value", "pickerUITestID", "isDefaultVisible", "pickerDefaultDate", "onChange", "onBlur"];
4473
+ function NativeUIDatePicker(_ref) {
4474
+ var value = _ref.value,
4475
+ pickerUITestID = _ref.pickerUITestID,
4476
+ isDefaultVisible = _ref.isDefaultVisible,
4477
+ pickerDefaultDate = _ref.pickerDefaultDate,
4478
+ onChange = _ref.onChange,
4479
+ onBlur = _ref.onBlur,
4480
+ props = _objectWithoutProperties(_ref, _excluded$e);
4481
+ if (Platform.OS === 'android') {
4482
+ return /*#__PURE__*/jsx(DatePickerAndroid, _objectSpread({
4483
+ pickerDefaultDate: pickerDefaultDate,
4484
+ pickerUITestID: pickerUITestID,
4485
+ isDefaultVisible: isDefaultVisible,
4486
+ value: value,
4487
+ onChange: onChange,
4488
+ onBlur: onBlur
4489
+ }, props));
4490
+ }
4491
+ return /*#__PURE__*/jsx(DefaultNativeUIDatePicker, _objectSpread({
4492
+ value: value,
4493
+ isDefaultVisible: isDefaultVisible,
4494
+ pickerUITestID: pickerUITestID,
4495
+ onChange: onChange,
4496
+ onBlur: onBlur
4497
+ }, props));
4498
+ }
4135
4499
 
4136
- var _excluded$d = ["id", "right", "state", "variant", "internalForceState", "disabled", "autoCorrect", "textContentType", "autoComplete", "keyboardType", "multiline", "onSubmitEditing"];
4137
- var InputText = /*#__PURE__*/forwardRef(function (_ref, ref) {
4138
- var id = _ref.id,
4139
- right = _ref.right;
4140
- _ref.state;
4141
- var _ref$variant = _ref.variant,
4142
- variant = _ref$variant === void 0 ? 'outline' : _ref$variant,
4143
- internalForceState = _ref.internalForceState,
4144
- _ref$disabled = _ref.disabled,
4145
- disabled = _ref$disabled === void 0 ? false : _ref$disabled,
4146
- _ref$autoCorrect = _ref.autoCorrect,
4147
- autoCorrect = _ref$autoCorrect === void 0 ? true : _ref$autoCorrect,
4148
- _ref$textContentType = _ref.textContentType,
4149
- textContentType = _ref$textContentType === void 0 ? 'none' : _ref$textContentType,
4150
- _ref$autoComplete = _ref.autoComplete,
4151
- autoComplete = _ref$autoComplete === void 0 ? 'off' : _ref$autoComplete,
4152
- _ref$keyboardType = _ref.keyboardType,
4153
- keyboardType = _ref$keyboardType === void 0 ? 'default' : _ref$keyboardType,
4154
- multiline = _ref.multiline,
4155
- onSubmitEditing = _ref.onSubmitEditing,
4500
+ var _excluded$d = ["fillMode"];
4501
+ function DatePicker(_ref) {
4502
+ var _ref$fillMode = _ref.fillMode,
4503
+ fillMode = _ref$fillMode === void 0 ? 'native' : _ref$fillMode,
4156
4504
  props = _objectWithoutProperties(_ref, _excluded$d);
4157
- var theme = /*#__PURE__*/useTheme();
4158
- var fontSizeForNativeBase = createNativeBaseFontSize({
4159
- base: 'body'
4160
- });
4161
- var shouldHandleSingleLineOnIOS = Platform.OS === 'ios' && !multiline;
4162
- return /*#__PURE__*/jsxs(InputTextContainer, {
4163
- $isDisabled: disabled,
4164
- children: [/*#__PURE__*/jsx(Input, _objectSpread(_objectSpread({
4165
- ref: ref,
4166
- multiline: multiline,
4167
- nativeID: id,
4168
- isDisabled: internalForceState ? internalForceState === 'disabled' : disabled,
4169
- isHovered: internalForceState ? internalForceState === 'hover' : undefined,
4170
- isFocused: internalForceState ? internalForceState === 'focus' : undefined,
4171
- keyboardType: keyboardType,
4172
- autoComplete: autoComplete,
4173
- autoCorrect: autoCorrect,
4174
- textContentType: textContentType,
4175
- fontSize: fontSizeForNativeBase,
4176
- lineHeight:
4177
- // On basic text input, we set the line-height to zero for iOS to fix vertical text alignment
4178
- // This is a iOS only fix since having 0 as a line-height value breaks text inputs on Android
4179
- shouldHandleSingleLineOnIOS ? 0 : fontSizeForNativeBase,
4180
- fontWeight: "bodies.regular",
4181
- fontFamily: "bodies.regular",
4182
- py: !multiline && Platform.OS !== 'web' ? 0 : undefined,
4183
- variant: variant
4184
- }, props), {}, {
4185
- onSubmitEditing: multiline ? function () {
4186
- return null;
4187
- } : onSubmitEditing
4188
- })), right ? /*#__PURE__*/jsx(View, {
4189
- position: "absolute",
4190
- right: 0,
4191
- top: 0,
4192
- bottom: 0,
4193
- justifyContent: "center",
4194
- padding: theme.kitt.forms.input.rightContainer.padding,
4195
- children: right
4196
- }) : null]
4197
- });
4198
- });
4505
+ if (fillMode === 'keyboard') {
4506
+ return /*#__PURE__*/jsx(KeyboardDatePicker, _objectSpread({}, props));
4507
+ }
4508
+ return /*#__PURE__*/jsx(NativeUIDatePicker, _objectSpread({}, props));
4509
+ }
4199
4510
 
4200
4511
  function InputEmail(props) {
4201
4512
  return /*#__PURE__*/jsx(InputText, _objectSpread({
@@ -5281,6 +5592,9 @@ function createKittNativeBaseCustomTheme(theme, appTheme) {
5281
5592
  typography: theme.typography.colors,
5282
5593
  palettes: theme.palettes,
5283
5594
  forms: {
5595
+ input: {
5596
+ states: theme.forms.input.states
5597
+ },
5284
5598
  radioButtonGroup: {
5285
5599
  item: {
5286
5600
  borderColor: theme.forms.radioButtonGroup.item.borderColor,
@@ -5324,6 +5638,9 @@ function createKittNativeBaseCustomTheme(theme, appTheme) {
5324
5638
  borderRadius: theme.dialogModal.borderRadius
5325
5639
  },
5326
5640
  forms: {
5641
+ input: {
5642
+ borderRadius: theme.forms.input.borderRadius
5643
+ },
5327
5644
  radioButtonGroup: {
5328
5645
  item: {
5329
5646
  borderRadius: theme.forms.radioButtonGroup.item.borderRadius
@@ -5355,6 +5672,9 @@ function createKittNativeBaseCustomTheme(theme, appTheme) {
5355
5672
  borderWidth: theme.button.borderWidth
5356
5673
  },
5357
5674
  forms: {
5675
+ input: {
5676
+ borderWidth: theme.forms.input.borderWidth
5677
+ },
5358
5678
  radioButtonGroup: {
5359
5679
  item: {
5360
5680
  borderWidth: theme.forms.radioButtonGroup.item.borderWidth
@@ -5399,6 +5719,21 @@ function createKittNativeBaseCustomTheme(theme, appTheme) {
5399
5719
  overlayPadding: theme.dialogModal.overlayPadding
5400
5720
  },
5401
5721
  forms: {
5722
+ datePicker: {
5723
+ minHeight: theme.forms.input.minHeight,
5724
+ day: {
5725
+ minWidth: theme.forms.datePicker.day.minWidth
5726
+ },
5727
+ month: {
5728
+ minWidth: theme.forms.datePicker.month.minWidth
5729
+ },
5730
+ year: {
5731
+ minWidth: theme.forms.datePicker.year.minWidth
5732
+ }
5733
+ },
5734
+ input: {
5735
+ minHeight: theme.forms.input.minHeight
5736
+ },
5402
5737
  radioButtonGroup: {
5403
5738
  item: {
5404
5739
  minHeight: theme.forms.radioButtonGroup.item.minHeight
@@ -5443,6 +5778,12 @@ function createKittNativeBaseCustomTheme(theme, appTheme) {
5443
5778
  overlayPadding: theme.dialogModal.overlayPadding
5444
5779
  },
5445
5780
  forms: {
5781
+ datePicker: {
5782
+ padding: theme.forms.input.padding
5783
+ },
5784
+ input: {
5785
+ padding: theme.forms.input.padding
5786
+ },
5446
5787
  radioButtonGroup: {
5447
5788
  item: {
5448
5789
  padding: theme.forms.radioButtonGroup.item.padding
@@ -5790,12 +6131,13 @@ function ContentPadding(_ref2) {
5790
6131
  }));
5791
6132
  }
5792
6133
 
5793
- var _excluded$6 = ["children", "shouldHandleBottomNotch", "style"];
6134
+ var _excluded$6 = ["children", "shouldHandleBottomNotch", "style", "shouldHandleTopNotch"];
5794
6135
  var StyledViewWithPadding = /*#__PURE__*/styled(ContentPadding).withConfig({
5795
6136
  displayName: "Body__StyledViewWithPadding"
5796
6137
  })(["padding-top:", "px;padding-bottom:", "px;"], function (_ref) {
5797
- var theme = _ref.theme;
5798
- return theme.kitt.spacing * 6;
6138
+ var theme = _ref.theme,
6139
+ $insetTop = _ref.$insetTop;
6140
+ return Math.max(theme.kitt.spacing * 6, $insetTop);
5799
6141
  }, function (_ref2) {
5800
6142
  var theme = _ref2.theme,
5801
6143
  $insetBottom = _ref2.$insetBottom;
@@ -5805,12 +6147,16 @@ function Body(_ref3) {
5805
6147
  var children = _ref3.children,
5806
6148
  shouldHandleBottomNotch = _ref3.shouldHandleBottomNotch,
5807
6149
  style = _ref3.style,
6150
+ shouldHandleTopNotch = _ref3.shouldHandleTopNotch,
5808
6151
  props = _objectWithoutProperties(_ref3, _excluded$6);
5809
6152
  var _useSafeAreaInsets = useSafeAreaInsets(),
5810
- bottom = _useSafeAreaInsets.bottom;
6153
+ bottom = _useSafeAreaInsets.bottom,
6154
+ top = _useSafeAreaInsets.top;
5811
6155
  var insetBottom = shouldHandleBottomNotch ? bottom : 0;
6156
+ var insetTop = shouldHandleTopNotch ? top : 0;
5812
6157
  return /*#__PURE__*/jsx(StyledViewWithPadding, _objectSpread(_objectSpread({}, props), {}, {
5813
6158
  $insetBottom: insetBottom,
6159
+ $insetTop: insetTop,
5814
6160
  style: style,
5815
6161
  children: children
5816
6162
  }));
@@ -5853,9 +6199,10 @@ function Footer(_ref5) {
5853
6199
 
5854
6200
  var HeaderContainer = /*#__PURE__*/styled(ContentPadding).withConfig({
5855
6201
  displayName: "Header__HeaderContainer"
5856
- })(["height:", "px;width:100%;justify-content:center;background-color:", ";padding-right:", "px;padding-left:", "px;", ";"], function (_ref) {
5857
- var theme = _ref.theme;
5858
- return theme.kitt.navigationModal.height;
6202
+ })(["height:", "px;width:100%;justify-content:center;background-color:", ";padding-right:", "px;padding-left:", "px;padding-top:", "px;", ";"], function (_ref) {
6203
+ var theme = _ref.theme,
6204
+ $insetTop = _ref.$insetTop;
6205
+ return theme.kitt.navigationModal.height + $insetTop;
5859
6206
  }, function (_ref2) {
5860
6207
  var theme = _ref2.theme,
5861
6208
  $isTransparent = _ref2.$isTransparent;
@@ -5870,64 +6217,73 @@ var HeaderContainer = /*#__PURE__*/styled(ContentPadding).withConfig({
5870
6217
  $hasLeft = _ref4.$hasLeft;
5871
6218
  return $hasLeft ? theme.kitt.spacing * 2 : theme.kitt.navigationModal.padding;
5872
6219
  }, function (_ref5) {
5873
- var $hasSeparator = _ref5.$hasSeparator;
6220
+ var $insetTop = _ref5.$insetTop;
6221
+ return $insetTop;
6222
+ }, function (_ref6) {
6223
+ var $hasSeparator = _ref6.$hasSeparator;
5874
6224
  if (!$hasSeparator) return undefined;
5875
- return css(["border-bottom-width:1px;border-bottom-color:", ";"], function (_ref6) {
5876
- var theme = _ref6.theme;
6225
+ return css(["border-bottom-width:1px;border-bottom-color:", ";"], function (_ref7) {
6226
+ var theme = _ref7.theme;
5877
6227
  return theme.kitt.colors.separator;
5878
6228
  });
5879
6229
  });
5880
6230
  var Row = /*#__PURE__*/styled(View$2).withConfig({
5881
6231
  displayName: "Header__Row"
5882
- })(["flex-direction:row;justify-content:", ";align-items:center;"], function (_ref7) {
5883
- var $hasContent = _ref7.$hasContent,
5884
- $hasLeft = _ref7.$hasLeft;
6232
+ })(["flex-direction:row;justify-content:", ";align-items:center;"], function (_ref8) {
6233
+ var $hasContent = _ref8.$hasContent,
6234
+ $hasLeft = _ref8.$hasLeft;
5885
6235
  return !$hasContent && !$hasLeft ? 'flex-end' : 'space-between';
5886
6236
  });
5887
6237
  var ButtonContainer = /*#__PURE__*/styled.View.withConfig({
5888
6238
  displayName: "Header__ButtonContainer"
5889
- })(["width:", "px;"], function (_ref8) {
5890
- var theme = _ref8.theme;
6239
+ })(["width:", "px;"], function (_ref9) {
6240
+ var theme = _ref9.theme;
5891
6241
  return theme.kitt.iconButton.width;
5892
6242
  });
5893
6243
  var ChildrenComponent = /*#__PURE__*/styled(View$2).withConfig({
5894
6244
  displayName: "Header__ChildrenComponent"
5895
- })(["flex:1;align-items:center;", ";"], function (_ref9) {
5896
- var theme = _ref9.theme,
5897
- $hasLeft = _ref9.$hasLeft,
5898
- $hasRight = _ref9.$hasRight;
6245
+ })(["flex:1;align-items:center;", ";"], function (_ref10) {
6246
+ var theme = _ref10.theme,
6247
+ $hasLeft = _ref10.$hasLeft,
6248
+ $hasRight = _ref10.$hasRight;
5899
6249
  var paddingHorizontal = theme.kitt.spacing * 2;
5900
6250
  return css(["padding-right:", "px;padding-left:", "px;"], $hasRight ? paddingHorizontal : 0, $hasLeft ? paddingHorizontal : 0);
5901
6251
  });
5902
6252
  var HeaderTitle = /*#__PURE__*/styled(Typography.Text).withConfig({
5903
6253
  displayName: "Header__HeaderTitle"
5904
- })(["flex:1;text-align:", ";", ";"], function (_ref10) {
5905
- var $hasLeft = _ref10.$hasLeft,
5906
- $hasRight = _ref10.$hasRight;
6254
+ })(["flex:1;text-align:", ";", ";"], function (_ref11) {
6255
+ var $hasLeft = _ref11.$hasLeft,
6256
+ $hasRight = _ref11.$hasRight;
5907
6257
  if (!$hasLeft && $hasRight) return 'left';
5908
6258
  return 'center';
5909
- }, function (_ref11) {
5910
- var theme = _ref11.theme,
5911
- $hasLeft = _ref11.$hasLeft,
5912
- $hasRight = _ref11.$hasRight;
6259
+ }, function (_ref12) {
6260
+ var theme = _ref12.theme,
6261
+ $hasLeft = _ref12.$hasLeft,
6262
+ $hasRight = _ref12.$hasRight;
5913
6263
  var paddingHorizontal = theme.kitt.spacing * 2;
5914
6264
  return css(["padding-right:", "px;padding-left:", "px;"], $hasRight ? paddingHorizontal : 0, $hasLeft ? paddingHorizontal : 0);
5915
6265
  });
5916
- function Header(_ref12) {
5917
- var _ref12$hasSeparator = _ref12.hasSeparator,
5918
- hasSeparator = _ref12$hasSeparator === void 0 ? true : _ref12$hasSeparator,
5919
- isTransparent = _ref12.isTransparent,
5920
- title = _ref12.title,
5921
- children = _ref12.children,
5922
- right = _ref12.right,
5923
- left = _ref12.left,
5924
- style = _ref12.style;
6266
+ function Header(_ref13) {
6267
+ var _ref13$hasSeparator = _ref13.hasSeparator,
6268
+ hasSeparator = _ref13$hasSeparator === void 0 ? true : _ref13$hasSeparator,
6269
+ isTransparent = _ref13.isTransparent,
6270
+ title = _ref13.title,
6271
+ children = _ref13.children,
6272
+ right = _ref13.right,
6273
+ left = _ref13.left,
6274
+ _ref13$shouldHandleTo = _ref13.shouldHandleTopNotch,
6275
+ shouldHandleTopNotch = _ref13$shouldHandleTo === void 0 ? true : _ref13$shouldHandleTo,
6276
+ style = _ref13.style;
6277
+ var _useSafeAreaInsets = useSafeAreaInsets(),
6278
+ top = _useSafeAreaInsets.top;
6279
+ var insetTop = shouldHandleTopNotch ? top : 0;
5925
6280
  var sharedProps = {
5926
6281
  $hasLeft: Boolean(left),
5927
6282
  $hasRight: Boolean(right)
5928
6283
  };
5929
6284
  return /*#__PURE__*/jsx(HeaderContainer, {
5930
6285
  $isTransparent: isTransparent,
6286
+ $insetTop: insetTop,
5931
6287
  $hasSeparator: hasSeparator,
5932
6288
  $hasLeft: Boolean(left),
5933
6289
  $hasRight: Boolean(right),
@@ -5999,9 +6355,7 @@ function NativeOpacityAnimation(_ref) {
5999
6355
  }
6000
6356
 
6001
6357
  function NativeSlideInAnimation(_ref) {
6002
- var _ref$topInset = _ref.topInset,
6003
- topInset = _ref$topInset === void 0 ? 0 : _ref$topInset,
6004
- visible = _ref.visible,
6358
+ var visible = _ref.visible,
6005
6359
  children = _ref.children,
6006
6360
  onEntered = _ref.onEntered,
6007
6361
  onExited = _ref.onExited;
@@ -6018,7 +6372,6 @@ function NativeSlideInAnimation(_ref) {
6018
6372
  // Since animation callback is called on component mount, we must make sure that the animation has been runed once to call it an exit
6019
6373
  if (!visible && hasRunAnimationRef.current) onExited();
6020
6374
  }
6021
- var viewportHeight = wHeight - topInset;
6022
6375
  var translateStyle = useAnimatedStyle(function () {
6023
6376
  var _f = function () {
6024
6377
  var _theme$kitt$navigatio = theme.kitt.navigationModal.animation.content,
@@ -6031,7 +6384,7 @@ function NativeSlideInAnimation(_ref) {
6031
6384
  y2 = _easing[3];
6032
6385
  return {
6033
6386
  transform: [{
6034
- translateY: withTiming(visible ? 0 : viewportHeight, {
6387
+ translateY: withTiming(visible ? 0 : wHeight, {
6035
6388
  duration: duration,
6036
6389
  easing: Easing$1.bezier(x1, y1, x2, y2)
6037
6390
  }, function () {
@@ -6045,7 +6398,7 @@ function NativeSlideInAnimation(_ref) {
6045
6398
  };
6046
6399
  _f.asString = "function _f(isFinished){const{runOnJS,handleAnimationFinished}=jsThis._closure;{if(!isFinished)return;runOnJS(handleAnimationFinished)();}}";
6047
6400
  _f.__workletHash = 14707844242190;
6048
- _f.__location = "/home/circleci/repo/@ornikar/kitt-universal/src/NavigationModal/components/NativeSlideInAnimation.tsx (49:12)";
6401
+ _f.__location = "/home/circleci/repo/@ornikar/kitt-universal/src/NavigationModal/components/NativeSlideInAnimation.tsx (45:12)";
6049
6402
  return _f;
6050
6403
  }())
6051
6404
  }]
@@ -6063,24 +6416,27 @@ function NativeSlideInAnimation(_ref) {
6063
6416
  },
6064
6417
  withTiming: withTiming,
6065
6418
  visible: visible,
6066
- viewportHeight: viewportHeight,
6419
+ wHeight: wHeight,
6067
6420
  Easing: {
6068
6421
  bezier: Easing$1.bezier
6069
6422
  },
6070
6423
  runOnJS: runOnJS,
6071
6424
  handleAnimationFinished: handleAnimationFinished
6072
6425
  };
6073
- _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)();})}]};}}";
6074
- _f.__workletHash = 505483620545;
6075
- _f.__location = "/home/circleci/repo/@ornikar/kitt-universal/src/NavigationModal/components/NativeSlideInAnimation.tsx (39:42)";
6426
+ _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)();})}]};}}";
6427
+ _f.__workletHash = 14160876288353;
6428
+ _f.__location = "/home/circleci/repo/@ornikar/kitt-universal/src/NavigationModal/components/NativeSlideInAnimation.tsx (35:42)";
6076
6429
  return _f;
6077
6430
  }());
6078
6431
  return /*#__PURE__*/jsx(Animated.View, {
6079
6432
  style: [{
6080
6433
  transform: [{
6081
- translateY: viewportHeight
6434
+ translateY: wHeight
6082
6435
  }]
6083
- }, translateStyle],
6436
+ }, translateStyle, {
6437
+ width: '100%',
6438
+ flex: 1
6439
+ }],
6084
6440
  children: children
6085
6441
  });
6086
6442
  }
@@ -6092,8 +6448,6 @@ function NavigationModalAnimation(_ref) {
6092
6448
  onEntered = _ref.onEntered,
6093
6449
  onExit = _ref.onExit,
6094
6450
  onExited = _ref.onExited;
6095
- var _useSafeAreaInsets = useSafeAreaInsets(),
6096
- top = _useSafeAreaInsets.top;
6097
6451
  var _useState = useState(visible),
6098
6452
  _useState2 = _slicedToArray(_useState, 2),
6099
6453
  isModalVisible = _useState2[0],
@@ -6134,14 +6488,14 @@ function NavigationModalAnimation(_ref) {
6134
6488
  children: /*#__PURE__*/jsx(Overlay, {
6135
6489
  onPress: handleAnimationExited
6136
6490
  })
6137
- }), /*#__PURE__*/jsxs(NativeSlideInAnimation, {
6138
- topInset: top,
6491
+ }), /*#__PURE__*/jsx(NativeSlideInAnimation, {
6139
6492
  visible: isContentVisible,
6140
6493
  onExited: handleAnimationExited,
6141
6494
  onEntered: onEntered,
6142
- children: [/*#__PURE__*/jsx(View, {
6143
- height: top
6144
- }), children]
6495
+ children: /*#__PURE__*/jsx(View, {
6496
+ flex: 1,
6497
+ children: children
6498
+ })
6145
6499
  })]
6146
6500
  })
6147
6501
  });
@@ -7242,6 +7596,34 @@ function Tag(_ref6) {
7242
7596
  });
7243
7597
  }
7244
7598
 
7599
+ /** @deprecated this mixin is not SSR compatible */
7600
+ var styledTextInputMixin = /*#__PURE__*/css(["background-color:", ";border-width:", "px;border-radius:", "px;border-color:", ";font-size:", ";color:", ";font-family:", ";"], function (_ref) {
7601
+ var theme = _ref.theme,
7602
+ $state = _ref.$state;
7603
+ return $state === 'disabled' ? theme.kitt.forms.input.states.disabled.backgroundColor : theme.kitt.forms.input.states["default"].backgroundColor;
7604
+ }, function (_ref2) {
7605
+ var theme = _ref2.theme;
7606
+ return theme.kitt.forms.input.borderWidth;
7607
+ }, function (_ref3) {
7608
+ var theme = _ref3.theme;
7609
+ return theme.kitt.forms.input.borderRadius;
7610
+ }, function (_ref4) {
7611
+ var theme = _ref4.theme,
7612
+ $state = _ref4.$state;
7613
+ return theme.kitt.forms.input.states[$state].borderColor;
7614
+ }, function (_ref5) {
7615
+ var theme = _ref5.theme;
7616
+ var typeConfigKey = getTypographyTypeConfigKey(theme);
7617
+ return "".concat(theme.kitt.typography.types.bodies.configs.body[typeConfigKey].fontSize, "px");
7618
+ }, function (_ref6) {
7619
+ var theme = _ref6.theme,
7620
+ $state = _ref6.$state;
7621
+ return theme.kitt.forms.input.states[$state].color || theme.kitt.forms.input.states["default"].color;
7622
+ }, function (_ref7) {
7623
+ var theme = _ref7.theme;
7624
+ return Platform.OS === 'web' ? theme.kitt.typography.types.bodies.fontFamily.web.regular : theme.kitt.typography.types.bodies.fontFamily["native"].regular;
7625
+ });
7626
+
7245
7627
  function Title(_ref) {
7246
7628
  var children = _ref.children;
7247
7629
  return /*#__PURE__*/jsx(Modal.Header, {