blue-web 1.12.0 → 1.13.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/style.scss CHANGED
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * Blue Web v1.12.0 (https://bruegmann.github.io/blue-web)
2
+ * Blue Web v1.13.0 (https://bruegmann.github.io/blue-web)
3
3
  * Licensed under GNU General Public License v3.0 (https://github.com/bruegmann/blue-web/blob/master/LICENSE).
4
4
  */
5
5
 
@@ -7,6 +7,7 @@
7
7
 
8
8
  @import "node_modules/bootstrap/scss/functions";
9
9
  @import "node_modules/bootstrap/scss/variables";
10
+ @import "node_modules/bootstrap/scss/mixins";
10
11
  @import "./styles/variables";
11
12
 
12
13
  @import "./styles/mixins";
@@ -1,5 +1,6 @@
1
1
  // Main color theme. E.g. used for background for body and sidebar.
2
2
  $theme: hsl(217deg 10% 94%) !default;
3
+ $theme-dark: hsl(217deg 10% 8%) !default;
3
4
  $primary: hsl(217deg 91% 50%) !default;
4
5
  $white: #fff !default;
5
6
  $gray-100: hsl(217deg 17% 98%) !default;
@@ -12,8 +13,6 @@ $gray-700: hsl(217deg 9% 31%) !default;
12
13
  $gray-800: hsl(217deg 10% 23%) !default;
13
14
  $gray-900: hsl(217deg 11% 15%) !default;
14
15
  $black: #000 !default;
15
- $header-color: $gray-900 !default;
16
- $sidebar-color: $gray-900 !default;
17
16
 
18
17
  $light: #ecedf0 !default;
19
18
 
@@ -4,10 +4,6 @@
4
4
  .blue-collapse {
5
5
  interpolate-size: allow-keywords;
6
6
 
7
- &:has(summary:focus) {
8
- overflow: hidden;
9
- }
10
-
11
7
  summary {
12
8
  list-style: none;
13
9
  }
@@ -1,10 +1,3 @@
1
- .blue-btn-silent {
2
- &:not(:hover):not(:focus):not(:active) {
3
- border-color: transparent;
4
- color: inherit;
5
- }
6
- }
7
-
8
1
  @media (hover: hover) {
9
2
  .blue-d-hover {
10
3
  &:not(:hover):not(:focus):not(:active):not(.active):not(:focus-within) {
@@ -17,7 +17,12 @@
17
17
  }
18
18
 
19
19
  .blue-menu-item {
20
- transition: width 0.5s, background-color 0.3s, color 0.15s, box-shadow 0.3s, opacity 0.3s !important;
20
+ transition:
21
+ width 0.5s,
22
+ background-color 0.3s,
23
+ color 0.15s,
24
+ box-shadow 0.3s,
25
+ opacity 0.3s !important;
21
26
 
22
27
  @media (prefers-reduced-motion) {
23
28
  transition: none !important;
@@ -83,65 +88,6 @@
83
88
  }
84
89
  }
85
90
 
86
- .blue-sidebar .blue-menu-item-dropdown {
87
- --blue-sidebar-bg: var(--blue-sidebar-depth-1-bg, #{$sidebar-deep-bg});
88
-
89
- &::before {
90
- background-color: var(--blue-sidebar-bg);
91
- box-shadow: 0 0.5rem 1rem $black;
92
- opacity: 0.15;
93
- border-color: currentColor;
94
- }
95
-
96
- .blue-menu-item-dropdown {
97
- --blue-sidebar-bg: var(--blue-sidebar-depth-2-bg, #{darken($sidebar-deep-bg, 4%)});
98
-
99
- .blue-menu-item-dropdown {
100
- --blue-sidebar-bg: var(--blue-sidebar-depth-3-bg, #{darken($sidebar-deep-bg, 8%)});
101
-
102
- .blue-menu-item-dropdown {
103
- --blue-sidebar-bg: var(--blue-sidebar-depth-4-bg, #{darken($sidebar-deep-bg, 12%)});
104
-
105
- .blue-menu-item-dropdown {
106
- --blue-sidebar-bg: var(--blue-sidebar-depth-5-bg, #{darken($sidebar-deep-bg, 16%)});
107
-
108
- .blue-menu-item-dropdown {
109
- --blue-sidebar-bg: var(--blue-sidebar-depth-6-bg, #{darken($sidebar-deep-bg, 20%)});
110
- }
111
- }
112
- }
113
- }
114
- }
115
- }
116
-
117
- .blue-header .blue-menu-item-dropdown {
118
- --blue-sidebar-bg: #{$header-deep-bg};
119
-
120
- &::before {
121
- background-color: var(--blue-header-bg);
122
- }
123
-
124
- .blue-menu-item-dropdown {
125
- --blue-sidebar-bg: #{darken($header-deep-bg, 4%)};
126
-
127
- .blue-menu-item-dropdown {
128
- --blue-sidebar-bg: #{darken($header-deep-bg, 8%)};
129
-
130
- .blue-menu-item-dropdown {
131
- --blue-sidebar-bg: #{darken($header-deep-bg, 12%)};
132
-
133
- .blue-menu-item-dropdown {
134
- --blue-sidebar-bg: #{darken($header-deep-bg, 16%)};
135
-
136
- .blue-menu-item-dropdown {
137
- --blue-sidebar-bg: #{darken($header-deep-bg, 20%)};
138
- }
139
- }
140
- }
141
- }
142
- }
143
- }
144
-
145
91
  .blue-menu-item-dropdown-caret.blue-caret {
146
92
  display: none;
147
93
  position: absolute;
@@ -2,21 +2,11 @@ $theme-colors: () !default;
2
2
  // stylelint-disable-next-line scss/dollar-variable-default
3
3
  $theme-colors: map-merge(
4
4
  (
5
- "theme": $theme,
6
- "white": white,
7
- "black": #212529
5
+ "theme": $theme
8
6
  ),
9
7
  $theme-colors
10
8
  );
11
9
 
12
- // For Bootstrap 5.1 this needs to be set. Otherwise we couldn't use .bg-* and .text-* utils with our custom $theme
13
- // Since Bootstrap 5.2 it's no longer required, so it's commented out. If everything works fine, this can be removed for
14
- // future releases.
15
- // $theme-colors-rgb: map-loop($theme-colors, to-rgb, "$value");
16
- // $utilities-colors: map-merge($utilities-colors, $theme-colors-rgb);
17
- // $utilities-text-colors: map-merge($utilities-text-colors, map-loop($utilities-colors, rgba-css-var, "$key", "text"));
18
- // $utilities-bg-colors: map-merge($utilities-bg-colors, map-loop($utilities-colors, rgba-css-var, "$key", "bg"));
19
-
20
10
  // Alpha value (RGBA) e.g. for header background.
21
11
  $shimmering: 0.8 !default;
22
12
 
@@ -54,6 +44,7 @@ $bla-sidebar-width: 16.563rem !default;
54
44
 
55
45
  // Background of sidebar.
56
46
  $sidebar-bg: $theme !default;
47
+ $sidebar-bg-dark: $theme-dark !default;
57
48
 
58
49
  // Background of sidebar when it's opened (on mobile devices).
59
50
  $sidebar-open-bg: darken($sidebar-bg, 30%) !default;
@@ -62,25 +53,27 @@ $sidebar-open-bg: darken($sidebar-bg, 30%) !default;
62
53
  $sidebar-deep-bg: darken($sidebar-bg, 4%) !default;
63
54
 
64
55
  // Text color of sidebar.
65
- $sidebar-color: #fff !default;
56
+ $sidebar-color: color-contrast($sidebar-bg, $gray-900) !default;
57
+ $sidebar-color-dark: color-contrast($sidebar-bg-dark, $gray-900) !default;
66
58
 
67
59
  // Color of indicator for active sidebar item.
68
60
  $sidebar-indicator-color: $sidebar-color !default;
61
+ $sidebar-indicator-color-dark: $sidebar-color-dark !default;
69
62
 
70
63
  // Background of search control in sidebar.
71
64
  $sidebar-search-bg: $input-bg !default;
72
65
 
73
66
  // Background of the body element
74
- $app-bg: $sidebar-bg !default;
75
-
76
- // Text color of header elements
77
- $header-color: #fff !default;
67
+ $app-bg: $theme !default;
68
+ $app-bg-dark: $theme-dark !default;
78
69
 
79
70
  // Background color of Header
80
71
  $header-bg: $theme !default;
72
+ $header-bg-dark: $theme-dark !default;
81
73
 
82
- // Background color of Header as RGB (like `255, 255, 255`).
83
- $header-bg-rgb: red($header-bg), green($header-bg), blue($header-bg) !default;
74
+ // Text color of header elements
75
+ $header-color: color-contrast($header-bg, $gray-900) !default;
76
+ $header-color-dark: color-contrast($header-bg-dark, $gray-900) !default;
84
77
 
85
78
  // Background of header action menu dropdown menus
86
79
  $header-deep-bg: darken($header-bg, 4%) !default;
@@ -101,6 +94,8 @@ $sidebar-shrink-breakpoint: 600px !default;
101
94
  $sidebar-expanded-breakpoint: 1400px !default;
102
95
 
103
96
  :root {
97
+ --blue-app-bg: #{$app-bg};
98
+
104
99
  --blue-scrollbar-thumb-color-rgb: #{$scrollbar-thumb-color-rgb};
105
100
  --blue-scrollbar-size: #{$scrollbar-size};
106
101
 
@@ -109,27 +104,24 @@ $sidebar-expanded-breakpoint: 1400px !default;
109
104
  --blue-theme: var(--theme, #{$theme});
110
105
  --blue-shimmering: 0.9;
111
106
 
112
- --blue-app-bg: #{$app-bg};
113
-
114
107
  --blue-sidebar-bg: #{$sidebar-bg};
115
- --blue-sidebar-depth-1-bg: #{darken($sidebar-bg, 4%)};
116
- --blue-sidebar-depth-2-bg: #{darken(darken($sidebar-bg, 4%), 4%)};
117
- --blue-sidebar-depth-3-bg: #{darken(darken($sidebar-bg, 4%), 8%)};
118
- --blue-sidebar-depth-4-bg: #{darken(darken($sidebar-bg, 4%), 12%)};
119
- --blue-sidebar-depth-5-bg: #{darken(darken($sidebar-bg, 4%), 16%)};
120
- --blue-sidebar-depth-6-bg: #{darken(darken($sidebar-bg, 4%), 20%)};
121
-
122
108
  --blue-header-bg: #{$header-bg};
123
- --blue-header-bg-rgb: #{$header-bg-rgb};
124
- --blue-header-depth-1-bg: #{darken($header-bg, 4%)};
125
- --blue-header-depth-2-bg: #{darken(darken($header-bg, 4%), 4%)};
126
- --blue-header-depth-3-bg: #{darken(darken($header-bg, 4%), 8%)};
127
- --blue-header-depth-4-bg: #{darken(darken($header-bg, 4%), 12%)};
128
- --blue-header-depth-5-bg: #{darken(darken($header-bg, 4%), 16%)};
129
- --blue-header-depth-6-bg: #{darken(darken($header-bg, 4%), 20%)};
130
109
 
131
110
  --blue-header-color: #{$header-color};
132
111
  --blue-action-link-bg-color: var(--blue-theme);
133
112
  --blue-menu-item-indicator-bg: #{$sidebar-indicator-color};
134
113
  --blue-menu-item-height: #{$normal-size};
135
114
  }
115
+
116
+ @include color-mode(dark, true) {
117
+ --blue-app-bg: #{$app-bg-dark};
118
+
119
+ --blue-sidebar-color: #{$sidebar-color-dark};
120
+
121
+ --blue-sidebar-bg: #{$sidebar-bg-dark};
122
+ --blue-header-bg: #{$header-bg-dark};
123
+
124
+ --blue-header-color: #{$header-color-dark};
125
+
126
+ --blue-menu-item-indicator-bg: #{$sidebar-indicator-color-dark};
127
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "blue-web",
3
- "version": "1.12.0",
3
+ "version": "1.13.0",
4
4
  "description": "UI components built on top of Bootstrap 5",
5
5
  "license": "LGPL-3.0-or-later",
6
6
  "homepage": "https://bruegmann.github.io/blue-web/v1",
@@ -49,6 +49,7 @@
49
49
  "autoprefixer": "^10.3.6",
50
50
  "babel-loader": "^8.4.1",
51
51
  "blue-react": "^10.0.1",
52
+ "colorjs.io": "^0.5.2",
52
53
  "gh-pages": "^3.1.0",
53
54
  "license-report": "^6.2.0",
54
55
  "lint-staged": "^11.1.2",