Skip to content

Commit 97e4d71

Browse files
committed
Build: Update typesense-minibar from 1.1.1 to 1.2.0
https://github.com/jquery/typesense-minibar/commits/1.2.0
1 parent 81e3325 commit 97e4d71

File tree

3 files changed

+22
-28
lines changed

3 files changed

+22
-28
lines changed

Makefile

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
MINIBAR_VERSION=1.1.1
1+
MINIBAR_VERSION=1.2.0
22

33
.PHONY: deps
44

_sass/typesense-minibar.css

+20-26
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/*! https://github.com/jquery/typesense-minibar 1.1.1 */
1+
/*! https://github.com/jquery/typesense-minibar 1.2.0 */
22
.tsmb-form {
33
--tsmb-size-edge: 1px;
44
--tsmb-size-radius: 3px;
@@ -7,6 +7,9 @@
77
--tsmb-size-sm: 0.8rem;
88
--tsmb-size-half: calc(var(--tsmb-size-sm)/2);
99
--tsmb-size-input: calc(var(--tsmb-size-base) * 1.2);
10+
--tsmb-size-listbox-right: auto;
11+
--tsmb-size-listbox-width: calc(min(30rem, 60vw));
12+
--tsmb-size-listbox-max-height: 70vh;
1013

1114
--tsmb-color-base-background: #fff;
1215
--tsmb-color-base30: #333;
@@ -51,9 +54,11 @@
5154
.tsmb-form:focus-within {
5255
color: var(--tsmb-color-focus30);
5356
}
57+
5458
.tsmb-form:focus-within input[type=search] {
5559
background: var(--tsmb-color-focus-background);
5660
}
61+
5762
.tsmb-form:focus-within input[type=search]::placeholder {
5863
color: var(--tsmb-color-focus50);
5964
}
@@ -100,6 +105,10 @@
100105
display: block !important;
101106
}
102107

108+
.tsmb-form--slash::after {
109+
display: none;
110+
}
111+
103112
.tsmb-form--slash:not(.tsmb-form--open):not(:focus-within)::after {
104113
content: '/';
105114
display: inline-block;
@@ -122,13 +131,16 @@
122131
.tsmb-form [role=listbox] {
123132
position: absolute;
124133
z-index: 10;
125-
134+
right: var(--tsmb-size-listbox-right);
126135
background: var(--tsmb-color-focus-background);
127136
color: var(--tsmb-color-focus30);
128-
width: 100%;
129-
max-height: 70vh;
137+
margin-top: var(--tsmb-size-half);
138+
min-width: 100%;
139+
width: var(--tsmb-size-listbox-width);
140+
max-height: var(--tsmb-size-listbox-max-height);
130141
overflow: auto;
131142
border: var(--tsmb-size-edge) solid var(--tsmb-color-focus90);
143+
border-radius: var(--tsmb-size-radius);
132144
box-shadow: 0 var(--tsmb-size-sm) 20px rgba(0,0,0,0.12);
133145
}
134146

@@ -143,9 +155,11 @@
143155
text-decoration: none;
144156
border-left: var(--tsmb-size-highlight) solid transparent;
145157
}
158+
146159
.tsmb-form:not([data-group=true]) [role=option]:not(:first-child) a {
147160
border-top: var(--tsmb-size-edge) solid var(--tsmb-color-focus90);
148161
}
162+
149163
.tsmb-form[data-group=true] [role=option] a {
150164
margin: 0 var(--tsmb-size-base);
151165
padding: var(--tsmb-size-sm);
@@ -199,33 +213,13 @@
199213
box-shadow: 0 0 10px rgba(0,0,0,0.12);
200214
text-decoration: none;
201215
}
216+
202217
.tsmb-foot::before {
203218
content: 'Search by';
204219
color: var(--tsmb-color-focus50);
205220
}
221+
206222
.tsmb-foot::after {
207223
content: ' Typesense';
208224
color: #0300b0;
209225
}
210-
211-
@media (max-width: 480px) {
212-
.tsmb-form {
213-
width: 100%;
214-
}
215-
216-
.tsmb-form input[type=search] {
217-
border-radius: 0;
218-
}
219-
}
220-
221-
@media (min-width: 768px) {
222-
.tsmb-form [role=listbox] {
223-
border-radius: var(--tsmb-size-radius);
224-
min-width: 500px;
225-
margin-top: var(--tsmb-size-half);
226-
}
227-
228-
.tsmb-form--slash::after {
229-
display: none;
230-
}
231-
}

assets/typesense-minibar.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/*! https://github.com/jquery/typesense-minibar 1.1.1 */
1+
/*! https://github.com/jquery/typesense-minibar 1.2.0 */
22
globalThis.tsminibar = function tsminibar (form) {
33
const { origin, collection } = form.dataset;
44
const group = !!form.dataset.group;

0 commit comments

Comments
 (0)