react-native-ui-lib 8.4.3-snapshot.7923 → 8.4.3-snapshot.7930

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.4.3-snapshot.7923",
3
+ "version": "8.4.3-snapshot.7930",
4
4
  "main": "src/index.js",
5
5
  "types": "src/index.d.ts",
6
6
  "author": "Ethan Sharabi <ethan.shar@gmail.com>",
@@ -130,11 +130,10 @@ class Badge extends PureComponent {
130
130
  renderLabel() {
131
131
  const {
132
132
  labelStyle,
133
- label,
134
- testID
133
+ label
135
134
  } = this.props;
136
135
  if (label) {
137
- return <Text style={[this.styles.label, this.isSmallBadge() && this.styles.labelSmall, labelStyle]} allowFontScaling={false} numberOfLines={1} testID={testID ? `${testID}.label` : 'badge'} recorderTag={'unmask'}>
136
+ return <Text style={[this.styles.label, this.isSmallBadge() && this.styles.labelSmall, labelStyle]} allowFontScaling={false} numberOfLines={1} testID="badge" recorderTag={'unmask'}>
138
137
  {this.getFormattedLabel()}
139
138
  </Text>;
140
139
  }
@@ -151,13 +150,12 @@ class Badge extends PureComponent {
151
150
  iconStyle,
152
151
  iconProps,
153
152
  borderColor,
154
- label,
155
- testID
153
+ label
156
154
  } = this.props;
157
155
  const flex = label ? 0 : 1;
158
156
  return icon && <Image source={icon} resizeMode="contain" tintColor={Colors.$iconDefaultLight}
159
157
  //@ts-ignore
160
- borderColor={borderColor} testID={testID ? `${testID}.icon` : undefined} {...iconProps} style={{
158
+ borderColor={borderColor} {...iconProps} style={{
161
159
  flex,
162
160
  ...iconStyle
163
161
  }} />;
@@ -29,6 +29,7 @@ const ScreenFooter = props => {
29
29
  shadow = ScreenFooterShadow.SH20,
30
30
  hideDivider = false,
31
31
  isAndroidEdgeToEdge = !!androidVersion && androidVersion >= 35 ? true : undefined,
32
+ containerStyle: containerStyleOverride,
32
33
  contentContainerStyle: contentContainerStyleOverride
33
34
  } = props;
34
35
  const withoutAnimation = animationDuration === 0;
@@ -186,15 +187,15 @@ const ScreenFooter = props => {
186
187
  return withoutAnimation ? View : Animated.View;
187
188
  }, [withoutAnimation]);
188
189
  const containerStyle = useMemo(() => {
189
- return withoutAnimation ? styles.container : [styles.container, hoistedAnimatedStyle];
190
+ return withoutAnimation ? [styles.container, containerStyleOverride] : [styles.container, hoistedAnimatedStyle, containerStyleOverride];
190
191
  // eslint-disable-next-line react-hooks/exhaustive-deps
191
- }, [withoutAnimation]);
192
+ }, [withoutAnimation, containerStyleOverride]);
192
193
  if (keyboardBehavior === KeyboardBehavior.HOISTED) {
193
194
  return <Container style={containerStyle} pointerEvents={visible ? 'box-none' : 'none'}>
194
195
  <Keyboard.KeyboardAccessoryView renderContent={renderFooterContent} kbInputRef={undefined} scrollBehavior={Keyboard.KeyboardAccessoryView.scrollBehaviors.FIXED_OFFSET} useSafeArea={false} manageScrollView={false} revealKeyboardInteractive onHeightChanged={setHeight} />
195
196
  </Container>;
196
197
  }
197
- return <Animated.View testID={testID} onLayout={onLayout} style={[styles.container, stickyAnimatedStyle]}>
198
+ return <Animated.View testID={testID} onLayout={onLayout} style={[styles.container, stickyAnimatedStyle, containerStyleOverride]}>
198
199
  {renderFooterContent()}
199
200
  </Animated.View>;
200
201
  };
@@ -204,7 +205,8 @@ const styles = StyleSheet.create({
204
205
  position: 'absolute',
205
206
  bottom: 0,
206
207
  left: 0,
207
- right: 0
208
+ right: 0,
209
+ zIndex: 50
208
210
  },
209
211
  contentContainer: {
210
212
  paddingTop: Spacings.s4,
@@ -97,6 +97,11 @@ export interface ScreenFooterProps extends PropsWithChildren<{}> {
97
97
  * Only applies when backgroundType is 'solid'
98
98
  */
99
99
  hideDivider?: boolean;
100
+ /**
101
+ * Custom style for the outer container of the footer.
102
+ * Can be used to override zIndex or other container-level properties.
103
+ */
104
+ containerStyle?: StyleProp<ViewStyle>;
100
105
  /**
101
106
  * Custom style for the content container that wraps the footer's children.
102
107
  * Can be used to override default padding, gap, or other layout properties.
@@ -23,4 +23,3 @@ export { ToastDriver } from '../incubator/toast/Toast.driver.new';
23
23
  export { DateTimePickerDriver } from '../components/dateTimePicker/DateTimePicker.driver';
24
24
  export { TimelineDriver } from '../components/timeline/timeline.driver';
25
25
  export { ChipDriver } from '../components/chip/chip.driver';
26
- export { BadgeDriver } from '../components/badge/badge.driver';
@@ -22,5 +22,4 @@ export { ExpandableOverlayDriver } from "../incubator/expandableOverlay/Expandab
22
22
  export { ToastDriver } from "../incubator/toast/Toast.driver.new";
23
23
  export { DateTimePickerDriver } from "../components/dateTimePicker/DateTimePicker.driver";
24
24
  export { TimelineDriver } from "../components/timeline/timeline.driver";
25
- export { ChipDriver } from "../components/chip/chip.driver";
26
- export { BadgeDriver } from "../components/badge/badge.driver";
25
+ export { ChipDriver } from "../components/chip/chip.driver";
@@ -1,37 +0,0 @@
1
- import { ComponentProps } from '../../testkit/new/Component.driver';
2
- export declare const BadgeDriver: (props: ComponentProps) => {
3
- getLabel: () => {
4
- getText: () => string | (string | import("react-test-renderer").ReactTestInstance)[];
5
- getStyle: () => import("react-native").TextStyle;
6
- press: () => void;
7
- hasOnPress: () => boolean;
8
- onPressIn: () => void;
9
- hasOnPressIn: () => boolean;
10
- onPressOut: () => void;
11
- hasOnPressOut: () => boolean;
12
- onLongPress: () => void;
13
- hasOnLongPress: () => boolean;
14
- getElement: () => import("react-test-renderer").ReactTestInstance;
15
- queryElement: () => import("react-test-renderer").ReactTestInstance | undefined;
16
- exists: () => boolean;
17
- };
18
- getIcon: () => {
19
- exists: () => boolean;
20
- getStyle: () => any;
21
- getElement: () => import("react-test-renderer").ReactTestInstance;
22
- queryElement: () => import("react-test-renderer").ReactTestInstance | undefined;
23
- };
24
- getStyle: () => any;
25
- getSize: () => number;
26
- press: () => void;
27
- hasOnPress: () => boolean;
28
- onPressIn: () => void;
29
- hasOnPressIn: () => boolean;
30
- onPressOut: () => void;
31
- hasOnPressOut: () => boolean;
32
- onLongPress: () => void;
33
- hasOnLongPress: () => boolean;
34
- getElement: () => import("react-test-renderer").ReactTestInstance;
35
- queryElement: () => import("react-test-renderer").ReactTestInstance | undefined;
36
- exists: () => boolean;
37
- };
@@ -1,47 +0,0 @@
1
- import { StyleSheet } from 'react-native';
2
- import { useComponentDriver } from "../../testkit/new/Component.driver";
3
- import { usePressableDriver } from "../../testkit/new/usePressable.driver";
4
- import { TextDriver } from "../text/Text.driver.new";
5
- import { ImageDriver } from "../image/Image.driver.new";
6
- export const BadgeDriver = props => {
7
- const driver = usePressableDriver(useComponentDriver(props));
8
- const labelDriver = TextDriver({
9
- renderTree: props.renderTree,
10
- testID: `${props.testID}.label`
11
- });
12
- const iconDriver = ImageDriver({
13
- renderTree: props.renderTree,
14
- testID: `${props.testID}.icon`
15
- });
16
- const getLabel = () => {
17
- return {
18
- ...labelDriver
19
- };
20
- };
21
- const getIcon = () => {
22
- const exists = () => {
23
- return iconDriver.exists();
24
- };
25
- const getStyle = () => {
26
- return StyleSheet.flatten(iconDriver.getElement().props.style);
27
- };
28
- return {
29
- ...iconDriver,
30
- exists,
31
- getStyle
32
- };
33
- };
34
- const getStyle = () => {
35
- return StyleSheet.flatten(driver.getElement().props.style);
36
- };
37
- const getSize = () => {
38
- return getStyle().height;
39
- };
40
- return {
41
- ...driver,
42
- getLabel,
43
- getIcon,
44
- getStyle,
45
- getSize
46
- };
47
- };