|
1 |
| -/*! https://github.com/jquery/typesense-minibar 1.1.1 */ |
2 |
| -.tsmb-form { |
| 1 | +/*! https://github.com/jquery/typesense-minibar 1.3.2 */ |
| 2 | +.tsmb-form, |
| 3 | +typesense-minibar { |
3 | 4 | --tsmb-size-edge: 1px;
|
4 | 5 | --tsmb-size-radius: 3px;
|
5 | 6 | --tsmb-size-highlight: 2px;
|
6 | 7 | --tsmb-size-base: 1rem;
|
7 | 8 | --tsmb-size-sm: 0.8rem;
|
8 | 9 | --tsmb-size-half: calc(var(--tsmb-size-sm)/2);
|
9 | 10 | --tsmb-size-input: calc(var(--tsmb-size-base) * 1.2);
|
| 11 | + --tsmb-size-listbox-right: auto; |
| 12 | + --tsmb-size-listbox-width: calc(min(30rem, 60vw)); |
| 13 | + --tsmb-size-listbox-max-height: 70vh; |
10 | 14 |
|
11 | 15 | --tsmb-color-base-background: #fff;
|
12 | 16 | --tsmb-color-base30: #333;
|
|
20 | 24 | --tsmb-color-primary30: #390f39;
|
21 | 25 | --tsmb-color-primary50: #9c3493;
|
22 | 26 | --tsmb-color-primary90: #fbdbfb;
|
| 27 | +} |
23 | 28 |
|
| 29 | +.tsmb-form, |
| 30 | +typesense-minibar form { |
24 | 31 | position: relative;
|
25 | 32 | width: 20rem;
|
26 | 33 | max-width: 100%;
|
27 | 34 | padding: 0;
|
28 | 35 | color: var(--tsmb-color-base30);
|
29 | 36 | }
|
30 | 37 |
|
31 |
| -.tsmb-form input[type=search] { |
| 38 | +.tsmb-form input[type=search], |
| 39 | +typesense-minibar input[type=search] { |
32 | 40 | box-sizing: border-box;
|
33 | 41 | -webkit-appearance: none;
|
34 | 42 | -moz-appearance: none;
|
|
43 | 51 | line-height: var(--tsmb-size-input);
|
44 | 52 | }
|
45 | 53 |
|
46 |
| -.tsmb-form input[type=search]::placeholder { |
| 54 | +.tsmb-form input[type=search]::placeholder, |
| 55 | +typesense-minibar input[type=search]::placeholder { |
47 | 56 | color: var(--tsmb-color-base50);
|
48 | 57 | opacity: 1;
|
49 | 58 | }
|
50 | 59 |
|
51 |
| -.tsmb-form:focus-within { |
| 60 | +.tsmb-form:focus-within, |
| 61 | +typesense-minibar form:focus-within { |
52 | 62 | color: var(--tsmb-color-focus30);
|
53 | 63 | }
|
54 |
| -.tsmb-form:focus-within input[type=search] { |
| 64 | + |
| 65 | +.tsmb-form:focus-within input[type=search], |
| 66 | +typesense-minibar:focus-within input[type=search] { |
55 | 67 | background: var(--tsmb-color-focus-background);
|
56 | 68 | }
|
57 |
| -.tsmb-form:focus-within input[type=search]::placeholder { |
| 69 | + |
| 70 | +.tsmb-form:focus-within input[type=search]::placeholder, |
| 71 | +typesense-minibar:focus-within input[type=search]::placeholder { |
58 | 72 | color: var(--tsmb-color-focus50);
|
59 | 73 | }
|
60 | 74 |
|
61 | 75 | .tsmb-form input[type=search]::-webkit-search-decoration,
|
62 | 76 | .tsmb-form input[type=search]::-webkit-search-cancel-button,
|
63 | 77 | .tsmb-form input[type=search]::-webkit-search-results-button,
|
64 |
| -.tsmb-form input[type=search]::-webkit-search-results-decoration { |
| 78 | +.tsmb-form input[type=search]::-webkit-search-results-decoration, |
| 79 | +typesense-minibar input[type=search]::-webkit-search-decoration, |
| 80 | +typesense-minibar input[type=search]::-webkit-search-cancel-button, |
| 81 | +typesense-minibar input[type=search]::-webkit-search-results-button, |
| 82 | +typesense-minibar input[type=search]::-webkit-search-results-decoration { |
65 | 83 | display: none;
|
66 | 84 | }
|
67 | 85 |
|
68 |
| -.tsmb-form::before { |
| 86 | +.tsmb-form::before, |
| 87 | +typesense-minibar form::before { |
69 | 88 | content: '';
|
70 | 89 | background: url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='654 -372 1664 1664' width='20' height='20'><path d='M1806,332c0-123.3-43.8-228.8-131.5-316.5C1586.8-72.2,1481.3-116,1358-116s-228.8,43.8-316.5,131.5 C953.8,103.2,910,208.7,910,332s43.8,228.8,131.5,316.5C1129.2,736.2,1234.7,780,1358,780s228.8-43.8,316.5-131.5 C1762.2,560.8,1806,455.3,1806,332z M2318,1164c0,34.7-12.7,64.7-38,90s-55.3,38-90,38c-36,0-66-12.7-90-38l-343-342 c-119.3,82.7-252.3,124-399,124c-95.3,0-186.5-18.5-273.5-55.5s-162-87-225-150s-113-138-150-225S654,427.3,654,332 s18.5-186.5,55.5-273.5s87-162,150-225s138-113,225-150S1262.7-372,1358-372s186.5,18.5,273.5,55.5s162,87,225,150s113,138,150,225 S2062,236.7,2062,332c0,146.7-41.3,279.7-124,399l343,343C2305.7,1098.7,2318,1128.7,2318,1164z'/></svg>") 0 50% / contain no-repeat;
|
71 | 90 | position: absolute;
|
|
100 | 119 | display: block !important;
|
101 | 120 | }
|
102 | 121 |
|
| 122 | +.tsmb-form--slash::after { |
| 123 | + display: none; |
| 124 | +} |
| 125 | + |
103 | 126 | .tsmb-form--slash:not(.tsmb-form--open):not(:focus-within)::after {
|
104 | 127 | content: '/';
|
105 | 128 | display: inline-block;
|
|
119 | 142 | color: var(--tsmb-color-base90);
|
120 | 143 | }
|
121 | 144 |
|
122 |
| -.tsmb-form [role=listbox] { |
| 145 | +.tsmb-form [role=listbox], |
| 146 | +typesense-minibar [role=listbox] { |
123 | 147 | position: absolute;
|
124 | 148 | z-index: 10;
|
125 |
| - |
| 149 | + right: var(--tsmb-size-listbox-right); |
126 | 150 | background: var(--tsmb-color-focus-background);
|
127 | 151 | color: var(--tsmb-color-focus30);
|
128 |
| - width: 100%; |
129 |
| - max-height: 70vh; |
| 152 | + margin-top: var(--tsmb-size-half); |
| 153 | + min-width: 100%; |
| 154 | + width: var(--tsmb-size-listbox-width); |
| 155 | + max-height: var(--tsmb-size-listbox-max-height); |
130 | 156 | overflow: auto;
|
131 | 157 | border: var(--tsmb-size-edge) solid var(--tsmb-color-focus90);
|
| 158 | + border-radius: var(--tsmb-size-radius); |
132 | 159 | box-shadow: 0 var(--tsmb-size-sm) 20px rgba(0,0,0,0.12);
|
133 | 160 | }
|
134 | 161 |
|
|
137 | 164 | border-bottom: var(--tsmb-size-edge) solid var(--tsmb-color-focus90);
|
138 | 165 | }
|
139 | 166 |
|
140 |
| -.tsmb-form [role=option] a { |
| 167 | +.tsmb-form [role=option] a, |
| 168 | +typesense-minibar [role=option] a { |
141 | 169 | display: block;
|
142 | 170 | padding: var(--tsmb-size-base);
|
143 | 171 | text-decoration: none;
|
144 | 172 | border-left: var(--tsmb-size-highlight) solid transparent;
|
145 | 173 | }
|
146 |
| -.tsmb-form:not([data-group=true]) [role=option]:not(:first-child) a { |
| 174 | + |
| 175 | +.tsmb-form:not([data-group=true]) [role=option]:not(:first-child) a, |
| 176 | +typesense-minibar:not([data-group=true]) [role=option]:not(:first-child) a { |
147 | 177 | border-top: var(--tsmb-size-edge) solid var(--tsmb-color-focus90);
|
148 | 178 | }
|
149 |
| -.tsmb-form[data-group=true] [role=option] a { |
| 179 | + |
| 180 | +.tsmb-form[data-group=true] [role=option] a, |
| 181 | +typesense-minibar[data-group=true] [role=option] a { |
150 | 182 | margin: 0 var(--tsmb-size-base);
|
151 | 183 | padding: var(--tsmb-size-sm);
|
152 | 184 | }
|
153 | 185 |
|
154 | 186 | .tsmb-form [role=option] a:hover,
|
155 |
| -.tsmb-form [role=option][aria-selected=true] a { |
| 187 | +.tsmb-form [role=option][aria-selected=true] a, |
| 188 | +typesense-minibar [role=option] a:hover, |
| 189 | +typesense-minibar [role=option][aria-selected=true] a { |
156 | 190 | background: var(--tsmb-color-primary90);
|
157 | 191 | border-left-color: var(--tsmb-color-primary50);
|
158 | 192 | }
|
159 | 193 |
|
160 |
| -.tsmb-form [role=option] mark { |
| 194 | +.tsmb-form [role=option] mark, |
| 195 | +typesense-minibar [role=option] mark { |
161 | 196 | background: none;
|
162 | 197 | color: inherit;
|
163 | 198 | font-style: normal;
|
|
175 | 210 | .tsmb-suggestion_title {
|
176 | 211 | color: var(--tsmb-color-primary30);
|
177 | 212 | }
|
178 |
| -.tsmb-form[data-group=true] .tsmb-suggestion_title { |
| 213 | +.tsmb-form[data-group=true] .tsmb-suggestion_title, |
| 214 | +typesense-minibar[data-group=true] .tsmb-suggestion_title { |
179 | 215 | font-weight: bold;
|
180 | 216 | font-size: var(--tsmb-size-sm);
|
181 | 217 | }
|
|
199 | 235 | box-shadow: 0 0 10px rgba(0,0,0,0.12);
|
200 | 236 | text-decoration: none;
|
201 | 237 | }
|
| 238 | + |
202 | 239 | .tsmb-foot::before {
|
203 | 240 | content: 'Search by';
|
204 | 241 | color: var(--tsmb-color-focus50);
|
205 | 242 | }
|
| 243 | + |
206 | 244 | .tsmb-foot::after {
|
207 | 245 | content: ' Typesense';
|
208 | 246 | color: #0300b0;
|
209 | 247 | }
|
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 |
| -} |
232 |
| -/*! https://github.com/jquery/typesense-minibar 1.1.1 */ |
| 248 | +/*! https://github.com/jquery/typesense-minibar 1.3.2 */ |
233 | 249 | .tsmb-foot::after {
|
234 | 250 | content: "";
|
235 | 251 | display: inline-block;
|
|
0 commit comments