@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
@@ -760,9 +760,19 @@ const card = {
760
760
  };
761
761
 
762
762
  const webAnimationContentDuration$2 = 400;
763
- const webAnimationContentEasing$2 = [0.77, 0, 0.175, 1];
763
+ const webAnimationContentEasing$2 = {
764
+ x1: 0.77,
765
+ y1: 0,
766
+ x2: 0.175,
767
+ y2: 1
768
+ };
764
769
  const webAnimationOverlayDuration$2 = 250;
765
- const webAnimationOverlayEasing$2 = [0.42, 0, 1, 1];
770
+ const webAnimationOverlayEasing$2 = {
771
+ x1: 0.42,
772
+ y1: 0,
773
+ x2: 1,
774
+ y2: 1
775
+ };
766
776
  const maxWidth = 540;
767
777
  const overlayHorizontalPadding = 24;
768
778
  const cardModal = {
@@ -854,9 +864,19 @@ const choices = {
854
864
  };
855
865
 
856
866
  const webAnimationContentDuration$1 = 400;
857
- const webAnimationContentEasing$1 = [0.77, 0, 0.175, 1];
867
+ const webAnimationContentEasing$1 = {
868
+ x1: 0.77,
869
+ y1: 0,
870
+ x2: 0.175,
871
+ y2: 1
872
+ };
858
873
  const webAnimationOverlayDuration$1 = 250;
859
- const webAnimationOverlayEasing$1 = [0.42, 0, 1, 1];
874
+ const webAnimationOverlayEasing$1 = {
875
+ x1: 0.42,
876
+ y1: 0,
877
+ x2: 1,
878
+ y2: 1
879
+ };
860
880
  const dialogModal = {
861
881
  borderRadius: spacing * 2,
862
882
  maxWidth: 540,
@@ -1788,9 +1808,19 @@ const forms = {
1788
1808
  };
1789
1809
 
1790
1810
  const webAnimationContentDuration = 600;
1791
- const webAnimationContentEasing = [0.77, 0, 0.175, 1];
1811
+ const webAnimationContentEasing = {
1812
+ x1: 0.77,
1813
+ y1: 0,
1814
+ x2: 0.175,
1815
+ y2: 1
1816
+ };
1792
1817
  const webAnimationOverlayDuration = 250;
1793
- const webAnimationOverlayEasing = [0.42, 0, 1, 1];
1818
+ const webAnimationOverlayEasing = {
1819
+ x1: 0.42,
1820
+ y1: 0,
1821
+ x2: 1,
1822
+ y2: 1
1823
+ };
1794
1824
  const fullscreenModal = {
1795
1825
  header: {
1796
1826
  height: 56
@@ -1938,8 +1968,8 @@ const listItem = {
1938
1968
 
1939
1969
  const mapMarker = {
1940
1970
  home: {
1941
- default: colors.primaryLight,
1942
- selected: colors.primary,
1971
+ default: deepPurpleColorPalette['grey.9'],
1972
+ selected: deepPurpleColorPalette['grey.7'],
1943
1973
  svg: {
1944
1974
  height: 36
1945
1975
  },
@@ -1949,8 +1979,8 @@ const mapMarker = {
1949
1979
  }
1950
1980
  },
1951
1981
  meetingPoint: {
1952
- default: colors.black,
1953
- selected: colors.blackAnthracite,
1982
+ default: deepPurpleColorPalette['deepPurple.8'],
1983
+ selected: deepPurpleColorPalette['deepPurple.6'],
1954
1984
  svg: {
1955
1985
  width: 40,
1956
1986
  height: 43
@@ -4035,7 +4065,12 @@ function NativeOpacityAnimation$2({
4035
4065
  duration,
4036
4066
  easing
4037
4067
  } = theme.kitt.cardModal.animation.overlay;
4038
- const [x1, y1, x2, y2] = easing;
4068
+ const {
4069
+ x1,
4070
+ y1,
4071
+ x2,
4072
+ y2
4073
+ } = easing;
4039
4074
  return {
4040
4075
  opacity: Animated.withTiming(visible ? 1 : 0, {
4041
4076
  duration,
@@ -4073,7 +4108,12 @@ function NativeRotationAnimation$1({
4073
4108
  duration,
4074
4109
  easing
4075
4110
  } = theme.kitt.cardModal.animation.content;
4076
- const [x1, y1, x2, y2] = easing;
4111
+ const {
4112
+ x1,
4113
+ y1,
4114
+ x2,
4115
+ y2
4116
+ } = easing;
4077
4117
  rotation.value = Animated.withTiming(visible ? 0 : 5, {
4078
4118
  duration,
4079
4119
  easing: Animated.Easing.bezier(x1, y1, x2, y2)
@@ -4646,7 +4686,12 @@ function NativeOpacityAnimation$1({
4646
4686
  duration,
4647
4687
  easing
4648
4688
  } = theme.kitt.dialogModal.animation.overlay;
4649
- const [x1, y1, x2, y2] = easing;
4689
+ const {
4690
+ x1,
4691
+ y1,
4692
+ x2,
4693
+ y2
4694
+ } = easing;
4650
4695
  return {
4651
4696
  opacity: Animated.withTiming(visible ? 1 : 0, {
4652
4697
  duration,
@@ -4684,7 +4729,12 @@ function NativeRotationAnimation({
4684
4729
  duration,
4685
4730
  easing
4686
4731
  } = theme.kitt.dialogModal.animation.content;
4687
- const [x1, y1, x2, y2] = easing;
4732
+ const {
4733
+ x1,
4734
+ y1,
4735
+ x2,
4736
+ y2
4737
+ } = easing;
4688
4738
  rotation.value = Animated.withTiming(visible ? 0 : 5, {
4689
4739
  duration,
4690
4740
  easing: Animated.Easing.bezier(x1, y1, x2, y2)
@@ -6306,7 +6356,7 @@ function DocumentPicker({
6306
6356
  ...documentPickerOptions,
6307
6357
  multiple: false
6308
6358
  });
6309
- if (!result.canceled && result.assets[0].file) {
6359
+ if (!result.canceled && result.assets[0]?.file) {
6310
6360
  onDocumentUpload(result.assets[0].file);
6311
6361
  }
6312
6362
  },
@@ -6333,7 +6383,7 @@ function ImagePicker({
6333
6383
  ...imagePickerOptions,
6334
6384
  allowsMultipleSelection: false
6335
6385
  });
6336
- if (!result.canceled) {
6386
+ if (!result.canceled && result.assets[0]) {
6337
6387
  onImageSelected(result.assets[0]);
6338
6388
  }
6339
6389
  },
@@ -6782,17 +6832,17 @@ function GoogleMapsAutocompleteProvider({
6782
6832
  dispatch({
6783
6833
  type: 'search-error'
6784
6834
  });
6785
- return;
6786
6835
  }
6787
-
6788
- // We cache the results to avoid calling the API again if the user types the same value
6789
- searchResultsCache.current[value] = results;
6790
- dispatch({
6791
- type: 'search-success',
6792
- payload: {
6793
- results
6794
- }
6795
- });
6836
+ if (results) {
6837
+ // We cache the results to avoid calling the API again if the user types the same value
6838
+ searchResultsCache.current[value] = results;
6839
+ dispatch({
6840
+ type: 'search-success',
6841
+ payload: {
6842
+ results
6843
+ }
6844
+ });
6845
+ }
6796
6846
  } catch (error) {
6797
6847
  dispatch({
6798
6848
  type: 'search-error'
@@ -7870,7 +7920,12 @@ function NativeOpacityAnimation({
7870
7920
  duration,
7871
7921
  easing
7872
7922
  } = theme.kitt.fullscreenModal.animation.overlay;
7873
- const [x1, y1, x2, y2] = easing;
7923
+ const {
7924
+ x1,
7925
+ y1,
7926
+ x2,
7927
+ y2
7928
+ } = easing;
7874
7929
  return {
7875
7930
  opacity: Animated.withTiming(visible ? 1 : 0, {
7876
7931
  duration,
@@ -7909,7 +7964,12 @@ function NativeSlideInAnimation({
7909
7964
  duration,
7910
7965
  easing
7911
7966
  } = theme.kitt.fullscreenModal.animation.content;
7912
- const [x1, y1, x2, y2] = easing;
7967
+ const {
7968
+ x1,
7969
+ y1,
7970
+ x2,
7971
+ y2
7972
+ } = easing;
7913
7973
  return {
7914
7974
  transform: [{
7915
7975
  translateY: Animated.withTiming(visible ? 0 : wHeight, {
@@ -8567,12 +8627,11 @@ const SvgPinMarkerinline = props => /*#__PURE__*/jsxRuntime.jsxs("svg", {
8567
8627
  width: 34,
8568
8628
  height: 36,
8569
8629
  viewBox: "0 0 34 36",
8570
- fill: "none",
8630
+ fill: "currentColor",
8571
8631
  xmlns: "http://www.w3.org/2000/svg",
8572
8632
  ...props,
8573
8633
  children: [/*#__PURE__*/jsxRuntime.jsx("path", {
8574
8634
  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",
8575
- fill: "#7B66FF",
8576
8635
  stroke: "#fff"
8577
8636
  }), /*#__PURE__*/jsxRuntime.jsx("path", {
8578
8637
  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",
@@ -8597,6 +8656,13 @@ const SvgShadowinline = props => /*#__PURE__*/jsxRuntime.jsx("svg", {
8597
8656
  })
8598
8657
  });
8599
8658
 
8659
+ let MapMarkerVariantEnum = /*#__PURE__*/function (MapMarkerVariantEnum) {
8660
+ MapMarkerVariantEnum["HOME"] = "home";
8661
+ MapMarkerVariantEnum["MEETING_POINT"] = "meetingPoint";
8662
+ MapMarkerVariantEnum["CLOSE_MEETING_POINT"] = "closeMeetingPoint";
8663
+ return MapMarkerVariantEnum;
8664
+ }({});
8665
+
8600
8666
  const SCALE_DURATION = 300;
8601
8667
  const TRANSLATE_Y_DURATION = 150;
8602
8668
  const useNativeAnimation = ({
@@ -8653,18 +8719,12 @@ const getBackgroundColor = ({
8653
8719
  isSelected,
8654
8720
  variant
8655
8721
  }) => {
8656
- if (variant === 'home') {
8722
+ if (variant === MapMarkerVariantEnum.HOME || variant === MapMarkerVariantEnum.CLOSE_MEETING_POINT) {
8657
8723
  return isSelected || isHovered ? theme.mapMarker.home.selected : theme.mapMarker.home.default;
8658
8724
  }
8659
8725
  return isSelected || isHovered ? theme.mapMarker.meetingPoint.selected : theme.mapMarker.meetingPoint.default;
8660
8726
  };
8661
8727
 
8662
- let MapMarkerVariantEnum = /*#__PURE__*/function (MapMarkerVariantEnum) {
8663
- MapMarkerVariantEnum["HOME"] = "home";
8664
- MapMarkerVariantEnum["MEETING_POINT"] = "meetingPoint";
8665
- MapMarkerVariantEnum["CLOSE_MEETING_POINT"] = "closeMeetingPoint";
8666
- return MapMarkerVariantEnum;
8667
- }({});
8668
8728
  function StaticMapMarker$1({
8669
8729
  variant,
8670
8730
  isHovered,
@@ -12601,12 +12661,13 @@ function TabBar({
12601
12661
  ...props,
12602
12662
  children: React.Children.map(tabItems, (child, index) => {
12603
12663
  const tab = tabs[index];
12664
+ if (!tab) throw new Error(`TabBar: tab is undefined at index ${index}`);
12604
12665
  return /*#__PURE__*/jsxRuntime.jsx(View, {
12605
12666
  children: /*#__PURE__*/React.cloneElement(child, {
12606
12667
  color,
12607
12668
  onPress: event => {
12608
12669
  onChangeTab({
12609
- tab: tabs[index],
12670
+ tab,
12610
12671
  index
12611
12672
  });
12612
12673
  child.props.onPress?.(event);