@ilo-org/styles 0.4.0 → 0.6.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": "0.4.0",
4
+ "version": "0.6.0",
5
5
  "repository": {
6
6
  "type": "git",
7
7
  "url": "https://github.com/international-labour-organization/designsystem.git",
@@ -19,8 +19,8 @@
19
19
  ],
20
20
  "dependencies": {
21
21
  "@ilo-org/fonts": "0.1.0",
22
- "@ilo-org/icons": "0.2.0",
23
- "@ilo-org/themes": "0.1.16"
22
+ "@ilo-org/icons": "0.2.1",
23
+ "@ilo-org/themes": "0.2.0"
24
24
  },
25
25
  "devDependencies": {
26
26
  "cssnano": "^5.1.13",
@@ -5,6 +5,7 @@
5
5
  .ilo--accordion {
6
6
  $transition-timing: 150ms;
7
7
  $transition-timing-long: 225ms;
8
+ $scroll-max-height: 500px;
8
9
 
9
10
  &--button {
10
11
  align-items: center;
@@ -79,6 +80,7 @@
79
80
  --height: auto;
80
81
  color: $color-ux-labels-default;
81
82
  font-family: $fonts-copy;
83
+ position: relative;
82
84
  height: 0px;
83
85
  overflow: hidden;
84
86
  transition: height $transition-timing-long ease-out,
@@ -97,6 +99,12 @@
97
99
  padding $transition-timing-long ease-out;
98
100
  }
99
101
 
102
+ &__scroll {
103
+ max-height: $scroll-max-height;
104
+ overflow-y: auto;
105
+ padding-right: px-to-rem($spacing-ui-padding-xl);
106
+ }
107
+
100
108
  &.collapsing,
101
109
  &.expanding {
102
110
  height: 0;
@@ -94,104 +94,10 @@
94
94
  margin: px-to-rem(55px) 0;
95
95
  }
96
96
 
97
- .social--headline {
98
- color: $color-base-neutrals-white;
99
- font-family: $fonts-display;
100
- font-weight: map-get($type, "weights", "label");
101
- @include font-styles("body-small");
102
- @include textmargin("margin-bottom", 28px, "body-small", "display", 0, 0);
103
- }
104
-
105
97
  .social--links {
106
- display: flex;
107
98
  margin-bottom: px-to-rem(45px);
108
99
  }
109
100
 
110
- .social--links--link {
111
- background-repeat: no-repeat;
112
- background-size: contain;
113
- border: 0;
114
- display: inline-block;
115
- height: px-to-rem(16px);
116
- margin: -1px;
117
- padding: 0;
118
- position: absolute;
119
- overflow: hidden;
120
- text-indent: -999rem;
121
- width: px-to-rem(16px);
122
-
123
- &.facebook {
124
- @include dataurlicon("facebook", $color-base-neutrals-lighter);
125
- }
126
-
127
- &.instagram {
128
- @include dataurlicon("instagram", $color-base-neutrals-lighter);
129
- }
130
-
131
- &.twitter {
132
- @include dataurlicon("twitter", $color-base-neutrals-lighter);
133
- }
134
-
135
- &.youtube {
136
- @include dataurlicon("youtube", $color-base-neutrals-lighter);
137
- }
138
-
139
- &.tiktok {
140
- @include dataurlicon("tiktok", $color-base-neutrals-lighter);
141
- }
142
-
143
- &.flickr {
144
- @include dataurlicon("flickr", $color-base-neutrals-lighter);
145
- }
146
- }
147
-
148
- .social--links--item {
149
- align-items: center;
150
- background-color: transparent;
151
- border-radius: px-to-rem(3px);
152
- display: flex;
153
- height: px-to-rem(24px);
154
- justify-content: center;
155
- margin-right: px-to-rem(20px);
156
- position: relative;
157
- width: px-to-rem(24px);
158
-
159
- &:last-of-type {
160
- margin-right: none;
161
- }
162
-
163
- &:hover,
164
- &:focus {
165
- background-color: $color-base-blue-light;
166
-
167
- .social--links--link {
168
- &.facebook {
169
- @include dataurlicon("facebook", $color-base-blue-medium);
170
- }
171
-
172
- &.instagram {
173
- @include dataurlicon("instagram", $color-base-blue-medium);
174
- }
175
-
176
- &.twitter {
177
- @include dataurlicon("twitter", $color-base-blue-medium);
178
- }
179
-
180
- &.youtube {
181
- @include dataurlicon("youtube", $color-base-blue-medium);
182
- }
183
-
184
- &.tiktok {
185
- @include dataurlicon("tiktok", $color-base-blue-medium);
186
- }
187
-
188
- &.flickr {
189
- @include dataurlicon("flickr", $color-base-blue-medium);
190
- }
191
- }
192
- }
193
- }
194
-
195
101
  .legal,
196
102
  .secondarylinks {
197
103
  color: $color-base-neutrals-medium;
@@ -364,10 +270,6 @@
364
270
  margin: 0 0 0 calc(18.9% + 64px);
365
271
  }
366
272
 
367
- .social--headline {
368
- text-align: left;
369
- }
370
-
371
273
  .ilo--button {
372
274
  align-self: start;
373
275
  justify-self: start;
@@ -396,18 +298,6 @@
396
298
  text-align: right;
397
299
  }
398
300
 
399
- .social--links {
400
- flex-direction: row-reverse;
401
- }
402
-
403
- .social--links--item:first-of-type {
404
- margin-right: 0;
405
- }
406
-
407
- .social--links--link {
408
- text-indent: 999em;
409
- }
410
-
411
301
  .legal,
412
302
  .secondarylinks {
413
303
  display: block;
@@ -157,148 +157,4 @@
157
157
  @include font-styles("headline-2");
158
158
  }
159
159
  }
160
-
161
- &--list {
162
- display: flex;
163
- flex-flow: row nowrap;
164
- justify-content: flex-start;
165
- align-items: center;
166
- gap: 24px;
167
- }
168
-
169
- // @TODO: This should really be moved out into its own component
170
- &--link {
171
- color: map-get($color, "hero", "card", "light", "link", "color");
172
- display: inline-block;
173
- overflow: hidden;
174
- padding: 0 5px;
175
- text-indent: -999px;
176
- width: 100%;
177
-
178
- &.icon {
179
- background-position: center;
180
- background-repeat: no-repeat;
181
- background-size: auto 16px;
182
- border-radius: 2px;
183
- display: inline-block;
184
- color: map-get($color, "hero", "card", "light", "icon", "color");
185
- height: 24px;
186
- width: px-to-rem(24px);
187
-
188
- &:hover {
189
- background-color: map-get(
190
- $color,
191
- "hero",
192
- "card",
193
- "light",
194
- "iconhover",
195
- "background"
196
- );
197
- transition: all 0.1s ease-in-out;
198
- }
199
-
200
- #{$c}__theme__dark,
201
- .ilo--hero-card__background__transparent & {
202
- color: map-get($color, "hero", "card", "dark", "icon", "color");
203
-
204
- &:hover {
205
- background-color: map-get(
206
- $color,
207
- "hero",
208
- "card",
209
- "dark",
210
- "iconhover",
211
- "background"
212
- );
213
- }
214
- }
215
-
216
- &--facebook {
217
- @include dataurlicon(
218
- "facebook",
219
- map-get($color, "hero", "card", "light", "icon", "color")
220
- );
221
-
222
- &:hover {
223
- @include dataurlicon(
224
- "facebook",
225
- map-get($color, "hero", "card", "light", "iconhover", "color")
226
- );
227
- }
228
-
229
- #{$c}__theme__dark &,
230
- .ilo--hero-card__background__transparent & {
231
- @include dataurlicon(
232
- "facebook",
233
- map-get($color, "hero", "card", "dark", "icon", "color")
234
- );
235
-
236
- &:hover {
237
- @include dataurlicon(
238
- "facebook",
239
- map-get($color, "hero", "card", "dark", "iconhover", "color")
240
- );
241
- }
242
- }
243
- }
244
-
245
- &--twitter {
246
- @include dataurlicon(
247
- "twitter",
248
- map-get($color, "hero", "card", "light", "icon", "color")
249
- );
250
-
251
- &:hover {
252
- @include dataurlicon(
253
- "twitter",
254
- map-get($color, "hero", "card", "light", "iconhover", "color")
255
- );
256
- }
257
-
258
- #{$c}__theme__dark &,
259
- .ilo--hero-card__background__transparent & {
260
- @include dataurlicon(
261
- "twitter",
262
- map-get($color, "hero", "card", "dark", "icon", "color")
263
- );
264
-
265
- &:hover {
266
- @include dataurlicon(
267
- "twitter",
268
- map-get($color, "hero", "card", "dark", "iconhover", "color")
269
- );
270
- }
271
- }
272
- }
273
-
274
- &--linkedin {
275
- @include dataurlicon(
276
- "linkedin",
277
- map-get($color, "hero", "card", "light", "icon", "color")
278
- );
279
-
280
- &:hover {
281
- @include dataurlicon(
282
- "linkedin",
283
- map-get($color, "hero", "card", "light", "iconhover", "color")
284
- );
285
- }
286
-
287
- #{$c}__theme__dark &,
288
- .ilo--hero-card__background__transparent & {
289
- @include dataurlicon(
290
- "linkedin",
291
- map-get($color, "hero", "card", "dark", "icon", "color")
292
- );
293
-
294
- &:hover {
295
- @include dataurlicon(
296
- "linkedin",
297
- map-get($color, "hero", "card", "dark", "iconhover", "color")
298
- );
299
- }
300
- }
301
- }
302
- }
303
- }
304
160
  }
@@ -0,0 +1,52 @@
1
+ @use "../tokens" as *;
2
+ @use "../functions" as *;
3
+ @import "../mixins";
4
+
5
+ .ilo--logo-grid {
6
+ $c: &;
7
+
8
+ &--logos {
9
+ display: flex;
10
+ flex-flow: row wrap;
11
+ grid-gap: px-to-rem(16px);
12
+ }
13
+
14
+ &--link {
15
+ text-decoration: none;
16
+ transition: background-color 0.2s ease-in-out;
17
+
18
+ #{$c}__theme__light &,
19
+ #{$c}__theme__dark & {
20
+ &:hover {
21
+ background-color: map-get($color, "ux", "background", "hover");
22
+ }
23
+ }
24
+ }
25
+
26
+ &--item {
27
+ display: flex;
28
+ align-items: center;
29
+ justify-content: center;
30
+ height: px-to-rem(134px);
31
+ flex: 100%;
32
+
33
+ @include breakpoint("small") {
34
+ flex: 0 0 px-to-rem(238px);
35
+ }
36
+
37
+ #{$c}__theme__light & {
38
+ background-color: map-get($color, "ux", "background", "highlight");
39
+ }
40
+
41
+ #{$c}__theme__dark & {
42
+ background-color: map-get($color, "ux", "background", "default");
43
+ }
44
+
45
+ img {
46
+ width: auto;
47
+ height: auto;
48
+ max-width: px-to-rem(150px);
49
+ max-height: px-to-rem(50px);
50
+ }
51
+ }
52
+ }
@@ -0,0 +1,154 @@
1
+ @use "../tokens" as *;
2
+ @use "../functions" as *;
3
+ @import "../animations";
4
+ @import "../mixins";
5
+
6
+ .ilo--social-media {
7
+ $c: &;
8
+ $default-theme: "light";
9
+ $icon-size: map-get($spacing, "icons", "icon-height-lg");
10
+
11
+ @mixin get-icon($icon, $theme: $default-theme) {
12
+ @include dataurlicon(
13
+ $icon,
14
+ map-get($color, "socialmedia", $theme, "icon", "color")
15
+ );
16
+
17
+ &:hover {
18
+ @include dataurlicon(
19
+ $icon,
20
+ map-get($color, "socialmedia", $theme, "iconhover", "color")
21
+ );
22
+ }
23
+ }
24
+
25
+ display: flex;
26
+ flex-flow: column nowrap;
27
+ align-items: flex-start;
28
+
29
+ &__justify__center {
30
+ align-items: center;
31
+ }
32
+
33
+ .right-to-left & {
34
+ .social--links {
35
+ flex-direction: row-reverse;
36
+ }
37
+
38
+ * {
39
+ text-align: right;
40
+ }
41
+ }
42
+
43
+ &--headline {
44
+ color: map-get($color, "socialmedia", $default-theme, "headline", "color");
45
+ font-family: $fonts-display;
46
+ font-weight: map-get($type, "weights", "label");
47
+ @include font-styles("body-small");
48
+ @include textmargin("margin-bottom", 28px, "body-small", "display", 0, 0);
49
+
50
+ #{$c}__theme__dark & {
51
+ color: map-get($color, "socialmedia", "dark", "headline", "color");
52
+ }
53
+ }
54
+
55
+ &--list {
56
+ display: inline-flex;
57
+ flex-flow: row wrap;
58
+ gap: map-get($spacing, "icons", "icon-padding-lg");
59
+
60
+ &--item {
61
+ display: inline-block;
62
+ overflow: hidden;
63
+ position: relative;
64
+
65
+ &--icon {
66
+ background-position: center;
67
+ background-repeat: no-repeat;
68
+ background-size: auto #{$icon-size};
69
+ text-indent: -999px;
70
+ border-radius: 2px;
71
+ display: inline-block;
72
+ height: px-to-rem($icon-size + 8px);
73
+ width: px-to-rem($icon-size + 8px);
74
+ transition: all 0.1s ease-in-out;
75
+
76
+ &:hover {
77
+ background-color: map-get(
78
+ $color,
79
+ "socialmedia",
80
+ $default-theme,
81
+ "iconhover",
82
+ "background"
83
+ );
84
+ }
85
+
86
+ #{$c}__theme__dark &:hover {
87
+ background-color: map-get(
88
+ $color,
89
+ "socialmedia",
90
+ "dark",
91
+ "iconhover",
92
+ "background"
93
+ );
94
+ }
95
+
96
+ &__facebook {
97
+ @include get-icon("facebook");
98
+
99
+ #{$c}__theme__dark & {
100
+ @include get-icon("facebook", "dark");
101
+ }
102
+ }
103
+
104
+ &__twitter {
105
+ @include get-icon("twitter");
106
+
107
+ #{$c}__theme__dark & {
108
+ @include get-icon("twitter", "dark");
109
+ }
110
+ }
111
+
112
+ &__instagram {
113
+ @include get-icon("instagram");
114
+
115
+ #{$c}__theme__dark & {
116
+ @include get-icon("instagram", "dark");
117
+ }
118
+ }
119
+
120
+ &__youtube {
121
+ @include get-icon("youtube");
122
+
123
+ #{$c}__theme__dark & {
124
+ @include get-icon("youtube", "dark");
125
+ }
126
+ }
127
+
128
+ &__linkedin {
129
+ @include get-icon("linkedin");
130
+
131
+ #{$c}__theme__dark & {
132
+ @include get-icon("linkedin", "dark");
133
+ }
134
+ }
135
+
136
+ &__flickr {
137
+ @include get-icon("flickr");
138
+
139
+ #{$c}__theme__dark & {
140
+ @include get-icon("flickr", "dark");
141
+ }
142
+ }
143
+
144
+ &__tiktok {
145
+ @include get-icon("tiktok");
146
+
147
+ #{$c}__theme__dark & {
148
+ @include get-icon("tiktok", "dark");
149
+ }
150
+ }
151
+ }
152
+ }
153
+ }
154
+ }
@@ -134,6 +134,7 @@
134
134
  }
135
135
 
136
136
  .ilo--tabs--content {
137
+ background-color: $color-base-neutrals-white;
137
138
  padding: px-to-rem($spacing-padding-5) px-to-rem($spacing-padding-3)
138
139
  px-to-rem($spacing-padding-7) px-to-rem($spacing-padding-3);
139
140
 
@@ -25,6 +25,7 @@
25
25
  @use "list";
26
26
  @use "loading";
27
27
  @use "logo";
28
+ @use "logogrid";
28
29
  @use "modal";
29
30
  @use "navigation";
30
31
  @use "notification";
@@ -41,3 +42,4 @@
41
42
  @use "tag";
42
43
  @use "tooltip";
43
44
  @use "video";
45
+ @use "socialmedia";