blacklight-frontend 8.11.0 → 9.0.0-beta2
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/README.md +30 -8
- package/app/assets/builds/blacklight.css +452 -0
- package/app/assets/javascripts/blacklight/blacklight.esm.js +6 -76
- package/app/assets/javascripts/blacklight/blacklight.esm.js.map +1 -1
- package/app/assets/javascripts/blacklight/blacklight.js +6 -76
- package/app/assets/javascripts/blacklight/blacklight.js.map +1 -1
- package/app/assets/stylesheets/blacklight/_balanced_list.scss +1 -4
- package/app/assets/stylesheets/blacklight/_blacklight_base.scss +1 -3
- package/app/assets/stylesheets/blacklight/_bookmark.scss +44 -41
- package/app/assets/stylesheets/blacklight/_bootstrap_overrides.scss +0 -25
- package/app/assets/stylesheets/blacklight/_constraints.scss +15 -24
- package/app/assets/stylesheets/blacklight/_controls.scss +2 -18
- package/app/assets/stylesheets/blacklight/_facets.scss +17 -84
- package/app/assets/stylesheets/blacklight/_group.scss +2 -5
- package/app/assets/stylesheets/blacklight/_header.scss +8 -11
- package/app/assets/stylesheets/blacklight/_icons.scss +0 -8
- package/app/assets/stylesheets/blacklight/_modal.scss +1 -1
- package/app/assets/stylesheets/blacklight/_pagination.scss +0 -4
- package/app/assets/stylesheets/blacklight/_search_form.scss +0 -1
- package/app/assets/stylesheets/blacklight/_search_history.scss +0 -8
- package/app/assets/stylesheets/blacklight/_search_results.scss +1 -15
- package/app/assets/stylesheets/blacklight/blacklight_defaults.scss +9 -14
- package/app/assets/stylesheets/blacklight/build.scss +4 -0
- package/app/javascript/{blacklight → blacklight-frontend}/bookmark_toggle.js +1 -1
- package/app/javascript/{blacklight → blacklight-frontend}/checkbox_submit.js +3 -0
- package/app/javascript/{blacklight → blacklight-frontend}/core.js +2 -10
- package/app/javascript/{blacklight → blacklight-frontend}/facet_suggest.js +1 -3
- package/app/javascript/blacklight-frontend/index.js +16 -0
- package/app/javascript/{blacklight → blacklight-frontend}/modal.js +1 -5
- package/package.json +15 -5
- package/app/assets/stylesheets/blacklight/_autocomplete.scss +0 -25
- package/app/assets/stylesheets/blacklight/_mixins.scss +0 -20
- package/app/javascript/blacklight/index.js +0 -18
- package/app/javascript/blacklight/modalForm.js +0 -60
- /package/app/javascript/{blacklight → blacklight-frontend}/button_focus.js +0 -0
- /package/app/javascript/{blacklight → blacklight-frontend}/debounce.js +0 -0
- /package/app/javascript/{blacklight → blacklight-frontend}/search_context.js +0 -0
|
@@ -1,41 +1,32 @@
|
|
|
1
1
|
.constraints-container {
|
|
2
|
-
@extend .mb-2;
|
|
3
2
|
display: flex;
|
|
4
3
|
flex-wrap: wrap;
|
|
5
4
|
gap: 0.5rem 0.25rem;
|
|
6
5
|
}
|
|
7
6
|
|
|
8
7
|
.applied-filter {
|
|
9
|
-
|
|
8
|
+
--separator-icon: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='currentColor'%3e%3cpath fill-rule='evenodd' d='M4.646 1.646a.5.5 0 0 1 .708 0l6 6a.5.5 0 0 1 0 .708l-6 6a.5.5 0 0 1-.708-.708L10.293 8 4.646 2.354a.5.5 0 0 1 0-.708'/%3e%3c/svg%3e");
|
|
10
9
|
|
|
11
10
|
.constraint-value {
|
|
12
11
|
cursor: default;
|
|
13
12
|
text-overflow: ellipsis;
|
|
14
13
|
overflow: hidden;
|
|
15
14
|
white-space: nowrap;
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
15
|
+
max-width: clamp(288px, calc(30vw), 500px);
|
|
16
|
+
|
|
17
|
+
.filter-name:after {
|
|
18
|
+
background-color: var(--bs-btn-color);
|
|
19
|
+
content: "";
|
|
20
|
+
mask: var(--separator-icon);
|
|
21
|
+
mask-repeat: no-repeat;
|
|
22
|
+
display: inline-block;
|
|
23
|
+
height: 1.1rem;
|
|
24
|
+
width: 1.25rem;
|
|
25
|
+
vertical-align: text-bottom;
|
|
26
|
+
margin-right: -0.2rem;
|
|
27
|
+
margin-left: 0.25rem;
|
|
28
|
+
transition: background-color 0.15s ease-in-out;
|
|
27
29
|
}
|
|
28
|
-
|
|
29
|
-
@media (min-width: breakpoint-min(lg)) {
|
|
30
|
-
max-width: breakpoint-min(lg) * 0.5;
|
|
31
|
-
}
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
.filter-name:after {
|
|
35
|
-
color: $gray-500;
|
|
36
|
-
content: "❯";
|
|
37
|
-
font-size: 90%;
|
|
38
|
-
padding-left: $caret-width;
|
|
39
30
|
}
|
|
40
31
|
|
|
41
32
|
.remove {
|
|
@@ -1,21 +1,10 @@
|
|
|
1
1
|
.search-widgets {
|
|
2
2
|
display: flex;
|
|
3
|
-
|
|
4
|
-
> * {
|
|
5
|
-
@extend .mx-1;
|
|
6
|
-
}
|
|
7
3
|
}
|
|
8
4
|
|
|
9
5
|
.sort-pagination,
|
|
10
6
|
.pagination-search-widgets {
|
|
11
|
-
border-bottom:
|
|
12
|
-
margin-bottom: 1em;
|
|
13
|
-
padding-bottom: 1em;
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
.pagination-search-widgets {
|
|
17
|
-
padding-top: 1px;
|
|
18
|
-
padding-bottom: $spacer;
|
|
7
|
+
border-bottom: var(--bs-border-width) solid var(--bs-border-color);
|
|
19
8
|
}
|
|
20
9
|
|
|
21
10
|
.sort-pagination .dropdown-toggle {
|
|
@@ -25,18 +14,13 @@
|
|
|
25
14
|
.no-js {
|
|
26
15
|
.btn-group:focus-within {
|
|
27
16
|
.dropdown-menu {
|
|
28
|
-
|
|
17
|
+
display: block; /* show menu when tabbing to it, without Javascript */
|
|
29
18
|
}
|
|
30
19
|
}
|
|
31
20
|
}
|
|
32
21
|
|
|
33
22
|
.view-type {
|
|
34
23
|
display: inline-block;
|
|
35
|
-
|
|
36
|
-
.caption {
|
|
37
|
-
@extend .sr-only !optional;
|
|
38
|
-
@extend .visually-hidden !optional;
|
|
39
|
-
}
|
|
40
24
|
}
|
|
41
25
|
|
|
42
26
|
.modal_form {
|
|
@@ -1,18 +1,12 @@
|
|
|
1
1
|
.sidenav {
|
|
2
|
-
--bl-facet-active-bg:
|
|
3
|
-
--bl-facet-active-item-color:
|
|
4
|
-
--bl-facet-margin-bottom: #{$spacer};
|
|
2
|
+
--bl-facet-active-bg: var(--bs-success);
|
|
3
|
+
--bl-facet-active-item-color: var(--bs-success);
|
|
5
4
|
--bl-facet-remove-color: var(--bs-secondary-color);
|
|
5
|
+
--bl-facet-remove-hover-color: var(--bs-danger);
|
|
6
6
|
--bl-facet-label-indent: -15px;
|
|
7
7
|
--bl-facet-label-padding-left: 15px;
|
|
8
|
-
|
|
9
|
-
--bl-facet-
|
|
10
|
-
|
|
11
|
-
--bl-facets-smallish-padding: 0.25rem;
|
|
12
|
-
--bl-facets-smallish-border: var(--bs-border-width) solid
|
|
13
|
-
var(--bs-border-color);
|
|
14
|
-
--bl-facets-smallish-margin-bottom: #{$spacer};
|
|
15
|
-
--bl-facets-smallish-border-radius: #{$border-radius};
|
|
8
|
+
--bl-facet-header-padding-y: 0.5rem;
|
|
9
|
+
--bl-facet-value-padding-y: 0.2rem;
|
|
16
10
|
|
|
17
11
|
.facet-toggle-button {
|
|
18
12
|
[data-hide-label] {
|
|
@@ -33,34 +27,6 @@
|
|
|
33
27
|
}
|
|
34
28
|
}
|
|
35
29
|
|
|
36
|
-
.facets-toggleable {
|
|
37
|
-
@each $breakpoint in map-keys($grid-breakpoints) {
|
|
38
|
-
$next: breakpoint-next($breakpoint, $grid-breakpoints);
|
|
39
|
-
$infix: breakpoint-infix($breakpoint, $grid-breakpoints);
|
|
40
|
-
|
|
41
|
-
&#{$infix} {
|
|
42
|
-
@include media-breakpoint-down($next) {
|
|
43
|
-
border: var(--bl-facets-smallish-border);
|
|
44
|
-
padding: var(--bl-facets-smallish-padding);
|
|
45
|
-
margin-bottom: var(--bl-facets-smallish-margin-bottom);
|
|
46
|
-
border-radius: var(--bl-facets-smallish-border-radius);
|
|
47
|
-
}
|
|
48
|
-
@include media-breakpoint-up($next) {
|
|
49
|
-
// scss-lint:disable ImportantRule
|
|
50
|
-
.facets-collapse {
|
|
51
|
-
display: block !important;
|
|
52
|
-
width: 100%;
|
|
53
|
-
}
|
|
54
|
-
// scss-lint:enable ImportantRule
|
|
55
|
-
|
|
56
|
-
.navbar-toggler {
|
|
57
|
-
display: none;
|
|
58
|
-
}
|
|
59
|
-
}
|
|
60
|
-
}
|
|
61
|
-
}
|
|
62
|
-
}
|
|
63
|
-
|
|
64
30
|
.no-js {
|
|
65
31
|
@include media-breakpoint-down(lg) {
|
|
66
32
|
#sidebar {
|
|
@@ -88,49 +54,25 @@
|
|
|
88
54
|
.facets-header {
|
|
89
55
|
display: flex;
|
|
90
56
|
justify-content: space-between;
|
|
91
|
-
padding-
|
|
92
|
-
padding-top: 0.5rem;
|
|
57
|
+
padding-block: var(--bl-facet-header-padding-y);
|
|
93
58
|
}
|
|
94
59
|
|
|
95
60
|
.facets-heading {
|
|
96
|
-
@extend .h4;
|
|
97
61
|
line-height: inherit;
|
|
98
62
|
}
|
|
99
63
|
|
|
100
64
|
.facet-limit {
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
padding: var(--bl-facet-limit-body-padding);
|
|
105
|
-
}
|
|
106
|
-
|
|
107
|
-
/* Provide a focus ring on the expand/collapse button */
|
|
108
|
-
.btn {
|
|
109
|
-
--bs-btn-focus-shadow-rgb: 50, 50, 50;
|
|
110
|
-
&:focus-visible {
|
|
111
|
-
border-color: var(--bs-btn-hover-border-color);
|
|
112
|
-
outline: 0;
|
|
113
|
-
box-shadow: var(--bs-btn-focus-box-shadow);
|
|
114
|
-
}
|
|
115
|
-
}
|
|
65
|
+
--bs-accordion-btn-bg: var(--bs-gray-100);
|
|
66
|
+
--bs-btn-hover-bg: var(--bs-gray-200);
|
|
67
|
+
--bs-accordion-active-bg: var(--bs-accordion-btn-bg);
|
|
116
68
|
}
|
|
117
69
|
|
|
118
70
|
.facet-limit-active {
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
.btn {
|
|
125
|
-
@if function-exists(color-contrast) {
|
|
126
|
-
color: color-contrast($facet-active-bg);
|
|
127
|
-
}
|
|
128
|
-
|
|
129
|
-
@if function-exists(color-yiq) {
|
|
130
|
-
color: color-yiq($facet-active-bg);
|
|
131
|
-
}
|
|
132
|
-
}
|
|
133
|
-
}
|
|
71
|
+
--bs-accordion-btn-bg: var(--bl-facet-active-bg);
|
|
72
|
+
--bs-btn-hover-bg: var(--bs-accordion-btn-bg);
|
|
73
|
+
--bs-accordion-btn-color: var(--bs-light);
|
|
74
|
+
--bs-btn-hover-color: var(--bs-accordion-btn-color);
|
|
75
|
+
--bs-accordion-active-color: var(--bs-accordion-btn-color);
|
|
134
76
|
}
|
|
135
77
|
|
|
136
78
|
.facet-values {
|
|
@@ -143,9 +85,9 @@
|
|
|
143
85
|
li {
|
|
144
86
|
display: flex;
|
|
145
87
|
align-items: flex-start;
|
|
146
|
-
padding:
|
|
88
|
+
padding-block: var(--bl-facet-value-padding-y);
|
|
147
89
|
|
|
148
|
-
|
|
90
|
+
&.treeitem {
|
|
149
91
|
display: block;
|
|
150
92
|
}
|
|
151
93
|
|
|
@@ -157,11 +99,10 @@
|
|
|
157
99
|
.remove {
|
|
158
100
|
color: var(--bl-facet-remove-color);
|
|
159
101
|
font-weight: bold;
|
|
160
|
-
padding-left: $spacer * 0.5;
|
|
161
102
|
text-decoration: none;
|
|
162
103
|
|
|
163
104
|
&:hover {
|
|
164
|
-
color:
|
|
105
|
+
color: var(--bl-facet-remove-hover-color);
|
|
165
106
|
text-decoration: none;
|
|
166
107
|
}
|
|
167
108
|
}
|
|
@@ -194,8 +135,6 @@
|
|
|
194
135
|
}
|
|
195
136
|
|
|
196
137
|
.facet-field-heading {
|
|
197
|
-
@extend .h6;
|
|
198
|
-
|
|
199
138
|
a {
|
|
200
139
|
color: inherit;
|
|
201
140
|
}
|
|
@@ -266,9 +205,3 @@ $facet-toggle-height: $facet-toggle-width !default;
|
|
|
266
205
|
$facet-toggle-width auto no-repeat;
|
|
267
206
|
}
|
|
268
207
|
}
|
|
269
|
-
|
|
270
|
-
/* Facet browse pages & modals
|
|
271
|
-
-------------------------------------------------- */
|
|
272
|
-
.facet-filters:not(:has(*)) {
|
|
273
|
-
display: none !important;
|
|
274
|
-
}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
.group-key {
|
|
2
|
-
border-
|
|
2
|
+
--bl-border-color: var(--bs-gray-600);
|
|
3
|
+
border-bottom: 1px solid var(--bl-border-color);
|
|
3
4
|
clear: right;
|
|
4
5
|
}
|
|
5
6
|
|
|
@@ -8,7 +9,3 @@
|
|
|
8
9
|
border-bottom: 0;
|
|
9
10
|
}
|
|
10
11
|
}
|
|
11
|
-
|
|
12
|
-
.more-in-group {
|
|
13
|
-
float: right;
|
|
14
|
-
}
|
|
@@ -2,17 +2,19 @@
|
|
|
2
2
|
Header bar at top (Bootstrap nav-bar)
|
|
3
3
|
*/
|
|
4
4
|
|
|
5
|
+
.navbar.bg-dark {
|
|
6
|
+
--bs-emphasis-color-rgb: 255, 255, 255;
|
|
7
|
+
}
|
|
8
|
+
|
|
5
9
|
.navbar-logo {
|
|
6
10
|
/* The main logo image for the Blacklight instance */
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
}
|
|
11
|
-
height: $logo-height;
|
|
11
|
+
background: transparent var(--bl-logo-image) no-repeat top left;
|
|
12
|
+
background-size: var(--bl-logo-width) var(--bl-logo-height);
|
|
13
|
+
height: var(--bl-logo-height);
|
|
12
14
|
overflow: hidden;
|
|
13
15
|
text-indent: 100%;
|
|
14
16
|
white-space: nowrap;
|
|
15
|
-
width:
|
|
17
|
+
width: var(--bl-logo-width);
|
|
16
18
|
}
|
|
17
19
|
|
|
18
20
|
.navbar-search {
|
|
@@ -26,9 +28,4 @@
|
|
|
26
28
|
// This prevents the widget from being squished so the text overflows
|
|
27
29
|
min-width: 7em;
|
|
28
30
|
}
|
|
29
|
-
|
|
30
|
-
.search-query-form {
|
|
31
|
-
@extend .col-md-12;
|
|
32
|
-
@extend .col-lg-8;
|
|
33
|
-
}
|
|
34
31
|
}
|
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
// app/views/catalog/facet.html.erb may be rendered as a modal or a whole page.
|
|
16
16
|
// When it's a whole page, don't show the close button.
|
|
17
17
|
.blacklight-modal-close {
|
|
18
|
-
|
|
18
|
+
display: none;
|
|
19
19
|
}
|
|
20
20
|
|
|
21
21
|
// When modal content is rendered outside of a modal, Bootstrap css variables like
|
|
@@ -5,28 +5,14 @@
|
|
|
5
5
|
|
|
6
6
|
.document {
|
|
7
7
|
display: flex;
|
|
8
|
-
border-bottom: 1px dotted
|
|
8
|
+
border-bottom: 1px dotted var(--bs-border-color);
|
|
9
9
|
margin-top: var(--bl-results-document-margin-top);
|
|
10
10
|
padding-top: var(--bl-results-document-padding-top);
|
|
11
11
|
|
|
12
|
-
.document-title-heading {
|
|
13
|
-
@extend h5;
|
|
14
|
-
}
|
|
15
|
-
|
|
16
12
|
.document-main-section {
|
|
17
13
|
flex-grow: 1;
|
|
18
14
|
}
|
|
19
15
|
|
|
20
|
-
// bookmarks checkbox on index, give it some
|
|
21
|
-
// lower margin when it collapses
|
|
22
|
-
.index-document-functions {
|
|
23
|
-
margin-bottom: ($spacer * 1.5);
|
|
24
|
-
|
|
25
|
-
@media (min-width: breakpoint-min(sm)) {
|
|
26
|
-
margin-bottom: 0;
|
|
27
|
-
}
|
|
28
|
-
}
|
|
29
|
-
|
|
30
16
|
.document-thumbnail {
|
|
31
17
|
flex-grow: 0;
|
|
32
18
|
margin-bottom: ($spacer * 3);
|
|
@@ -1,18 +1,13 @@
|
|
|
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
|
-
|
|
3
|
-
$logo-image: image_url("blacklight/logo.png") !default;
|
|
4
|
-
$logo-width: 150px !default;
|
|
5
|
-
$logo-height: 50px !default;
|
|
6
|
-
|
|
7
|
-
$facet-active-border: $success !default;
|
|
8
|
-
$facet-active-bg: $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
1
|
:root {
|
|
15
|
-
--
|
|
2
|
+
--bl-logo-image: url("blacklight/logo.png");
|
|
3
|
+
--bl-logo-width: 150px;
|
|
4
|
+
--bl-logo-height: 50px;
|
|
5
|
+
--bs-secondary-color: rgba(
|
|
6
|
+
33,
|
|
7
|
+
37,
|
|
8
|
+
41,
|
|
9
|
+
0.75
|
|
10
|
+
); /* for compatability with BS < 5.3 */
|
|
16
11
|
|
|
17
12
|
--bl-main-padding-y: 0.5rem;
|
|
18
13
|
|
|
@@ -36,6 +36,9 @@ export default class CheckboxSubmit {
|
|
|
36
36
|
}).then((json) => {
|
|
37
37
|
this.labelTarget.removeAttribute('disabled')
|
|
38
38
|
this.checkboxTarget.removeAttribute('disabled')
|
|
39
|
+
// For accessibility return keyboard focus
|
|
40
|
+
// back to the checkbox after form submission
|
|
41
|
+
this.checkboxTarget.focus()
|
|
39
42
|
this.updateStateFor(!this.checked)
|
|
40
43
|
this.bookmarksCounter().forEach(counter => {
|
|
41
44
|
counter.innerHTML = json.bookmarks.count;
|
|
@@ -15,14 +15,6 @@ const Core = function() {
|
|
|
15
15
|
const listeners = [];
|
|
16
16
|
if (typeof Turbo !== 'undefined') {
|
|
17
17
|
listeners.push('turbo:load', 'turbo:frame-load');
|
|
18
|
-
} else if (typeof Turbolinks !== 'undefined' && Turbolinks.supported) {
|
|
19
|
-
// Turbolinks 5
|
|
20
|
-
if (Turbolinks.BrowserAdapter) {
|
|
21
|
-
listeners.push('turbolinks:load');
|
|
22
|
-
} else {
|
|
23
|
-
// Turbolinks < 5
|
|
24
|
-
listeners.push('page:load', 'DOMContentLoaded');
|
|
25
|
-
}
|
|
26
18
|
} else {
|
|
27
19
|
listeners.push('DOMContentLoaded');
|
|
28
20
|
}
|
|
@@ -32,8 +24,8 @@ const Core = function() {
|
|
|
32
24
|
};
|
|
33
25
|
}();
|
|
34
26
|
|
|
35
|
-
//
|
|
36
|
-
// If app isn't using
|
|
27
|
+
// turbo triggers turbo:load events on page transition
|
|
28
|
+
// If app isn't using turbo, this event will never be triggered, no prob.
|
|
37
29
|
Core.listeners().forEach(function(listener) {
|
|
38
30
|
document.addEventListener(listener, function() {
|
|
39
31
|
Core.activate()
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import debounce from "blacklight/debounce";
|
|
1
|
+
import debounce from "blacklight-frontend/debounce";
|
|
2
2
|
|
|
3
3
|
const FacetSuggest = async (e) => {
|
|
4
4
|
if (e.target.matches('.facet-suggest')) {
|
|
@@ -25,8 +25,6 @@ const FacetSuggest = async (e) => {
|
|
|
25
25
|
const blob = await response.blob()
|
|
26
26
|
const text = await blob.text()
|
|
27
27
|
|
|
28
|
-
const facetArea = document.querySelector('.facet-extended-list');
|
|
29
|
-
|
|
30
28
|
if (text && facetArea) {
|
|
31
29
|
facetArea.innerHTML = text
|
|
32
30
|
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import BookmarkToggle from 'blacklight-frontend/bookmark_toggle'
|
|
2
|
+
import ButtonFocus from 'blacklight-frontend/button_focus'
|
|
3
|
+
import FacetSuggest from 'blacklight-frontend/facet_suggest'
|
|
4
|
+
import Modal from 'blacklight-frontend/modal'
|
|
5
|
+
import SearchContext from 'blacklight-frontend/search_context'
|
|
6
|
+
import Core from 'blacklight-frontend/core'
|
|
7
|
+
|
|
8
|
+
export default {
|
|
9
|
+
BookmarkToggle,
|
|
10
|
+
ButtonFocus,
|
|
11
|
+
FacetSuggest,
|
|
12
|
+
Modal,
|
|
13
|
+
SearchContext,
|
|
14
|
+
Core,
|
|
15
|
+
onLoad: Core.onLoad
|
|
16
|
+
}
|
|
@@ -56,9 +56,6 @@
|
|
|
56
56
|
const Modal = (() => {
|
|
57
57
|
const modal = {}
|
|
58
58
|
|
|
59
|
-
// bootstrap class that will stop body scrolling when modal is open
|
|
60
|
-
const bootstrapBodyClassOpen = "modal-open";
|
|
61
|
-
|
|
62
59
|
// a Bootstrap modal div that should be already on the page hidden
|
|
63
60
|
modal.modalSelector = '#blacklight-modal';
|
|
64
61
|
|
|
@@ -113,7 +110,7 @@ const Modal = (() => {
|
|
|
113
110
|
}
|
|
114
111
|
elements.forEach((el) => frag.appendChild(el))
|
|
115
112
|
modal.activateScripts(frag)
|
|
116
|
-
|
|
113
|
+
|
|
117
114
|
modal.target().querySelector('.modal-content').replaceChildren(frag)
|
|
118
115
|
|
|
119
116
|
// send custom event with the modal dialog div as the target
|
|
@@ -122,7 +119,6 @@ const Modal = (() => {
|
|
|
122
119
|
|
|
123
120
|
// if they did preventDefault, don't show the dialog
|
|
124
121
|
if (e.defaultPrevented) return;
|
|
125
|
-
|
|
126
122
|
modal.show();
|
|
127
123
|
};
|
|
128
124
|
|
package/package.json
CHANGED
|
@@ -1,11 +1,19 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "blacklight-frontend",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "9.0.0-beta2",
|
|
4
4
|
"description": "The frontend code and styles for Blacklight",
|
|
5
|
-
"
|
|
5
|
+
"exports": {
|
|
6
|
+
"./blacklight.esm.js": "./app/assets/javascripts/blacklight/blacklight.esm.js",
|
|
7
|
+
"./stylesheets/*": "./app/assets/stylesheets/blacklight/*",
|
|
8
|
+
".": {
|
|
9
|
+
"import": "./app/javascript/blacklight-frontend/index.js",
|
|
10
|
+
"require": "./app/assets/javascripts/blacklight.js"
|
|
11
|
+
},
|
|
12
|
+
"./*": "./app/javascript/blacklight-frontend/*.js"
|
|
13
|
+
},
|
|
6
14
|
"type": "module",
|
|
7
|
-
"module": "app/assets/javascripts/blacklight/blacklight.esm.js",
|
|
8
15
|
"scripts": {
|
|
16
|
+
"build": "sass ./app/assets/stylesheets/blacklight/build.scss:./app/assets/builds/blacklight.css --no-source-map --load-path=node_modules --quiet-deps",
|
|
9
17
|
"prepare": "rollup --config rollup.config.js --sourcemap && ESM=true rollup --config rollup.config.js --sourcemap"
|
|
10
18
|
},
|
|
11
19
|
"repository": {
|
|
@@ -24,13 +32,15 @@
|
|
|
24
32
|
"homepage": "https://github.com/projectblacklight/blacklight#readme",
|
|
25
33
|
"devDependencies": {
|
|
26
34
|
"rollup": "^4.24.0",
|
|
27
|
-
"rollup-plugin-includepaths": "^0.2.4"
|
|
35
|
+
"rollup-plugin-includepaths": "^0.2.4",
|
|
36
|
+
"sass": "^1.80.3",
|
|
37
|
+
"bootstrap": "^5.3.5"
|
|
28
38
|
},
|
|
29
39
|
"browserslist": [
|
|
30
40
|
"defaults",
|
|
31
41
|
"not IE 11"
|
|
32
42
|
],
|
|
33
43
|
"dependencies": {
|
|
34
|
-
"bootstrap": ">=
|
|
44
|
+
"bootstrap": ">=5.3.5 <6.0.0"
|
|
35
45
|
}
|
|
36
46
|
}
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
auto-complete [aria-selected="true"],
|
|
2
|
-
auto-complete [role="option"]:hover {
|
|
3
|
-
background-color: $dropdown-link-hover-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
|
-
}
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
// define a visually-hidden class that applies to a given breakpoint and below
|
|
2
|
-
// https://getbootstrap.com/docs/5.3/helpers/visually-hidden/
|
|
3
|
-
@if mixin-exists(visually-hidden) {
|
|
4
|
-
@each $breakpoint in map-keys($grid-breakpoints) {
|
|
5
|
-
.visually-hidden-#{$breakpoint} {
|
|
6
|
-
@include media-breakpoint-down($breakpoint) {
|
|
7
|
-
@include visually-hidden;
|
|
8
|
-
}
|
|
9
|
-
}
|
|
10
|
-
}
|
|
11
|
-
} @else if mixin-exists(sr-only) {
|
|
12
|
-
// Bootstrap 4 version
|
|
13
|
-
@each $breakpoint in map-keys($grid-breakpoints) {
|
|
14
|
-
.visually-hidden-#{$breakpoint} {
|
|
15
|
-
@include media-breakpoint-down($breakpoint) {
|
|
16
|
-
@include sr-only;
|
|
17
|
-
}
|
|
18
|
-
}
|
|
19
|
-
}
|
|
20
|
-
}
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import BookmarkToggle from 'blacklight/bookmark_toggle'
|
|
2
|
-
import ButtonFocus from 'blacklight/button_focus'
|
|
3
|
-
import FacetSuggest from 'blacklight/facet_suggest'
|
|
4
|
-
import Modal from 'blacklight/modal'
|
|
5
|
-
import ModalForm from 'blacklight/modalForm'
|
|
6
|
-
import SearchContext from 'blacklight/search_context'
|
|
7
|
-
import Core from 'blacklight/core'
|
|
8
|
-
|
|
9
|
-
export default {
|
|
10
|
-
BookmarkToggle,
|
|
11
|
-
ButtonFocus,
|
|
12
|
-
FacetSuggest,
|
|
13
|
-
Modal,
|
|
14
|
-
ModalForm,
|
|
15
|
-
SearchContext,
|
|
16
|
-
Core,
|
|
17
|
-
onLoad: Core.onLoad
|
|
18
|
-
}
|