@razorpay/blade 11.32.0 → 11.33.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.
Files changed (40) hide show
  1. package/build/lib/native/components/Button/IconButton/IconButton.js +1 -1
  2. package/build/lib/native/components/Button/IconButton/IconButton.js.map +1 -1
  3. package/build/lib/native/components/Table/TableContext.js +1 -1
  4. package/build/lib/native/components/Table/TableContext.js.map +1 -1
  5. package/build/lib/native/components/Table/tokens.js.map +1 -1
  6. package/build/lib/web/development/components/Button/IconButton/IconButton.js +2 -0
  7. package/build/lib/web/development/components/Button/IconButton/IconButton.js.map +1 -1
  8. package/build/lib/web/development/components/Button/IconButton/StyledIconButton.web.js +25 -3
  9. package/build/lib/web/development/components/Button/IconButton/StyledIconButton.web.js.map +1 -1
  10. package/build/lib/web/development/components/Button/IconButton/tokens.js +14 -0
  11. package/build/lib/web/development/components/Button/IconButton/tokens.js.map +1 -0
  12. package/build/lib/web/development/components/Table/Table.web.js +12 -3
  13. package/build/lib/web/development/components/Table/Table.web.js.map +1 -1
  14. package/build/lib/web/development/components/Table/TableBody.web.js +214 -70
  15. package/build/lib/web/development/components/Table/TableBody.web.js.map +1 -1
  16. package/build/lib/web/development/components/Table/TableContext.js +3 -1
  17. package/build/lib/web/development/components/Table/TableContext.js.map +1 -1
  18. package/build/lib/web/development/components/Table/TableHeader.web.js +14 -6
  19. package/build/lib/web/development/components/Table/TableHeader.web.js.map +1 -1
  20. package/build/lib/web/development/components/Table/tokens.js +6 -1
  21. package/build/lib/web/development/components/Table/tokens.js.map +1 -1
  22. package/build/lib/web/production/components/Button/IconButton/IconButton.js +2 -0
  23. package/build/lib/web/production/components/Button/IconButton/IconButton.js.map +1 -1
  24. package/build/lib/web/production/components/Button/IconButton/StyledIconButton.web.js +25 -3
  25. package/build/lib/web/production/components/Button/IconButton/StyledIconButton.web.js.map +1 -1
  26. package/build/lib/web/production/components/Button/IconButton/tokens.js +14 -0
  27. package/build/lib/web/production/components/Button/IconButton/tokens.js.map +1 -0
  28. package/build/lib/web/production/components/Table/Table.web.js +12 -3
  29. package/build/lib/web/production/components/Table/Table.web.js.map +1 -1
  30. package/build/lib/web/production/components/Table/TableBody.web.js +214 -70
  31. package/build/lib/web/production/components/Table/TableBody.web.js.map +1 -1
  32. package/build/lib/web/production/components/Table/TableContext.js +3 -1
  33. package/build/lib/web/production/components/Table/TableContext.js.map +1 -1
  34. package/build/lib/web/production/components/Table/TableHeader.web.js +14 -6
  35. package/build/lib/web/production/components/Table/TableHeader.web.js.map +1 -1
  36. package/build/lib/web/production/components/Table/tokens.js +6 -1
  37. package/build/lib/web/production/components/Table/tokens.js.map +1 -1
  38. package/build/types/components/index.d.ts +38 -17
  39. package/build/types/components/index.native.d.ts +30 -14
  40. package/package.json +1 -1
@@ -4555,9 +4555,16 @@ type IconButtonProps = {
4555
4555
  } & BladeCommonEvents & Platform.Select<{
4556
4556
  web: {
4557
4557
  onClick: (event: React__default.MouseEvent<HTMLButtonElement>) => void;
4558
+ /**
4559
+ * This changes the hover interaction to highlight icon more
4560
+ *
4561
+ * **Only available on web currently**
4562
+ */
4563
+ isHighlighted?: boolean;
4558
4564
  };
4559
4565
  native: {
4560
4566
  onClick: (event: GestureResponderEvent) => void;
4567
+ isHighlighted?: undefined;
4561
4568
  };
4562
4569
  }>;
4563
4570
  declare const IconButton: React__default.ForwardRefExoticComponent<{
@@ -4591,6 +4598,12 @@ declare const IconButton: React__default.ForwardRefExoticComponent<{
4591
4598
  _tabIndex?: number | undefined;
4592
4599
  } & BladeCommonEvents & {
4593
4600
  onClick: (event: React__default.MouseEvent<HTMLButtonElement>) => void;
4601
+ /**
4602
+ * This changes the hover interaction to highlight icon more
4603
+ *
4604
+ * **Only available on web currently**
4605
+ */
4606
+ isHighlighted?: boolean | undefined;
4594
4607
  } & {
4595
4608
  __brand__?: "platform-web" | undefined;
4596
4609
  } & React__default.RefAttributes<BladeElementRef>>;
@@ -11879,7 +11892,7 @@ type TableHeaderProps = {
11879
11892
  * </TableHeaderRow>
11880
11893
  * </TableHeader>
11881
11894
  **/
11882
- children: React.ReactNode;
11895
+ children: React__default.ReactNode;
11883
11896
  };
11884
11897
  type TableHeaderRowProps = {
11885
11898
  /**
@@ -11891,7 +11904,7 @@ type TableHeaderRowProps = {
11891
11904
  * </TableHeaderRow>
11892
11905
  * </TableHeader>
11893
11906
  **/
11894
- children: React.ReactNode;
11907
+ children: React__default.ReactNode;
11895
11908
  /**
11896
11909
  * The rowDensity prop determines the density of the table.
11897
11910
  * The rowDensity prop can be 'compact', 'normal', or'comfortable'.
@@ -11903,20 +11916,21 @@ type TableHeaderCellProps = {
11903
11916
  /**
11904
11917
  * The children of TableHeaderCell can be a string or a ReactNode.
11905
11918
  **/
11906
- children: string | React.ReactNode;
11919
+ children: string | React__default.ReactNode;
11907
11920
  /**
11908
11921
  * The unique key of the column.
11909
11922
  * This is used to identify the column for sorting in sortFunctions prop of Table.
11910
11923
  * Sorting is enabled only for columns whose key is present in sortableColumns prop of Table.
11911
11924
  **/
11912
11925
  headerKey?: string;
11926
+ _hasPadding?: boolean;
11913
11927
  };
11914
11928
  type TableProps<Item> = {
11915
11929
  /**
11916
11930
  * The children of the Table component should be a function that returns TableHeader, TableBody and TableFooter components.
11917
11931
  * The function will be called with the tableData prop.
11918
11932
  */
11919
- children: (tableData: TableNode<Item>[]) => React.ReactElement;
11933
+ children: (tableData: TableNode<Item>[]) => React__default.ReactElement;
11920
11934
  /**
11921
11935
  * The data prop is an object with a nodes property that is an array of objects.
11922
11936
  * Each object in the array is a row in the table.
@@ -11994,12 +12008,12 @@ type TableProps<Item> = {
11994
12008
  * The toolbar prop is a React element that is rendered above the table.
11995
12009
  * The toolbar prop should be a `TableToolbar` component.
11996
12010
  **/
11997
- toolbar?: React.ReactElement;
12011
+ toolbar?: React__default.ReactElement;
11998
12012
  /**
11999
12013
  * The pagination prop is a React element that is rendered below the table.
12000
12014
  * The pagination prop should be a `TablePagination` component.
12001
12015
  **/
12002
- pagination?: React.ReactElement;
12016
+ pagination?: React__default.ReactElement;
12003
12017
  /**
12004
12018
  * The height prop is a responsive styled prop that determines the height of the table.
12005
12019
  **/
@@ -12044,7 +12058,7 @@ type TableBodyProps = {
12044
12058
  * </TableRow>
12045
12059
  * </TableBody>
12046
12060
  **/
12047
- children: React.ReactNode;
12061
+ children: React__default.ReactNode;
12048
12062
  };
12049
12063
  type TableRowProps<Item> = {
12050
12064
  /**
@@ -12054,7 +12068,7 @@ type TableRowProps<Item> = {
12054
12068
  * <TableCell>...</TableCell>
12055
12069
  * </TableRow>
12056
12070
  **/
12057
- children: React.ReactNode;
12071
+ children: React__default.ReactNode;
12058
12072
  /**
12059
12073
  * The item prop is used to pass the individual table item to the TableRow component.
12060
12074
  * @example
@@ -12085,6 +12099,7 @@ type TableRowProps<Item> = {
12085
12099
  onClick?: ({ item }: {
12086
12100
  item: TableNode<Item>;
12087
12101
  }) => void;
12102
+ hoverActions?: React__default.ReactElement;
12088
12103
  } & TestID;
12089
12104
  type TableCellProps = {
12090
12105
  /**
@@ -12098,7 +12113,13 @@ type TableCellProps = {
12098
12113
  * <Button>...</Button>
12099
12114
  * </TableCell>
12100
12115
  **/
12101
- children: React.ReactNode;
12116
+ children: React__default.ReactNode;
12117
+ /**
12118
+ * Removes padding from CellWrapper
12119
+ *
12120
+ * @private
12121
+ */
12122
+ _hasPadding?: boolean;
12102
12123
  };
12103
12124
  type TableEditableCellProps = Pick<BaseInputProps, 'validationState' | 'placeholder' | 'defaultValue' | 'name' | 'onChange' | 'onFocus' | 'onBlur' | 'value' | 'isDisabled' | 'isRequired' | 'prefix' | 'suffix' | 'maxCharacters' | 'autoFocus' | 'keyboardReturnKeyType' | 'autoCompleteSuggestionType' | 'onSubmit' | 'autoCapitalize' | 'testID' | 'onClick' | 'leadingIcon' | 'trailingButton' | 'errorText' | 'successText'> & {
12104
12125
  accessibilityLabel: NonNullable<BaseInputProps['accessibilityLabel']>;
@@ -12114,7 +12135,7 @@ type TableFooterProps = {
12114
12135
  * </TableFooterRow>
12115
12136
  * </TableFooter>
12116
12137
  **/
12117
- children: React.ReactNode;
12138
+ children: React__default.ReactNode;
12118
12139
  };
12119
12140
  type TableFooterRowProps = {
12120
12141
  /**
@@ -12126,13 +12147,13 @@ type TableFooterRowProps = {
12126
12147
  * </TableFooterRow>
12127
12148
  * </TableFooter>
12128
12149
  **/
12129
- children: React.ReactNode;
12150
+ children: React__default.ReactNode;
12130
12151
  };
12131
12152
  type TableFooterCellProps = {
12132
12153
  /**
12133
12154
  * The children of TableHeaderCell can be a string or a ReactNode.
12134
12155
  **/
12135
- children: string | React.ReactNode;
12156
+ children: string | React__default.ReactNode;
12136
12157
  };
12137
12158
  type TablePaginationCommonProps = {
12138
12159
  /**
@@ -12220,7 +12241,7 @@ type TableToolbarProps = {
12220
12241
  /**
12221
12242
  * The children of TableToolbar should be TableToolbarActions
12222
12243
  */
12223
- children?: React.ReactNode;
12244
+ children?: React__default.ReactNode;
12224
12245
  /**
12225
12246
  * The title of the TableToolbar. If not provided, it will show the default title.
12226
12247
  * @default `Showing 1 to ${totalItems} Items`
@@ -12233,18 +12254,18 @@ type TableToolbarProps = {
12233
12254
  selectedTitle?: string;
12234
12255
  };
12235
12256
  type TableToolbarActionsProps = {
12236
- children?: React.ReactNode;
12257
+ children?: React__default.ReactNode;
12237
12258
  } & StyledPropsBlade;
12238
12259
 
12239
12260
  declare const Table: <Item>({ children, data, multiSelectTrigger, selectionType, onSelectionChange, isHeaderSticky, isFooterSticky, isFirstColumnSticky, rowDensity, onSortChange, sortFunctions, toolbar, pagination, height, showStripedRows, gridTemplateColumns, isLoading, isRefreshing, showBorderedCells, defaultSelectedIds, ...styledProps }: TableProps<Item>) => React__default.ReactElement;
12240
12261
 
12241
12262
  declare const TableHeader: ({ children }: TableHeaderRowProps) => React__default.ReactElement;
12242
- declare const TableHeaderCell: ({ children, headerKey }: TableHeaderCellProps) => React__default.ReactElement;
12263
+ declare const TableHeaderCell: ({ children, headerKey, _hasPadding, }: TableHeaderCellProps) => React__default.ReactElement;
12243
12264
  declare const TableHeaderRow: ({ children, rowDensity }: TableHeaderRowProps) => React__default.ReactElement;
12244
12265
 
12245
12266
  declare const TableBody: ({ children }: TableBodyProps) => React__default.ReactElement;
12246
- declare const TableCell: ({ children }: TableCellProps) => React__default.ReactElement;
12247
- declare const TableRow: <Item>({ children, item, isDisabled, onHover, onClick, testID, }: TableRowProps<Item>) => React__default.ReactElement;
12267
+ declare const TableCell: ({ children, _hasPadding }: TableCellProps) => React__default.ReactElement;
12268
+ declare const TableRow: <Item>({ children, item, isDisabled, onHover, onClick, hoverActions, testID, }: TableRowProps<Item>) => React__default.ReactElement;
12248
12269
 
12249
12270
  declare const TableFooter: ({ children }: TableFooterProps) => React__default.ReactElement;
12250
12271
  declare const TableFooterRow: ({ children }: TableFooterRowProps) => React__default.ReactElement;
@@ -3717,9 +3717,16 @@ type IconButtonProps = {
3717
3717
  } & BladeCommonEvents & Platform.Select<{
3718
3718
  web: {
3719
3719
  onClick: (event: React__default.MouseEvent<HTMLButtonElement>) => void;
3720
+ /**
3721
+ * This changes the hover interaction to highlight icon more
3722
+ *
3723
+ * **Only available on web currently**
3724
+ */
3725
+ isHighlighted?: boolean;
3720
3726
  };
3721
3727
  native: {
3722
3728
  onClick: (event: GestureResponderEvent) => void;
3729
+ isHighlighted?: undefined;
3723
3730
  };
3724
3731
  }>;
3725
3732
  declare const IconButton: React__default.ForwardRefExoticComponent<{
@@ -3753,6 +3760,7 @@ declare const IconButton: React__default.ForwardRefExoticComponent<{
3753
3760
  _tabIndex?: number | undefined;
3754
3761
  } & BladeCommonEvents & {
3755
3762
  onClick: (event: GestureResponderEvent) => void;
3763
+ isHighlighted?: undefined;
3756
3764
  } & {
3757
3765
  __brand__?: "platform-native" | undefined;
3758
3766
  } & React__default.RefAttributes<BladeElementRef>>;
@@ -8705,7 +8713,7 @@ type TableHeaderProps = {
8705
8713
  * </TableHeaderRow>
8706
8714
  * </TableHeader>
8707
8715
  **/
8708
- children: React.ReactNode;
8716
+ children: React__default.ReactNode;
8709
8717
  };
8710
8718
  type TableHeaderRowProps = {
8711
8719
  /**
@@ -8717,7 +8725,7 @@ type TableHeaderRowProps = {
8717
8725
  * </TableHeaderRow>
8718
8726
  * </TableHeader>
8719
8727
  **/
8720
- children: React.ReactNode;
8728
+ children: React__default.ReactNode;
8721
8729
  /**
8722
8730
  * The rowDensity prop determines the density of the table.
8723
8731
  * The rowDensity prop can be 'compact', 'normal', or'comfortable'.
@@ -8729,20 +8737,21 @@ type TableHeaderCellProps = {
8729
8737
  /**
8730
8738
  * The children of TableHeaderCell can be a string or a ReactNode.
8731
8739
  **/
8732
- children: string | React.ReactNode;
8740
+ children: string | React__default.ReactNode;
8733
8741
  /**
8734
8742
  * The unique key of the column.
8735
8743
  * This is used to identify the column for sorting in sortFunctions prop of Table.
8736
8744
  * Sorting is enabled only for columns whose key is present in sortableColumns prop of Table.
8737
8745
  **/
8738
8746
  headerKey?: string;
8747
+ _hasPadding?: boolean;
8739
8748
  };
8740
8749
  type TableProps<Item> = {
8741
8750
  /**
8742
8751
  * The children of the Table component should be a function that returns TableHeader, TableBody and TableFooter components.
8743
8752
  * The function will be called with the tableData prop.
8744
8753
  */
8745
- children: (tableData: TableNode<Item>[]) => React.ReactElement;
8754
+ children: (tableData: TableNode<Item>[]) => React__default.ReactElement;
8746
8755
  /**
8747
8756
  * The data prop is an object with a nodes property that is an array of objects.
8748
8757
  * Each object in the array is a row in the table.
@@ -8820,12 +8829,12 @@ type TableProps<Item> = {
8820
8829
  * The toolbar prop is a React element that is rendered above the table.
8821
8830
  * The toolbar prop should be a `TableToolbar` component.
8822
8831
  **/
8823
- toolbar?: React.ReactElement;
8832
+ toolbar?: React__default.ReactElement;
8824
8833
  /**
8825
8834
  * The pagination prop is a React element that is rendered below the table.
8826
8835
  * The pagination prop should be a `TablePagination` component.
8827
8836
  **/
8828
- pagination?: React.ReactElement;
8837
+ pagination?: React__default.ReactElement;
8829
8838
  /**
8830
8839
  * The height prop is a responsive styled prop that determines the height of the table.
8831
8840
  **/
@@ -8870,7 +8879,7 @@ type TableBodyProps = {
8870
8879
  * </TableRow>
8871
8880
  * </TableBody>
8872
8881
  **/
8873
- children: React.ReactNode;
8882
+ children: React__default.ReactNode;
8874
8883
  };
8875
8884
  type TableRowProps<Item> = {
8876
8885
  /**
@@ -8880,7 +8889,7 @@ type TableRowProps<Item> = {
8880
8889
  * <TableCell>...</TableCell>
8881
8890
  * </TableRow>
8882
8891
  **/
8883
- children: React.ReactNode;
8892
+ children: React__default.ReactNode;
8884
8893
  /**
8885
8894
  * The item prop is used to pass the individual table item to the TableRow component.
8886
8895
  * @example
@@ -8911,6 +8920,7 @@ type TableRowProps<Item> = {
8911
8920
  onClick?: ({ item }: {
8912
8921
  item: TableNode<Item>;
8913
8922
  }) => void;
8923
+ hoverActions?: React__default.ReactElement;
8914
8924
  } & TestID;
8915
8925
  type TableCellProps = {
8916
8926
  /**
@@ -8924,7 +8934,13 @@ type TableCellProps = {
8924
8934
  * <Button>...</Button>
8925
8935
  * </TableCell>
8926
8936
  **/
8927
- children: React.ReactNode;
8937
+ children: React__default.ReactNode;
8938
+ /**
8939
+ * Removes padding from CellWrapper
8940
+ *
8941
+ * @private
8942
+ */
8943
+ _hasPadding?: boolean;
8928
8944
  };
8929
8945
  type TableEditableCellProps = Pick<BaseInputProps, 'validationState' | 'placeholder' | 'defaultValue' | 'name' | 'onChange' | 'onFocus' | 'onBlur' | 'value' | 'isDisabled' | 'isRequired' | 'prefix' | 'suffix' | 'maxCharacters' | 'autoFocus' | 'keyboardReturnKeyType' | 'autoCompleteSuggestionType' | 'onSubmit' | 'autoCapitalize' | 'testID' | 'onClick' | 'leadingIcon' | 'trailingButton' | 'errorText' | 'successText'> & {
8930
8946
  accessibilityLabel: NonNullable<BaseInputProps['accessibilityLabel']>;
@@ -8940,7 +8956,7 @@ type TableFooterProps = {
8940
8956
  * </TableFooterRow>
8941
8957
  * </TableFooter>
8942
8958
  **/
8943
- children: React.ReactNode;
8959
+ children: React__default.ReactNode;
8944
8960
  };
8945
8961
  type TableFooterRowProps = {
8946
8962
  /**
@@ -8952,13 +8968,13 @@ type TableFooterRowProps = {
8952
8968
  * </TableFooterRow>
8953
8969
  * </TableFooter>
8954
8970
  **/
8955
- children: React.ReactNode;
8971
+ children: React__default.ReactNode;
8956
8972
  };
8957
8973
  type TableFooterCellProps = {
8958
8974
  /**
8959
8975
  * The children of TableHeaderCell can be a string or a ReactNode.
8960
8976
  **/
8961
- children: string | React.ReactNode;
8977
+ children: string | React__default.ReactNode;
8962
8978
  };
8963
8979
  type TablePaginationCommonProps = {
8964
8980
  /**
@@ -9046,7 +9062,7 @@ type TableToolbarProps = {
9046
9062
  /**
9047
9063
  * The children of TableToolbar should be TableToolbarActions
9048
9064
  */
9049
- children?: React.ReactNode;
9065
+ children?: React__default.ReactNode;
9050
9066
  /**
9051
9067
  * The title of the TableToolbar. If not provided, it will show the default title.
9052
9068
  * @default `Showing 1 to ${totalItems} Items`
@@ -9059,7 +9075,7 @@ type TableToolbarProps = {
9059
9075
  selectedTitle?: string;
9060
9076
  };
9061
9077
  type TableToolbarActionsProps = {
9062
- children?: React.ReactNode;
9078
+ children?: React__default.ReactNode;
9063
9079
  } & StyledPropsBlade;
9064
9080
 
9065
9081
  declare const Table: <Item>(props: TableProps<Item>) => React__default.ReactElement;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@razorpay/blade",
3
3
  "description": "The Design System that powers Razorpay",
4
- "version": "11.32.0",
4
+ "version": "11.33.0",
5
5
  "license": "MIT",
6
6
  "engines": {
7
7
  "node": ">=18.12.1"