sapo-components-ui-rn 1.0.21 → 1.0.23
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/dist/index.esm.js +37 -25
- package/dist/index.esm.js.map +1 -1
- package/dist/index.js +37 -25
- package/dist/index.js.map +1 -1
- package/dist/styles/themes/tokens.d.ts +28 -0
- package/dist/types.d.ts +11 -12
- package/package.json +1 -1
- package/src/styles/themes/DarkTheme.tsx +7 -8
- package/src/styles/themes/LightTheme.tsx +7 -8
- package/src/styles/themes/tokens.tsx +23 -9
- package/src/types.ts +23 -13
|
@@ -247,6 +247,13 @@ export declare const tokens: {
|
|
|
247
247
|
textWarningPressed: string;
|
|
248
248
|
selectBackgroundDisabled: string;
|
|
249
249
|
selectIconDisabled: string;
|
|
250
|
+
borderCriticalInverseDefault: string;
|
|
251
|
+
borderCriticalInverseHover: string;
|
|
252
|
+
borderCriticalInversePressed: string;
|
|
253
|
+
borderErrorInverseDefault: string;
|
|
254
|
+
borderPrimaryFocused: string;
|
|
255
|
+
borderWarningInverseDefault: string;
|
|
256
|
+
borderSuccessInverseDefault: string;
|
|
250
257
|
};
|
|
251
258
|
};
|
|
252
259
|
light: {
|
|
@@ -381,6 +388,13 @@ export declare const tokens: {
|
|
|
381
388
|
textWarningPressed: string;
|
|
382
389
|
selectBackgroundDisabled: string;
|
|
383
390
|
selectIconDisabled: string;
|
|
391
|
+
borderCriticalInverseDefault: string;
|
|
392
|
+
borderCriticalInverseHover: string;
|
|
393
|
+
borderCriticalInversePressed: string;
|
|
394
|
+
borderErrorInverseDefault: string;
|
|
395
|
+
borderPrimaryFocused: string;
|
|
396
|
+
borderWarningInverseDefault: string;
|
|
397
|
+
borderSuccessInverseDefault: string;
|
|
384
398
|
};
|
|
385
399
|
};
|
|
386
400
|
};
|
|
@@ -646,6 +660,13 @@ export declare const ThemeColors: {
|
|
|
646
660
|
textWarningPressed: string;
|
|
647
661
|
selectBackgroundDisabled: string;
|
|
648
662
|
selectIconDisabled: string;
|
|
663
|
+
borderCriticalInverseDefault: string;
|
|
664
|
+
borderCriticalInverseHover: string;
|
|
665
|
+
borderCriticalInversePressed: string;
|
|
666
|
+
borderErrorInverseDefault: string;
|
|
667
|
+
borderPrimaryFocused: string;
|
|
668
|
+
borderWarningInverseDefault: string;
|
|
669
|
+
borderSuccessInverseDefault: string;
|
|
649
670
|
};
|
|
650
671
|
};
|
|
651
672
|
light: {
|
|
@@ -780,6 +801,13 @@ export declare const ThemeColors: {
|
|
|
780
801
|
textWarningPressed: string;
|
|
781
802
|
selectBackgroundDisabled: string;
|
|
782
803
|
selectIconDisabled: string;
|
|
804
|
+
borderCriticalInverseDefault: string;
|
|
805
|
+
borderCriticalInverseHover: string;
|
|
806
|
+
borderCriticalInversePressed: string;
|
|
807
|
+
borderErrorInverseDefault: string;
|
|
808
|
+
borderPrimaryFocused: string;
|
|
809
|
+
borderWarningInverseDefault: string;
|
|
810
|
+
borderSuccessInverseDefault: string;
|
|
783
811
|
};
|
|
784
812
|
};
|
|
785
813
|
};
|
package/dist/types.d.ts
CHANGED
|
@@ -13,14 +13,13 @@ export type Fonts = {
|
|
|
13
13
|
};
|
|
14
14
|
type Mode = "adaptive" | "exact";
|
|
15
15
|
export type ThemeColors = {
|
|
16
|
-
primary
|
|
17
|
-
background
|
|
18
|
-
card
|
|
19
|
-
text
|
|
20
|
-
border
|
|
21
|
-
gray
|
|
22
|
-
backgroundLight
|
|
23
|
-
elevation?: MD3ElevationColors;
|
|
16
|
+
primary: string;
|
|
17
|
+
background: string;
|
|
18
|
+
card: string;
|
|
19
|
+
text: string;
|
|
20
|
+
border: string;
|
|
21
|
+
gray: string;
|
|
22
|
+
backgroundLight: string;
|
|
24
23
|
backgroundPrimary: string;
|
|
25
24
|
backgroundSecondary: string;
|
|
26
25
|
borderBrandDefault: string;
|
|
@@ -30,19 +29,19 @@ export type ThemeColors = {
|
|
|
30
29
|
borderCriticalInverseDefault: string;
|
|
31
30
|
borderCriticalInverseHover: string;
|
|
32
31
|
borderCriticalInversePressed: string;
|
|
33
|
-
borderErrorInverseDefault: string;
|
|
34
|
-
borderPrimaryFocused: string;
|
|
35
|
-
borderWarningInverseDefault: string;
|
|
36
|
-
borderSuccessInverseDefault: string;
|
|
37
32
|
borderErrorDefault: string;
|
|
33
|
+
borderErrorInverseDefault: string;
|
|
38
34
|
borderInfoDefault: string;
|
|
39
35
|
borderPrimaryDefault: string;
|
|
40
36
|
borderPrimaryDisabled: string;
|
|
41
37
|
borderPrimaryHovered: string;
|
|
42
38
|
borderPrimaryInverseDefault: string;
|
|
43
39
|
borderPrimaryPressed: string;
|
|
40
|
+
borderPrimaryFocused: string;
|
|
44
41
|
borderSuccessDefault: string;
|
|
42
|
+
borderSuccessInverseDefault: string;
|
|
45
43
|
borderWarningDefault: string;
|
|
44
|
+
borderWarningInverseDefault: string;
|
|
46
45
|
iconBrandDefault: string;
|
|
47
46
|
iconCriticalDefault: string;
|
|
48
47
|
iconErrorDefault: string;
|
package/package.json
CHANGED
|
@@ -14,14 +14,13 @@ export const DarkTheme: AppTheme = {
|
|
|
14
14
|
mode: "adaptive",
|
|
15
15
|
version: 3,
|
|
16
16
|
colors: {
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
},
|
|
17
|
+
primary: blue.BLUE100,
|
|
18
|
+
background: white.WHITE100,
|
|
19
|
+
card: ink.INK100,
|
|
20
|
+
text: ink.INK100,
|
|
21
|
+
border: ink.INK40,
|
|
22
|
+
gray: ink.INK60,
|
|
23
|
+
backgroundLight: ink.INK10,
|
|
25
24
|
//new theme colors
|
|
26
25
|
backgroundPrimary: ink.INK5,
|
|
27
26
|
backgroundSecondary: white.WHITE100,
|
|
@@ -13,14 +13,13 @@ export const LightTheme: AppTheme = {
|
|
|
13
13
|
roundness: 8,
|
|
14
14
|
version: 3,
|
|
15
15
|
colors: {
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
},
|
|
16
|
+
primary: blue.BLUE100,
|
|
17
|
+
background: white.WHITE100,
|
|
18
|
+
card: ink.INK100,
|
|
19
|
+
text: ink.INK100,
|
|
20
|
+
border: ink.INK40,
|
|
21
|
+
gray: ink.INK60,
|
|
22
|
+
backgroundLight: ink.INK10,
|
|
24
23
|
//new theme colors
|
|
25
24
|
backgroundPrimary: ink.INK5,
|
|
26
25
|
backgroundSecondary: white.WHITE100,
|
|
@@ -13,12 +13,12 @@ const ref = {
|
|
|
13
13
|
dark: {
|
|
14
14
|
colors: {
|
|
15
15
|
primary: blue.BLUE100,
|
|
16
|
-
background:
|
|
17
|
-
card:
|
|
18
|
-
text:
|
|
19
|
-
border: ink.
|
|
16
|
+
background: white.WHITE100,
|
|
17
|
+
card: ink.INK100,
|
|
18
|
+
text: ink.INK100,
|
|
19
|
+
border: ink.INK40,
|
|
20
20
|
gray: ink.INK60,
|
|
21
|
-
backgroundLight: ink.
|
|
21
|
+
backgroundLight: ink.INK10,
|
|
22
22
|
//new theme colors
|
|
23
23
|
backgroundPrimary: ink.INK5,
|
|
24
24
|
backgroundSecondary: white.WHITE100,
|
|
@@ -32,7 +32,7 @@ const ref = {
|
|
|
32
32
|
borderPrimaryDisabled: ink.INK10,
|
|
33
33
|
borderPrimaryHovered: ink.INK20,
|
|
34
34
|
borderPrimaryInverseDefault: blue.BLUE100,
|
|
35
|
-
borderPrimaryPressed:
|
|
35
|
+
borderPrimaryPressed: ink.INK20,
|
|
36
36
|
borderSuccessDefault: green.GREEN100,
|
|
37
37
|
borderWarningDefault: yellow.YELLOW100,
|
|
38
38
|
iconBrandDefault: blue.BLUE100,
|
|
@@ -77,14 +77,14 @@ const ref = {
|
|
|
77
77
|
surfaceInfoInversePressed: blue.BLUE40,
|
|
78
78
|
surfaceInfoPressed: blue.BLUE120,
|
|
79
79
|
surfacePrimaryDefault: white.WHITE100,
|
|
80
|
-
surfacePrimaryDisabled: ink.
|
|
80
|
+
surfacePrimaryDisabled: ink.INK5,
|
|
81
81
|
surfacePrimaryHover: ink.INK5,
|
|
82
82
|
surfacePrimaryInverseDefault: ink.INK80,
|
|
83
83
|
surfacePrimaryInverseHover: ink.INK60,
|
|
84
84
|
surfacePrimaryInversePressed: ink.INK40,
|
|
85
85
|
surfacePrimaryPressed: ink.INK10,
|
|
86
86
|
surfaceSecondaryDefault: ink.INK5,
|
|
87
|
-
surfaceSecondaryDisabled: ink.
|
|
87
|
+
surfaceSecondaryDisabled: ink.INK5,
|
|
88
88
|
surfaceSecondaryHover: ink.INK10,
|
|
89
89
|
surfaceSecondaryPressed: ink.INK20,
|
|
90
90
|
surfaceSuccessDefault: green.GREEN100,
|
|
@@ -143,6 +143,13 @@ const ref = {
|
|
|
143
143
|
textWarningPressed: yellow.YELLOW_STATUS,
|
|
144
144
|
selectBackgroundDisabled: white.WHITE40,
|
|
145
145
|
selectIconDisabled: white.WHITE40,
|
|
146
|
+
borderCriticalInverseDefault: red.RED40,
|
|
147
|
+
borderCriticalInverseHover: red.RED20,
|
|
148
|
+
borderCriticalInversePressed: red.RED60,
|
|
149
|
+
borderErrorInverseDefault: red.RED40,
|
|
150
|
+
borderPrimaryFocused: blue.BLUE100,
|
|
151
|
+
borderWarningInverseDefault: yellow.YELLOW40,
|
|
152
|
+
borderSuccessInverseDefault: green.GREEN40,
|
|
146
153
|
},
|
|
147
154
|
},
|
|
148
155
|
light: {
|
|
@@ -167,7 +174,7 @@ const ref = {
|
|
|
167
174
|
borderPrimaryDisabled: ink.INK10,
|
|
168
175
|
borderPrimaryHovered: ink.INK20,
|
|
169
176
|
borderPrimaryInverseDefault: blue.BLUE100,
|
|
170
|
-
borderPrimaryPressed:
|
|
177
|
+
borderPrimaryPressed: ink.INK20,
|
|
171
178
|
borderSuccessDefault: green.GREEN100,
|
|
172
179
|
borderWarningDefault: yellow.YELLOW100,
|
|
173
180
|
iconBrandDefault: blue.BLUE100,
|
|
@@ -278,6 +285,13 @@ const ref = {
|
|
|
278
285
|
textWarningPressed: yellow.YELLOW_STATUS,
|
|
279
286
|
selectBackgroundDisabled: white.WHITE40,
|
|
280
287
|
selectIconDisabled: white.WHITE40,
|
|
288
|
+
borderCriticalInverseDefault: red.RED40,
|
|
289
|
+
borderCriticalInverseHover: red.RED20,
|
|
290
|
+
borderCriticalInversePressed: red.RED60,
|
|
291
|
+
borderErrorInverseDefault: red.RED40,
|
|
292
|
+
borderPrimaryFocused: blue.BLUE100,
|
|
293
|
+
borderWarningInverseDefault: yellow.YELLOW40,
|
|
294
|
+
borderSuccessInverseDefault: green.GREEN40,
|
|
281
295
|
},
|
|
282
296
|
},
|
|
283
297
|
},
|
package/src/types.ts
CHANGED
|
@@ -29,17 +29,16 @@ export type Fonts = {
|
|
|
29
29
|
type Mode = "adaptive" | "exact";
|
|
30
30
|
|
|
31
31
|
export type ThemeColors = {
|
|
32
|
-
primary
|
|
33
|
-
background
|
|
34
|
-
card
|
|
35
|
-
text
|
|
36
|
-
border
|
|
37
|
-
gray
|
|
38
|
-
backgroundLight
|
|
39
|
-
elevation?: MD3ElevationColors;
|
|
40
|
-
//background
|
|
32
|
+
primary: string;
|
|
33
|
+
background: string;
|
|
34
|
+
card: string;
|
|
35
|
+
text: string;
|
|
36
|
+
border: string;
|
|
37
|
+
gray: string;
|
|
38
|
+
backgroundLight: string;
|
|
41
39
|
backgroundPrimary: string;
|
|
42
40
|
backgroundSecondary: string;
|
|
41
|
+
|
|
43
42
|
borderBrandDefault: string;
|
|
44
43
|
borderCriticalDefault: string;
|
|
45
44
|
borderCriticalHover: string;
|
|
@@ -47,19 +46,20 @@ export type ThemeColors = {
|
|
|
47
46
|
borderCriticalInverseDefault: string;
|
|
48
47
|
borderCriticalInverseHover: string;
|
|
49
48
|
borderCriticalInversePressed: string;
|
|
50
|
-
borderErrorInverseDefault: string;
|
|
51
|
-
borderPrimaryFocused: string;
|
|
52
|
-
borderWarningInverseDefault: string;
|
|
53
|
-
borderSuccessInverseDefault: string;
|
|
54
49
|
borderErrorDefault: string;
|
|
50
|
+
borderErrorInverseDefault: string;
|
|
55
51
|
borderInfoDefault: string;
|
|
56
52
|
borderPrimaryDefault: string;
|
|
57
53
|
borderPrimaryDisabled: string;
|
|
58
54
|
borderPrimaryHovered: string;
|
|
59
55
|
borderPrimaryInverseDefault: string;
|
|
60
56
|
borderPrimaryPressed: string;
|
|
57
|
+
borderPrimaryFocused: string;
|
|
61
58
|
borderSuccessDefault: string;
|
|
59
|
+
borderSuccessInverseDefault: string;
|
|
62
60
|
borderWarningDefault: string;
|
|
61
|
+
borderWarningInverseDefault: string;
|
|
62
|
+
|
|
63
63
|
iconBrandDefault: string;
|
|
64
64
|
iconCriticalDefault: string;
|
|
65
65
|
iconErrorDefault: string;
|
|
@@ -73,6 +73,7 @@ export type ThemeColors = {
|
|
|
73
73
|
iconPrimaryPressed: string;
|
|
74
74
|
iconSuccessDefault: string;
|
|
75
75
|
iconWarningDefault: string;
|
|
76
|
+
|
|
76
77
|
surfaceBrandDefault: string;
|
|
77
78
|
surfaceBrandDisabled: string;
|
|
78
79
|
surfaceBrandHover: string;
|
|
@@ -80,6 +81,7 @@ export type ThemeColors = {
|
|
|
80
81
|
surfaceBrandInverseHover: string;
|
|
81
82
|
surfaceBrandInversePressed: string;
|
|
82
83
|
surfaceBrandPressed: string;
|
|
84
|
+
|
|
83
85
|
surfaceCriticalDefault: string;
|
|
84
86
|
surfaceCriticalDisabled: string;
|
|
85
87
|
surfaceCriticalHover: string;
|
|
@@ -87,6 +89,7 @@ export type ThemeColors = {
|
|
|
87
89
|
surfaceCriticalInverseHover: string;
|
|
88
90
|
surfaceCriticalInversePressed: string;
|
|
89
91
|
surfaceCriticalPressed: string;
|
|
92
|
+
|
|
90
93
|
surfaceErrorDefault: string;
|
|
91
94
|
surfaceErrorDisabled: string;
|
|
92
95
|
surfaceErrorHover: string;
|
|
@@ -94,6 +97,7 @@ export type ThemeColors = {
|
|
|
94
97
|
surfaceErrorInverseHover: string;
|
|
95
98
|
surfaceErrorInversePressed: string;
|
|
96
99
|
surfaceErrorPressed: string;
|
|
100
|
+
|
|
97
101
|
surfaceInfoDefault: string;
|
|
98
102
|
surfaceInfoDisabled: string;
|
|
99
103
|
surfaceInfoHover: string;
|
|
@@ -101,6 +105,7 @@ export type ThemeColors = {
|
|
|
101
105
|
surfaceInfoInverseHover: string;
|
|
102
106
|
surfaceInfoInversePressed: string;
|
|
103
107
|
surfaceInfoPressed: string;
|
|
108
|
+
|
|
104
109
|
surfacePrimaryDefault: string;
|
|
105
110
|
surfacePrimaryDisabled: string;
|
|
106
111
|
surfacePrimaryHover: string;
|
|
@@ -108,10 +113,12 @@ export type ThemeColors = {
|
|
|
108
113
|
surfacePrimaryInverseHover: string;
|
|
109
114
|
surfacePrimaryInversePressed: string;
|
|
110
115
|
surfacePrimaryPressed: string;
|
|
116
|
+
|
|
111
117
|
surfaceSecondaryDefault: string;
|
|
112
118
|
surfaceSecondaryDisabled: string;
|
|
113
119
|
surfaceSecondaryHover: string;
|
|
114
120
|
surfaceSecondaryPressed: string;
|
|
121
|
+
|
|
115
122
|
surfaceSuccessDefault: string;
|
|
116
123
|
surfaceSuccessDisabled: string;
|
|
117
124
|
surfaceSuccessHover: string;
|
|
@@ -119,6 +126,7 @@ export type ThemeColors = {
|
|
|
119
126
|
surfaceSuccessInverseHover: string;
|
|
120
127
|
surfaceSuccessInversePressed: string;
|
|
121
128
|
surfaceSuccessPressed: string;
|
|
129
|
+
|
|
122
130
|
surfaceWarningDefault: string;
|
|
123
131
|
surfaceWarningDisabled: string;
|
|
124
132
|
surfaceWarningHover: string;
|
|
@@ -126,6 +134,7 @@ export type ThemeColors = {
|
|
|
126
134
|
surfaceWarningInverseHover: string;
|
|
127
135
|
surfaceWarningInversePressed: string;
|
|
128
136
|
surfaceWarningPressed: string;
|
|
137
|
+
|
|
129
138
|
textDefault: string;
|
|
130
139
|
textDisabled: string;
|
|
131
140
|
textPlaceholder: string;
|
|
@@ -166,6 +175,7 @@ export type ThemeColors = {
|
|
|
166
175
|
textWarningDisabled: string;
|
|
167
176
|
textWarningHovered: string;
|
|
168
177
|
textWarningPressed: string;
|
|
178
|
+
|
|
169
179
|
selectBackgroundDisabled: string;
|
|
170
180
|
selectIconDisabled: string;
|
|
171
181
|
};
|