@ilo-org/styles 1.5.0 → 1.6.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.
@@ -3,40 +3,39 @@
3
3
  @import "../animations";
4
4
  @import "../mixins";
5
5
 
6
- $row-1-lg: 64px;
7
- $avatar-size-lg: $row-1-lg;
8
-
9
6
  .ilo--profile {
10
7
  $c: &;
11
8
 
9
+ $row-1-lg: #{px-to-rem(64px)};
10
+ $row-1-sm: #{px-to-rem(48px)};
11
+
12
+ --row-1-height: #{$row-1-lg};
13
+
12
14
  display: grid;
13
15
  grid-template-columns: min-content 1fr;
14
- grid-template-rows: minmax($row-1-lg, auto) auto;
16
+ grid-template-rows: repeat(minmax(var(--row-1-height), auto));
15
17
  max-width: px-to-rem(343px);
16
18
  width: 100%;
19
+ row-gap: spacing(5);
20
+ column-gap: spacing(4);
17
21
 
18
22
  &--avatar {
19
23
  grid-row: 1;
20
24
  border-radius: 50%;
25
+ height: var(--row-1-height);
26
+ width: var(--row-1-height);
21
27
  }
22
28
 
23
29
  figcaption {
24
- box-sizing: border-box;
25
- grid-row: 1;
26
- grid-column-end: -1;
27
30
  display: flex;
28
31
  flex-flow: column;
29
32
  justify-content: center;
30
- align-items: start;
33
+ grid-row: 1;
34
+ grid-column-end: -1;
31
35
  }
32
36
 
33
37
  &--figcaption--content {
34
- box-sizing: border-box;
35
38
  width: 100%;
36
- display: flex;
37
- flex-flow: column;
38
- justify-content: center;
39
- align-items: start;
40
39
  position: relative;
41
40
 
42
41
  &:after {
@@ -44,20 +43,25 @@ $avatar-size-lg: $row-1-lg;
44
43
  position: absolute;
45
44
  bottom: -12px;
46
45
  width: 100%;
47
- border-bottom: 2px solid $color-base-neutrals-lighter;
46
+ border-bottom: 2px solid var(--ilo-color-gray-light);
47
+ }
48
+
49
+ #{$c}__size__small &::after {
50
+ content: none;
48
51
  }
49
52
  }
50
53
 
51
54
  &--name {
52
- font-family: var(--ilo-fonts-display);
55
+ @include typography("highlight-medium-bold");
53
56
  }
54
57
 
55
- &--role {
56
- font-family: var(--ilo-fonts-copy);
58
+ &--role,
59
+ &--description {
60
+ @include typography("body-small");
61
+ color: var(--ilo-color-gray-accessible);
57
62
  }
58
63
 
59
64
  &--description {
60
- font-family: var(--ilo-fonts-copy);
61
65
  grid-row: 2;
62
66
  grid-column: 1 / -1;
63
67
  }
@@ -65,118 +69,74 @@ $avatar-size-lg: $row-1-lg;
65
69
  &--link {
66
70
  $link: &;
67
71
 
68
- font-family: var(--ilo-fonts-display);
72
+ $icon: "[class*='icon']";
73
+
74
+ @include typography("highlight-medium");
75
+ color: var(--ilo-color-dark-blue);
69
76
  grid-column: 1 / -1;
70
77
 
71
78
  a {
79
+ display: inline-flex;
72
80
  text-decoration: none;
73
- color: map-get($color, "link", "text", "default");
74
- display: inline-block;
75
- }
76
-
77
- &--label {
78
- display: flex;
79
81
  flex-flow: row nowrap;
80
82
  align-items: center;
83
+ gap: spacing(2);
84
+ @include globaltransition("color");
81
85
 
82
- &:after {
83
- position: relative;
84
- bottom: px-to-rem(1px);
85
- height: px-to-rem(24px);
86
- width: px-to-rem(24px);
87
- margin-inline-start: spacing(2);
88
- content: "";
89
- @include dataurlicon("chevron_right", $color-link-text-default);
90
-
91
- [dir="rtl"] & {
92
- @include dataurlicon("chevron_left", $color-link-text-default);
93
- }
86
+ &:hover,
87
+ &:focus,
88
+ &:focus-within {
89
+ color: var(--ilo-color-blue);
94
90
  }
95
91
  }
96
92
 
97
- a:hover,
98
- a:focus {
99
- #{$link}--label {
100
- color: map-get($color, "link", "text", "hover");
101
- outline: none;
93
+ #{$icon} {
94
+ position: relative;
95
+ bottom: px-to-rem(1px);
102
96
 
103
- &:after {
104
- @include dataurlicon("chevron_right", $color-link-text-hover);
105
-
106
- [dir="rtl"] & {
107
- @include dataurlicon("chevron_left", $color-link-text-hover);
108
- }
109
- }
97
+ [dir="rtl"] & {
98
+ transform: rotate(180deg);
110
99
  }
111
100
  }
112
- }
113
101
 
114
- &__theme {
115
- &__dark {
116
- color: $color-base-neutrals-lighter;
117
-
118
- #{$c}--link {
119
- &--label {
120
- &:after {
121
- @include dataurlicon("chevron_right", $color-base-neutrals-lighter);
122
-
123
- [dir="rtl"] & {
124
- @include dataurlicon(
125
- "chevron_left",
126
- $color-base-neutrals-lighter
127
- );
128
- }
129
- }
130
- }
131
-
132
- a {
133
- color: $color-base-neutrals-lighter;
134
- }
135
-
136
- a:hover,
137
- a:focus {
138
- #{$c}--link--label {
139
- color: $brand-ilo-turquoise;
140
- outline: none;
141
-
142
- &:after {
143
- @include dataurlicon("chevron_right", $brand-ilo-turquoise);
144
-
145
- [dir="rtl"] & {
146
- @include dataurlicon("chevron_left", $brand-ilo-turquoise);
147
- }
148
- }
149
- }
150
- }
151
- }
102
+ &--label {
103
+ display: flex;
104
+ flex-flow: row nowrap;
105
+ align-items: center;
152
106
  }
153
107
  }
154
108
 
155
109
  &__size {
156
- &__large {
157
- #{$c}--avatar {
158
- width: px-to-rem($avatar-size-lg);
159
- height: px-to-rem($avatar-size-lg);
160
- margin-inline-end: spacing(4);
161
- }
110
+ &__small {
111
+ --row-1-height: #{$row-1-sm};
112
+ column-gap: spacing(3);
162
113
 
163
114
  #{$c}--name {
164
- font-weight: map-get($type, "weights", "label");
165
- @include font-styles("body-small");
115
+ @include typography("highlight-small-bold");
166
116
  }
117
+ }
167
118
 
168
- #{$c}--role {
169
- @include font-styles("body-xs");
170
- }
119
+ &__large {
120
+ --row-1-height: #{$row-1-lg};
121
+ }
122
+ }
123
+
124
+ &__theme {
125
+ &__dark {
126
+ color: var(--ilo-color-white);
171
127
 
172
- #{$c}--description {
173
- @include font-styles("body-xs");
174
- padding-block-start: spacing(5);
128
+ #{$c}--figcaption--content {
129
+ &:after {
130
+ border-color: var(--ilo-color-white);
131
+ }
175
132
  }
176
133
 
177
- #{$c}--link {
178
- @include font-styles("body-small");
179
- padding-block-start: spacing(6);
134
+ #{$c}--name,
135
+ #{$c}--role,
136
+ #{$c}--description,
137
+ #{$c}--link,
138
+ a {
139
+ color: var(--ilo-color-white);
180
140
  }
181
141
  }
182
142
  }
@@ -0,0 +1,177 @@
1
+ @use "../tokens" as *;
2
+ @use "../functions" as *;
3
+ @use "../animations" as *;
4
+ @import "../mixins";
5
+
6
+ .ilo--card {
7
+ $self: &;
8
+
9
+ &__type {
10
+ &__score {
11
+ --max-width: #{px-to-rem(412px)};
12
+
13
+ display: flex;
14
+ margin-top: 0;
15
+ position: relative;
16
+
17
+ // Content Layout
18
+ #{$self}--wrap {
19
+ display: flex;
20
+ flex-direction: column;
21
+ width: 100%;
22
+ }
23
+
24
+ #{$self}--content {
25
+ display: flex;
26
+ flex: 1 1 auto;
27
+ flex-direction: column;
28
+ padding: spacing(6) spacing(6) spacing(8) spacing(6);
29
+ width: 100%;
30
+ }
31
+
32
+ #{$self}--image--wrapper {
33
+ height: 0;
34
+ overflow: hidden;
35
+ padding-top: 56.25%;
36
+ width: 100%;
37
+
38
+ img {
39
+ position: absolute;
40
+ top: 50%;
41
+ left: 50%;
42
+ transform: translate(-50%, -50%);
43
+ height: auto;
44
+ width: 100%;
45
+ }
46
+ }
47
+
48
+ .ilo--status {
49
+ margin-bottom: spacing(6);
50
+ }
51
+
52
+ #{$self}--eyebrow {
53
+ margin-bottom: spacing(4);
54
+ }
55
+
56
+ #{$self}--title {
57
+ @include font-styles("headline-5");
58
+ font-family: var(--ilo-fonts-display);
59
+ font-weight: 700;
60
+ margin-bottom: spacing(6);
61
+ }
62
+
63
+ #{$self}--area {
64
+ &--content {
65
+ display: flex;
66
+ flex-flow: column;
67
+ gap: spacing(2);
68
+ margin-bottom: spacing(6);
69
+ }
70
+
71
+ &--cta {
72
+ display: flex;
73
+ flex-flow: row wrap;
74
+ gap: spacing(2);
75
+ }
76
+ }
77
+
78
+ #{$self}--content--item {
79
+ display: flex;
80
+ flex-flow: row nowrap;
81
+ justify-content: flex-start;
82
+ align-items: center;
83
+ gap: spacing(2);
84
+ }
85
+
86
+ &#{$self}__size {
87
+ // narrow is the default
88
+
89
+ &__wide,
90
+ &__fluid {
91
+ --max-width: #{px-to-rem(754px)};
92
+
93
+ @include breakpoint("md") {
94
+ #{$self}--wrap {
95
+ flex-direction: row;
96
+ }
97
+
98
+ #{$self}--content {
99
+ width: 50%;
100
+ }
101
+
102
+ #{$self}--image--wrapper {
103
+ padding: 0;
104
+ height: initial;
105
+ width: 50%;
106
+ }
107
+
108
+ img {
109
+ object-fit: cover;
110
+ max-width: initial;
111
+ height: 100%;
112
+ width: 100%;
113
+ }
114
+
115
+ #{$self}--date,
116
+ #{$self}--eyebrow,
117
+ #{$self}--title {
118
+ width: 100%;
119
+ }
120
+
121
+ #{$self}--date {
122
+ align-self: flex-end;
123
+ }
124
+ }
125
+ }
126
+
127
+ &__simple {
128
+ --max-width: #{px-to-rem(754px)};
129
+
130
+ #{$self}--content {
131
+ padding: spacing(3) spacing(4);
132
+ display: grid;
133
+ grid-template-columns: 1fr;
134
+ grid-template-rows: repeat(3, auto);
135
+ gap: spacing(4);
136
+ grid-template-areas:
137
+ "title"
138
+ "cta"
139
+ "status"
140
+ "content";
141
+
142
+ @include breakpoint("md") {
143
+ grid-template-columns: min-content 1fr 1fr;
144
+ grid-template-areas:
145
+ "title title cta"
146
+ "status content content";
147
+ }
148
+
149
+ .ilo--status {
150
+ grid-area: status;
151
+ }
152
+
153
+ #{$self}--title {
154
+ grid-area: title;
155
+ font-size: var(--ilo-font-size-lg);
156
+ line-height: var(--ilo-line-height-lg);
157
+ letter-spacing: var(--ilo-letter-spacing-sm);
158
+ }
159
+
160
+ #{$self}--area--content {
161
+ grid-area: content;
162
+ flex-flow: row wrap;
163
+ }
164
+
165
+ #{$self}--area--cta {
166
+ grid-area: cta;
167
+
168
+ @include breakpoint("md") {
169
+ justify-content: flex-end;
170
+ }
171
+ }
172
+ }
173
+ }
174
+ }
175
+ }
176
+ }
177
+ }
@@ -0,0 +1,51 @@
1
+ @use "../tokens" as *;
2
+ @use "../functions" as *;
3
+ @use "../animations" as *;
4
+ @import "../mixins";
5
+
6
+ .ilo--status {
7
+ // Layout
8
+ box-sizing: border-box;
9
+ height: px-to-rem(35px);
10
+ display: inline-flex;
11
+ flex-flow: row nowrap;
12
+ align-items: center;
13
+ margin: 0;
14
+ padding: spacing(2) spacing(3);
15
+ width: fit-content;
16
+
17
+ // Font styles
18
+ font-family: var(--ilo-fonts-display);
19
+ font-size: var(--ilo-font-size-sm);
20
+ font-weight: var(--ilo-font-weight-medium);
21
+ line-height: var(--ilo-line-height-xlg);
22
+ letter-spacing: var(--ilo-letter-spacing-sm);
23
+
24
+ // Colors and border
25
+ color: var(--ilo-color-blue-dark);
26
+ background-color: var(--ilo-color-green-light);
27
+ border-radius: px-to-rem(2px);
28
+ @include globaltransition("color background-color border-color fill");
29
+
30
+ &__type {
31
+ &__active {
32
+ background-color: var(--ilo-color-green-light);
33
+ }
34
+
35
+ &__info {
36
+ background-color: var(--ilo-color-blue-lighter);
37
+ }
38
+
39
+ &__alert {
40
+ background-color: var(--ilo-color-red);
41
+ }
42
+
43
+ &__subtle {
44
+ background-color: var(--ilo-color-red-light);
45
+ }
46
+
47
+ &__inactive {
48
+ background-color: var(--ilo-color-gray-light);
49
+ }
50
+ }
51
+ }