@hopline/ux4g-react-native 0.1.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/LICENSE +21 -0
- package/README.md +110 -0
- package/dist/index.cjs +7177 -0
- package/dist/index.cjs.map +1 -0
- package/dist/index.d.cts +1661 -0
- package/dist/index.d.ts +1661 -0
- package/dist/index.js +7115 -0
- package/dist/index.js.map +1 -0
- package/package.json +69 -0
package/dist/index.d.cts
ADDED
|
@@ -0,0 +1,1661 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { PressableProps, StyleProp, ViewStyle, TextInputProps, TextStyle, GestureResponderEvent } from 'react-native';
|
|
3
|
+
|
|
4
|
+
declare const ramp: {
|
|
5
|
+
readonly violet: {
|
|
6
|
+
readonly 50: "#F4F3FE";
|
|
7
|
+
readonly 100: "#ECD0FF";
|
|
8
|
+
readonly 200: "#DAB2FF";
|
|
9
|
+
readonly 300: "#C495FF";
|
|
10
|
+
readonly 400: "#AC7AFF";
|
|
11
|
+
readonly 500: "#7C5BF7";
|
|
12
|
+
readonly 600: "#613AF5";
|
|
13
|
+
readonly 700: "#4A26C4";
|
|
14
|
+
readonly 800: "#381C8A";
|
|
15
|
+
readonly 900: "#2A1466";
|
|
16
|
+
};
|
|
17
|
+
readonly secondary: {
|
|
18
|
+
readonly 50: "#F4F3F9";
|
|
19
|
+
readonly 100: "#ECEAF3";
|
|
20
|
+
readonly 200: "#D9D6E7";
|
|
21
|
+
readonly 300: "#C0BBD7";
|
|
22
|
+
readonly 400: "#A7A0C6";
|
|
23
|
+
readonly 500: "#8981AB";
|
|
24
|
+
readonly 600: "#746D96";
|
|
25
|
+
readonly 700: "#60597F";
|
|
26
|
+
readonly 800: "#4D4768";
|
|
27
|
+
readonly 900: "#3A364F";
|
|
28
|
+
};
|
|
29
|
+
readonly success: {
|
|
30
|
+
readonly 50: "#EDF7E6";
|
|
31
|
+
readonly 100: "#E3F2D9";
|
|
32
|
+
readonly 200: "#C6E5B5";
|
|
33
|
+
readonly 300: "#9BCF80";
|
|
34
|
+
readonly 400: "#69B349";
|
|
35
|
+
readonly 500: "#389314";
|
|
36
|
+
readonly 600: "#107400";
|
|
37
|
+
readonly 700: "#005A00";
|
|
38
|
+
readonly 800: "#024900";
|
|
39
|
+
readonly 900: "#013300";
|
|
40
|
+
};
|
|
41
|
+
readonly danger: {
|
|
42
|
+
readonly 50: "#FFEEEA";
|
|
43
|
+
readonly 100: "#FEDAD3";
|
|
44
|
+
readonly 200: "#FEAEAE";
|
|
45
|
+
readonly 300: "#FF7A7A";
|
|
46
|
+
readonly 400: "#F35B5B";
|
|
47
|
+
readonly 500: "#DB2829";
|
|
48
|
+
readonly 600: "#C21D22";
|
|
49
|
+
readonly 700: "#B7131A";
|
|
50
|
+
readonly 800: "#8E0F15";
|
|
51
|
+
readonly 900: "#6B0B10";
|
|
52
|
+
};
|
|
53
|
+
readonly warning: {
|
|
54
|
+
readonly 50: "#FEF1E7";
|
|
55
|
+
readonly 100: "#FDDCC2";
|
|
56
|
+
readonly 200: "#FBC499";
|
|
57
|
+
readonly 300: "#F6A766";
|
|
58
|
+
readonly 400: "#F2933F";
|
|
59
|
+
readonly 500: "#EE8033";
|
|
60
|
+
readonly 600: "#D86A1E";
|
|
61
|
+
readonly 700: "#B5551A";
|
|
62
|
+
readonly 800: "#8F4314";
|
|
63
|
+
readonly 900: "#6B320F";
|
|
64
|
+
};
|
|
65
|
+
readonly info: {
|
|
66
|
+
readonly 50: "#E8F1FB";
|
|
67
|
+
readonly 100: "#C7DDF5";
|
|
68
|
+
readonly 200: "#8FBBEB";
|
|
69
|
+
readonly 300: "#5798DD";
|
|
70
|
+
readonly 400: "#2E80D2";
|
|
71
|
+
readonly 500: "#2384C5";
|
|
72
|
+
readonly 600: "#1F6FB0";
|
|
73
|
+
readonly 700: "#1937B2";
|
|
74
|
+
readonly 800: "#15296F";
|
|
75
|
+
readonly 900: "#0F1C4B";
|
|
76
|
+
};
|
|
77
|
+
readonly neutral: {
|
|
78
|
+
readonly 0: "#FFFFFF";
|
|
79
|
+
readonly 50: "#F8F8F8";
|
|
80
|
+
readonly 100: "#F3F3F3";
|
|
81
|
+
readonly 200: "#EEEEEE";
|
|
82
|
+
readonly 300: "#DBDBDB";
|
|
83
|
+
readonly 400: "#C6C6C6";
|
|
84
|
+
readonly 500: "#ABABAB";
|
|
85
|
+
readonly 600: "#727272";
|
|
86
|
+
readonly 700: "#525252";
|
|
87
|
+
readonly 800: "#393939";
|
|
88
|
+
readonly 900: "#212121";
|
|
89
|
+
readonly 1000: "#000000";
|
|
90
|
+
};
|
|
91
|
+
};
|
|
92
|
+
declare const space: {
|
|
93
|
+
readonly 0: 0;
|
|
94
|
+
readonly 1: 4;
|
|
95
|
+
readonly 2: 8;
|
|
96
|
+
readonly 3: 12;
|
|
97
|
+
readonly 4: 16;
|
|
98
|
+
readonly 5: 24;
|
|
99
|
+
readonly 6: 32;
|
|
100
|
+
readonly 7: 40;
|
|
101
|
+
readonly 8: 48;
|
|
102
|
+
readonly 9: 56;
|
|
103
|
+
readonly 10: 64;
|
|
104
|
+
readonly 12: 80;
|
|
105
|
+
readonly 14: 96;
|
|
106
|
+
readonly 16: 120;
|
|
107
|
+
readonly 20: 160;
|
|
108
|
+
};
|
|
109
|
+
declare const radius: {
|
|
110
|
+
readonly xs: 4;
|
|
111
|
+
readonly sm: 5;
|
|
112
|
+
readonly md: 8;
|
|
113
|
+
readonly lg: 12;
|
|
114
|
+
readonly xl: 16;
|
|
115
|
+
readonly "2xl": 24;
|
|
116
|
+
readonly full: 999;
|
|
117
|
+
};
|
|
118
|
+
declare const border: {
|
|
119
|
+
readonly thin: 1;
|
|
120
|
+
readonly md: 1.5;
|
|
121
|
+
readonly thick: 2;
|
|
122
|
+
};
|
|
123
|
+
|
|
124
|
+
type ShadowStyle = {
|
|
125
|
+
shadowColor: string;
|
|
126
|
+
shadowOffset: {
|
|
127
|
+
width: number;
|
|
128
|
+
height: number;
|
|
129
|
+
};
|
|
130
|
+
shadowOpacity: number;
|
|
131
|
+
shadowRadius: number;
|
|
132
|
+
elevation: number;
|
|
133
|
+
};
|
|
134
|
+
declare const shadow: {
|
|
135
|
+
readonly none: ShadowStyle;
|
|
136
|
+
readonly xs: ShadowStyle;
|
|
137
|
+
readonly s: ShadowStyle;
|
|
138
|
+
readonly md: ShadowStyle;
|
|
139
|
+
readonly l: ShadowStyle;
|
|
140
|
+
readonly xl: ShadowStyle;
|
|
141
|
+
readonly xxl: ShadowStyle;
|
|
142
|
+
};
|
|
143
|
+
declare const motion: {
|
|
144
|
+
readonly duration: {
|
|
145
|
+
readonly fast: 120;
|
|
146
|
+
readonly base: 200;
|
|
147
|
+
readonly slow: 300;
|
|
148
|
+
};
|
|
149
|
+
readonly easing: {
|
|
150
|
+
readonly standard: readonly [0.2, 0, 0, 1];
|
|
151
|
+
readonly emphasized: readonly [0.3, 0, 0, 1];
|
|
152
|
+
};
|
|
153
|
+
};
|
|
154
|
+
declare const font: {
|
|
155
|
+
readonly family: {
|
|
156
|
+
readonly sans: "NotoSans";
|
|
157
|
+
readonly ui: "Roboto-Medium";
|
|
158
|
+
readonly mono: "RedHatMono";
|
|
159
|
+
};
|
|
160
|
+
readonly weight: {
|
|
161
|
+
readonly regular: "400";
|
|
162
|
+
readonly medium: "500";
|
|
163
|
+
readonly semibold: "600";
|
|
164
|
+
readonly bold: "700";
|
|
165
|
+
};
|
|
166
|
+
};
|
|
167
|
+
type TypeStep = {
|
|
168
|
+
fontSize: number;
|
|
169
|
+
lineHeight: number;
|
|
170
|
+
letterSpacing?: number;
|
|
171
|
+
};
|
|
172
|
+
declare const type: Record<string, TypeStep>;
|
|
173
|
+
/** A full colour ramp (50..900) of hex strings — the shape an override supplies. */
|
|
174
|
+
type ColorRamp = Record<keyof typeof ramp.violet, string>;
|
|
175
|
+
type ThemeOverrides = {
|
|
176
|
+
primary?: ColorRamp;
|
|
177
|
+
secondary?: ColorRamp;
|
|
178
|
+
fontFamily?: Partial<typeof font.family>;
|
|
179
|
+
};
|
|
180
|
+
declare function makeTheme(overrides?: ThemeOverrides): {
|
|
181
|
+
color: {
|
|
182
|
+
readonly primary: string;
|
|
183
|
+
readonly primaryHover: string;
|
|
184
|
+
readonly primaryActive: string;
|
|
185
|
+
readonly primarySubtle: string;
|
|
186
|
+
readonly onPrimary: "#FFFFFF";
|
|
187
|
+
readonly secondary: string;
|
|
188
|
+
readonly secondaryHover: string;
|
|
189
|
+
readonly success: "#107400";
|
|
190
|
+
readonly successSubtle: "#EDF7E6";
|
|
191
|
+
readonly danger: "#DB2829";
|
|
192
|
+
readonly dangerHover: "#C21D22";
|
|
193
|
+
readonly dangerSubtle: "#FFEEEA";
|
|
194
|
+
readonly warning: "#EE8033";
|
|
195
|
+
readonly warningSubtle: "#FEF1E7";
|
|
196
|
+
readonly info: "#1937B2";
|
|
197
|
+
readonly infoSubtle: "#E8F1FB";
|
|
198
|
+
readonly text: "#212121";
|
|
199
|
+
readonly textMuted: "#727272";
|
|
200
|
+
readonly textSubtle: "#ABABAB";
|
|
201
|
+
readonly textInverse: "#FFFFFF";
|
|
202
|
+
readonly textLink: string;
|
|
203
|
+
readonly surface: "#FFFFFF";
|
|
204
|
+
readonly surfaceSubtle: "#F8F8F8";
|
|
205
|
+
readonly surfaceMuted: "#F3F3F3";
|
|
206
|
+
readonly surfaceBrand: string;
|
|
207
|
+
readonly border: "#DBDBDB";
|
|
208
|
+
readonly borderStrong: "#C6C6C6";
|
|
209
|
+
readonly divider: "#EEEEEE";
|
|
210
|
+
readonly focus: "rgba(97, 58, 245, 0.48)";
|
|
211
|
+
};
|
|
212
|
+
ramp: {
|
|
213
|
+
readonly violet: {
|
|
214
|
+
readonly 50: "#F4F3FE";
|
|
215
|
+
readonly 100: "#ECD0FF";
|
|
216
|
+
readonly 200: "#DAB2FF";
|
|
217
|
+
readonly 300: "#C495FF";
|
|
218
|
+
readonly 400: "#AC7AFF";
|
|
219
|
+
readonly 500: "#7C5BF7";
|
|
220
|
+
readonly 600: "#613AF5";
|
|
221
|
+
readonly 700: "#4A26C4";
|
|
222
|
+
readonly 800: "#381C8A";
|
|
223
|
+
readonly 900: "#2A1466";
|
|
224
|
+
};
|
|
225
|
+
readonly secondary: {
|
|
226
|
+
readonly 50: "#F4F3F9";
|
|
227
|
+
readonly 100: "#ECEAF3";
|
|
228
|
+
readonly 200: "#D9D6E7";
|
|
229
|
+
readonly 300: "#C0BBD7";
|
|
230
|
+
readonly 400: "#A7A0C6";
|
|
231
|
+
readonly 500: "#8981AB";
|
|
232
|
+
readonly 600: "#746D96";
|
|
233
|
+
readonly 700: "#60597F";
|
|
234
|
+
readonly 800: "#4D4768";
|
|
235
|
+
readonly 900: "#3A364F";
|
|
236
|
+
};
|
|
237
|
+
readonly success: {
|
|
238
|
+
readonly 50: "#EDF7E6";
|
|
239
|
+
readonly 100: "#E3F2D9";
|
|
240
|
+
readonly 200: "#C6E5B5";
|
|
241
|
+
readonly 300: "#9BCF80";
|
|
242
|
+
readonly 400: "#69B349";
|
|
243
|
+
readonly 500: "#389314";
|
|
244
|
+
readonly 600: "#107400";
|
|
245
|
+
readonly 700: "#005A00";
|
|
246
|
+
readonly 800: "#024900";
|
|
247
|
+
readonly 900: "#013300";
|
|
248
|
+
};
|
|
249
|
+
readonly danger: {
|
|
250
|
+
readonly 50: "#FFEEEA";
|
|
251
|
+
readonly 100: "#FEDAD3";
|
|
252
|
+
readonly 200: "#FEAEAE";
|
|
253
|
+
readonly 300: "#FF7A7A";
|
|
254
|
+
readonly 400: "#F35B5B";
|
|
255
|
+
readonly 500: "#DB2829";
|
|
256
|
+
readonly 600: "#C21D22";
|
|
257
|
+
readonly 700: "#B7131A";
|
|
258
|
+
readonly 800: "#8E0F15";
|
|
259
|
+
readonly 900: "#6B0B10";
|
|
260
|
+
};
|
|
261
|
+
readonly warning: {
|
|
262
|
+
readonly 50: "#FEF1E7";
|
|
263
|
+
readonly 100: "#FDDCC2";
|
|
264
|
+
readonly 200: "#FBC499";
|
|
265
|
+
readonly 300: "#F6A766";
|
|
266
|
+
readonly 400: "#F2933F";
|
|
267
|
+
readonly 500: "#EE8033";
|
|
268
|
+
readonly 600: "#D86A1E";
|
|
269
|
+
readonly 700: "#B5551A";
|
|
270
|
+
readonly 800: "#8F4314";
|
|
271
|
+
readonly 900: "#6B320F";
|
|
272
|
+
};
|
|
273
|
+
readonly info: {
|
|
274
|
+
readonly 50: "#E8F1FB";
|
|
275
|
+
readonly 100: "#C7DDF5";
|
|
276
|
+
readonly 200: "#8FBBEB";
|
|
277
|
+
readonly 300: "#5798DD";
|
|
278
|
+
readonly 400: "#2E80D2";
|
|
279
|
+
readonly 500: "#2384C5";
|
|
280
|
+
readonly 600: "#1F6FB0";
|
|
281
|
+
readonly 700: "#1937B2";
|
|
282
|
+
readonly 800: "#15296F";
|
|
283
|
+
readonly 900: "#0F1C4B";
|
|
284
|
+
};
|
|
285
|
+
readonly neutral: {
|
|
286
|
+
readonly 0: "#FFFFFF";
|
|
287
|
+
readonly 50: "#F8F8F8";
|
|
288
|
+
readonly 100: "#F3F3F3";
|
|
289
|
+
readonly 200: "#EEEEEE";
|
|
290
|
+
readonly 300: "#DBDBDB";
|
|
291
|
+
readonly 400: "#C6C6C6";
|
|
292
|
+
readonly 500: "#ABABAB";
|
|
293
|
+
readonly 600: "#727272";
|
|
294
|
+
readonly 700: "#525252";
|
|
295
|
+
readonly 800: "#393939";
|
|
296
|
+
readonly 900: "#212121";
|
|
297
|
+
readonly 1000: "#000000";
|
|
298
|
+
};
|
|
299
|
+
};
|
|
300
|
+
space: {
|
|
301
|
+
readonly 0: 0;
|
|
302
|
+
readonly 1: 4;
|
|
303
|
+
readonly 2: 8;
|
|
304
|
+
readonly 3: 12;
|
|
305
|
+
readonly 4: 16;
|
|
306
|
+
readonly 5: 24;
|
|
307
|
+
readonly 6: 32;
|
|
308
|
+
readonly 7: 40;
|
|
309
|
+
readonly 8: 48;
|
|
310
|
+
readonly 9: 56;
|
|
311
|
+
readonly 10: 64;
|
|
312
|
+
readonly 12: 80;
|
|
313
|
+
readonly 14: 96;
|
|
314
|
+
readonly 16: 120;
|
|
315
|
+
readonly 20: 160;
|
|
316
|
+
};
|
|
317
|
+
radius: {
|
|
318
|
+
readonly xs: 4;
|
|
319
|
+
readonly sm: 5;
|
|
320
|
+
readonly md: 8;
|
|
321
|
+
readonly lg: 12;
|
|
322
|
+
readonly xl: 16;
|
|
323
|
+
readonly "2xl": 24;
|
|
324
|
+
readonly full: 999;
|
|
325
|
+
};
|
|
326
|
+
border: {
|
|
327
|
+
readonly thin: 1;
|
|
328
|
+
readonly md: 1.5;
|
|
329
|
+
readonly thick: 2;
|
|
330
|
+
};
|
|
331
|
+
shadow: {
|
|
332
|
+
readonly none: ShadowStyle;
|
|
333
|
+
readonly xs: ShadowStyle;
|
|
334
|
+
readonly s: ShadowStyle;
|
|
335
|
+
readonly md: ShadowStyle;
|
|
336
|
+
readonly l: ShadowStyle;
|
|
337
|
+
readonly xl: ShadowStyle;
|
|
338
|
+
readonly xxl: ShadowStyle;
|
|
339
|
+
};
|
|
340
|
+
motion: {
|
|
341
|
+
readonly duration: {
|
|
342
|
+
readonly fast: 120;
|
|
343
|
+
readonly base: 200;
|
|
344
|
+
readonly slow: 300;
|
|
345
|
+
};
|
|
346
|
+
readonly easing: {
|
|
347
|
+
readonly standard: readonly [0.2, 0, 0, 1];
|
|
348
|
+
readonly emphasized: readonly [0.3, 0, 0, 1];
|
|
349
|
+
};
|
|
350
|
+
};
|
|
351
|
+
font: {
|
|
352
|
+
family: {
|
|
353
|
+
sans: "NotoSans";
|
|
354
|
+
ui: "Roboto-Medium";
|
|
355
|
+
mono: "RedHatMono";
|
|
356
|
+
};
|
|
357
|
+
weight: {
|
|
358
|
+
readonly regular: "400";
|
|
359
|
+
readonly medium: "500";
|
|
360
|
+
readonly semibold: "600";
|
|
361
|
+
readonly bold: "700";
|
|
362
|
+
};
|
|
363
|
+
};
|
|
364
|
+
type: Record<string, TypeStep>;
|
|
365
|
+
layout: {
|
|
366
|
+
containerMax: number;
|
|
367
|
+
gutter: number;
|
|
368
|
+
columns: number;
|
|
369
|
+
};
|
|
370
|
+
focusRingWidth: number;
|
|
371
|
+
};
|
|
372
|
+
type UX4GTheme = ReturnType<typeof makeTheme>;
|
|
373
|
+
declare const theme: {
|
|
374
|
+
color: {
|
|
375
|
+
readonly primary: string;
|
|
376
|
+
readonly primaryHover: string;
|
|
377
|
+
readonly primaryActive: string;
|
|
378
|
+
readonly primarySubtle: string;
|
|
379
|
+
readonly onPrimary: "#FFFFFF";
|
|
380
|
+
readonly secondary: string;
|
|
381
|
+
readonly secondaryHover: string;
|
|
382
|
+
readonly success: "#107400";
|
|
383
|
+
readonly successSubtle: "#EDF7E6";
|
|
384
|
+
readonly danger: "#DB2829";
|
|
385
|
+
readonly dangerHover: "#C21D22";
|
|
386
|
+
readonly dangerSubtle: "#FFEEEA";
|
|
387
|
+
readonly warning: "#EE8033";
|
|
388
|
+
readonly warningSubtle: "#FEF1E7";
|
|
389
|
+
readonly info: "#1937B2";
|
|
390
|
+
readonly infoSubtle: "#E8F1FB";
|
|
391
|
+
readonly text: "#212121";
|
|
392
|
+
readonly textMuted: "#727272";
|
|
393
|
+
readonly textSubtle: "#ABABAB";
|
|
394
|
+
readonly textInverse: "#FFFFFF";
|
|
395
|
+
readonly textLink: string;
|
|
396
|
+
readonly surface: "#FFFFFF";
|
|
397
|
+
readonly surfaceSubtle: "#F8F8F8";
|
|
398
|
+
readonly surfaceMuted: "#F3F3F3";
|
|
399
|
+
readonly surfaceBrand: string;
|
|
400
|
+
readonly border: "#DBDBDB";
|
|
401
|
+
readonly borderStrong: "#C6C6C6";
|
|
402
|
+
readonly divider: "#EEEEEE";
|
|
403
|
+
readonly focus: "rgba(97, 58, 245, 0.48)";
|
|
404
|
+
};
|
|
405
|
+
ramp: {
|
|
406
|
+
readonly violet: {
|
|
407
|
+
readonly 50: "#F4F3FE";
|
|
408
|
+
readonly 100: "#ECD0FF";
|
|
409
|
+
readonly 200: "#DAB2FF";
|
|
410
|
+
readonly 300: "#C495FF";
|
|
411
|
+
readonly 400: "#AC7AFF";
|
|
412
|
+
readonly 500: "#7C5BF7";
|
|
413
|
+
readonly 600: "#613AF5";
|
|
414
|
+
readonly 700: "#4A26C4";
|
|
415
|
+
readonly 800: "#381C8A";
|
|
416
|
+
readonly 900: "#2A1466";
|
|
417
|
+
};
|
|
418
|
+
readonly secondary: {
|
|
419
|
+
readonly 50: "#F4F3F9";
|
|
420
|
+
readonly 100: "#ECEAF3";
|
|
421
|
+
readonly 200: "#D9D6E7";
|
|
422
|
+
readonly 300: "#C0BBD7";
|
|
423
|
+
readonly 400: "#A7A0C6";
|
|
424
|
+
readonly 500: "#8981AB";
|
|
425
|
+
readonly 600: "#746D96";
|
|
426
|
+
readonly 700: "#60597F";
|
|
427
|
+
readonly 800: "#4D4768";
|
|
428
|
+
readonly 900: "#3A364F";
|
|
429
|
+
};
|
|
430
|
+
readonly success: {
|
|
431
|
+
readonly 50: "#EDF7E6";
|
|
432
|
+
readonly 100: "#E3F2D9";
|
|
433
|
+
readonly 200: "#C6E5B5";
|
|
434
|
+
readonly 300: "#9BCF80";
|
|
435
|
+
readonly 400: "#69B349";
|
|
436
|
+
readonly 500: "#389314";
|
|
437
|
+
readonly 600: "#107400";
|
|
438
|
+
readonly 700: "#005A00";
|
|
439
|
+
readonly 800: "#024900";
|
|
440
|
+
readonly 900: "#013300";
|
|
441
|
+
};
|
|
442
|
+
readonly danger: {
|
|
443
|
+
readonly 50: "#FFEEEA";
|
|
444
|
+
readonly 100: "#FEDAD3";
|
|
445
|
+
readonly 200: "#FEAEAE";
|
|
446
|
+
readonly 300: "#FF7A7A";
|
|
447
|
+
readonly 400: "#F35B5B";
|
|
448
|
+
readonly 500: "#DB2829";
|
|
449
|
+
readonly 600: "#C21D22";
|
|
450
|
+
readonly 700: "#B7131A";
|
|
451
|
+
readonly 800: "#8E0F15";
|
|
452
|
+
readonly 900: "#6B0B10";
|
|
453
|
+
};
|
|
454
|
+
readonly warning: {
|
|
455
|
+
readonly 50: "#FEF1E7";
|
|
456
|
+
readonly 100: "#FDDCC2";
|
|
457
|
+
readonly 200: "#FBC499";
|
|
458
|
+
readonly 300: "#F6A766";
|
|
459
|
+
readonly 400: "#F2933F";
|
|
460
|
+
readonly 500: "#EE8033";
|
|
461
|
+
readonly 600: "#D86A1E";
|
|
462
|
+
readonly 700: "#B5551A";
|
|
463
|
+
readonly 800: "#8F4314";
|
|
464
|
+
readonly 900: "#6B320F";
|
|
465
|
+
};
|
|
466
|
+
readonly info: {
|
|
467
|
+
readonly 50: "#E8F1FB";
|
|
468
|
+
readonly 100: "#C7DDF5";
|
|
469
|
+
readonly 200: "#8FBBEB";
|
|
470
|
+
readonly 300: "#5798DD";
|
|
471
|
+
readonly 400: "#2E80D2";
|
|
472
|
+
readonly 500: "#2384C5";
|
|
473
|
+
readonly 600: "#1F6FB0";
|
|
474
|
+
readonly 700: "#1937B2";
|
|
475
|
+
readonly 800: "#15296F";
|
|
476
|
+
readonly 900: "#0F1C4B";
|
|
477
|
+
};
|
|
478
|
+
readonly neutral: {
|
|
479
|
+
readonly 0: "#FFFFFF";
|
|
480
|
+
readonly 50: "#F8F8F8";
|
|
481
|
+
readonly 100: "#F3F3F3";
|
|
482
|
+
readonly 200: "#EEEEEE";
|
|
483
|
+
readonly 300: "#DBDBDB";
|
|
484
|
+
readonly 400: "#C6C6C6";
|
|
485
|
+
readonly 500: "#ABABAB";
|
|
486
|
+
readonly 600: "#727272";
|
|
487
|
+
readonly 700: "#525252";
|
|
488
|
+
readonly 800: "#393939";
|
|
489
|
+
readonly 900: "#212121";
|
|
490
|
+
readonly 1000: "#000000";
|
|
491
|
+
};
|
|
492
|
+
};
|
|
493
|
+
space: {
|
|
494
|
+
readonly 0: 0;
|
|
495
|
+
readonly 1: 4;
|
|
496
|
+
readonly 2: 8;
|
|
497
|
+
readonly 3: 12;
|
|
498
|
+
readonly 4: 16;
|
|
499
|
+
readonly 5: 24;
|
|
500
|
+
readonly 6: 32;
|
|
501
|
+
readonly 7: 40;
|
|
502
|
+
readonly 8: 48;
|
|
503
|
+
readonly 9: 56;
|
|
504
|
+
readonly 10: 64;
|
|
505
|
+
readonly 12: 80;
|
|
506
|
+
readonly 14: 96;
|
|
507
|
+
readonly 16: 120;
|
|
508
|
+
readonly 20: 160;
|
|
509
|
+
};
|
|
510
|
+
radius: {
|
|
511
|
+
readonly xs: 4;
|
|
512
|
+
readonly sm: 5;
|
|
513
|
+
readonly md: 8;
|
|
514
|
+
readonly lg: 12;
|
|
515
|
+
readonly xl: 16;
|
|
516
|
+
readonly "2xl": 24;
|
|
517
|
+
readonly full: 999;
|
|
518
|
+
};
|
|
519
|
+
border: {
|
|
520
|
+
readonly thin: 1;
|
|
521
|
+
readonly md: 1.5;
|
|
522
|
+
readonly thick: 2;
|
|
523
|
+
};
|
|
524
|
+
shadow: {
|
|
525
|
+
readonly none: ShadowStyle;
|
|
526
|
+
readonly xs: ShadowStyle;
|
|
527
|
+
readonly s: ShadowStyle;
|
|
528
|
+
readonly md: ShadowStyle;
|
|
529
|
+
readonly l: ShadowStyle;
|
|
530
|
+
readonly xl: ShadowStyle;
|
|
531
|
+
readonly xxl: ShadowStyle;
|
|
532
|
+
};
|
|
533
|
+
motion: {
|
|
534
|
+
readonly duration: {
|
|
535
|
+
readonly fast: 120;
|
|
536
|
+
readonly base: 200;
|
|
537
|
+
readonly slow: 300;
|
|
538
|
+
};
|
|
539
|
+
readonly easing: {
|
|
540
|
+
readonly standard: readonly [0.2, 0, 0, 1];
|
|
541
|
+
readonly emphasized: readonly [0.3, 0, 0, 1];
|
|
542
|
+
};
|
|
543
|
+
};
|
|
544
|
+
font: {
|
|
545
|
+
family: {
|
|
546
|
+
sans: "NotoSans";
|
|
547
|
+
ui: "Roboto-Medium";
|
|
548
|
+
mono: "RedHatMono";
|
|
549
|
+
};
|
|
550
|
+
weight: {
|
|
551
|
+
readonly regular: "400";
|
|
552
|
+
readonly medium: "500";
|
|
553
|
+
readonly semibold: "600";
|
|
554
|
+
readonly bold: "700";
|
|
555
|
+
};
|
|
556
|
+
};
|
|
557
|
+
type: Record<string, TypeStep>;
|
|
558
|
+
layout: {
|
|
559
|
+
containerMax: number;
|
|
560
|
+
gutter: number;
|
|
561
|
+
columns: number;
|
|
562
|
+
};
|
|
563
|
+
focusRingWidth: number;
|
|
564
|
+
};
|
|
565
|
+
|
|
566
|
+
interface ThemeProviderProps extends ThemeOverrides {
|
|
567
|
+
/** A fully built theme. When set, the override fields are ignored. */
|
|
568
|
+
theme?: UX4GTheme;
|
|
569
|
+
children: React.ReactNode;
|
|
570
|
+
}
|
|
571
|
+
/**
|
|
572
|
+
* Seeds the UX4G theme for the subtree. Pass `primary` / `secondary` /
|
|
573
|
+
* `fontFamily` to re-skin (UX4G "Theme Craft"), or a fully built `theme`.
|
|
574
|
+
*/
|
|
575
|
+
declare function ThemeProvider({ theme, primary, secondary, fontFamily, children, }: ThemeProviderProps): React.JSX.Element;
|
|
576
|
+
/** Read the active UX4G theme. Returns the default violet theme outside a provider. */
|
|
577
|
+
declare function useUX4GTheme(): UX4GTheme;
|
|
578
|
+
|
|
579
|
+
interface ButtonProps extends Omit<PressableProps, "style" | "children"> {
|
|
580
|
+
children?: React.ReactNode;
|
|
581
|
+
/** Colourway. @default "primary" */
|
|
582
|
+
variant?: "primary" | "success" | "danger";
|
|
583
|
+
/** Fill treatment. @default "filled" */
|
|
584
|
+
appearance?: "filled" | "outlined" | "text" | "tonal";
|
|
585
|
+
/** @default "default" */
|
|
586
|
+
size?: "small" | "default" | "large";
|
|
587
|
+
/** Stretch to container width. @default false */
|
|
588
|
+
fullWidth?: boolean;
|
|
589
|
+
disabled?: boolean;
|
|
590
|
+
/** Leading icon node (e.g. a react-native-svg element). */
|
|
591
|
+
iconLeft?: React.ReactNode;
|
|
592
|
+
/** Trailing icon node. */
|
|
593
|
+
iconRight?: React.ReactNode;
|
|
594
|
+
/** Optional theme override (else the active provider/default theme). */
|
|
595
|
+
theme?: UX4GTheme;
|
|
596
|
+
style?: StyleProp<ViewStyle>;
|
|
597
|
+
}
|
|
598
|
+
declare function Button({ children, variant, appearance, size, fullWidth, disabled, iconLeft, iconRight, theme: themeProp, style, accessibilityLabel, ...rest }: ButtonProps): React.JSX.Element;
|
|
599
|
+
|
|
600
|
+
interface IconButtonProps extends Omit<PressableProps, "style" | "children" | "accessibilityLabel"> {
|
|
601
|
+
/** The icon node (e.g. a react-native-svg element). */
|
|
602
|
+
children?: React.ReactNode;
|
|
603
|
+
/** Colourway. @default "neutral" */
|
|
604
|
+
variant?: "neutral" | "primary" | "danger";
|
|
605
|
+
/** Fill treatment. @default "ghost" */
|
|
606
|
+
appearance?: "ghost" | "tonal" | "filled";
|
|
607
|
+
/** Box size — small (32) · default (40) · large (48). @default "default" */
|
|
608
|
+
size?: "small" | "default" | "large";
|
|
609
|
+
/** Accessible name — required for icon-only controls. */
|
|
610
|
+
accessibilityLabel: string;
|
|
611
|
+
disabled?: boolean;
|
|
612
|
+
/** Optional theme override (else the active provider/default theme). */
|
|
613
|
+
theme?: UX4GTheme;
|
|
614
|
+
style?: StyleProp<ViewStyle>;
|
|
615
|
+
}
|
|
616
|
+
/**
|
|
617
|
+
* UX4G IconButton — a square, icon-only action (close, menu, more, edit).
|
|
618
|
+
* Pass an icon node (e.g. a react-native-svg element) as children, and an
|
|
619
|
+
* `accessibilityLabel` for the screen-reader name.
|
|
620
|
+
*/
|
|
621
|
+
declare function IconButton({ children, variant, appearance, size, disabled, accessibilityLabel, theme: themeProp, style, ...rest }: IconButtonProps): React.JSX.Element;
|
|
622
|
+
|
|
623
|
+
interface InputProps extends Omit<TextInputProps, "editable" | "style"> {
|
|
624
|
+
label?: string;
|
|
625
|
+
helperText?: string;
|
|
626
|
+
/** @default "default" */
|
|
627
|
+
size?: "small" | "default" | "large";
|
|
628
|
+
/** @default "default" */
|
|
629
|
+
state?: "default" | "error" | "success";
|
|
630
|
+
iconLeft?: React.ReactNode;
|
|
631
|
+
iconRight?: React.ReactNode;
|
|
632
|
+
required?: boolean;
|
|
633
|
+
disabled?: boolean;
|
|
634
|
+
theme?: UX4GTheme;
|
|
635
|
+
/** Style for the field box itself. */
|
|
636
|
+
style?: StyleProp<TextStyle>;
|
|
637
|
+
/** Style for the outer group (label + field + helper). */
|
|
638
|
+
containerStyle?: StyleProp<ViewStyle>;
|
|
639
|
+
}
|
|
640
|
+
declare function Input({ label, helperText, size, state, disabled, required, iconLeft, iconRight, theme: themeProp, style, containerStyle, accessibilityLabel, onFocus, onBlur, ...rest }: InputProps): React.JSX.Element;
|
|
641
|
+
|
|
642
|
+
interface TextareaProps extends Omit<TextInputProps, "editable" | "style" | "multiline" | "numberOfLines"> {
|
|
643
|
+
label?: string;
|
|
644
|
+
helperText?: string;
|
|
645
|
+
/** Visible line count — drives the field's minimum height. @default 4 */
|
|
646
|
+
rows?: number;
|
|
647
|
+
/** @default "default" */
|
|
648
|
+
state?: "default" | "error" | "success";
|
|
649
|
+
required?: boolean;
|
|
650
|
+
disabled?: boolean;
|
|
651
|
+
theme?: UX4GTheme;
|
|
652
|
+
/** Style for the field box itself. */
|
|
653
|
+
style?: StyleProp<TextStyle>;
|
|
654
|
+
/** Style for the outer group (label + field + helper). */
|
|
655
|
+
containerStyle?: StyleProp<ViewStyle>;
|
|
656
|
+
}
|
|
657
|
+
declare function Textarea({ label, helperText, rows, state, disabled, required, theme: themeProp, style, containerStyle, accessibilityLabel, onFocus, onBlur, ...rest }: TextareaProps): React.JSX.Element;
|
|
658
|
+
|
|
659
|
+
interface SelectOption {
|
|
660
|
+
value: string;
|
|
661
|
+
label: string;
|
|
662
|
+
}
|
|
663
|
+
interface SelectProps {
|
|
664
|
+
label?: string;
|
|
665
|
+
helperText?: string;
|
|
666
|
+
placeholder?: string;
|
|
667
|
+
/** Options as strings or {value,label}. */
|
|
668
|
+
options?: (string | SelectOption)[];
|
|
669
|
+
/** Controlled selected value. */
|
|
670
|
+
value?: string;
|
|
671
|
+
/** Initial value when uncontrolled. */
|
|
672
|
+
defaultValue?: string;
|
|
673
|
+
/** Reports the chosen option's value when the user selects it. */
|
|
674
|
+
onChange?: (value: string) => void;
|
|
675
|
+
/** @default "default" */
|
|
676
|
+
size?: "small" | "default" | "large";
|
|
677
|
+
/** @default "default" */
|
|
678
|
+
state?: "default" | "error" | "success";
|
|
679
|
+
required?: boolean;
|
|
680
|
+
disabled?: boolean;
|
|
681
|
+
/** Optional theme override (else the active provider/default theme). */
|
|
682
|
+
theme?: UX4GTheme;
|
|
683
|
+
/** Style for the field box (trigger) itself. */
|
|
684
|
+
style?: StyleProp<ViewStyle>;
|
|
685
|
+
/** Style for the outer group (label + field + helper). */
|
|
686
|
+
containerStyle?: StyleProp<ViewStyle>;
|
|
687
|
+
}
|
|
688
|
+
declare function Select({ label, helperText, placeholder, options, value, defaultValue, onChange, size, state, required, disabled, theme: themeProp, style, containerStyle, }: SelectProps): React.JSX.Element;
|
|
689
|
+
|
|
690
|
+
interface CheckboxProps {
|
|
691
|
+
label?: React.ReactNode;
|
|
692
|
+
/** Controlled checked state. */
|
|
693
|
+
checked?: boolean;
|
|
694
|
+
/** Initial checked state when uncontrolled. */
|
|
695
|
+
defaultChecked?: boolean;
|
|
696
|
+
/** Reports the intended next value on press. */
|
|
697
|
+
onChange?: (checked: boolean) => void;
|
|
698
|
+
disabled?: boolean;
|
|
699
|
+
indeterminate?: boolean;
|
|
700
|
+
theme?: UX4GTheme;
|
|
701
|
+
style?: StyleProp<ViewStyle>;
|
|
702
|
+
}
|
|
703
|
+
declare function Checkbox({ label, checked, defaultChecked, onChange, disabled, indeterminate, theme: themeProp, style, }: CheckboxProps): React.JSX.Element;
|
|
704
|
+
|
|
705
|
+
/** UX4G Radio — circular single-select control. Group options via a shared `name`. */
|
|
706
|
+
interface RadioProps {
|
|
707
|
+
label?: React.ReactNode;
|
|
708
|
+
/** Controlled checked state. */
|
|
709
|
+
checked?: boolean;
|
|
710
|
+
/** Initial checked state when uncontrolled. */
|
|
711
|
+
defaultChecked?: boolean;
|
|
712
|
+
/** Groups options for single-select; give every option in a group the same name. */
|
|
713
|
+
name?: string;
|
|
714
|
+
/** This option's value, reported to `onChange` when selected. */
|
|
715
|
+
value?: string;
|
|
716
|
+
/** Fired with the option's `value` (and `true`) when the radio is selected. */
|
|
717
|
+
onChange?: (value: string | undefined, checked: boolean) => void;
|
|
718
|
+
disabled?: boolean;
|
|
719
|
+
/** Optional theme override (else the active provider/default theme). */
|
|
720
|
+
theme?: UX4GTheme;
|
|
721
|
+
style?: StyleProp<ViewStyle>;
|
|
722
|
+
}
|
|
723
|
+
declare function Radio({ label, checked, defaultChecked, name, value, onChange, disabled, theme: themeProp, style, }: RadioProps): React.JSX.Element;
|
|
724
|
+
|
|
725
|
+
interface SwitchProps {
|
|
726
|
+
label?: React.ReactNode;
|
|
727
|
+
/** Controlled on/off state. */
|
|
728
|
+
checked?: boolean;
|
|
729
|
+
/** Initial on/off state when uncontrolled. */
|
|
730
|
+
defaultChecked?: boolean;
|
|
731
|
+
/** Reports the intended next value on press. */
|
|
732
|
+
onChange?: (checked: boolean) => void;
|
|
733
|
+
disabled?: boolean;
|
|
734
|
+
/** Optional theme override (else the active provider/default theme). */
|
|
735
|
+
theme?: UX4GTheme;
|
|
736
|
+
style?: StyleProp<ViewStyle>;
|
|
737
|
+
}
|
|
738
|
+
/** UX4G Switch — on/off toggle for settings and preferences. */
|
|
739
|
+
declare function Switch({ label, checked, defaultChecked, onChange, disabled, theme: themeProp, style, }: SwitchProps): React.JSX.Element;
|
|
740
|
+
|
|
741
|
+
interface SearchProps {
|
|
742
|
+
/** Controlled value. */
|
|
743
|
+
value?: string;
|
|
744
|
+
/** Reports the value on every keystroke. */
|
|
745
|
+
onChange?: (value: string) => void;
|
|
746
|
+
/** Fires the current value when the user submits (keyboard return / search key). */
|
|
747
|
+
onSearch?: (value: string) => void;
|
|
748
|
+
placeholder?: string;
|
|
749
|
+
/** @default "default" */
|
|
750
|
+
size?: "default" | "large";
|
|
751
|
+
/** Optional theme override (else the active provider/default theme). */
|
|
752
|
+
theme?: UX4GTheme;
|
|
753
|
+
/** Style for the field box itself. */
|
|
754
|
+
style?: StyleProp<TextStyle>;
|
|
755
|
+
/** Style for the outer container. */
|
|
756
|
+
containerStyle?: StyleProp<ViewStyle>;
|
|
757
|
+
}
|
|
758
|
+
declare function Search({ value, onChange, onSearch, placeholder, size, theme: themeProp, style, containerStyle, }: SearchProps): React.JSX.Element;
|
|
759
|
+
|
|
760
|
+
/** UX4G DatePicker — field that opens a month calendar popover; value is ISO yyyy-mm-dd. */
|
|
761
|
+
interface DatePickerProps {
|
|
762
|
+
label?: string;
|
|
763
|
+
/** ISO yyyy-mm-dd. */
|
|
764
|
+
value?: string;
|
|
765
|
+
onChange?: (iso: string) => void;
|
|
766
|
+
placeholder?: string;
|
|
767
|
+
min?: string;
|
|
768
|
+
max?: string;
|
|
769
|
+
required?: boolean;
|
|
770
|
+
/** Optional theme override (else the active provider/default theme). */
|
|
771
|
+
theme?: UX4GTheme;
|
|
772
|
+
/** Style for the field box (trigger) itself. */
|
|
773
|
+
style?: StyleProp<ViewStyle>;
|
|
774
|
+
/** Style for the outer group (label + field). */
|
|
775
|
+
containerStyle?: StyleProp<ViewStyle>;
|
|
776
|
+
}
|
|
777
|
+
declare function DatePicker({ label, value, onChange, placeholder, min, max, required, theme: themeProp, style, containerStyle, }: DatePickerProps): React.JSX.Element;
|
|
778
|
+
|
|
779
|
+
interface RangeSliderProps {
|
|
780
|
+
label?: string;
|
|
781
|
+
value?: number;
|
|
782
|
+
defaultValue?: number;
|
|
783
|
+
min?: number;
|
|
784
|
+
max?: number;
|
|
785
|
+
step?: number;
|
|
786
|
+
onChange?: (value: number) => void;
|
|
787
|
+
/** Show the current value bubble. @default true */
|
|
788
|
+
showValue?: boolean;
|
|
789
|
+
/** Optional unit suffix for the value label, e.g. "%". */
|
|
790
|
+
unit?: string;
|
|
791
|
+
disabled?: boolean;
|
|
792
|
+
/** Optional theme override (else the active provider/default theme). */
|
|
793
|
+
theme?: UX4GTheme;
|
|
794
|
+
style?: StyleProp<ViewStyle>;
|
|
795
|
+
}
|
|
796
|
+
/** UX4G RangeSlider — single-value slider with a filled track and value bubble. */
|
|
797
|
+
declare function RangeSlider({ label, value, defaultValue, min, max, step, onChange, showValue, unit, disabled, theme: themeProp, style, }: RangeSliderProps): React.JSX.Element;
|
|
798
|
+
|
|
799
|
+
interface ColorPickerProps {
|
|
800
|
+
label?: string;
|
|
801
|
+
/** Selected hex value (controlled). */
|
|
802
|
+
value?: string;
|
|
803
|
+
/** Initial hex value when uncontrolled. @default "#613AF5" */
|
|
804
|
+
defaultValue?: string;
|
|
805
|
+
/** Fired with the chosen hex (uppercased). */
|
|
806
|
+
onChange?: (hex: string) => void;
|
|
807
|
+
/** Curated swatches. */
|
|
808
|
+
swatches?: string[];
|
|
809
|
+
/** Show a trigger that opens the full palette panel. @default true */
|
|
810
|
+
allowCustom?: boolean;
|
|
811
|
+
/** Optional theme override (else the active provider/default theme). */
|
|
812
|
+
theme?: UX4GTheme;
|
|
813
|
+
/** Style for the outer group (label + swatches). */
|
|
814
|
+
style?: StyleProp<ViewStyle>;
|
|
815
|
+
}
|
|
816
|
+
declare function ColorPicker({ label, value, defaultValue, onChange, swatches, allowCustom, theme: themeProp, style, }: ColorPickerProps): React.JSX.Element;
|
|
817
|
+
|
|
818
|
+
interface UploadedFile {
|
|
819
|
+
name: string;
|
|
820
|
+
size: number;
|
|
821
|
+
type: string;
|
|
822
|
+
}
|
|
823
|
+
interface FileUploadProps {
|
|
824
|
+
label?: string;
|
|
825
|
+
hint?: string;
|
|
826
|
+
/**
|
|
827
|
+
* Accept hint, e.g. ".pdf,image/*". Kept for parity with the web contract and
|
|
828
|
+
* passed to `onPick` so the consuming app can configure its native picker.
|
|
829
|
+
*/
|
|
830
|
+
accept?: string;
|
|
831
|
+
multiple?: boolean;
|
|
832
|
+
/** Controlled file list. Omit for uncontrolled (internal) state. */
|
|
833
|
+
files?: UploadedFile[];
|
|
834
|
+
onChange?: (files: UploadedFile[]) => void;
|
|
835
|
+
/**
|
|
836
|
+
* React Native has no `<input type="file">`. Pressing the dropzone (or
|
|
837
|
+
* "browse") calls `onPick` — the consuming app wires a real picker
|
|
838
|
+
* (e.g. expo-document-picker, react-native-image-picker) and returns the
|
|
839
|
+
* chosen files. Receives `{ accept, multiple }` so the picker can be
|
|
840
|
+
* configured. Returning nothing (or an empty array) is treated as a cancel.
|
|
841
|
+
*/
|
|
842
|
+
onPick?: (opts: {
|
|
843
|
+
accept?: string;
|
|
844
|
+
multiple: boolean;
|
|
845
|
+
}) => UploadedFile[] | undefined | Promise<UploadedFile[] | undefined>;
|
|
846
|
+
disabled?: boolean;
|
|
847
|
+
/** Optional theme override (else the active provider/default theme). */
|
|
848
|
+
theme?: UX4GTheme;
|
|
849
|
+
style?: StyleProp<ViewStyle>;
|
|
850
|
+
}
|
|
851
|
+
/** UX4G FileUpload — drop-zone visual with a removable selected-file list. */
|
|
852
|
+
declare function FileUpload({ label, hint, accept, multiple, files, onChange, onPick, disabled, theme: themeProp, style, }: FileUploadProps): React.JSX.Element;
|
|
853
|
+
|
|
854
|
+
interface CardProps {
|
|
855
|
+
title?: React.ReactNode;
|
|
856
|
+
subtitle?: React.ReactNode;
|
|
857
|
+
/** Media node rendered in a 16:9 frame at the top. */
|
|
858
|
+
media?: React.ReactNode;
|
|
859
|
+
footer?: React.ReactNode;
|
|
860
|
+
/** Right-aligned action row (e.g. Buttons). */
|
|
861
|
+
actions?: React.ReactNode;
|
|
862
|
+
/** Inner padding in px. @default 20 */
|
|
863
|
+
padding?: number;
|
|
864
|
+
/** Adds a pressable / hover affordance. @default false */
|
|
865
|
+
interactive?: boolean;
|
|
866
|
+
/** Fired on tap when `interactive`. */
|
|
867
|
+
onPress?: (event: GestureResponderEvent) => void;
|
|
868
|
+
/** Disables the press affordance when `interactive`. @default false */
|
|
869
|
+
disabled?: boolean;
|
|
870
|
+
/** Required when `interactive` so assistive tech can name the card. */
|
|
871
|
+
accessibilityLabel?: string;
|
|
872
|
+
/** Optional theme override (else the active provider/default theme). */
|
|
873
|
+
theme?: UX4GTheme;
|
|
874
|
+
style?: StyleProp<ViewStyle>;
|
|
875
|
+
testID?: string;
|
|
876
|
+
children?: React.ReactNode;
|
|
877
|
+
}
|
|
878
|
+
/**
|
|
879
|
+
* UX4G Card — surface container. 1px border + soft shadow, 12px radius.
|
|
880
|
+
* Compose freely, or use the optional header/media/footer props.
|
|
881
|
+
*/
|
|
882
|
+
declare function Card({ children, title, subtitle, media, footer, actions, padding, interactive, onPress, disabled, accessibilityLabel, theme: themeProp, style, testID, }: CardProps): React.JSX.Element;
|
|
883
|
+
|
|
884
|
+
interface BadgeProps {
|
|
885
|
+
/** Colourway. @default "neutral" */
|
|
886
|
+
variant?: "neutral" | "primary" | "success" | "danger" | "info" | "warning";
|
|
887
|
+
/** Fill treatment. @default "tonal" */
|
|
888
|
+
appearance?: "tonal" | "solid" | "dot";
|
|
889
|
+
children?: React.ReactNode;
|
|
890
|
+
/** Optional theme override (else the active provider/default theme). */
|
|
891
|
+
theme?: UX4GTheme;
|
|
892
|
+
/** Container style override for the pill (ignored for `dot`). */
|
|
893
|
+
style?: StyleProp<ViewStyle>;
|
|
894
|
+
}
|
|
895
|
+
declare function Badge({ children, variant, appearance, theme: themeProp, style, }: BadgeProps): React.JSX.Element;
|
|
896
|
+
|
|
897
|
+
interface ChipProps {
|
|
898
|
+
/** Highlight the chip as the active filter / choice. @default false */
|
|
899
|
+
selected?: boolean;
|
|
900
|
+
/** Dim and block interaction. @default false */
|
|
901
|
+
disabled?: boolean;
|
|
902
|
+
/** Leading icon node (e.g. a react-native-svg element). */
|
|
903
|
+
icon?: React.ReactNode;
|
|
904
|
+
/** Make the chip pressable (filter / choice token). */
|
|
905
|
+
onPress?: (e: GestureResponderEvent) => void;
|
|
906
|
+
/** Show a remove (×) button and handle its press (input token). */
|
|
907
|
+
onRemove?: (e: GestureResponderEvent) => void;
|
|
908
|
+
children?: React.ReactNode;
|
|
909
|
+
/** Optional theme override (else the active provider/default theme). */
|
|
910
|
+
theme?: UX4GTheme;
|
|
911
|
+
style?: StyleProp<ViewStyle>;
|
|
912
|
+
/** Override the computed accessibility label. */
|
|
913
|
+
accessibilityLabel?: string;
|
|
914
|
+
}
|
|
915
|
+
declare function Chip({ children, selected, disabled, icon, onPress, onRemove, theme: themeProp, style, accessibilityLabel, }: ChipProps): React.JSX.Element;
|
|
916
|
+
|
|
917
|
+
interface AvatarProps {
|
|
918
|
+
src?: string;
|
|
919
|
+
/** Full name — drives initials fallback and accessibility label. */
|
|
920
|
+
name?: string;
|
|
921
|
+
/** Pixel size. @default 40 */
|
|
922
|
+
size?: number;
|
|
923
|
+
/** @default "circle" */
|
|
924
|
+
shape?: "circle" | "rounded";
|
|
925
|
+
status?: "online" | "busy" | "away" | null;
|
|
926
|
+
/** Optional theme override (else the active provider/default theme). */
|
|
927
|
+
theme?: UX4GTheme;
|
|
928
|
+
/** Test hook on the outer container. */
|
|
929
|
+
testID?: string;
|
|
930
|
+
style?: StyleProp<ViewStyle>;
|
|
931
|
+
}
|
|
932
|
+
declare function Avatar({ src, name, size, shape, status, theme: themeProp, testID, style, }: AvatarProps): React.JSX.Element;
|
|
933
|
+
|
|
934
|
+
interface CommentProps {
|
|
935
|
+
/** Author name / node shown next to the avatar. */
|
|
936
|
+
author: React.ReactNode;
|
|
937
|
+
/** Avatar node. Omit to render an initials monogram from `author`. */
|
|
938
|
+
avatar?: React.ReactNode;
|
|
939
|
+
/** Time / meta line next to the author. */
|
|
940
|
+
timestamp?: React.ReactNode;
|
|
941
|
+
/** Comment body. */
|
|
942
|
+
body: React.ReactNode;
|
|
943
|
+
/** Action row (e.g. Reply, Like). */
|
|
944
|
+
actions?: React.ReactNode;
|
|
945
|
+
/** Nested replies — usually more <Comment> elements. */
|
|
946
|
+
children?: React.ReactNode;
|
|
947
|
+
/** Tint + accent for an unread / highlighted comment. */
|
|
948
|
+
highlight?: boolean;
|
|
949
|
+
/** Optional theme override (else the active provider/default theme). */
|
|
950
|
+
theme?: UX4GTheme;
|
|
951
|
+
/** Forwarded to the outer container for testing / styling. */
|
|
952
|
+
testID?: string;
|
|
953
|
+
/** Optional style override for the outer container. */
|
|
954
|
+
style?: StyleProp<ViewStyle>;
|
|
955
|
+
}
|
|
956
|
+
/**
|
|
957
|
+
* UX4G Comment — a single comment / discussion entry: avatar (or initials
|
|
958
|
+
* monogram), author + timestamp, body, an optional actions row and optional
|
|
959
|
+
* nested replies passed as children.
|
|
960
|
+
*/
|
|
961
|
+
declare function Comment({ author, avatar, timestamp, body, actions, children, highlight, theme: themeProp, testID, style, }: CommentProps): React.JSX.Element;
|
|
962
|
+
|
|
963
|
+
type AlertVariant = "info" | "success" | "warning" | "danger";
|
|
964
|
+
interface AlertProps {
|
|
965
|
+
/** Severity colourway. @default "info" */
|
|
966
|
+
variant?: AlertVariant;
|
|
967
|
+
/** Bold heading shown above the body. */
|
|
968
|
+
title?: React.ReactNode;
|
|
969
|
+
/** Override the default glyph for the variant. */
|
|
970
|
+
icon?: AlertVariant;
|
|
971
|
+
/** Show a dismiss (×) button and handle its press. */
|
|
972
|
+
onClose?: () => void;
|
|
973
|
+
children?: React.ReactNode;
|
|
974
|
+
/** Optional theme override (else the active provider/default theme). */
|
|
975
|
+
theme?: UX4GTheme;
|
|
976
|
+
/** Container style override. */
|
|
977
|
+
style?: StyleProp<ViewStyle>;
|
|
978
|
+
}
|
|
979
|
+
/** UX4G Alert — inline status message (info, success, warning, danger). */
|
|
980
|
+
declare function Alert({ children, title, variant, onClose, icon, theme: themeProp, style, }: AlertProps): React.JSX.Element;
|
|
981
|
+
|
|
982
|
+
interface ProgressProps {
|
|
983
|
+
/** 0–100. Omit for an indeterminate bar. */
|
|
984
|
+
value?: number;
|
|
985
|
+
variant?: "primary" | "success" | "danger" | "warning";
|
|
986
|
+
/** @default "md" */
|
|
987
|
+
size?: "sm" | "md";
|
|
988
|
+
/** Show the % label. @default false */
|
|
989
|
+
showValue?: boolean;
|
|
990
|
+
/** Render a circular ring instead of a bar. @default false */
|
|
991
|
+
circular?: boolean;
|
|
992
|
+
/** Optional theme override (else the active provider/default theme). */
|
|
993
|
+
theme?: UX4GTheme;
|
|
994
|
+
/** Test handle. The fill/track/label derive `${testID}-fill` etc. */
|
|
995
|
+
testID?: string;
|
|
996
|
+
/** Override the computed accessibility label. */
|
|
997
|
+
accessibilityLabel?: string;
|
|
998
|
+
style?: StyleProp<ViewStyle>;
|
|
999
|
+
}
|
|
1000
|
+
/** UX4G Progress — linear bar or circular ring. */
|
|
1001
|
+
declare function Progress({ value, variant, size, showValue, circular, theme: themeProp, testID, accessibilityLabel, style, }: ProgressProps): React.JSX.Element;
|
|
1002
|
+
|
|
1003
|
+
interface SpinnerProps {
|
|
1004
|
+
/** Pixel diameter. @default 24 */
|
|
1005
|
+
size?: number;
|
|
1006
|
+
/** Arc (stroke) colour. Defaults to the theme primary colour. */
|
|
1007
|
+
color?: string;
|
|
1008
|
+
/** Accessible name announced while loading. @default "Loading" */
|
|
1009
|
+
label?: string;
|
|
1010
|
+
/** Optional theme override (else the active provider/default theme). */
|
|
1011
|
+
theme?: UX4GTheme;
|
|
1012
|
+
style?: StyleProp<ViewStyle>;
|
|
1013
|
+
}
|
|
1014
|
+
/**
|
|
1015
|
+
* UX4G Spinner — indeterminate loading indicator.
|
|
1016
|
+
*
|
|
1017
|
+
* Mirrors the web spinner's geometry: a full neutral track circle with a
|
|
1018
|
+
* coloured 90° arc on top. The web spins the SVG via a CSS keyframe; in RN
|
|
1019
|
+
* that is a host driver concern (the platform paints the rotation), so the
|
|
1020
|
+
* component renders the canonical resting frame and exposes the busy state to
|
|
1021
|
+
* assistive tech. Keeping it static avoids a perpetual timer loop in tests and
|
|
1022
|
+
* keeps the render deterministic.
|
|
1023
|
+
*/
|
|
1024
|
+
declare function Spinner({ size, color, label, theme: themeProp, style, }: SpinnerProps): React.JSX.Element;
|
|
1025
|
+
|
|
1026
|
+
interface EmptyStateProps {
|
|
1027
|
+
/** An illustration or inline-SVG icon node (e.g. a react-native-svg element). */
|
|
1028
|
+
icon?: React.ReactNode;
|
|
1029
|
+
title: React.ReactNode;
|
|
1030
|
+
description?: React.ReactNode;
|
|
1031
|
+
/** Primary action (e.g. a Button). */
|
|
1032
|
+
action?: React.ReactNode;
|
|
1033
|
+
/** Optional theme override (else the active provider/default theme). */
|
|
1034
|
+
theme?: UX4GTheme;
|
|
1035
|
+
/** Test handle for the outer container. */
|
|
1036
|
+
testID?: string;
|
|
1037
|
+
}
|
|
1038
|
+
/** UX4G EmptyState — friendly placeholder for empty lists, search and dashboards. */
|
|
1039
|
+
declare function EmptyState({ icon, title, description, action, theme: themeProp, testID, }: EmptyStateProps): React.JSX.Element;
|
|
1040
|
+
|
|
1041
|
+
interface FeedbackRating {
|
|
1042
|
+
value: number;
|
|
1043
|
+
label: string;
|
|
1044
|
+
}
|
|
1045
|
+
interface FeedbackWidgetProps {
|
|
1046
|
+
/** Corner for the floating launcher. @default "bottom-right" */
|
|
1047
|
+
position?: "bottom-right" | "bottom-left";
|
|
1048
|
+
/** Launcher label. @default "Feedback" */
|
|
1049
|
+
triggerLabel?: string;
|
|
1050
|
+
title?: string;
|
|
1051
|
+
prompt?: string;
|
|
1052
|
+
/** Rating scale (1–5 faces by default). */
|
|
1053
|
+
ratings?: FeedbackRating[];
|
|
1054
|
+
/** Optional category chips. */
|
|
1055
|
+
categories?: string[];
|
|
1056
|
+
placeholder?: string;
|
|
1057
|
+
onSubmit?: (data: {
|
|
1058
|
+
rating: number | null;
|
|
1059
|
+
category?: string;
|
|
1060
|
+
message: string;
|
|
1061
|
+
}) => void;
|
|
1062
|
+
/** Render in flow instead of fixed to a corner (for embedding / demos). */
|
|
1063
|
+
inline?: boolean;
|
|
1064
|
+
defaultOpen?: boolean;
|
|
1065
|
+
/** Optional theme override (else the active provider/default theme). */
|
|
1066
|
+
theme?: UX4GTheme;
|
|
1067
|
+
}
|
|
1068
|
+
/**
|
|
1069
|
+
* UX4G FeedbackWidget — a corner launcher that opens a short feedback form: a
|
|
1070
|
+
* face rating, optional category chips, a comment and submit, with a thank-you
|
|
1071
|
+
* confirmation. Faces are inline SVG (no emoji), per UX4G iconography. Set
|
|
1072
|
+
* `inline` to embed it in flow instead of fixing to a corner.
|
|
1073
|
+
*/
|
|
1074
|
+
declare function FeedbackWidget({ position, triggerLabel, title, prompt, ratings, categories, placeholder, onSubmit, inline, defaultOpen, theme: themeProp, }: FeedbackWidgetProps): React.JSX.Element;
|
|
1075
|
+
|
|
1076
|
+
interface ModalProps {
|
|
1077
|
+
open: boolean;
|
|
1078
|
+
onClose?: () => void;
|
|
1079
|
+
title?: React.ReactNode;
|
|
1080
|
+
description?: React.ReactNode;
|
|
1081
|
+
/** Footer actions row (right-aligned), e.g. Buttons. */
|
|
1082
|
+
footer?: React.ReactNode;
|
|
1083
|
+
/** @default "md" */
|
|
1084
|
+
size?: "sm" | "md" | "lg";
|
|
1085
|
+
/** Hide the × button. @default false */
|
|
1086
|
+
hideClose?: boolean;
|
|
1087
|
+
children?: React.ReactNode;
|
|
1088
|
+
theme?: UX4GTheme;
|
|
1089
|
+
}
|
|
1090
|
+
declare function Modal({ open, onClose, title, description, footer, size, hideClose, children, theme: themeProp, }: ModalProps): React.JSX.Element | null;
|
|
1091
|
+
|
|
1092
|
+
type TooltipPlacement = "top" | "bottom" | "left" | "right";
|
|
1093
|
+
interface TooltipProps {
|
|
1094
|
+
/** Tooltip text. */
|
|
1095
|
+
label: React.ReactNode;
|
|
1096
|
+
/** @default "top" */
|
|
1097
|
+
placement?: TooltipPlacement;
|
|
1098
|
+
/** A single interactive element to wrap. */
|
|
1099
|
+
children: React.ReactElement;
|
|
1100
|
+
/** Optional theme override (else the active provider/default theme). */
|
|
1101
|
+
theme?: UX4GTheme;
|
|
1102
|
+
}
|
|
1103
|
+
/**
|
|
1104
|
+
* UX4G Tooltip — a small dark label clarifying an icon button or truncated
|
|
1105
|
+
* text. The web shows it on hover/focus; on touch there is no hover, so the
|
|
1106
|
+
* bubble toggles on press / long-press of the wrapped trigger.
|
|
1107
|
+
*/
|
|
1108
|
+
declare function Tooltip({ label, placement, children, theme: themeProp, }: TooltipProps): React.JSX.Element;
|
|
1109
|
+
|
|
1110
|
+
interface MenuItem {
|
|
1111
|
+
label: React.ReactNode;
|
|
1112
|
+
/** Optional leading inline icon node (e.g. a react-native-svg element). */
|
|
1113
|
+
icon?: React.ReactNode;
|
|
1114
|
+
onClick?: () => void;
|
|
1115
|
+
danger?: boolean;
|
|
1116
|
+
disabled?: boolean;
|
|
1117
|
+
}
|
|
1118
|
+
interface MenuProps {
|
|
1119
|
+
/** The element that opens the menu (a Button / IconButton / Pressable). */
|
|
1120
|
+
trigger: React.ReactElement;
|
|
1121
|
+
items: MenuItem[];
|
|
1122
|
+
/** @default "left" */
|
|
1123
|
+
align?: "left" | "right";
|
|
1124
|
+
/** Optional theme override (else the active provider/default theme). */
|
|
1125
|
+
theme?: UX4GTheme;
|
|
1126
|
+
/** Test id; the scrim is exposed as `${testID}-scrim`. */
|
|
1127
|
+
testID?: string;
|
|
1128
|
+
}
|
|
1129
|
+
/** UX4G Menu — a dropdown of actions anchored to a trigger. */
|
|
1130
|
+
declare function Menu({ trigger, items, align, theme: themeProp, testID, }: MenuProps): React.JSX.Element;
|
|
1131
|
+
|
|
1132
|
+
type ToastVariant = "info" | "success" | "warning" | "danger";
|
|
1133
|
+
interface ToastProps {
|
|
1134
|
+
/** Colourway driving the accent bar and status icon. @default "info" */
|
|
1135
|
+
variant?: ToastVariant;
|
|
1136
|
+
/** Bold heading line. */
|
|
1137
|
+
title?: React.ReactNode;
|
|
1138
|
+
/** Fires when the dismiss button is pressed, or after `duration` elapses. */
|
|
1139
|
+
onClose?: () => void;
|
|
1140
|
+
/** Auto-dismiss after this many milliseconds (calls `onClose`). Omit to keep it sticky. */
|
|
1141
|
+
duration?: number;
|
|
1142
|
+
/** Supporting body text or nodes. */
|
|
1143
|
+
children?: React.ReactNode;
|
|
1144
|
+
/** Optional theme override (else the active provider/default theme). */
|
|
1145
|
+
theme?: UX4GTheme;
|
|
1146
|
+
/** Forwarded to the outer card for testing/targeting. */
|
|
1147
|
+
testID?: string;
|
|
1148
|
+
style?: StyleProp<ViewStyle>;
|
|
1149
|
+
}
|
|
1150
|
+
declare function Toast({ variant, title, onClose, duration, children, theme: themeProp, testID, style, }: ToastProps): React.JSX.Element;
|
|
1151
|
+
|
|
1152
|
+
interface PopoverProps {
|
|
1153
|
+
/** Element that toggles the popover (rendered inline). */
|
|
1154
|
+
trigger: React.ReactNode;
|
|
1155
|
+
/** Optional bold heading inside the panel. */
|
|
1156
|
+
title?: React.ReactNode;
|
|
1157
|
+
/** Panel body. */
|
|
1158
|
+
children: React.ReactNode;
|
|
1159
|
+
/** Side of the trigger the panel opens on. @default "bottom" */
|
|
1160
|
+
placement?: "top" | "bottom" | "left" | "right";
|
|
1161
|
+
/** Panel width in px. @default 264 */
|
|
1162
|
+
width?: number;
|
|
1163
|
+
/** Start open. @default false */
|
|
1164
|
+
defaultOpen?: boolean;
|
|
1165
|
+
/** Optional theme override (else the active provider/default theme). */
|
|
1166
|
+
theme?: UX4GTheme;
|
|
1167
|
+
}
|
|
1168
|
+
/**
|
|
1169
|
+
* UX4G Popover — click-triggered floating panel with an arrow. Richer than a
|
|
1170
|
+
* Tooltip: holds a title, body content and actions. Toggles open on press of
|
|
1171
|
+
* the trigger and again to close.
|
|
1172
|
+
*/
|
|
1173
|
+
declare function Popover({ trigger, title, children, placement, width, defaultOpen, theme: themeProp, }: PopoverProps): React.JSX.Element;
|
|
1174
|
+
|
|
1175
|
+
/**
|
|
1176
|
+
* A value that a cell can hold by default (when no `render` is supplied).
|
|
1177
|
+
* Strings and numbers are wrapped in <Text>; a ReactNode is rendered as-is.
|
|
1178
|
+
*/
|
|
1179
|
+
type TableCellValue = React.ReactNode;
|
|
1180
|
+
/** Default row shape: an indexable record of renderable cell values. */
|
|
1181
|
+
type TableRow = Record<string, TableCellValue>;
|
|
1182
|
+
interface TableColumn<Row extends TableRow = TableRow> {
|
|
1183
|
+
/** Field key on the row; also used as a React key for the column. */
|
|
1184
|
+
key: string;
|
|
1185
|
+
/** Column heading. */
|
|
1186
|
+
header: React.ReactNode;
|
|
1187
|
+
/** Custom cell renderer. Defaults to row[key]. */
|
|
1188
|
+
render?: (row: Row) => React.ReactNode;
|
|
1189
|
+
/** Horizontal text alignment for the header and its cells. @default "left" */
|
|
1190
|
+
align?: "left" | "right" | "center";
|
|
1191
|
+
/** Fixed column width in px (number) or a flex-basis string. */
|
|
1192
|
+
width?: number | string;
|
|
1193
|
+
}
|
|
1194
|
+
interface TableProps<Row extends TableRow = TableRow> {
|
|
1195
|
+
columns: TableColumn<Row>[];
|
|
1196
|
+
rows: Row[];
|
|
1197
|
+
/** Zebra striping. @default false */
|
|
1198
|
+
striped?: boolean;
|
|
1199
|
+
/**
|
|
1200
|
+
* Web highlights rows on hover; React Native has no hover, so this is
|
|
1201
|
+
* accepted for API parity but has no visual effect. @default true
|
|
1202
|
+
*/
|
|
1203
|
+
hover?: boolean;
|
|
1204
|
+
/** Render when rows is empty. Defaults to a "No records" message. */
|
|
1205
|
+
empty?: React.ReactNode;
|
|
1206
|
+
/** Optional theme override (else the active provider/default theme). */
|
|
1207
|
+
theme?: UX4GTheme;
|
|
1208
|
+
/** Forwarded to the outer container for testing / styling. */
|
|
1209
|
+
testID?: string;
|
|
1210
|
+
/** Optional style override for the outer container. */
|
|
1211
|
+
style?: StyleProp<ViewStyle>;
|
|
1212
|
+
}
|
|
1213
|
+
/**
|
|
1214
|
+
* UX4G Table — a simple, scannable data table built from `columns` + `rows`.
|
|
1215
|
+
*
|
|
1216
|
+
* React Native has no `<table>`: the header is a row of Views and each record
|
|
1217
|
+
* is a row of Views laid out with `flexDirection: "row"`. Columns are sized via
|
|
1218
|
+
* `flex` (or a fixed `width`). The whole table is wrapped in a horizontal
|
|
1219
|
+
* ScrollView so wide tables can scroll sideways on narrow screens.
|
|
1220
|
+
*/
|
|
1221
|
+
declare function Table<Row extends TableRow = TableRow>({ columns, rows, striped, hover: _hover, empty, theme: themeProp, testID, style, }: TableProps<Row>): React.JSX.Element;
|
|
1222
|
+
|
|
1223
|
+
interface AccordionItem {
|
|
1224
|
+
/** Stable id; also used for default open state. */
|
|
1225
|
+
value: string;
|
|
1226
|
+
title: React.ReactNode;
|
|
1227
|
+
content: React.ReactNode;
|
|
1228
|
+
}
|
|
1229
|
+
interface AccordionProps {
|
|
1230
|
+
items: AccordionItem[];
|
|
1231
|
+
/** Allow multiple panels open at once. @default false */
|
|
1232
|
+
multiple?: boolean;
|
|
1233
|
+
/** Values open by default. */
|
|
1234
|
+
defaultOpen?: string[];
|
|
1235
|
+
/** Optional theme override (else the active provider/default theme). */
|
|
1236
|
+
theme?: UX4GTheme;
|
|
1237
|
+
/** Style for the outer accordion container. */
|
|
1238
|
+
style?: StyleProp<ViewStyle>;
|
|
1239
|
+
}
|
|
1240
|
+
/** UX4G Accordion — collapsible panels for FAQs and grouped content. */
|
|
1241
|
+
declare function Accordion({ items, multiple, defaultOpen, theme: themeProp, style, }: AccordionProps): React.JSX.Element;
|
|
1242
|
+
|
|
1243
|
+
interface PaginationProps {
|
|
1244
|
+
/** Current page, 1-indexed. */
|
|
1245
|
+
page: number;
|
|
1246
|
+
/** Total number of pages. */
|
|
1247
|
+
pageCount: number;
|
|
1248
|
+
/** Fired with the next 1-indexed page when the user navigates. */
|
|
1249
|
+
onChange: (page: number) => void;
|
|
1250
|
+
/** Sibling pages either side of current. @default 1 */
|
|
1251
|
+
siblings?: number;
|
|
1252
|
+
/** Optional theme override (else the active provider/default theme). */
|
|
1253
|
+
theme?: UX4GTheme;
|
|
1254
|
+
/** Style for the outer navigation container. */
|
|
1255
|
+
style?: StyleProp<ViewStyle>;
|
|
1256
|
+
}
|
|
1257
|
+
/** UX4G Pagination — page navigation for tables and lists. 1-indexed. */
|
|
1258
|
+
declare function Pagination({ page, pageCount, onChange, siblings, theme: themeProp, style, }: PaginationProps): React.JSX.Element;
|
|
1259
|
+
|
|
1260
|
+
interface ListItemData {
|
|
1261
|
+
/** Leading slot — icon, avatar or monogram. */
|
|
1262
|
+
leading?: React.ReactNode;
|
|
1263
|
+
/** Small uppercase label above the title. */
|
|
1264
|
+
overline?: React.ReactNode;
|
|
1265
|
+
title: React.ReactNode;
|
|
1266
|
+
/** Supporting text under the title. */
|
|
1267
|
+
description?: React.ReactNode;
|
|
1268
|
+
/** Trailing slot — meta text, a control, or a chevron. */
|
|
1269
|
+
trailing?: React.ReactNode;
|
|
1270
|
+
/**
|
|
1271
|
+
* Marks the row as a link target. In React Native there is no navigation
|
|
1272
|
+
* here; like `onClick` it simply makes the row pressable.
|
|
1273
|
+
*/
|
|
1274
|
+
href?: string;
|
|
1275
|
+
/** Fired when the row is pressed (rows are pressable when set, or `interactive`). */
|
|
1276
|
+
onClick?: (event: GestureResponderEvent) => void;
|
|
1277
|
+
/** Current / selected row — violet-subtle fill + left accent. */
|
|
1278
|
+
active?: boolean;
|
|
1279
|
+
/** Dim and disable the row. */
|
|
1280
|
+
disabled?: boolean;
|
|
1281
|
+
}
|
|
1282
|
+
interface ListProps {
|
|
1283
|
+
items: ListItemData[];
|
|
1284
|
+
/** Hairline dividers between rows. @default true */
|
|
1285
|
+
dividers?: boolean;
|
|
1286
|
+
/** Press affordance on rows. @default false */
|
|
1287
|
+
interactive?: boolean;
|
|
1288
|
+
/** Wrap in a bordered, rounded surface. @default true */
|
|
1289
|
+
bordered?: boolean;
|
|
1290
|
+
/** Show a chevron on every row (overridden by an item's own `trailing`). */
|
|
1291
|
+
chevron?: boolean;
|
|
1292
|
+
/** Optional theme override (else the active provider/default theme). */
|
|
1293
|
+
theme?: UX4GTheme;
|
|
1294
|
+
/** Forwarded to the outer container for testing / styling. */
|
|
1295
|
+
testID?: string;
|
|
1296
|
+
/** Optional style override for the outer container. */
|
|
1297
|
+
style?: StyleProp<ViewStyle>;
|
|
1298
|
+
}
|
|
1299
|
+
/**
|
|
1300
|
+
* UX4G List — a vertical list of rows, each with optional leading/trailing
|
|
1301
|
+
* slots and one to three lines of text (overline / title / description).
|
|
1302
|
+
* Supports dividers, press interactivity, an active row and a trailing chevron.
|
|
1303
|
+
*/
|
|
1304
|
+
declare function List({ items, dividers, interactive, bordered, chevron, theme: themeProp, testID, style, }: ListProps): React.JSX.Element;
|
|
1305
|
+
|
|
1306
|
+
type ChartType = "bar" | "line" | "pie" | "doughnut" | "radar" | "polarArea";
|
|
1307
|
+
/**
|
|
1308
|
+
* A single Chart.js-style dataset. Only the fields the UX4G wrapper reads (or
|
|
1309
|
+
* forwards through) are typed; colours are auto-filled from the palette when
|
|
1310
|
+
* omitted, matching the web `Chart` behaviour.
|
|
1311
|
+
*/
|
|
1312
|
+
interface ChartDataset {
|
|
1313
|
+
/** Legend / series name. */
|
|
1314
|
+
label?: string;
|
|
1315
|
+
/** The values, one per category label. */
|
|
1316
|
+
data: number[];
|
|
1317
|
+
/** Fill colour. A string applies to the whole series; an array colours each
|
|
1318
|
+
* slice (pie/doughnut/polarArea). Auto-filled from the palette when omitted. */
|
|
1319
|
+
backgroundColor?: string | string[];
|
|
1320
|
+
/** Stroke / line colour. Auto-filled from the palette when omitted. */
|
|
1321
|
+
borderColor?: string;
|
|
1322
|
+
/** Stroke width in px. */
|
|
1323
|
+
borderWidth?: number;
|
|
1324
|
+
/** Fill the area under a line. @default false */
|
|
1325
|
+
fill?: boolean;
|
|
1326
|
+
}
|
|
1327
|
+
/** Chart.js-style `data` object. */
|
|
1328
|
+
interface ChartData {
|
|
1329
|
+
/** Category labels (x axis / slice names). */
|
|
1330
|
+
labels: string[];
|
|
1331
|
+
datasets: ChartDataset[];
|
|
1332
|
+
}
|
|
1333
|
+
/** A small, typed subset of Chart.js `options` the RN wrapper honours. */
|
|
1334
|
+
interface ChartOptions {
|
|
1335
|
+
/** Show the legend. @default true */
|
|
1336
|
+
showLegend?: boolean;
|
|
1337
|
+
}
|
|
1338
|
+
interface ChartProps {
|
|
1339
|
+
/** Chart type. */
|
|
1340
|
+
type: ChartType;
|
|
1341
|
+
/** Chart data ({ labels, datasets }). Dataset colours are auto-filled from
|
|
1342
|
+
* the UX4G palette when omitted. */
|
|
1343
|
+
data: ChartData;
|
|
1344
|
+
/** Display options, merged over UX4G defaults. */
|
|
1345
|
+
options?: ChartOptions;
|
|
1346
|
+
/** Pixel height of the chart area. @default 300 */
|
|
1347
|
+
height?: number;
|
|
1348
|
+
/** Override the categorical colour sequence. */
|
|
1349
|
+
palette?: string[];
|
|
1350
|
+
/** Optional theme override (else the active provider/default theme). */
|
|
1351
|
+
theme?: UX4GTheme;
|
|
1352
|
+
/** Test handle. Bars derive `${testID}-bar-<dataset>-<index>`. */
|
|
1353
|
+
testID?: string;
|
|
1354
|
+
/** Override the computed accessibility label. */
|
|
1355
|
+
accessibilityLabel?: string;
|
|
1356
|
+
/** Style override for the outer container. */
|
|
1357
|
+
style?: StyleProp<ViewStyle>;
|
|
1358
|
+
}
|
|
1359
|
+
/** UX4G categorical palette — brand violet first, then info/success/warning/danger. */
|
|
1360
|
+
declare const UX4G_CHART_PALETTE: string[];
|
|
1361
|
+
/**
|
|
1362
|
+
* UX4G Chart — a themed, native rendering of common Chart.js chart types.
|
|
1363
|
+
* Bars are Views; line/area/radar and circular charts are drawn with
|
|
1364
|
+
* react-native-svg. Dataset colours default to the UX4G palette. No Chart.js.
|
|
1365
|
+
*/
|
|
1366
|
+
declare function Chart({ type, data, options, height, palette, theme: themeProp, testID, accessibilityLabel, style, }: ChartProps): React.JSX.Element;
|
|
1367
|
+
|
|
1368
|
+
interface IndiaStateGeo {
|
|
1369
|
+
/** ISO 3166-2:IN style code. */
|
|
1370
|
+
code: string;
|
|
1371
|
+
name: string;
|
|
1372
|
+
/** "state" | "ut" */
|
|
1373
|
+
type: "state" | "ut";
|
|
1374
|
+
/** Label / centroid anchor in viewBox units. */
|
|
1375
|
+
cx: number;
|
|
1376
|
+
cy: number;
|
|
1377
|
+
/** SVG path data in the shared 659.598 x 750.626 viewBox. */
|
|
1378
|
+
d: string;
|
|
1379
|
+
}
|
|
1380
|
+
declare const INDIA_VIEWBOX = "0 0 659.598 750.626";
|
|
1381
|
+
declare const INDIA_STATES: IndiaStateGeo[];
|
|
1382
|
+
|
|
1383
|
+
interface IndiaMapProps {
|
|
1384
|
+
/** Metric per region, keyed by state code (e.g. { MH: 124, KA: 98 }). */
|
|
1385
|
+
values?: Record<string, number>;
|
|
1386
|
+
/** Sequential colour ramp, light -> dark. */
|
|
1387
|
+
colorScale?: string[];
|
|
1388
|
+
/** Value domain [min, max]; defaults to the extent of `values`. */
|
|
1389
|
+
domain?: [number, number];
|
|
1390
|
+
/** Fill for regions with no value. */
|
|
1391
|
+
emptyColor?: string;
|
|
1392
|
+
/** Currently selected region code (controlled). */
|
|
1393
|
+
selected?: string;
|
|
1394
|
+
/** Fired on tap / select. */
|
|
1395
|
+
onSelect?: (code: string, region: IndiaStateGeo) => void;
|
|
1396
|
+
/** Tooltip / legend value formatter. */
|
|
1397
|
+
formatValue?: (v: number) => string;
|
|
1398
|
+
/** Legend heading. @default "Value" */
|
|
1399
|
+
legendLabel?: string;
|
|
1400
|
+
/** Show the gradient legend. @default true */
|
|
1401
|
+
showLegend?: boolean;
|
|
1402
|
+
/** Pixel height of the map area. @default 560 */
|
|
1403
|
+
height?: number;
|
|
1404
|
+
/** Map surface treatment. @default "light" */
|
|
1405
|
+
theme?: "light" | "dark";
|
|
1406
|
+
/**
|
|
1407
|
+
* Optional UX4G design-system theme override (else the active provider /
|
|
1408
|
+
* default theme). Named `uxTheme` because the contract's `theme` prop is the
|
|
1409
|
+
* "light" | "dark" map surface, not the design-system theme object.
|
|
1410
|
+
*/
|
|
1411
|
+
uxTheme?: UX4GTheme;
|
|
1412
|
+
/** Test handle for the outer container. */
|
|
1413
|
+
testID?: string;
|
|
1414
|
+
}
|
|
1415
|
+
/**
|
|
1416
|
+
* UX4G India Map — data-driven choropleth. Colour each state / union territory
|
|
1417
|
+
* by a metric, with tap selection and a gradient legend. Geometry covers 29
|
|
1418
|
+
* states + 7 union territories. Use for region-based data / heatmaps, not as a
|
|
1419
|
+
* substitute for a simple dropdown.
|
|
1420
|
+
*/
|
|
1421
|
+
declare function IndiaMap({ values, colorScale, domain, emptyColor, selected, onSelect, formatValue, legendLabel, showLegend, height, theme, uxTheme, testID, }: IndiaMapProps): React.JSX.Element;
|
|
1422
|
+
|
|
1423
|
+
interface TabItem {
|
|
1424
|
+
value: string;
|
|
1425
|
+
label: React.ReactNode;
|
|
1426
|
+
/** Optional leading icon node (e.g. a react-native-svg element). */
|
|
1427
|
+
icon?: React.ReactNode;
|
|
1428
|
+
/** Count/badge shown after the label. */
|
|
1429
|
+
badge?: React.ReactNode;
|
|
1430
|
+
disabled?: boolean;
|
|
1431
|
+
}
|
|
1432
|
+
/** UX4G Tabs — underline tab bar. Controlled (`value`) or uncontrolled (`defaultValue`). */
|
|
1433
|
+
interface TabsProps {
|
|
1434
|
+
/** Items as strings or {value,label,icon,badge,disabled}. */
|
|
1435
|
+
tabs: (string | TabItem)[];
|
|
1436
|
+
value?: string;
|
|
1437
|
+
defaultValue?: string;
|
|
1438
|
+
onChange?: (value: string) => void;
|
|
1439
|
+
/** Stretch tabs to share the row evenly. @default false */
|
|
1440
|
+
fullWidth?: boolean;
|
|
1441
|
+
/** Optional theme override (else the active provider/default theme). */
|
|
1442
|
+
theme?: UX4GTheme;
|
|
1443
|
+
/** Style for the outer tablist container. */
|
|
1444
|
+
style?: StyleProp<ViewStyle>;
|
|
1445
|
+
}
|
|
1446
|
+
declare function Tabs({ tabs, value, defaultValue, onChange, fullWidth, theme: themeProp, style, }: TabsProps): React.JSX.Element;
|
|
1447
|
+
|
|
1448
|
+
/** A single crumb in the trail. Items with an `href` render as links; the last item is the current page. */
|
|
1449
|
+
interface CrumbItem {
|
|
1450
|
+
/** Visible label. May be a string or a rich node. */
|
|
1451
|
+
label: React.ReactNode;
|
|
1452
|
+
/** Destination. Present on link crumbs; omit on the current page. */
|
|
1453
|
+
href?: string;
|
|
1454
|
+
}
|
|
1455
|
+
interface BreadcrumbProps {
|
|
1456
|
+
/** The hierarchy trail. The last item is the current page (non-link). */
|
|
1457
|
+
items: CrumbItem[];
|
|
1458
|
+
/**
|
|
1459
|
+
* Called when a link crumb is pressed (RN has no anchor navigation).
|
|
1460
|
+
* The current/last crumb never fires this.
|
|
1461
|
+
*/
|
|
1462
|
+
onPressItem?: (item: CrumbItem, index: number) => void;
|
|
1463
|
+
/** Optional theme override (else the active provider/default theme). */
|
|
1464
|
+
theme?: UX4GTheme;
|
|
1465
|
+
/** Style for the outer navigation container. */
|
|
1466
|
+
style?: StyleProp<ViewStyle>;
|
|
1467
|
+
}
|
|
1468
|
+
/** UX4G Breadcrumb — page hierarchy trail. The last item is the current page. */
|
|
1469
|
+
declare function Breadcrumb({ items, onPressItem, theme: themeProp, style, }: BreadcrumbProps): React.JSX.Element;
|
|
1470
|
+
|
|
1471
|
+
/** A single step in the flow. `label` is required; `description` is an optional sub-line. */
|
|
1472
|
+
interface StepperStep {
|
|
1473
|
+
/** Visible label. May be a string or a rich node. */
|
|
1474
|
+
label: React.ReactNode;
|
|
1475
|
+
/** Optional sub-line shown beneath the label. */
|
|
1476
|
+
description?: React.ReactNode;
|
|
1477
|
+
}
|
|
1478
|
+
interface StepperProps {
|
|
1479
|
+
/** The ordered steps. */
|
|
1480
|
+
steps: StepperStep[];
|
|
1481
|
+
/** 0-indexed current step. */
|
|
1482
|
+
current: number;
|
|
1483
|
+
/** @default "horizontal" */
|
|
1484
|
+
orientation?: "horizontal" | "vertical";
|
|
1485
|
+
/** Optional theme override (else the active provider/default theme). */
|
|
1486
|
+
theme?: UX4GTheme;
|
|
1487
|
+
/** Style for the outer container. */
|
|
1488
|
+
style?: StyleProp<ViewStyle>;
|
|
1489
|
+
}
|
|
1490
|
+
/** UX4G Stepper — progress through a multi-step flow (e.g. grievance, KYC). */
|
|
1491
|
+
declare function Stepper({ steps, current, orientation, theme: themeProp, style, }: StepperProps): React.JSX.Element;
|
|
1492
|
+
|
|
1493
|
+
/** A single primary-navigation link. */
|
|
1494
|
+
interface NavLink {
|
|
1495
|
+
/** Visible label. May be a string or a rich node. */
|
|
1496
|
+
label: React.ReactNode;
|
|
1497
|
+
/** Destination. Kept for parity with the web contract; RN has no anchor
|
|
1498
|
+
* navigation, so use `onPress` to handle taps. */
|
|
1499
|
+
href?: string;
|
|
1500
|
+
/** Marks the current page — violet-subtle fill + `selected` a11y state. */
|
|
1501
|
+
active?: boolean;
|
|
1502
|
+
/** Called when the link is pressed (RN replaces the web `onClick`). */
|
|
1503
|
+
onPress?: () => void;
|
|
1504
|
+
}
|
|
1505
|
+
interface NavbarProps {
|
|
1506
|
+
/** Site / department title shown next to the mark. */
|
|
1507
|
+
title: React.ReactNode;
|
|
1508
|
+
/** Optional second line under the title. */
|
|
1509
|
+
subtitle?: React.ReactNode;
|
|
1510
|
+
/** Brand mark. Defaults to the UX4G wordmark. */
|
|
1511
|
+
logo?: React.ReactNode;
|
|
1512
|
+
/** Primary navigation links. */
|
|
1513
|
+
links?: NavLink[];
|
|
1514
|
+
/** Right-aligned slot — buttons, login, language, etc. */
|
|
1515
|
+
actions?: React.ReactNode;
|
|
1516
|
+
/** Government utility strip above the bar. `true` renders the default
|
|
1517
|
+
* "Government of India" strip; pass a node to customise. */
|
|
1518
|
+
topStrip?: React.ReactNode | boolean;
|
|
1519
|
+
/** Stick to the top of the viewport on scroll. @default false */
|
|
1520
|
+
sticky?: boolean;
|
|
1521
|
+
/** Optional theme override (else the active provider/default theme). */
|
|
1522
|
+
theme?: UX4GTheme;
|
|
1523
|
+
/** Style for the outer header container. */
|
|
1524
|
+
style?: StyleProp<ViewStyle>;
|
|
1525
|
+
}
|
|
1526
|
+
/** UX4G Navbar — government website header: optional gov utility strip,
|
|
1527
|
+
* brand lockup, primary nav and an actions slot. */
|
|
1528
|
+
declare function Navbar({ title, subtitle, logo, links, actions, topStrip, sticky, theme: themeProp, style, }: NavbarProps): React.JSX.Element;
|
|
1529
|
+
|
|
1530
|
+
/** A footer link. Renders as a pressable; `href` is carried for the caller. */
|
|
1531
|
+
interface FooterLink {
|
|
1532
|
+
/** Visible label. May be a string or a rich node. */
|
|
1533
|
+
label: React.ReactNode;
|
|
1534
|
+
/** Destination. Carried through to `onPressLink` (RN has no anchor nav). */
|
|
1535
|
+
href?: string;
|
|
1536
|
+
}
|
|
1537
|
+
/** A column of links with a heading. */
|
|
1538
|
+
interface FooterColumn {
|
|
1539
|
+
/** Column heading. */
|
|
1540
|
+
title: React.ReactNode;
|
|
1541
|
+
/** Links under this heading. */
|
|
1542
|
+
links: FooterLink[];
|
|
1543
|
+
}
|
|
1544
|
+
/** A social / external icon link. */
|
|
1545
|
+
interface FooterSocial {
|
|
1546
|
+
/** Accessible label (required — these are icon-only controls). */
|
|
1547
|
+
label: string;
|
|
1548
|
+
/** Destination. Carried through to `onPressSocial`. */
|
|
1549
|
+
href?: string;
|
|
1550
|
+
/** Inline glyph node (e.g. a react-native-svg element). */
|
|
1551
|
+
icon: React.ReactNode;
|
|
1552
|
+
}
|
|
1553
|
+
interface FooterProps {
|
|
1554
|
+
/** Brand mark. Defaults to the UX4G wordmark. */
|
|
1555
|
+
logo?: React.ReactNode;
|
|
1556
|
+
/** Short line under the mark. */
|
|
1557
|
+
tagline?: React.ReactNode;
|
|
1558
|
+
/** Link columns. */
|
|
1559
|
+
columns?: FooterColumn[];
|
|
1560
|
+
/** Social / external icon links. */
|
|
1561
|
+
social?: FooterSocial[];
|
|
1562
|
+
/** Bottom-strip copyright text. */
|
|
1563
|
+
copyright?: React.ReactNode;
|
|
1564
|
+
/** Bottom-strip policy links (privacy, terms, accessibility…). */
|
|
1565
|
+
policyLinks?: FooterLink[];
|
|
1566
|
+
/** Called when a column or policy link is pressed (RN has no anchor nav). */
|
|
1567
|
+
onPressLink?: (link: FooterLink) => void;
|
|
1568
|
+
/** Called when a social icon link is pressed. */
|
|
1569
|
+
onPressSocial?: (social: FooterSocial) => void;
|
|
1570
|
+
/** Optional theme override (else the active provider/default theme). */
|
|
1571
|
+
theme?: UX4GTheme;
|
|
1572
|
+
/** Style for the outer footer container. */
|
|
1573
|
+
style?: StyleProp<ViewStyle>;
|
|
1574
|
+
}
|
|
1575
|
+
/**
|
|
1576
|
+
* UX4G Footer — government portal footer. Brand mark + tagline + social icons
|
|
1577
|
+
* on the left, link columns on the right, and a grounding dark bottom strip
|
|
1578
|
+
* carrying the copyright line and policy links.
|
|
1579
|
+
*/
|
|
1580
|
+
declare function Footer({ logo, tagline, columns, social, copyright, policyLinks, onPressLink, onPressSocial, theme: themeProp, style, }: FooterProps): React.JSX.Element;
|
|
1581
|
+
|
|
1582
|
+
interface CarouselProps {
|
|
1583
|
+
/** Each child is a slide (image, card, banner). */
|
|
1584
|
+
children: React.ReactNode;
|
|
1585
|
+
/** Pixel height of the viewport. @default 280 */
|
|
1586
|
+
height?: number;
|
|
1587
|
+
/** Auto-advance interval in ms (0 = off). @default 0 */
|
|
1588
|
+
interval?: number;
|
|
1589
|
+
/** Show prev/next arrows. @default true */
|
|
1590
|
+
arrows?: boolean;
|
|
1591
|
+
/** Show dot indicators. @default true */
|
|
1592
|
+
dots?: boolean;
|
|
1593
|
+
/** Optional theme override (else the active provider/default theme). */
|
|
1594
|
+
theme?: UX4GTheme;
|
|
1595
|
+
/** Container style override. */
|
|
1596
|
+
style?: StyleProp<ViewStyle>;
|
|
1597
|
+
}
|
|
1598
|
+
/** UX4G Carousel — swipeable slide deck for hero banners and galleries. */
|
|
1599
|
+
declare function Carousel({ children, height, interval, arrows, dots, theme: themeProp, style, }: CarouselProps): React.JSX.Element;
|
|
1600
|
+
|
|
1601
|
+
/**
|
|
1602
|
+
* The live reading adjustments tracked by the widget. Mirrors the web
|
|
1603
|
+
* reference: numeric levels for text/spacing/line/saturation, plus a set of
|
|
1604
|
+
* on/off reading aids. RN has no DOM/CSS to mutate, so the active settings are
|
|
1605
|
+
* exposed to the host app via `onSettingsChange` to apply however it chooses.
|
|
1606
|
+
*/
|
|
1607
|
+
interface AccessibilitySettings {
|
|
1608
|
+
/** Page zoom, 0.8 – 1.6. */
|
|
1609
|
+
fontScale: number;
|
|
1610
|
+
/** Letter-spacing level, 0 – 3. */
|
|
1611
|
+
spacing: number;
|
|
1612
|
+
/** Line-height level, 0 – 3. */
|
|
1613
|
+
line: number;
|
|
1614
|
+
dyslexia: boolean;
|
|
1615
|
+
/** Reading-mask mode. */
|
|
1616
|
+
adhd: boolean;
|
|
1617
|
+
/** Saturation level: 0 normal · 1 low · 2 high · 3 none (grayscale). */
|
|
1618
|
+
saturation: number;
|
|
1619
|
+
/** Dark mode (smart invert). */
|
|
1620
|
+
dark: boolean;
|
|
1621
|
+
/** Full colour inversion. */
|
|
1622
|
+
invert: boolean;
|
|
1623
|
+
/** Highlight links. */
|
|
1624
|
+
links: boolean;
|
|
1625
|
+
/** Text to speech. */
|
|
1626
|
+
tts: boolean;
|
|
1627
|
+
/** Big cursor. */
|
|
1628
|
+
cursor: boolean;
|
|
1629
|
+
/** Pause animation. */
|
|
1630
|
+
pause: boolean;
|
|
1631
|
+
hideImages: boolean;
|
|
1632
|
+
contrast: boolean;
|
|
1633
|
+
}
|
|
1634
|
+
interface AccessibilityWidgetProps {
|
|
1635
|
+
/** Corner to dock the launcher. @default "bottom-right" */
|
|
1636
|
+
position?: "bottom-right" | "bottom-left";
|
|
1637
|
+
/** Open the panel on mount (handy for demos / embedding). @default false */
|
|
1638
|
+
defaultOpen?: boolean;
|
|
1639
|
+
/**
|
|
1640
|
+
* Called whenever the adjustments change. The host app applies them however
|
|
1641
|
+
* it likes (RN has no DOM/CSS to mutate). Replaces the web's direct DOM +
|
|
1642
|
+
* localStorage side effects.
|
|
1643
|
+
*/
|
|
1644
|
+
onSettingsChange?: (settings: AccessibilitySettings) => void;
|
|
1645
|
+
/** Optional theme override (else the active provider/default theme). */
|
|
1646
|
+
theme?: UX4GTheme;
|
|
1647
|
+
}
|
|
1648
|
+
/**
|
|
1649
|
+
* UX4G AccessibilityWidget (React Native) — a floating "universal access"
|
|
1650
|
+
* launcher that opens a panel with a 3-column tile grid of live reading
|
|
1651
|
+
* adjustments: Bigger / Smaller Text, Text Spacing, Line Height, Dyslexia
|
|
1652
|
+
* Friendly, ADHD Mode, Saturation, Light-Dark, Invert Colors, Highlight Links,
|
|
1653
|
+
* Text to Speech, Cursor, Pause Animation, Hide Images and Contrast, plus Reset
|
|
1654
|
+
* all. Light-Dark and Invert Colors are mutually exclusive. The web version
|
|
1655
|
+
* mutates the DOM and localStorage directly; in RN there is no DOM, so the
|
|
1656
|
+
* active settings are surfaced through `onSettingsChange` for the host app to
|
|
1657
|
+
* apply.
|
|
1658
|
+
*/
|
|
1659
|
+
declare function AccessibilityWidget({ position, defaultOpen, onSettingsChange, theme: themeProp, }: AccessibilityWidgetProps): React.JSX.Element;
|
|
1660
|
+
|
|
1661
|
+
export { type AccessibilitySettings, AccessibilityWidget, type AccessibilityWidgetProps, Accordion, type AccordionItem, type AccordionProps, Alert, type AlertProps, type AlertVariant, Avatar, type AvatarProps, Badge, type BadgeProps, Breadcrumb, type BreadcrumbProps, Button, type ButtonProps, Card, type CardProps, Carousel, type CarouselProps, Chart, type ChartData, type ChartDataset, type ChartOptions, type ChartProps, type ChartType, Checkbox, type CheckboxProps, Chip, type ChipProps, ColorPicker, type ColorPickerProps, type ColorRamp, Comment, type CommentProps, type CrumbItem, DatePicker, type DatePickerProps, EmptyState, type EmptyStateProps, type FeedbackRating, FeedbackWidget, type FeedbackWidgetProps, FileUpload, type FileUploadProps, Footer, type FooterColumn, type FooterLink, type FooterProps, type FooterSocial, INDIA_STATES, INDIA_VIEWBOX, IconButton, type IconButtonProps, IndiaMap, type IndiaMapProps, type IndiaStateGeo, Input, type InputProps, List, type ListItemData, type ListProps, Menu, type MenuItem, type MenuProps, Modal, type ModalProps, type NavLink, Navbar, type NavbarProps, Pagination, type PaginationProps, Popover, type PopoverProps, Progress, type ProgressProps, Radio, type RadioProps, RangeSlider, type RangeSliderProps, Search, type SearchProps, Select, type SelectOption, type SelectProps, Spinner, type SpinnerProps, Stepper, type StepperProps, type StepperStep, Switch, type SwitchProps, type TabItem, Table, type TableCellValue, type TableColumn, type TableProps, type TableRow, Tabs, type TabsProps, Textarea, type TextareaProps, type ThemeOverrides, ThemeProvider, type ThemeProviderProps, Toast, type ToastProps, type ToastVariant, Tooltip, type TooltipPlacement, type TooltipProps, type UX4GTheme, UX4G_CHART_PALETTE, type UploadedFile, border, font, makeTheme, motion, radius, ramp, shadow, space, theme, type, useUX4GTheme };
|