@proximus/lavender-entrypoint-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,29 @@
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:** adding testids on cells ([1e5f002](https://github.com/Pxs-Corporate/react-native-lavender/commit/1e5f00201a84516c1a6fe3fe5c04032204c32ae8))
11
+ - **BCRI-000000:** remove default E2E on DEV env build for all components ([a5d27bf](https://github.com/Pxs-Corporate/react-native-lavender/commit/a5d27bfaaebf5b75f3160f31c64b590b7bd00b93))
12
+ - **BCRI-3651673:** entrypoint module ([9a246af](https://github.com/Pxs-Corporate/react-native-lavender/commit/9a246af671f674f0ff768a9b6a72a77d1f12d065))
13
+ - **BCRI-3707400:** entrypoint prefix slot ([5f5c4a9](https://github.com/Pxs-Corporate/react-native-lavender/commit/5f5c4a9a973a5168d359f6d4a9413a3b7bf50d48))
14
+ - **BCRI-4002610:** update icon handling and remove deprecated font references ([4399fe4](https://github.com/Pxs-Corporate/react-native-lavender/commit/4399fe4bff06aa70f5c29705fcc89d5243b0e3e7))
15
+ - **BCRI-4026235:** update package version to 0.0.5 and change icon name to chevron_right ([d32b8c1](https://github.com/Pxs-Corporate/react-native-lavender/commit/d32b8c12511f180bd4a9dc36cf7198777d0ec2e5))
16
+ - **BCRI-4210372:** automatic versionning ([9c1f0a0](https://github.com/Pxs-Corporate/react-native-lavender/commit/9c1f0a00e19a9d1a277044ea627632032a674102))
17
+ - **BCRI-4210372:** fix bad version numbers ([bc6a8ba](https://github.com/Pxs-Corporate/react-native-lavender/commit/bc6a8ba48c15347442f2ac38dacae7ffba3d95eb))
18
+
19
+ # (2025-08-13)
20
+
21
+ ### Features
22
+
23
+ - **BCRI-000000:** adding testids on cells ([1e5f002](https://github.com/Pxs-Corporate/react-native-lavender/commit/1e5f00201a84516c1a6fe3fe5c04032204c32ae8))
24
+ - **BCRI-000000:** remove default E2E on DEV env build for all components ([a5d27bf](https://github.com/Pxs-Corporate/react-native-lavender/commit/a5d27bfaaebf5b75f3160f31c64b590b7bd00b93))
25
+ - **BCRI-3651673:** entrypoint module ([9a246af](https://github.com/Pxs-Corporate/react-native-lavender/commit/9a246af671f674f0ff768a9b6a72a77d1f12d065))
26
+ - **BCRI-3707400:** entrypoint prefix slot ([5f5c4a9](https://github.com/Pxs-Corporate/react-native-lavender/commit/5f5c4a9a973a5168d359f6d4a9413a3b7bf50d48))
27
+ - **BCRI-4002610:** update icon handling and remove deprecated font references ([4399fe4](https://github.com/Pxs-Corporate/react-native-lavender/commit/4399fe4bff06aa70f5c29705fcc89d5243b0e3e7))
28
+ - **BCRI-4026235:** update package version to 0.0.5 and change icon name to chevron_right ([d32b8c1](https://github.com/Pxs-Corporate/react-native-lavender/commit/d32b8c12511f180bd4a9dc36cf7198777d0ec2e5))
29
+ - **BCRI-4210372:** automatic versionning ([9c1f0a0](https://github.com/Pxs-Corporate/react-native-lavender/commit/9c1f0a00e19a9d1a277044ea627632032a674102))
@@ -0,0 +1,25 @@
1
+ import React, { ReactElement, ReactNode } from 'react';
2
+ import { AccessibilityProps, ImageStyle, ImageURISource, StyleProp, ViewStyle } from 'react-native';
3
+ import { IconName } from '@proximus/lavender-icon/dist/iconNames.js';
4
+ export interface IPxEntryPoint extends AccessibilityProps {
5
+ title: string;
6
+ subTitle?: string;
7
+ icon?: IconName;
8
+ iconSize?: number;
9
+ containerStyle?: StyleProp<ViewStyle>;
10
+ emphasis?: boolean;
11
+ onPress: () => void;
12
+ leftComponent?: ReactNode;
13
+ rightComponent?: ReactElement;
14
+ testID?: string;
15
+ disabled?: boolean;
16
+ imageSrc?: ImageURISource;
17
+ imageStyle?: StyleProp<ImageStyle>;
18
+ imageWidth?: number;
19
+ imageA11yProps?: AccessibilityProps;
20
+ iconA11yProps?: AccessibilityProps;
21
+ patch?: string;
22
+ patchType?: any;
23
+ }
24
+ export declare function PxEntryPoint({ title, subTitle, icon, onPress, iconSize, containerStyle, leftComponent, rightComponent, testID, patch, patchType, imageSrc, imageStyle, imageWidth, iconA11yProps, }: IPxEntryPoint): React.JSX.Element;
25
+ //# sourceMappingURL=PxEntryPoint.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"PxEntryPoint.d.ts","sourceRoot":"","sources":["../src/PxEntryPoint.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,YAAY,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AACvD,OAAO,EACL,kBAAkB,EAElB,UAAU,EACV,cAAc,EACd,SAAS,EAIT,SAAS,EACV,MAAM,cAAc,CAAC;AAOtB,OAAO,EAAE,QAAQ,EAAE,MAAM,2CAA2C,CAAC;AAErE,MAAM,WAAW,aAAc,SAAQ,kBAAkB;IACvD,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,IAAI,CAAC,EAAE,QAAQ,CAAC;IAChB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,cAAc,CAAC,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC;IACtC,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,OAAO,EAAE,MAAM,IAAI,CAAC;IACpB,aAAa,CAAC,EAAE,SAAS,CAAC;IAC1B,cAAc,CAAC,EAAE,YAAY,CAAC;IAC9B,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,QAAQ,CAAC,EAAE,cAAc,CAAC;IAC1B,UAAU,CAAC,EAAE,SAAS,CAAC,UAAU,CAAC,CAAC;IACnC,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,cAAc,CAAC,EAAE,kBAAkB,CAAC;IACpC,aAAa,CAAC,EAAE,kBAAkB,CAAC;IACnC,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,SAAS,CAAC,EAAE,GAAG,CAAC;CACjB;AAED,wBAAgB,YAAY,CAAC,EAC3B,KAAK,EACL,QAAQ,EACR,IAAI,EACJ,OAAO,EACP,QAAa,EACb,cAAc,EACd,aAAa,EACb,cAAc,EACd,MAAM,EACN,KAAK,EACL,SAAmB,EACnB,QAAQ,EACR,UAAU,EACV,UAAU,EACV,aAAa,GACd,EAAE,aAAa,qBA8Df"}
@@ -0,0 +1,2 @@
1
+ export * from './PxEntryPoint';
2
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,gBAAgB,CAAC"}
package/package.json ADDED
@@ -0,0 +1,43 @@
1
+ {
2
+ "name": "@proximus/lavender-entrypoint-native",
3
+ "version": "0.1.0-alpha.0",
4
+ "description": "Lavender entrypoint component",
5
+ "license": "MIT",
6
+ "main": "src/index.ts",
7
+ "types": "dist/index.d.ts",
8
+ "type": "module",
9
+ "scripts": {
10
+ "clean": "rm -rf dist",
11
+ "prepublish": "yarn clean && yarn build",
12
+ "build": "npx tsc -p tsconfig.json"
13
+ },
14
+ "peerDependencies": {
15
+ "@proximus/lavender-common-native": "workspace:*",
16
+ "@proximus/lavender-icon-native": "workspace:*",
17
+ "@proximus/lavender-patch-native": "workspace:*",
18
+ "@proximus/lavender-styling-native": "workspace:*",
19
+ "@proximus/lavender-texts-native": "workspace:*"
20
+ },
21
+ "devDependencies": {
22
+ "@proximus/lavender-common-native": "0.1.0-alpha.0",
23
+ "@proximus/lavender-icon-native": "0.1.0-alpha.0",
24
+ "@proximus/lavender-patch-native": "0.1.0-alpha.0",
25
+ "@proximus/lavender-styling-native": "0.1.0-alpha.0",
26
+ "@proximus/lavender-texts-native": "0.1.0-alpha.0"
27
+ },
28
+ "publishConfig": {
29
+ "access": "public"
30
+ },
31
+ "lerna": {
32
+ "command": {
33
+ "publish": {
34
+ "assets": [
35
+ "dist",
36
+ "src",
37
+ "package.json"
38
+ ]
39
+ }
40
+ }
41
+ },
42
+ "gitHead": "27525289a448a6e4f3c2d36a88b9dc54d0f15fbf"
43
+ }
@@ -0,0 +1,142 @@
1
+ import React, { ReactElement, ReactNode } from 'react';
2
+ import {
3
+ AccessibilityProps,
4
+ Image,
5
+ ImageStyle,
6
+ ImageURISource,
7
+ StyleProp,
8
+ StyleSheet,
9
+ TouchableOpacity,
10
+ View,
11
+ ViewStyle,
12
+ } from 'react-native';
13
+
14
+ import { a11y, e2eID, PxCard } from '@proximus/lavender-common-native';
15
+ import { PxIcon } from '@proximus/lavender-icon-native';
16
+ import { Colors } from '@proximus/lavender-styling-native';
17
+ import { Body, Header } from '@proximus/lavender-texts-native';
18
+ import { PxPatch } from '@proximus/lavender-patch-native';
19
+ import { IconName } from '@proximus/lavender-icon/dist/iconNames.js';
20
+
21
+ export interface IPxEntryPoint extends AccessibilityProps {
22
+ title: string;
23
+ subTitle?: string;
24
+ icon?: IconName;
25
+ iconSize?: number;
26
+ containerStyle?: StyleProp<ViewStyle>;
27
+ emphasis?: boolean;
28
+ onPress: () => void;
29
+ leftComponent?: ReactNode;
30
+ rightComponent?: ReactElement;
31
+ testID?: string;
32
+ disabled?: boolean;
33
+ imageSrc?: ImageURISource;
34
+ imageStyle?: StyleProp<ImageStyle>;
35
+ imageWidth?: number;
36
+ imageA11yProps?: AccessibilityProps;
37
+ iconA11yProps?: AccessibilityProps;
38
+ patch?: string;
39
+ patchType?: any;
40
+ }
41
+
42
+ export function PxEntryPoint({
43
+ title,
44
+ subTitle,
45
+ icon,
46
+ onPress,
47
+ iconSize = 24,
48
+ containerStyle,
49
+ leftComponent,
50
+ rightComponent,
51
+ testID,
52
+ patch,
53
+ patchType = 'promo',
54
+ imageSrc,
55
+ imageStyle,
56
+ imageWidth,
57
+ iconA11yProps,
58
+ }: IPxEntryPoint) {
59
+ return (
60
+ <TouchableOpacity
61
+ {...a11y({
62
+ accessibilityRole: 'button',
63
+ accessible: true,
64
+ accessibilityLabel: title,
65
+ accessibilityHint: subTitle,
66
+ })}
67
+ style={[{ width: '100%' }, containerStyle]}
68
+ onPress={onPress}
69
+ {...e2eID(testID)}
70
+ >
71
+ <PxCard wrapperStyle={styles.container}>
72
+ {!!icon && <PxIcon name={icon} size={iconSize} />}
73
+ {!icon && !!imageSrc && (
74
+ <Image
75
+ source={imageSrc}
76
+ resizeMode="stretch"
77
+ style={[
78
+ { height: imageWidth ?? 50, width: imageWidth ?? 50 },
79
+ imageStyle,
80
+ ]}
81
+ accessibilityIgnoresInvertColors
82
+ />
83
+ )}
84
+ {!icon && !imageSrc && !!leftComponent && (
85
+ <View style={styles.leftComponent}>{leftComponent}</View>
86
+ )}
87
+ <View style={styles.content}>
88
+ <Header
89
+ style={{
90
+ fontSize: 14,
91
+ }}
92
+ >
93
+ {title}
94
+ </Header>
95
+ {subTitle && <Body {...e2eID(`${testID}_subTitle`)}>{subTitle}</Body>}
96
+ </View>
97
+ {rightComponent}
98
+ <PxIcon
99
+ containerStyle={[styles.rightIcon]}
100
+ background={false}
101
+ name={'chevron_right'}
102
+ size={24}
103
+ style={{
104
+ marginLeft: 1,
105
+ }}
106
+ {...a11y({ accessible: true, ...iconA11yProps })}
107
+ />
108
+ </PxCard>
109
+ {patch ? (
110
+ <PxPatch
111
+ borderType={'bottomLeft'}
112
+ type={patchType}
113
+ title={patch}
114
+ wrapperStyle={{ position: 'absolute', top: -13, right: 16 }}
115
+ {...a11y({ accessible: false })}
116
+ />
117
+ ) : undefined}
118
+ </TouchableOpacity>
119
+ );
120
+ }
121
+
122
+ const styles = StyleSheet.create({
123
+ container: {
124
+ flexDirection: 'row',
125
+ padding: 16,
126
+ alignItems: 'center',
127
+ backgroundColor: Colors.v8_1.shadesOfGrey.dark4,
128
+ },
129
+ content: {
130
+ flex: 1,
131
+ marginLeft: 16,
132
+ },
133
+ rightIcon: {
134
+ marginLeft: 16,
135
+ width: 24,
136
+ height: 24,
137
+ },
138
+ leftComponent: {
139
+ justifyContent: 'center',
140
+ alignItems: 'center',
141
+ },
142
+ });
package/src/index.ts ADDED
@@ -0,0 +1 @@
1
+ export * from './PxEntryPoint';
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
+ }