blue-web 1.20.0 → 1.21.1

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.20.0 (https://bruegmann.github.io/blue-web)
2
+ * Blue Web v1.21.1 (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
 
@@ -50,6 +50,7 @@
50
50
  @import "./styles/actions";
51
51
  @import "./styles/anchor";
52
52
  @import "./styles/scrollspy";
53
+ @import "./styles/intro";
53
54
 
54
55
  @import "./styles/devexpress";
55
56
  @import "./styles/inter";
@@ -4,7 +4,7 @@
4
4
  var(--bs-btn-padding-x, 0.75rem) + var(--bs-btn-border-width, 1px)
5
5
  );
6
6
 
7
- max-height: $normal-size;
7
+ max-height: var(--blue-header-height);
8
8
  overflow: hidden;
9
9
 
10
10
  .blue-actions-menu {
@@ -34,3 +34,9 @@
34
34
  }
35
35
  }
36
36
  }
37
+
38
+ .btn:has(+ :popover-open):not(:focus-visible):not(.blue-menu-item) {
39
+ --bs-focus-ring-color: rgba(var(--bs-secondary-rgb), 0.25);
40
+ box-shadow: var(--bs-focus-ring-x, 0) var(--bs-focus-ring-y, 0) var(--bs-focus-ring-blur, 0)
41
+ var(--bs-focus-ring-width) var(--bs-focus-ring-color);
42
+ }
@@ -43,3 +43,4 @@ $focus-ring-color: #{rgba(var(--bs-primary-rgb), 25%)} !default;
43
43
  $input-focus-border-color: #{rgba(var(--bs-primary-rgb), 50%)} !default;
44
44
 
45
45
  $enable-button-pointers: false !default;
46
+ $focus-ring-width: 0.125rem !default;
@@ -46,12 +46,11 @@
46
46
  // Helpers
47
47
  @import "node_modules/bootstrap/scss/helpers";
48
48
 
49
- // Custom added utilities for Blue Web
49
+ // Enable responsive for position
50
50
  $utilities: map-merge(
51
51
  $utilities,
52
52
  (
53
- "position":
54
- map-merge(
53
+ "position": map-merge(
55
54
  map-get($utilities, "position"),
56
55
  (
57
56
  responsive: true
@@ -70,6 +70,11 @@
70
70
  $text-color: color-contrast($value);
71
71
  }
72
72
 
73
+ // More contrast for secondary plain button
74
+ @if $color == "secondary" {
75
+ $text-color: shade-color($value, 60%);
76
+ }
77
+
73
78
  @include button-variant(
74
79
  transparent,
75
80
  transparent,
@@ -96,6 +101,11 @@
96
101
  $text-color: color-contrast($value);
97
102
  }
98
103
 
104
+ // More contrast for secondary plain button
105
+ @if $color == "secondary" {
106
+ $text-color: tint-color($value, 60%);
107
+ }
108
+
99
109
  @include button-variant(
100
110
  transparent,
101
111
  transparent,
@@ -4,7 +4,7 @@
4
4
  --dxbl-text-edit-padding-x: 0.75rem !important;
5
5
  --dxbl-text-edit-padding-y: 0.375rem !important;
6
6
  --dxbl-text-edit-line-height: 1.5 !important;
7
- --dxbl-text-edit-focus-shadow-spread: 0.25rem !important;
7
+ --dxbl-text-edit-focus-shadow-spread: #{$focus-ring-width} !important;
8
8
  --dxbl-listbox-border-radius: var(--bs-border-radius) !important;
9
9
  --dxbl-toolbar-font-size: var(--bs-body-font-size) !important;
10
10
  --dxbl-toolbar-btn-border-radius: var(--bs-border-radius) !important;
@@ -37,37 +37,18 @@ body {
37
37
  }
38
38
  }
39
39
 
40
- .sign-in-screen {
41
- padding-top: $normal-size;
42
-
43
- .sign-in-container {
44
- animation: enabledBlueAppPage 0.5s;
45
-
46
- @media (prefers-reduced-motion) {
47
- animation-duration: 0s;
48
- }
49
- }
50
-
51
- @media screen and (min-width: 768px) {
52
- .sign-in-container {
53
- padding: var(--blue-sign-in-container-md-padding, 0 calc(50% - 18rem));
54
- width: var(--blue-sign-in-container-md-width, auto);
55
- }
56
- }
57
- }
58
-
59
- .blue-header-title.sidebar {
60
- width: $bla-sidebar-width;
61
- padding-left: calc(#{$normal-size} + #{$spacer});
62
- transform: translateX(-100%);
63
- transition: transform 0.4s;
64
- background: var(--blue-sidebar-bg);
65
- color: $sidebar-color;
66
-
67
- @media (prefers-reduced-motion) {
68
- transition: none;
69
- }
70
- }
40
+ // .blue-header-title.sidebar {
41
+ // width: $bla-sidebar-width;
42
+ // padding-left: calc(#{$normal-size} + #{$spacer});
43
+ // transform: translateX(-100%);
44
+ // transition: transform 0.4s;
45
+ // background: var(--blue-sidebar-bg);
46
+ // color: $sidebar-color;
47
+
48
+ // @media (prefers-reduced-motion) {
49
+ // transition: none;
50
+ // }
51
+ // }
71
52
 
72
53
  .blue-scroll-shadow {
73
54
  @include scroll-shadow(var(--bs-body-bg));
@@ -0,0 +1,22 @@
1
+ .sign-in-screen {
2
+ padding-top: var(--blue-header-height);
3
+
4
+ &:last-child {
5
+ padding-bottom: var(--blue-header-height);
6
+ }
7
+
8
+ .sign-in-container {
9
+ animation: enabledBlueAppPage 0.5s;
10
+
11
+ @media (prefers-reduced-motion) {
12
+ animation-duration: 0s;
13
+ }
14
+ }
15
+
16
+ @media screen and (min-width: 768px) {
17
+ .sign-in-container {
18
+ padding: var(--blue-sign-in-container-md-padding, 0 calc(50% - 18rem));
19
+ width: var(--blue-sign-in-container-md-width, auto);
20
+ }
21
+ }
22
+ }
@@ -8,17 +8,13 @@
8
8
  --drawer-side-shadow:
9
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
10
  rgba(0, 0, 0, 0) 0px 0px 0px 0px, rgba(0, 0, 0, 0.25) 0px 25px 50px -12px;
11
- --toggler-size: calc(
12
- var(--bs-btn-border-width, 1px) + var(--bs-btn-padding-y, 0.375rem) +
13
- (var(--bs-btn-font-size, 1rem) * var(--bs-btn-line-height, 1.5)) + var(--bs-btn-padding-y, 0.375rem) +
14
- var(--bs-btn-border-width, 1px)
15
- );
16
11
  --side-width: 18rem;
17
12
  --base-z-index: 0;
18
13
 
19
14
  --base-z-index: 500;
20
15
  --side-width: var(--blue-sidebar-width);
21
- --toggler-size: var(--blue-menu-item-height);
16
+ --toggler-width: 2.714rem;
17
+ --toggler-height: var(--blue-header-height);
22
18
 
23
19
  --blue-menu-item-indicator-bg: #{color-contrast($sidebar-bg, $sidebar-indicator-color)};
24
20
  --bs-link-hover-color: #{color-contrast($sidebar-bg, $link-hover-color)};
@@ -27,15 +23,15 @@
27
23
  position: relative;
28
24
  display: grid;
29
25
 
30
- grid-template-rows: var(--toggler-size) auto;
26
+ grid-template-rows: var(--toggler-height) auto;
31
27
  grid-template-areas: "header" "main";
32
28
 
33
29
  color: var(--blue-sidebar-color);
34
30
  background-color: var(--blue-sidebar-bg);
35
31
 
36
32
  &:has(> .blue-layout-toggle) {
37
- grid-template-columns: 0 0 var(--toggler-size) calc(var(--side-width) - var(--toggler-size)) 1fr;
38
- grid-template-rows: var(--toggler-size) auto;
33
+ grid-template-columns: 0 0 var(--toggler-width) calc(var(--side-width) - var(--toggler-width)) 1fr;
34
+ grid-template-rows: var(--toggler-height) auto;
39
35
  grid-template-areas:
40
36
  "state . toggle header header"
41
37
  ". side main main main";
@@ -99,6 +95,7 @@
99
95
 
100
96
  display: flex;
101
97
  justify-content: space-between;
98
+ align-items: center;
102
99
  position: relative;
103
100
  z-index: var(--blue-layout-header-z-index, 4);
104
101
  --blue-menu-item-dropdown-bg: var(--blue-sidebar-bg);
@@ -108,6 +105,12 @@
108
105
  grid-area: side;
109
106
  overflow: auto;
110
107
  background: inherit;
108
+ scrollbar-color: transparent transparent;
109
+
110
+ &:hover,
111
+ &:focus-within {
112
+ scrollbar-color: color-mix(in srgb, currentColor 50%, transparent) transparent;
113
+ }
111
114
  }
112
115
 
113
116
  @media (width < 64rem) {
@@ -143,6 +146,7 @@
143
146
  margin-left: auto;
144
147
  margin-right: auto;
145
148
  overflow: auto;
149
+ scrollbar-color: color-mix(in srgb, currentColor 50%, transparent) transparent;
146
150
  background-color: rgba(var(--bs-body-bg-rgb), var(--bs-bg-opacity, 1));
147
151
  color: rgba(var(--bs-body-color-rgb), var(--bs-text-opacity, 1));
148
152
  box-shadow: var(--bs-box-shadow-sm);
@@ -24,14 +24,16 @@
24
24
  }
25
25
 
26
26
  &::before {
27
+ --visual-padding: 0.125rem;
28
+
27
29
  content: "";
28
30
  position: absolute;
29
- top: 0.125rem;
30
- right: 0.125rem;
31
- bottom: 0.125rem;
32
- left: 0.125rem;
31
+ top: var(--visual-padding);
32
+ right: var(--visual-padding);
33
+ bottom: var(--visual-padding);
34
+ left: var(--visual-padding);
33
35
  background-color: currentColor;
34
- border-radius: $border-radius;
36
+ border-radius: var(--bs-btn-border-radius);
35
37
  transform: scale(0.9);
36
38
  opacity: 0;
37
39
  transition: all 0.2s;
@@ -82,174 +84,3 @@
82
84
  display: none !important;
83
85
  }
84
86
  }
85
-
86
- // @keyframes blue-menu-item-indicator-in-from-side {
87
- // from {
88
- // transform: translateX(-100%);
89
- // }
90
- // to {
91
- // transform: translateX(1);
92
- // }
93
- // }
94
-
95
- // @keyframes blue-menu-item-indicator-in-from-below {
96
- // from {
97
- // transform: translateY(100%);
98
- // }
99
- // to {
100
- // transform: translateY(1);
101
- // }
102
- // }
103
-
104
- // .blue-menu-item {
105
- // transition:
106
- // width 0.5s,
107
- // background-color 0.3s,
108
- // color 0.15s,
109
- // box-shadow 0.3s,
110
- // opacity 0.3s !important;
111
-
112
- // @media (prefers-reduced-motion) {
113
- // transition: none !important;
114
- // }
115
-
116
- // & {
117
- // border: none;
118
- // box-shadow: none;
119
- // background-image: none;
120
- // }
121
-
122
- // &:focus {
123
- // box-shadow: none;
124
- // }
125
-
126
- // &:focus-visible {
127
- // &,
128
- // &.active {
129
- // box-shadow: inset 0 0 0 0.25rem color-mix(in srgb, currentColor 15%, transparent);
130
- // }
131
- // }
132
- // }
133
-
134
- // .blue-menu-item-icon {
135
- // display: inline-block;
136
-
137
- // & > * {
138
- // display: block;
139
- // width: 1.5rem;
140
- // }
141
- // }
142
-
143
- // .blue-menu-item-icon.iconForActive {
144
- // display: none;
145
- // }
146
-
147
- // .blue-menu-item.active {
148
- // .blue-menu-item-icon.hasIconForActive {
149
- // display: none;
150
- // }
151
- // .blue-menu-item-icon.iconForActive {
152
- // display: inline-block;
153
- // }
154
- // }
155
-
156
- // .blue-menu-item-dropdown {
157
- // margin-left: 1rem;
158
- // animation: blue-menu-item-dropdown 0.15s;
159
- // position: relative;
160
-
161
- // @media (prefers-reduced-motion) {
162
- // animation-duration: 0s;
163
- // }
164
-
165
- // &::before {
166
- // content: "";
167
- // position: absolute;
168
- // top: 0.125rem;
169
- // right: 0.125rem;
170
- // bottom: 0.125rem;
171
- // left: 0.125rem;
172
- // border-radius: $border-radius;
173
- // box-shadow: $box-shadow;
174
- // border: 1px solid color-mix(in srgb, currentColor 15%, transparent);
175
- // background-color: var(--blue-menu-item-dropdown-bg);
176
- // }
177
-
178
- // &[popover] {
179
- // position: fixed;
180
- // margin: 0;
181
- // padding: 0;
182
- // z-index: 1000;
183
- // border: none;
184
- // background: transparent;
185
- // border-radius: calc(#{$border-radius} + 0.1rem);
186
- // box-shadow: $box-shadow;
187
- // }
188
- // }
189
-
190
- // .blue-menu-item {
191
- // color: inherit;
192
- // width: auto;
193
- // height: $normal-size;
194
- // font-size: $bla-btn-font-size;
195
- // display: flex;
196
- // align-items: center;
197
- // border-color: transparent;
198
- // --bs-btn-padding-x: 0.437rem;
199
-
200
- // &::before {
201
- // @include blue-menu-item-background();
202
- // }
203
-
204
- // &[draggable] {
205
- // cursor: grab;
206
-
207
- // &:active {
208
- // box-shadow: inset 0 0 0.25rem;
209
- // }
210
- // }
211
-
212
- // &:hover,
213
- // &:active,
214
- // &.highlighted,
215
- // &:has(+ :popover-open) {
216
- // color: inherit;
217
- // border-color: transparent;
218
-
219
- // &::before {
220
- // transform: scale(1);
221
- // opacity: 0.25;
222
- // }
223
- // }
224
-
225
- // &.highlighted,
226
- // &:has(+ :popover-open) {
227
- // &::before {
228
- // opacity: 0.16;
229
- // }
230
- // }
231
-
232
- // &:hover,
233
- // &:active {
234
- // &::before {
235
- // opacity: 0.25;
236
- // }
237
- // }
238
-
239
- // &.active::after {
240
- // @include blue-menu-item-indicator();
241
- // }
242
-
243
- // & > * + .blue-menu-item-label {
244
- // margin-left: 0.5rem;
245
- // }
246
- // }
247
-
248
- // .blue-menu-item-wrapper {
249
- // display: contents;
250
- // }
251
-
252
- // .blue-menu-item-dropdown > .blue-menu-item-wrapper > .blue-menu-item,
253
- // .blue-menu-item-dropdown > .blue-menu-item {
254
- // width: 100%;
255
- // }
@@ -27,16 +27,23 @@
27
27
 
28
28
  &::scroll-marker-group {
29
29
  display: flex;
30
+ overflow-x: auto;
31
+ overflow-y: hidden;
32
+ -ms-overflow-style: none;
33
+ scrollbar-width: none;
30
34
  min-height: calc(
31
35
  (var(--#{$prefix}nav-link-padding-y) + var(--#{$prefix}nav-tabs-border-width)) * 2 +
32
36
  (var(--#{$prefix}nav-link-font-size) * var(--#{$prefix}body-line-height))
33
37
  );
34
38
  margin-bottom: 0.25rem;
39
+ padding-inline: var(--blue-scrollspy-marker-group-padding-inline);
40
+ gap: var(--blue-scrollspy-marker-group-gap);
35
41
  }
36
42
 
37
- & > section {
43
+ & > :is(section, .blue-scrollspy-group) {
38
44
  &::scroll-marker {
39
45
  content: attr(aria-label);
46
+ white-space: nowrap;
40
47
 
41
48
  font-size: var(--#{$prefix}nav-link-font-size);
42
49
  box-sizing: border-box;
@@ -4,3 +4,17 @@
4
4
  .m-last-0:last-child {
5
5
  margin: 0 !important;
6
6
  }
7
+
8
+ // Shows empty message if the element has no children.
9
+ // Can be used for lists and such.
10
+ // For localization you should override CSS variable `--message` dynamically.
11
+ .blue-empty-message {
12
+ --message: "No items found.";
13
+ &:empty::before {
14
+ content: var(--message);
15
+ color: var(--bs-secondary-color);
16
+ display: flex;
17
+ padding: 1rem;
18
+ justify-content: center;
19
+ }
20
+ }
@@ -105,6 +105,7 @@ $corner-shape: #{round} !default;
105
105
  --blue-sidebar-bg: #{$sidebar-bg};
106
106
  --blue-header-bg: #{$header-bg};
107
107
 
108
+ --blue-header-height: 3.429rem;
108
109
  --blue-header-color: #{$header-color};
109
110
  --blue-action-link-bg-color: var(--blue-theme);
110
111
  --blue-menu-item-indicator-bg: #{$sidebar-indicator-color};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "blue-web",
3
- "version": "1.20.0",
3
+ "version": "1.21.1",
4
4
  "description": "UI components built on top of Bootstrap 5",
5
5
  "license": "LGPL-3.0-or-later",
6
6
  "type": "module",
@@ -36,7 +36,7 @@
36
36
  "bootstrap": "~5.3.8"
37
37
  },
38
38
  "devDependencies": {
39
- "@astrojs/mdx": "^4.3.10",
39
+ "@astrojs/mdx": "^4.3.13",
40
40
  "@astrojs/react": "^4.4.2",
41
41
  "@babel/cli": "^7.10.4",
42
42
  "@babel/preset-env": "^7.10.4",
@@ -47,10 +47,10 @@
47
47
  "@types/react": "^19.0.8",
48
48
  "@types/react-dom": "^19.0.3",
49
49
  "@types/react-syntax-highlighter": "^13.5.0",
50
- "astro": "^5.15.4",
50
+ "astro": "^5.16.5",
51
51
  "autoprefixer": "^10.3.6",
52
52
  "babel-loader": "^8.4.1",
53
- "blue-react": "file:../blue-react/blue-react-10.2.1010.tgz",
53
+ "blue-react": "^11.0.2",
54
54
  "blue-themify": "^1.0.0",
55
55
  "colorjs.io": "^0.5.2",
56
56
  "gh-pages": "^3.1.0",