@ornikar/kitt-universal 29.3.2 → 29.4.1-canary.2269ca599b5583fc6238639eb399d62b3abcf0a1.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 (44) hide show
  1. package/CHANGELOG.md +18 -0
  2. package/dist/definitions/themes/default.d.ts +1 -0
  3. package/dist/definitions/themes/default.d.ts.map +1 -1
  4. package/dist/definitions/themes/late-ocean/typography.d.ts +1 -0
  5. package/dist/definitions/themes/late-ocean/typography.d.ts.map +1 -1
  6. package/dist/index-metro.es.android.js +2 -1
  7. package/dist/index-metro.es.android.js.map +1 -1
  8. package/dist/index-metro.es.ios.js +2 -1
  9. package/dist/index-metro.es.ios.js.map +1 -1
  10. package/dist/index-node-22.17.cjs.js +2 -1
  11. package/dist/index-node-22.17.cjs.js.map +1 -1
  12. package/dist/index-node-22.17.cjs.web.css +0 -1
  13. package/dist/index-node-22.17.cjs.web.js +31 -4
  14. package/dist/index-node-22.17.cjs.web.js.map +1 -1
  15. package/dist/index-node-22.17.es.mjs +2 -1
  16. package/dist/index-node-22.17.es.mjs.map +1 -1
  17. package/dist/index-node-22.17.es.web.css +0 -1
  18. package/dist/index-node-22.17.es.web.mjs +55 -28
  19. package/dist/index-node-22.17.es.web.mjs.map +1 -1
  20. package/dist/index.es.js +2 -1
  21. package/dist/index.es.js.map +1 -1
  22. package/dist/index.es.web.js +55 -28
  23. package/dist/index.es.web.js.map +1 -1
  24. package/dist/linaria-themes-metro.es.android.js +1 -0
  25. package/dist/linaria-themes-metro.es.android.js.map +1 -1
  26. package/dist/linaria-themes-metro.es.ios.js +1 -0
  27. package/dist/linaria-themes-metro.es.ios.js.map +1 -1
  28. package/dist/linaria-themes-node-22.17.cjs.js +1 -0
  29. package/dist/linaria-themes-node-22.17.cjs.js.map +1 -1
  30. package/dist/linaria-themes-node-22.17.cjs.web.js +1 -0
  31. package/dist/linaria-themes-node-22.17.cjs.web.js.map +1 -1
  32. package/dist/linaria-themes-node-22.17.es.mjs +1 -0
  33. package/dist/linaria-themes-node-22.17.es.mjs.map +1 -1
  34. package/dist/linaria-themes-node-22.17.es.web.mjs +1 -0
  35. package/dist/linaria-themes-node-22.17.es.web.mjs.map +1 -1
  36. package/dist/linaria-themes.es.js +1 -0
  37. package/dist/linaria-themes.es.js.map +1 -1
  38. package/dist/linaria-themes.es.web.js +1 -0
  39. package/dist/linaria-themes.es.web.js.map +1 -1
  40. package/dist/styles.css +0 -1
  41. package/dist/tsbuildinfo +1 -1
  42. package/package.json +1 -1
  43. package/dist/definitions/Icon/SpinningIcon.web.d.ts +0 -4
  44. package/dist/definitions/Icon/SpinningIcon.web.d.ts.map +0 -1
@@ -1,6 +1,6 @@
1
1
  import _objectSpread from '@babel/runtime/helpers/objectSpread2';
2
2
  import _objectWithoutProperties from '@babel/runtime/helpers/objectWithoutProperties';
3
- import { useContext, createContext, forwardRef, useMemo, cloneElement, useState, useRef, useEffect, Children, useReducer, useCallback, Fragment as Fragment$1 } from 'react';
3
+ import { useContext, createContext, forwardRef, useMemo, cloneElement, useRef, useEffect, useState, Children, useReducer, useCallback, Fragment as Fragment$1 } from 'react';
4
4
  import { View as View$1, ScrollView as ScrollView$1, Pressable as Pressable$1, Image as Image$1, FlatList as FlatList$1, SectionList as SectionList$1, Stack as Stack$1, VStack as VStack$1, HStack as HStack$1, Center as Center$1, useBreakpointValue as useBreakpointValue$1, useSx, Text, Input, NativeBaseProvider, extendTheme } from 'native-base';
5
5
  export { useClipboard, useContrastText, useMediaQuery, useSx, useToken } from 'native-base';
6
6
  import _slicedToArray from '@babel/runtime/helpers/slicedToArray';
@@ -11,10 +11,10 @@ import _typeof from '@babel/runtime/helpers/typeof';
11
11
  import _regeneratorRuntime from '@babel/runtime/helpers/regeneratorRuntime';
12
12
  import _asyncToGenerator from '@babel/runtime/helpers/asyncToGenerator';
13
13
  import { SpinnerGapRegularIcon, UserRegularIcon, XRegularIcon, ArrowLeftRegularIcon, CaretUpFillIcon, CaretDownFillIcon, MapPinRegularIcon, EyeClosedRegularIcon, EyeRegularIcon, CheckCircleFillIcon, CaretDownRegularIcon, CaretRightRegularIcon, InfoRegularIcon, WarningRegularIcon, CheckRegularIcon, WarningCircleRegularIcon, ArrowCounterClockwiseRegularIcon, InfoFillIcon, WarningCircleFillIcon, WarningFillIcon } from '@ornikar/kitt-icons/phosphor';
14
+ import { Animated, Easing, ScrollView as ScrollView$2, View as View$2, Linking, Pressable as Pressable$2, StyleSheet, useWindowDimensions } from 'react-native';
15
+ export { useWindowDimensions as useWindowSize } from 'react-native';
14
16
  import { createPortal } from 'react-dom';
15
17
  import { CSSTransition } from 'react-transition-group';
16
- import { ScrollView as ScrollView$2, View as View$2, Linking, Pressable as Pressable$2, StyleSheet, useWindowDimensions } from 'react-native';
17
- export { useWindowDimensions as useWindowSize } from 'react-native';
18
18
  import { parse } from '@twemoji/parser';
19
19
  import Downshift, { useSelect } from 'downshift';
20
20
  import { getDocumentAsync } from 'expo-document-picker';
@@ -22,7 +22,7 @@ import { launchImageLibraryAsync } from 'expo-image-picker';
22
22
  import { useDebouncedCallback } from 'use-debounce';
23
23
  import { Loader } from '@googlemaps/js-api-loader';
24
24
  import { parseNumber, getCountryCallingCode, isValidNumber } from 'libphonenumber-js';
25
- import Animated, { useAnimatedStyle, withSpring, withTiming, useSharedValue, interpolateColor, Easing, useAnimatedProps, withDelay, withRepeat, interpolate, runOnJS } from 'react-native-reanimated';
25
+ import Animated$1, { useAnimatedStyle, withSpring, withTiming, useSharedValue, interpolateColor, Easing as Easing$1, useAnimatedProps, withDelay, withRepeat, interpolate, runOnJS } from 'react-native-reanimated';
26
26
  import { useSafeAreaInsets } from 'react-native-safe-area-context';
27
27
  import Svg, { Circle as Circle$1 } from 'react-native-svg';
28
28
  import { useFloating, autoUpdate, offset, autoPlacement, shift, arrow } from '@floating-ui/react-dom';
@@ -2127,6 +2127,7 @@ var typography = {
2127
2127
  contentCaps: {
2128
2128
  fontFamily: {
2129
2129
  "native": {
2130
+ regular: 'GTStandardNarrow',
2130
2131
  bold: 'GTStandardNarrowBold'
2131
2132
  },
2132
2133
  web: {
@@ -3698,15 +3699,41 @@ var Button = /*#__PURE__*/forwardRef(function (_ref, ref) {
3698
3699
  });
3699
3700
  });
3700
3701
 
3701
- var spinningIcon = "kitt-u_spinningIcon_ssn8o83";
3702
3702
  function SpinningIcon(_ref) {
3703
3703
  var icon = _ref.icon,
3704
3704
  color = _ref.color;
3705
+ if (process.env.NODE_ENV !== 'production' && !color) {
3706
+ throw new Error("Invalid color passed to SpinningIcon: ".concat(String(color)));
3707
+ }
3705
3708
  var clonedIcon = /*#__PURE__*/cloneElement(icon, {
3706
3709
  color: color
3707
3710
  });
3708
- return /*#__PURE__*/jsx("div", {
3709
- className: spinningIcon,
3711
+ var animationRef = useRef(new Animated.Value(0));
3712
+ var rotation = animationRef.current.interpolate({
3713
+ inputRange: [0, 1],
3714
+ outputRange: ['0deg', '360deg']
3715
+ });
3716
+ useEffect(function () {
3717
+ if (process.env.NODE_ENV === 'test') return undefined;
3718
+ var animation = Animated.loop(Animated.timing(animationRef.current, {
3719
+ toValue: 1,
3720
+ duration: 1100,
3721
+ easing: Easing.linear,
3722
+ useNativeDriver: "web" !== 'web'
3723
+ }));
3724
+ animation.start();
3725
+ return function () {
3726
+ if (process.env.NODE_ENV === 'test') return undefined;
3727
+ animation.stop();
3728
+ return undefined;
3729
+ };
3730
+ }, []);
3731
+ return /*#__PURE__*/jsx(Animated.View, {
3732
+ style: {
3733
+ transform: [{
3734
+ rotate: rotation
3735
+ }]
3736
+ },
3710
3737
  children: clonedIcon
3711
3738
  });
3712
3739
  }
@@ -7279,7 +7306,7 @@ var TextArea = /*#__PURE__*/forwardRef(function (_ref, ref) {
7279
7306
  base: "body-s",
7280
7307
  color: deepPurpleColorPalette['grey.5'],
7281
7308
  children: helper
7282
- }) : null, shouldDisplayLimit ? /*#__PURE__*/jsx(Animated.View, {
7309
+ }) : null, shouldDisplayLimit ? /*#__PURE__*/jsx(Animated$1.View, {
7283
7310
  style: limitContainerAnimatedStyle,
7284
7311
  children: /*#__PURE__*/jsxs(HStack$1, {
7285
7312
  alignItems: "center",
@@ -7289,7 +7316,7 @@ var TextArea = /*#__PURE__*/forwardRef(function (_ref, ref) {
7289
7316
  variant: "bold",
7290
7317
  color: deepPurpleColorPalette['grey.5'],
7291
7318
  children: [((_props$value2 = props.value) === null || _props$value2 === void 0 ? void 0 : _props$value2.length) || 0, "/", limit]
7292
- }), /*#__PURE__*/jsx(Animated.View, {
7319
+ }), /*#__PURE__*/jsx(Animated$1.View, {
7293
7320
  style: checkIconAnimatedStyle,
7294
7321
  children: /*#__PURE__*/jsx(TypographyIcon, {
7295
7322
  icon: /*#__PURE__*/jsx(CheckCircleFillIcon, {}),
@@ -7360,17 +7387,17 @@ function ToggleAnimated(_ref) {
7360
7387
  useEffect(function () {
7361
7388
  marginLeftAnim.value = withTiming(value ? marginLeft : 0, {
7362
7389
  duration: 200,
7363
- easing: Easing.ease
7390
+ easing: Easing$1.ease
7364
7391
  });
7365
7392
  }, [value, marginLeftAnim, marginLeft]);
7366
7393
  useEffect(function () {
7367
7394
  hoverAnim.value = withTiming(isHovered ? value ? -1 : 1 : 0, {
7368
7395
  duration: 200,
7369
- easing: Easing.ease
7396
+ easing: Easing$1.ease
7370
7397
  });
7371
7398
  hoverBackgroundAnim.value = withTiming(isHovered ? 0 : 1, {
7372
7399
  duration: 200,
7373
- easing: Easing.ease
7400
+ easing: Easing$1.ease
7374
7401
  });
7375
7402
  }, [isHovered, hoverAnim, value, hoverBackgroundAnim]);
7376
7403
  return /*#__PURE__*/jsx(View$1, {
@@ -7378,7 +7405,7 @@ function ToggleAnimated(_ref) {
7378
7405
  borderColor: "kitt.forms.toggle.".concat(variant, ".").concat(disabledState, ".").concat(state, ".wrapperBorder.color"),
7379
7406
  borderWidth: "kitt.forms.toggle.".concat(variant, ".").concat(disabledState, ".").concat(state, ".wrapperBorder.width"),
7380
7407
  borderRadius: "full",
7381
- children: /*#__PURE__*/jsx(Animated.View, {
7408
+ children: /*#__PURE__*/jsx(Animated$1.View, {
7382
7409
  style: [hoverBackgroundTranslate, {
7383
7410
  borderColor: theme.kitt.forms.toggle[variant][disabledState][state].border.color,
7384
7411
  borderWidth: theme.kitt.forms.toggle[variant][disabledState][state].border.width,
@@ -7387,7 +7414,7 @@ function ToggleAnimated(_ref) {
7387
7414
  height: theme.kitt.forms.toggle[variant][disabledState][state].height[size],
7388
7415
  padding: size === 'medium' ? 3 : 4
7389
7416
  }],
7390
- children: /*#__PURE__*/jsx(Animated.View, {
7417
+ children: /*#__PURE__*/jsx(Animated$1.View, {
7391
7418
  style: [buttonTranslate, hoverTranslate],
7392
7419
  children: /*#__PURE__*/jsx(View$1, {
7393
7420
  borderRadius: "full",
@@ -8165,7 +8192,7 @@ var useNativeAnimation = function (_ref) {
8165
8192
  transform: [{
8166
8193
  translateY: withTiming(-4, {
8167
8194
  duration: TRANSLATE_Y_DURATION,
8168
- easing: Easing.linear
8195
+ easing: Easing$1.linear
8169
8196
  })
8170
8197
  }, {
8171
8198
  scale: withTiming(1, {
@@ -8179,7 +8206,7 @@ var useNativeAnimation = function (_ref) {
8179
8206
  transform: [{
8180
8207
  translateY: withTiming(-10, {
8181
8208
  duration: TRANSLATE_Y_DURATION,
8182
- easing: Easing.linear
8209
+ easing: Easing$1.linear
8183
8210
  })
8184
8211
  }, {
8185
8212
  scale: withTiming(1.3, {
@@ -8192,7 +8219,7 @@ var useNativeAnimation = function (_ref) {
8192
8219
  transform: [{
8193
8220
  translateY: withTiming(0, {
8194
8221
  duration: TRANSLATE_Y_DURATION,
8195
- easing: Easing.linear
8222
+ easing: Easing$1.linear
8196
8223
  })
8197
8224
  }, {
8198
8225
  scale: withTiming(1, {
@@ -8247,7 +8274,7 @@ function StaticMapMarker$1(_ref) {
8247
8274
  alignItems: "center",
8248
8275
  width: containerWidth,
8249
8276
  height: containerHeight,
8250
- children: [/*#__PURE__*/jsx(Animated.View, {
8277
+ children: [/*#__PURE__*/jsx(Animated$1.View, {
8251
8278
  style: animatedStyle,
8252
8279
  children: variant === MapMarkerVariantEnum.MEETING_POINT ? /*#__PURE__*/jsx(SvgMeetingPointMarkerinline, {
8253
8280
  width: mpMarkerSvgWidth,
@@ -11140,7 +11167,7 @@ function Notification(_ref) {
11140
11167
  });
11141
11168
  }
11142
11169
 
11143
- var AnimatedCircle = Animated.createAnimatedComponent(Circle$1);
11170
+ var AnimatedCircle = Animated$1.createAnimatedComponent(Circle$1);
11144
11171
  function AnimatedLoaderCircle(_ref) {
11145
11172
  var color = _ref.color,
11146
11173
  progress = _ref.progress;
@@ -11187,7 +11214,7 @@ function AnimatedBackgroundCircle() {
11187
11214
  y2 = _fillEasingFunction[3];
11188
11215
  progress.value = withDelay(delay, withTiming(1, {
11189
11216
  duration: circleBackgroundFillDuration,
11190
- easing: Easing.bezier(x1, y1, x2, y2)
11217
+ easing: Easing$1.bezier(x1, y1, x2, y2)
11191
11218
  }));
11192
11219
  }, [progress, animation]);
11193
11220
  return /*#__PURE__*/jsx(Svg, {
@@ -11212,7 +11239,7 @@ function AnimatedFillCircleContainer(_ref) {
11212
11239
  var delay = animation.delay;
11213
11240
  progress.value = withDelay(delay, withRepeat(withTiming(1, {
11214
11241
  duration: duration,
11215
- easing: Easing.linear
11242
+ easing: Easing$1.linear
11216
11243
  }), isInfinitAnimation$1));
11217
11244
  }, [progress, animation, duration]);
11218
11245
  var rotationStyles = useAnimatedStyle(function () {
@@ -11222,7 +11249,7 @@ function AnimatedFillCircleContainer(_ref) {
11222
11249
  }]
11223
11250
  };
11224
11251
  }, [progress]);
11225
- return /*#__PURE__*/jsx(Animated.View, {
11252
+ return /*#__PURE__*/jsx(Animated$1.View, {
11226
11253
  style: [StyleSheet.absoluteFill, rotationStyles],
11227
11254
  children: children
11228
11255
  });
@@ -11248,7 +11275,7 @@ function AnimatedFilledCircle() {
11248
11275
  y2 = _fillEasingFunction[3];
11249
11276
  progress.value = withDelay(delay, withRepeat(withTiming(0.8, {
11250
11277
  duration: filledCircleFillDuration,
11251
- easing: Easing.bezier(x1, y1, x2, y2)
11278
+ easing: Easing$1.bezier(x1, y1, x2, y2)
11252
11279
  }), isInfinitAnimation, shouldReverse));
11253
11280
  }, [progress, animation]);
11254
11281
  return /*#__PURE__*/jsx(AnimatedFillCircleContainer, {
@@ -11621,7 +11648,7 @@ function SkeletonContent(_ref) {
11621
11648
  if (isLoading) {
11622
11649
  sharedX.value = withRepeat(withTiming(1, {
11623
11650
  duration: theme.kitt.skeleton.animationDuration,
11624
- easing: Easing.inOut(Easing.ease)
11651
+ easing: Easing$1.inOut(Easing$1.ease)
11625
11652
  }), -1);
11626
11653
  }
11627
11654
  }, [sharedX, width, isLoading, theme]);
@@ -11637,7 +11664,7 @@ function SkeletonContent(_ref) {
11637
11664
  width: "100%",
11638
11665
  backgroundColor: "kitt.skeleton.backgroundColor",
11639
11666
  borderColor: "kitt.skeleton.flareColor",
11640
- children: /*#__PURE__*/jsx(Animated.View, {
11667
+ children: /*#__PURE__*/jsx(Animated$1.View, {
11641
11668
  style: [StyleSheet.absoluteFill, linearGradientStyle],
11642
11669
  children: /*#__PURE__*/jsx(LinearGradient, {
11643
11670
  colors: [theme.kitt.skeleton.backgroundColor, theme.kitt.skeleton.flareColor, theme.kitt.skeleton.backgroundColor],
@@ -12767,7 +12794,7 @@ var typeToIcon = function (type) {
12767
12794
  }
12768
12795
  };
12769
12796
 
12770
- var AnimatedView$1 = Animated.createAnimatedComponent(View);
12797
+ var AnimatedView$1 = Animated$1.createAnimatedComponent(View);
12771
12798
  function ToastComponent(_ref) {
12772
12799
  var title = _ref.title,
12773
12800
  description = _ref.description,
@@ -12802,7 +12829,7 @@ function ToastComponent(_ref) {
12802
12829
  width.value = 100;
12803
12830
  width.value = withTiming(0, {
12804
12831
  duration: toastTimeout,
12805
- easing: Easing.bezier(0, 0, 0.58, 1)
12832
+ easing: Easing$1.bezier(0, 0, 0.58, 1)
12806
12833
  }, function () {
12807
12834
  runOnJS(handleHideToast)();
12808
12835
  });
@@ -13371,7 +13398,7 @@ function useStepAnimations(_ref) {
13371
13398
  };
13372
13399
  }
13373
13400
 
13374
- var AnimatedView = Animated.createAnimatedComponent(View);
13401
+ var AnimatedView = Animated$1.createAnimatedComponent(View);
13375
13402
  function BorderlessStep(_ref) {
13376
13403
  var description = _ref.description,
13377
13404
  title = _ref.title,