blacklight-frontend 7.32.0 → 8.0.0-beta.2

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.
Files changed (31) hide show
  1. package/README.md +11 -3
  2. package/app/assets/javascripts/blacklight/blacklight.esm.js +389 -0
  3. package/app/assets/javascripts/blacklight/blacklight.esm.js.map +1 -0
  4. package/app/assets/javascripts/blacklight/blacklight.js +378 -488
  5. package/app/assets/javascripts/blacklight/blacklight.js.map +1 -0
  6. package/app/assets/stylesheets/blacklight/_autocomplete.scss +25 -0
  7. package/app/assets/stylesheets/blacklight/_blacklight_base.scss +1 -1
  8. package/app/assets/stylesheets/blacklight/_bookmark.scss +16 -0
  9. package/app/assets/stylesheets/blacklight/_bootstrap_overrides.scss +8 -0
  10. package/app/assets/stylesheets/blacklight/_controls.scss +5 -12
  11. package/app/assets/stylesheets/blacklight/_facets.scss +96 -44
  12. package/app/assets/stylesheets/blacklight/_header.scss +0 -15
  13. package/app/assets/stylesheets/blacklight/_icons.scss +0 -14
  14. package/app/assets/stylesheets/blacklight/_mixins.scss +20 -0
  15. package/app/assets/stylesheets/blacklight/_modal.scss +8 -2
  16. package/app/assets/stylesheets/blacklight/_search_form.scss +30 -3
  17. package/app/assets/stylesheets/blacklight/_search_history.scss +10 -1
  18. package/app/assets/stylesheets/blacklight/_search_results.scss +6 -2
  19. package/app/assets/stylesheets/blacklight/blacklight_defaults.scss +4 -1
  20. package/package.json +9 -12
  21. package/app/assets/images/blacklight/list.svg +0 -1
  22. package/app/assets/images/blacklight/search.svg +0 -1
  23. package/app/assets/stylesheets/blacklight/_twitter_typeahead.scss +0 -37
  24. package/app/javascript/blacklight/autocomplete.js +0 -36
  25. package/app/javascript/blacklight/bookmark_toggle.js +0 -25
  26. package/app/javascript/blacklight/button_focus.js +0 -10
  27. package/app/javascript/blacklight/checkbox_submit.js +0 -134
  28. package/app/javascript/blacklight/core.js +0 -54
  29. package/app/javascript/blacklight/facet_load.js +0 -22
  30. package/app/javascript/blacklight/modal.js +0 -226
  31. package/app/javascript/blacklight/search_context.js +0 -69
@@ -0,0 +1 @@
1
+ {"version":3,"file":"blacklight.js","sources":["../../../javascript/blacklight/core.js","../../../javascript/blacklight/checkbox_submit.js","../../../javascript/blacklight/bookmark_toggle.js","../../../javascript/blacklight/button_focus.js","../../../javascript/blacklight/modal.js","../../../javascript/blacklight/search_context.js","../../../javascript/blacklight/index.js"],"sourcesContent":["const Blacklight = function() {\n const buffer = new Array;\n return {\n onLoad: function(func) {\n buffer.push(func);\n },\n\n activate: function() {\n for(let i = 0; i < buffer.length; i++) {\n buffer[i].call();\n }\n },\n\n listeners: function () {\n const listeners = [];\n if (typeof Turbo !== 'undefined') {\n listeners.push('turbo:load', 'turbo:frame-load');\n } else if (typeof Turbolinks !== 'undefined' && Turbolinks.supported) {\n // Turbolinks 5\n if (Turbolinks.BrowserAdapter) {\n listeners.push('turbolinks:load');\n } else {\n // Turbolinks < 5\n listeners.push('page:load', 'DOMContentLoaded');\n }\n } else {\n listeners.push('DOMContentLoaded');\n }\n\n return listeners;\n }\n };\n}();\n\n// turbolinks triggers page:load events on page transition\n// If app isn't using turbolinks, this event will never be triggered, no prob.\nBlacklight.listeners().forEach(function(listener) {\n document.addEventListener(listener, function() {\n Blacklight.activate()\n })\n})\n\nBlacklight.onLoad(function () {\n const elem = document.querySelector('.no-js');\n\n // The \"no-js\" class may already have been removed because this function is\n // run on every turbo:load event, in that case, it won't find an element.\n if (!elem) return;\n\n elem.classList.remove('no-js')\n elem.classList.add('js')\n})\n\n\nexport default Blacklight\n","/* Converts a \"toggle\" form, with single submit button to add/remove\n something, like used for Bookmarks, into an AJAXy checkbox instead.\n Apply to a form. Does require certain assumption about the form:\n 1) The same form 'action' href must be used for both ADD and REMOVE\n actions, with the different being the hidden input name=\"_method\"\n being set to \"put\" or \"delete\" -- that's the Rails method to pretend\n to be doing a certain HTTP verb. So same URL, PUT to add, DELETE\n to remove. This plugin assumes that.\n Plus, the form this is applied to should provide a data-doc-id\n attribute (HTML5-style doc-*) that contains the id/primary key\n of the object in question -- used by plugin for a unique value for\n DOM id's.\n Uses HTML for a checkbox compatible with Bootstrap 4.\n new CheckboxSubmit(document.querySelector('form.something')).render()\n*/\nexport default class CheckboxSubmit {\n constructor(form) {\n this.form = form\n }\n\n async clicked(evt) {\n this.spanTarget.innerHTML = this.form.getAttribute('data-inprogress')\n this.labelTarget.setAttribute('disabled', 'disabled');\n this.checkboxTarget.setAttribute('disabled', 'disabled');\n const response = await fetch(this.formTarget.getAttribute('action'), {\n body: new FormData(this.formTarget),\n method: this.formTarget.getAttribute('method').toUpperCase(),\n headers: {\n 'Accept': 'application/json',\n 'X-Requested-With': 'XMLHttpRequest',\n 'X-CSRF-Token': document.querySelector('meta[name=csrf-token]')?.content\n }\n })\n this.labelTarget.removeAttribute('disabled')\n this.checkboxTarget.removeAttribute('disabled')\n if (response.ok) {\n const json = await response.json()\n this.updateStateFor(!this.checked)\n document.querySelector('[data-role=bookmark-counter]').innerHTML = json.bookmarks.count\n } else {\n alert('Error')\n }\n }\n\n get checked() {\n return (this.form.querySelectorAll('input[name=_method][value=delete]').length != 0)\n }\n\n get formTarget() {\n return this.form\n }\n\n get labelTarget() {\n return this.form.querySelector('[data-checkboxsubmit-target=\"label\"]')\n }\n\n get checkboxTarget() {\n return this.form.querySelector('[data-checkboxsubmit-target=\"checkbox\"]')\n }\n\n get spanTarget() {\n return this.form.querySelector('[data-checkboxsubmit-target=\"span\"]')\n }\n\n updateStateFor(state) {\n this.checkboxTarget.checked = state\n\n if (state) {\n this.labelTarget.classList.add('checked')\n //Set the Rails hidden field that fakes an HTTP verb\n //properly for current state action.\n this.formTarget.querySelector('input[name=_method]').value = 'delete'\n this.spanTarget.innerHTML = this.form.getAttribute('data-present')\n } else {\n this.labelTarget.classList.remove('checked')\n this.formTarget.querySelector('input[name=_method]').value = 'put'\n this.spanTarget.innerHTML = this.form.getAttribute('data-absent')\n }\n }\n}\n","import Blacklight from './core'\nimport CheckboxSubmit from './checkbox_submit'\n\nconst BookmarkToggle = (() => {\n // change form submit toggle to checkbox\n Blacklight.doBookmarkToggleBehavior = function() {\n document.addEventListener('click', (e) => {\n if (e.target.matches('[data-checkboxsubmit-target=\"checkbox\"]')) {\n const form = e.target.closest('form')\n if (form) new CheckboxSubmit(form).clicked(e);\n }\n });\n };\n Blacklight.doBookmarkToggleBehavior.selector = 'form.bookmark-toggle';\n\n Blacklight.doBookmarkToggleBehavior();\n})()\n\nexport default BookmarkToggle\n","const ButtonFocus = (() => {\n document.addEventListener('click', (e) => {\n // Button clicks should change focus. As of 10/3/19, Firefox for Mac and\n // Safari both do not set focus to a button on button click.\n // See https://zellwk.com/blog/inconsistent-button-behavior/ for background information\n if (e.target.matches('[data-toggle=\"collapse\"]') || e.target.matches('[data-bs-toggle=\"collapse\"]')) {\n e.target.focus()\n }\n })\n})()\n\nexport default ButtonFocus\n","/*\n The blacklight modal plugin can display some interactions inside a Bootstrap\n modal window, including some multi-page interactions.\n\n It supports unobtrusive Javascript, where a link or form that would have caused\n a new page load is changed to display it's results inside a modal dialog,\n by this plugin. The plugin assumes there is a Bootstrap modal div\n on the page with id #blacklight-modal to use as the modal -- the standard Blacklight\n layout provides this.\n\n To make a link or form have their results display inside a modal, add\n `data-blacklight-modal=\"trigger\"` to the link or form. (Note, form itself not submit input)\n With Rails link_to helper, you'd do that like:\n\n link_to something, link, data: { blacklight_modal: \"trigger\" }\n\n The results of the link href or form submit will be displayed inside\n a modal -- they should include the proper HTML markup for a bootstrap modal's\n contents. Also, you ordinarily won't want the Rails template with wrapping\n navigational elements to be used. The Rails controller could suppress\n the layout when a JS AJAX request is detected, OR the response\n can include a `<div data-blacklight-modal=\"container\">` -- only the contents\n of the container will be placed inside the modal, the rest of the\n page will be ignored.\n\n Link or forms inside the modal will ordinarily cause page loads\n when they are triggered. However, if you'd like their results\n to stay within the modal, just add `data-blacklight-modal=\"preserve\"`\n to the link or form.\n\n Here's an example of what might be returned, demonstrating most of the devices available:\n\n <div data-blacklight-modal=\"container\">\n <div class=\"modal-header\">\n <button type=\"button\" class=\"close\" data-dismiss=\"modal\" aria-hidden=\"true\">×</button>\n <h3 class=\"modal-title\">Request Placed</h3>\n </div>\n\n <div class=\"modal-body\">\n <p>Some message</p>\n <%= link_to \"This result will still be within modal\", some_link, data: { blacklight_modal: \"preserve\" } %>\n </div>\n\n\n <div class=\"modal-footer\">\n <button type=\"button\" class=\"btn btn-secondary\" data-dismiss=\"modal\">Close</button>\n </div>\n </div>\n\n\n One additional feature. If the content returned from the AJAX form submission\n can be a turbo-stream that defines some HTML fragementsand where on the page to put them:\n https://turbo.hotwired.dev/handbook/streams\n*/\nimport Blacklight from './core'\nimport ModalForm from './modalForm'\n\nconst Modal = (() => {\n // We keep all our data in Blacklight.modal object.\n // Create lazily if someone else created first.\n if (Blacklight.modal === undefined) {\n Blacklight.modal = {};\n }\n\n const modal = Blacklight.modal\n\n // a Bootstrap modal div that should be already on the page hidden\n modal.modalSelector = '#blacklight-modal';\n\n // Trigger selectors identify forms or hyperlinks that should open\n // inside a modal dialog.\n modal.triggerLinkSelector = 'a[data-blacklight-modal~=trigger]';\n\n // preserve selectors identify forms or hyperlinks that, if activated already\n // inside a modal dialog, should have destinations remain inside the modal -- but\n // won't trigger a modal if not already in one.\n //\n // No need to repeat selectors from trigger selectors, those will already\n // be preserved. MUST be manually prefixed with the modal selector,\n // so they only apply to things inside a modal.\n modal.preserveLinkSelector = modal.modalSelector + ' a[data-blacklight-modal~=preserve]';\n\n modal.containerSelector = '[data-blacklight-modal~=container]';\n\n // Called on fatal failure of ajax load, function returns content\n // to show to user in modal. Right now called only for extreme\n // network errors.\n modal.onFailure = function (jqXHR, textStatus, errorThrown) {\n console.error('Server error:', this.url, jqXHR.status, errorThrown);\n\n const contents = `<div class=\"modal-header\">\n <div class=\"modal-title\">There was a problem with your request.</div>\n <button type=\"button\" class=\"blacklight-modal-close btn-close close\" data-dismiss=\"modal\" data-bs-dismiss=\"modal\" aria-label=\"Close\">\n <span aria-hidden=\"true\">&times;</span>\n </button>\n </div>\n <div class=\"modal-body\">\n <p>Expected a successful response from the server, but got an error</p>\n <pre>${this.type} ${this.url}\\n${jqXHR.status}: ${errorThrown}</pre>\n </div>`\n\n document.querySelector(`${modal.modalSelector} .modal-content`).innerHTML = contents\n\n modal.show();\n }\n\n // Add the passed in contents to the modal and display it.\n modal.receiveAjax = function (contents) {\n const domparser = new DOMParser();\n const dom = domparser.parseFromString(contents, \"text/html\")\n // If there is a containerSelector on the document, use it's children.\n let elements = dom.querySelectorAll(`${modal.containerSelector} > *`)\n if (element.length == 0) {\n // If the containerSelector wasn't found, use the whole document\n elements = dom.querySelectorAll(`*`)\n }\n document.querySelector(`${modal.modalSelector} .modal-content`).replaceChildren(...elements)\n\n modal.show();\n };\n\n\n modal.modalAjaxLinkClick = function(e) {\n e.preventDefault();\n const href = e.target.getAttribute('href')\n fetch(href)\n .then(response => {\n if (!response.ok) {\n throw new TypeError(\"Request failed\");\n }\n return response.text();\n })\n .then(data => modal.receiveAjax(data))\n .catch(error => modal.onFailure(error))\n };\n\n modal.setupModal = function() {\n // Register both trigger and preserve selectors in ONE event handler, combining\n // into one selector with a comma, so if something matches BOTH selectors, it\n // still only gets the event handler called once.\n document.addEventListener('click', (e) => {\n if (e.target.matches(`${modal.triggerLinkSelector}, ${modal.preserveLinkSelector}`))\n modal.modalAjaxLinkClick(e)\n else if (e.target.matches('[data-bl-dismiss=\"modal\"]'))\n modal.hide()\n })\n };\n\n modal.hide = function (el) {\n const dom = document.querySelector(Blacklight.modal.modalSelector)\n\n if (!dom.open) return\n dom.close()\n }\n\n modal.show = function(el) {\n const dom = document.querySelector(Blacklight.modal.modalSelector)\n\n if (dom.open) return\n dom.showModal()\n }\n\n modal.setupModal()\n})()\n\nexport default Modal\n","import Blacklight from './core'\n\nconst SearchContext = (() => {\n Blacklight.doSearchContextBehavior = function() {\n document.addEventListener('click', (e) => {\n if (e.target.matches('[data-context-href]')) {\n Blacklight.handleSearchContextMethod.call(e.target, e)\n }\n })\n };\n\n Blacklight.csrfToken = () => document.querySelector('meta[name=csrf-token]')?.content\n Blacklight.csrfParam = () => document.querySelector('meta[name=csrf-param]')?.content\n\n // this is the Rails.handleMethod with a couple adjustments, described inline:\n // first, we're attaching this directly to the event handler, so we can check for meta-keys\n Blacklight.handleSearchContextMethod = function(event) {\n const link = this\n\n // instead of using the normal href, we need to use the context href instead\n let href = link.getAttribute('data-context-href')\n let target = link.getAttribute('target')\n let csrfToken = Blacklight.csrfToken()\n let csrfParam = Blacklight.csrfParam()\n let form = document.createElement('form')\n form.method = 'post'\n form.action = href\n\n\n let formContent = `<input name=\"_method\" value=\"post\" type=\"hidden\" />\n <input name=\"redirect\" value=\"${link.getAttribute('href')}\" type=\"hidden\" />`\n\n // check for meta keys.. if set, we should open in a new tab\n if(event.metaKey || event.ctrlKey) {\n target = '_blank';\n }\n\n if (csrfParam !== undefined && csrfToken !== undefined) {\n formContent += `<input name=\"${csrfParam}\" value=\"${csrfToken}\" type=\"hidden\" />`\n }\n\n // Must trigger submit by click on a button, else \"submit\" event handler won't work!\n // https://developer.mozilla.org/en-US/docs/Web/API/HTMLFormElement/submit\n formContent += '<input type=\"submit\" />'\n\n if (target) { form.setAttribute('target', target); }\n\n form.style.display = 'none'\n form.innerHTML = formContent\n document.body.appendChild(form)\n form.querySelector('[type=\"submit\"]').click()\n\n event.preventDefault()\n };\n\n Blacklight.doSearchContextBehavior();\n})()\n\nexport default SearchContext\n","import BookmarkToggle from './bookmark_toggle'\nimport ButtonFocus from './button_focus'\nimport Modal from './modal'\nimport SearchContext from './search_context'\nimport Core from './core'\n\nexport default {\n BookmarkToggle,\n ButtonFocus,\n Modal,\n SearchContext,\n onLoad: Core.onLoad\n}\n"],"names":["Core"],"mappings":";;;;;;EAAA,MAAM,UAAU,GAAG,WAAW;EAC9B,EAAE,MAAM,MAAM,GAAG,IAAI,KAAK,CAAC;EAC3B,EAAE,OAAO;EACT,IAAI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over-bg;
4
+ }
5
+ auto-complete {
6
+ position: relative;
7
+ flex-grow: 3;
8
+
9
+ ul {
10
+ list-style-type: none;
11
+ position: absolute;
12
+ background-color: $dropdown-bg;
13
+ padding-left: 0;
14
+ border: 1px solid $dropdown-border-color;
15
+ border-radius: $dropdown-border-radius;
16
+ }
17
+
18
+ [role="option"]{
19
+ padding: 0.25rem 1.5rem;
20
+ }
21
+ }
22
+
23
+ .no-js #autocomplete-popup {
24
+ display: none;
25
+ }
@@ -22,5 +22,5 @@
22
22
  @import "facets";
23
23
  @import "search_history";
24
24
  @import "modal";
25
- @import "twitter_typeahead";
26
25
  @import "icons";
26
+ @import "autocomplete";
@@ -2,3 +2,19 @@ label.toggle-bookmark {
2
2
  font-weight: inherit;
3
3
  min-width: 8.5em;
4
4
  }
5
+
6
+ .bookmark-toggle {
7
+ .no-js & {
8
+ input[type="submit"] {
9
+ display: inline
10
+ }
11
+
12
+ div.toggle-bookmark {
13
+ display: none
14
+ }
15
+ }
16
+
17
+ input[type="submit"] {
18
+ display: none;
19
+ }
20
+ }
@@ -29,3 +29,11 @@
29
29
  .page-link {
30
30
  white-space: nowrap;
31
31
  }
32
+
33
+ .modal {
34
+ // override bootstrap .modal class default display: none
35
+ // since we aren't using bootstrap JS that sets and unsets the display
36
+ display: block;
37
+ background: none;
38
+ border: none;
39
+ }
@@ -23,19 +23,12 @@
23
23
  cursor: pointer;
24
24
  }
25
25
 
26
- .no-js .sort-pagination {
27
- & {
28
- @extend .clearfix;
26
+ .no-js {
27
+ .btn-group:focus-within {
28
+ .dropdown-menu {
29
+ @extend .show;
30
+ }
29
31
  }
30
- .dropdown-menu {
31
- background: none;
32
- box-shadow: none;
33
- border: none;
34
- position: relative;
35
- display: block;
36
- float: none;
37
- }
38
-
39
32
  }
40
33
 
41
34
  .view-type {
@@ -37,6 +37,30 @@
37
37
  }
38
38
  }
39
39
 
40
+ .no-js {
41
+ @include media-breakpoint-down(lg) {
42
+ #sidebar {
43
+ order: 6 !important;
44
+ }
45
+ }
46
+
47
+ .facet-content.collapse {
48
+ display: block;
49
+ }
50
+
51
+ .facet-toggle-handle {
52
+ display: none;
53
+ }
54
+
55
+ .pivot-facet.collapse {
56
+ display: block;
57
+ }
58
+
59
+ .facets-collapse.collapse {
60
+ display: block;
61
+ }
62
+ }
63
+
40
64
  .facets-header {
41
65
  display: flex;
42
66
  justify-content: space-between;
@@ -58,32 +82,42 @@
58
82
  }
59
83
 
60
84
  .facet-limit-active {
61
- @extend .border-success;
85
+ border-color: $facet-active-border !important;
62
86
 
63
87
  .card-header {
64
- @extend .bg-success;
88
+ background-color: $facet-active-bg !important;
65
89
 
66
90
  .btn {
67
91
  @if function-exists(color-contrast) {
68
- color: color-contrast($success);
92
+ color: color-contrast($facet-active-bg);
93
+ }
94
+
95
+ @if function-exists(color-yiq) {
96
+ color: color-yiq($facet-active-bg);
69
97
  }
70
98
  }
71
99
  }
72
100
  }
73
101
 
74
102
  .facet-values {
75
- display: table;
76
- table-layout: fixed;
77
- width: 100%;
78
103
  margin-bottom: 0;
79
104
 
105
+ a {
106
+ text-decoration: none;
107
+ }
108
+
80
109
  li {
110
+ display: flex;
111
+ align-items: flex-start;
112
+ padding: 3px 0;
81
113
 
82
- display: table-row;
83
- .selected {
84
- @extend .text-success;
114
+ &[role="treeitem"] {
115
+ display: block;
85
116
  }
86
117
 
118
+ .selected {
119
+ color: $facet-active-item-color !important;
120
+ }
87
121
  }
88
122
 
89
123
  .remove {
@@ -106,44 +140,28 @@
106
140
  }
107
141
 
108
142
  .facet-label {
109
- display: table-cell;
110
143
  padding-right: 1em;
111
144
  text-indent: -15px;
112
145
  padding-left: 15px;
113
- padding-bottom: $spacer * .5;
114
146
  @include hyphens-auto;
115
147
  }
116
148
 
117
149
  .facet-count {
118
- display: table-cell;
119
- vertical-align: top;
120
- text-align: right;
121
- width: 5em;
150
+ margin-left: auto
122
151
  }
123
152
 
124
153
  .facet-checkbox {
125
- display: table-cell;
126
154
  width: 1.25rem;
127
- vertical-align: top;
128
- }
129
-
130
- .label-and-count {
131
- display: table;
132
- width: 100%;
133
- }
134
-
135
- .label-and-count label {
136
- display: table-row;
137
155
  }
138
156
  }
139
157
 
140
158
  .facet-extended-list {
141
159
  .sort-options {
142
- text-align:right;
160
+ text-align: right;
143
161
  }
144
162
 
145
163
  .prev-next-links {
146
- float:left;
164
+ float: left;
147
165
  }
148
166
  }
149
167
 
@@ -167,32 +185,66 @@
167
185
  }
168
186
  }
169
187
 
170
-
171
-
172
188
  /* style for pivot facet's nested list */
173
189
 
174
- .pivot-facet {
190
+ .facet-values {
175
191
  @extend .list-unstyled;
176
- @extend .py-1;
177
- @extend .px-4;
178
192
  }
179
193
 
180
- .facet-leaf-node {
181
- margin-left: 1rem;
182
- padding-right: 1rem;
183
- margin-top: -1.5rem;
194
+ .pivot-facet {
195
+ &.show {
196
+ @extend .d-flex;
197
+ }
184
198
  }
185
199
 
200
+ $facet-toggle-show-icon: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-plus-square" viewBox="0 0 16 16"><path d="M14 1a1 1 0 0 1 1 1v12a1 1 0 0 1-1 1H2a1 1 0 0 1-1-1V2a1 1 0 0 1 1-1h12zM2 0a2 2 0 0 0-2 2v12a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V2a2 2 0 0 0-2-2H2z" /><path d="M8 4a.5.5 0 0 1 .5.5v3h3a.5.5 0 0 1 0 1h-3v3a.5.5 0 0 1-1 0v-3h-3a.5.5 0 0 1 0-1h3v-3A.5.5 0 0 1 8 4z" /></svg>') !default;
201
+ $facet-toggle-hide-icon: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-dash-square" viewBox="0 0 16 16"><path d="M14 1a1 1 0 0 1 1 1v12a1 1 0 0 1-1 1H2a1 1 0 0 1-1-1V2a1 1 0 0 1 1-1h12zM2 0a2 2 0 0 0-2 2v12a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V2a2 2 0 0 0-2-2H2z" /><path d="M4 8a.5.5 0 0 1 .5-.5h7a.5.5 0 0 1 0 1h-7A.5.5 0 0 1 4 8z" /></svg>') !default;
202
+ $facet-toggle-width: 1em !default;
203
+ $facet-toggle-height: $facet-toggle-width !default;
204
+
186
205
  .facet-toggle-handle {
187
- margin: 0;
188
- margin-left: -5px;
189
- padding: 0;
206
+ @extend .my-0;
207
+ @extend .py-0;
208
+ @extend .px-2;
209
+
210
+ // keep the icon span centered in the button, but shift to the left for equal spacing inside row
211
+ margin-left: -1 * $btn-padding-x;
212
+
213
+ .pivot-facet & {
214
+ // shift pivot values a little more aggressively for better compact display
215
+ margin-left: -2 * $btn-padding-x;
216
+ }
190
217
 
191
218
  &.collapsed {
192
- .show { display: block; }
193
- .hide { display: none; }
219
+ .show {
220
+ display: flex;
221
+ }
222
+
223
+ .hide {
224
+ display: none;
225
+ }
226
+ }
227
+
228
+ .show {
229
+ display: none;
230
+ }
231
+
232
+ .hide {
233
+ display: flex;
234
+ }
235
+
236
+ .show .icon,
237
+ .hide .icon {
238
+ width: $facet-toggle-width;
239
+ height: $facet-toggle-height;
240
+ padding: $btn-padding-y $btn-padding-x;
194
241
  }
195
242
 
196
- .show { display: none; }
197
- .hide { display: block; }
243
+ .show .icon {
244
+ background: transparent escape-svg($facet-toggle-show-icon) center / $facet-toggle-width auto no-repeat;
245
+ }
246
+
247
+ .hide .icon {
248
+ background: transparent escape-svg($facet-toggle-hide-icon) center / $facet-toggle-width auto no-repeat;
249
+ }
198
250
  }
@@ -14,10 +14,7 @@
14
14
  background: transparent $logo-image no-repeat top left;
15
15
  background-size: $logo-width $logo-height;
16
16
  }
17
- display: inline-block;
18
17
  height: $logo-height;
19
- margin-right: 20px;
20
- margin-top: -0.4rem;
21
18
  overflow: hidden;
22
19
  text-indent: 100%;
23
20
  white-space: nowrap;
@@ -37,18 +34,6 @@
37
34
  @extend .col-lg-8;
38
35
  padding-left: 0;
39
36
  }
40
-
41
- .submit-search-text {
42
- // hide 'search' label at very small screens
43
- @media screen and (max-width: breakpoint-max(xs)) {
44
- @if mixin-exists(sr-only) {
45
- @include sr-only();
46
- }
47
- @if mixin-exists(visually-hidden) {
48
- @include visually-hidden();
49
- }
50
- }
51
- }
52
37
  }
53
38
 
54
39
  #skip-link {
@@ -1,17 +1,3 @@
1
- @each $color, $value in $theme-colors {
2
- .btn-#{$color} {
3
- .blacklight-icons svg {
4
- fill: currentColor;
5
- }
6
- }
7
-
8
- .btn-outline-#{$color} {
9
- .blacklight-icons svg {
10
- fill: currentColor;
11
- }
12
- }
13
- }
14
-
15
1
  .btn.btn-icon {
16
2
  padding: $btn-padding-y;
17
3
 
@@ -13,3 +13,23 @@
13
13
  fill: #fff;
14
14
  }
15
15
  }
16
+
17
+ // define a visually-hidden class that applies to a given breakpoint and below
18
+ // https://getbootstrap.com/docs/5.2/helpers/visually-hidden/
19
+ @if mixin-exists(visually-hidden) {
20
+ @each $infix, $breakpoint in $grid-breakpoints {
21
+ .visually-hidden-#{$infix} {
22
+ @include media-breakpoint-down($breakpoint) {
23
+ @include visually-hidden;
24
+ }
25
+ }
26
+ }
27
+ } @else if mixin-exists(sr-only) { // Bootstrap 4 version
28
+ @each $infix, $breakpoint in $grid-breakpoints {
29
+ .visually-hidden-#{$infix} {
30
+ @include media-breakpoint-down($breakpoint) {
31
+ @include sr-only;
32
+ }
33
+ }
34
+ }
35
+ }
@@ -1,6 +1,8 @@
1
- .modal-content {
2
- @extend .clearfix;
1
+ .modal-dialog {
2
+ border-radius: 5px;
3
+ }
3
4
 
5
+ .modal-content {
4
6
  .facet-pagination.top {
5
7
  display: none;
6
8
  }
@@ -12,6 +14,10 @@
12
14
  .blacklight-modal-close {
13
15
  display: block;
14
16
  }
17
+
18
+ .prev_next_links.btn-group .btn {
19
+ border: 0;
20
+ }
15
21
  }
16
22
 
17
23
  // app/views/catalog/facet.html.erb may be rendered as a modal or a whole page.
@@ -1,7 +1,34 @@
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 > .form-control {
4
- &.search-q {
5
- flex-grow: 3;
3
+ .input-group>.search-q {
4
+ flex-grow: 4;
5
+ }
6
+
7
+ .input-group > .search-autocomplete-wrapper {
8
+ @extend .form-control;
9
+ display: inline-block;
10
+ flex-grow: 4;
11
+ padding: 0;
12
+ position: relative;
13
+
14
+ .search-q {
15
+ border: 0;
16
+ height: 100%;
17
+ width: 100%;
18
+ }
19
+
20
+ ul {
21
+ @extend .dropdown-menu;
22
+ display: block;
23
+
24
+ li {
25
+ @extend .dropdown-item;
26
+ }
6
27
  }
7
28
  }
29
+
30
+ .search-btn {
31
+ border-top-left-radius: 0;
32
+ border-bottom-left-radius: 0;
33
+ display: flex;
34
+ }
@@ -1,7 +1,16 @@
1
1
  /* Search History */
2
2
  .search-history {
3
+
4
+ td {
5
+ padding: $spacer
6
+ }
7
+
8
+ .constraints-container {
9
+ @extend .mb-0;
10
+ }
11
+
3
12
  .constraint {
4
- @extend .px-3;
13
+ @extend .px-4;
5
14
  display: block;
6
15
  text-indent: -1 * map-get($spacers, 3);
7
16
  }
@@ -1,7 +1,7 @@
1
1
  // the search results on the index view of the catalog
2
2
  .documents-list {
3
3
  .document {
4
- @extend .clearfix;
4
+ display: flex;
5
5
  border-bottom: 1px dotted $table-border-color;
6
6
  margin-top: $spacer;
7
7
  padding-top: $spacer;
@@ -10,6 +10,10 @@
10
10
  @extend h5;
11
11
  }
12
12
 
13
+ .document-main-section {
14
+ flex-grow: 1;
15
+ }
16
+
13
17
  // bookmarks checkbox on index, give it some
14
18
  // lower margin when it collapses
15
19
  .index-document-functions {
@@ -21,7 +25,7 @@
21
25
  }
22
26
 
23
27
  .document-thumbnail {
24
- float: right;
28
+ flex-grow: 0;
25
29
  margin-bottom: ($spacer * 3);
26
30
  padding-left: ($spacer * 3);
27
31
  }
@@ -6,9 +6,12 @@ $logo-height: 50px !default;
6
6
 
7
7
  /* label (field names) */
8
8
  $field_name_color: $text-muted !default;
9
- $zindex-typeahead: $zindex-dropdown;
10
9
 
11
10
  // the default bootstrap font-family list includes "Segoe UI Emoji", which, on windows
12
11
  // renders our remove icon as an emoji-sized x instead of what we see on all other platforms...
13
12
  // so, for now (until we replace it with an SVG icon or something), we get to override bootstrap:
14
13
  $remove-icon-font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", "Liberation Sans", sans-serif !default;
14
+
15
+ $facet-active-border: $success !default;
16
+ $facet-active-bg: $success !default;
17
+ $facet-active-item-color: $success !default;
package/package.json CHANGED
@@ -1,18 +1,17 @@
1
1
  {
2
2
  "name": "blacklight-frontend",
3
- "version": "7.32.0",
3
+ "version": "8.0.0-beta.2",
4
4
  "description": "[![Build Status](https://travis-ci.com/projectblacklight/blacklight.png?branch=main)](https://travis-ci.com/projectblacklight/blacklight) [![Gem Version](https://badge.fury.io/rb/blacklight.png)](http://badge.fury.io/rb/blacklight) [![Coverage Status](https://coveralls.io/repos/github/projectblacklight/blacklight/badge.svg?branch=main)](https://coveralls.io/github/projectblacklight/blacklight?branch=main)",
5
5
  "main": "app/assets/javascripts/blacklight",
6
6
  "scripts": {
7
- "js-compile-bundle": "shx cat app/javascript/blacklight/core.js app/javascript/blacklight/autocomplete.js app/javascript/blacklight/bookmark_toggle.js app/javascript/blacklight/button_focus.js app/javascript/blacklight/checkbox_submit.js app/javascript/blacklight/facet_load.js app/javascript/blacklight/modal.js app/javascript/blacklight/search_context.js | shx sed \"s/^(import|export).*//\" | babel --filename app/javascript/blacklight/blacklight.js > app/assets/javascripts/blacklight/blacklight.js"
7
+ "js-compile-bundle": "rollup --config rollup.config.js --sourcemap && ESM=true rollup --config rollup.config.js --sourcemap"
8
8
  },
9
9
  "repository": {
10
10
  "type": "git",
11
11
  "url": "git+https://github.com/projectblacklight/blacklight.git"
12
12
  },
13
13
  "files": [
14
- "app/assets",
15
- "app/javascript"
14
+ "app/assets"
16
15
  ],
17
16
  "author": "",
18
17
  "license": "Apache-2.0",
@@ -21,15 +20,13 @@
21
20
  },
22
21
  "homepage": "https://github.com/projectblacklight/blacklight#readme",
23
22
  "devDependencies": {
24
- "@babel/cli": "^7.2.3",
25
- "@babel/core": "^7.2.3",
26
- "@babel/preset-env": "^7.16.0",
27
- "shx": "^0.3.2"
23
+ "rollup": "^2.60.0"
28
24
  },
29
- "browserslist": "> 0.25%, not dead",
25
+ "browserslist": [
26
+ "defaults",
27
+ "not IE 11"
28
+ ],
30
29
  "dependencies": {
31
- "bootstrap": ">=4.3.1 <6.0.0",
32
- "jquery": "^3.5.1",
33
- "typeahead.js": "^0.11.1"
30
+ "bootstrap": ">=4.3.1 <6.0.0"
34
31
  }
35
32
  }
@@ -1 +0,0 @@
1
- <svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><path d="M3 13h2v-2H3v2zm0 4h2v-2H3v2zm0-8h2V7H3v2zm4 4h14v-2H7v2zm0 4h14v-2H7v2zM7 7v2h14V7H7z"/><path d="M0 0h24v24H0z" fill="none"/></svg>
@@ -1 +0,0 @@
1
- <svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><path fill="none" d="M0 0h24v24H0V0z"/><path d="M15.5 14h-.79l-.28-.27C15.41 12.59 16 11.11 16 9.5 16 5.91 13.09 3 9.5 3S3 5.91 3 9.5 5.91 16 9.5 16c1.61 0 3.09-.59 4.23-1.57l.27.28v.79l5 4.99L20.49 19l-4.99-5zm-6 0C7.01 14 5 11.99 5 9.5S7.01 5 9.5 5 14 7.01 14 9.5 11.99 14 9.5 14z"/></svg>
@@ -1,37 +0,0 @@
1
- .twitter-typeahead {
2
- display: inline-flex !important;
3
- flex-grow: 2;
4
- z-index: $zindex-typeahead;
5
-
6
- input.tt-input.form-control {
7
- width: 100%;
8
- }
9
-
10
- input.tt-hint.form-control {
11
- width: 100%;
12
- filter: opacity(0.33);
13
- }
14
-
15
- .tt-menu {
16
- @extend .dropdown-menu;
17
- font-family: $font-family-base;
18
- width: 100%;
19
- }
20
-
21
- .tt-cursor {
22
- background-color: $dropdown-link-hover-bg;
23
- color: $dropdown-link-hover-color;
24
- text-decoration: none;
25
- }
26
-
27
- .tt-suggestion {
28
- font-size: 14px;
29
- padding: 5px 5px 5px 10px;
30
- }
31
-
32
- .tt-suggestion:hover {
33
- background-color: $dropdown-link-hover-bg;
34
- color: $dropdown-link-hover-color;
35
- cursor: pointer;
36
- }
37
- }