sapo-components-ui-rn 1.1.88 → 1.1.90

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,6 +1,7 @@
1
1
  import React from "react";
2
2
  import { StyleProp, ViewStyle, TextStyle, ImageStyle } from "react-native";
3
3
  interface AvatarProps {
4
+ testID?: string;
4
5
  children?: React.ReactNode;
5
6
  name?: string;
6
7
  borderColor?: string;
@@ -13,5 +14,5 @@ interface AvatarProps {
13
14
  textStyle?: StyleProp<TextStyle>;
14
15
  imageStyle?: StyleProp<ImageStyle>;
15
16
  }
16
- declare const Avatar: ({ children, name, backgroundColor, style, textColor, size, source, onPress, textStyle, imageStyle, }: AvatarProps) => React.JSX.Element;
17
+ declare const Avatar: ({ testID, children, name, backgroundColor, style, textColor, size, source, onPress, textStyle, imageStyle, }: AvatarProps) => React.JSX.Element;
17
18
  export default Avatar;
@@ -5,6 +5,7 @@ export type BadgeSize = 'large' | 'medium' | 'small';
5
5
  export type BadgeMode = 'default' | 'outline';
6
6
  export type ProgressType = 'full' | 'half' | 'empty' | 'none';
7
7
  interface BadgeProps {
8
+ testID?: string;
8
9
  value?: string;
9
10
  borderColor?: string;
10
11
  backgroundColor?: string;
@@ -13,6 +13,7 @@ export interface ButtonIconProps {
13
13
  backgroundColor?: string;
14
14
  borderColor?: string;
15
15
  mode?: "normal" | "small";
16
+ testID?: string;
16
17
  }
17
18
  declare const _default: React.MemoExoticComponent<React.ComponentType<ButtonIconProps>>;
18
19
  export default _default;
@@ -1,6 +1,7 @@
1
1
  import React from "react";
2
2
  import { StyleProp, ViewStyle, TextStyle } from "react-native";
3
3
  interface CheckboxProps {
4
+ testID?: string;
4
5
  style?: StyleProp<ViewStyle>;
5
6
  content: string;
6
7
  onPress?: () => void;
@@ -10,5 +11,5 @@ interface CheckboxProps {
10
11
  checked?: boolean;
11
12
  iconSize?: number;
12
13
  }
13
- declare const Checkbox: ({ style, content, textStyle, onPress, disabled, leftIcon, checked, iconSize, }: CheckboxProps) => React.JSX.Element;
14
+ declare const Checkbox: ({ testID, style, content, textStyle, onPress, disabled, leftIcon, checked, iconSize, }: CheckboxProps) => React.JSX.Element;
14
15
  export default Checkbox;
@@ -1,6 +1,7 @@
1
1
  import React from "react";
2
2
  import { StyleProp, ViewStyle, TextStyle } from "react-native";
3
3
  interface ChipBarProps {
4
+ testID?: string;
4
5
  style?: StyleProp<ViewStyle>;
5
6
  title: string;
6
7
  borderRadius?: number;
@@ -14,5 +15,5 @@ interface ChipBarProps {
14
15
  ellipsizeMode?: "head" | "middle" | "tail" | "clip";
15
16
  numberOfLines?: number;
16
17
  }
17
- declare const ChipBar: ({ style, borderRadius, title, textStyle, onPress, disabled, leftIcon, rightIcon, badge, checked, ellipsizeMode, numberOfLines, }: ChipBarProps) => React.JSX.Element;
18
+ declare const ChipBar: ({ testID, style, borderRadius, title, textStyle, onPress, disabled, leftIcon, rightIcon, badge, checked, ellipsizeMode, numberOfLines, }: ChipBarProps) => React.JSX.Element;
18
19
  export default ChipBar;
@@ -1,6 +1,7 @@
1
1
  import React from "react";
2
2
  import { StyleProp, ViewStyle, TextStyle } from "react-native";
3
3
  interface CountingDotProps {
4
+ testID?: string;
4
5
  children?: React.ReactNode;
5
6
  value: string | number;
6
7
  borderColor?: string;
@@ -9,5 +10,5 @@ interface CountingDotProps {
9
10
  textColor?: string;
10
11
  textStyle?: StyleProp<TextStyle>;
11
12
  }
12
- declare const CountingDot: ({ children, value, backgroundColor, style, textColor, textStyle, }: CountingDotProps) => React.JSX.Element;
13
+ declare const CountingDot: ({ testID, children, value, backgroundColor, style, textColor, textStyle, }: CountingDotProps) => React.JSX.Element;
13
14
  export default CountingDot;
@@ -14,6 +14,7 @@ export interface FloatingButtonProps {
14
14
  right?: number;
15
15
  left?: number;
16
16
  bottom?: number;
17
+ testID?: string;
17
18
  }
18
19
  declare const _default: React.MemoExoticComponent<React.ComponentType<FloatingButtonProps>>;
19
20
  export default _default;
@@ -10,6 +10,7 @@ export interface IconProps {
10
10
  onPress?: () => void;
11
11
  tintColor?: string;
12
12
  animatedProps?: Record<string, unknown>;
13
+ testID?: string;
13
14
  }
14
15
  declare const _default: React.NamedExoticComponent<IconProps>;
15
16
  export default _default;
@@ -8,6 +8,7 @@ interface SvgIconProps {
8
8
  style?: any;
9
9
  onPress?: () => void;
10
10
  disabled?: boolean;
11
+ testID?: string;
11
12
  }
12
13
  declare const SvgIcon: React.FC<SvgIconProps>;
13
14
  export default SvgIcon;
@@ -1,6 +1,7 @@
1
1
  import React from "react";
2
2
  import { StyleProp, ViewStyle, TextStyle } from "react-native";
3
3
  interface RadioButtonProps {
4
+ testID?: string;
4
5
  style?: StyleProp<ViewStyle>;
5
6
  content: string;
6
7
  onPress?: (value: boolean) => void;
@@ -9,5 +10,5 @@ interface RadioButtonProps {
9
10
  leftIcon?: React.ReactNode;
10
11
  checked?: boolean;
11
12
  }
12
- declare const RadioButton: ({ style, content, textStyle, onPress, disabled, leftIcon, checked, }: RadioButtonProps) => React.JSX.Element;
13
+ declare const RadioButton: ({ testID, style, content, textStyle, onPress, disabled, leftIcon, checked, }: RadioButtonProps) => React.JSX.Element;
13
14
  export default RadioButton;
@@ -16,6 +16,7 @@ interface SearchInputProps {
16
16
  debounceTime?: number;
17
17
  autoFocus?: boolean;
18
18
  ref?: React.RefObject<TextInputNative | null>;
19
+ testID?: string;
19
20
  }
20
- declare const SearchInput: ({ value, disabled, rightIcon, clearButton, placeholder, onFocus, onBlur, onChangeText, style, height, debounceTime, autoFocus, textStyle, ref, }: SearchInputProps) => React.JSX.Element;
21
+ declare const SearchInput: ({ value, disabled, rightIcon, clearButton, placeholder, onFocus, onBlur, onChangeText, style, height, debounceTime, autoFocus, textStyle, ref, testID, }: SearchInputProps) => React.JSX.Element;
21
22
  export default SearchInput;
@@ -21,5 +21,5 @@ export interface SelectionFieldProps extends TouchableOpacityProps {
21
21
  required?: boolean;
22
22
  height?: number;
23
23
  }
24
- declare const _default: React.MemoExoticComponent<({ style, content, label, error, borderColor, left, right, textStyle, labelStyle, textProps, onPress, disabled, textColor, labelColor, theme: themeOverrides, required, height, ...props }: SelectionFieldProps) => React.JSX.Element>;
24
+ declare const _default: React.MemoExoticComponent<({ style, content, label, error, borderColor, left, right, textStyle, labelStyle, textProps, onPress, disabled, textColor, labelColor, theme: themeOverrides, required, height, testID, ...props }: SelectionFieldProps) => React.JSX.Element>;
25
25
  export default _default;
@@ -5,6 +5,7 @@ interface SpacerProps {
5
5
  height?: number;
6
6
  style?: StyleProp<ViewStyle>;
7
7
  backgroundColor?: string;
8
+ testID?: string;
8
9
  }
9
- declare const Spacer: ({ style, width, height, backgroundColor, }: SpacerProps) => React.JSX.Element;
10
+ declare const Spacer: ({ style, width, height, backgroundColor, testID, }: SpacerProps) => React.JSX.Element;
10
11
  export default Spacer;
@@ -13,6 +13,7 @@ export type Props = {
13
13
  * Callback called with the new value when it changes.
14
14
  */
15
15
  onValueChange?: (value: boolean) => void;
16
+ testID?: string;
16
17
  };
17
- declare const Switch: React.MemoExoticComponent<({ value, disabled, onValueChange, size }: Props) => React.JSX.Element>;
18
+ declare const Switch: React.MemoExoticComponent<({ testID, value, disabled, onValueChange, size }: Props) => React.JSX.Element>;
18
19
  export default Switch;
@@ -14,6 +14,7 @@ interface TagProps {
14
14
  numberOfLines?: number;
15
15
  hideRightIcon?: boolean;
16
16
  height?: number;
17
+ testID?: string;
17
18
  }
18
- declare const Tag: ({ style, borderRadius, title, textStyle, onPress, disabled, leftIcon, rightIcon, checked, ellipsizeMode, numberOfLines, hideRightIcon, height, }: TagProps) => React.JSX.Element;
19
+ declare const Tag: ({ style, borderRadius, title, textStyle, onPress, disabled, leftIcon, rightIcon, checked, ellipsizeMode, numberOfLines, hideRightIcon, height, testID, }: TagProps) => React.JSX.Element;
19
20
  export default Tag;
@@ -1,10 +1,10 @@
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';
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?: 'flat' | 'default' | 'number';
7
+ mode?: "flat" | "default" | "number";
8
8
  left?: React.ReactNode;
9
9
  right?: React.ReactNode;
10
10
  prefix?: string;
@@ -12,7 +12,7 @@ export type Props = React.ComponentPropsWithRef<typeof NativeTextInput> & {
12
12
  textError?: string;
13
13
  maxValue?: number;
14
14
  minValue?: number;
15
- type?: 'integer' | 'float';
15
+ type?: "integer" | "float";
16
16
  keyboardStyle?: StyleProp<ViewStyle>;
17
17
  formatDecimal?: 1 | 2 | 3;
18
18
  required?: boolean;
@@ -156,7 +156,7 @@ export type Props = React.ComponentPropsWithRef<typeof NativeTextInput> & {
156
156
  interface CompoundedComponent extends React.ForwardRefExoticComponent<Props & React.RefAttributes<TextInputHandles>> {
157
157
  Affix: React.FunctionComponent<Partial<TextInputAffixProps>>;
158
158
  }
159
- type TextInputHandles = Pick<NativeTextInput, 'focus' | 'clear' | 'blur' | 'isFocused' | 'setNativeProps'>;
159
+ type TextInputHandles = Pick<NativeTextInput, "focus" | "clear" | "blur" | "isFocused" | "setNativeProps">;
160
160
  /**
161
161
  * A component to allow users to input text.
162
162
  *
@@ -17,6 +17,7 @@ export type ViewVisibleAnimatedProps = {
17
17
  renderHiddenContent?: React.ReactNode;
18
18
  children?: React.ReactNode;
19
19
  disableHiddenContent?: boolean;
20
+ testID?: string;
20
21
  };
21
22
  declare const ViewVisibleAnimated: React.NamedExoticComponent<ViewVisibleAnimatedProps & React.RefAttributes<{
22
23
  show: () => void;
package/dist/index.d.ts CHANGED
@@ -2,6 +2,7 @@ export { ThemeColors } from "./styles/themes/tokens";
2
2
  export { CONSTANTS } from "./styles/themes/tokens";
3
3
  export { ThemeColors as ThemeColorsProps } from "./types";
4
4
  export { default as containerStyles } from "./theme/container-styles";
5
+ export { useTheme, ThemeProvider, DefaultTheme, adaptNavigationTheme, } from "./core/theming";
5
6
  export * from "./styles/themes";
6
7
  export { default as Switch } from "./components/Switch/Switch";
7
8
  export { default as TextInput } from "./components/TextInput/TextInput";