@trilogy-ds/styles 0.0.1-beta.29 → 0.0.1-beta.31

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.
@@ -20,7 +20,6 @@
20
20
  height: 42px;
21
21
  color: getColor('font');
22
22
  background-color: getBGColor('neutral');
23
- font-family: $body-family;
24
23
 
25
24
  &:not(:last-child) {
26
25
  margin-right: 4px;
@@ -42,7 +41,6 @@
42
41
  &.is-active {
43
42
  background-color: getColor('main');
44
43
  color: invertColor('main');
45
- font-weight: 600;
46
44
  }
47
45
  }
48
46
  }
@@ -99,7 +99,6 @@
99
99
  background-color: transparent;
100
100
  border: none;
101
101
  color: getColor('font');
102
- font-family: $body-family;
103
102
  text-decoration: none;
104
103
  outline: none;
105
104
  padding: 6px 14px;
@@ -121,13 +120,10 @@
121
120
  font-size: $text-14;
122
121
  }
123
122
 
124
-
125
123
  &.is-active {
126
124
  color: getColor('main');
127
- font-weight: $weight-semibold;
128
125
  position: relative;
129
126
  border-bottom-color: getColor('main');
130
-
131
127
  }
132
128
 
133
129
  &:hover:not(.is-disabled) {
@@ -16,7 +16,6 @@
16
16
  @import 'loader';
17
17
  @import 'link';
18
18
  @import 'list';
19
- @import 'notification';
20
19
  @import 'toaster';
21
20
  @import 'progress';
22
21
  @import 'paragraph';
@@ -40,7 +40,6 @@ $button-border-width: 2px !default;
40
40
  cursor: pointer;
41
41
  justify-content: center;
42
42
  text-align: center;
43
- font-family: $body-family;
44
43
  white-space: nowrap;
45
44
  padding: 0 $spacing-4;
46
45
  text-decoration: inherit;
@@ -62,4 +61,14 @@ $button-border-width: 2px !default;
62
61
  }
63
62
  }
64
63
 
64
+ &[disabled],
65
+ &[aria-disabled=true] {
66
+ background-color: getBGColorValue('main') !important;
67
+ color: getBGColorValue('disabled') !important
68
+ }
69
+
70
+ &.is-loading {
71
+ background-color: getColorValue('neutral');
72
+ }
73
+
65
74
  }
@@ -45,7 +45,6 @@
45
45
  border-radius: 9999px;
46
46
  color: getColor('font');
47
47
  display: inline-flex;
48
- font-weight: 400;
49
48
  font-size: $size-normal;
50
49
  height: 32px;
51
50
  justify-content: center;
@@ -60,7 +59,6 @@
60
59
  &.is-active {
61
60
  background-color: getColor('main');
62
61
  color: white;
63
- font-weight: 600;
64
62
  border: var(--border-active);
65
63
  padding: 5px 15px;
66
64
 
@@ -4,7 +4,6 @@
4
4
 
5
5
  padding-left: $spacing-4;
6
6
  padding-right: $spacing-4;
7
- font-family: $body-family;
8
7
  font-size: $size-medium;
9
8
  max-width: 100%;
10
9
  width: 100%;
@@ -1,25 +1,53 @@
1
1
  // Bullet list classiques
2
- ul.list , ol.list{
3
- margin-left: 30px;
4
- li {
5
- margin-bottom: 5px;
2
+ ul.list,
3
+ ol.list {
4
+ list-style-type: none;
5
+
6
+ li {
7
+ padding: $spacing-4;
8
+ position: relative;
9
+ @include hover();
10
+
11
+ .list-item_content {
12
+ display: flex;
13
+ align-items: center;
14
+ &_puce {
15
+ margin-right: $spacing-4;
16
+ }
6
17
  }
7
- }
8
18
 
9
- ul.list {
10
- list-style: disc;
11
19
 
12
- ul.list {
13
- list-style: circle;
14
- }
15
- }
20
+ &.has-action {
21
+ display: flex;
22
+ justify-content: space-between;
23
+ align-items: center;
24
+
25
+ .list-item_action {
26
+ & >:first-child {
27
+ margin: 0px !important;
28
+ cursor: pointer;
29
+ }
30
+
31
+ .radio label.radio-label:empty,
32
+ .checkbox label.checkbox-label:empty {
33
+ padding: $spacing-1 $spacing-1 $spacing-1 calc($spacing-1 + 10px);
34
+ }
16
35
 
17
- // Listes avec icônes
18
- ul.icon-list > li {
19
- display: flex;
20
- align-items: center;
36
+ }
21
37
 
22
- .icon {
23
- flex: none;
24
38
  }
39
+
40
+ div b {
41
+ margin-bottom: $spacing-2 ;
42
+ }
43
+
44
+ .divider {
45
+ position: absolute;
46
+ bottom: calc(-1 * $spacing-4);
47
+ width: 100%;
48
+ }
49
+
50
+ }
51
+
25
52
  }
53
+
@@ -20,7 +20,6 @@
20
20
  display: inline-block;
21
21
  max-width: 100%;
22
22
  position: relative;
23
- font-family: $body-family;
24
23
  border-radius: var(--radius-small);
25
24
  background-color: getColor('background');
26
25
  display: block;
@@ -37,7 +36,7 @@
37
36
  max-width: 100%;
38
37
  width: 100%;
39
38
  font-size: 1em;
40
- font-family: $body-family;
39
+ font-family: $family-sans-serif;
41
40
  color: getColor('font');
42
41
  cursor: pointer;
43
42
  -webkit-appearance: none;
@@ -4,234 +4,242 @@
4
4
  * @deprecated "Use box.is-paddingless instead"
5
5
  */
6
6
  .table-container.box {
7
- padding: 0;
7
+ padding: 0;
8
8
  }
9
9
 
10
10
  .table {
11
- @include block;
11
+ @include block;
12
+
13
+ background-color: transparent;
14
+ color: getColor('neutral-dark');
15
+
16
+ &:not(:last-child) {
17
+ margin-bottom: 30px;
18
+ }
19
+
20
+ /**
21
+ * @deprecated "Use multiples <tr><th> instead"
22
+ */
23
+ tbody .is-body-header {
24
+ background-color: getBGColor('neutral-dark');
25
+ }
26
+
27
+ td,
28
+ th {
29
+ border: 1px solid getBGColor('neutral-dark');
30
+ border-width: 0;
31
+ padding: 20px;
32
+ vertical-align: top;
33
+ text-align: left;
34
+
35
+ // Modifiers
36
+ &.is-narrow {
37
+ white-space: nowrap;
38
+ width: 1%;
39
+ }
12
40
 
13
- background-color: transparent;
14
- color: getColor('neutral-dark');
41
+ &.is-selected {
42
+ background-color: getColor('main');
43
+ color: getColor('background');
15
44
 
16
- &:not(:last-child) {
17
- margin-bottom: 30px;
45
+ a,
46
+ strong {
47
+ color: currentColor;
48
+ }
18
49
  }
50
+ }
51
+
52
+ th {
53
+ color: getColor('font');
54
+ }
19
55
 
20
- /**
21
- * @deprecated "Use multiples <tr><th> instead"
22
- */
23
- tbody .is-body-header {
24
- background-color: getBGColor('neutral-dark');
56
+ tr {
57
+ @each $name in $colors-feedback {
58
+ &.is-#{$name} {
59
+ background-color: getBGColor($name);
60
+ }
25
61
  }
26
62
 
27
- td,
28
63
  th {
29
- border: 1px solid getBGColor('neutral-dark');
30
- border-width: 0;
31
- padding: 20px;
32
- vertical-align: top;
33
- text-align: left;
34
-
35
- // Modifiers
36
- &.is-narrow {
37
- white-space: nowrap;
38
- width: 1%;
39
- }
40
-
41
- &.is-selected {
42
- background-color: getColor('main');
43
- color: getColor('background');
44
- a,
45
- strong {
46
- color: currentColor;
47
- }
48
- }
64
+ background-color: getColor('background');
49
65
  }
50
66
 
51
- th {
52
- color: getColor('font');
67
+ th,
68
+ td {
69
+ color: getColor('font');
70
+ vertical-align: middle;
53
71
  }
54
72
 
55
- tr {
56
- @each $name in $colors-feedback {
57
- &.is-#{$name} {
58
- background-color:getBGColor($name);
59
- }
60
- }
73
+ td {
74
+ border-bottom: 1px solid getBGColor('neutral-dark');
61
75
 
62
- th {
63
- background-color: getColor('background');
64
- }
76
+ > p {
77
+ margin: 0;
78
+ }
79
+ }
65
80
 
66
- th,
67
- td {
68
- color: getColor('font');
69
- vertical-align: middle;
70
- }
81
+ &.is-selected {
82
+ background-color: getColor('main');
83
+ color: getColor('background');
71
84
 
72
- td {
73
- border-bottom: 1px solid getBGColor('neutral-dark');
85
+ a,
86
+ strong {
87
+ color: currentColor;
88
+ }
74
89
 
75
- > p {
76
- margin: 0;
77
- }
78
- }
79
-
80
- &.is-selected {
81
- background-color: getColor('main');
82
- color: getColor('background');
90
+ td,
91
+ th {
92
+ border-color: currentColor;
93
+ color: currentColor;
94
+ }
95
+ }
83
96
 
84
- a,
85
- strong {
86
- color: currentColor;
87
- }
97
+ &.is-expanded,
98
+ &.is-expandable:hover {
99
+ td {
100
+ color: getColor('alternate');
101
+ cursor: pointer;
102
+ }
103
+ }
88
104
 
89
- td,
90
- th {
91
- border-color: currentColor;
92
- color: currentColor;
93
- }
94
- }
105
+ &.is-expandable + .is-expansion {
106
+ display: none;
107
+ }
95
108
 
96
- &.is-expanded,
97
- &.is-expandable:hover {
98
- td {
99
- color: getColor('alternate');
100
- cursor: pointer;
101
- }
102
- }
109
+ &.is-expanded + .is-expansion {
110
+ display: table-row;
111
+ }
103
112
 
104
- &.is-expandable + .is-expansion {
105
- display: none;
106
- }
113
+ &.is-expanded {
114
+ > td {
115
+ border-bottom: 0;
116
+ }
107
117
 
108
- &.is-expanded + .is-expansion {
109
- display: table-row;
110
- }
118
+ .toggle {
119
+ transform: rotate(180deg);
120
+ color: inherit;
121
+ }
111
122
 
112
- &.is-expanded {
113
- > td {
114
- border-bottom: 0;
115
- }
123
+ + tr > td {
124
+ border-top: 0;
125
+ }
126
+ }
127
+ }
116
128
 
117
- .toggle {
118
- transform: rotate(180deg);
119
- color: inherit;
120
- }
129
+ thead {
130
+ td,
131
+ th {
132
+ border-width: 0 0 1px;
133
+ color: getColor('font');
134
+ }
135
+ }
121
136
 
122
- + tr > td {
123
- border-top: 0;
124
- }
125
- }
137
+ tfoot {
138
+ td,
139
+ th {
140
+ border-width: 2px 0 0;
141
+ color: getColor('font');
126
142
  }
143
+ }
127
144
 
128
- thead {
145
+ tbody {
146
+ tr {
147
+ &:last-child {
129
148
  td,
130
149
  th {
131
- border-width: 0 0 1px;
132
- color: getColor('font');
150
+ border-bottom-width: 0;
133
151
  }
152
+ }
134
153
  }
154
+ }
135
155
 
136
- tfoot {
137
- td,
138
- th {
139
- border-width: 2px 0 0;
140
- color: getColor('font');
141
- }
156
+ &:not(.is-bordered).is-comparative {
157
+ th {
158
+ border-right: 1px solid getBGColor('neutral');
142
159
  }
143
160
 
144
- tbody {
145
- tr {
146
- &:last-child {
147
- td,
148
- th {
149
- border-bottom-width: 0;
150
- }
151
- }
152
- }
161
+ td {
162
+ &:not(:last-child) {
163
+ border-right: 1px solid getBGColor('neutral-dark');
164
+ }
153
165
  }
166
+ }
154
167
 
155
- &:not(.is-bordered).is-comparative {
156
- th {
157
- border-right: 1px solid getBGColor('neutral');
158
- }
168
+ &.is-compact {
169
+ td,
170
+ th {
171
+ padding: math.div(20px, 3) math.div(20px, 3);
172
+ }
173
+ }
159
174
 
160
- td {
161
- &:not(:last-child) {
162
- border-right: 1px solid getBGColor('neutral-dark');
163
- }
164
- }
175
+ &.is-bordered {
176
+ td,
177
+ th {
178
+ border-width: 1px;
165
179
  }
166
180
 
167
- &.is-bordered {
181
+ tr {
182
+ &:last-child {
168
183
  td,
169
184
  th {
170
- border-width: 1px;
171
- }
172
-
173
- tr {
174
- &:last-child {
175
- td,
176
- th {
177
- border-bottom-width: 1px;
178
- }
179
- }
185
+ border-bottom-width: 1px;
180
186
  }
187
+ }
181
188
  }
189
+ }
182
190
 
183
- &.is-fullwidth {
184
- width: 100%;
185
- }
191
+ &.is-fullwidth {
192
+ width: 100%;
193
+ }
186
194
 
187
- &.is-striped {
188
- tbody {
189
- tr:not(.is-selected) {
190
- &:nth-child(even) {
191
- background-color: getBGColor('neutral');
192
- }
193
- }
195
+ &.is-striped {
196
+ tbody {
197
+ tr:not(.is-selected) {
198
+ &:nth-child(even) {
199
+ background-color: getBGColor('neutral');
194
200
  }
201
+ }
195
202
  }
203
+ }
196
204
 
197
- .subtable {
198
- background-color: getBGColor('neutral');
199
- border-radius: var(--radius);
200
- padding: $box-padding * 2;
205
+ .subtable {
206
+ background-color: getBGColor('neutral');
207
+ border-radius: var(--radius);
208
+ padding: $box-padding * 2;
201
209
 
202
- @include mobile() {
203
- padding: 15px;
204
- }
210
+ @include mobile() {
211
+ padding: 15px;
212
+ }
205
213
 
206
- .table {
207
- background: transparent;
214
+ .table {
215
+ background: transparent;
208
216
 
209
- tr:not(:first-child) {
210
- td {
211
- border-top: 1px solid getColor('neutral-dark');
212
- }
213
- }
217
+ tr:not(:first-child) {
218
+ td {
219
+ border-top: 1px solid getColor('neutral-dark');
220
+ }
221
+ }
214
222
 
215
- td {
216
- border: 0;
223
+ td {
224
+ border: 0;
217
225
 
218
- &:first-child {
219
- padding-left: 0;
220
- }
226
+ &:first-child {
227
+ padding-left: 0;
228
+ }
221
229
 
222
- &:last-child {
223
- padding-right: 0;
224
- }
225
- }
230
+ &:last-child {
231
+ padding-right: 0;
226
232
  }
233
+ }
227
234
  }
235
+ }
228
236
  }
229
237
 
230
238
  .table-container {
231
- @include block;
232
- @include overflow-touch;
239
+ @include block;
240
+ @include overflow-touch;
233
241
 
234
- overflow: auto;
235
- overflow-y: hidden;
236
- max-width: 100%;
242
+ overflow: auto;
243
+ overflow-y: hidden;
244
+ max-width: 100%;
237
245
  }
@@ -7,6 +7,11 @@
7
7
  border-radius: var(--radius-small);
8
8
  outline: none;
9
9
 
10
+ &:focus,
11
+ &:focus-visible {
12
+ padding: 15px;
13
+ }
14
+
10
15
  &::placeholder {
11
16
  font-size: 16px;
12
17
  }
@@ -48,7 +53,6 @@
48
53
  padding-left: $spacing-9;
49
54
  padding-right: $spacing-9;
50
55
 
51
- #{$hoverSelector},
52
56
  &:focus,
53
57
  &:focus-visible {
54
58
  padding-left: 55px;
@@ -18,7 +18,7 @@ $button-colors: (
18
18
  filter: brightness(1.2);
19
19
  }
20
20
  }
21
- &:active {
21
+ &:active:not(:disabled) {
22
22
  filter: brightness(0.7);
23
23
  }
24
24
 
@@ -19,7 +19,7 @@ $colors-brand: (
19
19
 
20
20
  // Brand Color Functionnal
21
21
  $colors-brand-funcionnal: (
22
- 'background', 'main', 'alternate', 'info', 'success', 'error', 'warning'
22
+ 'background', 'main', 'alternate', 'info', 'success', 'error', 'warning', 'neutral'
23
23
  );
24
24
 
25
25
  $colors-feedback: (
@@ -162,6 +162,14 @@
162
162
  -webkit-overflow-scrolling: touch;
163
163
  }
164
164
 
165
+ @mixin label-states {
166
+ &:focus,
167
+ &:active,
168
+ &:hover {
169
+ @include hover();
170
+ }
171
+ }
172
+
165
173
  @mixin overlay($offset: 0) {
166
174
  position: absolute;
167
175
  top: $offset;
@@ -452,11 +460,7 @@
452
460
  }
453
461
  }
454
462
 
455
- input:checked ~ label.#{$type}-label {
456
- font-weight: bold;
457
- }
458
-
459
- &:hover {
463
+ &:hover &:not(disabled) {
460
464
  label.#{$type}-label {
461
465
  &:before {
462
466
  @include hoverRules();
@@ -518,12 +522,13 @@
518
522
  }
519
523
 
520
524
  input {
521
- &:not(:disabled) ~ label.#{$type}-label {
522
- &:focus,
523
- &:active,
524
- &:hover {
525
- @include hover();
526
- }
525
+
526
+ &:not(:disabled):not(:checked) ~ label.radio-label {
527
+ @include label-states;
528
+ }
529
+
530
+ &:not(:disabled) ~ label.checkbox-label {
531
+ @include label-states;
527
532
  }
528
533
 
529
534
  &:checked:not(:disabled) ~ label.#{$type}-label {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@trilogy-ds/styles",
3
- "version": "0.0.1-beta.29",
3
+ "version": "0.0.1-beta.31",
4
4
  "author": "Bouygues Telecom",
5
5
  "license": "UNLICENSED",
6
6
  "files": [