@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';
@@ -140,7 +140,7 @@ var KittBreakpointNameEnum;
140
140
  KittBreakpointNameEnum["WIDE"] = "wide";
141
141
  })(KittBreakpointNameEnum || (KittBreakpointNameEnum = {}));
142
142
 
143
- var _excluded$y = ["accessibilityRole", "base", "small", "medium", "large", "wide", "type", "variant", "color"];
143
+ var _excluded$B = ["accessibilityRole", "base", "small", "medium", "large", "wide", "type", "variant", "color"];
144
144
  var IsHeaderTypographyContext = /*#__PURE__*/createContext(undefined);
145
145
  var TypographyColorContext = /*#__PURE__*/createContext('black');
146
146
  function useTypographyColor() {
@@ -203,7 +203,7 @@ function Typography(_ref) {
203
203
  } : _ref$type,
204
204
  variant = _ref.variant,
205
205
  color = _ref.color,
206
- otherProps = _objectWithoutProperties(_ref, _excluded$y);
206
+ otherProps = _objectWithoutProperties(_ref, _excluded$B);
207
207
  var isHeaderTypographyInContext = useContext(IsHeaderTypographyContext);
208
208
  var defaultColor = useTypographyDefaultColor();
209
209
  var hasTypographyAncestor = isHeaderTypographyInContext !== undefined;
@@ -321,11 +321,11 @@ function Icon(_ref5) {
321
321
  });
322
322
  }
323
323
 
324
- var _excluded$x = ["color"],
324
+ var _excluded$A = ["color"],
325
325
  _excluded2$5 = ["color"];
326
326
  function TypographyIconSpecifiedColor(_ref) {
327
327
  var color = _ref.color,
328
- props = _objectWithoutProperties(_ref, _excluded$x);
328
+ props = _objectWithoutProperties(_ref, _excluded$A);
329
329
  var theme = /*#__PURE__*/useTheme();
330
330
  return /*#__PURE__*/jsx(Icon, _objectSpread(_objectSpread({}, props), {}, {
331
331
  color: color === 'inherit' ? 'inherit' : theme.kitt.typography.colors[color]
@@ -366,7 +366,7 @@ var getTextColorByType = function (type, variant, isHovered, isPressed) {
366
366
  }
367
367
  };
368
368
 
369
- var _excluded$w = ["type", "variant", "isDisabled", "icon", "children", "isHovered", "isPressed", "isFocused"];
369
+ var _excluded$z = ["type", "variant", "isDisabled", "icon", "children", "isHovered", "isPressed", "isFocused"];
370
370
  function ButtonIcon(_ref) {
371
371
  var icon = _ref.icon,
372
372
  color = _ref.color,
@@ -441,7 +441,7 @@ function ButtonContent(_ref3) {
441
441
  isHovered = _ref3.isHovered,
442
442
  isPressed = _ref3.isPressed;
443
443
  _ref3.isFocused;
444
- var props = _objectWithoutProperties(_ref3, _excluded$w);
444
+ var props = _objectWithoutProperties(_ref3, _excluded$z);
445
445
  var color = isDisabled ? 'black-light' : getTextColorByType(type, variant, isHovered, isPressed);
446
446
  return /*#__PURE__*/jsx(View, {
447
447
  _web: {
@@ -774,7 +774,7 @@ function useMatchWindowSize(options) {
774
774
  }, options);
775
775
  }
776
776
 
777
- var _excluded$v = ["as", "onPress", "disabled", "icon", "stretch"];
777
+ var _excluded$y = ["as", "onPress", "disabled", "icon", "stretch"];
778
778
  function getCurrentStretchValue(isStretch, isMedium) {
779
779
  // Stretch will follow the value passed from the component occurence if defined
780
780
  if (isStretch) return isStretch;
@@ -786,7 +786,7 @@ function ActionsItem(_ref) {
786
786
  disabled = _ref.disabled,
787
787
  icon = _ref.icon,
788
788
  stretch = _ref.stretch,
789
- props = _objectWithoutProperties(_ref, _excluded$v);
789
+ props = _objectWithoutProperties(_ref, _excluded$y);
790
790
  var isMedium = useMatchWindowSize({
791
791
  minWidth: KittBreakpoints.MEDIUM
792
792
  });
@@ -863,7 +863,7 @@ function ActionsButton(_ref) {
863
863
  }, props));
864
864
  }
865
865
 
866
- var _excluded$u = ["children", "layout"];
866
+ var _excluded$x = ["children", "layout"];
867
867
  function getCurrentLayout(layout) {
868
868
  if (!layout) return {
869
869
  base: 'stretch',
@@ -883,7 +883,7 @@ function getCurrentDirection(layout) {
883
883
  function Actions(_ref) {
884
884
  var children = _ref.children,
885
885
  layout = _ref.layout,
886
- props = _objectWithoutProperties(_ref, _excluded$u);
886
+ props = _objectWithoutProperties(_ref, _excluded$x);
887
887
  var currentAlignItems = getCurrentLayout(layout);
888
888
  var currentDirection = getCurrentDirection(layout);
889
889
  return /*#__PURE__*/jsx(Stack, _objectSpread(_objectSpread({
@@ -918,6 +918,7 @@ var lateOceanColorPalette = {
918
918
  englishVermillon: '#D44148',
919
919
  goldCrayola: '#F8C583',
920
920
  aero: '#89BDDD',
921
+ seaShell: '#FFF9F3',
921
922
  transparent: 'transparent',
922
923
  moonPurple: '#DBD6F9',
923
924
  moonPurpleLight1: '#EDEBFC'
@@ -1002,7 +1003,7 @@ function getInitials(firstname, lastname) {
1002
1003
  return "".concat(firstname[0]).concat(lastname[0]).toUpperCase();
1003
1004
  }
1004
1005
 
1005
- var _excluded$t = ["size", "round", "light", "sizeVariant"];
1006
+ var _excluded$w = ["size", "round", "light", "sizeVariant"];
1006
1007
  function AvatarContent(_ref) {
1007
1008
  var size = _ref.size,
1008
1009
  src = _ref.src,
@@ -1041,7 +1042,7 @@ function Avatar(_ref2) {
1041
1042
  round = _ref2.round,
1042
1043
  light = _ref2.light,
1043
1044
  sizeVariant = _ref2.sizeVariant,
1044
- props = _objectWithoutProperties(_ref2, _excluded$t);
1045
+ props = _objectWithoutProperties(_ref2, _excluded$w);
1045
1046
  var currentSize = getCurrentSize({
1046
1047
  size: size,
1047
1048
  sizeVariant: sizeVariant
@@ -1458,11 +1459,11 @@ function CardModalAnimation(_ref) {
1458
1459
  });
1459
1460
  }
1460
1461
 
1461
- var _excluded$s = ["children"],
1462
+ var _excluded$v = ["children"],
1462
1463
  _excluded2$4 = ["children", "visible", "onClose", "onExited"];
1463
1464
  function ScrollContainer(_ref) {
1464
1465
  var children = _ref.children,
1465
- props = _objectWithoutProperties(_ref, _excluded$s);
1466
+ props = _objectWithoutProperties(_ref, _excluded$v);
1466
1467
  if (Platform.OS !== 'web') {
1467
1468
  return /*#__PURE__*/jsx(View, {
1468
1469
  children: children
@@ -1508,7 +1509,7 @@ function CardModalBehaviour(_ref2) {
1508
1509
  });
1509
1510
  }
1510
1511
 
1511
- var _excluded$r = ["children", "paddingX", "paddingY"];
1512
+ var _excluded$u = ["children", "paddingX", "paddingY"];
1512
1513
  function CardModalBody(_ref) {
1513
1514
  var children = _ref.children,
1514
1515
  _ref$paddingX = _ref.paddingX,
@@ -1518,7 +1519,7 @@ function CardModalBody(_ref) {
1518
1519
  } : _ref$paddingX,
1519
1520
  _ref$paddingY = _ref.paddingY,
1520
1521
  paddingY = _ref$paddingY === void 0 ? 'kitt.4' : _ref$paddingY,
1521
- props = _objectWithoutProperties(_ref, _excluded$r);
1522
+ props = _objectWithoutProperties(_ref, _excluded$u);
1522
1523
  return /*#__PURE__*/jsx(View, _objectSpread(_objectSpread({
1523
1524
  paddingX: paddingX,
1524
1525
  paddingY: paddingY
@@ -1527,7 +1528,7 @@ function CardModalBody(_ref) {
1527
1528
  }));
1528
1529
  }
1529
1530
 
1530
- var _excluded$q = ["children", "padding", "hasSeparator"];
1531
+ var _excluded$t = ["children", "padding", "hasSeparator"];
1531
1532
  function CardModalFooter(_ref) {
1532
1533
  var children = _ref.children,
1533
1534
  _ref$padding = _ref.padding,
@@ -1537,7 +1538,7 @@ function CardModalFooter(_ref) {
1537
1538
  } : _ref$padding,
1538
1539
  _ref$hasSeparator = _ref.hasSeparator,
1539
1540
  hasSeparator = _ref$hasSeparator === void 0 ? true : _ref$hasSeparator,
1540
- props = _objectWithoutProperties(_ref, _excluded$q);
1541
+ props = _objectWithoutProperties(_ref, _excluded$t);
1541
1542
  return /*#__PURE__*/jsx(View, _objectSpread(_objectSpread({}, props), {}, {
1542
1543
  marginTop: "kitt.2",
1543
1544
  padding: padding,
@@ -1551,7 +1552,7 @@ function CardModalFooter(_ref) {
1551
1552
  }));
1552
1553
  }
1553
1554
 
1554
- var _excluded$p = ["children", "title", "paddingBottom", "hasSeparator", "right", "left"];
1555
+ var _excluded$s = ["children", "title", "paddingBottom", "hasSeparator", "right", "left"];
1555
1556
  function CardModalHeader(_ref) {
1556
1557
  var children = _ref.children,
1557
1558
  title = _ref.title,
@@ -1564,7 +1565,7 @@ function CardModalHeader(_ref) {
1564
1565
  hasSeparator = _ref$hasSeparator === void 0 ? true : _ref$hasSeparator,
1565
1566
  right = _ref.right,
1566
1567
  left = _ref.left,
1567
- props = _objectWithoutProperties(_ref, _excluded$p);
1568
+ props = _objectWithoutProperties(_ref, _excluded$s);
1568
1569
  var defaultContainerPadding = {
1569
1570
  base: 'kitt.4',
1570
1571
  medium: 'kitt.6'
@@ -1602,7 +1603,7 @@ function CardModalHeader(_ref) {
1602
1603
  }));
1603
1604
  }
1604
1605
 
1605
- var _excluded$o = ["children", "backgroundColor", "maxWidth", "withoutShadow"];
1606
+ var _excluded$r = ["children", "backgroundColor", "maxWidth", "withoutShadow"];
1606
1607
  function CardModal(_ref) {
1607
1608
  var children = _ref.children,
1608
1609
  _ref$backgroundColor = _ref.backgroundColor,
@@ -1610,7 +1611,7 @@ function CardModal(_ref) {
1610
1611
  _ref$maxWidth = _ref.maxWidth,
1611
1612
  maxWidth = _ref$maxWidth === void 0 ? 'kitt.cardModal.maxWidth' : _ref$maxWidth,
1612
1613
  withoutShadow = _ref.withoutShadow,
1613
- props = _objectWithoutProperties(_ref, _excluded$o);
1614
+ props = _objectWithoutProperties(_ref, _excluded$r);
1614
1615
  return /*#__PURE__*/jsx(View, _objectSpread(_objectSpread({}, props), {}, {
1615
1616
  overflow: "hidden",
1616
1617
  backgroundColor: backgroundColor,
@@ -1874,10 +1875,10 @@ var ChoiceItemContainer = /*#__PURE__*/styled(View$2).withConfig({
1874
1875
  return css(["margin-bottom:", "px;"], $isLast ? 0 : column);
1875
1876
  });
1876
1877
 
1877
- var _excluded$n = ["direction"];
1878
+ var _excluded$q = ["direction"];
1878
1879
  function ChoicesContainer(_ref) {
1879
1880
  var direction = _ref.direction,
1880
- props = _objectWithoutProperties(_ref, _excluded$n);
1881
+ props = _objectWithoutProperties(_ref, _excluded$q);
1881
1882
  if (direction === 'row') {
1882
1883
  return /*#__PURE__*/jsx(ScrollView$2, _objectSpread({
1883
1884
  horizontal: true
@@ -2165,13 +2166,13 @@ function DialogModalAnimation(_ref) {
2165
2166
  });
2166
2167
  }
2167
2168
 
2168
- var _excluded$m = ["children", "visible", "onClose", "onExited"];
2169
+ var _excluded$p = ["children", "visible", "onClose", "onExited"];
2169
2170
  function DialogModalBehaviour(_ref) {
2170
2171
  var children = _ref.children,
2171
2172
  visible = _ref.visible,
2172
2173
  onClose = _ref.onClose,
2173
2174
  onExited = _ref.onExited,
2174
- props = _objectWithoutProperties(_ref, _excluded$m);
2175
+ props = _objectWithoutProperties(_ref, _excluded$p);
2175
2176
  var _useState = useState(visible),
2176
2177
  _useState2 = _slicedToArray(_useState, 2),
2177
2178
  isModalBehaviourVisible = _useState2[0],
@@ -2202,7 +2203,7 @@ function DialogModalBehaviour(_ref) {
2202
2203
  });
2203
2204
  }
2204
2205
 
2205
- var _excluded$l = ["stretch"];
2206
+ var _excluded$o = ["stretch"];
2206
2207
  function DialogModal(_ref) {
2207
2208
  var illustration = _ref.illustration,
2208
2209
  title = _ref.title,
@@ -2243,7 +2244,7 @@ DialogModal.ModalBehaviour = DialogModalBehaviour;
2243
2244
  function DialogModalButton(_ref2) {
2244
2245
  var _ref2$stretch = _ref2.stretch,
2245
2246
  stretch = _ref2$stretch === void 0 ? true : _ref2$stretch,
2246
- props = _objectWithoutProperties(_ref2, _excluded$l);
2247
+ props = _objectWithoutProperties(_ref2, _excluded$o);
2247
2248
  return /*#__PURE__*/jsx(Actions.Button, _objectSpread({
2248
2249
  stretch: stretch
2249
2250
  }, props));
@@ -2278,7 +2279,7 @@ function Emoji(_ref) {
2278
2279
  });
2279
2280
  }
2280
2281
 
2281
- var _excluded$k = ["as", "appScheme", "appValue", "onPress", "onOpenAppError"],
2282
+ var _excluded$n = ["as", "appScheme", "appValue", "onPress", "onOpenAppError"],
2282
2283
  _excluded2$3 = ["phoneNumber", "children"],
2283
2284
  _excluded3$2 = ["phoneNumber", "children"],
2284
2285
  _excluded4$1 = ["emailAddress", "children"];
@@ -2288,7 +2289,7 @@ function ExternalAppLink(_ref) {
2288
2289
  appValue = _ref.appValue,
2289
2290
  onPress = _ref.onPress,
2290
2291
  onOpenAppError = _ref.onOpenAppError,
2291
- rest = _objectWithoutProperties(_ref, _excluded$k);
2292
+ rest = _objectWithoutProperties(_ref, _excluded$n);
2292
2293
  var href = "".concat(appScheme, ":").concat(appValue);
2293
2294
  var handleOnPress = /*#__PURE__*/function () {
2294
2295
  var _ref2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(e) {
@@ -2385,14 +2386,14 @@ var defaultOpenLinkBehavior = {
2385
2386
  web: 'targetBlank'
2386
2387
  };
2387
2388
 
2388
- var _excluded$j = ["as", "href", "openLinkBehavior", "onPress"];
2389
+ var _excluded$m = ["as", "href", "openLinkBehavior", "onPress"];
2389
2390
  function ExternalLink(_ref) {
2390
2391
  var Component = _ref.as,
2391
2392
  href = _ref.href,
2392
2393
  _ref$openLinkBehavior = _ref.openLinkBehavior,
2393
2394
  openLinkBehavior = _ref$openLinkBehavior === void 0 ? defaultOpenLinkBehavior : _ref$openLinkBehavior,
2394
2395
  onPress = _ref.onPress,
2395
- rest = _objectWithoutProperties(_ref, _excluded$j);
2396
+ rest = _objectWithoutProperties(_ref, _excluded$m);
2396
2397
  return /*#__PURE__*/jsx(Component, _objectSpread(_objectSpread({}, rest), {}, {
2397
2398
  onPress: function handleOnPress(e) {
2398
2399
  if (onPress) {
@@ -3418,167 +3419,514 @@ function Checkbox(_ref6) {
3418
3419
  });
3419
3420
  }
3420
3421
 
3421
- /** @deprecated use native-base instead */
3422
- function getInputUIState(_ref) {
3423
- var isFocused = _ref.isFocused,
3424
- isDisabled = _ref.isDisabled,
3425
- formState = _ref.formState;
3426
- if (isDisabled) return 'disabled';
3427
- if (isFocused) return 'focus';
3428
- if (formState === 'invalid') return 'invalid';
3429
- return 'default';
3422
+ function prefixWithZero(value) {
3423
+ var maxLength = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 2;
3424
+ return "".concat(value).padStart(maxLength, '0');
3425
+ }
3426
+ function dayFormatter(day) {
3427
+ return prefixWithZero(day);
3428
+ }
3429
+ function monthFormatter(month) {
3430
+ return prefixWithZero(month);
3431
+ }
3432
+ function yearFormatter(year) {
3433
+ return prefixWithZero(year, 4);
3430
3434
  }
3431
3435
 
3432
- /** @deprecated this mixin is not SSR compatible */
3433
- var styledTextInputMixin = /*#__PURE__*/css(["background-color:", ";border-width:", "px;border-radius:", "px;border-color:", ";font-size:", ";color:", ";font-family:", ";"], function (_ref) {
3434
- var theme = _ref.theme,
3435
- $state = _ref.$state;
3436
- return $state === 'disabled' ? theme.kitt.forms.input.states.disabled.backgroundColor : theme.kitt.forms.input.states["default"].backgroundColor;
3437
- }, function (_ref2) {
3438
- var theme = _ref2.theme;
3439
- return theme.kitt.forms.input.borderWidth;
3440
- }, function (_ref3) {
3441
- var theme = _ref3.theme;
3442
- return theme.kitt.forms.input.borderRadius;
3443
- }, function (_ref4) {
3444
- var theme = _ref4.theme,
3445
- $state = _ref4.$state;
3446
- return theme.kitt.forms.input.states[$state].borderColor;
3447
- }, function (_ref5) {
3448
- var theme = _ref5.theme;
3449
- var typeConfigKey = getTypographyTypeConfigKey(theme);
3450
- return "".concat(theme.kitt.typography.types.bodies.configs.body[typeConfigKey].fontSize, "px");
3451
- }, function (_ref6) {
3452
- var theme = _ref6.theme,
3453
- $state = _ref6.$state;
3454
- return theme.kitt.forms.input.states[$state].color || theme.kitt.forms.input.states["default"].color;
3455
- }, function (_ref7) {
3456
- var theme = _ref7.theme;
3457
- return Platform.OS === 'web' ? theme.kitt.typography.types.bodies.fontFamily.web.regular : theme.kitt.typography.types.bodies.fontFamily["native"].regular;
3458
- });
3436
+ function getDayInInterval(value, minDate, maxDate) {
3437
+ var minValue = minDate ? minDate.getDate() : 1;
3438
+ var maxValue = maxDate ? maxDate.getDate() : 31;
3439
+ return value !== undefined ? Math.max(minValue, Math.min(maxValue, value)) : value;
3440
+ }
3441
+ function getMonthInInterval(value, minDate, maxDate) {
3442
+ var minValue = minDate ? minDate.getMonth() + 1 : 1;
3443
+ var maxValue = maxDate ? maxDate.getMonth() + 1 : 12;
3444
+ return value !== undefined ? Math.max(minValue, Math.min(maxValue, value)) : value;
3445
+ }
3446
+ function getYearInInterval(value, minDate, maxDate) {
3447
+ var minValue = minDate ? minDate.getFullYear() : 1;
3448
+ var maxValue = maxDate ? maxDate.getFullYear() : 9999;
3449
+ return value !== undefined ? Math.max(minValue, Math.min(maxValue, value)) : value;
3450
+ }
3459
3451
 
3460
- var StyledTypographyText = /*#__PURE__*/styled(Typography.Text).withConfig({
3461
- displayName: "DatePickerInputPart__StyledTypographyText"
3462
- })(["text-align:center;"]);
3463
- var ViewInput = /*#__PURE__*/styled.View.withConfig({
3464
- displayName: "DatePickerInputPart__ViewInput"
3465
- })(["", " padding:", ";min-height:", "px;min-width:", ";"], styledTextInputMixin, function (_ref) {
3466
- var theme = _ref.theme;
3467
- return "".concat(theme.kitt.forms.input.padding.vertical, "px ").concat(theme.kitt.forms.input.padding.horizontal, "px");
3468
- }, function (_ref2) {
3469
- var theme = _ref2.theme;
3470
- return theme.kitt.forms.input.minHeight;
3471
- }, function (_ref3) {
3472
- var theme = _ref3.theme,
3473
- $partName = _ref3.$partName;
3474
- if (!$partName) {
3475
- return undefined;
3452
+ function isNumber(input) {
3453
+ // Number.isNaN and isNaN are not consistent
3454
+ // eslint-disable-next-line no-restricted-globals
3455
+ return !isNaN(input);
3456
+ }
3457
+
3458
+ function onDatePartChange(_ref) {
3459
+ var day = _ref.day,
3460
+ month = _ref.month,
3461
+ year = _ref.year,
3462
+ onChange = _ref.onChange,
3463
+ onBlur = _ref.onBlur,
3464
+ onFocus = _ref.onFocus;
3465
+ var arrayParts = [day, month, year];
3466
+ var isEverythingUndefined = arrayParts.every(function (v) {
3467
+ return v === undefined;
3468
+ });
3469
+ var isEverythingDefined = arrayParts.every(Boolean);
3470
+
3471
+ // every parts are undefined
3472
+ if (isEverythingUndefined) {
3473
+ if (onFocus) onFocus();
3474
+ onChange(undefined);
3475
+ if (onBlur) onBlur();
3476
+ return;
3477
+ }
3478
+
3479
+ // Do nothing if some input parts are empty
3480
+ if (!isEverythingDefined) {
3481
+ return;
3482
+ }
3483
+ var nextValue = new Date();
3484
+ if (day) nextValue.setDate(day);
3485
+ if (month) nextValue.setMonth(month - 1);
3486
+ if (year) nextValue.setFullYear(year);
3487
+ nextValue.setMinutes(0);
3488
+ nextValue.setHours(0);
3489
+ nextValue.setSeconds(0);
3490
+ nextValue.setMilliseconds(0);
3491
+ if (onFocus) onFocus();
3492
+ onChange(nextValue);
3493
+ if (onBlur) onBlur();
3494
+ }
3495
+
3496
+ function stringToNumber(text) {
3497
+ if (text.length === 0) return undefined;
3498
+ return parseInt(text, 10);
3499
+ }
3500
+
3501
+ var keyboardDatePickerReducer = function (state, action) {
3502
+ var handleChange = function (dateParts) {
3503
+ var onFocus = state.onFocus,
3504
+ onBlur = state.onBlur,
3505
+ onChange = state.onChange;
3506
+ onDatePartChange(_objectSpread(_objectSpread({}, dateParts), {}, {
3507
+ onFocus: onFocus,
3508
+ onBlur: onBlur,
3509
+ onChange: onChange
3510
+ }));
3511
+ };
3512
+ switch (action.type) {
3513
+ case 'day-change':
3514
+ {
3515
+ var nextDay = stringToNumber(action.nextDay || '');
3516
+ if (nextDay === undefined || !isNumber(action.nextDay)) {
3517
+ return _objectSpread(_objectSpread({}, state), {}, {
3518
+ currentDay: undefined,
3519
+ displayedDay: ''
3520
+ });
3521
+ }
3522
+ handleChange({
3523
+ day: nextDay,
3524
+ month: state.currentMonth,
3525
+ year: state.currentYear
3526
+ });
3527
+ return _objectSpread(_objectSpread({}, state), {}, {
3528
+ currentDay: nextDay,
3529
+ displayedDay: nextDay.toString()
3530
+ });
3531
+ }
3532
+ case 'month-change':
3533
+ {
3534
+ var nextMonth = stringToNumber(action.nextMonth || '');
3535
+ if (nextMonth === undefined || !isNumber(action.nextMonth)) {
3536
+ return _objectSpread(_objectSpread({}, state), {}, {
3537
+ currentMonth: undefined,
3538
+ displayedMonth: ''
3539
+ });
3540
+ }
3541
+ handleChange({
3542
+ day: state.currentDay,
3543
+ month: nextMonth,
3544
+ year: state.currentYear
3545
+ });
3546
+ return _objectSpread(_objectSpread({}, state), {}, {
3547
+ currentMonth: nextMonth,
3548
+ displayedMonth: nextMonth.toString()
3549
+ });
3550
+ }
3551
+ case 'year-change':
3552
+ {
3553
+ var nextYear = stringToNumber(action.nextYear || '');
3554
+ if (nextYear === undefined || !isNumber(action.nextYear)) {
3555
+ return _objectSpread(_objectSpread({}, state), {}, {
3556
+ currentYear: undefined,
3557
+ displayedYear: ''
3558
+ });
3559
+ }
3560
+ handleChange({
3561
+ day: state.currentDay,
3562
+ month: state.currentMonth,
3563
+ year: nextYear
3564
+ });
3565
+ return _objectSpread(_objectSpread({}, state), {}, {
3566
+ currentYear: nextYear,
3567
+ displayedYear: nextYear.toString()
3568
+ });
3569
+ }
3570
+ case 'day-blur':
3571
+ {
3572
+ var minDate = state.minDate,
3573
+ maxDate = state.maxDate;
3574
+ var nextCurrentDay = getDayInInterval(state.currentDay, minDate, maxDate);
3575
+ return _objectSpread(_objectSpread({}, state), {}, {
3576
+ displayedDay: nextCurrentDay ? dayFormatter(nextCurrentDay) : state.displayedDay
3577
+ });
3578
+ }
3579
+ case 'month-blur':
3580
+ {
3581
+ var _minDate = state.minDate,
3582
+ _maxDate = state.maxDate;
3583
+ var nextCurrentMonth = getMonthInInterval(state.currentMonth, _minDate, _maxDate);
3584
+ return _objectSpread(_objectSpread({}, state), {}, {
3585
+ currentMonth: nextCurrentMonth,
3586
+ displayedMonth: nextCurrentMonth !== undefined ? monthFormatter(nextCurrentMonth) : state.displayedMonth
3587
+ });
3588
+ }
3589
+ case 'year-blur':
3590
+ {
3591
+ var _minDate2 = state.minDate,
3592
+ _maxDate2 = state.maxDate;
3593
+ var nextCurrentYear = getYearInInterval(state.currentYear, _minDate2, _maxDate2);
3594
+ return _objectSpread(_objectSpread({}, state), {}, {
3595
+ currentYear: nextCurrentYear,
3596
+ displayedYear: nextCurrentYear !== undefined ? yearFormatter(nextCurrentYear) : state.displayedYear
3597
+ });
3598
+ }
3599
+ default:
3600
+ return state;
3476
3601
  }
3477
- return "".concat(theme.kitt.forms.datePicker[$partName].minWidth, "px");
3602
+ };
3603
+
3604
+ var InputTextContainer = /*#__PURE__*/styled.View.withConfig({
3605
+ displayName: "InputTextContainer"
3606
+ })(["position:relative;"]);
3607
+
3608
+ var _excluded$l = ["id", "right", "state", "variant", "internalForceState", "disabled", "autoCorrect", "textContentType", "autoComplete", "keyboardType", "multiline", "onSubmitEditing"];
3609
+ var InputText = /*#__PURE__*/forwardRef(function (_ref, ref) {
3610
+ var id = _ref.id,
3611
+ right = _ref.right;
3612
+ _ref.state;
3613
+ var _ref$variant = _ref.variant,
3614
+ variant = _ref$variant === void 0 ? 'outline' : _ref$variant,
3615
+ internalForceState = _ref.internalForceState,
3616
+ _ref$disabled = _ref.disabled,
3617
+ disabled = _ref$disabled === void 0 ? false : _ref$disabled,
3618
+ _ref$autoCorrect = _ref.autoCorrect,
3619
+ autoCorrect = _ref$autoCorrect === void 0 ? true : _ref$autoCorrect,
3620
+ _ref$textContentType = _ref.textContentType,
3621
+ textContentType = _ref$textContentType === void 0 ? 'none' : _ref$textContentType,
3622
+ _ref$autoComplete = _ref.autoComplete,
3623
+ autoComplete = _ref$autoComplete === void 0 ? 'off' : _ref$autoComplete,
3624
+ _ref$keyboardType = _ref.keyboardType,
3625
+ keyboardType = _ref$keyboardType === void 0 ? 'default' : _ref$keyboardType,
3626
+ multiline = _ref.multiline,
3627
+ onSubmitEditing = _ref.onSubmitEditing,
3628
+ props = _objectWithoutProperties(_ref, _excluded$l);
3629
+ var theme = /*#__PURE__*/useTheme();
3630
+ var fontSizeForNativeBase = createNativeBaseFontSize({
3631
+ base: 'body'
3632
+ });
3633
+ var shouldHandleSingleLineOnIOS = Platform.OS === 'ios' && !multiline;
3634
+ return /*#__PURE__*/jsxs(InputTextContainer, {
3635
+ $isDisabled: disabled,
3636
+ children: [/*#__PURE__*/jsx(Input, _objectSpread(_objectSpread({
3637
+ ref: ref,
3638
+ multiline: multiline,
3639
+ nativeID: id,
3640
+ isDisabled: internalForceState ? internalForceState === 'disabled' : disabled,
3641
+ isHovered: internalForceState ? internalForceState === 'hover' : undefined,
3642
+ isFocused: internalForceState ? internalForceState === 'focus' : undefined,
3643
+ keyboardType: keyboardType,
3644
+ autoComplete: autoComplete,
3645
+ autoCorrect: autoCorrect,
3646
+ textContentType: textContentType,
3647
+ fontSize: fontSizeForNativeBase,
3648
+ lineHeight:
3649
+ // On basic text input, we set the line-height to zero for iOS to fix vertical text alignment
3650
+ // This is a iOS only fix since having 0 as a line-height value breaks text inputs on Android
3651
+ shouldHandleSingleLineOnIOS ? 0 : fontSizeForNativeBase,
3652
+ fontWeight: "bodies.regular",
3653
+ fontFamily: "bodies.regular",
3654
+ py: !multiline && Platform.OS !== 'web' ? 0 : undefined,
3655
+ variant: variant
3656
+ }, props), {}, {
3657
+ onSubmitEditing: multiline ? function () {
3658
+ return null;
3659
+ } : onSubmitEditing
3660
+ })), right ? /*#__PURE__*/jsx(View, {
3661
+ position: "absolute",
3662
+ right: 0,
3663
+ top: 0,
3664
+ bottom: 0,
3665
+ justifyContent: "center",
3666
+ padding: theme.kitt.forms.input.rightContainer.padding,
3667
+ children: right
3668
+ }) : null]
3669
+ });
3478
3670
  });
3479
- function DatePickerInputPart(_ref4) {
3480
- var $state = _ref4.$state,
3481
- placeholder = _ref4.placeholder,
3482
- value = _ref4.value,
3483
- partName = _ref4.partName,
3484
- disabled = _ref4.disabled;
3485
- return /*#__PURE__*/jsx(ViewInput, {
3486
- $state: $state,
3487
- $partName: partName,
3488
- children: placeholder || value ? /*#__PURE__*/jsx(StyledTypographyText, {
3489
- color: !value || disabled ? 'black-light' : undefined,
3490
- children: value || placeholder
3491
- }) : null
3671
+
3672
+ function getCurrentInternalForcedState(_ref) {
3673
+ var isDisabled = _ref.isDisabled,
3674
+ isHoveredInternal = _ref.isHoveredInternal,
3675
+ isFocusedInternal = _ref.isFocusedInternal,
3676
+ isPressedInternal = _ref.isPressedInternal;
3677
+ if (isDisabled) return 'disabled';
3678
+ if (isHoveredInternal) return 'hover';
3679
+ if (isFocusedInternal) return 'focus';
3680
+ if (isPressedInternal) return 'hover';
3681
+ return 'default';
3682
+ }
3683
+ var InputPart = /*#__PURE__*/forwardRef(function (_ref2, ref) {
3684
+ var value = _ref2.value,
3685
+ placeholder = _ref2.placeholder,
3686
+ disabled = _ref2.disabled,
3687
+ isFocusedInternal = _ref2.isFocusedInternal,
3688
+ isHoveredInternal = _ref2.isHoveredInternal,
3689
+ isPressedInternal = _ref2.isPressedInternal,
3690
+ onChange = _ref2.onChange,
3691
+ onBlur = _ref2.onBlur;
3692
+ return /*#__PURE__*/jsx(InputText, {
3693
+ ref: ref,
3694
+ internalForceState: getCurrentInternalForcedState({
3695
+ isDisabled: disabled,
3696
+ isHoveredInternal: isHoveredInternal,
3697
+ isFocusedInternal: isFocusedInternal,
3698
+ isPressedInternal: isPressedInternal
3699
+ }),
3700
+ value: value,
3701
+ placeholder: placeholder,
3702
+ disabled: disabled,
3703
+ keyboardType: "numeric",
3704
+ textAlign: "center",
3705
+ onChange: onChange,
3706
+ onBlur: onBlur
3707
+ });
3708
+ });
3709
+
3710
+ function PartContainer(_ref) {
3711
+ var children = _ref.children,
3712
+ isStretch = _ref.isStretch,
3713
+ width = _ref.width;
3714
+ return /*#__PURE__*/jsx(View, {
3715
+ flex: createResponsiveStyleFromProp(isStretch, 0.33),
3716
+ flexGrow: createResponsiveStyleFromProp(isStretch, 1),
3717
+ width: isStretch ? undefined : width,
3718
+ children: children
3492
3719
  });
3493
3720
  }
3494
3721
 
3495
- function prefixWithZero(value) {
3496
- return "".concat(value).padStart(2, '0');
3722
+ var _excluded$k = ["value", "testID", "id", "stretch", "placeholder", "minDate", "maxDate", "disabled", "isFocusedInternal", "isHoveredInternal", "isPressedInternal", "onChange", "onBlur", "onFocus"];
3723
+ function KeyboardDatePicker(_ref) {
3724
+ var value = _ref.value,
3725
+ testID = _ref.testID,
3726
+ id = _ref.id,
3727
+ stretch = _ref.stretch,
3728
+ placeholder = _ref.placeholder,
3729
+ minDate = _ref.minDate,
3730
+ maxDate = _ref.maxDate,
3731
+ disabled = _ref.disabled,
3732
+ isFocusedInternal = _ref.isFocusedInternal,
3733
+ isHoveredInternal = _ref.isHoveredInternal,
3734
+ isPressedInternal = _ref.isPressedInternal,
3735
+ onChange = _ref.onChange,
3736
+ onBlur = _ref.onBlur,
3737
+ onFocus = _ref.onFocus;
3738
+ _objectWithoutProperties(_ref, _excluded$k);
3739
+ var dayRef = useRef(null);
3740
+ var monthRef = useRef(null);
3741
+ var yearRef = useRef(null);
3742
+ var defaultValue = value;
3743
+ var defaultDay = defaultValue === null || defaultValue === void 0 ? void 0 : defaultValue.getDate();
3744
+ var defaultMonth = defaultValue ? defaultValue.getMonth() + 1 : undefined;
3745
+ var defaultYear = defaultValue === null || defaultValue === void 0 ? void 0 : defaultValue.getFullYear();
3746
+ var _useReducer = useReducer(keyboardDatePickerReducer, {
3747
+ currentValue: defaultValue,
3748
+ currentDay: defaultDay,
3749
+ currentMonth: defaultMonth,
3750
+ currentYear: defaultYear,
3751
+ displayedDay: defaultDay ? dayFormatter(defaultDay) : '',
3752
+ displayedMonth: defaultMonth ? monthFormatter(defaultMonth) : '',
3753
+ displayedYear: defaultYear ? yearFormatter(defaultYear) : '',
3754
+ minDate: minDate,
3755
+ maxDate: maxDate,
3756
+ onChange: onChange,
3757
+ onBlur: onBlur,
3758
+ onFocus: onFocus
3759
+ }),
3760
+ _useReducer2 = _slicedToArray(_useReducer, 2),
3761
+ state = _useReducer2[0],
3762
+ dispatch = _useReducer2[1];
3763
+ var sharedInputPartProps = {
3764
+ isFocusedInternal: isFocusedInternal,
3765
+ isHoveredInternal: isHoveredInternal,
3766
+ isPressedInternal: isPressedInternal,
3767
+ disabled: disabled
3768
+ };
3769
+ return /*#__PURE__*/jsx(View, {
3770
+ testID: testID,
3771
+ nativeID: id,
3772
+ children: /*#__PURE__*/jsxs(HStack, {
3773
+ space: "kitt.2",
3774
+ children: [/*#__PURE__*/jsx(PartContainer, {
3775
+ isStretch: stretch,
3776
+ width: "kitt.forms.datePicker.day.minWidth",
3777
+ children: /*#__PURE__*/jsx(InputPart, _objectSpread(_objectSpread({
3778
+ ref: dayRef
3779
+ }, sharedInputPartProps), {}, {
3780
+ placeholder: placeholder === null || placeholder === void 0 ? void 0 : placeholder.day,
3781
+ value: state.displayedDay,
3782
+ onChange: function (e) {
3783
+ var nextDay = e.nativeEvent.text;
3784
+ dispatch({
3785
+ type: 'day-change',
3786
+ nextDay: nextDay
3787
+ });
3788
+ if (nextDay.length === 2 && monthRef.current) {
3789
+ monthRef.current.focus();
3790
+ }
3791
+ },
3792
+ onBlur: function () {
3793
+ return dispatch({
3794
+ type: 'day-blur'
3795
+ });
3796
+ }
3797
+ }))
3798
+ }), /*#__PURE__*/jsx(PartContainer, {
3799
+ isStretch: stretch,
3800
+ width: "kitt.forms.datePicker.month.minWidth",
3801
+ children: /*#__PURE__*/jsx(InputPart, _objectSpread(_objectSpread({
3802
+ ref: monthRef
3803
+ }, sharedInputPartProps), {}, {
3804
+ placeholder: placeholder === null || placeholder === void 0 ? void 0 : placeholder.month,
3805
+ value: state.displayedMonth,
3806
+ onChange: function (e) {
3807
+ var nextMonth = e.nativeEvent.text;
3808
+ dispatch({
3809
+ type: 'month-change',
3810
+ nextMonth: e.nativeEvent.text
3811
+ });
3812
+ if (nextMonth.length === 2 && yearRef.current) {
3813
+ yearRef.current.focus();
3814
+ }
3815
+ },
3816
+ onBlur: function () {
3817
+ return dispatch({
3818
+ type: 'month-blur'
3819
+ });
3820
+ }
3821
+ }))
3822
+ }), /*#__PURE__*/jsx(PartContainer, {
3823
+ isStretch: stretch,
3824
+ width: "kitt.forms.datePicker.year.minWidth",
3825
+ children: /*#__PURE__*/jsx(InputPart, _objectSpread(_objectSpread({
3826
+ ref: yearRef
3827
+ }, sharedInputPartProps), {}, {
3828
+ placeholder: placeholder === null || placeholder === void 0 ? void 0 : placeholder.year,
3829
+ value: state.displayedYear,
3830
+ onChange: function (e) {
3831
+ dispatch({
3832
+ type: 'year-change',
3833
+ nextYear: e.nativeEvent.text
3834
+ });
3835
+ },
3836
+ onBlur: function () {
3837
+ return dispatch({
3838
+ type: 'year-blur'
3839
+ });
3840
+ }
3841
+ }))
3842
+ })]
3843
+ })
3844
+ });
3497
3845
  }
3498
- var PartContainer = /*#__PURE__*/styled.View.withConfig({
3499
- displayName: "DatePickerInputs__PartContainer"
3500
- })(["margin-right:", ";", ";"], function (_ref) {
3501
- var theme = _ref.theme,
3502
- $isLast = _ref.$isLast;
3503
- return !$isLast ? "".concat(theme.kitt.spacing * 2, "px") : 0;
3504
- }, function (_ref2) {
3505
- var $isStretch = _ref2.$isStretch;
3506
- return $isStretch ? css(["flex:0.33;flex-grow:1;"]) : undefined;
3507
- });
3508
- var DatePickerPressable = /*#__PURE__*/styled.Pressable.withConfig({
3509
- displayName: "DatePickerInputs__DatePickerPressable"
3510
- })(["display:flex;flex-direction:row;", ";"], function (_ref3) {
3511
- var $isStretch = _ref3.$isStretch;
3512
- if ($isStretch) {
3513
- return css(["width:100%;"]);
3514
- }
3515
- return css(["align-self:baseline;"]);
3516
- });
3517
- function DatePickerInputs(_ref4) {
3518
- var state = _ref4.state,
3519
- internalForceState = _ref4.internalForceState,
3520
- isFocused = _ref4.isFocused,
3521
- disabled = _ref4.disabled,
3522
- stretch = _ref4.stretch,
3523
- id = _ref4.id,
3524
- testID = _ref4.testID,
3525
- handleModalOpen = _ref4.handleModalOpen,
3526
- currentValue = _ref4.currentValue,
3527
- placeholder = _ref4.placeholder;
3528
- var currentState = internalForceState || getInputUIState({
3529
- isFocused: isFocused,
3530
- isDisabled: Boolean(disabled),
3531
- formState: state
3532
- });
3533
- var sharedPartProps = {
3534
- disabled: disabled,
3535
- $state: currentState
3846
+
3847
+ function DatePickerInputs(_ref) {
3848
+ var disabled = _ref.disabled,
3849
+ stretch = _ref.stretch,
3850
+ id = _ref.id,
3851
+ testID = _ref.testID,
3852
+ currentValue = _ref.currentValue,
3853
+ placeholder = _ref.placeholder,
3854
+ isFocusedInternal = _ref.isFocusedInternal,
3855
+ isHoveredInternal = _ref.isHoveredInternal,
3856
+ isPressedInternal = _ref.isPressedInternal,
3857
+ onPress = _ref.onPress;
3858
+ var sharedInputPartProps = {
3859
+ isFocusedInternal: isFocusedInternal,
3860
+ isHoveredInternal: isHoveredInternal,
3861
+ isPressedInternal: isPressedInternal,
3862
+ disabled: disabled
3536
3863
  };
3537
- return /*#__PURE__*/jsxs(DatePickerPressable, {
3538
- $isStretch: stretch,
3864
+ return /*#__PURE__*/jsx(Pressable, {
3865
+ display: "flex",
3866
+ flexDirection: "row",
3867
+ position: "relative",
3868
+ alignSelf: createResponsiveStyleFromProp(stretch, undefined, 'base-line'),
3539
3869
  nativeID: id,
3540
3870
  disabled: disabled,
3541
3871
  testID: testID,
3542
- onPress: handleModalOpen,
3543
- children: [/*#__PURE__*/jsx(PartContainer, {
3544
- $isStretch: stretch,
3545
- children: /*#__PURE__*/jsx(DatePickerInputPart, _objectSpread(_objectSpread({}, sharedPartProps), {}, {
3546
- partName: "day",
3547
- value: currentValue ? prefixWithZero(currentValue.getDate()) : undefined,
3548
- placeholder: placeholder === null || placeholder === void 0 ? void 0 : placeholder.day
3549
- }))
3550
- }), /*#__PURE__*/jsx(PartContainer, {
3551
- $isStretch: stretch,
3552
- children: /*#__PURE__*/jsx(DatePickerInputPart, _objectSpread(_objectSpread({}, sharedPartProps), {}, {
3553
- partName: "month",
3554
- value: currentValue ? prefixWithZero(currentValue.getMonth() + 1) : undefined,
3555
- placeholder: placeholder === null || placeholder === void 0 ? void 0 : placeholder.month
3556
- }))
3557
- }), /*#__PURE__*/jsx(PartContainer, {
3558
- $isLast: true,
3559
- $isStretch: stretch,
3560
- children: /*#__PURE__*/jsx(DatePickerInputPart, _objectSpread(_objectSpread({}, sharedPartProps), {}, {
3561
- partName: "year",
3562
- value: currentValue ? currentValue.getFullYear() : undefined,
3563
- placeholder: placeholder === null || placeholder === void 0 ? void 0 : placeholder.year
3564
- }))
3565
- })]
3872
+ onPress: onPress,
3873
+ children: /*#__PURE__*/jsxs(View, {
3874
+ position: "relative",
3875
+ width: createResponsiveStyleFromProp(stretch, '100%'),
3876
+ children: [/*#__PURE__*/jsxs(HStack, {
3877
+ space: "kitt.2",
3878
+ width: createResponsiveStyleFromProp(stretch, '100%'),
3879
+ children: [/*#__PURE__*/jsx(PartContainer, {
3880
+ isStretch: stretch,
3881
+ width: "kitt.forms.datePicker.day.minWidth",
3882
+ children: /*#__PURE__*/jsx(InputPart, _objectSpread(_objectSpread({}, sharedInputPartProps), {}, {
3883
+ placeholder: placeholder === null || placeholder === void 0 ? void 0 : placeholder.day,
3884
+ value: currentValue ? dayFormatter(currentValue.getDate()) : undefined
3885
+ }))
3886
+ }), /*#__PURE__*/jsx(PartContainer, {
3887
+ isStretch: stretch,
3888
+ width: "kitt.forms.datePicker.month.minWidth",
3889
+ children: /*#__PURE__*/jsx(InputPart, _objectSpread(_objectSpread({}, sharedInputPartProps), {}, {
3890
+ placeholder: placeholder === null || placeholder === void 0 ? void 0 : placeholder.month,
3891
+ value: currentValue ? monthFormatter(currentValue.getMonth() + 1) : undefined
3892
+ }))
3893
+ }), /*#__PURE__*/jsx(PartContainer, {
3894
+ isStretch: stretch,
3895
+ width: "kitt.forms.datePicker.year.minWidth",
3896
+ children: /*#__PURE__*/jsx(InputPart, _objectSpread(_objectSpread({}, sharedInputPartProps), {}, {
3897
+ placeholder: placeholder === null || placeholder === void 0 ? void 0 : placeholder.year,
3898
+ value: currentValue ? yearFormatter(currentValue.getFullYear()) : undefined
3899
+ }))
3900
+ })]
3901
+ }), /*#__PURE__*/jsx(View, {
3902
+ width: "100%",
3903
+ height: "100%",
3904
+ position: "absolute",
3905
+ top: "0",
3906
+ left: "0"
3907
+ })]
3908
+ })
3566
3909
  });
3567
3910
  }
3568
3911
 
3569
- var _excluded$i = ["onBlur", "onFocus", "pickerDefaultDate", "pickerUITestID", "isDefaultVisible", "setIsFocused", "currentValue", "setCurrentValue", "onChange", "isFocused"];
3912
+ var _excluded$j = ["onBlur", "onFocus", "pickerDefaultDate", "pickerUITestID", "isDefaultVisible", "value", "onChange"];
3570
3913
  function DatePickerAndroid(_ref) {
3571
3914
  var onBlur = _ref.onBlur,
3572
3915
  onFocus = _ref.onFocus,
3573
3916
  pickerDefaultDate = _ref.pickerDefaultDate,
3574
3917
  pickerUITestID = _ref.pickerUITestID,
3575
3918
  isDefaultVisible = _ref.isDefaultVisible,
3576
- setIsFocused = _ref.setIsFocused,
3577
- currentValue = _ref.currentValue,
3578
- setCurrentValue = _ref.setCurrentValue,
3919
+ value = _ref.value,
3579
3920
  _onChange = _ref.onChange,
3580
- isFocused = _ref.isFocused,
3581
- props = _objectWithoutProperties(_ref, _excluded$i);
3921
+ props = _objectWithoutProperties(_ref, _excluded$j);
3922
+ var _useState = useState(false),
3923
+ _useState2 = _slicedToArray(_useState, 2),
3924
+ isFocused = _useState2[0],
3925
+ setIsFocused = _useState2[1];
3926
+ var _useState3 = useState(value),
3927
+ _useState4 = _slicedToArray(_useState3, 2),
3928
+ currentValue = _useState4[0],
3929
+ setCurrentValue = _useState4[1];
3582
3930
  var handleClose = function () {
3583
3931
  if (onBlur) onBlur();
3584
3932
  };
@@ -3606,9 +3954,9 @@ function DatePickerAndroid(_ref) {
3606
3954
  // eslint-disable-next-line react-hooks/exhaustive-deps
3607
3955
  }, []);
3608
3956
  return /*#__PURE__*/jsx(DatePickerInputs, _objectSpread({
3609
- handleModalOpen: handleModalOpen,
3610
3957
  currentValue: currentValue,
3611
- isFocused: isFocused
3958
+ isFocusedInternal: isFocused,
3959
+ onPress: handleModalOpen
3612
3960
  }, props));
3613
3961
  }
3614
3962
 
@@ -3646,11 +3994,11 @@ function ModalFooter(_ref3) {
3646
3994
  });
3647
3995
  }
3648
3996
 
3649
- var _excluded$h = ["as", "children"];
3997
+ var _excluded$i = ["as", "children"];
3650
3998
  function StyleWebWrapper(_ref) {
3651
3999
  var as = _ref.as,
3652
4000
  children = _ref.children,
3653
- props = _objectWithoutProperties(_ref, _excluded$h);
4001
+ props = _objectWithoutProperties(_ref, _excluded$i);
3654
4002
  if (Platform.OS !== 'web') return children;
3655
4003
  // as or default to div. If as is undefined, T is div but typescript is not sure
3656
4004
  return /*#__PURE__*/jsx(as || 'div', _objectSpread(_objectSpread({}, props), {}, {
@@ -3662,7 +4010,7 @@ function PressableIconButtonWebWrapperWithTheme() {
3662
4010
  throw new Error('This component is not supposed to be called in native');
3663
4011
  }
3664
4012
 
3665
- var _excluded$g = ["color", "disabled"];
4013
+ var _excluded$h = ["color", "disabled"];
3666
4014
  var PressableIconButtonWebWrapper = /*#__PURE__*/withTheme$1(PressableIconButtonWebWrapperWithTheme);
3667
4015
  var StyledPressableIconButton = /*#__PURE__*/styled.Pressable.withConfig({
3668
4016
  displayName: "PressableIconButton__StyledPressableIconButton"
@@ -3691,7 +4039,7 @@ var StyledPressableIconButton = /*#__PURE__*/styled.Pressable.withConfig({
3691
4039
  function PressableIconButton(_ref5) {
3692
4040
  var color = _ref5.color,
3693
4041
  disabled = _ref5.disabled,
3694
- props = _objectWithoutProperties(_ref5, _excluded$g);
4042
+ props = _objectWithoutProperties(_ref5, _excluded$h);
3695
4043
  return /*#__PURE__*/jsx(StyleWebWrapper, {
3696
4044
  as: PressableIconButtonWebWrapper,
3697
4045
  $isWhite: color === 'white',
@@ -4000,7 +4348,7 @@ function PlatformDateTimePicker(_ref) {
4000
4348
  }));
4001
4349
  }
4002
4350
 
4003
- var _excluded$f = ["title", "isVisible", "value", "validateButtonLabel", "onClose", "onChange"];
4351
+ var _excluded$g = ["title", "isVisible", "value", "validateButtonLabel", "onClose", "onChange"];
4004
4352
  function ModalTitle(_ref) {
4005
4353
  var children = _ref.children;
4006
4354
  return /*#__PURE__*/jsx(Modal.Header, {
@@ -4018,7 +4366,7 @@ function ModalPlatformDateTimePicker(_ref2) {
4018
4366
  validateButtonLabel = _ref2.validateButtonLabel,
4019
4367
  onClose = _ref2.onClose,
4020
4368
  onChange = _ref2.onChange,
4021
- props = _objectWithoutProperties(_ref2, _excluded$f);
4369
+ props = _objectWithoutProperties(_ref2, _excluded$g);
4022
4370
  var _useState = useState(value),
4023
4371
  _useState2 = _slicedToArray(_useState, 2),
4024
4372
  currentValue = _useState2[0],
@@ -4062,18 +4410,21 @@ function ModalPlatformDateTimePicker(_ref2) {
4062
4410
  });
4063
4411
  }
4064
4412
 
4065
- var _excluded$e = ["value", "pickerUITestID", "pickerUITitle", "pickerUIValidateButtonLabel", "isDefaultVisible", "onChange", "onFocus", "onBlur", "pickerDefaultDate"];
4066
- function DatePicker(_ref) {
4413
+ var _excluded$f = ["value", "pickerUITestID", "pickerUITitle", "pickerUIValidateButtonLabel", "isDefaultVisible", "pickerDefaultDate", "isFocusedInternal", "isHoveredInternal", "isPressedInternal", "onChange", "onFocus", "onBlur"];
4414
+ function DefaultNativeUIDatePicker(_ref) {
4067
4415
  var value = _ref.value,
4068
4416
  pickerUITestID = _ref.pickerUITestID,
4069
4417
  pickerUITitle = _ref.pickerUITitle,
4070
4418
  pickerUIValidateButtonLabel = _ref.pickerUIValidateButtonLabel,
4071
4419
  isDefaultVisible = _ref.isDefaultVisible,
4420
+ pickerDefaultDate = _ref.pickerDefaultDate,
4421
+ isFocusedInternal = _ref.isFocusedInternal,
4422
+ isHoveredInternal = _ref.isHoveredInternal,
4423
+ isPressedInternal = _ref.isPressedInternal,
4072
4424
  onChange = _ref.onChange,
4073
4425
  onFocus = _ref.onFocus,
4074
4426
  onBlur = _ref.onBlur,
4075
- pickerDefaultDate = _ref.pickerDefaultDate,
4076
- props = _objectWithoutProperties(_ref, _excluded$e);
4427
+ props = _objectWithoutProperties(_ref, _excluded$f);
4077
4428
  var _useState = useState(isDefaultVisible),
4078
4429
  _useState2 = _slicedToArray(_useState, 2),
4079
4430
  isPickerUIVisible = _useState2[0],
@@ -4086,19 +4437,6 @@ function DatePicker(_ref) {
4086
4437
  _useState6 = _slicedToArray(_useState5, 2),
4087
4438
  currentValue = _useState6[0],
4088
4439
  setCurrentValue = _useState6[1];
4089
- if (Platform.OS === 'android') {
4090
- return /*#__PURE__*/jsx(DatePickerAndroid, _objectSpread({
4091
- pickerDefaultDate: pickerDefaultDate,
4092
- pickerUITestID: pickerUITestID,
4093
- isDefaultVisible: isDefaultVisible,
4094
- currentValue: currentValue,
4095
- setCurrentValue: setCurrentValue,
4096
- isFocused: isFocused,
4097
- setIsFocused: setIsFocused,
4098
- onChange: onChange,
4099
- onBlur: onBlur
4100
- }, props));
4101
- }
4102
4440
  var handleModalClose = function () {
4103
4441
  if (onBlur) onBlur();
4104
4442
  setIsPickerUIVisible(false);
@@ -4106,13 +4444,15 @@ function DatePicker(_ref) {
4106
4444
  };
4107
4445
  return /*#__PURE__*/jsxs(Fragment, {
4108
4446
  children: [/*#__PURE__*/jsx(DatePickerInputs, _objectSpread({
4109
- handleModalOpen: function handleModalOpen() {
4447
+ currentValue: currentValue,
4448
+ isFocusedInternal: isFocused || isFocusedInternal,
4449
+ isHoveredInternal: isHoveredInternal,
4450
+ isPressedInternal: isPressedInternal,
4451
+ onPress: function handleModalOpen() {
4110
4452
  if (onFocus) onFocus();
4111
4453
  setIsPickerUIVisible(true);
4112
4454
  setIsFocused(true);
4113
- },
4114
- currentValue: currentValue,
4115
- isFocused: isFocused
4455
+ }
4116
4456
  }, props)), /*#__PURE__*/jsx(ModalPlatformDateTimePicker, {
4117
4457
  testID: pickerUITestID,
4118
4458
  value: currentValue,
@@ -4130,73 +4470,44 @@ function DatePicker(_ref) {
4130
4470
  });
4131
4471
  }
4132
4472
 
4133
- var InputTextContainer = /*#__PURE__*/styled.View.withConfig({
4134
- displayName: "InputTextContainer"
4135
- })(["position:relative;"]);
4473
+ var _excluded$e = ["value", "pickerUITestID", "isDefaultVisible", "pickerDefaultDate", "onChange", "onBlur"];
4474
+ function NativeUIDatePicker(_ref) {
4475
+ var value = _ref.value,
4476
+ pickerUITestID = _ref.pickerUITestID,
4477
+ isDefaultVisible = _ref.isDefaultVisible,
4478
+ pickerDefaultDate = _ref.pickerDefaultDate,
4479
+ onChange = _ref.onChange,
4480
+ onBlur = _ref.onBlur,
4481
+ props = _objectWithoutProperties(_ref, _excluded$e);
4482
+ if (Platform.OS === 'android') {
4483
+ return /*#__PURE__*/jsx(DatePickerAndroid, _objectSpread({
4484
+ pickerDefaultDate: pickerDefaultDate,
4485
+ pickerUITestID: pickerUITestID,
4486
+ isDefaultVisible: isDefaultVisible,
4487
+ value: value,
4488
+ onChange: onChange,
4489
+ onBlur: onBlur
4490
+ }, props));
4491
+ }
4492
+ return /*#__PURE__*/jsx(DefaultNativeUIDatePicker, _objectSpread({
4493
+ value: value,
4494
+ isDefaultVisible: isDefaultVisible,
4495
+ pickerUITestID: pickerUITestID,
4496
+ onChange: onChange,
4497
+ onBlur: onBlur
4498
+ }, props));
4499
+ }
4136
4500
 
4137
- var _excluded$d = ["id", "right", "state", "variant", "internalForceState", "disabled", "autoCorrect", "textContentType", "autoComplete", "keyboardType", "multiline", "onSubmitEditing"];
4138
- var InputText = /*#__PURE__*/forwardRef(function (_ref, ref) {
4139
- var id = _ref.id,
4140
- right = _ref.right;
4141
- _ref.state;
4142
- var _ref$variant = _ref.variant,
4143
- variant = _ref$variant === void 0 ? 'outline' : _ref$variant,
4144
- internalForceState = _ref.internalForceState,
4145
- _ref$disabled = _ref.disabled,
4146
- disabled = _ref$disabled === void 0 ? false : _ref$disabled,
4147
- _ref$autoCorrect = _ref.autoCorrect,
4148
- autoCorrect = _ref$autoCorrect === void 0 ? true : _ref$autoCorrect,
4149
- _ref$textContentType = _ref.textContentType,
4150
- textContentType = _ref$textContentType === void 0 ? 'none' : _ref$textContentType,
4151
- _ref$autoComplete = _ref.autoComplete,
4152
- autoComplete = _ref$autoComplete === void 0 ? 'off' : _ref$autoComplete,
4153
- _ref$keyboardType = _ref.keyboardType,
4154
- keyboardType = _ref$keyboardType === void 0 ? 'default' : _ref$keyboardType,
4155
- multiline = _ref.multiline,
4156
- onSubmitEditing = _ref.onSubmitEditing,
4501
+ var _excluded$d = ["fillMode"];
4502
+ function DatePicker(_ref) {
4503
+ var _ref$fillMode = _ref.fillMode,
4504
+ fillMode = _ref$fillMode === void 0 ? 'native' : _ref$fillMode,
4157
4505
  props = _objectWithoutProperties(_ref, _excluded$d);
4158
- var theme = /*#__PURE__*/useTheme();
4159
- var fontSizeForNativeBase = createNativeBaseFontSize({
4160
- base: 'body'
4161
- });
4162
- var shouldHandleSingleLineOnIOS = Platform.OS === 'ios' && !multiline;
4163
- return /*#__PURE__*/jsxs(InputTextContainer, {
4164
- $isDisabled: disabled,
4165
- children: [/*#__PURE__*/jsx(Input, _objectSpread(_objectSpread({
4166
- ref: ref,
4167
- multiline: multiline,
4168
- nativeID: id,
4169
- isDisabled: internalForceState ? internalForceState === 'disabled' : disabled,
4170
- isHovered: internalForceState ? internalForceState === 'hover' : undefined,
4171
- isFocused: internalForceState ? internalForceState === 'focus' : undefined,
4172
- keyboardType: keyboardType,
4173
- autoComplete: autoComplete,
4174
- autoCorrect: autoCorrect,
4175
- textContentType: textContentType,
4176
- fontSize: fontSizeForNativeBase,
4177
- lineHeight:
4178
- // On basic text input, we set the line-height to zero for iOS to fix vertical text alignment
4179
- // This is a iOS only fix since having 0 as a line-height value breaks text inputs on Android
4180
- shouldHandleSingleLineOnIOS ? 0 : fontSizeForNativeBase,
4181
- fontWeight: "bodies.regular",
4182
- fontFamily: "bodies.regular",
4183
- py: !multiline && Platform.OS !== 'web' ? 0 : undefined,
4184
- variant: variant
4185
- }, props), {}, {
4186
- onSubmitEditing: multiline ? function () {
4187
- return null;
4188
- } : onSubmitEditing
4189
- })), right ? /*#__PURE__*/jsx(View, {
4190
- position: "absolute",
4191
- right: 0,
4192
- top: 0,
4193
- bottom: 0,
4194
- justifyContent: "center",
4195
- padding: theme.kitt.forms.input.rightContainer.padding,
4196
- children: right
4197
- }) : null]
4198
- });
4199
- });
4506
+ if (fillMode === 'keyboard') {
4507
+ return /*#__PURE__*/jsx(KeyboardDatePicker, _objectSpread({}, props));
4508
+ }
4509
+ return /*#__PURE__*/jsx(NativeUIDatePicker, _objectSpread({}, props));
4510
+ }
4200
4511
 
4201
4512
  function InputEmail(props) {
4202
4513
  return /*#__PURE__*/jsx(InputText, _objectSpread({
@@ -5341,6 +5652,9 @@ function createKittNativeBaseCustomTheme(theme, appTheme) {
5341
5652
  typography: theme.typography.colors,
5342
5653
  palettes: theme.palettes,
5343
5654
  forms: {
5655
+ input: {
5656
+ states: theme.forms.input.states
5657
+ },
5344
5658
  radioButtonGroup: {
5345
5659
  item: {
5346
5660
  borderColor: theme.forms.radioButtonGroup.item.borderColor,
@@ -5384,6 +5698,9 @@ function createKittNativeBaseCustomTheme(theme, appTheme) {
5384
5698
  borderRadius: theme.dialogModal.borderRadius
5385
5699
  },
5386
5700
  forms: {
5701
+ input: {
5702
+ borderRadius: theme.forms.input.borderRadius
5703
+ },
5387
5704
  radioButtonGroup: {
5388
5705
  item: {
5389
5706
  borderRadius: theme.forms.radioButtonGroup.item.borderRadius
@@ -5415,6 +5732,9 @@ function createKittNativeBaseCustomTheme(theme, appTheme) {
5415
5732
  borderWidth: theme.button.borderWidth
5416
5733
  },
5417
5734
  forms: {
5735
+ input: {
5736
+ borderWidth: theme.forms.input.borderWidth
5737
+ },
5418
5738
  radioButtonGroup: {
5419
5739
  item: {
5420
5740
  borderWidth: theme.forms.radioButtonGroup.item.borderWidth
@@ -5459,6 +5779,21 @@ function createKittNativeBaseCustomTheme(theme, appTheme) {
5459
5779
  overlayPadding: theme.dialogModal.overlayPadding
5460
5780
  },
5461
5781
  forms: {
5782
+ datePicker: {
5783
+ minHeight: theme.forms.input.minHeight,
5784
+ day: {
5785
+ minWidth: theme.forms.datePicker.day.minWidth
5786
+ },
5787
+ month: {
5788
+ minWidth: theme.forms.datePicker.month.minWidth
5789
+ },
5790
+ year: {
5791
+ minWidth: theme.forms.datePicker.year.minWidth
5792
+ }
5793
+ },
5794
+ input: {
5795
+ minHeight: theme.forms.input.minHeight
5796
+ },
5462
5797
  radioButtonGroup: {
5463
5798
  item: {
5464
5799
  minHeight: theme.forms.radioButtonGroup.item.minHeight
@@ -5503,6 +5838,12 @@ function createKittNativeBaseCustomTheme(theme, appTheme) {
5503
5838
  overlayPadding: theme.dialogModal.overlayPadding
5504
5839
  },
5505
5840
  forms: {
5841
+ datePicker: {
5842
+ padding: theme.forms.input.padding
5843
+ },
5844
+ input: {
5845
+ padding: theme.forms.input.padding
5846
+ },
5506
5847
  radioButtonGroup: {
5507
5848
  item: {
5508
5849
  padding: theme.forms.radioButtonGroup.item.padding
@@ -5850,12 +6191,13 @@ function ContentPadding(_ref2) {
5850
6191
  }));
5851
6192
  }
5852
6193
 
5853
- var _excluded$6 = ["children", "shouldHandleBottomNotch", "style"];
6194
+ var _excluded$6 = ["children", "shouldHandleBottomNotch", "style", "shouldHandleTopNotch"];
5854
6195
  var StyledViewWithPadding = /*#__PURE__*/styled(ContentPadding).withConfig({
5855
6196
  displayName: "Body__StyledViewWithPadding"
5856
6197
  })(["padding-top:", "px;padding-bottom:", "px;"], function (_ref) {
5857
- var theme = _ref.theme;
5858
- return theme.kitt.spacing * 6;
6198
+ var theme = _ref.theme,
6199
+ $insetTop = _ref.$insetTop;
6200
+ return Math.max(theme.kitt.spacing * 6, $insetTop);
5859
6201
  }, function (_ref2) {
5860
6202
  var theme = _ref2.theme,
5861
6203
  $insetBottom = _ref2.$insetBottom;
@@ -5865,12 +6207,16 @@ function Body(_ref3) {
5865
6207
  var children = _ref3.children,
5866
6208
  shouldHandleBottomNotch = _ref3.shouldHandleBottomNotch,
5867
6209
  style = _ref3.style,
6210
+ shouldHandleTopNotch = _ref3.shouldHandleTopNotch,
5868
6211
  props = _objectWithoutProperties(_ref3, _excluded$6);
5869
6212
  var _useSafeAreaInsets = useSafeAreaInsets(),
5870
- bottom = _useSafeAreaInsets.bottom;
6213
+ bottom = _useSafeAreaInsets.bottom,
6214
+ top = _useSafeAreaInsets.top;
5871
6215
  var insetBottom = shouldHandleBottomNotch ? bottom : 0;
6216
+ var insetTop = shouldHandleTopNotch ? top : 0;
5872
6217
  return /*#__PURE__*/jsx(StyledViewWithPadding, _objectSpread(_objectSpread({}, props), {}, {
5873
6218
  $insetBottom: insetBottom,
6219
+ $insetTop: insetTop,
5874
6220
  style: style,
5875
6221
  children: children
5876
6222
  }));
@@ -5913,9 +6259,10 @@ function Footer(_ref5) {
5913
6259
 
5914
6260
  var HeaderContainer = /*#__PURE__*/styled(ContentPadding).withConfig({
5915
6261
  displayName: "Header__HeaderContainer"
5916
- })(["height:", "px;width:100%;justify-content:center;background-color:", ";padding-right:", "px;padding-left:", "px;", ";"], function (_ref) {
5917
- var theme = _ref.theme;
5918
- return theme.kitt.navigationModal.height;
6262
+ })(["height:", "px;width:100%;justify-content:center;background-color:", ";padding-right:", "px;padding-left:", "px;padding-top:", "px;", ";"], function (_ref) {
6263
+ var theme = _ref.theme,
6264
+ $insetTop = _ref.$insetTop;
6265
+ return theme.kitt.navigationModal.height + $insetTop;
5919
6266
  }, function (_ref2) {
5920
6267
  var theme = _ref2.theme,
5921
6268
  $isTransparent = _ref2.$isTransparent;
@@ -5930,64 +6277,73 @@ var HeaderContainer = /*#__PURE__*/styled(ContentPadding).withConfig({
5930
6277
  $hasLeft = _ref4.$hasLeft;
5931
6278
  return $hasLeft ? theme.kitt.spacing * 2 : theme.kitt.navigationModal.padding;
5932
6279
  }, function (_ref5) {
5933
- var $hasSeparator = _ref5.$hasSeparator;
6280
+ var $insetTop = _ref5.$insetTop;
6281
+ return $insetTop;
6282
+ }, function (_ref6) {
6283
+ var $hasSeparator = _ref6.$hasSeparator;
5934
6284
  if (!$hasSeparator) return undefined;
5935
- return css(["border-bottom-width:1px;border-bottom-color:", ";"], function (_ref6) {
5936
- var theme = _ref6.theme;
6285
+ return css(["border-bottom-width:1px;border-bottom-color:", ";"], function (_ref7) {
6286
+ var theme = _ref7.theme;
5937
6287
  return theme.kitt.colors.separator;
5938
6288
  });
5939
6289
  });
5940
6290
  var Row = /*#__PURE__*/styled(View$2).withConfig({
5941
6291
  displayName: "Header__Row"
5942
- })(["flex-direction:row;justify-content:", ";align-items:center;"], function (_ref7) {
5943
- var $hasContent = _ref7.$hasContent,
5944
- $hasLeft = _ref7.$hasLeft;
6292
+ })(["flex-direction:row;justify-content:", ";align-items:center;"], function (_ref8) {
6293
+ var $hasContent = _ref8.$hasContent,
6294
+ $hasLeft = _ref8.$hasLeft;
5945
6295
  return !$hasContent && !$hasLeft ? 'flex-end' : 'space-between';
5946
6296
  });
5947
6297
  var ButtonContainer = /*#__PURE__*/styled.View.withConfig({
5948
6298
  displayName: "Header__ButtonContainer"
5949
- })(["width:", "px;"], function (_ref8) {
5950
- var theme = _ref8.theme;
6299
+ })(["width:", "px;"], function (_ref9) {
6300
+ var theme = _ref9.theme;
5951
6301
  return theme.kitt.iconButton.width;
5952
6302
  });
5953
6303
  var ChildrenComponent = /*#__PURE__*/styled(View$2).withConfig({
5954
6304
  displayName: "Header__ChildrenComponent"
5955
- })(["flex:1;align-items:center;", ";"], function (_ref9) {
5956
- var theme = _ref9.theme,
5957
- $hasLeft = _ref9.$hasLeft,
5958
- $hasRight = _ref9.$hasRight;
6305
+ })(["flex:1;align-items:center;", ";"], function (_ref10) {
6306
+ var theme = _ref10.theme,
6307
+ $hasLeft = _ref10.$hasLeft,
6308
+ $hasRight = _ref10.$hasRight;
5959
6309
  var paddingHorizontal = theme.kitt.spacing * 2;
5960
6310
  return css(["padding-right:", "px;padding-left:", "px;"], $hasRight ? paddingHorizontal : 0, $hasLeft ? paddingHorizontal : 0);
5961
6311
  });
5962
6312
  var HeaderTitle = /*#__PURE__*/styled(Typography.Text).withConfig({
5963
6313
  displayName: "Header__HeaderTitle"
5964
- })(["flex:1;text-align:", ";", ";"], function (_ref10) {
5965
- var $hasLeft = _ref10.$hasLeft,
5966
- $hasRight = _ref10.$hasRight;
6314
+ })(["flex:1;text-align:", ";", ";"], function (_ref11) {
6315
+ var $hasLeft = _ref11.$hasLeft,
6316
+ $hasRight = _ref11.$hasRight;
5967
6317
  if (!$hasLeft && $hasRight) return 'left';
5968
6318
  return 'center';
5969
- }, function (_ref11) {
5970
- var theme = _ref11.theme,
5971
- $hasLeft = _ref11.$hasLeft,
5972
- $hasRight = _ref11.$hasRight;
6319
+ }, function (_ref12) {
6320
+ var theme = _ref12.theme,
6321
+ $hasLeft = _ref12.$hasLeft,
6322
+ $hasRight = _ref12.$hasRight;
5973
6323
  var paddingHorizontal = theme.kitt.spacing * 2;
5974
6324
  return css(["padding-right:", "px;padding-left:", "px;"], $hasRight ? paddingHorizontal : 0, $hasLeft ? paddingHorizontal : 0);
5975
6325
  });
5976
- function Header(_ref12) {
5977
- var _ref12$hasSeparator = _ref12.hasSeparator,
5978
- hasSeparator = _ref12$hasSeparator === void 0 ? true : _ref12$hasSeparator,
5979
- isTransparent = _ref12.isTransparent,
5980
- title = _ref12.title,
5981
- children = _ref12.children,
5982
- right = _ref12.right,
5983
- left = _ref12.left,
5984
- style = _ref12.style;
6326
+ function Header(_ref13) {
6327
+ var _ref13$hasSeparator = _ref13.hasSeparator,
6328
+ hasSeparator = _ref13$hasSeparator === void 0 ? true : _ref13$hasSeparator,
6329
+ isTransparent = _ref13.isTransparent,
6330
+ title = _ref13.title,
6331
+ children = _ref13.children,
6332
+ right = _ref13.right,
6333
+ left = _ref13.left,
6334
+ _ref13$shouldHandleTo = _ref13.shouldHandleTopNotch,
6335
+ shouldHandleTopNotch = _ref13$shouldHandleTo === void 0 ? true : _ref13$shouldHandleTo,
6336
+ style = _ref13.style;
6337
+ var _useSafeAreaInsets = useSafeAreaInsets(),
6338
+ top = _useSafeAreaInsets.top;
6339
+ var insetTop = shouldHandleTopNotch ? top : 0;
5985
6340
  var sharedProps = {
5986
6341
  $hasLeft: Boolean(left),
5987
6342
  $hasRight: Boolean(right)
5988
6343
  };
5989
6344
  return /*#__PURE__*/jsx(HeaderContainer, {
5990
6345
  $isTransparent: isTransparent,
6346
+ $insetTop: insetTop,
5991
6347
  $hasSeparator: hasSeparator,
5992
6348
  $hasLeft: Boolean(left),
5993
6349
  $hasRight: Boolean(right),
@@ -6059,9 +6415,7 @@ function NativeOpacityAnimation(_ref) {
6059
6415
  }
6060
6416
 
6061
6417
  function NativeSlideInAnimation(_ref) {
6062
- var _ref$topInset = _ref.topInset,
6063
- topInset = _ref$topInset === void 0 ? 0 : _ref$topInset,
6064
- visible = _ref.visible,
6418
+ var visible = _ref.visible,
6065
6419
  children = _ref.children,
6066
6420
  onEntered = _ref.onEntered,
6067
6421
  onExited = _ref.onExited;
@@ -6078,7 +6432,6 @@ function NativeSlideInAnimation(_ref) {
6078
6432
  // Since animation callback is called on component mount, we must make sure that the animation has been runed once to call it an exit
6079
6433
  if (!visible && hasRunAnimationRef.current) onExited();
6080
6434
  }
6081
- var viewportHeight = wHeight - topInset;
6082
6435
  var translateStyle = useAnimatedStyle(function () {
6083
6436
  var _f = function () {
6084
6437
  var _theme$kitt$navigatio = theme.kitt.navigationModal.animation.content,
@@ -6091,7 +6444,7 @@ function NativeSlideInAnimation(_ref) {
6091
6444
  y2 = _easing[3];
6092
6445
  return {
6093
6446
  transform: [{
6094
- translateY: withTiming(visible ? 0 : viewportHeight, {
6447
+ translateY: withTiming(visible ? 0 : wHeight, {
6095
6448
  duration: duration,
6096
6449
  easing: Easing$1.bezier(x1, y1, x2, y2)
6097
6450
  }, function () {
@@ -6105,7 +6458,7 @@ function NativeSlideInAnimation(_ref) {
6105
6458
  };
6106
6459
  _f.asString = "function _f(isFinished){const{runOnJS,handleAnimationFinished}=jsThis._closure;{if(!isFinished)return;runOnJS(handleAnimationFinished)();}}";
6107
6460
  _f.__workletHash = 14707844242190;
6108
- _f.__location = "/home/circleci/repo/@ornikar/kitt-universal/src/NavigationModal/components/NativeSlideInAnimation.tsx (49:12)";
6461
+ _f.__location = "/home/circleci/repo/@ornikar/kitt-universal/src/NavigationModal/components/NativeSlideInAnimation.tsx (45:12)";
6109
6462
  return _f;
6110
6463
  }())
6111
6464
  }]
@@ -6123,24 +6476,27 @@ function NativeSlideInAnimation(_ref) {
6123
6476
  },
6124
6477
  withTiming: withTiming,
6125
6478
  visible: visible,
6126
- viewportHeight: viewportHeight,
6479
+ wHeight: wHeight,
6127
6480
  Easing: {
6128
6481
  bezier: Easing$1.bezier
6129
6482
  },
6130
6483
  runOnJS: runOnJS,
6131
6484
  handleAnimationFinished: handleAnimationFinished
6132
6485
  };
6133
- _f.asString = "function _f(){const{theme,withTiming,visible,viewportHeight,Easing,runOnJS,handleAnimationFinished}=jsThis._closure;{const{duration:duration,easing:easing}=theme.kitt.navigationModal.animation.content;const[x1,y1,x2,y2]=easing;return{transform:[{translateY:withTiming(visible?0:viewportHeight,{duration:duration,easing:Easing.bezier(x1,y1,x2,y2)},function(isFinished){if(!isFinished)return;runOnJS(handleAnimationFinished)();})}]};}}";
6134
- _f.__workletHash = 505483620545;
6135
- _f.__location = "/home/circleci/repo/@ornikar/kitt-universal/src/NavigationModal/components/NativeSlideInAnimation.tsx (39:42)";
6486
+ _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)();})}]};}}";
6487
+ _f.__workletHash = 14160876288353;
6488
+ _f.__location = "/home/circleci/repo/@ornikar/kitt-universal/src/NavigationModal/components/NativeSlideInAnimation.tsx (35:42)";
6136
6489
  return _f;
6137
6490
  }());
6138
6491
  return /*#__PURE__*/jsx(Animated.View, {
6139
6492
  style: [{
6140
6493
  transform: [{
6141
- translateY: viewportHeight
6494
+ translateY: wHeight
6142
6495
  }]
6143
- }, translateStyle],
6496
+ }, translateStyle, {
6497
+ width: '100%',
6498
+ flex: 1
6499
+ }],
6144
6500
  children: children
6145
6501
  });
6146
6502
  }
@@ -6152,8 +6508,6 @@ function NavigationModalAnimation(_ref) {
6152
6508
  onEntered = _ref.onEntered,
6153
6509
  onExit = _ref.onExit,
6154
6510
  onExited = _ref.onExited;
6155
- var _useSafeAreaInsets = useSafeAreaInsets(),
6156
- top = _useSafeAreaInsets.top;
6157
6511
  var _useState = useState(visible),
6158
6512
  _useState2 = _slicedToArray(_useState, 2),
6159
6513
  isModalVisible = _useState2[0],
@@ -6194,14 +6548,14 @@ function NavigationModalAnimation(_ref) {
6194
6548
  children: /*#__PURE__*/jsx(Overlay, {
6195
6549
  onPress: handleAnimationExited
6196
6550
  })
6197
- }), /*#__PURE__*/jsxs(NativeSlideInAnimation, {
6198
- topInset: top,
6551
+ }), /*#__PURE__*/jsx(NativeSlideInAnimation, {
6199
6552
  visible: isContentVisible,
6200
6553
  onExited: handleAnimationExited,
6201
6554
  onEntered: onEntered,
6202
- children: [/*#__PURE__*/jsx(View, {
6203
- height: top
6204
- }), children]
6555
+ children: /*#__PURE__*/jsx(View, {
6556
+ flex: 1,
6557
+ children: children
6558
+ })
6205
6559
  })]
6206
6560
  })
6207
6561
  });
@@ -7302,6 +7656,34 @@ function Tag(_ref6) {
7302
7656
  });
7303
7657
  }
7304
7658
 
7659
+ /** @deprecated this mixin is not SSR compatible */
7660
+ var styledTextInputMixin = /*#__PURE__*/css(["background-color:", ";border-width:", "px;border-radius:", "px;border-color:", ";font-size:", ";color:", ";font-family:", ";"], function (_ref) {
7661
+ var theme = _ref.theme,
7662
+ $state = _ref.$state;
7663
+ return $state === 'disabled' ? theme.kitt.forms.input.states.disabled.backgroundColor : theme.kitt.forms.input.states["default"].backgroundColor;
7664
+ }, function (_ref2) {
7665
+ var theme = _ref2.theme;
7666
+ return theme.kitt.forms.input.borderWidth;
7667
+ }, function (_ref3) {
7668
+ var theme = _ref3.theme;
7669
+ return theme.kitt.forms.input.borderRadius;
7670
+ }, function (_ref4) {
7671
+ var theme = _ref4.theme,
7672
+ $state = _ref4.$state;
7673
+ return theme.kitt.forms.input.states[$state].borderColor;
7674
+ }, function (_ref5) {
7675
+ var theme = _ref5.theme;
7676
+ var typeConfigKey = getTypographyTypeConfigKey(theme);
7677
+ return "".concat(theme.kitt.typography.types.bodies.configs.body[typeConfigKey].fontSize, "px");
7678
+ }, function (_ref6) {
7679
+ var theme = _ref6.theme,
7680
+ $state = _ref6.$state;
7681
+ return theme.kitt.forms.input.states[$state].color || theme.kitt.forms.input.states["default"].color;
7682
+ }, function (_ref7) {
7683
+ var theme = _ref7.theme;
7684
+ return Platform.OS === 'web' ? theme.kitt.typography.types.bodies.fontFamily.web.regular : theme.kitt.typography.types.bodies.fontFamily["native"].regular;
7685
+ });
7686
+
7305
7687
  function Title(_ref) {
7306
7688
  var children = _ref.children;
7307
7689
  return /*#__PURE__*/jsx(Modal.Header, {