@ornikar/kitt-universal 5.0.2 → 7.0.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 (79) hide show
  1. package/dist/definitions/Avatar/Avatar.d.ts +5 -4
  2. package/dist/definitions/Avatar/Avatar.d.ts.map +1 -1
  3. package/dist/definitions/Button/AnimatedButtonPressable.d.ts +2 -1
  4. package/dist/definitions/Button/AnimatedButtonPressable.d.ts.map +1 -1
  5. package/dist/definitions/Button/AnimatedButtonPressable.web.d.ts +2 -1
  6. package/dist/definitions/Button/AnimatedButtonPressable.web.d.ts.map +1 -1
  7. package/dist/definitions/Button/BaseStyledButtonPressable.d.ts +2 -1
  8. package/dist/definitions/Button/BaseStyledButtonPressable.d.ts.map +1 -1
  9. package/dist/definitions/Button/Button.d.ts +2 -1
  10. package/dist/definitions/Button/Button.d.ts.map +1 -1
  11. package/dist/definitions/Button/ButtonContent.d.ts +4 -3
  12. package/dist/definitions/Button/ButtonContent.d.ts.map +1 -1
  13. package/dist/definitions/Button/getVariantValuesIfExist.d.ts +5 -0
  14. package/dist/definitions/Button/getVariantValuesIfExist.d.ts.map +1 -0
  15. package/dist/definitions/ExternalLink/ExternalLink.d.ts +3 -3
  16. package/dist/definitions/ExternalLink/ExternalLink.d.ts.map +1 -1
  17. package/dist/definitions/Icon/Icon.d.ts +10 -2
  18. package/dist/definitions/Icon/Icon.d.ts.map +1 -1
  19. package/dist/definitions/Icon/SpinningIcon.d.ts +4 -3
  20. package/dist/definitions/Icon/SpinningIcon.d.ts.map +1 -1
  21. package/dist/definitions/Icon/SpinningIcon.web.d.ts +1 -1
  22. package/dist/definitions/Icon/SpinningIcon.web.d.ts.map +1 -1
  23. package/dist/definitions/LoaderIcon/LoaderIcon.d.ts +7 -0
  24. package/dist/definitions/LoaderIcon/LoaderIcon.d.ts.map +1 -0
  25. package/dist/definitions/Overlay/Overlay.d.ts +4 -3
  26. package/dist/definitions/Overlay/Overlay.d.ts.map +1 -1
  27. package/dist/definitions/PageLoader/PageLoader.d.ts +4 -0
  28. package/dist/definitions/PageLoader/PageLoader.d.ts.map +1 -0
  29. package/dist/definitions/PageLoader/PageLoader.web.d.ts +3 -0
  30. package/dist/definitions/PageLoader/PageLoader.web.d.ts.map +1 -0
  31. package/dist/definitions/forms/InputText/InputTextContainer.web.d.ts +1 -1
  32. package/dist/definitions/index.d.ts +7 -4
  33. package/dist/definitions/index.d.ts.map +1 -1
  34. package/dist/definitions/themes/default.d.ts +37 -36
  35. package/dist/definitions/themes/default.d.ts.map +1 -1
  36. package/dist/definitions/themes/late-ocean/avatar.d.ts +7 -3
  37. package/dist/definitions/themes/late-ocean/avatar.d.ts.map +1 -1
  38. package/dist/definitions/themes/late-ocean/button.d.ts +26 -9
  39. package/dist/definitions/themes/late-ocean/button.d.ts.map +1 -1
  40. package/dist/definitions/themes/late-ocean/pageLoader.d.ts +5 -0
  41. package/dist/definitions/themes/late-ocean/pageLoader.d.ts.map +1 -0
  42. package/dist/definitions/utils/tests/renderWithProvidersUtils.d.ts +4 -2
  43. package/dist/definitions/utils/tests/renderWithProvidersUtils.d.ts.map +1 -1
  44. package/dist/index-browser-all.es.android.js +265 -305
  45. package/dist/index-browser-all.es.android.js.map +1 -1
  46. package/dist/index-browser-all.es.ios.js +265 -305
  47. package/dist/index-browser-all.es.ios.js.map +1 -1
  48. package/dist/index-browser-all.es.js +265 -305
  49. package/dist/index-browser-all.es.js.map +1 -1
  50. package/dist/index-browser-all.es.web.js +375 -399
  51. package/dist/index-browser-all.es.web.js.map +1 -1
  52. package/dist/index-node-14.17.cjs.js +208 -146
  53. package/dist/index-node-14.17.cjs.js.map +1 -1
  54. package/dist/index-node-14.17.cjs.web.css +2 -2
  55. package/dist/index-node-14.17.cjs.web.js +247 -177
  56. package/dist/index-node-14.17.cjs.web.js.map +1 -1
  57. package/dist/linaria-themes-browser-all.es.android.js +72 -43
  58. package/dist/linaria-themes-browser-all.es.android.js.map +1 -1
  59. package/dist/linaria-themes-browser-all.es.ios.js +72 -43
  60. package/dist/linaria-themes-browser-all.es.ios.js.map +1 -1
  61. package/dist/linaria-themes-browser-all.es.js +72 -43
  62. package/dist/linaria-themes-browser-all.es.js.map +1 -1
  63. package/dist/linaria-themes-browser-all.es.web.js +72 -43
  64. package/dist/linaria-themes-browser-all.es.web.js.map +1 -1
  65. package/dist/linaria-themes-node-14.17.cjs.js +72 -43
  66. package/dist/linaria-themes-node-14.17.cjs.js.map +1 -1
  67. package/dist/linaria-themes-node-14.17.cjs.web.js +72 -43
  68. package/dist/linaria-themes-node-14.17.cjs.web.js.map +1 -1
  69. package/dist/styles.css +2 -2
  70. package/dist/tsbuildinfo +1 -1
  71. package/package.json +9 -8
  72. package/dist/definitions/Loader/LargeLoader.d.ts +0 -7
  73. package/dist/definitions/Loader/LargeLoader.d.ts.map +0 -1
  74. package/dist/definitions/Loader/LargeLoader.web.d.ts +0 -3
  75. package/dist/definitions/Loader/LargeLoader.web.d.ts.map +0 -1
  76. package/dist/definitions/Loader/Loader.d.ts +0 -8
  77. package/dist/definitions/Loader/Loader.d.ts.map +0 -1
  78. package/dist/definitions/Loader/Loader.web.d.ts +0 -8
  79. package/dist/definitions/Loader/Loader.web.d.ts.map +0 -1
@@ -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
 
@@ -325,10 +290,11 @@ const StyledAvatarView = /*#__PURE__*/styled__default.View.withConfig({
325
290
  })(["border-radius:", ";background-color:", ";height:", "px;width:", "px;overflow:hidden;align-items:center;justify-content:center;"], ({
326
291
  theme,
327
292
  $isRound,
328
- $size
293
+ $size,
294
+ $sizeVariant
329
295
  }) => {
330
296
  if ($isRound) return `${$size / 2}px`;
331
- return `${theme.kitt.avatar.borderRadius}px`;
297
+ return `${$sizeVariant === 'large' ? theme.kitt.avatar.large.borderRadius : theme.kitt.avatar.borderRadius}px`;
332
298
  }, ({
333
299
  theme,
334
300
  $isLight
@@ -344,8 +310,8 @@ function AvatarContent({
344
310
  firstname,
345
311
  lastname,
346
312
  alt,
347
- base,
348
- isLight
313
+ isLight,
314
+ sizeVariant
349
315
  }) {
350
316
  if (src) {
351
317
  return /*#__PURE__*/jsxRuntime.jsx(reactNative.Image, {
@@ -362,8 +328,8 @@ function AvatarContent({
362
328
 
363
329
  if (firstname && lastname) {
364
330
  return /*#__PURE__*/jsxRuntime.jsx(Typography.Text, {
365
- base: base,
366
- variant: "bold",
331
+ base: sizeVariant === 'large' ? 'body-large' : 'body',
332
+ variant: sizeVariant === 'large' ? 'bold' : 'regular',
367
333
  color: isLight ? 'black' : 'white',
368
334
  children: getInitials(firstname, lastname)
369
335
  });
@@ -378,24 +344,39 @@ function AvatarContent({
378
344
 
379
345
  function Avatar({
380
346
  size = 40,
381
- base = 'body-small',
382
347
  round,
383
348
  light,
349
+ sizeVariant,
384
350
  ...props
385
351
  }) {
386
352
  return /*#__PURE__*/jsxRuntime.jsx(StyledAvatarView, {
387
353
  $size: size,
388
354
  $isRound: round,
389
355
  $isLight: light,
356
+ $sizeVariant: sizeVariant,
390
357
  children: /*#__PURE__*/jsxRuntime.jsx(AvatarContent, {
391
358
  size: size,
392
- base: base,
393
359
  isLight: light,
360
+ sizeVariant: sizeVariant,
394
361
  ...props
395
362
  })
396
363
  });
397
364
  }
398
365
 
366
+ const hasVariant = (button, variant) => {
367
+ return variant in button;
368
+ };
369
+
370
+ function getVariantValuesIfExist(theme, type, variant) {
371
+ const button = theme.kitt.button[type];
372
+
373
+ if (hasVariant(button, variant)) {
374
+ return button[variant];
375
+ }
376
+
377
+ return theme.kitt.button[type].default;
378
+ }
379
+
399
380
  const StyledPressable = /*#__PURE__*/styled__default.Pressable.withConfig({
400
381
  displayName: "AnimatedButtonPressable__StyledPressable",
401
382
  componentId: "kitt-universal__sc-175vyve-0"
@@ -416,6 +397,7 @@ const AnimatedButtonPressable = /*#__PURE__*/react.forwardRef(({
416
397
  disabled,
417
398
  accessibilityRole,
418
399
  $type,
400
+ $variant,
419
401
  $isStretch,
420
402
  href,
421
403
  hrefAttrs,
@@ -428,7 +410,7 @@ const AnimatedButtonPressable = /*#__PURE__*/react.forwardRef(({
428
410
  const {
429
411
  backgroundColor,
430
412
  pressedBackgroundColor
431
- } = theme.kitt.button[$type];
413
+ } = getVariantValuesIfExist(theme, $type, $variant);
432
414
  const {
433
415
  scale
434
416
  } = theme.kitt.button;
@@ -458,7 +440,7 @@ const AnimatedButtonPressable = /*#__PURE__*/react.forwardRef(({
458
440
  };
459
441
  _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
442
  _f.__workletHash = 5368461229978;
461
- _f.__location = "/home/circleci/repo/@ornikar/kitt-universal/src/Button/AnimatedButtonPressable.tsx (53:41)";
443
+ _f.__location = "/home/circleci/repo/@ornikar/kitt-universal/src/Button/AnimatedButtonPressable.tsx (56:41)";
462
444
  _f.__optimalization = 2;
463
445
 
464
446
  global.__reanimatedWorkletInit(_f);
@@ -515,11 +497,12 @@ const BaseStyledButtonPressable = /*#__PURE__*/styled__default.View.withConfig({
515
497
  }) => theme.kitt.button.borderRadius, ({
516
498
  theme,
517
499
  $isDisabled,
518
- $type
500
+ $type,
501
+ $variant
519
502
  }) => {
520
- if ($isDisabled) return theme.kitt.button.disabled.backgroundColor;
503
+ if ($isDisabled) return theme.kitt.button.disabled.default.backgroundColor;
521
504
  if (reactNative.Platform.OS !== 'web') return 'transparent';
522
- return theme.kitt.button[$type].backgroundColor;
505
+ return getVariantValuesIfExist(theme, $type, $variant).backgroundColor;
523
506
  }, ({
524
507
  theme,
525
508
  $isLarge,
@@ -572,10 +555,10 @@ function isSubtle(type) {
572
555
  return type.startsWith('subtle');
573
556
  }
574
557
 
575
- const getTextColorByType = type => {
558
+ const getTextColorByType = (type, variant) => {
576
559
  switch (type) {
577
560
  case 'primary':
578
- return 'white';
561
+ return variant === 'ghost' ? 'primary' : 'white';
579
562
 
580
563
  case 'white':
581
564
  return 'white';
@@ -631,7 +614,6 @@ const StyledIconContainer$1 = /*#__PURE__*/styled__default.View.withConfig({
631
614
  function ButtonIcon({
632
615
  icon,
633
616
  color,
634
- spin,
635
617
  iconPosition,
636
618
  testID
637
619
  }) {
@@ -639,7 +621,6 @@ function ButtonIcon({
639
621
  $iconPosition: iconPosition,
640
622
  children: /*#__PURE__*/jsxRuntime.jsx(TypographyIcon, {
641
623
  icon: icon,
642
- spin: spin,
643
624
  testID: testID,
644
625
  color: color
645
626
  })
@@ -654,7 +635,6 @@ function ButtonContentChildren({
654
635
  type,
655
636
  icon,
656
637
  iconPosition,
657
- iconSpin,
658
638
  isDisabled,
659
639
  color,
660
640
  children
@@ -668,9 +648,8 @@ function ButtonContentChildren({
668
648
  const isWebSubtle = isSubtle(type) && reactNative.Platform.OS === 'web' && !isDisabled;
669
649
 
670
650
  if (!children) {
671
- return /*#__PURE__*/jsxRuntime.jsx(TypographyIcon, {
672
- spin: iconSpin // eslint-disable-next-line @typescript-eslint/no-non-null-assertion
673
- ,
651
+ return /*#__PURE__*/jsxRuntime.jsx(TypographyIcon // eslint-disable-next-line @typescript-eslint/no-non-null-assertion
652
+ , {
674
653
  icon: icon,
675
654
  color: isWebSubtle ? 'inherit' : color
676
655
  });
@@ -678,7 +657,6 @@ function ButtonContentChildren({
678
657
 
679
658
  const buttonIconSharedProps = {
680
659
  type,
681
- spin: iconSpin,
682
660
  iconPosition,
683
661
  color: isWebSubtle ? 'inherit' : color
684
662
  };
@@ -721,13 +699,14 @@ const ButtonContentContainer = /*#__PURE__*/styled__default.View.withConfig({
721
699
  });
722
700
  function ButtonContent({
723
701
  type,
702
+ variant,
724
703
  isDisabled,
725
704
  $isStretch,
726
705
  icon,
727
706
  children,
728
707
  ...props
729
708
  }) {
730
- const color = isDisabled ? 'black-light' : getTextColorByType(type);
709
+ const color = isDisabled ? 'black-light' : getTextColorByType(type, variant);
731
710
  return /*#__PURE__*/jsxRuntime.jsx(ButtonContentContainer, {
732
711
  $isSubtle: isSubtle(type),
733
712
  $isStretch: $isStretch,
@@ -753,7 +732,7 @@ const StyledDisabled = /*#__PURE__*/styled__default.View.withConfig({
753
732
  borderWidth,
754
733
  disabled
755
734
  } = theme.kitt.button;
756
- return `${borderWidth.disabled}px solid ${disabled.borderColor}`;
735
+ return `${borderWidth.disabled}px solid ${disabled.default.borderColor}`;
757
736
  }, ({
758
737
  theme
759
738
  }) => theme.kitt.button.borderRadius);
@@ -761,18 +740,22 @@ const StyledDisabled = /*#__PURE__*/styled__default.View.withConfig({
761
740
  const Button = /*#__PURE__*/react.forwardRef(({
762
741
  children,
763
742
  type = 'default',
743
+ variant = 'default',
764
744
  disabled,
765
745
  stretch,
766
746
  large,
767
747
  icon,
768
748
  iconPosition = 'left',
769
- iconSpin,
770
749
  testID,
771
750
  href,
772
751
  hrefAttrs,
773
752
  accessibilityRole = 'button',
774
753
  onPress
775
754
  }, ref) => {
755
+ if ((process.env.NODE_ENV !== "production") && variant === 'ghost' && type !== 'primary') {
756
+ throw new Error('variant=ghost is only allowed with type=primary');
757
+ }
758
+
776
759
  return /*#__PURE__*/jsxRuntime.jsx(AnimatedButtonPressable, {
777
760
  ref: ref,
778
761
  accessibilityRole: accessibilityRole,
@@ -782,19 +765,21 @@ const Button = /*#__PURE__*/react.forwardRef(({
782
765
  disabled: disabled,
783
766
  $isStretch: stretch,
784
767
  $type: type,
768
+ $variant: variant,
785
769
  onPress: onPress,
786
770
  children: /*#__PURE__*/jsxRuntime.jsxs(BaseStyledButtonPressable, {
787
771
  $type: type,
772
+ $variant: variant,
788
773
  $isStretch: stretch,
789
774
  $isLarge: large,
790
775
  $isDisabled: disabled,
791
776
  children: [/*#__PURE__*/jsxRuntime.jsx(ButtonContent, {
792
777
  type: type,
778
+ variant: variant,
793
779
  $isStretch: stretch,
794
780
  isDisabled: disabled,
795
781
  icon: icon,
796
782
  iconPosition: iconPosition,
797
- iconSpin: iconSpin,
798
783
  children: children
799
784
  }), reactNative.Platform.OS !== 'web' && disabled ? /*#__PURE__*/jsxRuntime.jsx(StyledDisabled, {}) : null]
800
785
  })
@@ -868,8 +853,12 @@ function ExternalLink({
868
853
  ...rest
869
854
  }) {
870
855
  return /*#__PURE__*/jsxRuntime.jsx(Component, { ...rest,
871
- onPress: () => {
872
- if (onPress) onPress();
856
+ onPress: e => {
857
+ if (onPress) {
858
+ onPress(e);
859
+ if (e?.defaultPrevented) return;
860
+ }
861
+
873
862
  if (!href) return;
874
863
 
875
864
  switch (openLinkBehavior.native) {
@@ -951,6 +940,9 @@ const avatar = {
951
940
  },
952
941
  light: {
953
942
  backgroundColor: lateOceanColorPalette.black100
943
+ },
944
+ large: {
945
+ borderRadius: 30
954
946
  }
955
947
  };
956
948
 
@@ -974,56 +966,77 @@ const button = {
974
966
  }
975
967
  },
976
968
  contentPadding: {
977
- default: '8px 16px 7px',
978
- large: '12px 24px 11px',
979
- disabled: '6px 14px 5px'
969
+ default: '7px 16px 7px',
970
+ large: '11px 24px 11px',
971
+ disabled: '5px 14px 5px'
980
972
  },
981
973
  transition: {
982
974
  duration: '200ms',
983
975
  timingFunction: 'cubic-bezier(0.645, 0.045, 0.355, 1)'
984
976
  },
985
977
  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)'
978
+ default: {
979
+ backgroundColor: 'rgba(0, 0, 0, 0.05)',
980
+ pressedBackgroundColor: 'rgba(0, 0, 0, 0.1)',
981
+ hoverBackgroundColor: 'rgba(0, 0, 0, 0.1)',
982
+ focusBorderColor: 'rgba(0, 0, 0, 0.1)'
983
+ }
990
984
  },
991
985
  primary: {
992
- backgroundColor: colors.primary,
993
- pressedBackgroundColor: colors.primaryLight,
994
- hoverBackgroundColor: colors.primaryLight,
995
- focusBorderColor: 'rgba(76, 52, 224, 0.2)'
986
+ default: {
987
+ backgroundColor: colors.primary,
988
+ pressedBackgroundColor: colors.primaryLight,
989
+ hoverBackgroundColor: colors.primaryLight,
990
+ focusBorderColor: 'rgba(76, 52, 224, 0.2)'
991
+ },
992
+ ghost: {
993
+ backgroundColor: colors.uiBackgroundLight,
994
+ pressedBackgroundColor: colors.uiBackground,
995
+ hoverBackgroundColor: colors.hover,
996
+ focusBorderColor: 'rgba(255,255,255, 0.4)',
997
+ color: colors.primary,
998
+ hoverColor: colors.hover,
999
+ activeColor: colors.hover
1000
+ }
996
1001
  },
997
1002
  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)'
1003
+ default: {
1004
+ backgroundColor: 'rgba(255, 255, 255, 0.05)',
1005
+ pressedBackgroundColor: 'rgba(255, 255, 255, 0.1)',
1006
+ hoverBackgroundColor: 'rgba(255, 255, 255, 0.1)',
1007
+ focusBorderColor: 'rgba(255, 255, 255, 0.1)'
1008
+ }
1002
1009
  },
1003
1010
  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)'
1011
+ default: {
1012
+ backgroundColor: colors.transparent,
1013
+ pressedBackgroundColor: colors.transparent,
1014
+ hoverBackgroundColor: colors.transparent,
1015
+ focusBorderColor: 'rgba(76, 52, 224, 0.2)',
1016
+ color: colors.primary,
1017
+ hoverColor: 'rgba(76, 52, 224, 0.8)',
1018
+ activeColor: 'rgba(76, 52, 224, 0.8)'
1019
+ }
1011
1020
  },
1012
1021
  '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)'
1022
+ default: {
1023
+ backgroundColor: colors.transparent,
1024
+ pressedBackgroundColor: colors.transparent,
1025
+ hoverBackgroundColor: colors.transparent,
1026
+ focusBorderColor: 'rgba(0, 0, 0, 0.1)',
1027
+ color: colors.black,
1028
+ hoverColor: 'rgba(0, 0, 0, 0.8)',
1029
+ activeColor: 'rgba(0, 0, 0, 0.8)'
1030
+ }
1020
1031
  },
1021
1032
  disabled: {
1022
- backgroundColor: colors.disabled,
1023
- pressedBackgroundColor: colors.disabled,
1024
- hoverBackgroundColor: colors.disabled,
1025
- focusBorderColor: lateOceanColorPalette.black100,
1026
- borderColor: lateOceanColorPalette.black100
1033
+ default: {
1034
+ backgroundColor: colors.disabled,
1035
+ pressedBackgroundColor: colors.disabled,
1036
+ hoverBackgroundColor: colors.disabled,
1037
+ focusBorderColor: lateOceanColorPalette.black100,
1038
+ borderColor: lateOceanColorPalette.black100
1039
+ }
1027
1040
  }
1028
1041
  };
1029
1042
 
@@ -1299,14 +1312,14 @@ const iconButton = {
1299
1312
  },
1300
1313
  disabled: {
1301
1314
  scale: 1,
1302
- backgroundColor: button.disabled.backgroundColor,
1303
- borderColor: button.disabled.borderColor
1315
+ backgroundColor: button.disabled.default.backgroundColor,
1316
+ borderColor: button.disabled.default.borderColor
1304
1317
  },
1305
1318
  default: {
1306
- pressedBackgroundColor: button.default.pressedBackgroundColor
1319
+ pressedBackgroundColor: button.default.default.pressedBackgroundColor
1307
1320
  },
1308
1321
  white: {
1309
- pressedBackgroundColor: button.white.hoverBackgroundColor
1322
+ pressedBackgroundColor: button.white.default.hoverBackgroundColor
1310
1323
  }
1311
1324
  };
1312
1325
 
@@ -1317,6 +1330,10 @@ const listItem = {
1317
1330
  innerMargin: 8
1318
1331
  };
1319
1332
 
1333
+ const pageLoader = {
1334
+ size: 60
1335
+ };
1336
+
1320
1337
  const shadows = {
1321
1338
  medium: '0px 10px 20px rgba(41, 48, 51, 0.25)'
1322
1339
  };
@@ -1407,19 +1424,20 @@ const theme = {
1407
1424
  lateOcean: lateOceanColorPalette
1408
1425
  },
1409
1426
  avatar,
1427
+ breakpoints,
1410
1428
  button,
1411
1429
  card,
1412
1430
  feedbackMessage,
1413
1431
  forms,
1414
- typography,
1415
- tag,
1416
- shadows,
1417
1432
  fullScreenModal,
1418
1433
  iconButton,
1419
1434
  listItem,
1420
- tooltip,
1435
+ pageLoader,
1436
+ shadows,
1421
1437
  skeleton,
1422
- breakpoints
1438
+ tag,
1439
+ tooltip,
1440
+ typography
1423
1441
  };
1424
1442
 
1425
1443
  function matchWindowSize({
@@ -1757,12 +1775,13 @@ const OverlayPressable = /*#__PURE__*/styled__default(reactNative.Pressable).wit
1757
1775
  backgroundColor: theme.kitt.colors.overlay.dark
1758
1776
  }));
1759
1777
  function Overlay({
1760
- onPress
1778
+ onPress,
1779
+ children
1761
1780
  }) {
1762
1781
  return /*#__PURE__*/jsxRuntime.jsx(OverlayPressable, {
1763
1782
  accessibilityRole: "none",
1764
1783
  onPress: onPress,
1765
- children: /*#__PURE__*/jsxRuntime.jsx(reactNative.View, {})
1784
+ children: children
1766
1785
  });
1767
1786
  }
1768
1787
 
@@ -2868,6 +2887,47 @@ function FullScreenModal({
2868
2887
  FullScreenModal.Header = FullScreenModalHeader;
2869
2888
  FullScreenModal.Body = FullScreenModalBody;
2870
2889
 
2890
+ function SpinningIcon({
2891
+ icon,
2892
+ color
2893
+ }) {
2894
+ if (process.env.NODE_ENV !== 'production' && !color) {
2895
+ throw new Error(`Invalid color passed to SpinningIcon: ${String(color)}`);
2896
+ }
2897
+
2898
+ const clonedIcon = /*#__PURE__*/react.cloneElement(icon, {
2899
+ color
2900
+ });
2901
+ const animationRef = react.useRef(new reactNative.Animated.Value(0));
2902
+ const rotation = animationRef.current.interpolate({
2903
+ inputRange: [0, 1],
2904
+ outputRange: ['0deg', '360deg']
2905
+ });
2906
+ react.useEffect(() => {
2907
+ if (process.env.NODE_ENV === 'test') return undefined;
2908
+ const animation = reactNative.Animated.loop(reactNative.Animated.timing(animationRef.current, {
2909
+ toValue: 1,
2910
+ duration: 1100,
2911
+ easing: reactNative.Easing.linear,
2912
+ useNativeDriver: true
2913
+ }));
2914
+ animation.start();
2915
+ return () => {
2916
+ if (process.env.NODE_ENV === 'test') return undefined;
2917
+ animation.stop();
2918
+ return undefined;
2919
+ };
2920
+ }, []);
2921
+ return /*#__PURE__*/jsxRuntime.jsx(reactNative.Animated.View, {
2922
+ style: {
2923
+ transform: [{
2924
+ rotate: rotation
2925
+ }]
2926
+ },
2927
+ children: clonedIcon
2928
+ });
2929
+ }
2930
+
2871
2931
  const ContentView = /*#__PURE__*/styled__default.View.withConfig({
2872
2932
  displayName: "ListItemContent__ContentView",
2873
2933
  componentId: "kitt-universal__sc-57q0u9-0"
@@ -2990,30 +3050,12 @@ ListItem.Content = ListItemContent;
2990
3050
  ListItem.SideContent = ListItemSideContent;
2991
3051
  ListItem.SideContainer = ListItemSideContainer;
2992
3052
 
2993
- function getActivityIndicatorSize(size) {
2994
- if (reactNative.Platform.OS === 'android') return size;
2995
- return size < 36 ? 'small' : 'large';
2996
- }
2997
-
2998
- function Loader({
2999
- color = 'primary',
3000
- size = 20
3001
- }) {
3002
- const theme = /*#__PURE__*/styled.useTheme();
3003
- const colorHex = theme.kitt.typography.colors[color];
3004
- return /*#__PURE__*/jsxRuntime.jsx(reactNative.ActivityIndicator, {
3005
- testID: "ActivityIndicator",
3006
- color: colorHex,
3007
- size: getActivityIndicatorSize(size)
3008
- });
3009
- }
3010
-
3011
- function LargeLoader({
3012
- color = 'primary'
3053
+ function LoaderIcon({
3054
+ color
3013
3055
  }) {
3014
- return /*#__PURE__*/jsxRuntime.jsx(Loader, {
3056
+ return /*#__PURE__*/jsxRuntime.jsx(SpinningIcon, {
3015
3057
  color: color,
3016
- size: 60
3058
+ icon: /*#__PURE__*/jsxRuntime.jsx(kittIcons.ArcIcon, {})
3017
3059
  });
3018
3060
  }
3019
3061
 
@@ -3200,6 +3242,24 @@ function Notification({
3200
3242
  });
3201
3243
  }
3202
3244
 
3245
+ function getActivityIndicatorSize(size) {
3246
+ if (reactNative.Platform.OS === 'android') return size;
3247
+ return size < 36 ? 'small' : 'large';
3248
+ }
3249
+
3250
+ function PageLoader() {
3251
+ const theme = /*#__PURE__*/styled.useTheme();
3252
+ const {
3253
+ size
3254
+ } = theme.kitt.pageLoader;
3255
+ const colorHex = theme.kitt.typography.colors.primary;
3256
+ return /*#__PURE__*/jsxRuntime.jsx(reactNative.ActivityIndicator, {
3257
+ testID: "ActivityIndicator",
3258
+ color: colorHex,
3259
+ size: getActivityIndicatorSize(size)
3260
+ });
3261
+ }
3262
+
3203
3263
  const Container$2 = /*#__PURE__*/styled__default.View.withConfig({
3204
3264
  displayName: "SkeletonContent__Container",
3205
3265
  componentId: "kitt-universal__sc-1u3chjb-0"
@@ -4178,16 +4238,18 @@ exports.KittBreakpointsMax = KittBreakpointsMax;
4178
4238
  exports.KittThemeDecorator = KittThemeDecorator;
4179
4239
  exports.KittThemeProvider = KittThemeProvider;
4180
4240
  exports.Label = Label;
4181
- exports.LargeLoader = LargeLoader;
4182
4241
  exports.ListItem = ListItem;
4183
- exports.Loader = Loader;
4242
+ exports.LoaderIcon = LoaderIcon;
4184
4243
  exports.MatchWindowSize = MatchWindowSize;
4185
4244
  exports.Message = Message;
4186
4245
  exports.Modal = Modal;
4187
4246
  exports.Notification = Notification;
4247
+ exports.Overlay = Overlay;
4248
+ exports.PageLoader = PageLoader;
4188
4249
  exports.Radio = Radio;
4189
4250
  exports.Section = DeprecatedSection;
4190
4251
  exports.Skeleton = Skeleton;
4252
+ exports.SpinningIcon = SpinningIcon;
4191
4253
  exports.Story = Story;
4192
4254
  exports.StoryBlock = StoryBlock;
4193
4255
  exports.StoryContainer = StoryContainer;