@spaced-out/ui-design-system 0.1.87-beta.0 → 0.1.87

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 CHANGED
@@ -2,6 +2,19 @@
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.1.87](https://github.com/spaced-out/ui-design-system/compare/v0.1.87-beta.0...v0.1.87) (2024-04-24)
6
+
7
+
8
+ ### Features
9
+
10
+ * adding autoFit gridType in grid ([#193](https://github.com/spaced-out/ui-design-system/issues/193)) ([a339f4c](https://github.com/spaced-out/ui-design-system/commit/a339f4ca1957f885ed080a80da66289330ef8c3f))
11
+
12
+
13
+ ### Bug Fixes
14
+
15
+ * 📖 added docs for chart types ([#191](https://github.com/spaced-out/ui-design-system/issues/191)) ([f73f471](https://github.com/spaced-out/ui-design-system/commit/f73f471fb5efe2e8f1b49440d56a59193bb276a5))
16
+ * story enhancement and breadcrumb position fix ([#192](https://github.com/spaced-out/ui-design-system/issues/192)) ([89a2cb7](https://github.com/spaced-out/ui-design-system/commit/89a2cb7391c5a8920a97ce7683faf897b636b3b3))
17
+
5
18
  ### [0.1.87-beta.0](https://github.com/spaced-out/ui-design-system/compare/v0.1.86...v0.1.87-beta.0) (2024-04-19)
6
19
 
7
20
 
@@ -47,7 +47,10 @@ const ColumnChart = _ref => {
47
47
  }));
48
48
  const columnDrilldown = drilldown ? {
49
49
  ...drilldown,
50
- series: addColorToDrilldownSeries(drilldown.series)
50
+ series: addColorToDrilldownSeries(drilldown.series),
51
+ breadcrumbs: {
52
+ floating: false
53
+ }
51
54
  } : {};
52
55
  const defaultColumnChartOptions = (0, _charts.getColumnChartOptions)();
53
56
 
@@ -73,6 +73,7 @@ export const ColumnChart = ({
73
73
  ? {
74
74
  ...drilldown,
75
75
  series: addColorToDrilldownSeries(drilldown.series),
76
+ breadcrumbs: {floating: false},
76
77
  }
77
78
  : {};
78
79
 
@@ -63,7 +63,10 @@ const DonutChart = _ref => {
63
63
  }));
64
64
  const donutDrilldown = drilldown ? {
65
65
  ...drilldown,
66
- series: addColorToDrilldownSeries(drilldown.series)
66
+ series: addColorToDrilldownSeries(drilldown.series),
67
+ breadcrumbs: {
68
+ floating: false
69
+ }
67
70
  } : {};
68
71
  const defaultLineChartOptions = (0, _charts.getDonutChartOptions)({
69
72
  legend,
@@ -110,6 +110,7 @@ export const DonutChart = ({
110
110
  ? {
111
111
  ...drilldown,
112
112
  series: addColorToDrilldownSeries(drilldown.series),
113
+ breadcrumbs: {floating: false},
113
114
  }
114
115
  : {};
115
116
 
@@ -15,7 +15,8 @@ const GRID_SYSTEM_MAP = {
15
15
  small: 24,
16
16
  medium: 12,
17
17
  large: 6,
18
- autoFill: 'auto-fill'
18
+ autoFill: 'auto-fill',
19
+ autoFit: 'auto-fit'
19
20
  };
20
21
  const Row = _ref => {
21
22
  let {
@@ -46,7 +47,7 @@ const Row = _ref => {
46
47
  columnSpanCount = lastChildColCount + offset + span;
47
48
  let gridColumnStart = 0,
48
49
  gridColumnEnd = 0;
49
- if (gridType === 'autoFill') {
50
+ if (gridType === 'autoFill' || gridType === 'autoFit') {
50
51
  gridColumnStart = 'auto';
51
52
  return /*#__PURE__*/React.cloneElement(child, {
52
53
  gridColumnStart,
@@ -11,7 +11,7 @@ export type RowProps = {
11
11
  children?: React.Node,
12
12
  span?: number,
13
13
  offset?: number,
14
- gridType?: 'small' | 'medium' | 'large' | 'autoFill',
14
+ gridType?: 'small' | 'medium' | 'large' | 'autoFill' | 'autoFit',
15
15
  repeatTracks?: string,
16
16
  };
17
17
 
@@ -20,6 +20,7 @@ const GRID_SYSTEM_MAP = {
20
20
  medium: 12,
21
21
  large: 6,
22
22
  autoFill: 'auto-fill',
23
+ autoFit: 'auto-fit',
23
24
  };
24
25
 
25
26
  export const Row = ({
@@ -47,7 +48,7 @@ export const Row = ({
47
48
  columnSpanCount = lastChildColCount + offset + span;
48
49
  let gridColumnStart = 0,
49
50
  gridColumnEnd = 0;
50
- if (gridType === 'autoFill') {
51
+ if (gridType === 'autoFill' || gridType === 'autoFit') {
51
52
  gridColumnStart = 'auto';
52
53
  return React.cloneElement(child, {
53
54
  gridColumnStart,
@@ -26,6 +26,7 @@ const LineChart = _ref => {
26
26
  customExportOptions,
27
27
  series,
28
28
  headerActions,
29
+ drilldown,
29
30
  ...userOptions
30
31
  } = _ref;
31
32
  const chartRef = /*#__PURE__*/React.createRef();
@@ -36,10 +37,17 @@ const LineChart = _ref => {
36
37
  color: (0, _charts.getDataVizColor)(index)
37
38
  }));
38
39
  const defaultLineChartOptions = (0, _charts.getLineChartOptions)();
40
+ const columnDrilldown = drilldown ? {
41
+ ...drilldown,
42
+ breadcrumbs: {
43
+ floating: false
44
+ }
45
+ } : {};
39
46
 
40
47
  //$FlowFixMe[cannot-spread-inexact]
41
48
  const chartOptions = (0, _charts.mergeChartUserOptions)(defaultLineChartOptions, {
42
49
  series: lineChartSeries,
50
+ drilldown: columnDrilldown,
43
51
  ...userOptions
44
52
  });
45
53
  const {
@@ -6,6 +6,7 @@ import Highcharts from 'highcharts';
6
6
  //$FlowFixMe[untyped-import]
7
7
  import HighchartsReact from 'highcharts-react-official';
8
8
 
9
+ import type {Drilldown} from '../../types/charts';
9
10
  import {
10
11
  getDataVizColor,
11
12
  getLineChartOptions,
@@ -34,6 +35,7 @@ export type LineChartProps = {
34
35
  customExportOptions?: Array<ExportOptionType> | null,
35
36
  series: Array<LineSeriesItem>,
36
37
  headerActions?: React.Node,
38
+ drilldown: Drilldown,
37
39
  ...
38
40
  };
39
41
 
@@ -43,6 +45,7 @@ export const LineChart = ({
43
45
  customExportOptions,
44
46
  series,
45
47
  headerActions,
48
+ drilldown,
46
49
  ...userOptions
47
50
  }: LineChartProps): React.Node => {
48
51
  const chartRef = React.createRef();
@@ -56,9 +59,17 @@ export const LineChart = ({
56
59
 
57
60
  const defaultLineChartOptions = getLineChartOptions();
58
61
 
62
+ const columnDrilldown = drilldown
63
+ ? {
64
+ ...drilldown,
65
+ breadcrumbs: {floating: false},
66
+ }
67
+ : {};
68
+
59
69
  //$FlowFixMe[cannot-spread-inexact]
60
70
  const chartOptions = mergeChartUserOptions(defaultLineChartOptions, {
61
71
  series: lineChartSeries,
72
+ drilldown: columnDrilldown,
62
73
  ...userOptions,
63
74
  });
64
75
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@spaced-out/ui-design-system",
3
- "version": "0.1.87-beta.0",
3
+ "version": "0.1.87",
4
4
  "main": "index.js",
5
5
  "description": "Sense UI components library",
6
6
  "author": {