@proximus/lavender-entrypoint-native 0.1.0-alpha.4 → 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.
@@ -0,0 +1,51 @@
1
+ import React from 'react';
2
+ import { Image, StyleSheet, TouchableOpacity, View, } from 'react-native';
3
+ import { a11y, e2eID, PxContainer } from '@proximus/lavender-common-native';
4
+ import { PxIcon } from '@proximus/lavender-icon-native';
5
+ import { Body, Header } from '@proximus/lavender-texts-native';
6
+ import { PxPatch } from '@proximus/lavender-patch-native';
7
+ export function PxEntryPoint({ title, subTitle, icon, onPress, iconSize = 24, containerStyle, leftComponent, rightComponent, testID, patch, patchType = 'promo', imageSrc, imageStyle, imageWidth, iconA11yProps, }) {
8
+ return (React.createElement(TouchableOpacity, { ...a11y({
9
+ accessibilityRole: 'button',
10
+ accessible: true,
11
+ accessibilityLabel: title,
12
+ accessibilityHint: subTitle,
13
+ }), style: [{ width: '100%' }, containerStyle], onPress: onPress, ...e2eID(testID) },
14
+ React.createElement(PxContainer, { wrapperStyle: styles.container },
15
+ !!icon && React.createElement(PxIcon, { name: icon, deprecatedSize: iconSize }),
16
+ !icon && !!imageSrc && (React.createElement(Image, { source: imageSrc, resizeMode: "stretch", style: [
17
+ { height: imageWidth ?? 50, width: imageWidth ?? 50 },
18
+ imageStyle,
19
+ ], accessibilityIgnoresInvertColors: true })),
20
+ !icon && !imageSrc && !!leftComponent && (React.createElement(View, { style: styles.leftComponent }, leftComponent)),
21
+ React.createElement(View, { style: styles.content },
22
+ React.createElement(Header, { style: {
23
+ fontSize: 14,
24
+ } }, title),
25
+ subTitle && React.createElement(Body, { ...e2eID(`${testID}_subTitle`) }, subTitle)),
26
+ rightComponent,
27
+ React.createElement(PxIcon, { containerStyle: [styles.rightIcon], background: false, name: 'chevron_right', size: 'M', style: {
28
+ marginLeft: 1,
29
+ }, ...a11y({ accessible: true, ...iconA11yProps }) })),
30
+ patch ? (React.createElement(PxPatch, { borderType: 'bottomLeft', type: patchType, title: patch, wrapperStyle: { position: 'absolute', top: -13, right: 16 }, ...a11y({ accessible: false }) })) : undefined));
31
+ }
32
+ const styles = StyleSheet.create({
33
+ container: {
34
+ flexDirection: 'row',
35
+ padding: 16,
36
+ alignItems: 'center',
37
+ },
38
+ content: {
39
+ flex: 1,
40
+ marginLeft: 16,
41
+ },
42
+ rightIcon: {
43
+ marginLeft: 16,
44
+ width: 24,
45
+ height: 24,
46
+ },
47
+ leftComponent: {
48
+ justifyContent: 'center',
49
+ alignItems: 'center',
50
+ },
51
+ });
package/package.json CHANGED
@@ -1,42 +1,21 @@
1
1
  {
2
2
  "name": "@proximus/lavender-entrypoint-native",
3
- "version": "0.1.0-alpha.4",
3
+ "version": "0.1.0-beta.0",
4
4
  "description": "Lavender entrypoint component",
5
5
  "license": "MIT",
6
- "main": "src/index.ts",
6
+ "main": "dist/index.js",
7
7
  "type": "module",
8
- "scripts": {
9
- "clean": "rm -rf dist",
10
- "prepublish": "yarn clean && yarn build",
11
- "build": "npx tsc -p tsconfig.json"
12
- },
8
+ "files": [
9
+ "dist"
10
+ ],
13
11
  "peerDependencies": {
14
- "@proximus/lavender-common-native": "workspace:*",
15
- "@proximus/lavender-icon-native": "workspace:*",
16
- "@proximus/lavender-patch-native": "workspace:*",
17
- "@proximus/lavender-styling-native": "workspace:*",
18
- "@proximus/lavender-texts-native": "workspace:*"
19
- },
20
- "devDependencies": {
21
- "@proximus/lavender-common-native": "0.1.0-alpha.4",
22
- "@proximus/lavender-icon-native": "0.1.0-alpha.4",
23
- "@proximus/lavender-patch-native": "0.1.0-alpha.4",
24
- "@proximus/lavender-styling-native": "0.1.0-alpha.3",
25
- "@proximus/lavender-texts-native": "0.1.0-alpha.4"
12
+ "@proximus/lavender-common-native": "*",
13
+ "@proximus/lavender-icon-native": "*",
14
+ "@proximus/lavender-patch-native": "*",
15
+ "@proximus/lavender-styling-native": "*",
16
+ "@proximus/lavender-texts-native": "*"
26
17
  },
27
18
  "publishConfig": {
28
19
  "access": "public"
29
- },
30
- "lerna": {
31
- "command": {
32
- "publish": {
33
- "assets": [
34
- "dist",
35
- "src",
36
- "package.json"
37
- ]
38
- }
39
- }
40
- },
41
- "gitHead": "6e9252a716a08ededdfbfd6f5b1db70ab21e026e"
20
+ }
42
21
  }
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.4](https://github.com/Pxs-Corporate/react-native-lavender/compare/@proximus/lavender-entrypoint-native@0.1.0-alpha.3...@proximus/lavender-entrypoint-native@0.1.0-alpha.4) (2025-09-19)
7
-
8
- **Note:** Version bump only for package @proximus/lavender-entrypoint-native
9
-
10
- # [0.1.0-alpha.3](https://github.com/Pxs-Corporate/react-native-lavender/compare/@proximus/lavender-entrypoint-native@0.1.0-alpha.2...@proximus/lavender-entrypoint-native@0.1.0-alpha.3) (2025-09-12)
11
-
12
- ### Features
13
-
14
- - **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))
15
-
16
- # [0.1.0-alpha.2](https://github.com/Pxs-Corporate/react-native-lavender/compare/@proximus/lavender-entrypoint-native@0.1.0-alpha.1...@proximus/lavender-entrypoint-native@0.1.0-alpha.2) (2025-09-05)
17
-
18
- ### Features
19
-
20
- - **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))
21
-
22
- # [0.1.0-alpha.1](https://github.com/Pxs-Corporate/react-native-lavender/compare/@proximus/lavender-entrypoint-native@0.1.0-alpha.0...@proximus/lavender-entrypoint-native@0.1.0-alpha.1) (2025-08-13)
23
-
24
- ### Bug Fixes
25
-
26
- - **BCRI-4210372:** fix types field in modules ([68ac126](https://github.com/Pxs-Corporate/react-native-lavender/commit/68ac12657112473ae9e0e683076b1d9172be9ce6))
27
-
28
- # 0.1.0-alpha.0 (2025-08-13)
29
-
30
- ### Features
31
-
32
- - **BCRI-000000:** adding testids on cells ([1e5f002](https://github.com/Pxs-Corporate/react-native-lavender/commit/1e5f00201a84516c1a6fe3fe5c04032204c32ae8))
33
- - **BCRI-000000:** remove default E2E on DEV env build for all components ([a5d27bf](https://github.com/Pxs-Corporate/react-native-lavender/commit/a5d27bfaaebf5b75f3160f31c64b590b7bd00b93))
34
- - **BCRI-3651673:** entrypoint module ([9a246af](https://github.com/Pxs-Corporate/react-native-lavender/commit/9a246af671f674f0ff768a9b6a72a77d1f12d065))
35
- - **BCRI-3707400:** entrypoint prefix slot ([5f5c4a9](https://github.com/Pxs-Corporate/react-native-lavender/commit/5f5c4a9a973a5168d359f6d4a9413a3b7bf50d48))
36
- - **BCRI-4002610:** update icon handling and remove deprecated font references ([4399fe4](https://github.com/Pxs-Corporate/react-native-lavender/commit/4399fe4bff06aa70f5c29705fcc89d5243b0e3e7))
37
- - **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))
38
- - **BCRI-4210372:** automatic versionning ([9c1f0a0](https://github.com/Pxs-Corporate/react-native-lavender/commit/9c1f0a00e19a9d1a277044ea627632032a674102))
39
- - **BCRI-4210372:** fix bad version numbers ([bc6a8ba](https://github.com/Pxs-Corporate/react-native-lavender/commit/bc6a8ba48c15347442f2ac38dacae7ffba3d95eb))
40
-
41
- # (2025-08-13)
42
-
43
- ### Features
44
-
45
- - **BCRI-000000:** adding testids on cells ([1e5f002](https://github.com/Pxs-Corporate/react-native-lavender/commit/1e5f00201a84516c1a6fe3fe5c04032204c32ae8))
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-3651673:** entrypoint module ([9a246af](https://github.com/Pxs-Corporate/react-native-lavender/commit/9a246af671f674f0ff768a9b6a72a77d1f12d065))
48
- - **BCRI-3707400:** entrypoint prefix slot ([5f5c4a9](https://github.com/Pxs-Corporate/react-native-lavender/commit/5f5c4a9a973a5168d359f6d4a9413a3b7bf50d48))
49
- - **BCRI-4002610:** update icon handling and remove deprecated font references ([4399fe4](https://github.com/Pxs-Corporate/react-native-lavender/commit/4399fe4bff06aa70f5c29705fcc89d5243b0e3e7))
50
- - **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))
51
- - **BCRI-4210372:** automatic versionning ([9c1f0a0](https://github.com/Pxs-Corporate/react-native-lavender/commit/9c1f0a00e19a9d1a277044ea627632032a674102))
@@ -1,140 +0,0 @@
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, PxContainer } from '@proximus/lavender-common-native';
15
- import { PxIcon } from '@proximus/lavender-icon-native';
16
- import { Body, Header } from '@proximus/lavender-texts-native';
17
- import { PxPatch } from '@proximus/lavender-patch-native';
18
- import { IconName } from '@proximus/lavender-icon/dist/iconNames.js';
19
-
20
- export interface IPxEntryPoint extends AccessibilityProps {
21
- title: string;
22
- subTitle?: string;
23
- icon?: IconName;
24
- iconSize?: number;
25
- containerStyle?: StyleProp<ViewStyle>;
26
- emphasis?: boolean;
27
- onPress: () => void;
28
- leftComponent?: ReactNode;
29
- rightComponent?: ReactElement;
30
- testID?: string;
31
- disabled?: boolean;
32
- imageSrc?: ImageURISource;
33
- imageStyle?: StyleProp<ImageStyle>;
34
- imageWidth?: number;
35
- imageA11yProps?: AccessibilityProps;
36
- iconA11yProps?: AccessibilityProps;
37
- patch?: string;
38
- patchType?: any;
39
- }
40
-
41
- export function PxEntryPoint({
42
- title,
43
- subTitle,
44
- icon,
45
- onPress,
46
- iconSize = 24,
47
- containerStyle,
48
- leftComponent,
49
- rightComponent,
50
- testID,
51
- patch,
52
- patchType = 'promo',
53
- imageSrc,
54
- imageStyle,
55
- imageWidth,
56
- iconA11yProps,
57
- }: IPxEntryPoint) {
58
- return (
59
- <TouchableOpacity
60
- {...a11y({
61
- accessibilityRole: 'button',
62
- accessible: true,
63
- accessibilityLabel: title,
64
- accessibilityHint: subTitle,
65
- })}
66
- style={[{ width: '100%' }, containerStyle]}
67
- onPress={onPress}
68
- {...e2eID(testID)}
69
- >
70
- <PxContainer wrapperStyle={styles.container}>
71
- {!!icon && <PxIcon name={icon} size={iconSize} />}
72
- {!icon && !!imageSrc && (
73
- <Image
74
- source={imageSrc}
75
- resizeMode="stretch"
76
- style={[
77
- { height: imageWidth ?? 50, width: imageWidth ?? 50 },
78
- imageStyle,
79
- ]}
80
- accessibilityIgnoresInvertColors
81
- />
82
- )}
83
- {!icon && !imageSrc && !!leftComponent && (
84
- <View style={styles.leftComponent}>{leftComponent}</View>
85
- )}
86
- <View style={styles.content}>
87
- <Header
88
- style={{
89
- fontSize: 14,
90
- }}
91
- >
92
- {title}
93
- </Header>
94
- {subTitle && <Body {...e2eID(`${testID}_subTitle`)}>{subTitle}</Body>}
95
- </View>
96
- {rightComponent}
97
- <PxIcon
98
- containerStyle={[styles.rightIcon]}
99
- background={false}
100
- name={'chevron_right'}
101
- size={24}
102
- style={{
103
- marginLeft: 1,
104
- }}
105
- {...a11y({ accessible: true, ...iconA11yProps })}
106
- />
107
- </PxContainer>
108
- {patch ? (
109
- <PxPatch
110
- borderType={'bottomLeft'}
111
- type={patchType}
112
- title={patch}
113
- wrapperStyle={{ position: 'absolute', top: -13, right: 16 }}
114
- {...a11y({ accessible: false })}
115
- />
116
- ) : undefined}
117
- </TouchableOpacity>
118
- );
119
- }
120
-
121
- const styles = StyleSheet.create({
122
- container: {
123
- flexDirection: 'row',
124
- padding: 16,
125
- alignItems: 'center',
126
- },
127
- content: {
128
- flex: 1,
129
- marginLeft: 16,
130
- },
131
- rightIcon: {
132
- marginLeft: 16,
133
- width: 24,
134
- height: 24,
135
- },
136
- leftComponent: {
137
- justifyContent: 'center',
138
- alignItems: 'center',
139
- },
140
- });
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/**/*.test.ts", "src/**/*.spec.ts"]
8
- }
File without changes