@frigade/react 2.0.0-alpha.8 → 2.0.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/README.md +48 -513
- package/dist/index.cjs +47 -13
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.ts +1100 -83
- package/dist/index.js +15 -7
- package/dist/index.js.map +1 -1
- package/package.json +20 -4
package/dist/index.d.ts
CHANGED
|
@@ -1,33 +1,77 @@
|
|
|
1
|
+
import * as _emotion_react_jsx_runtime from '@emotion/react/jsx-runtime';
|
|
1
2
|
import * as React$1 from 'react';
|
|
2
|
-
import React__default, {
|
|
3
|
-
import * as
|
|
4
|
-
import { Interpolation } from '@emotion/react';
|
|
5
|
-
import * as Popover from '@radix-ui/react-popover';
|
|
3
|
+
import React__default, { SyntheticEvent, CSSProperties, ForwardRefExoticComponent, RefAttributes } from 'react';
|
|
4
|
+
import * as _frigade_js from '@frigade/js';
|
|
6
5
|
import { Flow, FlowStep } from '@frigade/js';
|
|
6
|
+
export { Flow, Frigade } from '@frigade/js';
|
|
7
|
+
import { EmotionJSX } from '@emotion/react/types/jsx-namespace';
|
|
8
|
+
import { ControllerFieldState, Message, ValidationRule } from 'react-hook-form';
|
|
9
|
+
import * as Popover from '@radix-ui/react-popover';
|
|
7
10
|
|
|
8
|
-
type
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
11
|
+
type FlowHandlerProp = (flow: Flow, event?: React.MouseEvent<unknown>) => Promise<boolean | void> | (boolean | void);
|
|
12
|
+
interface FlowHandlerProps {
|
|
13
|
+
onComplete?: FlowHandlerProp;
|
|
14
|
+
onDismiss?: FlowHandlerProp;
|
|
15
|
+
}
|
|
16
|
+
type DismissHandler = (e: React.MouseEvent<unknown>) => Promise<boolean | void>;
|
|
17
|
+
declare function useFlowHandlers(flow: Flow, { onComplete, onDismiss }?: FlowHandlerProps): {
|
|
18
|
+
handleDismiss: DismissHandler;
|
|
19
|
+
};
|
|
13
20
|
|
|
14
|
-
type
|
|
15
|
-
interface
|
|
16
|
-
|
|
17
|
-
|
|
21
|
+
type StepHandlerProp = (step: FlowStep, event?: SyntheticEvent<object, unknown>) => Promise<boolean | void> | (boolean | void);
|
|
22
|
+
interface StepHandlerProps {
|
|
23
|
+
onPrimary?: StepHandlerProp;
|
|
24
|
+
onSecondary?: StepHandlerProp;
|
|
18
25
|
}
|
|
19
|
-
|
|
20
|
-
declare
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
displayName: string;
|
|
24
|
-
};
|
|
26
|
+
type StepHandler = (event: SyntheticEvent<object, unknown>, properties?: Record<string | number, unknown>) => Promise<boolean>;
|
|
27
|
+
declare function useStepHandlers(step: FlowStep, { onPrimary, onSecondary }?: StepHandlerProps): {
|
|
28
|
+
handlePrimary: StepHandler;
|
|
29
|
+
handleSecondary: StepHandler;
|
|
25
30
|
};
|
|
26
31
|
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
Row: React$1.ForwardRefExoticComponent<Omit<any, "ref"> & React$1.RefAttributes<unknown>>;
|
|
32
|
+
type DeepPartial<T> = {
|
|
33
|
+
[K in keyof T]?: T[K] extends object ? DeepPartial<T[K]> : T[K];
|
|
30
34
|
};
|
|
35
|
+
interface FlowComponentProps extends Omit<BoxProps, 'container'> {
|
|
36
|
+
/**
|
|
37
|
+
* The type of container to render the Flow in. `dialog` will spawn a modal with the component in it.
|
|
38
|
+
* `none` will render the component in the current context/inline.
|
|
39
|
+
*
|
|
40
|
+
* Defaults to 'none'.
|
|
41
|
+
*/
|
|
42
|
+
container?: 'dialog' | 'none';
|
|
43
|
+
/**
|
|
44
|
+
* Whether the container is dismissible by clicking outside of it or pressing escape.
|
|
45
|
+
*
|
|
46
|
+
* Defaults to `true`.
|
|
47
|
+
*/
|
|
48
|
+
dismissible?: boolean;
|
|
49
|
+
/**
|
|
50
|
+
* The Flow ID to render. You can find the Flow ID in the Frigade dashboard.
|
|
51
|
+
*/
|
|
52
|
+
flowId: string;
|
|
53
|
+
/**
|
|
54
|
+
* Handler for when the Flow is completed.
|
|
55
|
+
*/
|
|
56
|
+
onComplete?: FlowHandlerProp;
|
|
57
|
+
/**
|
|
58
|
+
* Handler for when the Flow is dismissed.
|
|
59
|
+
*/
|
|
60
|
+
onDismiss?: FlowHandlerProp;
|
|
61
|
+
/**
|
|
62
|
+
* Handler for when primary button is clicked.
|
|
63
|
+
*/
|
|
64
|
+
onPrimary?: StepHandlerProp;
|
|
65
|
+
/**
|
|
66
|
+
* Handler for when secondary button is clicked.
|
|
67
|
+
*/
|
|
68
|
+
onSecondary?: StepHandlerProp;
|
|
69
|
+
/**
|
|
70
|
+
* Variables to pass to the Flow. You can use variables in the Flow configuration to customize copy.
|
|
71
|
+
* For instance, you can use `title: Hello, ${name}!` in the Flow configuration and pass `variables={{name: 'John'}}` to customize the copy.
|
|
72
|
+
*/
|
|
73
|
+
variables?: Record<string, unknown>;
|
|
74
|
+
}
|
|
31
75
|
|
|
32
76
|
declare const tokens: {
|
|
33
77
|
radii: {
|
|
@@ -227,67 +271,1040 @@ declare const tokens: {
|
|
|
227
271
|
};
|
|
228
272
|
type Tokens = typeof tokens;
|
|
229
273
|
|
|
230
|
-
type Theme =
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
children?: React.ReactNode;
|
|
237
|
-
navigate?: NavigateHandler;
|
|
238
|
-
theme?: Theme;
|
|
239
|
-
userId?: string;
|
|
240
|
-
}
|
|
241
|
-
declare function Provider({ children, navigate, theme, ...props }: ProviderProps): react_jsx_runtime.JSX.Element;
|
|
242
|
-
|
|
243
|
-
type TextVariant = 'Display1' | 'Display2' | 'H1' | 'H2' | 'H3' | 'H4' | 'Body1' | 'Body2' | 'Caption';
|
|
244
|
-
interface TextProps extends BoxProps {
|
|
245
|
-
variant?: TextVariant;
|
|
246
|
-
}
|
|
247
|
-
declare function BaseText({ as, children, variant, ...props }: TextProps): react_jsx_runtime.JSX.Element;
|
|
248
|
-
declare const Text: typeof BaseText & {
|
|
249
|
-
[k: string]: {
|
|
250
|
-
(props: TextProps): react_jsx_runtime.JSX.Element;
|
|
251
|
-
displayName: string;
|
|
274
|
+
type Theme = DeepPartial<Tokens>;
|
|
275
|
+
declare const theme: DeepPartial<{
|
|
276
|
+
radii: {
|
|
277
|
+
md: string;
|
|
278
|
+
lg: string;
|
|
279
|
+
round: string;
|
|
252
280
|
};
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
281
|
+
shadows: {
|
|
282
|
+
md: string;
|
|
283
|
+
};
|
|
284
|
+
space: {
|
|
285
|
+
0: string;
|
|
286
|
+
4: string;
|
|
287
|
+
20: string;
|
|
288
|
+
[-20]: string;
|
|
289
|
+
19: string;
|
|
290
|
+
[-19]: string;
|
|
291
|
+
18: string;
|
|
292
|
+
[-18]: string;
|
|
293
|
+
17: string;
|
|
294
|
+
[-17]: string;
|
|
295
|
+
16: string;
|
|
296
|
+
[-16]: string;
|
|
297
|
+
15: string;
|
|
298
|
+
[-15]: string;
|
|
299
|
+
14: string;
|
|
300
|
+
[-14]: string;
|
|
301
|
+
13: string;
|
|
302
|
+
[-13]: string;
|
|
303
|
+
12: string;
|
|
304
|
+
[-12]: string;
|
|
305
|
+
11: string;
|
|
306
|
+
[-11]: string;
|
|
307
|
+
10: string;
|
|
308
|
+
[-10]: string;
|
|
309
|
+
9: string;
|
|
310
|
+
[-9]: string;
|
|
311
|
+
8: string;
|
|
312
|
+
[-8]: string;
|
|
313
|
+
7: string;
|
|
314
|
+
[-7]: string;
|
|
315
|
+
6: string;
|
|
316
|
+
[-6]: string;
|
|
317
|
+
5: string;
|
|
318
|
+
[-5]: string;
|
|
319
|
+
[-4]: string;
|
|
320
|
+
3: string;
|
|
321
|
+
[-3]: string;
|
|
322
|
+
2: string;
|
|
323
|
+
[-2]: string;
|
|
324
|
+
1: string;
|
|
325
|
+
[-1]: string;
|
|
326
|
+
0.5: string;
|
|
327
|
+
[-0.5]: string;
|
|
328
|
+
auto: string;
|
|
329
|
+
};
|
|
330
|
+
fontFamilies: {
|
|
331
|
+
default: string;
|
|
332
|
+
};
|
|
333
|
+
fontSizes: {
|
|
334
|
+
xs: string;
|
|
335
|
+
sm: string;
|
|
336
|
+
md: string;
|
|
337
|
+
lg: string;
|
|
338
|
+
xl: string;
|
|
339
|
+
'2xl': string;
|
|
340
|
+
'3xl': string;
|
|
341
|
+
'4xl': string;
|
|
342
|
+
'5xl': string;
|
|
343
|
+
};
|
|
344
|
+
fontWeights: {
|
|
345
|
+
thin: string;
|
|
346
|
+
extralight: string;
|
|
347
|
+
light: string;
|
|
348
|
+
regular: string;
|
|
349
|
+
medium: string;
|
|
350
|
+
demibold: string;
|
|
351
|
+
bold: string;
|
|
352
|
+
extrabold: string;
|
|
353
|
+
black: string;
|
|
354
|
+
};
|
|
355
|
+
letterSpacings: {
|
|
356
|
+
md: string;
|
|
357
|
+
};
|
|
358
|
+
lineHeights: {
|
|
359
|
+
xs: string;
|
|
360
|
+
sm: string;
|
|
361
|
+
md: string;
|
|
362
|
+
lg: string;
|
|
363
|
+
xl: string;
|
|
364
|
+
'2xl': string;
|
|
365
|
+
'3xl': string;
|
|
366
|
+
'4xl': string;
|
|
367
|
+
};
|
|
368
|
+
colors: {
|
|
369
|
+
neutral: {
|
|
370
|
+
background: string;
|
|
371
|
+
border: string;
|
|
372
|
+
foreground: string;
|
|
373
|
+
surface: string;
|
|
374
|
+
active: {
|
|
375
|
+
background: string;
|
|
376
|
+
border: string;
|
|
377
|
+
foreground: string;
|
|
378
|
+
surface: string;
|
|
379
|
+
};
|
|
380
|
+
focus: {
|
|
381
|
+
background: string;
|
|
382
|
+
border: string;
|
|
383
|
+
foreground: string;
|
|
384
|
+
surface: string;
|
|
385
|
+
};
|
|
386
|
+
hover: {
|
|
387
|
+
background: string;
|
|
388
|
+
border: string;
|
|
389
|
+
foreground: string;
|
|
390
|
+
surface: string;
|
|
391
|
+
};
|
|
392
|
+
};
|
|
393
|
+
primary: {
|
|
394
|
+
background: string;
|
|
395
|
+
border: string;
|
|
396
|
+
foreground: string;
|
|
397
|
+
surface: string;
|
|
398
|
+
active: {
|
|
399
|
+
background: string;
|
|
400
|
+
border: string;
|
|
401
|
+
foreground: string;
|
|
402
|
+
surface: string;
|
|
403
|
+
};
|
|
404
|
+
focus: {
|
|
405
|
+
background: string;
|
|
406
|
+
border: string;
|
|
407
|
+
foreground: string;
|
|
408
|
+
surface: string;
|
|
409
|
+
};
|
|
410
|
+
hover: {
|
|
411
|
+
background: string;
|
|
412
|
+
border: string;
|
|
413
|
+
foreground: string;
|
|
414
|
+
surface: string;
|
|
415
|
+
};
|
|
416
|
+
};
|
|
417
|
+
secondary: {
|
|
418
|
+
background: string;
|
|
419
|
+
border: string;
|
|
420
|
+
foreground: string;
|
|
421
|
+
surface: string;
|
|
422
|
+
active: {
|
|
423
|
+
background: string;
|
|
424
|
+
border: string;
|
|
425
|
+
foreground: string;
|
|
426
|
+
surface: string;
|
|
427
|
+
};
|
|
428
|
+
focus: {
|
|
429
|
+
background: string;
|
|
430
|
+
border: string;
|
|
431
|
+
foreground: string;
|
|
432
|
+
surface: string;
|
|
433
|
+
};
|
|
434
|
+
hover: {
|
|
435
|
+
background: string;
|
|
436
|
+
border: string;
|
|
437
|
+
foreground: string;
|
|
438
|
+
surface: string;
|
|
439
|
+
};
|
|
440
|
+
};
|
|
441
|
+
black: string;
|
|
442
|
+
gray100: string;
|
|
443
|
+
gray200: string;
|
|
444
|
+
gray300: string;
|
|
445
|
+
gray400: string;
|
|
446
|
+
gray500: string;
|
|
447
|
+
gray600: string;
|
|
448
|
+
gray700: string;
|
|
449
|
+
gray800: string;
|
|
450
|
+
gray900: string;
|
|
451
|
+
white: string;
|
|
452
|
+
blue400: string;
|
|
453
|
+
blue500: string;
|
|
454
|
+
blue800: string;
|
|
455
|
+
blue900: string;
|
|
456
|
+
green400: string;
|
|
457
|
+
green500: string;
|
|
458
|
+
green800: string;
|
|
459
|
+
transparent: string;
|
|
460
|
+
inherit: string;
|
|
461
|
+
red500: string;
|
|
462
|
+
};
|
|
463
|
+
borders: {
|
|
464
|
+
md: string;
|
|
465
|
+
};
|
|
466
|
+
borderWidths: {
|
|
467
|
+
0: string;
|
|
468
|
+
md: string;
|
|
469
|
+
};
|
|
470
|
+
}>;
|
|
283
471
|
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
472
|
+
type PathsToStringProps<T> = T extends string ? [] : {
|
|
473
|
+
[K in Extract<keyof T, string>]: [K, ...PathsToStringProps<T[K]>];
|
|
474
|
+
}[Extract<keyof T, string>];
|
|
475
|
+
type Join<T extends string[], D extends string> = T extends [] ? never : T extends [infer F] ? F : T extends [infer F, ...infer R] ? F extends string ? `${F}${D}${Join<Extract<R, string[]>, D>}` : never : string;
|
|
476
|
+
type ColorName = Join<PathsToStringProps<typeof theme.colors>, '.'>;
|
|
477
|
+
declare const themedStyleProps: {
|
|
478
|
+
readonly color: Record<ColorName, string>;
|
|
479
|
+
readonly backgroundColor: Record<ColorName, string>;
|
|
480
|
+
readonly borderColor: Record<ColorName, string>;
|
|
481
|
+
readonly border: DeepPartial<{
|
|
482
|
+
md: string;
|
|
483
|
+
}>;
|
|
484
|
+
readonly borderRadius: DeepPartial<{
|
|
485
|
+
md: string;
|
|
486
|
+
lg: string;
|
|
487
|
+
round: string;
|
|
488
|
+
}>;
|
|
489
|
+
readonly borderWidth: DeepPartial<{
|
|
490
|
+
0: string;
|
|
491
|
+
md: string;
|
|
492
|
+
}>;
|
|
493
|
+
readonly boxShadow: DeepPartial<{
|
|
494
|
+
md: string;
|
|
495
|
+
}>;
|
|
496
|
+
readonly fontFamily: DeepPartial<{
|
|
497
|
+
default: string;
|
|
498
|
+
}>;
|
|
499
|
+
readonly fontSize: DeepPartial<{
|
|
500
|
+
xs: string;
|
|
501
|
+
sm: string;
|
|
502
|
+
md: string;
|
|
503
|
+
lg: string;
|
|
504
|
+
xl: string;
|
|
505
|
+
'2xl': string;
|
|
506
|
+
'3xl': string;
|
|
507
|
+
'4xl': string;
|
|
508
|
+
'5xl': string;
|
|
509
|
+
}>;
|
|
510
|
+
readonly fontWeight: DeepPartial<{
|
|
511
|
+
thin: string;
|
|
512
|
+
extralight: string;
|
|
513
|
+
light: string;
|
|
514
|
+
regular: string;
|
|
515
|
+
medium: string;
|
|
516
|
+
demibold: string;
|
|
517
|
+
bold: string;
|
|
518
|
+
extrabold: string;
|
|
519
|
+
black: string;
|
|
520
|
+
}>;
|
|
521
|
+
readonly gap: DeepPartial<{
|
|
522
|
+
0: string;
|
|
523
|
+
4: string;
|
|
524
|
+
20: string;
|
|
525
|
+
[-20]: string;
|
|
526
|
+
19: string;
|
|
527
|
+
[-19]: string;
|
|
528
|
+
18: string;
|
|
529
|
+
[-18]: string;
|
|
530
|
+
17: string;
|
|
531
|
+
[-17]: string;
|
|
532
|
+
16: string;
|
|
533
|
+
[-16]: string;
|
|
534
|
+
15: string;
|
|
535
|
+
[-15]: string;
|
|
536
|
+
14: string;
|
|
537
|
+
[-14]: string;
|
|
538
|
+
13: string;
|
|
539
|
+
[-13]: string;
|
|
540
|
+
12: string;
|
|
541
|
+
[-12]: string;
|
|
542
|
+
11: string;
|
|
543
|
+
[-11]: string;
|
|
544
|
+
10: string;
|
|
545
|
+
[-10]: string;
|
|
546
|
+
9: string;
|
|
547
|
+
[-9]: string;
|
|
548
|
+
8: string;
|
|
549
|
+
[-8]: string;
|
|
550
|
+
7: string;
|
|
551
|
+
[-7]: string;
|
|
552
|
+
6: string;
|
|
553
|
+
[-6]: string;
|
|
554
|
+
5: string;
|
|
555
|
+
[-5]: string;
|
|
556
|
+
[-4]: string;
|
|
557
|
+
3: string;
|
|
558
|
+
[-3]: string;
|
|
559
|
+
2: string;
|
|
560
|
+
[-2]: string;
|
|
561
|
+
1: string;
|
|
562
|
+
[-1]: string;
|
|
563
|
+
0.5: string;
|
|
564
|
+
[-0.5]: string;
|
|
565
|
+
auto: string;
|
|
566
|
+
}>;
|
|
567
|
+
readonly lineHeight: DeepPartial<{
|
|
568
|
+
xs: string;
|
|
569
|
+
sm: string;
|
|
570
|
+
md: string;
|
|
571
|
+
lg: string;
|
|
572
|
+
xl: string;
|
|
573
|
+
'2xl': string;
|
|
574
|
+
'3xl': string;
|
|
575
|
+
'4xl': string;
|
|
576
|
+
}>;
|
|
577
|
+
readonly margin: DeepPartial<{
|
|
578
|
+
0: string;
|
|
579
|
+
4: string;
|
|
580
|
+
20: string;
|
|
581
|
+
[-20]: string;
|
|
582
|
+
19: string;
|
|
583
|
+
[-19]: string;
|
|
584
|
+
18: string;
|
|
585
|
+
[-18]: string;
|
|
586
|
+
17: string;
|
|
587
|
+
[-17]: string;
|
|
588
|
+
16: string;
|
|
589
|
+
[-16]: string;
|
|
590
|
+
15: string;
|
|
591
|
+
[-15]: string;
|
|
592
|
+
14: string;
|
|
593
|
+
[-14]: string;
|
|
594
|
+
13: string;
|
|
595
|
+
[-13]: string;
|
|
596
|
+
12: string;
|
|
597
|
+
[-12]: string;
|
|
598
|
+
11: string;
|
|
599
|
+
[-11]: string;
|
|
600
|
+
10: string;
|
|
601
|
+
[-10]: string;
|
|
602
|
+
9: string;
|
|
603
|
+
[-9]: string;
|
|
604
|
+
8: string;
|
|
605
|
+
[-8]: string;
|
|
606
|
+
7: string;
|
|
607
|
+
[-7]: string;
|
|
608
|
+
6: string;
|
|
609
|
+
[-6]: string;
|
|
610
|
+
5: string;
|
|
611
|
+
[-5]: string;
|
|
612
|
+
[-4]: string;
|
|
613
|
+
3: string;
|
|
614
|
+
[-3]: string;
|
|
615
|
+
2: string;
|
|
616
|
+
[-2]: string;
|
|
617
|
+
1: string;
|
|
618
|
+
[-1]: string;
|
|
619
|
+
0.5: string;
|
|
620
|
+
[-0.5]: string;
|
|
621
|
+
auto: string;
|
|
622
|
+
}>;
|
|
623
|
+
readonly marginBottom: DeepPartial<{
|
|
624
|
+
0: string;
|
|
625
|
+
4: string;
|
|
626
|
+
20: string;
|
|
627
|
+
[-20]: string;
|
|
628
|
+
19: string;
|
|
629
|
+
[-19]: string;
|
|
630
|
+
18: string;
|
|
631
|
+
[-18]: string;
|
|
632
|
+
17: string;
|
|
633
|
+
[-17]: string;
|
|
634
|
+
16: string;
|
|
635
|
+
[-16]: string;
|
|
636
|
+
15: string;
|
|
637
|
+
[-15]: string;
|
|
638
|
+
14: string;
|
|
639
|
+
[-14]: string;
|
|
640
|
+
13: string;
|
|
641
|
+
[-13]: string;
|
|
642
|
+
12: string;
|
|
643
|
+
[-12]: string;
|
|
644
|
+
11: string;
|
|
645
|
+
[-11]: string;
|
|
646
|
+
10: string;
|
|
647
|
+
[-10]: string;
|
|
648
|
+
9: string;
|
|
649
|
+
[-9]: string;
|
|
650
|
+
8: string;
|
|
651
|
+
[-8]: string;
|
|
652
|
+
7: string;
|
|
653
|
+
[-7]: string;
|
|
654
|
+
6: string;
|
|
655
|
+
[-6]: string;
|
|
656
|
+
5: string;
|
|
657
|
+
[-5]: string;
|
|
658
|
+
[-4]: string;
|
|
659
|
+
3: string;
|
|
660
|
+
[-3]: string;
|
|
661
|
+
2: string;
|
|
662
|
+
[-2]: string;
|
|
663
|
+
1: string;
|
|
664
|
+
[-1]: string;
|
|
665
|
+
0.5: string;
|
|
666
|
+
[-0.5]: string;
|
|
667
|
+
auto: string;
|
|
668
|
+
}>;
|
|
669
|
+
readonly marginLeft: DeepPartial<{
|
|
670
|
+
0: string;
|
|
671
|
+
4: string;
|
|
672
|
+
20: string;
|
|
673
|
+
[-20]: string;
|
|
674
|
+
19: string;
|
|
675
|
+
[-19]: string;
|
|
676
|
+
18: string;
|
|
677
|
+
[-18]: string;
|
|
678
|
+
17: string;
|
|
679
|
+
[-17]: string;
|
|
680
|
+
16: string;
|
|
681
|
+
[-16]: string;
|
|
682
|
+
15: string;
|
|
683
|
+
[-15]: string;
|
|
684
|
+
14: string;
|
|
685
|
+
[-14]: string;
|
|
686
|
+
13: string;
|
|
687
|
+
[-13]: string;
|
|
688
|
+
12: string;
|
|
689
|
+
[-12]: string;
|
|
690
|
+
11: string;
|
|
691
|
+
[-11]: string;
|
|
692
|
+
10: string;
|
|
693
|
+
[-10]: string;
|
|
694
|
+
9: string;
|
|
695
|
+
[-9]: string;
|
|
696
|
+
8: string;
|
|
697
|
+
[-8]: string;
|
|
698
|
+
7: string;
|
|
699
|
+
[-7]: string;
|
|
700
|
+
6: string;
|
|
701
|
+
[-6]: string;
|
|
702
|
+
5: string;
|
|
703
|
+
[-5]: string;
|
|
704
|
+
[-4]: string;
|
|
705
|
+
3: string;
|
|
706
|
+
[-3]: string;
|
|
707
|
+
2: string;
|
|
708
|
+
[-2]: string;
|
|
709
|
+
1: string;
|
|
710
|
+
[-1]: string;
|
|
711
|
+
0.5: string;
|
|
712
|
+
[-0.5]: string;
|
|
713
|
+
auto: string;
|
|
714
|
+
}>;
|
|
715
|
+
readonly marginRight: DeepPartial<{
|
|
716
|
+
0: string;
|
|
717
|
+
4: string;
|
|
718
|
+
20: string;
|
|
719
|
+
[-20]: string;
|
|
720
|
+
19: string;
|
|
721
|
+
[-19]: string;
|
|
722
|
+
18: string;
|
|
723
|
+
[-18]: string;
|
|
724
|
+
17: string;
|
|
725
|
+
[-17]: string;
|
|
726
|
+
16: string;
|
|
727
|
+
[-16]: string;
|
|
728
|
+
15: string;
|
|
729
|
+
[-15]: string;
|
|
730
|
+
14: string;
|
|
731
|
+
[-14]: string;
|
|
732
|
+
13: string;
|
|
733
|
+
[-13]: string;
|
|
734
|
+
12: string;
|
|
735
|
+
[-12]: string;
|
|
736
|
+
11: string;
|
|
737
|
+
[-11]: string;
|
|
738
|
+
10: string;
|
|
739
|
+
[-10]: string;
|
|
740
|
+
9: string;
|
|
741
|
+
[-9]: string;
|
|
742
|
+
8: string;
|
|
743
|
+
[-8]: string;
|
|
744
|
+
7: string;
|
|
745
|
+
[-7]: string;
|
|
746
|
+
6: string;
|
|
747
|
+
[-6]: string;
|
|
748
|
+
5: string;
|
|
749
|
+
[-5]: string;
|
|
750
|
+
[-4]: string;
|
|
751
|
+
3: string;
|
|
752
|
+
[-3]: string;
|
|
753
|
+
2: string;
|
|
754
|
+
[-2]: string;
|
|
755
|
+
1: string;
|
|
756
|
+
[-1]: string;
|
|
757
|
+
0.5: string;
|
|
758
|
+
[-0.5]: string;
|
|
759
|
+
auto: string;
|
|
760
|
+
}>;
|
|
761
|
+
readonly marginTop: DeepPartial<{
|
|
762
|
+
0: string;
|
|
763
|
+
4: string;
|
|
764
|
+
20: string;
|
|
765
|
+
[-20]: string;
|
|
766
|
+
19: string;
|
|
767
|
+
[-19]: string;
|
|
768
|
+
18: string;
|
|
769
|
+
[-18]: string;
|
|
770
|
+
17: string;
|
|
771
|
+
[-17]: string;
|
|
772
|
+
16: string;
|
|
773
|
+
[-16]: string;
|
|
774
|
+
15: string;
|
|
775
|
+
[-15]: string;
|
|
776
|
+
14: string;
|
|
777
|
+
[-14]: string;
|
|
778
|
+
13: string;
|
|
779
|
+
[-13]: string;
|
|
780
|
+
12: string;
|
|
781
|
+
[-12]: string;
|
|
782
|
+
11: string;
|
|
783
|
+
[-11]: string;
|
|
784
|
+
10: string;
|
|
785
|
+
[-10]: string;
|
|
786
|
+
9: string;
|
|
787
|
+
[-9]: string;
|
|
788
|
+
8: string;
|
|
789
|
+
[-8]: string;
|
|
790
|
+
7: string;
|
|
791
|
+
[-7]: string;
|
|
792
|
+
6: string;
|
|
793
|
+
[-6]: string;
|
|
794
|
+
5: string;
|
|
795
|
+
[-5]: string;
|
|
796
|
+
[-4]: string;
|
|
797
|
+
3: string;
|
|
798
|
+
[-3]: string;
|
|
799
|
+
2: string;
|
|
800
|
+
[-2]: string;
|
|
801
|
+
1: string;
|
|
802
|
+
[-1]: string;
|
|
803
|
+
0.5: string;
|
|
804
|
+
[-0.5]: string;
|
|
805
|
+
auto: string;
|
|
806
|
+
}>;
|
|
807
|
+
readonly padding: DeepPartial<{
|
|
808
|
+
0: string;
|
|
809
|
+
4: string;
|
|
810
|
+
20: string;
|
|
811
|
+
[-20]: string;
|
|
812
|
+
19: string;
|
|
813
|
+
[-19]: string;
|
|
814
|
+
18: string;
|
|
815
|
+
[-18]: string;
|
|
816
|
+
17: string;
|
|
817
|
+
[-17]: string;
|
|
818
|
+
16: string;
|
|
819
|
+
[-16]: string;
|
|
820
|
+
15: string;
|
|
821
|
+
[-15]: string;
|
|
822
|
+
14: string;
|
|
823
|
+
[-14]: string;
|
|
824
|
+
13: string;
|
|
825
|
+
[-13]: string;
|
|
826
|
+
12: string;
|
|
827
|
+
[-12]: string;
|
|
828
|
+
11: string;
|
|
829
|
+
[-11]: string;
|
|
830
|
+
10: string;
|
|
831
|
+
[-10]: string;
|
|
832
|
+
9: string;
|
|
833
|
+
[-9]: string;
|
|
834
|
+
8: string;
|
|
835
|
+
[-8]: string;
|
|
836
|
+
7: string;
|
|
837
|
+
[-7]: string;
|
|
838
|
+
6: string;
|
|
839
|
+
[-6]: string;
|
|
840
|
+
5: string;
|
|
841
|
+
[-5]: string;
|
|
842
|
+
[-4]: string;
|
|
843
|
+
3: string;
|
|
844
|
+
[-3]: string;
|
|
845
|
+
2: string;
|
|
846
|
+
[-2]: string;
|
|
847
|
+
1: string;
|
|
848
|
+
[-1]: string;
|
|
849
|
+
0.5: string;
|
|
850
|
+
[-0.5]: string;
|
|
851
|
+
auto: string;
|
|
852
|
+
}>;
|
|
853
|
+
readonly paddingBottom: DeepPartial<{
|
|
854
|
+
0: string;
|
|
855
|
+
4: string;
|
|
856
|
+
20: string;
|
|
857
|
+
[-20]: string;
|
|
858
|
+
19: string;
|
|
859
|
+
[-19]: string;
|
|
860
|
+
18: string;
|
|
861
|
+
[-18]: string;
|
|
862
|
+
17: string;
|
|
863
|
+
[-17]: string;
|
|
864
|
+
16: string;
|
|
865
|
+
[-16]: string;
|
|
866
|
+
15: string;
|
|
867
|
+
[-15]: string;
|
|
868
|
+
14: string;
|
|
869
|
+
[-14]: string;
|
|
870
|
+
13: string;
|
|
871
|
+
[-13]: string;
|
|
872
|
+
12: string;
|
|
873
|
+
[-12]: string;
|
|
874
|
+
11: string;
|
|
875
|
+
[-11]: string;
|
|
876
|
+
10: string;
|
|
877
|
+
[-10]: string;
|
|
878
|
+
9: string;
|
|
879
|
+
[-9]: string;
|
|
880
|
+
8: string;
|
|
881
|
+
[-8]: string;
|
|
882
|
+
7: string;
|
|
883
|
+
[-7]: string;
|
|
884
|
+
6: string;
|
|
885
|
+
[-6]: string;
|
|
886
|
+
5: string;
|
|
887
|
+
[-5]: string;
|
|
888
|
+
[-4]: string;
|
|
889
|
+
3: string;
|
|
890
|
+
[-3]: string;
|
|
891
|
+
2: string;
|
|
892
|
+
[-2]: string;
|
|
893
|
+
1: string;
|
|
894
|
+
[-1]: string;
|
|
895
|
+
0.5: string;
|
|
896
|
+
[-0.5]: string;
|
|
897
|
+
auto: string;
|
|
898
|
+
}>;
|
|
899
|
+
readonly paddingLeft: DeepPartial<{
|
|
900
|
+
0: string;
|
|
901
|
+
4: string;
|
|
902
|
+
20: string;
|
|
903
|
+
[-20]: string;
|
|
904
|
+
19: string;
|
|
905
|
+
[-19]: string;
|
|
906
|
+
18: string;
|
|
907
|
+
[-18]: string;
|
|
908
|
+
17: string;
|
|
909
|
+
[-17]: string;
|
|
910
|
+
16: string;
|
|
911
|
+
[-16]: string;
|
|
912
|
+
15: string;
|
|
913
|
+
[-15]: string;
|
|
914
|
+
14: string;
|
|
915
|
+
[-14]: string;
|
|
916
|
+
13: string;
|
|
917
|
+
[-13]: string;
|
|
918
|
+
12: string;
|
|
919
|
+
[-12]: string;
|
|
920
|
+
11: string;
|
|
921
|
+
[-11]: string;
|
|
922
|
+
10: string;
|
|
923
|
+
[-10]: string;
|
|
924
|
+
9: string;
|
|
925
|
+
[-9]: string;
|
|
926
|
+
8: string;
|
|
927
|
+
[-8]: string;
|
|
928
|
+
7: string;
|
|
929
|
+
[-7]: string;
|
|
930
|
+
6: string;
|
|
931
|
+
[-6]: string;
|
|
932
|
+
5: string;
|
|
933
|
+
[-5]: string;
|
|
934
|
+
[-4]: string;
|
|
935
|
+
3: string;
|
|
936
|
+
[-3]: string;
|
|
937
|
+
2: string;
|
|
938
|
+
[-2]: string;
|
|
939
|
+
1: string;
|
|
940
|
+
[-1]: string;
|
|
941
|
+
0.5: string;
|
|
942
|
+
[-0.5]: string;
|
|
943
|
+
auto: string;
|
|
944
|
+
}>;
|
|
945
|
+
readonly paddingRight: DeepPartial<{
|
|
946
|
+
0: string;
|
|
947
|
+
4: string;
|
|
948
|
+
20: string;
|
|
949
|
+
[-20]: string;
|
|
950
|
+
19: string;
|
|
951
|
+
[-19]: string;
|
|
952
|
+
18: string;
|
|
953
|
+
[-18]: string;
|
|
954
|
+
17: string;
|
|
955
|
+
[-17]: string;
|
|
956
|
+
16: string;
|
|
957
|
+
[-16]: string;
|
|
958
|
+
15: string;
|
|
959
|
+
[-15]: string;
|
|
960
|
+
14: string;
|
|
961
|
+
[-14]: string;
|
|
962
|
+
13: string;
|
|
963
|
+
[-13]: string;
|
|
964
|
+
12: string;
|
|
965
|
+
[-12]: string;
|
|
966
|
+
11: string;
|
|
967
|
+
[-11]: string;
|
|
968
|
+
10: string;
|
|
969
|
+
[-10]: string;
|
|
970
|
+
9: string;
|
|
971
|
+
[-9]: string;
|
|
972
|
+
8: string;
|
|
973
|
+
[-8]: string;
|
|
974
|
+
7: string;
|
|
975
|
+
[-7]: string;
|
|
976
|
+
6: string;
|
|
977
|
+
[-6]: string;
|
|
978
|
+
5: string;
|
|
979
|
+
[-5]: string;
|
|
980
|
+
[-4]: string;
|
|
981
|
+
3: string;
|
|
982
|
+
[-3]: string;
|
|
983
|
+
2: string;
|
|
984
|
+
[-2]: string;
|
|
985
|
+
1: string;
|
|
986
|
+
[-1]: string;
|
|
987
|
+
0.5: string;
|
|
988
|
+
[-0.5]: string;
|
|
989
|
+
auto: string;
|
|
990
|
+
}>;
|
|
991
|
+
readonly paddingTop: DeepPartial<{
|
|
992
|
+
0: string;
|
|
993
|
+
4: string;
|
|
994
|
+
20: string;
|
|
995
|
+
[-20]: string;
|
|
996
|
+
19: string;
|
|
997
|
+
[-19]: string;
|
|
998
|
+
18: string;
|
|
999
|
+
[-18]: string;
|
|
1000
|
+
17: string;
|
|
1001
|
+
[-17]: string;
|
|
1002
|
+
16: string;
|
|
1003
|
+
[-16]: string;
|
|
1004
|
+
15: string;
|
|
1005
|
+
[-15]: string;
|
|
1006
|
+
14: string;
|
|
1007
|
+
[-14]: string;
|
|
1008
|
+
13: string;
|
|
1009
|
+
[-13]: string;
|
|
1010
|
+
12: string;
|
|
1011
|
+
[-12]: string;
|
|
1012
|
+
11: string;
|
|
1013
|
+
[-11]: string;
|
|
1014
|
+
10: string;
|
|
1015
|
+
[-10]: string;
|
|
1016
|
+
9: string;
|
|
1017
|
+
[-9]: string;
|
|
1018
|
+
8: string;
|
|
1019
|
+
[-8]: string;
|
|
1020
|
+
7: string;
|
|
1021
|
+
[-7]: string;
|
|
1022
|
+
6: string;
|
|
1023
|
+
[-6]: string;
|
|
1024
|
+
5: string;
|
|
1025
|
+
[-5]: string;
|
|
1026
|
+
[-4]: string;
|
|
1027
|
+
3: string;
|
|
1028
|
+
[-3]: string;
|
|
1029
|
+
2: string;
|
|
1030
|
+
[-2]: string;
|
|
1031
|
+
1: string;
|
|
1032
|
+
[-1]: string;
|
|
1033
|
+
0.5: string;
|
|
1034
|
+
[-0.5]: string;
|
|
1035
|
+
auto: string;
|
|
1036
|
+
}>;
|
|
1037
|
+
};
|
|
1038
|
+
declare const stylePropShorthands: {
|
|
1039
|
+
readonly bg: readonly ["backgroundColor"];
|
|
1040
|
+
readonly m: readonly ["margin"];
|
|
1041
|
+
readonly mt: readonly ["marginTop"];
|
|
1042
|
+
readonly mr: readonly ["marginRight"];
|
|
1043
|
+
readonly mb: readonly ["marginBottom"];
|
|
1044
|
+
readonly ml: readonly ["marginLeft"];
|
|
1045
|
+
readonly mx: readonly ["marginLeft", "marginRight"];
|
|
1046
|
+
readonly my: readonly ["marginTop", "marginBottom"];
|
|
1047
|
+
readonly p: readonly ["padding"];
|
|
1048
|
+
readonly pt: readonly ["paddingTop"];
|
|
1049
|
+
readonly pr: readonly ["paddingRight"];
|
|
1050
|
+
readonly pb: readonly ["paddingBottom"];
|
|
1051
|
+
readonly pl: readonly ["paddingLeft"];
|
|
1052
|
+
readonly px: readonly ["paddingLeft", "paddingRight"];
|
|
1053
|
+
readonly py: readonly ["paddingTop", "paddingBottom"];
|
|
1054
|
+
};
|
|
1055
|
+
type ThemedStyleProps = {
|
|
1056
|
+
[K in keyof typeof themedStyleProps]: keyof (typeof themedStyleProps)[K];
|
|
1057
|
+
};
|
|
1058
|
+
type FilteredCSSProps = Omit<{
|
|
1059
|
+
[key in keyof CSSProperties]: CSSProperties[key];
|
|
1060
|
+
}, `-${string}` | `Moz${string}` | `ms${string}` | `Webkit${string}` | `Khtml${string}` | `O${string}`>;
|
|
1061
|
+
type ThemedStyleProp<K extends keyof ThemedStyleProps> = ThemedStyleProps[K] | (string & {});
|
|
1062
|
+
type StylePropShorthands = {
|
|
1063
|
+
[K in keyof typeof stylePropShorthands]?: ThemedStyleProp<(typeof stylePropShorthands)[K][0]>;
|
|
1064
|
+
};
|
|
1065
|
+
interface StyleProps extends FilteredCSSProps, StylePropShorthands {
|
|
1066
|
+
backgroundColor?: ThemedStyleProp<'backgroundColor'>;
|
|
1067
|
+
border?: ThemedStyleProp<'border'>;
|
|
1068
|
+
borderColor?: ThemedStyleProp<'borderColor'>;
|
|
1069
|
+
borderRadius?: ThemedStyleProp<'borderRadius'>;
|
|
1070
|
+
borderWidth?: ThemedStyleProp<'borderWidth'>;
|
|
1071
|
+
boxShadow?: ThemedStyleProp<'boxShadow'>;
|
|
1072
|
+
color?: ThemedStyleProp<'color'>;
|
|
1073
|
+
fontFamily?: ThemedStyleProp<'fontFamily'>;
|
|
1074
|
+
fontSize?: ThemedStyleProp<'fontSize'>;
|
|
1075
|
+
fontWeight?: ThemedStyleProp<'fontWeight'>;
|
|
1076
|
+
gap?: ThemedStyleProp<'gap'>;
|
|
1077
|
+
lineHeight?: ThemedStyleProp<'lineHeight'>;
|
|
1078
|
+
margin?: ThemedStyleProp<'margin'>;
|
|
1079
|
+
marginBottom?: ThemedStyleProp<'marginBottom'>;
|
|
1080
|
+
marginLeft?: ThemedStyleProp<'marginLeft'>;
|
|
1081
|
+
marginRight?: ThemedStyleProp<'marginRight'>;
|
|
1082
|
+
marginTop?: ThemedStyleProp<'marginTop'>;
|
|
1083
|
+
padding?: ThemedStyleProp<'padding'>;
|
|
1084
|
+
paddingBottom?: ThemedStyleProp<'paddingBottom'>;
|
|
1085
|
+
paddingLeft?: ThemedStyleProp<'paddingLeft'>;
|
|
1086
|
+
paddingRight?: ThemedStyleProp<'paddingRight'>;
|
|
1087
|
+
paddingTop?: ThemedStyleProp<'paddingTop'>;
|
|
1088
|
+
}
|
|
1089
|
+
|
|
1090
|
+
type Part = string | Part[];
|
|
1091
|
+
type BoxProps<T extends React$1.ElementType = React$1.ElementType> = {
|
|
1092
|
+
as?: T;
|
|
1093
|
+
part?: Part;
|
|
1094
|
+
} & StyleProps & React$1.ComponentPropsWithoutRef<T>;
|
|
1095
|
+
declare const Box: <T extends React$1.ElementType<any, keyof React$1.JSX.IntrinsicElements> = React$1.ElementType<any, keyof React$1.JSX.IntrinsicElements>>(props: BoxProps<T>) => React$1.ReactElement;
|
|
1096
|
+
|
|
1097
|
+
type ButtonVariant = 'Primary' | 'Secondary' | 'Link' | 'Plain';
|
|
1098
|
+
interface ButtonProps extends BoxProps {
|
|
1099
|
+
title?: string;
|
|
1100
|
+
variant?: ButtonVariant;
|
|
1101
|
+
}
|
|
1102
|
+
declare function BaseButton({ as, children, part, title, variant, ...props }: ButtonProps): _emotion_react_jsx_runtime.JSX.Element;
|
|
1103
|
+
declare const Button: typeof BaseButton & {
|
|
1104
|
+
[k: string]: {
|
|
1105
|
+
(props: ButtonProps): _emotion_react_jsx_runtime.JSX.Element;
|
|
1106
|
+
displayName: string;
|
|
1107
|
+
};
|
|
1108
|
+
};
|
|
1109
|
+
|
|
1110
|
+
interface MediaProps extends BoxProps {
|
|
1111
|
+
src: string;
|
|
1112
|
+
type?: 'image' | 'video';
|
|
1113
|
+
}
|
|
1114
|
+
|
|
1115
|
+
interface TextProps extends BoxProps {
|
|
1116
|
+
}
|
|
1117
|
+
declare const Display1: React$1.ForwardRefExoticComponent<BoxProps<React$1.ElementType<any, keyof React$1.JSX.IntrinsicElements>>>;
|
|
1118
|
+
declare const Display2: React$1.ForwardRefExoticComponent<BoxProps<React$1.ElementType<any, keyof React$1.JSX.IntrinsicElements>>>;
|
|
1119
|
+
declare const H1: React$1.ForwardRefExoticComponent<BoxProps<React$1.ElementType<any, keyof React$1.JSX.IntrinsicElements>>>;
|
|
1120
|
+
declare const H2: React$1.ForwardRefExoticComponent<BoxProps<React$1.ElementType<any, keyof React$1.JSX.IntrinsicElements>>>;
|
|
1121
|
+
declare const H3: React$1.ForwardRefExoticComponent<BoxProps<React$1.ElementType<any, keyof React$1.JSX.IntrinsicElements>>>;
|
|
1122
|
+
declare const H4: React$1.ForwardRefExoticComponent<BoxProps<React$1.ElementType<any, keyof React$1.JSX.IntrinsicElements>>>;
|
|
1123
|
+
declare const Body1: React$1.ForwardRefExoticComponent<BoxProps<React$1.ElementType<any, keyof React$1.JSX.IntrinsicElements>>>;
|
|
1124
|
+
declare const Body2: React$1.ForwardRefExoticComponent<BoxProps<React$1.ElementType<any, keyof React$1.JSX.IntrinsicElements>>>;
|
|
1125
|
+
declare const Caption: React$1.ForwardRefExoticComponent<BoxProps<React$1.ElementType<any, keyof React$1.JSX.IntrinsicElements>>>;
|
|
1126
|
+
|
|
1127
|
+
declare const Text_Body1: typeof Body1;
|
|
1128
|
+
declare const Text_Body2: typeof Body2;
|
|
1129
|
+
declare const Text_Caption: typeof Caption;
|
|
1130
|
+
declare const Text_Display1: typeof Display1;
|
|
1131
|
+
declare const Text_Display2: typeof Display2;
|
|
1132
|
+
declare const Text_H1: typeof H1;
|
|
1133
|
+
declare const Text_H2: typeof H2;
|
|
1134
|
+
declare const Text_H3: typeof H3;
|
|
1135
|
+
declare const Text_H4: typeof H4;
|
|
1136
|
+
type Text_TextProps = TextProps;
|
|
1137
|
+
declare namespace Text {
|
|
1138
|
+
export {
|
|
1139
|
+
Text_Body1 as Body1,
|
|
1140
|
+
Text_Body2 as Body2,
|
|
1141
|
+
Text_Caption as Caption,
|
|
1142
|
+
Text_Display1 as Display1,
|
|
1143
|
+
Text_Display2 as Display2,
|
|
1144
|
+
Text_H1 as H1,
|
|
1145
|
+
Text_H2 as H2,
|
|
1146
|
+
Text_H3 as H3,
|
|
1147
|
+
Text_H4 as H4,
|
|
1148
|
+
Text_TextProps as TextProps,
|
|
1149
|
+
};
|
|
1150
|
+
}
|
|
1151
|
+
|
|
1152
|
+
interface DialogProps extends BoxProps {
|
|
1153
|
+
}
|
|
1154
|
+
|
|
1155
|
+
interface AnnouncementProps extends FlowComponentProps, Omit<DialogProps, 'container'> {
|
|
1156
|
+
}
|
|
1157
|
+
declare function Announcement(props: AnnouncementProps): _emotion_react_jsx_runtime.JSX.Element;
|
|
1158
|
+
|
|
1159
|
+
interface BannerProps extends FlowComponentProps {
|
|
1160
|
+
}
|
|
1161
|
+
declare function Banner(props: BannerProps): _emotion_react_jsx_runtime.JSX.Element;
|
|
1162
|
+
|
|
1163
|
+
interface CardComponent extends ForwardRefExoticComponent<Omit<FlowComponentProps, 'ref'> & RefAttributes<unknown>> {
|
|
1164
|
+
Dismiss: (props: ButtonProps) => EmotionJSX.Element;
|
|
1165
|
+
Media: (props: MediaProps) => EmotionJSX.Element;
|
|
1166
|
+
Primary: (props: ButtonProps) => EmotionJSX.Element;
|
|
1167
|
+
Secondary: (props: ButtonProps) => EmotionJSX.Element;
|
|
1168
|
+
Subtitle: (props: TextProps) => EmotionJSX.Element;
|
|
1169
|
+
Title: (props: TextProps) => EmotionJSX.Element;
|
|
1170
|
+
}
|
|
1171
|
+
declare const Card: CardComponent;
|
|
1172
|
+
|
|
1173
|
+
declare const Row: React$1.ForwardRefExoticComponent<Omit<BoxProps<React$1.ElementType<any, keyof React$1.JSX.IntrinsicElements>>, "ref"> & React$1.RefAttributes<unknown>>;
|
|
1174
|
+
declare const Column: React$1.ForwardRefExoticComponent<Omit<BoxProps<React$1.ElementType<any, keyof React$1.JSX.IntrinsicElements>>, "ref"> & React$1.RefAttributes<unknown>>;
|
|
1175
|
+
|
|
1176
|
+
declare const Flex_Column: typeof Column;
|
|
1177
|
+
declare const Flex_Row: typeof Row;
|
|
1178
|
+
declare namespace Flex {
|
|
1179
|
+
export {
|
|
1180
|
+
Flex_Column as Column,
|
|
1181
|
+
Flex_Row as Row,
|
|
1182
|
+
};
|
|
1183
|
+
}
|
|
1184
|
+
|
|
1185
|
+
type FieldTypes = Record<string, React.ComponentType<FormFieldProps>>;
|
|
1186
|
+
interface ValidationRules {
|
|
1187
|
+
required?: Message | ValidationRule<boolean>;
|
|
1188
|
+
min?: ValidationRule<number | string>;
|
|
1189
|
+
max?: ValidationRule<number | string>;
|
|
1190
|
+
maxLength?: ValidationRule<number>;
|
|
1191
|
+
minLength?: ValidationRule<number>;
|
|
1192
|
+
pattern?: ValidationRule<RegExp>;
|
|
1193
|
+
}
|
|
1194
|
+
interface FormFieldData extends ValidationRules {
|
|
1195
|
+
id: string;
|
|
1196
|
+
options?: {
|
|
1197
|
+
label: string;
|
|
1198
|
+
value: string;
|
|
1199
|
+
}[];
|
|
1200
|
+
placeholder?: string;
|
|
1201
|
+
label?: string;
|
|
1202
|
+
type: string;
|
|
1203
|
+
}
|
|
1204
|
+
interface FormFieldProps {
|
|
1205
|
+
field: any;
|
|
1206
|
+
fieldData: FormFieldData;
|
|
1207
|
+
formState: any;
|
|
1208
|
+
fieldState: ControllerFieldState;
|
|
1209
|
+
}
|
|
1210
|
+
interface FormProps extends FlowComponentProps {
|
|
1211
|
+
/**
|
|
1212
|
+
* Custom field types to be used in the Form.
|
|
1213
|
+
* You can use this to build your own custom form fields in a `Form`.
|
|
1214
|
+
*/
|
|
1215
|
+
fieldTypes?: FieldTypes;
|
|
1216
|
+
}
|
|
1217
|
+
declare function Form({ fieldTypes, ...props }: FormProps): _emotion_react_jsx_runtime.JSX.Element;
|
|
1218
|
+
|
|
1219
|
+
type NavigateHandler = (url: string, target?: string) => void;
|
|
1220
|
+
interface ProviderProps {
|
|
1221
|
+
apiKey: string;
|
|
1222
|
+
apiUrl?: string;
|
|
1223
|
+
children?: React.ReactNode;
|
|
1224
|
+
navigate?: NavigateHandler;
|
|
1225
|
+
theme?: Theme;
|
|
1226
|
+
userId?: string;
|
|
1227
|
+
groupId?: string;
|
|
1228
|
+
/**
|
|
1229
|
+
* @ignore Internal use only.
|
|
1230
|
+
* If enabled, Frigade will not send any data to the API. A user's state will be reset on page refresh.
|
|
1231
|
+
*/
|
|
1232
|
+
__readOnly?: boolean;
|
|
1233
|
+
/**
|
|
1234
|
+
* @ignore Internal use only.
|
|
1235
|
+
* Map of Flow ID to Flow Config for all flows in the app.
|
|
1236
|
+
* Configs will have to be provided in serialized JSON format rather than YAML.
|
|
1237
|
+
*/
|
|
1238
|
+
__flowConfigOverrides?: Record<string, string>;
|
|
1239
|
+
}
|
|
1240
|
+
declare function Provider({ children, navigate, theme, ...props }: ProviderProps): _emotion_react_jsx_runtime.JSX.Element;
|
|
1241
|
+
|
|
1242
|
+
interface MergedRadixPopoverProps extends Pick<Popover.PopoverProps, 'defaultOpen' | 'modal' | 'onOpenChange' | 'open'>, Omit<Popover.PopoverContentProps, 'align' | 'asChild'> {
|
|
1243
|
+
}
|
|
1244
|
+
interface TooltipProps {
|
|
1245
|
+
/**
|
|
1246
|
+
* How to align the Tooltip relative to the anchor.
|
|
1247
|
+
* Uses the same notation as the `align` property in [Radix Popover](https://www.radix-ui.com/primitives/docs/components/popover).
|
|
1248
|
+
*/
|
|
1249
|
+
align?: Popover.PopoverContentProps['align'] | 'before' | 'after';
|
|
1250
|
+
/**
|
|
1251
|
+
* @ignore
|
|
1252
|
+
*/
|
|
1253
|
+
anchor?: string;
|
|
1254
|
+
/**
|
|
1255
|
+
* Whether to show a spotlight behind the anchor. This will darken the rest of the page and highlight the anchor.
|
|
1256
|
+
*/
|
|
1257
|
+
spotlight?: boolean;
|
|
1258
|
+
style?: React__default.CSSProperties;
|
|
1259
|
+
}
|
|
1260
|
+
declare function Tooltip({ anchor, children, className, spotlight, style, ...props }: TooltipProps & MergedRadixPopoverProps): _emotion_react_jsx_runtime.JSX.Element;
|
|
1261
|
+
declare namespace Tooltip {
|
|
1262
|
+
var Close: (props: ButtonProps) => _emotion_react_jsx_runtime.JSX.Element;
|
|
1263
|
+
var Media: ({ src, ...props }: MediaProps) => _emotion_react_jsx_runtime.JSX.Element;
|
|
1264
|
+
var Primary: ({ onClick, title, ...props }: ButtonProps) => _emotion_react_jsx_runtime.JSX.Element;
|
|
1265
|
+
var Progress: ({ children, ...props }: TextProps) => _emotion_react_jsx_runtime.JSX.Element;
|
|
1266
|
+
var Secondary: ({ onClick, title, ...props }: ButtonProps) => _emotion_react_jsx_runtime.JSX.Element;
|
|
1267
|
+
var Subtitle: ({ children, ...props }: TextProps) => _emotion_react_jsx_runtime.JSX.Element;
|
|
1268
|
+
var Title: ({ children, ...props }: TextProps) => _emotion_react_jsx_runtime.JSX.Element;
|
|
1269
|
+
}
|
|
1270
|
+
|
|
1271
|
+
interface TourProps extends TooltipProps, FlowComponentProps {
|
|
1272
|
+
}
|
|
1273
|
+
declare function Tour({ flowId, onComplete, variables, ...props }: TourProps): _emotion_react_jsx_runtime.JSX.Element;
|
|
1274
|
+
|
|
1275
|
+
declare function useBoundingClientRect(): {
|
|
1276
|
+
node: any;
|
|
1277
|
+
rect: DOMRect;
|
|
1278
|
+
ref: (node: Element) => void;
|
|
1279
|
+
};
|
|
1280
|
+
|
|
1281
|
+
interface FlowConfig {
|
|
1282
|
+
variables?: Record<string, unknown>;
|
|
1283
|
+
}
|
|
1284
|
+
declare function useFlow(flowId: string, config?: FlowConfig): {
|
|
1285
|
+
flow: Flow;
|
|
1286
|
+
};
|
|
1287
|
+
|
|
1288
|
+
declare function useModal(flow: Flow): {
|
|
1289
|
+
isCurrentModal: boolean;
|
|
1290
|
+
removeModal: () => void;
|
|
1291
|
+
};
|
|
1292
|
+
|
|
1293
|
+
declare function useFrigade(): {
|
|
1294
|
+
frigade: _frigade_js.Frigade;
|
|
1295
|
+
isLoading: boolean;
|
|
1296
|
+
};
|
|
1297
|
+
|
|
1298
|
+
declare function useUser(): {
|
|
1299
|
+
userId: string;
|
|
1300
|
+
addProperties: (properties: Record<string, unknown>) => Promise<void>;
|
|
1301
|
+
track: (eventName: string, properties?: Record<string, unknown>) => Promise<void>;
|
|
1302
|
+
};
|
|
1303
|
+
|
|
1304
|
+
declare function useGroup(): {
|
|
1305
|
+
groupId: string;
|
|
1306
|
+
addProperties: (properties: Record<string, unknown>) => Promise<void>;
|
|
1307
|
+
track: (eventName: string, properties?: Record<string, unknown>) => Promise<void>;
|
|
1308
|
+
};
|
|
292
1309
|
|
|
293
|
-
export { Box, BoxProps, Button, ButtonProps, Flex, Provider, ProviderProps, Text, TextProps, Tooltip, TooltipProps, Tour, TourProps };
|
|
1310
|
+
export { Announcement, AnnouncementProps, Banner, Box, BoxProps, Button, ButtonProps, Card, Flex, FlowConfig, Form, Provider, ProviderProps, Text, TextProps, Tooltip, TooltipProps, Tour, TourProps, useBoundingClientRect, useFlow, useFlowHandlers, useFrigade, useGroup, useModal, useStepHandlers, useUser };
|