blacklight-frontend 8.3.0 → 8.4.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.
@@ -2,14 +2,8 @@
2
2
  Header bar at top (Bootstrap nav-bar)
3
3
  */
4
4
 
5
- .topbar > .container {
6
- @media (max-width: breakpoint-max(xs)) {
7
- margin-left: 0;
8
- margin-right: 0;
9
- }
10
- }
11
-
12
- .navbar-logo { /* The main logo image for the Blacklight instance */
5
+ .navbar-logo {
6
+ /* The main logo image for the Blacklight instance */
13
7
  @if $logo-image {
14
8
  background: transparent $logo-image no-repeat top left;
15
9
  background-size: $logo-width $logo-height;
@@ -36,32 +30,5 @@
36
30
  .search-query-form {
37
31
  @extend .col-md-12;
38
32
  @extend .col-lg-8;
39
- padding-left: 0;
40
- }
41
- }
42
-
43
- #skip-link {
44
- position: absolute;
45
- top: 5px;
46
- left: 10px;
47
- z-index: 1;
48
-
49
- .element-invisible {
50
- position: absolute !important;
51
- clip: rect(1px, 1px, 1px, 1px);
52
- overflow: hidden;
53
- height: 1px;
54
- }
55
-
56
- .element-invisible.element-focusable:active,
57
- .element-invisible.element-focusable:focus {
58
- position: static !important;
59
- clip: auto;
60
- overflow: visible;
61
- height: auto;
62
- }
63
-
64
- a:focus {
65
- background-color: $white;
66
33
  }
67
34
  }
@@ -6,6 +6,7 @@
6
6
  }
7
7
  }
8
8
 
9
- .remove-icon {
10
- font-family: $remove-icon-font-family;
9
+ .remove .bi {
10
+ height: 1em;
11
+ width: 1em;
11
12
  }
@@ -1 +1,4 @@
1
1
  /* Generic layout stuff */
2
+ main {
3
+ padding-block: var(--bl-main-padding-y);
4
+ }
@@ -1,8 +1,8 @@
1
1
  // define a visually-hidden class that applies to a given breakpoint and below
2
2
  // https://getbootstrap.com/docs/5.3/helpers/visually-hidden/
3
3
  @if mixin-exists(visually-hidden) {
4
- @each $infix, $breakpoint in $grid-breakpoints {
5
- .visually-hidden-#{$infix} {
4
+ @each $breakpoint in map-keys($grid-breakpoints) {
5
+ .visually-hidden-#{$breakpoint} {
6
6
  @include media-breakpoint-down($breakpoint) {
7
7
  @include visually-hidden;
8
8
  }
@@ -10,8 +10,8 @@
10
10
  }
11
11
  } @else if mixin-exists(sr-only) {
12
12
  // Bootstrap 4 version
13
- @each $infix, $breakpoint in $grid-breakpoints {
14
- .visually-hidden-#{$infix} {
13
+ @each $breakpoint in map-keys($grid-breakpoints) {
14
+ .visually-hidden-#{$breakpoint} {
15
15
  @include media-breakpoint-down($breakpoint) {
16
16
  @include sr-only;
17
17
  }
@@ -1,6 +1,6 @@
1
1
  // bootstrap does flex-grow: 1 by default which makes the
2
2
  // text input roughly the same size as the select in many cases
3
- .input-group>.search-q {
3
+ .input-group > .search-q {
4
4
  flex-grow: 4;
5
5
  }
6
6
 
@@ -10,20 +10,15 @@
10
10
  flex-grow: 4;
11
11
  padding: 0;
12
12
  position: relative;
13
-
13
+
14
14
  .search-q {
15
15
  border: 0;
16
16
  height: 100%;
17
17
  width: 100%;
18
18
  }
19
-
19
+
20
20
  ul {
21
- @extend .dropdown-menu;
22
21
  display: block;
23
-
24
- li {
25
- @extend .dropdown-item;
26
- }
27
22
  }
28
23
  }
29
24
 
@@ -1,8 +1,9 @@
1
1
  /* Search History */
2
2
  .search-history {
3
+ --bl-history-filter-name-color: var(--bs-secondary-color);
3
4
 
4
5
  td {
5
- padding: $spacer
6
+ padding: $spacer;
6
7
  }
7
8
 
8
9
  .constraints-container {
@@ -10,12 +11,11 @@
10
11
  }
11
12
 
12
13
  .constraint {
13
- @extend .px-4;
14
+ padding-inline-end: $spacer;
14
15
  display: block;
15
- text-indent: -1 * map-get($spacers, 3);
16
16
  }
17
17
 
18
- .filter-name, .filter-separator {
19
- @extend .text-muted;
18
+ .filter-name {
19
+ color: var(--bl-history-filter-name-color);
20
20
  }
21
21
  }
@@ -1,10 +1,13 @@
1
1
  // the search results on the index view of the catalog
2
2
  .documents-list {
3
+ --bl-results-document-margin-top: #{$spacer};
4
+ --bl-results-document-padding-top: #{$spacer};
5
+
3
6
  .document {
4
7
  display: flex;
5
8
  border-bottom: 1px dotted $table-border-color;
6
- margin-top: $spacer;
7
- padding-top: $spacer;
9
+ margin-top: var(--bl-results-document-margin-top);
10
+ padding-top: var(--bl-results-document-padding-top);
8
11
 
9
12
  .document-title-heading {
10
13
  @extend h5;
@@ -1,17 +1,23 @@
1
1
  /* Warning! If you want to change these, just copy them into your own theme css. But you want to remove the !default, which only will set them if not already set. */
2
2
 
3
- $logo-image: image_url('blacklight/logo.png') !default;
3
+ $logo-image: image_url("blacklight/logo.png") !default;
4
4
  $logo-width: 150px !default;
5
5
  $logo-height: 50px !default;
6
6
 
7
- /* label (field names) */
8
- $field_name_color: $text-muted !default;
9
-
10
- // the default bootstrap font-family list includes "Segoe UI Emoji", which, on windows
11
- // renders our remove icon as an emoji-sized x instead of what we see on all other platforms...
12
- // so, for now (until we replace it with an SVG icon or something), we get to override bootstrap:
13
- $remove-icon-font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", "Liberation Sans", sans-serif !default;
14
-
15
7
  $facet-active-border: $success !default;
16
8
  $facet-active-bg: $success !default;
17
- $facet-active-item-color: $success !default;
9
+ $facet-active-item-color: $success !default;
10
+
11
+ /* for compatability with BS < 5.3 */
12
+ $body-secondary-color: rgba($body-color, 0.75) !default;
13
+
14
+ :root {
15
+ --bs-secondary-color: #{$body-secondary-color}; /* for compatability with BS < 5.3 */
16
+
17
+ --bl-main-padding-y: 0.5rem;
18
+
19
+ --bl-constraint-remove-hover-bg: #bb2d3b;
20
+ --bl-constraint-remove-hover-border-color: #bb2d3b;
21
+
22
+ --bl-field-name-color: var(--bs-secondary-color);
23
+ }
@@ -37,7 +37,7 @@ export default class CheckboxSubmit {
37
37
  this.labelTarget.removeAttribute('disabled')
38
38
  this.checkboxTarget.removeAttribute('disabled')
39
39
  this.updateStateFor(!this.checked)
40
- document.querySelector('[data-role=bookmark-counter]').innerHTML = json.bookmarks.count
40
+ if (this.bookmarkCounter()) this.bookmarkCounter().innerHTML = json.bookmarks.count
41
41
  }).catch((error) => {
42
42
  this.handleError(error)
43
43
  })
@@ -63,6 +63,10 @@ export default class CheckboxSubmit {
63
63
  return this.form.querySelector('[data-checkboxsubmit-target="span"]')
64
64
  }
65
65
 
66
+ bookmarkCounter() {
67
+ return document.querySelector('[data-role="bookmark-counter"]')
68
+ }
69
+
66
70
  handleError() {
67
71
  alert("Unable to save the bookmark at this time.")
68
72
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "blacklight-frontend",
3
- "version": "8.3.0",
3
+ "version": "8.4.0",
4
4
  "description": "The frontend code and styles for Blacklight",
5
5
  "main": "app/assets/javascripts/blacklight",
6
6
  "module": "app/assets/javascripts/blacklight/blacklight.esm.js",