@entur/dropdown 5.0.2 → 5.0.4

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/dist/styles.css CHANGED
@@ -158,94 +158,133 @@
158
158
  }
159
159
  /* DO NOT CHANGE!*/
160
160
  /* This file is automatically generated from @entur/tokens! Changes will be overwritten. */
161
- .eds-multi-select {
162
- position: relative;
161
+ .eds-dropdown__list {
162
+ position: absolute;
163
+ list-style: none;
164
+ border-radius: 0.25rem;
165
+ border: 0.125rem solid #7C7F9F;
166
+ box-shadow: 0 0.0625rem 0.1875rem rgba(0, 0, 0, 0.25);
167
+ padding: 0;
168
+ margin: 0;
169
+ margin-top: 0.5rem;
170
+ max-height: 50vh;
171
+ overflow-y: auto;
172
+ width: 100%;
173
+ z-index: 20;
163
174
  }
164
- .eds-multi-select__selected-items {
175
+ .eds-dropdown__list:focus {
176
+ outline: none;
177
+ }
178
+ .eds-dropdown__list__item {
179
+ background-color: #f8f8f8;
180
+ color: #181c56;
165
181
  display: flex;
166
182
  align-items: center;
167
- flex-wrap: wrap;
168
- position: relative;
169
- flex: 1 1 0%;
170
- padding: 0.25rem;
183
+ justify-content: flex-start;
184
+ font-family: inherit;
185
+ font-size: 1rem;
186
+ line-height: 1.25rem;
187
+ padding: 0.75rem 1rem;
188
+ width: 100%;
189
+ overflow-x: hidden;
190
+ word-break: break-word;
171
191
  }
172
- .eds-multi-select__selected-items-tag.eds-tag-chip {
173
- margin-left: 0.25rem;
174
- white-space: nowrap;
192
+ .eds-dropdown__list__item:last-child {
193
+ border-bottom: none;
175
194
  }
176
- .eds-contrast .eds-multi-select__selected-items-tag.eds-tag-chip svg {
177
- color: #181c56;
195
+ .eds-dropdown__list__item__text {
196
+ flex: 1;
197
+ cursor: default;
178
198
  }
179
- .eds-multi-select__selected-items-tag.eds-tag-chip:focus {
180
- outline-offset: 0.125rem;
199
+ .eds-dropdown__list__item__icon {
200
+ margin-left: 0.75rem;
181
201
  }
182
- .eds-contrast .eds-multi-select__selected-items-tag.eds-tag-chip {
183
- color: #181c56;
184
- background: #ebebf1;
185
- border: 0.0625rem solid #d1d4e3;
202
+ .eds-dropdown__list__item__checkbox {
203
+ pointer-events: none;
186
204
  }
187
- .eds-contrast .eds-multi-select__selected-items-tag.eds-tag-chip .eds-tag-chip__close-button:hover {
188
- background: #babbcf;
205
+ .eds-contrast .eds-dropdown__list__item__checkbox.eds-checkbox__container > input + .eds-checkbox__icon {
206
+ border-color: #181c56;
189
207
  }
190
- .eds-multi-select__input {
191
- flex: 1 1;
192
- min-height: 44px;
193
- display: flex;
194
- align-items: center;
208
+ .eds-contrast .eds-dropdown__list__item__checkbox.eds-checkbox__container > input:checked + .eds-checkbox__icon,
209
+ .eds-contrast .eds-dropdown__list__item__checkbox.eds-checkbox__container > input:indeterminate + .eds-checkbox__icon {
210
+ background-color: #181c56;
195
211
  }
196
- .eds-multi-select__placeholder {
197
- padding-left: 1.5rem;
198
- line-height: 1.375rem;
199
- font-size: 1rem;
212
+ .eds-contrast .eds-dropdown__list__item__checkbox.eds-checkbox__container > input:checked + .eds-checkbox__icon path,
213
+ .eds-contrast .eds-dropdown__list__item__checkbox.eds-checkbox__container > input:indeterminate + .eds-checkbox__icon path {
214
+ stroke: #ffffff;
200
215
  }
201
- .eds-checkbox-icon {
202
- height: 1rem;
203
- width: 1rem;
204
- visibility: hidden;
216
+ .eds-contrast .eds-dropdown__list__item__checkbox.eds-checkbox__container > input:checked + .eds-checkbox__icon rect,
217
+ .eds-contrast .eds-dropdown__list__item__checkbox.eds-checkbox__container > input:indeterminate + .eds-checkbox__icon rect {
218
+ fill: #ffffff;
205
219
  }
206
- .eds-checkbox-icon__path {
207
- transform-origin: 50% 50%;
208
- stroke-dasharray: 48;
209
- stroke-dashoffset: 48;
210
- stroke-width: 0.375rem;
220
+ .eds-dropdown__list__item--highlighted {
221
+ background-color: #d1d4e3;
211
222
  }
212
-
213
- .eds-multiselect {
214
- position: relative;
223
+ .eds-dropdown__list__item--highlighted .eds-dropdown__list__item__checkbox.eds-checkbox__container > input:checked + .eds-checkbox__icon,
224
+ .eds-dropdown__list__item--highlighted .eds-dropdown__list__item__checkbox.eds-checkbox__container > input:indeterminate + .eds-checkbox__icon,
225
+ .eds-dropdown__list__item--highlighted .eds-dropdown__list__item__checkbox.eds-checkbox__container:hover > input:checked + .eds-checkbox__icon,
226
+ .eds-dropdown__list__item--highlighted .eds-dropdown__list__item__checkbox.eds-checkbox__container:hover > input:indeterminate + .eds-checkbox__icon {
227
+ background-color: #54568c;
228
+ border-color: transparent;
215
229
  }
216
- .eds-multiselect__button {
217
- text-overflow: ellipsis;
230
+ .eds-dropdown__list__item--highlighted .eds-dropdown__list__item__checkbox.eds-checkbox__container > input + .eds-checkbox__icon,
231
+ .eds-dropdown__list__item--highlighted .eds-dropdown__list__item__checkbox.eds-checkbox__container:hover > input + .eds-checkbox__icon {
232
+ border-color: #54568c;
218
233
  }
219
-
220
- .eds-multiselect-checkbox {
221
- display: inline-flex;
222
- justify-content: center;
223
- align-items: center;
224
- position: relative;
225
- margin-right: 0.75rem;
226
- height: 1.25rem;
227
- width: 1.25rem;
228
- border: 0.125rem solid #181c56;
229
- border-radius: 0.0625rem;
230
- background-color: transparent;
234
+ .eds-dropdown__list__item--selected {
235
+ background-color: #54568c;
231
236
  color: #ffffff;
232
237
  }
233
-
234
- .eds-multiselect-checkbox--checked {
235
- background-color: #181c56;
238
+ @media all and (min-width: 50rem) {
239
+ .eds-dropdown__list {
240
+ max-height: 30vh;
241
+ }
236
242
  }
237
- .eds-multiselect-checkbox--checked .eds-checkbox-icon {
238
- visibility: visible;
243
+ /* DO NOT CHANGE!*/
244
+ /* This file is automatically generated from @entur/tokens! Changes will be overwritten. */
245
+ .eds-dropdown__selected-item-tag {
246
+ height: 1.5rem;
247
+ max-width: 50%;
248
+ padding: 0;
239
249
  }
240
- .eds-multiselect-checkbox--checked .eds-checkbox-icon__path {
241
- stroke: #ffffff;
242
- animation: stroke ease-in-out 0.2s 0.1s forwards;
250
+ .eds-dropdown__selected-item-tag > span {
251
+ overflow: hidden;
252
+ text-overflow: ellipsis;
253
+ white-space: nowrap;
254
+ margin-left: 0.5rem;
243
255
  }
244
-
245
- @keyframes stroke {
246
- 100% {
247
- stroke-dashoffset: 0;
248
- }
256
+ .eds-dropdown__selected-item-tag .eds-tag-chip__close-button {
257
+ margin-right: 0.125rem;
258
+ }
259
+ .eds-dropdown__selected-item-tag .eds-tag-chip__close-button > svg {
260
+ font-size: 0.6rem;
261
+ }
262
+ .eds-contrast .eds-dropdown__selected-item-tag {
263
+ background: #ebebf1;
264
+ border: 0.0625rem solid #d1d4e3;
265
+ color: #181c56;
266
+ }
267
+ .eds-contrast .eds-dropdown__selected-item-tag .eds-tag-chip__close-button {
268
+ color: #181c56;
269
+ }
270
+ .eds-contrast .eds-dropdown__selected-item-tag .eds-tag-chip__close-button:hover {
271
+ background-color: #babbcf;
272
+ }
273
+ .eds-dropdown__selected-item-tag--readonly, .eds-dropdown__selected-item-tag--disabled {
274
+ padding-right: 0.5rem;
275
+ }
276
+ .eds-dropdown__selected-item-tag--readonly .eds-tag-chip__close-button, .eds-dropdown__selected-item-tag--disabled .eds-tag-chip__close-button {
277
+ display: none;
278
+ }
279
+ .eds-contrast .eds-dropdown__selected-item-tag--readonly {
280
+ background-color: #8285a8;
281
+ border-color: transparent;
282
+ color: #ffffff;
283
+ }
284
+ .eds-contrast .eds-dropdown__selected-item-tag--disabled {
285
+ background-color: #54568c;
286
+ border-color: transparent;
287
+ color: #8285a8;
249
288
  }
250
289
  /* DO NOT CHANGE!*/
251
290
  /* This file is automatically generated from @entur/tokens! Changes will be overwritten. */
@@ -313,132 +352,93 @@
313
352
  }
314
353
  /* DO NOT CHANGE!*/
315
354
  /* This file is automatically generated from @entur/tokens! Changes will be overwritten. */
316
- .eds-dropdown__selected-item-tag {
317
- height: 1.5rem;
318
- max-width: 50%;
319
- padding: 0;
355
+ .eds-multi-select {
356
+ position: relative;
320
357
  }
321
- .eds-dropdown__selected-item-tag > span {
322
- overflow: hidden;
323
- text-overflow: ellipsis;
358
+ .eds-multi-select__selected-items {
359
+ display: flex;
360
+ align-items: center;
361
+ flex-wrap: wrap;
362
+ position: relative;
363
+ flex: 1 1 0%;
364
+ padding: 0.25rem;
365
+ }
366
+ .eds-multi-select__selected-items-tag.eds-tag-chip {
367
+ margin-left: 0.25rem;
324
368
  white-space: nowrap;
325
- margin-left: 0.5rem;
326
369
  }
327
- .eds-dropdown__selected-item-tag .eds-tag-chip__close-button {
328
- margin-right: 0.125rem;
370
+ .eds-contrast .eds-multi-select__selected-items-tag.eds-tag-chip svg {
371
+ color: #181c56;
329
372
  }
330
- .eds-dropdown__selected-item-tag .eds-tag-chip__close-button > svg {
331
- font-size: 0.6rem;
373
+ .eds-multi-select__selected-items-tag.eds-tag-chip:focus {
374
+ outline-offset: 0.125rem;
332
375
  }
333
- .eds-contrast .eds-dropdown__selected-item-tag {
376
+ .eds-contrast .eds-multi-select__selected-items-tag.eds-tag-chip {
377
+ color: #181c56;
334
378
  background: #ebebf1;
335
379
  border: 0.0625rem solid #d1d4e3;
336
- color: #181c56;
337
- }
338
- .eds-contrast .eds-dropdown__selected-item-tag .eds-tag-chip__close-button {
339
- color: #181c56;
340
- }
341
- .eds-contrast .eds-dropdown__selected-item-tag .eds-tag-chip__close-button:hover {
342
- background-color: #babbcf;
343
- }
344
- .eds-dropdown__selected-item-tag--readonly, .eds-dropdown__selected-item-tag--disabled {
345
- padding-right: 0.5rem;
346
- }
347
- .eds-dropdown__selected-item-tag--readonly .eds-tag-chip__close-button, .eds-dropdown__selected-item-tag--disabled .eds-tag-chip__close-button {
348
- display: none;
349
- }
350
- .eds-contrast .eds-dropdown__selected-item-tag--readonly {
351
- background-color: #8285a8;
352
- border-color: transparent;
353
- color: #ffffff;
354
- }
355
- .eds-contrast .eds-dropdown__selected-item-tag--disabled {
356
- background-color: #54568c;
357
- border-color: transparent;
358
- color: #8285a8;
359
380
  }
360
- /* DO NOT CHANGE!*/
361
- /* This file is automatically generated from @entur/tokens! Changes will be overwritten. */
362
- .eds-dropdown__list {
363
- position: absolute;
364
- list-style: none;
365
- border-radius: 0.25rem;
366
- border: 0.125rem solid #7C7F9F;
367
- box-shadow: 0 0.0625rem 0.1875rem rgba(0, 0, 0, 0.25);
368
- padding: 0;
369
- margin: 0;
370
- margin-top: 0.5rem;
371
- max-height: 50vh;
372
- overflow-y: auto;
373
- width: 100%;
374
- z-index: 20;
375
- }
376
- .eds-dropdown__list:focus {
377
- outline: none;
381
+ .eds-contrast .eds-multi-select__selected-items-tag.eds-tag-chip .eds-tag-chip__close-button:hover {
382
+ background: #babbcf;
378
383
  }
379
- .eds-dropdown__list__item {
380
- background-color: #f8f8f8;
381
- color: #181c56;
384
+ .eds-multi-select__input {
385
+ flex: 1 1;
386
+ min-height: 44px;
382
387
  display: flex;
383
388
  align-items: center;
384
- justify-content: flex-start;
385
- font-family: inherit;
389
+ }
390
+ .eds-multi-select__placeholder {
391
+ padding-left: 1.5rem;
392
+ line-height: 1.375rem;
386
393
  font-size: 1rem;
387
- line-height: 1.25rem;
388
- padding: 0.75rem 1rem;
389
- width: 100%;
390
- overflow-x: hidden;
391
- word-break: break-word;
392
394
  }
393
- .eds-dropdown__list__item:last-child {
394
- border-bottom: none;
395
+ .eds-checkbox-icon {
396
+ height: 1rem;
397
+ width: 1rem;
398
+ visibility: hidden;
395
399
  }
396
- .eds-dropdown__list__item__text {
397
- flex: 1;
398
- cursor: default;
400
+ .eds-checkbox-icon__path {
401
+ transform-origin: 50% 50%;
402
+ stroke-dasharray: 48;
403
+ stroke-dashoffset: 48;
404
+ stroke-width: 0.375rem;
399
405
  }
400
- .eds-dropdown__list__item__icon {
401
- margin-left: 0.75rem;
406
+
407
+ .eds-multiselect {
408
+ position: relative;
402
409
  }
403
- .eds-dropdown__list__item__checkbox {
404
- pointer-events: none;
410
+ .eds-multiselect__button {
411
+ text-overflow: ellipsis;
405
412
  }
406
- .eds-contrast .eds-dropdown__list__item__checkbox.eds-checkbox__container > input + .eds-checkbox__icon {
407
- border-color: #181c56;
413
+
414
+ .eds-multiselect-checkbox {
415
+ display: inline-flex;
416
+ justify-content: center;
417
+ align-items: center;
418
+ position: relative;
419
+ margin-right: 0.75rem;
420
+ height: 1.25rem;
421
+ width: 1.25rem;
422
+ border: 0.125rem solid #181c56;
423
+ border-radius: 0.0625rem;
424
+ background-color: transparent;
425
+ color: #ffffff;
408
426
  }
409
- .eds-contrast .eds-dropdown__list__item__checkbox.eds-checkbox__container > input:checked + .eds-checkbox__icon,
410
- .eds-contrast .eds-dropdown__list__item__checkbox.eds-checkbox__container > input:indeterminate + .eds-checkbox__icon {
427
+
428
+ .eds-multiselect-checkbox--checked {
411
429
  background-color: #181c56;
412
430
  }
413
- .eds-contrast .eds-dropdown__list__item__checkbox.eds-checkbox__container > input:checked + .eds-checkbox__icon path,
414
- .eds-contrast .eds-dropdown__list__item__checkbox.eds-checkbox__container > input:indeterminate + .eds-checkbox__icon path {
415
- stroke: #ffffff;
416
- }
417
- .eds-contrast .eds-dropdown__list__item__checkbox.eds-checkbox__container > input:checked + .eds-checkbox__icon rect,
418
- .eds-contrast .eds-dropdown__list__item__checkbox.eds-checkbox__container > input:indeterminate + .eds-checkbox__icon rect {
419
- fill: #ffffff;
420
- }
421
- .eds-dropdown__list__item--highlighted {
422
- background-color: #d1d4e3;
423
- }
424
- .eds-dropdown__list__item--highlighted .eds-dropdown__list__item__checkbox.eds-checkbox__container > input:checked + .eds-checkbox__icon,
425
- .eds-dropdown__list__item--highlighted .eds-dropdown__list__item__checkbox.eds-checkbox__container > input:indeterminate + .eds-checkbox__icon,
426
- .eds-dropdown__list__item--highlighted .eds-dropdown__list__item__checkbox.eds-checkbox__container:hover > input:checked + .eds-checkbox__icon,
427
- .eds-dropdown__list__item--highlighted .eds-dropdown__list__item__checkbox.eds-checkbox__container:hover > input:indeterminate + .eds-checkbox__icon {
428
- background-color: #54568c;
429
- border-color: transparent;
430
- }
431
- .eds-dropdown__list__item--highlighted .eds-dropdown__list__item__checkbox.eds-checkbox__container > input + .eds-checkbox__icon,
432
- .eds-dropdown__list__item--highlighted .eds-dropdown__list__item__checkbox.eds-checkbox__container:hover > input + .eds-checkbox__icon {
433
- border-color: #54568c;
431
+ .eds-multiselect-checkbox--checked .eds-checkbox-icon {
432
+ visibility: visible;
434
433
  }
435
- .eds-dropdown__list__item--selected {
436
- background-color: #54568c;
437
- color: #ffffff;
434
+ .eds-multiselect-checkbox--checked .eds-checkbox-icon__path {
435
+ stroke: #ffffff;
436
+ animation: stroke ease-in-out 0.2s 0.1s forwards;
438
437
  }
439
- @media all and (min-width: 50rem) {
440
- .eds-dropdown__list {
441
- max-height: 30vh;
438
+
439
+ @keyframes stroke {
440
+ 100% {
441
+ stroke-dashoffset: 0;
442
442
  }
443
443
  }
444
444
  /* DO NOT CHANGE!*/
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@entur/dropdown",
3
- "version": "5.0.2",
3
+ "version": "5.0.4",
4
4
  "license": "EUPL-1.2",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/dropdown.esm.js",
@@ -29,7 +29,7 @@
29
29
  "dependencies": {
30
30
  "@entur/a11y": "^0.2.68",
31
31
  "@entur/button": "^3.1.0",
32
- "@entur/chip": "^0.6.42",
32
+ "@entur/chip": "^0.6.43",
33
33
  "@entur/form": "^7.0.15",
34
34
  "@entur/icons": "^6.4.2",
35
35
  "@entur/loader": "^0.4.37",
@@ -39,5 +39,5 @@
39
39
  "classnames": "^2.3.1",
40
40
  "downshift": "^7.6.1"
41
41
  },
42
- "gitHead": "3a047a582443389da0c58bc67cf94ce99de54a43"
42
+ "gitHead": "153d4a9245c7f61bc718a77b11ff351e2f94a33a"
43
43
  }