react-native-ui-lib 7.39.0-snapshot.6543 → 7.39.0-snapshot.6550

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": "7.39.0-snapshot.6543",
3
+ "version": "7.39.0-snapshot.6550",
4
4
  "main": "src/index.js",
5
5
  "types": "src/index.d.ts",
6
6
  "author": "Ethan Sharabi <ethan.shar@gmail.com>",
@@ -1,5 +1,5 @@
1
1
  import React, { PropsWithChildren } from 'react';
2
- import { StyleProp, ViewStyle, ImagePropsBase, ImageStyle, TextStyle, AccessibilityProps } from 'react-native';
2
+ import { StyleProp, ViewStyle, ImagePropsBase, ImageStyle, TextStyle, TextProps, AccessibilityProps } from 'react-native';
3
3
  import { BadgeProps } from '../badge';
4
4
  import { ImageProps } from '../image';
5
5
  import { AnimatedImageProps } from '../animatedImage';
@@ -95,6 +95,7 @@ export type AvatarProps = Pick<AccessibilityProps, 'accessibilityLabel'> & Props
95
95
  * The label color
96
96
  */
97
97
  labelColor?: string;
98
+ labelEllipsizeMode?: TextProps['ellipsizeMode'];
98
99
  /**
99
100
  * ribbon label to display on the avatar
100
101
  */
@@ -162,21 +163,14 @@ declare const Avatar: React.ForwardRefExoticComponent<Pick<AccessibilityProps, "
162
163
  * Image props object
163
164
  */
164
165
  imageProps?: Partial<Omit<import("react-native").ImageProps, "source"> & Pick<import("react-native").ImageBackgroundProps, "imageStyle"> & Partial<Record<"margin" | "marginL" | "marginT" | "marginR" | "marginB" | "marginH" | "marginV", boolean>> & import("../..").RecorderProps & {
165
- /**
166
- * Avatar colors to be used when useAutoColors is true
167
- */
168
166
  sourceTransformer?: ((props: any) => import("../image").ImageSourceType) | undefined;
169
167
  assetName?: string | undefined;
170
168
  assetGroup?: string | undefined;
171
169
  tintColor?: string | undefined;
172
- supportRTL?: boolean | undefined; /**
173
- * Background color for Avatar
174
- */
170
+ supportRTL?: boolean | undefined;
175
171
  cover?: boolean | undefined;
176
172
  aspectRatio?: number | undefined;
177
- overlayType?: string | undefined; /**
178
- * Image props object
179
- */
173
+ overlayType?: string | undefined;
180
174
  overlayIntensity?: import("../overlay").OverlayIntensityType | undefined;
181
175
  overlayColor?: string | undefined;
182
176
  customOverlayContent?: React.ReactElement<any, string | React.JSXElementConstructor<any>> | React.ReactElement<any, string | React.JSXElementConstructor<any>>[] | undefined;
@@ -230,6 +224,7 @@ declare const Avatar: React.ForwardRefExoticComponent<Pick<AccessibilityProps, "
230
224
  * The label color
231
225
  */
232
226
  labelColor?: string | undefined;
227
+ labelEllipsizeMode?: TextProps['ellipsizeMode'];
233
228
  /**
234
229
  * ribbon label to display on the avatar
235
230
  */
@@ -291,21 +286,14 @@ declare const _default: React.ForwardRefExoticComponent<Pick<AccessibilityProps,
291
286
  * Image props object
292
287
  */
293
288
  imageProps?: Partial<Omit<import("react-native").ImageProps, "source"> & Pick<import("react-native").ImageBackgroundProps, "imageStyle"> & Partial<Record<"margin" | "marginL" | "marginT" | "marginR" | "marginB" | "marginH" | "marginV", boolean>> & import("../..").RecorderProps & {
294
- /**
295
- * Avatar colors to be used when useAutoColors is true
296
- */
297
289
  sourceTransformer?: ((props: any) => import("../image").ImageSourceType) | undefined;
298
290
  assetName?: string | undefined;
299
291
  assetGroup?: string | undefined;
300
292
  tintColor?: string | undefined;
301
- supportRTL?: boolean | undefined; /**
302
- * Background color for Avatar
303
- */
293
+ supportRTL?: boolean | undefined;
304
294
  cover?: boolean | undefined;
305
295
  aspectRatio?: number | undefined;
306
- overlayType?: string | undefined; /**
307
- * Image props object
308
- */
296
+ overlayType?: string | undefined;
309
297
  overlayIntensity?: import("../overlay").OverlayIntensityType | undefined;
310
298
  overlayColor?: string | undefined;
311
299
  customOverlayContent?: React.ReactElement<any, string | React.JSXElementConstructor<any>> | React.ReactElement<any, string | React.JSXElementConstructor<any>>[] | undefined;
@@ -359,6 +347,7 @@ declare const _default: React.ForwardRefExoticComponent<Pick<AccessibilityProps,
359
347
  * The label color
360
348
  */
361
349
  labelColor?: string | undefined;
350
+ labelEllipsizeMode?: "middle" | "head" | "tail" | "clip" | undefined;
362
351
  /**
363
352
  * ribbon label to display on the avatar
364
353
  */
@@ -56,6 +56,7 @@ const Avatar = forwardRef((props, ref) => {
56
56
  useAutoColors,
57
57
  autoColorsConfig,
58
58
  containerStyle,
59
+ labelEllipsizeMode = 'clip',
59
60
  onPress,
60
61
  children
61
62
  } = themeProps;
@@ -178,7 +179,7 @@ const Avatar = forwardRef((props, ref) => {
178
179
  const Container = onPress ? TouchableOpacity : View;
179
180
  return <Container style={_containerStyle} ref={ref} testID={testID} onPress={onPress} accessible={!_isUndefined(onPress)} accessibilityLabel={'Avatar'} accessibilityRole={onPress ? 'button' : 'image'} hitSlop={onPress ? hitTargetPadding : undefined} {...accessibilityProps}>
180
181
  <View testID={`${testID}.container`} style={textContainerStyle}>
181
- {!_isUndefined(text) && <Text numberOfLines={1} style={textStyle} testID={`${testID}.label`}>
182
+ {!_isUndefined(text) && <Text numberOfLines={1} ellipsizeMode={labelEllipsizeMode} style={textStyle} testID={`${testID}.label`}>
182
183
  {text}
183
184
  </Text>}
184
185
  </View>
@@ -194,7 +195,8 @@ const styles = StyleSheet.create({
194
195
  ...StyleSheet.absoluteFillObject,
195
196
  alignItems: 'center',
196
197
  justifyContent: 'center',
197
- borderRadius: BorderRadiuses.br100
198
+ borderRadius: BorderRadiuses.br100,
199
+ overflow: 'hidden'
198
200
  },
199
201
  initialsContainerWithInset: {
200
202
  top: 1,
@@ -102,21 +102,53 @@
102
102
  "title": "Generic",
103
103
  "content": [
104
104
  {
105
+ "component": "Incubator.Toast",
105
106
  "props": {
106
107
  "visible": true,
107
- "message": "Mika Or was saved to contacts."
108
+ "message": "Mika Or was saved to contacts.",
109
+ "preset": "general"
108
110
  }
109
111
  }
110
112
  ]
111
113
  },
112
114
  {
113
- "title": "Success"
115
+ "title": "Success",
116
+ "content": [
117
+ {
118
+ "component": "Incubator.Toast",
119
+ "props": {
120
+ "visible": true,
121
+ "message": "Post published.",
122
+ "preset": "success"
123
+ }
124
+ }
125
+ ]
114
126
  },
115
127
  {
116
- "title": "Validation"
128
+ "title": "Validation",
129
+ "content": [
130
+ {
131
+ "component": "Incubator.Toast",
132
+ "props": {
133
+ "visible": true,
134
+ "message": "Enter a card number.",
135
+ "preset": "failure"
136
+ }
137
+ }
138
+ ]
117
139
  },
118
140
  {
119
- "title": "Offline Error"
141
+ "title": "Offline Error",
142
+ "content": [
143
+ {
144
+ "component": "Incubator.Toast",
145
+ "props": {
146
+ "visible": true,
147
+ "message": "This action is not available offline.",
148
+ "preset": "offline"
149
+ }
150
+ }
151
+ ]
120
152
  }
121
153
  ],
122
154
  "title": "Types"
@@ -126,13 +158,37 @@
126
158
  "columns": ["Prop", "Preview"],
127
159
  "items": [
128
160
  {
129
- "title": "None"
161
+ "title": "None",
162
+ "content": [
163
+ {
164
+ "component": "Incubator.Toast",
165
+ "props": {
166
+ "visible": true,
167
+ "message": "Action completed."
168
+ }
169
+ }
170
+ ]
130
171
  },
131
172
  {
132
- "title": "With action"
173
+ "title": "With action",
174
+ "content": [
175
+ {
176
+ "snippet": "<Incubator.Toast visible message=\"Action completed.\" action={{label: 'Undo', onPress: () => {}}}/>"
177
+ }
178
+ ]
133
179
  },
134
180
  {
135
- "title": "With loader"
181
+ "title": "With loader",
182
+ "content": [
183
+ {
184
+ "component": "Incubator.Toast",
185
+ "props": {
186
+ "visible": true,
187
+ "message": "Action completed.",
188
+ "showLoader": true
189
+ }
190
+ }
191
+ ]
136
192
  }
137
193
  ],
138
194
  "title": "Accessories"