@ilo-org/styles 1.3.0 → 1.3.2

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.3.0",
4
+ "version": "1.3.2",
5
5
  "repository": {
6
6
  "type": "git",
7
7
  "url": "https://github.com/international-labour-organization/designsystem.git",
package/scss/_mixins.scss CHANGED
@@ -149,6 +149,15 @@
149
149
  background-repeat: no-repeat;
150
150
  }
151
151
 
152
+ @mixin icon($name, $color: black) {
153
+ $icon: map-get($icons, $name);
154
+ mask-image: url("#{$icon}");
155
+ mask-repeat: no-repeat;
156
+ -webkit-mask-image: url("#{$icon}");
157
+ -webkit-mask-repeat: no-repeat;
158
+ background-color: $color;
159
+ }
160
+
152
161
  // ======================================
153
162
  // Video Button
154
163
  // ======================================
@@ -4,6 +4,8 @@
4
4
  @import "../config";
5
5
 
6
6
  .#{$prefix}--accordion {
7
+ --ilo-accordion-color-icon: var(--ilo-color-blue-dark);
8
+
7
9
  // This provides a reference to the outerclass within nested declarations
8
10
  $accordion: &;
9
11
 
@@ -14,6 +16,11 @@
14
16
  // If the accordion item is scrollable, then this is its max-height
15
17
  $scroll-max-height: 300px;
16
18
 
19
+ &--icon {
20
+ width: 24px;
21
+ height: 24px;
22
+ }
23
+
17
24
  &--button {
18
25
  display: flex;
19
26
  flex-direction: row;
@@ -21,42 +28,40 @@
21
28
  width: 100%;
22
29
  margin: 0;
23
30
  padding-block: spacing(4);
24
- padding-inline-end: spacing(11);
31
+ padding-inline-end: spacing(1);
25
32
  background-color: $color-ux-background-default;
26
- background-position: calc(100% - px-to-rem(6px)) center;
27
- background-repeat: no-repeat;
28
- background-size: px-to-rem(24px) px-to-rem(24px);
29
33
  border: none;
30
34
  border-top: 2px solid $color-base-neutrals-lighter;
31
- fill: $color-ux-labels-actionable;
32
35
  font-family: var(--ilo-fonts-display);
33
36
  color: $color-ux-labels-actionable;
34
37
  font-weight: $type-weights-section;
35
38
  transition: all $transition-timing ease-in-out;
36
39
  @include font-styles("label-medium");
37
- @include dataurlicon("plus", $color-ux-labels-actionable);
38
40
 
39
41
  &__large {
40
42
  @include font-styles("headline-6");
41
43
  padding-block: spacing(5);
42
- padding-inline-end: spacing(11);
44
+ }
45
+
46
+ &[aria-expanded="true"] {
47
+ background-color: $color-base-blue-light;
48
+ #{$accordion}--icon {
49
+ @include icon("minus", var(--ilo-color-blue));
50
+ }
51
+ }
52
+
53
+ &[aria-expanded="false"] {
54
+ #{$accordion}--icon {
55
+ @include icon("plus", var(--ilo-color-blue-dark));
56
+ }
43
57
  }
44
58
 
45
59
  &:hover,
46
60
  &:focus {
61
+ --ilo-accordion-color-icon: var(--ilo-color-blue);
47
62
  border-top-color: $color-ux-borders-hover;
48
63
  color: $color-ux-labels-hover;
49
- fill: $color-ux-labels-hover;
50
64
  cursor: pointer;
51
-
52
- &[aria-expanded="true"] {
53
- color: $brand-ilo-dark-blue;
54
- @include dataurlicon("minus", $brand-ilo-dark-blue);
55
- }
56
-
57
- &[aria-expanded="false"] {
58
- @include dataurlicon("plus", $color-ux-labels-hover);
59
- }
60
65
  }
61
66
 
62
67
  @include breakpoint("md") {
@@ -64,23 +69,8 @@
64
69
  &__large {
65
70
  @include font-styles("headline-6");
66
71
  padding: spacing(5) 0;
67
- padding-inline-end: spacing(11);
68
72
  }
69
73
  }
70
-
71
- &[aria-expanded="true"] {
72
- background-color: $color-base-blue-light;
73
- color: $brand-ilo-blue;
74
- @include dataurlicon("minus", $brand-ilo-blue);
75
- }
76
-
77
- &[aria-expanded="false"] {
78
- @include dataurlicon("plus", $color-ux-labels-actionable);
79
- }
80
-
81
- [dir="rtl"] & {
82
- background-position: calc(0% + px-to-rem(6px)) center;
83
- }
84
74
  }
85
75
 
86
76
  &--panel {
@@ -27,7 +27,6 @@ It could eventually be used for a standalone blockquote component.
27
27
  @include font-styles("pull-quote-sm");
28
28
 
29
29
  &:after {
30
- background-repeat: no-repeat;
31
30
  bottom: 0;
32
31
  content: "";
33
32
  display: inline-block;
@@ -36,7 +35,7 @@ It could eventually be used for a standalone blockquote component.
36
35
  right: 0;
37
36
  transform: scaleX(-1);
38
37
  width: px-to-rem(26.5px);
39
- @include dataurlicon("quote", $color-font-blockquote);
38
+ @include icon("quote", var(--ilo-color-purple));
40
39
  }
41
40
  }
42
41
 
@@ -47,7 +46,6 @@ It could eventually be used for a standalone blockquote component.
47
46
  }
48
47
 
49
48
  &:before {
50
- background-repeat: no-repeat;
51
49
  content: "";
52
50
  display: inline-block;
53
51
  height: px-to-rem(40px);
@@ -55,7 +53,7 @@ It could eventually be used for a standalone blockquote component.
55
53
  position: absolute;
56
54
  width: px-to-rem(53px);
57
55
  top: 0;
58
- @include dataurlicon("quote", $color-font-blockquote);
56
+ @include icon("quote", var(--ilo-color-purple));
59
57
  }
60
58
 
61
59
  @include breakpoint("md") {
@@ -69,7 +69,7 @@
69
69
  position: relative;
70
70
 
71
71
  &__icon {
72
- @include dataurlicon("chevron_down", $brand-ilo-dark-blue);
72
+ @include icon("chevron_down", var(--ilo-color-blue-dark));
73
73
 
74
74
  background-position: right;
75
75
  background-repeat: no-repeat;
@@ -96,23 +96,19 @@
96
96
  width: px-to-rem(24px);
97
97
 
98
98
  &__error {
99
- background-color: var(--ilo-color-notification-type-error);
100
- @include dataurlicon("notification_error", "white");
99
+ @include icon("notification_error", var(--ilo-color-white));
101
100
  }
102
101
 
103
102
  &__info {
104
- background-color: var(--ilo-color-notification-type-info);
105
- @include dataurlicon("notification_info", "white");
103
+ @include icon("notification_info", var(--ilo-color-white));
106
104
  }
107
105
 
108
106
  &__success {
109
- background-color: var(--ilo-color-notification-type-success);
110
- @include dataurlicon("notification_success", "white");
107
+ @include icon("notification_success", var(--ilo-color-white));
111
108
  }
112
109
 
113
110
  &__warning {
114
- background-color: var(--ilo-color-notification-type-warning);
115
- @include dataurlicon("notification_warning", "white");
111
+ @include icon("notification_warning", var(--ilo-color-white));
116
112
  }
117
113
  }
118
114
 
@@ -4,6 +4,9 @@
4
4
  @import "../mixins";
5
5
 
6
6
  .ilo--link-list {
7
+ --ilo-link-list-color-icon: var(--ilo-color-blue-dark);
8
+ --ilo-link-list-color-indent-icon: var(--ilo-color-gray-base);
9
+
7
10
  &--headline {
8
11
  font-family: var(--ilo-fonts-display);
9
12
  font-weight: map-get($type, "weights", "label");
@@ -33,14 +36,10 @@
33
36
  padding-left: spacing(8);
34
37
 
35
38
  .ilo--link-list--label {
36
- display: block;
37
39
  padding-left: spacing(8);
38
40
  position: relative;
39
41
 
40
42
  &:before {
41
- background-position: left center;
42
- background-repeat: no-repeat;
43
- background-size: contain;
44
43
  content: "";
45
44
  display: block;
46
45
  height: px-to-rem(24px);
@@ -48,15 +47,16 @@
48
47
  left: 0;
49
48
  position: absolute;
50
49
  top: 50%;
51
- transform: translateY(-50%) rotate(-90deg);
50
+ transform: translateY(-50%);
52
51
  transform-origin: center;
53
- @include dataurlicon("chevrondown", $color-base-neutrals-light);
52
+ @include icon("caret_right", var(--ilo-link-list-color-indent-icon));
54
53
  }
55
54
 
56
55
  [dir="rtl"] & {
57
56
  padding-right: spacing(6);
58
57
  &:before {
59
- transform: translateY(-50%) rotate(90deg);
58
+ @include icon("caret_left", var(--ilo-link-list-color-indent-icon));
59
+ transform: translateY(-50%);
60
60
  left: unset;
61
61
  right: 0;
62
62
  }
@@ -67,28 +67,29 @@
67
67
  & .ilo--link-list--link:focus,
68
68
  &:hover,
69
69
  &:focus {
70
- .ilo--link-list--label:before {
71
- @include dataurlicon("chevrondown", $color-link-text-hover);
72
- }
70
+ --ilo-link-list-color-indent-icon: var(--ilo-color-blue);
73
71
  }
74
72
  }
75
73
  }
76
74
 
75
+ .ilo--link-list--icon {
76
+ @include icon("chevron_right", var(--ilo-link-list-color-icon));
77
+ width: px-to-rem(24px);
78
+ height: px-to-rem(24px);
79
+ }
80
+
77
81
  &--link {
78
- background-position: calc(100% - 4px) center;
79
- background-repeat: no-repeat;
80
- background-size: px-to-rem(24px) px-to-rem(24px);
82
+ display: flex;
83
+ justify-content: space-between;
84
+ align-items: center;
81
85
  border-bottom: px-to-rem($borders-base) solid $color-base-neutrals-lighter;
82
86
  color: map-get($color, "link", "text", "default");
83
- display: block;
84
87
  font-family: var(--ilo-fonts-display);
85
88
  font-weight: map-get($type, "weights", "section");
86
89
  @include font-styles("body-small");
87
90
  padding-top: spacing(4);
88
91
  padding-bottom: spacing(4);
89
- padding-inline-end: spacing(8);
90
92
  text-decoration: none;
91
- @include dataurlicon("chevron_right", $color-link-text-default);
92
93
  @include globaltransition("color, background-color, border-color");
93
94
 
94
95
  &:visited {
@@ -104,41 +105,32 @@
104
105
 
105
106
  &:hover,
106
107
  &:focus {
108
+ --ilo-link-list-color-icon: var(--ilo-color-blue);
107
109
  border-bottom: px-to-rem($borders-base) solid
108
110
  map-get($color, "link", "text", "hover");
109
111
  background-color: $color-base-blue-light;
110
112
  color: map-get($color, "link", "text", "hover");
111
113
  outline: none;
112
- @include dataurlicon("chevron_right", $color-link-text-hover);
113
114
  @include globaltransition("color, background-color, border-color");
114
115
  }
115
116
 
116
117
  [dir="rtl"] & {
117
- background-position: px-to-rem(4px) center;
118
- @include dataurlicon("arrowleft", $color-link-text-default);
119
-
120
- &:hover,
121
- &:focus {
122
- @include dataurlicon("arrowleft", $color-link-text-hover);
118
+ .ilo--link-list--icon {
119
+ @include icon("chevron_left", var(--ilo-link-list-color-icon));
123
120
  }
124
121
  }
125
122
  }
126
123
 
127
124
  &--dark {
125
+ --ilo-link-list-color-icon: var(--ilo-color-white);
126
+ --ilo-link-list-color-indent-icon: var(--ilo-color-white);
128
127
  .ilo--link-list--headline,
129
128
  .ilo--link-list--links--headline {
130
129
  color: $color-base-neutrals-white;
131
130
  }
132
131
 
133
- .ilo--link-list--label {
134
- &:before {
135
- @include dataurlicon("chevrondown", $color-base-neutrals-white);
136
- }
137
- }
138
-
139
132
  .ilo--link-list--link {
140
133
  border-bottom: px-to-rem($borders-base) solid rgba(237, 240, 242, 0.4);
141
- @include dataurlicon("chevron_right", $color-base-neutrals-white);
142
134
 
143
135
  .ilo--link-list--label {
144
136
  color: $color-base-neutrals-white;
@@ -163,27 +155,12 @@
163
155
  &:hover,
164
156
  &:focus {
165
157
  outline: none;
166
- @include dataurlicon("chevron_right", $color-base-blue-medium);
167
158
 
168
159
  .ilo--link-list--label {
169
160
  color: $color-base-blue-medium;
170
161
  @include globaltransition("color");
171
162
  }
172
163
  }
173
-
174
- [dir="rtl"] & {
175
- background-position: px-to-rem(4px) center;
176
- @include dataurlicon("arrowleft", $color-base-neutrals-white);
177
-
178
- &:hover,
179
- &:focus {
180
- @include dataurlicon("arrowleft", $color-base-blue-medium);
181
- }
182
- }
183
164
  }
184
165
  }
185
166
  }
186
-
187
- .wingsuit-body .ilo--link-list--dark {
188
- background-color: $color-base-blue-dark;
189
- }
@@ -10,10 +10,10 @@
10
10
  $self: &;
11
11
 
12
12
  &--link {
13
- background: map-get($color, "ux", "pagination", "default", "background");
13
+ background: var(--ilo-color-gray-light);
14
14
  border: none;
15
15
  border-radius: 2px;
16
- color: map-get($color, "ux", "pagination", "default", "icon");
16
+ color: var(--ilo-color-blue-dark);
17
17
  display: inline-block;
18
18
  font-family: var(--ilo-fonts-display);
19
19
  height: px-to-rem(40px);
@@ -28,31 +28,26 @@
28
28
  content: "";
29
29
  display: inline-block;
30
30
  left: 50%;
31
- height: px-to-rem(16px);
31
+ height: px-to-rem(20px);
32
32
  position: absolute;
33
33
  top: 50%;
34
34
  transform: translate(-50%, -50%);
35
35
  transform-origin: center center;
36
- width: px-to-rem(16px);
36
+ width: px-to-rem(20px);
37
37
  }
38
38
 
39
39
  &:hover {
40
- background: map-get($color, "ux", "pagination", "hover", "background");
41
- color: map-get($color, "ux", "pagination", "hover", "icon");
40
+ background: var(--ilo-color-blue-lighter);
41
+ color: var(--ilo-color-blue);
42
42
  }
43
43
 
44
44
  &.ilo--pagination--disable {
45
45
  opacity: 0.45;
46
46
  cursor: unset;
47
+ pointer-events: none;
47
48
 
48
49
  &:hover {
49
- background: map-get(
50
- $color,
51
- "ux",
52
- "pagination",
53
- "default",
54
- "background"
55
- );
50
+ background: var(--ilo-color-gray-light);
56
51
  }
57
52
  }
58
53
  }
@@ -62,18 +57,12 @@
62
57
  &::before {
63
58
  transform: translate(-50%, -50%) rotate(180deg);
64
59
 
65
- @include dataurlicon(
66
- "arrowgotoright",
67
- map-get($color, "ux", "pagination", "default", "icon")
68
- );
60
+ @include icon("double_chevron_right", var(--ilo-color-blue-dark));
69
61
  }
70
62
 
71
63
  &:hover {
72
64
  &::before {
73
- @include dataurlicon(
74
- "arrowgotoright",
75
- map-get($color, "ux", "pagination", "hover", "icon")
76
- );
65
+ @include icon("double_chevron_right", var(--ilo-color-blue));
77
66
  }
78
67
  }
79
68
 
@@ -81,19 +70,10 @@
81
70
  opacity: 0.45;
82
71
 
83
72
  &:hover {
84
- background: map-get(
85
- $color,
86
- "ux",
87
- "pagination",
88
- "default",
89
- "background"
90
- );
73
+ background: var(--ilo-color-gray-light);
91
74
 
92
75
  &::before {
93
- @include dataurlicon(
94
- "arrowgotoright",
95
- map-get($color, "ux", "pagination", "default", "icon")
96
- );
76
+ @include icon("double_chevron_right", var(--ilo-color-blue-dark));
97
77
  }
98
78
  }
99
79
  }
@@ -102,20 +82,14 @@
102
82
  &--prev-page {
103
83
  &::before {
104
84
  transform: translate(-50%, -50%) rotate(180deg);
105
- width: px-to-rem(10px);
85
+ width: px-to-rem(20px);
106
86
 
107
- @include dataurlicon(
108
- "caret_right",
109
- map-get($color, "ux", "pagination", "default", "icon")
110
- );
87
+ @include icon("chevron_right", var(--ilo-color-blue-dark));
111
88
  }
112
89
 
113
90
  &:hover {
114
91
  &::before {
115
- @include dataurlicon(
116
- "caret_right",
117
- map-get($color, "ux", "pagination", "hover", "icon")
118
- );
92
+ @include icon("chevron_right", var(--ilo-color-blue));
119
93
  }
120
94
  }
121
95
 
@@ -123,19 +97,10 @@
123
97
  opacity: 0.45;
124
98
 
125
99
  &:hover {
126
- background: map-get(
127
- $color,
128
- "ux",
129
- "pagination",
130
- "default",
131
- "background"
132
- );
100
+ background: var(--ilo-color-gray-light);
133
101
 
134
102
  &::before {
135
- @include dataurlicon(
136
- "caret_right",
137
- map-get($color, "ux", "pagination", "default", "icon")
138
- );
103
+ @include icon("chevron_right", var(--ilo-color-blue-dark));
139
104
  }
140
105
  }
141
106
  }
@@ -144,20 +109,14 @@
144
109
  &--next-page {
145
110
  &::before {
146
111
  transform: translate(-50%, -50%) rotate(0);
147
- width: px-to-rem(10px);
112
+ width: px-to-rem(20px);
148
113
 
149
- @include dataurlicon(
150
- "caret_right",
151
- map-get($color, "ux", "pagination", "default", "icon")
152
- );
114
+ @include icon("chevron_right", var(--ilo-color-blue-dark));
153
115
  }
154
116
 
155
117
  &:hover {
156
118
  &::before {
157
- @include dataurlicon(
158
- "caret_right",
159
- map-get($color, "ux", "pagination", "hover", "icon")
160
- );
119
+ @include icon("chevron_right", var(--ilo-color-blue));
161
120
  }
162
121
  }
163
122
 
@@ -165,19 +124,10 @@
165
124
  opacity: 0.45;
166
125
 
167
126
  &:hover {
168
- background: map-get(
169
- $color,
170
- "ux",
171
- "pagination",
172
- "default",
173
- "background"
174
- );
127
+ background: var(--ilo-color-gray-light);
175
128
 
176
129
  &::before {
177
- @include dataurlicon(
178
- "caret_right",
179
- map-get($color, "ux", "pagination", "default", "icon")
180
- );
130
+ @include icon("chevron_right", var(--ilo-color-blue-dark));
181
131
  }
182
132
  }
183
133
  }
@@ -185,18 +135,12 @@
185
135
 
186
136
  &--last-page {
187
137
  &::before {
188
- @include dataurlicon(
189
- "arrowgotoright",
190
- map-get($color, "ux", "pagination", "default", "icon")
191
- );
138
+ @include icon("double_chevron_right", var(--ilo-color-blue-dark));
192
139
  }
193
140
 
194
141
  &:hover {
195
142
  &::before {
196
- @include dataurlicon(
197
- "arrowgotoright",
198
- map-get($color, "ux", "pagination", "hover", "icon")
199
- );
143
+ @include icon("double_chevron_right", var(--ilo-color-blue));
200
144
  }
201
145
  }
202
146
 
@@ -204,19 +148,10 @@
204
148
  opacity: 0.45;
205
149
 
206
150
  &:hover {
207
- background: map-get(
208
- $color,
209
- "ux",
210
- "pagination",
211
- "default",
212
- "background"
213
- );
151
+ background: var(--ilo-color-gray-light);
214
152
 
215
153
  &::before {
216
- @include dataurlicon(
217
- "caret_right",
218
- map-get($color, "ux", "pagination", "default", "icon")
219
- );
154
+ @include icon("chevron_right", var(--ilo-color-blue-dark));
220
155
  }
221
156
  }
222
157
  }
@@ -106,12 +106,6 @@
106
106
  outline: none;
107
107
  border-top: px-to-rem(3px) solid $color-base-blue-medium;
108
108
  @include globaltransition("color, background-color, border-color");
109
-
110
- &.has--tooltip {
111
- .ilo--tooltip--wrapper {
112
- @include dataurlicon("info", $color-base-blue-medium);
113
- }
114
- }
115
109
  }
116
110
  }
117
111
 
@@ -88,7 +88,7 @@
88
88
 
89
89
  &.icon__position--right {
90
90
  .ilo--icon {
91
- @include dataurlicon("close", map-get($color, "tag", "text", "active"));
91
+ @include icon("close", var(--ilo-color-blue-dark));
92
92
  background-position: center;
93
93
  background-repeat: no-repeat;
94
94
  background-size: contain;
@@ -111,10 +111,7 @@
111
111
 
112
112
  &.icon__position--right {
113
113
  .ilo--icon {
114
- @include dataurlicon(
115
- "close",
116
- map-get($color, "tag", "text", "hover")
117
- );
114
+ @include icon("close", var(--ilo-color-blue));
118
115
  }
119
116
  }
120
117
  }
@@ -148,7 +145,7 @@
148
145
 
149
146
  &.icon__position--right {
150
147
  .ilo--icon {
151
- @include dataurlicon("close", map-get($color, "tag", "text", "active"));
148
+ @include icon("close", var(--ilo-color-blue-dark));
152
149
 
153
150
  height: 100%;
154
151
  max-height: 28px;
@@ -169,10 +166,7 @@
169
166
 
170
167
  &.icon__position--right {
171
168
  .ilo--icon {
172
- @include dataurlicon(
173
- "close",
174
- map-get($color, "tag", "text", "hover")
175
- );
169
+ @include icon("close", var(--ilo-color-blue));
176
170
  }
177
171
  }
178
172
  }