@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
@@ -737,9 +737,19 @@ const card = {
737
737
  };
738
738
 
739
739
  const webAnimationContentDuration$2 = 400;
740
- const webAnimationContentEasing$2 = [0.77, 0, 0.175, 1];
740
+ const webAnimationContentEasing$2 = {
741
+ x1: 0.77,
742
+ y1: 0,
743
+ x2: 0.175,
744
+ y2: 1
745
+ };
741
746
  const webAnimationOverlayDuration$2 = 250;
742
- const webAnimationOverlayEasing$2 = [0.42, 0, 1, 1];
747
+ const webAnimationOverlayEasing$2 = {
748
+ x1: 0.42,
749
+ y1: 0,
750
+ x2: 1,
751
+ y2: 1
752
+ };
743
753
  const maxWidth = 540;
744
754
  const overlayHorizontalPadding = 24;
745
755
  const cardModal = {
@@ -831,9 +841,19 @@ const choices = {
831
841
  };
832
842
 
833
843
  const webAnimationContentDuration$1 = 400;
834
- const webAnimationContentEasing$1 = [0.77, 0, 0.175, 1];
844
+ const webAnimationContentEasing$1 = {
845
+ x1: 0.77,
846
+ y1: 0,
847
+ x2: 0.175,
848
+ y2: 1
849
+ };
835
850
  const webAnimationOverlayDuration$1 = 250;
836
- const webAnimationOverlayEasing$1 = [0.42, 0, 1, 1];
851
+ const webAnimationOverlayEasing$1 = {
852
+ x1: 0.42,
853
+ y1: 0,
854
+ x2: 1,
855
+ y2: 1
856
+ };
837
857
  const dialogModal = {
838
858
  borderRadius: spacing * 2,
839
859
  maxWidth: 540,
@@ -1765,9 +1785,19 @@ const forms = {
1765
1785
  };
1766
1786
 
1767
1787
  const webAnimationContentDuration = 600;
1768
- const webAnimationContentEasing = [0.77, 0, 0.175, 1];
1788
+ const webAnimationContentEasing = {
1789
+ x1: 0.77,
1790
+ y1: 0,
1791
+ x2: 0.175,
1792
+ y2: 1
1793
+ };
1769
1794
  const webAnimationOverlayDuration = 250;
1770
- const webAnimationOverlayEasing = [0.42, 0, 1, 1];
1795
+ const webAnimationOverlayEasing = {
1796
+ x1: 0.42,
1797
+ y1: 0,
1798
+ x2: 1,
1799
+ y2: 1
1800
+ };
1771
1801
  const fullscreenModal = {
1772
1802
  header: {
1773
1803
  height: 56
@@ -1915,8 +1945,8 @@ const listItem = {
1915
1945
 
1916
1946
  const mapMarker = {
1917
1947
  home: {
1918
- default: colors.primaryLight,
1919
- selected: colors.primary,
1948
+ default: deepPurpleColorPalette['grey.9'],
1949
+ selected: deepPurpleColorPalette['grey.7'],
1920
1950
  svg: {
1921
1951
  height: 36
1922
1952
  },
@@ -1926,8 +1956,8 @@ const mapMarker = {
1926
1956
  }
1927
1957
  },
1928
1958
  meetingPoint: {
1929
- default: colors.black,
1930
- selected: colors.blackAnthracite,
1959
+ default: deepPurpleColorPalette['deepPurple.8'],
1960
+ selected: deepPurpleColorPalette['deepPurple.6'],
1931
1961
  svg: {
1932
1962
  width: 40,
1933
1963
  height: 43
@@ -4012,7 +4042,12 @@ function NativeOpacityAnimation$2({
4012
4042
  duration,
4013
4043
  easing
4014
4044
  } = theme.kitt.cardModal.animation.overlay;
4015
- const [x1, y1, x2, y2] = easing;
4045
+ const {
4046
+ x1,
4047
+ y1,
4048
+ x2,
4049
+ y2
4050
+ } = easing;
4016
4051
  return {
4017
4052
  opacity: withTiming(visible ? 1 : 0, {
4018
4053
  duration,
@@ -4050,7 +4085,12 @@ function NativeRotationAnimation$1({
4050
4085
  duration,
4051
4086
  easing
4052
4087
  } = theme.kitt.cardModal.animation.content;
4053
- const [x1, y1, x2, y2] = easing;
4088
+ const {
4089
+ x1,
4090
+ y1,
4091
+ x2,
4092
+ y2
4093
+ } = easing;
4054
4094
  rotation.value = withTiming(visible ? 0 : 5, {
4055
4095
  duration,
4056
4096
  easing: Easing$1.bezier(x1, y1, x2, y2)
@@ -4623,7 +4663,12 @@ function NativeOpacityAnimation$1({
4623
4663
  duration,
4624
4664
  easing
4625
4665
  } = theme.kitt.dialogModal.animation.overlay;
4626
- const [x1, y1, x2, y2] = easing;
4666
+ const {
4667
+ x1,
4668
+ y1,
4669
+ x2,
4670
+ y2
4671
+ } = easing;
4627
4672
  return {
4628
4673
  opacity: withTiming(visible ? 1 : 0, {
4629
4674
  duration,
@@ -4661,7 +4706,12 @@ function NativeRotationAnimation({
4661
4706
  duration,
4662
4707
  easing
4663
4708
  } = theme.kitt.dialogModal.animation.content;
4664
- const [x1, y1, x2, y2] = easing;
4709
+ const {
4710
+ x1,
4711
+ y1,
4712
+ x2,
4713
+ y2
4714
+ } = easing;
4665
4715
  rotation.value = withTiming(visible ? 0 : 5, {
4666
4716
  duration,
4667
4717
  easing: Easing$1.bezier(x1, y1, x2, y2)
@@ -6283,7 +6333,7 @@ function DocumentPicker({
6283
6333
  ...documentPickerOptions,
6284
6334
  multiple: false
6285
6335
  });
6286
- if (!result.canceled && result.assets[0].file) {
6336
+ if (!result.canceled && result.assets[0]?.file) {
6287
6337
  onDocumentUpload(result.assets[0].file);
6288
6338
  }
6289
6339
  },
@@ -6310,7 +6360,7 @@ function ImagePicker({
6310
6360
  ...imagePickerOptions,
6311
6361
  allowsMultipleSelection: false
6312
6362
  });
6313
- if (!result.canceled) {
6363
+ if (!result.canceled && result.assets[0]) {
6314
6364
  onImageSelected(result.assets[0]);
6315
6365
  }
6316
6366
  },
@@ -6759,17 +6809,17 @@ function GoogleMapsAutocompleteProvider({
6759
6809
  dispatch({
6760
6810
  type: 'search-error'
6761
6811
  });
6762
- return;
6763
6812
  }
6764
-
6765
- // We cache the results to avoid calling the API again if the user types the same value
6766
- searchResultsCache.current[value] = results;
6767
- dispatch({
6768
- type: 'search-success',
6769
- payload: {
6770
- results
6771
- }
6772
- });
6813
+ if (results) {
6814
+ // We cache the results to avoid calling the API again if the user types the same value
6815
+ searchResultsCache.current[value] = results;
6816
+ dispatch({
6817
+ type: 'search-success',
6818
+ payload: {
6819
+ results
6820
+ }
6821
+ });
6822
+ }
6773
6823
  } catch (error) {
6774
6824
  dispatch({
6775
6825
  type: 'search-error'
@@ -7847,7 +7897,12 @@ function NativeOpacityAnimation({
7847
7897
  duration,
7848
7898
  easing
7849
7899
  } = theme.kitt.fullscreenModal.animation.overlay;
7850
- const [x1, y1, x2, y2] = easing;
7900
+ const {
7901
+ x1,
7902
+ y1,
7903
+ x2,
7904
+ y2
7905
+ } = easing;
7851
7906
  return {
7852
7907
  opacity: withTiming(visible ? 1 : 0, {
7853
7908
  duration,
@@ -7886,7 +7941,12 @@ function NativeSlideInAnimation({
7886
7941
  duration,
7887
7942
  easing
7888
7943
  } = theme.kitt.fullscreenModal.animation.content;
7889
- const [x1, y1, x2, y2] = easing;
7944
+ const {
7945
+ x1,
7946
+ y1,
7947
+ x2,
7948
+ y2
7949
+ } = easing;
7890
7950
  return {
7891
7951
  transform: [{
7892
7952
  translateY: withTiming(visible ? 0 : wHeight, {
@@ -8544,12 +8604,11 @@ const SvgPinMarkerinline = props => /*#__PURE__*/jsxs("svg", {
8544
8604
  width: 34,
8545
8605
  height: 36,
8546
8606
  viewBox: "0 0 34 36",
8547
- fill: "none",
8607
+ fill: "currentColor",
8548
8608
  xmlns: "http://www.w3.org/2000/svg",
8549
8609
  ...props,
8550
8610
  children: [/*#__PURE__*/jsx("path", {
8551
8611
  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",
8552
- fill: "#7B66FF",
8553
8612
  stroke: "#fff"
8554
8613
  }), /*#__PURE__*/jsx("path", {
8555
8614
  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",
@@ -8574,6 +8633,13 @@ const SvgShadowinline = props => /*#__PURE__*/jsx("svg", {
8574
8633
  })
8575
8634
  });
8576
8635
 
8636
+ let MapMarkerVariantEnum = /*#__PURE__*/function (MapMarkerVariantEnum) {
8637
+ MapMarkerVariantEnum["HOME"] = "home";
8638
+ MapMarkerVariantEnum["MEETING_POINT"] = "meetingPoint";
8639
+ MapMarkerVariantEnum["CLOSE_MEETING_POINT"] = "closeMeetingPoint";
8640
+ return MapMarkerVariantEnum;
8641
+ }({});
8642
+
8577
8643
  const SCALE_DURATION = 300;
8578
8644
  const TRANSLATE_Y_DURATION = 150;
8579
8645
  const useNativeAnimation = ({
@@ -8630,18 +8696,12 @@ const getBackgroundColor = ({
8630
8696
  isSelected,
8631
8697
  variant
8632
8698
  }) => {
8633
- if (variant === 'home') {
8699
+ if (variant === MapMarkerVariantEnum.HOME || variant === MapMarkerVariantEnum.CLOSE_MEETING_POINT) {
8634
8700
  return isSelected || isHovered ? theme.mapMarker.home.selected : theme.mapMarker.home.default;
8635
8701
  }
8636
8702
  return isSelected || isHovered ? theme.mapMarker.meetingPoint.selected : theme.mapMarker.meetingPoint.default;
8637
8703
  };
8638
8704
 
8639
- let MapMarkerVariantEnum = /*#__PURE__*/function (MapMarkerVariantEnum) {
8640
- MapMarkerVariantEnum["HOME"] = "home";
8641
- MapMarkerVariantEnum["MEETING_POINT"] = "meetingPoint";
8642
- MapMarkerVariantEnum["CLOSE_MEETING_POINT"] = "closeMeetingPoint";
8643
- return MapMarkerVariantEnum;
8644
- }({});
8645
8705
  function StaticMapMarker$1({
8646
8706
  variant,
8647
8707
  isHovered,
@@ -12578,12 +12638,13 @@ function TabBar({
12578
12638
  ...props,
12579
12639
  children: Children.map(tabItems, (child, index) => {
12580
12640
  const tab = tabs[index];
12641
+ if (!tab) throw new Error(`TabBar: tab is undefined at index ${index}`);
12581
12642
  return /*#__PURE__*/jsx(View, {
12582
12643
  children: /*#__PURE__*/cloneElement(child, {
12583
12644
  color,
12584
12645
  onPress: event => {
12585
12646
  onChangeTab({
12586
- tab: tabs[index],
12647
+ tab,
12587
12648
  index
12588
12649
  });
12589
12650
  child.props.onPress?.(event);