@trilogy-ds/styles 0.0.1-beta-sc-2 → 0.0.1-beta-151

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.
@@ -1,20 +1,16 @@
1
1
  @use 'sass:math';
2
2
  @import "../utilities/spacing";
3
3
 
4
- $font-size-header: 15;
5
- $font-line-height-header: 1.5;
6
- $padding-top-bottom-header: 8;
7
-
8
-
9
4
  :root {
10
- --padding-box : #{$spacing-5};
5
+ --padding-box: #{$spacing-5};
11
6
  @include mobile {
12
- --padding-box : #{$spacing-4};
7
+ --padding-box: #{$spacing-4};
13
8
  }
14
9
  }
15
10
 
16
11
  $highlighted-border-width: 4px;
17
12
 
13
+
18
14
  a.box {
19
15
  cursor: pointer;
20
16
  transition: box-shadow $animation-duration;
@@ -44,6 +40,16 @@ a.box {
44
40
  outline: var(--border-active);
45
41
  }
46
42
 
43
+ &.is-offset-header {
44
+ @include tablet {
45
+ margin-top: 40px;
46
+
47
+ &.is-fullheight {
48
+ height: calc(100% - 40px);
49
+ }
50
+ }
51
+ }
52
+
47
53
  &.is-fullheight {
48
54
  .box-content {
49
55
  flex-grow: 1;
@@ -54,22 +60,13 @@ a.box {
54
60
  box-shadow: none;
55
61
  border: var(--border);
56
62
 
57
- &.has-hat > .is-hat {
58
- left: -1px;
59
- right: -1px;
60
- }
61
-
62
63
  .box-header {
63
- margin-top: calc(var(--padding-box)*-1 - 1px);
64
- margin-left: calc(var(--padding-box)*-1 - 1px);
65
- margin-right: calc(var(--padding-box)*-1 - 1px);
64
+ margin-top: calc(var(--padding-box) * -1 - 1px);
65
+ margin-left: calc(var(--padding-box) * -1 - 1px);
66
+ margin-right: calc(var(--padding-box) * -1 - 1px);
66
67
  }
67
68
  }
68
69
 
69
- &.is-header-offset {
70
- margin-top: #{$font-size-header * $font-line-height-header + 2 * $padding-top-bottom-header}px;
71
- }
72
-
73
70
  &.is-highlighted {
74
71
  border-left: $highlighted-border-width solid transparent;
75
72
  border-top-left-radius: calc(var(--radius) + $highlighted-border-width);
@@ -78,14 +75,14 @@ a.box {
78
75
  $color: getColor($name);
79
76
  $brandName: getColorBrandName($name);
80
77
 
81
- &.is-#{$brandName}{
78
+ &.is-#{$brandName} {
82
79
  border-left-color: $color;
83
80
  border-left-width: $highlighted-border-width;
84
81
  }
85
82
  }
86
83
 
87
- .box-header{
88
- margin-left: calc(var(--padding-box)*-1 - $highlighted-border-width);
84
+ .box-header {
85
+ margin-left: calc(var(--padding-box) * -1 - $highlighted-border-width);
89
86
  }
90
87
  }
91
88
 
@@ -93,9 +90,9 @@ a.box {
93
90
  z-index: inherit;
94
91
  background-color: getColor('font');
95
92
  color: getColor('background');
96
- margin-top: calc(var(--padding-box)*-1);
97
- margin-left: calc(var(--padding-box)*-1);
98
- margin-right: calc(var(--padding-box)*-1);
93
+ margin-top: calc(var(--padding-box) * -1);
94
+ margin-left: calc(var(--padding-box) * -1);
95
+ margin-right: calc(var(--padding-box) * -1);
99
96
  padding: 8px;
100
97
  padding-left: var(--padding-box);
101
98
  padding-right: var(--padding-box);
@@ -107,9 +104,12 @@ a.box {
107
104
  align-items: center;
108
105
  font-weight: $weight-semibold;
109
106
  border-radius: var(--radius) var(--radius) 0 0;
110
- text-align: center;
107
+ height: 40px;
108
+
111
109
  @include tablet {
110
+ flex-direction: row;
112
111
  align-items: center;
112
+ justify-content: space-between;
113
113
  }
114
114
 
115
115
  > p:not(:last-child),
@@ -128,16 +128,18 @@ a.box {
128
128
  }
129
129
 
130
130
  .box-content {
131
- margin-left: calc(var(--padding-box)*-1);
132
- margin-right: calc(var(--padding-box)*-1);
131
+ margin-left: calc(var(--padding-box) * -1);
132
+ margin-right: calc(var(--padding-box) * -1);
133
133
  padding: var(--padding-box);
134
- &:first-child{
135
- margin-top: calc(var(--padding-box)*-1);
134
+
135
+ &:first-child {
136
+ margin-top: calc(var(--padding-box) * -1);
136
137
  border-top-left-radius: var(--radius);
137
138
  border-top-right-radius: var(--radius);
138
139
  }
139
- &:last-child{
140
- margin-bottom: calc(var(--padding-box)*-1);
140
+
141
+ &:last-child {
142
+ margin-bottom: calc(var(--padding-box) * -1);
141
143
  border-bottom-left-radius: var(--radius);
142
144
  border-bottom-right-radius: var(--radius);
143
145
  }
@@ -147,8 +149,8 @@ a.box {
147
149
  }
148
150
 
149
151
  > .is-unboxed {
150
- margin-left: calc(var(--padding-box)*-1);
151
- margin-right: calc(var(--padding-box)*-1);
152
+ margin-left: calc(var(--padding-box) * -1);
153
+ margin-right: calc(var(--padding-box) * -1);
152
154
  }
153
155
 
154
156
  &.is-transparent {
@@ -157,9 +159,9 @@ a.box {
157
159
  }
158
160
 
159
161
  .box-footer {
160
- margin-left: calc(var(--padding-box)*-1);
161
- margin-right: calc(var(--padding-box)*-1);
162
- margin-bottom: calc(var(--padding-box)*-1);
162
+ margin-left: calc(var(--padding-box) * -1);
163
+ margin-right: calc(var(--padding-box) * -1);
164
+ margin-bottom: calc(var(--padding-box) * -1);
163
165
  padding: var(--padding-box);
164
166
  border-top: 1px solid getColor('neutral-fade');
165
167
  border-bottom-left-radius: var(--radius);
@@ -1,59 +1,69 @@
1
1
  .image {
2
+ display: block;
3
+ position: relative;
4
+
5
+ &.is-justified-start,
6
+ &.is-justified-center,
7
+ &.is-justified-end {
8
+ display: flex;
9
+ }
10
+
11
+ img {
2
12
  display: block;
3
- position: relative;
13
+ max-width: 100%;
4
14
 
5
- img {
6
- display: block;
7
- max-width: 100%;
15
+ &.b-loaded {
16
+ height: auto;
17
+ }
8
18
 
9
- &.b-loaded {
10
- height: auto;
11
- }
19
+ &.is-circled {
20
+ border-radius: 50%;
12
21
  }
22
+ }
13
23
  }
14
24
 
15
25
  .b-lazy {
16
- transition: opacity 250ms ease-in-out;
17
- opacity: 0;
26
+ transition: opacity 250ms ease-in-out;
27
+ opacity: 0;
18
28
 
19
- &.b-loaded {
20
- opacity: 1;
29
+ &.b-loaded {
30
+ opacity: 1;
21
31
 
22
- &.has-bg-image {
23
- &.has-bg-gradient {
24
- &::before {
25
- opacity: 0;
26
- }
27
- }
32
+ &.has-bg-image {
33
+ &.has-bg-gradient {
34
+ &::before {
35
+ opacity: 0;
28
36
  }
37
+ }
29
38
  }
39
+ }
30
40
 
31
- &.has-bg-image {
32
- background-repeat: no-repeat;
33
- background-position: center center;
34
- background-size: cover;
41
+ &.has-bg-image {
42
+ background-repeat: no-repeat;
43
+ background-position: center center;
44
+ background-size: cover;
45
+ position: absolute;
46
+ top: 0;
47
+ bottom: 0;
48
+ left: 0;
49
+ right: 0;
50
+ height: 100%;
51
+
52
+ &.has-bg-gradient {
53
+ z-index: zindex('void');
54
+ opacity: 1;
55
+
56
+ &::before {
57
+ content: '';
58
+ opacity: 1;
35
59
  position: absolute;
36
60
  top: 0;
37
- bottom: 0;
38
61
  left: 0;
39
62
  right: 0;
40
- height: 100%;
41
-
42
- &.has-bg-gradient {
43
- z-index: zindex('void');
44
- opacity: 1;
45
-
46
- &::before {
47
- content: '';
48
- opacity: 1;
49
- position: absolute;
50
- top: 0;
51
- left: 0;
52
- right: 0;
53
- bottom: 0;
54
- z-index: zindex('tiny');
55
- transition: opacity 750ms ease-in-out;
56
- }
57
- }
63
+ bottom: 0;
64
+ z-index: zindex('tiny');
65
+ transition: opacity 750ms ease-in-out;
66
+ }
58
67
  }
68
+ }
59
69
  }
@@ -1,53 +1,62 @@
1
1
  // Bullet list classiques
2
2
  ul.list,
3
3
  ol.list {
4
- list-style-type: none;
4
+ list-style: disc inside;
5
+ display: grid;
6
+ row-gap: $spacing-3;
5
7
 
6
- li {
7
- padding: $spacing-4;
8
- position: relative;
9
-
10
- .list-item_content {
8
+ li.list-item {
9
+ &:has(.icon) {
10
+ list-style: none;
11
11
  display: flex;
12
- align-items: center;
12
+ }
13
+
14
+ .icon {
15
+ margin-right: $spacing-2;
16
+ justify-content: flex-start;
17
+ align-items: flex-start;
18
+ }
19
+
20
+ .list-item-content {
21
+ display: inline-grid;
22
+
13
23
  &_puce {
14
24
  margin-right: $spacing-4;
15
25
  }
16
26
  }
17
27
 
18
-
19
28
  &.has-action {
20
29
  display: flex;
21
30
  justify-content: space-between;
22
31
  align-items: center;
23
- @include hover();
24
32
 
25
33
  .list-item_action {
26
- & >:first-child {
27
- margin: 0px !important;
34
+ & > :first-child {
35
+ margin: 0 !important;
28
36
  cursor: pointer;
29
37
  }
30
38
 
31
- .radio label.radio-label:empty,
39
+ .radio label.radio-label:empty,
32
40
  .checkbox label.checkbox-label:empty {
33
- padding: $spacing-1 $spacing-1 $spacing-1 calc($spacing-1 + 10px);
41
+ padding: $spacing-1 $spacing-1 $spacing-1 calc($spacing-1 + 10px);
34
42
  }
35
-
36
- }
37
-
43
+ }
38
44
  }
39
45
 
40
46
  div b {
41
- margin-bottom: $spacing-2 ;
47
+ margin-bottom: $spacing-2;
42
48
  }
49
+ }
43
50
 
44
- .divider {
45
- position: absolute;
46
- bottom: calc(-1 * $spacing-4);
47
- width: 100%;
48
- }
51
+ &.has-divider {
52
+ li {
53
+ border-bottom: var(--border);
54
+ padding-bottom: $spacing-3;
49
55
 
56
+ &:last-child {
57
+ border-bottom: none;
58
+ padding-bottom: 0;
59
+ }
60
+ }
50
61
  }
51
-
52
62
  }
53
-
@@ -14,66 +14,54 @@ $text-levels-mobile: (
14
14
 
15
15
  .text {
16
16
  @each $text-level in $text-levels {
17
- $i: index($text-levels, $text-level);
18
- $font-size: nth($text-level, 1);
19
- $line-height: nth($text-level, 2);
20
- $margin-bottom: nth($text-level, 3);
17
+ $i: index($text-levels, $text-level);
18
+ $font-size: nth($text-level, 1);
19
+ $line-height: nth($text-level, 2);
21
20
 
22
- &.is-level-#{$i} {
23
- font-size: $font-size;
24
- line-height: $line-height;
25
- font-family: $family-primary;
26
- margin-bottom: $margin-bottom;
27
- }
28
- }
29
-
30
- &.is-inverted {
31
- color: getColor('background');
32
- }
33
-
34
- @include mobile {
35
- @each $text-level-mobile in $text-levels-mobile {
36
- $i: index($text-levels-mobile, $text-level-mobile);
37
- $margin-bottom: nth($text-level-mobile, 3);
38
-
39
- &.is-level-#{$i} {
40
- margin-bottom: $margin-bottom;
41
- }
42
- }
43
- }
21
+ &.is-level-#{$i} {
22
+ font-size: $font-size;
23
+ line-height: $line-height;
24
+ font-family: $family-primary;
25
+ }
26
+ }
44
27
 
45
- &.is-wrapped {
46
- word-break: break-word;
47
- }
28
+ &.is-inverted {
29
+ color: getColor('background');
30
+ }
48
31
 
49
- &.bold {
50
- font-weight: $weight-bold;
51
- }
32
+ @include mobile {
33
+ @each $text-level-mobile in $text-levels-mobile {
34
+ $i: index($text-levels-mobile, $text-level-mobile);
52
35
  }
36
+ }
53
37
 
38
+ &.is-wrapped {
39
+ word-break: break-word;
40
+ }
54
41
 
55
- .paragraph:not(:last-child) {
56
- margin-bottom: 10px;
42
+ &.bold {
43
+ font-weight: $weight-bold;
44
+ }
57
45
  }
58
46
 
59
47
  .span {
60
- font-style: inherit;
61
- font-weight: inherit;
48
+ font-style: inherit;
49
+ font-weight: inherit;
62
50
  }
63
51
 
64
52
  .strong {
65
- color: inherit;
66
- font-weight: $weight-bold;
53
+ color: inherit;
54
+ font-weight: $weight-bold;
67
55
  }
68
56
 
69
57
  .sup {
70
- line-height: 0;
71
- position: relative;
72
- vertical-align: baseline;
73
- top: -0.4em;
74
- font-size: 0.7em;
58
+ line-height: 0;
59
+ position: relative;
60
+ vertical-align: baseline;
61
+ top: -0.4em;
62
+ font-size: 0.7em;
75
63
  }
76
64
 
77
65
  .small {
78
- font-size: 0.875em;
66
+ font-size: 0.875em;
79
67
  }
@@ -201,3 +201,23 @@ $slides-concat: '';
201
201
  $slides-concat: $slides-concat + ' + ' + var(--#{$name});
202
202
  }
203
203
  }
204
+
205
+ .progress-legends {
206
+ display: grid;
207
+ grid-template-columns: repeat(3, 1fr);
208
+
209
+ .progress-legend-start {
210
+ grid-column: 1;
211
+ text-align: left;
212
+ }
213
+
214
+ .progress-legend-center {
215
+ grid-column: 2;
216
+ text-align: center;
217
+ }
218
+
219
+ .progress-legend-end {
220
+ grid-column: 3;
221
+ text-align: right;
222
+ }
223
+ }
@@ -2,17 +2,22 @@
2
2
 
3
3
  .radios {
4
4
  width: 100%;
5
- column-gap: 16px;
5
+ gap: 16px;
6
6
  display: flex;
7
7
  flex-wrap: wrap;
8
+ flex-direction: column;
8
9
 
9
- &.is-vertical {
10
- row-gap: 16px;
10
+ @include tablet {
11
+ flex-direction: row;
12
+
13
+ &.is-vertical-desktop {
14
+ flex-direction: column;
15
+ }
11
16
  }
12
17
 
13
18
  @include mobile {
14
- &:not(.is-mobile){
15
- display: block;
19
+ &.is-horizontal-mobile {
20
+ flex-direction: row;
16
21
  }
17
22
  }
18
23
 
@@ -25,51 +30,52 @@
25
30
 
26
31
  .radio,
27
32
  .radio-tile {
28
- input:checked ~ label.radio-label {
29
- cursor: default;
30
- &:after {
31
- content: '';
32
- width: 12px;
33
- height: 12px;
34
- }
33
+ input:checked ~ label.radio-label {
34
+ cursor: default;
35
+
36
+ &:after {
37
+ content: '';
38
+ width: 12px;
39
+ height: 12px;
35
40
  }
41
+ }
36
42
 
37
- label.radio-label {
38
- &:before,
39
- &:after {
40
- border-radius: 9999px;
41
- }
43
+ label.radio-label {
44
+ &:before,
45
+ &:after {
46
+ border-radius: 9999px;
42
47
  }
48
+ }
43
49
  }
44
50
 
45
51
  .radio {
46
- input:checked ~ label.radio-label {
47
- &:after {
48
- left: 3px;
49
- }
52
+ input:checked ~ label.radio-label {
53
+ &:after {
54
+ left: 3px;
50
55
  }
56
+ }
51
57
 
52
- input:not(:disabled):not(:checked) ~ label.radio-label:hover {
53
- &:before {
54
- @include hoverRules()
55
- }
58
+ input:not(:disabled):not(:checked) ~ label.radio-label:hover {
59
+ &:before {
60
+ @include hoverRules()
56
61
  }
57
-
62
+ }
63
+
58
64
  }
59
65
 
60
66
  .radio-tile {
61
- input:checked ~ label.radio-label {
62
- &:after {
63
- top: 18px;
64
- right: 18px;
65
- }
67
+ input:checked ~ label.radio-label {
68
+ &:after {
69
+ top: 18px;
70
+ right: 18px;
66
71
  }
72
+ }
67
73
 
68
- input:checked:disabled ~ label.radio-label {
69
- &:after {
70
- background-color: getColor('neutral');
71
- top: 19px;
72
- right: 19px;
73
- }
74
+ input:checked:disabled ~ label.radio-label {
75
+ &:after {
76
+ background-color: getColor('neutral');
77
+ top: 19px;
78
+ right: 19px;
74
79
  }
80
+ }
75
81
  }
@@ -1,6 +1,11 @@
1
1
  .switch {
2
2
  position: relative;
3
3
  margin: 8px;
4
+ width: fit-content;
5
+
6
+ &.is-fullwidth {
7
+ width: 100%;
8
+ }
4
9
 
5
10
  input {
6
11
  display: none;
@@ -8,6 +13,7 @@
8
13
  &:disabled ~ label,
9
14
  &:disabled:checked ~ label {
10
15
  cursor: not-allowed;
16
+
11
17
  &:before {
12
18
  background-color: getColor('disabled');
13
19
  }
@@ -153,7 +153,9 @@
153
153
  }
154
154
  }
155
155
 
156
- &:not(.is-bordered).is-comparative {
156
+ &.has-border-all {
157
+ border: 1px solid getColor('neutral-fade');
158
+
157
159
  th {
158
160
  border-right: 1px solid getColor('neutral-fade');
159
161
  }
@@ -165,26 +167,24 @@
165
167
  }
166
168
  }
167
169
 
168
- &.is-compact {
169
- td,
170
+ &.has-border-inner {
170
171
  th {
171
- padding: math.div(20px, 3) math.div(20px, 3);
172
+ &:not(:last-child) {
173
+ border-right: 1px solid getColor('neutral-fade');
174
+ }
175
+ }
176
+
177
+ td {
178
+ &:not(:last-child) {
179
+ border-right: 1px solid getColor('neutral-fade');
180
+ }
172
181
  }
173
182
  }
174
183
 
175
- &.is-bordered {
184
+ &.is-compact {
176
185
  td,
177
186
  th {
178
- border-width: 1px;
179
- }
180
-
181
- tr {
182
- &:last-child {
183
- td,
184
- th {
185
- border-bottom-width: 1px;
186
- }
187
- }
187
+ padding: math.div(20px, 3) math.div(20px, 3);
188
188
  }
189
189
  }
190
190
 
@@ -2,10 +2,10 @@ $tag-delete-margin: 1px !default;
2
2
 
3
3
  // container pour multi-tags ou tags avec actions
4
4
  .tags {
5
+ display: flex;
6
+ justify-content: flex-start;
5
7
  align-items: center;
6
- display: inline-flex;
7
8
  flex-wrap: wrap;
8
- justify-content: flex-start;
9
9
  margin-bottom: 16px;
10
10
 
11
11
  // multi-tags : ajout d'une marge bottom, supprimable par facette