@ilo-org/styles 1.0.8 → 1.1.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.
Files changed (87) hide show
  1. package/css/components/accordion.css +1 -1
  2. package/css/components/breadcrumb.css +1 -1
  3. package/css/components/button.css +1 -1
  4. package/css/components/callout.css +1 -1
  5. package/css/components/card.css +1 -1
  6. package/css/components/cardgroup.css +1 -1
  7. package/css/components/contextmenu.css +1 -1
  8. package/css/components/datacard.css +1 -1
  9. package/css/components/datepicker.css +1 -1
  10. package/css/components/detailcard.css +1 -1
  11. package/css/components/dropdown.css +1 -1
  12. package/css/components/factlistcard.css +1 -1
  13. package/css/components/featurecard.css +1 -1
  14. package/css/components/fieldset.css +1 -1
  15. package/css/components/file-upload.css +1 -1
  16. package/css/components/footer.css +1 -1
  17. package/css/components/form.css +1 -1
  18. package/css/components/formcontrol.css +1 -1
  19. package/css/components/hero.css +1 -1
  20. package/css/components/image.css +1 -1
  21. package/css/components/input.css +1 -1
  22. package/css/components/link.css +1 -1
  23. package/css/components/linklist.css +1 -1
  24. package/css/components/list.css +1 -1
  25. package/css/components/loading.css +1 -1
  26. package/css/components/logogrid.css +1 -1
  27. package/css/components/multilinkcard.css +1 -1
  28. package/css/components/navigation.css +1 -1
  29. package/css/components/notification.css +1 -1
  30. package/css/components/pagination.css +1 -1
  31. package/css/components/profile.css +1 -1
  32. package/css/components/promocard.css +1 -1
  33. package/css/components/readmore.css +1 -1
  34. package/css/components/richtext.css +1 -1
  35. package/css/components/searchfield.css +1 -1
  36. package/css/components/socialmedia.css +1 -1
  37. package/css/components/statcard.css +1 -1
  38. package/css/components/table.css +1 -1
  39. package/css/components/tableofcontents.css +1 -1
  40. package/css/components/tabs.css +1 -1
  41. package/css/components/tag.css +1 -1
  42. package/css/components/textarea.css +1 -1
  43. package/css/components/textcard.css +1 -1
  44. package/css/components/textinput.css +1 -1
  45. package/css/components/tooltip.css +1 -1
  46. package/css/components/video.css +1 -1
  47. package/css/global.css +1 -1
  48. package/css/global.css.map +1 -1
  49. package/css/index.css +2 -2
  50. package/css/index.css.map +1 -1
  51. package/css/monorepo.css +2 -2
  52. package/css/monorepo.css.map +1 -1
  53. package/package.json +3 -3
  54. package/scss/_functions.scss +5 -3
  55. package/scss/_mixins.scss +6 -5
  56. package/scss/components/_accordion.scss +1 -1
  57. package/scss/components/_cardgroup.scss +1 -1
  58. package/scss/components/_credit.scss +2 -2
  59. package/scss/components/_datacard.scss +2 -2
  60. package/scss/components/_detailcard.scss +7 -7
  61. package/scss/components/_factlistcard.scss +3 -3
  62. package/scss/components/_featurecard.scss +1 -1
  63. package/scss/components/_fieldset.scss +1 -1
  64. package/scss/components/_footer.scss +4 -4
  65. package/scss/components/_formcontrol.scss +1 -1
  66. package/scss/components/_heading.scss +6 -6
  67. package/scss/components/_hero.scss +2 -2
  68. package/scss/components/_herocard.scss +7 -7
  69. package/scss/components/_image.scss +1 -1
  70. package/scss/components/_list.scss +1 -1
  71. package/scss/components/_modal.scss +2 -2
  72. package/scss/components/_multilinkcard.scss +7 -7
  73. package/scss/components/_navigation.scss +29 -29
  74. package/scss/components/_notification.scss +9 -9
  75. package/scss/components/_promocard.scss +6 -6
  76. package/scss/components/_richtext.scss +2 -2
  77. package/scss/components/_statcard.scss +1 -1
  78. package/scss/components/_tableofcontents.scss +3 -3
  79. package/scss/components/_tabs.scss +2 -2
  80. package/scss/components/_textcard.scss +3 -3
  81. package/scss/components/_tooltip.scss +1 -1
  82. package/scss/components/_video.scss +1 -1
  83. package/scss/global.scss +3 -0
  84. package/scss/monorepo.scss +3 -0
  85. package/scss/theme/_breakpoints.scss +11 -0
  86. package/scss/theme/_foundation.scss +82 -0
  87. package/scss/theme/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": "1.0.8",
4
+ "version": "1.1.0",
5
5
  "repository": {
6
6
  "type": "git",
7
7
  "url": "https://github.com/international-labour-organization/designsystem.git",
@@ -39,8 +39,8 @@
39
39
  "license": "Apache-2.0",
40
40
  "dependencies": {
41
41
  "@ilo-org/fonts": "0.2.2",
42
- "@ilo-org/themes": "0.9.0",
43
- "@ilo-org/icons": "0.4.0"
42
+ "@ilo-org/icons": "0.4.0",
43
+ "@ilo-org/themes": "0.9.0"
44
44
  },
45
45
  "devDependencies": {
46
46
  "del": "^7.0.0",
@@ -57,11 +57,13 @@
57
57
  // =========================================
58
58
 
59
59
  @function spacing($size) {
60
- $scaled: $size * $spacing-root;
60
+ $scaled: calc(#{$size} * var(--ilo-spacing-base));
61
+
61
62
  @if ($size % 1 != 0) {
62
- $scaled: round($size) * $spacing-root;
63
+ $scaled: calc(#{round($size)} * var(--ilo-spacing-base));
63
64
  }
64
- @return px-to-rem($scaled);
65
+
66
+ @return $scaled;
65
67
  }
66
68
 
67
69
  // =========================================
package/scss/_mixins.scss CHANGED
@@ -3,6 +3,7 @@
3
3
  //*------------------------------------*/
4
4
  @use "tokens" as *;
5
5
  @use "functions" as *;
6
+ @use "theme/breakpoints" as *;
6
7
 
7
8
  // ======================================
8
9
  // Output font styles
@@ -40,15 +41,15 @@
40
41
  // ======================================
41
42
 
42
43
  @mixin breakpoint($breakpoint, $max: false) {
43
- @if map-has-key($breakpoints, $breakpoint) {
44
+ @if map-has-key($breakpoints-foundation, $breakpoint) {
44
45
  @if not $max {
45
- @media screen and (min-width: map-get($breakpoints, $breakpoint)) {
46
+ @media screen and (min-width: map-get($breakpoints-foundation, $breakpoint)) {
46
47
  @content;
47
48
  }
48
49
  }
49
50
 
50
51
  @if $max {
51
- @media screen and (max-width: #{map-get($breakpoints, $breakpoint) - 1px}) {
52
+ @media screen and (max-width: #{map-get($breakpoints-foundation, $breakpoint) - 1px}) {
52
53
  @content;
53
54
  }
54
55
  }
@@ -417,7 +418,7 @@
417
418
  transform: rotate(180deg);
418
419
  }
419
420
 
420
- @include breakpoint("medium") {
421
+ @include breakpoint("md") {
421
422
  top: px-to-rem(7px);
422
423
  }
423
424
  }
@@ -435,7 +436,7 @@
435
436
  letter-spacing: $type-label-small-letter-spacing;
436
437
  }
437
438
 
438
- @include breakpoint("medium") {
439
+ @include breakpoint("md") {
439
440
  @include font-styles("base");
440
441
  }
441
442
  }
@@ -59,7 +59,7 @@
59
59
  }
60
60
  }
61
61
 
62
- @include breakpoint("medium") {
62
+ @include breakpoint("md") {
63
63
  @include font-styles("label-medium");
64
64
  &__large {
65
65
  @include font-styles("headline-6");
@@ -13,7 +13,7 @@
13
13
  }
14
14
 
15
15
  &__count {
16
- @include breakpoint("large") {
16
+ @include breakpoint("lg") {
17
17
  &__one {
18
18
  #{$c}--inner {
19
19
  grid-template-columns: 1fr;
@@ -29,7 +29,7 @@
29
29
  width: px-to-rem($spacing-ux-credit-height);
30
30
  }
31
31
 
32
- @include breakpoint("large", true) {
32
+ @include breakpoint("lg", true) {
33
33
  width: 75%;
34
34
 
35
35
  &--label {
@@ -88,7 +88,7 @@
88
88
  transform: scaleX(-1);
89
89
  }
90
90
 
91
- @include breakpoint("large", true) {
91
+ @include breakpoint("lg", true) {
92
92
  &--label {
93
93
  left: auto;
94
94
  right: 0;
@@ -25,7 +25,7 @@
25
25
  row-gap: px-to-rem(26px);
26
26
  }
27
27
 
28
- @include breakpoint("medium") {
28
+ @include breakpoint("md") {
29
29
  padding: spacing(12);
30
30
 
31
31
  &__columns {
@@ -92,7 +92,7 @@
92
92
  @include cornercut(72px, 40px);
93
93
  padding: spacing(10) spacing(6) spacing(14);
94
94
 
95
- @include breakpoint("medium", true) {
95
+ @include breakpoint("md", true) {
96
96
  --max-width: 100%;
97
97
  }
98
98
  }
@@ -16,11 +16,11 @@
16
16
 
17
17
  @include globaltransition(border);
18
18
 
19
- @include breakpoint("large") {
19
+ @include breakpoint("lg") {
20
20
  padding: spacing(8) 0;
21
21
  }
22
22
 
23
- @include breakpoint("medium", true) {
23
+ @include breakpoint("md", true) {
24
24
  --max-width: 100%;
25
25
  }
26
26
 
@@ -49,7 +49,7 @@
49
49
  #{$self}--title {
50
50
  padding: 0 0 spacing(2) 0;
51
51
  @include font-styles("headline-6");
52
- @include breakpoint("large") {
52
+ @include breakpoint("lg") {
53
53
  #{$self}__size__wide & {
54
54
  @include font-styles("headline-5");
55
55
  }
@@ -66,19 +66,19 @@
66
66
  --max-width: #{px-to-rem(745px)};
67
67
 
68
68
  #{$self}--title {
69
- @include breakpoint("large") {
69
+ @include breakpoint("lg") {
70
70
  @include font-styles("headline-5");
71
71
  }
72
72
  }
73
73
 
74
74
  #{$self}--image--wrapper {
75
- @include breakpoint("large") {
75
+ @include breakpoint("lg") {
76
76
  flex: 0 0 px-to-rem(196px);
77
77
  }
78
78
  }
79
79
 
80
80
  #{$self}--picture {
81
- @include breakpoint("large") {
81
+ @include breakpoint("lg") {
82
82
  width: px-to-rem(196px);
83
83
  }
84
84
  }
@@ -87,7 +87,7 @@
87
87
  &__narrow {
88
88
  --max-width: #{px-to-rem(343px)};
89
89
 
90
- @include breakpoint("medium", true) {
90
+ @include breakpoint("md", true) {
91
91
  --max-width: 100%;
92
92
  }
93
93
  }
@@ -15,7 +15,7 @@
15
15
 
16
16
  @include cornercut(72px, 40px);
17
17
 
18
- @include breakpoint("large") {
18
+ @include breakpoint("lg") {
19
19
  padding: spacing(12) spacing(10) spacing(14);
20
20
  }
21
21
 
@@ -25,7 +25,7 @@
25
25
 
26
26
  padding: spacing(12) spacing(10) spacing(14);
27
27
 
28
- @include breakpoint("medium") {
28
+ @include breakpoint("md") {
29
29
  @include cornercut(87px, 48px);
30
30
  }
31
31
  }
@@ -80,7 +80,7 @@
80
80
  "copy"
81
81
  );
82
82
 
83
- @include breakpoint("large") {
83
+ @include breakpoint("lg") {
84
84
  @include font-styles("headline-4");
85
85
  @include textmargin(
86
86
  "margin-bottom",
@@ -104,7 +104,7 @@
104
104
  &__fluid {
105
105
  --max-width: #{px-to-rem(754px)};
106
106
 
107
- @include breakpoint("medium") {
107
+ @include breakpoint("md") {
108
108
  #{$self}--wrap {
109
109
  flex-direction: row;
110
110
  }
@@ -22,7 +22,7 @@
22
22
  @include textmargin("margin-bottom", $gap, "label-medium", "display", 0, 0);
23
23
 
24
24
  .ilo--tooltip--wrapper {
25
- top: math.div(spacing(1), 2);
25
+ top: calc(#{spacing(1)} / 2);
26
26
  }
27
27
  }
28
28
 
@@ -247,7 +247,7 @@
247
247
  }
248
248
  }
249
249
 
250
- @include breakpoint("medium") {
250
+ @include breakpoint("md") {
251
251
  &--main {
252
252
  display: grid;
253
253
  grid-template-columns: minmax(0, 50%) minmax(0, 50%);
@@ -295,7 +295,7 @@
295
295
  }
296
296
  }
297
297
 
298
- @include breakpoint("large") {
298
+ @include breakpoint("lg") {
299
299
  @include footer-triangle(top-right);
300
300
 
301
301
  &--main {
@@ -392,7 +392,7 @@
392
392
  }
393
393
  }
394
394
 
395
- @include breakpoint("medium") {
395
+ @include breakpoint("md") {
396
396
  &--main {
397
397
  grid-template-areas:
398
398
  "address site-info"
@@ -402,7 +402,7 @@
402
402
  }
403
403
  }
404
404
 
405
- @include breakpoint("large") {
405
+ @include breakpoint("lg") {
406
406
  @include footer-triangle(top-left);
407
407
 
408
408
  &--main {
@@ -185,6 +185,6 @@
185
185
  }
186
186
 
187
187
  .ilo--tooltip--wrapper {
188
- bottom: math.div(spacing(1), 2);
188
+ bottom: calc(#{spacing(1)}, 2);
189
189
  }
190
190
  }
@@ -28,7 +28,7 @@
28
28
  .ilo--h1 {
29
29
  @include font-styles("headline-2");
30
30
 
31
- @include breakpoint("medium") {
31
+ @include breakpoint("md") {
32
32
  @include font-styles("headline-1");
33
33
  }
34
34
  }
@@ -36,7 +36,7 @@
36
36
  .ilo--h2 {
37
37
  @include font-styles("headline-3");
38
38
 
39
- @include breakpoint("medium") {
39
+ @include breakpoint("md") {
40
40
  @include font-styles("headline-2");
41
41
  }
42
42
  }
@@ -44,7 +44,7 @@
44
44
  .ilo--h3 {
45
45
  @include font-styles("headline-4");
46
46
 
47
- @include breakpoint("medium") {
47
+ @include breakpoint("md") {
48
48
  @include font-styles("headline-3");
49
49
  }
50
50
  }
@@ -52,7 +52,7 @@
52
52
  .ilo--h4 {
53
53
  @include font-styles("headline-5");
54
54
 
55
- @include breakpoint("medium") {
55
+ @include breakpoint("md") {
56
56
  @include font-styles("headline-4");
57
57
  }
58
58
  }
@@ -60,7 +60,7 @@
60
60
  .ilo--h5 {
61
61
  @include font-styles("headline-6");
62
62
 
63
- @include breakpoint("medium") {
63
+ @include breakpoint("md") {
64
64
  @include font-styles("headline-5");
65
65
  }
66
66
  }
@@ -68,7 +68,7 @@
68
68
  .ilo--h6 {
69
69
  @include font-styles("headline-6");
70
70
 
71
- @include breakpoint("medium") {
71
+ @include breakpoint("md") {
72
72
  @include font-styles("headline-6");
73
73
  }
74
74
  }
@@ -111,7 +111,7 @@
111
111
  }
112
112
  }
113
113
 
114
- @include breakpoint("large") {
114
+ @include breakpoint("lg") {
115
115
  --card-width: 625px;
116
116
  --corner-cut-height: #{$spacing-hero-card-corner-cut-height-lg};
117
117
  --breadcrumbs-height: 48px;
@@ -375,7 +375,7 @@
375
375
  }
376
376
  }
377
377
 
378
- @include breakpoint("large") {
378
+ @include breakpoint("lg") {
379
379
  &__card-align__bottom {
380
380
  &#{$c}__card-justify__start,
381
381
  &#{$c}__card-justify__offset {
@@ -9,7 +9,7 @@
9
9
  position: relative;
10
10
  padding: $spacing-hero-card-padding-y-sm $spacing-hero-card-padding-x-sm;
11
11
 
12
- @include breakpoint("large") {
12
+ @include breakpoint("lg") {
13
13
  padding-block: $spacing-hero-card-padding-y-lg;
14
14
  padding-inline-end: $spacing-hero-card-padding-x-lg;
15
15
  padding-inline-start: var(--card-padding-start);
@@ -29,7 +29,7 @@
29
29
  color: map-get($color, "hero", "card", "light", "color");
30
30
  background: map-get($color, "hero", "card", "light", "background");
31
31
 
32
- @include breakpoint("large") {
32
+ @include breakpoint("lg") {
33
33
  &.ilo--hero-card__background__semi-transparent {
34
34
  background: rgba(
35
35
  map-get($color, "hero", "card", "light", "background"),
@@ -43,7 +43,7 @@
43
43
  background: map-get($color, "hero", "card", "dark", "background");
44
44
  color: map-get($color, "hero", "card", "dark", "color");
45
45
 
46
- @include breakpoint("large") {
46
+ @include breakpoint("lg") {
47
47
  &.ilo--hero-card__background__semi-transparent {
48
48
  background: rgba(
49
49
  map-get($color, "hero", "card", "dark", "background"),
@@ -53,7 +53,7 @@
53
53
  }
54
54
  }
55
55
 
56
- @include breakpoint("large") {
56
+ @include breakpoint("lg") {
57
57
  &__dark.ilo--hero-card__background__transparent,
58
58
  &__light.ilo--hero-card__background__transparent {
59
59
  color: map-get($color, "hero", "card", "dark", "color");
@@ -82,7 +82,7 @@
82
82
  );
83
83
  }
84
84
 
85
- @include breakpoint("large") {
85
+ @include breakpoint("lg") {
86
86
  @include cornercut(
87
87
  $spacing-hero-card-corner-cut-width-lg,
88
88
  $spacing-hero-card-corner-cut-height-lg
@@ -139,7 +139,7 @@
139
139
  @include font-styles("body-small");
140
140
  margin-bottom: px-to-rem(28px);
141
141
 
142
- @include breakpoint("large") {
142
+ @include breakpoint("lg") {
143
143
  @include font-styles("base");
144
144
  }
145
145
  }
@@ -158,7 +158,7 @@
158
158
  font-family: $fonts-display;
159
159
  font-weight: 700;
160
160
 
161
- @include breakpoint("large") {
161
+ @include breakpoint("lg") {
162
162
  @include font-styles("headline-2");
163
163
  }
164
164
  }
@@ -34,7 +34,7 @@
34
34
  left: 0;
35
35
  position: absolute;
36
36
 
37
- @include breakpoint("large") {
37
+ @include breakpoint("lg") {
38
38
  bottom: -#{px-to-rem(4px)};
39
39
  }
40
40
  }
@@ -11,7 +11,7 @@
11
11
  font-family: $fonts-display;
12
12
  font-weight: 700;
13
13
 
14
- @include breakpoint("medium") {
14
+ @include breakpoint("md") {
15
15
  @include font-styles("headline-5");
16
16
  }
17
17
  }
@@ -71,14 +71,14 @@
71
71
  }
72
72
  }
73
73
 
74
- @include breakpoint("medium") {
74
+ @include breakpoint("md") {
75
75
  &--contents {
76
76
  margin: 0 23.2%;
77
77
  width: 53.58%;
78
78
  }
79
79
  }
80
80
 
81
- @include breakpoint("large") {
81
+ @include breakpoint("lg") {
82
82
  &--contents {
83
83
  margin: 0 18.05%;
84
84
  width: 63.888%;
@@ -24,11 +24,11 @@
24
24
  }
25
25
  }
26
26
 
27
- @include breakpoint("medium") {
27
+ @include breakpoint("md") {
28
28
  padding: spacing(10);
29
29
  }
30
30
 
31
- @include breakpoint("large") {
31
+ @include breakpoint("lg") {
32
32
  padding: spacing(14) spacing(12);
33
33
  }
34
34
 
@@ -37,7 +37,7 @@
37
37
  margin-bottom: spacing(8);
38
38
  color: $brand-ilo-black;
39
39
 
40
- @include breakpoint("medium") {
40
+ @include breakpoint("md") {
41
41
  @include font-styles("headline-4");
42
42
  }
43
43
  }
@@ -47,7 +47,7 @@
47
47
  margin-bottom: spacing(8);
48
48
  color: $brand-ilo-black;
49
49
 
50
- @include breakpoint("medium") {
50
+ @include breakpoint("md") {
51
51
  @include font-styles("base");
52
52
  }
53
53
  }
@@ -75,14 +75,14 @@
75
75
  }
76
76
 
77
77
  #{$self}--title {
78
- @include breakpoint("medium") {
78
+ @include breakpoint("md") {
79
79
  @include font-styles("headline-5");
80
80
  margin-bottom: spacing(6);
81
81
  }
82
82
  }
83
83
 
84
84
  #{$self}--intro {
85
- @include breakpoint("medium") {
85
+ @include breakpoint("md") {
86
86
  @include font-styles("body-small");
87
87
  margin-bottom: spacing(6);
88
88
  }
@@ -99,7 +99,7 @@
99
99
  margin-bottom: spacing(3);
100
100
  }
101
101
 
102
- @include breakpoint("medium") {
102
+ @include breakpoint("md") {
103
103
  padding: spacing(14) spacing(12);
104
104
 
105
105
  &#{$self}__align__right {