blue-react 9.1.7 → 9.2.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/MenuItem.js +5 -0
- package/dist/components/Outside.js +3 -1
- package/dist/style.css +750 -3
- package/dist/style.min.css +3 -3
- package/dist/style.scss +2 -1
- package/dist/styles/_buttons.scss +91 -0
- package/dist/styles/_layout.scss +4 -1
- package/dist/styles/mixins/_menu-item.scss +2 -0
- package/dist/styles/mixins/_sidebar.scss +8 -0
- package/dist/types/components/MenuItem.d.ts +4 -0
- package/dist/types/components/Outside.d.ts +3 -2
- package/package.json +1 -1
package/dist/style.scss
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* Blue React v9.
|
|
2
|
+
* Blue React v9.2.0-alpha2 (https://bruegmann.github.io/blue-react)
|
|
3
3
|
* Licensed under GNU General Public License v3.0 (https://github.com/bruegmann/blue-react/blob/master/LICENSE).
|
|
4
4
|
*/
|
|
5
5
|
|
|
@@ -24,3 +24,4 @@
|
|
|
24
24
|
@import "./styles/_caret";
|
|
25
25
|
@import "./styles/_tooltips";
|
|
26
26
|
@import "./styles/_hover";
|
|
27
|
+
@import "./styles/buttons";
|
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
// Inspired by Bootstrap's button system but extended with more variants
|
|
2
|
+
|
|
3
|
+
// scss-docs-start btn-variant-loops
|
|
4
|
+
@each $color, $value in $theme-colors {
|
|
5
|
+
$bg: tint-color($value, 80%);
|
|
6
|
+
$text-color: shade-color($value, 60%);
|
|
7
|
+
|
|
8
|
+
.blue-btn-soft-#{$color} {
|
|
9
|
+
@if $color == "light" {
|
|
10
|
+
$text-color: color-contrast($value);
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
@include button-variant(
|
|
14
|
+
$bg,
|
|
15
|
+
$bg,
|
|
16
|
+
$text-color,
|
|
17
|
+
$hover-background: shade-color($bg, $btn-hover-bg-shade-amount),
|
|
18
|
+
$hover-border: shade-color($bg, $btn-hover-border-shade-amount),
|
|
19
|
+
$active-background: shade-color($bg, $btn-active-bg-shade-amount),
|
|
20
|
+
$active-border: shade-color($bg, $btn-active-border-shade-amount)
|
|
21
|
+
);
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
@include color-mode(dark) {
|
|
26
|
+
@each $color, $value in $theme-colors {
|
|
27
|
+
$bg: shade-color($value, 80%);
|
|
28
|
+
$text-color: tint-color($value, 60%);
|
|
29
|
+
|
|
30
|
+
.blue-btn-soft-#{$color} {
|
|
31
|
+
@if $color == "dark" {
|
|
32
|
+
$text-color: color-contrast($value);
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
@include button-variant(
|
|
36
|
+
$bg,
|
|
37
|
+
$bg,
|
|
38
|
+
$text-color,
|
|
39
|
+
$hover-background: tint-color($bg, $btn-hover-bg-tint-amount),
|
|
40
|
+
$hover-border: tint-color($bg, $btn-hover-border-tint-amount),
|
|
41
|
+
$active-background: tint-color($bg, $btn-active-bg-tint-amount),
|
|
42
|
+
$active-border: tint-color($bg, $btn-active-border-tint-amount)
|
|
43
|
+
);
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
// scss-docs-start btn-variant-loops
|
|
49
|
+
@each $color, $value in $theme-colors {
|
|
50
|
+
$bg: tint-color($value, 80%);
|
|
51
|
+
$text-color: $value;
|
|
52
|
+
|
|
53
|
+
.blue-btn-plain-#{$color} {
|
|
54
|
+
@if $color == "light" {
|
|
55
|
+
$text-color: color-contrast($value);
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
@include button-variant(
|
|
59
|
+
transparent,
|
|
60
|
+
transparent,
|
|
61
|
+
$text-color,
|
|
62
|
+
$hover-background: shade-color($bg, $btn-hover-bg-shade-amount),
|
|
63
|
+
$hover-border: shade-color($bg, $btn-hover-border-shade-amount),
|
|
64
|
+
$active-background: shade-color($bg, $btn-active-bg-shade-amount),
|
|
65
|
+
$active-border: shade-color($bg, $btn-active-border-shade-amount)
|
|
66
|
+
);
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
@include color-mode(dark) {
|
|
71
|
+
@each $color, $value in $theme-colors {
|
|
72
|
+
$bg: shade-color($value, 80%);
|
|
73
|
+
$text-color: $value;
|
|
74
|
+
|
|
75
|
+
.blue-btn-plain-#{$color} {
|
|
76
|
+
@if $color == "dark" {
|
|
77
|
+
$text-color: color-contrast($value);
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
@include button-variant(
|
|
81
|
+
transparent,
|
|
82
|
+
transparent,
|
|
83
|
+
$text-color,
|
|
84
|
+
$hover-background: tint-color($bg, $btn-hover-bg-tint-amount),
|
|
85
|
+
$hover-border: tint-color($bg, $btn-hover-border-tint-amount),
|
|
86
|
+
$active-background: tint-color($bg, $btn-active-bg-tint-amount),
|
|
87
|
+
$active-border: tint-color($bg, $btn-active-border-tint-amount)
|
|
88
|
+
);
|
|
89
|
+
}
|
|
90
|
+
}
|
|
91
|
+
}
|
package/dist/styles/_layout.scss
CHANGED
|
@@ -74,6 +74,10 @@ export interface MenuItemProps {
|
|
|
74
74
|
* Defines dropdown status from outside.
|
|
75
75
|
*/
|
|
76
76
|
showDropdown?: boolean;
|
|
77
|
+
/**
|
|
78
|
+
* Callback when `showDropdown` changes.
|
|
79
|
+
*/
|
|
80
|
+
onShowDropdown?: (showDropdown: boolean) => void;
|
|
77
81
|
/**
|
|
78
82
|
* Close on click outside.
|
|
79
83
|
*/
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { CSSProperties, MutableRefObject } from "react";
|
|
1
|
+
import { CSSProperties, MouseEventHandler, MutableRefObject } from "react";
|
|
2
2
|
/**
|
|
3
3
|
* Hook that alerts clicks outside of the passed ref
|
|
4
4
|
*/
|
|
@@ -7,9 +7,10 @@ export interface OutsideProps {
|
|
|
7
7
|
children: any;
|
|
8
8
|
className?: string;
|
|
9
9
|
onClickOutside?: (event: MouseEvent) => void;
|
|
10
|
+
onClick?: MouseEventHandler<HTMLDivElement> | undefined;
|
|
10
11
|
style?: CSSProperties;
|
|
11
12
|
}
|
|
12
13
|
/**
|
|
13
14
|
* Component that fires an event if you click outside of it
|
|
14
15
|
*/
|
|
15
|
-
export default function Outside({ children, className, onClickOutside, style }: OutsideProps): JSX.Element;
|
|
16
|
+
export default function Outside({ children, className, onClickOutside, onClick, style }: OutsideProps): JSX.Element;
|