@cdek-it/react-native-ui-kit 0.6.5 → 0.6.7

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.
@@ -1,5 +1,5 @@
1
1
  import { type ComponentProps, type ReactNode } from 'react';
2
- import { type AccessibilityProps, type ColorValue, Image, type ImageSourcePropType, type ViewStyle } from 'react-native';
2
+ import { type AccessibilityProps, type ColorValue, Image, type ImageSourcePropType, type StyleProp, type ViewStyle } from 'react-native';
3
3
  import { type SvgSource } from '../../utils/SvgUniversal';
4
4
  export type AvatarSize = 'xlarge' | 'large' | 'normal';
5
5
  interface AvatarBase extends AccessibilityProps {
@@ -15,7 +15,7 @@ interface AvatarBase extends AccessibilityProps {
15
15
  */
16
16
  shape?: 'square' | 'circle';
17
17
  /** Дополнительная стилизация для контейнера компонента */
18
- style?: ViewStyle;
18
+ style?: StyleProp<ViewStyle>;
19
19
  testID?: string;
20
20
  /** Callback функция при ошибке загрузки картинки */
21
21
  onError?: ComponentProps<typeof Image>['onError'];
@@ -1,4 +1,4 @@
1
- import { type AccessibilityProps, type ViewStyle } from 'react-native';
1
+ import { type AccessibilityProps, type StyleProp, type ViewStyle } from 'react-native';
2
2
  import type { ViewProps } from 'react-native-svg/lib/typescript/fabric/utils';
3
3
  export type BadgeSeverity = 'basic' | 'info' | 'success' | 'warning' | 'danger';
4
4
  export interface BadgeBase extends AccessibilityProps, Pick<ViewProps, 'onLayout' | 'testID'> {
@@ -8,7 +8,7 @@ export interface BadgeBase extends AccessibilityProps, Pick<ViewProps, 'onLayout
8
8
  */
9
9
  severity?: BadgeSeverity;
10
10
  /** Дополнительная стилизация для контейнера компонента */
11
- style?: ViewStyle;
11
+ style?: StyleProp<ViewStyle>;
12
12
  }
13
13
  interface BadgeText extends BadgeBase {
14
14
  /** Текст внутри бейджа **/
@@ -1,4 +1,4 @@
1
- import { type ViewStyle } from 'react-native';
1
+ import { type StyleProp, type ViewStyle } from 'react-native';
2
2
  import type { InputTextBaseProps } from './InputTextBase/types';
3
3
  export interface FloatLabelProps extends InputTextBaseProps {
4
4
  /** Текст плейсхолдера */
@@ -6,7 +6,7 @@ export interface FloatLabelProps extends InputTextBaseProps {
6
6
  /** Показать индикатор загрузки в поле */
7
7
  loading?: boolean;
8
8
  /** Дополнительная стилизация для контейнера компонента */
9
- style?: ViewStyle;
9
+ style?: StyleProp<ViewStyle>;
10
10
  }
11
11
  /**
12
12
  * Компонент для ввода текста с плавающим плейсхолдером
@@ -1,4 +1,4 @@
1
- import { type ViewStyle } from 'react-native';
1
+ import { type ViewStyle, type StyleProp } from 'react-native';
2
2
  import { type InputGroupAddonProps } from './InputGroupAddon';
3
3
  import type { InputTextBaseProps } from './InputTextBase/types';
4
4
  /** @see InputTextBaseProps */
@@ -8,7 +8,7 @@ interface InputGroupBaseProps {
8
8
  /** Содержимое правого аддона группы */
9
9
  right?: InputGroupAddonProps['content'];
10
10
  /** Дополнительная стилизация для контейнера компонента */
11
- style?: ViewStyle;
11
+ style?: StyleProp<ViewStyle>;
12
12
  }
13
13
  export type InputGroupProps = InputGroupBaseProps & InputTextBaseProps;
14
14
  /**
@@ -1,5 +1,5 @@
1
1
  import { memo, useCallback, useImperativeHandle, useMemo, useRef } from 'react';
2
- import { View, StyleSheet } from 'react-native';
2
+ import { View, StyleSheet, } from 'react-native';
3
3
  import { makeStyles } from '../../utils/makeStyles';
4
4
  import { InputGroupAddon } from './InputGroupAddon';
5
5
  import { InputTextBase } from './InputTextBase/InputTextBase';
@@ -45,7 +45,7 @@ const useStyles = makeStyles(({ theme, border, fonts, typography }) => ({
45
45
  },
46
46
  text: {
47
47
  fontSize: typography.Size['text-2xl'],
48
- fontFamily: fonts.secondary,
48
+ fontFamily: fonts.primary,
49
49
  fontWeight: '400',
50
50
  color: theme.Form.InputText.inputTextColor,
51
51
  },
@@ -1,8 +1,8 @@
1
- import { type ViewStyle } from 'react-native';
1
+ import { type StyleProp, type ViewStyle } from 'react-native';
2
2
  import type { InputTextBaseProps } from './InputTextBase/types';
3
3
  export interface InputTextProps extends InputTextBaseProps {
4
4
  /** Дополнительная стилизация для контейнера компонента */
5
- style?: ViewStyle;
5
+ style?: StyleProp<ViewStyle>;
6
6
  }
7
7
  /**
8
8
  * Компонент для ввода текста
@@ -1,5 +1,5 @@
1
1
  import type { Ref, ReactNode } from 'react';
2
- import type { TextInputProps, ViewStyle, TextInput } from 'react-native';
2
+ import type { TextInputProps, ViewStyle, TextInput, StyleProp } from 'react-native';
3
3
  /** @see TextInputProps */
4
4
  export interface InputTextBaseProps extends Omit<TextInputProps, 'style' | 'secureTextEntry'> {
5
5
  /**
@@ -17,7 +17,7 @@ export interface InputTextBaseProps extends Omit<TextInputProps, 'style' | 'secu
17
17
  /** Озвучка для кнопки очистки поля */
18
18
  clearButtonAccessibilityLabel?: string;
19
19
  /** Управление стилем контейнера поля ввода */
20
- containerStyle?: ViewStyle;
20
+ containerStyle?: StyleProp<ViewStyle>;
21
21
  /** Управление доступностью поля */
22
22
  disabled?: boolean;
23
23
  /** Ref для управления полем ввода */
@@ -68,7 +68,7 @@ const useStyles = makeStyles(({ theme, spacing, typography, border }) => ({
68
68
  templateContainer: {
69
69
  flexDirection: 'row',
70
70
  gap: spacing.Gap['gap-2'],
71
- flexGrow: 1,
71
+ flex: 1,
72
72
  },
73
73
  icon: {
74
74
  width: typography.Size['text-xl'],
@@ -1,5 +1,5 @@
1
1
  import { type ReactNode } from 'react';
2
- import { type AccessibilityProps, type ViewProps, type ViewStyle } from 'react-native';
2
+ import { type AccessibilityProps, type StyleProp, type ViewProps, type ViewStyle } from 'react-native';
3
3
  import { type SvgSource } from '../../utils/SvgUniversal';
4
4
  export interface MessageProps extends AccessibilityProps, Pick<ViewProps, 'testID'> {
5
5
  /** Текст заголовка */
@@ -29,7 +29,7 @@ export interface MessageProps extends AccessibilityProps, Pick<ViewProps, 'testI
29
29
  */
30
30
  severity?: 'info' | 'success' | 'warning' | 'danger';
31
31
  /** Дополнительная стилизация для контейнера компонента */
32
- style?: ViewStyle;
32
+ style?: StyleProp<ViewStyle>;
33
33
  /** Значение таймера, если нужно отображать таймер вместо иконки */
34
34
  timerValue?: number;
35
35
  /**
@@ -1,4 +1,4 @@
1
- import { type AccessibilityProps, type ViewProps, type ViewStyle } from 'react-native';
1
+ import { type AccessibilityProps, type StyleProp, type ViewProps, type ViewStyle } from 'react-native';
2
2
  import { type SvgSource } from '../../utils/SvgUniversal';
3
3
  export interface ToggleButtonProps extends AccessibilityProps, Pick<ViewProps, 'testID'> {
4
4
  /** Обработчик нажатия на кнопку */
@@ -28,7 +28,7 @@ export interface ToggleButtonProps extends AccessibilityProps, Pick<ViewProps, '
28
28
  */
29
29
  size?: 'xlarge' | 'large' | 'base' | 'small';
30
30
  /** Дополнительная стилизация для контейнера компонента */
31
- style?: ViewStyle;
31
+ style?: StyleProp<ViewStyle>;
32
32
  /** SVG-иконка */
33
33
  Icon?: SvgSource;
34
34
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cdek-it/react-native-ui-kit",
3
- "version": "0.6.5",
3
+ "version": "0.6.7",
4
4
  "description": "UI kit на основе Prime Faces, Prime Flex для React Native",
5
5
  "license": "MIT",
6
6
  "homepage": "https://developer.cdek.ru/design-system",