@ilo-org/styles 0.9.2 → 0.10.1

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 (37) hide show
  1. package/build/css/components/index.css +325 -233
  2. package/build/css/components/index.css.map +1 -1
  3. package/build/css/global.css +1 -1
  4. package/build/css/global.css.map +1 -1
  5. package/build/css/index.css +325 -233
  6. package/build/css/index.css.map +1 -1
  7. package/build/css/monorepo.css +325 -233
  8. package/build/css/monorepo.css.map +1 -1
  9. package/build/minified/index.css +1 -1
  10. package/build/minified/index.css.map +1 -1
  11. package/build/minified/monorepo.css +1 -1
  12. package/build/minified/monorepo.css.map +1 -1
  13. package/css/components/container.css +1 -0
  14. package/css/components/file-upload.css +1 -1
  15. package/css/components/footer.css +1 -1
  16. package/css/components/formcontrol.css +1 -1
  17. package/css/components/herocard.css +1 -1
  18. package/css/components/navigation.css +1 -1
  19. package/css/components/radio.css +1 -1
  20. package/css/components/socialmedia.css +1 -1
  21. package/css/components/tooltip.css +1 -1
  22. package/css/global.css.map +1 -1
  23. package/css/index.css +1 -1
  24. package/css/index.css.map +1 -1
  25. package/css/monorepo.css +1 -1
  26. package/css/monorepo.css.map +1 -1
  27. package/package.json +2 -2
  28. package/scss/components/_container.scss +11 -0
  29. package/scss/components/_file-upload.scss +5 -2
  30. package/scss/components/_footer.scss +186 -125
  31. package/scss/components/_formcontrol.scss +13 -13
  32. package/scss/components/_herocard.scss +11 -6
  33. package/scss/components/_navigation.scss +10 -10
  34. package/scss/components/_radio.scss +23 -28
  35. package/scss/components/_socialmedia.scss +10 -0
  36. package/scss/components/_tooltip.scss +2 -4
  37. package/scss/components/index.scss +1 -0
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.9.2",
4
+ "version": "0.10.1",
5
5
  "repository": {
6
6
  "type": "git",
7
7
  "url": "https://github.com/international-labour-organization/designsystem.git",
@@ -20,7 +20,7 @@
20
20
  "dependencies": {
21
21
  "@ilo-org/fonts": "0.1.0",
22
22
  "@ilo-org/icons": "0.2.1",
23
- "@ilo-org/themes": "0.4.0"
23
+ "@ilo-org/themes": "0.5.1"
24
24
  },
25
25
  "devDependencies": {
26
26
  "cssnano": "^5.1.13",
@@ -0,0 +1,11 @@
1
+ @use "../tokens" as *;
2
+ @use "../functions" as *;
3
+ @import "../animations";
4
+ @import "../mixins";
5
+
6
+ .ilo--container {
7
+ margin: auto;
8
+ max-width: $layout-max-width;
9
+ padding: 0 px-to-rem($layout-padding);
10
+ width: 100%;
11
+ }
@@ -78,10 +78,14 @@
78
78
 
79
79
  &--list {
80
80
  order: 4;
81
+ display: flex;
82
+ flex-flow: column;
83
+ padding-top: px-to-rem($spacing-padding-1);
84
+ gap: px-to-rem($spacing-padding-1);
81
85
  }
82
86
 
83
87
  &--list-item {
84
- display: inline-block;
88
+ display: block;
85
89
  background-color: $color-formelements-uploadedfile-default-background;
86
90
  @include bordervalues("uploadedfile", "formelements", "default");
87
91
  box-sizing: border-box;
@@ -91,7 +95,6 @@
91
95
  height: px-to-rem(
92
96
  map-get($spacing, "formelements", "uploadedfile", "default", "height")
93
97
  );
94
- @include spacingvalues("margin", "uploadedfile", "formelements");
95
98
  outline: none;
96
99
  @include spacingvalues("padding", "uploadedfile", "formelements");
97
100
  }
@@ -3,33 +3,89 @@
3
3
  @import "../animations";
4
4
  @import "../mixins";
5
5
 
6
+ // Properties common to the footer triangle whever they appear
7
+ @mixin footer-triangle-props {
8
+ background-size: contain;
9
+ background-repeat: no-repeat;
10
+ content: "";
11
+ height: 100%;
12
+ min-width: 409.5px;
13
+ position: absolute;
14
+ width: 28.8%;
15
+ z-index: 0;
16
+ @include dataurlicon("footertriangle", $color-base-blue-medium);
17
+ }
18
+
19
+ @mixin footer-triangle($position: bottom-right) {
20
+ // The triangle is placed as an after element on
21
+ // the main footer element on desktop and as a before
22
+ // element on mobile
23
+ @if ($position == top-right) {
24
+ &:after {
25
+ @include footer-triangle-props;
26
+ background-position: right top;
27
+ bottom: auto;
28
+ top: 0;
29
+ right: 0;
30
+ transform: scaleY(1);
31
+ }
32
+ }
33
+
34
+ @if ($position == bottom-right) {
35
+ &:before {
36
+ @include footer-triangle-props;
37
+ bottom: 0;
38
+ right: 0;
39
+ transform: scaleY(-1);
40
+ }
41
+ }
42
+
43
+ @if ($position == top-left) {
44
+ &:after {
45
+ @include footer-triangle-props;
46
+ top: 0;
47
+ left: 0;
48
+ transform: scaleY(1) scaleX(-1);
49
+ }
50
+ }
51
+
52
+ @if ($position == bottom-left) {
53
+ &:before {
54
+ @include footer-triangle-props;
55
+ bottom: 0;
56
+ left: 0;
57
+ transform: scaleY(-1) scaleX(-1);
58
+ }
59
+ }
60
+ }
61
+
6
62
  .ilo--footer {
63
+ $c: &;
64
+
7
65
  border-bottom: px-to-rem(3px) solid $color-base-neutrals-light;
66
+ background-color: $color-base-blue-dark;
67
+ position: relative;
68
+ width: 100%;
69
+ overflow: hidden;
8
70
 
9
71
  &--main {
10
- background-color: $color-base-blue-dark;
11
- border-bottom: px-to-rem(6px) solid $color-base-red-medium;
12
- padding: px-to-rem(40px) px-to-rem(32px) 0 px-to-rem(32px);
72
+ padding: px-to-rem(40px) px-to-rem(32px);
13
73
  position: relative;
14
74
 
15
- & > * {
16
- position: relative;
17
- z-index: 1;
18
- }
75
+ @include footer-triangle(bottom-right);
19
76
 
20
77
  &:after {
21
- background-size: contain;
22
- background-repeat: no-repeat;
23
- bottom: 0;
24
78
  content: "";
25
- height: 100%;
26
- min-width: 409.5px;
27
- right: 0;
79
+ border-bottom: px-to-rem(6px) solid $color-base-red-medium;
80
+ width: 200vw;
28
81
  position: absolute;
29
- transform: scaleY(-1);
30
- width: 28.8%;
31
- z-index: 0;
32
- @include dataurlicon("footertriangle", $color-base-blue-medium);
82
+ bottom: 0;
83
+ left: -100vw;
84
+ }
85
+
86
+ & > * {
87
+ position: relative;
88
+ z-index: 1;
33
89
  }
34
90
  }
35
91
 
@@ -39,8 +95,8 @@
39
95
  }
40
96
 
41
97
  &--secondary {
42
- background-color: $color-base-neutrals-white;
43
- padding: px-to-rem(36px) px-to-rem(16px) 0 px-to-rem(16px);
98
+ background-color: $color-base-neutrals-lighter;
99
+ padding-top: px-to-rem(36px);
44
100
  min-height: px-to-rem(
45
101
  map-get($spacing, "ux", "readmore", "default", "height")
46
102
  );
@@ -60,7 +116,7 @@
60
116
  "body-xxs",
61
117
  "display"
62
118
  );
63
- @include textmargin("margin-top", 22px, "body-small", "display", 0, 0);
119
+ margin-top: px-to-rem(22px);
64
120
  }
65
121
 
66
122
  &--subhead {
@@ -70,11 +126,11 @@
70
126
  margin-top: px-to-rem(10px);
71
127
  @include font-styles("body-xxs");
72
128
  line-height: px-to-rem(18.56px);
73
- @include textmargin("margin-bottom", 28px, "body-xxs", "display", 0, 0);
129
+ margin-bottom: px-to-rem(45px);
74
130
  }
75
131
 
76
132
  .address {
77
- margin-bottom: px-to-rem(42px);
133
+ margin-bottom: px-to-rem(39px);
78
134
  }
79
135
 
80
136
  .address--line {
@@ -112,9 +168,10 @@
112
168
  list-style: none;
113
169
  }
114
170
 
115
- .secondarylinks--list--item:not(first-child) {
171
+ .secondarylinks--list--item {
116
172
  &:before {
117
- content: " | ";
173
+ content: "|";
174
+ margin: px-to-rem(4px);
118
175
  }
119
176
  }
120
177
 
@@ -146,31 +203,32 @@
146
203
  }
147
204
 
148
205
  .anchorlink {
149
- background: map-get($color, "ux", "readmore", "default", "background");
150
- border-bottom: 0.1071811361rem solid $brand-ilo-grey-light;
206
+ // General Styles
207
+ display: flex;
208
+ flex-flow: row nowrap;
151
209
  color: $color-ux-labels-actionable;
152
- display: block;
153
210
  font-family: $fonts-display;
154
- height: px-to-rem(map-get($spacing, "ux", "readmore", "default", "height"));
155
- margin: px-to-rem(12px) auto 0 auto;
156
- padding: px-to-rem($spacing-padding-2) px-to-rem($spacing-padding-4)
157
- px-to-rem($spacing-padding-2) 0;
211
+ @include font-styles("label-medium");
158
212
  position: relative;
159
- text-align: left;
160
213
  text-decoration: none;
161
- @include font-styles("label-medium");
162
214
  width: max-content;
163
215
 
216
+ // Mobile styles
217
+ justify-content: center;
218
+ border-bottom: 0.1071811361rem solid $brand-ilo-grey-light;
219
+ margin: px-to-rem(12px) auto 0 auto;
220
+ padding: px-to-rem($spacing-padding-2) px-to-rem($spacing-padding-2)
221
+ px-to-rem($spacing-padding-2) px-to-rem($spacing-padding-2);
222
+
164
223
  &:after {
165
224
  background-repeat: no-repeat;
166
225
  content: "";
167
- display: inline-block;
168
226
  height: px-to-rem(24px);
169
- position: absolute;
170
- right: px-to-rem(2px);
171
- top: 50%;
172
- transform: translateY(-50%) rotateX(180deg);
173
- transform-origin: center center;
227
+ position: relative;
228
+ margin-left: px-to-rem(8px);
229
+ bottom: px-to-rem(3px);
230
+ transform: rotateX(180deg);
231
+ transform-origin: center;
174
232
  width: px-to-rem(24px);
175
233
  @include dataurlicon("arrow", $color-ux-labels-actionable);
176
234
  }
@@ -196,10 +254,11 @@
196
254
  grid-template-areas:
197
255
  "site-info address"
198
256
  "site-info links"
199
- "site-info connect";
257
+ "site-info connect"
258
+ "site-info subscribe";
200
259
  align-content: start;
201
260
  align-items: start;
202
- padding: px-to-rem(40px) px-to-rem(32px) px-to-rem(40px) px-to-rem(32px);
261
+ padding: px-to-rem(40px) px-to-rem(20px);
203
262
  }
204
263
 
205
264
  .site--info {
@@ -219,55 +278,54 @@
219
278
  grid-area: links;
220
279
  }
221
280
 
222
- &--secondary {
223
- padding: px-to-rem(18px) px-to-rem(16px);
224
- position: relative;
281
+ .subscribe {
282
+ grid-area: subscribe;
225
283
  }
226
284
 
227
- .legal,
228
- .secondarylinks {
229
- display: block;
230
- float: left;
231
- }
232
-
233
- .secondarylinks {
234
- margin-right: px-to-rem(126px);
285
+ &--secondary {
286
+ padding-top: px-to-rem(18px);
287
+ padding-bottom: px-to-rem(18px);
288
+ position: relative;
289
+ z-index: 1;
235
290
  }
236
291
 
237
292
  .anchorlink {
238
- display: inline-block;
239
- margin: 0;
240
- position: absolute;
241
- right: 16px;
242
- top: 0;
293
+ bottom: 0;
243
294
  }
244
295
  }
245
296
 
246
297
  @include breakpoint("large") {
298
+ @include footer-triangle(top-right);
299
+
247
300
  &--main {
248
301
  display: grid;
249
- grid-template-columns: 19.2% 25.1% calc(32.5% + 64px);
250
- grid-template-rows: 0.6fr 1.4fr;
302
+ grid-template-columns: 0.25fr 0.33fr 0.09fr 0.33fr;
303
+ grid-template-rows: auto auto;
251
304
  gap: 0px 64px;
252
305
  grid-template-areas:
253
- "site-info address connect"
254
- "site-info links connect";
255
- padding: px-to-rem(56px) px-to-rem(70px) px-to-rem(64px) px-to-rem(70px);
306
+ "site-info address . connect"
307
+ "site-info links . subscribe";
256
308
 
257
- &:after {
258
- background-position: right top;
259
- bottom: auto;
260
- top: 0;
261
- transform: scaleY(1);
309
+ padding-top: px-to-rem(44px);
310
+ padding-bottom: px-to-rem(51px);
311
+
312
+ &:before {
313
+ content: none;
262
314
  }
263
315
  }
264
316
 
265
317
  .connect {
266
- display: grid;
267
- grid-template-columns: minmax(0, 40%), 60%;
268
- grid-template-rows: repeat(3, minmax(0, 1fr));
269
318
  grid-area: connect;
270
- margin: 0 0 0 calc(18.9% + 64px);
319
+ margin: 0;
320
+ }
321
+
322
+ .subscribe {
323
+ height: 100%;
324
+ display: flex;
325
+ align-items: flex-start;
326
+ justify-content: flex-start;
327
+ flex-flow: column;
328
+ top: 8px;
271
329
  }
272
330
 
273
331
  .ilo--button {
@@ -276,58 +334,81 @@
276
334
  }
277
335
 
278
336
  &--secondary {
279
- padding: px-to-rem(18px) px-to-rem(70px);
337
+ padding-top: px-to-rem(18px);
338
+ padding-bottom: px-to-rem(18px);
280
339
  position: relative;
281
- }
282
340
 
283
- .secondarylinks {
284
- margin-right: px-to-rem(140px);
341
+ [class*="container"] {
342
+ display: flex;
343
+ flex-flow: row;
344
+ justify-content: space-between;
345
+ align-items: center;
346
+ }
347
+
348
+ &--details {
349
+ display: flex;
350
+ flex-flow: row;
351
+ justify-content: flex-start;
352
+ align-items: center;
353
+ }
354
+
355
+ .secondarylinks--list--item {
356
+ &:before {
357
+ margin: px-to-rem(8px);
358
+ }
359
+ }
285
360
  }
286
361
 
287
362
  .anchorlink {
288
- display: inline-block;
289
363
  margin: 0;
290
- position: absolute;
291
- right: 70px;
292
- top: 0;
364
+ border: none;
365
+ padding: 0.25rem;
366
+
367
+ &:hover {
368
+ margin-bottom: -0.1071811361rem;
369
+ }
293
370
  }
294
371
  }
295
372
 
373
+ /* RTL Styles */
296
374
  .right-to-left & {
297
375
  * {
298
376
  text-align: right;
299
377
  }
300
378
 
301
- .legal,
302
- .secondarylinks {
303
- display: block;
379
+ &--main {
380
+ @include footer-triangle(bottom-left);
381
+ }
382
+
383
+ .subscribe a {
384
+ align-self: flex-end;
385
+ }
386
+
387
+ &--secondary {
388
+ [class*="container"] {
389
+ flex-direction: row-reverse;
390
+ }
391
+
392
+ &--details {
393
+ display: flex;
394
+ flex-flow: row-reverse wrap;
395
+ }
304
396
  }
305
397
 
306
398
  .secondarylinks {
307
399
  &--list {
308
- display: flex;
309
400
  flex-direction: row-reverse;
310
401
  }
311
402
  }
312
403
 
313
- .secondarylinks--list--item:not(first-child) {
404
+ .secondarylinks--list--item {
314
405
  &:before {
315
406
  content: none;
316
407
  }
317
408
 
318
409
  &:after {
319
- content: " | ";
320
- padding-right: px-to-rem(2px);
321
- }
322
- }
323
-
324
- &--main {
325
- &:after {
326
- bottom: 0;
327
- left: 0;
328
- right: auto;
329
- top: auto;
330
- transform: scale(-1, -1);
410
+ content: "|";
411
+ margin: px-to-rem(4px);
331
412
  }
332
413
  }
333
414
 
@@ -336,47 +417,27 @@
336
417
  grid-template-areas:
337
418
  "address site-info"
338
419
  "links site-info"
339
- "connect site-info";
340
- }
341
-
342
- .legal,
343
- .secondarylinks {
344
- float: right;
345
- }
346
-
347
- .secondarylinks {
348
- margin-left: px-to-rem(126px);
349
- margin-right: px-to-rem(4px);
350
-
351
- &--list {
352
- display: flex;
353
- flex-direction: row-reverse;
354
- }
355
- }
356
-
357
- .anchorlink {
358
- left: 16px;
359
- right: auto;
420
+ "connect site-info"
421
+ "subscribe site-info";
360
422
  }
361
423
  }
362
424
 
363
425
  @include breakpoint("large") {
426
+ @include footer-triangle(top-left);
427
+
364
428
  &--main {
365
- grid-template-columns: calc(32.5% + 64px) 25.1% 19.2%;
429
+ grid-template-columns: 0.33fr 0.09fr 0.33fr 0.25fr;
366
430
  grid-template-areas:
367
- "connect address site-info"
368
- "connect links site-info";
431
+ "connect . address site-info"
432
+ "subscribe . links site-info";
369
433
 
370
- &:after {
371
- left: 0;
372
- right: auto;
373
- transform: scale(-1, 1);
434
+ &:before {
435
+ content: none;
374
436
  }
375
437
  }
376
438
 
377
439
  .connect {
378
440
  grid-template-columns: 60%, minmax(0, 40%);
379
- margin: 0 calc(18.9% + 64px) 0 0;
380
441
  }
381
442
 
382
443
  .ilo--button {
@@ -16,7 +16,7 @@
16
16
  // Label is to the flex start of form element
17
17
  &__start {
18
18
  // Label
19
- :first-child {
19
+ #{$c}--label {
20
20
  grid-area: 1 / 1 / 2 / 2;
21
21
  }
22
22
 
@@ -26,12 +26,12 @@
26
26
  }
27
27
 
28
28
  // Helper
29
- :nth-child(3) {
29
+ #{$c}--helper {
30
30
  grid-area: 2 / 2 / 3 / 3;
31
31
  }
32
32
 
33
33
  // Upload
34
- :nth-child(4) {
34
+ [class*="file-upload--list"] {
35
35
  grid-area: 3 / 1 / 4 / 3;
36
36
  }
37
37
  }
@@ -39,7 +39,7 @@
39
39
  // Label is at the end of the form element
40
40
  &__end {
41
41
  // Label
42
- :first-child {
42
+ #{$c}--label {
43
43
  grid-area: 1 / 2 / 2 / 3;
44
44
  }
45
45
 
@@ -49,20 +49,20 @@
49
49
  }
50
50
 
51
51
  // Helper
52
- :nth-child(3) {
52
+ #{$c}--helper {
53
53
  grid-area: 2 / 1 / 3 / 3;
54
54
  }
55
55
 
56
56
  // Upload
57
- :nth-child(4) {
58
- grid-area: 3 / 1 / 4 / 3;
57
+ [class*="file-upload--list"] {
58
+ grid-area: 3 / 1 / 4 / 4;
59
59
  }
60
60
  }
61
61
 
62
62
  // Label is above form element
63
63
  &__top {
64
64
  // Label
65
- :first-child {
65
+ #{$c}--label {
66
66
  grid-area: 1 / 1 / 2 / 2;
67
67
  }
68
68
 
@@ -72,12 +72,12 @@
72
72
  }
73
73
 
74
74
  // Helper
75
- :nth-child(3) {
75
+ #{$c}--helper {
76
76
  grid-area: 3 / 1 / 4 / 2;
77
77
  }
78
78
 
79
79
  // Upload
80
- :nth-child(4) {
80
+ [class*="file-upload--list"] {
81
81
  grid-area: 4 / 1 / 5 / 2;
82
82
  }
83
83
  }
@@ -85,7 +85,7 @@
85
85
  // Label is below form element
86
86
  &__bottom {
87
87
  // Label
88
- :first-child {
88
+ #{$c}--label {
89
89
  grid-area: 3 / 1 / 4 / 2;
90
90
  }
91
91
 
@@ -95,12 +95,12 @@
95
95
  }
96
96
 
97
97
  // Helper
98
- :nth-child(3) {
98
+ #{$c}--helper {
99
99
  grid-area: 1 / 1 / 2 / 2;
100
100
  }
101
101
 
102
102
  // Upload
103
- :nth-child(4) {
103
+ [class*="file-upload--list"] {
104
104
  grid-area: 4 / 1 / 5 / 2;
105
105
  }
106
106
  }
@@ -5,15 +5,20 @@
5
5
  .ilo--hero-card {
6
6
  $c: &;
7
7
  $semi-transparent: 0.6;
8
- $padding-lg: $spacing-padding-8;
9
- $padding-sm: $spacing-padding-5;
8
+
9
+ // Replace with this
10
+ $padding-y-lg: $spacing-padding-7;
11
+ $padding-x-lg: $spacing-padding-9;
12
+
13
+ $padding-y-sm: $spacing-padding-5;
14
+ $padding-x-sm: $spacing-padding-2;
10
15
 
11
16
  height: 100%;
12
17
  position: relative;
13
- padding: $padding-sm 16px;
18
+ padding: $padding-y-sm $padding-x-sm;
14
19
 
15
20
  @include breakpoint("large") {
16
- padding: $padding-lg;
21
+ padding: $padding-y-lg $padding-x-lg;
17
22
  }
18
23
 
19
24
  .right-to-left & {
@@ -74,10 +79,10 @@
74
79
  }
75
80
 
76
81
  &__cornercut {
77
- @include cornercut(72px, 40px);
82
+ @include cornercut(70px, 40px);
78
83
 
79
84
  .right-to-left & {
80
- @include cornercut(72px, 40px, "left");
85
+ @include cornercut(720px, 40px, "left");
81
86
  }
82
87
 
83
88
  @include breakpoint("large") {
@@ -205,10 +205,10 @@
205
205
  }
206
206
 
207
207
  &--inner {
208
- margin: auto;
209
- max-width: 1300px;
210
- padding: 0 16px;
211
- width: 100%;
208
+ // margin: auto;
209
+ // max-width: $layout-max-width;
210
+ // padding: 0 16px;
211
+ // width: 100%;
212
212
 
213
213
  .right-to-left & {
214
214
  direction: rtl;
@@ -605,11 +605,11 @@
605
605
  .ilo--language-switcher {
606
606
  background: $brand-ilo-dark-blue;
607
607
  display: flex;
608
- padding: 0 max((100% - 1300px) / 2, 20px) 0 0;
608
+ padding: 0 max((100% - $layout-max-width) / 2, $layout-padding) 0 0;
609
609
  position: relative;
610
610
 
611
611
  .right-to-left & {
612
- padding: 0 0 0 max((100% - 1300px) / 2, 20px);
612
+ padding: 0 0 0 max((100% - $layout-max-width) / 2, $layout-padding);
613
613
  }
614
614
 
615
615
  &::before {
@@ -727,10 +727,10 @@
727
727
  }
728
728
 
729
729
  &--inner {
730
- margin: auto;
731
- max-width: 1300px;
732
- padding: 0 20px;
733
- width: 100%;
730
+ // margin: auto;
731
+ // max-width: 1300px;
732
+ // padding: 0 20px;
733
+ // width: 100%;
734
734
 
735
735
  @include breakpoint("large") {
736
736
  display: flex;