@cdek-it/react-native-ui-kit 0.4.2 → 0.6.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 +0 -2
- package/dist/components/Dialog/Dialog.js +21 -52
- package/dist/components/Input/InputTextBase/InputTextBase.js +3 -3
- package/dist/components/Input/InputTextBase/types.d.ts +7 -0
- package/dist/components/Input/InputTextBase/{useStyles.d.ts → useInputStyles.d.ts} +2 -1
- package/dist/components/Input/InputTextBase/{useStyles.js → useInputStyles.js} +18 -2
- package/dist/components/SelectButton/SelectButton.js +3 -2
- package/dist/components/SelectButton/SelectButtonItem.js +3 -2
- package/dist/components/Slider/Slider.js +8 -7
- package/dist/components/Timer/TimerFlip.js +3 -2
- package/dist/theme/assets/InputSize/base.json +1 -0
- package/dist/theme/assets/InputSize/index.d.ts +11 -0
- package/dist/theme/assets/InputSize/index.js +4 -0
- package/dist/theme/assets/InputSize/large.json +1 -0
- package/dist/theme/assets/InputSize/xlarge.json +1 -0
- package/dist/theme/assets/ModalSize/index.d.ts +18 -0
- package/dist/theme/assets/ModalSize/index.js +5 -0
- package/dist/theme/assets/ModalSize/lg.json +1 -0
- package/dist/theme/assets/ModalSize/md.json +1 -0
- package/dist/theme/assets/ModalSize/sm.json +1 -0
- package/dist/theme/assets/ModalSize/xl.json +1 -0
- package/dist/theme/assets/themeDark.json +2 -8
- package/dist/theme/assets/themeLight.json +2 -8
- package/dist/theme/darkTheme.js +3 -1
- package/dist/theme/lightTheme.js +3 -1
- package/dist/theme/types.d.ts +4 -0
- package/package.json +55 -55
package/README.md
CHANGED
|
@@ -10,7 +10,6 @@
|
|
|
10
10
|
yarn add \
|
|
11
11
|
react \
|
|
12
12
|
react-native \
|
|
13
|
-
@tabler/icons-react-native \
|
|
14
13
|
react-native-svg \
|
|
15
14
|
react-native-reanimated
|
|
16
15
|
```
|
|
@@ -25,7 +24,6 @@ yarn add @cdek-it/react-native-ui-kit
|
|
|
25
24
|
npm i \
|
|
26
25
|
react \
|
|
27
26
|
react-native \
|
|
28
|
-
@tabler/icons-react-native \
|
|
29
27
|
react-native-svg \
|
|
30
28
|
react-native-reanimated
|
|
31
29
|
```
|
|
@@ -1,36 +1,38 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import
|
|
3
|
-
import {
|
|
4
|
-
import
|
|
1
|
+
import React, { useCallback, useEffect, useState } from 'react';
|
|
2
|
+
import { View, StyleSheet, Pressable, Modal } from 'react-native';
|
|
3
|
+
import Animated, { useSharedValue, useAnimatedStyle, withTiming, interpolate, Easing, } from 'react-native-reanimated';
|
|
4
|
+
import { scheduleOnRN } from 'react-native-worklets';
|
|
5
5
|
import { DialogComponent } from './DialogComponent';
|
|
6
|
-
const
|
|
6
|
+
const ANIMATION_BACKDROP_DURATION = 200;
|
|
7
|
+
const ANIMATION_CONTENT_DURATION = 500;
|
|
7
8
|
const BACKDROP_OPACITY = 0.5;
|
|
8
|
-
const SCALE_DAMPING = 5;
|
|
9
|
-
const SCALE_STIFFNESS = 50;
|
|
10
9
|
const SCALE_INIT_VALUE = 0.9;
|
|
11
10
|
// eslint-disable-next-line import-x/no-deprecated
|
|
12
11
|
const AnimatedPressable = Animated.createAnimatedComponent(Pressable);
|
|
13
12
|
export const Dialog = ({ isVisible, onClose, onHideComplete, header, footer, body, testID, }) => {
|
|
13
|
+
const [showModal, setShowModal] = useState(false);
|
|
14
14
|
const opacity = useSharedValue(0);
|
|
15
15
|
const scale = useSharedValue(SCALE_INIT_VALUE);
|
|
16
16
|
const handleAnimationComplete = useCallback(() => {
|
|
17
17
|
if (onHideComplete) {
|
|
18
18
|
onHideComplete();
|
|
19
19
|
}
|
|
20
|
+
setShowModal(false);
|
|
20
21
|
}, [onHideComplete]);
|
|
21
22
|
useEffect(() => {
|
|
22
23
|
if (isVisible) {
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
24
|
+
setShowModal(true);
|
|
25
|
+
opacity.value = withTiming(1, { duration: ANIMATION_BACKDROP_DURATION });
|
|
26
|
+
scale.value = withTiming(1, {
|
|
27
|
+
duration: ANIMATION_CONTENT_DURATION,
|
|
28
|
+
easing: Easing.elastic(1.2),
|
|
27
29
|
});
|
|
28
30
|
}
|
|
29
31
|
else {
|
|
30
|
-
opacity.value = withTiming(0, { duration:
|
|
31
|
-
scale.value = withTiming(SCALE_INIT_VALUE, { duration:
|
|
32
|
+
opacity.value = withTiming(0, { duration: ANIMATION_BACKDROP_DURATION });
|
|
33
|
+
scale.value = withTiming(SCALE_INIT_VALUE, { duration: ANIMATION_BACKDROP_DURATION }, (finished) => {
|
|
32
34
|
if (finished) {
|
|
33
|
-
|
|
35
|
+
scheduleOnRN(handleAnimationComplete);
|
|
34
36
|
}
|
|
35
37
|
});
|
|
36
38
|
}
|
|
@@ -43,51 +45,18 @@ export const Dialog = ({ isVisible, onClose, onHideComplete, header, footer, bod
|
|
|
43
45
|
const dialogAnimatedStyle = useAnimatedStyle(() => {
|
|
44
46
|
return { opacity: opacity.value, transform: [{ scale: scale.value }] };
|
|
45
47
|
});
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
if (isVisible) {
|
|
49
|
-
onClose?.();
|
|
50
|
-
return true;
|
|
51
|
-
}
|
|
52
|
-
return false;
|
|
53
|
-
});
|
|
54
|
-
return subscription.remove;
|
|
55
|
-
}, [isVisible, onClose]);
|
|
56
|
-
return (<Portal>
|
|
57
|
-
<View style={[
|
|
58
|
-
styles.container,
|
|
59
|
-
!isVisible && styles.containerNoPointerEvents,
|
|
60
|
-
]} testID={testID ?? DialogTestId.root}>
|
|
48
|
+
return (<Modal transparent animationType='none' visible={showModal} onRequestClose={onClose}>
|
|
49
|
+
<View style={styles.container} testID={testID ?? DialogTestId.root}>
|
|
61
50
|
<AnimatedPressable style={[styles.backdrop, backdropAnimatedStyle]} testID={DialogTestId.backdrop} onPress={onClose}/>
|
|
62
51
|
<Animated.View style={dialogAnimatedStyle} testID={DialogTestId.contentContainer}>
|
|
63
52
|
<DialogComponent body={body} footer={footer} header={header}/>
|
|
64
53
|
</Animated.View>
|
|
65
54
|
</View>
|
|
66
|
-
</
|
|
55
|
+
</Modal>);
|
|
67
56
|
};
|
|
68
57
|
const styles = StyleSheet.create({
|
|
69
|
-
container: {
|
|
70
|
-
|
|
71
|
-
top: 0,
|
|
72
|
-
left: 0,
|
|
73
|
-
right: 0,
|
|
74
|
-
bottom: 0,
|
|
75
|
-
flex: 1,
|
|
76
|
-
justifyContent: 'center',
|
|
77
|
-
alignItems: 'center',
|
|
78
|
-
zIndex: 9999,
|
|
79
|
-
elevation: 999,
|
|
80
|
-
pointerEvents: 'auto',
|
|
81
|
-
},
|
|
82
|
-
containerNoPointerEvents: { pointerEvents: 'none' },
|
|
83
|
-
backdrop: {
|
|
84
|
-
position: 'absolute',
|
|
85
|
-
top: 0,
|
|
86
|
-
left: 0,
|
|
87
|
-
right: 0,
|
|
88
|
-
bottom: 0,
|
|
89
|
-
backgroundColor: 'black',
|
|
90
|
-
},
|
|
58
|
+
container: { flex: 1, justifyContent: 'center', alignItems: 'center' },
|
|
59
|
+
backdrop: { ...StyleSheet.absoluteFillObject, backgroundColor: 'black' },
|
|
91
60
|
});
|
|
92
61
|
export const DialogTestId = {
|
|
93
62
|
root: 'DialogModal',
|
|
@@ -6,7 +6,7 @@ import Animated, { interpolate, useAnimatedStyle, useSharedValue, withTiming, }
|
|
|
6
6
|
import { useLoadingRotationAnimation } from '../../../hooks/useLoadingRotationAnimation';
|
|
7
7
|
import { useMakeTestId } from '../../../hooks/useMakeTestId';
|
|
8
8
|
import { InputTextBaseTestId } from './testIds';
|
|
9
|
-
import {
|
|
9
|
+
import { useInputStyle } from './useInputStyles';
|
|
10
10
|
/**
|
|
11
11
|
* Базовое поле
|
|
12
12
|
* @link https://www.figma.com/design/4TYeki0MDLhfPGJstbIicf/UI-kit-PrimeFace-(DS)?node-id=484-5470&m=dev
|
|
@@ -14,11 +14,11 @@ import { useStyles } from './useStyles';
|
|
|
14
14
|
*/
|
|
15
15
|
export const InputTextBase = memo(
|
|
16
16
|
// eslint-disable-next-line max-lines-per-function
|
|
17
|
-
({ state, clearable = true, secureTextEntry: secureTextEntryProp = false, inputRef: propsInputRef, disabled, containerStyle, loading, renderTextInput, clearButtonAccessibilityLabel, floatLabel = false, placeholder, editable = true, ...otherProps
|
|
17
|
+
({ state, clearable = true, secureTextEntry: secureTextEntryProp = false, inputRef: propsInputRef, disabled, containerStyle, loading, renderTextInput, clearButtonAccessibilityLabel, floatLabel = false, placeholder, editable = true, size, ...otherProps
|
|
18
18
|
// TODO: разделить float label и обычный инпут -> добавить во float label поддержку font scale
|
|
19
19
|
// eslint-disable-next-line complexity
|
|
20
20
|
}) => {
|
|
21
|
-
const styles =
|
|
21
|
+
const styles = useInputStyle(size);
|
|
22
22
|
const inputRef = useRef(null);
|
|
23
23
|
const [valueState, setValueState] = useState('');
|
|
24
24
|
const [isFocused, setIsFocused] = useState(otherProps.autoFocus || false);
|
|
@@ -35,6 +35,13 @@ export interface InputTextBaseProps extends Omit<TextInputProps, 'style' | 'secu
|
|
|
35
35
|
* @default false
|
|
36
36
|
*/
|
|
37
37
|
floatLabel?: boolean;
|
|
38
|
+
/**
|
|
39
|
+
* Управление высотой поля ввода.
|
|
40
|
+
* Работает только если floatLabel = false.
|
|
41
|
+
* Можно передать число. Если переданное число меньше размера base, будет использован размер base.
|
|
42
|
+
* @default 'base'
|
|
43
|
+
*/
|
|
44
|
+
size?: 'base' | 'large' | 'xlarge' | number;
|
|
38
45
|
}
|
|
39
46
|
export type RenderTextInputArgs = TextInputProps & {
|
|
40
47
|
inputRef: Ref<TextInput>;
|
|
@@ -1,7 +1,23 @@
|
|
|
1
|
+
import { useMemo } from 'react';
|
|
1
2
|
import { makeStyles } from '../../../utils/makeStyles';
|
|
2
|
-
export const
|
|
3
|
+
export const useInputStyle = (size = 'base') => {
|
|
4
|
+
const styles = useStyles();
|
|
5
|
+
const containerMinHeight = useContainerMinHeight();
|
|
6
|
+
const minHeight = useMemo(() => {
|
|
7
|
+
if (typeof size === 'number') {
|
|
8
|
+
return Math.max(size, containerMinHeight.base.minHeight);
|
|
9
|
+
}
|
|
10
|
+
return containerMinHeight[size].minHeight;
|
|
11
|
+
}, [size, containerMinHeight]);
|
|
12
|
+
return { ...styles, container: { ...styles.container, minHeight } };
|
|
13
|
+
};
|
|
14
|
+
const useContainerMinHeight = makeStyles(({ theme }) => ({
|
|
15
|
+
base: { minHeight: theme.InputSize.base['min-height'] },
|
|
16
|
+
large: { minHeight: theme.InputSize.large['min-height'] },
|
|
17
|
+
xlarge: { minHeight: theme.InputSize.xlarge['min-height'] },
|
|
18
|
+
}));
|
|
19
|
+
const useStyles = makeStyles(({ theme, border, typography, spacing, fonts }) => ({
|
|
3
20
|
container: {
|
|
4
|
-
minHeight: theme.Button.Common.buttonHeight,
|
|
5
21
|
flexDirection: 'row',
|
|
6
22
|
borderWidth: border.Width.border,
|
|
7
23
|
borderRadius: border.Radius['rounded-xl'],
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { memo, useCallback, useMemo, useRef, useState } from 'react';
|
|
2
2
|
import { View, } from 'react-native';
|
|
3
|
-
import Animated, { Easing, interpolate,
|
|
3
|
+
import Animated, { Easing, interpolate, useAnimatedReaction, useAnimatedStyle, useSharedValue, withTiming, } from 'react-native-reanimated';
|
|
4
|
+
import { scheduleOnRN } from 'react-native-worklets';
|
|
4
5
|
import { makeStyles } from '../../utils/makeStyles';
|
|
5
6
|
import { SelectButtonItem, } from './SelectButtonItem';
|
|
6
7
|
const DEFAULT_ANIMATION_DURATION = 200; // ms
|
|
@@ -24,7 +25,7 @@ export const SelectButton = memo(({ buttons, disabled, initialIndex: initialInde
|
|
|
24
25
|
}, [buttons.length, buttonsLayoutList]);
|
|
25
26
|
useAnimatedReaction(() => buttonsLayoutList.value, (layoutList, previous) => {
|
|
26
27
|
if (layoutList !== previous) {
|
|
27
|
-
|
|
28
|
+
scheduleOnRN(setFrameKey, Date.now());
|
|
28
29
|
}
|
|
29
30
|
});
|
|
30
31
|
const positionInner = useSharedValue(initialIndex);
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { memo, useMemo, useState } from 'react';
|
|
2
2
|
import { TouchableOpacity } from 'react-native';
|
|
3
|
-
import Animated, { interpolateColor,
|
|
3
|
+
import Animated, { interpolateColor, useAnimatedReaction, useAnimatedStyle, } from 'react-native-reanimated';
|
|
4
|
+
import { scheduleOnRN } from 'react-native-worklets';
|
|
4
5
|
import { SvgUniversal } from '../../utils/SvgUniversal';
|
|
5
6
|
import { makeStyles } from '../../utils/makeStyles';
|
|
6
7
|
/**
|
|
@@ -57,7 +58,7 @@ export const SelectButtonItem = memo(({ index, position, onPress, disabled, labe
|
|
|
57
58
|
const [isSelected, setIsSelected] = useState(false);
|
|
58
59
|
useAnimatedReaction(() => position.value, (value, prevValue) => {
|
|
59
60
|
if (value !== prevValue) {
|
|
60
|
-
|
|
61
|
+
scheduleOnRN(setIsSelected, value === index);
|
|
61
62
|
}
|
|
62
63
|
});
|
|
63
64
|
return (<TouchableOpacity disabled={disabled} style={[
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
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
|
-
import Animated, { useSharedValue, useAnimatedStyle, interpolate, Extrapolation,
|
|
4
|
+
import Animated, { useSharedValue, useAnimatedStyle, interpolate, Extrapolation, } from 'react-native-reanimated';
|
|
5
|
+
import { scheduleOnRN } from 'react-native-worklets';
|
|
5
6
|
import { makeStyles } from '../../utils/makeStyles';
|
|
6
7
|
const MIN_TRACK_SCALE = 0;
|
|
7
8
|
const MAX_TRACK_SCALE = 100;
|
|
@@ -58,16 +59,16 @@ export const Slider = memo(
|
|
|
58
59
|
.minDistance(1)
|
|
59
60
|
.onBegin(() => {
|
|
60
61
|
prevMinPointX.value = minPointX.value;
|
|
61
|
-
|
|
62
|
+
scheduleOnRN(setIsPressed, true);
|
|
62
63
|
})
|
|
63
64
|
.onUpdate((event) => {
|
|
64
65
|
const maxTranslateX = trackWidth.value - pointerWidth;
|
|
65
66
|
const minPointPosition = clamp(prevMinPointX.value + event.translationX, 0, range ? maxPointX.value - pointerWidth : maxTranslateX);
|
|
66
67
|
minPointX.value = minPointPosition;
|
|
67
|
-
|
|
68
|
+
scheduleOnRN(returnMinVal, minPointPosition);
|
|
68
69
|
})
|
|
69
70
|
.onFinalize(() => {
|
|
70
|
-
|
|
71
|
+
scheduleOnRN(setIsPressed, false);
|
|
71
72
|
});
|
|
72
73
|
const minPointStyle = useAnimatedStyle(() => ({
|
|
73
74
|
transform: [{ translateX: minPointX.value }],
|
|
@@ -76,16 +77,16 @@ export const Slider = memo(
|
|
|
76
77
|
.minDistance(1)
|
|
77
78
|
.onBegin(() => {
|
|
78
79
|
prevMaxPointX.value = maxPointX.value;
|
|
79
|
-
|
|
80
|
+
scheduleOnRN(setIsPressed, true);
|
|
80
81
|
})
|
|
81
82
|
.onUpdate((event) => {
|
|
82
83
|
const maxTranslateX = trackWidth.value - pointerWidth;
|
|
83
84
|
const maxPointPosition = clamp(prevMaxPointX.value + event.translationX, minPointX.value + pointerWidth, maxTranslateX);
|
|
84
85
|
maxPointX.value = maxPointPosition;
|
|
85
|
-
|
|
86
|
+
scheduleOnRN(returnMaxVal, maxPointPosition);
|
|
86
87
|
})
|
|
87
88
|
.onFinalize(() => {
|
|
88
|
-
|
|
89
|
+
scheduleOnRN(setIsPressed, false);
|
|
89
90
|
});
|
|
90
91
|
const maxPointStyle = useAnimatedStyle(() => ({
|
|
91
92
|
transform: [{ translateX: maxPointX.value }],
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import React, { memo, useEffect, useState } from 'react';
|
|
2
2
|
import { View, Text } from 'react-native';
|
|
3
|
-
import Animated, { useSharedValue, useAnimatedStyle, withTiming,
|
|
3
|
+
import Animated, { useSharedValue, useAnimatedStyle, withTiming, } from 'react-native-reanimated';
|
|
4
|
+
import { scheduleOnRN } from 'react-native-worklets';
|
|
4
5
|
import { makeStyles } from '../../utils/makeStyles';
|
|
5
6
|
import { COUNTER_SIZE } from './constants';
|
|
6
7
|
export const TimerFlip = memo(({ value, duration = 300 }) => {
|
|
@@ -29,7 +30,7 @@ export const TimerFlip = memo(({ value, duration = 300 }) => {
|
|
|
29
30
|
setNextValue(value);
|
|
30
31
|
progress.value = withTiming(1, { duration }, (finished) => {
|
|
31
32
|
if (finished) {
|
|
32
|
-
|
|
33
|
+
scheduleOnRN(setCurrentValue, value);
|
|
33
34
|
}
|
|
34
35
|
});
|
|
35
36
|
}, [value, currentValue, duration, progress, nextValue]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{ "min-height": 35 }
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{ "min-height": 49 }
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{ "min-height": 56 }
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{ "width": 420, "height": 280 }
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{ "width": 350, "height": 210 }
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{ "width": 280, "height": 140 }
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{ "width": 630, "height": 350 }
|
|
@@ -388,11 +388,7 @@
|
|
|
388
388
|
}
|
|
389
389
|
},
|
|
390
390
|
"Misc": {
|
|
391
|
-
"Tag": {
|
|
392
|
-
"tagHeight": 21,
|
|
393
|
-
"tagFontSize": 12.25,
|
|
394
|
-
"tagPadding": 7
|
|
395
|
-
},
|
|
391
|
+
"Tag": { "tagHeight": 21, "tagFontSize": 12.25, "tagPadding": 7 },
|
|
396
392
|
"Skeleton": {
|
|
397
393
|
"skeletonBg": "#404348",
|
|
398
394
|
"skeletonAnimationBg": "rgba(255, 255, 255, 0.1)"
|
|
@@ -616,9 +612,7 @@
|
|
|
616
612
|
"ratingStarIconOnColor": "#facb75",
|
|
617
613
|
"ratingStarIconHoverColor": "#f5b83d"
|
|
618
614
|
},
|
|
619
|
-
"InputOpt": {
|
|
620
|
-
"inputOptFontSize": 21
|
|
621
|
-
},
|
|
615
|
+
"InputOpt": { "inputOptFontSize": 21 },
|
|
622
616
|
"ToggleButton": {
|
|
623
617
|
"toggleButtonBg": "#404348",
|
|
624
618
|
"toggleButtonBorderColor": "rgba(0, 0, 0, 0.0001)",
|
|
@@ -388,11 +388,7 @@
|
|
|
388
388
|
}
|
|
389
389
|
},
|
|
390
390
|
"Misc": {
|
|
391
|
-
"Tag": {
|
|
392
|
-
"tagHeight": 21,
|
|
393
|
-
"tagFontSize": 12.25,
|
|
394
|
-
"tagPadding": 7
|
|
395
|
-
},
|
|
391
|
+
"Tag": { "tagHeight": 21, "tagFontSize": 12.25, "tagPadding": 7 },
|
|
396
392
|
"Skeleton": {
|
|
397
393
|
"skeletonBg": "#e2e2e4",
|
|
398
394
|
"skeletonAnimationBg": "rgba(255, 255, 255, 0.1)"
|
|
@@ -616,9 +612,7 @@
|
|
|
616
612
|
"ratingStarIconOnColor": "#f5b83d",
|
|
617
613
|
"ratingStarIconHoverColor": "#facb75"
|
|
618
614
|
},
|
|
619
|
-
"InputOpt": {
|
|
620
|
-
"inputOptFontSize": 21
|
|
621
|
-
},
|
|
615
|
+
"InputOpt": { "inputOptFontSize": 21 },
|
|
622
616
|
"ToggleButton": {
|
|
623
617
|
"toggleButtonBg": "#e2e2e4",
|
|
624
618
|
"toggleButtonBorderColor": "rgba(255, 255, 255, 0.0001)",
|
package/dist/theme/darkTheme.js
CHANGED
|
@@ -1,7 +1,9 @@
|
|
|
1
|
+
import { InputSize } from './assets/InputSize';
|
|
2
|
+
import { ModalSize } from './assets/ModalSize';
|
|
1
3
|
import { customDark } from './assets/customDark';
|
|
2
4
|
import darkThemeAssets from './assets/themeDark.json';
|
|
3
5
|
import { commonTheme } from './commonTheme';
|
|
4
6
|
export const darkTheme = {
|
|
5
|
-
theme: { ...darkThemeAssets, custom: customDark },
|
|
7
|
+
theme: { ...darkThemeAssets, InputSize, ModalSize, custom: customDark },
|
|
6
8
|
...commonTheme,
|
|
7
9
|
};
|
package/dist/theme/lightTheme.js
CHANGED
|
@@ -1,7 +1,9 @@
|
|
|
1
|
+
import { InputSize } from './assets/InputSize';
|
|
2
|
+
import { ModalSize } from './assets/ModalSize';
|
|
1
3
|
import { customLight } from './assets/customLight';
|
|
2
4
|
import lightThemeAssets from './assets/themeLight.json';
|
|
3
5
|
import { commonTheme } from './commonTheme';
|
|
4
6
|
export const lightTheme = {
|
|
5
|
-
theme: { ...lightThemeAssets, custom: customLight },
|
|
7
|
+
theme: { ...lightThemeAssets, InputSize, ModalSize, custom: customLight },
|
|
6
8
|
...commonTheme,
|
|
7
9
|
};
|
package/dist/theme/types.d.ts
CHANGED
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
import type { InputSize } from './assets/InputSize';
|
|
2
|
+
import type { ModalSize } from './assets/ModalSize';
|
|
1
3
|
import type background from './assets/background.json';
|
|
2
4
|
import type border from './assets/border.json';
|
|
3
5
|
import type { customCommon } from './assets/customCommon';
|
|
@@ -22,6 +24,8 @@ export interface ThemeType {
|
|
|
22
24
|
spacing: typeof spacing;
|
|
23
25
|
theme: typeof lightTheme & {
|
|
24
26
|
custom: typeof customLight;
|
|
27
|
+
InputSize: typeof InputSize;
|
|
28
|
+
ModalSize: typeof ModalSize;
|
|
25
29
|
};
|
|
26
30
|
typography: typeof typography;
|
|
27
31
|
custom: typeof customCommon;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cdek-it/react-native-ui-kit",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.6.0-beta.0",
|
|
4
4
|
"description": "UI kit на основе Prime Faces, Prime Flex для React Native",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"homepage": "https://developer.cdek.ru/design-system",
|
|
@@ -41,91 +41,91 @@
|
|
|
41
41
|
"release": "release-it",
|
|
42
42
|
"pod-install": "bundle exec pod install --project-directory=ios"
|
|
43
43
|
},
|
|
44
|
+
"dependencies": {
|
|
45
|
+
"@gorhom/portal": "^1.0.14",
|
|
46
|
+
"@tabler/icons-react-native": "^3.36.0"
|
|
47
|
+
},
|
|
44
48
|
"devDependencies": {
|
|
45
|
-
"@babel/core": "7.28.
|
|
49
|
+
"@babel/core": "7.28.5",
|
|
46
50
|
"@babel/plugin-transform-class-static-block": "7.28.3",
|
|
47
|
-
"@babel/preset-env": "7.28.
|
|
51
|
+
"@babel/preset-env": "7.28.5",
|
|
48
52
|
"@commitlint/cli": "19.8.1",
|
|
49
53
|
"@commitlint/config-conventional": "19.8.1",
|
|
50
|
-
"@eslint/compat": "
|
|
51
|
-
"@expo/metro-runtime": "
|
|
52
|
-
"@gorhom/bottom-sheet": "5.
|
|
53
|
-
"@
|
|
54
|
-
"@react-native-
|
|
55
|
-
"@react-native-community/
|
|
56
|
-
"@react-native-community/slider": "4.5.6",
|
|
54
|
+
"@eslint/compat": "2.0.0",
|
|
55
|
+
"@expo/metro-runtime": "6.1.2",
|
|
56
|
+
"@gorhom/bottom-sheet": "5.2.8",
|
|
57
|
+
"@react-native-async-storage/async-storage": "2.2.0",
|
|
58
|
+
"@react-native-community/datetimepicker": "8.5.1",
|
|
59
|
+
"@react-native-community/slider": "5.1.1",
|
|
57
60
|
"@release-it/conventional-changelog": "10.0.1",
|
|
58
|
-
"@storybook/addon-
|
|
59
|
-
"@storybook/addon-
|
|
60
|
-
"@storybook/addon-ondevice-
|
|
61
|
-
"@storybook/addon-ondevice-
|
|
62
|
-
"@storybook/
|
|
63
|
-
"@storybook/
|
|
64
|
-
"@storybook/
|
|
65
|
-
"@
|
|
66
|
-
"@
|
|
67
|
-
"@storybook/test": "8.3.5",
|
|
68
|
-
"@stylistic/eslint-plugin": "5.5.0",
|
|
69
|
-
"@tabler/icons-react-native": "3.31.0",
|
|
70
|
-
"@testing-library/react-native": "13.3.1",
|
|
61
|
+
"@storybook/addon-controls": "9.0.8",
|
|
62
|
+
"@storybook/addon-ondevice-actions": "10.1.1",
|
|
63
|
+
"@storybook/addon-ondevice-controls": "10.1.1",
|
|
64
|
+
"@storybook/addon-ondevice-notes": "10.1.1",
|
|
65
|
+
"@storybook/core": "8.6.14",
|
|
66
|
+
"@storybook/preview-api": "8.6.14",
|
|
67
|
+
"@storybook/react-native": "10.1.1",
|
|
68
|
+
"@stylistic/eslint-plugin": "5.6.1",
|
|
69
|
+
"@testing-library/react-native": "13.3.3",
|
|
71
70
|
"@types/jest": "29.5.14",
|
|
72
|
-
"@types/lodash.map": "
|
|
73
|
-
"@types/react": "19.
|
|
71
|
+
"@types/lodash.map": "4.6.13",
|
|
72
|
+
"@types/react": "19.1.10",
|
|
74
73
|
"babel-loader": "8.2.3",
|
|
75
74
|
"chalk": "4.1.2",
|
|
76
75
|
"commitizen": "4.3.1",
|
|
77
76
|
"cross-env": "7.0.3",
|
|
78
|
-
"eslint": "9.39.
|
|
77
|
+
"eslint": "9.39.2",
|
|
79
78
|
"eslint-import-resolver-typescript": "4.4.4",
|
|
80
79
|
"eslint-plugin-import-x": "4.16.1",
|
|
81
|
-
"eslint-plugin-jest": "29.
|
|
80
|
+
"eslint-plugin-jest": "29.5.0",
|
|
82
81
|
"eslint-plugin-jest-extended": "3.0.1",
|
|
83
82
|
"eslint-plugin-prettier": "5.5.4",
|
|
84
83
|
"eslint-plugin-promise": "7.2.1",
|
|
85
84
|
"eslint-plugin-react": "7.37.5",
|
|
86
85
|
"eslint-plugin-react-hooks": "7.0.1",
|
|
87
86
|
"eslint-plugin-react-native": "5.0.0",
|
|
88
|
-
"eslint-plugin-testing-library": "7.
|
|
89
|
-
"expo": "
|
|
90
|
-
"expo-application": "
|
|
91
|
-
"expo-constants": "
|
|
92
|
-
"expo-doctor": "1.17.
|
|
93
|
-
"expo-status-bar": "
|
|
87
|
+
"eslint-plugin-testing-library": "7.15.1",
|
|
88
|
+
"expo": "54.0.30",
|
|
89
|
+
"expo-application": "7.0.8",
|
|
90
|
+
"expo-constants": "18.0.12",
|
|
91
|
+
"expo-doctor": "1.17.14",
|
|
92
|
+
"expo-status-bar": "3.0.9",
|
|
94
93
|
"inquirer-search-list": "1.2.6",
|
|
95
94
|
"jest": "29.7.0",
|
|
96
|
-
"jest-expo": "
|
|
95
|
+
"jest-expo": "54.0.16",
|
|
97
96
|
"jest-extended": "6.0.0",
|
|
98
97
|
"jest-junit": "16.0.0",
|
|
99
98
|
"jiti": "2.5.1",
|
|
100
|
-
"lefthook": "2.0.
|
|
99
|
+
"lefthook": "2.0.12",
|
|
101
100
|
"lodash.map": "4.6.0",
|
|
102
101
|
"longest": "2.0.1",
|
|
103
|
-
"npm-check-updates": "
|
|
102
|
+
"npm-check-updates": "19.2.0",
|
|
104
103
|
"onchange": "7.1.0",
|
|
105
|
-
"prettier": "3.
|
|
106
|
-
"react": "19.
|
|
107
|
-
"react-
|
|
108
|
-
"react-native
|
|
109
|
-
"react-native-
|
|
110
|
-
"react-native-
|
|
111
|
-
"react-native-
|
|
112
|
-
"react-native-
|
|
113
|
-
"
|
|
104
|
+
"prettier": "3.7.4",
|
|
105
|
+
"react": "19.1.0",
|
|
106
|
+
"react-dom": "19.1.0",
|
|
107
|
+
"react-native": "0.81.5",
|
|
108
|
+
"react-native-advanced-input-mask": "1.4.6",
|
|
109
|
+
"react-native-gesture-handler": "2.29.1",
|
|
110
|
+
"react-native-reanimated": "4.1.1",
|
|
111
|
+
"react-native-safe-area-context": "5.6.2",
|
|
112
|
+
"react-native-svg": "15.15.1",
|
|
113
|
+
"react-native-worklets": "0.5.1",
|
|
114
|
+
"release-it": "19.1.0",
|
|
114
115
|
"standard-version": "9.5.0",
|
|
115
|
-
"storybook": "
|
|
116
|
+
"storybook": "10.1.10",
|
|
117
|
+
"ts-jest": "29.4.6",
|
|
116
118
|
"ts-node": "10.9.2",
|
|
117
|
-
"typescript": "5.
|
|
118
|
-
"typescript-eslint": "8.
|
|
119
|
+
"typescript": "5.9.3",
|
|
120
|
+
"typescript-eslint": "8.50.0",
|
|
119
121
|
"word-wrap": "1.2.5"
|
|
120
122
|
},
|
|
121
123
|
"peerDependencies": {
|
|
122
|
-
"
|
|
123
|
-
"
|
|
124
|
-
"
|
|
125
|
-
"react": ">=
|
|
126
|
-
"react-native": ">=
|
|
127
|
-
"react-native-reanimated": ">=3.15.x",
|
|
128
|
-
"react-native-svg": ">=15.11.x"
|
|
124
|
+
"expo": ">=54.x.x",
|
|
125
|
+
"react": ">=19.1",
|
|
126
|
+
"react-native": ">=0.81.5",
|
|
127
|
+
"react-native-reanimated": ">=4.1.1",
|
|
128
|
+
"react-native-svg": ">=15.15.1"
|
|
129
129
|
},
|
|
130
130
|
"peerDependenciesMeta": {
|
|
131
131
|
"expo": {
|