react-native-ui-lib 8.2.2-snapshot.7711 → 8.3.0-snapshot.7724

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "react-native-ui-lib",
3
- "version": "8.2.2-snapshot.7711",
3
+ "version": "8.3.0-snapshot.7724",
4
4
  "main": "src/index.js",
5
5
  "types": "src/index.d.ts",
6
6
  "author": "Ethan Sharabi <ethan.shar@gmail.com>",
@@ -33,15 +33,11 @@ const ExpandableOverlay = (props, ref) => {
33
33
  setExpandableVisible(true);
34
34
  onPress?.(props);
35
35
  }, [onPress, customValue]);
36
- const dismissOverlay = useCallback(() => {
36
+ const closeExpandable = useCallback(() => {
37
37
  setExpandableVisible(false);
38
38
  focusAccessibility();
39
- }, [focusAccessibility]);
40
- const closeExpandable = useCallback(() => {
41
- dismissOverlay();
42
39
  useDialog ? dialogProps?.onDismiss?.() : modalProps?.onDismiss?.();
43
- // eslint-disable-next-line react-hooks/exhaustive-deps
44
- }, [dismissOverlay, dialogProps?.onDismiss, modalProps?.onDismiss]);
40
+ }, [useDialog, dialogProps?.onDismiss, modalProps?.onDismiss, focusAccessibility]);
45
41
  const toggleExpandable = useCallback(() => visible ? closeExpandable() : openExpandable(), [visible, openExpandable, closeExpandable]);
46
42
  useImperativeHandle(ref, () => ({
47
43
  openExpandable,
@@ -49,7 +45,7 @@ const ExpandableOverlay = (props, ref) => {
49
45
  toggleExpandable
50
46
  }));
51
47
  const renderModal = () => {
52
- return <Modal testID={`${testID}.overlay`} overlayBackgroundColor={Colors.$backgroundDefault} {...modalProps} visible={visible} onDismiss={dismissOverlay} onRequestClose={closeExpandable} onBackgroundPress={closeExpandable}>
48
+ return <Modal testID={`${testID}.overlay`} overlayBackgroundColor={Colors.$backgroundDefault} {...modalProps} visible={visible} onDismiss={closeExpandable} onRequestClose={closeExpandable} onBackgroundPress={closeExpandable}>
53
49
  {showTopBar && <Modal.TopBar onDone={closeExpandable} {...topBarProps} />}
54
50
  {expandableContent}
55
51
  </Modal>;