@spaced-out/ui-design-system 0.5.33 → 0.5.34

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 (51) hide show
  1. package/.github/workflows/publish-mcp.yml +10 -7
  2. package/.storybook/main.ts +145 -29
  3. package/.storybook/manager-head.html +18 -0
  4. package/.storybook/preview-head.html +4 -0
  5. package/.storybook/preview.ts +4 -4
  6. package/.storybook/tsconfig.json +3 -2
  7. package/CHANGELOG.md +34 -0
  8. package/lib/components/Charts/ColumnChart/ColumnChart.d.ts +3 -6
  9. package/lib/components/Charts/ColumnChart/ColumnChart.d.ts.map +1 -1
  10. package/lib/components/Charts/ColumnChart/ColumnChart.js +3 -5
  11. package/lib/components/Charts/DonutChart/DonutChart.d.ts +2 -2
  12. package/lib/components/Charts/DonutChart/DonutChart.d.ts.map +1 -1
  13. package/lib/components/Charts/DonutChart/DonutChart.js +5 -3
  14. package/lib/components/Charts/LineChart/LineChart.d.ts +3 -2
  15. package/lib/components/Charts/LineChart/LineChart.d.ts.map +1 -1
  16. package/lib/components/Charts/LineChart/LineChart.js +1 -2
  17. package/lib/components/Charts/SankeyChart/SankeyChart.d.ts +4 -2
  18. package/lib/components/Charts/SankeyChart/SankeyChart.d.ts.map +1 -1
  19. package/lib/components/Charts/SankeyChart/SankeyChart.js +18 -26
  20. package/lib/components/Charts/SpiderChart/SpiderChart.d.ts +3 -2
  21. package/lib/components/Charts/SpiderChart/SpiderChart.d.ts.map +1 -1
  22. package/lib/components/Charts/SpiderChart/SpiderChart.js +1 -2
  23. package/lib/components/Charts/StackedBarChart/StackedBarChart.d.ts +3 -2
  24. package/lib/components/Charts/StackedBarChart/StackedBarChart.d.ts.map +1 -1
  25. package/lib/components/Charts/StackedBarChart/StackedBarChart.js +1 -2
  26. package/lib/components/Icon/Icon.d.ts.map +1 -1
  27. package/lib/components/Icon/Icon.js +2 -1
  28. package/lib/components/Icon/Icon.module.css +67 -0
  29. package/lib/components/Link/Link.d.ts.map +1 -1
  30. package/lib/components/Link/Link.js +3 -2
  31. package/lib/components/StatusIndicator/StatusIndicator.module.css +10 -10
  32. package/lib/components/Toast/Toast.d.ts +0 -1
  33. package/lib/components/Toast/Toast.d.ts.map +1 -1
  34. package/lib/components/Toast/Toast.js +2 -4
  35. package/lib/components/Toast/Toast.module.css +12 -1
  36. package/lib/types/charts.d.ts +24 -249
  37. package/lib/types/charts.d.ts.map +1 -1
  38. package/lib/utils/charts/charts.d.ts.map +1 -1
  39. package/lib/utils/charts/charts.js +3 -2
  40. package/lib/utils/charts/donutChart.d.ts.map +1 -1
  41. package/lib/utils/charts/donutChart.js +2 -4
  42. package/lib/utils/charts/funnelChart.d.ts +2 -1
  43. package/lib/utils/charts/funnelChart.d.ts.map +1 -1
  44. package/lib/utils/charts/funnelChart.js +19 -10
  45. package/lib/utils/charts/helpers.d.ts +1 -1
  46. package/lib/utils/charts/helpers.d.ts.map +1 -1
  47. package/lib/utils/charts/sankeyChart.d.ts.map +1 -1
  48. package/lib/utils/charts/sankeyChart.js +0 -1
  49. package/mcp/package.json +1 -1
  50. package/package.json +23 -9
  51. package/postcss.config.js +11 -3
@@ -1,3 +1,4 @@
1
+ import type Highcharts from 'highcharts';
1
2
  import type { ChartOptions, Drilldown } from '../../types/charts';
2
3
  import type { FunnelSeriesItem } from '../../components/Charts/FunnelChart/FunnelChart';
3
4
  /**
@@ -5,6 +6,6 @@ import type { FunnelSeriesItem } from '../../components/Charts/FunnelChart/Funne
5
6
  * It will not take userPassed option into account.
6
7
  */
7
8
  export declare const getFunnelChartOptions: () => ChartOptions;
8
- export declare const addColorsToFunnelSeries: (series: Array<FunnelSeriesItem>, showInLegend?: boolean) => Array<FunnelSeriesItem>;
9
+ export declare const addColorsToFunnelSeries: (series: Array<FunnelSeriesItem>, showInLegend?: boolean) => Array<Highcharts.SeriesFunnelOptions>;
9
10
  export declare const addColorsToFunnelDrilldownSeries: (drilldownSeries: Drilldown, showInLegend?: boolean) => Drilldown;
10
11
  //# sourceMappingURL=funnelChart.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"funnelChart.d.ts","sourceRoot":"","sources":["../../../src/utils/charts/funnelChart.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EACV,YAAY,EAEZ,SAAS,EAEV,MAAM,kBAAkB,CAAC;AAU1B,OAAO,KAAK,EAAC,gBAAgB,EAAC,MAAM,+CAA+C,CAAC;AAEpF;;;GAGG;AAEH,eAAO,MAAM,qBAAqB,QAAO,YAmDvC,CAAC;AAEH,eAAO,MAAM,uBAAuB,GAClC,QAAQ,KAAK,CAAC,gBAAgB,CAAC,EAC/B,sBAAmB,KAClB,KAAK,CAAC,gBAAgB,CAQpB,CAAC;AAEN,eAAO,MAAM,gCAAgC,GAC3C,iBAAiB,SAAS,EAC1B,sBAAmB,KAClB,SASD,CAAC"}
1
+ {"version":3,"file":"funnelChart.d.ts","sourceRoot":"","sources":["../../../src/utils/charts/funnelChart.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,UAAU,MAAM,YAAY,CAAC;AAGzC,OAAO,KAAK,EAAC,YAAY,EAAE,SAAS,EAAC,MAAM,kBAAkB,CAAC;AAU9D,OAAO,KAAK,EAAC,gBAAgB,EAAC,MAAM,+CAA+C,CAAC;AAEpF;;;GAGG;AAEH,eAAO,MAAM,qBAAqB,QAAO,YAmDvC,CAAC;AAEH,eAAO,MAAM,uBAAuB,GAClC,QAAQ,KAAK,CAAC,gBAAgB,CAAC,EAC/B,sBAAmB,KAClB,KAAK,CAAC,UAAU,CAAC,mBAAmB,CASlC,CAAC;AAEN,eAAO,MAAM,gCAAgC,GAC3C,iBAAiB,SAAS,EAC1B,sBAAmB,KAClB,SAoBD,CAAC"}
@@ -70,26 +70,35 @@ exports.getFunnelChartOptions = getFunnelChartOptions;
70
70
  const addColorsToFunnelSeries = function (series) {
71
71
  let showInLegend = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true;
72
72
  return series.map(item => ({
73
+ type: 'funnel',
73
74
  ...item,
74
75
  data: item.data.map((seriesItem, index) => ({
75
76
  ...seriesItem,
76
- color: (0, _charts.getDataVizColor)(index) // Apply color based on index
77
+ color: (0, _charts.getDataVizColor)(index)
77
78
  })),
78
- showInLegend // Ensure legend visibility
79
+ showInLegend
79
80
  }));
80
81
  };
81
82
  exports.addColorsToFunnelSeries = addColorsToFunnelSeries;
82
83
  const addColorsToFunnelDrilldownSeries = function (drilldownSeries) {
83
84
  let showInLegend = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true;
84
85
  return {
85
- series: drilldownSeries.series?.map(series => ({
86
- ...series,
87
- data: series.data.map((dataPoint, index) => ({
88
- ...dataPoint,
89
- color: (0, _charts.getDataVizColor)(index) // Assign a color dynamically based on index
90
- })),
91
- showInLegend // Ensure legend is displayed
92
- }))
86
+ ...drilldownSeries,
87
+ series: drilldownSeries.series?.map(series => {
88
+ const funnelSeries = {
89
+ ...series,
90
+ type: 'funnel'
91
+ };
92
+ const funnelData = funnelSeries.data;
93
+ return {
94
+ ...funnelSeries,
95
+ data: funnelData?.map((dataPoint, index) => ({
96
+ ...dataPoint,
97
+ color: dataPoint.color || (0, _charts.getDataVizColor)(index)
98
+ })) ?? [],
99
+ showInLegend
100
+ };
101
+ })
93
102
  };
94
103
  };
95
104
  exports.addColorsToFunnelDrilldownSeries = addColorsToFunnelDrilldownSeries;
@@ -1,4 +1,4 @@
1
- export declare const deepMerge: <T extends Record<string, unknown>>(obj1: Partial<T> | null | undefined, obj2: Partial<T> | null | undefined, ...args: Array<Partial<T> | null | undefined>) => T;
1
+ export declare const deepMerge: <T extends object>(obj1: Partial<T> | null | undefined, obj2: Partial<T> | null | undefined, ...args: Array<Partial<T> | null | undefined>) => T;
2
2
  export declare const rightLineLegendColumn: {
3
3
  readonly layout: "vertical";
4
4
  readonly align: "right";
@@ -1 +1 @@
1
- {"version":3,"file":"helpers.d.ts","sourceRoot":"","sources":["../../../src/utils/charts/helpers.ts"],"names":[],"mappings":"AAcA,e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AAO,MAAM,eAAe;;;;;;;;;;CAElB,CAAC;AAEX,eAAO,MAAM,gBAAgB;;;;;;;;;;;;CAKnB,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"sankeyChart.d.ts","sourceRoot":"","sources":["../../../src/utils/charts/sankeyChart.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAC,YAAY,EAAC,MAAM,kBAAkB,CAAC;AAKnD,UAAU,sBAAsB;IAC9B,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,UAAU,CAAC,EAAE,OAAO,CAAC;CACtB;AAED,eAAO,MAAM,qBAAqB,GAAI,yCAInC,sBAAsB,KAAG,YAiC1B,CAAC"}
1
+ {"version":3,"file":"sankeyChart.d.ts","sourceRoot":"","sources":["../../../src/utils/charts/sankeyChart.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAC,YAAY,EAAC,MAAM,kBAAkB,CAAC;AAKnD,UAAU,sBAAsB;IAC9B,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,UAAU,CAAC,EAAE,OAAO,CAAC;CACtB;AAED,eAAO,MAAM,qBAAqB,GAAI,yCAInC,sBAAsB,KAAG,YAgC1B,CAAC"}
@@ -29,7 +29,6 @@ const getSankeyChartOptions = _ref => {
29
29
  nodeWidth,
30
30
  nodePadding,
31
31
  borderWidth: 0,
32
- borderRadius: 0,
33
32
  showInLegend: showLegend,
34
33
  allowPointSelect: true,
35
34
  dataLabels: {
package/mcp/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@spaced-out/genesis-mcp-server",
3
- "version": "1.0.14",
3
+ "version": "1.0.15",
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.5.33",
3
+ "version": "0.5.34",
4
4
  "description": "Sense UI components library",
5
5
  "author": {
6
6
  "name": "Spaced Out"
@@ -13,6 +13,7 @@
13
13
  "build:style-variables": "rimraf src/styles/variables && style-dictionary build --config ./config.js",
14
14
  "build:types": "tsc --project tsconfig.declaration.json && tsc-alias -p tsconfig.declaration.json && cp src/types/flow-to-typescript-codemod.d.ts lib/",
15
15
  "prebuild": "rimraf lib",
16
+ "doctor": "storybook doctor",
16
17
  "storybook": "yarn build:style-variables && rimraf node_modules/.cache/storybook && storybook dev --host genesis.proxysense.co --port 6006",
17
18
  "storybook:export": "yarn build:style-variables && rimraf storybook-static && storybook build",
18
19
  "build-storybook": "yarn build:style-variables && rimraf storybook-static && storybook build",
@@ -81,15 +82,16 @@
81
82
  "@babel/preset-env": "^7.28.3",
82
83
  "@babel/preset-react": "^7.27.1",
83
84
  "@babel/preset-typescript": "^7.27.1",
84
- "@chromatic-com/storybook": "^4.1.0",
85
+ "@chromatic-com/storybook": "^4.1.3",
85
86
  "@commitlint/cli": "^17.1.2",
86
87
  "@commitlint/config-conventional": "^17.1.0",
87
88
  "@regrapes/babel-plugin-add-react-memo-displayname": "^1.0.0",
88
- "@storybook/addon-a11y": "^9.1.2",
89
- "@storybook/addon-docs": "^9.1.2",
90
- "@storybook/addon-webpack5-compiler-babel": "^3.0.6",
91
- "@storybook/react-webpack5": "^9.1.2",
92
- "@storybook/test-runner": "^0.23.0",
89
+ "@storybook/addon-a11y": "^10.1.4",
90
+ "@storybook/addon-docs": "^10.1.4",
91
+ "@storybook/addon-styling-webpack": "^3.0.0",
92
+ "@storybook/addon-webpack5-compiler-babel": "^4.0.0",
93
+ "@storybook/react-webpack5": "^10.1.4",
94
+ "@storybook/test-runner": "^0.24.2",
93
95
  "@testing-library/react": "^11.2.7",
94
96
  "@types/babel-plugin-macros": "~3.1.3",
95
97
  "@types/babel__core": "~7.20.5",
@@ -109,6 +111,7 @@
109
111
  "@types/standard-version": "~7.1.3",
110
112
  "@xyflow/react": "^12.8.4",
111
113
  "all-contributors-cli": "^6.20.0",
114
+ "autoprefixer": "^10.4.22",
112
115
  "babel-eslint": "^10.1.0",
113
116
  "babel-jest": "^28.1.3",
114
117
  "babel-loader": "^10.0.0",
@@ -121,6 +124,7 @@
121
124
  "classnames": "^2.5.1",
122
125
  "cross-env": "^10.0.0",
123
126
  "cspell": "^9.1.2",
127
+ "css-loader": "^7.1.2",
124
128
  "dependency-cruiser": "^17.0.1",
125
129
  "elkjs": "^0.10.0",
126
130
  "eslint": "^9.9.0",
@@ -130,7 +134,7 @@
130
134
  "eslint-plugin-react": "^7.37.5",
131
135
  "eslint-plugin-react-hooks": "^5.2.0",
132
136
  "eslint-plugin-simple-import-sort": "^12.1.1",
133
- "eslint-plugin-storybook": "^9.1.2",
137
+ "eslint-plugin-storybook": "^10.1.4",
134
138
  "eslint-plugin-unused-imports": "^4.1.4",
135
139
  "fast-glob": "^3.3.3",
136
140
  "flow-bin": "^0.184.0",
@@ -146,18 +150,28 @@
146
150
  "jscodeshift": "^17.3.0",
147
151
  "lint-staged": "^10.5.1",
148
152
  "paths.macro": "^3.0.1",
153
+ "postcss": "^8.5.6",
154
+ "postcss-flexbugs-fixes": "^5.0.2",
155
+ "postcss-import": "^16.1.1",
156
+ "postcss-loader": "^8.2.0",
157
+ "postcss-mixins": "^12.1.2",
158
+ "postcss-modules-values": "^4.0.0",
159
+ "postcss-nesting": "^13.0.2",
149
160
  "prettier": "^2.5.1",
150
161
  "process": "^0.11.10",
151
162
  "react": "^19.1.0",
152
163
  "react-dom": "^19.1.0",
153
164
  "recast": "^0.23.11",
154
165
  "rimraf": "^3.0.2",
166
+ "sass": "^1.95.0",
167
+ "sass-loader": "^16.0.6",
155
168
  "simple-git": "^3.12.0",
156
169
  "standard-version": "^9.5.0",
157
- "storybook": "^9.1.2",
170
+ "storybook": "^10.1.4",
158
171
  "storybook-css-modules": "^1.0.8",
159
172
  "storybook-vscode-component": "^1.0.9",
160
173
  "style-dictionary": "^3.7.1",
174
+ "style-loader": "^4.0.0",
161
175
  "ts-morph": "^27.0.0",
162
176
  "tsc-alias": "^1.8.16",
163
177
  "type-coverage": "^2.29.7",
package/postcss.config.js CHANGED
@@ -1,3 +1,11 @@
1
- module.exports = (_api) => ({
2
- plugins: {},
3
- });
1
+ // postcss.config.js
2
+ module.exports = {
3
+ plugins: [
4
+ require('postcss-import'),
5
+ require('postcss-mixins'),
6
+ require('postcss-nesting'),
7
+ require('postcss-modules-values'), // ⬅️ key plugin for @value
8
+ require('autoprefixer'),
9
+ require('postcss-flexbugs-fixes'),
10
+ ],
11
+ };