blue-web 1.11.1 → 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.11.1 (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";
@@ -37,3 +38,6 @@
37
38
  @import "./styles/tabs";
38
39
  @import "./styles/modal";
39
40
  @import "./styles/layout";
41
+ @import "./styles/collapse";
42
+
43
+ @import "./styles/inter";
@@ -1,3 +1,19 @@
1
+ // Main color theme. E.g. used for background for body and sidebar.
2
+ $theme: hsl(217deg 10% 94%) !default;
3
+ $theme-dark: hsl(217deg 10% 8%) !default;
4
+ $primary: hsl(217deg 91% 50%) !default;
5
+ $white: #fff !default;
6
+ $gray-100: hsl(217deg 17% 98%) !default;
7
+ $gray-200: hsl(217deg 16% 93%) !default;
8
+ $gray-300: hsl(217deg 14% 89%) !default;
9
+ $gray-400: hsl(217deg 14% 83%) !default;
10
+ $gray-500: hsl(217deg 11% 71%) !default;
11
+ $gray-600: hsl(217deg 7% 46%) !default;
12
+ $gray-700: hsl(217deg 9% 31%) !default;
13
+ $gray-800: hsl(217deg 10% 23%) !default;
14
+ $gray-900: hsl(217deg 11% 15%) !default;
15
+ $black: #000 !default;
16
+
1
17
  $light: #ecedf0 !default;
2
18
 
3
19
  // Components
@@ -21,9 +37,6 @@ $custom-checkbox-indicator-border-radius: $border-radius-sm !default;
21
37
  $link-decoration: none !default;
22
38
  $link-hover-decoration: underline !default;
23
39
 
24
- $font-family-sans-serif: -apple-system, BlinkMacSystemFont, "Segoe UI Variable Display", "Segoe UI", Roboto, Oxygen-Sans,
25
- Ubuntu, Cantarell, "Helvetica Neue", sans-serif !default;
26
-
27
40
  // Tint focus border and shadow in primary color.
28
41
  // In a future Bootstrap release, this might not be necessary anymore.
29
42
  $focus-ring-color: #{rgba(var(--bs-primary-rgb), 25%)} !default;
@@ -0,0 +1,53 @@
1
+ // Collapse with details and animated
2
+ // Right now not part of Blue Web, but could become one
3
+
4
+ .blue-collapse {
5
+ interpolate-size: allow-keywords;
6
+
7
+ summary {
8
+ list-style: none;
9
+ }
10
+
11
+ summary::-webkit-details-marker {
12
+ display: none;
13
+ }
14
+
15
+ .blue-collapse-chevron {
16
+ transition: transform 0.2s;
17
+ }
18
+
19
+ &[open] > summary > .blue-collapse-header > .blue-collapse-chevron,
20
+ &[open] > summary > .blue-collapse-chevron {
21
+ --blue-collapse-chevron-rotate: 90deg;
22
+
23
+ // If chevron is on the end, rotate has to be -90deg
24
+ &:is(:last-child) {
25
+ --blue-collapse-chevron-rotate: -90deg;
26
+ }
27
+
28
+ &:is(:first-child) {
29
+ --blue-collapse-chevron-rotate: 90deg;
30
+ }
31
+
32
+ transform: rotate(var(--blue-collapse-chevron-rotate));
33
+ }
34
+
35
+ &::details-content {
36
+ block-size: 0;
37
+ transition:
38
+ block-size 0.2s,
39
+ content-visibility 0.2s;
40
+ transition-behavior: allow-discrete;
41
+ }
42
+
43
+ &[open]::details-content {
44
+ block-size: auto;
45
+ }
46
+ }
47
+
48
+ @media (prefers-reduced-motion) {
49
+ .blue-collapse .blue-collapse-chevron,
50
+ .blue-collapse::details-content {
51
+ transition: none;
52
+ }
53
+ }
@@ -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) {
@@ -0,0 +1,23 @@
1
+ :root {
2
+ --bs-font-sans-serif: Inter, #{$font-family-sans-serif};
3
+ font-feature-settings:
4
+ "liga" 1,
5
+ "calt" 1,
6
+ "cv05" 1,
7
+ "cv07" 1,
8
+ "tnum" 1,
9
+ "zero" 1;
10
+ }
11
+ @supports (font-variation-settings: normal) {
12
+ :root {
13
+ --bs-font-sans-serif: InterVariable, #{$font-family-sans-serif};
14
+ }
15
+ }
16
+
17
+ input,
18
+ button,
19
+ select,
20
+ optgroup,
21
+ textarea {
22
+ font-feature-settings: inherit;
23
+ }
@@ -5,8 +5,9 @@
5
5
 
6
6
  .blue-layout {
7
7
  --spacing: 0.25rem;
8
- --drawer-side-shadow: rgba(0, 0, 0, 0) 0px 0px 0px 0px, rgba(0, 0, 0, 0) 0px 0px 0px 0px,
9
- rgba(0, 0, 0, 0) 0px 0px 0px 0px, rgba(0, 0, 0, 0) 0px 0px 0px 0px, rgba(0, 0, 0, 0.25) 0px 25px 50px -12px;
8
+ --drawer-side-shadow:
9
+ rgba(0, 0, 0, 0) 0px 0px 0px 0px, rgba(0, 0, 0, 0) 0px 0px 0px 0px, rgba(0, 0, 0, 0) 0px 0px 0px 0px,
10
+ rgba(0, 0, 0, 0) 0px 0px 0px 0px, rgba(0, 0, 0, 0.25) 0px 25px 50px -12px;
10
11
  --toggler-size: calc(
11
12
  var(--bs-btn-border-width, 1px) + var(--bs-btn-padding-y, 0.375rem) +
12
13
  (var(--bs-btn-font-size, 1rem) * var(--bs-btn-line-height, 1.5)) + var(--bs-btn-padding-y, 0.375rem) +
@@ -19,7 +20,7 @@
19
20
  --side-width: var(--blue-sidebar-width);
20
21
  --toggler-size: var(--blue-menu-item-height);
21
22
 
22
- min-height: 100dvh;
23
+ height: 100dvh;
23
24
  position: relative;
24
25
  display: grid;
25
26
  grid-template-columns: 0 var(--toggler-size) calc(var(--side-width) - var(--toggler-size)) auto;
@@ -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;
@@ -31,13 +31,20 @@
31
31
  }
32
32
 
33
33
  dialog.blue-modal {
34
+ --ani-scale-from: 95%;
35
+ --ani-scale-to: 100%;
36
+ --ani-translate-from: 0 0;
37
+ --ani-translate-to: 0 0;
38
+
34
39
  border: none;
35
40
  background: none;
36
41
  padding: 0;
37
42
  margin: 0;
38
43
  max-width: none;
39
44
  max-height: none;
40
- transition: display 0.2s allow-discrete, overlay 0.2s allow-discrete;
45
+ transition:
46
+ display 0.2s allow-discrete,
47
+ overlay 0.2s allow-discrete;
41
48
  animation: blue-modal-close 0.2s forwards;
42
49
 
43
50
  .offcanvas-backdrop {
@@ -1,25 +1,12 @@
1
- // Main color theme. E.g. used for background for body and sidebar.
2
- $theme: $primary !default;
3
-
4
1
  $theme-colors: () !default;
5
2
  // stylelint-disable-next-line scss/dollar-variable-default
6
3
  $theme-colors: map-merge(
7
4
  (
8
- "theme": $theme,
9
- "white": white,
10
- "black": #212529
5
+ "theme": $theme
11
6
  ),
12
7
  $theme-colors
13
8
  );
14
9
 
15
- // For Bootstrap 5.1 this needs to be set. Otherwise we couldn't use .bg-* and .text-* utils with our custom $theme
16
- // Since Bootstrap 5.2 it's no longer required, so it's commented out. If everything works fine, this can be removed for
17
- // future releases.
18
- // $theme-colors-rgb: map-loop($theme-colors, to-rgb, "$value");
19
- // $utilities-colors: map-merge($utilities-colors, $theme-colors-rgb);
20
- // $utilities-text-colors: map-merge($utilities-text-colors, map-loop($utilities-colors, rgba-css-var, "$key", "text"));
21
- // $utilities-bg-colors: map-merge($utilities-bg-colors, map-loop($utilities-colors, rgba-css-var, "$key", "bg"));
22
-
23
10
  // Alpha value (RGBA) e.g. for header background.
24
11
  $shimmering: 0.8 !default;
25
12
 
@@ -27,7 +14,8 @@ $shimmering: 0.8 !default;
27
14
  $scrollbar-thumb-color: white !default;
28
15
 
29
16
  // Thumb color of scrollbar as RGB (like `255, 255, 255`).
30
- $scrollbar-thumb-color-rgb: red($scrollbar-thumb-color), green($scrollbar-thumb-color), blue($scrollbar-thumb-color) !default;
17
+ $scrollbar-thumb-color-rgb:
18
+ red($scrollbar-thumb-color), green($scrollbar-thumb-color), blue($scrollbar-thumb-color) !default;
31
19
 
32
20
  // Default size for many components, like sidebar menu items.
33
21
  $normal-size: calc(
@@ -56,6 +44,7 @@ $bla-sidebar-width: 16.563rem !default;
56
44
 
57
45
  // Background of sidebar.
58
46
  $sidebar-bg: $theme !default;
47
+ $sidebar-bg-dark: $theme-dark !default;
59
48
 
60
49
  // Background of sidebar when it's opened (on mobile devices).
61
50
  $sidebar-open-bg: darken($sidebar-bg, 30%) !default;
@@ -64,25 +53,27 @@ $sidebar-open-bg: darken($sidebar-bg, 30%) !default;
64
53
  $sidebar-deep-bg: darken($sidebar-bg, 4%) !default;
65
54
 
66
55
  // Text color of sidebar.
67
- $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;
68
58
 
69
59
  // Color of indicator for active sidebar item.
70
60
  $sidebar-indicator-color: $sidebar-color !default;
61
+ $sidebar-indicator-color-dark: $sidebar-color-dark !default;
71
62
 
72
63
  // Background of search control in sidebar.
73
64
  $sidebar-search-bg: $input-bg !default;
74
65
 
75
66
  // Background of the body element
76
- $app-bg: $sidebar-bg !default;
77
-
78
- // Text color of header elements
79
- $header-color: #fff !default;
67
+ $app-bg: $theme !default;
68
+ $app-bg-dark: $theme-dark !default;
80
69
 
81
70
  // Background color of Header
82
71
  $header-bg: $theme !default;
72
+ $header-bg-dark: $theme-dark !default;
83
73
 
84
- // Background color of Header as RGB (like `255, 255, 255`).
85
- $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;
86
77
 
87
78
  // Background of header action menu dropdown menus
88
79
  $header-deep-bg: darken($header-bg, 4%) !default;
@@ -103,6 +94,8 @@ $sidebar-shrink-breakpoint: 600px !default;
103
94
  $sidebar-expanded-breakpoint: 1400px !default;
104
95
 
105
96
  :root {
97
+ --blue-app-bg: #{$app-bg};
98
+
106
99
  --blue-scrollbar-thumb-color-rgb: #{$scrollbar-thumb-color-rgb};
107
100
  --blue-scrollbar-size: #{$scrollbar-size};
108
101
 
@@ -111,27 +104,24 @@ $sidebar-expanded-breakpoint: 1400px !default;
111
104
  --blue-theme: var(--theme, #{$theme});
112
105
  --blue-shimmering: 0.9;
113
106
 
114
- --blue-app-bg: #{$app-bg};
115
-
116
107
  --blue-sidebar-bg: #{$sidebar-bg};
117
- --blue-sidebar-depth-1-bg: #{darken($sidebar-bg, 4%)};
118
- --blue-sidebar-depth-2-bg: #{darken(darken($sidebar-bg, 4%), 4%)};
119
- --blue-sidebar-depth-3-bg: #{darken(darken($sidebar-bg, 4%), 8%)};
120
- --blue-sidebar-depth-4-bg: #{darken(darken($sidebar-bg, 4%), 12%)};
121
- --blue-sidebar-depth-5-bg: #{darken(darken($sidebar-bg, 4%), 16%)};
122
- --blue-sidebar-depth-6-bg: #{darken(darken($sidebar-bg, 4%), 20%)};
123
-
124
108
  --blue-header-bg: #{$header-bg};
125
- --blue-header-bg-rgb: #{$header-bg-rgb};
126
- --blue-header-depth-1-bg: #{darken($header-bg, 4%)};
127
- --blue-header-depth-2-bg: #{darken(darken($header-bg, 4%), 4%)};
128
- --blue-header-depth-3-bg: #{darken(darken($header-bg, 4%), 8%)};
129
- --blue-header-depth-4-bg: #{darken(darken($header-bg, 4%), 12%)};
130
- --blue-header-depth-5-bg: #{darken(darken($header-bg, 4%), 16%)};
131
- --blue-header-depth-6-bg: #{darken(darken($header-bg, 4%), 20%)};
132
109
 
133
110
  --blue-header-color: #{$header-color};
134
111
  --blue-action-link-bg-color: var(--blue-theme);
135
112
  --blue-menu-item-indicator-bg: #{$sidebar-indicator-color};
136
113
  --blue-menu-item-height: #{$normal-size};
137
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.11.1",
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",