@proximus/lavender-skeleton-native 0.1.0-alpha.7 → 0.1.0-alpha.9

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.
@@ -1,4 +1,4 @@
1
1
  import React from 'react';
2
2
  import { ISkeletonProps } from './types';
3
- export declare function PxCardSkeleton({ inverted, containerStyle }: ISkeletonProps): React.JSX.Element;
3
+ export declare function PxCardSkeleton({ inverted, containerStyle, testID, }: ISkeletonProps): React.JSX.Element;
4
4
  //# sourceMappingURL=CardSkeleton.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"CardSkeleton.d.ts","sourceRoot":"","sources":["../src/CardSkeleton.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAAE,cAAc,EAAE,MAAM,SAAS,CAAC;AAEzC,wBAAgB,cAAc,CAAC,EAAE,QAAQ,EAAE,cAAc,EAAE,EAAE,cAAc,qBAsB1E"}
1
+ {"version":3,"file":"CardSkeleton.d.ts","sourceRoot":"","sources":["../src/CardSkeleton.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAAE,cAAc,EAAE,MAAM,SAAS,CAAC;AAGzC,wBAAgB,cAAc,CAAC,EAC7B,QAAQ,EACR,cAAc,EACd,MAAM,GACP,EAAE,cAAc,qBAuBhB"}
@@ -2,9 +2,10 @@ import { View } from 'react-native';
2
2
  import { PxSkeleton } from './Skeleton';
3
3
  import React from 'react';
4
4
  import { useTheme } from '@proximus/lavender-styling-native';
5
- export function PxCardSkeleton({ inverted, containerStyle }) {
5
+ import { e2eID } from '@proximus/lavender-common-native';
6
+ export function PxCardSkeleton({ inverted, containerStyle, testID, }) {
6
7
  const { theme } = useTheme();
7
- return (React.createElement(View, { style: [containerStyle, { borderRadius: theme.t('RadiusMain').number }] },
8
+ return (React.createElement(View, { style: [containerStyle, { borderRadius: theme.t('RadiusMain').number }], ...e2eID(testID) },
8
9
  React.createElement(PxSkeleton, { variant: 'assetL', inverted: inverted, expand: true }),
9
10
  React.createElement(View, { style: {
10
11
  gap: theme.t('SpacingSMobile').number,
@@ -1,6 +1,6 @@
1
1
  import React from 'react';
2
2
  import { ISkeletonProps } from './types';
3
- export declare function PxCarouselSkeleton({ inverted, itemsVisible, containerStyle, }: {
3
+ export declare function PxCarouselSkeleton({ inverted, itemsVisible, containerStyle, testID, }: {
4
4
  itemsVisible?: number;
5
5
  } & ISkeletonProps): React.JSX.Element;
6
6
  //# sourceMappingURL=CarouselSkeleton.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"CarouselSkeleton.d.ts","sourceRoot":"","sources":["../src/CarouselSkeleton.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAAE,cAAc,EAAE,MAAM,SAAS,CAAC;AAEzC,wBAAgB,kBAAkB,CAAC,EACjC,QAAQ,EACR,YAAgB,EAChB,cAAc,GACf,EAAE;IACD,YAAY,CAAC,EAAE,MAAM,CAAC;CACvB,GAAG,cAAc,qBAqCjB"}
1
+ {"version":3,"file":"CarouselSkeleton.d.ts","sourceRoot":"","sources":["../src/CarouselSkeleton.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAAE,cAAc,EAAE,MAAM,SAAS,CAAC;AAGzC,wBAAgB,kBAAkB,CAAC,EACjC,QAAQ,EACR,YAAgB,EAChB,cAAc,EACd,MAAM,GACP,EAAE;IACD,YAAY,CAAC,EAAE,MAAM,CAAC;CACvB,GAAG,cAAc,qBAsCjB"}
@@ -2,7 +2,8 @@ import { View } from 'react-native';
2
2
  import { PxSkeleton } from './Skeleton';
3
3
  import React from 'react';
4
4
  import { useTheme } from '@proximus/lavender-styling-native';
5
- export function PxCarouselSkeleton({ inverted, itemsVisible = 1, containerStyle, }) {
5
+ import { e2eID } from '@proximus/lavender-common-native';
6
+ export function PxCarouselSkeleton({ inverted, itemsVisible = 1, containerStyle, testID, }) {
6
7
  const { theme } = useTheme();
7
8
  const panelVariant = itemsVisible === 1 ? 'panel' : 'panelS';
8
9
  return (React.createElement(View, { style: [
@@ -11,7 +12,7 @@ export function PxCarouselSkeleton({ inverted, itemsVisible = 1, containerStyle,
11
12
  gap: theme.t('SpacingSMobile').number,
12
13
  borderRadius: theme.t('RadiusMain').number,
13
14
  },
14
- ] },
15
+ ], ...e2eID(testID) },
15
16
  React.createElement(View, { style: {
16
17
  flexDirection: 'row',
17
18
  gap: theme.t('SpacingSMobile').number,
@@ -1,4 +1,4 @@
1
1
  import React from 'react';
2
2
  import { ISkeletonProps } from './types';
3
- export declare function PxDataUsageSkeleton({ inverted, containerStyle, }: ISkeletonProps): React.JSX.Element;
3
+ export declare function PxDataUsageSkeleton({ inverted, containerStyle, testID, }: ISkeletonProps): React.JSX.Element;
4
4
  //# sourceMappingURL=DataUsageSkeleton.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"DataUsageSkeleton.d.ts","sourceRoot":"","sources":["../src/DataUsageSkeleton.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,MAAM,OAAO,CAAC;AAG1B,OAAO,EAAE,cAAc,EAAE,MAAM,SAAS,CAAC;AAEzC,wBAAgB,mBAAmB,CAAC,EAClC,QAAQ,EACR,cAAc,GACf,EAAE,cAAc,qBAkChB"}
1
+ {"version":3,"file":"DataUsageSkeleton.d.ts","sourceRoot":"","sources":["../src/DataUsageSkeleton.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,MAAM,OAAO,CAAC;AAG1B,OAAO,EAAE,cAAc,EAAE,MAAM,SAAS,CAAC;AAGzC,wBAAgB,mBAAmB,CAAC,EAClC,QAAQ,EACR,cAAc,EACd,MAAM,GACP,EAAE,cAAc,qBAmChB"}
@@ -3,7 +3,8 @@ import { PxSkeleton } from './Skeleton';
3
3
  import React from 'react';
4
4
  import { useTheme } from '@proximus/lavender-styling-native';
5
5
  import { PxStatusSkeleton } from './StatusSkeleton';
6
- export function PxDataUsageSkeleton({ inverted, containerStyle, }) {
6
+ import { e2eID } from '@proximus/lavender-common-native';
7
+ export function PxDataUsageSkeleton({ inverted, containerStyle, testID, }) {
7
8
  const { theme } = useTheme();
8
9
  return (React.createElement(View, { style: [
9
10
  containerStyle,
@@ -13,7 +14,7 @@ export function PxDataUsageSkeleton({ inverted, containerStyle, }) {
13
14
  padding: theme.t('PaddingSMobile').number,
14
15
  backgroundColor: theme.t('ColorBackgroundSurfaceLight'),
15
16
  },
16
- ] },
17
+ ], ...e2eID(testID) },
17
18
  React.createElement(View, { style: {
18
19
  gap: theme.t('SpacingXsMobile').number,
19
20
  } },
@@ -1,4 +1,4 @@
1
1
  import React from 'react';
2
2
  import { ISkeletonProps } from './types';
3
- export declare function PxMessageCardSkeleton({ inverted, containerStyle, }: ISkeletonProps): React.JSX.Element;
3
+ export declare function PxMessageCardSkeleton({ inverted, containerStyle, testID, }: ISkeletonProps): React.JSX.Element;
4
4
  //# sourceMappingURL=MessageCardSkeleton.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"MessageCardSkeleton.d.ts","sourceRoot":"","sources":["../src/MessageCardSkeleton.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAAE,cAAc,EAAE,MAAM,SAAS,CAAC;AAEzC,wBAAgB,qBAAqB,CAAC,EACpC,QAAQ,EACR,cAAc,GACf,EAAE,cAAc,qBAiChB"}
1
+ {"version":3,"file":"MessageCardSkeleton.d.ts","sourceRoot":"","sources":["../src/MessageCardSkeleton.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAAE,cAAc,EAAE,MAAM,SAAS,CAAC;AAGzC,wBAAgB,qBAAqB,CAAC,EACpC,QAAQ,EACR,cAAc,EACd,MAAM,GACP,EAAE,cAAc,qBAkChB"}
@@ -2,7 +2,8 @@ import { View } from 'react-native';
2
2
  import { PxSkeleton } from './Skeleton';
3
3
  import React from 'react';
4
4
  import { useTheme } from '@proximus/lavender-styling-native';
5
- export function PxMessageCardSkeleton({ inverted, containerStyle, }) {
5
+ import { e2eID } from '@proximus/lavender-common-native';
6
+ export function PxMessageCardSkeleton({ inverted, containerStyle, testID, }) {
6
7
  const { theme } = useTheme();
7
8
  return (React.createElement(View, { style: [
8
9
  containerStyle,
@@ -12,7 +13,7 @@ export function PxMessageCardSkeleton({ inverted, containerStyle, }) {
12
13
  padding: theme.t('PaddingSMobile').number,
13
14
  gap: theme.t('SpacingSMobile').number,
14
15
  },
15
- ] },
16
+ ], ...e2eID(testID) },
16
17
  React.createElement(View, { style: {
17
18
  flexDirection: 'row',
18
19
  gap: theme.t('SpacingSMobile').number,
@@ -1 +1 @@
1
- {"version":3,"file":"Skeleton.d.ts","sourceRoot":"","sources":["../src/Skeleton.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAsC,MAAM,OAAO,CAAC;AAC3D,OAAO,EAIL,SAAS,EAGT,SAAS,EACT,SAAS,EACV,MAAM,cAAc,CAAC;AAOtB,MAAM,MAAM,qBAAqB,GAAG,SAAS,GAAG;IAC9C,uBAAuB;IACvB,OAAO,EACH,UAAU,GACV,UAAU,GACV,UAAU,GACV,MAAM,GACN,OAAO,GACP,SAAS,GACT,SAAS,GACT,SAAS,GACT,QAAQ,GACR,QAAQ,GACR,OAAO,GACP,QAAQ,CAAC;IACb,KAAK,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IACxB,cAAc,CAAC,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC;IACtC,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB,CAAC;AAeF,wBAAgB,UAAU,CAAC,KAAK,EAAE,qBAAqB,qBA+EtD"}
1
+ {"version":3,"file":"Skeleton.d.ts","sourceRoot":"","sources":["../src/Skeleton.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAsC,MAAM,OAAO,CAAC;AAC3D,OAAO,EAIL,SAAS,EAGT,SAAS,EACT,SAAS,EACV,MAAM,cAAc,CAAC;AAQtB,MAAM,MAAM,qBAAqB,GAAG,SAAS,GAAG;IAC9C,uBAAuB;IACvB,OAAO,EACH,UAAU,GACV,UAAU,GACV,UAAU,GACV,MAAM,GACN,OAAO,GACP,SAAS,GACT,SAAS,GACT,SAAS,GACT,QAAQ,GACR,QAAQ,GACR,OAAO,GACP,QAAQ,CAAC;IACb,KAAK,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IACxB,cAAc,CAAC,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC;IACtC,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB,CAAC;AAeF,wBAAgB,UAAU,CAAC,KAAK,EAAE,qBAAqB,qBAsFtD"}
package/dist/Skeleton.js CHANGED
@@ -2,6 +2,7 @@ import React, { useEffect, useRef, useState } from 'react';
2
2
  import { Animated, Easing, StyleSheet, View, } from 'react-native';
3
3
  import LinearGradient from 'react-native-linear-gradient';
4
4
  import { useTheme } from '@proximus/lavender-styling-native';
5
+ import { e2eID } from '@proximus/lavender-common-native';
5
6
  const DURATION = 1500;
6
7
  const ANGLE = 18;
7
8
  function useColors({ inverted }) {
@@ -15,7 +16,7 @@ function useColors({ inverted }) {
15
16
  return { backgroundColor, highlightColor, highlightColorWithOpacity };
16
17
  }
17
18
  export function PxSkeleton(props) {
18
- const { inverted = false, containerStyle, variant, expand = false } = props;
19
+ const { inverted = false, containerStyle, variant, expand = false, testID, } = props;
19
20
  const [layout, setLayout] = useState({ width: 0, height: 0 });
20
21
  const translateX = useRef(new Animated.Value(0)).current;
21
22
  const { theme } = useTheme();
@@ -54,7 +55,7 @@ export function PxSkeleton(props) {
54
55
  ], onLayout: (e) => {
55
56
  const { width, height } = e.nativeEvent.layout;
56
57
  setLayout({ width, height });
57
- } },
58
+ }, ...e2eID(testID) },
58
59
  React.createElement(Animated.View, { style: {
59
60
  position: 'absolute',
60
61
  top: -3 * layout.height, // ensure coverage when rotated
@@ -1,4 +1,4 @@
1
1
  import React from 'react';
2
2
  import { ISkeletonProps } from './types';
3
- export declare function PxStatusSkeleton({ inverted, containerStyle }: ISkeletonProps): React.JSX.Element;
3
+ export declare function PxStatusSkeleton({ inverted, containerStyle, testID, }: ISkeletonProps): React.JSX.Element;
4
4
  //# sourceMappingURL=StatusSkeleton.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"StatusSkeleton.d.ts","sourceRoot":"","sources":["../src/StatusSkeleton.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAAE,cAAc,EAAE,MAAM,SAAS,CAAC;AAEzC,wBAAgB,gBAAgB,CAAC,EAAE,QAAQ,EAAE,cAAc,EAAE,EAAE,cAAc,qBAc5E"}
1
+ {"version":3,"file":"StatusSkeleton.d.ts","sourceRoot":"","sources":["../src/StatusSkeleton.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAAE,cAAc,EAAE,MAAM,SAAS,CAAC;AAGzC,wBAAgB,gBAAgB,CAAC,EAC/B,QAAQ,EACR,cAAc,EACd,MAAM,GACP,EAAE,cAAc,qBAehB"}
@@ -2,12 +2,13 @@ import { View } from 'react-native';
2
2
  import { PxSkeleton } from './Skeleton';
3
3
  import React from 'react';
4
4
  import { useTheme } from '@proximus/lavender-styling-native';
5
- export function PxStatusSkeleton({ inverted, containerStyle }) {
5
+ import { e2eID } from '@proximus/lavender-common-native';
6
+ export function PxStatusSkeleton({ inverted, containerStyle, testID, }) {
6
7
  const { theme } = useTheme();
7
8
  return (React.createElement(View, { style: [
8
9
  containerStyle,
9
10
  { flexDirection: 'row', gap: theme.t('Spacing2xsMobile').number },
10
- ] },
11
+ ], ...e2eID(testID) },
11
12
  React.createElement(PxSkeleton, { variant: 'assetXS', inverted: inverted }),
12
13
  React.createElement(PxSkeleton, { variant: 'body', inverted: inverted })));
13
14
  }
@@ -1 +1 @@
1
- {"version":3,"file":"TileSkeleton.d.ts","sourceRoot":"","sources":["../src/TileSkeleton.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAAE,cAAc,EAAE,MAAM,SAAS,CAAC;AAsBzC,wBAAgB,eAAe,CAAC,EAAE,QAAQ,EAAE,cAAc,EAAE,EAAE,cAAc,qBAmB3E"}
1
+ {"version":3,"file":"TileSkeleton.d.ts","sourceRoot":"","sources":["../src/TileSkeleton.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAAE,cAAc,EAAE,MAAM,SAAS,CAAC;AAwBzC,wBAAgB,eAAe,CAAC,EAAE,QAAQ,EAAE,cAAc,EAAE,EAAE,cAAc,qBAmB3E"}
@@ -2,7 +2,8 @@ import { View } from 'react-native';
2
2
  import { PxSkeleton } from './Skeleton';
3
3
  import React from 'react';
4
4
  import { useTheme } from '@proximus/lavender-styling-native';
5
- function PxTileSkeleton({ inverted }) {
5
+ import { e2eID } from '@proximus/lavender-common-native';
6
+ function PxTileSkeleton({ inverted, testID }) {
6
7
  const { theme } = useTheme();
7
8
  return (React.createElement(View, { style: {
8
9
  alignItems: 'center',
@@ -11,7 +12,7 @@ function PxTileSkeleton({ inverted }) {
11
12
  borderBottomStartRadius: theme.t('RadiusMain').number,
12
13
  padding: theme.t('PaddingSMobile').number,
13
14
  backgroundColor: theme.t('ColorBackgroundSurfaceLight'),
14
- } },
15
+ }, ...e2eID(testID) },
15
16
  React.createElement(PxSkeleton, { variant: 'assetS', inverted: inverted }),
16
17
  React.createElement(PxSkeleton, { variant: 'headingS', inverted: inverted })));
17
18
  }
package/dist/types.d.ts CHANGED
@@ -2,5 +2,6 @@ import { StyleProp, ViewStyle } from 'react-native';
2
2
  export interface ISkeletonProps {
3
3
  inverted?: boolean;
4
4
  containerStyle?: StyleProp<ViewStyle>;
5
+ testID?: string;
5
6
  }
6
7
  //# sourceMappingURL=types.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAEpD,MAAM,WAAW,cAAc;IAC7B,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,cAAc,CAAC,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC;CACvC"}
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAEpD,MAAM,WAAW,cAAc;IAC7B,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,cAAc,CAAC,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC;IACtC,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@proximus/lavender-skeleton-native",
3
- "version": "0.1.0-alpha.7",
3
+ "version": "0.1.0-alpha.9",
4
4
  "description": "Lavender skeleton component",
5
5
  "license": "MIT",
6
6
  "main": "dist/index.js",