@proximus/lavender-icon-native 0.1.0-alpha.0 → 0.1.0-alpha.11

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":"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"}
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;AAG1E,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,qBAmBb"}
package/dist/PxIcon.js ADDED
@@ -0,0 +1,94 @@
1
+ import React from 'react';
2
+ import { StyleSheet, View, } from 'react-native';
3
+ import { createIconSet } from 'react-native-vector-icons';
4
+ import LavenderGlyphMap from '@proximus/lavender-icon/dist/glyphmap.json';
5
+ import { useTheme } from '@proximus/lavender-styling-native';
6
+ export function convertIconName(oldName) {
7
+ const iconMap = {
8
+ chevron_bottom: 'chevron_down',
9
+ chevron_top: 'chevron_up',
10
+ arrow_bottom: 'arrow_down',
11
+ arrow_top: 'arrow_up',
12
+ contacts: 'community',
13
+ bills: 'bill',
14
+ bin: 'trash',
15
+ chart: 'markets',
16
+ copy: 'copy_paste',
17
+ dash: 'dashboard',
18
+ dots: '3dots_vertical',
19
+ double_dots: 'handle',
20
+ download_arrow: 'download',
21
+ enjoy: 'gift',
22
+ equalizer: 'filter',
23
+ error: 'cross',
24
+ error_circle: 'cross_circle',
25
+ error_circle_filled: 'cross_fill',
26
+ eye_visible: 'eye',
27
+ eye_not_visible: 'eye_close',
28
+ grid_layout: 'dashboard',
29
+ help: 'question_mark',
30
+ help_circle: 'question_mark_circle',
31
+ history: 'clock_circle',
32
+ housing: 'buildings',
33
+ ia: 'ai',
34
+ info: 'information',
35
+ info_circle: 'information_circle',
36
+ info_circle_filled: 'information_fill',
37
+ link: 'links',
38
+ location_pin: 'location',
39
+ liveloc: 'current_location',
40
+ mail: 'enveloppe',
41
+ menu: 'burger_menu',
42
+ mic: 'microphone',
43
+ no_cellular: 'wifi_off',
44
+ no_router: 'bbox_off',
45
+ orders: 'euro_invoice',
46
+ parcel: 'pack',
47
+ pen: 'edit',
48
+ qrcode: 'qr_code',
49
+ reaload_onlince: 'euro_reload',
50
+ road_accident: 'car_crash',
51
+ router: 'bbox_connection',
52
+ shopping: 'caddy',
53
+ smart_home: 'home_wifi',
54
+ smartphone: 'mobile',
55
+ socket: 'electricity',
56
+ speed_test: 'speed',
57
+ star_filled: 'star_fill',
58
+ success: 'checkmark',
59
+ success_circle: 'checkmark_circle',
60
+ success_circle_filled: 'checkmark_fill',
61
+ support: 'headset',
62
+ switcher: 'switch',
63
+ thunder: 'bolt',
64
+ ticket: 'voucher',
65
+ truck: 'delivery_flexibility',
66
+ upload_arrow: 'upload',
67
+ user_avatar: 'profile_circle',
68
+ warning: 'exclamation_mark',
69
+ warning_circle: 'exclamation_mark_circle',
70
+ warning_circle_filled: 'exclamation_mark_fill',
71
+ wifi_no_signal: 'wifi_off',
72
+ wifi_signal_strong: 'wifi',
73
+ work_cone: 'roadwork',
74
+ };
75
+ return iconMap[oldName] ?? oldName;
76
+ }
77
+ const LavenderIcon = createIconSet(LavenderGlyphMap, 'lavender');
78
+ export function PxIcon({ name, size, color, style, disabled, containerStyle, ...accessibilityProps }) {
79
+ const { theme } = useTheme();
80
+ const iconColor = disabled
81
+ ? theme.t('ColorIconStateDisabledDefault')
82
+ : color || theme.t('ColorIconBrandDefault');
83
+ const iconSize = size || theme.t('SizeIconS').number;
84
+ return (React.createElement(View, { style: [styles.container, containerStyle] },
85
+ React.createElement(LavenderIcon, { name: name, color: iconColor, size: iconSize, style: style, ...accessibilityProps })));
86
+ }
87
+ const styles = StyleSheet.create({
88
+ container: {
89
+ alignItems: 'center',
90
+ flexDirection: 'row',
91
+ justifyContent: 'center',
92
+ textAlign: 'center',
93
+ },
94
+ });
package/package.json CHANGED
@@ -1,38 +1,18 @@
1
1
  {
2
2
  "name": "@proximus/lavender-icon-native",
3
- "version": "0.1.0-alpha.0",
3
+ "version": "0.1.0-alpha.11",
4
4
  "description": "Lavender icon component",
5
- "main": "src/index.ts",
6
- "types": "dist/index.d.ts",
5
+ "main": "dist/index.js",
6
+ "files": [
7
+ "dist"
8
+ ],
7
9
  "type": "module",
8
- "scripts": {
9
- "clean": "rm -rf dist",
10
- "build": "npx tsc -p tsconfig.json",
11
- "prepublish": "yarn clean && yarn build"
12
- },
13
10
  "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"
11
+ "@proximus/lavender-common-native": "*",
12
+ "@proximus/lavender-styling-native": "*",
13
+ "@proximus/lavender-texts-native": "*"
22
14
  },
23
15
  "publishConfig": {
24
16
  "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"
17
+ }
38
18
  }
package/CHANGELOG.md DELETED
@@ -1,22 +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.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))
package/src/PxIcon.tsx DELETED
@@ -1,137 +0,0 @@
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/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