@salesmind-ai/design-system 0.2.1 → 0.3.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 (121) hide show
  1. package/dist/AppearancePanel-UT57J69V.d.cts +51 -0
  2. package/dist/AppearancePanel-UT57J69V.d.ts +51 -0
  3. package/dist/AppearanceProvider-C36a8-eb.d.cts +45 -0
  4. package/dist/AppearanceProvider-C36a8-eb.d.ts +45 -0
  5. package/dist/Breadcrumb-RX-B_gDV.d.cts +44 -0
  6. package/dist/Breadcrumb-RX-B_gDV.d.ts +44 -0
  7. package/dist/ExportMenu-A2TLFiVv.d.cts +311 -0
  8. package/dist/ExportMenu-C8qck5AT.d.ts +311 -0
  9. package/dist/SectionShell-BfBw5q0Y.d.cts +18 -0
  10. package/dist/SectionShell-BfBw5q0Y.d.ts +18 -0
  11. package/dist/Select-BdZmK0Lt.d.cts +66 -0
  12. package/dist/Select-BdZmK0Lt.d.ts +66 -0
  13. package/dist/admin/index.cjs +2941 -0
  14. package/dist/admin/index.cjs.map +1 -0
  15. package/dist/admin/index.css +4145 -0
  16. package/dist/admin/index.css.map +1 -0
  17. package/dist/admin/index.d.cts +491 -0
  18. package/dist/admin/index.d.ts +491 -0
  19. package/dist/admin/index.js +2918 -0
  20. package/dist/admin/index.js.map +1 -0
  21. package/dist/{audit-CiyPkxk1.d.cts → audit-BS2fn7M4.d.ts} +2 -51
  22. package/dist/{audit-CiyPkxk1.d.ts → audit-DwCmg32J.d.cts} +2 -51
  23. package/dist/blog/index.cjs +1074 -0
  24. package/dist/blog/index.cjs.map +1 -0
  25. package/dist/blog/index.css +1422 -0
  26. package/dist/blog/index.css.map +1 -0
  27. package/dist/blog/index.d.cts +233 -0
  28. package/dist/blog/index.d.ts +233 -0
  29. package/dist/blog/index.js +1056 -0
  30. package/dist/blog/index.js.map +1 -0
  31. package/dist/chart-types-BGVVO-zl.d.cts +208 -0
  32. package/dist/chart-types-BGVVO-zl.d.ts +208 -0
  33. package/dist/charts/index.cjs +2698 -0
  34. package/dist/charts/index.cjs.map +1 -0
  35. package/dist/charts/index.css +1167 -0
  36. package/dist/charts/index.css.map +1 -0
  37. package/dist/charts/index.d.cts +453 -0
  38. package/dist/charts/index.d.ts +453 -0
  39. package/dist/charts/index.js +2682 -0
  40. package/dist/charts/index.js.map +1 -0
  41. package/dist/core/index.cjs +526 -395
  42. package/dist/core/index.cjs.map +1 -1
  43. package/dist/core/index.css +294 -0
  44. package/dist/core/index.css.map +1 -1
  45. package/dist/core/index.d.cts +7 -982
  46. package/dist/core/index.d.ts +7 -982
  47. package/dist/core/index.js +476 -351
  48. package/dist/core/index.js.map +1 -1
  49. package/dist/i18n/index.cjs +585 -0
  50. package/dist/i18n/index.cjs.map +1 -0
  51. package/dist/i18n/index.d.cts +855 -0
  52. package/dist/i18n/index.d.ts +855 -0
  53. package/dist/i18n/index.js +547 -0
  54. package/dist/i18n/index.js.map +1 -0
  55. package/dist/index.d.cts +22 -1290
  56. package/dist/index.d.ts +22 -1290
  57. package/dist/marketing/index.cjs +2144 -3023
  58. package/dist/marketing/index.cjs.map +1 -1
  59. package/dist/marketing/index.css +3729 -4824
  60. package/dist/marketing/index.css.map +1 -1
  61. package/dist/marketing/index.d.cts +1351 -4
  62. package/dist/marketing/index.d.ts +1351 -4
  63. package/dist/marketing/index.js +2190 -3054
  64. package/dist/marketing/index.js.map +1 -1
  65. package/dist/motion/index.cjs +1230 -0
  66. package/dist/motion/index.cjs.map +1 -0
  67. package/dist/motion/index.css +699 -0
  68. package/dist/motion/index.css.map +1 -0
  69. package/dist/motion/index.d.cts +68 -0
  70. package/dist/motion/index.d.ts +68 -0
  71. package/dist/motion/index.js +1218 -0
  72. package/dist/motion/index.js.map +1 -0
  73. package/dist/nav/index.cjs +1533 -0
  74. package/dist/nav/index.cjs.map +1 -0
  75. package/dist/nav/index.css +1984 -0
  76. package/dist/nav/index.css.map +1 -0
  77. package/dist/nav/index.d.cts +279 -0
  78. package/dist/nav/index.d.ts +279 -0
  79. package/dist/nav/index.js +1501 -0
  80. package/dist/nav/index.js.map +1 -0
  81. package/dist/report/index.cjs +26 -1649
  82. package/dist/report/index.cjs.map +1 -1
  83. package/dist/report/index.css +0 -963
  84. package/dist/report/index.css.map +1 -1
  85. package/dist/report/index.d.cts +4 -2
  86. package/dist/report/index.d.ts +4 -2
  87. package/dist/report/index.js +27 -1640
  88. package/dist/report/index.js.map +1 -1
  89. package/dist/sections/index.cjs +385 -0
  90. package/dist/sections/index.cjs.map +1 -0
  91. package/dist/sections/index.css +818 -0
  92. package/dist/sections/index.css.map +1 -0
  93. package/dist/sections/index.d.cts +69 -0
  94. package/dist/sections/index.d.ts +69 -0
  95. package/dist/sections/index.js +374 -0
  96. package/dist/sections/index.js.map +1 -0
  97. package/dist/social-proof/index.cjs +1254 -0
  98. package/dist/social-proof/index.cjs.map +1 -0
  99. package/dist/social-proof/index.css +1416 -0
  100. package/dist/social-proof/index.css.map +1 -0
  101. package/dist/social-proof/index.d.cts +258 -0
  102. package/dist/social-proof/index.d.ts +258 -0
  103. package/dist/social-proof/index.js +1237 -0
  104. package/dist/social-proof/index.js.map +1 -0
  105. package/dist/theme/index.cjs +573 -0
  106. package/dist/theme/index.cjs.map +1 -0
  107. package/dist/theme/index.css +464 -0
  108. package/dist/theme/index.css.map +1 -0
  109. package/dist/theme/index.d.cts +48 -0
  110. package/dist/theme/index.d.ts +48 -0
  111. package/dist/theme/index.js +558 -0
  112. package/dist/theme/index.js.map +1 -0
  113. package/dist/types-DAlgDGzw.d.cts +52 -0
  114. package/dist/types-DAlgDGzw.d.ts +52 -0
  115. package/dist/web/index.d.cts +3 -2
  116. package/dist/web/index.d.ts +3 -2
  117. package/package.json +68 -9
  118. package/dist/ExportMenu-hEe5MhLq.d.cts +0 -1027
  119. package/dist/ExportMenu-hEe5MhLq.d.ts +0 -1027
  120. package/dist/index-B64suAAc.d.cts +0 -1498
  121. package/dist/index-B64suAAc.d.ts +0 -1498
@@ -2,16 +2,14 @@
2
2
 
3
3
  var React2 = require('react');
4
4
  var jsxRuntime = require('react/jsx-runtime');
5
- var clsx20 = require('clsx');
6
- var recharts = require('recharts');
7
- var tooltip = require('@base-ui/react/tooltip');
5
+ var clsx12 = require('clsx');
8
6
  var select = require('@base-ui/react/select');
9
7
  var menu = require('@base-ui/react/menu');
10
8
 
11
9
  function _interopDefault (e) { return e && e.__esModule ? e : { default: e }; }
12
10
 
13
11
  var React2__default = /*#__PURE__*/_interopDefault(React2);
14
- var clsx20__default = /*#__PURE__*/_interopDefault(clsx20);
12
+ var clsx12__default = /*#__PURE__*/_interopDefault(clsx12);
15
13
 
16
14
  // src/report-engine/constants.ts
17
15
  var EXECUTIVE_MODE = {
@@ -1165,7 +1163,7 @@ var ReportShell = React2__default.default.forwardRef(
1165
1163
  "div",
1166
1164
  {
1167
1165
  ref,
1168
- className: clsx20__default.default("ds-report-shell", className),
1166
+ className: clsx12__default.default("ds-report-shell", className),
1169
1167
  "data-mode": mode,
1170
1168
  "data-brand": brand,
1171
1169
  ...props,
@@ -1191,7 +1189,7 @@ var ExecutiveThesis = React2__default.default.forwardRef(
1191
1189
  "section",
1192
1190
  {
1193
1191
  ref,
1194
- className: clsx20__default.default("ds-executive-thesis", className),
1192
+ className: clsx12__default.default("ds-executive-thesis", className),
1195
1193
  "aria-labelledby": "executive-thesis-title",
1196
1194
  ...props,
1197
1195
  children: [
@@ -1208,7 +1206,7 @@ var ExecutiveThesis = React2__default.default.forwardRef(
1208
1206
  /* @__PURE__ */ jsxRuntime.jsxs(
1209
1207
  "span",
1210
1208
  {
1211
- className: clsx20__default.default(
1209
+ className: clsx12__default.default(
1212
1210
  "ds-executive-thesis__metric-value",
1213
1211
  metric.trend && `ds-executive-thesis__metric-value--${metric.trend}`
1214
1212
  ),
@@ -1241,7 +1239,7 @@ var InsightBlock = React2__default.default.forwardRef(
1241
1239
  "section",
1242
1240
  {
1243
1241
  ref,
1244
- className: clsx20__default.default("ds-insight-block", getConfidenceClass(), className),
1242
+ className: clsx12__default.default("ds-insight-block", getConfidenceClass(), className),
1245
1243
  "data-insight-type": type,
1246
1244
  "aria-labelledby": `insight-${type}-title`,
1247
1245
  ...props,
@@ -1287,7 +1285,7 @@ var EvidenceGroup = React2__default.default.forwardRef(
1287
1285
  "div",
1288
1286
  {
1289
1287
  ref,
1290
- className: clsx20__default.default(
1288
+ className: clsx12__default.default(
1291
1289
  "ds-evidence-group",
1292
1290
  `ds-evidence-group--${layout}`,
1293
1291
  layout === "grid" && `ds-evidence-group--cols-${columns}`,
@@ -1313,7 +1311,7 @@ var ConfidenceIndicator = React2__default.default.forwardRef(
1313
1311
  "div",
1314
1312
  {
1315
1313
  ref,
1316
- className: clsx20__default.default(
1314
+ className: clsx12__default.default(
1317
1315
  "ds-confidence-indicator",
1318
1316
  `ds-confidence-indicator--${size}`,
1319
1317
  `ds-confidence-indicator--${threshold.level}`,
@@ -1348,7 +1346,7 @@ var DataCoverageBadge = React2__default.default.forwardRef(
1348
1346
  "div",
1349
1347
  {
1350
1348
  ref,
1351
- className: clsx20__default.default(
1349
+ className: clsx12__default.default(
1352
1350
  "ds-data-coverage-badge",
1353
1351
  `ds-data-coverage-badge--${size}`,
1354
1352
  !isSufficient && "ds-data-coverage-badge--insufficient",
@@ -1535,7 +1533,7 @@ var DataStateIndicator = React2__default.default.forwardRef(
1535
1533
  "div",
1536
1534
  {
1537
1535
  ref,
1538
- className: clsx20__default.default(
1536
+ className: clsx12__default.default(
1539
1537
  "ds-data-state-indicator",
1540
1538
  `ds-data-state-indicator--${variant}`,
1541
1539
  `ds-data-state-indicator--${state.toLowerCase().replace(/_/g, "-")}`,
@@ -1591,7 +1589,7 @@ var MethodologyNote = React2__default.default.forwardRef(
1591
1589
  "aside",
1592
1590
  {
1593
1591
  ref,
1594
- className: clsx20__default.default("ds-methodology-note", className),
1592
+ className: clsx12__default.default("ds-methodology-note", className),
1595
1593
  "aria-label": titleText,
1596
1594
  ...props,
1597
1595
  children: [
@@ -1712,7 +1710,7 @@ var CaveatBlock = React2__default.default.forwardRef(
1712
1710
  "aside",
1713
1711
  {
1714
1712
  ref,
1715
- className: clsx20__default.default("ds-caveat-block", `ds-caveat-block--${severity}`, className),
1713
+ className: clsx12__default.default("ds-caveat-block", `ds-caveat-block--${severity}`, className),
1716
1714
  role: "note",
1717
1715
  "aria-label": title,
1718
1716
  ...props,
@@ -1775,7 +1773,7 @@ var KeyMetric = React2__default.default.forwardRef(
1775
1773
  Component,
1776
1774
  {
1777
1775
  ref,
1778
- className: clsx20__default.default(
1776
+ className: clsx12__default.default(
1779
1777
  "ds-key-metric",
1780
1778
  `ds-key-metric--${size}`,
1781
1779
  loading && "ds-key-metric--loading",
@@ -1803,7 +1801,7 @@ var KeyMetric = React2__default.default.forwardRef(
1803
1801
  trend && /* @__PURE__ */ jsxRuntime.jsxs(
1804
1802
  "span",
1805
1803
  {
1806
- className: clsx20__default.default("ds-key-metric__trend", `ds-key-metric__trend--${trend.direction}`),
1804
+ className: clsx12__default.default("ds-key-metric__trend", `ds-key-metric__trend--${trend.direction}`),
1807
1805
  children: [
1808
1806
  /* @__PURE__ */ jsxRuntime.jsx("span", { className: "ds-key-metric__trend-icon", children: getTrendIcon(trend.direction) }),
1809
1807
  /* @__PURE__ */ jsxRuntime.jsxs("span", { className: "ds-key-metric__trend-value", children: [
@@ -1893,7 +1891,7 @@ var TrendIndicator = React2__default.default.forwardRef(
1893
1891
  "span",
1894
1892
  {
1895
1893
  ref,
1896
- className: clsx20__default.default(
1894
+ className: clsx12__default.default(
1897
1895
  "ds-trend-indicator",
1898
1896
  `ds-trend-indicator--${size}`,
1899
1897
  `ds-trend-indicator--${direction}`,
@@ -1916,1617 +1914,6 @@ var TrendIndicator = React2__default.default.forwardRef(
1916
1914
  }
1917
1915
  );
1918
1916
  TrendIndicator.displayName = "TrendIndicator";
1919
- function ChartContainer({
1920
- title,
1921
- subtitle,
1922
- height = 300,
1923
- data = [],
1924
- requiredFields = [],
1925
- minSampleSize = 30,
1926
- showCoverage = true,
1927
- dateRange,
1928
- loading,
1929
- emptyMessage = "No data available",
1930
- children,
1931
- className,
1932
- ...props
1933
- }) {
1934
- const { features } = useReportMode();
1935
- const { state, isRenderable, message } = useChartData({
1936
- data,
1937
- requiredFields,
1938
- minSampleSize
1939
- });
1940
- const renderContent = () => {
1941
- if (loading) {
1942
- return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "ds-chart-container__loading", children: [
1943
- /* @__PURE__ */ jsxRuntime.jsx("div", { className: "ds-chart-container__spinner" }),
1944
- /* @__PURE__ */ jsxRuntime.jsx("span", { children: "Loading chart..." })
1945
- ] });
1946
- }
1947
- if (!isRenderable && state !== "VALID") {
1948
- return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "ds-chart-container__empty", children: [
1949
- /* @__PURE__ */ jsxRuntime.jsx(
1950
- DataStateIndicator,
1951
- {
1952
- state,
1953
- variant: "full",
1954
- details: { message, sampleSize: data.length, requiredSize: minSampleSize }
1955
- }
1956
- ),
1957
- state === "INSUFFICIENT_SAMPLE" && data.length === 0 && /* @__PURE__ */ jsxRuntime.jsx("p", { className: "ds-chart-container__empty-message", children: emptyMessage })
1958
- ] });
1959
- }
1960
- return /* @__PURE__ */ jsxRuntime.jsx(recharts.ResponsiveContainer, { width: "100%", height, children });
1961
- };
1962
- return /* @__PURE__ */ jsxRuntime.jsxs(
1963
- "div",
1964
- {
1965
- className: clsx20__default.default(
1966
- "ds-chart-container",
1967
- loading && "ds-chart-container--loading",
1968
- !isRenderable && "ds-chart-container--invalid",
1969
- className
1970
- ),
1971
- ...props,
1972
- children: [
1973
- (title || subtitle || showCoverage && features.showMethodology) && /* @__PURE__ */ jsxRuntime.jsxs("header", { className: "ds-chart-container__header", children: [
1974
- /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "ds-chart-container__header-content", children: [
1975
- title && /* @__PURE__ */ jsxRuntime.jsx("h4", { className: "ds-chart-container__title", children: title }),
1976
- subtitle && /* @__PURE__ */ jsxRuntime.jsx("p", { className: "ds-chart-container__subtitle", children: subtitle })
1977
- ] }),
1978
- showCoverage && features.showMethodology && data.length > 0 && /* @__PURE__ */ jsxRuntime.jsx(
1979
- DataCoverageBadge,
1980
- {
1981
- sampleSize: data.length,
1982
- requiredSize: minSampleSize,
1983
- dateRange,
1984
- size: "sm"
1985
- }
1986
- )
1987
- ] }),
1988
- /* @__PURE__ */ jsxRuntime.jsx(
1989
- "div",
1990
- {
1991
- className: "ds-chart-container__chart",
1992
- style: { height: typeof height === "number" ? height : void 0 },
1993
- children: renderContent()
1994
- }
1995
- ),
1996
- isRenderable && state !== "VALID" && /* @__PURE__ */ jsxRuntime.jsx("footer", { className: "ds-chart-container__footer", children: /* @__PURE__ */ jsxRuntime.jsx(DataStateIndicator, { state, variant: "compact" }) })
1997
- ]
1998
- }
1999
- );
2000
- }
2001
- ChartContainer.displayName = "ChartContainer";
2002
- var DEFAULT_COLORS = [
2003
- "var(--brand-pink)",
2004
- "var(--brand-yellow)",
2005
- "var(--status-info)",
2006
- "var(--status-success)",
2007
- "var(--status-warning)"
2008
- ];
2009
- function LineChart({
2010
- data,
2011
- xKey,
2012
- lines,
2013
- title,
2014
- subtitle,
2015
- height = 300,
2016
- grid = true,
2017
- legend: showLegend = true,
2018
- curve = "monotone",
2019
- minSampleSize = 7,
2020
- dateRange,
2021
- className
2022
- }) {
2023
- const requiredFields = [xKey, ...lines.map((l) => l.key)];
2024
- const chartData = React2__default.default.useMemo(() => data.map((item) => ({ ...item })), [data]);
2025
- return /* @__PURE__ */ jsxRuntime.jsx(
2026
- ChartContainer,
2027
- {
2028
- title,
2029
- subtitle,
2030
- height,
2031
- data,
2032
- requiredFields,
2033
- minSampleSize,
2034
- dateRange,
2035
- className,
2036
- children: /* @__PURE__ */ jsxRuntime.jsxs(recharts.LineChart, { data: chartData, margin: { top: 5, right: 20, left: 0, bottom: 5 }, children: [
2037
- grid && /* @__PURE__ */ jsxRuntime.jsx(recharts.CartesianGrid, { strokeDasharray: "3 3", vertical: false }),
2038
- /* @__PURE__ */ jsxRuntime.jsx(
2039
- recharts.XAxis,
2040
- {
2041
- dataKey: xKey,
2042
- tick: { fontSize: 12 },
2043
- tickLine: false,
2044
- axisLine: { strokeWidth: 1 }
2045
- }
2046
- ),
2047
- /* @__PURE__ */ jsxRuntime.jsx(recharts.YAxis, { tick: { fontSize: 12 }, tickLine: false, axisLine: false, width: 40 }),
2048
- /* @__PURE__ */ jsxRuntime.jsx(recharts.Tooltip, {}),
2049
- showLegend && /* @__PURE__ */ jsxRuntime.jsx(recharts.Legend, {}),
2050
- lines.map((line, index) => /* @__PURE__ */ jsxRuntime.jsx(
2051
- recharts.Line,
2052
- {
2053
- type: curve,
2054
- dataKey: line.key,
2055
- name: line.name || line.key,
2056
- stroke: line.color || DEFAULT_COLORS[index % DEFAULT_COLORS.length],
2057
- strokeWidth: 2,
2058
- strokeDasharray: line.dashed ? "5 5" : void 0,
2059
- dot: line.dot !== false,
2060
- activeDot: { r: 6 }
2061
- },
2062
- line.key
2063
- ))
2064
- ] })
2065
- }
2066
- );
2067
- }
2068
- LineChart.displayName = "LineChart";
2069
- var DEFAULT_COLORS2 = [
2070
- "var(--brand-pink)",
2071
- "var(--brand-yellow)",
2072
- "var(--status-info)",
2073
- "var(--status-success)",
2074
- "var(--status-warning)"
2075
- ];
2076
- function BarChart({
2077
- data,
2078
- xKey,
2079
- bars,
2080
- title,
2081
- subtitle,
2082
- height = 300,
2083
- layout = "horizontal",
2084
- grid = true,
2085
- legend: showLegend = true,
2086
- radius = 4,
2087
- showLabels = false,
2088
- minSampleSize = 5,
2089
- categoryColors,
2090
- className
2091
- }) {
2092
- const requiredFields = [xKey, ...bars.map((b) => b.key)];
2093
- const isVertical = layout === "vertical";
2094
- const chartData = React2.useMemo(() => data.map((item) => ({ ...item })), [data]);
2095
- return /* @__PURE__ */ jsxRuntime.jsx(
2096
- ChartContainer,
2097
- {
2098
- title,
2099
- subtitle,
2100
- height,
2101
- data: chartData,
2102
- requiredFields,
2103
- minSampleSize,
2104
- className,
2105
- children: /* @__PURE__ */ jsxRuntime.jsxs(
2106
- recharts.BarChart,
2107
- {
2108
- data: chartData,
2109
- layout: isVertical ? "vertical" : "horizontal",
2110
- margin: { top: 5, right: 20, left: isVertical ? 80 : 0, bottom: 5 },
2111
- children: [
2112
- grid && /* @__PURE__ */ jsxRuntime.jsx(recharts.CartesianGrid, { strokeDasharray: "3 3", horizontal: !isVertical, vertical: isVertical }),
2113
- isVertical ? /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
2114
- /* @__PURE__ */ jsxRuntime.jsx(recharts.XAxis, { type: "number", tick: { fontSize: 12 }, tickLine: false, axisLine: false }),
2115
- /* @__PURE__ */ jsxRuntime.jsx(
2116
- recharts.YAxis,
2117
- {
2118
- type: "category",
2119
- dataKey: xKey,
2120
- tick: { fontSize: 12 },
2121
- tickLine: false,
2122
- axisLine: false,
2123
- width: 80
2124
- }
2125
- )
2126
- ] }) : /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
2127
- /* @__PURE__ */ jsxRuntime.jsx(
2128
- recharts.XAxis,
2129
- {
2130
- dataKey: xKey,
2131
- tick: { fontSize: 12 },
2132
- tickLine: false,
2133
- axisLine: { strokeWidth: 1 }
2134
- }
2135
- ),
2136
- /* @__PURE__ */ jsxRuntime.jsx(recharts.YAxis, { tick: { fontSize: 12 }, tickLine: false, axisLine: false, width: 40 })
2137
- ] }),
2138
- /* @__PURE__ */ jsxRuntime.jsx(recharts.Tooltip, {}),
2139
- showLegend && bars.length > 1 && /* @__PURE__ */ jsxRuntime.jsx(recharts.Legend, {}),
2140
- bars.map((bar, barIndex) => /* @__PURE__ */ jsxRuntime.jsx(
2141
- recharts.Bar,
2142
- {
2143
- dataKey: bar.key,
2144
- name: bar.name || bar.key,
2145
- fill: bar.color || DEFAULT_COLORS2[barIndex % DEFAULT_COLORS2.length],
2146
- stackId: bar.stackId,
2147
- radius: [radius, radius, 0, 0],
2148
- label: showLabels ? { position: "top", fontSize: 10 } : false,
2149
- children: categoryColors && chartData.map((_, index) => /* @__PURE__ */ jsxRuntime.jsx(recharts.Cell, { fill: categoryColors[index % categoryColors.length] }, `cell-${index}`))
2150
- },
2151
- bar.key
2152
- ))
2153
- ]
2154
- }
2155
- )
2156
- }
2157
- );
2158
- }
2159
- BarChart.displayName = "BarChart";
2160
- var DEFAULT_COLORS3 = [
2161
- "var(--brand-pink)",
2162
- "var(--brand-yellow)",
2163
- "var(--status-info)",
2164
- "var(--status-success)",
2165
- "var(--status-warning)",
2166
- "var(--status-error)",
2167
- "#8884d8",
2168
- "#82ca9d"
2169
- ];
2170
- function PieChart({
2171
- data,
2172
- title,
2173
- subtitle,
2174
- height = 300,
2175
- innerRadius = 0,
2176
- outerRadius = 80,
2177
- showLabels = true,
2178
- labelType = "percent",
2179
- legend: showLegend = true,
2180
- minSampleSize = 30,
2181
- className
2182
- }) {
2183
- const safeData = React2.useMemo(() => data.map((item) => ({ ...item })), [data]);
2184
- const renderLabel = (props) => {
2185
- const { name, value, percent } = props;
2186
- switch (labelType) {
2187
- case "percent":
2188
- return `${((percent ?? 0) * 100).toFixed(0)}%`;
2189
- case "value":
2190
- return (value ?? 0).toLocaleString();
2191
- case "name":
2192
- return name ?? "";
2193
- default:
2194
- return "";
2195
- }
2196
- };
2197
- return /* @__PURE__ */ jsxRuntime.jsx(
2198
- ChartContainer,
2199
- {
2200
- title,
2201
- subtitle,
2202
- height,
2203
- data: safeData,
2204
- requiredFields: ["name", "value"],
2205
- minSampleSize,
2206
- className,
2207
- children: /* @__PURE__ */ jsxRuntime.jsxs(recharts.PieChart, { children: [
2208
- /* @__PURE__ */ jsxRuntime.jsx(
2209
- recharts.Pie,
2210
- {
2211
- data: safeData,
2212
- cx: "50%",
2213
- cy: "50%",
2214
- innerRadius,
2215
- outerRadius,
2216
- paddingAngle: 2,
2217
- dataKey: "value",
2218
- label: showLabels ? renderLabel : void 0,
2219
- labelLine: showLabels,
2220
- children: safeData.map((entry, index) => /* @__PURE__ */ jsxRuntime.jsx(
2221
- recharts.Cell,
2222
- {
2223
- fill: entry.color || DEFAULT_COLORS3[index % DEFAULT_COLORS3.length]
2224
- },
2225
- `cell-${index}`
2226
- ))
2227
- }
2228
- ),
2229
- /* @__PURE__ */ jsxRuntime.jsx(recharts.Tooltip, {}),
2230
- showLegend && /* @__PURE__ */ jsxRuntime.jsx(recharts.Legend, {})
2231
- ] })
2232
- }
2233
- );
2234
- }
2235
- PieChart.displayName = "PieChart";
2236
- var DEFAULT_COLORS4 = [
2237
- "var(--brand-pink)",
2238
- "var(--brand-yellow)",
2239
- "var(--status-info)",
2240
- "var(--status-success)",
2241
- "var(--status-warning)"
2242
- ];
2243
- function FunnelChart({
2244
- stages,
2245
- title,
2246
- subtitle,
2247
- showConversionRates = true,
2248
- showDropOff = true,
2249
- showValues = true,
2250
- height = 300,
2251
- className
2252
- }) {
2253
- const { features } = useReportMode();
2254
- const isValid = stages.length >= 3;
2255
- const maxValue = stages.length > 0 ? Math.max(...stages.map((s) => s.value)) : 0;
2256
- const stagesWithMetrics = React2.useMemo(() => {
2257
- return stages.map((stage, index) => {
2258
- const prevStage = index > 0 ? stages[index - 1] : null;
2259
- const conversionRate = prevStage ? stage.value / prevStage.value * 100 : 100;
2260
- const dropOff = prevStage ? (prevStage.value - stage.value) / prevStage.value * 100 : 0;
2261
- const widthPercent = maxValue > 0 ? stage.value / maxValue * 100 : 0;
2262
- return {
2263
- ...stage,
2264
- conversionRate,
2265
- dropOff,
2266
- widthPercent,
2267
- color: stage.color || DEFAULT_COLORS4[index % DEFAULT_COLORS4.length]
2268
- };
2269
- });
2270
- }, [stages, maxValue]);
2271
- if (!isValid) {
2272
- return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: clsx20__default.default("ds-funnel-chart", "ds-funnel-chart--invalid", className), children: [
2273
- title && /* @__PURE__ */ jsxRuntime.jsx("h4", { className: "ds-funnel-chart__title", children: title }),
2274
- /* @__PURE__ */ jsxRuntime.jsx("div", { className: "ds-funnel-chart__empty", children: /* @__PURE__ */ jsxRuntime.jsx(
2275
- DataStateIndicator,
2276
- {
2277
- state: "INSUFFICIENT_SAMPLE",
2278
- variant: "full",
2279
- details: {
2280
- message: "Funnel requires at least 3 stages",
2281
- sampleSize: stages.length,
2282
- requiredSize: 3
2283
- }
2284
- }
2285
- ) })
2286
- ] });
2287
- }
2288
- const totalConversion = stages.length > 1 ? (stages[stages.length - 1].value / stages[0].value * 100).toFixed(1) : "100";
2289
- return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: clsx20__default.default("ds-funnel-chart", className), style: { minHeight: height }, children: [
2290
- (title || subtitle) && /* @__PURE__ */ jsxRuntime.jsxs("header", { className: "ds-funnel-chart__header", children: [
2291
- /* @__PURE__ */ jsxRuntime.jsxs("div", { children: [
2292
- title && /* @__PURE__ */ jsxRuntime.jsx("h4", { className: "ds-funnel-chart__title", children: title }),
2293
- subtitle && /* @__PURE__ */ jsxRuntime.jsx("p", { className: "ds-funnel-chart__subtitle", children: subtitle })
2294
- ] }),
2295
- features.showMethodology && /* @__PURE__ */ jsxRuntime.jsx(DataCoverageBadge, { sampleSize: stages[0].value, size: "sm" })
2296
- ] }),
2297
- /* @__PURE__ */ jsxRuntime.jsx("div", { className: "ds-funnel-chart__stages", children: stagesWithMetrics.map((stage, index) => /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "ds-funnel-chart__stage", children: [
2298
- /* @__PURE__ */ jsxRuntime.jsx("div", { className: "ds-funnel-chart__bar-container", children: /* @__PURE__ */ jsxRuntime.jsx(
2299
- "div",
2300
- {
2301
- className: "ds-funnel-chart__bar",
2302
- style: {
2303
- width: `${stage.widthPercent}%`,
2304
- backgroundColor: stage.color
2305
- },
2306
- children: showValues && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "ds-funnel-chart__value", children: stage.value.toLocaleString() })
2307
- }
2308
- ) }),
2309
- /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "ds-funnel-chart__label", children: [
2310
- /* @__PURE__ */ jsxRuntime.jsx("span", { className: "ds-funnel-chart__stage-name", children: stage.name }),
2311
- showConversionRates && index > 0 && /* @__PURE__ */ jsxRuntime.jsxs("span", { className: "ds-funnel-chart__conversion", children: [
2312
- stage.conversionRate.toFixed(1),
2313
- "% converted"
2314
- ] })
2315
- ] }),
2316
- showDropOff && index > 0 && stage.dropOff > 0 && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "ds-funnel-chart__dropoff", children: [
2317
- /* @__PURE__ */ jsxRuntime.jsx("span", { className: "ds-funnel-chart__dropoff-arrow", children: "\u2193" }),
2318
- /* @__PURE__ */ jsxRuntime.jsxs("span", { className: "ds-funnel-chart__dropoff-value", children: [
2319
- "-",
2320
- stage.dropOff.toFixed(1),
2321
- "%"
2322
- ] })
2323
- ] })
2324
- ] }, stage.name)) }),
2325
- /* @__PURE__ */ jsxRuntime.jsx("footer", { className: "ds-funnel-chart__footer", children: /* @__PURE__ */ jsxRuntime.jsxs("span", { className: "ds-funnel-chart__total", children: [
2326
- "Overall Conversion: ",
2327
- /* @__PURE__ */ jsxRuntime.jsxs("strong", { children: [
2328
- totalConversion,
2329
- "%"
2330
- ] })
2331
- ] }) })
2332
- ] });
2333
- }
2334
- FunnelChart.displayName = "FunnelChart";
2335
- tooltip.Tooltip.Provider;
2336
- tooltip.Tooltip.Root;
2337
- tooltip.Tooltip.Trigger;
2338
- var TooltipContent = React2__default.default.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(tooltip.Tooltip.Portal, { children: /* @__PURE__ */ jsxRuntime.jsx(tooltip.Tooltip.Positioner, { sideOffset: 5, children: /* @__PURE__ */ jsxRuntime.jsxs(tooltip.Tooltip.Popup, { ref, className: clsx20__default.default("ds-tooltip__content", className), ...props, children: [
2339
- children,
2340
- /* @__PURE__ */ jsxRuntime.jsx(tooltip.Tooltip.Arrow, { className: "ds-tooltip__arrow" })
2341
- ] }) }) }));
2342
- TooltipContent.displayName = "TooltipContent";
2343
- var Tooltip4 = ({ content, children, delay = 200 }) => {
2344
- return /* @__PURE__ */ jsxRuntime.jsx(tooltip.Tooltip.Provider, { delay, children: /* @__PURE__ */ jsxRuntime.jsxs(tooltip.Tooltip.Root, { children: [
2345
- /* @__PURE__ */ jsxRuntime.jsx(tooltip.Tooltip.Trigger, { render: children }),
2346
- /* @__PURE__ */ jsxRuntime.jsx(TooltipContent, { children: content })
2347
- ] }) });
2348
- };
2349
- function HeatmapChart({
2350
- data,
2351
- title,
2352
- subtitle,
2353
- xLabel,
2354
- yLabel,
2355
- colorScale = ["var(--glass-elevated)", "var(--brand-pink)"],
2356
- showValues = true,
2357
- valueFormatter = (v) => v.toFixed(0),
2358
- minCells = 25,
2359
- className
2360
- }) {
2361
- const { features } = useReportMode();
2362
- const { xValues, yValues, cellMap, minValue, maxValue } = React2.useMemo(() => {
2363
- const xSet = /* @__PURE__ */ new Set();
2364
- const ySet = /* @__PURE__ */ new Set();
2365
- const map = /* @__PURE__ */ new Map();
2366
- let min = Infinity;
2367
- let max = -Infinity;
2368
- for (const cell of data) {
2369
- xSet.add(cell.x);
2370
- ySet.add(cell.y);
2371
- map.set(`${cell.x}-${cell.y}`, cell.value);
2372
- min = Math.min(min, cell.value);
2373
- max = Math.max(max, cell.value);
2374
- }
2375
- return {
2376
- xValues: Array.from(xSet),
2377
- yValues: Array.from(ySet),
2378
- cellMap: map,
2379
- minValue: min === Infinity ? 0 : min,
2380
- maxValue: max === -Infinity ? 0 : max
2381
- };
2382
- }, [data]);
2383
- const isValid = data.length >= minCells;
2384
- const getCellColor = (value) => {
2385
- if (maxValue === minValue) return colorScale[0];
2386
- const ratio = (value - minValue) / (maxValue - minValue);
2387
- return `color-mix(in srgb, ${colorScale[1]} ${ratio * 100}%, ${colorScale[0]})`;
2388
- };
2389
- const getTextColor = (value) => {
2390
- const ratio = (value - minValue) / (maxValue - minValue);
2391
- return ratio > 0.5 ? "white" : "var(--text-primary)";
2392
- };
2393
- if (!isValid) {
2394
- return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: clsx20__default.default("ds-heatmap-chart", "ds-heatmap-chart--invalid", className), children: [
2395
- title && /* @__PURE__ */ jsxRuntime.jsx("h4", { className: "ds-heatmap-chart__title", children: title }),
2396
- /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "ds-heatmap-chart__empty", children: [
2397
- /* @__PURE__ */ jsxRuntime.jsx("p", { children: "Insufficient data for heatmap visualization" }),
2398
- /* @__PURE__ */ jsxRuntime.jsxs("p", { className: "ds-heatmap-chart__empty-detail", children: [
2399
- data.length,
2400
- " cells provided, ",
2401
- minCells,
2402
- " required"
2403
- ] })
2404
- ] })
2405
- ] });
2406
- }
2407
- return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: clsx20__default.default("ds-heatmap-chart", className), children: [
2408
- (title || subtitle) && /* @__PURE__ */ jsxRuntime.jsxs("header", { className: "ds-heatmap-chart__header", children: [
2409
- /* @__PURE__ */ jsxRuntime.jsxs("div", { children: [
2410
- title && /* @__PURE__ */ jsxRuntime.jsx("h4", { className: "ds-heatmap-chart__title", children: title }),
2411
- subtitle && /* @__PURE__ */ jsxRuntime.jsx("p", { className: "ds-heatmap-chart__subtitle", children: subtitle })
2412
- ] }),
2413
- features.showMethodology && /* @__PURE__ */ jsxRuntime.jsx(DataCoverageBadge, { sampleSize: data.length, requiredSize: minCells, size: "sm" })
2414
- ] }),
2415
- /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "ds-heatmap-chart__container", children: [
2416
- yLabel && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "ds-heatmap-chart__y-label", children: /* @__PURE__ */ jsxRuntime.jsx("span", { children: yLabel }) }),
2417
- /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "ds-heatmap-chart__grid-wrapper", children: [
2418
- /* @__PURE__ */ jsxRuntime.jsx(
2419
- "div",
2420
- {
2421
- className: "ds-heatmap-chart__grid",
2422
- style: {
2423
- gridTemplateColumns: `repeat(${xValues.length}, 1fr)`,
2424
- gridTemplateRows: `repeat(${yValues.length}, 1fr)`
2425
- },
2426
- children: yValues.map(
2427
- (y) => xValues.map((x) => {
2428
- const value = cellMap.get(`${x}-${y}`) ?? 0;
2429
- const cellContent = /* @__PURE__ */ jsxRuntime.jsx(
2430
- "div",
2431
- {
2432
- className: "ds-heatmap-chart__cell",
2433
- style: {
2434
- backgroundColor: getCellColor(value),
2435
- color: getTextColor(value)
2436
- },
2437
- children: showValues && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "ds-heatmap-chart__cell-value", children: valueFormatter(value) })
2438
- },
2439
- `${x}-${y}`
2440
- );
2441
- return /* @__PURE__ */ jsxRuntime.jsx(Tooltip4, { content: `${x}, ${y}: ${valueFormatter(value)}`, children: cellContent }, `${x}-${y}`);
2442
- })
2443
- )
2444
- }
2445
- ),
2446
- /* @__PURE__ */ jsxRuntime.jsx(
2447
- "div",
2448
- {
2449
- className: "ds-heatmap-chart__x-labels",
2450
- style: { gridTemplateColumns: `repeat(${xValues.length}, 1fr)` },
2451
- children: xValues.map((x) => /* @__PURE__ */ jsxRuntime.jsx("span", { className: "ds-heatmap-chart__x-label", children: x }, x))
2452
- }
2453
- )
2454
- ] }),
2455
- /* @__PURE__ */ jsxRuntime.jsx(
2456
- "div",
2457
- {
2458
- className: "ds-heatmap-chart__y-labels",
2459
- style: { gridTemplateRows: `repeat(${yValues.length}, 1fr)` },
2460
- children: yValues.map((y) => /* @__PURE__ */ jsxRuntime.jsx("span", { className: "ds-heatmap-chart__y-label-item", children: y }, y))
2461
- }
2462
- )
2463
- ] }),
2464
- xLabel && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "ds-heatmap-chart__x-axis-label", children: /* @__PURE__ */ jsxRuntime.jsx("span", { children: xLabel }) }),
2465
- /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "ds-heatmap-chart__legend", children: [
2466
- /* @__PURE__ */ jsxRuntime.jsx("span", { className: "ds-heatmap-chart__legend-label", children: "Low" }),
2467
- /* @__PURE__ */ jsxRuntime.jsx(
2468
- "div",
2469
- {
2470
- className: "ds-heatmap-chart__legend-bar",
2471
- style: {
2472
- background: `linear-gradient(to right, ${colorScale[0]}, ${colorScale[1]})`
2473
- }
2474
- }
2475
- ),
2476
- /* @__PURE__ */ jsxRuntime.jsx("span", { className: "ds-heatmap-chart__legend-label", children: "High" })
2477
- ] })
2478
- ] });
2479
- }
2480
- HeatmapChart.displayName = "HeatmapChart";
2481
- function ChartSwitchControl({
2482
- currentType,
2483
- allowedTypes,
2484
- onTypeChange,
2485
- size = "sm",
2486
- className
2487
- }) {
2488
- if (allowedTypes.length <= 1) {
2489
- return null;
2490
- }
2491
- return /* @__PURE__ */ jsxRuntime.jsx("div", { className: clsx20__default.default("ds-chart-switch", `ds-chart-switch--${size}`, className), children: allowedTypes.map((type) => {
2492
- const meta = CHART_REGISTRY[type];
2493
- if (!meta) return null;
2494
- const isActive = type === currentType;
2495
- const Icon = getChartIcon(type);
2496
- return /* @__PURE__ */ jsxRuntime.jsxs(
2497
- "button",
2498
- {
2499
- type: "button",
2500
- className: clsx20__default.default(
2501
- "ds-chart-switch__option",
2502
- isActive && "ds-chart-switch__option--active"
2503
- ),
2504
- onClick: () => onTypeChange(type),
2505
- title: meta.name,
2506
- "aria-pressed": isActive,
2507
- children: [
2508
- /* @__PURE__ */ jsxRuntime.jsx(Icon, {}),
2509
- /* @__PURE__ */ jsxRuntime.jsx("span", { className: "ds-chart-switch__label", children: getShortLabel(type) })
2510
- ]
2511
- },
2512
- type
2513
- );
2514
- }) });
2515
- }
2516
- ChartSwitchControl.displayName = "ChartSwitchControl";
2517
- function getChartIcon(type) {
2518
- const icons = {
2519
- line: LineIcon,
2520
- smooth_line: SmoothLineIcon,
2521
- area: AreaIcon,
2522
- stacked_area: StackedAreaIcon,
2523
- area_100pct: StackedAreaIcon,
2524
- bar: BarIcon,
2525
- column: ColumnIcon,
2526
- stacked_bar: StackedBarIcon,
2527
- stacked_column: StackedColumnIcon,
2528
- column_100pct: StackedColumnIcon,
2529
- pie: PieIcon,
2530
- donut: DonutIcon,
2531
- histogram: HistogramIcon,
2532
- funnel: FunnelIcon,
2533
- heatmap: HeatmapIcon
2534
- };
2535
- return icons[type] || DefaultChartIcon;
2536
- }
2537
- function getShortLabel(type) {
2538
- const labels = {
2539
- line: "Line",
2540
- smooth_line: "Smooth",
2541
- area: "Area",
2542
- stacked_area: "Stacked",
2543
- area_100pct: "100%",
2544
- bar: "Bar",
2545
- column: "Column",
2546
- stacked_bar: "Stacked",
2547
- stacked_column: "Stacked",
2548
- column_100pct: "100%",
2549
- pie: "Pie",
2550
- donut: "Donut",
2551
- histogram: "Histogram",
2552
- funnel: "Funnel",
2553
- heatmap: "Heatmap"
2554
- };
2555
- return labels[type] || type;
2556
- }
2557
- function LineIcon() {
2558
- return /* @__PURE__ */ jsxRuntime.jsx(
2559
- "svg",
2560
- {
2561
- width: "16",
2562
- height: "16",
2563
- viewBox: "0 0 24 24",
2564
- fill: "none",
2565
- stroke: "currentColor",
2566
- strokeWidth: "2",
2567
- children: /* @__PURE__ */ jsxRuntime.jsx("polyline", { points: "22 12 18 8 13 13 9 9 2 16" })
2568
- }
2569
- );
2570
- }
2571
- function SmoothLineIcon() {
2572
- return /* @__PURE__ */ jsxRuntime.jsx(
2573
- "svg",
2574
- {
2575
- width: "16",
2576
- height: "16",
2577
- viewBox: "0 0 24 24",
2578
- fill: "none",
2579
- stroke: "currentColor",
2580
- strokeWidth: "2",
2581
- children: /* @__PURE__ */ jsxRuntime.jsx("path", { d: "M2 16 C6 16, 8 8, 12 12 S18 6, 22 10" })
2582
- }
2583
- );
2584
- }
2585
- function AreaIcon() {
2586
- return /* @__PURE__ */ jsxRuntime.jsxs(
2587
- "svg",
2588
- {
2589
- width: "16",
2590
- height: "16",
2591
- viewBox: "0 0 24 24",
2592
- fill: "none",
2593
- stroke: "currentColor",
2594
- strokeWidth: "2",
2595
- children: [
2596
- /* @__PURE__ */ jsxRuntime.jsx("path", { d: "M2 20 L2 16 L8 10 L14 14 L22 6 L22 20 Z", fill: "currentColor", fillOpacity: "0.2" }),
2597
- /* @__PURE__ */ jsxRuntime.jsx("polyline", { points: "2 16 8 10 14 14 22 6" })
2598
- ]
2599
- }
2600
- );
2601
- }
2602
- function StackedAreaIcon() {
2603
- return /* @__PURE__ */ jsxRuntime.jsxs(
2604
- "svg",
2605
- {
2606
- width: "16",
2607
- height: "16",
2608
- viewBox: "0 0 24 24",
2609
- fill: "none",
2610
- stroke: "currentColor",
2611
- strokeWidth: "2",
2612
- children: [
2613
- /* @__PURE__ */ jsxRuntime.jsx("path", { d: "M2 20 L2 14 L8 10 L14 12 L22 8 L22 20 Z", fill: "currentColor", fillOpacity: "0.3" }),
2614
- /* @__PURE__ */ jsxRuntime.jsx("path", { d: "M2 20 L2 16 L8 14 L14 15 L22 12 L22 20 Z", fill: "currentColor", fillOpacity: "0.2" })
2615
- ]
2616
- }
2617
- );
2618
- }
2619
- function BarIcon() {
2620
- return /* @__PURE__ */ jsxRuntime.jsxs(
2621
- "svg",
2622
- {
2623
- width: "16",
2624
- height: "16",
2625
- viewBox: "0 0 24 24",
2626
- fill: "none",
2627
- stroke: "currentColor",
2628
- strokeWidth: "2",
2629
- children: [
2630
- /* @__PURE__ */ jsxRuntime.jsx("rect", { x: "2", y: "4", width: "14", height: "4", rx: "1", fill: "currentColor", fillOpacity: "0.2" }),
2631
- /* @__PURE__ */ jsxRuntime.jsx("rect", { x: "2", y: "10", width: "18", height: "4", rx: "1", fill: "currentColor", fillOpacity: "0.2" }),
2632
- /* @__PURE__ */ jsxRuntime.jsx("rect", { x: "2", y: "16", width: "10", height: "4", rx: "1", fill: "currentColor", fillOpacity: "0.2" })
2633
- ]
2634
- }
2635
- );
2636
- }
2637
- function ColumnIcon() {
2638
- return /* @__PURE__ */ jsxRuntime.jsxs(
2639
- "svg",
2640
- {
2641
- width: "16",
2642
- height: "16",
2643
- viewBox: "0 0 24 24",
2644
- fill: "none",
2645
- stroke: "currentColor",
2646
- strokeWidth: "2",
2647
- children: [
2648
- /* @__PURE__ */ jsxRuntime.jsx("rect", { x: "4", y: "8", width: "4", height: "14", rx: "1", fill: "currentColor", fillOpacity: "0.2" }),
2649
- /* @__PURE__ */ jsxRuntime.jsx("rect", { x: "10", y: "4", width: "4", height: "18", rx: "1", fill: "currentColor", fillOpacity: "0.2" }),
2650
- /* @__PURE__ */ jsxRuntime.jsx("rect", { x: "16", y: "12", width: "4", height: "10", rx: "1", fill: "currentColor", fillOpacity: "0.2" })
2651
- ]
2652
- }
2653
- );
2654
- }
2655
- function StackedBarIcon() {
2656
- return /* @__PURE__ */ jsxRuntime.jsxs(
2657
- "svg",
2658
- {
2659
- width: "16",
2660
- height: "16",
2661
- viewBox: "0 0 24 24",
2662
- fill: "none",
2663
- stroke: "currentColor",
2664
- strokeWidth: "2",
2665
- children: [
2666
- /* @__PURE__ */ jsxRuntime.jsx("rect", { x: "2", y: "4", width: "8", height: "4", rx: "1", fill: "currentColor", fillOpacity: "0.3" }),
2667
- /* @__PURE__ */ jsxRuntime.jsx("rect", { x: "10", y: "4", width: "6", height: "4", rx: "1", fill: "currentColor", fillOpacity: "0.15" }),
2668
- /* @__PURE__ */ jsxRuntime.jsx("rect", { x: "2", y: "10", width: "12", height: "4", rx: "1", fill: "currentColor", fillOpacity: "0.3" }),
2669
- /* @__PURE__ */ jsxRuntime.jsx("rect", { x: "14", y: "10", width: "6", height: "4", rx: "1", fill: "currentColor", fillOpacity: "0.15" }),
2670
- /* @__PURE__ */ jsxRuntime.jsx("rect", { x: "2", y: "16", width: "6", height: "4", rx: "1", fill: "currentColor", fillOpacity: "0.3" }),
2671
- /* @__PURE__ */ jsxRuntime.jsx("rect", { x: "8", y: "16", width: "4", height: "4", rx: "1", fill: "currentColor", fillOpacity: "0.15" })
2672
- ]
2673
- }
2674
- );
2675
- }
2676
- function StackedColumnIcon() {
2677
- return /* @__PURE__ */ jsxRuntime.jsxs(
2678
- "svg",
2679
- {
2680
- width: "16",
2681
- height: "16",
2682
- viewBox: "0 0 24 24",
2683
- fill: "none",
2684
- stroke: "currentColor",
2685
- strokeWidth: "2",
2686
- children: [
2687
- /* @__PURE__ */ jsxRuntime.jsx("rect", { x: "4", y: "14", width: "4", height: "8", rx: "1", fill: "currentColor", fillOpacity: "0.3" }),
2688
- /* @__PURE__ */ jsxRuntime.jsx("rect", { x: "4", y: "8", width: "4", height: "6", rx: "1", fill: "currentColor", fillOpacity: "0.15" }),
2689
- /* @__PURE__ */ jsxRuntime.jsx("rect", { x: "10", y: "10", width: "4", height: "12", rx: "1", fill: "currentColor", fillOpacity: "0.3" }),
2690
- /* @__PURE__ */ jsxRuntime.jsx("rect", { x: "10", y: "4", width: "4", height: "6", rx: "1", fill: "currentColor", fillOpacity: "0.15" }),
2691
- /* @__PURE__ */ jsxRuntime.jsx("rect", { x: "16", y: "16", width: "4", height: "6", rx: "1", fill: "currentColor", fillOpacity: "0.3" }),
2692
- /* @__PURE__ */ jsxRuntime.jsx("rect", { x: "16", y: "12", width: "4", height: "4", rx: "1", fill: "currentColor", fillOpacity: "0.15" })
2693
- ]
2694
- }
2695
- );
2696
- }
2697
- function PieIcon() {
2698
- return /* @__PURE__ */ jsxRuntime.jsxs(
2699
- "svg",
2700
- {
2701
- width: "16",
2702
- height: "16",
2703
- viewBox: "0 0 24 24",
2704
- fill: "none",
2705
- stroke: "currentColor",
2706
- strokeWidth: "2",
2707
- children: [
2708
- /* @__PURE__ */ jsxRuntime.jsx("circle", { cx: "12", cy: "12", r: "10", fill: "currentColor", fillOpacity: "0.2" }),
2709
- /* @__PURE__ */ jsxRuntime.jsx("path", { d: "M12 2 A10 10 0 0 1 22 12 L12 12 Z", fill: "currentColor", fillOpacity: "0.3" })
2710
- ]
2711
- }
2712
- );
2713
- }
2714
- function DonutIcon() {
2715
- return /* @__PURE__ */ jsxRuntime.jsxs(
2716
- "svg",
2717
- {
2718
- width: "16",
2719
- height: "16",
2720
- viewBox: "0 0 24 24",
2721
- fill: "none",
2722
- stroke: "currentColor",
2723
- strokeWidth: "2",
2724
- children: [
2725
- /* @__PURE__ */ jsxRuntime.jsx("circle", { cx: "12", cy: "12", r: "10", fill: "currentColor", fillOpacity: "0.2" }),
2726
- /* @__PURE__ */ jsxRuntime.jsx("circle", { cx: "12", cy: "12", r: "5", fill: "var(--glass-elevated)", stroke: "none" }),
2727
- /* @__PURE__ */ jsxRuntime.jsx(
2728
- "path",
2729
- {
2730
- d: "M12 2 A10 10 0 0 1 22 12 L17 12 A5 5 0 0 0 12 7 Z",
2731
- fill: "currentColor",
2732
- fillOpacity: "0.3"
2733
- }
2734
- )
2735
- ]
2736
- }
2737
- );
2738
- }
2739
- function HistogramIcon() {
2740
- return /* @__PURE__ */ jsxRuntime.jsxs(
2741
- "svg",
2742
- {
2743
- width: "16",
2744
- height: "16",
2745
- viewBox: "0 0 24 24",
2746
- fill: "none",
2747
- stroke: "currentColor",
2748
- strokeWidth: "2",
2749
- children: [
2750
- /* @__PURE__ */ jsxRuntime.jsx("rect", { x: "2", y: "14", width: "4", height: "8", rx: "0", fill: "currentColor", fillOpacity: "0.2" }),
2751
- /* @__PURE__ */ jsxRuntime.jsx("rect", { x: "6", y: "10", width: "4", height: "12", rx: "0", fill: "currentColor", fillOpacity: "0.2" }),
2752
- /* @__PURE__ */ jsxRuntime.jsx("rect", { x: "10", y: "4", width: "4", height: "18", rx: "0", fill: "currentColor", fillOpacity: "0.2" }),
2753
- /* @__PURE__ */ jsxRuntime.jsx("rect", { x: "14", y: "8", width: "4", height: "14", rx: "0", fill: "currentColor", fillOpacity: "0.2" }),
2754
- /* @__PURE__ */ jsxRuntime.jsx("rect", { x: "18", y: "12", width: "4", height: "10", rx: "0", fill: "currentColor", fillOpacity: "0.2" })
2755
- ]
2756
- }
2757
- );
2758
- }
2759
- function FunnelIcon() {
2760
- return /* @__PURE__ */ jsxRuntime.jsxs(
2761
- "svg",
2762
- {
2763
- width: "16",
2764
- height: "16",
2765
- viewBox: "0 0 24 24",
2766
- fill: "none",
2767
- stroke: "currentColor",
2768
- strokeWidth: "2",
2769
- children: [
2770
- /* @__PURE__ */ jsxRuntime.jsx("path", { d: "M2 4 H22 L18 10 H6 Z", fill: "currentColor", fillOpacity: "0.3" }),
2771
- /* @__PURE__ */ jsxRuntime.jsx("path", { d: "M6 10 H18 L15 16 H9 Z", fill: "currentColor", fillOpacity: "0.25" }),
2772
- /* @__PURE__ */ jsxRuntime.jsx("path", { d: "M9 16 H15 L13 22 H11 Z", fill: "currentColor", fillOpacity: "0.2" })
2773
- ]
2774
- }
2775
- );
2776
- }
2777
- function HeatmapIcon() {
2778
- return /* @__PURE__ */ jsxRuntime.jsxs(
2779
- "svg",
2780
- {
2781
- width: "16",
2782
- height: "16",
2783
- viewBox: "0 0 24 24",
2784
- fill: "none",
2785
- stroke: "currentColor",
2786
- strokeWidth: "1",
2787
- children: [
2788
- /* @__PURE__ */ jsxRuntime.jsx("rect", { x: "2", y: "2", width: "6", height: "6", fill: "currentColor", fillOpacity: "0.1" }),
2789
- /* @__PURE__ */ jsxRuntime.jsx("rect", { x: "9", y: "2", width: "6", height: "6", fill: "currentColor", fillOpacity: "0.3" }),
2790
- /* @__PURE__ */ jsxRuntime.jsx("rect", { x: "16", y: "2", width: "6", height: "6", fill: "currentColor", fillOpacity: "0.2" }),
2791
- /* @__PURE__ */ jsxRuntime.jsx("rect", { x: "2", y: "9", width: "6", height: "6", fill: "currentColor", fillOpacity: "0.4" }),
2792
- /* @__PURE__ */ jsxRuntime.jsx("rect", { x: "9", y: "9", width: "6", height: "6", fill: "currentColor", fillOpacity: "0.6" }),
2793
- /* @__PURE__ */ jsxRuntime.jsx("rect", { x: "16", y: "9", width: "6", height: "6", fill: "currentColor", fillOpacity: "0.3" }),
2794
- /* @__PURE__ */ jsxRuntime.jsx("rect", { x: "2", y: "16", width: "6", height: "6", fill: "currentColor", fillOpacity: "0.2" }),
2795
- /* @__PURE__ */ jsxRuntime.jsx("rect", { x: "9", y: "16", width: "6", height: "6", fill: "currentColor", fillOpacity: "0.5" }),
2796
- /* @__PURE__ */ jsxRuntime.jsx("rect", { x: "16", y: "16", width: "6", height: "6", fill: "currentColor", fillOpacity: "0.4" })
2797
- ]
2798
- }
2799
- );
2800
- }
2801
- function DefaultChartIcon() {
2802
- return /* @__PURE__ */ jsxRuntime.jsxs(
2803
- "svg",
2804
- {
2805
- width: "16",
2806
- height: "16",
2807
- viewBox: "0 0 24 24",
2808
- fill: "none",
2809
- stroke: "currentColor",
2810
- strokeWidth: "2",
2811
- children: [
2812
- /* @__PURE__ */ jsxRuntime.jsx("rect", { x: "3", y: "3", width: "18", height: "18", rx: "2" }),
2813
- /* @__PURE__ */ jsxRuntime.jsx("path", { d: "M3 15 L9 9 L13 13 L21 5" })
2814
- ]
2815
- }
2816
- );
2817
- }
2818
- var CHART_COLORS = [
2819
- "var(--brand-pink)",
2820
- "var(--brand-yellow)",
2821
- "var(--status-info)",
2822
- "var(--status-success)",
2823
- "var(--status-warning)",
2824
- "var(--status-error)"
2825
- ];
2826
- function getColor(index, customColor) {
2827
- return customColor || CHART_COLORS[index % CHART_COLORS.length];
2828
- }
2829
- function Chart({
2830
- intent,
2831
- data,
2832
- dimensions,
2833
- measures,
2834
- defaultType,
2835
- allowedTypes,
2836
- chartType: controlledType,
2837
- onChartTypeChange,
2838
- allowSwitching = false,
2839
- title,
2840
- subtitle,
2841
- height = 300,
2842
- legend: showLegend = true,
2843
- grid = true,
2844
- className
2845
- }) {
2846
- const { features } = useReportMode();
2847
- const resolvedDefault = defaultType || getDefaultChartForIntent(intent);
2848
- const [internalType, setInternalType] = React2.useState(resolvedDefault);
2849
- const activeType = controlledType ?? internalType;
2850
- const resolvedAllowedTypes = React2.useMemo(() => {
2851
- if (allowedTypes) return allowedTypes;
2852
- return getAllowedSwitchTargets(activeType);
2853
- }, [allowedTypes, activeType]);
2854
- const validation = React2.useMemo(() => {
2855
- return validateChartData(
2856
- activeType,
2857
- data,
2858
- dimensions.map((d) => d.key),
2859
- measures.map((m) => m.key)
2860
- );
2861
- }, [activeType, data, dimensions, measures]);
2862
- const handleTypeChange = (newType) => {
2863
- if (onChartTypeChange) {
2864
- onChartTypeChange(newType);
2865
- } else {
2866
- setInternalType(newType);
2867
- }
2868
- };
2869
- const chartMeta = CHART_REGISTRY[activeType];
2870
- const renderChart = () => {
2871
- if (!validation.isValid) {
2872
- return /* @__PURE__ */ jsxRuntime.jsx("div", { className: "ds-chart__invalid", children: /* @__PURE__ */ jsxRuntime.jsx(
2873
- DataStateIndicator,
2874
- {
2875
- state: "INSUFFICIENT_SAMPLE",
2876
- variant: "full",
2877
- details: {
2878
- message: validation.errors[0],
2879
- sampleSize: data.length,
2880
- requiredSize: chartMeta?.contract.minDataPoints || 0
2881
- }
2882
- }
2883
- ) });
2884
- }
2885
- const xKey = dimensions[0]?.key || "x";
2886
- switch (activeType) {
2887
- case "line":
2888
- case "smooth_line":
2889
- return renderLineChart(xKey, activeType === "smooth_line");
2890
- case "area":
2891
- case "stacked_area":
2892
- case "area_100pct":
2893
- return renderAreaChart(xKey, activeType);
2894
- case "bar":
2895
- case "stacked_bar":
2896
- return renderBarChart(xKey, activeType, "horizontal");
2897
- case "column":
2898
- case "stacked_column":
2899
- case "column_100pct":
2900
- return renderBarChart(xKey, activeType, "vertical");
2901
- case "pie":
2902
- case "donut":
2903
- return renderPieChart(xKey, activeType === "donut");
2904
- case "histogram":
2905
- return renderHistogram();
2906
- default:
2907
- return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "ds-chart__unsupported", children: [
2908
- 'Chart type "',
2909
- activeType,
2910
- '" is not yet implemented'
2911
- ] });
2912
- }
2913
- };
2914
- const renderLineChart = (xKey, smooth) => /* @__PURE__ */ jsxRuntime.jsx(recharts.ResponsiveContainer, { width: "100%", height, children: /* @__PURE__ */ jsxRuntime.jsxs(recharts.LineChart, { data, margin: { top: 5, right: 20, left: 0, bottom: 5 }, children: [
2915
- grid && /* @__PURE__ */ jsxRuntime.jsx(recharts.CartesianGrid, { strokeDasharray: "3 3", vertical: false }),
2916
- /* @__PURE__ */ jsxRuntime.jsx(
2917
- recharts.XAxis,
2918
- {
2919
- dataKey: xKey,
2920
- tick: { fontSize: 12 },
2921
- tickLine: false,
2922
- axisLine: { strokeWidth: 1 }
2923
- }
2924
- ),
2925
- /* @__PURE__ */ jsxRuntime.jsx(recharts.YAxis, { tick: { fontSize: 12 }, tickLine: false, axisLine: false, width: 40 }),
2926
- /* @__PURE__ */ jsxRuntime.jsx(
2927
- recharts.Tooltip,
2928
- {
2929
- contentStyle: {
2930
- background: "var(--glass-elevated)",
2931
- border: "1px solid var(--glass-border)"
2932
- }
2933
- }
2934
- ),
2935
- showLegend && measures.length > 1 && /* @__PURE__ */ jsxRuntime.jsx(recharts.Legend, {}),
2936
- measures.map((measure, idx) => /* @__PURE__ */ jsxRuntime.jsx(
2937
- recharts.Line,
2938
- {
2939
- type: smooth ? "monotone" : "linear",
2940
- dataKey: measure.key,
2941
- name: measure.label || measure.key,
2942
- stroke: getColor(idx, measure.color),
2943
- strokeWidth: 2,
2944
- dot: true,
2945
- activeDot: { r: 6 }
2946
- },
2947
- measure.key
2948
- ))
2949
- ] }) });
2950
- const renderAreaChart = (xKey, type) => {
2951
- const isStacked = type === "stacked_area" || type === "area_100pct";
2952
- const is100Pct = type === "area_100pct";
2953
- const chartData = is100Pct ? normalizeData(data, measures) : data;
2954
- return /* @__PURE__ */ jsxRuntime.jsx(recharts.ResponsiveContainer, { width: "100%", height, children: /* @__PURE__ */ jsxRuntime.jsxs(recharts.AreaChart, { data: chartData, margin: { top: 5, right: 20, left: 0, bottom: 5 }, children: [
2955
- grid && /* @__PURE__ */ jsxRuntime.jsx(recharts.CartesianGrid, { strokeDasharray: "3 3", vertical: false }),
2956
- /* @__PURE__ */ jsxRuntime.jsx(
2957
- recharts.XAxis,
2958
- {
2959
- dataKey: xKey,
2960
- tick: { fontSize: 12 },
2961
- tickLine: false,
2962
- axisLine: { strokeWidth: 1 }
2963
- }
2964
- ),
2965
- /* @__PURE__ */ jsxRuntime.jsx(
2966
- recharts.YAxis,
2967
- {
2968
- tick: { fontSize: 12 },
2969
- tickLine: false,
2970
- axisLine: false,
2971
- width: 40,
2972
- domain: is100Pct ? [0, 100] : void 0,
2973
- tickFormatter: is100Pct ? (v) => `${v}%` : void 0
2974
- }
2975
- ),
2976
- /* @__PURE__ */ jsxRuntime.jsx(
2977
- recharts.Tooltip,
2978
- {
2979
- contentStyle: {
2980
- background: "var(--glass-elevated)",
2981
- border: "1px solid var(--glass-border)"
2982
- }
2983
- }
2984
- ),
2985
- showLegend && /* @__PURE__ */ jsxRuntime.jsx(recharts.Legend, {}),
2986
- measures.map((measure, idx) => /* @__PURE__ */ jsxRuntime.jsx(
2987
- recharts.Area,
2988
- {
2989
- type: "monotone",
2990
- dataKey: measure.key,
2991
- name: measure.label || measure.key,
2992
- stroke: getColor(idx, measure.color),
2993
- fill: getColor(idx, measure.color),
2994
- fillOpacity: 0.3,
2995
- stackId: isStacked ? "stack" : void 0
2996
- },
2997
- measure.key
2998
- ))
2999
- ] }) });
3000
- };
3001
- const renderBarChart = (xKey, type, layout) => {
3002
- const isStacked = type.includes("stacked") || type.includes("100pct");
3003
- const is100Pct = type.includes("100pct");
3004
- const isHorizontal = layout === "horizontal";
3005
- const chartData = is100Pct ? normalizeData(data, measures) : data;
3006
- return /* @__PURE__ */ jsxRuntime.jsx(recharts.ResponsiveContainer, { width: "100%", height, children: /* @__PURE__ */ jsxRuntime.jsxs(
3007
- recharts.BarChart,
3008
- {
3009
- data: chartData,
3010
- layout: isHorizontal ? "vertical" : "horizontal",
3011
- margin: { top: 5, right: 20, left: isHorizontal ? 80 : 0, bottom: 5 },
3012
- children: [
3013
- grid && /* @__PURE__ */ jsxRuntime.jsx(
3014
- recharts.CartesianGrid,
3015
- {
3016
- strokeDasharray: "3 3",
3017
- horizontal: !isHorizontal,
3018
- vertical: isHorizontal
3019
- }
3020
- ),
3021
- isHorizontal ? /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
3022
- /* @__PURE__ */ jsxRuntime.jsx(
3023
- recharts.XAxis,
3024
- {
3025
- type: "number",
3026
- tick: { fontSize: 12 },
3027
- tickLine: false,
3028
- axisLine: false,
3029
- domain: is100Pct ? [0, 100] : void 0,
3030
- tickFormatter: is100Pct ? (v) => `${v}%` : void 0
3031
- }
3032
- ),
3033
- /* @__PURE__ */ jsxRuntime.jsx(
3034
- recharts.YAxis,
3035
- {
3036
- type: "category",
3037
- dataKey: xKey,
3038
- tick: { fontSize: 12 },
3039
- tickLine: false,
3040
- axisLine: false,
3041
- width: 80
3042
- }
3043
- )
3044
- ] }) : /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
3045
- /* @__PURE__ */ jsxRuntime.jsx(
3046
- recharts.XAxis,
3047
- {
3048
- dataKey: xKey,
3049
- tick: { fontSize: 12 },
3050
- tickLine: false,
3051
- axisLine: { strokeWidth: 1 }
3052
- }
3053
- ),
3054
- /* @__PURE__ */ jsxRuntime.jsx(
3055
- recharts.YAxis,
3056
- {
3057
- tick: { fontSize: 12 },
3058
- tickLine: false,
3059
- axisLine: false,
3060
- width: 40,
3061
- domain: is100Pct ? [0, 100] : void 0,
3062
- tickFormatter: is100Pct ? (v) => `${v}%` : void 0
3063
- }
3064
- )
3065
- ] }),
3066
- /* @__PURE__ */ jsxRuntime.jsx(
3067
- recharts.Tooltip,
3068
- {
3069
- contentStyle: {
3070
- background: "var(--glass-elevated)",
3071
- border: "1px solid var(--glass-border)"
3072
- }
3073
- }
3074
- ),
3075
- showLegend && measures.length > 1 && /* @__PURE__ */ jsxRuntime.jsx(recharts.Legend, {}),
3076
- measures.map((measure, idx) => /* @__PURE__ */ jsxRuntime.jsx(
3077
- recharts.Bar,
3078
- {
3079
- dataKey: measure.key,
3080
- name: measure.label || measure.key,
3081
- fill: getColor(idx, measure.color),
3082
- stackId: isStacked ? "stack" : void 0,
3083
- radius: isStacked ? void 0 : [4, 4, 0, 0]
3084
- },
3085
- measure.key
3086
- ))
3087
- ]
3088
- }
3089
- ) });
3090
- };
3091
- const renderPieChart = (nameKey, isDonut) => {
3092
- const valueKey = measures[0]?.key || "value";
3093
- return /* @__PURE__ */ jsxRuntime.jsx(recharts.ResponsiveContainer, { width: "100%", height, children: /* @__PURE__ */ jsxRuntime.jsxs(recharts.PieChart, { children: [
3094
- /* @__PURE__ */ jsxRuntime.jsx(
3095
- recharts.Pie,
3096
- {
3097
- data,
3098
- dataKey: valueKey,
3099
- nameKey,
3100
- cx: "50%",
3101
- cy: "50%",
3102
- innerRadius: isDonut ? "50%" : 0,
3103
- outerRadius: "80%",
3104
- label: ({ name, percent }) => `${name}: ${((percent ?? 0) * 100).toFixed(0)}%`,
3105
- labelLine: false,
3106
- children: data.map((_, idx) => /* @__PURE__ */ jsxRuntime.jsx(recharts.Cell, { fill: getColor(idx) }, `cell-${idx}`))
3107
- }
3108
- ),
3109
- /* @__PURE__ */ jsxRuntime.jsx(
3110
- recharts.Tooltip,
3111
- {
3112
- contentStyle: {
3113
- background: "var(--glass-elevated)",
3114
- border: "1px solid var(--glass-border)"
3115
- }
3116
- }
3117
- ),
3118
- showLegend && /* @__PURE__ */ jsxRuntime.jsx(recharts.Legend, {})
3119
- ] }) });
3120
- };
3121
- const renderHistogram = () => {
3122
- const valueKey = measures[0]?.key || "value";
3123
- const binKey = dimensions[0]?.key || "bin";
3124
- return /* @__PURE__ */ jsxRuntime.jsx(recharts.ResponsiveContainer, { width: "100%", height, children: /* @__PURE__ */ jsxRuntime.jsxs(recharts.BarChart, { data, margin: { top: 5, right: 20, left: 0, bottom: 5 }, children: [
3125
- grid && /* @__PURE__ */ jsxRuntime.jsx(recharts.CartesianGrid, { strokeDasharray: "3 3", vertical: false }),
3126
- /* @__PURE__ */ jsxRuntime.jsx(
3127
- recharts.XAxis,
3128
- {
3129
- dataKey: binKey,
3130
- tick: { fontSize: 12 },
3131
- tickLine: false,
3132
- axisLine: { strokeWidth: 1 }
3133
- }
3134
- ),
3135
- /* @__PURE__ */ jsxRuntime.jsx(recharts.YAxis, { tick: { fontSize: 12 }, tickLine: false, axisLine: false, width: 40 }),
3136
- /* @__PURE__ */ jsxRuntime.jsx(
3137
- recharts.Tooltip,
3138
- {
3139
- contentStyle: {
3140
- background: "var(--glass-elevated)",
3141
- border: "1px solid var(--glass-border)"
3142
- }
3143
- }
3144
- ),
3145
- /* @__PURE__ */ jsxRuntime.jsx(recharts.Bar, { dataKey: valueKey, fill: getColor(0), radius: [4, 4, 0, 0] })
3146
- ] }) });
3147
- };
3148
- const normalizeData = (sourceData, sourceMeasures) => {
3149
- return sourceData.map((row) => {
3150
- const total = sourceMeasures.reduce((sum, m) => {
3151
- const val = row[m.key];
3152
- return sum + (typeof val === "number" ? val : 0);
3153
- }, 0);
3154
- if (total === 0) return row;
3155
- const normalized = { ...row };
3156
- sourceMeasures.forEach((m) => {
3157
- const val = row[m.key];
3158
- if (typeof val === "number") {
3159
- normalized[m.key] = val / total * 100;
3160
- }
3161
- });
3162
- return normalized;
3163
- });
3164
- };
3165
- return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: clsx20__default.default("ds-chart", className), children: [
3166
- (title || subtitle || allowSwitching) && /* @__PURE__ */ jsxRuntime.jsxs("header", { className: "ds-chart__header", children: [
3167
- /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "ds-chart__header-text", children: [
3168
- title && /* @__PURE__ */ jsxRuntime.jsx("h4", { className: "ds-chart__title", children: title }),
3169
- subtitle && /* @__PURE__ */ jsxRuntime.jsx("p", { className: "ds-chart__subtitle", children: subtitle })
3170
- ] }),
3171
- /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "ds-chart__header-actions", children: [
3172
- features.showMethodology && data.length > 0 && /* @__PURE__ */ jsxRuntime.jsx(
3173
- DataCoverageBadge,
3174
- {
3175
- sampleSize: data.length,
3176
- requiredSize: chartMeta?.contract.minDataPoints || 0,
3177
- size: "sm"
3178
- }
3179
- ),
3180
- allowSwitching && resolvedAllowedTypes.length > 0 && /* @__PURE__ */ jsxRuntime.jsx(
3181
- ChartSwitchControl,
3182
- {
3183
- currentType: activeType,
3184
- allowedTypes: [activeType, ...resolvedAllowedTypes],
3185
- onTypeChange: handleTypeChange
3186
- }
3187
- )
3188
- ] })
3189
- ] }),
3190
- validation.warnings.length > 0 && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "ds-chart__warnings", children: validation.warnings.map((warning, idx) => /* @__PURE__ */ jsxRuntime.jsx("div", { className: "ds-chart__warning", children: warning }, idx)) }),
3191
- /* @__PURE__ */ jsxRuntime.jsx("div", { className: "ds-chart__body", style: { height }, children: renderChart() })
3192
- ] });
3193
- }
3194
- Chart.displayName = "Chart";
3195
- var DIMENSION_LABELS = {
3196
- EI: { left: "Extraversion", right: "Introversion", full: "E/I" },
3197
- SN: { left: "Sensing", right: "Intuition", full: "S/N" },
3198
- TF: { left: "Thinking", right: "Feeling", full: "T/F" },
3199
- JP: { left: "Judging", right: "Perceiving", full: "J/P" }
3200
- };
3201
- function MBTIRadar({
3202
- dimensions,
3203
- sampleSize,
3204
- comparison,
3205
- title,
3206
- subtitle,
3207
- size = 300,
3208
- showLabels = true,
3209
- showValues = true,
3210
- minSampleSize = 20,
3211
- confidence,
3212
- className
3213
- }) {
3214
- const { features } = useReportMode();
3215
- const isValid = sampleSize >= minSampleSize;
3216
- const radarData = React2.useMemo(() => {
3217
- return Object.keys(dimensions).map((key) => ({
3218
- dimension: DIMENSION_LABELS[key].full,
3219
- fullName: `${DIMENSION_LABELS[key].left} vs ${DIMENSION_LABELS[key].right}`,
3220
- value: dimensions[key],
3221
- comparison: comparison?.[key],
3222
- leftLabel: DIMENSION_LABELS[key].left,
3223
- rightLabel: DIMENSION_LABELS[key].right
3224
- }));
3225
- }, [dimensions, comparison]);
3226
- const derivedType = React2.useMemo(() => {
3227
- const e = dimensions.EI < 50 ? "E" : "I";
3228
- const s = dimensions.SN < 50 ? "S" : "N";
3229
- const t = dimensions.TF < 50 ? "T" : "F";
3230
- const j = dimensions.JP < 50 ? "J" : "P";
3231
- return `${e}${s}${t}${j}`;
3232
- }, [dimensions]);
3233
- if (!isValid) {
3234
- return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: clsx20__default.default("ds-mbti-radar", "ds-mbti-radar--invalid", className), children: [
3235
- title && /* @__PURE__ */ jsxRuntime.jsx("h4", { className: "ds-mbti-radar__title", children: title }),
3236
- /* @__PURE__ */ jsxRuntime.jsx("div", { className: "ds-mbti-radar__empty", children: /* @__PURE__ */ jsxRuntime.jsx(
3237
- DataStateIndicator,
3238
- {
3239
- state: "INSUFFICIENT_SAMPLE",
3240
- variant: "full",
3241
- details: {
3242
- message: "MBTI analysis requires sufficient sample size",
3243
- sampleSize,
3244
- requiredSize: minSampleSize
3245
- }
3246
- }
3247
- ) })
3248
- ] });
3249
- }
3250
- const CustomTooltip = ({
3251
- active,
3252
- payload
3253
- }) => {
3254
- if (!active || !payload?.length) return null;
3255
- const data = payload[0].payload;
3256
- return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "ds-mbti-radar__tooltip", children: [
3257
- /* @__PURE__ */ jsxRuntime.jsx("p", { className: "ds-mbti-radar__tooltip-title", children: data.fullName }),
3258
- /* @__PURE__ */ jsxRuntime.jsxs("p", { className: "ds-mbti-radar__tooltip-value", children: [
3259
- data.leftLabel,
3260
- ": ",
3261
- 100 - data.value,
3262
- "%"
3263
- ] }),
3264
- /* @__PURE__ */ jsxRuntime.jsxs("p", { className: "ds-mbti-radar__tooltip-value", children: [
3265
- data.rightLabel,
3266
- ": ",
3267
- data.value,
3268
- "%"
3269
- ] }),
3270
- data.comparison !== void 0 && /* @__PURE__ */ jsxRuntime.jsxs("p", { className: "ds-mbti-radar__tooltip-comparison", children: [
3271
- "Benchmark: ",
3272
- data.comparison,
3273
- "%"
3274
- ] })
3275
- ] });
3276
- };
3277
- return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: clsx20__default.default("ds-mbti-radar", className), children: [
3278
- (title || subtitle) && /* @__PURE__ */ jsxRuntime.jsxs("header", { className: "ds-mbti-radar__header", children: [
3279
- /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "ds-mbti-radar__header-text", children: [
3280
- title && /* @__PURE__ */ jsxRuntime.jsx("h4", { className: "ds-mbti-radar__title", children: title }),
3281
- subtitle && /* @__PURE__ */ jsxRuntime.jsx("p", { className: "ds-mbti-radar__subtitle", children: subtitle })
3282
- ] }),
3283
- /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "ds-mbti-radar__header-badges", children: [
3284
- features.showConfidenceScores && confidence !== void 0 && /* @__PURE__ */ jsxRuntime.jsx(ConfidenceIndicator, { score: confidence, size: "sm" }),
3285
- features.showMethodology && /* @__PURE__ */ jsxRuntime.jsx(DataCoverageBadge, { sampleSize, requiredSize: minSampleSize, size: "sm" })
3286
- ] })
3287
- ] }),
3288
- /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "ds-mbti-radar__type-badge", children: [
3289
- /* @__PURE__ */ jsxRuntime.jsx("span", { className: "ds-mbti-radar__type-label", children: "Derived Type" }),
3290
- /* @__PURE__ */ jsxRuntime.jsx("span", { className: "ds-mbti-radar__type-value", children: derivedType })
3291
- ] }),
3292
- /* @__PURE__ */ jsxRuntime.jsx("div", { className: "ds-mbti-radar__chart", style: { width: size, height: size }, children: /* @__PURE__ */ jsxRuntime.jsxs(recharts.RadarChart, { cx: "50%", cy: "50%", outerRadius: "70%", width: size, height: size, data: radarData, children: [
3293
- /* @__PURE__ */ jsxRuntime.jsx(recharts.PolarGrid, { stroke: "var(--glass-border)" }),
3294
- /* @__PURE__ */ jsxRuntime.jsx(
3295
- recharts.PolarAngleAxis,
3296
- {
3297
- dataKey: "dimension",
3298
- tick: { fill: "var(--text-secondary)", fontSize: 12 }
3299
- }
3300
- ),
3301
- /* @__PURE__ */ jsxRuntime.jsx(
3302
- recharts.PolarRadiusAxis,
3303
- {
3304
- angle: 45,
3305
- domain: [0, 100],
3306
- tick: { fill: "var(--text-tertiary)", fontSize: 10 },
3307
- tickCount: 5
3308
- }
3309
- ),
3310
- /* @__PURE__ */ jsxRuntime.jsx(
3311
- recharts.Radar,
3312
- {
3313
- name: "Profile",
3314
- dataKey: "value",
3315
- stroke: "var(--brand-pink)",
3316
- fill: "var(--brand-pink)",
3317
- fillOpacity: 0.3,
3318
- strokeWidth: 2
3319
- }
3320
- ),
3321
- comparison && /* @__PURE__ */ jsxRuntime.jsx(
3322
- recharts.Radar,
3323
- {
3324
- name: "Benchmark",
3325
- dataKey: "comparison",
3326
- stroke: "var(--brand-yellow)",
3327
- fill: "var(--brand-yellow)",
3328
- fillOpacity: 0.1,
3329
- strokeWidth: 2,
3330
- strokeDasharray: "5 5"
3331
- }
3332
- ),
3333
- showValues && /* @__PURE__ */ jsxRuntime.jsx(recharts.Tooltip, { content: /* @__PURE__ */ jsxRuntime.jsx(CustomTooltip, {}) }),
3334
- comparison && /* @__PURE__ */ jsxRuntime.jsx(recharts.Legend, {})
3335
- ] }) }),
3336
- showLabels && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "ds-mbti-radar__dimensions", children: radarData.map((d) => /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "ds-mbti-radar__dimension", children: [
3337
- /* @__PURE__ */ jsxRuntime.jsx("span", { className: "ds-mbti-radar__dimension-left", children: d.leftLabel }),
3338
- /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "ds-mbti-radar__dimension-bar", children: [
3339
- /* @__PURE__ */ jsxRuntime.jsx("div", { className: "ds-mbti-radar__dimension-fill", style: { width: `${d.value}%` } }),
3340
- /* @__PURE__ */ jsxRuntime.jsx("div", { className: "ds-mbti-radar__dimension-marker", style: { left: `${d.value}%` } })
3341
- ] }),
3342
- /* @__PURE__ */ jsxRuntime.jsx("span", { className: "ds-mbti-radar__dimension-right", children: d.rightLabel })
3343
- ] }, d.dimension)) })
3344
- ] });
3345
- }
3346
- MBTIRadar.displayName = "MBTIRadar";
3347
- var MBTI_GRID = [
3348
- ["ISTJ", "ISFJ", "INFJ", "INTJ"],
3349
- ["ISTP", "ISFP", "INFP", "INTP"],
3350
- ["ESTP", "ESFP", "ENFP", "ENTP"],
3351
- ["ESTJ", "ESFJ", "ENFJ", "ENTJ"]
3352
- ];
3353
- var TYPE_DESCRIPTIONS = {
3354
- ISTJ: "The Inspector - Practical, reliable, systematic",
3355
- ISFJ: "The Protector - Caring, supportive, traditional",
3356
- INFJ: "The Advocate - Insightful, principled, compassionate",
3357
- INTJ: "The Architect - Strategic, independent, determined",
3358
- ISTP: "The Virtuoso - Observant, practical, analytical",
3359
- ISFP: "The Adventurer - Artistic, sensitive, exploratory",
3360
- INFP: "The Mediator - Idealistic, empathetic, creative",
3361
- INTP: "The Logician - Inventive, logical, objective",
3362
- ESTP: "The Entrepreneur - Energetic, pragmatic, observant",
3363
- ESFP: "The Entertainer - Spontaneous, energetic, friendly",
3364
- ENFP: "The Campaigner - Enthusiastic, creative, sociable",
3365
- ENTP: "The Debater - Clever, curious, innovative",
3366
- ESTJ: "The Executive - Organized, logical, assertive",
3367
- ESFJ: "The Consul - Caring, sociable, traditional",
3368
- ENFJ: "The Protagonist - Charismatic, empathetic, organized",
3369
- ENTJ: "The Commander - Strategic, efficient, energetic"
3370
- };
3371
- var COLUMN_LABELS = ["ST", "SF", "NF", "NT"];
3372
- var ROW_LABELS = ["I-J", "I-P", "E-P", "E-J"];
3373
- function MBTITypeGrid({
3374
- data,
3375
- sampleSize: propSampleSize,
3376
- title,
3377
- subtitle,
3378
- showPercentages = true,
3379
- showCounts = true,
3380
- highlightThreshold,
3381
- minSampleSize = 50,
3382
- confidence,
3383
- onTypeClick,
3384
- selectedType,
3385
- className
3386
- }) {
3387
- const { features } = useReportMode();
3388
- const typeMap = React2.useMemo(() => {
3389
- const map = /* @__PURE__ */ new Map();
3390
- for (const item of data) {
3391
- map.set(item.type, item);
3392
- }
3393
- return map;
3394
- }, [data]);
3395
- const totalSampleSize = propSampleSize ?? data.reduce((sum, d) => sum + d.count, 0);
3396
- const isValid = totalSampleSize >= minSampleSize;
3397
- const maxCount = React2.useMemo(() => Math.max(...data.map((d) => d.count), 1), [data]);
3398
- const getPercentage = (count) => {
3399
- return totalSampleSize > 0 ? (count / totalSampleSize * 100).toFixed(1) : "0.0";
3400
- };
3401
- const getIntensity = (count) => {
3402
- if (maxCount === 0) return 0;
3403
- return count / maxCount * 100;
3404
- };
3405
- const isHighlighted = (type) => {
3406
- if (!highlightThreshold) return false;
3407
- const item = typeMap.get(type);
3408
- if (!item) return false;
3409
- const percentage = item.count / totalSampleSize * 100;
3410
- return percentage >= highlightThreshold;
3411
- };
3412
- if (!isValid) {
3413
- return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: clsx20__default.default("ds-mbti-type-grid", "ds-mbti-type-grid--invalid", className), children: [
3414
- title && /* @__PURE__ */ jsxRuntime.jsx("h4", { className: "ds-mbti-type-grid__title", children: title }),
3415
- /* @__PURE__ */ jsxRuntime.jsx("div", { className: "ds-mbti-type-grid__empty", children: /* @__PURE__ */ jsxRuntime.jsx(
3416
- DataStateIndicator,
3417
- {
3418
- state: "INSUFFICIENT_SAMPLE",
3419
- variant: "full",
3420
- details: {
3421
- message: "MBTI distribution analysis requires sufficient sample size",
3422
- sampleSize: totalSampleSize,
3423
- requiredSize: minSampleSize
3424
- }
3425
- }
3426
- ) })
3427
- ] });
3428
- }
3429
- return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: clsx20__default.default("ds-mbti-type-grid", className), children: [
3430
- (title || subtitle) && /* @__PURE__ */ jsxRuntime.jsxs("header", { className: "ds-mbti-type-grid__header", children: [
3431
- /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "ds-mbti-type-grid__header-text", children: [
3432
- title && /* @__PURE__ */ jsxRuntime.jsx("h4", { className: "ds-mbti-type-grid__title", children: title }),
3433
- subtitle && /* @__PURE__ */ jsxRuntime.jsx("p", { className: "ds-mbti-type-grid__subtitle", children: subtitle })
3434
- ] }),
3435
- /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "ds-mbti-type-grid__header-badges", children: [
3436
- features.showConfidenceScores && confidence !== void 0 && /* @__PURE__ */ jsxRuntime.jsx(ConfidenceIndicator, { score: confidence, size: "sm" }),
3437
- features.showMethodology && /* @__PURE__ */ jsxRuntime.jsx(
3438
- DataCoverageBadge,
3439
- {
3440
- sampleSize: totalSampleSize,
3441
- requiredSize: minSampleSize,
3442
- size: "sm"
3443
- }
3444
- )
3445
- ] })
3446
- ] }),
3447
- /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "ds-mbti-type-grid__container", children: [
3448
- /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "ds-mbti-type-grid__column-headers", children: [
3449
- /* @__PURE__ */ jsxRuntime.jsx("div", { className: "ds-mbti-type-grid__corner" }),
3450
- COLUMN_LABELS.map((label) => /* @__PURE__ */ jsxRuntime.jsx("div", { className: "ds-mbti-type-grid__column-header", children: label }, label))
3451
- ] }),
3452
- MBTI_GRID.map((row, rowIndex) => /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "ds-mbti-type-grid__row", children: [
3453
- /* @__PURE__ */ jsxRuntime.jsx("div", { className: "ds-mbti-type-grid__row-header", children: ROW_LABELS[rowIndex] }),
3454
- row.map((type) => {
3455
- const typeData = typeMap.get(type);
3456
- const count = typeData?.count ?? 0;
3457
- const percentage = getPercentage(count);
3458
- const intensity = getIntensity(count);
3459
- const highlighted = isHighlighted(type);
3460
- const selected = selectedType === type;
3461
- return /* @__PURE__ */ jsxRuntime.jsx(
3462
- Tooltip4,
3463
- {
3464
- content: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "ds-mbti-type-grid__tooltip-content", children: [
3465
- /* @__PURE__ */ jsxRuntime.jsx("strong", { children: type }),
3466
- /* @__PURE__ */ jsxRuntime.jsx("p", { children: TYPE_DESCRIPTIONS[type] }),
3467
- /* @__PURE__ */ jsxRuntime.jsxs("p", { children: [
3468
- "Count: ",
3469
- count.toLocaleString()
3470
- ] }),
3471
- /* @__PURE__ */ jsxRuntime.jsxs("p", { children: [
3472
- "Percentage: ",
3473
- percentage,
3474
- "%"
3475
- ] }),
3476
- typeData?.responseRate !== void 0 && /* @__PURE__ */ jsxRuntime.jsxs("p", { children: [
3477
- "Response Rate: ",
3478
- typeData.responseRate.toFixed(1),
3479
- "%"
3480
- ] })
3481
- ] }),
3482
- children: /* @__PURE__ */ jsxRuntime.jsxs(
3483
- "button",
3484
- {
3485
- type: "button",
3486
- className: clsx20__default.default(
3487
- "ds-mbti-type-grid__cell",
3488
- highlighted && "ds-mbti-type-grid__cell--highlighted",
3489
- selected && "ds-mbti-type-grid__cell--selected",
3490
- onTypeClick && "ds-mbti-type-grid__cell--clickable"
3491
- ),
3492
- onClick: () => onTypeClick?.(type),
3493
- disabled: !onTypeClick,
3494
- style: {
3495
- "--cell-intensity": `${intensity}%`
3496
- },
3497
- children: [
3498
- /* @__PURE__ */ jsxRuntime.jsx("span", { className: "ds-mbti-type-grid__cell-type", children: type }),
3499
- showCounts && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "ds-mbti-type-grid__cell-count", children: count.toLocaleString() }),
3500
- showPercentages && /* @__PURE__ */ jsxRuntime.jsxs("span", { className: "ds-mbti-type-grid__cell-percentage", children: [
3501
- percentage,
3502
- "%"
3503
- ] })
3504
- ]
3505
- }
3506
- )
3507
- },
3508
- type
3509
- );
3510
- })
3511
- ] }, rowIndex))
3512
- ] }),
3513
- /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "ds-mbti-type-grid__legend", children: [
3514
- /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "ds-mbti-type-grid__legend-item", children: [
3515
- /* @__PURE__ */ jsxRuntime.jsx("span", { className: "ds-mbti-type-grid__legend-bar ds-mbti-type-grid__legend-bar--gradient" }),
3516
- /* @__PURE__ */ jsxRuntime.jsx("span", { className: "ds-mbti-type-grid__legend-label", children: "Distribution density" })
3517
- ] }),
3518
- highlightThreshold && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "ds-mbti-type-grid__legend-item", children: [
3519
- /* @__PURE__ */ jsxRuntime.jsx("span", { className: "ds-mbti-type-grid__legend-bar ds-mbti-type-grid__legend-bar--highlight" }),
3520
- /* @__PURE__ */ jsxRuntime.jsxs("span", { className: "ds-mbti-type-grid__legend-label", children: [
3521
- ">=",
3522
- highlightThreshold,
3523
- "% of sample"
3524
- ] })
3525
- ] })
3526
- ] })
3527
- ] });
3528
- }
3529
- MBTITypeGrid.displayName = "MBTITypeGrid";
3530
1917
  function Select({
3531
1918
  value,
3532
1919
  defaultValue,
@@ -3558,7 +1945,7 @@ var SelectTrigger = React2__default.default.forwardRef(
3558
1945
  select.Select.Trigger,
3559
1946
  {
3560
1947
  ref,
3561
- className: clsx20__default.default("ds-select__trigger", `ds-select__trigger--${size}`, className),
1948
+ className: clsx12__default.default("ds-select__trigger", `ds-select__trigger--${size}`, className),
3562
1949
  "aria-label": props["aria-label"] || (typeof placeholder === "string" ? placeholder : "Select"),
3563
1950
  ...props,
3564
1951
  children: [
@@ -3579,7 +1966,7 @@ var SelectContent = React2__default.default.forwardRef(
3579
1966
  sideOffset,
3580
1967
  align,
3581
1968
  alignItemWithTrigger: false,
3582
- children: /* @__PURE__ */ jsxRuntime.jsx(select.Select.Popup, { ref, className: clsx20__default.default("ds-select__content", className), ...props, children: /* @__PURE__ */ jsxRuntime.jsx(select.Select.List, { className: "ds-select__list", children }) })
1969
+ children: /* @__PURE__ */ jsxRuntime.jsx(select.Select.Popup, { ref, className: clsx12__default.default("ds-select__content", className), ...props, children: /* @__PURE__ */ jsxRuntime.jsx(select.Select.List, { className: "ds-select__list", children }) })
3583
1970
  }
3584
1971
  ) });
3585
1972
  }
@@ -3593,7 +1980,7 @@ var SelectItem = React2__default.default.forwardRef(
3593
1980
  ref,
3594
1981
  value,
3595
1982
  disabled,
3596
- className: clsx20__default.default("ds-select__item", className),
1983
+ className: clsx12__default.default("ds-select__item", className),
3597
1984
  ...props,
3598
1985
  children: [
3599
1986
  /* @__PURE__ */ jsxRuntime.jsx(select.Select.ItemIndicator, { className: "ds-select__item-indicator", children: /* @__PURE__ */ jsxRuntime.jsx(CheckIcon, {}) }),
@@ -3606,7 +1993,7 @@ var SelectItem = React2__default.default.forwardRef(
3606
1993
  SelectItem.displayName = "SelectItem";
3607
1994
  var SelectGroup = React2__default.default.forwardRef(
3608
1995
  ({ className, label, children, ...props }, ref) => {
3609
- return /* @__PURE__ */ jsxRuntime.jsxs(select.Select.Group, { ref, className: clsx20__default.default("ds-select__group", className), ...props, children: [
1996
+ return /* @__PURE__ */ jsxRuntime.jsxs(select.Select.Group, { ref, className: clsx12__default.default("ds-select__group", className), ...props, children: [
3610
1997
  label && /* @__PURE__ */ jsxRuntime.jsx(select.Select.GroupLabel, { className: "ds-select__group-label", children: label }),
3611
1998
  children
3612
1999
  ] });
@@ -3614,7 +2001,7 @@ var SelectGroup = React2__default.default.forwardRef(
3614
2001
  );
3615
2002
  SelectGroup.displayName = "SelectGroup";
3616
2003
  var SelectSeparator = React2__default.default.forwardRef(({ className, ...props }, ref) => {
3617
- return /* @__PURE__ */ jsxRuntime.jsx("div", { ref, className: clsx20__default.default("ds-select__separator", className), ...props });
2004
+ return /* @__PURE__ */ jsxRuntime.jsx("div", { ref, className: clsx12__default.default("ds-select__separator", className), ...props });
3618
2005
  });
3619
2006
  SelectSeparator.displayName = "SelectSeparator";
3620
2007
  function ChevronDownIcon() {
@@ -3657,7 +2044,7 @@ var DropdownMenuTrigger = React2__default.default.forwardRef(({ className, ...pr
3657
2044
  menu.Menu.Trigger,
3658
2045
  {
3659
2046
  ref,
3660
- className: clsx20__default.default("ds-dropdown-menu__trigger", className),
2047
+ className: clsx12__default.default("ds-dropdown-menu__trigger", className),
3661
2048
  ...props
3662
2049
  }
3663
2050
  );
@@ -3676,7 +2063,7 @@ var DropdownMenuContent = React2__default.default.forwardRef(
3676
2063
  menu.Menu.Popup,
3677
2064
  {
3678
2065
  ref,
3679
- className: clsx20__default.default("ds-dropdown-menu__content", className),
2066
+ className: clsx12__default.default("ds-dropdown-menu__content", className),
3680
2067
  ...props
3681
2068
  }
3682
2069
  )
@@ -3687,16 +2074,16 @@ var DropdownMenuContent = React2__default.default.forwardRef(
3687
2074
  DropdownMenuContent.displayName = "DropdownMenuContent";
3688
2075
  var DropdownMenuItem = React2__default.default.forwardRef(
3689
2076
  ({ className, ...props }, ref) => {
3690
- return /* @__PURE__ */ jsxRuntime.jsx(menu.Menu.Item, { ref, className: clsx20__default.default("ds-dropdown-menu__item", className), ...props });
2077
+ return /* @__PURE__ */ jsxRuntime.jsx(menu.Menu.Item, { ref, className: clsx12__default.default("ds-dropdown-menu__item", className), ...props });
3691
2078
  }
3692
2079
  );
3693
2080
  DropdownMenuItem.displayName = "DropdownMenuItem";
3694
2081
  var DropdownMenuSeparator = React2__default.default.forwardRef(({ className, ...props }, ref) => {
3695
- return /* @__PURE__ */ jsxRuntime.jsx("div", { ref, className: clsx20__default.default("ds-dropdown-menu__separator", className), ...props });
2082
+ return /* @__PURE__ */ jsxRuntime.jsx("div", { ref, className: clsx12__default.default("ds-dropdown-menu__separator", className), ...props });
3696
2083
  });
3697
2084
  DropdownMenuSeparator.displayName = "DropdownMenuSeparator";
3698
2085
  var DropdownMenuLabel = React2__default.default.forwardRef(({ className, ...props }, ref) => {
3699
- return /* @__PURE__ */ jsxRuntime.jsx("div", { ref, className: clsx20__default.default("ds-dropdown-menu__label", className), ...props });
2086
+ return /* @__PURE__ */ jsxRuntime.jsx("div", { ref, className: clsx12__default.default("ds-dropdown-menu__label", className), ...props });
3700
2087
  });
3701
2088
  DropdownMenuLabel.displayName = "DropdownMenuLabel";
3702
2089
  var DEFAULT_OPTIONS = [
@@ -3732,7 +2119,7 @@ function ExportMenu({
3732
2119
  /* @__PURE__ */ jsxRuntime.jsx(
3733
2120
  DropdownMenuTrigger,
3734
2121
  {
3735
- className: clsx20__default.default(
2122
+ className: clsx12__default.default(
3736
2123
  "ds-export-menu__trigger",
3737
2124
  "ds-button",
3738
2125
  `ds-button--${variant}`,
@@ -3982,13 +2369,9 @@ function JsonIcon() {
3982
2369
 
3983
2370
  exports.ANALYST_MODE = ANALYST_MODE;
3984
2371
  exports.ANALYTICAL_STATE_CONFIG = ANALYTICAL_STATE_CONFIG;
3985
- exports.BarChart = BarChart;
3986
2372
  exports.CHART_REGISTRY = CHART_REGISTRY;
3987
2373
  exports.CONFIDENCE_THRESHOLDS = CONFIDENCE_THRESHOLDS;
3988
2374
  exports.CaveatBlock = CaveatBlock;
3989
- exports.Chart = Chart;
3990
- exports.ChartContainer = ChartContainer;
3991
- exports.ChartSwitchControl = ChartSwitchControl;
3992
2375
  exports.ConfidenceIndicator = ConfidenceIndicator;
3993
2376
  exports.DataCoverageBadge = DataCoverageBadge;
3994
2377
  exports.DataStateIndicator = DataStateIndicator;
@@ -3996,18 +2379,12 @@ exports.EXECUTIVE_MODE = EXECUTIVE_MODE;
3996
2379
  exports.EvidenceGroup = EvidenceGroup;
3997
2380
  exports.ExecutiveThesis = ExecutiveThesis;
3998
2381
  exports.ExportMenu = ExportMenu;
3999
- exports.FunnelChart = FunnelChart;
4000
- exports.HeatmapChart = HeatmapChart;
4001
2382
  exports.INSIGHT_TYPE_CONTRACTS = INSIGHT_TYPE_CONTRACTS;
4002
2383
  exports.INTENT_CHART_FAMILIES = INTENT_CHART_FAMILIES;
4003
2384
  exports.InsightBlock = InsightBlock;
4004
2385
  exports.KeyMetric = KeyMetric;
4005
- exports.LineChart = LineChart;
4006
- exports.MBTIRadar = MBTIRadar;
4007
- exports.MBTITypeGrid = MBTITypeGrid;
4008
2386
  exports.MINIMUM_SAMPLE_SIZES = MINIMUM_SAMPLE_SIZES;
4009
2387
  exports.MethodologyNote = MethodologyNote;
4010
- exports.PieChart = PieChart;
4011
2388
  exports.ReportModeProvider = ReportModeProvider;
4012
2389
  exports.ReportShell = ReportShell;
4013
2390
  exports.Select = Select;