@sincpro/mobile-ui 0.3.0 → 0.3.1
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/Dialog/BottomSheet/BottomSheet.Root.d.ts +2 -2
- package/dist/Dialog/BottomSheet/BottomSheet.Root.js +2 -2
- package/dist/Dialog/Dialog.Confirmation.js +5 -1
- package/dist/Dialog/Dialog.EditValue.js +1 -1
- package/dist/Display/Display.GradientSurface.d.ts +116 -0
- package/dist/Display/Display.GradientSurface.js +62 -0
- package/dist/Display/Display.KeyValue.js +1 -1
- package/dist/Display/Display.ListItem.d.ts +5 -1
- package/dist/Display/Display.ListItem.js +6 -2
- package/dist/Display/Display.Monetary.js +1 -1
- package/dist/Display/Display.Pattern.d.ts +26 -0
- package/dist/Display/Display.Pattern.js +27 -0
- package/dist/Display/Display.PriceTag.js +3 -3
- package/dist/Display/Display.Stat.js +1 -1
- package/dist/Display/Display.StatCard.js +1 -1
- package/dist/Display/index.d.ts +4 -0
- package/dist/Display/index.js +4 -0
- package/dist/Feedback/Feedback.DomainSplashScreen.js +3 -2
- package/dist/Feedback/Feedback.Loading.d.ts +6 -0
- package/dist/Feedback/Feedback.Loading.js +7 -1
- package/dist/Feedback/Feedback.Spinner.js +2 -1
- package/dist/Feedback/Feedback.Splash.d.ts +7 -1
- package/dist/Feedback/Feedback.Splash.js +11 -2
- package/dist/Feedback/Toast.context.d.ts +8 -1
- package/dist/Feedback/Toast.context.js +25 -23
- package/dist/Form/Form.Button.d.ts +4 -4
- package/dist/Form/Form.Button.js +19 -19
- package/dist/Form/Form.Checkbox.js +1 -1
- package/dist/Form/Form.Input.js +1 -1
- package/dist/Form/Form.InputField.js +1 -1
- package/dist/Form/Form.Switch.js +1 -1
- package/dist/Navigation/Navigation.AppBar.d.ts +18 -2
- package/dist/Navigation/Navigation.AppBar.js +48 -9
- package/dist/Navigation/Navigation.BottomNav.d.ts +33 -5
- package/dist/Navigation/Navigation.BottomNav.js +90 -17
- package/dist/Navigation/Navigation.SearchBar.js +7 -1
- package/dist/Navigation/Navigation.TabIcon.d.ts +4 -0
- package/dist/Navigation/Navigation.TabIcon.js +4 -0
- package/dist/Navigation/Navigation.TabItem.d.ts +5 -0
- package/dist/Navigation/Navigation.TabItem.js +5 -0
- package/dist/Navigation/index.d.ts +2 -2
- package/dist/Typography/Typography.Text.d.ts +1 -1
- package/dist/Typography/Typography.Text.js +16 -6
- package/dist/icons/OdooIcon.d.ts +5 -0
- package/dist/icons/OdooIcon.js +5 -0
- package/dist/icons/PrinterIcon.d.ts +5 -0
- package/dist/icons/PrinterIcon.js +5 -0
- package/dist/layouts/AuthContainer.js +2 -2
- package/dist/theme/dark.d.ts +3 -3
- package/dist/theme/dark.js +54 -53
- package/dist/theme/default.js +1 -0
- package/dist/theme/index.d.ts +1 -0
- package/dist/theme/index.js +1 -0
- package/dist/theme/types.d.ts +1 -0
- package/dist/theme/typography.d.ts +117 -60
- package/dist/theme/typography.js +115 -29
- package/dist/utils/timezone.d.ts +5 -0
- package/dist/views/FormViewV2.d.ts +2 -1
- package/dist/views/FormViewV2.js +8 -4
- package/dist/views/ListViewV2.context.d.ts +5 -1
- package/dist/views/ListViewV2.context.js +3 -1
- package/dist/views/ListViewV2.d.ts +7 -2
- package/dist/views/ListViewV2.js +18 -20
- package/dist/widgets/GeoPermissionCard.d.ts +5 -0
- package/dist/widgets/GeoPermissionCard.js +8 -3
- package/dist/widgets/JSONViewer.js +3 -6
- package/dist/widgets/TimeZoneSelector.d.ts +5 -0
- package/dist/widgets/TimeZoneSelector.js +6 -1
- package/dist/widgets/TimeZoneSelectorModal.d.ts +5 -0
- package/dist/widgets/TimeZoneSelectorModal.js +8 -3
- package/package.json +12 -7
|
@@ -1,17 +1,26 @@
|
|
|
1
1
|
import type { TextStyle } from "react-native";
|
|
2
|
-
export
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
2
|
+
export type FontRole = "light" | "regular" | "medium" | "semiBold" | "extraBold" | "mono" | "monoMedium" | "titleRegular" | "titleMedium" | "title" | "titleBlack";
|
|
3
|
+
export declare const fontFamilies: Record<FontRole, string>;
|
|
4
|
+
/**
|
|
5
|
+
* Configura las familias de fuente del DS (rol → nombre de familia ya cargada por la app).
|
|
6
|
+
* Mutación in-place del singleton, así los componentes la leen en vivo. Ejemplo:
|
|
7
|
+
* `configureFonts({ title: "Satoshi-Bold", titleBlack: "Satoshi-Black" })`.
|
|
8
|
+
*/
|
|
9
|
+
export declare function configureFonts(overrides: Partial<Record<FontRole, string>>): void;
|
|
10
|
+
/** Restablece las familias a los defaults (Inter + Fira Code). Útil en tests/stories. */
|
|
11
|
+
export declare function resetFonts(): void;
|
|
9
12
|
export declare const fontWeights: {
|
|
10
13
|
readonly light: "300";
|
|
11
14
|
readonly regular: "400";
|
|
12
15
|
readonly medium: "500";
|
|
13
16
|
readonly semiBold: "600";
|
|
14
17
|
readonly extraBold: "800";
|
|
18
|
+
readonly mono: "400";
|
|
19
|
+
readonly monoMedium: "500";
|
|
20
|
+
readonly titleRegular: "400";
|
|
21
|
+
readonly titleMedium: "500";
|
|
22
|
+
readonly title: "700";
|
|
23
|
+
readonly titleBlack: "900";
|
|
15
24
|
};
|
|
16
25
|
export declare const fontSizes: {
|
|
17
26
|
readonly xs: 10;
|
|
@@ -46,138 +55,161 @@ export declare const letterSpacing: {
|
|
|
46
55
|
export declare const typographyVariants: {
|
|
47
56
|
readonly display: {
|
|
48
57
|
readonly fontSize: 48;
|
|
49
|
-
readonly fontFamily:
|
|
50
|
-
readonly fontWeight: "
|
|
58
|
+
readonly fontFamily: string;
|
|
59
|
+
readonly fontWeight: "900";
|
|
51
60
|
readonly lineHeight: number;
|
|
52
61
|
readonly letterSpacing: -0.25;
|
|
53
62
|
};
|
|
54
63
|
readonly h1: {
|
|
55
64
|
readonly fontSize: 32;
|
|
56
|
-
readonly fontFamily:
|
|
57
|
-
readonly fontWeight: "
|
|
65
|
+
readonly fontFamily: string;
|
|
66
|
+
readonly fontWeight: "700";
|
|
58
67
|
readonly lineHeight: number;
|
|
59
68
|
readonly letterSpacing: -0.25;
|
|
60
69
|
};
|
|
61
70
|
readonly h2: {
|
|
62
71
|
readonly fontSize: 28;
|
|
63
|
-
readonly fontFamily:
|
|
64
|
-
readonly fontWeight: "
|
|
72
|
+
readonly fontFamily: string;
|
|
73
|
+
readonly fontWeight: "700";
|
|
65
74
|
readonly lineHeight: number;
|
|
66
75
|
readonly letterSpacing: 0;
|
|
67
76
|
};
|
|
68
77
|
readonly h3: {
|
|
69
78
|
readonly fontSize: 24;
|
|
70
|
-
readonly fontFamily:
|
|
71
|
-
readonly fontWeight: "
|
|
79
|
+
readonly fontFamily: string;
|
|
80
|
+
readonly fontWeight: "700";
|
|
72
81
|
readonly lineHeight: number;
|
|
73
82
|
readonly letterSpacing: 0;
|
|
74
83
|
};
|
|
75
84
|
readonly h4: {
|
|
76
85
|
readonly fontSize: 20;
|
|
77
|
-
readonly fontFamily:
|
|
86
|
+
readonly fontFamily: string;
|
|
78
87
|
readonly fontWeight: "500";
|
|
79
88
|
readonly lineHeight: number;
|
|
80
89
|
readonly letterSpacing: 0;
|
|
81
90
|
};
|
|
82
91
|
readonly h5: {
|
|
83
92
|
readonly fontSize: 18;
|
|
84
|
-
readonly fontFamily:
|
|
93
|
+
readonly fontFamily: string;
|
|
85
94
|
readonly fontWeight: "500";
|
|
86
95
|
readonly lineHeight: number;
|
|
87
96
|
readonly letterSpacing: 0;
|
|
88
97
|
};
|
|
89
98
|
readonly h6: {
|
|
90
99
|
readonly fontSize: 16;
|
|
91
|
-
readonly fontFamily:
|
|
100
|
+
readonly fontFamily: string;
|
|
92
101
|
readonly fontWeight: "500";
|
|
93
102
|
readonly lineHeight: number;
|
|
94
103
|
readonly letterSpacing: 0;
|
|
95
104
|
};
|
|
96
105
|
readonly bodyLarge: {
|
|
97
106
|
readonly fontSize: 16;
|
|
98
|
-
readonly fontFamily:
|
|
107
|
+
readonly fontFamily: string;
|
|
99
108
|
readonly fontWeight: "400";
|
|
100
109
|
readonly lineHeight: number;
|
|
101
110
|
readonly letterSpacing: 0;
|
|
102
111
|
};
|
|
103
112
|
readonly body: {
|
|
104
113
|
readonly fontSize: 14;
|
|
105
|
-
readonly fontFamily:
|
|
114
|
+
readonly fontFamily: string;
|
|
106
115
|
readonly fontWeight: "400";
|
|
107
116
|
readonly lineHeight: number;
|
|
108
117
|
readonly letterSpacing: 0;
|
|
109
118
|
};
|
|
110
119
|
readonly bodySmall: {
|
|
111
120
|
readonly fontSize: 13;
|
|
112
|
-
readonly fontFamily:
|
|
121
|
+
readonly fontFamily: string;
|
|
113
122
|
readonly fontWeight: "400";
|
|
114
123
|
readonly lineHeight: number;
|
|
115
124
|
readonly letterSpacing: 0;
|
|
116
125
|
};
|
|
117
126
|
readonly label: {
|
|
118
127
|
readonly fontSize: 14;
|
|
119
|
-
readonly fontFamily:
|
|
128
|
+
readonly fontFamily: string;
|
|
120
129
|
readonly fontWeight: "500";
|
|
121
130
|
readonly lineHeight: number;
|
|
122
131
|
readonly letterSpacing: 0.25;
|
|
123
132
|
};
|
|
124
133
|
readonly labelSmall: {
|
|
125
134
|
readonly fontSize: 13;
|
|
126
|
-
readonly fontFamily:
|
|
135
|
+
readonly fontFamily: string;
|
|
127
136
|
readonly fontWeight: "500";
|
|
128
137
|
readonly lineHeight: number;
|
|
129
138
|
readonly letterSpacing: 0.25;
|
|
130
139
|
};
|
|
140
|
+
readonly data: {
|
|
141
|
+
readonly fontSize: 16;
|
|
142
|
+
readonly fontFamily: string;
|
|
143
|
+
readonly fontWeight: "500";
|
|
144
|
+
readonly lineHeight: number;
|
|
145
|
+
readonly letterSpacing: 0;
|
|
146
|
+
};
|
|
147
|
+
readonly dataLarge: {
|
|
148
|
+
readonly fontSize: 28;
|
|
149
|
+
readonly fontFamily: string;
|
|
150
|
+
readonly fontWeight: "500";
|
|
151
|
+
readonly lineHeight: number;
|
|
152
|
+
readonly letterSpacing: -0.25;
|
|
153
|
+
};
|
|
154
|
+
readonly overline: {
|
|
155
|
+
readonly fontSize: 11;
|
|
156
|
+
readonly fontFamily: string;
|
|
157
|
+
readonly fontWeight: "400";
|
|
158
|
+
readonly lineHeight: number;
|
|
159
|
+
readonly letterSpacing: 0.6;
|
|
160
|
+
readonly textTransform: "uppercase";
|
|
161
|
+
};
|
|
131
162
|
readonly caption: {
|
|
132
163
|
readonly fontSize: 13;
|
|
133
|
-
readonly fontFamily:
|
|
164
|
+
readonly fontFamily: string;
|
|
134
165
|
readonly fontWeight: "400";
|
|
135
166
|
readonly lineHeight: number;
|
|
136
167
|
readonly letterSpacing: 0;
|
|
137
168
|
};
|
|
138
169
|
readonly captionSmall: {
|
|
139
170
|
readonly fontSize: 10;
|
|
140
|
-
readonly fontFamily:
|
|
171
|
+
readonly fontFamily: string;
|
|
141
172
|
readonly fontWeight: "400";
|
|
142
173
|
readonly lineHeight: number;
|
|
143
174
|
readonly letterSpacing: 0;
|
|
144
175
|
};
|
|
145
176
|
readonly button: {
|
|
146
177
|
readonly fontSize: 14;
|
|
147
|
-
readonly fontFamily:
|
|
178
|
+
readonly fontFamily: string;
|
|
148
179
|
readonly fontWeight: "600";
|
|
149
180
|
readonly lineHeight: number;
|
|
150
181
|
readonly letterSpacing: 0.25;
|
|
151
182
|
};
|
|
152
183
|
readonly buttonSmall: {
|
|
153
184
|
readonly fontSize: 13;
|
|
154
|
-
readonly fontFamily:
|
|
185
|
+
readonly fontFamily: string;
|
|
155
186
|
readonly fontWeight: "600";
|
|
156
187
|
readonly lineHeight: number;
|
|
157
188
|
readonly letterSpacing: 0.25;
|
|
158
189
|
};
|
|
159
190
|
readonly buttonLarge: {
|
|
160
191
|
readonly fontSize: 16;
|
|
161
|
-
readonly fontFamily:
|
|
192
|
+
readonly fontFamily: string;
|
|
162
193
|
readonly fontWeight: "600";
|
|
163
194
|
readonly lineHeight: number;
|
|
164
195
|
readonly letterSpacing: 0.25;
|
|
165
196
|
};
|
|
166
197
|
readonly title: {
|
|
167
198
|
readonly fontSize: 18;
|
|
168
|
-
readonly fontFamily:
|
|
199
|
+
readonly fontFamily: string;
|
|
169
200
|
readonly fontWeight: "600";
|
|
170
201
|
readonly lineHeight: number;
|
|
171
202
|
readonly letterSpacing: 0;
|
|
172
203
|
};
|
|
173
204
|
readonly subtitle: {
|
|
174
205
|
readonly fontSize: 16;
|
|
175
|
-
readonly fontFamily:
|
|
206
|
+
readonly fontFamily: string;
|
|
176
207
|
readonly fontWeight: "500";
|
|
177
208
|
readonly lineHeight: number;
|
|
178
209
|
readonly letterSpacing: 0;
|
|
179
210
|
};
|
|
180
211
|
};
|
|
212
|
+
export declare const variantFontRole: Record<keyof typeof typographyVariants, FontRole>;
|
|
181
213
|
export declare const createTextStyle: (variant: keyof typeof typographyVariants, overrides?: Partial<TextStyle>) => TextStyle;
|
|
182
214
|
export declare const createCustomTextStyle: (fontSize: keyof typeof fontSizes, fontFamily: keyof typeof fontFamilies, options?: {
|
|
183
215
|
lineHeight?: keyof typeof lineHeights;
|
|
@@ -186,19 +218,19 @@ export declare const createCustomTextStyle: (fontSize: keyof typeof fontSizes, f
|
|
|
186
218
|
}) => TextStyle;
|
|
187
219
|
export declare const useAppFonts: () => boolean;
|
|
188
220
|
export declare const Typography: {
|
|
189
|
-
readonly fontFamilies:
|
|
190
|
-
readonly light: "Montserrat_300Light";
|
|
191
|
-
readonly regular: "Montserrat_400Regular";
|
|
192
|
-
readonly medium: "Montserrat_500Medium";
|
|
193
|
-
readonly semiBold: "Montserrat_600SemiBold";
|
|
194
|
-
readonly extraBold: "Montserrat_800ExtraBold";
|
|
195
|
-
};
|
|
221
|
+
readonly fontFamilies: Record<FontRole, string>;
|
|
196
222
|
readonly fontWeights: {
|
|
197
223
|
readonly light: "300";
|
|
198
224
|
readonly regular: "400";
|
|
199
225
|
readonly medium: "500";
|
|
200
226
|
readonly semiBold: "600";
|
|
201
227
|
readonly extraBold: "800";
|
|
228
|
+
readonly mono: "400";
|
|
229
|
+
readonly monoMedium: "500";
|
|
230
|
+
readonly titleRegular: "400";
|
|
231
|
+
readonly titleMedium: "500";
|
|
232
|
+
readonly title: "700";
|
|
233
|
+
readonly titleBlack: "900";
|
|
202
234
|
};
|
|
203
235
|
readonly fontSizes: {
|
|
204
236
|
readonly xs: 10;
|
|
@@ -233,144 +265,169 @@ export declare const Typography: {
|
|
|
233
265
|
readonly variants: {
|
|
234
266
|
readonly display: {
|
|
235
267
|
readonly fontSize: 48;
|
|
236
|
-
readonly fontFamily:
|
|
237
|
-
readonly fontWeight: "
|
|
268
|
+
readonly fontFamily: string;
|
|
269
|
+
readonly fontWeight: "900";
|
|
238
270
|
readonly lineHeight: number;
|
|
239
271
|
readonly letterSpacing: -0.25;
|
|
240
272
|
};
|
|
241
273
|
readonly h1: {
|
|
242
274
|
readonly fontSize: 32;
|
|
243
|
-
readonly fontFamily:
|
|
244
|
-
readonly fontWeight: "
|
|
275
|
+
readonly fontFamily: string;
|
|
276
|
+
readonly fontWeight: "700";
|
|
245
277
|
readonly lineHeight: number;
|
|
246
278
|
readonly letterSpacing: -0.25;
|
|
247
279
|
};
|
|
248
280
|
readonly h2: {
|
|
249
281
|
readonly fontSize: 28;
|
|
250
|
-
readonly fontFamily:
|
|
251
|
-
readonly fontWeight: "
|
|
282
|
+
readonly fontFamily: string;
|
|
283
|
+
readonly fontWeight: "700";
|
|
252
284
|
readonly lineHeight: number;
|
|
253
285
|
readonly letterSpacing: 0;
|
|
254
286
|
};
|
|
255
287
|
readonly h3: {
|
|
256
288
|
readonly fontSize: 24;
|
|
257
|
-
readonly fontFamily:
|
|
258
|
-
readonly fontWeight: "
|
|
289
|
+
readonly fontFamily: string;
|
|
290
|
+
readonly fontWeight: "700";
|
|
259
291
|
readonly lineHeight: number;
|
|
260
292
|
readonly letterSpacing: 0;
|
|
261
293
|
};
|
|
262
294
|
readonly h4: {
|
|
263
295
|
readonly fontSize: 20;
|
|
264
|
-
readonly fontFamily:
|
|
296
|
+
readonly fontFamily: string;
|
|
265
297
|
readonly fontWeight: "500";
|
|
266
298
|
readonly lineHeight: number;
|
|
267
299
|
readonly letterSpacing: 0;
|
|
268
300
|
};
|
|
269
301
|
readonly h5: {
|
|
270
302
|
readonly fontSize: 18;
|
|
271
|
-
readonly fontFamily:
|
|
303
|
+
readonly fontFamily: string;
|
|
272
304
|
readonly fontWeight: "500";
|
|
273
305
|
readonly lineHeight: number;
|
|
274
306
|
readonly letterSpacing: 0;
|
|
275
307
|
};
|
|
276
308
|
readonly h6: {
|
|
277
309
|
readonly fontSize: 16;
|
|
278
|
-
readonly fontFamily:
|
|
310
|
+
readonly fontFamily: string;
|
|
279
311
|
readonly fontWeight: "500";
|
|
280
312
|
readonly lineHeight: number;
|
|
281
313
|
readonly letterSpacing: 0;
|
|
282
314
|
};
|
|
283
315
|
readonly bodyLarge: {
|
|
284
316
|
readonly fontSize: 16;
|
|
285
|
-
readonly fontFamily:
|
|
317
|
+
readonly fontFamily: string;
|
|
286
318
|
readonly fontWeight: "400";
|
|
287
319
|
readonly lineHeight: number;
|
|
288
320
|
readonly letterSpacing: 0;
|
|
289
321
|
};
|
|
290
322
|
readonly body: {
|
|
291
323
|
readonly fontSize: 14;
|
|
292
|
-
readonly fontFamily:
|
|
324
|
+
readonly fontFamily: string;
|
|
293
325
|
readonly fontWeight: "400";
|
|
294
326
|
readonly lineHeight: number;
|
|
295
327
|
readonly letterSpacing: 0;
|
|
296
328
|
};
|
|
297
329
|
readonly bodySmall: {
|
|
298
330
|
readonly fontSize: 13;
|
|
299
|
-
readonly fontFamily:
|
|
331
|
+
readonly fontFamily: string;
|
|
300
332
|
readonly fontWeight: "400";
|
|
301
333
|
readonly lineHeight: number;
|
|
302
334
|
readonly letterSpacing: 0;
|
|
303
335
|
};
|
|
304
336
|
readonly label: {
|
|
305
337
|
readonly fontSize: 14;
|
|
306
|
-
readonly fontFamily:
|
|
338
|
+
readonly fontFamily: string;
|
|
307
339
|
readonly fontWeight: "500";
|
|
308
340
|
readonly lineHeight: number;
|
|
309
341
|
readonly letterSpacing: 0.25;
|
|
310
342
|
};
|
|
311
343
|
readonly labelSmall: {
|
|
312
344
|
readonly fontSize: 13;
|
|
313
|
-
readonly fontFamily:
|
|
345
|
+
readonly fontFamily: string;
|
|
314
346
|
readonly fontWeight: "500";
|
|
315
347
|
readonly lineHeight: number;
|
|
316
348
|
readonly letterSpacing: 0.25;
|
|
317
349
|
};
|
|
350
|
+
readonly data: {
|
|
351
|
+
readonly fontSize: 16;
|
|
352
|
+
readonly fontFamily: string;
|
|
353
|
+
readonly fontWeight: "500";
|
|
354
|
+
readonly lineHeight: number;
|
|
355
|
+
readonly letterSpacing: 0;
|
|
356
|
+
};
|
|
357
|
+
readonly dataLarge: {
|
|
358
|
+
readonly fontSize: 28;
|
|
359
|
+
readonly fontFamily: string;
|
|
360
|
+
readonly fontWeight: "500";
|
|
361
|
+
readonly lineHeight: number;
|
|
362
|
+
readonly letterSpacing: -0.25;
|
|
363
|
+
};
|
|
364
|
+
readonly overline: {
|
|
365
|
+
readonly fontSize: 11;
|
|
366
|
+
readonly fontFamily: string;
|
|
367
|
+
readonly fontWeight: "400";
|
|
368
|
+
readonly lineHeight: number;
|
|
369
|
+
readonly letterSpacing: 0.6;
|
|
370
|
+
readonly textTransform: "uppercase";
|
|
371
|
+
};
|
|
318
372
|
readonly caption: {
|
|
319
373
|
readonly fontSize: 13;
|
|
320
|
-
readonly fontFamily:
|
|
374
|
+
readonly fontFamily: string;
|
|
321
375
|
readonly fontWeight: "400";
|
|
322
376
|
readonly lineHeight: number;
|
|
323
377
|
readonly letterSpacing: 0;
|
|
324
378
|
};
|
|
325
379
|
readonly captionSmall: {
|
|
326
380
|
readonly fontSize: 10;
|
|
327
|
-
readonly fontFamily:
|
|
381
|
+
readonly fontFamily: string;
|
|
328
382
|
readonly fontWeight: "400";
|
|
329
383
|
readonly lineHeight: number;
|
|
330
384
|
readonly letterSpacing: 0;
|
|
331
385
|
};
|
|
332
386
|
readonly button: {
|
|
333
387
|
readonly fontSize: 14;
|
|
334
|
-
readonly fontFamily:
|
|
388
|
+
readonly fontFamily: string;
|
|
335
389
|
readonly fontWeight: "600";
|
|
336
390
|
readonly lineHeight: number;
|
|
337
391
|
readonly letterSpacing: 0.25;
|
|
338
392
|
};
|
|
339
393
|
readonly buttonSmall: {
|
|
340
394
|
readonly fontSize: 13;
|
|
341
|
-
readonly fontFamily:
|
|
395
|
+
readonly fontFamily: string;
|
|
342
396
|
readonly fontWeight: "600";
|
|
343
397
|
readonly lineHeight: number;
|
|
344
398
|
readonly letterSpacing: 0.25;
|
|
345
399
|
};
|
|
346
400
|
readonly buttonLarge: {
|
|
347
401
|
readonly fontSize: 16;
|
|
348
|
-
readonly fontFamily:
|
|
402
|
+
readonly fontFamily: string;
|
|
349
403
|
readonly fontWeight: "600";
|
|
350
404
|
readonly lineHeight: number;
|
|
351
405
|
readonly letterSpacing: 0.25;
|
|
352
406
|
};
|
|
353
407
|
readonly title: {
|
|
354
408
|
readonly fontSize: 18;
|
|
355
|
-
readonly fontFamily:
|
|
409
|
+
readonly fontFamily: string;
|
|
356
410
|
readonly fontWeight: "600";
|
|
357
411
|
readonly lineHeight: number;
|
|
358
412
|
readonly letterSpacing: 0;
|
|
359
413
|
};
|
|
360
414
|
readonly subtitle: {
|
|
361
415
|
readonly fontSize: 16;
|
|
362
|
-
readonly fontFamily:
|
|
416
|
+
readonly fontFamily: string;
|
|
363
417
|
readonly fontWeight: "500";
|
|
364
418
|
readonly lineHeight: number;
|
|
365
419
|
readonly letterSpacing: 0;
|
|
366
420
|
};
|
|
367
421
|
};
|
|
422
|
+
readonly variantFontRole: Record<"button" | "title" | "display" | "h1" | "h2" | "h3" | "h4" | "h5" | "h6" | "bodyLarge" | "body" | "bodySmall" | "label" | "labelSmall" | "data" | "dataLarge" | "overline" | "caption" | "captionSmall" | "buttonSmall" | "buttonLarge" | "subtitle", FontRole>;
|
|
368
423
|
readonly createTextStyle: (variant: keyof typeof typographyVariants, overrides?: Partial<TextStyle>) => TextStyle;
|
|
369
424
|
readonly createCustomTextStyle: (fontSize: keyof typeof fontSizes, fontFamily: keyof typeof fontFamilies, options?: {
|
|
370
425
|
lineHeight?: keyof typeof lineHeights;
|
|
371
426
|
letterSpacing?: keyof typeof letterSpacing;
|
|
372
427
|
color?: string;
|
|
373
428
|
}) => TextStyle;
|
|
429
|
+
readonly configureFonts: typeof configureFonts;
|
|
430
|
+
readonly resetFonts: typeof resetFonts;
|
|
374
431
|
readonly useAppFonts: () => boolean;
|
|
375
432
|
};
|
|
376
433
|
export default Typography;
|
package/dist/theme/typography.js
CHANGED
|
@@ -1,18 +1,44 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
light: "
|
|
5
|
-
regular: "
|
|
6
|
-
medium: "
|
|
7
|
-
semiBold: "
|
|
8
|
-
extraBold: "
|
|
1
|
+
import { FiraCode_400Regular, FiraCode_500Medium } from "@expo-google-fonts/fira-code";
|
|
2
|
+
import { Inter_300Light, Inter_400Regular, Inter_500Medium, Inter_600SemiBold, Inter_800ExtraBold, useFonts, } from "@expo-google-fonts/inter";
|
|
3
|
+
const DEFAULT_FONT_FAMILIES = {
|
|
4
|
+
light: "Inter_300Light",
|
|
5
|
+
regular: "Inter_400Regular",
|
|
6
|
+
medium: "Inter_500Medium",
|
|
7
|
+
semiBold: "Inter_600SemiBold",
|
|
8
|
+
extraBold: "Inter_800ExtraBold",
|
|
9
|
+
mono: "FiraCode_400Regular",
|
|
10
|
+
monoMedium: "FiraCode_500Medium",
|
|
11
|
+
// Título: default Inter (seguro). Storybook/app lo apunta a Satoshi vía configureFonts.
|
|
12
|
+
titleRegular: "Inter_400Regular",
|
|
13
|
+
titleMedium: "Inter_500Medium",
|
|
14
|
+
title: "Inter_600SemiBold",
|
|
15
|
+
titleBlack: "Inter_800ExtraBold",
|
|
9
16
|
};
|
|
17
|
+
export const fontFamilies = { ...DEFAULT_FONT_FAMILIES };
|
|
18
|
+
/**
|
|
19
|
+
* Configura las familias de fuente del DS (rol → nombre de familia ya cargada por la app).
|
|
20
|
+
* Mutación in-place del singleton, así los componentes la leen en vivo. Ejemplo:
|
|
21
|
+
* `configureFonts({ title: "Satoshi-Bold", titleBlack: "Satoshi-Black" })`.
|
|
22
|
+
*/
|
|
23
|
+
export function configureFonts(overrides) {
|
|
24
|
+
Object.assign(fontFamilies, overrides);
|
|
25
|
+
}
|
|
26
|
+
/** Restablece las familias a los defaults (Inter + Fira Code). Útil en tests/stories. */
|
|
27
|
+
export function resetFonts() {
|
|
28
|
+
Object.assign(fontFamilies, DEFAULT_FONT_FAMILIES);
|
|
29
|
+
}
|
|
10
30
|
export const fontWeights = {
|
|
11
31
|
light: "300",
|
|
12
32
|
regular: "400",
|
|
13
33
|
medium: "500",
|
|
14
34
|
semiBold: "600",
|
|
15
35
|
extraBold: "800",
|
|
36
|
+
mono: "400",
|
|
37
|
+
monoMedium: "500",
|
|
38
|
+
titleRegular: "400",
|
|
39
|
+
titleMedium: "500",
|
|
40
|
+
title: "700",
|
|
41
|
+
titleBlack: "900",
|
|
16
42
|
};
|
|
17
43
|
/* -------------------- Font Sizes -------------------- */
|
|
18
44
|
export const fontSizes = {
|
|
@@ -49,33 +75,33 @@ export const letterSpacing = {
|
|
|
49
75
|
};
|
|
50
76
|
/* -------------------- Typography Variants -------------------- */
|
|
51
77
|
export const typographyVariants = {
|
|
52
|
-
// Display
|
|
78
|
+
// Display (Satoshi Black — carácter de marca)
|
|
53
79
|
display: {
|
|
54
80
|
fontSize: fontSizes["7xl"],
|
|
55
|
-
fontFamily: fontFamilies.
|
|
56
|
-
fontWeight: fontWeights.
|
|
81
|
+
fontFamily: fontFamilies.titleBlack,
|
|
82
|
+
fontWeight: fontWeights.titleBlack,
|
|
57
83
|
lineHeight: fontSizes["7xl"] * lineHeights.tight,
|
|
58
84
|
letterSpacing: letterSpacing.tight,
|
|
59
85
|
},
|
|
60
|
-
// Headings
|
|
86
|
+
// Headings (Satoshi Bold)
|
|
61
87
|
h1: {
|
|
62
88
|
fontSize: fontSizes["5xl"],
|
|
63
|
-
fontFamily: fontFamilies.
|
|
64
|
-
fontWeight: fontWeights.
|
|
89
|
+
fontFamily: fontFamilies.title,
|
|
90
|
+
fontWeight: fontWeights.title,
|
|
65
91
|
lineHeight: fontSizes["5xl"] * lineHeights.tight,
|
|
66
92
|
letterSpacing: letterSpacing.tight,
|
|
67
93
|
},
|
|
68
94
|
h2: {
|
|
69
95
|
fontSize: fontSizes["4xl"],
|
|
70
|
-
fontFamily: fontFamilies.
|
|
71
|
-
fontWeight: fontWeights.
|
|
96
|
+
fontFamily: fontFamilies.title,
|
|
97
|
+
fontWeight: fontWeights.title,
|
|
72
98
|
lineHeight: fontSizes["4xl"] * lineHeights.snug,
|
|
73
99
|
letterSpacing: letterSpacing.normal,
|
|
74
100
|
},
|
|
75
101
|
h3: {
|
|
76
102
|
fontSize: fontSizes["3xl"],
|
|
77
|
-
fontFamily: fontFamilies.
|
|
78
|
-
fontWeight: fontWeights.
|
|
103
|
+
fontFamily: fontFamilies.title,
|
|
104
|
+
fontWeight: fontWeights.title,
|
|
79
105
|
lineHeight: fontSizes["3xl"] * lineHeights.snug,
|
|
80
106
|
letterSpacing: letterSpacing.normal,
|
|
81
107
|
},
|
|
@@ -137,18 +163,42 @@ export const typographyVariants = {
|
|
|
137
163
|
lineHeight: fontSizes.sm * lineHeights.normal,
|
|
138
164
|
letterSpacing: letterSpacing.wide,
|
|
139
165
|
},
|
|
140
|
-
//
|
|
166
|
+
// Data — cifras, montos, SKU, % (mono Fira Code, peso medio). DS spec rol "data".
|
|
167
|
+
data: {
|
|
168
|
+
fontSize: fontSizes.lg,
|
|
169
|
+
fontFamily: fontFamilies.monoMedium,
|
|
170
|
+
fontWeight: fontWeights.monoMedium,
|
|
171
|
+
lineHeight: fontSizes.lg * lineHeights.tight,
|
|
172
|
+
letterSpacing: letterSpacing.normal,
|
|
173
|
+
},
|
|
174
|
+
dataLarge: {
|
|
175
|
+
fontSize: fontSizes["4xl"],
|
|
176
|
+
fontFamily: fontFamilies.monoMedium,
|
|
177
|
+
fontWeight: fontWeights.monoMedium,
|
|
178
|
+
lineHeight: fontSizes["4xl"] * lineHeights.none,
|
|
179
|
+
letterSpacing: letterSpacing.tight,
|
|
180
|
+
},
|
|
181
|
+
// Overline — labels/metadata en mono MAYÚSCULAS con tracking. DS spec rol "caption".
|
|
182
|
+
overline: {
|
|
183
|
+
fontSize: 11,
|
|
184
|
+
fontFamily: fontFamilies.mono,
|
|
185
|
+
fontWeight: fontWeights.mono,
|
|
186
|
+
lineHeight: 11 * lineHeights.snug,
|
|
187
|
+
letterSpacing: 0.6,
|
|
188
|
+
textTransform: "uppercase",
|
|
189
|
+
},
|
|
190
|
+
// Caption — Fira Code mono (secundario, metadata, labels de datos)
|
|
141
191
|
caption: {
|
|
142
192
|
fontSize: fontSizes.sm,
|
|
143
|
-
fontFamily: fontFamilies.
|
|
144
|
-
fontWeight: fontWeights.
|
|
193
|
+
fontFamily: fontFamilies.mono,
|
|
194
|
+
fontWeight: fontWeights.mono,
|
|
145
195
|
lineHeight: fontSizes.sm * lineHeights.normal,
|
|
146
196
|
letterSpacing: letterSpacing.normal,
|
|
147
197
|
},
|
|
148
198
|
captionSmall: {
|
|
149
199
|
fontSize: fontSizes.xs,
|
|
150
|
-
fontFamily: fontFamilies.
|
|
151
|
-
fontWeight: fontWeights.
|
|
200
|
+
fontFamily: fontFamilies.mono,
|
|
201
|
+
fontWeight: fontWeights.mono,
|
|
152
202
|
lineHeight: fontSizes.xs * lineHeights.normal,
|
|
153
203
|
letterSpacing: letterSpacing.normal,
|
|
154
204
|
},
|
|
@@ -190,6 +240,34 @@ export const typographyVariants = {
|
|
|
190
240
|
letterSpacing: letterSpacing.normal,
|
|
191
241
|
},
|
|
192
242
|
};
|
|
243
|
+
/* -------------------- Variant → Font Role --------------------
|
|
244
|
+
* Cada variante apunta a un ROL de fuente (no a una familia fija), para que
|
|
245
|
+
* `configureFonts` la cambie en vivo. `Typography.Text` resuelve `fontFamilies[rol]`
|
|
246
|
+
* en render. La familia "baked" de cada variante arriba queda solo como fallback. */
|
|
247
|
+
export const variantFontRole = {
|
|
248
|
+
display: "titleBlack",
|
|
249
|
+
h1: "titleBlack",
|
|
250
|
+
h2: "title",
|
|
251
|
+
h3: "title",
|
|
252
|
+
h4: "medium",
|
|
253
|
+
h5: "medium",
|
|
254
|
+
h6: "medium",
|
|
255
|
+
bodyLarge: "regular",
|
|
256
|
+
body: "regular",
|
|
257
|
+
bodySmall: "regular",
|
|
258
|
+
label: "medium",
|
|
259
|
+
labelSmall: "medium",
|
|
260
|
+
data: "monoMedium",
|
|
261
|
+
dataLarge: "monoMedium",
|
|
262
|
+
overline: "mono",
|
|
263
|
+
caption: "mono",
|
|
264
|
+
captionSmall: "mono",
|
|
265
|
+
button: "semiBold",
|
|
266
|
+
buttonSmall: "semiBold",
|
|
267
|
+
buttonLarge: "semiBold",
|
|
268
|
+
title: "semiBold",
|
|
269
|
+
subtitle: "medium",
|
|
270
|
+
};
|
|
193
271
|
/* -------------------- Utility Functions -------------------- */
|
|
194
272
|
export const createTextStyle = (variant, overrides) => ({
|
|
195
273
|
...typographyVariants[variant],
|
|
@@ -208,14 +286,19 @@ export const createCustomTextStyle = (fontSize, fontFamily, options) => {
|
|
|
208
286
|
...(options?.color && { color: options.color }),
|
|
209
287
|
};
|
|
210
288
|
};
|
|
211
|
-
/* -------------------- Font Loader --------------------
|
|
289
|
+
/* -------------------- Font Loader (opcional, conveniencia) --------------------
|
|
290
|
+
* Carga las fuentes recomendadas (Inter + Fira Code), que la app instala como peer deps.
|
|
291
|
+
* El rol "title" (Satoshi u otra) lo carga y enchufa la app/Storybook por su cuenta vía
|
|
292
|
+
* `configureFonts` — la librería NO bundlea archivos de fuente. */
|
|
212
293
|
export const useAppFonts = () => {
|
|
213
294
|
const [loaded] = useFonts({
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
295
|
+
FiraCode_400Regular,
|
|
296
|
+
FiraCode_500Medium,
|
|
297
|
+
Inter_300Light,
|
|
298
|
+
Inter_400Regular,
|
|
299
|
+
Inter_500Medium,
|
|
300
|
+
Inter_600SemiBold,
|
|
301
|
+
Inter_800ExtraBold,
|
|
219
302
|
});
|
|
220
303
|
return loaded;
|
|
221
304
|
};
|
|
@@ -227,8 +310,11 @@ export const Typography = {
|
|
|
227
310
|
lineHeights,
|
|
228
311
|
letterSpacing,
|
|
229
312
|
variants: typographyVariants,
|
|
313
|
+
variantFontRole,
|
|
230
314
|
createTextStyle,
|
|
231
315
|
createCustomTextStyle,
|
|
316
|
+
configureFonts,
|
|
317
|
+
resetFonts,
|
|
232
318
|
useAppFonts,
|
|
233
319
|
};
|
|
234
320
|
export default Typography;
|
package/dist/utils/timezone.d.ts
CHANGED
|
@@ -1,3 +1,8 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @deprecated Region-coupled (LatAm locale data); relocated to the core alongside the
|
|
3
|
+
* TimeZone widgets. Import from `@sincpro/mobile/ui/components/molecules` instead. Kept
|
|
4
|
+
* here for backwards compatibility and removed in the next major.
|
|
5
|
+
*/
|
|
1
6
|
export interface TimezoneLocale {
|
|
2
7
|
timezone: string;
|
|
3
8
|
locale: string;
|
|
@@ -17,7 +17,8 @@ interface FormViewProps<T> {
|
|
|
17
17
|
children: ReactNode;
|
|
18
18
|
}
|
|
19
19
|
declare function FormViewRoot<T>({ name, description, item, isLoading, isEmpty, hasError, errorMessage, readonly, onRefresh, onRetry, onBack, withContainer, children, }: FormViewProps<T>): React.JSX.Element;
|
|
20
|
-
declare function Header({
|
|
20
|
+
declare function Header({ children, }: {
|
|
21
|
+
/** @deprecated The header is now flat (Navigation.AppBar); `variant`/`logoSource` are ignored. */
|
|
21
22
|
variant?: EVariantScreenHeader;
|
|
22
23
|
logoSource?: ImageSourcePropType;
|
|
23
24
|
children?: ReactNode;
|