@razorpay/blade 6.6.0 → 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.
@@ -448,16 +448,6 @@ type ThemeTokens = {
448
448
  typography: TypographyWithPlatforms;
449
449
  };
450
450
 
451
- /* eslint-disable @typescript-eslint/no-explicit-any */
452
-
453
-
454
- /**
455
- * A type defining React component with additional static prop `componentId`
456
- */
457
- type WithComponentId<Props> = ((props: Props) => React__default.ReactElement) & {
458
- componentId: string;
459
- };
460
-
461
451
  // All the WAI-ARIA 1.1 role attribute values from https://www.w3.org/TR/wai-aria-1.1/#role_definitions
462
452
  type AriaRoles =
463
453
  | Exclude<AccessibilityRole, 'header' | 'adjustable' | 'image' | 'none' | 'summary'>
@@ -1479,32 +1469,14 @@ declare type ActionListSectionProps = {
1479
1469
  */
1480
1470
  _hideDivider?: boolean;
1481
1471
  } & TestID$1;
1482
- declare const ActionListSection: WithComponentId<ActionListSectionProps>;
1483
- declare const ActionListItemIcon: WithComponentId<{
1472
+ declare const ActionListSection: ({ title, children, testID, _hideDivider, }: ActionListSectionProps) => JSX.Element;
1473
+ declare const ActionListItemIcon: ({ icon }: {
1484
1474
  icon: IconComponent$1;
1485
- }>;
1486
- declare const ActionListItemText: WithComponentId<{
1475
+ }) => JSX.Element;
1476
+ declare const ActionListItemText: ({ children, }: {
1487
1477
  children: StringChildrenType;
1488
- }>;
1489
- /**
1490
- * ### ActionListItem
1491
- *
1492
- * Creates option inside `ActionList`.
1493
- *
1494
- * #### Usage
1495
- *
1496
- * ```jsx
1497
- * <ActionList>
1498
- * <ActionListItem
1499
- * title="Home"
1500
- * value="home"
1501
- * leading={<ActionListItemIcon icon={HomeIcon} />}
1502
- * trailing={<ActionListItemText>⌘ + S</ActionListItemText>}
1503
- * />
1504
- * </ActionList>
1505
- * ```
1506
- */
1507
- declare const ActionListItem: WithComponentId<ActionListItemProps>;
1478
+ }) => React__default.ReactElement;
1479
+ declare const ActionListItem: (props: ActionListItemProps) => JSX.Element;
1508
1480
 
1509
1481
  declare type ActionListHeaderProps = {
1510
1482
  title: string;
@@ -1515,29 +1487,10 @@ declare type ActionListHeaderProps = {
1515
1487
  */
1516
1488
  leading?: React__default.ReactNode;
1517
1489
  } & TestID$1;
1518
- /**
1519
- * ### ActionListHeader
1520
- *
1521
- * To be used inside `ActionList`
1522
- *
1523
- * #### Usage
1524
- *
1525
- * ```jsx
1526
- * <ActionListHeader
1527
- * title="Search Tips"
1528
- * leading={
1529
- * <ActionListHeaderIcon
1530
- * title="Recent Searches"
1531
- * icon={HistoryIcon}
1532
- * />
1533
- * }
1534
- * />
1535
- * ```
1536
- */
1537
- declare const ActionListHeader: WithComponentId<ActionListHeaderProps>;
1538
- declare const ActionListHeaderIcon: WithComponentId<{
1490
+ declare const ActionListHeader: (props: ActionListHeaderProps) => JSX.Element;
1491
+ declare const ActionListHeaderIcon: ({ icon }: {
1539
1492
  icon: IconComponent$1;
1540
- }>;
1493
+ }) => React__default.ReactElement;
1541
1494
 
1542
1495
  declare type ActionListFooterProps = {
1543
1496
  title?: string;
@@ -1554,31 +1507,10 @@ declare type ActionListFooterProps = {
1554
1507
  */
1555
1508
  trailing?: React__default.ReactNode;
1556
1509
  } & TestID$1;
1557
- /**
1558
- * ### ActionListFooter
1559
- *
1560
- * To be used inside `ActionList`
1561
- *
1562
- * #### Usage
1563
- *
1564
- * ```jsx
1565
- * <ActionListFooter
1566
- * title="Search Tips"
1567
- * leading={<ActionListFooterIcon icon={SearchIcon} />}
1568
- * trailing={
1569
- * <Button
1570
- * onClick={() => { console.log('click') }}
1571
- * >
1572
- * Apply
1573
- * </Button>
1574
- * }
1575
- * />
1576
- * ```
1577
- */
1578
- declare const ActionListFooter: WithComponentId<ActionListFooterProps>;
1579
- declare const ActionListFooterIcon: WithComponentId<{
1510
+ declare const ActionListFooter: (props: ActionListFooterProps) => JSX.Element;
1511
+ declare const ActionListFooterIcon: ({ icon }: {
1580
1512
  icon: IconComponent$1;
1581
- }>;
1513
+ }) => React__default.ReactElement;
1582
1514
 
1583
1515
  declare type ActionListItemAssetProps = {
1584
1516
  /**
@@ -1592,10 +1524,7 @@ declare type ActionListItemAssetProps = {
1592
1524
  */
1593
1525
  alt: string;
1594
1526
  };
1595
- /**
1596
- *
1597
- */
1598
- declare const ActionListItemAsset: WithComponentId<ActionListItemAssetProps>;
1527
+ declare const ActionListItemAsset: (props: ActionListItemAssetProps) => React.ReactElement;
1599
1528
 
1600
1529
  declare type PrimaryAction = {
1601
1530
  text: string;
@@ -2237,7 +2166,29 @@ declare type LayoutProps = MakeObjectResponsive<{
2237
2166
  width: SpacingValueType;
2238
2167
  minWidth: SpacingValueType;
2239
2168
  maxWidth: SpacingValueType;
2240
- } & Pick<CSSObject, 'display' | 'overflow' | 'overflowX' | 'overflowY'>>;
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
+ }>>;
2241
2192
  declare type FlexboxProps = MakeObjectResponsive<{
2242
2193
  /**
2243
2194
  * This uses the native gap property which might not work on older browsers.
@@ -2358,7 +2309,7 @@ declare const Card: ({ children, surfaceLevel, testID, ...styledProps }: CardPro
2358
2309
  declare type CardBodyProps = {
2359
2310
  children: React__default.ReactNode;
2360
2311
  } & TestID$1;
2361
- declare const CardBody: WithComponentId<CardBodyProps>;
2312
+ declare const CardBody: ({ children, testID }: CardBodyProps) => React__default.ReactElement;
2362
2313
 
2363
2314
  declare type LinkCommonProps = {
2364
2315
  variant?: 'anchor' | 'button';
@@ -2562,23 +2513,23 @@ type CounterProps$1 = {
2562
2513
  } & TestID$1 &
2563
2514
  StyledPropsBlade;
2564
2515
 
2565
- declare const CardHeaderIcon: WithComponentId<{
2516
+ declare const CardHeaderIcon: ({ icon }: {
2566
2517
  icon: IconComponent$1;
2567
- }>;
2568
- declare const CardHeaderCounter: WithComponentId<CounterProps$1>;
2569
- declare const CardHeaderBadge: WithComponentId<BadgeProps>;
2570
- declare const CardHeaderText: WithComponentId<TextProps$1<{
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<{
2571
2522
  variant: TextVariant$1;
2572
- }>>;
2573
- declare const CardHeaderLink: WithComponentId<LinkProps>;
2523
+ }>) => React__default.ReactElement;
2524
+ declare const CardHeaderLink: (props: LinkProps) => React__default.ReactElement;
2574
2525
  declare type CardHeaderIconButtonProps = Omit<ButtonProps, 'variant' | 'size' | 'iconPosition' | 'isFullWidth' | 'children'> & {
2575
2526
  icon: IconComponent$1;
2576
2527
  };
2577
- declare const CardHeaderIconButton: WithComponentId<CardHeaderIconButtonProps>;
2528
+ declare const CardHeaderIconButton: (props: CardHeaderIconButtonProps) => React__default.ReactElement;
2578
2529
  declare type CardHeaderProps = {
2579
2530
  children?: React__default.ReactNode;
2580
2531
  } & TestID$1;
2581
- declare const CardHeader: WithComponentId<CardHeaderProps>;
2532
+ declare const CardHeader: ({ children, testID }: CardHeaderProps) => React__default.ReactElement;
2582
2533
  declare type CardHeaderLeadingProps = {
2583
2534
  title: string;
2584
2535
  subtitle?: string;
@@ -2595,7 +2546,7 @@ declare type CardHeaderLeadingProps = {
2595
2546
  */
2596
2547
  suffix?: React__default.ReactNode;
2597
2548
  };
2598
- declare const CardHeaderLeading: WithComponentId<CardHeaderLeadingProps>;
2549
+ declare const CardHeaderLeading: ({ title, subtitle, prefix, suffix, }: CardHeaderLeadingProps) => React__default.ReactElement;
2599
2550
  declare type CardHeaderTrailingProps = {
2600
2551
  /**
2601
2552
  * Renders a visual ornament in card header trailing section
@@ -2604,7 +2555,7 @@ declare type CardHeaderTrailingProps = {
2604
2555
  */
2605
2556
  visual?: React__default.ReactNode;
2606
2557
  };
2607
- declare const CardHeaderTrailing: WithComponentId<CardHeaderTrailingProps>;
2558
+ declare const CardHeaderTrailing: ({ visual }: CardHeaderTrailingProps) => React__default.ReactElement;
2608
2559
 
2609
2560
  declare type CardFooterAction = Pick<ButtonProps, 'type' | 'accessibilityLabel' | 'isLoading' | 'isDisabled' | 'icon' | 'iconPosition' | 'onClick'> & {
2610
2561
  text: ButtonProps['children'];
@@ -2612,19 +2563,19 @@ declare type CardFooterAction = Pick<ButtonProps, 'type' | 'accessibilityLabel'
2612
2563
  declare type CardFooterProps = {
2613
2564
  children?: React__default.ReactNode;
2614
2565
  } & TestID$1;
2615
- declare const CardFooter: WithComponentId<CardFooterProps>;
2566
+ declare const CardFooter: ({ children, testID }: CardFooterProps) => React__default.ReactElement;
2616
2567
  declare type CardFooterLeadingProps = {
2617
2568
  title?: string;
2618
2569
  subtitle?: string;
2619
2570
  };
2620
- declare const CardFooterLeading: WithComponentId<CardFooterLeadingProps>;
2571
+ declare const CardFooterLeading: ({ title, subtitle }: CardFooterLeadingProps) => React__default.ReactElement;
2621
2572
  declare type CardFooterTrailingProps = {
2622
2573
  actions?: {
2623
2574
  primary?: CardFooterAction;
2624
2575
  secondary?: CardFooterAction;
2625
2576
  };
2626
2577
  };
2627
- declare const CardFooterTrailing: WithComponentId<CardFooterTrailingProps>;
2578
+ declare const CardFooterTrailing: ({ actions }: CardFooterTrailingProps) => React__default.ReactElement;
2628
2579
 
2629
2580
  declare type IconButtonProps = {
2630
2581
  /**
@@ -2963,44 +2914,13 @@ declare type DropdownProps = {
2963
2914
  selectionType?: 'single' | 'multiple';
2964
2915
  children: React__default.ReactNode[];
2965
2916
  } & StyledPropsBlade;
2966
- /**
2967
- * ### Dropdown component
2968
- *
2969
- * Dropdown component is generic component that controls the dropdown functionality.
2970
- * It can be used with multiple triggers and mostly contains ActionList component inside it
2971
- *
2972
- * ---
2973
- *
2974
- * #### Usage
2975
- *
2976
- * ```jsx
2977
- * <Dropdown selectionType="single">
2978
- * <SelectInput />
2979
- * <DropdownOverlay>
2980
- * <ActionList>
2981
- * <ActionListItem />
2982
- * <ActionListItem />
2983
- * </ActionList>
2984
- * </DropdownOverlay>
2985
- * </Dropdown>
2986
- * ```
2987
- *
2988
- * ---
2989
- *
2990
- * Checkout {@link https://blade.razorpay.com/?path=/docs/components-dropdown-with-select--with-single-select Dropdown Documentation}
2991
- */
2992
- declare const Dropdown: WithComponentId<DropdownProps>;
2917
+ declare const Dropdown: ({ children, selectionType, ...styledProps }: DropdownProps) => JSX.Element;
2993
2918
 
2994
2919
  declare type DropdownOverlayProps = {
2995
2920
  children: React__default.ReactNode;
2996
2921
  } & TestID$1;
2997
2922
 
2998
- /**
2999
- * Overlay of dropdown
3000
- *
3001
- * Wrap your ActionList within this component
3002
- */
3003
- declare const DropdownOverlay: WithComponentId<DropdownOverlayProps>;
2923
+ declare const DropdownOverlay: ({ children, testID }: DropdownOverlayProps) => JSX.Element;
3004
2924
 
3005
2925
  declare const ArrowDownIcon: IconComponent;
3006
2926
 
@@ -4183,10 +4103,7 @@ declare type ListItemProps = {
4183
4103
  */
4184
4104
  _itemNumber?: undefined;
4185
4105
  } & TestID$1;
4186
- declare const ListItem: {
4187
- ({ children, icon, _itemNumber, testID, }: ListItemProps): React__default.ReactElement;
4188
- componentId: string;
4189
- };
4106
+ declare const ListItem: ({ children, icon, _itemNumber, testID, }: ListItemProps) => React__default.ReactElement;
4190
4107
 
4191
4108
  declare type ListCommonProps = {
4192
4109
  /**
@@ -4216,36 +4133,10 @@ declare type ListWithoutIconProps = ListCommonProps & {
4216
4133
  icon?: undefined;
4217
4134
  };
4218
4135
  declare type ListProps = ListWithIconProps | ListWithoutIconProps;
4219
- /**
4220
- * 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.
4221
- *
4222
- * ## Usage
4223
- *
4224
- * ```tsx
4225
- * <List
4226
- * variant='unordered'
4227
- * size='medium'
4228
- * >
4229
- * <ListItem>
4230
- * Item 1
4231
- * <List>
4232
- * <ListItem>Item 1.1</ListItem>
4233
- * </List>
4234
- * </ListItem>
4235
- * <ListItem>Item 2</ListItem>
4236
- * <List />
4237
- * ```
4238
- */
4239
- declare const List: {
4240
- ({ variant, size, children, icon, testID, ...styledProps }: ListProps): React__default.ReactElement;
4241
- componentId: string;
4242
- };
4136
+ declare const List: ({ variant, size, children, icon, testID, ...styledProps }: ListProps) => React__default.ReactElement;
4243
4137
 
4244
4138
  declare type ListItemLinkProps = Exclude<LinkProps, 'size' | 'variant' | 'isDisabled'>;
4245
- declare const ListItemLink: {
4246
- ({ accessibilityLabel, children, href, icon, iconPosition, onClick, rel, target, testID, }: ListItemLinkProps): React.ReactElement;
4247
- componentId: string;
4248
- };
4139
+ declare const ListItemLink: ({ accessibilityLabel, children, href, icon, iconPosition, onClick, rel, target, testID, }: ListItemLinkProps) => React.ReactElement;
4249
4140
 
4250
4141
  declare type TitleProps = {
4251
4142
  size?: 'small' | 'medium' | 'large';
@@ -4397,10 +4288,7 @@ declare type CodeProps = {
4397
4288
  declare const Code: ({ children, size, testID, ...styledProps }: CodeProps) => JSX.Element;
4398
4289
 
4399
4290
  declare type ListItemCodeProps = Exclude<CodeProps, 'size'>;
4400
- declare const ListItemCode: {
4401
- ({ children, testID }: ListItemCodeProps): React.ReactElement;
4402
- componentId: string;
4403
- };
4291
+ declare const ListItemCode: ({ children, testID }: ListItemCodeProps) => React.ReactElement;
4404
4292
 
4405
4293
  declare type Assertiveness = AriaAttributes['liveRegion'];
4406
4294
 
@@ -4730,7 +4618,11 @@ declare const BaseBox: styled_components.StyledComponent<typeof View, styled_com
4730
4618
  width: SpacingValueType;
4731
4619
  minWidth: SpacingValueType;
4732
4620
  maxWidth: SpacingValueType;
4733
- } & Pick<styled_components.CSSObject, "display" | "overflow" | "overflowX" | "overflowY">> & MakeObjectResponsive<{
4621
+ } & Pick<styled_components.CSSObject, "overflow" | "overflowX" | "overflowY"> & {
4622
+ display: "none" | "flex";
4623
+ } & {
4624
+ __brand__?: "platform-native" | undefined;
4625
+ }> & MakeObjectResponsive<{
4734
4626
  gap: SpacingValueType;
4735
4627
  rowGap: SpacingValueType;
4736
4628
  columnGap: SpacingValueType;