@ornikar/kitt-universal 5.0.1 → 6.1.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 (61) hide show
  1. package/dist/definitions/Button/AnimatedButtonPressable.d.ts +2 -1
  2. package/dist/definitions/Button/AnimatedButtonPressable.d.ts.map +1 -1
  3. package/dist/definitions/Button/AnimatedButtonPressable.web.d.ts +2 -1
  4. package/dist/definitions/Button/AnimatedButtonPressable.web.d.ts.map +1 -1
  5. package/dist/definitions/Button/BaseStyledButtonPressable.d.ts +2 -1
  6. package/dist/definitions/Button/BaseStyledButtonPressable.d.ts.map +1 -1
  7. package/dist/definitions/Button/Button.d.ts +2 -1
  8. package/dist/definitions/Button/Button.d.ts.map +1 -1
  9. package/dist/definitions/Button/ButtonContent.d.ts +4 -3
  10. package/dist/definitions/Button/ButtonContent.d.ts.map +1 -1
  11. package/dist/definitions/Button/getVariantValuesIfExist.d.ts +5 -0
  12. package/dist/definitions/Button/getVariantValuesIfExist.d.ts.map +1 -0
  13. package/dist/definitions/ExternalLink/ExternalLink.d.ts +3 -3
  14. package/dist/definitions/ExternalLink/ExternalLink.d.ts.map +1 -1
  15. package/dist/definitions/Icon/Icon.d.ts +10 -2
  16. package/dist/definitions/Icon/Icon.d.ts.map +1 -1
  17. package/dist/definitions/Icon/SpinningIcon.d.ts +4 -4
  18. package/dist/definitions/Icon/SpinningIcon.d.ts.map +1 -1
  19. package/dist/definitions/Icon/SpinningIcon.web.d.ts +1 -1
  20. package/dist/definitions/Icon/SpinningIcon.web.d.ts.map +1 -1
  21. package/dist/definitions/Loader/Loader.d.ts.map +1 -1
  22. package/dist/definitions/Loader/Loader.web.d.ts +3 -3
  23. package/dist/definitions/Loader/Loader.web.d.ts.map +1 -1
  24. package/dist/definitions/forms/Checkbox/Checkbox.d.ts.map +1 -1
  25. package/dist/definitions/forms/InputText/InputTextContainer.web.d.ts +1 -1
  26. package/dist/definitions/index.d.ts +4 -0
  27. package/dist/definitions/index.d.ts.map +1 -1
  28. package/dist/definitions/themes/late-ocean/button.d.ts +26 -9
  29. package/dist/definitions/themes/late-ocean/button.d.ts.map +1 -1
  30. package/dist/definitions/typography/TypographySpinningIcon.d.ts +9 -0
  31. package/dist/definitions/typography/TypographySpinningIcon.d.ts.map +1 -0
  32. package/dist/definitions/utils/tests/renderWithProvidersUtils.d.ts +4 -2
  33. package/dist/definitions/utils/tests/renderWithProvidersUtils.d.ts.map +1 -1
  34. package/dist/index-browser-all.es.android.js +294 -303
  35. package/dist/index-browser-all.es.android.js.map +1 -1
  36. package/dist/index-browser-all.es.ios.js +294 -303
  37. package/dist/index-browser-all.es.ios.js.map +1 -1
  38. package/dist/index-browser-all.es.js +294 -303
  39. package/dist/index-browser-all.es.js.map +1 -1
  40. package/dist/index-browser-all.es.web.js +373 -364
  41. package/dist/index-browser-all.es.web.js.map +1 -1
  42. package/dist/index-node-14.17.cjs.js +197 -109
  43. package/dist/index-node-14.17.cjs.js.map +1 -1
  44. package/dist/index-node-14.17.cjs.web.css +1 -1
  45. package/dist/index-node-14.17.cjs.web.js +215 -118
  46. package/dist/index-node-14.17.cjs.web.js.map +1 -1
  47. package/dist/linaria-themes-browser-all.es.android.js +59 -38
  48. package/dist/linaria-themes-browser-all.es.android.js.map +1 -1
  49. package/dist/linaria-themes-browser-all.es.ios.js +59 -38
  50. package/dist/linaria-themes-browser-all.es.ios.js.map +1 -1
  51. package/dist/linaria-themes-browser-all.es.js +59 -38
  52. package/dist/linaria-themes-browser-all.es.js.map +1 -1
  53. package/dist/linaria-themes-browser-all.es.web.js +59 -38
  54. package/dist/linaria-themes-browser-all.es.web.js.map +1 -1
  55. package/dist/linaria-themes-node-14.17.cjs.js +59 -38
  56. package/dist/linaria-themes-node-14.17.cjs.js.map +1 -1
  57. package/dist/linaria-themes-node-14.17.cjs.web.js +59 -38
  58. package/dist/linaria-themes-node-14.17.cjs.web.js.map +1 -1
  59. package/dist/styles.css +1 -1
  60. package/dist/tsbuildinfo +1 -1
  61. package/package.json +8 -7
@@ -24,55 +24,22 @@ const styled__default = /*#__PURE__*/_interopDefaultLegacy(styled);
24
24
  const Animated__default = /*#__PURE__*/_interopDefaultLegacy(Animated);
25
25
  const DateTimePicker__default = /*#__PURE__*/_interopDefaultLegacy(DateTimePicker);
26
26
 
27
- function SpinningIcon({
28
- children
29
- }) {
30
- const animationRef = react.useRef(new reactNative.Animated.Value(0));
31
- const rotation = animationRef.current.interpolate({
32
- inputRange: [0, 1],
33
- outputRange: ['0deg', '360deg']
34
- });
35
- react.useEffect(() => {
36
- if (process.env.TESTS) return undefined;
37
- const animation = reactNative.Animated.loop(reactNative.Animated.timing(animationRef.current, {
38
- toValue: 1,
39
- duration: 1100,
40
- easing: reactNative.Easing.linear,
41
- useNativeDriver: true
42
- }));
43
- animation.start();
44
- return () => {
45
- if (process.env.TESTS) return undefined;
46
- animation.stop();
47
- return undefined;
48
- };
49
- }, []);
50
- return /*#__PURE__*/jsxRuntime.jsx(reactNative.Animated.View, {
51
- style: {
52
- transform: [{
53
- rotate: rotation
54
- }]
55
- },
56
- children: children
57
- });
58
- }
59
-
27
+ const defaultIconSize = 20;
60
28
  const IconContainer$1 = /*#__PURE__*/styled__default.View.withConfig({
61
29
  displayName: "Icon__IconContainer",
62
30
  componentId: "kitt-universal__sc-usm0ol-0"
63
31
  })(["color:", ";width:", "px;height:", "px;align-self:", ";"], ({
64
- color
65
- }) => color, ({
66
- size
67
- }) => size, ({
68
- size
69
- }) => size, ({
70
- align = 'auto'
71
- }) => align);
32
+ $color
33
+ }) => $color, ({
34
+ $size
35
+ }) => $size, ({
36
+ $size
37
+ }) => $size, ({
38
+ $align = 'auto'
39
+ }) => $align);
72
40
  function Icon({
73
41
  icon,
74
- size = 20,
75
- spin,
42
+ size = defaultIconSize,
76
43
  align,
77
44
  color
78
45
  }) {
@@ -80,12 +47,10 @@ function Icon({
80
47
  color
81
48
  });
82
49
  return /*#__PURE__*/jsxRuntime.jsx(IconContainer$1, {
83
- align: align,
84
- size: size,
85
- color: color,
86
- children: spin ? /*#__PURE__*/jsxRuntime.jsx(SpinningIcon, {
87
- children: clonedIcon
88
- }) : clonedIcon
50
+ $align: align,
51
+ $size: size,
52
+ $color: color,
53
+ children: clonedIcon
89
54
  });
90
55
  }
91
56
 
@@ -396,6 +361,20 @@ function Avatar({
396
361
  });
397
362
  }
398
363
 
364
+ const hasVariant = (button, variant) => {
365
+ return variant in button;
366
+ };
367
+
368
+ function getVariantValuesIfExist(theme, type, variant) {
369
+ const button = theme.kitt.button[type];
370
+
371
+ if (hasVariant(button, variant)) {
372
+ return button[variant];
373
+ }
374
+
375
+ return theme.kitt.button[type].default;
376
+ }
377
+
399
378
  const StyledPressable = /*#__PURE__*/styled__default.Pressable.withConfig({
400
379
  displayName: "AnimatedButtonPressable__StyledPressable",
401
380
  componentId: "kitt-universal__sc-175vyve-0"
@@ -416,6 +395,7 @@ const AnimatedButtonPressable = /*#__PURE__*/react.forwardRef(({
416
395
  disabled,
417
396
  accessibilityRole,
418
397
  $type,
398
+ $variant,
419
399
  $isStretch,
420
400
  href,
421
401
  hrefAttrs,
@@ -428,7 +408,7 @@ const AnimatedButtonPressable = /*#__PURE__*/react.forwardRef(({
428
408
  const {
429
409
  backgroundColor,
430
410
  pressedBackgroundColor
431
- } = theme.kitt.button[$type];
411
+ } = getVariantValuesIfExist(theme, $type, $variant);
432
412
  const {
433
413
  scale
434
414
  } = theme.kitt.button;
@@ -458,7 +438,7 @@ const AnimatedButtonPressable = /*#__PURE__*/react.forwardRef(({
458
438
  };
459
439
  _f.asString = "function _f(){const{interpolateColor,color,backgroundColor,pressedBackgroundColor,withSpring,pressed,scale}=jsThis._closure;{return{backgroundColor:interpolateColor(color.value,[0,1],[backgroundColor,pressedBackgroundColor]),transform:[{scale:withSpring(pressed.value?scale.base.active:scale.base.default)}]};}}";
460
440
  _f.__workletHash = 5368461229978;
461
- _f.__location = "/home/circleci/repo/@ornikar/kitt-universal/src/Button/AnimatedButtonPressable.tsx (53:41)";
441
+ _f.__location = "/home/circleci/repo/@ornikar/kitt-universal/src/Button/AnimatedButtonPressable.tsx (56:41)";
462
442
  _f.__optimalization = 2;
463
443
 
464
444
  global.__reanimatedWorkletInit(_f);
@@ -515,11 +495,12 @@ const BaseStyledButtonPressable = /*#__PURE__*/styled__default.View.withConfig({
515
495
  }) => theme.kitt.button.borderRadius, ({
516
496
  theme,
517
497
  $isDisabled,
518
- $type
498
+ $type,
499
+ $variant
519
500
  }) => {
520
- if ($isDisabled) return theme.kitt.button.disabled.backgroundColor;
501
+ if ($isDisabled) return theme.kitt.button.disabled.default.backgroundColor;
521
502
  if (reactNative.Platform.OS !== 'web') return 'transparent';
522
- return theme.kitt.button[$type].backgroundColor;
503
+ return getVariantValuesIfExist(theme, $type, $variant).backgroundColor;
523
504
  }, ({
524
505
  theme,
525
506
  $isLarge,
@@ -572,10 +553,10 @@ function isSubtle(type) {
572
553
  return type.startsWith('subtle');
573
554
  }
574
555
 
575
- const getTextColorByType = type => {
556
+ const getTextColorByType = (type, variant) => {
576
557
  switch (type) {
577
558
  case 'primary':
578
- return 'white';
559
+ return variant === 'ghost' ? 'primary' : 'white';
579
560
 
580
561
  case 'white':
581
562
  return 'white';
@@ -631,7 +612,6 @@ const StyledIconContainer$1 = /*#__PURE__*/styled__default.View.withConfig({
631
612
  function ButtonIcon({
632
613
  icon,
633
614
  color,
634
- spin,
635
615
  iconPosition,
636
616
  testID
637
617
  }) {
@@ -639,7 +619,6 @@ function ButtonIcon({
639
619
  $iconPosition: iconPosition,
640
620
  children: /*#__PURE__*/jsxRuntime.jsx(TypographyIcon, {
641
621
  icon: icon,
642
- spin: spin,
643
622
  testID: testID,
644
623
  color: color
645
624
  })
@@ -654,7 +633,6 @@ function ButtonContentChildren({
654
633
  type,
655
634
  icon,
656
635
  iconPosition,
657
- iconSpin,
658
636
  isDisabled,
659
637
  color,
660
638
  children
@@ -668,9 +646,8 @@ function ButtonContentChildren({
668
646
  const isWebSubtle = isSubtle(type) && reactNative.Platform.OS === 'web' && !isDisabled;
669
647
 
670
648
  if (!children) {
671
- return /*#__PURE__*/jsxRuntime.jsx(TypographyIcon, {
672
- spin: iconSpin // eslint-disable-next-line @typescript-eslint/no-non-null-assertion
673
- ,
649
+ return /*#__PURE__*/jsxRuntime.jsx(TypographyIcon // eslint-disable-next-line @typescript-eslint/no-non-null-assertion
650
+ , {
674
651
  icon: icon,
675
652
  color: isWebSubtle ? 'inherit' : color
676
653
  });
@@ -678,7 +655,6 @@ function ButtonContentChildren({
678
655
 
679
656
  const buttonIconSharedProps = {
680
657
  type,
681
- spin: iconSpin,
682
658
  iconPosition,
683
659
  color: isWebSubtle ? 'inherit' : color
684
660
  };
@@ -721,13 +697,14 @@ const ButtonContentContainer = /*#__PURE__*/styled__default.View.withConfig({
721
697
  });
722
698
  function ButtonContent({
723
699
  type,
700
+ variant,
724
701
  isDisabled,
725
702
  $isStretch,
726
703
  icon,
727
704
  children,
728
705
  ...props
729
706
  }) {
730
- const color = isDisabled ? 'black-light' : getTextColorByType(type);
707
+ const color = isDisabled ? 'black-light' : getTextColorByType(type, variant);
731
708
  return /*#__PURE__*/jsxRuntime.jsx(ButtonContentContainer, {
732
709
  $isSubtle: isSubtle(type),
733
710
  $isStretch: $isStretch,
@@ -753,7 +730,7 @@ const StyledDisabled = /*#__PURE__*/styled__default.View.withConfig({
753
730
  borderWidth,
754
731
  disabled
755
732
  } = theme.kitt.button;
756
- return `${borderWidth.disabled}px solid ${disabled.borderColor}`;
733
+ return `${borderWidth.disabled}px solid ${disabled.default.borderColor}`;
757
734
  }, ({
758
735
  theme
759
736
  }) => theme.kitt.button.borderRadius);
@@ -761,18 +738,22 @@ const StyledDisabled = /*#__PURE__*/styled__default.View.withConfig({
761
738
  const Button = /*#__PURE__*/react.forwardRef(({
762
739
  children,
763
740
  type = 'default',
741
+ variant = 'default',
764
742
  disabled,
765
743
  stretch,
766
744
  large,
767
745
  icon,
768
746
  iconPosition = 'left',
769
- iconSpin,
770
747
  testID,
771
748
  href,
772
749
  hrefAttrs,
773
750
  accessibilityRole = 'button',
774
751
  onPress
775
752
  }, ref) => {
753
+ if ((process.env.NODE_ENV !== "production") && variant === 'ghost' && type !== 'primary') {
754
+ throw new Error('variant=ghost is only allowed with type=primary');
755
+ }
756
+
776
757
  return /*#__PURE__*/jsxRuntime.jsx(AnimatedButtonPressable, {
777
758
  ref: ref,
778
759
  accessibilityRole: accessibilityRole,
@@ -782,19 +763,21 @@ const Button = /*#__PURE__*/react.forwardRef(({
782
763
  disabled: disabled,
783
764
  $isStretch: stretch,
784
765
  $type: type,
766
+ $variant: variant,
785
767
  onPress: onPress,
786
768
  children: /*#__PURE__*/jsxRuntime.jsxs(BaseStyledButtonPressable, {
787
769
  $type: type,
770
+ $variant: variant,
788
771
  $isStretch: stretch,
789
772
  $isLarge: large,
790
773
  $isDisabled: disabled,
791
774
  children: [/*#__PURE__*/jsxRuntime.jsx(ButtonContent, {
792
775
  type: type,
776
+ variant: variant,
793
777
  $isStretch: stretch,
794
778
  isDisabled: disabled,
795
779
  icon: icon,
796
780
  iconPosition: iconPosition,
797
- iconSpin: iconSpin,
798
781
  children: children
799
782
  }), reactNative.Platform.OS !== 'web' && disabled ? /*#__PURE__*/jsxRuntime.jsx(StyledDisabled, {}) : null]
800
783
  })
@@ -868,8 +851,12 @@ function ExternalLink({
868
851
  ...rest
869
852
  }) {
870
853
  return /*#__PURE__*/jsxRuntime.jsx(Component, { ...rest,
871
- onPress: () => {
872
- if (onPress) onPress();
854
+ onPress: e => {
855
+ if (onPress) {
856
+ onPress(e);
857
+ if (e?.defaultPrevented) return;
858
+ }
859
+
873
860
  if (!href) return;
874
861
 
875
862
  switch (openLinkBehavior.native) {
@@ -974,56 +961,77 @@ const button = {
974
961
  }
975
962
  },
976
963
  contentPadding: {
977
- default: '8px 16px 7px',
978
- large: '12px 24px 11px',
979
- disabled: '6px 14px 5px'
964
+ default: '7px 16px 7px',
965
+ large: '11px 24px 11px',
966
+ disabled: '5px 14px 5px'
980
967
  },
981
968
  transition: {
982
969
  duration: '200ms',
983
970
  timingFunction: 'cubic-bezier(0.645, 0.045, 0.355, 1)'
984
971
  },
985
972
  default: {
986
- backgroundColor: 'rgba(0, 0, 0, 0.05)',
987
- pressedBackgroundColor: 'rgba(0, 0, 0, 0.1)',
988
- hoverBackgroundColor: 'rgba(0, 0, 0, 0.1)',
989
- focusBorderColor: 'rgba(0, 0, 0, 0.1)'
973
+ default: {
974
+ backgroundColor: 'rgba(0, 0, 0, 0.05)',
975
+ pressedBackgroundColor: 'rgba(0, 0, 0, 0.1)',
976
+ hoverBackgroundColor: 'rgba(0, 0, 0, 0.1)',
977
+ focusBorderColor: 'rgba(0, 0, 0, 0.1)'
978
+ }
990
979
  },
991
980
  primary: {
992
- backgroundColor: colors.primary,
993
- pressedBackgroundColor: colors.primaryLight,
994
- hoverBackgroundColor: colors.primaryLight,
995
- focusBorderColor: 'rgba(76, 52, 224, 0.2)'
981
+ default: {
982
+ backgroundColor: colors.primary,
983
+ pressedBackgroundColor: colors.primaryLight,
984
+ hoverBackgroundColor: colors.primaryLight,
985
+ focusBorderColor: 'rgba(76, 52, 224, 0.2)'
986
+ },
987
+ ghost: {
988
+ backgroundColor: colors.uiBackgroundLight,
989
+ pressedBackgroundColor: colors.uiBackground,
990
+ hoverBackgroundColor: colors.hover,
991
+ focusBorderColor: 'rgba(255,255,255, 0.4)',
992
+ color: colors.primary,
993
+ hoverColor: colors.hover,
994
+ activeColor: colors.hover
995
+ }
996
996
  },
997
997
  white: {
998
- backgroundColor: 'rgba(255, 255, 255, 0.05)',
999
- pressedBackgroundColor: 'rgba(255, 255, 255, 0.1)',
1000
- hoverBackgroundColor: 'rgba(255, 255, 255, 0.1)',
1001
- focusBorderColor: 'rgba(255, 255, 255, 0.1)'
998
+ default: {
999
+ backgroundColor: 'rgba(255, 255, 255, 0.05)',
1000
+ pressedBackgroundColor: 'rgba(255, 255, 255, 0.1)',
1001
+ hoverBackgroundColor: 'rgba(255, 255, 255, 0.1)',
1002
+ focusBorderColor: 'rgba(255, 255, 255, 0.1)'
1003
+ }
1002
1004
  },
1003
1005
  subtle: {
1004
- backgroundColor: colors.transparent,
1005
- pressedBackgroundColor: colors.transparent,
1006
- hoverBackgroundColor: colors.transparent,
1007
- focusBorderColor: 'rgba(76, 52, 224, 0.2)',
1008
- color: colors.primary,
1009
- hoverColor: 'rgba(76, 52, 224, 0.8)',
1010
- activeColor: 'rgba(76, 52, 224, 0.8)'
1006
+ default: {
1007
+ backgroundColor: colors.transparent,
1008
+ pressedBackgroundColor: colors.transparent,
1009
+ hoverBackgroundColor: colors.transparent,
1010
+ focusBorderColor: 'rgba(76, 52, 224, 0.2)',
1011
+ color: colors.primary,
1012
+ hoverColor: 'rgba(76, 52, 224, 0.8)',
1013
+ activeColor: 'rgba(76, 52, 224, 0.8)'
1014
+ }
1011
1015
  },
1012
1016
  'subtle-dark': {
1013
- backgroundColor: colors.transparent,
1014
- pressedBackgroundColor: colors.transparent,
1015
- hoverBackgroundColor: colors.transparent,
1016
- focusBorderColor: 'rgba(0, 0, 0, 0.1)',
1017
- color: colors.black,
1018
- hoverColor: 'rgba(0, 0, 0, 0.8)',
1019
- activeColor: 'rgba(0, 0, 0, 0.8)'
1017
+ default: {
1018
+ backgroundColor: colors.transparent,
1019
+ pressedBackgroundColor: colors.transparent,
1020
+ hoverBackgroundColor: colors.transparent,
1021
+ focusBorderColor: 'rgba(0, 0, 0, 0.1)',
1022
+ color: colors.black,
1023
+ hoverColor: 'rgba(0, 0, 0, 0.8)',
1024
+ activeColor: 'rgba(0, 0, 0, 0.8)'
1025
+ }
1020
1026
  },
1021
1027
  disabled: {
1022
- backgroundColor: colors.disabled,
1023
- pressedBackgroundColor: colors.disabled,
1024
- hoverBackgroundColor: colors.disabled,
1025
- focusBorderColor: lateOceanColorPalette.black100,
1026
- borderColor: lateOceanColorPalette.black100
1028
+ default: {
1029
+ backgroundColor: colors.disabled,
1030
+ pressedBackgroundColor: colors.disabled,
1031
+ hoverBackgroundColor: colors.disabled,
1032
+ focusBorderColor: lateOceanColorPalette.black100,
1033
+ borderColor: lateOceanColorPalette.black100
1034
+ }
1027
1035
  }
1028
1036
  };
1029
1037
 
@@ -1299,14 +1307,14 @@ const iconButton = {
1299
1307
  },
1300
1308
  disabled: {
1301
1309
  scale: 1,
1302
- backgroundColor: button.disabled.backgroundColor,
1303
- borderColor: button.disabled.borderColor
1310
+ backgroundColor: button.disabled.default.backgroundColor,
1311
+ borderColor: button.disabled.default.borderColor
1304
1312
  },
1305
1313
  default: {
1306
- pressedBackgroundColor: button.default.pressedBackgroundColor
1314
+ pressedBackgroundColor: button.default.default.pressedBackgroundColor
1307
1315
  },
1308
1316
  white: {
1309
- pressedBackgroundColor: button.white.hoverBackgroundColor
1317
+ pressedBackgroundColor: button.white.default.hoverBackgroundColor
1310
1318
  }
1311
1319
  };
1312
1320
 
@@ -1484,7 +1492,7 @@ function useKittTheme() {
1484
1492
  const CheckboxAndLabelPressableWrapper = /*#__PURE__*/styled__default.Pressable.withConfig({
1485
1493
  displayName: "Checkbox__CheckboxAndLabelPressableWrapper",
1486
1494
  componentId: "kitt-universal__sc-1sav1n6-0"
1487
- })(["display:flex;flex-direction:row;align-items:center;"]);
1495
+ })(["display:flex;flex-direction:row;"]);
1488
1496
  const CheckboxContainer = /*#__PURE__*/styled__default.View.withConfig({
1489
1497
  displayName: "Checkbox__CheckboxContainer",
1490
1498
  componentId: "kitt-universal__sc-1sav1n6-1"
@@ -2868,6 +2876,50 @@ function FullScreenModal({
2868
2876
  FullScreenModal.Header = FullScreenModalHeader;
2869
2877
  FullScreenModal.Body = FullScreenModalBody;
2870
2878
 
2879
+ function SpinningIcon({
2880
+ icon,
2881
+ size = defaultIconSize,
2882
+ align,
2883
+ color
2884
+ }) {
2885
+ const clonedIcon = /*#__PURE__*/react.cloneElement(icon, {
2886
+ color
2887
+ });
2888
+ const animationRef = react.useRef(new reactNative.Animated.Value(0));
2889
+ const rotation = animationRef.current.interpolate({
2890
+ inputRange: [0, 1],
2891
+ outputRange: ['0deg', '360deg']
2892
+ });
2893
+ react.useEffect(() => {
2894
+ if (process.env.NODE_ENV === 'test') return undefined;
2895
+ const animation = reactNative.Animated.loop(reactNative.Animated.timing(animationRef.current, {
2896
+ toValue: 1,
2897
+ duration: 1100,
2898
+ easing: reactNative.Easing.linear,
2899
+ useNativeDriver: true
2900
+ }));
2901
+ animation.start();
2902
+ return () => {
2903
+ if (process.env.NODE_ENV === 'test') return undefined;
2904
+ animation.stop();
2905
+ return undefined;
2906
+ };
2907
+ }, []);
2908
+ return /*#__PURE__*/jsxRuntime.jsx(IconContainer$1, {
2909
+ $align: align,
2910
+ $size: size,
2911
+ $color: color,
2912
+ children: /*#__PURE__*/jsxRuntime.jsx(reactNative.Animated.View, {
2913
+ style: {
2914
+ transform: [{
2915
+ rotate: rotation
2916
+ }]
2917
+ },
2918
+ children: clonedIcon
2919
+ })
2920
+ });
2921
+ }
2922
+
2871
2923
  const ContentView = /*#__PURE__*/styled__default.View.withConfig({
2872
2924
  displayName: "ListItemContent__ContentView",
2873
2925
  componentId: "kitt-universal__sc-57q0u9-0"
@@ -2995,9 +3047,10 @@ function getActivityIndicatorSize(size) {
2995
3047
  return size < 36 ? 'small' : 'large';
2996
3048
  }
2997
3049
 
3050
+ const defaultLoaderSize = defaultIconSize;
2998
3051
  function Loader({
2999
3052
  color = 'primary',
3000
- size = 20
3053
+ size = defaultLoaderSize
3001
3054
  }) {
3002
3055
  const theme = /*#__PURE__*/styled.useTheme();
3003
3056
  const colorHex = theme.kitt.typography.colors[color];
@@ -4114,6 +4167,39 @@ function TypographyLink({
4114
4167
  });
4115
4168
  }
4116
4169
 
4170
+ function TypographySpinningIconSpecifiedColor({
4171
+ color,
4172
+ ...props
4173
+ }) {
4174
+ const theme = /*#__PURE__*/styled.useTheme();
4175
+ return /*#__PURE__*/jsxRuntime.jsx(SpinningIcon, { ...props,
4176
+ color: color === 'inherit' ? 'inherit' : theme.kitt.typography.colors[color]
4177
+ });
4178
+ }
4179
+
4180
+ function TypographySpinningIconInheritColor(props) {
4181
+ const color = useTypographyColor();
4182
+ return /*#__PURE__*/jsxRuntime.jsx(TypographySpinningIconSpecifiedColor, {
4183
+ color: color,
4184
+ ...props
4185
+ });
4186
+ }
4187
+
4188
+ function TypographySpinningIcon({
4189
+ color,
4190
+ ...props
4191
+ }) {
4192
+ if (color) {
4193
+ return /*#__PURE__*/jsxRuntime.jsx(TypographySpinningIconSpecifiedColor, {
4194
+ color: color,
4195
+ ...props
4196
+ });
4197
+ }
4198
+
4199
+ return /*#__PURE__*/jsxRuntime.jsx(TypographySpinningIconInheritColor, { ...props
4200
+ });
4201
+ }
4202
+
4117
4203
  const hex2rgba = (hex, alpha = 1) => {
4118
4204
  const r = parseInt(hex.slice(1, 3), 16);
4119
4205
  const g = parseInt(hex.slice(3, 5), 16);
@@ -4188,6 +4274,7 @@ exports.Notification = Notification;
4188
4274
  exports.Radio = Radio;
4189
4275
  exports.Section = DeprecatedSection;
4190
4276
  exports.Skeleton = Skeleton;
4277
+ exports.SpinningIcon = SpinningIcon;
4191
4278
  exports.Story = Story;
4192
4279
  exports.StoryBlock = StoryBlock;
4193
4280
  exports.StoryContainer = StoryContainer;
@@ -4204,6 +4291,7 @@ exports.Typography = Typography;
4204
4291
  exports.TypographyEmoji = TypographyEmoji;
4205
4292
  exports.TypographyIcon = TypographyIcon;
4206
4293
  exports.TypographyLink = TypographyLink;
4294
+ exports.TypographySpinningIcon = TypographySpinningIcon;
4207
4295
  exports.createWindowSizeHelper = createWindowSizeHelper;
4208
4296
  exports.hex2rgba = hex2rgba;
4209
4297
  exports.matchWindowSize = matchWindowSize;