@nice-digital/nds-horizontal-nav 1.1.17-alpha.0 → 2.0.0-alpha.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/package.json +5 -5
- package/scss/horizontal-nav.scss +40 -25
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nice-digital/nds-horizontal-nav",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "2.0.0-alpha.0",
|
|
4
4
|
"description": "Horizontal navigation component for the NICE Design System",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"navigation"
|
|
@@ -34,16 +34,16 @@
|
|
|
34
34
|
"url": "https://github.com/nice-digital/nice-design-system/issues"
|
|
35
35
|
},
|
|
36
36
|
"dependencies": {
|
|
37
|
-
"@nice-digital/nds-core": "^
|
|
37
|
+
"@nice-digital/nds-core": "^2.0.0-alpha.0",
|
|
38
38
|
"classnames": "^2.2.6",
|
|
39
39
|
"prop-types": "^15.7.2"
|
|
40
40
|
},
|
|
41
41
|
"peerDependencies": {
|
|
42
|
-
"react": "^16 || ^17",
|
|
43
|
-
"react-dom": "^16 || ^17"
|
|
42
|
+
"react": "^16 || ^17 || ^18",
|
|
43
|
+
"react-dom": "^16 || ^17 || ^18"
|
|
44
44
|
},
|
|
45
45
|
"devDependencies": {
|
|
46
46
|
"@babel/cli": "^7.5.0"
|
|
47
47
|
},
|
|
48
|
-
"gitHead": "
|
|
48
|
+
"gitHead": "66fbcb1c0c01b0afc6b51b0f3fe4719be92996b0"
|
|
49
49
|
}
|
package/scss/horizontal-nav.scss
CHANGED
|
@@ -4,74 +4,89 @@
|
|
|
4
4
|
|
|
5
5
|
// stylelint-disable no-descending-specificity
|
|
6
6
|
|
|
7
|
-
@
|
|
7
|
+
@use '@nice-digital/nds-core/scss/colours';
|
|
8
|
+
@use '@nice-digital/nds-core/scss/spacing';
|
|
9
|
+
@use '@nice-digital/nds-core/scss/media-queries';
|
|
10
|
+
@use '@nice-digital/nds-core/scss/utils';
|
|
11
|
+
@use '@nice-digital/nds-core/scss/visibility';
|
|
8
12
|
|
|
9
13
|
.horizontal-nav {
|
|
10
|
-
@include
|
|
11
|
-
margin-bottom: rem(
|
|
14
|
+
@include visibility.hide-print;
|
|
15
|
+
margin-bottom: utils.rem(spacing.$large);
|
|
12
16
|
&__list {
|
|
13
17
|
align-items: stretch;
|
|
14
18
|
display: flex;
|
|
15
|
-
flex-
|
|
16
|
-
flex-wrap: wrap;
|
|
19
|
+
flex-flow: column wrap;
|
|
17
20
|
list-style: none;
|
|
18
21
|
margin: 0;
|
|
19
22
|
max-width: 100%;
|
|
20
|
-
|
|
21
|
-
|
|
23
|
+
|
|
24
|
+
@include media-queries.mq($from: sm) {
|
|
25
|
+
border-bottom: 3px solid colours.$horizontal-nav-list-border;
|
|
22
26
|
flex-direction: row;
|
|
23
27
|
}
|
|
24
28
|
}
|
|
29
|
+
|
|
25
30
|
&__item {
|
|
26
31
|
margin: 0;
|
|
32
|
+
|
|
27
33
|
&:first-of-type {
|
|
28
34
|
margin-left: 0;
|
|
29
35
|
}
|
|
30
|
-
|
|
36
|
+
|
|
37
|
+
@include media-queries.mq($from: sm) {
|
|
31
38
|
align-items: stretch;
|
|
32
39
|
display: flex;
|
|
33
|
-
margin: 0 rem(
|
|
40
|
+
margin: 0 utils.rem(spacing.$small);
|
|
34
41
|
text-align: center;
|
|
35
42
|
}
|
|
36
|
-
|
|
37
|
-
|
|
43
|
+
|
|
44
|
+
@include media-queries.mq($until: sm) {
|
|
45
|
+
border-top: 1px solid colours.$border;
|
|
38
46
|
&:first-of-type {
|
|
39
47
|
border-top: none;
|
|
40
48
|
}
|
|
41
49
|
}
|
|
42
50
|
}
|
|
51
|
+
|
|
43
52
|
&__link {
|
|
44
53
|
display: block;
|
|
45
54
|
line-height: 1em;
|
|
46
55
|
margin-bottom: -1px; // to ensure there's no rendered gap between the bottom border and the border across the page
|
|
47
|
-
padding: rem(
|
|
56
|
+
padding: utils.rem(spacing.$medium);
|
|
48
57
|
text-decoration: none;
|
|
58
|
+
|
|
49
59
|
&:hover {
|
|
50
60
|
text-decoration: underline;
|
|
51
61
|
}
|
|
62
|
+
|
|
52
63
|
&[aria-current='true'] {
|
|
53
|
-
background-color:
|
|
54
|
-
border-bottom: 4px solid
|
|
55
|
-
color:
|
|
64
|
+
background-color: colours.$horizontal-nav-current-link-background;
|
|
65
|
+
border-bottom: 4px solid colours.$horizontal-nav-current-link-border;
|
|
66
|
+
color: colours.$horizontal-nav-current-link;
|
|
56
67
|
font-weight: bold;
|
|
57
|
-
@include mq($from: md) {
|
|
68
|
+
@include media-queries.mq($from: md) {
|
|
58
69
|
background-color: unset;
|
|
59
70
|
}
|
|
60
71
|
}
|
|
61
|
-
|
|
72
|
+
|
|
73
|
+
@include media-queries.mq($until: sm) {
|
|
62
74
|
&:active {
|
|
63
|
-
background-color:
|
|
64
|
-
color:
|
|
75
|
+
background-color: colours.$horizontal-nav-active-link-mobile-background;
|
|
76
|
+
color: colours.$horizontal-nav-active-link-mobile;
|
|
65
77
|
}
|
|
66
78
|
}
|
|
67
|
-
|
|
68
|
-
|
|
79
|
+
|
|
80
|
+
@include media-queries.mq($from: sm) {
|
|
81
|
+
padding: utils.rem(spacing.$medium) utils.rem(spacing.$small);
|
|
69
82
|
}
|
|
70
|
-
|
|
71
|
-
|
|
83
|
+
|
|
84
|
+
@include media-queries.mq($from: md) {
|
|
85
|
+
padding: utils.rem(spacing.$medium);
|
|
72
86
|
}
|
|
73
87
|
}
|
|
74
|
-
|
|
75
|
-
|
|
88
|
+
|
|
89
|
+
@include media-queries.mq($until: sm) {
|
|
90
|
+
border: 1px solid colours.$border;
|
|
76
91
|
}
|
|
77
92
|
}
|