@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
package/dist/index.es.js CHANGED
@@ -843,9 +843,19 @@ var card = {
843
843
  };
844
844
 
845
845
  var webAnimationContentDuration$2 = 400;
846
- var webAnimationContentEasing$2 = [0.77, 0, 0.175, 1];
846
+ var webAnimationContentEasing$2 = {
847
+ x1: 0.77,
848
+ y1: 0,
849
+ x2: 0.175,
850
+ y2: 1
851
+ };
847
852
  var webAnimationOverlayDuration$2 = 250;
848
- var webAnimationOverlayEasing$2 = [0.42, 0, 1, 1];
853
+ var webAnimationOverlayEasing$2 = {
854
+ x1: 0.42,
855
+ y1: 0,
856
+ x2: 1,
857
+ y2: 1
858
+ };
849
859
  var maxWidth = 540;
850
860
  var overlayHorizontalPadding = 24;
851
861
  var cardModal = {
@@ -919,9 +929,19 @@ var choices = {
919
929
  };
920
930
 
921
931
  var webAnimationContentDuration$1 = 400;
922
- var webAnimationContentEasing$1 = [0.77, 0, 0.175, 1];
932
+ var webAnimationContentEasing$1 = {
933
+ x1: 0.77,
934
+ y1: 0,
935
+ x2: 0.175,
936
+ y2: 1
937
+ };
923
938
  var webAnimationOverlayDuration$1 = 250;
924
- var webAnimationOverlayEasing$1 = [0.42, 0, 1, 1];
939
+ var webAnimationOverlayEasing$1 = {
940
+ x1: 0.42,
941
+ y1: 0,
942
+ x2: 1,
943
+ y2: 1
944
+ };
925
945
  var dialogModal = {
926
946
  borderRadius: 20,
927
947
  maxWidth: 540,
@@ -1847,9 +1867,19 @@ var forms = {
1847
1867
  };
1848
1868
 
1849
1869
  var webAnimationContentDuration = 600;
1850
- var webAnimationContentEasing = [0.77, 0, 0.175, 1];
1870
+ var webAnimationContentEasing = {
1871
+ x1: 0.77,
1872
+ y1: 0,
1873
+ x2: 0.175,
1874
+ y2: 1
1875
+ };
1851
1876
  var webAnimationOverlayDuration = 250;
1852
- var webAnimationOverlayEasing = [0.42, 0, 1, 1];
1877
+ var webAnimationOverlayEasing = {
1878
+ x1: 0.42,
1879
+ y1: 0,
1880
+ x2: 1,
1881
+ y2: 1
1882
+ };
1853
1883
  var fullscreenModal = {
1854
1884
  header: {
1855
1885
  height: 56
@@ -3969,6 +3999,11 @@ function BottomSheetContainerView(props) {
3969
3999
  padding: "kitt.bottomSheet.container.padding"
3970
4000
  }, props));
3971
4001
  }
4002
+
4003
+ /**
4004
+ * @internal This component is for kitt-universal internal use only.
4005
+ * Please use `NavigationBottomSheet` instead.
4006
+ */
3972
4007
  var BottomSheet = /*#__PURE__*/forwardRef(BottomSheetComp);
3973
4008
  BottomSheet.View = BottomSheetContainerView;
3974
4009
  BottomSheet.SheetView = BottomSheetView;
@@ -4103,11 +4138,10 @@ function NativeOpacityAnimation$2(_ref) {
4103
4138
  var _theme$kitt$cardModal = theme.kitt.cardModal.animation.overlay,
4104
4139
  duration = _theme$kitt$cardModal.duration,
4105
4140
  easing = _theme$kitt$cardModal.easing;
4106
- var _easing = _slicedToArray(easing, 4),
4107
- x1 = _easing[0],
4108
- y1 = _easing[1],
4109
- x2 = _easing[2],
4110
- y2 = _easing[3];
4141
+ var x1 = easing.x1,
4142
+ y1 = easing.y1,
4143
+ x2 = easing.x2,
4144
+ y2 = easing.y2;
4111
4145
  return {
4112
4146
  opacity: withTiming(visible ? 1 : 0, {
4113
4147
  duration: duration,
@@ -4143,11 +4177,10 @@ function NativeRotationAnimation$1(_ref) {
4143
4177
  var _theme$kitt$cardModal = theme.kitt.cardModal.animation.content,
4144
4178
  duration = _theme$kitt$cardModal.duration,
4145
4179
  easing = _theme$kitt$cardModal.easing;
4146
- var _easing = _slicedToArray(easing, 4),
4147
- x1 = _easing[0],
4148
- y1 = _easing[1],
4149
- x2 = _easing[2],
4150
- y2 = _easing[3];
4180
+ var x1 = easing.x1,
4181
+ y1 = easing.y1,
4182
+ x2 = easing.x2,
4183
+ y2 = easing.y2;
4151
4184
  rotation.value = withTiming(visible ? 0 : 5, {
4152
4185
  duration: duration,
4153
4186
  easing: Easing$1.bezier(x1, y1, x2, y2)
@@ -4704,11 +4737,10 @@ function NativeOpacityAnimation$1(_ref) {
4704
4737
  var _theme$kitt$dialogMod = theme.kitt.dialogModal.animation.overlay,
4705
4738
  duration = _theme$kitt$dialogMod.duration,
4706
4739
  easing = _theme$kitt$dialogMod.easing;
4707
- var _easing = _slicedToArray(easing, 4),
4708
- x1 = _easing[0],
4709
- y1 = _easing[1],
4710
- x2 = _easing[2],
4711
- y2 = _easing[3];
4740
+ var x1 = easing.x1,
4741
+ y1 = easing.y1,
4742
+ x2 = easing.x2,
4743
+ y2 = easing.y2;
4712
4744
  return {
4713
4745
  opacity: withTiming(visible ? 1 : 0, {
4714
4746
  duration: duration,
@@ -4744,11 +4776,10 @@ function NativeRotationAnimation(_ref) {
4744
4776
  var _theme$kitt$dialogMod = theme.kitt.dialogModal.animation.content,
4745
4777
  duration = _theme$kitt$dialogMod.duration,
4746
4778
  easing = _theme$kitt$dialogMod.easing;
4747
- var _easing = _slicedToArray(easing, 4),
4748
- x1 = _easing[0],
4749
- y1 = _easing[1],
4750
- x2 = _easing[2],
4751
- y2 = _easing[3];
4779
+ var x1 = easing.x1,
4780
+ y1 = easing.y1,
4781
+ x2 = easing.x2,
4782
+ y2 = easing.y2;
4752
4783
  rotation.value = withTiming(visible ? 0 : 5, {
4753
4784
  duration: duration,
4754
4785
  easing: Easing$1.bezier(x1, y1, x2, y2)
@@ -6429,7 +6460,7 @@ function DocumentPicker(_ref) {
6429
6460
  var childElement = Children.only(children);
6430
6461
  var handlePickDocument = /*#__PURE__*/function () {
6431
6462
  var _ref2 = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
6432
- var _childElement$props$o, _childElement$props;
6463
+ var _childElement$props$o, _childElement$props, _result$assets$;
6433
6464
  var result;
6434
6465
  return _regeneratorRuntime().wrap(function (_context) {
6435
6466
  while (1) switch (_context.prev = _context.next) {
@@ -6447,7 +6478,7 @@ function DocumentPicker(_ref) {
6447
6478
  }));
6448
6479
  case 5:
6449
6480
  result = _context.sent;
6450
- if (!result.canceled && result.assets[0].file) {
6481
+ if (!result.canceled && (_result$assets$ = result.assets[0]) !== null && _result$assets$ !== void 0 && _result$assets$.file) {
6451
6482
  onDocumentUpload(result.assets[0].file);
6452
6483
  }
6453
6484
  case 7:
@@ -6496,7 +6527,7 @@ function ImagePicker(_ref) {
6496
6527
  }));
6497
6528
  case 5:
6498
6529
  result = _context.sent;
6499
- if (!result.canceled) {
6530
+ if (!result.canceled && result.assets[0]) {
6500
6531
  onImageSelected(result.assets[0]);
6501
6532
  }
6502
6533
  case 7:
@@ -7022,36 +7053,34 @@ function GoogleMapsAutocompleteProvider(_ref) {
7022
7053
  _yield$predictionsPro = _context.sent;
7023
7054
  results = _yield$predictionsPro.results;
7024
7055
  status = _yield$predictionsPro.status;
7025
- if (!(status !== 'OK')) {
7026
- _context.next = 13;
7027
- break;
7056
+ if (status !== 'OK') {
7057
+ dispatch({
7058
+ type: 'search-error'
7059
+ });
7028
7060
  }
7029
- dispatch({
7030
- type: 'search-error'
7031
- });
7032
- return _context.abrupt("return");
7033
- case 13:
7034
- // We cache the results to avoid calling the API again if the user types the same value
7035
- searchResultsCache.current[value] = results;
7036
- dispatch({
7037
- type: 'search-success',
7038
- payload: {
7039
- results: results
7040
- }
7041
- });
7042
- _context.next = 20;
7061
+ if (results) {
7062
+ // We cache the results to avoid calling the API again if the user types the same value
7063
+ searchResultsCache.current[value] = results;
7064
+ dispatch({
7065
+ type: 'search-success',
7066
+ payload: {
7067
+ results: results
7068
+ }
7069
+ });
7070
+ }
7071
+ _context.next = 17;
7043
7072
  break;
7044
- case 17:
7045
- _context.prev = 17;
7073
+ case 14:
7074
+ _context.prev = 14;
7046
7075
  _context.t0 = _context["catch"](4);
7047
7076
  dispatch({
7048
7077
  type: 'search-error'
7049
7078
  });
7050
- case 20:
7079
+ case 17:
7051
7080
  case "end":
7052
7081
  return _context.stop();
7053
7082
  }
7054
- }, _callee, null, [[4, 17]]);
7083
+ }, _callee, null, [[4, 14]]);
7055
7084
  }));
7056
7085
  return function () {
7057
7086
  return _ref2.apply(this, arguments);
@@ -8144,11 +8173,10 @@ function NativeOpacityAnimation(_ref) {
8144
8173
  var _theme$kitt$fullscree = theme.kitt.fullscreenModal.animation.overlay,
8145
8174
  duration = _theme$kitt$fullscree.duration,
8146
8175
  easing = _theme$kitt$fullscree.easing;
8147
- var _easing = _slicedToArray(easing, 4),
8148
- x1 = _easing[0],
8149
- y1 = _easing[1],
8150
- x2 = _easing[2],
8151
- y2 = _easing[3];
8176
+ var x1 = easing.x1,
8177
+ y1 = easing.y1,
8178
+ x2 = easing.x2,
8179
+ y2 = easing.y2;
8152
8180
  return {
8153
8181
  opacity: withTiming(visible ? 1 : 0, {
8154
8182
  duration: duration,
@@ -8184,11 +8212,10 @@ function NativeSlideInAnimation(_ref) {
8184
8212
  var _theme$kitt$fullscree = theme.kitt.fullscreenModal.animation.content,
8185
8213
  duration = _theme$kitt$fullscree.duration,
8186
8214
  easing = _theme$kitt$fullscree.easing;
8187
- var _easing = _slicedToArray(easing, 4),
8188
- x1 = _easing[0],
8189
- y1 = _easing[1],
8190
- x2 = _easing[2],
8191
- y2 = _easing[3];
8215
+ var x1 = easing.x1,
8216
+ y1 = easing.y1,
8217
+ x2 = easing.x2,
8218
+ y2 = easing.y2;
8192
8219
  return {
8193
8220
  transform: [{
8194
8221
  translateY: withTiming(visible ? 0 : wHeight, {
@@ -11829,6 +11856,7 @@ function NavigationBottomSheet(_ref) {
11829
11856
  snapPoints = _ref.snapPoints,
11830
11857
  maxDynamicContentSize = _ref.maxDynamicContentSize,
11831
11858
  isVisible = _ref.isVisible,
11859
+ isExpanded = _ref.isExpanded,
11832
11860
  onClose = _ref.onClose;
11833
11861
  var bottomSheetRef = useBottomSheet();
11834
11862
  useEffect(function () {
@@ -11840,6 +11868,15 @@ function NavigationBottomSheet(_ref) {
11840
11868
  (_bottomSheetRef$curre2 = bottomSheetRef.current) === null || _bottomSheetRef$curre2 === void 0 || _bottomSheetRef$curre2.close();
11841
11869
  }
11842
11870
  }, [bottomSheetRef, isVisible]);
11871
+ useEffect(function () {
11872
+ if (isVisible && isExpanded) {
11873
+ var _bottomSheetRef$curre3;
11874
+ (_bottomSheetRef$curre3 = bottomSheetRef.current) === null || _bottomSheetRef$curre3 === void 0 || _bottomSheetRef$curre3.expand();
11875
+ } else {
11876
+ var _bottomSheetRef$curre4;
11877
+ (_bottomSheetRef$curre4 = bottomSheetRef.current) === null || _bottomSheetRef$curre4 === void 0 || _bottomSheetRef$curre4.collapse();
11878
+ }
11879
+ }, [bottomSheetRef, isVisible, isExpanded]);
11843
11880
  return /*#__PURE__*/jsx(BottomSheet, {
11844
11881
  ref: bottomSheetRef,
11845
11882
  maxDynamicContentSize: maxDynamicContentSize,
@@ -13191,13 +13228,14 @@ function TabBar(_ref) {
13191
13228
  }, props), {}, {
13192
13229
  children: Children.map(tabItems, function (child, index) {
13193
13230
  var tab = tabs[index];
13231
+ if (!tab) throw new Error("TabBar: tab is undefined at index ".concat(index));
13194
13232
  return /*#__PURE__*/jsx(View, {
13195
13233
  children: /*#__PURE__*/cloneElement(child, {
13196
13234
  color: color,
13197
13235
  onPress: function onPress(event) {
13198
13236
  var _child$props$onPress, _child$props;
13199
13237
  onChangeTab({
13200
- tab: tabs[index],
13238
+ tab: tab,
13201
13239
  index: index
13202
13240
  });
13203
13241
  (_child$props$onPress = (_child$props = child.props).onPress) === null || _child$props$onPress === void 0 || _child$props$onPress.call(_child$props, event);
@@ -14008,6 +14046,7 @@ function TypographyLink(_ref) {
14008
14046
  'kitt-universal': 'true'
14009
14047
  },
14010
14048
  _web: {
14049
+ // @ts-expect-error: This is only used on web where 'not-allowed' and 'pointer' are valid cursor values
14011
14050
  cursor: disabled ? 'not-allowed' : 'pointer',
14012
14051
  transitionProperty: 'color',
14013
14052
  transitionDuration: '0.2s',