@appquality/unguess-design-system 2.12.47 โ†’ 2.12.49

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,32 @@
1
+ # v2.12.49 (Mon Dec 12 2022)
2
+
3
+ #### ๐Ÿ› Bug Fix
4
+
5
+ - Update Breadcrumb children type in order to support single children cases [#150](https://github.com/AppQuality/unguess-design-system/pull/150) ([@cannarocks](https://github.com/cannarocks))
6
+
7
+ #### Authors: 1
8
+
9
+ - Luca Cannarozzo ([@cannarocks](https://github.com/cannarocks))
10
+
11
+ ---
12
+
13
+ # v2.12.48 (Mon Dec 12 2022)
14
+
15
+ #### ๐Ÿ› Bug Fix
16
+
17
+ - Fix bullet charts and improve responsiveness on breadcrumbs [#149](https://github.com/AppQuality/unguess-design-system/pull/149) ([@iacopolea](https://github.com/iacopolea) [@marcbon](https://github.com/marcbon) [@cannarocks](https://github.com/cannarocks))
18
+ - feat(app-header): add onclick on header item icon [#148](https://github.com/AppQuality/unguess-design-system/pull/148) ([@marcbon](https://github.com/marcbon))
19
+ - feat(breadcrumbs): add responsive behavior + remove last item from story (new desktop behavior) [#147](https://github.com/AppQuality/unguess-design-system/pull/147) ([@marcbon](https://github.com/marcbon))
20
+ - fix(bullet): UN-209 animate measue component [#146](https://github.com/AppQuality/unguess-design-system/pull/146) ([@iacopolea](https://github.com/iacopolea))
21
+
22
+ #### Authors: 3
23
+
24
+ - Iacopo Leardini ([@iacopolea](https://github.com/iacopolea))
25
+ - Luca Cannarozzo ([@cannarocks](https://github.com/cannarocks))
26
+ - Marco Bonomo ([@marcbon](https://github.com/marcbon))
27
+
28
+ ---
29
+
1
30
  # v2.12.47 (Wed Dec 07 2022)
2
31
 
3
32
  #### ๐Ÿ› Bug Fix
package/build/index.js CHANGED
@@ -266,10 +266,10 @@ var isMac = function () {
266
266
  var os = parser.getOS().name;
267
267
  return os && /Mac OS|iOS/.test(os);
268
268
  };
269
- styled.css(templateObject_1$1q || (templateObject_1$1q = __makeTemplateObject(["\n transition: opacity 0.2s ease;\n"], ["\n transition: opacity 0.2s ease;\n"])));
269
+ styled.css(templateObject_1$1r || (templateObject_1$1r = __makeTemplateObject(["\n transition: opacity 0.2s ease;\n"], ["\n transition: opacity 0.2s ease;\n"])));
270
270
  var sidebarNavItemExpanded = styled.css(templateObject_2$A || (templateObject_2$A = __makeTemplateObject(["\n visibility: visible;\n opacity: 1;\n // transition: opacity 0.2s ease;\n"], ["\n visibility: visible;\n opacity: 1;\n // transition: opacity 0.2s ease;\n"])));
271
271
  var sidebarNavItemHidden = styled.css(templateObject_3$n || (templateObject_3$n = __makeTemplateObject(["\n visibility: hidden;\n pointer-events: none;\n color: transparent;\n"], ["\n visibility: hidden;\n pointer-events: none;\n color: transparent;\n"])));
272
- var templateObject_1$1q, templateObject_2$A, templateObject_3$n;
272
+ var templateObject_1$1r, templateObject_2$A, templateObject_3$n;
273
273
 
274
274
  var gradients = {
275
275
  horizontal: "linear-gradient(90.81deg, ".concat(hex2rgba(palette.blue[600]), " 11.98%, ").concat(hex2rgba(palette.kale[400]), " 100%);"),
@@ -295,8 +295,8 @@ var theme = __assign(__assign({}, reactTheming.DEFAULT_THEME), { breakpoints: __
295
295
  modal: 200,
296
296
  } });
297
297
 
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);
299
- var templateObject_1$1p;
298
+ var GlobalStyle = styled.createGlobalStyle(templateObject_1$1q || (templateObject_1$1q = __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);
299
+ var templateObject_1$1q;
300
300
 
301
301
  /**
302
302
  * Accordions are headers that can be expanded to reveal content or collapsed to hide it.
@@ -312,7 +312,7 @@ Accordion.Header = reactAccordions.Accordion.Header;
312
312
  Accordion.Label = reactAccordions.Accordion.Label;
313
313
  Accordion.Panel = reactAccordions.Accordion.Panel;
314
314
 
315
- var UgAlert = styled__default["default"](reactNotifications.Alert)(templateObject_1$1o || (templateObject_1$1o = __makeTemplateObject(["\n background-color: white;\n color: ", ";\n border-width: 2px;\n font-size: ", ";\n"], ["\n background-color: white;\n color: ", ";\n border-width: 2px;\n font-size: ", ";\n"])), function (_a) {
315
+ var UgAlert = styled__default["default"](reactNotifications.Alert)(templateObject_1$1p || (templateObject_1$1p = __makeTemplateObject(["\n background-color: white;\n color: ", ";\n border-width: 2px;\n font-size: ", ";\n"], ["\n background-color: white;\n color: ", ";\n border-width: 2px;\n font-size: ", ";\n"])), function (_a) {
316
316
  var theme = _a.theme;
317
317
  return theme.palette.grey[700];
318
318
  }, function (_a) {
@@ -333,9 +333,9 @@ var UgAlertTitle = styled__default["default"](reactNotifications.Title)(template
333
333
  var Alert = function (props) { return jsxRuntime.jsx(UgAlert, __assign({}, props)); };
334
334
  Alert.Title = UgAlertTitle;
335
335
  Alert.Close = reactNotifications.Close;
336
- var templateObject_1$1o, templateObject_2$z;
336
+ var templateObject_1$1p, templateObject_2$z;
337
337
 
338
- var UgAvatar = styled__default["default"](reactAvatars.Avatar)(templateObject_1$1n || (templateObject_1$1n = __makeTemplateObject(["\n text-transform: uppercase;\n\n ", "\n"], ["\n text-transform: uppercase;\n\n ", "\n"])), function (props) {
338
+ var UgAvatar = styled__default["default"](reactAvatars.Avatar)(templateObject_1$1o || (templateObject_1$1o = __makeTemplateObject(["\n text-transform: uppercase;\n\n ", "\n"], ["\n text-transform: uppercase;\n\n ", "\n"])), function (props) {
339
339
  return props.avatarType &&
340
340
  props.avatarType !== "image" &&
341
341
  "background: ".concat(props.backgroundColor || theme.gradients.dark, ";");
@@ -359,7 +359,7 @@ var Avatar = function (props) {
359
359
  return (jsxRuntime.jsx(UgAvatar, __assign({}, props, { badge: fixedBadge, children: wrapChildren(props.avatarType || "text"), size: props.size || "small" })));
360
360
  };
361
361
  Avatar.Text = UgAvatar.Text;
362
- var templateObject_1$1n;
362
+ var templateObject_1$1o;
363
363
 
364
364
  /**
365
365
  * Breadcrumbs mark and communicate a userโ€™s location in the product.
@@ -368,7 +368,21 @@ var templateObject_1$1n;
368
368
  - To show the user where they are in a nested navigation
369
369
  - To provide a quick way to navigate to ancestor pages
370
370
  */
371
- var Breadcrumb = function (props) { return jsxRuntime.jsx(reactBreadcrumbs.Breadcrumb, __assign({}, props)); };
371
+ var StyledBreadcrumb$1 = styled__default["default"](reactBreadcrumbs.Breadcrumb)(templateObject_1$1n || (templateObject_1$1n = __makeTemplateObject(["\n @media (max-width: ", ") {\n > ol {\n display: block;\n\n > li {\n display: none;\n\n &:nth-last-child(", ") {\n display: block;\n width: 100%;\n text-overflow: ellipsis;\n overflow: hidden;\n position: relative;\n padding-left: ", "px;\n\n &::before {\n content: \"<\";\n position: absolute;\n left: 0;\n }\n }\n }\n }\n }\n"], ["\n @media (max-width: ", ") {\n > ol {\n display: block;\n\n > li {\n display: none;\n\n &:nth-last-child(", ") {\n display: block;\n width: 100%;\n text-overflow: ellipsis;\n overflow: hidden;\n position: relative;\n padding-left: ", "px;\n\n &::before {\n content: \"<\";\n position: absolute;\n left: 0;\n }\n }\n }\n }\n }\n"])), function (_a) {
372
+ var theme = _a.theme;
373
+ return theme.breakpoints.md;
374
+ }, function (_a) {
375
+ var showLastArrow = _a.showLastArrow;
376
+ return (showLastArrow ? 3 : 1);
377
+ }, function (_a) {
378
+ var theme = _a.theme;
379
+ return theme.space.base * 4;
380
+ });
381
+ var Breadcrumb = function (_a) {
382
+ var children = _a.children, _b = _a.showLastArrow, showLastArrow = _b === void 0 ? true : _b, props = __rest(_a, ["children", "showLastArrow"]);
383
+ return showLastArrow ? (jsxRuntime.jsxs(StyledBreadcrumb$1, __assign({}, props, { showLastArrow: true }, { children: [children, jsxRuntime.jsx("div", {})] }))) : (jsxRuntime.jsx(StyledBreadcrumb$1, __assign({}, props, { children: children })));
384
+ };
385
+ var templateObject_1$1n;
372
386
 
373
387
  /**
374
388
  * The Anchor is a link that helps users navigate from one location to another.
@@ -1153,7 +1167,7 @@ var CustomBulletChartMarkers = function (_a) {
1153
1167
 
1154
1168
  var CustomMeasure = function (_a) {
1155
1169
  var x = _a.x, y = _a.y, width = _a.width, height = _a.height;
1156
- return (jsxRuntime.jsx("rect", { x: x + 2, y: y + 2, width: width - 4, height: height - 4, fill: CHARTS_COLOR_PALETTE.darkGrey }));
1170
+ return (jsxRuntime.jsx(web.animated.rect, { x: x + 2, y: y + 2, width: width - 4, height: height - 4, fill: CHARTS_COLOR_PALETTE.darkGrey }));
1157
1171
  };
1158
1172
 
1159
1173
  var CustomTooltip = function (_a) {
@@ -2439,7 +2453,7 @@ var WorkspacesDropdown = function (props) {
2439
2453
  };
2440
2454
  var templateObject_1$D;
2441
2455
 
2442
- var LogoIconContainer = styled__default["default"](reactChrome.HeaderItem)(templateObject_1$C || (templateObject_1$C = __makeTemplateObject(["\n margin-right: 2px;\n border-right: none;\n @media (max-width: ", ") {\n right: 0;\n left: 0;\n margin-right: auto;\n margin-left: auto;\n position: absolute;\n }\n"], ["\n margin-right: 2px;\n border-right: none;\n @media (max-width: ", ") {\n right: 0;\n left: 0;\n margin-right: auto;\n margin-left: auto;\n position: absolute;\n }\n"])), function (_a) {
2456
+ var LogoIconContainer = styled__default["default"](reactChrome.HeaderItem)(templateObject_1$C || (templateObject_1$C = __makeTemplateObject(["\n margin-right: 2px;\n border-right: none;\n cursor: pointer;\n @media (max-width: ", ") {\n right: 0;\n left: 0;\n margin-right: auto;\n margin-left: auto;\n position: absolute;\n }\n"], ["\n margin-right: 2px;\n border-right: none;\n cursor: pointer;\n @media (max-width: ", ") {\n right: 0;\n left: 0;\n margin-right: auto;\n margin-left: auto;\n position: absolute;\n }\n"])), function (_a) {
2443
2457
  var theme = _a.theme;
2444
2458
  return theme.breakpoints.md;
2445
2459
  });
@@ -2471,7 +2485,8 @@ var MenuItem$1 = styled__default["default"](reactChrome.HeaderItem)(templateObje
2471
2485
  return theme.breakpoints.md;
2472
2486
  });
2473
2487
  var BrandItem = function (props) {
2474
- return (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsxs(MenuItem$1, __assign({}, props, { onClick: props.toggleMenu }, { children: [jsxRuntime.jsx(HeaderItemIcon, { children: jsxRuntime.jsx(SvgMenuStroke, {}) }), props.menuLabel && jsxRuntime.jsx(HeaderItemText, { children: props.menuLabel })] })), jsxRuntime.jsx(LogoIconContainer, __assign({}, props, { hasLogo: true }, { children: jsxRuntime.jsx(HeaderItemIcon, { children: jsxRuntime.jsx(Logo, { type: "icon", size: 150 }) }) })), props.workspaces && props.workspaces.length > 1 ? (jsxRuntime.jsx(DropdownItem, { children: jsxRuntime.jsx(WorkspacesDropdown, { workspaces: props.workspaces, workspacesLabel: props.workspacesLabel, activeWorkspace: props.activeWorkspace, onWorkspaceChange: props.onWorkspaceChange }) })) : (jsxRuntime.jsx(jsxRuntime.Fragment, { children: props.brandName && (jsxRuntime.jsx(BrandName, __assign({}, props, { children: jsxRuntime.jsx(HeaderItemText, { children: props.brandName }) }))) }))] }));
2488
+ var menuLabel = props.menuLabel, toggleMenu = props.toggleMenu, rest = __rest(props, ["menuLabel", "toggleMenu"]);
2489
+ return (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsxs(MenuItem$1, __assign({ onClick: toggleMenu }, { children: [jsxRuntime.jsx(HeaderItemIcon, { children: jsxRuntime.jsx(SvgMenuStroke, {}) }), menuLabel && jsxRuntime.jsx(HeaderItemText, { children: menuLabel })] })), jsxRuntime.jsx(LogoIconContainer, __assign({}, rest, { hasLogo: true }, { children: jsxRuntime.jsx(HeaderItemIcon, { children: jsxRuntime.jsx(Logo, { type: "icon", size: 150 }) }) })), props.workspaces && props.workspaces.length > 1 ? (jsxRuntime.jsx(DropdownItem, { children: jsxRuntime.jsx(WorkspacesDropdown, { workspaces: props.workspaces, workspacesLabel: props.workspacesLabel, activeWorkspace: props.activeWorkspace, onWorkspaceChange: props.onWorkspaceChange }) })) : (jsxRuntime.jsx(jsxRuntime.Fragment, { children: props.brandName && (jsxRuntime.jsx(BrandName, __assign({}, props, { children: jsxRuntime.jsx(HeaderItemText, { children: props.brandName }) }))) }))] }));
2475
2490
  };
2476
2491
  var templateObject_1$C, templateObject_2$j, templateObject_3$f, templateObject_4$b;
2477
2492
 
@@ -1,5 +1,7 @@
1
1
  /// <reference types="react" />
2
2
  export interface BreadcrumbArgs extends React.HTMLAttributes<HTMLDivElement> {
3
3
  /** The breadcrumb items */
4
- children: any[];
4
+ children: React.ReactNode | React.ReactNode[];
5
+ /** Show/hide last arrow */
6
+ showLastArrow?: boolean;
5
7
  }
@@ -1,10 +1,3 @@
1
- import { BreadcrumbArgs } from './_types';
2
- /**
3
- * Breadcrumbs mark and communicate a userโ€™s location in the product.
4
- * <hr>
5
- * Used for this:
6
- - To show the user where they are in a nested navigation
7
- - To provide a quick way to navigate to ancestor pages
8
- */
9
- declare const Breadcrumb: (props: BreadcrumbArgs) => JSX.Element;
1
+ import { BreadcrumbArgs } from "./_types";
2
+ declare const Breadcrumb: ({ children, showLastArrow, ...props }: BreadcrumbArgs) => JSX.Element;
10
3
  export { Breadcrumb };
@@ -1,5 +1,12 @@
1
1
  import { ComponentMeta, Story } from "@storybook/react";
2
+ import { AnchorArgs } from "../buttons/anchor/_types";
2
3
  import { BreadcrumbArgs } from "./_types";
3
- export declare const Default: Story<BreadcrumbArgs>;
4
- declare const _default: ComponentMeta<(props: BreadcrumbArgs) => JSX.Element>;
4
+ interface StoryArgs extends BreadcrumbArgs {
5
+ items: AnchorArgs & {
6
+ children: string;
7
+ onClick: () => void;
8
+ }[];
9
+ }
10
+ export declare const Default: Story<StoryArgs>;
11
+ declare const _default: ComponentMeta<({ children, showLastArrow, ...props }: BreadcrumbArgs) => JSX.Element>;
5
12
  export default _default;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@appquality/unguess-design-system",
3
- "version": "2.12.47",
3
+ "version": "2.12.49",
4
4
  "dependencies": {
5
5
  "@nivo/bar": "^0.80.0",
6
6
  "@nivo/bullet": "^0.80.0",