@appquality/unguess-design-system 2.12.34 → 2.12.36

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
@@ -1,3 +1,27 @@
1
+ # v2.12.36 (Mon Nov 21 2022)
2
+
3
+ #### ⚠️ Pushed to `master`
4
+
5
+ - feat(bullet chart): adjust margins ([@iacopolea](https://github.com/iacopolea))
6
+
7
+ #### Authors: 1
8
+
9
+ - Iacopo Leardini ([@iacopolea](https://github.com/iacopolea))
10
+
11
+ ---
12
+
13
+ # v2.12.35 (Mon Nov 21 2022)
14
+
15
+ #### 🐛 Bug Fix
16
+
17
+ - Un 64 last fixes bullet chart [#110](https://github.com/AppQuality/unguess-design-system/pull/110) ([@iacopolea](https://github.com/iacopolea))
18
+
19
+ #### Authors: 1
20
+
21
+ - Iacopo Leardini ([@iacopolea](https://github.com/iacopolea))
22
+
23
+ ---
24
+
1
25
  # v2.12.34 (Mon Nov 21 2022)
2
26
 
3
27
  #### 🐛 Bug Fix
package/build/index.js CHANGED
@@ -19,6 +19,7 @@ var reactTypography = require('@zendeskgarden/react-typography');
19
19
  var bar = require('@nivo/bar');
20
20
  var bullet = require('@nivo/bullet');
21
21
  var web = require('@react-spring/web');
22
+ var tooltip = require('@nivo/tooltip');
22
23
  var pie = require('@nivo/pie');
23
24
  var stream = require('@nivo/stream');
24
25
  var sunburst = require('@nivo/sunburst');
@@ -1126,27 +1127,24 @@ var BarChart = function (_a) {
1126
1127
  };
1127
1128
 
1128
1129
  var CustomBulletChartMarkers = function (_a) {
1129
- var x = _a.x, y = _a.y, size = _a.size, _b = _a.animatedProps, color = _b.color, transform = _b.transform, data = _a.data, onMouseEnter = _a.onMouseEnter, onMouseMove = _a.onMouseMove, onMouseLeave = _a.onMouseLeave, onClick = _a.onClick;
1130
- return (jsxRuntime.jsx(web.animated.circle, { transform: transform, cx: x, cy: y, fill: color, stroke: color, r: size,
1131
- // @ts-ignore onMouseMove event for circle is not supported, but it works
1132
- onMouseMove: function (event) { return onMouseMove(data, event); },
1133
- // @ts-ignore onMouseEnter event for circle is not supported, but it works
1134
- onMouseEnter: function (event) { return onMouseEnter(data, event); },
1135
- // @ts-ignore onMouseLeave event for circle is not supported, but it works
1136
- onMouseLeave: function (event) { return onMouseLeave(data, event); },
1137
- // @ts-ignore onClick event for circle is not supported, but it works
1138
- onClick: function (event) { return onClick(data, event); } }));
1130
+ var x = _a.x, y = _a.y, size = _a.size, _b = _a.animatedProps, color = _b.color, transform = _b.transform;
1131
+ return (jsxRuntime.jsx(web.animated.circle, { transform: transform, cx: x, cy: y, fill: color, stroke: color, r: size }));
1139
1132
  };
1140
1133
 
1141
1134
  var CustomMeasure = function (_a) {
1142
- var x = _a.x, y = _a.y, width = _a.width, height = _a.height; _a.color;
1135
+ var x = _a.x, y = _a.y, width = _a.width, height = _a.height;
1143
1136
  return (jsxRuntime.jsx("rect", { x: x + 2, y: y + 2, width: width - 4, height: height - 4, fill: chartColors.darkGrey }));
1144
1137
  };
1145
1138
 
1139
+ var CustomTooltip = function (_a) {
1140
+ var v0 = _a.v0, v1 = _a.v1, color = _a.color;
1141
+ return (jsxRuntime.jsx(tooltip.BasicTooltip, { id: v1 ? (jsxRuntime.jsxs("span", { children: [jsxRuntime.jsx("strong", { children: v0 }), "-", jsxRuntime.jsx("strong", { children: v1 }), "%"] })) : (jsxRuntime.jsx("strong", { children: v0 })), enableChip: true, color: color }));
1142
+ };
1143
+
1146
1144
  var UgBulletChart = styled__default["default"](bullet.ResponsiveBullet)(templateObject_1$15 || (templateObject_1$15 = __makeTemplateObject(["\n width: 100%;\n height: 100%;\n"], ["\n width: 100%;\n height: 100%;\n"])));
1147
1145
  var BulletChart = function (_a) {
1148
1146
  var width = _a.width, height = _a.height, ranges = _a.ranges, values = _a.values;
1149
- return (jsxRuntime.jsx(ChartContainer, __assign({ width: width, height: height, id: "ciolla" }, { children: jsxRuntime.jsx(UgBulletChart, { theme: DEFAULT_CHARTS_THEME, data: [
1147
+ return (jsxRuntime.jsx(ChartContainer, __assign({ width: width, height: height }, { children: jsxRuntime.jsx(UgBulletChart, { theme: DEFAULT_CHARTS_THEME, data: [
1150
1148
  {
1151
1149
  id: "",
1152
1150
  title: "",
@@ -1157,7 +1155,7 @@ var BulletChart = function (_a) {
1157
1155
  ], measureComponent: CustomMeasure, markerColors: chartColors.darkPine, markerComponent: function (_a) {
1158
1156
  _a.size; var markerProps = __rest(_a, ["size"]);
1159
1157
  return (jsxRuntime.jsx(CustomBulletChartMarkers, __assign({}, markerProps, { size: 4 })));
1160
- }, rangeColors: chartColors.lightGrey, rangeBorderColor: "white", rangeBorderWidth: 2, margin: { top: 0, right: 0, bottom: -1, left: 0 } }) })));
1158
+ }, tooltip: CustomTooltip, rangeColors: chartColors.lightGrey, rangeBorderColor: "white", rangeBorderWidth: 2, margin: { top: 0, right: 5, bottom: -1, left: 0 } }) })));
1161
1159
  };
1162
1160
  var templateObject_1$15;
1163
1161
 
@@ -1,2 +1,2 @@
1
1
  import { BulletMarkersItemProps } from "@nivo/bullet";
2
- export declare const CustomBulletChartMarkers: ({ x, y, size, animatedProps: { color, transform }, data, onMouseEnter, onMouseMove, onMouseLeave, onClick, }: BulletMarkersItemProps) => JSX.Element;
2
+ export declare const CustomBulletChartMarkers: ({ x, y, size, animatedProps: { color, transform } }: BulletMarkersItemProps) => JSX.Element;
@@ -5,4 +5,4 @@ export interface CustomBulletChartMeasureProps {
5
5
  width: number;
6
6
  height: number;
7
7
  }
8
- export declare const CustomMeasure: ({ x, y, width, height, color }: CustomBulletChartMeasureProps) => JSX.Element;
8
+ export declare const CustomMeasure: ({ x, y, width, height }: CustomBulletChartMeasureProps) => JSX.Element;
@@ -0,0 +1,5 @@
1
+ export declare const CustomTooltip: ({ v0, v1, color }: {
2
+ color: string;
3
+ v0: number;
4
+ v1?: number | undefined;
5
+ }) => JSX.Element;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@appquality/unguess-design-system",
3
- "version": "2.12.34",
3
+ "version": "2.12.36",
4
4
  "dependencies": {
5
5
  "@nivo/bar": "^0.80.0",
6
6
  "@nivo/bullet": "^0.80.0",
@@ -9,6 +9,7 @@
9
9
  "@nivo/pie": "^0.80.0",
10
10
  "@nivo/stream": "^0.80.0",
11
11
  "@nivo/sunburst": "^0.80.0",
12
+ "@nivo/tooltip": "^0.80.0",
12
13
  "@nivo/waffle": "^0.80.0",
13
14
  "@tiptap/extension-bubble-menu": "^2.0.0-beta.61",
14
15
  "@tiptap/extension-character-count": "^2.0.0-beta.31",