@trilogy-ds/styles 0.0.1-beta-54 → 0.0.1-beta-56

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.
@@ -5,12 +5,10 @@
5
5
  position: relative;
6
6
  justify-content: space-between;
7
7
  min-height: 44px;
8
- margin-left: -8px;
9
- margin-right: -8px;
8
+ gap: $spacing-4;
10
9
 
11
10
  @include touch {
12
- margin-left: -4px !important;
13
- margin-right: -4px !important;
11
+ gap : $spacing-2;
14
12
  }
15
13
  }
16
14
 
@@ -18,20 +16,27 @@
18
16
  display: flex;
19
17
  flex-direction: column;
20
18
  width: 100%;
21
- padding: $spacing-2;
22
19
 
23
20
  &:before {
24
21
  content: "";
25
22
  display: block;
26
23
  height: 4px;
27
- background: getBGColor('font');
28
24
  border-radius: var(--radius-small);
25
+ background-size: 200% !important;
26
+ background-color: getBGColor('neutral');
29
27
  }
30
28
 
31
29
  &.is-error {
32
30
 
33
31
  &:before {
34
- background: getColor('error') !important;
32
+ background-color: getColor('error') !important;
33
+
34
+ }
35
+ &.is-current{
36
+ &:before{
37
+ animation: progress 1s;
38
+ }
39
+
35
40
  }
36
41
 
37
42
  .step-bars {
@@ -42,12 +47,6 @@
42
47
 
43
48
  .step-label {
44
49
 
45
- padding-left: $spacing-2;
46
-
47
- @include touch {
48
- padding-left: $spacing-1;
49
- }
50
-
51
50
  &::before {
52
51
  content: "";
53
52
  mask-image: url('./assets/icons/all/times.svg') !important;
@@ -56,8 +55,8 @@
56
55
  mask-size: 20px;
57
56
  width: 20px;
58
57
  height: 20px;
59
- margin: 2px 8px 0 -8px;
60
58
  align-self: baseline;
59
+ margin-top: 2px;
61
60
  }
62
61
 
63
62
  .icon {
@@ -69,18 +68,15 @@
69
68
  &.is-done {
70
69
 
71
70
  &:before {
72
- background: getColor('font');
73
- transition: background-color 2s ease-in-out;
71
+ background-color: getColor('font');
74
72
  }
75
73
 
76
74
  .step-bars {
77
75
  background: getColor('font');
78
- transition: background-color 2s ease-in-out;
76
+ transition: background-color 1s ease-in-out;
79
77
  }
80
78
 
81
79
  .step-label {
82
- padding-left: $spacing-2;
83
-
84
80
  &::before {
85
81
  content: "";
86
82
  mask-image: url('./assets/icons/all/check-circle.svg');
@@ -89,8 +85,8 @@
89
85
  min-width: 20px;
90
86
  mask-size: 20px;
91
87
  height: 20px;
92
- margin: 2px 8px 0 -8px;
93
88
  align-self: baseline;
89
+ margin-top: 2px;
94
90
  }
95
91
  }
96
92
  }
@@ -99,27 +95,19 @@
99
95
  &.is-active {
100
96
 
101
97
  &:before {
102
- background: getColor('main');
103
- animation: cssload-width 2s cubic-bezier(0.45, 0, 1, 1);
104
- -o-animation: cssload-width 2s cubic-bezier(0.45, 0, 1, 1);
105
- -webkit-animation: cssload-width 2s cubic-bezier(0.45, 0, 1, 1);
106
- -moz-animation: cssload-width 2s cubic-bezier(0.45, 0, 1, 1);
98
+ background-color: getColor('main');
99
+ animation: progress 1s;
107
100
  }
108
101
 
109
102
  .step-bars {
110
103
  background: getColor('main');
111
- animation: cssload-width 2s cubic-bezier(0.45, 0, 1, 1);
112
- -o-animation: cssload-width 2s cubic-bezier(0.45, 0, 1, 1);
113
- -webkit-animation: cssload-width 2s cubic-bezier(0.45, 0, 1, 1);
114
- -moz-animation: cssload-width 2s cubic-bezier(0.45, 0, 1, 1);
115
104
  }
116
105
 
117
106
  .step-label {
118
107
  font-style: normal;
119
108
  font-weight: 600;
120
- font-size: 22px;
121
- line-height: 24px;
122
- transition: color 1.45s ease;
109
+ font-size: 20px;
110
+ line-height: 22px;
123
111
  width: max-content;
124
112
 
125
113
  .icon [class^=tri-], .icon [class*=" tri-"] {
@@ -138,10 +126,6 @@
138
126
  }
139
127
  }
140
128
  }
141
-
142
- @include touch {
143
- padding: $spacing-1 !important;
144
- }
145
129
  }
146
130
 
147
131
  .step-bars {
@@ -160,22 +144,16 @@
160
144
  font-size: 16px;
161
145
  line-height: 24px;
162
146
  padding-top: $spacing-2;
163
-
147
+ gap: $spacing-1;
164
148
  .icon {
165
149
  font-size: 20px;
166
- margin-left: 8px;
167
150
  height: auto;
168
151
  }
169
152
 
170
- .icon [class^=tri-], .icon [class*=" tri-"] {
171
- margin: 0 4px 0 -4px;
172
- }
173
-
174
-
175
153
  @include touch {
176
154
  position: absolute;
177
155
  top: 10px;
178
- left: 4px;
156
+ left: 0;
179
157
  }
180
158
  }
181
159
 
@@ -223,51 +201,17 @@
223
201
  }
224
202
  }
225
203
 
226
- @keyframes cssload-width {
227
- 0%, 100% {
228
- transition-timing-function: cubic-bezier(1, 0, 0.65, 0.85);
229
- }
230
- 0% {
231
- width: 0;
232
- }
233
- 100% {
234
- width: 100%;
235
- }
236
- }
237
-
238
- @-o-keyframes cssload-width {
239
- 0%, 100% {
240
- -o-transition-timing-function: cubic-bezier(1, 0, 0.65, 0.85);
241
- }
242
- 0% {
243
- width: 0;
244
- }
245
- 100% {
246
- width: 100%;
247
- }
248
- }
249
204
 
250
- @-webkit-keyframes cssload-width {
205
+ @keyframes progress {
251
206
  0%, 100% {
252
- -webkit-transition-timing-function: cubic-bezier(1, 0, 0.65, 0.85);
207
+ background-image: linear-gradient(to right, transparent 0, transparent 50%, getBGColor('neutral') 50%, getBGColor('neutral') 100%);
253
208
  }
254
209
  0% {
255
- width: 0;
210
+ background-position: 100% 0;
256
211
  }
257
212
  100% {
258
- width: 100%;
213
+ background-position: 0 0;
259
214
  }
260
215
  }
261
216
 
262
- @-moz-keyframes cssload-width {
263
- 0%, 100% {
264
- -moz-transition-timing-function: cubic-bezier(1, 0, 0.65, 0.85);
265
- }
266
- 0% {
267
- width: 0;
268
- }
269
- 100% {
270
- width: 100%;
271
- }
272
- }
273
217
 
@@ -1,11 +1,14 @@
1
1
  @use 'sass:math';
2
2
  @import "../utilities/spacing";
3
+ :root{
4
+ --padding-box : #{$spacing-5};
5
+ @include mobile {
6
+ --padding-box : #{$spacing-4};
7
+ }
8
+ }
9
+ $highlighted-border-width: 4px;
3
10
 
4
- $space-between-tiles: 5px;
5
- $padding-box: $spacing-5;
6
- $padding-box-mobile: $spacing-4;
7
11
 
8
- /* @toto : add to figma */
9
12
  a.box {
10
13
  cursor: pointer;
11
14
  transition: box-shadow $animation-duration;
@@ -21,16 +24,13 @@ a.box {
21
24
  background-color: getColor('background');
22
25
  box-shadow: rgba(99, 99, 99, 0.2) 0px 2px 8px 0px;
23
26
  border-radius: var(--radius);
24
- overflow: hidden;
25
27
  display: flex;
26
28
  flex-direction: column;
27
29
  justify-content: flex-start;
28
30
  position: relative;
29
- padding: 24px;
31
+ padding: var(--padding-box);
32
+
30
33
 
31
- @include mobile {
32
- padding: 16px;
33
- }
34
34
 
35
35
  &:not(:last-child) {
36
36
  margin-bottom: 15px;
@@ -46,22 +46,7 @@ a.box {
46
46
  }
47
47
  }
48
48
 
49
- &.is-highlighted {
50
- .box-content {
51
- padding-left: 23px;
52
- border-left: 8px solid transparent;
53
- }
54
-
55
- @each $name, $pair in $colors-brand-funcionnal {
56
- $color: getColor($name);
57
- $brandName: getColorBrandName($name);
58
49
 
59
- &.is-#{$brandName} .box-content {
60
- border-left-color: $color;
61
- border-left-width: 4px;
62
- }
63
- }
64
- }
65
50
 
66
51
  &.is-flat {
67
52
  box-shadow: none;
@@ -73,21 +58,43 @@ a.box {
73
58
  }
74
59
 
75
60
  .box-header {
76
- margin-top: calc(-#{$padding-box} - 1px);
77
- margin-left: calc(-#{$padding-box} - 1px);
78
- margin-right: calc(-#{$padding-box} - 1px);
61
+ margin-top: calc(var(--padding-box)*-1 - 1px);
62
+ margin-left: calc(var(--padding-box)*-1 - 1px);
63
+ margin-right: calc(var(--padding-box)*-1 - 1px);
64
+ }
65
+ }
66
+
67
+
68
+ &.is-highlighted {
69
+ border-left: $highlighted-border-width solid transparent;
70
+ border-top-left-radius: calc(var(--radius) + $highlighted-border-width);
71
+ border-bottom-left-radius: calc(var(--radius) + $highlighted-border-width);
72
+ @each $name, $pair in $colors-brand-funcionnal {
73
+ $color: getColor($name);
74
+ $brandName: getColorBrandName($name);
75
+
76
+ &.is-#{$brandName}{
77
+ border-left-color: $color;
78
+ border-left-width: $highlighted-border-width;
79
+ }
80
+ }
81
+
82
+ .box-header{
83
+ margin-left: calc(var(--padding-box)*-1 - $highlighted-border-width);
79
84
  }
80
85
  }
81
86
 
87
+
82
88
  .box-header {
83
89
  z-index: inherit;
84
90
  background-color: getColor('font');
85
91
  color: getColor('background');
86
- margin-top: -$padding-box;
87
- margin-left: -$padding-box;
88
- margin-right: -$padding-box;
92
+ margin-top: calc(var(--padding-box)*-1);
93
+ margin-left: calc(var(--padding-box)*-1);
94
+ margin-right: calc(var(--padding-box)*-1);
89
95
  padding: 8px;
90
- padding-left: 24px;
96
+ padding-left: var(--padding-box);
97
+ padding-right: var(--padding-box);
91
98
  box-shadow: none;
92
99
  font-size: 15px;
93
100
  display: flex;
@@ -95,13 +102,7 @@ a.box {
95
102
  flex-direction: column;
96
103
  align-items: center;
97
104
  font-weight: $weight-semibold;
98
-
99
- @include mobile {
100
- margin-top: -16px;
101
- margin-left: -16px;
102
- margin-right: -16px;
103
- }
104
-
105
+ border-radius: var(--radius) var(--radius) 0 0;
105
106
  @include tablet {
106
107
  flex-direction: row;
107
108
  align-items: center;
@@ -124,12 +125,18 @@ a.box {
124
125
  }
125
126
 
126
127
  .box-content {
127
- margin: -$padding-box;
128
- padding: $padding-box;
129
-
130
- @include mobile {
131
- margin: -$padding-box-mobile;
132
- padding: $padding-box-mobile;
128
+ margin-left: calc(var(--padding-box)*-1);
129
+ margin-right: calc(var(--padding-box)*-1);
130
+ padding: var(--padding-box);
131
+ &:first-child{
132
+ margin-top: calc(var(--padding-box)*-1);
133
+ border-top-left-radius: var(--radius);
134
+ border-top-right-radius: var(--radius);
135
+ }
136
+ &:last-child{
137
+ margin-bottom: calc(var(--padding-box)*-1);
138
+ border-bottom-left-radius: var(--radius);
139
+ border-bottom-right-radius: var(--radius);
133
140
  }
134
141
 
135
142
  @include mobile {
@@ -137,14 +144,8 @@ a.box {
137
144
  }
138
145
 
139
146
  > .is-unboxed {
140
- margin-left: -$padding-box;
141
- margin-right: -$padding-box;
142
- width: auto;
143
-
144
- @include desktop {
145
- margin-left: -$padding-box;
146
- margin-right: -$padding-box;
147
- }
147
+ margin-left: calc(var(--padding-box)*-1);
148
+ margin-right: calc(var(--padding-box)*-1);
148
149
  }
149
150
 
150
151
  &.is-transparent {
@@ -153,8 +154,12 @@ a.box {
153
154
  }
154
155
 
155
156
  .box-footer {
156
- padding-top: $padding-box;
157
- border-top: var(--border);
158
- margin: 12.5px 7.5px 7.5px;
157
+ margin-left: calc(var(--padding-box)*-1);
158
+ margin-right: calc(var(--padding-box)*-1);
159
+ margin-bottom: calc(var(--padding-box)*-1);
160
+ padding: var(--padding-box);
161
+ border-top: 1px solid getBGColor('hovered');
162
+ border-bottom-left-radius: var(--radius);
163
+ border-bottom-right-radius: var(--radius);
159
164
  }
160
165
  }
@@ -31,3 +31,12 @@
31
31
  }
32
32
  }
33
33
  }
34
+
35
+ .checkbox {
36
+ input:not(:disabled):not(:checked) ~ label.checkbox-label:hover {
37
+ &:before {
38
+ @include hoverRules()
39
+ }
40
+ }
41
+ }
42
+
@@ -1,25 +1,11 @@
1
+ @import "../utilities/spacing";
2
+
1
3
  .chips-list {
2
4
  align-items: center;
3
5
  display: inline-flex;
4
6
  justify-content: flex-start;
5
- margin-bottom: 16px;
6
7
  flex-wrap: wrap;
7
-
8
- // multi-chips : ajout d'une marge bottom, supprimable par facette
9
- &:not(.is-gapless) {
10
- &:not(:last-child) {
11
- margin-right: 8px;
12
- }
13
-
14
- .chips {
15
- margin-bottom: 10px;
16
- }
17
- }
18
-
19
- // multi-chips : ajout d'une marge à droite de chaque chip
20
- .chips:not(:last-child) {
21
- margin-right: 8px;
22
- }
8
+ gap: $spacing-2;
23
9
 
24
10
  // centrage des chips
25
11
  &.is-centered {
@@ -27,15 +13,19 @@
27
13
  }
28
14
 
29
15
  &.is-multiple {
30
- .chips.is-active:before {
16
+ .chips:before {
31
17
  content: "";
32
18
  mask-image: url('./assets/icons/all/check.svg');
33
19
  background-color: currentColor;
34
20
  margin-right: 4px;
35
21
  margin-left: -8px;
36
- width: 20px;
22
+ width: 0;
37
23
  height: 20px;
38
24
  mask-size: 20px;
25
+ transition: width 250ms;
26
+ }
27
+ .chips.is-active:before{
28
+ width: 20px;
39
29
  }
40
30
  }
41
31
 
@@ -53,24 +43,19 @@
53
43
  white-space: nowrap;
54
44
  cursor: pointer;
55
45
  border: var(--border);
56
-
57
46
  &:not(.is-disabled) {
58
-
59
47
  &.is-active {
60
48
  background-color: getColor('main');
61
49
  color: white;
62
50
  border: var(--border-active);
63
- padding: 5px 15px;
64
-
51
+ padding: 5px ($spacing-4 - 1px);
65
52
  #{$hoverSelector} {
66
53
  background-color: getColor('main');
67
54
  color: white;
68
55
  }
69
56
  }
70
-
71
57
  #{$hoverSelector} {
72
58
  background-color: var(--color-bg-hovered);
73
-
74
59
  }
75
60
  }
76
61
 
@@ -26,6 +26,7 @@
26
26
  .radio,
27
27
  .radio-tile {
28
28
  input:checked ~ label.radio-label {
29
+ cursor: default;
29
30
  &:after {
30
31
  content: '';
31
32
  width: 12px;
@@ -47,6 +48,13 @@
47
48
  left: 3px;
48
49
  }
49
50
  }
51
+
52
+ input:not(:disabled):not(:checked) ~ label.radio-label:hover {
53
+ &:before {
54
+ @include hoverRules()
55
+ }
56
+ }
57
+
50
58
  }
51
59
 
52
60
  .radio-tile {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@trilogy-ds/styles",
3
- "version": "0.0.1-beta-54",
3
+ "version": "0.0.1-beta-56",
4
4
  "author": "Bouygues Telecom",
5
5
  "license": "UNLICENSED",
6
6
  "files": [