@proximus/lavender-texts-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,14 @@
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
+ ### Features
9
+
10
+ - **BCRI-3651606:** mono repo creation ([d19f852](https://github.com/Pxs-Corporate/react-native-lavender/commit/d19f852a710963ff85b1a9d31d18188217aa23ab))
11
+ - **BCRI-3660857:** cell components ([af9e45c](https://github.com/Pxs-Corporate/react-native-lavender/commit/af9e45cefc20d08d2338380ff4cd8cd6851abe24))
12
+ - **BCRI-3810979:** tile components ([46fc5c7](https://github.com/Pxs-Corporate/react-native-lavender/commit/46fc5c7a0ddff6c2db43fba0de9929626092f265))
13
+ - **BCRI-4002610:** update icon handling and remove deprecated font references ([4399fe4](https://github.com/Pxs-Corporate/react-native-lavender/commit/4399fe4bff06aa70f5c29705fcc89d5243b0e3e7))
14
+ - **BCRI-4210372:** automatic versionning ([9c1f0a0](https://github.com/Pxs-Corporate/react-native-lavender/commit/9c1f0a00e19a9d1a277044ea627632032a674102))
@@ -0,0 +1,2 @@
1
+ export * from './v8';
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,MAAM,CAAC"}
package/dist/v8.d.ts ADDED
@@ -0,0 +1,22 @@
1
+ import React from 'react';
2
+ import { TextProps } from 'react-native';
3
+ export declare const Fonts: {
4
+ ProximusRegular: string;
5
+ ProximusRegularItalic: string;
6
+ ProximusBold: string;
7
+ ProximusBoldItalic: string;
8
+ ProximusExtraBold: string;
9
+ ProximusLight: string;
10
+ ProximusLightItalic: string;
11
+ ProximusIcons: string;
12
+ primary: string;
13
+ primaryBold: string;
14
+ primaryLight: string;
15
+ };
16
+ export declare function Header(props: TextProps & {
17
+ disabled?: boolean;
18
+ }): React.JSX.Element;
19
+ export declare function Body(props: TextProps & {
20
+ disabled?: boolean;
21
+ }): React.JSX.Element;
22
+ //# sourceMappingURL=v8.d.ts.map
@@ -0,0 +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,qBAoB/D;AAED,wBAAgB,IAAI,CAAC,KAAK,EAAE,SAAS,GAAG;IAAE,QAAQ,CAAC,EAAE,OAAO,CAAA;CAAE,qBAoB7D"}
package/package.json ADDED
@@ -0,0 +1,36 @@
1
+ {
2
+ "name": "@proximus/lavender-texts-native",
3
+ "version": "0.1.0-alpha.0",
4
+ "description": "Lavender Text component",
5
+ "main": "src/index.ts",
6
+ "types": "dist/index.d.ts",
7
+ "type": "module",
8
+ "scripts": {
9
+ "clean": "rm -rf dist",
10
+ "prepublish": "yarn clean && yarn build",
11
+ "build": "npx tsc -p tsconfig.json"
12
+ },
13
+ "peerDependencies": {
14
+ "@proximus/lavender-common-native": "workspace:*",
15
+ "@proximus/lavender-styling-native": "workspace:*"
16
+ },
17
+ "devDependencies": {
18
+ "@proximus/lavender-common-native": "0.1.0-alpha.0",
19
+ "@proximus/lavender-styling-native": "0.1.0-alpha.0"
20
+ },
21
+ "publishConfig": {
22
+ "access": "public"
23
+ },
24
+ "lerna": {
25
+ "command": {
26
+ "publish": {
27
+ "assets": [
28
+ "dist",
29
+ "src",
30
+ "package.json"
31
+ ]
32
+ }
33
+ }
34
+ },
35
+ "gitHead": "59b3436b786cc1c73b4a20a98b2a85139e75b72e"
36
+ }
package/src/index.ts ADDED
@@ -0,0 +1 @@
1
+ export * from './v8';
package/src/v8.tsx ADDED
@@ -0,0 +1,85 @@
1
+ import React from 'react';
2
+ import { Platform, StyleProp, Text, TextProps, TextStyle } from 'react-native';
3
+ import { Colors } from '@proximus/lavender-styling-native';
4
+
5
+ const DEFAULT_HEADER_FONT_SIZE = 27;
6
+ const DEFAULT_BODY_FONT_SIZE = 16;
7
+ const LINE_HEIGHT_HEADER_RATIO = 1.3;
8
+ const LINE_HEIGHT_BODY_RATIO = 1.5;
9
+
10
+ export const Fonts = {
11
+ ProximusRegular: Platform.OS === 'android' ? 'Proximus-Regular' : 'Proximus',
12
+ ProximusRegularItalic: 'Proximus-RegularItalic',
13
+ ProximusBold: 'Proximus-Bold',
14
+ ProximusBoldItalic: 'Proximus-BoldItalic',
15
+ ProximusExtraBold: 'Proximus-ExtraBold',
16
+ ProximusLight: 'Proximus-Light',
17
+ ProximusLightItalic: 'Proximus-LightItalic',
18
+ ProximusIcons: 'PxIcon',
19
+ primary: 'Proximus-Regular',
20
+ primaryBold: 'Proximus-ExtraBold',
21
+ primaryLight: 'Proximus-Light',
22
+ };
23
+
24
+ function extractFontSize(style: StyleProp<TextStyle>) {
25
+ if (Array.isArray(style)) {
26
+ for (const item of style) {
27
+ if ((item as TextStyle)?.fontSize) {
28
+ return (item as TextStyle)?.fontSize;
29
+ }
30
+ }
31
+ return DEFAULT_HEADER_FONT_SIZE;
32
+ }
33
+ if (typeof style === 'object') {
34
+ return style?.fontSize;
35
+ }
36
+ return undefined;
37
+ }
38
+
39
+ export function Header(props: TextProps & { disabled?: boolean }) {
40
+ const fontSize = extractFontSize(props.style) || DEFAULT_HEADER_FONT_SIZE;
41
+ return (
42
+ <Txt
43
+ {...props}
44
+ style={[
45
+ {
46
+ fontFamily: Fonts.ProximusBold,
47
+ color: '#252525',
48
+ lineHeight: fontSize * LINE_HEIGHT_HEADER_RATIO,
49
+ },
50
+ ...(Array.isArray(props.style) ? props.style : [props.style]),
51
+ props.disabled && {
52
+ color: Colors.v8_1.shadesOfGrey.dark120,
53
+ },
54
+ ]}
55
+ >
56
+ {props.children}
57
+ </Txt>
58
+ );
59
+ }
60
+
61
+ export function Body(props: TextProps & { disabled?: boolean }) {
62
+ const fontSize = extractFontSize(props.style) || DEFAULT_BODY_FONT_SIZE;
63
+ return (
64
+ <Txt
65
+ {...props}
66
+ style={[
67
+ {
68
+ fontFamily: Fonts.ProximusRegular,
69
+ color: '#252525',
70
+ lineHeight: fontSize * LINE_HEIGHT_BODY_RATIO,
71
+ },
72
+ ...(Array.isArray(props.style) ? props.style : [props.style]),
73
+ props.disabled && {
74
+ color: Colors.v8_1.shadesOfGrey.dark120,
75
+ },
76
+ ]}
77
+ >
78
+ {props.children}
79
+ </Txt>
80
+ );
81
+ }
82
+
83
+ function Txt(props: TextProps) {
84
+ return <Text {...props}>{props.children}</Text>;
85
+ }
package/tsconfig.json ADDED
@@ -0,0 +1,8 @@
1
+ {
2
+ "extends": "../../tsconfig.npm.json",
3
+ "compilerOptions": {
4
+ "outDir": "dist",
5
+ },
6
+ "include": ["src"],
7
+ "exclude": ["dist", "node_modules", "src/**/*.test.ts", "src/**/*.spec.ts"]
8
+ }