@proximus/lavender-common-native 0.1.0-alpha.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/CHANGELOG.md ADDED
@@ -0,0 +1,15 @@
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.0 (2025-08-13)
7
+
8
+ ### Features
9
+
10
+ - **BCRI-000000:** remove default E2E on DEV env build for all components ([a5d27bf](https://github.com/Pxs-Corporate/react-native-lavender/commit/a5d27bfaaebf5b75f3160f31c64b590b7bd00b93))
11
+ - **BCRI-3651606:** mono repo creation ([d19f852](https://github.com/Pxs-Corporate/react-native-lavender/commit/d19f852a710963ff85b1a9d31d18188217aa23ab))
12
+ - **BCRI-3660857:** cell components ([af9e45c](https://github.com/Pxs-Corporate/react-native-lavender/commit/af9e45cefc20d08d2338380ff4cd8cd6851abe24))
13
+ - **BCRI-3689585:** icon module ([f13230d](https://github.com/Pxs-Corporate/react-native-lavender/commit/f13230d9c7643680089a0db2c69b96cd73ff246e))
14
+ - **BCRI-3810979:** tile components ([46fc5c7](https://github.com/Pxs-Corporate/react-native-lavender/commit/46fc5c7a0ddff6c2db43fba0de9929626092f265))
15
+ - **BCRI-4210372:** automatic versionning ([9c1f0a0](https://github.com/Pxs-Corporate/react-native-lavender/commit/9c1f0a00e19a9d1a277044ea627632032a674102))
@@ -0,0 +1,10 @@
1
+ import React from 'react';
2
+ import { AccessibilityProps, StyleProp, ViewProps } from 'react-native';
3
+ export interface IPxCardProps extends Readonly<ViewProps> {
4
+ children?: Array<React.ReactElement | false | undefined> | React.ReactElement;
5
+ wrapperStyle?: StyleProp<any>;
6
+ testId?: string;
7
+ wrapperA11yProps?: AccessibilityProps;
8
+ }
9
+ export declare function PxCard(props: IPxCardProps): React.JSX.Element;
10
+ //# sourceMappingURL=PxCard.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"PxCard.d.ts","sourceRoot":"","sources":["../src/PxCard.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EACL,kBAAkB,EAClB,SAAS,EAGT,SAAS,EACV,MAAM,cAAc,CAAC;AAKtB,MAAM,WAAW,YAAa,SAAQ,QAAQ,CAAC,SAAS,CAAC;IACvD,QAAQ,CAAC,EAAE,KAAK,CAAC,KAAK,CAAC,YAAY,GAAG,KAAK,GAAG,SAAS,CAAC,GAAG,KAAK,CAAC,YAAY,CAAC;IAC9E,YAAY,CAAC,EAAE,SAAS,CAAC,GAAG,CAAC,CAAC;IAC9B,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,gBAAgB,CAAC,EAAE,kBAAkB,CAAC;CACvC;AAED,wBAAgB,MAAM,CAAC,KAAK,EAAE,YAAY,qBAwBzC"}
@@ -0,0 +1,3 @@
1
+ export * from './utils';
2
+ export * from './PxCard';
3
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,SAAS,CAAC;AACxB,cAAc,UAAU,CAAC"}
@@ -0,0 +1,14 @@
1
+ import { AccessibilityProps } from 'react-native';
2
+ export interface ITestableAndroid {
3
+ accessible: boolean;
4
+ accessibilityLabel: string;
5
+ }
6
+ export interface ITestableIOS {
7
+ testID: string;
8
+ }
9
+ export interface ITestable extends ITestableAndroid, ITestableIOS {
10
+ appiumID: string;
11
+ }
12
+ export declare function e2eID(id?: string): ITestableAndroid | ITestableIOS | {};
13
+ export declare function a11y(a11yProps?: AccessibilityProps): AccessibilityProps;
14
+ //# sourceMappingURL=utils.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../src/utils.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAY,MAAM,cAAc,CAAC;AAI5D,MAAM,WAAW,gBAAgB;IAC/B,UAAU,EAAE,OAAO,CAAC;IACpB,kBAAkB,EAAE,MAAM,CAAC;CAC5B;AAED,MAAM,WAAW,YAAY;IAC3B,MAAM,EAAE,MAAM,CAAC;CAChB;AAED,MAAM,WAAW,SAAU,SAAQ,gBAAgB,EAAE,YAAY;IAC/D,QAAQ,EAAE,MAAM,CAAC;CAClB;AAED,wBAAgB,KAAK,CAAC,EAAE,CAAC,EAAE,MAAM,GAAG,gBAAgB,GAAG,YAAY,GAAG,EAAE,CAcvE;AAED,wBAAgB,IAAI,CAAC,SAAS,CAAC,EAAE,kBAAkB,GAAG,kBAAkB,CAQvE"}
package/package.json ADDED
@@ -0,0 +1,35 @@
1
+ {
2
+ "type": "module",
3
+ "name": "@proximus/lavender-common-native",
4
+ "version": "0.1.0-alpha.0",
5
+ "description": "Common components for Proximus design system",
6
+ "main": "src/index.ts",
7
+ "types": "dist/index.d.ts",
8
+ "scripts": {
9
+ "clean": "rm -rf dist",
10
+ "prepublish": "yarn clean && yarn build",
11
+ "build": "npx tsc -p tsconfig.json"
12
+ },
13
+ "license": "MIT",
14
+ "devDependencies": {
15
+ "@proximus/lavender-styling-native": "0.1.0-alpha.0"
16
+ },
17
+ "peerDependencies": {
18
+ "@proximus/lavender-styling-native": "*"
19
+ },
20
+ "publishConfig": {
21
+ "access": "public"
22
+ },
23
+ "lerna": {
24
+ "command": {
25
+ "publish": {
26
+ "assets": [
27
+ "dist",
28
+ "src",
29
+ "package.json"
30
+ ]
31
+ }
32
+ }
33
+ },
34
+ "gitHead": "59b3436b786cc1c73b4a20a98b2a85139e75b72e"
35
+ }
package/src/PxCard.tsx ADDED
@@ -0,0 +1,50 @@
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 PxCard(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('BackgroundColorActionNeutralBareDefault'),
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
+ });
Binary file
package/src/index.ts ADDED
@@ -0,0 +1,2 @@
1
+ export * from './utils';
2
+ export * from './PxCard';
package/src/utils.ts ADDED
@@ -0,0 +1,42 @@
1
+ import { AccessibilityProps, Platform } from 'react-native';
2
+ import Config from 'react-native-config';
3
+ import { LaunchArguments } from 'react-native-launch-arguments';
4
+
5
+ export interface ITestableAndroid {
6
+ accessible: boolean;
7
+ accessibilityLabel: string;
8
+ }
9
+
10
+ export interface ITestableIOS {
11
+ testID: string;
12
+ }
13
+
14
+ export interface ITestable extends ITestableAndroid, ITestableIOS {
15
+ appiumID: string;
16
+ }
17
+
18
+ export function e2eID(id?: string): ITestableAndroid | ITestableIOS | {} {
19
+ const { e2e } = LaunchArguments.value();
20
+ if (('E2E' === Config.ENV || e2e) && id) {
21
+ if (Platform.OS === 'android') {
22
+ return {
23
+ accessibilityLabel: id,
24
+ accessible: true,
25
+ };
26
+ }
27
+ return {
28
+ testID: id,
29
+ };
30
+ }
31
+ return {};
32
+ }
33
+
34
+ export function a11y(a11yProps?: AccessibilityProps): AccessibilityProps {
35
+ const { e2e } = LaunchArguments.value();
36
+ if ('E2E' !== Config.ENV && !e2e) {
37
+ return {
38
+ ...a11yProps,
39
+ };
40
+ }
41
+ return {} as any;
42
+ }
package/tsconfig.json ADDED
@@ -0,0 +1,8 @@
1
+ {
2
+ "extends": "../../tsconfig.npm.json",
3
+ "compilerOptions": {
4
+ "outDir": "dist",
5
+ },
6
+ "include": ["src"],
7
+ "exclude": ["dist", "node_modules", "src/**/*.test.ts", "src/**/*.spec.ts"]
8
+ }