@proximus/lavender-toast-native 0.1.0-alpha.3 → 0.1.0-alpha.5

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/dist/PxToast.d.ts CHANGED
@@ -7,16 +7,15 @@ export interface PxModalProps {
7
7
  action1Label: string;
8
8
  action1OnPress: () => void;
9
9
  action1AccessibilityHint?: string;
10
- action1TestID?: string;
11
10
  action2Label?: string;
12
11
  action2OnPress?: () => void;
13
12
  action2AccessibilityHint?: string;
14
- action2TestID?: string;
15
13
  message: string;
16
14
  visible: boolean;
17
15
  status?: Status;
18
16
  inverted?: boolean;
17
+ testID?: string;
19
18
  }
20
19
  export type Status = 'success' | 'error' | 'warning' | 'info';
21
- export declare function PxToast({ visible, containerStyle, offset, expanded, action1Label, action1OnPress, message, action2Label, action2OnPress, action1AccessibilityHint, action2AccessibilityHint, action1TestID, action2TestID, status, inverted, }: PxModalProps): React.JSX.Element | null;
20
+ export declare function PxToast({ visible, containerStyle, offset, expanded, action1Label, action1OnPress, message, action2Label, action2OnPress, action1AccessibilityHint, action2AccessibilityHint, status, inverted, testID, }: PxModalProps): React.JSX.Element | null;
22
21
  //# sourceMappingURL=PxToast.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"PxToast.d.ts","sourceRoot":"","sources":["../src/PxToast.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAmD,MAAM,OAAO,CAAC;AACxE,OAAO,EAIL,SAAS,EAIT,SAAS,EACV,MAAM,cAAc,CAAC;AAStB,MAAM,WAAW,YAAY;IAC3B,cAAc,CAAC,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC;IACtC,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,YAAY,EAAE,MAAM,CAAC;IACrB,cAAc,EAAE,MAAM,IAAI,CAAC;IAC3B,wBAAwB,CAAC,EAAE,MAAM,CAAC;IAClC,aAAa,CAAC,EAAE,MA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CAAC,EAAE,MAAM,CAAC;IAChB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AAED,MAAM,MAAM,MAAM,GAAG,SAAS,GAAG,OAAO,GAAG,SAAS,GAAG,MAAM,CAAC;AAE9D,wBAAgB,OAAO,CAAC,EACtB,OAAO,EACP,cAAc,EACd,MAAU,EACV,QAAgB,EAChB,YAAY,EACZ,cAAc,EACd,OAAO,EACP,YAAY,EACZ,cAAc,EACd,wBAAwB,EACxB,wBAAwB,EACxB,MAAe,EACf,QAAgB,EAChB,MAAM,GACP,EAAE,YAAY,4BAmNd"}
package/dist/PxToast.js CHANGED
@@ -5,7 +5,7 @@ import { PxIcon } from '@proximus/lavender-icon-native';
5
5
  import { Body, Header } from '@proximus/lavender-texts-native';
6
6
  import { useSafeAreaInsets } from 'react-native-safe-area-context';
7
7
  import { a11y, e2eID } from '@proximus/lavender-common-native';
8
- export function PxToast({ visible, containerStyle, offset = 0, expanded = false, action1Label, action1OnPress, message, action2Label, action2OnPress, action1AccessibilityHint, action2AccessibilityHint, action1TestID, action2TestID, status = 'info', inverted = false, }) {
8
+ export function PxToast({ visible, containerStyle, offset = 0, expanded = false, action1Label, action1OnPress, message, action2Label, action2OnPress, action1AccessibilityHint, action2AccessibilityHint, status = 'info', inverted = false, testID, }) {
9
9
  const [bottom, setBottom] = useState();
10
10
  const [canDisplay, setCanDisplay] = useState(false);
11
11
  const [animatedVisible, setAnimatedVisible] = useState(false);
@@ -111,7 +111,7 @@ export function PxToast({ visible, containerStyle, offset = 0, expanded = false,
111
111
  gap: theme.t('SpacingSMobile').number,
112
112
  } },
113
113
  React.createElement(PxIcon, { accessible: false, importantForAccessibility: 'no', size: 'M', inverted: !inverted, ...iconSetup }),
114
- React.createElement(Body, { inverted: !inverted, accessible: false, importantForAccessibility: 'no', numberOfLines: 1, ellipsizeMode: 'tail' }, message)),
114
+ React.createElement(Body, { inverted: !inverted, accessible: false, importantForAccessibility: 'no', numberOfLines: 1, ellipsizeMode: 'tail', ...(testID && e2eID(`${testID}-toast-message`)) }, message)),
115
115
  React.createElement(View, { style: {
116
116
  ...(!expanded && { flex: 1 }),
117
117
  flexDirection: 'row',
@@ -125,7 +125,7 @@ export function PxToast({ visible, containerStyle, offset = 0, expanded = false,
125
125
  accessibilityHint: action1AccessibilityHint,
126
126
  accessibilityLabel: action1Label,
127
127
  importantForAccessibility: 'yes',
128
- }), ...e2eID(action1TestID) },
128
+ }), ...(testID && e2eID(`${testID}-toast-action1`)) },
129
129
  React.createElement(Header, { inverted: !inverted, style: {
130
130
  textTransform: 'uppercase',
131
131
  textDecorationLine: 'underline',
@@ -137,7 +137,7 @@ export function PxToast({ visible, containerStyle, offset = 0, expanded = false,
137
137
  accessible: true,
138
138
  accessibilityHint: action2AccessibilityHint,
139
139
  accessibilityLabel: action2Label,
140
- }), ...e2eID(action2TestID) },
140
+ }), ...(testID && e2eID(`${testID}-toast-action1`)) },
141
141
  React.createElement(Header, { inverted: !inverted, style: {
142
142
  textTransform: 'uppercase',
143
143
  textDecorationLine: 'underline',
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@proximus/lavender-toast-native",
3
- "version": "0.1.0-alpha.3",
3
+ "version": "0.1.0-alpha.5",
4
4
  "description": "Lavender toast native component",
5
5
  "license": "MIT",
6
6
  "main": "dist/index.js",
@@ -11,7 +11,6 @@
11
11
  "peerDependencies": {
12
12
  "@proximus/lavender-common-native": "*",
13
13
  "@proximus/lavender-icon-native": "*",
14
- "@proximus/lavender-styling-native": "*",
15
14
  "@proximus/lavender-texts-native": "*"
16
15
  },
17
16
  "publishConfig": {