@proximus/lavender-entrypoint-native 0.1.0-alpha.1 → 0.1.0-alpha.12

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 +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,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B,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,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.1",
3
+ "version": "0.1.0-alpha.12",
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.1",
22
- "@proximus/lavender-icon-native": "0.1.0-alpha.1",
23
- "@proximus/lavender-patch-native": "0.1.0-alpha.1",
24
- "@proximus/lavender-styling-native": "0.1.0-alpha.1",
25
- "@proximus/lavender-texts-native": "0.1.0-alpha.1"
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": "d422a1d369000e1e249afb26de2cef08930c2407"
20
+ }
42
21
  }
package/CHANGELOG.md DELETED
@@ -1,35 +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.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)
7
-
8
- ### Bug Fixes
9
-
10
- - **BCRI-4210372:** fix types field in modules ([68ac126](https://github.com/Pxs-Corporate/react-native-lavender/commit/68ac12657112473ae9e0e683076b1d9172be9ce6))
11
-
12
- # 0.1.0-alpha.0 (2025-08-13)
13
-
14
- ### Features
15
-
16
- - **BCRI-000000:** adding testids on cells ([1e5f002](https://github.com/Pxs-Corporate/react-native-lavender/commit/1e5f00201a84516c1a6fe3fe5c04032204c32ae8))
17
- - **BCRI-000000:** remove default E2E on DEV env build for all components ([a5d27bf](https://github.com/Pxs-Corporate/react-native-lavender/commit/a5d27bfaaebf5b75f3160f31c64b590b7bd00b93))
18
- - **BCRI-3651673:** entrypoint module ([9a246af](https://github.com/Pxs-Corporate/react-native-lavender/commit/9a246af671f674f0ff768a9b6a72a77d1f12d065))
19
- - **BCRI-3707400:** entrypoint prefix slot ([5f5c4a9](https://github.com/Pxs-Corporate/react-native-lavender/commit/5f5c4a9a973a5168d359f6d4a9413a3b7bf50d48))
20
- - **BCRI-4002610:** update icon handling and remove deprecated font references ([4399fe4](https://github.com/Pxs-Corporate/react-native-lavender/commit/4399fe4bff06aa70f5c29705fcc89d5243b0e3e7))
21
- - **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))
22
- - **BCRI-4210372:** automatic versionning ([9c1f0a0](https://github.com/Pxs-Corporate/react-native-lavender/commit/9c1f0a00e19a9d1a277044ea627632032a674102))
23
- - **BCRI-4210372:** fix bad version numbers ([bc6a8ba](https://github.com/Pxs-Corporate/react-native-lavender/commit/bc6a8ba48c15347442f2ac38dacae7ffba3d95eb))
24
-
25
- # (2025-08-13)
26
-
27
- ### Features
28
-
29
- - **BCRI-000000:** adding testids on cells ([1e5f002](https://github.com/Pxs-Corporate/react-native-lavender/commit/1e5f00201a84516c1a6fe3fe5c04032204c32ae8))
30
- - **BCRI-000000:** remove default E2E on DEV env build for all components ([a5d27bf](https://github.com/Pxs-Corporate/react-native-lavender/commit/a5d27bfaaebf5b75f3160f31c64b590b7bd00b93))
31
- - **BCRI-3651673:** entrypoint module ([9a246af](https://github.com/Pxs-Corporate/react-native-lavender/commit/9a246af671f674f0ff768a9b6a72a77d1f12d065))
32
- - **BCRI-3707400:** entrypoint prefix slot ([5f5c4a9](https://github.com/Pxs-Corporate/react-native-lavender/commit/5f5c4a9a973a5168d359f6d4a9413a3b7bf50d48))
33
- - **BCRI-4002610:** update icon handling and remove deprecated font references ([4399fe4](https://github.com/Pxs-Corporate/react-native-lavender/commit/4399fe4bff06aa70f5c29705fcc89d5243b0e3e7))
34
- - **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))
35
- - **BCRI-4210372:** automatic versionning ([9c1f0a0](https://github.com/Pxs-Corporate/react-native-lavender/commit/9c1f0a00e19a9d1a277044ea627632032a674102))
@@ -1,142 +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, 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/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