@proximus/lavender-icon-native 0.1.0-alpha.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/CHANGELOG.md ADDED
@@ -0,0 +1,22 @@
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.0 (2025-08-13)
7
+
8
+ ### Bug Fixes
9
+
10
+ - **BCRI-4026235:** icon fixes ([b5f0e58](https://github.com/Pxs-Corporate/react-native-lavender/commit/b5f0e58492a6bb654869e73b2f309d13037be76c))
11
+
12
+ ### Features
13
+
14
+ - **BCRI-3660857:** cell components ([af9e45c](https://github.com/Pxs-Corporate/react-native-lavender/commit/af9e45cefc20d08d2338380ff4cd8cd6851abe24))
15
+ - **BCRI-3689585:** icon module ([f13230d](https://github.com/Pxs-Corporate/react-native-lavender/commit/f13230d9c7643680089a0db2c69b96cd73ff246e))
16
+ - **BCRI-3702949:** tertiary button ([4999cea](https://github.com/Pxs-Corporate/react-native-lavender/commit/4999cea4d7866084d0f8c1cba37070c6cdaa7601))
17
+ - **BCRI-3702949:** tertiary button ([db24455](https://github.com/Pxs-Corporate/react-native-lavender/commit/db24455bd9687d80920be3e42c9e1fc14703a571))
18
+ - **BCRI-3810979:** tile components ([46fc5c7](https://github.com/Pxs-Corporate/react-native-lavender/commit/46fc5c7a0ddff6c2db43fba0de9929626092f265))
19
+ - **BCRI-4002610:** update icon handling and remove deprecated font references ([4399fe4](https://github.com/Pxs-Corporate/react-native-lavender/commit/4399fe4bff06aa70f5c29705fcc89d5243b0e3e7))
20
+ - **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))
21
+ - **BCRI-4026235:** fix mapping ([8fafee5](https://github.com/Pxs-Corporate/react-native-lavender/commit/8fafee5ab742dfbe8d1aeb139341ceb01371cd52))
22
+ - **BCRI-4210372:** automatic versionning ([9c1f0a0](https://github.com/Pxs-Corporate/react-native-lavender/commit/9c1f0a00e19a9d1a277044ea627632032a674102))
@@ -0,0 +1,17 @@
1
+ import React from 'react';
2
+ import { AccessibilityProps, StyleProp, TextStyle, ViewStyle } from 'react-native';
3
+ import type { IconName } from '@proximus/lavender-icon/dist/iconNames.js';
4
+ export declare function convertIconName(oldName: string): string;
5
+ interface PxIconProps extends AccessibilityProps {
6
+ name: IconName;
7
+ size?: number;
8
+ color?: string;
9
+ background?: boolean;
10
+ disabled?: boolean;
11
+ backgroundSize?: number;
12
+ style?: StyleProp<TextStyle>;
13
+ containerStyle?: StyleProp<ViewStyle>;
14
+ }
15
+ export declare function PxIcon({ name, size, color, style, disabled, containerStyle, ...accessibilityProps }: PxIconProps): React.JSX.Element;
16
+ export {};
17
+ //# sourceMappingURL=PxIcon.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"PxIcon.d.ts","sourceRoot":"","sources":["../src/PxIcon.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EACL,kBAAkB,EAClB,SAAS,EAET,SAAS,EAET,SAAS,EACV,MAAM,cAAc,CAAC;AAItB,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,2CAA2C,CAAC;AAI1E,wBAAgB,eAAe,CAAC,OAAO,EAAE,MAAM,GAAG,MAAM,CAuEvD;AAED,UAAU,WAAY,SAAQ,kBAAkB;IAC9C,IAAI,EAAE,QAAQ,CAAC;IACf,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,KAAK,CAAC,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC;IAC7B,cAAc,CAAC,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC;CACvC;AAID,wBAAgB,MAAM,CAAC,EACrB,IAAI,EACJ,IAAI,EACJ,KAAK,EACL,KAAK,EACL,QAAQ,EACR,cAAc,EACd,GAAG,kBAAkB,EACtB,EAAE,WAAW,qBAiBb"}
@@ -0,0 +1,2 @@
1
+ export * from './PxIcon';
2
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,UAAU,CAAC"}
package/package.json ADDED
@@ -0,0 +1,38 @@
1
+ {
2
+ "name": "@proximus/lavender-icon-native",
3
+ "version": "0.1.0-alpha.0",
4
+ "description": "Lavender icon component",
5
+ "main": "src/index.ts",
6
+ "types": "dist/index.d.ts",
7
+ "type": "module",
8
+ "scripts": {
9
+ "clean": "rm -rf dist",
10
+ "build": "npx tsc -p tsconfig.json",
11
+ "prepublish": "yarn clean && yarn build"
12
+ },
13
+ "peerDependencies": {
14
+ "@proximus/lavender-common-native": "workspace:*",
15
+ "@proximus/lavender-styling-native": "workspace:*",
16
+ "@proximus/lavender-texts-native": "workspace:*"
17
+ },
18
+ "devDependencies": {
19
+ "@proximus/lavender-common-native": "0.1.0-alpha.0",
20
+ "@proximus/lavender-styling-native": "0.1.0-alpha.0",
21
+ "@proximus/lavender-texts-native": "0.1.0-alpha.0"
22
+ },
23
+ "publishConfig": {
24
+ "access": "public"
25
+ },
26
+ "lerna": {
27
+ "command": {
28
+ "publish": {
29
+ "assets": [
30
+ "dist",
31
+ "src",
32
+ "package.json"
33
+ ]
34
+ }
35
+ }
36
+ },
37
+ "gitHead": "59b3436b786cc1c73b4a20a98b2a85139e75b72e"
38
+ }
package/src/PxIcon.tsx ADDED
@@ -0,0 +1,137 @@
1
+ import React from 'react';
2
+ import {
3
+ AccessibilityProps,
4
+ StyleProp,
5
+ StyleSheet,
6
+ TextStyle,
7
+ View,
8
+ ViewStyle,
9
+ } from 'react-native';
10
+
11
+ import { createIconSet } from 'react-native-vector-icons';
12
+ import LavenderGlyphMap from '@proximus/lavender-icon/dist/glyphmap.json';
13
+ import type { IconName } from '@proximus/lavender-icon/dist/iconNames.js';
14
+
15
+ import { Colors } from '@proximus/lavender-styling-native';
16
+
17
+ export function convertIconName(oldName: string): string {
18
+ const iconMap: Record<string, string> = {
19
+ chevron_bottom: 'chevron_down',
20
+ chevron_top: 'chevron_up',
21
+ arrow_bottom: 'arrow_down',
22
+ arrow_top: 'arrow_up',
23
+ contacts: 'community',
24
+ bills: 'bill',
25
+ bin: 'trash',
26
+ chart: 'markets',
27
+ copy: 'copy_paste',
28
+ dash: 'dashboard',
29
+ dots: '3dots_vertical',
30
+ double_dots: 'handle',
31
+ download_arrow: 'download',
32
+ enjoy: 'gift',
33
+ equalizer: 'filter',
34
+ error: 'cross',
35
+ error_circle: 'cross_circle',
36
+ error_circle_filled: 'cross_fill',
37
+ eye_visible: 'eye',
38
+ eye_not_visible: 'eye_close',
39
+ grid_layout: 'dashboard',
40
+ help: 'question_mark',
41
+ help_circle: 'question_mark_circle',
42
+ history: 'clock_circle',
43
+ housing: 'buildings',
44
+ ia: 'ai',
45
+ info: 'information',
46
+ info_circle: 'information_circle',
47
+ info_circle_filled: 'information_fill',
48
+ link: 'links',
49
+ location_pin: 'location',
50
+ liveloc: 'current_location',
51
+ mail: 'enveloppe',
52
+ menu: 'burger_menu',
53
+ mic: 'microphone',
54
+ no_cellular: 'wifi_off',
55
+ no_router: 'bbox_off',
56
+ orders: 'euro_invoice',
57
+ parcel: 'pack',
58
+ pen: 'edit',
59
+ qrcode: 'qr_code',
60
+ reaload_onlince: 'euro_reload',
61
+ road_accident: 'car_crash',
62
+ router: 'bbox_connection',
63
+ shopping: 'caddy',
64
+ smart_home: 'home_wifi',
65
+ smartphone: 'mobile',
66
+ socket: 'electricity',
67
+ speed_test: 'speed',
68
+ star_filled: 'star_fill',
69
+ success: 'checkmark',
70
+ success_circle: 'checkmark_circle',
71
+ success_circle_filled: 'checkmark_fill',
72
+ support: 'headset',
73
+ switcher: 'switch',
74
+ thunder: 'bolt',
75
+ ticket: 'voucher',
76
+ truck: 'delivery_flexibility',
77
+ upload_arrow: 'upload',
78
+ user_avatar: 'profile_circle',
79
+ warning: 'exclamation_mark',
80
+ warning_circle: 'exclamation_mark_circle',
81
+ warning_circle_filled: 'exclamation_mark_fill',
82
+ wifi_no_signal: 'wifi_off',
83
+ wifi_signal_strong: 'wifi',
84
+ work_cone: 'roadwork',
85
+ };
86
+
87
+ return iconMap[oldName] ?? oldName;
88
+ }
89
+
90
+ interface PxIconProps extends AccessibilityProps {
91
+ name: IconName;
92
+ size?: number;
93
+ color?: string;
94
+ background?: boolean;
95
+ disabled?: boolean;
96
+ backgroundSize?: number;
97
+ style?: StyleProp<TextStyle>;
98
+ containerStyle?: StyleProp<ViewStyle>;
99
+ }
100
+
101
+ const LavenderIcon = createIconSet(LavenderGlyphMap, 'lavender');
102
+
103
+ export function PxIcon({
104
+ name,
105
+ size,
106
+ color,
107
+ style,
108
+ disabled,
109
+ containerStyle,
110
+ ...accessibilityProps
111
+ }: PxIconProps) {
112
+ const iconColor = disabled
113
+ ? Colors.v8_1.shadesOfGrey.dark40
114
+ : color || Colors.v8_1.shadesOfPurple.purple;
115
+ const iconSize = size || 16;
116
+
117
+ return (
118
+ <View style={[styles.container, containerStyle]}>
119
+ <LavenderIcon
120
+ name={name}
121
+ color={iconColor}
122
+ size={iconSize}
123
+ style={style as any}
124
+ {...accessibilityProps}
125
+ />
126
+ </View>
127
+ );
128
+ }
129
+
130
+ const styles = StyleSheet.create({
131
+ container: {
132
+ alignItems: 'center',
133
+ flexDirection: 'row',
134
+ justifyContent: 'center',
135
+ textAlign: 'center',
136
+ },
137
+ });
package/src/index.ts ADDED
@@ -0,0 +1 @@
1
+ export * from './PxIcon';
package/tsconfig.json ADDED
@@ -0,0 +1,8 @@
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
+ }