sapo-components-ui-rn 1.1.89 → 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,9 +1,29 @@
1
- /* eslint-disable @typescript-eslint/no-var-requires */
2
- let imageDefault: number | undefined;
1
+ import IconClose from "./icon-close.svg";
2
+ import IconCheckbox from "./icon-checkbox.svg";
3
+ import IconCheckboxActive from "./icon-checkbox-active.svg";
4
+ import IconRadio from "./icon-radio.svg";
5
+ import IconRadioActive from "./icon-radio-active.svg";
6
+ import IconSearch from "./icon-search.svg";
7
+ import IconInfo from "./icon-info.svg";
8
+ import IconSuccess from "./icon-success.svg";
9
+ import IconWarning from "./icon-warning.svg";
10
+ import IconArrowDown from "./icon-arrow-down.svg";
11
+ import IconError from "./icon-error.svg";
12
+ import IconClearText from "./icon-clear-text.svg";
13
+ import IconDelNumber from './icon-del-number.svg'
3
14
 
4
- export const getImageDefault = (): number => {
5
- if (imageDefault === undefined) {
6
- imageDefault = require("./image_default.png");
7
- }
8
- return imageDefault;
15
+ export const Svg = {
16
+ IconClose,
17
+ IconCheckbox,
18
+ IconCheckboxActive,
19
+ IconRadio,
20
+ IconRadioActive,
21
+ IconSearch,
22
+ IconInfo,
23
+ IconSuccess,
24
+ IconWarning,
25
+ IconArrowDown,
26
+ IconError,
27
+ IconClearText,
28
+ IconDelNumber,
9
29
  };
@@ -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;
@@ -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.esm.js CHANGED
@@ -1526,12 +1526,12 @@ var ViewCustom = forwardRef$1(function (_a, ref) {
1526
1526
  };
1527
1527
  var defaultStyle = getStyle();
1528
1528
  var Component = onPress ? TouchableOpacity : View$1;
1529
- return (React__default.createElement(Component, __assign({ ref: ref, activeOpacity: activeOpacity, onPress: onPress, disabled: disabled, style: [defaultStyle, style], onLayout: onLayout, onMagicTap: onMagicTap, onMoveShouldSetResponder: onMoveShouldSetResponder, onMoveShouldSetResponderCapture: onMoveShouldSetResponderCapture, onResponderGrant: onResponderGrant, onResponderMove: onResponderMove, onResponderReject: onResponderReject, onResponderRelease: onResponderRelease, onResponderTerminate: onResponderTerminate, onResponderTerminationRequest: onResponderTerminationRequest, onStartShouldSetResponder: onStartShouldSetResponder, onStartShouldSetResponderCapture: onStartShouldSetResponderCapture, testID: testID, nativeID: nativeID, collapsable: collapsable, needsOffscreenAlphaCompositing: needsOffscreenAlphaCompositing, renderToHardwareTextureAndroid: renderToHardwareTextureAndroid, shouldRasterizeIOS: shouldRasterizeIOS }, restProps), children));
1529
+ return (React__default.createElement(Component, __assign({ ref: ref, activeOpacity: activeOpacity, onPress: onPress, disabled: disabled, style: [defaultStyle, style], onLayout: onLayout, onMagicTap: onMagicTap, onMoveShouldSetResponder: onMoveShouldSetResponder, onMoveShouldSetResponderCapture: onMoveShouldSetResponderCapture, onResponderGrant: onResponderGrant, onResponderMove: onResponderMove, onResponderReject: onResponderReject, onResponderRelease: onResponderRelease, onResponderTerminate: onResponderTerminate, onResponderTerminationRequest: onResponderTerminationRequest, onStartShouldSetResponder: onStartShouldSetResponder, onStartShouldSetResponderCapture: onStartShouldSetResponderCapture, testID: testID, nativeID: nativeID, collapsable: collapsable !== null && collapsable !== void 0 ? collapsable : (testID ? false : undefined), needsOffscreenAlphaCompositing: needsOffscreenAlphaCompositing, renderToHardwareTextureAndroid: renderToHardwareTextureAndroid, shouldRasterizeIOS: shouldRasterizeIOS }, restProps), children));
1530
1530
  });
1531
1531
  var View = React__default.memo(ViewCustom);
1532
1532
 
1533
1533
  var Switch = memo(function (_a) {
1534
- var value = _a.value, disabled = _a.disabled, onValueChange = _a.onValueChange, _b = _a.size, size = _b === void 0 ? "normal" : _b;
1534
+ var testID = _a.testID, value = _a.value, disabled = _a.disabled, onValueChange = _a.onValueChange, _b = _a.size, size = _b === void 0 ? "normal" : _b;
1535
1535
  var theme = useInternalTheme();
1536
1536
  var colors = theme.colors;
1537
1537
  var progress = useSharedValue(value ? 1 : 0);
@@ -1604,7 +1604,7 @@ var Switch = memo(function (_a) {
1604
1604
  }
1605
1605
  }, [size, colors]);
1606
1606
  return (React$3.createElement(View, { row: true },
1607
- React$3.createElement(TouchableOpacity, { activeOpacity: 1, onPress: handleSwitch, disabled: disabled, style: disabled ? { opacity: 0.6 } : {} },
1607
+ React$3.createElement(TouchableOpacity, { testID: testID, activeOpacity: 1, onPress: handleSwitch, disabled: disabled, style: disabled ? { opacity: 0.6 } : {} },
1608
1608
  React$3.createElement(Animated.View, { style: [styles$j.vSegment, backgroundColor, getSizeSwitch()] },
1609
1609
  React$3.createElement(Animated.View, { style: [styles$j.animated, animatedStyle, getSizeCircle()] })))));
1610
1610
  });
@@ -4577,7 +4577,7 @@ var Text = function (props) {
4577
4577
  };
4578
4578
  var defaultStyle = _getStyle();
4579
4579
  var Component = Text$2;
4580
- return (React__default.createElement(Component, __assign({ onPress: onPress, style: [defaultStyle, props.style], allowFontScaling: false }, rest), children));
4580
+ return (React__default.createElement(Component, __assign({ onPress: onPress, style: [defaultStyle, props.style], allowFontScaling: false, accessible: true }, rest), children));
4581
4581
  };
4582
4582
  var Text$1 = memoDeepEqual(Text);
4583
4583
 
@@ -4728,8 +4728,8 @@ var styles$f = StyleSheet.create({
4728
4728
  });
4729
4729
 
4730
4730
  var Spacer = function (_a) {
4731
- var style = _a.style, _b = _a.width, width = _b === void 0 ? CONSTANTS.SPACE_16 : _b, _c = _a.height, height = _c === void 0 ? CONSTANTS.SPACE_12 : _c, backgroundColor = _a.backgroundColor;
4732
- return (React__default.createElement(View, { backgroundColor: backgroundColor || "transparent", width: width, height: height, style: [style] }));
4731
+ var style = _a.style, _b = _a.width, width = _b === void 0 ? CONSTANTS.SPACE_16 : _b, _c = _a.height, height = _c === void 0 ? CONSTANTS.SPACE_12 : _c, backgroundColor = _a.backgroundColor, testID = _a.testID;
4732
+ return (React__default.createElement(View, { testID: testID, backgroundColor: backgroundColor || "transparent", width: width, height: height, style: [style] }));
4733
4733
  };
4734
4734
 
4735
4735
  Dimensions.get("window").height;
@@ -4809,13 +4809,13 @@ var Svg = {
4809
4809
  };
4810
4810
 
4811
4811
  var SvgIcon = function (_a) {
4812
- var name = _a.name, _b = _a.width, width = _b === void 0 ? 24 : _b, _c = _a.height, height = _c === void 0 ? 24 : _c, _d = _a.color, color = _d === void 0 ? colors.ink.INK40 : _d, style = _a.style, onPress = _a.onPress, _e = _a.disabled, disabled = _e === void 0 ? false : _e;
4812
+ var name = _a.name, _b = _a.width, width = _b === void 0 ? 24 : _b, _c = _a.height, height = _c === void 0 ? 24 : _c, _d = _a.color, color = _d === void 0 ? colors.ink.INK40 : _d, style = _a.style, onPress = _a.onPress, _e = _a.disabled, disabled = _e === void 0 ? false : _e, testID = _a.testID;
4813
4813
  var IconComponent = Svg[name];
4814
4814
  if (!IconComponent) {
4815
4815
  console.warn("Icon \"".concat(name, "\" kh\u00F4ng t\u1ED3n t\u1EA1i trong Svg."));
4816
4816
  return null;
4817
4817
  }
4818
- return (React__default.createElement(IconComponent, { width: width, height: height, color: disabled ? colors.ink.INK20 : color, style: style, onPress: disabled ? undefined : onPress }));
4818
+ return (React__default.createElement(IconComponent, { testID: testID, width: width, height: height, color: disabled ? colors.ink.INK20 : color, style: style, onPress: disabled ? undefined : onPress }));
4819
4819
  };
4820
4820
 
4821
4821
  var TextInputFlat = function (_a) {
@@ -6353,9 +6353,9 @@ var styles$b = StyleSheet.create(__assign(__assign({}, containerStyles), { disab
6353
6353
  var index$3 = React__default.memo(Button);
6354
6354
 
6355
6355
  var FloatingButton = function (_a) {
6356
- var isLoading = _a.isLoading, disabled = _a.disabled, onPress = _a.onPress, style = _a.style, _b = _a.hiddenBackground, hiddenBackground = _b === void 0 ? false : _b, _c = _a.size, size = _c === void 0 ? BUTTON_HEIGHT : _c, children = _a.children, backgroundColor = _a.backgroundColor, props = _a.props, _d = _a.top, top = _d === void 0 ? 0 : _d, _e = _a.right, right = _e === void 0 ? 0 : _e, _f = _a.left, left = _f === void 0 ? 0 : _f, _g = _a.bottom, bottom = _g === void 0 ? 0 : _g;
6356
+ var isLoading = _a.isLoading, disabled = _a.disabled, onPress = _a.onPress, style = _a.style, _b = _a.hiddenBackground, hiddenBackground = _b === void 0 ? false : _b, _c = _a.size, size = _c === void 0 ? BUTTON_HEIGHT : _c, children = _a.children, backgroundColor = _a.backgroundColor, props = _a.props, _d = _a.top, top = _d === void 0 ? 0 : _d, _e = _a.right, right = _e === void 0 ? 0 : _e, _f = _a.left, left = _f === void 0 ? 0 : _f, _g = _a.bottom, bottom = _g === void 0 ? 0 : _g, testID = _a.testID;
6357
6357
  var colors = useInternalTheme().colors;
6358
- return (React__default.createElement(TouchableOpacity, __assign({ activeOpacity: 0.8, onPress: onPress }, props, { disabled: disabled || isLoading, style: [
6358
+ return (React__default.createElement(TouchableOpacity, __assign({ testID: testID, activeOpacity: 0.8, onPress: onPress }, props, { disabled: disabled || isLoading, style: [
6359
6359
  styles$a.btn,
6360
6360
  top > 0 && { top: top },
6361
6361
  right > 0 && { right: right },
@@ -6390,7 +6390,7 @@ var styles$a = StyleSheet.create({
6390
6390
  var index$2 = memoDeepEqual(FloatingButton);
6391
6391
 
6392
6392
  var ViewVisibleAnimated = React__default.memo(React__default.forwardRef(function (_a, ref) {
6393
- var onShowStart = _a.onShowStart, onShowDone = _a.onShowDone, onDone = _a.onDone, style = _a.style, children = _a.children, _b = _a.autoHide, autoHide = _b === void 0 ? false : _b, _c = _a.scaleEnable, scaleEnable = _c === void 0 ? true : _c, _d = _a.translateEnable, translateEnable = _d === void 0 ? true : _d, _e = _a.delay, delay = _e === void 0 ? 100 : _e, _f = _a.duration, duration = _f === void 0 ? 250 : _f, _g = _a.timeout, timeout = _g === void 0 ? 1000 : _g, _h = _a.autoShow, autoShow = _h === void 0 ? true : _h, _j = _a.pointerEvents, pointerEvents = _j === void 0 ? "auto" : _j, _k = _a.scaleType, scaleType = _k === void 0 ? "in" : _k, _l = _a.renderHiddenContent, renderHiddenContent = _l === void 0 ? null : _l, _m = _a.disableHiddenContent, disableHiddenContent = _m === void 0 ? false : _m;
6393
+ var onShowStart = _a.onShowStart, onShowDone = _a.onShowDone, onDone = _a.onDone, style = _a.style, children = _a.children, _b = _a.autoHide, autoHide = _b === void 0 ? false : _b, _c = _a.scaleEnable, scaleEnable = _c === void 0 ? true : _c, _d = _a.translateEnable, translateEnable = _d === void 0 ? true : _d, _e = _a.delay, delay = _e === void 0 ? 100 : _e, _f = _a.duration, duration = _f === void 0 ? 250 : _f, _g = _a.timeout, timeout = _g === void 0 ? 1000 : _g, _h = _a.autoShow, autoShow = _h === void 0 ? true : _h, _j = _a.pointerEvents, pointerEvents = _j === void 0 ? "auto" : _j, _k = _a.scaleType, scaleType = _k === void 0 ? "in" : _k, _l = _a.renderHiddenContent, renderHiddenContent = _l === void 0 ? null : _l, _m = _a.disableHiddenContent, disableHiddenContent = _m === void 0 ? false : _m, testID = _a.testID;
6394
6394
  useImperativeHandle(ref, function () { return ({
6395
6395
  hide: hide,
6396
6396
  show: show,
@@ -6481,7 +6481,7 @@ var ViewVisibleAnimated = React__default.memo(React__default.forwardRef(function
6481
6481
  callback === null || callback === void 0 ? void 0 : callback();
6482
6482
  });
6483
6483
  };
6484
- return (React__default.createElement(Animated$1.View, { style: [
6484
+ return (React__default.createElement(Animated$1.View, { testID: testID, style: [
6485
6485
  style,
6486
6486
  {
6487
6487
  opacity: visibleAnimation,
@@ -6509,7 +6509,8 @@ var SPACER = {
6509
6509
  MEDIUM: 'medium',
6510
6510
  LARGE: 'large',
6511
6511
  };
6512
- var Toast = memoWithRef(function (_props, ref) {
6512
+ var Toast = memoWithRef(function (props, ref) {
6513
+ var testID = props.testID;
6513
6514
  var _a = useState('Thông báo'), message = _a[0], setMessage = _a[1];
6514
6515
  var viewVisibleAnimatedRef = useRef(null);
6515
6516
  var _b = useSafeAreaInsets(), bottom = _b.bottom, top = _b.top;
@@ -6621,7 +6622,7 @@ var Toast = memoWithRef(function (_props, ref) {
6621
6622
  return 0;
6622
6623
  }
6623
6624
  };
6624
- return (React__default.createElement(ViewVisibleAnimated, { ref: viewVisibleAnimatedRef, autoShow: false, scaleEnable: true, style: [
6625
+ return (React__default.createElement(ViewVisibleAnimated, { testID: testID, ref: viewVisibleAnimatedRef, autoShow: false, scaleEnable: true, style: [
6625
6626
  styles$9.container,
6626
6627
  options.position === POSITION.BOTTOM && {
6627
6628
  bottom: bottom
@@ -6820,7 +6821,7 @@ var ProgressCircle = function (_a) {
6820
6821
  } }));
6821
6822
  };
6822
6823
  var Badge = React__default.memo(function (_a) {
6823
- var _b = _a.value, value = _b === void 0 ? '1' : _b, style = _a.style, textColor = _a.textColor, textStyle = _a.textStyle, _c = _a.type, type = _c === void 0 ? 'default' : _c, _d = _a.badgeSize, badgeSize = _d === void 0 ? 'large' : _d, _e = _a.mode, mode = _e === void 0 ? 'default' : _e, textSize = _a.textSize, borderColor = _a.borderColor, backgroundColor = _a.backgroundColor, _f = _a.progressType, progressType = _f === void 0 ? 'none' : _f, leftIcon = _a.leftIcon;
6824
+ var testID = _a.testID, _b = _a.value, value = _b === void 0 ? '1' : _b, style = _a.style, textColor = _a.textColor, textStyle = _a.textStyle, _c = _a.type, type = _c === void 0 ? 'default' : _c, _d = _a.badgeSize, badgeSize = _d === void 0 ? 'large' : _d, _e = _a.mode, mode = _e === void 0 ? 'default' : _e, textSize = _a.textSize, borderColor = _a.borderColor, backgroundColor = _a.backgroundColor, _f = _a.progressType, progressType = _f === void 0 ? 'none' : _f, leftIcon = _a.leftIcon;
6824
6825
  var theme = useInternalTheme();
6825
6826
  var colors = theme.colors;
6826
6827
  var sizeStyles = useMemo(function () {
@@ -6940,10 +6941,10 @@ var Badge = React__default.memo(function (_a) {
6940
6941
  return textSize || ((_a = BADGE_CONFIGS.sizes[badgeSize]) === null || _a === void 0 ? void 0 : _a.textSize) || 12;
6941
6942
  }, [textSize, badgeSize]);
6942
6943
  if (badgeSize === 'small') {
6943
- return (React__default.createElement(View, { row: true, style: style },
6944
+ return (React__default.createElement(View, { testID: testID, row: true, style: style },
6944
6945
  React__default.createElement(ProgressCircle, { progress: progressType, color: typeStyles.backgroundColor })));
6945
6946
  }
6946
- return (React__default.createElement(View, { row: true },
6947
+ return (React__default.createElement(View, { testID: testID, row: true },
6947
6948
  React__default.createElement(View, { row: true, center: true, borderRadius: 999, borderWidth: CONSTANTS.BORDER_WIDTH_1, style: [sizeStyles, typeStyles, style] },
6948
6949
  leftIcon && React__default.createElement(View, { paddingRight: CONSTANTS.SPACE_4 }, leftIcon),
6949
6950
  progressType !== 'none' && (React__default.createElement(ProgressCircle, { progress: progressType, color: getColorProgress.color })),
@@ -6954,13 +6955,13 @@ Badge.displayName = 'Badge';
6954
6955
  var styles$8 = StyleSheet.create(__assign({}, containerStyles));
6955
6956
 
6956
6957
  var CountingDot = function (_a) {
6957
- var children = _a.children, _b = _a.value, value = _b === void 0 ? "1" : _b, backgroundColor = _a.backgroundColor, style = _a.style, textColor = _a.textColor, textStyle = _a.textStyle;
6958
+ var testID = _a.testID, children = _a.children, _b = _a.value, value = _b === void 0 ? "1" : _b, backgroundColor = _a.backgroundColor, style = _a.style, textColor = _a.textColor, textStyle = _a.textStyle;
6958
6959
  var theme = useInternalTheme();
6959
6960
  var colors = theme.colors;
6960
6961
  if (children) {
6961
- return React__default.createElement(View, { style: style }, children);
6962
+ return React__default.createElement(View, { testID: testID, style: style }, children);
6962
6963
  }
6963
- return (React__default.createElement(View, { row: true },
6964
+ return (React__default.createElement(View, { testID: testID, row: true },
6964
6965
  React__default.createElement(View, { center: true, borderRadius: CONSTANTS.BORDER_RADIUS_12, backgroundColor: backgroundColor || colors.surfaceCriticalDefault, paddingHorizontal: CONSTANTS.SPACE_4, paddingVertical: CONSTANTS.SPACE_2, style: [styles$7.container, style] },
6965
6966
  React__default.createElement(Text$1, { size: 10, style: [styles$7.textMedium, textStyle], color: textColor || colors.textOnFillDefault }, value))));
6966
6967
  };
@@ -6970,7 +6971,7 @@ var styles$7 = StyleSheet.create(__assign(__assign({}, containerStyles), { conta
6970
6971
  } }));
6971
6972
 
6972
6973
  var ChipBar = function (_a) {
6973
- var style = _a.style, _b = _a.borderRadius, borderRadius = _b === void 0 ? CONSTANTS.BORDER_RADIUS_ROUNDED : _b, _c = _a.title, title = _c === void 0 ? "content" : _c, textStyle = _a.textStyle, onPress = _a.onPress, _d = _a.disabled, disabled = _d === void 0 ? false : _d, leftIcon = _a.leftIcon, rightIcon = _a.rightIcon, _e = _a.badge, badge = _e === void 0 ? 0 : _e, _f = _a.checked, checked = _f === void 0 ? false : _f, _g = _a.ellipsizeMode, ellipsizeMode = _g === void 0 ? "tail" : _g, _h = _a.numberOfLines, numberOfLines = _h === void 0 ? 1 : _h;
6974
+ var testID = _a.testID, style = _a.style, _b = _a.borderRadius, borderRadius = _b === void 0 ? CONSTANTS.BORDER_RADIUS_ROUNDED : _b, _c = _a.title, title = _c === void 0 ? "content" : _c, textStyle = _a.textStyle, onPress = _a.onPress, _d = _a.disabled, disabled = _d === void 0 ? false : _d, leftIcon = _a.leftIcon, rightIcon = _a.rightIcon, _e = _a.badge, badge = _e === void 0 ? 0 : _e, _f = _a.checked, checked = _f === void 0 ? false : _f, _g = _a.ellipsizeMode, ellipsizeMode = _g === void 0 ? "tail" : _g, _h = _a.numberOfLines, numberOfLines = _h === void 0 ? 1 : _h;
6974
6975
  var theme = useInternalTheme();
6975
6976
  var colors = theme.colors;
6976
6977
  var handlePressChipBar = function () {
@@ -6978,7 +6979,7 @@ var ChipBar = function (_a) {
6978
6979
  onPress === null || onPress === void 0 ? void 0 : onPress(!checked);
6979
6980
  }
6980
6981
  };
6981
- return (React__default.createElement(View, { row: true },
6982
+ return (React__default.createElement(View, { testID: testID, row: true },
6982
6983
  React__default.createElement(View, { row: true, disabled: disabled, paddingHorizontal: CONSTANTS.SPACE_12, paddingVertical: CONSTANTS.SPACE_8, borderRadius: borderRadius, borderWidth: 1, alignCenter: true, style: [
6983
6984
  disabled && {
6984
6985
  backgroundColor: colors.surfaceSecondaryDefault,
@@ -7023,7 +7024,7 @@ var useCheckboxColor = function (isActive, disabled) {
7023
7024
  }, [isActive, disabled, colors]);
7024
7025
  };
7025
7026
  var Checkbox = function (_a) {
7026
- var style = _a.style, _b = _a.content, content = _b === void 0 ? "content" : _b, textStyle = _a.textStyle, onPress = _a.onPress, _c = _a.disabled, disabled = _c === void 0 ? false : _c, leftIcon = _a.leftIcon, _d = _a.checked, checked = _d === void 0 ? false : _d, _e = _a.iconSize, iconSize = _e === void 0 ? 24 : _e;
7027
+ var testID = _a.testID, style = _a.style, _b = _a.content, content = _b === void 0 ? "content" : _b, textStyle = _a.textStyle, onPress = _a.onPress, _c = _a.disabled, disabled = _c === void 0 ? false : _c, leftIcon = _a.leftIcon, _d = _a.checked, checked = _d === void 0 ? false : _d, _e = _a.iconSize, iconSize = _e === void 0 ? 24 : _e;
7027
7028
  var theme = useInternalTheme();
7028
7029
  var colors = theme.colors;
7029
7030
  var _f = useState(checked), isActive = _f[0], setActive = _f[1];
@@ -7034,7 +7035,7 @@ var Checkbox = function (_a) {
7034
7035
  useEffect(function () {
7035
7036
  setActive(checked);
7036
7037
  }, [checked]);
7037
- return (React__default.createElement(View, { row: true, disabled: disabled, alignCenter: true, style: [style], onPress: handlePress },
7038
+ return (React__default.createElement(View, { testID: testID, row: true, disabled: disabled, alignCenter: true, style: [style], onPress: handlePress },
7038
7039
  leftIcon ? (React__default.createElement(View, { paddingRight: CONSTANTS.SPACE_8 }, leftIcon)) : (React__default.createElement(View, { paddingRight: CONSTANTS.SPACE_8 },
7039
7040
  React__default.createElement(SvgIcon, { name: isActive ? "IconCheckboxActive" : "IconCheckbox", width: iconSize, height: iconSize, color: checkboxColor }))),
7040
7041
  React__default.createElement(View, { full: true },
@@ -7052,7 +7053,7 @@ var styles$5 = StyleSheet.create(__assign(__assign({}, containerStyles), { icon:
7052
7053
  } }));
7053
7054
 
7054
7055
  var RadioButton = function (_a) {
7055
- var style = _a.style, _b = _a.content, content = _b === void 0 ? "content" : _b, textStyle = _a.textStyle, onPress = _a.onPress, _c = _a.disabled, disabled = _c === void 0 ? false : _c, leftIcon = _a.leftIcon, _d = _a.checked, checked = _d === void 0 ? false : _d;
7056
+ var testID = _a.testID, style = _a.style, _b = _a.content, content = _b === void 0 ? "content" : _b, textStyle = _a.textStyle, onPress = _a.onPress, _c = _a.disabled, disabled = _c === void 0 ? false : _c, leftIcon = _a.leftIcon, _d = _a.checked, checked = _d === void 0 ? false : _d;
7056
7057
  var theme = useInternalTheme();
7057
7058
  var colors = theme.colors;
7058
7059
  var handlePress = useCallback(function () {
@@ -7067,7 +7068,7 @@ var RadioButton = function (_a) {
7067
7068
  }
7068
7069
  return colors.surfacePrimaryDefault;
7069
7070
  }, [checked, disabled]);
7070
- return (React__default.createElement(View, { row: true, disabled: disabled, alignCenter: true, style: [style], onPress: handlePress },
7071
+ return (React__default.createElement(View, { testID: testID, row: true, disabled: disabled, alignCenter: true, style: [style], onPress: handlePress },
7071
7072
  leftIcon ? (React__default.createElement(View, { paddingRight: CONSTANTS.SPACE_8 }, leftIcon)) : (React__default.createElement(View, { paddingRight: CONSTANTS.SPACE_8 },
7072
7073
  React__default.createElement(SvgIcon, { name: checked ? "IconRadioActive" : "IconRadio", width: 24, height: 24, color: getColorCheckbox }))),
7073
7074
  React__default.createElement(View, { full: true },
@@ -7085,7 +7086,7 @@ var styles$4 = StyleSheet.create(__assign(__assign({}, containerStyles), { icon:
7085
7086
  } }));
7086
7087
 
7087
7088
  var Avatar = function (_a) {
7088
- var children = _a.children, _b = _a.name, name = _b === void 0 ? "N A" : _b, backgroundColor = _a.backgroundColor, style = _a.style, textColor = _a.textColor, _c = _a.size, size = _c === void 0 ? 32 : _c, source = _a.source, onPress = _a.onPress, textStyle = _a.textStyle, imageStyle = _a.imageStyle;
7089
+ var testID = _a.testID, children = _a.children, _b = _a.name, name = _b === void 0 ? "N A" : _b, backgroundColor = _a.backgroundColor, style = _a.style, textColor = _a.textColor, _c = _a.size, size = _c === void 0 ? 32 : _c, source = _a.source, onPress = _a.onPress, textStyle = _a.textStyle, imageStyle = _a.imageStyle;
7089
7090
  var theme = useInternalTheme();
7090
7091
  var colors = theme.colors;
7091
7092
  var getInitials = function (name) {
@@ -7096,7 +7097,7 @@ var Avatar = function (_a) {
7096
7097
  return (words[0][0] + words[words.length - 1][0]).toUpperCase();
7097
7098
  };
7098
7099
  if (children) {
7099
- return React__default.createElement(View, { style: style }, children);
7100
+ return React__default.createElement(View, { testID: testID, style: style }, children);
7100
7101
  }
7101
7102
  var getSize = function (size) {
7102
7103
  switch (size) {
@@ -7122,7 +7123,7 @@ var Avatar = function (_a) {
7122
7123
  return 24;
7123
7124
  }
7124
7125
  };
7125
- return (React__default.createElement(View, { onPress: onPress, width: size, height: size, borderRadius: size / 2, center: true, backgroundColor: backgroundColor || colors.surfaceSecondaryDefault, style: [styles$3.container, style] }, source ? (React__default.createElement(Image$1, { resizeMode: "cover", source: source, style: [{ width: size, height: size }, imageStyle] })) : (React__default.createElement(Text$1, { size: getSize(size), lineHeight: getLineHeight(size), color: textColor || colors.textSecondary, style: textStyle || { fontWeight: "500" } }, getInitials(name)))));
7126
+ return (React__default.createElement(View, { testID: testID, onPress: onPress, width: size, height: size, borderRadius: size / 2, center: true, backgroundColor: backgroundColor || colors.surfaceSecondaryDefault, style: [styles$3.container, style] }, source ? (React__default.createElement(Image$1, { resizeMode: "cover", source: source, style: [{ width: size, height: size }, imageStyle] })) : (React__default.createElement(Text$1, { size: getSize(size), lineHeight: getLineHeight(size), color: textColor || colors.textSecondary, style: textStyle || { fontWeight: "500" } }, getInitials(name)))));
7126
7127
  };
7127
7128
  var styles$3 = StyleSheet.create({
7128
7129
  container: {
@@ -7131,7 +7132,7 @@ var styles$3 = StyleSheet.create({
7131
7132
  });
7132
7133
 
7133
7134
  var SelectionField = function (_a) {
7134
- var style = _a.style, _b = _a.content, content = _b === void 0 ? '' : _b, _c = _a.label, label = _c === void 0 ? '' : _c, _d = _a.error, error = _d === void 0 ? '' : _d, borderColor = _a.borderColor; _a.left; var right = _a.right, textStyle = _a.textStyle, labelStyle = _a.labelStyle, textProps = _a.textProps, onPress = _a.onPress, _e = _a.disabled, disabled = _e === void 0 ? false : _e, textColor = _a.textColor, labelColor = _a.labelColor; _a.theme; var _f = _a.required, required = _f === void 0 ? false : _f, _g = _a.height, height = _g === void 0 ? 48 : _g, props = __rest(_a, ["style", "content", "label", "error", "borderColor", "left", "right", "textStyle", "labelStyle", "textProps", "onPress", "disabled", "textColor", "labelColor", "theme", "required", "height"]);
7135
+ var style = _a.style, _b = _a.content, content = _b === void 0 ? '' : _b, _c = _a.label, label = _c === void 0 ? '' : _c, _d = _a.error, error = _d === void 0 ? '' : _d, borderColor = _a.borderColor; _a.left; var right = _a.right, textStyle = _a.textStyle, labelStyle = _a.labelStyle, textProps = _a.textProps, onPress = _a.onPress, _e = _a.disabled, disabled = _e === void 0 ? false : _e, textColor = _a.textColor, labelColor = _a.labelColor; _a.theme; var _f = _a.required, required = _f === void 0 ? false : _f, _g = _a.height, height = _g === void 0 ? 48 : _g, testID = _a.testID, props = __rest(_a, ["style", "content", "label", "error", "borderColor", "left", "right", "textStyle", "labelStyle", "textProps", "onPress", "disabled", "textColor", "labelColor", "theme", "required", "height", "testID"]);
7135
7136
  var theme = useInternalTheme();
7136
7137
  var colors = theme.colors;
7137
7138
  var disabledTextStyle = {
@@ -7147,7 +7148,7 @@ var SelectionField = function (_a) {
7147
7148
  }
7148
7149
  return textColor || colors.textDefault;
7149
7150
  };
7150
- return (React__default.createElement(View, null,
7151
+ return (React__default.createElement(View, { testID: testID },
7151
7152
  React__default.createElement(ScaleButton$1, __assign({ activeOpacity: 0.8, onPress: onPress }, props, { disabled: disabled || false }),
7152
7153
  React__default.createElement(View, { style: [
7153
7154
  styles$2.container,
@@ -7212,13 +7213,13 @@ var styles$2 = StyleSheet.create(__assign(__assign({}, containerStyles), { disab
7212
7213
  var index$1 = React__default.memo(SelectionField);
7213
7214
 
7214
7215
  var SearchInput = function (_a) {
7215
- var _b = _a.value, value = _b === void 0 ? "" : _b, _c = _a.disabled, disabled = _c === void 0 ? false : _c, rightIcon = _a.rightIcon, _d = _a.clearButton, clearButton = _d === void 0 ? false : _d, _e = _a.placeholder, placeholder = _e === void 0 ? "Tìm kiếm" : _e, onFocus = _a.onFocus, onBlur = _a.onBlur, onChangeText = _a.onChangeText, style = _a.style, height = _a.height, _f = _a.debounceTime, debounceTime = _f === void 0 ? 500 : _f, _g = _a.autoFocus, autoFocus = _g === void 0 ? false : _g, textStyle = _a.textStyle, ref = _a.ref;
7216
+ var _b = _a.value, value = _b === void 0 ? "" : _b, _c = _a.disabled, disabled = _c === void 0 ? false : _c, rightIcon = _a.rightIcon, _d = _a.clearButton, clearButton = _d === void 0 ? false : _d, _e = _a.placeholder, placeholder = _e === void 0 ? "Tìm kiếm" : _e, onFocus = _a.onFocus, onBlur = _a.onBlur, onChangeText = _a.onChangeText, style = _a.style, height = _a.height, _f = _a.debounceTime, debounceTime = _f === void 0 ? 500 : _f, _g = _a.autoFocus, autoFocus = _g === void 0 ? false : _g, textStyle = _a.textStyle, ref = _a.ref, testID = _a.testID;
7216
7217
  var theme = useInternalTheme();
7217
7218
  var colors = theme.colors;
7218
7219
  var debouncedOnChangeText = useDebouncedCallback(function (text) {
7219
7220
  onChangeText === null || onChangeText === void 0 ? void 0 : onChangeText(text);
7220
7221
  }, debounceTime);
7221
- return (React__default.createElement(TextInput, { left: React__default.createElement(View, null,
7222
+ return (React__default.createElement(TextInput, { testID: testID, left: React__default.createElement(View, null,
7222
7223
  React__default.createElement(SvgIcon, { name: "IconSearch", width: 24, height: 24 })), ref: ref, disabled: disabled, value: value, clearButton: clearButton, mode: "default", numberOfLines: 1, textBreakStrategy: "simple", multiline: false, placeholder: placeholder, placeholderTextColor: colors.textPlaceholder, right: rightIcon, onFocus: onFocus, autoFocus: autoFocus, onBlur: onBlur, allowFontScaling: false, onChangeText: debouncedOnChangeText, style: [
7223
7224
  {
7224
7225
  height: height || 36,
@@ -7236,13 +7237,13 @@ var SearchInput = function (_a) {
7236
7237
  };
7237
7238
 
7238
7239
  var Tag = function (_a) {
7239
- var style = _a.style, _b = _a.borderRadius, borderRadius = _b === void 0 ? CONSTANTS.BORDER_RADIUS_ROUNDED : _b, _c = _a.title, title = _c === void 0 ? "content" : _c, textStyle = _a.textStyle, onPress = _a.onPress, _d = _a.disabled, disabled = _d === void 0 ? false : _d, leftIcon = _a.leftIcon, rightIcon = _a.rightIcon, _e = _a.checked, checked = _e === void 0 ? false : _e, _f = _a.ellipsizeMode, ellipsizeMode = _f === void 0 ? "tail" : _f, _g = _a.numberOfLines, numberOfLines = _g === void 0 ? 1 : _g, _h = _a.hideRightIcon, hideRightIcon = _h === void 0 ? false : _h, _j = _a.height, height = _j === void 0 ? 32 : _j;
7240
+ var style = _a.style, _b = _a.borderRadius, borderRadius = _b === void 0 ? CONSTANTS.BORDER_RADIUS_ROUNDED : _b, _c = _a.title, title = _c === void 0 ? "content" : _c, textStyle = _a.textStyle, onPress = _a.onPress, _d = _a.disabled, disabled = _d === void 0 ? false : _d, leftIcon = _a.leftIcon, rightIcon = _a.rightIcon, _e = _a.checked, checked = _e === void 0 ? false : _e, _f = _a.ellipsizeMode, ellipsizeMode = _f === void 0 ? "tail" : _f, _g = _a.numberOfLines, numberOfLines = _g === void 0 ? 1 : _g, _h = _a.hideRightIcon, hideRightIcon = _h === void 0 ? false : _h, _j = _a.height, height = _j === void 0 ? 32 : _j, testID = _a.testID;
7240
7241
  var theme = useInternalTheme();
7241
7242
  var colors = theme.colors;
7242
7243
  var handlePressTag = useCallback(function () {
7243
7244
  onPress === null || onPress === void 0 ? void 0 : onPress(!checked);
7244
7245
  }, [checked]);
7245
- return (React__default.createElement(View, { row: true, height: height, disabled: disabled, paddingHorizontal: CONSTANTS.SPACE_12, paddingVertical: CONSTANTS.SPACE_8, borderRadius: borderRadius, center: true, style: [
7246
+ return (React__default.createElement(View, { testID: testID, row: true, height: height, disabled: disabled, paddingHorizontal: CONSTANTS.SPACE_12, paddingVertical: CONSTANTS.SPACE_8, borderRadius: borderRadius, center: true, style: [
7246
7247
  disabled && {
7247
7248
  backgroundColor: colors.surfaceSecondaryDefault,
7248
7249
  borderColor: colors.surfaceSecondaryDefault,