@ornikar/kitt-universal 5.0.2 → 6.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.
- package/dist/definitions/Button/Button.d.ts +0 -1
- package/dist/definitions/Button/Button.d.ts.map +1 -1
- package/dist/definitions/Button/ButtonContent.d.ts +1 -1
- package/dist/definitions/Button/ButtonContent.d.ts.map +1 -1
- package/dist/definitions/Icon/Icon.d.ts +10 -2
- package/dist/definitions/Icon/Icon.d.ts.map +1 -1
- package/dist/definitions/Icon/SpinningIcon.d.ts +4 -4
- package/dist/definitions/Icon/SpinningIcon.d.ts.map +1 -1
- package/dist/definitions/Icon/SpinningIcon.web.d.ts +1 -1
- package/dist/definitions/Icon/SpinningIcon.web.d.ts.map +1 -1
- package/dist/definitions/Loader/Loader.d.ts.map +1 -1
- package/dist/definitions/Loader/Loader.web.d.ts +3 -3
- package/dist/definitions/Loader/Loader.web.d.ts.map +1 -1
- package/dist/definitions/forms/InputText/InputTextContainer.web.d.ts +1 -1
- package/dist/definitions/index.d.ts +4 -0
- package/dist/definitions/index.d.ts.map +1 -1
- package/dist/definitions/typography/TypographySpinningIcon.d.ts +9 -0
- package/dist/definitions/typography/TypographySpinningIcon.d.ts.map +1 -0
- package/dist/index-browser-all.es.android.js +191 -254
- package/dist/index-browser-all.es.android.js.map +1 -1
- package/dist/index-browser-all.es.ios.js +191 -254
- package/dist/index-browser-all.es.ios.js.map +1 -1
- package/dist/index-browser-all.es.js +191 -254
- package/dist/index-browser-all.es.js.map +1 -1
- package/dist/index-browser-all.es.web.js +257 -311
- package/dist/index-browser-all.es.web.js.map +1 -1
- package/dist/index-node-14.17.cjs.js +100 -62
- package/dist/index-node-14.17.cjs.js.map +1 -1
- package/dist/index-node-14.17.cjs.web.css +1 -1
- package/dist/index-node-14.17.cjs.web.js +101 -65
- package/dist/index-node-14.17.cjs.web.js.map +1 -1
- package/dist/linaria-themes-browser-all.es.android.js +3 -3
- package/dist/linaria-themes-browser-all.es.android.js.map +1 -1
- package/dist/linaria-themes-browser-all.es.ios.js +3 -3
- package/dist/linaria-themes-browser-all.es.ios.js.map +1 -1
- package/dist/linaria-themes-browser-all.es.js +3 -3
- package/dist/linaria-themes-browser-all.es.js.map +1 -1
- package/dist/linaria-themes-browser-all.es.web.js +3 -3
- package/dist/linaria-themes-browser-all.es.web.js.map +1 -1
- package/dist/linaria-themes-node-14.17.cjs.js +3 -3
- package/dist/linaria-themes-node-14.17.cjs.js.map +1 -1
- package/dist/linaria-themes-node-14.17.cjs.web.js +3 -3
- package/dist/linaria-themes-node-14.17.cjs.web.js.map +1 -1
- package/dist/styles.css +1 -1
- package/dist/tsbuildinfo +1 -1
- package/package.json +7 -6
|
@@ -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
|
-
|
|
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 =
|
|
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:
|
|
87
|
-
children: clonedIcon
|
|
88
|
-
}) : clonedIcon
|
|
50
|
+
$align: align,
|
|
51
|
+
$size: size,
|
|
52
|
+
$color: color,
|
|
53
|
+
children: clonedIcon
|
|
89
54
|
});
|
|
90
55
|
}
|
|
91
56
|
|
|
@@ -631,7 +596,6 @@ const StyledIconContainer$1 = /*#__PURE__*/styled__default.View.withConfig({
|
|
|
631
596
|
function ButtonIcon({
|
|
632
597
|
icon,
|
|
633
598
|
color,
|
|
634
|
-
spin,
|
|
635
599
|
iconPosition,
|
|
636
600
|
testID
|
|
637
601
|
}) {
|
|
@@ -639,7 +603,6 @@ function ButtonIcon({
|
|
|
639
603
|
$iconPosition: iconPosition,
|
|
640
604
|
children: /*#__PURE__*/jsxRuntime.jsx(TypographyIcon, {
|
|
641
605
|
icon: icon,
|
|
642
|
-
spin: spin,
|
|
643
606
|
testID: testID,
|
|
644
607
|
color: color
|
|
645
608
|
})
|
|
@@ -654,7 +617,6 @@ function ButtonContentChildren({
|
|
|
654
617
|
type,
|
|
655
618
|
icon,
|
|
656
619
|
iconPosition,
|
|
657
|
-
iconSpin,
|
|
658
620
|
isDisabled,
|
|
659
621
|
color,
|
|
660
622
|
children
|
|
@@ -668,9 +630,8 @@ function ButtonContentChildren({
|
|
|
668
630
|
const isWebSubtle = isSubtle(type) && reactNative.Platform.OS === 'web' && !isDisabled;
|
|
669
631
|
|
|
670
632
|
if (!children) {
|
|
671
|
-
return /*#__PURE__*/jsxRuntime.jsx(TypographyIcon
|
|
672
|
-
|
|
673
|
-
,
|
|
633
|
+
return /*#__PURE__*/jsxRuntime.jsx(TypographyIcon // eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
|
634
|
+
, {
|
|
674
635
|
icon: icon,
|
|
675
636
|
color: isWebSubtle ? 'inherit' : color
|
|
676
637
|
});
|
|
@@ -678,7 +639,6 @@ function ButtonContentChildren({
|
|
|
678
639
|
|
|
679
640
|
const buttonIconSharedProps = {
|
|
680
641
|
type,
|
|
681
|
-
spin: iconSpin,
|
|
682
642
|
iconPosition,
|
|
683
643
|
color: isWebSubtle ? 'inherit' : color
|
|
684
644
|
};
|
|
@@ -766,7 +726,6 @@ const Button = /*#__PURE__*/react.forwardRef(({
|
|
|
766
726
|
large,
|
|
767
727
|
icon,
|
|
768
728
|
iconPosition = 'left',
|
|
769
|
-
iconSpin,
|
|
770
729
|
testID,
|
|
771
730
|
href,
|
|
772
731
|
hrefAttrs,
|
|
@@ -794,7 +753,6 @@ const Button = /*#__PURE__*/react.forwardRef(({
|
|
|
794
753
|
isDisabled: disabled,
|
|
795
754
|
icon: icon,
|
|
796
755
|
iconPosition: iconPosition,
|
|
797
|
-
iconSpin: iconSpin,
|
|
798
756
|
children: children
|
|
799
757
|
}), reactNative.Platform.OS !== 'web' && disabled ? /*#__PURE__*/jsxRuntime.jsx(StyledDisabled, {}) : null]
|
|
800
758
|
})
|
|
@@ -974,9 +932,9 @@ const button = {
|
|
|
974
932
|
}
|
|
975
933
|
},
|
|
976
934
|
contentPadding: {
|
|
977
|
-
default: '
|
|
978
|
-
large: '
|
|
979
|
-
disabled: '
|
|
935
|
+
default: '7px 16px 7px',
|
|
936
|
+
large: '11px 24px 11px',
|
|
937
|
+
disabled: '5px 14px 5px'
|
|
980
938
|
},
|
|
981
939
|
transition: {
|
|
982
940
|
duration: '200ms',
|
|
@@ -2868,6 +2826,50 @@ function FullScreenModal({
|
|
|
2868
2826
|
FullScreenModal.Header = FullScreenModalHeader;
|
|
2869
2827
|
FullScreenModal.Body = FullScreenModalBody;
|
|
2870
2828
|
|
|
2829
|
+
function SpinningIcon({
|
|
2830
|
+
icon,
|
|
2831
|
+
size = defaultIconSize,
|
|
2832
|
+
align,
|
|
2833
|
+
color
|
|
2834
|
+
}) {
|
|
2835
|
+
const clonedIcon = /*#__PURE__*/react.cloneElement(icon, {
|
|
2836
|
+
color
|
|
2837
|
+
});
|
|
2838
|
+
const animationRef = react.useRef(new reactNative.Animated.Value(0));
|
|
2839
|
+
const rotation = animationRef.current.interpolate({
|
|
2840
|
+
inputRange: [0, 1],
|
|
2841
|
+
outputRange: ['0deg', '360deg']
|
|
2842
|
+
});
|
|
2843
|
+
react.useEffect(() => {
|
|
2844
|
+
if (process.env.NODE_ENV === 'test') return undefined;
|
|
2845
|
+
const animation = reactNative.Animated.loop(reactNative.Animated.timing(animationRef.current, {
|
|
2846
|
+
toValue: 1,
|
|
2847
|
+
duration: 1100,
|
|
2848
|
+
easing: reactNative.Easing.linear,
|
|
2849
|
+
useNativeDriver: true
|
|
2850
|
+
}));
|
|
2851
|
+
animation.start();
|
|
2852
|
+
return () => {
|
|
2853
|
+
if (process.env.NODE_ENV === 'test') return undefined;
|
|
2854
|
+
animation.stop();
|
|
2855
|
+
return undefined;
|
|
2856
|
+
};
|
|
2857
|
+
}, []);
|
|
2858
|
+
return /*#__PURE__*/jsxRuntime.jsx(IconContainer$1, {
|
|
2859
|
+
$align: align,
|
|
2860
|
+
$size: size,
|
|
2861
|
+
$color: color,
|
|
2862
|
+
children: /*#__PURE__*/jsxRuntime.jsx(reactNative.Animated.View, {
|
|
2863
|
+
style: {
|
|
2864
|
+
transform: [{
|
|
2865
|
+
rotate: rotation
|
|
2866
|
+
}]
|
|
2867
|
+
},
|
|
2868
|
+
children: clonedIcon
|
|
2869
|
+
})
|
|
2870
|
+
});
|
|
2871
|
+
}
|
|
2872
|
+
|
|
2871
2873
|
const ContentView = /*#__PURE__*/styled__default.View.withConfig({
|
|
2872
2874
|
displayName: "ListItemContent__ContentView",
|
|
2873
2875
|
componentId: "kitt-universal__sc-57q0u9-0"
|
|
@@ -2995,9 +2997,10 @@ function getActivityIndicatorSize(size) {
|
|
|
2995
2997
|
return size < 36 ? 'small' : 'large';
|
|
2996
2998
|
}
|
|
2997
2999
|
|
|
3000
|
+
const defaultLoaderSize = defaultIconSize;
|
|
2998
3001
|
function Loader({
|
|
2999
3002
|
color = 'primary',
|
|
3000
|
-
size =
|
|
3003
|
+
size = defaultLoaderSize
|
|
3001
3004
|
}) {
|
|
3002
3005
|
const theme = /*#__PURE__*/styled.useTheme();
|
|
3003
3006
|
const colorHex = theme.kitt.typography.colors[color];
|
|
@@ -4114,6 +4117,39 @@ function TypographyLink({
|
|
|
4114
4117
|
});
|
|
4115
4118
|
}
|
|
4116
4119
|
|
|
4120
|
+
function TypographySpinningIconSpecifiedColor({
|
|
4121
|
+
color,
|
|
4122
|
+
...props
|
|
4123
|
+
}) {
|
|
4124
|
+
const theme = /*#__PURE__*/styled.useTheme();
|
|
4125
|
+
return /*#__PURE__*/jsxRuntime.jsx(SpinningIcon, { ...props,
|
|
4126
|
+
color: color === 'inherit' ? 'inherit' : theme.kitt.typography.colors[color]
|
|
4127
|
+
});
|
|
4128
|
+
}
|
|
4129
|
+
|
|
4130
|
+
function TypographySpinningIconInheritColor(props) {
|
|
4131
|
+
const color = useTypographyColor();
|
|
4132
|
+
return /*#__PURE__*/jsxRuntime.jsx(TypographySpinningIconSpecifiedColor, {
|
|
4133
|
+
color: color,
|
|
4134
|
+
...props
|
|
4135
|
+
});
|
|
4136
|
+
}
|
|
4137
|
+
|
|
4138
|
+
function TypographySpinningIcon({
|
|
4139
|
+
color,
|
|
4140
|
+
...props
|
|
4141
|
+
}) {
|
|
4142
|
+
if (color) {
|
|
4143
|
+
return /*#__PURE__*/jsxRuntime.jsx(TypographySpinningIconSpecifiedColor, {
|
|
4144
|
+
color: color,
|
|
4145
|
+
...props
|
|
4146
|
+
});
|
|
4147
|
+
}
|
|
4148
|
+
|
|
4149
|
+
return /*#__PURE__*/jsxRuntime.jsx(TypographySpinningIconInheritColor, { ...props
|
|
4150
|
+
});
|
|
4151
|
+
}
|
|
4152
|
+
|
|
4117
4153
|
const hex2rgba = (hex, alpha = 1) => {
|
|
4118
4154
|
const r = parseInt(hex.slice(1, 3), 16);
|
|
4119
4155
|
const g = parseInt(hex.slice(3, 5), 16);
|
|
@@ -4188,6 +4224,7 @@ exports.Notification = Notification;
|
|
|
4188
4224
|
exports.Radio = Radio;
|
|
4189
4225
|
exports.Section = DeprecatedSection;
|
|
4190
4226
|
exports.Skeleton = Skeleton;
|
|
4227
|
+
exports.SpinningIcon = SpinningIcon;
|
|
4191
4228
|
exports.Story = Story;
|
|
4192
4229
|
exports.StoryBlock = StoryBlock;
|
|
4193
4230
|
exports.StoryContainer = StoryContainer;
|
|
@@ -4204,6 +4241,7 @@ exports.Typography = Typography;
|
|
|
4204
4241
|
exports.TypographyEmoji = TypographyEmoji;
|
|
4205
4242
|
exports.TypographyIcon = TypographyIcon;
|
|
4206
4243
|
exports.TypographyLink = TypographyLink;
|
|
4244
|
+
exports.TypographySpinningIcon = TypographySpinningIcon;
|
|
4207
4245
|
exports.createWindowSizeHelper = createWindowSizeHelper;
|
|
4208
4246
|
exports.hex2rgba = hex2rgba;
|
|
4209
4247
|
exports.matchWindowSize = matchWindowSize;
|