@appquality/unguess-design-system 3.1.1 → 3.1.2-nav-beta

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,35 +1,3 @@
1
- # v3.0.5 (Wed May 31 2023)
2
-
3
- #### 🐛 Bug Fix
4
-
5
- - Colors [#253](https://github.com/AppQuality/unguess-design-system/pull/253) ([@marcbon](https://github.com/marcbon) [@cannarocks](https://github.com/cannarocks) [@iacopolea](https://github.com/iacopolea))
6
- - Un 616 colors [#236](https://github.com/AppQuality/unguess-design-system/pull/236) ([@iacopolea](https://github.com/iacopolea))
7
- - Update rollup configuration [#252](https://github.com/AppQuality/unguess-design-system/pull/252) ([@cannarocks](https://github.com/cannarocks))
8
- - 🎨 style(input-toggle): remove width property from EditIcon component to allow for dynamic sizing [#250](https://github.com/AppQuality/unguess-design-system/pull/250) ([@marcbon](https://github.com/marcbon))
9
-
10
- #### Authors: 3
11
-
12
- - Iacopo Leardini ([@iacopolea](https://github.com/iacopolea))
13
- - Luca Cannarozzo ([@cannarocks](https://github.com/cannarocks))
14
- - Marco Bonomo ([@marcbon](https://github.com/marcbon))
15
-
16
- ---
17
-
18
- # v3.0.4 (Wed May 17 2023)
19
-
20
- #### 🐛 Bug Fix
21
-
22
- - Fix SVGR issues [#249](https://github.com/AppQuality/unguess-design-system/pull/249) ([@marcbon](https://github.com/marcbon) [@cannarocks](https://github.com/cannarocks))
23
- - Fix-svgr-viewbox [#248](https://github.com/AppQuality/unguess-design-system/pull/248) ([@marcbon](https://github.com/marcbon))
24
- - 🎨 style(tabs/index.tsx): add overflow-x hidden to StyledTabPanel [#247](https://github.com/AppQuality/unguess-design-system/pull/247) ([@marcbon](https://github.com/marcbon))
25
-
26
- #### Authors: 2
27
-
28
- - Luca Cannarozzo ([@cannarocks](https://github.com/cannarocks))
29
- - Marco Bonomo ([@marcbon](https://github.com/marcbon))
30
-
31
- ---
32
-
33
1
  # v3.0.3 (Fri May 12 2023)
34
2
 
35
3
  #### 🐛 Bug Fix
package/build/index.js CHANGED
@@ -3359,6 +3359,48 @@ const NavItemProject = NavItemComponent;
3359
3359
  NavItemProject.Title = NavItemText;
3360
3360
  NavItemProject.SubTitle = UgProjectSubtitle;
3361
3361
 
3362
+ const NavAccordionItem = styled__default["default"](Accordion) `
3363
+ opacity: 1;
3364
+ ${sidebarNavItemExpanded}
3365
+ ${(props) => !props.isExpanded && sidebarNavItemHidden}
3366
+ order: 1;
3367
+ margin-top: ${({ theme }) => theme.space.xs}px;
3368
+ `;
3369
+ const AccordionItemHeader = styled__default["default"](Accordion.Header) `
3370
+ flex-direction: row;
3371
+ border-top-left-radius: ${({ theme }) => theme.space.base * 6}px;
3372
+ border-bottom-left-radius: ${({ theme }) => theme.space.base * 6}px;
3373
+
3374
+ > button {
3375
+ padding-right: 2px;
3376
+ }
3377
+
3378
+ svg {
3379
+ width: 26px;
3380
+ }
3381
+ `;
3382
+ const AccordionItemPanel = styled__default["default"](Accordion.Panel) `
3383
+ max-height: 180px;
3384
+ padding: 0;
3385
+ padding-left: 5px;
3386
+ overflow-y: hidden;
3387
+ opacity: 1;
3388
+ &:hover {
3389
+ overflow-y: auto;
3390
+ }
3391
+ `;
3392
+ const AccordionItemLabel = styled__default["default"](Accordion.Label) `
3393
+ padding: 12px 9px;
3394
+ ${({ theme }) => `
3395
+ fill: ${getColor(theme.colors.primaryHue, 600)};
3396
+ font-weight: ${theme.fontWeights.medium};
3397
+ `}
3398
+ ${props => reactTheming.retrieveComponentStyles("text.primary", props)}
3399
+ `;
3400
+ NavAccordionItem.Panel = AccordionItemPanel;
3401
+ NavAccordionItem.Header = AccordionItemHeader;
3402
+ NavAccordionItem.Label = AccordionItemLabel;
3403
+
3362
3404
  var _path$j;
3363
3405
  function _extends$m() { _extends$m = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$m.apply(this, arguments); }
3364
3406
  var SvgHomeFill = function SvgHomeFill(props) {
@@ -3440,17 +3482,19 @@ var SvgToken = function SvgToken(props) {
3440
3482
 
3441
3483
  var _path$h;
3442
3484
  function _extends$j() { _extends$j = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$j.apply(this, arguments); }
3443
- var SvgFolderIcon = function SvgFolderIcon(props) {
3485
+ var SvgProjectsIcon = function SvgProjectsIcon(props) {
3444
3486
  return /*#__PURE__*/React__namespace.createElement("svg", _extends$j({
3445
- width: 12,
3446
- height: 12,
3447
- viewBox: "0 0 12 12",
3487
+ width: 22,
3488
+ height: 22,
3489
+ viewBox: "0 0 22 22",
3490
+ fill: "none",
3448
3491
  xmlns: "http://www.w3.org/2000/svg"
3449
3492
  }, props), _path$h || (_path$h = /*#__PURE__*/React__namespace.createElement("path", {
3450
3493
  fillRule: "evenodd",
3451
3494
  clipRule: "evenodd",
3452
- d: "M9.99976 4H6.99976V3.5C6.99976 2.62386 6.3759 2 5.49976 2H2.49976C1.62362 2 0.999758 2.62386 0.999758 3.5V6H0.499758C0.174472 6 -0.0642066 6.30569 0.0146868 6.62127L1.01469 10.6213C1.07033 10.8439 1.27032 11 1.49976 11H10.4998C10.7292 11 10.9292 10.8439 10.9848 10.6213L11.9848 6.62127C12.0637 6.30569 11.825 6 11.4998 6H10.9998V5C10.9998 4.42386 10.5759 4 9.99976 4ZM10.8594 7H1.14015L1.89015 10H10.1094L10.8594 7ZM1.99976 6H9.99976V5H5.99976V3.5C5.99976 3.17614 5.82362 3 5.49976 3H2.49976C2.1759 3 1.99976 3.17614 1.99976 3.5V6Z",
3453
- fill: "currentColor"
3495
+ d: "M18.5 5H12.25V4.375C12.25 3.34232 11.4077 2.5 10.375 2.5H4.125C3.09232 2.5 2.25 3.34232 2.25 4.375V10.005C1.53426 10.0685 1.01354 10.7329 1.1335 11.4527L2.171 17.7027C2.27098 18.3026 2.79293 18.75 3.4 18.75H18.6C19.2071 18.75 19.729 18.3026 19.829 17.7027L20.8666 11.4523C20.9865 10.7329 20.4657 10.0685 19.75 10.005V6.25C19.75 5.55482 19.1952 5 18.5 5ZM19.633 11.25H2.36695L3.404 17.4973C3.40404 17.4974 18.6 17.5 18.6 17.5C18.5929 17.5 19.633 11.25 19.633 11.25ZM3.5 10H18.5V6.25H11V4.375C11 4.03268 10.7173 3.75 10.375 3.75H4.125C3.78268 3.75 3.5 4.03268 3.5 4.375V10Z",
3496
+ fill: "#336179",
3497
+ stroke: "#336179"
3454
3498
  })));
3455
3499
  };
3456
3500
 
@@ -3521,48 +3565,6 @@ const LoadingSidebar = (props) => {
3521
3565
  return (jsxRuntime.jsxs(StyledNav, Object.assign({}, props, { isExpanded: isExpanded }, { children: [jsxRuntime.jsx(NavToggle, { isExpanded: isExpanded }), jsxRuntime.jsxs(NavItem, Object.assign({ isExpanded: isExpanded, isCurrent: true }, { children: [jsxRuntime.jsx(NavItemIcon, Object.assign({ isStyled: true }, { children: jsxRuntime.jsx(Skeleton, { width: "32px", height: "32px", style: { borderRadius: "100%" } }) })), jsxRuntime.jsx(Skeleton, { height: "12px", width: "60%" }), jsxRuntime.jsx(NavItemText, {})] })), jsxRuntime.jsx(NavDivider, { isExpanded: isExpanded }), jsxRuntime.jsxs(NavItemProject, Object.assign({ isExpanded: isExpanded, isCurrent: false }, { children: [jsxRuntime.jsx(Skeleton, { width: "60%", style: { marginBottom: "6px" } }), jsxRuntime.jsx(Skeleton, { height: "12px", width: "80%" })] }), 1), jsxRuntime.jsxs(NavItemProject, Object.assign({ isExpanded: isExpanded, isCurrent: false }, { children: [jsxRuntime.jsx(Skeleton, { width: "60%", style: { marginBottom: "6px" } }), jsxRuntime.jsx(Skeleton, { height: "12px", width: "80%" })] }), 2), jsxRuntime.jsxs(NavItemProject, Object.assign({ isExpanded: isExpanded, isCurrent: false }, { children: [jsxRuntime.jsx(Skeleton, { width: "60%", style: { marginBottom: "6px" } }), jsxRuntime.jsx(Skeleton, { height: "12px", width: "80%" })] }), 3), jsxRuntime.jsxs(NavItemProject, Object.assign({ isExpanded: isExpanded, isCurrent: false }, { children: [jsxRuntime.jsx(Skeleton, { width: "60%", style: { marginBottom: "6px" } }), jsxRuntime.jsx(Skeleton, { height: "12px", width: "80%" })] }), 4), jsxRuntime.jsxs(NavItem, Object.assign({ isExpanded: isExpanded, hasBrandmark: true, title: "Be smart from the start", style: { pointerEvents: "none" } }, { children: [jsxRuntime.jsx(NavItemIcon, { children: jsxRuntime.jsx(Skeleton, { width: "32px", height: "32px", style: { borderRadius: "100%" } }) }), jsxRuntime.jsx(NavItemText, { children: "UNGUESS" })] }))] })));
3522
3566
  };
3523
3567
 
3524
- const AccordionItem = styled__default["default"](Accordion) `
3525
- opacity: 1;
3526
- ${sidebarNavItemExpanded}
3527
- ${(props) => !props.isExpanded && sidebarNavItemHidden}
3528
- order: 1;
3529
- margin-top: ${({ theme }) => theme.space.xs}px;
3530
- `;
3531
- const AccordionItemHeader = styled__default["default"](Accordion.Header) `
3532
- flex-direction: row-reverse;
3533
- border-top-left-radius: ${({ theme }) => theme.space.base * 6}px;
3534
- border-bottom-left-radius: ${({ theme }) => theme.space.base * 6}px;
3535
-
3536
- > button {
3537
- padding-left: 2px;
3538
- }
3539
-
3540
- svg {
3541
- width: 26px;
3542
- }
3543
- `;
3544
- const AccordionItemPanel = styled__default["default"](Accordion.Panel) `
3545
- max-height: 180px;
3546
- padding: 0;
3547
- padding-left: 5px;
3548
- overflow-y: hidden;
3549
- opacity: 1;
3550
- &:hover {
3551
- overflow-y: auto;
3552
- }
3553
- `;
3554
- const AccordionItemLabel = styled__default["default"](Accordion.Label) `
3555
- padding: 12px 9px;
3556
- ${({ theme }) => `
3557
- fill: ${getColor(theme.colors.primaryHue, 600)};
3558
- font-weight: ${theme.fontWeights.medium};
3559
- `}
3560
- ${props => reactTheming.retrieveComponentStyles("text.primary", props)}
3561
- `;
3562
- AccordionItem.Panel = AccordionItemPanel;
3563
- AccordionItem.Header = AccordionItemHeader;
3564
- AccordionItem.Label = AccordionItemLabel;
3565
-
3566
3568
  const TokenContainer = styled__default["default"].div `
3567
3569
  display: flex;
3568
3570
  align-items: center;
@@ -3631,7 +3633,7 @@ const Sidebar = (_a) => {
3631
3633
  }, [props.isExpanded]);
3632
3634
  return props.isLoading ? (jsxRuntime.jsx(LoadingSidebar, Object.assign({}, props))) : (jsxRuntime.jsxs(Nav, Object.assign({}, props, { children: [jsxRuntime.jsxs(ScrollingContainer, { children: [jsxRuntime.jsx(NavToggle, { onClick: toggleNav, isExpanded: props.isExpanded }), showWorkspacesDropdown &&
3633
3635
  props.workspaces &&
3634
- props.workspaces.length > 1 && (jsxRuntime.jsx(jsxRuntime.Fragment, { children: jsxRuntime.jsx(StyledNavItem, Object.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, Object.assign({ isExpanded: props.isExpanded }, { children: props.activityLabel || "My activity" }))), jsxRuntime.jsxs(NavItem, Object.assign({ className: "sidebar-first-level-item", title: "Home", isExpanded: props.isExpanded, isCurrent: nav === "home", onClick: () => navigate("home") }, { children: [jsxRuntime.jsx(NavItemIcon, Object.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, Object.assign({ className: "sidebar-project-accordion-first-item", level: 4, defaultExpandedSections: defaultAccordionPanels, isExpanded: props.isExpanded, isAnimated: false }, { 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((project) => (jsxRuntime.jsxs(NavItemProject, Object.assign({ className: "sidebar-project-item", isExpanded: props.isExpanded, isCurrent: nav === `projects/${project.id}` }, (nav === `projects/${project.id}` && { ref: prjRef }), { onClick: () => 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, Object.assign({ className: "sidebar-first-level-item", title: "Services", isExpanded: props.isExpanded, isCurrent: nav === "services", onClick: () => navigate("services"), style: { marginBottom: "16px" } }, { children: [jsxRuntime.jsx(NavItemIcon, Object.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, Object.assign({ isExpanded: props.isExpanded }, { children: props.walletLabel || "Wallet" })), jsxRuntime.jsx(StyledNavItem, Object.assign({ title: "Tokens", isExpanded: props.isExpanded, style: { pointerEvents: "none", paddingTop: 0 } }, { children: jsxRuntime.jsx(Card, Object.assign({ style: { padding: theme.space.sm } }, { children: jsxRuntime.jsxs(TokenContainer, { children: [jsxRuntime.jsx(SvgToken, { width: 32 }), jsxRuntime.jsx(Span, Object.assign({ isBold: true, style: {
3636
+ props.workspaces.length > 1 && (jsxRuntime.jsx(jsxRuntime.Fragment, { children: jsxRuntime.jsx(StyledNavItem, Object.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, Object.assign({ isExpanded: props.isExpanded }, { children: props.activityLabel || "My activity" }))), jsxRuntime.jsxs(NavItem, Object.assign({ className: "sidebar-first-level-item", title: "Home", isExpanded: props.isExpanded, isCurrent: nav === "home", onClick: () => navigate("home") }, { children: [jsxRuntime.jsx(NavItemIcon, Object.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(NavAccordionItem, Object.assign({ className: "sidebar-project-accordion-first-item", level: 4, defaultExpandedSections: defaultAccordionPanels, isExpanded: props.isExpanded, isAnimated: false }, { children: jsxRuntime.jsxs(NavAccordionItem.Section, { children: [jsxRuntime.jsxs(NavAccordionItem.Header, { children: [jsxRuntime.jsx(SvgProjectsIcon, { style: { marginLeft: theme.space.xs } }), jsxRuntime.jsxs(NavAccordionItem.Label, { children: [props.dividerLabel || "", " "] })] }), jsxRuntime.jsx(NavAccordionItem.Panel, { children: projects.map((project) => (jsxRuntime.jsxs(NavItemProject, Object.assign({ className: "sidebar-project-item", isExpanded: props.isExpanded, isCurrent: nav === `projects/${project.id}` }, (nav === `projects/${project.id}` && { ref: prjRef }), { onClick: () => 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, Object.assign({ className: "sidebar-first-level-item", title: "Services", isExpanded: props.isExpanded, isCurrent: nav === "services", onClick: () => navigate("services"), style: { marginBottom: "16px" } }, { children: [jsxRuntime.jsx(NavItemIcon, Object.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, Object.assign({ isExpanded: props.isExpanded }, { children: props.walletLabel || "Wallet" })), jsxRuntime.jsx(StyledNavItem, Object.assign({ title: "Tokens", isExpanded: props.isExpanded, style: { pointerEvents: "none", paddingTop: 0 } }, { children: jsxRuntime.jsx(Card, Object.assign({ style: { padding: theme.space.sm } }, { children: jsxRuntime.jsxs(TokenContainer, { children: [jsxRuntime.jsx(SvgToken, { width: 32 }), jsxRuntime.jsx(Span, Object.assign({ isBold: true, style: {
3635
3637
  marginLeft: theme.space.xs,
3636
3638
  color: theme.palette.grey[800],
3637
3639
  } }, { children: props.tokens + " " + (props.tokensLabel || "tokens") }))] }) })) }))] }))] }), jsxRuntime.jsxs(NavItem, Object.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" })] }))] })));
@@ -5661,6 +5663,7 @@ exports.Modal = Modal;
5661
5663
  exports.ModalFullScreen = ModalFullScreen;
5662
5664
  exports.MultiSelect = MultiSelect;
5663
5665
  exports.Nav = Nav;
5666
+ exports.NavAccordionItem = NavAccordionItem;
5664
5667
  exports.NavDivider = NavDivider;
5665
5668
  exports.NavItem = NavItem;
5666
5669
  exports.NavItemIcon = NavItemIcon;
@@ -1,10 +1,10 @@
1
1
  /// <reference types="react" />
2
2
  import { AccordionArgs } from "../../../accordions/_types";
3
3
  import { NavItemArgs } from "./_types";
4
- declare const AccordionItem: import("styled-components").StyledComponent<import("react").ForwardRefExoticComponent<AccordionArgs & import("react").RefAttributes<HTMLDivElement>> & {
4
+ declare const NavAccordionItem: import("styled-components").StyledComponent<import("react").ForwardRefExoticComponent<AccordionArgs & import("react").RefAttributes<HTMLDivElement>> & {
5
5
  Section: import("react").ForwardRefExoticComponent<import("react").HTMLAttributes<HTMLDivElement> & import("react").RefAttributes<HTMLDivElement>>;
6
6
  Header: import("react").ForwardRefExoticComponent<import("react").HTMLAttributes<HTMLDivElement> & import("react").RefAttributes<HTMLDivElement>>;
7
7
  Label: import("react").ForwardRefExoticComponent<import("react").ButtonHTMLAttributes<HTMLButtonElement> & import("react").RefAttributes<HTMLButtonElement>>;
8
8
  Panel: import("react").ForwardRefExoticComponent<import("react").HTMLAttributes<HTMLElement> & import("react").RefAttributes<HTMLElement>>;
9
9
  }, import("styled-components").DefaultTheme, AccordionArgs & NavItemArgs, never>;
10
- export { AccordionItem };
10
+ export { NavAccordionItem };
@@ -4,4 +4,5 @@ import { NavItemText } from "./navItemText";
4
4
  import { NavToggle } from "./navToggle";
5
5
  import { NavDivider } from "./navDivider";
6
6
  import { NavItemProject } from "./navItemProject";
7
- export { NavItem, NavItemIcon, NavItemText, NavToggle, NavDivider, NavItemProject };
7
+ import { NavAccordionItem } from "./accordionItem";
8
+ export { NavItem, NavItemIcon, NavItemText, NavToggle, NavDivider, NavItemProject, NavAccordionItem, };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@appquality/unguess-design-system",
3
- "version": "3.1.1",
3
+ "version": "3.1.2-nav-beta",
4
4
  "description": "",
5
5
  "main": "build/index.js",
6
6
  "types": "build/index.d.ts",