blue-react 9.0.1 → 9.1.0
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/dist/components/IconMenuItem.js +45 -0
- package/dist/components/MenuItem.js +2 -2
- package/dist/style.css +41 -18
- package/dist/style.min.css +4 -4
- package/dist/style.scss +1 -1
- package/dist/styles/_action-menu.scss +1 -9
- package/dist/styles/_layout.scss +0 -2
- package/dist/styles/_mixins.scss +6 -5
- package/dist/styles/mixins/_menu-item.scss +21 -0
- package/dist/styles/mixins/_sidebar.scss +11 -11
- package/dist/types/components/IconMenuItem.d.ts +19 -0
- package/dist/types/components/MenuItem.d.ts +4 -0
- package/index.d.ts +3 -0
- package/index.js +1 -0
- package/package.json +1 -1
package/dist/style.scss
CHANGED
|
@@ -54,17 +54,9 @@
|
|
|
54
54
|
// Support for MenuItems
|
|
55
55
|
.blue-menu-item {
|
|
56
56
|
width: auto;
|
|
57
|
-
margin-top: 0;
|
|
58
|
-
margin-bottom: 0;
|
|
59
57
|
|
|
60
58
|
&.active::after {
|
|
61
|
-
|
|
62
|
-
bottom: 0.125rem;
|
|
63
|
-
left: 0.625rem;
|
|
64
|
-
right: 0.625rem;
|
|
65
|
-
width: auto;
|
|
66
|
-
height: 0.25rem;
|
|
67
|
-
animation: sidebar-menu-item-indicator-in-from-below 0.2s ease-in-out;
|
|
59
|
+
@include blue-menu-item-indicator-horizontal();
|
|
68
60
|
}
|
|
69
61
|
}
|
|
70
62
|
|
package/dist/styles/_layout.scss
CHANGED
package/dist/styles/_mixins.scss
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
@import "./mixins/
|
|
2
|
-
@import "./mixins/
|
|
3
|
-
@import "./mixins/
|
|
4
|
-
@import "./mixins/
|
|
5
|
-
@import "./mixins/
|
|
1
|
+
@import "./mixins/misc";
|
|
2
|
+
@import "./mixins/menu-item";
|
|
3
|
+
@import "./mixins/sidebar";
|
|
4
|
+
@import "./mixins/action-menu";
|
|
5
|
+
@import "./mixins/switch";
|
|
6
|
+
@import "./mixins/custom-property";
|
|
6
7
|
@import "./mixins/scroll-shadow";
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
@mixin blue-menu-item-indicator() {
|
|
2
|
+
content: "";
|
|
3
|
+
position: absolute;
|
|
4
|
+
top: 0.625rem;
|
|
5
|
+
bottom: 0.625rem;
|
|
6
|
+
left: 0.125rem;
|
|
7
|
+
width: 0.25rem;
|
|
8
|
+
background-color: var(--blue-menu-item-indicator-bg);
|
|
9
|
+
border-radius: 1rem;
|
|
10
|
+
animation: blue-menu-item-indicator-in-from-side 0.2s ease-in-out;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
@mixin blue-menu-item-indicator-horizontal() {
|
|
14
|
+
top: initial;
|
|
15
|
+
bottom: 0.125rem;
|
|
16
|
+
left: 0.625rem;
|
|
17
|
+
right: 0.625rem;
|
|
18
|
+
width: auto;
|
|
19
|
+
height: 0.25rem;
|
|
20
|
+
animation: blue-menu-item-indicator-in-from-below 0.2s ease-in-out;
|
|
21
|
+
}
|
|
@@ -65,6 +65,14 @@
|
|
|
65
65
|
.blue-header-logo.sidebar {
|
|
66
66
|
transform: translateX(0);
|
|
67
67
|
}
|
|
68
|
+
|
|
69
|
+
.blue-sidebar-menu-horizontal-on-open {
|
|
70
|
+
.blue-menu-item {
|
|
71
|
+
&.active::after {
|
|
72
|
+
@include blue-menu-item-indicator-horizontal();
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
}
|
|
68
76
|
}
|
|
69
77
|
|
|
70
78
|
@mixin blue-sidebar($width) {
|
|
@@ -119,15 +127,7 @@
|
|
|
119
127
|
}
|
|
120
128
|
|
|
121
129
|
&.active::after {
|
|
122
|
-
|
|
123
|
-
position: absolute;
|
|
124
|
-
top: 0.625rem;
|
|
125
|
-
bottom: 0.625rem;
|
|
126
|
-
left: 0.125rem;
|
|
127
|
-
width: 0.25rem;
|
|
128
|
-
background-color: var(--blue-menu-item-indicator-bg);
|
|
129
|
-
border-radius: 1rem;
|
|
130
|
-
animation: sidebar-menu-item-indicator-in-from-side 0.2s ease-in-out;
|
|
130
|
+
@include blue-menu-item-indicator();
|
|
131
131
|
}
|
|
132
132
|
|
|
133
133
|
& > * + .blue-menu-item-label {
|
|
@@ -172,7 +172,7 @@
|
|
|
172
172
|
}
|
|
173
173
|
}
|
|
174
174
|
|
|
175
|
-
@keyframes
|
|
175
|
+
@keyframes blue-menu-item-indicator-in-from-side {
|
|
176
176
|
from {
|
|
177
177
|
transform: translateX(-100%);
|
|
178
178
|
}
|
|
@@ -181,7 +181,7 @@
|
|
|
181
181
|
}
|
|
182
182
|
}
|
|
183
183
|
|
|
184
|
-
@keyframes
|
|
184
|
+
@keyframes blue-menu-item-indicator-in-from-below {
|
|
185
185
|
from {
|
|
186
186
|
transform: translateY(100%);
|
|
187
187
|
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { MenuItemProps } from "./MenuItem";
|
|
3
|
+
export interface IconMenuItemProps extends MenuItemProps {
|
|
4
|
+
outerClass?: string;
|
|
5
|
+
/**
|
|
6
|
+
* Tooltip will be placed to the end/right by default. You can change the direction with this prop.
|
|
7
|
+
*/
|
|
8
|
+
tooltipClass?: string;
|
|
9
|
+
/**
|
|
10
|
+
* When used inside of the sidebar: active indicator will be displayed underneath instead of before.
|
|
11
|
+
* The prop to `false` to disable this behavior.
|
|
12
|
+
*/
|
|
13
|
+
horizontalOnOpenSidebar?: boolean;
|
|
14
|
+
}
|
|
15
|
+
/**
|
|
16
|
+
* Variant of `MenuItem` to primarily display an icon without a label.
|
|
17
|
+
* The label prop will be displayed as a tooltip.
|
|
18
|
+
*/
|
|
19
|
+
export default function IconMenuItem({ label, outerClass, tooltipClass, horizontalOnOpenSidebar, className, ...props }: IconMenuItemProps): JSX.Element;
|
|
@@ -18,6 +18,10 @@ export interface MenuItemProps {
|
|
|
18
18
|
* Icon component or a class name.
|
|
19
19
|
*/
|
|
20
20
|
icon?: any;
|
|
21
|
+
/**
|
|
22
|
+
* Addition to class name of icon wrapper element
|
|
23
|
+
*/
|
|
24
|
+
iconClassName?: string;
|
|
21
25
|
/**
|
|
22
26
|
* Icon component or a class name when the MenuItem is active.
|
|
23
27
|
*/
|
package/index.d.ts
CHANGED
|
@@ -27,6 +27,9 @@ export { HeaderProps } from "./dist/types/components/Header"
|
|
|
27
27
|
export { default as HeaderTitle } from "./dist/types/components/HeaderTitle"
|
|
28
28
|
export { HeaderTitleProps } from "./dist/types/components/HeaderTitle"
|
|
29
29
|
|
|
30
|
+
export { default as IconMenuItem } from "./dist/types/components/IconMenuItem"
|
|
31
|
+
export { IconMenuItemProps } from "./dist/types/components/IconMenuItem"
|
|
32
|
+
|
|
30
33
|
export { default as Intro } from "./dist/types/components/Intro"
|
|
31
34
|
export { IntroProps } from "./dist/types/components/Intro"
|
|
32
35
|
|
package/index.js
CHANGED
|
@@ -5,6 +5,7 @@ exports.Caret = require("./dist/components/Caret.js")["default"]
|
|
|
5
5
|
exports.Layout = require("./dist/components/Layout.js")["default"]
|
|
6
6
|
exports.Header = require("./dist/components/Header.js")["default"]
|
|
7
7
|
exports.HeaderTitle = require("./dist/components/HeaderTitle.js")["default"]
|
|
8
|
+
exports.IconMenuItem = require("./dist/components/IconMenuItem.js")["default"]
|
|
8
9
|
exports.Intro = require("./dist/components/Intro.js")["default"]
|
|
9
10
|
exports.MenuItem = require("./dist/components/MenuItem.js")["default"]
|
|
10
11
|
exports.Modal = require("./dist/components/Modal.js")["default"]
|