@ons/design-system 48.0.3 → 49.0.0

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/scss/main.scss CHANGED
@@ -24,7 +24,6 @@
24
24
  @import '../components/fieldset/fieldset';
25
25
  @import '../components/find-a-support-centre/find-a-support-centre';
26
26
  @import '../components/footer/footer';
27
- @import '../components/header/header-nav';
28
27
  @import '../components/header/header';
29
28
  @import '../components/hero/hero';
30
29
  @import '../components/icons/icons';
@@ -38,6 +37,7 @@
38
37
  @import '../components/message/message';
39
38
  @import '../components/metadata/metadata';
40
39
  @import '../components/modal/modal';
40
+ @import '../components/navigation/navigation';
41
41
  @import '../components/pagination/pagination';
42
42
  @import '../components/panel/panel';
43
43
  @import '../components/phase-banner/phase-banner';
@@ -1,108 +0,0 @@
1
- .ons-header-nav {
2
- position: relative;
3
- &__list {
4
- list-style: none;
5
- margin: 0;
6
- padding: 0;
7
- }
8
-
9
- &__item {
10
- border-top: 1px solid rgba(255, 255, 255, 0.5);
11
- display: block;
12
- margin: 0;
13
- padding: 0.3rem 0;
14
-
15
- @include mq(m) {
16
- border-bottom: 4px solid transparent;
17
- border-top: 0;
18
- display: inline-block;
19
- margin: 0 0 0 1rem;
20
- padding: 0 0 0.3rem;
21
- position: relative;
22
- text-align: center;
23
-
24
- &:first-child {
25
- margin-left: 0;
26
- }
27
-
28
- &--active,
29
- &:hover {
30
- border-color: $color-white;
31
- }
32
- }
33
- }
34
-
35
- &__item + &__item--secondary {
36
- border-top: 2px solid $color-white;
37
- margin-top: 0.5rem;
38
- }
39
-
40
- &__link {
41
- color: $color-white;
42
- display: block;
43
- font-size: 0.9rem;
44
- margin: 0 0.35rem;
45
- padding: 0 0.65rem;
46
- text-decoration: none;
47
-
48
- &:hover,
49
- &:focus {
50
- color: #c2ecff;
51
- text-decoration: none;
52
- }
53
-
54
- @include mq(m) {
55
- display: inline-block;
56
- font-size: 1rem;
57
- margin: 0;
58
- padding: 0;
59
-
60
- &:hover,
61
- &:focus {
62
- color: $color-white;
63
- }
64
- }
65
- }
66
-
67
- &__item--active &__link {
68
- font-weight: 700;
69
- }
70
- }
71
-
72
- .ons-header-service-nav {
73
- display: inline-block;
74
-
75
- &--mobile {
76
- background: $color-branded-tint;
77
- padding: 1rem;
78
- width: 100%;
79
- }
80
-
81
- &__list {
82
- list-style: none;
83
- margin: 0;
84
- padding: 0;
85
- }
86
-
87
- &__item {
88
- display: inline-block;
89
- margin: 0 0 0 1rem;
90
- &--mobile {
91
- display: block;
92
- margin: 0 0 0.5rem;
93
- }
94
- &:first-child {
95
- margin-left: 0;
96
- }
97
- }
98
-
99
- .ons-language-links {
100
- border-top: 1px solid $color-branded;
101
- margin: 1.5rem 0 0;
102
- padding: 1rem 0 0;
103
-
104
- &__item {
105
- margin: 0 0 0.5rem;
106
- }
107
- }
108
- }
@@ -1,31 +0,0 @@
1
- import domready from '../../js/domready';
2
-
3
- domready(async () => {
4
- const toggleMainBtn = document.querySelector('.ons-js-toggle-main');
5
- const navEl = document.querySelector('.ons-js-header-nav');
6
- const navHideClass = 'ons-u-d-no@xxs@m';
7
- const toggleServicesBtn = document.querySelector('.ons-js-toggle-services');
8
- const servicesEl = document.querySelector('.ons-js-services-mobile-nav');
9
- const servicesHideClass = 'ons-u-d-no';
10
- const toggleSearchBtn = document.querySelector('.ons-js-toggle-search');
11
- const searchEl = document.querySelector('.ons-js-header-search');
12
- const searchHideClass = 'ons-u-d-no@xs@m';
13
-
14
- if (toggleMainBtn) {
15
- const NavToggle = (await import('./header-nav')).default;
16
-
17
- new NavToggle(toggleMainBtn, navEl, navHideClass).registerEvents();
18
- }
19
-
20
- if (toggleSearchBtn) {
21
- const searchToggle = (await import('./header-nav')).default;
22
-
23
- new searchToggle(toggleSearchBtn, searchEl, searchHideClass).registerEvents();
24
- }
25
-
26
- if (toggleServicesBtn) {
27
- const servicesToggle = (await import('./header-nav')).default;
28
-
29
- new servicesToggle(toggleServicesBtn, servicesEl, servicesHideClass).registerEvents();
30
- }
31
- });