@proximus/lavender-styling-native 0.1.0-alpha.2 → 0.1.0-alpha.3

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.3](https://github.com/Pxs-Corporate/react-native-lavender/compare/@proximus/lavender-styling-native@0.1.0-alpha.2...@proximus/lavender-styling-native@0.1.0-alpha.3) (2025-09-19)
7
+
8
+ ### Features
9
+
10
+ - **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))
11
+
6
12
  # [0.1.0-alpha.2](https://github.com/Pxs-Corporate/react-native-lavender/compare/@proximus/lavender-styling-native@0.1.0-alpha.1...@proximus/lavender-styling-native@0.1.0-alpha.2) (2025-09-05)
7
13
 
8
14
  ### Features
package/dist/index.d.ts CHANGED
@@ -1,4 +1,3 @@
1
- export * from './breakpoints';
2
1
  export * from './ThemeContext';
3
2
  export * from './ThemeProvider';
4
3
  export * from './themes';
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,eAAe,CAAC;AAC9B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,iBAAiB,CAAC;AAChC,cAAc,UAAU,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,gBAAgB,CAAC;AAC/B,cAAc,iBAAiB,CAAC;AAChC,cAAc,UAAU,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@proximus/lavender-styling-native",
3
- "version": "0.1.0-alpha.2",
3
+ "version": "0.1.0-alpha.3",
4
4
  "description": "Commmon styling constants",
5
5
  "main": "src/index.ts",
6
6
  "type": "module",
@@ -23,5 +23,5 @@
23
23
  }
24
24
  }
25
25
  },
26
- "gitHead": "38a67765befa2567a3f5f57976b7933cf5b85a24"
26
+ "gitHead": "6e9252a716a08ededdfbfd6f5b1db70ab21e026e"
27
27
  }
package/src/index.ts CHANGED
@@ -1,4 +1,3 @@
1
- export * from './breakpoints';
2
1
  export * from './ThemeContext';
3
2
  export * from './ThemeProvider';
4
3
  export * from './themes';
@@ -1,56 +0,0 @@
1
- export declare const IPHONE_SE_WIDTH = 320;
2
- export declare const IPHONE_SE_HEIGHT = 568;
3
- export declare const IPHONE_4_WIDTH = 320;
4
- export declare const IPHONE_4_HEIGHT = 480;
5
- export declare const IPHONE_8_WIDTH = 375;
6
- export declare const IPHONE_8_HEIGHT = 667;
7
- export declare const IPHONE_XS_WIDTH = 375;
8
- export declare const IPHONE_XS_HEIGHT = 812;
9
- export declare const IPHONE_XR_WIDTH = 414;
10
- export declare const IPHONE_XR_HEIGHT = 896;
11
- export declare const IPHONE_PLUS_WIDTH = 414;
12
- export declare const IPHONE_PLUS_HEIGHT = 736;
13
- export declare const IPAD_MINI_WIDTH = 768;
14
- export declare const IPAD_MINI_HEIGHT = 1024;
15
- export declare const MDPI_WIDTH = 320;
16
- export declare const MDPI_HEIGHT = 480;
17
- export declare const HDPI_WIDTH = 320;
18
- export declare const HDPI_HEIGHT = 533;
19
- export declare const XHDPI_WIDTH = 360;
20
- export declare const XHDPI_HEIGHT = 640;
21
- export declare const XXHDPI_WIDTH = 320;
22
- export declare const XXHDPI_HEIGHT = 533;
23
- export declare const XXXHDPI_WIDTH = 360;
24
- export declare const XXXHDPI_HEIGHT = 640;
25
- export declare const GALAXY_S7_WIDTH = 360;
26
- export declare const GALAXY_S7_HEIGHT = 640;
27
- export declare const GALAXY_S9_WIDTH = 360;
28
- export declare const GALAXY_S9_HEIGHT = 740;
29
- export declare const GALAXY_S9_PLUS_WIDTH = 412;
30
- export declare const GALAXY_S9_PLUS_HEIGHT = 846;
31
- export declare function media(width: number, height: number, fun: 'max' | 'min' | ''): string;
32
- export declare function max(width: number, height: number): string;
33
- export declare function min(width: number, height: number): string;
34
- export declare const MIN_IPHONE_SE: string;
35
- export declare const MIN_IPHONE_4: string;
36
- export declare const MIN_IPHONE_8: string;
37
- export declare const MIN_IPHONE_XS: string;
38
- export declare const MIN_IPHONE_XR: string;
39
- export declare const MIN_IPHONE_PLUS: string;
40
- export declare const MIN_IPAD_MINI: string;
41
- export declare const MIN_MDPI: string;
42
- export declare const MIN_HDPI: string;
43
- export declare const MIN_XHDPI: string;
44
- export declare const MIN_XXHDPI: string;
45
- export declare const MIN_XXXHDPI: string;
46
- export declare const MIN_GALAXY_S7: string;
47
- export declare const MIN_GALAXY_S9: string;
48
- export declare const MIN_GALAXY_S9_PLUS: string;
49
- export declare const MEDIA_IPHONE_SE: string;
50
- export declare const MEDIA_IPHONE_4: string;
51
- export declare const MEDIA_IPHONE_8: string;
52
- export declare const MEDIA_IPHONE_XS: string;
53
- export declare const MEDIA_IPHONE_XR: string;
54
- export declare const MEDIA_IPHONE_PLUS: string;
55
- export declare const MEDIA_IPHONE_X_PLUS = "@media (min-device-height: 736)";
56
- //# sourceMappingURL=breakpoints.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"breakpoints.d.ts","sourceRoot":"","sources":["../src/breakpoints.ts"],"names":[],"mappings":"AACA,eAAO,MAAM,eAAe,MAAM,CAAC;AACnC,eAAO,MAAM,gBAAgB,MAAM,CAAC;AAEpC,eAAO,MAAM,cAAc,MAAM,CAAC;AAClC,eAAO,MAAM,eAAe,MAAM,CAAC;AAEnC,eAAO,MAAM,cAAc,MAAM,CAAC;AAClC,eAAO,MAAM,eAAe,MAAM,CAAC;AAEnC,eAAO,MAAM,eAAe,MAAM,CAAC;AACnC,eAAO,MAAM,gBAAgB,MAAM,CAAC;AAEpC,eAAO,MAAM,eAAe,M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eAAO,MAAM,aAAa,QAAyC,CAAC;AACpE,eAAO,MAAM,eAAe,QAA6C,CAAC;AAC1E,eAAO,MAAM,aAAa,QAAyC,CAAC;AAEpE,eAAO,MAAM,QAAQ,QAA+B,CAAC;AACrD,eAAO,MAAM,QAAQ,QAA+B,CAAC;AACrD,eAAO,MAAM,SAAS,QAAiC,CAAC;AACxD,eAAO,MAAM,UAAU,QAAmC,CAAC;AAC3D,eAAO,MAAM,WAAW,QAAqC,CAAC;AAE9D,eAAO,MAAM,aAAa,QAAyC,CAAC;AACpE,eAAO,MAAM,aAAa,QAAyC,CAAC;AACpE,eAAO,MAAM,kBAAkB,QAG9B,CAAC;AAGF,eAAO,MAAM,eAAe,QAAyC,CAAC;AACtE,eAAO,MAAM,cAAc,QAAuC,CAAC;AACnE,eAAO,MAAM,cAAc,QAAuC,CAAC;AACnE,eAAO,MAAM,eAAe,QAA+C,CAAC;AAC5E,eAAO,MAAM,eAAe,QAA+C,CAAC;AAC5E,eAAO,MAAM,iBAAiB,QAI7B,CAAC;AACF,eAAO,MAAM,mBAAmB,oCAAsD,CAAC"}
@@ -1,168 +0,0 @@
1
- import {
2
- IPHONE_SE_HEIGHT,
3
- IPHONE_SE_WIDTH,
4
- max,
5
- media,
6
- min,
7
- MIN_HDPI,
8
- MIN_IPHONE_4,
9
- MIN_IPHONE_8,
10
- MIN_IPHONE_PLUS,
11
- MIN_IPHONE_SE,
12
- MIN_IPHONE_XS,
13
- MIN_IPHONE_XR,
14
- MIN_MDPI,
15
- MIN_XHDPI,
16
- MIN_XXHDPI,
17
- MIN_XXXHDPI,
18
- MIN_GALAXY_S7,
19
- MIN_GALAXY_S9,
20
- MIN_GALAXY_S9_PLUS,
21
- } from '../breakpoints';
22
-
23
- describe('breakpoints test suite', () => {
24
- let width: number;
25
- let height: number;
26
- let mediaquery: string;
27
-
28
- it('should compute mediaquery properly', () => {
29
- givenScreenResolution(IPHONE_SE_WIDTH, IPHONE_SE_HEIGHT);
30
- whenComputingMediaQuery();
31
- thenMediaQueryMustBe('@media (device-width: 320) and (device-height: 568)');
32
- });
33
-
34
- it('should compute minimum mediaquery properly', () => {
35
- givenScreenResolution(IPHONE_SE_WIDTH, IPHONE_SE_HEIGHT);
36
- whenComputingMinMediaQuery();
37
- thenMediaQueryMustBe(
38
- '@media (min-device-width: 320) and (min-device-height: 568)'
39
- );
40
- });
41
-
42
- it('should compute maximum mediaquery properly', () => {
43
- givenScreenResolution(IPHONE_SE_WIDTH, IPHONE_SE_HEIGHT);
44
- whenComputingMaxMediaQuery();
45
- thenMediaQueryMustBe(
46
- '@media (max-device-width: 320) and (max-device-height: 568)'
47
- );
48
- });
49
-
50
- it('should compute iphone SE mediaqueries properly', () => {
51
- mediaquery = MIN_IPHONE_SE;
52
- thenMediaQueryMustBe(
53
- '@media (min-device-width: 320) and (min-device-height: 568)'
54
- );
55
- });
56
-
57
- it('should compute iphone 4 mediaqueries properly', () => {
58
- mediaquery = MIN_IPHONE_4;
59
- thenMediaQueryMustBe(
60
- '@media (min-device-width: 320) and (min-device-height: 480)'
61
- );
62
- });
63
-
64
- it('should compute iphone 8 mediaqueries properly', () => {
65
- mediaquery = MIN_IPHONE_8;
66
- thenMediaQueryMustBe(
67
- '@media (min-device-width: 375) and (min-device-height: 667)'
68
- );
69
- });
70
-
71
- it('should compute iphone X mediaqueries properly', () => {
72
- mediaquery = MIN_IPHONE_XS;
73
- thenMediaQueryMustBe(
74
- '@media (min-device-width: 375) and (min-device-height: 812)'
75
- );
76
- });
77
-
78
- it('should compute iphone XR mediaqueries properly', () => {
79
- mediaquery = MIN_IPHONE_XR;
80
- thenMediaQueryMustBe(
81
- '@media (min-device-width: 414) and (min-device-height: 896)'
82
- );
83
- });
84
-
85
- it('should compute iphone Plus mediaqueries properly', () => {
86
- mediaquery = MIN_IPHONE_PLUS;
87
- thenMediaQueryMustBe(
88
- '@media (min-device-width: 414) and (min-device-height: 736)'
89
- );
90
- });
91
-
92
- it('should compute android MDPI mediaqueries properly', () => {
93
- mediaquery = MIN_MDPI;
94
- thenMediaQueryMustBe(
95
- '@media (min-device-width: 320) and (min-device-height: 480)'
96
- );
97
- });
98
-
99
- it('should compute android HDPI mediaqueries properly', () => {
100
- mediaquery = MIN_HDPI;
101
- thenMediaQueryMustBe(
102
- '@media (min-device-width: 320) and (min-device-height: 533)'
103
- );
104
- });
105
-
106
- it('should compute android XHDPI mediaqueries properly', () => {
107
- mediaquery = MIN_XHDPI;
108
- thenMediaQueryMustBe(
109
- '@media (min-device-width: 360) and (min-device-height: 640)'
110
- );
111
- });
112
-
113
- it('should compute android XXHDPI mediaqueries properly', () => {
114
- mediaquery = MIN_XXHDPI;
115
- thenMediaQueryMustBe(
116
- '@media (min-device-width: 320) and (min-device-height: 533)'
117
- );
118
- });
119
-
120
- it('should compute android XXXHDPI mediaqueries properly', () => {
121
- mediaquery = MIN_XXXHDPI;
122
- thenMediaQueryMustBe(
123
- '@media (min-device-width: 360) and (min-device-height: 640)'
124
- );
125
- });
126
-
127
- it('should compute iphone SE mediaqueries properly', () => {
128
- mediaquery = MIN_GALAXY_S7;
129
- thenMediaQueryMustBe(
130
- '@media (min-device-width: 360) and (min-device-height: 640)'
131
- );
132
- });
133
-
134
- it('should compute iphone SE mediaqueries properly', () => {
135
- mediaquery = MIN_GALAXY_S9;
136
- thenMediaQueryMustBe(
137
- '@media (min-device-width: 360) and (min-device-height: 740)'
138
- );
139
- });
140
-
141
- it('should compute iphone SE mediaqueries properly', () => {
142
- mediaquery = MIN_GALAXY_S9_PLUS;
143
- thenMediaQueryMustBe(
144
- '@media (min-device-width: 412) and (min-device-height: 846)'
145
- );
146
- });
147
-
148
- function givenScreenResolution(w: number, h: number) {
149
- width = w;
150
- height = h;
151
- }
152
-
153
- function whenComputingMediaQuery() {
154
- mediaquery = media(width, height, '');
155
- }
156
-
157
- function whenComputingMinMediaQuery() {
158
- mediaquery = min(width, height);
159
- }
160
-
161
- function whenComputingMaxMediaQuery() {
162
- mediaquery = max(width, height);
163
- }
164
-
165
- function thenMediaQueryMustBe(mq: string) {
166
- expect(mediaquery).toEqual(mq);
167
- }
168
- });
@@ -1,96 +0,0 @@
1
- /* tslint:disable:max-line-length */
2
- export const IPHONE_SE_WIDTH = 320;
3
- export const IPHONE_SE_HEIGHT = 568;
4
-
5
- export const IPHONE_4_WIDTH = 320;
6
- export const IPHONE_4_HEIGHT = 480;
7
-
8
- export const IPHONE_8_WIDTH = 375;
9
- export const IPHONE_8_HEIGHT = 667;
10
-
11
- export const IPHONE_XS_WIDTH = 375;
12
- export const IPHONE_XS_HEIGHT = 812;
13
-
14
- export const IPHONE_XR_WIDTH = 414;
15
- export const IPHONE_XR_HEIGHT = 896;
16
-
17
- export const IPHONE_PLUS_WIDTH = 414;
18
- export const IPHONE_PLUS_HEIGHT = 736;
19
-
20
- export const IPAD_MINI_WIDTH = 768;
21
- export const IPAD_MINI_HEIGHT = 1024;
22
-
23
- // https://stackoverflow.com/questions/28507609/image-resolution-for-mdpi-hdpi-xhdpi-and-xxhdpi
24
- export const MDPI_WIDTH = 320;
25
- export const MDPI_HEIGHT = 480;
26
-
27
- export const HDPI_WIDTH = 320;
28
- export const HDPI_HEIGHT = 533;
29
-
30
- export const XHDPI_WIDTH = 360;
31
- export const XHDPI_HEIGHT = 640;
32
-
33
- export const XXHDPI_WIDTH = 320;
34
- export const XXHDPI_HEIGHT = 533;
35
-
36
- export const XXXHDPI_WIDTH = 360;
37
- export const XXXHDPI_HEIGHT = 640;
38
-
39
- // New sizes: Galaxy J3/J7/S6/S7 and Galaxy S8/S9 and Galaxy S8+/S9+
40
-
41
- export const GALAXY_S7_WIDTH = 360;
42
- export const GALAXY_S7_HEIGHT = 640;
43
-
44
- export const GALAXY_S9_WIDTH = 360;
45
- export const GALAXY_S9_HEIGHT = 740;
46
-
47
- export const GALAXY_S9_PLUS_WIDTH = 412;
48
- export const GALAXY_S9_PLUS_HEIGHT = 846;
49
-
50
- export function media(width: number, height: number, fun: 'max' | 'min' | '') {
51
- const deviceHeight = fun ? `${fun}-device-height` : 'device-height';
52
- const deviceWidth = fun ? `${fun}-device-width` : 'device-width';
53
- return `@media (${deviceWidth}: ${width}) and (${deviceHeight}: ${height})`;
54
- }
55
-
56
- export function max(width: number, height: number) {
57
- return media(width, height, 'max');
58
- }
59
-
60
- export function min(width: number, height: number) {
61
- return media(width, height, 'min');
62
- }
63
-
64
- export const MIN_IPHONE_SE = min(IPHONE_SE_WIDTH, IPHONE_SE_HEIGHT);
65
- export const MIN_IPHONE_4 = min(IPHONE_4_WIDTH, IPHONE_4_HEIGHT);
66
- export const MIN_IPHONE_8 = min(IPHONE_8_WIDTH, IPHONE_8_HEIGHT);
67
- export const MIN_IPHONE_XS = min(IPHONE_XS_WIDTH, IPHONE_XS_HEIGHT);
68
- export const MIN_IPHONE_XR = min(IPHONE_XR_WIDTH, IPHONE_XR_HEIGHT);
69
- export const MIN_IPHONE_PLUS = min(IPHONE_PLUS_WIDTH, IPHONE_PLUS_HEIGHT);
70
- export const MIN_IPAD_MINI = min(IPAD_MINI_WIDTH, IPAD_MINI_HEIGHT);
71
-
72
- export const MIN_MDPI = min(MDPI_WIDTH, MDPI_HEIGHT);
73
- export const MIN_HDPI = min(HDPI_WIDTH, HDPI_HEIGHT);
74
- export const MIN_XHDPI = min(XHDPI_WIDTH, XHDPI_HEIGHT);
75
- export const MIN_XXHDPI = min(XXHDPI_WIDTH, XXHDPI_HEIGHT);
76
- export const MIN_XXXHDPI = min(XXXHDPI_WIDTH, XXXHDPI_HEIGHT);
77
-
78
- export const MIN_GALAXY_S7 = min(GALAXY_S7_WIDTH, GALAXY_S7_HEIGHT);
79
- export const MIN_GALAXY_S9 = min(GALAXY_S9_WIDTH, GALAXY_S9_HEIGHT);
80
- export const MIN_GALAXY_S9_PLUS = min(
81
- GALAXY_S9_PLUS_WIDTH,
82
- GALAXY_S9_PLUS_HEIGHT
83
- );
84
-
85
- // We keep those one for backward compatibility
86
- export const MEDIA_IPHONE_SE = max(IPHONE_SE_WIDTH, IPHONE_SE_HEIGHT);
87
- export const MEDIA_IPHONE_4 = max(IPHONE_4_WIDTH, IPHONE_4_HEIGHT);
88
- export const MEDIA_IPHONE_8 = max(IPHONE_8_WIDTH, IPHONE_8_HEIGHT);
89
- export const MEDIA_IPHONE_XS = media(IPHONE_XS_WIDTH, IPHONE_XS_HEIGHT, '');
90
- export const MEDIA_IPHONE_XR = media(IPHONE_XR_WIDTH, IPHONE_XR_HEIGHT, '');
91
- export const MEDIA_IPHONE_PLUS = media(
92
- IPHONE_PLUS_WIDTH,
93
- IPHONE_PLUS_HEIGHT,
94
- ''
95
- );
96
- export const MEDIA_IPHONE_X_PLUS = `@media (min-device-height: ${IPHONE_PLUS_HEIGHT})`;