@proximus/lavender-texts-native 0.1.0-alpha.4 → 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 +12 -0
- package/dist/far/away/package.json +32 -0
- package/dist/index.js +1 -0
- package/dist/v8.js +69 -0
- package/package.json +13 -6
- package/tsconfig.json +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,18 @@
|
|
|
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
|
+
|
|
6
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)
|
|
7
19
|
|
|
8
20
|
### 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.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
|
+
"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
|
-
"
|
|
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.
|
|
18
|
-
"@proximus/lavender-styling-native": "0.1.0-alpha.
|
|
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
|
-
|
|
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": "
|
|
41
|
+
"gitHead": "e50a17526561b3eafb159e36c737173956093e0d"
|
|
35
42
|
}
|
package/tsconfig.json
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
{
|
|
2
|
-
"extends": "
|
|
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/**/*.
|
|
7
|
+
"exclude": ["dist", "node_modules", "src/**/*.spec.tsx", "src/**/*.spec.ts"]
|
|
8
8
|
}
|