@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
@@ -848,9 +848,19 @@ const card = {
848
848
  };
849
849
 
850
850
  const webAnimationContentDuration$2 = 400;
851
- const webAnimationContentEasing$2 = [0.77, 0, 0.175, 1];
851
+ const webAnimationContentEasing$2 = {
852
+ x1: 0.77,
853
+ y1: 0,
854
+ x2: 0.175,
855
+ y2: 1
856
+ };
852
857
  const webAnimationOverlayDuration$2 = 250;
853
- const webAnimationOverlayEasing$2 = [0.42, 0, 1, 1];
858
+ const webAnimationOverlayEasing$2 = {
859
+ x1: 0.42,
860
+ y1: 0,
861
+ x2: 1,
862
+ y2: 1
863
+ };
854
864
  const maxWidth = 540;
855
865
  const overlayHorizontalPadding = 24;
856
866
  const cardModal = {
@@ -924,9 +934,19 @@ const choices = {
924
934
  };
925
935
 
926
936
  const webAnimationContentDuration$1 = 400;
927
- const webAnimationContentEasing$1 = [0.77, 0, 0.175, 1];
937
+ const webAnimationContentEasing$1 = {
938
+ x1: 0.77,
939
+ y1: 0,
940
+ x2: 0.175,
941
+ y2: 1
942
+ };
928
943
  const webAnimationOverlayDuration$1 = 250;
929
- const webAnimationOverlayEasing$1 = [0.42, 0, 1, 1];
944
+ const webAnimationOverlayEasing$1 = {
945
+ x1: 0.42,
946
+ y1: 0,
947
+ x2: 1,
948
+ y2: 1
949
+ };
930
950
  const dialogModal = {
931
951
  borderRadius: 20,
932
952
  maxWidth: 540,
@@ -1852,9 +1872,19 @@ const forms = {
1852
1872
  };
1853
1873
 
1854
1874
  const webAnimationContentDuration = 600;
1855
- const webAnimationContentEasing = [0.77, 0, 0.175, 1];
1875
+ const webAnimationContentEasing = {
1876
+ x1: 0.77,
1877
+ y1: 0,
1878
+ x2: 0.175,
1879
+ y2: 1
1880
+ };
1856
1881
  const webAnimationOverlayDuration = 250;
1857
- const webAnimationOverlayEasing = [0.42, 0, 1, 1];
1882
+ const webAnimationOverlayEasing = {
1883
+ x1: 0.42,
1884
+ y1: 0,
1885
+ x2: 1,
1886
+ y2: 1
1887
+ };
1858
1888
  const fullscreenModal = {
1859
1889
  header: {
1860
1890
  height: 56
@@ -3947,6 +3977,11 @@ function BottomSheetContainerView(props) {
3947
3977
  ...props
3948
3978
  });
3949
3979
  }
3980
+
3981
+ /**
3982
+ * @internal This component is for kitt-universal internal use only.
3983
+ * Please use `NavigationBottomSheet` instead.
3984
+ */
3950
3985
  const BottomSheet = /*#__PURE__*/React.forwardRef(BottomSheetComp);
3951
3986
  BottomSheet.View = BottomSheetContainerView;
3952
3987
  BottomSheet.SheetView = bottomSheet$1.BottomSheetView;
@@ -4088,7 +4123,12 @@ function NativeOpacityAnimation$2({
4088
4123
  duration,
4089
4124
  easing
4090
4125
  } = theme.kitt.cardModal.animation.overlay;
4091
- const [x1, y1, x2, y2] = easing;
4126
+ const {
4127
+ x1,
4128
+ y1,
4129
+ x2,
4130
+ y2
4131
+ } = easing;
4092
4132
  return {
4093
4133
  opacity: Animated.withTiming(visible ? 1 : 0, {
4094
4134
  duration,
@@ -4126,7 +4166,12 @@ function NativeRotationAnimation$1({
4126
4166
  duration,
4127
4167
  easing
4128
4168
  } = theme.kitt.cardModal.animation.content;
4129
- const [x1, y1, x2, y2] = easing;
4169
+ const {
4170
+ x1,
4171
+ y1,
4172
+ x2,
4173
+ y2
4174
+ } = easing;
4130
4175
  rotation.value = Animated.withTiming(visible ? 0 : 5, {
4131
4176
  duration,
4132
4177
  easing: Animated.Easing.bezier(x1, y1, x2, y2)
@@ -4680,7 +4725,12 @@ function NativeOpacityAnimation$1({
4680
4725
  duration,
4681
4726
  easing
4682
4727
  } = theme.kitt.dialogModal.animation.overlay;
4683
- const [x1, y1, x2, y2] = easing;
4728
+ const {
4729
+ x1,
4730
+ y1,
4731
+ x2,
4732
+ y2
4733
+ } = easing;
4684
4734
  return {
4685
4735
  opacity: Animated.withTiming(visible ? 1 : 0, {
4686
4736
  duration,
@@ -4718,7 +4768,12 @@ function NativeRotationAnimation({
4718
4768
  duration,
4719
4769
  easing
4720
4770
  } = theme.kitt.dialogModal.animation.content;
4721
- const [x1, y1, x2, y2] = easing;
4771
+ const {
4772
+ x1,
4773
+ y1,
4774
+ x2,
4775
+ y2
4776
+ } = easing;
4722
4777
  rotation.value = Animated.withTiming(visible ? 0 : 5, {
4723
4778
  duration,
4724
4779
  easing: Animated.Easing.bezier(x1, y1, x2, y2)
@@ -6340,7 +6395,7 @@ function DocumentPicker({
6340
6395
  ...documentPickerOptions,
6341
6396
  multiple: false
6342
6397
  });
6343
- if (!result.canceled && result.assets[0].file) {
6398
+ if (!result.canceled && result.assets[0]?.file) {
6344
6399
  onDocumentUpload(result.assets[0].file);
6345
6400
  }
6346
6401
  },
@@ -6367,7 +6422,7 @@ function ImagePicker({
6367
6422
  ...imagePickerOptions,
6368
6423
  allowsMultipleSelection: false
6369
6424
  });
6370
- if (!result.canceled) {
6425
+ if (!result.canceled && result.assets[0]) {
6371
6426
  onImageSelected(result.assets[0]);
6372
6427
  }
6373
6428
  },
@@ -6816,17 +6871,17 @@ function GoogleMapsAutocompleteProvider({
6816
6871
  dispatch({
6817
6872
  type: 'search-error'
6818
6873
  });
6819
- return;
6820
6874
  }
6821
-
6822
- // We cache the results to avoid calling the API again if the user types the same value
6823
- searchResultsCache.current[value] = results;
6824
- dispatch({
6825
- type: 'search-success',
6826
- payload: {
6827
- results
6828
- }
6829
- });
6875
+ if (results) {
6876
+ // We cache the results to avoid calling the API again if the user types the same value
6877
+ searchResultsCache.current[value] = results;
6878
+ dispatch({
6879
+ type: 'search-success',
6880
+ payload: {
6881
+ results
6882
+ }
6883
+ });
6884
+ }
6830
6885
  } catch (error) {
6831
6886
  dispatch({
6832
6887
  type: 'search-error'
@@ -7902,7 +7957,12 @@ function NativeOpacityAnimation({
7902
7957
  duration,
7903
7958
  easing
7904
7959
  } = theme.kitt.fullscreenModal.animation.overlay;
7905
- const [x1, y1, x2, y2] = easing;
7960
+ const {
7961
+ x1,
7962
+ y1,
7963
+ x2,
7964
+ y2
7965
+ } = easing;
7906
7966
  return {
7907
7967
  opacity: Animated.withTiming(visible ? 1 : 0, {
7908
7968
  duration,
@@ -7941,7 +8001,12 @@ function NativeSlideInAnimation({
7941
8001
  duration,
7942
8002
  easing
7943
8003
  } = theme.kitt.fullscreenModal.animation.content;
7944
- const [x1, y1, x2, y2] = easing;
8004
+ const {
8005
+ x1,
8006
+ y1,
8007
+ x2,
8008
+ y2
8009
+ } = easing;
7945
8010
  return {
7946
8011
  transform: [{
7947
8012
  translateY: Animated.withTiming(visible ? 0 : wHeight, {
@@ -11578,6 +11643,7 @@ function NavigationBottomSheet({
11578
11643
  snapPoints,
11579
11644
  maxDynamicContentSize,
11580
11645
  isVisible,
11646
+ isExpanded,
11581
11647
  onClose
11582
11648
  }) {
11583
11649
  const bottomSheetRef = useBottomSheet();
@@ -11588,6 +11654,13 @@ function NavigationBottomSheet({
11588
11654
  bottomSheetRef.current?.close();
11589
11655
  }
11590
11656
  }, [bottomSheetRef, isVisible]);
11657
+ React.useEffect(() => {
11658
+ if (isVisible && isExpanded) {
11659
+ bottomSheetRef.current?.expand();
11660
+ } else {
11661
+ bottomSheetRef.current?.collapse();
11662
+ }
11663
+ }, [bottomSheetRef, isVisible, isExpanded]);
11591
11664
  return /*#__PURE__*/jsxRuntime.jsx(BottomSheet, {
11592
11665
  ref: bottomSheetRef,
11593
11666
  maxDynamicContentSize: maxDynamicContentSize,
@@ -12944,12 +13017,13 @@ function TabBar({
12944
13017
  ...props,
12945
13018
  children: React.Children.map(tabItems, (child, index) => {
12946
13019
  const tab = tabs[index];
13020
+ if (!tab) throw new Error(`TabBar: tab is undefined at index ${index}`);
12947
13021
  return /*#__PURE__*/jsxRuntime.jsx(View, {
12948
13022
  children: /*#__PURE__*/React.cloneElement(child, {
12949
13023
  color,
12950
13024
  onPress: event => {
12951
13025
  onChangeTab({
12952
- tab: tabs[index],
13026
+ tab,
12953
13027
  index
12954
13028
  });
12955
13029
  child.props.onPress?.(event);
@@ -13733,6 +13807,7 @@ function TypographyLink({
13733
13807
  'kitt-universal': 'true'
13734
13808
  },
13735
13809
  _web: {
13810
+ // @ts-expect-error: This is only used on web where 'not-allowed' and 'pointer' are valid cursor values
13736
13811
  cursor: disabled ? 'not-allowed' : 'pointer',
13737
13812
  transitionProperty: 'color',
13738
13813
  transitionDuration: '0.2s',