@proximus/lavender-texts-native 0.1.0-alpha.3 → 0.1.0-alpha.6

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,24 @@
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.6](https://github.com/Pxs-Corporate/react-native-lavender/compare/@proximus/lavender-texts-native@0.1.0-alpha.5...@proximus/lavender-texts-native@0.1.0-alpha.6) (2025-09-26)
7
+
8
+ ### Features
9
+
10
+ - **BCRI-42375821:** publisg js bundle output on npm ([#28](https://github.com/Pxs-Corporate/react-native-lavender/issues/28)) ([892ae60](https://github.com/Pxs-Corporate/react-native-lavender/commit/892ae600d6c00996c70028236f25afd0367402aa))
11
+
12
+ # [0.1.0-alpha.5](https://github.com/Pxs-Corporate/react-native-lavender/compare/@proximus/lavender-texts-native@0.1.0-alpha.4...@proximus/lavender-texts-native@0.1.0-alpha.5) (2025-09-25)
13
+
14
+ ### Bug Fixes
15
+
16
+ - **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))
17
+
18
+ # [0.1.0-alpha.4](https://github.com/Pxs-Corporate/react-native-lavender/compare/@proximus/lavender-texts-native@0.1.0-alpha.3...@proximus/lavender-texts-native@0.1.0-alpha.4) (2025-09-19)
19
+
20
+ ### Features
21
+
22
+ - **BCRI-4249550:** message card + tag components ([#22](https://github.com/Pxs-Corporate/react-native-lavender/issues/22)) ([39fb91c](https://github.com/Pxs-Corporate/react-native-lavender/commit/39fb91cc294a37d07e63fca2b4e993d90b867082))
23
+
6
24
  # [0.1.0-alpha.3](https://github.com/Pxs-Corporate/react-native-lavender/compare/@proximus/lavender-texts-native@0.1.0-alpha.2...@proximus/lavender-texts-native@0.1.0-alpha.3) (2025-09-12)
7
25
 
8
26
  ### Features
@@ -0,0 +1,32 @@
1
+ {
2
+ "name": "@proximus/lavender-texts-native",
3
+ "version": "0.1.0-alpha.6",
4
+ "description": "Lavender Text component",
5
+ "main": "dist/index.js",
6
+ "type": "module",
7
+ "peerDependencies": {
8
+ "@proximus/lavender-common-native": "*",
9
+ "@proximus/lavender-styling-native": "*"
10
+ },
11
+ "publishConfig": {
12
+ "access": "public"
13
+ },
14
+ "lerna": {
15
+ "command": {
16
+ "publish": {
17
+ "assets": [
18
+ {
19
+ "from": "dist/far/away/package.json",
20
+ "to": "."
21
+ },
22
+ "dist/*.js",
23
+ "dist/*.d.ts",
24
+ "dist/*.d.ts.map",
25
+ "src",
26
+ "package.json"
27
+ ]
28
+ }
29
+ }
30
+ },
31
+ "gitHead": "e50a17526561b3eafb159e36c737173956093e0d"
32
+ }
package/dist/index.js ADDED
@@ -0,0 +1 @@
1
+ export * from './v8';
package/dist/v8.d.ts CHANGED
@@ -15,8 +15,10 @@ export declare const Fonts: {
15
15
  };
16
16
  export declare function Header(props: TextProps & {
17
17
  disabled?: boolean;
18
+ inverted?: boolean;
18
19
  }): React.JSX.Element;
19
20
  export declare function Body(props: TextProps & {
20
21
  disabled?: boolean;
22
+ inverted?: boolean;
21
23
  }): React.JSX.Element;
22
24
  //# sourceMappingURL=v8.d.ts.map
package/dist/v8.d.ts.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"v8.d.ts","sourceRoot":"","sources":["../src/v8.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAA6B,SAAS,EAAa,MAAM,cAAc,CAAC;AAQ/E,eAAO,MAAM,KAAK;;;;;;;;;;;;CAYjB,CAAC;AAiBF,wBAAgB,MAAM,CAAC,KAAK,EAAE,SAAS,GAAG;IAAE,QAAQ,CAAC,EAAE,OAAO,CAAA;CAAE,qBAqB/D;AAED,wBAAgB,IAAI,CAAC,KAAK,EAAE,SAAS,GAAG;IAAE,QAAQ,CAAC,EAAE,OAAO,CAAA;CAAE,qBAqB7D"}
1
+ {"version":3,"file":"v8.d.ts","sourceRoot":"","sources":["../src/v8.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAA6B,SAAS,EAAa,MAAM,cAAc,CAAC;AAQ/E,eAAO,MAAM,KAAK;;;;;;;;;;;;CAYjB,CAAC;AAiBF,wBAAgB,MAAM,CACpB,KAAK,EAAE,SAAS,GAAG;IAAE,QAAQ,CAAC,EAAE,OAAO,CAAC;IAAC,QAAQ,CAAC,EAAE,OAAO,CAAA;CAAE,qBAyB9D;AAED,wBAAgB,IAAI,CAClB,KAAK,EAAE,SAAS,GAAG;IAAE,QAAQ,CAAC,EAAE,OAAO,CAAC;IAAC,QAAQ,CAAC,EAAE,OAAO,CAAA;CAAE,qBAyB9D"}
package/dist/v8.js ADDED
@@ -0,0 +1,69 @@
1
+ import React from 'react';
2
+ import { Platform, Text } from 'react-native';
3
+ import { useTheme } from '@proximus/lavender-styling-native';
4
+ const DEFAULT_HEADER_FONT_SIZE = 27;
5
+ const DEFAULT_BODY_FONT_SIZE = 16;
6
+ const LINE_HEIGHT_HEADER_RATIO = 1.3;
7
+ const LINE_HEIGHT_BODY_RATIO = 1.5;
8
+ export const Fonts = {
9
+ ProximusRegular: Platform.OS === 'android' ? 'Proximus-Regular' : 'Proximus',
10
+ ProximusRegularItalic: 'Proximus-RegularItalic',
11
+ ProximusBold: 'Proximus-Bold',
12
+ ProximusBoldItalic: 'Proximus-BoldItalic',
13
+ ProximusExtraBold: 'Proximus-ExtraBold',
14
+ ProximusLight: 'Proximus-Light',
15
+ ProximusLightItalic: 'Proximus-LightItalic',
16
+ ProximusIcons: 'PxIcon',
17
+ primary: 'Proximus-Regular',
18
+ primaryBold: 'Proximus-ExtraBold',
19
+ primaryLight: 'Proximus-Light',
20
+ };
21
+ function extractFontSize(style) {
22
+ if (Array.isArray(style)) {
23
+ for (const item of style) {
24
+ if (item?.fontSize) {
25
+ return item?.fontSize;
26
+ }
27
+ }
28
+ return DEFAULT_HEADER_FONT_SIZE;
29
+ }
30
+ if (typeof style === 'object') {
31
+ return style?.fontSize;
32
+ }
33
+ return undefined;
34
+ }
35
+ export function Header(props) {
36
+ const fontSize = extractFontSize(props.style) || DEFAULT_HEADER_FONT_SIZE;
37
+ const { theme } = useTheme();
38
+ const invertedSuffix = props.inverted ? 'Inverted' : 'Default';
39
+ return (React.createElement(Txt, { ...props, style: [
40
+ {
41
+ fontFamily: Fonts.ProximusBold,
42
+ color: theme.t(`ColorTextNeutral${invertedSuffix}`),
43
+ lineHeight: fontSize * LINE_HEIGHT_HEADER_RATIO,
44
+ },
45
+ ...(Array.isArray(props.style) ? props.style : [props.style]),
46
+ props.disabled && {
47
+ color: theme.t(`ColorTextStateDisabled${invertedSuffix}`),
48
+ },
49
+ ] }, props.children));
50
+ }
51
+ export function Body(props) {
52
+ const fontSize = extractFontSize(props.style) || DEFAULT_BODY_FONT_SIZE;
53
+ const { theme } = useTheme();
54
+ const invertedSuffix = props.inverted ? 'Inverted' : 'Default';
55
+ return (React.createElement(Txt, { ...props, style: [
56
+ {
57
+ fontFamily: Fonts.ProximusRegular,
58
+ color: theme.t(`ColorTextNeutral${invertedSuffix}`),
59
+ lineHeight: fontSize * LINE_HEIGHT_BODY_RATIO,
60
+ },
61
+ ...(Array.isArray(props.style) ? props.style : [props.style]),
62
+ props.disabled && {
63
+ color: theme.t(`ColorTextStateDisabled${invertedSuffix}`),
64
+ },
65
+ ] }, props.children));
66
+ }
67
+ function Txt(props) {
68
+ return React.createElement(Text, { ...props }, props.children);
69
+ }
package/package.json CHANGED
@@ -1,12 +1,13 @@
1
1
  {
2
2
  "name": "@proximus/lavender-texts-native",
3
- "version": "0.1.0-alpha.3",
3
+ "version": "0.1.0-alpha.6",
4
4
  "description": "Lavender Text component",
5
5
  "main": "src/index.ts",
6
6
  "type": "module",
7
7
  "scripts": {
8
8
  "clean": "rm -rf dist",
9
- "prepublish": "yarn clean && yarn build",
9
+ "transform-package-json": "node ../../../scripts/tranformPackageJson.js package.json dist/far/away",
10
+ "prepublish": "yarn clean && yarn transform-package-json && yarn build",
10
11
  "build": "npx tsc -p tsconfig.json"
11
12
  },
12
13
  "peerDependencies": {
@@ -14,8 +15,8 @@
14
15
  "@proximus/lavender-styling-native": "workspace:*"
15
16
  },
16
17
  "devDependencies": {
17
- "@proximus/lavender-common-native": "0.1.0-alpha.3",
18
- "@proximus/lavender-styling-native": "0.1.0-alpha.2"
18
+ "@proximus/lavender-common-native": "0.1.0-alpha.6",
19
+ "@proximus/lavender-styling-native": "0.1.0-alpha.5"
19
20
  },
20
21
  "publishConfig": {
21
22
  "access": "public"
@@ -24,12 +25,18 @@
24
25
  "command": {
25
26
  "publish": {
26
27
  "assets": [
27
- "dist",
28
+ {
29
+ "from": "dist/far/away/package.json",
30
+ "to": "."
31
+ },
32
+ "dist/*.js",
33
+ "dist/*.d.ts",
34
+ "dist/*.d.ts.map",
28
35
  "src",
29
36
  "package.json"
30
37
  ]
31
38
  }
32
39
  }
33
40
  },
34
- "gitHead": "6328f584529cb675f4a2ede8ad89f31e2b3c9ffb"
41
+ "gitHead": "e50a17526561b3eafb159e36c737173956093e0d"
35
42
  }
package/src/v8.tsx CHANGED
@@ -36,21 +36,26 @@ function extractFontSize(style: StyleProp<TextStyle>) {
36
36
  return undefined;
37
37
  }
38
38
 
39
- export function Header(props: TextProps & { disabled?: boolean }) {
39
+ export function Header(
40
+ props: TextProps & { disabled?: boolean; inverted?: boolean }
41
+ ) {
40
42
  const fontSize = extractFontSize(props.style) || DEFAULT_HEADER_FONT_SIZE;
41
43
  const { theme } = useTheme();
44
+
45
+ const invertedSuffix = props.inverted ? 'Inverted' : 'Default';
46
+
42
47
  return (
43
48
  <Txt
44
49
  {...props}
45
50
  style={[
46
51
  {
47
52
  fontFamily: Fonts.ProximusBold,
48
- color: theme.t('ColorTextNeutralDefault'),
53
+ color: theme.t(`ColorTextNeutral${invertedSuffix}`),
49
54
  lineHeight: fontSize * LINE_HEIGHT_HEADER_RATIO,
50
55
  },
51
56
  ...(Array.isArray(props.style) ? props.style : [props.style]),
52
57
  props.disabled && {
53
- color: theme.t('ColorTextStateDisabledDefault'),
58
+ color: theme.t(`ColorTextStateDisabled${invertedSuffix}`),
54
59
  },
55
60
  ]}
56
61
  >
@@ -59,21 +64,26 @@ export function Header(props: TextProps & { disabled?: boolean }) {
59
64
  );
60
65
  }
61
66
 
62
- export function Body(props: TextProps & { disabled?: boolean }) {
67
+ export function Body(
68
+ props: TextProps & { disabled?: boolean; inverted?: boolean }
69
+ ) {
63
70
  const fontSize = extractFontSize(props.style) || DEFAULT_BODY_FONT_SIZE;
64
71
  const { theme } = useTheme();
72
+
73
+ const invertedSuffix = props.inverted ? 'Inverted' : 'Default';
74
+
65
75
  return (
66
76
  <Txt
67
77
  {...props}
68
78
  style={[
69
79
  {
70
80
  fontFamily: Fonts.ProximusRegular,
71
- color: theme.t('ColorTextNeutralDefault'),
81
+ color: theme.t(`ColorTextNeutral${invertedSuffix}`),
72
82
  lineHeight: fontSize * LINE_HEIGHT_BODY_RATIO,
73
83
  },
74
84
  ...(Array.isArray(props.style) ? props.style : [props.style]),
75
85
  props.disabled && {
76
- color: theme.t('ColorTextStateDisabledDefault'),
86
+ color: theme.t(`ColorTextStateDisabled${invertedSuffix}`),
77
87
  },
78
88
  ]}
79
89
  >
package/tsconfig.json CHANGED
@@ -1,8 +1,8 @@
1
1
  {
2
- "extends": "../../tsconfig.npm.json",
2
+ "extends": "../../../tsconfig.npm.json",
3
3
  "compilerOptions": {
4
4
  "outDir": "dist",
5
5
  },
6
6
  "include": ["src","../../lib.d.ts"],
7
- "exclude": ["dist", "node_modules", "src/**/*.test.ts", "src/**/*.spec.ts"]
7
+ "exclude": ["dist", "node_modules", "src/**/*.spec.tsx", "src/**/*.spec.ts"]
8
8
  }