@razorpay/blade 12.63.0 → 12.65.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 (204) hide show
  1. package/build/lib/native/components/Badge/Badge.js +1 -1
  2. package/build/lib/native/components/Badge/Badge.js.map +1 -1
  3. package/build/lib/native/components/Badge/badgeTokens.js +1 -1
  4. package/build/lib/native/components/Badge/badgeTokens.js.map +1 -1
  5. package/build/lib/native/components/Charts/CommonChartComponents/CommonChartComponentsContext.js +6 -0
  6. package/build/lib/native/components/Charts/CommonChartComponents/CommonChartComponentsContext.js.map +1 -0
  7. package/build/lib/native/components/Charts/CommonChartComponents/tokens.js +4 -0
  8. package/build/lib/native/components/Charts/CommonChartComponents/tokens.js.map +1 -0
  9. package/build/lib/native/components/Form/CharacterCounter/CharacterCounter.js.map +1 -1
  10. package/build/lib/native/components/Input/BaseInput/BaseInput.js.map +1 -1
  11. package/build/lib/native/components/Input/BaseInput/BaseInputVisuals.js +1 -1
  12. package/build/lib/native/components/Input/BaseInput/BaseInputVisuals.js.map +1 -1
  13. package/build/lib/native/components/Input/BaseInput/baseInputTokens.js +1 -1
  14. package/build/lib/native/components/Input/BaseInput/baseInputTokens.js.map +1 -1
  15. package/build/lib/native/components/QuickFilters/QuickFilter.js +1 -1
  16. package/build/lib/native/components/QuickFilters/QuickFilter.js.map +1 -1
  17. package/build/lib/native/components/Radio/Radio.js +1 -1
  18. package/build/lib/native/components/Radio/Radio.js.map +1 -1
  19. package/build/lib/native/components/Table/TableContext.js +1 -1
  20. package/build/lib/native/components/Table/TableContext.js.map +1 -1
  21. package/build/lib/native/components/Table/tokens.js +1 -1
  22. package/build/lib/native/components/Table/tokens.js.map +1 -1
  23. package/build/lib/native/components/index.js +2 -0
  24. package/build/lib/native/components/index.js.map +1 -1
  25. package/build/lib/native/tokens/global/colors.js +1 -1
  26. package/build/lib/native/tokens/global/colors.js.map +1 -1
  27. package/build/lib/native/tokens/global/size.js +1 -1
  28. package/build/lib/native/tokens/global/size.js.map +1 -1
  29. package/build/lib/native/tokens/theme/bladeTheme.js +1 -1
  30. package/build/lib/native/tokens/theme/bladeTheme.js.map +1 -1
  31. package/build/lib/native/tokens/theme/theme.js.map +1 -1
  32. package/build/lib/web/development/components/Badge/Badge.js +4 -0
  33. package/build/lib/web/development/components/Badge/Badge.js.map +1 -1
  34. package/build/lib/web/development/components/Badge/badgeTokens.js +4 -0
  35. package/build/lib/web/development/components/Badge/badgeTokens.js.map +1 -1
  36. package/build/lib/web/development/components/Charts/AreaChart/AreaChart.web.js +140 -38
  37. package/build/lib/web/development/components/Charts/AreaChart/AreaChart.web.js.map +1 -1
  38. package/build/lib/web/development/components/Charts/BarChart/BarChart.web.js +121 -57
  39. package/build/lib/web/development/components/Charts/BarChart/BarChart.web.js.map +1 -1
  40. package/build/lib/web/development/components/Charts/CommonChartComponents/CommonChartComponents.web.js +145 -92
  41. package/build/lib/web/development/components/Charts/CommonChartComponents/CommonChartComponents.web.js.map +1 -1
  42. package/build/lib/web/development/components/Charts/CommonChartComponents/CommonChartComponentsContext.js +15 -0
  43. package/build/lib/web/development/components/Charts/CommonChartComponents/CommonChartComponentsContext.js.map +1 -0
  44. package/build/lib/web/development/components/Charts/CommonChartComponents/index.js +2 -0
  45. package/build/lib/web/development/components/Charts/CommonChartComponents/index.js.map +1 -1
  46. package/build/lib/web/development/components/Charts/CommonChartComponents/tokens.js +2 -1
  47. package/build/lib/web/development/components/Charts/CommonChartComponents/tokens.js.map +1 -1
  48. package/build/lib/web/development/components/Charts/DonutChart/DonutChart.web.js +202 -69
  49. package/build/lib/web/development/components/Charts/DonutChart/DonutChart.web.js.map +1 -1
  50. package/build/lib/web/development/components/Charts/LineChart/LineChart.web.js +84 -32
  51. package/build/lib/web/development/components/Charts/LineChart/LineChart.web.js.map +1 -1
  52. package/build/lib/web/development/components/Charts/utils/assignDataColorMapping/assignDataColorMapping.js +33 -0
  53. package/build/lib/web/development/components/Charts/utils/assignDataColorMapping/assignDataColorMapping.js.map +1 -0
  54. package/build/lib/web/development/components/Charts/utils/assignDataColorMapping/index.js +2 -0
  55. package/build/lib/web/development/components/Charts/utils/assignDataColorMapping/index.js.map +1 -0
  56. package/build/lib/web/development/components/Charts/utils/getHighestColorInRange.js +53 -0
  57. package/build/lib/web/development/components/Charts/utils/getHighestColorInRange.js.map +1 -0
  58. package/build/lib/web/development/components/Charts/utils/index.js +5 -0
  59. package/build/lib/web/development/components/Charts/utils/index.js.map +1 -1
  60. package/build/lib/web/development/components/Charts/utils/isSequentialColor.js +35 -0
  61. package/build/lib/web/development/components/Charts/utils/isSequentialColor.js.map +1 -0
  62. package/build/lib/web/development/components/Charts/utils/sanitizeString/index.js +2 -0
  63. package/build/lib/web/development/components/Charts/utils/sanitizeString/index.js.map +1 -0
  64. package/build/lib/web/development/components/Charts/utils/sanitizeString/sanitizeString.js +30 -0
  65. package/build/lib/web/development/components/Charts/utils/sanitizeString/sanitizeString.js.map +1 -0
  66. package/build/lib/web/development/components/Charts/utils/tokens.js +7 -0
  67. package/build/lib/web/development/components/Charts/utils/tokens.js.map +1 -0
  68. package/build/lib/web/development/components/Charts/utils/useColorTheme.js +32 -11
  69. package/build/lib/web/development/components/Charts/utils/useColorTheme.js.map +1 -1
  70. package/build/lib/web/development/components/Dropdown/FilterChipGroup.web.js +3 -1
  71. package/build/lib/web/development/components/Dropdown/FilterChipGroup.web.js.map +1 -1
  72. package/build/lib/web/development/components/FilterChip/BaseFilterChip.web.js +8 -9
  73. package/build/lib/web/development/components/FilterChip/BaseFilterChip.web.js.map +1 -1
  74. package/build/lib/web/development/components/FilterChip/tokens.js +1 -1
  75. package/build/lib/web/development/components/FilterChip/tokens.js.map +1 -1
  76. package/build/lib/web/development/components/Form/CharacterCounter/CharacterCounter.js.map +1 -1
  77. package/build/lib/web/development/components/Input/BaseInput/BaseInput.js.map +1 -1
  78. package/build/lib/web/development/components/Input/BaseInput/BaseInputVisuals.js +2 -0
  79. package/build/lib/web/development/components/Input/BaseInput/BaseInputVisuals.js.map +1 -1
  80. package/build/lib/web/development/components/Input/BaseInput/baseInputTokens.js +11 -0
  81. package/build/lib/web/development/components/Input/BaseInput/baseInputTokens.js.map +1 -1
  82. package/build/lib/web/development/components/Input/PhoneNumberInput/CountrySelector.web.js +1 -0
  83. package/build/lib/web/development/components/Input/PhoneNumberInput/CountrySelector.web.js.map +1 -1
  84. package/build/lib/web/development/components/ListView/ListViewFilters.web.js +13 -102
  85. package/build/lib/web/development/components/ListView/ListViewFilters.web.js.map +1 -1
  86. package/build/lib/web/development/components/QuickFilters/QuickFilter.js +2 -1
  87. package/build/lib/web/development/components/QuickFilters/QuickFilter.js.map +1 -1
  88. package/build/lib/web/development/components/Radio/Radio.js +4 -2
  89. package/build/lib/web/development/components/Radio/Radio.js.map +1 -1
  90. package/build/lib/web/development/components/Table/Table.web.js +3 -1
  91. package/build/lib/web/development/components/Table/Table.web.js.map +1 -1
  92. package/build/lib/web/development/components/Table/TableBody.web.js +2 -1
  93. package/build/lib/web/development/components/Table/TableBody.web.js.map +1 -1
  94. package/build/lib/web/development/components/Table/TableContext.js +2 -1
  95. package/build/lib/web/development/components/Table/TableContext.js.map +1 -1
  96. package/build/lib/web/development/components/Table/TableFooter.web.js +2 -1
  97. package/build/lib/web/development/components/Table/TableFooter.web.js.map +1 -1
  98. package/build/lib/web/development/components/Table/TableHeader.web.js +78 -68
  99. package/build/lib/web/development/components/Table/TableHeader.web.js.map +1 -1
  100. package/build/lib/web/development/components/Table/TablePagination.web.js +5 -2
  101. package/build/lib/web/development/components/Table/TablePagination.web.js.map +1 -1
  102. package/build/lib/web/development/components/Table/TableToolbar.web.js +15 -13
  103. package/build/lib/web/development/components/Table/TableToolbar.web.js.map +1 -1
  104. package/build/lib/web/development/components/Table/tokens.js +11 -8
  105. package/build/lib/web/development/components/Table/tokens.js.map +1 -1
  106. package/build/lib/web/development/components/index.js +2 -0
  107. package/build/lib/web/development/components/index.js.map +1 -1
  108. package/build/lib/web/development/tokens/global/colors.js +48 -48
  109. package/build/lib/web/development/tokens/global/colors.js.map +1 -1
  110. package/build/lib/web/development/tokens/global/size.js +2 -0
  111. package/build/lib/web/development/tokens/global/size.js.map +1 -1
  112. package/build/lib/web/development/tokens/theme/bladeTheme.js +139 -111
  113. package/build/lib/web/development/tokens/theme/bladeTheme.js.map +1 -1
  114. package/build/lib/web/development/tokens/theme/theme.js.map +1 -1
  115. package/build/lib/web/production/components/Badge/Badge.js +4 -0
  116. package/build/lib/web/production/components/Badge/Badge.js.map +1 -1
  117. package/build/lib/web/production/components/Badge/badgeTokens.js +4 -0
  118. package/build/lib/web/production/components/Badge/badgeTokens.js.map +1 -1
  119. package/build/lib/web/production/components/Charts/AreaChart/AreaChart.web.js +140 -38
  120. package/build/lib/web/production/components/Charts/AreaChart/AreaChart.web.js.map +1 -1
  121. package/build/lib/web/production/components/Charts/BarChart/BarChart.web.js +121 -57
  122. package/build/lib/web/production/components/Charts/BarChart/BarChart.web.js.map +1 -1
  123. package/build/lib/web/production/components/Charts/CommonChartComponents/CommonChartComponents.web.js +145 -92
  124. package/build/lib/web/production/components/Charts/CommonChartComponents/CommonChartComponents.web.js.map +1 -1
  125. package/build/lib/web/production/components/Charts/CommonChartComponents/CommonChartComponentsContext.js +15 -0
  126. package/build/lib/web/production/components/Charts/CommonChartComponents/CommonChartComponentsContext.js.map +1 -0
  127. package/build/lib/web/production/components/Charts/CommonChartComponents/index.js +2 -0
  128. package/build/lib/web/production/components/Charts/CommonChartComponents/index.js.map +1 -1
  129. package/build/lib/web/production/components/Charts/CommonChartComponents/tokens.js +2 -1
  130. package/build/lib/web/production/components/Charts/CommonChartComponents/tokens.js.map +1 -1
  131. package/build/lib/web/production/components/Charts/DonutChart/DonutChart.web.js +202 -69
  132. package/build/lib/web/production/components/Charts/DonutChart/DonutChart.web.js.map +1 -1
  133. package/build/lib/web/production/components/Charts/LineChart/LineChart.web.js +84 -32
  134. package/build/lib/web/production/components/Charts/LineChart/LineChart.web.js.map +1 -1
  135. package/build/lib/web/production/components/Charts/utils/assignDataColorMapping/assignDataColorMapping.js +33 -0
  136. package/build/lib/web/production/components/Charts/utils/assignDataColorMapping/assignDataColorMapping.js.map +1 -0
  137. package/build/lib/web/production/components/Charts/utils/assignDataColorMapping/index.js +2 -0
  138. package/build/lib/web/production/components/Charts/utils/assignDataColorMapping/index.js.map +1 -0
  139. package/build/lib/web/production/components/Charts/utils/getHighestColorInRange.js +53 -0
  140. package/build/lib/web/production/components/Charts/utils/getHighestColorInRange.js.map +1 -0
  141. package/build/lib/web/production/components/Charts/utils/index.js +5 -0
  142. package/build/lib/web/production/components/Charts/utils/index.js.map +1 -1
  143. package/build/lib/web/production/components/Charts/utils/isSequentialColor.js +35 -0
  144. package/build/lib/web/production/components/Charts/utils/isSequentialColor.js.map +1 -0
  145. package/build/lib/web/production/components/Charts/utils/sanitizeString/index.js +2 -0
  146. package/build/lib/web/production/components/Charts/utils/sanitizeString/index.js.map +1 -0
  147. package/build/lib/web/production/components/Charts/utils/sanitizeString/sanitizeString.js +30 -0
  148. package/build/lib/web/production/components/Charts/utils/sanitizeString/sanitizeString.js.map +1 -0
  149. package/build/lib/web/production/components/Charts/utils/tokens.js +7 -0
  150. package/build/lib/web/production/components/Charts/utils/tokens.js.map +1 -0
  151. package/build/lib/web/production/components/Charts/utils/useColorTheme.js +32 -11
  152. package/build/lib/web/production/components/Charts/utils/useColorTheme.js.map +1 -1
  153. package/build/lib/web/production/components/Dropdown/FilterChipGroup.web.js +3 -1
  154. package/build/lib/web/production/components/Dropdown/FilterChipGroup.web.js.map +1 -1
  155. package/build/lib/web/production/components/FilterChip/BaseFilterChip.web.js +8 -9
  156. package/build/lib/web/production/components/FilterChip/BaseFilterChip.web.js.map +1 -1
  157. package/build/lib/web/production/components/FilterChip/tokens.js +1 -1
  158. package/build/lib/web/production/components/FilterChip/tokens.js.map +1 -1
  159. package/build/lib/web/production/components/Form/CharacterCounter/CharacterCounter.js.map +1 -1
  160. package/build/lib/web/production/components/Input/BaseInput/BaseInput.js.map +1 -1
  161. package/build/lib/web/production/components/Input/BaseInput/BaseInputVisuals.js +2 -0
  162. package/build/lib/web/production/components/Input/BaseInput/BaseInputVisuals.js.map +1 -1
  163. package/build/lib/web/production/components/Input/BaseInput/baseInputTokens.js +11 -0
  164. package/build/lib/web/production/components/Input/BaseInput/baseInputTokens.js.map +1 -1
  165. package/build/lib/web/production/components/Input/PhoneNumberInput/CountrySelector.web.js +1 -0
  166. package/build/lib/web/production/components/Input/PhoneNumberInput/CountrySelector.web.js.map +1 -1
  167. package/build/lib/web/production/components/ListView/ListViewFilters.web.js +13 -102
  168. package/build/lib/web/production/components/ListView/ListViewFilters.web.js.map +1 -1
  169. package/build/lib/web/production/components/QuickFilters/QuickFilter.js +2 -1
  170. package/build/lib/web/production/components/QuickFilters/QuickFilter.js.map +1 -1
  171. package/build/lib/web/production/components/Radio/Radio.js +4 -2
  172. package/build/lib/web/production/components/Radio/Radio.js.map +1 -1
  173. package/build/lib/web/production/components/Table/Table.web.js +3 -1
  174. package/build/lib/web/production/components/Table/Table.web.js.map +1 -1
  175. package/build/lib/web/production/components/Table/TableBody.web.js +2 -1
  176. package/build/lib/web/production/components/Table/TableBody.web.js.map +1 -1
  177. package/build/lib/web/production/components/Table/TableContext.js +2 -1
  178. package/build/lib/web/production/components/Table/TableContext.js.map +1 -1
  179. package/build/lib/web/production/components/Table/TableFooter.web.js +2 -1
  180. package/build/lib/web/production/components/Table/TableFooter.web.js.map +1 -1
  181. package/build/lib/web/production/components/Table/TableHeader.web.js +78 -68
  182. package/build/lib/web/production/components/Table/TableHeader.web.js.map +1 -1
  183. package/build/lib/web/production/components/Table/TablePagination.web.js +5 -2
  184. package/build/lib/web/production/components/Table/TablePagination.web.js.map +1 -1
  185. package/build/lib/web/production/components/Table/TableToolbar.web.js +15 -13
  186. package/build/lib/web/production/components/Table/TableToolbar.web.js.map +1 -1
  187. package/build/lib/web/production/components/Table/tokens.js +11 -8
  188. package/build/lib/web/production/components/Table/tokens.js.map +1 -1
  189. package/build/lib/web/production/components/index.js +2 -0
  190. package/build/lib/web/production/components/index.js.map +1 -1
  191. package/build/lib/web/production/tokens/global/colors.js +48 -48
  192. package/build/lib/web/production/tokens/global/colors.js.map +1 -1
  193. package/build/lib/web/production/tokens/global/size.js +2 -0
  194. package/build/lib/web/production/tokens/global/size.js.map +1 -1
  195. package/build/lib/web/production/tokens/theme/bladeTheme.js +139 -111
  196. package/build/lib/web/production/tokens/theme/bladeTheme.js.map +1 -1
  197. package/build/lib/web/production/tokens/theme/theme.js.map +1 -1
  198. package/build/types/components/index.d.ts +109 -23
  199. package/build/types/components/index.native.d.ts +106 -20
  200. package/build/types/tokens/index.d.ts +8 -6
  201. package/build/types/tokens/index.native.d.ts +8 -6
  202. package/build/types/utils/index.d.ts +29 -6
  203. package/build/types/utils/index.native.d.ts +29 -6
  204. package/package.json +1 -1
@@ -4,10 +4,11 @@ import _objectWithoutProperties from '@babel/runtime/helpers/objectWithoutProper
4
4
  import _defineProperty from '@babel/runtime/helpers/defineProperty';
5
5
  import _objectDestructuringEmpty from '@babel/runtime/helpers/objectDestructuringEmpty';
6
6
  import _extends from '@babel/runtime/helpers/extends';
7
- import { useState, useRef, useEffect, useMemo, isValidElement, createElement } from 'react';
7
+ import { useMemo, isValidElement, useState, useRef, useEffect, createElement } from 'react';
8
8
  import { Cell, ResponsiveContainer, PieChart, Label, Pie } from 'recharts';
9
9
  import '../utils/index.js';
10
10
  import { componentId as componentId$1 } from '../CommonChartComponents/tokens.js';
11
+ import '../CommonChartComponents/index.js';
11
12
  import { componentId, LABEL_FONT_STYLES, LABEL_DISTANCE_FROM_CENTER, RADIUS_MAPPING, START_AND_END_ANGLES } from './tokens.js';
12
13
  import '../../BladeProvider/index.js';
13
14
  import '../../Box/BaseBox/index.js';
@@ -16,14 +17,18 @@ import getIn from '../../../utils/lodashButBetter/get.js';
16
17
  import '../../../utils/makeAnalyticsAttribute/index.js';
17
18
  import '../../../utils/assignWithoutSideEffects/index.js';
18
19
  import '../../../utils/isValidAllowedChildren/index.js';
19
- import { jsx, jsxs } from 'react/jsx-runtime';
20
+ import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
20
21
  import { assignWithoutSideEffects } from '../../../utils/assignWithoutSideEffects/assignWithoutSideEffects.js';
21
22
  import useTheme from '../../BladeProvider/useTheme.js';
22
23
  import { getComponentId } from '../../../utils/isValidAllowedChildren/isValidAllowedChildren.js';
24
+ import useChartsColorTheme from '../utils/useColorTheme.js';
25
+ import { sanitizeString } from '../utils/sanitizeString/sanitizeString.js';
26
+ import { assignDataColorMapping } from '../utils/assignDataColorMapping/assignDataColorMapping.js';
27
+ import { CommonChartComponentsContext } from '../CommonChartComponents/CommonChartComponentsContext.js';
23
28
  import { BaseBox } from '../../Box/BaseBox/BaseBox.web.js';
24
29
  import { metaAttribute } from '../../../utils/metaAttribute/metaAttribute.web.js';
25
30
  import { makeAnalyticsAttribute } from '../../../utils/makeAnalyticsAttribute/makeAnalyticsAttribute.js';
26
- import useChartsColorTheme from '../utils/useColorTheme.js';
31
+ import { getHighestColorInRange } from '../utils/getHighestColorInRange.js';
27
32
 
28
33
  var _excluded = ["children", "content", "testID"],
29
34
  _excluded2 = ["cx", "cy", "radius", "dataKey", "nameKey", "children", "data", "colorTheme", "type"];
@@ -49,6 +54,23 @@ var ChartDonutWrapper = function ChartDonutWrapper(_ref2) {
49
54
  restProps = _objectWithoutProperties(_ref2, _excluded);
50
55
  var _useTheme = useTheme(),
51
56
  theme = _useTheme.theme;
57
+ var colorTheme = useMemo(function () {
58
+ if (Array.isArray(children)) {
59
+ var _donutChild$props;
60
+ var donutChild = children.find(function (child) {
61
+ return getComponentId(child) === componentId.chartDonut;
62
+ });
63
+ if (!donutChild || ! /*#__PURE__*/isValidElement(donutChild)) {
64
+ return 'categorical';
65
+ }
66
+ return (donutChild === null || donutChild === void 0 || (_donutChild$props = donutChild.props) === null || _donutChild$props === void 0 ? void 0 : _donutChild$props.colorTheme) || 'categorical';
67
+ }
68
+ return 'categorical';
69
+ }, [children]);
70
+ var themeColors = useChartsColorTheme({
71
+ colorTheme: colorTheme,
72
+ chartName: 'donut'
73
+ });
52
74
  var _useState = useState(0),
53
75
  _useState2 = _slicedToArray(_useState, 2),
54
76
  legendHeight = _useState2[0],
@@ -87,14 +109,14 @@ var ChartDonutWrapper = function ChartDonutWrapper(_ref2) {
87
109
  }, []);
88
110
  var pieChartRadius = useMemo(function () {
89
111
  if (Array.isArray(children)) {
90
- var _donutChild$props;
112
+ var _donutChild$props2;
91
113
  var donutChild = children.find(function (child) {
92
114
  return getComponentId(child) === componentId.chartDonut;
93
115
  });
94
116
  if (!donutChild || ! /*#__PURE__*/isValidElement(donutChild)) {
95
117
  return 'medium';
96
118
  }
97
- return (donutChild === null || donutChild === void 0 || (_donutChild$props = donutChild.props) === null || _donutChild$props === void 0 ? void 0 : _donutChild$props.radius) || 'medium';
119
+ return (donutChild === null || donutChild === void 0 || (_donutChild$props2 = donutChild.props) === null || _donutChild$props2 === void 0 ? void 0 : _donutChild$props2.radius) || 'medium';
98
120
  }
99
121
  return 'medium';
100
122
  }, [children]);
@@ -124,50 +146,98 @@ var ChartDonutWrapper = function ChartDonutWrapper(_ref2) {
124
146
  }
125
147
  return 'right';
126
148
  }, [children]);
127
- return /*#__PURE__*/jsxs(BaseBox, _objectSpread(_objectSpread(_objectSpread(_objectSpread({
128
- ref: chartRef
129
- }, metaAttribute({
130
- name: 'donut-chart',
131
- testID: testID
132
- })), makeAnalyticsAttribute(restProps)), {}, {
133
- width: "100%",
134
- height: "100%"
135
- }, restProps), {}, {
136
- position: /*#__PURE__*/isValidElement(content) ? 'relative' : undefined,
137
- children: [/*#__PURE__*/jsx(ResponsiveContainer, {
149
+ /**
150
+ * We need to check child of ChartDonutWrapper. if they have any custom color we store that.
151
+ * We need these mapping because colors of tooltip & legend is determine based on this
152
+ * recharts do provide a color but it is hex code and we need blade color token .
153
+ */
154
+
155
+ var dataColorMapping = useMemo(function () {
156
+ var dataColorMapping = {};
157
+ if (Array.isArray(children)) {
158
+ children.forEach(function (child) {
159
+ if (getComponentId(child) === componentId.chartDonut) {
160
+ var data = child.props.data;
161
+ // Donut Chart can also have <Cell/> which will come under donutChildren.
162
+ var donutChildren = child.props.children;
163
+ if (Array.isArray(donutChildren)) {
164
+ donutChildren.forEach(function (child, index) {
165
+ var _data$index;
166
+ if (getComponentId(child) === componentId.cell && (_data$index = data[index]) !== null && _data$index !== void 0 && _data$index.name) {
167
+ var _child$props, _child$props2;
168
+ // assign colors to the dataColorMapping, if no color is assigned we assign color in `assignDataColorMapping`
169
+
170
+ dataColorMapping[sanitizeString(data[index].name)] = {
171
+ colorToken: (_child$props = child.props) === null || _child$props === void 0 ? void 0 : _child$props.color,
172
+ isCustomColor: Boolean((_child$props2 = child.props) === null || _child$props2 === void 0 ? void 0 : _child$props2.color)
173
+ };
174
+ }
175
+ });
176
+ } else {
177
+ // if we don't have cell as child component then we can we directly assign theme colors
178
+ data.forEach(function (item, index) {
179
+ dataColorMapping[sanitizeString(item.name)] = {
180
+ colorToken: themeColors[index],
181
+ isCustomColor: false
182
+ };
183
+ });
184
+ }
185
+ }
186
+ });
187
+ }
188
+ assignDataColorMapping(dataColorMapping, themeColors);
189
+ return dataColorMapping;
190
+ }, [children, themeColors]);
191
+ return /*#__PURE__*/jsx(CommonChartComponentsContext.Provider, {
192
+ value: {
193
+ chartName: 'donut',
194
+ dataColorMapping: dataColorMapping
195
+ },
196
+ children: /*#__PURE__*/jsxs(BaseBox, _objectSpread(_objectSpread(_objectSpread(_objectSpread({
197
+ ref: chartRef
198
+ }, metaAttribute({
199
+ name: 'donut-chart',
200
+ testID: testID
201
+ })), makeAnalyticsAttribute(restProps)), {}, {
138
202
  width: "100%",
139
- height: "100%",
140
- children: /*#__PURE__*/jsxs(PieChart, {
141
- children: [children, isLabelPresentInContent && /*#__PURE__*/jsx(Label, {
142
- position: "center",
143
- fill: theme.colors.surface.text.gray.muted,
144
- fontSize: theme.typography.fonts.size[LABEL_FONT_STYLES[pieChartRadius].fontSize.label],
145
- fontFamily: theme.typography.fonts.family.text,
146
- fontWeight: theme.typography.fonts.weight.medium,
147
- letterSpacing: theme.typography.letterSpacings[100],
148
- dy: isValuePresentInContent ? LABEL_DISTANCE_FROM_CENTER[pieChartRadius].withText : LABEL_DISTANCE_FROM_CENTER[pieChartRadius].normal,
149
- children: content === null || content === void 0 ? void 0 : content.label
150
- }), isValuePresentInContent && /*#__PURE__*/jsx(Label, {
151
- position: "center",
152
- fill: theme.colors.surface.text.gray.normal,
153
- fontSize: theme.typography.fonts.size[LABEL_FONT_STYLES[pieChartRadius].fontSize.text],
154
- fontFamily: theme.typography.fonts.family.heading,
155
- fontWeight: theme.typography.fonts.weight.bold,
156
- letterSpacing: theme.typography.letterSpacings[100],
157
- dy: isLabelPresentInContent ? LABEL_DISTANCE_FROM_CENTER[pieChartRadius].withLabel : LABEL_DISTANCE_FROM_CENTER[pieChartRadius].normal,
158
- children: content === null || content === void 0 ? void 0 : content.value
159
- })]
160
- })
161
- }), /*#__PURE__*/isValidElement(content) && /*#__PURE__*/jsx(BaseBox, {
162
- position: "absolute",
163
- top: "50%",
164
- left: "50%",
165
- transform: getTranslate(legendLayout, legendAlignment, legendWidth, legendHeight),
166
- zIndex: 10,
167
- textAlign: "center",
168
- children: content
169
- })]
170
- }));
203
+ height: "100%"
204
+ }, restProps), {}, {
205
+ position: /*#__PURE__*/isValidElement(content) ? 'relative' : undefined,
206
+ children: [/*#__PURE__*/jsx(ResponsiveContainer, {
207
+ width: "100%",
208
+ height: "100%",
209
+ children: /*#__PURE__*/jsxs(PieChart, {
210
+ children: [children, isLabelPresentInContent && /*#__PURE__*/jsx(Label, {
211
+ position: "center",
212
+ fill: theme.colors.surface.text.gray.muted,
213
+ fontSize: theme.typography.fonts.size[LABEL_FONT_STYLES[pieChartRadius].fontSize.label],
214
+ fontFamily: theme.typography.fonts.family.text,
215
+ fontWeight: theme.typography.fonts.weight.medium,
216
+ letterSpacing: theme.typography.letterSpacings[100],
217
+ dy: isValuePresentInContent ? LABEL_DISTANCE_FROM_CENTER[pieChartRadius].withText : LABEL_DISTANCE_FROM_CENTER[pieChartRadius].normal,
218
+ children: content === null || content === void 0 ? void 0 : content.label
219
+ }), isValuePresentInContent && /*#__PURE__*/jsx(Label, {
220
+ position: "center",
221
+ fill: theme.colors.surface.text.gray.normal,
222
+ fontSize: theme.typography.fonts.size[LABEL_FONT_STYLES[pieChartRadius].fontSize.text],
223
+ fontFamily: theme.typography.fonts.family.heading,
224
+ fontWeight: theme.typography.fonts.weight.bold,
225
+ letterSpacing: theme.typography.letterSpacings[100],
226
+ dy: isLabelPresentInContent ? LABEL_DISTANCE_FROM_CENTER[pieChartRadius].withLabel : LABEL_DISTANCE_FROM_CENTER[pieChartRadius].normal,
227
+ children: content === null || content === void 0 ? void 0 : content.value
228
+ })]
229
+ })
230
+ }), /*#__PURE__*/isValidElement(content) && /*#__PURE__*/jsx(BaseBox, {
231
+ position: "absolute",
232
+ top: "50%",
233
+ left: "50%",
234
+ transform: getTranslate(legendLayout, legendAlignment, legendWidth, legendHeight),
235
+ zIndex: 10,
236
+ textAlign: "center",
237
+ children: content
238
+ })]
239
+ }))
240
+ });
171
241
  };
172
242
  var _ChartDonut = function _ChartDonut(_ref3) {
173
243
  var _ref3$cx = _ref3.cx,
@@ -187,7 +257,8 @@ var _ChartDonut = function _ChartDonut(_ref3) {
187
257
  rest = _objectWithoutProperties(_ref3, _excluded2);
188
258
  var radiusConfig = RADIUS_MAPPING[radius];
189
259
  var themeColors = useChartsColorTheme({
190
- colorTheme: colorTheme
260
+ colorTheme: colorTheme,
261
+ chartName: 'donut'
191
262
  });
192
263
  var _useState5 = useState(null),
193
264
  _useState6 = _slicedToArray(_useState5, 2),
@@ -212,11 +283,12 @@ var _ChartDonut = function _ChartDonut(_ref3) {
212
283
  So we have placeholder component ChartDonutCell. which we replaced by RechartsCell internally so dev can see hover effects
213
284
  working out of box.
214
285
  */
215
- var fill = getIn(theme.colors, child.props.color) || themeColors[index];
286
+ var fill = getIn(theme.colors, child.props.color || themeColors[index]);
216
287
  return /*#__PURE__*/createElement(Cell, _objectSpread(_objectSpread({}, child.props), {}, {
217
288
  fill: fill,
218
289
  key: index,
219
- opacity: getCellOpacity(hoveredIndex, index)
290
+ opacity: getCellOpacity(hoveredIndex, index),
291
+ strokeWidth: 0
220
292
  }));
221
293
  } else {
222
294
  return child;
@@ -225,28 +297,89 @@ var _ChartDonut = function _ChartDonut(_ref3) {
225
297
  }
226
298
  return data === null || data === void 0 ? void 0 : data.map(function (_, index) {
227
299
  return /*#__PURE__*/jsx(Cell, {
228
- fill: themeColors[index],
229
- opacity: getCellOpacity(hoveredIndex, index)
300
+ fill: getIn(theme.colors, themeColors[index]),
301
+ opacity: getCellOpacity(hoveredIndex, index),
302
+ strokeWidth: 0
230
303
  }, index);
231
304
  });
232
305
  // eslint-disable-next-line react-hooks/exhaustive-deps
233
306
  }, [children, data, colorTheme, hoveredIndex, themeColors]);
234
- return /*#__PURE__*/jsx(Pie, _objectSpread(_objectSpread({}, rest), {}, {
235
- cx: cx,
236
- cy: cy,
237
- outerRadius: radiusConfig.outerRadius,
238
- innerRadius: radiusConfig.innerRadius,
239
- data: data,
240
- startAngle: START_AND_END_ANGLES[type].startAngle,
241
- endAngle: START_AND_END_ANGLES[type].endAngle,
242
- onMouseEnter: function onMouseEnter(data, index) {
243
- setHoveredIndex(index);
244
- },
245
- onMouseLeave: function onMouseLeave() {
246
- setHoveredIndex(null);
247
- },
248
- children: modifiedChildren
249
- }));
307
+ var modifiedExternalDonutChildren = useMemo(function () {
308
+ if (Array.isArray(children)) {
309
+ return children.map(function (child, index) {
310
+ if (getComponentId(child) === componentId.cell) {
311
+ /*
312
+ Why we are not using React.cloneElement ? just use ChartDonutCell no?
313
+ cell can never be custom component in recharts. (as of v3.1.2)
314
+ (https://github.com/recharts/recharts/issues/2788)
315
+ https://github.com/recharts/recharts/discussions/5474
316
+ So we have placeholder component ChartDonutCell. which we replaced by RechartsCell internally so dev can see hover effects
317
+ working out of box.
318
+ */
319
+
320
+ var fill = getIn(theme.colors, getHighestColorInRange({
321
+ colorToken: child.props.color || themeColors[index],
322
+ followIntensityMapping: Boolean(child.props.color)
323
+ }));
324
+ return /*#__PURE__*/createElement(Cell, _objectSpread(_objectSpread({}, child.props), {}, {
325
+ key: "stroke-".concat(index),
326
+ fill: "transparent",
327
+ stroke: fill // Different stroke color for each cell
328
+ ,
329
+ strokeWidth: 0.75,
330
+ strokeOpacity: getCellOpacity(hoveredIndex, index)
331
+ }));
332
+ } else {
333
+ return child;
334
+ }
335
+ });
336
+ }
337
+ return data === null || data === void 0 ? void 0 : data.map(function (_, index) {
338
+ return /*#__PURE__*/jsx(Cell, {
339
+ fill: "transparent",
340
+ stroke: getIn(theme.colors, getHighestColorInRange({
341
+ colorToken: themeColors[index]
342
+ })) // Different stroke color for each cell
343
+ ,
344
+ strokeWidth: 0.75,
345
+ strokeOpacity: getCellOpacity(hoveredIndex, index)
346
+ }, "stroke-".concat(index));
347
+ });
348
+ // eslint-disable-next-line react-hooks/exhaustive-deps
349
+ }, [children, data, colorTheme, hoveredIndex, themeColors]);
350
+ return /*#__PURE__*/jsxs(Fragment, {
351
+ children: [/*#__PURE__*/jsx(Pie, _objectSpread(_objectSpread({}, rest), {}, {
352
+ cx: cx,
353
+ cy: cy,
354
+ outerRadius: radiusConfig.outerRadius,
355
+ innerRadius: radiusConfig.innerRadius,
356
+ data: data,
357
+ startAngle: START_AND_END_ANGLES[type].startAngle,
358
+ endAngle: START_AND_END_ANGLES[type].endAngle,
359
+ onMouseEnter: function onMouseEnter(data, index) {
360
+ setHoveredIndex(index);
361
+ },
362
+ onMouseLeave: function onMouseLeave() {
363
+ setHoveredIndex(null);
364
+ },
365
+ paddingAngle: 1.5,
366
+ children: modifiedChildren
367
+ })), /*#__PURE__*/jsx(Pie, {
368
+ cx: cx,
369
+ cy: cy,
370
+ outerRadius: radiusConfig.outerRadius,
371
+ innerRadius: radiusConfig.outerRadius - 0.75 // 1.5px thick stroke
372
+ ,
373
+ data: data,
374
+ startAngle: START_AND_END_ANGLES[type].startAngle,
375
+ endAngle: START_AND_END_ANGLES[type].endAngle,
376
+ fill: "transparent",
377
+ legendType: "none",
378
+ tooltipType: "none",
379
+ paddingAngle: 1.5,
380
+ children: modifiedExternalDonutChildren
381
+ })]
382
+ });
250
383
  };
251
384
  var ChartDonut = /*#__PURE__*/assignWithoutSideEffects(_ChartDonut, {
252
385
  componentId: componentId.chartDonut
@@ -1 +1 @@
1
- {"version":3,"file":"DonutChart.web.js","sources":["../../../../../../../src/components/Charts/DonutChart/DonutChart.web.tsx"],"sourcesContent":["import React, { isValidElement, useMemo, useState, useRef, useEffect } from 'react';\nimport {\n PieChart as RechartsPieChart,\n Pie as RechartsPie,\n Cell as RechartsCell,\n ResponsiveContainer as RechartsResponsiveContainer,\n Label,\n} from 'recharts';\nimport { useChartsColorTheme } from '../utils';\nimport { componentId as commonChartComponentId } from '../CommonChartComponents/tokens';\nimport type {\n ChartDonutWrapperProps,\n ChartDonutCellProps,\n ChartDonutProps,\n ChartRadius,\n} from './types';\nimport {\n RADIUS_MAPPING,\n START_AND_END_ANGLES,\n componentId,\n LABEL_DISTANCE_FROM_CENTER,\n LABEL_FONT_STYLES,\n} from './tokens';\nimport { useTheme } from '~components/BladeProvider';\nimport BaseBox from '~components/Box/BaseBox';\nimport { metaAttribute } from '~utils/metaAttribute';\nimport getIn from '~utils/lodashButBetter/get';\nimport type { DataAnalyticsAttribute, TestID } from '~utils/types';\nimport { makeAnalyticsAttribute } from '~utils/makeAnalyticsAttribute';\nimport { assignWithoutSideEffects } from '~utils/assignWithoutSideEffects';\nimport { getComponentId } from '~utils/isValidAllowedChildren';\n\n// Cell component\nconst _Cell: React.FC<ChartDonutCellProps> = ({ ...rest }) => {\n return <RechartsCell {...rest} />;\n};\n\nconst ChartDonutCell = assignWithoutSideEffects(_Cell, {\n componentId: componentId.cell,\n});\n\nconst getTranslate = (\n legendLayout: 'horizontal' | 'vertical',\n legendAlignment: 'left' | 'right',\n legendWidth: number,\n legendHeight: number,\n): string => {\n if (legendLayout === 'vertical') {\n return `translate(calc(-50% + ${\n legendAlignment === 'right' ? -legendWidth / 2 : legendWidth / 2\n }px) , calc(-50%))`;\n }\n return `translate(-50%, calc(-50% - ${legendHeight / 2}px))`;\n};\n\nconst ChartDonutWrapper: React.FC<ChartDonutWrapperProps & TestID & DataAnalyticsAttribute> = ({\n children,\n content,\n testID,\n ...restProps\n}) => {\n const { theme } = useTheme();\n const [legendHeight, setLegendHeight] = useState(0);\n const [legendWidth, setLegendWidth] = useState(0);\n const chartRef = useRef<HTMLDivElement>(null);\n const isValuePresentInContent = content && typeof content === 'object' && 'value' in content;\n const isLabelPresentInContent = content && typeof content === 'object' && 'label' in content;\n useEffect(() => {\n const observer = new MutationObserver((mutations) => {\n mutations.forEach((mutation) => {\n if (mutation.type === 'childList') {\n const legendWrapper = chartRef.current?.querySelector('.recharts-legend-wrapper');\n if (legendWrapper) {\n const height = legendWrapper.getBoundingClientRect().height;\n const width = legendWrapper.getBoundingClientRect().width;\n setLegendHeight(height);\n setLegendWidth(width);\n }\n }\n });\n });\n\n if (chartRef.current) {\n observer.observe(chartRef.current, { childList: true, subtree: true });\n }\n\n return () => observer.disconnect();\n }, []);\n\n const pieChartRadius: ChartRadius = useMemo(() => {\n if (Array.isArray(children)) {\n const donutChild = children.find((child) => getComponentId(child) === componentId.chartDonut);\n if (!donutChild || !isValidElement(donutChild)) {\n return 'medium';\n }\n return donutChild?.props?.radius || 'medium';\n }\n return 'medium';\n }, [children]);\n\n const legendLayout = useMemo(() => {\n if (Array.isArray(children)) {\n const legendChild = children.find(\n (child) => getComponentId(child) === commonChartComponentId.chartLegend,\n );\n if (!legendChild || !isValidElement(legendChild)) {\n return 'horizontal';\n }\n return legendChild?.props?.layout || 'horizontal';\n }\n return 'horizontal';\n }, [children]);\n\n const legendAlignment = useMemo(() => {\n if (Array.isArray(children)) {\n const legendChild = children.find(\n (child) => getComponentId(child) === commonChartComponentId.chartLegend,\n );\n if (!legendChild || !isValidElement(legendChild)) {\n return 'right';\n }\n return legendChild?.props?.align || 'right';\n }\n return 'right';\n }, [children]);\n\n return (\n <BaseBox\n ref={chartRef}\n {...metaAttribute({ name: 'donut-chart', testID })}\n {...makeAnalyticsAttribute(restProps)}\n width=\"100%\"\n height=\"100%\"\n {...restProps}\n position={isValidElement(content) ? 'relative' : undefined}\n >\n <RechartsResponsiveContainer width=\"100%\" height=\"100%\">\n <RechartsPieChart>\n {children}\n {isLabelPresentInContent && (\n <Label\n position=\"center\"\n fill={theme.colors.surface.text.gray.muted}\n fontSize={\n theme.typography.fonts.size[\n LABEL_FONT_STYLES[pieChartRadius].fontSize\n .label as keyof typeof theme.typography.fonts.size\n ]\n }\n fontFamily={theme.typography.fonts.family.text}\n fontWeight={theme.typography.fonts.weight.medium}\n letterSpacing={theme.typography.letterSpacings[100]}\n dy={\n isValuePresentInContent\n ? LABEL_DISTANCE_FROM_CENTER[pieChartRadius].withText\n : LABEL_DISTANCE_FROM_CENTER[pieChartRadius].normal\n }\n >\n {content?.label}\n </Label>\n )}\n {isValuePresentInContent && (\n <Label\n position=\"center\"\n fill={theme.colors.surface.text.gray.normal}\n fontSize={\n theme.typography.fonts.size[\n LABEL_FONT_STYLES[pieChartRadius].fontSize\n .text as keyof typeof theme.typography.fonts.size\n ]\n }\n fontFamily={theme.typography.fonts.family.heading}\n fontWeight={theme.typography.fonts.weight.bold}\n letterSpacing={theme.typography.letterSpacings[100]}\n dy={\n isLabelPresentInContent\n ? LABEL_DISTANCE_FROM_CENTER[pieChartRadius].withLabel\n : LABEL_DISTANCE_FROM_CENTER[pieChartRadius].normal\n }\n >\n {content?.value}\n </Label>\n )}\n </RechartsPieChart>\n </RechartsResponsiveContainer>\n\n {isValidElement(content) && (\n <BaseBox\n position=\"absolute\"\n top=\"50%\"\n left=\"50%\"\n transform={getTranslate(legendLayout, legendAlignment, legendWidth, legendHeight)}\n zIndex={10}\n textAlign=\"center\"\n >\n {content}\n </BaseBox>\n )}\n </BaseBox>\n );\n};\n\nconst _ChartDonut: React.FC<ChartDonutProps> = ({\n cx = '50%',\n cy = '50%',\n radius = 'medium',\n dataKey,\n nameKey,\n children,\n data,\n colorTheme = 'categorical',\n type = 'circle',\n ...rest\n}) => {\n const radiusConfig = RADIUS_MAPPING[radius];\n const themeColors = useChartsColorTheme({ colorTheme });\n const [hoveredIndex, setHoveredIndex] = useState<number | null>(null);\n const { theme } = useTheme();\n\n const getCellOpacity = (hoveredIndex: number | null, currentIndex: number): number => {\n if (hoveredIndex === null) return 1;\n if (hoveredIndex === currentIndex) return 1;\n return 0.2;\n };\n\n const modifiedChildren = useMemo(() => {\n if (Array.isArray(children)) {\n return children.map((child, index) => {\n if (getComponentId(child) === componentId.cell) {\n /* \n Why we are not using React.cloneElement ? just use ChartDonutCell no?\n cell can never be custom component in recharts. (as of v3.1.2)\n (https://github.com/recharts/recharts/issues/2788)\n https://github.com/recharts/recharts/discussions/5474\n\n So we have placeholder component ChartDonutCell. which we replaced by RechartsCell internally so dev can see hover effects\n working out of box. \n */\n const fill = getIn(theme.colors, child.props.color) || themeColors[index];\n return (\n <RechartsCell\n {...child.props}\n fill={fill}\n key={index}\n opacity={getCellOpacity(hoveredIndex, index)}\n />\n );\n } else {\n return child;\n }\n });\n }\n return data?.map((_, index) => (\n <RechartsCell\n fill={themeColors[index]}\n key={index}\n opacity={getCellOpacity(hoveredIndex, index)}\n />\n ));\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [children, data, colorTheme, hoveredIndex, themeColors]);\n\n return (\n <RechartsPie\n {...rest}\n cx={cx}\n cy={cy}\n outerRadius={radiusConfig.outerRadius}\n innerRadius={radiusConfig.innerRadius}\n data={data}\n startAngle={START_AND_END_ANGLES[type].startAngle}\n endAngle={START_AND_END_ANGLES[type].endAngle}\n onMouseEnter={(data, index) => {\n setHoveredIndex(index);\n }}\n onMouseLeave={() => {\n setHoveredIndex(null);\n }}\n >\n {modifiedChildren}\n </RechartsPie>\n );\n};\n\nconst ChartDonut = assignWithoutSideEffects(_ChartDonut, {\n componentId: componentId.chartDonut,\n});\n\nexport { ChartDonut, ChartDonutWrapper, ChartDonutCell };\n"],"names":["_Cell","_ref","rest","_extends","_objectDestructuringEmpty","_jsx","RechartsCell","_objectSpread","ChartDonutCell","assignWithoutSideEffects","componentId","cell","getTranslate","legendLayout","legendAlignment","legendWidth","legendHeight","concat","ChartDonutWrapper","_ref2","children","content","testID","restProps","_objectWithoutProperties","_excluded","_useTheme","useTheme","theme","_useState","useState","_useState2","_slicedToArray","setLegendHeight","_useState3","_useState4","setLegendWidth","chartRef","useRef","isValuePresentInContent","_typeof","isLabelPresentInContent","useEffect","observer","MutationObserver","mutations","forEach","mutation","type","_chartRef$current","legendWrapper","current","querySelector","height","getBoundingClientRect","width","observe","childList","subtree","disconnect","pieChartRadius","useMemo","Array","isArray","_donutChild$props","donutChild","find","child","getComponentId","chartDonut","isValidElement","props","radius","_legendChild$props","legendChild","commonChartComponentId","chartLegend","layout","_legendChild$props2","align","_jsxs","BaseBox","ref","metaAttribute","name","makeAnalyticsAttribute","position","undefined","RechartsResponsiveContainer","RechartsPieChart","Label","fill","colors","surface","text","gray","muted","fontSize","typography","fonts","size","LABEL_FONT_STYLES","label","fontFamily","family","fontWeight","weight","medium","letterSpacing","letterSpacings","dy","LABEL_DISTANCE_FROM_CENTER","withText","normal","heading","bold","withLabel","value","top","left","transform","zIndex","textAlign","_ChartDonut","_ref3","_ref3$cx","cx","_ref3$cy","cy","_ref3$radius","dataKey","nameKey","data","_ref3$colorTheme","colorTheme","_ref3$type","_excluded2","radiusConfig","RADIUS_MAPPING","themeColors","useChartsColorTheme","_useState5","_useState6","hoveredIndex","setHoveredIndex","_useTheme2","getCellOpacity","currentIndex","modifiedChildren","map","index","getIn","color","_createElement","key","opacity","_","RechartsPie","outerRadius","innerRadius","startAngle","START_AND_END_ANGLES","endAngle","on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,EAAAtJ,aAAA,CAAAA,aAAA,KACNL,IAAI,CAAA,EAAA,EAAA,EAAA;AACR4H,IAAAA,EAAE,EAAEA,EAAG;AACPE,IAAAA,EAAE,EAAEA,EAAG;IACP8B,WAAW,EAAErB,YAAY,CAACqB,WAAY;IACtCC,WAAW,EAAEtB,YAAY,CAACsB,WAAY;AACtC3B,IAAAA,IAAI,EAAEA,IAAK;AACX4B,IAAAA,UAAU,EAAEC,oBAAoB,CAACjH,IAAI,CAAC,CAACgH,UAAW;AAClDE,IAAAA,QAAQ,EAAED,oBAAoB,CAACjH,IAAI,CAAC,CAACkH,QAAS;AAC9CC,IAAAA,YAAY,EAAE,SAAdA,YAAYA,CAAG/B,IAAI,EAAEkB,KAAK,EAAK;MAC7BN,eAAe,CAACM,KAAK,CAAC,CAAA;KACtB;AACFc,IAAAA,YAAY,EAAE,SAAdA,YAAYA,GAAQ;MAClBpB,eAAe,CAAC,IAAI,CAAC,CAAA;KACrB;AAAA5H,IAAAA,QAAA,EAEDgI,gBAAAA;AAAgB,GAAA,CACN,CAAC,CAAA;AAElB,CAAC,CAAA;AAED,IAAMiB,UAAU,gBAAG5J,wBAAwB,CAACkH,WAAW,EAAE;EACvDjH,WAAW,EAAEA,WAAW,CAAC2D,UAAAA;AAC3B,CAAC;;;;"}
1
+ {"version":3,"file":"DonutChart.web.js","sources":["../../../../../../../src/components/Charts/DonutChart/DonutChart.web.tsx"],"sourcesContent":["import React, { isValidElement, useMemo, useState, useRef, useEffect } from 'react';\nimport {\n PieChart as RechartsPieChart,\n Pie as RechartsPie,\n Cell as RechartsCell,\n ResponsiveContainer as RechartsResponsiveContainer,\n Label,\n} from 'recharts';\nimport {\n useChartsColorTheme,\n getHighestColorInRange,\n sanitizeString,\n assignDataColorMapping,\n} from '../utils';\nimport { componentId as commonChartComponentId } from '../CommonChartComponents/tokens';\nimport { CommonChartComponentsContext } from '../CommonChartComponents';\nimport type { DataColorMapping } from '../CommonChartComponents/types';\nimport type {\n ChartDonutWrapperProps,\n ChartDonutCellProps,\n ChartDonutProps,\n ChartRadius,\n} from './types';\nimport {\n RADIUS_MAPPING,\n START_AND_END_ANGLES,\n componentId,\n LABEL_DISTANCE_FROM_CENTER,\n LABEL_FONT_STYLES,\n} from './tokens';\nimport { useTheme } from '~components/BladeProvider';\nimport BaseBox from '~components/Box/BaseBox';\nimport { metaAttribute } from '~utils/metaAttribute';\nimport getIn from '~utils/lodashButBetter/get';\nimport type { DataAnalyticsAttribute, TestID } from '~utils/types';\nimport { makeAnalyticsAttribute } from '~utils/makeAnalyticsAttribute';\nimport { assignWithoutSideEffects } from '~utils/assignWithoutSideEffects';\nimport { getComponentId } from '~utils/isValidAllowedChildren';\n\n// Cell component\nconst _Cell: React.FC<ChartDonutCellProps> = ({ ...rest }) => {\n return <RechartsCell {...rest} />;\n};\n\nconst ChartDonutCell = assignWithoutSideEffects(_Cell, {\n componentId: componentId.cell,\n});\n\nconst getTranslate = (\n legendLayout: 'horizontal' | 'vertical',\n legendAlignment: 'left' | 'right',\n legendWidth: number,\n legendHeight: number,\n): string => {\n if (legendLayout === 'vertical') {\n return `translate(calc(-50% + ${\n legendAlignment === 'right' ? -legendWidth / 2 : legendWidth / 2\n }px) , calc(-50%))`;\n }\n return `translate(-50%, calc(-50% - ${legendHeight / 2}px))`;\n};\n\nconst ChartDonutWrapper: React.FC<ChartDonutWrapperProps & TestID & DataAnalyticsAttribute> = ({\n children,\n content,\n testID,\n ...restProps\n}) => {\n const { theme } = useTheme();\n const colorTheme = useMemo(() => {\n if (Array.isArray(children)) {\n const donutChild = children.find((child) => getComponentId(child) === componentId.chartDonut);\n if (!donutChild || !isValidElement(donutChild)) {\n return 'categorical';\n }\n return donutChild?.props?.colorTheme || 'categorical';\n }\n return 'categorical';\n }, [children]);\n\n const themeColors = useChartsColorTheme({\n colorTheme,\n chartName: 'donut',\n });\n const [legendHeight, setLegendHeight] = useState(0);\n const [legendWidth, setLegendWidth] = useState(0);\n const chartRef = useRef<HTMLDivElement>(null);\n const isValuePresentInContent = content && typeof content === 'object' && 'value' in content;\n const isLabelPresentInContent = content && typeof content === 'object' && 'label' in content;\n\n useEffect(() => {\n const observer = new MutationObserver((mutations) => {\n mutations.forEach((mutation) => {\n if (mutation.type === 'childList') {\n const legendWrapper = chartRef.current?.querySelector('.recharts-legend-wrapper');\n if (legendWrapper) {\n const height = legendWrapper.getBoundingClientRect().height;\n const width = legendWrapper.getBoundingClientRect().width;\n setLegendHeight(height);\n setLegendWidth(width);\n }\n }\n });\n });\n\n if (chartRef.current) {\n observer.observe(chartRef.current, { childList: true, subtree: true });\n }\n\n return () => observer.disconnect();\n }, []);\n\n const pieChartRadius: ChartRadius = useMemo(() => {\n if (Array.isArray(children)) {\n const donutChild = children.find((child) => getComponentId(child) === componentId.chartDonut);\n if (!donutChild || !isValidElement(donutChild)) {\n return 'medium';\n }\n return donutChild?.props?.radius || 'medium';\n }\n return 'medium';\n }, [children]);\n\n const legendLayout = useMemo(() => {\n if (Array.isArray(children)) {\n const legendChild = children.find(\n (child) => getComponentId(child) === commonChartComponentId.chartLegend,\n );\n if (!legendChild || !isValidElement(legendChild)) {\n return 'horizontal';\n }\n return legendChild?.props?.layout || 'horizontal';\n }\n return 'horizontal';\n }, [children]);\n\n const legendAlignment = useMemo(() => {\n if (Array.isArray(children)) {\n const legendChild = children.find(\n (child) => getComponentId(child) === commonChartComponentId.chartLegend,\n );\n if (!legendChild || !isValidElement(legendChild)) {\n return 'right';\n }\n return legendChild?.props?.align || 'right';\n }\n return 'right';\n }, [children]);\n /**\n * We need to check child of ChartDonutWrapper. if they have any custom color we store that.\n * We need these mapping because colors of tooltip & legend is determine based on this\n * recharts do provide a color but it is hex code and we need blade color token .\n */\n\n const dataColorMapping = useMemo(() => {\n const dataColorMapping: DataColorMapping = {};\n if (Array.isArray(children)) {\n children.forEach((child) => {\n if (getComponentId(child) === componentId.chartDonut) {\n const data = (child as React.ReactElement<ChartDonutProps>).props.data;\n // Donut Chart can also have <Cell/> which will come under donutChildren.\n const donutChildren = (child as React.ReactElement<ChartDonutProps>).props.children;\n if (Array.isArray(donutChildren)) {\n donutChildren.forEach((child, index) => {\n if (getComponentId(child) === componentId.cell && data[index]?.name) {\n // assign colors to the dataColorMapping, if no color is assigned we assign color in `assignDataColorMapping`\n\n dataColorMapping[sanitizeString(data[index].name as string)] = {\n colorToken: child.props?.color,\n isCustomColor: Boolean(child.props?.color),\n };\n }\n });\n } else {\n // if we don't have cell as child component then we can we directly assign theme colors\n data.forEach((item, index) => {\n dataColorMapping[sanitizeString(item.name as string)] = {\n colorToken: themeColors[index],\n isCustomColor: false,\n };\n });\n }\n }\n });\n }\n assignDataColorMapping(dataColorMapping, themeColors);\n\n return dataColorMapping;\n }, [children, themeColors]);\n\n return (\n <CommonChartComponentsContext.Provider value={{ chartName: 'donut', dataColorMapping }}>\n <BaseBox\n ref={chartRef}\n {...metaAttribute({ name: 'donut-chart', testID })}\n {...makeAnalyticsAttribute(restProps)}\n width=\"100%\"\n height=\"100%\"\n {...restProps}\n position={isValidElement(content) ? 'relative' : undefined}\n >\n <RechartsResponsiveContainer width=\"100%\" height=\"100%\">\n <RechartsPieChart>\n {children}\n {isLabelPresentInContent && (\n <Label\n position=\"center\"\n fill={theme.colors.surface.text.gray.muted}\n fontSize={\n theme.typography.fonts.size[\n LABEL_FONT_STYLES[pieChartRadius].fontSize\n .label as keyof typeof theme.typography.fonts.size\n ]\n }\n fontFamily={theme.typography.fonts.family.text}\n fontWeight={theme.typography.fonts.weight.medium}\n letterSpacing={theme.typography.letterSpacings[100]}\n dy={\n isValuePresentInContent\n ? LABEL_DISTANCE_FROM_CENTER[pieChartRadius].withText\n : LABEL_DISTANCE_FROM_CENTER[pieChartRadius].normal\n }\n >\n {content?.label}\n </Label>\n )}\n {isValuePresentInContent && (\n <Label\n position=\"center\"\n fill={theme.colors.surface.text.gray.normal}\n fontSize={\n theme.typography.fonts.size[\n LABEL_FONT_STYLES[pieChartRadius].fontSize\n .text as keyof typeof theme.typography.fonts.size\n ]\n }\n fontFamily={theme.typography.fonts.family.heading}\n fontWeight={theme.typography.fonts.weight.bold}\n letterSpacing={theme.typography.letterSpacings[100]}\n dy={\n isLabelPresentInContent\n ? LABEL_DISTANCE_FROM_CENTER[pieChartRadius].withLabel\n : LABEL_DISTANCE_FROM_CENTER[pieChartRadius].normal\n }\n >\n {content?.value}\n </Label>\n )}\n </RechartsPieChart>\n </RechartsResponsiveContainer>\n\n {isValidElement(content) && (\n <BaseBox\n position=\"absolute\"\n top=\"50%\"\n left=\"50%\"\n transform={getTranslate(legendLayout, legendAlignment, legendWidth, legendHeight)}\n zIndex={10}\n textAlign=\"center\"\n >\n {content}\n </BaseBox>\n )}\n </BaseBox>\n </CommonChartComponentsContext.Provider>\n );\n};\n\nconst _ChartDonut: React.FC<ChartDonutProps> = ({\n cx = '50%',\n cy = '50%',\n radius = 'medium',\n dataKey,\n nameKey,\n children,\n data,\n colorTheme = 'categorical',\n type = 'circle',\n ...rest\n}) => {\n const radiusConfig = RADIUS_MAPPING[radius];\n const themeColors = useChartsColorTheme({\n colorTheme,\n chartName: 'donut',\n });\n const [hoveredIndex, setHoveredIndex] = useState<number | null>(null);\n const { theme } = useTheme();\n\n const getCellOpacity = (hoveredIndex: number | null, currentIndex: number): number => {\n if (hoveredIndex === null) return 1;\n if (hoveredIndex === currentIndex) return 1;\n return 0.2;\n };\n\n const modifiedChildren = useMemo(() => {\n if (Array.isArray(children)) {\n return children.map((child, index) => {\n if (getComponentId(child) === componentId.cell) {\n /* \n Why we are not using React.cloneElement ? just use ChartDonutCell no?\n cell can never be custom component in recharts. (as of v3.1.2)\n (https://github.com/recharts/recharts/issues/2788)\n https://github.com/recharts/recharts/discussions/5474\n\n So we have placeholder component ChartDonutCell. which we replaced by RechartsCell internally so dev can see hover effects\n working out of box. \n */\n const fill = getIn(theme.colors, child.props.color || themeColors[index]);\n return (\n <RechartsCell\n {...child.props}\n fill={fill}\n key={index}\n opacity={getCellOpacity(hoveredIndex, index)}\n strokeWidth={0}\n />\n );\n } else {\n return child;\n }\n });\n }\n return data?.map((_, index) => (\n <RechartsCell\n fill={getIn(theme.colors, themeColors[index])}\n key={index}\n opacity={getCellOpacity(hoveredIndex, index)}\n strokeWidth={0}\n />\n ));\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [children, data, colorTheme, hoveredIndex, themeColors]);\n\n const modifiedExternalDonutChildren = useMemo(() => {\n if (Array.isArray(children)) {\n return children.map((child, index) => {\n if (getComponentId(child) === componentId.cell) {\n /* \n Why we are not using React.cloneElement ? just use ChartDonutCell no?\n cell can never be custom component in recharts. (as of v3.1.2)\n (https://github.com/recharts/recharts/issues/2788)\n https://github.com/recharts/recharts/discussions/5474\n\n So we have placeholder component ChartDonutCell. which we replaced by RechartsCell internally so dev can see hover effects\n working out of box. \n */\n\n const fill = getIn(\n theme.colors,\n getHighestColorInRange({\n colorToken: child.props.color || themeColors[index],\n followIntensityMapping: Boolean(child.props.color),\n }),\n );\n return (\n <RechartsCell\n {...child.props}\n key={`stroke-${index}`}\n fill=\"transparent\"\n stroke={fill} // Different stroke color for each cell\n strokeWidth={0.75}\n strokeOpacity={getCellOpacity(hoveredIndex, index)}\n />\n );\n } else {\n return child;\n }\n });\n }\n return data?.map((_, index) => (\n <RechartsCell\n key={`stroke-${index}`}\n fill=\"transparent\"\n stroke={getIn(\n theme.colors,\n getHighestColorInRange({\n colorToken: themeColors[index],\n }),\n )} // Different stroke color for each cell\n strokeWidth={0.75}\n strokeOpacity={getCellOpacity(hoveredIndex, index)}\n />\n ));\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [children, data, colorTheme, hoveredIndex, themeColors]);\n\n return (\n <>\n <RechartsPie\n {...rest}\n cx={cx}\n cy={cy}\n outerRadius={radiusConfig.outerRadius}\n innerRadius={radiusConfig.innerRadius}\n data={data}\n startAngle={START_AND_END_ANGLES[type].startAngle}\n endAngle={START_AND_END_ANGLES[type].endAngle}\n onMouseEnter={(data, index) => {\n setHoveredIndex(index);\n }}\n onMouseLeave={() => {\n setHoveredIndex(null);\n }}\n paddingAngle={1.5}\n >\n {modifiedChildren}\n </RechartsPie>\n <RechartsPie\n cx={cx}\n cy={cy}\n outerRadius={radiusConfig.outerRadius}\n innerRadius={radiusConfig.outerRadius - 0.75} // 1.5px thick stroke\n data={data}\n startAngle={START_AND_END_ANGLES[type].startAngle}\n endAngle={START_AND_END_ANGLES[type].endAngle}\n fill=\"transparent\"\n legendType=\"none\"\n tooltipType=\"none\"\n paddingAngle={1.5}\n >\n {modifiedExternalDonutChildren}\n </RechartsPie>\n </>\n );\n};\n\nconst ChartDonut = assignWithoutSideEffects(_ChartDonut, {\n componentId: componentId.chartDonut,\n});\n\nexport { ChartDonut, ChartDonutWrapper, ChartDonutCell };\n"],"names":["_Cell","_ref","rest","_extends","_objectDestructuringEmpty","_jsx","RechartsCell","_objectSpread","ChartDonutCell","assignWithoutSideEffects","componentId","cell","getTranslate","legendLayout","legendAlignment","legendWidth","legendHeight","concat","ChartDonutWrapper","_ref2","children","content","testID","restProps","_objectWithoutProperties","_excluded","_useTheme","useTheme","theme","colorTheme","useMemo","Array","isArray","_donutChild$props","donutChild","find","child","getComponentId","chartDonut","isValidElement","props","themeColors","useChartsColorTheme","chartName","_useState","useState","_useState2","_slicedToArray","setLegendHeight","_useState3","_useState4","setLegendWidth","chartRef","useRef","isValuePresentInContent","_typeof","isLabelPresentInContent","useEffect","observer","MutationObserver","mutations","forEach","mutation","type","_chartRef$current","legendWrapper","current","querySelector","height","getBoundingClientRect","width","observe","childList","subtree","disconnect","pieChartRadius","_donutChild$props2","radius","_legendChild$props","legendChild","commonChartComponentId","chartLegend","layout","_legendChild$props2","align","dataColorMapping","data","donutChildren","index","_data$index","name","_child$props","_child$props2","sanitizeString","colorToken","color","isCustomColor","Boolean","item","assignDataColorMapping","CommonChartComponentsContext","Provider","value","_jsxs","BaseBox","ref","metaAttribute","makeAnalyticsAttribute","position","undefined","RechartsResponsiveContainer","RechartsPieChart","Label","fill","colors","surface","text","gray","muted","fontSize","typography","fonts","size","LABEL_FONT_STYLES","label","fontFamily","family","fontWeight","weight","medium","letterSpacing","letterSpacings","dy","LABEL_DISTANCE_FROM_CENTER","withText","normal","heading","bold","withLabel","top","left","transform","zIndex","textAlign","_ChartDonut","_ref3","_ref3$cx","cx","_ref3$cy","cy","_ref3$radius","dataKey","nameKey","_ref3$colorTheme","_ref3$type","_excluded2","radiusConfig","RADIUS_MAPPING","_useState5","_useState6","hoveredIndex","setHoveredIndex","_useTheme2","getCellOpacity","currentIndex","modifiedChildren","map","getIn","_createElement","key","opacity","strokeWidth","_","modifiedExternalDonutChildren","getHighestColorInRange","followIntensityMapping","stroke","strokeOpacity","_Fragment","RechartsPie","outerRadius","innerRadius","startAngle","START_AND_END_ANGLES","endAngle","onMouseEnter","onMouseLeave","paddingAngle","legendType","tooltipType","ChartDonut"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAwCA,IAAMA,KAAoC,GAAG,SAAvCA,KAAoCA,CAAAC,IAAA,EAAoB;EAAA,IAAXC,IAAI,GAAAC,QAAA,CAAA,EAAA,GAAAC,yBAAA,CAAAH,IAAA,GAAAA,IAAA,EAAA,CAAA;EACrD,oBAAOI,GAAA,CAACC,IAAY,EAAAC,aAAA,CAAKL,EAAAA,EAAAA,IAAI,CAAG,CAAC,CAAA;AACnC,CAAC,CAAA;AAED,IAAMM,cAAc,gBAAGC,wBAAwB,CAACT,KAAK,EAAE;EACrDU,WAAW,EAAEA,WAAW,CAACC,IAAAA;AAC3B,CAAC,EAAC;AAEF,IAAMC,YAAY,GAAG,SAAfA,YAAYA,CAChBC,YAAuC,EACvCC,eAAiC,EACjCC,WAAmB,EACnBC,YAAoB,EACT;EACX,IAAIH,YAAY,KAAK,UAAU,EAAE;AAC/B,IAAA,OAAA,wBAAA,CAAAI,MAAA,CACEH,eAAe,KAAK,OAAO,GAAG,CAACC,WAAW,GAAG,CAAC,GAAGA,WAAW,GAAG,CAAC,EAA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