@proximus/lavender-patch-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.
@@ -1 +1 @@
1
- {"version":3,"file":"PxPatch.d.ts","sourceRoot":"","sources":["../src/PxPatch.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EACL,kBAAkB,EAClB,SAAS,EAGT,SAAS,EACV,MAAM,cAAc,CAAC;AAKtB,OAAO,EAAE,QAAQ,EAAE,MAAM,2CAA2C,CAAC;AAGrE,MAAM,WAAW,aAAa;IAC5B,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,QAAQ,CAAC,EAAE,QAAQ,CAAC;IACpB,IAAI,EAAE,OAAO,GAAG,MAAM,GAAG,aAAa,GAAG,KAAK,CAAC;IAC/C,UAAU,CAAC,EAAE,YAAY,GAAG,aAAa,CAAC;IAC1C,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,YAAY,CAAC,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC;IACpC,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;CACtB;AAED,wBAAgB,OAAO,CAAC,EACtB,KAAK,EACL,MAAM,EACN,IAAI,EACJ,QAAQ,EACR,UAAU,EACV,YAAY,EACZ,OAAO,EACP,GAAG,kBAAkB,EACtB,EAAE,aAAa,GAAG,kBAAkB,qBA+FpC"}
1
+ {"version":3,"file":"PxPatch.d.ts","sourceRoot":"","sources":["../src/PxPatch.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EACL,kBAAkB,EAClB,SAAS,EAGT,SAAS,EACV,MAAM,cAAc,CAAC;AAKtB,OAAO,EAAE,QAAQ,EAAE,MAAM,2CAA2C,CAAC;AAGrE,MAAM,WAAW,aAAa;IAC5B,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,QAAQ,CAAC,EAAE,QAAQ,CAAC;IACpB,IAAI,EAAE,OAAO,GAAG,MAAM,GAAG,aAAa,GAAG,KAAK,CAAC;IAC/C,UAAU,CAAC,EAAE,YAAY,GAAG,aAAa,CAAC;IAC1C,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,YAAY,CAAC,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC;IACpC,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;CACtB;AAED,wBAAgB,OAAO,CAAC,EACtB,KAAK,EACL,MAAM,EACN,IAAI,EACJ,QAAQ,EACR,UAAU,EACV,YAAY,EACZ,OAAO,EACP,GAAG,kBAAkB,EACtB,EAAE,aAAa,GAAG,kBAAkB,qBAiGpC"}
package/dist/PxPatch.js CHANGED
@@ -66,12 +66,12 @@ export function PxPatch({ title, testID, type, iconName, borderType, wrapperStyl
66
66
  accessible: true,
67
67
  ...accessibilityProps,
68
68
  })
69
- : {}), ...e2eID(testID + '-PxPatch') },
70
- React.createElement(Header, { style: {
69
+ : {}), ...(testID && e2eID(testID + '-patch')) },
70
+ React.createElement(Header, { ...(testID && e2eID(testID + '-patch-label')), style: {
71
71
  color: fontColor(),
72
72
  lineHeight: theme.t('TextSizeLabelMMobile').number * 1.5,
73
73
  } }, title),
74
- iconName && onPress && type === 'promo' && (React.createElement(PxIcon, { name: iconName, size: 16, style: {
74
+ iconName && onPress && type === 'promo' && (React.createElement(PxIcon, { ...(testID && e2eID(testID + '-patch-icon')), name: iconName, size: 'Xs', style: {
75
75
  marginLeft: 5,
76
76
  color: fontColor(),
77
77
  } }))));
package/package.json CHANGED
@@ -1,47 +1,20 @@
1
1
  {
2
2
  "name": "@proximus/lavender-patch-native",
3
- "version": "0.1.0-alpha.6",
3
+ "version": "0.1.0-beta.0",
4
4
  "description": "Lavender patch component",
5
5
  "license": "MIT",
6
- "main": "src/index.ts",
6
+ "main": "dist/index.js",
7
+ "files": [
8
+ "dist"
9
+ ],
7
10
  "type": "module",
8
- "scripts": {
9
- "clean": "rm -rf dist",
10
- "transform-package-json": "node ../../../scripts/tranformPackageJson.js package.json dist/far/away",
11
- "prepublish": "yarn clean && yarn transform-package-json && yarn build",
12
- "build": "npx tsc -p tsconfig.json"
13
- },
14
11
  "peerDependencies": {
15
- "@proximus/lavender-common-native": "workspace:*",
16
- "@proximus/lavender-icon-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.6",
22
- "@proximus/lavender-icon-native": "0.1.0-alpha.6",
23
- "@proximus/lavender-styling-native": "0.1.0-alpha.5",
24
- "@proximus/lavender-texts-native": "0.1.0-alpha.6"
12
+ "@proximus/lavender-common-native": "*",
13
+ "@proximus/lavender-icon-native": "*",
14
+ "@proximus/lavender-styling-native": "*",
15
+ "@proximus/lavender-texts-native": "*"
25
16
  },
26
17
  "publishConfig": {
27
18
  "access": "public"
28
- },
29
- "lerna": {
30
- "command": {
31
- "publish": {
32
- "assets": [
33
- {
34
- "from": "dist/far/away/package.json",
35
- "to": "."
36
- },
37
- "dist/*.js",
38
- "dist/*.d.ts",
39
- "dist/*.d.ts.map",
40
- "src",
41
- "package.json"
42
- ]
43
- }
44
- }
45
- },
46
- "gitHead": "e50a17526561b3eafb159e36c737173956093e0d"
19
+ }
47
20
  }
package/CHANGELOG.md DELETED
@@ -1,55 +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-patch-native@0.1.0-alpha.5...@proximus/lavender-patch-native@0.1.0-alpha.6) (2025-09-26)
7
-
8
- **Note:** Version bump only for package @proximus/lavender-patch-native
9
-
10
- # [0.1.0-alpha.5](https://github.com/Pxs-Corporate/react-native-lavender/compare/@proximus/lavender-patch-native@0.1.0-alpha.4...@proximus/lavender-patch-native@0.1.0-alpha.5) (2025-09-25)
11
-
12
- ### Bug Fixes
13
-
14
- - **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))
15
-
16
- # [0.1.0-alpha.4](https://github.com/Pxs-Corporate/react-native-lavender/compare/@proximus/lavender-patch-native@0.1.0-alpha.3...@proximus/lavender-patch-native@0.1.0-alpha.4) (2025-09-19)
17
-
18
- **Note:** Version bump only for package @proximus/lavender-patch-native
19
-
20
- # [0.1.0-alpha.3](https://github.com/Pxs-Corporate/react-native-lavender/compare/@proximus/lavender-patch-native@0.1.0-alpha.2...@proximus/lavender-patch-native@0.1.0-alpha.3) (2025-09-12)
21
-
22
- **Note:** Version bump only for package @proximus/lavender-patch-native
23
-
24
- # [0.1.0-alpha.2](https://github.com/Pxs-Corporate/react-native-lavender/compare/@proximus/lavender-patch-native@0.1.0-alpha.1...@proximus/lavender-patch-native@0.1.0-alpha.2) (2025-09-05)
25
-
26
- ### Features
27
-
28
- - **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))
29
-
30
- # [0.1.0-alpha.1](https://github.com/Pxs-Corporate/react-native-lavender/compare/@proximus/lavender-patch-native@0.1.0-alpha.0...@proximus/lavender-patch-native@0.1.0-alpha.1) (2025-08-13)
31
-
32
- ### Bug Fixes
33
-
34
- - **BCRI-4210372:** fix types field in modules ([68ac126](https://github.com/Pxs-Corporate/react-native-lavender/commit/68ac12657112473ae9e0e683076b1d9172be9ce6))
35
-
36
- # 0.1.0-alpha.0 (2025-08-13)
37
-
38
- ### Features
39
-
40
- - **BCRI-000000:** remove default E2E on DEV env build for all components ([a5d27bf](https://github.com/Pxs-Corporate/react-native-lavender/commit/a5d27bfaaebf5b75f3160f31c64b590b7bd00b93))
41
- - **BCRI-3651742:** patch module ([46bf85e](https://github.com/Pxs-Corporate/react-native-lavender/commit/46bf85e225088cd3d90ed84a7e54c070a421805e))
42
- - **BCRI-4002610:** update icon handling and remove deprecated font references ([4399fe4](https://github.com/Pxs-Corporate/react-native-lavender/commit/4399fe4bff06aa70f5c29705fcc89d5243b0e3e7))
43
- - **BCRI-4002610:** update package versions and add new dependencies for styling and icon handling ([bd36e12](https://github.com/Pxs-Corporate/react-native-lavender/commit/bd36e120c36fd33602f441ceed5f41f15f81f0ea))
44
- - **BCRI-4210372:** automatic versionning ([9c1f0a0](https://github.com/Pxs-Corporate/react-native-lavender/commit/9c1f0a00e19a9d1a277044ea627632032a674102))
45
- - **BCRI-4210372:** fix bad version numbers ([bc6a8ba](https://github.com/Pxs-Corporate/react-native-lavender/commit/bc6a8ba48c15347442f2ac38dacae7ffba3d95eb))
46
-
47
- # (2025-08-13)
48
-
49
- ### Features
50
-
51
- - **BCRI-000000:** remove default E2E on DEV env build for all components ([a5d27bf](https://github.com/Pxs-Corporate/react-native-lavender/commit/a5d27bfaaebf5b75f3160f31c64b590b7bd00b93))
52
- - **BCRI-3651742:** patch module ([46bf85e](https://github.com/Pxs-Corporate/react-native-lavender/commit/46bf85e225088cd3d90ed84a7e54c070a421805e))
53
- - **BCRI-4002610:** update icon handling and remove deprecated font references ([4399fe4](https://github.com/Pxs-Corporate/react-native-lavender/commit/4399fe4bff06aa70f5c29705fcc89d5243b0e3e7))
54
- - **BCRI-4002610:** update package versions and add new dependencies for styling and icon handling ([bd36e12](https://github.com/Pxs-Corporate/react-native-lavender/commit/bd36e120c36fd33602f441ceed5f41f15f81f0ea))
55
- - **BCRI-4210372:** automatic versionning ([9c1f0a0](https://github.com/Pxs-Corporate/react-native-lavender/commit/9c1f0a00e19a9d1a277044ea627632032a674102))
@@ -1,35 +0,0 @@
1
- {
2
- "name": "@proximus/lavender-patch-native",
3
- "version": "0.1.0-alpha.6",
4
- "description": "Lavender patch component",
5
- "license": "MIT",
6
- "main": "dist/index.js",
7
- "type": "module",
8
- "peerDependencies": {
9
- "@proximus/lavender-common-native": "*",
10
- "@proximus/lavender-icon-native": "*",
11
- "@proximus/lavender-styling-native": "*",
12
- "@proximus/lavender-texts-native": "*"
13
- },
14
- "publishConfig": {
15
- "access": "public"
16
- },
17
- "lerna": {
18
- "command": {
19
- "publish": {
20
- "assets": [
21
- {
22
- "from": "dist/far/away/package.json",
23
- "to": "."
24
- },
25
- "dist/*.js",
26
- "dist/*.d.ts",
27
- "dist/*.d.ts.map",
28
- "src",
29
- "package.json"
30
- ]
31
- }
32
- }
33
- },
34
- "gitHead": "e50a17526561b3eafb159e36c737173956093e0d"
35
- }
package/src/PxPatch.tsx DELETED
@@ -1,131 +0,0 @@
1
- import React from 'react';
2
- import {
3
- AccessibilityProps,
4
- StyleProp,
5
- TouchableOpacity,
6
- View,
7
- ViewStyle,
8
- } from 'react-native';
9
-
10
- import { a11y, e2eID } from '@proximus/lavender-common-native';
11
- import { Header } from '@proximus/lavender-texts-native';
12
- import { PxIcon } from '@proximus/lavender-icon-native';
13
- import { IconName } from '@proximus/lavender-icon/dist/iconNames.js';
14
- import { useTheme } from '@proximus/lavender-styling-native';
15
-
16
- export interface IPxPatchProps {
17
- title: string;
18
- testID?: string;
19
- iconName?: IconName;
20
- type: 'promo' | 'info' | 'blackfriday' | 'eco';
21
- borderType?: 'bottomLeft' | 'bottomRight';
22
- isFocused?: boolean;
23
- wrapperStyle?: StyleProp<ViewStyle>;
24
- onPress?: () => void;
25
- }
26
-
27
- export function PxPatch({
28
- title,
29
- testID,
30
- type,
31
- iconName,
32
- borderType,
33
- wrapperStyle,
34
- onPress,
35
- ...accessibilityProps
36
- }: IPxPatchProps & AccessibilityProps) {
37
- const { theme } = useTheme();
38
-
39
- const backgroundColor = () => {
40
- switch (type) {
41
- case 'promo':
42
- return {
43
- backgroundColor: theme.t('ColorBackgroundPurposePromoDefault'),
44
- };
45
- case 'info':
46
- return {
47
- backgroundColor: theme.t('ColorBackgroundPurposeInfoDefault'),
48
- };
49
- case 'blackfriday':
50
- return {
51
- backgroundColor: theme.t('ColorBackgroundSurfaceDark'),
52
- };
53
- case 'eco':
54
- return {
55
- backgroundColor: theme.t('ColorBackgroundPurposeEcoDefault'),
56
- };
57
- default:
58
- return undefined;
59
- }
60
- };
61
- const borderStyle = () => {
62
- if (borderType === 'bottomLeft') {
63
- return {
64
- borderBottomLeftRadius: 0,
65
- };
66
- }
67
- if (borderType === 'bottomRight') {
68
- return {
69
- borderBottomRightRadius: 0,
70
- };
71
- }
72
- return undefined;
73
- };
74
-
75
- const fontColor = () => {
76
- if (type !== 'info') {
77
- return theme.t('ColorTextNeutralInverted');
78
- }
79
- return theme.t('ColorTextNeutralInverted');
80
- };
81
-
82
- const Wrapper = (onPress ? TouchableOpacity : View) as React.ElementType;
83
-
84
- return (
85
- <Wrapper
86
- style={[
87
- {
88
- alignItems: 'center',
89
- flexDirection: 'row',
90
- height: 26,
91
- fontSize: theme.t('TextSizeLabelMMobile').number,
92
- paddingHorizontal: theme.t('PaddingSMobile').number,
93
- borderRadius: theme.t('RadiusPatchBig').number,
94
- },
95
- borderStyle(),
96
- backgroundColor(),
97
- wrapperStyle,
98
- ]}
99
- accessible={false}
100
- disabled={!onPress}
101
- onPress={onPress}
102
- {...(onPress
103
- ? a11y({
104
- accessibilityRole: 'button',
105
- accessible: true,
106
- ...accessibilityProps,
107
- })
108
- : {})}
109
- {...e2eID(testID + '-PxPatch')}
110
- >
111
- <Header
112
- style={{
113
- color: fontColor(),
114
- lineHeight: theme.t('TextSizeLabelMMobile').number * 1.5,
115
- }}
116
- >
117
- {title}
118
- </Header>
119
- {iconName && onPress && type === 'promo' && (
120
- <PxIcon
121
- name={iconName}
122
- size={16}
123
- style={{
124
- marginLeft: 5,
125
- color: fontColor(),
126
- }}
127
- />
128
- )}
129
- </Wrapper>
130
- );
131
- }
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
package/src/index.ts DELETED
@@ -1 +0,0 @@
1
- export * from './PxPatch';
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
- }