@proximus/lavender-checkbox-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.
- package/dist/PxCheckBox.js +2 -2
- package/package.json +9 -35
- package/CHANGELOG.md +0 -69
- package/dist/far/away/package.json +0 -34
- package/src/PxCheckBox.tsx +0 -163
- package/src/index.ts +0 -1
- package/tsconfig.json +0 -8
package/dist/PxCheckBox.js
CHANGED
|
@@ -39,7 +39,7 @@ export function PxCheckBox({ checked, onChange, testID, label, disabled = false,
|
|
|
39
39
|
onChangeCallback(!internalChecked);
|
|
40
40
|
}, ...a11y({
|
|
41
41
|
accessible: false,
|
|
42
|
-
}), ...e2eID(testID + '-checkbox'), disabled: disabled },
|
|
42
|
+
}), ...(testID && e2eID(testID + '-checkbox-wrapper')), disabled: disabled },
|
|
43
43
|
React.createElement(CheckBox, { lineWidth: 2, style: [
|
|
44
44
|
styles.checkbox,
|
|
45
45
|
{
|
|
@@ -66,7 +66,7 @@ export function PxCheckBox({ checked, onChange, testID, label, disabled = false,
|
|
|
66
66
|
accessibilityLabel: accessibilityProps.accessibilityLabel || label,
|
|
67
67
|
accessibilityHint: accessibilityProps.accessibilityHint,
|
|
68
68
|
importantForAccessibility: accessibilityProps.importantForAccessibility,
|
|
69
|
-
}), ...e2eID(testID + '-checkbox') }),
|
|
69
|
+
}), ...(testID && e2eID(testID + '-checkbox')) }),
|
|
70
70
|
label && label.trim() !== '' && (React.createElement(Body, { accessible: false, importantForAccessibility: 'no', style: [
|
|
71
71
|
styles.label,
|
|
72
72
|
{
|
package/package.json
CHANGED
|
@@ -1,45 +1,19 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@proximus/lavender-checkbox-native",
|
|
3
|
-
"version": "0.1.0-
|
|
3
|
+
"version": "0.1.0-beta.0",
|
|
4
4
|
"description": "Lavender Checkbox native component",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"type": "module",
|
|
7
|
-
"main": "
|
|
8
|
-
"
|
|
9
|
-
"
|
|
10
|
-
|
|
11
|
-
"prepublish": "yarn clean && yarn transform-package-json && yarn build",
|
|
12
|
-
"build": "npx tsc -p tsconfig.json"
|
|
13
|
-
},
|
|
7
|
+
"main": "dist/index.js",
|
|
8
|
+
"files": [
|
|
9
|
+
"dist"
|
|
10
|
+
],
|
|
14
11
|
"peerDependencies": {
|
|
15
|
-
"@proximus/lavender-common-native": "
|
|
16
|
-
"@proximus/lavender-styling-native": "
|
|
17
|
-
"@proximus/lavender-texts-native": "
|
|
18
|
-
},
|
|
19
|
-
"devDependencies": {
|
|
20
|
-
"@proximus/lavender-common-native": "0.1.0-alpha.6",
|
|
21
|
-
"@proximus/lavender-styling-native": "0.1.0-alpha.5",
|
|
22
|
-
"@proximus/lavender-texts-native": "0.1.0-alpha.6"
|
|
12
|
+
"@proximus/lavender-common-native": "*",
|
|
13
|
+
"@proximus/lavender-styling-native": "*",
|
|
14
|
+
"@proximus/lavender-texts-native": "*"
|
|
23
15
|
},
|
|
24
16
|
"publishConfig": {
|
|
25
17
|
"access": "public"
|
|
26
|
-
}
|
|
27
|
-
"lerna": {
|
|
28
|
-
"command": {
|
|
29
|
-
"publish": {
|
|
30
|
-
"assets": [
|
|
31
|
-
{
|
|
32
|
-
"from": "dist/far/away/package.json",
|
|
33
|
-
"to": "."
|
|
34
|
-
},
|
|
35
|
-
"dist/*.js",
|
|
36
|
-
"dist/*.d.ts",
|
|
37
|
-
"dist/*.d.ts.map",
|
|
38
|
-
"src",
|
|
39
|
-
"package.json"
|
|
40
|
-
]
|
|
41
|
-
}
|
|
42
|
-
}
|
|
43
|
-
},
|
|
44
|
-
"gitHead": "e50a17526561b3eafb159e36c737173956093e0d"
|
|
18
|
+
}
|
|
45
19
|
}
|
package/CHANGELOG.md
DELETED
|
@@ -1,69 +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-checkbox-native@0.1.0-alpha.5...@proximus/lavender-checkbox-native@0.1.0-alpha.6) (2025-09-26)
|
|
7
|
-
|
|
8
|
-
**Note:** Version bump only for package @proximus/lavender-checkbox-native
|
|
9
|
-
|
|
10
|
-
# [0.1.0-alpha.5](https://github.com/Pxs-Corporate/react-native-lavender/compare/@proximus/lavender-checkbox-native@0.1.0-alpha.4...@proximus/lavender-checkbox-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-checkbox-native@0.1.0-alpha.3...@proximus/lavender-checkbox-native@0.1.0-alpha.4) (2025-09-19)
|
|
17
|
-
|
|
18
|
-
**Note:** Version bump only for package @proximus/lavender-checkbox-native
|
|
19
|
-
|
|
20
|
-
# [0.1.0-alpha.3](https://github.com/Pxs-Corporate/react-native-lavender/compare/@proximus/lavender-checkbox-native@0.1.0-alpha.2...@proximus/lavender-checkbox-native@0.1.0-alpha.3) (2025-09-12)
|
|
21
|
-
|
|
22
|
-
**Note:** Version bump only for package @proximus/lavender-checkbox-native
|
|
23
|
-
|
|
24
|
-
# [0.1.0-alpha.2](https://github.com/Pxs-Corporate/react-native-lavender/compare/@proximus/lavender-checkbox-native@0.1.0-alpha.1...@proximus/lavender-checkbox-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-checkbox-native@0.1.0-alpha.0...@proximus/lavender-checkbox-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
|
-
### Bug Fixes
|
|
39
|
-
|
|
40
|
-
- **BCRI-3807748:** fix checkbox android native crash ([f358872](https://github.com/Pxs-Corporate/react-native-lavender/commit/f3588725a8a7440722b6fc13a5586da2da758ea0))
|
|
41
|
-
|
|
42
|
-
### Features
|
|
43
|
-
|
|
44
|
-
- **BCRI-000000:** remove default E2E on DEV env build for all components ([a5d27bf](https://github.com/Pxs-Corporate/react-native-lavender/commit/a5d27bfaaebf5b75f3160f31c64b590b7bd00b93))
|
|
45
|
-
- **BCRI-3651613:** checkbox module ([b791f5f](https://github.com/Pxs-Corporate/react-native-lavender/commit/b791f5f9482f1162302826092d946fa364f37e9d))
|
|
46
|
-
- **BCRI-3651673:** entrypoint module ([9a246af](https://github.com/Pxs-Corporate/react-native-lavender/commit/9a246af671f674f0ff768a9b6a72a77d1f12d065))
|
|
47
|
-
- **BCRI-3660857:** cell components ([af9e45c](https://github.com/Pxs-Corporate/react-native-lavender/commit/af9e45cefc20d08d2338380ff4cd8cd6851abe24))
|
|
48
|
-
- **BCRI-3707400:** entrypoint prefix slot ([5f5c4a9](https://github.com/Pxs-Corporate/react-native-lavender/commit/5f5c4a9a973a5168d359f6d4a9413a3b7bf50d48))
|
|
49
|
-
- **BCRI-3810979:** tile components ([46fc5c7](https://github.com/Pxs-Corporate/react-native-lavender/commit/46fc5c7a0ddff6c2db43fba0de9929626092f265))
|
|
50
|
-
- **BCRI-4002610:** update icon handling and remove deprecated font references ([4399fe4](https://github.com/Pxs-Corporate/react-native-lavender/commit/4399fe4bff06aa70f5c29705fcc89d5243b0e3e7))
|
|
51
|
-
- **BCRI-4210372:** automatic versionning ([9c1f0a0](https://github.com/Pxs-Corporate/react-native-lavender/commit/9c1f0a00e19a9d1a277044ea627632032a674102))
|
|
52
|
-
- **BCRI-4210372:** fix bad version numbers ([bc6a8ba](https://github.com/Pxs-Corporate/react-native-lavender/commit/bc6a8ba48c15347442f2ac38dacae7ffba3d95eb))
|
|
53
|
-
|
|
54
|
-
# (2025-08-13)
|
|
55
|
-
|
|
56
|
-
### Bug Fixes
|
|
57
|
-
|
|
58
|
-
- **BCRI-3807748:** fix checkbox android native crash ([f358872](https://github.com/Pxs-Corporate/react-native-lavender/commit/f3588725a8a7440722b6fc13a5586da2da758ea0))
|
|
59
|
-
|
|
60
|
-
### Features
|
|
61
|
-
|
|
62
|
-
- **BCRI-000000:** remove default E2E on DEV env build for all components ([a5d27bf](https://github.com/Pxs-Corporate/react-native-lavender/commit/a5d27bfaaebf5b75f3160f31c64b590b7bd00b93))
|
|
63
|
-
- **BCRI-3651613:** checkbox module ([b791f5f](https://github.com/Pxs-Corporate/react-native-lavender/commit/b791f5f9482f1162302826092d946fa364f37e9d))
|
|
64
|
-
- **BCRI-3651673:** entrypoint module ([9a246af](https://github.com/Pxs-Corporate/react-native-lavender/commit/9a246af671f674f0ff768a9b6a72a77d1f12d065))
|
|
65
|
-
- **BCRI-3660857:** cell components ([af9e45c](https://github.com/Pxs-Corporate/react-native-lavender/commit/af9e45cefc20d08d2338380ff4cd8cd6851abe24))
|
|
66
|
-
- **BCRI-3707400:** entrypoint prefix slot ([5f5c4a9](https://github.com/Pxs-Corporate/react-native-lavender/commit/5f5c4a9a973a5168d359f6d4a9413a3b7bf50d48))
|
|
67
|
-
- **BCRI-3810979:** tile components ([46fc5c7](https://github.com/Pxs-Corporate/react-native-lavender/commit/46fc5c7a0ddff6c2db43fba0de9929626092f265))
|
|
68
|
-
- **BCRI-4002610:** update icon handling and remove deprecated font references ([4399fe4](https://github.com/Pxs-Corporate/react-native-lavender/commit/4399fe4bff06aa70f5c29705fcc89d5243b0e3e7))
|
|
69
|
-
- **BCRI-4210372:** automatic versionning ([9c1f0a0](https://github.com/Pxs-Corporate/react-native-lavender/commit/9c1f0a00e19a9d1a277044ea627632032a674102))
|
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "@proximus/lavender-checkbox-native",
|
|
3
|
-
"version": "0.1.0-alpha.6",
|
|
4
|
-
"description": "Lavender Checkbox native component",
|
|
5
|
-
"license": "MIT",
|
|
6
|
-
"type": "module",
|
|
7
|
-
"main": "dist/index.js",
|
|
8
|
-
"peerDependencies": {
|
|
9
|
-
"@proximus/lavender-common-native": "*",
|
|
10
|
-
"@proximus/lavender-styling-native": "*",
|
|
11
|
-
"@proximus/lavender-texts-native": "*"
|
|
12
|
-
},
|
|
13
|
-
"publishConfig": {
|
|
14
|
-
"access": "public"
|
|
15
|
-
},
|
|
16
|
-
"lerna": {
|
|
17
|
-
"command": {
|
|
18
|
-
"publish": {
|
|
19
|
-
"assets": [
|
|
20
|
-
{
|
|
21
|
-
"from": "dist/far/away/package.json",
|
|
22
|
-
"to": "."
|
|
23
|
-
},
|
|
24
|
-
"dist/*.js",
|
|
25
|
-
"dist/*.d.ts",
|
|
26
|
-
"dist/*.d.ts.map",
|
|
27
|
-
"src",
|
|
28
|
-
"package.json"
|
|
29
|
-
]
|
|
30
|
-
}
|
|
31
|
-
}
|
|
32
|
-
},
|
|
33
|
-
"gitHead": "e50a17526561b3eafb159e36c737173956093e0d"
|
|
34
|
-
}
|
package/src/PxCheckBox.tsx
DELETED
|
@@ -1,163 +0,0 @@
|
|
|
1
|
-
import CheckBox from '@react-native-community/checkbox';
|
|
2
|
-
import React, { useCallback, useEffect, useState } from 'react';
|
|
3
|
-
import {
|
|
4
|
-
AccessibilityProps,
|
|
5
|
-
StyleProp,
|
|
6
|
-
StyleSheet,
|
|
7
|
-
TouchableOpacity,
|
|
8
|
-
ViewStyle,
|
|
9
|
-
} from 'react-native';
|
|
10
|
-
|
|
11
|
-
import { a11y, e2eID } from '@proximus/lavender-common-native';
|
|
12
|
-
import { useTheme } from '@proximus/lavender-styling-native';
|
|
13
|
-
import { Body } from '@proximus/lavender-texts-native';
|
|
14
|
-
import 'nullthrows';
|
|
15
|
-
|
|
16
|
-
export interface ICheckBoxProps {
|
|
17
|
-
/**
|
|
18
|
-
* Common Props
|
|
19
|
-
*/
|
|
20
|
-
checked: boolean;
|
|
21
|
-
onChange?: (value: boolean) => void;
|
|
22
|
-
disabled?: boolean;
|
|
23
|
-
testID?: string;
|
|
24
|
-
label?: string;
|
|
25
|
-
hasError?: boolean;
|
|
26
|
-
wrapperStyle?: StyleProp<ViewStyle>;
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
export function PxCheckBox({
|
|
30
|
-
checked,
|
|
31
|
-
onChange,
|
|
32
|
-
testID,
|
|
33
|
-
label,
|
|
34
|
-
disabled = false,
|
|
35
|
-
wrapperStyle,
|
|
36
|
-
...accessibilityProps
|
|
37
|
-
}: ICheckBoxProps & AccessibilityProps) {
|
|
38
|
-
const { theme } = useTheme();
|
|
39
|
-
|
|
40
|
-
const onChangeCallback = useCallback(
|
|
41
|
-
(value: boolean) => {
|
|
42
|
-
setInternalChecked(value);
|
|
43
|
-
if (onChange) {
|
|
44
|
-
onChange(value);
|
|
45
|
-
}
|
|
46
|
-
},
|
|
47
|
-
[onChange]
|
|
48
|
-
);
|
|
49
|
-
|
|
50
|
-
const [internalChecked, setInternalChecked] = useState(checked);
|
|
51
|
-
|
|
52
|
-
useEffect(() => {
|
|
53
|
-
setInternalChecked(checked);
|
|
54
|
-
}, [checked]);
|
|
55
|
-
|
|
56
|
-
const colors = {
|
|
57
|
-
disabledBackgroundColor: theme.t('ColorBackgroundStateDisabledDefault'),
|
|
58
|
-
disabledLabelColor: theme.t('ColorTextStateDisabledDefault'),
|
|
59
|
-
disabledCheckColor: 'rgba(255, 255, 255, 0.3)',
|
|
60
|
-
disabledBorderColor: theme.t('ColorBorderMainDefault'),
|
|
61
|
-
checkedBackgroundColor: theme.t('ColorBackgroundContainerPrimaryDefault'),
|
|
62
|
-
checkColor: '#FFFFFF',
|
|
63
|
-
tintColor: theme.t('ColorIconBrandDefault'),
|
|
64
|
-
backgroundColor: theme.t('ColorBackgroundContainerLightDefault'),
|
|
65
|
-
borderColor: theme.t('ColorBorderNeutralDefault'),
|
|
66
|
-
defaultLabelColor: theme.t('ColorTextNeutralDefault'),
|
|
67
|
-
};
|
|
68
|
-
|
|
69
|
-
return (
|
|
70
|
-
<TouchableOpacity
|
|
71
|
-
style={[
|
|
72
|
-
{
|
|
73
|
-
flexDirection: 'row',
|
|
74
|
-
alignItems: 'center',
|
|
75
|
-
},
|
|
76
|
-
wrapperStyle,
|
|
77
|
-
]}
|
|
78
|
-
onPress={() => {
|
|
79
|
-
onChangeCallback(!internalChecked);
|
|
80
|
-
}}
|
|
81
|
-
{...a11y({
|
|
82
|
-
accessible: false,
|
|
83
|
-
})}
|
|
84
|
-
{...e2eID(testID + '-checkbox')}
|
|
85
|
-
disabled={disabled}
|
|
86
|
-
>
|
|
87
|
-
<CheckBox
|
|
88
|
-
lineWidth={2}
|
|
89
|
-
style={[
|
|
90
|
-
styles.checkbox,
|
|
91
|
-
{
|
|
92
|
-
// @ts-ignore
|
|
93
|
-
width: theme.t('SizeM').number,
|
|
94
|
-
// @ts-ignore
|
|
95
|
-
height: theme.t('SizeM').number,
|
|
96
|
-
}, // Unchecked background color
|
|
97
|
-
]}
|
|
98
|
-
tintColors={{
|
|
99
|
-
// Android only
|
|
100
|
-
true: disabled ? colors.disabledBackgroundColor : colors.tintColor,
|
|
101
|
-
false: disabled ? colors.disabledBackgroundColor : colors.tintColor,
|
|
102
|
-
}}
|
|
103
|
-
tintColor={
|
|
104
|
-
// iOS only
|
|
105
|
-
disabled ? colors.disabledBackgroundColor : colors.borderColor // enabled
|
|
106
|
-
} // checkbox border color when unchecked
|
|
107
|
-
onTintColor={
|
|
108
|
-
// iOS only
|
|
109
|
-
disabled
|
|
110
|
-
? colors.disabledBackgroundColor
|
|
111
|
-
: colors.checkedBackgroundColor
|
|
112
|
-
} // checkbox border color when checked
|
|
113
|
-
onFillColor={
|
|
114
|
-
disabled
|
|
115
|
-
? colors.disabledBackgroundColor
|
|
116
|
-
: colors.checkedBackgroundColor
|
|
117
|
-
}
|
|
118
|
-
onCheckColor={disabled ? colors.disabledCheckColor : colors.checkColor}
|
|
119
|
-
animationDuration={0.2}
|
|
120
|
-
value={internalChecked}
|
|
121
|
-
disabled={disabled}
|
|
122
|
-
boxType={'square'}
|
|
123
|
-
onValueChange={onChangeCallback}
|
|
124
|
-
focusable={true}
|
|
125
|
-
{...a11y({
|
|
126
|
-
accessible: accessibilityProps.accessible,
|
|
127
|
-
accessibilityLabel: accessibilityProps.accessibilityLabel || label,
|
|
128
|
-
accessibilityHint: accessibilityProps.accessibilityHint,
|
|
129
|
-
importantForAccessibility:
|
|
130
|
-
accessibilityProps.importantForAccessibility,
|
|
131
|
-
})}
|
|
132
|
-
{...e2eID(testID + '-checkbox')}
|
|
133
|
-
/>
|
|
134
|
-
{label && label.trim() !== '' && (
|
|
135
|
-
<Body
|
|
136
|
-
accessible={false}
|
|
137
|
-
importantForAccessibility={'no'}
|
|
138
|
-
style={[
|
|
139
|
-
styles.label,
|
|
140
|
-
{
|
|
141
|
-
color: disabled
|
|
142
|
-
? colors.disabledLabelColor
|
|
143
|
-
: colors.defaultLabelColor,
|
|
144
|
-
},
|
|
145
|
-
]}
|
|
146
|
-
>
|
|
147
|
-
{label}
|
|
148
|
-
</Body>
|
|
149
|
-
)}
|
|
150
|
-
</TouchableOpacity>
|
|
151
|
-
);
|
|
152
|
-
}
|
|
153
|
-
|
|
154
|
-
const styles = StyleSheet.create({
|
|
155
|
-
checkbox: {
|
|
156
|
-
borderRadius: 5,
|
|
157
|
-
},
|
|
158
|
-
label: {
|
|
159
|
-
marginHorizontal: 12,
|
|
160
|
-
fontStyle: 'normal',
|
|
161
|
-
fontWeight: '400',
|
|
162
|
-
},
|
|
163
|
-
});
|
package/src/index.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from './PxCheckBox';
|