@ilo-org/styles 1.13.1 → 1.14.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.13.1",
4
+ "version": "1.14.0",
5
5
  "repository": {
6
6
  "type": "git",
7
7
  "url": "https://github.com/international-labour-organization/designsystem.git",
@@ -35,7 +35,7 @@
35
35
  @include globaltransition("background-color");
36
36
  }
37
37
 
38
- &:has(select:hover):before {
38
+ &:has(select:enabled:hover):before {
39
39
  background-color: var(--ilo-dropdown-background-color-active);
40
40
  }
41
41
 
@@ -49,6 +49,28 @@
49
49
  top: var(--ilo-dropdown-button-icon-offset);
50
50
  @include icon("chevron_down", var(--ilo-dropdown-button-icon-color));
51
51
  }
52
+
53
+ &:has(select:disabled) {
54
+ --ilo-dropdown-button-icon-color: var(--ilo-dropdown-color);
55
+
56
+ &:after {
57
+ opacity: 0.45;
58
+ }
59
+
60
+ // manually adjusted the left border color to be slightly darker
61
+ &:before {
62
+ border-color: color-mix(
63
+ in srgb,
64
+ var(--ilo-dropdown-border-color) 45%,
65
+ transparent
66
+ );
67
+ border-inline-start-color: color-mix(
68
+ in srgb,
69
+ var(--ilo-dropdown-border-color) 60%,
70
+ transparent
71
+ );
72
+ }
73
+ }
52
74
  }
53
75
 
54
76
  appearance: none;
@@ -58,6 +80,7 @@
58
80
  color: var(--ilo-dropdown-color);
59
81
  width: 100%;
60
82
  margin: spacing(0);
83
+
61
84
  padding: 0 spacing(14) 0 spacing(4);
62
85
  text-overflow: ellipsis;
63
86
  white-space: nowrap;
@@ -68,15 +91,18 @@
68
91
  @include typography("body-medium");
69
92
  @include globaltransition("background-color, border-color, color");
70
93
 
71
- &:hover,
72
- &:focus,
73
- &:active {
94
+ &:enabled:is(:hover, :focus, :active) {
74
95
  border-inline-start-color: var(--ilo-color-blue);
75
96
  box-shadow: inset px-to-rem(1px) 0 0 0 var(--ilo-color-blue);
76
97
  background-color: var(--ilo-dropdown-background-color-active);
77
98
  --ilo-dropdown-color: var(--ilo-color-gray-charcoal);
78
99
  }
79
100
 
101
+ &:disabled {
102
+ pointer-events: none;
103
+ opacity: 0.45;
104
+ }
105
+
80
106
  [dir="rtl"] &:hover,
81
107
  [dir="rtl"] &:focus,
82
108
  [dir="rtl"] &:active {
@@ -242,7 +242,10 @@
242
242
  &[class*="semi-transparent"] {
243
243
  #{$c}--card-offset {
244
244
  background: rgba(35, 0, 80, 0.6);
245
- box-shadow: 0.3px 0 0 0 rgba(35, 0, 80, 0.6);
245
+ // No seam-bridging box-shadow here: with a translucent fill the
246
+ // shadow composites over the card's own semi-transparent layer,
247
+ // producing a darker hairline at the offset/card boundary.
248
+ box-shadow: none;
246
249
  }
247
250
  }
248
251
  }
@@ -256,7 +259,9 @@
256
259
  &[class*="semi-transparent"] {
257
260
  #{$c}--card-offset {
258
261
  background: rgba(255, 255, 255, 0.6);
259
- box-shadow: 0.3px 0 0 0 rgba(255, 255, 255, 0.6);
262
+ // See dark variant above: no box-shadow for translucent fills,
263
+ // otherwise the shadow doubles up into a darker seam line.
264
+ box-shadow: none;
260
265
  }
261
266
  }
262
267
  }
@@ -167,6 +167,10 @@
167
167
  .vjs-volume-panel {
168
168
  display: none;
169
169
  }
170
+
171
+ .vjs-subs-caps-button {
172
+ display: none;
173
+ }
170
174
  }
171
175
  }
172
176
 
@@ -210,6 +214,126 @@
210
214
  @include videobutton("fullscreen");
211
215
  }
212
216
 
217
+ // Closed captions control
218
+ .vjs-subs-caps-button {
219
+ order: 3;
220
+ margin-right: px-to-rem(2px);
221
+ position: relative;
222
+ z-index: 30;
223
+
224
+ > .vjs-menu-button {
225
+ @include videobutton("closed_captions");
226
+ }
227
+
228
+ &.vjs-hover > .vjs-menu-button,
229
+ &:hover > .vjs-menu-button,
230
+ &:focus-within > .vjs-menu-button {
231
+ background-color: var(--ilo-color-blue-light);
232
+ @include dataurlicon("closed_captions", rgba(30, 45, 190, 1));
233
+ }
234
+
235
+ .vjs-menu {
236
+ background: var(--ilo-color-brand-200);
237
+ border: 0;
238
+ bottom: calc(100% + #{px-to-rem(8px)});
239
+ display: none;
240
+ left: 50%;
241
+ min-width: px-to-rem(190px);
242
+ position: absolute;
243
+ right: auto;
244
+ transform: translateX(-50%);
245
+ z-index: 40;
246
+ padding-top: px-to-rem(28px);
247
+
248
+ // gap added to ensure vjs-hover persists when hovering to menu from captions button
249
+ &::after {
250
+ content: "";
251
+ height: px-to-rem(8px);
252
+ left: 0;
253
+ position: absolute;
254
+ right: 0;
255
+ top: 100%;
256
+ }
257
+
258
+ &:before {
259
+ @include typography("body-xsmall");
260
+ content: var(--ilo-video-choose-subtitle-text, "Choose subtitles");
261
+ color: var(--ilo-color-gray-charcoal);
262
+ font-weight: var(--ilo-font-weight-bold);
263
+ left: px-to-rem(12px);
264
+ position: absolute;
265
+ top: px-to-rem(8px);
266
+ }
267
+ }
268
+
269
+ .vjs-menu.vjs-lock-showing:not(.vjs-hidden),
270
+ &.vjs-hover .vjs-menu:not(.vjs-hidden),
271
+ &:hover .vjs-menu:not(.vjs-hidden),
272
+ &:focus-within .vjs-menu:not(.vjs-hidden) {
273
+ display: block;
274
+ }
275
+
276
+ .vjs-menu-content {
277
+ margin: 0;
278
+ max-height: px-to-rem(120px);
279
+ overflow-y: auto;
280
+ padding: 0 0 px-to-rem(4px);
281
+ }
282
+
283
+ .vjs-menu-item {
284
+ @include typography("body-xsmall");
285
+ align-items: center;
286
+ color: var(--ilo-color-gray-charcoal);
287
+ display: flex;
288
+ gap: px-to-rem(8px);
289
+ line-height: px-to-rem(20px);
290
+ padding: px-to-rem(2px) px-to-rem(12px);
291
+ position: relative;
292
+ text-shadow: none;
293
+ white-space: nowrap;
294
+
295
+ &:hover {
296
+ background: var(--ilo-color-neutrals-200);
297
+ }
298
+
299
+ &:before {
300
+ background: transparent;
301
+ border: 2px solid var(--ilo-color-neutrals-500);
302
+ border-radius: 50%;
303
+ content: "";
304
+ display: inline-block;
305
+ height: px-to-rem(10px);
306
+ width: px-to-rem(10px);
307
+ flex-shrink: 0;
308
+ }
309
+
310
+ &.vjs-selected {
311
+ color: var(--ilo-color-gray-charcoal);
312
+
313
+ &:before {
314
+ border-color: var(--ilo-color-neutrals-black);
315
+ box-shadow: inset 0 0 0 px-to-rem(2px) var(--ilo-color-neutrals-200);
316
+ background: var(--ilo-color-neutrals-black);
317
+ }
318
+ }
319
+ }
320
+
321
+ .vjs-menu-item[tabindex="-1"]:first-child .vjs-menu-item-text {
322
+ font-size: 0;
323
+
324
+ &:after {
325
+ @include typography("body-xsmall");
326
+ content: var(--ilo-video-none, "None");
327
+ font-size: px-to-rem(12px);
328
+ line-height: px-to-rem(20px);
329
+ }
330
+ }
331
+
332
+ .vjs-menu .vjs-icon-placeholder {
333
+ display: none;
334
+ }
335
+ }
336
+
213
337
  // Duration Bar
214
338
  .vjs-progress-control {
215
339
  order: 2;
@@ -287,7 +411,7 @@
287
411
 
288
412
  // Volume Control
289
413
  .vjs-volume-panel {
290
- order: 3;
414
+ order: 4;
291
415
  border-bottom: 1px solid;
292
416
  bottom: 0;
293
417
  flex-direction: column;