@ilo-org/styles 1.7.3 → 1.8.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 CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@ilo-org/styles",
3
3
  "description": "Styles for products using ILO's Design System",
4
- "version": "1.7.3",
4
+ "version": "1.8.0",
5
5
  "repository": {
6
6
  "type": "git",
7
7
  "url": "https://github.com/international-labour-organization/designsystem.git",
@@ -38,9 +38,9 @@
38
38
  "author": "@justintemps, @johnpauldavis, @avrilpearl, @ghlost",
39
39
  "license": "Apache-2.0",
40
40
  "dependencies": {
41
- "@ilo-org/fonts": "1.0.0",
42
41
  "@ilo-org/icons": "2.1.0",
43
- "@ilo-org/themes": "0.9.1"
42
+ "@ilo-org/themes": "0.9.1",
43
+ "@ilo-org/fonts": "1.0.0"
44
44
  },
45
45
  "devDependencies": {
46
46
  "cssnano": "^7.0.6",
@@ -1,12 +1,13 @@
1
1
  @use "../tokens" as *;
2
2
  @use "../functions" as *;
3
3
  @import "../mixins";
4
+ @import "../animations";
4
5
 
5
6
  .ilo--language-toggle {
6
7
  --ilo--language-toggle-color: var(--ilo-color-white);
7
- --ilo--language-toggle-color-hover: var(--ilo-color-blue);
8
+ --ilo--language-toggle-color-hover: var(--ilo-color-white);
8
9
  --ilo--language-toggle-bg: transparent;
9
- --ilo--language-toggle-bg-hover: transparent;
10
+ --ilo--language-toggle-bg-hover: var(--ilo-color-blue-dark);
10
11
 
11
12
  &__theme {
12
13
  &__dark {
@@ -15,16 +16,13 @@
15
16
  }
16
17
  }
17
18
 
18
- &:hover,
19
- &__open {
20
- --ilo--language-toggle-color: var(--ilo--language-toggle-color-hover);
21
- --ilo--language-toggle-bg: var(--ilo--language-toggle-bg-hover);
22
- }
23
-
24
19
  display: inline-block;
20
+ height: 100%;
25
21
 
26
22
  &--container {
27
- // Button unsets to perserve accessibility
23
+ @include globaltransition("background-color, color");
24
+
25
+ height: 100%;
28
26
  background: none;
29
27
  border: none;
30
28
  padding: 0;
@@ -35,16 +33,19 @@
35
33
  box-shadow: none;
36
34
  appearance: none;
37
35
  cursor: pointer;
38
-
39
36
  display: flex;
40
37
  align-items: center;
41
38
  gap: px-to-rem(4px);
42
39
  cursor: pointer;
43
40
  width: fit-content;
44
41
  background-color: var(--ilo--language-toggle-bg);
42
+ color: var(--ilo--language-toggle-color);
45
43
 
46
- &:hover {
47
- background-color: var(--ilo--language-toggle-bg-hover);
44
+ &:hover,
45
+ &:focus,
46
+ &__open {
47
+ --ilo--language-toggle-color: var(--ilo--language-toggle-color-hover);
48
+ --ilo--language-toggle-bg: var(--ilo--language-toggle-bg-hover);
48
49
  }
49
50
  }
50
51
 
@@ -66,8 +67,6 @@
66
67
 
67
68
  &--action {
68
69
  color: var(--ilo--language-toggle-color);
69
-
70
- //move this when the new typography is ready ##896
71
70
  font-family: var(--ilo-fonts-display);
72
71
  font-weight: 700;
73
72
  font-size: px-to-rem(14px);
@@ -94,5 +93,9 @@
94
93
  visibility: visible;
95
94
  transform: translateY(0);
96
95
  }
96
+
97
+ &:focus {
98
+ outline: none;
99
+ }
97
100
  }
98
101
  }
@@ -40,8 +40,9 @@
40
40
  top: 50%;
41
41
  left: 50%;
42
42
  transform: translate(-50%, -50%);
43
- height: auto;
43
+ height: 100%;
44
44
  width: 100%;
45
+ object-fit: cover;
45
46
  }
46
47
  }
47
48
 
@@ -56,7 +57,14 @@
56
57
  #{$self}--title {
57
58
  @include typography("heading-3");
58
59
  margin-bottom: spacing(6);
59
- color: var(--ilo-color-blue-dark);
60
+
61
+ #{$self}__theme__dark & {
62
+ color: var(--ilo-color-blue-dark);
63
+ }
64
+
65
+ #{$self}__theme__light & {
66
+ color: var(--ilo-color-white);
67
+ }
60
68
  }
61
69
 
62
70
  #{$self}--area {
@@ -78,8 +86,12 @@
78
86
  display: flex;
79
87
  flex-flow: row nowrap;
80
88
  justify-content: flex-start;
81
- align-items: center;
89
+ align-items: flex-start;
82
90
  gap: spacing(2);
91
+
92
+ .ilo--icon {
93
+ flex: 0 0 20px;
94
+ }
83
95
  }
84
96
 
85
97
  &#{$self}__size {
@@ -35,35 +35,20 @@
35
35
  cursor: pointer;
36
36
 
37
37
  &-logo {
38
- display: flex;
39
- align-items: center;
40
38
  height: px-to-rem(38px);
41
- padding-inline-end: spacing(4);
42
- border-right: 1px solid var(--ilo-color-white);
43
-
44
- [dir="rtl"] & {
45
- padding-inline-start: spacing(4);
46
- border-right: none;
47
- border-left: 1px solid var(--ilo-color-white);
48
- }
39
+ width: auto;
49
40
 
50
41
  img {
51
42
  height: 100%;
52
43
  }
53
44
  }
54
-
55
- &-name {
56
- padding-inline-start: spacing(4);
57
- color: var(--ilo-color-white);
58
- @include typography("heading-3");
59
- font-size: px-to-rem(16px); //Designs have wrong config
60
- }
61
45
  }
62
46
 
63
47
  &__menu {
64
48
  display: flex;
65
49
  align-items: center;
66
- gap: px-to-rem(48px);
50
+ height: 100%;
51
+ // gap: px-to-rem(48px);
67
52
 
68
53
  @include breakpoint("lg", true) {
69
54
  display: none;
@@ -113,8 +98,6 @@
113
98
  height: inherit;
114
99
  width: 100%;
115
100
  display: flex;
116
- gap: px-to-rem(12px);
117
- padding-inline: spacing(3);
118
101
  align-items: center;
119
102
  }
120
103
 
@@ -126,34 +109,46 @@
126
109
  display: flex;
127
110
  align-items: center;
128
111
  text-wrap: nowrap;
112
+ padding-inline: spacing(3);
129
113
 
130
- &:hover {
131
- color: var(--ilo-color-blue);
114
+ &:hover,
115
+ &:focus {
116
+ background-color: var(--ilo-color-blue-dark);
117
+ color: var(--ilo-color-white);
132
118
  }
133
119
  }
134
120
 
135
121
  &-language {
136
- .ilo--language-toggle__theme__dark {
137
- --ilo--language-toggle-color-hover: var(--ilo-color-blue);
138
- }
139
122
  position: relative;
140
123
  height: 100%;
141
124
  display: flex;
142
125
  align-items: center;
126
+
127
+ button {
128
+ padding-inline: spacing(3);
129
+ }
143
130
  }
144
131
 
145
132
  &-search {
146
133
  --ilo-subsite-nav-widget-bar-search-color: var(--ilo-color-blue-dark);
147
134
  height: 100%;
148
- display: flex;
135
+ display: inline-flex;
149
136
  align-items: center;
150
- width: px-to-rem(24px);
151
- height: px-to-rem(24px);
137
+ padding-inline: spacing(3);
152
138
 
153
- @include icon("search", var(--ilo-subsite-nav-widget-bar-search-color));
139
+ &:after {
140
+ content: "";
141
+ display: flex;
142
+ align-items: center;
143
+ width: px-to-rem(24px);
144
+ height: px-to-rem(24px);
145
+ @include icon("search", var(--ilo-subsite-nav-widget-bar-search-color));
146
+ }
154
147
 
155
- &:hover {
156
- --ilo-subsite-nav-widget-bar-search-color: var(--ilo-color-blue);
148
+ &:hover,
149
+ &:focus {
150
+ --ilo-subsite-nav-widget-bar-search-color: var(--ilo-color-white);
151
+ background-color: var(--ilo-color-blue-dark);
157
152
  }
158
153
  }
159
154
  }
@@ -83,18 +83,9 @@
83
83
  text-decoration: none;
84
84
  color: var(--ilo-color-white);
85
85
 
86
- &:hover {
87
- background-color: var(--ilo-color-blue-lighter);
88
- color: var(--ilo-color-blue);
89
- }
90
- }
91
-
92
- &__language {
93
- &:hover {
94
- height: 100%;
95
- display: flex;
96
- align-items: center;
97
- background-color: var(--ilo-color-blue-lighter);
86
+ &:hover,
87
+ &:focus {
88
+ background-color: var(--ilo-color-blue-dark);
98
89
  }
99
90
  }
100
91
  }
@@ -133,8 +124,8 @@
133
124
 
134
125
  &__logo img {
135
126
  height: 100%;
136
- padding-inline-end: spacing(4);
137
- border-inline-end: 1px solid var(--ilo-color-blue-dark);
127
+ height: px-to-rem(72px);
128
+ width: auto;
138
129
  }
139
130
 
140
131
  &__name {
@@ -169,6 +160,7 @@
169
160
  }
170
161
 
171
162
  &-menu {
163
+ height: 100%;
172
164
  @include breakpoint("lg", true) {
173
165
  display: none;
174
166
  }
@@ -185,20 +177,13 @@
185
177
 
186
178
  &__logo {
187
179
  padding-inline-end: spacing(4);
188
- border-inline-end: 1px solid var(--ilo-color-white);
189
180
  height: px-to-rem(38px);
190
181
 
191
182
  img {
192
183
  height: 100%;
184
+ width: auto;
193
185
  }
194
186
  }
195
-
196
- &__name {
197
- padding-inline-start: spacing(4);
198
- color: var(--ilo-color-white);
199
- @include typography("heading-3");
200
- font-size: px-to-rem(16px); //Designs have wrong config
201
- }
202
187
  }
203
188
 
204
189
  &-search {
@@ -222,9 +207,10 @@
222
207
  cursor: pointer;
223
208
  }
224
209
 
225
- &:hover {
226
- --ilo-subsite_nav_complex-search-color: var(--ilo-color-blue);
227
- background-color: var(--ilo-color-blue-lighter);
210
+ &:hover,
211
+ &:focus {
212
+ --ilo-subsite_nav_complex-search-color: var(--ilo-color-white);
213
+ background-color: var(--ilo-color-blue-dark);
228
214
  }
229
215
  }
230
216
 
@@ -2,6 +2,7 @@
2
2
  @use "../../functions" as *;
3
3
  @import "../../mixins";
4
4
  @import "../../config";
5
+ @import "../../animations";
5
6
 
6
7
  .ilo--nav-menu {
7
8
  display: flex;
@@ -14,16 +15,13 @@
14
15
 
15
16
  &__list {
16
17
  display: flex;
17
- gap: spacing(12);
18
18
  align-items: center;
19
-
20
- @include breakpoint("xl", true) {
21
- gap: spacing(6);
22
- }
19
+ height: 100%;
23
20
  }
24
21
 
25
22
  &__item {
26
23
  display: flex;
24
+ height: 100%;
27
25
  }
28
26
 
29
27
  &__link {
@@ -33,29 +31,24 @@
33
31
  position: relative;
34
32
  padding-bottom: 2px;
35
33
  text-wrap: nowrap;
36
-
37
- &::after {
38
- content: "";
39
- position: absolute;
40
- bottom: 0;
41
- left: 0;
42
- width: 0;
43
- height: 2px;
44
- background-color: var(--ilo-color-white);
45
- transition: width 0.3s ease;
46
- }
34
+ display: flex;
35
+ flex-direction: column;
36
+ justify-content: center;
37
+ @include globaltransition("background-color");
38
+ padding-inline: spacing(6);
47
39
 
48
40
  &--active,
49
41
  &:hover,
50
42
  &:focus,
51
43
  &:active {
52
- &::after {
53
- width: 100%;
54
- }
44
+ background-color: var(--ilo-color-blue-dark);
45
+ outline: none;
55
46
  }
56
47
  }
57
48
 
58
49
  &__more {
50
+ @include globaltransition("background-color, border-color");
51
+
59
52
  @include breakpoint("lg", true) {
60
53
  display: none;
61
54
  }
@@ -82,10 +75,11 @@
82
75
 
83
76
  &--open,
84
77
  &:hover,
78
+ &:focus,
85
79
  &:active {
86
- --ilo-nav_menu-icon-color: var(--ilo-color-blue);
87
- background-color: var(--ilo-color-blue-lighter);
88
- color: var(--ilo-color-blue);
80
+ outline: none;
81
+ border-color: var(--ilo-color-blue-dark);
82
+ background-color: var(--ilo-color-blue-dark);
89
83
  }
90
84
  }
91
85
  }
@@ -7,34 +7,18 @@
7
7
  &__branding {
8
8
  display: flex;
9
9
  align-items: center;
10
- height: px-to-rem(38px);
11
10
  }
12
11
 
13
12
  &__logo {
14
13
  display: flex;
15
14
  align-items: center;
16
- padding-inline-end: spacing(4);
17
- border-right: 1px solid var(--ilo-color-blue-dark);
18
-
19
- [dir="rtl"] & {
20
- padding-inline-start: spacing(4);
21
- border-right: none;
22
- border-left: 1px solid var(--ilo-color-blue-dark);
23
- }
15
+ height: px-to-rem(38px);
24
16
 
25
17
  img {
26
18
  height: 100%;
27
19
  }
28
20
  }
29
21
 
30
- &__name {
31
- padding-inline-start: spacing(4);
32
- font-weight: 700;
33
- font-size: px-to-rem(13);
34
- line-height: 125%;
35
- color: var(--ilo-color-blue-dark);
36
- }
37
-
38
22
  &__widgets {
39
23
  &-search {
40
24
  padding: spacing(4) 0;