@appquality/unguess-design-system 2.7.1 → 2.8.2
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,33 @@
|
|
|
1
|
+
# v2.8.2 (Tue Apr 12 2022)
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# v2.8.1 (Tue Apr 12 2022)
|
|
8
|
+
|
|
9
|
+
#### 🐛 Bug Fix
|
|
10
|
+
|
|
11
|
+
- fix(sidebar): add navToggle callback [#32](https://github.com/AppQuality/unguess-design-system/pull/32) ([@cannarocks](https://github.com/cannarocks))
|
|
12
|
+
|
|
13
|
+
#### Authors: 1
|
|
14
|
+
|
|
15
|
+
- Luca Cannarozzo ([@cannarocks](https://github.com/cannarocks))
|
|
16
|
+
|
|
17
|
+
---
|
|
18
|
+
|
|
19
|
+
# v2.8.0 (Tue Apr 12 2022)
|
|
20
|
+
|
|
21
|
+
#### 🚀 Enhancement
|
|
22
|
+
|
|
23
|
+
- Fix/components for release [#31](https://github.com/AppQuality/unguess-design-system/pull/31) ([@marcbon](https://github.com/marcbon))
|
|
24
|
+
|
|
25
|
+
#### Authors: 1
|
|
26
|
+
|
|
27
|
+
- Marco Bonomo ([@marcbon](https://github.com/marcbon))
|
|
28
|
+
|
|
29
|
+
---
|
|
30
|
+
|
|
1
31
|
# v2.7.1 (Fri Apr 08 2022)
|
|
2
32
|
|
|
3
33
|
|
package/build/index.js
CHANGED
|
@@ -593,7 +593,7 @@ var getTypeData = function (type) {
|
|
|
593
593
|
};
|
|
594
594
|
}
|
|
595
595
|
};
|
|
596
|
-
var Wrapper = styled__default["default"](Card)(templateObject_1$H || (templateObject_1$H = __makeTemplateObject(["\n border-radius: ", ";\n padding: 1rem;\n border: 1px solid ", ";\n\n &:hover {\n box-shadow: ", ";\n }\n"], ["\n border-radius: ", ";\n padding: 1rem;\n border: 1px solid ", ";\n\n &:hover {\n box-shadow: ", ";\n }\n"])), theme.borderRadii.lg, theme.palette.grey["200"], theme.shadows.boxShadow(theme));
|
|
596
|
+
var Wrapper = styled__default["default"](Card)(templateObject_1$H || (templateObject_1$H = __makeTemplateObject(["\n border-radius: ", ";\n padding: 1rem;\n border: 1px solid ", ";\n display: flex;\n flex-direction: column;\n height: 100%;\n\n &:hover {\n box-shadow: ", ";\n }\n"], ["\n border-radius: ", ";\n padding: 1rem;\n border: 1px solid ", ";\n display: flex;\n flex-direction: column;\n height: 100%;\n\n &:hover {\n box-shadow: ", ";\n }\n"])), theme.borderRadii.lg, theme.palette.grey["200"], theme.shadows.boxShadow(theme));
|
|
597
597
|
var StyledTag$1 = styled__default["default"](Tag)(templateObject_2$b || (templateObject_2$b = __makeTemplateObject(["\n color: ", ";\n"], ["\n color: ", ";\n"])), theme.palette.grey["700"]);
|
|
598
598
|
var StyledTagNew = styled__default["default"](Tag)(templateObject_3$6 || (templateObject_3$6 = __makeTemplateObject(["\n height: ", "px;\n padding: ", "px ", "px;\n color: ", ";\n"], ["\n height: ", "px;\n padding: ", "px ", "px;\n color: ", ";\n"])), function (_a) {
|
|
599
599
|
var theme = _a.theme;
|
|
@@ -604,27 +604,27 @@ var StyledTagNew = styled__default["default"](Tag)(templateObject_3$6 || (templa
|
|
|
604
604
|
}, theme.palette.white);
|
|
605
605
|
var StyledLabel = styled__default["default"](Label)(templateObject_4$3 || (templateObject_4$3 = __makeTemplateObject(["\n font-size: ", ";\n color: ", "\n"], ["\n font-size: ", ";\n color: ", "\n"])), theme.fontSizes.sm, theme.palette.grey["500"]);
|
|
606
606
|
var StyledTitleLabel = styled__default["default"](Label)(templateObject_5$1 || (templateObject_5$1 = __makeTemplateObject(["\n color: ", ";\n font-size: ", ";\n word-wrap: break-word;\n"], ["\n color: ", ";\n font-size: ", ";\n word-wrap: break-word;\n"])), theme.palette.blue["600"], theme.fontSizes.lg);
|
|
607
|
-
var Divider = styled__default["default"].div(templateObject_6 || (templateObject_6 = __makeTemplateObject(["\n width: 100%;\n height: 1px;\n margin: ", " 0;\n background-color: ", ";\n"], ["\n width: 100%;\n height: 1px;\n margin: ", " 0;\n background-color: ", ";\n"])), theme.space.lg, theme.palette.grey["300"]);
|
|
607
|
+
var Divider = styled__default["default"].div(templateObject_6$1 || (templateObject_6$1 = __makeTemplateObject(["\n width: 100%;\n height: 1px;\n margin: ", " 0;\n background-color: ", ";\n"], ["\n width: 100%;\n height: 1px;\n margin: ", " 0;\n background-color: ", ";\n"])), theme.space.lg, theme.palette.grey["300"]);
|
|
608
608
|
var CardHeader = styled__default["default"].div(templateObject_7 || (templateObject_7 = __makeTemplateObject(["\n display: flex;\n align-items: center;\n flex-direction: row;\n justify-content: space-between;\n height: ", "px;\n"], ["\n display: flex;\n align-items: center;\n flex-direction: row;\n justify-content: space-between;\n height: ", "px;\n"])), theme.space.base * 6);
|
|
609
|
-
var CardBody = styled__default["default"].div(templateObject_8 || (templateObject_8 = __makeTemplateObject(["\n display: flex;\n align-items: flex-start;\n flex-direction: column;\n justify-content: flex-start;\n margin-top: ", ";\n"], ["\n display: flex;\n align-items: flex-start;\n flex-direction: column;\n justify-content: flex-start;\n margin-top: ", ";\n"])), theme.space.xxl);
|
|
609
|
+
var CardBody = styled__default["default"].div(templateObject_8 || (templateObject_8 = __makeTemplateObject(["\n display: flex;\n align-items: flex-start;\n flex-direction: column;\n justify-content: flex-start;\n margin-top: ", ";\n flex: 1;\n"], ["\n display: flex;\n align-items: flex-start;\n flex-direction: column;\n justify-content: flex-start;\n margin-top: ", ";\n flex: 1;\n"])), theme.space.xxl);
|
|
610
610
|
var CardFooter = styled__default["default"].div(templateObject_9 || (templateObject_9 = __makeTemplateObject(["\n display: flex;\n align-items: center;\n flex-direction: row;\n justify-content: space-between;\n"], ["\n display: flex;\n align-items: center;\n flex-direction: row;\n justify-content: space-between;\n"])));
|
|
611
611
|
var CampaignCard = function (props) {
|
|
612
|
-
var isNew = props.isNew, date = props.date,
|
|
612
|
+
var isNew = props.isNew, date = props.date, projectTitle = props.projectTitle, campaignTitle = props.campaignTitle, status = props.status, type = props.type, labelNew = props.labelNew;
|
|
613
613
|
var StatusIcon = getStatusIcon(status !== null && status !== void 0 ? status : "PROGRESS");
|
|
614
614
|
var typeData = getTypeData(type);
|
|
615
615
|
var PillIcon = typeData === null || typeData === void 0 ? void 0 : typeData.pillIcon;
|
|
616
|
-
var
|
|
617
|
-
if (
|
|
618
|
-
|
|
616
|
+
var projectTitleCut = projectTitle;
|
|
617
|
+
if (projectTitle.length > 42) {
|
|
618
|
+
projectTitleCut = "".concat(projectTitle.substring(0, 39), "...");
|
|
619
619
|
}
|
|
620
|
-
var
|
|
621
|
-
if (
|
|
622
|
-
|
|
620
|
+
var campaignTitleCut = campaignTitle;
|
|
621
|
+
if (campaignTitle.length > 29) {
|
|
622
|
+
campaignTitleCut = "".concat(campaignTitle.substring(0, 26), "...");
|
|
623
623
|
}
|
|
624
|
-
return jsxRuntime.jsxs(Wrapper, __assign({}, props, { children: [jsxRuntime.jsxs(CardHeader, { children: [jsxRuntime.jsx(StyledLabel, __assign({ isRegular: true }, { children: date })), isNew && (jsxRuntime.jsx(StyledTagNew, __assign({ hue: theme.palette.fuschia["600"], isPill: true, size: "medium", title: labelNew ? labelNew : "New!" }, { children: labelNew ? labelNew : "New!" })))] }), jsxRuntime.jsxs(CardBody, { children: [jsxRuntime.jsx(StyledLabel, __assign({ isRegular: true }, { children:
|
|
624
|
+
return jsxRuntime.jsxs(Wrapper, __assign({}, props, { children: [jsxRuntime.jsxs(CardHeader, { children: [jsxRuntime.jsx(StyledLabel, __assign({ isRegular: true }, { children: date })), isNew && (jsxRuntime.jsx(StyledTagNew, __assign({ hue: theme.palette.fuschia["600"], isPill: true, size: "medium", title: labelNew ? labelNew : "New!" }, { children: labelNew ? labelNew : "New!" })))] }), jsxRuntime.jsxs(CardBody, { children: [jsxRuntime.jsx(StyledLabel, __assign({ isRegular: true }, { children: projectTitleCut })), jsxRuntime.jsx(StyledTitleLabel, __assign({ isRegular: true }, { children: campaignTitleCut }))] }), jsxRuntime.jsx(Divider, {}), jsxRuntime.jsxs(CardFooter, { children: [typeData &&
|
|
625
625
|
jsxRuntime.jsxs(StyledTag$1, __assign({ size: "large", isPill: true, isRegular: true, hue: theme.palette.grey[100] }, { children: [jsxRuntime.jsx(Tag.Avatar, { children: jsxRuntime.jsx(PillIcon, {}) }), props.pillText] })), jsxRuntime.jsx(StatusIcon, {})] })] }));
|
|
626
626
|
};
|
|
627
|
-
var templateObject_1$H, templateObject_2$b, templateObject_3$6, templateObject_4$3, templateObject_5$1, templateObject_6, templateObject_7, templateObject_8, templateObject_9;
|
|
627
|
+
var templateObject_1$H, templateObject_2$b, templateObject_3$6, templateObject_4$3, templateObject_5$1, templateObject_6$1, templateObject_7, templateObject_8, templateObject_9;
|
|
628
628
|
|
|
629
629
|
/**
|
|
630
630
|
* Title is a basic component used to display a title. Often used in card headers.
|
|
@@ -1564,8 +1564,12 @@ var Sidebar = function (props) {
|
|
|
1564
1564
|
var toggleNav = function () {
|
|
1565
1565
|
props.onToggleMenu && props.onToggleMenu();
|
|
1566
1566
|
};
|
|
1567
|
-
|
|
1568
|
-
|
|
1567
|
+
var navigate = function (route) {
|
|
1568
|
+
props.onNavToggle && props.onNavToggle(route);
|
|
1569
|
+
setNav(route);
|
|
1570
|
+
};
|
|
1571
|
+
return (jsxRuntime.jsxs(Nav, __assign({}, props, { children: [jsxRuntime.jsx(NavToggle, { onClick: toggleNav, isExpanded: props.isExpanded }), props.tokens && (jsxRuntime.jsx(NavItem, __assign({ hasLogo: true, isExpanded: props.isExpanded, style: { pointerEvents: "none", paddingTop: 0 } }, { children: jsxRuntime.jsx(Card, __assign({ style: { padding: theme.space.sm, width: "70%" } }, { children: jsxRuntime.jsxs(TokenContainer, { children: [jsxRuntime.jsx(SvgToken, { width: 32 }), jsxRuntime.jsx(Span, __assign({ isBold: true, style: { marginLeft: theme.space.xs } }, { children: props.tokens + " " + (props.tokensLabel || "tokens") }))] }) })) }))), jsxRuntime.jsxs(NavItem, __assign({ isExpanded: props.isExpanded, isCurrent: nav === "home", onClick: function () { return navigate("home"); } }, { children: [jsxRuntime.jsx(NavItemIcon, __assign({ isStyled: true }, { children: nav === "home" ? jsxRuntime.jsx(SvgHomeFillStyled, {}) : jsxRuntime.jsx(SvgHomeFill, {}) })), jsxRuntime.jsx(NavItemText, { children: props.homeItemLabel || "My Campaigns" })] })), jsxRuntime.jsx(NavDivider, __assign({ isExpanded: props.isExpanded }, { children: props.dividerLabel || "" })), props.projects &&
|
|
1572
|
+
props.projects.map(function (project) { return (jsxRuntime.jsxs(NavItemProject, __assign({ isExpanded: props.isExpanded, isCurrent: nav === project.id, onClick: function () { return navigate(project.id); } }, { children: [jsxRuntime.jsx(NavItemProject.Title, { title: project.title, children: project.title }), jsxRuntime.jsx(NavItemProject.SubTitle, { children: project.campaigns })] }), project.id)); }), jsxRuntime.jsxs(NavItem, __assign({ isExpanded: props.isExpanded, hasBrandmark: true, title: "Be smart from the start", style: { pointerEvents: "none" } }, { children: [jsxRuntime.jsx(NavItemIcon, { children: jsxRuntime.jsx(Logo, { type: "icon", size: 150 }) }), jsxRuntime.jsx(NavItemText, { children: "UNGUESS" })] }))] })));
|
|
1569
1573
|
};
|
|
1570
1574
|
var templateObject_1$f;
|
|
1571
1575
|
|
|
@@ -1759,16 +1763,23 @@ var StyledParagraph = styled__default["default"](Paragraph)(templateObject_3$2 |
|
|
|
1759
1763
|
return theme.space.base * 4;
|
|
1760
1764
|
});
|
|
1761
1765
|
var Footer = styled__default["default"].div(templateObject_4$1 || (templateObject_4$1 = __makeTemplateObject(["\n margin-top: auto;\n"], ["\n margin-top: auto;\n"])));
|
|
1762
|
-
|
|
1766
|
+
styled__default["default"](MD)(templateObject_5 || (templateObject_5 = __makeTemplateObject(["\n text-align: left;\n color: ", ";\n"], ["\n text-align: left;\n color: ", ";\n"])), theme.palette.blue[600]);
|
|
1767
|
+
var Description = styled__default["default"].div(templateObject_6 || (templateObject_6 = __makeTemplateObject(["\n ", "\n justify-content: space-between;\n text-align: left;\n width: 100%;\n font-weight: ", ";\n font-size: ", ";\n line-height: 140%;\n color: ", ";\n margin: 2px 0px;\n"], ["\n ", "\n justify-content: space-between;\n text-align: left;\n width: 100%;\n font-weight: ", ";\n font-size: ", ";\n line-height: 140%;\n color: ", ";\n margin: 2px 0px;\n"])), flexCenter, theme.fontWeights.regular, theme.fontSizes.sm, theme.palette.grey["600"]);
|
|
1763
1768
|
var HelpItem = function (props) {
|
|
1764
1769
|
var _a, _b, _c;
|
|
1770
|
+
var csm = props.csm;
|
|
1771
|
+
var email = csm.email;
|
|
1765
1772
|
var copyToClipBoard = function () {
|
|
1766
1773
|
navigator.clipboard.writeText(props.csm.email);
|
|
1767
1774
|
};
|
|
1768
|
-
var
|
|
1775
|
+
var csmEmailCut = email;
|
|
1776
|
+
if (email.length > 24) {
|
|
1777
|
+
csmEmailCut = "".concat(email.substring(0, 21), "...");
|
|
1778
|
+
}
|
|
1779
|
+
var content = (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsx(PreviousButton, __assign({ onClick: function () { return props.setActive(""); }, isBasic: true }, { children: props.title })), jsxRuntime.jsx(Separator, {}), jsxRuntime.jsxs(StyledBody$2, { children: [jsxRuntime.jsx(Paragraph, __assign({ style: { color: theme.palette.grey[600] } }, { children: jsxRuntime.jsx(SM, { children: props.contactLabel }) })), jsxRuntime.jsx(StyledParagraph, { children: jsxRuntime.jsx(Avatar, { children: (_a = props.csm.picture) !== null && _a !== void 0 ? _a : getInitials(props.csm.name), avatarType: props.csm.picture ? "image" : "text", size: "large" }) }), jsxRuntime.jsxs(StyledParagraph, { children: [jsxRuntime.jsx(MD, __assign({ isBold: true }, { children: props.csm.name })), jsxRuntime.jsxs(Description, { children: [jsxRuntime.jsx(Anchor, __assign({ href: "mailto:".concat(props.csm.email), style: { color: theme.palette.grey[600] } }, { children: csmEmailCut })), jsxRuntime.jsxs(Button, __assign({ isBasic: true, onClick: copyToClipBoard, size: "small", variant: "isBasic" }, { children: [jsxRuntime.jsx(Button.StartIcon, { children: jsxRuntime.jsx(SvgCopy, {}) }), (_b = props.copyLabel) !== null && _b !== void 0 ? _b : "Copy"] }))] })] })] }), jsxRuntime.jsxs(Footer, { children: [jsxRuntime.jsx(Separator, {}), jsxRuntime.jsxs(StyledButton, __assign({ isStretched: true, isBasic: true, onClick: props.toggleChat, style: { paddingLeft: theme.space.xxs } }, { children: [jsxRuntime.jsx(StyledButton.StartIcon, { children: jsxRuntime.jsx(SvgInfoFill, { fill: theme.palette.blue[600] }) }), (_c = props.chatSupportLabel) !== null && _c !== void 0 ? _c : "Report a technical issue"] }))] })] }));
|
|
1769
1780
|
return (jsxRuntime.jsx(jsxRuntime.Fragment, { children: jsxRuntime.jsx(MenuItem, __assign({ content: content, value: props.value, selectedItem: props.selectedItem, setActive: props.setActive, icon: jsxRuntime.jsx(SvgQuestionMark, { fill: theme.palette.grey[600] }) }, { children: props.title })) }));
|
|
1770
1781
|
};
|
|
1771
|
-
var templateObject_1$8, templateObject_2$5, templateObject_3$2, templateObject_4$1, templateObject_5;
|
|
1782
|
+
var templateObject_1$8, templateObject_2$5, templateObject_3$2, templateObject_4$1, templateObject_5, templateObject_6;
|
|
1772
1783
|
|
|
1773
1784
|
var _path$1;
|
|
1774
1785
|
|
|
@@ -12,11 +12,11 @@ export interface CampaignCardsProps extends CardProps {
|
|
|
12
12
|
/**
|
|
13
13
|
* the main topic of the card
|
|
14
14
|
*/
|
|
15
|
-
|
|
15
|
+
projectTitle: string;
|
|
16
16
|
/**
|
|
17
17
|
* a specification to the topic of the card
|
|
18
18
|
*/
|
|
19
|
-
|
|
19
|
+
campaignTitle: string;
|
|
20
20
|
/**
|
|
21
21
|
* the status of the card,
|
|
22
22
|
* can be only
|
|
@@ -5,8 +5,10 @@ export interface SidebarArgs extends NavArgs {
|
|
|
5
5
|
homeItemLabel?: string;
|
|
6
6
|
dividerLabel?: string;
|
|
7
7
|
tokens?: string;
|
|
8
|
+
tokensLabel?: string;
|
|
8
9
|
isExpanded?: boolean;
|
|
9
10
|
onToggleMenu?: () => void;
|
|
11
|
+
onNavToggle?: (route: string) => void;
|
|
10
12
|
}
|
|
11
13
|
export interface ProjectItem {
|
|
12
14
|
id: string;
|