@cdek-it/react-native-ui-kit 0.6.8 → 1.0.0-beta.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/README.md +9 -0
- package/dist/components/Accordion/Accordion.js +9 -10
- package/dist/components/Avatar/Avatar.js +7 -9
- package/dist/components/Badge/Badge.js +28 -20
- package/dist/components/Button/BaseButton.d.ts +3 -3
- package/dist/components/Button/BaseButton.js +12 -41
- package/dist/components/Button/Button.js +6 -4
- package/dist/components/Button/ButtonBadge.js +13 -12
- package/dist/components/Button/ButtonSeverity.js +6 -4
- package/dist/components/Button/index.d.ts +1 -1
- package/dist/components/Button/types.d.ts +2 -25
- package/dist/components/Button/utils/ButtonActivityIndicator.d.ts +3 -3
- package/dist/components/Button/utils/ButtonActivityIndicator.js +16 -12
- package/dist/components/Button/utils/ButtonContainer.d.ts +15 -6
- package/dist/components/Button/utils/ButtonContainer.js +424 -4
- package/dist/components/Button/utils/ButtonIcon.d.ts +8 -4
- package/dist/components/Button/utils/ButtonIcon.js +147 -4
- package/dist/components/Button/utils/ButtonLabel.d.ts +9 -4
- package/dist/components/Button/utils/ButtonLabel.js +139 -4
- package/dist/components/Button/utils/ButtonLeftArea.d.ts +9 -4
- package/dist/components/Button/utils/ButtonLeftArea.js +3 -3
- package/dist/components/Button/utils/ButtonPressedContext.d.ts +1 -0
- package/dist/components/Button/utils/ButtonPressedContext.js +2 -0
- package/dist/components/Button/utils/ButtonRightArea.d.ts +9 -3
- package/dist/components/Button/utils/ButtonRightArea.js +3 -3
- package/dist/components/Button/utils/ButtonVariantContext.d.ts +6 -0
- package/dist/components/Button/utils/ButtonVariantContext.js +4 -0
- package/dist/components/Checkbox/Checkbox.d.ts +6 -7
- package/dist/components/Checkbox/Checkbox.js +74 -22
- package/dist/components/Chip/Chip.js +13 -7
- package/dist/components/Dialog/DialogComponent.js +2 -3
- package/dist/components/Dialog/DialogHeader.js +17 -13
- package/dist/components/Divider/Divider.js +6 -6
- package/dist/components/Input/InputGroup.js +6 -13
- package/dist/components/Input/InputGroupAddon.js +5 -5
- package/dist/components/Input/InputOtp/InputOtp.js +2 -3
- package/dist/components/Input/InputOtp/InputOtpItem.js +2 -3
- package/dist/components/Input/InputSwitch/InputSwitch.js +2 -2
- package/dist/components/Input/InputSwitch/styles/useHandleStyles.js +13 -11
- package/dist/components/Input/InputSwitch/styles/useSliderStyles.d.ts +6 -5
- package/dist/components/Input/InputSwitch/styles/useSliderStyles.js +36 -29
- package/dist/components/Input/InputTextBase/InputTextBase.d.ts +0 -5
- package/dist/components/Input/InputTextBase/InputTextBase.js +41 -26
- package/dist/components/Input/InputTextBase/useInputStyles.d.ts +6 -5
- package/dist/components/Input/InputTextBase/useInputStyles.js +6 -9
- package/dist/components/Input/index.d.ts +0 -1
- package/dist/components/Input/index.js +0 -1
- package/dist/components/List/Base/ListBase.js +17 -14
- package/dist/components/MenuItem/MenuItemAccessory.js +5 -5
- package/dist/components/MenuItem/MenuItemIcon.js +4 -5
- package/dist/components/MenuItem/Template/MenuItemTemplate.js +8 -5
- package/dist/components/Message/Message.js +54 -38
- package/dist/components/ProgressBar/ProgressBar.js +2 -3
- package/dist/components/ProgressSpinner/ProgressSpinner.js +3 -4
- package/dist/components/RadioButton/RadioButton.js +87 -104
- package/dist/components/Rating/Rating.js +2 -3
- package/dist/components/Rating/RatingClear.js +10 -11
- package/dist/components/Rating/RatingItem.js +23 -24
- package/dist/components/Rating/RatingItemContainer.js +2 -3
- package/dist/components/SelectButton/SelectButton.js +2 -3
- package/dist/components/SelectButton/SelectButtonItem.js +22 -49
- package/dist/components/Skeleton/Skeleton.js +2 -3
- package/dist/components/Slider/Slider.js +4 -6
- package/dist/components/Tabs/TabItem/TabItem.js +12 -21
- package/dist/components/Tabs/Tabs.js +2 -3
- package/dist/components/Tag/Tag.js +44 -29
- package/dist/components/Timer/Timer.js +2 -3
- package/dist/components/Timer/TimerFlip.js +2 -3
- package/dist/components/ToggleButton/ToggleButton.js +159 -35
- package/dist/components/Typography/Anchor.js +11 -7
- package/dist/components/Typography/Body.js +3 -4
- package/dist/components/Typography/Caption.js +11 -5
- package/dist/components/Typography/Service.js +13 -7
- package/dist/components/Typography/Subtitle.js +3 -6
- package/dist/components/Typography/Title.js +3 -6
- package/dist/hooks/useChangeTheme.d.ts +2 -1
- package/dist/hooks/useChangeTheme.js +10 -3
- package/dist/hooks/useFonts.d.ts +2 -1
- package/dist/hooks/useFonts.js +3 -3
- package/dist/hooks/useTheme.d.ts +2 -1
- package/dist/hooks/useTheme.js +6 -4
- package/dist/index.d.ts +3 -2
- package/dist/index.js +2 -1
- package/dist/theme/ThemeContext.d.ts +9 -7
- package/dist/theme/ThemeContext.js +21 -14
- package/dist/theme/darkTheme.js +1 -0
- package/dist/theme/index.d.ts +1 -1
- package/dist/theme/index.js +1 -1
- package/dist/theme/lightTheme.js +1 -0
- package/dist/theme/types.d.ts +1 -0
- package/dist/utils/SvgUniversal.d.ts +9 -14
- package/dist/utils/SvgUniversal.js +10 -2
- package/dist/utils/index.d.ts +1 -0
- package/dist/utils/index.js +1 -0
- package/package.json +18 -8
- package/dist/components/Button/styles/index.d.ts +0 -2
- package/dist/components/Button/styles/index.js +0 -2
- package/dist/components/Button/styles/useBasicButtonStyles.d.ts +0 -98
- package/dist/components/Button/styles/useBasicButtonStyles.js +0 -81
- package/dist/components/Button/styles/useDangerButtonStyles.d.ts +0 -63
- package/dist/components/Button/styles/useDangerButtonStyles.js +0 -57
- package/dist/components/Button/styles/useInfoButtonStyles.d.ts +0 -63
- package/dist/components/Button/styles/useInfoButtonStyles.js +0 -56
- package/dist/components/Button/styles/useSeverityButtonStyles.d.ts +0 -64
- package/dist/components/Button/styles/useSeverityButtonStyles.js +0 -29
- package/dist/components/Button/styles/useSuccessButtonStyles.d.ts +0 -63
- package/dist/components/Button/styles/useSuccessButtonStyles.js +0 -61
- package/dist/components/Button/styles/useWarningButtonStyles.d.ts +0 -63
- package/dist/components/Button/styles/useWarningButtonStyles.js +0 -61
- package/dist/components/Button/utils/useButtonContainerCallbackStyle.d.ts +0 -3
- package/dist/components/Button/utils/useButtonContainerCallbackStyle.js +0 -141
- package/dist/components/Button/utils/useButtonLabelStyle.d.ts +0 -3
- package/dist/components/Button/utils/useButtonLabelStyle.js +0 -40
- package/dist/components/Button/utils/useIconStyle.d.ts +0 -7
- package/dist/components/Button/utils/useIconStyle.js +0 -35
- package/dist/components/Button/utils/useTypeBasedStyle.d.ts +0 -2
- package/dist/components/Button/utils/useTypeBasedStyle.js +0 -4
- package/dist/components/Checkbox/hooks/usePressableStyles.d.ts +0 -15
- package/dist/components/Checkbox/hooks/usePressableStyles.js +0 -91
- package/dist/components/Input/FloatLabel.d.ts +0 -22
- package/dist/components/Input/FloatLabel.js +0 -19
- package/dist/components/ToggleButton/hooks/useIconSize.d.ts +0 -14
- package/dist/components/ToggleButton/hooks/useIconSize.js +0 -26
- package/dist/components/ToggleButton/hooks/useLabelSize.d.ts +0 -8
- package/dist/components/ToggleButton/hooks/useLabelSize.js +0 -19
- package/dist/components/ToggleButton/hooks/useStateStyles.d.ts +0 -11
- package/dist/components/ToggleButton/hooks/useStateStyles.js +0 -92
- package/dist/utils/makeStyles.d.ts +0 -11
- package/dist/utils/makeStyles.js +0 -19
|
@@ -1,58 +1,29 @@
|
|
|
1
1
|
import { memo, useMemo, useState } from 'react';
|
|
2
2
|
import { TouchableOpacity } from 'react-native';
|
|
3
3
|
import Animated, { interpolateColor, useAnimatedReaction, useAnimatedStyle, } from 'react-native-reanimated';
|
|
4
|
+
import { StyleSheet } from 'react-native-unistyles';
|
|
4
5
|
import { scheduleOnRN } from 'react-native-worklets';
|
|
5
6
|
import { SvgUniversal } from '../../utils/SvgUniversal';
|
|
6
|
-
import { makeStyles } from '../../utils/makeStyles';
|
|
7
7
|
/**
|
|
8
8
|
* Дочерний элемент компонента SelectButton. Не используется отдельно от SelectButton.
|
|
9
9
|
* @see https://www.figma.com/design/4TYeki0MDLhfPGJstbIicf/UI-kit-PrimeFace-(DS)?node-id=481-4393
|
|
10
10
|
*/
|
|
11
11
|
export const SelectButtonItem = memo(({ index, position, onPress, disabled, label, onLayout, size = 'base', showIcon = true, Icon, }) => {
|
|
12
|
-
const
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
}, [
|
|
25
|
-
size,
|
|
26
|
-
styles.iconBase,
|
|
27
|
-
styles.iconLarge,
|
|
28
|
-
styles.iconSmall,
|
|
29
|
-
styles.iconXLarge,
|
|
30
|
-
]);
|
|
31
|
-
const labelFontSize = useMemo(() => {
|
|
32
|
-
switch (size) {
|
|
33
|
-
case 'small':
|
|
34
|
-
return styles.labelSmall;
|
|
35
|
-
case 'base':
|
|
36
|
-
return styles.labelBase;
|
|
37
|
-
case 'large':
|
|
38
|
-
return styles.labelLarge;
|
|
39
|
-
case 'xlarge':
|
|
40
|
-
return styles.labelXLarge;
|
|
41
|
-
}
|
|
42
|
-
}, [
|
|
43
|
-
size,
|
|
44
|
-
styles.labelBase,
|
|
45
|
-
styles.labelLarge,
|
|
46
|
-
styles.labelSmall,
|
|
47
|
-
styles.labelXLarge,
|
|
48
|
-
]);
|
|
12
|
+
const sizeMap = useMemo(() => ({
|
|
13
|
+
small: { icon: styles.iconSmall, label: styles.labelSmall },
|
|
14
|
+
base: { icon: styles.iconBase, label: styles.labelBase },
|
|
15
|
+
large: { icon: styles.iconLarge, label: styles.labelLarge },
|
|
16
|
+
xlarge: { icon: styles.iconXLarge, label: styles.labelXLarge },
|
|
17
|
+
}), []);
|
|
18
|
+
const iconSize = sizeMap[size].icon;
|
|
19
|
+
const labelFontSize = sizeMap[size].label;
|
|
20
|
+
// Extract primitive color values before the worklet closure to avoid
|
|
21
|
+
// capturing the unistyles HostObject (non-serializable) in the worklet.
|
|
22
|
+
const textColor = styles.textColor.color;
|
|
23
|
+
const checkedTextColor = styles.checkedTextColor.color;
|
|
49
24
|
const animatedColorStyle = useAnimatedStyle(() => {
|
|
50
25
|
return {
|
|
51
|
-
color: interpolateColor(position.value, [index - 1, index, index + 1], [
|
|
52
|
-
styles.textColor.color,
|
|
53
|
-
styles.checkedTextColor.color,
|
|
54
|
-
styles.textColor.color,
|
|
55
|
-
]),
|
|
26
|
+
color: interpolateColor(position.value, [index - 1, index, index + 1], [textColor, checkedTextColor, textColor]),
|
|
56
27
|
};
|
|
57
28
|
});
|
|
58
29
|
const [isSelected, setIsSelected] = useState(false);
|
|
@@ -66,11 +37,13 @@ export const SelectButtonItem = memo(({ index, position, onPress, disabled, labe
|
|
|
66
37
|
styles[size],
|
|
67
38
|
disabled && styles.disabledContainer,
|
|
68
39
|
]} testID='SelectButtonItem_TouchableOpacity' onLayout={onLayout} onPress={onPress}>
|
|
69
|
-
{Icon && showIcon ? (<SvgUniversal
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
40
|
+
{Icon && showIcon ? (<SvgUniversal {...iconSize} source={Icon} testID='SelectButtonItem_Icon' uniProps={({ theme }) => ({
|
|
41
|
+
color: disabled
|
|
42
|
+
? theme.Button.Disabled.disabledButtonBorderColor
|
|
43
|
+
: isSelected
|
|
44
|
+
? theme.Form.SelectButton.selectButtonIconActiveColor
|
|
45
|
+
: theme.Form.SelectButton.selectButtonTextColor,
|
|
46
|
+
})}/>) : null}
|
|
74
47
|
<Animated.Text numberOfLines={1} style={[
|
|
75
48
|
styles.label,
|
|
76
49
|
labelFontSize,
|
|
@@ -81,7 +54,7 @@ export const SelectButtonItem = memo(({ index, position, onPress, disabled, labe
|
|
|
81
54
|
</Animated.Text>
|
|
82
55
|
</TouchableOpacity>);
|
|
83
56
|
});
|
|
84
|
-
const
|
|
57
|
+
const styles = StyleSheet.create(({ theme, typography, border, spacing, fonts }) => ({
|
|
85
58
|
container: {
|
|
86
59
|
flex: 1,
|
|
87
60
|
flexDirection: 'row',
|
|
@@ -2,14 +2,13 @@ import { memo, useCallback, useContext, useEffect, useRef } from 'react';
|
|
|
2
2
|
import { View } from 'react-native';
|
|
3
3
|
import Animated, { useAnimatedStyle, useSharedValue, } from 'react-native-reanimated';
|
|
4
4
|
import Svg, { Defs, LinearGradient, Rect, Stop } from 'react-native-svg';
|
|
5
|
+
import { StyleSheet } from 'react-native-unistyles';
|
|
5
6
|
import { SkeletonContext } from '../../utils/SkeletonContext';
|
|
6
|
-
import { makeStyles } from '../../utils/makeStyles';
|
|
7
7
|
/**
|
|
8
8
|
* Используется для отображения контента в момент загрузки
|
|
9
9
|
* @see https://www.figma.com/design/4TYeki0MDLhfPGJstbIicf/UI-kit-PrimeFace-(DS)?node-id=5241-3731
|
|
10
10
|
*/
|
|
11
11
|
export const Skeleton = memo(({ style, testID, ...rest }) => {
|
|
12
|
-
const styles = useStyles();
|
|
13
12
|
const { globalTranslateX, registerSkeleton, unregisterSkeleton, skeletonWidth, } = useContext(SkeletonContext);
|
|
14
13
|
const skeletonRef = useRef(null);
|
|
15
14
|
const skeletonX = useSharedValue(0);
|
|
@@ -44,7 +43,7 @@ export const Skeleton = memo(({ style, testID, ...rest }) => {
|
|
|
44
43
|
</Animated.View>
|
|
45
44
|
</View>);
|
|
46
45
|
});
|
|
47
|
-
const
|
|
46
|
+
const styles = StyleSheet.create(({ border, theme }) => ({
|
|
48
47
|
container: {
|
|
49
48
|
borderRadius: border.Radius['rounded-lg'],
|
|
50
49
|
overflow: 'hidden',
|
|
@@ -2,8 +2,8 @@ import { memo, useCallback, useMemo, useState } from 'react';
|
|
|
2
2
|
import { View, } from 'react-native';
|
|
3
3
|
import { Gesture, GestureDetector } from 'react-native-gesture-handler';
|
|
4
4
|
import Animated, { useSharedValue, useAnimatedStyle, interpolate, Extrapolation, } from 'react-native-reanimated';
|
|
5
|
+
import { StyleSheet } from 'react-native-unistyles';
|
|
5
6
|
import { scheduleOnRN } from 'react-native-worklets';
|
|
6
|
-
import { makeStyles } from '../../utils/makeStyles';
|
|
7
7
|
const MIN_TRACK_SCALE = 0;
|
|
8
8
|
const MAX_TRACK_SCALE = 100;
|
|
9
9
|
const clamp = (val, min, max) => {
|
|
@@ -16,9 +16,7 @@ const clamp = (val, min, max) => {
|
|
|
16
16
|
*/
|
|
17
17
|
export const Slider = memo(
|
|
18
18
|
// TODO: refactor component to fix max-statements
|
|
19
|
-
// eslint-disable-next-line max-statements
|
|
20
19
|
({ disabled = false, range = false, minPointerValueInit = 0, maxPointerValueInit = 100, onMinPointerValueChange, onMaxPointerValueChange, testID, ...rest }) => {
|
|
21
|
-
const styles = useStyles();
|
|
22
20
|
const minPointX = useSharedValue(0);
|
|
23
21
|
const maxPointX = useSharedValue(0);
|
|
24
22
|
const trackWidth = useSharedValue(0);
|
|
@@ -26,8 +24,8 @@ export const Slider = memo(
|
|
|
26
24
|
const [isPressed, setIsPressed] = useState(false);
|
|
27
25
|
const prevMinPointX = useSharedValue(0);
|
|
28
26
|
const prevMaxPointX = useSharedValue(0);
|
|
29
|
-
const pointerStyle = useMemo(() => [styles.point, isPressed && styles.hovered], [
|
|
30
|
-
const lineStyle = useMemo(() => [styles.line, isPressed && styles.hovered], [
|
|
27
|
+
const pointerStyle = useMemo(() => [styles.point, isPressed && styles.hovered], [isPressed]);
|
|
28
|
+
const lineStyle = useMemo(() => [styles.line, isPressed && styles.hovered], [isPressed]);
|
|
31
29
|
const interpolateInitVal = useCallback((value, width) => {
|
|
32
30
|
return interpolate(value, [MIN_TRACK_SCALE, MAX_TRACK_SCALE], [0, width - pointerWidth], Extrapolation.CLAMP);
|
|
33
31
|
}, [pointerWidth]);
|
|
@@ -118,7 +116,7 @@ export const Slider = memo(
|
|
|
118
116
|
</View>
|
|
119
117
|
</View>);
|
|
120
118
|
});
|
|
121
|
-
const
|
|
119
|
+
const styles = StyleSheet.create(({ theme, border }) => {
|
|
122
120
|
return {
|
|
123
121
|
container: {
|
|
124
122
|
width: '100%',
|
|
@@ -1,24 +1,11 @@
|
|
|
1
|
-
import { memo
|
|
1
|
+
import { memo } from 'react';
|
|
2
2
|
import { Text, Pressable, View } from 'react-native';
|
|
3
|
+
import { StyleSheet } from 'react-native-unistyles';
|
|
3
4
|
import { SvgUniversal } from '../../../utils/SvgUniversal';
|
|
4
|
-
import { makeStyles } from '../../../utils/makeStyles';
|
|
5
5
|
// Часть навигационного компонента Tabs
|
|
6
6
|
// @see https://www.figma.com/design/4TYeki0MDLhfPGJstbIicf/UI-kit-PrimeFace-(DS)?node-id=888-13076&t=hIQjdrqPKK8BWYev-4
|
|
7
7
|
//
|
|
8
8
|
export const TabItem = memo(({ Icon, label, badge, index, onPress, disabled, active, onLayout }) => {
|
|
9
|
-
const styles = useStyles();
|
|
10
|
-
const getIconColor = useCallback((pressed) => {
|
|
11
|
-
if (disabled) {
|
|
12
|
-
return styles.disabledIcon.color;
|
|
13
|
-
}
|
|
14
|
-
if (pressed) {
|
|
15
|
-
return styles.pressedIcon.color;
|
|
16
|
-
}
|
|
17
|
-
if (active) {
|
|
18
|
-
return styles.activeIcon.color;
|
|
19
|
-
}
|
|
20
|
-
return styles.icon.color;
|
|
21
|
-
}, [disabled, active, styles]);
|
|
22
9
|
return (<Pressable accessibilityRole='button' disabled={disabled} testID={TestId.Container + index} onLayout={onLayout} onPress={() => onPress(index)}>
|
|
23
10
|
{({ pressed }) => (<View style={[
|
|
24
11
|
styles.container,
|
|
@@ -26,7 +13,15 @@ export const TabItem = memo(({ Icon, label, badge, index, onPress, disabled, act
|
|
|
26
13
|
active && styles.activeContainer,
|
|
27
14
|
disabled && styles.disabledContainer,
|
|
28
15
|
]}>
|
|
29
|
-
{Icon ? (<SvgUniversal
|
|
16
|
+
{Icon ? (<SvgUniversal {...styles.icon} source={Icon} uniProps={({ theme }) => ({
|
|
17
|
+
color: disabled
|
|
18
|
+
? theme.Button.Disabled.disabledButtonTextColor
|
|
19
|
+
: pressed
|
|
20
|
+
? theme.Panel.TabView.tabviewHeaderHoverTextColor
|
|
21
|
+
: active
|
|
22
|
+
? theme.Panel.TabView.tabviewHeaderActiveTextColor
|
|
23
|
+
: theme.Panel.TabView.tabviewHeaderTextColor,
|
|
24
|
+
})}/>) : null}
|
|
30
25
|
<Text numberOfLines={1} style={[
|
|
31
26
|
styles.text,
|
|
32
27
|
active && styles.activeText,
|
|
@@ -39,7 +34,7 @@ export const TabItem = memo(({ Icon, label, badge, index, onPress, disabled, act
|
|
|
39
34
|
</View>)}
|
|
40
35
|
</Pressable>);
|
|
41
36
|
});
|
|
42
|
-
const
|
|
37
|
+
const styles = StyleSheet.create(({ theme, typography, fonts }) => ({
|
|
43
38
|
container: {
|
|
44
39
|
alignItems: 'center',
|
|
45
40
|
flexDirection: 'row',
|
|
@@ -60,11 +55,7 @@ const useStyles = makeStyles(({ theme, typography, fonts }) => ({
|
|
|
60
55
|
icon: {
|
|
61
56
|
width: theme.Menu.Item.menuitemSubmenuIconFontSize,
|
|
62
57
|
height: theme.Menu.Item.menuitemSubmenuIconFontSize,
|
|
63
|
-
color: theme.Panel.TabView.tabviewHeaderTextColor,
|
|
64
58
|
},
|
|
65
|
-
pressedIcon: { color: theme.Panel.TabView.tabviewHeaderHoverTextColor },
|
|
66
|
-
activeIcon: { color: theme.Panel.TabView.tabviewHeaderActiveTextColor },
|
|
67
|
-
disabledIcon: { color: theme.Button.Disabled.disabledButtonTextColor },
|
|
68
59
|
text: {
|
|
69
60
|
fontFamily: fonts.primary,
|
|
70
61
|
fontSize: typography.Size['text-base'],
|
|
@@ -1,13 +1,12 @@
|
|
|
1
1
|
import { memo, useEffect, useState } from 'react';
|
|
2
2
|
import { View, } from 'react-native';
|
|
3
3
|
import Animated, { interpolate, useAnimatedStyle, useSharedValue, withTiming, } from 'react-native-reanimated';
|
|
4
|
-
import {
|
|
4
|
+
import { StyleSheet } from 'react-native-unistyles';
|
|
5
5
|
import { TabItem } from './TabItem/TabItem';
|
|
6
6
|
// Навигационный компонент Tabs
|
|
7
7
|
// @see https://www.figma.com/design/4TYeki0MDLhfPGJstbIicf/UI-kit-PrimeFace-(DS)?node-id=888-13076&t=hIQjdrqPKK8BWYev-4
|
|
8
8
|
//
|
|
9
9
|
export const Tabs = memo(({ items, disabled = false, activeIndex, onChange, testID, ...rest }) => {
|
|
10
|
-
const styles = useStyles();
|
|
11
10
|
const [tabsLayouts, setTabsLayouts] = useState({});
|
|
12
11
|
const lineSharedValue = useSharedValue(activeIndex);
|
|
13
12
|
const animatedStyles = useAnimatedStyle(() => {
|
|
@@ -32,7 +31,7 @@ export const Tabs = memo(({ items, disabled = false, activeIndex, onChange, test
|
|
|
32
31
|
<Animated.View style={[styles.line, animatedStyles]}/>
|
|
33
32
|
</View>);
|
|
34
33
|
});
|
|
35
|
-
const
|
|
34
|
+
const styles = StyleSheet.create(({ theme, border }) => ({
|
|
36
35
|
container: {
|
|
37
36
|
flexDirection: 'row',
|
|
38
37
|
gap: theme.Panel.TabView.tabviewHeaderSpacing,
|
|
@@ -1,27 +1,33 @@
|
|
|
1
1
|
import { memo } from 'react';
|
|
2
2
|
import { View, Text, } from 'react-native';
|
|
3
|
+
import { StyleSheet } from 'react-native-unistyles';
|
|
3
4
|
import { SvgUniversal } from '../../utils/SvgUniversal';
|
|
4
|
-
|
|
5
|
+
const tagIconColor = {
|
|
6
|
+
basic: (t) => t.Misc.Badge.badgeTextColor,
|
|
7
|
+
info: (t) => t.Misc.Badge.badgeInfoTextColor,
|
|
8
|
+
success: (t) => t.Misc.Badge.badgeSuccessTextColor,
|
|
9
|
+
warning: (t) => t.Misc.Badge.badgeWarningTextColor,
|
|
10
|
+
danger: (t) => t.Misc.Badge.badgeDangerTextColor,
|
|
11
|
+
secondary: (t) => t.Misc.Badge.badgeTextColor,
|
|
12
|
+
};
|
|
5
13
|
/**
|
|
6
14
|
* Используется для маркировки элементов интерфейса
|
|
7
15
|
* @see https://www.figma.com/design/4TYeki0MDLhfPGJstbIicf/UI-kit-PrimeFace-(DS)?node-id=484-4921
|
|
8
16
|
*/
|
|
9
17
|
export const Tag = memo(({ text, rounded, severity = 'basic', showIcon = true, style, Icon, testID, ...rest }) => {
|
|
10
|
-
|
|
18
|
+
tagStyles.useVariants({ severity });
|
|
11
19
|
return (<View style={style} testID={testID || TagTestId.root} {...rest}>
|
|
12
|
-
<View style={[
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
{showIcon && Icon ? (<SvgUniversal color={styles[`text${severity}`].color} height={styles.icon.height} source={Icon} testID={TagTestId.icon} width={styles.icon.width}/>) : null}
|
|
18
|
-
<Text numberOfLines={1} style={[styles.text, styles[`text${severity}`]]} testID={TagTestId.text}>
|
|
20
|
+
<View style={[tagStyles.container, rounded && tagStyles.roundedContainer]} testID={TagTestId.innerContainer}>
|
|
21
|
+
{showIcon && Icon ? (<SvgUniversal {...tagStyles.icon} source={Icon} testID={TagTestId.icon} uniProps={({ theme }) => ({
|
|
22
|
+
color: tagIconColor[severity](theme),
|
|
23
|
+
})}/>) : null}
|
|
24
|
+
<Text numberOfLines={1} style={tagStyles.text} testID={TagTestId.text}>
|
|
19
25
|
{text}
|
|
20
26
|
</Text>
|
|
21
27
|
</View>
|
|
22
28
|
</View>);
|
|
23
29
|
});
|
|
24
|
-
const
|
|
30
|
+
const tagStyles = StyleSheet.create(({ theme, border, spacing, typography, fonts }) => ({
|
|
25
31
|
container: {
|
|
26
32
|
alignSelf: 'flex-start',
|
|
27
33
|
flexDirection: 'row',
|
|
@@ -30,12 +36,29 @@ const useStyles = makeStyles(({ theme, border, spacing, typography, fonts }) =>
|
|
|
30
36
|
paddingHorizontal: theme.Misc.Tag.tagPadding,
|
|
31
37
|
height: theme.Misc.Tag.tagHeight,
|
|
32
38
|
borderRadius: border.Radius['rounded-lg'],
|
|
39
|
+
variants: {
|
|
40
|
+
severity: {
|
|
41
|
+
basic: { backgroundColor: theme.Misc.Badge.badgeBg },
|
|
42
|
+
info: {
|
|
43
|
+
backgroundColor: theme.Button.Severity.Info.Basic.infoButtonBg,
|
|
44
|
+
},
|
|
45
|
+
success: {
|
|
46
|
+
backgroundColor: theme.Button.Severity.Success.Basic.successButtonBg,
|
|
47
|
+
},
|
|
48
|
+
warning: {
|
|
49
|
+
backgroundColor: theme.Button.Severity.Warning.Basic.warningButtonBg,
|
|
50
|
+
},
|
|
51
|
+
danger: {
|
|
52
|
+
backgroundColor: theme.Button.Severity.Danger.Basic.dangerButtonBg,
|
|
53
|
+
},
|
|
54
|
+
secondary: { backgroundColor: theme.Surface['surface-border'] },
|
|
55
|
+
},
|
|
56
|
+
},
|
|
33
57
|
},
|
|
34
58
|
roundedContainer: { borderRadius: border.Radius['rounded-full'] },
|
|
35
59
|
icon: {
|
|
36
60
|
width: theme.Misc.Tag.tagFontSize,
|
|
37
61
|
height: theme.Misc.Tag.tagFontSize,
|
|
38
|
-
color: theme.Misc.Badge.badgeTextColor,
|
|
39
62
|
},
|
|
40
63
|
text: {
|
|
41
64
|
flexShrink: 1,
|
|
@@ -43,25 +66,17 @@ const useStyles = makeStyles(({ theme, border, spacing, typography, fonts }) =>
|
|
|
43
66
|
includeFontPadding: false,
|
|
44
67
|
verticalAlign: 'middle',
|
|
45
68
|
fontFamily: fonts.primary,
|
|
69
|
+
variants: {
|
|
70
|
+
severity: {
|
|
71
|
+
basic: { color: theme.Misc.Badge.badgeTextColor },
|
|
72
|
+
info: { color: theme.Misc.Badge.badgeInfoTextColor },
|
|
73
|
+
success: { color: theme.Misc.Badge.badgeSuccessTextColor },
|
|
74
|
+
warning: { color: theme.Misc.Badge.badgeWarningTextColor },
|
|
75
|
+
danger: { color: theme.Misc.Badge.badgeDangerTextColor },
|
|
76
|
+
secondary: { color: theme.Misc.Badge.badgeTextColor },
|
|
77
|
+
},
|
|
78
|
+
},
|
|
46
79
|
},
|
|
47
|
-
textbasic: { color: theme.Misc.Badge.badgeTextColor },
|
|
48
|
-
textinfo: { color: theme.Misc.Badge.badgeInfoTextColor },
|
|
49
|
-
textwarning: { color: theme.Misc.Badge.badgeWarningTextColor },
|
|
50
|
-
textsuccess: { color: theme.Misc.Badge.badgeSuccessTextColor },
|
|
51
|
-
textdanger: { color: theme.Misc.Badge.badgeDangerTextColor },
|
|
52
|
-
textsecondary: { color: theme.Misc.Badge.badgeTextColor },
|
|
53
|
-
basic: { backgroundColor: theme.Misc.Badge.badgeBg },
|
|
54
|
-
info: { backgroundColor: theme.Button.Severity.Info.Basic.infoButtonBg },
|
|
55
|
-
success: {
|
|
56
|
-
backgroundColor: theme.Button.Severity.Success.Basic.successButtonBg,
|
|
57
|
-
},
|
|
58
|
-
warning: {
|
|
59
|
-
backgroundColor: theme.Button.Severity.Warning.Basic.warningButtonBg,
|
|
60
|
-
},
|
|
61
|
-
danger: {
|
|
62
|
-
backgroundColor: theme.Button.Severity.Danger.Basic.dangerButtonBg,
|
|
63
|
-
},
|
|
64
|
-
secondary: { backgroundColor: theme.Surface['surface-border'] },
|
|
65
80
|
}));
|
|
66
81
|
export const TagTestId = {
|
|
67
82
|
root: 'Tag',
|
|
@@ -2,7 +2,7 @@ import { memo, useEffect, useState } from 'react';
|
|
|
2
2
|
import { View } from 'react-native';
|
|
3
3
|
import Animated, { cancelAnimation, Easing, useAnimatedProps, useSharedValue, withTiming, } from 'react-native-reanimated';
|
|
4
4
|
import Svg, { Circle } from 'react-native-svg';
|
|
5
|
-
import {
|
|
5
|
+
import { StyleSheet } from 'react-native-unistyles';
|
|
6
6
|
import { TimerFlip } from './TimerFlip';
|
|
7
7
|
import { COUNTER_SIZE } from './constants';
|
|
8
8
|
const AnimatedCircle = Animated.createAnimatedComponent(Circle);
|
|
@@ -12,7 +12,6 @@ const BORDER_WIDTH = 2;
|
|
|
12
12
|
* @see https://www.figma.com/design/2ZnL6XPKEpxAHvrlbRvnMu/Template-Tailwind-CSS-(DS)?node-id=270-1514
|
|
13
13
|
*/
|
|
14
14
|
export const Timer = memo(({ countFrom, onFinish }) => {
|
|
15
|
-
const styles = useStyles();
|
|
16
15
|
const circleAnimation = useSharedValue(0);
|
|
17
16
|
const [currentTimerValue, setCurrentTimerValue] = useState(countFrom);
|
|
18
17
|
const circumferenceRadius = COUNTER_SIZE / 2 - BORDER_WIDTH;
|
|
@@ -52,7 +51,7 @@ export const Timer = memo(({ countFrom, onFinish }) => {
|
|
|
52
51
|
<TimerFlip value={currentTimerValue}/>
|
|
53
52
|
</View>);
|
|
54
53
|
});
|
|
55
|
-
const
|
|
54
|
+
const styles = StyleSheet.create(({ typography }) => ({
|
|
56
55
|
container: {
|
|
57
56
|
overflow: 'hidden',
|
|
58
57
|
width: COUNTER_SIZE,
|
|
@@ -1,11 +1,10 @@
|
|
|
1
1
|
import React, { memo, useEffect, useState } from 'react';
|
|
2
2
|
import { View, Text } from 'react-native';
|
|
3
3
|
import Animated, { useSharedValue, useAnimatedStyle, withTiming, } from 'react-native-reanimated';
|
|
4
|
+
import { StyleSheet } from 'react-native-unistyles';
|
|
4
5
|
import { scheduleOnRN } from 'react-native-worklets';
|
|
5
|
-
import { makeStyles } from '../../utils/makeStyles';
|
|
6
6
|
import { COUNTER_SIZE } from './constants';
|
|
7
7
|
export const TimerFlip = memo(({ value, duration = 300 }) => {
|
|
8
|
-
const styles = useStyles();
|
|
9
8
|
const [currentValue, setCurrentValue] = useState(value);
|
|
10
9
|
const [nextValue, setNextValue] = useState(value);
|
|
11
10
|
const progress = useSharedValue(0);
|
|
@@ -43,7 +42,7 @@ export const TimerFlip = memo(({ value, duration = 300 }) => {
|
|
|
43
42
|
</Animated.View>
|
|
44
43
|
</View>);
|
|
45
44
|
});
|
|
46
|
-
const
|
|
45
|
+
const styles = StyleSheet.create(({ typography, fonts }) => ({
|
|
47
46
|
container: {
|
|
48
47
|
overflow: 'hidden',
|
|
49
48
|
width: COUNTER_SIZE,
|
|
@@ -1,39 +1,26 @@
|
|
|
1
1
|
import { memo, useCallback, useMemo, useState } from 'react';
|
|
2
2
|
import { Pressable, Text, View, } from 'react-native';
|
|
3
|
+
import { StyleSheet } from 'react-native-unistyles';
|
|
3
4
|
import { SvgUniversal } from '../../utils/SvgUniversal';
|
|
4
|
-
import { makeStyles } from '../../utils/makeStyles';
|
|
5
|
-
import { useIconSize } from './hooks/useIconSize';
|
|
6
|
-
import { useLabelSize } from './hooks/useLabelSize';
|
|
7
|
-
import { useStateStyles } from './hooks/useStateStyles';
|
|
8
5
|
/**
|
|
9
6
|
* Используется для выбора нескольких значений с помощью кнопки
|
|
10
7
|
* @see https://www.figma.com/design/4TYeki0MDLhfPGJstbIicf/UI-kit-PrimeFace-(DS)?node-id=484-4821
|
|
11
8
|
*/
|
|
12
|
-
export const ToggleButton = memo(({ onPress, checked, disabled, iconOnly: iconOnlyProp, iconPos = 'left', label, size = 'base', style, Icon, testID, ...rest }) => {
|
|
13
|
-
const styles = useStyles();
|
|
14
|
-
const labelSize = useLabelSize(size);
|
|
15
|
-
const iconSize = useIconSize(size);
|
|
9
|
+
export const ToggleButton = memo(({ onPress, checked = false, disabled = false, iconOnly: iconOnlyProp, iconPos = 'left', label, size = 'base', style, Icon, testID, ...rest }) => {
|
|
16
10
|
const [pressed, setPressed] = useState(false);
|
|
17
|
-
|
|
11
|
+
toggleStyles.useVariants({ size, checked, pressed, disabled });
|
|
18
12
|
const iconOnly = useMemo(() => iconOnlyProp || !label, [iconOnlyProp, label]);
|
|
19
|
-
const icon =
|
|
20
|
-
if (!Icon) {
|
|
21
|
-
return null;
|
|
22
|
-
}
|
|
23
|
-
return (<SvgUniversal height={iconSize.height} source={Icon} style={stateStyles.label} testID={ToggleButtonTestId.icon} width={iconSize.width}/>);
|
|
24
|
-
}, [Icon, iconSize.height, iconSize.width, stateStyles.label]);
|
|
13
|
+
const icon = Icon ? (<SvgUniversal {...toggleStyles.icon} source={Icon} testID={ToggleButtonTestId.icon}/>) : null;
|
|
25
14
|
const onPressIn = useCallback(() => setPressed(true), []);
|
|
26
15
|
const onPressOut = useCallback(() => setPressed(false), []);
|
|
27
|
-
return (<Pressable disabled={disabled} style={[
|
|
16
|
+
return (<Pressable disabled={disabled} style={[toggleStyles.container, style]} testID={testID || ToggleButtonTestId.root} onPress={onPress} onPressIn={onPressIn} onPressOut={onPressOut} {...rest}>
|
|
28
17
|
<View style={[
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
iconOnly && styles.iconOnly,
|
|
32
|
-
stateStyles.contentContainer,
|
|
18
|
+
toggleStyles.contentContainer,
|
|
19
|
+
iconOnly && toggleStyles.iconOnly,
|
|
33
20
|
]} testID={ToggleButtonTestId.container}>
|
|
34
21
|
{iconOnly ? (icon) : (<>
|
|
35
22
|
{iconPos === 'left' && icon}
|
|
36
|
-
<Text style={
|
|
23
|
+
<Text style={toggleStyles.label} testID={ToggleButtonTestId.text}>
|
|
37
24
|
{label}
|
|
38
25
|
</Text>
|
|
39
26
|
{Icon && iconPos === 'right' ? icon : null}
|
|
@@ -41,12 +28,42 @@ export const ToggleButton = memo(({ onPress, checked, disabled, iconOnly: iconOn
|
|
|
41
28
|
</View>
|
|
42
29
|
</Pressable>);
|
|
43
30
|
});
|
|
44
|
-
const
|
|
31
|
+
const toggleStyles = StyleSheet.create(({ theme, spacing, border, fonts, typography }) => ({
|
|
45
32
|
container: {
|
|
46
33
|
alignSelf: 'flex-start',
|
|
47
34
|
borderRadius: border.Radius['rounded-full'],
|
|
48
35
|
borderWidth: border.Width.border,
|
|
49
36
|
overflow: 'hidden',
|
|
37
|
+
variants: {
|
|
38
|
+
checked: {
|
|
39
|
+
true: {
|
|
40
|
+
borderColor: theme.Form.ToggleButton.toggleButtonActiveBorderColor,
|
|
41
|
+
},
|
|
42
|
+
false: {
|
|
43
|
+
borderColor: theme.Form.ToggleButton.toggleButtonBorderColor,
|
|
44
|
+
},
|
|
45
|
+
},
|
|
46
|
+
pressed: {
|
|
47
|
+
true: { borderColor: theme.Form.ToggleButton.toggleButtonHoverBg },
|
|
48
|
+
false: {},
|
|
49
|
+
},
|
|
50
|
+
disabled: {
|
|
51
|
+
true: {
|
|
52
|
+
borderColor: theme.Button.Disabled.disabledButtonBorderColor,
|
|
53
|
+
opacity: 0.6,
|
|
54
|
+
},
|
|
55
|
+
false: {},
|
|
56
|
+
},
|
|
57
|
+
},
|
|
58
|
+
compoundVariants: [
|
|
59
|
+
{
|
|
60
|
+
checked: 'true',
|
|
61
|
+
pressed: 'true',
|
|
62
|
+
styles: {
|
|
63
|
+
borderColor: theme.Form.ToggleButton.toggleButtonActiveHoverBorderColor,
|
|
64
|
+
},
|
|
65
|
+
},
|
|
66
|
+
],
|
|
50
67
|
},
|
|
51
68
|
contentContainer: {
|
|
52
69
|
flexDirection: 'row',
|
|
@@ -56,18 +73,47 @@ const useStyles = makeStyles(({ theme, spacing, border, fonts }) => ({
|
|
|
56
73
|
paddingVertical: theme.Button.Common.buttonPaddingTopBottom,
|
|
57
74
|
paddingHorizontal: spacing.Padding['p-6'],
|
|
58
75
|
gap: spacing.Gap['gap-3'],
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
76
|
+
variants: {
|
|
77
|
+
size: {
|
|
78
|
+
xlarge: { minHeight: theme.Button.Common.buttonHeightXL },
|
|
79
|
+
large: { minHeight: theme.Button.Common.buttonHeightLG },
|
|
80
|
+
base: {
|
|
81
|
+
minHeight: theme.Button.Common.buttonHeight,
|
|
82
|
+
paddingHorizontal: theme.Button.Common.buttonPaddingLeftRight,
|
|
83
|
+
gap: theme.General.inlineSpacing,
|
|
84
|
+
},
|
|
85
|
+
small: {
|
|
86
|
+
minHeight: theme.Button.Common.buttonHeightSM,
|
|
87
|
+
paddingHorizontal: spacing.Padding['p-3'],
|
|
88
|
+
gap: theme.General.inlineSpacing,
|
|
89
|
+
},
|
|
90
|
+
},
|
|
91
|
+
checked: {
|
|
92
|
+
true: {
|
|
93
|
+
backgroundColor: theme.Form.ToggleButton.toggleButtonActiveBg,
|
|
94
|
+
},
|
|
95
|
+
false: { backgroundColor: theme.Form.ToggleButton.toggleButtonBg },
|
|
96
|
+
},
|
|
97
|
+
pressed: {
|
|
98
|
+
true: {
|
|
99
|
+
backgroundColor: theme.Form.ToggleButton.toggleButtonHoverBg,
|
|
100
|
+
},
|
|
101
|
+
false: {},
|
|
102
|
+
},
|
|
103
|
+
disabled: {
|
|
104
|
+
true: { backgroundColor: theme.Button.Disabled.disabledButtonBg },
|
|
105
|
+
false: {},
|
|
106
|
+
},
|
|
107
|
+
},
|
|
108
|
+
compoundVariants: [
|
|
109
|
+
{
|
|
110
|
+
checked: 'true',
|
|
111
|
+
pressed: 'true',
|
|
112
|
+
styles: {
|
|
113
|
+
backgroundColor: theme.Form.ToggleButton.toggleButtonActiveHoverBg,
|
|
114
|
+
},
|
|
115
|
+
},
|
|
116
|
+
],
|
|
71
117
|
},
|
|
72
118
|
iconOnly: {
|
|
73
119
|
aspectRatio: 1,
|
|
@@ -75,7 +121,85 @@ const useStyles = makeStyles(({ theme, spacing, border, fonts }) => ({
|
|
|
75
121
|
paddingVertical: 0,
|
|
76
122
|
justifyContent: 'center',
|
|
77
123
|
},
|
|
78
|
-
|
|
124
|
+
icon: {
|
|
125
|
+
variants: {
|
|
126
|
+
size: {
|
|
127
|
+
xlarge: {
|
|
128
|
+
width: typography.Size['text-4xl'],
|
|
129
|
+
height: typography.Size['text-4xl'],
|
|
130
|
+
},
|
|
131
|
+
large: {
|
|
132
|
+
width: typography.Size['text-2xl'],
|
|
133
|
+
height: typography.Size['text-2xl'],
|
|
134
|
+
},
|
|
135
|
+
base: {
|
|
136
|
+
width: typography.Size['text-xl'],
|
|
137
|
+
height: typography.Size['text-xl'],
|
|
138
|
+
},
|
|
139
|
+
small: {
|
|
140
|
+
width: typography.Size['text-base'],
|
|
141
|
+
height: typography.Size['text-base'],
|
|
142
|
+
},
|
|
143
|
+
},
|
|
144
|
+
checked: {
|
|
145
|
+
true: { color: theme.Form.ToggleButton.toggleButtonActiveTextColor },
|
|
146
|
+
false: { color: theme.Form.ToggleButton.toggleButtonTextColor },
|
|
147
|
+
},
|
|
148
|
+
pressed: {
|
|
149
|
+
true: { color: theme.Form.ToggleButton.toggleButtonHoverTextColor },
|
|
150
|
+
false: {},
|
|
151
|
+
},
|
|
152
|
+
disabled: {
|
|
153
|
+
true: { color: theme.Button.Disabled.disabledButtonTextColor },
|
|
154
|
+
false: {},
|
|
155
|
+
},
|
|
156
|
+
},
|
|
157
|
+
compoundVariants: [
|
|
158
|
+
{
|
|
159
|
+
checked: 'true',
|
|
160
|
+
pressed: 'true',
|
|
161
|
+
styles: {
|
|
162
|
+
color: theme.Form.ToggleButton.toggleButtonTextActiveHoverColor,
|
|
163
|
+
},
|
|
164
|
+
},
|
|
165
|
+
],
|
|
166
|
+
},
|
|
167
|
+
label: {
|
|
168
|
+
flexShrink: 1,
|
|
169
|
+
fontFamily: fonts.primary,
|
|
170
|
+
fontWeight: '600',
|
|
171
|
+
includeFontPadding: false,
|
|
172
|
+
verticalAlign: 'middle',
|
|
173
|
+
variants: {
|
|
174
|
+
size: {
|
|
175
|
+
xlarge: { fontSize: typography.Size['text-2xl'] },
|
|
176
|
+
large: { fontSize: typography.Size['text-xl'] },
|
|
177
|
+
base: { fontSize: typography.Size['text-base'] },
|
|
178
|
+
small: { fontSize: typography.Size['text-sm'] },
|
|
179
|
+
},
|
|
180
|
+
checked: {
|
|
181
|
+
true: { color: theme.Form.ToggleButton.toggleButtonActiveTextColor },
|
|
182
|
+
false: { color: theme.Form.ToggleButton.toggleButtonTextColor },
|
|
183
|
+
},
|
|
184
|
+
pressed: {
|
|
185
|
+
true: { color: theme.Form.ToggleButton.toggleButtonHoverTextColor },
|
|
186
|
+
false: {},
|
|
187
|
+
},
|
|
188
|
+
disabled: {
|
|
189
|
+
true: { color: theme.Button.Disabled.disabledButtonTextColor },
|
|
190
|
+
false: {},
|
|
191
|
+
},
|
|
192
|
+
},
|
|
193
|
+
compoundVariants: [
|
|
194
|
+
{
|
|
195
|
+
checked: 'true',
|
|
196
|
+
pressed: 'true',
|
|
197
|
+
styles: {
|
|
198
|
+
color: theme.Form.ToggleButton.toggleButtonTextActiveHoverColor,
|
|
199
|
+
},
|
|
200
|
+
},
|
|
201
|
+
],
|
|
202
|
+
},
|
|
79
203
|
}));
|
|
80
204
|
export const ToggleButtonTestId = {
|
|
81
205
|
root: 'ToggleButton',
|