@proximus/lavender-buttonicon-native 0.1.0-alpha.1 → 0.1.0-alpha.2

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,6 +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.2](https://github.com/Pxs-Corporate/react-native-lavender/compare/@proximus/lavender-buttonicon-native@0.1.0-alpha.1...@proximus/lavender-buttonicon-native@0.1.0-alpha.2) (2025-09-05)
7
+
8
+ ### Features
9
+
10
+ - **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))
11
+
6
12
  # [0.1.0-alpha.1](https://github.com/Pxs-Corporate/react-native-lavender/compare/@proximus/lavender-buttonicon-native@0.1.0-alpha.0...@proximus/lavender-buttonicon-native@0.1.0-alpha.1) (2025-08-13)
7
13
 
8
14
  ### Bug Fixes
@@ -1 +1 @@
1
- {"version":3,"file":"PxButtonIcon.d.ts","sourceRoot":"","sources":["../src/PxButtonIcon.tsx"],"names":[],"mappings":"AAAA,OAAO,EACL,kBAAkB,EAClB,SAAS,EAIT,SAAS,EACV,MAAM,cAAc,CAAC;AAGtB,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,2CAA2C,CAAC;AAE1E,MAAM,WAAW,gBAAiB,SAAQ,kBAAkB;IAC1D,QAAQ,EAAE,QAAQ,CAAC;IACnB,OAAO,EAAE,SAAS,GAAG,WAAW,GAAG,OAAO,CAAC;IAC3C,YAAY,CAAC,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC;IACpC,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;IACrB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AAuCD,wBAAgB,YAAY,CAAC,EAC3B,OAAmB,EACnB,QAAQ,EACR,YAAY,EACZ,OAAO,EACP,QAAQ,EACR,MAAM,EACN,kBAAkB,EAClB,iBAAiB,EACjB,QAAQ,GACT,EAAE,gBAAgB,qBAiClB"}
1
+ {"version":3,"file":"PxButtonIcon.d.ts","sourceRoot":"","sources":["../src/PxButtonIcon.tsx"],"names":[],"mappings":"AAAA,OAAO,EACL,kBAAkB,EAClB,SAAS,EAIT,SAAS,EACV,MAAM,cAAc,CAAC;AAGtB,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,2CAA2C,CAAC;AAG1E,MAAM,WAAW,gBAAiB,SAAQ,kBAAkB;IAC1D,QAAQ,EAAE,QAAQ,CAAC;IACnB,OAAO,EAAE,SAAS,GAAG,WAAW,GAAG,OAAO,CAAC;IAC3C,YAAY,CAAC,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC;IACpC,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;IACrB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AA0CD,wBAAgB,YAAY,CAAC,EAC3B,OAAmB,EACnB,QAAQ,EACR,YAAY,EACZ,OAAO,EACP,QAAQ,EACR,MAAM,EACN,kBAAkB,EAClB,iBAAiB,EACjB,QAAQ,GACT,EAAE,gBAAgB,qBAkClB"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@proximus/lavender-buttonicon-native",
3
- "version": "0.1.0-alpha.1",
3
+ "version": "0.1.0-alpha.2",
4
4
  "description": "Button icon component",
5
5
  "license": "MIT",
6
6
  "main": "src/index.ts",
@@ -16,10 +16,10 @@
16
16
  "@proximus/lavender-texts-native": "workspace:*"
17
17
  },
18
18
  "devDependencies": {
19
- "@proximus/lavender-common-native": "0.1.0-alpha.1",
20
- "@proximus/lavender-icon-native": "0.1.0-alpha.1",
21
- "@proximus/lavender-styling-native": "0.1.0-alpha.1",
22
- "@proximus/lavender-texts-native": "0.1.0-alpha.1"
19
+ "@proximus/lavender-common-native": "0.1.0-alpha.2",
20
+ "@proximus/lavender-icon-native": "0.1.0-alpha.2",
21
+ "@proximus/lavender-styling-native": "0.1.0-alpha.2",
22
+ "@proximus/lavender-texts-native": "0.1.0-alpha.2"
23
23
  },
24
24
  "publishConfig": {
25
25
  "access": "public"
@@ -35,5 +35,5 @@
35
35
  }
36
36
  }
37
37
  },
38
- "gitHead": "d422a1d369000e1e249afb26de2cef08930c2407"
38
+ "gitHead": "38a67765befa2567a3f5f57976b7933cf5b85a24"
39
39
  }
@@ -9,8 +9,8 @@ import {
9
9
  import { a11y, e2eID } from '@proximus/lavender-common-native';
10
10
  import { PxIcon } from '@proximus/lavender-icon-native';
11
11
  import React from 'react';
12
- import { Colors } from '@proximus/lavender-styling-native';
13
12
  import type { IconName } from '@proximus/lavender-icon/dist/iconNames.js';
13
+ import { ITheme, useTheme } from '@proximus/lavender-styling-native';
14
14
 
15
15
  export interface IButtonIconProps extends AccessibilityProps {
16
16
  iconName: IconName;
@@ -22,40 +22,43 @@ export interface IButtonIconProps extends AccessibilityProps {
22
22
  testID?: string;
23
23
  }
24
24
 
25
- function getBackgroundColor({ variant, inverted }: Partial<IButtonIconProps>) {
25
+ function getBackgroundColor(
26
+ { variant, inverted }: Partial<IButtonIconProps>,
27
+ theme: ITheme
28
+ ) {
26
29
  if (!inverted) {
27
30
  if (variant === 'primary') {
28
- return Colors.v8_1.shadesOfPurple.purple;
31
+ return theme.t('ColorBackgroundContainerPrimaryDefault');
29
32
  }
30
33
  if (variant === 'secondary') {
31
- return Colors.v8_1.shadesOfPurple.purpleLight;
34
+ return theme.t('ColorBackgroundContainerSecondaryDefault');
32
35
  }
33
36
  return 'transparent';
34
37
  } else {
35
38
  if (variant === 'primary') {
36
- return Colors.v8_1.white;
39
+ return theme.t('ColorBackgroundContainerPrimaryInverted');
37
40
  }
38
41
  if (variant === 'secondary') {
39
- return Colors.v8_1.shadesOfGrey.dark320;
42
+ return theme.t('ColorBackgroundContainerSecondaryInverted');
40
43
  }
41
44
  return 'transparent';
42
45
  }
43
46
  }
44
47
 
45
- function getColor({ variant, inverted }: Partial<IButtonIconProps>) {
48
+ function getColor(
49
+ { variant, inverted }: Partial<IButtonIconProps>,
50
+ theme: ITheme
51
+ ) {
46
52
  if (!inverted) {
47
53
  if (variant === 'primary') {
48
- return Colors.v8_1.white;
54
+ return theme.t('ColorTextBrandInverted');
49
55
  }
50
- if (variant === 'secondary') {
51
- return Colors.v8_1.shadesOfPurple.purple;
52
- }
53
- return Colors.v8_1.shadesOfPurple.purple;
56
+ return theme.t('ColorTextBrandDefault');
54
57
  } else {
55
58
  if (variant === 'primary') {
56
- return Colors.v8_1.shadesOfPurple.purple;
59
+ return theme.t('ColorTextBrandDefault');
57
60
  }
58
- return Colors.v8_1.white;
61
+ return theme.t('ColorTextBrandInverted');
59
62
  }
60
63
  }
61
64
 
@@ -70,8 +73,9 @@ export function PxButtonIcon({
70
73
  accessibilityHint,
71
74
  inverted,
72
75
  }: IButtonIconProps) {
73
- const backgroundColor = getBackgroundColor({ variant, inverted });
74
- const color = getColor({ variant, inverted });
76
+ const { theme } = useTheme();
77
+ const backgroundColor = getBackgroundColor({ variant, inverted }, theme);
78
+ const color = getColor({ variant, inverted }, theme);
75
79
 
76
80
  return (
77
81
  <TouchableOpacity