@appquality/unguess-design-system 2.12.6 → 2.12.8
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.8 (Tue Sep 20 2022)
|
|
2
|
+
|
|
3
|
+
#### ⚠️ Pushed to `master`
|
|
4
|
+
|
|
5
|
+
- Merge branch 'master' of github.com:AppQuality/unguess-design-system ([@cannarocks](https://github.com/cannarocks))
|
|
6
|
+
- minor fix ([@cannarocks](https://github.com/cannarocks))
|
|
7
|
+
|
|
8
|
+
#### Authors: 1
|
|
9
|
+
|
|
10
|
+
- Luca Cannarozzo ([@cannarocks](https://github.com/cannarocks))
|
|
11
|
+
|
|
12
|
+
---
|
|
13
|
+
|
|
14
|
+
# v2.12.7 (Tue Sep 20 2022)
|
|
15
|
+
|
|
16
|
+
#### ⚠️ Pushed to `master`
|
|
17
|
+
|
|
18
|
+
- Merge branch 'master' of github.com:AppQuality/unguess-design-system ([@cannarocks](https://github.com/cannarocks))
|
|
19
|
+
- fix(sidebar): add internal state to handle prj accordion panels ([@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.6 (Tue Sep 20 2022)
|
|
2
28
|
|
|
3
29
|
#### ⚠️ Pushed to `master`
|
package/build/index.js
CHANGED
|
@@ -2332,8 +2332,9 @@ var SidebarLabel = styled__default["default"](SM)(templateObject_4$9 || (templat
|
|
|
2332
2332
|
* Used for this:
|
|
2333
2333
|
- To give a consistent dashboard and navigation experience
|
|
2334
2334
|
*/
|
|
2335
|
-
var Sidebar = function (
|
|
2336
|
-
var
|
|
2335
|
+
var Sidebar = function (_a) {
|
|
2336
|
+
var projects = _a.projects, props = __rest(_a, ["projects"]);
|
|
2337
|
+
var _b = React.useState(props.currentRoute || "home"), nav = _b[0], setNav = _b[1];
|
|
2337
2338
|
var showWorkspacesDropdown = window.matchMedia("only screen and (max-width: ".concat(theme.breakpoints.sm, ")")).matches;
|
|
2338
2339
|
var toggleNav = function () {
|
|
2339
2340
|
props.onToggleMenu && props.onToggleMenu();
|
|
@@ -2350,7 +2351,7 @@ var Sidebar = function (props) {
|
|
|
2350
2351
|
: {};
|
|
2351
2352
|
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 &&
|
|
2352
2353
|
props.workspaces &&
|
|
2353
|
-
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" })] })),
|
|
2354
|
+
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, expandedSections: [0], 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: {
|
|
2354
2355
|
marginLeft: theme.space.xs,
|
|
2355
2356
|
color: theme.palette.grey[800],
|
|
2356
2357
|
} }, { 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" })] }))] })));
|
|
@@ -5,5 +5,5 @@ import { SidebarArgs } from "./_types";
|
|
|
5
5
|
* Used for this:
|
|
6
6
|
- To give a consistent dashboard and navigation experience
|
|
7
7
|
*/
|
|
8
|
-
declare const Sidebar: (props: SidebarArgs) => JSX.Element;
|
|
8
|
+
declare const Sidebar: ({ projects, ...props }: SidebarArgs) => JSX.Element;
|
|
9
9
|
export { Sidebar };
|
|
@@ -6,5 +6,5 @@ export declare const Default: Story<SidebarStoryArgs>;
|
|
|
6
6
|
export declare const MultipleWorkspaces: Story<SidebarStoryArgs>;
|
|
7
7
|
export declare const WithTokens: Story<SidebarStoryArgs>;
|
|
8
8
|
export declare const WithAll: Story<SidebarStoryArgs>;
|
|
9
|
-
declare const _default: ComponentMeta<(props: SidebarArgs) => JSX.Element>;
|
|
9
|
+
declare const _default: ComponentMeta<({ projects, ...props }: SidebarArgs) => JSX.Element>;
|
|
10
10
|
export default _default;
|