@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,4 +1,3 @@
1
- .kitt-u_spinningIcon_ssn8o83 > svg{-webkit-animation:spin-kitt-u_spinningIcon_ssn8o83 1.1s infinite linear;animation:spin-kitt-u_spinningIcon_ssn8o83 1.1s infinite linear;}@-webkit-keyframes spin-kitt-u_spinningIcon_ssn8o83{0%{-webkit-transform:rotate(-1deg);-ms-transform:rotate(-1deg);transform:rotate(-1deg);}100%{-webkit-transform:rotate(359deg);-ms-transform:rotate(359deg);transform:rotate(359deg);}}@keyframes spin-kitt-u_spinningIcon_ssn8o83{0%{-webkit-transform:rotate(-1deg);-ms-transform:rotate(-1deg);transform:rotate(-1deg);}100%{-webkit-transform:rotate(359deg);-ms-transform:rotate(359deg);transform:rotate(359deg);}}
2
1
  .kitt-u_overflowHidden_otm3u3{overflow:hidden;}
3
2
  .kitt-u_contentAnimationEnter_c11xxy4r{opacity:0;-webkit-transform:rotateZ(5deg) scale(0.8);-ms-transform:rotateZ(5deg) scale(0.8);transform:rotateZ(5deg) scale(0.8);}
4
3
  .kitt-u_contentAnimatioEnterActive_cl52117{opacity:1;-webkit-transform:rotateZ(0) scale(1);-ms-transform:rotateZ(0) scale(1);transform:rotateZ(0) scale(1);-webkit-transition:all 400ms cubic-bezier(0.77,0,0.175,1);transition:all 400ms cubic-bezier(0.77,0,0.175,1);}
@@ -1,12 +1,12 @@
1
- import { useContext, createContext, forwardRef, useMemo, cloneElement, useState, useRef, useEffect, Children, useReducer, useCallback, Fragment as Fragment$1 } from 'react';
1
+ import { useContext, createContext, forwardRef, useMemo, cloneElement, useRef, useEffect, useState, Children, useReducer, useCallback, Fragment as Fragment$1 } from 'react';
2
2
  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';
3
3
  export { useClipboard, useContrastText, useMediaQuery, useSx, useToken } from 'native-base';
4
4
  import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
5
5
  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';
6
+ import { Animated, Easing, ScrollView as ScrollView$2, View as View$2, Linking, Pressable as Pressable$2, StyleSheet, useWindowDimensions } from 'react-native';
7
+ export { useWindowDimensions as useWindowSize } from 'react-native';
6
8
  import { createPortal } from 'react-dom';
7
9
  import { CSSTransition } from 'react-transition-group';
8
- import { ScrollView as ScrollView$2, View as View$2, Linking, Pressable as Pressable$2, StyleSheet, useWindowDimensions } from 'react-native';
9
- export { useWindowDimensions as useWindowSize } from 'react-native';
10
10
  import { parse } from '@twemoji/parser';
11
11
  import Downshift, { useSelect } from 'downshift';
12
12
  import { getDocumentAsync } from 'expo-document-picker';
@@ -14,7 +14,7 @@ import { launchImageLibraryAsync } from 'expo-image-picker';
14
14
  import { useDebouncedCallback } from 'use-debounce';
15
15
  import { Loader } from '@googlemaps/js-api-loader';
16
16
  import { parseNumber, getCountryCallingCode, isValidNumber } from 'libphonenumber-js';
17
- import Animated, { useAnimatedStyle, withSpring, withTiming, useSharedValue, interpolateColor, Easing, useAnimatedProps, withDelay, withRepeat, interpolate, runOnJS } from 'react-native-reanimated';
17
+ import Animated$1, { useAnimatedStyle, withSpring, withTiming, useSharedValue, interpolateColor, Easing as Easing$1, useAnimatedProps, withDelay, withRepeat, interpolate, runOnJS } from 'react-native-reanimated';
18
18
  import { useSafeAreaInsets } from 'react-native-safe-area-context';
19
19
  import Svg, { Circle as Circle$1 } from 'react-native-svg';
20
20
  import { useFloating, autoUpdate, offset, autoPlacement, shift, arrow } from '@floating-ui/react-dom';
@@ -2109,6 +2109,7 @@ const typography = {
2109
2109
  contentCaps: {
2110
2110
  fontFamily: {
2111
2111
  native: {
2112
+ regular: 'GTStandardNarrow',
2112
2113
  bold: 'GTStandardNarrowBold'
2113
2114
  },
2114
2115
  web: {
@@ -3675,16 +3676,42 @@ const Button = /*#__PURE__*/forwardRef(({
3675
3676
  });
3676
3677
  });
3677
3678
 
3678
- const spinningIcon = "kitt-u_spinningIcon_ssn8o83";
3679
3679
  function SpinningIcon({
3680
3680
  icon,
3681
3681
  color
3682
3682
  }) {
3683
+ if (process.env.NODE_ENV !== 'production' && !color) {
3684
+ throw new Error(`Invalid color passed to SpinningIcon: ${String(color)}`);
3685
+ }
3683
3686
  const clonedIcon = /*#__PURE__*/cloneElement(icon, {
3684
3687
  color
3685
3688
  });
3686
- return /*#__PURE__*/jsx("div", {
3687
- className: spinningIcon,
3689
+ const animationRef = useRef(new Animated.Value(0));
3690
+ const rotation = animationRef.current.interpolate({
3691
+ inputRange: [0, 1],
3692
+ outputRange: ['0deg', '360deg']
3693
+ });
3694
+ useEffect(() => {
3695
+ if (process.env.NODE_ENV === 'test') return undefined;
3696
+ const animation = Animated.loop(Animated.timing(animationRef.current, {
3697
+ toValue: 1,
3698
+ duration: 1100,
3699
+ easing: Easing.linear,
3700
+ useNativeDriver: "web" !== 'web'
3701
+ }));
3702
+ animation.start();
3703
+ return () => {
3704
+ if (process.env.NODE_ENV === 'test') return undefined;
3705
+ animation.stop();
3706
+ return undefined;
3707
+ };
3708
+ }, []);
3709
+ return /*#__PURE__*/jsx(Animated.View, {
3710
+ style: {
3711
+ transform: [{
3712
+ rotate: rotation
3713
+ }]
3714
+ },
3688
3715
  children: clonedIcon
3689
3716
  });
3690
3717
  }
@@ -7094,7 +7121,7 @@ const TextArea = /*#__PURE__*/forwardRef(({
7094
7121
  base: "body-s",
7095
7122
  color: deepPurpleColorPalette['grey.5'],
7096
7123
  children: helper
7097
- }) : null, shouldDisplayLimit ? /*#__PURE__*/jsx(Animated.View, {
7124
+ }) : null, shouldDisplayLimit ? /*#__PURE__*/jsx(Animated$1.View, {
7098
7125
  style: limitContainerAnimatedStyle,
7099
7126
  children: /*#__PURE__*/jsxs(HStack$1, {
7100
7127
  alignItems: "center",
@@ -7104,7 +7131,7 @@ const TextArea = /*#__PURE__*/forwardRef(({
7104
7131
  variant: "bold",
7105
7132
  color: deepPurpleColorPalette['grey.5'],
7106
7133
  children: [props.value?.length || 0, "/", limit]
7107
- }), /*#__PURE__*/jsx(Animated.View, {
7134
+ }), /*#__PURE__*/jsx(Animated$1.View, {
7108
7135
  style: checkIconAnimatedStyle,
7109
7136
  children: /*#__PURE__*/jsx(TypographyIcon, {
7110
7137
  icon: /*#__PURE__*/jsx(CheckCircleFillIcon, {}),
@@ -7176,17 +7203,17 @@ function ToggleAnimated({
7176
7203
  useEffect(() => {
7177
7204
  marginLeftAnim.value = withTiming(value ? marginLeft : 0, {
7178
7205
  duration: 200,
7179
- easing: Easing.ease
7206
+ easing: Easing$1.ease
7180
7207
  });
7181
7208
  }, [value, marginLeftAnim, marginLeft]);
7182
7209
  useEffect(() => {
7183
7210
  hoverAnim.value = withTiming(isHovered ? value ? -1 : 1 : 0, {
7184
7211
  duration: 200,
7185
- easing: Easing.ease
7212
+ easing: Easing$1.ease
7186
7213
  });
7187
7214
  hoverBackgroundAnim.value = withTiming(isHovered ? 0 : 1, {
7188
7215
  duration: 200,
7189
- easing: Easing.ease
7216
+ easing: Easing$1.ease
7190
7217
  });
7191
7218
  }, [isHovered, hoverAnim, value, hoverBackgroundAnim]);
7192
7219
  return /*#__PURE__*/jsx(View$1, {
@@ -7194,7 +7221,7 @@ function ToggleAnimated({
7194
7221
  borderColor: `kitt.forms.toggle.${variant}.${disabledState}.${state}.wrapperBorder.color`,
7195
7222
  borderWidth: `kitt.forms.toggle.${variant}.${disabledState}.${state}.wrapperBorder.width`,
7196
7223
  borderRadius: "full",
7197
- children: /*#__PURE__*/jsx(Animated.View, {
7224
+ children: /*#__PURE__*/jsx(Animated$1.View, {
7198
7225
  style: [hoverBackgroundTranslate, {
7199
7226
  borderColor: theme.kitt.forms.toggle[variant][disabledState][state].border.color,
7200
7227
  borderWidth: theme.kitt.forms.toggle[variant][disabledState][state].border.width,
@@ -7203,7 +7230,7 @@ function ToggleAnimated({
7203
7230
  height: theme.kitt.forms.toggle[variant][disabledState][state].height[size],
7204
7231
  padding: size === 'medium' ? 3 : 4
7205
7232
  }],
7206
- children: /*#__PURE__*/jsx(Animated.View, {
7233
+ children: /*#__PURE__*/jsx(Animated$1.View, {
7207
7234
  style: [buttonTranslate, hoverTranslate],
7208
7235
  children: /*#__PURE__*/jsx(View$1, {
7209
7236
  borderRadius: "full",
@@ -7968,7 +7995,7 @@ const useNativeAnimation = ({
7968
7995
  transform: [{
7969
7996
  translateY: withTiming(-4, {
7970
7997
  duration: TRANSLATE_Y_DURATION,
7971
- easing: Easing.linear
7998
+ easing: Easing$1.linear
7972
7999
  })
7973
8000
  }, {
7974
8001
  scale: withTiming(1, {
@@ -7982,7 +8009,7 @@ const useNativeAnimation = ({
7982
8009
  transform: [{
7983
8010
  translateY: withTiming(-10, {
7984
8011
  duration: TRANSLATE_Y_DURATION,
7985
- easing: Easing.linear
8012
+ easing: Easing$1.linear
7986
8013
  })
7987
8014
  }, {
7988
8015
  scale: withTiming(1.3, {
@@ -7995,7 +8022,7 @@ const useNativeAnimation = ({
7995
8022
  transform: [{
7996
8023
  translateY: withTiming(0, {
7997
8024
  duration: TRANSLATE_Y_DURATION,
7998
- easing: Easing.linear
8025
+ easing: Easing$1.linear
7999
8026
  })
8000
8027
  }, {
8001
8028
  scale: withTiming(1, {
@@ -8052,7 +8079,7 @@ function StaticMapMarker$1({
8052
8079
  alignItems: "center",
8053
8080
  width: containerWidth,
8054
8081
  height: containerHeight,
8055
- children: [/*#__PURE__*/jsx(Animated.View, {
8082
+ children: [/*#__PURE__*/jsx(Animated$1.View, {
8056
8083
  style: animatedStyle,
8057
8084
  children: variant === MapMarkerVariantEnum.MEETING_POINT ? /*#__PURE__*/jsx(SvgMeetingPointMarkerinline, {
8058
8085
  width: mpMarkerSvgWidth,
@@ -10954,7 +10981,7 @@ function Notification({
10954
10981
  });
10955
10982
  }
10956
10983
 
10957
- const AnimatedCircle = Animated.createAnimatedComponent(Circle$1);
10984
+ const AnimatedCircle = Animated$1.createAnimatedComponent(Circle$1);
10958
10985
  function AnimatedLoaderCircle({
10959
10986
  color,
10960
10987
  progress
@@ -11002,7 +11029,7 @@ function AnimatedBackgroundCircle() {
11002
11029
  const [x1, y1, x2, y2] = fillEasingFunction;
11003
11030
  progress.value = withDelay(delay, withTiming(1, {
11004
11031
  duration: circleBackgroundFillDuration,
11005
- easing: Easing.bezier(x1, y1, x2, y2)
11032
+ easing: Easing$1.bezier(x1, y1, x2, y2)
11006
11033
  }));
11007
11034
  }, [progress, animation]);
11008
11035
  return /*#__PURE__*/jsx(Svg, {
@@ -11032,7 +11059,7 @@ function AnimatedFillCircleContainer({
11032
11059
  } = animation;
11033
11060
  progress.value = withDelay(delay, withRepeat(withTiming(1, {
11034
11061
  duration,
11035
- easing: Easing.linear
11062
+ easing: Easing$1.linear
11036
11063
  }), isInfinitAnimation$1));
11037
11064
  }, [progress, animation, duration]);
11038
11065
  const rotationStyles = useAnimatedStyle(() => {
@@ -11042,7 +11069,7 @@ function AnimatedFillCircleContainer({
11042
11069
  }]
11043
11070
  };
11044
11071
  }, [progress]);
11045
- return /*#__PURE__*/jsx(Animated.View, {
11072
+ return /*#__PURE__*/jsx(Animated$1.View, {
11046
11073
  style: [StyleSheet.absoluteFill, rotationStyles],
11047
11074
  children: children
11048
11075
  });
@@ -11067,7 +11094,7 @@ function AnimatedFilledCircle() {
11067
11094
  const [x1, y1, x2, y2] = fillEasingFunction;
11068
11095
  progress.value = withDelay(delay, withRepeat(withTiming(0.8, {
11069
11096
  duration: filledCircleFillDuration,
11070
- easing: Easing.bezier(x1, y1, x2, y2)
11097
+ easing: Easing$1.bezier(x1, y1, x2, y2)
11071
11098
  }), isInfinitAnimation, shouldReverse));
11072
11099
  }, [progress, animation]);
11073
11100
  return /*#__PURE__*/jsx(AnimatedFillCircleContainer, {
@@ -11443,7 +11470,7 @@ function SkeletonContent({
11443
11470
  if (isLoading) {
11444
11471
  sharedX.value = withRepeat(withTiming(1, {
11445
11472
  duration: theme.kitt.skeleton.animationDuration,
11446
- easing: Easing.inOut(Easing.ease)
11473
+ easing: Easing$1.inOut(Easing$1.ease)
11447
11474
  }), -1);
11448
11475
  }
11449
11476
  }, [sharedX, width, isLoading, theme]);
@@ -11459,7 +11486,7 @@ function SkeletonContent({
11459
11486
  width: "100%",
11460
11487
  backgroundColor: "kitt.skeleton.backgroundColor",
11461
11488
  borderColor: "kitt.skeleton.flareColor",
11462
- children: /*#__PURE__*/jsx(Animated.View, {
11489
+ children: /*#__PURE__*/jsx(Animated$1.View, {
11463
11490
  style: [StyleSheet.absoluteFill, linearGradientStyle],
11464
11491
  children: /*#__PURE__*/jsx(LinearGradient, {
11465
11492
  colors: [theme.kitt.skeleton.backgroundColor, theme.kitt.skeleton.flareColor, theme.kitt.skeleton.backgroundColor],
@@ -12574,7 +12601,7 @@ const typeToIcon = type => {
12574
12601
  }
12575
12602
  };
12576
12603
 
12577
- const AnimatedView$1 = Animated.createAnimatedComponent(View);
12604
+ const AnimatedView$1 = Animated$1.createAnimatedComponent(View);
12578
12605
  function ToastComponent({
12579
12606
  title,
12580
12607
  description,
@@ -12606,7 +12633,7 @@ function ToastComponent({
12606
12633
  width.value = 100;
12607
12634
  width.value = withTiming(0, {
12608
12635
  duration: toastTimeout,
12609
- easing: Easing.bezier(0, 0, 0.58, 1)
12636
+ easing: Easing$1.bezier(0, 0, 0.58, 1)
12610
12637
  }, () => {
12611
12638
  runOnJS(handleHideToast)();
12612
12639
  });
@@ -13178,7 +13205,7 @@ function useStepAnimations({
13178
13205
  };
13179
13206
  }
13180
13207
 
13181
- const AnimatedView = Animated.createAnimatedComponent(View);
13208
+ const AnimatedView = Animated$1.createAnimatedComponent(View);
13182
13209
  function BorderlessStep({
13183
13210
  description,
13184
13211
  title,