@razorpay/blade 12.95.4 → 12.95.5

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 (23) hide show
  1. package/build/lib/web/development/_virtual/cloneDeep.js +1 -1
  2. package/build/lib/web/development/_virtual/cloneDeep3.js +1 -1
  3. package/build/lib/web/development/_virtual/flatten.js +1 -1
  4. package/build/lib/web/development/_virtual/flatten3.js +1 -1
  5. package/build/lib/web/development/components/GenUI/GenUIComponents.web.js +13 -64
  6. package/build/lib/web/development/components/GenUI/GenUIComponents.web.js.map +1 -1
  7. package/build/lib/web/development/node_modules/es-toolkit/dist/array/flatten.js +1 -1
  8. package/build/lib/web/development/node_modules/es-toolkit/dist/compat/array/flatten.js +1 -1
  9. package/build/lib/web/development/node_modules/es-toolkit/dist/compat/array/sortBy.js +2 -2
  10. package/build/lib/web/development/node_modules/es-toolkit/dist/compat/object/cloneDeep.js +1 -1
  11. package/build/lib/web/development/node_modules/es-toolkit/dist/compat/object/omit.js +2 -2
  12. package/build/lib/web/development/node_modules/es-toolkit/dist/compat/predicate/matches.js +2 -2
  13. package/build/lib/web/development/node_modules/es-toolkit/dist/compat/predicate/matchesProperty.js +2 -2
  14. package/build/lib/web/development/node_modules/es-toolkit/dist/object/cloneDeep.js +1 -1
  15. package/build/lib/web/production/_virtual/cloneDeep.js +1 -1
  16. package/build/lib/web/production/_virtual/cloneDeep3.js +1 -1
  17. package/build/lib/web/production/components/GenUI/GenUIComponents.web.js +13 -64
  18. package/build/lib/web/production/components/GenUI/GenUIComponents.web.js.map +1 -1
  19. package/build/lib/web/production/node_modules/es-toolkit/dist/compat/object/cloneDeep.js +1 -1
  20. package/build/lib/web/production/node_modules/es-toolkit/dist/compat/predicate/matches.js +2 -2
  21. package/build/lib/web/production/node_modules/es-toolkit/dist/compat/predicate/matchesProperty.js +2 -2
  22. package/build/lib/web/production/node_modules/es-toolkit/dist/object/cloneDeep.js +1 -1
  23. package/package.json +1 -1
@@ -1,10 +1,10 @@
1
1
  import { getDefaultExportFromCjs } from '../../../../../_virtual/_commonjsHelpers.js';
2
2
  import { __exports as sortBy$1 } from '../../../../../_virtual/sortBy2.js';
3
3
  import '../../../../../_virtual/orderBy.js';
4
- import '../../../../../_virtual/flatten3.js';
4
+ import '../../../../../_virtual/flatten.js';
5
5
  import '../../../../../_virtual/isIterateeCall.js';
6
6
  import { __exports as orderBy } from '../../../../../_virtual/orderBy2.js';
7
- import { __exports as flatten } from '../../../../../_virtual/flatten4.js';
7
+ import { __exports as flatten } from '../../../../../_virtual/flatten2.js';
8
8
  import { __exports as isIterateeCall } from '../../../../../_virtual/isIterateeCall2.js';
9
9
 
10
10
  (function (exports) {
@@ -1,5 +1,5 @@
1
1
  import { getDefaultExportFromCjs } from '../../../../../_virtual/_commonjsHelpers.js';
2
- import { __exports as cloneDeep$1 } from '../../../../../_virtual/cloneDeep2.js';
2
+ import { __exports as cloneDeep$1 } from '../../../../../_virtual/cloneDeep4.js';
3
3
  import '../../../../../_virtual/cloneDeepWith.js';
4
4
  import { __exports as cloneDeepWith } from '../../../../../_virtual/cloneDeepWith2.js';
5
5
 
@@ -5,14 +5,14 @@ import '../../../../../_virtual/keysIn.js';
5
5
  import '../../../../../_virtual/unset.js';
6
6
  import '../../../../../_virtual/getSymbolsIn.js';
7
7
  import '../../../../../_virtual/isDeepKey.js';
8
- import '../../../../../_virtual/flatten.js';
8
+ import '../../../../../_virtual/flatten3.js';
9
9
  import '../../../../../_virtual/isPlainObject.js';
10
10
  import { __exports as cloneDeepWith } from '../../../../../_virtual/cloneDeepWith2.js';
11
11
  import { __exports as keysIn } from '../../../../../_virtual/keysIn2.js';
12
12
  import { __exports as unset } from '../../../../../_virtual/unset2.js';
13
13
  import { __exports as getSymbolsIn } from '../../../../../_virtual/getSymbolsIn2.js';
14
14
  import { __exports as isDeepKey } from '../../../../../_virtual/isDeepKey2.js';
15
- import { __exports as flatten } from '../../../../../_virtual/flatten2.js';
15
+ import { __exports as flatten } from '../../../../../_virtual/flatten4.js';
16
16
  import { __exports as isPlainObject } from '../../../../../_virtual/isPlainObject2.js';
17
17
 
18
18
  (function (exports) {
@@ -1,9 +1,9 @@
1
1
  import { getDefaultExportFromCjs } from '../../../../../_virtual/_commonjsHelpers.js';
2
2
  import { __exports as matches$1 } from '../../../../../_virtual/matches2.js';
3
3
  import '../../../../../_virtual/isMatch.js';
4
- import '../../../../../_virtual/cloneDeep3.js';
4
+ import '../../../../../_virtual/cloneDeep.js';
5
5
  import { __exports as isMatch } from '../../../../../_virtual/isMatch2.js';
6
- import { __exports as cloneDeep } from '../../../../../_virtual/cloneDeep4.js';
6
+ import { __exports as cloneDeep } from '../../../../../_virtual/cloneDeep2.js';
7
7
 
8
8
  (function (exports) {
9
9
  'use strict';
@@ -2,12 +2,12 @@ import { getDefaultExportFromCjs } from '../../../../../_virtual/_commonjsHelper
2
2
  import { __exports as matchesProperty$1 } from '../../../../../_virtual/matchesProperty2.js';
3
3
  import '../../../../../_virtual/isMatch.js';
4
4
  import '../../../../../_virtual/toKey.js';
5
- import '../../../../../_virtual/cloneDeep.js';
5
+ import '../../../../../_virtual/cloneDeep3.js';
6
6
  import '../../../../../_virtual/get.js';
7
7
  import '../../../../../_virtual/has.js';
8
8
  import { __exports as isMatch } from '../../../../../_virtual/isMatch2.js';
9
9
  import { __exports as toKey } from '../../../../../_virtual/toKey2.js';
10
- import { __exports as cloneDeep } from '../../../../../_virtual/cloneDeep2.js';
10
+ import { __exports as cloneDeep } from '../../../../../_virtual/cloneDeep4.js';
11
11
  import { __exports as get } from '../../../../../_virtual/get2.js';
12
12
  import { __exports as has } from '../../../../../_virtual/has2.js';
13
13
 
@@ -1,5 +1,5 @@
1
1
  import { getDefaultExportFromCjs } from '../../../../_virtual/_commonjsHelpers.js';
2
- import { __exports as cloneDeep$1 } from '../../../../_virtual/cloneDeep4.js';
2
+ import { __exports as cloneDeep$1 } from '../../../../_virtual/cloneDeep2.js';
3
3
  import '../../../../_virtual/cloneDeepWith3.js';
4
4
  import { __exports as cloneDeepWith } from '../../../../_virtual/cloneDeepWith4.js';
5
5
 
@@ -1,2 +1,2 @@
1
- import '../node_modules/es-toolkit/dist/compat/object/cloneDeep.js';
1
+ import '../node_modules/es-toolkit/dist/object/cloneDeep.js';
2
2
  //# sourceMappingURL=cloneDeep.js.map
@@ -1,2 +1,2 @@
1
- import '../node_modules/es-toolkit/dist/object/cloneDeep.js';
1
+ import '../node_modules/es-toolkit/dist/compat/object/cloneDeep.js';
2
2
  //# sourceMappingURL=cloneDeep3.js.map
@@ -1,5 +1,4 @@
1
1
  import _defineProperty from '@babel/runtime/helpers/defineProperty';
2
- import _toConsumableArray from '@babel/runtime/helpers/toConsumableArray';
3
2
  import _slicedToArray from '@babel/runtime/helpers/slicedToArray';
4
3
  import _taggedTemplateLiteral from '@babel/runtime/helpers/taggedTemplateLiteral';
5
4
  import { memo, useMemo, useState } from 'react';
@@ -805,62 +804,12 @@ var TableRowHoverActions = function TableRowHoverActions(_ref17) {
805
804
  });
806
805
  };
807
806
 
808
- // px per average character at ~14px font size
809
- var CHAR_WIDTH = 7.5;
810
- // horizontal cell padding (left + right)
811
- var CELL_H_PADDING = 8;
812
-
813
- // Returns the minimum pixel width hint for a cell based on its content type.
814
- // Used as the `min` track in `minmax(min, max-content)` so columns never
815
- // collapse below a sensible floor while still growing to fit real content.
816
- var getCellMinWidth = function getCellMinWidth(cell) {
817
- var _cell$value$length, _cell$value2, _cell$value$toString, _cell$value3, _cell$value$length2, _cell$value4, _cell$value$length3, _cell$value5, _cell$text$length, _cell$text2;
818
- if (!(cell !== null && cell !== void 0 && cell.component)) return 80;
819
- switch (cell.component) {
820
- case 'TEXT':
821
- return Math.max(80, Math.min(300, ((_cell$value$length = (_cell$value2 = cell.value) === null || _cell$value2 === void 0 ? void 0 : _cell$value2.length) !== null && _cell$value$length !== void 0 ? _cell$value$length : 1) * CHAR_WIDTH + CELL_H_PADDING));
822
- case 'AMOUNT':
823
- // currency symbol + digits + separators
824
- return Math.max(100, (String((_cell$value$toString = (_cell$value3 = cell.value) === null || _cell$value3 === void 0 ? void 0 : _cell$value3.toString()) !== null && _cell$value$toString !== void 0 ? _cell$value$toString : 0).length + 2) * CHAR_WIDTH + CELL_H_PADDING);
825
- case 'INDICATOR':
826
- return Math.max(100, ((_cell$value$length2 = (_cell$value4 = cell.value) === null || _cell$value4 === void 0 ? void 0 : _cell$value4.length) !== null && _cell$value$length2 !== void 0 ? _cell$value$length2 : 1) * CHAR_WIDTH);
827
- case 'BADGE':
828
- return Math.max(80, ((_cell$value$length3 = (_cell$value5 = cell.value) === null || _cell$value5 === void 0 ? void 0 : _cell$value5.length) !== null && _cell$value$length3 !== void 0 ? _cell$value$length3 : 1) * CHAR_WIDTH);
829
- case 'DATE':
830
- {
831
- var dateValue = dayjs(cell.value);
832
- if (!dateValue.isValid()) {
833
- var _cell$value$length4, _cell$value6;
834
- return ((_cell$value$length4 = (_cell$value6 = cell.value) === null || _cell$value6 === void 0 ? void 0 : _cell$value6.length) !== null && _cell$value$length4 !== void 0 ? _cell$value$length4 : 0) * CHAR_WIDTH;
835
- }
836
- var defaultFormat = 'DD MMM YYYY, HH:mm';
837
- var formatted = dateValue.format(cell.dateFormat || defaultFormat);
838
- return formatted.length * CHAR_WIDTH;
839
- }
840
- case 'LINK':
841
- return Math.max(80, Math.min(250, ((_cell$text$length = (_cell$text2 = cell.text) === null || _cell$text2 === void 0 ? void 0 : _cell$text2.length) !== null && _cell$text$length !== void 0 ? _cell$text$length : 1) * CHAR_WIDTH + CELL_H_PADDING));
842
- default:
843
- return 80;
844
- }
845
- };
846
-
847
- // Produces one CSS grid track per column as a `fr` value proportional to
848
- // the estimated content width so columns fill the full table width while
849
- // still reflecting relative content size (wider content → more space).
850
- var calculateColumnWidths = function calculateColumnWidths(headers, rows) {
851
- var weights = headers.map(function (header, colIndex) {
852
- var headerWeight = header.length * CHAR_WIDTH + CELL_H_PADDING;
853
- var cellWeight = rows.reduce(function (max, row) {
854
- var cell = row[colIndex];
855
- return Math.max(max, getCellMinWidth(cell));
856
- }, 80);
857
- return Math.max(headerWeight, cellWeight);
858
- });
859
-
860
- // Normalise to smallest weight so fr numbers stay small and readable
861
- var minWeight = Math.min.apply(Math, _toConsumableArray(weights));
862
- return weights.map(function (w) {
863
- return "".concat(Math.round(w / minWeight * 10) / 10, "fr");
807
+ // Produces column widths using minmax(max-content, 1fr) so columns:
808
+ // 1. Never shrink below their content width (no text wrapping)
809
+ // 2. Expand proportionally to fill available width when space permits
810
+ var calculateColumnWidths = function calculateColumnWidths(headers, _rows) {
811
+ return headers.map(function () {
812
+ return 'minmax(max-content, 1fr)';
864
813
  });
865
814
  };
866
815
  var RenderTableComponent = /*#__PURE__*/memo(function (_ref18) {
@@ -905,7 +854,10 @@ var RenderTableComponent = /*#__PURE__*/memo(function (_ref18) {
905
854
  }), /*#__PURE__*/jsx(TableBody, {
906
855
  children: data.map(function (item, rowIndex) {
907
856
  return /*#__PURE__*/jsx(TableRow, {
908
- item: item,
857
+ item: item
858
+ // eslint-disable-next-line @typescript-eslint/no-empty-function
859
+ ,
860
+ onHover: rowActions && rowActions.length > 0 ? function () {} : undefined,
909
861
  hoverActions: rowActions && rowActions.length > 0 ? /*#__PURE__*/jsx(TableRowHoverActions, {
910
862
  rowActions: rowActions,
911
863
  rowIndex: rowIndex,
@@ -931,9 +883,7 @@ var RenderCardComponent = /*#__PURE__*/memo(function (_ref19) {
931
883
  description = _ref19.description,
932
884
  footer = _ref19.footer,
933
885
  children = _ref19.children;
934
- if (!title && !description) {
935
- return null;
936
- }
886
+ var hasHeader = title || description;
937
887
  return /*#__PURE__*/jsx(Box, {
938
888
  height: "100%",
939
889
  display: "flex",
@@ -943,13 +893,12 @@ var RenderCardComponent = /*#__PURE__*/memo(function (_ref19) {
943
893
  width: "100%",
944
894
  height: "100%",
945
895
  padding: "spacing.7",
946
- children: [/*#__PURE__*/jsx(CardHeader, {
947
- showDivider: false,
896
+ children: [hasHeader ? /*#__PURE__*/jsx(CardHeader, {
948
897
  children: /*#__PURE__*/jsx(CardHeaderLeading, {
949
898
  title: title || '',
950
899
  subtitle: description || ''
951
900
  })
952
- }), children && children.length > 0 ? /*#__PURE__*/jsx(CardBody, {
901
+ }) : null, children && children.length > 0 ? /*#__PURE__*/jsx(CardBody, {
953
902
  height: "100%",
954
903
  children: /*#__PURE__*/jsx(Box, {
955
904
  display: "flex",