@appquality/unguess-design-system 2.12.42 → 2.12.44

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,30 @@
1
+ # v2.12.44 (Fri Dec 02 2022)
2
+
3
+ #### 🐛 Bug Fix
4
+
5
+ - Update sunburst [#136](https://github.com/AppQuality/unguess-design-system/pull/136) ([@d-beezee](https://github.com/d-beezee))
6
+ - feat(sunburst): Allow passing custom data to tooltip [#135](https://github.com/AppQuality/unguess-design-system/pull/135) ([@d-beezee](https://github.com/d-beezee))
7
+
8
+ #### Authors: 1
9
+
10
+ - [@d-beezee](https://github.com/d-beezee)
11
+
12
+ ---
13
+
14
+ # v2.12.43 (Fri Dec 02 2022)
15
+
16
+ #### 🐛 Bug Fix
17
+
18
+ - Add zindex default to tooltip [#134](https://github.com/AppQuality/unguess-design-system/pull/134) ([@marcbon](https://github.com/marcbon) [@d-beezee](https://github.com/d-beezee))
19
+ - fix(tooltip): add zIndex default props + add levels attribute on theme object [#133](https://github.com/AppQuality/unguess-design-system/pull/133) ([@marcbon](https://github.com/marcbon))
20
+
21
+ #### Authors: 2
22
+
23
+ - [@d-beezee](https://github.com/d-beezee)
24
+ - Marco Bonomo ([@marcbon](https://github.com/marcbon))
25
+
26
+ ---
27
+
1
28
  # v2.12.42 (Thu Dec 01 2022)
2
29
 
3
30
  #### 🐛 Bug Fix
package/build/index.js CHANGED
@@ -288,7 +288,12 @@ var components = __assign(__assign({}, reactTheming.DEFAULT_THEME.components), {
288
288
  return isSelected ? { fontWeight: fontWeights.semibold } : undefined;
289
289
  } });
290
290
 
291
- var theme = __assign(__assign({}, reactTheming.DEFAULT_THEME), { breakpoints: __assign(__assign({}, reactTheming.DEFAULT_THEME.breakpoints), { xxl: "1440px" }), colors: __assign(__assign({}, reactTheming.DEFAULT_THEME.colors), { primaryHue: palette.blue[600], warningHue: palette.yellow[600], successHue: palette.teal["M600"], dangerHue: palette.red[600], accentHue: palette.water[600] }), palette: palette, fonts: __assign(__assign({}, reactTheming.DEFAULT_THEME.fonts), { system: '"Poppins",sans-serif,Helvetica,Arial,sans-serif' }), fontWeights: fontWeights, gradients: gradients, borderRadii: __assign(__assign({}, reactTheming.DEFAULT_THEME.borderRadii), { lg: "8px", xl: "16px", xxl: "32px" }), lineHeights: __assign(__assign({}, reactTheming.DEFAULT_THEME.lineHeights), { xs: "16px" }), components: components, shadows: __assign(__assign({}, reactTheming.DEFAULT_THEME.shadows), { boxShadow: boxShadow }) });
291
+ var theme = __assign(__assign({}, reactTheming.DEFAULT_THEME), { breakpoints: __assign(__assign({}, reactTheming.DEFAULT_THEME.breakpoints), { xxl: "1440px" }), colors: __assign(__assign({}, reactTheming.DEFAULT_THEME.colors), { primaryHue: palette.blue[600], warningHue: palette.yellow[600], successHue: palette.teal["M600"], dangerHue: palette.red[600], accentHue: palette.water[600] }), palette: palette, fonts: __assign(__assign({}, reactTheming.DEFAULT_THEME.fonts), { system: '"Poppins",sans-serif,Helvetica,Arial,sans-serif' }), fontWeights: fontWeights, gradients: gradients, borderRadii: __assign(__assign({}, reactTheming.DEFAULT_THEME.borderRadii), { lg: "8px", xl: "16px", xxl: "32px" }), lineHeights: __assign(__assign({}, reactTheming.DEFAULT_THEME.lineHeights), { xs: "16px" }), components: components, shadows: __assign(__assign({}, reactTheming.DEFAULT_THEME.shadows), { boxShadow: boxShadow }), levels: {
292
+ back: -1,
293
+ base: 0,
294
+ front: 100,
295
+ modal: 200,
296
+ } });
292
297
 
293
298
  var GlobalStyle = styled.createGlobalStyle(templateObject_1$1p || (templateObject_1$1p = __makeTemplateObject(["\n ::-webkit-scrollbar-track:hover {\n border-left: solid 1px ", ";\n border-right: solid 1px ", ";\n }\n\n ::-webkit-scrollbar {\n width: 10px;\n }\n\n ::-webkit-scrollbar-track {\n border: solid 2px transparent;\n }\n\n ::-webkit-scrollbar-thumb {\n box-shadow: inset 0 0 10px 10px ", ";\n border: solid 2px transparent;\n border-radius: 25px;\n }\n\n /* This stuff is for Firefox */\n * {\n scrollbar-color: ", " #FFFFFF;\n scrollbar-width: thin;\n }\n\n html {\n overflow-y: auto;\n }\n\n body {\n font-family: ", ";\n margin: 0;\n -webkit-font-smoothing: antialiased;\n -moz-osx-font-smoothing: grayscale;\n }\n \n svg {\n max-height: 100%;\n }\n\n"], ["\n ::-webkit-scrollbar-track:hover {\n border-left: solid 1px ", ";\n border-right: solid 1px ", ";\n }\n\n ::-webkit-scrollbar {\n width: 10px;\n }\n\n ::-webkit-scrollbar-track {\n border: solid 2px transparent;\n }\n\n ::-webkit-scrollbar-thumb {\n box-shadow: inset 0 0 10px 10px ", ";\n border: solid 2px transparent;\n border-radius: 25px;\n }\n\n /* This stuff is for Firefox */\n * {\n scrollbar-color: ", " #FFFFFF;\n scrollbar-width: thin;\n }\n\n html {\n overflow-y: auto;\n }\n\n body {\n font-family: ", ";\n margin: 0;\n -webkit-font-smoothing: antialiased;\n -moz-osx-font-smoothing: grayscale;\n }\n \n svg {\n max-height: 100%;\n }\n\n"])), theme.palette.grey["200"], theme.palette.grey["200"], theme.palette.blue["200"], theme.palette.blue["200"], theme.fonts.system);
294
299
  var templateObject_1$1p;
@@ -1362,9 +1367,11 @@ var SunburstChart = function (_a) {
1362
1367
  var data = _a.data, color = _a.color;
1363
1368
  setCurrentData(data);
1364
1369
  setCurrentColor(color);
1370
+ };
1371
+ React.useEffect(function () {
1365
1372
  if (onChange)
1366
1373
  onChange(currentData);
1367
- };
1374
+ }, [currentData]);
1368
1375
  if (!data.children)
1369
1376
  return jsxRuntime.jsx(jsxRuntime.Fragment, { children: "No data" });
1370
1377
  return (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsx(ChartContainer, __assign({ width: width, height: height, style: isHovering ? { cursor: "pointer" } : undefined }, { children: jsxRuntime.jsx(sunburst.ResponsiveSunburst, { theme: tooltip
@@ -1384,6 +1391,7 @@ var SunburstChart = function (_a) {
1384
1391
  ? function (node) { return (jsxRuntime.jsx(jsxRuntime.Fragment, { children: tooltip({
1385
1392
  label: node.data.label || node.data.name,
1386
1393
  value: getChildrenValue(node.data),
1394
+ data: __assign(__assign({}, node.data), { children: undefined }),
1387
1395
  }) })); }
1388
1396
  : undefined, layers: __spreadArray(__spreadArray([
1389
1397
  "arcs"
@@ -1407,7 +1415,7 @@ var SunburstChart = function (_a) {
1407
1415
  color: clickedData.color,
1408
1416
  });
1409
1417
  }
1410
- } }) })), jsxRuntime.jsx(ChartContainer, __assign({ width: width, height: "auto" }, { children: legend ? (jsxRuntime.jsx(Legend, { colors: colors !== null && colors !== void 0 ? colors : CHARTS_COLOR_SCHEME_CATEGORICAL_8_A, data: data.children.map(function (d) { return d.name; }), columns: typeof legend === "object" && legend.columns
1418
+ } }) })), jsxRuntime.jsx(ChartContainer, __assign({ width: width, height: "auto" }, { children: legend ? (jsxRuntime.jsx(Legend, { colors: colors !== null && colors !== void 0 ? colors : CHARTS_COLOR_SCHEME_CATEGORICAL_8_A, data: data.children.map(function (d) { return d.label || d.name; }), columns: typeof legend === "object" && legend.columns
1411
1419
  ? legend.columns
1412
1420
  : undefined, width: typeof legend === "object" && legend.width
1413
1421
  ? legend.width
@@ -3645,7 +3653,11 @@ var templateObject_1$4, templateObject_2$1, templateObject_3;
3645
3653
  * - To provide information a user needs to know or remember
3646
3654
  * - To display truncated text, use a title attribute instead
3647
3655
  */
3648
- var TooltipComponent = function (props) { return jsxRuntime.jsx(reactTooltips.Tooltip, __assign({}, props)); };
3656
+ var TooltipComponent = function (props) {
3657
+ var _a;
3658
+ var theme = React.useContext(styled.ThemeContext);
3659
+ return jsxRuntime.jsx(reactTooltips.Tooltip, __assign({}, props, { zIndex: (_a = props.zIndex) !== null && _a !== void 0 ? _a : theme.levels.front }));
3660
+ };
3649
3661
  var Tooltip = styled__default["default"](TooltipComponent)(templateObject_1$3 || (templateObject_1$3 = __makeTemplateObject(["\n box-shadow: ", ";\n"], ["\n box-shadow: ", ";\n"])), function (_a) {
3650
3662
  var theme = _a.theme;
3651
3663
  return theme.shadows.lg("".concat(theme.space.base * 3, "px"), "".concat(theme.space.base * 5, "px"), reactTheming.getColor("neutralHue", 600, theme, 0.15));
@@ -6,6 +6,7 @@ export interface SunburstData {
6
6
  label?: string;
7
7
  children?: SunburstData[];
8
8
  value?: number;
9
+ [key: string]: SunburstData[keyof SunburstData] | string | number | boolean;
9
10
  }
10
11
  export interface SunburstChartProps {
11
12
  data: SunburstData;
@@ -224,6 +224,12 @@ declare const theme: {
224
224
  md: (color: string) => string;
225
225
  lg: (offsetY: string, blurRadius: string, color: string) => string;
226
226
  };
227
+ levels: {
228
+ back: number;
229
+ base: number;
230
+ front: number;
231
+ modal: number;
232
+ };
227
233
  rtl: boolean;
228
234
  document?: any;
229
235
  borders: {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@appquality/unguess-design-system",
3
- "version": "2.12.42",
3
+ "version": "2.12.44",
4
4
  "dependencies": {
5
5
  "@nivo/bar": "^0.80.0",
6
6
  "@nivo/bullet": "^0.80.0",