@astral/ui 1.34.0 → 1.34.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.
@@ -1,5 +1,5 @@
1
1
  import { ElementType, ReactElement } from 'react';
2
- import { NavMenuItemListProps } from './NavMenuItemList/NavMenuItemList';
2
+ import { NavMenuItemListProps } from './NavMenuItemList';
3
3
  export declare type NavMenuItemProps = {
4
4
  collapsedIn: boolean;
5
5
  item: [
@@ -4,8 +4,8 @@ exports.NavMenuItem = void 0;
4
4
  const jsx_runtime_1 = require("react/jsx-runtime");
5
5
  const react_1 = require("react");
6
6
  const Collapse_1 = require("../../Collapse");
7
+ const NavMenuItemList_1 = require("./NavMenuItemList");
7
8
  const NavMenuItemButton_1 = require("./NavMenuItemButton");
8
- const NavMenuItemList_1 = require("./NavMenuItemList/NavMenuItemList");
9
9
  const NavMenuItem = (props) => {
10
10
  var _a;
11
11
  const { collapsedIn, item: [key, value], } = props;
@@ -11,6 +11,42 @@ exports.NavMenuItemButtonRoot = (0, styles_1.styled)(ListItemButton_1.ListItemBu
11
11
  padding: ${({ theme }) => theme.spacing(2)};
12
12
 
13
13
  border-radius: ${({ theme }) => theme.shape.medium};
14
+
15
+ .MuiListItemIcon-root {
16
+
17
+ color: ${({ theme, selected }) => {
18
+ return selected ? theme.palette.primary['800'] : 'inherit';
19
+ }};
20
+
21
+ transition: ${({ theme }) => {
22
+ return theme.transitions.create('color', {
23
+ easing: theme.transitions.easing.easeIn,
24
+ duration: theme.transitions.duration.shortest,
25
+ });
26
+ }};
27
+ }
28
+
29
+ &.Mui-selected:hover {
30
+ background-color: inherit;
31
+ }
32
+
33
+ &:hover {
34
+ color: ${({ theme }) => theme.palette.primary['800']};
35
+
36
+ background-color: inherit;
37
+
38
+ .MuiListItemIcon-root {
39
+ color: ${({ theme }) => theme.palette.primary['800']};
40
+ }
41
+ }
42
+
43
+ &:active {
44
+ color: ${({ theme }) => theme.palette.primary['900']};
45
+
46
+ .MuiListItemIcon-root {
47
+ color: ${({ theme }) => theme.palette.primary['900']};
48
+ }
49
+ }
14
50
  `;
15
51
  exports.NavMenuItemButtonIcon = (0, styles_1.styled)(ListItemIcon_1.ListItemIcon) `
16
52
  min-width: unset;
@@ -1,5 +1,5 @@
1
1
  import { ElementType, ReactElement } from 'react';
2
- import { NavMenuItemListProps } from './NavMenuItemList/NavMenuItemList';
2
+ import { NavMenuItemListProps } from './NavMenuItemList';
3
3
  export declare type NavMenuItemProps = {
4
4
  collapsedIn: boolean;
5
5
  item: [
@@ -1,8 +1,8 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
2
  import { useCallback, useMemo, useState, } from 'react';
3
3
  import { Collapse } from '../../Collapse';
4
+ import { NavMenuItemList } from './NavMenuItemList';
4
5
  import { NavMenuItemButton } from './NavMenuItemButton';
5
- import { NavMenuItemList } from './NavMenuItemList/NavMenuItemList';
6
6
  export const NavMenuItem = (props) => {
7
7
  var _a;
8
8
  const { collapsedIn, item: [key, value], } = props;
@@ -8,6 +8,42 @@ export const NavMenuItemButtonRoot = styled(ListItemButton) `
8
8
  padding: ${({ theme }) => theme.spacing(2)};
9
9
 
10
10
  border-radius: ${({ theme }) => theme.shape.medium};
11
+
12
+ .MuiListItemIcon-root {
13
+
14
+ color: ${({ theme, selected }) => {
15
+ return selected ? theme.palette.primary['800'] : 'inherit';
16
+ }};
17
+
18
+ transition: ${({ theme }) => {
19
+ return theme.transitions.create('color', {
20
+ easing: theme.transitions.easing.easeIn,
21
+ duration: theme.transitions.duration.shortest,
22
+ });
23
+ }};
24
+ }
25
+
26
+ &.Mui-selected:hover {
27
+ background-color: inherit;
28
+ }
29
+
30
+ &:hover {
31
+ color: ${({ theme }) => theme.palette.primary['800']};
32
+
33
+ background-color: inherit;
34
+
35
+ .MuiListItemIcon-root {
36
+ color: ${({ theme }) => theme.palette.primary['800']};
37
+ }
38
+ }
39
+
40
+ &:active {
41
+ color: ${({ theme }) => theme.palette.primary['900']};
42
+
43
+ .MuiListItemIcon-root {
44
+ color: ${({ theme }) => theme.palette.primary['900']};
45
+ }
46
+ }
11
47
  `;
12
48
  export const NavMenuItemButtonIcon = styled(ListItemIcon) `
13
49
  min-width: unset;
package/package.json CHANGED
@@ -1,10 +1,10 @@
1
1
  {
2
2
  "name": "@astral/ui",
3
- "version": "1.34.0",
3
+ "version": "1.34.2",
4
4
  "browser": "./esm/index.js",
5
5
  "main": "./index.js",
6
6
  "dependencies": {
7
- "@astral/icons": "^1.34.0",
7
+ "@astral/icons": "^1.34.2",
8
8
  "@emotion/cache": "11.7.1",
9
9
  "@emotion/react": "11.9.0",
10
10
  "@emotion/server": "11.4.0",