@symply.io/basic-components 1.0.8-beta.1 → 1.0.8-beta.3

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.
@@ -16,12 +16,12 @@ import ListItem from "@mui/material/ListItem";
16
16
  import ListItemText from "@mui/material/ListItemText";
17
17
  import ListItemIcon from "@mui/material/ListItemIcon";
18
18
  import LockIcon from "@mui/icons-material/LockRounded";
19
+ import useTheme from "@mui/material/styles/useTheme";
19
20
  import ChevronRightIcon from "@mui/icons-material/ChevronRight";
20
21
  import ExpandMoreIcon from "@mui/icons-material/ExpandMore";
21
- import useCustomTheme from "../useCustomTheme";
22
22
  function SidebarItem(props) {
23
23
  var icon = props.icon, name = props.name, active = props.active, expand = props.expand, lock = props.lock, beta = props.beta, isSub = props.isSub, hasChildren = props.hasChildren, _a = props.betaTagColor, betaTagColor = _a === void 0 ? "#00A2A9" : _a, onClick = props.onClick;
24
- var theme = useCustomTheme();
24
+ var theme = useTheme();
25
25
  return (_jsxs(ListItem, __assign({ button: true, onClick: onClick, disabled: lock, sx: {
26
26
  paddingLeft: isSub ? theme.spacing(4) : undefined,
27
27
  display: "flex",
@@ -14,7 +14,7 @@ import { useState, memo, useMemo, useEffect, useCallback } from "react";
14
14
  import { Match, useLocation } from "@reach/router";
15
15
  import Collapse from "@mui/material/Collapse";
16
16
  import List from "@mui/material/List";
17
- import useCustomTheme from "../useCustomTheme";
17
+ import useTheme from "@mui/material/styles/useTheme";
18
18
  import SidebarItem from "./SidebarItem";
19
19
  import SidebarLink from "./SidebarLink";
20
20
  function SidebarItemsGroup(props) {
@@ -31,7 +31,7 @@ function SidebarItemsGroup(props) {
31
31
  useEffect(function () {
32
32
  setExpand(match);
33
33
  }, [match]);
34
- var theme = useCustomTheme();
34
+ var theme = useTheme();
35
35
  return (_jsxs(_Fragment, { children: [_jsx(List, __assign({ component: "div", disablePadding: true }, { children: _jsx(SidebarItem, { active: false, name: name, icon: icon, lock: lock, beta: beta, expand: expand, hasChildren: true, betaTagColor: betaTagColor, onClick: onToggleExpand }) })), children && (_jsx(Collapse, __assign({ in: expand, timeout: "auto" }, { children: _jsx(List, __assign({ component: "div", disablePadding: true }, { children: children.map(function (c) { return (_jsx(Match, __assign({ path: c.path }, { children: function (prop) { return (_jsx(SidebarLink, { name: c.name, path: c.path, icon: c.icon, lock: c.lock, beta: c.beta, titleForLock: titleForLock, active: prop.match !== null, betaTagColor: c.betaTagColor, isSub: true })); } }), c.name)); }) })) })))] }));
36
36
  }
37
37
  export default memo(SidebarItemsGroup);
@@ -22,12 +22,12 @@ var __rest = (this && this.__rest) || function (s, e) {
22
22
  };
23
23
  import { jsx as _jsx } from "react/jsx-runtime";
24
24
  import { Link, useLocation } from "@reach/router";
25
- import useCustomTheme from "../useCustomTheme";
25
+ import useTheme from "@mui/material/styles/useTheme";
26
26
  import SidebarItem from "./SidebarItem";
27
27
  function SidebarLink(props) {
28
28
  var pathname = useLocation().pathname;
29
29
  var name = props.name, path = props.path, icon = props.icon, lock = props.lock, beta = props.beta, active = props.active, titleForLock = props.titleForLock, betaTagColor = props.betaTagColor, rest = __rest(props, ["name", "path", "icon", "lock", "beta", "active", "titleForLock", "betaTagColor"]);
30
- var theme = useCustomTheme();
30
+ var theme = useTheme();
31
31
  return (_jsx(Link, __assign({ to: lock ? pathname : path, title: lock ? titleForLock || "Feature is unavailable on Free plan" : name, style: {
32
32
  color: theme.palette.primary.main,
33
33
  textDecoration: "none"
@@ -6,8 +6,6 @@ export interface SidebarItemBaseProps {
6
6
  beta?: boolean;
7
7
  titleForLock?: string;
8
8
  betaTagColor?: CSSProperties["color"];
9
- primaryColor?: CSSProperties["color"];
10
- secondaryColor?: CSSProperties["color"];
11
9
  icon: ReactElement;
12
10
  }
13
11
  export interface SidebarBaseProps extends SidebarItemBaseProps {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@symply.io/basic-components",
3
- "version": "1.0.8-beta.1",
3
+ "version": "1.0.8-beta.3",
4
4
  "description": "Basic and reusable components for all frontend of Symply apps",
5
5
  "keywords": [
6
6
  "react",