@razorpay/blade 8.2.2 → 8.3.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.
@@ -0,0 +1,4824 @@
1
+ /// <reference types="react" />
2
+ import * as React$1 from 'react';
3
+ import React__default, { ReactChild, ReactElement, ReactNode, SyntheticEvent, KeyboardEvent } from 'react';
4
+ import * as react_native from 'react-native';
5
+ import { AccessibilityRole, ViewStyle, ImageSourcePropType, View, GestureResponderEvent } from 'react-native';
6
+ import { CSSObject } from 'styled-components';
7
+ import { ReactDOMAttributes } from '@use-gesture/react/dist/declarations/src/types';
8
+
9
+ type BorderRadius = Readonly<{
10
+ /** none: 0(px/rem/pt) */
11
+ none: 0;
12
+ /** small: 2(px/rem/pt) */
13
+ small: 2;
14
+ /** medium: 4(px/rem/pt) */
15
+ medium: 4;
16
+ /** large: 8(px/rem/pt) */
17
+ large: 8;
18
+ /** max: 9999(px/rem/pt). This will round the left and right side of the box element */
19
+ max: 9999;
20
+ /** round: 50%(pt). This will turn the box element into a circle */
21
+ round: '50%';
22
+ }>;
23
+
24
+ type BorderWidth = Readonly<{
25
+ /** none: 0(px/rem/pt) */
26
+ none: 0;
27
+ /** thin: 1(px/rem/pt) */
28
+ thin: 1;
29
+ /** thick: 1.5(px/rem/pt) */
30
+ thick: 1.5;
31
+ }>;
32
+
33
+ type Border = Readonly<{
34
+ radius: BorderRadius;
35
+ width: BorderWidth;
36
+ }>;
37
+
38
+ type Breakpoints = Readonly<{
39
+ /**
40
+ * `base` is used for responsive styling following a **mobile first** approach. It starts from 0px till the next existing token
41
+ *
42
+ * Think of this as styles without any media query.
43
+ *
44
+ * ### Example
45
+ *
46
+ * This code will set margin as `spacing.2` on "m" size screens and above. And as `spacing.1` on less than "m" size screens
47
+ * ```jsx
48
+ * <Box margin={{ base: 'spacing.1', m: 'spacing.2' }} />
49
+ * ```
50
+ *
51
+ * This roughly translates into -
52
+ *
53
+ * ```
54
+ * .Box {
55
+ * margin: 'spacing.1';
56
+ * }
57
+ *
58
+ * @media screen and (min-width: 768px) {
59
+ * .Box {
60
+ * margin: 'spacing.2';
61
+ * }
62
+ * }
63
+ * ```
64
+ */
65
+ base: number;
66
+ /**
67
+ * `@media screen and (min-width: 320px)`
68
+ *
69
+ * Small Mobiles
70
+ */
71
+ xs: number;
72
+ /**
73
+ * `@media screen and (min-width: 480px)`
74
+ *
75
+ * Mobiles and Small Tablets
76
+ */
77
+ s: number;
78
+ /**
79
+ * `@media screen and (min-width: 768px)`
80
+ *
81
+ * Medium and Large Tablets.
82
+ *
83
+ * Dimensions with `m` and above can be treated as desktop in mobile-first approach (with min-width).
84
+ * Hence this breakpoint can be used for desktop styling.
85
+ *
86
+ * E.g. next example will keep flexDirection `row` on mobiles and `column` on large tablets, desktop, and larger screens
87
+ *
88
+ * ```jsx
89
+ * <Box display="flex" flexDirection={{ base: 'row', m: 'column' }} />
90
+ * ```
91
+ *
92
+ */
93
+ m: number;
94
+ /**
95
+ * `@media screen and (min-width: 1024px)`
96
+ *
97
+ * Desktop
98
+ */
99
+ l: number;
100
+ /**
101
+ * `@media screen and (min-width: 1200px)`
102
+ *
103
+ * HD Desktop
104
+ */
105
+ xl: number;
106
+ }>;
107
+
108
+ type FontFamily = {
109
+ /** Used for all type of textual content except code snippets */
110
+ text: string;
111
+ /** Used for code snippets */
112
+ code: string;
113
+ };
114
+
115
+ type FontWeight = {
116
+ regular: 400;
117
+ bold: 700;
118
+ };
119
+
120
+ /**
121
+ * For font size and line-heights we can’t say from xl to 2xl the value will necessary increase.
122
+ * it might decrease or remain same because these are alias tokens and we need aliases for cross platform.
123
+ * so for example xl on mobile can be 32px and on desktop xl can be 34px,
124
+ * similarly 2xl on mobile can be 34px but on desktop doesn’t necessarily mean 2xl will be more than xl(34px) it can be 32 as well since visually they make better hierarchy.
125
+ */
126
+
127
+ type FontSize = {
128
+ /** desktop: 9(px/rem/pt)
129
+ *
130
+ * mobile: 9(px/rem/pt)
131
+ */
132
+ 10: number;
133
+ /** desktop: 10(px/rem/pt)
134
+ *
135
+ * mobile: 10(px/rem/pt)
136
+ */
137
+ 25: number;
138
+ /** desktop: 11(px/rem/pt)
139
+ *
140
+ * mobile: 11(px/rem/pt)
141
+ */
142
+ 50: number;
143
+ /** desktop: 12(px/rem/pt)
144
+ *
145
+ * mobile: 12(px/rem/pt)
146
+ */
147
+ 75: number;
148
+ /** desktop: 14(px/rem/pt)
149
+ *
150
+ * mobile: 14(px/rem/pt)
151
+ */
152
+ 100: number;
153
+ /** desktop: 16(px/rem/pt)
154
+ *
155
+ * mobile: 16(px/rem/pt)
156
+ */
157
+ 200: number;
158
+ /** desktop: 18(px/rem/pt)
159
+ *
160
+ * mobile: 16(px/rem/pt)
161
+ */
162
+ 300: number;
163
+ /** desktop: 20(px/rem/pt)
164
+ *
165
+ * mobile: 18(px/rem/pt)
166
+ */
167
+ 400: number;
168
+ /** desktop: 22(px/rem/pt)
169
+ *
170
+ * mobile: 20(px/rem/pt)
171
+ */
172
+ 500: number;
173
+ /** desktop: 24(px/rem/pt)
174
+ *
175
+ * mobile: 20(px/rem/pt)
176
+ */
177
+ 600: number;
178
+ /** desktop: 28(px/rem/pt)
179
+ *
180
+ * mobile: 24(px/rem/pt)
181
+ */
182
+ 700: number;
183
+ /** desktop: 32(px/rem/pt)
184
+ *
185
+ * mobile: 28(px/rem/pt)
186
+ */
187
+ 800: number;
188
+ /** desktop: 36(px/rem/pt)
189
+ *
190
+ * mobile: 32(px/rem/pt)
191
+ */
192
+ 900: number;
193
+ /** desktop: 40(px/rem/pt)
194
+ *
195
+ * mobile: 32(px/rem/pt)
196
+ */
197
+ 1000: number;
198
+ };
199
+
200
+ type Typography = {
201
+ fonts: {
202
+ family: FontFamily;
203
+ size: FontSize;
204
+ weight: FontWeight;
205
+ };
206
+ lineHeights: {
207
+ /** desktop: 0(px/rem/pt)
208
+ *
209
+ * mobile: 0(px/rem/pt)
210
+ */
211
+ 0: number;
212
+ /** desktop: 14(px/rem/pt)
213
+ *
214
+ * mobile: 14(px/rem/pt)
215
+ */
216
+ 25: number;
217
+ /** desktop: 16(px/rem/pt)
218
+ *
219
+ * mobile: 16(px/rem/pt)
220
+ */
221
+ 50: number;
222
+ /** desktop: 18(px/rem/pt)
223
+ *
224
+ * mobile: 18(px/rem/pt)
225
+ */
226
+ 75: number;
227
+ /** desktop: 20(px/rem/pt)
228
+ *
229
+ * mobile: 20(px/rem/pt)
230
+ */
231
+ 100: number;
232
+ /** desktop: 24(px/rem/pt)
233
+ *
234
+ * mobile: 20(px/rem/pt)
235
+ */
236
+ 200: number;
237
+ /** desktop: 24(px/rem/pt)
238
+ *
239
+ * mobile: 24(px/rem/pt)
240
+ */
241
+ 300: number;
242
+ /** desktop: 28(px/rem/pt)
243
+ *
244
+ * mobile: 24(px/rem/pt)
245
+ */
246
+ 400: number;
247
+ /** desktop: 32(px/rem/pt)
248
+ *
249
+ * mobile: 28(px/rem/pt)
250
+ */
251
+ 500: number;
252
+ /** desktop: 40(px/rem/pt)
253
+ *
254
+ * mobile: 32(px/rem/pt)
255
+ */
256
+ 600: number;
257
+ /** desktop: 40(px/rem/pt)
258
+ *
259
+ * mobile: 40(px/rem/pt)
260
+ */
261
+ 700: number;
262
+ /** desktop: 48(px/rem/pt)
263
+ *
264
+ * mobile: 40(px/rem/pt)
265
+ */
266
+ 800: number;
267
+ };
268
+ // letterSpacings: {};
269
+ };
270
+
271
+ type TypographyPlatforms = 'onDesktop' | 'onMobile';
272
+
273
+ type TypographyWithPlatforms = Record<TypographyPlatforms, Typography>;
274
+
275
+ /**
276
+ * When any of the values are changed here, do change the jsdoc comments in BaseBox/types/spacingTypes.ts as well
277
+ *
278
+ * {@link ../../components/Box/BaseBox/types/spacingTypes.ts}
279
+ */
280
+
281
+ type Spacing = Readonly<{
282
+ /** 0: 0(px/rem/pt) */
283
+ 0: 0;
284
+ /** 1: 2(px/rem/pt) */
285
+ 1: 2;
286
+ /** 2: 4(px/rem/pt) */
287
+ 2: 4;
288
+ /** 3: 8(px/rem/pt) */
289
+ 3: 8;
290
+ /** 4: 12(px/rem/pt) */
291
+ 4: 12;
292
+ /** 5: 16(px/rem/pt) */
293
+ 5: 16;
294
+ /** 6: 20(px/rem/pt) */
295
+ 6: 20;
296
+ /** 7: 24(px/rem/pt) */
297
+ 7: 24;
298
+ /** 8: 32(px/rem/pt) */
299
+ 8: 32;
300
+ /** 9: 40(px/rem/pt) */
301
+ 9: 40;
302
+ /** 10: 48(px/rem/pt) */
303
+ 10: 48;
304
+ /** 11: 56(px/rem/pt) */
305
+ 11: 56;
306
+ }>;
307
+
308
+ type ColorSchemeNames = 'dark' | 'light';
309
+ type ColorSchemeNamesInput = ColorSchemeNames | 'system';
310
+
311
+ type ColorSchemeModes = 'onDark' | 'onLight';
312
+
313
+ type TextTypes = 'muted' | 'normal' | 'placeholder' | 'subdued' | 'subtle';
314
+
315
+ type ColorContrastTypes = 'low' | 'high';
316
+
317
+ type Feedback = 'information' | 'negative' | 'neutral' | 'notice' | 'positive';
318
+
319
+ type ColorContrast = {
320
+ [K in ColorContrastTypes as `${Extract<K, string>}Contrast`]: string;
321
+ };
322
+
323
+ // @TODO: this shall rather be Surface = 'level1' | 'level2' | 'level3' to keep in sync with color tokens
324
+ type SurfaceLevels = 1 | 2 | 3;
325
+
326
+ type ActionStates = {
327
+ default: string;
328
+ hover: string;
329
+ focus: string;
330
+ active: string;
331
+ disabled: string;
332
+ };
333
+
334
+ type LinkActionStates = ActionStates & {
335
+ visited: string;
336
+ };
337
+
338
+ type ActionStatesWithContrast = {
339
+ default: ColorContrast;
340
+ hover: ColorContrast;
341
+ focus: ColorContrast;
342
+ active: ColorContrast;
343
+ disabled: ColorContrast;
344
+ };
345
+
346
+ type ActionVariants = {
347
+ primary: ActionStates;
348
+ secondary: ActionStates;
349
+ tertiary: ActionStates;
350
+ link: LinkActionStates;
351
+ };
352
+
353
+ type ActionVariantsWithContrast = {
354
+ primary: ActionStatesWithContrast;
355
+ secondary: ActionStatesWithContrast;
356
+ tertiary: ActionStatesWithContrast;
357
+ link: ActionStatesWithContrast;
358
+ };
359
+
360
+ // export type ActionProperties = {
361
+ // background: ActionVariants;
362
+ // border: ActionVariants;
363
+ // text: ActionVariants;
364
+ // icon: ActionVariants;
365
+ // };
366
+
367
+ type FeedbackActions = {
368
+ background: Pick<ActionVariantsWithContrast, 'primary'>;
369
+ border: Pick<ActionVariantsWithContrast, 'primary'>;
370
+ text: Pick<ActionVariantsWithContrast, 'link' | 'primary'>;
371
+ icon: Pick<ActionVariantsWithContrast, 'link' | 'primary'>;
372
+ };
373
+
374
+ type Colors = {
375
+ brand: {
376
+ primary: Record<300 | 400 | 500 | 600 | 700 | 800, string>;
377
+ secondary: Record<500, string>;
378
+ gray: Record<200 | 300 | 400 | 500 | 600 | 700 | 'a50' | 'a100', ColorContrast>;
379
+ };
380
+ feedback: {
381
+ background: Record<Feedback, ColorContrast>;
382
+ border: Record<Feedback, ColorContrast>;
383
+ text: Record<Feedback, ColorContrast>;
384
+ icon: Record<Feedback, ColorContrast>;
385
+ positive: {
386
+ action: FeedbackActions;
387
+ };
388
+ negative: {
389
+ action: FeedbackActions;
390
+ };
391
+ information: {
392
+ action: FeedbackActions;
393
+ };
394
+ notice: {
395
+ action: FeedbackActions;
396
+ };
397
+ neutral: {
398
+ action: FeedbackActions;
399
+ };
400
+ };
401
+ surface: {
402
+ background: Record<'level1' | 'level2' | 'level3', ColorContrast>;
403
+ border: Record<'normal' | 'subtle', ColorContrast>;
404
+ text: Record<TextTypes, ColorContrast>;
405
+ action: {
406
+ icon: ActionStatesWithContrast;
407
+ };
408
+ };
409
+ overlay: Record<'background', string>;
410
+ action: {
411
+ background: Omit<ActionVariants, 'link'>;
412
+ border: Omit<ActionVariants, 'link'>;
413
+ text: ActionVariants;
414
+ icon: ActionVariants;
415
+ };
416
+ badge: {
417
+ background: {
418
+ blue: ColorContrast;
419
+ };
420
+ border: {
421
+ blue: ColorContrast;
422
+ };
423
+ text: {
424
+ blue: ColorContrast;
425
+ };
426
+ icon: {
427
+ blue: ColorContrast;
428
+ };
429
+ };
430
+ };
431
+
432
+ type ColorsWithModes = Record<ColorSchemeModes, Colors>;
433
+
434
+ type ThemeTokens = {
435
+ name: 'paymentTheme' | 'bankingTheme' | StringWithAutocomplete; // Can be used to watch over state changes between theme without watching over entire theme object
436
+ border: Border;
437
+ breakpoints: Breakpoints;
438
+ colors: ColorsWithModes;
439
+ motion: Motion;
440
+ elevation: ElevationWithColorModes;
441
+ spacing: Spacing;
442
+ typography: TypographyWithPlatforms;
443
+ };
444
+
445
+ // All the WAI-ARIA 1.1 role attribute values from https://www.w3.org/TR/wai-aria-1.1/#role_definitions
446
+ type AriaRoles =
447
+ | Exclude<AccessibilityRole, 'header' | 'adjustable' | 'image' | 'none' | 'summary'>
448
+ | 'alert'
449
+ | 'alertdialog'
450
+ | 'application'
451
+ | 'article'
452
+ | 'banner'
453
+ | 'button'
454
+ | 'cell'
455
+ | 'checkbox'
456
+ | 'columnheader'
457
+ | 'combobox'
458
+ | 'complementary'
459
+ | 'contentinfo'
460
+ | 'definition'
461
+ | 'dialog'
462
+ | 'directory'
463
+ | 'document'
464
+ | 'feed'
465
+ | 'figure'
466
+ | 'form'
467
+ | 'grid'
468
+ | 'gridcell'
469
+ | 'group'
470
+ | 'heading'
471
+ | 'img'
472
+ | 'link'
473
+ | 'list'
474
+ | 'listbox'
475
+ | 'listitem'
476
+ | 'log'
477
+ | 'main'
478
+ | 'marquee'
479
+ | 'math'
480
+ | 'menu'
481
+ | 'menubar'
482
+ | 'menuitem'
483
+ | 'menuitemcheckbox'
484
+ | 'menuitemradio'
485
+ | 'meter'
486
+ | 'navigation'
487
+ | 'none'
488
+ | 'note'
489
+ | 'option'
490
+ | 'presentation'
491
+ | 'progressbar'
492
+ | 'radio'
493
+ | 'radiogroup'
494
+ | 'region'
495
+ | 'row'
496
+ | 'rowgroup'
497
+ | 'rowheader'
498
+ | 'scrollbar'
499
+ | 'search'
500
+ | 'searchbox'
501
+ | 'separator'
502
+ | 'slider'
503
+ | 'spinbutton'
504
+ | 'status'
505
+ | 'switch'
506
+ | 'tab'
507
+ | 'table'
508
+ | 'tablist'
509
+ | 'tabpanel'
510
+ | 'term'
511
+ | 'textbox'
512
+ | 'timer'
513
+ | 'toolbar'
514
+ | 'tooltip'
515
+ | 'tree'
516
+ | 'treegrid'
517
+ | 'treeitem';
518
+ type AccessibilityProps = AriaAttributes;
519
+
520
+ type AriaAttributes = {
521
+ role: AriaRoles;
522
+ /**
523
+ * Identifies the currently active element when DOM focus is on a composite widget, textbox, group, or application.
524
+ */
525
+ activeDescendant?: string;
526
+ /**
527
+ * Indicates whether assistive technologies will present all, or only parts of, the changed region based on the change notifications defined by the aria-relevant attribute.
528
+ */
529
+ atomic?: boolean;
530
+ /**
531
+ * Indicates whether inputting text could trigger display of one or more predictions of the user's intended value for an input and specifies how predictions would be presented if they are made.
532
+ */
533
+ autoComplete?: 'none' | 'inline' | 'list' | 'both';
534
+ /**
535
+ * Indicates an element is being modified and that assistive technologies MAY want to wait until the modifications are complete before exposing them to the user.
536
+ */
537
+ busy?: boolean;
538
+ /**
539
+ * Indicates the current "checked" state of checkboxes, radio buttons, and other widgets.
540
+ * @see aria-pressed @see aria-selected.
541
+ */
542
+ checked?: boolean | 'mixed';
543
+ /**
544
+ * Defines the total number of columns in a table, grid, or treegrid.
545
+ * @see aria-colindex.
546
+ */
547
+ colCount?: number;
548
+ /**
549
+ * Defines an element's column index or position with respect to the total number of columns within a table, grid, or treegrid.
550
+ * @see aria-colcount @see aria-colspan.
551
+ */
552
+ colIndex?: number;
553
+ /**
554
+ * Defines the number of columns spanned by a cell or gridcell within a table, grid, or treegrid.
555
+ * @see aria-colindex @see aria-rowspan.
556
+ */
557
+ colSpan?: number;
558
+ /**
559
+ * Identifies the element (or elements) whose contents or presence are controlled by the current element.
560
+ * @see aria-owns.
561
+ */
562
+ controls?: string;
563
+ /**
564
+ * Indicates the element that represents the current item within a container or set of related elements.
565
+ */
566
+ current?: boolean | 'page' | 'step' | 'location' | 'date' | 'time';
567
+ /**
568
+ * Identifies the element (or elements) that describes the object.
569
+ * @see aria-labelledby
570
+ */
571
+ describedBy?: string;
572
+ /**
573
+ * Identifies the element that provides a detailed, extended description for the object.
574
+ * @see aria-describedby.
575
+ */
576
+ details?: string;
577
+ /**
578
+ * Indicates that the element is perceivable but disabled, so it is not editable or otherwise operable.
579
+ * @see aria-hidden @see aria-readonly.
580
+ */
581
+ disabled?: boolean;
582
+ /**
583
+ * Indicates what functions can be performed when a dragged object is released on the drop target.
584
+ * @deprecated in ARIA 1.1
585
+ */
586
+ dropEffect?: 'none' | 'copy' | 'execute' | 'link' | 'move' | 'popup';
587
+ /**
588
+ * Identifies the element that provides an error message for the object.
589
+ * @see aria-invalid @see aria-describedby.
590
+ */
591
+ errorMessage?: string;
592
+ /**
593
+ * Indicates whether the element, or another grouping element it controls, is currently expanded or collapsed.
594
+ */
595
+ expanded?: boolean;
596
+ /**
597
+ * Identifies the next element (or elements) in an alternate reading order of content which, at the user's discretion,
598
+ * allows assistive technology to override the general default of reading in document source order.
599
+ */
600
+ flowTo?: string;
601
+ /**
602
+ * Indicates an element's "grabbed" state in a drag-and-drop operation.
603
+ * @deprecated in ARIA 1.1
604
+ */
605
+ grabbed?: boolean;
606
+ /**
607
+ * Indicates the availability and type of interactive popup element, such as menu or dialog, that can be triggered by an element.
608
+ */
609
+ hasPopup?: boolean | 'menu' | 'listbox' | 'tree' | 'grid' | 'dialog';
610
+ /**
611
+ * Indicates whether the element is exposed to an accessibility API.
612
+ * @see aria-disabled.
613
+ */
614
+ hidden?: boolean;
615
+ /**
616
+ * Indicates the entered value does not conform to the format expected by the application.
617
+ * @see aria-errormessage.
618
+ */
619
+ invalid?: boolean | 'grammar' | 'spelling';
620
+ /**
621
+ * Indicates keyboard shortcuts that an author has implemented to activate or give focus to an element.
622
+ */
623
+ keyShortcuts?: string;
624
+ /**
625
+ * Defines a string value that labels the current element.
626
+ * @see aria-labelledby.
627
+ */
628
+ label?: string;
629
+ /**
630
+ * Identifies the element (or elements) that labels the current element.
631
+ * @see aria-describedby.
632
+ */
633
+ labelledBy?: string;
634
+ /**
635
+ * Defines the hierarchical level of an element within a structure.
636
+ */
637
+ level?: number;
638
+ /**
639
+ * Indicates that an element will be updated, and describes the types of updates the user agents, assistive technologies, and user can expect from the live region.
640
+ */
641
+ liveRegion?: 'off' | 'assertive' | 'polite';
642
+ /**
643
+ * Indicates whether an element is modal when displayed.
644
+ */
645
+ modal?: boolean;
646
+ /**
647
+ * Indicates whether a text box accepts multiple lines of input or only a single line.
648
+ */
649
+ multiline?: boolean;
650
+ /**
651
+ * Indicates that the user may select more than one item from the current selectable descendants.
652
+ */
653
+ multiSelectable?: boolean;
654
+ /**
655
+ * Indicates whether the element's orientation is horizontal, vertical, or unknown/ambiguous.
656
+ */
657
+ orientation?: 'horizontal' | 'vertical';
658
+ /**
659
+ * Identifies an element (or elements) in order to define a visual, functional, or contextual parent/child relationship
660
+ * between DOM elements where the DOM hierarchy cannot be used to represent the relationship.
661
+ * @see aria-controls.
662
+ */
663
+ owns?: string;
664
+ /**
665
+ * Defines a short hint (a word or short phrase) intended to aid the user with data entry when the control has no value.
666
+ * A hint could be a sample value or a brief description of the expected format.
667
+ */
668
+ placeholder?: string;
669
+ /**
670
+ * Defines an element's number or position in the current set of listitems or treeitems. Not required if all elements in the set are present in the DOM.
671
+ * @see aria-setsize.
672
+ */
673
+ posInSet?: number;
674
+ /**
675
+ * Indicates the current "pressed" state of toggle buttons.
676
+ * @see aria-checked @see aria-selected.
677
+ */
678
+ pressed?: boolean | 'mixed';
679
+ /**
680
+ * Indicates that the element is not editable, but is otherwise operable.
681
+ * @see aria-disabled.
682
+ */
683
+ readOnly?: boolean;
684
+ /**
685
+ * Indicates what notifications the user agent will trigger when the accessibility tree within a live region is modified.
686
+ * @see aria-atomic.
687
+ */
688
+ relevant?:
689
+ | 'additions'
690
+ | 'additions removals'
691
+ | 'additions text'
692
+ | 'all'
693
+ | 'removals'
694
+ | 'removals additions'
695
+ | 'removals text'
696
+ | 'text'
697
+ | 'text additions'
698
+ | 'text removals';
699
+ /**
700
+ * Indicates that user input is required on the element before a form may be submitted.
701
+ */
702
+ required?: boolean;
703
+ /**
704
+ * Defines a human-readable, author-localized description for the role of an element.
705
+ */
706
+ roleDescription?: string;
707
+ /**
708
+ * Defines the total number of rows in a table, grid, or treegrid.
709
+ * @see aria-rowindex.
710
+ */
711
+ rowCount?: number;
712
+ /**
713
+ * Defines an element's row index or position with respect to the total number of rows within a table, grid, or treegrid.
714
+ * @see aria-rowcount @see aria-rowspan.
715
+ */
716
+ rowIndex?: number;
717
+ /**
718
+ * Defines the number of rows spanned by a cell or gridcell within a table, grid, or treegrid.
719
+ * @see aria-rowindex @see aria-colspan.
720
+ */
721
+ rowSpan?: number;
722
+ /**
723
+ * Indicates the current "selected" state of various widgets.
724
+ * @see aria-checked @see aria-pressed.
725
+ */
726
+ selected?: boolean;
727
+ /**
728
+ * Defines the number of items in the current set of listitems or treeitems. Not required if all elements in the set are present in the DOM.
729
+ * @see aria-posinset.
730
+ */
731
+ setSize?: number;
732
+ /**
733
+ * Indicates if items in a table or grid are sorted in ascending or descending order.
734
+ */
735
+ sort?: 'none' | 'ascending' | 'descending' | 'other';
736
+ /**
737
+ * Defines the maximum allowed value for a range widget.
738
+ */
739
+ valueMax?: number;
740
+ /**
741
+ * Defines the minimum allowed value for a range widget.
742
+ */
743
+ valueMin?: number;
744
+ /**
745
+ * Defines the current value for a range widget.
746
+ * @see aria-valuetext.
747
+ */
748
+ valueNow?: number;
749
+ /**
750
+ * Defines the human readable text alternative of aria-valuenow for a range widget.
751
+ */
752
+ valueText?: string;
753
+ };
754
+
755
+ /* eslint-disable @typescript-eslint/no-explicit-any */
756
+
757
+ /**
758
+ * Brands a type making them act as nominal
759
+ * @see https://medium.com/@KevinBGreene/surviving-the-typescript-ecosystem-branding-and-type-tagging-6cf6e516523d
760
+ */
761
+ type Brand<Type, Name extends string> = Type & { __brand__?: Name };
762
+
763
+ type NativeOrWebBrand = Brand<any, 'native' | 'web'>;
764
+
765
+ /* eslint-disable @typescript-eslint/no-namespace */
766
+
767
+
768
+ declare namespace Platform {
769
+ export type Name = 'native';
770
+ /**
771
+ * Right now, the module resolution is set to resolve `.native` files,
772
+ *
773
+ * Thus Platform.Select<> type will return the `native` type
774
+ */
775
+ export type Select<Options extends { web: unknown; native: unknown }> = Brand<
776
+ Options[Name],
777
+ 'platform-native'
778
+ >;
779
+
780
+ export type CastNative<T extends NativeOrWebBrand | undefined> = Extract<
781
+ T,
782
+ { __brand__?: 'platform-native' | 'platform-all' }
783
+ >;
784
+
785
+ export type CastWeb<T extends NativeOrWebBrand | undefined> = Extract<
786
+ T,
787
+ { __brand__?: 'platform-web' | 'platform-all' }
788
+ >;
789
+ }
790
+
791
+ type Duration = {
792
+ /** `70` milliseconds */
793
+ '2xquick': 70;
794
+ /** `150` milliseconds */
795
+ xquick: 150;
796
+ /** `200` milliseconds */
797
+ quick: 200;
798
+ /** `250` milliseconds */
799
+ moderate: 250;
800
+ /** `300` milliseconds */
801
+ xmoderate: 300;
802
+ /** `400` milliseconds */
803
+ gentle: 400;
804
+ /** `600` milliseconds */
805
+ xgentle: 600;
806
+ /** `900` milliseconds */
807
+ '2xgentle': 900;
808
+ };
809
+
810
+ type Delay = {
811
+ /** `70` milliseconds */
812
+ '2xshort': 70;
813
+ /** `120` milliseconds */
814
+ xshort: 120;
815
+ /** `180` milliseconds */
816
+ short: 180;
817
+ /** `3000` milliseconds */
818
+ long: 3000;
819
+ /** `5000` milliseconds */
820
+ xlong: 5000;
821
+ };
822
+
823
+ type EasingFunctionFactory = { factory: () => (value: number) => number }; // similar to EasingFunctionFactory of `react-native-reanimated`
824
+ type EasingType<Value extends string> = Platform.Select<{
825
+ web: Value;
826
+ native: EasingFunctionFactory;
827
+ }>;
828
+
829
+ type Easing = {
830
+ /** Easings for all standard animations*/
831
+ standard: {
832
+ /** `cubic-bezier(0.5, 0, 0.3, 1.5)`
833
+ *
834
+ * Returns a `string` of `"cubic-bezier(...)"` for web & react-native-reanimated's Easing Function of type `EasingFunctionFactory` for native */
835
+ attentive: EasingType<'cubic-bezier(0.5, 0, 0.3, 1.5)'>;
836
+ /** `cubic-bezier(0.3, 0, 0.2, 1)`
837
+ *
838
+ * Returns a `string` of `"cubic-bezier(...)"` for web & react-native-reanimated's Easing Function of type `EasingFunctionFactory` for native */
839
+ effective: EasingType<'cubic-bezier(0.3, 0, 0.2, 1)'>;
840
+ /** `cubic-bezier(0.5, 0, 0, 1)`
841
+ *
842
+ * Returns a `string` of `"cubic-bezier(...)"` for web & react-native-reanimated's Easing Function of type `EasingFunctionFactory` for native */
843
+ revealing: EasingType<'cubic-bezier(0.5, 0, 0, 1)'>;
844
+ /** `cubic-bezier(1, 0.5, 0, 0.5)`
845
+ *
846
+ * Returns a `string` of `"cubic-bezier(...)"` for web & react-native-reanimated's Easing Function of type `EasingFunctionFactory` for native */
847
+ wary: EasingType<'cubic-bezier(1, 0.5, 0, 0.5)'>;
848
+ };
849
+ /** Easings for all entrance animations*/
850
+ entrance: {
851
+ /** `cubic-bezier(0.5, 0, 0.3, 1.5)`
852
+ *
853
+ * Returns a `string` of `"cubic-bezier(...)"` for web & react-native-reanimated's Easing Function of type `EasingFunctionFactory` for native */
854
+ attentive: EasingType<'cubic-bezier(0.5, 0, 0.3, 1.5)'>;
855
+ /** `cubic-bezier(0, 0, 0.2, 1)`
856
+ *
857
+ * Returns a `string` of `"cubic-bezier(...)"` for web & react-native-reanimated's Easing Function of type `EasingFunctionFactory` for native */
858
+ effective: EasingType<'cubic-bezier(0, 0, 0.2, 1)'>;
859
+ /** `cubic-bezier(0, 0, 0, 1)`
860
+ *
861
+ * Returns a `string` of `"cubic-bezier(...)"` for web & react-native-reanimated's Easing Function of type `EasingFunctionFactory` for native */
862
+ revealing: EasingType<'cubic-bezier(0, 0, 0, 1)'>;
863
+ };
864
+ /** Easings for all exit animations*/
865
+ exit: {
866
+ /** `cubic-bezier(0.7, 0, 0.5, 1)`
867
+ *
868
+ * Returns a `string` of `"cubic-bezier(...)"` for web & react-native-reanimated's Easing Function of type `EasingFunctionFactory` for native */
869
+ attentive: EasingType<'cubic-bezier(0.7, 0, 0.5, 1)'>;
870
+ /** `cubic-bezier(0.17, 0, 1, 1)`
871
+ *
872
+ * Returns a `string` of `"cubic-bezier(...)"` for web & react-native-reanimated's Easing Function of type `EasingFunctionFactory` for native */
873
+ effective: EasingType<'cubic-bezier(0.17, 0, 1, 1)'>;
874
+ /** `cubic-bezier(0.5, 0, 1, 1)`
875
+ *
876
+ * Returns a `string` of `"cubic-bezier(...)"` for web & react-native-reanimated's Easing Function of type `EasingFunctionFactory` for native */
877
+ revealing: EasingType<'cubic-bezier(0.5, 0, 1, 1)'>;
878
+ };
879
+ };
880
+
881
+ type Motion = Readonly<{
882
+ delay: Delay;
883
+ duration: Duration;
884
+ easing: Easing;
885
+ }>;
886
+
887
+ type ElevationLevels = 'none' | 'lowRaised' | 'midRaised' | 'highRaised';
888
+
889
+ type ElevationStyles = Readonly<{
890
+ elevation: number;
891
+ shadowColor: string;
892
+ shadowOpacity: number;
893
+ shadowRadius: number;
894
+ shadowOffset: {
895
+ /**
896
+ * x-axis
897
+ */
898
+ width: number;
899
+ /**
900
+ * y-axis
901
+ */
902
+ height: number;
903
+ };
904
+ }>;
905
+
906
+ type Elevation = Record<
907
+ ElevationLevels,
908
+ Platform.Select<{
909
+ web: string;
910
+ native: ElevationStyles;
911
+ }>
912
+ >;
913
+
914
+ type ElevationWithColorModes = Record<ColorSchemeModes, Elevation>;
915
+
916
+ /**
917
+ * @template TokenType token type generic
918
+ * @description Tokenises objects to dot notation strings, eg: `surface.text.normal.lowContrast`
919
+ */
920
+ type DotNotationColorStringToken<TokenType> = {
921
+ [K in keyof TokenType]: `${Extract<K, number | string>}.${TokenType[K] extends Record<
922
+ string,
923
+ string
924
+ >
925
+ ? Extract<keyof TokenType[K], number | string>
926
+ : DotNotationColorStringToken<TokenType[K]>}`;
927
+ }[keyof TokenType];
928
+
929
+ type DotNotationSpacingStringToken = `spacing.${keyof Spacing}`;
930
+
931
+ /**
932
+ * Use this when you want children to be string.
933
+ *
934
+ * This covers scenarios like
935
+ * ```jsx
936
+ * <Title>Hi</Title>
937
+ * <Title>{dynamicVariable} something</Title>
938
+ * ```
939
+ *
940
+ *
941
+ * ### Usage
942
+ *
943
+ * ```ts
944
+ * import type { StringChildrenType } from '~helpers/types';
945
+ *
946
+ * type MyProps = {
947
+ * children: StringChildrenType;
948
+ * }
949
+ * ```
950
+ */
951
+ type StringChildrenType = React__default.ReactText | React__default.ReactText[];
952
+
953
+ /**
954
+ *
955
+ * When combined with union, this type utility will give you autocomplete of union while still supporting any string value as input
956
+ *
957
+ * ### Usage
958
+ *
959
+ * ```ts
960
+ * type ThemeName = 'paymentTheme' | 'bankingTheme' | StringWithAutocomplete;
961
+ * ```
962
+ *
963
+ * This will show paymentTheme and bankingTheme in autocomplete but also allow any other string as value.
964
+ *
965
+ * More details - https://github.com/razorpay/blade/pull/1031/commits/86b6ee0facf45e7556739efcbfa5396b11b1b3c9#r1121298293
966
+ * Related TS Issue - https://github.com/microsoft/TypeScript/issues/29729
967
+ *
968
+ */
969
+ type StringWithAutocomplete = string & Record<never, never>;
970
+
971
+ type TestID = {
972
+ testID?: string;
973
+ };
974
+
975
+ /**
976
+ * Similar to `Pick` except this returns `never` when value doesn't exist (native `Pick` returns `unknown`).
977
+ *
978
+ * You might have to ts-ignore the non-existing type error while using this. This is done so that you can get jsdoc from actual type.
979
+ *
980
+ * E.g. This will pick from ViewStyle prop if value exists else returns undefined.
981
+ *
982
+ * ```ts
983
+ * // @ts-expect-error: T passed here may not neccessarily exist. We return `never` type when it doesn't
984
+ * native: PickIfExist<ViewStyle, T>;
985
+ * ```
986
+ */
987
+ type PickIfExist$1<T, K extends keyof T> = {
988
+ [P in K]: P extends keyof T ? T[P] : never;
989
+ };
990
+
991
+ /**
992
+ * Picks the types based on the platform (web / native).
993
+ *
994
+ * E.g.
995
+ * ```ts
996
+ * type CSSObject = PickCSSByPlatform<'display'>
997
+ * // On Web --> This will be all possible web display properties like `block`, `flex`, `inline`, and more.
998
+ * // On Native --> This will be just `flex` and `none`
999
+ * ```
1000
+ */
1001
+ type PickCSSByPlatform$1<T extends keyof React__default.CSSProperties | keyof ViewStyle> = Platform.Select<{
1002
+ web: PickIfExist$1<CSSObject, T>;
1003
+ // @ts-expect-error: T passed here may not neccessarily exist. We return `never` type when it doesn't
1004
+ native: PickIfExist$1<ViewStyle, T>;
1005
+ }>;
1006
+
1007
+ declare type ActionListContextProp = Pick<ActionListProps, 'surfaceLevel'>;
1008
+ declare const useActionListContext: () => ActionListContextProp;
1009
+ declare type ActionListProps = {
1010
+ children: React__default.ReactNode[];
1011
+ /**
1012
+ * Decides the backgroundColor of ActionList
1013
+ */
1014
+ surfaceLevel?: Exclude<SurfaceLevels, 1>;
1015
+ } & TestID;
1016
+ declare const ActionList: React__default.MemoExoticComponent<({ children, surfaceLevel, testID }: ActionListProps) => JSX.Element>;
1017
+
1018
+ type Theme$1 = {
1019
+ name: ThemeTokens['name'];
1020
+ border: Border;
1021
+ breakpoints: Breakpoints;
1022
+ colors: Colors;
1023
+ spacing: Spacing;
1024
+ motion: Motion;
1025
+ elevation: Elevation;
1026
+ typography: Typography;
1027
+ };
1028
+
1029
+ /**
1030
+ * Returns the value or the responsive object with that value
1031
+ *
1032
+ * ## Usage
1033
+ *
1034
+ * Example if you pass string argument, return type will be string or responsive object with string value
1035
+ *
1036
+ * `MakeValueResponsive<string>`
1037
+ * ```ts
1038
+ * string |
1039
+ * {
1040
+ * base?: string;
1041
+ * xs?: string;
1042
+ * s?: string;
1043
+ * // ... other breakpoints
1044
+ * }
1045
+ * ```
1046
+ *
1047
+ */
1048
+ // When type is `never`, we just want to return `never` rather than { base: never, ...etc } since that prop is intended to be never used
1049
+ // Explaination of [T] extends [never] -> https://stackoverflow.com/questions/65492464/typescript-never-type-condition
1050
+ type MakeValueResponsive$1<T> = [T] extends [never]
1051
+ ? never
1052
+ :
1053
+ | T
1054
+ | {
1055
+ // Using this instead of Record to maintain the jsdoc from breakpoints.ts
1056
+ [P in keyof Breakpoints]?: T;
1057
+ };
1058
+
1059
+ /**
1060
+ * Turns all the values in object into responsive object.
1061
+ *
1062
+ * ```ts
1063
+ * MakeObjectResponsive<{ hello: string}>
1064
+ *
1065
+ * // Outputs:
1066
+ * {
1067
+ * hello: string | {
1068
+ * base?: string;
1069
+ * xs?: string;
1070
+ * s?: string;
1071
+ * // ... other breakpoints
1072
+ * }
1073
+ * }
1074
+ * ```
1075
+ */
1076
+ type MakeObjectResponsive$1<T> = { [P in keyof T]: MakeValueResponsive$1<T[P]> };
1077
+
1078
+ type ArrayOfMaxLength4$1<T> = readonly [T?, T?, T?, T?];
1079
+ type SpaceUnits$1 = Platform.Select<{
1080
+ web: 'px' | '%' | 'fr' | 'rem' | 'em' | 'vh' | 'vw';
1081
+ native: 'px' | '%';
1082
+ }>;
1083
+ type SpacingValueType$1 = DotNotationSpacingStringToken | `${string}${SpaceUnits$1}` | 'auto';
1084
+
1085
+ type MarginProps$1 = MakeObjectResponsive$1<{
1086
+ /**
1087
+ * ### Margin Shorthand
1088
+ *
1089
+ * #### Usage
1090
+ *
1091
+ * ```jsx
1092
+ * margin="spacing.3"
1093
+ * margin="20px"
1094
+ * margin={["spacing.3", "spacing.1", "spacing.0", "10px"]}
1095
+ * ```
1096
+ *
1097
+ * ---
1098
+ * #### Spacing to Pixel values
1099
+ *
1100
+ * - `spacing.0` - 0px
1101
+ * - `spacing.1` - 2px
1102
+ * - `spacing.2` - 4px
1103
+ * - `spacing.3` - 8px
1104
+ * - `spacing.4` - 12px
1105
+ * - `spacing.5` - 16px
1106
+ * - `spacing.6` - 20px
1107
+ * - `spacing.7` - 24px
1108
+ * - `spacing.8` - 32px
1109
+ * - `spacing.9` - 40px
1110
+ * - `spacing.10` - 48px
1111
+ * - `spacing.11` - 56px
1112
+ *
1113
+ * {@linkcode https://blade.razorpay.com/?path=/story/tokens-spacing--page&globals=measureEnabled:false Spacing Token Ref}
1114
+ *
1115
+ */
1116
+ margin: SpacingValueType$1 | ArrayOfMaxLength4$1<SpacingValueType$1>;
1117
+ /**
1118
+ * ### Margin Horizontal
1119
+ *
1120
+ * #### Usage
1121
+ *
1122
+ * ```jsx
1123
+ * marginX="spacing.3"
1124
+ * marginX="20px"
1125
+ * ```
1126
+ *
1127
+ * ---
1128
+ * #### Spacing to Pixel values
1129
+ *
1130
+ * - `spacing.0` - 0px
1131
+ * - `spacing.1` - 2px
1132
+ * - `spacing.2` - 4px
1133
+ * - `spacing.3` - 8px
1134
+ * - `spacing.4` - 12px
1135
+ * - `spacing.5` - 16px
1136
+ * - `spacing.6` - 20px
1137
+ * - `spacing.7` - 24px
1138
+ * - `spacing.8` - 32px
1139
+ * - `spacing.9` - 40px
1140
+ * - `spacing.10` - 48px
1141
+ * - `spacing.11` - 56px
1142
+ *
1143
+ * {@linkcode https://blade.razorpay.com/?path=/story/tokens-spacing--page&globals=measureEnabled:false Spacing Token Ref}
1144
+ *
1145
+ */
1146
+ marginX: SpacingValueType$1;
1147
+ /**
1148
+ * ### Margin Vertical
1149
+ *
1150
+ * #### Usage
1151
+ *
1152
+ * ```jsx
1153
+ * marginY="spacing.3"
1154
+ * marginY="20px"
1155
+ * ```
1156
+ *
1157
+ * ---
1158
+ * #### Spacing to Pixel values
1159
+ *
1160
+ * - `spacing.0` - 0px
1161
+ * - `spacing.1` - 2px
1162
+ * - `spacing.2` - 4px
1163
+ * - `spacing.3` - 8px
1164
+ * - `spacing.4` - 12px
1165
+ * - `spacing.5` - 16px
1166
+ * - `spacing.6` - 20px
1167
+ * - `spacing.7` - 24px
1168
+ * - `spacing.8` - 32px
1169
+ * - `spacing.9` - 40px
1170
+ * - `spacing.10` - 48px
1171
+ * - `spacing.11` - 56px
1172
+ *
1173
+ * {@linkcode https://blade.razorpay.com/?path=/story/tokens-spacing--page&globals=measureEnabled:false Spacing Token Ref}
1174
+ *
1175
+ */
1176
+ marginY: SpacingValueType$1;
1177
+ /**
1178
+ * ### Margin Top
1179
+ *
1180
+ * #### Usage
1181
+ *
1182
+ * ```jsx
1183
+ * marginTop="spacing.3"
1184
+ * marginTop="20px"
1185
+ * ```
1186
+ *
1187
+ * ---
1188
+ * #### Spacing to Pixel values
1189
+ *
1190
+ * - `spacing.0` - 0px
1191
+ * - `spacing.1` - 2px
1192
+ * - `spacing.2` - 4px
1193
+ * - `spacing.3` - 8px
1194
+ * - `spacing.4` - 12px
1195
+ * - `spacing.5` - 16px
1196
+ * - `spacing.6` - 20px
1197
+ * - `spacing.7` - 24px
1198
+ * - `spacing.8` - 32px
1199
+ * - `spacing.9` - 40px
1200
+ * - `spacing.10` - 48px
1201
+ * - `spacing.11` - 56px
1202
+ *
1203
+ * {@linkcode https://blade.razorpay.com/?path=/story/tokens-spacing--page&globals=measureEnabled:false Spacing Token Ref}
1204
+ */
1205
+ marginTop: SpacingValueType$1;
1206
+ /**
1207
+ * ### Margin Right
1208
+ *
1209
+ * #### Usage
1210
+ *
1211
+ * ```jsx
1212
+ * marginRight="spacing.3"
1213
+ * marginRight="20px"
1214
+ * ```
1215
+ *
1216
+ * ---
1217
+ * #### Spacing to Pixel values
1218
+ *
1219
+ * - `spacing.0` - 0px
1220
+ * - `spacing.1` - 2px
1221
+ * - `spacing.2` - 4px
1222
+ * - `spacing.3` - 8px
1223
+ * - `spacing.4` - 12px
1224
+ * - `spacing.5` - 16px
1225
+ * - `spacing.6` - 20px
1226
+ * - `spacing.7` - 24px
1227
+ * - `spacing.8` - 32px
1228
+ * - `spacing.9` - 40px
1229
+ * - `spacing.10` - 48px
1230
+ * - `spacing.11` - 56px
1231
+ *
1232
+ * {@linkcode https://blade.razorpay.com/?path=/story/tokens-spacing--page&globals=measureEnabled:false Spacing Token Ref}
1233
+ */
1234
+ marginRight: SpacingValueType$1;
1235
+ /**
1236
+ * ### Margin Bottom
1237
+ *
1238
+ * #### Usage
1239
+ *
1240
+ * ```jsx
1241
+ * marginBottom="spacing.3"
1242
+ * marginBottom="20px"
1243
+ * ```
1244
+ *
1245
+ * ---
1246
+ * #### Spacing to Pixel values
1247
+ *
1248
+ * - `spacing.0` - 0px
1249
+ * - `spacing.1` - 2px
1250
+ * - `spacing.2` - 4px
1251
+ * - `spacing.3` - 8px
1252
+ * - `spacing.4` - 12px
1253
+ * - `spacing.5` - 16px
1254
+ * - `spacing.6` - 20px
1255
+ * - `spacing.7` - 24px
1256
+ * - `spacing.8` - 32px
1257
+ * - `spacing.9` - 40px
1258
+ * - `spacing.10` - 48px
1259
+ * - `spacing.11` - 56px
1260
+ *
1261
+ * {@linkcode https://blade.razorpay.com/?path=/story/tokens-spacing--page&globals=measureEnabled:false Spacing Token Ref}
1262
+ */
1263
+ marginBottom: SpacingValueType$1;
1264
+ /**
1265
+ * ### Margin Left
1266
+ *
1267
+ * #### Usage
1268
+ *
1269
+ * ```jsx
1270
+ * marginLeft="spacing.3"
1271
+ * marginLeft="20px"
1272
+ * ```
1273
+ *
1274
+ * ---
1275
+ * #### Spacing to Pixel values
1276
+ *
1277
+ * - `spacing.0` - 0px
1278
+ * - `spacing.1` - 2px
1279
+ * - `spacing.2` - 4px
1280
+ * - `spacing.3` - 8px
1281
+ * - `spacing.4` - 12px
1282
+ * - `spacing.5` - 16px
1283
+ * - `spacing.6` - 20px
1284
+ * - `spacing.7` - 24px
1285
+ * - `spacing.8` - 32px
1286
+ * - `spacing.9` - 40px
1287
+ * - `spacing.10` - 48px
1288
+ * - `spacing.11` - 56px
1289
+ *
1290
+ * {@linkcode https://blade.razorpay.com/?path=/story/tokens-spacing--page&globals=measureEnabled:false Spacing Token Ref}
1291
+ */
1292
+ marginLeft: SpacingValueType$1;
1293
+ }>;
1294
+
1295
+ type FlexboxProps$1 = MakeObjectResponsive$1<
1296
+ {
1297
+ /**
1298
+ * This uses the native gap property which might not work on older browsers.
1299
+ * If you want to support older browsers, you might want to use `margin` instead.
1300
+ *
1301
+ * @see https://caniuse.com/?search=gap
1302
+ */
1303
+ gap: SpacingValueType$1;
1304
+ /**
1305
+ * This uses the native row-gap property which might not work on older browsers.
1306
+ * If you want to support older browsers, you might want to use `margin` instead.
1307
+ *
1308
+ * @see https://caniuse.com/?search=row-gap
1309
+ */
1310
+ rowGap: SpacingValueType$1;
1311
+ /**
1312
+ * This uses the native column-gap property which might not work on older browsers.
1313
+ * If you want to support older browsers, you might want to use `margin` instead.
1314
+ *
1315
+ * @see https://caniuse.com/?search=column-gap
1316
+ */
1317
+ columnGap: SpacingValueType$1;
1318
+ /**
1319
+ * The **`flex`** CSS shorthand property sets how a flex _item_ will grow or shrink to fit the space available in its flex container.
1320
+ *
1321
+ * @see https://developer.mozilla.org/docs/Web/CSS/flex
1322
+ */
1323
+ flex: string | number;
1324
+ } & PickCSSByPlatform$1<
1325
+ | 'flexWrap'
1326
+ | 'flexDirection'
1327
+ | 'flexGrow'
1328
+ | 'flexShrink'
1329
+ | 'flexBasis'
1330
+ | 'alignItems'
1331
+ | 'alignContent'
1332
+ | 'alignSelf'
1333
+ | 'justifyItems'
1334
+ | 'justifyContent'
1335
+ | 'justifySelf'
1336
+ | 'placeSelf'
1337
+ | 'order'
1338
+ >
1339
+ >;
1340
+
1341
+ type PositionProps$1 = MakeObjectResponsive$1<
1342
+ {
1343
+ top: SpacingValueType$1;
1344
+ right: SpacingValueType$1;
1345
+ bottom: SpacingValueType$1;
1346
+ left: SpacingValueType$1;
1347
+ } & PickCSSByPlatform$1<'position' | 'zIndex'>
1348
+ >;
1349
+
1350
+ type GridProps$1 = MakeObjectResponsive$1<
1351
+ PickCSSByPlatform$1<
1352
+ | 'grid'
1353
+ | 'gridColumn'
1354
+ | 'gridRow'
1355
+ | 'gridRowStart'
1356
+ | 'gridRowEnd'
1357
+ | 'gridColumnStart'
1358
+ | 'gridColumnEnd'
1359
+ | 'gridArea'
1360
+ | 'gridAutoFlow'
1361
+ | 'gridAutoRows'
1362
+ | 'gridAutoColumns'
1363
+ | 'gridTemplate'
1364
+ | 'gridTemplateAreas'
1365
+ | 'gridTemplateColumns'
1366
+ | 'gridTemplateRows'
1367
+ >
1368
+ >;
1369
+
1370
+ type StyledPropsBlade = Partial<
1371
+ Omit<
1372
+ MarginProps$1 &
1373
+ Pick<FlexboxProps$1, 'alignSelf' | 'justifySelf' | 'placeSelf' | 'order'> &
1374
+ PositionProps$1 &
1375
+ Pick<
1376
+ GridProps$1,
1377
+ | 'gridColumn'
1378
+ | 'gridRow'
1379
+ | 'gridRowStart'
1380
+ | 'gridRowEnd'
1381
+ | 'gridColumnStart'
1382
+ | 'gridColumnEnd'
1383
+ | 'gridArea'
1384
+ >,
1385
+ '__brand__'
1386
+ >
1387
+ >;
1388
+
1389
+ type FeedbackIconColors$1 = `feedback.icon.${DotNotationColorStringToken<
1390
+ Theme$1['colors']['feedback']['icon']
1391
+ >}`;
1392
+
1393
+ type FeedbackActionIconColors$1 = `feedback.${Feedback}.action.icon.${DotNotationColorStringToken<
1394
+ Theme$1['colors']['feedback'][Feedback]['action']['icon']
1395
+ >}`;
1396
+
1397
+ type ActionIconColors$1 = `action.icon.${DotNotationColorStringToken<
1398
+ Theme$1['colors']['action']['icon']
1399
+ >}`;
1400
+
1401
+ type TextIconColors$1 = `surface.text.${DotNotationColorStringToken<
1402
+ Theme$1['colors']['surface']['text']
1403
+ >}`;
1404
+
1405
+ type SurfaceActionIconColors$1 = `surface.action.icon.${DotNotationColorStringToken<
1406
+ Theme$1['colors']['surface']['action']['icon']
1407
+ >}`;
1408
+
1409
+ type BadgeIconColors$1 = `badge.icon.${DotNotationColorStringToken<
1410
+ Theme$1['colors']['badge']['icon']
1411
+ >}`;
1412
+
1413
+ type IconSize$1 = 'xsmall' | 'small' | 'medium' | 'large' | 'xlarge' | '2xlarge';
1414
+ type IconProps$1 = {
1415
+ /**
1416
+ * Color token (not to be confused with actual hsla value)
1417
+ */
1418
+ color:
1419
+ | ActionIconColors$1
1420
+ | SurfaceActionIconColors$1
1421
+ | FeedbackIconColors$1
1422
+ | FeedbackActionIconColors$1
1423
+ | TextIconColors$1
1424
+ | BadgeIconColors$1
1425
+ | 'currentColor'; // currentColor is useful for letting the SVG inherit color property from its container
1426
+ size: IconSize$1;
1427
+ } & StyledPropsBlade;
1428
+ type IconComponent$1 = React.ComponentType<IconProps$1>;
1429
+
1430
+ declare type ActionListItemProps = {
1431
+ title: string;
1432
+ description?: string;
1433
+ onClick?: (clickProps: {
1434
+ name: string;
1435
+ value?: boolean;
1436
+ }) => void;
1437
+ /**
1438
+ * value that you get from `onChange` event on SelectInput or in form submissions.
1439
+ */
1440
+ value: string;
1441
+ /**
1442
+ * Link to open when item is clicked.
1443
+ */
1444
+ href?: string;
1445
+ /**
1446
+ * HTML target of the link
1447
+ */
1448
+ target?: string;
1449
+ /**
1450
+ * Item that goes on left-side of item.
1451
+ *
1452
+ * Valid elements - `<ActionListItemIcon />`, `<ActionListItemAsset />`
1453
+ *
1454
+ * Will be overriden in multiselect
1455
+ */
1456
+ leading?: React__default.ReactNode;
1457
+ /**
1458
+ * Item that goes on right-side of item.
1459
+ *
1460
+ * Valid elements - `<ActionListItemText />`, `<ActionListItemIcon />`
1461
+ */
1462
+ trailing?: React__default.ReactNode;
1463
+ isDisabled?: boolean;
1464
+ intent?: Extract<Feedback, 'negative'>;
1465
+ /**
1466
+ * Can be used in combination of `onClick` to highlight item as selected in Button Triggers.
1467
+ *
1468
+ * When trigger is SelectInput, Use `value` prop on SelectInput instead to make dropdown controlled.
1469
+ */
1470
+ isSelected?: boolean;
1471
+ /**
1472
+ * Internally passed from ActionList. No need to pass it explicitly
1473
+ *
1474
+ * @private
1475
+ */
1476
+ _index?: number;
1477
+ } & TestID;
1478
+ declare const ActionListSectionDivider: () => JSX.Element;
1479
+ declare type ActionListSectionProps = {
1480
+ title: string;
1481
+ children: React__default.ReactNode[] | React__default.ReactNode;
1482
+ /**
1483
+ * Internally used to hide the divider on final item in React Native.
1484
+ *
1485
+ * Should not be used by consumers (also won't work on web)
1486
+ *
1487
+ * @private
1488
+ */
1489
+ _hideDivider?: boolean;
1490
+ } & TestID;
1491
+ declare const ActionListSection: ({ title, children, testID, _hideDivider, }: ActionListSectionProps) => JSX.Element;
1492
+ declare const ActionListItemIcon: ({ icon }: {
1493
+ icon: IconComponent$1;
1494
+ }) => JSX.Element;
1495
+ declare const ActionListItemText: ({ children, }: {
1496
+ children: StringChildrenType;
1497
+ }) => React__default.ReactElement;
1498
+ declare const ActionListItem: React__default.MemoExoticComponent<(props: ActionListItemProps) => JSX.Element>;
1499
+
1500
+ declare type ActionListHeaderProps = {
1501
+ title: string;
1502
+ /**
1503
+ * Asset to be added on left side of Header.
1504
+ *
1505
+ * Valid children - `ActionListHeaderIcon`
1506
+ */
1507
+ leading?: React__default.ReactNode;
1508
+ } & TestID;
1509
+ declare const ActionListHeader: (props: ActionListHeaderProps) => JSX.Element;
1510
+ declare const ActionListHeaderIcon: ({ icon }: {
1511
+ icon: IconComponent$1;
1512
+ }) => React__default.ReactElement;
1513
+
1514
+ declare type ActionListFooterProps = {
1515
+ title?: string;
1516
+ /**
1517
+ * Asset to be added on left side of Footer.
1518
+ *
1519
+ * Valid children - `ActionListFooterIcon`
1520
+ */
1521
+ leading?: React__default.ReactNode;
1522
+ /**
1523
+ * Elements to be added on right side of Footer.
1524
+ *
1525
+ * Anything can be passed here but maybe don't? Should ideally have Button or Tick Icon Buttons.
1526
+ */
1527
+ trailing?: React__default.ReactNode;
1528
+ } & TestID;
1529
+ declare const ActionListFooter: (props: ActionListFooterProps) => JSX.Element;
1530
+ declare const ActionListFooterIcon: ({ icon }: {
1531
+ icon: IconComponent$1;
1532
+ }) => React__default.ReactElement;
1533
+
1534
+ declare type ActionListItemAssetProps = {
1535
+ /**
1536
+ * Source of the image.
1537
+ *
1538
+ * Can either be a string URI or `require('/local/image')` in React Native
1539
+ */
1540
+ src: string | ImageSourcePropType;
1541
+ /**
1542
+ * Alt tag for the image
1543
+ */
1544
+ alt: string;
1545
+ };
1546
+ declare const ActionListItemAsset: (props: ActionListItemAssetProps) => React.ReactElement;
1547
+
1548
+ declare type PrimaryAction = {
1549
+ text: string;
1550
+ onClick: () => void;
1551
+ };
1552
+ declare type SecondaryActionButton = {
1553
+ text: string;
1554
+ onClick: () => void;
1555
+ };
1556
+ declare type SecondaryActionLinkButton = {
1557
+ text: string;
1558
+ href: string;
1559
+ onClick?: () => void;
1560
+ target?: string;
1561
+ /**
1562
+ * When `target` is set to `_blank` this is automatically set to `noopener noreferrer`
1563
+ */
1564
+ rel?: string;
1565
+ };
1566
+ declare type SecondaryAction = SecondaryActionButton | SecondaryActionLinkButton;
1567
+ declare type AlertProps = {
1568
+ /**
1569
+ * Body content, pass text or JSX. Avoid passing components except `Link` to customize the content.
1570
+ */
1571
+ description: ReactChild;
1572
+ /**
1573
+ * A brief heading
1574
+ */
1575
+ title?: string;
1576
+ /**
1577
+ * Shows a dismiss button
1578
+ *
1579
+ * @default true
1580
+ */
1581
+ isDismissible?: boolean;
1582
+ /**
1583
+ * A callback when the dismiss button is clicked
1584
+ */
1585
+ onDismiss?: () => void;
1586
+ /**
1587
+ * Can be set to `high` for a more prominent look. Not to be confused with a11y contrast.
1588
+ *
1589
+ * @default low
1590
+ */
1591
+ contrast?: ColorContrastTypes;
1592
+ /**
1593
+ * Makes the Alert span the entire container width, instead of the default max width of `584px`.
1594
+ * This also makes the alert borderless, useful for creating full bleed layouts.
1595
+ *
1596
+ * @default false
1597
+ */
1598
+ isFullWidth?: boolean;
1599
+ /**
1600
+ * Sets the color tone
1601
+ *
1602
+ * @default neutral
1603
+ */
1604
+ intent?: Feedback;
1605
+ /**
1606
+ * Renders a primary action button and a secondary action link button
1607
+ */
1608
+ actions?: {
1609
+ /**
1610
+ * Renders a button (should **always** be present if `secondary` action is being used)
1611
+ */
1612
+ primary: PrimaryAction;
1613
+ /**
1614
+ * Renders a Link button
1615
+ */
1616
+ secondary?: SecondaryAction;
1617
+ };
1618
+ } & TestID & StyledPropsBlade;
1619
+ declare const Alert: ({ description, title, isDismissible, onDismiss, contrast, isFullWidth, intent, actions, testID, ...styledProps }: AlertProps) => ReactElement | null;
1620
+
1621
+ declare type BadgeProps = {
1622
+ /**
1623
+ * Sets the label for the badge.
1624
+ *
1625
+ */
1626
+ children: StringChildrenType;
1627
+ /**
1628
+ * Sets the variant of the badge.
1629
+ *
1630
+ * @default 'neutral'
1631
+ */
1632
+ variant?: Feedback | 'blue';
1633
+ /**
1634
+ * Sets the contrast of the badge.
1635
+ *
1636
+ * @default 'low'
1637
+ */
1638
+ contrast?: 'low' | 'high';
1639
+ /**
1640
+ * Sets the size of the badge.
1641
+ *
1642
+ * @default 'medium'
1643
+ */
1644
+ size?: 'small' | 'medium' | 'large';
1645
+ /**
1646
+ * Icon to be displayed in the badge.
1647
+ * Accepts a component of type `IconComponent` from Blade.
1648
+ *
1649
+ */
1650
+ icon?: IconComponent$1;
1651
+ /**
1652
+ * Sets the fontWeight of the label.
1653
+ *
1654
+ * @default 'regular'
1655
+ */
1656
+ fontWeight?: 'regular' | 'bold';
1657
+ } & TestID & StyledPropsBlade;
1658
+ declare const Badge: ({ children, contrast, fontWeight, icon, size, variant, testID, ...styledProps }: BadgeProps) => ReactElement;
1659
+
1660
+ declare type BladeProviderProps = {
1661
+ themeTokens: ThemeTokens;
1662
+ colorScheme?: ColorSchemeNamesInput;
1663
+ children: ReactNode;
1664
+ };
1665
+
1666
+ declare const BladeProvider: ({ themeTokens, colorScheme, children, }: BladeProviderProps) => ReactElement;
1667
+
1668
+ declare type UseColorScheme = {
1669
+ colorScheme: ColorSchemeNames;
1670
+ setColorScheme: (colorScheme: ColorSchemeNamesInput) => void;
1671
+ };
1672
+
1673
+ declare type ThemeContext = UseColorScheme & {
1674
+ theme: Theme;
1675
+ platform: TypographyPlatforms;
1676
+ };
1677
+ declare const ThemeContext: React$1.Context<ThemeContext>;
1678
+ declare const useTheme: () => ThemeContext;
1679
+
1680
+ declare type Theme = {
1681
+ name: ThemeTokens['name'];
1682
+ border: Border;
1683
+ breakpoints: Breakpoints;
1684
+ colors: Colors;
1685
+ spacing: Spacing;
1686
+ motion: Motion;
1687
+ elevation: Elevation;
1688
+ typography: Typography;
1689
+ };
1690
+
1691
+ /**
1692
+ * Returns the value or the responsive object with that value
1693
+ *
1694
+ * ## Usage
1695
+ *
1696
+ * Example if you pass string argument, return type will be string or responsive object with string value
1697
+ *
1698
+ * `MakeValueResponsive<string>`
1699
+ * ```ts
1700
+ * string |
1701
+ * {
1702
+ * base?: string;
1703
+ * xs?: string;
1704
+ * s?: string;
1705
+ * // ... other breakpoints
1706
+ * }
1707
+ * ```
1708
+ *
1709
+ */
1710
+ declare type MakeValueResponsive<T> = [T] extends [never] ? never : T | {
1711
+ [P in keyof Breakpoints]?: T;
1712
+ };
1713
+ /**
1714
+ * Turns all the values in object into responsive object.
1715
+ *
1716
+ * ```ts
1717
+ * MakeObjectResponsive<{ hello: string}>
1718
+ *
1719
+ * // Outputs:
1720
+ * {
1721
+ * hello: string | {
1722
+ * base?: string;
1723
+ * xs?: string;
1724
+ * s?: string;
1725
+ * // ... other breakpoints
1726
+ * }
1727
+ * }
1728
+ * ```
1729
+ */
1730
+ declare type MakeObjectResponsive<T> = {
1731
+ [P in keyof T]: MakeValueResponsive<T[P]>;
1732
+ };
1733
+
1734
+ declare type ArrayOfMaxLength4<T> = readonly [T?, T?, T?, T?];
1735
+ declare type SpaceUnits = Platform.Select<{
1736
+ web: 'px' | '%' | 'fr' | 'rem' | 'em' | 'vh' | 'vw';
1737
+ native: 'px' | '%';
1738
+ }>;
1739
+ declare type SpacingValueType = DotNotationSpacingStringToken | `${string}${SpaceUnits}` | 'auto';
1740
+ /**
1741
+ * @IMPORTANT
1742
+ *
1743
+ * I wish there was better way to re-use jsdoc but I checked and there isn't so we have to explicitly add docs to each prop.
1744
+ *
1745
+ * When you want to change a specific token value, you can select the entire block of spacing value mapping and do find and replace on it
1746
+ *
1747
+ * Checkout example of find and replace query-
1748
+ * {@link https://user-images.githubusercontent.com/30949385/221802507-40c7adbc-484a-47b3-9035-ae1e97080b51.png}
1749
+ *
1750
+ */
1751
+ declare type PaddingProps = MakeObjectResponsive<{
1752
+ /**
1753
+ * ### Padding Shorthand
1754
+ *
1755
+ * #### Usage
1756
+ *
1757
+ * ```jsx
1758
+ * padding="spacing.3"
1759
+ * padding="20px"
1760
+ * padding={["spacing.3", "spacing.1", "spacing.0", "10px"]}
1761
+ * ```
1762
+ *
1763
+ * ---
1764
+ * #### Spacing to Pixel values
1765
+ *
1766
+ * - `spacing.0` - 0px
1767
+ * - `spacing.1` - 2px
1768
+ * - `spacing.2` - 4px
1769
+ * - `spacing.3` - 8px
1770
+ * - `spacing.4` - 12px
1771
+ * - `spacing.5` - 16px
1772
+ * - `spacing.6` - 20px
1773
+ * - `spacing.7` - 24px
1774
+ * - `spacing.8` - 32px
1775
+ * - `spacing.9` - 40px
1776
+ * - `spacing.10` - 48px
1777
+ * - `spacing.11` - 56px
1778
+ *
1779
+ * {@linkcode https://blade.razorpay.com/?path=/story/tokens-spacing--page&globals=measureEnabled:false Spacing Token Ref}
1780
+ *
1781
+ */
1782
+ padding: SpacingValueType | ArrayOfMaxLength4<SpacingValueType>;
1783
+ /**
1784
+ * ### Padding Horizontal
1785
+ *
1786
+ * #### Usage
1787
+ *
1788
+ * ```jsx
1789
+ * paddingX="spacing.3"
1790
+ * paddingX="20px"
1791
+ * ```
1792
+ *
1793
+ * ---
1794
+ * #### Spacing to Pixel values
1795
+ *
1796
+ * - `spacing.0` - 0px
1797
+ * - `spacing.1` - 2px
1798
+ * - `spacing.2` - 4px
1799
+ * - `spacing.3` - 8px
1800
+ * - `spacing.4` - 12px
1801
+ * - `spacing.5` - 16px
1802
+ * - `spacing.6` - 20px
1803
+ * - `spacing.7` - 24px
1804
+ * - `spacing.8` - 32px
1805
+ * - `spacing.9` - 40px
1806
+ * - `spacing.10` - 48px
1807
+ * - `spacing.11` - 56px
1808
+ *
1809
+ * {@linkcode https://blade.razorpay.com/?path=/story/tokens-spacing--page&globals=measureEnabled:false Spacing Token Ref}
1810
+ *
1811
+ */
1812
+ paddingX: SpacingValueType;
1813
+ /**
1814
+ * ### Padding Vertical
1815
+ *
1816
+ * #### Usage
1817
+ *
1818
+ * ```jsx
1819
+ * paddingY="spacing.3"
1820
+ * paddingY="20px"
1821
+ * ```
1822
+ *
1823
+ * ---
1824
+ * #### Spacing to Pixel values
1825
+ *
1826
+ * - `spacing.0` - 0px
1827
+ * - `spacing.1` - 2px
1828
+ * - `spacing.2` - 4px
1829
+ * - `spacing.3` - 8px
1830
+ * - `spacing.4` - 12px
1831
+ * - `spacing.5` - 16px
1832
+ * - `spacing.6` - 20px
1833
+ * - `spacing.7` - 24px
1834
+ * - `spacing.8` - 32px
1835
+ * - `spacing.9` - 40px
1836
+ * - `spacing.10` - 48px
1837
+ * - `spacing.11` - 56px
1838
+ *
1839
+ * {@linkcode https://blade.razorpay.com/?path=/story/tokens-spacing--page&globals=measureEnabled:false Spacing Token Ref}
1840
+ *
1841
+ */
1842
+ paddingY: SpacingValueType;
1843
+ /**
1844
+ * ### Padding Top
1845
+ *
1846
+ * #### Usage
1847
+ *
1848
+ * ```jsx
1849
+ * paddingTop="spacing.3"
1850
+ * paddingTop="20px"
1851
+ * ```
1852
+ *
1853
+ * ---
1854
+ * #### Spacing to Pixel values
1855
+ *
1856
+ * - `spacing.0` - 0px
1857
+ * - `spacing.1` - 2px
1858
+ * - `spacing.2` - 4px
1859
+ * - `spacing.3` - 8px
1860
+ * - `spacing.4` - 12px
1861
+ * - `spacing.5` - 16px
1862
+ * - `spacing.6` - 20px
1863
+ * - `spacing.7` - 24px
1864
+ * - `spacing.8` - 32px
1865
+ * - `spacing.9` - 40px
1866
+ * - `spacing.10` - 48px
1867
+ * - `spacing.11` - 56px
1868
+ *
1869
+ * {@linkcode https://blade.razorpay.com/?path=/story/tokens-spacing--page&globals=measureEnabled:false Spacing Token Ref}
1870
+ */
1871
+ paddingTop: SpacingValueType;
1872
+ /**
1873
+ * ### Padding Right
1874
+ *
1875
+ * #### Usage
1876
+ *
1877
+ * ```jsx
1878
+ * paddingRight="spacing.3"
1879
+ * paddingRight="20px"
1880
+ * ```
1881
+ *
1882
+ * ---
1883
+ * #### Spacing to Pixel values
1884
+ *
1885
+ * - `spacing.0` - 0px
1886
+ * - `spacing.1` - 2px
1887
+ * - `spacing.2` - 4px
1888
+ * - `spacing.3` - 8px
1889
+ * - `spacing.4` - 12px
1890
+ * - `spacing.5` - 16px
1891
+ * - `spacing.6` - 20px
1892
+ * - `spacing.7` - 24px
1893
+ * - `spacing.8` - 32px
1894
+ * - `spacing.9` - 40px
1895
+ * - `spacing.10` - 48px
1896
+ * - `spacing.11` - 56px
1897
+ *
1898
+ * {@linkcode https://blade.razorpay.com/?path=/story/tokens-spacing--page&globals=measureEnabled:false Spacing Token Ref}
1899
+ */
1900
+ paddingRight: SpacingValueType;
1901
+ /**
1902
+ * ### Padding Bottom
1903
+ *
1904
+ * #### Usage
1905
+ *
1906
+ * ```jsx
1907
+ * paddingBottom="spacing.3"
1908
+ * paddingBottom="20px"
1909
+ * ```
1910
+ *
1911
+ * ---
1912
+ * #### Spacing to Pixel values
1913
+ *
1914
+ * - `spacing.0` - 0px
1915
+ * - `spacing.1` - 2px
1916
+ * - `spacing.2` - 4px
1917
+ * - `spacing.3` - 8px
1918
+ * - `spacing.4` - 12px
1919
+ * - `spacing.5` - 16px
1920
+ * - `spacing.6` - 20px
1921
+ * - `spacing.7` - 24px
1922
+ * - `spacing.8` - 32px
1923
+ * - `spacing.9` - 40px
1924
+ * - `spacing.10` - 48px
1925
+ * - `spacing.11` - 56px
1926
+ *
1927
+ * {@linkcode https://blade.razorpay.com/?path=/story/tokens-spacing--page&globals=measureEnabled:false Spacing Token Ref}
1928
+ */
1929
+ paddingBottom: SpacingValueType;
1930
+ /**
1931
+ * ### Padding Left
1932
+ *
1933
+ * #### Usage
1934
+ *
1935
+ * ```jsx
1936
+ * paddingLeft="spacing.3"
1937
+ * paddingLeft="20px"
1938
+ * ```
1939
+ *
1940
+ * ---
1941
+ * #### Spacing to Pixel values
1942
+ *
1943
+ * - `spacing.0` - 0px
1944
+ * - `spacing.1` - 2px
1945
+ * - `spacing.2` - 4px
1946
+ * - `spacing.3` - 8px
1947
+ * - `spacing.4` - 12px
1948
+ * - `spacing.5` - 16px
1949
+ * - `spacing.6` - 20px
1950
+ * - `spacing.7` - 24px
1951
+ * - `spacing.8` - 32px
1952
+ * - `spacing.9` - 40px
1953
+ * - `spacing.10` - 48px
1954
+ * - `spacing.11` - 56px
1955
+ *
1956
+ * {@linkcode https://blade.razorpay.com/?path=/story/tokens-spacing--page&globals=measureEnabled:false Spacing Token Ref}
1957
+ */
1958
+ paddingLeft: SpacingValueType;
1959
+ }>;
1960
+ declare type MarginProps = MakeObjectResponsive<{
1961
+ /**
1962
+ * ### Margin Shorthand
1963
+ *
1964
+ * #### Usage
1965
+ *
1966
+ * ```jsx
1967
+ * margin="spacing.3"
1968
+ * margin="20px"
1969
+ * margin={["spacing.3", "spacing.1", "spacing.0", "10px"]}
1970
+ * ```
1971
+ *
1972
+ * ---
1973
+ * #### Spacing to Pixel values
1974
+ *
1975
+ * - `spacing.0` - 0px
1976
+ * - `spacing.1` - 2px
1977
+ * - `spacing.2` - 4px
1978
+ * - `spacing.3` - 8px
1979
+ * - `spacing.4` - 12px
1980
+ * - `spacing.5` - 16px
1981
+ * - `spacing.6` - 20px
1982
+ * - `spacing.7` - 24px
1983
+ * - `spacing.8` - 32px
1984
+ * - `spacing.9` - 40px
1985
+ * - `spacing.10` - 48px
1986
+ * - `spacing.11` - 56px
1987
+ *
1988
+ * {@linkcode https://blade.razorpay.com/?path=/story/tokens-spacing--page&globals=measureEnabled:false Spacing Token Ref}
1989
+ *
1990
+ */
1991
+ margin: SpacingValueType | ArrayOfMaxLength4<SpacingValueType>;
1992
+ /**
1993
+ * ### Margin Horizontal
1994
+ *
1995
+ * #### Usage
1996
+ *
1997
+ * ```jsx
1998
+ * marginX="spacing.3"
1999
+ * marginX="20px"
2000
+ * ```
2001
+ *
2002
+ * ---
2003
+ * #### Spacing to Pixel values
2004
+ *
2005
+ * - `spacing.0` - 0px
2006
+ * - `spacing.1` - 2px
2007
+ * - `spacing.2` - 4px
2008
+ * - `spacing.3` - 8px
2009
+ * - `spacing.4` - 12px
2010
+ * - `spacing.5` - 16px
2011
+ * - `spacing.6` - 20px
2012
+ * - `spacing.7` - 24px
2013
+ * - `spacing.8` - 32px
2014
+ * - `spacing.9` - 40px
2015
+ * - `spacing.10` - 48px
2016
+ * - `spacing.11` - 56px
2017
+ *
2018
+ * {@linkcode https://blade.razorpay.com/?path=/story/tokens-spacing--page&globals=measureEnabled:false Spacing Token Ref}
2019
+ *
2020
+ */
2021
+ marginX: SpacingValueType;
2022
+ /**
2023
+ * ### Margin Vertical
2024
+ *
2025
+ * #### Usage
2026
+ *
2027
+ * ```jsx
2028
+ * marginY="spacing.3"
2029
+ * marginY="20px"
2030
+ * ```
2031
+ *
2032
+ * ---
2033
+ * #### Spacing to Pixel values
2034
+ *
2035
+ * - `spacing.0` - 0px
2036
+ * - `spacing.1` - 2px
2037
+ * - `spacing.2` - 4px
2038
+ * - `spacing.3` - 8px
2039
+ * - `spacing.4` - 12px
2040
+ * - `spacing.5` - 16px
2041
+ * - `spacing.6` - 20px
2042
+ * - `spacing.7` - 24px
2043
+ * - `spacing.8` - 32px
2044
+ * - `spacing.9` - 40px
2045
+ * - `spacing.10` - 48px
2046
+ * - `spacing.11` - 56px
2047
+ *
2048
+ * {@linkcode https://blade.razorpay.com/?path=/story/tokens-spacing--page&globals=measureEnabled:false Spacing Token Ref}
2049
+ *
2050
+ */
2051
+ marginY: SpacingValueType;
2052
+ /**
2053
+ * ### Margin Top
2054
+ *
2055
+ * #### Usage
2056
+ *
2057
+ * ```jsx
2058
+ * marginTop="spacing.3"
2059
+ * marginTop="20px"
2060
+ * ```
2061
+ *
2062
+ * ---
2063
+ * #### Spacing to Pixel values
2064
+ *
2065
+ * - `spacing.0` - 0px
2066
+ * - `spacing.1` - 2px
2067
+ * - `spacing.2` - 4px
2068
+ * - `spacing.3` - 8px
2069
+ * - `spacing.4` - 12px
2070
+ * - `spacing.5` - 16px
2071
+ * - `spacing.6` - 20px
2072
+ * - `spacing.7` - 24px
2073
+ * - `spacing.8` - 32px
2074
+ * - `spacing.9` - 40px
2075
+ * - `spacing.10` - 48px
2076
+ * - `spacing.11` - 56px
2077
+ *
2078
+ * {@linkcode https://blade.razorpay.com/?path=/story/tokens-spacing--page&globals=measureEnabled:false Spacing Token Ref}
2079
+ */
2080
+ marginTop: SpacingValueType;
2081
+ /**
2082
+ * ### Margin Right
2083
+ *
2084
+ * #### Usage
2085
+ *
2086
+ * ```jsx
2087
+ * marginRight="spacing.3"
2088
+ * marginRight="20px"
2089
+ * ```
2090
+ *
2091
+ * ---
2092
+ * #### Spacing to Pixel values
2093
+ *
2094
+ * - `spacing.0` - 0px
2095
+ * - `spacing.1` - 2px
2096
+ * - `spacing.2` - 4px
2097
+ * - `spacing.3` - 8px
2098
+ * - `spacing.4` - 12px
2099
+ * - `spacing.5` - 16px
2100
+ * - `spacing.6` - 20px
2101
+ * - `spacing.7` - 24px
2102
+ * - `spacing.8` - 32px
2103
+ * - `spacing.9` - 40px
2104
+ * - `spacing.10` - 48px
2105
+ * - `spacing.11` - 56px
2106
+ *
2107
+ * {@linkcode https://blade.razorpay.com/?path=/story/tokens-spacing--page&globals=measureEnabled:false Spacing Token Ref}
2108
+ */
2109
+ marginRight: SpacingValueType;
2110
+ /**
2111
+ * ### Margin Bottom
2112
+ *
2113
+ * #### Usage
2114
+ *
2115
+ * ```jsx
2116
+ * marginBottom="spacing.3"
2117
+ * marginBottom="20px"
2118
+ * ```
2119
+ *
2120
+ * ---
2121
+ * #### Spacing to Pixel values
2122
+ *
2123
+ * - `spacing.0` - 0px
2124
+ * - `spacing.1` - 2px
2125
+ * - `spacing.2` - 4px
2126
+ * - `spacing.3` - 8px
2127
+ * - `spacing.4` - 12px
2128
+ * - `spacing.5` - 16px
2129
+ * - `spacing.6` - 20px
2130
+ * - `spacing.7` - 24px
2131
+ * - `spacing.8` - 32px
2132
+ * - `spacing.9` - 40px
2133
+ * - `spacing.10` - 48px
2134
+ * - `spacing.11` - 56px
2135
+ *
2136
+ * {@linkcode https://blade.razorpay.com/?path=/story/tokens-spacing--page&globals=measureEnabled:false Spacing Token Ref}
2137
+ */
2138
+ marginBottom: SpacingValueType;
2139
+ /**
2140
+ * ### Margin Left
2141
+ *
2142
+ * #### Usage
2143
+ *
2144
+ * ```jsx
2145
+ * marginLeft="spacing.3"
2146
+ * marginLeft="20px"
2147
+ * ```
2148
+ *
2149
+ * ---
2150
+ * #### Spacing to Pixel values
2151
+ *
2152
+ * - `spacing.0` - 0px
2153
+ * - `spacing.1` - 2px
2154
+ * - `spacing.2` - 4px
2155
+ * - `spacing.3` - 8px
2156
+ * - `spacing.4` - 12px
2157
+ * - `spacing.5` - 16px
2158
+ * - `spacing.6` - 20px
2159
+ * - `spacing.7` - 24px
2160
+ * - `spacing.8` - 32px
2161
+ * - `spacing.9` - 40px
2162
+ * - `spacing.10` - 48px
2163
+ * - `spacing.11` - 56px
2164
+ *
2165
+ * {@linkcode https://blade.razorpay.com/?path=/story/tokens-spacing--page&globals=measureEnabled:false Spacing Token Ref}
2166
+ */
2167
+ marginLeft: SpacingValueType;
2168
+ }>;
2169
+
2170
+ declare type LayoutProps = MakeObjectResponsive<{
2171
+ height: SpacingValueType;
2172
+ minHeight: SpacingValueType;
2173
+ maxHeight: SpacingValueType;
2174
+ width: SpacingValueType;
2175
+ minWidth: SpacingValueType;
2176
+ maxWidth: SpacingValueType;
2177
+ } & PickCSSByPlatform$1<'display' | 'overflow' | 'overflowX' | 'overflowY'>>;
2178
+ declare type FlexboxProps = MakeObjectResponsive<{
2179
+ /**
2180
+ * This uses the native gap property which might not work on older browsers.
2181
+ * If you want to support older browsers, you might want to use `margin` instead.
2182
+ *
2183
+ * @see https://caniuse.com/?search=gap
2184
+ */
2185
+ gap: SpacingValueType;
2186
+ /**
2187
+ * This uses the native row-gap property which might not work on older browsers.
2188
+ * If you want to support older browsers, you might want to use `margin` instead.
2189
+ *
2190
+ * @see https://caniuse.com/?search=row-gap
2191
+ */
2192
+ rowGap: SpacingValueType;
2193
+ /**
2194
+ * This uses the native column-gap property which might not work on older browsers.
2195
+ * If you want to support older browsers, you might want to use `margin` instead.
2196
+ *
2197
+ * @see https://caniuse.com/?search=column-gap
2198
+ */
2199
+ columnGap: SpacingValueType;
2200
+ /**
2201
+ * The **`flex`** CSS shorthand property sets how a flex _item_ will grow or shrink to fit the space available in its flex container.
2202
+ *
2203
+ * @see https://developer.mozilla.org/docs/Web/CSS/flex
2204
+ */
2205
+ flex: string | number;
2206
+ } & PickCSSByPlatform$1<'flexWrap' | 'flexDirection' | 'flexGrow' | 'flexShrink' | 'flexBasis' | 'alignItems' | 'alignContent' | 'alignSelf' | 'justifyItems' | 'justifyContent' | 'justifySelf' | 'placeSelf' | 'order'>>;
2207
+ declare type PositionProps = MakeObjectResponsive<{
2208
+ top: SpacingValueType;
2209
+ right: SpacingValueType;
2210
+ bottom: SpacingValueType;
2211
+ left: SpacingValueType;
2212
+ } & PickCSSByPlatform$1<'position' | 'zIndex'>>;
2213
+ declare type GridProps = MakeObjectResponsive<PickCSSByPlatform$1<'grid' | 'gridColumn' | 'gridRow' | 'gridRowStart' | 'gridRowEnd' | 'gridColumnStart' | 'gridColumnEnd' | 'gridArea' | 'gridAutoFlow' | 'gridAutoRows' | 'gridAutoColumns' | 'gridTemplate' | 'gridTemplateAreas' | 'gridTemplateColumns' | 'gridTemplateRows'>>;
2214
+ declare type ColorObjects = 'feedback' | 'surface' | 'action';
2215
+ declare type BackgroundColorString<T extends ColorObjects> = `${T}.background.${DotNotationColorStringToken<Theme$1['colors'][T]['background']>}`;
2216
+ declare type BorderColorString<T extends ColorObjects> = `${T}.border.${DotNotationColorStringToken<Theme$1['colors'][T]['border']>}`;
2217
+ declare const validBoxAsValues: readonly ["div", "section", "footer", "header", "main", "aside", "nav", "span"];
2218
+ declare type BoxAsType = typeof validBoxAsValues[number];
2219
+ declare type BoxVisualProps = MakeObjectResponsive<{
2220
+ backgroundColor: BackgroundColorString<'surface'>;
2221
+ borderWidth: keyof Border['width'];
2222
+ borderColor: BorderColorString<'surface'>;
2223
+ borderTopWidth: keyof Border['width'];
2224
+ borderTopColor: BorderColorString<'surface'>;
2225
+ borderRightWidth: keyof Border['width'];
2226
+ borderRightColor: BorderColorString<'surface'>;
2227
+ borderBottomWidth: keyof Border['width'];
2228
+ borderBottomColor: BorderColorString<'surface'>;
2229
+ borderLeftWidth: keyof Border['width'];
2230
+ borderLeftColor: BorderColorString<'surface'>;
2231
+ borderRadius: keyof Border['radius'];
2232
+ borderTopLeftRadius: keyof Border['radius'];
2233
+ borderTopRightRadius: keyof Border['radius'];
2234
+ borderBottomRightRadius: keyof Border['radius'];
2235
+ borderBottomLeftRadius: keyof Border['radius'];
2236
+ }> & {
2237
+ as: BoxAsType;
2238
+ };
2239
+ declare type BoxProps = Partial<PaddingProps & MarginProps & LayoutProps & FlexboxProps & PositionProps & GridProps & BoxVisualProps & {
2240
+ children?: React.ReactNode | React.ReactNode[];
2241
+ } & TestID>;
2242
+ declare type BoxRefType = Platform.Select<{
2243
+ web: Omit<HTMLElement, 'style'>;
2244
+ native: View;
2245
+ }>;
2246
+
2247
+ declare const Box: React__default.ForwardRefExoticComponent<Partial<MakeObjectResponsive<{
2248
+ padding: SpacingValueType | ArrayOfMaxLength4<SpacingValueType>;
2249
+ paddingX: SpacingValueType;
2250
+ paddingY: SpacingValueType;
2251
+ paddingTop: SpacingValueType;
2252
+ paddingRight: SpacingValueType;
2253
+ paddingBottom: SpacingValueType;
2254
+ paddingLeft: SpacingValueType;
2255
+ }> & MakeObjectResponsive<{
2256
+ margin: SpacingValueType | ArrayOfMaxLength4<SpacingValueType>;
2257
+ marginX: SpacingValueType;
2258
+ marginY: SpacingValueType;
2259
+ marginTop: SpacingValueType;
2260
+ marginRight: SpacingValueType;
2261
+ marginBottom: SpacingValueType;
2262
+ marginLeft: SpacingValueType;
2263
+ }> & MakeObjectResponsive<{
2264
+ height: SpacingValueType;
2265
+ minHeight: SpacingValueType;
2266
+ maxHeight: SpacingValueType;
2267
+ width: SpacingValueType;
2268
+ minWidth: SpacingValueType;
2269
+ maxWidth: SpacingValueType;
2270
+ } & PickIfExist$1<react_native.ViewStyle, "display" | "overflowX" | "overflowY" | "overflow"> & {
2271
+ __brand__?: "platform-native" | undefined;
2272
+ }> & MakeObjectResponsive<{
2273
+ gap: SpacingValueType;
2274
+ rowGap: SpacingValueType;
2275
+ columnGap: SpacingValueType;
2276
+ flex: string | number;
2277
+ } & PickIfExist$1<react_native.ViewStyle, "alignContent" | "alignItems" | "alignSelf" | "flexBasis" | "flexDirection" | "flexGrow" | "flexShrink" | "flexWrap" | "justifyContent" | "justifyItems" | "justifySelf" | "order" | "placeSelf"> & {
2278
+ __brand__?: "platform-native" | undefined;
2279
+ }> & MakeObjectResponsive<{
2280
+ top: SpacingValueType;
2281
+ right: SpacingValueType;
2282
+ bottom: SpacingValueType;
2283
+ left: SpacingValueType;
2284
+ } & PickIfExist$1<react_native.ViewStyle, "position" | "zIndex"> & {
2285
+ __brand__?: "platform-native" | undefined;
2286
+ }> & MakeObjectResponsive<PickCSSByPlatform$1<"grid" | "gridAutoColumns" | "gridAutoFlow" | "gridAutoRows" | "gridColumnEnd" | "gridColumnStart" | "gridRowEnd" | "gridRowStart" | "gridTemplateAreas" | "gridTemplateColumns" | "gridTemplateRows" | "gridArea" | "gridColumn" | "gridRow" | "gridTemplate">> & MakeObjectResponsive<{
2287
+ backgroundColor: "surface.background.level1.lowContrast" | "surface.background.level1.highContrast" | "surface.background.level2.lowContrast" | "surface.background.level2.highContrast" | "surface.background.level3.lowContrast" | "surface.background.level3.highContrast";
2288
+ borderWidth: "none" | "thin" | "thick";
2289
+ borderColor: "surface.border.normal.lowContrast" | "surface.border.normal.highContrast" | "surface.border.subtle.lowContrast" | "surface.border.subtle.highContrast";
2290
+ borderTopWidth: "none" | "thin" | "thick";
2291
+ borderTopColor: "surface.border.normal.lowContrast" | "surface.border.normal.highContrast" | "surface.border.subtle.lowContrast" | "surface.border.subtle.highContrast";
2292
+ borderRightWidth: "none" | "thin" | "thick";
2293
+ borderRightColor: "surface.border.normal.lowContrast" | "surface.border.normal.highContrast" | "surface.border.subtle.lowContrast" | "surface.border.subtle.highContrast";
2294
+ borderBottomWidth: "none" | "thin" | "thick";
2295
+ borderBottomColor: "surface.border.normal.lowContrast" | "surface.border.normal.highContrast" | "surface.border.subtle.lowContrast" | "surface.border.subtle.highContrast";
2296
+ borderLeftWidth: "none" | "thin" | "thick";
2297
+ borderLeftColor: "surface.border.normal.lowContrast" | "surface.border.normal.highContrast" | "surface.border.subtle.lowContrast" | "surface.border.subtle.highContrast";
2298
+ borderRadius: "none" | "small" | "medium" | "large" | "max" | "round";
2299
+ borderTopLeftRadius: "none" | "small" | "medium" | "large" | "max" | "round";
2300
+ borderTopRightRadius: "none" | "small" | "medium" | "large" | "max" | "round";
2301
+ borderBottomRightRadius: "none" | "small" | "medium" | "large" | "max" | "round";
2302
+ borderBottomLeftRadius: "none" | "small" | "medium" | "large" | "max" | "round";
2303
+ }> & {
2304
+ as: "header" | "main" | "aside" | "div" | "footer" | "nav" | "section" | "span";
2305
+ } & {
2306
+ children?: React__default.ReactNode | React__default.ReactNode[];
2307
+ } & TestID> & React__default.RefAttributes<BoxRefType>>;
2308
+
2309
+ declare const ComponentIds: {
2310
+ CardHeader: string;
2311
+ CardHeaderTrailing: string;
2312
+ CardHeaderLeading: string;
2313
+ CardFooter: string;
2314
+ CardFooterTrailing: string;
2315
+ CardFooterLeading: string;
2316
+ CardBody: string;
2317
+ CardHeaderIcon: string;
2318
+ CardHeaderCounter: string;
2319
+ CardHeaderBadge: string;
2320
+ CardHeaderText: string;
2321
+ CardHeaderLink: string;
2322
+ CardHeaderIconButton: string;
2323
+ };
2324
+ declare type CardProps = {
2325
+ /**
2326
+ * Card contents
2327
+ */
2328
+ children: React__default.ReactNode;
2329
+ /**
2330
+ * Sets the background color of the Card according to the surface level tokens
2331
+ *
2332
+ * eg: `theme.colors.surface.background.level1`
2333
+ *
2334
+ * @default `2`
2335
+ *
2336
+ * **Description:**
2337
+ *
2338
+ * - 2: Used in layouts which are on top of the main background
2339
+ * - 3: Used over the cards template or as a text input backgrounds.
2340
+ *
2341
+ * **Links:**
2342
+ * - Docs: https://blade.razorpay.com/?path=/docs/tokens-colors--page#-theme-tokens
2343
+ * - Figma: https://shorturl.at/fsvwK
2344
+ */
2345
+ surfaceLevel?: Exclude<SurfaceLevels, 1>;
2346
+ /**
2347
+ * Sets the elevation for Cards
2348
+ *
2349
+ * eg: `theme.elevation.midRaised`
2350
+ *
2351
+ * @default `theme.elevation.lowRaised`
2352
+ *
2353
+ * **Links:**
2354
+ * - Docs: https://blade.razorpay.com/?path=/docs/tokens-elevation--page
2355
+ */
2356
+ elevation?: keyof Elevation;
2357
+ /**
2358
+ * Sets the padding equally on all sides. Only few `spacing` tokens are allowed deliberately
2359
+ * @default `spacing.7`
2360
+ *
2361
+ * **Links:**
2362
+ * - Docs: https://blade.razorpay.com/?path=/docs/tokens-spacing--page
2363
+ */
2364
+ padding?: Extract<SpacingValueType$1, 'spacing.0' | 'spacing.3' | 'spacing.5' | 'spacing.7'>;
2365
+ } & TestID & StyledPropsBlade;
2366
+ declare const Card: ({ children, surfaceLevel, elevation, testID, padding, ...styledProps }: CardProps) => React__default.ReactElement;
2367
+ declare type CardBodyProps = {
2368
+ children: React__default.ReactNode;
2369
+ } & TestID;
2370
+ declare const CardBody: ({ children, testID }: CardBodyProps) => React__default.ReactElement;
2371
+
2372
+ declare type LinkCommonProps = {
2373
+ variant?: 'anchor' | 'button';
2374
+ icon?: IconComponent$1;
2375
+ iconPosition?: 'left' | 'right';
2376
+ isDisabled?: boolean;
2377
+ onClick?: (event: SyntheticEvent) => void;
2378
+ href?: string;
2379
+ target?: string;
2380
+ accessibilityLabel?: string;
2381
+ /**
2382
+ * Sets the size of the link
2383
+ *
2384
+ * @default medium
2385
+ */
2386
+ size?: 'small' | 'medium' | 'large';
2387
+ } & TestID & StyledPropsBlade & Platform.Select<{
2388
+ native: {
2389
+ /**
2390
+ * Defines how far your touch can start away from the link
2391
+ */
2392
+ hitSlop?: {
2393
+ top?: number;
2394
+ right?: number;
2395
+ bottom?: number;
2396
+ left?: number;
2397
+ } | number;
2398
+ /**
2399
+ * This is a web only prop and has no effect on react-native.
2400
+ */
2401
+ htmlTitle?: undefined;
2402
+ };
2403
+ web: {
2404
+ /**
2405
+ * This is a react-native only prop and has no effect on web.
2406
+ */
2407
+ hitSlop?: undefined;
2408
+ /**
2409
+ * The title of the link which is displayed as a tooltip.
2410
+ */
2411
+ htmlTitle?: string;
2412
+ };
2413
+ }>;
2414
+ declare type LinkWithoutIconProps = LinkCommonProps & {
2415
+ icon?: undefined;
2416
+ children: StringChildrenType;
2417
+ };
2418
+ declare type LinkWithIconProps = LinkCommonProps & {
2419
+ icon: IconComponent$1;
2420
+ children?: StringChildrenType;
2421
+ };
2422
+ declare type LinkPropsWithOrWithoutIcon = LinkWithIconProps | LinkWithoutIconProps;
2423
+ declare type LinkAnchorVariantProps = LinkPropsWithOrWithoutIcon & {
2424
+ variant?: 'anchor';
2425
+ href?: string;
2426
+ target?: string;
2427
+ rel?: string;
2428
+ isDisabled?: undefined;
2429
+ };
2430
+ declare type LinkButtonVariantProps = LinkPropsWithOrWithoutIcon & {
2431
+ variant?: 'button';
2432
+ isDisabled?: boolean;
2433
+ href?: undefined;
2434
+ target?: undefined;
2435
+ rel?: undefined;
2436
+ };
2437
+ declare type LinkProps = LinkAnchorVariantProps | LinkButtonVariantProps;
2438
+ declare const Link: ({ children, icon, iconPosition, isDisabled, onClick, variant, href, target, rel, accessibilityLabel, size, testID, hitSlop, htmlTitle, ...styledProps }: LinkProps) => ReactElement;
2439
+
2440
+ /* eslint-disable @typescript-eslint/no-explicit-any */
2441
+
2442
+
2443
+ type BladeElementRef = Platform.Select<{
2444
+ web: Pick<HTMLElement, 'focus' | 'scrollIntoView'> | Pick<View, 'focus'>;
2445
+ native: React.MutableRefObject<any>;
2446
+ }>;
2447
+
2448
+ declare type ButtonCommonProps = {
2449
+ variant?: 'primary' | 'secondary' | 'tertiary';
2450
+ size?: 'xsmall' | 'small' | 'medium' | 'large';
2451
+ iconPosition?: 'left' | 'right';
2452
+ isDisabled?: boolean;
2453
+ isFullWidth?: boolean;
2454
+ isLoading?: boolean;
2455
+ accessibilityLabel?: string;
2456
+ type?: 'button' | 'reset' | 'submit';
2457
+ onClick?: Platform.Select<{
2458
+ native: (event: GestureResponderEvent) => void;
2459
+ web: (event: React__default.MouseEvent<HTMLButtonElement>) => void;
2460
+ }>;
2461
+ } & TestID & StyledPropsBlade;
2462
+ declare type ButtonWithoutIconProps = ButtonCommonProps & {
2463
+ icon?: undefined;
2464
+ children: StringChildrenType;
2465
+ };
2466
+ declare type ButtonWithIconProps = ButtonCommonProps & {
2467
+ icon: IconComponent$1;
2468
+ children?: StringChildrenType;
2469
+ };
2470
+ declare type ButtonProps = ButtonWithoutIconProps | ButtonWithIconProps;
2471
+ declare const Button: React__default.ForwardRefExoticComponent<ButtonProps & React__default.RefAttributes<BladeElementRef>>;
2472
+
2473
+ type FeedbackColors$1 = `feedback.text.${DotNotationColorStringToken<
2474
+ Theme$1['colors']['feedback']['text']
2475
+ >}`;
2476
+ type FeedbackActionColors$1 = `feedback.${Feedback}.action.text.${DotNotationColorStringToken<
2477
+ Theme$1['colors']['feedback'][Feedback]['action']['text']
2478
+ >}`;
2479
+ type SurfaceColors$1 = `surface.text.${DotNotationColorStringToken<
2480
+ Theme$1['colors']['surface']['text']
2481
+ >}`;
2482
+ type ActionColors$1 = `action.text.${DotNotationColorStringToken<Theme$1['colors']['action']['text']>}`;
2483
+ type BadgeTextColors$1 = `badge.text.${DotNotationColorStringToken<
2484
+ Theme$1['colors']['badge']['text']
2485
+ >}`;
2486
+
2487
+ type BaseTextProps$1 = {
2488
+ id?: string;
2489
+ color?: ActionColors$1 | FeedbackColors$1 | SurfaceColors$1 | FeedbackActionColors$1 | BadgeTextColors$1;
2490
+ fontFamily?: keyof Theme$1['typography']['fonts']['family'];
2491
+ fontSize?: keyof Theme$1['typography']['fonts']['size'];
2492
+ fontWeight?: keyof Theme$1['typography']['fonts']['weight'];
2493
+ fontStyle?: 'italic' | 'normal';
2494
+ textDecorationLine?: 'line-through' | 'none' | 'underline';
2495
+ lineHeight?: keyof Theme$1['typography']['lineHeights'];
2496
+ /**
2497
+ * Web only
2498
+ */
2499
+ as?: 'code' | 'h1' | 'h2' | 'h3' | 'h4' | 'h5' | 'h6' | 'p' | 'span';
2500
+ textAlign?: 'center' | 'justify' | 'left' | 'right';
2501
+ truncateAfterLines?: number;
2502
+ className?: string;
2503
+ style?: React.CSSProperties;
2504
+ children: React.ReactNode;
2505
+ accessibilityProps?: Partial<AccessibilityProps>;
2506
+ /**
2507
+ * React Native only
2508
+ */
2509
+ numberOfLines?: number;
2510
+ componentName?: 'text' | 'title' | 'heading' | 'code';
2511
+ } & TestID &
2512
+ StyledPropsBlade;
2513
+
2514
+ /* eslint-disable @typescript-eslint/no-unnecessary-type-assertion */
2515
+
2516
+
2517
+ type TextCommonProps$1 = {
2518
+ type?: TextTypes;
2519
+ contrast?: ColorContrastTypes;
2520
+ truncateAfterLines?: number;
2521
+ children: React.ReactNode;
2522
+ weight?: keyof Theme$1['typography']['fonts']['weight'];
2523
+ /**
2524
+ * **For Internal use only**: Sets the color of the Text component
2525
+ */
2526
+ color?: BaseTextProps$1['color'];
2527
+ textAlign?: BaseTextProps$1['textAlign'];
2528
+ } & TestID &
2529
+ StyledPropsBlade;
2530
+
2531
+ type TextVariant$1 = 'body' | 'caption';
2532
+
2533
+ type TextBodyVariant$1 = TextCommonProps$1 & {
2534
+ variant?: Extract<TextVariant$1, 'body'>;
2535
+ size?: 'xsmall' | 'small' | 'medium' | 'large';
2536
+ };
2537
+
2538
+ type TextCaptionVariant$1 = TextCommonProps$1 & {
2539
+ variant?: Extract<TextVariant$1, 'caption'>;
2540
+ size?: 'medium';
2541
+ };
2542
+
2543
+ /**
2544
+ * Conditionally changing props based on variant.
2545
+ * Overloads or union gives wrong intellisense.
2546
+ */
2547
+ type TextProps$1<T> = T extends {
2548
+ variant: infer Variant;
2549
+ }
2550
+ ? Variant extends 'caption'
2551
+ ? TextCaptionVariant$1
2552
+ : Variant extends 'body'
2553
+ ? TextBodyVariant$1
2554
+ : T
2555
+ : T;
2556
+
2557
+ type CounterProps$1 = {
2558
+ /**
2559
+ * Sets the value for the counter.
2560
+ */
2561
+ value: number;
2562
+ /**
2563
+ * Sets the max value for the counter.
2564
+ * If value exceedes `max` it will render `value+`
2565
+ */
2566
+ max?: number;
2567
+ /**
2568
+ * Sets the intent of the counter.
2569
+ *
2570
+ * @default 'neutral'
2571
+ */
2572
+ intent?: Feedback;
2573
+ /**
2574
+ * Sets the contrast of the counter.
2575
+ *
2576
+ * @default 'low'
2577
+ */
2578
+ contrast?: 'high' | 'low';
2579
+ /**
2580
+ * Sets the size of the counter.
2581
+ *
2582
+ * @default 'medium'
2583
+ */
2584
+ size?: 'small' | 'medium' | 'large';
2585
+ } & TestID &
2586
+ StyledPropsBlade;
2587
+
2588
+ declare const CardHeaderIcon: ({ icon }: {
2589
+ icon: IconComponent$1;
2590
+ }) => React__default.ReactElement;
2591
+ declare const CardHeaderCounter: (props: CounterProps$1) => React__default.ReactElement;
2592
+ declare const CardHeaderBadge: (props: BadgeProps) => React__default.ReactElement;
2593
+ declare const CardHeaderText: (props: TextProps$1<{
2594
+ variant: TextVariant$1;
2595
+ }>) => React__default.ReactElement;
2596
+ declare const CardHeaderLink: (props: LinkProps) => React__default.ReactElement;
2597
+ declare type CardHeaderIconButtonProps = Omit<ButtonProps, 'variant' | 'size' | 'iconPosition' | 'isFullWidth' | 'children'> & {
2598
+ icon: IconComponent$1;
2599
+ };
2600
+ declare const CardHeaderIconButton: (props: CardHeaderIconButtonProps) => React__default.ReactElement;
2601
+ declare type CardHeaderProps = {
2602
+ children?: React__default.ReactNode;
2603
+ } & TestID;
2604
+ declare const CardHeader: ({ children, testID }: CardHeaderProps) => React__default.ReactElement;
2605
+ declare type CardHeaderLeadingProps = {
2606
+ title: string;
2607
+ subtitle?: string;
2608
+ /**
2609
+ * prefix element of Card
2610
+ *
2611
+ * Accepts: `CardHeaderIcon` component
2612
+ */
2613
+ prefix?: React__default.ReactNode;
2614
+ /**
2615
+ * suffix element of Card
2616
+ *
2617
+ * Accepts: `CardHeaderCounter` component
2618
+ */
2619
+ suffix?: React__default.ReactNode;
2620
+ };
2621
+ declare const CardHeaderLeading: ({ title, subtitle, prefix, suffix, }: CardHeaderLeadingProps) => React__default.ReactElement;
2622
+ declare type CardHeaderTrailingProps = {
2623
+ /**
2624
+ * Renders a visual ornament in card header trailing section
2625
+ *
2626
+ * Accepts: `CardHeaderLink`, `CardHeaderText`, `CardHeaderIconButton`, `CardHeaderBadge`
2627
+ */
2628
+ visual?: React__default.ReactNode;
2629
+ };
2630
+ declare const CardHeaderTrailing: ({ visual }: CardHeaderTrailingProps) => React__default.ReactElement;
2631
+
2632
+ declare type CardFooterAction = Pick<ButtonProps, 'type' | 'accessibilityLabel' | 'isLoading' | 'isDisabled' | 'icon' | 'iconPosition' | 'onClick'> & {
2633
+ text: ButtonProps['children'];
2634
+ };
2635
+ declare type CardFooterProps = {
2636
+ children?: React__default.ReactNode;
2637
+ } & TestID;
2638
+ declare const CardFooter: ({ children, testID }: CardFooterProps) => React__default.ReactElement;
2639
+ declare type CardFooterLeadingProps = {
2640
+ title?: string;
2641
+ subtitle?: string;
2642
+ };
2643
+ declare const CardFooterLeading: ({ title, subtitle }: CardFooterLeadingProps) => React__default.ReactElement;
2644
+ declare type CardFooterTrailingProps = {
2645
+ actions?: {
2646
+ primary?: CardFooterAction;
2647
+ secondary?: CardFooterAction;
2648
+ };
2649
+ };
2650
+ declare const CardFooterTrailing: ({ actions }: CardFooterTrailingProps) => React__default.ReactElement;
2651
+
2652
+ declare type IconButtonProps = {
2653
+ /**
2654
+ * Icon component to be rendered, eg. `CloseIcon`
2655
+ */
2656
+ icon: IconComponent$1;
2657
+ onClick: () => void;
2658
+ /**
2659
+ * Icon size
2660
+ *
2661
+ * @default 'medium'
2662
+ */
2663
+ size?: 'medium' | 'large';
2664
+ /**
2665
+ * Icon contrast
2666
+ *
2667
+ * @default 'low'
2668
+ */
2669
+ contrast?: 'low' | 'high';
2670
+ /**
2671
+ * Sets aria-label to help users know what the action does, eg 'Dismiss alert'
2672
+ */
2673
+ accessibilityLabel: string;
2674
+ };
2675
+ declare const IconButton: React__default.ForwardRefExoticComponent<IconButtonProps & React__default.RefAttributes<BladeElementRef>>;
2676
+
2677
+ declare type CounterProps = {
2678
+ /**
2679
+ * Sets the value for the counter.
2680
+ */
2681
+ value: number;
2682
+ /**
2683
+ * Sets the max value for the counter.
2684
+ * If value exceedes `max` it will render `value+`
2685
+ */
2686
+ max?: number;
2687
+ /**
2688
+ * Sets the intent of the counter.
2689
+ *
2690
+ * @default 'neutral'
2691
+ */
2692
+ intent?: Feedback;
2693
+ /**
2694
+ * Sets the contrast of the counter.
2695
+ *
2696
+ * @default 'low'
2697
+ */
2698
+ contrast?: 'high' | 'low';
2699
+ /**
2700
+ * Sets the size of the counter.
2701
+ *
2702
+ * @default 'medium'
2703
+ */
2704
+ size?: 'small' | 'medium' | 'large';
2705
+ } & TestID & StyledPropsBlade;
2706
+ declare const Counter: ({ value, max, intent, contrast, size, testID, ...styledProps }: CounterProps) => React.ReactElement;
2707
+
2708
+ declare type OnChange = ({ isChecked, event, value, }: {
2709
+ isChecked: boolean;
2710
+ event?: React__default.ChangeEvent;
2711
+ value?: string;
2712
+ }) => void;
2713
+ declare type CheckboxProps = {
2714
+ /**
2715
+ * If `true`, The checkbox will be checked. This also makes the checkbox controlled
2716
+ * Use `onChange` to update its value
2717
+ *
2718
+ * @default false
2719
+ */
2720
+ isChecked?: boolean;
2721
+ /**
2722
+ * If `true`, the checkbox will be initially checked. This also makes the checkbox uncontrolled
2723
+ *
2724
+ * @default false
2725
+ */
2726
+ defaultChecked?: boolean;
2727
+ /**
2728
+ * The callback invoked when the checked state of the `Checkbox` changes.
2729
+ */
2730
+ onChange?: OnChange;
2731
+ /**
2732
+ * Sets the label of the checkbox
2733
+ */
2734
+ children: React__default.ReactNode;
2735
+ /**
2736
+ * Help text for the checkbox
2737
+ */
2738
+ helpText?: string;
2739
+ /**
2740
+ * Error text for the checkbox
2741
+ *
2742
+ * Renders when `validationState` is set to 'error'
2743
+ */
2744
+ errorText?: string;
2745
+ /**
2746
+ * If `true`, the checkbox will be indeterminate.
2747
+ * This does not modify the isChecked property.
2748
+ *
2749
+ * @default false
2750
+ */
2751
+ isIndeterminate?: boolean;
2752
+ /**
2753
+ * The name of the input field in a checkbox
2754
+ * (Useful for form submission).
2755
+ */
2756
+ name?: string;
2757
+ /**
2758
+ * The value to be used in the checkbox input.
2759
+ * This is the value that will be returned on form submission.
2760
+ */
2761
+ value?: string;
2762
+ /**
2763
+ * If `true`, the checkbox will be disabled
2764
+ *
2765
+ * @default false
2766
+ */
2767
+ isDisabled?: boolean;
2768
+ /**
2769
+ * If `true`, the checkbox input is marked as required,
2770
+ * and `required` attribute will be added
2771
+ *
2772
+ * @default false
2773
+ */
2774
+ isRequired?: boolean;
2775
+ /**
2776
+ * If `error`, the checkbox input is marked as invalid,
2777
+ * and `invalid` attribute will be added
2778
+ */
2779
+ validationState?: 'error' | 'none';
2780
+ /**
2781
+ * Size of the checkbox
2782
+ *
2783
+ * @default "medium"
2784
+ */
2785
+ size?: 'small' | 'medium';
2786
+ /**
2787
+ * Sets the tab-index property on checkbox element
2788
+ *
2789
+ */
2790
+ tabIndex?: number;
2791
+ } & TestID & StyledPropsBlade;
2792
+ declare const Checkbox: React__default.ForwardRefExoticComponent<{
2793
+ /**
2794
+ * If `true`, The checkbox will be checked. This also makes the checkbox controlled
2795
+ * Use `onChange` to update its value
2796
+ *
2797
+ * @default false
2798
+ */
2799
+ isChecked?: boolean | undefined;
2800
+ /**
2801
+ * If `true`, the checkbox will be initially checked. This also makes the checkbox uncontrolled
2802
+ *
2803
+ * @default false
2804
+ */
2805
+ defaultChecked?: boolean | undefined;
2806
+ /**
2807
+ * The callback invoked when the checked state of the `Checkbox` changes.
2808
+ */
2809
+ onChange?: OnChange | undefined;
2810
+ /**
2811
+ * Sets the label of the checkbox
2812
+ */
2813
+ children: React__default.ReactNode;
2814
+ /**
2815
+ * Help text for the checkbox
2816
+ */
2817
+ helpText?: string | undefined;
2818
+ /**
2819
+ * Error text for the checkbox
2820
+ *
2821
+ * Renders when `validationState` is set to 'error'
2822
+ */
2823
+ errorText?: string | undefined;
2824
+ /**
2825
+ * If `true`, the checkbox will be indeterminate.
2826
+ * This does not modify the isChecked property.
2827
+ *
2828
+ * @default false
2829
+ */
2830
+ isIndeterminate?: boolean | undefined;
2831
+ /**
2832
+ * The name of the input field in a checkbox
2833
+ * (Useful for form submission).
2834
+ */
2835
+ name?: string | undefined;
2836
+ /**
2837
+ * The value to be used in the checkbox input.
2838
+ * This is the value that will be returned on form submission.
2839
+ */
2840
+ value?: string | undefined;
2841
+ /**
2842
+ * If `true`, the checkbox will be disabled
2843
+ *
2844
+ * @default false
2845
+ */
2846
+ isDisabled?: boolean | undefined;
2847
+ /**
2848
+ * If `true`, the checkbox input is marked as required,
2849
+ * and `required` attribute will be added
2850
+ *
2851
+ * @default false
2852
+ */
2853
+ isRequired?: boolean | undefined;
2854
+ /**
2855
+ * If `error`, the checkbox input is marked as invalid,
2856
+ * and `invalid` attribute will be added
2857
+ */
2858
+ validationState?: "none" | "error" | undefined;
2859
+ /**
2860
+ * Size of the checkbox
2861
+ *
2862
+ * @default "medium"
2863
+ */
2864
+ size?: "small" | "medium" | undefined;
2865
+ /**
2866
+ * Sets the tab-index property on checkbox element
2867
+ *
2868
+ */
2869
+ tabIndex?: number | undefined;
2870
+ } & TestID & Partial<Omit<MakeObjectResponsive<{
2871
+ margin: SpacingValueType | ArrayOfMaxLength4<SpacingValueType>;
2872
+ marginX: SpacingValueType;
2873
+ marginY: SpacingValueType;
2874
+ marginTop: SpacingValueType;
2875
+ marginRight: SpacingValueType;
2876
+ marginBottom: SpacingValueType;
2877
+ marginLeft: SpacingValueType;
2878
+ }> & Pick<MakeObjectResponsive<{
2879
+ gap: SpacingValueType;
2880
+ rowGap: SpacingValueType;
2881
+ columnGap: SpacingValueType;
2882
+ flex: string | number;
2883
+ } & PickIfExist$1<react_native.ViewStyle, "alignContent" | "alignItems" | "alignSelf" | "flexBasis" | "flexDirection" | "flexGrow" | "flexShrink" | "flexWrap" | "justifyContent" | "justifyItems" | "justifySelf" | "order" | "placeSelf"> & {
2884
+ __brand__?: "platform-native" | undefined;
2885
+ }>, "alignSelf" | "justifySelf" | "order" | "placeSelf"> & MakeObjectResponsive<{
2886
+ top: SpacingValueType;
2887
+ right: SpacingValueType;
2888
+ bottom: SpacingValueType;
2889
+ left: SpacingValueType;
2890
+ } & PickIfExist$1<react_native.ViewStyle, "position" | "zIndex"> & {
2891
+ __brand__?: "platform-native" | undefined;
2892
+ }> & Pick<MakeObjectResponsive<PickCSSByPlatform$1<"grid" | "gridAutoColumns" | "gridAutoFlow" | "gridAutoRows" | "gridColumnEnd" | "gridColumnStart" | "gridRowEnd" | "gridRowStart" | "gridTemplateAreas" | "gridTemplateColumns" | "gridTemplateRows" | "gridArea" | "gridColumn" | "gridRow" | "gridTemplate">>, "gridColumnEnd" | "gridColumnStart" | "gridRowEnd" | "gridRowStart" | "gridArea" | "gridColumn" | "gridRow">, "__brand__">> & React__default.RefAttributes<BladeElementRef>>;
2893
+
2894
+ declare type CheckboxGroupProps = {
2895
+ /**
2896
+ * Accepts multiple checkboxes as children
2897
+ */
2898
+ children: React__default.ReactNode;
2899
+ /**
2900
+ * Help text of the checkbox group
2901
+ */
2902
+ helpText?: string;
2903
+ /**
2904
+ * Error text of the checkbox group
2905
+ * Renders when `validationState` is set to 'error'
2906
+ *
2907
+ * Overrides helpText
2908
+ */
2909
+ errorText?: string;
2910
+ /**
2911
+ * Sets the error state of the CheckboxGroup
2912
+ * If set to `error` it will render the `errorText` of the group,
2913
+ * and propagate `invalid` prop to every checkbox
2914
+ */
2915
+ validationState?: 'error' | 'none';
2916
+ /**
2917
+ * Renders a necessity indicator after CheckboxGroup label
2918
+ *
2919
+ * If set to `undefined` it renders nothing.
2920
+ */
2921
+ necessityIndicator?: 'required' | 'optional' | 'none';
2922
+ /**
2923
+ * Sets the disabled state of the CheckboxGroup
2924
+ * If set to `true` it propagate down to all the checkboxes
2925
+ *
2926
+ * @default false
2927
+ */
2928
+ isDisabled?: boolean;
2929
+ /**
2930
+ * Renders the label of the checkbox group
2931
+ */
2932
+ label: string;
2933
+ /**
2934
+ * Sets the position of the label
2935
+ *
2936
+ * @default 'top'
2937
+ */
2938
+ labelPosition?: 'top' | 'left';
2939
+ /**
2940
+ * Initial value of the checkbox group
2941
+ */
2942
+ defaultValue?: string[];
2943
+ /**
2944
+ * value of the checkbox group
2945
+ *
2946
+ * Use `onChange` to update its value
2947
+ */
2948
+ value?: string[];
2949
+ /**
2950
+ * The callback invoked when any of the checkbox's state changes
2951
+ */
2952
+ onChange?: ({ name, values }: {
2953
+ name: string;
2954
+ values: string[];
2955
+ }) => void;
2956
+ /**
2957
+ * The name of the input field in a checkbox
2958
+ * (Useful for form submission).
2959
+ */
2960
+ name?: string;
2961
+ /**
2962
+ * Size of the checkbox
2963
+ *
2964
+ * @default "medium"
2965
+ */
2966
+ size?: 'small' | 'medium';
2967
+ } & TestID & StyledPropsBlade;
2968
+ declare const CheckboxGroup: ({ children, label, helpText, isDisabled, necessityIndicator, labelPosition, validationState, errorText, name, defaultValue, onChange, value, size, testID, ...styledProps }: CheckboxGroupProps) => React__default.ReactElement;
2969
+
2970
+ declare type DropdownProps = {
2971
+ selectionType?: 'single' | 'multiple';
2972
+ onDismiss?: () => void;
2973
+ children: React__default.ReactNode[];
2974
+ } & StyledPropsBlade;
2975
+ declare const Dropdown: ({ children, selectionType, onDismiss, ...styledProps }: DropdownProps) => JSX.Element;
2976
+
2977
+ declare type DropdownOverlayProps = {
2978
+ children: React__default.ReactNode;
2979
+ } & TestID;
2980
+
2981
+ declare const DropdownOverlay: ({ children, testID }: DropdownOverlayProps) => JSX.Element;
2982
+
2983
+ declare type BaseButtonCommonProps = {
2984
+ size?: 'xsmall' | 'small' | 'medium' | 'large';
2985
+ iconPosition?: 'left' | 'right';
2986
+ isDisabled?: boolean;
2987
+ isFullWidth?: boolean;
2988
+ onBlur?: Platform.Select<{
2989
+ native: (event: GestureResponderEvent) => void;
2990
+ web: (event: React__default.FocusEvent<HTMLButtonElement>) => void;
2991
+ }>;
2992
+ onKeyDown?: Platform.Select<{
2993
+ native: (event: GestureResponderEvent) => void;
2994
+ web: (event: React__default.KeyboardEvent<HTMLButtonElement>) => void;
2995
+ }>;
2996
+ onClick?: Platform.Select<{
2997
+ native: (event: GestureResponderEvent) => void;
2998
+ web: (event: React__default.MouseEvent<HTMLButtonElement>) => void;
2999
+ }>;
3000
+ type?: 'button' | 'reset' | 'submit';
3001
+ isLoading?: boolean;
3002
+ accessibilityLabel?: string;
3003
+ variant?: 'primary' | 'secondary' | 'tertiary';
3004
+ contrast?: 'low' | 'high';
3005
+ intent?: 'positive' | 'negative' | 'notice' | 'information' | 'neutral';
3006
+ } & TestID & StyledPropsBlade;
3007
+ declare type BaseButtonWithoutIconProps = BaseButtonCommonProps & {
3008
+ icon?: undefined;
3009
+ children: StringChildrenType;
3010
+ };
3011
+ declare type BaseButtonWithIconProps = BaseButtonCommonProps & {
3012
+ icon: IconComponent$1;
3013
+ children?: StringChildrenType;
3014
+ };
3015
+ declare type BaseButtonProps = BaseButtonWithIconProps | BaseButtonWithoutIconProps;
3016
+
3017
+ declare type DropdownButtonProps = ButtonProps & {
3018
+ onBlur?: BaseButtonProps['onBlur'];
3019
+ onKeyDown?: BaseButtonProps['onKeyDown'];
3020
+ };
3021
+ declare const DropdownButton: ({ children, icon, iconPosition, isDisabled, isFullWidth, isLoading, onClick, onBlur, onKeyDown, size, type, variant, accessibilityLabel, testID, ...styledProps }: DropdownButtonProps) => JSX.Element;
3022
+
3023
+ declare const ArrowDownIcon: IconComponent;
3024
+
3025
+ declare const ArrowLeftIcon: IconComponent;
3026
+
3027
+ declare const ArrowRightIcon: IconComponent;
3028
+
3029
+ declare const ArrowUpRightIcon: IconComponent;
3030
+
3031
+ declare const ArrowUpIcon: IconComponent;
3032
+
3033
+ declare const Attachment: ({ size, color, ...styledProps }: IconProps) => ReactElement;
3034
+
3035
+ declare const CheckIcon: ({ size, color, ...styledProps }: IconProps) => ReactElement;
3036
+
3037
+ declare const ChevronDownIcon: IconComponent;
3038
+
3039
+ declare const ChevronLeftIcon: IconComponent;
3040
+
3041
+ declare const ChevronRightIcon: IconComponent;
3042
+
3043
+ declare const ChevronUpIcon: IconComponent;
3044
+
3045
+ declare const CloseIcon: IconComponent;
3046
+
3047
+ declare const CreditCardIcon: IconComponent;
3048
+
3049
+ declare const DollarIcon: IconComponent;
3050
+
3051
+ declare const DownloadIcon: ({ size, color, ...styledProps }: IconProps) => ReactElement;
3052
+
3053
+ declare const EditIcon: ({ size, color, ...styledProps }: IconProps) => ReactElement;
3054
+
3055
+ declare const EyeIcon: IconComponent;
3056
+
3057
+ declare const EyeOffIcon: IconComponent;
3058
+
3059
+ declare const FileTextIcon: IconComponent;
3060
+
3061
+ declare const HistoryIcon: ({ size, color, ...styledProps }: IconProps) => ReactElement;
3062
+
3063
+ declare const HomeIcon: IconComponent;
3064
+
3065
+ declare const InfoIcon: ({ size, color, ...styledProps }: IconProps) => ReactElement;
3066
+
3067
+ declare const LinkIcon: IconComponent;
3068
+
3069
+ declare const LockIcon: IconComponent;
3070
+
3071
+ declare const PauseIcon: ({ size, color, ...styledProps }: IconProps) => ReactElement;
3072
+
3073
+ declare const PlusIcon: ({ size, color, ...styledProps }: IconProps) => ReactElement;
3074
+
3075
+ declare const RupeeIcon: IconComponent;
3076
+
3077
+ declare const SearchIcon: IconComponent;
3078
+
3079
+ declare const SettingsIcon: IconComponent;
3080
+
3081
+ declare const SlashIcon: IconComponent;
3082
+
3083
+ declare const BankIcon: IconComponent;
3084
+
3085
+ declare const TrashIcon: ({ size, color, ...styledProps }: IconProps) => ReactElement;
3086
+
3087
+ declare const AlertTriangleIcon$1: ({ size, color, ...styledProps }: IconProps) => ReactElement;
3088
+
3089
+ declare const AlertTriangleIcon: ({ size, color, ...styledProps }: IconProps) => ReactElement;
3090
+
3091
+ declare const CheckCircleIcon: ({ size, color, ...styledProps }: IconProps) => ReactElement;
3092
+
3093
+ declare const MinusIcon: ({ size, color, ...styledProps }: IconProps) => ReactElement;
3094
+
3095
+ declare const TrendingUpIcon: IconComponent;
3096
+
3097
+ declare const TrendingDownIcon: IconComponent;
3098
+
3099
+ declare const UsersIcon: IconComponent;
3100
+
3101
+ declare const HelpCircleIcon: IconComponent;
3102
+
3103
+ declare const ExternalLinkIcon: IconComponent;
3104
+
3105
+ declare const MailIcon: IconComponent;
3106
+
3107
+ declare const AlertCircleIcon: IconComponent;
3108
+
3109
+ declare const AlertOnlyIcon: IconComponent;
3110
+
3111
+ declare const QRCodeIcon: IconComponent;
3112
+
3113
+ declare const BellIcon: IconComponent;
3114
+
3115
+ declare const BellOffIcon: IconComponent;
3116
+
3117
+ declare const BookmarkIcon: IconComponent;
3118
+
3119
+ declare const CheckSquareIcon: IconComponent;
3120
+
3121
+ declare const ClipboardIcon: IconComponent;
3122
+
3123
+ declare const CommandIcon: IconComponent;
3124
+
3125
+ declare const CopyIcon: IconComponent;
3126
+
3127
+ declare const CropIcon: IconComponent;
3128
+
3129
+ declare const CutIcon: IconComponent;
3130
+
3131
+ declare const DownloadCloudIcon: IconComponent;
3132
+
3133
+ declare const EditInlineIcon: IconComponent;
3134
+
3135
+ declare const EditComposeIcon: IconComponent;
3136
+
3137
+ declare const FileIcon: IconComponent;
3138
+
3139
+ declare const FilePlusIcon: IconComponent;
3140
+
3141
+ declare const FileMinusIcon: IconComponent;
3142
+
3143
+ declare const FilterIcon: IconComponent;
3144
+
3145
+ declare const FlagIcon: IconComponent;
3146
+
3147
+ declare const FolderIcon: IconComponent;
3148
+
3149
+ declare const GlobeIcon: IconComponent;
3150
+
3151
+ declare const HashIcon: IconComponent;
3152
+
3153
+ declare const HeartIcon: IconComponent;
3154
+
3155
+ declare const LogInIcon: IconComponent;
3156
+
3157
+ declare const LogOutIcon: IconComponent;
3158
+
3159
+ declare const MaximizeIcon: IconComponent;
3160
+
3161
+ declare const FullScreenEnterIcon: IconComponent;
3162
+
3163
+ declare const FullScreenExitIcon: IconComponent;
3164
+
3165
+ declare const MenuIcon: IconComponent;
3166
+
3167
+ declare const MicIcon: IconComponent;
3168
+
3169
+ declare const MicOffIcon: IconComponent;
3170
+
3171
+ declare const MinimizeIcon: IconComponent;
3172
+
3173
+ declare const MinusSquareIcon: IconComponent;
3174
+
3175
+ declare const MinusCircleIcon: IconComponent;
3176
+
3177
+ declare const MoreVerticalIcon: IconComponent;
3178
+
3179
+ declare const MoreHorizontalIcon: IconComponent;
3180
+
3181
+ declare const MoveIcon: IconComponent;
3182
+
3183
+ declare const PauseCircleIcon: IconComponent;
3184
+
3185
+ declare const PlayIcon: IconComponent;
3186
+
3187
+ declare const PlayCircleIcon: IconComponent;
3188
+
3189
+ declare const PlusCircleIcon: IconComponent;
3190
+
3191
+ declare const PlusSquareIcon: IconComponent;
3192
+
3193
+ declare const PowerIcon: IconComponent;
3194
+
3195
+ declare const RefreshIcon: IconComponent;
3196
+
3197
+ declare const RepeatIcon: IconComponent;
3198
+
3199
+ declare const RotateClockWiseIcon: IconComponent;
3200
+
3201
+ declare const RotateCounterClockWiseIcon: IconComponent;
3202
+
3203
+ declare const SaveIcon: IconComponent;
3204
+
3205
+ declare const ShareIcon: IconComponent;
3206
+
3207
+ declare const ExportIcon: IconComponent;
3208
+
3209
+ declare const ShoppingCartIcon: IconComponent;
3210
+
3211
+ declare const StopCircleIcon: IconComponent;
3212
+
3213
+ declare const SunIcon: IconComponent;
3214
+
3215
+ declare const ToggleLeftIcon: IconComponent;
3216
+
3217
+ declare const ToggleRightIcon: IconComponent;
3218
+
3219
+ declare const ListIcon: IconComponent;
3220
+
3221
+ declare const StarIcon: IconComponent;
3222
+
3223
+ declare const SlidersIcon: IconComponent;
3224
+
3225
+ declare const PaperclipIcon: IconComponent;
3226
+
3227
+ declare const UploadCloudIcon: IconComponent;
3228
+
3229
+ declare const TargetIcon: IconComponent;
3230
+
3231
+ declare const UnlockIcon: IconComponent;
3232
+
3233
+ declare const ThumbsUpIcon: IconComponent;
3234
+
3235
+ declare const ThumbsDownIcon: IconComponent;
3236
+
3237
+ declare const UploadIcon: IconComponent;
3238
+
3239
+ declare const VideoIcon: IconComponent;
3240
+
3241
+ declare const XSquareIcon: IconComponent;
3242
+
3243
+ declare const XCircleIcon: IconComponent;
3244
+
3245
+ declare const ZapIcon: IconComponent;
3246
+
3247
+ declare const ZoomOutIcon: IconComponent;
3248
+
3249
+ declare const ZoomInIcon: IconComponent;
3250
+
3251
+ declare const AlignJustifyIcon: IconComponent;
3252
+
3253
+ declare const AlignRightIcon: IconComponent;
3254
+
3255
+ declare const AlignLeftIcon: IconComponent;
3256
+
3257
+ declare const AlignCenterIcon: IconComponent;
3258
+
3259
+ declare const AnchorIcon: IconComponent;
3260
+
3261
+ declare const BoldIcon: IconComponent;
3262
+
3263
+ declare const ScissorsIcon: IconComponent;
3264
+
3265
+ declare const DeleteIcon: IconComponent;
3266
+
3267
+ declare const GridIcon: IconComponent;
3268
+
3269
+ declare const ImageIcon: IconComponent;
3270
+
3271
+ declare const InboxIcon: IconComponent;
3272
+
3273
+ declare const ItalicIcon: IconComponent;
3274
+
3275
+ declare const TypeIcon: IconComponent;
3276
+
3277
+ declare const UnderlineIcon: IconComponent;
3278
+
3279
+ declare const FilmIcon: IconComponent;
3280
+
3281
+ declare const AirplayIcon: IconComponent;
3282
+
3283
+ declare const AtSignIcon: IconComponent;
3284
+
3285
+ declare const BluetoothIcon: IconComponent;
3286
+
3287
+ declare const CameraIcon: IconComponent;
3288
+
3289
+ declare const CameraOffIcon: IconComponent;
3290
+
3291
+ declare const CastIcon: IconComponent;
3292
+
3293
+ declare const MessageCircleIcon: IconComponent;
3294
+
3295
+ declare const MessageSquareIcon: IconComponent;
3296
+
3297
+ declare const PhoneCallIcon: IconComponent;
3298
+
3299
+ declare const PhoneIcon: IconComponent;
3300
+
3301
+ declare const PhoneOutgoingIcon: IconComponent;
3302
+
3303
+ declare const PhoneOffIcon: IconComponent;
3304
+
3305
+ declare const PhoneMissedIcon: IconComponent;
3306
+
3307
+ declare const PhoneIncomingIcon: IconComponent;
3308
+
3309
+ declare const PhoneForwardedIcon: IconComponent;
3310
+
3311
+ declare const RadioIcon: IconComponent;
3312
+
3313
+ declare const VideoOffIcon: IconComponent;
3314
+
3315
+ declare const VoicemailIcon: IconComponent;
3316
+
3317
+ declare const WifiIcon: IconComponent;
3318
+
3319
+ declare const WifiOffIcon: IconComponent;
3320
+
3321
+ declare const ApertureIcon: IconComponent;
3322
+
3323
+ declare const AwardIcon: IconComponent;
3324
+
3325
+ declare const BoxIcon: IconComponent;
3326
+
3327
+ declare const BriefcaseIcon: IconComponent;
3328
+
3329
+ declare const ChromeIcon: IconComponent;
3330
+
3331
+ declare const CircleIcon: IconComponent;
3332
+
3333
+ declare const CrosshairIcon: IconComponent;
3334
+
3335
+ declare const DiscIcon: IconComponent;
3336
+
3337
+ declare const DropletIcon: IconComponent;
3338
+
3339
+ declare const FeatherIcon: IconComponent;
3340
+
3341
+ declare const LayersIcon: IconComponent;
3342
+
3343
+ declare const LayoutIcon: IconComponent;
3344
+
3345
+ declare const SidebarIcon: IconComponent;
3346
+
3347
+ declare const SquareIcon: IconComponent;
3348
+
3349
+ declare const TriangleIcon: IconComponent;
3350
+
3351
+ declare const LifeBuoyIcon: IconComponent;
3352
+
3353
+ declare const LoaderIcon: IconComponent;
3354
+
3355
+ declare const OctagonIcon: IconComponent;
3356
+
3357
+ declare const PackageIcon: IconComponent;
3358
+
3359
+ declare const PercentIcon: IconComponent;
3360
+
3361
+ declare const ShieldIcon: IconComponent;
3362
+
3363
+ declare const UmbrellaIcon: IconComponent;
3364
+
3365
+ declare const WindIcon: IconComponent;
3366
+
3367
+ declare const ArrowUpLeftIcon: IconComponent;
3368
+
3369
+ declare const ArrowDownRightIcon: IconComponent;
3370
+
3371
+ declare const ArrowDownLeftIcon: IconComponent;
3372
+
3373
+ declare const ChevronsRightIcon: IconComponent;
3374
+
3375
+ declare const ChevronsLeftIcon: IconComponent;
3376
+
3377
+ declare const ChevronsDownIcon: IconComponent;
3378
+
3379
+ declare const ChevronsUpIcon: IconComponent;
3380
+
3381
+ declare const CornerUpRightIcon: IconComponent;
3382
+
3383
+ declare const CornerDownLeftIcon: IconComponent;
3384
+
3385
+ declare const CornerRightUpIcon: IconComponent;
3386
+
3387
+ declare const CornerRightDownIcon: IconComponent;
3388
+
3389
+ declare const CornerLeftUpIcon: IconComponent;
3390
+
3391
+ declare const CornerDownRightIcon: IconComponent;
3392
+
3393
+ declare const CornerUpLeftIcon: IconComponent;
3394
+
3395
+ declare const CornerLeftDownIcon: IconComponent;
3396
+
3397
+ declare const FastForwardIcon: IconComponent;
3398
+
3399
+ declare const HeadphonesIcon: IconComponent;
3400
+
3401
+ declare const MusicIcon: IconComponent;
3402
+
3403
+ declare const RewindIcon: IconComponent;
3404
+
3405
+ declare const SkipBackIcon: IconComponent;
3406
+
3407
+ declare const SkipForwardIcon: IconComponent;
3408
+
3409
+ declare const VolumeIcon: IconComponent;
3410
+
3411
+ declare const VolumeMuteIcon: IconComponent;
3412
+
3413
+ declare const VolumeLowIcon: IconComponent;
3414
+
3415
+ declare const VolumeHighIcon: IconComponent;
3416
+
3417
+ declare const CalendarIcon: IconComponent;
3418
+
3419
+ declare const ClockIcon: IconComponent;
3420
+
3421
+ declare const CloudIcon: IconComponent;
3422
+
3423
+ declare const CloudDrizzleIcon: IconComponent;
3424
+
3425
+ declare const CloudSnowIcon: IconComponent;
3426
+
3427
+ declare const CloudOffIcon: IconComponent;
3428
+
3429
+ declare const CloudLightningIcon: IconComponent;
3430
+
3431
+ declare const MoonIcon: IconComponent;
3432
+
3433
+ declare const SunsetIcon: IconComponent;
3434
+
3435
+ declare const SunriseIcon: IconComponent;
3436
+
3437
+ declare const WatchIcon: IconComponent;
3438
+
3439
+ declare const CloudRainIcon: IconComponent;
3440
+
3441
+ declare const BatteryChargingIcon: IconComponent;
3442
+
3443
+ declare const BatteryIcon: IconComponent;
3444
+
3445
+ declare const CpuIcon: IconComponent;
3446
+
3447
+ declare const MonitorIcon: IconComponent;
3448
+
3449
+ declare const PrinterIcon: IconComponent;
3450
+
3451
+ declare const ServerIcon: IconComponent;
3452
+
3453
+ declare const SmartphoneIcon: IconComponent;
3454
+
3455
+ declare const SpeakerIcon: IconComponent;
3456
+
3457
+ declare const TabletIcon: IconComponent;
3458
+
3459
+ declare const ThermometerIcon: IconComponent;
3460
+
3461
+ declare const TvIcon: IconComponent;
3462
+
3463
+ declare const CodepenIcon: IconComponent;
3464
+
3465
+ declare const FacebookIcon: IconComponent;
3466
+
3467
+ declare const GitlabIcon: IconComponent;
3468
+
3469
+ declare const GithubIcon: IconComponent;
3470
+
3471
+ declare const InstagramIcon: IconComponent;
3472
+
3473
+ declare const PocketIcon: IconComponent;
3474
+
3475
+ declare const SlackIcon: IconComponent;
3476
+
3477
+ declare const TwitterIcon: IconComponent;
3478
+
3479
+ declare const UserCheckIcon: IconComponent;
3480
+
3481
+ declare const UserXIcon: IconComponent;
3482
+
3483
+ declare const UserPlusIcon: IconComponent;
3484
+
3485
+ declare const UserMinusIcon: IconComponent;
3486
+
3487
+ declare const ActivityIcon: IconComponent;
3488
+
3489
+ declare const BarChartIcon: IconComponent;
3490
+
3491
+ declare const BarChartAltIcon: IconComponent;
3492
+
3493
+ declare const PieChartIcon: IconComponent;
3494
+
3495
+ declare const CompassIcon: IconComponent;
3496
+
3497
+ declare const MapIcon: IconComponent;
3498
+
3499
+ declare const MapPinIcon: IconComponent;
3500
+
3501
+ declare const NavigationIcon: IconComponent;
3502
+
3503
+ declare const DollarsIcon: IconComponent;
3504
+
3505
+ declare const RupeesIcon: IconComponent;
3506
+
3507
+ declare const DashboardIcon: IconComponent;
3508
+
3509
+ declare const InvoicesIcon: IconComponent;
3510
+
3511
+ declare const PaymentLinksIcon: IconComponent;
3512
+
3513
+ declare const PaymentButtonsIcon: IconComponent;
3514
+
3515
+ declare const PaymentPagesIcon: IconComponent;
3516
+
3517
+ declare const RoutesIcon: IconComponent;
3518
+
3519
+ declare const SubscriptionsIcon: IconComponent;
3520
+
3521
+ declare const SmartCollectIcon: IconComponent;
3522
+
3523
+ declare const CustomersIcon: IconComponent;
3524
+
3525
+ declare const OffersIcon: IconComponent;
3526
+
3527
+ declare const ReportsIcon: IconComponent;
3528
+
3529
+ declare const MyAccountIcon: IconComponent;
3530
+
3531
+ declare const RazorpayIcon: IconComponent;
3532
+
3533
+ declare const RazorpayXIcon: IconComponent;
3534
+
3535
+ declare const BookIcon: IconComponent;
3536
+
3537
+ declare const SettlementsIcon: IconComponent;
3538
+
3539
+ declare const ShuffleIcon: IconComponent;
3540
+
3541
+ declare const TagIcon: IconComponent;
3542
+
3543
+ declare const UserIcon: IconComponent;
3544
+
3545
+ declare const TransactionsIcon: IconComponent;
3546
+
3547
+ declare const AnnouncementIcon: IconComponent;
3548
+
3549
+ declare const AppStoreIcon: IconComponent;
3550
+
3551
+ declare const CoinsIcon: IconComponent;
3552
+
3553
+ declare const BillIcon: IconComponent;
3554
+
3555
+ declare const StampIcon: IconComponent;
3556
+
3557
+ declare const MenuDotsIcon: IconComponent;
3558
+
3559
+ declare const SendIcon: IconComponent;
3560
+
3561
+ declare const MailOpenIcon: IconComponent;
3562
+
3563
+ declare const BulkPayoutsIcon: IconComponent;
3564
+
3565
+ declare type FeedbackIconColors = `feedback.icon.${DotNotationColorStringToken<Theme$1['colors']['feedback']['icon']>}`;
3566
+ declare type FeedbackActionIconColors = `feedback.${Feedback}.action.icon.${DotNotationColorStringToken<Theme$1['colors']['feedback'][Feedback]['action']['icon']>}`;
3567
+ declare type ActionIconColors = `action.icon.${DotNotationColorStringToken<Theme$1['colors']['action']['icon']>}`;
3568
+ declare type TextIconColors = `surface.text.${DotNotationColorStringToken<Theme$1['colors']['surface']['text']>}`;
3569
+ declare type SurfaceActionIconColors = `surface.action.icon.${DotNotationColorStringToken<Theme$1['colors']['surface']['action']['icon']>}`;
3570
+ declare type BadgeIconColors = `badge.icon.${DotNotationColorStringToken<Theme$1['colors']['badge']['icon']>}`;
3571
+ declare type IconSize = 'xsmall' | 'small' | 'medium' | 'large' | 'xlarge' | '2xlarge';
3572
+ declare type IconProps = {
3573
+ /**
3574
+ * Color token (not to be confused with actual hsla value)
3575
+ */
3576
+ color: ActionIconColors | SurfaceActionIconColors | FeedbackIconColors | FeedbackActionIconColors | TextIconColors | BadgeIconColors | 'currentColor';
3577
+ size: IconSize;
3578
+ } & StyledPropsBlade;
3579
+ declare type IconComponent = React.ComponentType<IconProps>;
3580
+
3581
+ /**
3582
+ * Similar to `Pick` except this returns `never` when value doesn't exist (native `Pick` returns `unknown`).
3583
+ *
3584
+ * You might have to ts-ignore the non-existing type error while using this. This is done so that you can get jsdoc from actual type.
3585
+ *
3586
+ * E.g. This will pick from ViewStyle prop if value exists else returns undefined.
3587
+ *
3588
+ * ```ts
3589
+ * // @ts-expect-error: T passed here may not neccessarily exist. We return `never` type when it doesn't
3590
+ * native: PickIfExist<ViewStyle, T>;
3591
+ * ```
3592
+ */
3593
+ declare type PickIfExist<T, K extends keyof T> = {
3594
+ [P in K]: P extends keyof T ? T[P] : never;
3595
+ };
3596
+ /**
3597
+ * Picks the types based on the platform (web / native).
3598
+ *
3599
+ * E.g.
3600
+ * ```ts
3601
+ * type CSSObject = PickCSSByPlatform<'display'>
3602
+ * // On Web --> This will be all possible web display properties like `block`, `flex`, `inline`, and more.
3603
+ * // On Native --> This will be just `flex` and `none`
3604
+ * ```
3605
+ */
3606
+ declare type PickCSSByPlatform<T extends keyof React__default.CSSProperties | keyof ViewStyle> = Platform.Select<{
3607
+ web: PickIfExist<CSSObject, T>;
3608
+ native: PickIfExist<ViewStyle, T>;
3609
+ }>;
3610
+
3611
+ declare type FormInputLabelProps = {
3612
+ /**
3613
+ * Label to be shown for the input field
3614
+ */
3615
+ label: string;
3616
+ /**
3617
+ * Desktop only prop. Default value on mobile will be `top`
3618
+ */
3619
+ labelPosition?: 'left' | 'top';
3620
+ /**
3621
+ * Displays `(optional)` when `optional` is passed or `*` when `required` is passed
3622
+ */
3623
+ necessityIndicator?: 'required' | 'optional' | 'none';
3624
+ };
3625
+
3626
+ declare type FormInputOnEvent = ({ name, value }: {
3627
+ name?: string;
3628
+ value?: string;
3629
+ }) => void;
3630
+ declare type FormInputValidationProps = {
3631
+ /**
3632
+ * Help text for the input
3633
+ */
3634
+ helpText?: string;
3635
+ /**
3636
+ * Error text for the input
3637
+ *
3638
+ * Renders when `validationState` is set to 'error'
3639
+ */
3640
+ errorText?: string;
3641
+ /**
3642
+ * success text for the input
3643
+ *
3644
+ * Renders when `validationState` is set to 'success'
3645
+ */
3646
+ successText?: string;
3647
+ /**
3648
+ * If `error`, the input is marked as invalid,
3649
+ * and `invalid` attribute will be added
3650
+ *
3651
+ * If `success`, the input is marked as valid,
3652
+ *
3653
+ */
3654
+ validationState?: 'success' | 'error' | 'none';
3655
+ };
3656
+
3657
+ type FormInputHandleOnKeyDownEvent = ({
3658
+ name,
3659
+ key,
3660
+ code,
3661
+ event,
3662
+ }: FormInputOnKeyDownEvent) => void;
3663
+
3664
+ type FormInputOnKeyDownEvent = {
3665
+ name?: string;
3666
+ key?: string;
3667
+ code?: string;
3668
+ event: KeyboardEvent<HTMLInputElement>;
3669
+ };
3670
+
3671
+ declare type BaseInputProps = FormInputLabelProps & FormInputValidationProps & {
3672
+ /**
3673
+ * Determines if it needs to be rendered as input, textarea or button
3674
+ */
3675
+ as?: 'input' | 'textarea' | 'button';
3676
+ /**
3677
+ * ID that will be used for accessibility
3678
+ */
3679
+ id: string;
3680
+ /**
3681
+ * Placeholder text to be displayed inside the input field
3682
+ */
3683
+ placeholder?: string;
3684
+ /**
3685
+ * Type of Input Field to be rendered.
3686
+ *
3687
+ * @default text
3688
+ */
3689
+ type?: 'text' | 'telephone' | 'email' | 'url' | 'number' | 'search' | 'password';
3690
+ /**
3691
+ * Used to set the default value of input field when it's uncontrolled
3692
+ */
3693
+ defaultValue?: string;
3694
+ /**
3695
+ * The name of the input field.
3696
+ *
3697
+ * Useful in form submissions
3698
+ */
3699
+ name?: string;
3700
+ /**
3701
+ * The callback function to be invoked when the input field gets focus
3702
+ */
3703
+ onFocus?: FormInputOnEvent;
3704
+ /**
3705
+ * The callback function to be invoked when the value of the input field changes
3706
+ */
3707
+ onChange?: FormInputOnEvent;
3708
+ /**
3709
+ * The callback function to be invoked when input is clicked
3710
+ */
3711
+ onClick?: FormInputOnEvent;
3712
+ /**
3713
+ * The callback function to be invoked when the value of the input field has any input
3714
+ */
3715
+ onInput?: FormInputOnEvent;
3716
+ /**
3717
+ * The callback function to be invoked whenever there is a keyDown event
3718
+ */
3719
+ onKeyDown?: FormInputHandleOnKeyDownEvent;
3720
+ /**
3721
+ * The callback function to be invoked when the the input field loses focus
3722
+ *
3723
+ * For React Native this will call `onEndEditing` event since we want to get the last value of the input field
3724
+ */
3725
+ onBlur?: FormInputOnEvent;
3726
+ /**
3727
+ * Ignores the blur event animation (Used in Select to ignore blur animation when item in option is clicked)
3728
+ */
3729
+ shouldIgnoreBlurAnimation?: boolean;
3730
+ /**
3731
+ * Used to turn the input field to controlled so user can control the value
3732
+ */
3733
+ value?: string;
3734
+ /**
3735
+ * Used to disable the input field
3736
+ */
3737
+ isDisabled?: boolean;
3738
+ /**
3739
+ * If true, the input is marked as required, and `required` attribute will be added
3740
+ */
3741
+ isRequired?: boolean;
3742
+ /**
3743
+ * Icon to be shown at the start of the input field
3744
+ */
3745
+ leadingIcon?: IconComponent$1;
3746
+ /**
3747
+ * Prefix symbol to be displayed at the beginning of the input field. If leadingIcon is provided it'll be placed after it
3748
+ */
3749
+ prefix?: string;
3750
+ /**
3751
+ * Element to be rendered before suffix. This is decided by the component which is extending BaseInput
3752
+ *
3753
+ * eg: consumers can render a loader or they could render a clear button
3754
+ */
3755
+ interactionElement?: ReactNode;
3756
+ /**
3757
+ * Suffix symbol to be displayed at the end of the input field. If trailingIcon is provided it'll be placed before it
3758
+ */
3759
+ suffix?: string;
3760
+ /**
3761
+ * Icon to be displayed at the end of the input field
3762
+ */
3763
+ trailingIcon?: IconComponent$1;
3764
+ /**
3765
+ * Displays the character counter under the input field
3766
+ */
3767
+ maxCharacters?: number;
3768
+ /**
3769
+ * alignment of the text inside input field
3770
+ */
3771
+ textAlign?: 'left' | 'center' | 'right';
3772
+ /**
3773
+ * If true, focuses the input field on load
3774
+ *
3775
+ * **Note:**
3776
+ * Automatically focusing a form control can confuse visually-impaired people using screen-reading technology and people with cognitive impairments.
3777
+ * When autofocus is assigned, screen-readers "teleport" their user to the form control without warning them beforehand.
3778
+ */
3779
+ autoFocus?: boolean;
3780
+ /**
3781
+ * Hints the platform to display an appropriate virtual keyboard
3782
+ *
3783
+ * **Native:** Passes as is the `keyboardType` attribute
3784
+ *
3785
+ * **Web:** Passes the value to the `inputMode` attribute
3786
+ */
3787
+ keyboardType?: 'text' | 'search' | 'telephone' | 'email' | 'url' | 'decimal';
3788
+ /**
3789
+ * determines what return key to show on the keyboard of mobile devices/virtual keyboard
3790
+ * **Note**: Few values are platform dependent and might not render on all the platforms
3791
+ *
3792
+ * `default` is only available on native. it'll be mapped to `enter` for web
3793
+ * `previous` is only available on native android
3794
+ */
3795
+ keyboardReturnKeyType?: 'default' | 'go' | 'done' | 'next' | 'previous' | 'search' | 'send';
3796
+ /**
3797
+ * determines what autoComplete suggestion type to show
3798
+ *
3799
+ * Internally it'll render platform specific attributes:
3800
+ *
3801
+ * - web: `autocomplete`
3802
+ * - iOS: `textContentType`
3803
+ * - android: `autoComplete`
3804
+ *
3805
+ */
3806
+ autoCompleteSuggestionType?: 'none' | 'name' | 'email' | 'username' | 'password' | 'newPassword' | 'oneTimeCode' | 'telephone' | 'postalCode' | 'countryName' | 'creditCardNumber' | 'creditCardCSC' | 'creditCardExpiry' | 'creditCardExpiryMonth' | 'creditCardExpiryYear';
3807
+ /**
3808
+ * Element to be rendered on the trailing slot of input field label
3809
+ */
3810
+ trailingHeaderSlot?: (value?: string) => ReactNode;
3811
+ /**
3812
+ * Element to be rendered on the trailing slot of input field footer
3813
+ */
3814
+ trailingFooterSlot?: (value?: string) => ReactNode;
3815
+ /**
3816
+ * Sets the textarea's number of lines
3817
+ */
3818
+ numberOfLines?: 2 | 3 | 4 | 5;
3819
+ /**
3820
+ * Sets the accessibility label for the input
3821
+ */
3822
+ accessibilityLabel?: string;
3823
+ /**
3824
+ * Sets the id of the label
3825
+ *
3826
+ * (Useful when assigning one label to multiple elements using aria-labelledby)
3827
+ */
3828
+ labelId?: string;
3829
+ /**
3830
+ * Can be used in select to set the id of the active descendant from the listbox
3831
+ */
3832
+ activeDescendant?: string;
3833
+ /**
3834
+ * Hides the label text
3835
+ */
3836
+ hideLabelText?: boolean;
3837
+ /**
3838
+ * Hides the form hint text
3839
+ */
3840
+ hideFormHint?: boolean;
3841
+ /**
3842
+ * componentName prop sets the data-blade-component attribute name
3843
+ * for internal metric collection purposes
3844
+ */
3845
+ componentName?: string;
3846
+ /**
3847
+ * whether the input has a popup
3848
+ */
3849
+ hasPopup?: AriaAttributes['hasPopup'];
3850
+ /**
3851
+ * id of the popup
3852
+ */
3853
+ popupId?: string;
3854
+ /**
3855
+ * true if popup is in expanded state
3856
+ */
3857
+ isPopupExpanded?: boolean;
3858
+ /**
3859
+ * sets the autocapitalize behavior for the input
3860
+ */
3861
+ autoCapitalize?: 'none' | 'sentences' | 'words' | 'characters';
3862
+ } & TestID & Platform.Select<{
3863
+ native: {
3864
+ /**
3865
+ * The callback function to be invoked when the value of the input field is submitted.
3866
+ */
3867
+ onSubmit?: FormInputOnEvent;
3868
+ };
3869
+ web: {
3870
+ /**
3871
+ * This is a react-native only prop and has no effect on web.
3872
+ */
3873
+ onSubmit?: undefined;
3874
+ };
3875
+ }> & StyledPropsBlade;
3876
+
3877
+ declare type Type = Exclude<BaseInputProps['type'], 'password'>;
3878
+ declare type TextInputProps = Pick<BaseInputProps, 'label' | 'labelPosition' | 'necessityIndicator' | 'validationState' | 'helpText' | 'errorText' | 'successText' | 'placeholder' | 'defaultValue' | 'name' | 'onChange' | 'onFocus' | 'onBlur' | 'value' | 'isDisabled' | 'isRequired' | 'prefix' | 'suffix' | 'maxCharacters' | 'autoFocus' | 'keyboardReturnKeyType' | 'autoCompleteSuggestionType' | 'onSubmit' | 'autoCapitalize' | 'testID'> & {
3879
+ /**
3880
+ * Decides whether to render a clear icon button
3881
+ */
3882
+ showClearButton?: boolean;
3883
+ /**
3884
+ * Event handler to handle the onClick event for clear button. Used when `showClearButton` is `true`
3885
+ */
3886
+ onClearButtonClick?: () => void;
3887
+ /**
3888
+ * Decides whether to show a loading spinner for the input field.
3889
+ */
3890
+ isLoading?: boolean;
3891
+ /**
3892
+ * Icon that will be rendered at the beginning of the input field
3893
+ */
3894
+ icon?: IconComponent$1;
3895
+ /**
3896
+ * Type of Input Field to be rendered. Use `PasswordInput` for type `password`
3897
+ *
3898
+ *
3899
+ * **Note on number type**
3900
+ *
3901
+ * `type="number"` internally uses `inputMode="numeric"` instead of HTML's `type="number"` which also allows text characters.
3902
+ * If you have a usecase where you only want to support number input, you can handle it on validations end.
3903
+ *
3904
+ * Check out [Why the GOV.UK Design System team changed the input type for numbers](https://technology.blog.gov.uk/2020/02/24/why-the-gov-uk-design-system-team-changed-the-input-type-for-numbers/) for reasoning
3905
+ *
3906
+ * @default text
3907
+ */
3908
+ type?: Type;
3909
+ } & StyledPropsBlade;
3910
+ declare const TextInput: React__default.ForwardRefExoticComponent<Pick<BaseInputProps, "testID" | "name" | "placeholder" | "label" | "value" | "prefix" | "defaultValue" | "autoCapitalize" | "onFocus" | "onBlur" | "onChange" | "onSubmit" | "autoFocus" | "isDisabled" | "labelPosition" | "validationState" | "helpText" | "errorText" | "necessityIndicator" | "successText" | "isRequired" | "suffix" | "maxCharacters" | "keyboardReturnKeyType" | "autoCompleteSuggestionType"> & {
3911
+ /**
3912
+ * Decides whether to render a clear icon button
3913
+ */
3914
+ showClearButton?: boolean | undefined;
3915
+ /**
3916
+ * Event handler to handle the onClick event for clear button. Used when `showClearButton` is `true`
3917
+ */
3918
+ onClearButtonClick?: (() => void) | undefined;
3919
+ /**
3920
+ * Decides whether to show a loading spinner for the input field.
3921
+ */
3922
+ isLoading?: boolean | undefined;
3923
+ /**
3924
+ * Icon that will be rendered at the beginning of the input field
3925
+ */
3926
+ icon?: IconComponent$1 | undefined;
3927
+ /**
3928
+ * Type of Input Field to be rendered. Use `PasswordInput` for type `password`
3929
+ *
3930
+ *
3931
+ * **Note on number type**
3932
+ *
3933
+ * `type="number"` internally uses `inputMode="numeric"` instead of HTML's `type="number"` which also allows text characters.
3934
+ * If you have a usecase where you only want to support number input, you can handle it on validations end.
3935
+ *
3936
+ * Check out [Why the GOV.UK Design System team changed the input type for numbers](https://technology.blog.gov.uk/2020/02/24/why-the-gov-uk-design-system-team-changed-the-input-type-for-numbers/) for reasoning
3937
+ *
3938
+ * @default text
3939
+ */
3940
+ type?: Type;
3941
+ } & Partial<Omit<MakeObjectResponsive<{
3942
+ margin: SpacingValueType | ArrayOfMaxLength4<SpacingValueType>;
3943
+ marginX: SpacingValueType;
3944
+ marginY: SpacingValueType;
3945
+ marginTop: SpacingValueType;
3946
+ marginRight: SpacingValueType;
3947
+ marginBottom: SpacingValueType;
3948
+ marginLeft: SpacingValueType;
3949
+ }> & Pick<MakeObjectResponsive<{
3950
+ gap: SpacingValueType;
3951
+ rowGap: SpacingValueType;
3952
+ columnGap: SpacingValueType;
3953
+ flex: string | number;
3954
+ } & PickIfExist<react_native.ViewStyle, "alignContent" | "alignItems" | "alignSelf" | "flexBasis" | "flexDirection" | "flexGrow" | "flexShrink" | "flexWrap" | "justifyContent" | "justifyItems" | "justifySelf" | "order" | "placeSelf"> & {
3955
+ __brand__?: "platform-native" | undefined;
3956
+ }>, "alignSelf" | "justifySelf" | "order" | "placeSelf"> & MakeObjectResponsive<{
3957
+ top: SpacingValueType;
3958
+ right: SpacingValueType;
3959
+ bottom: SpacingValueType;
3960
+ left: SpacingValueType;
3961
+ } & PickIfExist<react_native.ViewStyle, "position" | "zIndex"> & {
3962
+ __brand__?: "platform-native" | undefined;
3963
+ }> & Pick<MakeObjectResponsive<PickCSSByPlatform<"grid" | "gridAutoColumns" | "gridAutoFlow" | "gridAutoRows" | "gridColumnEnd" | "gridColumnStart" | "gridRowEnd" | "gridRowStart" | "gridTemplateAreas" | "gridTemplateColumns" | "gridTemplateRows" | "gridArea" | "gridColumn" | "gridRow" | "gridTemplate">>, "gridColumnEnd" | "gridColumnStart" | "gridRowEnd" | "gridRowStart" | "gridArea" | "gridColumn" | "gridRow">, "__brand__">> & React__default.RefAttributes<BladeElementRef>>;
3964
+
3965
+ declare type PasswordInputExtraProps = {
3966
+ /**
3967
+ * Shows a reveal button to toggle password visibility
3968
+ *
3969
+ * @default true
3970
+ */
3971
+ showRevealButton?: boolean;
3972
+ /**
3973
+ * Displays asterisk (`*`) when `isRequired` is enabled
3974
+ *
3975
+ * @default none
3976
+ */
3977
+ necessityIndicator?: Exclude<BaseInputProps['necessityIndicator'], 'optional'>;
3978
+ /**
3979
+ * Determines what autoComplete suggestion type to show. Defaults to using platform heuristics.
3980
+ *
3981
+ * It's not recommended to turn this off in favor of safe password practices.
3982
+ * Providing `password` or `newPassword` is more informative to the platform for browser autofill or password managers.
3983
+ *
3984
+ * **Note**: Using `newPassword` on iOS has some [known issue](https://github.com/facebook/react-native/issues/21911) on React Native
3985
+ *
3986
+ * Internally it'll render platform specific attributes:
3987
+ *
3988
+ * - web: `autocomplete`
3989
+ * - iOS: `textContentType`
3990
+ * - android: `autoComplete`
3991
+ *
3992
+ */
3993
+ autoCompleteSuggestionType?: Extract<BaseInputProps['autoCompleteSuggestionType'], 'none' | 'password' | 'newPassword'>;
3994
+ };
3995
+ declare type PasswordInputProps = Pick<BaseInputProps, 'label' | 'labelPosition' | 'maxCharacters' | 'validationState' | 'errorText' | 'successText' | 'helpText' | 'isDisabled' | 'defaultValue' | 'placeholder' | 'isRequired' | 'value' | 'onChange' | 'onBlur' | 'onSubmit' | 'onFocus' | 'name' | 'autoFocus' | 'keyboardReturnKeyType' | 'autoCompleteSuggestionType' | 'testID'> & PasswordInputExtraProps & StyledPropsBlade;
3996
+ declare const PasswordInput: React__default.ForwardRefExoticComponent<Pick<BaseInputProps, "testID" | "name" | "placeholder" | "label" | "value" | "defaultValue" | "onFocus" | "onBlur" | "onChange" | "onSubmit" | "autoFocus" | "isDisabled" | "labelPosition" | "validationState" | "helpText" | "errorText" | "successText" | "isRequired" | "maxCharacters" | "keyboardReturnKeyType" | "autoCompleteSuggestionType"> & PasswordInputExtraProps & Partial<Omit<MakeObjectResponsive<{
3997
+ margin: SpacingValueType | ArrayOfMaxLength4<SpacingValueType>;
3998
+ marginX: SpacingValueType;
3999
+ marginY: SpacingValueType;
4000
+ marginTop: SpacingValueType;
4001
+ marginRight: SpacingValueType;
4002
+ marginBottom: SpacingValueType;
4003
+ marginLeft: SpacingValueType;
4004
+ }> & Pick<MakeObjectResponsive<{
4005
+ gap: SpacingValueType;
4006
+ rowGap: SpacingValueType;
4007
+ columnGap: SpacingValueType;
4008
+ flex: string | number;
4009
+ } & PickIfExist<react_native.ViewStyle, "alignContent" | "alignItems" | "alignSelf" | "flexBasis" | "flexDirection" | "flexGrow" | "flexShrink" | "flexWrap" | "justifyContent" | "justifyItems" | "justifySelf" | "order" | "placeSelf"> & {
4010
+ __brand__?: "platform-native" | undefined;
4011
+ }>, "alignSelf" | "justifySelf" | "order" | "placeSelf"> & MakeObjectResponsive<{
4012
+ top: SpacingValueType;
4013
+ right: SpacingValueType;
4014
+ bottom: SpacingValueType;
4015
+ left: SpacingValueType;
4016
+ } & PickIfExist<react_native.ViewStyle, "position" | "zIndex"> & {
4017
+ __brand__?: "platform-native" | undefined;
4018
+ }> & Pick<MakeObjectResponsive<PickCSSByPlatform<"grid" | "gridAutoColumns" | "gridAutoFlow" | "gridAutoRows" | "gridColumnEnd" | "gridColumnStart" | "gridRowEnd" | "gridRowStart" | "gridTemplateAreas" | "gridTemplateColumns" | "gridTemplateRows" | "gridArea" | "gridColumn" | "gridRow" | "gridTemplate">>, "gridColumnEnd" | "gridColumnStart" | "gridRowEnd" | "gridRowStart" | "gridArea" | "gridColumn" | "gridRow">, "__brand__">> & React__default.RefAttributes<BladeElementRef>>;
4019
+
4020
+ declare type TextAreaProps = Pick<BaseInputProps, 'label' | 'labelPosition' | 'necessityIndicator' | 'validationState' | 'helpText' | 'errorText' | 'successText' | 'placeholder' | 'defaultValue' | 'name' | 'onChange' | 'onFocus' | 'onBlur' | 'onSubmit' | 'value' | 'isDisabled' | 'isRequired' | 'maxCharacters' | 'autoFocus' | 'numberOfLines' | 'testID'> & {
4021
+ /**
4022
+ * Decides whether to render a clear icon button
4023
+ */
4024
+ showClearButton?: boolean;
4025
+ /**
4026
+ * Event handler to handle the onClick event for clear button. Used when `showClearButton` is `true`
4027
+ */
4028
+ onClearButtonClick?: () => void;
4029
+ } & StyledPropsBlade;
4030
+ declare const TextArea: React__default.ForwardRefExoticComponent<Pick<BaseInputProps, "testID" | "name" | "placeholder" | "label" | "value" | "numberOfLines" | "defaultValue" | "onFocus" | "onBlur" | "onChange" | "onSubmit" | "autoFocus" | "isDisabled" | "labelPosition" | "validationState" | "helpText" | "errorText" | "necessityIndicator" | "successText" | "isRequired" | "maxCharacters"> & {
4031
+ /**
4032
+ * Decides whether to render a clear icon button
4033
+ */
4034
+ showClearButton?: boolean | undefined;
4035
+ /**
4036
+ * Event handler to handle the onClick event for clear button. Used when `showClearButton` is `true`
4037
+ */
4038
+ onClearButtonClick?: (() => void) | undefined;
4039
+ } & Partial<Omit<MakeObjectResponsive<{
4040
+ margin: SpacingValueType | ArrayOfMaxLength4<SpacingValueType>;
4041
+ marginX: SpacingValueType;
4042
+ marginY: SpacingValueType;
4043
+ marginTop: SpacingValueType;
4044
+ marginRight: SpacingValueType;
4045
+ marginBottom: SpacingValueType;
4046
+ marginLeft: SpacingValueType;
4047
+ }> & Pick<MakeObjectResponsive<{
4048
+ gap: SpacingValueType;
4049
+ rowGap: SpacingValueType;
4050
+ columnGap: SpacingValueType;
4051
+ flex: string | number;
4052
+ } & PickIfExist<react_native.ViewStyle, "alignContent" | "alignItems" | "alignSelf" | "flexBasis" | "flexDirection" | "flexGrow" | "flexShrink" | "flexWrap" | "justifyContent" | "justifyItems" | "justifySelf" | "order" | "placeSelf"> & {
4053
+ __brand__?: "platform-native" | undefined;
4054
+ }>, "alignSelf" | "justifySelf" | "order" | "placeSelf"> & MakeObjectResponsive<{
4055
+ top: SpacingValueType;
4056
+ right: SpacingValueType;
4057
+ bottom: SpacingValueType;
4058
+ left: SpacingValueType;
4059
+ } & PickIfExist<react_native.ViewStyle, "position" | "zIndex"> & {
4060
+ __brand__?: "platform-native" | undefined;
4061
+ }> & Pick<MakeObjectResponsive<PickCSSByPlatform<"grid" | "gridAutoColumns" | "gridAutoFlow" | "gridAutoRows" | "gridColumnEnd" | "gridColumnStart" | "gridRowEnd" | "gridRowStart" | "gridTemplateAreas" | "gridTemplateColumns" | "gridTemplateRows" | "gridArea" | "gridColumn" | "gridRow" | "gridTemplate">>, "gridColumnEnd" | "gridColumnStart" | "gridRowEnd" | "gridRowStart" | "gridArea" | "gridColumn" | "gridRow">, "__brand__">> & React__default.RefAttributes<BladeElementRef>>;
4062
+
4063
+ declare type FormInputOnEventWithIndex = ({ name, value, inputIndex, }: {
4064
+ name?: string;
4065
+ value?: string;
4066
+ inputIndex: number;
4067
+ }) => void;
4068
+ declare type OTPInputProps = Pick<BaseInputProps, 'label' | 'labelPosition' | 'validationState' | 'helpText' | 'errorText' | 'successText' | 'name' | 'onChange' | 'value' | 'isDisabled' | 'autoFocus' | 'keyboardReturnKeyType' | 'keyboardType' | 'placeholder' | 'testID'> & {
4069
+ /**
4070
+ * Determines the number of input fields to show for the OTP
4071
+ * @default 6
4072
+ */
4073
+ otpLength?: 4 | 6;
4074
+ /**
4075
+ * The callback function to be invoked when all the values of the OTPInput are filled
4076
+ */
4077
+ onOTPFilled?: FormInputOnEvent;
4078
+ /**
4079
+ * Masks input characters in all the fields
4080
+ */
4081
+ isMasked?: boolean;
4082
+ /**
4083
+ * Determines what autoComplete suggestion type to show. Defaults to `oneTimeCode`.
4084
+ *
4085
+ * It's not recommended to turn this off in favor of otp input practices.
4086
+ *
4087
+ *
4088
+ * Internally it'll render platform specific attributes:
4089
+ *
4090
+ * - web: `autocomplete`
4091
+ * - iOS: `textContentType`
4092
+ * - android: `autoComplete`
4093
+ *
4094
+ */
4095
+ autoCompleteSuggestionType?: Extract<BaseInputProps['autoCompleteSuggestionType'], 'none' | 'oneTimeCode'>;
4096
+ /**
4097
+ * The callback function to be invoked when one of the input fields gets focus
4098
+ */
4099
+ onFocus?: FormInputOnEventWithIndex;
4100
+ /**
4101
+ * The callback function to be invoked when one of the input fields is blurred
4102
+ */
4103
+ onBlur?: FormInputOnEventWithIndex;
4104
+ } & StyledPropsBlade;
4105
+ /**
4106
+ * OTPInput component can be used for accepting OTPs sent to users for authentication/verification purposes.
4107
+ *
4108
+ * ## Usage
4109
+ *
4110
+ * ```tsx
4111
+ * <OTPInput
4112
+ * label="Enter OTP"
4113
+ * name="otpInput"
4114
+ * onChange={({ name, value }): void => console.log({ name, value })}
4115
+ * onOTPFilled={({ name, value }): void => console.log({ name, value })}
4116
+ * />
4117
+ * ```
4118
+ */
4119
+ declare const OTPInput: ({ autoFocus, errorText, helpText, isDisabled, keyboardReturnKeyType, keyboardType, label, labelPosition, name, onChange, onFocus, onBlur, onOTPFilled, otpLength, placeholder, successText, validationState, value, isMasked, autoCompleteSuggestionType, testID, ...styledProps }: OTPInputProps) => React__default.ReactElement;
4120
+
4121
+ declare type SelectInputProps = Pick<BaseInputProps, 'label' | 'labelPosition' | 'necessityIndicator' | 'validationState' | 'helpText' | 'errorText' | 'successText' | 'name' | 'isDisabled' | 'isRequired' | 'prefix' | 'suffix' | 'autoFocus' | 'onClick' | 'onFocus' | 'onBlur' | 'placeholder' | 'testID'> & {
4122
+ icon?: IconComponent$1;
4123
+ /**
4124
+ * Controlled value of the Select. Use it in combination of `onChange`.
4125
+ *
4126
+ * Check out [Controlled Dropdown Documentation](https://blade.razorpay.com/?path=/story/components-dropdown-with-select--controlled-dropdown&globals=measureEnabled:false) for example.
4127
+ */
4128
+ value?: string | string[];
4129
+ /**
4130
+ * Used to set the default value of SelectInput when it's uncontrolled. Use `value` instead for controlled SelectInput
4131
+ */
4132
+ defaultValue?: string | string[];
4133
+ onChange?: ({ name, values }: {
4134
+ name?: string;
4135
+ values: string[];
4136
+ }) => void;
4137
+ };
4138
+ /**
4139
+ * ### SelectInput
4140
+ *
4141
+ * Our equivalent of `<select>` tag. Lets you select items from given options.
4142
+ *
4143
+ * To be used in combination of `Dropdown` and `ActionList` component
4144
+ *
4145
+ * ---
4146
+ *
4147
+ * #### Usage
4148
+ *
4149
+ * ```diff
4150
+ * <Dropdown>
4151
+ * + <SelectInput label="Select Fruits" />
4152
+ * <DropdownOverlay>
4153
+ * <ActionList>
4154
+ * <ActionListItem title="Mango" value="mango" />
4155
+ * <ActionListItem title="Apple" value="apple" />
4156
+ * </ActionList>
4157
+ * </DropdownOverlay>
4158
+ * </Dropdown>
4159
+ * ```
4160
+ *
4161
+ * ---
4162
+ *
4163
+ * Checkout {@link https://blade.razorpay.com/?path=/docs/components-dropdown-with-select--with-single-select SelectInput Documentation}.
4164
+ */
4165
+ declare const SelectInput: React__default.ForwardRefExoticComponent<Pick<BaseInputProps, "testID" | "name" | "placeholder" | "label" | "prefix" | "onFocus" | "onBlur" | "onClick" | "autoFocus" | "isDisabled" | "labelPosition" | "validationState" | "helpText" | "errorText" | "necessityIndicator" | "successText" | "isRequired" | "suffix"> & {
4166
+ icon?: IconComponent$1 | undefined;
4167
+ /**
4168
+ * Controlled value of the Select. Use it in combination of `onChange`.
4169
+ *
4170
+ * Check out [Controlled Dropdown Documentation](https://blade.razorpay.com/?path=/story/components-dropdown-with-select--controlled-dropdown&globals=measureEnabled:false) for example.
4171
+ */
4172
+ value?: string | string[] | undefined;
4173
+ /**
4174
+ * Used to set the default value of SelectInput when it's uncontrolled. Use `value` instead for controlled SelectInput
4175
+ */
4176
+ defaultValue?: string | string[] | undefined;
4177
+ onChange?: (({ name, values }: {
4178
+ name?: string | undefined;
4179
+ values: string[];
4180
+ }) => void) | undefined;
4181
+ } & React__default.RefAttributes<BladeElementRef>>;
4182
+
4183
+ declare type IndicatorCommonProps = {
4184
+ /**
4185
+ * Sets the color tone
4186
+ *
4187
+ * @default neutral
4188
+ */
4189
+ intent?: Feedback;
4190
+ /**
4191
+ * Size of the indicator
4192
+ *
4193
+ * @default medium
4194
+ */
4195
+ size?: 'small' | 'medium' | 'large';
4196
+ } & TestID & StyledPropsBlade;
4197
+ declare type IndicatorWithoutA11yLabel = {
4198
+ /**
4199
+ * A text label to show alongside the indicator dot
4200
+ */
4201
+ children: StringChildrenType;
4202
+ /**
4203
+ * a11y label for screen readers
4204
+ */
4205
+ accessibilityLabel?: string;
4206
+ };
4207
+ declare type IndicatorWithA11yLabel = {
4208
+ /**
4209
+ * a11y label for screen readers
4210
+ */
4211
+ accessibilityLabel: string;
4212
+ /**
4213
+ * A text label to show alongside the indicator dot
4214
+ */
4215
+ children?: StringChildrenType;
4216
+ };
4217
+ declare type IndicatorProps = IndicatorCommonProps & (IndicatorWithA11yLabel | IndicatorWithoutA11yLabel);
4218
+ declare const Indicator: ({ accessibilityLabel, children, size, intent, testID, ...styledProps }: IndicatorProps) => ReactElement;
4219
+
4220
+ declare type ListItemProps = {
4221
+ /**
4222
+ * Children to be rendered for ListItem. This can be a text, ListItemLink or another List.
4223
+ *
4224
+ */
4225
+ children: React__default.ReactNode;
4226
+ /**
4227
+ * Icon to be rendered for a ListItem's bullet.
4228
+ *
4229
+ */
4230
+ icon?: IconComponent;
4231
+ /**
4232
+ * This is a private prop to be used only for internal logic purposes.
4233
+ *
4234
+ */
4235
+ _itemNumber?: undefined;
4236
+ } & TestID;
4237
+ declare const ListItem: ({ children, icon, _itemNumber, testID, }: ListItemProps) => React__default.ReactElement;
4238
+
4239
+ declare type ListCommonProps = {
4240
+ /**
4241
+ * ListItem to be rendered for the List.
4242
+ *
4243
+ */
4244
+ children: React__default.ReactElement<ListItemProps> | React__default.ReactElement<ListItemProps>[];
4245
+ /**
4246
+ * Sets the variant to be rendered for the List.
4247
+ *
4248
+ * @default 'unordered'
4249
+ */
4250
+ variant?: 'unordered' | 'ordered' | 'ordered-filled';
4251
+ /**
4252
+ * Sets the size for the List.
4253
+ *
4254
+ * @default 'medium'
4255
+ */
4256
+ size?: 'small' | 'medium';
4257
+ } & TestID & StyledPropsBlade;
4258
+ declare type ListWithIconProps = ListCommonProps & {
4259
+ variant?: 'unordered';
4260
+ icon?: IconComponent;
4261
+ };
4262
+ declare type ListWithoutIconProps = ListCommonProps & {
4263
+ variant?: 'ordered' | 'ordered-filled';
4264
+ icon?: undefined;
4265
+ };
4266
+ declare type ListProps = ListWithIconProps | ListWithoutIconProps;
4267
+ declare const List: ({ variant, size, children, icon, testID, ...styledProps }: ListProps) => React__default.ReactElement;
4268
+
4269
+ declare type ListItemLinkProps = Exclude<LinkProps, 'size' | 'variant' | 'isDisabled'>;
4270
+ declare const ListItemLink: ({ accessibilityLabel, children, href, icon, iconPosition, onClick, rel, target, testID, }: ListItemLinkProps) => React.ReactElement;
4271
+
4272
+ declare type TitleProps = {
4273
+ size?: 'small' | 'medium' | 'large' | 'xlarge';
4274
+ contrast?: ColorContrastTypes;
4275
+ type?: TextTypes;
4276
+ children: StringChildrenType;
4277
+ } & TestID & StyledPropsBlade;
4278
+ declare const Title: ({ size, type, contrast, children, testID, ...styledProps }: TitleProps) => ReactElement;
4279
+
4280
+ declare type HeadingVariant = 'regular' | 'subheading';
4281
+ declare type HeadingSize = 'small' | 'medium' | 'large';
4282
+ declare type HeadingCommonProps = {
4283
+ type?: TextTypes;
4284
+ contrast?: ColorContrastTypes;
4285
+ children: StringChildrenType;
4286
+ } & TestID & StyledPropsBlade;
4287
+ declare type HeadingNormalVariant = HeadingCommonProps & {
4288
+ variant?: Exclude<HeadingVariant, 'subheading'>;
4289
+ /**
4290
+ *
4291
+ * @default small
4292
+ */
4293
+ size?: HeadingSize;
4294
+ weight?: keyof Theme$1['typography']['fonts']['weight'];
4295
+ };
4296
+ declare type HeadingSubHeadingVariant = HeadingCommonProps & {
4297
+ variant?: Extract<HeadingVariant, 'subheading'>;
4298
+ /**
4299
+ * `size` cannot be used with variant="subheading". Either change to variant="regular" or remove size prop
4300
+ */
4301
+ size?: undefined;
4302
+ weight?: keyof Pick<Theme$1['typography']['fonts']['weight'], 'bold'>;
4303
+ };
4304
+ /**
4305
+ * Conditionally changing props based on variant.
4306
+ * Overloads or union gives wrong intellisense.
4307
+ */
4308
+ declare type HeadingProps<T> = T extends {
4309
+ variant: infer Variant;
4310
+ } ? Variant extends Exclude<HeadingVariant, 'subheading'> ? HeadingNormalVariant : Variant extends 'subheading' ? HeadingSubHeadingVariant : T : T;
4311
+ declare const Heading: <T extends {
4312
+ variant: HeadingVariant;
4313
+ }>({ variant, size, type, weight, contrast, children, testID, ...styledProps }: HeadingProps<T>) => ReactElement;
4314
+
4315
+ declare type FeedbackColors = `feedback.text.${DotNotationColorStringToken<Theme$1['colors']['feedback']['text']>}`;
4316
+ declare type FeedbackActionColors = `feedback.${Feedback}.action.text.${DotNotationColorStringToken<Theme$1['colors']['feedback'][Feedback]['action']['text']>}`;
4317
+ declare type SurfaceColors = `surface.text.${DotNotationColorStringToken<Theme$1['colors']['surface']['text']>}`;
4318
+ declare type ActionColors = `action.text.${DotNotationColorStringToken<Theme$1['colors']['action']['text']>}`;
4319
+ declare type BadgeTextColors = `badge.text.${DotNotationColorStringToken<Theme$1['colors']['badge']['text']>}`;
4320
+ declare type BaseTextProps = {
4321
+ id?: string;
4322
+ color?: ActionColors | FeedbackColors | SurfaceColors | FeedbackActionColors | BadgeTextColors;
4323
+ fontFamily?: keyof Theme$1['typography']['fonts']['family'];
4324
+ fontSize?: keyof Theme$1['typography']['fonts']['size'];
4325
+ fontWeight?: keyof Theme$1['typography']['fonts']['weight'];
4326
+ fontStyle?: 'italic' | 'normal';
4327
+ textDecorationLine?: 'line-through' | 'none' | 'underline';
4328
+ lineHeight?: keyof Theme$1['typography']['lineHeights'];
4329
+ /**
4330
+ * Web only
4331
+ */
4332
+ as?: 'code' | 'h1' | 'h2' | 'h3' | 'h4' | 'h5' | 'h6' | 'p' | 'span';
4333
+ textAlign?: 'center' | 'justify' | 'left' | 'right';
4334
+ truncateAfterLines?: number;
4335
+ className?: string;
4336
+ style?: React.CSSProperties;
4337
+ children: React.ReactNode;
4338
+ accessibilityProps?: Partial<AccessibilityProps>;
4339
+ /**
4340
+ * React Native only
4341
+ */
4342
+ numberOfLines?: number;
4343
+ componentName?: 'text' | 'title' | 'heading' | 'code';
4344
+ } & TestID & StyledPropsBlade;
4345
+
4346
+ declare type TextCommonProps = {
4347
+ type?: TextTypes;
4348
+ contrast?: ColorContrastTypes;
4349
+ truncateAfterLines?: number;
4350
+ children: React.ReactNode;
4351
+ weight?: keyof Theme$1['typography']['fonts']['weight'];
4352
+ /**
4353
+ * **For Internal use only**: Sets the color of the Text component
4354
+ */
4355
+ color?: BaseTextProps['color'];
4356
+ textAlign?: BaseTextProps['textAlign'];
4357
+ } & TestID & StyledPropsBlade;
4358
+ declare type TextVariant = 'body' | 'caption';
4359
+ declare type TextBodyVariant = TextCommonProps & {
4360
+ variant?: Extract<TextVariant, 'body'>;
4361
+ size?: 'xsmall' | 'small' | 'medium' | 'large';
4362
+ };
4363
+ declare type TextCaptionVariant = TextCommonProps & {
4364
+ variant?: Extract<TextVariant, 'caption'>;
4365
+ size?: 'medium';
4366
+ };
4367
+ /**
4368
+ * Conditionally changing props based on variant.
4369
+ * Overloads or union gives wrong intellisense.
4370
+ */
4371
+ declare type TextProps<T> = T extends {
4372
+ variant: infer Variant;
4373
+ } ? Variant extends 'caption' ? TextCaptionVariant : Variant extends 'body' ? TextBodyVariant : T : T;
4374
+ declare type TextForwardedAs = {
4375
+ forwardedAs?: BaseTextProps['as'];
4376
+ };
4377
+ declare type GetTextPropsReturn = Omit<BaseTextProps, 'children'> & TextForwardedAs;
4378
+ declare type GetTextProps<T extends {
4379
+ variant: TextVariant;
4380
+ }> = Pick<TextProps<T>, 'type' | 'variant' | 'weight' | 'size' | 'contrast' | 'testID' | 'textAlign'>;
4381
+ declare const getTextProps: <T extends {
4382
+ variant: TextVariant;
4383
+ }>({ variant, type, weight, size, contrast, testID, textAlign, }: GetTextProps<T>) => GetTextPropsReturn;
4384
+ declare const Text: <T extends {
4385
+ variant: TextVariant;
4386
+ }>({ variant, weight, size, type, contrast, truncateAfterLines, children, color, testID, textAlign, ...styledProps }: TextProps<T>) => ReactElement;
4387
+
4388
+ declare type CodeProps = {
4389
+ children: StringChildrenType;
4390
+ /**
4391
+ * Decides the fontSize and padding of Code
4392
+ *
4393
+ * @default small
4394
+ */
4395
+ size?: 'small' | 'medium';
4396
+ weight?: 'regular' | 'bold';
4397
+ } & TestID & StyledPropsBlade;
4398
+ /**
4399
+ * Code component can be used for displaying token, variable names, or inlined code snippets.
4400
+ *
4401
+ * ## Usage
4402
+ *
4403
+ * ### In Web
4404
+ * In web, you can use it inside `Text` component or individually. The component is set to display `inline-block`
4405
+ *
4406
+ * ```tsx
4407
+ * <Text>
4408
+ * Lorem ipsum <Code>SENTRY_TOKEN</Code> normal text
4409
+ * </Text>
4410
+ * ```
4411
+ *
4412
+ * ### In React Native
4413
+ *
4414
+ * In React Native, you would have to align it using flex to make sure the Code and the surrounding text is correctly aligned
4415
+ *
4416
+ * ```tsx
4417
+ * <BaseBox flexWrap="wrap" flexDirection="row" alignItems="flex-start">
4418
+ * <Text>Lorem ipsum </Text>
4419
+ * <Code>SENTRY_TOKEN</Code>
4420
+ * <Text> normal text</Text>
4421
+ * </BaseBox>
4422
+ * ```
4423
+ */
4424
+ declare const Code: ({ children, size, weight, testID, ...styledProps }: CodeProps) => JSX.Element;
4425
+
4426
+ declare type ListItemCodeProps = Exclude<CodeProps, 'size'>;
4427
+ declare const ListItemCode: ({ children, testID }: ListItemCodeProps) => React.ReactElement;
4428
+
4429
+ declare type Assertiveness = AriaAttributes['liveRegion'];
4430
+
4431
+ declare function announce(message: string, _assertiveness?: Assertiveness): void;
4432
+ declare function clearAnnouncer(_assertiveness: Assertiveness): void;
4433
+ declare function destroyAnnouncer(): void;
4434
+
4435
+ declare type ProgressBarCommonProps = {
4436
+ /**
4437
+ * Sets aria-label to help users know what the progress bar is for. Default value is the same as the `label` passed.
4438
+ */
4439
+ accessibilityLabel?: string;
4440
+ /**
4441
+ * Sets the contrast for the progress bar
4442
+ * @default 'low'
4443
+ */
4444
+ contrast?: ColorContrastTypes;
4445
+ /**
4446
+ * Sets the intent of the progress bar which changes the feedback color.
4447
+ */
4448
+ intent?: Feedback;
4449
+ /**
4450
+ * Sets the label to be rendered for the progress bar. This value will also be used as default for `accessibilityLabel`.
4451
+ */
4452
+ label?: string;
4453
+ /**
4454
+ * Sets the size of the progress bar.
4455
+ * @default 'small'
4456
+ */
4457
+ size?: 'small' | 'medium';
4458
+ /**
4459
+ * Sets the progress value of the progress bar.
4460
+ * @default 'small'
4461
+ */
4462
+ value?: number;
4463
+ /**
4464
+ * Sets the minimum value for the progress bar.
4465
+ * @default 0
4466
+ */
4467
+ min?: number;
4468
+ /**
4469
+ * Sets the maximum value for the progress bar.
4470
+ * @default 100
4471
+ */
4472
+ max?: number;
4473
+ } & TestID & StyledPropsBlade;
4474
+ declare type ProgressBarVariant = 'progress' | 'meter';
4475
+ declare type ProgressBarProgressProps = ProgressBarCommonProps & {
4476
+ /**
4477
+ * Sets the variant to be rendered for the progress bar.
4478
+ * @default 'progress'
4479
+ */
4480
+ variant?: Extract<ProgressBarVariant, 'progress'>;
4481
+ /**
4482
+ * Sets whether the progress bar is in an indeterminate state.
4483
+ * @default false
4484
+ */
4485
+ isIndeterminate?: boolean;
4486
+ /**
4487
+ * Sets whether or not to show the progress percentage for the progress bar. Percentage is hidden by default for the `meter` variant.
4488
+ * @default true
4489
+ */
4490
+ showPercentage?: boolean;
4491
+ };
4492
+ declare type ProgressBarMeterProps = ProgressBarCommonProps & {
4493
+ /**
4494
+ * Sets the variant to be rendered for thr progress bar.
4495
+ * @default 'progress'
4496
+ */
4497
+ variant?: Extract<ProgressBarVariant, 'meter'>;
4498
+ /**
4499
+ * Sets whether the progress bar is in an indeterminate state.
4500
+ * @default false
4501
+ */
4502
+ isIndeterminate?: undefined;
4503
+ /**
4504
+ * Sets whether or not to show the progress percentage for the progress bar. Percentage is hidden by default for the `meter` variant.
4505
+ * @default false
4506
+ */
4507
+ showPercentage?: undefined;
4508
+ };
4509
+ declare type ProgressBarProps = ProgressBarProgressProps | ProgressBarMeterProps;
4510
+ declare const ProgressBar: ({ accessibilityLabel, contrast, intent, isIndeterminate, label, showPercentage, size, value, variant, min, max, testID, ...styledProps }: ProgressBarProps) => ReactElement;
4511
+
4512
+ declare type RadioProps = {
4513
+ /**
4514
+ * Sets the label text of the Radio
4515
+ */
4516
+ children: StringChildrenType;
4517
+ /**
4518
+ * Help text for the Radio
4519
+ */
4520
+ helpText?: string;
4521
+ /**
4522
+ * The value to be used in the Radio input.
4523
+ * This is the value that will be returned on form submission.
4524
+ */
4525
+ value: string;
4526
+ /**
4527
+ * If `true`, the Radio will be disabled
4528
+ *
4529
+ * @default false
4530
+ */
4531
+ isDisabled?: boolean;
4532
+ /**
4533
+ * Size of the radios
4534
+ *
4535
+ * @default "medium"
4536
+ */
4537
+ size?: 'small' | 'medium';
4538
+ } & TestID & StyledPropsBlade;
4539
+ declare const Radio: React__default.ForwardRefExoticComponent<{
4540
+ /**
4541
+ * Sets the label text of the Radio
4542
+ */
4543
+ children: StringChildrenType;
4544
+ /**
4545
+ * Help text for the Radio
4546
+ */
4547
+ helpText?: string | undefined;
4548
+ /**
4549
+ * The value to be used in the Radio input.
4550
+ * This is the value that will be returned on form submission.
4551
+ */
4552
+ value: string;
4553
+ /**
4554
+ * If `true`, the Radio will be disabled
4555
+ *
4556
+ * @default false
4557
+ */
4558
+ isDisabled?: boolean | undefined;
4559
+ /**
4560
+ * Size of the radios
4561
+ *
4562
+ * @default "medium"
4563
+ */
4564
+ size?: "small" | "medium" | undefined;
4565
+ } & TestID & Partial<Omit<MakeObjectResponsive<{
4566
+ margin: SpacingValueType | ArrayOfMaxLength4<SpacingValueType>;
4567
+ marginX: SpacingValueType;
4568
+ marginY: SpacingValueType;
4569
+ marginTop: SpacingValueType;
4570
+ marginRight: SpacingValueType;
4571
+ marginBottom: SpacingValueType;
4572
+ marginLeft: SpacingValueType;
4573
+ }> & Pick<MakeObjectResponsive<{
4574
+ gap: SpacingValueType;
4575
+ rowGap: SpacingValueType;
4576
+ columnGap: SpacingValueType;
4577
+ flex: string | number;
4578
+ } & PickIfExist$1<react_native.ViewStyle, "alignContent" | "alignItems" | "alignSelf" | "flexBasis" | "flexDirection" | "flexGrow" | "flexShrink" | "flexWrap" | "justifyContent" | "justifyItems" | "justifySelf" | "order" | "placeSelf"> & {
4579
+ __brand__?: "platform-native" | undefined;
4580
+ }>, "alignSelf" | "justifySelf" | "order" | "placeSelf"> & MakeObjectResponsive<{
4581
+ top: SpacingValueType;
4582
+ right: SpacingValueType;
4583
+ bottom: SpacingValueType;
4584
+ left: SpacingValueType;
4585
+ } & PickIfExist$1<react_native.ViewStyle, "position" | "zIndex"> & {
4586
+ __brand__?: "platform-native" | undefined;
4587
+ }> & Pick<MakeObjectResponsive<PickCSSByPlatform$1<"grid" | "gridAutoColumns" | "gridAutoFlow" | "gridAutoRows" | "gridColumnEnd" | "gridColumnStart" | "gridRowEnd" | "gridRowStart" | "gridTemplateAreas" | "gridTemplateColumns" | "gridTemplateRows" | "gridArea" | "gridColumn" | "gridRow" | "gridTemplate">>, "gridColumnEnd" | "gridColumnStart" | "gridRowEnd" | "gridRowStart" | "gridArea" | "gridColumn" | "gridRow">, "__brand__">> & React__default.RefAttributes<BladeElementRef>>;
4588
+
4589
+ declare type RadioGroupProps = {
4590
+ /**
4591
+ * Accepts multiple radios as children
4592
+ */
4593
+ children: React__default.ReactNode;
4594
+ /**
4595
+ * Help text of the radio group
4596
+ */
4597
+ helpText?: string;
4598
+ /**
4599
+ * Error text of the radio group
4600
+ * Renders when `validationState` is set to 'error'
4601
+ *
4602
+ * Overrides helpText
4603
+ */
4604
+ errorText?: string;
4605
+ /**
4606
+ * Sets the error state of the radioGroup
4607
+ * If set to `error` it will render the `errorText` of the group,
4608
+ * and propagate `invalid` prop to every radio
4609
+ */
4610
+ validationState?: 'error' | 'none';
4611
+ /**
4612
+ * Renders a necessity indicator after radioGroup label
4613
+ *
4614
+ * If set to `undefined` it renders nothing.
4615
+ */
4616
+ necessityIndicator?: 'required' | 'optional' | 'none';
4617
+ /**
4618
+ * Sets the disabled state of the radioGroup
4619
+ * If set to `true` it propagate down to all the radios
4620
+ *
4621
+ * @default false
4622
+ */
4623
+ isDisabled?: boolean;
4624
+ /**
4625
+ * Renders the label of the radio group
4626
+ */
4627
+ label: string;
4628
+ /**
4629
+ * Sets the position of the label
4630
+ *
4631
+ * @default 'top'
4632
+ */
4633
+ labelPosition?: 'top' | 'left';
4634
+ /**
4635
+ * Initial value of the radio group
4636
+ */
4637
+ defaultValue?: string;
4638
+ /**
4639
+ * value of the radio group
4640
+ *
4641
+ * Use `onChange` to update its value
4642
+ */
4643
+ value?: string;
4644
+ /**
4645
+ * The callback invoked when any of the radio's state changes
4646
+ */
4647
+ onChange?: ({ name, value }: {
4648
+ name: string | undefined;
4649
+ value: string;
4650
+ }) => void;
4651
+ /**
4652
+ * The name of the input field in a radio
4653
+ * (Useful for form submission).
4654
+ */
4655
+ name?: string;
4656
+ /**
4657
+ * Size of the radios
4658
+ *
4659
+ * @default "medium"
4660
+ */
4661
+ size?: 'small' | 'medium';
4662
+ } & TestID & StyledPropsBlade;
4663
+ declare const RadioGroup: ({ children, label, helpText, isDisabled, necessityIndicator, labelPosition, validationState, errorText, name, defaultValue, onChange, value, size, testID, ...styledProps }: RadioGroupProps) => React__default.ReactElement;
4664
+
4665
+ declare type BaseSpinnerProps = {
4666
+ intent?: Feedback;
4667
+ /**
4668
+ * Sets the label of the spinner.
4669
+ *
4670
+ * @default 'right'
4671
+ */
4672
+ label?: string;
4673
+ /**
4674
+ * Sets the label of the spinner.
4675
+ *
4676
+ */
4677
+ labelPosition?: 'right' | 'bottom';
4678
+ /**
4679
+ * Sets the contrast of the spinner.
4680
+ *
4681
+ * @default 'low'
4682
+ */
4683
+ contrast?: ColorContrastTypes;
4684
+ /**
4685
+ * Sets the size of the spinner.
4686
+ *
4687
+ * @default 'medium'
4688
+ */
4689
+ size?: 'medium' | 'large' | 'xlarge';
4690
+ /**
4691
+ * Sets the aria-label for web & accessibilityLabel react-native.
4692
+ *
4693
+ */
4694
+ accessibilityLabel: string;
4695
+ } & TestID & StyledPropsBlade;
4696
+
4697
+ declare type SpinnerProps = Omit<BaseSpinnerProps, 'intent'>;
4698
+ declare const Spinner: ({ label, labelPosition, accessibilityLabel, contrast, size, testID, ...styledProps }: SpinnerProps) => React.ReactElement;
4699
+
4700
+ declare type SkipNavLinkProps = {
4701
+ id?: string;
4702
+ children?: StringChildrenType;
4703
+ };
4704
+ declare const SkipNavLink: (_props: SkipNavLinkProps) => never;
4705
+ declare const SkipNavContent: (_props: SkipNavLinkProps) => never;
4706
+
4707
+ declare type VisuallyHiddenProps = {
4708
+ children: React.ReactNode;
4709
+ } & TestID;
4710
+
4711
+ declare const VisuallyHidden: ({ children, testID }: VisuallyHiddenProps) => JSX.Element;
4712
+
4713
+ /**
4714
+ * Screen reader class adapted from webaim
4715
+ * https://webaim.org/techniques/css/invisiblecontent/#techniques
4716
+ */
4717
+ declare const screenReaderStyles: CSSObject;
4718
+
4719
+ declare type Currency = 'INR' | 'MYR';
4720
+ declare type AmountProps = {
4721
+ /**
4722
+ * The value to be rendered within the component.
4723
+ *
4724
+ */
4725
+ value: number;
4726
+ /**
4727
+ * Sets the intent of the amount.
4728
+ *
4729
+ * @default undefined
4730
+ */
4731
+ intent?: Exclude<Feedback, 'neutral'>;
4732
+ /**
4733
+ * Sets the size of the amount.
4734
+ *
4735
+ * @default 'body-medium'
4736
+ */
4737
+ size?: 'body-medium-bold' | 'body-small' | 'body-small-bold' | 'body-medium' | 'body-medium-bold' | 'heading-small' | 'heading-small-bold' | 'heading-large' | 'heading-large-bold' | 'title-small' | 'title-medium';
4738
+ /**
4739
+ * Indicates what the suffix of amount should be
4740
+ *
4741
+ * @default 'decimals'
4742
+ */
4743
+ suffix?: 'decimals' | 'none' | 'humanize';
4744
+ /**
4745
+ * Makes the prefix symbol and decimal digits small and faded
4746
+ *
4747
+ * @default true
4748
+ */
4749
+ isAffixSubtle?: true | false;
4750
+ /**
4751
+ * Prefix to be shown before the amount value. The prefix can be either a currency symbol or a currency code.
4752
+ *
4753
+ * @default 'currency-symbol'
4754
+ */
4755
+ prefix?: 'currency-symbol' | 'currency-code';
4756
+ /**
4757
+ * The currency of the amount.
4758
+ *
4759
+ * @default 'INR'
4760
+ * */
4761
+ currency?: Currency;
4762
+ } & TestID & StyledPropsBlade;
4763
+ declare const Amount: ({ value, suffix, size, isAffixSubtle, intent, prefix, testID, currency, ...styledProps }: AmountProps) => ReactElement;
4764
+
4765
+ declare type BaseHeaderProps = {
4766
+ title?: string;
4767
+ subtitle?: string;
4768
+ /**
4769
+ * Leading part of the header placed at the left most side of the header
4770
+ */
4771
+ leading?: React__default.ReactNode;
4772
+ /**
4773
+ * Trailing part of the header placed at the right most side of the header
4774
+ */
4775
+ trailing?: React__default.ReactNode;
4776
+ /**
4777
+ * Placed adjacent to the title text
4778
+ */
4779
+ titleSuffix?: React__default.ReactNode;
4780
+ /**
4781
+ * @default true
4782
+ */
4783
+ showDivider?: boolean;
4784
+ /**
4785
+ * @default false
4786
+ */
4787
+ showBackButton?: boolean;
4788
+ /**
4789
+ * @default true
4790
+ */
4791
+ showCloseButton?: boolean;
4792
+ onCloseButtonClick?: () => void;
4793
+ onBackButtonClick?: () => void;
4794
+ closeButtonRef: React__default.MutableRefObject<any>;
4795
+ } & Pick<ReactDOMAttributes, 'onClickCapture' | 'onKeyDown' | 'onKeyUp' | 'onLostPointerCapture' | 'onPointerCancel' | 'onPointerDown' | 'onPointerMove' | 'onPointerUp'>;
4796
+
4797
+ declare type BaseFooterProps = {
4798
+ children: React__default.ReactNode;
4799
+ showDivider?: boolean;
4800
+ };
4801
+
4802
+ declare type SnapPoints = [number, number, number];
4803
+
4804
+ declare type BottomSheetProps = {
4805
+ children: React.ReactNode;
4806
+ snapPoints?: SnapPoints;
4807
+ onDismiss?: () => void;
4808
+ isOpen?: boolean;
4809
+ initialFocusRef?: React.MutableRefObject<any>;
4810
+ };
4811
+ declare type BottomSheetHeaderProps = Pick<BaseHeaderProps, 'title' | 'subtitle' | 'leading' | 'trailing' | 'titleSuffix' | 'showBackButton' | 'onBackButtonClick'>;
4812
+ declare type BottomSheetFooterProps = Pick<BaseFooterProps, 'children'>;
4813
+
4814
+ declare const BottomSheetHeader: ({ title, subtitle, leading, trailing, titleSuffix, showBackButton, onBackButtonClick, }: BottomSheetHeaderProps) => React__default.ReactElement;
4815
+
4816
+ declare const BottomSheetBody: ({ children }: {
4817
+ children: React__default.ReactNode;
4818
+ }) => React__default.ReactElement;
4819
+
4820
+ declare const BottomSheetFooter: ({ children }: BottomSheetFooterProps) => React__default.ReactElement;
4821
+
4822
+ declare const BottomSheet: ({ children, snapPoints, isOpen, onDismiss, initialFocusRef, }: BottomSheetProps) => React__default.ReactElement;
4823
+
4824
+ export { ActionList, ActionListFooter, ActionListFooterIcon, ActionListFooterProps, ActionListHeader, ActionListHeaderIcon, ActionListHeaderProps, ActionListItem, ActionListItemAsset, ActionListItemAssetProps, ActionListItemIcon, ActionListItemProps, ActionListItemText, ActionListProps, ActionListSection, ActionListSectionDivider, ActionListSectionProps, ActivityIcon, AirplayIcon, Alert, AlertCircleIcon, AlertTriangleIcon as AlertOctagonIcon, AlertOnlyIcon, AlertProps, AlertTriangleIcon$1 as AlertTriangleIcon, AlignCenterIcon, AlignJustifyIcon, AlignLeftIcon, AlignRightIcon, Amount, AmountProps, AnchorIcon, AnnouncementIcon, ApertureIcon, AppStoreIcon, ArrowDownIcon, ArrowDownLeftIcon, ArrowDownRightIcon, ArrowLeftIcon, ArrowRightIcon, ArrowUpIcon, ArrowUpLeftIcon, ArrowUpRightIcon, AtSignIcon, Attachment as AttachmentIcon, AwardIcon, Badge, BadgeProps, BankIcon, BarChartAltIcon, BarChartIcon, BatteryChargingIcon, BatteryIcon, BellIcon, BellOffIcon, BillIcon, BladeProvider, BladeProviderProps, BluetoothIcon, BoldIcon, BookIcon, BookmarkIcon, BottomSheet, BottomSheetBody, BottomSheetFooter, BottomSheetFooterProps, BottomSheetHeader, BottomSheetHeaderProps, BottomSheetProps, Box, BoxIcon, BoxProps, BoxRefType, BriefcaseIcon, BulkPayoutsIcon, Button, ButtonProps, CalendarIcon, CameraIcon, CameraOffIcon, Card, CardBody, CardFooter, CardFooterAction, CardFooterLeading, CardFooterTrailing, CardHeader, CardHeaderBadge, CardHeaderCounter, CardHeaderIcon, CardHeaderIconButton, CardHeaderLeading, CardHeaderLink, CardHeaderText, CardHeaderTrailing, CardProps, CastIcon, CheckCircleIcon, CheckIcon, CheckSquareIcon, Checkbox, CheckboxGroup, CheckboxGroupProps, CheckboxProps, ChevronDownIcon, ChevronLeftIcon, ChevronRightIcon, ChevronUpIcon, ChevronsDownIcon, ChevronsLeftIcon, ChevronsRightIcon, ChevronsUpIcon, ChromeIcon, CircleIcon, ClipboardIcon, ClockIcon, CloseIcon, CloudDrizzleIcon, CloudIcon, CloudLightningIcon, CloudOffIcon, CloudRainIcon, CloudSnowIcon, Code, CodeProps, CodepenIcon, CoinsIcon, CommandIcon, CompassIcon, ComponentIds, CopyIcon, CornerDownLeftIcon, CornerDownRightIcon, CornerLeftDownIcon, CornerLeftUpIcon, CornerRightDownIcon, CornerRightUpIcon, CornerUpLeftIcon, CornerUpRightIcon, Counter, CounterProps, CpuIcon, CreditCardIcon, CropIcon, CrosshairIcon, CustomersIcon, CutIcon, DashboardIcon, DeleteIcon, DiscIcon, DollarIcon, DollarsIcon, DownloadCloudIcon, DownloadIcon, Dropdown, DropdownButton, DropdownOverlay, DropdownOverlayProps, DropdownProps, DropletIcon, EditComposeIcon, EditIcon, EditInlineIcon, ExportIcon, ExternalLinkIcon, EyeIcon, EyeOffIcon, FacebookIcon, FastForwardIcon, FeatherIcon, FileIcon, FileMinusIcon, FilePlusIcon, FileTextIcon, FilmIcon, FilterIcon, FlagIcon, FolderIcon, FullScreenEnterIcon, FullScreenExitIcon, GithubIcon, GitlabIcon, GlobeIcon, GridIcon, HashIcon, Heading, HeadingProps, HeadphonesIcon, HeartIcon, HelpCircleIcon, HistoryIcon, HomeIcon, IconButton, IconButtonProps, IconComponent, IconProps, IconSize, ImageIcon, InboxIcon, Indicator, IndicatorProps, InfoIcon, InstagramIcon, InvoicesIcon, ItalicIcon, LayersIcon, LayoutIcon, LifeBuoyIcon, Link, LinkIcon, LinkProps, List, ListIcon, ListItem, ListItemCode, ListItemCodeProps, ListItemLink, ListItemLinkProps, ListItemProps, ListProps, LoaderIcon, LockIcon, LogInIcon, LogOutIcon, MailIcon, MailOpenIcon, MapIcon, MapPinIcon, MaximizeIcon, MenuDotsIcon, MenuIcon, MessageCircleIcon, MessageSquareIcon, MicIcon, MicOffIcon, MinimizeIcon, MinusCircleIcon, MinusIcon, MinusSquareIcon, MonitorIcon, MoonIcon, MoreHorizontalIcon, MoreVerticalIcon, MoveIcon, MusicIcon, MyAccountIcon, NavigationIcon, OTPInput, OTPInputProps, OctagonIcon, OffersIcon, PackageIcon, PaperclipIcon, PasswordInput, PasswordInputProps, PauseCircleIcon, PauseIcon, PaymentButtonsIcon, PaymentLinksIcon, PaymentPagesIcon, PercentIcon, PhoneCallIcon, PhoneForwardedIcon, PhoneIcon, PhoneIncomingIcon, PhoneMissedIcon, PhoneOffIcon, PhoneOutgoingIcon, PieChartIcon, PlayCircleIcon, PlayIcon, PlusCircleIcon, PlusIcon, PlusSquareIcon, PocketIcon, PowerIcon, PrinterIcon, ProgressBar, ProgressBarProps, ProgressBarVariant, QRCodeIcon, Radio, RadioGroup, RadioGroupProps, RadioIcon, RadioProps, RazorpayIcon, RazorpayXIcon, RefreshIcon, RepeatIcon, ReportsIcon, RewindIcon, RotateClockWiseIcon, RotateCounterClockWiseIcon, RoutesIcon, RupeeIcon, RupeesIcon, SaveIcon, ScissorsIcon, SearchIcon, SelectInput, SelectInputProps, SendIcon, ServerIcon, SettingsIcon, SettlementsIcon, ShareIcon, ShieldIcon, ShoppingCartIcon, ShuffleIcon, SidebarIcon, SkipBackIcon, SkipForwardIcon, SkipNavContent, SkipNavLink, SlackIcon, SlashIcon, SlidersIcon, SmartCollectIcon, SmartphoneIcon, SpeakerIcon, Spinner, SpinnerProps, SquareIcon, StampIcon, StarIcon, StopCircleIcon, SubscriptionsIcon, SunIcon, SunriseIcon, SunsetIcon, TabletIcon, TagIcon, TargetIcon, Text, TextArea, TextAreaProps, TextInput, TextInputProps, TextProps, TextVariant, Theme, ThermometerIcon, ThumbsDownIcon, ThumbsUpIcon, Title, TitleProps, ToggleLeftIcon, ToggleRightIcon, TransactionsIcon, TrashIcon, TrendingDownIcon, TrendingUpIcon, TriangleIcon, TvIcon, TwitterIcon, TypeIcon, UmbrellaIcon, UnderlineIcon, UnlockIcon, UploadCloudIcon, UploadIcon, UserCheckIcon, UserIcon, UserMinusIcon, UserPlusIcon, UserXIcon, UsersIcon, VideoIcon, VideoOffIcon, VisuallyHidden, VisuallyHiddenProps, VoicemailIcon, VolumeHighIcon, VolumeIcon, VolumeLowIcon, VolumeMuteIcon, WatchIcon, WifiIcon, WifiOffIcon, WindIcon, XCircleIcon, XSquareIcon, ZapIcon, ZoomInIcon, ZoomOutIcon, announce, clearAnnouncer, destroyAnnouncer, getTextProps, screenReaderStyles, useActionListContext, useTheme };