@entur/dropdown 4.0.0-beta.0 → 4.0.0-beta.1
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/CHANGELOG.md +7 -0
- package/dist/beta/SearchableDropdown.d.ts +8 -2
- package/dist/dropdown.cjs.development.js +27 -20
- package/dist/dropdown.cjs.development.js.map +1 -1
- package/dist/dropdown.cjs.production.min.js +1 -1
- package/dist/dropdown.cjs.production.min.js.map +1 -1
- package/dist/dropdown.esm.js +27 -20
- package/dist/dropdown.esm.js.map +1 -1
- package/dist/styles.css +121 -63
- package/package.json +2 -2
package/dist/styles.css
CHANGED
|
@@ -214,36 +214,24 @@
|
|
|
214
214
|
transition: none;
|
|
215
215
|
}/* DO NOT CHANGE!*/
|
|
216
216
|
/* This file is automatically generated from @entur/tokens! Changes will be overwritten. */
|
|
217
|
-
.eds-
|
|
217
|
+
.eds-searchable-dropdown__wrapper {
|
|
218
218
|
position: relative;
|
|
219
219
|
}
|
|
220
|
-
.eds-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
.eds-dropdown__input::-moz-placeholder {
|
|
229
|
-
color: #656782;
|
|
230
|
-
}
|
|
231
|
-
|
|
232
|
-
.eds-dropdown__input:-ms-input-placeholder {
|
|
233
|
-
color: #656782;
|
|
234
|
-
}
|
|
235
|
-
|
|
236
|
-
.eds-dropdown__input::placeholder {
|
|
237
|
-
color: #656782;
|
|
238
|
-
}
|
|
239
|
-
|
|
240
|
-
.eds-dropdown__selected-item {
|
|
220
|
+
.eds-searchable-dropdown__selected-item {
|
|
221
|
+
display: block;
|
|
222
|
+
font-size: 1rem;
|
|
223
|
+
line-height: 1rem;
|
|
224
|
+
margin-right: -1rem;
|
|
225
|
+
padding: calc(1rem + 0.25rem) 0 0.25rem 1rem;
|
|
226
|
+
font-family: inherit;
|
|
241
227
|
overflow-x: hidden;
|
|
242
228
|
text-overflow: ellipsis;
|
|
243
229
|
white-space: nowrap;
|
|
244
230
|
}
|
|
245
|
-
|
|
246
|
-
|
|
231
|
+
.eds-searchable-dropdown__selected-item__wrapper {
|
|
232
|
+
max-width: 65%;
|
|
233
|
+
}
|
|
234
|
+
.eds-searchable-dropdown__clear-button {
|
|
247
235
|
background: none;
|
|
248
236
|
border: none;
|
|
249
237
|
border-radius: 50%;
|
|
@@ -254,43 +242,62 @@
|
|
|
254
242
|
font-size: 1rem;
|
|
255
243
|
line-height: 1rem;
|
|
256
244
|
padding: 0.5rem;
|
|
245
|
+
margin-right: 0.25rem;
|
|
257
246
|
}
|
|
258
|
-
.eds-dropdown__clear-button:hover {
|
|
247
|
+
.eds-searchable-dropdown__clear-button:hover {
|
|
259
248
|
background: #f3f3f3;
|
|
260
249
|
}
|
|
261
|
-
.eds-dropdown__clear-button:focus {
|
|
250
|
+
.eds-searchable-dropdown__clear-button:focus {
|
|
262
251
|
outline-offset: 0.125rem;
|
|
263
252
|
outline: none;
|
|
264
253
|
box-shadow: 0 0 0 0.125rem #ffffff, 0 0 0 0.25rem #181c56;
|
|
265
254
|
}
|
|
266
|
-
|
|
267
|
-
.eds-dropdown__divider {
|
|
255
|
+
.eds-searchable-dropdown__divider {
|
|
268
256
|
content: "";
|
|
269
257
|
display: block;
|
|
270
258
|
background-color: #e9e9e9;
|
|
271
259
|
height: 1.5rem;
|
|
272
260
|
width: 1px;
|
|
273
261
|
}
|
|
274
|
-
.eds-contrast .eds-form-control-wrapper--disabled .eds-dropdown__divider {
|
|
262
|
+
.eds-contrast .eds-form-control-wrapper--disabled .eds-searchable-dropdown__divider {
|
|
275
263
|
background-color: #8285a8;
|
|
276
|
-
}
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
264
|
+
}
|
|
265
|
+
.eds-searchable-dropdown__toggle-button {
|
|
266
|
+
-webkit-appearance: none;
|
|
267
|
+
-moz-appearance: none;
|
|
268
|
+
appearance: none;
|
|
269
|
+
background: none;
|
|
270
|
+
border: none;
|
|
271
|
+
border-radius: 50%;
|
|
272
|
+
color: inherit;
|
|
273
|
+
font-size: inherit;
|
|
284
274
|
font-family: inherit;
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
275
|
+
margin-right: -0.75rem;
|
|
276
|
+
margin-left: 0.25rem;
|
|
277
|
+
padding: 0.5rem;
|
|
278
|
+
display: flex;
|
|
279
|
+
justify-content: center;
|
|
288
280
|
}
|
|
289
|
-
.eds-searchable-
|
|
290
|
-
|
|
281
|
+
.eds-searchable-dropdown__toggle-button svg {
|
|
282
|
+
transition: transform ease-in-out 0.1s;
|
|
291
283
|
}
|
|
292
|
-
|
|
293
|
-
|
|
284
|
+
.eds-searchable-dropdown__toggle-button--open svg {
|
|
285
|
+
transform: rotate(180deg);
|
|
286
|
+
}
|
|
287
|
+
.eds-searchable-dropdown__toggle-button:hover {
|
|
288
|
+
background: #f3f3f3;
|
|
289
|
+
}
|
|
290
|
+
.eds-searchable-dropdown__toggle-button:focus {
|
|
291
|
+
outline-offset: 0.125rem;
|
|
292
|
+
outline: none;
|
|
293
|
+
box-shadow: 0 0 0 0.125rem #ffffff, 0 0 0 0.25rem #181c56;
|
|
294
|
+
}
|
|
295
|
+
.eds-contrast .eds-searchable-dropdown__toggle-button:focus {
|
|
296
|
+
box-shadow: 0 0 0 0.125rem #181c56, 0 0 0 0.25rem #ffffff;
|
|
297
|
+
}
|
|
298
|
+
.eds-searchable-dropdown__list {
|
|
299
|
+
position: absolute;
|
|
300
|
+
top: 3rem;
|
|
294
301
|
border-radius: 0.25rem;
|
|
295
302
|
box-shadow: 0 0.0625rem 0.1875rem rgba(0, 0, 0, 0.25);
|
|
296
303
|
display: none;
|
|
@@ -298,27 +305,22 @@
|
|
|
298
305
|
margin: 0;
|
|
299
306
|
max-height: 50vh;
|
|
300
307
|
padding: 0;
|
|
301
|
-
position: relative;
|
|
302
308
|
overflow-y: auto;
|
|
303
309
|
width: 100%;
|
|
304
310
|
z-index: 20;
|
|
305
311
|
}
|
|
306
|
-
.eds-
|
|
307
|
-
box-shadow: 0 0.0625rem 0.1875rem #393d79;
|
|
308
|
-
}
|
|
309
|
-
.eds-dropdown-list--open {
|
|
312
|
+
.eds-searchable-dropdown__list--open {
|
|
310
313
|
display: inline-block;
|
|
311
314
|
}
|
|
312
|
-
.eds-
|
|
315
|
+
.eds-searchable-dropdown__list:focus {
|
|
313
316
|
outline: none;
|
|
314
317
|
}
|
|
315
318
|
@media all and (min-width: 50rem) {
|
|
316
|
-
.eds-
|
|
319
|
+
.eds-searchable-dropdown__list {
|
|
317
320
|
max-height: 30vh;
|
|
318
321
|
}
|
|
319
322
|
}
|
|
320
|
-
|
|
321
|
-
.eds-dropdown-list__item {
|
|
323
|
+
.eds-searchable-dropdown__list__item {
|
|
322
324
|
align-items: center;
|
|
323
325
|
background-color: #f8f8f8;
|
|
324
326
|
border-bottom: 0.125rem solid #e9e9e9;
|
|
@@ -333,24 +335,19 @@
|
|
|
333
335
|
padding: 0.75rem 1rem;
|
|
334
336
|
width: 100%;
|
|
335
337
|
}
|
|
336
|
-
.eds-
|
|
338
|
+
.eds-searchable-dropdown__list__item:first-child {
|
|
337
339
|
border-top: 0.125rem solid #e9e9e9;
|
|
338
340
|
}
|
|
339
|
-
.eds-
|
|
341
|
+
.eds-searchable-dropdown__list__item:last-child {
|
|
340
342
|
border-bottom: none;
|
|
341
343
|
}
|
|
342
|
-
.eds-
|
|
344
|
+
.eds-searchable-dropdown__list__item-icon {
|
|
343
345
|
margin-left: 0.75rem;
|
|
344
346
|
}
|
|
345
|
-
.eds-
|
|
346
|
-
color: #181c56;
|
|
347
|
-
border-color: #54568c;
|
|
348
|
-
background-color: #ffffff;
|
|
349
|
-
}
|
|
350
|
-
.eds-dropdown-list__item--highlighted {
|
|
347
|
+
.eds-searchable-dropdown__list__item--highlighted {
|
|
351
348
|
background-color: #d1d4e3;
|
|
352
349
|
}
|
|
353
|
-
.eds-contrast .eds-
|
|
350
|
+
.eds-contrast .eds-searchable-dropdown__list__item--highlighted {
|
|
354
351
|
background-color: #d1d4e3;
|
|
355
352
|
}
|
|
356
353
|
|
|
@@ -374,6 +371,67 @@
|
|
|
374
371
|
bottom: 1px;
|
|
375
372
|
}/* DO NOT CHANGE!*/
|
|
376
373
|
/* This file is automatically generated from @entur/tokens! Changes will be overwritten. */
|
|
374
|
+
.eds-dropdown-wrapper {
|
|
375
|
+
position: relative;
|
|
376
|
+
}
|
|
377
|
+
.eds-dropdown-wrapper .eds-form-control {
|
|
378
|
+
padding-right: 0;
|
|
379
|
+
}
|
|
380
|
+
.eds-dropdown-wrapper .eds-form-control__append {
|
|
381
|
+
display: flex;
|
|
382
|
+
align-items: center;
|
|
383
|
+
}
|
|
384
|
+
|
|
385
|
+
.eds-dropdown__input::-moz-placeholder {
|
|
386
|
+
color: #656782;
|
|
387
|
+
}
|
|
388
|
+
|
|
389
|
+
.eds-dropdown__input:-ms-input-placeholder {
|
|
390
|
+
color: #656782;
|
|
391
|
+
}
|
|
392
|
+
|
|
393
|
+
.eds-dropdown__input::placeholder {
|
|
394
|
+
color: #656782;
|
|
395
|
+
}
|
|
396
|
+
|
|
397
|
+
.eds-dropdown__selected-item {
|
|
398
|
+
overflow-x: hidden;
|
|
399
|
+
text-overflow: ellipsis;
|
|
400
|
+
white-space: nowrap;
|
|
401
|
+
}
|
|
402
|
+
|
|
403
|
+
.eds-dropdown__clear-button {
|
|
404
|
+
background: none;
|
|
405
|
+
border: none;
|
|
406
|
+
border-radius: 50%;
|
|
407
|
+
color: inherit;
|
|
408
|
+
cursor: pointer;
|
|
409
|
+
display: flex;
|
|
410
|
+
font: inherit;
|
|
411
|
+
font-size: 1rem;
|
|
412
|
+
line-height: 1rem;
|
|
413
|
+
padding: 0.5rem;
|
|
414
|
+
}
|
|
415
|
+
.eds-dropdown__clear-button:hover {
|
|
416
|
+
background: #f3f3f3;
|
|
417
|
+
}
|
|
418
|
+
.eds-dropdown__clear-button:focus {
|
|
419
|
+
outline-offset: 0.125rem;
|
|
420
|
+
outline: none;
|
|
421
|
+
box-shadow: 0 0 0 0.125rem #ffffff, 0 0 0 0.25rem #181c56;
|
|
422
|
+
}
|
|
423
|
+
|
|
424
|
+
.eds-dropdown__divider {
|
|
425
|
+
content: "";
|
|
426
|
+
display: block;
|
|
427
|
+
background-color: #e9e9e9;
|
|
428
|
+
height: 1.5rem;
|
|
429
|
+
width: 1px;
|
|
430
|
+
}
|
|
431
|
+
.eds-contrast .eds-form-control-wrapper--disabled .eds-dropdown__divider {
|
|
432
|
+
background-color: #8285a8;
|
|
433
|
+
}/* DO NOT CHANGE!*/
|
|
434
|
+
/* This file is automatically generated from @entur/tokens! Changes will be overwritten. */
|
|
377
435
|
.eds-dropdown__toggle-button {
|
|
378
436
|
-webkit-appearance: none;
|
|
379
437
|
-moz-appearance: none;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@entur/dropdown",
|
|
3
|
-
"version": "4.0.0-beta.
|
|
3
|
+
"version": "4.0.0-beta.1",
|
|
4
4
|
"license": "EUPL-1.2",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"module": "dist/dropdown.esm.js",
|
|
@@ -38,5 +38,5 @@
|
|
|
38
38
|
"classnames": "^2.3.1",
|
|
39
39
|
"downshift": "^6.1.7"
|
|
40
40
|
},
|
|
41
|
-
"gitHead": "
|
|
41
|
+
"gitHead": "2b3155d9a377be1c7e99a73ab3c664de205fa71c"
|
|
42
42
|
}
|