blue-web 1.19.1 → 1.21.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.19.1 (https://bruegmann.github.io/blue-web)
2
+ * Blue Web v1.21.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
 
@@ -53,3 +53,9 @@
53
53
 
54
54
  @import "./styles/devexpress";
55
55
  @import "./styles/inter";
56
+
57
+ *,
58
+ *:before,
59
+ *:after {
60
+ corner-shape: var(--blue-corner-shape);
61
+ }
@@ -1,36 +1,25 @@
1
- .blue-anchor {
2
- anchor-name: var(--blue-anchor-name, --anchor-1);
3
- }
4
-
5
- @position-try --blue-anchored-below {
6
- top: anchor(var(--blue-anchor-name, --anchor-1) bottom);
7
- bottom: unset;
8
- }
9
-
10
- @position-try --blue-anchored-above {
11
- bottom: anchor(var(--blue-anchor-name, --anchor-1) top);
12
- top: unset;
13
- }
14
-
15
1
  .blue-anchored {
16
- top: anchor(var(--blue-anchor-name, --anchor-1) bottom);
17
- position-try: --blue-anchored-below, --blue-anchored-above;
2
+ position-try: flip-inline;
3
+ position-area: bottom span-right;
4
+ position: fixed;
5
+
6
+ // Normalize popover
7
+ &[popover] {
8
+ margin: 0;
9
+ padding: 0;
10
+ border: 0;
11
+ }
18
12
  }
19
13
 
20
14
  .blue-anchored-start {
21
- left: anchor(var(--blue-anchor-name, --anchor-1) left);
15
+ position-area: bottom span-right;
22
16
  }
23
17
 
24
18
  .blue-anchored-end {
25
- left: anchor(var(--blue-anchor-name, --anchor-1) right);
26
- translate: -100%;
19
+ position-area: bottom span-left;
27
20
  }
28
21
 
29
22
  @supports not (anchor-name: --anchor-1) {
30
- .blue-anchored-end {
31
- translate: none;
32
- }
33
-
34
23
  .blue-anchored-fallback {
35
24
  left: 50%;
36
25
  top: 50%;
@@ -45,3 +34,9 @@
45
34
  }
46
35
  }
47
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;
@@ -22,3 +22,7 @@
22
22
  }
23
23
  }
24
24
  }
25
+
26
+ .blue-btn-square {
27
+ padding: calc(var(--bs-btn-padding-y) + #{$icon-link-underline-offset});
28
+ }
@@ -14,8 +14,7 @@
14
14
  transition: transform 0.2s;
15
15
  }
16
16
 
17
- &[open] > summary > .blue-collapse-header > .blue-collapse-chevron,
18
- &[open] > summary > .blue-collapse-chevron {
17
+ &[open] > summary .blue-collapse-chevron {
19
18
  --blue-collapse-chevron-rotate: 90deg;
20
19
  transform: rotate(var(--blue-collapse-chevron-rotate));
21
20
  }
@@ -46,6 +45,12 @@
46
45
  }
47
46
  }
48
47
 
48
+ .blue-collapse-indent {
49
+ // 0.5em is half of icon width
50
+ --margin-inline-start: calc(#{$input-btn-padding-x} + 0.5em + #{$input-btn-border-width});
51
+ margin-inline-start: var(--margin-inline-start);
52
+ }
53
+
49
54
  // Let's you group a collapse together with another UI element like a button that should come before the collapse summary.
50
55
  .blue-collapse-group {
51
56
  display: grid;
@@ -60,7 +65,7 @@
60
65
  grid-column: 2;
61
66
 
62
67
  & + * {
63
- width: calc(100% + 1rem - 2px);
68
+ width: calc(100% + var(--margin-inline-start) - 3px);
64
69
  }
65
70
  }
66
71
  }
@@ -1,12 +1,7 @@
1
1
  :root {
2
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;
3
+ --blue-font-feature-settings: "liga" 1, "calt" 1, "cv05" 1, "cv07" 1, "tnum" 1, "zero" 1;
4
+ font-feature-settings: var(--blue-font-feature-settings);
10
5
  font-size: 14px;
11
6
  }
12
7
  @supports (font-variation-settings: normal) {
@@ -108,6 +108,12 @@
108
108
  grid-area: side;
109
109
  overflow: auto;
110
110
  background: inherit;
111
+ scrollbar-color: transparent transparent;
112
+
113
+ &:hover,
114
+ &:focus-within {
115
+ scrollbar-color: color-mix(in srgb, currentColor 50%, transparent) transparent;
116
+ }
111
117
  }
112
118
 
113
119
  @media (width < 64rem) {
@@ -143,6 +149,7 @@
143
149
  margin-left: auto;
144
150
  margin-right: auto;
145
151
  overflow: auto;
152
+ scrollbar-color: color-mix(in srgb, currentColor 50%, transparent) transparent;
146
153
  background-color: rgba(var(--bs-body-bg-rgb), var(--bs-bg-opacity, 1));
147
154
  color: rgba(var(--bs-body-color-rgb), var(--bs-text-opacity, 1));
148
155
  box-shadow: var(--bs-box-shadow-sm);
@@ -1,81 +1,27 @@
1
- @keyframes blue-menu-item-indicator-in-from-side {
2
- from {
3
- transform: translateX(-100%);
4
- }
5
- to {
6
- transform: translateX(1);
7
- }
8
- }
9
-
10
- @keyframes blue-menu-item-indicator-in-from-below {
11
- from {
12
- transform: translateY(100%);
13
- }
14
- to {
15
- transform: translateY(1);
16
- }
17
- }
18
-
19
1
  .blue-menu-item {
2
+ display: inline-flex;
3
+ align-items: center;
20
4
  transition:
21
5
  width 0.5s,
22
6
  background-color 0.3s,
23
7
  color 0.15s,
24
8
  box-shadow 0.3s,
25
9
  opacity 0.3s !important;
10
+ color: inherit;
11
+ border-color: transparent;
12
+ --bs-btn-active-border-color: transparent;
13
+ --bs-btn-disabled-border-color: transparent;
26
14
 
27
15
  @media (prefers-reduced-motion) {
28
16
  transition: none !important;
29
17
  }
30
18
 
31
- & {
32
- border: none;
33
- box-shadow: none;
34
- background-image: none;
35
- }
36
-
37
- &:focus {
38
- box-shadow: none;
39
- }
40
-
41
19
  &:focus-visible {
42
20
  &,
43
21
  &.active {
44
22
  box-shadow: inset 0 0 0 0.25rem color-mix(in srgb, currentColor 15%, transparent);
45
23
  }
46
24
  }
47
- }
48
-
49
- .blue-menu-item-icon {
50
- display: inline-block;
51
-
52
- & > * {
53
- display: block;
54
- width: 1.5rem;
55
- }
56
- }
57
-
58
- .blue-menu-item-icon.iconForActive {
59
- display: none;
60
- }
61
-
62
- .blue-menu-item.active {
63
- .blue-menu-item-icon.hasIconForActive {
64
- display: none;
65
- }
66
- .blue-menu-item-icon.iconForActive {
67
- display: inline-block;
68
- }
69
- }
70
-
71
- .blue-menu-item-dropdown {
72
- margin-left: 1rem;
73
- animation: blue-menu-item-dropdown 0.15s;
74
- position: relative;
75
-
76
- @media (prefers-reduced-motion) {
77
- animation-duration: 0s;
78
- }
79
25
 
80
26
  &::before {
81
27
  content: "";
@@ -84,88 +30,226 @@
84
30
  right: 0.125rem;
85
31
  bottom: 0.125rem;
86
32
  left: 0.125rem;
33
+ background-color: currentColor;
87
34
  border-radius: $border-radius;
88
- box-shadow: $box-shadow;
89
- border: 1px solid color-mix(in srgb, currentColor 15%, transparent);
90
- background-color: var(--blue-menu-item-dropdown-bg);
91
- }
92
-
93
- &[popover] {
94
- position: fixed;
95
- margin: 0;
96
- padding: 0;
97
- z-index: 1000;
98
- border: none;
99
- background: transparent;
100
- border-radius: calc(#{$border-radius} + 0.1rem);
101
- box-shadow: $box-shadow;
102
- }
103
- }
104
-
105
- .blue-menu-item {
106
- color: inherit;
107
- width: auto;
108
- height: $normal-size;
109
- font-size: $bla-btn-font-size;
110
- display: flex;
111
- align-items: center;
112
- border-color: transparent;
113
- --bs-btn-padding-x: 0.437rem;
114
- @include slide-transition();
35
+ transform: scale(0.9);
36
+ opacity: 0;
37
+ transition: all 0.2s;
115
38
 
116
- &::before {
117
- @include blue-menu-item-background();
118
- }
119
-
120
- &[draggable] {
121
- cursor: grab;
122
-
123
- &:active {
124
- box-shadow: inset 0 0 0.25rem;
39
+ @media (prefers-reduced-motion) {
40
+ transition: none;
125
41
  }
126
42
  }
127
43
 
128
44
  &:hover,
129
45
  &:active,
130
- &.highlighted,
46
+ &.active,
131
47
  &:has(+ :popover-open) {
132
- color: inherit;
133
- border-color: transparent;
134
-
135
48
  &::before {
136
49
  transform: scale(1);
137
50
  opacity: 0.25;
138
51
  }
139
52
  }
140
53
 
141
- &.highlighted,
54
+ &.active,
142
55
  &:has(+ :popover-open) {
143
56
  &::before {
144
57
  opacity: 0.16;
145
58
  }
146
59
  }
147
60
 
148
- &:hover,
149
- &:active {
150
- &::before {
151
- opacity: 0.25;
61
+ &.current {
62
+ position: relative;
63
+ &::after {
64
+ @include blue-menu-item-indicator();
152
65
  }
153
66
  }
67
+ }
154
68
 
155
- &.active::after {
156
- @include blue-menu-item-indicator();
69
+ .blue-horizontal {
70
+ .blue-menu-item.current::after {
71
+ @include blue-menu-item-indicator-horizontal();
157
72
  }
73
+ }
158
74
 
159
- & > * + .blue-menu-item-label {
160
- margin-left: 0.5rem;
75
+ .blue-menu-item-current-hidden {
76
+ &:is(:where(.blue-menu-item):is(.current) *) {
77
+ display: none !important;
161
78
  }
162
79
  }
163
-
164
- .blue-menu-item-wrapper {
165
- display: contents;
80
+ .blue-menu-item-default-hidden {
81
+ &:is(:where(.blue-menu-item):is(:not(.current)) *) {
82
+ display: none !important;
83
+ }
166
84
  }
167
85
 
168
- .blue-menu-item-dropdown > .blue-menu-item-wrapper > .blue-menu-item,
169
- .blue-menu-item-dropdown > .blue-menu-item {
170
- width: 100%;
171
- }
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
+ // }
@@ -32,9 +32,11 @@
32
32
  (var(--#{$prefix}nav-link-font-size) * var(--#{$prefix}body-line-height))
33
33
  );
34
34
  margin-bottom: 0.25rem;
35
+ padding-inline: var(--blue-scrollspy-marker-group-padding-inline);
36
+ gap: var(--blue-scrollspy-marker-group-gap);
35
37
  }
36
38
 
37
- & > section {
39
+ & > :is(section, .blue-scrollspy-group) {
38
40
  &::scroll-marker {
39
41
  content: attr(aria-label);
40
42
 
@@ -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
+ }
@@ -90,6 +90,8 @@ $sidebar-shrink-breakpoint: 600px !default;
90
90
  // Breakpoint for sidebar fully expanded
91
91
  $sidebar-expanded-breakpoint: 1400px !default;
92
92
 
93
+ $corner-shape: #{round} !default;
94
+
93
95
  :root {
94
96
  --blue-app-bg: #{$app-bg};
95
97
 
@@ -107,6 +109,8 @@ $sidebar-expanded-breakpoint: 1400px !default;
107
109
  --blue-action-link-bg-color: var(--blue-theme);
108
110
  --blue-menu-item-indicator-bg: #{$sidebar-indicator-color};
109
111
  --blue-menu-item-height: #{$normal-size};
112
+
113
+ --blue-corner-shape: #{$corner-shape};
110
114
  }
111
115
 
112
116
  @include color-mode(dark, true) {