@appquality/unguess-design-system 2.12.78 → 2.12.80

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.80 (Wed Mar 01 2023)
2
+
3
+ #### 🐛 Bug Fix
4
+
5
+ - New page header [#223](https://github.com/AppQuality/unguess-design-system/pull/223) ([@marcbon](https://github.com/marcbon))
6
+ - Un 524 page header [#222](https://github.com/AppQuality/unguess-design-system/pull/222) ([@marcbon](https://github.com/marcbon))
7
+
8
+ #### Authors: 1
9
+
10
+ - Marco Bonomo ([@marcbon](https://github.com/marcbon))
11
+
12
+ ---
13
+
14
+ # v2.12.79 (Tue Feb 28 2023)
15
+
16
+ #### 🐛 Bug Fix
17
+
18
+ - New version with Tag fixes [#221](https://github.com/AppQuality/unguess-design-system/pull/221) ([@iacopolea](https://github.com/iacopolea) [@marcbon](https://github.com/marcbon))
19
+ - Fix-cards-tags [#220](https://github.com/AppQuality/unguess-design-system/pull/220) ([@iacopolea](https://github.com/iacopolea))
20
+
21
+ #### Authors: 2
22
+
23
+ - Iacopo Leardini ([@iacopolea](https://github.com/iacopolea))
24
+ - Marco Bonomo ([@marcbon](https://github.com/marcbon))
25
+
26
+ ---
27
+
1
28
  # v2.12.78 (Mon Feb 27 2023)
2
29
 
3
30
  #### 🐛 Bug Fix
package/build/index.js CHANGED
@@ -459,7 +459,7 @@ Avatar.Text = UgAvatar.Text;
459
459
  - To show the user where they are in a nested navigation
460
460
  - To provide a quick way to navigate to ancestor pages
461
461
  */
462
- const StyledBreadcrumb$1 = styled__default["default"](reactBreadcrumbs.Breadcrumb) `
462
+ const StyledBreadcrumb = styled__default["default"](reactBreadcrumbs.Breadcrumb) `
463
463
  @media (max-width: ${({ theme }) => theme.breakpoints.sm}) {
464
464
  > ol {
465
465
  display: block;
@@ -487,7 +487,7 @@ const StyledBreadcrumb$1 = styled__default["default"](reactBreadcrumbs.Breadcrum
487
487
  `;
488
488
  const Breadcrumb = (_a) => {
489
489
  var { children, showLastArrow = true } = _a, props = __rest(_a, ["children", "showLastArrow"]);
490
- return showLastArrow ? (jsxRuntime.jsxs(StyledBreadcrumb$1, Object.assign({}, props, { showLastArrow: true }, { children: [children, jsxRuntime.jsx("div", {})] }))) : (jsxRuntime.jsx(StyledBreadcrumb$1, Object.assign({}, props, { children: children })));
490
+ return showLastArrow ? (jsxRuntime.jsxs(StyledBreadcrumb, Object.assign({}, props, { showLastArrow: true }, { children: [children, jsxRuntime.jsx("div", {})] }))) : (jsxRuntime.jsx(StyledBreadcrumb, Object.assign({}, props, { children: children })));
491
491
  };
492
492
 
493
493
  /**
@@ -1124,14 +1124,13 @@ const getTypeDataIcon = (type) => {
1124
1124
  }
1125
1125
  };
1126
1126
  const StyledTag$2 = styled__default["default"](Tag) `
1127
- color: ${({ theme }) => theme.palette.grey["700"]};
1127
+ max-width: 85%;
1128
1128
  cursor: pointer;
1129
1129
  `;
1130
1130
  const StyledTagNew$1 = styled__default["default"](Tag) `
1131
1131
  height: ${({ theme }) => theme.space.base * 6}px;
1132
1132
  padding: ${({ theme }) => theme.space.base}px
1133
1133
  ${({ theme }) => theme.space.base * 2}px;
1134
- color: ${({ theme }) => theme.palette.white};
1135
1134
  `;
1136
1135
  const StyledLabel$3 = styled__default["default"](SM) `
1137
1136
  color: ${({ theme }) => theme.palette.grey["500"]};
@@ -1140,7 +1139,7 @@ const CampaignCard = (_a) => {
1140
1139
  var { isNew, date, projectTitle, campaignTitle, status, type, labelNew } = _a, props = __rest(_a, ["isNew", "date", "projectTitle", "campaignTitle", "status", "type", "labelNew"]);
1141
1140
  const StatusIcon = getStatusIcon(status !== null && status !== void 0 ? status : "PROGRESS");
1142
1141
  const PillIcon = getTypeDataIcon(type);
1143
- return props.isLoading ? (jsxRuntime.jsx(CampaignCardSkeleton, {})) : (jsxRuntime.jsxs(SpecialCard, Object.assign({ title: campaignTitle }, props, { children: [jsxRuntime.jsxs(SpecialCard.Meta, { children: [jsxRuntime.jsx(StyledLabel$3, { children: date }), isNew && (jsxRuntime.jsx(StyledTagNew$1, Object.assign({ hue: theme.palette.fuschia["600"], isPill: true, size: "medium", title: labelNew ? labelNew : "New!" }, { children: labelNew ? labelNew : "New!" })))] }), jsxRuntime.jsxs(SpecialCard.Header, { children: [jsxRuntime.jsx(SpecialCard.Header.Label, { children: projectTitle }), jsxRuntime.jsx(SpecialCard.Header.Title, { children: campaignTitle })] }), jsxRuntime.jsxs(SpecialCard.Footer, { children: [props.pillText && (jsxRuntime.jsxs(StyledTag$2, Object.assign({ size: "large", isPill: true, isRegular: true, hue: theme.palette.grey[100] }, { children: [jsxRuntime.jsx(Tag.Avatar, { children: jsxRuntime.jsx(PillIcon, {}) }), jsxRuntime.jsx(Ellipsis, Object.assign({ style: { maxWidth: "180px" } }, { children: props.pillText }))] }))), jsxRuntime.jsx(StatusIcon, {})] })] })));
1142
+ return props.isLoading ? (jsxRuntime.jsx(CampaignCardSkeleton, {})) : (jsxRuntime.jsxs(SpecialCard, Object.assign({ title: campaignTitle }, props, { children: [jsxRuntime.jsxs(SpecialCard.Meta, { children: [jsxRuntime.jsx(StyledLabel$3, { children: date }), isNew && (jsxRuntime.jsx(StyledTagNew$1, Object.assign({ hue: theme.palette.fuschia["600"], color: theme.palette.white, isPill: true, size: "medium", title: labelNew ? labelNew : "New!" }, { children: labelNew ? labelNew : "New!" })))] }), jsxRuntime.jsxs(SpecialCard.Header, { children: [jsxRuntime.jsx(SpecialCard.Header.Label, { children: projectTitle }), jsxRuntime.jsx(SpecialCard.Header.Title, { children: campaignTitle })] }), jsxRuntime.jsxs(SpecialCard.Footer, { children: [props.pillText && (jsxRuntime.jsxs(StyledTag$2, Object.assign({ size: "large" }, { children: [jsxRuntime.jsx(Tag.Avatar, { children: jsxRuntime.jsx(PillIcon, {}) }), jsxRuntime.jsx(Ellipsis, { children: props.pillText })] }))), jsxRuntime.jsx(StatusIcon, {})] })] })));
1144
1143
  };
1145
1144
 
1146
1145
  const StyledTagNew = styled__default["default"](Tag) `
@@ -1233,7 +1232,7 @@ const StyledCard$1 = styled__default["default"](SpecialCard) `
1233
1232
  `;
1234
1233
  const ServiceCard = (props) => {
1235
1234
  const { serviceIcon, serviceTitle, serviceSubtitle } = props;
1236
- return (jsxRuntime.jsxs(StyledCard$1, Object.assign({}, props, { children: [props.isHoverable && (jsxRuntime.jsxs(HoverBody, { children: [jsxRuntime.jsxs(HoverMetaContainer, { children: [props.hoverTitle && (jsxRuntime.jsx(ServiceTitle, { children: props.hoverTitle })), props.hoverSubtitle && (jsxRuntime.jsx(ServiceSubtitle, { children: props.hoverSubtitle }))] }), props.hoverButtons && (jsxRuntime.jsx(ButtonsWrap$1, { children: props.hoverButtons.map((button) => button) }))] })), jsxRuntime.jsxs(CardContent, { children: [jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [serviceIcon && jsxRuntime.jsx(SpecialCard.Thumb, { children: serviceIcon }), jsxRuntime.jsxs(SpecialCard.Header, { children: [jsxRuntime.jsx(SpecialCard.Header.Label, { children: serviceSubtitle }), jsxRuntime.jsx(SpecialCard.Header.Title, { children: serviceTitle })] })] }), props.tags && (jsxRuntime.jsx(SpecialCard.Footer, Object.assign({ justifyContent: "start", wrap: true }, { children: props.tags.map((tag, index) => (jsxRuntime.jsxs(StyledTag$1, Object.assign({ size: "large", isPill: true, isRegular: true, hue: theme.palette.grey[100] }, { children: [jsxRuntime.jsx(StyledTag$1.Avatar, { children: tag.icon }), tag.label] }), index))) })))] })] })));
1235
+ return (jsxRuntime.jsxs(StyledCard$1, Object.assign({}, props, { children: [props.isHoverable && (jsxRuntime.jsxs(HoverBody, { children: [jsxRuntime.jsxs(HoverMetaContainer, { children: [props.hoverTitle && (jsxRuntime.jsx(ServiceTitle, { children: props.hoverTitle })), props.hoverSubtitle && (jsxRuntime.jsx(ServiceSubtitle, { children: props.hoverSubtitle }))] }), props.hoverButtons && (jsxRuntime.jsx(ButtonsWrap$1, { children: props.hoverButtons.map((button) => button) }))] })), jsxRuntime.jsxs(CardContent, { children: [jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [serviceIcon && jsxRuntime.jsx(SpecialCard.Thumb, { children: serviceIcon }), jsxRuntime.jsxs(SpecialCard.Header, { children: [jsxRuntime.jsx(SpecialCard.Header.Label, { children: serviceSubtitle }), jsxRuntime.jsx(SpecialCard.Header.Title, { children: serviceTitle })] })] }), props.tags && (jsxRuntime.jsx(SpecialCard.Footer, Object.assign({ justifyContent: "start", wrap: true }, { children: props.tags.map((tag, index) => (jsxRuntime.jsxs(StyledTag$1, Object.assign({ size: "large" }, { children: [jsxRuntime.jsx(StyledTag$1.Avatar, { children: tag.icon }), tag.label] }), index))) })))] })] })));
1237
1236
  };
1238
1237
 
1239
1238
  const ButtonsWrap = styled__default["default"].div `
@@ -3747,7 +3746,7 @@ const StyledBody$4 = styled__default["default"](Modal.Body) `
3747
3746
  padding: ${({ theme }) => `${theme.space.lg} ${theme.space.md}`};
3748
3747
  }
3749
3748
  `;
3750
- const StyledFooter = styled__default["default"](Modal.Footer) `
3749
+ const StyledFooter$1 = styled__default["default"](Modal.Footer) `
3751
3750
  padding: ${({ theme }) => theme.space.base * 4}px
3752
3751
  ${({ theme }) => theme.space.base * 6}px;
3753
3752
  `;
@@ -3759,7 +3758,7 @@ const StyledModalClose = styled__default["default"](reactModals.Close) `
3759
3758
  const ModalFullScreen = (props) => jsxRuntime.jsx(StyledModal$1, Object.assign({}, props));
3760
3759
  ModalFullScreen.Header = StyledHeader;
3761
3760
  ModalFullScreen.Body = StyledBody$4;
3762
- ModalFullScreen.Footer = StyledFooter;
3761
+ ModalFullScreen.Footer = StyledFooter$1;
3763
3762
  ModalFullScreen.Close = StyledModalClose;
3764
3763
  ModalFullScreen.FooterItem = FooterItem;
3765
3764
 
@@ -3820,9 +3819,9 @@ const MetaContainer = styled__default["default"].div `
3820
3819
  `;
3821
3820
  const MainOverline = styled__default["default"](MD) `
3822
3821
  color: ${({ theme }) => theme.palette.grey[600]};
3823
- margin-bottom: ${({ theme }) => theme.space.md};
3824
3822
  font-weight: ${({ theme }) => theme.fontWeights.semibold};
3825
3823
  line-height: ${({ theme }) => theme.lineHeights.md};
3824
+ margin-bottom: ${({ theme }) => theme.space.md};
3826
3825
  `;
3827
3826
  const MainTitle = styled__default["default"].h1 `
3828
3827
  color: ${({ theme }) => theme.colors.primaryHue};
@@ -3830,27 +3829,23 @@ const MainTitle = styled__default["default"].h1 `
3830
3829
  font-weight: ${({ theme }) => theme.fontWeights.semibold};
3831
3830
  line-height: ${({ theme }) => theme.lineHeights.xxxl};
3832
3831
  width: 100%;
3832
+ margin-bottom: ${({ theme }) => theme.space.sm};
3833
3833
  `;
3834
3834
  const MainDescription = styled__default["default"](LG) `
3835
3835
  color: ${({ theme }) => theme.palette.grey[600]};
3836
- margin: ${({ theme }) => theme.space.md} 0;
3837
3836
  line-height: ${({ theme }) => theme.lineHeights.lg};
3837
+ margin-bottom: ${({ theme }) => theme.space.md};
3838
3838
  `;
3839
- const MainCounters = styled__default["default"].div `
3839
+ const MainMeta = styled__default["default"].div `
3840
3840
  display: flex;
3841
3841
  align-items: center;
3842
3842
  justify-content: flex-start;
3843
3843
  flex-direction: row;
3844
3844
  flex-wrap: wrap;
3845
- margin-top: ${({ theme }) => theme.space.md};
3846
-
3847
- > div {
3848
- padding: 0;
3849
- margin-right: ${({ theme }) => theme.space.sm};
3850
- }
3845
+ width: 100%;
3851
3846
  `;
3852
3847
  const StyledCol = styled__default["default"](Col) `
3853
- margin: 0;
3848
+ margin-bottom: 0;
3854
3849
  `;
3855
3850
  const Image = styled__default["default"].img `
3856
3851
  width: auto;
@@ -3858,7 +3853,7 @@ const Image = styled__default["default"].img `
3858
3853
  max-height: ${({ theme }) => theme.components.pageHeader.imgMaxHeight};
3859
3854
  `;
3860
3855
  const Main = (props) => {
3861
- return (jsxRuntime.jsx(MainContainer, { children: jsxRuntime.jsxs(Row$1, { children: [jsxRuntime.jsx(StyledCol, Object.assign({ xs: 12, sm: props.metaImage ? 6 : 12 }, { children: jsxRuntime.jsx(InformationContainer, { children: props.children }) })), props.metaImage && (jsxRuntime.jsx(StyledCol, Object.assign({ xs: 12, sm: props.metaImage ? 6 : 12 }, { children: jsxRuntime.jsx(MetaContainer, { children: jsxRuntime.jsx(Image, { src: props.metaImage, title: props.infoTitle, alt: props.infoTitle }) }) })))] }) }));
3856
+ return (jsxRuntime.jsx(MainContainer, { children: jsxRuntime.jsxs(Row$1, { children: [jsxRuntime.jsx(StyledCol, Object.assign({ xs: 12, sm: props.mainImageUrl ? 6 : 12 }, { children: jsxRuntime.jsx(InformationContainer, { children: props.children }) })), props.mainImageUrl && (jsxRuntime.jsx(StyledCol, Object.assign({ xs: 12, sm: props.mainImageUrl ? 6 : 12 }, { children: jsxRuntime.jsx(MetaContainer, { children: jsxRuntime.jsx(Image, { src: props.mainImageUrl, title: props.mainTitle, alt: props.mainTitle }) }) })))] }) }));
3862
3857
  };
3863
3858
 
3864
3859
  const StyledPageHeader = styled__default["default"].div `
@@ -3867,9 +3862,10 @@ const StyledPageHeader = styled__default["default"].div `
3867
3862
  align-items: center;
3868
3863
  justify-content: center;
3869
3864
  width: 100%;
3870
- padding: ${({ theme }) => theme.space.sm} 0;
3871
3865
  box-sizing: border-box;
3872
3866
  border-bottom: 1px solid ${({ theme }) => theme.palette.grey[200]};
3867
+ padding-top: ${({ theme }) => theme.space.lg};
3868
+ padding-bottom: ${({ theme }) => theme.space.md};
3873
3869
  `;
3874
3870
  const PullLeft = styled__default["default"].div `
3875
3871
  display: flex;
@@ -3880,7 +3876,7 @@ const PullLeft = styled__default["default"].div `
3880
3876
  width: 100%;
3881
3877
  margin-bottom: ${({ theme }) => theme.space.sm};
3882
3878
  `;
3883
- const ButtonContainer = styled__default["default"].div `
3879
+ const FooterContainer = styled__default["default"].div `
3884
3880
  display: flex;
3885
3881
  flex-direction: row;
3886
3882
  align-items: center;
@@ -3888,11 +3884,12 @@ const ButtonContainer = styled__default["default"].div `
3888
3884
  flex-wrap: wrap;
3889
3885
  width: 100%;
3890
3886
  margin: ${({ theme }) => theme.space.md} 0;
3887
+ padding: ${({ theme }) => theme.space.xxs} 0;
3891
3888
  `;
3892
- const StyledBreadcrumb = (props) => {
3889
+ const StyledBreadcrumbs = (props) => {
3893
3890
  return (jsxRuntime.jsx(PullLeft, { children: jsxRuntime.jsx(Breadcrumb, Object.assign({}, props)) }));
3894
3891
  };
3895
- const Buttons = (props) => (jsxRuntime.jsx(ButtonContainer, Object.assign({}, props)));
3892
+ const StyledFooter = (props) => (jsxRuntime.jsx(FooterContainer, Object.assign({}, props)));
3896
3893
  /**
3897
3894
  * A PageHeader is a modular container used for pages with an opinionated set of default spaces and subcomponents order.
3898
3895
  * <hr>
@@ -3901,13 +3898,13 @@ const Buttons = (props) => (jsxRuntime.jsx(ButtonContainer, Object.assign({}, pr
3901
3898
  - As a container for the top part of the page
3902
3899
  */
3903
3900
  const PageHeader = (props) => jsxRuntime.jsx(StyledPageHeader, Object.assign({}, props));
3904
- PageHeader.Breadcrumb = StyledBreadcrumb;
3901
+ PageHeader.Breadcrumbs = StyledBreadcrumbs;
3905
3902
  PageHeader.Main = Main;
3906
- PageHeader.Buttons = Buttons;
3907
3903
  PageHeader.Overline = MainOverline;
3908
3904
  PageHeader.Title = MainTitle;
3909
3905
  PageHeader.Description = MainDescription;
3910
- PageHeader.Counters = MainCounters;
3906
+ PageHeader.Meta = MainMeta;
3907
+ PageHeader.Footer = StyledFooter;
3911
3908
 
3912
3909
  const Wrapper = styled__default["default"].div `
3913
3910
  position: absolute;
@@ -2,9 +2,9 @@ import React, { HTMLAttributes } from "react";
2
2
  export interface PageHeaderProps extends HTMLAttributes<HTMLDivElement> {
3
3
  }
4
4
  export interface PageHeaderMainProps extends HTMLAttributes<HTMLDivElement> {
5
- infoTitle: string;
6
- infoOverline?: string;
7
- infoDescription?: string;
8
- infoCounters?: React.ReactNode;
9
- metaImage?: string;
5
+ mainTitle: string;
6
+ mainOverline?: string;
7
+ mainDescription?: string;
8
+ mainMeta?: React.ReactNode;
9
+ mainImageUrl?: string;
10
10
  }
@@ -10,12 +10,12 @@ import { PropsWithChildren } from "react";
10
10
  */
11
11
  declare const PageHeader: {
12
12
  (props: PageHeaderProps): JSX.Element;
13
- Breadcrumb: (props: BreadcrumbArgs) => JSX.Element;
13
+ Breadcrumbs: (props: BreadcrumbArgs) => JSX.Element;
14
14
  Main: (props: import("./_types").PageHeaderMainProps) => JSX.Element;
15
- Buttons: (props: PropsWithChildren<{}>) => JSX.Element;
16
15
  Overline: import("styled-components").StyledComponent<(props: import("../../typography/typescale/_types").MDArgs) => JSX.Element, any, {}, never>;
17
16
  Title: import("styled-components").StyledComponent<"h1", any, {}, never>;
18
17
  Description: import("styled-components").StyledComponent<(props: import("../../typography/typescale/_types").LGArgs) => JSX.Element, any, {}, never>;
19
- Counters: import("styled-components").StyledComponent<"div", any, {}, never>;
18
+ Meta: import("styled-components").StyledComponent<"div", any, {}, never>;
19
+ Footer: (props: PropsWithChildren<{}>) => JSX.Element;
20
20
  };
21
21
  export { PageHeader };
@@ -7,18 +7,20 @@ interface PageHeaderStoryProps {
7
7
  };
8
8
  pageHeaderMainArgs: PageHeaderMainProps;
9
9
  }
10
- export declare const Default: Story<PageHeaderStoryProps>;
11
- export declare const Editable: Story<PageHeaderStoryProps>;
10
+ export declare const Complete: Story<PageHeaderStoryProps>;
11
+ export declare const CompleteEditable: Story<PageHeaderStoryProps>;
12
+ export declare const FirstLevel: Story<PageHeaderStoryProps>;
13
+ export declare const SecondThirdLevel: Story<PageHeaderStoryProps>;
12
14
  declare const _default: ComponentMeta<{
13
15
  (props: import("./_types").PageHeaderProps): JSX.Element;
14
- Breadcrumb: (props: import("../../breadcrumbs/_types").BreadcrumbArgs) => JSX.Element;
16
+ Breadcrumbs: (props: import("../../breadcrumbs/_types").BreadcrumbArgs) => JSX.Element;
15
17
  Main: (props: PageHeaderMainProps) => JSX.Element;
16
- Buttons: (props: {
17
- children?: React.ReactNode;
18
- }) => JSX.Element;
19
18
  Overline: import("styled-components").StyledComponent<(props: import("../../typography/typescale/_types").MDArgs) => JSX.Element, any, {}, never>;
20
19
  Title: import("styled-components").StyledComponent<"h1", any, {}, never>;
21
20
  Description: import("styled-components").StyledComponent<(props: import("../../typography/typescale/_types").LGArgs) => JSX.Element, any, {}, never>;
22
- Counters: import("styled-components").StyledComponent<"div", any, {}, never>;
21
+ Meta: import("styled-components").StyledComponent<"div", any, {}, never>;
22
+ Footer: (props: {
23
+ children?: React.ReactNode;
24
+ }) => JSX.Element;
23
25
  }>;
24
26
  export default _default;
@@ -2,5 +2,5 @@ import { PageHeaderMainProps } from "../_types";
2
2
  export declare const MainOverline: import("styled-components").StyledComponent<(props: import("../../../typography/typescale/_types").MDArgs) => JSX.Element, any, {}, never>;
3
3
  export declare const MainTitle: import("styled-components").StyledComponent<"h1", any, {}, never>;
4
4
  export declare const MainDescription: import("styled-components").StyledComponent<(props: import("../../../typography/typescale/_types").LGArgs) => JSX.Element, any, {}, never>;
5
- export declare const MainCounters: import("styled-components").StyledComponent<"div", any, {}, never>;
5
+ export declare const MainMeta: import("styled-components").StyledComponent<"div", any, {}, never>;
6
6
  export declare const Main: (props: PageHeaderMainProps) => JSX.Element;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@appquality/unguess-design-system",
3
- "version": "2.12.78",
3
+ "version": "2.12.80",
4
4
  "dependencies": {
5
5
  "@nivo/bar": "^0.80.0",
6
6
  "@nivo/bullet": "^0.80.0",