@proximus/lavender-common-native 0.1.0-alpha.6 → 0.1.0-beta.0

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,41 +1,17 @@
1
1
  {
2
2
  "type": "module",
3
3
  "name": "@proximus/lavender-common-native",
4
- "version": "0.1.0-alpha.6",
4
+ "version": "0.1.0-beta.0",
5
5
  "description": "Common components for Proximus design system",
6
- "main": "src/index.ts",
7
- "scripts": {
8
- "clean": "rm -rf dist",
9
- "transform-package-json": "node ../../../scripts/tranformPackageJson.js package.json dist/far/away",
10
- "prepublish": "yarn clean && yarn transform-package-json && yarn build",
11
- "build": "npx tsc -p tsconfig.json"
12
- },
6
+ "main": "dist/index.js",
7
+ "files": [
8
+ "dist"
9
+ ],
13
10
  "license": "MIT",
14
- "devDependencies": {
15
- "@proximus/lavender-styling-native": "0.1.0-alpha.5"
16
- },
17
11
  "peerDependencies": {
18
12
  "@proximus/lavender-styling-native": "*"
19
13
  },
20
14
  "publishConfig": {
21
15
  "access": "public"
22
- },
23
- "lerna": {
24
- "command": {
25
- "publish": {
26
- "assets": [
27
- {
28
- "from": "dist/far/away/package.json",
29
- "to": "."
30
- },
31
- "dist/*.js",
32
- "dist/*.d.ts",
33
- "dist/*.d.ts.map",
34
- "src",
35
- "package.json"
36
- ]
37
- }
38
- }
39
- },
40
- "gitHead": "e50a17526561b3eafb159e36c737173956093e0d"
16
+ }
41
17
  }
package/CHANGELOG.md DELETED
@@ -1,51 +0,0 @@
1
- # Change Log
2
-
3
- All notable changes to this project will be documented in this file.
4
- See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
5
-
6
- # [0.1.0-alpha.6](https://github.com/Pxs-Corporate/react-native-lavender/compare/@proximus/lavender-common-native@0.1.0-alpha.5...@proximus/lavender-common-native@0.1.0-alpha.6) (2025-09-26)
7
-
8
- ### Features
9
-
10
- - **BCRI-42375821:** publisg js bundle output on npm ([#28](https://github.com/Pxs-Corporate/react-native-lavender/issues/28)) ([892ae60](https://github.com/Pxs-Corporate/react-native-lavender/commit/892ae600d6c00996c70028236f25afd0367402aa))
11
-
12
- # [0.1.0-alpha.5](https://github.com/Pxs-Corporate/react-native-lavender/compare/@proximus/lavender-common-native@0.1.0-alpha.4...@proximus/lavender-common-native@0.1.0-alpha.5) (2025-09-25)
13
-
14
- ### Bug Fixes
15
-
16
- - **BCRI-000000:** no free space on gh runner during build ([#27](https://github.com/Pxs-Corporate/react-native-lavender/issues/27)) ([a7c8604](https://github.com/Pxs-Corporate/react-native-lavender/commit/a7c86043b5cefcb10fd768d449c5718fbabe87ec))
17
-
18
- # [0.1.0-alpha.4](https://github.com/Pxs-Corporate/react-native-lavender/compare/@proximus/lavender-common-native@0.1.0-alpha.3...@proximus/lavender-common-native@0.1.0-alpha.4) (2025-09-19)
19
-
20
- ### Features
21
-
22
- - **BCRI-4249550:** message card + tag components ([#22](https://github.com/Pxs-Corporate/react-native-lavender/issues/22)) ([39fb91c](https://github.com/Pxs-Corporate/react-native-lavender/commit/39fb91cc294a37d07e63fca2b4e993d90b867082))
23
-
24
- # [0.1.0-alpha.3](https://github.com/Pxs-Corporate/react-native-lavender/compare/@proximus/lavender-common-native@0.1.0-alpha.2...@proximus/lavender-common-native@0.1.0-alpha.3) (2025-09-12)
25
-
26
- ### Features
27
-
28
- - **BCRI-4217211:** card component ([#20](https://github.com/Pxs-Corporate/react-native-lavender/issues/20)) ([0287bee](https://github.com/Pxs-Corporate/react-native-lavender/commit/0287bee00a5b532403026b5a2ca0e702b70c822f))
29
-
30
- # [0.1.0-alpha.2](https://github.com/Pxs-Corporate/react-native-lavender/compare/@proximus/lavender-common-native@0.1.0-alpha.1...@proximus/lavender-common-native@0.1.0-alpha.2) (2025-09-05)
31
-
32
- ### Features
33
-
34
- - **BCRI-4279213:** update token architecture and component styles ([#18](https://github.com/Pxs-Corporate/react-native-lavender/issues/18)) ([2fabf41](https://github.com/Pxs-Corporate/react-native-lavender/commit/2fabf416ce069e9756daa868c3012181db87e7f5))
35
-
36
- # [0.1.0-alpha.1](https://github.com/Pxs-Corporate/react-native-lavender/compare/@proximus/lavender-common-native@0.1.0-alpha.0...@proximus/lavender-common-native@0.1.0-alpha.1) (2025-08-13)
37
-
38
- ### Bug Fixes
39
-
40
- - **BCRI-4210372:** fix types field in modules ([68ac126](https://github.com/Pxs-Corporate/react-native-lavender/commit/68ac12657112473ae9e0e683076b1d9172be9ce6))
41
-
42
- # 0.1.0-alpha.0 (2025-08-13)
43
-
44
- ### Features
45
-
46
- - **BCRI-000000:** remove default E2E on DEV env build for all components ([a5d27bf](https://github.com/Pxs-Corporate/react-native-lavender/commit/a5d27bfaaebf5b75f3160f31c64b590b7bd00b93))
47
- - **BCRI-3651606:** mono repo creation ([d19f852](https://github.com/Pxs-Corporate/react-native-lavender/commit/d19f852a710963ff85b1a9d31d18188217aa23ab))
48
- - **BCRI-3660857:** cell components ([af9e45c](https://github.com/Pxs-Corporate/react-native-lavender/commit/af9e45cefc20d08d2338380ff4cd8cd6851abe24))
49
- - **BCRI-3689585:** icon module ([f13230d](https://github.com/Pxs-Corporate/react-native-lavender/commit/f13230d9c7643680089a0db2c69b96cd73ff246e))
50
- - **BCRI-3810979:** tile components ([46fc5c7](https://github.com/Pxs-Corporate/react-native-lavender/commit/46fc5c7a0ddff6c2db43fba0de9929626092f265))
51
- - **BCRI-4210372:** automatic versionning ([9c1f0a0](https://github.com/Pxs-Corporate/react-native-lavender/commit/9c1f0a00e19a9d1a277044ea627632032a674102))
@@ -1,32 +0,0 @@
1
- {
2
- "type": "module",
3
- "name": "@proximus/lavender-common-native",
4
- "version": "0.1.0-alpha.6",
5
- "description": "Common components for Proximus design system",
6
- "main": "dist/index.js",
7
- "license": "MIT",
8
- "peerDependencies": {
9
- "@proximus/lavender-styling-native": "*"
10
- },
11
- "publishConfig": {
12
- "access": "public"
13
- },
14
- "lerna": {
15
- "command": {
16
- "publish": {
17
- "assets": [
18
- {
19
- "from": "dist/far/away/package.json",
20
- "to": "."
21
- },
22
- "dist/*.js",
23
- "dist/*.d.ts",
24
- "dist/*.d.ts.map",
25
- "src",
26
- "package.json"
27
- ]
28
- }
29
- }
30
- },
31
- "gitHead": "e50a17526561b3eafb159e36c737173956093e0d"
32
- }
@@ -1,50 +0,0 @@
1
- import React from 'react';
2
- import {
3
- AccessibilityProps,
4
- StyleProp,
5
- StyleSheet,
6
- View,
7
- ViewProps,
8
- } from 'react-native';
9
-
10
- import { a11y, e2eID } from './utils';
11
- import { useTheme } from '@proximus/lavender-styling-native';
12
-
13
- export interface IPxCardProps extends Readonly<ViewProps> {
14
- children?: Array<React.ReactElement | false | undefined> | React.ReactElement;
15
- wrapperStyle?: StyleProp<any>;
16
- testId?: string;
17
- wrapperA11yProps?: AccessibilityProps;
18
- }
19
-
20
- export function PxContainer(props: IPxCardProps) {
21
- const { theme } = useTheme();
22
-
23
- const { children, wrapperStyle, testId, wrapperA11yProps, ...viewProps } =
24
- props;
25
-
26
- return (
27
- <View
28
- style={[
29
- styles.container,
30
- {
31
- backgroundColor: theme.t('ColorBackgroundContainerLightDefault'),
32
- },
33
- wrapperStyle,
34
- ]}
35
- {...e2eID(testId)}
36
- {...a11y({
37
- ...wrapperA11yProps,
38
- })}
39
- {...viewProps}
40
- >
41
- {children}
42
- </View>
43
- );
44
- }
45
-
46
- const styles = StyleSheet.create({
47
- container: {
48
- borderRadius: 8,
49
- },
50
- });
package/src/Spacer.tsx DELETED
@@ -1,6 +0,0 @@
1
- import { View } from 'react-native';
2
- import React from 'react';
3
-
4
- export function PxSpacer() {
5
- return <View style={{ flex: 1 }}></View>;
6
- }
Binary file
package/src/index.ts DELETED
@@ -1,3 +0,0 @@
1
- export * from './utils';
2
- export * from './PxContainer';
3
- export * from './Spacer';
package/src/utils.ts DELETED
@@ -1,90 +0,0 @@
1
- import {
2
- AccessibilityProps,
3
- Image,
4
- ImageSourcePropType,
5
- Platform,
6
- } from 'react-native';
7
- import Config from 'react-native-config';
8
- import { LaunchArguments } from 'react-native-launch-arguments';
9
- import { useEffect, useState } from 'react';
10
-
11
- export interface ITestableAndroid {
12
- accessible: boolean;
13
- accessibilityLabel: string;
14
- }
15
-
16
- export interface ITestableIOS {
17
- testID: string;
18
- }
19
-
20
- export interface ITestable extends ITestableAndroid, ITestableIOS {
21
- appiumID: string;
22
- }
23
-
24
- export function e2eID(id?: string): ITestableAndroid | ITestableIOS | {} {
25
- const { e2e } = LaunchArguments.value();
26
- if (('E2E' === Config.ENV || e2e) && id) {
27
- if (Platform.OS === 'android') {
28
- return {
29
- accessibilityLabel: id,
30
- accessible: true,
31
- };
32
- }
33
- return {
34
- testID: id,
35
- };
36
- }
37
- return {};
38
- }
39
-
40
- export function a11y(a11yProps?: AccessibilityProps): AccessibilityProps {
41
- const { e2e } = LaunchArguments.value();
42
- if ('E2E' !== Config.ENV && !e2e) {
43
- return {
44
- ...a11yProps,
45
- };
46
- }
47
- return {} as any;
48
- }
49
-
50
- export function useImageAspectRatio(
51
- src: ImageSourcePropType | string | undefined
52
- ) {
53
- const [aspectRatio, setAspectRatio] = useState<number | undefined>();
54
-
55
- useEffect(() => {
56
- if (!src) return;
57
-
58
- // 1) Try to resolve local assets (and also normalizes URIs)
59
- const resolved = Image.resolveAssetSource(src as any);
60
-
61
- // If RN knows width/height already (static asset), use them
62
- if (resolved?.width && resolved?.height) {
63
- setAspectRatio(resolved.width / resolved.height);
64
- return;
65
- }
66
-
67
- // 2) Fall back to getSize for URIs (network, file://, content://)
68
- const uri =
69
- typeof src === 'string'
70
- ? src
71
- : (resolved?.uri ??
72
- (typeof (src as any)?.uri === 'string'
73
- ? (src as any).uri
74
- : undefined));
75
-
76
- if (uri) {
77
- Image.getSize(
78
- uri,
79
- (width, height) => {
80
- setAspectRatio(width / height);
81
- },
82
- (err) => console.warn('getSize failed:', err)
83
- );
84
- } else {
85
- console.warn('Could not resolve image source for size:', src);
86
- }
87
- }, [src]);
88
-
89
- return aspectRatio;
90
- }
package/tsconfig.json DELETED
@@ -1,8 +0,0 @@
1
- {
2
- "extends": "../../../tsconfig.npm.json",
3
- "compilerOptions": {
4
- "outDir": "dist",
5
- },
6
- "include": ["src","../../lib.d.ts"],
7
- "exclude": ["dist", "node_modules", "src/**/*.spec.tsx", "src/**/*.spec.ts"]
8
- }