@ornikar/kitt-universal 26.3.1-canary.dd94a20641c146865234323ff2718101c6363315.0 → 26.3.1-canary.fcd36361858696a81c52c40672737eeca6e22f42.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 (64) hide show
  1. package/CHANGELOG.md +10 -3
  2. package/dist/definitions/BottomSheet/BottomSheet.d.ts +4 -0
  3. package/dist/definitions/BottomSheet/BottomSheet.d.ts.map +1 -1
  4. package/dist/definitions/BottomSheet/BottomSheet.web.d.ts +4 -0
  5. package/dist/definitions/BottomSheet/BottomSheet.web.d.ts.map +1 -1
  6. package/dist/definitions/CardModal/CardModalAnimation/CardModalAnimation.web.d.ts.map +1 -1
  7. package/dist/definitions/DialogModal/DialogModalAnimation/DialogModalAnimation.web.d.ts.map +1 -1
  8. package/dist/definitions/FullscreenModal/FullscreenModalAnimation.web.d.ts.map +1 -1
  9. package/dist/definitions/GoogleMapsAutocompleteProvider/GoogleMapsAutocompleteProvider.d.ts.map +1 -1
  10. package/dist/definitions/NavigationBottomSheet/NavigationBottomSheet.d.ts +11 -1
  11. package/dist/definitions/NavigationBottomSheet/NavigationBottomSheet.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/definitions/typography/Typography.d.ts +77 -66
  26. package/dist/definitions/typography/Typography.d.ts.map +1 -1
  27. package/dist/definitions/typography/TypographyLink.d.ts.map +1 -1
  28. package/dist/index-metro.es.android.js +103 -26
  29. package/dist/index-metro.es.android.js.map +1 -1
  30. package/dist/index-metro.es.ios.js +103 -26
  31. package/dist/index-metro.es.ios.js.map +1 -1
  32. package/dist/index-node-22.17.cjs.js +100 -25
  33. package/dist/index-node-22.17.cjs.js.map +1 -1
  34. package/dist/index-node-22.17.cjs.web.css +2 -2
  35. package/dist/index-node-22.17.cjs.web.js +59 -19
  36. package/dist/index-node-22.17.cjs.web.js.map +1 -1
  37. package/dist/index-node-22.17.es.mjs +100 -25
  38. package/dist/index-node-22.17.es.mjs.map +1 -1
  39. package/dist/index-node-22.17.es.web.css +2 -2
  40. package/dist/index-node-22.17.es.web.mjs +59 -19
  41. package/dist/index-node-22.17.es.web.mjs.map +1 -1
  42. package/dist/index.es.js +100 -61
  43. package/dist/index.es.js.map +1 -1
  44. package/dist/index.es.web.js +69 -31
  45. package/dist/index.es.web.js.map +1 -1
  46. package/dist/linaria-themes-metro.es.android.js +36 -6
  47. package/dist/linaria-themes-metro.es.android.js.map +1 -1
  48. package/dist/linaria-themes-metro.es.ios.js +36 -6
  49. package/dist/linaria-themes-metro.es.ios.js.map +1 -1
  50. package/dist/linaria-themes-node-22.17.cjs.js +36 -6
  51. package/dist/linaria-themes-node-22.17.cjs.js.map +1 -1
  52. package/dist/linaria-themes-node-22.17.cjs.web.js +36 -6
  53. package/dist/linaria-themes-node-22.17.cjs.web.js.map +1 -1
  54. package/dist/linaria-themes-node-22.17.es.mjs +36 -6
  55. package/dist/linaria-themes-node-22.17.es.mjs.map +1 -1
  56. package/dist/linaria-themes-node-22.17.es.web.mjs +36 -6
  57. package/dist/linaria-themes-node-22.17.es.web.mjs.map +1 -1
  58. package/dist/linaria-themes.es.js +36 -6
  59. package/dist/linaria-themes.es.js.map +1 -1
  60. package/dist/linaria-themes.es.web.js +36 -6
  61. package/dist/linaria-themes.es.web.js.map +1 -1
  62. package/dist/styles.css +2 -2
  63. package/dist/tsbuildinfo +1 -1
  64. package/package.json +25 -25
@@ -828,9 +828,19 @@ const card = {
828
828
  };
829
829
 
830
830
  const webAnimationContentDuration$2 = 400;
831
- const webAnimationContentEasing$2 = [0.77, 0, 0.175, 1];
831
+ const webAnimationContentEasing$2 = {
832
+ x1: 0.77,
833
+ y1: 0,
834
+ x2: 0.175,
835
+ y2: 1
836
+ };
832
837
  const webAnimationOverlayDuration$2 = 250;
833
- const webAnimationOverlayEasing$2 = [0.42, 0, 1, 1];
838
+ const webAnimationOverlayEasing$2 = {
839
+ x1: 0.42,
840
+ y1: 0,
841
+ x2: 1,
842
+ y2: 1
843
+ };
834
844
  const maxWidth = 540;
835
845
  const overlayHorizontalPadding = 24;
836
846
  const cardModal = {
@@ -904,9 +914,19 @@ const choices = {
904
914
  };
905
915
 
906
916
  const webAnimationContentDuration$1 = 400;
907
- const webAnimationContentEasing$1 = [0.77, 0, 0.175, 1];
917
+ const webAnimationContentEasing$1 = {
918
+ x1: 0.77,
919
+ y1: 0,
920
+ x2: 0.175,
921
+ y2: 1
922
+ };
908
923
  const webAnimationOverlayDuration$1 = 250;
909
- const webAnimationOverlayEasing$1 = [0.42, 0, 1, 1];
924
+ const webAnimationOverlayEasing$1 = {
925
+ x1: 0.42,
926
+ y1: 0,
927
+ x2: 1,
928
+ y2: 1
929
+ };
910
930
  const dialogModal = {
911
931
  borderRadius: 20,
912
932
  maxWidth: 540,
@@ -1832,9 +1852,19 @@ const forms = {
1832
1852
  };
1833
1853
 
1834
1854
  const webAnimationContentDuration = 600;
1835
- const webAnimationContentEasing = [0.77, 0, 0.175, 1];
1855
+ const webAnimationContentEasing = {
1856
+ x1: 0.77,
1857
+ y1: 0,
1858
+ x2: 0.175,
1859
+ y2: 1
1860
+ };
1836
1861
  const webAnimationOverlayDuration = 250;
1837
- const webAnimationOverlayEasing = [0.42, 0, 1, 1];
1862
+ const webAnimationOverlayEasing = {
1863
+ x1: 0.42,
1864
+ y1: 0,
1865
+ x2: 1,
1866
+ y2: 1
1867
+ };
1838
1868
  const fullscreenModal = {
1839
1869
  header: {
1840
1870
  height: 56
@@ -3923,6 +3953,11 @@ function BottomSheetContainerView(props) {
3923
3953
  padding: "kitt.bottomSheet.container.padding"
3924
3954
  }, props));
3925
3955
  }
3956
+
3957
+ /**
3958
+ * @internal This component is for kitt-universal internal use only.
3959
+ * Please use `NavigationBottomSheet` instead.
3960
+ */
3926
3961
  const BottomSheet = /*#__PURE__*/forwardRef(BottomSheetComp);
3927
3962
  BottomSheet.View = BottomSheetContainerView;
3928
3963
  BottomSheet.SheetView = BottomSheetView;
@@ -4062,7 +4097,12 @@ function NativeOpacityAnimation$2({
4062
4097
  duration,
4063
4098
  easing
4064
4099
  } = theme.kitt.cardModal.animation.overlay;
4065
- const [x1, y1, x2, y2] = easing;
4100
+ const {
4101
+ x1,
4102
+ y1,
4103
+ x2,
4104
+ y2
4105
+ } = easing;
4066
4106
  return {
4067
4107
  opacity: withTiming(visible ? 1 : 0, {
4068
4108
  duration,
@@ -4100,7 +4140,12 @@ function NativeRotationAnimation$1({
4100
4140
  duration,
4101
4141
  easing
4102
4142
  } = theme.kitt.cardModal.animation.content;
4103
- const [x1, y1, x2, y2] = easing;
4143
+ const {
4144
+ x1,
4145
+ y1,
4146
+ x2,
4147
+ y2
4148
+ } = easing;
4104
4149
  rotation.value = withTiming(visible ? 0 : 5, {
4105
4150
  duration,
4106
4151
  easing: Easing$1.bezier(x1, y1, x2, y2)
@@ -4658,7 +4703,12 @@ function NativeOpacityAnimation$1({
4658
4703
  duration,
4659
4704
  easing
4660
4705
  } = theme.kitt.dialogModal.animation.overlay;
4661
- const [x1, y1, x2, y2] = easing;
4706
+ const {
4707
+ x1,
4708
+ y1,
4709
+ x2,
4710
+ y2
4711
+ } = easing;
4662
4712
  return {
4663
4713
  opacity: withTiming(visible ? 1 : 0, {
4664
4714
  duration,
@@ -4696,7 +4746,12 @@ function NativeRotationAnimation({
4696
4746
  duration,
4697
4747
  easing
4698
4748
  } = theme.kitt.dialogModal.animation.content;
4699
- const [x1, y1, x2, y2] = easing;
4749
+ const {
4750
+ x1,
4751
+ y1,
4752
+ x2,
4753
+ y2
4754
+ } = easing;
4700
4755
  rotation.value = withTiming(visible ? 0 : 5, {
4701
4756
  duration,
4702
4757
  easing: Easing$1.bezier(x1, y1, x2, y2)
@@ -6323,13 +6378,13 @@ function DocumentPicker({
6323
6378
  // ensure that the press event is not prevented by Button component
6324
6379
  // eslint-disable-next-line @typescript-eslint/no-misused-promises
6325
6380
  onPress: async () => {
6326
- var _childElement$props$o, _childElement$props;
6381
+ var _childElement$props$o, _childElement$props, _result$assets$;
6327
6382
  if (disabled) return;
6328
6383
  (_childElement$props$o = (_childElement$props = childElement.props).onPress) === null || _childElement$props$o === void 0 || _childElement$props$o.call(_childElement$props);
6329
6384
  const result = await getDocumentAsync(_objectSpread(_objectSpread({}, documentPickerOptions), {}, {
6330
6385
  multiple: false
6331
6386
  }));
6332
- if (!result.canceled && result.assets[0].file) {
6387
+ if (!result.canceled && (_result$assets$ = result.assets[0]) !== null && _result$assets$ !== void 0 && _result$assets$.file) {
6333
6388
  onDocumentUpload(result.assets[0].file);
6334
6389
  }
6335
6390
  },
@@ -6356,7 +6411,7 @@ function ImagePicker({
6356
6411
  const result = await launchImageLibraryAsync(_objectSpread(_objectSpread({}, imagePickerOptions), {}, {
6357
6412
  allowsMultipleSelection: false
6358
6413
  }));
6359
- if (!result.canceled) {
6414
+ if (!result.canceled && result.assets[0]) {
6360
6415
  onImageSelected(result.assets[0]);
6361
6416
  }
6362
6417
  },
@@ -6808,17 +6863,17 @@ function GoogleMapsAutocompleteProvider({
6808
6863
  dispatch({
6809
6864
  type: 'search-error'
6810
6865
  });
6811
- return;
6812
6866
  }
6813
-
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
- });
6867
+ if (results) {
6868
+ // We cache the results to avoid calling the API again if the user types the same value
6869
+ searchResultsCache.current[value] = results;
6870
+ dispatch({
6871
+ type: 'search-success',
6872
+ payload: {
6873
+ results
6874
+ }
6875
+ });
6876
+ }
6822
6877
  } catch (error) {
6823
6878
  dispatch({
6824
6879
  type: 'search-error'
@@ -7905,7 +7960,12 @@ function NativeOpacityAnimation({
7905
7960
  duration,
7906
7961
  easing
7907
7962
  } = theme.kitt.fullscreenModal.animation.overlay;
7908
- const [x1, y1, x2, y2] = easing;
7963
+ const {
7964
+ x1,
7965
+ y1,
7966
+ x2,
7967
+ y2
7968
+ } = easing;
7909
7969
  return {
7910
7970
  opacity: withTiming(visible ? 1 : 0, {
7911
7971
  duration,
@@ -7944,7 +8004,12 @@ function NativeSlideInAnimation({
7944
8004
  duration,
7945
8005
  easing
7946
8006
  } = theme.kitt.fullscreenModal.animation.content;
7947
- const [x1, y1, x2, y2] = easing;
8007
+ const {
8008
+ x1,
8009
+ y1,
8010
+ x2,
8011
+ y2
8012
+ } = easing;
7948
8013
  return {
7949
8014
  transform: [{
7950
8015
  translateY: withTiming(visible ? 0 : wHeight, {
@@ -11574,6 +11639,7 @@ function NavigationBottomSheet({
11574
11639
  snapPoints,
11575
11640
  maxDynamicContentSize,
11576
11641
  isVisible,
11642
+ isExpanded,
11577
11643
  onClose
11578
11644
  }) {
11579
11645
  const bottomSheetRef = useBottomSheet();
@@ -11586,6 +11652,15 @@ function NavigationBottomSheet({
11586
11652
  (_bottomSheetRef$curre2 = bottomSheetRef.current) === null || _bottomSheetRef$curre2 === void 0 || _bottomSheetRef$curre2.close();
11587
11653
  }
11588
11654
  }, [bottomSheetRef, isVisible]);
11655
+ useEffect(() => {
11656
+ if (isVisible && isExpanded) {
11657
+ var _bottomSheetRef$curre3;
11658
+ (_bottomSheetRef$curre3 = bottomSheetRef.current) === null || _bottomSheetRef$curre3 === void 0 || _bottomSheetRef$curre3.expand();
11659
+ } else {
11660
+ var _bottomSheetRef$curre4;
11661
+ (_bottomSheetRef$curre4 = bottomSheetRef.current) === null || _bottomSheetRef$curre4 === void 0 || _bottomSheetRef$curre4.collapse();
11662
+ }
11663
+ }, [bottomSheetRef, isVisible, isExpanded]);
11589
11664
  return /*#__PURE__*/jsx(BottomSheet, {
11590
11665
  ref: bottomSheetRef,
11591
11666
  maxDynamicContentSize: maxDynamicContentSize,
@@ -12947,13 +13022,14 @@ function TabBar(_ref) {
12947
13022
  }, props), {}, {
12948
13023
  children: Children.map(tabItems, (child, index) => {
12949
13024
  const tab = tabs[index];
13025
+ if (!tab) throw new Error(`TabBar: tab is undefined at index ${index}`);
12950
13026
  return /*#__PURE__*/jsx(View, {
12951
13027
  children: /*#__PURE__*/cloneElement(child, {
12952
13028
  color,
12953
13029
  onPress: event => {
12954
13030
  var _child$props$onPress, _child$props;
12955
13031
  onChangeTab({
12956
- tab: tabs[index],
13032
+ tab,
12957
13033
  index
12958
13034
  });
12959
13035
  (_child$props$onPress = (_child$props = child.props).onPress) === null || _child$props$onPress === void 0 || _child$props$onPress.call(_child$props, event);
@@ -13741,6 +13817,7 @@ function TypographyLink(_ref) {
13741
13817
  'kitt-universal': 'true'
13742
13818
  },
13743
13819
  _web: {
13820
+ // @ts-expect-error: This is only used on web where 'not-allowed' and 'pointer' are valid cursor values
13744
13821
  cursor: disabled ? 'not-allowed' : 'pointer',
13745
13822
  transitionProperty: 'color',
13746
13823
  transitionDuration: '0.2s',