@proximus/lavender-icon-native 0.1.0-alpha.1 → 0.1.0-alpha.12

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/PxIcon.d.ts CHANGED
@@ -1,17 +1,24 @@
1
1
  import React from 'react';
2
2
  import { AccessibilityProps, StyleProp, TextStyle, ViewStyle } from 'react-native';
3
3
  import type { IconName } from '@proximus/lavender-icon/dist/iconNames.js';
4
+ import { IconColor } from '@proximus/lavender-icon';
5
+ import { IconSize } from '@proximus/lavender-common';
4
6
  export declare function convertIconName(oldName: string): string;
5
7
  interface PxIconProps extends AccessibilityProps {
6
8
  name: IconName;
7
- size?: number;
8
- color?: string;
9
+ size?: IconSize;
10
+ color?: IconColor;
11
+ /** @deprecated Use 'color' property instead */
12
+ deprecatedColor?: string;
13
+ /** @deprecated Use 'size' property instead */
14
+ deprecatedSize?: number;
9
15
  background?: boolean;
10
16
  disabled?: boolean;
17
+ inverted?: boolean;
11
18
  backgroundSize?: number;
12
19
  style?: StyleProp<TextStyle>;
13
20
  containerStyle?: StyleProp<ViewStyle>;
14
21
  }
15
- export declare function PxIcon({ name, size, color, style, disabled, containerStyle, ...accessibilityProps }: PxIconProps): React.JSX.Element;
22
+ export declare function PxIcon({ name, size, color, style, disabled, containerStyle, inverted, deprecatedColor, deprecatedSize, ...accessibilityProps }: PxIconProps): React.JSX.Element;
16
23
  export {};
17
24
  //# sourceMappingURL=PxIcon.d.ts.map
@@ -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,G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CAAC,EAAE,OAAO,CAAC;IACnB,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,KAAe,EACf,KAAK,EACL,QAAQ,EACR,cAAc,EACd,QAAgB,EAChB,eAAe,EACf,cAAc,EACd,GAAG,kBAAkB,EACtB,EAAE,WAAW,qBA0Bb"}
package/dist/PxIcon.js ADDED
@@ -0,0 +1,99 @@
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 = 'Brand', style, disabled, containerStyle, inverted = false, deprecatedColor, deprecatedSize, ...accessibilityProps }) {
79
+ const { theme } = useTheme();
80
+ const invertedSuffix = inverted ? 'Inverted' : 'Default';
81
+ const iconColor = disabled
82
+ ? theme.t('ColorIconStateDisabledDefault')
83
+ : color
84
+ ? theme.t(`ColorIcon${color}${invertedSuffix}`)
85
+ : theme.t('ColorIconBrandDefault');
86
+ const iconSize = size
87
+ ? theme.t(`SizeIcon${size}`).number
88
+ : theme.t('SizeIconS').number;
89
+ return (React.createElement(View, { style: [styles.container, containerStyle] },
90
+ React.createElement(LavenderIcon, { name: name, color: deprecatedColor || iconColor, size: deprecatedSize || iconSize, style: style, ...accessibilityProps })));
91
+ }
92
+ const styles = StyleSheet.create({
93
+ container: {
94
+ alignItems: 'center',
95
+ flexDirection: 'row',
96
+ justifyContent: 'center',
97
+ textAlign: 'center',
98
+ },
99
+ });
package/package.json CHANGED
@@ -1,37 +1,18 @@
1
1
  {
2
2
  "name": "@proximus/lavender-icon-native",
3
- "version": "0.1.0-alpha.1",
3
+ "version": "0.1.0-alpha.12",
4
4
  "description": "Lavender icon component",
5
- "main": "src/index.ts",
5
+ "main": "dist/index.js",
6
+ "files": [
7
+ "dist"
8
+ ],
6
9
  "type": "module",
7
- "scripts": {
8
- "clean": "rm -rf dist",
9
- "build": "npx tsc -p tsconfig.json",
10
- "prepublish": "yarn clean && yarn build"
11
- },
12
10
  "peerDependencies": {
13
- "@proximus/lavender-common-native": "workspace:*",
14
- "@proximus/lavender-styling-native": "workspace:*",
15
- "@proximus/lavender-texts-native": "workspace:*"
16
- },
17
- "devDependencies": {
18
- "@proximus/lavender-common-native": "0.1.0-alpha.1",
19
- "@proximus/lavender-styling-native": "0.1.0-alpha.1",
20
- "@proximus/lavender-texts-native": "0.1.0-alpha.1"
11
+ "@proximus/lavender-common-native": "*",
12
+ "@proximus/lavender-styling-native": "*",
13
+ "@proximus/lavender-texts-native": "*"
21
14
  },
22
15
  "publishConfig": {
23
16
  "access": "public"
24
- },
25
- "lerna": {
26
- "command": {
27
- "publish": {
28
- "assets": [
29
- "dist",
30
- "src",
31
- "package.json"
32
- ]
33
- }
34
- }
35
- },
36
- "gitHead": "d422a1d369000e1e249afb26de2cef08930c2407"
17
+ }
37
18
  }
package/CHANGELOG.md DELETED
@@ -1,28 +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.1](https://github.com/Pxs-Corporate/react-native-lavender/compare/@proximus/lavender-icon-native@0.1.0-alpha.0...@proximus/lavender-icon-native@0.1.0-alpha.1) (2025-08-13)
7
-
8
- ### Bug Fixes
9
-
10
- - **BCRI-4210372:** fix types field in modules ([68ac126](https://github.com/Pxs-Corporate/react-native-lavender/commit/68ac12657112473ae9e0e683076b1d9172be9ce6))
11
-
12
- # 0.1.0-alpha.0 (2025-08-13)
13
-
14
- ### Bug Fixes
15
-
16
- - **BCRI-4026235:** icon fixes ([b5f0e58](https://github.com/Pxs-Corporate/react-native-lavender/commit/b5f0e58492a6bb654869e73b2f309d13037be76c))
17
-
18
- ### Features
19
-
20
- - **BCRI-3660857:** cell components ([af9e45c](https://github.com/Pxs-Corporate/react-native-lavender/commit/af9e45cefc20d08d2338380ff4cd8cd6851abe24))
21
- - **BCRI-3689585:** icon module ([f13230d](https://github.com/Pxs-Corporate/react-native-lavender/commit/f13230d9c7643680089a0db2c69b96cd73ff246e))
22
- - **BCRI-3702949:** tertiary button ([4999cea](https://github.com/Pxs-Corporate/react-native-lavender/commit/4999cea4d7866084d0f8c1cba37070c6cdaa7601))
23
- - **BCRI-3702949:** tertiary button ([db24455](https://github.com/Pxs-Corporate/react-native-lavender/commit/db24455bd9687d80920be3e42c9e1fc14703a571))
24
- - **BCRI-3810979:** tile components ([46fc5c7](https://github.com/Pxs-Corporate/react-native-lavender/commit/46fc5c7a0ddff6c2db43fba0de9929626092f265))
25
- - **BCRI-4002610:** update icon handling and remove deprecated font references ([4399fe4](https://github.com/Pxs-Corporate/react-native-lavender/commit/4399fe4bff06aa70f5c29705fcc89d5243b0e3e7))
26
- - **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))
27
- - **BCRI-4026235:** fix mapping ([8fafee5](https://github.com/Pxs-Corporate/react-native-lavender/commit/8fafee5ab742dfbe8d1aeb139341ceb01371cd52))
28
- - **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