@proximus/lavender-selectablebox-native 0.1.0-alpha.4 → 0.1.0-alpha.6

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 CHANGED
@@ -3,49 +3,12 @@
3
3
  All notable changes to this project will be documented in this file.
4
4
  See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
5
5
 
6
- # [0.1.0-alpha.4](https://github.com/Pxs-Corporate/react-native-lavender/compare/@proximus/lavender-selectablebox-native@0.1.0-alpha.3...@proximus/lavender-selectablebox-native@0.1.0-alpha.4) (2025-09-19)
6
+ # [0.1.0-alpha.6](https://github.com/Pxs-Corporate/react-native-lavender/compare/@proximus/lavender-selectablebox-native@0.1.0-alpha.5...@proximus/lavender-selectablebox-native@0.1.0-alpha.6) (2025-09-26)
7
7
 
8
8
  **Note:** Version bump only for package @proximus/lavender-selectablebox-native
9
9
 
10
- # [0.1.0-alpha.3](https://github.com/Pxs-Corporate/react-native-lavender/compare/@proximus/lavender-selectablebox-native@0.1.0-alpha.2...@proximus/lavender-selectablebox-native@0.1.0-alpha.3) (2025-09-12)
11
-
12
- **Note:** Version bump only for package @proximus/lavender-selectablebox-native
13
-
14
- # [0.1.0-alpha.2](https://github.com/Pxs-Corporate/react-native-lavender/compare/@proximus/lavender-selectablebox-native@0.1.0-alpha.1...@proximus/lavender-selectablebox-native@0.1.0-alpha.2) (2025-09-05)
15
-
16
- ### Features
17
-
18
- - **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))
19
-
20
- # [0.1.0-alpha.1](https://github.com/Pxs-Corporate/react-native-lavender/compare/@proximus/lavender-selectablebox-native@0.1.0-alpha.0...@proximus/lavender-selectablebox-native@0.1.0-alpha.1) (2025-08-13)
21
-
22
- ### Bug Fixes
23
-
24
- - **BCRI-4210372:** fix types field in modules ([68ac126](https://github.com/Pxs-Corporate/react-native-lavender/commit/68ac12657112473ae9e0e683076b1d9172be9ce6))
25
-
26
- # 0.1.0-alpha.0 (2025-08-13)
10
+ # [0.1.0-alpha.5](https://github.com/Pxs-Corporate/react-native-lavender/compare/@proximus/lavender-selectablebox-native@0.1.0-alpha.4...@proximus/lavender-selectablebox-native@0.1.0-alpha.5) (2025-09-25)
27
11
 
28
12
  ### Bug Fixes
29
13
 
30
- - **BCRI-3807748:** fix checkbox android native crash ([f358872](https://github.com/Pxs-Corporate/react-native-lavender/commit/f3588725a8a7440722b6fc13a5586da2da758ea0))
31
-
32
- ### Features
33
-
34
- - **BCRI-000000:** remove default E2E on DEV env build for all components ([a5d27bf](https://github.com/Pxs-Corporate/react-native-lavender/commit/a5d27bfaaebf5b75f3160f31c64b590b7bd00b93))
35
- - **BCRI-3651768:** selectable box module ([20a18ab](https://github.com/Pxs-Corporate/react-native-lavender/commit/20a18ab36049889d8860395a3e6ced9469bd6c0c))
36
- - **BCRI-3810979:** tile components ([46fc5c7](https://github.com/Pxs-Corporate/react-native-lavender/commit/46fc5c7a0ddff6c2db43fba0de9929626092f265))
37
- - **BCRI-4210372:** automatic versionning ([9c1f0a0](https://github.com/Pxs-Corporate/react-native-lavender/commit/9c1f0a00e19a9d1a277044ea627632032a674102))
38
- - **BCRI-4210372:** fix bad version numbers ([bc6a8ba](https://github.com/Pxs-Corporate/react-native-lavender/commit/bc6a8ba48c15347442f2ac38dacae7ffba3d95eb))
39
-
40
- # (2025-08-13)
41
-
42
- ### Bug Fixes
43
-
44
- - **BCRI-3807748:** fix checkbox android native crash ([f358872](https://github.com/Pxs-Corporate/react-native-lavender/commit/f3588725a8a7440722b6fc13a5586da2da758ea0))
45
-
46
- ### Features
47
-
48
- - **BCRI-000000:** remove default E2E on DEV env build for all components ([a5d27bf](https://github.com/Pxs-Corporate/react-native-lavender/commit/a5d27bfaaebf5b75f3160f31c64b590b7bd00b93))
49
- - **BCRI-3651768:** selectable box module ([20a18ab](https://github.com/Pxs-Corporate/react-native-lavender/commit/20a18ab36049889d8860395a3e6ced9469bd6c0c))
50
- - **BCRI-3810979:** tile components ([46fc5c7](https://github.com/Pxs-Corporate/react-native-lavender/commit/46fc5c7a0ddff6c2db43fba0de9929626092f265))
51
- - **BCRI-4210372:** automatic versionning ([9c1f0a0](https://github.com/Pxs-Corporate/react-native-lavender/commit/9c1f0a00e19a9d1a277044ea627632032a674102))
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))
@@ -0,0 +1,106 @@
1
+ import React from 'react';
2
+ import { StyleSheet, TouchableOpacity, View, } from 'react-native';
3
+ import { a11y, e2eID } from '@proximus/lavender-common-native';
4
+ import { PxRadioButton } from '@proximus/lavender-radio-native';
5
+ import { PxCheckBox } from '@proximus/lavender-checkbox-native';
6
+ import { useTheme } from '@proximus/lavender-styling-native';
7
+ import { Body, Header } from '@proximus/lavender-texts-native';
8
+ export function PxSelectableBox({ selected, label, onPress, containerStyle, withCheckbox, disabled = false, locked, priceComponent, contentComponent, description, testID = 'selectableBox', ...accessibilityProps }) {
9
+ const { theme } = useTheme();
10
+ const accessibilityRole = locked
11
+ ? 'text'
12
+ : withCheckbox
13
+ ? 'checkbox'
14
+ : 'radio';
15
+ const accessibilityHint = `Selectable Item ${label}, checked: ${selected}`;
16
+ const colors = {
17
+ uncheckedBorderColor: theme.t('ColorBorderMainDefault'),
18
+ backgroundColor: theme.t('ColorBackgroundContainerLightDefault'),
19
+ focusBorderColor: theme.t('ColorBorderBrandDefault'),
20
+ disabledBackgroundColor: theme.t('ColorBackgroundStateDisabledDefault'),
21
+ defaultLabel: theme.t('ColorTextNeutralDefault'),
22
+ uncheckedLabel: theme.t('ColorTextNeutralDefault'),
23
+ borderColor: theme.t('ColorBorderBrandDefault'),
24
+ };
25
+ return (React.createElement(TouchableOpacity, { onPress: () => {
26
+ onPress?.(!selected);
27
+ }, style: [{ width: '100%' }, containerStyle], disabled: disabled || locked, ...e2eID(testID), ...a11y({
28
+ accessible: true,
29
+ accessibilityRole,
30
+ accessibilityHint,
31
+ accessibilityLabel: label,
32
+ accessibilityState: {
33
+ checked: selected,
34
+ disabled: disabled || locked,
35
+ },
36
+ ...accessibilityProps,
37
+ }) },
38
+ React.createElement(View, { style: [
39
+ styles.container,
40
+ {
41
+ borderColor: selected
42
+ ? colors.borderColor
43
+ : colors.uncheckedBorderColor,
44
+ backgroundColor: colors.backgroundColor,
45
+ },
46
+ disabled && {
47
+ borderWidth: 0,
48
+ backgroundColor: colors.disabledBackgroundColor,
49
+ },
50
+ locked && {
51
+ borderColor: colors.borderColor,
52
+ },
53
+ ], ...a11y({
54
+ accessible: true,
55
+ accessibilityRole,
56
+ accessibilityHint,
57
+ }) },
58
+ React.createElement(View, { style: styles.topContentContainer },
59
+ React.createElement(View, { style: styles.topContainer },
60
+ withCheckbox ? (React.createElement(PxCheckBox, { onChange: onPress, checked: selected, disabled: disabled })) : (React.createElement(PxRadioButton, { onPress: () => onPress?.(!selected), checked: selected, disabled: disabled })),
61
+ React.createElement(View, { style: styles.textContainer },
62
+ React.createElement(Header, { textBreakStrategy: 'balanced', accessible: true, style: [
63
+ styles.title,
64
+ {
65
+ color: !selected
66
+ ? colors.uncheckedLabel
67
+ : colors.defaultLabel,
68
+ },
69
+ ] }, label),
70
+ React.createElement(Body, { style: styles.description }, description))),
71
+ contentComponent && (React.createElement(View, { style: { marginTop: 16 } }, contentComponent))),
72
+ priceComponent && (React.createElement(View, { style: styles.priceComponent }, priceComponent)))));
73
+ }
74
+ const styles = StyleSheet.create({
75
+ container: {
76
+ flexDirection: 'row',
77
+ borderWidth: 2,
78
+ borderRadius: 12,
79
+ },
80
+ title: {
81
+ fontSize: 14,
82
+ },
83
+ priceComponent: {
84
+ padding: 8,
85
+ alignItems: 'center',
86
+ justifyContent: 'center',
87
+ },
88
+ description: {
89
+ fontSize: 12,
90
+ },
91
+ topContentContainer: {
92
+ padding: 16,
93
+ flex: 1,
94
+ },
95
+ topContainer: {
96
+ flexDirection: 'row',
97
+ alignItems: 'center',
98
+ justifyContent: 'flex-start',
99
+ },
100
+ textContainer: {
101
+ flexDirection: 'column',
102
+ marginHorizontal: 16,
103
+ justifyContent: 'center',
104
+ flex: 1,
105
+ },
106
+ });
@@ -0,0 +1,37 @@
1
+ {
2
+ "name": "@proximus/lavender-selectablebox-native",
3
+ "version": "0.1.0-alpha.6",
4
+ "description": "Lavender selectable box component",
5
+ "license": "MIT",
6
+ "main": "dist/index.js",
7
+ "type": "module",
8
+ "peerDependencies": {
9
+ "@proximus/lavender-checkbox-native": "*",
10
+ "@proximus/lavender-common-native": "*",
11
+ "@proximus/lavender-icon-native": "*",
12
+ "@proximus/lavender-radio-native": "*",
13
+ "@proximus/lavender-styling-native": "*",
14
+ "@proximus/lavender-texts-native": "*"
15
+ },
16
+ "publishConfig": {
17
+ "access": "public"
18
+ },
19
+ "lerna": {
20
+ "command": {
21
+ "publish": {
22
+ "assets": [
23
+ {
24
+ "from": "dist/far/away/package.json",
25
+ "to": "."
26
+ },
27
+ "dist/*.js",
28
+ "dist/*.d.ts",
29
+ "dist/*.d.ts.map",
30
+ "src",
31
+ "package.json"
32
+ ]
33
+ }
34
+ }
35
+ },
36
+ "gitHead": "e50a17526561b3eafb159e36c737173956093e0d"
37
+ }
package/dist/index.js ADDED
@@ -0,0 +1 @@
1
+ export * from './PxSelectableBox';
package/package.json CHANGED
@@ -1,13 +1,14 @@
1
1
  {
2
2
  "name": "@proximus/lavender-selectablebox-native",
3
- "version": "0.1.0-alpha.4",
3
+ "version": "0.1.0-alpha.6",
4
4
  "description": "Lavender selectable box component",
5
5
  "license": "MIT",
6
6
  "main": "src/index.ts",
7
7
  "type": "module",
8
8
  "scripts": {
9
9
  "clean": "rm -rf dist",
10
- "prepublish": "yarn clean && yarn build",
10
+ "transform-package-json": "node ../../../scripts/tranformPackageJson.js package.json dist/far/away",
11
+ "prepublish": "yarn clean && yarn transform-package-json && yarn build",
11
12
  "build": "npx tsc -p tsconfig.json"
12
13
  },
13
14
  "peerDependencies": {
@@ -19,12 +20,12 @@
19
20
  "@proximus/lavender-texts-native": "workspace:*"
20
21
  },
21
22
  "devDependencies": {
22
- "@proximus/lavender-checkbox-native": "0.1.0-alpha.4",
23
- "@proximus/lavender-common-native": "0.1.0-alpha.4",
24
- "@proximus/lavender-icon-native": "0.1.0-alpha.4",
25
- "@proximus/lavender-radio-native": "0.1.0-alpha.4",
26
- "@proximus/lavender-styling-native": "0.1.0-alpha.3",
27
- "@proximus/lavender-texts-native": "0.1.0-alpha.4"
23
+ "@proximus/lavender-checkbox-native": "0.1.0-alpha.6",
24
+ "@proximus/lavender-common-native": "0.1.0-alpha.6",
25
+ "@proximus/lavender-icon-native": "0.1.0-alpha.6",
26
+ "@proximus/lavender-radio-native": "0.1.0-alpha.6",
27
+ "@proximus/lavender-styling-native": "0.1.0-alpha.5",
28
+ "@proximus/lavender-texts-native": "0.1.0-alpha.6"
28
29
  },
29
30
  "publishConfig": {
30
31
  "access": "public"
@@ -33,12 +34,18 @@
33
34
  "command": {
34
35
  "publish": {
35
36
  "assets": [
36
- "dist",
37
+ {
38
+ "from": "dist/far/away/package.json",
39
+ "to": "."
40
+ },
41
+ "dist/*.js",
42
+ "dist/*.d.ts",
43
+ "dist/*.d.ts.map",
37
44
  "src",
38
45
  "package.json"
39
46
  ]
40
47
  }
41
48
  }
42
49
  },
43
- "gitHead": "6e9252a716a08ededdfbfd6f5b1db70ab21e026e"
50
+ "gitHead": "e50a17526561b3eafb159e36c737173956093e0d"
44
51
  }
package/tsconfig.json CHANGED
@@ -4,5 +4,5 @@
4
4
  "outDir": "dist",
5
5
  },
6
6
  "include": ["src","../../../lib.d.ts"],
7
- "exclude": ["dist", "node_modules", "src/**/*.test.ts", "src/**/*.spec.ts"]
7
+ "exclude": ["dist", "node_modules", "src/**/*.spec.tsx", "src/**/*.spec.ts"]
8
8
  }