@ilo-org/styles 1.8.5 → 1.10.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 (124) hide show
  1. package/css/components/accordion.css +1 -1
  2. package/css/components/blockquote.css +1 -1
  3. package/css/components/breadcrumb.css +1 -1
  4. package/css/components/button.css +1 -1
  5. package/css/components/callout.css +1 -1
  6. package/css/components/card.css +1 -1
  7. package/css/components/cardgroup.css +1 -1
  8. package/css/components/checkbox.css +1 -1
  9. package/css/components/container.css +1 -1
  10. package/css/components/contextmenu.css +1 -1
  11. package/css/components/datacard.css +1 -1
  12. package/css/components/datepicker.css +1 -1
  13. package/css/components/detailcard.css +1 -1
  14. package/css/components/dropdown.css +1 -1
  15. package/css/components/empty.css +1 -1
  16. package/css/components/factlistcard.css +1 -1
  17. package/css/components/featurecard.css +1 -1
  18. package/css/components/fieldset.css +1 -1
  19. package/css/components/file-upload.css +1 -1
  20. package/css/components/footer.css +1 -1
  21. package/css/components/form.css +1 -1
  22. package/css/components/formcontrol.css +1 -1
  23. package/css/components/hero.css +1 -1
  24. package/css/components/herocard.css +1 -1
  25. package/css/components/image.css +1 -1
  26. package/css/components/input.css +1 -1
  27. package/css/components/languagetoggle.css +1 -1
  28. package/css/components/link.css +1 -1
  29. package/css/components/linklist.css +1 -1
  30. package/css/components/list.css +1 -1
  31. package/css/components/loading.css +1 -1
  32. package/css/components/logogrid.css +1 -1
  33. package/css/components/modal.css +1 -1
  34. package/css/components/multilinkcard.css +1 -1
  35. package/css/components/navigation.css +1 -1
  36. package/css/components/notification.css +1 -1
  37. package/css/components/pagination.css +1 -1
  38. package/css/components/profile.css +1 -1
  39. package/css/components/promocard.css +1 -1
  40. package/css/components/radio.css +1 -1
  41. package/css/components/readmore.css +1 -1
  42. package/css/components/richtext.css +1 -1
  43. package/css/components/scorecard.css +1 -1
  44. package/css/components/searchfield.css +1 -1
  45. package/css/components/socialmedia.css +1 -1
  46. package/css/components/statcard.css +1 -1
  47. package/css/components/status.css +1 -1
  48. package/css/components/table.css +1 -1
  49. package/css/components/tableofcontents.css +1 -1
  50. package/css/components/tabs.css +1 -1
  51. package/css/components/tag.css +1 -1
  52. package/css/components/textarea.css +1 -1
  53. package/css/components/textcard.css +1 -1
  54. package/css/components/textinput.css +1 -1
  55. package/css/components/toggle.css +1 -1
  56. package/css/components/tooltip.css +1 -1
  57. package/css/components/video.css +1 -1
  58. package/css/global.css +1 -1
  59. package/css/global.css.map +1 -1
  60. package/css/index.css +4 -2
  61. package/css/index.css.map +1 -1
  62. package/css/monorepo.css +4 -2
  63. package/css/monorepo.css.map +1 -1
  64. package/package.json +3 -3
  65. package/scss/_animations.scss +25 -1
  66. package/scss/_mixins.scss +16 -18
  67. package/scss/_typography.scss +28 -12
  68. package/scss/components/_accordion.scss +57 -25
  69. package/scss/components/_blockquote.scss +20 -20
  70. package/scss/components/_breadcrumb.scss +1 -1
  71. package/scss/components/_button.scss +3 -3
  72. package/scss/components/_card.scss +1 -0
  73. package/scss/components/_checkbox.scss +63 -25
  74. package/scss/components/_contextmenu.scss +1 -4
  75. package/scss/components/_datacard.scss +23 -0
  76. package/scss/components/_detailcard.scss +95 -1
  77. package/scss/components/_dropdown.scss +66 -138
  78. package/scss/components/_factlistcard.scss +10 -0
  79. package/scss/components/_featurecard.scss +24 -2
  80. package/scss/components/_fieldset.scss +2 -2
  81. package/scss/components/_file-upload.scss +2 -2
  82. package/scss/components/_footer.scss +30 -68
  83. package/scss/components/_formcontrol.scss +4 -23
  84. package/scss/components/_hero.scss +0 -4
  85. package/scss/components/_herocard.scss +9 -19
  86. package/scss/components/_image.scss +72 -27
  87. package/scss/components/_input.scss +1 -1
  88. package/scss/components/_languagetoggle.scss +8 -2
  89. package/scss/components/_linklist.scss +3 -3
  90. package/scss/components/_multilinkcard.scss +63 -7
  91. package/scss/components/_navigation.scss +12 -27
  92. package/scss/components/_notification.scss +3 -3
  93. package/scss/components/_pagination.scss +1 -1
  94. package/scss/components/_promocard.scss +28 -0
  95. package/scss/components/_readmore.scss +1 -1
  96. package/scss/components/_richtext.scss +15 -63
  97. package/scss/components/_scorecard.scss +23 -0
  98. package/scss/components/_socialmedia.scss +44 -36
  99. package/scss/components/_statcard.scss +27 -3
  100. package/scss/components/_table.scss +4 -5
  101. package/scss/components/_tableofcontents.scss +5 -47
  102. package/scss/components/_textarea.scss +1 -1
  103. package/scss/components/_textcard.scss +19 -0
  104. package/scss/components/_textinput.scss +1 -1
  105. package/scss/components/_tooltip.scss +1 -1
  106. package/scss/components/_video.scss +4 -19
  107. package/scss/components/index.scss +0 -2
  108. package/scss/components/navigation/_nav-complex.scss +16 -161
  109. package/scss/components/navigation/_nav-main.scss +127 -0
  110. package/scss/components/navigation/index.scss +2 -4
  111. package/scss/components/navigation/{_nav-dropdown.scss → internal/_nav-dropdown.scss} +4 -4
  112. package/scss/components/navigation/{_nav-grid.scss → internal/_nav-grid.scss} +4 -4
  113. package/scss/components/navigation/{_nav-menu.scss → internal/_nav-menu.scss} +31 -6
  114. package/scss/components/navigation/internal/_nav-shared.scss +206 -0
  115. package/scss/components/navigation/internal/index.scss +5 -0
  116. package/scss/components/navigation/{mobile → internal/mobile}/_nav-mobile-drawer.scss +4 -4
  117. package/scss/components/navigation/{mobile → internal/mobile}/_nav-mobile-menu.scss +4 -4
  118. package/scss/components/navigation/{mobile → internal/mobile}/_nav-mobile.scss +25 -4
  119. package/scss/theme/_typography.scss +2 -4
  120. package/css/components/credit.css +0 -1
  121. package/css/components/heading.css +0 -1
  122. package/scss/components/_credit.scss +0 -112
  123. package/scss/components/_heading.scss +0 -74
  124. /package/scss/components/navigation/{mobile → internal/mobile}/index.scss +0 -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.8.5",
4
+ "version": "1.10.0",
5
5
  "repository": {
6
6
  "type": "git",
7
7
  "url": "https://github.com/international-labour-organization/designsystem.git",
@@ -38,8 +38,8 @@
38
38
  "author": "@justintemps, @johnpauldavis, @avrilpearl, @ghlost",
39
39
  "license": "Apache-2.0",
40
40
  "dependencies": {
41
- "@ilo-org/fonts": "1.0.0",
42
- "@ilo-org/icons": "2.1.0",
41
+ "@ilo-org/fonts": "2.0.0",
42
+ "@ilo-org/icons": "2.3.0",
43
43
  "@ilo-org/themes": "0.9.1"
44
44
  },
45
45
  "devDependencies": {
@@ -2,7 +2,6 @@
2
2
  // $ANIMATIONS
3
3
  //*------------------------------------*/
4
4
  @use "tokens" as *;
5
- @import "mixins";
6
5
 
7
6
  // ======================================
8
7
  // Global transition
@@ -39,3 +38,28 @@
39
38
  transform: rotate(360deg);
40
39
  }
41
40
  }
41
+
42
+ // ======================================
43
+ // Animation for loading skeletons
44
+ // ======================================
45
+ @mixin pulse-animation() {
46
+ animation-name: pulse;
47
+ animation-delay: 0.5s;
48
+ animation-duration: 2s;
49
+ animation-timing-function: ease-in-out;
50
+ animation-iteration-count: infinite;
51
+ }
52
+
53
+ @keyframes pulse {
54
+ 0% {
55
+ opacity: 1;
56
+ }
57
+
58
+ 50% {
59
+ opacity: 0.4;
60
+ }
61
+
62
+ 100% {
63
+ opacity: 1;
64
+ }
65
+ }
package/scss/_mixins.scss CHANGED
@@ -3,20 +3,9 @@
3
3
  //*------------------------------------*/
4
4
  @use "tokens" as *;
5
5
  @use "functions" as *;
6
+ @use "animations" as *;
6
7
  @use "theme/breakpoints" as *;
7
8
 
8
- // ======================================
9
- // Output font styles
10
- // ======================================
11
- /// Retrieve the usual font styles for a given type styling
12
- /// @param {String} $stylename - the name of the style to get
13
- /// @return {CSS} font size, line-height, and letter-spacing for this type style
14
- @mixin font-styles($stylename) {
15
- font-size: map-get($type, $stylename, "size");
16
- letter-spacing: map-get($type, $stylename, "letter-spacing");
17
- line-height: map-get($type, $stylename, "line-height");
18
- }
19
-
20
9
  // ======================================
21
10
  // Visually Hidden
22
11
  //
@@ -285,7 +274,8 @@
285
274
  // ======================================
286
275
 
287
276
  @mixin caption-icon-wrapper($dir: "right", $width, $height) {
288
- background: map-get($color, "tooltip", "dark", "background");
277
+ --ilo-caption-icon-wrapper-bg-color: var(--ilo-color-gray-charcoal);
278
+ background: var(--ilo-caption-icon-wrapper-bg-color);
289
279
  height: $height;
290
280
  width: $width;
291
281
  display: flex;
@@ -306,7 +296,7 @@
306
296
  border-right: none;
307
297
  border-left: calc(#{$height} - 4px)
308
298
  solid
309
- map-get($color, "tooltip", "dark", "background");
299
+ var(--ilo-caption-icon-wrapper-bg-color);
310
300
  }
311
301
 
312
302
  @if ($dir == "left") {
@@ -315,7 +305,7 @@
315
305
  border-left: none;
316
306
  border-right: calc(#{$height} - 4px)
317
307
  solid
318
- map-get($color, "tooltip", "dark", "background");
308
+ var(--ilo-caption-icon-wrapper-bg-color);
319
309
  }
320
310
  }
321
311
  }
@@ -411,11 +401,11 @@
411
401
  @if $variant == "heading-1" {
412
402
  font-size: var(--ilo-font-size-5xlg);
413
403
  font-weight: var(--ilo-font-weight-bold);
414
- line-height: var(--ilo-line-height-xsm);
404
+ line-height: var(--ilo-line-height-md);
415
405
  letter-spacing: var(--ilo-letter-spacing-xsm);
416
406
  @if $mobile {
417
407
  font-size: var(--ilo-font-size-4xlg);
418
- line-height: var(--ilo-line-height-sm);
408
+ line-height: var(--ilo-line-height-md);
419
409
  }
420
410
  } @else if $variant == "heading-2" {
421
411
  font-size: var(--ilo-font-size-3xlg);
@@ -446,7 +436,7 @@
446
436
  } @else if $variant == "blockquote" {
447
437
  font-size: var(--ilo-font-size-4xlg);
448
438
  font-weight: var(--ilo-font-weight-light);
449
- line-height: var(--ilo-line-height-sm);
439
+ line-height: var(--ilo-line-height-md);
450
440
  letter-spacing: var(--ilo-letter-spacing-xsm);
451
441
  @if $mobile {
452
442
  font-size: var(--ilo-font-size-2xlg);
@@ -555,3 +545,11 @@
555
545
  @error "Typography variant '#{$variant}' not recognized";
556
546
  }
557
547
  }
548
+
549
+ @mixin skeleton-element($height, $width) {
550
+ height: px-to-rem($height);
551
+ width: $width;
552
+ background: var(--ilo-skeleton-element-background-color);
553
+
554
+ @include pulse-animation();
555
+ }
@@ -7,6 +7,34 @@
7
7
  // Load the theme vars and fonts
8
8
  @use "@ilo-org/themes/build/scss/tokens" as *;
9
9
 
10
+ // Set Arabic fonts
11
+ :root[lang*="ar"],
12
+ [lang*="ar"] {
13
+ --ilo-fonts-display: var(--ilo-fonts-display-ar);
14
+ --ilo-fonts-copy: var(--ilo-fonts-copy-ar);
15
+
16
+ // Letter spacing overrides for Arabic. Different letter spacing values cause incorrect
17
+ // glpyhs to be rendered. See https://github.com/international-labour-organization/designsystem/issues/1547
18
+ --ilo-letter-spacing-xsm: 0;
19
+ --ilo-letter-spacing-sm: 0;
20
+ --ilo-letter-spacing-md: 0;
21
+ --ilo-letter-spacing-lg: 0;
22
+ }
23
+
24
+ // Set Chinese system fonts
25
+ :root[lang*="zh"],
26
+ [lang*="zh"] {
27
+ --ilo-fonts-display: var(--ilo-fonts-display-zh);
28
+ --ilo-fonts-copy: var(--ilo-fonts-copy-zh);
29
+ }
30
+
31
+ // Set Japanese system fonts
32
+ :root[lang*="ja"],
33
+ [lang*="ja"] {
34
+ --ilo-fonts-display: var(--ilo-fonts-display-jp);
35
+ --ilo-fonts-copy: var(--ilo-fonts-copy-jp);
36
+ }
37
+
10
38
  html,
11
39
  body {
12
40
  color: $color-font-base;
@@ -25,15 +53,3 @@ h5,
25
53
  h5 {
26
54
  font-family: var(--ilo-fonts-display);
27
55
  }
28
-
29
- // Set Chinese system fonts
30
- html[lang*="zh"] {
31
- --ilo-fonts-display: var(--ilo-fonts-display-zh);
32
- --ilo-fonts-copy: var(--ilo-fonts-copy-zh);
33
- }
34
-
35
- // Set Japanese system fonts
36
- html[lang*="ja"] {
37
- --ilo-fonts-display: var(--ilo-fonts-display-jp);
38
- --ilo-fonts-copy: var(--ilo-fonts-copy-jp);
39
- }
@@ -3,95 +3,127 @@
3
3
  @import "../mixins";
4
4
  @import "../config";
5
5
 
6
+ // =============================================================================
7
+ // ACCORDION COMPONENT
8
+ // =============================================================================
9
+
6
10
  .#{$prefix}--accordion {
11
+ // CSS Custom Properties
12
+ // ---------------------------------------------------------------------------
7
13
  --ilo-accordion-color-icon: var(--ilo-color-blue-dark);
14
+ --ilo-accordion-transition-timing: 500ms; // Slower timing for smooth height transitions
15
+ --ilo-accordion-scroll-max-height: 300px;
8
16
 
9
- // This provides a reference to the outerclass within nested declarations
10
17
  $accordion: &;
11
18
 
12
- // Accordion contents can add lots of height so the transition timing can't
13
- // be too fast which is why we're using a custom value here.
14
- $transition-timing: 500ms;
15
-
16
- // If the accordion item is scrollable, then this is its max-height
17
- $scroll-max-height: 300px;
18
-
19
+ // Icon Styles
20
+ // ---------------------------------------------------------------------------
19
21
  &--icon {
20
22
  width: 24px;
21
23
  height: 24px;
22
24
  }
23
25
 
26
+ // Label Styles
27
+ // ---------------------------------------------------------------------------
28
+ &--label {
29
+ flex: 1;
30
+ padding-right: 10px;
31
+ }
32
+
33
+ // Button Styles
34
+ // ---------------------------------------------------------------------------
24
35
  &--button {
36
+ // Layout
25
37
  display: flex;
26
38
  flex-direction: row;
27
39
  justify-content: space-between;
28
40
  width: 100%;
29
41
  margin: 0;
42
+
43
+ // Spacing
30
44
  padding-block: spacing(4);
31
45
  padding-inline-end: spacing(1);
32
- background-color: $color-ux-background-default;
46
+
47
+ // Visual
48
+ background-color: var(--ilo-color-white);
33
49
  border: none;
34
- border-top: 2px solid $color-base-neutrals-lighter;
35
- font-family: var(--ilo-fonts-display);
36
- color: $color-ux-labels-actionable;
37
- font-weight: $type-weights-section;
38
- transition: all $transition-timing ease-in-out;
39
- @include font-styles("label-medium");
50
+ border-top: 2px solid var(--ilo-color-gray-light);
51
+ color: var(--ilo-color-blue-dark);
40
52
 
53
+ // Animation
54
+ transition: all var(--ilo-accordion-transition-timing) ease-in-out;
55
+
56
+ // Typography
57
+ @include typography("highlight-medium");
58
+
59
+ // Large variant
41
60
  &__large {
42
- @include font-styles("headline-6");
61
+ @include typography("highlight-large");
43
62
  padding-block: spacing(5);
44
63
  }
45
64
 
65
+ // Expanded state
46
66
  &[aria-expanded="true"] {
47
- background-color: $color-base-blue-light;
67
+ background-color: var(--ilo-color-blue-lighter);
68
+
48
69
  #{$accordion}--icon {
49
70
  @include icon("minus", var(--ilo-color-blue));
50
71
  }
51
72
  }
52
73
 
74
+ // Collapsed state
53
75
  &[aria-expanded="false"] {
54
76
  #{$accordion}--icon {
55
77
  @include icon("plus", var(--ilo-color-blue-dark));
56
78
  }
57
79
  }
58
80
 
81
+ // Interactive states
59
82
  &:hover,
60
83
  &:focus {
61
84
  --ilo-accordion-color-icon: var(--ilo-color-blue);
62
- border-top-color: $color-ux-borders-hover;
63
- color: $color-ux-labels-hover;
85
+ border-top-color: var(--ilo-color-blue);
86
+ color: var(--ilo-color-blue);
64
87
  cursor: pointer;
65
88
  }
66
89
 
90
+ // Responsive adjustments
67
91
  @include breakpoint("md") {
68
- @include font-styles("label-medium");
92
+ @include typography("highlight-medium");
93
+
69
94
  &__large {
70
- @include font-styles("headline-6");
95
+ @include typography("highlight-large");
71
96
  padding: spacing(5) 0;
72
97
  }
73
98
  }
74
99
  }
75
100
 
101
+ // Panel Styles
102
+ // ---------------------------------------------------------------------------
76
103
  &--panel {
77
104
  $panel: &;
78
105
 
106
+ // Collapsed state
79
107
  max-height: 0;
80
- transition: all $transition-timing cubic-bezier(0, 1, 0, 1);
81
108
  overflow: hidden;
109
+ transition: all var(--ilo-accordion-transition-timing)
110
+ cubic-bezier(0, 1, 0, 1);
82
111
 
112
+ // Inner panel content
83
113
  #{$accordion}--innerpanel {
84
- padding-bottom: spacing(9);
85
114
  padding-top: spacing(2);
115
+ padding-bottom: spacing(9);
86
116
  padding-inline-end: spacing(8);
87
117
  }
88
118
 
119
+ // Open state
89
120
  &__open {
90
121
  max-height: 100vh;
91
- transition: all $transition-timing ease-in-out;
122
+ transition: all var(--ilo-accordion-transition-timing) ease-in-out;
92
123
 
124
+ // Scrollable variant
93
125
  &#{$panel}__scroll {
94
- max-height: $scroll-max-height;
126
+ max-height: var(--ilo-accordion-scroll-max-height);
95
127
  overflow-y: auto;
96
128
  }
97
129
  }
@@ -4,37 +4,40 @@
4
4
  @import "../config";
5
5
 
6
6
  /**
7
- This mixin is also used in _richtext.scss component to style blockquotes.
8
- **/
7
+ * This mixin is also used in _richtext.scss component to style blockquotes.
8
+ */
9
9
  @mixin blockquote {
10
+ // Layout & background
10
11
  background-color: var(--ilo-color-blue-lighter);
11
12
  background-position: right top;
12
13
  background-repeat: no-repeat;
13
14
  background-size: px-to-rem(72px) px-to-rem(40px);
14
15
  display: block;
15
- font-family: var(--ilo-fonts-display);
16
- padding: spacing(19) 0 spacing(9) spacing(8); // check
17
- position: relative;
18
16
  width: fit-content;
17
+ position: relative;
19
18
  border-bottom: px-to-rem(3px) solid var(--ilo-color-gray-base);
20
19
  @include cornercut(72px, 40px);
21
20
 
21
+ // Typography & spacing
22
+ font-family: var(--ilo-fonts-display);
23
+ padding: spacing(19) 0 spacing(9) spacing(8);
24
+
22
25
  p {
26
+ @include typography("blockquote", true);
23
27
  color: var(--ilo-color-purple);
24
- font-weight: 300;
25
28
  padding: 0 spacing(12) 0 0;
29
+ margin-bottom: spacing(6);
26
30
  position: relative;
27
- @include font-styles("pull-quote-sm");
28
31
 
29
32
  &:after {
30
- bottom: 0;
31
33
  content: "";
32
34
  display: inline-block;
33
- height: px-to-rem(20px);
34
35
  position: absolute;
36
+ bottom: 0;
35
37
  right: 0;
36
- transform: scaleX(-1);
37
38
  width: px-to-rem(26.5px);
39
+ height: px-to-rem(20px);
40
+ transform: scaleX(-1);
38
41
  @include icon("quote", var(--ilo-color-purple));
39
42
  }
40
43
  }
@@ -42,21 +45,20 @@ This mixin is also used in _richtext.scss component to style blockquotes.
42
45
  cite {
43
46
  color: var(--ilo-color-gray-accessible);
44
47
  font-weight: 400;
45
- // @include font-styles("pull-quote-cite");
46
48
  font-size: var(--ilo-font-size-sm);
47
49
  line-height: 135%;
48
- letter-spacing: 0;
50
+ letter-spacing: var(--ilo-letter-spacing-md);
49
51
  font-style: normal;
50
52
  }
51
53
 
52
54
  &:before {
53
55
  content: "";
54
56
  display: inline-block;
55
- height: px-to-rem(40px);
56
- left: 0;
57
57
  position: absolute;
58
- width: px-to-rem(53px);
59
58
  top: 0;
59
+ left: 0;
60
+ width: px-to-rem(53px);
61
+ height: px-to-rem(40px);
60
62
  @include icon("quote", var(--ilo-color-purple));
61
63
  }
62
64
 
@@ -66,20 +68,19 @@ This mixin is also used in _richtext.scss component to style blockquotes.
66
68
  @include cornercut(86px, 48px);
67
69
 
68
70
  p {
69
- margin-bottom: spacing(6);
70
71
  padding: 0 spacing(12) 0 0;
71
72
  position: relative;
72
- @include font-styles("pull-quote-lg");
73
+ @include typography("blockquote", false);
73
74
 
74
75
  &:after {
75
- height: px-to-rem(24px);
76
76
  width: px-to-rem(32px);
77
+ height: px-to-rem(24px);
77
78
  }
78
79
  }
79
80
 
80
81
  &:before {
81
- height: px-to-rem(48px);
82
82
  width: px-to-rem(64px);
83
+ height: px-to-rem(48px);
83
84
  }
84
85
  }
85
86
 
@@ -106,7 +107,6 @@ This mixin is also used in _richtext.scss component to style blockquotes.
106
107
 
107
108
  @include breakpoint("md") {
108
109
  padding: spacing(15) spacing(12) spacing(12) 0;
109
-
110
110
  @include cornercut(86px, 48px, "left");
111
111
  }
112
112
  }
@@ -171,7 +171,7 @@
171
171
  max-width: 30ch;
172
172
  font-family: var(--ilo-fonts-copy);
173
173
  font-weight: 400;
174
- @include font-styles("body-xxs");
174
+ @include typography("body-xsmall");
175
175
 
176
176
  &:hover,
177
177
  &:focus {
@@ -54,7 +54,7 @@
54
54
  &__large {
55
55
  padding: spacing(3) spacing(6);
56
56
  height: px-to-rem(52px);
57
- @include font-styles("button-large");
57
+ @include typography("heading-4");
58
58
 
59
59
  &.#{$prefix}--button--icon--only {
60
60
  width: px-to-rem(52px);
@@ -64,7 +64,7 @@
64
64
  &__medium {
65
65
  padding: spacing(2) spacing(5);
66
66
  height: px-to-rem(44px);
67
- @include font-styles("button-medium");
67
+ @include typography("highlight-medium-bold");
68
68
 
69
69
  &.#{$prefix}--button--icon--only {
70
70
  width: px-to-rem(44px);
@@ -74,7 +74,7 @@
74
74
  &__small {
75
75
  padding: spacing(1) spacing(4);
76
76
  height: px-to-rem(32px);
77
- @include font-styles("button-small");
77
+ @include typography("highlight-small-bold");
78
78
 
79
79
  &.#{$prefix}--button--icon--only {
80
80
  width: px-to-rem(32px);
@@ -133,6 +133,7 @@ $link-hover-selectors: ".ilo--card--link:hover, .ilo--card--link:focus, .ilo--ca
133
133
  &__light {
134
134
  background: var(--ilo-color-white);
135
135
  border-bottom: px-to-rem(3px) solid var(--ilo-color-gray-base);
136
+ --ilo-skeleton-element-background-color: var(--ilo-color-gray-light);
136
137
  }
137
138
 
138
139
  &__soft {
@@ -1,90 +1,128 @@
1
- @use "../tokens" as *;
2
1
  @use "../functions" as *;
3
2
  @import "../mixins";
4
3
 
4
+ // =============================================================================
5
+ // CHECKBOX COMPONENT
6
+ // =============================================================================
7
+
5
8
  .ilo--checkbox {
9
+ // Reset default appearance
6
10
  -webkit-appearance: none;
7
11
  -moz-appearance: none;
8
12
  appearance: none;
9
13
  border: none;
14
+
15
+ // Layout
10
16
  display: grid;
11
- height: px-to-rem(24px);
12
- margin: 0;
13
17
  position: relative;
14
18
  place-content: center;
19
+
20
+ // Dimensions
15
21
  width: px-to-rem(24px);
22
+ height: px-to-rem(24px);
23
+
24
+ // Spacing
25
+ margin: 0;
26
+
27
+ // Visual
16
28
  transform: none;
17
29
  cursor: pointer;
18
30
 
31
+ // Inner checkmark (::before pseudo-element)
32
+ // ---------------------------------------------------------------------------
19
33
  &:before {
20
34
  content: "";
21
- background-color: $color-base-neutrals-light;
22
- height: px-to-rem(16px);
23
- left: px-to-rem(4px);
35
+
36
+ // Layout
24
37
  position: absolute;
38
+ left: px-to-rem(4px);
25
39
  top: px-to-rem(4px);
26
- width: px-to-rem(16px);
27
40
  z-index: 1;
41
+
42
+ // Dimensions
43
+ width: px-to-rem(16px);
44
+ height: px-to-rem(16px);
45
+
46
+ // Visual
47
+ background-color: var(--ilo-color-gray-base);
28
48
  }
29
49
 
50
+ // Outer border/background (::after pseudo-element)
51
+ // ---------------------------------------------------------------------------
30
52
  &:after {
31
53
  content: "";
32
- background-color: $color-base-neutrals-light;
33
- border: px-to-rem(4px) solid $color-base-neutrals-light;
34
- height: px-to-rem(24px);
35
- left: 0;
54
+
55
+ // Layout
36
56
  position: absolute;
57
+ left: 0;
37
58
  top: 0;
38
- width: px-to-rem(24px);
39
59
  z-index: 0;
60
+
61
+ // Dimensions
62
+ width: px-to-rem(24px);
63
+ height: px-to-rem(24px);
64
+
65
+ // Visual
66
+ background-color: var(--ilo-color-gray-base);
67
+ border: px-to-rem(4px) solid var(--ilo-color-gray-base);
40
68
  }
41
69
 
70
+ // Checked state
71
+ // ---------------------------------------------------------------------------
42
72
  &:checked {
43
73
  &:before {
44
- background-color: $color-base-blue-dark;
74
+ // Visual
75
+ background-color: var(--ilo-color-blue-dark);
45
76
  background-repeat: no-repeat;
46
- background-size: contain;
47
77
  background-position: center center;
48
- background-size: 24px;
49
- @include dataurlicon("check", $color-base-neutrals-lighter);
78
+ background-size: px-to-rem(24px);
79
+
80
+ // Icon
81
+ @include icon("check", var(--ilo-color-gray-light));
50
82
  }
51
83
 
52
84
  &:after {
53
- background-color: $color-base-blue-dark;
54
- border-color: $color-base-blue-dark;
85
+ // Visual
86
+ background-color: var(--ilo-color-blue-dark);
87
+ border-color: var(--ilo-color-dark-blue);
55
88
  }
56
89
  }
57
90
 
91
+ // Focus state
92
+ // ---------------------------------------------------------------------------
58
93
  &:focus {
94
+ outline: none;
95
+
59
96
  &:after {
60
- background-color: $color-base-yellow;
61
- border-color: $color-base-yellow;
97
+ border-color: var(--ilo-color-yellow);
62
98
  }
63
99
 
64
100
  &:checked {
65
101
  &:after {
66
- border-color: $color-base-yellow;
102
+ border-color: var(--ilo-color-yellow);
67
103
  }
68
104
  }
69
-
70
- outline: none;
71
105
  }
72
106
 
107
+ // Disabled state
108
+ // ---------------------------------------------------------------------------
73
109
  &:disabled {
74
110
  opacity: 0.45;
75
111
  pointer-events: none;
76
112
  }
77
113
 
114
+ // Error/Invalid state
115
+ // ---------------------------------------------------------------------------
78
116
  &:invalid,
79
117
  &__error,
80
118
  &__error & {
81
119
  &:after {
82
- border-color: $color-base-red-medium;
120
+ border-color: var(--ilo-color-red);
83
121
  }
84
122
 
85
123
  &:checked {
86
124
  &:after {
87
- border-color: $color-base-blue-dark;
125
+ border-color: var(--ilo-color-dark-blue);
88
126
  }
89
127
  }
90
128
  }
@@ -57,13 +57,10 @@
57
57
  border-bottom: px-to-rem($borders-base) solid var(--ilo-color-white);
58
58
  color: var(--ilo-color-blue-dark);
59
59
  display: inline-block;
60
- font-family: var(--ilo-fonts-copy);
61
- font-weight: map-get($type, "weights", "section");
62
60
  padding: spacing(4) spacing(2);
63
61
  text-decoration: none;
64
62
  width: 100%;
65
- @include font-styles("body-xxs");
66
- letter-spacing: -0.1px;
63
+ @include typography("body-xsmall");
67
64
 
68
65
  &:active {
69
66
  color: var(--ilo-color-blue);