@appquality/unguess-design-system 2.12.30 → 2.12.31
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 +13 -0
- package/build/index.js +22 -16
- package/build/stories/charts/bullet/CustomBulletChartMarker.d.ts +2 -9
- package/build/stories/charts/bullet/CustomBulletChartMeasure.d.ts +8 -0
- package/build/stories/charts/bullet/_types.d.ts +0 -5
- package/build/stories/charts/bullet/index.d.ts +1 -1
- package/build/stories/charts/bullet/index.stories.d.ts +1 -1
- package/package.json +1 -1
- package/build/stories/charts/bullet/CustomBulletChartRange.d.ts +0 -8
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,16 @@
|
|
|
1
|
+
# v2.12.31 (Tue Nov 15 2022)
|
|
2
|
+
|
|
3
|
+
#### 🐛 Bug Fix
|
|
4
|
+
|
|
5
|
+
- fix(bullet chart): tooltip & theme [#105](https://github.com/AppQuality/unguess-design-system/pull/105) ([@iacopolea](https://github.com/iacopolea) [@marcbon](https://github.com/marcbon))
|
|
6
|
+
|
|
7
|
+
#### Authors: 2
|
|
8
|
+
|
|
9
|
+
- Iacopo Leardini ([@iacopolea](https://github.com/iacopolea))
|
|
10
|
+
- Marco Bonomo ([@marcbon](https://github.com/marcbon))
|
|
11
|
+
|
|
12
|
+
---
|
|
13
|
+
|
|
1
14
|
# v2.12.30 (Tue Nov 15 2022)
|
|
2
15
|
|
|
3
16
|
#### 🐛 Bug Fix
|
package/build/index.js
CHANGED
|
@@ -18,6 +18,7 @@ var reactLoaders = require('@zendeskgarden/react-loaders');
|
|
|
18
18
|
var reactTypography = require('@zendeskgarden/react-typography');
|
|
19
19
|
var bar = require('@nivo/bar');
|
|
20
20
|
var bullet = require('@nivo/bullet');
|
|
21
|
+
var web = require('@react-spring/web');
|
|
21
22
|
var pie = require('@nivo/pie');
|
|
22
23
|
var stream = require('@nivo/stream');
|
|
23
24
|
var sunburst = require('@nivo/sunburst');
|
|
@@ -1124,34 +1125,39 @@ var BarChart = function (_a) {
|
|
|
1124
1125
|
return (jsxRuntime.jsx(ChartContainer, __assign({ width: width, height: height }, { children: jsxRuntime.jsx(bar.ResponsiveBar, __assign({ theme: __assign(__assign({}, DEFAULT_CHARTS_THEME), theme), colors: colors !== null && colors !== void 0 ? colors : CHARTS_COLOR_SCHEME_CATEGORICAL_5, enableLabel: false }, props)) })));
|
|
1125
1126
|
};
|
|
1126
1127
|
|
|
1127
|
-
var
|
|
1128
|
-
var x = _a.x, y = _a.y,
|
|
1129
|
-
return (jsxRuntime.jsx(
|
|
1128
|
+
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
1139
|
};
|
|
1131
1140
|
|
|
1132
|
-
var
|
|
1133
|
-
var x = _a.x, y = _a.y, width = _a.width, height = _a.height
|
|
1134
|
-
return (jsxRuntime.jsx("rect", { x: x, y: y, width: width -
|
|
1141
|
+
var CustomMeasure = function (_a) {
|
|
1142
|
+
var x = _a.x, y = _a.y, width = _a.width, height = _a.height; _a.color;
|
|
1143
|
+
return (jsxRuntime.jsx("rect", { x: x + 2, y: y + 2, width: width - 4, height: height - 4, fill: chartColors.darkGrey }));
|
|
1135
1144
|
};
|
|
1136
1145
|
|
|
1137
1146
|
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"])));
|
|
1138
1147
|
var BulletChart = function (_a) {
|
|
1139
|
-
var width = _a.width, height = _a.height, ranges = _a.ranges, values = _a.values
|
|
1140
|
-
|
|
1141
|
-
|
|
1148
|
+
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: [
|
|
1150
|
+
{
|
|
1142
1151
|
id: "",
|
|
1143
1152
|
title: "",
|
|
1144
1153
|
ranges: ranges,
|
|
1145
1154
|
measures: values,
|
|
1146
1155
|
markers: values,
|
|
1147
|
-
}
|
|
1156
|
+
},
|
|
1157
|
+
], measureComponent: CustomMeasure, markerColors: chartColors.darkPine, markerComponent: function (_a) {
|
|
1148
1158
|
_a.size; var markerProps = __rest(_a, ["size"]);
|
|
1149
|
-
return (jsxRuntime.jsx(
|
|
1150
|
-
},
|
|
1151
|
-
var index = _a.index, width = _a.width, rangeProps = __rest(_a, ["index", "width"]);
|
|
1152
|
-
var isLast = index === rangesCount - 1;
|
|
1153
|
-
return (jsxRuntime.jsx(CustomBulletChartRange, __assign({ fill: rangeColor !== null && rangeColor !== void 0 ? rangeColor : chartColors.lightGrey }, rangeProps, { width: isLast ? width + 2 : width })));
|
|
1154
|
-
}, margin: { top: 0, right: 10, bottom: -1, left: 10 } }, props)) })));
|
|
1159
|
+
return (jsxRuntime.jsx(CustomBulletChartMarkers, __assign({}, markerProps, { size: 4 })));
|
|
1160
|
+
}, rangeColors: chartColors.lightGrey, rangeBorderColor: "white", rangeBorderWidth: 2, margin: { top: 0, right: 10, bottom: -1, left: 10 } }) })));
|
|
1155
1161
|
};
|
|
1156
1162
|
var templateObject_1$15;
|
|
1157
1163
|
|
|
@@ -1,9 +1,2 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
y: number;
|
|
4
|
-
bulletRadius: number;
|
|
5
|
-
fill: string;
|
|
6
|
-
size: number;
|
|
7
|
-
}
|
|
8
|
-
export declare const CustomBulletChartMarker: ({ x, y, bulletRadius, fill, size, }: CustomBulletChartMarkerProps) => JSX.Element;
|
|
9
|
-
export {};
|
|
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;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { BulletChartProps } from "./_types";
|
|
2
|
-
declare const BulletChart: ({ width, height, ranges, values
|
|
2
|
+
declare const BulletChart: ({ width, height, ranges, values }: BulletChartProps) => JSX.Element;
|
|
3
3
|
export { BulletChart };
|
|
@@ -2,5 +2,5 @@ import { ComponentMeta, Story } from "@storybook/react";
|
|
|
2
2
|
import { BulletChartProps } from "./_types";
|
|
3
3
|
export declare const Default: Story<BulletChartProps>;
|
|
4
4
|
export declare const Widget: Story<BulletChartProps>;
|
|
5
|
-
declare const _default: ComponentMeta<({ width, height, ranges, values
|
|
5
|
+
declare const _default: ComponentMeta<({ width, height, ranges, values }: BulletChartProps) => JSX.Element>;
|
|
6
6
|
export default _default;
|
package/package.json
CHANGED