@ornikar/kitt-universal 27.4.0 → 27.5.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 (61) hide show
  1. package/CHANGELOG.md +10 -0
  2. package/dist/definitions/CardModal/CardModalAnimation/CardModalAnimation.web.d.ts.map +1 -1
  3. package/dist/definitions/DialogModal/DialogModalAnimation/DialogModalAnimation.web.d.ts.map +1 -1
  4. package/dist/definitions/FullscreenModal/FullscreenModalAnimation.web.d.ts.map +1 -1
  5. package/dist/definitions/GoogleMapsAutocompleteProvider/GoogleMapsAutocompleteProvider.d.ts.map +1 -1
  6. package/dist/definitions/MapMarker/MapMarker.d.ts +2 -5
  7. package/dist/definitions/MapMarker/MapMarker.d.ts.map +1 -1
  8. package/dist/definitions/MapMarker/constants.d.ts +6 -0
  9. package/dist/definitions/MapMarker/constants.d.ts.map +1 -0
  10. package/dist/definitions/MapMarker/utils/getBackgroundColor.d.ts +2 -1
  11. package/dist/definitions/MapMarker/utils/getBackgroundColor.d.ts.map +1 -1
  12. package/dist/definitions/Picker/Picker.web.d.ts.map +1 -1
  13. package/dist/definitions/TabBar/TabBar.d.ts.map +1 -1
  14. package/dist/definitions/TimePicker/TimePicker.web.d.ts.map +1 -1
  15. package/dist/definitions/themes/late-ocean/cardModal.d.ts +21 -4
  16. package/dist/definitions/themes/late-ocean/cardModal.d.ts.map +1 -1
  17. package/dist/definitions/themes/late-ocean/dialogModal.d.ts +21 -4
  18. package/dist/definitions/themes/late-ocean/dialogModal.d.ts.map +1 -1
  19. package/dist/definitions/themes/late-ocean/fullscreenModal.d.ts +21 -4
  20. package/dist/definitions/themes/late-ocean/fullscreenModal.d.ts.map +1 -1
  21. package/dist/definitions/themes/late-ocean/shadows.d.ts +4 -2
  22. package/dist/definitions/themes/late-ocean/shadows.d.ts.map +1 -1
  23. package/dist/definitions/themes/late-ocean/skeleton.d.ts +2 -1
  24. package/dist/definitions/themes/late-ocean/skeleton.d.ts.map +1 -1
  25. package/dist/index-metro.es.android.js +100 -39
  26. package/dist/index-metro.es.android.js.map +1 -1
  27. package/dist/index-metro.es.ios.js +100 -39
  28. package/dist/index-metro.es.ios.js.map +1 -1
  29. package/dist/index-node-22.17.cjs.js +99 -38
  30. package/dist/index-node-22.17.cjs.js.map +1 -1
  31. package/dist/index-node-22.17.cjs.web.css +2 -2
  32. package/dist/index-node-22.17.cjs.web.js +66 -32
  33. package/dist/index-node-22.17.cjs.web.js.map +1 -1
  34. package/dist/index-node-22.17.es.mjs +99 -38
  35. package/dist/index-node-22.17.es.mjs.map +1 -1
  36. package/dist/index-node-22.17.es.web.css +2 -2
  37. package/dist/index-node-22.17.es.web.mjs +66 -32
  38. package/dist/index-node-22.17.es.web.mjs.map +1 -1
  39. package/dist/index.es.js +97 -74
  40. package/dist/index.es.js.map +1 -1
  41. package/dist/index.es.web.js +76 -44
  42. package/dist/index.es.web.js.map +1 -1
  43. package/dist/linaria-themes-metro.es.android.js +40 -10
  44. package/dist/linaria-themes-metro.es.android.js.map +1 -1
  45. package/dist/linaria-themes-metro.es.ios.js +40 -10
  46. package/dist/linaria-themes-metro.es.ios.js.map +1 -1
  47. package/dist/linaria-themes-node-22.17.cjs.js +40 -10
  48. package/dist/linaria-themes-node-22.17.cjs.js.map +1 -1
  49. package/dist/linaria-themes-node-22.17.cjs.web.js +40 -10
  50. package/dist/linaria-themes-node-22.17.cjs.web.js.map +1 -1
  51. package/dist/linaria-themes-node-22.17.es.mjs +40 -10
  52. package/dist/linaria-themes-node-22.17.es.mjs.map +1 -1
  53. package/dist/linaria-themes-node-22.17.es.web.mjs +40 -10
  54. package/dist/linaria-themes-node-22.17.es.web.mjs.map +1 -1
  55. package/dist/linaria-themes.es.js +40 -10
  56. package/dist/linaria-themes.es.js.map +1 -1
  57. package/dist/linaria-themes.es.web.js +40 -10
  58. package/dist/linaria-themes.es.web.js.map +1 -1
  59. package/dist/styles.css +2 -2
  60. package/dist/tsbuildinfo +1 -1
  61. package/package.json +1 -1
@@ -751,9 +751,19 @@ var card = {
751
751
  };
752
752
 
753
753
  var webAnimationContentDuration$2 = 400;
754
- var webAnimationContentEasing$2 = [0.77, 0, 0.175, 1];
754
+ var webAnimationContentEasing$2 = {
755
+ x1: 0.77,
756
+ y1: 0,
757
+ x2: 0.175,
758
+ y2: 1
759
+ };
755
760
  var webAnimationOverlayDuration$2 = 250;
756
- var webAnimationOverlayEasing$2 = [0.42, 0, 1, 1];
761
+ var webAnimationOverlayEasing$2 = {
762
+ x1: 0.42,
763
+ y1: 0,
764
+ x2: 1,
765
+ y2: 1
766
+ };
757
767
  var maxWidth = 540;
758
768
  var overlayHorizontalPadding = 24;
759
769
  var cardModal = {
@@ -845,9 +855,19 @@ var choices = {
845
855
  };
846
856
 
847
857
  var webAnimationContentDuration$1 = 400;
848
- var webAnimationContentEasing$1 = [0.77, 0, 0.175, 1];
858
+ var webAnimationContentEasing$1 = {
859
+ x1: 0.77,
860
+ y1: 0,
861
+ x2: 0.175,
862
+ y2: 1
863
+ };
849
864
  var webAnimationOverlayDuration$1 = 250;
850
- var webAnimationOverlayEasing$1 = [0.42, 0, 1, 1];
865
+ var webAnimationOverlayEasing$1 = {
866
+ x1: 0.42,
867
+ y1: 0,
868
+ x2: 1,
869
+ y2: 1
870
+ };
851
871
  var dialogModal = {
852
872
  borderRadius: spacing * 2,
853
873
  maxWidth: 540,
@@ -1779,9 +1799,19 @@ var forms = {
1779
1799
  };
1780
1800
 
1781
1801
  var webAnimationContentDuration = 600;
1782
- var webAnimationContentEasing = [0.77, 0, 0.175, 1];
1802
+ var webAnimationContentEasing = {
1803
+ x1: 0.77,
1804
+ y1: 0,
1805
+ x2: 0.175,
1806
+ y2: 1
1807
+ };
1783
1808
  var webAnimationOverlayDuration = 250;
1784
- var webAnimationOverlayEasing = [0.42, 0, 1, 1];
1809
+ var webAnimationOverlayEasing = {
1810
+ x1: 0.42,
1811
+ y1: 0,
1812
+ x2: 1,
1813
+ y2: 1
1814
+ };
1785
1815
  var fullscreenModal = {
1786
1816
  header: {
1787
1817
  height: 56
@@ -1929,8 +1959,8 @@ var listItem = {
1929
1959
 
1930
1960
  var mapMarker = {
1931
1961
  home: {
1932
- "default": colors.primaryLight,
1933
- selected: colors.primary,
1962
+ "default": deepPurpleColorPalette['grey.9'],
1963
+ selected: deepPurpleColorPalette['grey.7'],
1934
1964
  svg: {
1935
1965
  height: 36
1936
1966
  },
@@ -1940,8 +1970,8 @@ var mapMarker = {
1940
1970
  }
1941
1971
  },
1942
1972
  meetingPoint: {
1943
- "default": colors.black,
1944
- selected: colors.blackAnthracite,
1973
+ "default": deepPurpleColorPalette['deepPurple.8'],
1974
+ selected: deepPurpleColorPalette['deepPurple.6'],
1945
1975
  svg: {
1946
1976
  width: 40,
1947
1977
  height: 43
@@ -5756,7 +5786,7 @@ function DocumentPicker(_ref) {
5756
5786
  var childElement = Children.only(children);
5757
5787
  var handlePickDocument = /*#__PURE__*/function () {
5758
5788
  var _ref2 = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
5759
- var _childElement$props$o, _childElement$props;
5789
+ var _childElement$props$o, _childElement$props, _result$assets$;
5760
5790
  var result;
5761
5791
  return _regeneratorRuntime().wrap(function (_context) {
5762
5792
  while (1) switch (_context.prev = _context.next) {
@@ -5774,7 +5804,7 @@ function DocumentPicker(_ref) {
5774
5804
  }));
5775
5805
  case 5:
5776
5806
  result = _context.sent;
5777
- if (!result.canceled && result.assets[0].file) {
5807
+ if (!result.canceled && (_result$assets$ = result.assets[0]) !== null && _result$assets$ !== void 0 && _result$assets$.file) {
5778
5808
  onDocumentUpload(result.assets[0].file);
5779
5809
  }
5780
5810
  case 7:
@@ -5827,7 +5857,7 @@ function ImagePicker(_ref) {
5827
5857
  }));
5828
5858
  case 5:
5829
5859
  result = _context.sent;
5830
- if (!result.canceled) {
5860
+ if (!result.canceled && result.assets[0]) {
5831
5861
  onImageSelected(result.assets[0]);
5832
5862
  }
5833
5863
  case 7:
@@ -6136,36 +6166,34 @@ function GoogleMapsAutocompleteProvider(_ref) {
6136
6166
  _yield$predictionsPro = _context.sent;
6137
6167
  results = _yield$predictionsPro.results;
6138
6168
  status = _yield$predictionsPro.status;
6139
- if (!(status !== 'OK')) {
6140
- _context.next = 13;
6141
- break;
6169
+ if (status !== 'OK') {
6170
+ dispatch({
6171
+ type: 'search-error'
6172
+ });
6142
6173
  }
6143
- dispatch({
6144
- type: 'search-error'
6145
- });
6146
- return _context.abrupt("return");
6147
- case 13:
6148
- // We cache the results to avoid calling the API again if the user types the same value
6149
- searchResultsCache.current[value] = results;
6150
- dispatch({
6151
- type: 'search-success',
6152
- payload: {
6153
- results: results
6154
- }
6155
- });
6156
- _context.next = 20;
6174
+ if (results) {
6175
+ // We cache the results to avoid calling the API again if the user types the same value
6176
+ searchResultsCache.current[value] = results;
6177
+ dispatch({
6178
+ type: 'search-success',
6179
+ payload: {
6180
+ results: results
6181
+ }
6182
+ });
6183
+ }
6184
+ _context.next = 17;
6157
6185
  break;
6158
- case 17:
6159
- _context.prev = 17;
6186
+ case 14:
6187
+ _context.prev = 14;
6160
6188
  _context.t0 = _context["catch"](4);
6161
6189
  dispatch({
6162
6190
  type: 'search-error'
6163
6191
  });
6164
- case 20:
6192
+ case 17:
6165
6193
  case "end":
6166
6194
  return _context.stop();
6167
6195
  }
6168
- }, _callee, null, [[4, 17]]);
6196
+ }, _callee, null, [[4, 14]]);
6169
6197
  }));
6170
6198
  return function () {
6171
6199
  return _ref2.apply(this, arguments);
@@ -7956,12 +7984,11 @@ var SvgPinMarkerinline = function SvgPinMarkerinline(props) {
7956
7984
  width: 34,
7957
7985
  height: 36,
7958
7986
  viewBox: "0 0 34 36",
7959
- fill: "none",
7987
+ fill: "currentColor",
7960
7988
  xmlns: "http://www.w3.org/2000/svg"
7961
7989
  }, props), {}, {
7962
7990
  children: [/*#__PURE__*/jsx("path", {
7963
7991
  d: "M17 .5C26.113.5 33.5 7.887 33.5 17c0 8.272-6.087 15.121-14.025 16.315-.05.008-.157.054-.337.211-.173.151-.351.345-.56.57a5.972 5.972 0 0 1-.662.637c-.232.181-.545.367-.916.367-.37 0-.684-.186-.916-.367a5.972 5.972 0 0 1-.662-.637c-.209-.224-.387-.419-.56-.57-.18-.157-.287-.203-.337-.21C6.586 32.12.5 25.271.5 17 .5 7.887 7.887.5 17 .5Z",
7964
- fill: "#7B66FF",
7965
7992
  stroke: "#fff"
7966
7993
  }), /*#__PURE__*/jsx("path", {
7967
7994
  d: "M17 10a5.506 5.506 0 0 0-5.5 5.5c0 4.706 5 8.26 5.213 8.41a.5.5 0 0 0 .574 0c.213-.15 5.213-3.704 5.213-8.41A5.506 5.506 0 0 0 17 10Zm0 3.5a2 2 0 1 1 0 4 2 2 0 0 1 0-4Z",
@@ -7989,6 +8016,13 @@ var SvgShadowinline = function SvgShadowinline(props) {
7989
8016
  }));
7990
8017
  };
7991
8018
 
8019
+ var MapMarkerVariantEnum = /*#__PURE__*/function (MapMarkerVariantEnum) {
8020
+ MapMarkerVariantEnum["HOME"] = "home";
8021
+ MapMarkerVariantEnum["MEETING_POINT"] = "meetingPoint";
8022
+ MapMarkerVariantEnum["CLOSE_MEETING_POINT"] = "closeMeetingPoint";
8023
+ return MapMarkerVariantEnum;
8024
+ }({});
8025
+
7992
8026
  var SCALE_DURATION = 300;
7993
8027
  var TRANSLATE_Y_DURATION = 150;
7994
8028
  var useNativeAnimation = function (_ref) {
@@ -8043,19 +8077,13 @@ var getBackgroundColor$1 = function (_ref) {
8043
8077
  var isHovered = _ref.isHovered,
8044
8078
  isSelected = _ref.isSelected,
8045
8079
  variant = _ref.variant;
8046
- if (variant === 'home') {
8080
+ if (variant === MapMarkerVariantEnum.HOME || variant === MapMarkerVariantEnum.CLOSE_MEETING_POINT) {
8047
8081
  return isSelected || isHovered ? theme.mapMarker.home.selected : theme.mapMarker.home["default"];
8048
8082
  }
8049
8083
  return isSelected || isHovered ? theme.mapMarker.meetingPoint.selected : theme.mapMarker.meetingPoint["default"];
8050
8084
  };
8051
8085
 
8052
8086
  var _excluded$d = ["onPress", "testID"];
8053
- var MapMarkerVariantEnum = /*#__PURE__*/function (MapMarkerVariantEnum) {
8054
- MapMarkerVariantEnum["HOME"] = "home";
8055
- MapMarkerVariantEnum["MEETING_POINT"] = "meetingPoint";
8056
- MapMarkerVariantEnum["CLOSE_MEETING_POINT"] = "closeMeetingPoint";
8057
- return MapMarkerVariantEnum;
8058
- }({});
8059
8087
  function StaticMapMarker$1(_ref) {
8060
8088
  var variant = _ref.variant,
8061
8089
  isHovered = _ref.isHovered,
@@ -11072,6 +11100,7 @@ function Picker(_ref) {
11072
11100
  paddingY: "kitt.2",
11073
11101
  children: childrenArray.map(function (child, index) {
11074
11102
  var currentValue = items[index];
11103
+ if (!currentValue) throw new Error("Picker: No value found for item at index ".concat(index));
11075
11104
  var _getItemProps = getItemProps({
11076
11105
  item: currentValue,
11077
11106
  index: index,
@@ -11881,13 +11910,14 @@ function TabBar(_ref) {
11881
11910
  }, props), {}, {
11882
11911
  children: Children.map(tabItems, function (child, index) {
11883
11912
  var tab = tabs[index];
11913
+ if (!tab) throw new Error("TabBar: tab is undefined at index ".concat(index));
11884
11914
  return /*#__PURE__*/jsx(View, {
11885
11915
  children: /*#__PURE__*/cloneElement(child, {
11886
11916
  color: color,
11887
11917
  onPress: function onPress(event) {
11888
11918
  var _child$props$onPress, _child$props;
11889
11919
  onChangeTab({
11890
- tab: tabs[index],
11920
+ tab: tab,
11891
11921
  index: index
11892
11922
  });
11893
11923
  (_child$props$onPress = (_child$props = child.props).onPress) === null || _child$props$onPress === void 0 || _child$props$onPress.call(_child$props, event);
@@ -12042,6 +12072,7 @@ var TimePicker = /*#__PURE__*/forwardRef(function (_ref2, ref) {
12042
12072
  _currentInputValue$sp2 = _slicedToArray(_currentInputValue$sp, 2),
12043
12073
  hours = _currentInputValue$sp2[0],
12044
12074
  minutes = _currentInputValue$sp2[1];
12075
+ if (!hours || !minutes) return;
12045
12076
 
12046
12077
  // Prepare the next date. It clones the date value passed as prop if available
12047
12078
  var nextDate = value ? new Date(value) : new Date();
@@ -12085,6 +12116,7 @@ var TimePicker = /*#__PURE__*/forwardRef(function (_ref2, ref) {
12085
12116
  _sanitizedValue$split2 = _slicedToArray(_sanitizedValue$split, 2),
12086
12117
  hours = _sanitizedValue$split2[0],
12087
12118
  minutes = _sanitizedValue$split2[1];
12119
+ if (!hours || !minutes) return;
12088
12120
  var currentHours = getDisplayedHours(hours);
12089
12121
  var currentMinutes = getDisplayedMinutes(minutes);
12090
12122
  var nextValue = "".concat(currentHours, ":").concat(currentMinutes);