@spaced-out/ui-design-system 0.6.20 → 0.6.22

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 (25) hide show
  1. package/CHANGELOG.md +14 -0
  2. package/lib/components/Charts/StackedBarLineChart/StackedBarLineChart.d.ts +42 -0
  3. package/lib/components/Charts/StackedBarLineChart/StackedBarLineChart.d.ts.map +1 -0
  4. package/lib/components/Charts/StackedBarLineChart/StackedBarLineChart.js +136 -0
  5. package/lib/components/Charts/StackedBarLineChart/StackedBarLineChart.module.css +22 -0
  6. package/lib/components/Charts/StackedBarLineChart/index.d.ts +2 -0
  7. package/lib/components/Charts/StackedBarLineChart/index.d.ts.map +1 -0
  8. package/lib/components/Charts/StackedBarLineChart/index.js +16 -0
  9. package/lib/components/Charts/UniversalChart/UniversalChart.d.ts +4 -2
  10. package/lib/components/Charts/UniversalChart/UniversalChart.d.ts.map +1 -1
  11. package/lib/components/Charts/UniversalChart/UniversalChart.js +27 -2
  12. package/lib/components/Charts/UniversalChart/UniversalChart.types.d.ts +7 -3
  13. package/lib/components/Charts/UniversalChart/UniversalChart.types.d.ts.map +1 -1
  14. package/lib/components/Charts/index.d.ts +1 -0
  15. package/lib/components/Charts/index.d.ts.map +1 -1
  16. package/lib/components/Charts/index.js +11 -0
  17. package/lib/components/SideMenuLink/SideMenuLink.js +1 -1
  18. package/lib/utils/charts/index.d.ts +1 -0
  19. package/lib/utils/charts/index.d.ts.map +1 -1
  20. package/lib/utils/charts/index.js +11 -0
  21. package/lib/utils/charts/stackedBarLineChart.d.ts +3 -0
  22. package/lib/utils/charts/stackedBarLineChart.d.ts.map +1 -0
  23. package/lib/utils/charts/stackedBarLineChart.js +74 -0
  24. package/mcp/package.json +1 -1
  25. package/package.json +1 -1
package/CHANGELOG.md CHANGED
@@ -2,6 +2,20 @@
2
2
 
3
3
  All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.
4
4
 
5
+ ### [0.6.22](https://github.com/spaced-out/ui-design-system/compare/v0.6.21...v0.6.22) (2026-06-08)
6
+
7
+
8
+ ### Bug Fixes
9
+
10
+ * change the ai icon to solid ([#490](https://github.com/spaced-out/ui-design-system/issues/490)) ([b4e81fe](https://github.com/spaced-out/ui-design-system/commit/b4e81fe84cccf1fefeffd3e2944d0d3448bbb9b0))
11
+
12
+ ### [0.6.21](https://github.com/spaced-out/ui-design-system/compare/v0.6.20...v0.6.21) (2026-06-04)
13
+
14
+
15
+ ### Features
16
+
17
+ * **Charts:** add StackedBarLineChart combo type ([#486](https://github.com/spaced-out/ui-design-system/issues/486)) ([06344e0](https://github.com/spaced-out/ui-design-system/commit/06344e00bb7a760773158050d08caee5b4788e65))
18
+
5
19
  ### [0.6.20](https://github.com/spaced-out/ui-design-system/compare/v0.6.19...v0.6.20) (2026-05-29)
6
20
 
7
21
 
@@ -0,0 +1,42 @@
1
+ import * as React from 'react';
2
+ import type { SeriesColumnOptions, SeriesLineOptions } from 'highcharts';
3
+ import type { ChartOptions, DataOptionsType, Drilldown } from '../../../types/charts';
4
+ import type { ChartWrapperClassNames, ExportOptionType } from '../../../components/Charts/ChartWrapper';
5
+ type ClassNames = Readonly<ChartWrapperClassNames & {
6
+ highChart?: string;
7
+ }>;
8
+ export type StackedBarLineColumnSeries = Omit<SeriesColumnOptions, 'data' | 'type'> & {
9
+ type: 'column';
10
+ name: string;
11
+ data: DataOptionsType[];
12
+ };
13
+ export type StackedBarLineLineSeries = Omit<SeriesLineOptions, 'data' | 'type'> & {
14
+ type: 'line';
15
+ name: string;
16
+ data: DataOptionsType[];
17
+ };
18
+ export type StackedBarLineSeries = StackedBarLineColumnSeries | StackedBarLineLineSeries;
19
+ /**
20
+ * Combo chart: stacked columns + overlaid line(s) on a single shared y-axis.
21
+ *
22
+ * Use when the columns and line(s) share the same units (e.g., a stacked
23
+ * breakdown of revenue plus a target-revenue line, both in dollars). Pass
24
+ * `yAxis` as a single options object; the chart renders the axis labels on
25
+ * both the left and the right edges of the plot via a linked mirror, so
26
+ * values are readable from either side.
27
+ */
28
+ export interface StackedBarLineChartProps extends Omit<ChartOptions, 'series' | 'isLoading' | 'drilldown' | 'cardTitle' | 'emptyText' | 'classNames' | 'hasEmptyData' | 'headerActions' | 'customExportOptions'> {
29
+ series: Array<StackedBarLineSeries>;
30
+ isLoading?: boolean;
31
+ drilldown?: Drilldown;
32
+ cardTitle?: React.ReactNode;
33
+ emptyText?: React.ReactNode;
34
+ classNames?: ClassNames;
35
+ hasEmptyData?: boolean;
36
+ headerActions?: React.ReactNode;
37
+ customExportOptions?: Array<ExportOptionType> | null;
38
+ testId?: string;
39
+ }
40
+ export declare const StackedBarLineChart: ({ series, isLoading, drilldown, emptyText, cardTitle, classNames, hasEmptyData, headerActions, customExportOptions, testId, ...userOptions }: StackedBarLineChartProps) => React.ReactNode;
41
+ export {};
42
+ //# sourceMappingURL=StackedBarLineChart.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"StackedBarLineChart.d.ts","sourceRoot":"","sources":["../../../../src/components/Charts/StackedBarLineChart/StackedBarLineChart.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,KAAK,EACV,mBAAmB,EACnB,iBAAiB,EAElB,MAAM,YAAY,CAAC;AAKpB,OAAO,KAAK,EAAC,YAAY,EAAE,eAAe,EAAE,SAAS,EAAC,MAAM,kBAAkB,CAAC;AAS/E,OAAO,KAAK,EACV,sBAAsB,EACtB,gBAAgB,EACjB,MAAM,oCAAoC,CAAC;AAM5C,KAAK,UAAU,GAAG,QAAQ,CACxB,sBAAsB,GAAG;IACvB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB,CACF,CAAC;AAEF,MAAM,MAAM,0BAA0B,GAAG,IAAI,CAC3C,mBAAmB,EACnB,MAAM,GAAG,MAAM,CAChB,GAAG;IACF,IAAI,EAAE,QAAQ,CAAC;IACf,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,eAAe,EAAE,CAAC;CACzB,CAAC;AAEF,MAAM,MAAM,wBAAwB,GAAG,IAAI,CACzC,iBAAiB,EACjB,MAAM,GAAG,MAAM,CAChB,GAAG;IACF,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,eAAe,EAAE,CAAC;CACzB,CAAC;AAEF,MAAM,MAAM,oBAAoB,GAC5B,0BAA0B,GAC1B,wBAAwB,CAAC;AAE7B;;;;;;;;GAQG;AACH,MAAM,WAAW,wBACf,SAAQ,IAAI,CACV,YAAY,EACV,QAAQ,GACR,WAAW,GACX,WAAW,GACX,WAAW,GACX,WAAW,GACX,YAAY,GACZ,cAAc,GACd,eAAe,GACf,qBAAqB,CACxB;IACD,MAAM,EAAE,KAAK,CAAC,oBAAoB,CAAC,CAAC;IACpC,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,SAAS,CAAC,EAAE,SAAS,CAAC;IACtB,SAAS,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC5B,SAAS,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC5B,UAAU,CAAC,EAAE,UAAU,CAAC;IACxB,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB,aAAa,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAChC,mBAAmB,CAAC,EAAE,KAAK,CAAC,gBAAgB,CAAC,GAAG,IAAI,CAAC;IACrD,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AAkDD,eAAO,MAAM,mBAAmB,GAAI,8IAYjC,wBAAwB,KAAG,KAAK,CAAC,SAiEnC,CAAC"}
@@ -0,0 +1,136 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.StackedBarLineChart = void 0;
7
+ var React = _interopRequireWildcard(require("react"));
8
+ var _highcharts = _interopRequireDefault(require("highcharts"));
9
+ var _highchartsReactOfficial = _interopRequireDefault(require("highcharts-react-official"));
10
+ var _charts = require("../../../utils/charts");
11
+ var _classify = _interopRequireDefault(require("../../../utils/classify"));
12
+ var _ChartWrapper = require("../ChartWrapper");
13
+ var _StackedBarLineChartModule = _interopRequireDefault(require("./StackedBarLineChart.module.css"));
14
+ var _jsxRuntime = require("react/jsx-runtime");
15
+ function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
16
+ function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function (e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != typeof e && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (const t in e) "default" !== t && {}.hasOwnProperty.call(e, t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, t)) && (i.get || i.set) ? o(f, t, i) : f[t] = e[t]); return f; })(e, t); }
17
+ /**
18
+ * Combo chart: stacked columns + overlaid line(s) on a single shared y-axis.
19
+ *
20
+ * Use when the columns and line(s) share the same units (e.g., a stacked
21
+ * breakdown of revenue plus a target-revenue line, both in dollars). Pass
22
+ * `yAxis` as a single options object; the chart renders the axis labels on
23
+ * both the left and the right edges of the plot via a linked mirror, so
24
+ * values are readable from either side.
25
+ */
26
+
27
+ const mapMainSeries = series => series.map((seriesItem, index) => {
28
+ if (seriesItem.type === 'line') {
29
+ return {
30
+ ...seriesItem,
31
+ color: seriesItem.color ?? (0, _charts.getDataVizColor)(index)
32
+ };
33
+ }
34
+ return {
35
+ ...seriesItem,
36
+ color: seriesItem.color ?? (0, _charts.getDataVizColor)(index)
37
+ };
38
+ });
39
+ const enrichDrilldownSeries = drilldownSeries => drilldownSeries?.map((seriesItem, index) => {
40
+ const withData = seriesItem;
41
+ const resolvedType = seriesItem.type ?? 'column';
42
+ if (resolvedType === 'line') {
43
+ const lineItem = seriesItem;
44
+ return {
45
+ ...seriesItem,
46
+ type: 'line',
47
+ color: lineItem.color ?? (0, _charts.getDataVizColor)(index)
48
+ };
49
+ }
50
+ const enrichedData = withData.data?.map((dataItem, dataIndex) => {
51
+ const resolvedColor = dataItem.color ?? (0, _charts.getDataVizColor)(dataIndex);
52
+ const resolvedPointWidth = dataItem.pointWidth ?? _charts.columnPlotWidth;
53
+ return {
54
+ ...dataItem,
55
+ color: resolvedColor,
56
+ pointWidth: resolvedPointWidth
57
+ };
58
+ });
59
+ return {
60
+ ...seriesItem,
61
+ type: 'column',
62
+ ...(enrichedData && {
63
+ data: enrichedData
64
+ })
65
+ };
66
+ });
67
+ const StackedBarLineChart = _ref => {
68
+ let {
69
+ series,
70
+ isLoading,
71
+ drilldown,
72
+ emptyText,
73
+ cardTitle,
74
+ classNames,
75
+ hasEmptyData,
76
+ headerActions,
77
+ customExportOptions,
78
+ testId,
79
+ ...userOptions
80
+ } = _ref;
81
+ const chartRef = React.useRef(null);
82
+ const defaultChartOptions = React.useMemo(() => (0, _charts.getStackedBarLineChartOptions)(), []);
83
+ const comboSeries = React.useMemo(() => mapMainSeries(series), [series]);
84
+ const comboDrilldown = React.useMemo(() => drilldown ? {
85
+ ...drilldown,
86
+ series: enrichDrilldownSeries(drilldown.series),
87
+ breadcrumbs: {
88
+ floating: false
89
+ }
90
+ } : {}, [drilldown]);
91
+
92
+ // The defaults declare a 2-axis tuple (primary on the left, linked mirror
93
+ // on the right). lodash.merge cannot fold a plain-object source into an
94
+ // array destination, so a single-object `yAxis` from the consumer is
95
+ // normalized to `[userObject, {}]` here — the user's config merges into
96
+ // the primary slot and the mirror slot keeps its defaults.
97
+ const userOptionsWithNormalizedAxis = React.useMemo(() => {
98
+ const userYAxis = userOptions.yAxis;
99
+ if (!userYAxis || Array.isArray(userYAxis)) {
100
+ return userOptions;
101
+ }
102
+ return {
103
+ ...userOptions,
104
+ yAxis: [userYAxis, {}]
105
+ };
106
+ }, [userOptions]);
107
+ const chartOptions = (0, _charts.mergeChartUserOptions)(defaultChartOptions, {
108
+ series: comboSeries,
109
+ drilldown: comboDrilldown,
110
+ ...userOptionsWithNormalizedAxis
111
+ });
112
+ const {
113
+ highChart,
114
+ ...wrapperClassNames
115
+ } = classNames || {};
116
+ return /*#__PURE__*/(0, _jsxRuntime.jsx)(_ChartWrapper.ChartWrapper, {
117
+ ref: chartRef,
118
+ title: cardTitle,
119
+ isLoading: isLoading,
120
+ emptyText: emptyText,
121
+ classNames: wrapperClassNames,
122
+ hasEmptyData: hasEmptyData,
123
+ headerActions: headerActions,
124
+ customExportOptions: customExportOptions,
125
+ testId: testId,
126
+ children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_highchartsReactOfficial.default, {
127
+ highcharts: _highcharts.default,
128
+ containerProps: {
129
+ className: (0, _classify.default)(_StackedBarLineChartModule.default.stackedBarLineChartContainer, highChart)
130
+ },
131
+ ref: chartRef,
132
+ options: chartOptions
133
+ })
134
+ });
135
+ };
136
+ exports.StackedBarLineChart = StackedBarLineChart;
@@ -0,0 +1,22 @@
1
+ @value (
2
+ size400,
3
+ size540,
4
+ size660,
5
+ size880,
6
+ sizeFluid
7
+ ) from '../../../styles/variables/_size.css';
8
+
9
+ .wrapper {
10
+ display: flex;
11
+ }
12
+
13
+ .stackedBarLineChartContainer {
14
+ display: flex;
15
+ align-items: center;
16
+ justify-content: center;
17
+ width: sizeFluid;
18
+ min-width: size660;
19
+ max-width: size880;
20
+ min-height: size400;
21
+ max-height: size540;
22
+ }
@@ -0,0 +1,2 @@
1
+ export * from '../../../components/Charts/StackedBarLineChart/StackedBarLineChart';
2
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/Charts/StackedBarLineChart/index.ts"],"names":[],"mappings":"AAAA,cAAc,+DAA+D,CAAC"}
@@ -0,0 +1,16 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ var _StackedBarLineChart = require("./StackedBarLineChart");
7
+ Object.keys(_StackedBarLineChart).forEach(function (key) {
8
+ if (key === "default" || key === "__esModule") return;
9
+ if (key in exports && exports[key] === _StackedBarLineChart[key]) return;
10
+ Object.defineProperty(exports, key, {
11
+ enumerable: true,
12
+ get: function () {
13
+ return _StackedBarLineChart[key];
14
+ }
15
+ });
16
+ });
@@ -1,5 +1,5 @@
1
1
  import * as React from 'react';
2
- import type { CategoricalChartKind, ChartKindOptionType, FlowChartKind, ProportionChartKind, UniversalChartProps } from '../../../components/Charts/UniversalChart/UniversalChart.types';
2
+ import type { CategoricalChartKind, ChartKindOptionType, ComboChartKind, FlowChartKind, ProportionChartKind, UniversalChartProps } from '../../../components/Charts/UniversalChart/UniversalChart.types';
3
3
  export declare const CHART_KIND_OPTIONS: Readonly<{
4
4
  column: ChartKindOptionType<"column">;
5
5
  line: ChartKindOptionType<"line">;
@@ -8,13 +8,15 @@ export declare const CHART_KIND_OPTIONS: Readonly<{
8
8
  sankey: ChartKindOptionType<"sankey">;
9
9
  spider: ChartKindOptionType<"spider">;
10
10
  stackedBar: ChartKindOptionType<"stackedBar">;
11
+ stackedBarLine: ChartKindOptionType<"stackedBarLine">;
11
12
  }>;
12
13
  export declare const CHART_KIND_GROUPS: Readonly<{
13
14
  CATEGORICAL: Array<ChartKindOptionType<CategoricalChartKind>>;
14
15
  PROPORTION: Array<ChartKindOptionType<ProportionChartKind>>;
15
16
  FLOW: Array<ChartKindOptionType<FlowChartKind>>;
17
+ COMBO: Array<ChartKindOptionType<ComboChartKind>>;
16
18
  }>;
17
- export type { UniversalChartProps, ChartKind, ChartKindOptionType, ChartKindSelectorProps, CategoricalChartKind, ProportionChartKind, FlowChartKind, } from '../../../components/Charts/UniversalChart/UniversalChart.types';
19
+ export type { UniversalChartProps, ChartKind, ChartKindOptionType, ChartKindSelectorProps, CategoricalChartKind, ProportionChartKind, FlowChartKind, ComboChartKind, } from '../../../components/Charts/UniversalChart/UniversalChart.types';
18
20
  export declare const UniversalChart: {
19
21
  (props: UniversalChartProps): React.JSX.Element;
20
22
  displayName: string;
@@ -1 +1 @@
1
- {"version":3,"file":"UniversalChart.d.ts","sourceRoot":"","sources":["../../../../src/components/Charts/UniversalChart/UniversalChart.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAkB/B,OAAO,KAAK,EACV,oBAAoB,EAEpB,mBAAmB,EACnB,aAAa,EACb,mBAAmB,EACnB,mBAAmB,EACpB,MAAM,2DAA2D,CAAC;AAOnE,eAAO,MAAM,kBAAkB;YAIxB,mBAAmB,CAAC,QAAQ,CAAC;UACU,mBAAmB,CAAC,MAAM,CAAC;WACxB,mBAAmB,CAAC,OAAO,CAAC;YAItE,mBAAmB,CAAC,QAAQ,CAAC;YAI7B,mBAAmB,CAAC,QAAQ,CAAC;YAI7B,mBAAmB,CAAC,QAAQ,CAAC;gBAI7B,mBAAmB,CAAC,YAAY,CAAC;EACtC,CAAC;AAEH,eAAO,MAAM,iBAAiB;iBAMvB,KAAK,CAAC,mBAAmB,CAAC,oBAAoB,CAAC,CAAC;gBACgB,KAAK,CACxE,mBAAmB,CAAC,mBAAmB,CAAC,CACzC;UACoC,KAAK,CACxC,mBAAmB,CAAC,aAAa,CAAC,CACnC;EACD,CAAC;AAmBH,YAAY,EACV,mBAAmB,EACnB,SAAS,EACT,mBAAmB,EACnB,sBAAsB,EACtB,oBAAoB,EACpB,mBAAmB,EACnB,aAAa,GACd,MAAM,2DAA2D,CAAC;AAEnE,eAAO,MAAM,cAAc;YAAW,mBAAmB;;CA6OxD,CAAC"}
1
+ {"version":3,"file":"UniversalChart.d.ts","sourceRoot":"","sources":["../../../../src/components/Charts/UniversalChart/UniversalChart.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAmB/B,OAAO,KAAK,EACV,oBAAoB,EAEpB,mBAAmB,EACnB,cAAc,EACd,aAAa,EACb,mBAAmB,EACnB,mBAAmB,EACpB,MAAM,2DAA2D,CAAC;AAOnE,eAAO,MAAM,kBAAkB;YAIxB,mBAAmB,CAAC,QAAQ,CAAC;UACU,mBAAmB,CAAC,MAAM,CAAC;WACxB,mBAAmB,CAAC,OAAO,CAAC;YAItE,mBAAmB,CAAC,QAAQ,CAAC;YAI7B,mBAAmB,CAAC,QAAQ,CAAC;YAI7B,mBAAmB,CAAC,QAAQ,CAAC;gBAI7B,mBAAmB,CAAC,YAAY,CAAC;oBAIjC,mBAAmB,CAAC,gBAAgB,CAAC;EAC1C,CAAC;AAEH,eAAO,MAAM,iBAAiB;iBAMvB,KAAK,CAAC,mBAAmB,CAAC,oBAAoB,CAAC,CAAC;gBACgB,KAAK,CACxE,mBAAmB,CAAC,mBAAmB,CAAC,CACzC;UACoC,KAAK,CACxC,mBAAmB,CAAC,aAAa,CAAC,CACnC;WAC6C,KAAK,CACjD,mBAAmB,CAAC,cAAc,CAAC,CACpC;EACD,CAAC;AAmBH,YAAY,EACV,mBAAmB,EACnB,SAAS,EACT,mBAAmB,EACnB,sBAAsB,EACtB,oBAAoB,EACpB,mBAAmB,EACnB,aAAa,EACb,cAAc,GACf,MAAM,2DAA2D,CAAC;AAEnE,eAAO,MAAM,cAAc;YAAW,mBAAmB;;CAiQxD,CAAC"}
@@ -17,6 +17,7 @@ var _LineChart = require("../LineChart");
17
17
  var _SankeyChart = require("../SankeyChart");
18
18
  var _SpiderChart = require("../SpiderChart");
19
19
  var _StackedBarChart = require("../StackedBarChart");
20
+ var _StackedBarLineChart = require("../StackedBarLineChart");
20
21
  var _EmptyState = require("../../EmptyState");
21
22
  var _UniversalChartModule = _interopRequireDefault(require("./UniversalChart.module.css"));
22
23
  var _jsxRuntime = require("react/jsx-runtime");
@@ -50,12 +51,17 @@ const CHART_KIND_OPTIONS = exports.CHART_KIND_OPTIONS = Object.freeze({
50
51
  stackedBar: {
51
52
  key: 'stackedBar',
52
53
  label: 'Stacked Bar Chart'
54
+ },
55
+ stackedBarLine: {
56
+ key: 'stackedBarLine',
57
+ label: 'Stacked Bar + Line Chart'
53
58
  }
54
59
  });
55
60
  const CHART_KIND_GROUPS = exports.CHART_KIND_GROUPS = Object.freeze({
56
61
  CATEGORICAL: [CHART_KIND_OPTIONS.column, CHART_KIND_OPTIONS.line, CHART_KIND_OPTIONS.stackedBar, CHART_KIND_OPTIONS.spider],
57
62
  PROPORTION: [CHART_KIND_OPTIONS.donut, CHART_KIND_OPTIONS.funnel],
58
- FLOW: [CHART_KIND_OPTIONS.sankey]
63
+ FLOW: [CHART_KIND_OPTIONS.sankey],
64
+ COMBO: [CHART_KIND_OPTIONS.stackedBarLine]
59
65
  });
60
66
  const sortSeriesDescending = series => series.map(item => ({
61
67
  ...item,
@@ -101,7 +107,9 @@ const UniversalChart = props => {
101
107
  label
102
108
  };
103
109
  });
104
- return options.length > 0 ? options : undefined;
110
+ // Hide the switcher when there's only one option (or none) — a single-option
111
+ // dropdown is a no-op and confuses users.
112
+ return options.length > 1 ? options : undefined;
105
113
  }, [showChartKindSwitcher, chartKindOptions, chartKind]);
106
114
  const handleChartKindSelect = React.useCallback(option => {
107
115
  onChartKindChange?.(option.key);
@@ -255,6 +263,23 @@ const UniversalChart = props => {
255
263
  classNames: responsiveClassNames
256
264
  });
257
265
  }
266
+ case 'stackedBarLine':
267
+ {
268
+ const {
269
+ chartKind: _chartKind,
270
+ showChartKindSwitcher: _showChartKindSwitcher,
271
+ chartKindOptions: _chartKindOptions,
272
+ onChartKindChange: _onChartKindChange,
273
+ responsive: _responsive,
274
+ ...rest
275
+ } = props;
276
+ return /*#__PURE__*/(0, _jsxRuntime.jsx)(_StackedBarLineChart.StackedBarLineChart, {
277
+ ...rest,
278
+ chart: responsiveChart,
279
+ headerActions: combinedHeaderActions,
280
+ classNames: responsiveClassNames
281
+ });
282
+ }
258
283
  default:
259
284
  {
260
285
  const _exhaustive = props;
@@ -5,17 +5,19 @@ import type { LineChartProps } from '../../../components/Charts/LineChart';
5
5
  import type { SankeyChartProps } from '../../../components/Charts/SankeyChart';
6
6
  import type { SpiderChartProps } from '../../../components/Charts/SpiderChart';
7
7
  import type { StackedBarChartProps } from '../../../components/Charts/StackedBarChart';
8
- export type ChartKind = 'column' | 'line' | 'donut' | 'funnel' | 'sankey' | 'spider' | 'stackedBar';
8
+ import type { StackedBarLineChartProps } from '../../../components/Charts/StackedBarLineChart';
9
+ export type ChartKind = 'column' | 'line' | 'donut' | 'funnel' | 'sankey' | 'spider' | 'stackedBar' | 'stackedBarLine';
9
10
  export type CategoricalChartKind = 'column' | 'line' | 'stackedBar' | 'spider';
10
11
  export type ProportionChartKind = 'donut' | 'funnel';
11
12
  export type FlowChartKind = 'sankey';
13
+ export type ComboChartKind = 'stackedBarLine';
12
14
  export interface ChartKindOptionType<K extends ChartKind = ChartKind> {
13
15
  key: K;
14
16
  label: string;
15
17
  }
16
18
  export interface ChartKindSelectorProps {
17
19
  showChartKindSwitcher?: boolean;
18
- chartKindOptions?: Array<ChartKindOptionType<CategoricalChartKind>> | Array<ChartKindOptionType<ProportionChartKind>> | Array<ChartKindOptionType<FlowChartKind>>;
20
+ chartKindOptions?: Array<ChartKindOptionType<CategoricalChartKind>> | Array<ChartKindOptionType<ProportionChartKind>> | Array<ChartKindOptionType<FlowChartKind>> | Array<ChartKindOptionType<ComboChartKind>>;
19
21
  onChartKindChange?: (chartKind: ChartKind) => void;
20
22
  responsive?: boolean;
21
23
  }
@@ -33,5 +35,7 @@ export type UniversalChartProps = (({
33
35
  chartKind: 'spider';
34
36
  } & SpiderChartProps) | ({
35
37
  chartKind: 'stackedBar';
36
- } & StackedBarChartProps)) & ChartKindSelectorProps;
38
+ } & StackedBarChartProps) | ({
39
+ chartKind: 'stackedBarLine';
40
+ } & StackedBarLineChartProps)) & ChartKindSelectorProps;
37
41
  //# sourceMappingURL=UniversalChart.types.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"UniversalChart.types.d.ts","sourceRoot":"","sources":["../../../../src/components/Charts/UniversalChart/UniversalChart.types.ts"],"names":[],"mappings":"AAAA,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AAC,SAAS,EAAE,QAAQ,CAAA;CAAC,GAAG,gBAAgB,CAAC,GAC1C,CAAC;IAAC,SAAS,EAAE,MAAM,CAAA;CAAC,GAAG,cAAc,CAAC,GACtC,CAAC;IAAC,SAAS,EAAE,OAAO,CAAA;CAAC,GAAG,eAAe,CAAC,GACxC,CAAC;IAAC,SAAS,EAAE,QAAQ,CAAA;CAAC,GAAG,gBAAgB,CAAC,GAC1C,CAAC;IAAC,SAAS,EAAE,QAAQ,CAAA;CAAC,GAAG,gBAAgB,CAAC,GAC1C,CAAC;IAAC,SAAS,EAAE,QAAQ,CAAA;CAAC,GAAG,gBAAgB,CAAC,GAC1C,CAAC;IAAC,SAAS,EAAE,YAAY,CAAA;CAAC,GAAG,oBAAoB,CAAC,CACrD,GACC,sBAAsB,CAAC"}
1
+ {"version":3,"file":"UniversalChart.types.d.ts","sourceRoot":"","sources":["../../../../src/components/Charts/UniversalChart/UniversalChart.types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAC,gBAAgB,EAAC,MAAM,mCAAmC,CAAC;AACxE,OAAO,KAAK,EAAC,eAAe,EAAC,MAAM,kCAAkC,CAAC;AACtE,OAAO,KAAK,EAAC,gBAAgB,EAAC,MAAM,mCAAmC,CAAC;AACxE,OAAO,KAAK,EAAC,cAAc,EAAC,MAAM,iCAAiC,CAAC;AACpE,OAAO,KAAK,EAAC,gBAAgB,EAAC,MAAM,mCAAmC,CAAC;AACxE,OAAO,KAAK,EAAC,gBAAgB,EAAC,MAAM,mCAAmC,CAAC;AACxE,OAAO,KAAK,EAAC,oBAAoB,EAAC,MAAM,uCAAuC,CAAC;AAChF,OAAO,KAAK,EAAC,wBAAwB,EAAC,MAAM,2CAA2C,CAAC;AAGxF,MAAM,MAAM,SAAS,GACjB,QAAQ,GACR,MAAM,GACN,OAAO,GACP,QAAQ,GACR,QAAQ,GACR,QAAQ,GACR,YAAY,GACZ,gBAAgB,CAAC;AAErB,MAAM,MAAM,oBAAoB,GAAG,QAAQ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oBAAoB,CAAC,GAClD,CAAC;IAAC,SAAS,EAAE,gBAAgB,CAAA;CAAC,GAAG,wBAAwB,CAAC,CAC7D,GACC,sBAAsB,CAAC"}
@@ -7,5 +7,6 @@ export * from '../../components/Charts/LineChart';
7
7
  export * from '../../components/Charts/SankeyChart';
8
8
  export * from '../../components/Charts/SpiderChart';
9
9
  export * from '../../components/Charts/StackedBarChart';
10
+ export * from '../../components/Charts/StackedBarLineChart';
10
11
  export * from '../../components/Charts/UniversalChart';
11
12
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/Charts/index.ts"],"names":[],"mappings":"AAAA,cAAc,oCAAoC,CAAC;AACnD,cAAc,oCAAoC,CAAC;AACnD,cAAc,mCAAmC,CAAC;AAClD,cAAc,kCAAkC,CAAC;AACjD,cAAc,mCAAmC,CAAC;AAClD,cAAc,iCAAiC,CAAC;AAChD,cAAc,mCAAmC,CAAC;AAClD,cAAc,mCAAmC,CAAC;AAClD,cAAc,uCAAuC,CAAC;AACtD,cAAc,sCAAsC,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/Charts/index.ts"],"names":[],"mappings":"AAAA,cAAc,oCAAoC,CAAC;AACnD,cAAc,oCAAoC,CAAC;AACnD,cAAc,mCAAmC,CAAC;AAClD,cAAc,kCAAkC,CAAC;AACjD,cAAc,mCAAmC,CAAC;AAClD,cAAc,iCAAiC,CAAC;AAChD,cAAc,mCAAmC,CAAC;AAClD,cAAc,mCAAmC,CAAC;AAClD,cAAc,uCAAuC,CAAC;AACtD,cAAc,2CAA2C,CAAC;AAC1D,cAAc,sCAAsC,CAAC"}
@@ -102,6 +102,17 @@ Object.keys(_StackedBarChart).forEach(function (key) {
102
102
  }
103
103
  });
104
104
  });
105
+ var _StackedBarLineChart = require("./StackedBarLineChart");
106
+ Object.keys(_StackedBarLineChart).forEach(function (key) {
107
+ if (key === "default" || key === "__esModule") return;
108
+ if (key in exports && exports[key] === _StackedBarLineChart[key]) return;
109
+ Object.defineProperty(exports, key, {
110
+ enumerable: true,
111
+ get: function () {
112
+ return _StackedBarLineChart[key];
113
+ }
114
+ });
115
+ });
105
116
  var _UniversalChart = require("./UniversalChart");
106
117
  Object.keys(_UniversalChart).forEach(function (key) {
107
118
  if (key === "default" || key === "__esModule") return;
@@ -143,7 +143,7 @@ const MENU_NAME_LIST = exports.MENU_NAME_LIST = Object.freeze({
143
143
  'ai-team': {
144
144
  title: 'AI Team',
145
145
  iconName: 'sparkle',
146
- iconType: 'duotone'
146
+ iconType: 'solid'
147
147
  },
148
148
  tracking: {
149
149
  title: 'Tracking',
@@ -7,5 +7,6 @@ export * from '../../utils/charts/lineChart';
7
7
  export * from '../../utils/charts/sankeyChart';
8
8
  export * from '../../utils/charts/spiderChart';
9
9
  export * from '../../utils/charts/stackedBarChart';
10
+ export * from '../../utils/charts/stackedBarLineChart';
10
11
  export * from '../../utils/charts/typography';
11
12
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/utils/charts/index.ts"],"names":[],"mappings":"AAAA,cAAc,yBAAyB,CAAC;AACxC,cAAc,8BAA8B,CAAC;AAC7C,cAAc,6BAA6B,CAAC;AAC5C,cAAc,8BAA8B,CAAC;AAC7C,cAAc,0BAA0B,CAAC;AACzC,cAAc,4BAA4B,CAAC;AAC3C,cAAc,8BAA8B,CAAC;AAC7C,cAAc,8BAA8B,CAAC;AAC7C,cAAc,kCAAkC,CAAC;AACjD,cAAc,6BAA6B,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/utils/charts/index.ts"],"names":[],"mappings":"AAAA,cAAc,yBAAyB,CAAC;AACxC,cAAc,8BAA8B,CAAC;AAC7C,cAAc,6BAA6B,CAAC;AAC5C,cAAc,8BAA8B,CAAC;AAC7C,cAAc,0BAA0B,CAAC;AACzC,cAAc,4BAA4B,CAAC;AAC3C,cAAc,8BAA8B,CAAC;AAC7C,cAAc,8BAA8B,CAAC;AAC7C,cAAc,kCAAkC,CAAC;AACjD,cAAc,sCAAsC,CAAC;AACrD,cAAc,6BAA6B,CAAC"}
@@ -102,6 +102,17 @@ Object.keys(_stackedBarChart).forEach(function (key) {
102
102
  }
103
103
  });
104
104
  });
105
+ var _stackedBarLineChart = require("./stackedBarLineChart");
106
+ Object.keys(_stackedBarLineChart).forEach(function (key) {
107
+ if (key === "default" || key === "__esModule") return;
108
+ if (key in exports && exports[key] === _stackedBarLineChart[key]) return;
109
+ Object.defineProperty(exports, key, {
110
+ enumerable: true,
111
+ get: function () {
112
+ return _stackedBarLineChart[key];
113
+ }
114
+ });
115
+ });
105
116
  var _typography = require("./typography");
106
117
  Object.keys(_typography).forEach(function (key) {
107
118
  if (key === "default" || key === "__esModule") return;
@@ -0,0 +1,3 @@
1
+ import type { ChartOptions } from '../../types/charts';
2
+ export declare const getStackedBarLineChartOptions: () => ChartOptions;
3
+ //# sourceMappingURL=stackedBarLineChart.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"stackedBarLineChart.d.ts","sourceRoot":"","sources":["../../../src/utils/charts/stackedBarLineChart.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAC,YAAY,EAAC,MAAM,kBAAkB,CAAC;AAanD,eAAO,MAAM,6BAA6B,QAAO,YA+D/C,CAAC"}
@@ -0,0 +1,74 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.getStackedBarLineChartOptions = void 0;
7
+ var _color = require("../../styles/variables/_color");
8
+ var _charts = require("./charts");
9
+ var _columnChart = require("./columnChart");
10
+ var _helpers = require("./helpers");
11
+ const getStackedBarLineChartOptions = () => ({
12
+ ..._charts.commonChartOptions,
13
+ chart: {
14
+ ..._charts.commonChartOptions.chart,
15
+ type: 'column'
16
+ },
17
+ legend: {
18
+ ..._charts.commonChartOptions.legend,
19
+ ..._helpers.bottomLegendRow,
20
+ symbolWidth: 18
21
+ },
22
+ xAxis: {
23
+ ..._charts.commonChartOptions.xAxis,
24
+ labels: {
25
+ style: _helpers.xAxisLabelStyle
26
+ },
27
+ title: {
28
+ margin: 12,
29
+ style: _helpers.xAxisTitleStyle
30
+ },
31
+ lineColor: _color.colorBorderPrimary
32
+ },
33
+ // Primary axis on the left and a linked mirror axis on the right. Both
34
+ // render the same scale (`linkedTo: 0`), so consumers see the y-axis
35
+ // labels on both edges of the plot. The right axis hides its title and
36
+ // grid lines to avoid duplication with the primary.
37
+ yAxis: [{
38
+ labels: {
39
+ align: 'right',
40
+ distance: 12,
41
+ style: _helpers.yAxisLabelStyle
42
+ },
43
+ title: {
44
+ margin: 12,
45
+ style: _helpers.yAxisTitleStyle
46
+ }
47
+ }, {
48
+ opposite: true,
49
+ linkedTo: 0,
50
+ gridLineWidth: 0,
51
+ labels: {
52
+ align: 'left',
53
+ distance: 12,
54
+ style: _helpers.yAxisLabelStyle
55
+ },
56
+ title: {
57
+ text: undefined
58
+ }
59
+ }],
60
+ plotOptions: {
61
+ column: {
62
+ stacking: 'normal',
63
+ pointWidth: _columnChart.columnPlotWidth
64
+ }
65
+ },
66
+ drilldown: {
67
+ activeAxisLabelStyle: _helpers.activeLabelStyle,
68
+ activeDataLabelStyle: _helpers.activeLabelStyle,
69
+ breadcrumbs: {
70
+ floating: true
71
+ }
72
+ }
73
+ });
74
+ exports.getStackedBarLineChartOptions = getStackedBarLineChartOptions;
package/mcp/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@spaced-out/genesis-mcp",
3
- "version": "1.0.32",
3
+ "version": "1.0.34",
4
4
  "description": "MCP server for Genesis UI Design System - provides AI assistants with access to components, hooks, and design tokens",
5
5
  "type": "module",
6
6
  "main": "index.js",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@spaced-out/ui-design-system",
3
- "version": "0.6.20",
3
+ "version": "0.6.22",
4
4
  "description": "Sense UI components library",
5
5
  "author": {
6
6
  "name": "Spaced Out"