@razorpay/blade 6.5.2 → 6.6.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +19 -0
- package/build/components/index.d.ts +118 -171
- package/build/components/index.native.d.ts +122 -178
- package/build/components/index.native.js +31 -29
- package/build/components/index.native.js.map +1 -1
- package/build/components/index.web.js +331 -183
- package/build/components/index.web.js.map +1 -1
- package/build/css/bankingThemeDarkDesktop.css +2 -1
- package/build/css/bankingThemeDarkMobile.css +2 -1
- package/build/css/bankingThemeLightDesktop.css +2 -1
- package/build/css/bankingThemeLightMobile.css +2 -1
- package/build/css/paymentThemeDarkDesktop.css +2 -1
- package/build/css/paymentThemeDarkMobile.css +2 -1
- package/build/css/paymentThemeLightDesktop.css +2 -1
- package/build/css/paymentThemeLightMobile.css +2 -1
- package/build/tokens/index.d.ts +19 -0
- package/build/tokens/index.native.d.ts +19 -0
- package/build/tokens/index.native.js +2 -2
- package/build/tokens/index.native.js.map +1 -1
- package/build/tokens/index.web.js +2 -0
- package/build/tokens/index.web.js.map +1 -1
- package/build/utils/index.d.ts +1 -7
- package/build/utils/index.native.d.ts +1 -7
- package/build/utils/index.native.js.map +1 -1
- package/build/utils/index.web.js +3 -5
- package/build/utils/index.web.js.map +1 -1
- package/package.json +1 -1
|
@@ -438,6 +438,7 @@ type Colors = {
|
|
|
438
438
|
type ColorsWithModes = Record<ColorSchemeModes, Colors>;
|
|
439
439
|
|
|
440
440
|
type ThemeTokens = {
|
|
441
|
+
name: 'paymentTheme' | 'bankingTheme' | StringWithAutocomplete; // Can be used to watch over state changes between theme without watching over entire theme object
|
|
441
442
|
border: Border;
|
|
442
443
|
breakpoints: Breakpoints;
|
|
443
444
|
colors: ColorsWithModes;
|
|
@@ -447,16 +448,6 @@ type ThemeTokens = {
|
|
|
447
448
|
typography: TypographyWithPlatforms;
|
|
448
449
|
};
|
|
449
450
|
|
|
450
|
-
/* eslint-disable @typescript-eslint/no-explicit-any */
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
/**
|
|
454
|
-
* A type defining React component with additional static prop `componentId`
|
|
455
|
-
*/
|
|
456
|
-
type WithComponentId<Props> = ((props: Props) => React__default.ReactElement) & {
|
|
457
|
-
componentId: string;
|
|
458
|
-
};
|
|
459
|
-
|
|
460
451
|
// All the WAI-ARIA 1.1 role attribute values from https://www.w3.org/TR/wai-aria-1.1/#role_definitions
|
|
461
452
|
type AriaRoles =
|
|
462
453
|
| Exclude<AccessibilityRole, 'header' | 'adjustable' | 'image' | 'none' | 'summary'>
|
|
@@ -936,6 +927,24 @@ type DotNotationSpacingStringToken = `spacing.${keyof Spacing}`;
|
|
|
936
927
|
*/
|
|
937
928
|
type StringChildrenType = React__default.ReactText | React__default.ReactText[];
|
|
938
929
|
|
|
930
|
+
/**
|
|
931
|
+
*
|
|
932
|
+
* When combined with union, this type utility will give you autocomplete of union while still supporting any string value as input
|
|
933
|
+
*
|
|
934
|
+
* ### Usage
|
|
935
|
+
*
|
|
936
|
+
* ```ts
|
|
937
|
+
* type ThemeName = 'paymentTheme' | 'bankingTheme' | StringWithAutocomplete;
|
|
938
|
+
* ```
|
|
939
|
+
*
|
|
940
|
+
* This will show paymentTheme and bankingTheme in autocomplete but also allow any other string as value.
|
|
941
|
+
*
|
|
942
|
+
* More details - https://github.com/razorpay/blade/pull/1031/commits/86b6ee0facf45e7556739efcbfa5396b11b1b3c9#r1121298293
|
|
943
|
+
* Related TS Issue - https://github.com/microsoft/TypeScript/issues/29729
|
|
944
|
+
*
|
|
945
|
+
*/
|
|
946
|
+
type StringWithAutocomplete = string & Record<never, never>;
|
|
947
|
+
|
|
939
948
|
type TestID$1 = {
|
|
940
949
|
testID?: string;
|
|
941
950
|
};
|
|
@@ -994,6 +1003,7 @@ declare type ActionListProps = {
|
|
|
994
1003
|
declare const ActionList: ({ children, surfaceLevel, testID }: ActionListProps) => JSX.Element;
|
|
995
1004
|
|
|
996
1005
|
type Theme$1 = {
|
|
1006
|
+
name: ThemeTokens['name'];
|
|
997
1007
|
border: Border;
|
|
998
1008
|
breakpoints: Breakpoints;
|
|
999
1009
|
colors: Colors;
|
|
@@ -1459,32 +1469,14 @@ declare type ActionListSectionProps = {
|
|
|
1459
1469
|
*/
|
|
1460
1470
|
_hideDivider?: boolean;
|
|
1461
1471
|
} & TestID$1;
|
|
1462
|
-
declare const ActionListSection:
|
|
1463
|
-
declare const ActionListItemIcon:
|
|
1472
|
+
declare const ActionListSection: ({ title, children, testID, _hideDivider, }: ActionListSectionProps) => JSX.Element;
|
|
1473
|
+
declare const ActionListItemIcon: ({ icon }: {
|
|
1464
1474
|
icon: IconComponent$1;
|
|
1465
|
-
}
|
|
1466
|
-
declare const ActionListItemText:
|
|
1475
|
+
}) => JSX.Element;
|
|
1476
|
+
declare const ActionListItemText: ({ children, }: {
|
|
1467
1477
|
children: StringChildrenType;
|
|
1468
|
-
}
|
|
1469
|
-
|
|
1470
|
-
* ### ActionListItem
|
|
1471
|
-
*
|
|
1472
|
-
* Creates option inside `ActionList`.
|
|
1473
|
-
*
|
|
1474
|
-
* #### Usage
|
|
1475
|
-
*
|
|
1476
|
-
* ```jsx
|
|
1477
|
-
* <ActionList>
|
|
1478
|
-
* <ActionListItem
|
|
1479
|
-
* title="Home"
|
|
1480
|
-
* value="home"
|
|
1481
|
-
* leading={<ActionListItemIcon icon={HomeIcon} />}
|
|
1482
|
-
* trailing={<ActionListItemText>⌘ + S</ActionListItemText>}
|
|
1483
|
-
* />
|
|
1484
|
-
* </ActionList>
|
|
1485
|
-
* ```
|
|
1486
|
-
*/
|
|
1487
|
-
declare const ActionListItem: WithComponentId<ActionListItemProps>;
|
|
1478
|
+
}) => React__default.ReactElement;
|
|
1479
|
+
declare const ActionListItem: (props: ActionListItemProps) => JSX.Element;
|
|
1488
1480
|
|
|
1489
1481
|
declare type ActionListHeaderProps = {
|
|
1490
1482
|
title: string;
|
|
@@ -1495,29 +1487,10 @@ declare type ActionListHeaderProps = {
|
|
|
1495
1487
|
*/
|
|
1496
1488
|
leading?: React__default.ReactNode;
|
|
1497
1489
|
} & TestID$1;
|
|
1498
|
-
|
|
1499
|
-
|
|
1500
|
-
*
|
|
1501
|
-
* To be used inside `ActionList`
|
|
1502
|
-
*
|
|
1503
|
-
* #### Usage
|
|
1504
|
-
*
|
|
1505
|
-
* ```jsx
|
|
1506
|
-
* <ActionListHeader
|
|
1507
|
-
* title="Search Tips"
|
|
1508
|
-
* leading={
|
|
1509
|
-
* <ActionListHeaderIcon
|
|
1510
|
-
* title="Recent Searches"
|
|
1511
|
-
* icon={HistoryIcon}
|
|
1512
|
-
* />
|
|
1513
|
-
* }
|
|
1514
|
-
* />
|
|
1515
|
-
* ```
|
|
1516
|
-
*/
|
|
1517
|
-
declare const ActionListHeader: WithComponentId<ActionListHeaderProps>;
|
|
1518
|
-
declare const ActionListHeaderIcon: WithComponentId<{
|
|
1490
|
+
declare const ActionListHeader: (props: ActionListHeaderProps) => JSX.Element;
|
|
1491
|
+
declare const ActionListHeaderIcon: ({ icon }: {
|
|
1519
1492
|
icon: IconComponent$1;
|
|
1520
|
-
}
|
|
1493
|
+
}) => React__default.ReactElement;
|
|
1521
1494
|
|
|
1522
1495
|
declare type ActionListFooterProps = {
|
|
1523
1496
|
title?: string;
|
|
@@ -1534,31 +1507,10 @@ declare type ActionListFooterProps = {
|
|
|
1534
1507
|
*/
|
|
1535
1508
|
trailing?: React__default.ReactNode;
|
|
1536
1509
|
} & TestID$1;
|
|
1537
|
-
|
|
1538
|
-
|
|
1539
|
-
*
|
|
1540
|
-
* To be used inside `ActionList`
|
|
1541
|
-
*
|
|
1542
|
-
* #### Usage
|
|
1543
|
-
*
|
|
1544
|
-
* ```jsx
|
|
1545
|
-
* <ActionListFooter
|
|
1546
|
-
* title="Search Tips"
|
|
1547
|
-
* leading={<ActionListFooterIcon icon={SearchIcon} />}
|
|
1548
|
-
* trailing={
|
|
1549
|
-
* <Button
|
|
1550
|
-
* onClick={() => { console.log('click') }}
|
|
1551
|
-
* >
|
|
1552
|
-
* Apply
|
|
1553
|
-
* </Button>
|
|
1554
|
-
* }
|
|
1555
|
-
* />
|
|
1556
|
-
* ```
|
|
1557
|
-
*/
|
|
1558
|
-
declare const ActionListFooter: WithComponentId<ActionListFooterProps>;
|
|
1559
|
-
declare const ActionListFooterIcon: WithComponentId<{
|
|
1510
|
+
declare const ActionListFooter: (props: ActionListFooterProps) => JSX.Element;
|
|
1511
|
+
declare const ActionListFooterIcon: ({ icon }: {
|
|
1560
1512
|
icon: IconComponent$1;
|
|
1561
|
-
}
|
|
1513
|
+
}) => React__default.ReactElement;
|
|
1562
1514
|
|
|
1563
1515
|
declare type ActionListItemAssetProps = {
|
|
1564
1516
|
/**
|
|
@@ -1572,10 +1524,7 @@ declare type ActionListItemAssetProps = {
|
|
|
1572
1524
|
*/
|
|
1573
1525
|
alt: string;
|
|
1574
1526
|
};
|
|
1575
|
-
|
|
1576
|
-
*
|
|
1577
|
-
*/
|
|
1578
|
-
declare const ActionListItemAsset: WithComponentId<ActionListItemAssetProps>;
|
|
1527
|
+
declare const ActionListItemAsset: (props: ActionListItemAssetProps) => React.ReactElement;
|
|
1579
1528
|
|
|
1580
1529
|
declare type PrimaryAction = {
|
|
1581
1530
|
text: string;
|
|
@@ -1711,6 +1660,7 @@ declare const ThemeContext: React$1.Context<ThemeContext>;
|
|
|
1711
1660
|
declare const useTheme: () => ThemeContext;
|
|
1712
1661
|
|
|
1713
1662
|
declare type Theme = {
|
|
1663
|
+
name: ThemeTokens['name'];
|
|
1714
1664
|
border: Border;
|
|
1715
1665
|
breakpoints: Breakpoints;
|
|
1716
1666
|
colors: Colors;
|
|
@@ -2216,7 +2166,29 @@ declare type LayoutProps = MakeObjectResponsive<{
|
|
|
2216
2166
|
width: SpacingValueType;
|
|
2217
2167
|
minWidth: SpacingValueType;
|
|
2218
2168
|
maxWidth: SpacingValueType;
|
|
2219
|
-
} & Pick<CSSObject, '
|
|
2169
|
+
} & Pick<CSSObject, 'overflow' | 'overflowX' | 'overflowY'> & Platform.Select<{
|
|
2170
|
+
web: {
|
|
2171
|
+
/**
|
|
2172
|
+
*
|
|
2173
|
+
* On Web, The **`display`** CSS property sets whether an element is treated as a block or inline element and the layout used for its children, such as flow layout, grid or flex.
|
|
2174
|
+
*
|
|
2175
|
+
* @see https://developer.mozilla.org/docs/Web/CSS/display
|
|
2176
|
+
*/
|
|
2177
|
+
display: CSSObject['display'];
|
|
2178
|
+
};
|
|
2179
|
+
native: {
|
|
2180
|
+
/**
|
|
2181
|
+
*
|
|
2182
|
+
*
|
|
2183
|
+
* On React Native, **`display`** property sets whether an element can be `flex` or `none`
|
|
2184
|
+
*
|
|
2185
|
+
* @see https://reactnative.dev/docs/layout-props.html#display
|
|
2186
|
+
*
|
|
2187
|
+
* @default 'flex'
|
|
2188
|
+
*/
|
|
2189
|
+
display: 'none' | 'flex';
|
|
2190
|
+
};
|
|
2191
|
+
}>>;
|
|
2220
2192
|
declare type FlexboxProps = MakeObjectResponsive<{
|
|
2221
2193
|
/**
|
|
2222
2194
|
* This uses the native gap property which might not work on older browsers.
|
|
@@ -2337,7 +2309,7 @@ declare const Card: ({ children, surfaceLevel, testID, ...styledProps }: CardPro
|
|
|
2337
2309
|
declare type CardBodyProps = {
|
|
2338
2310
|
children: React__default.ReactNode;
|
|
2339
2311
|
} & TestID$1;
|
|
2340
|
-
declare const CardBody:
|
|
2312
|
+
declare const CardBody: ({ children, testID }: CardBodyProps) => React__default.ReactElement;
|
|
2341
2313
|
|
|
2342
2314
|
declare type LinkCommonProps = {
|
|
2343
2315
|
variant?: 'anchor' | 'button';
|
|
@@ -2354,7 +2326,25 @@ declare type LinkCommonProps = {
|
|
|
2354
2326
|
* @default medium
|
|
2355
2327
|
*/
|
|
2356
2328
|
size?: 'small' | 'medium';
|
|
2357
|
-
} & TestID$1 & StyledPropsBlade
|
|
2329
|
+
} & TestID$1 & StyledPropsBlade & Platform.Select<{
|
|
2330
|
+
native: {
|
|
2331
|
+
/**
|
|
2332
|
+
* Defines how far your touch can start away from the link
|
|
2333
|
+
*/
|
|
2334
|
+
hitSlop?: {
|
|
2335
|
+
top?: number;
|
|
2336
|
+
right?: number;
|
|
2337
|
+
bottom?: number;
|
|
2338
|
+
left?: number;
|
|
2339
|
+
} | number;
|
|
2340
|
+
};
|
|
2341
|
+
web: {
|
|
2342
|
+
/**
|
|
2343
|
+
* This is a react-native only prop and has no effect on web.
|
|
2344
|
+
*/
|
|
2345
|
+
hitSlop?: undefined;
|
|
2346
|
+
};
|
|
2347
|
+
}>;
|
|
2358
2348
|
declare type LinkWithoutIconProps = LinkCommonProps & {
|
|
2359
2349
|
icon?: undefined;
|
|
2360
2350
|
children: StringChildrenType;
|
|
@@ -2379,7 +2369,7 @@ declare type LinkButtonVariantProps = LinkPropsWithOrWithoutIcon & {
|
|
|
2379
2369
|
rel?: undefined;
|
|
2380
2370
|
};
|
|
2381
2371
|
declare type LinkProps = LinkAnchorVariantProps | LinkButtonVariantProps;
|
|
2382
|
-
declare const Link: ({ children, icon, iconPosition, isDisabled, onClick, variant, href, target, rel, accessibilityLabel, size, testID, ...styledProps }: LinkProps) => ReactElement;
|
|
2372
|
+
declare const Link: ({ children, icon, iconPosition, isDisabled, onClick, variant, href, target, rel, accessibilityLabel, size, testID, hitSlop, ...styledProps }: LinkProps) => ReactElement;
|
|
2383
2373
|
|
|
2384
2374
|
type BladeElementRef = Pick<HTMLElement, 'focus' | 'scrollIntoView'> | Pick<View, 'focus'>;
|
|
2385
2375
|
|
|
@@ -2523,23 +2513,23 @@ type CounterProps$1 = {
|
|
|
2523
2513
|
} & TestID$1 &
|
|
2524
2514
|
StyledPropsBlade;
|
|
2525
2515
|
|
|
2526
|
-
declare const CardHeaderIcon:
|
|
2516
|
+
declare const CardHeaderIcon: ({ icon }: {
|
|
2527
2517
|
icon: IconComponent$1;
|
|
2528
|
-
}
|
|
2529
|
-
declare const CardHeaderCounter:
|
|
2530
|
-
declare const CardHeaderBadge:
|
|
2531
|
-
declare const CardHeaderText:
|
|
2518
|
+
}) => React__default.ReactElement;
|
|
2519
|
+
declare const CardHeaderCounter: (props: CounterProps$1) => React__default.ReactElement;
|
|
2520
|
+
declare const CardHeaderBadge: (props: BadgeProps) => React__default.ReactElement;
|
|
2521
|
+
declare const CardHeaderText: (props: TextProps$1<{
|
|
2532
2522
|
variant: TextVariant$1;
|
|
2533
|
-
}
|
|
2534
|
-
declare const CardHeaderLink:
|
|
2523
|
+
}>) => React__default.ReactElement;
|
|
2524
|
+
declare const CardHeaderLink: (props: LinkProps) => React__default.ReactElement;
|
|
2535
2525
|
declare type CardHeaderIconButtonProps = Omit<ButtonProps, 'variant' | 'size' | 'iconPosition' | 'isFullWidth' | 'children'> & {
|
|
2536
2526
|
icon: IconComponent$1;
|
|
2537
2527
|
};
|
|
2538
|
-
declare const CardHeaderIconButton:
|
|
2528
|
+
declare const CardHeaderIconButton: (props: CardHeaderIconButtonProps) => React__default.ReactElement;
|
|
2539
2529
|
declare type CardHeaderProps = {
|
|
2540
2530
|
children?: React__default.ReactNode;
|
|
2541
2531
|
} & TestID$1;
|
|
2542
|
-
declare const CardHeader:
|
|
2532
|
+
declare const CardHeader: ({ children, testID }: CardHeaderProps) => React__default.ReactElement;
|
|
2543
2533
|
declare type CardHeaderLeadingProps = {
|
|
2544
2534
|
title: string;
|
|
2545
2535
|
subtitle?: string;
|
|
@@ -2556,7 +2546,7 @@ declare type CardHeaderLeadingProps = {
|
|
|
2556
2546
|
*/
|
|
2557
2547
|
suffix?: React__default.ReactNode;
|
|
2558
2548
|
};
|
|
2559
|
-
declare const CardHeaderLeading:
|
|
2549
|
+
declare const CardHeaderLeading: ({ title, subtitle, prefix, suffix, }: CardHeaderLeadingProps) => React__default.ReactElement;
|
|
2560
2550
|
declare type CardHeaderTrailingProps = {
|
|
2561
2551
|
/**
|
|
2562
2552
|
* Renders a visual ornament in card header trailing section
|
|
@@ -2565,7 +2555,7 @@ declare type CardHeaderTrailingProps = {
|
|
|
2565
2555
|
*/
|
|
2566
2556
|
visual?: React__default.ReactNode;
|
|
2567
2557
|
};
|
|
2568
|
-
declare const CardHeaderTrailing:
|
|
2558
|
+
declare const CardHeaderTrailing: ({ visual }: CardHeaderTrailingProps) => React__default.ReactElement;
|
|
2569
2559
|
|
|
2570
2560
|
declare type CardFooterAction = Pick<ButtonProps, 'type' | 'accessibilityLabel' | 'isLoading' | 'isDisabled' | 'icon' | 'iconPosition' | 'onClick'> & {
|
|
2571
2561
|
text: ButtonProps['children'];
|
|
@@ -2573,19 +2563,19 @@ declare type CardFooterAction = Pick<ButtonProps, 'type' | 'accessibilityLabel'
|
|
|
2573
2563
|
declare type CardFooterProps = {
|
|
2574
2564
|
children?: React__default.ReactNode;
|
|
2575
2565
|
} & TestID$1;
|
|
2576
|
-
declare const CardFooter:
|
|
2566
|
+
declare const CardFooter: ({ children, testID }: CardFooterProps) => React__default.ReactElement;
|
|
2577
2567
|
declare type CardFooterLeadingProps = {
|
|
2578
2568
|
title?: string;
|
|
2579
2569
|
subtitle?: string;
|
|
2580
2570
|
};
|
|
2581
|
-
declare const CardFooterLeading:
|
|
2571
|
+
declare const CardFooterLeading: ({ title, subtitle }: CardFooterLeadingProps) => React__default.ReactElement;
|
|
2582
2572
|
declare type CardFooterTrailingProps = {
|
|
2583
2573
|
actions?: {
|
|
2584
2574
|
primary?: CardFooterAction;
|
|
2585
2575
|
secondary?: CardFooterAction;
|
|
2586
2576
|
};
|
|
2587
2577
|
};
|
|
2588
|
-
declare const CardFooterTrailing:
|
|
2578
|
+
declare const CardFooterTrailing: ({ actions }: CardFooterTrailingProps) => React__default.ReactElement;
|
|
2589
2579
|
|
|
2590
2580
|
declare type IconButtonProps = {
|
|
2591
2581
|
/**
|
|
@@ -2924,44 +2914,13 @@ declare type DropdownProps = {
|
|
|
2924
2914
|
selectionType?: 'single' | 'multiple';
|
|
2925
2915
|
children: React__default.ReactNode[];
|
|
2926
2916
|
} & StyledPropsBlade;
|
|
2927
|
-
|
|
2928
|
-
* ### Dropdown component
|
|
2929
|
-
*
|
|
2930
|
-
* Dropdown component is generic component that controls the dropdown functionality.
|
|
2931
|
-
* It can be used with multiple triggers and mostly contains ActionList component inside it
|
|
2932
|
-
*
|
|
2933
|
-
* ---
|
|
2934
|
-
*
|
|
2935
|
-
* #### Usage
|
|
2936
|
-
*
|
|
2937
|
-
* ```jsx
|
|
2938
|
-
* <Dropdown selectionType="single">
|
|
2939
|
-
* <SelectInput />
|
|
2940
|
-
* <DropdownOverlay>
|
|
2941
|
-
* <ActionList>
|
|
2942
|
-
* <ActionListItem />
|
|
2943
|
-
* <ActionListItem />
|
|
2944
|
-
* </ActionList>
|
|
2945
|
-
* </DropdownOverlay>
|
|
2946
|
-
* </Dropdown>
|
|
2947
|
-
* ```
|
|
2948
|
-
*
|
|
2949
|
-
* ---
|
|
2950
|
-
*
|
|
2951
|
-
* Checkout {@link https://blade.razorpay.com/?path=/docs/components-dropdown-with-select--with-single-select Dropdown Documentation}
|
|
2952
|
-
*/
|
|
2953
|
-
declare const Dropdown: WithComponentId<DropdownProps>;
|
|
2917
|
+
declare const Dropdown: ({ children, selectionType, ...styledProps }: DropdownProps) => JSX.Element;
|
|
2954
2918
|
|
|
2955
2919
|
declare type DropdownOverlayProps = {
|
|
2956
2920
|
children: React__default.ReactNode;
|
|
2957
2921
|
} & TestID$1;
|
|
2958
2922
|
|
|
2959
|
-
|
|
2960
|
-
* Overlay of dropdown
|
|
2961
|
-
*
|
|
2962
|
-
* Wrap your ActionList within this component
|
|
2963
|
-
*/
|
|
2964
|
-
declare const DropdownOverlay: WithComponentId<DropdownOverlayProps>;
|
|
2923
|
+
declare const DropdownOverlay: ({ children, testID }: DropdownOverlayProps) => JSX.Element;
|
|
2965
2924
|
|
|
2966
2925
|
declare const ArrowDownIcon: IconComponent;
|
|
2967
2926
|
|
|
@@ -3812,7 +3771,7 @@ declare type TextInputProps = Pick<BaseInputProps, 'label' | 'labelPosition' | '
|
|
|
3812
3771
|
*/
|
|
3813
3772
|
type?: Type;
|
|
3814
3773
|
} & StyledPropsBlade;
|
|
3815
|
-
declare const TextInput: React__default.ForwardRefExoticComponent<Pick<BaseInputProps, "testID" | "placeholder" | "
|
|
3774
|
+
declare const TextInput: React__default.ForwardRefExoticComponent<Pick<BaseInputProps, "testID" | "placeholder" | "name" | "label" | "value" | "onBlur" | "onFocus" | "defaultValue" | "prefix" | "autoCapitalize" | "onChange" | "onSubmit" | "isDisabled" | "autoFocus" | "labelPosition" | "helpText" | "errorText" | "successText" | "necessityIndicator" | "suffix" | "validationState" | "isRequired" | "maxCharacters" | "keyboardReturnKeyType" | "autoCompleteSuggestionType"> & {
|
|
3816
3775
|
/**
|
|
3817
3776
|
* Decides whether to render a clear icon button
|
|
3818
3777
|
*/
|
|
@@ -3901,7 +3860,7 @@ declare type PasswordInputExtraProps = {
|
|
|
3901
3860
|
autoCompleteSuggestionType?: Extract<BaseInputProps['autoCompleteSuggestionType'], 'none' | 'password' | 'newPassword'>;
|
|
3902
3861
|
};
|
|
3903
3862
|
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;
|
|
3904
|
-
declare const PasswordInput: React__default.ForwardRefExoticComponent<Pick<BaseInputProps, "testID" | "placeholder" | "
|
|
3863
|
+
declare const PasswordInput: React__default.ForwardRefExoticComponent<Pick<BaseInputProps, "testID" | "placeholder" | "name" | "label" | "value" | "onBlur" | "onFocus" | "defaultValue" | "onChange" | "onSubmit" | "isDisabled" | "autoFocus" | "labelPosition" | "helpText" | "errorText" | "successText" | "validationState" | "isRequired" | "maxCharacters" | "keyboardReturnKeyType" | "autoCompleteSuggestionType"> & PasswordInputExtraProps & Partial<MakeObjectResponsive<{
|
|
3905
3864
|
margin: SpacingValueType | ArrayOfMaxLength4<SpacingValueType>;
|
|
3906
3865
|
marginX: SpacingValueType;
|
|
3907
3866
|
marginY: SpacingValueType;
|
|
@@ -3946,7 +3905,7 @@ declare type TextAreaProps = Pick<BaseInputProps, 'label' | 'labelPosition' | 'n
|
|
|
3946
3905
|
*/
|
|
3947
3906
|
onClearButtonClick?: () => void;
|
|
3948
3907
|
} & StyledPropsBlade;
|
|
3949
|
-
declare const TextArea: React__default.ForwardRefExoticComponent<Pick<BaseInputProps, "testID" | "placeholder" | "
|
|
3908
|
+
declare const TextArea: React__default.ForwardRefExoticComponent<Pick<BaseInputProps, "testID" | "placeholder" | "name" | "label" | "value" | "onBlur" | "onFocus" | "numberOfLines" | "defaultValue" | "onChange" | "onSubmit" | "isDisabled" | "autoFocus" | "labelPosition" | "helpText" | "errorText" | "successText" | "necessityIndicator" | "validationState" | "isRequired" | "maxCharacters"> & {
|
|
3950
3909
|
/**
|
|
3951
3910
|
* Decides whether to render a clear icon button
|
|
3952
3911
|
*/
|
|
@@ -3990,6 +3949,11 @@ declare const TextArea: React__default.ForwardRefExoticComponent<Pick<BaseInputP
|
|
|
3990
3949
|
gridTemplate?: undefined;
|
|
3991
3950
|
}, "gridColumnEnd" | "gridColumnStart" | "gridRowEnd" | "gridRowStart" | "gridArea" | "gridColumn" | "gridRow">> & React__default.RefAttributes<BladeElementRef>>;
|
|
3992
3951
|
|
|
3952
|
+
declare type FormInputOnEventWithIndex = ({ name, value, inputIndex, }: {
|
|
3953
|
+
name?: string;
|
|
3954
|
+
value?: string;
|
|
3955
|
+
inputIndex: number;
|
|
3956
|
+
}) => void;
|
|
3993
3957
|
declare type OTPInputProps = Pick<BaseInputProps, 'label' | 'labelPosition' | 'validationState' | 'helpText' | 'errorText' | 'successText' | 'name' | 'onChange' | 'value' | 'isDisabled' | 'autoFocus' | 'keyboardReturnKeyType' | 'keyboardType' | 'placeholder' | 'testID'> & {
|
|
3994
3958
|
/**
|
|
3995
3959
|
* Determines the number of input fields to show for the OTP
|
|
@@ -4018,6 +3982,14 @@ declare type OTPInputProps = Pick<BaseInputProps, 'label' | 'labelPosition' | 'v
|
|
|
4018
3982
|
*
|
|
4019
3983
|
*/
|
|
4020
3984
|
autoCompleteSuggestionType?: Extract<BaseInputProps['autoCompleteSuggestionType'], 'none' | 'oneTimeCode'>;
|
|
3985
|
+
/**
|
|
3986
|
+
* The callback function to be invoked when one of the input fields gets focus
|
|
3987
|
+
*/
|
|
3988
|
+
onFocus?: FormInputOnEventWithIndex;
|
|
3989
|
+
/**
|
|
3990
|
+
* The callback function to be invoked when one of the input fields is blurred
|
|
3991
|
+
*/
|
|
3992
|
+
onBlur?: FormInputOnEventWithIndex;
|
|
4021
3993
|
} & StyledPropsBlade;
|
|
4022
3994
|
/**
|
|
4023
3995
|
* OTPInput component can be used for accepting OTPs sent to users for authentication/verification purposes.
|
|
@@ -4033,7 +4005,7 @@ declare type OTPInputProps = Pick<BaseInputProps, 'label' | 'labelPosition' | 'v
|
|
|
4033
4005
|
* />
|
|
4034
4006
|
* ```
|
|
4035
4007
|
*/
|
|
4036
|
-
declare const OTPInput: ({ autoFocus, errorText, helpText, isDisabled, keyboardReturnKeyType, keyboardType, label, labelPosition, name, onChange, onOTPFilled, otpLength, placeholder, successText, validationState, value, isMasked, autoCompleteSuggestionType, testID, ...styledProps }: OTPInputProps) => React__default.ReactElement;
|
|
4008
|
+
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;
|
|
4037
4009
|
|
|
4038
4010
|
declare type SelectInputProps = Pick<BaseInputProps, 'label' | 'labelPosition' | 'necessityIndicator' | 'validationState' | 'helpText' | 'errorText' | 'successText' | 'name' | 'isDisabled' | 'isRequired' | 'prefix' | 'suffix' | 'autoFocus' | 'onClick' | 'onFocus' | 'onBlur' | 'placeholder' | 'testID'> & {
|
|
4039
4011
|
icon?: IconComponent$1;
|
|
@@ -4069,7 +4041,7 @@ declare type SelectInputProps = Pick<BaseInputProps, 'label' | 'labelPosition' |
|
|
|
4069
4041
|
*
|
|
4070
4042
|
* Checkout {@link https://blade.razorpay.com/?path=/docs/components-dropdown-with-select--with-single-select SelectInput Documentation}.
|
|
4071
4043
|
*/
|
|
4072
|
-
declare const SelectInput: React__default.ForwardRefExoticComponent<Pick<BaseInputProps, "testID" | "placeholder" | "
|
|
4044
|
+
declare const SelectInput: React__default.ForwardRefExoticComponent<Pick<BaseInputProps, "testID" | "placeholder" | "name" | "label" | "onBlur" | "onFocus" | "onClick" | "prefix" | "isDisabled" | "autoFocus" | "labelPosition" | "helpText" | "errorText" | "successText" | "necessityIndicator" | "suffix" | "validationState" | "isRequired"> & {
|
|
4073
4045
|
icon?: IconComponent$1 | undefined;
|
|
4074
4046
|
onChange?: (({ name, values }: {
|
|
4075
4047
|
name?: string | undefined;
|
|
@@ -4131,10 +4103,7 @@ declare type ListItemProps = {
|
|
|
4131
4103
|
*/
|
|
4132
4104
|
_itemNumber?: undefined;
|
|
4133
4105
|
} & TestID$1;
|
|
4134
|
-
declare const ListItem: {
|
|
4135
|
-
({ children, icon, _itemNumber, testID, }: ListItemProps): React__default.ReactElement;
|
|
4136
|
-
componentId: string;
|
|
4137
|
-
};
|
|
4106
|
+
declare const ListItem: ({ children, icon, _itemNumber, testID, }: ListItemProps) => React__default.ReactElement;
|
|
4138
4107
|
|
|
4139
4108
|
declare type ListCommonProps = {
|
|
4140
4109
|
/**
|
|
@@ -4164,36 +4133,10 @@ declare type ListWithoutIconProps = ListCommonProps & {
|
|
|
4164
4133
|
icon?: undefined;
|
|
4165
4134
|
};
|
|
4166
4135
|
declare type ListProps = ListWithIconProps | ListWithoutIconProps;
|
|
4167
|
-
|
|
4168
|
-
* List Component is used to display a set of related items that are composed of text/links. Each list item begins with a bullet or a number.
|
|
4169
|
-
*
|
|
4170
|
-
* ## Usage
|
|
4171
|
-
*
|
|
4172
|
-
* ```tsx
|
|
4173
|
-
* <List
|
|
4174
|
-
* variant='unordered'
|
|
4175
|
-
* size='medium'
|
|
4176
|
-
* >
|
|
4177
|
-
* <ListItem>
|
|
4178
|
-
* Item 1
|
|
4179
|
-
* <List>
|
|
4180
|
-
* <ListItem>Item 1.1</ListItem>
|
|
4181
|
-
* </List>
|
|
4182
|
-
* </ListItem>
|
|
4183
|
-
* <ListItem>Item 2</ListItem>
|
|
4184
|
-
* <List />
|
|
4185
|
-
* ```
|
|
4186
|
-
*/
|
|
4187
|
-
declare const List: {
|
|
4188
|
-
({ variant, size, children, icon, testID, ...styledProps }: ListProps): React__default.ReactElement;
|
|
4189
|
-
componentId: string;
|
|
4190
|
-
};
|
|
4136
|
+
declare const List: ({ variant, size, children, icon, testID, ...styledProps }: ListProps) => React__default.ReactElement;
|
|
4191
4137
|
|
|
4192
4138
|
declare type ListItemLinkProps = Exclude<LinkProps, 'size' | 'variant' | 'isDisabled'>;
|
|
4193
|
-
declare const ListItemLink: {
|
|
4194
|
-
({ accessibilityLabel, children, href, icon, iconPosition, onClick, rel, target, testID, }: ListItemLinkProps): React.ReactElement;
|
|
4195
|
-
componentId: string;
|
|
4196
|
-
};
|
|
4139
|
+
declare const ListItemLink: ({ accessibilityLabel, children, href, icon, iconPosition, onClick, rel, target, testID, }: ListItemLinkProps) => React.ReactElement;
|
|
4197
4140
|
|
|
4198
4141
|
declare type TitleProps = {
|
|
4199
4142
|
size?: 'small' | 'medium' | 'large';
|
|
@@ -4345,10 +4288,7 @@ declare type CodeProps = {
|
|
|
4345
4288
|
declare const Code: ({ children, size, testID, ...styledProps }: CodeProps) => JSX.Element;
|
|
4346
4289
|
|
|
4347
4290
|
declare type ListItemCodeProps = Exclude<CodeProps, 'size'>;
|
|
4348
|
-
declare const ListItemCode: {
|
|
4349
|
-
({ children, testID }: ListItemCodeProps): React.ReactElement;
|
|
4350
|
-
componentId: string;
|
|
4351
|
-
};
|
|
4291
|
+
declare const ListItemCode: ({ children, testID }: ListItemCodeProps) => React.ReactElement;
|
|
4352
4292
|
|
|
4353
4293
|
declare type Assertiveness = AriaAttributes['liveRegion'];
|
|
4354
4294
|
|
|
@@ -4678,7 +4618,11 @@ declare const BaseBox: styled_components.StyledComponent<typeof View, styled_com
|
|
|
4678
4618
|
width: SpacingValueType;
|
|
4679
4619
|
minWidth: SpacingValueType;
|
|
4680
4620
|
maxWidth: SpacingValueType;
|
|
4681
|
-
} & Pick<styled_components.CSSObject, "
|
|
4621
|
+
} & Pick<styled_components.CSSObject, "overflow" | "overflowX" | "overflowY"> & {
|
|
4622
|
+
display: "none" | "flex";
|
|
4623
|
+
} & {
|
|
4624
|
+
__brand__?: "platform-native" | undefined;
|
|
4625
|
+
}> & MakeObjectResponsive<{
|
|
4682
4626
|
gap: SpacingValueType;
|
|
4683
4627
|
rowGap: SpacingValueType;
|
|
4684
4628
|
columnGap: SpacingValueType;
|
|
@@ -4711,7 +4655,7 @@ declare const BaseBox: styled_components.StyledComponent<typeof View, styled_com
|
|
|
4711
4655
|
children?: React$1.ReactNode | React$1.ReactNode[];
|
|
4712
4656
|
} & TestID>, "backgroundColor" | "as"> & Partial<MakeObjectResponsive<{
|
|
4713
4657
|
borderRadius: "none" | "small" | "medium" | "large" | "max" | "round";
|
|
4714
|
-
backgroundColor: "feedback.background.neutral.lowContrast" | "feedback.background.neutral.highContrast" | "feedback.background.information.lowContrast" | "feedback.background.information.highContrast" | "feedback.background.negative.lowContrast" | "feedback.background.negative.highContrast" | "feedback.background.notice.lowContrast" | "feedback.background.notice.highContrast" | "feedback.background.positive.lowContrast" | "feedback.background.positive.highContrast" | "surface.background.level1.lowContrast" | "surface.background.level1.highContrast" | "surface.background.level2.lowContrast" | "surface.background.level2.highContrast" | "surface.background.level3.lowContrast" | "surface.background.level3.highContrast" | "action.background.primary.disabled" | "action.background.primary.default" | "action.background.primary.hover" | "action.background.primary.focus" | "action.background.primary.active" | "action.background.secondary.disabled" | "action.background.secondary.default" | "action.background.secondary.hover" | "action.background.secondary.focus" | "action.background.secondary.active" | "action.background.tertiary.disabled" | "action.background.tertiary.default" | "action.background.tertiary.hover" | "action.background.tertiary.focus" | "action.background.tertiary.active"
|
|
4658
|
+
backgroundColor: (string & Record<never, never>) | "feedback.background.neutral.lowContrast" | "feedback.background.neutral.highContrast" | "feedback.background.information.lowContrast" | "feedback.background.information.highContrast" | "feedback.background.negative.lowContrast" | "feedback.background.negative.highContrast" | "feedback.background.notice.lowContrast" | "feedback.background.notice.highContrast" | "feedback.background.positive.lowContrast" | "feedback.background.positive.highContrast" | "surface.background.level1.lowContrast" | "surface.background.level1.highContrast" | "surface.background.level2.lowContrast" | "surface.background.level2.highContrast" | "surface.background.level3.lowContrast" | "surface.background.level3.highContrast" | "action.background.primary.disabled" | "action.background.primary.default" | "action.background.primary.hover" | "action.background.primary.focus" | "action.background.primary.active" | "action.background.secondary.disabled" | "action.background.secondary.default" | "action.background.secondary.hover" | "action.background.secondary.focus" | "action.background.secondary.active" | "action.background.tertiary.disabled" | "action.background.tertiary.default" | "action.background.tertiary.hover" | "action.background.tertiary.focus" | "action.background.tertiary.active";
|
|
4715
4659
|
lineHeight: SpacingValueType;
|
|
4716
4660
|
} & Pick<styled_components.CSSObject, "border" | "transform" | "borderBottom" | "borderLeft" | "borderRight" | "borderTop">> & {
|
|
4717
4661
|
className?: string | undefined;
|