@appquality/unguess-design-system 2.12.10 → 2.12.12

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,29 @@
1
+ # v2.12.12 (Tue Sep 27 2022)
2
+
3
+ #### ⚠️ Pushed to `master`
4
+
5
+ - feat(sidebar): add projectAccordion scroll ([@cannarocks](https://github.com/cannarocks))
6
+
7
+ #### Authors: 1
8
+
9
+ - Luca Cannarozzo ([@cannarocks](https://github.com/cannarocks))
10
+
11
+ ---
12
+
13
+ # v2.12.11 (Wed Sep 21 2022)
14
+
15
+ #### ⚠️ Pushed to `master`
16
+
17
+ - Merge branch 'master' of github.com:AppQuality/unguess-design-system ([@cannarocks](https://github.com/cannarocks))
18
+ - feat(page-header): allow complex child on main sub-component ([@cannarocks](https://github.com/cannarocks))
19
+ - feat(inputToggle): keep ratio between textSize and lineHeight costant ([@cannarocks](https://github.com/cannarocks))
20
+
21
+ #### Authors: 1
22
+
23
+ - Luca Cannarozzo ([@cannarocks](https://github.com/cannarocks))
24
+
25
+ ---
26
+
1
27
  # v2.12.10 (Tue Sep 20 2022)
2
28
 
3
29
  #### ⚠️ Pushed to `master`
package/build/index.js CHANGED
@@ -265,7 +265,8 @@ var components = __assign(__assign({}, reactTheming.DEFAULT_THEME.components), {
265
265
  thumbSize: "60px",
266
266
  } });
267
267
 
268
- 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: __assign(__assign({}, reactTheming.DEFAULT_THEME.fontWeights), { semibold: 500 }), gradients: gradients, borderRadii: __assign(__assign({}, reactTheming.DEFAULT_THEME.borderRadii), { lg: "8px", xl: "16px", xxl: "32px" }), components: components, shadows: __assign(__assign({}, reactTheming.DEFAULT_THEME.shadows), { boxShadow: boxShadow }) });
268
+ 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: __assign(__assign({}, reactTheming.DEFAULT_THEME.fontWeights), { semibold: 500 }), gradients: gradients, borderRadii: __assign(__assign({}, reactTheming.DEFAULT_THEME.borderRadii), { lg: "8px", xl: "16px", xxl: "32px" }), lineHeights: __assign(__assign({}, reactTheming.DEFAULT_THEME.lineHeights), { xs: '16px' // same as sm
269
+ }), components: components, shadows: __assign(__assign({}, reactTheming.DEFAULT_THEME.shadows), { boxShadow: boxShadow }) });
269
270
 
270
271
  var GlobalStyle = styled.createGlobalStyle(templateObject_1$1i || (templateObject_1$1i = __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);
271
272
  var templateObject_1$1i;
@@ -713,7 +714,7 @@ var Label$2 = styled__default["default"](SM)(templateObject_1$1a || (templateObj
713
714
  var theme = _a.theme;
714
715
  return theme.palette.grey[500];
715
716
  });
716
- var Title$3 = styled__default["default"](LG)(templateObject_2$v || (templateObject_2$v = __makeTemplateObject(["\n color: ", ";\n font-weight: ", ";\n margin-top: ", ";\n"], ["\n color: ", ";\n font-weight: ", ";\n margin-top: ", ";\n"])), function (_a) {
717
+ var Title$2 = styled__default["default"](LG)(templateObject_2$v || (templateObject_2$v = __makeTemplateObject(["\n color: ", ";\n font-weight: ", ";\n margin-top: ", ";\n"], ["\n color: ", ";\n font-weight: ", ";\n margin-top: ", ";\n"])), function (_a) {
717
718
  var theme = _a.theme;
718
719
  return theme.colors.primaryHue;
719
720
  }, function (_a) {
@@ -723,7 +724,7 @@ var Title$3 = styled__default["default"](LG)(templateObject_2$v || (templateObje
723
724
  var theme = _a.theme;
724
725
  return theme.space.xxs;
725
726
  });
726
- var Description$3 = styled__default["default"](MD)(templateObject_3$k || (templateObject_3$k = __makeTemplateObject(["\n color: ", ";\n margin-top: ", ";\n"], ["\n color: ", ";\n margin-top: ", ";\n"])), function (_a) {
727
+ var Description$2 = styled__default["default"](MD)(templateObject_3$k || (templateObject_3$k = __makeTemplateObject(["\n color: ", ";\n margin-top: ", ";\n"], ["\n color: ", ";\n margin-top: ", ";\n"])), function (_a) {
727
728
  var theme = _a.theme;
728
729
  return theme.palette.grey[700];
729
730
  }, function (_a) {
@@ -736,8 +737,8 @@ var Container$2 = styled__default["default"].div(templateObject_4$f || (template
736
737
  });
737
738
  var CardHeader = function (props) { return jsxRuntime.jsx(Container$2, __assign({}, props)); };
738
739
  CardHeader.Label = Label$2;
739
- CardHeader.Title = Title$3;
740
- CardHeader.Text = Description$3;
740
+ CardHeader.Title = Title$2;
741
+ CardHeader.Text = Description$2;
741
742
  var templateObject_1$1a, templateObject_2$v, templateObject_3$k, templateObject_4$f;
742
743
 
743
744
  var Divider = styled__default["default"].div(templateObject_1$19 || (templateObject_1$19 = __makeTemplateObject(["\n width: 100%;\n height: 1px;\n margin-top: ", "px;\n margin-bottom: ", ";\n background-color: ", ";\n"], ["\n width: 100%;\n height: 1px;\n margin-top: ", "px;\n margin-bottom: ", ";\n background-color: ", ";\n"])), function (_a) {
@@ -1067,7 +1068,7 @@ var Label$1 = styled__default["default"](MD)(templateObject_4$d || (templateObje
1067
1068
  var theme = _a.theme;
1068
1069
  return theme.palette.grey[800];
1069
1070
  });
1070
- var Description$2 = styled__default["default"](SM)(templateObject_5$5 || (templateObject_5$5 = __makeTemplateObject(["\n color: ", ";\n"], ["\n color: ", ";\n"])), function (_a) {
1071
+ var Description$1 = styled__default["default"](SM)(templateObject_5$5 || (templateObject_5$5 = __makeTemplateObject(["\n color: ", ";\n"], ["\n color: ", ";\n"])), function (_a) {
1071
1072
  var theme = _a.theme;
1072
1073
  return theme.palette.grey[600];
1073
1074
  });
@@ -1077,7 +1078,7 @@ var Image$1 = React.memo(function (_a) {
1077
1078
  });
1078
1079
  var ItemContent = function (props) {
1079
1080
  var thumbSrc = props.thumbSrc, description = props.description, label = props.label;
1080
- return (jsxRuntime.jsxs(Container, { children: [thumbSrc && (jsxRuntime.jsx(ThumbContainer, { children: jsxRuntime.jsx(Image$1, { src: thumbSrc }) })), jsxRuntime.jsxs(MetaContainer$1, { children: [label && jsxRuntime.jsx(Label$1, __assign({ isBold: true }, { children: label })), description && jsxRuntime.jsx(Description$2, { children: description })] })] }));
1081
+ return (jsxRuntime.jsxs(Container, { children: [thumbSrc && (jsxRuntime.jsx(ThumbContainer, { children: jsxRuntime.jsx(Image$1, { src: thumbSrc }) })), jsxRuntime.jsxs(MetaContainer$1, { children: [label && jsxRuntime.jsx(Label$1, __assign({ isBold: true }, { children: label })), description && jsxRuntime.jsx(Description$1, { children: description })] })] }));
1081
1082
  };
1082
1083
  var templateObject_1$_, templateObject_2$q, templateObject_3$g, templateObject_4$d, templateObject_5$5;
1083
1084
 
@@ -1336,7 +1337,7 @@ var Header$1 = styled__default["default"].div(templateObject_1$W || (templateObj
1336
1337
  var theme = _a.theme;
1337
1338
  return theme.palette.grey[300];
1338
1339
  });
1339
- var Title$2 = styled__default["default"](MD)(templateObject_2$o || (templateObject_2$o = __makeTemplateObject(["\n ", "\n"], ["\n ", "\n"])), function (_a) {
1340
+ var Title$1 = styled__default["default"](MD)(templateObject_2$o || (templateObject_2$o = __makeTemplateObject(["\n ", "\n"], ["\n ", "\n"])), function (_a) {
1340
1341
  var validation = _a.validation, theme = _a.theme;
1341
1342
  if (validation === "success") {
1342
1343
  return "color: ".concat(theme.colors.successHue, ";");
@@ -1353,7 +1354,7 @@ var Title$2 = styled__default["default"](MD)(templateObject_2$o || (templateObje
1353
1354
  });
1354
1355
  var EditorHeader = function (props) {
1355
1356
  var title = props.title, validation = props.validation;
1356
- return (jsxRuntime.jsx(Header$1, { children: jsxRuntime.jsx(Title$2, __assign({ isBold: true, validation: validation }, { children: title || "Write" })) }));
1357
+ return (jsxRuntime.jsx(Header$1, { children: jsxRuntime.jsx(Title$1, __assign({ isBold: true, validation: validation }, { children: title || "Write" })) }));
1357
1358
  };
1358
1359
  var templateObject_1$W, templateObject_2$o;
1359
1360
 
@@ -1583,16 +1584,21 @@ var InputToggle = function (_a) {
1583
1584
  }, []);
1584
1585
  return (jsxRuntime.jsx(ToggleContext.Provider, __assign({ value: context }, { children: jsxRuntime.jsx(Wrapper, __assign({ ref: container, onClick: handleClick, onBlur: function () { return setIsEditing(false); } }, props)) })));
1585
1586
  };
1587
+ var getInputSize = function (textSize) { return ({
1588
+ fontSize: textSize in theme.fontSizes ? theme.fontSizes[textSize] : "22px",
1589
+ lineHeight: textSize in theme.lineHeights ? theme.lineHeights[textSize] : "28px",
1590
+ }); };
1586
1591
  var InputItem = function (props) {
1587
- var _a = props.placeholder, placeholder = _a === void 0 ? "Insert a value" : _a, value = props.value, style = props.style, _b = props.textSize, textSize = _b === void 0 ? '22px' : _b;
1592
+ var _a = props.placeholder, placeholder = _a === void 0 ? "Insert a value" : _a, value = props.value, style = props.style, _b = props.textSize, textSize = _b === void 0 ? "xl" : _b;
1588
1593
  var _c = React.useState(), input = _c[0], setInput = _c[1];
1589
1594
  var isEditing = React.useContext(ToggleContext).isEditing;
1595
+ var size = getInputSize(textSize);
1590
1596
  React.useEffect(function () {
1591
1597
  if (isEditing && input) {
1592
1598
  input.focus();
1593
1599
  }
1594
1600
  }, [isEditing, input]);
1595
- return isEditing ? (jsxRuntime.jsx(StyledInput, __assign({ ref: setInput }, props, { style: __assign({ fontSize: textSize, fontWeight: 500 }, style) }))) : (jsxRuntime.jsxs(StyledText$1, __assign({ isBold: true, style: __assign({ fontSize: textSize, fontWeight: 500 }, style) }, { children: [!value ? placeholder : value, " ", jsxRuntime.jsx(SvgNotesStroke, {})] })));
1601
+ return isEditing ? (jsxRuntime.jsx(StyledInput, __assign({ ref: setInput }, props, { style: __assign(__assign({ fontWeight: 500 }, size), style) }))) : (jsxRuntime.jsxs(StyledText$1, __assign({ isBold: true, style: __assign(__assign({ fontWeight: 500 }, size), style) }, { children: [!value ? placeholder : value, " ", jsxRuntime.jsx(SvgNotesStroke, {})] })));
1596
1602
  };
1597
1603
  InputToggle.Item = InputItem;
1598
1604
  InputToggle.Label = StyledLabel;
@@ -2025,10 +2031,7 @@ var UgNavItem$2 = styled__default["default"](reactChrome.NavItem)(templateObject
2025
2031
  var theme = _a.theme;
2026
2032
  return theme.space.xs;
2027
2033
  });
2028
- var NavItem = function (props) {
2029
- // const { isExpanded } = props;
2030
- return jsxRuntime.jsx(UgNavItem$2, __assign({}, props));
2031
- };
2034
+ var NavItem = React.forwardRef(function (props, ref) { return jsxRuntime.jsx(UgNavItem$2, __assign({ ref: ref }, props)); });
2032
2035
  var templateObject_1$w, templateObject_2$h;
2033
2036
 
2034
2037
  var UgNavIcon = styled__default["default"](reactChrome.NavItemIcon)(templateObject_1$v || (templateObject_1$v = __makeTemplateObject([""], [""])));
@@ -2107,7 +2110,8 @@ var UgNavItem = styled__default["default"](NavItem)(templateObject_2$g || (templ
2107
2110
  var theme = _a.theme;
2108
2111
  return theme.space.xxl;
2109
2112
  });
2110
- var NavItemProject = function (props) { return jsxRuntime.jsx(UgNavItem, __assign({}, props)); };
2113
+ var NavItemComponent = React.forwardRef(function (props, ref) { return jsxRuntime.jsx(UgNavItem, __assign({ ref: ref }, props)); });
2114
+ var NavItemProject = NavItemComponent;
2111
2115
  NavItemProject.Title = NavItemText;
2112
2116
  NavItemProject.SubTitle = UgProjectSubtitle;
2113
2117
  var templateObject_1$s, templateObject_2$g;
@@ -2336,6 +2340,7 @@ var SidebarLabel = styled__default["default"](SM)(templateObject_4$9 || (templat
2336
2340
  var Sidebar = function (_a) {
2337
2341
  var projects = _a.projects, _b = _a.defaultAccordionPanels, defaultAccordionPanels = _b === void 0 ? [0] : _b, props = __rest(_a, ["projects", "defaultAccordionPanels"]);
2338
2342
  var _c = React.useState(props.currentRoute || "home"), nav = _c[0], setNav = _c[1];
2343
+ var prjRef = React.useRef(null);
2339
2344
  var showWorkspacesDropdown = window.matchMedia("only screen and (max-width: ".concat(theme.breakpoints.sm, ")")).matches;
2340
2345
  var toggleNav = function () {
2341
2346
  props.onToggleMenu && props.onToggleMenu();
@@ -2350,9 +2355,18 @@ var Sidebar = function (_a) {
2350
2355
  paddingBottom: 0,
2351
2356
  }
2352
2357
  : {};
2358
+ React.useEffect(function () {
2359
+ var _a;
2360
+ if (prjRef && prjRef.current && props.isExpanded) {
2361
+ (_a = prjRef.current) === null || _a === void 0 ? void 0 : _a.scrollIntoView({
2362
+ behavior: "auto",
2363
+ block: "end"
2364
+ });
2365
+ }
2366
+ }, [props.isExpanded]);
2353
2367
  return props.isLoading ? (jsxRuntime.jsx(LoadingSidebar, __assign({}, props))) : (jsxRuntime.jsxs(Nav, __assign({}, props, { children: [jsxRuntime.jsxs(ScrollingContainer, { children: [jsxRuntime.jsx(NavToggle, { onClick: toggleNav, isExpanded: props.isExpanded }), showWorkspacesDropdown &&
2354
2368
  props.workspaces &&
2355
- props.workspaces.length > 1 && (jsxRuntime.jsx(jsxRuntime.Fragment, { children: jsxRuntime.jsx(StyledNavItem, __assign({ title: "Workspaces", hasLogo: true, isExpanded: props.isExpanded, style: padding }, { children: jsxRuntime.jsx(WorkspacesDropdown, { workspaces: props.workspaces, workspacesLabel: props.workspacesLabel, activeWorkspace: props.activeWorkspace, onWorkspaceChange: props.onWorkspaceChange, isCompact: true }) })) })), props.tokens && (jsxRuntime.jsx(SidebarLabel, __assign({ isExpanded: props.isExpanded }, { children: props.activityLabel || "My activity" }))), jsxRuntime.jsxs(NavItem, __assign({ className: "sidebar-first-level-item", title: "Home", 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" })] })), projects && projects.length ? (jsxRuntime.jsx(AccordionItem, __assign({ className: "sidebar-project-accordion-first-item", level: 4, defaultExpandedSections: defaultAccordionPanels, isExpanded: props.isExpanded }, { children: jsxRuntime.jsxs(AccordionItem.Section, { children: [jsxRuntime.jsx(AccordionItem.Header, { children: jsxRuntime.jsxs(AccordionItem.Label, { children: [props.dividerLabel || "", " ", jsxRuntime.jsx(SvgFolderIcon, { style: { marginLeft: theme.space.xs } })] }) }), jsxRuntime.jsx(AccordionItem.Panel, { children: projects.map(function (project) { return (jsxRuntime.jsxs(NavItemProject, __assign({ className: "sidebar-project-item", isExpanded: props.isExpanded, isCurrent: nav === "projects/".concat(project.id), onClick: function () { return navigate("projects", project.id); } }, { children: [jsxRuntime.jsx(NavItemProject.Title, { title: project.title, children: project.title }), jsxRuntime.jsx(NavItemProject.SubTitle, { children: project.campaigns })] }), project.id)); }) })] }) }))) : null, jsxRuntime.jsx(NavDivider, { isExpanded: props.isExpanded }), jsxRuntime.jsxs(NavItem, __assign({ className: "sidebar-first-level-item", title: "Services", isExpanded: props.isExpanded, isCurrent: nav === "services", onClick: function () { return navigate("services"); }, style: { marginBottom: "16px" } }, { children: [jsxRuntime.jsx(NavItemIcon, __assign({ isStyled: true }, { children: nav === "services" ? jsxRuntime.jsx(SvgTemplatesActive, {}) : jsxRuntime.jsx(SvgTemplates, {}) })), jsxRuntime.jsx(NavItemText, { children: props.servicesItemLabel || "Services" })] })), props.tokens && (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsx(SidebarLabel, __assign({ isExpanded: props.isExpanded }, { children: props.walletLabel || "Wallet" })), jsxRuntime.jsx(StyledNavItem, __assign({ title: "Tokens", isExpanded: props.isExpanded, style: { pointerEvents: "none", paddingTop: 0 } }, { children: jsxRuntime.jsx(Card, __assign({ style: { padding: theme.space.sm } }, { children: jsxRuntime.jsxs(TokenContainer, { children: [jsxRuntime.jsx(SvgToken, { width: 32 }), jsxRuntime.jsx(Span, __assign({ isBold: true, style: {
2369
+ props.workspaces.length > 1 && (jsxRuntime.jsx(jsxRuntime.Fragment, { children: jsxRuntime.jsx(StyledNavItem, __assign({ title: "Workspaces", hasLogo: true, isExpanded: props.isExpanded, style: padding }, { children: jsxRuntime.jsx(WorkspacesDropdown, { workspaces: props.workspaces, workspacesLabel: props.workspacesLabel, activeWorkspace: props.activeWorkspace, onWorkspaceChange: props.onWorkspaceChange, isCompact: true }) })) })), props.tokens && (jsxRuntime.jsx(SidebarLabel, __assign({ isExpanded: props.isExpanded }, { children: props.activityLabel || "My activity" }))), jsxRuntime.jsxs(NavItem, __assign({ className: "sidebar-first-level-item", title: "Home", 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" })] })), projects && projects.length ? (jsxRuntime.jsx(AccordionItem, __assign({ className: "sidebar-project-accordion-first-item", level: 4, defaultExpandedSections: defaultAccordionPanels, isExpanded: props.isExpanded }, { children: jsxRuntime.jsxs(AccordionItem.Section, { children: [jsxRuntime.jsx(AccordionItem.Header, { children: jsxRuntime.jsxs(AccordionItem.Label, { children: [props.dividerLabel || "", " ", jsxRuntime.jsx(SvgFolderIcon, { style: { marginLeft: theme.space.xs } })] }) }), jsxRuntime.jsx(AccordionItem.Panel, { children: projects.map(function (project, index) { return (jsxRuntime.jsxs(NavItemProject, __assign({ className: "sidebar-project-item", isExpanded: props.isExpanded, isCurrent: nav === "projects/".concat(project.id) }, (nav === "projects/".concat(project.id) && { ref: prjRef }), { onClick: function () { return navigate("projects", project.id); } }, (index === projects.length - 1 && { style: { marginBottom: 61 } }), { children: [jsxRuntime.jsx(NavItemProject.Title, { title: project.title, children: project.title }), jsxRuntime.jsx(NavItemProject.SubTitle, { children: project.campaigns })] }), project.id)); }) })] }) }))) : null, jsxRuntime.jsx(NavDivider, { isExpanded: props.isExpanded }), jsxRuntime.jsxs(NavItem, __assign({ className: "sidebar-first-level-item", title: "Services", isExpanded: props.isExpanded, isCurrent: nav === "services", onClick: function () { return navigate("services"); }, style: { marginBottom: "16px" } }, { children: [jsxRuntime.jsx(NavItemIcon, __assign({ isStyled: true }, { children: nav === "services" ? jsxRuntime.jsx(SvgTemplatesActive, {}) : jsxRuntime.jsx(SvgTemplates, {}) })), jsxRuntime.jsx(NavItemText, { children: props.servicesItemLabel || "Services" })] })), props.tokens && (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsx(SidebarLabel, __assign({ isExpanded: props.isExpanded }, { children: props.walletLabel || "Wallet" })), jsxRuntime.jsx(StyledNavItem, __assign({ title: "Tokens", isExpanded: props.isExpanded, style: { pointerEvents: "none", paddingTop: 0 } }, { children: jsxRuntime.jsx(Card, __assign({ style: { padding: theme.space.sm } }, { children: jsxRuntime.jsxs(TokenContainer, { children: [jsxRuntime.jsx(SvgToken, { width: 32 }), jsxRuntime.jsx(Span, __assign({ isBold: true, style: {
2356
2370
  marginLeft: theme.space.xs,
2357
2371
  color: theme.palette.grey[800],
2358
2372
  } }, { children: props.tokens + " " + (props.tokensLabel || "tokens") }))] }) })) }))] }))] }), jsxRuntime.jsxs(NavItem, __assign({ isExpanded: props.isExpanded, hasBrandmark: true, title: "Be smart from the start", style: { pointerEvents: "none", paddingBottom: theme.space.md } }, { children: [jsxRuntime.jsx(NavItemIcon, { children: jsxRuntime.jsx(Logo, { type: "icon", size: 150 }) }), jsxRuntime.jsx(NavItemText, { children: "UNGUESS" })] }))] })));
@@ -2382,7 +2396,7 @@ var templateObject_1$n;
2382
2396
  /**
2383
2397
  * Title is a basic component used to display a title. Often used in card headers.
2384
2398
  */
2385
- var Title$1 = function (props) { return jsxRuntime.jsx(reactNotifications.Title, __assign({}, props)); };
2399
+ var Title = function (props) { return jsxRuntime.jsx(reactNotifications.Title, __assign({}, props)); };
2386
2400
 
2387
2401
  var StyledCard = styled__default["default"](ContainerCard)(templateObject_1$m || (templateObject_1$m = __makeTemplateObject(["\n @media screen and (max-width: ", ") {\n border: 0;\n }\n"], ["\n @media screen and (max-width: ", ") {\n border: 0;\n }\n"])), theme.breakpoints.sm);
2388
2402
  /**
@@ -2394,7 +2408,7 @@ var StyledCard = styled__default["default"](ContainerCard)(templateObject_1$m ||
2394
2408
  var LoginForm = function (props) {
2395
2409
  var width = useWindowSize().width;
2396
2410
  var breakpointMd = parseInt(theme.breakpoints.md, 10);
2397
- return (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsxs(StyledCard, __assign({}, (width > breakpointMd && { isFloating: true }), props.card, { children: [jsxRuntime.jsx(Title$1, __assign({ style: {
2411
+ return (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsxs(StyledCard, __assign({}, (width > breakpointMd && { isFloating: true }), props.card, { children: [jsxRuntime.jsx(Title, __assign({ style: {
2398
2412
  textAlign: "center",
2399
2413
  marginTop: theme.space.sm,
2400
2414
  marginBottom: theme.space.lg,
@@ -2511,7 +2525,7 @@ var MetaContainer = styled__default["default"].div(templateObject_3$a || (templa
2511
2525
  var theme = _a.theme;
2512
2526
  return theme.breakpoints.sm;
2513
2527
  });
2514
- var Overline = styled__default["default"](MD)(templateObject_4$7 || (templateObject_4$7 = __makeTemplateObject(["\n color: ", ";\n margin-bottom: ", ";\n font-weight: ", ";\n line-height: ", ";\n"], ["\n color: ", ";\n margin-bottom: ", ";\n font-weight: ", ";\n line-height: ", ";\n"])), function (_a) {
2528
+ var MainOverline = styled__default["default"](MD)(templateObject_4$7 || (templateObject_4$7 = __makeTemplateObject(["\n color: ", ";\n margin-bottom: ", ";\n font-weight: ", ";\n line-height: ", ";\n"], ["\n color: ", ";\n margin-bottom: ", ";\n font-weight: ", ";\n line-height: ", ";\n"])), function (_a) {
2515
2529
  var theme = _a.theme;
2516
2530
  return theme.palette.grey[600];
2517
2531
  }, function (_a) {
@@ -2524,7 +2538,7 @@ var Overline = styled__default["default"](MD)(templateObject_4$7 || (templateObj
2524
2538
  var theme = _a.theme;
2525
2539
  return theme.lineHeights.md;
2526
2540
  });
2527
- var Title = styled__default["default"].h1(templateObject_5$3 || (templateObject_5$3 = __makeTemplateObject(["\n color: ", ";\n font-size: ", ";\n font-weight: ", ";\n line-height: ", ";\n"], ["\n color: ", ";\n font-size: ", ";\n font-weight: ", ";\n line-height: ", ";\n"])), function (_a) {
2541
+ var MainTitle = styled__default["default"].h1(templateObject_5$3 || (templateObject_5$3 = __makeTemplateObject(["\n color: ", ";\n font-size: ", ";\n font-weight: ", ";\n line-height: ", ";\n width: 100%;\n"], ["\n color: ", ";\n font-size: ", ";\n font-weight: ", ";\n line-height: ", ";\n width: 100%;\n"])), function (_a) {
2528
2542
  var theme = _a.theme;
2529
2543
  return theme.colors.primaryHue;
2530
2544
  }, function (_a) {
@@ -2537,7 +2551,7 @@ var Title = styled__default["default"].h1(templateObject_5$3 || (templateObject_
2537
2551
  var theme = _a.theme;
2538
2552
  return theme.lineHeights.xxxl;
2539
2553
  });
2540
- var Description$1 = styled__default["default"](LG)(templateObject_6$1 || (templateObject_6$1 = __makeTemplateObject(["\n color: ", ";\n margin: ", " 0;\n line-height: ", ";\n"], ["\n color: ", ";\n margin: ", " 0;\n line-height: ", ";\n"])), function (_a) {
2554
+ var MainDescription = styled__default["default"](LG)(templateObject_6$1 || (templateObject_6$1 = __makeTemplateObject(["\n color: ", ";\n margin: ", " 0;\n line-height: ", ";\n"], ["\n color: ", ";\n margin: ", " 0;\n line-height: ", ";\n"])), function (_a) {
2541
2555
  var theme = _a.theme;
2542
2556
  return theme.palette.grey[600];
2543
2557
  }, function (_a) {
@@ -2547,7 +2561,7 @@ var Description$1 = styled__default["default"](LG)(templateObject_6$1 || (templa
2547
2561
  var theme = _a.theme;
2548
2562
  return theme.lineHeights.lg;
2549
2563
  });
2550
- var Counters = styled__default["default"].div(templateObject_7 || (templateObject_7 = __makeTemplateObject(["\n display: flex;\n align-items: center;\n justify-content: flex-start;\n flex-direction: row;\n flex-wrap: wrap;\n margin-top: ", ";\n\n > div {\n padding: 0;\n margin-right: ", ";\n }\n"], ["\n display: flex;\n align-items: center;\n justify-content: flex-start;\n flex-direction: row;\n flex-wrap: wrap;\n margin-top: ", ";\n\n > div {\n padding: 0;\n margin-right: ", ";\n }\n"])), function (_a) {
2564
+ var MainCounters = styled__default["default"].div(templateObject_7 || (templateObject_7 = __makeTemplateObject(["\n display: flex;\n align-items: center;\n justify-content: flex-start;\n flex-direction: row;\n flex-wrap: wrap;\n margin-top: ", ";\n\n > div {\n padding: 0;\n margin-right: ", ";\n }\n"], ["\n display: flex;\n align-items: center;\n justify-content: flex-start;\n flex-direction: row;\n flex-wrap: wrap;\n margin-top: ", ";\n\n > div {\n padding: 0;\n margin-right: ", ";\n }\n"])), function (_a) {
2551
2565
  var theme = _a.theme;
2552
2566
  return theme.space.md;
2553
2567
  }, function (_a) {
@@ -2560,7 +2574,7 @@ var Image = styled__default["default"].img(templateObject_9 || (templateObject_9
2560
2574
  return theme.components.pageHeader.imgMaxHeight;
2561
2575
  });
2562
2576
  var Main = function (props) {
2563
- return (jsxRuntime.jsx(MainContainer, { children: jsxRuntime.jsxs(Row$1, { children: [jsxRuntime.jsx(StyledCol, __assign({ xs: 12, sm: props.metaImage ? 6 : 12 }, { children: jsxRuntime.jsxs(InformationContainer, { children: [props.infoOverline && jsxRuntime.jsx(Overline, { children: props.infoOverline }), props.infoTitle && jsxRuntime.jsx(Title, { children: props.infoTitle }), props.infoDescription && (jsxRuntime.jsx(Description$1, { children: props.infoDescription })), props.infoCounters && jsxRuntime.jsx(Counters, { children: props.infoCounters })] }) })), props.metaImage && (jsxRuntime.jsx(StyledCol, __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 }) }) })))] }) }));
2577
+ return (jsxRuntime.jsx(MainContainer, { children: jsxRuntime.jsxs(Row$1, { children: [jsxRuntime.jsx(StyledCol, __assign({ xs: 12, sm: props.metaImage ? 6 : 12 }, { children: jsxRuntime.jsx(InformationContainer, { children: props.children }) })), props.metaImage && (jsxRuntime.jsx(StyledCol, __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 }) }) })))] }) }));
2564
2578
  };
2565
2579
  var templateObject_1$i, templateObject_2$c, templateObject_3$a, templateObject_4$7, templateObject_5$3, templateObject_6$1, templateObject_7, templateObject_8, templateObject_9;
2566
2580
 
@@ -2615,6 +2629,10 @@ var PageHeader = function (props) {
2615
2629
  PageHeader.Breadcrumb = StyledBreadcrumb;
2616
2630
  PageHeader.Main = Main;
2617
2631
  PageHeader.Buttons = Buttons;
2632
+ PageHeader.Overline = MainOverline;
2633
+ PageHeader.Title = MainTitle;
2634
+ PageHeader.Description = MainDescription;
2635
+ PageHeader.Counters = MainCounters;
2618
2636
  var templateObject_1$h, templateObject_2$b, templateObject_3$9, templateObject_4$6;
2619
2637
 
2620
2638
  var _path$5;
@@ -3247,7 +3265,7 @@ exports.Tag = Tag;
3247
3265
  exports.Textarea = Textarea;
3248
3266
  exports.Tiles = Tiles;
3249
3267
  exports.Timeline = Timeline;
3250
- exports.Title = Title$1;
3268
+ exports.Title = Title;
3251
3269
  exports.ToastProvider = ToastProvider;
3252
3270
  exports.Toggle = Toggle;
3253
3271
  exports.TooltipModal = TooltipModal;
@@ -1,11 +1,12 @@
1
1
  import { IInputProps } from "@zendeskgarden/react-forms";
2
+ export declare type textSizes = 'xs' | 'sm' | 'md' | 'lg' | 'xl' | 'xxl' | 'xxxl';
2
3
  export interface InputToggleArgs extends IInputProps {
3
4
  /** Removes borders and padding */
4
5
  isBare?: boolean;
5
6
  /** Applies validation state styling */
6
7
  validation?: 'success' | 'warning' | 'error';
7
8
  /** Sets input size */
8
- textSize?: string;
9
+ textSize?: textSizes;
9
10
  /** Sets the initial focus */
10
11
  isFocused?: boolean;
11
12
  }
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  import { NavItemArgs } from "./_types";
2
- declare const NavItem: (props: NavItemArgs) => JSX.Element;
3
+ declare const NavItem: import("react").ForwardRefExoticComponent<NavItemArgs & import("react").RefAttributes<HTMLButtonElement>>;
3
4
  export { NavItem };
@@ -1,7 +1,9 @@
1
+ /// <reference types="react" />
1
2
  import { NavItemArgs } from "./_types";
2
- declare const NavItemProject: {
3
- (props: NavItemArgs): JSX.Element;
4
- Title: (props: import("./_types").NavItemTextArgs) => JSX.Element;
5
- SubTitle: import("styled-components").StyledComponent<(props: import("./_types").NavItemTextArgs) => JSX.Element, any, NavItemArgs, never>;
3
+ import { NavItemText } from "./navItemText";
4
+ declare const UgProjectSubtitle: import("styled-components").StyledComponent<(props: import("./_types").NavItemTextArgs) => JSX.Element, any, NavItemArgs, never>;
5
+ declare const NavItemProject: import("react").ForwardRefExoticComponent<NavItemArgs & import("react").RefAttributes<HTMLButtonElement>> & {
6
+ Title: typeof NavItemText;
7
+ SubTitle: typeof UgProjectSubtitle;
6
8
  };
7
9
  export { NavItemProject };
@@ -13,5 +13,9 @@ declare const PageHeader: {
13
13
  Breadcrumb: (props: BreadcrumbArgs) => JSX.Element;
14
14
  Main: (props: import("./_types").PageHeaderMainProps) => JSX.Element;
15
15
  Buttons: (props: PropsWithChildren<{}>) => JSX.Element;
16
+ Overline: import("styled-components").StyledComponent<(props: import("../../typography/typescale/_types").MDArgs) => JSX.Element, any, {}, never>;
17
+ Title: import("styled-components").StyledComponent<"h1", any, {}, never>;
18
+ Description: import("styled-components").StyledComponent<(props: import("../../typography/typescale/_types").LGArgs) => JSX.Element, any, {}, never>;
19
+ Counters: import("styled-components").StyledComponent<"div", any, {}, never>;
16
20
  };
17
21
  export { PageHeader };
@@ -8,6 +8,7 @@ interface PageHeaderStoryProps {
8
8
  pageHeaderMainArgs: PageHeaderMainProps;
9
9
  }
10
10
  export declare const Default: Story<PageHeaderStoryProps>;
11
+ export declare const Editable: Story<PageHeaderStoryProps>;
11
12
  declare const _default: ComponentMeta<{
12
13
  (props: import("./_types").PageHeaderProps): JSX.Element;
13
14
  Breadcrumb: (props: import("../../breadcrumbs/_types").BreadcrumbArgs) => JSX.Element;
@@ -15,5 +16,9 @@ declare const _default: ComponentMeta<{
15
16
  Buttons: (props: {
16
17
  children?: React.ReactNode;
17
18
  }) => JSX.Element;
19
+ Overline: import("styled-components").StyledComponent<(props: import("../../typography/typescale/_types").MDArgs) => JSX.Element, any, {}, never>;
20
+ Title: import("styled-components").StyledComponent<"h1", any, {}, never>;
21
+ Description: import("styled-components").StyledComponent<(props: import("../../typography/typescale/_types").LGArgs) => JSX.Element, any, {}, never>;
22
+ Counters: import("styled-components").StyledComponent<"div", any, {}, never>;
18
23
  }>;
19
24
  export default _default;
@@ -1,2 +1,6 @@
1
1
  import { PageHeaderMainProps } from "../_types";
2
+ export declare const MainOverline: import("styled-components").StyledComponent<(props: import("../../../typography/typescale/_types").MDArgs) => JSX.Element, any, {}, never>;
3
+ export declare const MainTitle: import("styled-components").StyledComponent<"h1", any, {}, never>;
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>;
2
6
  export declare const Main: (props: PageHeaderMainProps) => JSX.Element;
@@ -3,6 +3,7 @@ import { SidebarArgs } from "./_types";
3
3
  interface SidebarStoryArgs extends SidebarArgs {
4
4
  }
5
5
  export declare const Default: Story<SidebarStoryArgs>;
6
+ export declare const SingleProject: Story<SidebarStoryArgs>;
6
7
  export declare const MultipleWorkspaces: Story<SidebarStoryArgs>;
7
8
  export declare const WithTokens: Story<SidebarStoryArgs>;
8
9
  export declare const WithAll: Story<SidebarStoryArgs>;
@@ -194,6 +194,15 @@ declare const theme: {
194
194
  sm: string;
195
195
  md: string;
196
196
  };
197
+ lineHeights: {
198
+ xs: string;
199
+ sm: string;
200
+ md: string;
201
+ lg: string;
202
+ xl: string;
203
+ xxl: string;
204
+ xxxl: string;
205
+ };
197
206
  components: {
198
207
  chrome: any;
199
208
  notification: any;
@@ -237,14 +246,6 @@ declare const theme: {
237
246
  md: string;
238
247
  lg: string;
239
248
  };
240
- lineHeights: {
241
- sm: string;
242
- md: string;
243
- lg: string;
244
- xl: string;
245
- xxl: string;
246
- xxxl: string;
247
- };
248
249
  shadowWidths: {
249
250
  sm: string;
250
251
  md: string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@appquality/unguess-design-system",
3
- "version": "2.12.10",
3
+ "version": "2.12.12",
4
4
  "dependencies": {
5
5
  "@tiptap/extension-bubble-menu": "^2.0.0-beta.61",
6
6
  "@tiptap/extension-character-count": "^2.0.0-beta.31",