@spaced-out/ui-design-system 0.6.21 → 0.6.23
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.
- package/CHANGELOG.md +19 -0
- package/lib/components/Charts/StackedBarChart/StackedBarChart.d.ts +7 -1
- package/lib/components/Charts/StackedBarChart/StackedBarChart.d.ts.map +1 -1
- package/lib/components/Charts/StackedBarChart/StackedBarChart.js +2 -1
- package/lib/components/Charts/UniversalChart/UniversalChart.d.ts.map +1 -1
- package/lib/components/Charts/UniversalChart/UniversalChart.js +5 -0
- package/lib/components/SideMenuLink/SideMenuLink.js +1 -1
- package/lib/components/Stepper/Step/Step.d.ts +1 -0
- package/lib/components/Stepper/Step/Step.d.ts.map +1 -1
- package/lib/components/Stepper/Step/Step.js +46 -30
- package/lib/components/Stepper/Stepper.d.ts.map +1 -1
- package/lib/components/Stepper/Stepper.js +1 -0
- package/lib/components/Stepper/Stepper.module.css +42 -3
- package/lib/utils/charts/stackedBarChart.d.ts +9 -1
- package/lib/utils/charts/stackedBarChart.d.ts.map +1 -1
- package/lib/utils/charts/stackedBarChart.js +48 -37
- package/mcp/package.json +1 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,25 @@
|
|
|
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.23](https://github.com/spaced-out/ui-design-system/compare/v0.6.22...v0.6.23) (2026-06-25)
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
### Features
|
|
9
|
+
|
|
10
|
+
* add orientation support to stacked bar chart ([#493](https://github.com/spaced-out/ui-design-system/issues/493)) ([bdfa079](https://github.com/spaced-out/ui-design-system/commit/bdfa0794940baa2929bbd046fe8e79a69a5b76e8))
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
### Bug Fixes
|
|
14
|
+
|
|
15
|
+
* Stepper [GDS-554] Stepper component enhancements ([#487](https://github.com/spaced-out/ui-design-system/issues/487)) ([802e239](https://github.com/spaced-out/ui-design-system/commit/802e2398294e36c27f2f36e065ec9e534fcd652f))
|
|
16
|
+
|
|
17
|
+
### [0.6.22](https://github.com/spaced-out/ui-design-system/compare/v0.6.21...v0.6.22) (2026-06-08)
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
### Bug Fixes
|
|
21
|
+
|
|
22
|
+
* 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))
|
|
23
|
+
|
|
5
24
|
### [0.6.21](https://github.com/spaced-out/ui-design-system/compare/v0.6.20...v0.6.21) (2026-06-04)
|
|
6
25
|
|
|
7
26
|
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import type { SeriesColumnOptions } from 'highcharts';
|
|
3
3
|
import type { ChartOptions, DataOptionsType, Drilldown } from '../../../types/charts';
|
|
4
|
+
import type { StackedBarOrientation } from '../../../utils/charts';
|
|
4
5
|
import type { ChartWrapperClassNames, ExportOptionType } from '../../../components/Charts/ChartWrapper';
|
|
5
6
|
type ClassNames = Readonly<ChartWrapperClassNames & {
|
|
6
7
|
highChart?: string;
|
|
@@ -11,6 +12,11 @@ export type StackedBarSeries = Omit<SeriesColumnOptions, 'data' | 'type'> & {
|
|
|
11
12
|
};
|
|
12
13
|
export interface StackedBarChartProps extends Omit<ChartOptions, 'series' | 'isLoading' | 'drilldown' | 'cardTitle' | 'emptyText' | 'classNames' | 'hasEmptyData' | 'headerActions' | 'customExportOptions'> {
|
|
13
14
|
series: Array<StackedBarSeries>;
|
|
15
|
+
/**
|
|
16
|
+
* Orientation of the stacked bars. Defaults to `horizontal`.
|
|
17
|
+
* Pass `vertical` to render columns with categories on the x-axis.
|
|
18
|
+
*/
|
|
19
|
+
orientation?: StackedBarOrientation;
|
|
14
20
|
isLoading?: boolean;
|
|
15
21
|
drilldown?: Drilldown;
|
|
16
22
|
cardTitle?: React.ReactNode;
|
|
@@ -21,6 +27,6 @@ export interface StackedBarChartProps extends Omit<ChartOptions, 'series' | 'isL
|
|
|
21
27
|
customExportOptions?: Array<ExportOptionType> | null;
|
|
22
28
|
testId?: string;
|
|
23
29
|
}
|
|
24
|
-
export declare const StackedBarChart: ({ series, isLoading, drilldown, emptyText, cardTitle, classNames, hasEmptyData, headerActions, customExportOptions, testId, ...userOptions }: StackedBarChartProps) => React.ReactNode;
|
|
30
|
+
export declare const StackedBarChart: ({ series, orientation, isLoading, drilldown, emptyText, cardTitle, classNames, hasEmptyData, headerActions, customExportOptions, testId, ...userOptions }: StackedBarChartProps) => React.ReactNode;
|
|
25
31
|
export {};
|
|
26
32
|
//# sourceMappingURL=StackedBarChart.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"StackedBarChart.d.ts","sourceRoot":"","sources":["../../../../src/components/Charts/StackedBarChart/StackedBarChart.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,KAAK,EAAC,mBAAmB,EAAC,MAAM,YAAY,CAAC;AAKpD,OAAO,KAAK,EAAC,YAAY,EAAE,eAAe,EAAE,SAAS,EAAC,MAAM,kBAAkB,CAAC;
|
|
1
|
+
{"version":3,"file":"StackedBarChart.d.ts","sourceRoot":"","sources":["../../../../src/components/Charts/StackedBarChart/StackedBarChart.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,KAAK,EAAC,mBAAmB,EAAC,MAAM,YAAY,CAAC;AAKpD,OAAO,KAAK,EAAC,YAAY,EAAE,eAAe,EAAE,SAAS,EAAC,MAAM,kBAAkB,CAAC;AAC/E,OAAO,KAAK,EAAC,qBAAqB,EAAC,MAAM,kBAAkB,CAAC;AAS5D,OAAO,KAAK,EACV,sBAAsB,EACtB,gBAAgB,EACjB,MAAM,oCAAoC,CAAC;AAe5C,KAAK,UAAU,GAAG,QAAQ,CACxB,sBAAsB,GAAG;IACvB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB,CACF,CAAC;AAEF,MAAM,MAAM,gBAAgB,GAAG,IAAI,CAAC,mBAAmB,EAAE,MAAM,GAAG,MAAM,CAAC,GAAG;IAC1E,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,eAAe,EAAE,CAAC;CACzB,CAAC;AAEF,MAAM,WAAW,oBACf,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,gBAAgB,CAAC,CAAC;IAChC;;;OAGG;IACH,WAAW,CAAC,EAAE,qBAAqB,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;AAED,eAAO,MAAM,eAAe,GAAI,2JAa7B,oBAAoB,KAAG,KAAK,CAAC,SAqD/B,CAAC"}
|
|
@@ -21,6 +21,7 @@ if (!!_highchartsMore.default && !!_highcharts.default && typeof _highchartsMore
|
|
|
21
21
|
const StackedBarChart = _ref => {
|
|
22
22
|
let {
|
|
23
23
|
series,
|
|
24
|
+
orientation = 'horizontal',
|
|
24
25
|
isLoading,
|
|
25
26
|
drilldown,
|
|
26
27
|
emptyText,
|
|
@@ -40,7 +41,7 @@ const StackedBarChart = _ref => {
|
|
|
40
41
|
stacking: 'normal',
|
|
41
42
|
pointWidth: _charts.columnPlotWidth
|
|
42
43
|
}));
|
|
43
|
-
const defaultStackedBarChartOptions = (0, _charts.getStackedBarChartOptions)();
|
|
44
|
+
const defaultStackedBarChartOptions = (0, _charts.getStackedBarChartOptions)(orientation);
|
|
44
45
|
const stackedBarDrilldown = drilldown ? {
|
|
45
46
|
...drilldown,
|
|
46
47
|
breadcrumbs: {
|
|
@@ -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;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;;
|
|
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;;CAsQxD,CAAC"}
|
|
@@ -254,10 +254,15 @@ const UniversalChart = props => {
|
|
|
254
254
|
chartKindOptions: _chartKindOptions,
|
|
255
255
|
onChartKindChange: _onChartKindChange,
|
|
256
256
|
responsive: _responsive,
|
|
257
|
+
orientation,
|
|
257
258
|
...rest
|
|
258
259
|
} = props;
|
|
259
260
|
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_StackedBarChart.StackedBarChart, {
|
|
260
261
|
...rest,
|
|
262
|
+
// UniversalChart renders stacked bars vertically by default
|
|
263
|
+
// (categories on the x-axis); consumers can still opt back into
|
|
264
|
+
// horizontal via `orientation`.
|
|
265
|
+
orientation: orientation ?? 'vertical',
|
|
261
266
|
chart: responsiveChart,
|
|
262
267
|
headerActions: combinedHeaderActions,
|
|
263
268
|
classNames: responsiveClassNames
|
|
@@ -19,6 +19,7 @@ export interface StepProps {
|
|
|
19
19
|
onClick?: (idx: number, e?: React.SyntheticEvent<HTMLElement> | null | undefined) => unknown;
|
|
20
20
|
iconName?: string;
|
|
21
21
|
iconType?: IconType;
|
|
22
|
+
orientation?: 'horizontal' | 'vertical';
|
|
22
23
|
testId?: string;
|
|
23
24
|
}
|
|
24
25
|
export declare const Step: Flow.AbstractComponent<StepProps, HTMLDivElement>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Step.d.ts","sourceRoot":"","sources":["../../../../src/components/Stepper/Step/Step.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,KAAK,EAAC,IAAI,EAAC,MAAM,4BAA4B,CAAC;AAKrD,OAAO,KAAK,EAAC,QAAQ,EAAC,MAAM,qBAAqB,CAAC;
|
|
1
|
+
{"version":3,"file":"Step.d.ts","sourceRoot":"","sources":["../../../../src/components/Stepper/Step/Step.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,KAAK,EAAC,IAAI,EAAC,MAAM,4BAA4B,CAAC;AAKrD,OAAO,KAAK,EAAC,QAAQ,EAAC,MAAM,qBAAqB,CAAC;AAelD,KAAK,UAAU,GAAG,QAAQ,CAAC;IACzB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB,CAAC,CAAC;AAEH,MAAM,WAAW,SAAS;IACxB,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;IAC1B,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,UAAU,CAAC,EAAE,UAAU,CAAC;IACxB,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,OAAO,CAAC,EAAE,CACR,GAAG,EAAE,MAAM,EACX,CAAC,CAAC,EAAE,KAAK,CAAC,cAAc,CAAC,WAAW,CAAC,GAAG,IAAI,GAAG,SAAS,KACrD,OAAO,CAAC;IACb,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,QAAQ,CAAC,EAAE,QAAQ,CAAC;IACpB,WAAW,CAAC,EAAE,YAAY,GAAG,UAAU,CAAC;IACxC,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AAED,eAAO,MAAM,IAAI,EAAE,IAAI,CAAC,iBAAiB,CAAC,SAAS,EAAE,cAAc,CAuHhE,CAAC"}
|
|
@@ -8,6 +8,7 @@ var React = _interopRequireWildcard(require("react"));
|
|
|
8
8
|
var _classify = _interopRequireDefault(require("../../../utils/classify"));
|
|
9
9
|
var _qa = require("../../../utils/qa");
|
|
10
10
|
var _Icon = require("../../Icon");
|
|
11
|
+
var _Separator = require("../../Separator/Separator");
|
|
11
12
|
var _StepperModule = _interopRequireDefault(require("../Stepper.module.css"));
|
|
12
13
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
13
14
|
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
@@ -28,6 +29,7 @@ const Step = exports.Step = /*#__PURE__*/React.forwardRef((_ref, ref) => {
|
|
|
28
29
|
allowClick,
|
|
29
30
|
iconName,
|
|
30
31
|
iconType,
|
|
32
|
+
orientation = 'horizontal',
|
|
31
33
|
testId
|
|
32
34
|
} = _ref;
|
|
33
35
|
const childrenArray = React.Children.toArray(children).filter(Boolean);
|
|
@@ -47,6 +49,17 @@ const Step = exports.Step = /*#__PURE__*/React.forwardRef((_ref, ref) => {
|
|
|
47
49
|
return stepContent;
|
|
48
50
|
});
|
|
49
51
|
const handleClick = e => allowClick && onClick?.(index, e);
|
|
52
|
+
const isVertical = orientation === 'vertical';
|
|
53
|
+
const connector = !last && /*#__PURE__*/(0, _jsxRuntime.jsx)(_Separator.Separator, {
|
|
54
|
+
orientation: isVertical ? _Separator.ORIENTATION.vertical : _Separator.ORIENTATION.horizontal,
|
|
55
|
+
classNames: {
|
|
56
|
+
wrapper: _StepperModule.default.connector
|
|
57
|
+
},
|
|
58
|
+
testId: (0, _qa.generateTestId)({
|
|
59
|
+
base: testId,
|
|
60
|
+
slot: 'connector'
|
|
61
|
+
})
|
|
62
|
+
});
|
|
50
63
|
return /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
|
|
51
64
|
ref: ref,
|
|
52
65
|
className: (0, _classify.default)(_StepperModule.default.stepWrapper, {
|
|
@@ -62,40 +75,43 @@ const Step = exports.Step = /*#__PURE__*/React.forwardRef((_ref, ref) => {
|
|
|
62
75
|
base: testId,
|
|
63
76
|
slot: 'root'
|
|
64
77
|
}),
|
|
65
|
-
children: [/*#__PURE__*/(0, _jsxRuntime.
|
|
66
|
-
className:
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
}),
|
|
78
|
-
children: completed && !active ? /*#__PURE__*/(0, _jsxRuntime.jsx)(_Icon.Icon, {
|
|
79
|
-
name: "check",
|
|
80
|
-
type: _Icon.ICON_TYPE.solid,
|
|
81
|
-
size: _Icon.ICON_SIZE.small,
|
|
82
|
-
className: _StepperModule.default.stepIcon,
|
|
83
|
-
testId: (0, _qa.generateTestId)({
|
|
78
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
|
|
79
|
+
className: _StepperModule.default.stepCounterColumn,
|
|
80
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
81
|
+
className: (0, _classify.default)(_StepperModule.default.stepWrapperCounter, {
|
|
82
|
+
[_StepperModule.default.selected]: active,
|
|
83
|
+
[_StepperModule.default.completed]: completed,
|
|
84
|
+
[_StepperModule.default.expanded]: expanded,
|
|
85
|
+
[_StepperModule.default.last]: last,
|
|
86
|
+
[_StepperModule.default.disabled]: disabled,
|
|
87
|
+
[_StepperModule.default.withIcon]: !!iconName
|
|
88
|
+
}, classNames?.stepCounter),
|
|
89
|
+
"data-testid": (0, _qa.generateTestId)({
|
|
84
90
|
base: testId,
|
|
85
|
-
slot: '
|
|
86
|
-
})
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
className: _StepperModule.default.stepIcon,
|
|
91
|
+
slot: 'counter'
|
|
92
|
+
}),
|
|
93
|
+
children: completed && !active ? /*#__PURE__*/(0, _jsxRuntime.jsx)(_Icon.Icon, {
|
|
94
|
+
name: "check",
|
|
95
|
+
type: _Icon.ICON_TYPE.solid,
|
|
91
96
|
size: _Icon.ICON_SIZE.small,
|
|
92
|
-
|
|
97
|
+
className: _StepperModule.default.stepIcon,
|
|
93
98
|
testId: (0, _qa.generateTestId)({
|
|
94
99
|
base: testId,
|
|
95
|
-
slot: 'icon'
|
|
100
|
+
slot: 'check-icon'
|
|
96
101
|
})
|
|
97
|
-
}) : (
|
|
98
|
-
|
|
102
|
+
}) : /*#__PURE__*/(0, _jsxRuntime.jsx)(React.Fragment, {
|
|
103
|
+
children: iconName ? /*#__PURE__*/(0, _jsxRuntime.jsx)(_Icon.Icon, {
|
|
104
|
+
name: iconName,
|
|
105
|
+
className: _StepperModule.default.stepIcon,
|
|
106
|
+
size: _Icon.ICON_SIZE.small,
|
|
107
|
+
type: iconType,
|
|
108
|
+
testId: (0, _qa.generateTestId)({
|
|
109
|
+
base: testId,
|
|
110
|
+
slot: 'icon'
|
|
111
|
+
})
|
|
112
|
+
}) : (index + 1).toString()
|
|
113
|
+
})
|
|
114
|
+
}), isVertical && connector]
|
|
99
115
|
}), /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
100
116
|
className: (0, _classify.default)(_StepperModule.default.stepContent, classNames?.content),
|
|
101
117
|
"data-testid": (0, _qa.generateTestId)({
|
|
@@ -103,6 +119,6 @@ const Step = exports.Step = /*#__PURE__*/React.forwardRef((_ref, ref) => {
|
|
|
103
119
|
slot: 'content'
|
|
104
120
|
}),
|
|
105
121
|
children: stepContent
|
|
106
|
-
})]
|
|
122
|
+
}), !isVertical && connector]
|
|
107
123
|
});
|
|
108
124
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Stepper.d.ts","sourceRoot":"","sources":["../../../src/components/Stepper/Stepper.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,KAAK,EAAC,IAAI,EAAC,MAAM,4BAA4B,CAAC;AAQrD,KAAK,UAAU,GAAG,QAAQ,CAAC;IACzB,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB,CAAC,CAAC;AAkBH,MAAM,WAAW,YAAY;IAC3B,UAAU,CAAC,EAAE,UAAU,CAAC;IACxB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;IAC1B,WAAW,CAAC,EAAE,YAAY,GAAG,UAAU,CAAC;IACxC,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AAED,eAAO,MAAM,OAAO,EAAE,IAAI,CAAC,iBAAiB,CAAC,YAAY,EAAE,cAAc,
|
|
1
|
+
{"version":3,"file":"Stepper.d.ts","sourceRoot":"","sources":["../../../src/components/Stepper/Stepper.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,KAAK,EAAC,IAAI,EAAC,MAAM,4BAA4B,CAAC;AAQrD,KAAK,UAAU,GAAG,QAAQ,CAAC;IACzB,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB,CAAC,CAAC;AAkBH,MAAM,WAAW,YAAY;IAC3B,UAAU,CAAC,EAAE,UAAU,CAAC;IACxB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;IAC1B,WAAW,CAAC,EAAE,YAAY,GAAG,UAAU,CAAC;IACxC,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AAED,eAAO,MAAM,OAAO,EAAE,IAAI,CAAC,iBAAiB,CAAC,YAAY,EAAE,cAAc,CAuEtE,CAAC"}
|
|
@@ -58,6 +58,7 @@ const Stepper = exports.Stepper = /*#__PURE__*/React.forwardRef((_ref, ref) => {
|
|
|
58
58
|
active: index === activeStep,
|
|
59
59
|
allowClick: onClick && index !== activeStep && isLastStepCompleted,
|
|
60
60
|
disabled: disabledChild || disabled,
|
|
61
|
+
orientation,
|
|
61
62
|
testId: (0, _qa.generateTestId)({
|
|
62
63
|
base: testId,
|
|
63
64
|
slot: 'step',
|
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
@value (
|
|
2
2
|
colorFillPrimary,
|
|
3
3
|
colorFillSecondary,
|
|
4
|
-
|
|
5
|
-
colorBackgroundTertiary,
|
|
4
|
+
colorButtonFillPrimaryEnabled,
|
|
6
5
|
colorFillDisabled,
|
|
7
6
|
colorTextSecondary,
|
|
8
7
|
colorTextPrimary,
|
|
@@ -12,10 +11,13 @@
|
|
|
12
11
|
colorBorderSecondary
|
|
13
12
|
) from '../../styles/variables/_color.css';
|
|
14
13
|
@value (
|
|
14
|
+
size12,
|
|
15
15
|
size24,
|
|
16
16
|
sizeFluid
|
|
17
17
|
) from '../../styles/variables/_size.css';
|
|
18
18
|
@value (
|
|
19
|
+
spaceNone,
|
|
20
|
+
spaceLarge,
|
|
19
21
|
spaceMedium,
|
|
20
22
|
spaceSmall,
|
|
21
23
|
spaceXXSmall
|
|
@@ -34,7 +36,7 @@
|
|
|
34
36
|
|
|
35
37
|
.stepperWrapper.vertical {
|
|
36
38
|
flex-direction: column;
|
|
37
|
-
gap:
|
|
39
|
+
gap: spaceNone;
|
|
38
40
|
justify-content: initial;
|
|
39
41
|
}
|
|
40
42
|
|
|
@@ -74,6 +76,12 @@
|
|
|
74
76
|
color: colorTextClickable;
|
|
75
77
|
}
|
|
76
78
|
|
|
79
|
+
.stepWrapperCounter.completed.selected:not(.disabled) {
|
|
80
|
+
background-color: colorButtonFillPrimaryEnabled;
|
|
81
|
+
border: borderWidthPrimary solid transparent;
|
|
82
|
+
color: colorTextInversePrimary;
|
|
83
|
+
}
|
|
84
|
+
|
|
77
85
|
.stepWrapperCounter.disabled {
|
|
78
86
|
background-color: colorFillDisabled;
|
|
79
87
|
border: borderWidthPrimary solid transparent;
|
|
@@ -116,3 +124,34 @@
|
|
|
116
124
|
.clickable {
|
|
117
125
|
cursor: pointer;
|
|
118
126
|
}
|
|
127
|
+
|
|
128
|
+
.stepCounterColumn {
|
|
129
|
+
display: flex;
|
|
130
|
+
flex-direction: column;
|
|
131
|
+
align-items: center;
|
|
132
|
+
gap: spaceXXSmall;
|
|
133
|
+
}
|
|
134
|
+
|
|
135
|
+
.connector {
|
|
136
|
+
pointer-events: none;
|
|
137
|
+
}
|
|
138
|
+
|
|
139
|
+
.stepperWrapper.vertical .stepCounterColumn {
|
|
140
|
+
align-self: stretch;
|
|
141
|
+
}
|
|
142
|
+
|
|
143
|
+
.stepperWrapper.vertical .connector {
|
|
144
|
+
flex: 1;
|
|
145
|
+
width: calc(size2 / 2);
|
|
146
|
+
}
|
|
147
|
+
|
|
148
|
+
.stepperWrapper.vertical .stepWrapper:not(:last-child) .stepContent {
|
|
149
|
+
padding-bottom: spaceMedium;
|
|
150
|
+
}
|
|
151
|
+
|
|
152
|
+
.stepperWrapper:not(.vertical) .connector {
|
|
153
|
+
flex: 1;
|
|
154
|
+
align-self: flex-start;
|
|
155
|
+
margin-top: size12;
|
|
156
|
+
min-width: spaceLarge;
|
|
157
|
+
}
|
|
@@ -1,3 +1,11 @@
|
|
|
1
1
|
import type { ChartOptions } from '../../types/charts';
|
|
2
|
-
|
|
2
|
+
/**
|
|
3
|
+
* Orientation of the stacked bars.
|
|
4
|
+
* - `horizontal` (default): bars run left-to-right; categories on the vertical
|
|
5
|
+
* axis. Backed by Highcharts `chart.type: 'bar'` (an inverted chart).
|
|
6
|
+
* - `vertical`: bars run bottom-to-top; categories on the horizontal x-axis.
|
|
7
|
+
* Backed by Highcharts `chart.type: 'column'`.
|
|
8
|
+
*/
|
|
9
|
+
export type StackedBarOrientation = 'horizontal' | 'vertical';
|
|
10
|
+
export declare const getStackedBarChartOptions: (orientation?: StackedBarOrientation) => ChartOptions;
|
|
3
11
|
//# sourceMappingURL=stackedBarChart.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"stackedBarChart.d.ts","sourceRoot":"","sources":["../../../src/utils/charts/stackedBarChart.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAC,YAAY,EAAC,MAAM,kBAAkB,CAAC;
|
|
1
|
+
{"version":3,"file":"stackedBarChart.d.ts","sourceRoot":"","sources":["../../../src/utils/charts/stackedBarChart.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAC,YAAY,EAAC,MAAM,kBAAkB,CAAC;AAWnD;;;;;;GAMG;AACH,MAAM,MAAM,qBAAqB,GAAG,YAAY,GAAG,UAAU,CAAC;AAE9D,eAAO,MAAM,yBAAyB,GACpC,cAAa,qBAAoC,KAChD,YAwCD,CAAC"}
|
|
@@ -7,45 +7,56 @@ exports.getStackedBarChartOptions = void 0;
|
|
|
7
7
|
var _color = require("../../styles/variables/_color");
|
|
8
8
|
var _charts = require("./charts");
|
|
9
9
|
var _helpers = require("./helpers");
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
10
|
+
/**
|
|
11
|
+
* Orientation of the stacked bars.
|
|
12
|
+
* - `horizontal` (default): bars run left-to-right; categories on the vertical
|
|
13
|
+
* axis. Backed by Highcharts `chart.type: 'bar'` (an inverted chart).
|
|
14
|
+
* - `vertical`: bars run bottom-to-top; categories on the horizontal x-axis.
|
|
15
|
+
* Backed by Highcharts `chart.type: 'column'`.
|
|
16
|
+
*/
|
|
17
|
+
|
|
18
|
+
const getStackedBarChartOptions = function () {
|
|
19
|
+
let orientation = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 'horizontal';
|
|
20
|
+
return {
|
|
21
|
+
..._charts.commonChartOptions,
|
|
22
|
+
chart: {
|
|
23
|
+
..._charts.commonChartOptions.chart,
|
|
24
|
+
type: orientation === 'vertical' ? 'column' : 'bar'
|
|
25
25
|
},
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
26
|
+
legend: {
|
|
27
|
+
..._charts.commonChartOptions.legend,
|
|
28
|
+
..._helpers.bottomLegendRow,
|
|
29
|
+
symbolWidth: 18
|
|
29
30
|
},
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
31
|
+
xAxis: {
|
|
32
|
+
..._charts.commonChartOptions.xAxis,
|
|
33
|
+
labels: {
|
|
34
|
+
style: _helpers.xAxisLabelStyle
|
|
35
|
+
},
|
|
36
|
+
title: {
|
|
37
|
+
margin: 12,
|
|
38
|
+
style: _helpers.xAxisTitleStyle
|
|
39
|
+
},
|
|
40
|
+
lineColor: _color.colorBorderPrimary
|
|
37
41
|
},
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
42
|
+
yAxis: {
|
|
43
|
+
labels: {
|
|
44
|
+
align: 'right',
|
|
45
|
+
distance: 12,
|
|
46
|
+
style: _helpers.yAxisLabelStyle
|
|
47
|
+
},
|
|
48
|
+
title: {
|
|
49
|
+
margin: 12,
|
|
50
|
+
style: _helpers.yAxisTitleStyle
|
|
51
|
+
}
|
|
52
|
+
},
|
|
53
|
+
drilldown: {
|
|
54
|
+
activeAxisLabelStyle: _helpers.activeLabelStyle,
|
|
55
|
+
activeDataLabelStyle: _helpers.activeLabelStyle,
|
|
56
|
+
breadcrumbs: {
|
|
57
|
+
floating: true
|
|
58
|
+
}
|
|
48
59
|
}
|
|
49
|
-
}
|
|
50
|
-
}
|
|
60
|
+
};
|
|
61
|
+
};
|
|
51
62
|
exports.getStackedBarChartOptions = getStackedBarChartOptions;
|
package/mcp/package.json
CHANGED