@razorpay/blade 6.6.0 → 6.6.2
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 +14 -0
- package/build/components/index.d.ts +62 -167
- package/build/components/index.native.d.ts +62 -170
- package/build/components/index.native.js +28 -26
- package/build/components/index.native.js.map +1 -1
- package/build/components/index.web.js +247 -94
- package/build/components/index.web.js.map +1 -1
- package/build/css/bankingThemeDarkDesktop.css +1 -1
- package/build/css/bankingThemeDarkMobile.css +1 -1
- package/build/css/bankingThemeLightDesktop.css +1 -1
- package/build/css/bankingThemeLightMobile.css +1 -1
- package/build/css/paymentThemeDarkDesktop.css +1 -1
- package/build/css/paymentThemeDarkMobile.css +1 -1
- package/build/css/paymentThemeLightDesktop.css +1 -1
- package/build/css/paymentThemeLightMobile.css +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
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,19 @@
|
|
|
1
1
|
# @razorpay/blade
|
|
2
2
|
|
|
3
|
+
## 6.6.2
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- c7c66051: fix: ListItemLink alignment
|
|
8
|
+
|
|
9
|
+
## 6.6.1
|
|
10
|
+
|
|
11
|
+
### Patch Changes
|
|
12
|
+
|
|
13
|
+
- fe89e6f6: fix: tree-shaking in blade components
|
|
14
|
+
- 7817c9e3: feat(Box): add different types for `display` on react native
|
|
15
|
+
- c6512ba0: fix(Alert, Card): set `box-sizing` as `border-box` for Alert and Card
|
|
16
|
+
|
|
3
17
|
## 6.6.0
|
|
4
18
|
|
|
5
19
|
### Minor Changes
|
|
@@ -447,16 +447,6 @@ type ThemeTokens = {
|
|
|
447
447
|
typography: TypographyWithPlatforms;
|
|
448
448
|
};
|
|
449
449
|
|
|
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
450
|
// All the WAI-ARIA 1.1 role attribute values from https://www.w3.org/TR/wai-aria-1.1/#role_definitions
|
|
461
451
|
type AriaRoles =
|
|
462
452
|
| Exclude<AccessibilityRole, 'header' | 'adjustable' | 'image' | 'none' | 'summary'>
|
|
@@ -1478,32 +1468,14 @@ declare type ActionListSectionProps = {
|
|
|
1478
1468
|
*/
|
|
1479
1469
|
_hideDivider?: boolean;
|
|
1480
1470
|
} & TestID$1;
|
|
1481
|
-
declare const ActionListSection:
|
|
1482
|
-
declare const ActionListItemIcon:
|
|
1471
|
+
declare const ActionListSection: ({ title, children, testID, _hideDivider, }: ActionListSectionProps) => JSX.Element;
|
|
1472
|
+
declare const ActionListItemIcon: ({ icon }: {
|
|
1483
1473
|
icon: IconComponent$1;
|
|
1484
|
-
}
|
|
1485
|
-
declare const ActionListItemText:
|
|
1474
|
+
}) => JSX.Element;
|
|
1475
|
+
declare const ActionListItemText: ({ children, }: {
|
|
1486
1476
|
children: StringChildrenType;
|
|
1487
|
-
}
|
|
1488
|
-
|
|
1489
|
-
* ### ActionListItem
|
|
1490
|
-
*
|
|
1491
|
-
* Creates option inside `ActionList`.
|
|
1492
|
-
*
|
|
1493
|
-
* #### Usage
|
|
1494
|
-
*
|
|
1495
|
-
* ```jsx
|
|
1496
|
-
* <ActionList>
|
|
1497
|
-
* <ActionListItem
|
|
1498
|
-
* title="Home"
|
|
1499
|
-
* value="home"
|
|
1500
|
-
* leading={<ActionListItemIcon icon={HomeIcon} />}
|
|
1501
|
-
* trailing={<ActionListItemText>⌘ + S</ActionListItemText>}
|
|
1502
|
-
* />
|
|
1503
|
-
* </ActionList>
|
|
1504
|
-
* ```
|
|
1505
|
-
*/
|
|
1506
|
-
declare const ActionListItem: WithComponentId<ActionListItemProps>;
|
|
1477
|
+
}) => React__default.ReactElement;
|
|
1478
|
+
declare const ActionListItem: (props: ActionListItemProps) => JSX.Element;
|
|
1507
1479
|
|
|
1508
1480
|
declare type ActionListHeaderProps = {
|
|
1509
1481
|
title: string;
|
|
@@ -1514,29 +1486,10 @@ declare type ActionListHeaderProps = {
|
|
|
1514
1486
|
*/
|
|
1515
1487
|
leading?: React__default.ReactNode;
|
|
1516
1488
|
} & TestID$1;
|
|
1517
|
-
|
|
1518
|
-
|
|
1519
|
-
*
|
|
1520
|
-
* To be used inside `ActionList`
|
|
1521
|
-
*
|
|
1522
|
-
* #### Usage
|
|
1523
|
-
*
|
|
1524
|
-
* ```jsx
|
|
1525
|
-
* <ActionListHeader
|
|
1526
|
-
* title="Search Tips"
|
|
1527
|
-
* leading={
|
|
1528
|
-
* <ActionListHeaderIcon
|
|
1529
|
-
* title="Recent Searches"
|
|
1530
|
-
* icon={HistoryIcon}
|
|
1531
|
-
* />
|
|
1532
|
-
* }
|
|
1533
|
-
* />
|
|
1534
|
-
* ```
|
|
1535
|
-
*/
|
|
1536
|
-
declare const ActionListHeader: WithComponentId<ActionListHeaderProps>;
|
|
1537
|
-
declare const ActionListHeaderIcon: WithComponentId<{
|
|
1489
|
+
declare const ActionListHeader: (props: ActionListHeaderProps) => JSX.Element;
|
|
1490
|
+
declare const ActionListHeaderIcon: ({ icon }: {
|
|
1538
1491
|
icon: IconComponent$1;
|
|
1539
|
-
}
|
|
1492
|
+
}) => React__default.ReactElement;
|
|
1540
1493
|
|
|
1541
1494
|
declare type ActionListFooterProps = {
|
|
1542
1495
|
title?: string;
|
|
@@ -1553,31 +1506,10 @@ declare type ActionListFooterProps = {
|
|
|
1553
1506
|
*/
|
|
1554
1507
|
trailing?: React__default.ReactNode;
|
|
1555
1508
|
} & TestID$1;
|
|
1556
|
-
|
|
1557
|
-
|
|
1558
|
-
*
|
|
1559
|
-
* To be used inside `ActionList`
|
|
1560
|
-
*
|
|
1561
|
-
* #### Usage
|
|
1562
|
-
*
|
|
1563
|
-
* ```jsx
|
|
1564
|
-
* <ActionListFooter
|
|
1565
|
-
* title="Search Tips"
|
|
1566
|
-
* leading={<ActionListFooterIcon icon={SearchIcon} />}
|
|
1567
|
-
* trailing={
|
|
1568
|
-
* <Button
|
|
1569
|
-
* onClick={() => { console.log('click') }}
|
|
1570
|
-
* >
|
|
1571
|
-
* Apply
|
|
1572
|
-
* </Button>
|
|
1573
|
-
* }
|
|
1574
|
-
* />
|
|
1575
|
-
* ```
|
|
1576
|
-
*/
|
|
1577
|
-
declare const ActionListFooter: WithComponentId<ActionListFooterProps>;
|
|
1578
|
-
declare const ActionListFooterIcon: WithComponentId<{
|
|
1509
|
+
declare const ActionListFooter: (props: ActionListFooterProps) => JSX.Element;
|
|
1510
|
+
declare const ActionListFooterIcon: ({ icon }: {
|
|
1579
1511
|
icon: IconComponent$1;
|
|
1580
|
-
}
|
|
1512
|
+
}) => React__default.ReactElement;
|
|
1581
1513
|
|
|
1582
1514
|
declare type ActionListItemAssetProps = {
|
|
1583
1515
|
/**
|
|
@@ -1589,7 +1521,7 @@ declare type ActionListItemAssetProps = {
|
|
|
1589
1521
|
*/
|
|
1590
1522
|
alt: string;
|
|
1591
1523
|
};
|
|
1592
|
-
declare const ActionListItemAsset:
|
|
1524
|
+
declare const ActionListItemAsset: (props: ActionListItemAssetProps) => React.ReactElement;
|
|
1593
1525
|
|
|
1594
1526
|
declare type PrimaryAction = {
|
|
1595
1527
|
text: string;
|
|
@@ -2231,7 +2163,29 @@ declare type LayoutProps = MakeObjectResponsive<{
|
|
|
2231
2163
|
width: SpacingValueType;
|
|
2232
2164
|
minWidth: SpacingValueType;
|
|
2233
2165
|
maxWidth: SpacingValueType;
|
|
2234
|
-
} & Pick<CSSObject, '
|
|
2166
|
+
} & Pick<CSSObject, 'overflow' | 'overflowX' | 'overflowY'> & Platform$1.Select<{
|
|
2167
|
+
web: {
|
|
2168
|
+
/**
|
|
2169
|
+
*
|
|
2170
|
+
* 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.
|
|
2171
|
+
*
|
|
2172
|
+
* @see https://developer.mozilla.org/docs/Web/CSS/display
|
|
2173
|
+
*/
|
|
2174
|
+
display: CSSObject['display'];
|
|
2175
|
+
};
|
|
2176
|
+
native: {
|
|
2177
|
+
/**
|
|
2178
|
+
*
|
|
2179
|
+
*
|
|
2180
|
+
* On React Native, **`display`** property sets whether an element can be `flex` or `none`
|
|
2181
|
+
*
|
|
2182
|
+
* @see https://reactnative.dev/docs/layout-props.html#display
|
|
2183
|
+
*
|
|
2184
|
+
* @default 'flex'
|
|
2185
|
+
*/
|
|
2186
|
+
display: 'none' | 'flex';
|
|
2187
|
+
};
|
|
2188
|
+
}>>;
|
|
2235
2189
|
declare type FlexboxProps = MakeObjectResponsive<{
|
|
2236
2190
|
/**
|
|
2237
2191
|
* This uses the native gap property which might not work on older browsers.
|
|
@@ -2352,7 +2306,7 @@ declare const Card: ({ children, surfaceLevel, testID, ...styledProps }: CardPro
|
|
|
2352
2306
|
declare type CardBodyProps = {
|
|
2353
2307
|
children: React__default.ReactNode;
|
|
2354
2308
|
} & TestID$1;
|
|
2355
|
-
declare const CardBody:
|
|
2309
|
+
declare const CardBody: ({ children, testID }: CardBodyProps) => React__default.ReactElement;
|
|
2356
2310
|
|
|
2357
2311
|
declare type LinkCommonProps = {
|
|
2358
2312
|
variant?: 'anchor' | 'button';
|
|
@@ -2556,23 +2510,23 @@ type CounterProps$1 = {
|
|
|
2556
2510
|
} & TestID$1 &
|
|
2557
2511
|
StyledPropsBlade;
|
|
2558
2512
|
|
|
2559
|
-
declare const CardHeaderIcon:
|
|
2513
|
+
declare const CardHeaderIcon: ({ icon }: {
|
|
2560
2514
|
icon: IconComponent$1;
|
|
2561
|
-
}
|
|
2562
|
-
declare const CardHeaderCounter:
|
|
2563
|
-
declare const CardHeaderBadge:
|
|
2564
|
-
declare const CardHeaderText:
|
|
2515
|
+
}) => React__default.ReactElement;
|
|
2516
|
+
declare const CardHeaderCounter: (props: CounterProps$1) => React__default.ReactElement;
|
|
2517
|
+
declare const CardHeaderBadge: (props: BadgeProps) => React__default.ReactElement;
|
|
2518
|
+
declare const CardHeaderText: (props: TextProps$1<{
|
|
2565
2519
|
variant: TextVariant$1;
|
|
2566
|
-
}
|
|
2567
|
-
declare const CardHeaderLink:
|
|
2520
|
+
}>) => React__default.ReactElement;
|
|
2521
|
+
declare const CardHeaderLink: (props: LinkProps) => React__default.ReactElement;
|
|
2568
2522
|
declare type CardHeaderIconButtonProps = Omit<ButtonProps, 'variant' | 'size' | 'iconPosition' | 'isFullWidth' | 'children'> & {
|
|
2569
2523
|
icon: IconComponent$1;
|
|
2570
2524
|
};
|
|
2571
|
-
declare const CardHeaderIconButton:
|
|
2525
|
+
declare const CardHeaderIconButton: (props: CardHeaderIconButtonProps) => React__default.ReactElement;
|
|
2572
2526
|
declare type CardHeaderProps = {
|
|
2573
2527
|
children?: React__default.ReactNode;
|
|
2574
2528
|
} & TestID$1;
|
|
2575
|
-
declare const CardHeader:
|
|
2529
|
+
declare const CardHeader: ({ children, testID }: CardHeaderProps) => React__default.ReactElement;
|
|
2576
2530
|
declare type CardHeaderLeadingProps = {
|
|
2577
2531
|
title: string;
|
|
2578
2532
|
subtitle?: string;
|
|
@@ -2589,7 +2543,7 @@ declare type CardHeaderLeadingProps = {
|
|
|
2589
2543
|
*/
|
|
2590
2544
|
suffix?: React__default.ReactNode;
|
|
2591
2545
|
};
|
|
2592
|
-
declare const CardHeaderLeading:
|
|
2546
|
+
declare const CardHeaderLeading: ({ title, subtitle, prefix, suffix, }: CardHeaderLeadingProps) => React__default.ReactElement;
|
|
2593
2547
|
declare type CardHeaderTrailingProps = {
|
|
2594
2548
|
/**
|
|
2595
2549
|
* Renders a visual ornament in card header trailing section
|
|
@@ -2598,7 +2552,7 @@ declare type CardHeaderTrailingProps = {
|
|
|
2598
2552
|
*/
|
|
2599
2553
|
visual?: React__default.ReactNode;
|
|
2600
2554
|
};
|
|
2601
|
-
declare const CardHeaderTrailing:
|
|
2555
|
+
declare const CardHeaderTrailing: ({ visual }: CardHeaderTrailingProps) => React__default.ReactElement;
|
|
2602
2556
|
|
|
2603
2557
|
declare type CardFooterAction = Pick<ButtonProps, 'type' | 'accessibilityLabel' | 'isLoading' | 'isDisabled' | 'icon' | 'iconPosition' | 'onClick'> & {
|
|
2604
2558
|
text: ButtonProps['children'];
|
|
@@ -2606,19 +2560,19 @@ declare type CardFooterAction = Pick<ButtonProps, 'type' | 'accessibilityLabel'
|
|
|
2606
2560
|
declare type CardFooterProps = {
|
|
2607
2561
|
children?: React__default.ReactNode;
|
|
2608
2562
|
} & TestID$1;
|
|
2609
|
-
declare const CardFooter:
|
|
2563
|
+
declare const CardFooter: ({ children, testID }: CardFooterProps) => React__default.ReactElement;
|
|
2610
2564
|
declare type CardFooterLeadingProps = {
|
|
2611
2565
|
title?: string;
|
|
2612
2566
|
subtitle?: string;
|
|
2613
2567
|
};
|
|
2614
|
-
declare const CardFooterLeading:
|
|
2568
|
+
declare const CardFooterLeading: ({ title, subtitle }: CardFooterLeadingProps) => React__default.ReactElement;
|
|
2615
2569
|
declare type CardFooterTrailingProps = {
|
|
2616
2570
|
actions?: {
|
|
2617
2571
|
primary?: CardFooterAction;
|
|
2618
2572
|
secondary?: CardFooterAction;
|
|
2619
2573
|
};
|
|
2620
2574
|
};
|
|
2621
|
-
declare const CardFooterTrailing:
|
|
2575
|
+
declare const CardFooterTrailing: ({ actions }: CardFooterTrailingProps) => React__default.ReactElement;
|
|
2622
2576
|
|
|
2623
2577
|
declare type IconButtonProps = {
|
|
2624
2578
|
/**
|
|
@@ -3030,43 +2984,12 @@ declare type DropdownProps = {
|
|
|
3030
2984
|
selectionType?: 'single' | 'multiple';
|
|
3031
2985
|
children: React__default.ReactNode[];
|
|
3032
2986
|
} & StyledPropsBlade;
|
|
3033
|
-
|
|
3034
|
-
* ### Dropdown component
|
|
3035
|
-
*
|
|
3036
|
-
* Dropdown component is generic component that controls the dropdown functionality.
|
|
3037
|
-
* It can be used with multiple triggers and mostly contains ActionList component inside it
|
|
3038
|
-
*
|
|
3039
|
-
* ---
|
|
3040
|
-
*
|
|
3041
|
-
* #### Usage
|
|
3042
|
-
*
|
|
3043
|
-
* ```jsx
|
|
3044
|
-
* <Dropdown selectionType="single">
|
|
3045
|
-
* <SelectInput />
|
|
3046
|
-
* <DropdownOverlay>
|
|
3047
|
-
* <ActionList>
|
|
3048
|
-
* <ActionListItem />
|
|
3049
|
-
* <ActionListItem />
|
|
3050
|
-
* </ActionList>
|
|
3051
|
-
* </DropdownOverlay>
|
|
3052
|
-
* </Dropdown>
|
|
3053
|
-
* ```
|
|
3054
|
-
*
|
|
3055
|
-
* ---
|
|
3056
|
-
*
|
|
3057
|
-
* Checkout {@link https://blade.razorpay.com/?path=/docs/components-dropdown-with-select--with-single-select Dropdown Documentation}
|
|
3058
|
-
*/
|
|
3059
|
-
declare const Dropdown: WithComponentId<DropdownProps>;
|
|
2987
|
+
declare const Dropdown: ({ children, selectionType, ...styledProps }: DropdownProps) => JSX.Element;
|
|
3060
2988
|
|
|
3061
2989
|
declare type DropdownOverlayProps = {
|
|
3062
2990
|
children: React__default.ReactNode;
|
|
3063
2991
|
} & TestID$1;
|
|
3064
|
-
|
|
3065
|
-
* Overlay of dropdown
|
|
3066
|
-
*
|
|
3067
|
-
* Wrap your ActionList within this component
|
|
3068
|
-
*/
|
|
3069
|
-
declare const DropdownOverlay: WithComponentId<DropdownOverlayProps>;
|
|
2992
|
+
declare const DropdownOverlay: ({ children, testID }: DropdownOverlayProps) => JSX.Element;
|
|
3070
2993
|
|
|
3071
2994
|
declare const ArrowDownIcon: IconComponent;
|
|
3072
2995
|
|
|
@@ -4384,10 +4307,7 @@ declare type ListItemProps = {
|
|
|
4384
4307
|
*/
|
|
4385
4308
|
_itemNumber?: undefined;
|
|
4386
4309
|
} & TestID$1;
|
|
4387
|
-
declare const ListItem: {
|
|
4388
|
-
({ children, icon, _itemNumber, testID, }: ListItemProps): React__default.ReactElement;
|
|
4389
|
-
componentId: string;
|
|
4390
|
-
};
|
|
4310
|
+
declare const ListItem: ({ children, icon, _itemNumber, testID, }: ListItemProps) => React__default.ReactElement;
|
|
4391
4311
|
|
|
4392
4312
|
declare type ListCommonProps = {
|
|
4393
4313
|
/**
|
|
@@ -4417,36 +4337,10 @@ declare type ListWithoutIconProps = ListCommonProps & {
|
|
|
4417
4337
|
icon?: undefined;
|
|
4418
4338
|
};
|
|
4419
4339
|
declare type ListProps = ListWithIconProps | ListWithoutIconProps;
|
|
4420
|
-
|
|
4421
|
-
* 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.
|
|
4422
|
-
*
|
|
4423
|
-
* ## Usage
|
|
4424
|
-
*
|
|
4425
|
-
* ```tsx
|
|
4426
|
-
* <List
|
|
4427
|
-
* variant='unordered'
|
|
4428
|
-
* size='medium'
|
|
4429
|
-
* >
|
|
4430
|
-
* <ListItem>
|
|
4431
|
-
* Item 1
|
|
4432
|
-
* <List>
|
|
4433
|
-
* <ListItem>Item 1.1</ListItem>
|
|
4434
|
-
* </List>
|
|
4435
|
-
* </ListItem>
|
|
4436
|
-
* <ListItem>Item 2</ListItem>
|
|
4437
|
-
* <List />
|
|
4438
|
-
* ```
|
|
4439
|
-
*/
|
|
4440
|
-
declare const List: {
|
|
4441
|
-
({ variant, size, children, icon, testID, ...styledProps }: ListProps): React__default.ReactElement;
|
|
4442
|
-
componentId: string;
|
|
4443
|
-
};
|
|
4340
|
+
declare const List: ({ variant, size, children, icon, testID, ...styledProps }: ListProps) => React__default.ReactElement;
|
|
4444
4341
|
|
|
4445
4342
|
declare type ListItemLinkProps = Exclude<LinkProps, 'size' | 'variant' | 'isDisabled'>;
|
|
4446
|
-
declare const ListItemLink: {
|
|
4447
|
-
({ accessibilityLabel, children, href, icon, iconPosition, onClick, rel, target, testID, }: ListItemLinkProps): React.ReactElement;
|
|
4448
|
-
componentId: string;
|
|
4449
|
-
};
|
|
4343
|
+
declare const ListItemLink: ({ accessibilityLabel, children, href, icon, iconPosition, onClick, rel, target, testID, }: ListItemLinkProps) => React.ReactElement;
|
|
4450
4344
|
|
|
4451
4345
|
declare type TitleProps = {
|
|
4452
4346
|
size?: 'small' | 'medium' | 'large';
|
|
@@ -4598,10 +4492,7 @@ declare type CodeProps = {
|
|
|
4598
4492
|
declare const Code: ({ children, size, testID, ...styledProps }: CodeProps) => JSX.Element;
|
|
4599
4493
|
|
|
4600
4494
|
declare type ListItemCodeProps = Exclude<CodeProps, 'size'>;
|
|
4601
|
-
declare const ListItemCode: {
|
|
4602
|
-
({ children, testID }: ListItemCodeProps): React.ReactElement;
|
|
4603
|
-
componentId: string;
|
|
4604
|
-
};
|
|
4495
|
+
declare const ListItemCode: ({ children, testID }: ListItemCodeProps) => React.ReactElement;
|
|
4605
4496
|
|
|
4606
4497
|
declare type Assertiveness = AriaAttributes['liveRegion'];
|
|
4607
4498
|
|
|
@@ -4988,7 +4879,11 @@ declare const BaseBox: styled_components.StyledComponent<"div", styled_component
|
|
|
4988
4879
|
width: SpacingValueType;
|
|
4989
4880
|
minWidth: SpacingValueType;
|
|
4990
4881
|
maxWidth: SpacingValueType;
|
|
4991
|
-
} & Pick<styled_components.CSSObject, "
|
|
4882
|
+
} & Pick<styled_components.CSSObject, "overflow" | "overflowX" | "overflowY"> & {
|
|
4883
|
+
display: csstype.Property.Display | undefined;
|
|
4884
|
+
} & {
|
|
4885
|
+
__brand__?: "platform-web" | undefined;
|
|
4886
|
+
}> & MakeObjectResponsive<{
|
|
4992
4887
|
gap: SpacingValueType;
|
|
4993
4888
|
rowGap: SpacingValueType;
|
|
4994
4889
|
columnGap: SpacingValueType;
|