@lookiero/checkout 3.6.0-beta.13 → 3.6.0-beta.15

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.
@@ -9,6 +9,6 @@ const ButtonCheckoutQuestionItem = ({ checkoutQuestion, checkoutQuestionParentId
9
9
  const { feedback, onChange } = useCheckoutQuestionFeedbackForId({ id: checkoutQuestionParentId });
10
10
  const optionText = useI18nMessage({ id: checkoutQuestion.name });
11
11
  const handleOnPress = useCallback(() => onChange({ checkoutQuestionId: checkoutQuestionParentId, checkoutQuestionFeedback: checkoutQuestion.id }), [onChange, checkoutQuestion.id, checkoutQuestionParentId]);
12
- return (React.createElement(Button, { style: [style.button, { backgroundColor: feedback === checkoutQuestion.id ? colorAccent : colorBase }], testID: testID, variant: BUTTON_VARIANT.SECONDARY, onPress: handleOnPress }, optionText));
12
+ return (React.createElement(Button, { accessibilityLabel: testID, style: [style.button, { backgroundColor: feedback === checkoutQuestion.id ? colorAccent : colorBase }], testID: testID, variant: BUTTON_VARIANT.SECONDARY, onPress: handleOnPress }, optionText));
13
13
  };
14
14
  export { ButtonCheckoutQuestionItem };
@@ -21,7 +21,7 @@ const IconCheckoutQuestionItem = ({ checkoutQuestion, checkoutQuestionParentId,
21
21
  const { feedback, onChange } = useCheckoutQuestionFeedbackForId({ id: checkoutQuestionParentId });
22
22
  const handleOnPress = useCallback(() => onChange({ checkoutQuestionId: checkoutQuestionParentId, checkoutQuestionFeedback: checkoutQuestion.id }), [onChange, checkoutQuestion.id, checkoutQuestionParentId]);
23
23
  invariant(Icon, "CheckoutQuestion icon does not exist");
24
- return (React.createElement(Pressable, { testID: testID, onPress: handleOnPress },
24
+ return (React.createElement(Pressable, { accessibilityLabel: testID, testID: testID, onPress: handleOnPress },
25
25
  React.createElement(Icon, { fill: feedback === checkoutQuestion.id ? colorAccent : "none", style: style.icon })));
26
26
  };
27
27
  export { IconCheckoutQuestionItem };
@@ -31,7 +31,7 @@ const HostSelectReturnQuestionItem = ({ returnQuestion, children, portalHostName
31
31
  // deepestReturnQuestionWithFeedback needs to be as a dependency in order to be re-evaluated whenever it changes
32
32
  }, [handleOnModalClose, deepestReturnQuestionWithFeedback, isLeaf]);
33
33
  return (React.createElement(React.Fragment, null,
34
- React.createElement(TouchableHighlight, { style: style.container, testID: testID, underlayColor: containerUnderlayColor, onPress: handleOnPress },
34
+ React.createElement(TouchableHighlight, { accessibilityLabel: testID, style: style.container, testID: testID, underlayColor: containerUnderlayColor, accessible: true, onPress: handleOnPress },
35
35
  React.createElement(View, { pointerEvents: "none" },
36
36
  React.createElement(InputField, { editable: false, icon: "arrow-down", label: placeholderText, value: inputValue }))),
37
37
  React.createElement(Modal, { portalHostName: portalHostName, visible: modalVisible, header: deepestReturnQuestionWithFeedback && (React.createElement(ButtonIcon, { name: "arrow-left", testID: "modal-back-button", onPress: handleOnBackButtonPress })), scroll: true, showCloseButton: true, onClose: handleOnModalClose },
@@ -8,7 +8,7 @@ const OptionReturnQuestionItem = ({ returnQuestion, returnQuestionParentId, test
8
8
  const { onChange } = useReturnQuestionFeedbackForId({ id: returnQuestionParentId });
9
9
  const optionText = useI18nMessage({ id: returnQuestion.name });
10
10
  const handleOnPress = useCallback(() => onChange({ returnQuestionId: returnQuestionParentId, returnQuestionFeedback: returnQuestion.id }), [onChange, returnQuestion.id, returnQuestionParentId]);
11
- return (React.createElement(TouchableHighlight, { style: style.container, testID: testID, underlayColor: containerUnderlayColor, onPress: handleOnPress },
11
+ return (React.createElement(TouchableHighlight, { accessibilityLabel: testID, style: style.container, testID: testID, underlayColor: containerUnderlayColor, onPress: handleOnPress },
12
12
  React.createElement(Text, { level: 3, style: style.text }, optionText)));
13
13
  };
14
14
  export { OptionReturnQuestionItem };
@@ -6,7 +6,7 @@ const MIN_HEIGHT = 56;
6
6
  const MAX_HEIGHT = 242; // 10 lines
7
7
  const { colorGrayscaleL } = theme();
8
8
  const clamp = (min, max, value) => Math.min(Math.max(min, value), max);
9
- const Input = ({ minHeight = MIN_HEIGHT, maxHeight = MAX_HEIGHT, style: customStyle, placeholderTextColor = colorGrayscaleL, onChange, onContentSizeChange, value, multiline, ...restOfProps }) => {
9
+ const Input = ({ minHeight = MIN_HEIGHT, maxHeight = MAX_HEIGHT, style: customStyle, placeholderTextColor = colorGrayscaleL, onChange, onContentSizeChange, value, multiline, testID = "input", ...restOfProps }) => {
10
10
  const [height, setHeight] = useState(minHeight);
11
11
  // When content height has became smaller the onContentSizeChange does in fact triggered but the internal height is incorrect.
12
12
  const handleOnContentSizeChange = useCallback((event) => {
@@ -32,6 +32,6 @@ const Input = ({ minHeight = MIN_HEIGHT, maxHeight = MAX_HEIGHT, style: customSt
32
32
  }, [maxHeight, minHeight, multiline]);
33
33
  useLayoutEffect(handleOnContentSizeChangeWeb, [handleOnContentSizeChangeWeb, value]);
34
34
  const textInputRef = useRef(null);
35
- return (React.createElement(TextInput, { ref: textInputRef, multiline: multiline, numberOfLines: !!multiline ? undefined : 1, placeholderTextColor: placeholderTextColor, style: [style.input, customStyle, { height }], testID: "input", textAlignVertical: "top", value: value, onChange: onChange, onContentSizeChange: handleOnContentSizeChange, ...restOfProps }));
35
+ return (React.createElement(TextInput, { ref: textInputRef, accessibilityLabel: testID, multiline: multiline, numberOfLines: !!multiline ? undefined : 1, placeholderTextColor: placeholderTextColor, style: [style.input, customStyle, { height }], testID: testID, textAlignVertical: "top", value: value, accessible: true, onChange: onChange, onContentSizeChange: handleOnContentSizeChange, ...restOfProps }));
36
36
  };
37
37
  export { Input };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lookiero/checkout",
3
- "version": "3.6.0-beta.13",
3
+ "version": "3.6.0-beta.15",
4
4
  "main": "dist/index.js",
5
5
  "types": "dist/index.d.ts",
6
6
  "files": [