@entur/menu 4.1.31 → 4.1.33

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.
Files changed (3) hide show
  1. package/README.md +2 -2
  2. package/dist/styles.css +238 -238
  3. package/package.json +10 -10
package/README.md CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
  This package contains the navigation components
4
4
 
5
- > 💡 Looking for the [documentation](https://design.entur.org/komponenter/navigation/top-navigation)?
5
+ > 💡 Looking for the [documentation](https://design.entur.no/komponenter/navigation/top-navigation)?
6
6
 
7
7
  ## Installation
8
8
 
@@ -14,4 +14,4 @@ yarn add @entur/menu
14
14
 
15
15
  ## Usage
16
16
 
17
- Please refer to the [documentation](https://design.entur.org/komponenter/navigation/top-navigation) for further usage information.
17
+ Please refer to the [documentation](https://design.entur.no/komponenter/navigation/top-navigation) for further usage information.
package/dist/styles.css CHANGED
@@ -50,52 +50,122 @@
50
50
  }
51
51
  /* DO NOT CHANGE!*/
52
52
  /* This file is automatically generated from @entur/tokens! Changes will be overwritten. */
53
- .eds-top-navigation-item {
54
- --show-active-line: 0;
55
- display: inline-block;
53
+ .eds-stepper {
54
+ display: flex;
55
+ flex-direction: row;
56
+ }
57
+ .eds-stepper__item__container {
56
58
  cursor: pointer;
57
- color: inherit;
58
- text-decoration: none;
59
- position: relative;
60
- padding: 1rem;
61
- min-width: 5rem;
62
- width: -moz-fit-content;
63
- width: fit-content;
64
- text-align: center;
65
59
  font-family: inherit;
66
- font-size: 1rem;
67
- font-weight: 600;
60
+ text-transform: none;
61
+ -webkit-appearance: none;
62
+ -moz-appearance: none;
63
+ appearance: none;
64
+ background: none;
65
+ border: none;
66
+ margin: 0;
67
+ padding: 0;
68
+ align-items: inherit;
69
+ display: flex;
70
+ flex-grow: 1;
71
+ flex-basis: 0;
72
+ flex-direction: column;
73
+ margin-left: 0.25rem;
68
74
  }
69
- .eds-top-navigation-item::after {
70
- content: "";
71
- display: block;
72
- bottom: 1rem;
73
- height: 0.1875rem;
74
- width: 0;
75
- margin: 0 auto;
76
- opacity: var(--show-active-line);
77
- background: #ff5959;
78
- transition: width ease-in-out 0.2s, opacity ease-in-out 0.2s;
75
+ .eds-stepper__item__container--non-interactive {
76
+ cursor: default;
79
77
  }
80
- .eds-top-navigation-item:focus {
78
+ .eds-stepper__item__container:focus {
81
79
  outline-offset: 0.125rem;
82
80
  outline: none;
83
81
  box-shadow: 0 0 0 0.125rem #ffffff, 0 0 0 0.25rem #181c56;
84
82
  }
85
- .eds-contrast .eds-top-navigation-item:focus {
83
+ .eds-contrast .eds-stepper__item__container:focus {
86
84
  box-shadow: 0 0 0 0.125rem #181c56, 0 0 0 0.25rem #ffffff;
87
85
  }
88
- .eds-top-navigation-item:hover {
89
- --show-active-line: 1;
86
+ .eds-stepper__item__container:first-child {
87
+ margin-left: 0;
90
88
  }
91
- .eds-top-navigation-item:hover::after {
92
- width: 2rem;
89
+ .eds-stepper__item__label {
90
+ cursor: inherit;
91
+ flex-grow: 1;
92
+ flex-direction: column;
93
+ text-align: center;
94
+ font-size: 0.875rem;
95
+ padding: 0.25rem 1rem;
93
96
  }
94
- .eds-top-navigation-item--active {
95
- --show-active-line: 1;
97
+ .eds-stepper__item__label--active {
98
+ font-weight: 600;
96
99
  }
97
- .eds-top-navigation-item--active::after {
98
- width: 2rem;
100
+ .eds-stepper__item__label.eds-stepper__item__label--active {
101
+ color: #181c56;
102
+ }
103
+ .eds-contrast .eds-stepper__item__label.eds-stepper__item__label--active {
104
+ color: #ffffff;
105
+ }
106
+ .eds-stepper__item__label.eds-stepper__item__label--has-been {
107
+ color: #181c56;
108
+ }
109
+ .eds-contrast .eds-stepper__item__label.eds-stepper__item__label--has-been {
110
+ color: #ffffff;
111
+ }
112
+ .eds-stepper__item__square {
113
+ height: 0.5rem;
114
+ }
115
+ .eds-stepper__item__square--active {
116
+ color: inherit;
117
+ background: #e9e9e9;
118
+ position: relative;
119
+ }
120
+ .eds-stepper__item__square--active:before {
121
+ background: #181c56;
122
+ content: "";
123
+ position: absolute;
124
+ right: calc(50% - 0.2rem);
125
+ border-radius: 0.0625rem;
126
+ bottom: 0.0625rem;
127
+ width: calc(
128
+ 0.5rem - 0.125rem - 0.01rem
129
+ );
130
+ height: calc(
131
+ 0.5rem - 0.125rem - 0.01rem
132
+ );
133
+ transform: rotate(45deg);
134
+ }
135
+ .eds-contrast .eds-stepper__item__square--active:before {
136
+ border-left-color: #aeb7e2;
137
+ border-left-color: #aeb7e2;
138
+ }
139
+ .eds-stepper__item__square--active:after {
140
+ content: "";
141
+ position: absolute;
142
+ left: 0;
143
+ bottom: 0;
144
+ width: 50%;
145
+ height: 0.5rem;
146
+ background: #181c56;
147
+ }
148
+ .eds-contrast .eds-stepper__item__square--active:after {
149
+ background: #aeb7e2;
150
+ }
151
+ .eds-contrast .eds-stepper__item__square--active {
152
+ background: #aeb7e2;
153
+ background: #393d79;
154
+ }
155
+ .eds-stepper__item__square--inactive {
156
+ color: #656782;
157
+ background: #e9e9e9;
158
+ }
159
+ .eds-contrast .eds-stepper__item__square--inactive {
160
+ color: #aeb7e2;
161
+ background: #393d79;
162
+ }
163
+ .eds-stepper__item__square--has-been {
164
+ color: inherit;
165
+ background: #181c56;
166
+ }
167
+ .eds-contrast .eds-stepper__item__square--has-been {
168
+ background: #aeb7e2;
99
169
  }
100
170
  /* DO NOT CHANGE!*/
101
171
  /* This file is automatically generated from @entur/tokens! Changes will be overwritten. */
@@ -319,211 +389,6 @@
319
389
  }
320
390
  /* DO NOT CHANGE!*/
321
391
  /* This file is automatically generated from @entur/tokens! Changes will be overwritten. */
322
- .eds-stepper {
323
- display: flex;
324
- flex-direction: row;
325
- }
326
- .eds-stepper__item__container {
327
- cursor: pointer;
328
- font-family: inherit;
329
- text-transform: none;
330
- -webkit-appearance: none;
331
- -moz-appearance: none;
332
- appearance: none;
333
- background: none;
334
- border: none;
335
- margin: 0;
336
- padding: 0;
337
- align-items: inherit;
338
- display: flex;
339
- flex-grow: 1;
340
- flex-basis: 0;
341
- flex-direction: column;
342
- margin-left: 0.25rem;
343
- }
344
- .eds-stepper__item__container--non-interactive {
345
- cursor: default;
346
- }
347
- .eds-stepper__item__container:focus {
348
- outline-offset: 0.125rem;
349
- outline: none;
350
- box-shadow: 0 0 0 0.125rem #ffffff, 0 0 0 0.25rem #181c56;
351
- }
352
- .eds-contrast .eds-stepper__item__container:focus {
353
- box-shadow: 0 0 0 0.125rem #181c56, 0 0 0 0.25rem #ffffff;
354
- }
355
- .eds-stepper__item__container:first-child {
356
- margin-left: 0;
357
- }
358
- .eds-stepper__item__label {
359
- cursor: inherit;
360
- flex-grow: 1;
361
- flex-direction: column;
362
- text-align: center;
363
- font-size: 0.875rem;
364
- padding: 0.25rem 1rem;
365
- }
366
- .eds-stepper__item__label--active {
367
- font-weight: 600;
368
- }
369
- .eds-stepper__item__label.eds-stepper__item__label--active {
370
- color: #181c56;
371
- }
372
- .eds-contrast .eds-stepper__item__label.eds-stepper__item__label--active {
373
- color: #ffffff;
374
- }
375
- .eds-stepper__item__label.eds-stepper__item__label--has-been {
376
- color: #181c56;
377
- }
378
- .eds-contrast .eds-stepper__item__label.eds-stepper__item__label--has-been {
379
- color: #ffffff;
380
- }
381
- .eds-stepper__item__square {
382
- height: 0.5rem;
383
- }
384
- .eds-stepper__item__square--active {
385
- color: inherit;
386
- background: #e9e9e9;
387
- position: relative;
388
- }
389
- .eds-stepper__item__square--active:before {
390
- background: #181c56;
391
- content: "";
392
- position: absolute;
393
- right: calc(50% - 0.2rem);
394
- border-radius: 0.0625rem;
395
- bottom: 0.0625rem;
396
- width: calc(
397
- 0.5rem - 0.125rem - 0.01rem
398
- );
399
- height: calc(
400
- 0.5rem - 0.125rem - 0.01rem
401
- );
402
- transform: rotate(45deg);
403
- }
404
- .eds-contrast .eds-stepper__item__square--active:before {
405
- border-left-color: #aeb7e2;
406
- border-left-color: #aeb7e2;
407
- }
408
- .eds-stepper__item__square--active:after {
409
- content: "";
410
- position: absolute;
411
- left: 0;
412
- bottom: 0;
413
- width: 50%;
414
- height: 0.5rem;
415
- background: #181c56;
416
- }
417
- .eds-contrast .eds-stepper__item__square--active:after {
418
- background: #aeb7e2;
419
- }
420
- .eds-contrast .eds-stepper__item__square--active {
421
- background: #aeb7e2;
422
- background: #393d79;
423
- }
424
- .eds-stepper__item__square--inactive {
425
- color: #656782;
426
- background: #e9e9e9;
427
- }
428
- .eds-contrast .eds-stepper__item__square--inactive {
429
- color: #aeb7e2;
430
- background: #393d79;
431
- }
432
- .eds-stepper__item__square--has-been {
433
- color: inherit;
434
- background: #181c56;
435
- }
436
- .eds-contrast .eds-stepper__item__square--has-been {
437
- background: #aeb7e2;
438
- }
439
- /* DO NOT CHANGE!*/
440
- /* This file is automatically generated from @entur/tokens! Changes will be overwritten. */
441
- .eds-overflow-menu__item {
442
- -webkit-appearance: none;
443
- -moz-appearance: none;
444
- appearance: none;
445
- border: none;
446
- font-size: 0.875rem;
447
- font-family: inherit;
448
- color: var(--primary-text-color);
449
- background: #f8f8f8;
450
- display: block;
451
- height: 3rem;
452
- cursor: pointer;
453
- width: 100%;
454
- line-height: 1.375rem;
455
- text-align: left;
456
- padding: 0.75rem 1rem;
457
- opacity: 1;
458
- }
459
- .eds-contrast .eds-overflow-menu__item {
460
- color: #181c56;
461
- }
462
- .eds-overflow-menu__item.eds-overflow-menu__item--disabled {
463
- background: #e9e9e9;
464
- color: #949494;
465
- }
466
- .eds-contrast .eds-overflow-menu__item.eds-overflow-menu__item--disabled {
467
- background: #e9e9e9;
468
- color: #949494;
469
- }
470
- .eds-overflow-menu__item.eds-overflow-menu__item--disabled:hover {
471
- cursor: not-allowed;
472
- background: #e9e9e9;
473
- color: #949494;
474
- }
475
- .eds-overflow-menu__item .eds-icon {
476
- margin-right: 0.75rem;
477
- }
478
- .eds-overflow-menu__item:hover, .eds-overflow-menu__item:focus, .eds-overflow-menu__item[data-selected] {
479
- background: #d1d4e3;
480
- }
481
- .eds-overflow-menu__item:focus {
482
- outline: none;
483
- }
484
-
485
- .eds-overflow-menu__item + .eds-overflow-menu__item {
486
- border-top: 0.0625rem solid #e9e9e9;
487
- }
488
-
489
- .eds-overflow-menu__menu-list[data-reach-menu-list] {
490
- border: 0.0625rem solid #e9e9e9;
491
- border-radius: 0.25rem;
492
- box-shadow: 0 0.0625rem 0.1875rem rgba(0, 0, 0, 0.25);
493
- overflow: hidden;
494
- }
495
- .eds-overflow-menu__menu-list[data-reach-menu-list]:focus {
496
- outline: none;
497
- }
498
- .eds-overflow-menu__menu-list[data-reach-menu-list].eds-contrast {
499
- box-shadow: 0 0.0625rem 0.1875rem rgb(57, 61, 121);
500
- }
501
-
502
- .eds-overflow-menu__menu-list[data-reach-menu-list],
503
- .eds-overflow-menu__menu-list[data-reach-menu-items] {
504
- animation: slide-in 0.2s ease-in-out;
505
- }
506
-
507
- @keyframes slide-in {
508
- 0% {
509
- opacity: 0;
510
- transform: translateY(0.5rem);
511
- }
512
- 100% {
513
- opacity: 1;
514
- transform: translateY(0);
515
- }
516
- }
517
- [data-reach-menu-popover] {
518
- position: absolute;
519
- z-index: 30;
520
- }
521
- [data-reach-menu-popover] .eds-overflow-menu__menu-list--left {
522
- position: relative;
523
- right: calc(100% - 2rem);
524
- }
525
- /* DO NOT CHANGE!*/
526
- /* This file is automatically generated from @entur/tokens! Changes will be overwritten. */
527
392
  .eds-pagination {
528
393
  align-items: center;
529
394
  display: flex;
@@ -682,3 +547,138 @@
682
547
  appearance: none;
683
548
  margin: 0;
684
549
  }
550
+ /* DO NOT CHANGE!*/
551
+ /* This file is automatically generated from @entur/tokens! Changes will be overwritten. */
552
+ .eds-top-navigation-item {
553
+ --show-active-line: 0;
554
+ display: inline-block;
555
+ cursor: pointer;
556
+ color: inherit;
557
+ text-decoration: none;
558
+ position: relative;
559
+ padding: 1rem;
560
+ min-width: 5rem;
561
+ width: -moz-fit-content;
562
+ width: fit-content;
563
+ text-align: center;
564
+ font-family: inherit;
565
+ font-size: 1rem;
566
+ font-weight: 600;
567
+ }
568
+ .eds-top-navigation-item::after {
569
+ content: "";
570
+ display: block;
571
+ bottom: 1rem;
572
+ height: 0.1875rem;
573
+ width: 0;
574
+ margin: 0 auto;
575
+ opacity: var(--show-active-line);
576
+ background: #ff5959;
577
+ transition: width ease-in-out 0.2s, opacity ease-in-out 0.2s;
578
+ }
579
+ .eds-top-navigation-item:focus {
580
+ outline-offset: 0.125rem;
581
+ outline: none;
582
+ box-shadow: 0 0 0 0.125rem #ffffff, 0 0 0 0.25rem #181c56;
583
+ }
584
+ .eds-contrast .eds-top-navigation-item:focus {
585
+ box-shadow: 0 0 0 0.125rem #181c56, 0 0 0 0.25rem #ffffff;
586
+ }
587
+ .eds-top-navigation-item:hover {
588
+ --show-active-line: 1;
589
+ }
590
+ .eds-top-navigation-item:hover::after {
591
+ width: 2rem;
592
+ }
593
+ .eds-top-navigation-item--active {
594
+ --show-active-line: 1;
595
+ }
596
+ .eds-top-navigation-item--active::after {
597
+ width: 2rem;
598
+ }
599
+ /* DO NOT CHANGE!*/
600
+ /* This file is automatically generated from @entur/tokens! Changes will be overwritten. */
601
+ .eds-overflow-menu__item {
602
+ -webkit-appearance: none;
603
+ -moz-appearance: none;
604
+ appearance: none;
605
+ border: none;
606
+ font-size: 0.875rem;
607
+ font-family: inherit;
608
+ color: var(--primary-text-color);
609
+ background: #f8f8f8;
610
+ display: block;
611
+ height: 3rem;
612
+ cursor: pointer;
613
+ width: 100%;
614
+ line-height: 1.375rem;
615
+ text-align: left;
616
+ padding: 0.75rem 1rem;
617
+ opacity: 1;
618
+ }
619
+ .eds-contrast .eds-overflow-menu__item {
620
+ color: #181c56;
621
+ }
622
+ .eds-overflow-menu__item.eds-overflow-menu__item--disabled {
623
+ background: #e9e9e9;
624
+ color: #949494;
625
+ }
626
+ .eds-contrast .eds-overflow-menu__item.eds-overflow-menu__item--disabled {
627
+ background: #e9e9e9;
628
+ color: #949494;
629
+ }
630
+ .eds-overflow-menu__item.eds-overflow-menu__item--disabled:hover {
631
+ cursor: not-allowed;
632
+ background: #e9e9e9;
633
+ color: #949494;
634
+ }
635
+ .eds-overflow-menu__item .eds-icon {
636
+ margin-right: 0.75rem;
637
+ }
638
+ .eds-overflow-menu__item:hover, .eds-overflow-menu__item:focus, .eds-overflow-menu__item[data-selected] {
639
+ background: #d1d4e3;
640
+ }
641
+ .eds-overflow-menu__item:focus {
642
+ outline: none;
643
+ }
644
+
645
+ .eds-overflow-menu__item + .eds-overflow-menu__item {
646
+ border-top: 0.0625rem solid #e9e9e9;
647
+ }
648
+
649
+ .eds-overflow-menu__menu-list[data-reach-menu-list] {
650
+ border: 0.0625rem solid #e9e9e9;
651
+ border-radius: 0.25rem;
652
+ box-shadow: 0 0.0625rem 0.1875rem rgba(0, 0, 0, 0.25);
653
+ overflow: hidden;
654
+ }
655
+ .eds-overflow-menu__menu-list[data-reach-menu-list]:focus {
656
+ outline: none;
657
+ }
658
+ .eds-overflow-menu__menu-list[data-reach-menu-list].eds-contrast {
659
+ box-shadow: 0 0.0625rem 0.1875rem rgb(57, 61, 121);
660
+ }
661
+
662
+ .eds-overflow-menu__menu-list[data-reach-menu-list],
663
+ .eds-overflow-menu__menu-list[data-reach-menu-items] {
664
+ animation: slide-in 0.2s ease-in-out;
665
+ }
666
+
667
+ @keyframes slide-in {
668
+ 0% {
669
+ opacity: 0;
670
+ transform: translateY(0.5rem);
671
+ }
672
+ 100% {
673
+ opacity: 1;
674
+ transform: translateY(0);
675
+ }
676
+ }
677
+ [data-reach-menu-popover] {
678
+ position: absolute;
679
+ z-index: 30;
680
+ }
681
+ [data-reach-menu-popover] .eds-overflow-menu__menu-list--left {
682
+ position: relative;
683
+ right: calc(100% - 2rem);
684
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@entur/menu",
3
- "version": "4.1.31",
3
+ "version": "4.1.33",
4
4
  "license": "EUPL-1.2",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/menu.esm.js",
@@ -27,17 +27,17 @@
27
27
  "react-dom": ">=16.8.0"
28
28
  },
29
29
  "dependencies": {
30
- "@entur/a11y": "^0.2.59",
31
- "@entur/button": "^3.0.0",
32
- "@entur/expand": "^3.3.37",
33
- "@entur/icons": "^6.0.0",
34
- "@entur/layout": "^2.1.23",
35
- "@entur/tokens": "^3.8.0",
36
- "@entur/typography": "^1.7.11",
37
- "@entur/utils": "^0.5.5",
30
+ "@entur/a11y": "^0.2.61",
31
+ "@entur/button": "^3.0.2",
32
+ "@entur/expand": "^3.3.39",
33
+ "@entur/icons": "^6.0.1",
34
+ "@entur/layout": "^2.1.25",
35
+ "@entur/tokens": "^3.8.1",
36
+ "@entur/typography": "^1.7.13",
37
+ "@entur/utils": "^0.6.0",
38
38
  "@reach/menu-button": "^0.16.1",
39
39
  "@reach/polymorphic": "0.18.0",
40
40
  "classnames": "^2.3.1"
41
41
  },
42
- "gitHead": "48cdba2e353c9311d52550a98c6b025deb7b8270"
42
+ "gitHead": "34cd9b50251daa4fed6ec367451c5403162145bc"
43
43
  }