sapo-components-ui-rn 1.1.79 → 1.1.81
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/components/Badge/index.d.ts +6 -6
- package/dist/components/Button/index.d.ts +7 -7
- package/dist/components/Icon/index.d.ts +3 -3
- package/dist/components/Image/index.d.ts +3 -3
- package/dist/components/NumberKeyboard/index.d.ts +4 -2
- package/dist/components/SelectionField/index.d.ts +4 -4
- package/dist/components/TextInput/TextInput.d.ts +9 -8
- package/dist/components/TextInput/TextInputFlat.d.ts +2 -2
- package/dist/components/TextInput/TextInputNumber.d.ts +6 -5
- package/dist/components/Toast/index.d.ts +1 -1
- package/dist/index.esm.js +304 -303
- package/dist/index.esm.js.map +1 -1
- package/dist/index.js +304 -303
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
- package/src/components/Badge/index.tsx +29 -29
- package/src/components/Button/index.tsx +36 -36
- package/src/components/Icon/index.tsx +47 -47
- package/src/components/Image/index.tsx +8 -8
- package/src/components/NumberKeyboard/index.tsx +105 -97
- package/src/components/SelectionField/index.tsx +23 -23
- package/src/components/TextInput/TextInput.tsx +34 -32
- package/src/components/TextInput/TextInputFlat.tsx +52 -52
- package/src/components/TextInput/TextInputNumber.tsx +130 -127
- package/src/components/Toast/index.tsx +49 -49
- package/dist/.DS_Store +0 -0
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import React from
|
|
2
|
-
import { StyleProp, ViewStyle, TextStyle } from
|
|
3
|
-
export type BadgeType =
|
|
4
|
-
export type BadgeSize =
|
|
5
|
-
export type BadgeMode =
|
|
6
|
-
export type ProgressType =
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { StyleProp, ViewStyle, TextStyle } from 'react-native';
|
|
3
|
+
export type BadgeType = 'success' | 'error' | 'info' | 'warning' | 'default';
|
|
4
|
+
export type BadgeSize = 'large' | 'medium' | 'small';
|
|
5
|
+
export type BadgeMode = 'default' | 'outline';
|
|
6
|
+
export type ProgressType = 'full' | 'half' | 'empty' | 'none';
|
|
7
7
|
interface BadgeProps {
|
|
8
8
|
value?: string;
|
|
9
9
|
borderColor?: string;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import React from
|
|
2
|
-
import { StyleProp, ViewStyle, TouchableOpacityProps, TextStyle } from
|
|
3
|
-
import { IText } from
|
|
4
|
-
import { ThemeProp } from
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { StyleProp, ViewStyle, TouchableOpacityProps, TextStyle } from 'react-native';
|
|
3
|
+
import { IText } from '../Text';
|
|
4
|
+
import { ThemeProp } from '../../types';
|
|
5
5
|
export interface ButtonProps extends TouchableOpacityProps {
|
|
6
6
|
style?: StyleProp<ViewStyle>;
|
|
7
7
|
border?: boolean;
|
|
@@ -17,13 +17,13 @@ export interface ButtonProps extends TouchableOpacityProps {
|
|
|
17
17
|
textBold?: boolean;
|
|
18
18
|
textSize?: number;
|
|
19
19
|
textStyle?: TextStyle;
|
|
20
|
-
mode?:
|
|
20
|
+
mode?: 'outlined' | 'contained' | 'transparent';
|
|
21
21
|
transparent?: boolean;
|
|
22
22
|
onPress?: (res?: any) => void;
|
|
23
23
|
full?: boolean;
|
|
24
24
|
theme?: ThemeProp;
|
|
25
|
-
buttonSize?:
|
|
26
|
-
type?:
|
|
25
|
+
buttonSize?: 'normal' | 'small' | 'large';
|
|
26
|
+
type?: 'default' | 'text';
|
|
27
27
|
critical?: boolean;
|
|
28
28
|
width?: number;
|
|
29
29
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import React from
|
|
2
|
-
import { StyleProp, TextStyle } from
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { StyleProp, TextStyle } from 'react-native';
|
|
3
3
|
export interface IconProps {
|
|
4
|
-
name:
|
|
4
|
+
name: 'IconCheckboxActive' | 'IconCheckbox' | 'IconRadio' | 'IconRadioActive' | 'IconRadioDisable' | 'IconArrowDown' | 'IconClearText' | 'IconSearch' | 'IconClose' | 'IconSuccess' | 'IconError' | 'IconInfo' | 'IconWarning' | 'IconDelNumber';
|
|
5
5
|
backgroundColor?: string;
|
|
6
6
|
size?: number;
|
|
7
7
|
color?: string;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import React from
|
|
2
|
-
import { ImageProps, StyleProp, ImageStyle } from
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { ImageProps, StyleProp, ImageStyle } from 'react-native';
|
|
3
3
|
interface PropsCustomImage extends ImageProps {
|
|
4
4
|
disableDefaultImage?: boolean;
|
|
5
5
|
children?: React.ReactNode;
|
|
6
|
-
resizeMode?:
|
|
6
|
+
resizeMode?: 'cover' | 'contain' | 'stretch' | 'center';
|
|
7
7
|
source: any;
|
|
8
8
|
style?: StyleProp<ImageStyle>;
|
|
9
9
|
loadingColor?: string;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import React from
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { ViewStyle, StyleProp } from 'react-native';
|
|
2
3
|
export interface NumberKeyboardProps {
|
|
3
4
|
/** Giá trị hiện tại của input */
|
|
4
5
|
value?: string | number;
|
|
@@ -11,13 +12,14 @@ export interface NumberKeyboardProps {
|
|
|
11
12
|
/** Giá trị tối thiểu cho phép */
|
|
12
13
|
minValue?: number;
|
|
13
14
|
/** Loại input: integer hoặc float */
|
|
14
|
-
type?:
|
|
15
|
+
type?: 'integer' | 'float';
|
|
15
16
|
/** Số chữ số thập phân cho phép */
|
|
16
17
|
formatDecimal?: 1 | 2 | 3;
|
|
17
18
|
/** Trạng thái hiển thị modal */
|
|
18
19
|
visible: boolean;
|
|
19
20
|
/** Callback khi đóng modal */
|
|
20
21
|
onClose: () => void;
|
|
22
|
+
keyboardStyle?: StyleProp<ViewStyle>;
|
|
21
23
|
}
|
|
22
24
|
declare const _default: React.NamedExoticComponent<NumberKeyboardProps>;
|
|
23
25
|
export default _default;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import React from
|
|
2
|
-
import { StyleProp, ViewStyle, TouchableOpacityProps, TextStyle } from
|
|
3
|
-
import { IText } from
|
|
4
|
-
import { ThemeProp } from
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { StyleProp, ViewStyle, TouchableOpacityProps, TextStyle } from 'react-native';
|
|
3
|
+
import { IText } from '../Text';
|
|
4
|
+
import { ThemeProp } from '../../types';
|
|
5
5
|
export interface SelectionFieldProps extends TouchableOpacityProps {
|
|
6
6
|
style?: StyleProp<ViewStyle>;
|
|
7
7
|
borderColor?: string;
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import React from
|
|
2
|
-
import { StyleProp, TextInput as NativeTextInput, TextStyle, ViewStyle } from
|
|
3
|
-
import { Props as TextInputAffixProps } from
|
|
4
|
-
import type { RenderProps, TextInputLabelProp } from
|
|
5
|
-
import type { ThemeProp } from
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { StyleProp, TextInput as NativeTextInput, TextStyle, ViewStyle } from 'react-native';
|
|
3
|
+
import { Props as TextInputAffixProps } from './Adornment/TextInputAffix';
|
|
4
|
+
import type { RenderProps, TextInputLabelProp } from './types';
|
|
5
|
+
import type { ThemeProp } from '../../types';
|
|
6
6
|
export type Props = React.ComponentPropsWithRef<typeof NativeTextInput> & {
|
|
7
|
-
mode?:
|
|
7
|
+
mode?: 'flat' | 'default' | 'number';
|
|
8
8
|
left?: React.ReactNode;
|
|
9
9
|
right?: React.ReactNode;
|
|
10
10
|
prefix?: string;
|
|
@@ -12,7 +12,8 @@ export type Props = React.ComponentPropsWithRef<typeof NativeTextInput> & {
|
|
|
12
12
|
textError?: string;
|
|
13
13
|
maxValue?: number;
|
|
14
14
|
minValue?: number;
|
|
15
|
-
type?:
|
|
15
|
+
type?: 'integer' | 'float';
|
|
16
|
+
keyboardStyle?: StyleProp<ViewStyle>;
|
|
16
17
|
formatDecimal?: 1 | 2 | 3;
|
|
17
18
|
required?: boolean;
|
|
18
19
|
/**
|
|
@@ -155,7 +156,7 @@ export type Props = React.ComponentPropsWithRef<typeof NativeTextInput> & {
|
|
|
155
156
|
interface CompoundedComponent extends React.ForwardRefExoticComponent<Props & React.RefAttributes<TextInputHandles>> {
|
|
156
157
|
Affix: React.FunctionComponent<Partial<TextInputAffixProps>>;
|
|
157
158
|
}
|
|
158
|
-
type TextInputHandles = Pick<NativeTextInput,
|
|
159
|
+
type TextInputHandles = Pick<NativeTextInput, 'focus' | 'clear' | 'blur' | 'isFocused' | 'setNativeProps'>;
|
|
159
160
|
/**
|
|
160
161
|
* A component to allow users to input text.
|
|
161
162
|
*
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import * as React from
|
|
2
|
-
import type { ChildTextInputProps } from
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import type { ChildTextInputProps } from './types';
|
|
3
3
|
declare const TextInputFlat: ({ disabled, editable, label, error, selectionColor: customSelectionColor, cursorColor, underlineColor, underlineStyle, activeUnderlineColor, textColor, dense, style, theme, render, multiline, parentState, innerRef, onFocus, forceFocus, onBlur, onChangeText, onLayoutAnimatedText, onLabelTextLayout, onLeftAffixLayoutChange, onRightAffixLayoutChange, onInputLayout, left, right, prefix, suffix, placeholderTextColor, clearButton, contentStyle, scaledLabel, outlineStyle, outlineColor, value, textError, required, ...rest }: ChildTextInputProps) => React.JSX.Element;
|
|
4
4
|
export default TextInputFlat;
|
|
@@ -1,8 +1,9 @@
|
|
|
1
|
-
import React from
|
|
2
|
-
import { StyleProp, ViewStyle, TouchableOpacityProps, TextStyle } from
|
|
3
|
-
import { ThemeProp } from
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { StyleProp, ViewStyle, TouchableOpacityProps, TextStyle } from 'react-native';
|
|
3
|
+
import { ThemeProp } from '../../types';
|
|
4
4
|
export interface TextInputNumberProps extends TouchableOpacityProps {
|
|
5
5
|
style?: StyleProp<ViewStyle>;
|
|
6
|
+
keyboardStyle?: StyleProp<ViewStyle>;
|
|
6
7
|
value?: string | number;
|
|
7
8
|
label?: string;
|
|
8
9
|
textError?: string;
|
|
@@ -16,7 +17,7 @@ export interface TextInputNumberProps extends TouchableOpacityProps {
|
|
|
16
17
|
theme?: ThemeProp;
|
|
17
18
|
maxValue?: number;
|
|
18
19
|
minValue?: number;
|
|
19
|
-
type?:
|
|
20
|
+
type?: 'integer' | 'float';
|
|
20
21
|
formatDecimal?: 1 | 2 | 3;
|
|
21
22
|
required?: boolean;
|
|
22
23
|
labelStyle?: StyleProp<TextStyle>;
|
|
@@ -24,5 +25,5 @@ export interface TextInputNumberProps extends TouchableOpacityProps {
|
|
|
24
25
|
textErrorStyle?: StyleProp<TextStyle>;
|
|
25
26
|
height?: number;
|
|
26
27
|
}
|
|
27
|
-
declare const _default: React.MemoExoticComponent<({ style, value, label, textError, left, right, onChangeText, disabled, theme: themeOverrides, prefix, suffix, clearButton, maxValue, minValue, type, formatDecimal, required, labelStyle, contentStyle, textErrorStyle, height, ...props }: TextInputNumberProps) => React.JSX.Element>;
|
|
28
|
+
declare const _default: React.MemoExoticComponent<({ style, value, label, textError, left, right, onChangeText, disabled, theme: themeOverrides, prefix, suffix, clearButton, maxValue, minValue, type, formatDecimal, required, labelStyle, contentStyle, textErrorStyle, height, keyboardStyle, ...props }: TextInputNumberProps) => React.JSX.Element>;
|
|
28
29
|
export default _default;
|